1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
| /*!
| * shp与geojson互转工具类
| * 版本信息:v2.0.0, hash值: 36ec45eb915c420afd87
| * 编译日期:2023-08-02 16:24:35
| * 版权所有:Copyright by 木遥 https://github.com/muyao1987/shp-geojson
| *
| */
| !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("shpUtil",[],e):"object"==typeof exports?exports.shpUtil=e():t.shpUtil=e()}(window,(function(){return function(t){var e={};function r(i){if(e[i])return e[i].exports;var n=e[i]={i:i,l:!1,exports:{}};return t[i].call(n.exports,n,n.exports,r),n.l=!0,n.exports}return r.m=t,r.c=e,r.d=function(t,e,i){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(r.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)r.d(i,n,function(e){return t[e]}.bind(null,n));return i},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=29)}([function(t,e,r){var i=r(35)();t.exports=i;try{regeneratorRuntime=i}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=i:Function("r","regeneratorRuntime = r")(i)}},function(t,e){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(t){"object"==typeof window&&(r=window)}t.exports=r},function(t,e,r){"use strict";(function(t){
| /*!
| * The buffer module from node.js, for the browser.
| *
| * @author Feross Aboukhadijeh <http://feross.org>
| * @license MIT
| */
| var i=r(43),n=r(44),s=r(13);function a(){return h.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function o(t,e){if(a()<e)throw new RangeError("Invalid typed array length");return h.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e)).__proto__=h.prototype:(null===t&&(t=new h(e)),t.length=e),t}function h(t,e,r){if(!(h.TYPED_ARRAY_SUPPORT||this instanceof h))return new h(t,e,r);if("number"==typeof t){if("string"==typeof e)throw new Error("If encoding is specified then the first argument must be a string");return c(this,t)}return u(this,t,e,r)}function u(t,e,r,i){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer?function(t,e,r,i){if(e.byteLength,r<0||e.byteLength<r)throw new RangeError("'offset' is out of bounds");if(e.byteLength<r+(i||0))throw new RangeError("'length' is out of bounds");e=void 0===r&&void 0===i?new Uint8Array(e):void 0===i?new Uint8Array(e,r):new Uint8Array(e,r,i);h.TYPED_ARRAY_SUPPORT?(t=e).__proto__=h.prototype:t=f(t,e);return t}(t,e,r,i):"string"==typeof e?function(t,e,r){"string"==typeof r&&""!==r||(r="utf8");if(!h.isEncoding(r))throw new TypeError('"encoding" must be a valid string encoding');var i=0|p(e,r),n=(t=o(t,i)).write(e,r);n!==i&&(t=t.slice(0,n));return t}(t,e,r):function(t,e){if(h.isBuffer(e)){var r=0|d(e.length);return 0===(t=o(t,r)).length||e.copy(t,0,0,r),t}if(e){if("undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return"number"!=typeof e.length||(i=e.length)!=i?o(t,0):f(t,e);if("Buffer"===e.type&&s(e.data))return f(t,e.data)}var i;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,e)}function l(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function c(t,e){if(l(e),t=o(t,e<0?0:0|d(e)),!h.TYPED_ARRAY_SUPPORT)for(var r=0;r<e;++r)t[r]=0;return t}function f(t,e){var r=e.length<0?0:0|d(e.length);t=o(t,r);for(var i=0;i<r;i+=1)t[i]=255&e[i];return t}function d(t){if(t>=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|t}function p(t,e){if(h.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var r=t.length;if(0===r)return 0;for(var i=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return U(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return F(t).length;default:if(i)return U(t).length;e=(""+e).toLowerCase(),i=!0}}function m(t,e,r){var i=!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 O(this,e,r);case"utf8":case"utf-8":return E(this,e,r);case"ascii":return C(this,e,r);case"latin1":case"binary":return A(this,e,r);case"base64":return S(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,e,r);default:if(i)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),i=!0}}function g(t,e,r){var i=t[e];t[e]=t[r],t[r]=i}function y(t,e,r,i,n){if(0===t.length)return-1;if("string"==typeof r?(i=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=n?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(n)return-1;r=t.length-1}else if(r<0){if(!n)return-1;r=0}if("string"==typeof e&&(e=h.from(e,i)),h.isBuffer(e))return 0===e.length?-1:v(t,e,r,i,n);if("number"==typeof e)return e&=255,h.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?n?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):v(t,[e],r,i,n);throw new TypeError("val must be string, number or Buffer")}function v(t,e,r,i,n){var s,a=1,o=t.length,h=e.length;if(void 0!==i&&("ucs2"===(i=String(i).toLowerCase())||"ucs-2"===i||"utf16le"===i||"utf-16le"===i)){if(t.length<2||e.length<2)return-1;a=2,o/=2,h/=2,r/=2}function u(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}if(n){var l=-1;for(s=r;s<o;s++)if(u(t,s)===u(e,-1===l?0:s-l)){if(-1===l&&(l=s),s-l+1===h)return l*a}else-1!==l&&(s-=s-l),l=-1}else for(r+h>o&&(r=o-h),s=r;s>=0;s--){for(var c=!0,f=0;f<h;f++)if(u(t,s+f)!==u(e,f)){c=!1;break}if(c)return s}return-1}function _(t,e,r,i){r=Number(r)||0;var n=t.length-r;i?(i=Number(i))>n&&(i=n):i=n;var s=e.length;if(s%2!=0)throw new TypeError("Invalid hex string");i>s/2&&(i=s/2);for(var a=0;a<i;++a){var o=parseInt(e.substr(2*a,2),16);if(isNaN(o))return a;t[r+a]=o}return a}function b(t,e,r,i){return q(U(e,t.length-r),t,r,i)}function w(t,e,r,i){return q(function(t){for(var e=[],r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}(e),t,r,i)}function M(t,e,r,i){return w(t,e,r,i)}function x(t,e,r,i){return q(F(e),t,r,i)}function k(t,e,r,i){return q(function(t,e){for(var r,i,n,s=[],a=0;a<t.length&&!((e-=2)<0);++a)r=t.charCodeAt(a),i=r>>8,n=r%256,s.push(n),s.push(i);return s}(e,t.length-r),t,r,i)}function S(t,e,r){return 0===e&&r===t.length?i.fromByteArray(t):i.fromByteArray(t.slice(e,r))}function E(t,e,r){r=Math.min(t.length,r);for(var i=[],n=e;n<r;){var s,a,o,h,u=t[n],l=null,c=u>239?4:u>223?3:u>191?2:1;if(n+c<=r)switch(c){case 1:u<128&&(l=u);break;case 2:128==(192&(s=t[n+1]))&&(h=(31&u)<<6|63&s)>127&&(l=h);break;case 3:s=t[n+1],a=t[n+2],128==(192&s)&&128==(192&a)&&(h=(15&u)<<12|(63&s)<<6|63&a)>2047&&(h<55296||h>57343)&&(l=h);break;case 4:s=t[n+1],a=t[n+2],o=t[n+3],128==(192&s)&&128==(192&a)&&128==(192&o)&&(h=(15&u)<<18|(63&s)<<12|(63&a)<<6|63&o)>65535&&h<1114112&&(l=h)}null===l?(l=65533,c=1):l>65535&&(l-=65536,i.push(l>>>10&1023|55296),l=56320|1023&l),i.push(l),n+=c}return function(t){var e=t.length;if(e<=4096)return String.fromCharCode.apply(String,t);var r="",i=0;for(;i<e;)r+=String.fromCharCode.apply(String,t.slice(i,i+=4096));return r}(i)}e.Buffer=h,e.SlowBuffer=function(t){+t!=t&&(t=0);return h.alloc(+t)},e.INSPECT_MAX_BYTES=50,h.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(t){return!1}}(),e.kMaxLength=a(),h.poolSize=8192,h._augment=function(t){return t.__proto__=h.prototype,t},h.from=function(t,e,r){return u(null,t,e,r)},h.TYPED_ARRAY_SUPPORT&&(h.prototype.__proto__=Uint8Array.prototype,h.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&h[Symbol.species]===h&&Object.defineProperty(h,Symbol.species,{value:null,configurable:!0})),h.alloc=function(t,e,r){return function(t,e,r,i){return l(e),e<=0?o(t,e):void 0!==r?"string"==typeof i?o(t,e).fill(r,i):o(t,e).fill(r):o(t,e)}(null,t,e,r)},h.allocUnsafe=function(t){return c(null,t)},h.allocUnsafeSlow=function(t){return c(null,t)},h.isBuffer=function(t){return!(null==t||!t._isBuffer)},h.compare=function(t,e){if(!h.isBuffer(t)||!h.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var r=t.length,i=e.length,n=0,s=Math.min(r,i);n<s;++n)if(t[n]!==e[n]){r=t[n],i=e[n];break}return r<i?-1:i<r?1:0},h.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}},h.concat=function(t,e){if(!s(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return h.alloc(0);var r;if(void 0===e)for(e=0,r=0;r<t.length;++r)e+=t[r].length;var i=h.allocUnsafe(e),n=0;for(r=0;r<t.length;++r){var a=t[r];if(!h.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(i,n),n+=a.length}return i},h.byteLength=p,h.prototype._isBuffer=!0,h.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)g(this,e,e+1);return this},h.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)g(this,e,e+3),g(this,e+1,e+2);return this},h.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)g(this,e,e+7),g(this,e+1,e+6),g(this,e+2,e+5),g(this,e+3,e+4);return this},h.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?E(this,0,t):m.apply(this,arguments)},h.prototype.equals=function(t){if(!h.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===h.compare(this,t)},h.prototype.inspect=function(){var t="",r=e.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(t+=" ... ")),"<Buffer "+t+">"},h.prototype.compare=function(t,e,r,i,n){if(!h.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===i&&(i=0),void 0===n&&(n=this.length),e<0||r>t.length||i<0||n>this.length)throw new RangeError("out of range index");if(i>=n&&e>=r)return 0;if(i>=n)return-1;if(e>=r)return 1;if(this===t)return 0;for(var s=(n>>>=0)-(i>>>=0),a=(r>>>=0)-(e>>>=0),o=Math.min(s,a),u=this.slice(i,n),l=t.slice(e,r),c=0;c<o;++c)if(u[c]!==l[c]){s=u[c],a=l[c];break}return s<a?-1:a<s?1:0},h.prototype.includes=function(t,e,r){return-1!==this.indexOf(t,e,r)},h.prototype.indexOf=function(t,e,r){return y(this,t,e,r,!0)},h.prototype.lastIndexOf=function(t,e,r){return y(this,t,e,r,!1)},h.prototype.write=function(t,e,r,i){if(void 0===e)i="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)i=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===i&&(i="utf8")):(i=r,r=void 0)}var n=this.length-e;if((void 0===r||r>n)&&(r=n),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");for(var s=!1;;)switch(i){case"hex":return _(this,t,e,r);case"utf8":case"utf-8":return b(this,t,e,r);case"ascii":return w(this,t,e,r);case"latin1":case"binary":return M(this,t,e,r);case"base64":return x(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,t,e,r);default:if(s)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),s=!0}},h.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function C(t,e,r){var i="";r=Math.min(t.length,r);for(var n=e;n<r;++n)i+=String.fromCharCode(127&t[n]);return i}function A(t,e,r){var i="";r=Math.min(t.length,r);for(var n=e;n<r;++n)i+=String.fromCharCode(t[n]);return i}function O(t,e,r){var i=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>i)&&(r=i);for(var n="",s=e;s<r;++s)n+=D(t[s]);return n}function T(t,e,r){for(var i=t.slice(e,r),n="",s=0;s<i.length;s+=2)n+=String.fromCharCode(i[s]+256*i[s+1]);return n}function I(t,e,r){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}function L(t,e,r,i,n,s){if(!h.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>n||e<s)throw new RangeError('"value" argument is out of bounds');if(r+i>t.length)throw new RangeError("Index out of range")}function P(t,e,r,i){e<0&&(e=65535+e+1);for(var n=0,s=Math.min(t.length-r,2);n<s;++n)t[r+n]=(e&255<<8*(i?n:1-n))>>>8*(i?n:1-n)}function R(t,e,r,i){e<0&&(e=4294967295+e+1);for(var n=0,s=Math.min(t.length-r,4);n<s;++n)t[r+n]=e>>>8*(i?n:3-n)&255}function N(t,e,r,i,n,s){if(r+i>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function z(t,e,r,i,s){return s||N(t,0,r,4),n.write(t,e,r,i,23,4),r+4}function j(t,e,r,i,s){return s||N(t,0,r,8),n.write(t,e,r,i,52,8),r+8}h.prototype.slice=function(t,e){var r,i=this.length;if((t=~~t)<0?(t+=i)<0&&(t=0):t>i&&(t=i),(e=void 0===e?i:~~e)<0?(e+=i)<0&&(e=0):e>i&&(e=i),e<t&&(e=t),h.TYPED_ARRAY_SUPPORT)(r=this.subarray(t,e)).__proto__=h.prototype;else{var n=e-t;r=new h(n,void 0);for(var s=0;s<n;++s)r[s]=this[s+t]}return r},h.prototype.readUIntLE=function(t,e,r){t|=0,e|=0,r||I(t,e,this.length);for(var i=this[t],n=1,s=0;++s<e&&(n*=256);)i+=this[t+s]*n;return i},h.prototype.readUIntBE=function(t,e,r){t|=0,e|=0,r||I(t,e,this.length);for(var i=this[t+--e],n=1;e>0&&(n*=256);)i+=this[t+--e]*n;return i},h.prototype.readUInt8=function(t,e){return e||I(t,1,this.length),this[t]},h.prototype.readUInt16LE=function(t,e){return e||I(t,2,this.length),this[t]|this[t+1]<<8},h.prototype.readUInt16BE=function(t,e){return e||I(t,2,this.length),this[t]<<8|this[t+1]},h.prototype.readUInt32LE=function(t,e){return e||I(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},h.prototype.readUInt32BE=function(t,e){return e||I(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},h.prototype.readIntLE=function(t,e,r){t|=0,e|=0,r||I(t,e,this.length);for(var i=this[t],n=1,s=0;++s<e&&(n*=256);)i+=this[t+s]*n;return i>=(n*=128)&&(i-=Math.pow(2,8*e)),i},h.prototype.readIntBE=function(t,e,r){t|=0,e|=0,r||I(t,e,this.length);for(var i=e,n=1,s=this[t+--i];i>0&&(n*=256);)s+=this[t+--i]*n;return s>=(n*=128)&&(s-=Math.pow(2,8*e)),s},h.prototype.readInt8=function(t,e){return e||I(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},h.prototype.readInt16LE=function(t,e){e||I(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},h.prototype.readInt16BE=function(t,e){e||I(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},h.prototype.readInt32LE=function(t,e){return e||I(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},h.prototype.readInt32BE=function(t,e){return e||I(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},h.prototype.readFloatLE=function(t,e){return e||I(t,4,this.length),n.read(this,t,!0,23,4)},h.prototype.readFloatBE=function(t,e){return e||I(t,4,this.length),n.read(this,t,!1,23,4)},h.prototype.readDoubleLE=function(t,e){return e||I(t,8,this.length),n.read(this,t,!0,52,8)},h.prototype.readDoubleBE=function(t,e){return e||I(t,8,this.length),n.read(this,t,!1,52,8)},h.prototype.writeUIntLE=function(t,e,r,i){(t=+t,e|=0,r|=0,i)||L(this,t,e,r,Math.pow(2,8*r)-1,0);var n=1,s=0;for(this[e]=255&t;++s<r&&(n*=256);)this[e+s]=t/n&255;return e+r},h.prototype.writeUIntBE=function(t,e,r,i){(t=+t,e|=0,r|=0,i)||L(this,t,e,r,Math.pow(2,8*r)-1,0);var n=r-1,s=1;for(this[e+n]=255&t;--n>=0&&(s*=256);)this[e+n]=t/s&255;return e+r},h.prototype.writeUInt8=function(t,e,r){return t=+t,e|=0,r||L(this,t,e,1,255,0),h.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},h.prototype.writeUInt16LE=function(t,e,r){return t=+t,e|=0,r||L(this,t,e,2,65535,0),h.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):P(this,t,e,!0),e+2},h.prototype.writeUInt16BE=function(t,e,r){return t=+t,e|=0,r||L(this,t,e,2,65535,0),h.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):P(this,t,e,!1),e+2},h.prototype.writeUInt32LE=function(t,e,r){return t=+t,e|=0,r||L(this,t,e,4,4294967295,0),h.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):R(this,t,e,!0),e+4},h.prototype.writeUInt32BE=function(t,e,r){return t=+t,e|=0,r||L(this,t,e,4,4294967295,0),h.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):R(this,t,e,!1),e+4},h.prototype.writeIntLE=function(t,e,r,i){if(t=+t,e|=0,!i){var n=Math.pow(2,8*r-1);L(this,t,e,r,n-1,-n)}var s=0,a=1,o=0;for(this[e]=255&t;++s<r&&(a*=256);)t<0&&0===o&&0!==this[e+s-1]&&(o=1),this[e+s]=(t/a>>0)-o&255;return e+r},h.prototype.writeIntBE=function(t,e,r,i){if(t=+t,e|=0,!i){var n=Math.pow(2,8*r-1);L(this,t,e,r,n-1,-n)}var s=r-1,a=1,o=0;for(this[e+s]=255&t;--s>=0&&(a*=256);)t<0&&0===o&&0!==this[e+s+1]&&(o=1),this[e+s]=(t/a>>0)-o&255;return e+r},h.prototype.writeInt8=function(t,e,r){return t=+t,e|=0,r||L(this,t,e,1,127,-128),h.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},h.prototype.writeInt16LE=function(t,e,r){return t=+t,e|=0,r||L(this,t,e,2,32767,-32768),h.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):P(this,t,e,!0),e+2},h.prototype.writeInt16BE=function(t,e,r){return t=+t,e|=0,r||L(this,t,e,2,32767,-32768),h.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):P(this,t,e,!1),e+2},h.prototype.writeInt32LE=function(t,e,r){return t=+t,e|=0,r||L(this,t,e,4,2147483647,-2147483648),h.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):R(this,t,e,!0),e+4},h.prototype.writeInt32BE=function(t,e,r){return t=+t,e|=0,r||L(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),h.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):R(this,t,e,!1),e+4},h.prototype.writeFloatLE=function(t,e,r){return z(this,t,e,!0,r)},h.prototype.writeFloatBE=function(t,e,r){return z(this,t,e,!1,r)},h.prototype.writeDoubleLE=function(t,e,r){return j(this,t,e,!0,r)},h.prototype.writeDoubleBE=function(t,e,r){return j(this,t,e,!1,r)},h.prototype.copy=function(t,e,r,i){if(r||(r=0),i||0===i||(i=this.length),e>=t.length&&(e=t.length),e||(e=0),i>0&&i<r&&(i=r),i===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(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),t.length-e<i-r&&(i=t.length-e+r);var n,s=i-r;if(this===t&&r<e&&e<i)for(n=s-1;n>=0;--n)t[n+e]=this[n+r];else if(s<1e3||!h.TYPED_ARRAY_SUPPORT)for(n=0;n<s;++n)t[n+e]=this[n+r];else Uint8Array.prototype.set.call(t,this.subarray(r,r+s),e);return s},h.prototype.fill=function(t,e,r,i){if("string"==typeof t){if("string"==typeof e?(i=e,e=0,r=this.length):"string"==typeof r&&(i=r,r=this.length),1===t.length){var n=t.charCodeAt(0);n<256&&(t=n)}if(void 0!==i&&"string"!=typeof i)throw new TypeError("encoding must be a string");if("string"==typeof i&&!h.isEncoding(i))throw new TypeError("Unknown encoding: "+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 s;if(e>>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(s=e;s<r;++s)this[s]=t;else{var a=h.isBuffer(t)?t:U(new h(t,i).toString()),o=a.length;for(s=0;s<r-e;++s)this[s+e]=a[s%o]}return this};var B=/[^+\/0-9A-Za-z-_]/g;function D(t){return t<16?"0"+t.toString(16):t.toString(16)}function U(t,e){var r;e=e||1/0;for(var i=t.length,n=null,s=[],a=0;a<i;++a){if((r=t.charCodeAt(a))>55295&&r<57344){if(!n){if(r>56319){(e-=3)>-1&&s.push(239,191,189);continue}if(a+1===i){(e-=3)>-1&&s.push(239,191,189);continue}n=r;continue}if(r<56320){(e-=3)>-1&&s.push(239,191,189),n=r;continue}r=65536+(n-55296<<10|r-56320)}else n&&(e-=3)>-1&&s.push(239,191,189);if(n=null,r<128){if((e-=1)<0)break;s.push(r)}else if(r<2048){if((e-=2)<0)break;s.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;s.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;s.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return s}function F(t){return i.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(B,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function q(t,e,r,i){for(var n=0;n<i&&!(n+r>=e.length||n>=t.length);++n)e[n+r]=t[n];return n}}).call(this,r(1))},function(t,e){function r(t,e,r,i,n,s,a){try{var o=t[s](a),h=o.value}catch(t){return void r(t)}o.done?e(h):Promise.resolve(h).then(i,n)}t.exports=function(t){return function(){var e=this,i=arguments;return new Promise((function(n,s){var a=t.apply(e,i);function o(t){r(a,n,s,o,h,"next",t)}function h(t){r(a,n,s,o,h,"throw",t)}o(void 0)}))}},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e){var r,i,n=t.exports={};function s(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function o(t){if(r===setTimeout)return setTimeout(t,0);if((r===s||!r)&&setTimeout)return r=setTimeout,setTimeout(t,0);try{return r(t,0)}catch(e){try{return r.call(null,t,0)}catch(e){return r.call(this,t,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:s}catch(t){r=s}try{i="function"==typeof clearTimeout?clearTimeout:a}catch(t){i=a}}();var h,u=[],l=!1,c=-1;function f(){l&&h&&(l=!1,h.length?u=h.concat(u):c=-1,u.length&&d())}function d(){if(!l){var t=o(f);l=!0;for(var e=u.length;e;){for(h=u,u=[];++c<e;)h&&h[c].run();c=-1,e=u.length}h=null,l=!1,function(t){if(i===clearTimeout)return clearTimeout(t);if((i===a||!i)&&clearTimeout)return i=clearTimeout,clearTimeout(t);try{i(t)}catch(e){try{return i.call(null,t)}catch(e){return i.call(this,t)}}}(t)}}function p(t,e){this.fun=t,this.array=e}function m(){}n.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];u.push(new p(t,e)),1!==u.length||l||o(d)},p.prototype.run=function(){this.fun.apply(null,this.array)},n.title="browser",n.browser=!0,n.env={},n.argv=[],n.version="",n.versions={},n.on=m,n.addListener=m,n.once=m,n.off=m,n.removeListener=m,n.removeAllListeners=m,n.emit=m,n.prependListener=m,n.prependOnceListener=m,n.listeners=function(t){return[]},n.binding=function(t){throw new Error("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(t){throw new Error("process.chdir is not supported")},n.umask=function(){return 0}},function(t,e){"function"==typeof Object.create?t.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(t,e){if(e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}}},function(t,e,r){"use strict";var i=r(9),n=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};t.exports=c;var s=Object.create(r(8));s.inherits=r(5);var a=r(20),o=r(24);s.inherits(c,a);for(var h=n(o.prototype),u=0;u<h.length;u++){var l=h[u];c.prototype[l]||(c.prototype[l]=o.prototype[l])}function c(t){if(!(this instanceof c))return new c(t);a.call(this,t),o.call(this,t),t&&!1===t.readable&&(this.readable=!1),t&&!1===t.writable&&(this.writable=!1),this.allowHalfOpen=!0,t&&!1===t.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",f)}function f(){this.allowHalfOpen||this._writableState.ended||i.nextTick(d,this)}function d(t){t.end()}Object.defineProperty(c.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(c.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(t){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=t,this._writableState.destroyed=t)}}),c.prototype._destroy=function(t,e){this.push(null),this.end(),i.nextTick(e,t)}},function(t,e,r){"use strict";r.d(e,"a",(function(){return o}));var i=r(14),n=r(16),s=r(65),a=r(2).Buffer;function o(t,e){return new i((function(r,i){var o=function(t,e){if(!e)return t;var r=new URL(t);return r.pathname="".concat(r.pathname,".").concat(e),r.href}(t,e),h=n;o.startsWith("https:")&&(h=s),h.get(o,(function(t){var n=0,s=[];t.on("data",(function(t){n+=t.length,s.push(t)})),t.on("error",(function(t){i(t)})),t.on("end",(function(){if(t.statusCode>399)return"prj"===e||"cpg"===e||"dbf"===e?r(!1):i(new Error(a.concat(s,n).toString()));var o=a.concat(s,n);r("prj"===e?o.toString():o)}))})).on("error",(function(t){i(t)}))}))}},function(t,e,r){function i(t){return Object.prototype.toString.call(t)}e.isArray=function(t){return Array.isArray?Array.isArray(t):"[object Array]"===i(t)},e.isBoolean=function(t){return"boolean"==typeof t},e.isNull=function(t){return null===t},e.isNullOrUndefined=function(t){return null==t},e.isNumber=function(t){return"number"==typeof t},e.isString=function(t){return"string"==typeof t},e.isSymbol=function(t){return"symbol"==typeof t},e.isUndefined=function(t){return void 0===t},e.isRegExp=function(t){return"[object RegExp]"===i(t)},e.isObject=function(t){return"object"==typeof t&&null!==t},e.isDate=function(t){return"[object Date]"===i(t)},e.isError=function(t){return"[object Error]"===i(t)||t instanceof Error},e.isFunction=function(t){return"function"==typeof t},e.isPrimitive=function(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t},e.isBuffer=r(2).Buffer.isBuffer},function(t,e,r){"use strict";(function(e){void 0===e||!e.version||0===e.version.indexOf("v0.")||0===e.version.indexOf("v1.")&&0!==e.version.indexOf("v1.8.")?t.exports={nextTick:function(t,r,i,n){if("function"!=typeof t)throw new TypeError('"callback" argument must be a function');var s,a,o=arguments.length;switch(o){case 0:case 1:return e.nextTick(t);case 2:return e.nextTick((function(){t.call(null,r)}));case 3:return e.nextTick((function(){t.call(null,r,i)}));case 4:return e.nextTick((function(){t.call(null,r,i,n)}));default:for(s=new Array(o-1),a=0;a<s.length;)s[a++]=arguments[a];return e.nextTick((function(){t.apply(null,s)}))}}}:t.exports=e}).call(this,r(4))},function(t,e,r){"use strict";var i=r(42).Buffer,n=i.isEncoding||function(t){switch((t=""+t)&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function s(t){var e;switch(this.encoding=function(t){var e=function(t){if(!t)return"utf8";for(var e;;)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}(t);if("string"!=typeof e&&(i.isEncoding===n||!n(t)))throw new Error("Unknown encoding: "+t);return e||t}(t),this.encoding){case"utf16le":this.text=h,this.end=u,e=4;break;case"utf8":this.fillLast=o,e=4;break;case"base64":this.text=l,this.end=c,e=3;break;default:return this.write=f,void(this.end=d)}this.lastNeed=0,this.lastTotal=0,this.lastChar=i.allocUnsafe(e)}function a(t){return t<=127?0:t>>5==6?2:t>>4==14?3:t>>3==30?4:t>>6==2?-1:-2}function o(t){var e=this.lastTotal-this.lastNeed,r=function(t,e,r){if(128!=(192&e[0]))return t.lastNeed=0,"�";if(t.lastNeed>1&&e.length>1){if(128!=(192&e[1]))return t.lastNeed=1,"�";if(t.lastNeed>2&&e.length>2&&128!=(192&e[2]))return t.lastNeed=2,"�"}}(this,t);return void 0!==r?r:this.lastNeed<=t.length?(t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(t.copy(this.lastChar,e,0,t.length),void(this.lastNeed-=t.length))}function h(t,e){if((t.length-e)%2==0){var r=t.toString("utf16le",e);if(r){var i=r.charCodeAt(r.length-1);if(i>=55296&&i<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function u(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,r)}return e}function l(t,e){var r=(t.length-e)%3;return 0===r?t.toString("base64",e):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-r))}function c(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function f(t){return t.toString(this.encoding)}function d(t){return t&&t.length?this.write(t):""}e.StringDecoder=s,s.prototype.write=function(t){if(0===t.length)return"";var e,r;if(this.lastNeed){if(void 0===(e=this.fillLast(t)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<t.length?e?e+this.text(t,r):this.text(t,r):e||""},s.prototype.end=function(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"�":e},s.prototype.text=function(t,e){var r=function(t,e,r){var i=e.length-1;if(i<r)return 0;var n=a(e[i]);if(n>=0)return n>0&&(t.lastNeed=n-1),n;if(--i<r||-2===n)return 0;if((n=a(e[i]))>=0)return n>0&&(t.lastNeed=n-2),n;if(--i<r||-2===n)return 0;if((n=a(e[i]))>=0)return n>0&&(2===n?n=0:t.lastNeed=n-3),n;return 0}(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var i=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,i),t.toString("utf8",e,i)},s.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length}},function(t,e,r){var i=r(2),n=i.Buffer;function s(t,e){for(var r in t)e[r]=t[r]}function a(t,e,r){return n(t,e,r)}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?t.exports=i:(s(i,e),e.Buffer=a),s(n,a),a.from=function(t,e,r){if("number"==typeof t)throw new TypeError("Argument must not be a number");return n(t,e,r)},a.alloc=function(t,e,r){if("number"!=typeof t)throw new TypeError("Argument must be a number");var i=n(t);return void 0!==e?"string"==typeof r?i.fill(e,r):i.fill(e):i.fill(0),i},a.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return n(t)},a.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return i.SlowBuffer(t)}},function(t,e,r){var i=r(30),n=r(31),s=r(32),a=r(34);t.exports=function(t,e){return i(t)||n(t,e)||s(t,e)||a()},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e){var r={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==r.call(t)}},function(t,e,r){"use strict";var i=r(45);function n(){}var s={},a=["REJECTED"],o=["FULFILLED"],h=["PENDING"];function u(t){if("function"!=typeof t)throw new TypeError("resolver must be a function");this.state=h,this.queue=[],this.outcome=void 0,t!==n&&d(this,t)}function l(t,e,r){this.promise=t,"function"==typeof e&&(this.onFulfilled=e,this.callFulfilled=this.otherCallFulfilled),"function"==typeof r&&(this.onRejected=r,this.callRejected=this.otherCallRejected)}function c(t,e,r){i((function(){var i;try{i=e(r)}catch(e){return s.reject(t,e)}i===t?s.reject(t,new TypeError("Cannot resolve promise with itself")):s.resolve(t,i)}))}function f(t){var e=t&&t.then;if(t&&("object"==typeof t||"function"==typeof t)&&"function"==typeof e)return function(){e.apply(t,arguments)}}function d(t,e){var r=!1;function i(e){r||(r=!0,s.reject(t,e))}function n(e){r||(r=!0,s.resolve(t,e))}var a=p((function(){e(n,i)}));"error"===a.status&&i(a.value)}function p(t,e){var r={};try{r.value=t(e),r.status="success"}catch(t){r.status="error",r.value=t}return r}t.exports=u,u.prototype.finally=function(t){if("function"!=typeof t)return this;var e=this.constructor;return this.then((function(r){return e.resolve(t()).then((function(){return r}))}),(function(r){return e.resolve(t()).then((function(){throw r}))}))},u.prototype.catch=function(t){return this.then(null,t)},u.prototype.then=function(t,e){if("function"!=typeof t&&this.state===o||"function"!=typeof e&&this.state===a)return this;var r=new this.constructor(n);this.state!==h?c(r,this.state===o?t:e,this.outcome):this.queue.push(new l(r,t,e));return r},l.prototype.callFulfilled=function(t){s.resolve(this.promise,t)},l.prototype.otherCallFulfilled=function(t){c(this.promise,this.onFulfilled,t)},l.prototype.callRejected=function(t){s.reject(this.promise,t)},l.prototype.otherCallRejected=function(t){c(this.promise,this.onRejected,t)},s.resolve=function(t,e){var r=p(f,e);if("error"===r.status)return s.reject(t,r.value);var i=r.value;if(i)d(t,i);else{t.state=o,t.outcome=e;for(var n=-1,a=t.queue.length;++n<a;)t.queue[n].callFulfilled(e)}return t},s.reject=function(t,e){t.state=a,t.outcome=e;for(var r=-1,i=t.queue.length;++r<i;)t.queue[r].callRejected(e);return t},u.resolve=function(t){if(t instanceof this)return t;return s.resolve(new this(n),t)},u.reject=function(t){var e=new this(n);return s.reject(e,t)},u.all=function(t){var e=this;if("[object Array]"!==Object.prototype.toString.call(t))return this.reject(new TypeError("must be an array"));var r=t.length,i=!1;if(!r)return this.resolve([]);var a=new Array(r),o=0,h=-1,u=new this(n);for(;++h<r;)l(t[h],h);return u;function l(t,n){e.resolve(t).then((function(t){a[n]=t,++o!==r||i||(i=!0,s.resolve(u,a))}),(function(t){i||(i=!0,s.reject(u,t))}))}},u.race=function(t){var e=this;if("[object Array]"!==Object.prototype.toString.call(t))return this.reject(new TypeError("must be an array"));var r=t.length,i=!1;if(!r)return this.resolve([]);var a=-1,o=new this(n);for(;++a<r;)h=t[a],e.resolve(h).then((function(t){i||(i=!0,s.resolve(o,t))}),(function(t){i||(i=!0,s.reject(o,t))}));var h;return o}},function(t,e,r){(function(t){var i=void 0!==t&&t||"undefined"!=typeof self&&self||window,n=Function.prototype.apply;function s(t,e){this._id=t,this._clearFn=e}e.setTimeout=function(){return new s(n.call(setTimeout,i,arguments),clearTimeout)},e.setInterval=function(){return new s(n.call(setInterval,i,arguments),clearInterval)},e.clearTimeout=e.clearInterval=function(t){t&&t.close()},s.prototype.unref=s.prototype.ref=function(){},s.prototype.close=function(){this._clearFn.call(i,this._id)},e.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},e.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},e._unrefActive=e.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;e>=0&&(t._idleTimeoutId=setTimeout((function(){t._onTimeout&&t._onTimeout()}),e))},r(48),e.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==t&&t.setImmediate||this&&this.setImmediate,e.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==t&&t.clearImmediate||this&&this.clearImmediate}).call(this,r(1))},function(t,e,r){(function(t){var i=r(50),n=r(18),s=r(57),a=r(58),o=r(26),h=e;h.request=function(e,r){e="string"==typeof e?o.parse(e):s(e);var n=-1===t.location.protocol.search(/^https?:$/)?"http:":"",a=e.protocol||n,h=e.hostname||e.host,u=e.port,l=e.path||"/";h&&-1!==h.indexOf(":")&&(h="["+h+"]"),e.url=(h?a+"//"+h:"")+(u?":"+u:"")+l,e.method=(e.method||"GET").toUpperCase(),e.headers=e.headers||{};var c=new i(e);return r&&c.on("response",r),c},h.get=function(t,e){var r=h.request(t,e);return r.end(),r},h.ClientRequest=i,h.IncomingMessage=n.IncomingMessage,h.Agent=function(){},h.Agent.defaultMaxSockets=4,h.globalAgent=new h.Agent,h.STATUS_CODES=a,h.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]}).call(this,r(1))},function(t,e,r){(function(t){e.fetch=o(t.fetch)&&o(t.ReadableStream),e.writableStream=o(t.WritableStream),e.abortController=o(t.AbortController),e.blobConstructor=!1;try{new Blob([new ArrayBuffer(1)]),e.blobConstructor=!0}catch(t){}var r;function i(){if(void 0!==r)return r;if(t.XMLHttpRequest){r=new t.XMLHttpRequest;try{r.open("GET",t.XDomainRequest?"/":"https://example.com")}catch(t){r=null}}else r=null;return r}function n(t){var e=i();if(!e)return!1;try{return e.responseType=t,e.responseType===t}catch(t){}return!1}var s=void 0!==t.ArrayBuffer,a=s&&o(t.ArrayBuffer.prototype.slice);function o(t){return"function"==typeof t}e.arraybuffer=e.fetch||s&&n("arraybuffer"),e.msstream=!e.fetch&&a&&n("ms-stream"),e.mozchunkedarraybuffer=!e.fetch&&s&&n("moz-chunked-arraybuffer"),e.overrideMimeType=e.fetch||!!i()&&o(i().overrideMimeType),e.vbArray=o(t.VBArray),r=null}).call(this,r(1))},function(t,e,r){(function(t,i,n){var s=r(17),a=r(5),o=r(19),h=e.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},u=e.IncomingMessage=function(e,r,a,h){var u=this;if(o.Readable.call(u),u._mode=a,u.headers={},u.rawHeaders=[],u.trailers={},u.rawTrailers=[],u.on("end",(function(){t.nextTick((function(){u.emit("close")}))})),"fetch"===a){if(u._fetchResponse=r,u.url=r.url,u.statusCode=r.status,u.statusMessage=r.statusText,r.headers.forEach((function(t,e){u.headers[e.toLowerCase()]=t,u.rawHeaders.push(e,t)})),s.writableStream){var l=new WritableStream({write:function(t){return new Promise((function(e,r){u._destroyed?r():u.push(new i(t))?e():u._resumeFetch=e}))},close:function(){n.clearTimeout(h),u._destroyed||u.push(null)},abort:function(t){u._destroyed||u.emit("error",t)}});try{return void r.body.pipeTo(l).catch((function(t){n.clearTimeout(h),u._destroyed||u.emit("error",t)}))}catch(t){}}var c=r.body.getReader();!function t(){c.read().then((function(e){if(!u._destroyed){if(e.done)return n.clearTimeout(h),void u.push(null);u.push(new i(e.value)),t()}})).catch((function(t){n.clearTimeout(h),u._destroyed||u.emit("error",t)}))}()}else{if(u._xhr=e,u._pos=0,u.url=e.responseURL,u.statusCode=e.status,u.statusMessage=e.statusText,e.getAllResponseHeaders().split(/\r?\n/).forEach((function(t){var e=t.match(/^([^:]+):\s*(.*)/);if(e){var r=e[1].toLowerCase();"set-cookie"===r?(void 0===u.headers[r]&&(u.headers[r]=[]),u.headers[r].push(e[2])):void 0!==u.headers[r]?u.headers[r]+=", "+e[2]:u.headers[r]=e[2],u.rawHeaders.push(e[1],e[2])}})),u._charset="x-user-defined",!s.overrideMimeType){var f=u.rawHeaders["mime-type"];if(f){var d=f.match(/;\s*charset=([^;])(;|$)/);d&&(u._charset=d[1].toLowerCase())}u._charset||(u._charset="utf-8")}}};a(u,o.Readable),u.prototype._read=function(){var t=this._resumeFetch;t&&(this._resumeFetch=null,t())},u.prototype._onXHRProgress=function(){var t=this,e=t._xhr,r=null;switch(t._mode){case"text:vbarray":if(e.readyState!==h.DONE)break;try{r=new n.VBArray(e.responseBody).toArray()}catch(t){}if(null!==r){t.push(new i(r));break}case"text":try{r=e.responseText}catch(e){t._mode="text:vbarray";break}if(r.length>t._pos){var s=r.substr(t._pos);if("x-user-defined"===t._charset){for(var a=new i(s.length),o=0;o<s.length;o++)a[o]=255&s.charCodeAt(o);t.push(a)}else t.push(s,t._charset);t._pos=r.length}break;case"arraybuffer":if(e.readyState!==h.DONE||!e.response)break;r=e.response,t.push(new i(new Uint8Array(r)));break;case"moz-chunked-arraybuffer":if(r=e.response,e.readyState!==h.LOADING||!r)break;t.push(new i(new Uint8Array(r)));break;case"ms-stream":if(r=e.response,e.readyState!==h.LOADING)break;var u=new n.MSStreamReader;u.onprogress=function(){u.result.byteLength>t._pos&&(t.push(new i(new Uint8Array(u.result.slice(t._pos)))),t._pos=u.result.byteLength)},u.onload=function(){t.push(null)},u.readAsArrayBuffer(r)}t._xhr.readyState===h.DONE&&"ms-stream"!==t._mode&&t.push(null)}}).call(this,r(4),r(2).Buffer,r(1))},function(t,e,r){(e=t.exports=r(20)).Stream=e,e.Readable=e,e.Writable=r(24),e.Duplex=r(6),e.Transform=r(25),e.PassThrough=r(55)},function(t,e,r){"use strict";(function(e,i){var n=r(9);t.exports=_;var s,a=r(13);_.ReadableState=v;r(21).EventEmitter;var o=function(t,e){return t.listeners(e).length},h=r(22),u=r(11).Buffer,l=e.Uint8Array||function(){};var c=Object.create(r(8));c.inherits=r(5);var f=r(51),d=void 0;d=f&&f.debuglog?f.debuglog("stream"):function(){};var p,m=r(52),g=r(23);c.inherits(_,h);var y=["error","close","destroy","pause","resume"];function v(t,e){t=t||{};var i=e instanceof(s=s||r(6));this.objectMode=!!t.objectMode,i&&(this.objectMode=this.objectMode||!!t.readableObjectMode);var n=t.highWaterMark,a=t.readableHighWaterMark,o=this.objectMode?16:16384;this.highWaterMark=n||0===n?n:i&&(a||0===a)?a:o,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new m,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(p||(p=r(10).StringDecoder),this.decoder=new p(t.encoding),this.encoding=t.encoding)}function _(t){if(s=s||r(6),!(this instanceof _))return new _(t);this._readableState=new v(t,this),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),h.call(this)}function b(t,e,r,i,n){var s,a=t._readableState;null===e?(a.reading=!1,function(t,e){if(e.ended)return;if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,x(t)}(t,a)):(n||(s=function(t,e){var r;i=e,u.isBuffer(i)||i instanceof l||"string"==typeof e||void 0===e||t.objectMode||(r=new TypeError("Invalid non-string/buffer chunk"));var i;return r}(a,e)),s?t.emit("error",s):a.objectMode||e&&e.length>0?("string"==typeof e||a.objectMode||Object.getPrototypeOf(e)===u.prototype||(e=function(t){return u.from(t)}(e)),i?a.endEmitted?t.emit("error",new Error("stream.unshift() after end event")):w(t,a,e,!0):a.ended?t.emit("error",new Error("stream.push() after EOF")):(a.reading=!1,a.decoder&&!r?(e=a.decoder.write(e),a.objectMode||0!==e.length?w(t,a,e,!1):S(t,a)):w(t,a,e,!1))):i||(a.reading=!1));return function(t){return!t.ended&&(t.needReadable||t.length<t.highWaterMark||0===t.length)}(a)}function w(t,e,r,i){e.flowing&&0===e.length&&!e.sync?(t.emit("data",r),t.read(0)):(e.length+=e.objectMode?1:r.length,i?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&x(t)),S(t,e)}Object.defineProperty(_.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}}),_.prototype.destroy=g.destroy,_.prototype._undestroy=g.undestroy,_.prototype._destroy=function(t,e){this.push(null),e(t)},_.prototype.push=function(t,e){var r,i=this._readableState;return i.objectMode?r=!0:"string"==typeof t&&((e=e||i.defaultEncoding)!==i.encoding&&(t=u.from(t,e),e=""),r=!0),b(this,t,e,!1,r)},_.prototype.unshift=function(t){return b(this,t,null,!0,!1)},_.prototype.isPaused=function(){return!1===this._readableState.flowing},_.prototype.setEncoding=function(t){return p||(p=r(10).StringDecoder),this._readableState.decoder=new p(t),this._readableState.encoding=t,this};function M(t,e){return t<=0||0===e.length&&e.ended?0:e.objectMode?1:t!=t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=function(t){return t>=8388608?t=8388608:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function x(t){var e=t._readableState;e.needReadable=!1,e.emittedReadable||(d("emitReadable",e.flowing),e.emittedReadable=!0,e.sync?n.nextTick(k,t):k(t))}function k(t){d("emit readable"),t.emit("readable"),O(t)}function S(t,e){e.readingMore||(e.readingMore=!0,n.nextTick(E,t,e))}function E(t,e){for(var r=e.length;!e.reading&&!e.flowing&&!e.ended&&e.length<e.highWaterMark&&(d("maybeReadMore read 0"),t.read(0),r!==e.length);)r=e.length;e.readingMore=!1}function C(t){d("readable nexttick read 0"),t.read(0)}function A(t,e){e.reading||(d("resume read 0"),t.read(0)),e.resumeScheduled=!1,e.awaitDrain=0,t.emit("resume"),O(t),e.flowing&&!e.reading&&t.read(0)}function O(t){var e=t._readableState;for(d("flow",e.flowing);e.flowing&&null!==t.read(););}function T(t,e){return 0===e.length?null:(e.objectMode?r=e.buffer.shift():!t||t>=e.length?(r=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.head.data:e.buffer.concat(e.length),e.buffer.clear()):r=function(t,e,r){var i;t<e.head.data.length?(i=e.head.data.slice(0,t),e.head.data=e.head.data.slice(t)):i=t===e.head.data.length?e.shift():r?function(t,e){var r=e.head,i=1,n=r.data;t-=n.length;for(;r=r.next;){var s=r.data,a=t>s.length?s.length:t;if(a===s.length?n+=s:n+=s.slice(0,t),0===(t-=a)){a===s.length?(++i,r.next?e.head=r.next:e.head=e.tail=null):(e.head=r,r.data=s.slice(a));break}++i}return e.length-=i,n}(t,e):function(t,e){var r=u.allocUnsafe(t),i=e.head,n=1;i.data.copy(r),t-=i.data.length;for(;i=i.next;){var s=i.data,a=t>s.length?s.length:t;if(s.copy(r,r.length-t,0,a),0===(t-=a)){a===s.length?(++n,i.next?e.head=i.next:e.head=e.tail=null):(e.head=i,i.data=s.slice(a));break}++n}return e.length-=n,r}(t,e);return i}(t,e.buffer,e.decoder),r);var r}function I(t){var e=t._readableState;if(e.length>0)throw new Error('"endReadable()" called on non-empty stream');e.endEmitted||(e.ended=!0,n.nextTick(L,e,t))}function L(t,e){t.endEmitted||0!==t.length||(t.endEmitted=!0,e.readable=!1,e.emit("end"))}function P(t,e){for(var r=0,i=t.length;r<i;r++)if(t[r]===e)return r;return-1}_.prototype.read=function(t){d("read",t),t=parseInt(t,10);var e=this._readableState,r=t;if(0!==t&&(e.emittedReadable=!1),0===t&&e.needReadable&&(e.length>=e.highWaterMark||e.ended))return d("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?I(this):x(this),null;if(0===(t=M(t,e))&&e.ended)return 0===e.length&&I(this),null;var i,n=e.needReadable;return d("need readable",n),(0===e.length||e.length-t<e.highWaterMark)&&d("length less than watermark",n=!0),e.ended||e.reading?d("reading or ended",n=!1):n&&(d("do read"),e.reading=!0,e.sync=!0,0===e.length&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=M(r,e))),null===(i=t>0?T(t,e):null)?(e.needReadable=!0,t=0):e.length-=t,0===e.length&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&I(this)),null!==i&&this.emit("data",i),i},_.prototype._read=function(t){this.emit("error",new Error("_read() is not implemented"))},_.prototype.pipe=function(t,e){var r=this,s=this._readableState;switch(s.pipesCount){case 0:s.pipes=t;break;case 1:s.pipes=[s.pipes,t];break;default:s.pipes.push(t)}s.pipesCount+=1,d("pipe count=%d opts=%j",s.pipesCount,e);var h=(!e||!1!==e.end)&&t!==i.stdout&&t!==i.stderr?l:_;function u(e,i){d("onunpipe"),e===r&&i&&!1===i.hasUnpiped&&(i.hasUnpiped=!0,d("cleanup"),t.removeListener("close",y),t.removeListener("finish",v),t.removeListener("drain",c),t.removeListener("error",g),t.removeListener("unpipe",u),r.removeListener("end",l),r.removeListener("end",_),r.removeListener("data",m),f=!0,!s.awaitDrain||t._writableState&&!t._writableState.needDrain||c())}function l(){d("onend"),t.end()}s.endEmitted?n.nextTick(h):r.once("end",h),t.on("unpipe",u);var c=function(t){return function(){var e=t._readableState;d("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&o(t,"data")&&(e.flowing=!0,O(t))}}(r);t.on("drain",c);var f=!1;var p=!1;function m(e){d("ondata"),p=!1,!1!==t.write(e)||p||((1===s.pipesCount&&s.pipes===t||s.pipesCount>1&&-1!==P(s.pipes,t))&&!f&&(d("false write response, pause",r._readableState.awaitDrain),r._readableState.awaitDrain++,p=!0),r.pause())}function g(e){d("onerror",e),_(),t.removeListener("error",g),0===o(t,"error")&&t.emit("error",e)}function y(){t.removeListener("finish",v),_()}function v(){d("onfinish"),t.removeListener("close",y),_()}function _(){d("unpipe"),r.unpipe(t)}return r.on("data",m),function(t,e,r){if("function"==typeof t.prependListener)return t.prependListener(e,r);t._events&&t._events[e]?a(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]:t.on(e,r)}(t,"error",g),t.once("close",y),t.once("finish",v),t.emit("pipe",r),s.flowing||(d("pipe resume"),r.resume()),t},_.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes||(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r)),this;if(!t){var i=e.pipes,n=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var s=0;s<n;s++)i[s].emit("unpipe",this,r);return this}var a=P(e.pipes,t);return-1===a||(e.pipes.splice(a,1),e.pipesCount-=1,1===e.pipesCount&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,r)),this},_.prototype.on=function(t,e){var r=h.prototype.on.call(this,t,e);if("data"===t)!1!==this._readableState.flowing&&this.resume();else if("readable"===t){var i=this._readableState;i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.emittedReadable=!1,i.reading?i.length&&x(this):n.nextTick(C,this))}return r},_.prototype.addListener=_.prototype.on,_.prototype.resume=function(){var t=this._readableState;return t.flowing||(d("resume"),t.flowing=!0,function(t,e){e.resumeScheduled||(e.resumeScheduled=!0,n.nextTick(A,t,e))}(this,t)),this},_.prototype.pause=function(){return d("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(d("pause"),this._readableState.flowing=!1,this.emit("pause")),this},_.prototype.wrap=function(t){var e=this,r=this._readableState,i=!1;for(var n in t.on("end",(function(){if(d("wrapped end"),r.decoder&&!r.ended){var t=r.decoder.end();t&&t.length&&e.push(t)}e.push(null)})),t.on("data",(function(n){(d("wrapped data"),r.decoder&&(n=r.decoder.write(n)),r.objectMode&&null==n)||(r.objectMode||n&&n.length)&&(e.push(n)||(i=!0,t.pause()))})),t)void 0===this[n]&&"function"==typeof t[n]&&(this[n]=function(e){return function(){return t[e].apply(t,arguments)}}(n));for(var s=0;s<y.length;s++)t.on(y[s],this.emit.bind(this,y[s]));return this._read=function(e){d("wrapped _read",e),i&&(i=!1,t.resume())},this},Object.defineProperty(_.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),_._fromList=T}).call(this,r(1),r(4))},function(t,e,r){"use strict";var i,n="object"==typeof Reflect?Reflect:null,s=n&&"function"==typeof n.apply?n.apply:function(t,e,r){return Function.prototype.apply.call(t,e,r)};i=n&&"function"==typeof n.ownKeys?n.ownKeys:Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:function(t){return Object.getOwnPropertyNames(t)};var a=Number.isNaN||function(t){return t!=t};function o(){o.init.call(this)}t.exports=o,t.exports.once=function(t,e){return new Promise((function(r,i){function n(r){t.removeListener(e,s),i(r)}function s(){"function"==typeof t.removeListener&&t.removeListener("error",n),r([].slice.call(arguments))}y(t,e,s,{once:!0}),"error"!==e&&function(t,e,r){"function"==typeof t.on&&y(t,"error",e,r)}(t,n,{once:!0})}))},o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var h=10;function u(t){if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}function l(t){return void 0===t._maxListeners?o.defaultMaxListeners:t._maxListeners}function c(t,e,r,i){var n,s,a,o;if(u(r),void 0===(s=t._events)?(s=t._events=Object.create(null),t._eventsCount=0):(void 0!==s.newListener&&(t.emit("newListener",e,r.listener?r.listener:r),s=t._events),a=s[e]),void 0===a)a=s[e]=r,++t._eventsCount;else if("function"==typeof a?a=s[e]=i?[r,a]:[a,r]:i?a.unshift(r):a.push(r),(n=l(t))>0&&a.length>n&&!a.warned){a.warned=!0;var h=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");h.name="MaxListenersExceededWarning",h.emitter=t,h.type=e,h.count=a.length,o=h,console&&console.warn&&console.warn(o)}return t}function f(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function d(t,e,r){var i={fired:!1,wrapFn:void 0,target:t,type:e,listener:r},n=f.bind(i);return n.listener=r,i.wrapFn=n,n}function p(t,e,r){var i=t._events;if(void 0===i)return[];var n=i[e];return void 0===n?[]:"function"==typeof n?r?[n.listener||n]:[n]:r?function(t){for(var e=new Array(t.length),r=0;r<e.length;++r)e[r]=t[r].listener||t[r];return e}(n):g(n,n.length)}function m(t){var e=this._events;if(void 0!==e){var r=e[t];if("function"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function g(t,e){for(var r=new Array(e),i=0;i<e;++i)r[i]=t[i];return r}function y(t,e,r,i){if("function"==typeof t.on)i.once?t.once(e,r):t.on(e,r);else{if("function"!=typeof t.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof t);t.addEventListener(e,(function n(s){i.once&&t.removeEventListener(e,n),r(s)}))}}Object.defineProperty(o,"defaultMaxListeners",{enumerable:!0,get:function(){return h},set:function(t){if("number"!=typeof t||t<0||a(t))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+t+".");h=t}}),o.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},o.prototype.setMaxListeners=function(t){if("number"!=typeof t||t<0||a(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this},o.prototype.getMaxListeners=function(){return l(this)},o.prototype.emit=function(t){for(var e=[],r=1;r<arguments.length;r++)e.push(arguments[r]);var i="error"===t,n=this._events;if(void 0!==n)i=i&&void 0===n.error;else if(!i)return!1;if(i){var a;if(e.length>0&&(a=e[0]),a instanceof Error)throw a;var o=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw o.context=a,o}var h=n[t];if(void 0===h)return!1;if("function"==typeof h)s(h,this,e);else{var u=h.length,l=g(h,u);for(r=0;r<u;++r)s(l[r],this,e)}return!0},o.prototype.addListener=function(t,e){return c(this,t,e,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(t,e){return c(this,t,e,!0)},o.prototype.once=function(t,e){return u(e),this.on(t,d(this,t,e)),this},o.prototype.prependOnceListener=function(t,e){return u(e),this.prependListener(t,d(this,t,e)),this},o.prototype.removeListener=function(t,e){var r,i,n,s,a;if(u(e),void 0===(i=this._events))return this;if(void 0===(r=i[t]))return this;if(r===e||r.listener===e)0==--this._eventsCount?this._events=Object.create(null):(delete i[t],i.removeListener&&this.emit("removeListener",t,r.listener||e));else if("function"!=typeof r){for(n=-1,s=r.length-1;s>=0;s--)if(r[s]===e||r[s].listener===e){a=r[s].listener,n=s;break}if(n<0)return this;0===n?r.shift():function(t,e){for(;e+1<t.length;e++)t[e]=t[e+1];t.pop()}(r,n),1===r.length&&(i[t]=r[0]),void 0!==i.removeListener&&this.emit("removeListener",t,a||e)}return this},o.prototype.off=o.prototype.removeListener,o.prototype.removeAllListeners=function(t){var e,r,i;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[t]&&(0==--this._eventsCount?this._events=Object.create(null):delete r[t]),this;if(0===arguments.length){var n,s=Object.keys(r);for(i=0;i<s.length;++i)"removeListener"!==(n=s[i])&&this.removeAllListeners(n);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(e=r[t]))this.removeListener(t,e);else if(void 0!==e)for(i=e.length-1;i>=0;i--)this.removeListener(t,e[i]);return this},o.prototype.listeners=function(t){return p(this,t,!0)},o.prototype.rawListeners=function(t){return p(this,t,!1)},o.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):m.call(t,e)},o.prototype.listenerCount=m,o.prototype.eventNames=function(){return this._eventsCount>0?i(this._events):[]}},function(t,e,r){t.exports=r(21).EventEmitter},function(t,e,r){"use strict";var i=r(9);function n(t,e){t.emit("error",e)}t.exports={destroy:function(t,e){var r=this,s=this._readableState&&this._readableState.destroyed,a=this._writableState&&this._writableState.destroyed;return s||a?(e?e(t):!t||this._writableState&&this._writableState.errorEmitted||i.nextTick(n,this,t),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,(function(t){!e&&t?(i.nextTick(n,r,t),r._writableState&&(r._writableState.errorEmitted=!0)):e&&e(t)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}},function(t,e,r){"use strict";(function(e,i,n){var s=r(9);function a(t){var e=this;this.next=null,this.entry=null,this.finish=function(){!function(t,e,r){var i=t.entry;t.entry=null;for(;i;){var n=i.callback;e.pendingcb--,n(r),i=i.next}e.corkedRequestsFree?e.corkedRequestsFree.next=t:e.corkedRequestsFree=t}(e,t)}}t.exports=v;var o,h=!e.browser&&["v0.10","v0.9."].indexOf(e.version.slice(0,5))>-1?i:s.nextTick;v.WritableState=y;var u=Object.create(r(8));u.inherits=r(5);var l={deprecate:r(54)},c=r(22),f=r(11).Buffer,d=n.Uint8Array||function(){};var p,m=r(23);function g(){}function y(t,e){o=o||r(6),t=t||{};var i=e instanceof o;this.objectMode=!!t.objectMode,i&&(this.objectMode=this.objectMode||!!t.writableObjectMode);var n=t.highWaterMark,u=t.writableHighWaterMark,l=this.objectMode?16:16384;this.highWaterMark=n||0===n?n:i&&(u||0===u)?u:l,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var c=!1===t.decodeStrings;this.decodeStrings=!c,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){!function(t,e){var r=t._writableState,i=r.sync,n=r.writecb;if(function(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}(r),e)!function(t,e,r,i,n){--e.pendingcb,r?(s.nextTick(n,i),s.nextTick(k,t,e),t._writableState.errorEmitted=!0,t.emit("error",i)):(n(i),t._writableState.errorEmitted=!0,t.emit("error",i),k(t,e))}(t,r,i,e,n);else{var a=M(r);a||r.corked||r.bufferProcessing||!r.bufferedRequest||w(t,r),i?h(b,t,r,a,n):b(t,r,a,n)}}(e,t)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new a(this)}function v(t){if(o=o||r(6),!(p.call(v,this)||this instanceof o))return new v(t);this._writableState=new y(t,this),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),c.call(this)}function _(t,e,r,i,n,s,a){e.writelen=i,e.writecb=a,e.writing=!0,e.sync=!0,r?t._writev(n,e.onwrite):t._write(n,s,e.onwrite),e.sync=!1}function b(t,e,r,i){r||function(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}(t,e),e.pendingcb--,i(),k(t,e)}function w(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var i=e.bufferedRequestCount,n=new Array(i),s=e.corkedRequestsFree;s.entry=r;for(var o=0,h=!0;r;)n[o]=r,r.isBuf||(h=!1),r=r.next,o+=1;n.allBuffers=h,_(t,e,!0,e.length,n,"",s.finish),e.pendingcb++,e.lastBufferedRequest=null,s.next?(e.corkedRequestsFree=s.next,s.next=null):e.corkedRequestsFree=new a(e),e.bufferedRequestCount=0}else{for(;r;){var u=r.chunk,l=r.encoding,c=r.callback;if(_(t,e,!1,e.objectMode?1:u.length,u,l,c),r=r.next,e.bufferedRequestCount--,e.writing)break}null===r&&(e.lastBufferedRequest=null)}e.bufferedRequest=r,e.bufferProcessing=!1}function M(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function x(t,e){t._final((function(r){e.pendingcb--,r&&t.emit("error",r),e.prefinished=!0,t.emit("prefinish"),k(t,e)}))}function k(t,e){var r=M(e);return r&&(!function(t,e){e.prefinished||e.finalCalled||("function"==typeof t._final?(e.pendingcb++,e.finalCalled=!0,s.nextTick(x,t,e)):(e.prefinished=!0,t.emit("prefinish")))}(t,e),0===e.pendingcb&&(e.finished=!0,t.emit("finish"))),r}u.inherits(v,c),y.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},function(){try{Object.defineProperty(y.prototype,"buffer",{get:l.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(t){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(p=Function.prototype[Symbol.hasInstance],Object.defineProperty(v,Symbol.hasInstance,{value:function(t){return!!p.call(this,t)||this===v&&(t&&t._writableState instanceof y)}})):p=function(t){return t instanceof this},v.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},v.prototype.write=function(t,e,r){var i,n=this._writableState,a=!1,o=!n.objectMode&&(i=t,f.isBuffer(i)||i instanceof d);return o&&!f.isBuffer(t)&&(t=function(t){return f.from(t)}(t)),"function"==typeof e&&(r=e,e=null),o?e="buffer":e||(e=n.defaultEncoding),"function"!=typeof r&&(r=g),n.ended?function(t,e){var r=new Error("write after end");t.emit("error",r),s.nextTick(e,r)}(this,r):(o||function(t,e,r,i){var n=!0,a=!1;return null===r?a=new TypeError("May not write null values to stream"):"string"==typeof r||void 0===r||e.objectMode||(a=new TypeError("Invalid non-string/buffer chunk")),a&&(t.emit("error",a),s.nextTick(i,a),n=!1),n}(this,n,t,r))&&(n.pendingcb++,a=function(t,e,r,i,n,s){if(!r){var a=function(t,e,r){t.objectMode||!1===t.decodeStrings||"string"!=typeof e||(e=f.from(e,r));return e}(e,i,n);i!==a&&(r=!0,n="buffer",i=a)}var o=e.objectMode?1:i.length;e.length+=o;var h=e.length<e.highWaterMark;h||(e.needDrain=!0);if(e.writing||e.corked){var u=e.lastBufferedRequest;e.lastBufferedRequest={chunk:i,encoding:n,isBuf:r,callback:s,next:null},u?u.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else _(t,e,!1,o,i,n,s);return h}(this,n,o,t,e,r)),a},v.prototype.cork=function(){this._writableState.corked++},v.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,t.writing||t.corked||t.finished||t.bufferProcessing||!t.bufferedRequest||w(this,t))},v.prototype.setDefaultEncoding=function(t){if("string"==typeof t&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(v.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),v.prototype._write=function(t,e,r){r(new Error("_write() is not implemented"))},v.prototype._writev=null,v.prototype.end=function(t,e,r){var i=this._writableState;"function"==typeof t?(r=t,t=null,e=null):"function"==typeof e&&(r=e,e=null),null!=t&&this.write(t,e),i.corked&&(i.corked=1,this.uncork()),i.ending||i.finished||function(t,e,r){e.ending=!0,k(t,e),r&&(e.finished?s.nextTick(r):t.once("finish",r));e.ended=!0,t.writable=!1}(this,i,r)},Object.defineProperty(v.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),v.prototype.destroy=m.destroy,v.prototype._undestroy=m.undestroy,v.prototype._destroy=function(t,e){this.end(),e(t)}}).call(this,r(4),r(15).setImmediate,r(1))},function(t,e,r){"use strict";t.exports=a;var i=r(6),n=Object.create(r(8));function s(t,e){var r=this._transformState;r.transforming=!1;var i=r.writecb;if(!i)return this.emit("error",new Error("write callback called multiple times"));r.writechunk=null,r.writecb=null,null!=e&&this.push(e),i(t);var n=this._readableState;n.reading=!1,(n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}function a(t){if(!(this instanceof a))return new a(t);i.call(this,t),this._transformState={afterTransform:s.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&("function"==typeof t.transform&&(this._transform=t.transform),"function"==typeof t.flush&&(this._flush=t.flush)),this.on("prefinish",o)}function o(){var t=this;"function"==typeof this._flush?this._flush((function(e,r){h(t,e,r)})):h(this,null,null)}function h(t,e,r){if(e)return t.emit("error",e);if(null!=r&&t.push(r),t._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(t._transformState.transforming)throw new Error("Calling transform done when still transforming");return t.push(null)}n.inherits=r(5),n.inherits(a,i),a.prototype.push=function(t,e){return this._transformState.needTransform=!1,i.prototype.push.call(this,t,e)},a.prototype._transform=function(t,e,r){throw new Error("_transform() is not implemented")},a.prototype._write=function(t,e,r){var i=this._transformState;if(i.writecb=r,i.writechunk=t,i.writeencoding=e,!i.transforming){var n=this._readableState;(i.needTransform||n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}},a.prototype._read=function(t){var e=this._transformState;null!==e.writechunk&&e.writecb&&!e.transforming?(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform)):e.needTransform=!0},a.prototype._destroy=function(t,e){var r=this;i.prototype._destroy.call(this,t,(function(t){e(t),r.emit("close")}))}},function(t,e,r){"use strict";var i=r(59),n=r(61);function s(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}e.parse=_,e.resolve=function(t,e){return _(t,!1,!0).resolve(e)},e.resolveObject=function(t,e){return t?_(t,!1,!0).resolveObject(e):e},e.format=function(t){n.isString(t)&&(t=_(t));return t instanceof s?t.format():s.prototype.format.call(t)},e.Url=s;var a=/^([a-z0-9.+-]+:)/i,o=/:[0-9]*$/,h=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,u=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),l=["'"].concat(u),c=["%","/","?",";","#"].concat(l),f=["/","?","#"],d=/^[+a-z0-9A-Z_-]{0,63}$/,p=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,m={javascript:!0,"javascript:":!0},g={javascript:!0,"javascript:":!0},y={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},v=r(62);function _(t,e,r){if(t&&n.isObject(t)&&t instanceof s)return t;var i=new s;return i.parse(t,e,r),i}s.prototype.parse=function(t,e,r){if(!n.isString(t))throw new TypeError("Parameter 'url' must be a string, not "+typeof t);var s=t.indexOf("?"),o=-1!==s&&s<t.indexOf("#")?"?":"#",u=t.split(o);u[0]=u[0].replace(/\\/g,"/");var _=t=u.join(o);if(_=_.trim(),!r&&1===t.split("#").length){var b=h.exec(_);if(b)return this.path=_,this.href=_,this.pathname=b[1],b[2]?(this.search=b[2],this.query=e?v.parse(this.search.substr(1)):this.search.substr(1)):e&&(this.search="",this.query={}),this}var w=a.exec(_);if(w){var M=(w=w[0]).toLowerCase();this.protocol=M,_=_.substr(w.length)}if(r||w||_.match(/^\/\/[^@\/]+@[^@\/]+/)){var x="//"===_.substr(0,2);!x||w&&g[w]||(_=_.substr(2),this.slashes=!0)}if(!g[w]&&(x||w&&!y[w])){for(var k,S,E=-1,C=0;C<f.length;C++){-1!==(A=_.indexOf(f[C]))&&(-1===E||A<E)&&(E=A)}-1!==(S=-1===E?_.lastIndexOf("@"):_.lastIndexOf("@",E))&&(k=_.slice(0,S),_=_.slice(S+1),this.auth=decodeURIComponent(k)),E=-1;for(C=0;C<c.length;C++){var A;-1!==(A=_.indexOf(c[C]))&&(-1===E||A<E)&&(E=A)}-1===E&&(E=_.length),this.host=_.slice(0,E),_=_.slice(E),this.parseHost(),this.hostname=this.hostname||"";var O="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!O)for(var T=this.hostname.split(/\./),I=(C=0,T.length);C<I;C++){var L=T[C];if(L&&!L.match(d)){for(var P="",R=0,N=L.length;R<N;R++)L.charCodeAt(R)>127?P+="x":P+=L[R];if(!P.match(d)){var z=T.slice(0,C),j=T.slice(C+1),B=L.match(p);B&&(z.push(B[1]),j.unshift(B[2])),j.length&&(_="/"+j.join(".")+_),this.hostname=z.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),O||(this.hostname=i.toASCII(this.hostname));var D=this.port?":"+this.port:"",U=this.hostname||"";this.host=U+D,this.href+=this.host,O&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==_[0]&&(_="/"+_))}if(!m[M])for(C=0,I=l.length;C<I;C++){var F=l[C];if(-1!==_.indexOf(F)){var q=encodeURIComponent(F);q===F&&(q=escape(F)),_=_.split(F).join(q)}}var G=_.indexOf("#");-1!==G&&(this.hash=_.substr(G),_=_.slice(0,G));var W=_.indexOf("?");if(-1!==W?(this.search=_.substr(W),this.query=_.substr(W+1),e&&(this.query=v.parse(this.query)),_=_.slice(0,W)):e&&(this.search="",this.query={}),_&&(this.pathname=_),y[M]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){D=this.pathname||"";var H=this.search||"";this.path=D+H}return this.href=this.format(),this},s.prototype.format=function(){var t=this.auth||"";t&&(t=(t=encodeURIComponent(t)).replace(/%3A/i,":"),t+="@");var e=this.protocol||"",r=this.pathname||"",i=this.hash||"",s=!1,a="";this.host?s=t+this.host:this.hostname&&(s=t+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(s+=":"+this.port)),this.query&&n.isObject(this.query)&&Object.keys(this.query).length&&(a=v.stringify(this.query));var o=this.search||a&&"?"+a||"";return e&&":"!==e.substr(-1)&&(e+=":"),this.slashes||(!e||y[e])&&!1!==s?(s="//"+(s||""),r&&"/"!==r.charAt(0)&&(r="/"+r)):s||(s=""),i&&"#"!==i.charAt(0)&&(i="#"+i),o&&"?"!==o.charAt(0)&&(o="?"+o),e+s+(r=r.replace(/[?#]/g,(function(t){return encodeURIComponent(t)})))+(o=o.replace("#","%23"))+i},s.prototype.resolve=function(t){return this.resolveObject(_(t,!1,!0)).format()},s.prototype.resolveObject=function(t){if(n.isString(t)){var e=new s;e.parse(t,!1,!0),t=e}for(var r=new s,i=Object.keys(this),a=0;a<i.length;a++){var o=i[a];r[o]=this[o]}if(r.hash=t.hash,""===t.href)return r.href=r.format(),r;if(t.slashes&&!t.protocol){for(var h=Object.keys(t),u=0;u<h.length;u++){var l=h[u];"protocol"!==l&&(r[l]=t[l])}return y[r.protocol]&&r.hostname&&!r.pathname&&(r.path=r.pathname="/"),r.href=r.format(),r}if(t.protocol&&t.protocol!==r.protocol){if(!y[t.protocol]){for(var c=Object.keys(t),f=0;f<c.length;f++){var d=c[f];r[d]=t[d]}return r.href=r.format(),r}if(r.protocol=t.protocol,t.host||g[t.protocol])r.pathname=t.pathname;else{for(var p=(t.pathname||"").split("/");p.length&&!(t.host=p.shift()););t.host||(t.host=""),t.hostname||(t.hostname=""),""!==p[0]&&p.unshift(""),p.length<2&&p.unshift(""),r.pathname=p.join("/")}if(r.search=t.search,r.query=t.query,r.host=t.host||"",r.auth=t.auth,r.hostname=t.hostname||t.host,r.port=t.port,r.pathname||r.search){var m=r.pathname||"",v=r.search||"";r.path=m+v}return r.slashes=r.slashes||t.slashes,r.href=r.format(),r}var _=r.pathname&&"/"===r.pathname.charAt(0),b=t.host||t.pathname&&"/"===t.pathname.charAt(0),w=b||_||r.host&&t.pathname,M=w,x=r.pathname&&r.pathname.split("/")||[],k=(p=t.pathname&&t.pathname.split("/")||[],r.protocol&&!y[r.protocol]);if(k&&(r.hostname="",r.port=null,r.host&&(""===x[0]?x[0]=r.host:x.unshift(r.host)),r.host="",t.protocol&&(t.hostname=null,t.port=null,t.host&&(""===p[0]?p[0]=t.host:p.unshift(t.host)),t.host=null),w=w&&(""===p[0]||""===x[0])),b)r.host=t.host||""===t.host?t.host:r.host,r.hostname=t.hostname||""===t.hostname?t.hostname:r.hostname,r.search=t.search,r.query=t.query,x=p;else if(p.length)x||(x=[]),x.pop(),x=x.concat(p),r.search=t.search,r.query=t.query;else if(!n.isNullOrUndefined(t.search)){if(k)r.hostname=r.host=x.shift(),(O=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=O.shift(),r.host=r.hostname=O.shift());return r.search=t.search,r.query=t.query,n.isNull(r.pathname)&&n.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r}if(!x.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var S=x.slice(-1)[0],E=(r.host||t.host||x.length>1)&&("."===S||".."===S)||""===S,C=0,A=x.length;A>=0;A--)"."===(S=x[A])?x.splice(A,1):".."===S?(x.splice(A,1),C++):C&&(x.splice(A,1),C--);if(!w&&!M)for(;C--;C)x.unshift("..");!w||""===x[0]||x[0]&&"/"===x[0].charAt(0)||x.unshift(""),E&&"/"!==x.join("/").substr(-1)&&x.push("");var O,T=""===x[0]||x[0]&&"/"===x[0].charAt(0);k&&(r.hostname=r.host=T?"":x.length?x.shift():"",(O=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=O.shift(),r.host=r.hostname=O.shift()));return(w=w||r.host&&x.length)&&!T&&x.unshift(""),x.length?r.pathname=x.join("/"):(r.pathname=null,r.path=null),n.isNull(r.pathname)&&n.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=t.auth||r.auth,r.slashes=r.slashes||t.slashes,r.href=r.format(),r},s.prototype.parseHost=function(){var t=this.host,e=o.exec(t);e&&(":"!==(e=e[0])&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)}},function(t,e,r){"use strict";r.d(e,"a",(function(){return h}));var i=r(3),n=r.n(i),s=r(0),a=r.n(s),o=r(47);function h(t){return u.apply(this,arguments)}function u(){return(u=n()(a.a.mark((function t(e){var r,i,s;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=new o,t.next=3,r.loadAsync(e);case 3:return i=r.file(/.+/),s={},t.next=7,Promise.all(i.map(function(){var t=n()(a.a.mark((function t(e){var r;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if("shp"!==e.name.slice(-3).toLowerCase()&&"dbf"!==e.name.slice(-3).toLowerCase()){t.next=6;break}return t.next=3,e.async("nodebuffer");case 3:r=t.sent,t.next=9;break;case 6:return t.next=8,e.async("text");case 8:r=t.sent;case 9:s[e.name]=r;case 10:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()));case 7:return t.abrupt("return",s);case 8:case"end":return t.stop()}}),t)})))).apply(this,arguments)}},function(t,e,r){"use strict";function i(t,e){return!function(t){for(var e,r,i=0,n=1,s=t.length;n<s;)e=r||t[0],i+=((r=t[n])[0]-e[0])*(r[1]+e[1]),n++;return i>0}(e)&&t.length?t[t.length-1].push(e):t.push([e]),t}r.d(e,"a",(function(){return a})),s.prototype.parsePoint=function(t){return{type:"Point",coordinates:this.parseCoord(t,0)}},s.prototype.parseZPoint=function(t){var e=this.parsePoint(t);return e.coordinates.push(t.readDoubleLE(16)),e},s.prototype.parsePointArray=function(t,e,r){for(var i=[],n=0;n<r;)i.push(this.parseCoord(t,e)),e+=16,n++;return i},s.prototype.parseZPointArray=function(t,e,r,i){for(var n=0;n<r;)i[n].push(t.readDoubleLE(e)),n++,e+=8;return i},s.prototype.parseArrayGroup=function(t,e,r,i,n){for(var s,a,o=[],h=0,u=0;h<i;)r+=4,s=u,(a=(u=++h===i?n:t.readInt32LE(r))-s)&&(o.push(this.parsePointArray(t,e,a)),e+=a<<4);return o},s.prototype.parseZArrayGroup=function(t,e,r,i){for(var n=0;n<r;)i[n]=this.parseZPointArray(t,e,i[n].length,i[n]),e+=i[n].length<<3,n++;return i},s.prototype.parseMultiPoint=function(t){var e={},r=t.readInt32LE(32,!0);if(!r)return null;var i=this.parseCoord(t,0),n=this.parseCoord(t,16);e.bbox=[i[0],i[1],n[0],n[1]];return 1===r?(e.type="Point",e.coordinates=this.parseCoord(t,36)):(e.type="MultiPoint",e.coordinates=this.parsePointArray(t,36,r)),e},s.prototype.parseZMultiPoint=function(t){var e,r=this.parseMultiPoint(t);if(!r)return null;if("Point"===r.type)return r.coordinates.push(t.readDoubleLE(72)),r;var i=52+((e=r.coordinates.length)<<4);return r.coordinates=this.parseZPointArray(t,i,e,r.coordinates),r},s.prototype.parsePolyline=function(t){var e={},r=t.readInt32LE(32);if(!r)return null;var i=this.parseCoord(t,0),n=this.parseCoord(t,16);e.bbox=[i[0],i[1],n[0],n[1]];var s,a=t.readInt32LE(36);return 1===r?(e.type="LineString",s=44,e.coordinates=this.parsePointArray(t,s,a)):(e.type="MultiLineString",s=40+(r<<2),40,e.coordinates=this.parseArrayGroup(t,s,40,r,a)),e},s.prototype.parseZPolyline=function(t){var e=this.parsePolyline(t);if(!e)return null;var r,i=e.coordinates.length;return"LineString"===e.type?(r=60+(i<<4),e.coordinates=this.parseZPointArray(t,r,i,e.coordinates),e):(r=56+(e.coordinates.reduce((function(t,e){return t+e.length}),0)<<4)+(i<<2),e.coordinates=this.parseZArrayGroup(t,r,i,e.coordinates),e)},s.prototype.polyFuncs=function(t){return t?"LineString"===t.type?(t.type="Polygon",t.coordinates=[t.coordinates],t):(t.coordinates=t.coordinates.reduce(i,[]),1===t.coordinates.length?(t.type="Polygon",t.coordinates=t.coordinates[0],t):(t.type="MultiPolygon",t)):t},s.prototype.parsePolygon=function(t){return this.polyFuncs(this.parsePolyline(t))},s.prototype.parseZPolygon=function(t){return this.polyFuncs(this.parseZPolyline(t))};var n={1:"parsePoint",3:"parsePolyline",5:"parsePolygon",8:"parseMultiPoint",11:"parseZPoint",13:"parseZPolyline",15:"parseZPolygon",18:"parseZMultiPoint"};function s(t,e){if(!(this instanceof s))return new s(t,e);this.buffer=t,this.headers=this.parseHeader(),this.headers.length<this.buffer.byteLength&&(this.buffer=this.buffer.slice(0,this.headers.length)),this.shpFuncs(e),this.rows=this.getRows()}function a(t,e){return new s(t,e).rows}s.prototype.shpFuncs=function(t){var e,r=this.headers.shpCode;if(r>20&&(r-=20),!(r in n))throw new Error("I don't know that shp type");this.parseFunc=this[n[r]],this.parseCoord=(e=t)?function(t,r){var i=[t.readDoubleLE(r),t.readDoubleLE(r+8)];return e.inverse(i)}:function(t,e){return[t.readDoubleLE(e),t.readDoubleLE(e+8)]}},s.prototype.getShpCode=function(){return this.parseHeader().shpCode},s.prototype.parseHeader=function(){var t=this.buffer.slice(0,100);return{length:t.readInt32BE(24)<<1,version:t.readInt32LE(28),shpCode:t.readInt32LE(32),bbox:[t.readDoubleLE(36),t.readDoubleLE(44),t.readDoubleLE(52),t.readDoubleLE(52)]}},s.prototype.getRows=function(){for(var t,e=100,r=this.buffer.byteLength,i=[];e<r&&(t=this.getRow(e));)e+=8,e+=t.len,t.type?i.push(this.parseFunc(t.data)):i.push(null);return i},s.prototype.getRow=function(t){var e=this.buffer.slice(t,t+12),r=e.readInt32BE(4)<<1,i=e.readInt32BE(0);return 0===r?{id:i,len:r,type:0}:{id:i,len:r,data:this.buffer.slice(t+12,t+r+8),type:e.readInt32LE(8)}}},function(t,e,r){"use strict";r.r(e),function(t){r.d(e,"toGeoJSON",(function(){return w})),r.d(e,"combine",(function(){return M})),r.d(e,"parseZip",(function(){return x})),r.d(e,"getZip",(function(){return S})),r.d(e,"getShapefile",(function(){return L})),r.d(e,"parseShp",(function(){return R})),r.d(e,"parseDbf",(function(){return N}));var i=r(3),n=r.n(i),s=r(12),a=r.n(s),o=r(0),h=r.n(o),u=r(27),l=r(7),c=r(28),f=r(66),d=r(37),p=r(14),m=r(46),g=r(2).Buffer;function y(t){return window.proj4?window.proj4(t):window.mars3d&&window.mars3d.proj4?window.mars3d.proj4(t):f(t)}f.default&&(f=f.default);var v=new m({max:20});function _(t){if(!t)throw new Error("forgot to pass buffer");return g.isBuffer(t)?t:b(t)?g.from(t):b(t.buffer)?1===t.BYTES_PER_ELEMENT?g.from(t):g.from(t.buffer):void 0}function b(e){return e instanceof t.ArrayBuffer||"[object ArrayBuffer]"===Object.prototype.toString.call(e)}function w(t,e,r,i){return"string"==typeof t&&v.has(t)?p.resolve(v.get(t)):L(t,e,r,i).then((function(e){return"string"==typeof t&&v.set(t,e),e}))}function M(t){var e=a()(t,2),r=e[0],i=e[1],n={type:"FeatureCollection",features:[]},s=0,o=r.length;for(i||(i=[]);s<o;)n.features.push({type:"Feature",geometry:r[s],properties:i[s]||{}}),s++;return n}function x(t,e,r,i){return k.apply(this,arguments)}function k(){return(k=n()(h.a.mark((function t(e,r,i,n){var s,a,o,l,c;return h.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=_(e),t.next=3,Object(u.a)(e);case 3:a=t.sent,o=[],r=r||[],t.t0=h.a.keys(a);case 7:if((t.t1=t.t0()).done){t.next=14;break}if(-1===(s=t.t1.value).indexOf("__MACOSX")){t.next=11;break}return t.abrupt("continue",7);case 11:if("shp"===s.slice(-3).toLowerCase())o.push(s.slice(0,-4)),a[s.slice(0,-3)+s.slice(-3).toLowerCase()]=a[s];else if("prj"===s.slice(-3).toLowerCase()){l=void 0;try{l=y(n||a[s])}catch(t){console.error("该坐标系proj4未解析,将原样转出",t),l=y("EPSG:4326")}a[s.slice(0,-3)+s.slice(-3).toLowerCase()]=l}else"json"===s.slice(-4).toLowerCase()||r.indexOf(s.split(".").pop())>-1?o.push(s.slice(0,-3)+s.slice(-3).toLowerCase()):"dbf"!==s.slice(-3).toLowerCase()&&"cpg"!==s.slice(-3).toLowerCase()||(a[s.slice(0,-3)+s.slice(-3).toLowerCase()]=a[s]);t.next=7;break;case 14:if(o.length){t.next=16;break}throw new Error("no layers founds");case 16:if(1!==(c=o.map((function(t){var e,n,s=t.lastIndexOf(".");return s>-1&&t.slice(s).indexOf("json")>-1?(e=JSON.parse(a[t])).fileName=t.slice(0,s):r.indexOf(t.slice(s+1))>-1?(e=a[t]).fileName=t:(a[t+".dbf"]&&(n=N(a[t+".dbf"],i||a[t+".cpg"])),(e=M([R(a[t+".shp"],a[t+".prj"]),n])).fileName=t),e}))).length){t.next=21;break}return t.abrupt("return",c[0]);case 21:return t.abrupt("return",c);case 22:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function S(t,e,r,i){return E.apply(this,arguments)}function E(){return(E=n()(h.a.mark((function t(e,r,i,n){var s;return h.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(l.a)(e);case 2:return s=t.sent,t.abrupt("return",x(s,r,i,n));case 4:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function C(t){return A.apply(this,arguments)}function A(){return(A=n()(h.a.mark((function t(e){var r,i;return h.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,p.all([Object(l.a)(e,"shp"),Object(l.a)(e,"prj")]);case 2:r=t.sent,i=!1;try{r[1]&&(i=y(r[1]))}catch(t){i=!1}return t.abrupt("return",R(r[0],i));case 6:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function O(t){return T.apply(this,arguments)}function T(){return(T=n()(h.a.mark((function t(e){var r,i,n,s;return h.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,p.all([Object(l.a)(e,"dbf"),Object(l.a)(e,"cpg")]);case 2:if(r=t.sent,i=a()(r,2),n=i[0],s=i[1],n){t.next=8;break}return t.abrupt("return");case 8:return t.abrupt("return",N(n,s));case 9:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function I(t,e){return t.toLowerCase().endsWith(e)}function L(t,e,r,i){return P.apply(this,arguments)}function P(){return(P=n()(h.a.mark((function t(e,r,i,n){var s;return h.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if("string"==typeof e){t.next=2;break}return t.abrupt("return",x(e,r,i,n));case 2:if(!I(e,".zip")){t.next=4;break}return t.abrupt("return",S(e,r,i,n));case 4:return t.next=6,p.all([C(e),O(e)]);case 6:return s=t.sent,t.abrupt("return",M(s));case 8:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function R(t,e){if(t=_(t),g.isBuffer(e)&&(e=e.toString()),"string"==typeof e)try{e=y(e)}catch(t){e=!1}return Object(c.a)(t,e)}function N(t,e){return t=_(t),d(t,e)}}.call(this,r(1))},function(t,e){t.exports=function(t){if(Array.isArray(t))return t},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e){t.exports=function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var i,n,s=[],a=!0,o=!1;try{for(r=r.call(t);!(a=(i=r.next()).done)&&(s.push(i.value),!e||s.length!==e);a=!0);}catch(t){o=!0,n=t}finally{try{a||null==r.return||r.return()}finally{if(o)throw n}}return s}},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,r){var i=r(33);t.exports=function(t,e){if(t){if("string"==typeof t)return i(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?i(t,e):void 0}},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e){t.exports=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,i=new Array(e);r<e;r++)i[r]=t[r];return i},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e){t.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,r){var i=r(36).default;function n(){"use strict";
| /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */t.exports=n=function(){return e},t.exports.__esModule=!0,t.exports.default=t.exports;var e={},r=Object.prototype,s=r.hasOwnProperty,a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",h=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function c(t,e,r,i){var n=e&&e.prototype instanceof p?e:p,s=Object.create(n.prototype),a=new E(i||[]);return s._invoke=function(t,e,r){var i="suspendedStart";return function(n,s){if("executing"===i)throw new Error("Generator is already running");if("completed"===i){if("throw"===n)throw s;return A()}for(r.method=n,r.arg=s;;){var a=r.delegate;if(a){var o=x(a,r);if(o){if(o===d)continue;return o}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===i)throw i="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i="executing";var h=f(t,e,r);if("normal"===h.type){if(i=r.done?"completed":"suspendedYield",h.arg===d)continue;return{value:h.arg,done:r.done}}"throw"===h.type&&(i="completed",r.method="throw",r.arg=h.arg)}}}(t,r,a),s}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=c;var d={};function p(){}function m(){}function g(){}var y={};l(y,o,(function(){return this}));var v=Object.getPrototypeOf,_=v&&v(v(C([])));_&&_!==r&&s.call(_,o)&&(y=_);var b=g.prototype=p.prototype=Object.create(y);function w(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function M(t,e){var r;this._invoke=function(n,a){function o(){return new e((function(r,o){!function r(n,a,o,h){var u=f(t[n],t,a);if("throw"!==u.type){var l=u.arg,c=l.value;return c&&"object"==i(c)&&s.call(c,"__await")?e.resolve(c.__await).then((function(t){r("next",t,o,h)}),(function(t){r("throw",t,o,h)})):e.resolve(c).then((function(t){l.value=t,o(l)}),(function(t){return r("throw",t,o,h)}))}h(u.arg)}(n,a,r,o)}))}return r=r?r.then(o,o):o()}}function x(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,x(t,e),"throw"===e.method))return d;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return d}var i=f(r,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,d;var n=i.arg;return n?n.done?(e[t.resultName]=n.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,d):n:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,d)}function k(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function S(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function E(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(k,this),this.reset(!0)}function C(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,i=function e(){for(;++r<t.length;)if(s.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:A}}function A(){return{value:void 0,done:!0}}return m.prototype=g,l(b,"constructor",g),l(g,"constructor",m),m.displayName=l(g,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===m||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,l(t,u,"GeneratorFunction")),t.prototype=Object.create(b),t},e.awrap=function(t){return{__await:t}},w(M.prototype),l(M.prototype,h,(function(){return this})),e.AsyncIterator=M,e.async=function(t,r,i,n,s){void 0===s&&(s=Promise);var a=new M(c(t,r,i,n),s);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},w(b),l(b,u,"Generator"),l(b,o,(function(){return this})),l(b,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var i=e.pop();if(i in t)return r.value=i,r.done=!1,r}return r.done=!0,r}},e.values=C,E.prototype={constructor:E,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(S),!t)for(var e in this)"t"===e.charAt(0)&&s.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(r,i){return a.type="throw",a.arg=t,e.next=r,i&&(e.method="next",e.arg=void 0),!!i}for(var i=this.tryEntries.length-1;i>=0;--i){var n=this.tryEntries[i],a=n.completion;if("root"===n.tryLoc)return r("end");if(n.tryLoc<=this.prev){var o=s.call(n,"catchLoc"),h=s.call(n,"finallyLoc");if(o&&h){if(this.prev<n.catchLoc)return r(n.catchLoc,!0);if(this.prev<n.finallyLoc)return r(n.finallyLoc)}else if(o){if(this.prev<n.catchLoc)return r(n.catchLoc,!0)}else{if(!h)throw new Error("try statement without catch or finally");if(this.prev<n.finallyLoc)return r(n.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&s.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var n=i;break}}n&&("break"===t||"continue"===t)&&n.tryLoc<=e&&e<=n.finallyLoc&&(n=null);var a=n?n.completion:{};return a.type=t,a.arg=e,n?(this.method="next",this.next=n.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),S(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var i=r.completion;if("throw"===i.type){var n=i.arg;S(r)}return n}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:C(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e){function r(e){return t.exports=r="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.exports.__esModule=!0,t.exports.default=t.exports,r(e)}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,r){var i=r(38);function n(t,e,r,i,n){var s=n(t.slice(e,e+r));switch(i){case"N":case"F":case"O":return parseFloat(s,10);case"D":return new Date(s.slice(0,4),parseInt(s.slice(4,6),10)-1,s.slice(6,8));case"L":return"y"===s.toLowerCase()||"t"===s.toLowerCase();default:return s}}function s(t,e,r,i){for(var s,a,o={},h=0,u=r.length;h<u;)s=n(t,e,(a=r[h]).len,a.dataType,i),e+=a.len,void 0!==s&&(o[a.name]=s),h++;return o}t.exports=function(t,e){for(var r=i(e),n=function(t){var e={};return e.lastUpdated=new Date(t.readUInt8(1)+1900,t.readUInt8(2),t.readUInt8(3)),e.records=t.readUInt32LE(4),e.headerLen=t.readUInt16LE(8),e.recLen=t.readUInt16LE(10),e}(t),a=function(t,e,r){for(var i=[],n=32;n<e&&(i.push({name:r(t.slice(n,n+11)),dataType:String.fromCharCode(t.readUInt8(n+11)),len:t.readUInt8(n+16),decimal:t.readUInt8(n+17)}),13!==t.readUInt8(n+32));)n+=32;return i}(t,n.headerLen-1,r),o=2+(a.length+1<<5),h=n.recLen,u=n.records,l=[];u;)l.push(s(t,o,a,r)),o+=h,u--;return l}},function(t,e,r){r(39);var i=r(10).StringDecoder;function n(t){var e=new i;return(e.write(t)+e.end()).replace(/\0/g,"").trim()}t.exports=function t(e,r){if(!e)return n;try{new TextDecoder(e.trim())}catch(a){var i=s.exec(e);return i&&!r?t("windows-"+i[1],!0):n}return function(t){var r=new TextDecoder(e);return(r.decode(t,{stream:!0})+r.decode()).replace(/\0/g,"").trim()}};var s=/^(?:ANSI\s)?(\d+)$/m},function(t,e,r){t.exports=r(40)},function(t,e,r){!function(e){"use strict";function i(t,e,r){return e<=t&&t<=r}t.exports&&!e["encoding-indexes"]&&r(41);var n=Math.floor;function s(t){if(void 0===t)return{};if(t===Object(t))return t;throw TypeError("Could not convert argument to dictionary")}function a(t){return 0<=t&&t<=127}var o=a;function h(t){this.tokens=[].slice.call(t),this.tokens.reverse()}h.prototype={endOfStream:function(){return!this.tokens.length},read:function(){return this.tokens.length?this.tokens.pop():-1},prepend:function(t){if(Array.isArray(t))for(var e=t;e.length;)this.tokens.push(e.pop());else this.tokens.push(t)},push:function(t){if(Array.isArray(t))for(var e=t;e.length;)this.tokens.unshift(e.shift());else this.tokens.unshift(t)}};function u(t,e){if(t)throw TypeError("Decoder error");return e||65533}function l(t){throw TypeError("The code point "+t+" could not be encoded.")}function c(t){return t=String(t).trim().toLowerCase(),Object.prototype.hasOwnProperty.call(d,t)?d[t]:null}var f=[{encodings:[{labels:["unicode-1-1-utf-8","utf-8","utf8"],name:"UTF-8"}],heading:"The Encoding"},{encodings:[{labels:["866","cp866","csibm866","ibm866"],name:"IBM866"},{labels:["csisolatin2","iso-8859-2","iso-ir-101","iso8859-2","iso88592","iso_8859-2","iso_8859-2:1987","l2","latin2"],name:"ISO-8859-2"},{labels:["csisolatin3","iso-8859-3","iso-ir-109","iso8859-3","iso88593","iso_8859-3","iso_8859-3:1988","l3","latin3"],name:"ISO-8859-3"},{labels:["csisolatin4","iso-8859-4","iso-ir-110","iso8859-4","iso88594","iso_8859-4","iso_8859-4:1988","l4","latin4"],name:"ISO-8859-4"},{labels:["csisolatincyrillic","cyrillic","iso-8859-5","iso-ir-144","iso8859-5","iso88595","iso_8859-5","iso_8859-5:1988"],name:"ISO-8859-5"},{labels:["arabic","asmo-708","csiso88596e","csiso88596i","csisolatinarabic","ecma-114","iso-8859-6","iso-8859-6-e","iso-8859-6-i","iso-ir-127","iso8859-6","iso88596","iso_8859-6","iso_8859-6:1987"],name:"ISO-8859-6"},{labels:["csisolatingreek","ecma-118","elot_928","greek","greek8","iso-8859-7","iso-ir-126","iso8859-7","iso88597","iso_8859-7","iso_8859-7:1987","sun_eu_greek"],name:"ISO-8859-7"},{labels:["csiso88598e","csisolatinhebrew","hebrew","iso-8859-8","iso-8859-8-e","iso-ir-138","iso8859-8","iso88598","iso_8859-8","iso_8859-8:1988","visual"],name:"ISO-8859-8"},{labels:["csiso88598i","iso-8859-8-i","logical"],name:"ISO-8859-8-I"},{labels:["csisolatin6","iso-8859-10","iso-ir-157","iso8859-10","iso885910","l6","latin6"],name:"ISO-8859-10"},{labels:["iso-8859-13","iso8859-13","iso885913"],name:"ISO-8859-13"},{labels:["iso-8859-14","iso8859-14","iso885914"],name:"ISO-8859-14"},{labels:["csisolatin9","iso-8859-15","iso8859-15","iso885915","iso_8859-15","l9"],name:"ISO-8859-15"},{labels:["iso-8859-16"],name:"ISO-8859-16"},{labels:["cskoi8r","koi","koi8","koi8-r","koi8_r"],name:"KOI8-R"},{labels:["koi8-ru","koi8-u"],name:"KOI8-U"},{labels:["csmacintosh","mac","macintosh","x-mac-roman"],name:"macintosh"},{labels:["dos-874","iso-8859-11","iso8859-11","iso885911","tis-620","windows-874"],name:"windows-874"},{labels:["cp1250","windows-1250","x-cp1250"],name:"windows-1250"},{labels:["cp1251","windows-1251","x-cp1251"],name:"windows-1251"},{labels:["ansi_x3.4-1968","ascii","cp1252","cp819","csisolatin1","ibm819","iso-8859-1","iso-ir-100","iso8859-1","iso88591","iso_8859-1","iso_8859-1:1987","l1","latin1","us-ascii","windows-1252","x-cp1252"],name:"windows-1252"},{labels:["cp1253","windows-1253","x-cp1253"],name:"windows-1253"},{labels:["cp1254","csisolatin5","iso-8859-9","iso-ir-148","iso8859-9","iso88599","iso_8859-9","iso_8859-9:1989","l5","latin5","windows-1254","x-cp1254"],name:"windows-1254"},{labels:["cp1255","windows-1255","x-cp1255"],name:"windows-1255"},{labels:["cp1256","windows-1256","x-cp1256"],name:"windows-1256"},{labels:["cp1257","windows-1257","x-cp1257"],name:"windows-1257"},{labels:["cp1258","windows-1258","x-cp1258"],name:"windows-1258"},{labels:["x-mac-cyrillic","x-mac-ukrainian"],name:"x-mac-cyrillic"}],heading:"Legacy single-byte encodings"},{encodings:[{labels:["chinese","csgb2312","csiso58gb231280","gb2312","gb_2312","gb_2312-80","gbk","iso-ir-58","x-gbk"],name:"GBK"},{labels:["gb18030"],name:"gb18030"}],heading:"Legacy multi-byte Chinese (simplified) encodings"},{encodings:[{labels:["big5","big5-hkscs","cn-big5","csbig5","x-x-big5"],name:"Big5"}],heading:"Legacy multi-byte Chinese (traditional) encodings"},{encodings:[{labels:["cseucpkdfmtjapanese","euc-jp","x-euc-jp"],name:"EUC-JP"},{labels:["csiso2022jp","iso-2022-jp"],name:"ISO-2022-JP"},{labels:["csshiftjis","ms932","ms_kanji","shift-jis","shift_jis","sjis","windows-31j","x-sjis"],name:"Shift_JIS"}],heading:"Legacy multi-byte Japanese encodings"},{encodings:[{labels:["cseuckr","csksc56011987","euc-kr","iso-ir-149","korean","ks_c_5601-1987","ks_c_5601-1989","ksc5601","ksc_5601","windows-949"],name:"EUC-KR"}],heading:"Legacy multi-byte Korean encodings"},{encodings:[{labels:["csiso2022kr","hz-gb-2312","iso-2022-cn","iso-2022-cn-ext","iso-2022-kr"],name:"replacement"},{labels:["utf-16be"],name:"UTF-16BE"},{labels:["utf-16","utf-16le"],name:"UTF-16LE"},{labels:["x-user-defined"],name:"x-user-defined"}],heading:"Legacy miscellaneous encodings"}],d={};f.forEach((function(t){t.encodings.forEach((function(t){t.labels.forEach((function(e){d[e]=t}))}))}));var p,m,g={},y={};function v(t,e){return e&&e[t]||null}function _(t,e){var r=e.indexOf(t);return-1===r?null:r}function b(t){if(!("encoding-indexes"in e))throw Error("Indexes missing. Did you forget to include encoding-indexes.js first?");return e["encoding-indexes"][t]}function w(t,e){if(!(this instanceof w))throw TypeError("Called as a function. Did you forget 'new'?");t=void 0!==t?String(t):"utf-8",e=s(e),this._encoding=null,this._decoder=null,this._ignoreBOM=!1,this._BOMseen=!1,this._error_mode="replacement",this._do_not_flush=!1;var r=c(t);if(null===r||"replacement"===r.name)throw RangeError("Unknown encoding: "+t);if(!y[r.name])throw Error("Decoder not present. Did you forget to include encoding-indexes.js first?");return this._encoding=r,Boolean(e.fatal)&&(this._error_mode="fatal"),Boolean(e.ignoreBOM)&&(this._ignoreBOM=!0),Object.defineProperty||(this.encoding=this._encoding.name.toLowerCase(),this.fatal="fatal"===this._error_mode,this.ignoreBOM=this._ignoreBOM),this}function M(t,r){if(!(this instanceof M))throw TypeError("Called as a function. Did you forget 'new'?");r=s(r),this._encoding=null,this._encoder=null,this._do_not_flush=!1,this._fatal=Boolean(r.fatal)?"fatal":"replacement";if(Boolean(r.NONSTANDARD_allowLegacyEncoding)){var i=c(t=void 0!==t?String(t):"utf-8");if(null===i||"replacement"===i.name)throw RangeError("Unknown encoding: "+t);if(!g[i.name])throw Error("Encoder not present. Did you forget to include encoding-indexes.js first?");this._encoding=i}else this._encoding=c("utf-8"),void 0!==t&&"console"in e&&console.warn("TextEncoder constructor called with encoding label, which is ignored.");return Object.defineProperty||(this.encoding=this._encoding.name.toLowerCase()),this}function x(t){var e=t.fatal,r=0,n=0,s=0,a=128,o=191;this.handler=function(t,h){if(-1===h&&0!==s)return s=0,u(e);if(-1===h)return-1;if(0===s){if(i(h,0,127))return h;if(i(h,194,223))s=1,r=31&h;else if(i(h,224,239))224===h&&(a=160),237===h&&(o=159),s=2,r=15&h;else{if(!i(h,240,244))return u(e);240===h&&(a=144),244===h&&(o=143),s=3,r=7&h}return null}if(!i(h,a,o))return r=s=n=0,a=128,o=191,t.prepend(h),u(e);if(a=128,o=191,r=r<<6|63&h,(n+=1)!==s)return null;var l=r;return r=s=n=0,l}}function k(t){t.fatal;this.handler=function(t,e){if(-1===e)return-1;if(o(e))return e;var r,n;i(e,128,2047)?(r=1,n=192):i(e,2048,65535)?(r=2,n=224):i(e,65536,1114111)&&(r=3,n=240);for(var s=[(e>>6*r)+n];r>0;){var a=e>>6*(r-1);s.push(128|63&a),r-=1}return s}}function S(t,e){var r=e.fatal;this.handler=function(e,i){if(-1===i)return-1;if(a(i))return i;var n=t[i-128];return null===n?u(r):n}}function E(t,e){e.fatal;this.handler=function(e,r){if(-1===r)return-1;if(o(r))return r;var i=_(r,t);return null===i&&l(r),i+128}}function C(t){var e=t.fatal,r=0,n=0,s=0;this.handler=function(t,o){if(-1===o&&0===r&&0===n&&0===s)return-1;var h;if(-1!==o||0===r&&0===n&&0===s||(r=0,n=0,s=0,u(e)),0!==s){h=null,i(o,48,57)&&(h=function(t){if(t>39419&&t<189e3||t>1237575)return null;if(7457===t)return 59335;var e,r=0,i=0,n=b("gb18030-ranges");for(e=0;e<n.length;++e){var s=n[e];if(!(s[0]<=t))break;r=s[0],i=s[1]}return i+t-r}(10*(126*(10*(r-129)+n-48)+s-129)+o-48));var l=[n,s,o];return r=0,n=0,s=0,null===h?(t.prepend(l),u(e)):h}if(0!==n)return i(o,129,254)?(s=o,null):(t.prepend([n,o]),r=0,n=0,u(e));if(0!==r){if(i(o,48,57))return n=o,null;var c=r,f=null;r=0;var d=o<127?64:65;return(i(o,64,126)||i(o,128,254))&&(f=190*(c-129)+(o-d)),null===(h=null===f?null:v(f,b("gb18030")))&&a(o)&&t.prepend(o),null===h?u(e):h}return a(o)?o:128===o?8364:i(o,129,254)?(r=o,null):u(e)}}function A(t,e){t.fatal;this.handler=function(t,r){if(-1===r)return-1;if(o(r))return r;if(58853===r)return l(r);if(e&&8364===r)return 128;var i=_(r,b("gb18030"));if(null!==i){var s=i%190;return[n(i/190)+129,s+(s<63?64:65)]}if(e)return l(r);i=function(t){if(59335===t)return 7457;var e,r=0,i=0,n=b("gb18030-ranges");for(e=0;e<n.length;++e){var s=n[e];if(!(s[1]<=t))break;r=s[1],i=s[0]}return i+t-r}(r);var a=n(i/10/126/10),h=n((i-=10*a*126*10)/10/126),u=n((i-=10*h*126)/10);return[a+129,h+48,u+129,i-10*u+48]}}function O(t){var e=t.fatal,r=0;this.handler=function(t,n){if(-1===n&&0!==r)return r=0,u(e);if(-1===n&&0===r)return-1;if(0!==r){var s=r,o=null;r=0;var h=n<127?64:98;switch((i(n,64,126)||i(n,161,254))&&(o=157*(s-129)+(n-h)),o){case 1133:return[202,772];case 1135:return[202,780];case 1164:return[234,772];case 1166:return[234,780]}var l=null===o?null:v(o,b("big5"));return null===l&&a(n)&&t.prepend(n),null===l?u(e):l}return a(n)?n:i(n,129,254)?(r=n,null):u(e)}}function T(t){t.fatal;this.handler=function(t,e){if(-1===e)return-1;if(o(e))return e;var r=function(t){var e=m=m||b("big5").map((function(t,e){return e<5024?null:t}));return 9552===t||9566===t||9569===t||9578===t||21313===t||21317===t?e.lastIndexOf(t):_(t,e)}(e);if(null===r)return l(e);var i=n(r/157)+129;if(i<161)return l(e);var s=r%157;return[i,s+(s<63?64:98)]}}function I(t){var e=t.fatal,r=!1,n=0;this.handler=function(t,s){if(-1===s&&0!==n)return n=0,u(e);if(-1===s&&0===n)return-1;if(142===n&&i(s,161,223))return n=0,65216+s;if(143===n&&i(s,161,254))return r=!0,n=s,null;if(0!==n){var o=n;n=0;var h=null;return i(o,161,254)&&i(s,161,254)&&(h=v(94*(o-161)+(s-161),b(r?"jis0212":"jis0208"))),r=!1,i(s,161,254)||t.prepend(s),null===h?u(e):h}return a(s)?s:142===s||143===s||i(s,161,254)?(n=s,null):u(e)}}function L(t){t.fatal;this.handler=function(t,e){if(-1===e)return-1;if(o(e))return e;if(165===e)return 92;if(8254===e)return 126;if(i(e,65377,65439))return[142,e-65377+161];8722===e&&(e=65293);var r=_(e,b("jis0208"));return null===r?l(e):[n(r/94)+161,r%94+161]}}function P(t){var e=t.fatal,r=0,n=1,s=2,a=3,o=4,h=5,l=6,c=r,f=r,d=0,p=!1;this.handler=function(t,m){switch(c){default:case r:return 27===m?(c=h,null):i(m,0,127)&&14!==m&&15!==m&&27!==m?(p=!1,m):-1===m?-1:(p=!1,u(e));case n:return 27===m?(c=h,null):92===m?(p=!1,165):126===m?(p=!1,8254):i(m,0,127)&&14!==m&&15!==m&&27!==m&&92!==m&&126!==m?(p=!1,m):-1===m?-1:(p=!1,u(e));case s:return 27===m?(c=h,null):i(m,33,95)?(p=!1,65344+m):-1===m?-1:(p=!1,u(e));case a:return 27===m?(c=h,null):i(m,33,126)?(p=!1,d=m,c=o,null):-1===m?-1:(p=!1,u(e));case o:if(27===m)return c=h,u(e);if(i(m,33,126)){c=a;var g=v(94*(d-33)+m-33,b("jis0208"));return null===g?u(e):g}return-1===m?(c=a,t.prepend(m),u(e)):(c=a,u(e));case h:return 36===m||40===m?(d=m,c=l,null):(t.prepend(m),p=!1,c=f,u(e));case l:var y=d;d=0;var _=null;if(40===y&&66===m&&(_=r),40===y&&74===m&&(_=n),40===y&&73===m&&(_=s),36!==y||64!==m&&66!==m||(_=a),null!==_){c=c=_;var w=p;return p=!0,w?u(e):null}return t.prepend([y,m]),p=!1,c=f,u(e)}}}function R(t){t.fatal;var e=0,r=1,i=2,s=e;this.handler=function(t,a){if(-1===a&&s!==e)return t.prepend(a),s=e,[27,40,66];if(-1===a&&s===e)return-1;if(!(s!==e&&s!==r||14!==a&&15!==a&&27!==a))return l(65533);if(s===e&&o(a))return a;if(s===r&&(o(a)&&92!==a&&126!==a||165==a||8254==a)){if(o(a))return a;if(165===a)return 92;if(8254===a)return 126}if(o(a)&&s!==e)return t.prepend(a),s=e,[27,40,66];if((165===a||8254===a)&&s!==r)return t.prepend(a),s=r,[27,40,74];8722===a&&(a=65293);var h=_(a,b("jis0208"));return null===h?l(a):s!==i?(t.prepend(a),s=i,[27,36,66]):[n(h/94)+33,h%94+33]}}function N(t){var e=t.fatal,r=0;this.handler=function(t,n){if(-1===n&&0!==r)return r=0,u(e);if(-1===n&&0===r)return-1;if(0!==r){var s=r,o=null;r=0;var h=n<127?64:65,l=s<160?129:193;if((i(n,64,126)||i(n,128,252))&&(o=188*(s-l)+n-h),i(o,8836,10715))return 48508+o;var c=null===o?null:v(o,b("jis0208"));return null===c&&a(n)&&t.prepend(n),null===c?u(e):c}return a(n)||128===n?n:i(n,161,223)?65216+n:i(n,129,159)||i(n,224,252)?(r=n,null):u(e)}}function z(t){t.fatal;this.handler=function(t,e){if(-1===e)return-1;if(o(e)||128===e)return e;if(165===e)return 92;if(8254===e)return 126;if(i(e,65377,65439))return e-65377+161;8722===e&&(e=65293);var r=function(t){return(p=p||b("jis0208").map((function(t,e){return i(e,8272,8835)?null:t}))).indexOf(t)}(e);if(null===r)return l(e);var s=n(r/188),a=r%188;return[s+(s<31?129:193),a+(a<63?64:65)]}}function j(t){var e=t.fatal,r=0;this.handler=function(t,n){if(-1===n&&0!==r)return r=0,u(e);if(-1===n&&0===r)return-1;if(0!==r){var s=r,o=null;r=0,i(n,65,254)&&(o=190*(s-129)+(n-65));var h=null===o?null:v(o,b("euc-kr"));return null===o&&a(n)&&t.prepend(n),null===h?u(e):h}return a(n)?n:i(n,129,254)?(r=n,null):u(e)}}function B(t){t.fatal;this.handler=function(t,e){if(-1===e)return-1;if(o(e))return e;var r=_(e,b("euc-kr"));return null===r?l(e):[n(r/190)+129,r%190+65]}}function D(t,e){var r=t>>8,i=255&t;return e?[r,i]:[i,r]}function U(t,e){var r=e.fatal,n=null,s=null;this.handler=function(e,a){if(-1===a&&(null!==n||null!==s))return u(r);if(-1===a&&null===n&&null===s)return-1;if(null===n)return n=a,null;var o;if(o=t?(n<<8)+a:(a<<8)+n,n=null,null!==s){var h=s;return s=null,i(o,56320,57343)?65536+1024*(h-55296)+(o-56320):(e.prepend(D(o,t)),u(r))}return i(o,55296,56319)?(s=o,null):i(o,56320,57343)?u(r):o}}function F(t,e){e.fatal;this.handler=function(e,r){if(-1===r)return-1;if(i(r,0,65535))return D(r,t);var n=D(55296+(r-65536>>10),t),s=D(56320+(r-65536&1023),t);return n.concat(s)}}function q(t){t.fatal;this.handler=function(t,e){return-1===e?-1:a(e)?e:63360+e-128}}function G(t){t.fatal;this.handler=function(t,e){return-1===e?-1:o(e)?e:i(e,63360,63487)?e-63360+128:l(e)}}Object.defineProperty&&(Object.defineProperty(w.prototype,"encoding",{get:function(){return this._encoding.name.toLowerCase()}}),Object.defineProperty(w.prototype,"fatal",{get:function(){return"fatal"===this._error_mode}}),Object.defineProperty(w.prototype,"ignoreBOM",{get:function(){return this._ignoreBOM}})),w.prototype.decode=function(t,e){var r;r="object"==typeof t&&t instanceof ArrayBuffer?new Uint8Array(t):"object"==typeof t&&"buffer"in t&&t.buffer instanceof ArrayBuffer?new Uint8Array(t.buffer,t.byteOffset,t.byteLength):new Uint8Array(0),e=s(e),this._do_not_flush||(this._decoder=y[this._encoding.name]({fatal:"fatal"===this._error_mode}),this._BOMseen=!1),this._do_not_flush=Boolean(e.stream);for(var i,n=new h(r),a=[];;){var o=n.read();if(-1===o)break;if(-1===(i=this._decoder.handler(n,o)))break;null!==i&&(Array.isArray(i)?a.push.apply(a,i):a.push(i))}if(!this._do_not_flush){do{if(-1===(i=this._decoder.handler(n,n.read())))break;null!==i&&(Array.isArray(i)?a.push.apply(a,i):a.push(i))}while(!n.endOfStream());this._decoder=null}return function(t){var e,r;return e=["UTF-8","UTF-16LE","UTF-16BE"],r=this._encoding.name,-1===e.indexOf(r)||this._ignoreBOM||this._BOMseen||(t.length>0&&65279===t[0]?(this._BOMseen=!0,t.shift()):t.length>0&&(this._BOMseen=!0)),function(t){for(var e="",r=0;r<t.length;++r){var i=t[r];i<=65535?e+=String.fromCharCode(i):(i-=65536,e+=String.fromCharCode(55296+(i>>10),56320+(1023&i)))}return e}(t)}.call(this,a)},Object.defineProperty&&Object.defineProperty(M.prototype,"encoding",{get:function(){return this._encoding.name.toLowerCase()}}),M.prototype.encode=function(t,e){t=void 0===t?"":String(t),e=s(e),this._do_not_flush||(this._encoder=g[this._encoding.name]({fatal:"fatal"===this._fatal})),this._do_not_flush=Boolean(e.stream);for(var r,i=new h(function(t){for(var e=String(t),r=e.length,i=0,n=[];i<r;){var s=e.charCodeAt(i);if(s<55296||s>57343)n.push(s);else if(56320<=s&&s<=57343)n.push(65533);else if(55296<=s&&s<=56319)if(i===r-1)n.push(65533);else{var a=e.charCodeAt(i+1);if(56320<=a&&a<=57343){var o=1023&s,h=1023&a;n.push(65536+(o<<10)+h),i+=1}else n.push(65533)}i+=1}return n}(t)),n=[];;){var a=i.read();if(-1===a)break;if(-1===(r=this._encoder.handler(i,a)))break;Array.isArray(r)?n.push.apply(n,r):n.push(r)}if(!this._do_not_flush){for(;-1!==(r=this._encoder.handler(i,i.read()));)Array.isArray(r)?n.push.apply(n,r):n.push(r);this._encoder=null}return new Uint8Array(n)},g["UTF-8"]=function(t){return new k(t)},y["UTF-8"]=function(t){return new x(t)},"encoding-indexes"in e&&f.forEach((function(t){"Legacy single-byte encodings"===t.heading&&t.encodings.forEach((function(t){var e=t.name,r=b(e.toLowerCase());y[e]=function(t){return new S(r,t)},g[e]=function(t){return new E(r,t)}}))})),y.GBK=function(t){return new C(t)},g.GBK=function(t){return new A(t,!0)},g.gb18030=function(t){return new A(t)},y.gb18030=function(t){return new C(t)},g.Big5=function(t){return new T(t)},y.Big5=function(t){return new O(t)},g["EUC-JP"]=function(t){return new L(t)},y["EUC-JP"]=function(t){return new I(t)},g["ISO-2022-JP"]=function(t){return new R(t)},y["ISO-2022-JP"]=function(t){return new P(t)},g.Shift_JIS=function(t){return new z(t)},y.Shift_JIS=function(t){return new N(t)},g["EUC-KR"]=function(t){return new B(t)},y["EUC-KR"]=function(t){return new j(t)},g["UTF-16BE"]=function(t){return new F(!0,t)},y["UTF-16BE"]=function(t){return new U(!0,t)},g["UTF-16LE"]=function(t){return new F(!1,t)},y["UTF-16LE"]=function(t){return new U(!1,t)},g["x-user-defined"]=function(t){return new G(t)},y["x-user-defined"]=function(t){return new q(t)},e.TextEncoder||(e.TextEncoder=M),e.TextDecoder||(e.TextDecoder=w),t.exports&&(t.exports={TextEncoder:e.TextEncoder,TextDecoder:e.TextDecoder,EncodingIndexes:e["encoding-indexes"]})}(this||{})},function(t,e){},function(t,e,r){
| /*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
| var i=r(2),n=i.Buffer;function s(t,e){for(var r in t)e[r]=t[r]}function a(t,e,r){return n(t,e,r)}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?t.exports=i:(s(i,e),e.Buffer=a),a.prototype=Object.create(n.prototype),s(n,a),a.from=function(t,e,r){if("number"==typeof t)throw new TypeError("Argument must not be a number");return n(t,e,r)},a.alloc=function(t,e,r){if("number"!=typeof t)throw new TypeError("Argument must be a number");var i=n(t);return void 0!==e?"string"==typeof r?i.fill(e,r):i.fill(e):i.fill(0),i},a.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return n(t)},a.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return i.SlowBuffer(t)}},function(t,e,r){"use strict";e.byteLength=function(t){var e=u(t),r=e[0],i=e[1];return 3*(r+i)/4-i},e.toByteArray=function(t){var e,r,i=u(t),a=i[0],o=i[1],h=new s(function(t,e,r){return 3*(e+r)/4-r}(0,a,o)),l=0,c=o>0?a-4:a;for(r=0;r<c;r+=4)e=n[t.charCodeAt(r)]<<18|n[t.charCodeAt(r+1)]<<12|n[t.charCodeAt(r+2)]<<6|n[t.charCodeAt(r+3)],h[l++]=e>>16&255,h[l++]=e>>8&255,h[l++]=255&e;2===o&&(e=n[t.charCodeAt(r)]<<2|n[t.charCodeAt(r+1)]>>4,h[l++]=255&e);1===o&&(e=n[t.charCodeAt(r)]<<10|n[t.charCodeAt(r+1)]<<4|n[t.charCodeAt(r+2)]>>2,h[l++]=e>>8&255,h[l++]=255&e);return h},e.fromByteArray=function(t){for(var e,r=t.length,n=r%3,s=[],a=0,o=r-n;a<o;a+=16383)s.push(l(t,a,a+16383>o?o:a+16383));1===n?(e=t[r-1],s.push(i[e>>2]+i[e<<4&63]+"==")):2===n&&(e=(t[r-2]<<8)+t[r-1],s.push(i[e>>10]+i[e>>4&63]+i[e<<2&63]+"="));return s.join("")};for(var i=[],n=[],s="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,h=a.length;o<h;++o)i[o]=a[o],n[a.charCodeAt(o)]=o;function u(t){var e=t.length;if(e%4>0)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 l(t,e,r){for(var n,s,a=[],o=e;o<r;o+=3)n=(t[o]<<16&16711680)+(t[o+1]<<8&65280)+(255&t[o+2]),a.push(i[(s=n)>>18&63]+i[s>>12&63]+i[s>>6&63]+i[63&s]);return a.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},function(t,e){
| /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
| e.read=function(t,e,r,i,n){var s,a,o=8*n-i-1,h=(1<<o)-1,u=h>>1,l=-7,c=r?n-1:0,f=r?-1:1,d=t[e+c];for(c+=f,s=d&(1<<-l)-1,d>>=-l,l+=o;l>0;s=256*s+t[e+c],c+=f,l-=8);for(a=s&(1<<-l)-1,s>>=-l,l+=i;l>0;a=256*a+t[e+c],c+=f,l-=8);if(0===s)s=1-u;else{if(s===h)return a?NaN:1/0*(d?-1:1);a+=Math.pow(2,i),s-=u}return(d?-1:1)*a*Math.pow(2,s-i)},e.write=function(t,e,r,i,n,s){var a,o,h,u=8*s-n-1,l=(1<<u)-1,c=l>>1,f=23===n?Math.pow(2,-24)-Math.pow(2,-77):0,d=i?0:s-1,p=i?1:-1,m=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(o=isNaN(e)?1:0,a=l):(a=Math.floor(Math.log(e)/Math.LN2),e*(h=Math.pow(2,-a))<1&&(a--,h*=2),(e+=a+c>=1?f/h:f*Math.pow(2,1-c))*h>=2&&(a++,h/=2),a+c>=l?(o=0,a=l):a+c>=1?(o=(e*h-1)*Math.pow(2,n),a+=c):(o=e*Math.pow(2,c-1)*Math.pow(2,n),a=0));n>=8;t[r+d]=255&o,d+=p,o/=256,n-=8);for(a=a<<n|o,u+=n;u>0;t[r+d]=255&a,d+=p,a/=256,u-=8);t[r+d-p]|=128*m}},function(t,e,r){"use strict";(function(e){var r,i,n=e.MutationObserver||e.WebKitMutationObserver;if(n){var s=0,a=new n(l),o=e.document.createTextNode("");a.observe(o,{characterData:!0}),r=function(){o.data=s=++s%2}}else if(e.setImmediate||void 0===e.MessageChannel)r="document"in e&&"onreadystatechange"in e.document.createElement("script")?function(){var t=e.document.createElement("script");t.onreadystatechange=function(){l(),t.onreadystatechange=null,t.parentNode.removeChild(t),t=null},e.document.documentElement.appendChild(t)}:function(){setTimeout(l,0)};else{var h=new e.MessageChannel;h.port1.onmessage=l,r=function(){h.port2.postMessage(0)}}var u=[];function l(){var t,e;i=!0;for(var r=u.length;r;){for(e=u,u=[],t=-1;++t<r;)e[t]();r=u.length}i=!1}t.exports=function(t){1!==u.push(t)||i||r()}}).call(this,r(1))},function(t,e,r){(function(e){const r="object"==typeof performance&&performance&&"function"==typeof performance.now?performance:Date,i="function"==typeof AbortController?AbortController:class{constructor(){this.signal=new a}abort(){this.signal.dispatchEvent("abort")}},n="function"==typeof AbortSignal,s="function"==typeof i.AbortSignal,a=n?AbortSignal:s?i.AbortController:class{constructor(){this.aborted=!1,this._listeners=[]}dispatchEvent(t){if("abort"===t){this.aborted=!0;const e={type:t,target:this};this.onabort(e),this._listeners.forEach(t=>t(e),this)}}onabort(){}addEventListener(t,e){"abort"===t&&this._listeners.push(e)}removeEventListener(t,e){"abort"===t&&(this._listeners=this._listeners.filter(t=>t!==e))}},o=new Set,h=(t,e)=>{const r="LRU_CACHE_OPTION_"+t;c(r)&&f(r,t+" option","options."+e,y)},u=(t,e)=>{const r="LRU_CACHE_METHOD_"+t;if(c(r)){const{prototype:i}=y,{get:n}=Object.getOwnPropertyDescriptor(i,t);f(r,t+" method",`cache.${e}()`,n)}},l=(...t)=>{"object"==typeof e&&e&&"function"==typeof e.emitWarning?e.emitWarning(...t):console.error(...t)},c=t=>!o.has(t),f=(t,e,r,i)=>{o.add(t);l(`The ${e} is deprecated. Please use ${r} instead.`,"DeprecationWarning",t,i)},d=t=>t&&t===Math.floor(t)&&t>0&&isFinite(t),p=t=>d(t)?t<=Math.pow(2,8)?Uint8Array:t<=Math.pow(2,16)?Uint16Array:t<=Math.pow(2,32)?Uint32Array:t<=Number.MAX_SAFE_INTEGER?m:null:null;class m extends Array{constructor(t){super(t),this.fill(0)}}class g{constructor(t){if(0===t)return[];const e=p(t);this.heap=new e(t),this.length=0}push(t){this.heap[this.length++]=t}pop(){return this.heap[--this.length]}}class y{constructor(t={}){const{max:e=0,ttl:r,ttlResolution:i=1,ttlAutopurge:n,updateAgeOnGet:s,updateAgeOnHas:a,allowStale:u,dispose:f,disposeAfter:m,noDisposeOnSet:v,noUpdateTTL:_,maxSize:b=0,maxEntrySize:w=0,sizeCalculation:M,fetchMethod:x,fetchContext:k,noDeleteOnFetchRejection:S,noDeleteOnStaleGet:E}=t,{length:C,maxAge:A,stale:O}=t instanceof y?{}:t;if(0!==e&&!d(e))throw new TypeError("max option must be a nonnegative integer");const T=e?p(e):Array;if(!T)throw new Error("invalid max value: "+e);if(this.max=e,this.maxSize=b,this.maxEntrySize=w||this.maxSize,this.sizeCalculation=M||C,this.sizeCalculation){if(!this.maxSize&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if("function"!=typeof this.sizeCalculation)throw new TypeError("sizeCalculation set to non-function")}if(this.fetchMethod=x||null,this.fetchMethod&&"function"!=typeof this.fetchMethod)throw new TypeError("fetchMethod must be a function if specified");if(this.fetchContext=k,!this.fetchMethod&&void 0!==k)throw new TypeError("cannot set fetchContext without fetchMethod");if(this.keyMap=new Map,this.keyList=new Array(e).fill(null),this.valList=new Array(e).fill(null),this.next=new T(e),this.prev=new T(e),this.head=0,this.tail=0,this.free=new g(e),this.initialFill=1,this.size=0,"function"==typeof f&&(this.dispose=f),"function"==typeof m?(this.disposeAfter=m,this.disposed=[]):(this.disposeAfter=null,this.disposed=null),this.noDisposeOnSet=!!v,this.noUpdateTTL=!!_,this.noDeleteOnFetchRejection=!!S,0!==this.maxEntrySize){if(0!==this.maxSize&&!d(this.maxSize))throw new TypeError("maxSize must be a positive integer if specified");if(!d(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.initializeSizeTracking()}if(this.allowStale=!!u||!!O,this.noDeleteOnStaleGet=!!E,this.updateAgeOnGet=!!s,this.updateAgeOnHas=!!a,this.ttlResolution=d(i)||0===i?i:1,this.ttlAutopurge=!!n,this.ttl=r||A||0,this.ttl){if(!d(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.initializeTTLTracking()}if(0===this.max&&0===this.ttl&&0===this.maxSize)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.max&&!this.maxSize){const t="LRU_CACHE_UNBOUNDED";if(c(t)){o.add(t);l("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",t,y)}}O&&h("stale","allowStale"),A&&h("maxAge","ttl"),C&&h("length","sizeCalculation")}getRemainingTTL(t){return this.has(t,{updateAgeOnHas:!1})?1/0:0}initializeTTLTracking(){this.ttls=new m(this.max),this.starts=new m(this.max),this.setItemTTL=(t,e,i=r.now())=>{if(this.starts[t]=0!==e?i:0,this.ttls[t]=e,0!==e&&this.ttlAutopurge){const r=setTimeout(()=>{this.isStale(t)&&this.delete(this.keyList[t])},e+1);r.unref&&r.unref()}},this.updateItemAge=t=>{this.starts[t]=0!==this.ttls[t]?r.now():0};let t=0;const e=()=>{const e=r.now();if(this.ttlResolution>0){t=e;const r=setTimeout(()=>t=0,this.ttlResolution);r.unref&&r.unref()}return e};this.getRemainingTTL=r=>{const i=this.keyMap.get(r);return void 0===i?0:0===this.ttls[i]||0===this.starts[i]?1/0:this.starts[i]+this.ttls[i]-(t||e())},this.isStale=r=>0!==this.ttls[r]&&0!==this.starts[r]&&(t||e())-this.starts[r]>this.ttls[r]}updateItemAge(t){}setItemTTL(t,e,r){}isStale(t){return!1}initializeSizeTracking(){this.calculatedSize=0,this.sizes=new m(this.max),this.removeItemSize=t=>{this.calculatedSize-=this.sizes[t],this.sizes[t]=0},this.requireSize=(t,e,r,i)=>{if(this.isBackgroundFetch(e))return 0;if(!d(r)){if(!i)throw new TypeError("invalid size value (must be positive integer)");if("function"!=typeof i)throw new TypeError("sizeCalculation must be a function");if(r=i(e,t),!d(r))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}return r},this.addItemSize=(t,e)=>{if(this.sizes[t]=e,this.maxSize){const e=this.maxSize-this.sizes[t];for(;this.calculatedSize>e;)this.evict(!0)}this.calculatedSize+=this.sizes[t]}}removeItemSize(t){}addItemSize(t,e){}requireSize(t,e,r,i){if(r||i)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache")}*indexes({allowStale:t=this.allowStale}={}){if(this.size)for(let e=this.tail;this.isValidIndex(e)&&(!t&&this.isStale(e)||(yield e),e!==this.head);)e=this.prev[e]}*rindexes({allowStale:t=this.allowStale}={}){if(this.size)for(let e=this.head;this.isValidIndex(e)&&(!t&&this.isStale(e)||(yield e),e!==this.tail);)e=this.next[e]}isValidIndex(t){return this.keyMap.get(this.keyList[t])===t}*entries(){for(const t of this.indexes())yield[this.keyList[t],this.valList[t]]}*rentries(){for(const t of this.rindexes())yield[this.keyList[t],this.valList[t]]}*keys(){for(const t of this.indexes())yield this.keyList[t]}*rkeys(){for(const t of this.rindexes())yield this.keyList[t]}*values(){for(const t of this.indexes())yield this.valList[t]}*rvalues(){for(const t of this.rindexes())yield this.valList[t]}[Symbol.iterator](){return this.entries()}find(t,e={}){for(const r of this.indexes())if(t(this.valList[r],this.keyList[r],this))return this.get(this.keyList[r],e)}forEach(t,e=this){for(const r of this.indexes())t.call(e,this.valList[r],this.keyList[r],this)}rforEach(t,e=this){for(const r of this.rindexes())t.call(e,this.valList[r],this.keyList[r],this)}get prune(){return u("prune","purgeStale"),this.purgeStale}purgeStale(){let t=!1;for(const e of this.rindexes({allowStale:!0}))this.isStale(e)&&(this.delete(this.keyList[e]),t=!0);return t}dump(){const t=[];for(const e of this.indexes({allowStale:!0})){const i=this.keyList[e],n=this.valList[e],s={value:this.isBackgroundFetch(n)?n.__staleWhileFetching:n};if(this.ttls){s.ttl=this.ttls[e];const t=r.now()-this.starts[e];s.start=Math.floor(Date.now()-t)}this.sizes&&(s.size=this.sizes[e]),t.unshift([i,s])}return t}load(t){this.clear();for(const[e,i]of t){if(i.start){const t=Date.now()-i.start;i.start=r.now()-t}this.set(e,i.value,i)}}dispose(t,e,r){}set(t,e,{ttl:r=this.ttl,start:i,noDisposeOnSet:n=this.noDisposeOnSet,size:s=0,sizeCalculation:a=this.sizeCalculation,noUpdateTTL:o=this.noUpdateTTL}={}){if(s=this.requireSize(t,e,s,a),this.maxEntrySize&&s>this.maxEntrySize)return this.delete(t),this;let h=0===this.size?void 0:this.keyMap.get(t);if(void 0===h)h=this.newIndex(),this.keyList[h]=t,this.valList[h]=e,this.keyMap.set(t,h),this.next[this.tail]=h,this.prev[h]=this.tail,this.tail=h,this.size++,this.addItemSize(h,s),o=!1;else{const r=this.valList[h];e!==r&&(this.isBackgroundFetch(r)?r.__abortController.abort():n||(this.dispose(r,t,"set"),this.disposeAfter&&this.disposed.push([r,t,"set"])),this.removeItemSize(h),this.valList[h]=e,this.addItemSize(h,s)),this.moveToTail(h)}if(0===r||0!==this.ttl||this.ttls||this.initializeTTLTracking(),o||this.setItemTTL(h,r,i),this.disposeAfter)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift());return this}newIndex(){return 0===this.size?this.tail:this.size===this.max&&0!==this.max?this.evict(!1):0!==this.free.length?this.free.pop():this.initialFill++}pop(){if(this.size){const t=this.valList[this.head];return this.evict(!0),t}}evict(t){const e=this.head,r=this.keyList[e],i=this.valList[e];return this.isBackgroundFetch(i)?i.__abortController.abort():(this.dispose(i,r,"evict"),this.disposeAfter&&this.disposed.push([i,r,"evict"])),this.removeItemSize(e),t&&(this.keyList[e]=null,this.valList[e]=null,this.free.push(e)),this.head=this.next[e],this.keyMap.delete(r),this.size--,e}has(t,{updateAgeOnHas:e=this.updateAgeOnHas}={}){const r=this.keyMap.get(t);return void 0!==r&&!this.isStale(r)&&(e&&this.updateItemAge(r),!0)}peek(t,{allowStale:e=this.allowStale}={}){const r=this.keyMap.get(t);if(void 0!==r&&(e||!this.isStale(r))){const t=this.valList[r];return this.isBackgroundFetch(t)?t.__staleWhileFetching:t}}backgroundFetch(t,e,r,n){const s=void 0===e?void 0:this.valList[e];if(this.isBackgroundFetch(s))return s;const a=new i,o={signal:a.signal,options:r,context:n},h=new Promise(e=>e(this.fetchMethod(t,s,o))).then(e=>(a.signal.aborted||this.set(t,e,o.options),e),i=>{if(this.valList[e]===h){!r.noDeleteOnFetchRejection||void 0===h.__staleWhileFetching?this.delete(t):this.valList[e]=h.__staleWhileFetching}if(h.__returned===h)throw i});return h.__abortController=a,h.__staleWhileFetching=s,h.__returned=null,void 0===e?(this.set(t,h,o.options),e=this.keyMap.get(t)):this.valList[e]=h,h}isBackgroundFetch(t){return t&&"object"==typeof t&&"function"==typeof t.then&&Object.prototype.hasOwnProperty.call(t,"__staleWhileFetching")&&Object.prototype.hasOwnProperty.call(t,"__returned")&&(t.__returned===t||null===t.__returned)}async fetch(t,{allowStale:e=this.allowStale,updateAgeOnGet:r=this.updateAgeOnGet,noDeleteOnStaleGet:i=this.noDeleteOnStaleGet,ttl:n=this.ttl,noDisposeOnSet:s=this.noDisposeOnSet,size:a=0,sizeCalculation:o=this.sizeCalculation,noUpdateTTL:h=this.noUpdateTTL,noDeleteOnFetchRejection:u=this.noDeleteOnFetchRejection,fetchContext:l=this.fetchContext,forceRefresh:c=!1}={}){if(!this.fetchMethod)return this.get(t,{allowStale:e,updateAgeOnGet:r,noDeleteOnStaleGet:i});const f={allowStale:e,updateAgeOnGet:r,noDeleteOnStaleGet:i,ttl:n,noDisposeOnSet:s,size:a,sizeCalculation:o,noUpdateTTL:h,noDeleteOnFetchRejection:u};let d=this.keyMap.get(t);if(void 0===d){const e=this.backgroundFetch(t,d,f,l);return e.__returned=e}{const i=this.valList[d];if(this.isBackgroundFetch(i))return e&&void 0!==i.__staleWhileFetching?i.__staleWhileFetching:i.__returned=i;if(!c&&!this.isStale(d))return this.moveToTail(d),r&&this.updateItemAge(d),i;const n=this.backgroundFetch(t,d,f,l);return e&&void 0!==n.__staleWhileFetching?n.__staleWhileFetching:n.__returned=n}}get(t,{allowStale:e=this.allowStale,updateAgeOnGet:r=this.updateAgeOnGet,noDeleteOnStaleGet:i=this.noDeleteOnStaleGet}={}){const n=this.keyMap.get(t);if(void 0!==n){const s=this.valList[n],a=this.isBackgroundFetch(s);if(this.isStale(n))return a?e?s.__staleWhileFetching:void 0:(i||this.delete(t),e?s:void 0);if(a)return;return this.moveToTail(n),r&&this.updateItemAge(n),s}}connect(t,e){this.prev[e]=t,this.next[t]=e}moveToTail(t){t!==this.tail&&(t===this.head?this.head=this.next[t]:this.connect(this.prev[t],this.next[t]),this.connect(this.tail,t),this.tail=t)}get del(){return u("del","delete"),this.delete}delete(t){let e=!1;if(0!==this.size){const r=this.keyMap.get(t);if(void 0!==r)if(e=!0,1===this.size)this.clear();else{this.removeItemSize(r);const e=this.valList[r];this.isBackgroundFetch(e)?e.__abortController.abort():(this.dispose(e,t,"delete"),this.disposeAfter&&this.disposed.push([e,t,"delete"])),this.keyMap.delete(t),this.keyList[r]=null,this.valList[r]=null,r===this.tail?this.tail=this.prev[r]:r===this.head?this.head=this.next[r]:(this.next[this.prev[r]]=this.next[r],this.prev[this.next[r]]=this.prev[r]),this.size--,this.free.push(r)}}if(this.disposed)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift());return e}clear(){for(const t of this.rindexes({allowStale:!0})){const e=this.valList[t];if(this.isBackgroundFetch(e))e.__abortController.abort();else{const r=this.keyList[t];this.dispose(e,r,"delete"),this.disposeAfter&&this.disposed.push([e,r,"delete"])}}if(this.keyMap.clear(),this.valList.fill(null),this.keyList.fill(null),this.ttls&&(this.ttls.fill(0),this.starts.fill(0)),this.sizes&&this.sizes.fill(0),this.head=0,this.tail=0,this.initialFill=1,this.free.length=0,this.calculatedSize=0,this.size=0,this.disposed)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift())}get reset(){return u("reset","clear"),this.clear}get length(){return((t,e)=>{const r="LRU_CACHE_PROPERTY_"+t;if(c(r)){const{prototype:i}=y,{get:n}=Object.getOwnPropertyDescriptor(i,t);f(r,t+" property","cache."+e,n)}})("length","size"),this.size}static get AbortController(){return i}static get AbortSignal(){return a}}t.exports=y}).call(this,r(4))},function(t,e,r){(function(e,i,n,s){t.exports=function t(e,i,n){function s(o,h){if(!i[o]){if(!e[o]){if(!h&&r(49))return(void 0)(o,!0);if(a)return a(o,!0);var u=new Error("Cannot find module '"+o+"'");throw u.code="MODULE_NOT_FOUND",u}var l=i[o]={exports:{}};e[o][0].call(l.exports,(function(t){return s(e[o][1][t]||t)}),l,l.exports,t,e,i,n)}return i[o].exports}for(var a=!1,o=0;o<n.length;o++)s(n[o]);return s}({1:[function(t,e,r){"use strict";var i=t("./utils"),n=t("./support"),s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";r.encode=function(t){for(var e,r,n,a,o,h,u,l=[],c=0,f=t.length,d=f,p="string"!==i.getTypeOf(t);c<t.length;)d=f-c,n=p?(e=t[c++],r=c<f?t[c++]:0,c<f?t[c++]:0):(e=t.charCodeAt(c++),r=c<f?t.charCodeAt(c++):0,c<f?t.charCodeAt(c++):0),a=e>>2,o=(3&e)<<4|r>>4,h=1<d?(15&r)<<2|n>>6:64,u=2<d?63&n:64,l.push(s.charAt(a)+s.charAt(o)+s.charAt(h)+s.charAt(u));return l.join("")},r.decode=function(t){var e,r,i,a,o,h,u=0,l=0,c="data:";if(t.substr(0,c.length)===c)throw new Error("Invalid base64 input, it looks like a data url.");var f,d=3*(t=t.replace(/[^A-Za-z0-9\+\/\=]/g,"")).length/4;if(t.charAt(t.length-1)===s.charAt(64)&&d--,t.charAt(t.length-2)===s.charAt(64)&&d--,d%1!=0)throw new Error("Invalid base64 input, bad content length.");for(f=n.uint8array?new Uint8Array(0|d):new Array(0|d);u<t.length;)e=s.indexOf(t.charAt(u++))<<2|(a=s.indexOf(t.charAt(u++)))>>4,r=(15&a)<<4|(o=s.indexOf(t.charAt(u++)))>>2,i=(3&o)<<6|(h=s.indexOf(t.charAt(u++))),f[l++]=e,64!==o&&(f[l++]=r),64!==h&&(f[l++]=i);return f}},{"./support":30,"./utils":32}],2:[function(t,e,r){"use strict";var i=t("./external"),n=t("./stream/DataWorker"),s=t("./stream/Crc32Probe"),a=t("./stream/DataLengthProbe");function o(t,e,r,i,n){this.compressedSize=t,this.uncompressedSize=e,this.crc32=r,this.compression=i,this.compressedContent=n}o.prototype={getContentWorker:function(){var t=new n(i.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new a("data_length")),e=this;return t.on("end",(function(){if(this.streamInfo.data_length!==e.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")})),t},getCompressedWorker:function(){return new n(i.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},o.createWorkerFrom=function(t,e,r){return t.pipe(new s).pipe(new a("uncompressedSize")).pipe(e.compressWorker(r)).pipe(new a("compressedSize")).withStreamInfo("compression",e)},e.exports=o},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(t,e,r){"use strict";var i=t("./stream/GenericWorker");r.STORE={magic:"\0\0",compressWorker:function(t){return new i("STORE compression")},uncompressWorker:function(){return new i("STORE decompression")}},r.DEFLATE=t("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(t,e,r){"use strict";var i=t("./utils"),n=function(){for(var t,e=[],r=0;r<256;r++){t=r;for(var i=0;i<8;i++)t=1&t?3988292384^t>>>1:t>>>1;e[r]=t}return e}();e.exports=function(t,e){return void 0!==t&&t.length?"string"!==i.getTypeOf(t)?function(t,e,r,i){var s=n,a=0+r;t^=-1;for(var o=0;o<a;o++)t=t>>>8^s[255&(t^e[o])];return-1^t}(0|e,t,t.length):function(t,e,r,i){var s=n,a=0+r;t^=-1;for(var o=0;o<a;o++)t=t>>>8^s[255&(t^e.charCodeAt(o))];return-1^t}(0|e,t,t.length):0}},{"./utils":32}],5:[function(t,e,r){"use strict";r.base64=!1,r.binary=!1,r.dir=!1,r.createFolders=!0,r.date=null,r.compression=null,r.compressionOptions=null,r.comment=null,r.unixPermissions=null,r.dosPermissions=null},{}],6:[function(t,e,r){"use strict";var i;i="undefined"!=typeof Promise?Promise:t("lie"),e.exports={Promise:i}},{lie:37}],7:[function(t,e,r){"use strict";var i="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array,n=t("pako"),s=t("./utils"),a=t("./stream/GenericWorker"),o=i?"uint8array":"array";function h(t,e){a.call(this,"FlateWorker/"+t),this._pako=null,this._pakoAction=t,this._pakoOptions=e,this.meta={}}r.magic="\b\0",s.inherits(h,a),h.prototype.processChunk=function(t){this.meta=t.meta,null===this._pako&&this._createPako(),this._pako.push(s.transformTo(o,t.data),!1)},h.prototype.flush=function(){a.prototype.flush.call(this),null===this._pako&&this._createPako(),this._pako.push([],!0)},h.prototype.cleanUp=function(){a.prototype.cleanUp.call(this),this._pako=null},h.prototype._createPako=function(){this._pako=new n[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var t=this;this._pako.onData=function(e){t.push({data:e,meta:t.meta})}},r.compressWorker=function(t){return new h("Deflate",t)},r.uncompressWorker=function(){return new h("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(t,e,r){"use strict";function i(t,e){var r,i="";for(r=0;r<e;r++)i+=String.fromCharCode(255&t),t>>>=8;return i}function n(t,e,r,n,a,l){var c,f,d=t.file,p=t.compression,m=l!==o.utf8encode,g=s.transformTo("string",l(d.name)),y=s.transformTo("string",o.utf8encode(d.name)),v=d.comment,_=s.transformTo("string",l(v)),b=s.transformTo("string",o.utf8encode(v)),w=y.length!==d.name.length,M=b.length!==v.length,x="",k="",S="",E=d.dir,C=d.date,A={crc32:0,compressedSize:0,uncompressedSize:0};e&&!r||(A.crc32=t.crc32,A.compressedSize=t.compressedSize,A.uncompressedSize=t.uncompressedSize);var O=0;e&&(O|=8),m||!w&&!M||(O|=2048);var T=0,I=0;E&&(T|=16),"UNIX"===a?(I=798,T|=function(t,e){var r=t;return t||(r=e?16893:33204),(65535&r)<<16}(d.unixPermissions,E)):(I=20,T|=function(t){return 63&(t||0)}(d.dosPermissions)),c=C.getUTCHours(),c<<=6,c|=C.getUTCMinutes(),c<<=5,c|=C.getUTCSeconds()/2,f=C.getUTCFullYear()-1980,f<<=4,f|=C.getUTCMonth()+1,f<<=5,f|=C.getUTCDate(),w&&(k=i(1,1)+i(h(g),4)+y,x+="up"+i(k.length,2)+k),M&&(S=i(1,1)+i(h(_),4)+b,x+="uc"+i(S.length,2)+S);var L="";return L+="\n\0",L+=i(O,2),L+=p.magic,L+=i(c,2),L+=i(f,2),L+=i(A.crc32,4),L+=i(A.compressedSize,4),L+=i(A.uncompressedSize,4),L+=i(g.length,2),L+=i(x.length,2),{fileRecord:u.LOCAL_FILE_HEADER+L+g+x,dirRecord:u.CENTRAL_FILE_HEADER+i(I,2)+L+i(_.length,2)+"\0\0\0\0"+i(T,4)+i(n,4)+g+x+_}}var s=t("../utils"),a=t("../stream/GenericWorker"),o=t("../utf8"),h=t("../crc32"),u=t("../signature");function l(t,e,r,i){a.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=e,this.zipPlatform=r,this.encodeFileName=i,this.streamFiles=t,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}s.inherits(l,a),l.prototype.push=function(t){var e=t.meta.percent||0,r=this.entriesCount,i=this._sources.length;this.accumulate?this.contentBuffer.push(t):(this.bytesWritten+=t.data.length,a.prototype.push.call(this,{data:t.data,meta:{currentFile:this.currentFile,percent:r?(e+100*(r-i-1))/r:100}}))},l.prototype.openedSource=function(t){this.currentSourceOffset=this.bytesWritten,this.currentFile=t.file.name;var e=this.streamFiles&&!t.file.dir;if(e){var r=n(t,e,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:r.fileRecord,meta:{percent:0}})}else this.accumulate=!0},l.prototype.closedSource=function(t){this.accumulate=!1;var e=this.streamFiles&&!t.file.dir,r=n(t,e,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(r.dirRecord),e)this.push({data:function(t){return u.DATA_DESCRIPTOR+i(t.crc32,4)+i(t.compressedSize,4)+i(t.uncompressedSize,4)}(t),meta:{percent:100}});else for(this.push({data:r.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},l.prototype.flush=function(){for(var t=this.bytesWritten,e=0;e<this.dirRecords.length;e++)this.push({data:this.dirRecords[e],meta:{percent:100}});var r=this.bytesWritten-t,n=function(t,e,r,n,a){var o=s.transformTo("string",a(n));return u.CENTRAL_DIRECTORY_END+"\0\0\0\0"+i(t,2)+i(t,2)+i(e,4)+i(r,4)+i(o.length,2)+o}(this.dirRecords.length,r,t,this.zipComment,this.encodeFileName);this.push({data:n,meta:{percent:100}})},l.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},l.prototype.registerPrevious=function(t){this._sources.push(t);var e=this;return t.on("data",(function(t){e.processChunk(t)})),t.on("end",(function(){e.closedSource(e.previous.streamInfo),e._sources.length?e.prepareNextSource():e.end()})),t.on("error",(function(t){e.error(t)})),this},l.prototype.resume=function(){return!!a.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},l.prototype.error=function(t){var e=this._sources;if(!a.prototype.error.call(this,t))return!1;for(var r=0;r<e.length;r++)try{e[r].error(t)}catch(t){}return!0},l.prototype.lock=function(){a.prototype.lock.call(this);for(var t=this._sources,e=0;e<t.length;e++)t[e].lock()},e.exports=l},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(t,e,r){"use strict";var i=t("../compressions"),n=t("./ZipFileWorker");r.generateWorker=function(t,e,r){var s=new n(e.streamFiles,r,e.platform,e.encodeFileName),a=0;try{t.forEach((function(t,r){a++;var n=function(t,e){var r=t||e,n=i[r];if(!n)throw new Error(r+" is not a valid compression method !");return n}(r.options.compression,e.compression),o=r.options.compressionOptions||e.compressionOptions||{},h=r.dir,u=r.date;r._compressWorker(n,o).withStreamInfo("file",{name:t,dir:h,date:u,comment:r.comment||"",unixPermissions:r.unixPermissions,dosPermissions:r.dosPermissions}).pipe(s)})),s.entriesCount=a}catch(t){s.error(t)}return s}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(t,e,r){"use strict";function i(){if(!(this instanceof i))return new i;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files=Object.create(null),this.comment=null,this.root="",this.clone=function(){var t=new i;for(var e in this)"function"!=typeof this[e]&&(t[e]=this[e]);return t}}(i.prototype=t("./object")).loadAsync=t("./load"),i.support=t("./support"),i.defaults=t("./defaults"),i.version="3.10.0",i.loadAsync=function(t,e){return(new i).loadAsync(t,e)},i.external=t("./external"),e.exports=i},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(t,e,r){"use strict";var i=t("./utils"),n=t("./external"),s=t("./utf8"),a=t("./zipEntries"),o=t("./stream/Crc32Probe"),h=t("./nodejsUtils");function u(t){return new n.Promise((function(e,r){var i=t.decompressed.getContentWorker().pipe(new o);i.on("error",(function(t){r(t)})).on("end",(function(){i.streamInfo.crc32!==t.decompressed.crc32?r(new Error("Corrupted zip : CRC32 mismatch")):e()})).resume()}))}e.exports=function(t,e){var r=this;return e=i.extend(e||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:s.utf8decode}),h.isNode&&h.isStream(t)?n.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):i.prepareContent("the loaded zip file",t,!0,e.optimizedBinaryString,e.base64).then((function(t){var r=new a(e);return r.load(t),r})).then((function(t){var r=[n.Promise.resolve(t)],i=t.files;if(e.checkCRC32)for(var s=0;s<i.length;s++)r.push(u(i[s]));return n.Promise.all(r)})).then((function(t){for(var n=t.shift(),s=n.files,a=0;a<s.length;a++){var o=s[a],h=o.fileNameStr,u=i.resolve(o.fileNameStr);r.file(u,o.decompressed,{binary:!0,optimizedBinaryString:!0,date:o.date,dir:o.dir,comment:o.fileCommentStr.length?o.fileCommentStr:null,unixPermissions:o.unixPermissions,dosPermissions:o.dosPermissions,createFolders:e.createFolders}),o.dir||(r.file(u).unsafeOriginalName=h)}return n.zipComment.length&&(r.comment=n.zipComment),r}))}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(t,e,r){"use strict";var i=t("../utils"),n=t("../stream/GenericWorker");function s(t,e){n.call(this,"Nodejs stream input adapter for "+t),this._upstreamEnded=!1,this._bindStream(e)}i.inherits(s,n),s.prototype._bindStream=function(t){var e=this;(this._stream=t).pause(),t.on("data",(function(t){e.push({data:t,meta:{percent:0}})})).on("error",(function(t){e.isPaused?this.generatedError=t:e.error(t)})).on("end",(function(){e.isPaused?e._upstreamEnded=!0:e.end()}))},s.prototype.pause=function(){return!!n.prototype.pause.call(this)&&(this._stream.pause(),!0)},s.prototype.resume=function(){return!!n.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},e.exports=s},{"../stream/GenericWorker":28,"../utils":32}],13:[function(t,e,r){"use strict";var i=t("readable-stream").Readable;function n(t,e,r){i.call(this,e),this._helper=t;var n=this;t.on("data",(function(t,e){n.push(t)||n._helper.pause(),r&&r(e)})).on("error",(function(t){n.emit("error",t)})).on("end",(function(){n.push(null)}))}t("../utils").inherits(n,i),n.prototype._read=function(){this._helper.resume()},e.exports=n},{"../utils":32,"readable-stream":16}],14:[function(t,r,i){"use strict";r.exports={isNode:void 0!==e,newBufferFrom:function(t,r){if(e.from&&e.from!==Uint8Array.from)return e.from(t,r);if("number"==typeof t)throw new Error('The "data" argument must not be a number');return new e(t,r)},allocBuffer:function(t){if(e.alloc)return e.alloc(t);var r=new e(t);return r.fill(0),r},isBuffer:function(t){return e.isBuffer(t)},isStream:function(t){return t&&"function"==typeof t.on&&"function"==typeof t.pause&&"function"==typeof t.resume}}},{}],15:[function(t,e,r){"use strict";function i(t,e,r){var i,n=s.getTypeOf(e),o=s.extend(r||{},h);o.date=o.date||new Date,null!==o.compression&&(o.compression=o.compression.toUpperCase()),"string"==typeof o.unixPermissions&&(o.unixPermissions=parseInt(o.unixPermissions,8)),o.unixPermissions&&16384&o.unixPermissions&&(o.dir=!0),o.dosPermissions&&16&o.dosPermissions&&(o.dir=!0),o.dir&&(t=m(t)),o.createFolders&&(i=p(t))&&g.call(this,i,!0);var c,y="string"===n&&!1===o.binary&&!1===o.base64;r&&void 0!==r.binary||(o.binary=!y),(e instanceof u&&0===e.uncompressedSize||o.dir||!e||0===e.length)&&(o.base64=!1,o.binary=!0,e="",o.compression="STORE",n="string"),c=e instanceof u||e instanceof a?e:f.isNode&&f.isStream(e)?new d(t,e):s.prepareContent(t,e,o.binary,o.optimizedBinaryString,o.base64);var v=new l(t,c,o);this.files[t]=v}var n=t("./utf8"),s=t("./utils"),a=t("./stream/GenericWorker"),o=t("./stream/StreamHelper"),h=t("./defaults"),u=t("./compressedObject"),l=t("./zipObject"),c=t("./generate"),f=t("./nodejsUtils"),d=t("./nodejs/NodejsStreamInputAdapter"),p=function(t){"/"===t.slice(-1)&&(t=t.substring(0,t.length-1));var e=t.lastIndexOf("/");return 0<e?t.substring(0,e):""},m=function(t){return"/"!==t.slice(-1)&&(t+="/"),t},g=function(t,e){return e=void 0!==e?e:h.createFolders,t=m(t),this.files[t]||i.call(this,t,null,{dir:!0,createFolders:e}),this.files[t]};function y(t){return"[object RegExp]"===Object.prototype.toString.call(t)}var v={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(t){var e,r,i;for(e in this.files)i=this.files[e],(r=e.slice(this.root.length,e.length))&&e.slice(0,this.root.length)===this.root&&t(r,i)},filter:function(t){var e=[];return this.forEach((function(r,i){t(r,i)&&e.push(i)})),e},file:function(t,e,r){if(1!==arguments.length)return t=this.root+t,i.call(this,t,e,r),this;if(y(t)){var n=t;return this.filter((function(t,e){return!e.dir&&n.test(t)}))}var s=this.files[this.root+t];return s&&!s.dir?s:null},folder:function(t){if(!t)return this;if(y(t))return this.filter((function(e,r){return r.dir&&t.test(e)}));var e=this.root+t,r=g.call(this,e),i=this.clone();return i.root=r.name,i},remove:function(t){t=this.root+t;var e=this.files[t];if(e||("/"!==t.slice(-1)&&(t+="/"),e=this.files[t]),e&&!e.dir)delete this.files[t];else for(var r=this.filter((function(e,r){return r.name.slice(0,t.length)===t})),i=0;i<r.length;i++)delete this.files[r[i].name];return this},generate:function(t){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(t){var e,r={};try{if((r=s.extend(t||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:n.utf8encode})).type=r.type.toLowerCase(),r.compression=r.compression.toUpperCase(),"binarystring"===r.type&&(r.type="string"),!r.type)throw new Error("No output type specified.");s.checkSupport(r.type),"darwin"!==r.platform&&"freebsd"!==r.platform&&"linux"!==r.platform&&"sunos"!==r.platform||(r.platform="UNIX"),"win32"===r.platform&&(r.platform="DOS");var i=r.comment||this.comment||"";e=c.generateWorker(this,r,i)}catch(t){(e=new a("error")).error(t)}return new o(e,r.type||"string",r.mimeType)},generateAsync:function(t,e){return this.generateInternalStream(t).accumulate(e)},generateNodeStream:function(t,e){return(t=t||{}).type||(t.type="nodebuffer"),this.generateInternalStream(t).toNodejsStream(e)}};e.exports=v},{"./compressedObject":2,"./defaults":5,"./generate":9,"./nodejs/NodejsStreamInputAdapter":12,"./nodejsUtils":14,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31,"./utils":32,"./zipObject":35}],16:[function(t,e,r){e.exports=t("stream")},{stream:void 0}],17:[function(t,e,r){"use strict";var i=t("./DataReader");function n(t){i.call(this,t);for(var e=0;e<this.data.length;e++)t[e]=255&t[e]}t("../utils").inherits(n,i),n.prototype.byteAt=function(t){return this.data[this.zero+t]},n.prototype.lastIndexOfSignature=function(t){for(var e=t.charCodeAt(0),r=t.charCodeAt(1),i=t.charCodeAt(2),n=t.charCodeAt(3),s=this.length-4;0<=s;--s)if(this.data[s]===e&&this.data[s+1]===r&&this.data[s+2]===i&&this.data[s+3]===n)return s-this.zero;return-1},n.prototype.readAndCheckSignature=function(t){var e=t.charCodeAt(0),r=t.charCodeAt(1),i=t.charCodeAt(2),n=t.charCodeAt(3),s=this.readData(4);return e===s[0]&&r===s[1]&&i===s[2]&&n===s[3]},n.prototype.readData=function(t){if(this.checkOffset(t),0===t)return[];var e=this.data.slice(this.zero+this.index,this.zero+this.index+t);return this.index+=t,e},e.exports=n},{"../utils":32,"./DataReader":18}],18:[function(t,e,r){"use strict";var i=t("../utils");function n(t){this.data=t,this.length=t.length,this.index=0,this.zero=0}n.prototype={checkOffset:function(t){this.checkIndex(this.index+t)},checkIndex:function(t){if(this.length<this.zero+t||t<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+t+"). Corrupted zip ?")},setIndex:function(t){this.checkIndex(t),this.index=t},skip:function(t){this.setIndex(this.index+t)},byteAt:function(t){},readInt:function(t){var e,r=0;for(this.checkOffset(t),e=this.index+t-1;e>=this.index;e--)r=(r<<8)+this.byteAt(e);return this.index+=t,r},readString:function(t){return i.transformTo("string",this.readData(t))},readData:function(t){},lastIndexOfSignature:function(t){},readAndCheckSignature:function(t){},readDate:function(){var t=this.readInt(4);return new Date(Date.UTC(1980+(t>>25&127),(t>>21&15)-1,t>>16&31,t>>11&31,t>>5&63,(31&t)<<1))}},e.exports=n},{"../utils":32}],19:[function(t,e,r){"use strict";var i=t("./Uint8ArrayReader");function n(t){i.call(this,t)}t("../utils").inherits(n,i),n.prototype.readData=function(t){this.checkOffset(t);var e=this.data.slice(this.zero+this.index,this.zero+this.index+t);return this.index+=t,e},e.exports=n},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(t,e,r){"use strict";var i=t("./DataReader");function n(t){i.call(this,t)}t("../utils").inherits(n,i),n.prototype.byteAt=function(t){return this.data.charCodeAt(this.zero+t)},n.prototype.lastIndexOfSignature=function(t){return this.data.lastIndexOf(t)-this.zero},n.prototype.readAndCheckSignature=function(t){return t===this.readData(4)},n.prototype.readData=function(t){this.checkOffset(t);var e=this.data.slice(this.zero+this.index,this.zero+this.index+t);return this.index+=t,e},e.exports=n},{"../utils":32,"./DataReader":18}],21:[function(t,e,r){"use strict";var i=t("./ArrayReader");function n(t){i.call(this,t)}t("../utils").inherits(n,i),n.prototype.readData=function(t){if(this.checkOffset(t),0===t)return new Uint8Array(0);var e=this.data.subarray(this.zero+this.index,this.zero+this.index+t);return this.index+=t,e},e.exports=n},{"../utils":32,"./ArrayReader":17}],22:[function(t,e,r){"use strict";var i=t("../utils"),n=t("../support"),s=t("./ArrayReader"),a=t("./StringReader"),o=t("./NodeBufferReader"),h=t("./Uint8ArrayReader");e.exports=function(t){var e=i.getTypeOf(t);return i.checkSupport(e),"string"!==e||n.uint8array?"nodebuffer"===e?new o(t):n.uint8array?new h(i.transformTo("uint8array",t)):new s(i.transformTo("array",t)):new a(t)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(t,e,r){"use strict";r.LOCAL_FILE_HEADER="PK",r.CENTRAL_FILE_HEADER="PK",r.CENTRAL_DIRECTORY_END="PK",r.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK",r.ZIP64_CENTRAL_DIRECTORY_END="PK",r.DATA_DESCRIPTOR="PK\b"},{}],24:[function(t,e,r){"use strict";var i=t("./GenericWorker"),n=t("../utils");function s(t){i.call(this,"ConvertWorker to "+t),this.destType=t}n.inherits(s,i),s.prototype.processChunk=function(t){this.push({data:n.transformTo(this.destType,t.data),meta:t.meta})},e.exports=s},{"../utils":32,"./GenericWorker":28}],25:[function(t,e,r){"use strict";var i=t("./GenericWorker"),n=t("../crc32");function s(){i.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}t("../utils").inherits(s,i),s.prototype.processChunk=function(t){this.streamInfo.crc32=n(t.data,this.streamInfo.crc32||0),this.push(t)},e.exports=s},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(t,e,r){"use strict";var i=t("../utils"),n=t("./GenericWorker");function s(t){n.call(this,"DataLengthProbe for "+t),this.propName=t,this.withStreamInfo(t,0)}i.inherits(s,n),s.prototype.processChunk=function(t){if(t){var e=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=e+t.data.length}n.prototype.processChunk.call(this,t)},e.exports=s},{"../utils":32,"./GenericWorker":28}],27:[function(t,e,r){"use strict";var i=t("../utils"),n=t("./GenericWorker");function s(t){n.call(this,"DataWorker");var e=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,t.then((function(t){e.dataIsReady=!0,e.data=t,e.max=t&&t.length||0,e.type=i.getTypeOf(t),e.isPaused||e._tickAndRepeat()}),(function(t){e.error(t)}))}i.inherits(s,n),s.prototype.cleanUp=function(){n.prototype.cleanUp.call(this),this.data=null},s.prototype.resume=function(){return!!n.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,i.delay(this._tickAndRepeat,[],this)),!0)},s.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(i.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},s.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var t=null,e=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":t=this.data.substring(this.index,e);break;case"uint8array":t=this.data.subarray(this.index,e);break;case"array":case"nodebuffer":t=this.data.slice(this.index,e)}return this.index=e,this.push({data:t,meta:{percent:this.max?this.index/this.max*100:0}})},e.exports=s},{"../utils":32,"./GenericWorker":28}],28:[function(t,e,r){"use strict";function i(t){this.name=t||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}i.prototype={push:function(t){this.emit("data",t)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(t){this.emit("error",t)}return!0},error:function(t){return!this.isFinished&&(this.isPaused?this.generatedError=t:(this.isFinished=!0,this.emit("error",t),this.previous&&this.previous.error(t),this.cleanUp()),!0)},on:function(t,e){return this._listeners[t].push(e),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(t,e){if(this._listeners[t])for(var r=0;r<this._listeners[t].length;r++)this._listeners[t][r].call(this,e)},pipe:function(t){return t.registerPrevious(this)},registerPrevious:function(t){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=t.streamInfo,this.mergeStreamInfo(),this.previous=t;var e=this;return t.on("data",(function(t){e.processChunk(t)})),t.on("end",(function(){e.end()})),t.on("error",(function(t){e.error(t)})),this},pause:function(){return!this.isPaused&&!this.isFinished&&(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return!1;var t=this.isPaused=!1;return this.generatedError&&(this.error(this.generatedError),t=!0),this.previous&&this.previous.resume(),!t},flush:function(){},processChunk:function(t){this.push(t)},withStreamInfo:function(t,e){return this.extraStreamInfo[t]=e,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var t in this.extraStreamInfo)this.extraStreamInfo.hasOwnProperty(t)&&(this.streamInfo[t]=this.extraStreamInfo[t])},lock:function(){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.isLocked=!0,this.previous&&this.previous.lock()},toString:function(){var t="Worker "+this.name;return this.previous?this.previous+" -> "+t:t}},e.exports=i},{}],29:[function(t,r,i){"use strict";var n=t("../utils"),s=t("./ConvertWorker"),a=t("./GenericWorker"),o=t("../base64"),h=t("../support"),u=t("../external"),l=null;if(h.nodestream)try{l=t("../nodejs/NodejsStreamOutputAdapter")}catch(t){}function c(t,e,r){var i=e;switch(e){case"blob":case"arraybuffer":i="uint8array";break;case"base64":i="string"}try{this._internalType=i,this._outputType=e,this._mimeType=r,n.checkSupport(i),this._worker=t.pipe(new s(i)),t.lock()}catch(t){this._worker=new a("error"),this._worker.error(t)}}c.prototype={accumulate:function(t){return function(t,r){return new u.Promise((function(i,s){var a=[],h=t._internalType,u=t._outputType,l=t._mimeType;t.on("data",(function(t,e){a.push(t),r&&r(e)})).on("error",(function(t){a=[],s(t)})).on("end",(function(){try{var t=function(t,e,r){switch(t){case"blob":return n.newBlob(n.transformTo("arraybuffer",e),r);case"base64":return o.encode(e);default:return n.transformTo(t,e)}}(u,function(t,r){var i,n=0,s=null,a=0;for(i=0;i<r.length;i++)a+=r[i].length;switch(t){case"string":return r.join("");case"array":return Array.prototype.concat.apply([],r);case"uint8array":for(s=new Uint8Array(a),i=0;i<r.length;i++)s.set(r[i],n),n+=r[i].length;return s;case"nodebuffer":return e.concat(r);default:throw new Error("concat : unsupported type '"+t+"'")}}(h,a),l);i(t)}catch(t){s(t)}a=[]})).resume()}))}(this,t)},on:function(t,e){var r=this;return"data"===t?this._worker.on(t,(function(t){e.call(r,t.data,t.meta)})):this._worker.on(t,(function(){n.delay(e,arguments,r)})),this},resume:function(){return n.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(t){if(n.checkSupport("nodestream"),"nodebuffer"!==this._outputType)throw new Error(this._outputType+" is not supported by this method");return new l(this,{objectMode:"nodebuffer"!==this._outputType},t)}},r.exports=c},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(t,r,i){"use strict";if(i.base64=!0,i.array=!0,i.string=!0,i.arraybuffer="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array,i.nodebuffer=void 0!==e,i.uint8array="undefined"!=typeof Uint8Array,"undefined"==typeof ArrayBuffer)i.blob=!1;else{var n=new ArrayBuffer(0);try{i.blob=0===new Blob([n],{type:"application/zip"}).size}catch(t){try{var s=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);s.append(n),i.blob=0===s.getBlob("application/zip").size}catch(t){i.blob=!1}}}try{i.nodestream=!!t("readable-stream").Readable}catch(t){i.nodestream=!1}},{"readable-stream":16}],31:[function(t,e,r){"use strict";for(var i=t("./utils"),n=t("./support"),s=t("./nodejsUtils"),a=t("./stream/GenericWorker"),o=new Array(256),h=0;h<256;h++)o[h]=252<=h?6:248<=h?5:240<=h?4:224<=h?3:192<=h?2:1;function u(){a.call(this,"utf-8 decode"),this.leftOver=null}function l(){a.call(this,"utf-8 encode")}o[254]=o[254]=1,r.utf8encode=function(t){return n.nodebuffer?s.newBufferFrom(t,"utf-8"):function(t){var e,r,i,s,a,o=t.length,h=0;for(s=0;s<o;s++)55296==(64512&(r=t.charCodeAt(s)))&&s+1<o&&56320==(64512&(i=t.charCodeAt(s+1)))&&(r=65536+(r-55296<<10)+(i-56320),s++),h+=r<128?1:r<2048?2:r<65536?3:4;for(e=n.uint8array?new Uint8Array(h):new Array(h),s=a=0;a<h;s++)55296==(64512&(r=t.charCodeAt(s)))&&s+1<o&&56320==(64512&(i=t.charCodeAt(s+1)))&&(r=65536+(r-55296<<10)+(i-56320),s++),r<128?e[a++]=r:(r<2048?e[a++]=192|r>>>6:(r<65536?e[a++]=224|r>>>12:(e[a++]=240|r>>>18,e[a++]=128|r>>>12&63),e[a++]=128|r>>>6&63),e[a++]=128|63&r);return e}(t)},r.utf8decode=function(t){return n.nodebuffer?i.transformTo("nodebuffer",t).toString("utf-8"):function(t){var e,r,n,s,a=t.length,h=new Array(2*a);for(e=r=0;e<a;)if((n=t[e++])<128)h[r++]=n;else if(4<(s=o[n]))h[r++]=65533,e+=s-1;else{for(n&=2===s?31:3===s?15:7;1<s&&e<a;)n=n<<6|63&t[e++],s--;1<s?h[r++]=65533:n<65536?h[r++]=n:(n-=65536,h[r++]=55296|n>>10&1023,h[r++]=56320|1023&n)}return h.length!==r&&(h.subarray?h=h.subarray(0,r):h.length=r),i.applyFromCharCode(h)}(t=i.transformTo(n.uint8array?"uint8array":"array",t))},i.inherits(u,a),u.prototype.processChunk=function(t){var e=i.transformTo(n.uint8array?"uint8array":"array",t.data);if(this.leftOver&&this.leftOver.length){if(n.uint8array){var s=e;(e=new Uint8Array(s.length+this.leftOver.length)).set(this.leftOver,0),e.set(s,this.leftOver.length)}else e=this.leftOver.concat(e);this.leftOver=null}var a=function(t,e){var r;for((e=e||t.length)>t.length&&(e=t.length),r=e-1;0<=r&&128==(192&t[r]);)r--;return r<0||0===r?e:r+o[t[r]]>e?r:e}(e),h=e;a!==e.length&&(n.uint8array?(h=e.subarray(0,a),this.leftOver=e.subarray(a,e.length)):(h=e.slice(0,a),this.leftOver=e.slice(a,e.length))),this.push({data:r.utf8decode(h),meta:t.meta})},u.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:r.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},r.Utf8DecodeWorker=u,i.inherits(l,a),l.prototype.processChunk=function(t){this.push({data:r.utf8encode(t.data),meta:t.meta})},r.Utf8EncodeWorker=l},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(t,e,r){"use strict";var n=t("./support"),s=t("./base64"),a=t("./nodejsUtils"),o=t("./external");function h(t){return t}function u(t,e){for(var r=0;r<t.length;++r)e[r]=255&t.charCodeAt(r);return e}t("setimmediate"),r.newBlob=function(t,e){r.checkSupport("blob");try{return new Blob([t],{type:e})}catch(r){try{var i=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return i.append(t),i.getBlob(e)}catch(t){throw new Error("Bug : can't construct the Blob.")}}};var l={stringifyByChunk:function(t,e,r){var i=[],n=0,s=t.length;if(s<=r)return String.fromCharCode.apply(null,t);for(;n<s;)"array"===e||"nodebuffer"===e?i.push(String.fromCharCode.apply(null,t.slice(n,Math.min(n+r,s)))):i.push(String.fromCharCode.apply(null,t.subarray(n,Math.min(n+r,s)))),n+=r;return i.join("")},stringifyByChar:function(t){for(var e="",r=0;r<t.length;r++)e+=String.fromCharCode(t[r]);return e},applyCanBeUsed:{uint8array:function(){try{return n.uint8array&&1===String.fromCharCode.apply(null,new Uint8Array(1)).length}catch(t){return!1}}(),nodebuffer:function(){try{return n.nodebuffer&&1===String.fromCharCode.apply(null,a.allocBuffer(1)).length}catch(t){return!1}}()}};function c(t){var e=65536,i=r.getTypeOf(t),n=!0;if("uint8array"===i?n=l.applyCanBeUsed.uint8array:"nodebuffer"===i&&(n=l.applyCanBeUsed.nodebuffer),n)for(;1<e;)try{return l.stringifyByChunk(t,i,e)}catch(t){e=Math.floor(e/2)}return l.stringifyByChar(t)}function f(t,e){for(var r=0;r<t.length;r++)e[r]=t[r];return e}r.applyFromCharCode=c;var d={};d.string={string:h,array:function(t){return u(t,new Array(t.length))},arraybuffer:function(t){return d.string.uint8array(t).buffer},uint8array:function(t){return u(t,new Uint8Array(t.length))},nodebuffer:function(t){return u(t,a.allocBuffer(t.length))}},d.array={string:c,array:h,arraybuffer:function(t){return new Uint8Array(t).buffer},uint8array:function(t){return new Uint8Array(t)},nodebuffer:function(t){return a.newBufferFrom(t)}},d.arraybuffer={string:function(t){return c(new Uint8Array(t))},array:function(t){return f(new Uint8Array(t),new Array(t.byteLength))},arraybuffer:h,uint8array:function(t){return new Uint8Array(t)},nodebuffer:function(t){return a.newBufferFrom(new Uint8Array(t))}},d.uint8array={string:c,array:function(t){return f(t,new Array(t.length))},arraybuffer:function(t){return t.buffer},uint8array:h,nodebuffer:function(t){return a.newBufferFrom(t)}},d.nodebuffer={string:c,array:function(t){return f(t,new Array(t.length))},arraybuffer:function(t){return d.nodebuffer.uint8array(t).buffer},uint8array:function(t){return f(t,new Uint8Array(t.length))},nodebuffer:h},r.transformTo=function(t,e){if(e=e||"",!t)return e;r.checkSupport(t);var i=r.getTypeOf(e);return d[i][t](e)},r.resolve=function(t){for(var e=t.split("/"),r=[],i=0;i<e.length;i++){var n=e[i];"."===n||""===n&&0!==i&&i!==e.length-1||(".."===n?r.pop():r.push(n))}return r.join("/")},r.getTypeOf=function(t){return"string"==typeof t?"string":"[object Array]"===Object.prototype.toString.call(t)?"array":n.nodebuffer&&a.isBuffer(t)?"nodebuffer":n.uint8array&&t instanceof Uint8Array?"uint8array":n.arraybuffer&&t instanceof ArrayBuffer?"arraybuffer":void 0},r.checkSupport=function(t){if(!n[t.toLowerCase()])throw new Error(t+" is not supported by this platform")},r.MAX_VALUE_16BITS=65535,r.MAX_VALUE_32BITS=-1,r.pretty=function(t){var e,r,i="";for(r=0;r<(t||"").length;r++)i+="\\x"+((e=t.charCodeAt(r))<16?"0":"")+e.toString(16).toUpperCase();return i},r.delay=function(t,e,r){i((function(){t.apply(r||null,e||[])}))},r.inherits=function(t,e){function r(){}r.prototype=e.prototype,t.prototype=new r},r.extend=function(){var t,e,r={};for(t=0;t<arguments.length;t++)for(e in arguments[t])arguments[t].hasOwnProperty(e)&&void 0===r[e]&&(r[e]=arguments[t][e]);return r},r.prepareContent=function(t,e,i,a,h){return o.Promise.resolve(e).then((function(t){return n.blob&&(t instanceof Blob||-1!==["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(t)))&&"undefined"!=typeof FileReader?new o.Promise((function(e,r){var i=new FileReader;i.onload=function(t){e(t.target.result)},i.onerror=function(t){r(t.target.error)},i.readAsArrayBuffer(t)})):t})).then((function(e){var l=r.getTypeOf(e);return l?("arraybuffer"===l?e=r.transformTo("uint8array",e):"string"===l&&(h?e=s.decode(e):i&&!0!==a&&(e=function(t){return u(t,n.uint8array?new Uint8Array(t.length):new Array(t.length))}(e))),e):o.Promise.reject(new Error("Can't read the data of '"+t+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))}))}},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,setimmediate:54}],33:[function(t,e,r){"use strict";var i=t("./reader/readerFor"),n=t("./utils"),s=t("./signature"),a=t("./zipEntry"),o=(t("./utf8"),t("./support"));function h(t){this.files=[],this.loadOptions=t}h.prototype={checkSignature:function(t){if(!this.reader.readAndCheckSignature(t)){this.reader.index-=4;var e=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+n.pretty(e)+", expected "+n.pretty(t)+")")}},isSignature:function(t,e){var r=this.reader.index;this.reader.setIndex(t);var i=this.reader.readString(4)===e;return this.reader.setIndex(r),i},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2);var t=this.reader.readData(this.zipCommentLength),e=o.uint8array?"uint8array":"array",r=n.transformTo(e,t);this.zipComment=this.loadOptions.decodeFileName(r)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.reader.skip(4),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var t,e,r,i=this.zip64EndOfCentralSize-44;0<i;)t=this.reader.readInt(2),e=this.reader.readInt(4),r=this.reader.readData(e),this.zip64ExtensibleData[t]={id:t,length:e,value:r}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),1<this.disksCount)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var t,e;for(t=0;t<this.files.length;t++)e=this.files[t],this.reader.setIndex(e.localHeaderOffset),this.checkSignature(s.LOCAL_FILE_HEADER),e.readLocalPart(this.reader),e.handleUTF8(),e.processAttributes()},readCentralDir:function(){var t;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(s.CENTRAL_FILE_HEADER);)(t=new a({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(t);if(this.centralDirRecords!==this.files.length&&0!==this.centralDirRecords&&0===this.files.length)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var t=this.reader.lastIndexOfSignature(s.CENTRAL_DIRECTORY_END);if(t<0)throw this.isSignature(0,s.LOCAL_FILE_HEADER)?new Error("Corrupted zip: can't find end of central directory"):new Error("Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html");this.reader.setIndex(t);var e=t;if(this.checkSignature(s.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===n.MAX_VALUE_16BITS||this.diskWithCentralDirStart===n.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===n.MAX_VALUE_16BITS||this.centralDirRecords===n.MAX_VALUE_16BITS||this.centralDirSize===n.MAX_VALUE_32BITS||this.centralDirOffset===n.MAX_VALUE_32BITS){if(this.zip64=!0,(t=this.reader.lastIndexOfSignature(s.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(t),this.checkSignature(s.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,s.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(s.ZIP64_CENTRAL_DIRECTORY_END),this.relativeOffsetEndOfZip64CentralDir<0))throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(s.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var r=this.centralDirOffset+this.centralDirSize;this.zip64&&(r+=20,r+=12+this.zip64EndOfCentralSize);var i=e-r;if(0<i)this.isSignature(e,s.CENTRAL_FILE_HEADER)||(this.reader.zero=i);else if(i<0)throw new Error("Corrupted zip: missing "+Math.abs(i)+" bytes.")},prepareReader:function(t){this.reader=i(t)},load:function(t){this.prepareReader(t),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},e.exports=h},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utf8":31,"./utils":32,"./zipEntry":34}],34:[function(t,e,r){"use strict";var i=t("./reader/readerFor"),n=t("./utils"),s=t("./compressedObject"),a=t("./crc32"),o=t("./utf8"),h=t("./compressions"),u=t("./support");function l(t,e){this.options=t,this.loadOptions=e}l.prototype={isEncrypted:function(){return 1==(1&this.bitFlag)},useUTF8:function(){return 2048==(2048&this.bitFlag)},readLocalPart:function(t){var e,r;if(t.skip(22),this.fileNameLength=t.readInt(2),r=t.readInt(2),this.fileName=t.readData(this.fileNameLength),t.skip(r),-1===this.compressedSize||-1===this.uncompressedSize)throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if(null===(e=function(t){for(var e in h)if(h.hasOwnProperty(e)&&h[e].magic===t)return h[e];return null}(this.compressionMethod)))throw new Error("Corrupted zip : compression "+n.pretty(this.compressionMethod)+" unknown (inner file : "+n.transformTo("string",this.fileName)+")");this.decompressed=new s(this.compressedSize,this.uncompressedSize,this.crc32,e,t.readData(this.compressedSize))},readCentralPart:function(t){this.versionMadeBy=t.readInt(2),t.skip(2),this.bitFlag=t.readInt(2),this.compressionMethod=t.readString(2),this.date=t.readDate(),this.crc32=t.readInt(4),this.compressedSize=t.readInt(4),this.uncompressedSize=t.readInt(4);var e=t.readInt(2);if(this.extraFieldsLength=t.readInt(2),this.fileCommentLength=t.readInt(2),this.diskNumberStart=t.readInt(2),this.internalFileAttributes=t.readInt(2),this.externalFileAttributes=t.readInt(4),this.localHeaderOffset=t.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");t.skip(e),this.readExtraFields(t),this.parseZIP64ExtraField(t),this.fileComment=t.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var t=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),0==t&&(this.dosPermissions=63&this.externalFileAttributes),3==t&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||"/"!==this.fileNameStr.slice(-1)||(this.dir=!0)},parseZIP64ExtraField:function(t){if(this.extraFields[1]){var e=i(this.extraFields[1].value);this.uncompressedSize===n.MAX_VALUE_32BITS&&(this.uncompressedSize=e.readInt(8)),this.compressedSize===n.MAX_VALUE_32BITS&&(this.compressedSize=e.readInt(8)),this.localHeaderOffset===n.MAX_VALUE_32BITS&&(this.localHeaderOffset=e.readInt(8)),this.diskNumberStart===n.MAX_VALUE_32BITS&&(this.diskNumberStart=e.readInt(4))}},readExtraFields:function(t){var e,r,i,n=t.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});t.index+4<n;)e=t.readInt(2),r=t.readInt(2),i=t.readData(r),this.extraFields[e]={id:e,length:r,value:i};t.setIndex(n)},handleUTF8:function(){var t=u.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=o.utf8decode(this.fileName),this.fileCommentStr=o.utf8decode(this.fileComment);else{var e=this.findExtraFieldUnicodePath();if(null!==e)this.fileNameStr=e;else{var r=n.transformTo(t,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(r)}var i=this.findExtraFieldUnicodeComment();if(null!==i)this.fileCommentStr=i;else{var s=n.transformTo(t,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(s)}}},findExtraFieldUnicodePath:function(){var t=this.extraFields[28789];if(t){var e=i(t.value);return 1!==e.readInt(1)||a(this.fileName)!==e.readInt(4)?null:o.utf8decode(e.readData(t.length-5))}return null},findExtraFieldUnicodeComment:function(){var t=this.extraFields[25461];if(t){var e=i(t.value);return 1!==e.readInt(1)||a(this.fileComment)!==e.readInt(4)?null:o.utf8decode(e.readData(t.length-5))}return null}},e.exports=l},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(t,e,r){"use strict";function i(t,e,r){this.name=t,this.dir=r.dir,this.date=r.date,this.comment=r.comment,this.unixPermissions=r.unixPermissions,this.dosPermissions=r.dosPermissions,this._data=e,this._dataBinary=r.binary,this.options={compression:r.compression,compressionOptions:r.compressionOptions}}var n=t("./stream/StreamHelper"),s=t("./stream/DataWorker"),a=t("./utf8"),o=t("./compressedObject"),h=t("./stream/GenericWorker");i.prototype={internalStream:function(t){var e=null,r="string";try{if(!t)throw new Error("No output type specified.");var i="string"===(r=t.toLowerCase())||"text"===r;"binarystring"!==r&&"text"!==r||(r="string"),e=this._decompressWorker();var s=!this._dataBinary;s&&!i&&(e=e.pipe(new a.Utf8EncodeWorker)),!s&&i&&(e=e.pipe(new a.Utf8DecodeWorker))}catch(t){(e=new h("error")).error(t)}return new n(e,r,"")},async:function(t,e){return this.internalStream(t).accumulate(e)},nodeStream:function(t,e){return this.internalStream(t||"nodebuffer").toNodejsStream(e)},_compressWorker:function(t,e){if(this._data instanceof o&&this._data.compression.magic===t.magic)return this._data.getCompressedWorker();var r=this._decompressWorker();return this._dataBinary||(r=r.pipe(new a.Utf8EncodeWorker)),o.createWorkerFrom(r,t,e)},_decompressWorker:function(){return this._data instanceof o?this._data.getContentWorker():this._data instanceof h?this._data:new s(this._data)}};for(var u=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],l=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},c=0;c<u.length;c++)i.prototype[u[c]]=l;e.exports=i},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(t,e,r){(function(t){"use strict";var r,i,n=t.MutationObserver||t.WebKitMutationObserver;if(n){var s=0,a=new n(l),o=t.document.createTextNode("");a.observe(o,{characterData:!0}),r=function(){o.data=s=++s%2}}else if(t.setImmediate||void 0===t.MessageChannel)r="document"in t&&"onreadystatechange"in t.document.createElement("script")?function(){var e=t.document.createElement("script");e.onreadystatechange=function(){l(),e.onreadystatechange=null,e.parentNode.removeChild(e),e=null},t.document.documentElement.appendChild(e)}:function(){setTimeout(l,0)};else{var h=new t.MessageChannel;h.port1.onmessage=l,r=function(){h.port2.postMessage(0)}}var u=[];function l(){var t,e;i=!0;for(var r=u.length;r;){for(e=u,u=[],t=-1;++t<r;)e[t]();r=u.length}i=!1}e.exports=function(t){1!==u.push(t)||i||r()}}).call(this,void 0!==n?n:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],37:[function(t,e,r){"use strict";var i=t("immediate");function n(){}var s={},a=["REJECTED"],o=["FULFILLED"],h=["PENDING"];function u(t){if("function"!=typeof t)throw new TypeError("resolver must be a function");this.state=h,this.queue=[],this.outcome=void 0,t!==n&&d(this,t)}function l(t,e,r){this.promise=t,"function"==typeof e&&(this.onFulfilled=e,this.callFulfilled=this.otherCallFulfilled),"function"==typeof r&&(this.onRejected=r,this.callRejected=this.otherCallRejected)}function c(t,e,r){i((function(){var i;try{i=e(r)}catch(i){return s.reject(t,i)}i===t?s.reject(t,new TypeError("Cannot resolve promise with itself")):s.resolve(t,i)}))}function f(t){var e=t&&t.then;if(t&&("object"==typeof t||"function"==typeof t)&&"function"==typeof e)return function(){e.apply(t,arguments)}}function d(t,e){var r=!1;function i(e){r||(r=!0,s.reject(t,e))}function n(e){r||(r=!0,s.resolve(t,e))}var a=p((function(){e(n,i)}));"error"===a.status&&i(a.value)}function p(t,e){var r={};try{r.value=t(e),r.status="success"}catch(t){r.status="error",r.value=t}return r}(e.exports=u).prototype.finally=function(t){if("function"!=typeof t)return this;var e=this.constructor;return this.then((function(r){return e.resolve(t()).then((function(){return r}))}),(function(r){return e.resolve(t()).then((function(){throw r}))}))},u.prototype.catch=function(t){return this.then(null,t)},u.prototype.then=function(t,e){if("function"!=typeof t&&this.state===o||"function"!=typeof e&&this.state===a)return this;var r=new this.constructor(n);return this.state!==h?c(r,this.state===o?t:e,this.outcome):this.queue.push(new l(r,t,e)),r},l.prototype.callFulfilled=function(t){s.resolve(this.promise,t)},l.prototype.otherCallFulfilled=function(t){c(this.promise,this.onFulfilled,t)},l.prototype.callRejected=function(t){s.reject(this.promise,t)},l.prototype.otherCallRejected=function(t){c(this.promise,this.onRejected,t)},s.resolve=function(t,e){var r=p(f,e);if("error"===r.status)return s.reject(t,r.value);var i=r.value;if(i)d(t,i);else{t.state=o,t.outcome=e;for(var n=-1,a=t.queue.length;++n<a;)t.queue[n].callFulfilled(e)}return t},s.reject=function(t,e){t.state=a,t.outcome=e;for(var r=-1,i=t.queue.length;++r<i;)t.queue[r].callRejected(e);return t},u.resolve=function(t){return t instanceof this?t:s.resolve(new this(n),t)},u.reject=function(t){var e=new this(n);return s.reject(e,t)},u.all=function(t){var e=this;if("[object Array]"!==Object.prototype.toString.call(t))return this.reject(new TypeError("must be an array"));var r=t.length,i=!1;if(!r)return this.resolve([]);for(var a=new Array(r),o=0,h=-1,u=new this(n);++h<r;)l(t[h],h);return u;function l(t,n){e.resolve(t).then((function(t){a[n]=t,++o!==r||i||(i=!0,s.resolve(u,a))}),(function(t){i||(i=!0,s.reject(u,t))}))}},u.race=function(t){if("[object Array]"!==Object.prototype.toString.call(t))return this.reject(new TypeError("must be an array"));var e=t.length,r=!1;if(!e)return this.resolve([]);for(var i,a=-1,o=new this(n);++a<e;)i=t[a],this.resolve(i).then((function(t){r||(r=!0,s.resolve(o,t))}),(function(t){r||(r=!0,s.reject(o,t))}));return o}},{immediate:36}],38:[function(t,e,r){"use strict";var i={};(0,t("./lib/utils/common").assign)(i,t("./lib/deflate"),t("./lib/inflate"),t("./lib/zlib/constants")),e.exports=i},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(t,e,r){"use strict";var i=t("./zlib/deflate"),n=t("./utils/common"),s=t("./utils/strings"),a=t("./zlib/messages"),o=t("./zlib/zstream"),h=Object.prototype.toString;function u(t){if(!(this instanceof u))return new u(t);this.options=n.assign({level:-1,method:8,chunkSize:16384,windowBits:15,memLevel:8,strategy:0,to:""},t||{});var e=this.options;e.raw&&0<e.windowBits?e.windowBits=-e.windowBits:e.gzip&&0<e.windowBits&&e.windowBits<16&&(e.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new o,this.strm.avail_out=0;var r=i.deflateInit2(this.strm,e.level,e.method,e.windowBits,e.memLevel,e.strategy);if(0!==r)throw new Error(a[r]);if(e.header&&i.deflateSetHeader(this.strm,e.header),e.dictionary){var l;if(l="string"==typeof e.dictionary?s.string2buf(e.dictionary):"[object ArrayBuffer]"===h.call(e.dictionary)?new Uint8Array(e.dictionary):e.dictionary,0!==(r=i.deflateSetDictionary(this.strm,l)))throw new Error(a[r]);this._dict_set=!0}}function l(t,e){var r=new u(e);if(r.push(t,!0),r.err)throw r.msg||a[r.err];return r.result}u.prototype.push=function(t,e){var r,a,o=this.strm,u=this.options.chunkSize;if(this.ended)return!1;a=e===~~e?e:!0===e?4:0,"string"==typeof t?o.input=s.string2buf(t):"[object ArrayBuffer]"===h.call(t)?o.input=new Uint8Array(t):o.input=t,o.next_in=0,o.avail_in=o.input.length;do{if(0===o.avail_out&&(o.output=new n.Buf8(u),o.next_out=0,o.avail_out=u),1!==(r=i.deflate(o,a))&&0!==r)return this.onEnd(r),!(this.ended=!0);0!==o.avail_out&&(0!==o.avail_in||4!==a&&2!==a)||("string"===this.options.to?this.onData(s.buf2binstring(n.shrinkBuf(o.output,o.next_out))):this.onData(n.shrinkBuf(o.output,o.next_out)))}while((0<o.avail_in||0===o.avail_out)&&1!==r);return 4===a?(r=i.deflateEnd(this.strm),this.onEnd(r),this.ended=!0,0===r):2!==a||(this.onEnd(0),!(o.avail_out=0))},u.prototype.onData=function(t){this.chunks.push(t)},u.prototype.onEnd=function(t){0===t&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=n.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},r.Deflate=u,r.deflate=l,r.deflateRaw=function(t,e){return(e=e||{}).raw=!0,l(t,e)},r.gzip=function(t,e){return(e=e||{}).gzip=!0,l(t,e)}},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(t,e,r){"use strict";var i=t("./zlib/inflate"),n=t("./utils/common"),s=t("./utils/strings"),a=t("./zlib/constants"),o=t("./zlib/messages"),h=t("./zlib/zstream"),u=t("./zlib/gzheader"),l=Object.prototype.toString;function c(t){if(!(this instanceof c))return new c(t);this.options=n.assign({chunkSize:16384,windowBits:0,to:""},t||{});var e=this.options;e.raw&&0<=e.windowBits&&e.windowBits<16&&(e.windowBits=-e.windowBits,0===e.windowBits&&(e.windowBits=-15)),!(0<=e.windowBits&&e.windowBits<16)||t&&t.windowBits||(e.windowBits+=32),15<e.windowBits&&e.windowBits<48&&0==(15&e.windowBits)&&(e.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new h,this.strm.avail_out=0;var r=i.inflateInit2(this.strm,e.windowBits);if(r!==a.Z_OK)throw new Error(o[r]);this.header=new u,i.inflateGetHeader(this.strm,this.header)}function f(t,e){var r=new c(e);if(r.push(t,!0),r.err)throw r.msg||o[r.err];return r.result}c.prototype.push=function(t,e){var r,o,h,u,c,f,d=this.strm,p=this.options.chunkSize,m=this.options.dictionary,g=!1;if(this.ended)return!1;o=e===~~e?e:!0===e?a.Z_FINISH:a.Z_NO_FLUSH,"string"==typeof t?d.input=s.binstring2buf(t):"[object ArrayBuffer]"===l.call(t)?d.input=new Uint8Array(t):d.input=t,d.next_in=0,d.avail_in=d.input.length;do{if(0===d.avail_out&&(d.output=new n.Buf8(p),d.next_out=0,d.avail_out=p),(r=i.inflate(d,a.Z_NO_FLUSH))===a.Z_NEED_DICT&&m&&(f="string"==typeof m?s.string2buf(m):"[object ArrayBuffer]"===l.call(m)?new Uint8Array(m):m,r=i.inflateSetDictionary(this.strm,f)),r===a.Z_BUF_ERROR&&!0===g&&(r=a.Z_OK,g=!1),r!==a.Z_STREAM_END&&r!==a.Z_OK)return this.onEnd(r),!(this.ended=!0);d.next_out&&(0!==d.avail_out&&r!==a.Z_STREAM_END&&(0!==d.avail_in||o!==a.Z_FINISH&&o!==a.Z_SYNC_FLUSH)||("string"===this.options.to?(h=s.utf8border(d.output,d.next_out),u=d.next_out-h,c=s.buf2string(d.output,h),d.next_out=u,d.avail_out=p-u,u&&n.arraySet(d.output,d.output,h,u,0),this.onData(c)):this.onData(n.shrinkBuf(d.output,d.next_out)))),0===d.avail_in&&0===d.avail_out&&(g=!0)}while((0<d.avail_in||0===d.avail_out)&&r!==a.Z_STREAM_END);return r===a.Z_STREAM_END&&(o=a.Z_FINISH),o===a.Z_FINISH?(r=i.inflateEnd(this.strm),this.onEnd(r),this.ended=!0,r===a.Z_OK):o!==a.Z_SYNC_FLUSH||(this.onEnd(a.Z_OK),!(d.avail_out=0))},c.prototype.onData=function(t){this.chunks.push(t)},c.prototype.onEnd=function(t){t===a.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=n.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},r.Inflate=c,r.inflate=f,r.inflateRaw=function(t,e){return(e=e||{}).raw=!0,f(t,e)},r.ungzip=f},{"./utils/common":41,"./utils/strings":42,"./zlib/constants":44,"./zlib/gzheader":47,"./zlib/inflate":49,"./zlib/messages":51,"./zlib/zstream":53}],41:[function(t,e,r){"use strict";var i="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;r.assign=function(t){for(var e=Array.prototype.slice.call(arguments,1);e.length;){var r=e.shift();if(r){if("object"!=typeof r)throw new TypeError(r+"must be non-object");for(var i in r)r.hasOwnProperty(i)&&(t[i]=r[i])}}return t},r.shrinkBuf=function(t,e){return t.length===e?t:t.subarray?t.subarray(0,e):(t.length=e,t)};var n={arraySet:function(t,e,r,i,n){if(e.subarray&&t.subarray)t.set(e.subarray(r,r+i),n);else for(var s=0;s<i;s++)t[n+s]=e[r+s]},flattenChunks:function(t){var e,r,i,n,s,a;for(e=i=0,r=t.length;e<r;e++)i+=t[e].length;for(a=new Uint8Array(i),e=n=0,r=t.length;e<r;e++)s=t[e],a.set(s,n),n+=s.length;return a}},s={arraySet:function(t,e,r,i,n){for(var s=0;s<i;s++)t[n+s]=e[r+s]},flattenChunks:function(t){return[].concat.apply([],t)}};r.setTyped=function(t){t?(r.Buf8=Uint8Array,r.Buf16=Uint16Array,r.Buf32=Int32Array,r.assign(r,n)):(r.Buf8=Array,r.Buf16=Array,r.Buf32=Array,r.assign(r,s))},r.setTyped(i)},{}],42:[function(t,e,r){"use strict";var i=t("./common"),n=!0,s=!0;try{String.fromCharCode.apply(null,[0])}catch(t){n=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(t){s=!1}for(var a=new i.Buf8(256),o=0;o<256;o++)a[o]=252<=o?6:248<=o?5:240<=o?4:224<=o?3:192<=o?2:1;function h(t,e){if(e<65537&&(t.subarray&&s||!t.subarray&&n))return String.fromCharCode.apply(null,i.shrinkBuf(t,e));for(var r="",a=0;a<e;a++)r+=String.fromCharCode(t[a]);return r}a[254]=a[254]=1,r.string2buf=function(t){var e,r,n,s,a,o=t.length,h=0;for(s=0;s<o;s++)55296==(64512&(r=t.charCodeAt(s)))&&s+1<o&&56320==(64512&(n=t.charCodeAt(s+1)))&&(r=65536+(r-55296<<10)+(n-56320),s++),h+=r<128?1:r<2048?2:r<65536?3:4;for(e=new i.Buf8(h),s=a=0;a<h;s++)55296==(64512&(r=t.charCodeAt(s)))&&s+1<o&&56320==(64512&(n=t.charCodeAt(s+1)))&&(r=65536+(r-55296<<10)+(n-56320),s++),r<128?e[a++]=r:(r<2048?e[a++]=192|r>>>6:(r<65536?e[a++]=224|r>>>12:(e[a++]=240|r>>>18,e[a++]=128|r>>>12&63),e[a++]=128|r>>>6&63),e[a++]=128|63&r);return e},r.buf2binstring=function(t){return h(t,t.length)},r.binstring2buf=function(t){for(var e=new i.Buf8(t.length),r=0,n=e.length;r<n;r++)e[r]=t.charCodeAt(r);return e},r.buf2string=function(t,e){var r,i,n,s,o=e||t.length,u=new Array(2*o);for(r=i=0;r<o;)if((n=t[r++])<128)u[i++]=n;else if(4<(s=a[n]))u[i++]=65533,r+=s-1;else{for(n&=2===s?31:3===s?15:7;1<s&&r<o;)n=n<<6|63&t[r++],s--;1<s?u[i++]=65533:n<65536?u[i++]=n:(n-=65536,u[i++]=55296|n>>10&1023,u[i++]=56320|1023&n)}return h(u,i)},r.utf8border=function(t,e){var r;for((e=e||t.length)>t.length&&(e=t.length),r=e-1;0<=r&&128==(192&t[r]);)r--;return r<0||0===r?e:r+a[t[r]]>e?r:e}},{"./common":41}],43:[function(t,e,r){"use strict";e.exports=function(t,e,r,i){for(var n=65535&t|0,s=t>>>16&65535|0,a=0;0!==r;){for(r-=a=2e3<r?2e3:r;s=s+(n=n+e[i++]|0)|0,--a;);n%=65521,s%=65521}return n|s<<16|0}},{}],44:[function(t,e,r){"use strict";e.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],45:[function(t,e,r){"use strict";var i=function(){for(var t,e=[],r=0;r<256;r++){t=r;for(var i=0;i<8;i++)t=1&t?3988292384^t>>>1:t>>>1;e[r]=t}return e}();e.exports=function(t,e,r,n){var s=i,a=n+r;t^=-1;for(var o=n;o<a;o++)t=t>>>8^s[255&(t^e[o])];return-1^t}},{}],46:[function(t,e,r){"use strict";var i,n=t("../utils/common"),s=t("./trees"),a=t("./adler32"),o=t("./crc32"),h=t("./messages"),u=-2,l=258,c=262,f=113;function d(t,e){return t.msg=h[e],e}function p(t){return(t<<1)-(4<t?9:0)}function m(t){for(var e=t.length;0<=--e;)t[e]=0}function g(t){var e=t.state,r=e.pending;r>t.avail_out&&(r=t.avail_out),0!==r&&(n.arraySet(t.output,e.pending_buf,e.pending_out,r,t.next_out),t.next_out+=r,e.pending_out+=r,t.total_out+=r,t.avail_out-=r,e.pending-=r,0===e.pending&&(e.pending_out=0))}function y(t,e){s._tr_flush_block(t,0<=t.block_start?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,g(t.strm)}function v(t,e){t.pending_buf[t.pending++]=e}function _(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e}function b(t,e){var r,i,n=t.max_chain_length,s=t.strstart,a=t.prev_length,o=t.nice_match,h=t.strstart>t.w_size-c?t.strstart-(t.w_size-c):0,u=t.window,f=t.w_mask,d=t.prev,p=t.strstart+l,m=u[s+a-1],g=u[s+a];t.prev_length>=t.good_match&&(n>>=2),o>t.lookahead&&(o=t.lookahead);do{if(u[(r=e)+a]===g&&u[r+a-1]===m&&u[r]===u[s]&&u[++r]===u[s+1]){s+=2,r++;do{}while(u[++s]===u[++r]&&u[++s]===u[++r]&&u[++s]===u[++r]&&u[++s]===u[++r]&&u[++s]===u[++r]&&u[++s]===u[++r]&&u[++s]===u[++r]&&u[++s]===u[++r]&&s<p);if(i=l-(p-s),s=p-l,a<i){if(t.match_start=e,o<=(a=i))break;m=u[s+a-1],g=u[s+a]}}}while((e=d[e&f])>h&&0!=--n);return a<=t.lookahead?a:t.lookahead}function w(t){var e,r,i,s,h,u,l,f,d,p,m=t.w_size;do{if(s=t.window_size-t.lookahead-t.strstart,t.strstart>=m+(m-c)){for(n.arraySet(t.window,t.window,m,m,0),t.match_start-=m,t.strstart-=m,t.block_start-=m,e=r=t.hash_size;i=t.head[--e],t.head[e]=m<=i?i-m:0,--r;);for(e=r=m;i=t.prev[--e],t.prev[e]=m<=i?i-m:0,--r;);s+=m}if(0===t.strm.avail_in)break;if(u=t.strm,l=t.window,f=t.strstart+t.lookahead,p=void 0,(d=s)<(p=u.avail_in)&&(p=d),r=0===p?0:(u.avail_in-=p,n.arraySet(l,u.input,u.next_in,p,f),1===u.state.wrap?u.adler=a(u.adler,l,p,f):2===u.state.wrap&&(u.adler=o(u.adler,l,p,f)),u.next_in+=p,u.total_in+=p,p),t.lookahead+=r,t.lookahead+t.insert>=3)for(h=t.strstart-t.insert,t.ins_h=t.window[h],t.ins_h=(t.ins_h<<t.hash_shift^t.window[h+1])&t.hash_mask;t.insert&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[h+3-1])&t.hash_mask,t.prev[h&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=h,h++,t.insert--,!(t.lookahead+t.insert<3)););}while(t.lookahead<c&&0!==t.strm.avail_in)}function M(t,e){for(var r,i;;){if(t.lookahead<c){if(w(t),t.lookahead<c&&0===e)return 1;if(0===t.lookahead)break}if(r=0,t.lookahead>=3&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+3-1])&t.hash_mask,r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==r&&t.strstart-r<=t.w_size-c&&(t.match_length=b(t,r)),t.match_length>=3)if(i=s._tr_tally(t,t.strstart-t.match_start,t.match_length-3),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=3){for(t.match_length--;t.strstart++,t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+3-1])&t.hash_mask,r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart,0!=--t.match_length;);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+1])&t.hash_mask;else i=s._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(i&&(y(t,!1),0===t.strm.avail_out))return 1}return t.insert=t.strstart<2?t.strstart:2,4===e?(y(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(y(t,!1),0===t.strm.avail_out)?1:2}function x(t,e){for(var r,i,n;;){if(t.lookahead<c){if(w(t),t.lookahead<c&&0===e)return 1;if(0===t.lookahead)break}if(r=0,t.lookahead>=3&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+3-1])&t.hash_mask,r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=2,0!==r&&t.prev_length<t.max_lazy_match&&t.strstart-r<=t.w_size-c&&(t.match_length=b(t,r),t.match_length<=5&&(1===t.strategy||3===t.match_length&&4096<t.strstart-t.match_start)&&(t.match_length=2)),t.prev_length>=3&&t.match_length<=t.prev_length){for(n=t.strstart+t.lookahead-3,i=s._tr_tally(t,t.strstart-1-t.prev_match,t.prev_length-3),t.lookahead-=t.prev_length-1,t.prev_length-=2;++t.strstart<=n&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+3-1])&t.hash_mask,r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!=--t.prev_length;);if(t.match_available=0,t.match_length=2,t.strstart++,i&&(y(t,!1),0===t.strm.avail_out))return 1}else if(t.match_available){if((i=s._tr_tally(t,0,t.window[t.strstart-1]))&&y(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return 1}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(i=s._tr_tally(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<2?t.strstart:2,4===e?(y(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(y(t,!1),0===t.strm.avail_out)?1:2}function k(t,e,r,i,n){this.good_length=t,this.max_lazy=e,this.nice_length=r,this.max_chain=i,this.func=n}function S(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=8,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new n.Buf16(1146),this.dyn_dtree=new n.Buf16(122),this.bl_tree=new n.Buf16(78),m(this.dyn_ltree),m(this.dyn_dtree),m(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new n.Buf16(16),this.heap=new n.Buf16(573),m(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new n.Buf16(573),m(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function E(t){var e;return t&&t.state?(t.total_in=t.total_out=0,t.data_type=2,(e=t.state).pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=e.wrap?42:f,t.adler=2===e.wrap?0:1,e.last_flush=0,s._tr_init(e),0):d(t,u)}function C(t){var e=E(t);return 0===e&&function(t){t.window_size=2*t.w_size,m(t.head),t.max_lazy_match=i[t.level].max_lazy,t.good_match=i[t.level].good_length,t.nice_match=i[t.level].nice_length,t.max_chain_length=i[t.level].max_chain,t.strstart=0,t.block_start=0,t.lookahead=0,t.insert=0,t.match_length=t.prev_length=2,t.match_available=0,t.ins_h=0}(t.state),e}function A(t,e,r,i,s,a){if(!t)return u;var o=1;if(-1===e&&(e=6),i<0?(o=0,i=-i):15<i&&(o=2,i-=16),s<1||9<s||8!==r||i<8||15<i||e<0||9<e||a<0||4<a)return d(t,u);8===i&&(i=9);var h=new S;return(t.state=h).strm=t,h.wrap=o,h.gzhead=null,h.w_bits=i,h.w_size=1<<h.w_bits,h.w_mask=h.w_size-1,h.hash_bits=s+7,h.hash_size=1<<h.hash_bits,h.hash_mask=h.hash_size-1,h.hash_shift=~~((h.hash_bits+3-1)/3),h.window=new n.Buf8(2*h.w_size),h.head=new n.Buf16(h.hash_size),h.prev=new n.Buf16(h.w_size),h.lit_bufsize=1<<s+6,h.pending_buf_size=4*h.lit_bufsize,h.pending_buf=new n.Buf8(h.pending_buf_size),h.d_buf=1*h.lit_bufsize,h.l_buf=3*h.lit_bufsize,h.level=e,h.strategy=a,h.method=r,C(t)}i=[new k(0,0,0,0,(function(t,e){var r=65535;for(r>t.pending_buf_size-5&&(r=t.pending_buf_size-5);;){if(t.lookahead<=1){if(w(t),0===t.lookahead&&0===e)return 1;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;var i=t.block_start+r;if((0===t.strstart||t.strstart>=i)&&(t.lookahead=t.strstart-i,t.strstart=i,y(t,!1),0===t.strm.avail_out))return 1;if(t.strstart-t.block_start>=t.w_size-c&&(y(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(y(t,!0),0===t.strm.avail_out?3:4):(t.strstart>t.block_start&&(y(t,!1),t.strm.avail_out),1)})),new k(4,4,8,4,M),new k(4,5,16,8,M),new k(4,6,32,32,M),new k(4,4,16,16,x),new k(8,16,32,32,x),new k(8,16,128,128,x),new k(8,32,128,256,x),new k(32,128,258,1024,x),new k(32,258,258,4096,x)],r.deflateInit=function(t,e){return A(t,e,8,15,8,0)},r.deflateInit2=A,r.deflateReset=C,r.deflateResetKeep=E,r.deflateSetHeader=function(t,e){return t&&t.state?2!==t.state.wrap?u:(t.state.gzhead=e,0):u},r.deflate=function(t,e){var r,n,a,h;if(!t||!t.state||5<e||e<0)return t?d(t,u):u;if(n=t.state,!t.output||!t.input&&0!==t.avail_in||666===n.status&&4!==e)return d(t,0===t.avail_out?-5:u);if(n.strm=t,r=n.last_flush,n.last_flush=e,42===n.status)if(2===n.wrap)t.adler=0,v(n,31),v(n,139),v(n,8),n.gzhead?(v(n,(n.gzhead.text?1:0)+(n.gzhead.hcrc?2:0)+(n.gzhead.extra?4:0)+(n.gzhead.name?8:0)+(n.gzhead.comment?16:0)),v(n,255&n.gzhead.time),v(n,n.gzhead.time>>8&255),v(n,n.gzhead.time>>16&255),v(n,n.gzhead.time>>24&255),v(n,9===n.level?2:2<=n.strategy||n.level<2?4:0),v(n,255&n.gzhead.os),n.gzhead.extra&&n.gzhead.extra.length&&(v(n,255&n.gzhead.extra.length),v(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(t.adler=o(t.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=69):(v(n,0),v(n,0),v(n,0),v(n,0),v(n,0),v(n,9===n.level?2:2<=n.strategy||n.level<2?4:0),v(n,3),n.status=f);else{var c=8+(n.w_bits-8<<4)<<8;c|=(2<=n.strategy||n.level<2?0:n.level<6?1:6===n.level?2:3)<<6,0!==n.strstart&&(c|=32),c+=31-c%31,n.status=f,_(n,c),0!==n.strstart&&(_(n,t.adler>>>16),_(n,65535&t.adler)),t.adler=1}if(69===n.status)if(n.gzhead.extra){for(a=n.pending;n.gzindex<(65535&n.gzhead.extra.length)&&(n.pending!==n.pending_buf_size||(n.gzhead.hcrc&&n.pending>a&&(t.adler=o(t.adler,n.pending_buf,n.pending-a,a)),g(t),a=n.pending,n.pending!==n.pending_buf_size));)v(n,255&n.gzhead.extra[n.gzindex]),n.gzindex++;n.gzhead.hcrc&&n.pending>a&&(t.adler=o(t.adler,n.pending_buf,n.pending-a,a)),n.gzindex===n.gzhead.extra.length&&(n.gzindex=0,n.status=73)}else n.status=73;if(73===n.status)if(n.gzhead.name){a=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>a&&(t.adler=o(t.adler,n.pending_buf,n.pending-a,a)),g(t),a=n.pending,n.pending===n.pending_buf_size)){h=1;break}h=n.gzindex<n.gzhead.name.length?255&n.gzhead.name.charCodeAt(n.gzindex++):0,v(n,h)}while(0!==h);n.gzhead.hcrc&&n.pending>a&&(t.adler=o(t.adler,n.pending_buf,n.pending-a,a)),0===h&&(n.gzindex=0,n.status=91)}else n.status=91;if(91===n.status)if(n.gzhead.comment){a=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>a&&(t.adler=o(t.adler,n.pending_buf,n.pending-a,a)),g(t),a=n.pending,n.pending===n.pending_buf_size)){h=1;break}h=n.gzindex<n.gzhead.comment.length?255&n.gzhead.comment.charCodeAt(n.gzindex++):0,v(n,h)}while(0!==h);n.gzhead.hcrc&&n.pending>a&&(t.adler=o(t.adler,n.pending_buf,n.pending-a,a)),0===h&&(n.status=103)}else n.status=103;if(103===n.status&&(n.gzhead.hcrc?(n.pending+2>n.pending_buf_size&&g(t),n.pending+2<=n.pending_buf_size&&(v(n,255&t.adler),v(n,t.adler>>8&255),t.adler=0,n.status=f)):n.status=f),0!==n.pending){if(g(t),0===t.avail_out)return n.last_flush=-1,0}else if(0===t.avail_in&&p(e)<=p(r)&&4!==e)return d(t,-5);if(666===n.status&&0!==t.avail_in)return d(t,-5);if(0!==t.avail_in||0!==n.lookahead||0!==e&&666!==n.status){var b=2===n.strategy?function(t,e){for(var r;;){if(0===t.lookahead&&(w(t),0===t.lookahead)){if(0===e)return 1;break}if(t.match_length=0,r=s._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,r&&(y(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(y(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(y(t,!1),0===t.strm.avail_out)?1:2}(n,e):3===n.strategy?function(t,e){for(var r,i,n,a,o=t.window;;){if(t.lookahead<=l){if(w(t),t.lookahead<=l&&0===e)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=3&&0<t.strstart&&(i=o[n=t.strstart-1])===o[++n]&&i===o[++n]&&i===o[++n]){a=t.strstart+l;do{}while(i===o[++n]&&i===o[++n]&&i===o[++n]&&i===o[++n]&&i===o[++n]&&i===o[++n]&&i===o[++n]&&i===o[++n]&&n<a);t.match_length=l-(a-n),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(r=s._tr_tally(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(r=s._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),r&&(y(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(y(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(y(t,!1),0===t.strm.avail_out)?1:2}(n,e):i[n.level].func(n,e);if(3!==b&&4!==b||(n.status=666),1===b||3===b)return 0===t.avail_out&&(n.last_flush=-1),0;if(2===b&&(1===e?s._tr_align(n):5!==e&&(s._tr_stored_block(n,0,0,!1),3===e&&(m(n.head),0===n.lookahead&&(n.strstart=0,n.block_start=0,n.insert=0))),g(t),0===t.avail_out))return n.last_flush=-1,0}return 4!==e?0:n.wrap<=0?1:(2===n.wrap?(v(n,255&t.adler),v(n,t.adler>>8&255),v(n,t.adler>>16&255),v(n,t.adler>>24&255),v(n,255&t.total_in),v(n,t.total_in>>8&255),v(n,t.total_in>>16&255),v(n,t.total_in>>24&255)):(_(n,t.adler>>>16),_(n,65535&t.adler)),g(t),0<n.wrap&&(n.wrap=-n.wrap),0!==n.pending?0:1)},r.deflateEnd=function(t){var e;return t&&t.state?42!==(e=t.state.status)&&69!==e&&73!==e&&91!==e&&103!==e&&e!==f&&666!==e?d(t,u):(t.state=null,e===f?d(t,-3):0):u},r.deflateSetDictionary=function(t,e){var r,i,s,o,h,l,c,f,d=e.length;if(!t||!t.state)return u;if(2===(o=(r=t.state).wrap)||1===o&&42!==r.status||r.lookahead)return u;for(1===o&&(t.adler=a(t.adler,e,d,0)),r.wrap=0,d>=r.w_size&&(0===o&&(m(r.head),r.strstart=0,r.block_start=0,r.insert=0),f=new n.Buf8(r.w_size),n.arraySet(f,e,d-r.w_size,r.w_size,0),e=f,d=r.w_size),h=t.avail_in,l=t.next_in,c=t.input,t.avail_in=d,t.next_in=0,t.input=e,w(r);r.lookahead>=3;){for(i=r.strstart,s=r.lookahead-2;r.ins_h=(r.ins_h<<r.hash_shift^r.window[i+3-1])&r.hash_mask,r.prev[i&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=i,i++,--s;);r.strstart=i,r.lookahead=2,w(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=2,r.match_available=0,t.next_in=l,t.input=c,t.avail_in=h,r.wrap=o,0},r.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(t,e,r){"use strict";e.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},{}],48:[function(t,e,r){"use strict";e.exports=function(t,e){var r,i,n,s,a,o,h,u,l,c,f,d,p,m,g,y,v,_,b,w,M,x,k,S,E;r=t.state,i=t.next_in,S=t.input,n=i+(t.avail_in-5),s=t.next_out,E=t.output,a=s-(e-t.avail_out),o=s+(t.avail_out-257),h=r.dmax,u=r.wsize,l=r.whave,c=r.wnext,f=r.window,d=r.hold,p=r.bits,m=r.lencode,g=r.distcode,y=(1<<r.lenbits)-1,v=(1<<r.distbits)-1;t:do{p<15&&(d+=S[i++]<<p,p+=8,d+=S[i++]<<p,p+=8),_=m[d&y];e:for(;;){if(d>>>=b=_>>>24,p-=b,0==(b=_>>>16&255))E[s++]=65535&_;else{if(!(16&b)){if(0==(64&b)){_=m[(65535&_)+(d&(1<<b)-1)];continue e}if(32&b){r.mode=12;break t}t.msg="invalid literal/length code",r.mode=30;break t}w=65535&_,(b&=15)&&(p<b&&(d+=S[i++]<<p,p+=8),w+=d&(1<<b)-1,d>>>=b,p-=b),p<15&&(d+=S[i++]<<p,p+=8,d+=S[i++]<<p,p+=8),_=g[d&v];r:for(;;){if(d>>>=b=_>>>24,p-=b,!(16&(b=_>>>16&255))){if(0==(64&b)){_=g[(65535&_)+(d&(1<<b)-1)];continue r}t.msg="invalid distance code",r.mode=30;break t}if(M=65535&_,p<(b&=15)&&(d+=S[i++]<<p,(p+=8)<b&&(d+=S[i++]<<p,p+=8)),h<(M+=d&(1<<b)-1)){t.msg="invalid distance too far back",r.mode=30;break t}if(d>>>=b,p-=b,(b=s-a)<M){if(l<(b=M-b)&&r.sane){t.msg="invalid distance too far back",r.mode=30;break t}if(k=f,(x=0)===c){if(x+=u-b,b<w){for(w-=b;E[s++]=f[x++],--b;);x=s-M,k=E}}else if(c<b){if(x+=u+c-b,(b-=c)<w){for(w-=b;E[s++]=f[x++],--b;);if(x=0,c<w){for(w-=b=c;E[s++]=f[x++],--b;);x=s-M,k=E}}}else if(x+=c-b,b<w){for(w-=b;E[s++]=f[x++],--b;);x=s-M,k=E}for(;2<w;)E[s++]=k[x++],E[s++]=k[x++],E[s++]=k[x++],w-=3;w&&(E[s++]=k[x++],1<w&&(E[s++]=k[x++]))}else{for(x=s-M;E[s++]=E[x++],E[s++]=E[x++],E[s++]=E[x++],2<(w-=3););w&&(E[s++]=E[x++],1<w&&(E[s++]=E[x++]))}break}}break}}while(i<n&&s<o);i-=w=p>>3,d&=(1<<(p-=w<<3))-1,t.next_in=i,t.next_out=s,t.avail_in=i<n?n-i+5:5-(i-n),t.avail_out=s<o?o-s+257:257-(s-o),r.hold=d,r.bits=p}},{}],49:[function(t,e,r){"use strict";var i=t("../utils/common"),n=t("./adler32"),s=t("./crc32"),a=t("./inffast"),o=t("./inftrees"),h=-2;function u(t){return(t>>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24)}function l(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new i.Buf16(320),this.work=new i.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function c(t){var e;return t&&t.state?(e=t.state,t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=1&e.wrap),e.mode=1,e.last=0,e.havedict=0,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new i.Buf32(852),e.distcode=e.distdyn=new i.Buf32(592),e.sane=1,e.back=-1,0):h}function f(t){var e;return t&&t.state?((e=t.state).wsize=0,e.whave=0,e.wnext=0,c(t)):h}function d(t,e){var r,i;return t&&t.state?(i=t.state,e<0?(r=0,e=-e):(r=1+(e>>4),e<48&&(e&=15)),e&&(e<8||15<e)?h:(null!==i.window&&i.wbits!==e&&(i.window=null),i.wrap=r,i.wbits=e,f(t))):h}function p(t,e){var r,i;return t?(i=new l,(t.state=i).window=null,0!==(r=d(t,e))&&(t.state=null),r):h}var m,g,y=!0;function v(t){if(y){var e;for(m=new i.Buf32(512),g=new i.Buf32(32),e=0;e<144;)t.lens[e++]=8;for(;e<256;)t.lens[e++]=9;for(;e<280;)t.lens[e++]=7;for(;e<288;)t.lens[e++]=8;for(o(1,t.lens,0,288,m,0,t.work,{bits:9}),e=0;e<32;)t.lens[e++]=5;o(2,t.lens,0,32,g,0,t.work,{bits:5}),y=!1}t.lencode=m,t.lenbits=9,t.distcode=g,t.distbits=5}function _(t,e,r,n){var s,a=t.state;return null===a.window&&(a.wsize=1<<a.wbits,a.wnext=0,a.whave=0,a.window=new i.Buf8(a.wsize)),n>=a.wsize?(i.arraySet(a.window,e,r-a.wsize,a.wsize,0),a.wnext=0,a.whave=a.wsize):(n<(s=a.wsize-a.wnext)&&(s=n),i.arraySet(a.window,e,r-n,s,a.wnext),(n-=s)?(i.arraySet(a.window,e,r-n,n,0),a.wnext=n,a.whave=a.wsize):(a.wnext+=s,a.wnext===a.wsize&&(a.wnext=0),a.whave<a.wsize&&(a.whave+=s))),0}r.inflateReset=f,r.inflateReset2=d,r.inflateResetKeep=c,r.inflateInit=function(t){return p(t,15)},r.inflateInit2=p,r.inflate=function(t,e){var r,l,c,f,d,p,m,g,y,b,w,M,x,k,S,E,C,A,O,T,I,L,P,R,N=0,z=new i.Buf8(4),j=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!t||!t.state||!t.output||!t.input&&0!==t.avail_in)return h;12===(r=t.state).mode&&(r.mode=13),d=t.next_out,c=t.output,m=t.avail_out,f=t.next_in,l=t.input,p=t.avail_in,g=r.hold,y=r.bits,b=p,w=m,L=0;t:for(;;)switch(r.mode){case 1:if(0===r.wrap){r.mode=13;break}for(;y<16;){if(0===p)break t;p--,g+=l[f++]<<y,y+=8}if(2&r.wrap&&35615===g){z[r.check=0]=255&g,z[1]=g>>>8&255,r.check=s(r.check,z,2,0),y=g=0,r.mode=2;break}if(r.flags=0,r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&g)<<8)+(g>>8))%31){t.msg="incorrect header check",r.mode=30;break}if(8!=(15&g)){t.msg="unknown compression method",r.mode=30;break}if(y-=4,I=8+(15&(g>>>=4)),0===r.wbits)r.wbits=I;else if(I>r.wbits){t.msg="invalid window size",r.mode=30;break}r.dmax=1<<I,t.adler=r.check=1,r.mode=512&g?10:12,y=g=0;break;case 2:for(;y<16;){if(0===p)break t;p--,g+=l[f++]<<y,y+=8}if(r.flags=g,8!=(255&r.flags)){t.msg="unknown compression method",r.mode=30;break}if(57344&r.flags){t.msg="unknown header flags set",r.mode=30;break}r.head&&(r.head.text=g>>8&1),512&r.flags&&(z[0]=255&g,z[1]=g>>>8&255,r.check=s(r.check,z,2,0)),y=g=0,r.mode=3;case 3:for(;y<32;){if(0===p)break t;p--,g+=l[f++]<<y,y+=8}r.head&&(r.head.time=g),512&r.flags&&(z[0]=255&g,z[1]=g>>>8&255,z[2]=g>>>16&255,z[3]=g>>>24&255,r.check=s(r.check,z,4,0)),y=g=0,r.mode=4;case 4:for(;y<16;){if(0===p)break t;p--,g+=l[f++]<<y,y+=8}r.head&&(r.head.xflags=255&g,r.head.os=g>>8),512&r.flags&&(z[0]=255&g,z[1]=g>>>8&255,r.check=s(r.check,z,2,0)),y=g=0,r.mode=5;case 5:if(1024&r.flags){for(;y<16;){if(0===p)break t;p--,g+=l[f++]<<y,y+=8}r.length=g,r.head&&(r.head.extra_len=g),512&r.flags&&(z[0]=255&g,z[1]=g>>>8&255,r.check=s(r.check,z,2,0)),y=g=0}else r.head&&(r.head.extra=null);r.mode=6;case 6:if(1024&r.flags&&(p<(M=r.length)&&(M=p),M&&(r.head&&(I=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),i.arraySet(r.head.extra,l,f,M,I)),512&r.flags&&(r.check=s(r.check,l,M,f)),p-=M,f+=M,r.length-=M),r.length))break t;r.length=0,r.mode=7;case 7:if(2048&r.flags){if(0===p)break t;for(M=0;I=l[f+M++],r.head&&I&&r.length<65536&&(r.head.name+=String.fromCharCode(I)),I&&M<p;);if(512&r.flags&&(r.check=s(r.check,l,M,f)),p-=M,f+=M,I)break t}else r.head&&(r.head.name=null);r.length=0,r.mode=8;case 8:if(4096&r.flags){if(0===p)break t;for(M=0;I=l[f+M++],r.head&&I&&r.length<65536&&(r.head.comment+=String.fromCharCode(I)),I&&M<p;);if(512&r.flags&&(r.check=s(r.check,l,M,f)),p-=M,f+=M,I)break t}else r.head&&(r.head.comment=null);r.mode=9;case 9:if(512&r.flags){for(;y<16;){if(0===p)break t;p--,g+=l[f++]<<y,y+=8}if(g!==(65535&r.check)){t.msg="header crc mismatch",r.mode=30;break}y=g=0}r.head&&(r.head.hcrc=r.flags>>9&1,r.head.done=!0),t.adler=r.check=0,r.mode=12;break;case 10:for(;y<32;){if(0===p)break t;p--,g+=l[f++]<<y,y+=8}t.adler=r.check=u(g),y=g=0,r.mode=11;case 11:if(0===r.havedict)return t.next_out=d,t.avail_out=m,t.next_in=f,t.avail_in=p,r.hold=g,r.bits=y,2;t.adler=r.check=1,r.mode=12;case 12:if(5===e||6===e)break t;case 13:if(r.last){g>>>=7&y,y-=7&y,r.mode=27;break}for(;y<3;){if(0===p)break t;p--,g+=l[f++]<<y,y+=8}switch(r.last=1&g,y-=1,3&(g>>>=1)){case 0:r.mode=14;break;case 1:if(v(r),r.mode=20,6!==e)break;g>>>=2,y-=2;break t;case 2:r.mode=17;break;case 3:t.msg="invalid block type",r.mode=30}g>>>=2,y-=2;break;case 14:for(g>>>=7&y,y-=7&y;y<32;){if(0===p)break t;p--,g+=l[f++]<<y,y+=8}if((65535&g)!=(g>>>16^65535)){t.msg="invalid stored block lengths",r.mode=30;break}if(r.length=65535&g,y=g=0,r.mode=15,6===e)break t;case 15:r.mode=16;case 16:if(M=r.length){if(p<M&&(M=p),m<M&&(M=m),0===M)break t;i.arraySet(c,l,f,M,d),p-=M,f+=M,m-=M,d+=M,r.length-=M;break}r.mode=12;break;case 17:for(;y<14;){if(0===p)break t;p--,g+=l[f++]<<y,y+=8}if(r.nlen=257+(31&g),g>>>=5,y-=5,r.ndist=1+(31&g),g>>>=5,y-=5,r.ncode=4+(15&g),g>>>=4,y-=4,286<r.nlen||30<r.ndist){t.msg="too many length or distance symbols",r.mode=30;break}r.have=0,r.mode=18;case 18:for(;r.have<r.ncode;){for(;y<3;){if(0===p)break t;p--,g+=l[f++]<<y,y+=8}r.lens[j[r.have++]]=7&g,g>>>=3,y-=3}for(;r.have<19;)r.lens[j[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,P={bits:r.lenbits},L=o(0,r.lens,0,19,r.lencode,0,r.work,P),r.lenbits=P.bits,L){t.msg="invalid code lengths set",r.mode=30;break}r.have=0,r.mode=19;case 19:for(;r.have<r.nlen+r.ndist;){for(;E=(N=r.lencode[g&(1<<r.lenbits)-1])>>>16&255,C=65535&N,!((S=N>>>24)<=y);){if(0===p)break t;p--,g+=l[f++]<<y,y+=8}if(C<16)g>>>=S,y-=S,r.lens[r.have++]=C;else{if(16===C){for(R=S+2;y<R;){if(0===p)break t;p--,g+=l[f++]<<y,y+=8}if(g>>>=S,y-=S,0===r.have){t.msg="invalid bit length repeat",r.mode=30;break}I=r.lens[r.have-1],M=3+(3&g),g>>>=2,y-=2}else if(17===C){for(R=S+3;y<R;){if(0===p)break t;p--,g+=l[f++]<<y,y+=8}y-=S,I=0,M=3+(7&(g>>>=S)),g>>>=3,y-=3}else{for(R=S+7;y<R;){if(0===p)break t;p--,g+=l[f++]<<y,y+=8}y-=S,I=0,M=11+(127&(g>>>=S)),g>>>=7,y-=7}if(r.have+M>r.nlen+r.ndist){t.msg="invalid bit length repeat",r.mode=30;break}for(;M--;)r.lens[r.have++]=I}}if(30===r.mode)break;if(0===r.lens[256]){t.msg="invalid code -- missing end-of-block",r.mode=30;break}if(r.lenbits=9,P={bits:r.lenbits},L=o(1,r.lens,0,r.nlen,r.lencode,0,r.work,P),r.lenbits=P.bits,L){t.msg="invalid literal/lengths set",r.mode=30;break}if(r.distbits=6,r.distcode=r.distdyn,P={bits:r.distbits},L=o(2,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,P),r.distbits=P.bits,L){t.msg="invalid distances set",r.mode=30;break}if(r.mode=20,6===e)break t;case 20:r.mode=21;case 21:if(6<=p&&258<=m){t.next_out=d,t.avail_out=m,t.next_in=f,t.avail_in=p,r.hold=g,r.bits=y,a(t,w),d=t.next_out,c=t.output,m=t.avail_out,f=t.next_in,l=t.input,p=t.avail_in,g=r.hold,y=r.bits,12===r.mode&&(r.back=-1);break}for(r.back=0;E=(N=r.lencode[g&(1<<r.lenbits)-1])>>>16&255,C=65535&N,!((S=N>>>24)<=y);){if(0===p)break t;p--,g+=l[f++]<<y,y+=8}if(E&&0==(240&E)){for(A=S,O=E,T=C;E=(N=r.lencode[T+((g&(1<<A+O)-1)>>A)])>>>16&255,C=65535&N,!(A+(S=N>>>24)<=y);){if(0===p)break t;p--,g+=l[f++]<<y,y+=8}g>>>=A,y-=A,r.back+=A}if(g>>>=S,y-=S,r.back+=S,r.length=C,0===E){r.mode=26;break}if(32&E){r.back=-1,r.mode=12;break}if(64&E){t.msg="invalid literal/length code",r.mode=30;break}r.extra=15&E,r.mode=22;case 22:if(r.extra){for(R=r.extra;y<R;){if(0===p)break t;p--,g+=l[f++]<<y,y+=8}r.length+=g&(1<<r.extra)-1,g>>>=r.extra,y-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=23;case 23:for(;E=(N=r.distcode[g&(1<<r.distbits)-1])>>>16&255,C=65535&N,!((S=N>>>24)<=y);){if(0===p)break t;p--,g+=l[f++]<<y,y+=8}if(0==(240&E)){for(A=S,O=E,T=C;E=(N=r.distcode[T+((g&(1<<A+O)-1)>>A)])>>>16&255,C=65535&N,!(A+(S=N>>>24)<=y);){if(0===p)break t;p--,g+=l[f++]<<y,y+=8}g>>>=A,y-=A,r.back+=A}if(g>>>=S,y-=S,r.back+=S,64&E){t.msg="invalid distance code",r.mode=30;break}r.offset=C,r.extra=15&E,r.mode=24;case 24:if(r.extra){for(R=r.extra;y<R;){if(0===p)break t;p--,g+=l[f++]<<y,y+=8}r.offset+=g&(1<<r.extra)-1,g>>>=r.extra,y-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){t.msg="invalid distance too far back",r.mode=30;break}r.mode=25;case 25:if(0===m)break t;if(M=w-m,r.offset>M){if((M=r.offset-M)>r.whave&&r.sane){t.msg="invalid distance too far back",r.mode=30;break}x=M>r.wnext?(M-=r.wnext,r.wsize-M):r.wnext-M,M>r.length&&(M=r.length),k=r.window}else k=c,x=d-r.offset,M=r.length;for(m<M&&(M=m),m-=M,r.length-=M;c[d++]=k[x++],--M;);0===r.length&&(r.mode=21);break;case 26:if(0===m)break t;c[d++]=r.length,m--,r.mode=21;break;case 27:if(r.wrap){for(;y<32;){if(0===p)break t;p--,g|=l[f++]<<y,y+=8}if(w-=m,t.total_out+=w,r.total+=w,w&&(t.adler=r.check=r.flags?s(r.check,c,w,d-w):n(r.check,c,w,d-w)),w=m,(r.flags?g:u(g))!==r.check){t.msg="incorrect data check",r.mode=30;break}y=g=0}r.mode=28;case 28:if(r.wrap&&r.flags){for(;y<32;){if(0===p)break t;p--,g+=l[f++]<<y,y+=8}if(g!==(4294967295&r.total)){t.msg="incorrect length check",r.mode=30;break}y=g=0}r.mode=29;case 29:L=1;break t;case 30:L=-3;break t;case 31:return-4;case 32:default:return h}return t.next_out=d,t.avail_out=m,t.next_in=f,t.avail_in=p,r.hold=g,r.bits=y,(r.wsize||w!==t.avail_out&&r.mode<30&&(r.mode<27||4!==e))&&_(t,t.output,t.next_out,w-t.avail_out)?(r.mode=31,-4):(b-=t.avail_in,w-=t.avail_out,t.total_in+=b,t.total_out+=w,r.total+=w,r.wrap&&w&&(t.adler=r.check=r.flags?s(r.check,c,w,t.next_out-w):n(r.check,c,w,t.next_out-w)),t.data_type=r.bits+(r.last?64:0)+(12===r.mode?128:0)+(20===r.mode||15===r.mode?256:0),(0==b&&0===w||4===e)&&0===L&&(L=-5),L)},r.inflateEnd=function(t){if(!t||!t.state)return h;var e=t.state;return e.window&&(e.window=null),t.state=null,0},r.inflateGetHeader=function(t,e){var r;return t&&t.state?0==(2&(r=t.state).wrap)?h:((r.head=e).done=!1,0):h},r.inflateSetDictionary=function(t,e){var r,i=e.length;return t&&t.state?0!==(r=t.state).wrap&&11!==r.mode?h:11===r.mode&&n(1,e,i,0)!==r.check?-3:_(t,e,i,i)?(r.mode=31,-4):(r.havedict=1,0):h},r.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(t,e,r){"use strict";var i=t("../utils/common"),n=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],s=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],a=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],o=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];e.exports=function(t,e,r,h,u,l,c,f){var d,p,m,g,y,v,_,b,w,M=f.bits,x=0,k=0,S=0,E=0,C=0,A=0,O=0,T=0,I=0,L=0,P=null,R=0,N=new i.Buf16(16),z=new i.Buf16(16),j=null,B=0;for(x=0;x<=15;x++)N[x]=0;for(k=0;k<h;k++)N[e[r+k]]++;for(C=M,E=15;1<=E&&0===N[E];E--);if(E<C&&(C=E),0===E)return u[l++]=20971520,u[l++]=20971520,f.bits=1,0;for(S=1;S<E&&0===N[S];S++);for(C<S&&(C=S),x=T=1;x<=15;x++)if(T<<=1,(T-=N[x])<0)return-1;if(0<T&&(0===t||1!==E))return-1;for(z[1]=0,x=1;x<15;x++)z[x+1]=z[x]+N[x];for(k=0;k<h;k++)0!==e[r+k]&&(c[z[e[r+k]]++]=k);if(v=0===t?(P=j=c,19):1===t?(P=n,R-=257,j=s,B-=257,256):(P=a,j=o,-1),x=S,y=l,O=k=L=0,m=-1,g=(I=1<<(A=C))-1,1===t&&852<I||2===t&&592<I)return 1;for(;;){for(_=x-O,w=c[k]<v?(b=0,c[k]):c[k]>v?(b=j[B+c[k]],P[R+c[k]]):(b=96,0),d=1<<x-O,S=p=1<<A;u[y+(L>>O)+(p-=d)]=_<<24|b<<16|w|0,0!==p;);for(d=1<<x-1;L&d;)d>>=1;if(0!==d?(L&=d-1,L+=d):L=0,k++,0==--N[x]){if(x===E)break;x=e[r+c[k]]}if(C<x&&(L&g)!==m){for(0===O&&(O=C),y+=S,T=1<<(A=x-O);A+O<E&&!((T-=N[A+O])<=0);)A++,T<<=1;if(I+=1<<A,1===t&&852<I||2===t&&592<I)return 1;u[m=L&g]=C<<24|A<<16|y-l|0}}return 0!==L&&(u[y+L]=x-O<<24|64<<16|0),f.bits=C,0}},{"../utils/common":41}],51:[function(t,e,r){"use strict";e.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],52:[function(t,e,r){"use strict";var i=t("../utils/common");function n(t){for(var e=t.length;0<=--e;)t[e]=0}var s=256,a=286,o=30,h=15,u=[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],l=[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],c=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],f=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],d=new Array(576);n(d);var p=new Array(60);n(p);var m=new Array(512);n(m);var g=new Array(256);n(g);var y=new Array(29);n(y);var v,_,b,w=new Array(o);function M(t,e,r,i,n){this.static_tree=t,this.extra_bits=e,this.extra_base=r,this.elems=i,this.max_length=n,this.has_stree=t&&t.length}function x(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}function k(t){return t<256?m[t]:m[256+(t>>>7)]}function S(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255}function E(t,e,r){t.bi_valid>16-r?(t.bi_buf|=e<<t.bi_valid&65535,S(t,t.bi_buf),t.bi_buf=e>>16-t.bi_valid,t.bi_valid+=r-16):(t.bi_buf|=e<<t.bi_valid&65535,t.bi_valid+=r)}function C(t,e,r){E(t,r[2*e],r[2*e+1])}function A(t,e){for(var r=0;r|=1&t,t>>>=1,r<<=1,0<--e;);return r>>>1}function O(t,e,r){var i,n,s=new Array(16),a=0;for(i=1;i<=h;i++)s[i]=a=a+r[i-1]<<1;for(n=0;n<=e;n++){var o=t[2*n+1];0!==o&&(t[2*n]=A(s[o]++,o))}}function T(t){var e;for(e=0;e<a;e++)t.dyn_ltree[2*e]=0;for(e=0;e<o;e++)t.dyn_dtree[2*e]=0;for(e=0;e<19;e++)t.bl_tree[2*e]=0;t.dyn_ltree[512]=1,t.opt_len=t.static_len=0,t.last_lit=t.matches=0}function I(t){8<t.bi_valid?S(t,t.bi_buf):0<t.bi_valid&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0}function L(t,e,r,i){var n=2*e,s=2*r;return t[n]<t[s]||t[n]===t[s]&&i[e]<=i[r]}function P(t,e,r){for(var i=t.heap[r],n=r<<1;n<=t.heap_len&&(n<t.heap_len&&L(e,t.heap[n+1],t.heap[n],t.depth)&&n++,!L(e,i,t.heap[n],t.depth));)t.heap[r]=t.heap[n],r=n,n<<=1;t.heap[r]=i}function R(t,e,r){var i,n,a,o,h=0;if(0!==t.last_lit)for(;i=t.pending_buf[t.d_buf+2*h]<<8|t.pending_buf[t.d_buf+2*h+1],n=t.pending_buf[t.l_buf+h],h++,0===i?C(t,n,e):(C(t,(a=g[n])+s+1,e),0!==(o=u[a])&&E(t,n-=y[a],o),C(t,a=k(--i),r),0!==(o=l[a])&&E(t,i-=w[a],o)),h<t.last_lit;);C(t,256,e)}function N(t,e){var r,i,n,s=e.dyn_tree,a=e.stat_desc.static_tree,o=e.stat_desc.has_stree,u=e.stat_desc.elems,l=-1;for(t.heap_len=0,t.heap_max=573,r=0;r<u;r++)0!==s[2*r]?(t.heap[++t.heap_len]=l=r,t.depth[r]=0):s[2*r+1]=0;for(;t.heap_len<2;)s[2*(n=t.heap[++t.heap_len]=l<2?++l:0)]=1,t.depth[n]=0,t.opt_len--,o&&(t.static_len-=a[2*n+1]);for(e.max_code=l,r=t.heap_len>>1;1<=r;r--)P(t,s,r);for(n=u;r=t.heap[1],t.heap[1]=t.heap[t.heap_len--],P(t,s,1),i=t.heap[1],t.heap[--t.heap_max]=r,t.heap[--t.heap_max]=i,s[2*n]=s[2*r]+s[2*i],t.depth[n]=(t.depth[r]>=t.depth[i]?t.depth[r]:t.depth[i])+1,s[2*r+1]=s[2*i+1]=n,t.heap[1]=n++,P(t,s,1),2<=t.heap_len;);t.heap[--t.heap_max]=t.heap[1],function(t,e){var r,i,n,s,a,o,u=e.dyn_tree,l=e.max_code,c=e.stat_desc.static_tree,f=e.stat_desc.has_stree,d=e.stat_desc.extra_bits,p=e.stat_desc.extra_base,m=e.stat_desc.max_length,g=0;for(s=0;s<=h;s++)t.bl_count[s]=0;for(u[2*t.heap[t.heap_max]+1]=0,r=t.heap_max+1;r<573;r++)m<(s=u[2*u[2*(i=t.heap[r])+1]+1]+1)&&(s=m,g++),u[2*i+1]=s,l<i||(t.bl_count[s]++,a=0,p<=i&&(a=d[i-p]),o=u[2*i],t.opt_len+=o*(s+a),f&&(t.static_len+=o*(c[2*i+1]+a)));if(0!==g){do{for(s=m-1;0===t.bl_count[s];)s--;t.bl_count[s]--,t.bl_count[s+1]+=2,t.bl_count[m]--,g-=2}while(0<g);for(s=m;0!==s;s--)for(i=t.bl_count[s];0!==i;)l<(n=t.heap[--r])||(u[2*n+1]!==s&&(t.opt_len+=(s-u[2*n+1])*u[2*n],u[2*n+1]=s),i--)}}(t,e),O(s,l,t.bl_count)}function z(t,e,r){var i,n,s=-1,a=e[1],o=0,h=7,u=4;for(0===a&&(h=138,u=3),e[2*(r+1)+1]=65535,i=0;i<=r;i++)n=a,a=e[2*(i+1)+1],++o<h&&n===a||(o<u?t.bl_tree[2*n]+=o:0!==n?(n!==s&&t.bl_tree[2*n]++,t.bl_tree[32]++):o<=10?t.bl_tree[34]++:t.bl_tree[36]++,s=n,u=(o=0)===a?(h=138,3):n===a?(h=6,3):(h=7,4))}function j(t,e,r){var i,n,s=-1,a=e[1],o=0,h=7,u=4;for(0===a&&(h=138,u=3),i=0;i<=r;i++)if(n=a,a=e[2*(i+1)+1],!(++o<h&&n===a)){if(o<u)for(;C(t,n,t.bl_tree),0!=--o;);else 0!==n?(n!==s&&(C(t,n,t.bl_tree),o--),C(t,16,t.bl_tree),E(t,o-3,2)):o<=10?(C(t,17,t.bl_tree),E(t,o-3,3)):(C(t,18,t.bl_tree),E(t,o-11,7));s=n,u=(o=0)===a?(h=138,3):n===a?(h=6,3):(h=7,4)}}n(w);var B=!1;function D(t,e,r,n){E(t,0+(n?1:0),3),function(t,e,r,n){I(t),S(t,r),S(t,~r),i.arraySet(t.pending_buf,t.window,e,r,t.pending),t.pending+=r}(t,e,r)}r._tr_init=function(t){B||(function(){var t,e,r,i,n,s=new Array(16);for(i=r=0;i<28;i++)for(y[i]=r,t=0;t<1<<u[i];t++)g[r++]=i;for(g[r-1]=i,i=n=0;i<16;i++)for(w[i]=n,t=0;t<1<<l[i];t++)m[n++]=i;for(n>>=7;i<o;i++)for(w[i]=n<<7,t=0;t<1<<l[i]-7;t++)m[256+n++]=i;for(e=0;e<=h;e++)s[e]=0;for(t=0;t<=143;)d[2*t+1]=8,t++,s[8]++;for(;t<=255;)d[2*t+1]=9,t++,s[9]++;for(;t<=279;)d[2*t+1]=7,t++,s[7]++;for(;t<=287;)d[2*t+1]=8,t++,s[8]++;for(O(d,287,s),t=0;t<o;t++)p[2*t+1]=5,p[2*t]=A(t,5);v=new M(d,u,257,a,h),_=new M(p,l,0,o,h),b=new M(new Array(0),c,0,19,7)}(),B=!0),t.l_desc=new x(t.dyn_ltree,v),t.d_desc=new x(t.dyn_dtree,_),t.bl_desc=new x(t.bl_tree,b),t.bi_buf=0,t.bi_valid=0,T(t)},r._tr_stored_block=D,r._tr_flush_block=function(t,e,r,i){var n,a,o=0;0<t.level?(2===t.strm.data_type&&(t.strm.data_type=function(t){var e,r=4093624447;for(e=0;e<=31;e++,r>>>=1)if(1&r&&0!==t.dyn_ltree[2*e])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(e=32;e<s;e++)if(0!==t.dyn_ltree[2*e])return 1;return 0}(t)),N(t,t.l_desc),N(t,t.d_desc),o=function(t){var e;for(z(t,t.dyn_ltree,t.l_desc.max_code),z(t,t.dyn_dtree,t.d_desc.max_code),N(t,t.bl_desc),e=18;3<=e&&0===t.bl_tree[2*f[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(t),n=t.opt_len+3+7>>>3,(a=t.static_len+3+7>>>3)<=n&&(n=a)):n=a=r+5,r+4<=n&&-1!==e?D(t,e,r,i):4===t.strategy||a===n?(E(t,2+(i?1:0),3),R(t,d,p)):(E(t,4+(i?1:0),3),function(t,e,r,i){var n;for(E(t,e-257,5),E(t,r-1,5),E(t,i-4,4),n=0;n<i;n++)E(t,t.bl_tree[2*f[n]+1],3);j(t,t.dyn_ltree,e-1),j(t,t.dyn_dtree,r-1)}(t,t.l_desc.max_code+1,t.d_desc.max_code+1,o+1),R(t,t.dyn_ltree,t.dyn_dtree)),T(t),i&&I(t)},r._tr_tally=function(t,e,r){return t.pending_buf[t.d_buf+2*t.last_lit]=e>>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&r,t.last_lit++,0===e?t.dyn_ltree[2*r]++:(t.matches++,e--,t.dyn_ltree[2*(g[r]+s+1)]++,t.dyn_dtree[2*k(e)]++),t.last_lit===t.lit_bufsize-1},r._tr_align=function(t){E(t,2,3),C(t,256,d),function(t){16===t.bi_valid?(S(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):8<=t.bi_valid&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)}(t)}},{"../utils/common":41}],53:[function(t,e,r){"use strict";e.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(t,e,r){(function(t){!function(t,e){"use strict";if(!t.setImmediate){var r,i,n,a,o=1,h={},u=!1,l=t.document,c=Object.getPrototypeOf&&Object.getPrototypeOf(t);c=c&&c.setTimeout?c:t,r="[object process]"==={}.toString.call(t.process)?function(t){s.nextTick((function(){d(t)}))}:function(){if(t.postMessage&&!t.importScripts){var e=!0,r=t.onmessage;return t.onmessage=function(){e=!1},t.postMessage("","*"),t.onmessage=r,e}}()?(a="setImmediate$"+Math.random()+"$",t.addEventListener?t.addEventListener("message",p,!1):t.attachEvent("onmessage",p),function(e){t.postMessage(a+e,"*")}):t.MessageChannel?((n=new MessageChannel).port1.onmessage=function(t){d(t.data)},function(t){n.port2.postMessage(t)}):l&&"onreadystatechange"in l.createElement("script")?(i=l.documentElement,function(t){var e=l.createElement("script");e.onreadystatechange=function(){d(t),e.onreadystatechange=null,i.removeChild(e),e=null},i.appendChild(e)}):function(t){setTimeout(d,0,t)},c.setImmediate=function(t){"function"!=typeof t&&(t=new Function(""+t));for(var e=new Array(arguments.length-1),i=0;i<e.length;i++)e[i]=arguments[i+1];var n={callback:t,args:e};return h[o]=n,r(o),o++},c.clearImmediate=f}function f(t){delete h[t]}function d(t){if(u)setTimeout(d,0,t);else{var e=h[t];if(e){u=!0;try{!function(t){var e=t.callback,r=t.args;switch(r.length){case 0:e();break;case 1:e(r[0]);break;case 2:e(r[0],r[1]);break;case 3:e(r[0],r[1],r[2]);break;default:e.apply(void 0,r)}}(e)}finally{f(t),u=!1}}}}function p(e){e.source===t&&"string"==typeof e.data&&0===e.data.indexOf(a)&&d(+e.data.slice(a.length))}}("undefined"==typeof self?void 0===t?this:t:self)}).call(this,void 0!==n?n:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[10])(10)}).call(this,r(2).Buffer,r(15).setImmediate,r(1),r(4))},function(t,e,r){(function(t,e){!function(t,r){"use strict";if(!t.setImmediate){var i,n,s,a,o,h=1,u={},l=!1,c=t.document,f=Object.getPrototypeOf&&Object.getPrototypeOf(t);f=f&&f.setTimeout?f:t,"[object process]"==={}.toString.call(t.process)?i=function(t){e.nextTick((function(){p(t)}))}:!function(){if(t.postMessage&&!t.importScripts){var e=!0,r=t.onmessage;return t.onmessage=function(){e=!1},t.postMessage("","*"),t.onmessage=r,e}}()?t.MessageChannel?((s=new MessageChannel).port1.onmessage=function(t){p(t.data)},i=function(t){s.port2.postMessage(t)}):c&&"onreadystatechange"in c.createElement("script")?(n=c.documentElement,i=function(t){var e=c.createElement("script");e.onreadystatechange=function(){p(t),e.onreadystatechange=null,n.removeChild(e),e=null},n.appendChild(e)}):i=function(t){setTimeout(p,0,t)}:(a="setImmediate$"+Math.random()+"$",o=function(e){e.source===t&&"string"==typeof e.data&&0===e.data.indexOf(a)&&p(+e.data.slice(a.length))},t.addEventListener?t.addEventListener("message",o,!1):t.attachEvent("onmessage",o),i=function(e){t.postMessage(a+e,"*")}),f.setImmediate=function(t){"function"!=typeof t&&(t=new Function(""+t));for(var e=new Array(arguments.length-1),r=0;r<e.length;r++)e[r]=arguments[r+1];var n={callback:t,args:e};return u[h]=n,i(h),h++},f.clearImmediate=d}function d(t){delete u[t]}function p(t){if(l)setTimeout(p,0,t);else{var e=u[t];if(e){l=!0;try{!function(t){var e=t.callback,r=t.args;switch(r.length){case 0:e();break;case 1:e(r[0]);break;case 2:e(r[0],r[1]);break;case 3:e(r[0],r[1],r[2]);break;default:e.apply(void 0,r)}}(e)}finally{d(t),l=!1}}}}}("undefined"==typeof self?void 0===t?this:t:self)}).call(this,r(1),r(4))},function(t,e){function r(t){var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e}r.keys=function(){return[]},r.resolve=r,t.exports=r,r.id=49},function(t,e,r){(function(e,i,n){var s=r(17),a=r(5),o=r(18),h=r(19),u=r(56),l=o.IncomingMessage,c=o.readyStates;var f=t.exports=function(t){var r,i=this;h.Writable.call(i),i._opts=t,i._body=[],i._headers={},t.auth&&i.setHeader("Authorization","Basic "+new e(t.auth).toString("base64")),Object.keys(t.headers).forEach((function(e){i.setHeader(e,t.headers[e])}));var n=!0;if("disable-fetch"===t.mode||"requestTimeout"in t&&!s.abortController)n=!1,r=!0;else if("prefer-streaming"===t.mode)r=!1;else if("allow-wrong-content-type"===t.mode)r=!s.overrideMimeType;else{if(t.mode&&"default"!==t.mode&&"prefer-fast"!==t.mode)throw new Error("Invalid value for opts.mode");r=!0}i._mode=function(t,e){return s.fetch&&e?"fetch":s.mozchunkedarraybuffer?"moz-chunked-arraybuffer":s.msstream?"ms-stream":s.arraybuffer&&t?"arraybuffer":s.vbArray&&t?"text:vbarray":"text"}(r,n),i._fetchTimer=null,i.on("finish",(function(){i._onFinish()}))};a(f,h.Writable),f.prototype.setHeader=function(t,e){var r=t.toLowerCase();-1===d.indexOf(r)&&(this._headers[r]={name:t,value:e})},f.prototype.getHeader=function(t){var e=this._headers[t.toLowerCase()];return e?e.value:null},f.prototype.removeHeader=function(t){delete this._headers[t.toLowerCase()]},f.prototype._onFinish=function(){var t=this;if(!t._destroyed){var r=t._opts,a=t._headers,o=null;"GET"!==r.method&&"HEAD"!==r.method&&(o=s.arraybuffer?u(e.concat(t._body)):s.blobConstructor?new i.Blob(t._body.map((function(t){return u(t)})),{type:(a["content-type"]||{}).value||""}):e.concat(t._body).toString());var h=[];if(Object.keys(a).forEach((function(t){var e=a[t].name,r=a[t].value;Array.isArray(r)?r.forEach((function(t){h.push([e,t])})):h.push([e,r])})),"fetch"===t._mode){var l=null;if(s.abortController){var f=new AbortController;l=f.signal,t._fetchAbortController=f,"requestTimeout"in r&&0!==r.requestTimeout&&(t._fetchTimer=i.setTimeout((function(){t.emit("requestTimeout"),t._fetchAbortController&&t._fetchAbortController.abort()}),r.requestTimeout))}i.fetch(t._opts.url,{method:t._opts.method,headers:h,body:o||void 0,mode:"cors",credentials:r.withCredentials?"include":"same-origin",signal:l}).then((function(e){t._fetchResponse=e,t._connect()}),(function(e){i.clearTimeout(t._fetchTimer),t._destroyed||t.emit("error",e)}))}else{var d=t._xhr=new i.XMLHttpRequest;try{d.open(t._opts.method,t._opts.url,!0)}catch(e){return void n.nextTick((function(){t.emit("error",e)}))}"responseType"in d&&(d.responseType=t._mode.split(":")[0]),"withCredentials"in d&&(d.withCredentials=!!r.withCredentials),"text"===t._mode&&"overrideMimeType"in d&&d.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in r&&(d.timeout=r.requestTimeout,d.ontimeout=function(){t.emit("requestTimeout")}),h.forEach((function(t){d.setRequestHeader(t[0],t[1])})),t._response=null,d.onreadystatechange=function(){switch(d.readyState){case c.LOADING:case c.DONE:t._onXHRProgress()}},"moz-chunked-arraybuffer"===t._mode&&(d.onprogress=function(){t._onXHRProgress()}),d.onerror=function(){t._destroyed||t.emit("error",new Error("XHR error"))};try{d.send(o)}catch(e){return void n.nextTick((function(){t.emit("error",e)}))}}}},f.prototype._onXHRProgress=function(){(function(t){try{var e=t.status;return null!==e&&0!==e}catch(t){return!1}})(this._xhr)&&!this._destroyed&&(this._response||this._connect(),this._response._onXHRProgress())},f.prototype._connect=function(){var t=this;t._destroyed||(t._response=new l(t._xhr,t._fetchResponse,t._mode,t._fetchTimer),t._response.on("error",(function(e){t.emit("error",e)})),t.emit("response",t._response))},f.prototype._write=function(t,e,r){this._body.push(t),r()},f.prototype.abort=f.prototype.destroy=function(){this._destroyed=!0,i.clearTimeout(this._fetchTimer),this._response&&(this._response._destroyed=!0),this._xhr?this._xhr.abort():this._fetchAbortController&&this._fetchAbortController.abort()},f.prototype.end=function(t,e,r){"function"==typeof t&&(r=t,t=void 0),h.Writable.prototype.end.call(this,t,e,r)},f.prototype.flushHeaders=function(){},f.prototype.setTimeout=function(){},f.prototype.setNoDelay=function(){},f.prototype.setSocketKeepAlive=function(){};var d=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","via"]}).call(this,r(2).Buffer,r(1),r(4))},function(t,e){},function(t,e,r){"use strict";var i=r(11).Buffer,n=r(53);t.exports=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.head=null,this.tail=null,this.length=0}return t.prototype.push=function(t){var e={data:t,next:null};this.length>0?this.tail.next=e:this.head=e,this.tail=e,++this.length},t.prototype.unshift=function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length},t.prototype.shift=function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}},t.prototype.clear=function(){this.head=this.tail=null,this.length=0},t.prototype.join=function(t){if(0===this.length)return"";for(var e=this.head,r=""+e.data;e=e.next;)r+=t+e.data;return r},t.prototype.concat=function(t){if(0===this.length)return i.alloc(0);if(1===this.length)return this.head.data;for(var e,r,n,s=i.allocUnsafe(t>>>0),a=this.head,o=0;a;)e=a.data,r=s,n=o,e.copy(r,n),o+=a.data.length,a=a.next;return s},t}(),n&&n.inspect&&n.inspect.custom&&(t.exports.prototype[n.inspect.custom]=function(){var t=n.inspect({length:this.length});return this.constructor.name+" "+t})},function(t,e){},function(t,e,r){(function(e){function r(t){try{if(!e.localStorage)return!1}catch(t){return!1}var r=e.localStorage[t];return null!=r&&"true"===String(r).toLowerCase()}t.exports=function(t,e){if(r("noDeprecation"))return t;var i=!1;return function(){if(!i){if(r("throwDeprecation"))throw new Error(e);r("traceDeprecation")?console.trace(e):console.warn(e),i=!0}return t.apply(this,arguments)}}}).call(this,r(1))},function(t,e,r){"use strict";t.exports=s;var i=r(25),n=Object.create(r(8));function s(t){if(!(this instanceof s))return new s(t);i.call(this,t)}n.inherits=r(5),n.inherits(s,i),s.prototype._transform=function(t,e,r){r(null,t)}},function(t,e,r){var i=r(2).Buffer;t.exports=function(t){if(t instanceof Uint8Array){if(0===t.byteOffset&&t.byteLength===t.buffer.byteLength)return t.buffer;if("function"==typeof t.buffer.slice)return t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength)}if(i.isBuffer(t)){for(var e=new Uint8Array(t.length),r=t.length,n=0;n<r;n++)e[n]=t[n];return e.buffer}throw new Error("Argument must be a Buffer")}},function(t,e){t.exports=function(){for(var t={},e=0;e<arguments.length;e++){var i=arguments[e];for(var n in i)r.call(i,n)&&(t[n]=i[n])}return t};var r=Object.prototype.hasOwnProperty},function(t,e){t.exports={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"}},function(t,e,r){(function(t,i){var n;/*! https://mths.be/punycode v1.4.1 by @mathias */!function(s){e&&e.nodeType,t&&t.nodeType;var a="object"==typeof i&&i;a.global!==a&&a.window!==a&&a.self;var o,h=2147483647,u=/^xn--/,l=/[^\x20-\x7E]/,c=/[\x2E\u3002\uFF0E\uFF61]/g,f={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},d=Math.floor,p=String.fromCharCode;function m(t){throw new RangeError(f[t])}function g(t,e){for(var r=t.length,i=[];r--;)i[r]=e(t[r]);return i}function y(t,e){var r=t.split("@"),i="";return r.length>1&&(i=r[0]+"@",t=r[1]),i+g((t=t.replace(c,".")).split("."),e).join(".")}function v(t){for(var e,r,i=[],n=0,s=t.length;n<s;)(e=t.charCodeAt(n++))>=55296&&e<=56319&&n<s?56320==(64512&(r=t.charCodeAt(n++)))?i.push(((1023&e)<<10)+(1023&r)+65536):(i.push(e),n--):i.push(e);return i}function _(t){return g(t,(function(t){var e="";return t>65535&&(e+=p((t-=65536)>>>10&1023|55296),t=56320|1023&t),e+=p(t)})).join("")}function b(t,e){return t+22+75*(t<26)-((0!=e)<<5)}function w(t,e,r){var i=0;for(t=r?d(t/700):t>>1,t+=d(t/e);t>455;i+=36)t=d(t/35);return d(i+36*t/(t+38))}function M(t){var e,r,i,n,s,a,o,u,l,c,f,p=[],g=t.length,y=0,v=128,b=72;for((r=t.lastIndexOf("-"))<0&&(r=0),i=0;i<r;++i)t.charCodeAt(i)>=128&&m("not-basic"),p.push(t.charCodeAt(i));for(n=r>0?r+1:0;n<g;){for(s=y,a=1,o=36;n>=g&&m("invalid-input"),((u=(f=t.charCodeAt(n++))-48<10?f-22:f-65<26?f-65:f-97<26?f-97:36)>=36||u>d((h-y)/a))&&m("overflow"),y+=u*a,!(u<(l=o<=b?1:o>=b+26?26:o-b));o+=36)a>d(h/(c=36-l))&&m("overflow"),a*=c;b=w(y-s,e=p.length+1,0==s),d(y/e)>h-v&&m("overflow"),v+=d(y/e),y%=e,p.splice(y++,0,v)}return _(p)}function x(t){var e,r,i,n,s,a,o,u,l,c,f,g,y,_,M,x=[];for(g=(t=v(t)).length,e=128,r=0,s=72,a=0;a<g;++a)(f=t[a])<128&&x.push(p(f));for(i=n=x.length,n&&x.push("-");i<g;){for(o=h,a=0;a<g;++a)(f=t[a])>=e&&f<o&&(o=f);for(o-e>d((h-r)/(y=i+1))&&m("overflow"),r+=(o-e)*y,e=o,a=0;a<g;++a)if((f=t[a])<e&&++r>h&&m("overflow"),f==e){for(u=r,l=36;!(u<(c=l<=s?1:l>=s+26?26:l-s));l+=36)M=u-c,_=36-c,x.push(p(b(c+M%_,0))),u=d(M/_);x.push(p(b(u,0))),s=w(r,y,i==n),r=0,++i}++r,++e}return x.join("")}o={version:"1.4.1",ucs2:{decode:v,encode:_},decode:M,encode:x,toASCII:function(t){return y(t,(function(t){return l.test(t)?"xn--"+x(t):t}))},toUnicode:function(t){return y(t,(function(t){return u.test(t)?M(t.slice(4).toLowerCase()):t}))}},void 0===(n=function(){return o}.call(e,r,e,t))||(t.exports=n)}()}).call(this,r(60)(t),r(1))},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e,r){"use strict";t.exports={isString:function(t){return"string"==typeof t},isObject:function(t){return"object"==typeof t&&null!==t},isNull:function(t){return null===t},isNullOrUndefined:function(t){return null==t}}},function(t,e,r){"use strict";e.decode=e.parse=r(63),e.encode=e.stringify=r(64)},function(t,e,r){"use strict";function i(t,e){return Object.prototype.hasOwnProperty.call(t,e)}t.exports=function(t,e,r,s){e=e||"&",r=r||"=";var a={};if("string"!=typeof t||0===t.length)return a;var o=/\+/g;t=t.split(e);var h=1e3;s&&"number"==typeof s.maxKeys&&(h=s.maxKeys);var u=t.length;h>0&&u>h&&(u=h);for(var l=0;l<u;++l){var c,f,d,p,m=t[l].replace(o,"%20"),g=m.indexOf(r);g>=0?(c=m.substr(0,g),f=m.substr(g+1)):(c=m,f=""),d=decodeURIComponent(c),p=decodeURIComponent(f),i(a,d)?n(a[d])?a[d].push(p):a[d]=[a[d],p]:a[d]=p}return a};var n=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)}},function(t,e,r){"use strict";var i=function(t){switch(typeof t){case"string":return t;case"boolean":return t?"true":"false";case"number":return isFinite(t)?t:"";default:return""}};t.exports=function(t,e,r,o){return e=e||"&",r=r||"=",null===t&&(t=void 0),"object"==typeof t?s(a(t),(function(a){var o=encodeURIComponent(i(a))+r;return n(t[a])?s(t[a],(function(t){return o+encodeURIComponent(i(t))})).join(e):o+encodeURIComponent(i(t[a]))})).join(e):o?encodeURIComponent(i(o))+r+encodeURIComponent(i(t)):""};var n=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};function s(t,e){if(t.map)return t.map(e);for(var r=[],i=0;i<t.length;i++)r.push(e(t[i],i));return r}var a=Object.keys||function(t){var e=[];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.push(r);return e}},function(t,e,r){var i=r(16),n=r(26),s=t.exports;for(var a in i)i.hasOwnProperty(a)&&(s[a]=i[a]);function o(t){if("string"==typeof t&&(t=n.parse(t)),t.protocol||(t.protocol="https:"),"https:"!==t.protocol)throw new Error('Protocol "'+t.protocol+'" not supported. Expected "https:"');return t}s.request=function(t,e){return t=o(t),i.request.call(this,t,e)},s.get=function(t,e){return t=o(t),i.get.call(this,t,e)}},function(t,e,r){"use strict";r.r(e);var i=484813681109536e-20,n=Math.PI/2,s=.017453292519943295,a=57.29577951308232,o=Math.PI/4,h=2*Math.PI,u=3.14159265359,l={greenwich:0,lisbon:-9.131906111111,paris:2.337229166667,bogota:-74.080916666667,madrid:-3.687938888889,rome:12.452333333333,bern:7.439583333333,jakarta:106.807719444444,ferro:-17.666666666667,brussels:4.367975,stockholm:18.058277777778,athens:23.7163375,oslo:10.722916666667},c={ft:{to_meter:.3048},"us-ft":{to_meter:1200/3937}},f=/[\s_\-\/\(\)]/g;function d(t,e){if(t[e])return t[e];for(var r,i=Object.keys(t),n=e.toLowerCase().replace(f,""),s=-1;++s<i.length;)if((r=i[s]).toLowerCase().replace(f,"")===n)return t[r]}var p=function(t){var e,r,i,n={},a=t.split("+").map((function(t){return t.trim()})).filter((function(t){return t})).reduce((function(t,e){var r=e.split("=");return r.push(!0),t[r[0].toLowerCase()]=r[1],t}),{}),o={proj:"projName",datum:"datumCode",rf:function(t){n.rf=parseFloat(t)},lat_0:function(t){n.lat0=t*s},lat_1:function(t){n.lat1=t*s},lat_2:function(t){n.lat2=t*s},lat_ts:function(t){n.lat_ts=t*s},lon_0:function(t){n.long0=t*s},lon_1:function(t){n.long1=t*s},lon_2:function(t){n.long2=t*s},alpha:function(t){n.alpha=parseFloat(t)*s},gamma:function(t){n.rectified_grid_angle=parseFloat(t)},lonc:function(t){n.longc=t*s},x_0:function(t){n.x0=parseFloat(t)},y_0:function(t){n.y0=parseFloat(t)},k_0:function(t){n.k0=parseFloat(t)},k:function(t){n.k0=parseFloat(t)},a:function(t){n.a=parseFloat(t)},b:function(t){n.b=parseFloat(t)},r_a:function(){n.R_A=!0},zone:function(t){n.zone=parseInt(t,10)},south:function(){n.utmSouth=!0},towgs84:function(t){n.datum_params=t.split(",").map((function(t){return parseFloat(t)}))},to_meter:function(t){n.to_meter=parseFloat(t)},units:function(t){n.units=t;var e=d(c,t);e&&(n.to_meter=e.to_meter)},from_greenwich:function(t){n.from_greenwich=t*s},pm:function(t){var e=d(l,t);n.from_greenwich=(e||parseFloat(t))*s},nadgrids:function(t){"@null"===t?n.datumCode="none":n.nadgrids=t},axis:function(t){3===t.length&&-1!=="ewnsud".indexOf(t.substr(0,1))&&-1!=="ewnsud".indexOf(t.substr(1,1))&&-1!=="ewnsud".indexOf(t.substr(2,1))&&(n.axis=t)},approx:function(){n.approx=!0}};for(e in a)r=a[e],e in o?"function"==typeof(i=o[e])?i(r):n[i]=r:n[e]=r;return"string"==typeof n.datumCode&&"WGS84"!==n.datumCode&&(n.datumCode=n.datumCode.toLowerCase()),n},m=function(t){return new w(t).output()},g=/\s/,y=/[A-Za-z]/,v=/[A-Za-z84_]/,_=/[,\]]/,b=/[\d\.E\-\+]/;function w(t){if("string"!=typeof t)throw new Error("not a string");this.text=t.trim(),this.level=0,this.place=0,this.root=null,this.stack=[],this.currentObject=null,this.state=1}function M(t,e,r){Array.isArray(e)&&(r.unshift(e),e=null);var i=e?{}:t,n=r.reduce((function(t,e){return x(e,t),t}),i);e&&(t[e]=n)}function x(t,e){if(Array.isArray(t)){var r=t.shift();if("PARAMETER"===r&&(r=t.shift()),1===t.length)return Array.isArray(t[0])?(e[r]={},void x(t[0],e[r])):void(e[r]=t[0]);if(t.length)if("TOWGS84"!==r){if("AXIS"===r)return r in e||(e[r]=[]),void e[r].push(t);var i;switch(Array.isArray(r)||(e[r]={}),r){case"UNIT":case"PRIMEM":case"VERT_DATUM":return e[r]={name:t[0].toLowerCase(),convert:t[1]},void(3===t.length&&x(t[2],e[r]));case"SPHEROID":case"ELLIPSOID":return e[r]={name:t[0],a:t[1],rf:t[2]},void(4===t.length&&x(t[3],e[r]));case"PROJECTEDCRS":case"PROJCRS":case"GEOGCS":case"GEOCCS":case"PROJCS":case"LOCAL_CS":case"GEODCRS":case"GEODETICCRS":case"GEODETICDATUM":case"EDATUM":case"ENGINEERINGDATUM":case"VERT_CS":case"VERTCRS":case"VERTICALCRS":case"COMPD_CS":case"COMPOUNDCRS":case"ENGINEERINGCRS":case"ENGCRS":case"FITTED_CS":case"LOCAL_DATUM":case"DATUM":return t[0]=["name",t[0]],void M(e,r,t);default:for(i=-1;++i<t.length;)if(!Array.isArray(t[i]))return x(t,e[r]);return M(e,r,t)}}else e[r]=t;else e[r]=!0}else e[t]=!0}w.prototype.readCharicter=function(){var t=this.text[this.place++];if(4!==this.state)for(;g.test(t);){if(this.place>=this.text.length)return;t=this.text[this.place++]}switch(this.state){case 1:return this.neutral(t);case 2:return this.keyword(t);case 4:return this.quoted(t);case 5:return this.afterquote(t);case 3:return this.number(t);case-1:return}},w.prototype.afterquote=function(t){if('"'===t)return this.word+='"',void(this.state=4);if(_.test(t))return this.word=this.word.trim(),void this.afterItem(t);throw new Error("havn't handled \""+t+'" in afterquote yet, index '+this.place)},w.prototype.afterItem=function(t){return","===t?(null!==this.word&&this.currentObject.push(this.word),this.word=null,void(this.state=1)):"]"===t?(this.level--,null!==this.word&&(this.currentObject.push(this.word),this.word=null),this.state=1,this.currentObject=this.stack.pop(),void(this.currentObject||(this.state=-1))):void 0},w.prototype.number=function(t){if(!b.test(t)){if(_.test(t))return this.word=parseFloat(this.word),void this.afterItem(t);throw new Error("havn't handled \""+t+'" in number yet, index '+this.place)}this.word+=t},w.prototype.quoted=function(t){'"'!==t?this.word+=t:this.state=5},w.prototype.keyword=function(t){if(v.test(t))this.word+=t;else{if("["===t){var e=[];return e.push(this.word),this.level++,null===this.root?this.root=e:this.currentObject.push(e),this.stack.push(this.currentObject),this.currentObject=e,void(this.state=1)}if(!_.test(t))throw new Error("havn't handled \""+t+'" in keyword yet, index '+this.place);this.afterItem(t)}},w.prototype.neutral=function(t){if(y.test(t))return this.word=t,void(this.state=2);if('"'===t)return this.word="",void(this.state=4);if(b.test(t))return this.word=t,void(this.state=3);if(!_.test(t))throw new Error("havn't handled \""+t+'" in neutral yet, index '+this.place);this.afterItem(t)},w.prototype.output=function(){for(;this.place<this.text.length;)this.readCharicter();if(-1===this.state)return this.root;throw new Error('unable to parse string "'+this.text+'". State is '+this.state)};function k(t){return.017453292519943295*t}var S=function(t){var e=m(t),r=e.shift(),i=e.shift();e.unshift(["name",i]),e.unshift(["type",r]);var n={};return x(e,n),function(t){if("GEOGCS"===t.type?t.projName="longlat":"LOCAL_CS"===t.type?(t.projName="identity",t.local=!0):"object"==typeof t.PROJECTION?t.projName=Object.keys(t.PROJECTION)[0]:t.projName=t.PROJECTION,t.AXIS){for(var e="",r=0,i=t.AXIS.length;r<i;++r){var n=[t.AXIS[r][0].toLowerCase(),t.AXIS[r][1].toLowerCase()];-1!==n[0].indexOf("north")||("y"===n[0]||"lat"===n[0])&&"north"===n[1]?e+="n":-1!==n[0].indexOf("south")||("y"===n[0]||"lat"===n[0])&&"south"===n[1]?e+="s":-1!==n[0].indexOf("east")||("x"===n[0]||"lon"===n[0])&&"east"===n[1]?e+="e":-1===n[0].indexOf("west")&&("x"!==n[0]&&"lon"!==n[0]||"west"!==n[1])||(e+="w")}2===e.length&&(e+="u"),3===e.length&&(t.axis=e)}t.UNIT&&(t.units=t.UNIT.name.toLowerCase(),"metre"===t.units&&(t.units="meter"),t.UNIT.convert&&("GEOGCS"===t.type?t.DATUM&&t.DATUM.SPHEROID&&(t.to_meter=t.UNIT.convert*t.DATUM.SPHEROID.a):t.to_meter=t.UNIT.convert));var s=t.GEOGCS;function a(e){return e*(t.to_meter||1)}"GEOGCS"===t.type&&(s=t),s&&(s.DATUM?t.datumCode=s.DATUM.name.toLowerCase():t.datumCode=s.name.toLowerCase(),"d_"===t.datumCode.slice(0,2)&&(t.datumCode=t.datumCode.slice(2)),"new_zealand_geodetic_datum_1949"!==t.datumCode&&"new_zealand_1949"!==t.datumCode||(t.datumCode="nzgd49"),"wgs_1984"!==t.datumCode&&"world_geodetic_system_1984"!==t.datumCode||("Mercator_Auxiliary_Sphere"===t.PROJECTION&&(t.sphere=!0),t.datumCode="wgs84"),"_ferro"===t.datumCode.slice(-6)&&(t.datumCode=t.datumCode.slice(0,-6)),"_jakarta"===t.datumCode.slice(-8)&&(t.datumCode=t.datumCode.slice(0,-8)),~t.datumCode.indexOf("belge")&&(t.datumCode="rnb72"),s.DATUM&&s.DATUM.SPHEROID&&(t.ellps=s.DATUM.SPHEROID.name.replace("_19","").replace(/[Cc]larke\_18/,"clrk"),"international"===t.ellps.toLowerCase().slice(0,13)&&(t.ellps="intl"),t.a=s.DATUM.SPHEROID.a,t.rf=parseFloat(s.DATUM.SPHEROID.rf,10)),s.DATUM&&s.DATUM.TOWGS84&&(t.datum_params=s.DATUM.TOWGS84),~t.datumCode.indexOf("osgb_1936")&&(t.datumCode="osgb36"),~t.datumCode.indexOf("osni_1952")&&(t.datumCode="osni52"),(~t.datumCode.indexOf("tm65")||~t.datumCode.indexOf("geodetic_datum_of_1965"))&&(t.datumCode="ire65"),"ch1903+"===t.datumCode&&(t.datumCode="ch1903"),~t.datumCode.indexOf("israel")&&(t.datumCode="isr93")),t.b&&!isFinite(t.b)&&(t.b=t.a),[["standard_parallel_1","Standard_Parallel_1"],["standard_parallel_1","Latitude of 1st standard parallel"],["standard_parallel_2","Standard_Parallel_2"],["standard_parallel_2","Latitude of 2nd standard parallel"],["false_easting","False_Easting"],["false_easting","False easting"],["false-easting","Easting at false origin"],["false_northing","False_Northing"],["false_northing","False northing"],["false_northing","Northing at false origin"],["central_meridian","Central_Meridian"],["central_meridian","Longitude of natural origin"],["central_meridian","Longitude of false origin"],["latitude_of_origin","Latitude_Of_Origin"],["latitude_of_origin","Central_Parallel"],["latitude_of_origin","Latitude of natural origin"],["latitude_of_origin","Latitude of false origin"],["scale_factor","Scale_Factor"],["k0","scale_factor"],["latitude_of_center","Latitude_Of_Center"],["latitude_of_center","Latitude_of_center"],["lat0","latitude_of_center",k],["longitude_of_center","Longitude_Of_Center"],["longitude_of_center","Longitude_of_center"],["longc","longitude_of_center",k],["x0","false_easting",a],["y0","false_northing",a],["long0","central_meridian",k],["lat0","latitude_of_origin",k],["lat0","standard_parallel_1",k],["lat1","standard_parallel_1",k],["lat2","standard_parallel_2",k],["azimuth","Azimuth"],["alpha","azimuth",k],["srsCode","name"]].forEach((function(e){return r=t,n=(i=e)[0],s=i[1],void(!(n in r)&&s in r&&(r[n]=r[s],3===i.length&&(r[n]=i[2](r[n]))));var r,i,n,s})),t.long0||!t.longc||"Albers_Conic_Equal_Area"!==t.projName&&"Lambert_Azimuthal_Equal_Area"!==t.projName||(t.long0=t.longc),t.lat_ts||!t.lat1||"Stereographic_South_Pole"!==t.projName&&"Polar Stereographic (variant B)"!==t.projName||(t.lat0=k(t.lat1>0?90:-90),t.lat_ts=t.lat1)}(n),n};function E(t){var e=this;if(2===arguments.length){var r=arguments[1];"string"==typeof r?"+"===r.charAt(0)?E[t]=p(arguments[1]):E[t]=S(arguments[1]):E[t]=r}else if(1===arguments.length){if(Array.isArray(t))return t.map((function(t){Array.isArray(t)?E.apply(e,t):E(t)}));if("string"==typeof t){if(t in E)return E[t]}else"EPSG"in t?E["EPSG:"+t.EPSG]=t:"ESRI"in t?E["ESRI:"+t.ESRI]=t:"IAU2000"in t?E["IAU2000:"+t.IAU2000]=t:console.log(t);return}}!function(t){t("EPSG:4326","+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees"),t("EPSG:4269","+title=NAD83 (long/lat) +proj=longlat +a=6378137.0 +b=6356752.31414036 +ellps=GRS80 +datum=NAD83 +units=degrees"),t("EPSG:3857","+title=WGS 84 / Pseudo-Mercator +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs"),t.WGS84=t["EPSG:4326"],t["EPSG:3785"]=t["EPSG:3857"],t.GOOGLE=t["EPSG:3857"],t["EPSG:900913"]=t["EPSG:3857"],t["EPSG:102113"]=t["EPSG:3857"]}(E);var C=E;var A=["PROJECTEDCRS","PROJCRS","GEOGCS","GEOCCS","PROJCS","LOCAL_CS","GEODCRS","GEODETICCRS","GEODETICDATUM","ENGCRS","ENGINEERINGCRS"];var O=["3857","900913","3785","102113"];var T=function(t){if(!function(t){return"string"==typeof t}(t))return t;if(function(t){return t in C}(t))return C[t];if(function(t){return A.some((function(e){return t.indexOf(e)>-1}))}(t)){var e=S(t);if(function(t){var e=d(t,"authority");if(e){var r=d(e,"epsg");return r&&O.indexOf(r)>-1}}(e))return C["EPSG:3857"];var r=function(t){var e=d(t,"extension");if(e)return d(e,"proj4")}(e);return r?p(r):e}return function(t){return"+"===t[0]}(t)?p(t):void 0},I=function(t,e){var r,i;if(t=t||{},!e)return t;for(i in e)void 0!==(r=e[i])&&(t[i]=r);return t},L=function(t,e,r){var i=t*e;return r/Math.sqrt(1-i*i)},P=function(t){return t<0?-1:1},R=function(t){return Math.abs(t)<=u?t:t-P(t)*h},N=function(t,e,r){var i=t*r,s=.5*t;return i=Math.pow((1-i)/(1+i),s),Math.tan(.5*(n-e))/i},z=function(t,e){for(var r,i,s=.5*t,a=n-2*Math.atan(e),o=0;o<=15;o++)if(r=t*Math.sin(a),a+=i=n-2*Math.atan(e*Math.pow((1-r)/(1+r),s))-a,Math.abs(i)<=1e-10)return a;return-9999};function j(t){return t}var B=[{init:function(){var t=this.b/this.a;this.es=1-t*t,"x0"in this||(this.x0=0),"y0"in this||(this.y0=0),this.e=Math.sqrt(this.es),this.lat_ts?this.sphere?this.k0=Math.cos(this.lat_ts):this.k0=L(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)):this.k0||(this.k?this.k0=this.k:this.k0=1)},forward:function(t){var e,r,i=t.x,s=t.y;if(s*a>90&&s*a<-90&&i*a>180&&i*a<-180)return null;if(Math.abs(Math.abs(s)-n)<=1e-10)return null;if(this.sphere)e=this.x0+this.a*this.k0*R(i-this.long0),r=this.y0+this.a*this.k0*Math.log(Math.tan(o+.5*s));else{var h=Math.sin(s),u=N(this.e,s,h);e=this.x0+this.a*this.k0*R(i-this.long0),r=this.y0-this.a*this.k0*Math.log(u)}return t.x=e,t.y=r,t},inverse:function(t){var e,r,i=t.x-this.x0,s=t.y-this.y0;if(this.sphere)r=n-2*Math.atan(Math.exp(-s/(this.a*this.k0)));else{var a=Math.exp(-s/(this.a*this.k0));if(-9999===(r=z(this.e,a)))return null}return e=R(this.long0+i/(this.a*this.k0)),t.x=e,t.y=r,t},names:["Mercator","Popular Visualisation Pseudo Mercator","Mercator_1SP","Mercator_Auxiliary_Sphere","merc"]},{init:function(){},forward:j,inverse:j,names:["longlat","identity"]}],D={},U=[];function F(t,e){var r=U.length;return t.names?(U[r]=t,t.names.forEach((function(t){D[t.toLowerCase()]=r})),this):(console.log(e),!0)}var q={start:function(){B.forEach(F)},add:F,get:function(t){if(!t)return!1;var e=t.toLowerCase();return void 0!==D[e]&&U[D[e]]?U[D[e]]:void 0}},G={MERIT:{a:6378137,rf:298.257,ellipseName:"MERIT 1983"},SGS85:{a:6378136,rf:298.257,ellipseName:"Soviet Geodetic System 85"},GRS80:{a:6378137,rf:298.257222101,ellipseName:"GRS 1980(IUGG, 1980)"},IAU76:{a:6378140,rf:298.257,ellipseName:"IAU 1976"},airy:{a:6377563.396,b:6356256.91,ellipseName:"Airy 1830"},APL4:{a:6378137,rf:298.25,ellipseName:"Appl. Physics. 1965"},NWL9D:{a:6378145,rf:298.25,ellipseName:"Naval Weapons Lab., 1965"},mod_airy:{a:6377340.189,b:6356034.446,ellipseName:"Modified Airy"},andrae:{a:6377104.43,rf:300,ellipseName:"Andrae 1876 (Den., Iclnd.)"},aust_SA:{a:6378160,rf:298.25,ellipseName:"Australian Natl & S. Amer. 1969"},GRS67:{a:6378160,rf:298.247167427,ellipseName:"GRS 67(IUGG 1967)"},bessel:{a:6377397.155,rf:299.1528128,ellipseName:"Bessel 1841"},bess_nam:{a:6377483.865,rf:299.1528128,ellipseName:"Bessel 1841 (Namibia)"},clrk66:{a:6378206.4,b:6356583.8,ellipseName:"Clarke 1866"},clrk80:{a:6378249.145,rf:293.4663,ellipseName:"Clarke 1880 mod."},clrk58:{a:6378293.645208759,rf:294.2606763692654,ellipseName:"Clarke 1858"},CPM:{a:6375738.7,rf:334.29,ellipseName:"Comm. des Poids et Mesures 1799"},delmbr:{a:6376428,rf:311.5,ellipseName:"Delambre 1810 (Belgium)"},engelis:{a:6378136.05,rf:298.2566,ellipseName:"Engelis 1985"},evrst30:{a:6377276.345,rf:300.8017,ellipseName:"Everest 1830"},evrst48:{a:6377304.063,rf:300.8017,ellipseName:"Everest 1948"},evrst56:{a:6377301.243,rf:300.8017,ellipseName:"Everest 1956"},evrst69:{a:6377295.664,rf:300.8017,ellipseName:"Everest 1969"},evrstSS:{a:6377298.556,rf:300.8017,ellipseName:"Everest (Sabah & Sarawak)"},fschr60:{a:6378166,rf:298.3,ellipseName:"Fischer (Mercury Datum) 1960"},fschr60m:{a:6378155,rf:298.3,ellipseName:"Fischer 1960"},fschr68:{a:6378150,rf:298.3,ellipseName:"Fischer 1968"},helmert:{a:6378200,rf:298.3,ellipseName:"Helmert 1906"},hough:{a:6378270,rf:297,ellipseName:"Hough"},intl:{a:6378388,rf:297,ellipseName:"International 1909 (Hayford)"},kaula:{a:6378163,rf:298.24,ellipseName:"Kaula 1961"},lerch:{a:6378139,rf:298.257,ellipseName:"Lerch 1979"},mprts:{a:6397300,rf:191,ellipseName:"Maupertius 1738"},new_intl:{a:6378157.5,b:6356772.2,ellipseName:"New International 1967"},plessis:{a:6376523,rf:6355863,ellipseName:"Plessis 1817 (France)"},krass:{a:6378245,rf:298.3,ellipseName:"Krassovsky, 1942"},SEasia:{a:6378155,b:6356773.3205,ellipseName:"Southeast Asia"},walbeck:{a:6376896,b:6355834.8467,ellipseName:"Walbeck"},WGS60:{a:6378165,rf:298.3,ellipseName:"WGS 60"},WGS66:{a:6378145,rf:298.25,ellipseName:"WGS 66"},WGS7:{a:6378135,rf:298.26,ellipseName:"WGS 72"}},W=G.WGS84={a:6378137,rf:298.257223563,ellipseName:"WGS 84"};G.sphere={a:6370997,b:6370997,ellipseName:"Normal Sphere (r=6370997)"};var H={};H.wgs84={towgs84:"0,0,0",ellipse:"WGS84",datumName:"WGS84"},H.ch1903={towgs84:"674.374,15.056,405.346",ellipse:"bessel",datumName:"swiss"},H.ggrs87={towgs84:"-199.87,74.79,246.62",ellipse:"GRS80",datumName:"Greek_Geodetic_Reference_System_1987"},H.nad83={towgs84:"0,0,0",ellipse:"GRS80",datumName:"North_American_Datum_1983"},H.nad27={nadgrids:"@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat",ellipse:"clrk66",datumName:"North_American_Datum_1927"},H.potsdam={towgs84:"598.1,73.7,418.2,0.202,0.045,-2.455,6.7",ellipse:"bessel",datumName:"Potsdam Rauenberg 1950 DHDN"},H.carthage={towgs84:"-263.0,6.0,431.0",ellipse:"clark80",datumName:"Carthage 1934 Tunisia"},H.hermannskogel={towgs84:"577.326,90.129,463.919,5.137,1.474,5.297,2.4232",ellipse:"bessel",datumName:"Hermannskogel"},H.osni52={towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"airy",datumName:"Irish National"},H.ire65={towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"mod_airy",datumName:"Ireland 1965"},H.rassadiran={towgs84:"-133.63,-157.5,-158.62",ellipse:"intl",datumName:"Rassadiran"},H.nzgd49={towgs84:"59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993",ellipse:"intl",datumName:"New Zealand Geodetic Datum 1949"},H.osgb36={towgs84:"446.448,-125.157,542.060,0.1502,0.2470,0.8421,-20.4894",ellipse:"airy",datumName:"Airy 1830"},H.s_jtsk={towgs84:"589,76,480",ellipse:"bessel",datumName:"S-JTSK (Ferro)"},H.beduaram={towgs84:"-106,-87,188",ellipse:"clrk80",datumName:"Beduaram"},H.gunung_segara={towgs84:"-403,684,41",ellipse:"bessel",datumName:"Gunung Segara Jakarta"},H.rnb72={towgs84:"106.869,-52.2978,103.724,-0.33657,0.456955,-1.84218,1",ellipse:"intl",datumName:"Reseau National Belge 1972"};var Z=function(t,e,r,n,s,a,o){var h={};return h.datum_type=void 0===t||"none"===t?5:4,e&&(h.datum_params=e.map(parseFloat),0===h.datum_params[0]&&0===h.datum_params[1]&&0===h.datum_params[2]||(h.datum_type=1),h.datum_params.length>3&&(0===h.datum_params[3]&&0===h.datum_params[4]&&0===h.datum_params[5]&&0===h.datum_params[6]||(h.datum_type=2,h.datum_params[3]*=i,h.datum_params[4]*=i,h.datum_params[5]*=i,h.datum_params[6]=h.datum_params[6]/1e6+1))),o&&(h.datum_type=3,h.grids=o),h.a=r,h.b=n,h.es=s,h.ep2=a,h},Y={};function K(t){if(0===t.length)return null;var e="@"===t[0];return e&&(t=t.slice(1)),"null"===t?{name:"null",mandatory:!e,grid:null,isNull:!0}:{name:t,mandatory:!e,grid:Y[t]||null,isNull:!1}}function X(t){return t/3600*Math.PI/180}function J(t,e,r){return String.fromCharCode.apply(null,new Uint8Array(t.buffer.slice(e,r)))}function Q(t){return t.map((function(t){return[X(t.longitudeShift),X(t.latitudeShift)]}))}function V(t,e,r){return{name:J(t,e+8,e+16).trim(),parent:J(t,e+24,e+24+8).trim(),lowerLatitude:t.getFloat64(e+72,r),upperLatitude:t.getFloat64(e+88,r),lowerLongitude:t.getFloat64(e+104,r),upperLongitude:t.getFloat64(e+120,r),latitudeInterval:t.getFloat64(e+136,r),longitudeInterval:t.getFloat64(e+152,r),gridNodeCount:t.getInt32(e+168,r)}}function $(t,e,r,i){for(var n=e+176,s=[],a=0;a<r.gridNodeCount;a++){var o={latitudeShift:t.getFloat32(n+16*a,i),longitudeShift:t.getFloat32(n+16*a+4,i),latitudeAccuracy:t.getFloat32(n+16*a+8,i),longitudeAccuracy:t.getFloat32(n+16*a+12,i)};s.push(o)}return s}function tt(t,e){if(!(this instanceof tt))return new tt(t);e=e||function(t){if(t)throw t};var r=T(t);if("object"==typeof r){var i=tt.projections.get(r.projName);if(i){if(r.datumCode&&"none"!==r.datumCode){var n=d(H,r.datumCode);n&&(r.datum_params=r.datum_params||(n.towgs84?n.towgs84.split(","):null),r.ellps=n.ellipse,r.datumName=n.datumName?n.datumName:r.datumCode)}r.k0=r.k0||1,r.axis=r.axis||"enu",r.ellps=r.ellps||"wgs84",r.lat1=r.lat1||r.lat0;var s,a,o,h,u,l,c,f=function(t,e,r,i,n){if(!t){var s=d(G,i);s||(s=W),t=s.a,e=s.b,r=s.rf}return r&&!e&&(e=(1-1/r)*t),(0===r||Math.abs(t-e)<1e-10)&&(n=!0,e=t),{a:t,b:e,rf:r,sphere:n}}(r.a,r.b,r.rf,r.ellps,r.sphere),p=(s=f.a,a=f.b,f.rf,o=r.R_A,l=((h=s*s)-(u=a*a))/h,c=0,o?(h=(s*=1-l*(.16666666666666666+l*(.04722222222222222+.022156084656084655*l)))*s,l=0):c=Math.sqrt(l),{es:l,e:c,ep2:(h-u)/u}),m=function(t){return void 0===t?null:t.split(",").map(K)}(r.nadgrids),g=r.datum||Z(r.datumCode,r.datum_params,f.a,f.b,p.es,p.ep2,m);I(this,r),I(this,i),this.a=f.a,this.b=f.b,this.rf=f.rf,this.sphere=f.sphere,this.es=p.es,this.e=p.e,this.ep2=p.ep2,this.datum=g,this.init(),e(null,this)}else e(t)}else e(t)}tt.projections=q,tt.projections.start();var et=tt;function rt(t,e,r){var i,s,a,o,h=t.x,u=t.y,l=t.z?t.z:0;if(u<-n&&u>-1.001*n)u=-n;else if(u>n&&u<1.001*n)u=n;else{if(u<-n)return{x:-1/0,y:-1/0,z:t.z};if(u>n)return{x:1/0,y:1/0,z:t.z}}return h>Math.PI&&(h-=2*Math.PI),s=Math.sin(u),o=Math.cos(u),a=s*s,{x:((i=r/Math.sqrt(1-e*a))+l)*o*Math.cos(h),y:(i+l)*o*Math.sin(h),z:(i*(1-e)+l)*s}}function it(t,e,r,i){var s,a,o,h,u,l,c,f,d,p,m,g,y,v,_,b=t.x,w=t.y,M=t.z?t.z:0;if(s=Math.sqrt(b*b+w*w),a=Math.sqrt(b*b+w*w+M*M),s/r<1e-12){if(v=0,a/r<1e-12)return n,_=-i,{x:t.x,y:t.y,z:t.z}}else v=Math.atan2(w,b);o=M/a,f=(h=s/a)*(1-e)*(u=1/Math.sqrt(1-e*(2-e)*h*h)),d=o*u,y=0;do{y++,l=e*(c=r/Math.sqrt(1-e*d*d))/(c+(_=s*f+M*d-c*(1-e*d*d))),g=(m=o*(u=1/Math.sqrt(1-l*(2-l)*h*h)))*f-(p=h*(1-l)*u)*d,f=p,d=m}while(g*g>1e-24&&y<30);return{x:v,y:Math.atan(m/Math.abs(p)),z:_}}function nt(t){return 1===t||2===t}var st=function(t,e,r){if(function(t,e){return t.datum_type===e.datum_type&&(!(t.a!==e.a||Math.abs(t.es-e.es)>5e-11)&&(1===t.datum_type?t.datum_params[0]===e.datum_params[0]&&t.datum_params[1]===e.datum_params[1]&&t.datum_params[2]===e.datum_params[2]:2!==t.datum_type||t.datum_params[0]===e.datum_params[0]&&t.datum_params[1]===e.datum_params[1]&&t.datum_params[2]===e.datum_params[2]&&t.datum_params[3]===e.datum_params[3]&&t.datum_params[4]===e.datum_params[4]&&t.datum_params[5]===e.datum_params[5]&&t.datum_params[6]===e.datum_params[6]))}(t,e))return r;if(5===t.datum_type||5===e.datum_type)return r;var i=t.a,n=t.es;if(3===t.datum_type){if(0!==at(t,!1,r))return;i=6378137,n=.0066943799901413165}var s=e.a,a=e.b,o=e.es;if(3===e.datum_type&&(s=6378137,a=6356752.314,o=.0066943799901413165),n===o&&i===s&&!nt(t.datum_type)&&!nt(e.datum_type))return r;if((r=rt(r,n,i),nt(t.datum_type)&&(r=function(t,e,r){if(1===e)return{x:t.x+r[0],y:t.y+r[1],z:t.z+r[2]};if(2===e){var i=r[0],n=r[1],s=r[2],a=r[3],o=r[4],h=r[5],u=r[6];return{x:u*(t.x-h*t.y+o*t.z)+i,y:u*(h*t.x+t.y-a*t.z)+n,z:u*(-o*t.x+a*t.y+t.z)+s}}}(r,t.datum_type,t.datum_params)),nt(e.datum_type)&&(r=function(t,e,r){if(1===e)return{x:t.x-r[0],y:t.y-r[1],z:t.z-r[2]};if(2===e){var i=r[0],n=r[1],s=r[2],a=r[3],o=r[4],h=r[5],u=r[6],l=(t.x-i)/u,c=(t.y-n)/u,f=(t.z-s)/u;return{x:l+h*c-o*f,y:-h*l+c+a*f,z:o*l-a*c+f}}}(r,e.datum_type,e.datum_params)),r=it(r,o,s,a),3===e.datum_type)&&0!==at(e,!0,r))return;return r};function at(t,e,r){if(null===t.grids||0===t.grids.length)return console.log("Grid shift grids not found"),-1;for(var i={x:-r.x,y:r.y},n={x:Number.NaN,y:Number.NaN},s=[],o=0;o<t.grids.length;o++){var h=t.grids[o];if(s.push(h.name),h.isNull){n=i;break}if(h.mandatory,null!==h.grid){var u=h.grid.subgrids[0],l=(Math.abs(u.del[1])+Math.abs(u.del[0]))/1e4,c=u.ll[0]-l,f=u.ll[1]-l,d=u.ll[0]+(u.lim[0]-1)*u.del[0]+l,p=u.ll[1]+(u.lim[1]-1)*u.del[1]+l;if(!(f>i.y||c>i.x||p<i.y||d<i.x||(n=ot(i,e,u),isNaN(n.x))))break}else if(h.mandatory)return console.log("Unable to find mandatory grid '"+h.name+"'"),-1}return isNaN(n.x)?(console.log("Failed to find a grid shift table for location '"+-i.x*a+" "+i.y*a+" tried: '"+s+"'"),-1):(r.x=-n.x,r.y=n.y,0)}function ot(t,e,r){var i={x:Number.NaN,y:Number.NaN};if(isNaN(t.x))return i;var n={x:t.x,y:t.y};n.x-=r.ll[0],n.y-=r.ll[1],n.x=R(n.x-Math.PI)+Math.PI;var s=ht(n,r);if(e){if(isNaN(s.x))return i;s.x=n.x-s.x,s.y=n.y-s.y;var a,o,h=9;do{if(o=ht(s,r),isNaN(o.x)){console.log("Inverse grid shift iteration failed, presumably at grid edge. Using first approximation.");break}a={x:n.x-(o.x+s.x),y:n.y-(o.y+s.y)},s.x+=a.x,s.y+=a.y}while(h--&&Math.abs(a.x)>1e-12&&Math.abs(a.y)>1e-12);if(h<0)return console.log("Inverse grid shift iterator failed to converge."),i;i.x=R(s.x+r.ll[0]),i.y=s.y+r.ll[1]}else isNaN(s.x)||(i.x=t.x+s.x,i.y=t.y+s.y);return i}function ht(t,e){var r,i={x:t.x/e.del[0],y:t.y/e.del[1]},n=Math.floor(i.x),s=Math.floor(i.y),a=i.x-1*n,o=i.y-1*s,h={x:Number.NaN,y:Number.NaN};if(n<0||n>=e.lim[0])return h;if(s<0||s>=e.lim[1])return h;r=s*e.lim[0]+n;var u=e.cvs[r][0],l=e.cvs[r][1];r++;var c=e.cvs[r][0],f=e.cvs[r][1];r+=e.lim[0];var d=e.cvs[r][0],p=e.cvs[r][1];r--;var m=e.cvs[r][0],g=e.cvs[r][1],y=a*o,v=a*(1-o),_=(1-a)*(1-o),b=(1-a)*o;return h.x=_*u+v*c+b*m+y*d,h.y=_*l+v*f+b*g+y*p,h}var ut=function(t,e,r){var i,n,s,a=r.x,o=r.y,h=r.z||0,u={};for(s=0;s<3;s++)if(!e||2!==s||void 0!==r.z)switch(0===s?(i=a,n=-1!=="ew".indexOf(t.axis[s])?"x":"y"):1===s?(i=o,n=-1!=="ns".indexOf(t.axis[s])?"y":"x"):(i=h,n="z"),t.axis[s]){case"e":u[n]=i;break;case"w":u[n]=-i;break;case"n":u[n]=i;break;case"s":u[n]=-i;break;case"u":void 0!==r[n]&&(u.z=i);break;case"d":void 0!==r[n]&&(u.z=-i);break;default:return null}return u},lt=function(t){var e={x:t[0],y:t[1]};return t.length>2&&(e.z=t[2]),t.length>3&&(e.m=t[3]),e};function ct(t){if("function"==typeof Number.isFinite){if(Number.isFinite(t))return;throw new TypeError("coordinates must be finite numbers")}if("number"!=typeof t||t!=t||!isFinite(t))throw new TypeError("coordinates must be finite numbers")}function ft(t,e,r,i){var n;if(Array.isArray(r)&&(r=lt(r)),function(t){ct(t.x),ct(t.y)}(r),t.datum&&e.datum&&function(t,e){return(1===t.datum.datum_type||2===t.datum.datum_type)&&"WGS84"!==e.datumCode||(1===e.datum.datum_type||2===e.datum.datum_type)&&"WGS84"!==t.datumCode}(t,e)&&(r=ft(t,n=new et("WGS84"),r,i),t=n),i&&"enu"!==t.axis&&(r=ut(t,!1,r)),"longlat"===t.projName)r={x:r.x*s,y:r.y*s,z:r.z||0};else if(t.to_meter&&(r={x:r.x*t.to_meter,y:r.y*t.to_meter,z:r.z||0}),!(r=t.inverse(r)))return;if(t.from_greenwich&&(r.x+=t.from_greenwich),r=st(t.datum,e.datum,r))return e.from_greenwich&&(r={x:r.x-e.from_greenwich,y:r.y,z:r.z||0}),"longlat"===e.projName?r={x:r.x*a,y:r.y*a,z:r.z||0}:(r=e.forward(r),e.to_meter&&(r={x:r.x/e.to_meter,y:r.y/e.to_meter,z:r.z||0})),i&&"enu"!==e.axis?ut(e,!0,r):r}var dt=et("WGS84");function pt(t,e,r,i){var n,s,a;return Array.isArray(r)?(n=ft(t,e,r,i)||{x:NaN,y:NaN},r.length>2?void 0!==t.name&&"geocent"===t.name||void 0!==e.name&&"geocent"===e.name?"number"==typeof n.z?[n.x,n.y,n.z].concat(r.splice(3)):[n.x,n.y,r[2]].concat(r.splice(3)):[n.x,n.y].concat(r.splice(2)):[n.x,n.y]):(s=ft(t,e,r,i),2===(a=Object.keys(r)).length||a.forEach((function(i){if(void 0!==t.name&&"geocent"===t.name||void 0!==e.name&&"geocent"===e.name){if("x"===i||"y"===i||"z"===i)return}else if("x"===i||"y"===i)return;s[i]=r[i]})),s)}function mt(t){return t instanceof et?t:t.oProj?t.oProj:et(t)}var gt=function(t,e,r){t=mt(t);var i,n=!1;return void 0===e?(e=t,t=dt,n=!0):(void 0!==e.x||Array.isArray(e))&&(r=e,e=t,t=dt,n=!0),e=mt(e),r?pt(t,e,r):(i={forward:function(r,i){return pt(t,e,r,i)},inverse:function(r,i){return pt(e,t,r,i)}},n&&(i.oProj=e),i)},yt=73,vt=79,_t={forward:bt,inverse:function(t){var e=kt(Ct(t.toUpperCase()));if(e.lat&&e.lon)return[e.lon,e.lat,e.lon,e.lat];return[e.left,e.bottom,e.right,e.top]},toPoint:wt};function bt(t,e){return e=e||5,function(t,e){var r="00000"+t.easting,i="00000"+t.northing;return t.zoneNumber+t.zoneLetter+(d=t.easting,p=t.northing,m=t.zoneNumber,g=Et(m),y=Math.floor(d/1e5),v=Math.floor(p/1e5)%20,n=y,s=v,a=g,o=a-1,h="AJSAJS".charCodeAt(o),u="AFAFAF".charCodeAt(o),l=h+n-1,c=u+s,f=!1,l>90&&(l=l-90+65-1,f=!0),(l===yt||h<yt&&l>yt||(l>yt||h<yt)&&f)&&l++,(l===vt||h<vt&&l>vt||(l>vt||h<vt)&&f)&&++l===yt&&l++,l>90&&(l=l-90+65-1),c>86?(c=c-86+65-1,f=!0):f=!1,(c===yt||u<yt&&c>yt||(c>yt||u<yt)&&f)&&c++,(c===vt||u<vt&&c>vt||(c>vt||u<vt)&&f)&&++c===yt&&c++,c>86&&(c=c-86+65-1),String.fromCharCode(l)+String.fromCharCode(c))+r.substr(r.length-5,e)+i.substr(i.length-5,e);var n,s,a,o,h,u,l,c,f;var d,p,m,g,y,v}(function(t){var e,r,i,n,s,a,o,h=t.lat,u=t.lon,l=6378137,c=Mt(h),f=Mt(u);o=Math.floor((u+180)/6)+1,180===u&&(o=60);h>=56&&h<64&&u>=3&&u<12&&(o=32);h>=72&&h<84&&(u>=0&&u<9?o=31:u>=9&&u<21?o=33:u>=21&&u<33?o=35:u>=33&&u<42&&(o=37));a=Mt(6*(o-1)-180+3),.006739496752268451,e=l/Math.sqrt(1-.00669438*Math.sin(c)*Math.sin(c)),r=Math.tan(c)*Math.tan(c),i=.006739496752268451*Math.cos(c)*Math.cos(c),n=Math.cos(c)*(f-a),s=l*(.9983242984503243*c-.002514607064228144*Math.sin(2*c)+2639046602129982e-21*Math.sin(4*c)-3.418046101696858e-9*Math.sin(6*c));var d=.9996*e*(n+(1-r+i)*n*n*n/6+(5-18*r+r*r+72*i-.39089081163157013)*n*n*n*n*n/120)+5e5,p=.9996*(s+e*Math.tan(c)*(n*n/2+(5-r+9*i+4*i*i)*n*n*n*n/24+(61-58*r+r*r+600*i-2.2240339282485886)*n*n*n*n*n*n/720));h<0&&(p+=1e7);return{northing:Math.round(p),easting:Math.round(d),zoneNumber:o,zoneLetter:St(h)}}({lat:t[1],lon:t[0]}),e)}function wt(t){var e=kt(Ct(t.toUpperCase()));return e.lat&&e.lon?[e.lon,e.lat]:[(e.left+e.right)/2,(e.top+e.bottom)/2]}function Mt(t){return t*(Math.PI/180)}function xt(t){return t/Math.PI*180}function kt(t){var e=t.northing,r=t.easting,i=t.zoneLetter,n=t.zoneNumber;if(n<0||n>60)return null;var s,a,o,h,u,l,c,f,d=6378137,p=(1-Math.sqrt(.99330562))/(1+Math.sqrt(.99330562)),m=r-5e5,g=e;i<"N"&&(g-=1e7),l=6*(n-1)-180+3,f=(c=g/.9996/6367449.145945056)+(3*p/2-27*p*p*p/32)*Math.sin(2*c)+(21*p*p/16-55*p*p*p*p/32)*Math.sin(4*c)+151*p*p*p/96*Math.sin(6*c),s=d/Math.sqrt(1-.00669438*Math.sin(f)*Math.sin(f)),a=Math.tan(f)*Math.tan(f),o=.006739496752268451*Math.cos(f)*Math.cos(f),h=.99330562*d/Math.pow(1-.00669438*Math.sin(f)*Math.sin(f),1.5),u=m/(.9996*s);var y=f-s*Math.tan(f)/h*(u*u/2-(5+3*a+10*o-4*o*o-.06065547077041606)*u*u*u*u/24+(61+90*a+298*o+45*a*a-1.6983531815716497-3*o*o)*u*u*u*u*u*u/720);y=xt(y);var v,_=(u-(1+2*a+o)*u*u*u/6+(5-2*o+28*a-3*o*o+.05391597401814761+24*a*a)*u*u*u*u*u/120)/Math.cos(f);if(_=l+xt(_),t.accuracy){var b=kt({northing:t.northing+t.accuracy,easting:t.easting+t.accuracy,zoneLetter:t.zoneLetter,zoneNumber:t.zoneNumber});v={top:b.lat,right:b.lon,bottom:y,left:_}}else v={lat:y,lon:_};return v}function St(t){var e="Z";return 84>=t&&t>=72?e="X":72>t&&t>=64?e="W":64>t&&t>=56?e="V":56>t&&t>=48?e="U":48>t&&t>=40?e="T":40>t&&t>=32?e="S":32>t&&t>=24?e="R":24>t&&t>=16?e="Q":16>t&&t>=8?e="P":8>t&&t>=0?e="N":0>t&&t>=-8?e="M":-8>t&&t>=-16?e="L":-16>t&&t>=-24?e="K":-24>t&&t>=-32?e="J":-32>t&&t>=-40?e="H":-40>t&&t>=-48?e="G":-48>t&&t>=-56?e="F":-56>t&&t>=-64?e="E":-64>t&&t>=-72?e="D":-72>t&&t>=-80&&(e="C"),e}function Et(t){var e=t%6;return 0===e&&(e=6),e}function Ct(t){if(t&&0===t.length)throw"MGRSPoint coverting from nothing";for(var e,r=t.length,i=null,n="",s=0;!/[A-Z]/.test(e=t.charAt(s));){if(s>=2)throw"MGRSPoint bad conversion from: "+t;n+=e,s++}var a=parseInt(n,10);if(0===s||s+3>r)throw"MGRSPoint bad conversion from: "+t;var o=t.charAt(s++);if(o<="A"||"B"===o||"Y"===o||o>="Z"||"I"===o||"O"===o)throw"MGRSPoint zone letter "+o+" not handled: "+t;i=t.substring(s,s+=2);for(var h=Et(a),u=function(t,e){var r="AJSAJS".charCodeAt(e-1),i=1e5,n=!1;for(;r!==t.charCodeAt(0);){if(++r===yt&&r++,r===vt&&r++,r>90){if(n)throw"Bad character: "+t;r=65,n=!0}i+=1e5}return i}(i.charAt(0),h),l=function(t,e){if(t>"V")throw"MGRSPoint given invalid Northing "+t;var r="AFAFAF".charCodeAt(e-1),i=0,n=!1;for(;r!==t.charCodeAt(0);){if(++r===yt&&r++,r===vt&&r++,r>86){if(n)throw"Bad character: "+t;r=65,n=!0}i+=1e5}return i}(i.charAt(1),h);l<At(o);)l+=2e6;var c=r-s;if(c%2!=0)throw"MGRSPoint has to have an even number \nof digits after the zone letter and two 100km letters - front \nhalf for easting meters, second half for \nnorthing meters"+t;var f,d,p,m=c/2,g=0,y=0;return m>0&&(f=1e5/Math.pow(10,m),d=t.substring(s,s+m),g=parseFloat(d)*f,p=t.substring(s+m),y=parseFloat(p)*f),{easting:g+u,northing:y+l,zoneLetter:o,zoneNumber:a,accuracy:f}}function At(t){var e;switch(t){case"C":e=11e5;break;case"D":e=2e6;break;case"E":e=28e5;break;case"F":e=37e5;break;case"G":e=46e5;break;case"H":e=55e5;break;case"J":e=64e5;break;case"K":e=73e5;break;case"L":e=82e5;break;case"M":e=91e5;break;case"N":e=0;break;case"P":e=8e5;break;case"Q":e=17e5;break;case"R":e=26e5;break;case"S":e=35e5;break;case"T":e=44e5;break;case"U":e=53e5;break;case"V":e=62e5;break;case"W":e=7e6;break;case"X":e=79e5;break;default:e=-1}if(e>=0)return e;throw"Invalid zone letter: "+t}function Ot(t,e,r){if(!(this instanceof Ot))return new Ot(t,e,r);if(Array.isArray(t))this.x=t[0],this.y=t[1],this.z=t[2]||0;else if("object"==typeof t)this.x=t.x,this.y=t.y,this.z=t.z||0;else if("string"==typeof t&&void 0===e){var i=t.split(",");this.x=parseFloat(i[0],10),this.y=parseFloat(i[1],10),this.z=parseFloat(i[2],10)||0}else this.x=t,this.y=e,this.z=r||0;console.warn("proj4.Point will be removed in version 3, use proj4.toPoint")}Ot.fromMGRS=function(t){return new Ot(wt(t))},Ot.prototype.toMGRS=function(t){return bt([this.x,this.y],t)};var Tt=Ot,It=.01068115234375,Lt=function(t){var e=[];e[0]=1-t*(.25+t*(.046875+t*(.01953125+t*It))),e[1]=t*(.75-t*(.046875+t*(.01953125+t*It)));var r=t*t;return e[2]=r*(.46875-t*(.013020833333333334+.007120768229166667*t)),r*=t,e[3]=r*(.3645833333333333-.005696614583333333*t),e[4]=r*t*.3076171875,e},Pt=function(t,e,r,i){return r*=e,e*=e,i[0]*t-r*(i[1]+e*(i[2]+e*(i[3]+e*i[4])))},Rt=function(t,e,r){for(var i=1/(1-e),n=t,s=20;s;--s){var a=Math.sin(n),o=1-e*a*a;if(n-=o=(Pt(n,a,Math.cos(n),r)-t)*(o*Math.sqrt(o))*i,Math.abs(o)<1e-10)return n}return n};var Nt={init:function(){this.x0=void 0!==this.x0?this.x0:0,this.y0=void 0!==this.y0?this.y0:0,this.long0=void 0!==this.long0?this.long0:0,this.lat0=void 0!==this.lat0?this.lat0:0,this.es&&(this.en=Lt(this.es),this.ml0=Pt(this.lat0,Math.sin(this.lat0),Math.cos(this.lat0),this.en))},forward:function(t){var e,r,i,n=t.x,s=t.y,a=R(n-this.long0),o=Math.sin(s),h=Math.cos(s);if(this.es){var u=h*a,l=Math.pow(u,2),c=this.ep2*Math.pow(h,2),f=Math.pow(c,2),d=Math.abs(h)>1e-10?Math.tan(s):0,p=Math.pow(d,2),m=Math.pow(p,2);e=1-this.es*Math.pow(o,2),u/=Math.sqrt(e);var g=Pt(s,o,h,this.en);r=this.a*(this.k0*u*(1+l/6*(1-p+c+l/20*(5-18*p+m+14*c-58*p*c+l/42*(61+179*m-m*p-479*p)))))+this.x0,i=this.a*(this.k0*(g-this.ml0+o*a*u/2*(1+l/12*(5-p+9*c+4*f+l/30*(61+m-58*p+270*c-330*p*c+l/56*(1385+543*m-m*p-3111*p))))))+this.y0}else{var y=h*Math.sin(a);if(Math.abs(Math.abs(y)-1)<1e-10)return 93;if(r=.5*this.a*this.k0*Math.log((1+y)/(1-y))+this.x0,i=h*Math.cos(a)/Math.sqrt(1-Math.pow(y,2)),(y=Math.abs(i))>=1){if(y-1>1e-10)return 93;i=0}else i=Math.acos(i);s<0&&(i=-i),i=this.a*this.k0*(i-this.lat0)+this.y0}return t.x=r,t.y=i,t},inverse:function(t){var e,r,i,s,a=(t.x-this.x0)*(1/this.a),o=(t.y-this.y0)*(1/this.a);if(this.es)if(e=this.ml0+o/this.k0,r=Rt(e,this.es,this.en),Math.abs(r)<n){var h=Math.sin(r),u=Math.cos(r),l=Math.abs(u)>1e-10?Math.tan(r):0,c=this.ep2*Math.pow(u,2),f=Math.pow(c,2),d=Math.pow(l,2),p=Math.pow(d,2);e=1-this.es*Math.pow(h,2);var m=a*Math.sqrt(e)/this.k0,g=Math.pow(m,2);i=r-(e*=l)*g/(1-this.es)*.5*(1-g/12*(5+3*d-9*c*d+c-4*f-g/30*(61+90*d-252*c*d+45*p+46*c-g/56*(1385+3633*d+4095*p+1574*p*d)))),s=R(this.long0+m*(1-g/6*(1+2*d+c-g/20*(5+28*d+24*p+8*c*d+6*c-g/42*(61+662*d+1320*p+720*p*d))))/u)}else i=n*P(o),s=0;else{var y=Math.exp(a/this.k0),v=.5*(y-1/y),_=this.lat0+o/this.k0,b=Math.cos(_);e=Math.sqrt((1-Math.pow(b,2))/(1+Math.pow(v,2))),i=Math.asin(e),o<0&&(i=-i),s=0===v&&0===b?0:R(Math.atan2(v,b)+this.long0)}return t.x=s,t.y=i,t},names:["Fast_Transverse_Mercator","Fast Transverse Mercator"]},zt=function(t){var e=Math.exp(t);return e=(e-1/e)/2},jt=function(t,e){t=Math.abs(t),e=Math.abs(e);var r=Math.max(t,e),i=Math.min(t,e)/(r||1);return r*Math.sqrt(1+Math.pow(i,2))},Bt=function(t){var e=Math.abs(t);return e=function(t){var e=1+t,r=e-1;return 0===r?t:t*Math.log(e)/r}(e*(1+e/(jt(1,e)+1))),t<0?-e:e},Dt=function(t,e){for(var r,i=2*Math.cos(2*e),n=t.length-1,s=t[n],a=0;--n>=0;)r=i*s-a+t[n],a=s,s=r;return e+r*Math.sin(2*e)},Ut=function(t,e,r){for(var i,n,s=Math.sin(e),a=Math.cos(e),o=zt(r),h=function(t){var e=Math.exp(t);return e=(e+1/e)/2}(r),u=2*a*h,l=-2*s*o,c=t.length-1,f=t[c],d=0,p=0,m=0;--c>=0;)i=p,n=d,f=u*(p=f)-i-l*(d=m)+t[c],m=l*p-n+u*d;return[(u=s*h)*f-(l=a*o)*m,u*m+l*f]};var Ft={init:function(){if(!this.approx&&(isNaN(this.es)||this.es<=0))throw new Error('Incorrect elliptical usage. Try using the +approx option in the proj string, or PROJECTION["Fast_Transverse_Mercator"] in the WKT.');this.approx&&(Nt.init.apply(this),this.forward=Nt.forward,this.inverse=Nt.inverse),this.x0=void 0!==this.x0?this.x0:0,this.y0=void 0!==this.y0?this.y0:0,this.long0=void 0!==this.long0?this.long0:0,this.lat0=void 0!==this.lat0?this.lat0:0,this.cgb=[],this.cbg=[],this.utg=[],this.gtu=[];var t=this.es/(1+Math.sqrt(1-this.es)),e=t/(2-t),r=e;this.cgb[0]=e*(2+e*(-2/3+e*(e*(116/45+e*(26/45+e*(-2854/675)))-2))),this.cbg[0]=e*(e*(2/3+e*(4/3+e*(-82/45+e*(32/45+e*(4642/4725)))))-2),r*=e,this.cgb[1]=r*(7/3+e*(e*(-227/45+e*(2704/315+e*(2323/945)))-1.6)),this.cbg[1]=r*(5/3+e*(-16/15+e*(-13/9+e*(904/315+e*(-1522/945))))),r*=e,this.cgb[2]=r*(56/15+e*(-136/35+e*(-1262/105+e*(73814/2835)))),this.cbg[2]=r*(-26/15+e*(34/21+e*(1.6+e*(-12686/2835)))),r*=e,this.cgb[3]=r*(4279/630+e*(-332/35+e*(-399572/14175))),this.cbg[3]=r*(1237/630+e*(e*(-24832/14175)-2.4)),r*=e,this.cgb[4]=r*(4174/315+e*(-144838/6237)),this.cbg[4]=r*(-734/315+e*(109598/31185)),r*=e,this.cgb[5]=r*(601676/22275),this.cbg[5]=r*(444337/155925),r=Math.pow(e,2),this.Qn=this.k0/(1+e)*(1+r*(1/4+r*(1/64+r/256))),this.utg[0]=e*(e*(2/3+e*(-37/96+e*(1/360+e*(81/512+e*(-96199/604800)))))-.5),this.gtu[0]=e*(.5+e*(-2/3+e*(5/16+e*(41/180+e*(-127/288+e*(7891/37800)))))),this.utg[1]=r*(-1/48+e*(-1/15+e*(437/1440+e*(-46/105+e*(1118711/3870720))))),this.gtu[1]=r*(13/48+e*(e*(557/1440+e*(281/630+e*(-1983433/1935360)))-.6)),r*=e,this.utg[2]=r*(-17/480+e*(37/840+e*(209/4480+e*(-5569/90720)))),this.gtu[2]=r*(61/240+e*(-103/140+e*(15061/26880+e*(167603/181440)))),r*=e,this.utg[3]=r*(-4397/161280+e*(11/504+e*(830251/7257600))),this.gtu[3]=r*(49561/161280+e*(-179/168+e*(6601661/7257600))),r*=e,this.utg[4]=r*(-4583/161280+e*(108847/3991680)),this.gtu[4]=r*(34729/80640+e*(-3418889/1995840)),r*=e,this.utg[5]=r*(-20648693/638668800),this.gtu[5]=.6650675310896665*r;var i=Dt(this.cbg,this.lat0);this.Zb=-this.Qn*(i+function(t,e){for(var r,i=2*Math.cos(e),n=t.length-1,s=t[n],a=0;--n>=0;)r=i*s-a+t[n],a=s,s=r;return Math.sin(e)*r}(this.gtu,2*i))},forward:function(t){var e=R(t.x-this.long0),r=t.y;r=Dt(this.cbg,r);var i=Math.sin(r),n=Math.cos(r),s=Math.sin(e),a=Math.cos(e);r=Math.atan2(i,a*n),e=Math.atan2(s*n,jt(i,n*a)),e=Bt(Math.tan(e));var o,h,u=Ut(this.gtu,2*r,2*e);return r+=u[0],e+=u[1],Math.abs(e)<=2.623395162778?(o=this.a*(this.Qn*e)+this.x0,h=this.a*(this.Qn*r+this.Zb)+this.y0):(o=1/0,h=1/0),t.x=o,t.y=h,t},inverse:function(t){var e,r,i=(t.x-this.x0)*(1/this.a),n=(t.y-this.y0)*(1/this.a);if(n=(n-this.Zb)/this.Qn,i/=this.Qn,Math.abs(i)<=2.623395162778){var s=Ut(this.utg,2*n,2*i);n+=s[0],i+=s[1],i=Math.atan(zt(i));var a=Math.sin(n),o=Math.cos(n),h=Math.sin(i),u=Math.cos(i);n=Math.atan2(a*u,jt(h,u*o)),i=Math.atan2(h,u*o),e=R(i+this.long0),r=Dt(this.cgb,n)}else e=1/0,r=1/0;return t.x=e,t.y=r,t},names:["Extended_Transverse_Mercator","Extended Transverse Mercator","etmerc","Transverse_Mercator","Transverse Mercator","tmerc"]};var qt={init:function(){var t=function(t,e){if(void 0===t){if((t=Math.floor(30*(R(e)+Math.PI)/Math.PI)+1)<0)return 0;if(t>60)return 60}return t}(this.zone,this.long0);if(void 0===t)throw new Error("unknown utm zone");this.lat0=0,this.long0=(6*Math.abs(t)-183)*s,this.x0=5e5,this.y0=this.utmSouth?1e7:0,this.k0=.9996,Ft.init.apply(this),this.forward=Ft.forward,this.inverse=Ft.inverse},names:["Universal Transverse Mercator System","utm"],dependsOn:"etmerc"},Gt=function(t,e){return Math.pow((1-t)/(1+t),e)};var Wt={init:function(){var t=Math.sin(this.lat0),e=Math.cos(this.lat0);e*=e,this.rc=Math.sqrt(1-this.es)/(1-this.es*t*t),this.C=Math.sqrt(1+this.es*e*e/(1-this.es)),this.phic0=Math.asin(t/this.C),this.ratexp=.5*this.C*this.e,this.K=Math.tan(.5*this.phic0+o)/(Math.pow(Math.tan(.5*this.lat0+o),this.C)*Gt(this.e*t,this.ratexp))},forward:function(t){var e=t.x,r=t.y;return t.y=2*Math.atan(this.K*Math.pow(Math.tan(.5*r+o),this.C)*Gt(this.e*Math.sin(r),this.ratexp))-n,t.x=this.C*e,t},inverse:function(t){for(var e=t.x/this.C,r=t.y,i=Math.pow(Math.tan(.5*r+o)/this.K,1/this.C),s=20;s>0&&(r=2*Math.atan(i*Gt(this.e*Math.sin(t.y),-.5*this.e))-n,!(Math.abs(r-t.y)<1e-14));--s)t.y=r;return s?(t.x=e,t.y=r,t):null},names:["gauss"]};var Ht={init:function(){Wt.init.apply(this),this.rc&&(this.sinc0=Math.sin(this.phic0),this.cosc0=Math.cos(this.phic0),this.R2=2*this.rc,this.title||(this.title="Oblique Stereographic Alternative"))},forward:function(t){var e,r,i,n;return t.x=R(t.x-this.long0),Wt.forward.apply(this,[t]),e=Math.sin(t.y),r=Math.cos(t.y),i=Math.cos(t.x),n=this.k0*this.R2/(1+this.sinc0*e+this.cosc0*r*i),t.x=n*r*Math.sin(t.x),t.y=n*(this.cosc0*e-this.sinc0*r*i),t.x=this.a*t.x+this.x0,t.y=this.a*t.y+this.y0,t},inverse:function(t){var e,r,i,n,s;if(t.x=(t.x-this.x0)/this.a,t.y=(t.y-this.y0)/this.a,t.x/=this.k0,t.y/=this.k0,s=Math.sqrt(t.x*t.x+t.y*t.y)){var a=2*Math.atan2(s,this.R2);e=Math.sin(a),r=Math.cos(a),n=Math.asin(r*this.sinc0+t.y*e*this.cosc0/s),i=Math.atan2(t.x*e,s*this.cosc0*r-t.y*this.sinc0*e)}else n=this.phic0,i=0;return t.x=i,t.y=n,Wt.inverse.apply(this,[t]),t.x=R(t.x+this.long0),t},names:["Stereographic_North_Pole","Oblique_Stereographic","Polar_Stereographic","sterea","Oblique Stereographic Alternative","Double_Stereographic"]};var Zt={init:function(){this.coslat0=Math.cos(this.lat0),this.sinlat0=Math.sin(this.lat0),this.sphere?1===this.k0&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=1e-10&&(this.k0=.5*(1+P(this.lat0)*Math.sin(this.lat_ts))):(Math.abs(this.coslat0)<=1e-10&&(this.lat0>0?this.con=1:this.con=-1),this.cons=Math.sqrt(Math.pow(1+this.e,1+this.e)*Math.pow(1-this.e,1-this.e)),1===this.k0&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=1e-10&&(this.k0=.5*this.cons*L(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts))/N(this.e,this.con*this.lat_ts,this.con*Math.sin(this.lat_ts))),this.ms1=L(this.e,this.sinlat0,this.coslat0),this.X0=2*Math.atan(this.ssfn_(this.lat0,this.sinlat0,this.e))-n,this.cosX0=Math.cos(this.X0),this.sinX0=Math.sin(this.X0))},forward:function(t){var e,r,i,s,a,o,h=t.x,u=t.y,l=Math.sin(u),c=Math.cos(u),f=R(h-this.long0);return Math.abs(Math.abs(h-this.long0)-Math.PI)<=1e-10&&Math.abs(u+this.lat0)<=1e-10?(t.x=NaN,t.y=NaN,t):this.sphere?(e=2*this.k0/(1+this.sinlat0*l+this.coslat0*c*Math.cos(f)),t.x=this.a*e*c*Math.sin(f)+this.x0,t.y=this.a*e*(this.coslat0*l-this.sinlat0*c*Math.cos(f))+this.y0,t):(r=2*Math.atan(this.ssfn_(u,l,this.e))-n,s=Math.cos(r),i=Math.sin(r),Math.abs(this.coslat0)<=1e-10?(a=N(this.e,u*this.con,this.con*l),o=2*this.a*this.k0*a/this.cons,t.x=this.x0+o*Math.sin(h-this.long0),t.y=this.y0-this.con*o*Math.cos(h-this.long0),t):(Math.abs(this.sinlat0)<1e-10?(e=2*this.a*this.k0/(1+s*Math.cos(f)),t.y=e*i):(e=2*this.a*this.k0*this.ms1/(this.cosX0*(1+this.sinX0*i+this.cosX0*s*Math.cos(f))),t.y=e*(this.cosX0*i-this.sinX0*s*Math.cos(f))+this.y0),t.x=e*s*Math.sin(f)+this.x0,t))},inverse:function(t){var e,r,i,s,a;t.x-=this.x0,t.y-=this.y0;var o=Math.sqrt(t.x*t.x+t.y*t.y);if(this.sphere){var h=2*Math.atan(o/(2*this.a*this.k0));return e=this.long0,r=this.lat0,o<=1e-10?(t.x=e,t.y=r,t):(r=Math.asin(Math.cos(h)*this.sinlat0+t.y*Math.sin(h)*this.coslat0/o),e=Math.abs(this.coslat0)<1e-10?this.lat0>0?R(this.long0+Math.atan2(t.x,-1*t.y)):R(this.long0+Math.atan2(t.x,t.y)):R(this.long0+Math.atan2(t.x*Math.sin(h),o*this.coslat0*Math.cos(h)-t.y*this.sinlat0*Math.sin(h))),t.x=e,t.y=r,t)}if(Math.abs(this.coslat0)<=1e-10){if(o<=1e-10)return r=this.lat0,e=this.long0,t.x=e,t.y=r,t;t.x*=this.con,t.y*=this.con,i=o*this.cons/(2*this.a*this.k0),r=this.con*z(this.e,i),e=this.con*R(this.con*this.long0+Math.atan2(t.x,-1*t.y))}else s=2*Math.atan(o*this.cosX0/(2*this.a*this.k0*this.ms1)),e=this.long0,o<=1e-10?a=this.X0:(a=Math.asin(Math.cos(s)*this.sinX0+t.y*Math.sin(s)*this.cosX0/o),e=R(this.long0+Math.atan2(t.x*Math.sin(s),o*this.cosX0*Math.cos(s)-t.y*this.sinX0*Math.sin(s)))),r=-1*z(this.e,Math.tan(.5*(n+a)));return t.x=e,t.y=r,t},names:["stere","Stereographic_South_Pole","Polar Stereographic (variant B)"],ssfn_:function(t,e,r){return e*=r,Math.tan(.5*(n+t))*Math.pow((1-e)/(1+e),.5*r)}};var Yt={init:function(){var t=this.lat0;this.lambda0=this.long0;var e=Math.sin(t),r=this.a,i=1/this.rf,n=2*i-Math.pow(i,2),s=this.e=Math.sqrt(n);this.R=this.k0*r*Math.sqrt(1-n)/(1-n*Math.pow(e,2)),this.alpha=Math.sqrt(1+n/(1-n)*Math.pow(Math.cos(t),4)),this.b0=Math.asin(e/this.alpha);var a=Math.log(Math.tan(Math.PI/4+this.b0/2)),o=Math.log(Math.tan(Math.PI/4+t/2)),h=Math.log((1+s*e)/(1-s*e));this.K=a-this.alpha*o+this.alpha*s/2*h},forward:function(t){var e=Math.log(Math.tan(Math.PI/4-t.y/2)),r=this.e/2*Math.log((1+this.e*Math.sin(t.y))/(1-this.e*Math.sin(t.y))),i=-this.alpha*(e+r)+this.K,n=2*(Math.atan(Math.exp(i))-Math.PI/4),s=this.alpha*(t.x-this.lambda0),a=Math.atan(Math.sin(s)/(Math.sin(this.b0)*Math.tan(n)+Math.cos(this.b0)*Math.cos(s))),o=Math.asin(Math.cos(this.b0)*Math.sin(n)-Math.sin(this.b0)*Math.cos(n)*Math.cos(s));return t.y=this.R/2*Math.log((1+Math.sin(o))/(1-Math.sin(o)))+this.y0,t.x=this.R*a+this.x0,t},inverse:function(t){for(var e=t.x-this.x0,r=t.y-this.y0,i=e/this.R,n=2*(Math.atan(Math.exp(r/this.R))-Math.PI/4),s=Math.asin(Math.cos(this.b0)*Math.sin(n)+Math.sin(this.b0)*Math.cos(n)*Math.cos(i)),a=Math.atan(Math.sin(i)/(Math.cos(this.b0)*Math.cos(i)-Math.sin(this.b0)*Math.tan(n))),o=this.lambda0+a/this.alpha,h=0,u=s,l=-1e3,c=0;Math.abs(u-l)>1e-7;){if(++c>20)return;h=1/this.alpha*(Math.log(Math.tan(Math.PI/4+s/2))-this.K)+this.e*Math.log(Math.tan(Math.PI/4+Math.asin(this.e*Math.sin(u))/2)),l=u,u=2*Math.atan(Math.exp(h))-Math.PI/2}return t.x=o,t.y=u,t},names:["somerc"]};var Kt={init:function(){var t,e,r,i,a,u,l,c,f,d,p,m,g,y=0,v=0,_=0,b=0,w=0,M=0,x=0;this.no_off=(g="object"==typeof(m=this).PROJECTION?Object.keys(m.PROJECTION)[0]:m.PROJECTION,"no_uoff"in m||"no_off"in m||-1!==["Hotine_Oblique_Mercator","Hotine_Oblique_Mercator_Azimuth_Natural_Origin"].indexOf(g)),this.no_rot="no_rot"in this;var k=!1;"alpha"in this&&(k=!0);var S=!1;if("rectified_grid_angle"in this&&(S=!0),k&&(x=this.alpha),S&&(y=this.rectified_grid_angle*s),k||S)v=this.longc;else if(_=this.long1,w=this.lat1,b=this.long2,M=this.lat2,Math.abs(w-M)<=1e-7||(t=Math.abs(w))<=1e-7||Math.abs(t-n)<=1e-7||Math.abs(Math.abs(this.lat0)-n)<=1e-7||Math.abs(Math.abs(M)-n)<=1e-7)throw new Error;var E=1-this.es;e=Math.sqrt(E),Math.abs(this.lat0)>1e-10?(c=Math.sin(this.lat0),r=Math.cos(this.lat0),t=1-this.es*c*c,this.B=r*r,this.B=Math.sqrt(1+this.es*this.B*this.B/E),this.A=this.B*this.k0*e/t,(a=(i=this.B*e/(r*Math.sqrt(t)))*i-1)<=0?a=0:(a=Math.sqrt(a),this.lat0<0&&(a=-a)),this.E=a+=i,this.E*=Math.pow(N(this.e,this.lat0,c),this.B)):(this.B=1/e,this.A=this.k0,this.E=i=a=1),k||S?(k?(p=Math.asin(Math.sin(x)/i),S||(y=x)):(p=y,x=Math.asin(i*Math.sin(p))),this.lam0=v-Math.asin(.5*(a-1/a)*Math.tan(p))/this.B):(u=Math.pow(N(this.e,w,Math.sin(w)),this.B),l=Math.pow(N(this.e,M,Math.sin(M)),this.B),a=this.E/u,f=(l-u)/(l+u),d=((d=this.E*this.E)-l*u)/(d+l*u),(t=_-b)<-Math.pi?b-=h:t>Math.pi&&(b+=h),this.lam0=R(.5*(_+b)-Math.atan(d*Math.tan(.5*this.B*(_-b))/f)/this.B),p=Math.atan(2*Math.sin(this.B*R(_-this.lam0))/(a-1/a)),y=x=Math.asin(i*Math.sin(p))),this.singam=Math.sin(p),this.cosgam=Math.cos(p),this.sinrot=Math.sin(y),this.cosrot=Math.cos(y),this.rB=1/this.B,this.ArB=this.A*this.rB,this.BrA=1/this.ArB,this.A,this.B,this.no_off?this.u_0=0:(this.u_0=Math.abs(this.ArB*Math.atan(Math.sqrt(i*i-1)/Math.cos(x))),this.lat0<0&&(this.u_0=-this.u_0)),a=.5*p,this.v_pole_n=this.ArB*Math.log(Math.tan(o-a)),this.v_pole_s=this.ArB*Math.log(Math.tan(o+a))},forward:function(t){var e,r,i,s,a,o,h,u,l={};if(t.x=t.x-this.lam0,Math.abs(Math.abs(t.y)-n)>1e-10){if(e=.5*((a=this.E/Math.pow(N(this.e,t.y,Math.sin(t.y)),this.B))-(o=1/a)),r=.5*(a+o),s=Math.sin(this.B*t.x),i=(e*this.singam-s*this.cosgam)/r,Math.abs(Math.abs(i)-1)<1e-10)throw new Error;u=.5*this.ArB*Math.log((1-i)/(1+i)),o=Math.cos(this.B*t.x),h=Math.abs(o)<1e-7?this.A*t.x:this.ArB*Math.atan2(e*this.cosgam+s*this.singam,o)}else u=t.y>0?this.v_pole_n:this.v_pole_s,h=this.ArB*t.y;return this.no_rot?(l.x=h,l.y=u):(h-=this.u_0,l.x=u*this.cosrot+h*this.sinrot,l.y=h*this.cosrot-u*this.sinrot),l.x=this.a*l.x+this.x0,l.y=this.a*l.y+this.y0,l},inverse:function(t){var e,r,i,s,a,o,h,u={};if(t.x=(t.x-this.x0)*(1/this.a),t.y=(t.y-this.y0)*(1/this.a),this.no_rot?(r=t.y,e=t.x):(r=t.x*this.cosrot-t.y*this.sinrot,e=t.y*this.cosrot+t.x*this.sinrot+this.u_0),s=.5*((i=Math.exp(-this.BrA*r))-1/i),a=.5*(i+1/i),h=((o=Math.sin(this.BrA*e))*this.cosgam+s*this.singam)/a,Math.abs(Math.abs(h)-1)<1e-10)u.x=0,u.y=h<0?-n:n;else{if(u.y=this.E/Math.sqrt((1+h)/(1-h)),u.y=z(this.e,Math.pow(u.y,1/this.B)),u.y===1/0)throw new Error;u.x=-this.rB*Math.atan2(s*this.cosgam-o*this.singam,Math.cos(this.BrA*e))}return u.x+=this.lam0,u},names:["Hotine_Oblique_Mercator","Hotine Oblique Mercator","Hotine_Oblique_Mercator_Azimuth_Natural_Origin","Hotine_Oblique_Mercator_Two_Point_Natural_Origin","Hotine_Oblique_Mercator_Azimuth_Center","Oblique_Mercator","omerc"]};var Xt={init:function(){if(this.lat2||(this.lat2=this.lat1),this.k0||(this.k0=1),this.x0=this.x0||0,this.y0=this.y0||0,!(Math.abs(this.lat1+this.lat2)<1e-10)){var t=this.b/this.a;this.e=Math.sqrt(1-t*t);var e=Math.sin(this.lat1),r=Math.cos(this.lat1),i=L(this.e,e,r),n=N(this.e,this.lat1,e),s=Math.sin(this.lat2),a=Math.cos(this.lat2),o=L(this.e,s,a),h=N(this.e,this.lat2,s),u=N(this.e,this.lat0,Math.sin(this.lat0));Math.abs(this.lat1-this.lat2)>1e-10?this.ns=Math.log(i/o)/Math.log(n/h):this.ns=e,isNaN(this.ns)&&(this.ns=e),this.f0=i/(this.ns*Math.pow(n,this.ns)),this.rh=this.a*this.f0*Math.pow(u,this.ns),this.title||(this.title="Lambert Conformal Conic")}},forward:function(t){var e=t.x,r=t.y;Math.abs(2*Math.abs(r)-Math.PI)<=1e-10&&(r=P(r)*(n-2e-10));var i,s,a=Math.abs(Math.abs(r)-n);if(a>1e-10)i=N(this.e,r,Math.sin(r)),s=this.a*this.f0*Math.pow(i,this.ns);else{if((a=r*this.ns)<=0)return null;s=0}var o=this.ns*R(e-this.long0);return t.x=this.k0*(s*Math.sin(o))+this.x0,t.y=this.k0*(this.rh-s*Math.cos(o))+this.y0,t},inverse:function(t){var e,r,i,s,a,o=(t.x-this.x0)/this.k0,h=this.rh-(t.y-this.y0)/this.k0;this.ns>0?(e=Math.sqrt(o*o+h*h),r=1):(e=-Math.sqrt(o*o+h*h),r=-1);var u=0;if(0!==e&&(u=Math.atan2(r*o,r*h)),0!==e||this.ns>0){if(r=1/this.ns,i=Math.pow(e/(this.a*this.f0),r),-9999===(s=z(this.e,i)))return null}else s=-n;return a=R(u/this.ns+this.long0),t.x=a,t.y=s,t},names:["Lambert Tangential Conformal Conic Projection","Lambert_Conformal_Conic","Lambert_Conformal_Conic_1SP","Lambert_Conformal_Conic_2SP","lcc","Lambert Conic Conformal (1SP)","Lambert Conic Conformal (2SP)"]};var Jt={init:function(){this.a=6377397.155,this.es=.006674372230614,this.e=Math.sqrt(this.es),this.lat0||(this.lat0=.863937979737193),this.long0||(this.long0=.4334234309119251),this.k0||(this.k0=.9999),this.s45=.785398163397448,this.s90=2*this.s45,this.fi0=this.lat0,this.e2=this.es,this.e=Math.sqrt(this.e2),this.alfa=Math.sqrt(1+this.e2*Math.pow(Math.cos(this.fi0),4)/(1-this.e2)),this.uq=1.04216856380474,this.u0=Math.asin(Math.sin(this.fi0)/this.alfa),this.g=Math.pow((1+this.e*Math.sin(this.fi0))/(1-this.e*Math.sin(this.fi0)),this.alfa*this.e/2),this.k=Math.tan(this.u0/2+this.s45)/Math.pow(Math.tan(this.fi0/2+this.s45),this.alfa)*this.g,this.k1=this.k0,this.n0=this.a*Math.sqrt(1-this.e2)/(1-this.e2*Math.pow(Math.sin(this.fi0),2)),this.s0=1.37008346281555,this.n=Math.sin(this.s0),this.ro0=this.k1*this.n0/Math.tan(this.s0),this.ad=this.s90-this.uq},forward:function(t){var e,r,i,n,s,a,o,h=t.x,u=t.y,l=R(h-this.long0);return e=Math.pow((1+this.e*Math.sin(u))/(1-this.e*Math.sin(u)),this.alfa*this.e/2),r=2*(Math.atan(this.k*Math.pow(Math.tan(u/2+this.s45),this.alfa)/e)-this.s45),i=-l*this.alfa,n=Math.asin(Math.cos(this.ad)*Math.sin(r)+Math.sin(this.ad)*Math.cos(r)*Math.cos(i)),s=Math.asin(Math.cos(r)*Math.sin(i)/Math.cos(n)),a=this.n*s,o=this.ro0*Math.pow(Math.tan(this.s0/2+this.s45),this.n)/Math.pow(Math.tan(n/2+this.s45),this.n),t.y=o*Math.cos(a)/1,t.x=o*Math.sin(a)/1,this.czech||(t.y*=-1,t.x*=-1),t},inverse:function(t){var e,r,i,n,s,a,o,h=t.x;t.x=t.y,t.y=h,this.czech||(t.y*=-1,t.x*=-1),s=Math.sqrt(t.x*t.x+t.y*t.y),n=Math.atan2(t.y,t.x)/Math.sin(this.s0),i=2*(Math.atan(Math.pow(this.ro0/s,1/this.n)*Math.tan(this.s0/2+this.s45))-this.s45),e=Math.asin(Math.cos(this.ad)*Math.sin(i)-Math.sin(this.ad)*Math.cos(i)*Math.cos(n)),r=Math.asin(Math.cos(i)*Math.sin(n)/Math.cos(e)),t.x=this.long0-r/this.alfa,a=e,o=0;var u=0;do{t.y=2*(Math.atan(Math.pow(this.k,-1/this.alfa)*Math.pow(Math.tan(e/2+this.s45),1/this.alfa)*Math.pow((1+this.e*Math.sin(a))/(1-this.e*Math.sin(a)),this.e/2))-this.s45),Math.abs(a-t.y)<1e-10&&(o=1),a=t.y,u+=1}while(0===o&&u<15);return u>=15?null:t},names:["Krovak","krovak"]},Qt=function(t,e,r,i,n){return t*n-e*Math.sin(2*n)+r*Math.sin(4*n)-i*Math.sin(6*n)},Vt=function(t){return 1-.25*t*(1+t/16*(3+1.25*t))},$t=function(t){return.375*t*(1+.25*t*(1+.46875*t))},te=function(t){return.05859375*t*t*(1+.75*t)},ee=function(t){return t*t*t*(35/3072)},re=function(t,e,r){var i=e*r;return t/Math.sqrt(1-i*i)},ie=function(t){return Math.abs(t)<n?t:t-P(t)*Math.PI},ne=function(t,e,r,i,n){var s,a;s=t/e;for(var o=0;o<15;o++)if(s+=a=(t-(e*s-r*Math.sin(2*s)+i*Math.sin(4*s)-n*Math.sin(6*s)))/(e-2*r*Math.cos(2*s)+4*i*Math.cos(4*s)-6*n*Math.cos(6*s)),Math.abs(a)<=1e-10)return s;return NaN};var se={init:function(){this.sphere||(this.e0=Vt(this.es),this.e1=$t(this.es),this.e2=te(this.es),this.e3=ee(this.es),this.ml0=this.a*Qt(this.e0,this.e1,this.e2,this.e3,this.lat0))},forward:function(t){var e,r,i=t.x,n=t.y;if(i=R(i-this.long0),this.sphere)e=this.a*Math.asin(Math.cos(n)*Math.sin(i)),r=this.a*(Math.atan2(Math.tan(n),Math.cos(i))-this.lat0);else{var s=Math.sin(n),a=Math.cos(n),o=re(this.a,this.e,s),h=Math.tan(n)*Math.tan(n),u=i*Math.cos(n),l=u*u,c=this.es*a*a/(1-this.es);e=o*u*(1-l*h*(1/6-(8-h+8*c)*l/120)),r=this.a*Qt(this.e0,this.e1,this.e2,this.e3,n)-this.ml0+o*s/a*l*(.5+(5-h+6*c)*l/24)}return t.x=e+this.x0,t.y=r+this.y0,t},inverse:function(t){t.x-=this.x0,t.y-=this.y0;var e,r,i=t.x/this.a,s=t.y/this.a;if(this.sphere){var a=s+this.lat0;e=Math.asin(Math.sin(a)*Math.cos(i)),r=Math.atan2(Math.tan(i),Math.cos(a))}else{var o=this.ml0/this.a+s,h=ne(o,this.e0,this.e1,this.e2,this.e3);if(Math.abs(Math.abs(h)-n)<=1e-10)return t.x=this.long0,t.y=n,s<0&&(t.y*=-1),t;var u=re(this.a,this.e,Math.sin(h)),l=u*u*u/this.a/this.a*(1-this.es),c=Math.pow(Math.tan(h),2),f=i*this.a/u,d=f*f;e=h-u*Math.tan(h)/l*f*f*(.5-(1+3*c)*f*f/24),r=f*(1-d*(c/3+(1+3*c)*c*d/15))/Math.cos(h)}return t.x=R(r+this.long0),t.y=ie(e),t},names:["Cassini","Cassini_Soldner","cass"]},ae=function(t,e){var r;return t>1e-7?(1-t*t)*(e/(1-(r=t*e)*r)-.5/t*Math.log((1-r)/(1+r))):2*e};var oe={init:function(){var t,e=Math.abs(this.lat0);if(Math.abs(e-n)<1e-10?this.mode=this.lat0<0?this.S_POLE:this.N_POLE:Math.abs(e)<1e-10?this.mode=this.EQUIT:this.mode=this.OBLIQ,this.es>0)switch(this.qp=ae(this.e,1),this.mmf=.5/(1-this.es),this.apa=function(t){var e,r=[];return r[0]=.3333333333333333*t,e=t*t,r[0]+=.17222222222222222*e,r[1]=.06388888888888888*e,e*=t,r[0]+=.10257936507936508*e,r[1]+=.0664021164021164*e,r[2]=.016415012942191543*e,r}(this.es),this.mode){case this.N_POLE:case this.S_POLE:this.dd=1;break;case this.EQUIT:this.rq=Math.sqrt(.5*this.qp),this.dd=1/this.rq,this.xmf=1,this.ymf=.5*this.qp;break;case this.OBLIQ:this.rq=Math.sqrt(.5*this.qp),t=Math.sin(this.lat0),this.sinb1=ae(this.e,t)/this.qp,this.cosb1=Math.sqrt(1-this.sinb1*this.sinb1),this.dd=Math.cos(this.lat0)/(Math.sqrt(1-this.es*t*t)*this.rq*this.cosb1),this.ymf=(this.xmf=this.rq)/this.dd,this.xmf*=this.dd}else this.mode===this.OBLIQ&&(this.sinph0=Math.sin(this.lat0),this.cosph0=Math.cos(this.lat0))},forward:function(t){var e,r,i,s,a,h,u,l,c,f,d=t.x,p=t.y;if(d=R(d-this.long0),this.sphere){if(a=Math.sin(p),f=Math.cos(p),i=Math.cos(d),this.mode===this.OBLIQ||this.mode===this.EQUIT){if((r=this.mode===this.EQUIT?1+f*i:1+this.sinph0*a+this.cosph0*f*i)<=1e-10)return null;e=(r=Math.sqrt(2/r))*f*Math.sin(d),r*=this.mode===this.EQUIT?a:this.cosph0*a-this.sinph0*f*i}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(i=-i),Math.abs(p+this.lat0)<1e-10)return null;r=o-.5*p,e=(r=2*(this.mode===this.S_POLE?Math.cos(r):Math.sin(r)))*Math.sin(d),r*=i}}else{switch(u=0,l=0,c=0,i=Math.cos(d),s=Math.sin(d),a=Math.sin(p),h=ae(this.e,a),this.mode!==this.OBLIQ&&this.mode!==this.EQUIT||(u=h/this.qp,l=Math.sqrt(1-u*u)),this.mode){case this.OBLIQ:c=1+this.sinb1*u+this.cosb1*l*i;break;case this.EQUIT:c=1+l*i;break;case this.N_POLE:c=n+p,h=this.qp-h;break;case this.S_POLE:c=p-n,h=this.qp+h}if(Math.abs(c)<1e-10)return null;switch(this.mode){case this.OBLIQ:case this.EQUIT:c=Math.sqrt(2/c),r=this.mode===this.OBLIQ?this.ymf*c*(this.cosb1*u-this.sinb1*l*i):(c=Math.sqrt(2/(1+l*i)))*u*this.ymf,e=this.xmf*c*l*s;break;case this.N_POLE:case this.S_POLE:h>=0?(e=(c=Math.sqrt(h))*s,r=i*(this.mode===this.S_POLE?c:-c)):e=r=0}}return t.x=this.a*e+this.x0,t.y=this.a*r+this.y0,t},inverse:function(t){t.x-=this.x0,t.y-=this.y0;var e,r,i,s,a,o,h,u,l,c,f=t.x/this.a,d=t.y/this.a;if(this.sphere){var p,m=0,g=0;if((r=.5*(p=Math.sqrt(f*f+d*d)))>1)return null;switch(r=2*Math.asin(r),this.mode!==this.OBLIQ&&this.mode!==this.EQUIT||(g=Math.sin(r),m=Math.cos(r)),this.mode){case this.EQUIT:r=Math.abs(p)<=1e-10?0:Math.asin(d*g/p),f*=g,d=m*p;break;case this.OBLIQ:r=Math.abs(p)<=1e-10?this.lat0:Math.asin(m*this.sinph0+d*g*this.cosph0/p),f*=g*this.cosph0,d=(m-Math.sin(r)*this.sinph0)*p;break;case this.N_POLE:d=-d,r=n-r;break;case this.S_POLE:r-=n}e=0!==d||this.mode!==this.EQUIT&&this.mode!==this.OBLIQ?Math.atan2(f,d):0}else{if(h=0,this.mode===this.OBLIQ||this.mode===this.EQUIT){if(f/=this.dd,d*=this.dd,(o=Math.sqrt(f*f+d*d))<1e-10)return t.x=this.long0,t.y=this.lat0,t;s=2*Math.asin(.5*o/this.rq),i=Math.cos(s),f*=s=Math.sin(s),this.mode===this.OBLIQ?(h=i*this.sinb1+d*s*this.cosb1/o,a=this.qp*h,d=o*this.cosb1*i-d*this.sinb1*s):(h=d*s/o,a=this.qp*h,d=o*i)}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(d=-d),!(a=f*f+d*d))return t.x=this.long0,t.y=this.lat0,t;h=1-a/this.qp,this.mode===this.S_POLE&&(h=-h)}e=Math.atan2(f,d),u=Math.asin(h),l=this.apa,c=u+u,r=u+l[0]*Math.sin(c)+l[1]*Math.sin(c+c)+l[2]*Math.sin(c+c+c)}return t.x=R(this.long0+e),t.y=r,t},names:["Lambert Azimuthal Equal Area","Lambert_Azimuthal_Equal_Area","laea"],S_POLE:1,N_POLE:2,EQUIT:3,OBLIQ:4},he=function(t){return Math.abs(t)>1&&(t=t>1?1:-1),Math.asin(t)};var ue={init:function(){Math.abs(this.lat1+this.lat2)<1e-10||(this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e3=Math.sqrt(this.es),this.sin_po=Math.sin(this.lat1),this.cos_po=Math.cos(this.lat1),this.t1=this.sin_po,this.con=this.sin_po,this.ms1=L(this.e3,this.sin_po,this.cos_po),this.qs1=ae(this.e3,this.sin_po,this.cos_po),this.sin_po=Math.sin(this.lat2),this.cos_po=Math.cos(this.lat2),this.t2=this.sin_po,this.ms2=L(this.e3,this.sin_po,this.cos_po),this.qs2=ae(this.e3,this.sin_po,this.cos_po),this.sin_po=Math.sin(this.lat0),this.cos_po=Math.cos(this.lat0),this.t3=this.sin_po,this.qs0=ae(this.e3,this.sin_po,this.cos_po),Math.abs(this.lat1-this.lat2)>1e-10?this.ns0=(this.ms1*this.ms1-this.ms2*this.ms2)/(this.qs2-this.qs1):this.ns0=this.con,this.c=this.ms1*this.ms1+this.ns0*this.qs1,this.rh=this.a*Math.sqrt(this.c-this.ns0*this.qs0)/this.ns0)},forward:function(t){var e=t.x,r=t.y;this.sin_phi=Math.sin(r),this.cos_phi=Math.cos(r);var i=ae(this.e3,this.sin_phi,this.cos_phi),n=this.a*Math.sqrt(this.c-this.ns0*i)/this.ns0,s=this.ns0*R(e-this.long0),a=n*Math.sin(s)+this.x0,o=this.rh-n*Math.cos(s)+this.y0;return t.x=a,t.y=o,t},inverse:function(t){var e,r,i,n,s,a;return t.x-=this.x0,t.y=this.rh-t.y+this.y0,this.ns0>=0?(e=Math.sqrt(t.x*t.x+t.y*t.y),i=1):(e=-Math.sqrt(t.x*t.x+t.y*t.y),i=-1),n=0,0!==e&&(n=Math.atan2(i*t.x,i*t.y)),i=e*this.ns0/this.a,this.sphere?a=Math.asin((this.c-i*i)/(2*this.ns0)):(r=(this.c-i*i)/this.ns0,a=this.phi1z(this.e3,r)),s=R(n/this.ns0+this.long0),t.x=s,t.y=a,t},names:["Albers_Conic_Equal_Area","Albers","aea"],phi1z:function(t,e){var r,i,n,s,a=he(.5*e);if(t<1e-10)return a;for(var o=t*t,h=1;h<=25;h++)if(a+=s=.5*(n=1-(i=t*(r=Math.sin(a)))*i)*n/Math.cos(a)*(e/(1-o)-r/n+.5/t*Math.log((1-i)/(1+i))),Math.abs(s)<=1e-7)return a;return null}};var le={init:function(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0),this.infinity_dist=1e3*this.a,this.rc=1},forward:function(t){var e,r,i,n,s,a,o,h=t.x,u=t.y;return i=R(h-this.long0),e=Math.sin(u),r=Math.cos(u),n=Math.cos(i),1,(s=this.sin_p14*e+this.cos_p14*r*n)>0||Math.abs(s)<=1e-10?(a=this.x0+1*this.a*r*Math.sin(i)/s,o=this.y0+1*this.a*(this.cos_p14*e-this.sin_p14*r*n)/s):(a=this.x0+this.infinity_dist*r*Math.sin(i),o=this.y0+this.infinity_dist*(this.cos_p14*e-this.sin_p14*r*n)),t.x=a,t.y=o,t},inverse:function(t){var e,r,i,n,s,a;return t.x=(t.x-this.x0)/this.a,t.y=(t.y-this.y0)/this.a,t.x/=this.k0,t.y/=this.k0,(e=Math.sqrt(t.x*t.x+t.y*t.y))?(n=Math.atan2(e,this.rc),r=Math.sin(n),i=Math.cos(n),a=he(i*this.sin_p14+t.y*r*this.cos_p14/e),s=Math.atan2(t.x*r,e*this.cos_p14*i-t.y*this.sin_p14*r),s=R(this.long0+s)):(a=this.phic0,s=0),t.x=s,t.y=a,t},names:["gnom"]};var ce={init:function(){this.sphere||(this.k0=L(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)))},forward:function(t){var e,r,i=t.x,n=t.y,s=R(i-this.long0);if(this.sphere)e=this.x0+this.a*s*Math.cos(this.lat_ts),r=this.y0+this.a*Math.sin(n)/Math.cos(this.lat_ts);else{var a=ae(this.e,Math.sin(n));e=this.x0+this.a*this.k0*s,r=this.y0+this.a*a*.5/this.k0}return t.x=e,t.y=r,t},inverse:function(t){var e,r;return t.x-=this.x0,t.y-=this.y0,this.sphere?(e=R(this.long0+t.x/this.a/Math.cos(this.lat_ts)),r=Math.asin(t.y/this.a*Math.cos(this.lat_ts))):(r=function(t,e){var r=1-(1-t*t)/(2*t)*Math.log((1-t)/(1+t));if(Math.abs(Math.abs(e)-r)<1e-6)return e<0?-1*n:n;for(var i,s,a,o,h=Math.asin(.5*e),u=0;u<30;u++)if(s=Math.sin(h),a=Math.cos(h),o=t*s,h+=i=Math.pow(1-o*o,2)/(2*a)*(e/(1-t*t)-s/(1-o*o)+.5/t*Math.log((1-o)/(1+o))),Math.abs(i)<=1e-10)return h;return NaN}(this.e,2*t.y*this.k0/this.a),e=R(this.long0+t.x/(this.a*this.k0))),t.x=e,t.y=r,t},names:["cea"]};var fe={init:function(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Equidistant Cylindrical (Plate Carre)",this.rc=Math.cos(this.lat_ts)},forward:function(t){var e=t.x,r=t.y,i=R(e-this.long0),n=ie(r-this.lat0);return t.x=this.x0+this.a*i*this.rc,t.y=this.y0+this.a*n,t},inverse:function(t){var e=t.x,r=t.y;return t.x=R(this.long0+(e-this.x0)/(this.a*this.rc)),t.y=ie(this.lat0+(r-this.y0)/this.a),t},names:["Equirectangular","Equidistant_Cylindrical","eqc"]};var de={init:function(){this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=Vt(this.es),this.e1=$t(this.es),this.e2=te(this.es),this.e3=ee(this.es),this.ml0=this.a*Qt(this.e0,this.e1,this.e2,this.e3,this.lat0)},forward:function(t){var e,r,i,n=t.x,s=t.y,a=R(n-this.long0);if(i=a*Math.sin(s),this.sphere)Math.abs(s)<=1e-10?(e=this.a*a,r=-1*this.a*this.lat0):(e=this.a*Math.sin(i)/Math.tan(s),r=this.a*(ie(s-this.lat0)+(1-Math.cos(i))/Math.tan(s)));else if(Math.abs(s)<=1e-10)e=this.a*a,r=-1*this.ml0;else{var o=re(this.a,this.e,Math.sin(s))/Math.tan(s);e=o*Math.sin(i),r=this.a*Qt(this.e0,this.e1,this.e2,this.e3,s)-this.ml0+o*(1-Math.cos(i))}return t.x=e+this.x0,t.y=r+this.y0,t},inverse:function(t){var e,r,i,n,s,a,o,h,u;if(i=t.x-this.x0,n=t.y-this.y0,this.sphere)if(Math.abs(n+this.a*this.lat0)<=1e-10)e=R(i/this.a+this.long0),r=0;else{var l;for(a=this.lat0+n/this.a,o=i*i/this.a/this.a+a*a,h=a,s=20;s;--s)if(h+=u=-1*(a*(h*(l=Math.tan(h))+1)-h-.5*(h*h+o)*l)/((h-a)/l-1),Math.abs(u)<=1e-10){r=h;break}e=R(this.long0+Math.asin(i*Math.tan(h)/this.a)/Math.sin(r))}else if(Math.abs(n+this.ml0)<=1e-10)r=0,e=R(this.long0+i/this.a);else{var c,f,d,p,m;for(a=(this.ml0+n)/this.a,o=i*i/this.a/this.a+a*a,h=a,s=20;s;--s)if(m=this.e*Math.sin(h),c=Math.sqrt(1-m*m)*Math.tan(h),f=this.a*Qt(this.e0,this.e1,this.e2,this.e3,h),d=this.e0-2*this.e1*Math.cos(2*h)+4*this.e2*Math.cos(4*h)-6*this.e3*Math.cos(6*h),h-=u=(a*(c*(p=f/this.a)+1)-p-.5*c*(p*p+o))/(this.es*Math.sin(2*h)*(p*p+o-2*a*p)/(4*c)+(a-p)*(c*d-2/Math.sin(2*h))-d),Math.abs(u)<=1e-10){r=h;break}c=Math.sqrt(1-this.es*Math.pow(Math.sin(r),2))*Math.tan(r),e=R(this.long0+Math.asin(i*c/this.a)/Math.sin(r))}return t.x=e,t.y=r,t},names:["Polyconic","poly"]};var pe={init:function(){this.A=[],this.A[1]=.6399175073,this.A[2]=-.1358797613,this.A[3]=.063294409,this.A[4]=-.02526853,this.A[5]=.0117879,this.A[6]=-.0055161,this.A[7]=.0026906,this.A[8]=-.001333,this.A[9]=67e-5,this.A[10]=-34e-5,this.B_re=[],this.B_im=[],this.B_re[1]=.7557853228,this.B_im[1]=0,this.B_re[2]=.249204646,this.B_im[2]=.003371507,this.B_re[3]=-.001541739,this.B_im[3]=.04105856,this.B_re[4]=-.10162907,this.B_im[4]=.01727609,this.B_re[5]=-.26623489,this.B_im[5]=-.36249218,this.B_re[6]=-.6870983,this.B_im[6]=-1.1651967,this.C_re=[],this.C_im=[],this.C_re[1]=1.3231270439,this.C_im[1]=0,this.C_re[2]=-.577245789,this.C_im[2]=-.007809598,this.C_re[3]=.508307513,this.C_im[3]=-.112208952,this.C_re[4]=-.15094762,this.C_im[4]=.18200602,this.C_re[5]=1.01418179,this.C_im[5]=1.64497696,this.C_re[6]=1.9660549,this.C_im[6]=2.5127645,this.D=[],this.D[1]=1.5627014243,this.D[2]=.5185406398,this.D[3]=-.03333098,this.D[4]=-.1052906,this.D[5]=-.0368594,this.D[6]=.007317,this.D[7]=.0122,this.D[8]=.00394,this.D[9]=-.0013},forward:function(t){var e,r=t.x,n=t.y-this.lat0,s=r-this.long0,a=n/i*1e-5,o=s,h=1,u=0;for(e=1;e<=10;e++)h*=a,u+=this.A[e]*h;var l,c=u,f=o,d=1,p=0,m=0,g=0;for(e=1;e<=6;e++)l=p*c+d*f,d=d*c-p*f,p=l,m=m+this.B_re[e]*d-this.B_im[e]*p,g=g+this.B_im[e]*d+this.B_re[e]*p;return t.x=g*this.a+this.x0,t.y=m*this.a+this.y0,t},inverse:function(t){var e,r,n=t.x,s=t.y,a=n-this.x0,o=(s-this.y0)/this.a,h=a/this.a,u=1,l=0,c=0,f=0;for(e=1;e<=6;e++)r=l*o+u*h,u=u*o-l*h,l=r,c=c+this.C_re[e]*u-this.C_im[e]*l,f=f+this.C_im[e]*u+this.C_re[e]*l;for(var d=0;d<this.iterations;d++){var p,m=c,g=f,y=o,v=h;for(e=2;e<=6;e++)p=g*c+m*f,m=m*c-g*f,g=p,y+=(e-1)*(this.B_re[e]*m-this.B_im[e]*g),v+=(e-1)*(this.B_im[e]*m+this.B_re[e]*g);m=1,g=0;var _=this.B_re[1],b=this.B_im[1];for(e=2;e<=6;e++)p=g*c+m*f,m=m*c-g*f,g=p,_+=e*(this.B_re[e]*m-this.B_im[e]*g),b+=e*(this.B_im[e]*m+this.B_re[e]*g);var w=_*_+b*b;c=(y*_+v*b)/w,f=(v*_-y*b)/w}var M=c,x=f,k=1,S=0;for(e=1;e<=9;e++)k*=M,S+=this.D[e]*k;var E=this.lat0+S*i*1e5,C=this.long0+x;return t.x=C,t.y=E,t},names:["New_Zealand_Map_Grid","nzmg"]};var me={init:function(){},forward:function(t){var e=t.x,r=t.y,i=R(e-this.long0),n=this.x0+this.a*i,s=this.y0+this.a*Math.log(Math.tan(Math.PI/4+r/2.5))*1.25;return t.x=n,t.y=s,t},inverse:function(t){t.x-=this.x0,t.y-=this.y0;var e=R(this.long0+t.x/this.a),r=2.5*(Math.atan(Math.exp(.8*t.y/this.a))-Math.PI/4);return t.x=e,t.y=r,t},names:["Miller_Cylindrical","mill"]};var ge={init:function(){this.sphere?(this.n=1,this.m=0,this.es=0,this.C_y=Math.sqrt((this.m+1)/this.n),this.C_x=this.C_y/(this.m+1)):this.en=Lt(this.es)},forward:function(t){var e,r,i=t.x,n=t.y;if(i=R(i-this.long0),this.sphere){if(this.m)for(var s=this.n*Math.sin(n),a=20;a;--a){var o=(this.m*n+Math.sin(n)-s)/(this.m+Math.cos(n));if(n-=o,Math.abs(o)<1e-10)break}else n=1!==this.n?Math.asin(this.n*Math.sin(n)):n;e=this.a*this.C_x*i*(this.m+Math.cos(n)),r=this.a*this.C_y*n}else{var h=Math.sin(n),u=Math.cos(n);r=this.a*Pt(n,h,u,this.en),e=this.a*i*u/Math.sqrt(1-this.es*h*h)}return t.x=e,t.y=r,t},inverse:function(t){var e,r,i,s;return t.x-=this.x0,i=t.x/this.a,t.y-=this.y0,e=t.y/this.a,this.sphere?(e/=this.C_y,i/=this.C_x*(this.m+Math.cos(e)),this.m?e=he((this.m*e+Math.sin(e))/this.n):1!==this.n&&(e=he(Math.sin(e)/this.n)),i=R(i+this.long0),e=ie(e)):(e=Rt(t.y/this.a,this.es,this.en),(s=Math.abs(e))<n?(s=Math.sin(e),r=this.long0+t.x*Math.sqrt(1-this.es*s*s)/(this.a*Math.cos(e)),i=R(r)):s-1e-10<n&&(i=this.long0)),t.x=i,t.y=e,t},names:["Sinusoidal","sinu"]};var ye={init:function(){},forward:function(t){for(var e=t.x,r=t.y,i=R(e-this.long0),n=r,s=Math.PI*Math.sin(r);;){var a=-(n+Math.sin(n)-s)/(1+Math.cos(n));if(n+=a,Math.abs(a)<1e-10)break}n/=2,Math.PI/2-Math.abs(r)<1e-10&&(i=0);var o=.900316316158*this.a*i*Math.cos(n)+this.x0,h=1.4142135623731*this.a*Math.sin(n)+this.y0;return t.x=o,t.y=h,t},inverse:function(t){var e,r;t.x-=this.x0,t.y-=this.y0,r=t.y/(1.4142135623731*this.a),Math.abs(r)>.999999999999&&(r=.999999999999),e=Math.asin(r);var i=R(this.long0+t.x/(.900316316158*this.a*Math.cos(e)));i<-Math.PI&&(i=-Math.PI),i>Math.PI&&(i=Math.PI),r=(2*e+Math.sin(2*e))/Math.PI,Math.abs(r)>1&&(r=1);var n=Math.asin(r);return t.x=i,t.y=n,t},names:["Mollweide","moll"]};var ve={init:function(){Math.abs(this.lat1+this.lat2)<1e-10||(this.lat2=this.lat2||this.lat1,this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=Vt(this.es),this.e1=$t(this.es),this.e2=te(this.es),this.e3=ee(this.es),this.sinphi=Math.sin(this.lat1),this.cosphi=Math.cos(this.lat1),this.ms1=L(this.e,this.sinphi,this.cosphi),this.ml1=Qt(this.e0,this.e1,this.e2,this.e3,this.lat1),Math.abs(this.lat1-this.lat2)<1e-10?this.ns=this.sinphi:(this.sinphi=Math.sin(this.lat2),this.cosphi=Math.cos(this.lat2),this.ms2=L(this.e,this.sinphi,this.cosphi),this.ml2=Qt(this.e0,this.e1,this.e2,this.e3,this.lat2),this.ns=(this.ms1-this.ms2)/(this.ml2-this.ml1)),this.g=this.ml1+this.ms1/this.ns,this.ml0=Qt(this.e0,this.e1,this.e2,this.e3,this.lat0),this.rh=this.a*(this.g-this.ml0))},forward:function(t){var e,r=t.x,i=t.y;if(this.sphere)e=this.a*(this.g-i);else{var n=Qt(this.e0,this.e1,this.e2,this.e3,i);e=this.a*(this.g-n)}var s=this.ns*R(r-this.long0),a=this.x0+e*Math.sin(s),o=this.y0+this.rh-e*Math.cos(s);return t.x=a,t.y=o,t},inverse:function(t){var e,r,i,n;t.x-=this.x0,t.y=this.rh-t.y+this.y0,this.ns>=0?(r=Math.sqrt(t.x*t.x+t.y*t.y),e=1):(r=-Math.sqrt(t.x*t.x+t.y*t.y),e=-1);var s=0;if(0!==r&&(s=Math.atan2(e*t.x,e*t.y)),this.sphere)return n=R(this.long0+s/this.ns),i=ie(this.g-r/this.a),t.x=n,t.y=i,t;var a=this.g-r/this.a;return i=ne(a,this.e0,this.e1,this.e2,this.e3),n=R(this.long0+s/this.ns),t.x=n,t.y=i,t},names:["Equidistant_Conic","eqdc"]};var _e={init:function(){this.R=this.a},forward:function(t){var e,r,i=t.x,s=t.y,a=R(i-this.long0);Math.abs(s)<=1e-10&&(e=this.x0+this.R*a,r=this.y0);var o=he(2*Math.abs(s/Math.PI));(Math.abs(a)<=1e-10||Math.abs(Math.abs(s)-n)<=1e-10)&&(e=this.x0,r=s>=0?this.y0+Math.PI*this.R*Math.tan(.5*o):this.y0+Math.PI*this.R*-Math.tan(.5*o));var h=.5*Math.abs(Math.PI/a-a/Math.PI),u=h*h,l=Math.sin(o),c=Math.cos(o),f=c/(l+c-1),d=f*f,p=f*(2/l-1),m=p*p,g=Math.PI*this.R*(h*(f-m)+Math.sqrt(u*(f-m)*(f-m)-(m+u)*(d-m)))/(m+u);a<0&&(g=-g),e=this.x0+g;var y=u+f;return g=Math.PI*this.R*(p*y-h*Math.sqrt((m+u)*(u+1)-y*y))/(m+u),r=s>=0?this.y0+g:this.y0-g,t.x=e,t.y=r,t},inverse:function(t){var e,r,i,n,s,a,o,h,u,l,c,f;return t.x-=this.x0,t.y-=this.y0,c=Math.PI*this.R,s=(i=t.x/c)*i+(n=t.y/c)*n,c=3*(n*n/(h=-2*(a=-Math.abs(n)*(1+s))+1+2*n*n+s*s)+(2*(o=a-2*n*n+i*i)*o*o/h/h/h-9*a*o/h/h)/27)/(u=(a-o*o/3/h)/h)/(l=2*Math.sqrt(-u/3)),Math.abs(c)>1&&(c=c>=0?1:-1),f=Math.acos(c)/3,r=t.y>=0?(-l*Math.cos(f+Math.PI/3)-o/3/h)*Math.PI:-(-l*Math.cos(f+Math.PI/3)-o/3/h)*Math.PI,e=Math.abs(i)<1e-10?this.long0:R(this.long0+Math.PI*(s-1+Math.sqrt(1+2*(i*i-n*n)+s*s))/2/i),t.x=e,t.y=r,t},names:["Van_der_Grinten_I","VanDerGrinten","vandg"]};var be={init:function(){this.sin_p12=Math.sin(this.lat0),this.cos_p12=Math.cos(this.lat0)},forward:function(t){var e,r,i,s,a,o,h,u,l,c,f,d,p,m,g,y,v,_,b,w,M,x,k=t.x,S=t.y,E=Math.sin(t.y),C=Math.cos(t.y),A=R(k-this.long0);return this.sphere?Math.abs(this.sin_p12-1)<=1e-10?(t.x=this.x0+this.a*(n-S)*Math.sin(A),t.y=this.y0-this.a*(n-S)*Math.cos(A),t):Math.abs(this.sin_p12+1)<=1e-10?(t.x=this.x0+this.a*(n+S)*Math.sin(A),t.y=this.y0+this.a*(n+S)*Math.cos(A),t):(_=this.sin_p12*E+this.cos_p12*C*Math.cos(A),v=(y=Math.acos(_))?y/Math.sin(y):1,t.x=this.x0+this.a*v*C*Math.sin(A),t.y=this.y0+this.a*v*(this.cos_p12*E-this.sin_p12*C*Math.cos(A)),t):(e=Vt(this.es),r=$t(this.es),i=te(this.es),s=ee(this.es),Math.abs(this.sin_p12-1)<=1e-10?(a=this.a*Qt(e,r,i,s,n),o=this.a*Qt(e,r,i,s,S),t.x=this.x0+(a-o)*Math.sin(A),t.y=this.y0-(a-o)*Math.cos(A),t):Math.abs(this.sin_p12+1)<=1e-10?(a=this.a*Qt(e,r,i,s,n),o=this.a*Qt(e,r,i,s,S),t.x=this.x0+(a+o)*Math.sin(A),t.y=this.y0+(a+o)*Math.cos(A),t):(h=E/C,u=re(this.a,this.e,this.sin_p12),l=re(this.a,this.e,E),c=Math.atan((1-this.es)*h+this.es*u*this.sin_p12/(l*C)),b=0===(f=Math.atan2(Math.sin(A),this.cos_p12*Math.tan(c)-this.sin_p12*Math.cos(A)))?Math.asin(this.cos_p12*Math.sin(c)-this.sin_p12*Math.cos(c)):Math.abs(Math.abs(f)-Math.PI)<=1e-10?-Math.asin(this.cos_p12*Math.sin(c)-this.sin_p12*Math.cos(c)):Math.asin(Math.sin(A)*Math.cos(c)/Math.sin(f)),d=this.e*this.sin_p12/Math.sqrt(1-this.es),y=u*b*(1-(w=b*b)*(g=(p=this.e*this.cos_p12*Math.cos(f)/Math.sqrt(1-this.es))*p)*(1-g)/6+(M=w*b)/8*(m=d*p)*(1-2*g)+(x=M*b)/120*(g*(4-7*g)-3*d*d*(1-7*g))-x*b/48*m),t.x=this.x0+y*Math.sin(f),t.y=this.y0+y*Math.cos(f),t))},inverse:function(t){var e,r,i,s,a,o,h,u,l,c,f,d,p,m,g,y,v,_,b,w,M,x,k;if(t.x-=this.x0,t.y-=this.y0,this.sphere){if((e=Math.sqrt(t.x*t.x+t.y*t.y))>2*n*this.a)return;return r=e/this.a,i=Math.sin(r),s=Math.cos(r),a=this.long0,Math.abs(e)<=1e-10?o=this.lat0:(o=he(s*this.sin_p12+t.y*i*this.cos_p12/e),h=Math.abs(this.lat0)-n,a=Math.abs(h)<=1e-10?this.lat0>=0?R(this.long0+Math.atan2(t.x,-t.y)):R(this.long0-Math.atan2(-t.x,t.y)):R(this.long0+Math.atan2(t.x*i,e*this.cos_p12*s-t.y*this.sin_p12*i))),t.x=a,t.y=o,t}return u=Vt(this.es),l=$t(this.es),c=te(this.es),f=ee(this.es),Math.abs(this.sin_p12-1)<=1e-10?(d=this.a*Qt(u,l,c,f,n),e=Math.sqrt(t.x*t.x+t.y*t.y),o=ne((d-e)/this.a,u,l,c,f),a=R(this.long0+Math.atan2(t.x,-1*t.y)),t.x=a,t.y=o,t):Math.abs(this.sin_p12+1)<=1e-10?(d=this.a*Qt(u,l,c,f,n),e=Math.sqrt(t.x*t.x+t.y*t.y),o=ne((e-d)/this.a,u,l,c,f),a=R(this.long0+Math.atan2(t.x,t.y)),t.x=a,t.y=o,t):(e=Math.sqrt(t.x*t.x+t.y*t.y),g=Math.atan2(t.x,t.y),p=re(this.a,this.e,this.sin_p12),y=Math.cos(g),_=-(v=this.e*this.cos_p12*y)*v/(1-this.es),b=3*this.es*(1-_)*this.sin_p12*this.cos_p12*y/(1-this.es),x=1-_*(M=(w=e/p)-_*(1+_)*Math.pow(w,3)/6-b*(1+3*_)*Math.pow(w,4)/24)*M/2-w*M*M*M/6,m=Math.asin(this.sin_p12*Math.cos(M)+this.cos_p12*Math.sin(M)*y),a=R(this.long0+Math.asin(Math.sin(g)*Math.sin(M)/Math.cos(m))),k=Math.sin(m),o=Math.atan2((k-this.es*x*this.sin_p12)*Math.tan(m),k*(1-this.es)),t.x=a,t.y=o,t)},names:["Azimuthal_Equidistant","aeqd"]};var we={init:function(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0)},forward:function(t){var e,r,i,n,s,a,o,h=t.x,u=t.y;return i=R(h-this.long0),e=Math.sin(u),r=Math.cos(u),n=Math.cos(i),1,((s=this.sin_p14*e+this.cos_p14*r*n)>0||Math.abs(s)<=1e-10)&&(a=1*this.a*r*Math.sin(i),o=this.y0+1*this.a*(this.cos_p14*e-this.sin_p14*r*n)),t.x=a,t.y=o,t},inverse:function(t){var e,r,i,s,a,o,h;return t.x-=this.x0,t.y-=this.y0,e=Math.sqrt(t.x*t.x+t.y*t.y),r=he(e/this.a),i=Math.sin(r),s=Math.cos(r),o=this.long0,Math.abs(e)<=1e-10?(h=this.lat0,t.x=o,t.y=h,t):(h=he(s*this.sin_p14+t.y*i*this.cos_p14/e),a=Math.abs(this.lat0)-n,Math.abs(a)<=1e-10?(o=this.lat0>=0?R(this.long0+Math.atan2(t.x,-t.y)):R(this.long0-Math.atan2(-t.x,t.y)),t.x=o,t.y=h,t):(o=R(this.long0+Math.atan2(t.x*i,e*this.cos_p14*s-t.y*this.sin_p14*i)),t.x=o,t.y=h,t))},names:["ortho"]},Me=1,xe=2,ke=3,Se=4,Ee=5,Ce=6,Ae=1,Oe=2,Te=3,Ie=4;function Le(t,e,r,i){var s;return t<1e-10?(i.value=Ae,s=0):(s=Math.atan2(e,r),Math.abs(s)<=o?i.value=Ae:s>o&&s<=n+o?(i.value=Oe,s-=n):s>n+o||s<=-(n+o)?(i.value=Te,s=s>=0?s-u:s+u):(i.value=Ie,s+=n)),s}function Pe(t,e){var r=t+e;return r<-u?r+=h:r>+u&&(r-=h),r}var Re={init:function(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Quadrilateralized Spherical Cube",this.lat0>=n-o/2?this.face=Ee:this.lat0<=-(n-o/2)?this.face=Ce:Math.abs(this.long0)<=o?this.face=Me:Math.abs(this.long0)<=n+o?this.face=this.long0>0?xe:Se:this.face=ke,0!==this.es&&(this.one_minus_f=1-(this.a-this.b)/this.a,this.one_minus_f_squared=this.one_minus_f*this.one_minus_f)},forward:function(t){var e,r,i,s,a,h,l={x:0,y:0},c={value:0};if(t.x-=this.long0,e=0!==this.es?Math.atan(this.one_minus_f_squared*Math.tan(t.y)):t.y,r=t.x,this.face===Ee)s=n-e,r>=o&&r<=n+o?(c.value=Ae,i=r-n):r>n+o||r<=-(n+o)?(c.value=Oe,i=r>0?r-u:r+u):r>-(n+o)&&r<=-o?(c.value=Te,i=r+n):(c.value=Ie,i=r);else if(this.face===Ce)s=n+e,r>=o&&r<=n+o?(c.value=Ae,i=-r+n):r<o&&r>=-o?(c.value=Oe,i=-r):r<-o&&r>=-(n+o)?(c.value=Te,i=-r-n):(c.value=Ie,i=r>0?-r+u:-r-u);else{var f,d,p,m,g,y;this.face===xe?r=Pe(r,+n):this.face===ke?r=Pe(r,+u):this.face===Se&&(r=Pe(r,-n)),m=Math.sin(e),g=Math.cos(e),y=Math.sin(r),f=g*Math.cos(r),d=g*y,p=m,this.face===Me?i=Le(s=Math.acos(f),p,d,c):this.face===xe?i=Le(s=Math.acos(d),p,-f,c):this.face===ke?i=Le(s=Math.acos(-f),p,-d,c):this.face===Se?i=Le(s=Math.acos(-d),p,f,c):(s=i=0,c.value=Ae)}return h=Math.atan(12/u*(i+Math.acos(Math.sin(i)*Math.cos(o))-n)),a=Math.sqrt((1-Math.cos(s))/(Math.cos(h)*Math.cos(h))/(1-Math.cos(Math.atan(1/Math.cos(i))))),c.value===Oe?h+=n:c.value===Te?h+=u:c.value===Ie&&(h+=1.5*u),l.x=a*Math.cos(h),l.y=a*Math.sin(h),l.x=l.x*this.a+this.x0,l.y=l.y*this.a+this.y0,t.x=l.x,t.y=l.y,t},inverse:function(t){var e,r,i,s,a,o,h,l,c,f,d,p,m={lam:0,phi:0},g={value:0};if(t.x=(t.x-this.x0)/this.a,t.y=(t.y-this.y0)/this.a,r=Math.atan(Math.sqrt(t.x*t.x+t.y*t.y)),e=Math.atan2(t.y,t.x),t.x>=0&&t.x>=Math.abs(t.y)?g.value=Ae:t.y>=0&&t.y>=Math.abs(t.x)?(g.value=Oe,e-=n):t.x<0&&-t.x>=Math.abs(t.y)?(g.value=Te,e=e<0?e+u:e-u):(g.value=Ie,e+=n),c=u/12*Math.tan(e),a=Math.sin(c)/(Math.cos(c)-1/Math.sqrt(2)),o=Math.atan(a),(h=1-(i=Math.cos(e))*i*(s=Math.tan(r))*s*(1-Math.cos(Math.atan(1/Math.cos(o)))))<-1?h=-1:h>1&&(h=1),this.face===Ee)l=Math.acos(h),m.phi=n-l,g.value===Ae?m.lam=o+n:g.value===Oe?m.lam=o<0?o+u:o-u:g.value===Te?m.lam=o-n:m.lam=o;else if(this.face===Ce)l=Math.acos(h),m.phi=l-n,g.value===Ae?m.lam=-o+n:g.value===Oe?m.lam=-o:g.value===Te?m.lam=-o-n:m.lam=o<0?-o-u:-o+u;else{var y,v,_;c=(y=h)*y,v=(c+=(_=c>=1?0:Math.sqrt(1-c)*Math.sin(o))*_)>=1?0:Math.sqrt(1-c),g.value===Oe?(c=v,v=-_,_=c):g.value===Te?(v=-v,_=-_):g.value===Ie&&(c=v,v=_,_=-c),this.face===xe?(c=y,y=-v,v=c):this.face===ke?(y=-y,v=-v):this.face===Se&&(c=y,y=v,v=-c),m.phi=Math.acos(-_)-n,m.lam=Math.atan2(v,y),this.face===xe?m.lam=Pe(m.lam,-n):this.face===ke?m.lam=Pe(m.lam,-u):this.face===Se&&(m.lam=Pe(m.lam,+n))}return 0!==this.es&&(f=m.phi<0?1:0,d=Math.tan(m.phi),p=this.b/Math.sqrt(d*d+this.one_minus_f_squared),m.phi=Math.atan(Math.sqrt(this.a*this.a-p*p)/(this.one_minus_f*p)),f&&(m.phi=-m.phi)),m.lam+=this.long0,t.x=m.lam,t.y=m.phi,t},names:["Quadrilateralized Spherical Cube","Quadrilateralized_Spherical_Cube","qsc"]},Ne=[[1,22199e-21,-715515e-10,31103e-10],[.9986,-482243e-9,-24897e-9,-13309e-10],[.9954,-83103e-8,-448605e-10,-9.86701e-7],[.99,-.00135364,-59661e-9,36777e-10],[.9822,-.00167442,-449547e-11,-572411e-11],[.973,-.00214868,-903571e-10,1.8736e-8],[.96,-.00305085,-900761e-10,164917e-11],[.9427,-.00382792,-653386e-10,-26154e-10],[.9216,-.00467746,-10457e-8,481243e-11],[.8962,-.00536223,-323831e-10,-543432e-11],[.8679,-.00609363,-113898e-9,332484e-11],[.835,-.00698325,-640253e-10,9.34959e-7],[.7986,-.00755338,-500009e-10,9.35324e-7],[.7597,-.00798324,-35971e-9,-227626e-11],[.7186,-.00851367,-701149e-10,-86303e-10],[.6732,-.00986209,-199569e-9,191974e-10],[.6213,-.010418,883923e-10,624051e-11],[.5722,-.00906601,182e-6,624051e-11],[.5322,-.00677797,275608e-9,624051e-11]],ze=[[-520417e-23,.0124,121431e-23,-845284e-16],[.062,.0124,-1.26793e-9,4.22642e-10],[.124,.0124,5.07171e-9,-1.60604e-9],[.186,.0123999,-1.90189e-8,6.00152e-9],[.248,.0124002,7.10039e-8,-2.24e-8],[.31,.0123992,-2.64997e-7,8.35986e-8],[.372,.0124029,9.88983e-7,-3.11994e-7],[.434,.0123893,-369093e-11,-4.35621e-7],[.4958,.0123198,-102252e-10,-3.45523e-7],[.5571,.0121916,-154081e-10,-5.82288e-7],[.6176,.0119938,-241424e-10,-5.25327e-7],[.6769,.011713,-320223e-10,-5.16405e-7],[.7346,.0113541,-397684e-10,-6.09052e-7],[.7903,.0109107,-489042e-10,-104739e-11],[.8435,.0103431,-64615e-9,-1.40374e-9],[.8936,.00969686,-64636e-9,-8547e-9],[.9394,.00840947,-192841e-9,-42106e-10],[.9761,.00616527,-256e-6,-42106e-10],[1,.00328947,-319159e-9,-42106e-10]],je=a/5,Be=function(t,e){return t[0]+e*(t[1]+e*(t[2]+e*t[3]))};var De={init:function(){this.x0=this.x0||0,this.y0=this.y0||0,this.long0=this.long0||0,this.es=0,this.title=this.title||"Robinson"},forward:function(t){var e=R(t.x-this.long0),r=Math.abs(t.y),i=Math.floor(r*je);i<0?i=0:i>=18&&(i=17);var n={x:Be(Ne[i],r=a*(r-.08726646259971647*i))*e,y:Be(ze[i],r)};return t.y<0&&(n.y=-n.y),n.x=n.x*this.a*.8487+this.x0,n.y=n.y*this.a*1.3523+this.y0,n},inverse:function(t){var e={x:(t.x-this.x0)/(.8487*this.a),y:Math.abs(t.y-this.y0)/(1.3523*this.a)};if(e.y>=1)e.x/=Ne[18][0],e.y=t.y<0?-n:n;else{var r=Math.floor(18*e.y);for(r<0?r=0:r>=18&&(r=17);;)if(ze[r][0]>e.y)--r;else{if(!(ze[r+1][0]<=e.y))break;++r}var i=ze[r],a=5*(e.y-i[0])/(ze[r+1][0]-i[0]);a=function(t,e,r,i){for(var n=e;i;--i){var s=t(n);if(n-=s,Math.abs(s)<r)break}return n}((function(t){return(Be(i,t)-e.y)/function(t,e){return t[1]+e*(2*t[2]+3*e*t[3])}(i,t)}),a,1e-10,100),e.x/=Be(Ne[r],a),e.y=(5*r+a)*s,t.y<0&&(e.y=-e.y)}return e.x=R(e.x+this.long0),e},names:["Robinson","robin"]};var Ue={init:function(){this.name="geocent"},forward:function(t){return rt(t,this.es,this.a)},inverse:function(t){return it(t,this.es,this.a,this.b)},names:["Geocentric","geocentric","geocent","Geocent"]},Fe=0,qe=1,Ge=2,We=3,He={h:{def:1e5,num:!0},azi:{def:0,num:!0,degrees:!0},tilt:{def:0,num:!0,degrees:!0},long0:{def:0,num:!0},lat0:{def:0,num:!0}};var Ze={init:function(){if(Object.keys(He).forEach(function(t){if(void 0===this[t])this[t]=He[t].def;else{if(He[t].num&&isNaN(this[t]))throw new Error("Invalid parameter value, must be numeric "+t+" = "+this[t]);He[t].num&&(this[t]=parseFloat(this[t]))}He[t].degrees&&(this[t]=this[t]*s)}.bind(this)),Math.abs(Math.abs(this.lat0)-n)<1e-10?this.mode=this.lat0<0?qe:Fe:Math.abs(this.lat0)<1e-10?this.mode=Ge:(this.mode=We,this.sinph0=Math.sin(this.lat0),this.cosph0=Math.cos(this.lat0)),this.pn1=this.h/this.a,this.pn1<=0||this.pn1>1e10)throw new Error("Invalid height");this.p=1+this.pn1,this.rp=1/this.p,this.h1=1/this.pn1,this.pfact=(this.p+1)*this.h1,this.es=0;var t=this.tilt,e=this.azi;this.cg=Math.cos(e),this.sg=Math.sin(e),this.cw=Math.cos(t),this.sw=Math.sin(t)},forward:function(t){t.x-=this.long0;var e,r,i,n,s=Math.sin(t.y),a=Math.cos(t.y),o=Math.cos(t.x);switch(this.mode){case We:r=this.sinph0*s+this.cosph0*a*o;break;case Ge:r=a*o;break;case qe:r=-s;break;case Fe:r=s}switch(e=(r=this.pn1/(this.p-r))*a*Math.sin(t.x),this.mode){case We:r*=this.cosph0*s-this.sinph0*a*o;break;case Ge:r*=s;break;case Fe:r*=-a*o;break;case qe:r*=a*o}return n=1/((i=r*this.cg+e*this.sg)*this.sw*this.h1+this.cw),e=(e*this.cg-r*this.sg)*this.cw*n,r=i*n,t.x=e*this.a,t.y=r*this.a,t},inverse:function(t){t.x/=this.a,t.y/=this.a;var e,r,i,n={x:t.x,y:t.y};i=1/(this.pn1-t.y*this.sw),e=this.pn1*t.x*i,r=this.pn1*t.y*this.cw*i,t.x=e*this.cg+r*this.sg,t.y=r*this.cg-e*this.sg;var s=jt(t.x,t.y);if(Math.abs(s)<1e-10)n.x=0,n.y=t.y;else{var a,o;switch(o=1-s*s*this.pfact,o=(this.p-Math.sqrt(o))/(this.pn1/s+s/this.pn1),a=Math.sqrt(1-o*o),this.mode){case We:n.y=Math.asin(a*this.sinph0+t.y*o*this.cosph0/s),t.y=(a-this.sinph0*Math.sin(n.y))*s,t.x*=o*this.cosph0;break;case Ge:n.y=Math.asin(t.y*o/s),t.y=a*s,t.x*=o;break;case Fe:n.y=Math.asin(a),t.y=-t.y;break;case qe:n.y=-Math.asin(a)}n.x=Math.atan2(t.x,t.y)}return t.x=n.x+this.long0,t.y=n.y,t},names:["Tilted_Perspective","tpers"]};var Ye,Ke={init:function(){if(this.flip_axis="x"===this.sweep?1:0,this.h=Number(this.h),this.radius_g_1=this.h/this.a,this.radius_g_1<=0||this.radius_g_1>1e10)throw new Error;if(this.radius_g=1+this.radius_g_1,this.C=this.radius_g*this.radius_g-1,0!==this.es){var t=1-this.es,e=1/t;this.radius_p=Math.sqrt(t),this.radius_p2=t,this.radius_p_inv2=e,this.shape="ellipse"}else this.radius_p=1,this.radius_p2=1,this.radius_p_inv2=1,this.shape="sphere";this.title||(this.title="Geostationary Satellite View")},forward:function(t){var e,r,i,n,s=t.x,a=t.y;if(s-=this.long0,"ellipse"===this.shape){a=Math.atan(this.radius_p2*Math.tan(a));var o=this.radius_p/jt(this.radius_p*Math.cos(a),Math.sin(a));if(r=o*Math.cos(s)*Math.cos(a),i=o*Math.sin(s)*Math.cos(a),n=o*Math.sin(a),(this.radius_g-r)*r-i*i-n*n*this.radius_p_inv2<0)return t.x=Number.NaN,t.y=Number.NaN,t;e=this.radius_g-r,this.flip_axis?(t.x=this.radius_g_1*Math.atan(i/jt(n,e)),t.y=this.radius_g_1*Math.atan(n/e)):(t.x=this.radius_g_1*Math.atan(i/e),t.y=this.radius_g_1*Math.atan(n/jt(i,e)))}else"sphere"===this.shape&&(e=Math.cos(a),r=Math.cos(s)*e,i=Math.sin(s)*e,n=Math.sin(a),e=this.radius_g-r,this.flip_axis?(t.x=this.radius_g_1*Math.atan(i/jt(n,e)),t.y=this.radius_g_1*Math.atan(n/e)):(t.x=this.radius_g_1*Math.atan(i/e),t.y=this.radius_g_1*Math.atan(n/jt(i,e))));return t.x=t.x*this.a,t.y=t.y*this.a,t},inverse:function(t){var e,r,i,n,s=-1,a=0,o=0;if(t.x=t.x/this.a,t.y=t.y/this.a,"ellipse"===this.shape){this.flip_axis?(o=Math.tan(t.y/this.radius_g_1),a=Math.tan(t.x/this.radius_g_1)*jt(1,o)):(a=Math.tan(t.x/this.radius_g_1),o=Math.tan(t.y/this.radius_g_1)*jt(1,a));var h=o/this.radius_p;if(e=a*a+h*h+s*s,(i=(r=2*this.radius_g*s)*r-4*e*this.C)<0)return t.x=Number.NaN,t.y=Number.NaN,t;n=(-r-Math.sqrt(i))/(2*e),s=this.radius_g+n*s,a*=n,o*=n,t.x=Math.atan2(a,s),t.y=Math.atan(o*Math.cos(t.x)/s),t.y=Math.atan(this.radius_p_inv2*Math.tan(t.y))}else if("sphere"===this.shape){if(this.flip_axis?(o=Math.tan(t.y/this.radius_g_1),a=Math.tan(t.x/this.radius_g_1)*Math.sqrt(1+o*o)):(a=Math.tan(t.x/this.radius_g_1),o=Math.tan(t.y/this.radius_g_1)*Math.sqrt(1+a*a)),e=a*a+o*o+s*s,(i=(r=2*this.radius_g*s)*r-4*e*this.C)<0)return t.x=Number.NaN,t.y=Number.NaN,t;n=(-r-Math.sqrt(i))/(2*e),s=this.radius_g+n*s,a*=n,o*=n,t.x=Math.atan2(a,s),t.y=Math.atan(o*Math.cos(t.x)/s)}return t.x=t.x+this.long0,t},names:["Geostationary Satellite View","Geostationary_Satellite","geos"]};gt.defaultDatum="WGS84",gt.Proj=et,gt.WGS84=new gt.Proj("WGS84"),gt.Point=Tt,gt.toPoint=lt,gt.defs=C,gt.nadgrid=function(t,e){var r=new DataView(e),i=function(t){var e=t.getInt32(8,!1);if(11===e)return!1;11!==(e=t.getInt32(8,!0))&&console.warn("Failed to detect nadgrid endian-ness, defaulting to little-endian");return!0}(r),n=function(t,e){return{nFields:t.getInt32(8,e),nSubgridFields:t.getInt32(24,e),nSubgrids:t.getInt32(40,e),shiftType:J(t,56,64).trim(),fromSemiMajorAxis:t.getFloat64(120,e),fromSemiMinorAxis:t.getFloat64(136,e),toSemiMajorAxis:t.getFloat64(152,e),toSemiMinorAxis:t.getFloat64(168,e)}}(r,i);n.nSubgrids>1&&console.log("Only single NTv2 subgrids are currently supported, subsequent sub grids are ignored");var s={header:n,subgrids:function(t,e,r){for(var i=[],n=0;n<e.nSubgrids;n++){var s=V(t,176,r),a=$(t,176,s,r),o=Math.round(1+(s.upperLongitude-s.lowerLongitude)/s.longitudeInterval),h=Math.round(1+(s.upperLatitude-s.lowerLatitude)/s.latitudeInterval);i.push({ll:[X(s.lowerLongitude),X(s.lowerLatitude)],del:[X(s.longitudeInterval),X(s.latitudeInterval)],lim:[o,h],count:s.gridNodeCount,cvs:Q(a)})}return i}(r,n,i)};return Y[t]=s,s},gt.transform=ft,gt.mgrs=_t,gt.version="__VERSION__",(Ye=gt).Proj.projections.add(Nt),Ye.Proj.projections.add(Ft),Ye.Proj.projections.add(qt),Ye.Proj.projections.add(Ht),Ye.Proj.projections.add(Zt),Ye.Proj.projections.add(Yt),Ye.Proj.projections.add(Kt),Ye.Proj.projections.add(Xt),Ye.Proj.projections.add(Jt),Ye.Proj.projections.add(se),Ye.Proj.projections.add(oe),Ye.Proj.projections.add(ue),Ye.Proj.projections.add(le),Ye.Proj.projections.add(ce),Ye.Proj.projections.add(fe),Ye.Proj.projections.add(de),Ye.Proj.projections.add(pe),Ye.Proj.projections.add(me),Ye.Proj.projections.add(ge),Ye.Proj.projections.add(ye),Ye.Proj.projections.add(ve),Ye.Proj.projections.add(_e),Ye.Proj.projections.add(be),Ye.Proj.projections.add(we),Ye.Proj.projections.add(Re),Ye.Proj.projections.add(De),Ye.Proj.projections.add(Ue),Ye.Proj.projections.add(Ze),Ye.Proj.projections.add(Ke);e.default=gt}])}));
|
|