UNPKG

print-template

Version:
1 lines 611 kB
!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).printTemplate=t()}}(function(){return function o(a,s,u){function l(e,t){if(!s[e]){if(!a[e]){var r="function"==typeof require&&require;if(!t&&r)return r(e,!0);if(h)return h(e,!0);var n=new Error("Cannot find module '"+e+"'");throw n.code="MODULE_NOT_FOUND",n}var i=s[e]={exports:{}};a[e][0].call(i.exports,function(t){return l(a[e][1][t]||t)},i,i.exports,o,a,s,u)}return s[e].exports}for(var h="function"==typeof require&&require,t=0;t<u.length;t++)l(u[t]);return l}({1:[function(t,e,r){"use strict";r.byteLength=function(t){var e=c(t),r=e[0],n=e[1];return 3*(r+n)/4-n},r.toByteArray=function(t){var e,r,n=c(t),i=n[0],o=n[1],a=new h(function(t,e){return 3*(t+e)/4-e}(i,o)),s=0,u=0<o?i-4:i;for(r=0;r<u;r+=4)e=l[t.charCodeAt(r)]<<18|l[t.charCodeAt(r+1)]<<12|l[t.charCodeAt(r+2)]<<6|l[t.charCodeAt(r+3)],a[s++]=e>>16&255,a[s++]=e>>8&255,a[s++]=255&e;2===o&&(e=l[t.charCodeAt(r)]<<2|l[t.charCodeAt(r+1)]>>4,a[s++]=255&e);1===o&&(e=l[t.charCodeAt(r)]<<10|l[t.charCodeAt(r+1)]<<4|l[t.charCodeAt(r+2)]>>2,a[s++]=e>>8&255,a[s++]=255&e);return a},r.fromByteArray=function(t){for(var e,r=t.length,n=r%3,i=[],o=0,a=r-n;o<a;o+=16383)i.push(u(t,o,a<o+16383?a:o+16383));1==n?(e=t[r-1],i.push(s[e>>2]+s[e<<4&63]+"==")):2==n&&(e=(t[r-2]<<8)+t[r-1],i.push(s[e>>10]+s[e>>4&63]+s[e<<2&63]+"="));return i.join("")};for(var s=[],l=[],h="undefined"!=typeof Uint8Array?Uint8Array:Array,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=0,o=n.length;i<o;++i)s[i]=n[i],l[n.charCodeAt(i)]=i;function c(t){var e=t.length;if(0<e%4)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function u(t,e,r){for(var n,i,o=[],a=e;a<r;a+=3)n=(t[a]<<16&16711680)+(t[a+1]<<8&65280)+(255&t[a+2]),o.push(s[(i=n)>>18&63]+s[i>>12&63]+s[i>>6&63]+s[63&i]);return o.join("")}l["-".charCodeAt(0)]=62,l["_".charCodeAt(0)]=63},{}],2:[function(t,e,F){(function(c){"use strict";var n=t("base64-js"),o=t("ieee754");F.Buffer=c,F.SlowBuffer=function(t){+t!=t&&(t=0);return c.alloc(+t)},F.INSPECT_MAX_BYTES=50;var r=2147483647;function a(t){if(r<t)throw new RangeError('The value "'+t+'" is invalid for option "size"');var e=new Uint8Array(t);return e.__proto__=c.prototype,e}function c(t,e,r){if("number"!=typeof t)return i(t,e,r);if("string"==typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return u(t)}function i(t,e,r){if("string"==typeof t)return function(t,e){"string"==typeof e&&""!==e||(e="utf8");if(!c.isEncoding(e))throw new TypeError("Unknown encoding: "+e);var r=0|f(t,e),n=a(r),i=n.write(t,e);i!==r&&(n=n.slice(0,i));return n}(t,e);if(ArrayBuffer.isView(t))return l(t);if(null==t)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(M(t,ArrayBuffer)||t&&M(t.buffer,ArrayBuffer))return function(t,e,r){if(e<0||t.byteLength<e)throw new RangeError('"offset" is outside of buffer bounds');if(t.byteLength<e+(r||0))throw new RangeError('"length" is outside of buffer bounds');var n;n=void 0===e&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,e):new Uint8Array(t,e,r);return n.__proto__=c.prototype,n}(t,e,r);if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type number');var n=t.valueOf&&t.valueOf();if(null!=n&&n!==t)return c.from(n,e,r);var i=function(t){if(c.isBuffer(t)){var e=0|h(t.length),r=a(e);return 0===r.length?r:(t.copy(r,0,0,e),r)}if(void 0!==t.length)return"number"!=typeof t.length||j(t.length)?a(0):l(t);if("Buffer"===t.type&&Array.isArray(t.data))return l(t.data)}(t);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return c.from(t[Symbol.toPrimitive]("string"),e,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function s(t){if("number"!=typeof t)throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function u(t){return s(t),a(t<0?0:0|h(t))}function l(t){for(var e=t.length<0?0:0|h(t.length),r=a(e),n=0;n<e;n+=1)r[n]=255&t[n];return r}function h(t){if(r<=t)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+r.toString(16)+" bytes");return 0|t}function f(t,e){if(c.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||M(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);var r=t.length,n=2<arguments.length&&!0===arguments[2];if(!n&&0===r)return 0;for(var i=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return O(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return I(t).length;default:if(i)return n?-1:O(t).length;e=(""+e).toLowerCase(),i=!0}}function d(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function p(t,e,r,n,i){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):2147483647<r?r=2147483647:r<-2147483648&&(r=-2147483648),j(r=+r)&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return-1;r=t.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof e&&(e=c.from(e,n)),c.isBuffer(e))return 0===e.length?-1:g(t,e,r,n,i);if("number"==typeof e)return e&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):g(t,[e],r,n,i);throw new TypeError("val must be string, number or Buffer")}function g(t,e,r,n,i){var o,a=1,s=t.length,u=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;s/=a=2,u/=2,r/=2}function l(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}if(i){var h=-1;for(o=r;o<s;o++)if(l(t,o)===l(e,-1===h?0:o-h)){if(-1===h&&(h=o),o-h+1===u)return h*a}else-1!==h&&(o-=o-h),h=-1}else for(s<r+u&&(r=s-u),o=r;0<=o;o--){for(var c=!0,f=0;f<u;f++)if(l(t,o+f)!==l(e,f)){c=!1;break}if(c)return o}return-1}function v(t,e,r,n){r=Number(r)||0;var i=t.length-r;(!n||i<(n=Number(n)))&&(n=i);var o=e.length;o/2<n&&(n=o/2);for(var a=0;a<n;++a){var s=parseInt(e.substr(2*a,2),16);if(j(s))return a;t[r+a]=s}return a}function m(t,e,r,n){return B(function(t){for(var e=[],r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}(e),t,r,n)}function y(t,e,r,n){return B(function(t,e){for(var r,n,i,o=[],a=0;a<t.length&&!((e-=2)<0);++a)r=t.charCodeAt(a),n=r>>8,i=r%256,o.push(i),o.push(n);return o}(e,t.length-r),t,r,n)}function b(t,e,r){return 0===e&&r===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,r))}function w(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;i<r;){var o,a,s,u,l=t[i],h=null,c=239<l?4:223<l?3:191<l?2:1;if(i+c<=r)switch(c){case 1:l<128&&(h=l);break;case 2:128==(192&(o=t[i+1]))&&127<(u=(31&l)<<6|63&o)&&(h=u);break;case 3:o=t[i+1],a=t[i+2],128==(192&o)&&128==(192&a)&&2047<(u=(15&l)<<12|(63&o)<<6|63&a)&&(u<55296||57343<u)&&(h=u);break;case 4:o=t[i+1],a=t[i+2],s=t[i+3],128==(192&o)&&128==(192&a)&&128==(192&s)&&65535<(u=(15&l)<<18|(63&o)<<12|(63&a)<<6|63&s)&&u<1114112&&(h=u)}null===h?(h=65533,c=1):65535<h&&(h-=65536,n.push(h>>>10&1023|55296),h=56320|1023&h),n.push(h),i+=c}return function(t){var e=t.length;if(e<=_)return String.fromCharCode.apply(String,t);var r="",n=0;for(;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=_));return r}(n)}F.kMaxLength=r,(c.TYPED_ARRAY_SUPPORT=function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()}catch(t){return!1}}())||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(c.prototype,"parent",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.buffer}}),Object.defineProperty(c.prototype,"offset",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.byteOffset}}),"undefined"!=typeof Symbol&&null!=Symbol.species&&c[Symbol.species]===c&&Object.defineProperty(c,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),c.poolSize=8192,c.from=function(t,e,r){return i(t,e,r)},c.prototype.__proto__=Uint8Array.prototype,c.__proto__=Uint8Array,c.alloc=function(t,e,r){return i=e,o=r,s(n=t),n<=0||void 0===i?a(n):"string"==typeof o?a(n).fill(i,o):a(n).fill(i);var n,i,o},c.allocUnsafe=function(t){return u(t)},c.allocUnsafeSlow=function(t){return u(t)},c.isBuffer=function(t){return null!=t&&!0===t._isBuffer&&t!==c.prototype},c.compare=function(t,e){if(M(t,Uint8Array)&&(t=c.from(t,t.offset,t.byteLength)),M(e,Uint8Array)&&(e=c.from(e,e.offset,e.byteLength)),!c.isBuffer(t)||!c.isBuffer(e))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===e)return 0;for(var r=t.length,n=e.length,i=0,o=Math.min(r,n);i<o;++i)if(t[i]!==e[i]){r=t[i],n=e[i];break}return r<n?-1:n<r?1:0},c.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},c.concat=function(t,e){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return c.alloc(0);var r;if(void 0===e)for(r=e=0;r<t.length;++r)e+=t[r].length;var n=c.allocUnsafe(e),i=0;for(r=0;r<t.length;++r){var o=t[r];if(M(o,Uint8Array)&&(o=c.from(o)),!c.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(n,i),i+=o.length}return n},c.byteLength=f,c.prototype._isBuffer=!0,c.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)d(this,e,e+1);return this},c.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)d(this,e,e+3),d(this,e+1,e+2);return this},c.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)d(this,e,e+7),d(this,e+1,e+6),d(this,e+2,e+5),d(this,e+3,e+4);return this},c.prototype.toLocaleString=c.prototype.toString=function(){var t=this.length;return 0===t?"":0===arguments.length?w(this,0,t):function(t,e,r){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t=t||"utf8";;)switch(t){case"hex":return L(this,e,r);case"utf8":case"utf-8":return w(this,e,r);case"ascii":return x(this,e,r);case"latin1":case"binary":return A(this,e,r);case"base64":return b(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}.apply(this,arguments)},c.prototype.equals=function(t){if(!c.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===c.compare(this,t)},c.prototype.inspect=function(){var t="",e=F.INSPECT_MAX_BYTES;return t=this.toString("hex",0,e).replace(/(.{2})/g,"$1 ").trim(),this.length>e&&(t+=" ... "),"<Buffer "+t+">"},c.prototype.compare=function(t,e,r,n,i){if(M(t,Uint8Array)&&(t=c.from(t,t.offset,t.byteLength)),!c.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),e<0||r>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(i<=n&&r<=e)return 0;if(i<=n)return-1;if(r<=e)return 1;if(this===t)return 0;for(var o=(i>>>=0)-(n>>>=0),a=(r>>>=0)-(e>>>=0),s=Math.min(o,a),u=this.slice(n,i),l=t.slice(e,r),h=0;h<s;++h)if(u[h]!==l[h]){o=u[h],a=l[h];break}return o<a?-1:a<o?1:0},c.prototype.includes=function(t,e,r){return-1!==this.indexOf(t,e,r)},c.prototype.indexOf=function(t,e,r){return p(this,t,e,r,!0)},c.prototype.lastIndexOf=function(t,e,r){return p(this,t,e,r,!1)},c.prototype.write=function(t,e,r,n){if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)n=e,r=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-e;if((void 0===r||i<r)&&(r=i),0<t.length&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n=n||"utf8";for(var o,a,s,u,l,h,c=!1;;)switch(n){case"hex":return v(this,t,e,r);case"utf8":case"utf-8":return l=e,h=r,B(O(t,(u=this).length-l),u,l,h);case"ascii":return m(this,t,e,r);case"latin1":case"binary":return m(this,t,e,r);case"base64":return o=this,a=e,s=r,B(I(t),o,a,s);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return y(this,t,e,r);default:if(c)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),c=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var _=4096;function x(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(127&t[i]);return n}function A(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(t[i]);return n}function L(t,e,r){var n=t.length;(!e||e<0)&&(e=0),(!r||r<0||n<r)&&(r=n);for(var i="",o=e;o<r;++o)i+=T(t[o]);return i}function S(t,e,r){for(var n=t.slice(e,r),i="",o=0;o<n.length;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}function N(t,e,r){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(r<t+e)throw new RangeError("Trying to access beyond buffer length")}function P(t,e,r,n,i,o){if(!c.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(i<e||e<o)throw new RangeError('"value" argument is out of bounds');if(r+n>t.length)throw new RangeError("Index out of range")}function E(t,e,r,n){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function k(t,e,r,n,i){return e=+e,r>>>=0,i||E(t,0,r,4),o.write(t,e,r,n,23,4),r+4}function C(t,e,r,n,i){return e=+e,r>>>=0,i||E(t,0,r,8),o.write(t,e,r,n,52,8),r+8}c.prototype.slice=function(t,e){var r=this.length;(t=~~t)<0?(t+=r)<0&&(t=0):r<t&&(t=r),(e=void 0===e?r:~~e)<0?(e+=r)<0&&(e=0):r<e&&(e=r),e<t&&(e=t);var n=this.subarray(t,e);return n.__proto__=c.prototype,n},c.prototype.readUIntLE=function(t,e,r){t>>>=0,e>>>=0,r||N(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return n},c.prototype.readUIntBE=function(t,e,r){t>>>=0,e>>>=0,r||N(t,e,this.length);for(var n=this[t+--e],i=1;0<e&&(i*=256);)n+=this[t+--e]*i;return n},c.prototype.readUInt8=function(t,e){return t>>>=0,e||N(t,1,this.length),this[t]},c.prototype.readUInt16LE=function(t,e){return t>>>=0,e||N(t,2,this.length),this[t]|this[t+1]<<8},c.prototype.readUInt16BE=function(t,e){return t>>>=0,e||N(t,2,this.length),this[t]<<8|this[t+1]},c.prototype.readUInt32LE=function(t,e){return t>>>=0,e||N(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},c.prototype.readUInt32BE=function(t,e){return t>>>=0,e||N(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},c.prototype.readIntLE=function(t,e,r){t>>>=0,e>>>=0,r||N(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return(i*=128)<=n&&(n-=Math.pow(2,8*e)),n},c.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||N(t,e,this.length);for(var n=e,i=1,o=this[t+--n];0<n&&(i*=256);)o+=this[t+--n]*i;return(i*=128)<=o&&(o-=Math.pow(2,8*e)),o},c.prototype.readInt8=function(t,e){return t>>>=0,e||N(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},c.prototype.readInt16LE=function(t,e){t>>>=0,e||N(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt16BE=function(t,e){t>>>=0,e||N(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt32LE=function(t,e){return t>>>=0,e||N(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},c.prototype.readInt32BE=function(t,e){return t>>>=0,e||N(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},c.prototype.readFloatLE=function(t,e){return t>>>=0,e||N(t,4,this.length),o.read(this,t,!0,23,4)},c.prototype.readFloatBE=function(t,e){return t>>>=0,e||N(t,4,this.length),o.read(this,t,!1,23,4)},c.prototype.readDoubleLE=function(t,e){return t>>>=0,e||N(t,8,this.length),o.read(this,t,!0,52,8)},c.prototype.readDoubleBE=function(t,e){return t>>>=0,e||N(t,8,this.length),o.read(this,t,!1,52,8)},c.prototype.writeUIntLE=function(t,e,r,n){t=+t,e>>>=0,r>>>=0,n||P(this,t,e,r,Math.pow(2,8*r)-1,0);var i=1,o=0;for(this[e]=255&t;++o<r&&(i*=256);)this[e+o]=t/i&255;return e+r},c.prototype.writeUIntBE=function(t,e,r,n){t=+t,e>>>=0,r>>>=0,n||P(this,t,e,r,Math.pow(2,8*r)-1,0);var i=r-1,o=1;for(this[e+i]=255&t;0<=--i&&(o*=256);)this[e+i]=t/o&255;return e+r},c.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||P(this,t,e,1,255,0),this[e]=255&t,e+1},c.prototype.writeUInt16LE=function(t,e,r){return t=+t,e>>>=0,r||P(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},c.prototype.writeUInt16BE=function(t,e,r){return t=+t,e>>>=0,r||P(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},c.prototype.writeUInt32LE=function(t,e,r){return t=+t,e>>>=0,r||P(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},c.prototype.writeUInt32BE=function(t,e,r){return t=+t,e>>>=0,r||P(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},c.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var i=Math.pow(2,8*r-1);P(this,t,e,r,i-1,-i)}var o=0,a=1,s=0;for(this[e]=255&t;++o<r&&(a*=256);)t<0&&0===s&&0!==this[e+o-1]&&(s=1),this[e+o]=(t/a>>0)-s&255;return e+r},c.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var i=Math.pow(2,8*r-1);P(this,t,e,r,i-1,-i)}var o=r-1,a=1,s=0;for(this[e+o]=255&t;0<=--o&&(a*=256);)t<0&&0===s&&0!==this[e+o+1]&&(s=1),this[e+o]=(t/a>>0)-s&255;return e+r},c.prototype.writeInt8=function(t,e,r){return t=+t,e>>>=0,r||P(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},c.prototype.writeInt16LE=function(t,e,r){return t=+t,e>>>=0,r||P(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},c.prototype.writeInt16BE=function(t,e,r){return t=+t,e>>>=0,r||P(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},c.prototype.writeInt32LE=function(t,e,r){return t=+t,e>>>=0,r||P(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},c.prototype.writeInt32BE=function(t,e,r){return t=+t,e>>>=0,r||P(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},c.prototype.writeFloatLE=function(t,e,r){return k(this,t,e,!0,r)},c.prototype.writeFloatBE=function(t,e,r){return k(this,t,e,!1,r)},c.prototype.writeDoubleLE=function(t,e,r){return C(this,t,e,!0,r)},c.prototype.writeDoubleBE=function(t,e,r){return C(this,t,e,!1,r)},c.prototype.copy=function(t,e,r,n){if(!c.isBuffer(t))throw new TypeError("argument should be a Buffer");if(r=r||0,n||0===n||(n=this.length),e>=t.length&&(e=t.length),e=e||0,0<n&&n<r&&(n=r),n===r)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e<n-r&&(n=t.length-e+r);var i=n-r;if(this===t&&"function"==typeof Uint8Array.prototype.copyWithin)this.copyWithin(e,r,n);else if(this===t&&r<e&&e<n)for(var o=i-1;0<=o;--o)t[o+e]=this[o+r];else Uint8Array.prototype.set.call(t,this.subarray(r,n),e);return i},c.prototype.fill=function(t,e,r,n){if("string"==typeof t){if("string"==typeof e?(n=e,e=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!c.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===t.length){var i=t.charCodeAt(0);("utf8"===n&&i<128||"latin1"===n)&&(t=i)}}else"number"==typeof t&&(t&=255);if(e<0||this.length<e||this.length<r)throw new RangeError("Out of range index");if(r<=e)return this;var o;if(e>>>=0,r=void 0===r?this.length:r>>>0,"number"==typeof(t=t||0))for(o=e;o<r;++o)this[o]=t;else{var a=c.isBuffer(t)?t:c.from(t,n),s=a.length;if(0===s)throw new TypeError('The value "'+t+'" is invalid for argument "value"');for(o=0;o<r-e;++o)this[o+e]=a[o%s]}return this};var e=/[^+/0-9A-Za-z-_]/g;function T(t){return t<16?"0"+t.toString(16):t.toString(16)}function O(t,e){var r;e=e||1/0;for(var n=t.length,i=null,o=[],a=0;a<n;++a){if(55295<(r=t.charCodeAt(a))&&r<57344){if(!i){if(56319<r){-1<(e-=3)&&o.push(239,191,189);continue}if(a+1===n){-1<(e-=3)&&o.push(239,191,189);continue}i=r;continue}if(r<56320){-1<(e-=3)&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&-1<(e-=3)&&o.push(239,191,189);if(i=null,r<128){if(--e<0)break;o.push(r)}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function I(t){return n.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(e,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function B(t,e,r,n){for(var i=0;i<n&&!(i+r>=e.length||i>=t.length);++i)e[i+r]=t[i];return i}function M(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function j(t){return t!=t}}).call(this,t("buffer").Buffer)},{"base64-js":1,buffer:2,ieee754:4}],3:[function(t,e,r){"use strict";var p={single_source_shortest_paths:function(t,e,r){var n={},i={};i[e]=0;var o,a,s,u,l,h,c,f=p.PriorityQueue.make();for(f.push(e,0);!f.empty();)for(s in a=(o=f.pop()).value,u=o.cost,l=t[a]||{})l.hasOwnProperty(s)&&(h=u+l[s],c=i[s],(void 0===i[s]||h<c)&&(i[s]=h,f.push(s,h),n[s]=a));if(void 0===r||void 0!==i[r])return n;var d=["Could not find a path from ",e," to ",r,"."].join("");throw new Error(d)},extract_shortest_path_from_predecessor_list:function(t,e){for(var r=[],n=e;n;)r.push(n),t[n],n=t[n];return r.reverse(),r},find_path:function(t,e,r){var n=p.single_source_shortest_paths(t,e,r);return p.extract_shortest_path_from_predecessor_list(n,r)},PriorityQueue:{make:function(t){var e,r=p.PriorityQueue,n={};for(e in t=t||{},r)r.hasOwnProperty(e)&&(n[e]=r[e]);return n.queue=[],n.sorter=t.sorter||r.default_sorter,n},default_sorter:function(t,e){return t.cost-e.cost},push:function(t,e){var r={value:t,cost:e};this.queue.push(r),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return 0===this.queue.length}}};void 0!==e&&(e.exports=p)},{}],4:[function(t,e,r){r.read=function(t,e,r,n,i){var o,a,s=8*i-n-1,u=(1<<s)-1,l=u>>1,h=-7,c=r?i-1:0,f=r?-1:1,d=t[e+c];for(c+=f,o=d&(1<<-h)-1,d>>=-h,h+=s;0<h;o=256*o+t[e+c],c+=f,h-=8);for(a=o&(1<<-h)-1,o>>=-h,h+=n;0<h;a=256*a+t[e+c],c+=f,h-=8);if(0===o)o=1-l;else{if(o===u)return a?NaN:1/0*(d?-1:1);a+=Math.pow(2,n),o-=l}return(d?-1:1)*a*Math.pow(2,o-n)},r.write=function(t,e,r,n,i,o){var a,s,u,l=8*o-i-1,h=(1<<l)-1,c=h>>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:o-1,p=n?1:-1,g=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=h):(a=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-a))<1&&(a--,u*=2),2<=(e+=1<=a+c?f/u:f*Math.pow(2,1-c))*u&&(a++,u/=2),h<=a+c?(s=0,a=h):1<=a+c?(s=(e*u-1)*Math.pow(2,i),a+=c):(s=e*Math.pow(2,c-1)*Math.pow(2,i),a=0));8<=i;t[r+d]=255&s,d+=p,s/=256,i-=8);for(a=a<<i|s,l+=i;0<l;t[r+d]=255&a,d+=p,a/=256,l-=8);t[r+d-p]|=128*g}},{}],5:[function(t,e,r){var n={}.toString;e.exports=Array.isArray||function(t){return"[object Array]"==n.call(t)}},{}],6:[function(t,e,r){"use strict";var n=f(t("./barcodes/")),u=f(t("./help/merge.js")),a=f(t("./help/linearizeEncodings.js")),i=f(t("./help/fixOptions.js")),o=f(t("./help/getRenderProperties.js")),l=f(t("./help/optionsFromStrings.js")),s=f(t("./exceptions/ErrorHandler.js")),h=t("./exceptions/exceptions.js"),c=f(t("./options/defaults.js"));function f(t){return t&&t.__esModule?t:{default:t}}function d(t,e,r){var n=new p;if(void 0===t)throw Error("No element to render on was provided.");return n._renderProperties=(0,o.default)(t),n._encodings=[],n._options=c.default,n._errorHandler=new s.default(n),void 0!==e&&((r=r||{}).format||(r.format=y()),n.options(r)[r.format](e,r).render()),n}var p=function(){};for(var g in d.getModule=function(t){return n.default[t]},n.default)n.default.hasOwnProperty(g)&&v(n.default,g);function v(a,s){p.prototype[s]=p.prototype[s.toUpperCase()]=p.prototype[s.toLowerCase()]=function(n,i){var o=this;return o._errorHandler.wrapBarcodeCall(function(){i.text=void 0===i.text?void 0:""+i.text;var t=(0,u.default)(o._options,i);t=(0,l.default)(t);var e=a[s],r=m(n,e,t);return o._encodings.push(r),o})}}function m(t,e,r){var n=new e(t=""+t,r);if(!n.valid())throw new h.InvalidInputException(n.constructor.name,t);var i=n.encode();i=(0,a.default)(i);for(var o=0;o<i.length;o++)i[o].options=(0,u.default)(r,i[o].options);return i}function y(){return n.default.CODE128?"CODE128":Object.keys(n.default)[0]}function b(t,e,r){e=(0,a.default)(e);for(var n=0;n<e.length;n++)e[n].options=(0,u.default)(r,e[n].options),(0,i.default)(e[n].options);(0,i.default)(r),new t.renderer(t.element,e,r).render(),t.afterRender&&t.afterRender()}p.prototype.options=function(t){return this._options=(0,u.default)(this._options,t),this},p.prototype.blank=function(t){var e=new Array(t+1).join("0");return this._encodings.push({data:e}),this},p.prototype.init=function(){var e;if(this._renderProperties)for(var t in Array.isArray(this._renderProperties)||(this._renderProperties=[this._renderProperties]),this._renderProperties){e=this._renderProperties[t];var r=(0,u.default)(this._options,e.options);"auto"==r.format&&(r.format=y()),this._errorHandler.wrapBarcodeCall(function(){var t=m(r.value,n.default[r.format.toUpperCase()],r);b(e,t,r)})}},p.prototype.render=function(){if(!this._renderProperties)throw new h.NoElementException;if(Array.isArray(this._renderProperties))for(var t=0;t<this._renderProperties.length;t++)b(this._renderProperties[t],this._encodings,this._options);else b(this._renderProperties,this._encodings,this._options);return this},p.prototype._defaults=c.default,"undefined"!=typeof window&&(window.JsBarcode=d),"undefined"!=typeof jQuery&&(jQuery.fn.JsBarcode=function(t,e){var r=[];return jQuery(this).each(function(){r.push(this)}),d(r,t,e)}),e.exports=d},{"./barcodes/":40,"./exceptions/ErrorHandler.js":42,"./exceptions/exceptions.js":43,"./help/fixOptions.js":44,"./help/getRenderProperties.js":46,"./help/linearizeEncodings.js":47,"./help/merge.js":48,"./help/optionsFromStrings.js":49,"./options/defaults.js":50}],7:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});r.default=function t(e,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.data=e,this.text=r.text||e,this.options=r}},{}],8:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=function(t,e,r){return e&&i(t.prototype,e),r&&i(t,r),t};function i(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var o,a=t("../Barcode.js"),s=(o=a)&&o.__esModule?o:{default:o},u=t("./constants");var l=(function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(h,s.default),n(h,[{key:"valid",value:function(){return/^[\x00-\x7F\xC8-\xD3]+$/.test(this.data)}},{key:"encode",value:function(){var t=this.bytes,e=t.shift()-105,r=u.SET_BY_CODE[e];if(void 0===r)throw new RangeError("The encoding does not start with a start character.");!0===this.shouldEncodeAsEan128()&&t.unshift(u.FNC1);var n=h.next(t,1,r);return{text:this.text===this.data?this.text.replace(/[^\x20-\x7E]/g,""):this.text,data:h.getBar(e)+n.result+h.getBar((n.checksum+e)%u.MODULO)+h.getBar(u.STOP)}}},{key:"shouldEncodeAsEan128",value:function(){var t=this.options.ean128||!1;return"string"==typeof t&&(t="true"===t.toLowerCase()),t}}],[{key:"getBar",value:function(t){return u.BARS[t]?u.BARS[t].toString():""}},{key:"correctIndex",value:function(t,e){if(e!==u.SET_A)return e===u.SET_B?t.shift()-32:10*(t.shift()-48)+t.shift()-48;var r=t.shift();return r<32?r+64:r-32}},{key:"next",value:function(t,e,r){if(!t.length)return{result:"",checksum:0};var n=void 0,i=void 0;if(200<=t[0]){i=t.shift()-105;var o=u.SWAP[i];n=void 0!==o?h.next(t,e+1,o):(r!==u.SET_A&&r!==u.SET_B||i!==u.SHIFT||(t[0]=r===u.SET_A?95<t[0]?t[0]-96:t[0]:t[0]<32?t[0]+96:t[0]),h.next(t,e+1,r))}else i=h.correctIndex(t,r),n=h.next(t,e+1,r);var a=i*e;return{result:h.getBar(i)+n.result,checksum:a+n.checksum}}}]),h);function h(t,e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,h);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(h.__proto__||Object.getPrototypeOf(h)).call(this,t.substring(1),e));return r.bytes=t.split("").map(function(t){return t.charCodeAt(0)}),r}r.default=l},{"../Barcode.js":7,"./constants":14}],9:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=function(t,e,r){return e&&i(t.prototype,e),r&&i(t,r),t};function i(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var o,a=t("./CODE128.js"),s=(o=a)&&o.__esModule?o:{default:o},u=t("./constants");var l=(function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(h,s.default),n(h,[{key:"valid",value:function(){return new RegExp("^"+u.A_CHARS+"+$").test(this.data)}}]),h);function h(t,e){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,h),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(h.__proto__||Object.getPrototypeOf(h)).call(this,u.A_START_CHAR+t,e))}r.default=l},{"./CODE128.js":8,"./constants":14}],10:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=function(t,e,r){return e&&i(t.prototype,e),r&&i(t,r),t};function i(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var o,a=t("./CODE128.js"),s=(o=a)&&o.__esModule?o:{default:o},u=t("./constants");var l=(function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(h,s.default),n(h,[{key:"valid",value:function(){return new RegExp("^"+u.B_CHARS+"+$").test(this.data)}}]),h);function h(t,e){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,h),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(h.__proto__||Object.getPrototypeOf(h)).call(this,u.B_START_CHAR+t,e))}r.default=l},{"./CODE128.js":8,"./constants":14}],11:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=function(t,e,r){return e&&i(t.prototype,e),r&&i(t,r),t};function i(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var o,a=t("./CODE128.js"),s=(o=a)&&o.__esModule?o:{default:o},u=t("./constants");var l=(function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(h,s.default),n(h,[{key:"valid",value:function(){return new RegExp("^"+u.C_CHARS+"+$").test(this.data)}}]),h);function h(t,e){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,h),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(h.__proto__||Object.getPrototypeOf(h)).call(this,u.C_START_CHAR+t,e))}r.default=l},{"./CODE128.js":8,"./constants":14}],12:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=o(t("./CODE128")),i=o(t("./auto"));function o(t){return t&&t.__esModule?t:{default:t}}function a(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}var s=(function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(u,n.default),u);function u(t,e){if(!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,u),/^[\x00-\x7F\xC8-\xD3]+$/.test(t))var r=a(this,(u.__proto__||Object.getPrototypeOf(u)).call(this,(0,i.default)(t),e));else r=a(this,(u.__proto__||Object.getPrototypeOf(u)).call(this,t,e));return a(r)}r.default=s},{"./CODE128":8,"./auto":13}],13:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var o=t("./constants"),i=function(t){return t.match(new RegExp("^"+o.A_CHARS+"*"))[0].length},a=function(t){return t.match(new RegExp("^"+o.B_CHARS+"*"))[0].length},s=function(t){return t.match(new RegExp("^"+o.C_CHARS+"*"))[0]};function u(t,e){var r=e?o.A_CHARS:o.B_CHARS,n=t.match(new RegExp("^("+r+"+?)(([0-9]{2}){2,})([^0-9]|$)"));if(n)return n[1]+String.fromCharCode(204)+l(t.substring(n[1].length));var i=t.match(new RegExp("^"+r+"+"))[0];return i.length===t.length?t:i+String.fromCharCode(e?205:206)+u(t.substring(i.length),!e)}function l(t){var e=s(t),r=e.length;if(r===t.length)return t;t=t.substring(r);var n=i(t)>=a(t);return e+String.fromCharCode(n?206:205)+u(t,n)}r.default=function(t){var e=void 0;if(2<=s(t).length)e=o.C_START_CHAR+l(t);else{var r=i(t)>a(t);e=(r?o.A_START_CHAR:o.B_START_CHAR)+u(t,r)}return e.replace(/[\xCD\xCE]([^])[\xCD\xCE]/,function(t,e){return String.fromCharCode(203)+e})}},{"./constants":14}],14:[function(t,e,r){"use strict";var n;function i(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}Object.defineProperty(r,"__esModule",{value:!0});var o=r.SET_A=0,a=r.SET_B=1,s=r.SET_C=2,u=(r.SHIFT=98,r.START_A=103),l=r.START_B=104,h=r.START_C=105;r.MODULO=103,r.STOP=106,r.FNC1=207,r.SET_BY_CODE=(i(n={},u,o),i(n,l,a),i(n,h,s),n),r.SWAP={101:o,100:a,99:s},r.A_START_CHAR=String.fromCharCode(208),r.B_START_CHAR=String.fromCharCode(209),r.C_START_CHAR=String.fromCharCode(210),r.A_CHARS="[\0-_È-Ï]",r.B_CHARS="[ -È-Ï]",r.C_CHARS="(Ï*[0-9]{2}Ï*)",r.BARS=[11011001100,11001101100,11001100110,10010011e3,10010001100,10001001100,10011001e3,10011000100,10001100100,11001001e3,11001000100,11000100100,10110011100,10011011100,10011001110,10111001100,10011101100,10011100110,11001110010,11001011100,11001001110,11011100100,11001110100,11101101110,11101001100,11100101100,11100100110,11101100100,11100110100,11100110010,11011011e3,11011000110,11000110110,10100011e3,10001011e3,10001000110,10110001e3,10001101e3,10001100010,11010001e3,11000101e3,11000100010,10110111e3,10110001110,10001101110,10111011e3,10111000110,10001110110,11101110110,11010001110,11000101110,11011101e3,11011100010,11011101110,11101011e3,11101000110,11100010110,11101101e3,11101100010,11100011010,11101111010,11001000010,11110001010,1010011e4,10100001100,1001011e4,10010000110,10000101100,10000100110,1011001e4,10110000100,1001101e4,10011000010,10000110100,10000110010,11000010010,1100101e4,11110111010,11000010100,10001111010,10100111100,10010111100,10010011110,10111100100,10011110100,10011110010,11110100100,11110010100,11110010010,11011011110,11011110110,11110110110,10101111e3,10100011110,10001011110,10111101e3,10111100010,11110101e3,11110100010,10111011110,10111101110,11101011110,11110101110,11010000100,1101001e4,11010011100,1100011101011]},{}],15:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.CODE128C=r.CODE128B=r.CODE128A=r.CODE128=void 0;var n=s(t("./CODE128_AUTO.js")),i=s(t("./CODE128A.js")),o=s(t("./CODE128B.js")),a=s(t("./CODE128C.js"));function s(t){return t&&t.__esModule?t:{default:t}}r.CODE128=n.default,r.CODE128A=i.default,r.CODE128B=o.default,r.CODE128C=a.default},{"./CODE128A.js":9,"./CODE128B.js":10,"./CODE128C.js":11,"./CODE128_AUTO.js":12}],16:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.CODE39=void 0;var n=function(t,e,r){return e&&i(t.prototype,e),r&&i(t,r),t};function i(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var o,a=t("../Barcode.js");var s=(function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(u,((o=a)&&o.__esModule?o:{default:o}).default),n(u,[{key:"encode",value:function(){for(var t=c("*"),e=0;e<this.data.length;e++)t+=c(this.data[e])+"0";return{data:t+=c("*"),text:this.text}}},{key:"valid",value:function(){return-1!==this.data.search(/^[0-9A-Z\-\.\ \$\/\+\%]+$/)}}]),u);function u(t,e){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,u),t=t.toUpperCase(),e.mod43&&(t+=(r=function(t){for(var e=0,r=0;r<t.length;r++)e+=f(t[r]);return e%=43}(t),l[r])),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(u.__proto__||Object.getPrototypeOf(u)).call(this,t,e))}var l=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","-","."," ","$","/","+","%","*"],h=[20957,29783,23639,30485,20951,29813,23669,20855,29789,23645,29975,23831,30533,22295,30149,24005,21623,29981,23837,22301,30023,23879,30545,22343,30161,24017,21959,30065,23921,22385,29015,18263,29141,17879,29045,18293,17783,29021,18269,17477,17489,17681,20753,35770];function c(t){return e=f(t),h[e].toString(2);var e}function f(t){return l.indexOf(t)}r.CODE39=s},{"../Barcode.js":7}],17:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=function(t,e,r){return e&&i(t.prototype,e),r&&i(t,r),t};function i(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var o=t("./constants"),a=s(t("./encoder"));function s(t){return t&&t.__esModule?t:{default:t}}var u=(function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(l,s(t("../Barcode")).default),n(l,[{key:"encode",value:function(){return this.options.flat?this.encodeFlat():this.encodeGuarded()}},{key:"leftText",value:function(t,e){return this.text.substr(t,e)}},{key:"leftEncode",value:function(t,e){return(0,a.default)(t,e)}},{key:"rightText",value:function(t,e){return this.text.substr(t,e)}},{key:"rightEncode",value:function(t,e){return(0,a.default)(t,e)}},{key:"encodeGuarded",value:function(){var t={fontSize:this.fontSize},e={height:this.guardHeight};return[{data:o.SIDE_BIN,options:e},{data:this.leftEncode(),text:this.leftText(),options:t},{data:o.MIDDLE_BIN,options:e},{data:this.rightEncode(),text:this.rightText(),options:t},{data:o.SIDE_BIN,options:e}]}},{key:"encodeFlat",value:function(){return{data:[o.SIDE_BIN,this.leftEncode(),o.MIDDLE_BIN,this.rightEncode(),o.SIDE_BIN].join(""),text:this.text}}}]),l);function l(t,e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(l.__proto__||Object.getPrototypeOf(l)).call(this,t,e));return r.fontSize=!e.flat&&e.fontSize>10*e.width?10*e.width:e.fontSize,r.guardHeight=e.height+r.fontSize/2+e.textMargin,r}r.default=u},{"../Barcode":7,"./constants":24,"./encoder":25}],18:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=function(t,e,r){return e&&i(t.prototype,e),r&&i(t,r),t};function i(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function a(t,e,r){null===t&&(t=Function.prototype);var n=Object.getOwnPropertyDescriptor(t,e);if(void 0===n){var i=Object.getPrototypeOf(t);return null===i?void 0:a(i,e,r)}if("value"in n)return n.value;var o=n.get;return void 0!==o?o.call(r):void 0}var o,s=t("./constants"),u=t("./EAN"),l=(o=u)&&o.__esModule?o:{default:o};function h(t){return(10-t.substr(0,12).split("").map(function(t){return+t}).reduce(function(t,e,r){return r%2?t+3*e:t+e},0)%10)%10}var c=(function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(f,l.default),n(f,[{key:"valid",value:function(){return-1!==this.data.search(/^[0-9]{13}$/)&&+this.data[12]===h(this.data)}},{key:"leftText",value:function(){return a(f.prototype.__proto__||Object.getPrototypeOf(f.prototype),"leftText",this).call(this,1,6)}},{key:"leftEncode",value:function(){var t=this.data.substr(1,6),e=s.EAN13_STRUCTURE[this.data[0]];return a(f.prototype.__proto__||Object.getPrototypeOf(f.prototype),"leftEncode",this).call(this,t,e)}},{key:"rightText",value:function(){return a(f.prototype.__proto__||Object.getPrototypeOf(f.prototype),"rightText",this).call(this,7,6)}},{key:"rightEncode",value:function(){var t=this.data.substr(7,6);return a(f.prototype.__proto__||Object.getPrototypeOf(f.prototype),"rightEncode",this).call(this,t,"RRRRRR")}},{key:"encodeGuarded",value:function(){var t=a(f.prototype.__proto__||Object.getPrototypeOf(f.prototype),"encodeGuarded",this).call(this);return this.options.displayValue&&(t.unshift({data:"000000000000",text:this.text.substr(0,1),options:{textAlign:"left",fontSize:this.fontSize}}),this.options.lastChar&&(t.push({data:"00"}),t.push({data:"00000",text:this.options.lastChar,options:{fontSize:this.fontSize}}))),t}}]),f);function f(t,e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,f),-1!==t.search(/^[0-9]{12}$/)&&(t+=h(t));var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(f.__proto__||Object.getPrototypeOf(f)).call(this,t,e));return r.lastChar=e.lastChar,r}r.default=c},{"./EAN":17,"./constants":24}],19:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=function(t,e,r){return e&&i(t.prototype,e),r&&i(t,r),t};function i(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var o=t("./constants"),a=s(t("./encoder"));function s(t){return t&&t.__esModule?t:{default:t}}var u=(function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(l,s(t("../Barcode")).default),n(l,[{key:"valid",value:function(){return-1!==this.data.search(/^[0-9]{2}$/)}},{key:"encode",value:function(){var t=o.EAN2_STRUCTURE[parseInt(this.data)%4];return{data:"1011"+(0,a.default)(this.data,t,"01"),text:this.text}}}]),l);function l(t,e){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(l.__proto__||Object.getPrototypeOf(l)).call(this,t,e))}r.default=u},{"../Barcode":7,"./constants":24,"./encoder":25}],20:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=function(t,e,r){return e&&i(t.prototype,e),r&&i(t,r),t};function i(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var o=t("./constants"),a=u(t("./encoder")),s=u(t("../Barcode"));function u(t){return t&&t.__esModule?t:{default:t}}var l=(function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(h,s.default),n(h,[{key:"valid",value:function(){return-1!==this.data.search(/^[0-9]{5}$/)}},{key:"encode",value:function(){var t=o.EAN5_STRUCTURE[this.data.split("").map(function(t){return+t}).reduce(function(t,e,r){return r%2?t+9*e:t+3*e},0)%10];return{data:"1011"+(0,a.default)(this.data,t,"01"),text:this.text}}}]),h);function h(t,e){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,h),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(h.__proto__||Object.getPrototypeOf(h)).call(this,t,e))}r.default=l},{"../Barcode":7,"./constants":24,"./encoder":25}],21:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=function(t,e,r){return e&&i(t.prototype,e),r&&i(t,r),t};function i(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function a(t,e,r){null===t&&(t=Function.prototype);var n=Object.getOwnPropertyDescriptor(t,e);if(void 0===n){var i=Object.getPrototypeOf(t);return null===i?void 0:a(i,e,r)}if("value"in n)return n.value;var o=n.get;return void 0!==o?o.call(r):void 0}var o,s=t("./EAN"),u=(o=s)&&o.__esModule?o:{default:o};function l(t){return(10-t.substr(0,7).split("").map(function(t){return+t}).reduce(function(t,e,r){return r%2?t+e:t+3*e},0)%10)%10}var h=(function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(c,u.default),n(c,[{key:"valid",value:function(){return-1!==this.data.search(/^[0-9]{8}$/)&&+this.data[7]===l(this.data)}},{key:"leftText",value:function(){return a(c.prototype.__proto__||Object.getPrototypeOf(c.prototype),"leftText",this).call(this,0,4)}},{key:"leftEncode",value:function(){var t=this.data.substr(0,4);return a(c.prototype.__proto__||Object.getPrototypeOf(c.prototype),"leftEncode",this).call(this,t,"LLLL")}},{key:"rightText",value:function(){return a(c.prototype.__proto__||Object.getPrototypeOf(c.prototype),"rightText",this).call(this,4,4)}},{key:"rightEncode",value:function(){var t=this.data.substr(4,4);return a(c.prototype.__proto__||Object.getPrototypeOf(c.prototype),"rightEncode",this).call(this,t,"RRRR")}}]),c);function c(t,e){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,c),-1!==t.search(/^[0-9]{7}$/)&&(t+=l(t)),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(c.__proto__||Object.getPrototypeOf(c)).call(this,t,e))}r.default=h},{"./EAN":17}],22:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=function(t,e,r){return e&&i(t.prototype,e),r&&i(t,r),t};function i(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}r.checksum=l;var o=a(t("./encoder"));function a(t){return t&&t.__esModule?t:{default:t}}var s=(function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(u,a(t("../Barcode.js")).default),n(u,[{key:"valid",value:function(){return-1!==this.data.search(/^[0-9]{12}$/)&&this.data[11]==l(this.data)}},{key:"encode",value:function(){return this.options.flat?this.flatEncoding():this.guardedEncoding()}},{key:"flatEncoding",value:function(){var t="";return t+="101",t+=(0,o.default)(this.data.substr(0,6),"LLLLLL"),t+="01010",t+=(0,o.default)(this.data.substr(6,6),"RRRRRR"),{data:t+="101",text:this.text}}},{key:"guardedEncoding",value:function(){var t=[];return this.displayValue&&t.push({data:"00000000",text:this.text.substr(0,1),options:{textAlign:"left",fontSize:this.fontSize}}),t.push({data:"101"+(0,o.default)(this.data[0],"L"),options:{height:this.guardHeight}}),t.push({data:(0,o.default)(this.data.substr(1,5),"LLLLL"),text:this.text.substr(1,5),options:{fontSize:this.fontSize}}),t.push({data:"01010",options:{height:this.guardHeight}}),t.push({data:(0,o.default)(this.data.substr(6,5),"RRRRR"),text:this.text.substr(6,5),options:{fontSize:this.fontSize}}),t.push({data:(0,o.default)(this.data[11],"R")+"101",options:{height:this.guardHeight}}),this.displayValue&&t.push({data:"00000000",text:this.text.substr(11,1),options:{textAlign:"right",fontSize:this.fontSize}}),t}}]),u);function u(t,e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,u),-1!==t.search(/^[0-9]{11}$/)&&(t+=l(t));var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(u.__proto__||Object.getPrototypeOf(u)).call(this,t,e));return r.displayValue=e.displayValue,e.fontSize>10*e.width?r.fontSize=10*e.width:r.fontSize=e.fontSize,r.guardHeight=e.height+r.fontSize/2+e.textMargin,r}function l(t){var e,r=0;for(e=1;e<11;e+=2)r+=parseInt(t[e]);for(e=0;e<11;e+=2)r+=3*parseInt(t[e]);return(10-r%10)%10}r.default=s},{"../Barcode.js":7,"./encoder":25}],23:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=function(t,e,r){return e&&i(t.prototype,e),r&&i(t,r),t};function i(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var o=s(t("./encoder")),a=s(t("../Barcode.js")),u=t("./UPC.js");function s(t){return t&&t.__esModule?t:{default:t}}function l(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}var h=["XX00000XXX","XX10000XXX","XX20000XXX","XXX00000XX","XXXX00000X","XXXXX00005","XXXXX00006","XXXXX00007","XXXXX00008","XXXXX00009"],c=[["EEEOOO","OOOEEE"],["EEOEOO","OOEOEE"],["EEOOEO","OOEEOE"],["EEOOOE","OOEEEO"],["EOEEOO","OEOOEE"],["EOOEEO","OEEOOE"],["EOOOEE","OEEEOO"],["EOEOEO","OEOEOE"],["EOEOOE","OEOEEO"],["EOOEOE","OEEOEO"]],f=(function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(d,a.default),n(d,[{key:"valid",value:function(){return this.isValid}},{key:"encode",value:function(){return this.options.flat?this.flatEncoding():this.guardedEncoding()}},{key:"flatEncoding",value:function(){var t="";return t+="101",t+=this.encodeMiddleDigits(),{data:t+="010101",text:this.text}}},{key:"guardedEncoding",value:function(){var t=[];return this.displayValue&&t.push({data:"00000000",text:this.text[0],options:{textAlign:"left",fontSize:this.fontSize}}),t.push({data:"101",options:{height:this.guardHeight}}),t.push({data:this.encodeMiddleDigits(),text:this.text.substring(1,7),options:{fontSize:this.fontSize}}),t.push({data:"010101",options:{height:this.guardHeight}}),this.displayValue&&t.push({data:"00000000",text:this.text[7],options:{textAlign:"right",fontSize:this.fontSize}}),t}},{key:"encodeMiddleDigits",value:function(){var t=this.upcA[0],e=this.upcA[this.upcA.length-1],r=c[parseInt(e)][parseInt(t)];return(0,o.default)(this.middleDigits,r)}}]),d);function d(t,e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,d);var r=l(this,(d.__proto__||Object.getPrototypeOf(d)).call(this,t,e));if(r.isValid=!1,-1!==t.search(/^[0-9]{6}$/))r.middleDigits=t,r.upcA=p(t,"0"),r.text=e.text||""+r.upcA[0]+t+r.upcA[r.upcA.length-1],r.isValid=!0;else{if(-1===t.search(/^[01][0-9]{7}$/))return l(r);if(r.middleDigits=t.substring(1,t.length-1),r.upcA=p(r.middleDigits,t[0]),r.upcA[r.upcA.length-1]!==t[t.length-1])return l(r);r.isValid=!0}return r.displayValue=e.displayValue,e.fontSize>10*e.width?r.fontSize=10*e.width:r.fontSize=e.fontSize,r.guardHeight=e.height+r.fontSize/2+e.textMargin,r}function p(t,e){for(var r=parseInt(t[t.length-1]),n=h[r],i="",o=0,a=0;a<n.length;a++){var s=n[a];i+="X"===s?t[o++]:s}return""+(i=""+e+i)+(0,u.checksum)(i)}r.default=f},{"../Barcode.js":7,"./UPC.js":22,"./encoder":25}],24:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});r.SIDE_BIN="101",r.MIDDLE_BIN="01010",r.BINARIES={L:["0001101","0011001","0010011","0111101","0100011","0110001","0101111","0111011","0110111","0001011"],G:["0100111","0110011","0011011","0100001","0011101","0111001","0000101","0010001","0001001","0010111"],R:["1110010","1100110","1101100","1000010","1011100","1001110","1010000","1000100","1001000","1110100"],O:["0001101","0011001","0010011","0111101","0100011","0110001","0101111","0111011","0110111","0001011"],E:["0100111","0110011","0011011","0100001","0011101","0111001","0000101","0010001","0001001","0010111"]},r.EAN2_STRUCTURE=["LL","LG","GL","GG"],r.EAN5_STRUCTURE=["GGLLL","GLGLL","GLLGL","GLLLG","LGGLL","LLGGL","LLLGG","LGLGL","LGLLG","LLGLG"],r.EAN13_STRUCTURE=["LLLLLL","LLGLGG","LLGGLG","LLGGGL","LGLLGG","LGGLLG","LGGGLL","LGLGLG","LGLGGL","LGGLGL"]},{}],25:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var a=t("./constants");r.default=function(r,n,i){var t=r.split("").map(function(t,e){return a.BINARIES[n[e]]}).map(function(t,e){return t?t[r[e]]:""});if(i){var o=r.length-1;t=t.map(function(t,e){return e<o?t+i:t})}return t.join("")}},{"./constants":24}],26:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.UPCE=r.UPC=r.EAN2=r.EAN5=r.EAN8=r.EAN13=void 0;var n=l(t("./EAN13.js")),i=l(t("./EAN8.js")),o=l(t("./EAN5.js")),a=l(t("./EAN2.js")),s=l(t("./UPC.js")),u=l(t("./UPCE.js"));function l(t){return t&&t.__esModule?t:{default:t}}r.EAN13=n.default,r.EAN8=i.default,r.EAN5=o.default,r.EAN2=a.default,r.UPC=s.default,r.UPCE=u.default},{"./EAN13.js":18,"./EAN2.js":19,"./EAN5.js":20,"./EAN8.js":21,"./UPC.js":22,"./UPCE.js":23}],27:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.GenericBarcode=void 0;var n=function(t,e,r){return e&&i(t.prototype,e),r&&i(t,r),t};function i(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var o,a=t("../Barcode.js");var s=(function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(u,((o=a)&&o.__esModule?o:{default:o}).default),n(u,[{key:"encode",value:function(){return{data:"10101010101010101010101010101010101010101",text:this.text}}},{key:"valid",value:function(){return!0}}]),u);function u(t,e){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,u),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(u.__proto__||Object.getPrototypeOf(u)).call(this,t,e))}r.GenericBarcode=s},{"../Barcode.js":7}],28:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=function(t,e,r){return e&&i(t.prototype,e),r&&i(t,r),t};function i(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var o,a=t("./constants"),s=t("../Barcode");var u=(function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(l,((o=s)&&o.__esModule?o:{default:o}).default),n(l,[{key:"valid",value:function(){return-1!==this.data.search(/^([0-9]{2})+$/)}},{key:"encode",value:function(){var e=this,t=this.data.match(/.{2}/g).map(function(t){return e.encodePair(t)}).join("");return{data:a.START_BIN+t+a.END_BIN,text:this.text}}},{key:"encodePair",value:function(t){var r=a.BINARIES[t[1]];return a.BINARIES[t[0]].split("").map(function(t,e){return("1"===t?"111":"1")+("1"===r[e]?"000":"0")}).join("")}}]),l);function l(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(l.__proto__||Object.getPrototypeOf(l)).apply(this,arguments))}r.default=u},{"../Barcode":7,"./constants":30}],29:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=function(t,e,r){return e&&i(t.prototype,e),r&&i(t,r),t};function i(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var o,a=t("./ITF"),s=(o=a)&&o.__esModule?o:{default:o};function u(t){var e=t.substr(0,13).split("").map(function(t){return parseInt(t,10)}).reduce(function(t,e,r){return t+e*(3-r%2*2)},0);return 10*Math.ceil(e/10)-e}var l=(function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(h,s.default),n(h,[{key:"valid",value:function(){return-1!==this.data.search(/^[0-9]{14}$/)&&+this.data[13]===u(this.data)}}]),h);function h(t,e){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,h),-1!==t.search(/^[0-9]{13}$/)&&(t+=u(t)),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(h.__proto__||Object.getPrototypeOf(h)).call(this,t,e))}r.default=l},{"./ITF":28}],30:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});r.START_BIN="1010",r.END_BIN="11101",r.BINARIES=["00110","10001","01001","11000","00101","10100","01100","00011","10010","01010"]},{}],31:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.ITF14=r.ITF=void 0;var n=o(t("./ITF")),i=o(t("./ITF14"));function o(t){return t&&t.__esModule?t:{default:t}}r.ITF=n.default,r.ITF14=i.default},{"./ITF":28,"./ITF14":29}],32:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=function(t,e,r){return e&&i(t.prototype,e),r&&i(t,r),t};function i(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var o,a=t("../Barcode.js");var s=(function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(u,((o=a)&&o.__esModule?o:{default:o}).default),n(u,[{key:"encode",value:function(){for(var t="110",e=0;e<this.data.length;e++){var r=parseInt(this.data[e]).toString(2);r=l(r,4-r.length);for(var n=0;n<r.length;n++)t+="0"==r[n]?"100":"110"}return{data:t+="1001",text:this.text}}},{key:"valid",value:function(){return-1!==this.data.search(/^[0-9]+$/)}}]),u);function u(t,e){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,u),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(u.__proto__||Object.getPrototypeOf(u)).call(this,t,e))}function l(t,e){for(var r=0;r<e;r++)t="0"+t;return t}r.default=s},{"../Barcode.js":7}],33:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n,i=t("./MSI.js"),o=(n=i)&&n.__esModule?n:{default:n},a=t("./checksums.js");var s=(function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(u,o.default),u);function u(t,e){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,u),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(u.__proto__||Object.getPrototypeOf(u)).call(this,t+(0,a.mod10)(t),e))}r.default=s},{"./MSI.js":32,"./checksums.js":37}],34:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n,i=t("./MSI.js"),o=(n=i)&&n.__esModule?n:{default:n},a=t("./checksums.js");var s=(function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(u,o.default),u);function u(t,e){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,u),t+=(0,a.mod10)(t),t+=(0,a.mod10)(t),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(u.__proto__||Object.getPrototypeOf(u)).call(this,t,e))}r.default=s},{"./MSI.js":32,"./checksums.js":37}],35:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n,i=t("./MSI.js"),o=(n=i)&&n.__esModule?n:{default:n},a=t("./checksums.js");var s=(function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(u,o.default),u);function u(t,e){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,u),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(u.__proto__||Object.getPrototypeOf(u)).call(this,t+(0,a.mod11)(t),e))}r.default=s},{"./MSI.js":32,"./checksums.js":37}],36:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n,i=t("./MSI.js"),o=(n=i)&&n.__esModule?n:{default:n},a=t("./checksums.js");var s=(function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(u,o.default),u);function u(t,e){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,u),t+=(0,a.mod11)(t),t+=(0,a.mod10)(t),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(u.__proto__||Object.getPrototypeOf(u)).call(this,t,e))}r.default=s},{"./MSI.js":32,"./checksums.js":37}],37:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.mod10=function(t){for(var e=0,r=0;r<t.length;r++){var n=parseInt(t[r]);(r+t.length)%2==0?e+=n:e+=2*n%10+Math.floor(2*n/10)}return(10-e%10)%10},r.mod11=function(t){for(var e=0,r=[2,3,4,5,6,7],n=0;n<t.length;n++){var i=parseInt(t[t.length-1-n]);e+=r[n%r.length]*i}return(11-e%11)%11}},{}],38:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.MSI1110=r.MSI1010=r.MSI11=r.MSI10=r.MSI=void 0;var n=u(t("./MSI.js")),i=u(t("./MSI10.js")),o=u(t("./MSI11.js")),a=u(t("./MSI1010.js")),s=u(t("./MSI1110.js"));function u(t){return t&&t.__esModule?t:{default:t}}r.MSI=n.default,r.MSI10=i.default,r.MSI11=o.default,r.MSI1010=a.default,r.MSI1110=s.default},{"./MSI.js":32,"./MSI10.js":33,"./MSI1010.js":34,"./MSI11.js":35,"./MSI1110.js":36}],39:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.codabar=void 0;var n=function(t,e,r){return e&&i(t.prototype,e),r&&i(t,r),t};function i(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var o,a=t("../Barcode.js");var s=(function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(u,((o=a)&&o.__esModule?o:{default:o}).default),n(u,[{key:"valid",value:function(){return-1!==this.data.search(/^[A-D][0-9\-\$\:\.\+\/]+[A-D]$/)}},{key:"encode",value:function(){for(var t=[],e=this.getEncodings(),r=0;r<this.data.length;r++)t.push(e[this.data.charAt(r)]),r!==this.data.length-1&&t.push("0");return{text:this.text,data:t.join("")}}},{key:"getEncodings",value:function(){return{0:"101010011",1:"101011001",2:"101001011",3:"110010101",4:"101101001",5:"110101001",6:"100101011",7:"100101101",8:"100110101",9:"110100101","-":"101001101",$:"101100101",":":"1101011011","/":"1101101011",".":"1101101101","+":"101100110011",A:"1011001001",B:"1001001011",C:"1010010011",D:"1010011001"}}}]),u);function u(t,e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,u),0===t.search(/^[0-9\-\$\:\.\+\/]+$/)&&(t="A"+t+"A");var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(u.__proto__||Object.getPrototypeOf(u)).call(this,t.toUpperCase(),e));return r.text=r.options.text||r.text.replace(/[A-D]/g,""),r}r.codabar=s},{"../Barcode.js":7}],40:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("./CODE39/"),i=t("./CODE128/"),o=t("./EAN_UPC/"),a=t("./ITF/"),s=t("./MSI/"),u=t("./pharmacode/"),l=t("./codabar"),h=t("./GenericBarcode/");r.default={CODE39:n.CODE39,CODE128:i.CODE128,CODE128A:i.CODE128A,CODE128B:i.CODE128B,CODE128C:i.CODE128C,EAN13:o.EAN13,EAN8:o.EAN8,EAN5:o.EAN5,EAN2:o.EAN2,UPC:o.UPC,UPCE:o.UPCE,ITF14:a.ITF14,ITF:a.ITF,MSI:s.MSI,MSI10:s.MSI10,MSI11:s.MSI11,MSI1010:s.MSI1010,MSI1110:s.MSI1110,pharmacode:u.pharmacode,codabar:l.codabar,GenericBarcode:h.GenericBarcode}},{"./CODE128/":15,"./CODE39/":16,"./EAN_UPC/":26,"./GenericBarcode/":27,"./ITF/":31,"./MSI/":38,"./codabar":39,"./pharmacode/":41}],41:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.pharmacode=void 0;var n=function(t,e,r){return e&&i(t.prototype,e),r&&i(t,r),t};function i(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var o,a=t("../Barcode.js");var s=(function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(u,((o=a)&&o.__esModule?o:{default:o}).default),n(u,[{key:"encode",value:function(){for(var t=this.number,e="";!isNaN(t)&&0!=t;)t=t%2==0?(e="11100"+e,(t-2)/2):(e="100"+e,(t-1)/2);return{data:e=e.slice(0,-2),text:this.text}}},{key:"valid",value:function(){return 3<=this.number&&this.number<=131070}}]),u);function u(t,e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,u);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(u.__proto__||Object.getPrototypeOf(u)).call(this,t,e));return r.number=parseInt(t,10),r}r.pharmacode=s},{"../Barcode.js":7}],42:[function(t,e,r){"use strict";function n(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}Object.defineProperty(r,"__esModule",{value:!0});var i=(function(t,e,r){return e&&n(t.prototype,e),r&&n(t,r),t}(o,[{key:"handleCatch",value:function(t){if("InvalidInputException"!==t.name)throw t;if(this.api._options.valid===this.api._defaults.valid)throw t.message;this.api._options.valid(!1),this.api.render=function(){}}},{key:"wrapBarcodeCall",value:function(t){try{var e=t.apply(void 0,arguments);return this.api._options.valid(!0),e}catch(t){return this.handleCatch(t),this.api}}}]),o);function o(t){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),this.api=t}r.default=i},{}],43:[function(t,e,r){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(r,"__esModule",{value:!0});var a=(o(s,Error),s);function s(t,e){n(this,s);var r=i(this,(s.__proto__||Object.getPrototypeOf(s)).call(this));return r.name="InvalidInputException",r.symbology=t,r.input=e,r.message='"'+r.input+'" is not a valid input for '+r.symbology,r}var u=(o(l,Error),l);function l(){n(this,l);var t=i(this,(l.__proto__||Object.getPrototypeOf(l)).call(this));return t.name="InvalidElementException",t.message="Not supported type to render on",t}var h=(o(c,Error),c);function c(){n(this,c);var t=i(this,(c.__proto__||Object.getPrototypeOf(c)).call(this));return t.name="NoElementException",t.message="No element to render on.",t}r.InvalidInputException=a,r.InvalidElementException=u,r.NoElementException=h},{}],44:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(t){return t.marginTop=t.marginTop||t.margin,t.marginBottom=t.marginBottom||t.margin,t.marginRight=t.marginRight||t.margin,t.marginLeft=t.marginLeft||t.margin,t}},{}],45:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=o(t("./optionsFromStrings.js")),i=o(t("../options/defaults.js"));function o(t){return t&&t.__esModule?t:{default:t}}r.default=function(t){var e={};for(var r in i.default)i.default.hasOwnProperty(r)&&(t.hasAttribute("jsbarcode-"+r.toLowerCase())&&(e[r]=t.getAttribute("jsbarcode-"+r.toLowerCase())),t.hasAttribute("data-"+r.toLowerCase())&&(e[r]=t.getAttribute("data-"+r.toLowerCase())));return e.value=t.getAttribute("jsbarcode-value")||t.getAttribute("data-value"),e=(0,n.default)(e)}},{"../options/defaults.js":50,"./optionsFromStrings.js":49}],46:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a=n(t("./getOptionsFromElement.js")),s=n(t("../renderers")),u=t("../exceptions/exceptions.js");function n(t){return t&&t.__esModule?t:{default:t}}function l(t){if("string"==typeof t)return function(t){var e=document.querySelectorAll(t);{if(0===e.length)return;for(var r=[],n=0;n<e.length;n++)r.push(l(e[n]));return r}}(t);if(Array.isArray(t)){for(var e=[],r=0;r<t.length;r++)e.push(l(t[r]));return e}if("undefined"!=typeof HTMLCanvasElement&&t instanceof HTMLImageElement)return n=t,{element:i=document.createElement("canvas"),options:(0,a.default)(n),renderer:s.default.CanvasRenderer,afterRender:function(){n.setAttribute("src",i.toDataURL())}};if(t&&"svg"===t.nodeName||"undefined"!=typeof SVGElement&&t instanceof SVGElement)return{element:t,options:(0,a.default)(t),renderer:s.default.SVGRenderer};if("undefined"!=typeof HTMLCanvasElement&&t instanceof HTMLCanvasElement)return{element:t,options:(0,a.default)(t),renderer:s.default.CanvasRenderer};if(t&&t.getContext)return{element:t,renderer:s.default.CanvasRenderer};if(t&&"object"===(void 0===t?"undefined":o(t))&&!t.nodeName)return{element:t,renderer:s.default.ObjectRenderer};throw new u.InvalidElementException;var n,i}r.default=l},{"../exceptions/exceptions.js":43,"../renderers":52,"./getOptionsFromElement.js":45}],47:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(t){var n=[];return function t(e){if(Array.isArray(e))for(var r=0;r<e.length;r++)t(e[r]);else e.text=e.text||"",e.data=e.data||"",n.push(e)}(t),n}},{}],48:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t};r.default=function(t,e){return n({},t,e)}},{}],49:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(t){var e=["width","height","textMargin","fontSize","margin","marginTop","marginBottom","marginLeft","marginRight"];for(var r in e)e.hasOwnProperty(r)&&(r=e[r],"string"==typeof t[r]&&(t[r]=parseInt(t[r],10)));"string"==typeof t.displayValue&&(t.displayValue="false"!=t.displayValue);return t}},{}],50:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={width:2,height:100,format:"auto",displayValue:!0,fontOptions:"",font:"monospace",text:void 0,textAlign:"center",textPosition:"bottom",textMargin:2,fontSize:20,background:"#ffffff",lineColor:"#000000",margin:10,marginTop:void 0,marginBottom:void 0,marginLeft:void 0,marginRight:void 0,valid:function(){}};r.default=n},{}],51:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=function(t,e,r){return e&&i(t.prototype,e),r&&i(t,r),t};function i(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var o,a=t("../help/merge.js"),s=(o=a)&&o.__esModule?o:{default:o},u=t("./shared.js");var l=(n(h,[{key:"render",value:function(){if(!this.canvas.getContext)throw new Error("The browser does not support canvas.");this.prepareCanvas();for(var t=0;t<this.encodings.length;t++){var e=(0,s.default)(this.options,this.encodings[t].options);this.drawCanvasBarcode(e,this.encodings[t]),this.drawCanvasText(e,this.encodings[t]),this.moveCanvasDrawing(this.encodings[t])}this.restoreCanvas()}},{key:"prepareCanvas",value:function(){var t=this.canvas.getContext("2d");t.save(),(0,u.calculateEncodingAttributes)(this.encodings,this.options,t);var e=(0,u.getTotalWidthOfEncodings)(this.encodings),r=(0,u.getMaximumHeightOfEncodings)(this.encodings);this.canvas.width=e+this.options.marginLeft+this.options.marginRight,this.canvas.height=r,t.clearRect(0,0,this.canvas.width,this.canvas.height),this.options.background&&(t.fillStyle=this.options.background,t.fillRect(0,0,this.canvas.width,this.canvas.height)),t.translate(this.options.marginLeft,0)}},{key:"drawCanvasBarcode",value:function(t,e){var r,n=this.canvas.getContext("2d"),i=e.data;r="top"==t.textPosition?t.marginTop+t.fontSize+t.textMargin:t.marginTop,n.fillStyle=t.lineColor;for(var o=0;o<i.length;o++){var a=o*t.width+e.barcodePadding;"1"===i[o]?n.fillRect(a,r,t.width,t.height):i[o]&&n.fillRect(a,r,t.width,t.height*i[o])}}},{key:"drawCanvasText",value:function(t,e){var r,n,i=this.canvas.getContext("2d"),o=t.fontOptions+" "+t.fontSize+"px "+t.font;t.displayValue&&(n="top"==t.textPosition?t.marginTop+t.fontSize-t.textMargin:t.height+t.textMargin+t.marginTop+t.fontSize,i.font=o,"left"==t.textAlign||0<e.barcodePadding?(r=0,i.textAlign="left"):"right"==t.textAlign?(r=e.width-1,i.textAlign="right"):(r=e.width/2,i.textAlign="center"),i.fillText(e.text,r,n))}},{key:"moveCanvasDrawing",value:function(t){this.canvas.getContext("2d").translate(t.width,0)}},{key:"restoreCanvas",value:function(){this.canvas.getContext("2d").restore()}}]),h);function h(t,e,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,h),this.canvas=t,this.encodings=e,this.options=r}r.default=l},{"../help/merge.js":48,"./shared.js":54}],52:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=a(t("./canvas.js")),i=a(t("./svg.js")),o=a(t("./object.js"));function a(t){return t&&t.__esModule?t:{default:t}}r.default={CanvasRenderer:n.default,SVGRenderer:i.default,ObjectRenderer:o.default}},{"./canvas.js":51,"./object.js":53,"./svg.js":55}],53:[function(t,e,r){"use strict";function n(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}Object.defineProperty(r,"__esModule",{value:!0});var i=(function(t,e,r){return e&&n(t.prototype,e),r&&n(t,r),t}(o,[{key:"render",value:function(){this.object.encodings=this.encodings}}]),o);function o(t,e,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),this.object=t,this.encodings=e,this.options=r}r.default=i},{}],54:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.getTotalWidthOfEncodings=r.calculateEncodingAttributes=r.getBarcodePadding=r.getEncodingHeight=r.getMaximumHeightOfEncodings=void 0;var n,i=t("../help/merge.js"),u=(n=i)&&n.__esModule?n:{default:n};function l(t,e){return e.height+(e.displayValue&&0<t.text.length?e.fontSize+e.textMargin:0)+e.marginTop+e.marginBottom}function h(t,e,r){if(r.displayValue&&e<t){if("center"==r.textAlign)return Math.floor((t-e)/2);if("left"==r.textAlign)return 0;if("right"==r.textAlign)return Math.floor(t-e)}return 0}function c(t,e,r){var n;if(r)n=r;else{if("undefined"==typeof document)return 0;n=document.createElement("canvas").getContext("2d")}return n.font=e.fontOptions+" "+e.fontSize+"px "+e.font,n.measureText(t).width}r.getMaximumHeightOfEncodings=function(t){for(var e=0,r=0;r<t.length;r++)t[r].height>e&&(e=t[r].height);return e},r.getEncodingHeight=l,r.getBarcodePadding=h,r.calculateEncodingAttributes=function(t,e,r){for(var n=0;n<t.length;n++){var i,o=t[n],a=(0,u.default)(e,o.options);i=a.displayValue?c(o.text,a,r):0;var s=o.data.length*a.width;o.width=Math.ceil(Math.max(i,s)),o.height=l(o,a),o.barcodePadding=h(i,s,a)}},r.getTotalWidthOfEncodings=function(t){for(var e=0,r=0;r<t.length;r++)e+=t[r].width;return e}},{"../help/merge.js":48}],55:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=function(t,e,r){return e&&i(t.prototype,e),r&&i(t,r),t};function i(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var o,a=t("../help/merge.js"),s=(o=a)&&o.__esModule?o:{default:o},u=t("./shared.js");var l="http://www.w3.org/2000/svg",h=(n(c,[{key:"render",value:function(){var t=this.options.marginLeft;this.prepareSVG();for(var e=0;e<this.encodings.length;e++){var r=this.encodings[e],n=(0,s.default)(this.options,r.options),i=this.createGroup(t,n.marginTop,this.svg);this.setGroupOptions(i,n),this.drawSvgBarcode(i,n,r),this.drawSVGText(i,n,r),t+=r.width}}},{key:"prepareSVG",value:function(){for(;this.svg.firstChild;)this.svg.removeChild(this.svg.firstChild);(0,u.calculateEncodingAttributes)(this.encodings,this.options);var t=(0,u.getTotalWidthOfEncodings)(this.encodings),e=(0,u.getMaximumHeightOfEncodings)(this.encodings),r=t+this.options.marginLeft+this.options.marginRight;this.setSvgAttributes(r,e),this.options.background&&this.drawRect(0,0,r,e,this.svg).setAttribute("style","fill:"+this.options.background+";")}},{key:"drawSvgBarcode",value:function(t,e,r){var n,i=r.data;n="top"==e.textPosition?e.fontSize+e.textMargin:0;for(var o=0,a=0,s=0;s<i.length;s++)a=s*e.width+r.barcodePadding,"1"===i[s]?o++:0<o&&(this.drawRect(a-e.width*o,n,e.width*o,e.height,t),o=0);0<o&&this.drawRect(a-e.width*(o-1),n,e.width*o,e.height,t)}},{key:"drawSVGText",value:function(t,e,r){var n,i,o=this.document.createElementNS(l,"text");e.displayValue&&(o.setAttribute("style","font:"+e.fontOptions+" "+e.fontSize+"px "+e.font),i="top"==e.textPosition?e.fontSize-e.textMargin:e.height+e.textMargin+e.fontSize,"left"==e.textAlign||0<r.barcodePadding?(n=0,o.setAttribute("text-anchor","start")):"right"==e.textAlign?(n=r.width-1,o.setAttribute("text-anchor","end")):(n=r.width/2,o.setAttribute("text-anchor","middle")),o.setAttribute("x",n),o.setAttribute("y",i),o.appendChild(this.document.createTextNode(r.text)),t.appendChild(o))}},{key:"setSvgAttributes",value:function(t,e){var r=this.svg;r.setAttribute("width",t+"px"),r.setAttribute("height",e+"px"),r.setAttribute("x","0px"),r.setAttribute("y","0px"),r.setAttribute("viewBox","0 0 "+t+" "+e),r.setAttribute("xmlns",l),r.setAttribute("version","1.1"),r.setAttribute("style","transform: translate(0,0)")}},{key:"createGroup",value:function(t,e,r){var n=this.document.createElementNS(l,"g");return n.setAttribute("transform","translate("+t+", "+e+")"),r.appendChild(n),n}},{key:"setGroupOptions",value:function(t,e){t.setAttribute("style","fill:"+e.lineColor+";")}},{key:"drawRect",value:function(t,e,r,n,i){var o=this.document.createElementNS(l,"rect");return o.setAttribute("x",t),o.setAttribute("y",e),o.setAttribute("width",r),o.setAttribute("height",n),i.appendChild(o),o}}]),c);function c(t,e,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,c),this.svg=t,this.encodings=e,this.options=r,this.document=r.xmlDocument||document}r.default=h},{"../help/merge.js":48,"./shared.js":54}],56:[function(t,Tt,Ot){(function(Ct){(function(){"use strict";function ne(t){return(ne="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}!function(t){if("object"!==ne(t.console)){t.console={};for(var e,r,n=t.console,i=function(){},o=["memory"],a="assert,clear,count,debug,dir,dirxml,error,exception,group,groupCollapsed,groupEnd,info,log,markTimeline,profile,profiles,profileEnd,show,table,time,timeEnd,timeline,timelineEnd,timeStamp,trace,warn".split(",");e=o.pop();)n[e]||(n[e]={});for(;r=a.pop();)n[r]||(n[r]=i)}var s,u,l,h,c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";void 0===t.btoa&&(t.btoa=function(t){var e,r,n,i,o,a=0,s=0,u="",l=[];if(!t)return t;for(;e=(o=t.charCodeAt(a++)<<16|t.charCodeAt(a++)<<8|t.charCodeAt(a++))>>18&63,r=o>>12&63,n=o>>6&63,i=63&o,l[s++]=c.charAt(e)+c.charAt(r)+c.charAt(n)+c.charAt(i),a<t.length;);u=l.join("");var h=t.length%3;return(h?u.slice(0,h-3):u)+"===".slice(h||3)}),void 0===t.atob&&(t.atob=function(t){var e,r,n,i,o,a,s=0,u=0,l=[];if(!t)return t;for(t+="";e=(a=c.indexOf(t.charAt(s++))<<18|c.indexOf(t.charAt(s++))<<12|(i=c.indexOf(t.charAt(s++)))<<6|(o=c.indexOf(t.charAt(s++))))>>16&255,r=a>>8&255,n=255&a,l[u++]=64==i?String.fromCharCode(e):64==o?String.fromCharCode(e,r):String.fromCharCode(e,r,n),s<t.length;);return l.join("")}),Array.prototype.map||(Array.prototype.map=function(t){if(null==this||"function"!=typeof t)throw new TypeError;for(var e=Object(this),r=e.length>>>0,n=new Array(r),i=1<arguments.length?arguments[1]:void 0,o=0;o<r;o++)o in e&&(n[o]=t.call(i,e[o],o,e));return n}),Array.isArray||(Array.isArray=function(t){return"[object Array]"===Object.prototype.toString.call(t)}),Array.prototype.forEach||(Array.prototype.forEach=function(t,e){if(null==this||"function"!=typeof t)throw new TypeError;for(var r=Object(this),n=r.length>>>0,i=0;i<n;i++)i in r&&t.call(e,r[i],i,r)}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(t){if(null==this)throw new TypeError('"this" is null or not defined');var e=Object(this),r=e.length>>>0;if("function"!=typeof t)throw new TypeError("predicate must be a function");for(var n=arguments[1],i=0;i<r;){var o=e[i];if(t.call(n,o,i,e))return o;i++}},configurable:!0,writable:!0}),Object.keys||(Object.keys=(s=Object.prototype.hasOwnProperty,u=!{toString:null}.propertyIsEnumerable("toString"),h=(l=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"]).length,function(t){if("object"!==ne(t)&&("function"!=typeof t||null===t))throw new TypeError;var e,r,n=[];for(e in t)s.call(t,e)&&n.push(e);if(u)for(r=0;r<h;r++)s.call(t,l[r])&&n.push(l[r]);return n})),"function"!=typeof Object.assign&&(Object.assign=function(t){if(null==t)throw new TypeError("Cannot convert undefined or null to object");t=Object(t);for(var e=1;e<arguments.length;e++){var r=arguments[e];if(null!=r)for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t}),String.prototype.trim||(String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"")}),String.prototype.trimLeft||(String.prototype.trimLeft=function(){return this.replace(/^\s+/g,"")}),String.prototype.trimRight||(String.prototype.trimRight=function(){return this.replace(/\s+$/g,"")}),Number.isInteger=Number.isInteger||function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t}}("undefined"!=typeof self&&self||"undefined"!=typeof window&&window||void 0!==Ct&&Ct||Function('return typeof this === "object" && this.content')()||Function("return this")());var t,e,r,N,u,P,E,f,k,a,o,s,l,h,c,n,i,d,p,g,v,m,y,b,w,C,T,O,_,x,A,L,S,I,B,M,j,F,R,D,z,q,U,H,W,G,V,X,Y,J,K,$,Q,Z,tt,et,rt,nt,it,ot,at,ie,st=(ie="undefined"!=typeof self&&self||"undefined"!=typeof window&&window||void 0!==Ct&&Ct||Function('return typeof this === "object" && this.content')()||Function("return this")(),ae.API={events:[]},ae.version="1.5.3",void 0!==Tt&&Tt.exports?(Tt.exports=ae,Tt.exports.jsPDF=ae):ie.jsPDF=ae,ae);function oe(o){if("object"!==ne(o))throw new Error("Invalid Context passed to initialize PubSub (jsPDF-module)");var a={};this.subscribe=function(t,e,r){if(r=r||!1,"string"!=typeof t||"function"!=typeof e||"boolean"!=typeof r)throw new Error("Invalid arguments passed to PubSub.subscribe (jsPDF-module)");a.hasOwnProperty(t)||(a[t]={});var n=Math.random().toString(35);return a[t][n]=[e,!!r],n},this.unsubscribe=function(t){for(var e in a)if(a[e][t])return delete a[e][t],0===Object.keys(a[e]).length&&delete a[e],!0;return!1},this.publish=function(t){if(a.hasOwnProperty(t)){var e=Array.prototype.slice.call(arguments,1),r=[];for(var n in a[t]){var i=a[t][n];try{i[0].apply(o,e)}catch(t){ie.console&&console.error("jsPDF PubSub Error",t.message,t)}i[1]&&r.push(n)}r.length&&r.forEach(this.unsubscribe)}},this.getTopics=function(){return a}}function ae(t,e,i,r){var n={},o=[],a=1;"object"===ne(t)&&(t=(n=t).orientation,e=n.unit||e,i=n.format||i,r=n.compress||n.compressPdf||r,o=n.filters||(!0===r?["FlateEncode"]:o),a="number"==typeof n.userUnit?Math.abs(n.userUnit):1),e=e||"mm",t=(""+(t||"P")).toLowerCase();var s=n.putOnlyUsedFonts||!0,J={},u={internal:{},__private__:{}};u.__private__.PubSub=oe;var l="1.3",h=u.__private__.getPdfVersion=function(){return l},c=(u.__private__.setPdfVersion=function(t){l=t},{a0:[2383.94,3370.39],a1:[1683.78,2383.94],a2:[1190.55,1683.78],a3:[841.89,1190.55],a4:[595.28,841.89],a5:[419.53,595.28],a6:[297.64,419.53],a7:[209.76,297.64],a8:[147.4,209.76],a9:[104.88,147.4],a10:[73.7,104.88],b0:[2834.65,4008.19],b1:[2004.09,2834.65],b2:[1417.32,2004.09],b3:[1000.63,1417.32],b4:[708.66,1000.63],b5:[498.9,708.66],b6:[354.33,498.9],b7:[249.45,354.33],b8:[175.75,249.45],b9:[124.72,175.75],b10:[87.87,124.72],c0:[2599.37,3676.54],c1:[1836.85,2599.37],c2:[1298.27,1836.85],c3:[918.43,1298.27],c4:[649.13,918.43],c5:[459.21,649.13],c6:[323.15,459.21],c7:[229.61,323.15],c8:[161.57,229.61],c9:[113.39,161.57],c10:[79.37,113.39],dl:[311.81,623.62],letter:[612,792],"government-letter":[576,756],legal:[612,1008],"junior-legal":[576,360],ledger:[1224,792],tabloid:[792,1224],"credit-card":[153,243]}),f=(u.__private__.getPageFormats=function(){return c},u.__private__.getPageFormat=function(t){return c[t]});"string"==typeof i&&(i=f(i)),i=i||f("a4");var d,K=u.f2=u.__private__.f2=function(t){if(isNaN(t))throw new Error("Invalid argument passed to jsPDF.f2");return t.toFixed(2)},$=u.__private__.f3=function(t){if(isNaN(t))throw new Error("Invalid argument passed to jsPDF.f3");return t.toFixed(3)},p="00000000000000000000000000000000",g=u.__private__.getFileId=function(){return p},v=u.__private__.setFileId=function(t){return t=t||"12345678901234567890123456789012".split("").map(function(){return"ABCDEF0123456789".charAt(Math.floor(16*Math.random()))}).join(""),p=t};u.setFileId=function(t){return v(t),this},u.getFileId=function(){return g()};var m=u.__private__.convertDateToPDFDate=function(t){var e=t.getTimezoneOffset(),r=e<0?"+":"-",n=Math.floor(Math.abs(e/60)),i=Math.abs(e%60),o=[r,I(n),"'",I(i),"'"].join("");return["D:",t.getFullYear(),I(t.getMonth()+1),I(t.getDate()),I(t.getHours()),I(t.getMinutes()),I(t.getSeconds()),o].join("")},y=u.__private__.convertPDFDateToDate=function(t){var e=parseInt(t.substr(2,4),10),r=parseInt(t.substr(6,2),10)-1,n=parseInt(t.substr(8,2),10),i=parseInt(t.substr(10,2),10),o=parseInt(t.substr(12,2),10),a=parseInt(t.substr(14,2),10);return parseInt(t.substr(16,2),10),parseInt(t.substr(20,2),10),new Date(e,r,n,i,o,a,0)},b=u.__private__.setCreationDate=function(t){var e;if(void 0===t&&(t=new Date),"object"===ne(t)&&"[object Date]"===Object.prototype.toString.call(t))e=m(t);else{if(!/^D:(20[0-2][0-9]|203[0-7]|19[7-9][0-9])(0[0-9]|1[0-2])([0-2][0-9]|3[0-1])(0[0-9]|1[0-9]|2[0-3])(0[0-9]|[1-5][0-9])(0[0-9]|[1-5][0-9])(\+0[0-9]|\+1[0-4]|\-0[0-9]|\-1[0-1])\'(0[0-9]|[1-5][0-9])\'?$/.test(t))throw new Error("Invalid argument passed to jsPDF.setCreationDate");e=t}return d=e},w=u.__private__.getCreationDate=function(t){var e=d;return"jsDate"===t&&(e=y(d)),e};u.setCreationDate=function(t){return b(t),this},u.getCreationDate=function(t){return w(t)};function _(t,e,r){Y.hasOwnProperty(e)||(Y[e]={}),Y[e][r]=t}function x(t,e,r,n,i){i=i||!1;var o="F"+(Object.keys(rt).length+1).toString(10),a={id:o,postScriptName:t,fontName:e,fontStyle:r,encoding:n,isStandardFont:i,metadata:{}};return at.publish("addFont",{font:a,instance:this}),rt[o]=a,_(o,e,r),o}function A(){_t.apply(this,arguments),Dt(Rt),Z(Xt),0!==Zt&&Z(Zt+" J"),0!==ee&&Z(ee+" j"),at.publish("addPage",{pageNumber:nt})}function L(t,e,r){var n,i=void 0;return r=r||{},t=void 0!==t?t:rt[Q].fontName,e=void 0!==e?e:rt[Q].fontStyle,n=t.toLowerCase(),void 0!==Y[n]&&void 0!==Y[n][e]?i=Y[n][e]:void 0!==Y[t]&&void 0!==Y[t][e]?i=Y[t][e]:!1===r.disableWarning&&console.warn("Unable to look up font label for font '"+t+"', '"+e+"'. Refer to getFontList() for available fonts."),i||r.noFallback||null==(i=Y.times[e])&&(i=Y.times.normal),i}function S(t){return!0===Array.isArray(st)&&-1<st.indexOf(t)}var N,P,E,k,C,Q,T,O,I=u.__private__.padd2=function(t){return("0"+parseInt(t)).slice(-2)},B=!1,M=[],j=[],F=0,Z=(u.__private__.setCustomOutputDestination=function(t){P=t},u.__private__.resetCustomOutputDestination=function(t){P=void 0},u.__private__.out=function(t){var e;return t="string"==typeof t?t:t.toString(),(e=void 0===P?B?M[N]:j:P).push(t),B||(F+=t.length+1),e}),R=u.__private__.write=function(t){return Z(1===arguments.length?t.toString():Array.prototype.join.call(arguments," "))},D=u.__private__.getArrayBuffer=function(t){for(var e=t.length,r=new ArrayBuffer(e),n=new Uint8Array(r);e--;)n[e]=t.charCodeAt(e);return r},z=[["Helvetica","helvetica","normal","WinAnsiEncoding"],["Helvetica-Bold","helvetica","bold","WinAnsiEncoding"],["Helvetica-Oblique","helvetica","italic","WinAnsiEncoding"],["Helvetica-BoldOblique","helvetica","bolditalic","WinAnsiEncoding"],["Courier","courier","normal","WinAnsiEncoding"],["Courier-Bold","courier","bold","WinAnsiEncoding"],["Courier-Oblique","courier","italic","WinAnsiEncoding"],["Courier-BoldOblique","courier","bolditalic","WinAnsiEncoding"],["Times-Roman","times","normal","WinAnsiEncoding"],["Times-Bold","times","bold","WinAnsiEncoding"],["Times-Italic","times","italic","WinAnsiEncoding"],["Times-BoldItalic","times","bolditalic","WinAnsiEncoding"],["ZapfDingbats","zapfdingbats","normal",null],["Symbol","symbol","normal",null]],tt=(u.__private__.getStandardFonts=function(t){return z},n.fontSize||16),q=(u.__private__.setFontSize=u.setFontSize=function(t){return tt=t,this},u.__private__.getFontSize=u.getFontSize=function(){return tt}),et=n.R2L||!1,U=(u.__private__.setR2L=u.setR2L=function(t){return et=t,this},u.__private__.getR2L=u.getR2L=function(t){return et},u.__private__.setZoomMode=function(t){if(/^\d*\.?\d*\%$/.test(t))E=t;else if(isNaN(t)){if(-1===[void 0,null,"fullwidth","fullheight","fullpage","original"].indexOf(t))throw new Error('zoom must be Integer (e.g. 2), a percentage Value (e.g. 300%) or fullwidth, fullheight, fullpage, original. "'+t+'" is not recognized.');E=t}else E=parseInt(t,10)}),H=(u.__private__.getZoomMode=function(){return E},u.__private__.setPageMode=function(t){if(-1==[void 0,null,"UseNone","UseOutlines","UseThumbs","FullScreen"].indexOf(t))throw new Error('Page mode must be one of UseNone, UseOutlines, UseThumbs, or FullScreen. "'+t+'" is not recognized.');k=t}),W=(u.__private__.getPageMode=function(){return k},u.__private__.setLayoutMode=function(t){if(-1==[void 0,null,"continuous","single","twoleft","tworight","two"].indexOf(t))throw new Error('Layout mode must be one of continuous, single, twoleft, tworight. "'+t+'" is not recognized.');C=t}),G=(u.__private__.getLayoutMode=function(){return C},u.__private__.setDisplayMode=u.setDisplayMode=function(t,e,r){return U(t),W(e),H(r),this},{title:"",subject:"",author:"",keywords:"",creator:""}),V=(u.__private__.getDocumentProperty=function(t){if(-1===Object.keys(G).indexOf(t))throw new Error("Invalid argument passed to jsPDF.getDocumentProperty");return G[t]},u.__private__.getDocumentProperties=function(t){return G},u.__private__.setDocumentProperties=u.setProperties=u.setDocumentProperties=function(t){for(var e in G)G.hasOwnProperty(e)&&t[e]&&(G[e]=t[e]);return this},u.__private__.setDocumentProperty=function(t,e){if(-1===Object.keys(G).indexOf(t))throw new Error("Invalid arguments passed to jsPDF.setDocumentProperty");return G[t]=e},0),X=[],rt={},Y={},nt=0,it=[],ot=[],at=new oe(u),st=n.hotfixes||[],ut=u.__private__.newObject=function(){var t=lt();return ht(t,!0),t},lt=u.__private__.newObjectDeferred=function(){return X[++V]=function(){return F},V},ht=function(t,e){return e="boolean"==typeof e&&e,X[t]=F,e&&Z(t+" 0 obj"),t},ct=u.__private__.newAdditionalObject=function(){var t={objId:lt(),content:""};return ot.push(t),t},ft=lt(),dt=lt(),pt=u.__private__.decodeColorString=function(t){var e=t.split(" ");if(2===e.length&&("g"===e[1]||"G"===e[1])){var r=parseFloat(e[0]);e=[r,r,r,"r"]}for(var n="#",i=0;i<3;i++)n+=("0"+Math.floor(255*parseFloat(e[i])).toString(16)).slice(-2);return n},gt=u.__private__.encodeColorString=function(t){var e;"string"==typeof t&&(t={ch1:t});var r=t.ch1,n=t.ch2,i=t.ch3,o=t.ch4,a=(t.precision,"draw"===t.pdfColorType?["G","RG","K"]:["g","rg","k"]);if("string"==typeof r&&"#"!==r.charAt(0)){var s=new RGBColor(r);if(s.ok)r=s.toHex();else if(!/^\d*\.?\d*$/.test(r))throw new Error('Invalid color "'+r+'" passed to jsPDF.encodeColorString.')}if("string"==typeof r&&/^#[0-9A-Fa-f]{3}$/.test(r)&&(r="#"+r[1]+r[1]+r[2]+r[2]+r[3]+r[3]),"string"==typeof r&&/^#[0-9A-Fa-f]{6}$/.test(r)){var u=parseInt(r.substr(1),16);r=u>>16&255,n=u>>8&255,i=255&u}if(void 0===n||void 0===o&&r===n&&n===i)if("string"==typeof r)e=r+" "+a[0];else switch(t.precision){case 2:e=K(r/255)+" "+a[0];break;case 3:default:e=$(r/255)+" "+a[0]}else if(void 0===o||"object"===ne(o)){if(o&&!isNaN(o.a)&&0===o.a)return["1.000","1.000","1.000",a[1]].join(" ");if("string"==typeof r)e=[r,n,i,a[1]].join(" ");else switch(t.precision){case 2:e=[K(r/255),K(n/255),K(i/255),a[1]].join(" ");break;default:e=[$(r/255),$(n/255),$(i/255),a[1]].join(" ")}}else if("string"==typeof r)e=[r,n,i,o,a[2]].join(" ");else switch(t.precision){case 2:e=[K(r/255),K(n/255),K(i/255),K(o/255),a[2]].join(" ");break;case 3:default:e=[$(r/255),$(n/255),$(i/255),$(o/255),a[2]].join(" ")}return e},vt=u.__private__.getFilters=function(){return o},mt=u.__private__.putStream=function(t){var e,r=(t=t||{}).data||"",n=t.filters||vt(),i=t.alreadyAppliedFilters||[],o=t.addLength1||!1,a=r.length;!0===n&&(n=["FlateEncode"]);var s=t.additionalKeyValues||[],u=(e=void 0!==ae.API.processDataByFilters?ae.API.processDataByFilters(r,n):{data:r,reverseChain:[]}).reverseChain+(Array.isArray(i)?i.join(" "):i.toString());0!==e.data.length&&(s.push({key:"Length",value:e.data.length}),!0===o&&s.push({key:"Length1",value:a})),0!=u.length&&(u.split("/").length-1==1?s.push({key:"Filter",value:u}):s.push({key:"Filter",value:"["+u+"]"})),Z("<<");for(var l=0;l<s.length;l++)Z("/"+s[l].key+" "+s[l].value);Z(">>"),0!==e.data.length&&(Z("stream"),Z(e.data),Z("endstream"))},yt=u.__private__.putPage=function(t){t.mediaBox;var e=t.number,r=t.data,n=t.objId,i=t.contentsObjId;ht(n,!0),it[N].mediaBox.topRightX,it[N].mediaBox.bottomLeftX,it[N].mediaBox.topRightY,it[N].mediaBox.bottomLeftY,Z("<</Type /Page"),Z("/Parent "+t.rootDictionaryObjId+" 0 R"),Z("/Resources "+t.resourceDictionaryObjId+" 0 R"),Z("/MediaBox ["+parseFloat(K(t.mediaBox.bottomLeftX))+" "+parseFloat(K(t.mediaBox.bottomLeftY))+" "+K(t.mediaBox.topRightX)+" "+K(t.mediaBox.topRightY)+"]"),null!==t.cropBox&&Z("/CropBox ["+K(t.cropBox.bottomLeftX)+" "+K(t.cropBox.bottomLeftY)+" "+K(t.cropBox.topRightX)+" "+K(t.cropBox.topRightY)+"]"),null!==t.bleedBox&&Z("/BleedBox ["+K(t.bleedBox.bottomLeftX)+" "+K(t.bleedBox.bottomLeftY)+" "+K(t.bleedBox.topRightX)+" "+K(t.bleedBox.topRightY)+"]"),null!==t.trimBox&&Z("/TrimBox ["+K(t.trimBox.bottomLeftX)+" "+K(t.trimBox.bottomLeftY)+" "+K(t.trimBox.topRightX)+" "+K(t.trimBox.topRightY)+"]"),null!==t.artBox&&Z("/ArtBox ["+K(t.artBox.bottomLeftX)+" "+K(t.artBox.bottomLeftY)+" "+K(t.artBox.topRightX)+" "+K(t.artBox.topRightY)+"]"),"number"==typeof t.userUnit&&1!==t.userUnit&&Z("/UserUnit "+t.userUnit),at.publish("putPage",{objId:n,pageContext:it[e],pageNumber:e,page:r}),Z("/Contents "+i+" 0 R"),Z(">>"),Z("endobj");var o=r.join("\n");return ht(i,!0),mt({data:o,filters:vt()}),Z("endobj"),n},bt=u.__private__.putPages=function(){var t,e,r=[];for(t=1;t<=nt;t++)it[t].objId=lt(),it[t].contentsObjId=lt();for(t=1;t<=nt;t++)r.push(yt({number:t,data:M[t],objId:it[t].objId,contentsObjId:it[t].contentsObjId,mediaBox:it[t].mediaBox,cropBox:it[t].cropBox,bleedBox:it[t].bleedBox,trimBox:it[t].trimBox,artBox:it[t].artBox,userUnit:it[t].userUnit,rootDictionaryObjId:ft,resourceDictionaryObjId:dt}));ht(ft,!0),Z("<</Type /Pages");var n="/Kids [";for(e=0;e<nt;e++)n+=r[e]+" 0 R ";Z(n+"]"),Z("/Count "+nt),Z(">>"),Z("endobj"),at.publish("postPutPages")},wt=u.__private__.pdfEscape=u.pdfEscape=function(t,e){return function(t,e){var r,n,i,o,a,s,u,l,h;if(i=(e=e||{}).sourceEncoding||"Unicode",a=e.outputEncoding,(e.autoencode||a)&&rt[Q].metadata&&rt[Q].metadata[i]&&rt[Q].metadata[i].encoding&&(o=rt[Q].metadata[i].encoding,!a&&rt[Q].encoding&&(a=rt[Q].encoding),!a&&o.codePages&&(a=o.codePages[0]),"string"==typeof a&&(a=o[a]),a)){for(u=!1,s=[],r=0,n=t.length;r<n;r++)(l=a[t.charCodeAt(r)])?s.push(String.fromCharCode(l)):s.push(t[r]),s[r].charCodeAt(0)>>8&&(u=!0);t=s.join("")}for(r=t.length;void 0===u&&0!==r;)t.charCodeAt(r-1)>>8&&(u=!0),r--;if(!u)return t;for(s=e.noBOM?[]:[254,255],r=0,n=t.length;r<n;r++){if((h=(l=t.charCodeAt(r))>>8)>>8)throw new Error("Character at position "+r+" of string '"+t+"' exceeds 16bits. Cannot be encoded into UCS-2 BE");s.push(h),s.push(l-(h<<8))}return String.fromCharCode.apply(void 0,s)}(t,e).replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},_t=u.__private__.beginPage=function(t,e){var r,n="string"==typeof e&&e.toLowerCase();if("string"==typeof t&&(r=f(t.toLowerCase()))&&(t=r[0],e=r[1]),Array.isArray(t)&&(e=t[1],t=t[0]),(isNaN(t)||isNaN(e))&&(t=i[0],e=i[1]),n){switch(n.substr(0,1)){case"l":t<e&&(n="s");break;case"p":e<t&&(n="s")}"s"===n&&(r=t,t=e,e=r)}(14400<t||14400<e)&&(console.warn("A page in a PDF can not be wider or taller than 14400 userUnit. jsPDF limits the width/height to 14400"),t=Math.min(14400,t),e=Math.min(14400,e)),i=[t,e],B=!0,M[++nt]=[],it[nt]={objId:0,contentsObjId:0,userUnit:Number(a),artBox:null,bleedBox:null,cropBox:null,trimBox:null,mediaBox:{bottomLeftX:0,bottomLeftY:0,topRightX:Number(t),topRightY:Number(e)}},xt(nt)},xt=function(t){0<t&&t<=nt&&(N=t)},At=u.__private__.getNumberOfPages=u.getNumberOfPages=function(){return M.length-1},Lt=u.__private__.putInfo=function(){for(var t in ut(),Z("<<"),Z("/Producer (jsPDF "+ae.version+")"),G)G.hasOwnProperty(t)&&G[t]&&Z("/"+t.substr(0,1).toUpperCase()+t.substr(1)+" ("+wt(G[t])+")");Z("/CreationDate ("+d+")"),Z(">>"),Z("endobj")},St=u.__private__.putCatalog=function(t){var e=(t=t||{}).rootDictionaryObjId||ft;switch(ut(),Z("<<"),Z("/Type /Catalog"),Z("/Pages "+e+" 0 R"),E=E||"fullwidth"){case"fullwidth":Z("/OpenAction [3 0 R /FitH null]");break;case"fullheight":Z("/OpenAction [3 0 R /FitV null]");break;case"fullpage":Z("/OpenAction [3 0 R /Fit]");break;case"original":Z("/OpenAction [3 0 R /XYZ null null 1]");break;default:var r=""+E;"%"===r.substr(r.length-1)&&(E=parseInt(E)/100),"number"==typeof E&&Z("/OpenAction [3 0 R /XYZ null null "+K(E)+"]")}switch(C=C||"continuous"){case"continuous":Z("/PageLayout /OneColumn");break;case"single":Z("/PageLayout /SinglePage");break;case"two":case"twoleft":Z("/PageLayout /TwoColumnLeft");break;case"tworight":Z("/PageLayout /TwoColumnRight")}k&&Z("/PageMode /"+k),at.publish("putCatalog"),Z(">>"),Z("endobj")},Nt=u.__private__.putTrailer=function(){Z("trailer"),Z("<<"),Z("/Size "+(V+1)),Z("/Root "+V+" 0 R"),Z("/Info "+(V-1)+" 0 R"),Z("/ID [ <"+p+"> <"+p+"> ]"),Z(">>")},Pt=u.__private__.putHeader=function(){Z("%PDF-"+l),Z("%ºß¬à")},Et=u.__private__.putXRef=function(){var t=1,e="0000000000";for(Z("xref"),Z("0 "+(V+1)),Z("0000000000 65535 f "),t=1;t<=V;t++)"function"==typeof X[t]?Z((e+X[t]()).slice(-10)+" 00000 n "):void 0!==X[t]?Z((e+X[t]).slice(-10)+" 00000 n "):Z("0000000000 00000 n ")},kt=u.__private__.buildDocument=function(){B=!1,F=V=0,j=[],X=[],ot=[],ft=lt(),dt=lt(),at.publish("buildDocument"),Pt(),bt(),function(){at.publish("putAdditionalObjects");for(var t=0;t<ot.length;t++){var e=ot[t];ht(e.objId,!0),Z(e.content),Z("endobj")}at.publish("postPutAdditionalObjects")}(),function(){for(var t in rt)rt.hasOwnProperty(t)&&(!1===s||!0===s&&J.hasOwnProperty(t))&&(e=rt[t],at.publish("putFont",{font:e,out:Z,newObject:ut,putStream:mt}),!0!==e.isAlreadyPutted&&(e.objectNumber=ut(),Z("<<"),Z("/Type /Font"),Z("/BaseFont /"+e.postScriptName),Z("/Subtype /Type1"),"string"==typeof e.encoding&&Z("/Encoding /"+e.encoding),Z("/FirstChar 32"),Z("/LastChar 255"),Z(">>"),Z("endobj")));var e}(),at.publish("putResources"),ht(dt,!0),Z("<<"),function(){for(var t in Z("/ProcSet [/PDF /Text /ImageB /ImageC /ImageI]"),Z("/Font <<"),rt)rt.hasOwnProperty(t)&&(!1===s||!0===s&&J.hasOwnProperty(t))&&Z("/"+t+" "+rt[t].objectNumber+" 0 R");Z(">>"),Z("/XObject <<"),at.publish("putXobjectDict"),Z(">>")}(),Z(">>"),Z("endobj"),at.publish("postPutResources"),Lt(),St();var t=F;return Et(),Nt(),Z("startxref"),Z(""+t),Z("%%EOF"),B=!0,j.join("\n")},Ct=u.__private__.getBlob=function(t){return new Blob([D(t)],{type:"application/pdf"})},Tt=u.output=u.__private__.output=((O=function(t,e){e=e||{};var r=kt();switch("string"==typeof e?e={filename:e}:e.filename=e.filename||"generated.pdf",t){case void 0:return r;case"save":u.save(e.filename);break;case"arraybuffer":return D(r);case"blob":return Ct(r);case"bloburi":case"bloburl":if(void 0!==ie.URL&&"function"==typeof ie.URL.createObjectURL)return ie.URL&&ie.URL.createObjectURL(Ct(r))||void 0;console.warn("bloburl is not supported by your system, because URL.createObjectURL is not supported by your browser.");break;case"datauristring":case"dataurlstring":return"data:application/pdf;filename="+e.filename+";base64,"+btoa(r);case"dataurlnewwindow":var n='<html><style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;}  </style><body><iframe src="'+this.output("datauristring")+'"></iframe></body></html>',i=ie.open();if(null!==i&&i.document.write(n),i||"undefined"==typeof safari)return i;case"datauri":case"dataurl":return ie.document.location.href="data:application/pdf;filename="+e.filename+";base64,"+btoa(r);default:return null}}).foo=function(){try{return O.apply(this,arguments)}catch(t){var e=t.stack||"";~e.indexOf(" at ")&&(e=e.split(" at ")[1]);var r="Error in function "+e.split("\n")[0].split("<")[0]+": "+t.message;if(!ie.console)throw new Error(r);ie.console.error(r,t),ie.alert&&alert(r)}},(O.foo.bar=O).foo);switch(e){case"pt":T=1;break;case"mm":T=72/25.4;break;case"cm":T=72/2.54;break;case"in":T=72;break;case"px":T=1==S("px_scaling")?.75:96/72;break;case"pc":case"em":T=12;break;case"ex":T=6;break;default:throw new Error("Invalid unit: "+e)}b(),v();var Ot=u.__private__.getPageInfo=function(t){if(isNaN(t)||t%1!=0)throw new Error("Invalid argument passed to jsPDF.getPageInfo");return{objId:it[t].objId,pageNumber:t,pageContext:it[t]}},It=u.__private__.getPageInfoByObjId=function(t){for(var e in it)if(it[e].objId===t)break;if(isNaN(t)||t%1!=0)throw new Error("Invalid argument passed to jsPDF.getPageInfoByObjId");return Ot(e)},Bt=u.__private__.getCurrentPageInfo=function(){return{objId:it[N].objId,pageNumber:N,pageContext:it[N]}};u.addPage=function(){return A.apply(this,arguments),this},u.setPage=function(){return xt.apply(this,arguments),this},u.insertPage=function(t){return this.addPage(),this.movePage(N,t),this},u.movePage=function(t,e){if(e<t){for(var r=M[t],n=it[t],i=t;e<i;i--)M[i]=M[i-1],it[i]=it[i-1];M[e]=r,it[e]=n,this.setPage(e)}else if(t<e){for(r=M[t],n=it[t],i=t;i<e;i++)M[i]=M[i+1],it[i]=it[i+1];M[e]=r,it[e]=n,this.setPage(e)}return this},u.deletePage=function(){return function(t){0<t&&t<=nt&&(M.splice(t,1),--nt<N&&(N=nt),this.setPage(N))}.apply(this,arguments),this},u.__private__.text=u.text=function(t,e,r,i){var n;"number"!=typeof t||"number"!=typeof e||"string"!=typeof r&&!Array.isArray(r)||(n=r,r=e,e=t,t=n);var o=arguments[3],a=arguments[4],s=arguments[5];if("object"===ne(o)&&null!==o||("string"==typeof a&&(s=a,a=null),"string"==typeof o&&(s=o,o=null),"number"==typeof o&&(a=o,o=null),i={flags:o,angle:a,align:s}),(o=o||{}).noBOM=o.noBOM||!0,o.autoencode=o.autoencode||!0,isNaN(e)||isNaN(r)||null==t)throw new Error("Invalid arguments passed to jsPDF.text");if(0===t.length)return c;var u,l="",h="number"==typeof i.lineHeightFactor?i.lineHeightFactor:Ft,c=i.scope||this;function f(t){for(var e,r=t.concat(),n=[],i=r.length;i--;)"string"==typeof(e=r.shift())?n.push(e):Array.isArray(t)&&1===e.length?n.push(e[0]):n.push([e[0],e[1],e[2]]);return n}function d(t,e){var r;if("string"==typeof t)r=e(t)[0];else if(Array.isArray(t)){for(var n,i,o=t.concat(),a=[],s=o.length;s--;)"string"==typeof(n=o.shift())?a.push(e(n)[0]):Array.isArray(n)&&"string"===n[0]&&(i=e(n[0],n[1],n[2]),a.push([i[0],i[1],i[2]]));r=a}return r}var p=!1,g=!0;if("string"==typeof t)p=!0;else if(Array.isArray(t)){for(var v,m=t.concat(),y=[],b=m.length;b--;)("string"!=typeof(v=m.shift())||Array.isArray(v)&&"string"!=typeof v[0])&&(g=!1);p=g}if(!1===p)throw new Error('Type of text must be string or Array. "'+t+'" is not recognized.');var w=rt[Q].encoding;"WinAnsiEncoding"!==w&&"StandardEncoding"!==w||(t=d(t,function(t,e,r){return[(n=(n=t).split("\t").join(Array(i.TabLen||9).join(" ")),wt(n,o)),e,r];var n})),"string"==typeof t&&(t=t.match(/[\r?\n]/)?t.split(/\r\n|\r|\n/g):[t]);var _=tt/c.internal.scaleFactor,x=_*(Ft-1);switch(i.baseline){case"bottom":r-=x;break;case"top":r+=_-x;break;case"hanging":r+=_-2*x;break;case"middle":r+=_/2-x}0<(j=i.maxWidth||0)&&("string"==typeof t?t=c.splitTextToSize(t,j):"[object Array]"===Object.prototype.toString.call(t)&&(t=c.splitTextToSize(t.join(" "),j)));var A={text:t,x:e,y:r,options:i,mutex:{pdfEscape:wt,activeFontKey:Q,fonts:rt,activeFontSize:tt}};at.publish("preProcessText",A),t=A.text,a=(i=A.options).angle;var L=c.internal.scaleFactor,S=[];if(a){a*=Math.PI/180;var N=Math.cos(a),P=Math.sin(a);S=[K(N),K(P),K(-1*P),K(N)]}void 0!==(M=i.charSpace)&&(l+=$(M*L)+" Tc\n"),i.lang;var E=-1,k=void 0!==i.renderingMode?i.renderingMode:i.stroke,C=c.internal.getCurrentPageInfo().pageContext;switch(k){case 0:case!1:case"fill":E=0;break;case 1:case!0:case"stroke":E=1;break;case 2:case"fillThenStroke":E=2;break;case 3:case"invisible":E=3;break;case 4:case"fillAndAddForClipping":E=4;break;case 5:case"strokeAndAddPathForClipping":E=5;break;case 6:case"fillThenStrokeAndAddToPathForClipping":E=6;break;case 7:case"addToPathForClipping":E=7}var T=void 0!==C.usedRenderingMode?C.usedRenderingMode:-1;-1!==E?l+=E+" Tr\n":-1!==T&&(l+="0 Tr\n"),-1!==E&&(C.usedRenderingMode=E),s=i.align||"left";var O=tt*h,I=c.internal.pageSize.getWidth(),B=(L=c.internal.scaleFactor,rt[Q]),M=i.charSpace||$t,j=i.maxWidth||0,F=(o={},[]);if("[object Array]"===Object.prototype.toString.call(t)){var R,D;y=f(t),"left"!==s&&(D=y.map(function(t){return c.getStringUnitWidth(t,{font:B,charSpace:M,fontSize:tt})*tt/L}));Math.max.apply(Math,D);var z,q=0;if("right"===s){e-=D[0],t=[];var U=0;for(b=y.length;U<b;U++)D[U],R=0===U?(z=Ht(e),Wt(r)):(z=(q-D[U])*L,-O),t.push([y[U],z,R]),q=D[U]}else if("center"===s)for(e-=D[0]/2,t=[],U=0,b=y.length;U<b;U++)D[U],R=0===U?(z=Ht(e),Wt(r)):(z=(q-D[U])/2*L,-O),t.push([y[U],z,R]),q=D[U];else if("left"===s)for(t=[],U=0,b=y.length;U<b;U++)R=0===U?Wt(r):-O,z=0===U?Ht(e):0,t.push(y[U]);else{if("justify"!==s)throw new Error('Unrecognized alignment option, use "left", "center", "right" or "justify".');for(t=[],j=0!==j?j:I,U=0,b=y.length;U<b;U++)R=0===U?Wt(r):-O,z=0===U?Ht(e):0,U<b-1&&F.push(((j-D[U])/(y[U].split(" ").length-1)*L).toFixed(2)),t.push([y[U],z,R])}}!0===("boolean"==typeof i.R2L?i.R2L:et)&&(t=d(t,function(t,e,r){return[t.split("").reverse().join(""),e,r]})),A={text:t,x:e,y:r,options:i,mutex:{pdfEscape:wt,activeFontKey:Q,fonts:rt,activeFontSize:tt}},at.publish("postProcessText",A),t=A.text,u=A.mutex.isHex,y=f(t),t=[];var H,W,G,V=0,X=(b=y.length,"");for(U=0;U<b;U++)X="",Array.isArray(y[U])?(H=parseFloat(y[U][1]),W=parseFloat(y[U][2]),G=(u?"<":"(")+y[U][0]+(u?">":")"),V=1):(H=Ht(e),W=Wt(r),G=(u?"<":"(")+y[U]+(u?">":")")),void 0!==F&&void 0!==F[U]&&(X=F[U]+" Tw\n"),0!==S.length&&0===U?t.push(X+S.join(" ")+" "+H.toFixed(2)+" "+W.toFixed(2)+" Tm\n"+G):1===V||0===V&&0===U?t.push(X+H.toFixed(2)+" "+W.toFixed(2)+" Td\n"+G):t.push(X+G);t=0===V?t.join(" Tj\nT* "):t.join(" Tj\n"),t+=" Tj\n";var Y="BT\n/"+Q+" "+tt+" Tf\n"+(tt*h).toFixed(2)+" TL\n"+Jt+"\n";return Y+=l,Y+=t,Z(Y+="ET"),J[Q]=!0,c},u.__private__.lstext=u.lstext=function(t,e,r,n){return console.warn("jsPDF.lstext is deprecated"),this.text(t,e,r,{charSpace:n})},u.__private__.clip=u.clip=function(t){Z("evenodd"===t?"W*":"W"),Z("n")},u.__private__.clip_fixed=u.clip_fixed=function(t){console.log("clip_fixed is deprecated"),u.clip(t)};var Mt=u.__private__.isValidStyle=function(t){var e=!1;return-1!==[void 0,null,"S","F","DF","FD","f","f*","B","B*"].indexOf(t)&&(e=!0),e},jt=u.__private__.getStyle=function(t){var e="S";return"F"===t?e="f":"FD"===t||"DF"===t?e="B":"f"!==t&&"f*"!==t&&"B"!==t&&"B*"!==t||(e=t),e};u.__private__.line=u.line=function(t,e,r,n){if(isNaN(t)||isNaN(e)||isNaN(r)||isNaN(n))throw new Error("Invalid arguments passed to jsPDF.line");return this.lines([[r-t,n-e]],t,e)},u.__private__.lines=u.lines=function(t,e,r,n,i,o){var a,s,u,l,h,c,f,d,p,g,v,m;if("number"==typeof t&&(m=r,r=e,e=t,t=m),n=n||[1,1],o=o||!1,isNaN(e)||isNaN(r)||!Array.isArray(t)||!Array.isArray(n)||!Mt(i)||"boolean"!=typeof o)throw new Error("Invalid arguments passed to jsPDF.lines");for(Z($(Ht(e))+" "+$(Wt(r))+" m "),a=n[0],s=n[1],l=t.length,g=e,v=r,u=0;u<l;u++)2===(h=t[u]).length?(g=h[0]*a+g,v=h[1]*s+v,Z($(Ht(g))+" "+$(Wt(v))+" l")):(c=h[0]*a+g,f=h[1]*s+v,d=h[2]*a+g,p=h[3]*s+v,g=h[4]*a+g,v=h[5]*s+v,Z($(Ht(c))+" "+$(Wt(f))+" "+$(Ht(d))+" "+$(Wt(p))+" "+$(Ht(g))+" "+$(Wt(v))+" c"));return o&&Z(" h"),null!==i&&Z(jt(i)),this},u.__private__.rect=u.rect=function(t,e,r,n,i){if(isNaN(t)||isNaN(e)||isNaN(r)||isNaN(n)||!Mt(i))throw new Error("Invalid arguments passed to jsPDF.rect");return Z([K(Ht(t)),K(Wt(e)),K(r*T),K(-n*T),"re"].join(" ")),null!==i&&Z(jt(i)),this},u.__private__.triangle=u.triangle=function(t,e,r,n,i,o,a){if(isNaN(t)||isNaN(e)||isNaN(r)||isNaN(n)||isNaN(i)||isNaN(o)||!Mt(a))throw new Error("Invalid arguments passed to jsPDF.triangle");return this.lines([[r-t,n-e],[i-r,o-n],[t-i,e-o]],t,e,[1,1],a,!0),this},u.__private__.roundedRect=u.roundedRect=function(t,e,r,n,i,o,a){if(isNaN(t)||isNaN(e)||isNaN(r)||isNaN(n)||isNaN(i)||isNaN(o)||!Mt(a))throw new Error("Invalid arguments passed to jsPDF.roundedRect");var s=4/3*(Math.SQRT2-1);return this.lines([[r-2*i,0],[i*s,0,i,o-o*s,i,o],[0,n-2*o],[0,o*s,-i*s,o,-i,o],[2*i-r,0],[-i*s,0,-i,-o*s,-i,-o],[0,2*o-n],[0,-o*s,i*s,-o,i,-o]],t+i,e,[1,1],a),this},u.__private__.ellipse=u.ellipse=function(t,e,r,n,i){if(isNaN(t)||isNaN(e)||isNaN(r)||isNaN(n)||!Mt(i))throw new Error("Invalid arguments passed to jsPDF.ellipse");var o=4/3*(Math.SQRT2-1)*r,a=4/3*(Math.SQRT2-1)*n;return Z([K(Ht(t+r)),K(Wt(e)),"m",K(Ht(t+r)),K(Wt(e-a)),K(Ht(t+o)),K(Wt(e-n)),K(Ht(t)),K(Wt(e-n)),"c"].join(" ")),Z([K(Ht(t-o)),K(Wt(e-n)),K(Ht(t-r)),K(Wt(e-a)),K(Ht(t-r)),K(Wt(e)),"c"].join(" ")),Z([K(Ht(t-r)),K(Wt(e+a)),K(Ht(t-o)),K(Wt(e+n)),K(Ht(t)),K(Wt(e+n)),"c"].join(" ")),Z([K(Ht(t+o)),K(Wt(e+n)),K(Ht(t+r)),K(Wt(e+a)),K(Ht(t+r)),K(Wt(e)),"c"].join(" ")),null!==i&&Z(jt(i)),this},u.__private__.circle=u.circle=function(t,e,r,n){if(isNaN(t)||isNaN(e)||isNaN(r)||!Mt(n))throw new Error("Invalid arguments passed to jsPDF.circle");return this.ellipse(t,e,r,r,n)},u.setFont=function(t,e){return Q=L(t,e,{disableWarning:!1}),this},u.setFontStyle=u.setFontType=function(t){return Q=L(void 0,t),this},u.__private__.getFontList=u.getFontList=function(){var t,e,r,n={};for(t in Y)if(Y.hasOwnProperty(t))for(e in n[t]=r=[],Y[t])Y[t].hasOwnProperty(e)&&r.push(e);return n},u.addFont=function(t,e,r,n){x.call(this,t,e,r,n=n||"Identity-H")};var Ft,Rt=n.lineWidth||.200025,Dt=u.__private__.setLineWidth=u.setLineWidth=function(t){return Z((t*T).toFixed(2)+" w"),this},zt=(u.__private__.setLineDash=ae.API.setLineDash=function(t,e){if(t=t||[],e=e||0,isNaN(e)||!Array.isArray(t))throw new Error("Invalid arguments passed to jsPDF.setLineDash");return t=t.map(function(t){return(t*T).toFixed(3)}).join(" "),e=parseFloat((e*T).toFixed(3)),Z("["+t+"] "+e+" d"),this},u.__private__.getLineHeight=u.getLineHeight=function(){return tt*Ft}),qt=(zt=u.__private__.getLineHeight=u.getLineHeight=function(){return tt*Ft},u.__private__.setLineHeightFactor=u.setLineHeightFactor=function(t){return"number"==typeof(t=t||1.15)&&(Ft=t),this}),Ut=u.__private__.getLineHeightFactor=u.getLineHeightFactor=function(){return Ft};qt(n.lineHeight);var Ht=u.__private__.getHorizontalCoordinate=function(t){return t*T},Wt=u.__private__.getVerticalCoordinate=function(t){return it[N].mediaBox.topRightY-it[N].mediaBox.bottomLeftY-t*T},Gt=u.__private__.getHorizontalCoordinateString=function(t){return K(t*T)},Vt=u.__private__.getVerticalCoordinateString=function(t){return K(it[N].mediaBox.topRightY-it[N].mediaBox.bottomLeftY-t*T)},Xt=n.strokeColor||"0 G",Yt=(u.__private__.getStrokeColor=u.getDrawColor=function(){return pt(Xt)},u.__private__.setStrokeColor=u.setDrawColor=function(t,e,r,n){return Xt=gt({ch1:t,ch2:e,ch3:r,ch4:n,pdfColorType:"draw",precision:2}),Z(Xt),this},n.fillColor||"0 g"),Jt=(u.__private__.getFillColor=u.getFillColor=function(){return pt(Yt)},u.__private__.setFillColor=u.setFillColor=function(t,e,r,n){return Yt=gt({ch1:t,ch2:e,ch3:r,ch4:n,pdfColorType:"fill",precision:2}),Z(Yt),this},n.textColor||"0 g"),Kt=u.__private__.getTextColor=u.getTextColor=function(){return pt(Jt)},$t=(u.__private__.setTextColor=u.setTextColor=function(t,e,r,n){return Jt=gt({ch1:t,ch2:e,ch3:r,ch4:n,pdfColorType:"text",precision:3}),this},n.charSpace||0),Qt=u.__private__.getCharSpace=u.getCharSpace=function(){return $t},Zt=(u.__private__.setCharSpace=u.setCharSpace=function(t){if(isNaN(t))throw new Error("Invalid argument passed to jsPDF.setCharSpace");return $t=t,this},0);u.CapJoinStyles={0:0,butt:0,but:0,miter:0,1:1,round:1,rounded:1,circle:1,2:2,projecting:2,project:2,square:2,bevel:2},u.__private__.setLineCap=u.setLineCap=function(t){var e=u.CapJoinStyles[t];if(void 0===e)throw new Error("Line cap style of '"+t+"' is not recognized. See or extend .CapJoinStyles property for valid styles");return Z((Zt=e)+" J"),this};var te,ee=0;for(var re in u.__private__.setLineJoin=u.setLineJoin=function(t){var e=u.CapJoinStyles[t];if(void 0===e)throw new Error("Line join style of '"+t+"' is not recognized. See or extend .CapJoinStyles property for valid styles");return Z((ee=e)+" j"),this},u.__private__.setMiterLimit=u.setMiterLimit=function(t){if(t=t||0,isNaN(t))throw new Error("Invalid argument passed to jsPDF.setMiterLimit");return te=parseFloat(K(t*T)),Z(te+" M"),this},u.save=function(n,t){if(n=n||"generated.pdf",(t=t||{}).returnPromise=t.returnPromise||!1,!1!==t.returnPromise)return new Promise(function(t,e){try{var r=se(Ct(kt()),n);"function"==typeof se.unload&&ie.setTimeout&&setTimeout(se.unload,911),t(r)}catch(t){e(t.message)}});se(Ct(kt()),n),"function"==typeof se.unload&&ie.setTimeout&&setTimeout(se.unload,911)},ae.API)ae.API.hasOwnProperty(re)&&("events"===re&&ae.API.events.length?function(t,e){var r,n,i;for(i=e.length-1;-1!==i;i--)r=e[i][0],n=e[i][1],t.subscribe.apply(t,[r].concat("function"==typeof n?[n]:n))}(at,ae.API.events):u[re]=ae.API[re]);return u.internal={pdfEscape:wt,getStyle:jt,getFont:function(){return rt[L.apply(u,arguments)]},getFontSize:q,getCharSpace:Qt,getTextColor:Kt,getLineHeight:zt,getLineHeightFactor:Ut,write:R,getHorizontalCoordinate:Ht,getVerticalCoordinate:Wt,getCoordinateString:Gt,getVerticalCoordinateString:Vt,collections:{},newObject:ut,newAdditionalObject:ct,newObjectDeferred:lt,newObjectDeferredBegin:ht,getFilters:vt,putStream:mt,events:at,scaleFactor:T,pageSize:{getWidth:function(){return(it[N].mediaBox.topRightX-it[N].mediaBox.bottomLeftX)/T},setWidth:function(t){it[N].mediaBox.topRightX=t*T+it[N].mediaBox.bottomLeftX},getHeight:function(){return(it[N].mediaBox.topRightY-it[N].mediaBox.bottomLeftY)/T},setHeight:function(t){it[N].mediaBox.topRightY=t*T+it[N].mediaBox.bottomLeftY}},output:Tt,getNumberOfPages:At,pages:M,out:Z,f2:K,f3:$,getPageInfo:Ot,getPageInfoByObjId:It,getCurrentPageInfo:Bt,getPDFVersion:h,hasHotfix:S},Object.defineProperty(u.internal.pageSize,"width",{get:function(){return(it[N].mediaBox.topRightX-it[N].mediaBox.bottomLeftX)/T},set:function(t){it[N].mediaBox.topRightX=t*T+it[N].mediaBox.bottomLeftX},enumerable:!0,configurable:!0}),Object.defineProperty(u.internal.pageSize,"height",{get:function(){return(it[N].mediaBox.topRightY-it[N].mediaBox.bottomLeftY)/T},set:function(t){it[N].mediaBox.topRightY=t*T+it[N].mediaBox.bottomLeftY},enumerable:!0,configurable:!0}),function(t){for(var e=0,r=z.length;e<r;e++){var n=x(t[e][0],t[e][1],t[e][2],z[e][3],!0);J[n]=!0;var i=t[e][0].split("-");_(n,i[0],i[1]||"")}at.publish("addFonts",{fonts:rt,dictionary:Y})}(z),Q="F1",A(i,t),at.publish("initialized"),u}(function(t,e){function L(t){return t.replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")}function m(t){return t.replace(/\\\\/g,"\\").replace(/\\\(/g,"(").replace(/\\\)/g,")")}function S(t){if(isNaN(t))throw new Error("Invalid argument passed to jsPDF.f2");return t.toFixed(2)}function s(t){if(isNaN(t))throw new Error("Invalid argument passed to jsPDF.f2");return t.toFixed(5)}var N,y=1;t.__acroform__={};function r(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t}function u(t){var e=new T,r=G.internal.getHeight(t)||0,n=G.internal.getWidth(t)||0;return e.BBox=[0,0,Number(S(n)),Number(S(r))],e}function c(t){if(t.appearanceStreamContent)return t.appearanceStreamContent;if(t.V||t.DV){var e=[],r=t.V||t.DV,n=g(t,r),i=N.internal.getFont(t.fontName,t.fontStyle).id;e.push("/Tx BMC"),e.push("q"),e.push("BT"),e.push(N.__private__.encodeColorString(t.color)),e.push("/"+i+" "+S(n.fontSize)+" Tf"),e.push("1 0 0 1 0 0 Tm"),e.push(n.text),e.push("ET"),e.push("Q"),e.push("EMC");var o=new u(t);return o.stream=e.join("\n"),o}}function n(){N.internal.acroformPlugin.acroFormDictionaryRoot.objId=void 0;var t=N.internal.acroformPlugin.acroFormDictionaryRoot.Fields;for(var e in t)if(t.hasOwnProperty(e)){var r=t[e];r.objId=void 0,r.hasAnnotation&&E.call(N,r)}}function i(){if(void 0===N.internal.acroformPlugin.acroFormDictionaryRoot)throw new Error("putCatalogCallback: Root missing.");N.internal.write("/AcroForm "+N.internal.acroformPlugin.acroFormDictionaryRoot.objId+" 0 R")}function o(){N.internal.events.unsubscribe(N.internal.acroformPlugin.acroFormDictionaryRoot._eventID),delete N.internal.acroformPlugin.acroFormDictionaryRoot._eventID,N.internal.acroformPlugin.printedOut=!0}function a(t){var e=!t;for(var r in t||(N.internal.newObjectDeferredBegin(N.internal.acroformPlugin.acroFormDictionaryRoot.objId,!0),N.internal.acroformPlugin.acroFormDictionaryRoot.putStream()),t=t||N.internal.acroformPlugin.acroFormDictionaryRoot.Kids)if(t.hasOwnProperty(r)){var n=t[r],i=[],o=n.Rect;if(n.Rect&&(n.Rect=p.call(this,n.Rect)),N.internal.newObjectDeferredBegin(n.objId,!0),n.DA=G.createDefaultAppearanceStream(n),"object"===ne(n)&&"function"==typeof n.getKeyValueListForStream&&(i=n.getKeyValueListForStream()),n.Rect=o,n.hasAppearanceStream&&!n.appearanceStreamContent){var a=c.call(this,n);i.push({key:"AP",value:"<</N "+a+">>"}),N.internal.acroformPlugin.xForms.push(a)}if(n.appearanceStreamContent){var s="";for(var u in n.appearanceStreamContent)if(n.appearanceStreamContent.hasOwnProperty(u)){var l=n.appearanceStreamContent[u];if(s+="/"+u+" ",s+="<<",1<=Object.keys(l).length||Array.isArray(l))for(var r in l){var h;l.hasOwnProperty(r)&&("function"==typeof(h=l[r])&&(h=h.call(this,n)),s+="/"+r+" "+h+" ",0<=N.internal.acroformPlugin.xForms.indexOf(h)||N.internal.acroformPlugin.xForms.push(h))}else"function"==typeof(h=l)&&(h=h.call(this,n)),s+="/"+r+" "+h,0<=N.internal.acroformPlugin.xForms.indexOf(h)||N.internal.acroformPlugin.xForms.push(h);s+=">>"}i.push({key:"AP",value:"<<\n"+s+">>"})}N.internal.putStream({additionalKeyValues:i}),N.internal.out("endobj")}e&&k.call(this,N.internal.acroformPlugin.xForms)}function l(){if(void 0!==this.internal&&(void 0===this.internal.acroformPlugin||!1===this.internal.acroformPlugin.isInitialized)){if(N=this,I.FieldNum=0,this.internal.acroformPlugin=JSON.parse(JSON.stringify(v)),this.internal.acroformPlugin.acroFormDictionaryRoot)throw new Error("Exception while creating AcroformDictionary");y=N.internal.scaleFactor,N.internal.acroformPlugin.acroFormDictionaryRoot=new O,N.internal.acroformPlugin.acroFormDictionaryRoot._eventID=N.internal.events.subscribe("postPutResources",o),N.internal.events.subscribe("buildDocument",n),N.internal.events.subscribe("putCatalog",i),N.internal.events.subscribe("postPutPages",a),N.internal.acroformPlugin.isInitialized=!0}}function b(t){return(t=t||"").toString(),"("+L(t)+")"}function w(){var e;Object.defineProperty(this,"objId",{configurable:!0,get:function(){if(!(e=e||N.internal.newObjectDeferred()))throw new Error("AcroFormPDFObject: Couldn't create Object ID");return e},set:function(t){e=t}})}var h=t.__acroform__.setBit=function(t,e){if(t=t||0,e=e||0,isNaN(t)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.setBit");return t|1<<e},f=t.__acroform__.clearBit=function(t,e){if(t=t||0,e=e||0,isNaN(t)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.clearBit");return t&~(1<<e)},d=t.__acroform__.getBit=function(t,e){if(isNaN(t)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.getBit");return 0==(t&1<<e)?0:1},_=t.__acroform__.getBitForPdf=function(t,e){if(isNaN(t)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.getBitForPdf");return d(t,e-1)},x=t.__acroform__.setBitForPdf=function(t,e){if(isNaN(t)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.setBitForPdf");return h(t,e-1)},A=t.__acroform__.clearBitForPdf=function(t,e,r){if(isNaN(t)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.clearBitForPdf");return f(t,e-1)},p=t.__acroform__.calculateCoordinates=function(t){var e=this.internal.getHorizontalCoordinate,r=this.internal.getVerticalCoordinate,n=t[0],i=t[1],o=t[2],a=t[3],s={};return s.lowerLeft_X=e(n)||0,s.lowerLeft_Y=r(i+a)||0,s.upperRight_X=e(n+o)||0,s.upperRight_Y=r(i)||0,[Number(S(s.lowerLeft_X)),Number(S(s.lowerLeft_Y)),Number(S(s.upperRight_X)),Number(S(s.upperRight_Y))]},g=function(i,t){var e=i.maxFontSize||12,r=(i.fontName,{text:"",fontSize:""}),o=(t=")"==(t="("==t.substr(0,1)?t.substr(1):t).substr(t.length-1)?t.substr(0,t.length-1):t).split(" "),n=(N.__private__.encodeColorString(i.color),e),a=G.internal.getHeight(i)||0;a=a<0?-a:a;var s=G.internal.getWidth(i)||0;s=s<0?-s:s;function u(t,e,r){if(t+1<o.length){var n=e+" "+o[t+1];return P(n,i,r).width<=s-4}return!1}n++;t:for(;;){t="";var l=P("3",i,--n).height,h=i.multiline?a-n:(a-l)/2,c=-2,f=h+=2,d=0,p=0,g=0;if(n<=0){t="(...) Tj\n",t+="% Width of Text: "+P(t,i,n=12).width+", FieldWidth:"+s+"\n";break}g=P(o[0]+" ",i,n).width;var v="",m=0;for(var y in o)if(o.hasOwnProperty(y)){v=" "==(v+=o[y]+" ").substr(v.length-1)?v.substr(0,v.length-1):v;var b=parseInt(y);g=P(v+" ",i,n).width;var w=u(b,v,n),_=y>=o.length-1;if(w&&!_){v+=" ";continue}if(w||_){if(_)p=b;else if(i.multiline&&a<(l+2)*(m+2)+2)continue t}else{if(!i.multiline)continue t;if(a<(l+2)*(m+2)+2)continue t;p=b}for(var x="",A=d;A<=p;A++)x+=o[A]+" ";switch(x=" "==x.substr(x.length-1)?x.substr(0,x.length-1):x,g=P(x,i,n).width,i.textAlign){case"right":c=s-g-2;break;case"center":c=(s-g)/2;break;case"left":default:c=2}t+=S(c)+" "+S(f)+" Td\n",t+="("+L(x)+") Tj\n",t+=-S(c)+" 0 Td\n",f=-(n+2),g=0,d=p+1,m++,v=""}break}return r.text=t,r.fontSize=n,r},P=function(t,e,r){var n=N.internal.getFont(e.fontName,e.fontStyle),i=N.getStringUnitWidth(t,{font:n,fontSize:parseFloat(r),charSpace:0})*parseFloat(r);return{height:N.getStringUnitWidth("3",{font:n,fontSize:parseFloat(r),charSpace:0})*parseFloat(r)*1.5,width:i}},v={fields:[],xForms:[],acroFormDictionaryRoot:null,printedOut:!1,internal:null,isInitialized:!1},E=function(t){var e={type:"reference",object:t};void 0===N.internal.getPageInfo(t.page).pageContext.annotations.find(function(t){return t.type===e.type&&t.object===e.object})&&N.internal.getPageInfo(t.page).pageContext.annotations.push(e)},k=function(t){for(var e in t)if(t.hasOwnProperty(e)){var r=e,n=t[e];N.internal.newObjectDeferredBegin(n&&n.objId,!0),"object"===ne(n)&&"function"==typeof n.putStream&&n.putStream(),delete t[r]}},C=t.__acroform__.arrayToPdfArray=function(t){if(Array.isArray(t)){for(var e="[",r=0;r<t.length;r++)switch(0!==r&&(e+=" "),ne(t[r])){case"boolean":case"number":case"object":e+=t[r].toString();break;case"string":"/"!==t[r].substr(0,1)?e+="("+L(t[r].toString())+")":e+=t[r].toString()}return e+"]"}throw new Error("Invalid argument passed to jsPDF.__acroform__.arrayToPdfArray")};w.prototype.toString=function(){return this.objId+" 0 R"},w.prototype.putStream=function(){var t=this.getKeyValueListForStream();N.internal.putStream({data:this.stream,additionalKeyValues:t}),N.internal.out("endobj")},w.prototype.getKeyValueListForStream=function(){return function(t){var e=[],r=Object.getOwnPropertyNames(t).filter(function(t){return"content"!=t&&"appearanceStreamContent"!=t&&"_"!=t.substring(0,1)});for(var n in r)if(!1===Object.getOwnPropertyDescriptor(t,r[n]).configurable){var i=r[n],o=t[i];o&&(Array.isArray(o)?e.push({key:i,value:C(o)}):o instanceof w?e.push({key:i,value:o.objId+" 0 R"}):"function"!=typeof o&&e.push({key:i,value:o}))}return e}(this)};var T=function(){w.call(this),Object.defineProperty(this,"Type",{value:"/XObject",configurable:!1,writeable:!0}),Object.defineProperty(this,"Subtype",{value:"/Form",configurable:!1,writeable:!0}),Object.defineProperty(this,"FormType",{value:1,configurable:!1,writeable:!0});var e,r=[];Object.defineProperty(this,"BBox",{configurable:!1,writeable:!0,get:function(){return r},set:function(t){r=t}}),Object.defineProperty(this,"Resources",{value:"2 0 R",configurable:!1,writeable:!0}),Object.defineProperty(this,"stream",{enumerable:!1,configurable:!0,set:function(t){e=t.trim()},get:function(){return e||null}})};r(T,w);var O=function(){w.call(this);var e,t=[];Object.defineProperty(this,"Kids",{enumerable:!1,configurable:!0,get:function(){return 0<t.length?t:void 0}}),Object.defineProperty(this,"Fields",{enumerable:!1,configurable:!1,get:function(){return t}}),Object.defineProperty(this,"DA",{enumerable:!1,configurable:!1,get:function(){if(e)return"("+e+")"},set:function(t){e=t}})};r(O,w);var I=function t(){w.call(this);var e=4;Object.defineProperty(this,"F",{enumerable:!1,configurable:!1,get:function(){return e},set:function(t){if(isNaN(t))throw new Error('Invalid value "'+t+'" for attribute F supplied.');e=t}}),Object.defineProperty(this,"showWhenPrinted",{enumerable:!0,configurable:!0,get:function(){return Boolean(_(e,3))},set:function(t){!0===Boolean(t)?this.F=x(e,3):this.F=A(e,3)}});var r=0;Object.defineProperty(this,"Ff",{enumerable:!1,configurable:!1,get:function(){return r},set:function(t){if(isNaN(t))throw new Error('Invalid value "'+t+'" for attribute Ff supplied.');r=t}});var n=[];Object.defineProperty(this,"Rect",{enumerable:!1,configurable:!1,get:function(){if(0!==n.length)return n},set:function(t){n=void 0!==t?t:[]}}),Object.defineProperty(this,"x",{enumerable:!0,configurable:!0,get:function(){return!n||isNaN(n[0])?0:n[0]/y},set:function(t){n[0]=t*y}}),Object.defineProperty(this,"y",{enumerable:!0,configurable:!0,get:function(){return!n||isNaN(n[1])?0:n[1]/y},set:function(t){n[1]=t*y}}),Object.defineProperty(this,"width",{enumerable:!0,configurable:!0,get:function(){return!n||isNaN(n[2])?0:n[2]/y},set:function(t){n[2]=t*y}}),Object.defineProperty(this,"height",{enumerable:!0,configurable:!0,get:function(){return!n||isNaN(n[3])?0:n[3]/y},set:function(t){n[3]=t*y}});var i="";Object.defineProperty(this,"FT",{enumerable:!0,configurable:!1,get:function(){return i},set:function(t){switch(t){case"/Btn":case"/Tx":case"/Ch":case"/Sig":i=t;break;default:throw new Error('Invalid value "'+t+'" for attribute FT supplied.')}}});var o=null;Object.defineProperty(this,"T",{enumerable:!0,configurable:!1,get:function(){if(!o||o.length<1){if(this instanceof q)return;o="FieldObject"+t.FieldNum++}return"("+L(o)+")"},set:function(t){o=t.toString()}}),Object.defineProperty(this,"fieldName",{configurable:!0,enumerable:!0,get:function(){return o},set:function(t){o=t}});var a="helvetica";Object.defineProperty(this,"fontName",{enumerable:!0,configurable:!0,get:function(){return a},set:function(t){a=t}});var s="normal";Object.defineProperty(this,"fontStyle",{enumerable:!0,configurable:!0,get:function(){return s},set:function(t){s=t}});var u=0;Object.defineProperty(this,"fontSize",{enumerable:!0,configurable:!0,get:function(){return u/y},set:function(t){u=t*y}});var l=50;Object.defineProperty(this,"maxFontSize",{enumerable:!0,configurable:!0,get:function(){return l/y},set:function(t){l=t*y}});var h="black";Object.defineProperty(this,"color",{enumerable:!0,configurable:!0,get:function(){return h},set:function(t){h=t}});var c="/F1 0 Tf 0 g";Object.defineProperty(this,"DA",{enumerable:!0,configurable:!1,get:function(){if(!(!c||this instanceof q||this instanceof H))return b(c)},set:function(t){t=t.toString(),c=t}});var f=null;Object.defineProperty(this,"DV",{enumerable:!1,configurable:!1,get:function(){if(f)return this instanceof R==0?b(f):f},set:function(t){t=t.toString(),f=this instanceof R==0?"("===t.substr(0,1)?m(t.substr(1,t.length-2)):m(t):t}}),Object.defineProperty(this,"defaultValue",{enumerable:!0,configurable:!0,get:function(){return this instanceof R==1?m(f.substr(1,f.length-1)):f},set:function(t){t=t.toString(),f=this instanceof R==1?"/"+t:t}});var d=null;Object.defineProperty(this,"V",{enumerable:!1,configurable:!1,get:function(){if(d)return this instanceof R==0?b(d):d},set:function(t){t=t.toString(),d=this instanceof R==0?"("===t.substr(0,1)?m(t.substr(1,t.length-2)):m(t):t}}),Object.defineProperty(this,"value",{enumerable:!0,configurable:!0,get:function(){return this instanceof R==1?m(d.substr(1,d.length-1)):d},set:function(t){t=t.toString(),d=this instanceof R==1?"/"+t:t}}),Object.defineProperty(this,"hasAnnotation",{enumerable:!0,configurable:!0,get:function(){return this.Rect}}),Object.defineProperty(this,"Type",{enumerable:!0,configurable:!1,get:function(){return this.hasAnnotation?"/Annot":null}}),Object.defineProperty(this,"Subtype",{enumerable:!0,configurable:!1,get:function(){return this.hasAnnotation?"/Widget":null}});var p,g=!1;Object.defineProperty(this,"hasAppearanceStream",{enumerable:!0,configurable:!0,writeable:!0,get:function(){return g},set:function(t){t=Boolean(t),g=t}}),Object.defineProperty(this,"page",{enumerable:!0,configurable:!0,writeable:!0,get:function(){if(p)return p},set:function(t){p=t}}),Object.defineProperty(this,"readOnly",{enumerable:!0,configurable:!0,get:function(){return Boolean(_(this.Ff,1))},set:function(t){!0===Boolean(t)?this.Ff=x(this.Ff,1):this.Ff=A(this.Ff,1)}}),Object.defineProperty(this,"required",{enumerable:!0,configurable:!0,get:function(){return Boolean(_(this.Ff,2))},set:function(t){!0===Boolean(t)?this.Ff=x(this.Ff,2):this.Ff=A(this.Ff,2)}}),Object.defineProperty(this,"noExport",{enumerable:!0,configurable:!0,get:function(){return Boolean(_(this.Ff,3))},set:function(t){!0===Boolean(t)?this.Ff=x(this.Ff,3):this.Ff=A(this.Ff,3)}});var v=null;Object.defineProperty(this,"Q",{enumerable:!0,configurable:!1,get:function(){if(null!==v)return v},set:function(t){if(-1===[0,1,2].indexOf(t))throw new Error('Invalid value "'+t+'" for attribute Q supplied.');v=t}}),Object.defineProperty(this,"textAlign",{get:function(){var t="left";switch(v){case 0:default:t="left";break;case 1:t="center";break;case 2:t="right"}return t},configurable:!0,enumerable:!0,set:function(t){switch(t){case"right":case 2:v=2;break;case"center":case 1:v=1;break;case"left":case 0:default:v=0}}})};r(I,w);function B(){I.call(this),this.FT="/Ch",this.V="()",this.fontName="zapfdingbats";var e=0;Object.defineProperty(this,"TI",{enumerable:!0,configurable:!1,get:function(){return e},set:function(t){e=t}}),Object.defineProperty(this,"topIndex",{enumerable:!0,configurable:!0,get:function(){return e},set:function(t){e=t}});var r=[];Object.defineProperty(this,"Opt",{enumerable:!0,configurable:!1,get:function(){return C(r)},set:function(t){var e;e=[],"string"==typeof t&&(e=function(t,e,r){r=r||1;for(var n,i=[];n=e.exec(t);)i.push(n[r]);return i}(t,/\((.*?)\)/g)),r=e}}),this.getOptions=function(){return r},this.setOptions=function(t){r=t,this.sort&&r.sort()},this.addOption=function(t){t=(t=t||"").toString(),r.push(t),this.sort&&r.sort()},this.removeOption=function(t,e){for(e=e||!1,t=(t=t||"").toString();-1!==r.indexOf(t)&&(r.splice(r.indexOf(t),1),!1!==e););},Object.defineProperty(this,"combo",{enumerable:!0,configurable:!0,get:function(){return Boolean(_(this.Ff,18))},set:function(t){!0===Boolean(t)?this.Ff=x(this.Ff,18):this.Ff=A(this.Ff,18)}}),Object.defineProperty(this,"edit",{enumerable:!0,configurable:!0,get:function(){return Boolean(_(this.Ff,19))},set:function(t){!0===this.combo&&(!0===Boolean(t)?this.Ff=x(this.Ff,19):this.Ff=A(this.Ff,19))}}),Object.defineProperty(this,"sort",{enumerable:!0,configurable:!0,get:function(){return Boolean(_(this.Ff,20))},set:function(t){!0===Boolean(t)?(this.Ff=x(this.Ff,20),r.sort()):this.Ff=A(this.Ff,20)}}),Object.defineProperty(this,"multiSelect",{enumerable:!0,configurable:!0,get:function(){return Boolean(_(this.Ff,22))},set:function(t){!0===Boolean(t)?this.Ff=x(this.Ff,22):this.Ff=A(this.Ff,22)}}),Object.defineProperty(this,"doNotSpellCheck",{enumerable:!0,configurable:!0,get:function(){return Boolean(_(this.Ff,23))},set:function(t){!0===Boolean(t)?this.Ff=x(this.Ff,23):this.Ff=A(this.Ff,23)}}),Object.defineProperty(this,"commitOnSelChange",{enumerable:!0,configurable:!0,get:function(){return Boolean(_(this.Ff,27))},set:function(t){!0===Boolean(t)?this.Ff=x(this.Ff,27):this.Ff=A(this.Ff,27)}}),this.hasAppearanceStream=!1}r(B,I);function M(){B.call(this),this.fontName="helvetica",this.combo=!1}r(M,B);function j(){M.call(this),this.combo=!0}r(j,M);function F(){j.call(this),this.edit=!0}r(F,j);var R=function(){I.call(this),this.FT="/Btn",Object.defineProperty(this,"noToggleToOff",{enumerable:!0,configurable:!0,get:function(){return Boolean(_(this.Ff,15))},set:function(t){!0===Boolean(t)?this.Ff=x(this.Ff,15):this.Ff=A(this.Ff,15)}}),Object.defineProperty(this,"radio",{enumerable:!0,configurable:!0,get:function(){return Boolean(_(this.Ff,16))},set:function(t){!0===Boolean(t)?this.Ff=x(this.Ff,16):this.Ff=A(this.Ff,16)}}),Object.defineProperty(this,"pushButton",{enumerable:!0,configurable:!0,get:function(){return Boolean(_(this.Ff,17))},set:function(t){!0===Boolean(t)?this.Ff=x(this.Ff,17):this.Ff=A(this.Ff,17)}}),Object.defineProperty(this,"radioIsUnison",{enumerable:!0,configurable:!0,get:function(){return Boolean(_(this.Ff,26))},set:function(t){!0===Boolean(t)?this.Ff=x(this.Ff,26):this.Ff=A(this.Ff,26)}});var e,r={};Object.defineProperty(this,"MK",{enumerable:!1,configurable:!1,get:function(){if(0!==Object.keys(r).length){var t,e=[];for(t in e.push("<<"),r)e.push("/"+t+" ("+r[t]+")");return e.push(">>"),e.join("\n")}},set:function(t){"object"===ne(t)&&(r=t)}}),Object.defineProperty(this,"caption",{enumerable:!0,configurable:!0,get:function(){return r.CA||""},set:function(t){"string"==typeof t&&(r.CA=t)}}),Object.defineProperty(this,"AS",{enumerable:!1,configurable:!1,get:function(){return e},set:function(t){e=t}}),Object.defineProperty(this,"appearanceState",{enumerable:!0,configurable:!0,get:function(){return e.substr(1,e.length-1)},set:function(t){e="/"+t}})};r(R,I);function D(){R.call(this),this.pushButton=!0}r(D,R);function z(){R.call(this),this.radio=!0,this.pushButton=!1;var e=[];Object.defineProperty(this,"Kids",{enumerable:!0,configurable:!1,get:function(){return e},set:function(t){e=void 0!==t?t:[]}})}r(z,R);var q=function(){var e,r;I.call(this),Object.defineProperty(this,"Parent",{enumerable:!1,configurable:!1,get:function(){return e},set:function(t){e=t}}),Object.defineProperty(this,"optionName",{enumerable:!1,configurable:!0,get:function(){return r},set:function(t){r=t}});var n,i={};Object.defineProperty(this,"MK",{enumerable:!1,configurable:!1,get:function(){var t,e=[];for(t in e.push("<<"),i)e.push("/"+t+" ("+i[t]+")");return e.push(">>"),e.join("\n")},set:function(t){"object"===ne(t)&&(i=t)}}),Object.defineProperty(this,"caption",{enumerable:!0,configurable:!0,get:function(){return i.CA||""},set:function(t){"string"==typeof t&&(i.CA=t)}}),Object.defineProperty(this,"AS",{enumerable:!1,configurable:!1,get:function(){return n},set:function(t){n=t}}),Object.defineProperty(this,"appearanceState",{enumerable:!0,configurable:!0,get:function(){return n.substr(1,n.length-1)},set:function(t){n="/"+t}}),this.optionName=name,this.caption="l",this.appearanceState="Off",this._AppearanceType=G.RadioButton.Circle,this.appearanceStreamContent=this._AppearanceType.createAppearanceStream(name)};r(q,I),z.prototype.setAppearance=function(t){if(!("createAppearanceStream"in t&&"getCA"in t))throw new Error("Couldn't assign Appearance to RadioButton. Appearance was Invalid!");for(var e in this.Kids)if(this.Kids.hasOwnProperty(e)){var r=this.Kids[e];r.appearanceStreamContent=t.createAppearanceStream(r.optionName),r.caption=t.getCA()}},z.prototype.createOption=function(t){this.Kids.length;var e=new q;return e.Parent=this,e.optionName=t,this.Kids.push(e),V.call(this,e),e};function U(){R.call(this),this.fontName="zapfdingbats",this.caption="3",this.appearanceState="On",this.value="On",this.textAlign="center",this.appearanceStreamContent=G.CheckBox.createAppearanceStream()}r(U,R);var H=function(){I.call(this),this.FT="/Tx",Object.defineProperty(this,"multiline",{enumerable:!0,configurable:!0,get:function(){return Boolean(_(this.Ff,13))},set:function(t){!0===Boolean(t)?this.Ff=x(this.Ff,13):this.Ff=A(this.Ff,13)}}),Object.defineProperty(this,"fileSelect",{enumerable:!0,configurable:!0,get:function(){return Boolean(_(this.Ff,21))},set:function(t){!0===Boolean(t)?this.Ff=x(this.Ff,21):this.Ff=A(this.Ff,21)}}),Object.defineProperty(this,"doNotSpellCheck",{enumerable:!0,configurable:!0,get:function(){return Boolean(_(this.Ff,23))},set:function(t){!0===Boolean(t)?this.Ff=x(this.Ff,23):this.Ff=A(this.Ff,23)}}),Object.defineProperty(this,"doNotScroll",{enumerable:!0,configurable:!0,get:function(){return Boolean(_(this.Ff,24))},set:function(t){!0===Boolean(t)?this.Ff=x(this.Ff,24):this.Ff=A(this.Ff,24)}}),Object.defineProperty(this,"comb",{enumerable:!0,configurable:!0,get:function(){return Boolean(_(this.Ff,25))},set:function(t){!0===Boolean(t)?this.Ff=x(this.Ff,25):this.Ff=A(this.Ff,25)}}),Object.defineProperty(this,"richText",{enumerable:!0,configurable:!0,get:function(){return Boolean(_(this.Ff,26))},set:function(t){!0===Boolean(t)?this.Ff=x(this.Ff,26):this.Ff=A(this.Ff,26)}});var e=null;Object.defineProperty(this,"MaxLen",{enumerable:!0,configurable:!1,get:function(){return e},set:function(t){e=t}}),Object.defineProperty(this,"maxLength",{enumerable:!0,configurable:!0,get:function(){return e},set:function(t){Number.isInteger(t)&&(e=t)}}),Object.defineProperty(this,"hasAppearanceStream",{enumerable:!0,configurable:!0,get:function(){return this.V||this.DV}})};r(H,I);function W(){H.call(this),Object.defineProperty(this,"password",{enumerable:!0,configurable:!0,get:function(){return Boolean(_(this.Ff,14))},set:function(t){!0===Boolean(t)?this.Ff=x(this.Ff,14):this.Ff=A(this.Ff,14)}}),this.password=!0}r(W,H);var G={CheckBox:{createAppearanceStream:function(){return{N:{On:G.CheckBox.YesNormal},D:{On:G.CheckBox.YesPushDown,Off:G.CheckBox.OffPushDown}}},YesPushDown:function(t){var e=u(t),r=[],n=N.internal.getFont(t.fontName,t.fontStyle).id,i=N.__private__.encodeColorString(t.color),o=g(t,t.caption);return r.push("0.749023 g"),r.push("0 0 "+S(G.internal.getWidth(t))+" "+S(G.internal.getHeight(t))+" re"),r.push("f"),r.push("BMC"),r.push("q"),r.push("0 0 1 rg"),r.push("/"+n+" "+S(o.fontSize)+" Tf "+i),r.push("BT"),r.push(o.text),r.push("ET"),r.push("Q"),r.push("EMC"),e.stream=r.join("\n"),e},YesNormal:function(t){var e=u(t),r=N.internal.getFont(t.fontName,t.fontStyle).id,n=N.__private__.encodeColorString(t.color),i=[],o=G.internal.getHeight(t),a=G.internal.getWidth(t),s=g(t,t.caption);return i.push("1 g"),i.push("0 0 "+S(a)+" "+S(o)+" re"),i.push("f"),i.push("q"),i.push("0 0 1 rg"),i.push("0 0 "+S(a-1)+" "+S(o-1)+" re"),i.push("W"),i.push("n"),i.push("0 g"),i.push("BT"),i.push("/"+r+" "+S(s.fontSize)+" Tf "+n),i.push(s.text),i.push("ET"),i.push("Q"),e.stream=i.join("\n"),e},OffPushDown:function(t){var e=u(t),r=[];return r.push("0.749023 g"),r.push("0 0 "+S(G.internal.getWidth(t))+" "+S(G.internal.getHeight(t))+" re"),r.push("f"),e.stream=r.join("\n"),e}},RadioButton:{Circle:{createAppearanceStream:function(t){var e={D:{Off:G.RadioButton.Circle.OffPushDown},N:{}};return e.N[t]=G.RadioButton.Circle.YesNormal,e.D[t]=G.RadioButton.Circle.YesPushDown,e},getCA:function(){return"l"},YesNormal:function(t){var e=u(t),r=[],n=G.internal.getWidth(t)<=G.internal.getHeight(t)?G.internal.getWidth(t)/4:G.internal.getHeight(t)/4;n=Number((.9*n).toFixed(5));var i=G.internal.Bezier_C,o=Number((n*i).toFixed(5));return r.push("q"),r.push("1 0 0 1 "+s(G.internal.getWidth(t)/2)+" "+s(G.internal.getHeight(t)/2)+" cm"),r.push(n+" 0 m"),r.push(n+" "+o+" "+o+" "+n+" 0 "+n+" c"),r.push("-"+o+" "+n+" -"+n+" "+o+" -"+n+" 0 c"),r.push("-"+n+" -"+o+" -"+o+" -"+n+" 0 -"+n+" c"),r.push(o+" -"+n+" "+n+" -"+o+" "+n+" 0 c"),r.push("f"),r.push("Q"),e.stream=r.join("\n"),e},YesPushDown:function(t){var e=u(t),r=[],n=G.internal.getWidth(t)<=G.internal.getHeight(t)?G.internal.getWidth(t)/4:G.internal.getHeight(t)/4,i=(n=Number((.9*n).toFixed(5)),Number((2*n).toFixed(5))),o=Number((i*G.internal.Bezier_C).toFixed(5)),a=Number((n*G.internal.Bezier_C).toFixed(5));return r.push("0.749023 g"),r.push("q"),r.push("1 0 0 1 "+s(G.internal.getWidth(t)/2)+" "+s(G.internal.getHeight(t)/2)+" cm"),r.push(i+" 0 m"),r.push(i+" "+o+" "+o+" "+i+" 0 "+i+" c"),r.push("-"+o+" "+i+" -"+i+" "+o+" -"+i+" 0 c"),r.push("-"+i+" -"+o+" -"+o+" -"+i+" 0 -"+i+" c"),r.push(o+" -"+i+" "+i+" -"+o+" "+i+" 0 c"),r.push("f"),r.push("Q"),r.push("0 g"),r.push("q"),r.push("1 0 0 1 "+s(G.internal.getWidth(t)/2)+" "+s(G.internal.getHeight(t)/2)+" cm"),r.push(n+" 0 m"),r.push(n+" "+a+" "+a+" "+n+" 0 "+n+" c"),r.push("-"+a+" "+n+" -"+n+" "+a+" -"+n+" 0 c"),r.push("-"+n+" -"+a+" -"+a+" -"+n+" 0 -"+n+" c"),r.push(a+" -"+n+" "+n+" -"+a+" "+n+" 0 c"),r.push("f"),r.push("Q"),e.stream=r.join("\n"),e},OffPushDown:function(t){var e=u(t),r=[],n=G.internal.getWidth(t)<=G.internal.getHeight(t)?G.internal.getWidth(t)/4:G.internal.getHeight(t)/4,i=(n=Number((.9*n).toFixed(5)),Number((2*n).toFixed(5))),o=Number((i*G.internal.Bezier_C).toFixed(5));return r.push("0.749023 g"),r.push("q"),r.push("1 0 0 1 "+s(G.internal.getWidth(t)/2)+" "+s(G.internal.getHeight(t)/2)+" cm"),r.push(i+" 0 m"),r.push(i+" "+o+" "+o+" "+i+" 0 "+i+" c"),r.push("-"+o+" "+i+" -"+i+" "+o+" -"+i+" 0 c"),r.push("-"+i+" -"+o+" -"+o+" -"+i+" 0 -"+i+" c"),r.push(o+" -"+i+" "+i+" -"+o+" "+i+" 0 c"),r.push("f"),r.push("Q"),e.stream=r.join("\n"),e}},Cross:{createAppearanceStream:function(t){var e={D:{Off:G.RadioButton.Cross.OffPushDown},N:{}};return e.N[t]=G.RadioButton.Cross.YesNormal,e.D[t]=G.RadioButton.Cross.YesPushDown,e},getCA:function(){return"8"},YesNormal:function(t){var e=u(t),r=[],n=G.internal.calculateCross(t);return r.push("q"),r.push("1 1 "+S(G.internal.getWidth(t)-2)+" "+S(G.internal.getHeight(t)-2)+" re"),r.push("W"),r.push("n"),r.push(S(n.x1.x)+" "+S(n.x1.y)+" m"),r.push(S(n.x2.x)+" "+S(n.x2.y)+" l"),r.push(S(n.x4.x)+" "+S(n.x4.y)+" m"),r.push(S(n.x3.x)+" "+S(n.x3.y)+" l"),r.push("s"),r.push("Q"),e.stream=r.join("\n"),e},YesPushDown:function(t){var e=u(t),r=G.internal.calculateCross(t),n=[];return n.push("0.749023 g"),n.push("0 0 "+S(G.internal.getWidth(t))+" "+S(G.internal.getHeight(t))+" re"),n.push("f"),n.push("q"),n.push("1 1 "+S(G.internal.getWidth(t)-2)+" "+S(G.internal.getHeight(t)-2)+" re"),n.push("W"),n.push("n"),n.push(S(r.x1.x)+" "+S(r.x1.y)+" m"),n.push(S(r.x2.x)+" "+S(r.x2.y)+" l"),n.push(S(r.x4.x)+" "+S(r.x4.y)+" m"),n.push(S(r.x3.x)+" "+S(r.x3.y)+" l"),n.push("s"),n.push("Q"),e.stream=n.join("\n"),e},OffPushDown:function(t){var e=u(t),r=[];return r.push("0.749023 g"),r.push("0 0 "+S(G.internal.getWidth(t))+" "+S(G.internal.getHeight(t))+" re"),r.push("f"),e.stream=r.join("\n"),e}}},createDefaultAppearanceStream:function(t){var e=N.internal.getFont(t.fontName,t.fontStyle).id,r=N.__private__.encodeColorString(t.color);return"/"+e+" "+t.fontSize+" Tf "+r}};G.internal={Bezier_C:.551915024494,calculateCross:function(t){var e=G.internal.getWidth(t),r=G.internal.getHeight(t),n=Math.min(e,r);return{x1:{x:(e-n)/2,y:(r-n)/2+n},x2:{x:(e-n)/2+n,y:(r-n)/2},x3:{x:(e-n)/2,y:(r-n)/2},x4:{x:(e-n)/2+n,y:(r-n)/2+n}}}},G.internal.getWidth=function(t){var e=0;return"object"===ne(t)&&(e=t.Rect[2]*y),e},G.internal.getHeight=function(t){var e=0;return"object"===ne(t)&&(e=t.Rect[3]*y),e};var V=t.addField=function(t){if(l.call(this),!(t instanceof I))throw new Error("Invalid argument passed to jsPDF.addField.");return function(t){N.internal.acroformPlugin.printedOut&&(N.internal.acroformPlugin.printedOut=!1,N.internal.acroformPlugin.acroFormDictionaryRoot=null),N.internal.acroformPlugin.acroFormDictionaryRoot||l.call(N),N.internal.acroformPlugin.acroFormDictionaryRoot.Fields.push(t)}.call(this,t),t.page=N.internal.getCurrentPageInfo().pageNumber,this};t.addButton=function(t){if(t instanceof R==0)throw new Error("Invalid argument passed to jsPDF.addButton.");return V.call(this,t)},t.addTextField=function(t){if(t instanceof H==0)throw new Error("Invalid argument passed to jsPDF.addTextField.");return V.call(this,t)},t.addChoiceField=function(t){if(t instanceof B==0)throw new Error("Invalid argument passed to jsPDF.addChoiceField.");return V.call(this,t)},"object"==ne(e)&&void 0===e.ChoiceField&&void 0===e.ListBox&&void 0===e.ComboBox&&void 0===e.EditBox&&void 0===e.Button&&void 0===e.PushButton&&void 0===e.RadioButton&&void 0===e.CheckBox&&void 0===e.TextField&&void 0===e.PasswordField?(e.ChoiceField=B,e.ListBox=M,e.ComboBox=j,e.EditBox=F,e.Button=R,e.PushButton=D,e.RadioButton=z,e.CheckBox=U,e.TextField=H,e.PasswordField=W,e.AcroForm={Appearance:G}):console.warn("AcroForm-Classes are not populated into global-namespace, because the class-Names exist already."),t.AcroFormChoiceField=B,t.AcroFormListBox=M,t.AcroFormComboBox=j,t.AcroFormEditBox=F,t.AcroFormButton=R,t.AcroFormPushButton=D,t.AcroFormRadioButton=z,t.AcroFormCheckBox=U,t.AcroFormTextField=H,t.AcroFormPasswordField=W,t.AcroFormAppearance=G,t.AcroForm={ChoiceField:B,ListBox:M,ComboBox:j,EditBox:F,Button:R,PushButton:D,RadioButton:z,CheckBox:U,TextField:H,PasswordField:W,Appearance:G}})((window.tmp=st).API,"undefined"!=typeof window&&window||void 0!==Ct&&Ct),function(w){function f(t){for(var e=this.internal.newObject(),r=this.internal.write,n=this.internal.putStream,i=(0,this.internal.getFilters)();-1!==i.indexOf("FlateEncode");)i.splice(i.indexOf("FlateEncode"),1);t.n=e;var o=[];if(o.push({key:"Type",value:"/XObject"}),o.push({key:"Subtype",value:"/Image"}),o.push({key:"Width",value:t.w}),o.push({key:"Height",value:t.h}),t.cs===this.color_spaces.INDEXED?o.push({key:"ColorSpace",value:"[/Indexed /DeviceRGB "+(t.pal.length/3-1)+" "+("smask"in t?e+2:e+1)+" 0 R]"}):(o.push({key:"ColorSpace",value:"/"+t.cs}),t.cs===this.color_spaces.DEVICE_CMYK&&o.push({key:"Decode",value:"[1 0 1 0 1 0 1 0]"})),o.push({key:"BitsPerComponent",value:t.bpc}),"dp"in t&&o.push({key:"DecodeParms",value:"<<"+t.dp+">>"}),"trns"in t&&t.trns.constructor==Array){for(var a="",s=0,u=t.trns.length;s<u;s++)a+=t.trns[s]+" "+t.trns[s]+" ";o.push({key:"Mask",value:"["+a+"]"})}"smask"in t&&o.push({key:"SMask",value:e+1+" 0 R"});var l=void 0!==t.f?["/"+t.f]:void 0;if(n({data:t.data,additionalKeyValues:o,alreadyAppliedFilters:l}),r("endobj"),"smask"in t){var h="/Predictor "+t.p+" /Colors 1 /BitsPerComponent "+t.bpc+" /Columns "+t.w,c={w:t.w,h:t.h,cs:"DeviceGray",bpc:t.bpc,dp:h,data:t.smask};"f"in t&&(c.f=t.f),f.call(this,c)}t.cs===this.color_spaces.INDEXED&&(this.internal.newObject(),n({data:this.arrayBufferToBinaryString(new Uint8Array(t.pal))}),r("endobj"))}function _(){var t=this.internal.collections[P+"images"];for(var e in t)f.call(this,t[e])}function x(){var t,e=this.internal.collections[P+"images"],r=this.internal.write;for(var n in e)r("/I"+(t=e[n]).i,t.n,"0","R")}function A(t){return"function"==typeof w["process"+t.toUpperCase()]}function L(t){return"object"===ne(t)&&1===t.nodeType}function S(t,e){if("IMG"===t.nodeName&&t.hasAttribute("src")){var r=""+t.getAttribute("src");if(0===r.indexOf("data:image/"))return unescape(r);var n=w.loadFile(r);if(void 0!==n)return btoa(n)}if("CANVAS"===t.nodeName){var i=t;return t.toDataURL("image/jpeg",1)}(i=document.createElement("canvas")).width=t.clientWidth||t.width,i.height=t.clientHeight||t.height;var o=i.getContext("2d");if(!o)throw"addImage requires canvas to be supported by browser.";return o.drawImage(t,0,0,i.width,i.height),i.toDataURL("png"==(""+e).toLowerCase()?"image/png":"image/jpeg")}function N(t,e){var r;if(e)for(var n in e)if(t===e[n].alias){r=e[n];break}return r}var P="addImage_",u={PNG:[[137,80,78,71]],TIFF:[[77,77,0,42],[73,73,42,0]],JPEG:[[255,216,255,224,void 0,void 0,74,70,73,70,0],[255,216,255,225,void 0,void 0,69,120,105,102,0,0]],JPEG2000:[[0,0,0,12,106,80,32,32]],GIF87a:[[71,73,70,56,55,97]],GIF89a:[[71,73,70,56,57,97]],BMP:[[66,77],[66,65],[67,73],[67,80],[73,67],[80,84]]},l=w.getImageFileTypeByImageData=function(t,e){var r,n;e=e||"UNKNOWN";var i,o,a,s="UNKNOWN";for(a in w.isArrayBufferView(t)&&(t=w.arrayBufferToBinaryString(t)),u)for(i=u[a],r=0;r<i.length;r+=1){for(o=!0,n=0;n<i[r].length;n+=1)if(void 0!==i[r][n]&&i[r][n]!==t.charCodeAt(n)){o=!1;break}if(!0===o){s=a;break}}return"UNKNOWN"===s&&"UNKNOWN"!==e&&(console.warn('FileType of Image not recognized. Processing image as "'+e+'".'),s=e),s};w.color_spaces={DEVICE_RGB:"DeviceRGB",DEVICE_GRAY:"DeviceGray",DEVICE_CMYK:"DeviceCMYK",CAL_GREY:"CalGray",CAL_RGB:"CalRGB",LAB:"Lab",ICC_BASED:"ICCBased",INDEXED:"Indexed",PATTERN:"Pattern",SEPARATION:"Separation",DEVICE_N:"DeviceN"},w.decode={DCT_DECODE:"DCTDecode",FLATE_DECODE:"FlateDecode",LZW_DECODE:"LZWDecode",JPX_DECODE:"JPXDecode",JBIG2_DECODE:"JBIG2Decode",ASCII85_DECODE:"ASCII85Decode",ASCII_HEX_DECODE:"ASCIIHexDecode",RUN_LENGTH_DECODE:"RunLengthDecode",CCITT_FAX_DECODE:"CCITTFaxDecode"},w.image_compression={NONE:"NONE",FAST:"FAST",MEDIUM:"MEDIUM",SLOW:"SLOW"},w.sHashCode=function(t){var e,r=0;if(0===(t=t||"").length)return r;for(e=0;e<t.length;e++)r=(r<<5)-r+t.charCodeAt(e),r|=0;return r},w.isString=function(t){return"string"==typeof t},w.validateStringAsBase64=function(t){(t=t||"").toString().trim();var e=!0;return 0===t.length&&(e=!1),t.length%4!=0&&(e=!1),!1===/^[A-Za-z0-9+\/]+$/.test(t.substr(0,t.length-2))&&(e=!1),!1===/^[A-Za-z0-9\/][A-Za-z0-9+\/]|[A-Za-z0-9+\/]=|==$/.test(t.substr(-2))&&(e=!1),e},w.extractInfoFromBase64DataURI=function(t){return/^data:([\w]+?\/([\w]+?));\S*;*base64,(.+)$/g.exec(t)},w.extractImageFromDataUrl=function(t){var e=(t=t||"").split("base64,"),r=null;if(2===e.length){var n=/^data:(\w*\/\w*);*(charset=[\w=-]*)*;*$/.exec(e[0]);Array.isArray(n)&&(r={mimeType:n[1],charset:n[2],data:e[1]})}return r},w.supportsArrayBuffer=function(){return"undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array},w.isArrayBuffer=function(t){return!!this.supportsArrayBuffer()&&t instanceof ArrayBuffer},w.isArrayBufferView=function(t){return!!this.supportsArrayBuffer()&&"undefined"!=typeof Uint32Array&&(t instanceof Int8Array||t instanceof Uint8Array||"undefined"!=typeof Uint8ClampedArray&&t instanceof Uint8ClampedArray||t instanceof Int16Array||t instanceof Uint16Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Float32Array||t instanceof Float64Array)},w.binaryStringToUint8Array=function(t){for(var e=t.length,r=new Uint8Array(e),n=0;n<e;n++)r[n]=t.charCodeAt(n);return r},w.arrayBufferToBinaryString=function(t){if("function"==typeof atob)return atob(this.arrayBufferToBase64(t))},w.arrayBufferToBase64=function(t){for(var e,r="",n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=new Uint8Array(t),o=i.byteLength,a=o%3,s=o-a,u=0;u<s;u+=3)r+=n[(16515072&(e=i[u]<<16|i[u+1]<<8|i[u+2]))>>18]+n[(258048&e)>>12]+n[(4032&e)>>6]+n[63&e];return 1==a?r+=n[(252&(e=i[s]))>>2]+n[(3&e)<<4]+"==":2==a&&(r+=n[(64512&(e=i[s]<<8|i[1+s]))>>10]+n[(1008&e)>>4]+n[(15&e)<<2]+"="),r},w.createImageInfo=function(t,e,r,n,i,o,a,s,u,l,h,c,f){var d={alias:s,w:e,h:r,cs:n,bpc:i,i:a,data:t};return o&&(d.f=o),u&&(d.dp=u),l&&(d.trns=l),h&&(d.pal=h),c&&(d.smask=c),f&&(d.p=f),d},w.addImage=function(t,e,r,n,i,o,a,s,u){var l="";if("string"!=typeof e){var h=o;o=i,i=n,n=r,r=e,e=h}if("object"===ne(t)&&!L(t)&&"imageData"in t){var c=t;t=c.imageData,e=c.format||e||"UNKNOWN",r=c.x||r||0,n=c.y||n||0,i=c.w||i,o=c.h||o,a=c.alias||a,s=c.compression||s,u=c.rotation||c.angle||u}var f=this.internal.getFilters();if(void 0===s&&-1!==f.indexOf("FlateEncode")&&(s="SLOW"),"string"==typeof t&&(t=unescape(t)),isNaN(r)||isNaN(n))throw console.error("jsPDF.addImage: Invalid coordinates",arguments),new Error("Invalid coordinates passed to jsPDF.addImage");var d,p,g,v,m,y,b=function(){var t=this.internal.collections[P+"images"];return t||(this.internal.collections[P+"images"]=t={},this.internal.events.subscribe("putResources",_),this.internal.events.subscribe("putXobjectDict",x)),t}.call(this);if(!((d=N(t,b))||(L(t)&&(t=S(t,e)),null!=a&&0!==a.length||(a="string"==typeof(y=t)?w.sHashCode(y):w.isArrayBufferView(y)?w.sHashCode(w.arrayBufferToBinaryString(y)):null),d=N(a,b)))){if(!this.isString(t)||""===(l=this.convertStringToImageData(t))&&void 0===(l=w.loadFile(t))||(t=l),e=this.getImageFileTypeByImageData(t,e),!A(e))throw new Error("addImage does not support files of type '"+e+"', please ensure that a plugin for '"+e+"' support is added.");if(this.supportsArrayBuffer()&&(t instanceof Uint8Array||(p=t,t=this.binaryStringToUint8Array(t))),!(d=this["process"+e.toUpperCase()](t,(m=0,(v=b)&&(m=Object.keys?Object.keys(v).length:function(t){var e=0;for(var r in t)t.hasOwnProperty(r)&&e++;return e}(v)),m),a,((g=s)&&"string"==typeof g&&(g=g.toUpperCase()),g in w.image_compression?g:w.image_compression.NONE),p)))throw new Error("An unknown error occurred whilst processing the image")}return function(t,e,r,n,i,o,a,s){var u=function(t,e,r){return t||e||(e=t=-96),t<0&&(t=-1*r.w*72/t/this.internal.scaleFactor),e<0&&(e=-1*r.h*72/e/this.internal.scaleFactor),0===t&&(t=e*r.w/r.h),0===e&&(e=t*r.h/r.w),[t,e]}.call(this,r,n,i),l=this.internal.getCoordinateString,h=this.internal.getVerticalCoordinateString;if(r=u[0],n=u[1],a[o]=i,s){s*=Math.PI/180;var c=Math.cos(s),f=Math.sin(s),d=function(t){return t.toFixed(4)},p=[d(c),d(f),d(-1*f),d(c),0,0,"cm"]}this.internal.write("q"),s?(this.internal.write([1,"0","0",1,l(t),h(e+n),"cm"].join(" ")),this.internal.write(p.join(" ")),this.internal.write([l(r),"0","0",l(n),"0","0","cm"].join(" "))):this.internal.write([l(r),"0","0",l(n),l(t),h(e+n),"cm"].join(" ")),this.internal.write("/I"+i.i+" Do"),this.internal.write("Q")}.call(this,r,n,i,o,d,d.i,b,u),this},w.convertStringToImageData=function(t){var e,r="";if(this.isString(t)){var n;e=null!==(n=this.extractImageFromDataUrl(t))?n.data:t;try{r=atob(e)}catch(t){throw w.validateStringAsBase64(e)?new Error("atob-Error in jsPDF.convertStringToImageData "+t.message):new Error("Supplied Data is not a valid base64-String jsPDF.convertStringToImageData ")}}return r};function h(t,e){return t.subarray(e,e+5)}w.processJPEG=function(t,e,r,n,i,o){var a,s=this.decode.DCT_DECODE;if(!this.isString(t)&&!this.isArrayBuffer(t)&&!this.isArrayBufferView(t))return null;if(this.isString(t)&&(a=function(t){var e;if("JPEG"!==l(t))throw new Error("getJpegSize requires a binary string jpeg file");for(var r=256*t.charCodeAt(4)+t.charCodeAt(5),n=4,i=t.length;n<i;){if(n+=r,255!==t.charCodeAt(n))throw new Error("getJpegSize could not find the size of the image");if(192===t.charCodeAt(n+1)||193===t.charCodeAt(n+1)||194===t.charCodeAt(n+1)||195===t.charCodeAt(n+1)||196===t.charCodeAt(n+1)||197===t.charCodeAt(n+1)||198===t.charCodeAt(n+1)||199===t.charCodeAt(n+1))return e=256*t.charCodeAt(n+5)+t.charCodeAt(n+6),[256*t.charCodeAt(n+7)+t.charCodeAt(n+8),e,t.charCodeAt(n+9)];n+=2,r=256*t.charCodeAt(n)+t.charCodeAt(n+1)}}(t)),this.isArrayBuffer(t)&&(t=new Uint8Array(t)),this.isArrayBufferView(t)&&(a=function(t){if(65496!=(t[0]<<8|t[1]))throw new Error("Supplied data is not a JPEG");for(var e,r=t.length,n=(t[4]<<8)+t[5],i=4;i<r;){if(n=((e=h(t,i+=n))[2]<<8)+e[3],(192===e[1]||194===e[1])&&255===e[0]&&7<n)return{width:((e=h(t,i+5))[2]<<8)+e[3],height:(e[0]<<8)+e[1],numcomponents:e[4]};i+=2}throw new Error("getJpegSizeFromBytes could not find the size of the image")}(t),t=i||this.arrayBufferToBinaryString(t)),void 0===o)switch(a.numcomponents){case 1:o=this.color_spaces.DEVICE_GRAY;break;case 4:o=this.color_spaces.DEVICE_CMYK;break;default:o=this.color_spaces.DEVICE_RGB}return this.createImageInfo(t,a.width,a.height,o,8,s,e,r)},w.processJPG=function(){return this.processJPEG.apply(this,arguments)},w.getImageProperties=function(t){var e,r,n="";if(L(t)&&(t=S(t)),!this.isString(t)||""===(n=this.convertStringToImageData(t))&&void 0===(n=w.loadFile(t))||(t=n),r=this.getImageFileTypeByImageData(t),!A(r))throw new Error("addImage does not support files of type '"+r+"', please ensure that a plugin for '"+r+"' support is added.");if(this.supportsArrayBuffer()&&(t instanceof Uint8Array||(t=this.binaryStringToUint8Array(t))),!(e=this["process"+r.toUpperCase()](t)))throw new Error("An unknown error occurred whilst processing the image");return{fileType:r,width:e.w,height:e.h,colorSpace:e.cs,compressionMode:e.f,bitsPerComponent:e.bpc}}}(st.API),t=st.API,st.API.events.push(["addPage",function(t){this.internal.getPageInfo(t.pageNumber).pageContext.annotations=[]}]),t.events.push(["putPage",function(t){for(var e=this.internal.getPageInfoByObjId(t.objId),r=t.pageContext.annotations,n=function(t){if(void 0!==t&&""!=t)return!0},i=!1,o=0;o<r.length&&!i;o++)switch((u=r[o]).type){case"link":if(n(u.options.url)||n(u.options.pageNumber)){i=!0;break}case"reference":case"text":case"freetext":i=!0}if(0!=i){this.internal.write("/Annots ["),this.internal.pageSize.height;var a=this.internal.getCoordinateString,s=this.internal.getVerticalCoordinateString;for(o=0;o<r.length;o++){var u;switch((u=r[o]).type){case"reference":this.internal.write(" "+u.object.objId+" 0 R ");break;case"text":var l=this.internal.newAdditionalObject(),h=this.internal.newAdditionalObject(),c=u.title||"Note";v="<</Type /Annot /Subtype /Text "+(d="/Rect ["+a(u.bounds.x)+" "+s(u.bounds.y+u.bounds.h)+" "+a(u.bounds.x+u.bounds.w)+" "+s(u.bounds.y)+"] ")+"/Contents ("+u.contents+")",v+=" /Popup "+h.objId+" 0 R",v+=" /P "+e.objId+" 0 R",v+=" /T ("+c+") >>",l.content=v;var f=l.objId+" 0 R";v="<</Type /Annot /Subtype /Popup "+(d="/Rect ["+a(u.bounds.x+30)+" "+s(u.bounds.y+u.bounds.h)+" "+a(u.bounds.x+u.bounds.w+30)+" "+s(u.bounds.y)+"] ")+" /Parent "+f,u.open&&(v+=" /Open true"),v+=" >>",h.content=v,this.internal.write(l.objId,"0 R",h.objId,"0 R");break;case"freetext":var d="/Rect ["+a(u.bounds.x)+" "+s(u.bounds.y)+" "+a(u.bounds.x+u.bounds.w)+" "+s(u.bounds.y+u.bounds.h)+"] ",p=u.color||"#000000";v="<</Type /Annot /Subtype /FreeText "+d+"/Contents ("+u.contents+")",v+=" /DS(font: Helvetica,sans-serif 12.0pt; text-align:left; color:#"+p+")",v+=" /Border [0 0 0]",v+=" >>",this.internal.write(v);break;case"link":if(u.options.name){var g=this.annotations._nameMap[u.options.name];u.options.pageNumber=g.page,u.options.top=g.y}else u.options.top||(u.options.top=0);d="/Rect ["+a(u.x)+" "+s(u.y)+" "+a(u.x+u.w)+" "+s(u.y+u.h)+"] ";var v="";if(u.options.url)v="<</Type /Annot /Subtype /Link "+d+"/Border [0 0 0] /A <</S /URI /URI ("+u.options.url+") >>";else if(u.options.pageNumber)switch(v="<</Type /Annot /Subtype /Link "+d+"/Border [0 0 0] /Dest ["+this.internal.getPageInfo(u.options.pageNumber).objId+" 0 R",u.options.magFactor=u.options.magFactor||"XYZ",u.options.magFactor){case"Fit":v+=" /Fit]";break;case"FitH":v+=" /FitH "+u.options.top+"]";break;case"FitV":u.options.left=u.options.left||0,v+=" /FitV "+u.options.left+"]";break;case"XYZ":default:var m=s(u.options.top);u.options.left=u.options.left||0,void 0===u.options.zoom&&(u.options.zoom=0),v+=" /XYZ "+u.options.left+" "+m+" "+u.options.zoom+"]"}""!=v&&(v+=" >>",this.internal.write(v))}}this.internal.write("]")}}]),t.createAnnotation=function(t){var e=this.internal.getCurrentPageInfo();switch(t.type){case"link":this.link(t.bounds.x,t.bounds.y,t.bounds.w,t.bounds.h,t);break;case"text":case"freetext":e.pageContext.annotations.push(t)}},t.link=function(t,e,r,n,i){this.internal.getCurrentPageInfo().pageContext.annotations.push({x:t,y:e,w:r,h:n,options:i,type:"link"})},t.textWithLink=function(t,e,r,n){var i=this.getTextWidth(t),o=this.internal.getLineHeight()/this.internal.scaleFactor;return this.text(t,e,r),r+=.2*o,this.link(e,r-o,i,o,n),i},t.getTextWidth=function(t){var e=this.internal.getFontSize();return this.getStringUnitWidth(t)*e/this.internal.scaleFactor},function(t){var l={1569:[65152],1570:[65153,65154],1571:[65155,65156],1572:[65157,65158],1573:[65159,65160],1574:[65161,65162,65163,65164],1575:[65165,65166],1576:[65167,65168,65169,65170],1577:[65171,65172],1578:[65173,65174,65175,65176],1579:[65177,65178,65179,65180],1580:[65181,65182,65183,65184],1581:[65185,65186,65187,65188],1582:[65189,65190,65191,65192],1583:[65193,65194],1584:[65195,65196],1585:[65197,65198],1586:[65199,65200],1587:[65201,65202,65203,65204],1588:[65205,65206,65207,65208],1589:[65209,65210,65211,65212],1590:[65213,65214,65215,65216],1591:[65217,65218,65219,65220],1592:[65221,65222,65223,65224],1593:[65225,65226,65227,65228],1594:[65229,65230,65231,65232],1601:[65233,65234,65235,65236],1602:[65237,65238,65239,65240],1603:[65241,65242,65243,65244],1604:[65245,65246,65247,65248],1605:[65249,65250,65251,65252],1606:[65253,65254,65255,65256],1607:[65257,65258,65259,65260],1608:[65261,65262],1609:[65263,65264,64488,64489],1610:[65265,65266,65267,65268],1649:[64336,64337],1655:[64477],1657:[64358,64359,64360,64361],1658:[64350,64351,64352,64353],1659:[64338,64339,64340,64341],1662:[64342,64343,64344,64345],1663:[64354,64355,64356,64357],1664:[64346,64347,64348,64349],1667:[64374,64375,64376,64377],1668:[64370,64371,64372,64373],1670:[64378,64379,64380,64381],1671:[64382,64383,64384,64385],1672:[64392,64393],1676:[64388,64389],1677:[64386,64387],1678:[64390,64391],1681:[64396,64397],1688:[64394,64395],1700:[64362,64363,64364,64365],1702:[64366,64367,64368,64369],1705:[64398,64399,64400,64401],1709:[64467,64468,64469,64470],1711:[64402,64403,64404,64405],1713:[64410,64411,64412,64413],1715:[64406,64407,64408,64409],1722:[64414,64415],1723:[64416,64417,64418,64419],1726:[64426,64427,64428,64429],1728:[64420,64421],1729:[64422,64423,64424,64425],1733:[64480,64481],1734:[64473,64474],1735:[64471,64472],1736:[64475,64476],1737:[64482,64483],1739:[64478,64479],1740:[64508,64509,64510,64511],1744:[64484,64485,64486,64487],1746:[64430,64431],1747:[64432,64433]},a={65247:{65154:65269,65156:65271,65160:65273,65166:65275},65248:{65154:65270,65156:65272,65160:65274,65166:65276},65165:{65247:{65248:{65258:65010}}},1617:{1612:64606,1613:64607,1614:64608,1615:64609,1616:64610}},e={1612:64606,1613:64607,1614:64608,1615:64609,1616:64610},r=[1570,1571,1573,1575];t.__arabicParser__={};var n=t.__arabicParser__.isInArabicSubstitutionA=function(t){return void 0!==l[t.charCodeAt(0)]},h=t.__arabicParser__.isArabicLetter=function(t){return"string"==typeof t&&/^[\u0600-\u06FF\u0750-\u077F\u08A0-\u08FF\uFB50-\uFDFF\uFE70-\uFEFF]+$/.test(t)},i=t.__arabicParser__.isArabicEndLetter=function(t){return h(t)&&n(t)&&l[t.charCodeAt(0)].length<=2},o=t.__arabicParser__.isArabicAlfLetter=function(t){return h(t)&&0<=r.indexOf(t.charCodeAt(0))},s=(t.__arabicParser__.arabicLetterHasIsolatedForm=function(t){return h(t)&&n(t)&&1<=l[t.charCodeAt(0)].length},t.__arabicParser__.arabicLetterHasFinalForm=function(t){return h(t)&&n(t)&&2<=l[t.charCodeAt(0)].length}),u=(t.__arabicParser__.arabicLetterHasInitialForm=function(t){return h(t)&&n(t)&&3<=l[t.charCodeAt(0)].length},t.__arabicParser__.arabicLetterHasMedialForm=function(t){return h(t)&&n(t)&&4==l[t.charCodeAt(0)].length}),c=t.__arabicParser__.resolveLigatures=function(t){var e=0,r=a,n=0,i="",o=0;for(e=0;e<t.length;e+=1)void 0!==r[t.charCodeAt(e)]?(o++,"number"==typeof(r=r[t.charCodeAt(e)])&&(n=-1!==(n=f(t.charAt(e),t.charAt(e-o),t.charAt(e+1)))?n:0,i+=String.fromCharCode(r),r=a,o=0),e===t.length-1&&(r=a,i+=t.charAt(e-(o-1)),e-=o-1,o=0)):(r=a,i+=t.charAt(e-o),e-=o,o=0);return i},f=(t.__arabicParser__.isArabicDiacritic=function(t){return void 0!==t&&void 0!==e[t.charCodeAt(0)]},t.__arabicParser__.getCorrectForm=function(t,e,r){return!h(t)||!1===n(t)?-1:!s(t)||!h(e)&&!h(r)||!h(r)&&i(e)||i(t)&&!h(e)||i(t)&&o(e)||i(t)&&i(e)?0:u(t)&&h(e)&&!i(e)&&h(r)&&s(r)?3:i(t)||!h(r)?1:2}),d=t.__arabicParser__.processArabic=t.processArabic=function(t){var e=0,r=0,n=0,i="",o="",a="",s=(t=t||"").split("\\s+"),u=[];for(e=0;e<s.length;e+=1){for(u.push(""),r=0;r<s[e].length;r+=1)i=s[e][r],o=s[e][r-1],a=s[e][r+1],h(i)?(n=f(i,o,a),u[e]+=-1!==n?String.fromCharCode(l[i.charCodeAt(0)][n]):i):u[e]+=i;u[e]=c(u[e])}return u.join(" ")};t.events.push(["preProcessText",function(t){var e=t.text,r=(t.x,t.y,t.options,t.mutex,[]);if("[object Array]"===Object.prototype.toString.call(e)){var n=0;for(r=[],n=0;n<e.length;n+=1)"[object Array]"===Object.prototype.toString.call(e[n])?r.push([d(e[n][0]),e[n][1],e[n][2]]):r.push([d(e[n])]);t.text=r}else t.text=d(e)}])}(st.API),st.API.autoPrint=function(t){var e;switch((t=t||{}).variant=t.variant||"non-conform",t.variant){case"javascript":this.addJS("print({});");break;case"non-conform":default:this.internal.events.subscribe("postPutResources",function(){e=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/S /Named"),this.internal.out("/Type /Action"),this.internal.out("/N /Print"),this.internal.out(">>"),this.internal.out("endobj")}),this.internal.events.subscribe("putCatalog",function(){this.internal.out("/OpenAction "+e+" 0 R")})}return this},e=st.API,(r=function(){var e=void 0;Object.defineProperty(this,"pdf",{get:function(){return e},set:function(t){e=t}});var r=150;Object.defineProperty(this,"width",{get:function(){return r},set:function(t){r=isNaN(t)||!1===Number.isInteger(t)||t<0?150:t,this.getContext("2d").pageWrapXEnabled&&(this.getContext("2d").pageWrapX=r+1)}});var n=300;Object.defineProperty(this,"height",{get:function(){return n},set:function(t){n=isNaN(t)||!1===Number.isInteger(t)||t<0?300:t,this.getContext("2d").pageWrapYEnabled&&(this.getContext("2d").pageWrapY=n+1)}});var i=[];Object.defineProperty(this,"childNodes",{get:function(){return i},set:function(t){i=t}});var o={};Object.defineProperty(this,"style",{get:function(){return o},set:function(t){o=t}}),Object.defineProperty(this,"parentNode",{get:function(){return!1}})}).prototype.getContext=function(t,e){var r;if("2d"!==(t=t||"2d"))return null;for(r in e)this.pdf.context2d.hasOwnProperty(r)&&(this.pdf.context2d[r]=e[r]);return(this.pdf.context2d._canvas=this).pdf.context2d},r.prototype.toDataURL=function(){throw new Error("toDataURL is not implemented.")},e.events.push(["initialized",function(){this.canvas=new r,this.canvas.pdf=this}]),N=st.API,P={x:void 0,y:void 0,w:void 0,h:void 0,ln:void 0},E=1,f=function(t,e,r,n,i){P={x:t,y:e,w:r,h:n,ln:i}},k={left:0,top:0,bottom:0},N.setHeaderFunction=function(t){u=t},N.getTextDimensions=function(t,e){var r=this.table_font_size||this.internal.getFontSize(),n=(this.internal.getFont().fontStyle,(e=e||{}).scaleFactor||this.internal.scaleFactor),i=0,o=0,a=0;if("string"==typeof t)0!=(i=this.getStringUnitWidth(t)*r)&&(o=1);else{if("[object Array]"!==Object.prototype.toString.call(t))throw new Error("getTextDimensions expects text-parameter to be of type String or an Array of Strings.");for(var s=0;s<t.length;s++)i<(a=this.getStringUnitWidth(t[s])*r)&&(i=a);0!==i&&(o=t.length)}return{w:i/=n,h:Math.max((o*r*this.getLineHeightFactor()-r*(this.getLineHeightFactor()-1))/n,0)}},N.cellAddPage=function(){var t=this.margins||k;this.addPage(),f(t.left,t.top,void 0,void 0),E+=1},N.cellInitialize=function(){P={x:void 0,y:void 0,w:void 0,h:void 0,ln:void 0},E=1},N.cell=function(t,e,r,n,i,o,a){var s=!1;if(void 0!==P.ln)if(P.ln===o)t=P.x+P.w,e=P.y;else{var u=this.margins||k;P.y+P.h+n+13>=this.internal.pageSize.getHeight()-u.bottom&&(this.cellAddPage(),s=!0,this.printHeaders&&this.tableHeaderRow&&this.printHeaderRow(o,!0)),e=P.y+P.h,s&&(e=23)}if(void 0!==i[0])if(this.printingHeaderRow?this.rect(t,e,r,n,"FD"):this.rect(t,e,r,n),"right"===a){i instanceof Array||(i=[i]);for(var l=0;l<i.length;l++){var h=i[l],c=this.getStringUnitWidth(h)*this.internal.getFontSize()/this.internal.scaleFactor;this.text(h,t+r-c-3,e+this.internal.getLineHeight()*(l+1))}}else this.text(i,t+3,e+this.internal.getLineHeight());return f(t,e,r,n,o),this},N.arrayMax=function(t,e){var r,n,i,o=t[0];for(r=0,n=t.length;r<n;r+=1)i=t[r],e?-1===e(o,i)&&(o=i):o<i&&(o=i);return o},N.table=function(t,e,r,n,i){if(!r)throw"No data for PDF table";var o,a,s,u,l,h,c,f,d,p,g=[],v=[],m={},y={},b=[],w=[],_=!1,x=!0,A=12,L=k;if(L.width=this.internal.pageSize.getWidth(),i&&(!0===i.autoSize&&(_=!0),!1===i.printHeaders&&(x=!1),i.fontSize&&(A=i.fontSize),i.css&&void 0!==i.css["font-size"]&&(A=16*i.css["font-size"]),i.margins&&(L=i.margins)),this.lnMod=0,P={x:void 0,y:void 0,w:void 0,h:void 0,ln:void 0},E=1,this.printHeaders=x,this.margins=L,this.setFontSize(A),this.table_font_size=A,null==n)g=Object.keys(r[0]);else if(n[0]&&"string"!=typeof n[0])for(a=0,s=n.length;a<s;a+=1)o=n[a],g.push(o.name),v.push(o.prompt),y[o.name]=o.width*(19.049976/25.4);else g=n;if(_)for(p=function(t){return t[o]},a=0,s=g.length;a<s;a+=1){for(m[o=g[a]]=r.map(p),b.push(this.getTextDimensions(v[a]||o,{scaleFactor:1}).w),c=0,u=(h=m[o]).length;c<u;c+=1)l=h[c],b.push(this.getTextDimensions(l,{scaleFactor:1}).w);y[o]=N.arrayMax(b),b=[]}if(x){var S=this.calculateLineHeight(g,y,v.length?v:g);for(a=0,s=g.length;a<s;a+=1)o=g[a],w.push([t,e,y[o],S,String(v.length?v[a]:o)]);this.setTableHeaderRow(w),this.printHeaderRow(1,!1)}for(a=0,s=r.length;a<s;a+=1)for(f=r[a],S=this.calculateLineHeight(g,y,f),c=0,d=g.length;c<d;c+=1)o=g[c],this.cell(t,e,y[o],S,f[o],a+2,o.align);return this.lastCellPos=P,this.table_x=t,this.table_y=e,this},N.calculateLineHeight=function(t,e,r){for(var n,i=0,o=0;o<t.length;o++){r[n=t[o]]=this.splitTextToSize(String(r[n]),e[n]-3);var a=this.internal.getLineHeight()*r[n].length+3;i<a&&(i=a)}return i},N.setTableHeaderRow=function(t){this.tableHeaderRow=t},N.printHeaderRow=function(t,e){if(!this.tableHeaderRow)throw"Property tableHeaderRow does not exist.";var r,n,i,o;if(this.printingHeaderRow=!0,void 0!==u){var a=u(this,E);f(a[0],a[1],a[2],a[3],-1)}this.setFontStyle("bold");var s=[];for(i=0,o=this.tableHeaderRow.length;i<o;i+=1)this.setFillColor(200,200,200),r=this.tableHeaderRow[i],e&&(this.margins.top=13,r[1]=this.margins&&this.margins.top||0,s.push(r)),n=[].concat(r),this.cell.apply(this,n.concat(t));0<s.length&&this.setTableHeaderRow(s),this.setFontStyle("normal"),this.printingHeaderRow=!1},function(t){function h(t){return t=t||{},this.isStrokeTransparent=t.isStrokeTransparent||!1,this.strokeOpacity=t.strokeOpacity||1,this.strokeStyle=t.strokeStyle||"#000000",this.fillStyle=t.fillStyle||"#000000",this.isFillTransparent=t.isFillTransparent||!1,this.fillOpacity=t.fillOpacity||1,this.font=t.font||"10px sans-serif",this.textBaseline=t.textBaseline||"alphabetic",this.textAlign=t.textAlign||"left",this.lineWidth=t.lineWidth||1,this.lineJoin=t.lineJoin||"miter",this.lineCap=t.lineCap||"butt",this.path=t.path||[],this.transform=void 0!==t.transform?t.transform.clone():new M,this.globalCompositeOperation=t.globalCompositeOperation||"normal",this.globalAlpha=t.globalAlpha||1,this.clip_path=t.clip_path||[],this.currentPoint=t.currentPoint||new I,this.miterLimit=t.miterLimit||10,this.lastPoint=t.lastPoint||new I,this.ignoreClearRect="boolean"!=typeof t.ignoreClearRect||t.ignoreClearRect,this}var u,i,o,l,c;t.events.push(["initialized",function(){this.context2d=new e(this),u=this.internal.f2,this.internal.f3,i=this.internal.getCoordinateString,o=this.internal.getVerticalCoordinateString,l=this.internal.getHorizontalCoordinate,c=this.internal.getVerticalCoordinate}]);var e=function(t){Object.defineProperty(this,"canvas",{get:function(){return{parentNode:!1,style:!1}}}),Object.defineProperty(this,"pdf",{get:function(){return t}});var e=!1;Object.defineProperty(this,"pageWrapXEnabled",{get:function(){return e},set:function(t){e=Boolean(t)}});var r=!1;Object.defineProperty(this,"pageWrapYEnabled",{get:function(){return r},set:function(t){r=Boolean(t)}});var n=0;Object.defineProperty(this,"posX",{get:function(){return n},set:function(t){isNaN(t)||(n=t)}});var i=0;Object.defineProperty(this,"posY",{get:function(){return i},set:function(t){isNaN(t)||(i=t)}});var o=!1;Object.defineProperty(this,"autoPaging",{get:function(){return o},set:function(t){o=Boolean(t)}});var a=0;Object.defineProperty(this,"lastBreak",{get:function(){return a},set:function(t){a=t}});var s=[];Object.defineProperty(this,"pageBreaks",{get:function(){return s},set:function(t){s=t}});var u=new h;Object.defineProperty(this,"ctx",{get:function(){return u},set:function(t){t instanceof h&&(u=t)}}),Object.defineProperty(this,"path",{get:function(){return u.path},set:function(t){u.path=t}});var l=[];Object.defineProperty(this,"ctxStack",{get:function(){return l},set:function(t){l=t}}),Object.defineProperty(this,"fillStyle",{get:function(){return this.ctx.fillStyle},set:function(t){var e;e=f(t),this.ctx.fillStyle=e.style,this.ctx.isFillTransparent=0===e.a,this.ctx.fillOpacity=e.a,this.pdf.setFillColor(e.r,e.g,e.b,{a:e.a}),this.pdf.setTextColor(e.r,e.g,e.b,{a:e.a})}}),Object.defineProperty(this,"strokeStyle",{get:function(){return this.ctx.strokeStyle},set:function(t){var e=f(t);this.ctx.strokeStyle=e.style,this.ctx.isStrokeTransparent=0===e.a,this.ctx.strokeOpacity=e.a,0===e.a?this.pdf.setDrawColor(255,255,255):(e.a,this.pdf.setDrawColor(e.r,e.g,e.b))}}),Object.defineProperty(this,"lineCap",{get:function(){return this.ctx.lineCap},set:function(t){-1!==["butt","round","square"].indexOf(t)&&(this.ctx.lineCap=t,this.pdf.setLineCap(t))}}),Object.defineProperty(this,"lineWidth",{get:function(){return this.ctx.lineWidth},set:function(t){isNaN(t)||(this.ctx.lineWidth=t,this.pdf.setLineWidth(t))}}),Object.defineProperty(this,"lineJoin",{get:function(){return this.ctx.lineJoin},set:function(t){-1!==["bevel","round","miter"].indexOf(t)&&(this.ctx.lineJoin=t,this.pdf.setLineJoin(t))}}),Object.defineProperty(this,"miterLimit",{get:function(){return this.ctx.miterLimit},set:function(t){isNaN(t)||(this.ctx.miterLimit=t,this.pdf.setMiterLimit(t))}}),Object.defineProperty(this,"textBaseline",{get:function(){return this.ctx.textBaseline},set:function(t){this.ctx.textBaseline=t}}),Object.defineProperty(this,"textAlign",{get:function(){return this.ctx.textAlign},set:function(t){-1!==["right","end","center","left","start"].indexOf(t)&&(this.ctx.textAlign=t)}}),Object.defineProperty(this,"font",{get:function(){return this.ctx.font},set:function(t){var e;if(this.ctx.font=t,null!==(e=/^\s*(?=(?:(?:[-a-z]+\s*){0,2}(italic|oblique))?)(?=(?:(?:[-a-z]+\s*){0,2}(small-caps))?)(?=(?:(?:[-a-z]+\s*){0,2}(bold(?:er)?|lighter|[1-9]00))?)(?:(?:normal|\1|\2|\3)\s*){0,3}((?:xx?-)?(?:small|large)|medium|smaller|larger|[.\d]+(?:\%|in|[cem]m|ex|p[ctx]))(?:\s*\/\s*(normal|[.\d]+(?:\%|in|[cem]m|ex|p[ctx])))?\s*([-_,\"\'\sa-z]+?)\s*$/i.exec(t))){var r=e[1],n=(e[2],e[3]),i=e[4],o=e[5],a=e[6];i="px"!==o&&"em"===o?Math.floor(parseFloat(i)*this.pdf.getFontSize()):Math.floor(parseFloat(i)),this.pdf.setFontSize(i);var s="";("bold"===n||700<=parseInt(n,10)||"bold"===r)&&(s="bold"),"italic"===r&&(s+="italic"),0===s.length&&(s="normal");for(var u="",l=a.toLowerCase().replace(/"|'/g,"").split(/\s*,\s*/),h={arial:"Helvetica",verdana:"Helvetica",helvetica:"Helvetica","sans-serif":"Helvetica",fixed:"Courier",monospace:"Courier",terminal:"Courier",courier:"Courier",times:"Times",cursive:"Times",fantasy:"Times",serif:"Times"},c=0;c<l.length;c++){if(void 0!==this.pdf.internal.getFont(l[c],s,{noFallback:!0,disableWarning:!0})){u=l[c];break}if("bolditalic"===s&&void 0!==this.pdf.internal.getFont(l[c],"bold",{noFallback:!0,disableWarning:!0}))u=l[c],s="bold";else if(void 0!==this.pdf.internal.getFont(l[c],"normal",{noFallback:!0,disableWarning:!0})){u=l[c],s="normal";break}}if(""===u)for(c=0;c<l.length;c++)if(h[l[c]]){u=h[l[c]];break}u=""===u?"Times":u,this.pdf.setFont(u,s)}}}),Object.defineProperty(this,"globalCompositeOperation",{get:function(){return this.ctx.globalCompositeOperation},set:function(t){this.ctx.globalCompositeOperation=t}}),Object.defineProperty(this,"globalAlpha",{get:function(){return this.ctx.globalAlpha},set:function(t){this.ctx.globalAlpha=t}}),Object.defineProperty(this,"ignoreClearRect",{get:function(){return this.ctx.ignoreClearRect},set:function(t){this.ctx.ignoreClearRect=Boolean(t)}})};e.prototype.fill=function(){r.call(this,"fill",!1)},e.prototype.stroke=function(){r.call(this,"stroke",!1)},e.prototype.beginPath=function(){this.path=[{type:"begin"}]},e.prototype.moveTo=function(t,e){if(isNaN(t)||isNaN(e))throw console.error("jsPDF.context2d.moveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.moveTo");var r=this.ctx.transform.applyToPoint(new I(t,e));this.path.push({type:"mt",x:r.x,y:r.y}),this.ctx.lastPoint=new I(t,e)},e.prototype.closePath=function(){var t=new I(0,0),e=0;for(e=this.path.length-1;-1!==e;e--)if("begin"===this.path[e].type&&"object"===ne(this.path[e+1])&&"number"==typeof this.path[e+1].x){t=new I(this.path[e+1].x,this.path[e+1].y),this.path.push({type:"lt",x:t.x,y:t.y});break}"object"===ne(this.path[e+2])&&"number"==typeof this.path[e+2].x&&this.path.push(JSON.parse(JSON.stringify(this.path[e+2]))),this.path.push({type:"close"}),this.ctx.lastPoint=new I(t.x,t.y)},e.prototype.lineTo=function(t,e){if(isNaN(t)||isNaN(e))throw console.error("jsPDF.context2d.lineTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.lineTo");var r=this.ctx.transform.applyToPoint(new I(t,e));this.path.push({type:"lt",x:r.x,y:r.y}),this.ctx.lastPoint=new I(r.x,r.y)},e.prototype.clip=function(){this.ctx.clip_path=JSON.parse(JSON.stringify(this.path)),r.call(this,null,!0)},e.prototype.quadraticCurveTo=function(t,e,r,n){if(isNaN(r)||isNaN(n)||isNaN(t)||isNaN(e))throw console.error("jsPDF.context2d.quadraticCurveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.quadraticCurveTo");var i=this.ctx.transform.applyToPoint(new I(r,n)),o=this.ctx.transform.applyToPoint(new I(t,e));this.path.push({type:"qct",x1:o.x,y1:o.y,x:i.x,y:i.y}),this.ctx.lastPoint=new I(i.x,i.y)},e.prototype.bezierCurveTo=function(t,e,r,n,i,o){if(isNaN(i)||isNaN(o)||isNaN(t)||isNaN(e)||isNaN(r)||isNaN(n))throw console.error("jsPDF.context2d.bezierCurveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.bezierCurveTo");var a=this.ctx.transform.applyToPoint(new I(i,o)),s=this.ctx.transform.applyToPoint(new I(t,e)),u=this.ctx.transform.applyToPoint(new I(r,n));this.path.push({type:"bct",x1:s.x,y1:s.y,x2:u.x,y2:u.y,x:a.x,y:a.y}),this.ctx.lastPoint=new I(a.x,a.y)},e.prototype.arc=function(t,e,r,n,i,o){if(isNaN(t)||isNaN(e)||isNaN(r)||isNaN(n)||isNaN(i))throw console.error("jsPDF.context2d.arc: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.arc");if(o=Boolean(o),!this.ctx.transform.isIdentity){var a=this.ctx.transform.applyToPoint(new I(t,e));t=a.x,e=a.y;var s=this.ctx.transform.applyToPoint(new I(0,r)),u=this.ctx.transform.applyToPoint(new I(0,0));r=Math.sqrt(Math.pow(s.x-u.x,2)+Math.pow(s.y-u.y,2))}Math.abs(i-n)>=2*Math.PI&&(n=0,i=2*Math.PI),this.path.push({type:"arc",x:t,y:e,radius:r,startAngle:n,endAngle:i,counterclockwise:o})},e.prototype.arcTo=function(t,e,r,n,i){throw new Error("arcTo not implemented.")},e.prototype.rect=function(t,e,r,n){if(isNaN(t)||isNaN(e)||isNaN(r)||isNaN(n))throw console.error("jsPDF.context2d.rect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.rect");this.moveTo(t,e),this.lineTo(t+r,e),this.lineTo(t+r,e+n),this.lineTo(t,e+n),this.lineTo(t,e),this.lineTo(t+r,e),this.lineTo(t,e)},e.prototype.fillRect=function(t,e,r,n){if(isNaN(t)||isNaN(e)||isNaN(r)||isNaN(n))throw console.error("jsPDF.context2d.fillRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.fillRect");if(!x.call(this)){var i={};"butt"!==this.lineCap&&(i.lineCap=this.lineCap,this.lineCap="butt"),"miter"!==this.lineJoin&&(i.lineJoin=this.lineJoin,this.lineJoin="miter"),this.beginPath(),this.rect(t,e,r,n),this.fill(),i.hasOwnProperty("lineCap")&&(this.lineCap=i.lineCap),i.hasOwnProperty("lineJoin")&&(this.lineJoin=i.lineJoin)}},e.prototype.strokeRect=function(t,e,r,n){if(isNaN(t)||isNaN(e)||isNaN(r)||isNaN(n))throw console.error("jsPDF.context2d.strokeRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.strokeRect");A.call(this)||(this.beginPath(),this.rect(t,e,r,n),this.stroke())},e.prototype.clearRect=function(t,e,r,n){if(isNaN(t)||isNaN(e)||isNaN(r)||isNaN(n))throw console.error("jsPDF.context2d.clearRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.clearRect");this.ignoreClearRect||(this.fillStyle="#ffffff",this.fillRect(t,e,r,n))},e.prototype.save=function(t){t="boolean"!=typeof t||t;for(var e=this.pdf.internal.getCurrentPageInfo().pageNumber,r=0;r<this.pdf.internal.getNumberOfPages();r++)this.pdf.setPage(r+1),this.pdf.internal.out("q");if(this.pdf.setPage(e),t){this.ctx.fontSize=this.pdf.internal.getFontSize();var n=new h(this.ctx);this.ctxStack.push(this.ctx),this.ctx=n}},e.prototype.restore=function(t){t="boolean"!=typeof t||t;for(var e=this.pdf.internal.getCurrentPageInfo().pageNumber,r=0;r<this.pdf.internal.getNumberOfPages();r++)this.pdf.setPage(r+1),this.pdf.internal.out("Q");this.pdf.setPage(e),t&&0!==this.ctxStack.length&&(this.ctx=this.ctxStack.pop(),this.fillStyle=this.ctx.fillStyle,this.strokeStyle=this.ctx.strokeStyle,this.font=this.ctx.font,this.lineCap=this.ctx.lineCap,this.lineWidth=this.ctx.lineWidth,this.lineJoin=this.ctx.lineJoin)},e.prototype.toDataURL=function(){throw new Error("toDataUrl not implemented.")};var f=function(t){var e,r,n,i;if(!0===t.isCanvasGradient&&(t=t.getColor()),!t)return{r:0,g:0,b:0,a:0,style:t};if(/transparent|rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*0+\s*\)/.test(t))i=n=r=e=0;else{var o=/rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/.exec(t);if(null!==o)e=parseInt(o[1]),r=parseInt(o[2]),n=parseInt(o[3]),i=1;else if(null!==(o=/rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d\.]+)\s*\)/.exec(t)))e=parseInt(o[1]),r=parseInt(o[2]),n=parseInt(o[3]),i=parseFloat(o[4]);else{if(i=1,"string"==typeof t&&"#"!==t.charAt(0)){var a=new RGBColor(t);t=a.ok?a.toHex():"#000000"}4===t.length?(e=t.substring(1,2),e+=e,r=t.substring(2,3),r+=r,n=t.substring(3,4),n+=n):(e=t.substring(1,3),r=t.substring(3,5),n=t.substring(5,7)),e=parseInt(e,16),r=parseInt(r,16),n=parseInt(n,16)}}return{r:e,g:r,b:n,a:i,style:t}},x=function(){return this.ctx.isFillTransparent||0==this.globalAlpha},A=function(){return Boolean(this.ctx.isStrokeTransparent||0==this.globalAlpha)};e.prototype.fillText=function(t,e,r,n){if(isNaN(e)||isNaN(r)||"string"!=typeof t)throw console.error("jsPDF.context2d.fillText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.fillText");if(n=isNaN(n)?void 0:n,!x.call(this)){r=a.call(this,r);var i=O(this.ctx.transform.rotation),o=this.ctx.transform.scaleX;s.call(this,{text:t,x:e,y:r,scale:o,angle:i,align:this.textAlign,maxWidth:n})}},e.prototype.strokeText=function(t,e,r,n){if(isNaN(e)||isNaN(r)||"string"!=typeof t)throw console.error("jsPDF.context2d.strokeText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.strokeText");if(!A.call(this)){n=isNaN(n)?void 0:n,r=a.call(this,r);var i=O(this.ctx.transform.rotation),o=this.ctx.transform.scaleX;s.call(this,{text:t,x:e,y:r,scale:o,renderingMode:"stroke",angle:i,align:this.textAlign,maxWidth:n})}},e.prototype.measureText=function(t){if("string"!=typeof t)throw console.error("jsPDF.context2d.measureText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.measureText");var e=this.pdf,r=this.pdf.internal.scaleFactor,n=e.internal.getFontSize(),i=e.getStringUnitWidth(t)*n/e.internal.scaleFactor;return new function(t){var e=(t=t||{}).width||0;return Object.defineProperty(this,"width",{get:function(){return e}}),this}({width:i*=Math.round(96*r/72*1e4)/1e4})},e.prototype.scale=function(t,e){if(isNaN(t)||isNaN(e))throw console.error("jsPDF.context2d.scale: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.scale");var r=new M(t,0,0,e,0,0);this.ctx.transform=this.ctx.transform.multiply(r)},e.prototype.rotate=function(t){if(isNaN(t))throw console.error("jsPDF.context2d.rotate: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.rotate");var e=new M(Math.cos(t),Math.sin(t),-Math.sin(t),Math.cos(t),0,0);this.ctx.transform=this.ctx.transform.multiply(e)},e.prototype.translate=function(t,e){if(isNaN(t)||isNaN(e))throw console.error("jsPDF.context2d.translate: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.translate");var r=new M(1,0,0,1,t,e);this.ctx.transform=this.ctx.transform.multiply(r)},e.prototype.transform=function(t,e,r,n,i,o){if(isNaN(t)||isNaN(e)||isNaN(r)||isNaN(n)||isNaN(i)||isNaN(o))throw console.error("jsPDF.context2d.transform: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.transform");var a=new M(t,e,r,n,i,o);this.ctx.transform=this.ctx.transform.multiply(a)},e.prototype.setTransform=function(t,e,r,n,i,o){t=isNaN(t)?1:t,e=isNaN(e)?0:e,r=isNaN(r)?0:r,n=isNaN(n)?1:n,i=isNaN(i)?0:i,o=isNaN(o)?0:o,this.ctx.transform=new M(t,e,r,n,i,o)},e.prototype.drawImage=function(t,e,r,n,i,o,a,s,u){var l=this.pdf.getImageProperties(t),h=1,c=1,f=1,d=1;void 0!==n&&void 0!==s&&(f=s/n,d=u/i,h=l.width/n*s/n,c=l.height/i*u/i),void 0===o&&(o=e,a=r,r=e=0),void 0!==n&&void 0===s&&(s=n,u=i),void 0===n&&void 0===s&&(s=l.width,u=l.height);var p=this.ctx.transform.decompose(),g=O(p.rotate.shx);p.scale.sx,p.scale.sy;for(var v,m=new M,y=((m=(m=(m=m.multiply(p.translate)).multiply(p.skew)).multiply(p.scale)).applyToPoint(new I(s,u)),m.applyToRectangle(new B(o-e*f,a-r*d,n*h,i*c))),b=P.call(this,y),w=[],_=0;_<b.length;_+=1)-1===w.indexOf(b[_])&&w.push(b[_]);if(w.sort(),this.autoPaging)for(var x=w[0],A=w[w.length-1],L=x;L<A+1;L++){if(this.pdf.setPage(L),0!==this.ctx.clip_path.length){var S=this.path;v=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=E(v,this.posX,-1*this.pdf.internal.pageSize.height*(L-1)+this.posY),k.call(this,"fill",!0),this.path=S}var N=JSON.parse(JSON.stringify(y));N=E([N],this.posX,-1*this.pdf.internal.pageSize.height*(L-1)+this.posY)[0],this.pdf.addImage(t,"jpg",N.x,N.y,N.w,N.h,null,null,g)}else this.pdf.addImage(t,"jpg",y.x,y.y,y.w,y.h,null,null,g)};var P=function(t,e,r){var n=[];switch(e=e||this.pdf.internal.pageSize.width,r=r||this.pdf.internal.pageSize.height,t.type){default:case"mt":case"lt":n.push(Math.floor((t.y+this.posY)/r)+1);break;case"arc":n.push(Math.floor((t.y+this.posY-t.radius)/r)+1),n.push(Math.floor((t.y+this.posY+t.radius)/r)+1);break;case"qct":var i=b(this.ctx.lastPoint.x,this.ctx.lastPoint.y,t.x1,t.y1,t.x,t.y);n.push(Math.floor(i.y/r)+1),n.push(Math.floor((i.y+i.h)/r)+1);break;case"bct":var o=w(this.ctx.lastPoint.x,this.ctx.lastPoint.y,t.x1,t.y1,t.x2,t.y2,t.x,t.y);n.push(Math.floor(o.y/r)+1),n.push(Math.floor((o.y+o.h)/r)+1);break;case"rect":n.push(Math.floor((t.y+this.posY)/r)+1),n.push(Math.floor((t.y+t.h+this.posY)/r)+1)}for(var a=0;a<n.length;a+=1)for(;this.pdf.internal.getNumberOfPages()<n[a];)y.call(this);return n},y=function(){var t=this.fillStyle,e=this.strokeStyle,r=this.font,n=this.lineCap,i=this.lineWidth,o=this.lineJoin;this.pdf.addPage(),this.fillStyle=t,this.strokeStyle=e,this.font=r,this.lineCap=n,this.lineWidth=i,this.lineJoin=o},E=function(t,e,r){for(var n=0;n<t.length;n++)switch(t[n].type){case"bct":t[n].x2+=e,t[n].y2+=r;case"qct":t[n].x1+=e,t[n].y1+=r;case"mt":case"lt":case"arc":default:t[n].x+=e,t[n].y+=r}return t},r=function(t,e){for(var r,n,i=this.fillStyle,o=this.strokeStyle,a=(this.font,this.lineCap),s=this.lineWidth,u=this.lineJoin,l=JSON.parse(JSON.stringify(this.path)),h=JSON.parse(JSON.stringify(this.path)),c=[],f=0;f<h.length;f++)if(void 0!==h[f].x)for(var d=P.call(this,h[f]),p=0;p<d.length;p+=1)-1===c.indexOf(d[p])&&c.push(d[p]);for(f=0;f<c.length;f++)for(;this.pdf.internal.getNumberOfPages()<c[f];)y.call(this);if(c.sort(),this.autoPaging){var g=c[0],v=c[c.length-1];for(f=g;f<v+1;f++){if(this.pdf.setPage(f),this.fillStyle=i,this.strokeStyle=o,this.lineCap=a,this.lineWidth=s,this.lineJoin=u,0!==this.ctx.clip_path.length){var m=this.path;r=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=E(r,this.posX,-1*this.pdf.internal.pageSize.height*(f-1)+this.posY),k.call(this,t,!0),this.path=m}n=JSON.parse(JSON.stringify(l)),this.path=E(n,this.posX,-1*this.pdf.internal.pageSize.height*(f-1)+this.posY),!1!==e&&0!==f||k.call(this,t,e)}}else k.call(this,t,e);this.path=l},k=function(t,e){if(("stroke"!==t||e||!A.call(this))&&("stroke"===t||e||!x.call(this))){var r=[];this.ctx.globalAlpha,this.ctx.fillOpacity<1&&this.ctx.fillOpacity;for(var n,i=this.path,o=0;o<i.length;o++){var a=i[o];switch(a.type){case"begin":r.push({begin:!0});break;case"close":r.push({close:!0});break;case"mt":r.push({start:a,deltas:[],abs:[]});break;case"lt":var s=r.length;if(!isNaN(i[o-1].x)){var u=[a.x-i[o-1].x,a.y-i[o-1].y];if(0<s)for(;0<=s;s--)if(!0!==r[s-1].close&&!0!==r[s-1].begin){r[s-1].deltas.push(u),r[s-1].abs.push(a);break}}break;case"bct":u=[a.x1-i[o-1].x,a.y1-i[o-1].y,a.x2-i[o-1].x,a.y2-i[o-1].y,a.x-i[o-1].x,a.y-i[o-1].y],r[r.length-1].deltas.push(u);break;case"qct":var l=i[o-1].x+2/3*(a.x1-i[o-1].x),h=i[o-1].y+2/3*(a.y1-i[o-1].y),c=a.x+2/3*(a.x1-a.x),f=a.y+2/3*(a.y1-a.y),d=a.x,p=a.y;u=[l-i[o-1].x,h-i[o-1].y,c-i[o-1].x,f-i[o-1].y,d-i[o-1].x,p-i[o-1].y],r[r.length-1].deltas.push(u);break;case"arc":r.push({deltas:[],abs:[],arc:!0}),Array.isArray(r[r.length-1].abs)&&r[r.length-1].abs.push(a)}}for(n=e?null:"stroke"===t?"stroke":"fill",o=0;o<r.length;o++){if(r[o].arc)for(var g=r[o].abs,v=0;v<g.length;v++){var m=g[v];if(void 0!==m.startAngle){var y=O(m.startAngle),b=O(m.endAngle),w=m.x,_=m.y;L.call(this,w,_,m.radius,y,b,m.counterclockwise,n,e)}else C.call(this,m.x,m.y)}r[o].arc||!0===r[o].close||!0===r[o].begin||(w=r[o].start.x,_=r[o].start.y,T.call(this,r[o].deltas,w,_,null,null))}n&&S.call(this,n),e&&N.call(this)}},a=function(t){var e=this.pdf.internal.getFontSize()/this.pdf.internal.scaleFactor,r=e*(this.pdf.internal.getLineHeightFactor()-1);switch(this.ctx.textBaseline){case"bottom":return t-r;case"top":return t+e-r;case"hanging":return t+e-2*r;case"middle":return t+e/2-r;case"ideographic":return t;case"alphabetic":default:return t}};e.prototype.createLinearGradient=function(){function t(){}return t.colorStops=[],t.addColorStop=function(t,e){this.colorStops.push([t,e])},t.getColor=function(){return 0===this.colorStops.length?"#000000":this.colorStops[0][1]},t.isCanvasGradient=!0,t},e.prototype.createPattern=function(){return this.createLinearGradient()},e.prototype.createRadialGradient=function(){return this.createLinearGradient()};var L=function(t,e,r,n,i,o,a,s){this.pdf.internal.scaleFactor;for(var u=m(n),l=m(i),h=g.call(this,r,u,l,o),c=0;c<h.length;c++){var f=h[c];0===c&&d.call(this,f.x1+t,f.y1+e),p.call(this,t,e,f.x2,f.y2,f.x3,f.y3,f.x4,f.y4)}s?N.call(this):S.call(this,a)},S=function(t){switch(t){case"stroke":this.pdf.internal.out("S");break;case"fill":this.pdf.internal.out("f")}},N=function(){this.pdf.clip()},d=function(t,e){this.pdf.internal.out(i(t)+" "+o(e)+" m")},s=function(t){var e;switch(t.align){case"right":case"end":e="right";break;case"center":e="center";break;case"left":case"start":default:e="left"}var r=this.ctx.transform.applyToPoint(new I(t.x,t.y)),n=this.ctx.transform.decompose(),i=new M;i=(i=(i=i.multiply(n.translate)).multiply(n.skew)).multiply(n.scale);for(var o,a=this.pdf.getTextDimensions(t.text),s=this.ctx.transform.applyToRectangle(new B(t.x,t.y,a.w,a.h)),u=i.applyToRectangle(new B(t.x,t.y-a.h,a.w,a.h)),l=P.call(this,u),h=[],c=0;c<l.length;c+=1)-1===h.indexOf(l[c])&&h.push(l[c]);if(h.sort(),!0===this.autoPaging)for(var f=h[0],d=h[h.length-1],p=f;p<d+1;p++){if(this.pdf.setPage(p),0!==this.ctx.clip_path.length){var g=this.path;o=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=E(o,this.posX,-1*this.pdf.internal.pageSize.height*(p-1)+this.posY),k.call(this,"fill",!0),this.path=g}var v=JSON.parse(JSON.stringify(s));if(v=E([v],this.posX,-1*this.pdf.internal.pageSize.height*(p-1)+this.posY)[0],.01<=t.scale){var m=this.pdf.internal.getFontSize();this.pdf.setFontSize(m*t.scale)}this.pdf.text(t.text,v.x,v.y,{angle:t.angle,align:e,renderingMode:t.renderingMode,maxWidth:t.maxWidth}),.01<=t.scale&&this.pdf.setFontSize(m)}else.01<=t.scale&&(m=this.pdf.internal.getFontSize(),this.pdf.setFontSize(m*t.scale)),this.pdf.text(t.text,r.x+this.posX,r.y+this.posY,{angle:t.angle,align:e,renderingMode:t.renderingMode,maxWidth:t.maxWidth}),.01<=t.scale&&this.pdf.setFontSize(m)},C=function(t,e,r,n){r=r||0,n=n||0,this.pdf.internal.out(i(t+r)+" "+o(e+n)+" l")},T=function(t,e,r){return this.pdf.lines(t,e,r,null,null)},p=function(t,e,r,n,i,o,a,s){this.pdf.internal.out([u(l(r+t)),u(c(n+e)),u(l(i+t)),u(c(o+e)),u(l(a+t)),u(c(s+e)),"c"].join(" "))},g=function(t,e,r,n){var i=2*Math.PI,o=e;(o<i||i<o)&&(o%=i);var a=r;(a<i||i<a)&&(a%=i);for(var s=[],u=Math.PI/2,l=n?-1:1,h=e,c=Math.min(i,Math.abs(a-o));1e-5<c;){var f=h+l*Math.min(c,u);s.push(v.call(this,t,h,f)),c-=Math.abs(f-h),h=f}return s},v=function(t,e,r){var n=(r-e)/2,i=t*Math.cos(n),o=t*Math.sin(n),a=i,s=-o,u=a*a+s*s,l=u+a*i+s*o,h=4/3*(Math.sqrt(2*u*l)-l)/(a*o-s*i),c=a-h*s,f=s+h*a,d=c,p=-f,g=n+e,v=Math.cos(g),m=Math.sin(g);return{x1:t*Math.cos(e),y1:t*Math.sin(e),x2:c*v-f*m,y2:c*m+f*v,x3:d*v-p*m,y3:d*m+p*v,x4:t*Math.cos(r),y4:t*Math.sin(r)}},O=function(t){return 180*t/Math.PI},m=function(t){return t*Math.PI/180},b=function(t,e,r,n,i,o){var a=t+.5*(r-t),s=e+.5*(n-e),u=i+.5*(r-i),l=o+.5*(n-o),h=Math.min(t,i,a,u),c=Math.max(t,i,a,u),f=Math.min(e,o,s,l),d=Math.max(e,o,s,l);return new B(h,f,c-h,d-f)},w=function(t,e,r,n,i,o,a,s){for(var u,l,h,c,f,d,p,g,v,m,y,b,w,_=r-t,x=n-e,A=i-r,L=o-n,S=a-i,N=s-o,P=0;P<41;P++)g=(d=(l=t+(u=P/40)*_)+u*((c=r+u*A)-l))+u*(c+u*(i+u*S-c)-d),v=(p=(h=e+u*x)+u*((f=n+u*L)-h))+u*(f+u*(o+u*N-f)-p),w=0==P?(b=m=g,y=v):(m=Math.min(m,g),y=Math.min(y,v),b=Math.max(b,g),Math.max(w,v));return new B(Math.round(m),Math.round(y),Math.round(b-m),Math.round(w-y))},I=function(t,e){var r=t||0;Object.defineProperty(this,"x",{enumerable:!0,get:function(){return r},set:function(t){isNaN(t)||(r=parseFloat(t))}});var n=e||0;Object.defineProperty(this,"y",{enumerable:!0,get:function(){return n},set:function(t){isNaN(t)||(n=parseFloat(t))}});var i="pt";return Object.defineProperty(this,"type",{enumerable:!0,get:function(){return i},set:function(t){i=t.toString()}}),this},B=function(t,e,r,n){I.call(this,t,e),this.type="rect";var i=r||0;Object.defineProperty(this,"w",{enumerable:!0,get:function(){return i},set:function(t){isNaN(t)||(i=parseFloat(t))}});var o=n||0;return Object.defineProperty(this,"h",{enumerable:!0,get:function(){return o},set:function(t){isNaN(t)||(o=parseFloat(t))}}),this},M=function(t,e,r,n,i,o){var a=[];return Object.defineProperty(this,"sx",{get:function(){return a[0]},set:function(t){a[0]=Math.round(1e5*t)/1e5}}),Object.defineProperty(this,"shy",{get:function(){return a[1]},set:function(t){a[1]=Math.round(1e5*t)/1e5}}),Object.defineProperty(this,"shx",{get:function(){return a[2]},set:function(t){a[2]=Math.round(1e5*t)/1e5}}),Object.defineProperty(this,"sy",{get:function(){return a[3]},set:function(t){a[3]=Math.round(1e5*t)/1e5}}),Object.defineProperty(this,"tx",{get:function(){return a[4]},set:function(t){a[4]=Math.round(1e5*t)/1e5}}),Object.defineProperty(this,"ty",{get:function(){return a[5]},set:function(t){a[5]=Math.round(1e5*t)/1e5}}),Object.defineProperty(this,"rotation",{get:function(){return Math.atan2(this.shx,this.sx)}}),Object.defineProperty(this,"scaleX",{get:function(){return this.decompose().scale.sx}}),Object.defineProperty(this,"scaleY",{get:function(){return this.decompose().scale.sy}}),Object.defineProperty(this,"isIdentity",{get:function(){return 1===this.sx&&0===this.shy&&0===this.shx&&1===this.sy&&0===this.tx&&0===this.ty}}),this.sx=isNaN(t)?1:t,this.shy=isNaN(e)?0:e,this.shx=isNaN(r)?0:r,this.sy=isNaN(n)?1:n,this.tx=isNaN(i)?0:i,this.ty=isNaN(o)?0:o,this};M.prototype.multiply=function(t){var e=t.sx*this.sx+t.shy*this.shx,r=t.sx*this.shy+t.shy*this.sy,n=t.shx*this.sx+t.sy*this.shx,i=t.shx*this.shy+t.sy*this.sy,o=t.tx*this.sx+t.ty*this.shx+this.tx,a=t.tx*this.shy+t.ty*this.sy+this.ty;return new M(e,r,n,i,o,a)},M.prototype.decompose=function(){var t=this.sx,e=this.shy,r=this.shx,n=this.sy,i=this.tx,o=this.ty,a=Math.sqrt(t*t+e*e),s=(t/=a)*r+(e/=a)*n;r-=t*s,n-=e*s;var u=Math.sqrt(r*r+n*n);return s/=u,t*(n/=u)<e*(r/=u)&&(t=-t,e=-e,s=-s,a=-a),{scale:new M(a,0,0,u,0,0),translate:new M(1,0,0,1,i,o),rotate:new M(t,e,-e,t,0,0),skew:new M(1,0,s,1,0,0)}},M.prototype.applyToPoint=function(t){var e=t.x*this.sx+t.y*this.shx+this.tx,r=t.x*this.shy+t.y*this.sy+this.ty;return new I(e,r)},M.prototype.applyToRectangle=function(t){var e=this.applyToPoint(t),r=this.applyToPoint(new I(t.x+t.w,t.y+t.h));return new B(e.x,e.y,r.x-e.x,r.y-e.y)},M.prototype.clone=function(){var t=this.sx,e=this.shy,r=this.shx,n=this.sy,i=this.tx,o=this.ty;return new M(t,e,r,n,i,o)}}(st.API,"undefined"!=typeof self&&self||"undefined"!=typeof window&&window||void 0!==Ct&&Ct||Function('return typeof this === "object" && this.content')()||Function("return this")()),a=st.API,o=function(t){var r,e,n,i,o,a,s,u,l,h;for(/[^\x00-\xFF]/.test(t),e=[],n=0,i=(t+=r="\0\0\0\0".slice(t.length%4||4)).length;n<i;n+=4)0!==(o=(t.charCodeAt(n)<<24)+(t.charCodeAt(n+1)<<16)+(t.charCodeAt(n+2)<<8)+t.charCodeAt(n+3))?(a=(o=((o=((o=((o=(o-(h=o%85))/85)-(l=o%85))/85)-(u=o%85))/85)-(s=o%85))/85)%85,e.push(33+a,33+s,33+u,33+l,33+h)):e.push(122);return function(t){for(var e=r.length;0<e;e--)t.pop()}(e),String.fromCharCode.apply(String,e)+"~>"},s=function(t){var r,e,n,i,o,a=String,s="length",u="charCodeAt";for(t.slice(-2),t=t.slice(0,-2).replace(/\s/g,"").replace("z","!!!!!"),n=[],i=0,o=(t+=r="uuuuu".slice(t[s]%5||5))[s];i<o;i+=5)e=52200625*(t[u](i)-33)+614125*(t[u](i+1)-33)+7225*(t[u](i+2)-33)+85*(t[u](i+3)-33)+(t[u](i+4)-33),n.push(255&e>>24,255&e>>16,255&e>>8,255&e);return function(t){for(var e=r[s];0<e;e--)t.pop()}(n),a.fromCharCode.apply(a,n)},l=function(t){for(var e="",r=0;r<t.length;r+=1)e+=("0"+t.charCodeAt(r).toString(16)).slice(-2);return e+">"},h=function(t){var e=new RegExp(/^([0-9A-Fa-f]{2})+$/);if(-1!==(t=t.replace(/\s/g,"")).indexOf(">")&&(t=t.substr(0,t.indexOf(">"))),t.length%2&&(t+="0"),!1===e.test(t))return"";for(var r="",n=0;n<t.length;n+=2)r+=String.fromCharCode("0x"+(t[n]+t[n+1]));return r},c=function(t,e){e=Object.assign({predictor:1,colors:1,bitsPerComponent:8,columns:1},e);for(var r,n,i=[],o=t.length;o--;)i[o]=t.charCodeAt(o);return r=a.adler32cs.from(t),(n=new Deflater(6)).append(new Uint8Array(i)),t=n.flush(),(i=new Uint8Array(t.length+6)).set(new Uint8Array([120,156])),i.set(t,2),i.set(new Uint8Array([255&r,r>>8&255,r>>16&255,r>>24&255]),t.length+2),String.fromCharCode.apply(null,i)},a.processDataByFilters=function(t,e){var r=0,n=t||"",i=[];for("string"==typeof(e=e||[])&&(e=[e]),r=0;r<e.length;r+=1)switch(e[r]){case"ASCII85Decode":case"/ASCII85Decode":n=s(n),i.push("/ASCII85Encode");break;case"ASCII85Encode":case"/ASCII85Encode":n=o(n),i.push("/ASCII85Decode");break;case"ASCIIHexDecode":case"/ASCIIHexDecode":n=h(n),i.push("/ASCIIHexEncode");break;case"ASCIIHexEncode":case"/ASCIIHexEncode":n=l(n),i.push("/ASCIIHexDecode");break;case"FlateEncode":case"/FlateEncode":n=c(n),i.push("/FlateDecode");break;default:throw'The filter: "'+e[r]+'" is not implemented'}return{data:n,reverseChain:i.reverse().join(" ")}},(n=st.API).loadFile=function(t,e,r){var n;e=e||!0;try{n=function(t,e){function r(t){var e=t.length,r=String.fromCharCode;for(o=0;o<e;o+=1)i.push(r(255&t.charCodeAt(o)));return i.join("")}var n=new XMLHttpRequest,i=[],o=0;if(n.open("GET",t,!e),n.overrideMimeType("text/plain; charset=x-user-defined"),!1===e&&(n.onload=function(){return r(this.responseText)}),n.send(null),200===n.status)return e?r(n.responseText):void 0;console.warn('Unable to load file "'+t+'"')}(t,e)}catch(t){n=void 0}return n},n.loadImageFile=n.loadFile,i=st.API,d="undefined"!=typeof window&&window||void 0!==Ct&&Ct,p=function(t){var e=ne(t);return"undefined"===e?"undefined":"string"===e||t instanceof String?"string":"number"===e||t instanceof Number?"number":"function"===e||t instanceof Function?"function":t&&t.constructor===Array?"array":t&&1===t.nodeType?"element":"object"===e?"object":"unknown"},g=function(t,e){var r=document.createElement(t);if(e.className&&(r.className=e.className),e.innerHTML){r.innerHTML=e.innerHTML;for(var n=r.getElementsByTagName("script"),i=n.length;0<i--;)n[i].parentNode.removeChild(n[i])}for(var o in e.style)r.style[o]=e.style[o];return r},(((v=function t(e){var r=Object.assign(t.convert(Promise.resolve()),JSON.parse(JSON.stringify(t.template))),n=t.convert(Promise.resolve(),r);return(n=n.setProgress(1,t,1,[t])).set(e)}).prototype=Object.create(Promise.prototype)).constructor=v).convert=function(t,e){return t.__proto__=e||v.prototype,t},v.template={prop:{src:null,container:null,overlay:null,canvas:null,img:null,pdf:null,pageSize:null,callback:function(){}},progress:{val:0,state:null,n:0,stack:[]},opt:{filename:"file.pdf",margin:[0,0,0,0],enableLinks:!0,x:0,y:0,html2canvas:{},jsPDF:{}}},v.prototype.from=function(t,e){return this.then(function(){switch(e=e||function(t){switch(p(t)){case"string":return"string";case"element":return"canvas"===t.nodeName.toLowerCase?"canvas":"element";default:return"unknown"}}(t)){case"string":return this.set({src:g("div",{innerHTML:t})});case"element":return this.set({src:t});case"canvas":return this.set({canvas:t});case"img":return this.set({img:t});default:return this.error("Unknown source type.")}})},v.prototype.to=function(t){switch(t){case"container":return this.toContainer();case"canvas":return this.toCanvas();case"img":return this.toImg();case"pdf":return this.toPdf();default:return this.error("Invalid target.")}},v.prototype.toContainer=function(){return this.thenList([function(){return this.prop.src||this.error("Cannot duplicate - no source HTML.")},function(){return this.prop.pageSize||this.setPageSize()}]).then(function(){var t={position:"relative",display:"inline-block",width:Math.max(this.prop.src.clientWidth,this.prop.src.scrollWidth,this.prop.src.offsetWidth)+"px",left:0,right:0,top:0,margin:"auto",backgroundColor:"white"},e=function t(e,r){for(var n=3===e.nodeType?document.createTextNode(e.nodeValue):e.cloneNode(!1),i=e.firstChild;i;i=i.nextSibling)!0!==r&&1===i.nodeType&&"SCRIPT"===i.nodeName||n.appendChild(t(i,r));return 1===e.nodeType&&("CANVAS"===e.nodeName?(n.width=e.width,n.height=e.height,n.getContext("2d").drawImage(e,0,0)):"TEXTAREA"!==e.nodeName&&"SELECT"!==e.nodeName||(n.value=e.value),n.addEventListener("load",function(){n.scrollTop=e.scrollTop,n.scrollLeft=e.scrollLeft},!0)),n}(this.prop.src,this.opt.html2canvas.javascriptEnabled);"BODY"===e.tagName&&(t.height=Math.max(document.body.scrollHeight,document.body.offsetHeight,document.documentElement.clientHeight,document.documentElement.scrollHeight,document.documentElement.offsetHeight)+"px"),this.prop.overlay=g("div",{className:"html2pdf__overlay",style:{position:"fixed",overflow:"hidden",zIndex:1e3,left:"-100000px",right:0,bottom:0,top:0}}),this.prop.container=g("div",{className:"html2pdf__container",style:t}),this.prop.container.appendChild(e),this.prop.container.firstChild.appendChild(g("div",{style:{clear:"both",border:"0 none transparent",margin:0,padding:0,height:0}})),this.prop.container.style.float="none",this.prop.overlay.appendChild(this.prop.container),document.body.appendChild(this.prop.overlay),this.prop.container.firstChild.style.position="relative",this.prop.container.height=Math.max(this.prop.container.firstChild.clientHeight,this.prop.container.firstChild.scrollHeight,this.prop.container.firstChild.offsetHeight)+"px"})},v.prototype.toCanvas=function(){var t=[function(){return document.body.contains(this.prop.container)||this.toContainer()}];return this.thenList(t).then(function(){var t=Object.assign({},this.opt.html2canvas);if(delete t.onrendered,this.isHtml2CanvasLoaded())return html2canvas(this.prop.container,t)}).then(function(t){(this.opt.html2canvas.onrendered||function(){})(t),this.prop.canvas=t,document.body.removeChild(this.prop.overlay)})},v.prototype.toContext2d=function(){var t=[function(){return document.body.contains(this.prop.container)||this.toContainer()}];return this.thenList(t).then(function(){var t=this.opt.jsPDF,e=Object.assign({async:!0,allowTaint:!0,backgroundColor:"#ffffff",imageTimeout:15e3,logging:!0,proxy:null,removeContainer:!0,foreignObjectRendering:!1,useCORS:!1},this.opt.html2canvas);if(delete e.onrendered,t.context2d.autoPaging=!0,t.context2d.posX=this.opt.x,t.context2d.posY=this.opt.y,e.windowHeight=e.windowHeight||0,e.windowHeight=0==e.windowHeight?Math.max(this.prop.container.clientHeight,this.prop.container.scrollHeight,this.prop.container.offsetHeight):e.windowHeight,this.isHtml2CanvasLoaded())return html2canvas(this.prop.container,e)}).then(function(t){(this.opt.html2canvas.onrendered||function(){})(t),this.prop.canvas=t,document.body.removeChild(this.prop.overlay)})},v.prototype.toImg=function(){return this.thenList([function(){return this.prop.canvas||this.toCanvas()}]).then(function(){var t=this.prop.canvas.toDataURL("image/"+this.opt.image.type,this.opt.image.quality);this.prop.img=document.createElement("img"),this.prop.img.src=t})},v.prototype.toPdf=function(){return this.thenList([function(){return this.toContext2d()}]).then(function(){this.prop.pdf=this.prop.pdf||this.opt.jsPDF})},v.prototype.output=function(t,e,r){return"img"===(r=r||"pdf").toLowerCase()||"image"===r.toLowerCase()?this.outputImg(t,e):this.outputPdf(t,e)},v.prototype.outputPdf=function(t,e){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).then(function(){return this.prop.pdf.output(t,e)})},v.prototype.outputImg=function(t,e){return this.thenList([function(){return this.prop.img||this.toImg()}]).then(function(){switch(t){case void 0:case"img":return this.prop.img;case"datauristring":case"dataurlstring":return this.prop.img.src;case"datauri":case"dataurl":return document.location.href=this.prop.img.src;default:throw'Image output type "'+t+'" is not supported.'}})},v.prototype.isHtml2CanvasLoaded=function(){var t=void 0!==d.html2canvas;return t||console.error("html2canvas not loaded."),t},v.prototype.save=function(t){if(this.isHtml2CanvasLoaded())return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).set(t?{filename:t}:null).then(function(){this.prop.pdf.save(this.opt.filename)})},v.prototype.doCallback=function(t){if(this.isHtml2CanvasLoaded())return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).then(function(){this.prop.callback(this.prop.pdf)})},v.prototype.set=function(e){if("object"!==p(e))return this;var t=Object.keys(e||{}).map(function(t){if(t in v.template.prop)return function(){this.prop[t]=e[t]};switch(t){case"margin":return this.setMargin.bind(this,e.margin);case"jsPDF":return function(){return this.opt.jsPDF=e.jsPDF,this.setPageSize()};case"pageSize":return this.setPageSize.bind(this,e.pageSize);default:return function(){this.opt[t]=e[t]}}},this);return this.then(function(){return this.thenList(t)})},v.prototype.get=function(e,r){return this.then(function(){var t=e in v.template.prop?this.prop[e]:this.opt[e];return r?r(t):t})},v.prototype.setMargin=function(t){return this.then(function(){switch(p(t)){case"number":t=[t,t,t,t];case"array":if(2===t.length&&(t=[t[0],t[1],t[0],t[1]]),4===t.length)break;default:return this.error("Invalid margin array.")}this.opt.margin=t}).then(this.setPageSize)},v.prototype.setPageSize=function(t){function e(t,e){return Math.floor(t*e/72*96)}return this.then(function(){(t=t||st.getPageSize(this.opt.jsPDF)).hasOwnProperty("inner")||(t.inner={width:t.width-this.opt.margin[1]-this.opt.margin[3],height:t.height-this.opt.margin[0]-this.opt.margin[2]},t.inner.px={width:e(t.inner.width,t.k),height:e(t.inner.height,t.k)},t.inner.ratio=t.inner.height/t.inner.width),this.prop.pageSize=t})},v.prototype.setProgress=function(t,e,r,n){return null!=t&&(this.progress.val=t),null!=e&&(this.progress.state=e),null!=r&&(this.progress.n=r),null!=n&&(this.progress.stack=n),this.progress.ratio=this.progress.val/this.progress.state,this},v.prototype.updateProgress=function(t,e,r,n){return this.setProgress(t?this.progress.val+t:null,e||null,r?this.progress.n+r:null,n?this.progress.stack.concat(n):null)},v.prototype.then=function(t,e){var r=this;return this.thenCore(t,e,function(e,t){return r.updateProgress(null,null,1,[e]),Promise.prototype.then.call(this,function(t){return r.updateProgress(null,e),t}).then(e,t).then(function(t){return r.updateProgress(1),t})})},v.prototype.thenCore=function(t,e,r){r=r||Promise.prototype.then;t=t&&t.bind(this),e=e&&e.bind(this);var n=-1!==Promise.toString().indexOf("[native code]")&&"Promise"===Promise.name?this:v.convert(Object.assign({},this),Promise.prototype),i=r.call(n,t,e);return v.convert(i,this.__proto__)},v.prototype.thenExternal=function(t,e){return Promise.prototype.then.call(this,t,e)},v.prototype.thenList=function(t){var e=this;return t.forEach(function(t){e=e.thenCore(t)}),e},v.prototype.catch=function(t){t=t&&t.bind(this);var e=Promise.prototype.catch.call(this,t);return v.convert(e,this)},v.prototype.catchExternal=function(t){return Promise.prototype.catch.call(this,t)},v.prototype.error=function(t){return this.then(function(){throw new Error(t)})},v.prototype.using=v.prototype.set,v.prototype.saveAs=v.prototype.save,v.prototype.export=v.prototype.output,v.prototype.run=v.prototype.then,st.getPageSize=function(t,e,r){if("object"===ne(t)){var n=t;t=n.orientation,e=n.unit||e,r=n.format||r}e=e||"mm",r=r||"a4",t=(""+(t||"P")).toLowerCase();var i=(""+r).toLowerCase(),o={a0:[2383.94,3370.39],a1:[1683.78,2383.94],a2:[1190.55,1683.78],a3:[841.89,1190.55],a4:[595.28,841.89],a5:[419.53,595.28],a6:[297.64,419.53],a7:[209.76,297.64],a8:[147.4,209.76],a9:[104.88,147.4],a10:[73.7,104.88],b0:[2834.65,4008.19],b1:[2004.09,2834.65],b2:[1417.32,2004.09],b3:[1000.63,1417.32],b4:[708.66,1000.63],b5:[498.9,708.66],b6:[354.33,498.9],b7:[249.45,354.33],b8:[175.75,249.45],b9:[124.72,175.75],b10:[87.87,124.72],c0:[2599.37,3676.54],c1:[1836.85,2599.37],c2:[1298.27,1836.85],c3:[918.43,1298.27],c4:[649.13,918.43],c5:[459.21,649.13],c6:[323.15,459.21],c7:[229.61,323.15],c8:[161.57,229.61],c9:[113.39,161.57],c10:[79.37,113.39],dl:[311.81,623.62],letter:[612,792],"government-letter":[576,756],legal:[612,1008],"junior-legal":[576,360],ledger:[1224,792],tabloid:[792,1224],"credit-card":[153,243]};switch(e){case"pt":var a=1;break;case"mm":a=72/25.4;break;case"cm":a=72/2.54;break;case"in":a=72;break;case"px":a=.75;break;case"pc":case"em":a=12;break;case"ex":a=6;break;default:throw"Invalid unit: "+e}if(o.hasOwnProperty(i))var s=o[i][1]/a,u=o[i][0]/a;else try{s=r[1],u=r[0]}catch(t){throw new Error("Invalid format: "+r)}if("p"===t||"portrait"===t){if(t="p",s<u){var l=u;u=s,s=l}}else{if("l"!==t&&"landscape"!==t)throw"Invalid orientation: "+t;t="l",u<s&&(l=u,u=s,s=l)}return{width:u,height:s,unit:e,k:a}},i.html=function(t,e){(e=e||{}).callback=e.callback||function(){},e.html2canvas=e.html2canvas||{},e.html2canvas.canvas=e.html2canvas.canvas||this.canvas,e.jsPDF=e.jsPDF||this,e.jsPDF;var r=new v(e);return e.worker?r:r.from(t).doCallback()},st.API.addJS=function(t){return b=t,this.internal.events.subscribe("postPutResources",function(t){m=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/Names [(EmbeddedJS) "+(m+1)+" 0 R]"),this.internal.out(">>"),this.internal.out("endobj"),y=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/S /JavaScript"),this.internal.out("/JS ("+b+")"),this.internal.out(">>"),this.internal.out("endobj")}),this.internal.events.subscribe("putCatalog",function(){void 0!==m&&void 0!==y&&this.internal.out("/Names <</JavaScript "+m+" 0 R>>")}),this},(w=st.API).events.push(["postPutResources",function(){var t=this,e=/^(\d+) 0 obj$/;if(0<this.outline.root.children.length)for(var r=t.outline.render().split(/\r\n/),n=0;n<r.length;n++){var i=r[n],o=e.exec(i);if(null!=o){var a=o[1];t.internal.newObjectDeferredBegin(a,!1)}t.internal.write(i)}if(this.outline.createNamedDestinations){var s=this.internal.pages.length,u=[];for(n=0;n<s;n++){var l=t.internal.newObject();u.push(l);var h=t.internal.getPageInfo(n+1);t.internal.write("<< /D["+h.objId+" 0 R /XYZ null null null]>> endobj")}var c=t.internal.newObject();for(t.internal.write("<< /Names [ "),n=0;n<u.length;n++)t.internal.write("(page_"+(n+1)+")"+u[n]+" 0 R");t.internal.write(" ] >>","endobj"),t.internal.newObject(),t.internal.write("<< /Dests "+c+" 0 R"),t.internal.write(">>","endobj")}}]),w.events.push(["putCatalog",function(){0<this.outline.root.children.length&&(this.internal.write("/Outlines",this.outline.makeRef(this.outline.root)),this.outline.createNamedDestinations&&this.internal.write("/Names "+namesOid+" 0 R"))}]),w.events.push(["initialized",function(){var a=this;a.outline={createNamedDestinations:!1,root:{children:[]}},a.outline.add=function(t,e,r){var n={title:e,options:r,children:[]};return null==t&&(t=this.root),t.children.push(n),n},a.outline.render=function(){return this.ctx={},this.ctx.val="",this.ctx.pdf=a,this.genIds_r(this.root),this.renderRoot(this.root),this.renderItems(this.root),this.ctx.val},a.outline.genIds_r=function(t){t.id=a.internal.newObjectDeferred();for(var e=0;e<t.children.length;e++)this.genIds_r(t.children[e])},a.outline.renderRoot=function(t){this.objStart(t),this.line("/Type /Outlines"),0<t.children.length&&(this.line("/First "+this.makeRef(t.children[0])),this.line("/Last "+this.makeRef(t.children[t.children.length-1]))),this.line("/Count "+this.count_r({count:0},t)),this.objEnd()},a.outline.renderItems=function(t){this.ctx.pdf.internal.getCoordinateString;for(var e=this.ctx.pdf.internal.getVerticalCoordinateString,r=0;r<t.children.length;r++){var n=t.children[r];this.objStart(n),this.line("/Title "+this.makeString(n.title)),this.line("/Parent "+this.makeRef(t)),0<r&&this.line("/Prev "+this.makeRef(t.children[r-1])),r<t.children.length-1&&this.line("/Next "+this.makeRef(t.children[r+1])),0<n.children.length&&(this.line("/First "+this.makeRef(n.children[0])),this.line("/Last "+this.makeRef(n.children[n.children.length-1])));var i=this.count=this.count_r({count:0},n);if(0<i&&this.line("/Count "+i),n.options&&n.options.pageNumber){var o=a.internal.getPageInfo(n.options.pageNumber);this.line("/Dest ["+o.objId+" 0 R /XYZ 0 "+e(0)+" 0]")}this.objEnd()}for(r=0;r<t.children.length;r++)n=t.children[r],this.renderItems(n)},a.outline.line=function(t){this.ctx.val+=t+"\r\n"},a.outline.makeRef=function(t){return t.id+" 0 R"},a.outline.makeString=function(t){return"("+a.internal.pdfEscape(t)+")"},a.outline.objStart=function(t){this.ctx.val+="\r\n"+t.id+" 0 obj\r\n<<\r\n"},a.outline.objEnd=function(t){this.ctx.val+=">> \r\nendobj\r\n"},a.outline.count_r=function(t,e){for(var r=0;r<e.children.length;r++)t.count++,this.count_r(t,e.children[r]);return t.count}}]),C=st.API,T=function(){var t="function"==typeof Deflater;if(!t)throw new Error("requires deflate.js for compression");return t},O=function(t,e,r,n){var i=5,o=I;switch(n){case C.image_compression.FAST:i=3,o=S;break;case C.image_compression.MEDIUM:i=6,o=B;break;case C.image_compression.SLOW:i=9,o=M}t=A(t,e,r,o);var a=new Uint8Array(_(i)),s=x(t),u=new Deflater(i),l=u.append(t),h=u.flush(),c=a.length+l.length+h.length,f=new Uint8Array(c+4);return f.set(a),f.set(l,a.length),f.set(h,a.length+l.length),f[c++]=s>>>24&255,f[c++]=s>>>16&255,f[c++]=s>>>8&255,f[c++]=255&s,C.arrayBufferToBinaryString(f)},_=function(t,e){var r=Math.LOG2E*Math.log(32768)-8<<4|8,n=r<<8;return n|=Math.min(3,(e-1&255)>>1)<<6,n|=0,[r,255&(n+=31-n%31)]},x=function(t,e){for(var r,n=1,i=0,o=t.length,a=0;0<o;){for(o-=r=e<o?e:o;i+=n+=t[a++],--r;);n%=65521,i%=65521}return(i<<16|n)>>>0},A=function(t,e,r,n){for(var i,o,a,s=t.length/e,u=new Uint8Array(t.length+s),l=F(),h=0;h<s;h++){if(a=h*e,i=t.subarray(a,a+e),n)u.set(n(i,r,o),a+h);else{for(var c=0,f=l.length,d=[];c<f;c++)d[c]=l[c](i,r,o);var p=R(d.concat());u.set(d[p],a+h)}o=i}return u},L=function(t,e,r){var n=Array.apply([],t);return n.unshift(0),n},S=function(t,e,r){var n,i=[],o=0,a=t.length;for(i[0]=1;o<a;o++)n=t[o-e]||0,i[o+1]=t[o]-n+256&255;return i},I=function(t,e,r){var n,i=[],o=0,a=t.length;for(i[0]=2;o<a;o++)n=r&&r[o]||0,i[o+1]=t[o]-n+256&255;return i},B=function(t,e,r){var n,i,o=[],a=0,s=t.length;for(o[0]=3;a<s;a++)n=t[a-e]||0,i=r&&r[a]||0,o[a+1]=t[a]+256-(n+i>>>1)&255;return o},M=function(t,e,r){var n,i,o,a,s=[],u=0,l=t.length;for(s[0]=4;u<l;u++)n=t[u-e]||0,i=r&&r[u]||0,o=r&&r[u-e]||0,a=j(n,i,o),s[u+1]=t[u]-a+256&255;return s},j=function(t,e,r){var n=t+e-r,i=Math.abs(n-t),o=Math.abs(n-e),a=Math.abs(n-r);return i<=o&&i<=a?t:o<=a?e:r},F=function(){return[L,S,I,B,M]},R=function(t){for(var e,r,n,i=0,o=t.length;i<o;)((e=D(t[i].slice(1)))<r||!r)&&(r=e,n=i),i++;return n},D=function(t){for(var e=0,r=t.length,n=0;e<r;)n+=Math.abs(t[e++]);return n},C.processPNG=function(t,e,r,n,i){var o,a,s,u,l,h,c=this.color_spaces.DEVICE_RGB,f=this.decode.FLATE_DECODE,d=8;if(this.isArrayBuffer(t)&&(t=new Uint8Array(t)),this.isArrayBufferView(t)){if("function"!=typeof PNG||"function"!=typeof Et)throw new Error("PNG support requires png.js and zlib.js");if(t=(o=new PNG(t)).imgData,d=o.bits,c=o.colorSpace,u=o.colors,-1!==[4,6].indexOf(o.colorType)){if(8===o.bits)for(var p,g=(N=new(32==o.pixelBitlength?Uint32Array:16==o.pixelBitlength?Uint16Array:Uint8Array)(o.decodePixels().buffer)).length,v=new Uint8Array(g*o.colors),m=new Uint8Array(g),y=o.pixelBitlength-o.bits,b=0,w=0;b<g;b++){for(_=N[b],p=0;p<y;)v[w++]=_>>>p&255,p+=o.bits;m[b]=_>>>p&255}if(16===o.bits){g=(N=new Uint32Array(o.decodePixels().buffer)).length,v=new Uint8Array(g*(32/o.pixelBitlength)*o.colors),m=new Uint8Array(g*(32/o.pixelBitlength));for(var _,x=1<o.colors,A=w=b=0;b<g;)_=N[b++],v[w++]=_>>>0&255,x&&(v[w++]=_>>>16&255,_=N[b++],v[w++]=_>>>0&255),m[A++]=_>>>16&255;d=8}n!==C.image_compression.NONE&&T()?(t=O(v,o.width*o.colors,o.colors,n),h=O(m,o.width,1,n)):(t=v,h=m,f=null)}if(3===o.colorType&&(c=this.color_spaces.INDEXED,l=o.palette,o.transparency.indexed)){var L=o.transparency.indexed,S=0;for(b=0,g=L.length;b<g;++b)S+=L[b];if((S/=255)==g-1&&-1!==L.indexOf(0))s=[L.indexOf(0)];else if(S!==g){var N=o.decodePixels();for(m=new Uint8Array(N.length),b=0,g=N.length;b<g;b++)m[b]=L[N[b]];h=O(m,o.width,1)}}var P=function(){var t;switch(n){case C.image_compression.FAST:t=11;break;case C.image_compression.MEDIUM:t=13;break;case C.image_compression.SLOW:t=14;break;default:t=12}return t}();return a=f===this.decode.FLATE_DECODE?"/Predictor "+P+" /Colors "+u+" /BitsPerComponent "+d+" /Columns "+o.width:"/Colors "+u+" /BitsPerComponent "+d+" /Columns "+o.width,(this.isArrayBuffer(t)||this.isArrayBufferView(t))&&(t=this.arrayBufferToBinaryString(t)),(h&&this.isArrayBuffer(h)||this.isArrayBufferView(h))&&(h=this.arrayBufferToBinaryString(h)),this.createImageInfo(t,o.width,o.height,c,d,f,e,r,a,s,l,h,P)}throw new Error("Unsupported PNG image data, try using JPEG instead.")},(z=st.API).processGIF89A=function(t,e,r,n,i){var o=new At(t),a=o.width,s=o.height,u=[];o.decodeAndBlitFrameRGBA(0,u);var l={data:u,width:a,height:s},h=new St(100).encode(l,100);return z.processJPEG.call(this,h,e,r,n)},z.processGIF87A=z.processGIF89A,(q=st.API).processBMP=function(t,e,r,n,i){var o=new Nt(t,!1),a=o.width,s=o.height,u={data:o.getData(),width:a,height:s},l=new St(100).encode(u,100);return q.processJPEG.call(this,l,e,r,n)},st.API.setLanguage=function(t){return void 0===this.internal.languageSettings&&(this.internal.languageSettings={},this.internal.languageSettings.isSubscribed=!1),void 0!=={af:"Afrikaans",sq:"Albanian",ar:"Arabic (Standard)","ar-DZ":"Arabic (Algeria)","ar-BH":"Arabic (Bahrain)","ar-EG":"Arabic (Egypt)","ar-IQ":"Arabic (Iraq)","ar-JO":"Arabic (Jordan)","ar-KW":"Arabic (Kuwait)","ar-LB":"Arabic (Lebanon)","ar-LY":"Arabic (Libya)","ar-MA":"Arabic (Morocco)","ar-OM":"Arabic (Oman)","ar-QA":"Arabic (Qatar)","ar-SA":"Arabic (Saudi Arabia)","ar-SY":"Arabic (Syria)","ar-TN":"Arabic (Tunisia)","ar-AE":"Arabic (U.A.E.)","ar-YE":"Arabic (Yemen)",an:"Aragonese",hy:"Armenian",as:"Assamese",ast:"Asturian",az:"Azerbaijani",eu:"Basque",be:"Belarusian",bn:"Bengali",bs:"Bosnian",br:"Breton",bg:"Bulgarian",my:"Burmese",ca:"Catalan",ch:"Chamorro",ce:"Chechen",zh:"Chinese","zh-HK":"Chinese (Hong Kong)","zh-CN":"Chinese (PRC)","zh-SG":"Chinese (Singapore)","zh-TW":"Chinese (Taiwan)",cv:"Chuvash",co:"Corsican",cr:"Cree",hr:"Croatian",cs:"Czech",da:"Danish",nl:"Dutch (Standard)","nl-BE":"Dutch (Belgian)",en:"English","en-AU":"English (Australia)","en-BZ":"English (Belize)","en-CA":"English (Canada)","en-IE":"English (Ireland)","en-JM":"English (Jamaica)","en-NZ":"English (New Zealand)","en-PH":"English (Philippines)","en-ZA":"English (South Africa)","en-TT":"English (Trinidad & Tobago)","en-GB":"English (United Kingdom)","en-US":"English (United States)","en-ZW":"English (Zimbabwe)",eo:"Esperanto",et:"Estonian",fo:"Faeroese",fj:"Fijian",fi:"Finnish",fr:"French (Standard)","fr-BE":"French (Belgium)","fr-CA":"French (Canada)","fr-FR":"French (France)","fr-LU":"French (Luxembourg)","fr-MC":"French (Monaco)","fr-CH":"French (Switzerland)",fy:"Frisian",fur:"Friulian",gd:"Gaelic (Scots)","gd-IE":"Gaelic (Irish)",gl:"Galacian",ka:"Georgian",de:"German (Standard)","de-AT":"German (Austria)","de-DE":"German (Germany)","de-LI":"German (Liechtenstein)","de-LU":"German (Luxembourg)","de-CH":"German (Switzerland)",el:"Greek",gu:"Gujurati",ht:"Haitian",he:"Hebrew",hi:"Hindi",hu:"Hungarian",is:"Icelandic",id:"Indonesian",iu:"Inuktitut",ga:"Irish",it:"Italian (Standard)","it-CH":"Italian (Switzerland)",ja:"Japanese",kn:"Kannada",ks:"Kashmiri",kk:"Kazakh",km:"Khmer",ky:"Kirghiz",tlh:"Klingon",ko:"Korean","ko-KP":"Korean (North Korea)","ko-KR":"Korean (South Korea)",la:"Latin",lv:"Latvian",lt:"Lithuanian",lb:"Luxembourgish",mk:"FYRO Macedonian",ms:"Malay",ml:"Malayalam",mt:"Maltese",mi:"Maori",mr:"Marathi",mo:"Moldavian",nv:"Navajo",ng:"Ndonga",ne:"Nepali",no:"Norwegian",nb:"Norwegian (Bokmal)",nn:"Norwegian (Nynorsk)",oc:"Occitan",or:"Oriya",om:"Oromo",fa:"Persian","fa-IR":"Persian/Iran",pl:"Polish",pt:"Portuguese","pt-BR":"Portuguese (Brazil)",pa:"Punjabi","pa-IN":"Punjabi (India)","pa-PK":"Punjabi (Pakistan)",qu:"Quechua",rm:"Rhaeto-Romanic",ro:"Romanian","ro-MO":"Romanian (Moldavia)",ru:"Russian","ru-MO":"Russian (Moldavia)",sz:"Sami (Lappish)",sg:"Sango",sa:"Sanskrit",sc:"Sardinian",sd:"Sindhi",si:"Singhalese",sr:"Serbian",sk:"Slovak",sl:"Slovenian",so:"Somani",sb:"Sorbian",es:"Spanish","es-AR":"Spanish (Argentina)","es-BO":"Spanish (Bolivia)","es-CL":"Spanish (Chile)","es-CO":"Spanish (Colombia)","es-CR":"Spanish (Costa Rica)","es-DO":"Spanish (Dominican Republic)","es-EC":"Spanish (Ecuador)","es-SV":"Spanish (El Salvador)","es-GT":"Spanish (Guatemala)","es-HN":"Spanish (Honduras)","es-MX":"Spanish (Mexico)","es-NI":"Spanish (Nicaragua)","es-PA":"Spanish (Panama)","es-PY":"Spanish (Paraguay)","es-PE":"Spanish (Peru)","es-PR":"Spanish (Puerto Rico)","es-ES":"Spanish (Spain)","es-UY":"Spanish (Uruguay)","es-VE":"Spanish (Venezuela)",sx:"Sutu",sw:"Swahili",sv:"Swedish","sv-FI":"Swedish (Finland)","sv-SV":"Swedish (Sweden)",ta:"Tamil",tt:"Tatar",te:"Teluga",th:"Thai",tig:"Tigre",ts:"Tsonga",tn:"Tswana",tr:"Turkish",tk:"Turkmen",uk:"Ukrainian",hsb:"Upper Sorbian",ur:"Urdu",ve:"Venda",vi:"Vietnamese",vo:"Volapuk",wa:"Walloon",cy:"Welsh",xh:"Xhosa",ji:"Yiddish",zu:"Zulu"}[t]&&(this.internal.languageSettings.languageCode=t,!1===this.internal.languageSettings.isSubscribed&&(this.internal.events.subscribe("putCatalog",function(){this.internal.write("/Lang ("+this.internal.languageSettings.languageCode+")")}),this.internal.languageSettings.isSubscribed=!0)),this},U=st.API,H=U.getCharWidthsArray=function(t,e){var r,n,i,o=(e=e||{}).font||this.internal.getFont(),a=e.fontSize||this.internal.getFontSize(),s=e.charSpace||this.internal.getCharSpace(),u=e.widths?e.widths:o.metadata.Unicode.widths,l=u.fof?u.fof:1,h=e.kerning?e.kerning:o.metadata.Unicode.kerning,c=h.fof?h.fof:1,f=0,d=u[0]||l,p=[];for(r=0,n=t.length;r<n;r++)i=t.charCodeAt(r),"function"==typeof o.metadata.widthOfString?p.push((o.metadata.widthOfGlyph(o.metadata.characterToGlyph(i))+s*(1e3/a)||0)/1e3):p.push((u[i]||d)/l+(h[i]&&h[i][f]||0)/c),f=i;return p},W=U.getArraySum=function(t){for(var e=t.length,r=0;e;)r+=t[--e];return r},G=U.getStringUnitWidth=function(t,e){var r=(e=e||{}).fontSize||this.internal.getFontSize(),n=e.font||this.internal.getFont(),i=e.charSpace||this.internal.getCharSpace();return"function"==typeof n.metadata.widthOfString?n.metadata.widthOfString(t,r,i)/r:W(H.apply(this,arguments))},V=function(t,e,r,n){for(var i=[],o=0,a=t.length,s=0;o!==a&&s+e[o]<r;)s+=e[o],o++;i.push(t.slice(0,o));var u=o;for(s=0;o!==a;)s+e[o]>n&&(i.push(t.slice(u,o)),s=0,u=o),s+=e[o],o++;return u!==o&&i.push(t.slice(u,o)),i},X=function(t,e,r){var n,i,o,a,s,u,l=[],h=[l],c=(r=r||{}).textIndent||0,f=0,d=0,p=t.split(" "),g=H.apply(this,[" ",r])[0];if(u=-1===r.lineIndent?p[0].length+2:r.lineIndent||0){var v=Array(u).join(" "),m=[];p.map(function(t){1<(t=t.split(/\s*\n/)).length?m=m.concat(t.map(function(t,e){return(e&&t.length?"\n":"")+t})):m.push(t[0])}),p=m,u=G.apply(this,[v,r])}for(o=0,a=p.length;o<a;o++){var y=0;if(n=p[o],u&&"\n"==n[0]&&(n=n.substr(1),y=1),i=H.apply(this,[n,r]),e<c+f+(d=W(i))||y){if(e<d){for(s=V.apply(this,[n,i,e-(c+f),e]),l.push(s.shift()),l=[s.pop()];s.length;)h.push([s.shift()]);d=W(i.slice(n.length-(l[0]?l[0].length:0)))}else l=[n];h.push(l),c=d+u,f=g}else l.push(n),c+=f+d,f=g}if(u)var b=function(t,e){return(e?v:"")+t.join(" ")};else b=function(t){return t.join(" ")};return h.map(b)},U.splitTextToSize=function(t,e,r){var n,i=(r=r||{}).fontSize||this.internal.getFontSize(),o=function(t){if(t.widths&&t.kerning)return{widths:t.widths,kerning:t.kerning};var e=this.internal.getFont(t.fontName,t.fontStyle),r="Unicode";return e.metadata[r]?{widths:e.metadata[r].widths||{0:1},kerning:e.metadata[r].kerning||{}}:{font:e.metadata,fontSize:this.internal.getFontSize(),charSpace:this.internal.getCharSpace()}}.call(this,r);n=Array.isArray(t)?t:t.split(/\r?\n/);var a=this.internal.scaleFactor*e/i;o.textIndent=r.textIndent?r.textIndent*this.internal.scaleFactor/i:0,o.lineIndent=r.lineIndent;var s,u,l=[];for(s=0,u=n.length;s<u;s++)l=l.concat(X.apply(this,[n[s],a,o]));return l},Y=st.API,K={codePages:["WinAnsiEncoding"],WinAnsiEncoding:(J=function(t){for(var e="klmnopqrstuvwxyz",r={},n=0;n<e.length;n++)r[e[n]]="0123456789abcdef"[n];var i,o,a,s,u,l={},h=1,c=l,f=[],d="",p="",g=t.length-1;for(n=1;n!=g;)u=t[n],n+=1,"'"==u?o=o?(s=o.join(""),i):[]:o?o.push(u):"{"==u?(f.push([c,s]),c={},s=i):"}"==u?((a=f.pop())[0][a[1]]=c,s=i,c=a[0]):"-"==u?h=-1:s===i?r.hasOwnProperty(u)?(d+=r[u],s=parseInt(d,16)*h,h=1,d=""):d+=u:r.hasOwnProperty(u)?(p+=r[u],c[s]=parseInt(p,16)*h,h=1,s=i,p=""):p+=u;return l})("{19m8n201n9q201o9r201s9l201t9m201u8m201w9n201x9o201y8o202k8q202l8r202m9p202q8p20aw8k203k8t203t8v203u9v2cq8s212m9t15m8w15n9w2dw9s16k8u16l9u17s9z17x8y17y9y}")},$={Unicode:{Courier:K,"Courier-Bold":K,"Courier-BoldOblique":K,"Courier-Oblique":K,Helvetica:K,"Helvetica-Bold":K,"Helvetica-BoldOblique":K,"Helvetica-Oblique":K,"Times-Roman":K,"Times-Bold":K,"Times-BoldItalic":K,"Times-Italic":K}},Q={Unicode:{"Courier-Oblique":J("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-BoldItalic":J("{'widths'{k3o2q4ycx2r201n3m201o6o201s2l201t2l201u2l201w3m201x3m201y3m2k1t2l2r202m2n2n3m2o3m2p5n202q6o2r1w2s2l2t2l2u3m2v3t2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w3t3x3t3y3t3z3m4k5n4l4m4m4m4n4m4o4s4p4m4q4m4r4s4s4y4t2r4u3m4v4m4w3x4x5t4y4s4z4s5k3x5l4s5m4m5n3r5o3x5p4s5q4m5r5t5s4m5t3x5u3x5v2l5w1w5x2l5y3t5z3m6k2l6l3m6m3m6n2w6o3m6p2w6q2l6r3m6s3r6t1w6u1w6v3m6w1w6x4y6y3r6z3m7k3m7l3m7m2r7n2r7o1w7p3r7q2w7r4m7s3m7t2w7u2r7v2n7w1q7x2n7y3t202l3mcl4mal2ram3man3mao3map3mar3mas2lat4uau1uav3maw3way4uaz2lbk2sbl3t'fof'6obo2lbp3tbq3mbr1tbs2lbu1ybv3mbz3mck4m202k3mcm4mcn4mco4mcp4mcq5ycr4mcs4mct4mcu4mcv4mcw2r2m3rcy2rcz2rdl4sdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek3mel3mem3men3meo3mep3meq4ser2wes2wet2weu2wev2wew1wex1wey1wez1wfl3rfm3mfn3mfo3mfp3mfq3mfr3tfs3mft3rfu3rfv3rfw3rfz2w203k6o212m6o2dw2l2cq2l3t3m3u2l17s3x19m3m}'kerning'{cl{4qu5kt5qt5rs17ss5ts}201s{201ss}201t{cks4lscmscnscoscpscls2wu2yu201ts}201x{2wu2yu}2k{201ts}2w{4qx5kx5ou5qx5rs17su5tu}2x{17su5tu5ou}2y{4qx5kx5ou5qx5rs17ss5ts}'fof'-6ofn{17sw5tw5ou5qw5rs}7t{cksclscmscnscoscps4ls}3u{17su5tu5os5qs}3v{17su5tu5os5qs}7p{17su5tu}ck{4qu5kt5qt5rs17ss5ts}4l{4qu5kt5qt5rs17ss5ts}cm{4qu5kt5qt5rs17ss5ts}cn{4qu5kt5qt5rs17ss5ts}co{4qu5kt5qt5rs17ss5ts}cp{4qu5kt5qt5rs17ss5ts}6l{4qu5ou5qw5rt17su5tu}5q{ckuclucmucnucoucpu4lu}5r{ckuclucmucnucoucpu4lu}7q{cksclscmscnscoscps4ls}6p{4qu5ou5qw5rt17sw5tw}ek{4qu5ou5qw5rt17su5tu}el{4qu5ou5qw5rt17su5tu}em{4qu5ou5qw5rt17su5tu}en{4qu5ou5qw5rt17su5tu}eo{4qu5ou5qw5rt17su5tu}ep{4qu5ou5qw5rt17su5tu}es{17ss5ts5qs4qu}et{4qu5ou5qw5rt17sw5tw}eu{4qu5ou5qw5rt17ss5ts}ev{17ss5ts5qs4qu}6z{17sw5tw5ou5qw5rs}fm{17sw5tw5ou5qw5rs}7n{201ts}fo{17sw5tw5ou5qw5rs}fp{17sw5tw5ou5qw5rs}fq{17sw5tw5ou5qw5rs}7r{cksclscmscnscoscps4ls}fs{17sw5tw5ou5qw5rs}ft{17su5tu}fu{17su5tu}fv{17su5tu}fw{17su5tu}fz{cksclscmscnscoscps4ls}}}"),"Helvetica-Bold":J("{'widths'{k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2o3r2p5t202q6o2r1s2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v2l3w3u3x3u3y3u3z3x4k6l4l4s4m4s4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3r4v4s4w3x4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v2l5w1w5x2l5y3u5z3r6k2l6l3r6m3x6n3r6o3x6p3r6q2l6r3x6s3x6t1w6u1w6v3r6w1w6x5t6y3x6z3x7k3x7l3x7m2r7n3r7o2l7p3x7q3r7r4y7s3r7t3r7u3m7v2r7w1w7x2r7y3u202l3rcl4sal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3xbq3rbr1wbs2lbu2obv3rbz3xck4s202k3rcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw1w2m2zcy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3res3ret3reu3rev3rew1wex1wey1wez1wfl3xfm3xfn3xfo3xfp3xfq3xfr3ufs3xft3xfu3xfv3xfw3xfz3r203k6o212m6o2dw2l2cq2l3t3r3u2l17s4m19m3r}'kerning'{cl{4qs5ku5ot5qs17sv5tv}201t{2ww4wy2yw}201w{2ks}201x{2ww4wy2yw}2k{201ts201xs}2w{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}2x{5ow5qs}2y{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}'fof'-6o7p{17su5tu5ot}ck{4qs5ku5ot5qs17sv5tv}4l{4qs5ku5ot5qs17sv5tv}cm{4qs5ku5ot5qs17sv5tv}cn{4qs5ku5ot5qs17sv5tv}co{4qs5ku5ot5qs17sv5tv}cp{4qs5ku5ot5qs17sv5tv}6l{17st5tt5os}17s{2kwclvcmvcnvcovcpv4lv4wwckv}5o{2kucltcmtcntcotcpt4lt4wtckt}5q{2ksclscmscnscoscps4ls4wvcks}5r{2ks4ws}5t{2kwclvcmvcnvcovcpv4lv4wwckv}eo{17st5tt5os}fu{17su5tu5ot}6p{17ss5ts}ek{17st5tt5os}el{17st5tt5os}em{17st5tt5os}en{17st5tt5os}6o{201ts}ep{17st5tt5os}es{17ss5ts}et{17ss5ts}eu{17ss5ts}ev{17ss5ts}6z{17su5tu5os5qt}fm{17su5tu5os5qt}fn{17su5tu5os5qt}fo{17su5tu5os5qt}fp{17su5tu5os5qt}fq{17su5tu5os5qt}fs{17su5tu5os5qt}ft{17su5tu5ot}7m{5os}fv{17su5tu5ot}fw{17su5tu5ot}}}"),Courier:J("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Courier-BoldOblique":J("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Bold":J("{'widths'{k3q2q5ncx2r201n3m201o6o201s2l201t2l201u2l201w3m201x3m201y3m2k1t2l2l202m2n2n3m2o3m2p6o202q6o2r1w2s2l2t2l2u3m2v3t2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w3t3x3t3y3t3z3m4k5x4l4s4m4m4n4s4o4s4p4m4q3x4r4y4s4y4t2r4u3m4v4y4w4m4x5y4y4s4z4y5k3x5l4y5m4s5n3r5o4m5p4s5q4s5r6o5s4s5t4s5u4m5v2l5w1w5x2l5y3u5z3m6k2l6l3m6m3r6n2w6o3r6p2w6q2l6r3m6s3r6t1w6u2l6v3r6w1w6x5n6y3r6z3m7k3r7l3r7m2w7n2r7o2l7p3r7q3m7r4s7s3m7t3m7u2w7v2r7w1q7x2r7y3o202l3mcl4sal2lam3man3mao3map3mar3mas2lat4uau1yav3maw3tay4uaz2lbk2sbl3t'fof'6obo2lbp3rbr1tbs2lbu2lbv3mbz3mck4s202k3mcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw2r2m3rcy2rcz2rdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3rek3mel3mem3men3meo3mep3meq4ser2wes2wet2weu2wev2wew1wex1wey1wez1wfl3rfm3mfn3mfo3mfp3mfq3mfr3tfs3mft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3m3u2l17s4s19m3m}'kerning'{cl{4qt5ks5ot5qy5rw17sv5tv}201t{cks4lscmscnscoscpscls4wv}2k{201ts}2w{4qu5ku7mu5os5qx5ru17su5tu}2x{17su5tu5ou5qs}2y{4qv5kv7mu5ot5qz5ru17su5tu}'fof'-6o7t{cksclscmscnscoscps4ls}3u{17su5tu5os5qu}3v{17su5tu5os5qu}fu{17su5tu5ou5qu}7p{17su5tu5ou5qu}ck{4qt5ks5ot5qy5rw17sv5tv}4l{4qt5ks5ot5qy5rw17sv5tv}cm{4qt5ks5ot5qy5rw17sv5tv}cn{4qt5ks5ot5qy5rw17sv5tv}co{4qt5ks5ot5qy5rw17sv5tv}cp{4qt5ks5ot5qy5rw17sv5tv}6l{17st5tt5ou5qu}17s{ckuclucmucnucoucpu4lu4wu}5o{ckuclucmucnucoucpu4lu4wu}5q{ckzclzcmzcnzcozcpz4lz4wu}5r{ckxclxcmxcnxcoxcpx4lx4wu}5t{ckuclucmucnucoucpu4lu4wu}7q{ckuclucmucnucoucpu4lu}6p{17sw5tw5ou5qu}ek{17st5tt5qu}el{17st5tt5ou5qu}em{17st5tt5qu}en{17st5tt5qu}eo{17st5tt5qu}ep{17st5tt5ou5qu}es{17ss5ts5qu}et{17sw5tw5ou5qu}eu{17sw5tw5ou5qu}ev{17ss5ts5qu}6z{17sw5tw5ou5qu5rs}fm{17sw5tw5ou5qu5rs}fn{17sw5tw5ou5qu5rs}fo{17sw5tw5ou5qu5rs}fp{17sw5tw5ou5qu5rs}fq{17sw5tw5ou5qu5rs}7r{cktcltcmtcntcotcpt4lt5os}fs{17sw5tw5ou5qu5rs}ft{17su5tu5ou5qu}7m{5os}fv{17su5tu5ou5qu}fw{17su5tu5ou5qu}fz{cksclscmscnscoscps4ls}}}"),Symbol:J("{'widths'{k3uaw4r19m3m2k1t2l2l202m2y2n3m2p5n202q6o3k3m2s2l2t2l2v3r2w1t3m3m2y1t2z1wbk2sbl3r'fof'6o3n3m3o3m3p3m3q3m3r3m3s3m3t3m3u1w3v1w3w3r3x3r3y3r3z2wbp3t3l3m5v2l5x2l5z3m2q4yfr3r7v3k7w1o7x3k}'kerning'{'fof'-6o}}"),Helvetica:J("{'widths'{k3p2q4mcx1w201n3r201o6o201s1q201t1q201u1q201w2l201x2l201y2l2k1w2l1w202m2n2n3r2o3r2p5t202q6o2r1n2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v1w3w3u3x3u3y3u3z3r4k6p4l4m4m4m4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3m4v4m4w3r4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v1w5w1w5x1w5y2z5z3r6k2l6l3r6m3r6n3m6o3r6p3r6q1w6r3r6s3r6t1q6u1q6v3m6w1q6x5n6y3r6z3r7k3r7l3r7m2l7n3m7o1w7p3r7q3m7r4s7s3m7t3m7u3m7v2l7w1u7x2l7y3u202l3rcl4mal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3rbr1wbs2lbu2obv3rbz3xck4m202k3rcm4mcn4mco4mcp4mcq6ocr4scs4mct4mcu4mcv4mcw1w2m2ncy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3mes3ret3reu3rev3rew1wex1wey1wez1wfl3rfm3rfn3rfo3rfp3rfq3rfr3ufs3xft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3r3u1w17s4m19m3r}'kerning'{5q{4wv}cl{4qs5kw5ow5qs17sv5tv}201t{2wu4w1k2yu}201x{2wu4wy2yu}17s{2ktclucmucnu4otcpu4lu4wycoucku}2w{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}2x{17sy5ty5oy5qs}2y{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}'fof'-6o7p{17sv5tv5ow}ck{4qs5kw5ow5qs17sv5tv}4l{4qs5kw5ow5qs17sv5tv}cm{4qs5kw5ow5qs17sv5tv}cn{4qs5kw5ow5qs17sv5tv}co{4qs5kw5ow5qs17sv5tv}cp{4qs5kw5ow5qs17sv5tv}6l{17sy5ty5ow}do{17st5tt}4z{17st5tt}7s{fst}dm{17st5tt}dn{17st5tt}5o{ckwclwcmwcnwcowcpw4lw4wv}dp{17st5tt}dq{17st5tt}7t{5ow}ds{17st5tt}5t{2ktclucmucnu4otcpu4lu4wycoucku}fu{17sv5tv5ow}6p{17sy5ty5ow5qs}ek{17sy5ty5ow}el{17sy5ty5ow}em{17sy5ty5ow}en{5ty}eo{17sy5ty5ow}ep{17sy5ty5ow}es{17sy5ty5qs}et{17sy5ty5ow5qs}eu{17sy5ty5ow5qs}ev{17sy5ty5ow5qs}6z{17sy5ty5ow5qs}fm{17sy5ty5ow5qs}fn{17sy5ty5ow5qs}fo{17sy5ty5ow5qs}fp{17sy5ty5qs}fq{17sy5ty5ow5qs}7r{5ow}fs{17sy5ty5ow5qs}ft{17sv5tv5ow}7m{5ow}fv{17sv5tv5ow}fw{17sv5tv5ow}}}"),"Helvetica-BoldOblique":J("{'widths'{k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2o3r2p5t202q6o2r1s2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v2l3w3u3x3u3y3u3z3x4k6l4l4s4m4s4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3r4v4s4w3x4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v2l5w1w5x2l5y3u5z3r6k2l6l3r6m3x6n3r6o3x6p3r6q2l6r3x6s3x6t1w6u1w6v3r6w1w6x5t6y3x6z3x7k3x7l3x7m2r7n3r7o2l7p3x7q3r7r4y7s3r7t3r7u3m7v2r7w1w7x2r7y3u202l3rcl4sal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3xbq3rbr1wbs2lbu2obv3rbz3xck4s202k3rcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw1w2m2zcy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3res3ret3reu3rev3rew1wex1wey1wez1wfl3xfm3xfn3xfo3xfp3xfq3xfr3ufs3xft3xfu3xfv3xfw3xfz3r203k6o212m6o2dw2l2cq2l3t3r3u2l17s4m19m3r}'kerning'{cl{4qs5ku5ot5qs17sv5tv}201t{2ww4wy2yw}201w{2ks}201x{2ww4wy2yw}2k{201ts201xs}2w{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}2x{5ow5qs}2y{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}'fof'-6o7p{17su5tu5ot}ck{4qs5ku5ot5qs17sv5tv}4l{4qs5ku5ot5qs17sv5tv}cm{4qs5ku5ot5qs17sv5tv}cn{4qs5ku5ot5qs17sv5tv}co{4qs5ku5ot5qs17sv5tv}cp{4qs5ku5ot5qs17sv5tv}6l{17st5tt5os}17s{2kwclvcmvcnvcovcpv4lv4wwckv}5o{2kucltcmtcntcotcpt4lt4wtckt}5q{2ksclscmscnscoscps4ls4wvcks}5r{2ks4ws}5t{2kwclvcmvcnvcovcpv4lv4wwckv}eo{17st5tt5os}fu{17su5tu5ot}6p{17ss5ts}ek{17st5tt5os}el{17st5tt5os}em{17st5tt5os}en{17st5tt5os}6o{201ts}ep{17st5tt5os}es{17ss5ts}et{17ss5ts}eu{17ss5ts}ev{17ss5ts}6z{17su5tu5os5qt}fm{17su5tu5os5qt}fn{17su5tu5os5qt}fo{17su5tu5os5qt}fp{17su5tu5os5qt}fq{17su5tu5os5qt}fs{17su5tu5os5qt}ft{17su5tu5ot}7m{5os}fv{17su5tu5ot}fw{17su5tu5ot}}}"),ZapfDingbats:J("{'widths'{k4u2k1w'fof'6o}'kerning'{'fof'-6o}}"),"Courier-Bold":J("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Italic":J("{'widths'{k3n2q4ycx2l201n3m201o5t201s2l201t2l201u2l201w3r201x3r201y3r2k1t2l2l202m2n2n3m2o3m2p5n202q5t2r1p2s2l2t2l2u3m2v4n2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w4n3x4n3y4n3z3m4k5w4l3x4m3x4n4m4o4s4p3x4q3x4r4s4s4s4t2l4u2w4v4m4w3r4x5n4y4m4z4s5k3x5l4s5m3x5n3m5o3r5p4s5q3x5r5n5s3x5t3r5u3r5v2r5w1w5x2r5y2u5z3m6k2l6l3m6m3m6n2w6o3m6p2w6q1w6r3m6s3m6t1w6u1w6v2w6w1w6x4s6y3m6z3m7k3m7l3m7m2r7n2r7o1w7p3m7q2w7r4m7s2w7t2w7u2r7v2s7w1v7x2s7y3q202l3mcl3xal2ram3man3mao3map3mar3mas2lat4wau1vav3maw4nay4waz2lbk2sbl4n'fof'6obo2lbp3mbq3obr1tbs2lbu1zbv3mbz3mck3x202k3mcm3xcn3xco3xcp3xcq5tcr4mcs3xct3xcu3xcv3xcw2l2m2ucy2lcz2ldl4mdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek3mel3mem3men3meo3mep3meq4mer2wes2wet2weu2wev2wew1wex1wey1wez1wfl3mfm3mfn3mfo3mfp3mfq3mfr4nfs3mft3mfu3mfv3mfw3mfz2w203k6o212m6m2dw2l2cq2l3t3m3u2l17s3r19m3m}'kerning'{cl{5kt4qw}201s{201sw}201t{201tw2wy2yy6q-t}201x{2wy2yy}2k{201tw}2w{7qs4qy7rs5ky7mw5os5qx5ru17su5tu}2x{17ss5ts5os}2y{7qs4qy7rs5ky7mw5os5qx5ru17su5tu}'fof'-6o6t{17ss5ts5qs}7t{5os}3v{5qs}7p{17su5tu5qs}ck{5kt4qw}4l{5kt4qw}cm{5kt4qw}cn{5kt4qw}co{5kt4qw}cp{5kt4qw}6l{4qs5ks5ou5qw5ru17su5tu}17s{2ks}5q{ckvclvcmvcnvcovcpv4lv}5r{ckuclucmucnucoucpu4lu}5t{2ks}6p{4qs5ks5ou5qw5ru17su5tu}ek{4qs5ks5ou5qw5ru17su5tu}el{4qs5ks5ou5qw5ru17su5tu}em{4qs5ks5ou5qw5ru17su5tu}en{4qs5ks5ou5qw5ru17su5tu}eo{4qs5ks5ou5qw5ru17su5tu}ep{4qs5ks5ou5qw5ru17su5tu}es{5ks5qs4qs}et{4qs5ks5ou5qw5ru17su5tu}eu{4qs5ks5qw5ru17su5tu}ev{5ks5qs4qs}ex{17ss5ts5qs}6z{4qv5ks5ou5qw5ru17su5tu}fm{4qv5ks5ou5qw5ru17su5tu}fn{4qv5ks5ou5qw5ru17su5tu}fo{4qv5ks5ou5qw5ru17su5tu}fp{4qv5ks5ou5qw5ru17su5tu}fq{4qv5ks5ou5qw5ru17su5tu}7r{5os}fs{4qv5ks5ou5qw5ru17su5tu}ft{17su5tu5qs}fu{17su5tu5qs}fv{17su5tu5qs}fw{17su5tu5qs}}}"),"Times-Roman":J("{'widths'{k3n2q4ycx2l201n3m201o6o201s2l201t2l201u2l201w2w201x2w201y2w2k1t2l2l202m2n2n3m2o3m2p5n202q6o2r1m2s2l2t2l2u3m2v3s2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v1w3w3s3x3s3y3s3z2w4k5w4l4s4m4m4n4m4o4s4p3x4q3r4r4s4s4s4t2l4u2r4v4s4w3x4x5t4y4s4z4s5k3r5l4s5m4m5n3r5o3x5p4s5q4s5r5y5s4s5t4s5u3x5v2l5w1w5x2l5y2z5z3m6k2l6l2w6m3m6n2w6o3m6p2w6q2l6r3m6s3m6t1w6u1w6v3m6w1w6x4y6y3m6z3m7k3m7l3m7m2l7n2r7o1w7p3m7q3m7r4s7s3m7t3m7u2w7v3k7w1o7x3k7y3q202l3mcl4sal2lam3man3mao3map3mar3mas2lat4wau1vav3maw3say4waz2lbk2sbl3s'fof'6obo2lbp3mbq2xbr1tbs2lbu1zbv3mbz2wck4s202k3mcm4scn4sco4scp4scq5tcr4mcs3xct3xcu3xcv3xcw2l2m2tcy2lcz2ldl4sdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek2wel2wem2wen2weo2wep2weq4mer2wes2wet2weu2wev2wew1wex1wey1wez1wfl3mfm3mfn3mfo3mfp3mfq3mfr3sfs3mft3mfu3mfv3mfw3mfz3m203k6o212m6m2dw2l2cq2l3t3m3u1w17s4s19m3m}'kerning'{cl{4qs5ku17sw5ou5qy5rw201ss5tw201ws}201s{201ss}201t{ckw4lwcmwcnwcowcpwclw4wu201ts}2k{201ts}2w{4qs5kw5os5qx5ru17sx5tx}2x{17sw5tw5ou5qu}2y{4qs5kw5os5qx5ru17sx5tx}'fof'-6o7t{ckuclucmucnucoucpu4lu5os5rs}3u{17su5tu5qs}3v{17su5tu5qs}7p{17sw5tw5qs}ck{4qs5ku17sw5ou5qy5rw201ss5tw201ws}4l{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cm{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cn{4qs5ku17sw5ou5qy5rw201ss5tw201ws}co{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cp{4qs5ku17sw5ou5qy5rw201ss5tw201ws}6l{17su5tu5os5qw5rs}17s{2ktclvcmvcnvcovcpv4lv4wuckv}5o{ckwclwcmwcnwcowcpw4lw4wu}5q{ckyclycmycnycoycpy4ly4wu5ms}5r{cktcltcmtcntcotcpt4lt4ws}5t{2ktclvcmvcnvcovcpv4lv4wuckv}7q{cksclscmscnscoscps4ls}6p{17su5tu5qw5rs}ek{5qs5rs}el{17su5tu5os5qw5rs}em{17su5tu5os5qs5rs}en{17su5qs5rs}eo{5qs5rs}ep{17su5tu5os5qw5rs}es{5qs}et{17su5tu5qw5rs}eu{17su5tu5qs5rs}ev{5qs}6z{17sv5tv5os5qx5rs}fm{5os5qt5rs}fn{17sv5tv5os5qx5rs}fo{17sv5tv5os5qx5rs}fp{5os5qt5rs}fq{5os5qt5rs}7r{ckuclucmucnucoucpu4lu5os}fs{17sv5tv5os5qx5rs}ft{17ss5ts5qs}fu{17sw5tw5qs}fv{17sw5tw5qs}fw{17ss5ts5qs}fz{ckuclucmucnucoucpu4lu5os5rs}}}"),"Helvetica-Oblique":J("{'widths'{k3p2q4mcx1w201n3r201o6o201s1q201t1q201u1q201w2l201x2l201y2l2k1w2l1w202m2n2n3r2o3r2p5t202q6o2r1n2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v1w3w3u3x3u3y3u3z3r4k6p4l4m4m4m4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3m4v4m4w3r4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v1w5w1w5x1w5y2z5z3r6k2l6l3r6m3r6n3m6o3r6p3r6q1w6r3r6s3r6t1q6u1q6v3m6w1q6x5n6y3r6z3r7k3r7l3r7m2l7n3m7o1w7p3r7q3m7r4s7s3m7t3m7u3m7v2l7w1u7x2l7y3u202l3rcl4mal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3rbr1wbs2lbu2obv3rbz3xck4m202k3rcm4mcn4mco4mcp4mcq6ocr4scs4mct4mcu4mcv4mcw1w2m2ncy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3mes3ret3reu3rev3rew1wex1wey1wez1wfl3rfm3rfn3rfo3rfp3rfq3rfr3ufs3xft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3r3u1w17s4m19m3r}'kerning'{5q{4wv}cl{4qs5kw5ow5qs17sv5tv}201t{2wu4w1k2yu}201x{2wu4wy2yu}17s{2ktclucmucnu4otcpu4lu4wycoucku}2w{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}2x{17sy5ty5oy5qs}2y{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}'fof'-6o7p{17sv5tv5ow}ck{4qs5kw5ow5qs17sv5tv}4l{4qs5kw5ow5qs17sv5tv}cm{4qs5kw5ow5qs17sv5tv}cn{4qs5kw5ow5qs17sv5tv}co{4qs5kw5ow5qs17sv5tv}cp{4qs5kw5ow5qs17sv5tv}6l{17sy5ty5ow}do{17st5tt}4z{17st5tt}7s{fst}dm{17st5tt}dn{17st5tt}5o{ckwclwcmwcnwcowcpw4lw4wv}dp{17st5tt}dq{17st5tt}7t{5ow}ds{17st5tt}5t{2ktclucmucnu4otcpu4lu4wycoucku}fu{17sv5tv5ow}6p{17sy5ty5ow5qs}ek{17sy5ty5ow}el{17sy5ty5ow}em{17sy5ty5ow}en{5ty}eo{17sy5ty5ow}ep{17sy5ty5ow}es{17sy5ty5qs}et{17sy5ty5ow5qs}eu{17sy5ty5ow5qs}ev{17sy5ty5ow5qs}6z{17sy5ty5ow5qs}fm{17sy5ty5ow5qs}fn{17sy5ty5ow5qs}fo{17sy5ty5ow5qs}fp{17sy5ty5qs}fq{17sy5ty5ow5qs}7r{5ow}fs{17sy5ty5ow5qs}ft{17sv5tv5ow}7m{5ow}fv{17sv5tv5ow}fw{17sv5tv5ow}}}")}},Y.events.push(["addFont",function(t){var e,r,n,i=t.font,o="Unicode";(e=Q[o][i.postScriptName])&&((r=i.metadata[o]?i.metadata[o]:i.metadata[o]={}).widths=e.widths,r.kerning=e.kerning),(n=$[o][i.postScriptName])&&((r=i.metadata[o]?i.metadata[o]:i.metadata[o]={}).encoding=n).codePages&&n.codePages.length&&(i.encoding=n.codePages[0])}]),Z=st,"undefined"!=typeof self&&self||void 0!==Ct&&Ct||"undefined"!=typeof window&&window||Function("return this")(),Z.API.events.push(["addFont",function(t){var e=t.font,r=t.instance;if(void 0!==r&&r.existsFileInVFS(e.postScriptName)){var n=r.getFileFromVFS(e.postScriptName);if("string"!=typeof n)throw new Error("Font is not stored as string-data in vFS, import fonts or remove declaration doc.addFont('"+e.postScriptName+"').");e.metadata=Z.API.TTFFont.open(e.postScriptName,e.fontName,n,e.encoding),e.metadata.Unicode=e.metadata.Unicode||{encoding:{},kerning:{},widths:[]},e.metadata.glyIdsUsed=[0]}else if(!1===e.isStandardFont)throw new Error("Font does not exist in vFS, import fonts or remove declaration doc.addFont('"+e.postScriptName+"').")}]),(tt=st.API).addSvg=function(t,e,r,n,i){if(void 0===e||void 0===r)throw new Error("addSVG needs values for 'x' and 'y'");function o(t){for(var e=parseFloat(t[1]),r=parseFloat(t[2]),n=[],i=3,o=t.length;i<o;)"c"===t[i]?(n.push([parseFloat(t[i+1]),parseFloat(t[i+2]),parseFloat(t[i+3]),parseFloat(t[i+4]),parseFloat(t[i+5]),parseFloat(t[i+6])]),i+=7):"l"===t[i]?(n.push([parseFloat(t[i+1]),parseFloat(t[i+2])]),i+=3):i+=1;return[e,r,n]}var a,s,u,l,h,c,f=(c=(s=document).createElement("iframe"),u=".jsPDF_sillysvg_iframe {display:none;position:absolute;}",(h=(l=s).createElement("style")).type="text/css",h.styleSheet?h.styleSheet.cssText=u:h.appendChild(l.createTextNode(u)),l.getElementsByTagName("head")[0].appendChild(h),c.name="childframe",c.setAttribute("width",0),c.setAttribute("height",0),c.setAttribute("frameborder","0"),c.setAttribute("scrolling","no"),c.setAttribute("seamless","seamless"),c.setAttribute("class","jsPDF_sillysvg_iframe"),s.body.appendChild(c),c),d=((a=(f.contentWindow||f.contentDocument).document).write(t),a.close(),a.getElementsByTagName("svg")[0]),p=[1,1],g=parseFloat(d.getAttribute("width")),v=parseFloat(d.getAttribute("height"));g&&v&&(n&&i?p=[n/g,i/v]:n?p=[n/g,n/g]:i&&(p=[i/v,i/v]));var m,y,b,w,_=d.childNodes;for(m=0,y=_.length;m<y;m++)(b=_[m]).tagName&&"PATH"===b.tagName.toUpperCase()&&((w=o(b.getAttribute("d").split(" ")))[0]=w[0]*p[0]+e,w[1]=w[1]*p[1]+r,this.lines.call(this,w[2],w[0],w[1],p));return this},tt.addSVG=tt.addSvg,tt.addSvgAsImage=function(t,e,r,n,i,o,a,s){if(isNaN(e)||isNaN(r))throw console.error("jsPDF.addSvgAsImage: Invalid coordinates",arguments),new Error("Invalid coordinates passed to jsPDF.addSvgAsImage");if(isNaN(n)||isNaN(i))throw console.error("jsPDF.addSvgAsImage: Invalid measurements",arguments),new Error("Invalid measurements (width and/or height) passed to jsPDF.addSvgAsImage");var u=document.createElement("canvas");u.width=n,u.height=i;var l=u.getContext("2d");return l.fillStyle="#fff",l.fillRect(0,0,u.width,u.height),canvg(u,t,{ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0,ignoreClear:!0}),this.addImage(u.toDataURL("image/jpeg",1),e,r,n,i,a,s),this},st.API.putTotalPages=function(t){var e,r;r=parseInt(this.internal.getFont().id.substr(1),10)<15?(e=new RegExp(t,"g"),this.internal.getNumberOfPages()):(e=new RegExp(this.pdfEscape16(t,this.internal.getFont()),"g"),this.pdfEscape16(this.internal.getNumberOfPages()+"",this.internal.getFont()));for(var n=1;n<=this.internal.getNumberOfPages();n++)for(var i=0;i<this.internal.pages[n].length;i++)this.internal.pages[n][i]=this.internal.pages[n][i].replace(e,r);return this},st.API.viewerPreferences=function(t,e){var r;t=t||{},e=e||!1;var n,i,o={HideToolbar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideMenubar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideWindowUI:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},FitWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},CenterWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},DisplayDocTitle:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.4},NonFullScreenPageMode:{defaultValue:"UseNone",value:"UseNone",type:"name",explicitSet:!1,valueSet:["UseNone","UseOutlines","UseThumbs","UseOC"],pdfVersion:1.3},Direction:{defaultValue:"L2R",value:"L2R",type:"name",explicitSet:!1,valueSet:["L2R","R2L"],pdfVersion:1.3},ViewArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},ViewClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintScaling:{defaultValue:"AppDefault",value:"AppDefault",type:"name",explicitSet:!1,valueSet:["AppDefault","None"],pdfVersion:1.6},Duplex:{defaultValue:"",value:"none",type:"name",explicitSet:!1,valueSet:["Simplex","DuplexFlipShortEdge","DuplexFlipLongEdge","none"],pdfVersion:1.7},PickTrayByPDFSize:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.7},PrintPageRange:{defaultValue:"",value:"",type:"array",explicitSet:!1,valueSet:null,pdfVersion:1.7},NumCopies:{defaultValue:1,value:1,type:"integer",explicitSet:!1,valueSet:null,pdfVersion:1.7}},a=Object.keys(o),s=[],u=0,l=0,h=0,c=!0;function f(t,e){var r,n=!1;for(r=0;r<t.length;r+=1)t[r]===e&&(n=!0);return n}if(void 0===this.internal.viewerpreferences&&(this.internal.viewerpreferences={},this.internal.viewerpreferences.configuration=JSON.parse(JSON.stringify(o)),this.internal.viewerpreferences.isSubscribed=!1),r=this.internal.viewerpreferences.configuration,"reset"===t||!0===e){var d=a.length;for(h=0;h<d;h+=1)r[a[h]].value=r[a[h]].defaultValue,r[a[h]].explicitSet=!1}if("object"===ne(t))for(n in t)if(i=t[n],f(a,n)&&void 0!==i){if("boolean"===r[n].type&&"boolean"==typeof i)r[n].value=i;else if("name"===r[n].type&&f(r[n].valueSet,i))r[n].value=i;else if("integer"===r[n].type&&Number.isInteger(i))r[n].value=i;else if("array"===r[n].type){for(u=0;u<i.length;u+=1)if(c=!0,1===i[u].length&&"number"==typeof i[u][0])s.push(String(i[u]-1));else if(1<i[u].length){for(l=0;l<i[u].length;l+=1)"number"!=typeof i[u][l]&&(c=!1);!0===c&&s.push([i[u][0]-1,i[u][1]-1].join(" "))}r[n].value="["+s.join(" ")+"]"}else r[n].value=r[n].defaultValue;r[n].explicitSet=!0}return!1===this.internal.viewerpreferences.isSubscribed&&(this.internal.events.subscribe("putCatalog",function(){var t,e=[];for(t in r)!0===r[t].explicitSet&&("name"===r[t].type?e.push("/"+t+" /"+r[t].value):e.push("/"+t+" "+r[t].value));0!==e.length&&this.internal.write("/ViewerPreferences\n<<\n"+e.join("\n")+"\n>>")}),this.internal.viewerpreferences.isSubscribed=!0),this.internal.viewerpreferences.configuration=r,this},et=st.API,it=nt=rt="",et.addMetadata=function(t,e){return nt=e||"http://jspdf.default.namespaceuri/",rt=t,this.internal.events.subscribe("postPutResources",function(){if(rt){var t='<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><rdf:Description rdf:about="" xmlns:jspdf="'+nt+'"><jspdf:metadata>',e=unescape(encodeURIComponent('<x:xmpmeta xmlns:x="adobe:ns:meta/">')),r=unescape(encodeURIComponent(t)),n=unescape(encodeURIComponent(rt)),i=unescape(encodeURIComponent("</jspdf:metadata></rdf:Description></rdf:RDF>")),o=unescape(encodeURIComponent("</x:xmpmeta>")),a=r.length+n.length+i.length+e.length+o.length;it=this.internal.newObject(),this.internal.write("<< /Type /Metadata /Subtype /XML /Length "+a+" >>"),this.internal.write("stream"),this.internal.write(e+r+n+i+o),this.internal.write("endstream"),this.internal.write("endobj")}else it=""}),this.internal.events.subscribe("putCatalog",function(){it&&this.internal.write("/Metadata "+it+" 0 R")}),this},function(f){function d(t){var e,r,n,i,o,a,s;for(o="/CIDInit /ProcSet findresource begin\n12 dict begin\nbegincmap\n/CIDSystemInfo <<\n  /Registry (Adobe)\n  /Ordering (UCS)\n  /Supplement 0\n>> def\n/CMapName /Adobe-Identity-UCS def\n/CMapType 2 def\n1 begincodespacerange\n<0000><ffff>\nendcodespacerange",n=[],a=0,s=(r=Object.keys(t).sort(function(t,e){return t-e})).length;a<s;a++)e=r[a],100<=n.length&&(o+="\n"+n.length+" beginbfchar\n"+n.join("\n")+"\nendbfchar",n=[]),i=("0000"+t[e].toString(16)).slice(-4),e=("0000"+(+e).toString(16)).slice(-4),n.push("<"+e+"><"+i+">");return n.length&&(o+="\n"+n.length+" beginbfchar\n"+n.join("\n")+"\nendbfchar\n"),o+"endcmap\nCMapName currentdict /CMap defineresource pop\nend\nend"}var t=f.API,v=t.pdfEscape16=function(t,e){for(var r,n=e.metadata.Unicode.widths,i=["","0","00","000","0000"],o=[""],a=0,s=t.length;a<s;++a){if(r=e.metadata.characterToGlyph(t.charCodeAt(a)),e.metadata.glyIdsUsed.push(r),e.metadata.toUnicode[r]=t.charCodeAt(a),-1==n.indexOf(r)&&(n.push(r),n.push([parseInt(e.metadata.widthOfGlyph(r),10)])),"0"==r)return o.join("");r=r.toString(16),o.push(i[4-r.length],r)}return o.join("")};t.events.push(["putFont",function(t){!function(t,e,r,n){if(t.metadata instanceof f.API.TTFFont&&"Identity-H"===t.encoding){for(var i=t.metadata.Unicode.widths,o=t.metadata.subset.encode(t.metadata.glyIdsUsed,1),a="",s=0;s<o.length;s++)a+=String.fromCharCode(o[s]);var u=r();n({data:a,addLength1:!0}),e("endobj");var l=r();n({data:d(t.metadata.toUnicode),addLength1:!0}),e("endobj");var h=r();e("<<"),e("/Type /FontDescriptor"),e("/FontName /"+t.fontName),e("/FontFile2 "+u+" 0 R"),e("/FontBBox "+f.API.PDFObject.convert(t.metadata.bbox)),e("/Flags "+t.metadata.flags),e("/StemV "+t.metadata.stemV),e("/ItalicAngle "+t.metadata.italicAngle),e("/Ascent "+t.metadata.ascender),e("/Descent "+t.metadata.decender),e("/CapHeight "+t.metadata.capHeight),e(">>"),e("endobj");var c=r();e("<<"),e("/Type /Font"),e("/BaseFont /"+t.fontName),e("/FontDescriptor "+h+" 0 R"),e("/W "+f.API.PDFObject.convert(i)),e("/CIDToGIDMap /Identity"),e("/DW 1000"),e("/Subtype /CIDFontType2"),e("/CIDSystemInfo"),e("<<"),e("/Supplement 0"),e("/Registry (Adobe)"),e("/Ordering ("+t.encoding+")"),e(">>"),e(">>"),e("endobj"),t.objectNumber=r(),e("<<"),e("/Type /Font"),e("/Subtype /Type0"),e("/ToUnicode "+l+" 0 R"),e("/BaseFont /"+t.fontName),e("/Encoding /"+t.encoding),e("/DescendantFonts ["+c+" 0 R]"),e(">>"),e("endobj"),t.isAlreadyPutted=!0}}(t.font,t.out,t.newObject,t.putStream)}]),t.events.push(["putFont",function(t){!function(t,e,r,n){if(t.metadata instanceof f.API.TTFFont&&"WinAnsiEncoding"===t.encoding){t.metadata.Unicode.widths;for(var i=t.metadata.rawData,o="",a=0;a<i.length;a++)o+=String.fromCharCode(i[a]);var s=r();n({data:o,addLength1:!0}),e("endobj");var u=r();n({data:d(t.metadata.toUnicode),addLength1:!0}),e("endobj");var l=r();for(e("<<"),e("/Descent "+t.metadata.decender),e("/CapHeight "+t.metadata.capHeight),e("/StemV "+t.metadata.stemV),e("/Type /FontDescriptor"),e("/FontFile2 "+s+" 0 R"),e("/Flags 96"),e("/FontBBox "+f.API.PDFObject.convert(t.metadata.bbox)),e("/FontName /"+t.fontName),e("/ItalicAngle "+t.metadata.italicAngle),e("/Ascent "+t.metadata.ascender),e(">>"),e("endobj"),t.objectNumber=r(),a=0;a<t.metadata.hmtx.widths.length;a++)t.metadata.hmtx.widths[a]=parseInt(t.metadata.hmtx.widths[a]*(1e3/t.metadata.head.unitsPerEm));e("<</Subtype/TrueType/Type/Font/ToUnicode "+u+" 0 R/BaseFont/"+t.fontName+"/FontDescriptor "+l+" 0 R/Encoding/"+t.encoding+" /FirstChar 29 /LastChar 255 /Widths "+f.API.PDFObject.convert(t.metadata.hmtx.widths)+">>"),e("endobj"),t.isAlreadyPutted=!0}}(t.font,t.out,t.newObject,t.putStream)}]);function l(t){var e,r,n=t.text||"",i=t.x,o=t.y,a=t.options||{},s=t.mutex||{},u=s.pdfEscape,l=s.activeFontKey,h=s.fonts,c=(s.activeFontSize,""),f=0,d="",p=h[r=l].encoding;if("Identity-H"!==h[r].encoding)return{text:n,x:i,y:o,options:a,mutex:s};for(d=n,r=l,"[object Array]"===Object.prototype.toString.call(n)&&(d=n[0]),f=0;f<d.length;f+=1)h[r].metadata.hasOwnProperty("cmap")&&(e=h[r].metadata.cmap.unicode.codeMap[d[f].charCodeAt(0)]),e||d[f].charCodeAt(0)<256&&h[r].metadata.hasOwnProperty("Unicode")?c+=d[f]:c+="";var g="";return parseInt(r.slice(1))<14||"WinAnsiEncoding"===p?g=function(t){for(var e="",r=0;r<t.length;r++)e+=""+t.charCodeAt(r).toString(16);return e}(u(c,r)):"Identity-H"===p&&(g=v(c,h[r])),s.isHex=!0,{text:g,x:i,y:o,options:a,mutex:s}}t.events.push(["postProcessText",function(t){var e=t.text||"",r=t.x,n=t.y,i=t.options,o=t.mutex,a=(i.lang,[]),s={text:e,x:r,y:n,options:i,mutex:o};if("[object Array]"===Object.prototype.toString.call(e)){var u=0;for(u=0;u<e.length;u+=1)"[object Array]"===Object.prototype.toString.call(e[u])&&3===e[u].length?a.push([l(Object.assign({},s,{text:e[u][0]})).text,e[u][1],e[u][2]]):a.push(l(Object.assign({},s,{text:e[u]})).text);t.text=a}else t.text=l(Object.assign({},s,{text:e})).text}])}(st,"undefined"!=typeof self&&self||void 0!==Ct&&Ct||"undefined"!=typeof window&&window||Function("return this")()),ot=st.API,at=function(t){return void 0!==t&&(void 0===t.vFS&&(t.vFS={}),!0)},ot.existsFileInVFS=function(t){return!!at(this.internal)&&void 0!==this.internal.vFS[t]},ot.addFileToVFS=function(t,e){return at(this.internal),this.internal.vFS[t]=e,this},ot.getFileFromVFS=function(t){return at(this.internal),void 0!==this.internal.vFS[t]?this.internal.vFS[t]:null},st.API.addHTML=function(t,p,g,s,v){if("undefined"==typeof html2canvas&&"undefined"==typeof rasterizeHTML)throw new Error("You need either https://github.com/niklasvh/html2canvas or https://github.com/cburgmer/rasterizeHTML.js");"number"!=typeof p&&(s=p,v=g),"function"==typeof s&&(v=s,s=null),"function"!=typeof v&&(v=function(){});var e=this.internal,m=e.scaleFactor,y=e.pageSize.getWidth(),b=e.pageSize.getHeight();if((s=s||{}).onrendered=function(u){p=parseInt(p)||0,g=parseInt(g)||0;var t=s.dim||{},l=Object.assign({top:0,right:0,bottom:0,left:0,useFor:"content"},s.margin),e=t.h||Math.min(b,u.height/m),h=t.w||Math.min(y,u.width/m)-p,c=s.format||"JPEG",f=s.imageCompression||"SLOW";if(u.height>b-l.top-l.bottom&&s.pagesplit){var d=function(t,e,r,n,i){var o=document.createElement("canvas");o.height=i,o.width=n;var a=o.getContext("2d");return a.mozImageSmoothingEnabled=!1,a.webkitImageSmoothingEnabled=!1,a.msImageSmoothingEnabled=!1,a.imageSmoothingEnabled=!1,a.fillStyle=s.backgroundColor||"#ffffff",a.fillRect(0,0,n,i),a.drawImage(t,e,r,n,i,0,0,n,i),o},r=function(){for(var t,e,r=0,n=0,i={},o=!1;;){var a;if(n=0,i.top=0!==r?l.top:g,i.left=0!==r?l.left:p,o=(y-l.left-l.right)*m<u.width,"content"===l.useFor?0===r?(t=Math.min((y-l.left)*m,u.width),e=Math.min((b-l.top)*m,u.height-r)):(t=Math.min(y*m,u.width),e=Math.min(b*m,u.height-r),i.top=0):(t=Math.min((y-l.left-l.right)*m,u.width),e=Math.min((b-l.bottom-l.top)*m,u.height-r)),o)for(;;){"content"===l.useFor&&(0===n?t=Math.min((y-l.left)*m,u.width):(t=Math.min(y*m,u.width-n),i.left=0));var s=[a=d(u,n,r,t,e),i.left,i.top,a.width/m,a.height/m,c,null,f];if(this.addImage.apply(this,s),(n+=t)>=u.width)break;this.addPage()}else s=[a=d(u,0,r,t,e),i.left,i.top,a.width/m,a.height/m,c,null,f],this.addImage.apply(this,s);if((r+=e)>=u.height)break;this.addPage()}v(h,r,null,s)}.bind(this);if("CANVAS"===u.nodeName){var n=new Image;n.onload=r,n.src=u.toDataURL("image/png"),u=n}else r()}else{var i=Math.random().toString(35),o=[u,p,g,h,e,c,i,f];this.addImage.apply(this,o),v(h,e,i,o)}}.bind(this),"undefined"!=typeof html2canvas&&!s.rstz)return html2canvas(t,s);if("undefined"==typeof rasterizeHTML)return null;var r="drawDocument";return"string"==typeof t&&(r=/^http/.test(t)?"drawURL":"drawHTML"),s.width=s.width||y*m,rasterizeHTML[r](t,void 0,s).then(function(t){s.onrendered(t.image)},function(t){v(null,t)})},function(t){var E,k,i,a,s,u,l,h,C,b,f,c,d,r,T,O,p,g,v,I;function e(){}E=function(t){return e.prototype=t,new e},b=function(t){var e,r,n,i,o,a,s;for(r=0,n=t.length,e=void 0,a=i=!1;!i&&r!==n;)(e=t[r]=t[r].trimLeft())&&(i=!0),r++;for(r=n-1;n&&!a&&-1!==r;)(e=t[r]=t[r].trimRight())&&(a=!0),r--;for(o=/\s+$/g,s=!0,r=0;r!==n;)"\u2028"!=t[r]&&(e=t[r].replace(/\s+/g," "),s&&(e=e.trimLeft()),e&&(s=o.test(e)),t[r]=e),r++;return t},c=function(t){var e,r,n;for(e=void 0,r=(n=t.split(",")).shift();!e&&r;)e=i[r.trim().toLowerCase()],r=n.shift();return e},d=function(t){var e;return-1<(t="auto"===t?"0px":t).indexOf("em")&&!isNaN(Number(t.replace("em","")))&&(t=18.719*Number(t.replace("em",""))+"px"),-1<t.indexOf("pt")&&!isNaN(Number(t.replace("pt","")))&&(t=1.333*Number(t.replace("pt",""))+"px"),(e=r[t])?e:void 0!==(e={"xx-small":9,"x-small":11,small:13,medium:16,large:19,"x-large":23,"xx-large":28,auto:0}[t])||(e=parseFloat(t))?r[t]=e/16:(e=t.match(/([\d\.]+)(px)/),Array.isArray(e)&&3===e.length?r[t]=parseFloat(e[1])/16:r[t]=1)},C=function(t){var e,r,n,i,o;return o=t,i=document.defaultView&&document.defaultView.getComputedStyle?document.defaultView.getComputedStyle(o,null):o.currentStyle?o.currentStyle:o.style,r=void 0,(e={})["font-family"]=c((n=function(t){return t=t.replace(/-\D/g,function(t){return t.charAt(1).toUpperCase()}),i[t]})("font-family"))||"times",e["font-style"]=a[n("font-style")]||"normal",e["text-align"]=s[n("text-align")]||"left","bold"===(r=u[n("font-weight")]||"normal")&&("normal"===e["font-style"]?e["font-style"]=r:e["font-style"]=r+e["font-style"]),e["font-size"]=d(n("font-size"))||1,e["line-height"]=d(n("line-height"))||1,e.display="inline"===n("display")?"inline":"block",r="block"===e.display,e["margin-top"]=r&&d(n("margin-top"))||0,e["margin-bottom"]=r&&d(n("margin-bottom"))||0,e["padding-top"]=r&&d(n("padding-top"))||0,e["padding-bottom"]=r&&d(n("padding-bottom"))||0,e["margin-left"]=r&&d(n("margin-left"))||0,e["margin-right"]=r&&d(n("margin-right"))||0,e["padding-left"]=r&&d(n("padding-left"))||0,e["padding-right"]=r&&d(n("padding-right"))||0,e["page-break-before"]=n("page-break-before")||"auto",e.float=l[n("cssFloat")]||"none",e.clear=h[n("clear")]||"none",e.color=n("color"),e},T=function(t,e,r){var n,i,o,a,s;if(o=!1,a=i=void 0,n=r["#"+t.id])if("function"==typeof n)o=n(t,e);else for(i=0,a=n.length;!o&&i!==a;)o=n[i](t,e),i++;if(n=r[t.nodeName],!o&&n)if("function"==typeof n)o=n(t,e);else for(i=0,a=n.length;!o&&i!==a;)o=n[i](t,e),i++;for(s="string"==typeof t.className?t.className.split(" "):[],i=0;i<s.length;i++)if(n=r["."+s[i]],!o&&n)if("function"==typeof n)o=n(t,e);else for(i=0,a=n.length;!o&&i!==a;)o=n[i](t,e),i++;return o},I=function(t,e){var r,n,i,o,a,s,u,l,h;for(r=[],n=[],i=0,h=t.rows[0].cells.length,u=t.clientWidth;i<h;)l=t.rows[0].cells[i],n[i]={name:l.textContent.toLowerCase().replace(/\s+/g,""),prompt:l.textContent.replace(/\r?\n/g,""),width:l.clientWidth/u*e.pdf.internal.pageSize.getWidth()},i++;for(i=1;i<t.rows.length;){for(s=t.rows[i],a={},o=0;o<s.cells.length;)a[n[o].name]=s.cells[o].textContent.replace(/\r?\n/g,""),o++;r.push(a),i++}return{rows:r,headers:n}};var B={SCRIPT:1,STYLE:1,NOSCRIPT:1,OBJECT:1,EMBED:1,SELECT:1},M=1;k=function(t,i,e){var r,n,o,a,s,u,l,h;for(n=t.childNodes,r=void 0,(s="block"===(o=C(t)).display)&&(i.setBlockBoundary(),i.setBlockStyle(o)),a=0,u=n.length;a<u;){if("object"===ne(r=n[a])){if(i.executeWatchFunctions(r),1===r.nodeType&&"HEADER"===r.nodeName){var c=r,f=i.pdf.margins_doc.top;i.pdf.internal.events.subscribe("addPage",function(t){i.y=f,k(c,i,e),i.pdf.margins_doc.top=i.y+10,i.y+=10},!1)}if(8===r.nodeType&&"#comment"===r.nodeName)~r.textContent.indexOf("ADD_PAGE")&&(i.pdf.addPage(),i.y=i.pdf.margins_doc.top);else if(1!==r.nodeType||B[r.nodeName])if(3===r.nodeType){var d=r.nodeValue;if(r.nodeValue&&"LI"===r.parentNode.nodeName)if("OL"===r.parentNode.parentNode.nodeName)d=M+++". "+d;else{var p=o["font-size"],g=(3-.75*p)*i.pdf.internal.scaleFactor,v=.75*p*i.pdf.internal.scaleFactor,m=1.74*p/i.pdf.internal.scaleFactor;h=function(t,e){this.pdf.circle(t+g,e+v,m,"FD")}}16&r.ownerDocument.body.compareDocumentPosition(r)&&i.addText(d,o)}else"string"==typeof r&&i.addText(r,o);else{var y;if("IMG"===r.nodeName){var b=r.getAttribute("src");y=O[i.pdf.sHashCode(b)||b]}if(y){i.pdf.internal.pageSize.getHeight()-i.pdf.margins_doc.bottom<i.y+r.height&&i.y>i.pdf.margins_doc.top&&(i.pdf.addPage(),i.y=i.pdf.margins_doc.top,i.executeWatchFunctions(r));var w=C(r),_=i.x,x=12/i.pdf.internal.scaleFactor,A=(w["margin-left"]+w["padding-left"])*x,L=(w["margin-right"]+w["padding-right"])*x,S=(w["margin-top"]+w["padding-top"])*x,N=(w["margin-bottom"]+w["padding-bottom"])*x;void 0!==w.float&&"right"===w.float?_+=i.settings.width-r.width-L:_+=A,i.pdf.addImage(y,_,i.y+S,r.width,r.height),y=void 0,"right"===w.float||"left"===w.float?(i.watchFunctions.push(function(t,e,r,n){return i.y>=e?(i.x+=t,i.settings.width+=r,!0):!!(n&&1===n.nodeType&&!B[n.nodeName]&&i.x+n.width>i.pdf.margins_doc.left+i.pdf.margins_doc.width)&&(i.x+=t,i.y=e,i.settings.width+=r,!0)}.bind(this,"left"===w.float?-r.width-A-L:0,i.y+r.height+S+N,r.width)),i.watchFunctions.push(function(t,e,r){return!(i.y<t&&e===i.pdf.internal.getNumberOfPages())||1===r.nodeType&&"both"===C(r).clear&&(i.y=t,!0)}.bind(this,i.y+r.height,i.pdf.internal.getNumberOfPages())),i.settings.width-=r.width+A+L,"left"===w.float&&(i.x+=r.width+A+L)):i.y+=r.height+S+N}else if("TABLE"===r.nodeName)l=I(r,i),i.y+=10,i.pdf.table(i.x,i.y,l.rows,l.headers,{autoSize:!1,printHeaders:e.printHeaders,margins:i.pdf.margins_doc,css:C(r)}),i.y=i.pdf.lastCellPos.y+i.pdf.lastCellPos.h+20;else if("OL"===r.nodeName||"UL"===r.nodeName)M=1,T(r,i,e)||k(r,i,e),i.y+=10;else if("LI"===r.nodeName){var P=i.x;i.x+=20/i.pdf.internal.scaleFactor,i.y+=3,T(r,i,e)||k(r,i,e),i.x=P}else"BR"===r.nodeName?(i.y+=o["font-size"]*i.pdf.internal.scaleFactor,i.addText("\u2028",E(o))):T(r,i,e)||k(r,i,e)}}a++}if(e.outY=i.y,s)return i.setBlockBoundary(h)},O={},p=function(t,o,e,r){var a,n=t.getElementsByTagName("img"),i=n.length,s=0;function u(){o.pdf.internal.events.publish("imagesLoaded"),r(a)}function l(e,r,n){if(e){var i=new Image;a=++s,i.crossOrigin="",i.onerror=i.onload=function(){if(i.complete&&(0===i.src.indexOf("data:image/")&&(i.width=r||i.width||0,i.height=n||i.height||0),i.width+i.height)){var t=o.pdf.sHashCode(e)||e;O[t]=O[t]||i}--s||u()},i.src=e}}for(;i--;)l(n[i].getAttribute("src"),n[i].width,n[i].height);return s||u()},g=function(t,o,a){var s=t.getElementsByTagName("footer");if(0<s.length){s=s[0];var e=o.pdf.internal.write,r=o.y;o.pdf.internal.write=function(){},k(s,o,a);var u=Math.ceil(o.y-r)+5;o.y=r,o.pdf.internal.write=e,o.pdf.margins_doc.bottom+=u;for(var n=function(t){var e=void 0!==t?t.pageNumber:1,r=o.y;o.y=o.pdf.internal.pageSize.getHeight()-o.pdf.margins_doc.bottom,o.pdf.margins_doc.bottom-=u;for(var n=s.getElementsByTagName("span"),i=0;i<n.length;++i)-1<(" "+n[i].className+" ").replace(/[\n\t]/g," ").indexOf(" pageCounter ")&&(n[i].innerHTML=e),-1<(" "+n[i].className+" ").replace(/[\n\t]/g," ").indexOf(" totalPages ")&&(n[i].innerHTML="###jsPDFVarTotalPages###");k(s,o,a),o.pdf.margins_doc.bottom+=u,o.y=r},i=s.getElementsByTagName("span"),l=0;l<i.length;++l)-1<(" "+i[l].className+" ").replace(/[\n\t]/g," ").indexOf(" totalPages ")&&o.pdf.internal.events.subscribe("htmlRenderingFinished",o.pdf.putTotalPages.bind(o.pdf,"###jsPDFVarTotalPages###"),!0);o.pdf.internal.events.subscribe("addPage",n,!1),n(),B.FOOTER=1}},v=function(t,e,r,n,i,o){if(!e)return!1;var a,s,u,l;"string"==typeof e||e.parentNode||(e=""+e.innerHTML),"string"==typeof e&&(a=e.replace(/<\/?script[^>]*?>/gi,""),l="jsPDFhtmlText"+Date.now().toString()+(1e3*Math.random()).toFixed(0),(u=document.createElement("div")).style.cssText="position: absolute !important;clip: rect(1px 1px 1px 1px); /* IE6, IE7 */clip: rect(1px, 1px, 1px, 1px);padding:0 !important;border:0 !important;height: 1px !important;width: 1px !important; top:auto;left:-100px;overflow: hidden;",u.innerHTML='<iframe style="height:1px;width:1px" name="'+l+'" />',document.body.appendChild(u),(s=window.frames[l]).document.open(),s.document.writeln(a),s.document.close(),e=s.document.body);var h,c=new f(t,r,n,i);return p.call(this,e,c,i.elementHandlers,function(t){g(e,c,i.elementHandlers),k(e,c,i.elementHandlers),c.pdf.internal.events.publish("htmlRenderingFinished"),h=c.dispose(),"function"==typeof o?o(h):t&&console.error("jsPDF Warning: rendering issues? provide a callback to fromHTML!")}),h||{x:c.x,y:c.y}},(f=function(t,e,r,n){return this.pdf=t,this.x=e,this.y=r,this.settings=n,this.watchFunctions=[],this.init(),this}).prototype.init=function(){return this.paragraph={text:[],style:[]},this.pdf.internal.write("q")},f.prototype.dispose=function(){return this.pdf.internal.write("Q"),{x:this.x,y:this.y,ready:!0}},f.prototype.executeWatchFunctions=function(t){var e=!1,r=[];if(0<this.watchFunctions.length){for(var n=0;n<this.watchFunctions.length;++n)!0===this.watchFunctions[n](t)?e=!0:r.push(this.watchFunctions[n]);this.watchFunctions=r}return e},f.prototype.splitFragmentsIntoLines=function(t,e){var r,n,i,o,a,s,u,l,h,c,f,d,p,g;for(c=this.pdf.internal.scaleFactor,o={},s=u=l=g=a=i=h=n=void 0,d=[f=[]],r=0,p=this.settings.width;t.length;)if(a=t.shift(),g=e.shift(),a)if((i=o[(n=g["font-family"])+(h=g["font-style"])])||(i=this.pdf.internal.getFont(n,h).metadata.Unicode,o[n+h]=i),l={widths:i.widths,kerning:i.kerning,fontSize:12*g["font-size"],textIndent:r},u=this.pdf.getStringUnitWidth(a,l)*l.fontSize/c,"\u2028"==a)f=[],d.push(f);else if(p<r+u){for(s=this.pdf.splitTextToSize(a,p,l),f.push([s.shift(),g]);s.length;)f=[[s.shift(),g]],d.push(f);r=this.pdf.getStringUnitWidth(f[0][0],l)*l.fontSize/c}else f.push([a,g]),r+=u;if(void 0!==g["text-align"]&&("center"===g["text-align"]||"right"===g["text-align"]||"justify"===g["text-align"]))for(var v=0;v<d.length;++v){var m=this.pdf.getStringUnitWidth(d[v][0][0],l)*l.fontSize/c;0<v&&(d[v][0][1]=E(d[v][0][1]));var y=p-m;if("right"===g["text-align"])d[v][0][1]["margin-left"]=y;else if("center"===g["text-align"])d[v][0][1]["margin-left"]=y/2;else if("justify"===g["text-align"]){var b=d[v][0][0].split(" ").length-1;d[v][0][1]["word-spacing"]=y/b,v===d.length-1&&(d[v][0][1]["word-spacing"]=0)}}return d},f.prototype.RenderTextFragment=function(t,e){var r,n;n=0,this.pdf.internal.pageSize.getHeight()-this.pdf.margins_doc.bottom<this.y+this.pdf.internal.getFontSize()&&(this.pdf.internal.write("ET","Q"),this.pdf.addPage(),this.y=this.pdf.margins_doc.top,this.pdf.internal.write("q","BT",this.getPdfColor(e.color),this.pdf.internal.getCoordinateString(this.x),this.pdf.internal.getVerticalCoordinateString(this.y),"Td"),n=Math.max(n,e["line-height"],e["font-size"]),this.pdf.internal.write(0,(-12*n).toFixed(2),"Td")),r=this.pdf.internal.getFont(e["font-family"],e["font-style"]);var i=this.getPdfColor(e.color);i!==this.lastTextColor&&(this.pdf.internal.write(i),this.lastTextColor=i),void 0!==e["word-spacing"]&&0<e["word-spacing"]&&this.pdf.internal.write(e["word-spacing"].toFixed(2),"Tw"),this.pdf.internal.write("/"+r.id,(12*e["font-size"]).toFixed(2),"Tf","("+this.pdf.internal.pdfEscape(t)+") Tj"),void 0!==e["word-spacing"]&&this.pdf.internal.write(0,"Tw")},f.prototype.getPdfColor=function(t){var e,r,n,i=/rgb\s*\(\s*(\d+),\s*(\d+),\s*(\d+\s*)\)/.exec(t);if(null!=i)e=parseInt(i[1]),r=parseInt(i[2]),n=parseInt(i[3]);else{if("string"==typeof t&&"#"!=t.charAt(0)){var o=new RGBColor(t);t=o.ok?o.toHex():"#000000"}e=t.substring(1,3),e=parseInt(e,16),r=t.substring(3,5),r=parseInt(r,16),n=t.substring(5,7),n=parseInt(n,16)}if("string"==typeof e&&/^#[0-9A-Fa-f]{6}$/.test(e)){var a=parseInt(e.substr(1),16);e=a>>16&255,r=a>>8&255,n=255&a}var s=this.f3;return 0===e&&0===r&&0===n||void 0===r?s(e/255)+" g":[s(e/255),s(r/255),s(n/255),"rg"].join(" ")},f.prototype.f3=function(t){return t.toFixed(3)},f.prototype.renderParagraph=function(t){var e,r,n,i,o,a,s,u,l,h,c,f,d;if(n=b(this.paragraph.text),f=this.paragraph.style,e=this.paragraph.blockstyle,this.paragraph.priorblockstyle,this.paragraph={text:[],style:[],blockstyle:{},priorblockstyle:e},n.join("").trim()){s=this.splitFragmentsIntoLines(n,f),u=a=void 0,r=12/this.pdf.internal.scaleFactor,this.priorMarginBottom=this.priorMarginBottom||0,c=(Math.max((e["margin-top"]||0)-this.priorMarginBottom,0)+(e["padding-top"]||0))*r,h=((e["margin-bottom"]||0)+(e["padding-bottom"]||0))*r,this.priorMarginBottom=e["margin-bottom"]||0,"always"===e["page-break-before"]&&(this.pdf.addPage(),this.y=0,c=((e["margin-top"]||0)+(e["padding-top"]||0))*r),l=this.pdf.internal.write,o=i=void 0,this.y+=c,l("q","BT 0 g",this.pdf.internal.getCoordinateString(this.x),this.pdf.internal.getVerticalCoordinateString(this.y),"Td");for(var p=0;s.length;){for(i=u=0,o=(a=s.shift()).length;i!==o;)a[i][0].trim()&&(u=Math.max(u,a[i][1]["line-height"],a[i][1]["font-size"]),d=7*a[i][1]["font-size"]),i++;var g=0,v=0;for(void 0!==a[0][1]["margin-left"]&&0<a[0][1]["margin-left"]&&(g=(v=this.pdf.internal.getCoordinateString(a[0][1]["margin-left"]))-p,p=v),l(g+Math.max(e["margin-left"]||0,0)*r,(-12*u).toFixed(2),"Td"),i=0,o=a.length;i!==o;)a[i][0]&&this.RenderTextFragment(a[i][0],a[i][1]),i++;if(this.y+=u*r,this.executeWatchFunctions(a[0][1])&&0<s.length){var m=[],y=[];s.forEach(function(t){for(var e=0,r=t.length;e!==r;)t[e][0]&&(m.push(t[e][0]+" "),y.push(t[e][1])),++e}),s=this.splitFragmentsIntoLines(b(m),y),l("ET","Q"),l("q","BT 0 g",this.pdf.internal.getCoordinateString(this.x),this.pdf.internal.getVerticalCoordinateString(this.y),"Td")}}return t&&"function"==typeof t&&t.call(this,this.x-9,this.y-d/2),l("ET","Q"),this.y+=h}},f.prototype.setBlockBoundary=function(t){return this.renderParagraph(t)},f.prototype.setBlockStyle=function(t){return this.paragraph.blockstyle=t},f.prototype.addText=function(t,e){return this.paragraph.text.push(t),this.paragraph.style.push(e)},i={helvetica:"helvetica","sans-serif":"helvetica","times new roman":"times",serif:"times",times:"times",monospace:"courier",courier:"courier"},u={100:"normal",200:"normal",300:"normal",400:"normal",500:"bold",600:"bold",700:"bold",800:"bold",900:"bold",normal:"normal",bold:"bold",bolder:"bold",lighter:"normal"},a={normal:"normal",italic:"italic",oblique:"italic"},s={left:"left",right:"right",center:"center",justify:"justify"},l={none:"none",right:"right",left:"left"},h={none:"none",both:"both"},r={normal:1},t.fromHTML=function(t,e,r,n,i,o){return this.margins_doc=o||{top:0,bottom:0},(n=n||{}).elementHandlers||(n.elementHandlers={}),v(this,t,isNaN(e)?4:e,isNaN(r)?4:r,n,i)}}(st.API),st.API,("undefined"!=typeof window&&window||void 0!==Ct&&Ct).html2pdf=function(t,a,e){var r=a.canvas;if(r){var n,i;if((r.pdf=a).annotations={_nameMap:[],createAnnotation:function(t,e){var r,n=a.context2d._wrapX(e.left),i=a.context2d._wrapY(e.top),o=(a.context2d._page(e.top),t.indexOf("#"));r=0<=o?{name:t.substring(o+1)}:{url:t},a.link(n,i,e.right-e.left,e.bottom-e.top,r)},setName:function(t,e){var r=a.context2d._wrapX(e.left),n=a.context2d._wrapY(e.top),i=a.context2d._page(e.top);this._nameMap[t]={page:i,x:r,y:n}}},r.annotations=a.annotations,a.context2d._pageBreakAt=function(t){this.pageBreaks.push(t)},a.context2d._gotoPage=function(t){for(;a.internal.getNumberOfPages()<t;)a.addPage();a.setPage(t)},"string"==typeof t){t=t.replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,"");var o,s,u=document.createElement("iframe");document.body.appendChild(u),null!=(o=u.contentDocument)&&null!=o||(o=u.contentWindow.document),o.open(),o.write(t),o.close(),n=o.body,s=o.body||{},t=o.documentElement||{},i=Math.max(s.scrollHeight,s.offsetHeight,t.clientHeight,t.scrollHeight,t.offsetHeight)}else s=(n=t).body||{},i=Math.max(s.scrollHeight,s.offsetHeight,t.clientHeight,t.scrollHeight,t.offsetHeight);var l={async:!0,allowTaint:!0,backgroundColor:"#ffffff",canvas:r,imageTimeout:15e3,logging:!0,proxy:null,removeContainer:!0,foreignObjectRendering:!1,useCORS:!1,windowHeight:i=a.internal.pageSize.getHeight(),scrollY:i};a.context2d.pageWrapYEnabled=!0,a.context2d.pageWrapY=a.internal.pageSize.getHeight(),html2canvas(n,l).then(function(t){e&&(u&&u.parentElement.removeChild(u),e(a))})}else alert("jsPDF canvas plugin not installed")},window.tmp=html2pdf,function(f){var n=f.BlobBuilder||f.WebKitBlobBuilder||f.MSBlobBuilder||f.MozBlobBuilder;f.URL=f.URL||f.webkitURL||function(t,e){return(e=document.createElement("a")).href=t,e};var r=f.Blob,d=URL.createObjectURL,p=URL.revokeObjectURL,o=f.Symbol&&f.Symbol.toStringTag,t=!1,e=!1,g=!!f.ArrayBuffer,i=n&&n.prototype.append&&n.prototype.getBlob;try{t=2===new Blob(["ä"]).size,e=2===new Blob([new Uint8Array([1,2])]).size}catch(t){}function a(t){return t.map(function(t){if(t.buffer instanceof ArrayBuffer){var e=t.buffer;if(t.byteLength!==e.byteLength){var r=new Uint8Array(t.byteLength);r.set(new Uint8Array(e,t.byteOffset,t.byteLength)),e=r.buffer}return e}return t})}function s(t,e){e=e||{};var r=new n;return a(t).forEach(function(t){r.append(t)}),e.type?r.getBlob(e.type):r.getBlob()}function u(t,e){return new r(a(t),e||{})}if(f.Blob&&(s.prototype=Blob.prototype,u.prototype=Blob.prototype),o)try{File.prototype[o]="File",Blob.prototype[o]="Blob",FileReader.prototype[o]="FileReader"}catch(t){}function l(){var t=!!f.ActiveXObject||"-ms-scroll-limit"in document.documentElement.style&&"-ms-ime-align"in document.documentElement.style,e=f.XMLHttpRequest&&f.XMLHttpRequest.prototype.send;t&&e&&(XMLHttpRequest.prototype.send=function(t){t instanceof Blob&&this.setRequestHeader("Content-Type",t.type),e.call(this,t)});try{new File([],"")}catch(t){try{var r=new Function('class File extends Blob {constructor(chunks, name, opts) {opts = opts || {};super(chunks, opts || {});this.name = name;this.lastModifiedDate = opts.lastModified ? new Date(opts.lastModified) : new Date;this.lastModified = +this.lastModifiedDate;}};return new File([], ""), File')();f.File=r}catch(t){r=function(t,e,r){var n=new Blob(t,r),i=r&&void 0!==r.lastModified?new Date(r.lastModified):new Date;return n.name=e,n.lastModifiedDate=i,n.lastModified=+i,n.toString=function(){return"[object File]"},o&&(n[o]="File"),n},f.File=r}}}t?(l(),f.Blob=e?f.Blob:u):i?(l(),f.Blob=s):function(){function o(t){for(var e=[],r=0;r<t.length;r++){var n=t.charCodeAt(r);n<128?e.push(n):n<2048?e.push(192|n>>6,128|63&n):n<55296||57344<=n?e.push(224|n>>12,128|n>>6&63,128|63&n):(r++,n=65536+((1023&n)<<10|1023&t.charCodeAt(r)),e.push(240|n>>18,128|n>>12&63,128|n>>6&63,128|63&n))}return e}function e(t){var e,r,n,i,o,a;for(e="",n=t.length,r=0;r<n;)switch((i=t[r++])>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:e+=String.fromCharCode(i);break;case 12:case 13:o=t[r++],e+=String.fromCharCode((31&i)<<6|63&o);break;case 14:o=t[r++],a=t[r++],e+=String.fromCharCode((15&i)<<12|(63&o)<<6|(63&a)<<0)}return e}function a(t){for(var e=new Array(t.byteLength),r=new Uint8Array(t),n=e.length;n--;)e[n]=r[n];return e}function r(t){for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",r=[],n=0;n<t.length;n+=3){var i=t[n],o=n+1<t.length,a=o?t[n+1]:0,s=n+2<t.length,u=s?t[n+2]:0,l=i>>2,h=(3&i)<<4|a>>4,c=(15&a)<<2|u>>6,f=63&u;s||(f=64,o||(c=64)),r.push(e[l],e[h],e[c],e[f])}return r.join("")}var t=Object.create||function(t){function e(){}return e.prototype=t,new e};if(g)var n=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],s=ArrayBuffer.isView||function(t){return t&&-1<n.indexOf(Object.prototype.toString.call(t))};function u(t,e){for(var r=0,n=(t=t||[]).length;r<n;r++){var i=t[r];i instanceof u?t[r]=i._buffer:"string"==typeof i?t[r]=o(i):g&&(ArrayBuffer.prototype.isPrototypeOf(i)||s(i))?t[r]=a(i):g&&i&&DataView.prototype.isPrototypeOf(i)?t[r]=a(i.buffer):t[r]=o(String(i))}this._buffer=[].concat.apply([],t),this.size=this._buffer.length,this.type=e&&e.type||""}function i(t,e,r){var n=u.call(this,t,r=r||{})||this;return n.name=e,n.lastModifiedDate=r.lastModified?new Date(r.lastModified):new Date,n.lastModified=+n.lastModifiedDate,n}if(u.prototype.slice=function(t,e,r){return new u([this._buffer.slice(t||0,e||this._buffer.length)],{type:r})},u.prototype.toString=function(){return"[object Blob]"},(i.prototype=t(u.prototype)).constructor=i,Object.setPrototypeOf)Object.setPrototypeOf(i,u);else try{i.__proto__=u}catch(t){}function l(){if(!(this instanceof l))throw new TypeError("Failed to construct 'FileReader': Please use the 'new' operator, this DOM object constructor cannot be called as a function.");var r=document.createDocumentFragment();this.addEventListener=r.addEventListener,this.dispatchEvent=function(t){var e=this["on"+t.type];"function"==typeof e&&e(t),r.dispatchEvent(t)},this.removeEventListener=r.removeEventListener}function h(t,e,r){if(!(e instanceof u))throw new TypeError("Failed to execute '"+r+"' on 'FileReader': parameter 1 is not of type 'Blob'.");t.result="",setTimeout(function(){this.readyState=l.LOADING,t.dispatchEvent(new Event("load")),t.dispatchEvent(new Event("loadend"))})}i.prototype.toString=function(){return"[object File]"},l.EMPTY=0,l.LOADING=1,l.DONE=2,l.prototype.error=null,l.prototype.onabort=null,l.prototype.onerror=null,l.prototype.onload=null,l.prototype.onloadend=null,l.prototype.onloadstart=null,l.prototype.onprogress=null,l.prototype.readAsDataURL=function(t){h(this,t,"readAsDataURL"),this.result="data:"+t.type+";base64,"+r(t._buffer)},l.prototype.readAsText=function(t){h(this,t,"readAsText"),this.result=e(t._buffer)},l.prototype.readAsArrayBuffer=function(t){h(this,t,"readAsText"),this.result=t._buffer.slice()},l.prototype.abort=function(){},URL.createObjectURL=function(t){return t instanceof u?"data:"+t.type+";base64,"+r(t._buffer):d.call(URL,t)},URL.revokeObjectURL=function(t){p&&p.call(URL,t)};var c=f.XMLHttpRequest&&f.XMLHttpRequest.prototype.send;c&&(XMLHttpRequest.prototype.send=function(t){t instanceof u?(this.setRequestHeader("Content-Type",t.type),c.call(this,e(t._buffer))):c.call(this,t)}),f.FileReader=l,f.File=i,f.Blob=u}()}("undefined"!=typeof self&&self||"undefined"!=typeof window&&window||void 0!==Ct&&Ct||Function('return typeof this === "object" && this.content')()||Function("return this")());var ut,lt,ht,ct,ft,dt,pt,gt,vt,mt,yt,bt,wt,_t,xt,se=se||function(s){if(!(void 0===s||"undefined"!=typeof navigator&&/MSIE [1-9]\./.test(navigator.userAgent))){var t=s.document,u=function(){return s.URL||s.webkitURL||s},l=t.createElementNS("http://www.w3.org/1999/xhtml","a"),h="download"in l,c=/constructor/i.test(s.HTMLElement)||s.safari,f=/CriOS\/[\d]+/.test(navigator.userAgent),d=s.setImmediate||s.setTimeout,p=function(t){d(function(){throw t},0)},g=function(t){setTimeout(function(){"string"==typeof t?u().revokeObjectURL(t):t.remove()},4e4)},v=function(t){return/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(t.type)?new Blob([String.fromCharCode(65279),t],{type:t.type}):t},n=function(t,r,e){e||(t=v(t));function n(){!function(t,e){for(var r=(e=[].concat(e)).length;r--;){var n=t["on"+e[r]];if("function"==typeof n)try{n.call(t,t)}catch(t){p(t)}}}(o,"writestart progress write writeend".split(" "))}var i,o=this,a="application/octet-stream"===t.type;if(o.readyState=o.INIT,h)return i=u().createObjectURL(t),void d(function(){var t,e;l.href=i,l.download=r,t=l,e=new MouseEvent("click"),t.dispatchEvent(e),n(),g(i),o.readyState=o.DONE},0);!function(){if((f||a&&c)&&s.FileReader){var e=new FileReader;return e.onloadend=function(){var t=f?e.result:e.result.replace(/^data:[^;]*;/,"data:attachment/file;");s.open(t,"_blank")||(s.location.href=t),t=void 0,o.readyState=o.DONE,n()},e.readAsDataURL(t),o.readyState=o.INIT}i=i||u().createObjectURL(t),!a&&s.open(i,"_blank")||(s.location.href=i),o.readyState=o.DONE,n(),g(i)}()},e=n.prototype;return"undefined"!=typeof navigator&&navigator.msSaveOrOpenBlob?function(t,e,r){return e=e||t.name||"download",r||(t=v(t)),navigator.msSaveOrOpenBlob(t,e)}:(e.abort=function(){},e.readyState=e.INIT=0,e.WRITING=1,e.DONE=2,e.error=e.onwritestart=e.onprogress=e.onwrite=e.onabort=e.onerror=e.onwriteend=null,function(t,e,r){return new n(t,e||t.name||"download",r)})}}("undefined"!=typeof self&&self||"undefined"!=typeof window&&window||void 0);function At(_){var t=0;if(71!==_[t++]||73!==_[t++]||70!==_[t++]||56!==_[t++]||56!=(_[t++]+1&253)||97!==_[t++])throw"Invalid GIF 87a/89a header.";var x=_[t++]|_[t++]<<8,e=_[t++]|_[t++]<<8,r=_[t++],n=r>>7,i=1<<1+(7&r);_[t++],_[t++];var o=null;n&&(o=t,t+=3*i);var a=!0,s=[],u=0,l=null,h=0,c=null;for(this.width=x,this.height=e;a&&t<_.length;)switch(_[t++]){case 33:switch(_[t++]){case 255:if(11!==_[t]||78==_[t+1]&&69==_[t+2]&&84==_[t+3]&&83==_[t+4]&&67==_[t+5]&&65==_[t+6]&&80==_[t+7]&&69==_[t+8]&&50==_[t+9]&&46==_[t+10]&&48==_[t+11]&&3==_[t+12]&&1==_[t+13]&&0==_[t+16])t+=14,c=_[t++]|_[t++]<<8,t++;else for(t+=12;0!==(L=_[t++]);)t+=L;break;case 249:if(4!==_[t++]||0!==_[t+4])throw"Invalid graphics extension block.";var f=_[t++];u=_[t++]|_[t++]<<8,l=_[t++],0==(1&f)&&(l=null),h=f>>2&7,t++;break;case 254:for(;0!==(L=_[t++]);)t+=L;break;default:throw"Unknown graphic control label: 0x"+_[t-1].toString(16)}break;case 44:var d=_[t++]|_[t++]<<8,p=_[t++]|_[t++]<<8,g=_[t++]|_[t++]<<8,v=_[t++]|_[t++]<<8,m=_[t++],y=m>>6&1,b=o,w=!1;m>>7&&(w=!0,b=t,t+=3*(1<<1+(7&m)));var A=t;for(t++;;){var L;if(0===(L=_[t++]))break;t+=L}s.push({x:d,y:p,width:g,height:v,has_local_palette:w,palette_offset:b,data_offset:A,data_length:t-A,transparent_index:l,interlaced:!!y,delay:u,disposal:h});break;case 59:a=!1;break;default:throw"Unknown gif block: 0x"+_[t-1].toString(16)}this.numFrames=function(){return s.length},this.loopCount=function(){return c},this.frameInfo=function(t){if(t<0||t>=s.length)throw"Frame index out of range.";return s[t]},this.decodeAndBlitFrameBGRA=function(t,e){var r=this.frameInfo(t),n=r.width*r.height,i=new Uint8Array(n);Lt(_,r.data_offset,i,n);var o=r.palette_offset,a=r.transparent_index;null===a&&(a=256);var s=r.width,u=x-s,l=s,h=4*(r.y*x+r.x),c=4*((r.y+r.height)*x+r.x),f=h,d=4*u;!0===r.interlaced&&(d+=4*(s+u)*7);for(var p=8,g=0,v=i.length;g<v;++g){var m=i[g];if(0===l&&(l=s,c<=(f+=d)&&(d=u+4*(s+u)*(p-1),f=h+(s+u)*(p<<1),p>>=1)),m===a)f+=4;else{var y=_[o+3*m],b=_[o+3*m+1],w=_[o+3*m+2];e[f++]=w,e[f++]=b,e[f++]=y,e[f++]=255}--l}},this.decodeAndBlitFrameRGBA=function(t,e){var r=this.frameInfo(t),n=r.width*r.height,i=new Uint8Array(n);Lt(_,r.data_offset,i,n);var o=r.palette_offset,a=r.transparent_index;null===a&&(a=256);var s=r.width,u=x-s,l=s,h=4*(r.y*x+r.x),c=4*((r.y+r.height)*x+r.x),f=h,d=4*u;!0===r.interlaced&&(d+=4*(s+u)*7);for(var p=8,g=0,v=i.length;g<v;++g){var m=i[g];if(0===l&&(l=s,c<=(f+=d)&&(d=u+4*(s+u)*(p-1),f=h+(s+u)*(p<<1),p>>=1)),m===a)f+=4;else{var y=_[o+3*m],b=_[o+3*m+1],w=_[o+3*m+2];e[f++]=y,e[f++]=b,e[f++]=w,e[f++]=255}--l}}}function Lt(t,e,r,n){for(var i=t[e++],o=1<<i,a=1+o,s=1+a,u=i+1,l=(1<<u)-1,h=0,c=0,f=0,d=t[e++],p=new Int32Array(4096),g=null;;){for(;h<16&&0!==d;)c|=t[e++]<<h,h+=8,1===d?d=t[e++]:--d;if(h<u)break;var v=c&l;if(c>>=u,h-=u,v!=o){if(v==a)break;for(var m=v<s?v:g,y=0,b=m;o<b;)b=p[b]>>8,++y;var w=b;if(n<f+y+(m!==v?1:0))return void console.log("Warning, gif stream longer than expected.");r[f++]=w;var _=f+=y;for(m!==v&&(r[f++]=w),b=m;y--;)b=p[b],r[--_]=255&b,b>>=8;null!==g&&s<4096&&(p[s++]=g<<8|w,l+1<=s&&u<12&&(++u,l=l<<1|1)),g=v}else s=1+a,l=(1<<(u=i+1))-1,g=null}return f!==n&&console.log("Warning, gif stream shorter than expected."),r}try{Ot.GifWriter=function(m,t,e,r){var y=0,n=void 0===(r=void 0===r?{}:r).loop?null:r.loop,b=void 0===r.palette?null:r.palette;if(t<=0||e<=0||65535<t||65535<e)throw"Width/Height invalid.";function w(t){var e=t.length;if(e<2||256<e||e&e-1)throw"Invalid code/color length, must be power of 2 and 2 .. 256.";return e}m[y++]=71,m[y++]=73,m[y++]=70,m[y++]=56,m[y++]=57,m[y++]=97;var i=0,o=0;if(null!==b){for(var a=w(b);a>>=1;)++i;if(a=1<<i,--i,void 0!==r.background){if(a<=(o=r.background))throw"Background index out of range.";if(0===o)throw"Background index explicitly passed as 0."}}if(m[y++]=255&t,m[y++]=t>>8&255,m[y++]=255&e,m[y++]=e>>8&255,m[y++]=(null!==b?128:0)|i,m[y++]=o,m[y++]=0,null!==b)for(var s=0,u=b.length;s<u;++s){var l=b[s];m[y++]=l>>16&255,m[y++]=l>>8&255,m[y++]=255&l}if(null!==n){if(n<0||65535<n)throw"Loop count invalid.";m[y++]=33,m[y++]=255,m[y++]=11,m[y++]=78,m[y++]=69,m[y++]=84,m[y++]=83,m[y++]=67,m[y++]=65,m[y++]=80,m[y++]=69,m[y++]=50,m[y++]=46,m[y++]=48,m[y++]=3,m[y++]=1,m[y++]=255&n,m[y++]=n>>8&255,m[y++]=0}var _=!1;this.addFrame=function(t,e,r,n,i,o){if(!0===_&&(--y,_=!1),o=void 0===o?{}:o,t<0||e<0||65535<t||65535<e)throw"x/y invalid.";if(r<=0||n<=0||65535<r||65535<n)throw"Width/Height invalid.";if(i.length<r*n)throw"Not enough pixels for the frame size.";var a=!0,s=o.palette;if(null==s&&(a=!1,s=b),null==s)throw"Must supply either a local or global palette.";for(var u=w(s),l=0;u>>=1;)++l;u=1<<l;var h=void 0===o.delay?0:o.delay,c=void 0===o.disposal?0:o.disposal;if(c<0||3<c)throw"Disposal out of range.";var f=!1,d=0;if(void 0!==o.transparent&&null!==o.transparent&&(f=!0,(d=o.transparent)<0||u<=d))throw"Transparent color index.";if(0===c&&!f&&0===h||(m[y++]=33,m[y++]=249,m[y++]=4,m[y++]=c<<2|(!0===f?1:0),m[y++]=255&h,m[y++]=h>>8&255,m[y++]=d,m[y++]=0),m[y++]=44,m[y++]=255&t,m[y++]=t>>8&255,m[y++]=255&e,m[y++]=e>>8&255,m[y++]=255&r,m[y++]=r>>8&255,m[y++]=255&n,m[y++]=n>>8&255,m[y++]=!0===a?128|l-1:0,!0===a)for(var p=0,g=s.length;p<g;++p){var v=s[p];m[y++]=v>>16&255,m[y++]=v>>8&255,m[y++]=255&v}y=function(e,r,t,n){e[r++]=t;var i=r++,o=1<<t,a=o-1,s=1+o,u=1+s,l=t+1,h=0,c=0;function f(t){for(;t<=h;)e[r++]=255&c,c>>=8,h-=8,r===i+256&&(e[i]=255,i=r++)}function d(t){c|=t<<h,h+=l,f(8)}var p=n[0]&a,g={};d(o);for(var v=1,m=n.length;v<m;++v){var y=n[v]&a,b=p<<8|y,w=g[b];if(void 0===w){for(c|=p<<h,h+=l;8<=h;)e[r++]=255&c,c>>=8,h-=8,r===i+256&&(e[i]=255,i=r++);4096===u?(d(o),u=1+s,l=t+1,g={}):(1<<l<=u&&++l,g[b]=u++),p=y}else p=w}return d(p),d(s),f(1),i+1===r?e[i]=0:(e[i]=r-i-1,e[r++]=0),r}(m,y,l<2?2:l,i)},this.end=function(){return!1===_&&(m[y++]=59,_=!0),y}},Ot.GifReader=At}catch(t){}function St(t){var x,A,L,S,e,c=Math.floor,N=new Array(64),P=new Array(64),E=new Array(64),k=new Array(64),m=new Array(65535),y=new Array(65535),$=new Array(64),b=new Array(64),C=[],T=0,O=7,I=new Array(64),B=new Array(64),M=new Array(64),r=new Array(256),j=new Array(2048),w=[0,1,5,6,14,15,27,28,2,4,7,13,16,26,29,42,3,8,12,17,25,30,41,43,9,11,18,24,31,40,44,53,10,19,23,32,39,45,52,54,20,22,33,38,46,51,55,60,21,34,37,47,50,56,59,61,35,36,48,49,57,58,62,63],F=[0,0,1,5,1,1,1,1,1,1,0,0,0,0,0,0,0],R=[0,1,2,3,4,5,6,7,8,9,10,11],D=[0,0,2,1,3,3,2,4,3,5,5,4,4,0,0,1,125],z=[1,2,3,0,4,17,5,18,33,49,65,6,19,81,97,7,34,113,20,50,129,145,161,8,35,66,177,193,21,82,209,240,36,51,98,114,130,9,10,22,23,24,25,26,37,38,39,40,41,42,52,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,225,226,227,228,229,230,231,232,233,234,241,242,243,244,245,246,247,248,249,250],q=[0,0,3,1,1,1,1,1,1,1,1,1,0,0,0,0,0],U=[0,1,2,3,4,5,6,7,8,9,10,11],H=[0,0,2,1,2,4,4,3,4,7,5,4,4,0,1,2,119],W=[0,1,2,3,17,4,5,33,49,6,18,65,81,7,97,113,19,34,50,129,8,20,66,145,161,177,193,9,35,51,82,240,21,98,114,209,10,22,36,52,225,37,241,23,24,25,26,38,39,40,41,42,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,130,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,226,227,228,229,230,231,232,233,234,242,243,244,245,246,247,248,249,250];function n(t,e){for(var r=0,n=0,i=new Array,o=1;o<=16;o++){for(var a=1;a<=t[o];a++)i[e[n]]=[],i[e[n]][0]=r,i[e[n]][1]=o,n++,r++;r*=2}return i}function G(t){for(var e=t[0],r=t[1]-1;0<=r;)e&1<<r&&(T|=1<<O),r--,--O<0&&(255==T?(V(255),V(0)):V(T),O=7,T=0)}function V(t){C.push(t)}function X(t){V(t>>8&255),V(255&t)}function Y(t,e,r,n,i){for(var o,a=i[0],s=i[240],u=function(t,e){var r,n,i,o,a,s,u,l,h,c,f=0;for(h=0;h<8;++h){r=t[f],n=t[f+1],i=t[f+2],o=t[f+3],a=t[f+4],s=t[f+5],u=t[f+6];var d=r+(l=t[f+7]),p=r-l,g=n+u,v=n-u,m=i+s,y=i-s,b=o+a,w=o-a,_=d+b,x=d-b,A=g+m,L=g-m;t[f]=_+A,t[f+4]=_-A;var S=.707106781*(L+x);t[f+2]=x+S,t[f+6]=x-S;var N=.382683433*((_=w+y)-(L=v+p)),P=.5411961*_+N,E=1.306562965*L+N,k=.707106781*(A=y+v),C=p+k,T=p-k;t[f+5]=T+P,t[f+3]=T-P,t[f+1]=C+E,t[f+7]=C-E,f+=8}for(h=f=0;h<8;++h){r=t[f],n=t[f+8],i=t[f+16],o=t[f+24],a=t[f+32],s=t[f+40],u=t[f+48];var O=r+(l=t[f+56]),I=r-l,B=n+u,M=n-u,j=i+s,F=i-s,R=o+a,D=o-a,z=O+R,q=O-R,U=B+j,H=B-j;t[f]=z+U,t[f+32]=z-U;var W=.707106781*(H+q);t[f+16]=q+W,t[f+48]=q-W;var G=.382683433*((z=D+F)-(H=M+I)),V=.5411961*z+G,X=1.306562965*H+G,Y=.707106781*(U=F+M),J=I+Y,K=I-Y;t[f+40]=K+V,t[f+24]=K-V,t[f+8]=J+X,t[f+56]=J-X,f++}for(h=0;h<64;++h)c=t[h]*e[h],$[h]=0<c?.5+c|0:c-.5|0;return $}(t,e),l=0;l<64;++l)b[w[l]]=u[l];var h=b[0]-r;r=b[0],0==h?G(n[0]):(G(n[y[o=32767+h]]),G(m[o]));for(var c=63;0<c&&0==b[c];c--);if(0==c)return G(a),r;for(var f,d=1;d<=c;){for(var p=d;0==b[d]&&d<=c;++d);var g=d-p;if(16<=g){f=g>>4;for(var v=1;v<=f;++v)G(s);g&=15}o=32767+b[d],G(i[(g<<4)+y[o]]),G(m[o]),d++}return 63!=c&&G(a),r}function J(t){t<=0&&(t=1),100<t&&(t=100),e!=t&&(function(t){for(var e=[16,11,10,16,24,40,51,61,12,12,14,19,26,58,60,55,14,13,16,24,40,57,69,56,14,17,22,29,51,87,80,62,18,22,37,56,68,109,103,77,24,35,55,64,81,104,113,92,49,64,78,87,103,121,120,101,72,92,95,98,112,100,103,99],r=0;r<64;r++){var n=c((e[r]*t+50)/100);n<1?n=1:255<n&&(n=255),N[w[r]]=n}for(var i=[17,18,24,47,99,99,99,99,18,21,26,66,99,99,99,99,24,26,56,99,99,99,99,99,47,66,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99],o=0;o<64;o++){var a=c((i[o]*t+50)/100);a<1?a=1:255<a&&(a=255),P[w[o]]=a}for(var s=[1,1.387039845,1.306562965,1.175875602,1,.785694958,.5411961,.275899379],u=0,l=0;l<8;l++)for(var h=0;h<8;h++)E[u]=1/(N[w[u]]*s[l]*s[h]*8),k[u]=1/(P[w[u]]*s[l]*s[h]*8),u++}(t<50?Math.floor(5e3/t):Math.floor(200-2*t)),e=t)}this.encode=function(t,e){var r,n;(new Date).getTime(),e&&J(e),C=new Array,T=0,O=7,X(65496),X(65504),X(16),V(74),V(70),V(73),V(70),V(0),V(1),V(1),V(0),X(1),X(1),V(0),V(0),function(){X(65499),X(132),V(0);for(var t=0;t<64;t++)V(N[t]);V(1);for(var e=0;e<64;e++)V(P[e])}(),r=t.width,n=t.height,X(65472),X(17),V(8),X(n),X(r),V(3),V(1),V(17),V(0),V(2),V(17),V(1),V(3),V(17),V(1),function(){X(65476),X(418),V(0);for(var t=0;t<16;t++)V(F[t+1]);for(var e=0;e<=11;e++)V(R[e]);V(16);for(var r=0;r<16;r++)V(D[r+1]);for(var n=0;n<=161;n++)V(z[n]);V(1);for(var i=0;i<16;i++)V(q[i+1]);for(var o=0;o<=11;o++)V(U[o]);V(17);for(var a=0;a<16;a++)V(H[a+1]);for(var s=0;s<=161;s++)V(W[s])}(),X(65498),X(12),V(3),V(1),V(0),V(2),V(17),V(3),V(17),V(0),V(63),V(0);var i=0,o=0,a=0;T=0,O=7,this.encode.displayName="_encode_";for(var s,u,l,h,c,f,d,p,g,v=t.data,m=t.width,y=t.height,b=4*m,w=0;w<y;){for(s=0;s<b;){for(f=c=b*w+s,d=-1,g=p=0;g<64;g++)f=c+(p=g>>3)*b+(d=4*(7&g)),y<=w+p&&(f-=b*(w+1+p-y)),b<=s+d&&(f-=s+d-b+4),u=v[f++],l=v[f++],h=v[f++],I[g]=(j[u]+j[l+256>>0]+j[h+512>>0]>>16)-128,B[g]=(j[u+768>>0]+j[l+1024>>0]+j[h+1280>>0]>>16)-128,M[g]=(j[u+1280>>0]+j[l+1536>>0]+j[h+1792>>0]>>16)-128;i=Y(I,E,i,x,L),o=Y(B,k,o,A,S),a=Y(M,k,a,A,S),s+=32}w+=8}if(0<=O){var _=[];_[1]=O+1,_[0]=(1<<O+1)-1,G(_)}return X(65497),new Uint8Array(C)},(new Date).getTime(),t=t||50,function(){for(var t=String.fromCharCode,e=0;e<256;e++)r[e]=t(e)}(),x=n(F,R),A=n(q,U),L=n(D,z),S=n(H,W),function(){for(var t=1,e=2,r=1;r<=15;r++){for(var n=t;n<e;n++)y[32767+n]=r,m[32767+n]=[],m[32767+n][1]=r,m[32767+n][0]=n;for(var i=-(e-1);i<=-t;i++)y[32767+i]=r,m[32767+i]=[],m[32767+i][1]=r,m[32767+i][0]=e-1+i;t<<=1,e<<=1}}(),function(){for(var t=0;t<256;t++)j[t]=19595*t,j[t+256>>0]=38470*t,j[t+512>>0]=7471*t+32768,j[t+768>>0]=-11059*t,j[t+1024>>0]=-21709*t,j[t+1280>>0]=32768*t+8421375,j[t+1536>>0]=-27439*t,j[t+1792>>0]=-5329*t}(),J(t),(new Date).getTime()}function Nt(t,e){if(this.pos=0,this.buffer=t,this.datav=new DataView(t.buffer),this.is_with_alpha=!!e,this.bottom_up=!0,this.flag=String.fromCharCode(this.buffer[0])+String.fromCharCode(this.buffer[1]),this.pos+=2,-1===["BM","BA","CI","CP","IC","PT"].indexOf(this.flag))throw new Error("Invalid BMP File");this.parseHeader(),this.parseBGR()}window.tmp=At,st.API.adler32cs=(dt="function"==typeof ArrayBuffer&&"function"==typeof Uint8Array,pt=null,gt=function(){if(!dt)return function(){return!1};try{var t={};"function"==typeof t.Buffer&&(pt=t.Buffer)}catch(t){}return function(t){return t instanceof ArrayBuffer||null!==pt&&t instanceof pt}}(),vt=null!==pt?function(t){return new pt(t,"utf8").toString("binary")}:function(t){return unescape(encodeURIComponent(t))},mt=function(t,e){for(var r=65535&t,n=t>>>16,i=0,o=e.length;i<o;i++)n=(n+(r=(r+(255&e.charCodeAt(i)))%65521))%65521;return(n<<16|r)>>>0},yt=function(t,e){for(var r=65535&t,n=t>>>16,i=0,o=e.length;i<o;i++)n=(n+(r=(r+e[i])%65521))%65521;return(n<<16|r)>>>0},wt=(bt={}).Adler32=(((ft=(ct=function(t){if(!(this instanceof ct))throw new TypeError("Constructor cannot called be as a function.");if(!isFinite(t=null==t?1:+t))throw new Error("First arguments needs to be a finite number.");this.checksum=t>>>0}).prototype={}).constructor=ct).from=((ut=function(t){if(!(this instanceof ct))throw new TypeError("Constructor cannot called be as a function.");if(null==t)throw new Error("First argument needs to be a string.");this.checksum=mt(1,t.toString())}).prototype=ft,ut),ct.fromUtf8=((lt=function(t){if(!(this instanceof ct))throw new TypeError("Constructor cannot called be as a function.");if(null==t)throw new Error("First argument needs to be a string.");var e=vt(t.toString());this.checksum=mt(1,e)}).prototype=ft,lt),dt&&(ct.fromBuffer=((ht=function(t){if(!(this instanceof ct))throw new TypeError("Constructor cannot called be as a function.");if(!gt(t))throw new Error("First argument needs to be ArrayBuffer.");var e=new Uint8Array(t);return this.checksum=yt(1,e)}).prototype=ft,ht)),ft.update=function(t){if(null==t)throw new Error("First argument needs to be a string.");return t=t.toString(),this.checksum=mt(this.checksum,t)},ft.updateUtf8=function(t){if(null==t)throw new Error("First argument needs to be a string.");var e=vt(t.toString());return this.checksum=mt(this.checksum,e)},dt&&(ft.updateBuffer=function(t){if(!gt(t))throw new Error("First argument needs to be ArrayBuffer.");var e=new Uint8Array(t);return this.checksum=yt(this.checksum,e)}),ft.clone=function(){return new wt(this.checksum)},ct),bt.from=function(t){if(null==t)throw new Error("First argument needs to be a string.");return mt(1,t.toString())},bt.fromUtf8=function(t){if(null==t)throw new Error("First argument needs to be a string.");var e=vt(t.toString());return mt(1,e)},dt&&(bt.fromBuffer=function(t){if(!gt(t))throw new Error("First argument need to be ArrayBuffer.");var e=new Uint8Array(t);return yt(1,e)}),bt),function(t){t.__bidiEngine__=t.prototype.__bidiEngine__=function(t){var p,g,c,f,i,o,a,s=e,v=[[0,3,0,1,0,0,0],[0,3,0,1,2,2,0],[0,3,0,17,2,0,1],[0,3,5,5,4,1,0],[0,3,21,21,4,0,1],[0,3,5,5,4,2,0]],m=[[2,0,1,1,0,1,0],[2,0,1,1,0,2,0],[2,0,2,1,3,2,0],[2,0,2,33,3,1,1]],y={L:0,R:1,EN:2,AN:3,N:4,B:5,S:6},u={0:0,5:1,6:2,7:3,32:4,251:5,254:6,255:7},l=["(",")","(","<",">","<","[","]","[","{","}","{","«","»","«","‹","›","‹","⁅","⁆","⁅","⁽","⁾","⁽","₍","₎","₍","≤","≥","≤","〈","〉","〈","﹙","﹚","﹙","﹛","﹜","﹛","﹝","﹞","﹝","﹤","﹥","﹤"],h=new RegExp(/^([1-4|9]|1[0-9]|2[0-9]|3[0168]|4[04589]|5[012]|7[78]|159|16[0-9]|17[0-2]|21[569]|22[03489]|250)$/),b=!1,w=0;this.__bidiEngine__={};function _(t){var e=t.charCodeAt(),r=e>>8,n=u[r];return void 0!==n?s[256*n+(255&e)]:252==r||253==r?"AL":h.test(r)?"L":8==r?"R":"N"}function d(t){for(var e,r=0;r<t.length;r++){if("L"===(e=_(t.charAt(r))))return!1;if("R"===e)return!0}return!1}function x(t,e,r,n){var i,o,a,s,u=e[n];switch(u){case"L":case"R":b=!1;break;case"N":case"AN":break;case"EN":b&&(u="AN");break;case"AL":b=!0,u="R";break;case"WS":u="N";break;case"CS":n<1||n+1>=e.length||"EN"!==(i=r[n-1])&&"AN"!==i||"EN"!==(o=e[n+1])&&"AN"!==o?u="N":b&&(o="AN"),u=o===i?o:"N";break;case"ES":u="EN"===(i=0<n?r[n-1]:"B")&&n+1<e.length&&"EN"===e[n+1]?"EN":"N";break;case"ET":if(0<n&&"EN"===r[n-1]){u="EN";break}if(b){u="N";break}for(a=n+1,s=e.length;a<s&&"ET"===e[a];)a++;u=a<s&&"EN"===e[a]?"EN":"N";break;case"NSM":if(c&&!f){for(s=e.length,a=n+1;a<s&&"NSM"===e[a];)a++;if(a<s){var l=t[n],h=1425<=l&&l<=2303||64286===l;if(i=e[a],h&&("R"===i||"AL"===i)){u="R";break}}}u=n<1||"B"===(i=e[n-1])?"N":r[n-1];break;case"B":p=!(b=!1),u=w;break;case"S":g=!0,u="N";break;case"LRE":case"RLE":case"LRO":case"RLO":case"PDF":b=!1;break;case"BN":u="N"}return u}function A(t,e,r){var n=t.split("");return r&&N(n,r,{hiLevel:w}),n.reverse(),e&&e.reverse(),n.join("")}function L(t,e,r,n,i){if(!(i.hiLevel<t)){if(1===t&&1===w&&!p)return e.reverse(),void(r&&r.reverse());for(var o,a,s,u,l=e.length,h=0;h<l;){if(n[h]>=t){for(s=h+1;s<l&&n[s]>=t;)s++;for(u=h,a=s-1;u<a;u++,a--)o=e[u],e[u]=e[a],e[a]=o,r&&(o=r[u],r[u]=r[a],r[a]=o);h=s}h++}}}function S(t,e,r){var n=t.split(""),i={hiLevel:w};return N(n,r=r||[],i),function(t,e){if(0!==i.hiLevel&&a)for(var r,n=0;n<t.length;n++)1===e[n]&&0<=(r=l.indexOf(t[n]))&&(t[n]=l[r+1])}(n,r),L(2,n,e,r,i),L(1,n,e,r,i),n.join("")}var N=function(t,e,r){var n,i,o,a,s,u=-1,l=t.length,h=0,c=[],f=w?m:v,d=[];for(g=p=b=!1,i=0;i<l;i++)d[i]=_(t[i]);for(o=0;o<l;o++){if(s=h,c[o]=x(t,d,c,o),n=240&(h=f[s][y[c[o]]]),h&=15,e[o]=a=f[h][5],0<n)if(16==n){for(i=u;i<o;i++)e[i]=1;u=-1}else u=-1;if(f[h][6])-1===u&&(u=o);else if(-1<u){for(i=u;i<o;i++)e[i]=a;u=-1}"B"===d[o]&&(e[o]=0),r.hiLevel|=a}g&&function(t,e,r){for(var n=0;n<r;n++)if("S"===t[n]){e[n]=w;for(var i=n-1;0<=i&&"WS"===t[i];i--)e[i]=w}}(d,e,l)};return this.__bidiEngine__.doBidiReorder=function(t,e,r){if(function(t,e){if(e)for(var r=0;r<t.length;r++)e[r]=r;void 0===f&&(f=d(t)),void 0===o&&(o=d(t))}(t,e),c||!i||o)if(c&&i&&f^o)w=f?1:0,t=A(t,e,r);else if(!c&&i&&o)w=f?1:0,t=S(t,e,r),t=A(t,e);else if(!c||f||i||o){if(c&&!i&&f^o)t=A(t,e),t=f?(w=0,S(t,e,r)):(w=1,t=S(t,e,r),A(t,e));else if(c&&f&&!i&&o)w=1,t=S(t,e,r),t=A(t,e);else if(!c&&!i&&f^o){var n=a;f?(w=1,t=S(t,e,r),w=0,a=!1,t=S(t,e,r),a=n):(w=0,t=S(t,e,r),t=A(t,e),a=!(w=1),t=S(t,e,r),a=n,t=A(t,e))}}else w=0,t=S(t,e,r);else w=f?1:0,t=S(t,e,r);return t},this.__bidiEngine__.setOptions=function(t){t&&(c=t.isInputVisual,i=t.isOutputVisual,f=t.isInputRtl,o=t.isOutputRtl,a=t.isSymmetricSwapping)},this.__bidiEngine__.setOptions(t),this.__bidiEngine__};var e=["BN","BN","BN","BN","BN","BN","BN","BN","BN","S","B","S","WS","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","B","B","B","S","WS","N","N","ET","ET","ET","N","N","N","N","N","ES","CS","ES","CS","CS","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","CS","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","BN","BN","BN","BN","BN","BN","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","CS","N","ET","ET","ET","ET","N","N","N","N","L","N","N","BN","N","N","ET","ET","EN","EN","N","L","N","N","N","EN","L","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","N","N","N","N","N","ET","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","R","NSM","R","NSM","NSM","R","NSM","NSM","R","NSM","N","N","N","N","N","N","N","N","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","N","N","N","N","N","R","R","R","R","R","N","N","N","N","N","N","N","N","N","N","N","AN","AN","AN","AN","AN","AN","N","N","AL","ET","ET","AL","CS","AL","N","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AL","AL","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AN","AN","AN","AN","AN","AN","AN","AN","AN","AN","ET","AN","AN","AL","AL","AL","NSM","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AN","N","NSM","NSM","NSM","NSM","NSM","NSM","AL","AL","NSM","NSM","N","NSM","NSM","NSM","NSM","AL","AL","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","N","AL","AL","NSM","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AL","N","N","N","N","N","N","N","N","N","N","N","N","N","N","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","R","R","N","N","N","N","R","N","N","N","N","N","WS","WS","WS","WS","WS","WS","WS","WS","WS","WS","WS","BN","BN","BN","L","R","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","WS","B","LRE","RLE","PDF","LRO","RLO","CS","ET","ET","ET","ET","ET","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","CS","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","WS","BN","BN","BN","BN","BN","N","LRI","RLI","FSI","PDI","BN","BN","BN","BN","BN","BN","EN","L","N","N","EN","EN","EN","EN","EN","EN","ES","ES","N","N","N","L","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","ES","ES","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","L","L","L","L","L","L","L","N","N","N","N","N","N","N","N","N","N","N","N","L","L","L","L","L","N","N","N","N","N","R","NSM","R","R","R","R","R","R","R","R","R","R","ES","R","R","R","R","R","R","R","R","R","R","R","R","R","N","R","R","R","R","R","N","R","N","R","R","N","R","R","N","R","R","R","R","R","R","R","R","R","R","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","CS","N","CS","N","N","CS","N","N","N","N","N","N","N","N","N","ET","N","N","ES","ES","N","N","N","N","N","ET","ET","N","N","N","N","N","AL","AL","AL","AL","AL","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","N","N","BN","N","N","N","ET","ET","ET","N","N","N","N","N","ES","CS","ES","CS","CS","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","CS","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","N","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","L","L","L","L","L","L","N","N","L","L","L","L","L","L","N","N","L","L","L","L","L","L","N","N","L","L","L","N","N","N","ET","ET","N","N","N","ET","ET","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N"],i=new t.__bidiEngine__({isInputVisual:!0});t.API.events.push(["postProcessText",function(t){var e=t.text,r=(t.x,t.y,t.options,t.mutex,[]);if("[object Array]"===Object.prototype.toString.call(e)){var n=0;for(r=[],n=0;n<e.length;n+=1)"[object Array]"===Object.prototype.toString.call(e[n])?r.push([i.doBidiReorder(e[n][0]),e[n][1],e[n][2]]):r.push([i.doBidiReorder(e[n])]);t.text=r}else t.text=i.doBidiReorder(e)}])}(st),window.tmp=St,Nt.prototype.parseHeader=function(){if(this.fileSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.reserved=this.datav.getUint32(this.pos,!0),this.pos+=4,this.offset=this.datav.getUint32(this.pos,!0),this.pos+=4,this.headerSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.width=this.datav.getUint32(this.pos,!0),this.pos+=4,this.height=this.datav.getInt32(this.pos,!0),this.pos+=4,this.planes=this.datav.getUint16(this.pos,!0),this.pos+=2,this.bitPP=this.datav.getUint16(this.pos,!0),this.pos+=2,this.compress=this.datav.getUint32(this.pos,!0),this.pos+=4,this.rawSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.hr=this.datav.getUint32(this.pos,!0),this.pos+=4,this.vr=this.datav.getUint32(this.pos,!0),this.pos+=4,this.colors=this.datav.getUint32(this.pos,!0),this.pos+=4,this.importantColors=this.datav.getUint32(this.pos,!0),this.pos+=4,16===this.bitPP&&this.is_with_alpha&&(this.bitPP=15),this.bitPP<15){var t=0===this.colors?1<<this.bitPP:this.colors;this.palette=new Array(t);for(var e=0;e<t;e++){var r=this.datav.getUint8(this.pos++,!0),n=this.datav.getUint8(this.pos++,!0),i=this.datav.getUint8(this.pos++,!0),o=this.datav.getUint8(this.pos++,!0);this.palette[e]={red:i,green:n,blue:r,quad:o}}}this.height<0&&(this.height*=-1,this.bottom_up=!1)},Nt.prototype.parseBGR=function(){this.pos=this.offset;try{var t="bit"+this.bitPP,e=this.width*this.height*4;this.data=new Uint8Array(e),this[t]()}catch(t){console.log("bit decode error:"+t)}},Nt.prototype.bit1=function(){var t=Math.ceil(this.width/8),e=t%4,r=0<=this.height?this.height-1:-this.height;for(r=this.height-1;0<=r;r--){for(var n=this.bottom_up?r:this.height-1-r,i=0;i<t;i++)for(var o=this.datav.getUint8(this.pos++,!0),a=n*this.width*4+8*i*4,s=0;s<8&&8*i+s<this.width;s++){var u=this.palette[o>>7-s&1];this.data[a+4*s]=u.blue,this.data[a+4*s+1]=u.green,this.data[a+4*s+2]=u.red,this.data[a+4*s+3]=255}0!=e&&(this.pos+=4-e)}},Nt.prototype.bit4=function(){for(var t=Math.ceil(this.width/2),e=t%4,r=this.height-1;0<=r;r--){for(var n=this.bottom_up?r:this.height-1-r,i=0;i<t;i++){var o=this.datav.getUint8(this.pos++,!0),a=n*this.width*4+2*i*4,s=o>>4,u=15&o,l=this.palette[s];if(this.data[a]=l.blue,this.data[1+a]=l.green,this.data[2+a]=l.red,this.data[3+a]=255,2*i+1>=this.width)break;l=this.palette[u],this.data[4+a]=l.blue,this.data[4+a+1]=l.green,this.data[4+a+2]=l.red,this.data[4+a+3]=255}0!=e&&(this.pos+=4-e)}},Nt.prototype.bit8=function(){for(var t=this.width%4,e=this.height-1;0<=e;e--){for(var r=this.bottom_up?e:this.height-1-e,n=0;n<this.width;n++){var i=this.datav.getUint8(this.pos++,!0),o=r*this.width*4+4*n;if(i<this.palette.length){var a=this.palette[i];this.data[o]=a.red,this.data[1+o]=a.green,this.data[2+o]=a.blue,this.data[3+o]=255}else this.data[o]=255,this.data[1+o]=255,this.data[2+o]=255,this.data[3+o]=255}0!=t&&(this.pos+=4-t)}},Nt.prototype.bit15=function(){for(var t=this.width%3,e=parseInt("11111",2),r=this.height-1;0<=r;r--){for(var n=this.bottom_up?r:this.height-1-r,i=0;i<this.width;i++){var o=this.datav.getUint16(this.pos,!0);this.pos+=2;var a=(o&e)/e*255|0,s=(o>>5&e)/e*255|0,u=(o>>10&e)/e*255|0,l=o>>15?255:0,h=n*this.width*4+4*i;this.data[h]=u,this.data[1+h]=s,this.data[2+h]=a,this.data[3+h]=l}this.pos+=t}},Nt.prototype.bit16=function(){for(var t=this.width%3,e=parseInt("11111",2),r=parseInt("111111",2),n=this.height-1;0<=n;n--){for(var i=this.bottom_up?n:this.height-1-n,o=0;o<this.width;o++){var a=this.datav.getUint16(this.pos,!0);this.pos+=2;var s=(a&e)/e*255|0,u=(a>>5&r)/r*255|0,l=(a>>11)/e*255|0,h=i*this.width*4+4*o;this.data[h]=l,this.data[1+h]=u,this.data[2+h]=s,this.data[3+h]=255}this.pos+=t}},Nt.prototype.bit24=function(){for(var t=this.height-1;0<=t;t--){for(var e=this.bottom_up?t:this.height-1-t,r=0;r<this.width;r++){var n=this.datav.getUint8(this.pos++,!0),i=this.datav.getUint8(this.pos++,!0),o=this.datav.getUint8(this.pos++,!0),a=e*this.width*4+4*r;this.data[a]=o,this.data[1+a]=i,this.data[2+a]=n,this.data[3+a]=255}this.pos+=this.width%4}},Nt.prototype.bit32=function(){for(var t=this.height-1;0<=t;t--)for(var e=this.bottom_up?t:this.height-1-t,r=0;r<this.width;r++){var n=this.datav.getUint8(this.pos++,!0),i=this.datav.getUint8(this.pos++,!0),o=this.datav.getUint8(this.pos++,!0),a=this.datav.getUint8(this.pos++,!0),s=e*this.width*4+4*r;this.data[s]=o,this.data[1+s]=i,this.data[2+s]=n,this.data[3+s]=a}},Nt.prototype.getData=function(){return this.data},window.tmp=Nt,function(t){var p=15,g=573,e=[0,1,2,3,4,4,5,5,6,6,6,6,7,7,7,7,8,8,8,8,8,8,8,8,9,9,9,9,9,9,9,9,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,0,0,16,17,18,18,19,19,20,20,20,20,21,21,21,21,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29];function ct(){var d=this;function u(t,e){for(var r=0;r|=1&t,t>>>=1,r<<=1,0<--e;);return r>>>1}d.build_tree=function(t){var e,r,n,i=d.dyn_tree,o=d.stat_desc.static_tree,a=d.stat_desc.elems,s=-1;for(t.heap_len=0,t.heap_max=g,e=0;e<a;e++)0!==i[2*e]?(t.heap[++t.heap_len]=s=e,t.depth[e]=0):i[2*e+1]=0;for(;t.heap_len<2;)i[2*(n=t.heap[++t.heap_len]=s<2?++s:0)]=1,t.depth[n]=0,t.opt_len--,o&&(t.static_len-=o[2*n+1]);for(d.max_code=s,e=Math.floor(t.heap_len/2);1<=e;e--)t.pqdownheap(i,e);for(n=a;e=t.heap[1],t.heap[1]=t.heap[t.heap_len--],t.pqdownheap(i,1),r=t.heap[1],t.heap[--t.heap_max]=e,t.heap[--t.heap_max]=r,i[2*n]=i[2*e]+i[2*r],t.depth[n]=Math.max(t.depth[e],t.depth[r])+1,i[2*e+1]=i[2*r+1]=n,t.heap[1]=n++,t.pqdownheap(i,1),2<=t.heap_len;);t.heap[--t.heap_max]=t.heap[1],function(t){var e,r,n,i,o,a,s=d.dyn_tree,u=d.stat_desc.static_tree,l=d.stat_desc.extra_bits,h=d.stat_desc.extra_base,c=d.stat_desc.max_length,f=0;for(i=0;i<=p;i++)t.bl_count[i]=0;for(s[2*t.heap[t.heap_max]+1]=0,e=t.heap_max+1;e<g;e++)c<(i=s[2*s[2*(r=t.heap[e])+1]+1]+1)&&(i=c,f++),s[2*r+1]=i,r>d.max_code||(t.bl_count[i]++,o=0,h<=r&&(o=l[r-h]),a=s[2*r],t.opt_len+=a*(i+o),u&&(t.static_len+=a*(u[2*r+1]+o)));if(0!==f){do{for(i=c-1;0===t.bl_count[i];)i--;t.bl_count[i]--,t.bl_count[i+1]+=2,t.bl_count[c]--,f-=2}while(0<f);for(i=c;0!==i;i--)for(r=t.bl_count[i];0!==r;)(n=t.heap[--e])>d.max_code||(s[2*n+1]!=i&&(t.opt_len+=(i-s[2*n+1])*s[2*n],s[2*n+1]=i),r--)}}(t),function(t,e,r){var n,i,o,a=[],s=0;for(n=1;n<=p;n++)a[n]=s=s+r[n-1]<<1;for(i=0;i<=e;i++)0!==(o=t[2*i+1])&&(t[2*i]=u(a[o]++,o))}(i,d.max_code,t.bl_count)}}function ft(t,e,r,n,i){this.static_tree=t,this.extra_bits=e,this.extra_base=r,this.elems=n,this.max_length=i}function r(t,e,r,n,i){this.good_length=t,this.max_lazy=e,this.nice_length=r,this.max_chain=n,this.func=i}ct._length_code=[0,1,2,3,4,5,6,7,8,8,9,9,10,10,11,11,12,12,12,12,13,13,13,13,14,14,14,14,15,15,15,15,16,16,16,16,16,16,16,16,17,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,28],ct.base_length=[0,1,2,3,4,5,6,7,8,10,12,14,16,20,24,28,32,40,48,56,64,80,96,112,128,160,192,224,0],ct.base_dist=[0,1,2,3,4,6,8,12,16,24,32,48,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096,6144,8192,12288,16384,24576],ct.d_code=function(t){return t<256?e[t]:e[256+(t>>>7)]},ct.extra_lbits=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],ct.extra_dbits=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],ct.extra_blbits=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],ct.bl_order=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],ft.static_ltree=[12,8,140,8,76,8,204,8,44,8,172,8,108,8,236,8,28,8,156,8,92,8,220,8,60,8,188,8,124,8,252,8,2,8,130,8,66,8,194,8,34,8,162,8,98,8,226,8,18,8,146,8,82,8,210,8,50,8,178,8,114,8,242,8,10,8,138,8,74,8,202,8,42,8,170,8,106,8,234,8,26,8,154,8,90,8,218,8,58,8,186,8,122,8,250,8,6,8,134,8,70,8,198,8,38,8,166,8,102,8,230,8,22,8,150,8,86,8,214,8,54,8,182,8,118,8,246,8,14,8,142,8,78,8,206,8,46,8,174,8,110,8,238,8,30,8,158,8,94,8,222,8,62,8,190,8,126,8,254,8,1,8,129,8,65,8,193,8,33,8,161,8,97,8,225,8,17,8,145,8,81,8,209,8,49,8,177,8,113,8,241,8,9,8,137,8,73,8,201,8,41,8,169,8,105,8,233,8,25,8,153,8,89,8,217,8,57,8,185,8,121,8,249,8,5,8,133,8,69,8,197,8,37,8,165,8,101,8,229,8,21,8,149,8,85,8,213,8,53,8,181,8,117,8,245,8,13,8,141,8,77,8,205,8,45,8,173,8,109,8,237,8,29,8,157,8,93,8,221,8,61,8,189,8,125,8,253,8,19,9,275,9,147,9,403,9,83,9,339,9,211,9,467,9,51,9,307,9,179,9,435,9,115,9,371,9,243,9,499,9,11,9,267,9,139,9,395,9,75,9,331,9,203,9,459,9,43,9,299,9,171,9,427,9,107,9,363,9,235,9,491,9,27,9,283,9,155,9,411,9,91,9,347,9,219,9,475,9,59,9,315,9,187,9,443,9,123,9,379,9,251,9,507,9,7,9,263,9,135,9,391,9,71,9,327,9,199,9,455,9,39,9,295,9,167,9,423,9,103,9,359,9,231,9,487,9,23,9,279,9,151,9,407,9,87,9,343,9,215,9,471,9,55,9,311,9,183,9,439,9,119,9,375,9,247,9,503,9,15,9,271,9,143,9,399,9,79,9,335,9,207,9,463,9,47,9,303,9,175,9,431,9,111,9,367,9,239,9,495,9,31,9,287,9,159,9,415,9,95,9,351,9,223,9,479,9,63,9,319,9,191,9,447,9,127,9,383,9,255,9,511,9,0,7,64,7,32,7,96,7,16,7,80,7,48,7,112,7,8,7,72,7,40,7,104,7,24,7,88,7,56,7,120,7,4,7,68,7,36,7,100,7,20,7,84,7,52,7,116,7,3,8,131,8,67,8,195,8,35,8,163,8,99,8,227,8],ft.static_dtree=[0,5,16,5,8,5,24,5,4,5,20,5,12,5,28,5,2,5,18,5,10,5,26,5,6,5,22,5,14,5,30,5,1,5,17,5,9,5,25,5,5,5,21,5,13,5,29,5,3,5,19,5,11,5,27,5,7,5,23,5],ft.static_l_desc=new ft(ft.static_ltree,ct.extra_lbits,257,286,p),ft.static_d_desc=new ft(ft.static_dtree,ct.extra_dbits,0,30,p),ft.static_bl_desc=new ft(null,ct.extra_blbits,0,19,7);var dt=[new r(0,0,0,0,0),new r(4,4,8,4,1),new r(4,5,16,8,1),new r(4,6,32,32,1),new r(4,4,16,16,2),new r(8,16,32,32,2),new r(8,16,128,128,2),new r(8,32,128,256,2),new r(32,128,258,1024,2),new r(32,258,258,4096,2)],pt=["need dictionary","stream end","","","stream error","data error","","buffer error","",""];function gt(t,e,r,n){var i=t[2*e],o=t[2*r];return i<o||i==o&&n[e]<=n[r]}function n(){var u,l,h,c,f,d,p,g,s,v,m,y,b,w,_,x,A,L,S,N,P,E,k,C,T,O,I,B,M,j,F,R,D,z,q,U,H,o,W,G,V,X=this,Y=new ct,J=new ct,K=new ct;function $(){var t;for(t=0;t<286;t++)F[2*t]=0;for(t=0;t<30;t++)R[2*t]=0;for(t=0;t<19;t++)D[2*t]=0;F[512]=1,X.opt_len=X.static_len=0,U=o=0}function Q(t,e){var r,n,i=-1,o=t[1],a=0,s=7,u=4;for(0===o&&(s=138,u=3),t[2*(e+1)+1]=65535,r=0;r<=e;r++)n=o,o=t[2*(r+1)+1],++a<s&&n==o||(a<u?D[2*n]+=a:0!==n?(n!=i&&D[2*n]++,D[32]++):a<=10?D[34]++:D[36]++,i=n,u=(a=0)===o?(s=138,3):n==o?(s=6,3):(s=7,4))}function Z(t){X.pending_buf[X.pending++]=t}function a(t){Z(255&t),Z(t>>>8&255)}function tt(t,e){var r,n=e;16-n<V?(a(G|=(r=t)<<V&65535),G=r>>>16-V,V+=n-16):(G|=t<<V&65535,V+=n)}function et(t,e){var r=2*t;tt(65535&e[r],65535&e[1+r])}function rt(t,e){var r,n,i=-1,o=t[1],a=0,s=7,u=4;for(0===o&&(s=138,u=3),r=0;r<=e;r++)if(n=o,o=t[2*(r+1)+1],!(++a<s&&n==o)){if(a<u)for(;et(n,D),0!=--a;);else 0!==n?(n!=i&&(et(n,D),a--),et(16,D),tt(a-3,2)):a<=10?(et(17,D),tt(a-3,3)):(et(18,D),tt(a-11,7));i=n,u=(a=0)===o?(s=138,3):n==o?(s=6,3):(s=7,4)}}function nt(){16==V?(a(G),V=G=0):8<=V&&(Z(255&G),G>>>=8,V-=8)}function it(t,e){var r,n,i;if(X.pending_buf[H+2*U]=t>>>8&255,X.pending_buf[H+2*U+1]=255&t,X.pending_buf[z+U]=255&e,U++,0===t?F[2*e]++:(o++,t--,F[2*(ct._length_code[e]+256+1)]++,R[2*ct.d_code(t)]++),0==(8191&U)&&2<I){for(r=8*U,n=P-A,i=0;i<30;i++)r+=R[2*i]*(5+ct.extra_dbits[i]);if(r>>>=3,o<Math.floor(U/2)&&r<Math.floor(n/2))return!0}return U==q-1}function ot(t,e){var r,n,i,o,a=0;if(0!==U)for(;r=X.pending_buf[H+2*a]<<8&65280|255&X.pending_buf[H+2*a+1],n=255&X.pending_buf[z+a],a++,0===r?et(n,t):(et((i=ct._length_code[n])+256+1,t),0!==(o=ct.extra_lbits[i])&&tt(n-=ct.base_length[i],o),et(i=ct.d_code(--r),e),0!==(o=ct.extra_dbits[i])&&tt(r-=ct.base_dist[i],o)),a<U;);et(256,t),W=t[513]}function at(){8<V?a(G):0<V&&Z(255&G),V=G=0}function st(t,e,r){var n,i;tt(0+(r?1:0),3),n=t,i=e,at(),W=8,a(i),a(~i),X.pending_buf.set(g.subarray(n,n+i),X.pending),X.pending+=i}function ut(t){var e,r,n,i,o,a;e=0<=A?A:-1,r=P-A,n=t,(a=0)<I?(Y.build_tree(X),J.build_tree(X),a=function(){var t;for(Q(F,Y.max_code),Q(R,J.max_code),K.build_tree(X),t=18;3<=t&&0===D[2*ct.bl_order[t]+1];t--);return X.opt_len+=3*(t+1)+5+5+4,t}(),i=X.opt_len+3+7>>>3,(o=X.static_len+3+7>>>3)<=i&&(i=o)):i=o=r+5,r+4<=i&&-1!=e?st(e,r,n):o==i?(tt(2+(n?1:0),3),ot(ft.static_ltree,ft.static_dtree)):(tt(4+(n?1:0),3),function(t,e,r){var n;for(tt(t-257,5),tt(e-1,5),tt(r-4,4),n=0;n<r;n++)tt(D[2*ct.bl_order[n]+1],3);rt(F,t-1),rt(R,e-1)}(Y.max_code+1,J.max_code+1,a+1),ot(F,R)),$(),n&&at(),A=P,u.flush_pending()}function lt(){var t,e,r,n;do{if(0==(n=s-k-P)&&0===P&&0===k)n=f;else if(-1==n)n--;else if(f+f-262<=P){for(g.set(g.subarray(f,f+f),0),E-=f,P-=f,A-=f,r=t=b;e=65535&m[--r],m[r]=f<=e?e-f:0,0!=--t;);for(r=t=f;e=65535&v[--r],v[r]=f<=e?e-f:0,0!=--t;);n+=f}if(0===u.avail_in)return;t=u.read_buf(g,P+k,n),3<=(k+=t)&&(y=((y=255&g[P])<<x^255&g[P+1])&_)}while(k<262&&0!==u.avail_in)}function ht(t){var e,r,n=T,i=P,o=C,a=f-262<P?P-(f-262):0,s=j,u=p,l=P+258,h=g[i+o-1],c=g[i+o];M<=C&&(n>>=2),k<s&&(s=k);do{if(g[(e=t)+o]==c&&g[e+o-1]==h&&g[e]==g[i]&&g[++e]==g[i+1]){i+=2,e++;do{}while(g[++i]==g[++e]&&g[++i]==g[++e]&&g[++i]==g[++e]&&g[++i]==g[++e]&&g[++i]==g[++e]&&g[++i]==g[++e]&&g[++i]==g[++e]&&g[++i]==g[++e]&&i<l);if(r=258-(l-i),i=l-258,o<r){if(E=t,s<=(o=r))break;h=g[i+o-1],c=g[i+o]}}}while((t=65535&v[t&u])>a&&0!=--n);return o<=k?o:k}X.depth=[],X.bl_count=[],X.heap=[],F=[],R=[],D=[],X.pqdownheap=function(t,e){for(var r=X.heap,n=r[e],i=e<<1;i<=X.heap_len&&(i<X.heap_len&&gt(t,r[i+1],r[i],X.depth)&&i++,!gt(t,n,r[i],X.depth));)r[e]=r[i],e=i,i<<=1;r[e]=n},X.deflateInit=function(t,e,r,n,i,o){return n=n||8,i=i||8,o=o||0,t.msg=null,-1==e&&(e=6),i<1||9<i||8!=n||r<9||15<r||e<0||9<e||o<0||2<o?-2:(t.dstate=X,p=(f=1<<(d=r))-1,_=(b=1<<(w=i+7))-1,x=Math.floor((w+3-1)/3),g=new Uint8Array(2*f),v=[],m=[],q=1<<i+6,X.pending_buf=new Uint8Array(4*q),h=4*q,H=Math.floor(q/2),z=3*q,I=e,B=o,(a=t).total_in=a.total_out=0,a.msg=null,X.pending=0,X.pending_out=0,l=113,c=0,Y.dyn_tree=F,Y.stat_desc=ft.static_l_desc,J.dyn_tree=R,J.stat_desc=ft.static_d_desc,K.dyn_tree=D,K.stat_desc=ft.static_bl_desc,V=G=0,W=8,$(),function(){var t;for(s=2*f,t=m[b-1]=0;t<b-1;t++)m[t]=0;O=dt[I].max_lazy,M=dt[I].good_length,j=dt[I].nice_length,T=dt[I].max_chain,L=C=2,y=N=k=A=P=0}(),0);var a},X.deflateEnd=function(){return 42!=l&&113!=l&&666!=l?-2:(X.pending_buf=null,g=v=m=null,X.dstate=null,113==l?-3:0)},X.deflateParams=function(t,e,r){var n=0;return-1==e&&(e=6),e<0||9<e||r<0||2<r?-2:(dt[I].func!=dt[e].func&&0!==t.total_in&&(n=t.deflate(1)),I!=e&&(O=dt[I=e].max_lazy,M=dt[I].good_length,j=dt[I].nice_length,T=dt[I].max_chain),B=r,n)},X.deflateSetDictionary=function(t,e,r){var n,i=r,o=0;if(!e||42!=l)return-2;if(i<3)return 0;for(f-262<i&&(o=r-(i=f-262)),g.set(e.subarray(o,o+i),0),A=P=i,y=((y=255&g[0])<<x^255&g[1])&_,n=0;n<=i-3;n++)y=(y<<x^255&g[n+2])&_,v[n&p]=m[y],m[y]=n;return 0},X.deflate=function(t,e){var r,n,i,o,a,s;if(4<e||e<0)return-2;if(!t.next_out||!t.next_in&&0!==t.avail_in||666==l&&4!=e)return t.msg=pt[4],-2;if(0===t.avail_out)return t.msg=pt[7],-5;if(u=t,o=c,c=e,42==l&&(n=8+(d-8<<4)<<8,3<(i=(I-1&255)>>1)&&(i=3),n|=i<<6,0!==P&&(n|=32),l=113,Z((s=n+=31-n%31)>>8&255),Z(255&s)),0!==X.pending){if(u.flush_pending(),0===u.avail_out)return c=-1,0}else if(0===u.avail_in&&e<=o&&4!=e)return u.msg=pt[7],-5;if(666==l&&0!==u.avail_in)return t.msg=pt[7],-5;if(0!==u.avail_in||0!==k||0!=e&&666!=l){switch(a=-1,dt[I].func){case 0:a=function(t){var e,r=65535;for(h-5<r&&(r=h-5);;){if(k<=1){if(lt(),0===k&&0==t)return 0;if(0===k)break}if(P+=k,e=A+r,((k=0)===P||e<=P)&&(k=P-e,P=e,ut(!1),0===u.avail_out))return 0;if(f-262<=P-A&&(ut(!1),0===u.avail_out))return 0}return ut(4==t),0===u.avail_out?4==t?2:0:4==t?3:1}(e);break;case 1:a=function(t){for(var e,r=0;;){if(k<262){if(lt(),k<262&&0==t)return 0;if(0===k)break}if(3<=k&&(y=(y<<x^255&g[P+2])&_,r=65535&m[y],v[P&p]=m[y],m[y]=P),0!==r&&(P-r&65535)<=f-262&&2!=B&&(L=ht(r)),3<=L)if(e=it(P-E,L-3),k-=L,L<=O&&3<=k){for(L--;y=(y<<x^255&g[++P+2])&_,r=65535&m[y],v[P&p]=m[y],m[y]=P,0!=--L;);P++}else P+=L,L=0,y=((y=255&g[P])<<x^255&g[P+1])&_;else e=it(0,255&g[P]),k--,P++;if(e&&(ut(!1),0===u.avail_out))return 0}return ut(4==t),0===u.avail_out?4==t?2:0:4==t?3:1}(e);break;case 2:a=function(t){for(var e,r,n=0;;){if(k<262){if(lt(),k<262&&0==t)return 0;if(0===k)break}if(3<=k&&(y=(y<<x^255&g[P+2])&_,n=65535&m[y],v[P&p]=m[y],m[y]=P),C=L,S=E,L=2,0!==n&&C<O&&(P-n&65535)<=f-262&&(2!=B&&(L=ht(n)),L<=5&&(1==B||3==L&&4096<P-E)&&(L=2)),3<=C&&L<=C){for(r=P+k-3,e=it(P-1-S,C-3),k-=C-1,C-=2;++P<=r&&(y=(y<<x^255&g[P+2])&_,n=65535&m[y],v[P&p]=m[y],m[y]=P),0!=--C;);if(N=0,L=2,P++,e&&(ut(!1),0===u.avail_out))return 0}else if(0!==N){if((e=it(0,255&g[P-1]))&&ut(!1),P++,k--,0===u.avail_out)return 0}else N=1,P++,k--}return 0!==N&&(e=it(0,255&g[P-1]),N=0),ut(4==t),0===u.avail_out?4==t?2:0:4==t?3:1}(e)}if(2!=a&&3!=a||(l=666),0==a||2==a)return 0===u.avail_out&&(c=-1),0;if(1==a){if(1==e)tt(2,3),et(256,ft.static_ltree),nt(),1+W+10-V<9&&(tt(2,3),et(256,ft.static_ltree),nt()),W=7;else if(st(0,0,!1),3==e)for(r=0;r<b;r++)m[r]=0;if(u.flush_pending(),0===u.avail_out)return c=-1,0}}return 4!=e?0:1}}function i(){this.next_in_index=0,this.next_out_index=0,this.avail_in=0,this.total_in=0,this.avail_out=0,this.total_out=0}i.prototype={deflateInit:function(t,e){return this.dstate=new n,e=e||p,this.dstate.deflateInit(this,t,e)},deflate:function(t){return this.dstate?this.dstate.deflate(this,t):-2},deflateEnd:function(){if(!this.dstate)return-2;var t=this.dstate.deflateEnd();return this.dstate=null,t},deflateParams:function(t,e){return this.dstate?this.dstate.deflateParams(this,t,e):-2},deflateSetDictionary:function(t,e){return this.dstate?this.dstate.deflateSetDictionary(this,t,e):-2},read_buf:function(t,e,r){var n=this.avail_in;return r<n&&(n=r),0===n?0:(this.avail_in-=n,t.set(this.next_in.subarray(this.next_in_index,this.next_in_index+n),e),this.next_in_index+=n,this.total_in+=n,n)},flush_pending:function(){var t=this,e=t.dstate.pending;e>t.avail_out&&(e=t.avail_out),0!==e&&(t.next_out.set(t.dstate.pending_buf.subarray(t.dstate.pending_out,t.dstate.pending_out+e),t.next_out_index),t.next_out_index+=e,t.dstate.pending_out+=e,t.total_out+=e,t.avail_out-=e,t.dstate.pending-=e,0===t.dstate.pending&&(t.dstate.pending_out=0))}};var o=t.zip||t;o.Deflater=o._jzlib_Deflater=function(t){var s=new i,u=new Uint8Array(512),e=t?t.level:-1;void 0===e&&(e=-1),s.deflateInit(e),s.next_out=u,this.append=function(t,e){var r,n=[],i=0,o=0,a=0;if(t.length){s.next_in_index=0,s.next_in=t,s.avail_in=t.length;do{if(s.next_out_index=0,s.avail_out=512,0!=s.deflate(0))throw new Error("deflating: "+s.msg);s.next_out_index&&(512==s.next_out_index?n.push(new Uint8Array(u)):n.push(new Uint8Array(u.subarray(0,s.next_out_index)))),a+=s.next_out_index,e&&0<s.next_in_index&&s.next_in_index!=i&&(e(s.next_in_index),i=s.next_in_index)}while(0<s.avail_in||0===s.avail_out);return r=new Uint8Array(a),n.forEach(function(t){r.set(t,o),o+=t.length}),r}},this.flush=function(){var t,e,r=[],n=0,i=0;do{if(s.next_out_index=0,s.avail_out=512,1!=(t=s.deflate(4))&&0!=t)throw new Error("deflating: "+s.msg);0<512-s.avail_out&&r.push(new Uint8Array(u.subarray(0,s.next_out_index))),i+=s.next_out_index}while(0<s.avail_in||0===s.avail_out);return s.deflateEnd(),e=new Uint8Array(i),r.forEach(function(t){e.set(t,n),n+=t.length}),e}}}("undefined"!=typeof self&&self||"undefined"!=typeof window&&window||void 0!==Ct&&Ct||Function('return typeof this === "object" && this.content')()||Function("return this")()),("undefined"!=typeof self&&self||"undefined"!=typeof window&&window||void 0!==Ct&&Ct||Function('return typeof this === "object" && this.content')()||Function("return this")()).RGBColor=function(t){var e;t=t||"",this.ok=!1,"#"==t.charAt(0)&&(t=t.substr(1,6)),t=(t=t.replace(/ /g,"")).toLowerCase();var r={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dodgerblue:"1e90ff",feldspar:"d19275",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgrey:"d3d3d3",lightgreen:"90ee90",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslateblue:"8470ff",lightslategray:"778899",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",red:"ff0000",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",violetred:"d02090",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32"};for(var n in r)t==n&&(t=r[n]);for(var i=[{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,example:["rgb(123, 234, 45)","rgb(255,234,245)"],process:function(t){return[parseInt(t[1]),parseInt(t[2]),parseInt(t[3])]}},{re:/^(\w{2})(\w{2})(\w{2})$/,example:["#00ff00","336699"],process:function(t){return[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]}},{re:/^(\w{1})(\w{1})(\w{1})$/,example:["#fb0","f0f"],process:function(t){return[parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16)]}}],o=0;o<i.length;o++){var a=i[o].re,s=i[o].process,u=a.exec(t);u&&(e=s(u),this.r=e[0],this.g=e[1],this.b=e[2],this.ok=!0)}this.r=this.r<0||isNaN(this.r)?0:255<this.r?255:this.r,this.g=this.g<0||isNaN(this.g)?0:255<this.g?255:this.g,this.b=this.b<0||isNaN(this.b)?0:255<this.b?255:this.b,this.toRGB=function(){return"rgb("+this.r+", "+this.g+", "+this.b+")"},this.toHex=function(){var t=this.r.toString(16),e=this.g.toString(16),r=this.b.toString(16);return 1==t.length&&(t="0"+t),1==e.length&&(e="0"+e),1==r.length&&(r="0"+r),"#"+t+e+r}},function(t){function l(t){var e=t.charCodeAt(0);return e===r||e===s?62:e===n||e===u?63:e<i?-1:e<i+10?e-i+26+26:e<a+26?e-a:e<o+26?e-o+26:void 0}var r="+".charCodeAt(0),n="/".charCodeAt(0),i="0".charCodeAt(0),o="a".charCodeAt(0),a="A".charCodeAt(0),s="-".charCodeAt(0),u="_".charCodeAt(0);function h(t,e,r){var n;if(this.rawData=t,n=this.contents=new Y(t),this.contents.pos=4,"ttcf"===n.readString(4)){if(!e)throw new Error("Must specify a font name for TTC files.");throw new Error("Font "+e+" not found in TTC file.")}n.pos=0,this.parse(),this.subset=new B(this),this.registerTTF()}t.API.TTFFont=(h.open=function(t,e,r,n){if("string"!=typeof r)throw new Error("Invalid argument supplied in TTFFont.open");return new h(function(t){var e,r,n,i,o;if(0<t.length%4)throw new Error("Invalid string. Length must be a multiple of 4");var a=t.length;i="="===t.charAt(a-2)?2:"="===t.charAt(a-1)?1:0,o=new Uint8Array(3*t.length/4-i),r=0<i?t.length-4:t.length;var s=0;function u(t){o[s++]=t}for(e=0;e<r;e+=4)u((16711680&(n=l(t.charAt(e))<<18|l(t.charAt(e+1))<<12|l(t.charAt(e+2))<<6|l(t.charAt(e+3))))>>16),u((65280&n)>>8),u(255&n);return 2==i?u(255&(n=l(t.charAt(e))<<2|l(t.charAt(e+1))>>4)):1==i&&(u((n=l(t.charAt(e))<<10|l(t.charAt(e+1))<<4|l(t.charAt(e+2))>>2)>>8&255),u(255&n)),o}(r),e)},h.prototype.parse=function(){return this.directory=new f(this.contents),this.head=new w(this),this.name=new N(this),this.cmap=new x(this),this.toUnicode=new Map,this.hhea=new A(this),this.maxp=new P(this),this.hmtx=new E(this),this.post=new S(this),this.os2=new L(this),this.loca=new I(this),this.glyf=new C(this),this.ascender=this.os2.exists&&this.os2.ascender||this.hhea.ascender,this.decender=this.os2.exists&&this.os2.decender||this.hhea.decender,this.lineGap=this.os2.exists&&this.os2.lineGap||this.hhea.lineGap,this.bbox=[this.head.xMin,this.head.yMin,this.head.xMax,this.head.yMax]},h.prototype.registerTTF=function(){var i,t,e,r,n;if(this.scaleFactor=1e3/this.head.unitsPerEm,this.bbox=function(){var t,e,r,n;for(n=[],t=0,e=(r=this.bbox).length;t<e;t++)i=r[t],n.push(Math.round(i*this.scaleFactor));return n}.call(this),this.stemV=0,this.post.exists?(e=255&(r=this.post.italic_angle),!0&(t=r>>16)&&(t=-(1+(65535^t))),this.italicAngle=+(t+"."+e)):this.italicAngle=0,this.ascender=Math.round(this.ascender*this.scaleFactor),this.decender=Math.round(this.decender*this.scaleFactor),this.lineGap=Math.round(this.lineGap*this.scaleFactor),this.capHeight=this.os2.exists&&this.os2.capHeight||this.ascender,this.xHeight=this.os2.exists&&this.os2.xHeight||0,this.familyClass=(this.os2.exists&&this.os2.familyClass||0)>>8,this.isSerif=1===(n=this.familyClass)||2===n||3===n||4===n||5===n||7===n,this.isScript=10===this.familyClass,this.flags=0,this.post.isFixedPitch&&(this.flags|=1),this.isSerif&&(this.flags|=2),this.isScript&&(this.flags|=8),0!==this.italicAngle&&(this.flags|=64),this.flags|=32,!this.cmap.unicode)throw new Error("No unicode cmap for font")},h.prototype.characterToGlyph=function(t){var e;return(null!=(e=this.cmap.unicode)?e.codeMap[t]:void 0)||0},h.prototype.widthOfGlyph=function(t){var e;return e=1e3/this.head.unitsPerEm,this.hmtx.forGlyph(t).advance*e},h.prototype.widthOfString=function(t,e,r){var n,i,o,a,s;for(i=a=o=0,s=(t=""+t).length;0<=s?a<s:s<a;i=0<=s?++a:--a)n=t.charCodeAt(i),o+=this.widthOfGlyph(this.characterToGlyph(n))+r*(1e3/e)||0;return o*(e/1e3)},h.prototype.lineHeight=function(t,e){var r;return null==e&&(e=!1),r=e?this.lineGap:0,(this.ascender+r-this.decender)/1e3*t},h);function e(t,e){for(var r in e)d.call(e,r)&&(t[r]=e[r]);function n(){this.constructor=t}return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t}var c,p,Y=(v.prototype.readByte=function(){return this.data[this.pos++]},v.prototype.writeByte=function(t){return this.data[this.pos++]=t},v.prototype.readUInt32=function(){return 16777216*this.readByte()+(this.readByte()<<16)+(this.readByte()<<8)+this.readByte()},v.prototype.writeUInt32=function(t){return this.writeByte(t>>>24&255),this.writeByte(t>>16&255),this.writeByte(t>>8&255),this.writeByte(255&t)},v.prototype.readInt32=function(){var t;return 2147483648<=(t=this.readUInt32())?t-4294967296:t},v.prototype.writeInt32=function(t){return t<0&&(t+=4294967296),this.writeUInt32(t)},v.prototype.readUInt16=function(){return this.readByte()<<8|this.readByte()},v.prototype.writeUInt16=function(t){return this.writeByte(t>>8&255),this.writeByte(255&t)},v.prototype.readInt16=function(){var t;return 32768<=(t=this.readUInt16())?t-65536:t},v.prototype.writeInt16=function(t){return t<0&&(t+=65536),this.writeUInt16(t)},v.prototype.readString=function(t){var e,r,n;for(r=[],e=n=0;0<=t?n<t:t<n;e=0<=t?++n:--n)r[e]=String.fromCharCode(this.readByte());return r.join("")},v.prototype.writeString=function(t){var e,r,n,i;for(i=[],e=r=0,n=t.length;0<=n?r<n:n<r;e=0<=n?++r:--r)i.push(this.writeByte(t.charCodeAt(e)));return i},v.prototype.readShort=function(){return this.readInt16()},v.prototype.writeShort=function(t){return this.writeInt16(t)},v.prototype.readLongLong=function(){var t,e,r,n,i,o,a,s;return t=this.readByte(),e=this.readByte(),r=this.readByte(),n=this.readByte(),i=this.readByte(),o=this.readByte(),a=this.readByte(),s=this.readByte(),128&t?-1*(72057594037927940*(255^t)+281474976710656*(255^e)+1099511627776*(255^r)+4294967296*(255^n)+16777216*(255^i)+65536*(255^o)+256*(255^a)+(255^s)+1):72057594037927940*t+281474976710656*e+1099511627776*r+4294967296*n+16777216*i+65536*o+256*a+s},v.prototype.writeLongLong=function(t){var e,r;return e=Math.floor(t/4294967296),r=4294967295&t,this.writeByte(e>>24&255),this.writeByte(e>>16&255),this.writeByte(e>>8&255),this.writeByte(255&e),this.writeByte(r>>24&255),this.writeByte(r>>16&255),this.writeByte(r>>8&255),this.writeByte(255&r)},v.prototype.readInt=function(){return this.readInt32()},v.prototype.writeInt=function(t){return this.writeInt32(t)},v.prototype.read=function(t){var e,r;for(e=[],r=0;0<=t?r<t:t<r;0<=t?++r:--r)e.push(this.readByte());return e},v.prototype.write=function(t){var e,r,n,i;for(i=[],r=0,n=t.length;r<n;r++)e=t[r],i.push(this.writeByte(e));return i},v),f=(g.prototype.encode=function(t){var e,r,n,i,o,a,s,u,l,h,c,f,d;for(d in c=Object.keys(t).length,a=Math.log(2),l=16*Math.floor(Math.log(c)/a),i=Math.floor(l/a),u=16*c-l,(r=new Y).writeInt(this.scalarType),r.writeShort(c),r.writeShort(l),r.writeShort(i),r.writeShort(u),n=16*c,s=r.pos+n,o=null,f=[],t)for(h=t[d],r.writeString(d),r.writeInt(p(h)),r.writeInt(s),r.writeInt(h.length),f=f.concat(h),"head"===d&&(o=s),s+=h.length;s%4;)f.push(0),s++;return r.write(f),e=2981146554-p(r.data),r.pos=o+8,r.writeUInt32(e),r.data},p=function(t){var e,r,n,i;for(t=k.call(t);t.length%4;)t.push(0);for(r=new Y(t),n=e=0,i=t.length;n<i;n+=4)e+=r.readUInt32();return 4294967295&e},g),d={}.hasOwnProperty;function g(t){var e,r,n;for(this.scalarType=t.readInt(),this.tableCount=t.readShort(),this.searchRange=t.readShort(),this.entrySelector=t.readShort(),this.rangeShift=t.readShort(),this.tables={},r=0,n=this.tableCount;0<=n?r<n:n<r;0<=n?++r:--r)e={tag:t.readString(4),checksum:t.readInt(),offset:t.readInt(),length:t.readInt()},this.tables[e.tag]=e}function v(t){this.data=null!=t?t:[],this.pos=0,this.length=this.data.length}function m(t){var e;this.file=t,e=this.file.directory.tables[this.tag],this.exists=!!e,e&&(this.offset=e.offset,this.length=e.length,this.parse(this.file.contents))}m.prototype.parse=function(){},m.prototype.encode=function(){},m.prototype.raw=function(){return this.exists?(this.file.contents.pos=this.offset,this.file.contents.read(this.length)):null};function y(t,e){this.raw=t,this.length=t.length,this.platformID=e.platformID,this.encodingID=e.encodingID,this.languageID=e.languageID}var b,w=(e(J,c=m),J.prototype.tag="head",J.prototype.parse=function(t){return t.pos=this.offset,this.version=t.readInt(),this.revision=t.readInt(),this.checkSumAdjustment=t.readInt(),this.magicNumber=t.readInt(),this.flags=t.readShort(),this.unitsPerEm=t.readShort(),this.created=t.readLongLong(),this.modified=t.readLongLong(),this.xMin=t.readShort(),this.yMin=t.readShort(),this.xMax=t.readShort(),this.yMax=t.readShort(),this.macStyle=t.readShort(),this.lowestRecPPEM=t.readShort(),this.fontDirectionHint=t.readShort(),this.indexToLocFormat=t.readShort(),this.glyphDataFormat=t.readShort()},J.prototype.encode=function(t){var e;return(e=new Y).writeInt(this.version),e.writeInt(this.revision),e.writeInt(this.checkSumAdjustment),e.writeInt(this.magicNumber),e.writeShort(this.flags),e.writeShort(this.unitsPerEm),e.writeLongLong(this.created),e.writeLongLong(this.modified),e.writeShort(this.xMin),e.writeShort(this.yMin),e.writeShort(this.xMax),e.writeShort(this.yMax),e.writeShort(this.macStyle),e.writeShort(this.lowestRecPPEM),e.writeShort(this.fontDirectionHint),e.writeShort(t),e.writeShort(this.glyphDataFormat),e.data},J),_=(X.encode=function(t,e){var r,n,i,o,a,s,u,l,h,c,f,d,p,g,v,m,y,b,w,_,x,A,L,S,N,P,E,k,C,T,O,I,B,M,j,F,R,D,z,q,U,H,W,G,V,X;switch(k=new Y,o=Object.keys(t).sort(function(t,e){return t-e}),e){case"macroman":for(p=0,g=function(){var t,e;for(e=[],d=t=0;t<256;d=++t)e.push(0);return e}(),m={0:0},i={},C=0,B=o.length;C<B;C++)null==m[W=t[n=o[C]]]&&(m[W]=++p),i[n]={old:t[n],new:m[t[n]]},g[n]=m[t[n]];return k.writeUInt16(1),k.writeUInt16(0),k.writeUInt32(12),k.writeUInt16(0),k.writeUInt16(262),k.writeUInt16(0),k.write(g),{charMap:i,subtable:k.data,maxGlyphID:p+1};case"unicode":for(P=[],h=[],m={},r={},v=u=null,T=y=0,M=o.length;T<M;T++)null==m[w=t[n=o[T]]]&&(m[w]=++y),r[n]={old:w,new:m[w]},a=m[w]-n,null!=v&&a===u||(v&&h.push(v),P.push(n),u=a),v=n;for(v&&h.push(v),h.push(65535),P.push(65535),S=2*(L=P.length),A=2*Math.pow(Math.log(L)/Math.LN2,2),c=Math.log(A/2)/Math.LN2,x=2*L-A,s=[],_=[],f=[],d=O=0,j=P.length;O<j;d=++O){if(N=P[d],l=h[d],65535===N){s.push(0),_.push(0);break}if(32768<=N-(E=r[N].new))for(s.push(0),_.push(2*(f.length+L-d)),n=I=N;N<=l?I<=l:l<=I;n=N<=l?++I:--I)f.push(r[n].new);else s.push(E-N),_.push(0)}for(k.writeUInt16(3),k.writeUInt16(1),k.writeUInt32(12),k.writeUInt16(4),k.writeUInt16(16+8*L+2*f.length),k.writeUInt16(0),k.writeUInt16(S),k.writeUInt16(A),k.writeUInt16(c),k.writeUInt16(x),U=0,F=h.length;U<F;U++)n=h[U],k.writeUInt16(n);for(k.writeUInt16(0),H=0,R=P.length;H<R;H++)n=P[H],k.writeUInt16(n);for(G=0,D=s.length;G<D;G++)a=s[G],k.writeUInt16(a);for(V=0,z=_.length;V<z;V++)b=_[V],k.writeUInt16(b);for(X=0,q=f.length;X<q;X++)p=f[X],k.writeUInt16(p);return{charMap:r,subtable:k.data,maxGlyphID:y+1}}},X),x=(e(V,c),V.prototype.tag="cmap",V.prototype.parse=function(t){var e,r,n;for(t.pos=this.offset,this.version=t.readUInt16(),r=t.readUInt16(),this.tables=[],this.unicode=null,n=0;0<=r?n<r:r<n;0<=r?++n:--n)e=new _(t,this.offset),this.tables.push(e),e.isUnicode&&null==this.unicode&&(this.unicode=e);return!0},V.encode=function(t,e){var r,n;return null==e&&(e="macroman"),r=_.encode(t,e),(n=new Y).writeUInt16(0),n.writeUInt16(1),r.table=n.data.concat(r.subtable),r},V),A=(e(G,c),G.prototype.tag="hhea",G.prototype.parse=function(t){return t.pos=this.offset,this.version=t.readInt(),this.ascender=t.readShort(),this.decender=t.readShort(),this.lineGap=t.readShort(),this.advanceWidthMax=t.readShort(),this.minLeftSideBearing=t.readShort(),this.minRightSideBearing=t.readShort(),this.xMaxExtent=t.readShort(),this.caretSlopeRise=t.readShort(),this.caretSlopeRun=t.readShort(),this.caretOffset=t.readShort(),t.pos+=8,this.metricDataFormat=t.readShort(),this.numberOfMetrics=t.readUInt16()},G),L=(e(W,c),W.prototype.tag="OS/2",W.prototype.parse=function(r){if(r.pos=this.offset,this.version=r.readUInt16(),this.averageCharWidth=r.readShort(),this.weightClass=r.readUInt16(),this.widthClass=r.readUInt16(),this.type=r.readShort(),this.ySubscriptXSize=r.readShort(),this.ySubscriptYSize=r.readShort(),this.ySubscriptXOffset=r.readShort(),this.ySubscriptYOffset=r.readShort(),this.ySuperscriptXSize=r.readShort(),this.ySuperscriptYSize=r.readShort(),this.ySuperscriptXOffset=r.readShort(),this.ySuperscriptYOffset=r.readShort(),this.yStrikeoutSize=r.readShort(),this.yStrikeoutPosition=r.readShort(),this.familyClass=r.readShort(),this.panose=function(){var t,e;for(e=[],t=0;t<10;++t)e.push(r.readByte());return e}(),this.charRange=function(){var t,e;for(e=[],t=0;t<4;++t)e.push(r.readInt());return e}(),this.vendorID=r.readString(4),this.selection=r.readShort(),this.firstCharIndex=r.readShort(),this.lastCharIndex=r.readShort(),0<this.version&&(this.ascent=r.readShort(),this.descent=r.readShort(),this.lineGap=r.readShort(),this.winAscent=r.readShort(),this.winDescent=r.readShort(),this.codePageRange=function(){var t,e;for(e=[],t=0;t<2;++t)e.push(r.readInt());return e}(),1<this.version))return this.xHeight=r.readShort(),this.capHeight=r.readShort(),this.defaultChar=r.readShort(),this.breakChar=r.readShort(),this.maxContext=r.readShort()},W),S=(e(H,c),H.prototype.tag="post",H.prototype.parse=function(n){var t,e,r,i;switch(n.pos=this.offset,this.format=n.readInt(),this.italicAngle=n.readInt(),this.underlinePosition=n.readShort(),this.underlineThickness=n.readShort(),this.isFixedPitch=n.readInt(),this.minMemType42=n.readInt(),this.maxMemType42=n.readInt(),this.minMemType1=n.readInt(),this.maxMemType1=n.readInt(),this.format){case 65536:break;case 131072:for(e=n.readUInt16(),this.glyphNameIndex=[],r=0;0<=e?r<e:e<r;0<=e?++r:--r)this.glyphNameIndex.push(n.readUInt16());for(this.names=[],i=[];n.pos<this.offset+this.length;)t=n.readByte(),i.push(this.names.push(n.readString(t)));return i;case 151552:return e=n.readUInt16(),this.offsets=n.read(e);case 196608:break;case 262144:return this.map=function(){var t,e,r;for(r=[],t=0,e=this.file.maxp.numGlyphs;0<=e?t<e:e<t;0<=e?++t:--t)r.push(n.readUInt32());return r}.call(this)}},H),N=(e(U,c),U.prototype.tag="name",U.prototype.parse=function(t){var e,r,n,i,o,a,s,u,l,h,c,f;for(t.pos=this.offset,t.readShort(),e=t.readShort(),a=t.readShort(),r=[],i=l=0;0<=e?l<e:e<l;i=0<=e?++l:--l)r.push({platformID:t.readShort(),encodingID:t.readShort(),languageID:t.readShort(),nameID:t.readShort(),length:t.readShort(),offset:this.offset+a+t.readShort()});for(s={},i=h=0,c=r.length;h<c;i=++h)n=r[i],t.pos=n.offset,u=t.readString(n.length),o=new y(u,n),null==s[f=n.nameID]&&(s[f]=[]),s[n.nameID].push(o);this.strings=s,this.copyright=s[0],this.fontFamily=s[1],this.fontSubfamily=s[2],this.uniqueSubfamily=s[3],this.fontName=s[4],this.version=s[5];try{this.postscriptName=s[6][0].raw.replace(/[\x00-\x19\x80-\xff]/g,"")}catch(t){this.postscriptName=s[4][0].raw.replace(/[\x00-\x19\x80-\xff]/g,"")}return this.trademark=s[7],this.manufacturer=s[8],this.designer=s[9],this.description=s[10],this.vendorUrl=s[11],this.designerUrl=s[12],this.license=s[13],this.licenseUrl=s[14],this.preferredFamily=s[15],this.preferredSubfamily=s[17],this.compatibleFull=s[18],this.sampleText=s[19]},U),P=(e(q,c),q.prototype.tag="maxp",q.prototype.parse=function(t){return t.pos=this.offset,this.version=t.readInt(),this.numGlyphs=t.readUInt16(),this.maxPoints=t.readUInt16(),this.maxContours=t.readUInt16(),this.maxCompositePoints=t.readUInt16(),this.maxComponentContours=t.readUInt16(),this.maxZones=t.readUInt16(),this.maxTwilightPoints=t.readUInt16(),this.maxStorage=t.readUInt16(),this.maxFunctionDefs=t.readUInt16(),this.maxInstructionDefs=t.readUInt16(),this.maxStackElements=t.readUInt16(),this.maxSizeOfInstructions=t.readUInt16(),this.maxComponentElements=t.readUInt16(),this.maxComponentDepth=t.readUInt16()},q),E=(e(z,c),z.prototype.tag="hmtx",z.prototype.parse=function(r){var t,n,i,e,o,a,s;for(r.pos=this.offset,this.metrics=[],e=0,a=this.file.hhea.numberOfMetrics;0<=a?e<a:a<e;0<=a?++e:--e)this.metrics.push({advance:r.readUInt16(),lsb:r.readInt16()});for(n=this.file.maxp.numGlyphs-this.file.hhea.numberOfMetrics,this.leftSideBearings=function(){var t,e;for(e=[],t=0;0<=n?t<n:n<t;0<=n?++t:--t)e.push(r.readInt16());return e}(),this.widths=function(){var t,e,r,n;for(n=[],t=0,e=(r=this.metrics).length;t<e;t++)i=r[t],n.push(i.advance);return n}.call(this),t=this.widths[this.widths.length-1],s=[],o=0;0<=n?o<n:n<o;0<=n?++o:--o)s.push(this.widths.push(t));return s},z.prototype.forGlyph=function(t){return t in this.metrics?this.metrics[t]:{advance:this.metrics[this.metrics.length-1].advance,lsb:this.leftSideBearings[t-this.metrics.length]}},z),k=[].slice,C=(e(D,c),D.prototype.tag="glyf",D.prototype.parse=function(t){return this.cache={}},D.prototype.glyphFor=function(t){var e,r,n,i,o,a,s,u,l,h;return(t=t)in this.cache?this.cache[t]:(i=this.file.loca,e=this.file.contents,r=i.indexOf(t),0===(n=i.lengthOf(t))?this.cache[t]=null:(e.pos=this.offset+r,o=(a=new Y(e.read(n))).readShort(),u=a.readShort(),h=a.readShort(),s=a.readShort(),l=a.readShort(),this.cache[t]=-1===o?new O(a,u,h,s,l):new T(a,o,u,h,s,l),this.cache[t]))},D.prototype.encode=function(t,e,r){var n,i,o,a,s;for(o=[],i=[],a=0,s=e.length;a<s;a++)n=t[e[a]],i.push(o.length),n&&(o=o.concat(n.encode(r)));return i.push(o.length),{table:o,offsets:i}},D),T=(R.prototype.encode=function(){return this.raw.data},R),O=(F.prototype.encode=function(t){var e,r,n,i,o;for(r=new Y(k.call(this.raw.data)),e=n=0,i=(o=this.glyphIDs).length;n<i;e=++n)o[e],r.pos=this.glyphOffsets[e];return r.data},F),I=(e(j,c),j.prototype.tag="loca",j.prototype.parse=function(n){var t;return n.pos=this.offset,t=this.file.head.indexToLocFormat,this.offsets=0===t?function(){var t,e,r;for(r=[],t=0,e=this.length;t<e;t+=2)r.push(2*n.readUInt16());return r}.call(this):function(){var t,e,r;for(r=[],t=0,e=this.length;t<e;t+=4)r.push(n.readUInt32());return r}.call(this)},j.prototype.indexOf=function(t){return this.offsets[t]},j.prototype.lengthOf=function(t){return this.offsets[t+1]-this.offsets[t]},j.prototype.encode=function(t,e){for(var r=new Uint32Array(this.offsets.length),n=0,i=0,o=0;o<r.length;++o)if(r[o]=n,i<e.length&&e[i]==o){++i,r[o]=n;var a=this.offsets[o],s=this.offsets[o+1]-a;0<s&&(n+=s)}for(var u=new Array(4*r.length),l=0;l<r.length;++l)u[4*l+3]=255&r[l],u[4*l+2]=(65280&r[l])>>8,u[4*l+1]=(16711680&r[l])>>16,u[4*l]=(4278190080&r[l])>>24;return u},j),B=(M.prototype.generateCmap=function(){var t,e,r,n,i;for(e in n=this.font.cmap.tables[0].codeMap,t={},i=this.subset)r=i[e],t[e]=n[r];return t},M.prototype.glyphsFor=function(t){var e,r,n,i,o,a,s;for(n={},o=0,a=t.length;o<a;o++)n[i=t[o]]=this.font.glyf.glyphFor(i);for(i in e=[],n)null!=(r=n[i])&&r.compound&&e.push.apply(e,r.glyphIDs);if(0<e.length)for(i in s=this.glyphsFor(e))r=s[i],n[i]=r;return n},M.prototype.encode=function(t,e){var r,n,i,o,a,s,u,l,h,c,f,d,p,g,v;for(n in r=x.encode(this.generateCmap(),"unicode"),o=this.glyphsFor(t),f={0:0},v=r.charMap)f[(s=v[n]).old]=s.new;for(d in c=r.maxGlyphID,o)d in f||(f[d]=c++);return l=function(t){var e,r;for(e in r={},t)r[t[e]]=e;return r}(f),h=Object.keys(l).sort(function(t,e){return t-e}),p=function(){var t,e,r;for(r=[],t=0,e=h.length;t<e;t++)a=h[t],r.push(l[a]);return r}(),i=this.font.glyf.encode(o,p,f),u=this.font.loca.encode(i.offsets,p),g={cmap:this.font.cmap.raw(),glyf:i.table,loca:u,hmtx:this.font.hmtx.raw(),hhea:this.font.hhea.raw(),maxp:this.font.maxp.raw(),post:this.font.post.raw(),name:this.font.name.raw(),head:this.font.head.encode(e)},this.font.os2.exists&&(g["OS/2"]=this.font.os2.raw()),this.font.directory.encode(g)},M);function M(t){this.font=t,this.subset={},this.unicodes={},this.next=33}function j(){return j.__super__.constructor.apply(this,arguments)}function F(t,e,r,n,i){var o,a;for(this.raw=t,this.xMin=e,this.yMin=r,this.xMax=n,this.yMax=i,this.compound=!0,this.glyphIDs=[],this.glyphOffsets=[],o=this.raw;a=o.readShort(),this.glyphOffsets.push(o.pos),this.glyphIDs.push(o.readShort()),32&a;)o.pos+=1&a?4:2,128&a?o.pos+=8:64&a?o.pos+=4:8&a&&(o.pos+=2)}function R(t,e,r,n,i,o){this.raw=t,this.numberOfContours=e,this.xMin=r,this.yMin=n,this.xMax=i,this.yMax=o,this.compound=!1}function D(){return D.__super__.constructor.apply(this,arguments)}function z(){return z.__super__.constructor.apply(this,arguments)}function q(){return q.__super__.constructor.apply(this,arguments)}function U(){return U.__super__.constructor.apply(this,arguments)}function H(){return H.__super__.constructor.apply(this,arguments)}function W(){return W.__super__.constructor.apply(this,arguments)}function G(){return G.__super__.constructor.apply(this,arguments)}function V(){return V.__super__.constructor.apply(this,arguments)}function X(r,t){var e,n,i,o,a,s,u,l,h,c,f,d,p,g,v,m,y,b;switch(this.platformID=r.readUInt16(),this.encodingID=r.readShort(),this.offset=t+r.readInt(),h=r.pos,r.pos=this.offset,this.format=r.readUInt16(),this.length=r.readUInt16(),this.language=r.readUInt16(),this.isUnicode=3===this.platformID&&1===this.encodingID&&4===this.format||0===this.platformID&&4===this.format,this.codeMap={},this.format){case 0:for(s=v=0;v<256;s=++v)this.codeMap[s]=r.readByte();break;case 4:for(f=r.readUInt16(),c=f/2,r.pos+=6,i=function(){var t,e;for(e=[],s=t=0;0<=c?t<c:c<t;s=0<=c?++t:--t)e.push(r.readUInt16());return e}(),r.pos+=2,p=function(){var t,e;for(e=[],s=t=0;0<=c?t<c:c<t;s=0<=c?++t:--t)e.push(r.readUInt16());return e}(),u=function(){var t,e;for(e=[],s=t=0;0<=c?t<c:c<t;s=0<=c?++t:--t)e.push(r.readUInt16());return e}(),l=function(){var t,e;for(e=[],s=t=0;0<=c?t<c:c<t;s=0<=c?++t:--t)e.push(r.readUInt16());return e}(),n=(this.length-r.pos+this.offset)/2,a=function(){var t,e;for(e=[],s=t=0;0<=n?t<n:n<t;s=0<=n?++t:--t)e.push(r.readUInt16());return e}(),s=m=0,b=i.length;m<b;s=++m)for(g=i[s],e=y=d=p[s];d<=g?y<=g:g<=y;e=d<=g?++y:--y)0===l[s]?o=e+u[s]:0!==(o=a[l[s]/2+(e-d)-(c-s)]||0)&&(o+=u[s]),this.codeMap[e]=65535&o}r.pos=h}function J(){return J.__super__.constructor.apply(this,arguments)}function K(){}t.API.PDFObject=(b=function(t,e){return(Array(e+1).join("0")+t).slice(-e)},K.convert=function(n){var i,t,e,r;if(Array.isArray(n))return"["+function(){var t,e,r;for(r=[],t=0,e=n.length;t<e;t++)i=n[t],r.push(K.convert(i));return r}().join(" ")+"]";if("string"==typeof n)return"/"+n;if(null!=n&&n.isString)return"("+n+")";if(n instanceof Date)return"(D:"+b(n.getUTCFullYear(),4)+b(n.getUTCMonth(),2)+b(n.getUTCDate(),2)+b(n.getUTCHours(),2)+b(n.getUTCMinutes(),2)+b(n.getUTCSeconds(),2)+"Z)";if("[object Object]"!=={}.toString.call(n))return""+n;for(t in e=["<<"],n)r=n[t],e.push("/"+t+" "+K.convert(r));return e.push(">>"),e.join("\n")},K)}(st),_t="undefined"!=typeof self&&self||"undefined"!=typeof window&&window||void 0!==Ct&&Ct||Function('return typeof this === "object" && this.content')()||Function("return this")(),xt=function(){var l,r,n;function i(t){var e,r,n,i,o,a,s,u,l,h,c,f,d,p;for(this.data=t,this.pos=8,this.palette=[],this.imgData=[],this.transparency={},this.animation=null,this.text={},a=null;;){switch(e=this.readUInt32(),l=function(){var t,e;for(e=[],t=0;t<4;++t)e.push(String.fromCharCode(this.data[this.pos++]));return e}.call(this).join("")){case"IHDR":this.width=this.readUInt32(),this.height=this.readUInt32(),this.bits=this.data[this.pos++],this.colorType=this.data[this.pos++],this.compressionMethod=this.data[this.pos++],this.filterMethod=this.data[this.pos++],this.interlaceMethod=this.data[this.pos++];break;case"acTL":this.animation={numFrames:this.readUInt32(),numPlays:this.readUInt32()||1/0,frames:[]};break;case"PLTE":this.palette=this.read(e);break;case"fcTL":a&&this.animation.frames.push(a),this.pos+=4,a={width:this.readUInt32(),height:this.readUInt32(),xOffset:this.readUInt32(),yOffset:this.readUInt32()},o=this.readUInt16(),i=this.readUInt16()||100,a.delay=1e3*o/i,a.disposeOp=this.data[this.pos++],a.blendOp=this.data[this.pos++],a.data=[];break;case"IDAT":case"fdAT":for("fdAT"===l&&(this.pos+=4,e-=4),t=(null!=a?a.data:void 0)||this.imgData,f=0;0<=e?f<e:e<f;0<=e?++f:--f)t.push(this.data[this.pos++]);break;case"tRNS":switch(this.transparency={},this.colorType){case 3:if(n=this.palette.length/3,this.transparency.indexed=this.read(e),this.transparency.indexed.length>n)throw new Error("More transparent colors than palette size");if(0<(h=n-this.transparency.indexed.length))for(d=0;0<=h?d<h:h<d;0<=h?++d:--d)this.transparency.indexed.push(255);break;case 0:this.transparency.grayscale=this.read(e)[0];break;case 2:this.transparency.rgb=this.read(e)}break;case"tEXt":s=(c=this.read(e)).indexOf(0),u=String.fromCharCode.apply(String,c.slice(0,s)),this.text[u]=String.fromCharCode.apply(String,c.slice(s+1));break;case"IEND":return a&&this.animation.frames.push(a),this.colors=function(){switch(this.colorType){case 0:case 3:case 4:return 1;case 2:case 6:return 3}}.call(this),this.hasAlphaChannel=4===(p=this.colorType)||6===p,r=this.colors+(this.hasAlphaChannel?1:0),this.pixelBitlength=this.bits*r,this.colorSpace=function(){switch(this.colors){case 1:return"DeviceGray";case 3:return"DeviceRGB"}}.call(this),void(this.imgData=new Uint8Array(this.imgData));default:this.pos+=e}if(this.pos+=4,this.pos>this.data.length)throw new Error("Incomplete or corrupt PNG file")}}i.load=function(t,e,r){var n;return"function"==typeof e&&(r=e),(n=new XMLHttpRequest).open("GET",t,!0),n.responseType="arraybuffer",n.onload=function(){var t;return t=new i(new Uint8Array(n.response||n.mozResponseArrayBuffer)),"function"==typeof(null!=e?e.getContext:void 0)&&t.render(e),"function"==typeof r?r(t):void 0},n.send(null)},i.prototype.read=function(t){var e,r;for(r=[],e=0;0<=t?e<t:t<e;0<=t?++e:--e)r.push(this.data[this.pos++]);return r},i.prototype.readUInt32=function(){return this.data[this.pos++]<<24|this.data[this.pos++]<<16|this.data[this.pos++]<<8|this.data[this.pos++]},i.prototype.readUInt16=function(){return this.data[this.pos++]<<8|this.data[this.pos++]},i.prototype.decodePixels=function(T){var O=this.pixelBitlength/8,I=new Uint8Array(this.width*this.height*O),B=0,M=this;if(null==T&&(T=this.imgData),0===T.length)return new Uint8Array(0);function t(t,e,r,n){var i,o,a,s,u,l,h,c,f,d,p,g,v,m,y,b,w,_,x,A,L,S=Math.ceil((M.width-t)/r),N=Math.ceil((M.height-e)/n),P=M.width==S&&M.height==N;for(m=O*S,g=P?I:new Uint8Array(m*N),l=T.length,o=v=0;v<N&&B<l;){switch(T[B++]){case 0:for(s=w=0;w<m;s=w+=1)g[o++]=T[B++];break;case 1:for(s=_=0;_<m;s=_+=1)i=T[B++],u=s<O?0:g[o-O],g[o++]=(i+u)%256;break;case 2:for(s=x=0;x<m;s=x+=1)i=T[B++],a=(s-s%O)/O,y=v&&g[(v-1)*m+a*O+s%O],g[o++]=(y+i)%256;break;case 3:for(s=A=0;A<m;s=A+=1)i=T[B++],a=(s-s%O)/O,u=s<O?0:g[o-O],y=v&&g[(v-1)*m+a*O+s%O],g[o++]=(i+Math.floor((u+y)/2))%256;break;case 4:for(s=L=0;L<m;s=L+=1)i=T[B++],a=(s-s%O)/O,u=s<O?0:g[o-O],0===v?y=b=0:(y=g[(v-1)*m+a*O+s%O],b=a&&g[(v-1)*m+(a-1)*O+s%O]),h=u+y-b,c=Math.abs(h-u),d=Math.abs(h-y),p=Math.abs(h-b),f=c<=d&&c<=p?u:d<=p?y:b,g[o++]=(i+f)%256;break;default:throw new Error("Invalid filter algorithm: "+T[B-1])}if(!P){var E=((e+v*n)*M.width+t)*O,k=v*m;for(s=0;s<S;s+=1){for(var C=0;C<O;C+=1)I[E++]=g[k++];E+=(r-1)*O}}v++}}return T=(T=new Et(T)).getBytes(),1==M.interlaceMethod?(t(0,0,8,8),t(4,0,8,8),t(0,4,4,8),t(2,0,4,4),t(0,2,2,4),t(1,0,2,2),t(0,1,1,2)):t(0,0,1,1),I},i.prototype.decodePalette=function(){var t,e,r,n,i,o,a,s,u;for(r=this.palette,o=this.transparency.indexed||[],i=new Uint8Array((o.length||0)+r.length),n=0,r.length,e=a=t=0,s=r.length;a<s;e=a+=3)i[n++]=r[e],i[n++]=r[e+1],i[n++]=r[e+2],i[n++]=null!=(u=o[t++])?u:255;return i},i.prototype.copyToImageData=function(t,e){var r,n,i,o,a,s,u,l,h,c,f;if(n=this.colors,h=null,r=this.hasAlphaChannel,this.palette.length&&(h=null!=(f=this._decodedPalette)?f:this._decodedPalette=this.decodePalette(),n=4,r=!0),l=(i=t.data||t).length,a=h||e,o=s=0,1===n)for(;o<l;)u=h?4*e[o/4]:s,c=a[u++],i[o++]=c,i[o++]=c,i[o++]=c,i[o++]=r?a[u++]:255,s=u;else for(;o<l;)u=h?4*e[o/4]:s,i[o++]=a[u++],i[o++]=a[u++],i[o++]=a[u++],i[o++]=r?a[u++]:255,s=u},i.prototype.decode=function(){var t;return t=new Uint8Array(this.width*this.height*4),this.copyToImageData(t,this.decodePixels()),t};try{r=_t.document.createElement("canvas"),n=r.getContext("2d")}catch(t){return-1}return l=function(t){var e;return n.width=t.width,n.height=t.height,n.clearRect(0,0,t.width,t.height),n.putImageData(t,0,0),(e=new Image).src=r.toDataURL(),e},i.prototype.decodeFrames=function(t){var e,r,n,i,o,a,s,u;if(this.animation){for(u=[],r=o=0,a=(s=this.animation.frames).length;o<a;r=++o)e=s[r],n=t.createImageData(e.width,e.height),i=this.decodePixels(new Uint8Array(e.data)),this.copyToImageData(n,i),e.imageData=n,u.push(e.image=l(n));return u}},i.prototype.renderFrame=function(t,e){var r,n,i;return r=(n=this.animation.frames)[e],i=n[e-1],0===e&&t.clearRect(0,0,this.width,this.height),1===(null!=i?i.disposeOp:void 0)?t.clearRect(i.xOffset,i.yOffset,i.width,i.height):2===(null!=i?i.disposeOp:void 0)&&t.putImageData(i.imageData,i.xOffset,i.yOffset),0===r.blendOp&&t.clearRect(r.xOffset,r.yOffset,r.width,r.height),t.drawImage(r.image,r.xOffset,r.yOffset)},i.prototype.animate=function(r){var n,i,o,a,s,t,u=this;return i=0,t=this.animation,a=t.numFrames,o=t.frames,s=t.numPlays,(n=function(){var t,e;if(t=i++%a,e=o[t],u.renderFrame(r,t),1<a&&i/a<s)return u.animation._timeout=setTimeout(n,e.delay)})()},i.prototype.stopAnimation=function(){var t;return clearTimeout(null!=(t=this.animation)?t._timeout:void 0)},i.prototype.render=function(t){var e,r;return t._png&&t._png.stopAnimation(),t._png=this,t.width=this.width,t.height=this.height,e=t.getContext("2d"),this.animation?(this.decodeFrames(e),this.animate(e)):(r=e.createImageData(this.width,this.height),this.copyToImageData(r,this.decodePixels()),e.putImageData(r,0,0))},i}(),_t.PNG=xt;var Pt=(kt.prototype={ensureBuffer:function(t){var e=this.buffer,r=e?e.byteLength:0;if(t<r)return e;for(var n=512;n<t;)n<<=1;for(var i=new Uint8Array(n),o=0;o<r;++o)i[o]=e[o];return this.buffer=i},getByte:function(){for(var t=this.pos;this.bufferLength<=t;){if(this.eof)return null;this.readBlock()}return this.buffer[this.pos++]},getBytes:function(t){var e=this.pos;if(t){this.ensureBuffer(e+t);for(var r=e+t;!this.eof&&this.bufferLength<r;)this.readBlock();var n=this.bufferLength;n<r&&(r=n)}else{for(;!this.eof;)this.readBlock();r=this.bufferLength}return this.pos=r,this.buffer.subarray(e,r)},lookChar:function(){for(var t=this.pos;this.bufferLength<=t;){if(this.eof)return null;this.readBlock()}return String.fromCharCode(this.buffer[this.pos])},getChar:function(){for(var t=this.pos;this.bufferLength<=t;){if(this.eof)return null;this.readBlock()}return String.fromCharCode(this.buffer[this.pos++])},makeSubStream:function(t,e,r){for(var n=t+e;this.bufferLength<=n&&!this.eof;)this.readBlock();return new Stream(this.buffer,t,e,r)},skip:function(t){t=t||1,this.pos+=t},reset:function(){this.pos=0}},kt),Et=function(){if("undefined"!=typeof Uint32Array){var k=new Uint32Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),C=new Uint32Array([3,4,5,6,7,8,9,10,65547,65549,65551,65553,131091,131095,131099,131103,196643,196651,196659,196667,262211,262227,262243,262259,327811,327843,327875,327907,258,258,258]),T=new Uint32Array([1,2,3,4,65541,65543,131081,131085,196625,196633,262177,262193,327745,327777,393345,393409,459009,459137,524801,525057,590849,591361,657409,658433,724993,727041,794625,798721,868353,876545]),O=[new Uint32Array([459008,524368,524304,524568,459024,524400,524336,590016,459016,524384,524320,589984,524288,524416,524352,590048,459012,524376,524312,589968,459028,524408,524344,590032,459020,524392,524328,59e4,524296,524424,524360,590064,459010,524372,524308,524572,459026,524404,524340,590024,459018,524388,524324,589992,524292,524420,524356,590056,459014,524380,524316,589976,459030,524412,524348,590040,459022,524396,524332,590008,524300,524428,524364,590072,459009,524370,524306,524570,459025,524402,524338,590020,459017,524386,524322,589988,524290,524418,524354,590052,459013,524378,524314,589972,459029,524410,524346,590036,459021,524394,524330,590004,524298,524426,524362,590068,459011,524374,524310,524574,459027,524406,524342,590028,459019,524390,524326,589996,524294,524422,524358,590060,459015,524382,524318,589980,459031,524414,524350,590044,459023,524398,524334,590012,524302,524430,524366,590076,459008,524369,524305,524569,459024,524401,524337,590018,459016,524385,524321,589986,524289,524417,524353,590050,459012,524377,524313,589970,459028,524409,524345,590034,459020,524393,524329,590002,524297,524425,524361,590066,459010,524373,524309,524573,459026,524405,524341,590026,459018,524389,524325,589994,524293,524421,524357,590058,459014,524381,524317,589978,459030,524413,524349,590042,459022,524397,524333,590010,524301,524429,524365,590074,459009,524371,524307,524571,459025,524403,524339,590022,459017,524387,524323,589990,524291,524419,524355,590054,459013,524379,524315,589974,459029,524411,524347,590038,459021,524395,524331,590006,524299,524427,524363,590070,459011,524375,524311,524575,459027,524407,524343,590030,459019,524391,524327,589998,524295,524423,524359,590062,459015,524383,524319,589982,459031,524415,524351,590046,459023,524399,524335,590014,524303,524431,524367,590078,459008,524368,524304,524568,459024,524400,524336,590017,459016,524384,524320,589985,524288,524416,524352,590049,459012,524376,524312,589969,459028,524408,524344,590033,459020,524392,524328,590001,524296,524424,524360,590065,459010,524372,524308,524572,459026,524404,524340,590025,459018,524388,524324,589993,524292,524420,524356,590057,459014,524380,524316,589977,459030,524412,524348,590041,459022,524396,524332,590009,524300,524428,524364,590073,459009,524370,524306,524570,459025,524402,524338,590021,459017,524386,524322,589989,524290,524418,524354,590053,459013,524378,524314,589973,459029,524410,524346,590037,459021,524394,524330,590005,524298,524426,524362,590069,459011,524374,524310,524574,459027,524406,524342,590029,459019,524390,524326,589997,524294,524422,524358,590061,459015,524382,524318,589981,459031,524414,524350,590045,459023,524398,524334,590013,524302,524430,524366,590077,459008,524369,524305,524569,459024,524401,524337,590019,459016,524385,524321,589987,524289,524417,524353,590051,459012,524377,524313,589971,459028,524409,524345,590035,459020,524393,524329,590003,524297,524425,524361,590067,459010,524373,524309,524573,459026,524405,524341,590027,459018,524389,524325,589995,524293,524421,524357,590059,459014,524381,524317,589979,459030,524413,524349,590043,459022,524397,524333,590011,524301,524429,524365,590075,459009,524371,524307,524571,459025,524403,524339,590023,459017,524387,524323,589991,524291,524419,524355,590055,459013,524379,524315,589975,459029,524411,524347,590039,459021,524395,524331,590007,524299,524427,524363,590071,459011,524375,524311,524575,459027,524407,524343,590031,459019,524391,524327,589999,524295,524423,524359,590063,459015,524383,524319,589983,459031,524415,524351,590047,459023,524399,524335,590015,524303,524431,524367,590079]),9],I=[new Uint32Array([327680,327696,327688,327704,327684,327700,327692,327708,327682,327698,327690,327706,327686,327702,327694,0,327681,327697,327689,327705,327685,327701,327693,327709,327683,327699,327691,327707,327687,327703,327695,0]),5];return(t.prototype=Object.create(Pt.prototype)).getBits=function(t){for(var e,r=this.codeSize,n=this.codeBuf,i=this.bytes,o=this.bytesPos;r<t;)void 0===(e=i[o++])&&B("Bad encoding in flate stream"),n|=e<<r,r+=8;return e=n&(1<<t)-1,this.codeBuf=n>>t,this.codeSize=r-=t,this.bytesPos=o,e},t.prototype.getCode=function(t){for(var e=t[0],r=t[1],n=this.codeSize,i=this.codeBuf,o=this.bytes,a=this.bytesPos;n<r;){var s;void 0===(s=o[a++])&&B("Bad encoding in flate stream"),i|=s<<n,n+=8}var u=e[i&(1<<r)-1],l=u>>16,h=65535&u;return(0==n||n<l||0==l)&&B("Bad encoding in flate stream"),this.codeBuf=i>>l,this.codeSize=n-l,this.bytesPos=a,h},t.prototype.generateHuffmanTable=function(t){for(var e=t.length,r=0,n=0;n<e;++n)t[n]>r&&(r=t[n]);for(var i=1<<r,o=new Uint32Array(i),a=1,s=0,u=2;a<=r;++a,s<<=1,u<<=1)for(var l=0;l<e;++l)if(t[l]==a){var h=0,c=s;for(n=0;n<a;++n)h=h<<1|1&c,c>>=1;for(n=h;n<i;n+=u)o[n]=a<<16|l;++s}return[o,r]},t.prototype.readBlock=function(){function t(t,e,r,n,i){for(var o=t.getBits(r)+n;0<o--;)e[u++]=i}var e=this.getBits(3);if(1&e&&(this.eof=!0),0!=(e>>=1)){var r,n;if(1==e)r=O,n=I;else if(2==e){for(var i=this.getBits(5)+257,o=this.getBits(5)+1,a=this.getBits(4)+4,s=Array(k.length),u=0;u<a;)s[k[u++]]=this.getBits(3);for(var l=this.generateHuffmanTable(s),h=0,c=(u=0,i+o),f=new Array(c);u<c;){var d=this.getCode(l);16==d?t(this,f,2,3,h):17==d?t(this,f,3,3,h=0):18==d?t(this,f,7,11,h=0):f[u++]=h=d}r=this.generateHuffmanTable(f.slice(0,i)),n=this.generateHuffmanTable(f.slice(i,c))}else B("Unknown block type in flate stream");for(var p=(N=this.buffer)?N.length:0,g=this.bufferLength;;){var v=this.getCode(r);if(v<256)p<=g+1&&(p=(N=this.ensureBuffer(g+1)).length),N[g++]=v;else{if(256==v)return void(this.bufferLength=g);var m=(v=C[v-=257])>>16;0<m&&(m=this.getBits(m)),h=(65535&v)+m,v=this.getCode(n),0<(m=(v=T[v])>>16)&&(m=this.getBits(m));var y=(65535&v)+m;p<=g+h&&(p=(N=this.ensureBuffer(g+h)).length);for(var b=0;b<h;++b,++g)N[g]=N[g-y]}}}else{var w,_=this.bytes,x=this.bytesPos;void 0===(w=_[x++])&&B("Bad block header in flate stream");var A=w;void 0===(w=_[x++])&&B("Bad block header in flate stream"),A|=w<<8,void 0===(w=_[x++])&&B("Bad block header in flate stream");var L=w;void 0===(w=_[x++])&&B("Bad block header in flate stream"),(L|=w<<8)!=(65535&~A)&&B("Bad uncompressed block length in flate stream"),this.codeBuf=0,this.codeSize=0;var S=this.bufferLength,N=this.ensureBuffer(S+A),P=S+A;this.bufferLength=P;for(var E=S;E<P;++E){if(void 0===(w=_[x++])){this.eof=!0;break}N[E]=w}this.bytesPos=x}},t}function B(t){throw new Error(t)}function t(t){var e=0,r=t[e++],n=t[e++];-1!=r&&-1!=n||B("Invalid header in flate stream"),8!=(15&r)&&B("Unknown compression method in flate stream"),((r<<8)+n)%31!=0&&B("Bad FCHECK in flate stream"),32&n&&B("FDICT bit set in flate stream"),this.bytes=t,this.bytesPos=2,this.codeSize=0,this.codeBuf=0,Pt.call(this)}}();function kt(){this.pos=0,this.bufferLength=0,this.eof=!1,this.buffer=null}window.tmp=Et})();try{Tt.exports=jsPDF}catch(t){}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],57:[function(t,e,r){var l=t("./can-promise"),h=t("./core/qrcode"),n=t("./renderer/canvas"),i=t("./renderer/svg-tag.js");function o(n,i,o,a,e){var t=[].slice.call(arguments,1),r=t.length,s="function"==typeof t[r-1];if(!s&&!l())throw new Error("Callback required as last argument");if(!s){if(r<1)throw new Error("Too few arguments provided");return 1===r?(o=i,i=a=void 0):2!==r||i.getContext||(a=o,o=i,i=void 0),new Promise(function(t,e){try{var r=h.create(o,a);t(n(r,i,a))}catch(t){e(t)}})}if(r<2)throw new Error("Too few arguments provided");2===r?(e=o,o=i,i=a=void 0):3===r&&(i.getContext&&void 0===e?(e=a,a=void 0):(e=a,a=o,o=i,i=void 0));try{var u=h.create(o,a);e(null,n(u,i,a))}catch(t){e(t)}}r.create=h.create,r.toCanvas=o.bind(null,n.render),r.toDataURL=o.bind(null,n.renderToDataURL),r.toString=o.bind(null,function(t,e,r){return i.render(t,r)})},{"./can-promise":58,"./core/qrcode":74,"./renderer/canvas":81,"./renderer/svg-tag.js":82}],58:[function(t,e,r){e.exports=function(){return"function"==typeof Promise&&Promise.prototype&&Promise.prototype.then}},{}],59:[function(t,e,a){var s=t("./utils").getSymbolSize;a.getRowColCoords=function(t){if(1===t)return[];for(var e=Math.floor(t/7)+2,r=s(t),n=145===r?26:2*Math.ceil((r-13)/(2*e-2)),i=[r-7],o=1;o<e-1;o++)i[o]=i[o-1]-n;return i.push(6),i.reverse()},a.getPositions=function(t){for(var e=[],r=a.getRowColCoords(t),n=r.length,i=0;i<n;i++)for(var o=0;o<n;o++)0===i&&0===o||0===i&&o===n-1||i===n-1&&0===o||e.push([r[i],r[o]]);return e}},{"./utils":78}],60:[function(t,e,r){var n=t("./mode"),i=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function o(t){this.mode=n.ALPHANUMERIC,this.data=t}o.getBitsLength=function(t){return 11*Math.floor(t/2)+t%2*6},o.prototype.getLength=function(){return this.data.length},o.prototype.getBitsLength=function(){return o.getBitsLength(this.data.length)},o.prototype.write=function(t){var e;for(e=0;e+2<=this.data.length;e+=2){var r=45*i.indexOf(this.data[e]);r+=i.indexOf(this.data[e+1]),t.put(r,11)}this.data.length%2&&t.put(i.indexOf(this.data[e]),6)},e.exports=o},{"./mode":71}],61:[function(t,e,r){function n(){this.buffer=[],this.length=0}n.prototype={get:function(t){var e=Math.floor(t/8);return 1==(this.buffer[e]>>>7-t%8&1)},put:function(t,e){for(var r=0;r<e;r++)this.putBit(1==(t>>>e-r-1&1))},getLengthInBits:function(){return this.length},putBit:function(t){var e=Math.floor(this.length/8);this.buffer.length<=e&&this.buffer.push(0),t&&(this.buffer[e]|=128>>>this.length%8),this.length++}},e.exports=n},{}],62:[function(t,e,r){var n=t("../utils/buffer");function i(t){if(!t||t<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=t,this.data=n.alloc(t*t),this.reservedBit=n.alloc(t*t)}i.prototype.set=function(t,e,r,n){var i=t*this.size+e;this.data[i]=r,n&&(this.reservedBit[i]=!0)},i.prototype.get=function(t,e){return this.data[t*this.size+e]},i.prototype.xor=function(t,e,r){this.data[t*this.size+e]^=r},i.prototype.isReserved=function(t,e){return this.reservedBit[t*this.size+e]},e.exports=i},{"../utils/buffer":84}],63:[function(t,e,r){var n=t("../utils/buffer"),i=t("./mode");function o(t){this.mode=i.BYTE,this.data=n.from(t)}o.getBitsLength=function(t){return 8*t},o.prototype.getLength=function(){return this.data.length},o.prototype.getBitsLength=function(){return o.getBitsLength(this.data.length)},o.prototype.write=function(t){for(var e=0,r=this.data.length;e<r;e++)t.put(this.data[e],8)},e.exports=o},{"../utils/buffer":84,"./mode":71}],64:[function(t,e,r){var n=t("./error-correction-level"),i=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],o=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];r.getBlocksCount=function(t,e){switch(e){case n.L:return i[4*(t-1)+0];case n.M:return i[4*(t-1)+1];case n.Q:return i[4*(t-1)+2];case n.H:return i[4*(t-1)+3];default:return}},r.getTotalCodewordsCount=function(t,e){switch(e){case n.L:return o[4*(t-1)+0];case n.M:return o[4*(t-1)+1];case n.Q:return o[4*(t-1)+2];case n.H:return o[4*(t-1)+3];default:return}}},{"./error-correction-level":65}],65:[function(t,e,r){r.L={bit:1},r.M={bit:0},r.Q={bit:3},r.H={bit:2},r.isValid=function(t){return t&&void 0!==t.bit&&0<=t.bit&&t.bit<4},r.from=function(t,e){if(r.isValid(t))return t;try{return function(t){if("string"!=typeof t)throw new Error("Param is not a string");switch(t.toLowerCase()){case"l":case"low":return r.L;case"m":case"medium":return r.M;case"q":case"quartile":return r.Q;case"h":case"high":return r.H;default:throw new Error("Unknown EC Level: "+t)}}(t)}catch(t){return e}}},{}],66:[function(t,e,r){var n=t("./utils").getSymbolSize;r.getPositions=function(t){var e=n(t);return[[0,0],[e-7,0],[0,e-7]]}},{"./utils":78}],67:[function(t,e,r){var i=t("./utils"),o=i.getBCHDigit(1335);r.getEncodedBits=function(t,e){for(var r=t.bit<<3|e,n=r<<10;0<=i.getBCHDigit(n)-o;)n^=1335<<i.getBCHDigit(n)-o;return 21522^(r<<10|n)}},{"./utils":78}],68:[function(t,e,r){var n=t("../utils/buffer"),i=n.alloc(512),o=n.alloc(256);!function(){for(var t=1,e=0;e<255;e++)i[e]=t,o[t]=e,256&(t<<=1)&&(t^=285);for(e=255;e<512;e++)i[e]=i[e-255]}(),r.log=function(t){if(t<1)throw new Error("log("+t+")");return o[t]},r.exp=function(t){return i[t]},r.mul=function(t,e){return 0===t||0===e?0:i[o[t]+o[e]]}},{"../utils/buffer":84}],69:[function(t,e,r){var n=t("./mode"),i=t("./utils");function o(t){this.mode=n.KANJI,this.data=t}o.getBitsLength=function(t){return 13*t},o.prototype.getLength=function(){return this.data.length},o.prototype.getBitsLength=function(){return o.getBitsLength(this.data.length)},o.prototype.write=function(t){var e;for(e=0;e<this.data.length;e++){var r=i.toSJIS(this.data[e]);if(33088<=r&&r<=40956)r-=33088;else{if(!(57408<=r&&r<=60351))throw new Error("Invalid SJIS character: "+this.data[e]+"\nMake sure your charset is UTF-8");r-=49472}r=192*(r>>>8&255)+(255&r),t.put(r,13)}},e.exports=o},{"./mode":71,"./utils":78}],70:[function(t,e,s){s.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};var h=3,a=3,u=40,i=10;function o(t,e,r){switch(t){case s.Patterns.PATTERN000:return(e+r)%2==0;case s.Patterns.PATTERN001:return e%2==0;case s.Patterns.PATTERN010:return r%3==0;case s.Patterns.PATTERN011:return(e+r)%3==0;case s.Patterns.PATTERN100:return(Math.floor(e/2)+Math.floor(r/3))%2==0;case s.Patterns.PATTERN101:return e*r%2+e*r%3==0;case s.Patterns.PATTERN110:return(e*r%2+e*r%3)%2==0;case s.Patterns.PATTERN111:return(e*r%3+(e+r)%2)%2==0;default:throw new Error("bad maskPattern:"+t)}}s.isValid=function(t){return null!=t&&""!==t&&!isNaN(t)&&0<=t&&t<=7},s.from=function(t){return s.isValid(t)?parseInt(t,10):void 0},s.getPenaltyN1=function(t){for(var e=t.size,r=0,n=0,i=0,o=null,a=null,s=0;s<e;s++){n=i=0,o=a=null;for(var u=0;u<e;u++){var l=t.get(s,u);l===o?n++:(5<=n&&(r+=h+(n-5)),o=l,n=1),(l=t.get(u,s))===a?i++:(5<=i&&(r+=h+(i-5)),a=l,i=1)}5<=n&&(r+=h+(n-5)),5<=i&&(r+=h+(i-5))}return r},s.getPenaltyN2=function(t){for(var e=t.size,r=0,n=0;n<e-1;n++)for(var i=0;i<e-1;i++){var o=t.get(n,i)+t.get(n,i+1)+t.get(n+1,i)+t.get(n+1,i+1);4!==o&&0!==o||r++}return r*a},s.getPenaltyN3=function(t){for(var e=t.size,r=0,n=0,i=0,o=0;o<e;o++){n=i=0;for(var a=0;a<e;a++)n=n<<1&2047|t.get(o,a),10<=a&&(1488===n||93===n)&&r++,i=i<<1&2047|t.get(a,o),10<=a&&(1488===i||93===i)&&r++}return r*u},s.getPenaltyN4=function(t){for(var e=0,r=t.data.length,n=0;n<r;n++)e+=t.data[n];return Math.abs(Math.ceil(100*e/r/5)-10)*i},s.applyMask=function(t,e){for(var r=e.size,n=0;n<r;n++)for(var i=0;i<r;i++)e.isReserved(i,n)||e.xor(i,n,o(t,i,n))},s.getBestMask=function(t,e){for(var r=Object.keys(s.Patterns).length,n=0,i=1/0,o=0;o<r;o++){e(o),s.applyMask(o,t);var a=s.getPenaltyN1(t)+s.getPenaltyN2(t)+s.getPenaltyN3(t)+s.getPenaltyN4(t);s.applyMask(o,t),a<i&&(i=a,n=o)}return n}},{}],71:[function(t,e,r){var n=t("./version-check"),i=t("./regex");r.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},r.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},r.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},r.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},r.MIXED={bit:-1},r.getCharCountIndicator=function(t,e){if(!t.ccBits)throw new Error("Invalid mode: "+t);if(!n.isValid(e))throw new Error("Invalid version: "+e);return 1<=e&&e<10?t.ccBits[0]:e<27?t.ccBits[1]:t.ccBits[2]},r.getBestModeForData=function(t){return i.testNumeric(t)?r.NUMERIC:i.testAlphanumeric(t)?r.ALPHANUMERIC:i.testKanji(t)?r.KANJI:r.BYTE},r.toString=function(t){if(t&&t.id)return t.id;throw new Error("Invalid mode")},r.isValid=function(t){return t&&t.bit&&t.ccBits},r.from=function(t,e){if(r.isValid(t))return t;try{return function(t){if("string"!=typeof t)throw new Error("Param is not a string");switch(t.toLowerCase()){case"numeric":return r.NUMERIC;case"alphanumeric":return r.ALPHANUMERIC;case"kanji":return r.KANJI;case"byte":return r.BYTE;default:throw new Error("Unknown mode: "+t)}}(t)}catch(t){return e}}},{"./regex":76,"./version-check":79}],72:[function(t,e,r){var n=t("./mode");function i(t){this.mode=n.NUMERIC,this.data=t.toString()}i.getBitsLength=function(t){return 10*Math.floor(t/3)+(t%3?t%3*3+1:0)},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(t){var e,r,n;for(e=0;e+3<=this.data.length;e+=3)r=this.data.substr(e,3),n=parseInt(r,10),t.put(n,10);var i=this.data.length-e;0<i&&(r=this.data.substr(e),n=parseInt(r,10),t.put(n,3*i+1))},e.exports=i},{"./mode":71}],73:[function(t,e,n){var a=t("../utils/buffer"),s=t("./galois-field");n.mul=function(t,e){for(var r=a.alloc(t.length+e.length-1),n=0;n<t.length;n++)for(var i=0;i<e.length;i++)r[n+i]^=s.mul(t[n],e[i]);return r},n.mod=function(t,e){for(var r=a.from(t);0<=r.length-e.length;){for(var n=r[0],i=0;i<e.length;i++)r[i]^=s.mul(e[i],n);for(var o=0;o<r.length&&0===r[o];)o++;r=r.slice(o)}return r},n.generateECPolynomial=function(t){for(var e=a.from([1]),r=0;r<t;r++)e=n.mul(e,[1,s.exp(r)]);return e}},{"../utils/buffer":84,"./galois-field":68}],74:[function(t,e,r){var L=t("../utils/buffer"),S=t("./utils"),o=t("./error-correction-level"),s=t("./bit-buffer"),c=t("./bit-matrix"),f=t("./alignment-pattern"),d=t("./finder-pattern"),p=t("./mask-pattern"),N=t("./error-correction-code"),P=t("./reed-solomon-encoder"),g=t("./version"),u=t("./format-info"),l=t("./mode"),v=t("./segments"),m=t("isarray");function y(t,e,r){var n,i,o=t.size,a=u.getEncodedBits(e,r);for(n=0;n<15;n++)i=1==(a>>n&1),n<6?t.set(n,8,i,!0):n<8?t.set(n+1,8,i,!0):t.set(o-15+n,8,i,!0),n<8?t.set(8,o-n-1,i,!0):n<9?t.set(8,15-n-1+1,i,!0):t.set(8,15-n-1,i,!0);t.set(o-8,8,1,!0)}function b(e,t,r){var n=new s;r.forEach(function(t){n.put(t.mode.bit,4),n.put(t.getLength(),l.getCharCountIndicator(t.mode,e)),t.write(n)});var i=8*(S.getSymbolTotalCodewords(e)-N.getTotalCodewordsCount(e,t));for(n.getLengthInBits()+4<=i&&n.put(0,4);n.getLengthInBits()%8!=0;)n.putBit(0);for(var o=(i-n.getLengthInBits())/8,a=0;a<o;a++)n.put(a%2?17:236,8);return function(t,e,r){for(var n=S.getSymbolTotalCodewords(e),i=N.getTotalCodewordsCount(e,r),o=n-i,a=N.getBlocksCount(e,r),s=a-n%a,u=Math.floor(n/a),l=Math.floor(o/a),h=l+1,c=u-l,f=new P(c),d=0,p=new Array(a),g=new Array(a),v=0,m=L.from(t.buffer),y=0;y<a;y++){var b=y<s?l:h;p[y]=m.slice(d,d+b),g[y]=f.encode(p[y]),d+=b,v=Math.max(v,b)}var w,_,x=L.alloc(n),A=0;for(w=0;w<v;w++)for(_=0;_<a;_++)w<p[_].length&&(x[A++]=p[_][w]);for(w=0;w<c;w++)for(_=0;_<a;_++)x[A++]=g[_][w];return x}(n,e,t)}function a(t,e,r,n){var i;if(m(t))i=v.fromArray(t);else{if("string"!=typeof t)throw new Error("Invalid data");var o=e;if(!o){var a=v.rawSplit(t);o=g.getBestVersionForData(a,r)}i=v.fromString(t,o||40)}var s=g.getBestVersionForData(i,r);if(!s)throw new Error("The amount of data is too big to be stored in a QR Code");if(e){if(e<s)throw new Error("\nThe chosen QR Code version cannot contain this amount of data.\nMinimum version required to store current data is: "+s+".\n")}else e=s;var u=b(e,r,i),l=S.getSymbolSize(e),h=new c(l);return function(t,e){for(var r=t.size,n=d.getPositions(e),i=0;i<n.length;i++)for(var o=n[i][0],a=n[i][1],s=-1;s<=7;s++)if(!(o+s<=-1||r<=o+s))for(var u=-1;u<=7;u++)a+u<=-1||r<=a+u||(0<=s&&s<=6&&(0===u||6===u)||0<=u&&u<=6&&(0===s||6===s)||2<=s&&s<=4&&2<=u&&u<=4?t.set(o+s,a+u,!0,!0):t.set(o+s,a+u,!1,!0))}(h,e),function(t){for(var e=t.size,r=8;r<e-8;r++){var n=r%2==0;t.set(r,6,n,!0),t.set(6,r,n,!0)}}(h),function(t,e){for(var r=f.getPositions(e),n=0;n<r.length;n++)for(var i=r[n][0],o=r[n][1],a=-2;a<=2;a++)for(var s=-2;s<=2;s++)-2===a||2===a||-2===s||2===s||0===a&&0===s?t.set(i+a,o+s,!0,!0):t.set(i+a,o+s,!1,!0)}(h,e),y(h,r,0),7<=e&&function(t,e){for(var r,n,i,o=t.size,a=g.getEncodedBits(e),s=0;s<18;s++)r=Math.floor(s/3),n=s%3+o-8-3,i=1==(a>>s&1),t.set(r,n,i,!0),t.set(n,r,i,!0)}(h,e),function(t,e){for(var r=t.size,n=-1,i=r-1,o=7,a=0,s=r-1;0<s;s-=2)for(6===s&&s--;;){for(var u=0;u<2;u++)if(!t.isReserved(i,s-u)){var l=!1;a<e.length&&(l=1==(e[a]>>>o&1)),t.set(i,s-u,l),-1===--o&&(a++,o=7)}if((i+=n)<0||r<=i){i-=n,n=-n;break}}}(h,u),isNaN(n)&&(n=p.getBestMask(h,y.bind(null,h,r))),p.applyMask(n,h),y(h,r,n),{modules:h,version:e,errorCorrectionLevel:r,maskPattern:n,segments:i}}r.create=function(t,e){if(void 0===t||""===t)throw new Error("No input text");var r,n,i=o.M;return void 0!==e&&(i=o.from(e.errorCorrectionLevel,o.M),r=g.from(e.version),n=p.from(e.maskPattern),e.toSJISFunc&&S.setToSJISFunction(e.toSJISFunc)),a(t,r,i,n)}},{"../utils/buffer":84,"./alignment-pattern":59,"./bit-buffer":61,"./bit-matrix":62,"./error-correction-code":64,"./error-correction-level":65,"./finder-pattern":66,"./format-info":67,"./mask-pattern":70,"./mode":71,"./reed-solomon-encoder":75,"./segments":77,"./utils":78,"./version":80,isarray:5}],75:[function(t,e,r){var a=t("../utils/buffer"),s=t("./polynomial"),u=t("buffer").Buffer;function n(t){this.genPoly=void 0,this.degree=t,this.degree&&this.initialize(this.degree)}n.prototype.initialize=function(t){this.degree=t,this.genPoly=s.generateECPolynomial(this.degree)},n.prototype.encode=function(t){if(!this.genPoly)throw new Error("Encoder not initialized");var e=a.alloc(this.degree),r=u.concat([t,e],t.length+this.degree),n=s.mod(r,this.genPoly),i=this.degree-n.length;if(0<i){var o=a.alloc(this.degree);return n.copy(o,i),o}return n},e.exports=n},{"../utils/buffer":84,"./polynomial":73,buffer:2}],76:[function(t,e,r){var n="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+",i="(?:(?![A-Z0-9 $%*+\\-./:]|"+(n=n.replace(/u/g,"\\u"))+")(?:.|[\r\n]))+";r.KANJI=new RegExp(n,"g"),r.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),r.BYTE=new RegExp(i,"g"),r.NUMERIC=new RegExp("[0-9]+","g"),r.ALPHANUMERIC=new RegExp("[A-Z $%*+\\-./:]+","g");var o=new RegExp("^"+n+"$"),a=new RegExp("^[0-9]+$"),s=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");r.testKanji=function(t){return o.test(t)},r.testNumeric=function(t){return a.test(t)},r.testAlphanumeric=function(t){return s.test(t)}},{}],77:[function(t,e,a){var d=t("./mode"),i=t("./numeric-data"),o=t("./alphanumeric-data"),s=t("./byte-data"),u=t("./kanji-data"),l=t("./regex"),h=t("./utils"),c=t("dijkstrajs");function f(t){return unescape(encodeURIComponent(t)).length}function p(t,e,r){for(var n,i=[];null!==(n=t.exec(r));)i.push({data:n[0],index:n.index,mode:e,length:n[0].length});return i}function g(t){var e,r,n=p(l.NUMERIC,d.NUMERIC,t),i=p(l.ALPHANUMERIC,d.ALPHANUMERIC,t);return r=h.isKanjiModeEnabled()?(e=p(l.BYTE,d.BYTE,t),p(l.KANJI,d.KANJI,t)):(e=p(l.BYTE_KANJI,d.BYTE,t),[]),n.concat(i,e,r).sort(function(t,e){return t.index-e.index}).map(function(t){return{data:t.data,mode:t.mode,length:t.length}})}function v(t,e){switch(e){case d.NUMERIC:return i.getBitsLength(t);case d.ALPHANUMERIC:return o.getBitsLength(t);case d.KANJI:return u.getBitsLength(t);case d.BYTE:return s.getBitsLength(t)}}function r(t,e){var r,n=d.getBestModeForData(t);if((r=d.from(e,n))!==d.BYTE&&r.bit<n.bit)throw new Error('"'+t+'" cannot be encoded with mode '+d.toString(r)+".\n Suggested mode is: "+d.toString(n));switch(r!==d.KANJI||h.isKanjiModeEnabled()||(r=d.BYTE),r){case d.NUMERIC:return new i(t);case d.ALPHANUMERIC:return new o(t);case d.KANJI:return new u(t);case d.BYTE:return new s(t)}}a.fromArray=function(t){return t.reduce(function(t,e){return"string"==typeof e?t.push(r(e,null)):e.data&&t.push(r(e.data,e.mode)),t},[])},a.fromString=function(t,e){for(var r=function(t,e){for(var r={},n={start:{}},i=["start"],o=0;o<t.length;o++){for(var a=t[o],s=[],u=0;u<a.length;u++){var l=a[u],h=""+o+u;s.push(h),r[h]={node:l,lastCount:0},n[h]={};for(var c=0;c<i.length;c++){var f=i[c];r[f]&&r[f].node.mode===l.mode?(n[f][h]=v(r[f].lastCount+l.length,l.mode)-v(r[f].lastCount,l.mode),r[f].lastCount+=l.length):(r[f]&&(r[f].lastCount=l.length),n[f][h]=v(l.length,l.mode)+4+d.getCharCountIndicator(l.mode,e))}}i=s}for(c=0;c<i.length;c++)n[i[c]].end=0;return{map:n,table:r}}(function(t){for(var e=[],r=0;r<t.length;r++){var n=t[r];switch(n.mode){case d.NUMERIC:e.push([n,{data:n.data,mode:d.ALPHANUMERIC,length:n.length},{data:n.data,mode:d.BYTE,length:n.length}]);break;case d.ALPHANUMERIC:e.push([n,{data:n.data,mode:d.BYTE,length:n.length}]);break;case d.KANJI:e.push([n,{data:n.data,mode:d.BYTE,length:f(n.data)}]);break;case d.BYTE:e.push([{data:n.data,mode:d.BYTE,length:f(n.data)}])}}return e}(g(t,h.isKanjiModeEnabled())),e),n=c.find_path(r.map,"start","end"),i=[],o=1;o<n.length-1;o++)i.push(r.table[n[o]].node);return a.fromArray(i.reduce(function(t,e){var r=0<=t.length-1?t[t.length-1]:null;return r&&r.mode===e.mode?t[t.length-1].data+=e.data:t.push(e),t},[]))},a.rawSplit=function(t){return a.fromArray(g(t,h.isKanjiModeEnabled()))}},{"./alphanumeric-data":60,"./byte-data":63,"./kanji-data":69,"./mode":71,"./numeric-data":72,"./regex":76,"./utils":78,dijkstrajs:3}],78:[function(t,e,r){var n,i=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];r.getSymbolSize=function(t){if(!t)throw new Error('"version" cannot be null or undefined');if(t<1||40<t)throw new Error('"version" should be in range from 1 to 40');return 4*t+17},r.getSymbolTotalCodewords=function(t){return i[t]},r.getBCHDigit=function(t){for(var e=0;0!==t;)e++,t>>>=1;return e},r.setToSJISFunction=function(t){if("function"!=typeof t)throw new Error('"toSJISFunc" is not a valid function.');n=t},r.isKanjiModeEnabled=function(){return void 0!==n},r.toSJIS=function(t){return n(t)}},{}],79:[function(t,e,r){r.isValid=function(t){return!isNaN(t)&&1<=t&&t<=40}},{}],80:[function(t,e,i){var o=t("./utils"),a=t("./error-correction-code"),s=t("./error-correction-level"),u=t("./mode"),l=t("./version-check"),h=t("isarray"),r=o.getBCHDigit(7973);function c(t,e){return u.getCharCountIndicator(t,e)+4}function f(t,r){var n=0;return t.forEach(function(t){var e=c(t.mode,r);n+=e+t.getBitsLength()}),n}i.from=function(t,e){return l.isValid(t)?parseInt(t,10):e},i.getCapacity=function(t,e,r){if(!l.isValid(t))throw new Error("Invalid QR Code version");void 0===r&&(r=u.BYTE);var n=8*(o.getSymbolTotalCodewords(t)-a.getTotalCodewordsCount(t,e));if(r===u.MIXED)return n;var i=n-c(r,t);switch(r){case u.NUMERIC:return Math.floor(i/10*3);case u.ALPHANUMERIC:return Math.floor(i/11*2);case u.KANJI:return Math.floor(i/13);case u.BYTE:default:return Math.floor(i/8)}},i.getBestVersionForData=function(t,e){var r,n=s.from(e,s.M);if(h(t)){if(1<t.length)return function(t,e){for(var r=1;r<=40;r++){if(f(t,r)<=i.getCapacity(r,e,u.MIXED))return r}}(t,n);if(0===t.length)return 1;r=t[0]}else r=t;return function(t,e,r){for(var n=1;n<=40;n++)if(e<=i.getCapacity(n,r,t))return n}(r.mode,r.getLength(),n)},i.getEncodedBits=function(t){if(!l.isValid(t)||t<7)throw new Error("Invalid QR Code version");for(var e=t<<12;0<=o.getBCHDigit(e)-r;)e^=7973<<o.getBCHDigit(e)-r;return t<<12|e}},{"./error-correction-code":64,"./error-correction-level":65,"./mode":71,"./utils":78,"./version-check":79,isarray:5}],81:[function(t,e,s){var h=t("./utils");s.render=function(t,e,r){var n=r,i=e;void 0!==n||e&&e.getContext||(n=e,e=void 0),e||(i=function(){try{return document.createElement("canvas")}catch(t){throw new Error("You need to specify a canvas element")}}()),n=h.getOptions(n);var o,a,s=h.getImageWidth(t.modules.size,n),u=i.getContext("2d"),l=u.createImageData(s,s);return h.qrToImageData(l.data,t,n),o=i,a=s,u.clearRect(0,0,o.width,o.height),o.style||(o.style={}),o.height=a,o.width=a,o.style.height=a+"px",o.style.width=a+"px",u.putImageData(l,0,0),i},s.renderToDataURL=function(t,e,r){var n=r;void 0!==n||e&&e.getContext||(n=e,e=void 0),n=n||{};var i=s.render(t,e,n),o=n.type||"image/png",a=n.rendererOpts||{};return i.toDataURL(o,a.quality)}},{"./utils":83}],82:[function(t,e,r){var c=t("./utils");function f(t,e){var r=t.a/255,n=e+'="'+t.hex+'"';return r<1?n+" "+e+'-opacity="'+r.toFixed(2).slice(1)+'"':n}function d(t,e,r){var n=t+e;return void 0!==r&&(n+=" "+r),n}r.render=function(t,e,r){var n=c.getOptions(e),i=t.modules.size,o=t.modules.data,a=i+2*n.margin,s=n.color.light.a?"<path "+f(n.color.light,"fill")+' d="M0 0h'+a+"v"+a+'H0z"/>':"",u="<path "+f(n.color.dark,"stroke")+' d="'+function(t,e,r){for(var n="",i=0,o=!1,a=0,s=0;s<t.length;s++){var u=Math.floor(s%e),l=Math.floor(s/e);u||o||(o=!0),t[s]?(a++,0<s&&0<u&&t[s-1]||(n+=o?d("M",u+r,.5+l+r):d("m",i,0),i=0,o=!1),u+1<e&&t[s+1]||(n+=d("h",a),a=0)):i++}return n}(o,i,n.margin)+'"/>',l='viewBox="0 0 '+a+" "+a+'"',h='<svg xmlns="http://www.w3.org/2000/svg" '+(n.width?'width="'+n.width+'" height="'+n.width+'" ':"")+l+' shape-rendering="crispEdges">'+s+u+"</svg>\n";return"function"==typeof r&&r(null,h),h}},{"./utils":83}],83:[function(t,e,d){function i(t){if("number"==typeof t&&(t=t.toString()),"string"!=typeof t)throw new Error("Color should be defined as hex string");var e=t.slice().replace("#","").split("");if(e.length<3||5===e.length||8<e.length)throw new Error("Invalid hex color: "+t);3!==e.length&&4!==e.length||(e=Array.prototype.concat.apply([],e.map(function(t){return[t,t]}))),6===e.length&&e.push("F","F");var r=parseInt(e.join(""),16);return{r:r>>24&255,g:r>>16&255,b:r>>8&255,a:255&r,hex:"#"+e.slice(0,6).join("")}}d.getOptions=function(t){(t=t||{}).color||(t.color={});var e=void 0===t.margin||null===t.margin||t.margin<0?4:t.margin,r=t.width&&21<=t.width?t.width:void 0,n=t.scale||4;return{width:r,scale:r?4:n,margin:e,color:{dark:i(t.color.dark||"#000000ff"),light:i(t.color.light||"#ffffffff")},type:t.type,rendererOpts:t.rendererOpts||{}}},d.getScale=function(t,e){return e.width&&e.width>=t+2*e.margin?e.width/(t+2*e.margin):e.scale},d.getImageWidth=function(t,e){var r=d.getScale(t,e);return Math.floor((t+2*e.margin)*r)},d.qrToImageData=function(t,e,r){for(var n=e.modules.size,i=e.modules.data,o=d.getScale(n,r),a=Math.floor((n+2*r.margin)*o),s=r.margin*o,u=[r.color.light,r.color.dark],l=0;l<a;l++)for(var h=0;h<a;h++){var c=4*(l*a+h),f=r.color.light;if(s<=l&&s<=h&&l<a-s&&h<a-s)f=u[i[Math.floor((l-s)/o)*n+Math.floor((h-s)/o)]?1:0];t[c++]=f.r,t[c++]=f.g,t[c++]=f.b,t[c]=f.a}}},{}],84:[function(t,r,e){(function(s){"use strict";var a=t("isarray");var e=(s.TYPED_ARRAY_SUPPORT=function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()}catch(t){return!1}}())?2147483647:1073741823;function s(t,e,r){return s.TYPED_ARRAY_SUPPORT||this instanceof s?"number"==typeof t?l(this,t):function(t,e,r,n){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');if("undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer)return function(t,e,r,n){if(r<0||e.byteLength<r)throw new RangeError("'offset' is out of bounds");if(e.byteLength<r+(n||0))throw new RangeError("'length' is out of bounds");var i;i=void 0===r&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,r):new Uint8Array(e,r,n);s.TYPED_ARRAY_SUPPORT?i.__proto__=s.prototype:i=h(t,i);return i}(t,e,r,n);return("string"!=typeof e?function(t,e){if(s.isBuffer(e)){var r=0|o(e.length),n=u(t,r);return 0===n.length?n:(e.copy(n,0,0,r),n)}if(e){if("undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return"number"!=typeof e.length||function(t){return t!=t}(e.length)?u(t,0):h(t,e);if("Buffer"===e.type&&Array.isArray(e.data))return h(t,e.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}:function(t,e){var r=0|c(e),n=u(t,r),i=n.write(e);i!==r&&(n=n.slice(0,i));return n})(t,e)}(this,t,e,r):new s(t,e,r)}function o(t){if(e<=t)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+e.toString(16)+" bytes");return 0|t}function u(t,e){var r;return s.TYPED_ARRAY_SUPPORT?(r=new Uint8Array(e)).__proto__=s.prototype:(null===(r=t)&&(r=new s(e)),r.length=e),r}function l(t,e){var r=u(t,e<0?0:0|o(e));if(!s.TYPED_ARRAY_SUPPORT)for(var n=0;n<e;++n)r[n]=0;return r}function h(t,e){for(var r=e.length<0?0:0|o(e.length),n=u(t,r),i=0;i<r;i+=1)n[i]=255&e[i];return n}function i(t,e){var r;e=e||1/0;for(var n=t.length,i=null,o=[],a=0;a<n;++a){if(55295<(r=t.charCodeAt(a))&&r<57344){if(!i){if(56319<r){-1<(e-=3)&&o.push(239,191,189);continue}if(a+1===n){-1<(e-=3)&&o.push(239,191,189);continue}i=r;continue}if(r<56320){-1<(e-=3)&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&-1<(e-=3)&&o.push(239,191,189);if(i=null,r<128){if(--e<0)break;o.push(r)}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function c(t){return s.isBuffer(t)?t.length:"undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer)?t.byteLength:("string"!=typeof t&&(t=""+t),0===t.length?0:i(t).length)}function f(t,e,r,n){return function(t,e,r,n){for(var i=0;i<n&&!(i+r>=e.length||i>=t.length);++i)e[i+r]=t[i];return i}(i(e,t.length-r),t,r,n)}s.TYPED_ARRAY_SUPPORT&&(s.prototype.__proto__=Uint8Array.prototype,s.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&s[Symbol.species]===s&&Object.defineProperty(s,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1})),s.prototype.write=function(t,e,r){void 0===e||void 0===r&&"string"==typeof e?(r=this.length,e=0):isFinite(e)&&(e|=0,isFinite(r)?r|=0:r=void 0);var n=this.length-e;if((void 0===r||n<r)&&(r=n),0<t.length&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");return f(this,t,e,r)},s.prototype.slice=function(t,e){var r,n=this.length;if((t=~~t)<0?(t+=n)<0&&(t=0):n<t&&(t=n),(e=void 0===e?n:~~e)<0?(e+=n)<0&&(e=0):n<e&&(e=n),e<t&&(e=t),s.TYPED_ARRAY_SUPPORT)(r=this.subarray(t,e)).__proto__=s.prototype;else{var i=e-t;r=new s(i,void 0);for(var o=0;o<i;++o)r[o]=this[o+t]}return r},s.prototype.copy=function(t,e,r,n){if(r=r||0,n||0===n||(n=this.length),e>=t.length&&(e=t.length),e=e||0,0<n&&n<r&&(n=r),n===r)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e<n-r&&(n=t.length-e+r);var i,o=n-r;if(this===t&&r<e&&e<n)for(i=o-1;0<=i;--i)t[i+e]=this[i+r];else if(o<1e3||!s.TYPED_ARRAY_SUPPORT)for(i=0;i<o;++i)t[i+e]=this[i+r];else Uint8Array.prototype.set.call(t,this.subarray(r,r+o),e);return o},s.prototype.fill=function(t,e,r){if("string"==typeof t){if("string"==typeof e?(e=0,r=this.length):"string"==typeof r&&(r=this.length),1===t.length){var n=t.charCodeAt(0);n<256&&(t=n)}}else"number"==typeof t&&(t&=255);if(e<0||this.length<e||this.length<r)throw new RangeError("Out of range index");if(r<=e)return this;var i;if(e>>>=0,r=void 0===r?this.length:r>>>0,"number"==typeof(t=t||0))for(i=e;i<r;++i)this[i]=t;else{var o=s.isBuffer(t)?t:new s(t),a=o.length;for(i=0;i<r-e;++i)this[i+e]=o[i%a]}return this},s.concat=function(t,e){if(!a(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return u(null,0);var r;if(void 0===e)for(r=e=0;r<t.length;++r)e+=t[r].length;var n=l(null,e),i=0;for(r=0;r<t.length;++r){var o=t[r];if(!s.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(n,i),i+=o.length}return n},s.byteLength=c,s.prototype._isBuffer=!0,s.isBuffer=function(t){return!(null==t||!t._isBuffer)},r.exports.alloc=function(t){var e=new s(t);return e.fill(0),e},r.exports.from=function(t){return new s(t)}}).call(this,t("buffer").Buffer)},{buffer:2,isarray:5}],85:[function(t,e,r){var n=t("./lib/zrender");!function(){for(var t in n){if(null==n||!n.hasOwnProperty(t)||"default"===t||"__esModule"===t)return;r[t]=n[t]}}();var i=t("./lib/export");!function(){for(var t in i){if(null==i||!i.hasOwnProperty(t)||"default"===t||"__esModule"===t)return;r[t]=i[t]}}(),t("./lib/svg/svg"),t("./lib/vml/vml")},{"./lib/export":122,"./lib/svg/svg":172,"./lib/vml/vml":180,"./lib/zrender":181}],86:[function(t,e,r){function n(t){a.call(this,t),o.call(this,t),s.call(this,t),this.id=t.id||i()}var i=t("./core/guid"),o=t("./mixin/Eventful"),a=t("./mixin/Transformable"),s=t("./mixin/Animatable"),u=t("./core/util");n.prototype={type:"element",name:"",__zr:null,ignore:!1,clipPath:null,isGroup:!1,drift:function(t,e){switch(this.draggable){case"horizontal":e=0;break;case"vertical":t=0}var r=this.transform;(r=r||(this.transform=[1,0,0,1,0,0]))[4]+=t,r[5]+=e,this.decomposeTransform(),this.dirty(!1)},beforeUpdate:function(){},afterUpdate:function(){},update:function(){this.updateTransform()},traverse:function(t,e){},attrKV:function(t,e){if("position"===t||"scale"===t||"origin"===t){if(e){var r=this[t];(r=r||(this[t]=[]))[0]=e[0],r[1]=e[1]}}else this[t]=e},hide:function(){this.ignore=!0,this.__zr&&this.__zr.refresh()},show:function(){this.ignore=!1,this.__zr&&this.__zr.refresh()},attr:function(t,e){if("string"==typeof t)this.attrKV(t,e);else if(u.isObject(t))for(var r in t)t.hasOwnProperty(r)&&this.attrKV(r,t[r]);return this.dirty(!1),this},setClipPath:function(t){var e=this.__zr;e&&t.addSelfToZr(e),this.clipPath&&this.clipPath!==t&&this.removeClipPath(),(this.clipPath=t).__zr=e,(t.__clipTarget=this).dirty(!1)},removeClipPath:function(){var t=this.clipPath;t&&(t.__zr&&t.removeSelfFromZr(t.__zr),t.__zr=null,t.__clipTarget=null,this.clipPath=null,this.dirty(!1))},addSelfToZr:function(t){this.__zr=t;var e=this.animators;if(e)for(var r=0;r<e.length;r++)t.animation.addAnimator(e[r]);this.clipPath&&this.clipPath.addSelfToZr(t)},removeSelfFromZr:function(t){this.__zr=null;var e=this.animators;if(e)for(var r=0;r<e.length;r++)t.animation.removeAnimator(e[r]);this.clipPath&&this.clipPath.removeSelfFromZr(t)}},u.mixin(n,s),u.mixin(n,a),u.mixin(n,o);var l=n;e.exports=l},{"./core/guid":115,"./core/util":119,"./mixin/Animatable":161,"./mixin/Eventful":163,"./mixin/Transformable":164}],87:[function(t,e,r){var n=t("./core/util"),i=t("./core/vector"),o=t("./mixin/Draggable"),a=t("./mixin/Eventful"),s=t("./core/event"),u=t("./core/GestureMgr"),l="silent";function h(t){s.stop(this.event)}function c(){}c.prototype.dispose=function(){};function f(t,e,r,n){a.call(this),this.storage=t,this.painter=e,this.painterRoot=n,r=r||new c,this.proxy=null,this._hovered={},this._lastTouchMoment,this._lastX,this._lastY,this._gestureMgr,o.call(this),this.setHandlerProxy(r)}var d=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"];function p(t,e,r){if(t[t.rectHover?"rectContain":"contain"](e,r)){for(var n,i=t;i;){if(i.clipPath&&!i.clipPath.contain(e,r))return!1;i.silent&&(n=!0),i=i.parent}return!n||l}return!1}f.prototype={constructor:f,setHandlerProxy:function(e){this.proxy&&this.proxy.dispose(),e&&(n.each(d,function(t){e.on&&e.on(t,this[t],this)},this),e.handler=this),this.proxy=e},mousemove:function(t){var e=t.zrX,r=t.zrY,n=this._hovered,i=n.target;i&&!i.__zr&&(i=(n=this.findHover(n.x,n.y)).target);var o=this._hovered=this.findHover(e,r),a=o.target,s=this.proxy;s.setCursor&&s.setCursor(a?a.cursor:"default"),i&&a!==i&&this.dispatchToElement(n,"mouseout",t),this.dispatchToElement(o,"mousemove",t),a&&a!==i&&this.dispatchToElement(o,"mouseover",t)},mouseout:function(t){this.dispatchToElement(this._hovered,"mouseout",t);for(var e,r=t.toElement||t.relatedTarget;(r=r&&r.parentNode)&&9!==r.nodeType&&!(e=r===this.painterRoot););e||this.trigger("globalout",{event:t})},resize:function(t){this._hovered={}},dispatch:function(t,e){var r=this[t];r&&r.call(this,e)},dispose:function(){this.proxy.dispose(),this.storage=this.proxy=this.painter=null},setCursorStyle:function(t){var e=this.proxy;e.setCursor&&e.setCursor(t)},dispatchToElement:function(t,e,r){var n=(t=t||{}).target;if(!n||!n.silent){for(var i,o,a="on"+e,s={type:e,event:o=r,target:(i=t).target,topTarget:i.topTarget,cancelBubble:!1,offsetX:o.zrX,offsetY:o.zrY,gestureEvent:o.gestureEvent,pinchX:o.pinchX,pinchY:o.pinchY,pinchScale:o.pinchScale,wheelDelta:o.zrDelta,zrByTouch:o.zrByTouch,which:o.which,stop:h};n&&(n[a]&&(s.cancelBubble=n[a].call(n,s)),n.trigger(e,s),n=n.parent,!s.cancelBubble););s.cancelBubble||(this.trigger(e,s),this.painter&&this.painter.eachOtherLayer(function(t){"function"==typeof t[a]&&t[a].call(t,s),t.trigger&&t.trigger(e,s)}))}},findHover:function(t,e,r){for(var n=this.storage.getDisplayList(),i={x:t,y:e},o=n.length-1;0<=o;o--){var a;if(n[o]!==r&&!n[o].ignore&&(a=p(n[o],t,e))&&(i.topTarget||(i.topTarget=n[o]),a!==l)){i.target=n[o];break}}return i},processGesture:function(t,e){this._gestureMgr||(this._gestureMgr=new u);var r=this._gestureMgr;"start"===e&&r.clear();var n=r.recognize(t,this.findHover(t.zrX,t.zrY,null).target,this.proxy.dom);if("end"===e&&r.clear(),n){var i=n.type;t.gestureEvent=i,this.dispatchToElement({target:n.target},i,n.event)}}},n.each(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(n){f.prototype[n]=function(t){var e=this.findHover(t.zrX,t.zrY),r=e.target;if("mousedown"===n)this._downEl=r,this._downPoint=[t.zrX,t.zrY],this._upEl=r;else if("mouseup"===n)this._upEl=r;else if("click"===n){if(this._downEl!==this._upEl||!this._downPoint||4<i.dist(this._downPoint,[t.zrX,t.zrY]))return;this._downPoint=null}this.dispatchToElement(e,n,t)}}),n.mixin(f,a),n.mixin(f,o);var g=f;e.exports=g},{"./core/GestureMgr":107,"./core/event":114,"./core/util":119,"./core/vector":120,"./mixin/Draggable":162,"./mixin/Eventful":163}],88:[function(t,e,r){var s=t("./core/util"),o=t("./config").devicePixelRatio,c=t("./graphic/Style"),f=t("./graphic/Pattern");function a(){return!1}function u(t,e,r){var n=s.createCanvas(),i=e.getWidth(),o=e.getHeight(),a=n.style;return a&&(a.position="absolute",a.left=0,a.top=0,a.width=i+"px",a.height=o+"px",n.setAttribute("data-zr-dom-id",t)),n.width=i*r,n.height=o*r,n}function n(t,e,r){var n;r=r||o,"string"==typeof t?n=u(t,e,r):s.isObject(t)&&(t=(n=t).id),this.id=t;var i=(this.dom=n).style;i&&(n.onselectstart=a,i["-webkit-user-select"]="none",i["user-select"]="none",i["-webkit-touch-callout"]="none",i["-webkit-tap-highlight-color"]="rgba(0,0,0,0)",i.padding=0,i.margin=0,i["border-width"]=0),this.domBack=null,this.ctxBack=null,this.painter=e,this.config=null,this.clearColor=0,this.motionBlur=!1,this.lastFrameAlpha=.7,this.dpr=r}n.prototype={constructor:n,__dirty:!0,__used:!1,__drawIndex:0,__startIndex:0,__endIndex:0,incremental:!1,getElementCount:function(){return this.__endIndex-this.__startIndex},initContext:function(){this.ctx=this.dom.getContext("2d"),this.ctx.dpr=this.dpr},createBackBuffer:function(){var t=this.dpr;this.domBack=u("back-"+this.id,this.painter,t),this.ctxBack=this.domBack.getContext("2d"),1!==t&&this.ctxBack.scale(t,t)},resize:function(t,e){var r=this.dpr,n=this.dom,i=n.style,o=this.domBack;i&&(i.width=t+"px",i.height=e+"px"),n.width=t*r,n.height=e*r,o&&(o.width=t*r,o.height=e*r,1!==r&&this.ctxBack.scale(r,r))},clear:function(t,e){var r,n=this.dom,i=this.ctx,o=n.width,a=n.height,s=(e=e||this.clearColor,this.motionBlur&&!t),u=this.lastFrameAlpha,l=this.dpr;s&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation="copy",this.ctxBack.drawImage(n,0,0,o/l,a/l)),i.clearRect(0,0,o,a),e&&"transparent"!==e&&(e.colorStops?(r=e.__canvasGradient||c.getGradient(i,e,{x:0,y:0,width:o,height:a}),e.__canvasGradient=r):e.image&&(r=f.prototype.getCanvasPattern.call(e,i)),i.save(),i.fillStyle=r||e,i.fillRect(0,0,o,a),i.restore());if(s){var h=this.domBack;i.save(),i.globalAlpha=u,i.drawImage(h,0,0,o,a),i.restore()}}};var i=n;e.exports=i},{"./config":96,"./core/util":119,"./graphic/Pattern":130,"./graphic/Style":132}],89:[function(t,e,r){var p=t("./config").devicePixelRatio,m=t("./core/util"),l=t("./core/log"),n=t("./core/BoundingRect"),s=t("./core/timsort"),g=t("./Layer"),o=t("./animation/requestAnimationFrame"),y=t("./graphic/Image"),b=t("./core/env"),v=314159;function u(t){return parseInt(t,10)}var h=new n(0,0,0,0),c=new n(0,0,0,0);function i(t,e,r){this.type="canvas";var n=!t.nodeName||"CANVAS"===t.nodeName.toUpperCase();this._opts=r=m.extend({},r||{}),this.dpr=r.devicePixelRatio||p,this._singleCanvas=n;var i=(this.root=t).style;i&&(i["-webkit-tap-highlight-color"]="transparent",i["-webkit-user-select"]=i["user-select"]=i["-webkit-touch-callout"]="none",t.innerHTML=""),this.storage=e;var o,a,s,u=this._zlevelList=[],l=this._layers={};if(this._layerConfig={},this._needsManuallyCompositing=!1,n){var h=t.width,c=t.height;null!=r.width&&(h=r.width),null!=r.height&&(c=r.height),this.dpr=r.devicePixelRatio||1,t.width=h*this.dpr,t.height=c*this.dpr,this._width=h,this._height=c;var f=new g(t,this,this.dpr);f.__builtin__=!0,f.initContext(),(l[v]=f).zlevel=v,u.push(v),this._domRoot=t}else{this._width=this._getSize(0),this._height=this._getSize(1);var d=this._domRoot=(o=this._width,a=this._height,(s=document.createElement("div")).style.cssText=["position:relative","overflow:hidden","width:"+o+"px","height:"+a+"px","padding:0","margin:0","border-width:0"].join(";")+";",s);t.appendChild(d)}this._hoverlayer=null,this._hoverElements=[]}i.prototype={constructor:i,getType:function(){return"canvas"},isSingleCanvas:function(){return this._singleCanvas},getViewportRoot:function(){return this._domRoot},getViewportRootOffset:function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},refresh:function(t){var e=this.storage.getDisplayList(!0),r=this._zlevelList;this._redrawId=Math.random(),this._paintList(e,t,this._redrawId);for(var n=0;n<r.length;n++){var i=r[n],o=this._layers[i];if(!o.__builtin__&&o.refresh){var a=0===n?this._backgroundColor:null;o.refresh(a)}}return this.refreshHover(),this},addHover:function(t,e){if(!t.__hoverMir){var r=new t.constructor({style:t.style,shape:t.shape,z:t.z,z2:t.z2,silent:t.silent});return(r.__from=t).__hoverMir=r,e&&r.setStyle(e),this._hoverElements.push(r),r}},removeHover:function(t){var e=t.__hoverMir,r=this._hoverElements,n=m.indexOf(r,e);0<=n&&r.splice(n,1),t.__hoverMir=null},clearHover:function(t){for(var e=this._hoverElements,r=0;r<e.length;r++){var n=e[r].__from;n&&(n.__hoverMir=null)}e.length=0},refreshHover:function(){var t=this._hoverElements,e=t.length,r=this._hoverlayer;if(r&&r.clear(),e){s(t,this.storage.displayableSortFunc);var n={};(r=r||(this._hoverlayer=this.getLayer(1e5))).ctx.save();for(var i=0;i<e;){var o=t[i],a=o.__from;a&&a.__zr?(i++,a.invisible||(o.transform=a.transform,o.invTransform=a.invTransform,o.__clipPaths=a.__clipPaths,this._doPaintEl(o,r,!0,n))):(t.splice(i,1),a.__hoverMir=null,e--)}r.ctx.restore()}},getHoverLayer:function(){return this.getLayer(1e5)},_paintList:function(t,e,r){if(this._redrawId===r){e=e||!1,this._updateLayerStatus(t);var n=this._doPaintList(t,e);if(this._needsManuallyCompositing&&this._compositeManually(),!n){var i=this;o(function(){i._paintList(t,e,r)})}}},_compositeManually:function(){var e=this.getLayer(v).ctx,r=this._domRoot.width,n=this._domRoot.height;e.clearRect(0,0,r,n),this.eachBuiltinLayer(function(t){t.virtual&&e.drawImage(t.dom,0,0,r,n)})},_doPaintList:function(t,e){for(var r=[],n=0;n<this._zlevelList.length;n++){var i=this._zlevelList[n];(s=this._layers[i]).__builtin__&&s!==this._hoverlayer&&(s.__dirty||e)&&r.push(s)}for(var o=!0,a=0;a<r.length;a++){var s,u=(s=r[a]).ctx,l={};u.save();var h=e?s.__startIndex:s.__drawIndex,c=!e&&s.incremental&&Date.now,f=c&&Date.now(),d=s.zlevel===this._zlevelList[0]?this._backgroundColor:null;if(s.__startIndex===s.__endIndex)s.clear(!1,d);else if(h===s.__startIndex){var p=t[h];p.incremental&&p.notClear&&!e||s.clear(!1,d)}-1===h&&(console.error("For some unknown reason. drawIndex is -1"),h=s.__startIndex);for(var g=h;g<s.__endIndex;g++){var v=t[g];if(this._doPaintEl(v,s,e,l),v.__dirty=v.__dirtyText=!1,c)if(15<Date.now()-f)break}s.__drawIndex=g,s.__drawIndex<s.__endIndex&&(o=!1),l.prevElClipPaths&&u.restore(),u.restore()}return b.wxa&&m.each(this._layers,function(t){t&&t.ctx&&t.ctx.draw&&t.ctx.draw()}),o},_doPaintEl:function(t,e,r,n){var i,o,a,s=e.ctx,u=t.transform;if((e.__dirty||r)&&!t.invisible&&0!==t.style.opacity&&(!u||u[0]||u[3])&&(!t.culling||(i=t,o=this._width,a=this._height,h.copy(i.getBoundingRect()),i.transform&&h.applyTransform(i.transform),c.width=o,c.height=a,h.intersect(c)))){var l=t.__clipPaths;n.prevElClipPaths&&!function(t,e){if(t!==e){if(!t||!e||t.length!==e.length)return 1;for(var r=0;r<t.length;r++)if(t[r]!==e[r])return 1}}(l,n.prevElClipPaths)||(n.prevElClipPaths&&(e.ctx.restore(),n.prevElClipPaths=null,n.prevEl=null),l&&(s.save(),function(t,e){for(var r=0;r<t.length;r++){var n=t[r];n.setTransform(e),e.beginPath(),n.buildPath(e,n.shape),e.clip(),n.restoreTransform(e)}}(l,s),n.prevElClipPaths=l)),t.beforeBrush&&t.beforeBrush(s),t.brush(s,n.prevEl||null),(n.prevEl=t).afterBrush&&t.afterBrush(s)}},getLayer:function(t,e){this._singleCanvas&&!this._needsManuallyCompositing&&(t=v);var r=this._layers[t];return r||((r=new g("zr_"+t,this,this.dpr)).zlevel=t,r.__builtin__=!0,this._layerConfig[t]&&m.merge(r,this._layerConfig[t],!0),e&&(r.virtual=e),this.insertLayer(t,r),r.initContext()),r},insertLayer:function(t,e){var r=this._layers,n=this._zlevelList,i=n.length,o=null,a=-1,s=this._domRoot;if(r[t])l("ZLevel "+t+" has been used already");else if(function(t){if(t){if(t.__builtin__)return 1;if("function"==typeof t.resize&&"function"==typeof t.refresh)return 1}}(e)){if(0<i&&t>n[0]){for(a=0;a<i-1&&!(n[a]<t&&n[a+1]>t);a++);o=r[n[a]]}if(n.splice(a+1,0,t),!(r[t]=e).virtual)if(o){var u=o.dom;u.nextSibling?s.insertBefore(e.dom,u.nextSibling):s.appendChild(e.dom)}else s.firstChild?s.insertBefore(e.dom,s.firstChild):s.appendChild(e.dom)}else l("Layer of zlevel "+t+" is not valid")},eachLayer:function(t,e){var r,n,i=this._zlevelList;for(n=0;n<i.length;n++)r=i[n],t.call(e,this._layers[r],r)},eachBuiltinLayer:function(t,e){var r,n,i,o=this._zlevelList;for(i=0;i<o.length;i++)n=o[i],(r=this._layers[n]).__builtin__&&t.call(e,r,n)},eachOtherLayer:function(t,e){var r,n,i,o=this._zlevelList;for(i=0;i<o.length;i++)n=o[i],(r=this._layers[n]).__builtin__||t.call(e,r,n)},getLayers:function(){return this._layers},_updateLayerStatus:function(t){function e(t){n&&(n.__endIndex!==t&&(n.__dirty=!0),n.__endIndex=t)}if(this.eachBuiltinLayer(function(t,e){t.__dirty=t.__used=!1}),this._singleCanvas)for(var r=1;r<t.length;r++){if((o=t[r]).zlevel!==t[r-1].zlevel||o.incremental){this._needsManuallyCompositing=!0;break}}var n=null,i=0;for(r=0;r<t.length;r++){var o,a,s=(o=t[r]).zlevel;o.incremental?((a=this.getLayer(s+.001,this._needsManuallyCompositing)).incremental=!0,i=1):a=this.getLayer(s+(0<i?.01:0),this._needsManuallyCompositing),a.__builtin__||l("ZLevel "+s+" has been used by unkown layer "+a.id),a!==n&&(a.__used=!0,a.__startIndex!==r&&(a.__dirty=!0),a.__startIndex=r,a.incremental?a.__drawIndex=-1:a.__drawIndex=r,e(r),n=a),o.__dirty&&(a.__dirty=!0,a.incremental&&a.__drawIndex<0&&(a.__drawIndex=r))}e(r),this.eachBuiltinLayer(function(t,e){!t.__used&&0<t.getElementCount()&&(t.__dirty=!0,t.__startIndex=t.__endIndex=t.__drawIndex=0),t.__dirty&&t.__drawIndex<0&&(t.__drawIndex=t.__startIndex)})},clear:function(){return this.eachBuiltinLayer(this._clearLayer),this},_clearLayer:function(t){t.clear()},setBackgroundColor:function(t){this._backgroundColor=t},configLayer:function(t,e){if(e){var r=this._layerConfig;r[t]?m.merge(r[t],e,!0):r[t]=e;for(var n=0;n<this._zlevelList.length;n++){var i=this._zlevelList[n];if(i===t||i===t+.01){var o=this._layers[i];m.merge(o,r[t],!0)}}}},delLayer:function(t){var e=this._layers,r=this._zlevelList,n=e[t];n&&(n.dom.parentNode.removeChild(n.dom),delete e[t],r.splice(m.indexOf(r,t),1))},resize:function(e,r){if(this._domRoot.style){var t=this._domRoot;t.style.display="none";var n=this._opts;if(null!=e&&(n.width=e),null!=r&&(n.height=r),e=this._getSize(0),r=this._getSize(1),t.style.display="",this._width!==e||r!==this._height){for(var i in t.style.width=e+"px",t.style.height=r+"px",this._layers)this._layers.hasOwnProperty(i)&&this._layers[i].resize(e,r);m.each(this._progressiveLayers,function(t){t.resize(e,r)}),this.refresh(!0)}this._width=e,this._height=r}else{if(null==e||null==r)return;this._width=e,this._height=r,this.getLayer(v).resize(e,r)}return this},clearLayer:function(t){var e=this._layers[t];e&&e.clear()},dispose:function(){this.root.innerHTML="",this.root=this.storage=this._domRoot=this._layers=null},getRenderedCanvas:function(t){if(t=t||{},this._singleCanvas&&!this._compositeManually)return this._layers[v].dom;var e=new g("image",this,t.pixelRatio||this.dpr);if(e.initContext(),e.clear(!1,t.backgroundColor||this._backgroundColor),t.pixelRatio<=this.dpr){this.refresh();var r=e.dom.width,n=e.dom.height,i=e.ctx;this.eachLayer(function(t){t.__builtin__?i.drawImage(t.dom,0,0,r,n):t.renderToCanvas&&(e.ctx.save(),t.renderToCanvas(e.ctx),e.ctx.restore())})}else for(var o={},a=this.storage.getDisplayList(!0),s=0;s<a.length;s++){var u=a[s];this._doPaintEl(u,e,!0,o)}return e.dom},getWidth:function(){return this._width},getHeight:function(){return this._height},_getSize:function(t){var e=this._opts,r=["width","height"][t],n=["clientWidth","clientHeight"][t],i=["paddingLeft","paddingTop"][t],o=["paddingRight","paddingBottom"][t];if(null!=e[r]&&"auto"!==e[r])return parseFloat(e[r]);var a=this.root,s=document.defaultView.getComputedStyle(a);return(a[n]||u(s[r])||u(a.style[r]))-(u(s[i])||0)-(u(s[o])||0)|0},pathToImage:function(t,e){e=e||this.dpr;var r=document.createElement("canvas"),n=r.getContext("2d"),i=t.getBoundingRect(),o=t.style,a=o.shadowBlur*e,s=o.shadowOffsetX*e,u=o.shadowOffsetY*e,l=o.hasStroke()?o.lineWidth:0,h=Math.max(l/2,a-s),c=Math.max(l/2,s+a),f=Math.max(l/2,a-u),d=Math.max(l/2,u+a),p=i.width+h+c,g=i.height+f+d;r.width=p*e,r.height=g*e,n.scale(e,e),n.clearRect(0,0,p,g),n.dpr=e;var v={position:t.position,rotation:t.rotation,scale:t.scale};t.position=[h-i.x,f-i.y],t.rotation=0,t.scale=[1,1],t.updateTransform(),t&&t.brush(n);var m=new y({style:{x:0,y:0,image:r}});return null!=v.position&&(m.position=t.position=v.position),null!=v.rotation&&(m.rotation=t.rotation=v.rotation),null!=v.scale&&(m.scale=t.scale=v.scale),m}};var a=i;e.exports=a},{"./Layer":88,"./animation/requestAnimationFrame":95,"./config":96,"./core/BoundingRect":106,"./core/env":113,"./core/log":116,"./core/timsort":118,"./core/util":119,"./graphic/Image":126}],90:[function(t,e,r){var o=t("./core/util"),a=t("./core/env"),s=t("./container/Group"),u=t("./core/timsort");function l(t,e){return t.zlevel===e.zlevel?t.z===e.z?t.z2-e.z2:t.z-e.z:t.zlevel-e.zlevel}function n(){this._roots=[],this._displayList=[],this._displayListLen=0}n.prototype={constructor:n,traverse:function(t,e){for(var r=0;r<this._roots.length;r++)this._roots[r].traverse(t,e)},getDisplayList:function(t,e){return e=e||!1,t&&this.updateDisplayList(e),this._displayList},updateDisplayList:function(t){this._displayListLen=0;for(var e=this._roots,r=this._displayList,n=0,i=e.length;n<i;n++)this._updateAndAddDisplayable(e[n],null,t);r.length=this._displayListLen,a.canvasSupported&&u(r,l)},_updateAndAddDisplayable:function(t,e,r){if(!t.ignore||r){t.beforeUpdate(),t.__dirty&&t.update(),t.afterUpdate();var n=t.clipPath;if(n){e=e?e.slice():[];for(var i=n,o=t;i;)i.parent=o,i.updateTransform(),e.push(i),i=(o=i).clipPath}if(t.isGroup){for(var a=t._children,s=0;s<a.length;s++){var u=a[s];t.__dirty&&(u.__dirty=!0),this._updateAndAddDisplayable(u,e,r)}t.__dirty=!1}else t.__clipPaths=e,this._displayList[this._displayListLen++]=t}},addRoot:function(t){t.__storage!==this&&(t instanceof s&&t.addChildrenToStorage(this),this.addToStorage(t),this._roots.push(t))},delRoot:function(t){if(null==t){for(var e=0;e<this._roots.length;e++){var r=this._roots[e];r instanceof s&&r.delChildrenFromStorage(this)}return this._roots=[],this._displayList=[],void(this._displayListLen=0)}if(t instanceof Array){e=0;for(var n=t.length;e<n;e++)this.delRoot(t[e])}else{var i=o.indexOf(this._roots,t);0<=i&&(this.delFromStorage(t),this._roots.splice(i,1),t instanceof s&&t.delChildrenFromStorage(this))}},addToStorage:function(t){return t&&(t.__storage=this,t.dirty(!1)),this},delFromStorage:function(t){return t&&(t.__storage=null),this},dispose:function(){this._renderList=this._roots=null},displayableSortFunc:l};var i=n;e.exports=i},{"./container/Group":105,"./core/env":113,"./core/timsort":118,"./core/util":119}],91:[function(t,e,r){function n(t){t=t||{},this.stage=t.stage||{},this.onframe=t.onframe||function(){},this._clips=[],this._running=!1,this._time,this._pausedTime,this._pauseStart,this._paused=!1,o.call(this)}var i=t("../core/util"),o=t("../core/event").Dispatcher,a=t("./requestAnimationFrame"),s=t("./Animator");n.prototype={constructor:n,addClip:function(t){this._clips.push(t)},addAnimator:function(t){t.animation=this;for(var e=t.getClips(),r=0;r<e.length;r++)this.addClip(e[r])},removeClip:function(t){var e=i.indexOf(this._clips,t);0<=e&&this._clips.splice(e,1)},removeAnimator:function(t){for(var e=t.getClips(),r=0;r<e.length;r++)this.removeClip(e[r]);t.animation=null},_update:function(){for(var t=(new Date).getTime()-this._pausedTime,e=t-this._time,r=this._clips,n=r.length,i=[],o=[],a=0;a<n;a++){var s=r[a],u=s.step(t,e);u&&(i.push(u),o.push(s))}for(a=0;a<n;)r[a]._needsRemove?(r[a]=r[n-1],r.pop(),n--):a++;n=i.length;for(a=0;a<n;a++)o[a].fire(i[a]);this._time=t,this.onframe(e),this.trigger("frame",e),this.stage.update&&this.stage.update()},_startLoop:function(){var e=this;this._running=!0,a(function t(){e._running&&(a(t),e._paused||e._update())})},start:function(){this._time=(new Date).getTime(),this._pausedTime=0,this._startLoop()},stop:function(){this._running=!1},pause:function(){this._paused||(this._pauseStart=(new Date).getTime(),this._paused=!0)},resume:function(){this._paused&&(this._pausedTime+=(new Date).getTime()-this._pauseStart,this._paused=!1)},clear:function(){this._clips=[]},isFinished:function(){return!this._clips.length},animate:function(t,e){var r=new s(t,(e=e||{}).loop,e.getter,e.setter);return this.addAnimator(r),r}},i.mixin(n,o);var u=n;e.exports=u},{"../core/event":114,"../core/util":119,"./Animator":92,"./requestAnimationFrame":95}],92:[function(t,e,r){var M=t("./Clip"),j=t("../tool/color"),F=t("../core/util").isArrayLike,u=Array.prototype.slice;function i(t,e){return t[e]}function o(t,e,r){t[e]=r}function R(t,e,r){return(e-t)*r+t}function D(t,e,r){return.5<r?e:t}function z(t,e,r,n,i){var o=t.length;if(1===i)for(var a=0;a<o;a++)n[a]=R(t[a],e[a],r);else{var s=o&&t[0].length;for(a=0;a<o;a++)for(var u=0;u<s;u++)n[a][u]=R(t[a][u],e[a][u],r)}}function q(t,e,r){var n=t.length,i=e.length;if(n!==i)if(i<n)t.length=i;else for(var o=n;o<i;o++)t.push(1===r?e[o]:u.call(e[o]));var a=t[0]&&t[0].length;for(o=0;o<t.length;o++)if(1===r)isNaN(t[o])&&(t[o]=e[o]);else for(var s=0;s<a;s++)isNaN(t[o][s])&&(t[o][s]=e[o][s])}function U(t,e,r){if(t===e)return 1;var n=t.length;if(n===e.length){if(1===r){for(var i=0;i<n;i++)if(t[i]!==e[i])return}else{var o=t[0].length;for(i=0;i<n;i++)for(var a=0;a<o;a++)if(t[i][a]!==e[i][a])return}return 1}}function H(t,e,r,n,i,o,a,s,u){var l=t.length;if(1===u)for(var h=0;h<l;h++)s[h]=W(t[h],e[h],r[h],n[h],i,o,a);else{var c=t[0].length;for(h=0;h<l;h++)for(var f=0;f<c;f++)s[h][f]=W(t[h][f],e[h][f],r[h][f],n[h][f],i,o,a)}}function W(t,e,r,n,i,o,a){var s=.5*(r-t),u=.5*(n-e);return(2*(e-r)+s+u)*a+(-3*(e-r)-2*s-u)*o+s*i+e}function a(t){if(F(t)){var e=t.length;if(F(t[0])){for(var r=[],n=0;n<e;n++)r.push(u.call(t[n]));return r}return u.call(t)}return t}function G(t){return t[0]=Math.floor(t[0]),t[1]=Math.floor(t[1]),t[2]=Math.floor(t[2]),"rgba("+t.join(",")+")"}function l(t,e,r,n,o,i){var a=t._getter,s=t._setter,u="spline"===e,l=n.length;if(l){var h,c,f,d=n[0].value,p=F(d),g=!1,v=!1,m=p?(c=(h=n)[h.length-1].value,F(c&&c[0])?2:1):0;n.sort(function(t,e){return t.time-e.time}),f=n[l-1].time;for(var y=[],b=[],w=n[0].value,_=!0,x=0;x<l;x++){y.push(n[x].time/f);var A=n[x].value;if(p&&U(A,w,m)||!p&&A===w||(_=!1),"string"==typeof(w=A)){var L=j.parse(A);L?(A=L,g=!0):v=!0}b.push(A)}if(i||!_){var S=b[l-1];for(x=0;x<l-1;x++)p?q(b[x],S,m):!isNaN(b[x])||isNaN(S)||v||g||(b[x]=S);p&&q(a(t._target,o),S,m);var N,P,E,k,C,T=0,O=0;if(g)var I=[0,0,0,0];var B=new M({target:t._target,life:f,loop:t._loop,delay:t._delay,onframe:function(t,e){var r;if(e<0)r=0;else if(e<O){for(r=Math.min(T+1,l-1);0<=r&&!(y[r]<=e);r--);r=Math.min(r,l-2)}else{for(r=T;r<l&&!(y[r]>e);r++);r=Math.min(r-1,l-2)}O=e;var n=y[(T=r)+1]-y[r];if(0!=n)if(N=(e-y[r])/n,u)if(E=b[r],P=b[0===r?r:r-1],k=b[l-2<r?l-1:r+1],C=b[l-3<r?l-1:r+2],p)H(P,E,k,C,N,N*N,N*N*N,a(t,o),m);else{if(g)i=H(P,E,k,C,N,N*N,N*N*N,I,1),i=G(I);else{if(v)return.5<N?k:E;i=W(P,E,k,C,N,N*N,N*N*N)}s(t,o,i)}else if(p)z(b[r],b[r+1],N,a(t,o),m);else{var i;if(g)z(b[r],b[r+1],N,I,1),i=G(I);else{if(v)return D(b[r],b[r+1],N);i=R(b[r],b[r+1],N)}s(t,o,i)}},ondestroy:r});return e&&"spline"!==e&&(B.easing=e),B}}}function n(t,e,r,n){this._tracks={},this._target=t,this._loop=e||!1,this._getter=r||i,this._setter=n||o,this._clipCount=0,this._delay=0,this._doneList=[],this._onframeList=[],this._clipList=[]}n.prototype={when:function(t,e){var r=this._tracks;for(var n in e)if(e.hasOwnProperty(n)){if(!r[n]){r[n]=[];var i=this._getter(this._target,n);if(null==i)continue;0!==t&&r[n].push({time:0,value:a(i)})}r[n].push({time:t,value:e[n]})}return this},during:function(t){return this._onframeList.push(t),this},pause:function(){for(var t=0;t<this._clipList.length;t++)this._clipList[t].pause();this._paused=!0},resume:function(){for(var t=0;t<this._clipList.length;t++)this._clipList[t].resume();this._paused=!1},isPaused:function(){return!!this._paused},_doneCallback:function(){this._tracks={},this._clipList.length=0;for(var t=this._doneList,e=t.length,r=0;r<e;r++)t[r].call(this)},start:function(t,e){function r(){--o||i._doneCallback()}var n,i=this,o=0;for(var a in this._tracks)if(this._tracks.hasOwnProperty(a)){var s=l(this,t,r,this._tracks[a],a,e);s&&(this._clipList.push(s),o++,this.animation&&this.animation.addClip(s),n=s)}if(n){var u=n.onframe;n.onframe=function(t,e){u(t,e);for(var r=0;r<i._onframeList.length;r++)i._onframeList[r](t,e)}}return o||this._doneCallback(),this},stop:function(t){for(var e=this._clipList,r=this.animation,n=0;n<e.length;n++){var i=e[n];t&&i.onframe(this._target,1),r&&r.removeClip(i)}e.length=0},delay:function(t){return this._delay=t,this},done:function(t){return t&&this._doneList.push(t),this},getClips:function(){return this._clipList}};var s=n;e.exports=s},{"../core/util":119,"../tool/color":173,"./Clip":93}],93:[function(t,e,r){var a=t("./easing");function n(t){this._target=t.target,this._life=t.life||1e3,this._delay=t.delay||0,this._initialized=!1,this.loop=null!=t.loop&&t.loop,this.gap=t.gap||0,this.easing=t.easing||"Linear",this.onframe=t.onframe,this.ondestroy=t.ondestroy,this.onrestart=t.onrestart,this._pausedTime=0,this._paused=!1}n.prototype={constructor:n,step:function(t,e){if(this._initialized||(this._startTime=t+this._delay,this._initialized=!0),this._paused)this._pausedTime+=e;else{var r=(t-this._startTime-this._pausedTime)/this._life;if(!(r<0)){r=Math.min(r,1);var n=this.easing,i="string"==typeof n?a[n]:n,o="function"==typeof i?i(r):r;return this.fire("frame",o),1===r?this.loop?(this.restart(t),"restart"):(this._needsRemove=!0,"destroy"):null}}},restart:function(t){var e=(t-this._startTime-this._pausedTime)%this._life;this._startTime=t-e+this.gap,this._pausedTime=0,this._needsRemove=!1},fire:function(t,e){this[t="on"+t]&&this[t](this._target,e)},pause:function(){this._paused=!0},resume:function(){this._paused=!1}};var i=n;e.exports=i},{"./easing":94}],94:[function(t,e,r){var n={linear:function(t){return t},quadraticIn:function(t){return t*t},quadraticOut:function(t){return t*(2-t)},quadraticInOut:function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)},cubicIn:function(t){return t*t*t},cubicOut:function(t){return--t*t*t+1},cubicInOut:function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},quarticIn:function(t){return t*t*t*t},quarticOut:function(t){return 1- --t*t*t*t},quarticInOut:function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)},quinticIn:function(t){return t*t*t*t*t},quinticOut:function(t){return--t*t*t*t*t+1},quinticInOut:function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},sinusoidalIn:function(t){return 1-Math.cos(t*Math.PI/2)},sinusoidalOut:function(t){return Math.sin(t*Math.PI/2)},sinusoidalInOut:function(t){return.5*(1-Math.cos(Math.PI*t))},exponentialIn:function(t){return 0===t?0:Math.pow(1024,t-1)},exponentialOut:function(t){return 1===t?1:1-Math.pow(2,-10*t)},exponentialInOut:function(t){return 0===t?0:1===t?1:(t*=2)<1?.5*Math.pow(1024,t-1):.5*(2-Math.pow(2,-10*(t-1)))},circularIn:function(t){return 1-Math.sqrt(1-t*t)},circularOut:function(t){return Math.sqrt(1- --t*t)},circularInOut:function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},elasticIn:function(t){var e,r=.1;return 0===t?0:1===t?1:(e=!r||r<1?(r=1,.1):.4*Math.asin(1/r)/(2*Math.PI),-(r*Math.pow(2,10*--t)*Math.sin((t-e)*(2*Math.PI)/.4)))},elasticOut:function(t){var e,r=.1;return 0===t?0:1===t?1:(e=!r||r<1?(r=1,.1):.4*Math.asin(1/r)/(2*Math.PI),r*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/.4)+1)},elasticInOut:function(t){var e,r=.1;return 0===t?0:1===t?1:(e=!r||r<1?(r=1,.1):.4*Math.asin(1/r)/(2*Math.PI),(t*=2)<1?r*Math.pow(2,10*--t)*Math.sin((t-e)*(2*Math.PI)/.4)*-.5:r*Math.pow(2,-10*--t)*Math.sin((t-e)*(2*Math.PI)/.4)*.5+1)},backIn:function(t){return t*t*(2.70158*t-1.70158)},backOut:function(t){return--t*t*(2.70158*t+1.70158)+1},backInOut:function(t){var e=2.5949095;return(t*=2)<1?t*t*((1+e)*t-e)*.5:.5*((t-=2)*t*((1+e)*t+e)+2)},bounceIn:function(t){return 1-n.bounceOut(1-t)},bounceOut:function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},bounceInOut:function(t){return t<.5?.5*n.bounceIn(2*t):.5*n.bounceOut(2*t-1)+.5}},i=n;e.exports=i},{}],95:[function(t,e,r){var n="undefined"!=typeof window&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(t){setTimeout(t,16)};e.exports=n},{}],96:[function(t,e,r){var n=1;"undefined"!=typeof window&&(n=Math.max(window.devicePixelRatio||1,1));var i=n;r.debugMode=0,r.devicePixelRatio=i},{}],97:[function(t,e,r){var d=t("./util").normalizeRadian,p=2*Math.PI;r.containStroke=function(t,e,r,n,i,o,a,s,u){if(0===a)return!1;var l=a;s-=t,u-=e;var h=Math.sqrt(s*s+u*u);if(r<h-l||h+l<r)return!1;if(Math.abs(n-i)%p<1e-4)return!0;if(o){var c=n;n=d(i),i=d(c)}else n=d(n),i=d(i);i<n&&(i+=p);var f=Math.atan2(u,s);return f<0&&(f+=p),n<=f&&f<=i||n<=f+p&&f+p<=i}},{"./util":103}],98:[function(t,e,r){var f=t("../core/curve");r.containStroke=function(t,e,r,n,i,o,a,s,u,l,h){if(0===u)return!1;var c=u;return!(e+c<h&&n+c<h&&o+c<h&&s+c<h||h<e-c&&h<n-c&&h<o-c&&h<s-c||t+c<l&&r+c<l&&i+c<l&&a+c<l||l<t-c&&l<r-c&&l<i-c&&l<a-c)&&f.cubicProjectPoint(t,e,r,n,i,o,a,s,l,h,null)<=c/2}},{"../core/curve":112}],99:[function(t,e,r){r.containStroke=function(t,e,r,n,i,o,a){if(0===i)return!1;var s=i,u=0;if(e+s<a&&n+s<a||a<e-s&&a<n-s||t+s<o&&r+s<o||o<t-s&&o<r-s)return!1;if(t===r)return Math.abs(o-t)<=s/2;var l=(u=(e-n)/(t-r))*o-a+(t*n-r*e)/(t-r);return l*l/(u*u+1)<=s/2*s/2}},{}],100:[function(t,e,r){var n=t("../core/PathProxy"),L=t("./line"),S=t("./cubic"),N=t("./quadratic"),P=t("./arc"),g=t("./util").normalizeRadian,b=t("../core/curve"),E=t("./windingLine"),k=n.CMD,v=2*Math.PI,C=1e-4;var w=[-1,-1,-1],_=[-1,-1];function T(t,e,r,n,i,o,a,s,u,l){if(e<l&&n<l&&o<l&&s<l||l<e&&l<n&&l<o&&l<s)return 0;var h,c=b.cubicRootAt(e,n,o,s,l,w);if(0===c)return 0;for(var f,d,p=0,g=-1,v=0;v<c;v++){var m=w[v],y=0===m||1===m?.5:1;b.cubicAt(t,r,i,a,m)<u||(g<0&&(g=b.cubicExtrema(e,n,o,s,_),_[1]<_[0]&&1<g&&(h=_[0],_[0]=_[1],_[1]=h),f=b.cubicAt(e,n,o,s,_[0]),1<g&&(d=b.cubicAt(e,n,o,s,_[1]))),2===g?m<_[0]?p+=f<e?y:-y:m<_[1]?p+=d<f?y:-y:p+=s<d?y:-y:m<_[0]?p+=f<e?y:-y:p+=s<f?y:-y)}return p}function O(t,e,r,n,i,o,a,s){if(e<s&&n<s&&o<s||s<e&&s<n&&s<o)return 0;var u=b.quadraticRootAt(e,n,o,s,w);if(0===u)return 0;var l=b.quadraticExtremum(e,n,o);if(0<=l&&l<=1){for(var h=0,c=b.quadraticAt(e,n,o,l),f=0;f<u;f++){var d=0===w[f]||1===w[f]?.5:1;b.quadraticAt(t,r,i,w[f])<a||(w[f]<l?h+=c<e?d:-d:h+=o<c?d:-d)}return h}d=0===w[0]||1===w[0]?.5:1;return b.quadraticAt(t,r,i,w[0])<a?0:o<e?d:-d}function I(t,e,r,n,i,o,a,s){if(r<(s-=e)||s<-r)return 0;var u=Math.sqrt(r*r-s*s);w[0]=-u,w[1]=u;var l=Math.abs(n-i);if(l<1e-4)return 0;if(l%v<1e-4){i=v;var h=o?1:-1;return a>=w[n=0]+t&&a<=w[1]+t?h:0}if(o){u=n;n=g(i),i=g(u)}else n=g(n),i=g(i);i<n&&(i+=v);for(var c=0,f=0;f<2;f++){var d=w[f];if(a<d+t){var p=Math.atan2(s,d);h=o?1:-1;p<0&&(p=v+p),(n<=p&&p<=i||n<=p+v&&p+v<=i)&&(p>Math.PI/2&&p<1.5*Math.PI&&(h=-h),c+=h)}}return c}function i(t,e,r,n,i){for(var o,a,s=0,u=0,l=0,h=0,c=0,f=0;f<t.length;){var d=t[f++];switch(d===k.M&&1<f&&(r||(s+=E(u,l,h,c,n,i))),1===f&&(h=u=t[f],c=l=t[f+1]),d){case k.M:u=h=t[f++],l=c=t[f++];break;case k.L:if(r){if(L.containStroke(u,l,t[f],t[f+1],e,n,i))return!0}else s+=E(u,l,t[f],t[f+1],n,i)||0;u=t[f++],l=t[f++];break;case k.C:if(r){if(S.containStroke(u,l,t[f++],t[f++],t[f++],t[f++],t[f],t[f+1],e,n,i))return!0}else s+=T(u,l,t[f++],t[f++],t[f++],t[f++],t[f],t[f+1],n,i)||0;u=t[f++],l=t[f++];break;case k.Q:if(r){if(N.containStroke(u,l,t[f++],t[f++],t[f],t[f+1],e,n,i))return!0}else s+=O(u,l,t[f++],t[f++],t[f],t[f+1],n,i)||0;u=t[f++],l=t[f++];break;case k.A:var p=t[f++],g=t[f++],v=t[f++],m=t[f++],y=t[f++],b=t[f++];f+=1;var w=1-t[f++],_=Math.cos(y)*v+p,x=Math.sin(y)*m+g;1<f?s+=E(u,l,_,x,n,i):(h=_,c=x);var A=(n-p)*m/v+p;if(r){if(P.containStroke(p,g,m,y,y+b,w,e,A,i))return!0}else s+=I(p,g,m,y,y+b,w,A,i);u=Math.cos(y+b)*v+p,l=Math.sin(y+b)*m+g;break;case k.R:h=u=t[f++],c=l=t[f++];_=h+t[f++],x=c+t[f++];if(r){if(L.containStroke(h,c,_,c,e,n,i)||L.containStroke(_,c,_,x,e,n,i)||L.containStroke(_,x,h,x,e,n,i)||L.containStroke(h,x,h,c,e,n,i))return!0}else s+=E(_,c,_,x,n,i),s+=E(h,x,h,c,n,i);break;case k.Z:if(r){if(L.containStroke(u,l,h,c,e,n,i))return!0}else s+=E(u,l,h,c,n,i);u=h,l=c}}return r||(o=l,a=c,Math.abs(o-a)<C)||(s+=E(u,l,h,c,n,i)||0),0!==s}r.contain=function(t,e,r){return i(t,0,!1,e,r)},r.containStroke=function(t,e,r,n){return i(t,e,!0,r,n)}},{"../core/PathProxy":109,"../core/curve":112,"./arc":97,"./cubic":98,"./line":99,"./quadratic":101,"./util":103,"./windingLine":104}],101:[function(t,e,r){var h=t("../core/curve").quadraticProjectPoint;r.containStroke=function(t,e,r,n,i,o,a,s,u){if(0===a)return!1;var l=a;return!(e+l<u&&n+l<u&&o+l<u||u<e-l&&u<n-l&&u<o-l||t+l<s&&r+l<s&&i+l<s||s<t-l&&s<r-l&&s<i-l)&&h(t,e,r,n,i,o,s,u,null)<=l/2}},{"../core/curve":112}],102:[function(t,e,r){var g=t("../core/BoundingRect"),T=t("../graphic/helper/image"),n=t("../core/util"),i=n.getContext,l=n.extend,O=n.retrieve2,I=n.retrieve3,o=n.trim,s={},u=0,h=5e3,B=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g,c="12px sans-serif",a={};function M(t,e){var r=t+":"+(e=e||c);if(s[r])return s[r];for(var n=(t+"").split("\n"),i=0,o=0,a=n.length;o<a;o++)i=Math.max(d(n[o],e).width,i);return h<u&&(u=0,s={}),u++,s[r]=i}function v(t,e,r){return"right"===r?t-=e:"center"===r&&(t-=e/2),t}function m(t,e,r){return"middle"===r?t-=e/2:"bottom"===r&&(t-=e),t}function j(t,e,r,n,i){if(!e)return"";var o=(t+"").split("\n");i=p(e,r,n,i);for(var a=0,s=o.length;a<s;a++)o[a]=y(o[a],i);return o.join("\n")}function p(t,e,r,n){(n=l({},n)).font=e;r=O(r,"...");n.maxIterations=O(n.maxIterations,2);var i=n.minChar=O(n.minChar,0);n.cnCharWidth=M("国",e);var o=n.ascCharWidth=M("a",e);n.placeholder=O(n.placeholder,"");for(var a=t=Math.max(0,t-1),s=0;s<i&&o<=a;s++)a-=o;var u=M(r,e);return a<u&&(r="",u=0),a=t-u,n.ellipsis=r,n.ellipsisWidth=u,n.contentWidth=a,n.containerWidth=t,n}function y(t,e){var r=e.containerWidth,n=e.font,i=e.contentWidth;if(!r)return"";var o=M(t,n);if(o<=r)return t;for(var a=0;;a++){if(o<=i||a>=e.maxIterations){t+=e.ellipsis;break}var s=0===a?f(t,i,e.ascCharWidth,e.cnCharWidth):0<o?Math.floor(t.length*i/o):0;o=M(t=t.substr(0,s),n)}return""===t&&(t=e.placeholder),t}function f(t,e,r,n){for(var i=0,o=0,a=t.length;o<a&&i<e;o++){var s=t.charCodeAt(o);i+=0<=s&&s<=127?r:n}return o}function F(t){return M("国",t)}function d(t,e){return a.measureText(t,e)}function b(t,e,r,n,i){null!=t&&(t+="");var o=O(n,F(e)),a=t?t.split("\n"):[],s=a.length*o,u=s;if(r&&(u+=r[0]+r[2]),t&&i){var l=i.outerHeight,h=i.outerWidth;if(null!=l&&l<u)t="",a=[];else if(null!=h)for(var c=p(h-(r?r[1]+r[3]:0),e,i.ellipsis,{minChar:i.minChar,placeholder:i.placeholder}),f=0,d=a.length;f<d;f++)a[f]=y(a[f],c)}return{lines:a,height:s,outerHeight:u,lineHeight:o}}function w(t,e){var r={lines:[],width:0,height:0};if(null!=t&&(t+=""),!t)return r;for(var n,i=B.lastIndex=0;null!=(n=B.exec(t));){var o=n.index;i<o&&R(r,t.substring(i,o)),R(r,n[2],n[1]),i=B.lastIndex}i<t.length&&R(r,t.substring(i,t.length));var a=r.lines,s=0,u=0,l=[],h=e.textPadding,c=e.truncate,f=c&&c.outerWidth,d=c&&c.outerHeight;h&&(null!=f&&(f-=h[1]+h[3]),null!=d&&(d-=h[0]+h[2]));for(var p=0;p<a.length;p++){for(var g=a[p],v=0,m=0,y=0;y<g.tokens.length;y++){var b=(k=g.tokens[y]).styleName&&e.rich[k.styleName]||{},w=k.textPadding=b.textPadding,_=k.font=b.font||e.font,x=k.textHeight=O(b.textHeight,F(_));if(w&&(x+=w[0]+w[2]),k.height=x,k.lineHeight=I(b.textLineHeight,e.textLineHeight,x),k.textAlign=b&&b.textAlign||e.textAlign,k.textVerticalAlign=b&&b.textVerticalAlign||"middle",null!=d&&s+k.lineHeight>d)return{lines:[],width:0,height:0};k.textWidth=M(k.text,_);var A=b.textWidth,L=null==A||"auto"===A;if("string"==typeof A&&"%"===A.charAt(A.length-1))k.percentWidth=A,l.push(k),A=0;else{if(L){A=k.textWidth;var S=b.textBackgroundColor,N=S&&S.image;N&&(N=T.findExistImage(N),T.isImageReady(N)&&(A=Math.max(A,N.width*x/N.height)))}var P=w?w[1]+w[3]:0;A+=P;var E=null!=f?f-m:null;null!=E&&E<A&&(!L||E<P?(k.text="",k.textWidth=A=0):(k.text=j(k.text,E-P,_,c.ellipsis,{minChar:c.minChar}),k.textWidth=M(k.text,_),A=k.textWidth+P))}m+=k.width=A,b&&(v=Math.max(v,k.lineHeight))}g.width=m,s+=g.lineHeight=v,u=Math.max(u,m)}r.outerWidth=r.width=O(e.textWidth,u),r.outerHeight=r.height=O(e.textHeight,s),h&&(r.outerWidth+=h[1]+h[3],r.outerHeight+=h[0]+h[2]);for(p=0;p<l.length;p++){var k,C=(k=l[p]).percentWidth;k.width=parseInt(C,10)/100*u}return r}function R(t,e,r){for(var n=""===e,i=e.split("\n"),o=t.lines,a=0;a<i.length;a++){var s=i[a],u={styleName:r,text:s,isLineHolder:!s&&!n};if(a)o.push({tokens:[u]});else{var l=(o[o.length-1]||(o[0]={tokens:[]})).tokens,h=l.length;1===h&&l[0].isLineHolder?l[0]=u:!s&&h&&!n||l.push(u)}}}a.measureText=function(t,e){var r=i();return r.font=e||c,r.measureText(t)},r.DEFAULT_FONT=c,r.$override=function(t,e){a[t]=e},r.getWidth=M,r.getBoundingRect=function(t,e,r,n,i,o,a,s){return a?(l=n,h=w(t,{rich:a,truncate:s,font:e,textAlign:u=r,textPadding:i,textLineHeight:o}),c=h.outerWidth,f=h.outerHeight,d=v(0,c,u),p=m(0,f,l),new g(d,p,c,f)):function(t,e,r,n,i,o,a){var s=b(t,e,i,o,a),u=M(t,e);i&&(u+=i[1]+i[3]);var l=s.outerHeight,h=v(0,u,r),c=m(0,l,n),f=new g(h,c,u,l);return f.lineHeight=s.lineHeight,f}(t,e,r,n,i,o,s);var u,l,h,c,f,d,p},r.adjustTextX=v,r.adjustTextY=m,r.adjustTextPositionOnRect=function(t,e,r){var n=e.x,i=e.y,o=e.height,a=e.width,s=o/2,u="left",l="top";switch(t){case"left":n-=r,i+=s,u="right",l="middle";break;case"right":n+=r+a,i+=s,l="middle";break;case"top":n+=a/2,i-=r,u="center",l="bottom";break;case"bottom":n+=a/2,i+=o+r,u="center";break;case"inside":n+=a/2,i+=s,u="center",l="middle";break;case"insideLeft":n+=r,i+=s,l="middle";break;case"insideRight":n+=a-r,i+=s,u="right",l="middle";break;case"insideTop":n+=a/2,i+=r,u="center";break;case"insideBottom":n+=a/2,i+=o-r,u="center",l="bottom";break;case"insideTopLeft":n+=r,i+=r;break;case"insideTopRight":n+=a-r,i+=r,u="right";break;case"insideBottomLeft":n+=r,i+=o-r,l="bottom";break;case"insideBottomRight":n+=a-r,i+=o-r,u="right",l="bottom"}return{x:n,y:i,textAlign:u,textVerticalAlign:l}},r.truncateText=j,r.getLineHeight=F,r.measureText=d,r.parsePlainText=b,r.parseRichText=w,r.makeFont=function(t){var e=(t.fontSize||t.fontFamily)&&[t.fontStyle,t.fontWeight,(t.fontSize||12)+"px",t.fontFamily||"sans-serif"].join(" ");return e&&o(e)||t.textFont||t.font}},{"../core/BoundingRect":106,"../core/util":119,"../graphic/helper/image":137}],103:[function(t,e,r){var n=2*Math.PI;r.normalizeRadian=function(t){return(t%=n)<0&&(t+=n),t}},{}],104:[function(t,e,r){e.exports=function(t,e,r,n,i,o){if(e<o&&n<o||o<e&&o<n)return 0;if(n===e)return 0;var a=n<e?1:-1,s=(o-e)/(n-e);1!=s&&0!=s||(a=n<e?.5:-.5);var u=s*(r-t)+t;return u===i?1/0:i<u?a:0}},{}],105:[function(t,e,r){function o(t){for(var e in t=t||{},n.call(this,t),t)t.hasOwnProperty(e)&&(this[e]=t[e]);this._children=[],this.__storage=null,this.__dirty=!0}var a=t("../core/util"),n=t("../Element"),l=t("../core/BoundingRect");o.prototype={constructor:o,isGroup:!0,type:"group",silent:!1,children:function(){return this._children.slice()},childAt:function(t){return this._children[t]},childOfName:function(t){for(var e=this._children,r=0;r<e.length;r++)if(e[r].name===t)return e[r]},childCount:function(){return this._children.length},add:function(t){return t&&t!==this&&t.parent!==this&&(this._children.push(t),this._doAdd(t)),this},addBefore:function(t,e){if(t&&t!==this&&t.parent!==this&&e&&e.parent===this){var r=this._children,n=r.indexOf(e);0<=n&&(r.splice(n,0,t),this._doAdd(t))}return this},_doAdd:function(t){t.parent&&t.parent.remove(t);var e=(t.parent=this).__storage,r=this.__zr;e&&e!==t.__storage&&(e.addToStorage(t),t instanceof o&&t.addChildrenToStorage(e)),r&&r.refresh()},remove:function(t){var e=this.__zr,r=this.__storage,n=this._children,i=a.indexOf(n,t);return i<0||(n.splice(i,1),t.parent=null,r&&(r.delFromStorage(t),t instanceof o&&t.delChildrenFromStorage(r)),e&&e.refresh()),this},removeAll:function(){var t,e,r=this._children,n=this.__storage;for(e=0;e<r.length;e++)t=r[e],n&&(n.delFromStorage(t),t instanceof o&&t.delChildrenFromStorage(n)),t.parent=null;return r.length=0,this},eachChild:function(t,e){for(var r=this._children,n=0;n<r.length;n++){var i=r[n];t.call(e,i,n)}return this},traverse:function(t,e){for(var r=0;r<this._children.length;r++){var n=this._children[r];t.call(e,n),"group"===n.type&&n.traverse(t,e)}return this},addChildrenToStorage:function(t){for(var e=0;e<this._children.length;e++){var r=this._children[e];t.addToStorage(r),r instanceof o&&r.addChildrenToStorage(t)}},delChildrenFromStorage:function(t){for(var e=0;e<this._children.length;e++){var r=this._children[e];t.delFromStorage(r),r instanceof o&&r.delChildrenFromStorage(t)}},dirty:function(){return this.__dirty=!0,this.__zr&&this.__zr.refresh(),this},getBoundingRect:function(t){for(var e=null,r=new l(0,0,0,0),n=t||this._children,i=[],o=0;o<n.length;o++){var a=n[o];if(!a.ignore&&!a.invisible){var s=a.getBoundingRect(),u=a.getLocalTransform(i);u?(r.copy(s),r.applyTransform(u),(e=e||r.clone()).union(r)):(e=e||s.clone()).union(s)}}return e||r}},a.inherits(o,n);var i=o;e.exports=i},{"../Element":86,"../core/BoundingRect":106,"../core/util":119}],106:[function(t,e,r){var n,i,o,a,s=t("./vector"),u=t("./matrix"),l=s.applyTransform,h=Math.min,c=Math.max;function f(t,e,r,n){r<0&&(t+=r,r=-r),n<0&&(e+=n,n=-n),this.x=t,this.y=e,this.width=r,this.height=n}f.prototype={constructor:f,union:function(t){var e=h(t.x,this.x),r=h(t.y,this.y);this.width=c(t.x+t.width,this.x+this.width)-e,this.height=c(t.y+t.height,this.y+this.height)-r,this.x=e,this.y=r},applyTransform:(n=[],i=[],o=[],a=[],function(t){if(t){n[0]=o[0]=this.x,n[1]=a[1]=this.y,i[0]=a[0]=this.x+this.width,i[1]=o[1]=this.y+this.height,l(n,n,t),l(i,i,t),l(o,o,t),l(a,a,t),this.x=h(n[0],i[0],o[0],a[0]),this.y=h(n[1],i[1],o[1],a[1]);var e=c(n[0],i[0],o[0],a[0]),r=c(n[1],i[1],o[1],a[1]);this.width=e-this.x,this.height=r-this.y}}),calculateTransform:function(t){var e=t.width/this.width,r=t.height/this.height,n=u.create();return u.translate(n,n,[-this.x,-this.y]),u.scale(n,n,[e,r]),u.translate(n,n,[t.x,t.y]),n},intersect:function(t){if(!t)return!1;t instanceof f||(t=f.create(t));var e=this.x,r=this.x+this.width,n=this.y,i=this.y+this.height,o=t.x,a=t.x+t.width,s=t.y,u=t.y+t.height;return!(r<o||a<e||i<s||u<n)},contain:function(t,e){return t>=this.x&&t<=this.x+this.width&&e>=this.y&&e<=this.y+this.height},clone:function(){return new f(this.x,this.y,this.width,this.height)},copy:function(t){this.x=t.x,this.y=t.y,this.width=t.width,this.height=t.height},plain:function(){return{x:this.x,y:this.y,width:this.width,height:this.height}}},f.create=function(t){return new f(t.x,t.y,t.width,t.height)};var d=f;e.exports=d},{"./matrix":117,"./vector":120}],107:[function(t,e,r){function n(){this._track=[]}var l=t("./event");function u(t){var e=t[1][0]-t[0][0],r=t[1][1]-t[0][1];return Math.sqrt(e*e+r*r)}n.prototype={constructor:n,recognize:function(t,e,r){return this._doTrack(t,e,r),this._recognize(t)},clear:function(){return this._track.length=0,this},_doTrack:function(t,e,r){var n=t.touches;if(n){for(var i={points:[],touches:[],target:e,event:t},o=0,a=n.length;o<a;o++){var s=n[o],u=l.clientToLocal(r,s,{});i.points.push([u.zrX,u.zrY]),i.touches.push(s)}this._track.push(i)}},_recognize:function(t){for(var e in i)if(i.hasOwnProperty(e)){var r=i[e](this._track,t);if(r)return r}}};var i={pinch:function(t,e){var r=t.length;if(r){var n,i=(t[r-1]||{}).points,o=(t[r-2]||{}).points||i;if(o&&1<o.length&&i&&1<i.length){var a=u(i)/u(o);isFinite(a)||(a=1),e.pinchScale=a;var s=[((n=i)[0][0]+n[1][0])/2,(n[0][1]+n[1][1])/2];return e.pinchX=s[0],e.pinchY=s[1],{type:"pinch",target:t[0].target,event:e}}}}},o=n;e.exports=o},{"./event":114}],108:[function(t,e,r){function n(){this.head=null,this.tail=null,this._len=0}var i=n.prototype;i.insert=function(t){var e=new u(t);return this.insertEntry(e),e},i.insertEntry=function(t){this.head?((this.tail.next=t).prev=this.tail,t.next=null,this.tail=t):this.head=this.tail=t,this._len++},i.remove=function(t){var e=t.prev,r=t.next;e?e.next=r:this.head=r,r?r.prev=e:this.tail=e,t.next=t.prev=null,this._len--},i.len=function(){return this._len},i.clear=function(){this.head=this.tail=null,this._len=0};function o(t){this._list=new n,this._map={},this._maxSize=t||10,this._lastRemovedEntry=null}var u=function(t){this.value=t,this.next,this.prev},a=o.prototype;a.put=function(t,e){var r=this._list,n=this._map,i=null;if(null==n[t]){var o=r.len(),a=this._lastRemovedEntry;if(o>=this._maxSize&&0<o){var s=r.head;r.remove(s),delete n[s.key],i=s.value,this._lastRemovedEntry=s}a?a.value=e:a=new u(e),a.key=t,r.insertEntry(a),n[t]=a}return i},a.get=function(t){var e=this._map[t],r=this._list;if(null!=e)return e!==r.tail&&(r.remove(e),r.insertEntry(e)),e.value},a.clear=function(){this._list.clear(),this._map={}};var s=o;e.exports=s},{}],109:[function(t,e,r){function n(t){this._saveData=!t,this._saveData&&(this.data=[]),this._ctx=null}var x=t("./curve"),v=t("./vector"),m=t("./bbox"),y=t("./BoundingRect"),i=t("../config").devicePixelRatio,S={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},b=[],w=[],_=[],A=[],L=Math.min,N=Math.max,P=Math.cos,E=Math.sin,k=Math.sqrt,C=Math.abs,s="undefined"!=typeof Float32Array;n.prototype={constructor:n,_xi:0,_yi:0,_x0:0,_y0:0,_ux:0,_uy:0,_len:0,_lineDash:null,_dashOffset:0,_dashIdx:0,_dashSum:0,setScale:function(t,e){this._ux=C(1/i/t)||0,this._uy=C(1/i/e)||0},getContext:function(){return this._ctx},beginPath:function(t){return(this._ctx=t)&&t.beginPath(),t&&(this.dpr=t.dpr),this._saveData&&(this._len=0),this._lineDash&&(this._lineDash=null,this._dashOffset=0),this},moveTo:function(t,e){return this.addData(S.M,t,e),this._ctx&&this._ctx.moveTo(t,e),this._x0=t,this._y0=e,this._xi=t,this._yi=e,this},lineTo:function(t,e){var r=C(t-this._xi)>this._ux||C(e-this._yi)>this._uy||this._len<5;return this.addData(S.L,t,e),this._ctx&&r&&(this._needsDash()?this._dashedLineTo(t,e):this._ctx.lineTo(t,e)),r&&(this._xi=t,this._yi=e),this},bezierCurveTo:function(t,e,r,n,i,o){return this.addData(S.C,t,e,r,n,i,o),this._ctx&&(this._needsDash()?this._dashedBezierTo(t,e,r,n,i,o):this._ctx.bezierCurveTo(t,e,r,n,i,o)),this._xi=i,this._yi=o,this},quadraticCurveTo:function(t,e,r,n){return this.addData(S.Q,t,e,r,n),this._ctx&&(this._needsDash()?this._dashedQuadraticTo(t,e,r,n):this._ctx.quadraticCurveTo(t,e,r,n)),this._xi=r,this._yi=n,this},arc:function(t,e,r,n,i,o){return this.addData(S.A,t,e,r,r,n,i-n,0,o?0:1),this._ctx&&this._ctx.arc(t,e,r,n,i,o),this._xi=P(i)*r+t,this._yi=E(i)*r+e,this},arcTo:function(t,e,r,n,i){return this._ctx&&this._ctx.arcTo(t,e,r,n,i),this},rect:function(t,e,r,n){return this._ctx&&this._ctx.rect(t,e,r,n),this.addData(S.R,t,e,r,n),this},closePath:function(){this.addData(S.Z);var t=this._ctx,e=this._x0,r=this._y0;return t&&(this._needsDash()&&this._dashedLineTo(e,r),t.closePath()),this._xi=e,this._yi=r,this},fill:function(t){t&&t.fill(),this.toStatic()},stroke:function(t){t&&t.stroke(),this.toStatic()},setLineDash:function(t){if(t instanceof Array){this._lineDash=t;for(var e=this._dashIdx=0,r=0;r<t.length;r++)e+=t[r];this._dashSum=e}return this},setLineDashOffset:function(t){return this._dashOffset=t,this},len:function(){return this._len},setData:function(t){var e=t.length;this.data&&this.data.length===e||!s||(this.data=new Float32Array(e));for(var r=0;r<e;r++)this.data[r]=t[r];this._len=e},appendPath:function(t){t instanceof Array||(t=[t]);for(var e=t.length,r=0,n=this._len,i=0;i<e;i++)r+=t[i].len();s&&this.data instanceof Float32Array&&(this.data=new Float32Array(n+r));for(i=0;i<e;i++)for(var o=t[i].data,a=0;a<o.length;a++)this.data[n++]=o[a];this._len=n},addData:function(t){if(this._saveData){var e=this.data;this._len+arguments.length>e.length&&(this._expandData(),e=this.data);for(var r=0;r<arguments.length;r++)e[this._len++]=arguments[r];this._prevCmd=t}},_expandData:function(){if(!(this.data instanceof Array)){for(var t=[],e=0;e<this._len;e++)t[e]=this.data[e];this.data=t}},_needsDash:function(){return this._lineDash},_dashedLineTo:function(t,e){var r,n,i=this._dashSum,o=this._dashOffset,a=this._lineDash,s=this._ctx,u=this._xi,l=this._yi,h=t-u,c=e-l,f=k(h*h+c*c),d=u,p=l,g=a.length;for(o<0&&(o=i+o),d-=(o%=i)*(h/=f),p-=o*(c/=f);0<h&&d<=t||h<0&&t<=d||0===h&&(0<c&&p<=e||c<0&&e<=p);)d+=h*(r=a[n=this._dashIdx]),p+=c*r,this._dashIdx=(n+1)%g,0<h&&d<u||h<0&&u<d||0<c&&p<l||c<0&&l<p||s[n%2?"moveTo":"lineTo"]((0<=h?L:N)(d,t),(0<=c?L:N)(p,e));h=d-t,c=p-e,this._dashOffset=-k(h*h+c*c)},_dashedBezierTo:function(t,e,r,n,i,o){var a,s,u,l,h,c=this._dashSum,f=this._dashOffset,d=this._lineDash,p=this._ctx,g=this._xi,v=this._yi,m=x.cubicAt,y=0,b=this._dashIdx,w=d.length,_=0;for(f<0&&(f=c+f),f%=c,a=0;a<1;a+=.1)s=m(g,t,r,i,a+.1)-m(g,t,r,i,a),u=m(v,e,n,o,a+.1)-m(v,e,n,o,a),y+=k(s*s+u*u);for(;b<w&&!(f<(_+=d[b]));b++);for(a=(_-f)/y;a<=1;)l=m(g,t,r,i,a),h=m(v,e,n,o,a),b%2?p.moveTo(l,h):p.lineTo(l,h),a+=d[b]/y,b=(b+1)%w;b%2!=0&&p.lineTo(i,o),s=i-l,u=o-h,this._dashOffset=-k(s*s+u*u)},_dashedQuadraticTo:function(t,e,r,n){var i=r,o=n;r=(r+2*t)/3,n=(n+2*e)/3,t=(this._xi+2*t)/3,e=(this._yi+2*e)/3,this._dashedBezierTo(t,e,r,n,i,o)},toStatic:function(){var t=this.data;t instanceof Array&&(t.length=this._len,s&&(this.data=new Float32Array(t)))},getBoundingRect:function(){b[0]=b[1]=_[0]=_[1]=Number.MAX_VALUE,w[0]=w[1]=A[0]=A[1]=-Number.MAX_VALUE;for(var t=this.data,e=0,r=0,n=0,i=0,o=0;o<t.length;){var a=t[o++];switch(1===o&&(n=e=t[o],i=r=t[o+1]),a){case S.M:e=n=t[o++],r=i=t[o++],_[0]=n,_[1]=i,A[0]=n,A[1]=i;break;case S.L:m.fromLine(e,r,t[o],t[o+1],_,A),e=t[o++],r=t[o++];break;case S.C:m.fromCubic(e,r,t[o++],t[o++],t[o++],t[o++],t[o],t[o+1],_,A),e=t[o++],r=t[o++];break;case S.Q:m.fromQuadratic(e,r,t[o++],t[o++],t[o],t[o+1],_,A),e=t[o++],r=t[o++];break;case S.A:var s=t[o++],u=t[o++],l=t[o++],h=t[o++],c=t[o++],f=t[o++]+c;o+=1;var d=1-t[o++];1===o&&(n=P(c)*l+s,i=E(c)*h+u),m.fromArc(s,u,l,h,c,f,d,_,A),e=P(f)*l+s,r=E(f)*h+u;break;case S.R:n=e=t[o++],i=r=t[o++];var p=t[o++],g=t[o++];m.fromLine(n,i,n+p,i+g,_,A);break;case S.Z:e=n,r=i}v.min(b,b,_),v.max(w,w,A)}return 0===o&&(b[0]=b[1]=w[0]=w[1]=0),new y(b[0],b[1],w[0]-b[0],w[1]-b[1])},rebuildPath:function(t){for(var e,r,n,i,o,a,s=this.data,u=this._ux,l=this._uy,h=this._len,c=0;c<h;){var f=s[c++];switch(1===c&&(e=n=s[c],r=i=s[c+1]),f){case S.M:e=n=s[c++],r=i=s[c++],t.moveTo(n,i);break;case S.L:o=s[c++],a=s[c++],(C(o-n)>u||C(a-i)>l||c===h-1)&&(t.lineTo(o,a),n=o,i=a);break;case S.C:t.bezierCurveTo(s[c++],s[c++],s[c++],s[c++],s[c++],s[c++]),n=s[c-2],i=s[c-1];break;case S.Q:t.quadraticCurveTo(s[c++],s[c++],s[c++],s[c++]),n=s[c-2],i=s[c-1];break;case S.A:var d=s[c++],p=s[c++],g=s[c++],v=s[c++],m=s[c++],y=s[c++],b=s[c++],w=s[c++],_=v<g?g:v,x=v<g?1:g/v,A=v<g?v/g:1,L=m+y;.001<Math.abs(g-v)?(t.translate(d,p),t.rotate(b),t.scale(x,A),t.arc(0,0,_,m,L,1-w),t.scale(1/x,1/A),t.rotate(-b),t.translate(-d,-p)):t.arc(d,p,_,m,L,1-w),1===c&&(e=P(m)*g+d,r=E(m)*v+p),n=P(L)*g+d,i=E(L)*v+p;break;case S.R:e=n=s[c],r=i=s[c+1],t.rect(s[c++],s[c++],s[c++],s[c++]);break;case S.Z:t.closePath(),n=e,i=r}}}},n.CMD=S;var o=n;e.exports=o},{"../config":96,"./BoundingRect":106,"./bbox":111,"./curve":112,"./vector":120}],110:[function(t,e,r){function n(){}function g(t,e){for(var r=0,n=e.length,i=0,o=0;r<n;r++){var a=e[r];if(a.removed){for(s=[],u=o;u<o+a.count;u++)s.push(u);a.indices=s,o+=a.count}else{for(var s=[],u=i;u<i+a.count;u++)s.push(u);a.indices=s,i+=a.count,a.added||(o+=a.count)}}return e}n.prototype={diff:function(u,l,t){t=t||function(t,e){return t===e},this.equals=t;var h=this;u=u.slice();var c=(l=l.slice()).length,f=u.length,d=1,e=c+f,p=[{newPos:-1,components:[]}],r=this.extractCommon(p[0],l,u,0);if(p[0].newPos+1>=c&&f<=r+1){for(var n=[],i=0;i<l.length;i++)n.push(i);return[{indices:n,count:l.length}]}function o(){for(var t=-1*d;t<=d;t+=2){var e,r=p[t-1],n=p[t+1],i=(n?n.newPos:0)-t;r&&(p[t-1]=void 0);var o=r&&r.newPos+1<c,a=n&&0<=i&&i<f;if(o||a){if(!o||a&&r.newPos<n.newPos?(e={newPos:(s=n).newPos,components:s.components.slice(0)},h.pushComponent(e.components,void 0,!0)):((e=r).newPos++,h.pushComponent(e.components,!0,void 0)),i=h.extractCommon(e,l,u,t),e.newPos+1>=c&&f<=i+1)return g(0,e.components);p[t]=e}else p[t]=void 0}var s;d++}for(;d<=e;){var a=o();if(a)return a}},pushComponent:function(t,e,r){var n=t[t.length-1];n&&n.added===e&&n.removed===r?t[t.length-1]={count:n.count+1,added:e,removed:r}:t.push({count:1,added:e,removed:r})},extractCommon:function(t,e,r,n){for(var i=e.length,o=r.length,a=t.newPos,s=a-n,u=0;a+1<i&&s+1<o&&this.equals(e[a+1],r[s+1]);)a++,s++,u++;return u&&t.components.push({count:u}),t.newPos=a,s},tokenize:function(t){return t.slice()},join:function(t){return t.slice()}};var i=new n;e.exports=function(t,e,r){return i.diff(t,e,r)}},{}],111:[function(t,e,r){var p=t("./vector"),v=t("./curve"),m=Math.min,y=Math.max,g=Math.sin,b=Math.cos,w=2*Math.PI,_=p.create(),x=p.create(),A=p.create();var L=[],S=[];r.fromPoints=function(t,e,r){if(0!==t.length){var n,i=t[0],o=i[0],a=i[0],s=i[1],u=i[1];for(n=1;n<t.length;n++)i=t[n],o=m(o,i[0]),a=y(a,i[0]),s=m(s,i[1]),u=y(u,i[1]);e[0]=o,e[1]=s,r[0]=a,r[1]=u}},r.fromLine=function(t,e,r,n,i,o){i[0]=m(t,r),i[1]=m(e,n),o[0]=y(t,r),o[1]=y(e,n)},r.fromCubic=function(t,e,r,n,i,o,a,s,u,l){var h,c=v.cubicExtrema,f=v.cubicAt,d=c(t,r,i,a,L);for(u[0]=1/0,u[1]=1/0,l[0]=-1/0,l[1]=-1/0,h=0;h<d;h++){var p=f(t,r,i,a,L[h]);u[0]=m(p,u[0]),l[0]=y(p,l[0])}for(d=c(e,n,o,s,S),h=0;h<d;h++){var g=f(e,n,o,s,S[h]);u[1]=m(g,u[1]),l[1]=y(g,l[1])}u[0]=m(t,u[0]),l[0]=y(t,l[0]),u[0]=m(a,u[0]),l[0]=y(a,l[0]),u[1]=m(e,u[1]),l[1]=y(e,l[1]),u[1]=m(s,u[1]),l[1]=y(s,l[1])},r.fromQuadratic=function(t,e,r,n,i,o,a,s){var u=v.quadraticExtremum,l=v.quadraticAt,h=y(m(u(t,r,i),1),0),c=y(m(u(e,n,o),1),0),f=l(t,r,i,h),d=l(e,n,o,c);a[0]=m(t,i,f),a[1]=m(e,o,d),s[0]=y(t,i,f),s[1]=y(e,o,d)},r.fromArc=function(t,e,r,n,i,o,a,s,u){var l=p.min,h=p.max,c=Math.abs(i-o);if(c%w<1e-4&&1e-4<c)return s[0]=t-r,s[1]=e-n,u[0]=t+r,void(u[1]=e+n);if(_[0]=b(i)*r+t,_[1]=g(i)*n+e,x[0]=b(o)*r+t,x[1]=g(o)*n+e,l(s,_,x),h(u,_,x),(i%=w)<0&&(i+=w),(o%=w)<0&&(o+=w),o<i&&!a?o+=w:i<o&&a&&(i+=w),a){var f=o;o=i,i=f}for(var d=0;d<o;d+=Math.PI/2)i<d&&(A[0]=b(d)*r+t,A[1]=g(d)*n+e,l(s,A,s),h(u,A,u))}},{"./curve":112,"./vector":120}],112:[function(t,e,r){var n=t("./vector"),i=n.create,w=n.distSquare,N=Math.pow,P=Math.sqrt,o=1e-8,E=P(3),_=i(),x=i(),A=i();function k(t){return-o<t&&t<o}function d(t){return o<t||t<-o}function L(t,e,r,n,i){var o=1-i;return o*o*(o*t+3*i*e)+i*i*(i*n+3*o*r)}function y(t,e,r,n){var i=1-n;return i*(i*t+2*n*e)+n*n*r}r.cubicAt=L,r.cubicDerivativeAt=function(t,e,r,n,i){var o=1-i;return 3*(((e-t)*o+2*(r-e)*i)*o+(n-r)*i*i)},r.cubicRootAt=function(t,e,r,n,i,o){var a=n+3*(e-r)-t,s=3*(r-2*e+t),u=3*(e-t),l=t-i,h=s*s-3*a*u,c=s*u-9*a*l,f=u*u-3*s*l,d=0;if(k(h)&&k(c)){if(k(s))o[0]=0;else 0<=(L=-u/s)&&L<=1&&(o[d++]=L)}else{var p=c*c-4*h*f;if(k(p)){var g=c/h,v=-g/2;0<=(L=-s/a+g)&&L<=1&&(o[d++]=L),0<=v&&v<=1&&(o[d++]=v)}else if(0<p){var m=P(p),y=h*s+1.5*a*(-c+m),b=h*s+1.5*a*(-c-m);0<=(L=(-s-((y=y<0?-N(-y,1/3):N(y,1/3))+(b=b<0?-N(-b,1/3):N(b,1/3))))/(3*a))&&L<=1&&(o[d++]=L)}else{var w=(2*h*s-3*a*c)/(2*P(h*h*h)),_=Math.acos(w)/3,x=P(h),A=Math.cos(_),L=(-s-2*x*A)/(3*a),S=(v=(-s+x*(A+E*Math.sin(_)))/(3*a),(-s+x*(A-E*Math.sin(_)))/(3*a));0<=L&&L<=1&&(o[d++]=L),0<=v&&v<=1&&(o[d++]=v),0<=S&&S<=1&&(o[d++]=S)}}return d},r.cubicExtrema=function(t,e,r,n,i){var o=6*r-12*e+6*t,a=9*e+3*n-3*t-9*r,s=3*e-3*t,u=0;if(k(a)){if(d(o))0<=(h=-s/o)&&h<=1&&(i[u++]=h)}else{var l=o*o-4*a*s;if(k(l))i[0]=-o/(2*a);else if(0<l){var h,c=P(l),f=(-o-c)/(2*a);0<=(h=(-o+c)/(2*a))&&h<=1&&(i[u++]=h),0<=f&&f<=1&&(i[u++]=f)}}return u},r.cubicSubdivide=function(t,e,r,n,i,o){var a=(e-t)*i+t,s=(r-e)*i+e,u=(n-r)*i+r,l=(s-a)*i+a,h=(u-s)*i+s,c=(h-l)*i+l;o[0]=t,o[1]=a,o[2]=l,o[3]=c,o[4]=c,o[5]=h,o[6]=u,o[7]=n},r.cubicProjectPoint=function(t,e,r,n,i,o,a,s,u,l,h){var c,f,d,p,g,v=.005,m=1/0;_[0]=u,_[1]=l;for(var y=0;y<1;y+=.05)x[0]=L(t,r,i,a,y),x[1]=L(e,n,o,s,y),(p=w(_,x))<m&&(c=y,m=p);m=1/0;for(var b=0;b<32&&!(v<1e-4);b++)f=c-v,d=c+v,x[0]=L(t,r,i,a,f),x[1]=L(e,n,o,s,f),p=w(x,_),0<=f&&p<m?(c=f,m=p):(A[0]=L(t,r,i,a,d),A[1]=L(e,n,o,s,d),g=w(A,_),d<=1&&g<m?(c=d,m=g):v*=.5);return h&&(h[0]=L(t,r,i,a,c),h[1]=L(e,n,o,s,c)),P(m)},r.quadraticAt=y,r.quadraticDerivativeAt=function(t,e,r,n){return 2*((1-n)*(e-t)+n*(r-e))},r.quadraticRootAt=function(t,e,r,n,i){var o=t-2*e+r,a=2*(e-t),s=t-n,u=0;if(k(o)){if(d(a))0<=(h=-s/a)&&h<=1&&(i[u++]=h)}else{var l=a*a-4*o*s;if(k(l))0<=(h=-a/(2*o))&&h<=1&&(i[u++]=h);else if(0<l){var h,c=P(l),f=(-a-c)/(2*o);0<=(h=(-a+c)/(2*o))&&h<=1&&(i[u++]=h),0<=f&&f<=1&&(i[u++]=f)}}return u},r.quadraticExtremum=function(t,e,r){var n=t+r-2*e;return 0==n?.5:(t-e)/n},r.quadraticSubdivide=function(t,e,r,n,i){var o=(e-t)*n+t,a=(r-e)*n+e,s=(a-o)*n+o;i[0]=t,i[1]=o,i[2]=s,i[3]=s,i[4]=a,i[5]=r},r.quadraticProjectPoint=function(t,e,r,n,i,o,a,s,u){var l,h=.005,c=1/0;_[0]=a,_[1]=s;for(var f=0;f<1;f+=.05){x[0]=y(t,r,i,f),x[1]=y(e,n,o,f),(v=w(_,x))<c&&(l=f,c=v)}c=1/0;for(var d=0;d<32&&!(h<1e-4);d++){var p=l-h,g=l+h;x[0]=y(t,r,i,p),x[1]=y(e,n,o,p);var v=w(x,_);if(0<=p&&v<c)l=p,c=v;else{A[0]=y(t,r,i,g),A[1]=y(e,n,o,g);var m=w(A,_);g<=1&&m<c?(l=g,c=m):h*=.5}}return u&&(u[0]=y(t,r,i,l),u[1]=y(e,n,o,l)),P(c)}},{"./vector":120}],113:[function(t,e,r){var n="object"==typeof wx&&"function"==typeof wx.getSystemInfoSync?{browser:{},os:{},node:!1,wxa:!0,canvasSupported:!0,svgSupported:!1,touchEventsSupported:!0,domSupported:!1}:"undefined"==typeof document&&"undefined"!=typeof self?{browser:{},os:{},node:!1,worker:!0,canvasSupported:!0,domSupported:!1}:"undefined"==typeof navigator?{browser:{},os:{},node:!0,worker:!1,canvasSupported:!0,svgSupported:!0,domSupported:!1}:function(t){var e={},r=t.match(/Firefox\/([\d.]+)/),n=t.match(/MSIE\s([\d.]+)/)||t.match(/Trident\/.+?rv:(([\d.]+))/),i=t.match(/Edge\/([\d.]+)/),o=/micromessenger/i.test(t);r&&(e.firefox=!0,e.version=r[1]);n&&(e.ie=!0,e.version=n[1]);i&&(e.edge=!0,e.version=i[1]);o&&(e.weChat=!0);return{browser:e,os:{},node:!1,canvasSupported:!!document.createElement("canvas").getContext,svgSupported:"undefined"!=typeof SVGRect,touchEventsSupported:"ontouchstart"in window&&!e.ie&&!e.edge,pointerEventsSupported:"onpointerdown"in window&&(e.edge||e.ie&&11<=e.version),domSupported:"undefined"!=typeof document}}(navigator.userAgent);e.exports=n},{}],114:[function(t,e,r){var n=t("../mixin/Eventful");r.Dispatcher=n;var i=t("./env"),o="undefined"!=typeof window&&!!window.addEventListener,a=/^(?:mouse|pointer|contextmenu|drag|drop)|click/;function s(t,e,r,n){return r=r||{},n||!i.canvasSupported?u(t,e,r):i.browser.firefox&&null!=e.layerX&&e.layerX!==e.offsetX?(r.zrX=e.layerX,r.zrY=e.layerY):null!=e.offsetX?(r.zrX=e.offsetX,r.zrY=e.offsetY):u(t,e,r),r}function u(t,e,r){var n,i=(n=t).getBoundingClientRect?n.getBoundingClientRect():{left:0,top:0};r.zrX=e.clientX-i.left,r.zrY=e.clientY-i.top}var l=o?function(t){t.preventDefault(),t.stopPropagation(),t.cancelBubble=!0}:function(t){t.returnValue=!1,t.cancelBubble=!0};r.clientToLocal=s,r.normalizeEvent=function(t,e,r){if(null!=(e=e||window.event).zrX)return e;var n=e.type;if(n&&0<=n.indexOf("touch")){var i="touchend"!==n?e.targetTouches[0]:e.changedTouches[0];i&&s(t,i,e,r)}else s(t,e,e,r),e.zrDelta=e.wheelDelta?e.wheelDelta/120:-(e.detail||0)/3;var o=e.button;return null==e.which&&void 0!==o&&a.test(e.type)&&(e.which=1&o?1:2&o?3:4&o?2:0),e},r.addEventListener=function(t,e,r){o?t.addEventListener(e,r):t.attachEvent("on"+e,r)},r.removeEventListener=function(t,e,r){o?t.removeEventListener(e,r):t.detachEvent("on"+e,r)},r.stop=l,r.isMiddleOrRightButtonOnMouseUpDown=function(t){return 2===t.which||3===t.which},r.notLeftMouse=function(t){return 1<t.which}},{"../mixin/Eventful":163,"./env":113}],115:[function(t,e,r){var n=2311;e.exports=function(){return n++}},{}],116:[function(t,e,r){var n=t("../config").debugMode,i=function(){};1===n?i=function(){for(var t in arguments)throw new Error(arguments[t])}:1<n&&(i=function(){for(var t in arguments)console.log(arguments[t])});var o=i;e.exports=o},{"../config":96}],117:[function(t,e,r){var n="undefined"==typeof Float32Array?Array:Float32Array;function i(){var t=new n(6);return o(t),t}function o(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t}function a(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t}r.create=i,r.identity=o,r.copy=a,r.mul=function(t,e,r){var n=e[0]*r[0]+e[2]*r[1],i=e[1]*r[0]+e[3]*r[1],o=e[0]*r[2]+e[2]*r[3],a=e[1]*r[2]+e[3]*r[3],s=e[0]*r[4]+e[2]*r[5]+e[4],u=e[1]*r[4]+e[3]*r[5]+e[5];return t[0]=n,t[1]=i,t[2]=o,t[3]=a,t[4]=s,t[5]=u,t},r.translate=function(t,e,r){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4]+r[0],t[5]=e[5]+r[1],t},r.rotate=function(t,e,r){var n=e[0],i=e[2],o=e[4],a=e[1],s=e[3],u=e[5],l=Math.sin(r),h=Math.cos(r);return t[0]=n*h+a*l,t[1]=-n*l+a*h,t[2]=i*h+s*l,t[3]=-i*l+h*s,t[4]=h*o+l*u,t[5]=h*u-l*o,t},r.scale=function(t,e,r){var n=r[0],i=r[1];return t[0]=e[0]*n,t[1]=e[1]*i,t[2]=e[2]*n,t[3]=e[3]*i,t[4]=e[4]*n,t[5]=e[5]*i,t},r.invert=function(t,e){var r=e[0],n=e[2],i=e[4],o=e[1],a=e[3],s=e[5],u=r*a-o*n;return u?(u=1/u,t[0]=a*u,t[1]=-o*u,t[2]=-n*u,t[3]=r*u,t[4]=(n*s-a*i)*u,t[5]=(o*i-r*s)*u,t):null},r.clone=function(t){var e=i();return a(e,t),e}},{}],118:[function(t,e,r){var l=32,y=7;function h(t,e,r,n){var i=e+1;if(i===r)return 1;if(n(t[i++],t[e])<0){for(;i<r&&n(t[i],t[i-1])<0;)i++;!function(t,e,r){r--;for(;e<r;){var n=t[e];t[e++]=t[r],t[r--]=n}}(t,e,i)}else for(;i<r&&0<=n(t[i],t[i-1]);)i++;return i-e}function c(t,e,r,n,i){for(n===e&&n++;n<r;n++){for(var o,a=t[n],s=e,u=n;s<u;)i(a,t[o=s+u>>>1])<0?u=o:s=1+o;var l=n-s;switch(l){case 3:t[s+3]=t[s+2];case 2:t[s+2]=t[s+1];case 1:t[s+1]=t[s];break;default:for(;0<l;)t[s+l]=t[s+l-1],l--}t[s]=a}}function b(t,e,r,n,i,o){var a=0,s=0,u=1;if(0<o(t,e[r+i])){for(s=n-i;u<s&&0<o(t,e[r+i+u]);)(u=1+((a=u)<<1))<=0&&(u=s);s<u&&(u=s),a+=i,u+=i}else{for(s=i+1;u<s&&o(t,e[r+i-u])<=0;)(u=1+((a=u)<<1))<=0&&(u=s);s<u&&(u=s);var l=a;a=i-u,u=i-l}for(a++;a<u;){var h=a+(u-a>>>1);0<o(t,e[r+h])?a=h+1:u=h}return u}function w(t,e,r,n,i,o){var a=0,s=0,u=1;if(o(t,e[r+i])<0){for(s=i+1;u<s&&o(t,e[r+i-u])<0;)(u=1+((a=u)<<1))<=0&&(u=s);s<u&&(u=s);var l=a;a=i-u,u=i-l}else{for(s=n-i;u<s&&0<=o(t,e[r+i+u]);)(u=1+((a=u)<<1))<=0&&(u=s);s<u&&(u=s),a+=i,u+=i}for(a++;a<u;){var h=a+(u-a>>>1);o(t,e[r+h])<0?u=h:a=h+1}return u}function f(p,g){var a,s,v=y,u=0;p.length;var m=[];function e(t){var e=a[t],r=s[t],n=a[t+1],i=s[t+1];s[t]=r+i,t===u-3&&(a[t+1]=a[t+2],s[t+1]=s[t+2]),u--;var o=w(p[n],p,e,r,0,g);e+=o,0!==(r-=o)&&0!==(i=b(p[e+r-1],p,n,i,i-1,g))&&(r<=i?function(t,e,r,n){var i=0;for(i=0;i<e;i++)m[i]=p[t+i];var o=0,a=r,s=t;if(p[s++]=p[a++],0==--n){for(i=0;i<e;i++)p[s+i]=m[o+i];return}if(1===e){for(i=0;i<n;i++)p[s+i]=p[a+i];return p[s+n]=m[o]}var u,l,h,c=v;for(;;){l=u=0,h=!1;do{if(g(p[a],m[o])<0){if(p[s++]=p[a++],l++,(u=0)==--n){h=!0;break}}else if(p[s++]=m[o++],u++,l=0,1==--e){h=!0;break}}while((u|l)<c);if(h)break;do{if(0!==(u=w(p[a],m,o,e,0,g))){for(i=0;i<u;i++)p[s+i]=m[o+i];if(s+=u,o+=u,(e-=u)<=1){h=!0;break}}if(p[s++]=p[a++],0==--n){h=!0;break}if(0!==(l=b(m[o],p,a,n,0,g))){for(i=0;i<l;i++)p[s+i]=p[a+i];if(s+=l,a+=l,0===(n-=l)){h=!0;break}}if(p[s++]=m[o++],1==--e){h=!0;break}c--}while(y<=u||y<=l);if(h)break;c<0&&(c=0),c+=2}if((v=c)<1&&(v=1),1===e){for(i=0;i<n;i++)p[s+i]=p[a+i];p[s+n]=m[o]}else{if(0===e)throw new Error;for(i=0;i<e;i++)p[s+i]=m[o+i]}}:function(t,e,r,n){var i=0;for(i=0;i<n;i++)m[i]=p[r+i];var o=t+e-1,a=n-1,s=r+n-1,u=0,l=0;if(p[s--]=p[o--],0==--e){for(u=s-(n-1),i=0;i<n;i++)p[u+i]=m[i];return}if(1===n){for(l=(s-=e)+1,u=(o-=e)+1,i=e-1;0<=i;i--)p[l+i]=p[u+i];return p[s]=m[a]}var h=v;for(;;){var c=0,f=0,d=!1;do{if(g(m[a],p[o])<0){if(p[s--]=p[o--],c++,(f=0)==--e){d=!0;break}}else if(p[s--]=m[a--],f++,c=0,1==--n){d=!0;break}}while((c|f)<h);if(d)break;do{if(0!==(c=e-w(m[a],p,t,e,e-1,g))){for(e-=c,l=(s-=c)+1,u=(o-=c)+1,i=c-1;0<=i;i--)p[l+i]=p[u+i];if(0===e){d=!0;break}}if(p[s--]=m[a--],1==--n){d=!0;break}if(0!==(f=n-b(p[o],m,0,n,n-1,g))){for(n-=f,l=(s-=f)+1,u=(a-=f)+1,i=0;i<f;i++)p[l+i]=m[u+i];if(n<=1){d=!0;break}}if(p[s--]=p[o--],0==--e){d=!0;break}h--}while(y<=c||y<=f);if(d)break;h<0&&(h=0),h+=2}(v=h)<1&&(v=1);if(1===n){for(l=(s-=e)+1,u=(o-=e)+1,i=e-1;0<=i;i--)p[l+i]=p[u+i];p[s]=m[a]}else{if(0===n)throw new Error;for(u=s-(n-1),i=0;i<n;i++)p[u+i]=m[i]}})(e,r,n,i)}a=[],s=[],this.mergeRuns=function(){for(;1<u;){var t=u-2;if(1<=t&&s[t-1]<=s[t]+s[t+1]||2<=t&&s[t-2]<=s[t]+s[t-1])s[t-1]<s[t+1]&&t--;else if(s[t]>s[t+1])break;e(t)}},this.forceMergeRuns=function(){for(;1<u;){var t=u-2;0<t&&s[t-1]<s[t+1]&&t--,e(t)}},this.pushRun=function(t,e){a[u]=t,s[u]=e,u+=1}}e.exports=function(t,e,r,n){r=r||0;var i=(n=n||t.length)-r;if(!(i<2)){var o=0;if(i<l)c(t,r,n,r+(o=h(t,r,n,e)),e);else{var a=new f(t,e),s=function(t){for(var e=0;l<=t;)e|=1&t,t>>=1;return t+e}(i);do{if((o=h(t,r,n,e))<s){var u=i;s<u&&(u=s),c(t,r,r+u,r+o,e),o=u}a.pushRun(r,o),a.mergeRuns(),i-=o,r+=o}while(0!==i);a.forceMergeRuns()}}}},{}],119:[function(t,e,r){var s={"[object Function]":1,"[object RegExp]":1,"[object Date]":1,"[object Error]":1,"[object CanvasGradient]":1,"[object CanvasPattern]":1,"[object Image]":1,"[object Canvas]":1},u={"[object Int8Array]":1,"[object Uint8Array]":1,"[object Uint8ClampedArray]":1,"[object Int16Array]":1,"[object Uint16Array]":1,"[object Int32Array]":1,"[object Uint32Array]":1,"[object Float32Array]":1,"[object Float64Array]":1},l=Object.prototype.toString,n=Array.prototype,a=n.forEach,h=n.filter,i=n.slice,c=n.map,f=n.reduce,o={};function d(t){if(null==t||"object"!=typeof t)return t;var e=t,r=l.call(t);if("[object Array]"===r){if(!S(t)){e=[];for(var n=0,i=t.length;n<i;n++)e[n]=d(t[n])}}else if(u[r]){if(!S(t)){var o=t.constructor;if(t.constructor.from)e=o.from(t);else{e=new o(t.length);for(n=0,i=t.length;n<i;n++)e[n]=d(t[n])}}}else if(!s[r]&&!S(t)&&!A(t))for(var a in e={},t)t.hasOwnProperty(a)&&(e[a]=d(t[a]));return e}function p(t,e,r){if(!_(e)||!_(t))return r?d(e):t;for(var n in e)if(e.hasOwnProperty(n)){var i=t[n],o=e[n];!_(o)||!_(i)||w(o)||w(i)||A(o)||A(i)||x(o)||x(i)||S(o)||S(i)?!r&&n in t||(t[n]=d(e[n])):p(i,o,r)}return t}function g(t,e,r){for(var n in e)e.hasOwnProperty(n)&&(r?null!=e[n]:null==t[n])&&(t[n]=e[n]);return t}function v(){return o.createCanvas()}var m;function y(t,e,r){if(t&&e)if(t.forEach&&t.forEach===a)t.forEach(e,r);else if(t.length===+t.length)for(var n=0,i=t.length;n<i;n++)e.call(r,t[n],n,t);else for(var o in t)t.hasOwnProperty(o)&&e.call(r,t[o],o,t)}function b(t,e){var r=i.call(arguments,2);return function(){return t.apply(e,r.concat(i.call(arguments)))}}function w(t){return"[object Array]"===l.call(t)}function _(t){var e=typeof t;return"function"==e||!!t&&"object"==e}function x(t){return!!s[l.call(t)]}function A(t){return"object"==typeof t&&"number"==typeof t.nodeType&&"object"==typeof t.ownerDocument}o.createCanvas=function(){return document.createElement("canvas")};var L="__ec_primitive__";function S(t){return t[L]}function N(t){var r=w(t);this.data={};var n=this;function e(t,e){r?n.set(t,e):n.set(e,t)}t instanceof N?t.each(e):t&&y(t,e)}N.prototype={constructor:N,get:function(t){return this.data.hasOwnProperty(t)?this.data[t]:null},set:function(t,e){return this.data[t]=e},each:function(t,e){for(var r in void 0!==e&&(t=b(t,e)),this.data)this.data.hasOwnProperty(r)&&t(this.data[r],r)},removeKey:function(t){delete this.data[t]}},r.$override=function(t,e){"createCanvas"===t&&(m=null),o[t]=e},r.clone=d,r.merge=p,r.mergeAll=function(t,e){for(var r=t[0],n=1,i=t.length;n<i;n++)r=p(r,t[n],e);return r},r.extend=function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);return t},r.defaults=g,r.createCanvas=v,r.getContext=function(){return m=m||v().getContext("2d")},r.indexOf=function(t,e){if(t){if(t.indexOf)return t.indexOf(e);for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r}return-1},r.inherits=function(t,e){var r=t.prototype;function n(){}for(var i in n.prototype=e.prototype,t.prototype=new n,r)t.prototype[i]=r[i];(t.prototype.constructor=t).superClass=e},r.mixin=function(t,e,r){g(t="prototype"in t?t.prototype:t,e="prototype"in e?e.prototype:e,r)},r.isArrayLike=function(t){if(t)return"string"!=typeof t&&"number"==typeof t.length},r.each=y,r.map=function(t,e,r){if(t&&e){if(t.map&&t.map===c)return t.map(e,r);for(var n=[],i=0,o=t.length;i<o;i++)n.push(e.call(r,t[i],i,t));return n}},r.reduce=function(t,e,r,n){if(t&&e){if(t.reduce&&t.reduce===f)return t.reduce(e,r,n);for(var i=0,o=t.length;i<o;i++)r=e.call(n,r,t[i],i,t);return r}},r.filter=function(t,e,r){if(t&&e){if(t.filter&&t.filter===h)return t.filter(e,r);for(var n=[],i=0,o=t.length;i<o;i++)e.call(r,t[i],i,t)&&n.push(t[i]);return n}},r.find=function(t,e,r){if(t&&e)for(var n=0,i=t.length;n<i;n++)if(e.call(r,t[n],n,t))return t[n]},r.bind=b,r.curry=function(t){var e=i.call(arguments,1);return function(){return t.apply(this,e.concat(i.call(arguments)))}},r.isArray=w,r.isFunction=function(t){return"function"==typeof t},r.isString=function(t){return"[object String]"===l.call(t)},r.isObject=_,r.isBuiltInObject=x,r.isTypedArray=function(t){return!!u[l.call(t)]},r.isDom=A,r.eqNaN=function(t){return t!=t},r.retrieve=function(t){for(var e=0,r=arguments.length;e<r;e++)if(null!=arguments[e])return arguments[e]},r.retrieve2=function(t,e){return null!=t?t:e},r.retrieve3=function(t,e,r){return null!=t?t:null!=e?e:r},r.slice=function(){return Function.call.apply(i,arguments)},r.normalizeCssArray=function(t){if("number"==typeof t)return[t,t,t,t];var e=t.length;return 2===e?[t[0],t[1],t[0],t[1]]:3===e?[t[0],t[1],t[2],t[1]]:t},r.assert=function(t,e){if(!t)throw new Error(e)},r.trim=function(t){return null==t?null:"function"==typeof t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")},r.setAsPrimitive=function(t){t[L]=!0},r.isPrimitive=S,r.createHashMap=function(t){return new N(t)},r.concatArray=function(t,e){for(var r=new t.constructor(t.length+e.length),n=0;n<t.length;n++)r[n]=t[n];var i=t.length;for(n=0;n<e.length;n++)r[n+i]=e[n];return r},r.noop=function(){}},{}],120:[function(t,e,r){var n="undefined"==typeof Float32Array?Array:Float32Array;function i(t){return Math.sqrt(a(t))}var o=i;function a(t){return t[0]*t[0]+t[1]*t[1]}var s=a;function u(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))}var l=u;function h(t,e){return(t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1])}var c=h;r.create=function(t,e){var r=new n(2);return null==t&&(t=0),null==e&&(e=0),r[0]=t,r[1]=e,r},r.copy=function(t,e){return t[0]=e[0],t[1]=e[1],t},r.clone=function(t){var e=new n(2);return e[0]=t[0],e[1]=t[1],e},r.set=function(t,e,r){return t[0]=e,t[1]=r,t},r.add=function(t,e,r){return t[0]=e[0]+r[0],t[1]=e[1]+r[1],t},r.scaleAndAdd=function(t,e,r,n){return t[0]=e[0]+r[0]*n,t[1]=e[1]+r[1]*n,t},r.sub=function(t,e,r){return t[0]=e[0]-r[0],t[1]=e[1]-r[1],t},r.len=i,r.length=o,r.lenSquare=a,r.lengthSquare=s,r.mul=function(t,e,r){return t[0]=e[0]*r[0],t[1]=e[1]*r[1],t},r.div=function(t,e,r){return t[0]=e[0]/r[0],t[1]=e[1]/r[1],t},r.dot=function(t,e){return t[0]*e[0]+t[1]*e[1]},r.scale=function(t,e,r){return t[0]=e[0]*r,t[1]=e[1]*r,t},r.normalize=function(t,e){var r=i(e);return 0===r?(t[0]=0,t[1]=0):(t[0]=e[0]/r,t[1]=e[1]/r),t},r.distance=u,r.dist=l,r.distanceSquare=h,r.distSquare=c,r.negate=function(t,e){return t[0]=-e[0],t[1]=-e[1],t},r.lerp=function(t,e,r,n){return t[0]=e[0]+n*(r[0]-e[0]),t[1]=e[1]+n*(r[1]-e[1]),t},r.applyTransform=function(t,e,r){var n=e[0],i=e[1];return t[0]=r[0]*n+r[2]*i+r[4],t[1]=r[1]*n+r[3]*i+r[5],t},r.min=function(t,e,r){return t[0]=Math.min(e[0],r[0]),t[1]=Math.min(e[1],r[1]),t},r.max=function(t,e,r){return t[0]=Math.max(e[0],r[0]),t[1]=Math.max(e[1],r[1]),t}},{}],121:[function(t,e,r){var n=t("../core/event"),i=n.addEventListener,o=n.removeEventListener,a=n.normalizeEvent,s=t("../core/util"),u=t("../mixin/Eventful"),l=t("../core/env"),h=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],c=["touchstart","touchend","touchmove"],f={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},d=s.map(h,function(t){var e=t.replace("mouse","pointer");return f[e]?e:t});function p(t){return"mousewheel"===t&&l.browser.firefox?"DOMMouseScroll":t}function g(t){t._touching=!0,clearTimeout(t._touchTimer),t._touchTimer=setTimeout(function(){t._touching=!1},700)}var v={mousemove:function(t){t=a(this.dom,t),this.trigger("mousemove",t)},mouseout:function(t){var e=(t=a(this.dom,t)).toElement||t.relatedTarget;if(e!==this.dom)for(;e&&9!==e.nodeType;){if(e===this.dom)return;e=e.parentNode}this.trigger("mouseout",t)},touchstart:function(t){(t=a(this.dom,t)).zrByTouch=!0,this._lastTouchMoment=new Date,this.handler.processGesture(this,t,"start"),v.mousemove.call(this,t),v.mousedown.call(this,t),g(this)},touchmove:function(t){(t=a(this.dom,t)).zrByTouch=!0,this.handler.processGesture(this,t,"change"),v.mousemove.call(this,t),g(this)},touchend:function(t){(t=a(this.dom,t)).zrByTouch=!0,this.handler.processGesture(this,t,"end"),v.mouseup.call(this,t),new Date-this._lastTouchMoment<300&&v.click.call(this,t),g(this)},pointerdown:function(t){v.mousedown.call(this,t)},pointermove:function(t){m(t)||v.mousemove.call(this,t)},pointerup:function(t){v.mouseup.call(this,t)},pointerout:function(t){m(t)||v.mouseout.call(this,t)}};function m(t){var e=t.pointerType;return"pen"===e||"touch"===e}function y(n){s.each(c,function(t){n._handlers[t]=s.bind(v[t],n)}),s.each(d,function(t){n._handlers[t]=s.bind(v[t],n)}),s.each(h,function(t){var e,r;n._handlers[t]=(e=v[t],r=n,function(){if(!r._touching)return e.apply(r,arguments)})})}function b(r){function t(t,e){s.each(t,function(t){i(r,p(t),e._handlers[t])},e)}u.call(this),this.dom=r,this._touching=!1,this._touchTimer,this._handlers={},y(this),l.pointerEventsSupported?t(d,this):(l.touchEventsSupported&&t(c,this),t(h,this))}s.each(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(e){v[e]=function(t){t=a(this.dom,t),this.trigger(e,t)}});var w=b.prototype;w.dispose=function(){for(var t=h.concat(c),e=0;e<t.length;e++){var r=t[e];o(this.dom,p(r),this._handlers[r])}},w.setCursor=function(t){this.dom.style&&(this.dom.style.cursor=t||"default")},s.mixin(b,u);var _=b;e.exports=_},{"../core/env":113,"../core/event":114,"../core/util":119,"../mixin/Eventful":163}],122:[function(t,e,r){var n=t("./core/util");r.util=n;var i=t("./core/matrix");r.matrix=i;var o=t("./core/vector");r.vector=o;var a=t("./tool/color");r.color=a;var s=t("./tool/path");r.path=s;var u=t("./tool/parseSVG");u.parseSVG;r.parseSVG=u.parseSVG;var l=t("./container/Group");r.Group=l;var h=t("./graphic/Path");r.Path=h;var c=t("./graphic/Image");r.Image=c;var f=t("./graphic/CompoundPath");r.CompoundPath=f;var d=t("./graphic/Text");r.Text=d;var p=t("./graphic/IncrementalDisplayable");r.IncrementalDisplayable=p;var g=t("./graphic/shape/Arc");r.Arc=g;var v=t("./graphic/shape/BezierCurve");r.BezierCurve=v;var m=t("./graphic/shape/Circle");r.Circle=m;var y=t("./graphic/shape/Droplet");r.Droplet=y;var b=t("./graphic/shape/Ellipse");r.Ellipse=b;var w=t("./graphic/shape/Heart");r.Heart=w;var _=t("./graphic/shape/Isogon");r.Isogon=_;var x=t("./graphic/shape/Line");r.Line=x;var A=t("./graphic/shape/Polygon");r.Polygon=A;var L=t("./graphic/shape/Polyline");r.Polyline=L;var S=t("./graphic/shape/Rect");r.Rect=S;var N=t("./graphic/shape/Ring");r.Ring=N;var P=t("./graphic/shape/Rose");r.Rose=P;var E=t("./graphic/shape/Sector");r.Sector=E;var k=t("./graphic/shape/Star");r.Star=k;var C=t("./graphic/shape/Trochoid");r.Trochoid=C;var T=t("./graphic/LinearGradient");r.LinearGradient=T;var O=t("./graphic/RadialGradient");r.RadialGradient=O;var I=t("./graphic/Pattern");r.Pattern=I;var B=t("./core/BoundingRect");r.BoundingRect=B},{"./container/Group":105,"./core/BoundingRect":106,"./core/matrix":117,"./core/util":119,"./core/vector":120,"./graphic/CompoundPath":123,"./graphic/Image":126,"./graphic/IncrementalDisplayable":127,"./graphic/LinearGradient":128,"./graphic/Path":129,"./graphic/Pattern":130,"./graphic/RadialGradient":131,"./graphic/Text":133,"./graphic/shape/Arc":145,"./graphic/shape/BezierCurve":146,"./graphic/shape/Circle":147,"./graphic/shape/Droplet":148,"./graphic/shape/Ellipse":149,"./graphic/shape/Heart":150,"./graphic/shape/Isogon":151,"./graphic/shape/Line":152,"./graphic/shape/Polygon":153,"./graphic/shape/Polyline":154,"./graphic/shape/Rect":155,"./graphic/shape/Ring":156,"./graphic/shape/Rose":157,"./graphic/shape/Sector":158,"./graphic/shape/Star":159,"./graphic/shape/Trochoid":160,"./tool/color":173,"./tool/parseSVG":174,"./tool/path":175}],123:[function(t,e,r){var n=t("./Path"),i=n.extend({type:"compound",shape:{paths:null},_updatePathDirty:function(){for(var t=this.__dirtyPath,e=this.shape.paths,r=0;r<e.length;r++)t=t||e[r].__dirtyPath;this.__dirtyPath=t,this.__dirty=this.__dirty||t},beforeBrush:function(){this._updatePathDirty();for(var t=this.shape.paths||[],e=this.getGlobalScale(),r=0;r<t.length;r++)t[r].path||t[r].createPathProxy(),t[r].path.setScale(e[0],e[1])},buildPath:function(t,e){for(var r=e.paths||[],n=0;n<r.length;n++)r[n].buildPath(t,r[n].shape,!0)},afterBrush:function(){for(var t=this.shape.paths||[],e=0;e<t.length;e++)t[e].__dirtyPath=!1},getBoundingRect:function(){return this._updatePathDirty(),n.prototype.getBoundingRect.call(this)}});e.exports=i},{"./Path":129}],124:[function(t,e,r){var n=t("../core/util"),i=t("./Style"),o=t("../Element"),a=t("./mixin/RectText");function s(t){for(var e in t=t||{},o.call(this,t),t)t.hasOwnProperty(e)&&"style"!==e&&(this[e]=t[e]);this.style=new i(t.style,this),this._rect=null,this.__clipPaths=[]}s.prototype={constructor:s,type:"displayable",__dirty:!0,invisible:!1,z:0,z2:0,zlevel:0,draggable:!1,dragging:!1,silent:!1,culling:!1,cursor:"pointer",rectHover:!1,progressive:!1,incremental:!1,globalScaleRatio:1,beforeBrush:function(t){},afterBrush:function(t){},brush:function(t,e){},getBoundingRect:function(){},contain:function(t,e){return this.rectContain(t,e)},traverse:function(t,e){t.call(e,this)},rectContain:function(t,e){var r=this.transformCoordToLocal(t,e);return this.getBoundingRect().contain(r[0],r[1])},dirty:function(){this.__dirty=this.__dirtyText=!0,this._rect=null,this.__zr&&this.__zr.refresh()},animateStyle:function(t){return this.animate("style",t)},attrKV:function(t,e){"style"!==t?o.prototype.attrKV.call(this,t,e):this.style.set(e)},setStyle:function(t,e){return this.style.set(t,e),this.dirty(!1),this},useStyle:function(t){return this.style=new i(t,this),this.dirty(!1),this}},n.inherits(s,o),n.mixin(s,a);var u=s;e.exports=u},{"../Element":86,"../core/util":119,"./Style":132,"./mixin/RectText":144}],125:[function(t,e,r){function n(t){this.colorStops=t||[]}n.prototype={constructor:n,addColorStop:function(t,e){this.colorStops.push({offset:t,color:e})}};var i=n;e.exports=i},{}],126:[function(t,e,r){var n=t("./Displayable"),i=t("../core/BoundingRect"),o=t("../core/util"),p=t("./helper/image");function a(t){n.call(this,t)}a.prototype={constructor:a,type:"image",brush:function(t,e){var r=this.style,n=r.image;r.bind(t,this,e);var i=this._image=p.createOrUpdateImage(n,this._image,this,this.onload);if(i&&p.isImageReady(i)){var o=r.x||0,a=r.y||0,s=r.width,u=r.height,l=i.width/i.height;if(null==s&&null!=u?s=u*l:null==u&&null!=s?u=s/l:null==s&&null==u&&(s=i.width,u=i.height),this.setTransform(t),r.sWidth&&r.sHeight){var h=r.sx||0,c=r.sy||0;t.drawImage(i,h,c,r.sWidth,r.sHeight,o,a,s,u)}else if(r.sx&&r.sy){var f=s-(h=r.sx),d=u-(c=r.sy);t.drawImage(i,h,c,f,d,o,a,s,u)}else t.drawImage(i,o,a,s,u);null!=r.text&&(this.restoreTransform(t),this.drawRectText(t,this.getBoundingRect()))}},getBoundingRect:function(){var t=this.style;return this._rect||(this._rect=new i(t.x||0,t.y||0,t.width||0,t.height||0)),this._rect}},o.inherits(a,n);var s=a;e.exports=s},{"../core/BoundingRect":106,"../core/util":119,"./Displayable":124,"./helper/image":137}],127:[function(t,e,r){var n=t("../core/util").inherits,i=t("./Displayable"),o=t("../core/BoundingRect");function a(t){i.call(this,t),this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.notClear=!0}a.prototype.incremental=!0,a.prototype.clearDisplaybles=function(){this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.dirty(),this.notClear=!1},a.prototype.addDisplayable=function(t,e){e?this._temporaryDisplayables.push(t):this._displayables.push(t),this.dirty()},a.prototype.addDisplayables=function(t,e){e=e||!1;for(var r=0;r<t.length;r++)this.addDisplayable(t[r],e)},a.prototype.eachPendingDisplayable=function(t){for(var e=this._cursor;e<this._displayables.length;e++)t&&t(this._displayables[e]);for(e=0;e<this._temporaryDisplayables.length;e++)t&&t(this._temporaryDisplayables[e])},a.prototype.update=function(){this.updateTransform();for(var t=this._cursor;t<this._displayables.length;t++){(e=this._displayables[t]).parent=this,e.update(),e.parent=null}for(t=0;t<this._temporaryDisplayables.length;t++){var e;(e=this._temporaryDisplayables[t]).parent=this,e.update(),e.parent=null}},a.prototype.brush=function(t,e){for(var r=this._cursor;r<this._displayables.length;r++){(n=this._displayables[r]).beforeBrush&&n.beforeBrush(t),n.brush(t,r===this._cursor?null:this._displayables[r-1]),n.afterBrush&&n.afterBrush(t)}this._cursor=r;for(r=0;r<this._temporaryDisplayables.length;r++){var n;(n=this._temporaryDisplayables[r]).beforeBrush&&n.beforeBrush(t),n.brush(t,0===r?null:this._temporaryDisplayables[r-1]),n.afterBrush&&n.afterBrush(t)}this._temporaryDisplayables=[],this.notClear=!0};var s=[];a.prototype.getBoundingRect=function(){if(!this._rect){for(var t=new o(1/0,1/0,-1/0,-1/0),e=0;e<this._displayables.length;e++){var r=this._displayables[e],n=r.getBoundingRect().clone();r.needLocalTransform()&&n.applyTransform(r.getLocalTransform(s)),t.union(n)}this._rect=t}return this._rect},a.prototype.contain=function(t,e){var r=this.transformCoordToLocal(t,e);if(this.getBoundingRect().contain(r[0],r[1]))for(var n=0;n<this._displayables.length;n++){if(this._displayables[n].contain(t,e))return!0}return!1},n(a,i);var u=a;e.exports=u},{"../core/BoundingRect":106,"../core/util":119,"./Displayable":124}],128:[function(t,e,r){function n(t,e,r,n,i,o){this.x=null==t?0:t,this.y=null==e?0:e,this.x2=null==r?1:r,this.y2=null==n?0:n,this.type="linear",this.global=o||!1,a.call(this,i)}var i=t("../core/util"),a=t("./Gradient");n.prototype={constructor:n},i.inherits(n,a);var o=n;e.exports=o},{"../core/util":119,"./Gradient":125}],129:[function(t,e,r){var n=t("./Displayable"),o=t("../core/util"),s=t("../core/PathProxy"),u=t("../contain/path"),y=t("./Pattern").prototype.getCanvasPattern,i=Math.abs,b=new s(!0);function a(t){n.call(this,t),this.path=null}a.prototype={constructor:a,type:"path",__dirtyPath:!0,strokeContainThreshold:5,subPixelOptimize:!1,brush:function(t,e){var r,n=this.style,i=this.path||b,o=n.hasStroke(),a=n.hasFill(),s=n.fill,u=n.stroke,l=a&&!!s.colorStops,h=o&&!!u.colorStops,c=a&&!!s.image,f=o&&!!u.image;n.bind(t,this,e),this.setTransform(t),this.__dirty&&(l&&(r=r||this.getBoundingRect(),this._fillGradient=n.getGradient(t,s,r)),h&&(r=r||this.getBoundingRect(),this._strokeGradient=n.getGradient(t,u,r)));l?t.fillStyle=this._fillGradient:c&&(t.fillStyle=y.call(s,t)),h?t.strokeStyle=this._strokeGradient:f&&(t.strokeStyle=y.call(u,t));var d=n.lineDash,p=n.lineDashOffset,g=!!t.setLineDash,v=this.getGlobalScale();if(i.setScale(v[0],v[1]),this.__dirtyPath||d&&!g&&o?(i.beginPath(t),d&&!g&&(i.setLineDash(d),i.setLineDashOffset(p)),this.buildPath(i,this.shape,!1),this.path&&(this.__dirtyPath=!1)):(t.beginPath(),this.path.rebuildPath(t)),a)if(null!=n.fillOpacity){var m=t.globalAlpha;t.globalAlpha=n.fillOpacity*n.opacity,i.fill(t),t.globalAlpha=m}else i.fill(t);if(d&&g&&(t.setLineDash(d),t.lineDashOffset=p),o)if(null!=n.strokeOpacity){m=t.globalAlpha;t.globalAlpha=n.strokeOpacity*n.opacity,i.stroke(t),t.globalAlpha=m}else i.stroke(t);d&&g&&t.setLineDash([]),null!=n.text&&(this.restoreTransform(t),this.drawRectText(t,this.getBoundingRect()))},buildPath:function(t,e,r){},createPathProxy:function(){this.path=new s},getBoundingRect:function(){var t=this._rect,e=this.style,r=!t;if(r){var n=this.path;n=n||(this.path=new s),this.__dirtyPath&&(n.beginPath(),this.buildPath(n,this.shape,!1)),t=n.getBoundingRect()}if(this._rect=t,e.hasStroke()){var i=this._rectWithStroke||(this._rectWithStroke=t.clone());if(this.__dirty||r){i.copy(t);var o=e.lineWidth,a=e.strokeNoScale?this.getLineScale():1;e.hasFill()||(o=Math.max(o,this.strokeContainThreshold||4)),1e-10<a&&(i.width+=o/a,i.height+=o/a,i.x-=o/a/2,i.y-=o/a/2)}return i}return t},contain:function(t,e){var r=this.transformCoordToLocal(t,e),n=this.getBoundingRect(),i=this.style;if(t=r[0],e=r[1],n.contain(t,e)){var o=this.path.data;if(i.hasStroke()){var a=i.lineWidth,s=i.strokeNoScale?this.getLineScale():1;if(1e-10<s&&(i.hasFill()||(a=Math.max(a,this.strokeContainThreshold)),u.containStroke(o,a/s,t,e)))return!0}if(i.hasFill())return u.contain(o,t,e)}return!1},dirty:function(t){null==t&&(t=!0),t&&(this.__dirtyPath=t,this._rect=null),this.__dirty=this.__dirtyText=!0,this.__zr&&this.__zr.refresh(),this.__clipTarget&&this.__clipTarget.dirty()},animateShape:function(t){return this.animate("shape",t)},attrKV:function(t,e){"shape"===t?(this.setShape(e),this.__dirtyPath=!0,this._rect=null):n.prototype.attrKV.call(this,t,e)},setShape:function(t,e){var r=this.shape;if(r){if(o.isObject(t))for(var n in t)t.hasOwnProperty(n)&&(r[n]=t[n]);else r[t]=e;this.dirty(!0)}return this},getLineScale:function(){var t=this.transform;return t&&1e-10<i(t[0]-1)&&1e-10<i(t[3]-1)?Math.sqrt(i(t[0]*t[3]-t[2]*t[1])):1}},a.extend=function(i){function t(t){a.call(this,t),i.style&&this.style.extendFrom(i.style,!1);var e=i.shape;if(e){this.shape=this.shape||{};var r=this.shape;for(var n in e)!r.hasOwnProperty(n)&&e.hasOwnProperty(n)&&(r[n]=e[n])}i.init&&i.init.call(this,t)}for(var e in o.inherits(t,a),i)"style"!==e&&"shape"!==e&&(t.prototype[e]=i[e]);return t},o.inherits(a,n);var l=a;e.exports=l},{"../contain/path":100,"../core/PathProxy":109,"../core/util":119,"./Displayable":124,"./Pattern":130}],130:[function(t,e,r){function n(t,e){this.image=t,this.repeat=e,this.type="pattern"}n.prototype.getCanvasPattern=function(t){return t.createPattern(this.image,this.repeat||"repeat")};var i=n;e.exports=i},{}],131:[function(t,e,r){function n(t,e,r,n,i){this.x=null==t?.5:t,this.y=null==e?.5:e,this.r=null==r?.5:r,this.type="radial",this.global=i||!1,o.call(this,n)}var i=t("../core/util"),o=t("./Gradient");n.prototype={constructor:n},i.inherits(n,o);var a=n;e.exports=a},{"../core/util":119,"./Gradient":125}],132:[function(t,e,r){function n(t){this.extendFrom(t,!1)}var h=t("./helper/fixShadow"),c=t("./constant").ContextCachedBy,f=[["shadowBlur",0],["shadowOffsetX",0],["shadowOffsetY",0],["shadowColor","#000"],["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function a(t,e,r){var n=null==e.x?0:e.x,i=null==e.x2?1:e.x2,o=null==e.y?0:e.y,a=null==e.y2?0:e.y2;return e.global||(n=n*r.width+r.x,i=i*r.width+r.x,o=o*r.height+r.y,a=a*r.height+r.y),n=isNaN(n)?0:n,i=isNaN(i)?1:i,o=isNaN(o)?0:o,a=isNaN(a)?0:a,t.createLinearGradient(n,o,i,a)}function s(t,e,r){var n=r.width,i=r.height,o=Math.min(n,i),a=null==e.x?.5:e.x,s=null==e.y?.5:e.y,u=null==e.r?.5:e.r;return e.global||(a=a*n+r.x,s=s*i+r.y,u*=o),t.createRadialGradient(a,s,0,a,s,u)}for(var i=n.prototype={constructor:n,fill:"#000",stroke:null,opacity:1,fillOpacity:null,strokeOpacity:null,lineDash:null,lineDashOffset:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,lineWidth:1,strokeNoScale:!1,text:null,font:null,textFont:null,fontStyle:null,fontWeight:null,fontSize:null,fontFamily:null,textTag:null,textFill:"#000",textStroke:null,textWidth:null,textHeight:null,textStrokeWidth:0,textLineHeight:null,textPosition:"inside",textRect:null,textOffset:null,textAlign:null,textVerticalAlign:null,textDistance:5,textShadowColor:"transparent",textShadowBlur:0,textShadowOffsetX:0,textShadowOffsetY:0,textBoxShadowColor:"transparent",textBoxShadowBlur:0,textBoxShadowOffsetX:0,textBoxShadowOffsetY:0,transformText:!1,textRotation:0,textOrigin:null,textBackgroundColor:null,textBorderColor:null,textBorderWidth:0,textBorderRadius:0,textPadding:null,rich:null,truncate:null,blend:null,bind:function(t,e,r){var n=this,i=r&&r.style,o=!i||t.__attrCachedBy!==c.STYLE_BIND;t.__attrCachedBy=c.STYLE_BIND;for(var a=0;a<f.length;a++){var s=f[a],u=s[0];!o&&n[u]===i[u]||(t[u]=h(t,u,n[u]||s[1]))}if(!o&&n.fill===i.fill||(t.fillStyle=n.fill),!o&&n.stroke===i.stroke||(t.strokeStyle=n.stroke),!o&&n.opacity===i.opacity||(t.globalAlpha=null==n.opacity?1:n.opacity),!o&&n.blend===i.blend||(t.globalCompositeOperation=n.blend||"source-over"),this.hasStroke()){var l=n.lineWidth;t.lineWidth=l/(this.strokeNoScale&&e&&e.getLineScale?e.getLineScale():1)}},hasFill:function(){var t=this.fill;return null!=t&&"none"!==t},hasStroke:function(){var t=this.stroke;return null!=t&&"none"!==t&&0<this.lineWidth},extendFrom:function(t,e){if(t)for(var r in t)!t.hasOwnProperty(r)||!0!==e&&(!1===e?this.hasOwnProperty(r):null==t[r])||(this[r]=t[r])},set:function(t,e){"string"==typeof t?this[t]=e:this.extendFrom(t,!0)},clone:function(){var t=new this.constructor;return t.extendFrom(this,!0),t},getGradient:function(t,e,r){for(var n=("radial"===e.type?s:a)(t,e,r),i=e.colorStops,o=0;o<i.length;o++)n.addColorStop(i[o].offset,i[o].color);return n}},o=0;o<f.length;o++){var u=f[o];u[0]in i||(i[u[0]]=u[1])}n.getGradient=i.getGradient;var l=n;e.exports=l},{"./constant":134,"./helper/fixShadow":136}],133:[function(t,e,r){function n(t){i.call(this,t)}var i=t("./Displayable"),o=t("../core/util"),a=t("../contain/text"),s=t("./helper/text"),u=t("./constant").ContextCachedBy;n.prototype={constructor:n,type:"text",brush:function(t,e){var r=this.style;this.__dirty&&s.normalizeTextStyle(r,!0),r.fill=r.stroke=r.shadowBlur=r.shadowColor=r.shadowOffsetX=r.shadowOffsetY=null;var n=r.text;null!=n&&(n+=""),s.needDrawText(n,r)?(this.setTransform(t),s.renderText(this,t,n,r,null,e),this.restoreTransform(t)):t.__attrCachedBy=u.NONE},getBoundingRect:function(){var t=this.style;if(this.__dirty&&s.normalizeTextStyle(t,!0),!this._rect){var e=t.text;null!=e?e+="":e="";var r=a.getBoundingRect(t.text+"",t.font,t.textAlign,t.textVerticalAlign,t.textPadding,t.textLineHeight,t.rich);if(r.x+=t.x||0,r.y+=t.y||0,s.getStroke(t.textStroke,t.textStrokeWidth)){var n=t.textStrokeWidth;r.x-=n/2,r.y-=n/2,r.width+=n,r.height+=n}this._rect=r}return this._rect}},o.inherits(n,i);var l=n;e.exports=l},{"../contain/text":102,"../core/util":119,"./Displayable":124,"./constant":134,"./helper/text":143}],134:[function(t,e,r){r.ContextCachedBy={NONE:0,STYLE_BIND:1,PLAIN_TEXT:2},r.WILL_BE_RESTORED=9},{}],135:[function(t,e,r){var n=t("../../core/env"),l=[["shadowBlur",0],["shadowColor","#000"],["shadowOffsetX",0],["shadowOffsetY",0]];e.exports=function(u){return n.browser.ie&&11<=n.browser.version?function(){var t,e=this.__clipPaths,r=this.style;if(e)for(var n=0;n<e.length;n++){var i=e[n],o=i&&i.shape,a=i&&i.type;if(o&&("sector"===a&&o.startAngle===o.endAngle||"rect"===a&&(!o.width||!o.height))){for(var s=0;s<l.length;s++)l[s][2]=r[l[s][0]],r[l[s][0]]=l[s][1];t=!0;break}}if(u.apply(this,arguments),t)for(s=0;s<l.length;s++)r[l[s][0]]=l[s][2]}:u}},{"../../core/env":113}],136:[function(t,e,r){var n={shadowBlur:1,shadowOffsetX:1,shadowOffsetY:1,textShadowBlur:1,textShadowOffsetX:1,textShadowOffsetY:1,textBoxShadowBlur:1,textBoxShadowOffsetX:1,textBoxShadowOffsetY:1};e.exports=function(t,e,r){return n.hasOwnProperty(e)?r*t.dpr:r}},{}],137:[function(t,e,r){var s=new(t("../../core/LRU"))(50);function u(){var t=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var e=0;e<t.pending.length;e++){var r=t.pending[e],n=r.cb;n&&n(this,r.cbPayload),r.hostEl.dirty()}t.pending.length=0}function l(t){return t&&t.width&&t.height}r.findExistImage=function(t){if("string"!=typeof t)return t;var e=s.get(t);return e&&e.image},r.createOrUpdateImage=function(t,e,r,n,i){if(t){if("string"!=typeof t)return t;if(e&&e.__zrImageSrc===t||!r)return e;var o=s.get(t),a={hostEl:r,cb:n,cbPayload:i};return o?l(e=o.image)||o.pending.push(a):((e=new Image).onload=e.onerror=u,s.put(t,e.__cachedImgObj={image:e,pending:[a]}),e.src=e.__zrImageSrc=t),e}return e},r.isImageReady=l},{"../../core/LRU":108}],138:[function(t,e,r){var f=t("./smoothSpline"),d=t("./smoothBezier");r.buildPath=function(t,e,r){var n=e.points,i=e.smooth;if(n&&2<=n.length){if(i&&"spline"!==i){var o=d(n,i,r,e.smoothConstraint);t.moveTo(n[0][0],n[0][1]);for(var a=n.length,s=0;s<(r?a:a-1);s++){var u=o[2*s],l=o[2*s+1],h=n[(s+1)%a];t.bezierCurveTo(u[0],u[1],l[0],l[1],h[0],h[1])}}else{"spline"===i&&(n=f(n,r)),t.moveTo(n[0][0],n[0][1]);s=1;for(var c=n.length;s<c;s++)t.lineTo(n[s][0],n[s][1])}r&&t.closePath()}}},{"./smoothBezier":140,"./smoothSpline":141}],139:[function(t,e,r){r.buildPath=function(t,e){var r,n,i,o,a,s=e.x,u=e.y,l=e.width,h=e.height,c=e.r;l<0&&(s+=l,l=-l),h<0&&(u+=h,h=-h),"number"==typeof c?r=n=i=o=c:c instanceof Array?1===c.length?r=n=i=o=c[0]:2===c.length?(r=i=c[0],n=o=c[1]):3===c.length?(r=c[0],n=o=c[1],i=c[2]):(r=c[0],n=c[1],i=c[2],o=c[3]):r=n=i=o=0,l<r+n&&(r*=l/(a=r+n),n*=l/a),l<i+o&&(i*=l/(a=i+o),o*=l/a),h<n+i&&(n*=h/(a=n+i),i*=h/a),h<r+o&&(r*=h/(a=r+o),o*=h/a),t.moveTo(s+r,u),t.lineTo(s+l-n,u),0!==n&&t.arc(s+l-n,u+n,n,-Math.PI/2,0),t.lineTo(s+l,u+h-i),0!==i&&t.arc(s+l-i,u+h-i,i,0,Math.PI/2),t.lineTo(s+o,u+h),0!==o&&t.arc(s+o,u+h-o,o,Math.PI/2,Math.PI),t.lineTo(s,u+r),0!==r&&t.arc(s+r,u+r,r,Math.PI,1.5*Math.PI)}},{}],140:[function(t,e,r){var n=t("../../core/vector"),w=n.min,_=n.max,x=n.scale,A=n.distance,L=n.add,S=n.clone,N=n.sub;e.exports=function(t,e,r,n){var i,o,a,s,u=[],l=[],h=[],c=[];if(n){a=[1/0,1/0],s=[-1/0,-1/0];for(var f=0,d=t.length;f<d;f++)w(a,a,t[f]),_(s,s,t[f]);w(a,a,n[0]),_(s,s,n[1])}for(f=0,d=t.length;f<d;f++){var p=t[f];if(r)i=t[f?f-1:d-1],o=t[(f+1)%d];else{if(0===f||f===d-1){u.push(S(t[f]));continue}i=t[f-1],o=t[f+1]}N(l,o,i),x(l,l,e);var g=A(p,i),v=A(p,o),m=g+v;0!==m&&(g/=m,v/=m),x(h,l,-g),x(c,l,v);var y=L([],p,h),b=L([],p,c);n&&(_(y,y,a),w(y,y,s),_(b,b,a),w(b,b,s)),u.push(y),u.push(b)}return r&&u.push(u.shift()),u}},{"../../core/vector":120}],141:[function(t,e,r){var v=t("../../core/vector").distance;function m(t,e,r,n,i,o,a){var s=.5*(r-t),u=.5*(n-e);return(2*(e-r)+s+u)*a+(-3*(e-r)-2*s-u)*o+s*i+e}e.exports=function(t,e){for(var r=t.length,n=[],i=0,o=1;o<r;o++)i+=v(t[o-1],t[o]);var a=i/2;for(a=a<r?r:a,o=0;o<a;o++){var s,u,l,h=o/(a-1)*(e?r:r-1),c=Math.floor(h),f=h-c,d=t[c%r];l=e?(s=t[(c-1+r)%r],u=t[(c+1)%r],t[(c+2)%r]):(s=t[0===c?c:c-1],u=t[r-2<c?r-1:c+1],t[r-3<c?r-1:c+2]);var p=f*f,g=f*p;n.push([m(s[0],d[0],u[0],l[0],f,p,g),m(s[1],d[1],u[1],l[1],f,p,g)])}return n}},{"../../core/vector":120}],142:[function(t,e,r){var u=Math.round;function l(t,e,r){var n=u(2*t);return(n+u(e))%2==0?n/2:(n+(r?1:-1))/2}r.subPixelOptimizeLine=function(t,e,r){var n=r&&r.lineWidth;if(e&&n){var i=e.x1,o=e.x2,a=e.y1,s=e.y2;u(2*i)===u(2*o)?t.x1=t.x2=l(i,n,!0):(t.x1=i,t.x2=o),u(2*a)===u(2*s)?t.y1=t.y2=l(a,n,!0):(t.y1=a,t.y2=s)}},r.subPixelOptimizeRect=function(t,e,r){var n=r&&r.lineWidth;if(e&&n){var i=e.x,o=e.y,a=e.width,s=e.height;t.x=l(i,n,!0),t.y=l(o,n,!0),t.width=Math.max(l(i+a,n,!1)-t.x,0===a?0:1),t.height=Math.max(l(o+s,n,!1)-t.y,0===s?0:1)}},r.subPixelOptimize=l},{}],143:[function(t,e,r){var n=t("../../core/util"),g=n.retrieve2,v=n.retrieve3,i=n.each,o=n.normalizeCssArray,p=n.isString,m=n.isObject,D=t("../../contain/text"),y=t("./roundRect"),b=t("./image"),z=t("./fixShadow"),a=t("../constant"),q=a.ContextCachedBy,U=a.WILL_BE_RESTORED,H=D.DEFAULT_FONT,s={left:1,right:1,center:1},u={top:1,bottom:1,middle:1},W=[["textShadowBlur","shadowBlur",0],["textShadowOffsetX","shadowOffsetX",0],["textShadowOffsetY","shadowOffsetY",0],["textShadowColor","shadowColor","transparent"]];function l(t){if(t){t.font=D.makeFont(t);var e=t.textAlign;"middle"===e&&(e="center"),t.textAlign=null==e||s[e]?e:"left";var r=t.textVerticalAlign||t.textBaseline;"center"===r&&(r="middle"),t.textVerticalAlign=null==r||u[r]?r:"top",t.textPadding&&(t.textPadding=o(t.textPadding))}}function G(t,e,r,n,i){if(r&&e.textRotation){var o=e.textOrigin;"center"===o?(n=r.width/2+r.x,i=r.height/2+r.y):o&&(n=o[0]+r.x,i=o[1]+r.y),t.translate(n,i),t.rotate(-e.textRotation),t.translate(-n,-i)}}function C(t,e,r,n,i,o,a,s){var u=n.rich[r.styleName]||{};u.text=r.text;var l=r.textVerticalAlign,h=o+i/2;"top"===l?h=o+r.height/2:"bottom"===l&&(h=o+i-r.height/2),!r.isLineHolder&&V(u)&&X(t,e,u,"right"===s?a-r.width:"center"===s?a-r.width/2:a,h-r.height/2,r.width,r.height);var c=r.textPadding;c&&(a=$(a,s,c),h-=r.height/2-c[2]-r.textHeight/2),_(e,"shadowBlur",v(u.textShadowBlur,n.textShadowBlur,0)),_(e,"shadowColor",u.textShadowColor||n.textShadowColor||"transparent"),_(e,"shadowOffsetX",v(u.textShadowOffsetX,n.textShadowOffsetX,0)),_(e,"shadowOffsetY",v(u.textShadowOffsetY,n.textShadowOffsetY,0)),_(e,"textAlign",s),_(e,"textBaseline","middle"),_(e,"font",r.font||H);var f=J(u.textStroke||n.textStroke,p),d=K(u.textFill||n.textFill),p=g(u.textStrokeWidth,n.textStrokeWidth);f&&(_(e,"lineWidth",p),_(e,"strokeStyle",f),e.strokeText(r.text,a,h)),d&&(_(e,"fillStyle",d),e.fillText(r.text,a,h))}function V(t){return!!(t.textBackgroundColor||t.textBorderWidth&&t.textBorderColor)}function X(t,e,r,n,i,o,a){var s=r.textBackgroundColor,u=r.textBorderWidth,l=r.textBorderColor,h=p(s);if(_(e,"shadowBlur",r.textBoxShadowBlur||0),_(e,"shadowColor",r.textBoxShadowColor||"transparent"),_(e,"shadowOffsetX",r.textBoxShadowOffsetX||0),_(e,"shadowOffsetY",r.textBoxShadowOffsetY||0),h||u&&l){e.beginPath();var c=r.textBorderRadius;c?y.buildPath(e,{x:n,y:i,width:o,height:a,r:c}):e.rect(n,i,o,a),e.closePath()}if(h)if(_(e,"fillStyle",s),null!=r.fillOpacity){var f=e.globalAlpha;e.globalAlpha=r.fillOpacity*r.opacity,e.fill(),e.globalAlpha=f}else e.fill();else if(m(s)){var d=s.image;(d=b.createOrUpdateImage(d,null,t,w,s))&&b.isImageReady(d)&&e.drawImage(d,n,i,o,a)}if(u&&l)if(_(e,"lineWidth",u),_(e,"strokeStyle",l),null!=r.strokeOpacity){f=e.globalAlpha;e.globalAlpha=r.strokeOpacity*r.opacity,e.stroke(),e.globalAlpha=f}else e.stroke()}function w(t,e){e.image=t}function Y(t,e,r){var n=e.x||0,i=e.y||0,o=e.textAlign,a=e.textVerticalAlign;if(r){var s=e.textPosition;if(s instanceof Array)n=r.x+h(s[0],r.width),i=r.y+h(s[1],r.height);else{var u=D.adjustTextPositionOnRect(s,r,e.textDistance);n=u.x,i=u.y,o=o||u.textAlign,a=a||u.textVerticalAlign}var l=e.textOffset;l&&(n+=l[0],i+=l[1])}return{baseX:n,baseY:i,textAlign:o,textVerticalAlign:a}}function _(t,e,r){return t[e]=z(t,e,r),t[e]}function J(t,e){return null==t||e<=0||"transparent"===t||"none"===t?null:t.image||t.colorStops?"#000":t}function K(t){return null==t||"none"===t?null:t.image||t.colorStops?"#000":t}function h(t,e){return"string"==typeof t?0<=t.lastIndexOf("%")?parseFloat(t)/100*e:parseFloat(t):t}function $(t,e,r){return"right"===e?t-r[1]:"center"===e?t+r[3]/2-r[1]/2:t+r[3]}r.normalizeTextStyle=function(t){return l(t),i(t.rich,l),t},r.renderText=function(t,e,r,n,i,o){(n.rich?function(t,e,r,n,i,o){o!==U&&(e.__attrCachedBy=q.NONE);var a=t.__textCotentBlock;a&&!t.__dirtyText||(a=t.__textCotentBlock=D.parseRichText(r,n));!function(t,e,r,n,i){var o=r.width,a=r.outerWidth,s=r.outerHeight,u=n.textPadding,l=Y(0,n,i),h=l.baseX,c=l.baseY,f=l.textAlign,d=l.textVerticalAlign;G(e,n,i,h,c);var p=D.adjustTextX(h,a,f),g=D.adjustTextY(c,s,d),v=p,m=g;u&&(v+=u[3],m+=u[0]);var y=v+o;V(n)&&X(t,e,n,p,g,a,s);for(var b=0;b<r.lines.length;b++){for(var w,_=r.lines[b],x=_.tokens,A=x.length,L=_.lineHeight,S=_.width,N=0,P=v,E=y,k=A-1;N<A&&(!(w=x[N]).textAlign||"left"===w.textAlign);)C(t,e,w,n,L,m,P,"left"),S-=w.width,P+=w.width,N++;for(;0<=k&&"right"===(w=x[k]).textAlign;)C(t,e,w,n,L,m,E,"right"),S-=w.width,E-=w.width,k--;for(P+=(o-(P-v)-(y-E)-S)/2;N<=k;)w=x[N],C(t,e,w,n,L,m,P+w.width/2,"center"),P+=w.width,N++;m+=L}}(t,e,a,n,i)}:function(t,e,r,n,i,o){"use strict";var a,s=V(n),u=!1,l=e.__attrCachedBy===q.PLAIN_TEXT;o!==U?(o&&(a=o.style,u=!s&&l&&a),e.__attrCachedBy=s?q.NONE:q.PLAIN_TEXT):l&&(e.__attrCachedBy=q.NONE);var h=n.font||H;u&&h===(a.font||H)||(e.font=h);var c=t.__computedFont;t.__styleFont!==h&&(t.__styleFont=h,c=t.__computedFont=e.font);var f=n.textPadding,d=n.textLineHeight,p=t.__textCotentBlock;p&&!t.__dirtyText||(p=t.__textCotentBlock=D.parsePlainText(r,c,f,d,n.truncate));var g=p.outerHeight,v=p.lines,m=p.lineHeight,y=Y(0,n,i),b=y.baseX,w=y.baseY,_=y.textAlign||"left",x=y.textVerticalAlign;G(e,n,i,b,w);var A=D.adjustTextY(w,g,x),L=b,S=A;if(s||f){var N=D.getWidth(r,c);f&&(N+=f[1]+f[3]);var P=D.adjustTextX(b,N,_);s&&X(t,e,n,P,A,N,g),f&&(L=$(b,_,f),S+=f[0])}e.textAlign=_,e.textBaseline="middle",e.globalAlpha=n.opacity||1;for(var E=0;E<W.length;E++){var k=W[E],C=k[0],T=k[1],O=n[C];u&&O===a[C]||(e[T]=z(e,T,O||k[2]))}S+=m/2;var I=n.textStrokeWidth,B=u?a.textStrokeWidth:null,M=!u||I!==B,j=!u||M||n.textStroke!==a.textStroke,F=J(n.textStroke,I),R=K(n.textFill);F&&(M&&(e.lineWidth=I),j&&(e.strokeStyle=F));R&&(u&&n.textFill===a.textFill||(e.fillStyle=R));if(1===v.length)F&&e.strokeText(v[0],L,S),R&&e.fillText(v[0],L,S);else for(E=0;E<v.length;E++)F&&e.strokeText(v[E],L,S),R&&e.fillText(v[E],L,S),S+=m})(t,e,r,n,i,o)},r.getStroke=J,r.getFill=K,r.needDrawText=function(t,e){return null!=t&&(t||e.textBackgroundColor||e.textBorderWidth&&e.textBorderColor||e.textPadding)}},{"../../contain/text":102,"../../core/util":119,"../constant":134,"./fixShadow":136,"./image":137,"./roundRect":139}],144:[function(t,e,r){function n(){}var o=t("../helper/text"),i=t("../../core/BoundingRect"),a=t("../constant").WILL_BE_RESTORED,s=new i;n.prototype={constructor:n,drawRectText:function(t,e){var r=this.style;e=r.textRect||e,this.__dirty&&o.normalizeTextStyle(r,!0);var n=r.text;if(null!=n&&(n+=""),o.needDrawText(n,r)){t.save();var i=this.transform;r.transformText?this.setTransform(t):i&&(s.copy(e),s.applyTransform(i),e=s),o.renderText(this,t,n,r,e,a),t.restore()}}};var u=n;e.exports=u},{"../../core/BoundingRect":106,"../constant":134,"../helper/text":143}],145:[function(t,e,r){var n=t("../Path").extend({type:"arc",shape:{cx:0,cy:0,r:0,startAngle:0,endAngle:2*Math.PI,clockwise:!0},style:{stroke:"#000",fill:null},buildPath:function(t,e){var r=e.cx,n=e.cy,i=Math.max(e.r,0),o=e.startAngle,a=e.endAngle,s=e.clockwise,u=Math.cos(o),l=Math.sin(o);t.moveTo(u*i+r,l*i+n),t.arc(r,n,i,o,a,!s)}});e.exports=n},{"../Path":129}],146:[function(t,e,r){var n=t("../Path"),i=t("../../core/vector"),o=t("../../core/curve"),c=o.quadraticSubdivide,f=o.cubicSubdivide,a=o.quadraticAt,s=o.cubicAt,u=o.quadraticDerivativeAt,l=o.cubicDerivativeAt,d=[];function h(t,e,r){var n=t.cpx2,i=t.cpy2;return null===n||null===i?[(r?l:s)(t.x1,t.cpx1,t.cpx2,t.x2,e),(r?l:s)(t.y1,t.cpy1,t.cpy2,t.y2,e)]:[(r?u:a)(t.x1,t.cpx1,t.x2,e),(r?u:a)(t.y1,t.cpy1,t.y2,e)]}var p=n.extend({type:"bezier-curve",shape:{x1:0,y1:0,x2:0,y2:0,cpx1:0,cpy1:0,percent:1},style:{stroke:"#000",fill:null},buildPath:function(t,e){var r=e.x1,n=e.y1,i=e.x2,o=e.y2,a=e.cpx1,s=e.cpy1,u=e.cpx2,l=e.cpy2,h=e.percent;0!==h&&(t.moveTo(r,n),null==u||null==l?(h<1&&(c(r,a,i,h,d),a=d[1],i=d[2],c(n,s,o,h,d),s=d[1],o=d[2]),t.quadraticCurveTo(a,s,i,o)):(h<1&&(f(r,a,u,i,h,d),a=d[1],u=d[2],i=d[3],f(n,s,l,o,h,d),s=d[1],l=d[2],o=d[3]),t.bezierCurveTo(a,s,u,l,i,o)))},pointAt:function(t){return h(this.shape,t,!1)},tangentAt:function(t){var e=h(this.shape,t,!0);return i.normalize(e,e)}});e.exports=p},{"../../core/curve":112,"../../core/vector":120,"../Path":129}],147:[function(t,e,r){var n=t("../Path").extend({type:"circle",shape:{cx:0,cy:0,r:0},buildPath:function(t,e,r){r&&t.moveTo(e.cx+e.r,e.cy),t.arc(e.cx,e.cy,e.r,0,2*Math.PI,!0)}});e.exports=n},{"../Path":129}],148:[function(t,e,r){var n=t("../Path").extend({type:"droplet",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var r=e.cx,n=e.cy,i=e.width,o=e.height;t.moveTo(r,n+i),t.bezierCurveTo(r+i,n+i,r+3*i/2,n-i/3,r,n-o),t.bezierCurveTo(r-3*i/2,n-i/3,r-i,n+i,r,n+i),t.closePath()}});e.exports=n},{"../Path":129}],149:[function(t,e,r){var n=t("../Path").extend({type:"ellipse",shape:{cx:0,cy:0,rx:0,ry:0},buildPath:function(t,e){var r=e.cx,n=e.cy,i=e.rx,o=e.ry,a=.5522848*i,s=.5522848*o;t.moveTo(r-i,n),t.bezierCurveTo(r-i,n-s,r-a,n-o,r,n-o),t.bezierCurveTo(r+a,n-o,r+i,n-s,r+i,n),t.bezierCurveTo(r+i,n+s,r+a,n+o,r,n+o),t.bezierCurveTo(r-a,n+o,r-i,n+s,r-i,n),t.closePath()}});e.exports=n},{"../Path":129}],150:[function(t,e,r){var n=t("../Path").extend({type:"heart",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var r=e.cx,n=e.cy,i=e.width,o=e.height;t.moveTo(r,n),t.bezierCurveTo(r+i/2,n-2*o/3,r+2*i,n+o/3,r,n+o),t.bezierCurveTo(r-2*i,n+o/3,r-i/2,n-2*o/3,r,n)}});e.exports=n},{"../Path":129}],151:[function(t,e,r){var n=t("../Path"),h=Math.PI,c=Math.sin,f=Math.cos,i=n.extend({type:"isogon",shape:{x:0,y:0,r:0,n:0},buildPath:function(t,e){var r=e.n;if(r&&!(r<2)){var n=e.x,i=e.y,o=e.r,a=2*h/r,s=-h/2;t.moveTo(n+o*f(s),i+o*c(s));for(var u=0,l=r-1;u<l;u++)s+=a,t.lineTo(n+o*f(s),i+o*c(s));t.closePath()}}});e.exports=i},{"../Path":129}],152:[function(t,e,r){var n=t("../Path"),s=t("../helper/subPixelOptimize").subPixelOptimizeLine,u={},i=n.extend({type:"line",shape:{x1:0,y1:0,x2:0,y2:0,percent:1},style:{stroke:"#000",fill:null},buildPath:function(t,e){var r,n,i,o;o=this.subPixelOptimize?(s(u,e,this.style),r=u.x1,n=u.y1,i=u.x2,u.y2):(r=e.x1,n=e.y1,i=e.x2,e.y2);var a=e.percent;0!==a&&(t.moveTo(r,n),a<1&&(i=r*(1-a)+i*a,o=n*(1-a)+o*a),t.lineTo(i,o))},pointAt:function(t){var e=this.shape;return[e.x1*(1-t)+e.x2*t,e.y1*(1-t)+e.y2*t]}});e.exports=i},{"../Path":129,"../helper/subPixelOptimize":142}],153:[function(t,e,r){var n=t("../Path"),i=t("../helper/poly"),o=n.extend({type:"polygon",shape:{points:null,smooth:!1,smoothConstraint:null},buildPath:function(t,e){i.buildPath(t,e,!0)}});e.exports=o},{"../Path":129,"../helper/poly":138}],154:[function(t,e,r){var n=t("../Path"),i=t("../helper/poly"),o=n.extend({type:"polyline",shape:{points:null,smooth:!1,smoothConstraint:null},style:{stroke:"#000",fill:null},buildPath:function(t,e){i.buildPath(t,e,!1)}});e.exports=o},{"../Path":129,"../helper/poly":138}],155:[function(t,e,r){var n=t("../Path"),a=t("../helper/roundRect"),s=t("../helper/subPixelOptimize").subPixelOptimizeRect,u={},i=n.extend({type:"rect",shape:{r:0,x:0,y:0,width:0,height:0},buildPath:function(t,e){var r,n,i,o;this.subPixelOptimize?(s(u,e,this.style),r=u.x,n=u.y,i=u.width,o=u.height,u.r=e.r,e=u):(r=e.x,n=e.y,i=e.width,o=e.height),e.r?a.buildPath(t,e):t.rect(r,n,i,o),t.closePath()}});e.exports=i},{"../Path":129,"../helper/roundRect":139,"../helper/subPixelOptimize":142}],156:[function(t,e,r){var n=t("../Path").extend({type:"ring",shape:{cx:0,cy:0,r:0,r0:0},buildPath:function(t,e){var r=e.cx,n=e.cy,i=2*Math.PI;t.moveTo(r+e.r,n),t.arc(r,n,e.r,0,i,!1),t.moveTo(r+e.r0,n),t.arc(r,n,e.r0,0,i,!0)}});e.exports=n},{"../Path":129}],157:[function(t,e,r){var n=t("../Path"),d=Math.sin,p=Math.cos,g=Math.PI/180,i=n.extend({type:"rose",shape:{cx:0,cy:0,r:[],k:0,n:1},style:{stroke:"#000",fill:null},buildPath:function(t,e){var r,n,i,o=e.r,a=e.k,s=e.n,u=e.cx,l=e.cy;t.moveTo(u,l);for(var h=0,c=o.length;h<c;h++){i=o[h];for(var f=0;f<=360*s;f++)r=i*d(a/s*f%360*g)*p(f*g)+u,n=i*d(a/s*f%360*g)*d(f*g)+l,t.lineTo(r,n)}}});e.exports=i},{"../Path":129}],158:[function(t,e,r){var n=t("../Path"),i=t("../helper/fixClipWithShadow"),o=n.extend({type:"sector",shape:{cx:0,cy:0,r0:0,r:0,startAngle:0,endAngle:2*Math.PI,clockwise:!0},brush:i(n.prototype.brush),buildPath:function(t,e){var r=e.cx,n=e.cy,i=Math.max(e.r0||0,0),o=Math.max(e.r,0),a=e.startAngle,s=e.endAngle,u=e.clockwise,l=Math.cos(a),h=Math.sin(a);t.moveTo(l*i+r,h*i+n),t.lineTo(l*o+r,h*o+n),t.arc(r,n,o,a,s,!u),t.lineTo(Math.cos(s)*i+r,Math.sin(s)*i+n),0!==i&&t.arc(r,n,i,s,a,u),t.closePath()}});e.exports=o},{"../Path":129,"../helper/fixClipWithShadow":135}],159:[function(t,e,r){var n=t("../Path"),p=Math.PI,g=Math.cos,v=Math.sin,i=n.extend({type:"star",shape:{cx:0,cy:0,n:3,r0:null,r:0},buildPath:function(t,e){var r=e.n;if(r&&!(r<2)){var n=e.cx,i=e.cy,o=e.r,a=e.r0;null==a&&(a=4<r?o*g(2*p/r)/g(p/r):o/3);var s=p/r,u=-p/2,l=n+o*g(u),h=i+o*v(u);u+=s,t.moveTo(l,h);for(var c,f=0,d=2*r-1;f<d;f++)c=f%2==0?a:o,t.lineTo(n+c*g(u),i+c*v(u)),u+=s;t.closePath()}}});e.exports=i},{"../Path":129}],160:[function(t,e,r){var n=t("../Path"),g=Math.cos,v=Math.sin,i=n.extend({type:"trochoid",shape:{cx:0,cy:0,r:0,r0:0,d:0,location:"out"},style:{stroke:"#000",fill:null},buildPath:function(t,e){var r,n,i,o,a=e.r,s=e.r0,u=e.d,l=e.cx,h=e.cy,c="out"===e.location?1:-1;if(!(e.location&&a<=s)){var f,d=0,p=1;for(r=(a+c*s)*g(0)-c*u*g(0)+l,n=(a+c*s)*v(0)-u*v(0)+h,t.moveTo(r,n);s*++d%(a+c*s)!=0;);for(;f=Math.PI/180*p,i=(a+c*s)*g(f)-c*u*g((a/s+c)*f)+l,o=(a+c*s)*v(f)-u*v((a/s+c)*f)+h,t.lineTo(i,o),++p<=s*d/(a+c*s)*360;);}}});e.exports=i},{"../Path":129}],161:[function(t,e,r){function n(){this.animators=[]}var f=t("../animation/Animator"),d=t("../core/log"),i=t("../core/util"),p=i.isString,g=i.isFunction,v=i.isObject,m=i.isArrayLike,y=i.indexOf;function a(t,e,r,n,i,o,a,s){p(n)?(o=i,i=n,n=0):g(i)?(o=i,i="linear",n=0):g(n)?(o=n,n=0):r=g(r)?(o=r,500):r||500,t.stopAnimation(),function t(e,r,n,i,o,a,s){var u={};var l=0;for(var h in i)i.hasOwnProperty(h)&&(null!=n[h]?v(i[h])&&!m(i[h])?t(e,r?r+"."+h:h,n[h],i[h],o,a,s):(s?(u[h]=n[h],b(e,r,h,i[h])):u[h]=i[h],l++):null==i[h]||s||b(e,r,h,i[h]));0<l&&e.animate(r,!1).when(null==o?500:o,u).delay(a||0)}(t,"",t,e,r,n,s);var u=t.animators.slice(),l=u.length;function h(){--l||o&&o()}l||o&&o();for(var c=0;c<u.length;c++)u[c].done(h).start(i,a)}function b(t,e,r,n){if(e){var i={};i[e]={},i[e][r]=n,t.attr(i)}else t.attr(r,n)}n.prototype={constructor:n,animate:function(t,e){var r,n=!1,i=this,o=this.__zr;if(t){var a=t.split("."),s=i;n="shape"===a[0];for(var u=0,l=a.length;u<l;u++)s=s&&s[a[u]];s&&(r=s)}else r=i;if(r){var h=i.animators,c=new f(r,e);return c.during(function(t){i.dirty(n)}).done(function(){h.splice(y(h,c),1)}),h.push(c),o&&o.animation.addAnimator(c),c}d('Property "'+t+'" is not existed in element '+i.id)},stopAnimation:function(t){for(var e=this.animators,r=e.length,n=0;n<r;n++)e[n].stop(t);return e.length=0,this},animateTo:function(t,e,r,n,i,o){a(this,t,e,r,n,i,o)},animateFrom:function(t,e,r,n,i,o){a(this,t,e,r,n,i,o,!0)}};var o=n;e.exports=o},{"../animation/Animator":92,"../core/log":116,"../core/util":119}],162:[function(t,e,r){function n(){this.on("mousedown",this._dragStart,this),this.on("mousemove",this._drag,this),this.on("mouseup",this._dragEnd,this),this.on("globalout",this._dragEnd,this)}function u(t,e){return{target:t,topTarget:e&&e.topTarget}}n.prototype={constructor:n,_dragStart:function(t){var e=t.target;e&&e.draggable&&((this._draggingTarget=e).dragging=!0,this._x=t.offsetX,this._y=t.offsetY,this.dispatchToElement(u(e,t),"dragstart",t.event))},_drag:function(t){var e=this._draggingTarget;if(e){var r=t.offsetX,n=t.offsetY,i=r-this._x,o=n-this._y;this._x=r,this._y=n,e.drift(i,o,t),this.dispatchToElement(u(e,t),"drag",t.event);var a=this.findHover(r,n,e).target,s=this._dropTarget;e!==(this._dropTarget=a)&&(s&&a!==s&&this.dispatchToElement(u(s,t),"dragleave",t.event),a&&a!==s&&this.dispatchToElement(u(a,t),"dragenter",t.event))}},_dragEnd:function(t){var e=this._draggingTarget;e&&(e.dragging=!1),this.dispatchToElement(u(e,t),"dragend",t.event),this._dropTarget&&this.dispatchToElement(u(this._dropTarget,t),"drop",t.event),this._draggingTarget=null,this._dropTarget=null}};var i=n;e.exports=i},{}],163:[function(t,e,r){function n(t){this._$handlers={},this._$eventProcessor=t}var l=Array.prototype.slice;function i(t,e,r,n,i,o){var a,s,u=t._$handlers;if("function"==typeof r&&(i=n,n=r,r=null),!n||!e)return t;a=r,s=t._$eventProcessor,null!=a&&s&&s.normalizeQuery&&(a=s.normalizeQuery(a)),r=a,u[e]||(u[e]=[]);for(var l=0;l<u[e].length;l++)if(u[e][l].h===n)return t;var h={h:n,one:o,query:r,ctx:i||t,callAtLast:n.zrEventfulCallAtLast},c=u[e].length-1,f=u[e][c];return f&&f.callAtLast?u[e].splice(c,0,h):u[e].push(h),t}n.prototype={constructor:n,one:function(t,e,r,n){return i(this,t,e,r,n,!0)},on:function(t,e,r,n){return i(this,t,e,r,n,!1)},isSilent:function(t){var e=this._$handlers;return!e[t]||!e[t].length},off:function(t,e){var r=this._$handlers;if(!t)return this._$handlers={},this;if(e){if(r[t]){for(var n=[],i=0,o=r[t].length;i<o;i++)r[t][i].h!==e&&n.push(r[t][i]);r[t]=n}r[t]&&0===r[t].length&&delete r[t]}else delete r[t];return this},trigger:function(t){var e=this._$handlers[t],r=this._$eventProcessor;if(e){var n=arguments,i=n.length;3<i&&(n=l.call(n,1));for(var o=e.length,a=0;a<o;){var s=e[a];if(r&&r.filter&&null!=s.query&&!r.filter(t,s.query))a++;else{switch(i){case 1:s.h.call(s.ctx);break;case 2:s.h.call(s.ctx,n[1]);break;case 3:s.h.call(s.ctx,n[1],n[2]);break;default:s.h.apply(s.ctx,n)}s.one?(e.splice(a,1),o--):a++}}}return r&&r.afterTrigger&&r.afterTrigger(t),this},triggerWithContext:function(t){var e=this._$handlers[t],r=this._$eventProcessor;if(e){var n=arguments,i=n.length;4<i&&(n=l.call(n,1,n.length-1));for(var o=n[n.length-1],a=e.length,s=0;s<a;){var u=e[s];if(r&&r.filter&&null!=u.query&&!r.filter(t,u.query))s++;else{switch(i){case 1:u.h.call(o);break;case 2:u.h.call(o,n[1]);break;case 3:u.h.call(o,n[1],n[2]);break;default:u.h.apply(o,n)}u.one?(e.splice(s,1),a--):s++}}}return r&&r.afterTrigger&&r.afterTrigger(t),this}};var o=n;e.exports=o},{}],164:[function(t,e,r){var l=t("../core/matrix"),i=t("../core/vector"),h=l.identity;function o(t){return 5e-5<t||t<-5e-5}function n(t){(t=t||{}).position||(this.position=[0,0]),null==t.rotation&&(this.rotation=0),t.scale||(this.scale=[1,1]),this.origin=this.origin||null}var a=n.prototype;a.transform=null,a.needLocalTransform=function(){return o(this.rotation)||o(this.position[0])||o(this.position[1])||o(this.scale[0]-1)||o(this.scale[1]-1)};var c=[];a.updateTransform=function(){var t=this.parent,e=t&&t.transform,r=this.needLocalTransform(),n=this.transform;if(r||e){n=n||l.create(),r?this.getLocalTransform(n):h(n),e&&(r?l.mul(n,t.transform,n):l.copy(n,t.transform)),this.transform=n;var i=this.globalScaleRatio;if(null!=i&&1!==i){this.getGlobalScale(c);var o=c[0]<0?-1:1,a=c[1]<0?-1:1,s=((c[0]-o)*i+o)/c[0]||0,u=((c[1]-a)*i+a)/c[1]||0;n[0]*=s,n[1]*=s,n[2]*=u,n[3]*=u}this.invTransform=this.invTransform||l.create(),l.invert(this.invTransform,n)}else n&&h(n)},a.getLocalTransform=function(t){return n.getLocalTransform(this,t)},a.setTransform=function(t){var e=this.transform,r=t.dpr||1;e?t.setTransform(r*e[0],r*e[1],r*e[2],r*e[3],r*e[4],r*e[5]):t.setTransform(r,0,0,r,0,0)},a.restoreTransform=function(t){var e=t.dpr||1;t.setTransform(e,0,0,e,0,0)};var s=[],u=l.create();a.setLocalTransform=function(t){if(t){var e=t[0]*t[0]+t[1]*t[1],r=t[2]*t[2]+t[3]*t[3],n=this.position,i=this.scale;o(e-1)&&(e=Math.sqrt(e)),o(r-1)&&(r=Math.sqrt(r)),t[0]<0&&(e=-e),t[3]<0&&(r=-r),n[0]=t[4],n[1]=t[5],i[0]=e,i[1]=r,this.rotation=Math.atan2(-t[1]/r,t[0]/e)}},a.decomposeTransform=function(){if(this.transform){var t=this.parent,e=this.transform;t&&t.transform&&(l.mul(s,t.invTransform,e),e=s);var r=this.origin;r&&(r[0]||r[1])&&(u[4]=r[0],u[5]=r[1],l.mul(s,e,u),s[4]-=r[0],s[5]-=r[1],e=s),this.setLocalTransform(e)}},a.getGlobalScale=function(t){var e=this.transform;return t=t||[],e?(t[0]=Math.sqrt(e[0]*e[0]+e[1]*e[1]),t[1]=Math.sqrt(e[2]*e[2]+e[3]*e[3]),e[0]<0&&(t[0]=-t[0]),e[3]<0&&(t[1]=-t[1])):(t[0]=1,t[1]=1),t},a.transformCoordToLocal=function(t,e){var r=[t,e],n=this.invTransform;return n&&i.applyTransform(r,r,n),r},a.transformCoordToGlobal=function(t,e){var r=[t,e],n=this.transform;return n&&i.applyTransform(r,r,n),r},n.getLocalTransform=function(t,e){h(e=e||[]);var r=t.origin,n=t.scale||[1,1],i=t.rotation||0,o=t.position||[0,0];return r&&(e[4]-=r[0],e[5]-=r[1]),l.scale(e,e,n),i&&l.rotate(e,e,i),r&&(e[4]+=r[0],e[5]+=r[1]),e[4]+=o[0],e[5]+=o[1],e};var f=n;e.exports=f},{"../core/matrix":117,"../core/vector":120}],165:[function(t,e,r){var a=t("./core").createElement,s=t("../core/util"),n=t("../core/log"),g=t("../graphic/Path"),v=t("../graphic/Image"),m=t("../graphic/Text"),y=t("../core/arrayDiff2"),u=t("./helper/GradientManager"),l=t("./helper/ClippathManager"),h=t("./helper/ShadowManager"),i=t("./graphic"),b=i.path,w=i.image,_=i.text;function c(t){return parseInt(t,10)}function o(t,e){return e&&t&&e.parentNode!==t}function x(t,e,r){if(o(t,e)&&r){var n=r.nextSibling;n?t.insertBefore(e,n):t.appendChild(e)}}function A(t,e){if(o(t,e)){var r=t.firstChild;r?t.insertBefore(e,r):t.appendChild(e)}}function L(t,e){e&&t&&e.parentNode===t&&t.removeChild(e)}function S(t){return t.__textSvgEl}function N(t){return t.__svgEl}function f(t,e,r,n){this.root=t,this.storage=e,this._opts=r=s.extend({},r||{});var i=a("svg");i.setAttribute("xmlns","http://www.w3.org/2000/svg"),i.setAttribute("version","1.1"),i.setAttribute("baseProfile","full"),i.style.cssText="user-select:none;position:absolute;left:0;top:0;",this.gradientManager=new u(n,i),this.clipPathManager=new l(n,i),this.shadowManager=new h(n,i);var o=document.createElement("div");o.style.cssText="overflow:hidden;position:relative",this._svgRoot=i,this._viewport=o,t.appendChild(o),o.appendChild(i),this.resize(r.width,r.height),this._visibleList=[]}f.prototype={constructor:f,getType:function(){return"svg"},getViewportRoot:function(){return this._viewport},getViewportRootOffset:function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},refresh:function(){var t=this.storage.getDisplayList(!0);this._paintList(t)},setBackgroundColor:function(t){this._viewport.style.background=t},_paintList:function(t){this.gradientManager.markAllUnused(),this.clipPathManager.markAllUnused(),this.shadowManager.markAllUnused();var e,r,n=this._svgRoot,i=this._visibleList,o=t.length,a=[];for(e=0;e<o;e++){var s=t[e],u=(r=s)instanceof g?b:r instanceof v?w:r instanceof m?_:b,l=N(s)||S(s);s.invisible||(s.__dirty&&(u&&u.brush(s),this.clipPathManager.update(s),s.style&&(this.gradientManager.update(s.style.fill),this.gradientManager.update(s.style.stroke),this.shadowManager.update(l,s)),s.__dirty=!1),a.push(s))}var h,c=y(i,a);for(e=0;e<c.length;e++){if((p=c[e]).removed)for(var f=0;f<p.count;f++){l=N(s=i[p.indices[f]]);var d=S(s);L(n,l),L(n,d)}}for(e=0;e<c.length;e++){var p;if((p=c[e]).added)for(f=0;f<p.count;f++){l=N(s=a[p.indices[f]]),d=S(s);h?x(n,l,h):A(n,l),l?x(n,d,l):h?x(n,d,h):A(n,d),x(n,d,l),h=d||l||h,this.gradientManager.addWithoutUpdate(l,s),this.shadowManager.addWithoutUpdate(h,s),this.clipPathManager.markUsed(s)}else if(!p.removed)for(f=0;f<p.count;f++){h=l=S(s=a[p.indices[f]])||N(s)||h,this.gradientManager.markUsed(s),this.gradientManager.addWithoutUpdate(l,s),this.shadowManager.markUsed(s),this.shadowManager.addWithoutUpdate(l,s),this.clipPathManager.markUsed(s)}}this.gradientManager.removeUnused(),this.clipPathManager.removeUnused(),this.shadowManager.removeUnused(),this._visibleList=a},_getDefs:function(t){var n,e=this._svgRoot;return 0!==(n=this._svgRoot.getElementsByTagName("defs")).length?n[0]:t?((n=e.insertBefore(a("defs"),e.firstChild)).contains||(n.contains=function(t){var e=n.children;if(!e)return!1;for(var r=e.length-1;0<=r;--r)if(e[r]===t)return!0;return!1}),n):null},resize:function(t,e){var r=this._viewport;r.style.display="none";var n=this._opts;if(null!=t&&(n.width=t),null!=e&&(n.height=e),t=this._getSize(0),e=this._getSize(1),r.style.display="",this._width!==t||this._height!==e){this._width=t,this._height=e;var i=r.style;i.width=t+"px",i.height=e+"px";var o=this._svgRoot;o.setAttribute("width",t),o.setAttribute("height",e)}},getWidth:function(){return this._width},getHeight:function(){return this._height},_getSize:function(t){var e=this._opts,r=["width","height"][t],n=["clientWidth","clientHeight"][t],i=["paddingLeft","paddingTop"][t],o=["paddingRight","paddingBottom"][t];if(null!=e[r]&&"auto"!==e[r])return parseFloat(e[r]);var a=this.root,s=document.defaultView.getComputedStyle(a);return(a[n]||c(s[r])||c(a.style[r]))-(c(s[i])||0)-(c(s[o])||0)|0},dispose:function(){this.root.innerHTML="",this._svgRoot=this._viewport=this.storage=null},clear:function(){this._viewport&&this.root.removeChild(this._viewport)},pathToDataUrl:function(){return this.refresh(),"data:image/svg+xml;charset=UTF-8,"+this._svgRoot.outerHTML}},s.each(["getLayer","insertLayer","eachLayer","eachBuiltinLayer","eachOtherLayer","getLayers","modLayer","delLayer","clearLayer","toDataURL","pathToImage"],function(t){var e;f.prototype[t]=(e=t,function(){n('In SVG mode painter not support method "'+e+'"')})});var d=f;e.exports=d},{"../core/arrayDiff2":110,"../core/log":116,"../core/util":119,"../graphic/Image":126,"../graphic/Path":129,"../graphic/Text":133,"./core":166,"./graphic":167,"./helper/ClippathManager":168,"./helper/GradientManager":170,"./helper/ShadowManager":171}],166:[function(t,e,r){r.createElement=function(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}},{}],167:[function(t,e,r){var E=t("./core").createElement,n=t("../core/PathProxy"),i=t("../core/BoundingRect"),k=t("../core/matrix"),C=t("../contain/text"),T=t("../graphic/helper/text"),O=t("../graphic/Text"),S=n.CMD,o=Array.prototype.join,h="none",N=Math.round,P=Math.sin,I=Math.cos,B=Math.PI,M=2*Math.PI,j=180/B,a=1e-4;function F(t){return N(1e4*t)/1e4}function R(t){return t<a&&-a<t}function D(t,e){e&&z(t,"transform","matrix("+o.call(e,",")+")")}function z(t,e,r){r&&("linear"===r.type||"radial"===r.type)||t.setAttribute(e,r)}function q(t,e,r,n){if(o=e,null!=(a=r?o.textFill:o.fill)&&a!==h){var i=r?e.textFill:e.fill;i="transparent"===i?h:i,"none"!==t.getAttribute("clip-path")&&i===h&&(i="rgba(0, 0, 0, 0.002)"),z(t,"fill",i),z(t,"fill-opacity",null!=e.fillOpacity?e.fillOpacity*e.opacity:e.opacity)}else z(t,"fill",h);var o,a,s,u;if(s=e,null!=(u=r?s.textStroke:s.stroke)&&u!==h){var l=r?e.textStroke:e.stroke;z(t,"stroke",l="transparent"===l?h:l),z(t,"stroke-width",(r?e.textStrokeWidth:e.lineWidth)/(!r&&e.strokeNoScale?n.getLineScale():1)),z(t,"paint-order",r?"stroke":"fill"),z(t,"stroke-opacity",null!=e.strokeOpacity?e.strokeOpacity:e.opacity),e.lineDash?(z(t,"stroke-dasharray",e.lineDash.join(",")),z(t,"stroke-dashoffset",N(e.lineDashOffset||0))):z(t,"stroke-dasharray",""),e.lineCap&&z(t,"stroke-linecap",e.lineCap),e.lineJoin&&z(t,"stroke-linejoin",e.lineJoin),e.miterLimit&&z(t,"stroke-miterlimit",e.miterLimit)}else z(t,"stroke",h)}var s={};s.brush=function(t){var e=t.style,r=t.__svgEl;r||(r=E("path"),t.__svgEl=r),t.path||t.createPathProxy();var n=t.path;if(t.__dirtyPath){n.beginPath(),n.subPixelOptimize=!1,t.buildPath(n,t.shape),t.__dirtyPath=!1;var i=function(t){for(var e=[],r=t.data,n=t.len(),i=0;i<n;){var o="",a=0;switch(r[i++]){case S.M:o="M",a=2;break;case S.L:o="L",a=2;break;case S.Q:o="Q",a=4;break;case S.C:o="C",a=6;break;case S.A:var s=r[i++],u=r[i++],l=r[i++],h=r[i++],c=r[i++],f=r[i++],d=r[i++],p=r[i++],g=Math.abs(f),v=R(g-M)&&!R(g),m=!1;m=M<=g||!R(g)&&(-B<f&&f<0||B<f)==!!p;var y=F(s+l*I(c)),b=F(u+h*P(c));v&&(f=p?M-1e-4:1e-4-M,m=!0,9===i&&e.push("M",y,b));var w=F(s+l*I(c+f)),_=F(u+h*P(c+f));e.push("A",F(l),F(h),N(d*j),+m,+p,w,_);break;case S.Z:o="Z";break;case S.R:w=F(r[i++]),_=F(r[i++]);var x=F(r[i++]),A=F(r[i++]);e.push("M",w,_,"L",w+x,_,"L",w+x,_+A,"L",w,_+A,"L",w,_)}o&&e.push(o);for(var L=0;L<a;L++)e.push(F(r[i++]))}return e.join(" ")}(n);i.indexOf("NaN")<0&&z(r,"d",i)}q(r,e,!1,t),D(r,t.transform),null!=e.text&&c(t,t.getBoundingRect())};var u={brush:function(t){var e=t.style,r=e.image;r instanceof HTMLImageElement&&(r=r.src);if(r){var n,i,o=e.x||0,a=e.y||0,s=e.width,u=e.height,l=t.__svgEl;l||(l=E("image"),t.__svgEl=l),r!==t.__imageSrc&&(n="href",i=r,l.setAttributeNS("http://www.w3.org/1999/xlink",n,i),t.__imageSrc=r),z(l,"width",s),z(l,"height",u),z(l,"x",o),z(l,"y",a),D(l,t.transform),null!=e.text&&c(t,t.getBoundingRect())}}},l={},U=new i,c=function(t,e,r){var n=t.style;t.__dirty&&T.normalizeTextStyle(n,!0);var i=n.text;if(null!=i){i+="";var o,a,s=t.__textSvgEl;s||(s=E("text"),t.__textSvgEl=s);var u=n.textPosition,l=n.textDistance,h=n.textAlign||"left";"number"==typeof n.fontSize&&(n.fontSize+="px");var c=n.font||[n.fontStyle||"",n.fontWeight||"",n.fontSize||"",n.fontFamily||""].join(" ")||C.DEFAULT_FONT,f=H(n.textVerticalAlign),d=(r=C.getBoundingRect(i,c,h,f,n.textPadding,n.textLineHeight)).lineHeight;if(u instanceof Array)o=e.x+u[0],a=e.y+u[1];else{var p=C.adjustTextPositionOnRect(u,e,l);o=p.x,a=p.y,f=H(p.textVerticalAlign),h=p.textAlign}z(s,"alignment-baseline",f),c&&(s.style.font=c);var g=n.textPadding;if(z(s,"x",o),z(s,"y",a),q(s,n,!0,t),t instanceof O||t.style.transformText)D(s,t.transform);else{if(t.transform)U.copy(e),U.applyTransform(t.transform),e=U;else{var v=t.transformCoordToGlobal(e.x,e.y);e.x=v[0],e.y=v[1],t.transform=k.identity(k.create())}var m=n.textOrigin;"center"===m?(o=r.width/2+o,a=r.height/2+a):m&&(o=m[0]+o,a=m[1]+a);var y=-n.textRotation||0,b=k.create();k.rotate(b,b,y);v=[t.transform[4],t.transform[5]];k.translate(b,b,v),D(s,b)}var w=i.split("\n"),_=w.length,x=h;"left"===x?(x="start",g&&(o+=g[3])):"right"===x?(x="end",g&&(o-=g[1])):"center"===x&&(x="middle",g&&(o+=(g[3]-g[1])/2));var A=0;if("after-edge"===f?(A=-r.height+d,g&&(A-=g[2])):"middle"===f?(A=(-r.height+d)/2,g&&(a+=(g[0]-g[2])/2)):g&&(A+=g[0]),t.__text!==i||t.__textFont!==c){var L=t.__tspanList||[];t.__tspanList=L;for(var S=0;S<_;S++){(P=L[S])?P.innerHTML="":(P=L[S]=E("tspan"),s.appendChild(P),z(P,"alignment-baseline",f),z(P,"text-anchor",x)),z(P,"x",o),z(P,"y",a+S*d+A),P.appendChild(document.createTextNode(w[S]))}for(;S<L.length;S++)s.removeChild(L[S]);L.length=_,t.__text=i,t.__textFont=c}else if(t.__tspanList.length){var N=t.__tspanList.length;for(S=0;S<N;++S){var P;(P=t.__tspanList[S])&&(z(P,"x",o),z(P,"y",a+S*d+A))}}}};function H(t){return"middle"===t?"middle":"bottom"===t?"after-edge":"hanging"}l.drawRectText=c,l.brush=function(t){var e=t.style;null!=e.text&&(e.textPosition=[0,0],c(t,{x:e.x||0,y:e.y||0,width:0,height:0},t.getBoundingRect()))},r.path=s,r.image=u,r.text=l},{"../contain/text":102,"../core/BoundingRect":106,"../core/PathProxy":109,"../core/matrix":117,"../graphic/Text":133,"../graphic/helper/text":143,"./core":166}],168:[function(t,e,r){var n=t("./Definable"),i=t("../../core/util"),c=t("../../core/matrix");function o(t,e){n.call(this,t,e,"clipPath","__clippath_in_use__")}i.inherits(o,n),o.prototype.update=function(t){var e=this.getSvgElement(t);e&&this.updateDom(e,t.__clipPaths,!1);var r=this.getTextSvgElement(t);r&&this.updateDom(r,t.__clipPaths,!0),this.markUsed(t)},o.prototype.updateDom=function(t,e,r){if(e&&0<e.length){var n,i,o=this.getDefs(!0),a=e[0],s=r?"_textDom":"_dom";a[s]?(i=a[s].getAttribute("id"),n=a[s],o.contains(n)||o.appendChild(n)):(i="zr"+this._zrId+"-clip-"+this.nextId,++this.nextId,(n=this.createElement("clipPath")).setAttribute("id",i),o.appendChild(n),a[s]=n);var u=this.getSvgProxy(a);if(a.transform&&a.parent.invTransform&&!r){var l=Array.prototype.slice.call(a.transform);c.mul(a.transform,a.parent.invTransform,a.transform),u.brush(a),a.transform=l}else u.brush(a);var h=this.getSvgElement(a);n.innerHTML="",n.appendChild(h.cloneNode()),t.setAttribute("clip-path","url(#"+i+")"),1<e.length&&this.updateDom(n,e.slice(1),r)}else t&&t.setAttribute("clip-path","none")},o.prototype.markUsed=function(t){var e=this;t.__clipPaths&&0<t.__clipPaths.length&&i.each(t.__clipPaths,function(t){t._dom&&n.prototype.markUsed.call(e,t._dom),t._textDom&&n.prototype.markUsed.call(e,t._textDom)})};var a=o;e.exports=a},{"../../core/matrix":117,"../../core/util":119,"./Definable":169}],169:[function(t,e,r){var n=t("../core").createElement,i=t("../../core/util"),o=t("../../graphic/Path"),a=t("../../graphic/Image"),s=t("../../graphic/Text"),u=t("../graphic"),l=u.path,h=u.image,c=u.text;function f(t,e,r,n,i){this._zrId=t,this._svgRoot=e,this._tagNames="string"==typeof r?[r]:r,this._markLabel=n,this._domName=i||"_dom",this.nextId=0}f.prototype.createElement=n,f.prototype.getDefs=function(t){var e=this._svgRoot,n=this._svgRoot.getElementsByTagName("defs");return 0===n.length?t?((n=e.insertBefore(this.createElement("defs"),e.firstChild)).contains||(n.contains=function(t){var e=n.children;if(!e)return!1;for(var r=e.length-1;0<=r;--r)if(e[r]===t)return!0;return!1}),n):null:n[0]},f.prototype.update=function(t,e){if(t){var r=this.getDefs(!1);if(t[this._domName]&&r.contains(t[this._domName]))"function"==typeof e&&e(t);else{var n=this.add(t);n&&(t[this._domName]=n)}}},f.prototype.addDom=function(t){this.getDefs(!0).appendChild(t)},f.prototype.removeDom=function(t){var e=this.getDefs(!1);e&&t[this._domName]&&(e.removeChild(t[this._domName]),t[this._domName]=null)},f.prototype.getDoms=function(){var r=this.getDefs(!1);if(!r)return[];var n=[];return i.each(this._tagNames,function(t){var e=r.getElementsByTagName(t);n=n.concat([].slice.call(e))}),n},f.prototype.markAllUnused=function(){var t=this.getDoms(),e=this;i.each(t,function(t){t[e._markLabel]="0"})},f.prototype.markUsed=function(t){t&&(t[this._markLabel]="1")},f.prototype.removeUnused=function(){var e=this.getDefs(!1);if(e){var t=this.getDoms(),r=this;i.each(t,function(t){"1"!==t[r._markLabel]&&e.removeChild(t)})}},f.prototype.getSvgProxy=function(t){return t instanceof o?l:t instanceof a?h:t instanceof s?c:l},f.prototype.getTextSvgElement=function(t){return t.__textSvgEl},f.prototype.getSvgElement=function(t){return t.__svgEl};var d=f;e.exports=d},{"../../core/util":119,"../../graphic/Image":126,"../../graphic/Path":129,"../../graphic/Text":133,"../core":166,"../graphic":167}],170:[function(t,e,r){var i=t("./Definable"),n=t("../../core/util"),l=t("../../core/log"),h=t("../../tool/color");function o(t,e){i.call(this,t,e,["linearGradient","radialGradient"],"__gradient_in_use__")}n.inherits(o,i),o.prototype.addWithoutUpdate=function(o,a){if(a&&a.style){var s=this;n.each(["fill","stroke"],function(t){if(a.style[t]&&("linear"===a.style[t].type||"radial"===a.style[t].type)){var e,r=a.style[t],n=s.getDefs(!0);r._dom?(e=r._dom,n.contains(r._dom)||s.addDom(e)):e=s.add(r),s.markUsed(a);var i=e.getAttribute("id");o.setAttribute(t,"url(#"+i+")")}})}},o.prototype.add=function(t){var e;if("linear"===t.type)e=this.createElement("linearGradient");else{if("radial"!==t.type)return l("Illegal gradient type."),null;e=this.createElement("radialGradient")}return t.id=t.id||this.nextId++,e.setAttribute("id","zr"+this._zrId+"-gradient-"+t.id),this.updateDom(t,e),this.addDom(e),e},o.prototype.update=function(r){var n=this;i.prototype.update.call(this,r,function(){var t=r.type,e=r._dom.tagName;"linear"===t&&"linearGradient"===e||"radial"===t&&"radialGradient"===e?n.updateDom(r,r._dom):(n.removeDom(r),n.add(r))})},o.prototype.updateDom=function(t,e){if("linear"===t.type)e.setAttribute("x1",t.x),e.setAttribute("y1",t.y),e.setAttribute("x2",t.x2),e.setAttribute("y2",t.y2);else{if("radial"!==t.type)return void l("Illegal gradient type.");e.setAttribute("cx",t.x),e.setAttribute("cy",t.y),e.setAttribute("r",t.r)}t.global?e.setAttribute("gradientUnits","userSpaceOnUse"):e.setAttribute("gradientUnits","objectBoundingBox"),e.innerHTML="";for(var r=t.colorStops,n=0,i=r.length;n<i;++n){var o=this.createElement("stop");o.setAttribute("offset",100*r[n].offset+"%");var a=r[n].color;if(a.indexOf(!1)){var s=h.parse(a)[3],u=h.toHex(a);o.setAttribute("stop-color","#"+u),o.setAttribute("stop-opacity",s)}else o.setAttribute("stop-color",r[n].color);e.appendChild(o)}t._dom=e},o.prototype.markUsed=function(t){if(t.style){var e=t.style.fill;e&&e._dom&&i.prototype.markUsed.call(this,e._dom),(e=t.style.stroke)&&e._dom&&i.prototype.markUsed.call(this,e._dom)}};var a=o;e.exports=a},{"../../core/log":116,"../../core/util":119,"../../tool/color":173,"./Definable":169}],171:[function(t,e,r){var i=t("./Definable");function n(t,e){i.call(this,t,e,["filter"],"__filter_in_use__","_shadowDom")}function o(t){return t&&(t.shadowBlur||t.shadowOffsetX||t.shadowOffsetY||t.textShadowBlur||t.textShadowOffsetX||t.textShadowOffsetY)}t("../../core/util").inherits(n,i),n.prototype.addWithoutUpdate=function(t,e){if(e&&o(e.style)){var r,n=e.style;if(n._shadowDom)r=n._shadowDom,this.getDefs(!0).contains(n._shadowDom)||this.addDom(r);else r=this.add(e);this.markUsed(e);var i=r.getAttribute("id");t.style.filter="url(#"+i+")"}},n.prototype.add=function(t){var e=this.createElement("filter"),r=t.style;return r._shadowDomId=r._shadowDomId||this.nextId++,e.setAttribute("id","zr"+this._zrId+"-shadow-"+r._shadowDomId),this.updateDom(t,e),this.addDom(e),e},n.prototype.update=function(t,e){var r=e.style;if(o(r)){var n=this;i.prototype.update.call(this,e,function(t){n.updateDom(e,t._shadowDom)})}else this.remove(t,r)},n.prototype.remove=function(t,e){null!=e._shadowDomId&&(this.removeDom(e),t.style.filter="")},n.prototype.updateDom=function(t,e){var r=e.getElementsByTagName("feDropShadow");r=0===r.length?this.createElement("feDropShadow"):r[0];var n,i,o,a,s=t.style,u=t.scale&&t.scale[0]||1,l=t.scale&&t.scale[1]||1;if(s.shadowBlur||s.shadowOffsetX||s.shadowOffsetY)n=s.shadowOffsetX||0,i=s.shadowOffsetY||0,o=s.shadowBlur,a=s.shadowColor;else{if(!s.textShadowBlur)return void this.removeDom(e,s);n=s.textShadowOffsetX||0,i=s.textShadowOffsetY||0,o=s.textShadowBlur,a=s.textShadowColor}r.setAttribute("dx",n/u),r.setAttribute("dy",i/l),r.setAttribute("flood-color",a);var h=o/2/u+" "+o/2/l;r.setAttribute("stdDeviation",h),e.setAttribute("x","-100%"),e.setAttribute("y","-100%"),e.setAttribute("width",Math.ceil(o/2*200)+"%"),e.setAttribute("height",Math.ceil(o/2*200)+"%"),e.appendChild(r),s._shadowDom=e},n.prototype.markUsed=function(t){var e=t.style;e&&e._shadowDom&&i.prototype.markUsed.call(this,e._shadowDom)};var a=n;e.exports=a},{"../../core/util":119,"./Definable":169}],172:[function(t,e,r){t("./graphic"),(0,t("../zrender").registerPainter)("svg",t("./Painter"))},{"../zrender":181,"./Painter":165,"./graphic":167}],173:[function(t,e,r){var n=t("../core/LRU"),h={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function c(t){return(t=Math.round(t))<0?0:255<t?255:t}function f(t){return t<0?0:1<t?1:t}function d(t){return t.length&&"%"===t.charAt(t.length-1)?c(parseFloat(t)/100*255):c(parseInt(t,10))}function p(t){return t.length&&"%"===t.charAt(t.length-1)?f(parseFloat(t)/100):f(parseFloat(t))}function s(t,e,r){return r<0?r+=1:1<r&&--r,6*r<1?t+(e-t)*r*6:2*r<1?e:3*r<2?t+(e-t)*(2/3-r)*6:t}function g(t,e,r){return t+(e-t)*r}function v(t,e,r,n,i){return t[0]=e,t[1]=r,t[2]=n,t[3]=i,t}function m(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}var y=new n(20),i=null;function b(t,e){i&&m(i,e),i=y.put(t,i||e.slice())}function w(t,e){if(t){e=e||[];var r=y.get(t);if(r)return m(e,r);var n,i=(t+="").replace(/ /g,"").toLowerCase();if(i in h)return m(e,h[i]),b(t,e),e;if("#"===i.charAt(0))return 4===i.length?0<=(n=parseInt(i.substr(1),16))&&n<=4095?(v(e,(3840&n)>>4|(3840&n)>>8,240&n|(240&n)>>4,15&n|(15&n)<<4,1),b(t,e),e):void v(e,0,0,0,1):7===i.length?0<=(n=parseInt(i.substr(1),16))&&n<=16777215?(v(e,(16711680&n)>>16,(65280&n)>>8,255&n,1),b(t,e),e):void v(e,0,0,0,1):void 0;var o=i.indexOf("("),a=i.indexOf(")");if(-1!==o&&a+1===i.length){var s=i.substr(0,o),u=i.substr(o+1,a-(o+1)).split(","),l=1;switch(s){case"rgba":if(4!==u.length)return void v(e,0,0,0,1);l=p(u.pop());case"rgb":return 3!==u.length?void v(e,0,0,0,1):(v(e,d(u[0]),d(u[1]),d(u[2]),l),b(t,e),e);case"hsla":return 4!==u.length?void v(e,0,0,0,1):(u[3]=p(u[3]),_(u,e),b(t,e),e);case"hsl":return 3!==u.length?void v(e,0,0,0,1):(_(u,e),b(t,e),e);default:return}}v(e,0,0,0,1)}}function _(t,e){var r=(parseFloat(t[0])%360+360)%360/360,n=p(t[1]),i=p(t[2]),o=i<=.5?i*(n+1):i+n-i*n,a=2*i-o;return v(e=e||[],c(255*s(a,o,r+1/3)),c(255*s(a,o,r)),c(255*s(a,o,r-1/3)),1),4===t.length&&(e[3]=t[3]),e}function o(t,e,r){if(e&&e.length&&0<=t&&t<=1){r=r||[];var n=t*(e.length-1),i=Math.floor(n),o=Math.ceil(n),a=e[i],s=e[o],u=n-i;return r[0]=c(g(a[0],s[0],u)),r[1]=c(g(a[1],s[1],u)),r[2]=c(g(a[2],s[2],u)),r[3]=f(g(a[3],s[3],u)),r}}var a=o;function u(t,e,r){if(e&&e.length&&0<=t&&t<=1){var n=t*(e.length-1),i=Math.floor(n),o=Math.ceil(n),a=w(e[i]),s=w(e[o]),u=n-i,l=x([c(g(a[0],s[0],u)),c(g(a[1],s[1],u)),c(g(a[2],s[2],u)),f(g(a[3],s[3],u))],"rgba");return r?{color:l,leftIndex:i,rightIndex:o,value:n}:l}}var l=u;function x(t,e){if(t&&t.length){var r=t[0]+","+t[1]+","+t[2];return"rgba"!==e&&"hsva"!==e&&"hsla"!==e||(r+=","+t[3]),e+"("+r+")"}}r.parse=w,r.lift=function(t,e){var r=w(t);if(r){for(var n=0;n<3;n++)r[n]=e<0?r[n]*(1-e)|0:(255-r[n])*e+r[n]|0,255<r[n]?r[n]=255:t[n]<0&&(r[n]=0);return x(r,4===r.length?"rgba":"rgb")}},r.toHex=function(t){var e=w(t);if(e)return((1<<24)+(e[0]<<16)+(e[1]<<8)+ +e[2]).toString(16).slice(1)},r.fastLerp=o,r.fastMapToColor=a,r.lerp=u,r.mapToColor=l,r.modifyHSL=function(t,e,r,n){if(t=w(t))return t=function(t){if(t){var e,r,n=t[0]/255,i=t[1]/255,o=t[2]/255,a=Math.min(n,i,o),s=Math.max(n,i,o),u=s-a,l=(s+a)/2;if(0==u)r=e=0;else{r=l<.5?u/(s+a):u/(2-s-a);var h=((s-n)/6+u/2)/u,c=((s-i)/6+u/2)/u,f=((s-o)/6+u/2)/u;n===s?e=f-c:i===s?e=1/3+h-f:o===s&&(e=2/3+c-h),e<0&&(e+=1),1<e&&--e}var d=[360*e,r,l];return null!=t[3]&&d.push(t[3]),d}}(t),null!=e&&(t[0]=(i=e,(i=Math.round(i))<0?0:360<i?360:i)),null!=r&&(t[1]=p(r)),null!=n&&(t[2]=p(n)),x(_(t),"rgba");var i},r.modifyAlpha=function(t,e){if((t=w(t))&&null!=e)return t[3]=f(e),x(t,"rgba")},r.stringify=x},{"../core/LRU":108}],174:[function(t,e,r){var f=t("../container/Group"),n=t("../graphic/Image"),s=t("../graphic/Text"),i=t("../graphic/shape/Circle"),d=t("../graphic/shape/Rect"),o=t("../graphic/shape/Ellipse"),a=t("../graphic/shape/Line"),u=t("../graphic/Path"),l=t("../graphic/shape/Polygon"),h=t("../graphic/shape/Polyline"),c=t("../graphic/LinearGradient"),p=t("../graphic/Style"),g=t("../core/matrix"),v=t("./path").createFromString,m=t("../core/util"),y=m.isString,b=m.extend,w=m.defaults,_=m.trim,x=m.each,A=/[\s,]+/;function L(t){y(t)&&(t=(new DOMParser).parseFromString(t,"text/xml"));for(9===t.nodeType&&(t=t.firstChild);"svg"!==t.nodeName.toLowerCase()||1!==t.nodeType;)t=t.nextSibling;return t}function S(){this._defs={},this._root=null,this._isDefine=!1,this._isText=!1}S.prototype.parse=function(t,e){e=e||{};var r=L(t);if(!r)throw new Error("Illegal svg");var n=new f;this._root=n;var i=r.getAttribute("viewBox")||"",o=parseFloat(r.getAttribute("width")||e.width),a=parseFloat(r.getAttribute("height")||e.height);isNaN(o)&&(o=null),isNaN(a)&&(a=null),T(r,n,null,!0);for(var s,u,l=r.firstChild;l;)this._parseNode(l,n),l=l.nextSibling;if(i){var h=_(i).split(A);4<=h.length&&(s={x:parseFloat(h[0]||0),y:parseFloat(h[1]||0),width:parseFloat(h[2]),height:parseFloat(h[3])})}if(s&&null!=o&&null!=a&&(u=j(s,o,a),!e.ignoreViewBox)){var c=n;(n=new f).add(c),c.scale=u.scale.slice(),c.position=u.position.slice()}return e.ignoreRootClip||null==o||null==a||n.setClipPath(new d({shape:{x:0,y:0,width:o,height:a}})),{root:n,width:o,height:a,viewBoxRect:s,viewBoxTransform:u}},S.prototype._parseNode=function(t,e){var r,n,i=t.nodeName.toLowerCase();if("defs"===i?this._isDefine=!0:"text"===i&&(this._isText=!0),this._isDefine){if(n=P[i]){var o=n.call(this,t),a=t.getAttribute("id");a&&(this._defs[a]=o)}}else(n=N[i])&&(r=n.call(this,t,e),e.add(r));for(var s=t.firstChild;s;)1===s.nodeType&&this._parseNode(s,r),3===s.nodeType&&this._isText&&this._parseText(s,r),s=s.nextSibling;"defs"===i?this._isDefine=!1:"text"===i&&(this._isText=!1)},S.prototype._parseText=function(t,e){if(1===t.nodeType){var r=t.getAttribute("dx")||0,n=t.getAttribute("dy")||0;this._textX+=parseFloat(r),this._textY+=parseFloat(n)}var i=new s({style:{text:t.textContent,transformText:!0},position:[this._textX||0,this._textY||0]});E(e,i),T(t,i,this._defs);var o=i.style.fontSize;o&&o<9&&(i.style.fontSize=9,i.scale=i.scale||[1,1],i.scale[0]*=o/9,i.scale[1]*=o/9);var a=i.getBoundingRect();return this._textX+=a.width,e.add(i),i};var N={g:function(t,e){var r=new f;return E(e,r),T(t,r,this._defs),r},rect:function(t,e){var r=new d;return E(e,r),T(t,r,this._defs),r.setShape({x:parseFloat(t.getAttribute("x")||0),y:parseFloat(t.getAttribute("y")||0),width:parseFloat(t.getAttribute("width")||0),height:parseFloat(t.getAttribute("height")||0)}),r},circle:function(t,e){var r=new i;return E(e,r),T(t,r,this._defs),r.setShape({cx:parseFloat(t.getAttribute("cx")||0),cy:parseFloat(t.getAttribute("cy")||0),r:parseFloat(t.getAttribute("r")||0)}),r},line:function(t,e){var r=new a;return E(e,r),T(t,r,this._defs),r.setShape({x1:parseFloat(t.getAttribute("x1")||0),y1:parseFloat(t.getAttribute("y1")||0),x2:parseFloat(t.getAttribute("x2")||0),y2:parseFloat(t.getAttribute("y2")||0)}),r},ellipse:function(t,e){var r=new o;return E(e,r),T(t,r,this._defs),r.setShape({cx:parseFloat(t.getAttribute("cx")||0),cy:parseFloat(t.getAttribute("cy")||0),rx:parseFloat(t.getAttribute("rx")||0),ry:parseFloat(t.getAttribute("ry")||0)}),r},polygon:function(t,e){var r=t.getAttribute("points");r=r&&k(r);var n=new l({shape:{points:r||[]}});return E(e,n),T(t,n,this._defs),n},polyline:function(t,e){var r=new u;E(e,r),T(t,r,this._defs);var n=t.getAttribute("points");return n=n&&k(n),new h({shape:{points:n||[]}})},image:function(t,e){var r=new n;return E(e,r),T(t,r,this._defs),r.setStyle({image:t.getAttribute("xlink:href"),x:t.getAttribute("x"),y:t.getAttribute("y"),width:t.getAttribute("width"),height:t.getAttribute("height")}),r},text:function(t,e){var r=t.getAttribute("x")||0,n=t.getAttribute("y")||0,i=t.getAttribute("dx")||0,o=t.getAttribute("dy")||0;this._textX=parseFloat(r)+parseFloat(i),this._textY=parseFloat(n)+parseFloat(o);var a=new f;return E(e,a),T(t,a,this._defs),a},tspan:function(t,e){var r=t.getAttribute("x"),n=t.getAttribute("y");null!=r&&(this._textX=parseFloat(r)),null!=n&&(this._textY=parseFloat(n));var i=t.getAttribute("dx")||0,o=t.getAttribute("dy")||0,a=new f;return E(e,a),T(t,a,this._defs),this._textX+=i,this._textY+=o,a},path:function(t,e){var r=t.getAttribute("d")||"",n=v(r);return E(e,n),T(t,n,this._defs),n}},P={lineargradient:function(t){var e=parseInt(t.getAttribute("x1")||0,10),r=parseInt(t.getAttribute("y1")||0,10),n=parseInt(t.getAttribute("x2")||10,10),i=parseInt(t.getAttribute("y2")||0,10),o=new c(e,r,n,i);return function(t,e){var r=t.firstChild;for(;r;){if(1===r.nodeType){var n=r.getAttribute("offset");n=0<n.indexOf("%")?parseInt(n,10)/100:n?parseFloat(n):0;var i=r.getAttribute("stop-color")||"#000000";e.addColorStop(n,i)}r=r.nextSibling}}(t,o),o},radialgradient:function(t){}};function E(t,e){t&&t.__inheritedStyle&&(e.__inheritedStyle||(e.__inheritedStyle={}),w(e.__inheritedStyle,t.__inheritedStyle))}function k(t){for(var e=_(t).split(A),r=[],n=0;n<e.length;n+=2){var i=parseFloat(e[n]),o=parseFloat(e[n+1]);r.push([i,o])}return r}var C={fill:"fill",stroke:"stroke","stroke-width":"lineWidth",opacity:"opacity","fill-opacity":"fillOpacity","stroke-opacity":"strokeOpacity","stroke-dasharray":"lineDash","stroke-dashoffset":"lineDashOffset","stroke-linecap":"lineCap","stroke-linejoin":"lineJoin","stroke-miterlimit":"miterLimit","font-family":"fontFamily","font-size":"fontSize","font-style":"fontStyle","font-weight":"fontWeight","text-align":"textAlign","alignment-baseline":"textBaseline"};function T(t,e,r,n){var i=e.__inheritedStyle||{},o="text"===e.type;if(1===t.nodeType&&(function(t,e){var r=t.getAttribute("transform");if(r){r=r.replace(/,/g," ");var n=null,i=[];r.replace(B,function(t,e,r){i.push(e,r)});for(var o=i.length-1;0<o;o-=2){var a=i[o],s=i[o-1];switch(n=n||g.create(),s){case"translate":a=_(a).split(A),g.translate(n,n,[parseFloat(a[0]),parseFloat(a[1]||0)]);break;case"scale":a=_(a).split(A),g.scale(n,n,[parseFloat(a[0]),parseFloat(a[1]||a[0])]);break;case"rotate":a=_(a).split(A),g.rotate(n,n,parseFloat(a[0]));break;case"skew":a=_(a).split(A),console.warn("Skew transform is not supported yet");break;case"matrix":a=_(a).split(A);n[0]=parseFloat(a[0]),n[1]=parseFloat(a[1]),n[2]=parseFloat(a[2]),n[3]=parseFloat(a[3]),n[4]=parseFloat(a[4]),n[5]=parseFloat(a[5])}}e.setLocalTransform(n)}}(t,e),b(i,function(t){var e=t.getAttribute("style"),r={};if(!e)return r;var n,i={};M.lastIndex=0;for(;null!=(n=M.exec(e));)i[n[1]]=n[2];for(var o in C)C.hasOwnProperty(o)&&null!=i[o]&&(r[C[o]]=i[o]);return r}(t)),!n))for(var a in C)if(C.hasOwnProperty(a)){var s=t.getAttribute(a);null!=s&&(i[C[a]]=s)}var u=o?"textFill":"fill",l=o?"textStroke":"stroke";e.style=e.style||new p;var h=e.style;null!=i.fill&&h.set(u,I(i.fill,r)),null!=i.stroke&&h.set(l,I(i.stroke,r)),x(["lineWidth","opacity","fillOpacity","strokeOpacity","miterLimit","fontSize"],function(t){var e="lineWidth"===t&&o?"textStrokeWidth":t;null!=i[t]&&h.set(e,parseFloat(i[t]))}),i.textBaseline&&"auto"!==i.textBaseline||(i.textBaseline="alphabetic"),"alphabetic"===i.textBaseline&&(i.textBaseline="bottom"),"start"===i.textAlign&&(i.textAlign="left"),"end"===i.textAlign&&(i.textAlign="right"),x(["lineDashOffset","lineCap","lineJoin","fontWeight","fontFamily","fontStyle","textAlign","textBaseline"],function(t){null!=i[t]&&h.set(t,i[t])}),i.lineDash&&(e.style.lineDash=_(i.lineDash).split(A)),h[l]&&"none"!==h[l]&&(e[l]=!0),e.__inheritedStyle=i}var O=/url\(\s*#(.*?)\)/;function I(t,e){var r=e&&t&&t.match(O);return r?e[_(r[1])]:t}var B=/(translate|scale|rotate|skewX|skewY|matrix)\(([\-\s0-9\.e,]*)\)/g;var M=/([^\s:;]+)\s*:\s*([^:;]+)/g;function j(t,e,r){var n=e/t.width,i=r/t.height,o=Math.min(n,i);return{scale:[o,o],position:[-(t.x+t.width/2)*o+e/2,-(t.y+t.height/2)*o+r/2]}}r.parseXML=L,r.makeViewBoxTransform=j,r.parseSVG=function(t,e){return(new S).parse(t,e)}},{"../container/Group":105,"../core/matrix":117,"../core/util":119,"../graphic/Image":126,"../graphic/LinearGradient":128,"../graphic/Path":129,"../graphic/Style":132,"../graphic/Text":133,"../graphic/shape/Circle":147,"../graphic/shape/Ellipse":149,"../graphic/shape/Line":152,"../graphic/shape/Polygon":153,"../graphic/shape/Polyline":154,"../graphic/shape/Rect":155,"./path":175}],175:[function(t,e,r){function n(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}var s=t("../graphic/Path"),E=t("../core/PathProxy"),i=t("./transformPath"),L=Math.sqrt,S=Math.sin,N=Math.cos,P=Math.PI,k=function(t,e){return(t[0]*e[0]+t[1]*e[1])/(n(t)*n(e))},C=function(t,e){return(t[0]*e[1]<t[1]*e[0]?-1:1)*Math.acos(k(t,e))};function T(t,e,r,n,i,o,a,s,u,l,h){var c=u*(P/180),f=N(c)*(t-r)/2+S(c)*(e-n)/2,d=-1*S(c)*(t-r)/2+N(c)*(e-n)/2,p=f*f/(a*a)+d*d/(s*s);1<p&&(a*=L(p),s*=L(p));var g=(i===o?-1:1)*L((a*a*(s*s)-a*a*(d*d)-s*s*(f*f))/(a*a*(d*d)+s*s*(f*f)))||0,v=g*a*d/s,m=g*-s*f/a,y=(t+r)/2+N(c)*v-S(c)*m,b=(e+n)/2+S(c)*v+N(c)*m,w=C([1,0],[(f-v)/a,(d-m)/s]),_=[(f-v)/a,(d-m)/s],x=[(-1*f-v)/a,(-1*d-m)/s],A=C(_,x);k(_,x)<=-1&&(A=P),1<=k(_,x)&&(A=0),0===o&&0<A&&(A-=2*P),1===o&&A<0&&(A+=2*P),h.addData(l,y,b,a,s,w,A,c,o)}var O=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/gi,I=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function o(t,e){var r=function(t){if(!t)return new E;for(var e,r=0,n=0,i=r,o=n,a=new E,s=E.CMD,u=t.match(O),l=0;l<u.length;l++){for(var h,c=u[l],f=c.charAt(0),d=c.match(I)||[],p=d.length,g=0;g<p;g++)d[g]=parseFloat(d[g]);for(var v=0;v<p;){var m,y,b,w,_,x,A,L=r,S=n;switch(f){case"l":r+=d[v++],n+=d[v++],h=s.L,a.addData(h,r,n);break;case"L":r=d[v++],n=d[v++],h=s.L,a.addData(h,r,n);break;case"m":r+=d[v++],n+=d[v++],h=s.M,a.addData(h,r,n),i=r,o=n,f="l";break;case"M":r=d[v++],n=d[v++],h=s.M,a.addData(h,r,n),i=r,o=n,f="L";break;case"h":r+=d[v++],h=s.L,a.addData(h,r,n);break;case"H":r=d[v++],h=s.L,a.addData(h,r,n);break;case"v":n+=d[v++],h=s.L,a.addData(h,r,n);break;case"V":n=d[v++],h=s.L,a.addData(h,r,n);break;case"C":h=s.C,a.addData(h,d[v++],d[v++],d[v++],d[v++],d[v++],d[v++]),r=d[v-2],n=d[v-1];break;case"c":h=s.C,a.addData(h,d[v++]+r,d[v++]+n,d[v++]+r,d[v++]+n,d[v++]+r,d[v++]+n),r+=d[v-2],n+=d[v-1];break;case"S":m=r,y=n;var N=a.len(),P=a.data;e===s.C&&(m+=r-P[N-4],y+=n-P[N-3]),h=s.C,L=d[v++],S=d[v++],r=d[v++],n=d[v++],a.addData(h,m,y,L,S,r,n);break;case"s":m=r,y=n;N=a.len(),P=a.data;e===s.C&&(m+=r-P[N-4],y+=n-P[N-3]),h=s.C,L=r+d[v++],S=n+d[v++],r+=d[v++],n+=d[v++],a.addData(h,m,y,L,S,r,n);break;case"Q":L=d[v++],S=d[v++],r=d[v++],n=d[v++],h=s.Q,a.addData(h,L,S,r,n);break;case"q":L=d[v++]+r,S=d[v++]+n,r+=d[v++],n+=d[v++],h=s.Q,a.addData(h,L,S,r,n);break;case"T":m=r,y=n;N=a.len(),P=a.data;e===s.Q&&(m+=r-P[N-4],y+=n-P[N-3]),r=d[v++],n=d[v++],h=s.Q,a.addData(h,m,y,r,n);break;case"t":m=r,y=n;N=a.len(),P=a.data;e===s.Q&&(m+=r-P[N-4],y+=n-P[N-3]),r+=d[v++],n+=d[v++],h=s.Q,a.addData(h,m,y,r,n);break;case"A":b=d[v++],w=d[v++],_=d[v++],x=d[v++],A=d[v++],T(L=r,S=n,r=d[v++],n=d[v++],x,A,b,w,_,h=s.A,a);break;case"a":b=d[v++],w=d[v++],_=d[v++],x=d[v++],A=d[v++],T(L=r,S=n,r+=d[v++],n+=d[v++],x,A,b,w,_,h=s.A,a)}}"z"!==f&&"Z"!==f||(h=s.Z,a.addData(h),r=i,n=o),e=h}return a.toStatic(),a}(t);return(e=e||{}).buildPath=function(t){if(t.setData){t.setData(r.data),(e=t.getContext())&&t.rebuildPath(e)}else{var e=t;r.rebuildPath(e)}},e.applyTransform=function(t){i(r,t),this.dirty(!0)},e}r.createFromString=function(t,e){return new s(o(t,e))},r.extendFromString=function(t,e){return s.extend(o(t,e))},r.mergePath=function(t,e){for(var r=[],n=t.length,i=0;i<n;i++){var o=t[i];o.path||o.createPathProxy(),o.__dirtyPath&&o.buildPath(o.path,o.shape,!0),r.push(o.path)}var a=new s(e);return a.createPathProxy(),a.buildPath=function(t){t.appendPath(r);var e=t.getContext();e&&t.rebuildPath(e)},a}},{"../core/PathProxy":109,"../graphic/Path":129,"./transformPath":176}],176:[function(t,e,r){var n=t("../core/PathProxy"),w=t("../core/vector").applyTransform,_=n.CMD,x=[[],[],[]],A=Math.sqrt,L=Math.atan2;e.exports=function(t,e){var r,n,i,o,a,s=t.data,u=_.M,l=_.C,h=_.L,c=_.R,f=_.A,d=_.Q;for(o=i=0;i<s.length;){switch(r=s[i++],o=i,n=0,r){case u:case h:n=1;break;case l:n=3;break;case d:n=2;break;case f:var p=e[4],g=e[5],v=A(e[0]*e[0]+e[1]*e[1]),m=A(e[2]*e[2]+e[3]*e[3]),y=L(-e[1]/m,e[0]/v);s[i]*=v,s[i++]+=p,s[i]*=m,s[i++]+=g,s[i++]*=v,s[i++]*=m,s[i++]+=y,s[i++]+=y,o=i+=2;break;case c:b[0]=s[i++],b[1]=s[i++],w(b,b,e),s[o++]=b[0],s[o++]=b[1],b[0]+=s[i++],b[1]+=s[i++],w(b,b,e),s[o++]=b[0],s[o++]=b[1]}for(a=0;a<n;a++){var b;(b=x[a])[0]=s[i++],b[1]=s[i++],w(b,b,e),s[o++]=b[0],s[o++]=b[1]}}}},{"../core/PathProxy":109,"../core/vector":120}],177:[function(t,e,r){var n=t("../core/log"),a=t("./core"),i=t("../core/util").each;function o(t){return parseInt(t,10)}function s(t,e){a.initVML(),this.root=t,this.storage=e;var r=document.createElement("div"),n=document.createElement("div");r.style.cssText="display:inline-block;overflow:hidden;position:relative;width:300px;height:150px;",n.style.cssText="position:absolute;left:0;top:0;",t.appendChild(r),this._vmlRoot=n,this._vmlViewport=r,this.resize();var i=e.delFromStorage,o=e.addToStorage;e.delFromStorage=function(t){i.call(e,t),t&&t.onRemove&&t.onRemove(n)},e.addToStorage=function(t){t.onAdd&&t.onAdd(n),o.call(e,t)},this._firstPaint=!0}s.prototype={constructor:s,getType:function(){return"vml"},getViewportRoot:function(){return this._vmlViewport},getViewportRootOffset:function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},refresh:function(){var t=this.storage.getDisplayList(!0,!0);this._paintList(t)},_paintList:function(t){for(var e=this._vmlRoot,r=0;r<t.length;r++){var n=t[r];n.invisible||n.ignore?(n.__alreadyNotVisible||n.onRemove(e),n.__alreadyNotVisible=!0):(n.__alreadyNotVisible&&n.onAdd(e),n.__alreadyNotVisible=!1,n.__dirty&&(n.beforeBrush&&n.beforeBrush(),(n.brushVML||n.brush).call(n,e),n.afterBrush&&n.afterBrush())),n.__dirty=!1}this._firstPaint&&(this._vmlViewport.appendChild(e),this._firstPaint=!1)},resize:function(t,e){t=null==t?this._getWidth():t,e=null==e?this._getHeight():e;if(this._width!==t||this._height!==e){this._width=t,this._height=e;var r=this._vmlViewport.style;r.width=t+"px",r.height=e+"px"}},dispose:function(){this.root.innerHTML="",this._vmlRoot=this._vmlViewport=this.storage=null},getWidth:function(){return this._width},getHeight:function(){return this._height},clear:function(){this._vmlViewport&&this.root.removeChild(this._vmlViewport)},_getWidth:function(){var t=this.root,e=t.currentStyle;return(t.clientWidth||o(e.width))-o(e.paddingLeft)-o(e.paddingRight)|0},_getHeight:function(){var t=this.root,e=t.currentStyle;return(t.clientHeight||o(e.height))-o(e.paddingTop)-o(e.paddingBottom)|0}},i(["getLayer","insertLayer","eachLayer","eachBuiltinLayer","eachOtherLayer","getLayers","modLayer","delLayer","clearLayer","toDataURL","pathToImage"],function(t){var e;s.prototype[t]=(e=t,function(){n('In IE8.0 VML mode painter not support method "'+e+'"')})});var u=s;e.exports=u},{"../core/log":116,"../core/util":119,"./core":178}],178:[function(t,e,r){var n,i=t("../core/env"),o="urn:schemas-microsoft-com:vml",a="undefined"==typeof window?null:window,s=!1,u=a&&a.document;if(u&&!i.canvasSupported)try{u.namespaces.zrvml||u.namespaces.add("zrvml",o),n=function(t){return u.createElement("<zrvml:"+t+' class="zrvml">')}}catch(t){n=function(t){return u.createElement("<"+t+' xmlns="'+o+'" class="zrvml">')}}r.doc=u,r.createNode=function(t){return n(t)},r.initVML=function(){if(!s&&u){s=!0;var t=u.styleSheets;t.length<31?u.createStyleSheet().addRule(".zrvml","behavior:url(#default#VML)"):t[0].addRule(".zrvml","behavior:url(#default#VML)")}}},{"../core/env":113}],179:[function(t,e,r){var n=t("../core/env"),q=t("../core/vector").applyTransform,i=t("../core/BoundingRect"),B=t("../tool/color"),E=t("../contain/text"),k=t("../graphic/helper/text"),o=t("../graphic/mixin/RectText"),a=t("../graphic/Displayable"),s=t("../graphic/Image"),u=t("../graphic/Text"),l=t("../graphic/Path"),h=t("../core/PathProxy"),M=t("../graphic/Gradient"),z=t("./core"),U=h.CMD,H=Math.round,W=Math.sqrt,c=Math.abs,G=Math.cos,V=Math.sin,X=Math.max;if(!n.canvasSupported){function Y(t){t.style.cssText="position:absolute;left:0;top:0;width:1px;height:1px;",t.coordsize=Q+","+Q,t.coordorigin="0,0"}function j(t,e,r){return"rgb("+[t,e,r].join(",")+")"}function J(t,e){e&&t&&e.parentNode!==t&&t.appendChild(e)}function f(t,e){e&&t&&e.parentNode===t&&t.removeChild(e)}function K(t,e,r){return 1e5*(parseFloat(t)||0)+1e3*(parseFloat(e)||0)+r}function C(t,e){return"string"==typeof t?0<=t.lastIndexOf("%")?parseFloat(t)/100*e:parseFloat(t):t}function F(t,e,r){var n=B.parse(e);r=+r,isNaN(r)&&(r=1),n&&(t.color=j(n[0],n[1],n[2]),t.opacity=r*n[3])}function T(t,e,r,n){var i,o,a="fill"===e,s=t.getElementsByTagName(e)[0];null!=r[e]&&"none"!==r[e]&&(a||!a&&r.lineWidth)?(t[a?"filled":"stroked"]="true",r[e]instanceof M&&f(t,s),s=s||z.createNode(e),a?function(t,e,r){var n,i,o=e.fill;if(null!=o)if(o instanceof M){var a,s=0,u=[0,0],l=0,h=1,c=r.getBoundingRect(),f=c.width,d=c.height;if("linear"===o.type){a="gradient";var p=r.transform,g=[o.x*f,o.y*d],v=[o.x2*f,o.y2*d];p&&(q(g,g,p),q(v,v,p));var m=v[0]-g[0],y=v[1]-g[1];(s=180*Math.atan2(m,y)/Math.PI)<0&&(s+=360),s<1e-6&&(s=0)}else{a="gradientradial";g=[o.x*f,o.y*d],p=r.transform;var b=r.scale,w=f,_=d;u=[(g[0]-c.x)/w,(g[1]-c.y)/_],p&&q(g,g,p),w/=b[0]*Q,_/=b[1]*Q;var x=X(w,_);l=0/x,h=2*o.r/x-l}var A=o.colorStops.slice();A.sort(function(t,e){return t.offset-e.offset});for(var L=A.length,S=[],N=[],P=0;P<L;P++){var E=A[P],k=(n=E.color,i=B.parse(n),[j(i[0],i[1],i[2]),i[3]]);N.push(E.offset*h+l+" "+k[0]),0!==P&&P!==L-1||S.push(k)}if(2<=L){var C=S[0][0],T=S[1][0],O=S[0][1]*e.opacity,I=S[1][1]*e.opacity;t.type=a,t.method="none",t.focus="100%",t.angle=s,t.color=C,t.color2=T,t.colors=N.join(","),t.opacity=I,t.opacity2=O}"radial"===a&&(t.focusposition=u.join(","))}else F(t,o,e.opacity)}(s,r,n):(i=s,null!=(o=r).lineDash&&(i.dashstyle=o.lineDash.join(" ")),null==o.stroke||o.stroke instanceof M||F(i,o.stroke,o.opacity)),J(t,s)):(t[a?"filled":"stroked"]="false",f(t,s))}var $="progid:DXImageTransform.Microsoft",Q=21600,Z=10800,tt=[[],[],[]];l.prototype.brushVML=function(t){var e=this.style,r=this._vmlEl;r||(r=z.createNode("shape"),Y(r),this._vmlEl=r),T(r,"fill",e,this),T(r,"stroke",e,this);var n=this.transform,i=null!=n,o=r.getElementsByTagName("stroke")[0];if(o){var a=e.lineWidth;if(i&&!e.strokeNoScale){var s=n[0]*n[3]-n[1]*n[2];a*=W(c(s))}o.weight=a+"px"}var u=this.path||(this.path=new h);this.__dirtyPath&&(u.beginPath(),u.subPixelOptimize=!1,this.buildPath(u,this.shape),u.toStatic(),this.__dirtyPath=!1),r.path=function(t,e){var r,n,i,o,a,s,u=U.M,l=U.C,h=U.L,c=U.A,f=U.Q,d=[],p=t.data,g=t.len();for(o=0;o<g;){switch(n="",r=0,i=p[o++]){case u:n=" m ",r=1,a=p[o++],s=p[o++],tt[0][0]=a,tt[0][1]=s;break;case h:n=" l ",r=1,a=p[o++],s=p[o++],tt[0][0]=a,tt[0][1]=s;break;case f:case l:n=" c ",r=3;var v,m,y=p[o++],b=p[o++],w=p[o++],_=p[o++];i===f?(w=((v=w)+2*y)/3,_=((m=_)+2*b)/3,y=(a+2*y)/3,b=(s+2*b)/3):(v=p[o++],m=p[o++]),tt[0][0]=y,tt[0][1]=b,tt[1][0]=w,tt[1][1]=_,a=tt[2][0]=v,s=tt[2][1]=m;break;case c:var x=0,A=0,L=1,S=1,N=0;e&&(x=e[4],A=e[5],L=W(e[0]*e[0]+e[1]*e[1]),S=W(e[2]*e[2]+e[3]*e[3]),N=Math.atan2(-e[1]/S,e[0]/L));var P=p[o++],E=p[o++],k=p[o++],C=p[o++],T=p[o++]+N,O=p[o++]+T+N;o++;var I=p[o++],B=P+G(T)*k,M=E+V(T)*C,j=(y=P+G(O)*k,b=E+V(O)*C,I?" wa ":" at ");Math.abs(B-y)<1e-4&&(.01<Math.abs(O-T)?I&&(B+=.0125):Math.abs(M-E)<1e-4?I&&B<P||!I&&P<B?b-=.0125:b+=.0125:I&&M<E||!I&&E<M?y+=.0125:y-=.0125),d.push(j,H(((P-k)*L+x)*Q-Z),",",H(((E-C)*S+A)*Q-Z),",",H(((P+k)*L+x)*Q-Z),",",H(((E+C)*S+A)*Q-Z),",",H((B*L+x)*Q-Z),",",H((M*S+A)*Q-Z),",",H((y*L+x)*Q-Z),",",H((b*S+A)*Q-Z)),a=y,s=b;break;case U.R:var F=tt[0],R=tt[1];F[0]=p[o++],F[1]=p[o++],R[0]=F[0]+p[o++],R[1]=F[1]+p[o++],e&&(q(F,F,e),q(R,R,e)),F[0]=H(F[0]*Q-Z),R[0]=H(R[0]*Q-Z),F[1]=H(F[1]*Q-Z),R[1]=H(R[1]*Q-Z),d.push(" m ",F[0],",",F[1]," l ",R[0],",",F[1]," l ",R[0],",",R[1]," l ",F[0],",",R[1]);break;case U.Z:d.push(" x ")}if(0<r){d.push(n);for(var D=0;D<r;D++){var z=tt[D];e&&q(z,z,e),d.push(H(z[0]*Q-Z),",",H(z[1]*Q-Z),D<r-1?",":"")}}}return d.join("")}(u,this.transform),r.style.zIndex=K(this.zlevel,this.z,this.z2),J(t,r),null!=e.text?this.drawRectText(t,this.getBoundingRect()):this.removeRectText(t)},l.prototype.onRemove=function(t){f(t,this._vmlEl),this.removeRectText(t)},l.prototype.onAdd=function(t){J(t,this._vmlEl),this.appendRectText(t)};s.prototype.brushVML=function(t){var e,r,n,i=this.style,o=i.image;if("object"==typeof(n=o)&&n.tagName&&"IMG"===n.tagName.toUpperCase()){var a=o.src;if(a===this._imageSrc)e=this._imageWidth,r=this._imageHeight;else{var s=o.runtimeStyle,u=s.width,l=s.height;s.width="auto",s.height="auto",e=o.width,r=o.height,s.width=u,s.height=l,this._imageSrc=a,this._imageWidth=e,this._imageHeight=r}o=a}else o===this._imageSrc&&(e=this._imageWidth,r=this._imageHeight);if(o){var h=i.x||0,c=i.y||0,f=i.width,d=i.height,p=i.sWidth,g=i.sHeight,v=i.sx||0,m=i.sy||0,y=p&&g,b=this._vmlEl;b||(b=z.doc.createElement("div"),Y(b),this._vmlEl=b);var w,_=b.style,x=!1,A=1,L=1;if(this.transform&&(w=this.transform,A=W(w[0]*w[0]+w[1]*w[1]),L=W(w[2]*w[2]+w[3]*w[3]),x=w[1]||w[2]),x){var S=[h,c],N=[h+f,c],P=[h,c+d],E=[h+f,c+d];q(S,S,w),q(N,N,w),q(P,P,w),q(E,E,w);var k=X(S[0],N[0],P[0],E[0]),C=X(S[1],N[1],P[1],E[1]),T=[];T.push("M11=",w[0]/A,",","M12=",w[2]/L,",","M21=",w[1]/A,",","M22=",w[3]/L,",","Dx=",H(h*A+w[4]),",","Dy=",H(c*L+w[5])),_.padding="0 "+H(k)+"px "+H(C)+"px 0",_.filter=$+".Matrix("+T.join("")+", SizingMethod=clip)"}else w&&(h=h*A+w[4],c=c*L+w[5]),_.filter="",_.left=H(h)+"px",_.top=H(c)+"px";var O=this._imageEl,I=this._cropEl;O||(O=z.doc.createElement("div"),this._imageEl=O);var B=O.style;if(y){if(e&&r)B.width=H(A*e*f/p)+"px",B.height=H(L*r*d/g)+"px";else{var M=new Image,j=this;M.onload=function(){M.onload=null,e=M.width,r=M.height,B.width=H(A*e*f/p)+"px",B.height=H(L*r*d/g)+"px",j._imageWidth=e,j._imageHeight=r,j._imageSrc=o},M.src=o}I||((I=z.doc.createElement("div")).style.overflow="hidden",this._cropEl=I);var F=I.style;F.width=H((f+v*f/p)*A),F.height=H((d+m*d/g)*L),F.filter=$+".Matrix(Dx="+-v*f/p*A+",Dy="+-m*d/g*L+")",I.parentNode||b.appendChild(I),O.parentNode!==I&&I.appendChild(O)}else B.width=H(A*f)+"px",B.height=H(L*d)+"px",b.appendChild(O),I&&I.parentNode&&(b.removeChild(I),this._cropEl=null);var R="",D=i.opacity;D<1&&(R+=".Alpha(opacity="+H(100*D)+") "),R+=$+".AlphaImageLoader(src="+o+", SizingMethod=scale)",B.filter=R,b.style.zIndex=K(this.zlevel,this.z,this.z2),J(t,b),null!=i.text&&this.drawRectText(t,this.getBoundingRect())}},s.prototype.onRemove=function(t){f(t,this._vmlEl),this._vmlEl=null,this._cropEl=null,this._imageEl=null,this.removeRectText(t)},s.prototype.onAdd=function(t){J(t,this._vmlEl),this.appendRectText(t)};var d,O="normal",I={},R=0,D=document.createElement("div");E.$override("measureText",function(t,e){var r=z.doc;d||((d=r.createElement("div")).style.cssText="position:absolute;top:-20000px;left:0;padding:0;margin:0;border:none;white-space:pre;",z.doc.body.appendChild(d));try{d.style.font=e}catch(t){}return d.innerHTML="",d.appendChild(r.createTextNode(t)),{width:d.offsetWidth}});function p(t,e,r,n){var i=this.style;this.__dirty&&k.normalizeTextStyle(i,!0);var o=i.text;if(null!=o&&(o+=""),o){if(i.rich){var a=E.parseRichText(o,i);o=[];for(var s=0;s<a.lines.length;s++){for(var u=a.lines[s].tokens,l=[],h=0;h<u.length;h++)l.push(u[h].text);o.push(l.join(""))}o=o.join("\n")}var c,f,d=i.textAlign,p=i.textVerticalAlign,g=function(t){var e=I[t];if(!e){100<R&&(R=0,I={});var r,n=D.style;try{n.font=t,r=n.fontFamily.split(",")[0]}catch(t){}e={style:n.fontStyle||O,variant:n.fontVariant||O,weight:n.fontWeight||O,size:0|parseFloat(n.fontSize||12),family:r||"Microsoft YaHei"},I[t]=e,R++}return e}(i.font),v=g.style+" "+g.variant+" "+g.weight+" "+g.size+'px "'+g.family+'"';r=r||E.getBoundingRect(o,v,d,p,i.textPadding,i.textLineHeight);var m=this.transform;if(m&&!n&&(et.copy(e),et.applyTransform(m),e=et),n)c=e.x,f=e.y;else{var y=i.textPosition,b=i.textDistance;if(y instanceof Array)c=e.x+C(y[0],e.width),f=e.y+C(y[1],e.height),d=d||"left";else{var w=E.adjustTextPositionOnRect(y,e,b);c=w.x,f=w.y,d=d||w.textAlign,p=p||w.textVerticalAlign}}c=E.adjustTextX(c,r.width,d),f=E.adjustTextY(f,r.height,p),f+=r.height/2;var _,x,A,L=z.createNode,S=this._textVmlEl;S?x=(_=(A=S.firstChild).nextSibling).nextSibling:(S=L("line"),_=L("path"),x=L("textpath"),A=L("skew"),x.style["v-text-align"]="left",Y(S),_.textpathok=!0,x.on=!0,S.from="0 0",S.to="1000 0.05",J(S,A),J(S,_),J(S,x),this._textVmlEl=S);var N=[c,f],P=S.style;m&&n?(q(N,N,m),A.on=!0,A.matrix=m[0].toFixed(3)+","+m[2].toFixed(3)+","+m[1].toFixed(3)+","+m[3].toFixed(3)+",0,0",A.offset=(H(N[0])||0)+","+(H(N[1])||0),A.origin="0 0",P.left="0px",P.top="0px"):(A.on=!1,P.left=H(c)+"px",P.top=H(f)+"px"),x.string=String(o).replace(/&/g,"&amp;").replace(/"/g,"&quot;");try{x.style.font=v}catch(t){}T(S,"fill",{fill:i.textFill,opacity:i.opacity},this),T(S,"stroke",{stroke:i.textStroke,opacity:i.opacity,lineDash:i.lineDash},this),S.style.zIndex=K(this.zlevel,this.z,this.z2),J(t,S)}}function g(t){f(t,this._textVmlEl),this._textVmlEl=null}function v(t){J(t,this._textVmlEl)}for(var et=new i,m=[o,a,s,l,u],y=0;y<m.length;y++){var b=m[y].prototype;b.drawRectText=p,b.removeRectText=g,b.appendRectText=v}u.prototype.brushVML=function(t){var e=this.style;null!=e.text?this.drawRectText(t,{x:e.x||0,y:e.y||0,width:0,height:0},this.getBoundingRect(),!0):this.removeRectText(t)},u.prototype.onRemove=function(t){this.removeRectText(t)},u.prototype.onAdd=function(t){this.appendRectText(t)}}},{"../contain/text":102,"../core/BoundingRect":106,"../core/PathProxy":109,"../core/env":113,"../core/vector":120,"../graphic/Displayable":124,"../graphic/Gradient":125,"../graphic/Image":126,"../graphic/Path":129,"../graphic/Text":133,"../graphic/helper/text":143,"../graphic/mixin/RectText":144,"../tool/color":173,"./core":178}],180:[function(t,e,r){t("./graphic"),(0,t("../zrender").registerPainter)("vml",t("./Painter"))},{"../zrender":181,"./Painter":177,"./graphic":179}],181:[function(t,e,r){var n=t("./core/guid"),h=t("./core/env"),c=t("./core/util"),f=t("./Handler"),d=t("./Storage"),i=t("./Painter"),p=t("./animation/Animation"),g=t("./dom/HandlerProxy"),v=!h.canvasSupported,m={canvas:i},o={};function a(t,e,r){r=r||{},this.dom=e,this.id=t;var n=this,i=new d,o=r.renderer;if(v){if(!m.vml)throw new Error("You need to require 'zrender/vml/vml' to support IE8");o="vml"}else o&&m[o]||(o="canvas");var a=new m[o](e,i,r,t);this.storage=i,this.painter=a;var s=h.node||h.worker?null:new g(a.getViewportRoot());this.handler=new f(i,a,s,a.root),this.animation=new p({stage:{update:c.bind(this.flush,this)}}),this.animation.start(),this._needsRefresh;var u=i.delFromStorage,l=i.addToStorage;i.delFromStorage=function(t){u.call(i,t),t&&t.removeSelfFromZr(n)},i.addToStorage=function(t){l.call(i,t),t.addSelfToZr(n)}}a.prototype={constructor:a,getId:function(){return this.id},add:function(t){this.storage.addRoot(t),this._needsRefresh=!0},remove:function(t){this.storage.delRoot(t),this._needsRefresh=!0},configLayer:function(t,e){this.painter.configLayer&&this.painter.configLayer(t,e),this._needsRefresh=!0},setBackgroundColor:function(t){this.painter.setBackgroundColor&&this.painter.setBackgroundColor(t),this._needsRefresh=!0},refreshImmediately:function(){this._needsRefresh=!1,this.painter.refresh(),this._needsRefresh=!1},refresh:function(){this._needsRefresh=!0},flush:function(){var t;this._needsRefresh&&(t=!0,this.refreshImmediately()),this._needsRefreshHover&&(t=!0,this.refreshHoverImmediately()),t&&this.trigger("rendered")},addHover:function(t,e){if(this.painter.addHover){var r=this.painter.addHover(t,e);return this.refreshHover(),r}},removeHover:function(t){this.painter.removeHover&&(this.painter.removeHover(t),this.refreshHover())},clearHover:function(){this.painter.clearHover&&(this.painter.clearHover(),this.refreshHover())},refreshHover:function(){this._needsRefreshHover=!0},refreshHoverImmediately:function(){this._needsRefreshHover=!1,this.painter.refreshHover&&this.painter.refreshHover()},resize:function(t){t=t||{},this.painter.resize(t.width,t.height),this.handler.resize()},clearAnimation:function(){this.animation.clear()},getWidth:function(){return this.painter.getWidth()},getHeight:function(){return this.painter.getHeight()},pathToImage:function(t,e){return this.painter.pathToImage(t,e)},setCursorStyle:function(t){this.handler.setCursorStyle(t)},findHover:function(t,e){return this.handler.findHover(t,e)},on:function(t,e,r){this.handler.on(t,e,r)},off:function(t,e){this.handler.off(t,e)},trigger:function(t,e){this.handler.trigger(t,e)},clear:function(){this.storage.delRoot(),this.painter.clear()},dispose:function(){var t;this.animation.stop(),this.clear(),this.storage.dispose(),this.painter.dispose(),this.handler.dispose(),this.animation=this.storage=this.painter=this.handler=null,t=this.id,delete o[t]}},r.version="4.0.7",r.init=function(t,e){var r=new a(n(),t,e);return o[r.id]=r},r.dispose=function(t){if(t)t.dispose();else{for(var e in o)o.hasOwnProperty(e)&&o[e].dispose();o={}}return this},r.getInstance=function(t){return o[t]},r.registerPainter=function(t,e){m[t]=e}},{"./Handler":87,"./Painter":89,"./Storage":90,"./animation/Animation":91,"./core/env":113,"./core/guid":115,"./core/util":119,"./dom/HandlerProxy":121}],182:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.format=r.def=void 0;function n(r){void 0===r&&(r=300);var n={};return Object.keys(i).forEach(function(t){n[t]=[];var e=i[t][0]/25.4*r;n[t].push(Math.round(e)),e=i[t][1]/25.4*r,n[t].push(Math.round(e))}),n}var i={a0:[841,1189],a1:[594,841],a2:[420,584],a3:[297,420],a4:[210,297],a5:[148,210],a6:[105,148],a7:[74,105],a8:[52,74],a9:[37,52],a10:[26,37],b0:[1e3,1414],b1:[707,1e3],b2:[500,707],b3:[353,500],b4:[250,353],b5:[176,250],b6:[125,276],b7:[88,125],b8:[62,88],b9:[44,62],b10:[31,44],c0:[917,1297],c1:[648,917],c2:[458,648],c3:[324,458],c4:[229,324],c5:[162,229],c6:[114,162],c7:[81,114],c8:[57,81],c9:[40,57],c10:[28,40]};r.default=n,r.def=n(300);r.format=function(t,e,r){return void 0===e&&(e=300),void 0===r&&(r="mm"),"mm"==r?t/25.4*e:"cm"==r?t/2.54*e:"px"==r?t:void 0}},{}],183:[function(t,e,r){"use strict";var o=this&&this.__awaiter||function(t,a,s,u){return new(s=s||Promise)(function(r,e){function n(t){try{o(u.next(t))}catch(t){e(t)}}function i(t){try{o(u.throw(t))}catch(t){e(t)}}function o(t){var e;t.done?r(t.value):((e=t.value)instanceof s?e:new s(function(t){t(e)})).then(n,i)}o((u=u.apply(t,a||[])).next())})},a=this&&this.__generator||function(r,n){var i,o,a,s,u={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return s={next:t(0),throw:t(1),return:t(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function t(e){return function(t){return function(e){if(i)throw new TypeError("Generator is already executing.");for(;s&&e[s=0]&&(u=0),u;)try{if(i=1,o&&(a=2&e[0]?o.return:e[0]?o.throw||((a=o.return)&&a.call(o),0):o.next)&&!(a=a.call(o,e[1])).done)return a;switch(o=0,a&&(e=[2&e[0],a.value]),e[0]){case 0:case 1:a=e;break;case 4:return u.label++,{value:e[1],done:!1};case 5:u.label++,o=e[1],e=[0];continue;case 7:e=u.ops.pop(),u.trys.pop();continue;default:if(!(a=0<(a=u.trys).length&&a[a.length-1])&&(6===e[0]||2===e[0])){u=0;continue}if(3===e[0]&&(!a||e[1]>a[0]&&e[1]<a[3])){u.label=e[1];break}if(6===e[0]&&u.label<a[1]){u.label=a[1],a=e;break}if(a&&u.label<a[2]){u.label=a[2],u.ops.push(e);break}a[2]&&u.ops.pop(),u.trys.pop();continue}e=n.call(r,u)}catch(t){e=[6,t],o=0}finally{i=a=0}if(5&e[0])throw e[1];return{value:e[0]?e[1]:void 0,done:!0}}([e,t])}}};Object.defineProperty(r,"__esModule",{value:!0});var n=(i.plugin=function(t,e){this._plugins[t]||(this._plugins[t]=[e])},i.apply=function(n,i){return o(this,void 0,void 0,function(){var e,r;return a(this,function(t){switch(t.label){case 0:if(!(n&&n.type&&this._plugins[n.type]))return[3,5];e=this._plugins[n.type],r=0,t.label=1;case 1:return r<e.length?[4,e[r].apply(n,[i])]:[3,4];case 2:t.sent(),t.label=3;case 3:return r++,[3,1];case 4:return[3,6];case 5:console.log("未知的组件"),t.label=6;case 6:return[2]}})})},i._plugins={},i);function i(){}r.default=n},{}],184:[function(t,e,r){"use strict";var n=this&&this.__awaiter||function(t,a,s,u){return new(s=s||Promise)(function(r,e){function n(t){try{o(u.next(t))}catch(t){e(t)}}function i(t){try{o(u.throw(t))}catch(t){e(t)}}function o(t){var e;t.done?r(t.value):((e=t.value)instanceof s?e:new s(function(t){t(e)})).then(n,i)}o((u=u.apply(t,a||[])).next())})},s=this&&this.__generator||function(r,n){var i,o,a,s,u={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return s={next:t(0),throw:t(1),return:t(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function t(e){return function(t){return function(e){if(i)throw new TypeError("Generator is already executing.");for(;s&&e[s=0]&&(u=0),u;)try{if(i=1,o&&(a=2&e[0]?o.return:e[0]?o.throw||((a=o.return)&&a.call(o),0):o.next)&&!(a=a.call(o,e[1])).done)return a;switch(o=0,a&&(e=[2&e[0],a.value]),e[0]){case 0:case 1:a=e;break;case 4:return u.label++,{value:e[1],done:!1};case 5:u.label++,o=e[1],e=[0];continue;case 7:e=u.ops.pop(),u.trys.pop();continue;default:if(!(a=0<(a=u.trys).length&&a[a.length-1])&&(6===e[0]||2===e[0])){u=0;continue}if(3===e[0]&&(!a||e[1]>a[0]&&e[1]<a[3])){u.label=e[1];break}if(6===e[0]&&u.label<a[1]){u.label=a[1],a=e;break}if(a&&u.label<a[2]){u.label=a[2],u.ops.push(e);break}a[2]&&u.ops.pop(),u.trys.pop();continue}e=n.call(r,u)}catch(t){e=[6,t],o=0}finally{i=a=0}if(5&e[0])throw e[1];return{value:e[0]?e[1]:void 0,done:!0}}([e,t])}}};Object.defineProperty(r,"__esModule",{value:!0});var u=t("jsbarcode"),l=t("../utils");r.default=function(e){return n(this,void 0,void 0,function(){var i,o,a=this;return s(this,function(t){switch(t.label){case 0:return(this._opt||function(){this._opt={format:this.format||"CODE128",width:this.width,height:this.height||100,displayValue:this.displayValue||!0,text:null,fontOptions:this.fontOptions||"",font:this.font||"monospace",textAlign:this.textAlign||"center",textPosition:this.textPosition||"bottom",textMargin:this.textMargin||2,fontSize:this.fontSize||20,background:this.background||"#ffffff",lineColor:this.lineColor||"#000000",margin:this.margin||10,marginTop:this.marginTop||null,marginBottom:this.marginBottom||null,marginLeft:this.marginLeft||null,marginRight:this.marginRight||null,flat:this.flat||!1,valid:this.valid||function(t){}},this._img=document.createElement("img")}.apply(this),this._opt.text=e||"",""==this._opt.text)?[2]:(i=(0,l.format)({image:null,x:this.x,y:this.y,width:this.width,height:this.height||10,margin:this.margin,fontSize:this.fontSize},[],this.dpi,this.unit),this._opt.fontSize=i.fontSize||20,this._opt.margin=i.margin||10,this._opt.height=i.height-2*i.margin-this._opt.fontSize,u(this._img,e,this._opt),o=this._img.src,[4,new Promise(function(e,t){var r=document.createElement("img"),n=a;r.src=o,r.onload=function(t){i.image=o,i.width=r.width,n.img(i),e(i)}})]);case 1:return t.sent(),[2]}})})}},{"../utils":189,jsbarcode:6}],185:[function(t,e,r){"use strict";var n=this&&this.__awaiter||function(t,a,s,u){return new(s=s||Promise)(function(r,e){function n(t){try{o(u.next(t))}catch(t){e(t)}}function i(t){try{o(u.throw(t))}catch(t){e(t)}}function o(t){var e;t.done?r(t.value):((e=t.value)instanceof s?e:new s(function(t){t(e)})).then(n,i)}o((u=u.apply(t,a||[])).next())})},i=this&&this.__generator||function(r,n){var i,o,a,s,u={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return s={next:t(0),throw:t(1),return:t(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function t(e){return function(t){return function(e){if(i)throw new TypeError("Generator is already executing.");for(;s&&e[s=0]&&(u=0),u;)try{if(i=1,o&&(a=2&e[0]?o.return:e[0]?o.throw||((a=o.return)&&a.call(o),0):o.next)&&!(a=a.call(o,e[1])).done)return a;switch(o=0,a&&(e=[2&e[0],a.value]),e[0]){case 0:case 1:a=e;break;case 4:return u.label++,{value:e[1],done:!1};case 5:u.label++,o=e[1],e=[0];continue;case 7:e=u.ops.pop(),u.trys.pop();continue;default:if(!(a=0<(a=u.trys).length&&a[a.length-1])&&(6===e[0]||2===e[0])){u=0;continue}if(3===e[0]&&(!a||e[1]>a[0]&&e[1]<a[3])){u.label=e[1];break}if(6===e[0]&&u.label<a[1]){u.label=a[1],a=e;break}if(a&&u.label<a[2]){u.label=a[2],u.ops.push(e);break}a[2]&&u.ops.pop(),u.trys.pop();continue}e=n.call(r,u)}catch(t){e=[6,t],o=0}finally{i=a=0}if(5&e[0])throw e[1];return{value:e[0]?e[1]:void 0,done:!0}}([e,t])}}};Object.defineProperty(r,"__esModule",{value:!0});var o=t("../utils");r.default=function(r){return n(this,void 0,void 0,function(){var e;return i(this,function(t){return r&&(this._opt=Object.assign({},{style:{image:r}}),this._opt={image:r},this._opt.x=this.x||0,this._opt.y=this.y||0,this._opt.width=this.width||this.height||0,this._opt.height=this.height||this.width||0,this.fixed?this.element||(e=o.format(this._opt,[],this.dpi,this.unit),this.element=o.Image(e),this.add(this.element)):(e=o.format(this._opt,[],this.dpi,this.unit),this.img(e))),[2]})})}},{"../utils":189}],186:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var u=t("../utils");r.default=function(){this.orientation=this.orientation||"l",this.list=this.list||[],0<this.list.length&&(this.remove(this.list),this.list.splice(0,this.list.length));var t=this.x||0,e=this.y||0,r=this.length||0;if(this.width){var n=this.width,i=this.length;"l"==this.orientation&&(n=this.length,i=this.width);s=(0,u.format)({x:t,y:e,width:n,height:i},[],this.dpi,this.unit);this.color&&(s.style={stroke:this.color,fill:this.color}),this.list.push((0,u.Rect)(s)),this.add(this.list)}else{var o=t,a=e;"l"==this.orientation?o=t+r:a=e+r;var s=(0,u.format)({x1:t,x2:o,y1:e,y2:a},[],this.dpi,this.unit);this.color&&(s.style={stroke:this.color}),this.list.push((0,u.Line)(s)),this.add(this.list)}}},{"../utils":189}],187:[function(t,e,r){"use strict";var n=this&&this.__awaiter||function(t,a,s,u){return new(s=s||Promise)(function(r,e){function n(t){try{o(u.next(t))}catch(t){e(t)}}function i(t){try{o(u.throw(t))}catch(t){e(t)}}function o(t){var e;t.done?r(t.value):((e=t.value)instanceof s?e:new s(function(t){t(e)})).then(n,i)}o((u=u.apply(t,a||[])).next())})},i=this&&this.__generator||function(r,n){var i,o,a,s,u={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return s={next:t(0),throw:t(1),return:t(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function t(e){return function(t){return function(e){if(i)throw new TypeError("Generator is already executing.");for(;s&&e[s=0]&&(u=0),u;)try{if(i=1,o&&(a=2&e[0]?o.return:e[0]?o.throw||((a=o.return)&&a.call(o),0):o.next)&&!(a=a.call(o,e[1])).done)return a;switch(o=0,a&&(e=[2&e[0],a.value]),e[0]){case 0:case 1:a=e;break;case 4:return u.label++,{value:e[1],done:!1};case 5:u.label++,o=e[1],e=[0];continue;case 7:e=u.ops.pop(),u.trys.pop();continue;default:if(!(a=0<(a=u.trys).length&&a[a.length-1])&&(6===e[0]||2===e[0])){u=0;continue}if(3===e[0]&&(!a||e[1]>a[0]&&e[1]<a[3])){u.label=e[1];break}if(6===e[0]&&u.label<a[1]){u.label=a[1],a=e;break}if(a&&u.label<a[2]){u.label=a[2],u.ops.push(e);break}a[2]&&u.ops.pop(),u.trys.pop();continue}e=n.call(r,u)}catch(t){e=[6,t],o=0}finally{i=a=0}if(5&e[0])throw e[1];return{value:e[0]?e[1]:void 0,done:!0}}([e,t])}}};Object.defineProperty(r,"__esModule",{value:!0});var o=t("qrcode"),a=t("../utils");r.default=function(r){return n(this,void 0,void 0,function(){var e;return i(this,function(t){switch(t.label){case 0:return""!=r&&r?(this.options=(0,a.format)({text:r||"https://github.com/XXllXX/",x:this.x,y:this.y,width:this.width||20,height:this.width||20,colorDark:this.colorDark||"#000000",colorLight:this.colorLight||"#ffffff",correctLevel:this.correctLevel||"H"},[],this.dpi,this.unit),[4,o.toDataURL(this.options.text,this.options)]):[2];case 1:return e=t.sent(),this.options.image=e,this.img(this.options),[2]}})})}},{"../utils":189,qrcode:57}],188:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var l=t("../utils");r.default=function(t){if(this.orientation=this.orientation||"l",this.list=this.list||[],0<this.list.length&&(this.remove(this.list),this.list.splice(0,this.list.length)),""!=(t||"")){var e=this.x||0,r=this.y||0,n=this.fontSize||20,i=this.space||0;if(0!=i)for(var o=0;o<t.length;o++){var a=t.charAt(o);"l"==this.orientation?e=e+o*n+o*i:r=r+o*n+o*i;var s=(0,l.format)({text:a,x:e,y:r,fontSize:n},["x","y","fontSize"],this.dpi,this.unit);this.fontFamily&&(s.fontFamily=this.fontFamily),this.color&&(s.textFill=this.color),this.list.push((0,l.Text)(s))}else{if("p"==this.orientation)t=t.match(/.{1}/g).join("\n");else if(this.maxWidth){var u=(0,l.format)({text:t,x:e,y:r,fontSize:n,maxWidth:this.maxWidth},["x","y","fontSize","maxWidth"],this.dpi,this.unit);t=(0,l.fommatText)(t,u.fontSize,u.maxWidth)}s=(0,l.format)({text:t,x:e,y:r,fontSize:n},["x","y","fontSize"],this.dpi,this.unit);this.fontFamily&&(s.fontFamily=this.fontFamily),this.color&&(s.textFill=this.color),this.list.push((0,l.Text)(s))}this.add(this.list)}}},{"../utils":189}],189:[function(t,e,r){"use strict";var o=this&&this.__awaiter||function(t,a,s,u){return new(s=s||Promise)(function(r,e){function n(t){try{o(u.next(t))}catch(t){e(t)}}function i(t){try{o(u.throw(t))}catch(t){e(t)}}function o(t){var e;t.done?r(t.value):((e=t.value)instanceof s?e:new s(function(t){t(e)})).then(n,i)}o((u=u.apply(t,a||[])).next())})},a=this&&this.__generator||function(r,n){var i,o,a,s,u={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return s={next:t(0),throw:t(1),return:t(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function t(e){return function(t){return function(e){if(i)throw new TypeError("Generator is already executing.");for(;s&&e[s=0]&&(u=0),u;)try{if(i=1,o&&(a=2&e[0]?o.return:e[0]?o.throw||((a=o.return)&&a.call(o),0):o.next)&&!(a=a.call(o,e[1])).done)return a;switch(o=0,a&&(e=[2&e[0],a.value]),e[0]){case 0:case 1:a=e;break;case 4:return u.label++,{value:e[1],done:!1};case 5:u.label++,o=e[1],e=[0];continue;case 7:e=u.ops.pop(),u.trys.pop();continue;default:if(!(a=0<(a=u.trys).length&&a[a.length-1])&&(6===e[0]||2===e[0])){u=0;continue}if(3===e[0]&&(!a||e[1]>a[0]&&e[1]<a[3])){u.label=e[1];break}if(6===e[0]&&u.label<a[1]){u.label=a[1],a=e;break}if(a&&u.label<a[2]){u.label=a[2],u.ops.push(e);break}a[2]&&u.ops.pop(),u.trys.pop();continue}e=n.call(r,u)}catch(t){e=[6,t],o=0}finally{i=a=0}if(5&e[0])throw e[1];return{value:e[0]?e[1]:void 0,done:!0}}([e,t])}}};Object.defineProperty(r,"__esModule",{value:!0}),r.format=r.fommatText=r.add=r.remove=r.UpdateImageSize=r.GetImageSize=r.Image=r.Text=r.Rect=r.Line=void 0;var s=t("zrender"),n={position:[0,0],style:{text:null,textFill:null,fontSize:36,fontFamily:"微软雅黑",fontWeight:null,fontStyle:null}},i={style:{image:null,x:0,y:0,width:0,height:0}},u={position:[0,0],style:{},shape:{x1:0,y1:0,x2:0,y2:0,percent:1}},l={position:[0,0],style:{},shape:{x:0,y:0,width:0,height:0}},h=new XMLHttpRequest;h.responseType="blob";var c=document.createElement("img");function f(i){return o(this,void 0,void 0,function(){return a(this,function(t){return[2,new Promise(function(e,t){h.open("GET",i,!1),h.send();var r=h.response;if(200==h.status){var n=URL.createObjectURL(r);c.src=n,c.onload=function(t){e({width:c.width,height:c.height})}}else t("未找到图片!")})]})})}r.Line=function(t,e,r,n){var i=Object.assign(u,{shape:{x1:t,x2:e,y1:r,y2:n}});1==arguments.length&&(i=Object.assign(u,{shape:t,style:t.style||{}}));var o=JSON.parse(JSON.stringify(i));return new s.Line(o)},r.Rect=function(t,e,r,n){var i=Object.assign(l,{shape:{x:t,y:e,width:r,height:n}});1==arguments.length&&(i=Object.assign(u,{shape:t,style:t.style||{}}));var o=JSON.parse(JSON.stringify(i));return new s.Rect(o)},r.Text=function(t){t=Object.assign({},t);var e=Object.assign({},n);"object"==typeof t?(e.style.text=t.text||n.style.text,e.position[0]=t.x||n.position[0],e.position[1]=t.y||n.position[1],e.style.textFill=t.textFill||n.style.textFill,e.style.fontSize=t.fontSize||n.style.fontSize,e.style.fontFamily=t.fontFamily||n.style.fontFamily,e.style.fontWeight=t.fontWeight||n.style.fontWeight,e.style.fontStyle=t.fontStyle||n.style.fontStyle):((e=Object.assign(t,n)).style.text=arguments[0]||n.style.text,e.position[0]=arguments[1]||n.position[0],e.position[1]=arguments[2]||n.position[1],e.style.fontSize=arguments[3]||n.style.fontSize,e.style.fontFamily=arguments[4]||n.style.fontFamily,e.style.fontWeight=arguments[5]||n.style.fontWeight,e.style.fontStyle=arguments[6]||n.style.fontStyle);var r=JSON.parse(JSON.stringify(e));return new s.Text(r)},r.Image=function(t){var e=Object.assign({},i);"object"==typeof t?(e.style.x=t.x||i.style.x,e.style.y=t.y||i.style.y,e.style.image=t.image||i.style.image,e.style.width=t.width||i.style.width,e.style.height=t.height||i.style.height):((e=Object.assign(t,i)).style.image=t||i.style.image,e.style.x=arguments[1]||i.style.x,e.style.y=arguments[2]||i.style.y,e.style.width=arguments[3]||i.style.width,e.style.height=arguments[4]||i.style.height);var r=JSON.parse(JSON.stringify(e));return new s.Image(r)},r.GetImageSize=f,r.UpdateImageSize=function(n){return o(this,void 0,void 0,function(){var e,r;return a(this,function(t){switch(t.label){case 0:return(e=n._$eventProcessor).src?[4,f(e.src)]:[2];case 1:return(r=t.sent())?(e.style.width=r.width,e.style.height=r.height,n.attr("style",e.style),[2,r]):[2,{}]}})})},r.remove=function(e,t){t instanceof Array||(t=[t]),t.forEach(function(t){e.remove(t)})},r.add=function(e,t){t instanceof Array||(t=[t]),t.forEach(function(t){e.add(t)})},r.fommatText=function(e,t,r){var n=0,i=[];if(!e)return"";for(var o=0;o<e.length;o++)0!=(65280&e.charCodeAt(o))?n++:48<=e.charCodeAt(o)||e.charCodeAt(o)<=57?n+=.58675:97<=e.charCodeAt(o)||e.charCodeAt(o)<=122?n+=.55275:e.charCodeAt(o)<=90||65<=e.charCodeAt(o)?n+=.704:n+=.6,r/t<=n&&(i.push(o),n=0);return i.reverse().forEach(function(t){e=e.replace(e.match(new RegExp(".{"+parseInt(t)+"}"))[0],"".concat(e.match(new RegExp(".{"+parseInt(t)+"}"))[0],"\n"))}),e};r.format=function(t,e,r,n){if(void 0===r&&(r=300),void 0===n&&(n="mm"),t){var i=JSON.parse(JSON.stringify(t));if(0!=e.length)return e.forEach(function(t){if(i[t]){var e=i[t];"mm"==n?i[t]=e/25.4*r:"cm"==n?i[t]=e/2.54*r:"px"==n&&(i[t]=e)}}),i;for(var o in i)if("number"==typeof i[o]){var a=i[o];"mm"==n?i[o]=a/25.4*r:"cm"==n?i[o]=a/2.54*r:"px"==n&&(i[o]=a)}return i}return t}},{zrender:85}],190:[function(t,e,r){"use strict";var n=this&&this.__awaiter||function(t,a,s,u){return new(s=s||Promise)(function(r,e){function n(t){try{o(u.next(t))}catch(t){e(t)}}function i(t){try{o(u.throw(t))}catch(t){e(t)}}function o(t){var e;t.done?r(t.value):((e=t.value)instanceof s?e:new s(function(t){t(e)})).then(n,i)}o((u=u.apply(t,a||[])).next())})},m=this&&this.__generator||function(r,n){var i,o,a,s,u={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return s={next:t(0),throw:t(1),return:t(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function t(e){return function(t){return function(e){if(i)throw new TypeError("Generator is already executing.");for(;s&&e[s=0]&&(u=0),u;)try{if(i=1,o&&(a=2&e[0]?o.return:e[0]?o.throw||((a=o.return)&&a.call(o),0):o.next)&&!(a=a.call(o,e[1])).done)return a;switch(o=0,a&&(e=[2&e[0],a.value]),e[0]){case 0:case 1:a=e;break;case 4:return u.label++,{value:e[1],done:!1};case 5:u.label++,o=e[1],e=[0];continue;case 7:e=u.ops.pop(),u.trys.pop();continue;default:if(!(a=0<(a=u.trys).length&&a[a.length-1])&&(6===e[0]||2===e[0])){u=0;continue}if(3===e[0]&&(!a||e[1]>a[0]&&e[1]<a[3])){u.label=e[1];break}if(6===e[0]&&u.label<a[1]){u.label=a[1],a=e;break}if(a&&u.label<a[2]){u.label=a[2],u.ops.push(e);break}a[2]&&u.ops.pop(),u.trys.pop();continue}e=n.call(r,u)}catch(t){e=[6,t],o=0}finally{i=a=0}if(5&e[0])throw e[1];return{value:e[0]?e[1]:void 0,done:!0}}([e,t])}}};Object.defineProperty(r,"__esModule",{value:!0});var i=t("./plugins"),o=t("./plugins/text"),a=t("./plugins/line"),s=t("./plugins/image"),u=t("./plugins/barcode"),l=t("./plugins/qrcode"),g=t("./pageSize"),v=t("zrender"),y=t("jspdf"),b=t("./utils"),h=(w.prototype.loadDefaultPlugins=function(){0<w.plugins.length||(w.plugins.plugin("text",o.default),w.plugins.plugin("image",s.default),w.plugins.plugin("barcode",u.default),w.plugins.plugin("qrcode",l.default),w.plugins.plugin("line",a.default))},w.prototype.use=function(){},w.prototype.push=function(t){var e=t,r=arguments[1]||"A4",n=arguments[2]||"p",i=arguments[3]||"mm",o=arguments[4]||{},a=300,s=[],u=!1,l=function(t){return null},h=[];if(t instanceof Object&&(e=t.name,r=t.size||r,n=t.orientation||n,i=t.unit,a=t.dpi||300,h=t.fixed,o=t.data,u=t.multiPage||u,l=t.pageMode||l,s=t.linkTemplate||s),!w._templates[e]){var c={};c.name=e,c.size=r,c._html=document.createElement("div");var f=0,d=0;if(c.size instanceof Array)f=c.size[0],d=c.size[1];else{var p=(0,g.default)(a)[r.toLocaleLowerCase()];p=p||(0,g.default)(a).a4,"l"==n&&p.reverse(),f=p[0],d=p[1]}return f=(0,g.format)(f,a,i),d=(0,g.format)(d,a,i),c._html.style.width="".concat(f,"px"),c._html.style.height="".concat(d,"px"),c._zr=v.init(c._html),w._templates[e]={name:e,size:r,width:f,unit:i,dpi:a,height:d,orientation:n,page:c,fixed:h,data:o,multiPage:u,pageMode:l,linkTemplate:s},w._templates[e].add=function(t){(0,b.add)(this.page._zr,t)},w._templates[e].remove=function(t){(0,b.remove)(this.page._zr,t)},w._templates._img=[],w._templates._imgs=[],this._init[e]=this.init(w._templates[e]),this}console.warn("已存在".concat(e,"模板"))},w.prototype.init=function(a){return n(this,void 0,void 0,function(){var n,e,r,i,o;return m(this,function(t){switch(t.label){case 0:if(a._imgs=[],a._img=[],!a.fixed)return[3,4];if(!((n=a.fixed)instanceof Array))return console.error("".concat(a.name," 模板初始化失败、fixed 属性应该为数组 。")),[2];if(n[0]._zr)return[3,4];e=function(e){var r;return m(this,function(t){switch(t.label){case 0:return(r=n[e])&&!a._zr&&(r.fixed=!0,r._zr=a.page._zr,r._template=a,r.add=function(t){(0,b.add)(r._zr,t)},r.remove=function(t){(0,b.remove)(r._zr,t)},r.img=function(t){a._img.push(t)},r.unit=a.unit,r.dpi=a.dpi),[4,w.plugins.apply(r,r.default)];case 1:return t.sent(),[2]}})},i=0,t.label=1;case 1:return i<n.length?[5,e(i)]:[3,4];case 2:t.sent(),t.label=3;case 3:return i++,[3,1];case 4:if(a.data)for(r=a.data,i=0;i<Object.keys(r).length;i++)(o=r[Object.keys(r)[i]])._zr=a.page._zr,o._template=a,o.add=function(t){(0,b.add)(this._zr,t)},o.remove=function(t){(0,b.remove)(this._zr,t)},o.img=function(t){this._template._imgs.push(t)},o.unit=a.unit,o.dpi=a.dpi;return[2]}})})},w.prototype.print=function(p,g,v){return n(this,void 0,void 0,function(){var e=this;return m(this,function(t){return[2,new Promise(function(f,d){return n(e,void 0,void 0,function(){var e,r,n,i,o,a,s,u,l,h,c;return m(this,function(t){switch(t.label){case 0:if(!(e=w._templates[p]))return console.warn("未定义".concat(p,"模板")),[2,d("未定义".concat(p,"模板"))];if(e.multiPage&&(r=Object.keys(w._templates),s=e.linkTemplate||[],null!=(n=s.filter(function(t){return!r.includes(t)}))&&0<n.length))return console.warn("未定义".concat(n.join(","),"模板")),[2,d("未定义".concat(n.join(","),"模板"))];g instanceof Array||(g=[g]),i=new y({unit:"pt",precision:0,format:[e.width,e.height],orientation:e.width>e.height?"l":"p"}),a=o=0,t.label=1;case 1:if(!(a<g.length))return[3,7];s=[{name:p,data:g[a]}],e.multiPage&&(h=e.pageMode(g[a]))&&(s=h),u=0,t.label=2;case 2:return u<s.length?(l=s[u],[4,this.setData(l.name,l.data)]):[3,6];case 3:return null==(h=t.sent())?[3,5]:[4,this.toImg(h,v||1)];case 4:c=t.sent(),0!=o&&i.addPage(),i.addImage(c,"PNG",0,0,h.width,h.height,"","SLOW"),h._imgs.forEach(function(t){i.addImage(t.image,"PNG",t.x,t.y,t.width,t.height,"","SLOW")}),h._imgs=[],h._img.forEach(function(t){i.addImage(t.image,"PNG",t.x,t.y,t.width,t.height,"","SLOW")}),o++,t.label=5;case 5:return u++,[3,2];case 6:return a++,[3,1];case 7:return[2,f(i)]}})})})]})})},w.prototype.getPrintData=function(d,p,g){return n(this,void 0,void 0,function(){var e=this;return m(this,function(t){return[2,new Promise(function(c,f){return n(e,void 0,void 0,function(){var e,r,n,a,i,s,o,u,l,h;return m(this,function(t){switch(t.label){case 0:if(!(e=w._templates[d]))return console.warn("未定义".concat(d,"模板")),[2,f("未定义".concat(d,"模板"))];if(e.multiPage&&(r=Object.keys(w._templates),s=e.linkTemplate||[],null!=(n=s.filter(function(t){return!r.includes(t)}))&&0<n.length))return console.warn("未定义".concat(n.join(","),"模板")),[2,f("未定义".concat(n.join(","),"模板"))];p instanceof Array||(p=[p]),a=[],i=0,t.label=1;case 1:if(!(i<p.length))return[3,6];s=[{name:d,data:p[i]}],e.multiPage&&(o=e.pageMode(p[i]))&&(s=o),u=function(e){var r,n,i,o;return m(this,function(t){switch(t.label){case 0:return r=s[e],[4,l.setData(r.name,r.data)];case 1:return null==(n=t.sent())?[2,"continue"]:[4,l.toImg(n,g)];case 2:return i=t.sent(),(o={width:n.width,height:n.height,images:[]}).images.push({image:i,x:0,y:0,width:n.width,height:n.height}),n._imgs.forEach(function(t){o.images.push({image:t.image,x:t.x,y:t.y,width:t.width,height:t.height})}),n._imgs=[],n._img.forEach(function(t){o.images.push({image:t.image,x:t.x,y:t.y,width:t.width,height:t.height})}),a.push(o),[2]}})},l=this,h=0,t.label=2;case 2:return h<s.length?[5,u(h)]:[3,5];case 3:t.sent(),t.label=4;case 4:return h++,[3,2];case 5:return i++,[3,1];case 6:return[2,c(a)]}})})})]})})},w.prototype.setData=function(a,s){return n(this,void 0,void 0,function(){var e,r,n,i,o;return m(this,function(t){switch(t.label){case 0:return[4,Promise.all([this._init[a]])];case 1:if(t.sent(),null==(e=w._templates[a]))return console.warn("未定义".concat(a,"模板")),[2,null];for(n in e._imgs=[],r=[],e.data)i=e.data[n],o=s[n]||"",r.push(w.plugins.apply(i,o));return[4,Promise.all(r)];case 2:return t.sent(),[2,e]}})})},w.prototype.toImg=function(i,o){return void 0===o&&(o=1),n(this,void 0,void 0,function(){var e,r,n;return m(this,function(t){return i.page._zr.refreshImmediately(),e=i.page._html.getElementsByTagName("canvas"),r=document.createElement("canvas"),n={},r.width=i.page._zr.getWidth(),r.height=i.page._zr.getHeight(),(n=r.getContext("2d")).fillStyle="#fff",n.fillRect(0,0,r.width,r.height),[2,new Promise(function(r){Array.from(e).forEach(function(t){(1<o||o<=0)&&(o=1);var e=t.toDataURL("image/png",o);r(e)})})]})})},w.prototype.templateInit=function(t){t._html=document.createElement("div");var e=0,r=0;if(t.size instanceof Array)e=t.size[0],r=t.size[1];else{var n=(0,g.default)(t.dpi)[t.size];n=n||(0,g.default)(t.dpi).a4,"l"==t.orientation&&n.reverse(),e=n[0],r=n[1]}t._html.style.width="".concat(e,"px"),t._html.style.height="".concat(r,"px"),t._zr=v.init(t._html)},w.plugins=i.default,w._templates={},w);function w(t){this._options={},this._init={},this.loadDefaultPlugins()}r.default=h},{"./pageSize":182,"./plugins":183,"./plugins/barcode":184,"./plugins/image":185,"./plugins/line":186,"./plugins/qrcode":187,"./plugins/text":188,"./utils":189,jspdf:56,zrender:85}]},{},[190])(190)});