/*! * 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 * @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()=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;so&&(r=o-h),s=r;s>=0;s--){for(var c=!0,f=0;fn&&(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>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;n239?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(;i0&&(t=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(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;cn)&&(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;ni)&&(r=i);for(var n="",s=e;sr)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||et.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>>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>>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),e0&&(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=(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=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>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=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=0;--n)t[n+e]=this[n+r];else if(s<1e3||!h.TYPED_ARRAY_SUPPORT)for(n=0;n>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(s=e;s55295&&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=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=[];++c1)for(var r=1;r399)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>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=0)return n>0&&(t.lastNeed=n-1),n;if(--i=0)return n>0&&(t.lastNeed=n-2),n;if(--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=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;ot._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.lengthe.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.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;ts.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=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-t0?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;s0&&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;r0&&(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=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=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-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",'"',"`"," ","\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&&s127?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;C0)&&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;n0}(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;n20&&(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-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=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=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&s.call(i,"finallyLoc")&&this.prev=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>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>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>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=[];i57343)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 */ 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>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;ao?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;o0)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>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 */ e.read=function(t,e,r,i,n){var s,a,o=8*n-i-1,h=(1<>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<>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<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;++tt(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>2,o=(3&e)<<4|r>>4,h=1>6:64,u=2>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>>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>>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>>=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.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 "+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>>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>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>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>>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>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>>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>>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)-(4t.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]&&sh&&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<=3&&(t.ins_h=(t.ins_h<=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<=3&&(t.ins_h=(t.ins_h<=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.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>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.gzindexa&&(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.gzindexa&&(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&&0t.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=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<>>=b=_>>>24,p-=b,0==(b=_>>>16&255))E[s++]=65535&_;else{if(!(16&b)){if(0==(64&b)){_=m[(65535&_)+(d&(1<>>=b,p-=b),p<15&&(d+=S[i++]<>>=b=_>>>24,p-=b,!(16&(b=_>>>16&255))){if(0==(64&b)){_=g[(65535&_)+(d&(1<>>=b,p-=b,(b=s-a)>3,d&=(1<<(p-=w<<3))-1,t.next_in=i,t.next_out=s,t.avail_in=i>>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=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>>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<>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++]<>>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++]<>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++]<>>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>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++]<>>=7&y,y-=7&y,r.mode=27;break}for(;y<3;){if(0===p)break t;p--,g+=l[f++]<>>=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++]<>>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>>=5,y-=5,r.ndist=1+(31&g),g>>>=5,y-=5,r.ncode=4+(15&g),g>>>=4,y-=4,286>>=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>>16&255,C=65535&N,!((S=N>>>24)<=y);){if(0===p)break t;p--,g+=l[f++]<>>=S,y-=S,r.lens[r.have++]=C;else{if(16===C){for(R=S+2;y>>=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>>=S)),g>>>=3,y-=3}else{for(R=S+7;y>>=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<>>16&255,C=65535&N,!((S=N>>>24)<=y);){if(0===p)break t;p--,g+=l[f++]<>A)])>>>16&255,C=65535&N,!(A+(S=N>>>24)<=y);){if(0===p)break t;p--,g+=l[f++]<>>=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.extra,y-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=23;case 23:for(;E=(N=r.distcode[g&(1<>>16&255,C=65535&N,!((S=N>>>24)<=y);){if(0===p)break t;p--,g+=l[f++]<>A)])>>>16&255,C=65535&N,!(A+(S=N>>>24)<=y);){if(0===p)break t;p--,g+=l[f++]<>>=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.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(mv?(b=j[B+c[k]],P[R+c[k]]):(b=96,0),d=1<>O)+(p-=d)]=_<<24|b<<16|w|0,0!==p;);for(d=1<>=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>>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<>16-t.bi_valid,t.bi_valid+=r-16):(t.bi_buf|=e<>>=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>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>=7;i>>=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>>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>>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;i0?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= 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=55296&&e<=56319&&n65535&&(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=128&&m("not-basic"),p.push(t.charCodeAt(i));for(n=r>0?r+1:0;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=e&&fd((h-r)/(y=i+1))&&m("overflow"),r+=(o-e)*y,e=o,a=0;ah&&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=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=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.place0?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-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;oi.y||c>i.x||p1e-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||hyt||(l>yt||hvt||(l>vt||h90&&(l=l-90+65-1),c>86?(c=c-86+65-1,f=!0):f=!1,(c===yt||uyt||(c>yt||uvt||(c>vt||u86&&(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);l0&&(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)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)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.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?(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)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