(function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"==typeof window?"undefined"==typeof global?"undefined"==typeof self?this:self:global:window,t.shp=e()}})(function(){var t=Math.log,o=Math.abs,l=Math.pow,d=Math.min,p=Math.floor,m=String.fromCharCode,f;return function(){function s(l,e,n){function t(o,i){if(!e[o]){if(!l[o]){var d="function"==typeof require&&require;if(!i&&d)return d(o,!0);if(r)return r(o,!0);var u=new Error("Cannot find module '"+o+"'");throw u.code="MODULE_NOT_FOUND",u}var a=e[o]={exports:{}};l[o][0].call(a.exports,function(e){var a=l[o][1][e];return t(a||e)},a,a.exports,s,l,e,n)}return e[o].exports}for(var r="function"==typeof require&&require,a=0;ao||57343=o)r.push(65533);else if(55296<=o&&56319>=o)if(n===a-1)r.push(65533);else{var s=t.charCodeAt(n+1);if(56320<=s&&57343>=s){r.push(65536+((1023&o)<<10)+(1023&s)),n+=1}else r.push(65533)}n+=1}return r}function i(e){for(var t="",a=0,n;a=n?t+=m(n):(n-=65536,t+=m((n>>10)+55296,(1023&n)+56320));return t}function l(e){return 0<=e&&127>=e}function d(e){this.tokens=[].slice.call(e),this.tokens.reverse()}function u(e,t){if(e)throw TypeError("Decoder error");return t||65533}function c(e){throw TypeError("The code point "+e+" could not be encoded.")}function f(e){return e=(e+"").trim().toLowerCase(),Object.prototype.hasOwnProperty.call(J,e)?J[e]:null}function h(e,t){return t?t[e]||null:null}function _(e,t){var a=t.indexOf(e);return-1===a?null:a}function g(e){if(!("encoding-indexes"in a))throw Error("Indexes missing. Did you forget to include encoding-indexes.js first?");return a["encoding-indexes"][e]}function y(e){if(39419e||1237575>6*a)+r];0>6*(a-1);o.push(128|63&s),a-=1}return o}}function E(e,t){var a=t.fatal;this.handler=function(t,n){if(n===-1)return-1;if(l(n))return n;var r=e[n-128];return null===r?u(a):r}}function A(e,t){t.fatal;this.handler=function(t,a){if(-1===a)return-1;if(H(a))return a;var n=_(a,e);return null===n&&c(a),n+128}}function I(e){var t=e.fatal,a=0,r=0,o=0;this.handler=function(e,s){if(s===-1&&0===a&&0===r&&0===o)return-1;s===-1&&(0!==a||0!==r||0!==o)&&(a=0,r=0,o=0,u(t));var i;if(0!==o){i=null,n(s,48,57)&&(i=y(10*(126*(10*(a-129)+r-48)+o-129)+s-48));var d=[r,o,s];return a=0,r=0,o=0,null===i?(e.prepend(d),u(t)):i}if(0!==r)return n(s,129,254)?(o=s,null):(e.prepend([r,s]),a=0,r=0,u(t));if(0!==a){if(n(s,48,57))return r=s,null;var p=a,c=null;a=0;var m=127>s?64:65;return(n(s,64,126)||n(s,128,254))&&(c=190*(p-129)+(s-m)),i=null===c?null:h(c,g("gb18030")),null===i&&l(s)&&e.prepend(s),null===i?u(t):i}return l(s)?s:128===s?8364:n(s,129,254)?(a=s,null):u(t)}}function O(e,t){e.fatal;this.handler=function(e,a){if(a===-1)return-1;if(H(a))return a;if(58853===a)return c(a);if(t&&8364===a)return 128;var n=_(a,g("gb18030"));if(null!==n){var r=q(n/190)+129,o=n%190,s=63>o?64:65;return[r,o+s]}if(t)return c(a);n=x(a);var i=q(n/10/126/10);n-=10*(126*(10*i));var l=q(n/10/126);n-=126*(10*l);var d=q(n/10),p=n-10*d;return[i+129,l+48,d+129,p+48]}}function B(e){var t=e.fatal,a=0;this.handler=function(e,r){if(-1===r&&0!==a)return a=0,u(t);if(-1===r&&0===a)return-1;if(0!==a){var o=a,s=null;a=0;var i=127>r?64:98;switch((n(r,64,126)||n(r,161,254))&&(s=157*(o-129)+(r-i)),s){case 1133:return[202,772];case 1135:return[202,780];case 1164:return[234,772];case 1166:return[234,780];}var d=null===s?null:h(s,g("big5"));return null===d&&l(r)&&e.prepend(r),null===d?u(t):d}return l(r)?r:n(r,129,254)?(a=r,null):u(t)}}function L(e){e.fatal;this.handler=function(e,t){if(t===-1)return-1;if(H(t))return t;var a=w(t);if(null===a)return c(t);var n=q(a/157)+129;if(161>n)return c(t);var r=a%157,o=63>r?64:98;return[n,r+o]}}function z(e){var t=e.fatal,a=!1,r=0;this.handler=function(e,o){if(-1===o&&0!==r)return r=0,u(t);if(-1===o&&0===r)return-1;if(142===r&&n(o,161,223))return r=0,65216+o;if(143===r&&n(o,161,254))return a=!0,r=o,null;if(0!==r){var s=r;r=0;var i=null;return n(s,161,254)&&n(o,161,254)&&(i=h(94*(s-161)+(o-161),g(a?"jis0212":"jis0208"))),a=!1,n(o,161,254)||e.prepend(o),null===i?u(t):i}return l(o)?o:142===o||143===o||n(o,161,254)?(r=o,null):u(t)}}function T(e){e.fatal;this.handler=function(e,t){if(t===-1)return-1;if(H(t))return t;if(165===t)return 92;if(8254===t)return 126;if(n(t,65377,65439))return[142,t-65377+161];8722===t&&(t=65293);var a=_(t,g("jis0208"));if(null===a)return c(t);var r=q(a/94)+161;return[r,a%94+161]}}function N(e){var t=e.fatal,a={ASCII:0,Roman:1,Katakana:2,LeadByte:3,TrailByte:4,EscapeStart:5,Escape:6},r=a.ASCII,o=a.ASCII,s=0,i=!1;this.handler=function(e,l){switch(r){default:case a.ASCII:return 27===l?(r=a.EscapeStart,null):n(l,0,127)&&14!==l&&15!==l&&27!==l?(i=!1,l):-1===l?-1:(i=!1,u(t));case a.Roman:return 27===l?(r=a.EscapeStart,null):92===l?(i=!1,165):126===l?(i=!1,8254):n(l,0,127)&&14!==l&&15!==l&&27!==l&&92!==l&&126!==l?(i=!1,l):-1===l?-1:(i=!1,u(t));case a.Katakana:return 27===l?(r=a.EscapeStart,null):n(l,33,95)?(i=!1,65344+l):-1===l?-1:(i=!1,u(t));case a.LeadByte:return 27===l?(r=a.EscapeStart,null):n(l,33,126)?(i=!1,s=l,r=a.TrailByte,null):-1===l?-1:(i=!1,u(t));case a.TrailByte:if(27===l)return r=a.EscapeStart,u(t);if(n(l,33,126)){r=a.LeadByte;var d=94*(s-33)+l-33,p=h(d,g("jis0208"));return null===p?u(t):p}return-1===l?(r=a.LeadByte,e.prepend(l),u(t)):(r=a.LeadByte,u(t));case a.EscapeStart:return 36===l||40===l?(s=l,r=a.Escape,null):(e.prepend(l),i=!1,r=o,u(t));case a.Escape:var c=s;s=0;var m=null;if(40===c&&66===l&&(m=a.ASCII),40===c&&74===l&&(m=a.Roman),40===c&&73===l&&(m=a.Katakana),36===c&&(64===l||66===l)&&(m=a.LeadByte),null!==m){r=r=m;var f=i;return i=!0,f?u(t):null}return e.prepend([c,l]),i=!1,r=o,u(t);}}}function R(e){var t=e.fatal,a={ASCII:0,Roman:1,jis0208:2},n=a.ASCII;this.handler=function(e,t){if(-1===t&&n!==a.ASCII)return e.prepend(t),n=a.ASCII,[27,40,66];if(-1===t&&n===a.ASCII)return-1;if((n===a.ASCII||n===a.Roman)&&(14===t||15===t||27===t))return c(65533);if(n===a.ASCII&&H(t))return t;if(n===a.Roman&&(H(t)&&92!==t&&126!==t||165==t||8254==t)){if(H(t))return t;if(165===t)return 92;if(8254===t)return 126}if(H(t)&&n!==a.ASCII)return e.prepend(t),n=a.ASCII,[27,40,66];if((165===t||8254===t)&&n!==a.Roman)return e.prepend(t),n=a.Roman,[27,40,74];8722===t&&(t=65293);var r=_(t,g("jis0208"));if(null===r)return c(t);if(n!==a.jis0208)return e.prepend(t),n=a.jis0208,[27,36,66];var o=q(r/94)+33;return[o,r%94+33]}}function P(e){var t=e.fatal,a=0;this.handler=function(e,r){if(-1===r&&0!==a)return a=0,u(t);if(-1===r&&0===a)return-1;if(0!==a){var o=a,s=null;a=0;var i=127>r?64:65,d=160>o?129:193;if((n(r,64,126)||n(r,128,252))&&(s=188*(o-d)+r-i),n(s,8836,10715))return 48508+s;var p=null===s?null:h(s,g("jis0208"));return null===p&&l(r)&&e.prepend(r),null===p?u(t):p}return l(r)||128===r?r:n(r,161,223)?65216+r:n(r,129,159)||n(r,224,252)?(a=r,null):u(t)}}function j(e){e.fatal;this.handler=function(e,t){if(t===-1)return-1;if(H(t)||128===t)return t;if(165===t)return 92;if(8254===t)return 126;if(n(t,65377,65439))return t-65377+161;8722===t&&(t=65293);var a=b(t);if(null===a)return c(t);var r=q(a/188),o=31>r?129:193,s=a%188,i=63>s?64:65;return[r+o,s+i]}}function D(e){var t=e.fatal,a=0;this.handler=function(e,r){if(-1===r&&0!==a)return a=0,u(t);if(-1===r&&0===a)return-1;if(0!==a){var o=a,s=null;a=0,n(r,65,254)&&(s=190*(o-129)+(r-65));var i=null===s?null:h(s,g("euc-kr"));return null===s&&l(r)&&e.prepend(r),null===i?u(t):i}return l(r)?r:n(r,129,254)?(a=r,null):u(t)}}function F(e){e.fatal;this.handler=function(e,t){if(t===-1)return-1;if(H(t))return t;var a=_(t,g("euc-kr"));if(null===a)return c(t);var n=q(a/190)+129;return[n,a%190+65]}}function U(e,t){var a=e>>8,n=255&e;return t?[a,n]:[n,a]}function M(e,t){var a=t.fatal,r=null,o=null;this.handler=function(t,s){if(-1===s&&(null!==r||null!==o))return u(a);if(-1===s&&null===r&&null===o)return-1;if(null===r)return r=s,null;var i;if(i=e?(r<<8)+s:(s<<8)+r,r=null,null!==o){var l=o;return(o=null,n(i,56320,57343))?65536+1024*(l-55296)+(i-56320):(t.prepend(U(i,e)),u(a))}return n(i,55296,56319)?(o=i,null):n(i,56320,57343)?u(a):i}}function G(e,t){t.fatal;this.handler=function(t,a){if(a===-1)return-1;if(n(a,0,65535))return U(a,e);var r=U((a-65536>>10)+55296,e),o=U((1023&a-65536)+56320,e);return r.concat(o)}}function W(e){e.fatal;this.handler=function(e,t){return-1===t?-1:l(t)?t:63360+t-128}}function Z(e){e.fatal;this.handler=function(e,t){return-1===t?-1:H(t)?t:n(t,63360,63487)?t-63360+128:c(t)}}"undefined"!=typeof t&&t.exports&&!a["encoding-indexes"]&&e("./encoding-indexes.js");var q=p,H=l,K=-1;d.prototype={endOfStream:function(){return!this.tokens.length},read:function(){return this.tokens.length?this.tokens.pop():K},prepend:function(e){if(Array.isArray(e))for(var t=e;t.length;)this.tokens.push(t.pop());else this.tokens.push(e)},push:function(e){if(Array.isArray(e))for(var t=e;t.length;)this.tokens.unshift(t.shift());else this.tokens.unshift(e)}};(function(){}).prototype={handler:function(){}},function(){}.prototype={handler:function(){}};var Q=[{encodings:[{labels:["unicode-1-1-utf-8","utf-8","utf8"],name:"UTF-8"}],heading:"The Encoding"},{encodings:[{labels:["866","cp866","csibm866","ibm866"],name:"IBM866"},{labels:["csisolatin2","iso-8859-2","iso-ir-101","iso8859-2","iso88592","iso_8859-2","iso_8859-2:1987","l2","latin2"],name:"ISO-8859-2"},{labels:["csisolatin3","iso-8859-3","iso-ir-109","iso8859-3","iso88593","iso_8859-3","iso_8859-3:1988","l3","latin3"],name:"ISO-8859-3"},{labels:["csisolatin4","iso-8859-4","iso-ir-110","iso8859-4","iso88594","iso_8859-4","iso_8859-4:1988","l4","latin4"],name:"ISO-8859-4"},{labels:["csisolatincyrillic","cyrillic","iso-8859-5","iso-ir-144","iso8859-5","iso88595","iso_8859-5","iso_8859-5:1988"],name:"ISO-8859-5"},{labels:["arabic","asmo-708","csiso88596e","csiso88596i","csisolatinarabic","ecma-114","iso-8859-6","iso-8859-6-e","iso-8859-6-i","iso-ir-127","iso8859-6","iso88596","iso_8859-6","iso_8859-6:1987"],name:"ISO-8859-6"},{labels:["csisolatingreek","ecma-118","elot_928","greek","greek8","iso-8859-7","iso-ir-126","iso8859-7","iso88597","iso_8859-7","iso_8859-7:1987","sun_eu_greek"],name:"ISO-8859-7"},{labels:["csiso88598e","csisolatinhebrew","hebrew","iso-8859-8","iso-8859-8-e","iso-ir-138","iso8859-8","iso88598","iso_8859-8","iso_8859-8:1988","visual"],name:"ISO-8859-8"},{labels:["csiso88598i","iso-8859-8-i","logical"],name:"ISO-8859-8-I"},{labels:["csisolatin6","iso-8859-10","iso-ir-157","iso8859-10","iso885910","l6","latin6"],name:"ISO-8859-10"},{labels:["iso-8859-13","iso8859-13","iso885913"],name:"ISO-8859-13"},{labels:["iso-8859-14","iso8859-14","iso885914"],name:"ISO-8859-14"},{labels:["csisolatin9","iso-8859-15","iso8859-15","iso885915","iso_8859-15","l9"],name:"ISO-8859-15"},{labels:["iso-8859-16"],name:"ISO-8859-16"},{labels:["cskoi8r","koi","koi8","koi8-r","koi8_r"],name:"KOI8-R"},{labels:["koi8-ru","koi8-u"],name:"KOI8-U"},{labels:["csmacintosh","mac","macintosh","x-mac-roman"],name:"macintosh"},{labels:["dos-874","iso-8859-11","iso8859-11","iso885911","tis-620","windows-874"],name:"windows-874"},{labels:["cp1250","windows-1250","x-cp1250"],name:"windows-1250"},{labels:["cp1251","windows-1251","x-cp1251"],name:"windows-1251"},{labels:["ansi_x3.4-1968","ascii","cp1252","cp819","csisolatin1","ibm819","iso-8859-1","iso-ir-100","iso8859-1","iso88591","iso_8859-1","iso_8859-1:1987","l1","latin1","us-ascii","windows-1252","x-cp1252"],name:"windows-1252"},{labels:["cp1253","windows-1253","x-cp1253"],name:"windows-1253"},{labels:["cp1254","csisolatin5","iso-8859-9","iso-ir-148","iso8859-9","iso88599","iso_8859-9","iso_8859-9:1989","l5","latin5","windows-1254","x-cp1254"],name:"windows-1254"},{labels:["cp1255","windows-1255","x-cp1255"],name:"windows-1255"},{labels:["cp1256","windows-1256","x-cp1256"],name:"windows-1256"},{labels:["cp1257","windows-1257","x-cp1257"],name:"windows-1257"},{labels:["cp1258","windows-1258","x-cp1258"],name:"windows-1258"},{labels:["x-mac-cyrillic","x-mac-ukrainian"],name:"x-mac-cyrillic"}],heading:"Legacy single-byte encodings"},{encodings:[{labels:["chinese","csgb2312","csiso58gb231280","gb2312","gb_2312","gb_2312-80","gbk","iso-ir-58","x-gbk"],name:"GBK"},{labels:["gb18030"],name:"gb18030"}],heading:"Legacy multi-byte Chinese (simplified) encodings"},{encodings:[{labels:["big5","big5-hkscs","cn-big5","csbig5","x-x-big5"],name:"Big5"}],heading:"Legacy multi-byte Chinese (traditional) encodings"},{encodings:[{labels:["cseucpkdfmtjapanese","euc-jp","x-euc-jp"],name:"EUC-JP"},{labels:["csiso2022jp","iso-2022-jp"],name:"ISO-2022-JP"},{labels:["csshiftjis","ms932","ms_kanji","shift-jis","shift_jis","sjis","windows-31j","x-sjis"],name:"Shift_JIS"}],heading:"Legacy multi-byte Japanese encodings"},{encodings:[{labels:["cseuckr","csksc56011987","euc-kr","iso-ir-149","korean","ks_c_5601-1987","ks_c_5601-1989","ksc5601","ksc_5601","windows-949"],name:"EUC-KR"}],heading:"Legacy multi-byte Korean encodings"},{encodings:[{labels:["csiso2022kr","hz-gb-2312","iso-2022-cn","iso-2022-cn-ext","iso-2022-kr"],name:"replacement"},{labels:["utf-16be"],name:"UTF-16BE"},{labels:["utf-16","utf-16le"],name:"UTF-16LE"},{labels:["x-user-defined"],name:"x-user-defined"}],heading:"Legacy miscellaneous encodings"}],J={};Q.forEach(function(e){e.encodings.forEach(function(e){e.labels.forEach(function(t){J[t]=e})})});var X={},Y={},V,$;Object.defineProperty&&(Object.defineProperty(k.prototype,"encoding",{get:function(){return this._encoding.name.toLowerCase()}}),Object.defineProperty(k.prototype,"fatal",{get:function(){return"fatal"===this._error_mode}}),Object.defineProperty(k.prototype,"ignoreBOM",{get:function(){return this._ignoreBOM}})),k.prototype.decode=function(e,t){var a;a="object"==typeof e&&e instanceof ArrayBuffer?new Uint8Array(e):"object"==typeof e&&"buffer"in e&&e.buffer instanceof ArrayBuffer?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):new Uint8Array(0),t=o(t),this._do_not_flush||(this._decoder=Y[this._encoding.name]({fatal:"fatal"===this._error_mode}),this._BOMseen=!1),this._do_not_flush=!!t.stream;for(var n=new d(a),s=[],l,p;(p=n.read(),p!==K)&&!(l=this._decoder.handler(n,p),-1===l);)null!==l&&(Array.isArray(l)?s.push.apply(s,l):s.push(l));if(!this._do_not_flush){do{if(l=this._decoder.handler(n,n.read()),-1===l)break;if(null===l)continue;Array.isArray(l)?s.push.apply(s,l):s.push(l)}while(!n.endOfStream());this._decoder=null}return function(e){return!r(["UTF-8","UTF-16LE","UTF-16BE"],this._encoding.name)||this._ignoreBOM||this._BOMseen||(0{if(!t)return e;const n=new a(e);return n.pathname=`${n.pathname}.${t}`,n.href}}).call(this)}).call(this,"undefined"==typeof global?"undefined"==typeof self?"undefined"==typeof window?{}:window:self:global)},{}],8:[function(e,t){'use strict';function n(e){let t=0,a=1;const n=e.length;for(let r,o;a{const t=new a;await t.loadAsync(e);const n=t.file(/.+/),r={};return await Promise.all(n.map(async e=>{let t;t="shp"===e.name.slice(-3).toLowerCase()||"dbf"===e.name.slice(-3).toLowerCase()?await e.async("nodebuffer"):await e.async("text"),r[e.name]=t})),r}},{jszip:15}],10:[function(e,t,a){'use strict';function n(e){var t=e.length;if(0>16,s[l++]=255&p>>8,s[l++]=255&p;return 2===o&&(p=u[e.charCodeAt(m)]<<2|u[e.charCodeAt(m+1)]>>4,s[l++]=255&p),1===o&&(p=u[e.charCodeAt(m)]<<10|u[e.charCodeAt(m+1)]<<4|u[e.charCodeAt(m+2)]>>2,s[l++]=255&p>>8,s[l++]=255&p),s}function s(e){return p[63&e>>18]+p[63&e>>12]+p[63&e>>6]+p[63&e]}function l(e,t,a){for(var n=[],r=t,o;rs?s:o+r));return 1===a?(d=e[t-1],n.push(p[d>>2]+p[63&d<<4]+"==")):2===a&&(d=(e[t-2]<<8)+e[t-1],n.push(p[d>>10]+p[63&d>>4]+p[63&d<<2]+"=")),n.join("")}a.byteLength=function(e){var t=n(e),a=t[0],r=t[1];return 3*(a+r)/4-r},a.toByteArray=o,a.fromByteArray=d;for(var p=[],u=[],c="undefined"==typeof Uint8Array?Array:Uint8Array,m="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",f=0,h=m.length;f * @license MIT */'use strict';function t(e){if(2147483647e)throw new RangeError("The value \""+e+"\" is invalid for option \"size\"")}function s(e,a,n){return o(e),0>=e?t(e):void 0===a?t(e):"string"==typeof n?t(e).fill(a,n):t(e).fill(a)}function i(e){return o(e),t(0>e?0:0|h(e))}function p(e,a){if(("string"!=typeof a||""===a)&&(a="utf8"),!n.isEncoding(a))throw new TypeError("Unknown encoding: "+a);var r=0|_(e,a),o=t(r),s=o.write(e,a);return s!==r&&(o=o.slice(0,s)),o}function u(e){for(var a=0>e.length?0:0|h(e.length),n=t(a),r=0;rt||e.byteLength=2147483647)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+2147483647 .toString(16)+" bytes");return 0|e}function _(e,t){if(n.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||H(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError("The \"string\" argument must be one of type string, Buffer, or ArrayBuffer. Received type "+typeof e);var a=e.length,r=2>>1;case"base64":return Z(e).length;default:if(o)return r?-1:M(e).length;t=(""+t).toLowerCase(),o=!0;}}function g(e,t,a){var n=!1;if((void 0===t||0>t)&&(t=0),t>this.length)return"";if((void 0===a||a>this.length)&&(a=this.length),0>=a)return"";if(a>>>=0,t>>>=0,a<=t)return"";for(e||(e="utf8");;)switch(e){case"hex":return z(this,t,a);case"utf8":case"utf-8":return I(this,t,a);case"ascii":return B(this,t,a);case"latin1":case"binary":return L(this,t,a);case"base64":return A(this,t,a);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,t,a);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0;}}function y(e,t,a){var n=e[t];e[t]=e[a],e[a]=n}function x(e,t,a,r,o){if(0===e.length)return-1;if("string"==typeof a?(r=a,a=0):2147483647a&&(a=-2147483648),a=+a,K(a)&&(a=o?0:e.length-1),0>a&&(a=e.length+a),a>=e.length){if(o)return-1;a=e.length-1}else if(0>a)if(o)a=0;else return-1;if("string"==typeof t&&(t=n.from(t,r)),n.isBuffer(t))return 0===t.length?-1:b(e,t,a,r,o);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,a):Uint8Array.prototype.lastIndexOf.call(e,t,a):b(e,[t],a,r,o);throw new TypeError("val must be string, number or Buffer")}function b(e,t,a,n,r){function o(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}var s=1,l=e.length,d=t.length;if(void 0!==n&&(n=(n+"").toLowerCase(),"ucs2"===n||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(2>e.length||2>t.length)return-1;s=2,l/=2,d/=2,a/=2}var p;if(r){var u=-1;for(p=a;pl&&(a=l-d),p=a;0<=p;p--){for(var c=!0,m=0;mr&&(n=r)):n=r;var o=t.length;n>o/2&&(n=o/2);for(var s=0,l;so&&(s=o):2===l?(p=e[r+1],128==(192&p)&&(m=(31&o)<<6|63&p,127m||57343m&&(s=m))):void 0}null===s?(s=65533,l=1):65535>>10),s=56320|1023&s),n.push(s),r+=l}return O(n)}function O(e){var t=e.length;if(t<=4096)return m.apply(String,e);for(var a="",n=0;nt)&&(t=0),(!a||0>a||a>n)&&(a=n);for(var r="",o=t;oe)throw new RangeError("offset is not uint");if(e+t>a)throw new RangeError("Trying to access beyond buffer length")}function R(e,t,a,r,o,s){if(!n.isBuffer(e))throw new TypeError("\"buffer\" argument must be a Buffer instance");if(t>o||te.length)throw new RangeError("Index out of range")}function P(e,t,a,n){if(a+n>e.length)throw new RangeError("Index out of range");if(0>a)throw new RangeError("Index out of range")}function j(e,t,a,n,r){return t=+t,a>>>=0,r||P(e,t,a,4,34028234663852886e22,-34028234663852886e22),J.write(e,t,a,n,23,4),a+4}function D(e,t,a,n,r){return t=+t,a>>>=0,r||P(e,t,a,8,17976931348623157e292,-17976931348623157e292),J.write(e,t,a,n,52,8),a+8}function F(e){if(e=e.split("=")[0],e=e.trim().replace(X,""),2>e.length)return"";for(;0!=e.length%4;)e+="=";return e}function U(e){return 16>e?"0"+e.toString(16):e.toString(16)}function M(e,t){t=t||1/0;for(var a=e.length,n=null,r=[],o=0,s;os){if(!n){if(56319s){-1<(t-=3)&&r.push(239,191,189),n=s;continue}s=(n-55296<<10|s-56320)+65536}else n&&-1<(t-=3)&&r.push(239,191,189);if(n=null,128>s){if(0>(t-=1))break;r.push(s)}else if(2048>s){if(0>(t-=2))break;r.push(192|s>>6,128|63&s)}else if(65536>s){if(0>(t-=3))break;r.push(224|s>>12,128|63&s>>6,128|63&s)}else if(1114112>s){if(0>(t-=4))break;r.push(240|s>>18,128|63&s>>12,128|63&s>>6,128|63&s)}else throw new Error("Invalid code point")}return r}function G(e){for(var t=[],a=0;a(t-=2));++n)r=e.charCodeAt(n),o=r>>8,s=r%256,a.push(s),a.push(o);return a}function Z(e){return Q.toByteArray(F(e))}function q(e,t,a,n){for(var r=0;r=t.length||r>=e.length);++r)t[r+a]=e[r];return r}function H(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function K(e){return e!==e}var Q=e("base64-js"),J=e("ieee754");a.Buffer=n,a.SlowBuffer=function(e){return+e!=e&&(e=0),n.alloc(+e)},a.INSPECT_MAX_BYTES=50;a.kMaxLength=2147483647,n.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()}catch(t){return!1}}(),n.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(n.prototype,"parent",{enumerable:!0,get:function(){return n.isBuffer(this)?this.buffer:void 0}}),Object.defineProperty(n.prototype,"offset",{enumerable:!0,get:function(){return n.isBuffer(this)?this.byteOffset:void 0}}),"undefined"!=typeof Symbol&&null!=Symbol.species&&n[Symbol.species]===n&&Object.defineProperty(n,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),n.poolSize=8192,n.from=function(e,t,a){return r(e,t,a)},n.prototype.__proto__=Uint8Array.prototype,n.__proto__=Uint8Array,n.alloc=function(e,t,a){return s(e,t,a)},n.allocUnsafe=function(e){return i(e)},n.allocUnsafeSlow=function(e){return i(e)},n.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==n.prototype},n.compare=function(e,t){if(H(e,Uint8Array)&&(e=n.from(e,e.offset,e.byteLength)),H(t,Uint8Array)&&(t=n.from(t,t.offset,t.byteLength)),!n.isBuffer(e)||!n.isBuffer(t))throw new TypeError("The \"buf1\", \"buf2\" arguments must be one of type Buffer or Uint8Array");if(e===t)return 0;for(var r=e.length,o=t.length,s=0,l=d(r,o);st&&(e+=" ... "),""},n.prototype.compare=function(e,t,a,r,o){if(H(e,Uint8Array)&&(e=n.from(e,e.offset,e.byteLength)),!n.isBuffer(e))throw new TypeError("The \"target\" argument must be one of type Buffer or Uint8Array. Received type "+typeof e);if(void 0===t&&(t=0),void 0===a&&(a=e?e.length:0),void 0===r&&(r=0),void 0===o&&(o=this.length),0>t||a>e.length||0>r||o>this.length)throw new RangeError("out of range index");if(r>=o&&t>=a)return 0;if(r>=o)return-1;if(t>=a)return 1;if(t>>>=0,a>>>=0,r>>>=0,o>>>=0,this===e)return 0;for(var s=o-r,l=a-t,p=d(s,l),u=this.slice(r,o),c=e.slice(t,a),m=0;m>>=0,isFinite(a)?(a>>>=0,void 0===n&&(n="utf8")):(n=a,a=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var r=this.length-t;if((void 0===a||a>r)&&(a=r),0a||0>t)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return w(this,e,t,a);case"utf8":case"utf-8":return k(this,e,t,a);case"ascii":return C(this,e,t,a);case"latin1":case"binary":return S(this,e,t,a);case"base64":return v(this,e,t,a);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,e,t,a);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0;}},n.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};n.prototype.slice=function(e,t){var a=this.length;e=~~e,t=t===void 0?a:~~t,0>e?(e+=a,0>e&&(e=0)):e>a&&(e=a),0>t?(t+=a,0>t&&(t=0)):t>a&&(t=a),t>>=0,t>>>=0,a||N(e,t,this.length);for(var n=this[e],r=1,o=0;++o>>=0,t>>>=0,a||N(e,t,this.length);for(var n=this[e+--t],r=1;0>>=0,t||N(e,1,this.length),this[e]},n.prototype.readUInt16LE=function(e,t){return e>>>=0,t||N(e,2,this.length),this[e]|this[e+1]<<8},n.prototype.readUInt16BE=function(e,t){return e>>>=0,t||N(e,2,this.length),this[e]<<8|this[e+1]},n.prototype.readUInt32LE=function(e,t){return e>>>=0,t||N(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},n.prototype.readUInt32BE=function(e,t){return e>>>=0,t||N(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},n.prototype.readIntLE=function(e,t,a){e>>>=0,t>>>=0,a||N(e,t,this.length);for(var n=this[e],r=1,o=0;++o=r&&(n-=l(2,8*t)),n},n.prototype.readIntBE=function(e,t,a){e>>>=0,t>>>=0,a||N(e,t,this.length);for(var n=t,r=1,o=this[e+--n];0=r&&(o-=l(2,8*t)),o},n.prototype.readInt8=function(e,t){return e>>>=0,t||N(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},n.prototype.readInt16LE=function(e,t){e>>>=0,t||N(e,2,this.length);var a=this[e]|this[e+1]<<8;return 32768&a?4294901760|a:a},n.prototype.readInt16BE=function(e,t){e>>>=0,t||N(e,2,this.length);var a=this[e+1]|this[e]<<8;return 32768&a?4294901760|a:a},n.prototype.readInt32LE=function(e,t){return e>>>=0,t||N(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},n.prototype.readInt32BE=function(e,t){return e>>>=0,t||N(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},n.prototype.readFloatLE=function(e,t){return e>>>=0,t||N(e,4,this.length),J.read(this,e,!0,23,4)},n.prototype.readFloatBE=function(e,t){return e>>>=0,t||N(e,4,this.length),J.read(this,e,!1,23,4)},n.prototype.readDoubleLE=function(e,t){return e>>>=0,t||N(e,8,this.length),J.read(this,e,!0,52,8)},n.prototype.readDoubleBE=function(e,t){return e>>>=0,t||N(e,8,this.length),J.read(this,e,!1,52,8)},n.prototype.writeUIntLE=function(e,t,a,n){if(e=+e,t>>>=0,a>>>=0,!n){var r=l(2,8*a)-1;R(this,e,t,a,r,0)}var o=1,s=0;for(this[t]=255&e;++s>>=0,a>>>=0,!n){var r=l(2,8*a)-1;R(this,e,t,a,r,0)}var o=a-1,s=1;for(this[t+o]=255&e;0<=--o&&(s*=256);)this[t+o]=255&e/s;return t+a},n.prototype.writeUInt8=function(e,t,a){return e=+e,t>>>=0,a||R(this,e,t,1,255,0),this[t]=255&e,t+1},n.prototype.writeUInt16LE=function(e,t,a){return e=+e,t>>>=0,a||R(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},n.prototype.writeUInt16BE=function(e,t,a){return e=+e,t>>>=0,a||R(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},n.prototype.writeUInt32LE=function(e,t,a){return e=+e,t>>>=0,a||R(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},n.prototype.writeUInt32BE=function(e,t,a){return e=+e,t>>>=0,a||R(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},n.prototype.writeIntLE=function(e,t,a,n){if(e=+e,t>>>=0,!n){var r=l(2,8*a-1);R(this,e,t,a,r-1,-r)}var o=0,s=1,d=0;for(this[t]=255&e;++oe&&0===d&&0!==this[t+o-1]&&(d=1),this[t+o]=255&(e/s>>0)-d;return t+a},n.prototype.writeIntBE=function(e,t,a,n){if(e=+e,t>>>=0,!n){var r=l(2,8*a-1);R(this,e,t,a,r-1,-r)}var o=a-1,s=1,d=0;for(this[t+o]=255&e;0<=--o&&(s*=256);)0>e&&0===d&&0!==this[t+o+1]&&(d=1),this[t+o]=255&(e/s>>0)-d;return t+a},n.prototype.writeInt8=function(e,t,a){return e=+e,t>>>=0,a||R(this,e,t,1,127,-128),0>e&&(e=255+e+1),this[t]=255&e,t+1},n.prototype.writeInt16LE=function(e,t,a){return e=+e,t>>>=0,a||R(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},n.prototype.writeInt16BE=function(e,t,a){return e=+e,t>>>=0,a||R(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},n.prototype.writeInt32LE=function(e,t,a){return e=+e,t>>>=0,a||R(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},n.prototype.writeInt32BE=function(e,t,a){return e=+e,t>>>=0,a||R(this,e,t,4,2147483647,-2147483648),0>e&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},n.prototype.writeFloatLE=function(e,t,a){return j(this,e,t,!0,a)},n.prototype.writeFloatBE=function(e,t,a){return j(this,e,t,!1,a)},n.prototype.writeDoubleLE=function(e,t,a){return D(this,e,t,!0,a)},n.prototype.writeDoubleBE=function(e,t,a){return D(this,e,t,!1,a)},n.prototype.copy=function(e,t,a,r){if(!n.isBuffer(e))throw new TypeError("argument should be a Buffer");if(a||(a=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),0t)throw new RangeError("targetStart out of bounds");if(0>a||a>=this.length)throw new RangeError("Index out of range");if(0>r)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-to||"latin1"===r)&&(e=o)}}else"number"==typeof e&&(e&=255);if(0>t||this.length>>=0,a=a===void 0?this.length:a>>>0,e||(e=0);var s;if("number"==typeof e)for(s=t;s */n.read=function(t,a,n,r,o){var p=8*o-r-1,u=(1<>1,f=-7,h=n?o-1:0,_=n?-1:1,d=t[a+h],g,y;for(h+=_,g=d&(1<<-f)-1,d>>=-f,f+=p;0>=-f,f+=r;0>1,b=23===f?l(2,-24)-l(2,-77):0,w=u?0:h-1,k=u?1:-1,d=0>n||0===n&&0>1/n?1:0,s,C,S;for(n=o(n),isNaN(n)||n===1/0?(C=isNaN(n)?1:0,s=y):(s=p(t(n)/_),1>n*(S=l(2,-s))&&(s--,S*=2),n+=1<=s+x?b/S:b*l(2,1-x),2<=n*S&&(s++,S/=2),s+x>=y?(C=0,s=y):1<=s+x?(C=(n*S-1)*l(2,f),s+=x):(C=n*l(2,x-1)*l(2,f),s=0));8<=f;a[r+w]=255&C,w+=k,C/=256,f-=8);for(s=s< (c) 2009-2016 Stuart Knightley Dual licenced under the MIT license or GPLv3. See https://raw.github.com/Stuk/jszip/master/LICENSE.markdown. JSZip uses the library pako released under the MIT license : https://github.com/nodeca/pako/blob/master/LICENSE */!function(t){"object"==typeof r&&"undefined"!=typeof n?n.exports=t():"function"==typeof f&&f.amd?f([],t):("undefined"==typeof window?"undefined"==typeof s?"undefined"==typeof self?this:self:s:window).JSZip=t()}(function(){return function l(s,d,o){function n(p,r){if(!d[p]){if(!s[p]){var e="function"==typeof a&&a;if(!r&&e)return e(p,!0);if(i)return i(p,!0);var t=new Error("Cannot find module '"+p+"'");throw t.code="MODULE_NOT_FOUND",t}var u=d[p]={exports:{}};s[p][0].call(u.exports,function(a){var e=s[p][1][a];return n(e||a)},u,u.exports,l,s,d,o)}return d[p].exports}for(var i="function"==typeof a&&a,t=0;t>2,b=(3&d)<<4|g>>4,w=1>6:64,k=2>4,_=(15&y)<<4|(x="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(l.charAt(p++)))>>2,g=(3&x)<<6|(b="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(l.charAt(p++))),k[c++]=m,64!==x&&(k[c++]=_),64!==b&&(k[c++]=g);return k}},{"./support":30,"./utils":32}],2:[function(r,e){"use strict";function t(a,e,t,r,n){this.compressedSize=a,this.uncompressedSize=e,this.crc32=t,this.compression=r,this.compressedContent=n}var o=r("./external"),n=r("./stream/DataWorker"),i=r("./stream/Crc32Probe"),s=r("./stream/DataLengthProbe");t.prototype={getContentWorker:function(){var a=new n(o.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new s("data_length")),e=this;return a.on("end",function(){if(this.streamInfo.data_length!==e.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),a},getCompressedWorker:function(){return new n(o.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},t.createWorkerFrom=function(a,e,t){return a.pipe(new i).pipe(new s("uncompressedSize")).pipe(e.compressWorker(t)).pipe(new s("compressedSize")).withStreamInfo("compression",e)},e.exports=t},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(a,e,t){"use strict";var r=a("./stream/GenericWorker");t.STORE={magic:"\0\0",compressWorker:function(){return new r("STORE compression")},uncompressWorker:function(){return new r("STORE decompression")}},t.DEFLATE=a("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(r,e){"use strict";var o=r("./utils"),n=function(){for(var a=[],t=0,o;256>t;t++){o=t;for(var s=0;8>s;s++)o=1&o?3988292384^o>>>1:o>>>1;a[t]=o}return a}();e.exports=function(a,e){return void 0!==a&&a.length?"string"===o.getTypeOf(a)?function(a,o,t){a^=-1;for(var r=0;r<0+t;r++)a=a>>>8^n[255&(a^o.charCodeAt(r))];return-1^a}(0|e,a,a.length):function(a,o,t){a^=-1;for(var r=0;r<0+t;r++)a=a>>>8^n[255&(a^o[r])];return-1^a}(0|e,a,a.length):0}},{"./utils":32}],5:[function(a,e,t){"use strict";t.base64=!1,t.binary=!1,t.dir=!1,t.createFolders=!0,t.date=null,t.compression=null,t.compressionOptions=null,t.comment=null,t.unixPermissions=null,t.dosPermissions=null},{}],6:[function(a,e){"use strict";var t;t="undefined"==typeof Promise?a("lie"):Promise,e.exports={Promise:t}},{lie:37}],7:[function(l,e,t){"use strict";function r(a,e){s.call(this,"FlateWorker/"+a),this._pako=null,this._pakoAction=a,this._pakoOptions=e,this.meta={}}var d="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array,n=l("pako"),i=l("./utils"),s=l("./stream/GenericWorker"),a=d?"uint8array":"array";t.magic="\b\0",i.inherits(r,s),r.prototype.processChunk=function(t){this.meta=t.meta,null===this._pako&&this._createPako(),this._pako.push(i.transformTo(a,t.data),!1)},r.prototype.flush=function(){s.prototype.flush.call(this),null===this._pako&&this._createPako(),this._pako.push([],!0)},r.prototype.cleanUp=function(){s.prototype.cleanUp.call(this),this._pako=null},r.prototype._createPako=function(){this._pako=new n[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var a=this;this._pako.onData=function(t){a.push({data:t,meta:a.meta})}},t.compressWorker=function(t){return new r("Deflate",t)},t.uncompressWorker=function(){return new r("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(a,e){"use strict";function L(a,o){var t="",s;for(s=0;s>>=8;return t}function o(N,e,t,r,n,i){var s=N.file,u=N.compression,h=i!==O.utf8encode,f=I.transformTo("string",i(s.name)),l=I.transformTo("string",O.utf8encode(s.name)),d=s.comment,c=I.transformTo("string",i(d)),p=I.transformTo("string",O.utf8encode(d)),m=l.length!==s.name.length,_=p.length!==d.length,g="",R="",P="",j=s.dir,y=s.date,k={crc32:0,compressedSize:0,uncompressedSize:0},x,D;e&&!t||(k.crc32=N.crc32,k.compressedSize=N.compressedSize,k.uncompressedSize=N.uncompressedSize);var F=0;e&&(F|=8),!h&&(m||_)&&(F|=2048);var U=0,M=0,G;j&&(U|=16),"UNIX"===n?(M=798,U|=((G=s.unixPermissions)||(G=j?16893:33204),(65535&G)<<16)):(M=20,U|=63&(s.dosPermissions||0)),x=y.getUTCHours(),x<<=6,x|=y.getUTCMinutes(),x<<=5,x|=y.getUTCSeconds()/2,D=y.getUTCFullYear()-1980,D<<=4,D|=y.getUTCMonth()+1,D<<=5,D|=y.getUTCDate(),m&&(g+="up"+L((R=L(1,1)+L(B(f),4)+l).length,2)+R),_&&(g+="uc"+L((P=L(1,1)+L(B(c),4)+p).length,2)+P);var W="";return W+="\n\0",W+=L(F,2),W+=u.magic,W+=L(x,2),W+=L(D,2),W+=L(k.crc32,4),W+=L(k.compressedSize,4),W+=L(k.uncompressedSize,4),W+=L(f.length,2),W+=L(g.length,2),{fileRecord:T.LOCAL_FILE_HEADER+W+f+g,dirRecord:T.CENTRAL_FILE_HEADER+L(M,2)+W+L(c.length,2)+"\0\0\0\0"+L(U,4)+L(r,4)+f+g+c}}function t(a,e,t,r){i.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=e,this.zipPlatform=t,this.encodeFileName=r,this.streamFiles=a,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}var I=a("../utils"),i=a("../stream/GenericWorker"),O=a("../utf8"),B=a("../crc32"),T=a("../signature");I.inherits(t,i),t.prototype.push=function(a){var e=a.meta.percent||0,t=this.entriesCount,r=this._sources.length;this.accumulate?this.contentBuffer.push(a):(this.bytesWritten+=a.data.length,i.prototype.push.call(this,{data:a.data,meta:{currentFile:this.currentFile,percent:t?(e+100*(t-r-1))/t:100}}))},t.prototype.openedSource=function(a){this.currentSourceOffset=this.bytesWritten,this.currentFile=a.file.name;var e=this.streamFiles&&!a.file.dir;if(e){var t=o(a,e,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:t.fileRecord,meta:{percent:0}})}else this.accumulate=!0},t.prototype.closedSource=function(a){this.accumulate=!1;var e=this.streamFiles&&!a.file.dir,r=o(a,e,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName),n;if(this.dirRecords.push(r.dirRecord),e)this.push({data:(n=a,T.DATA_DESCRIPTOR+L(n.crc32,4)+L(n.compressedSize,4)+L(n.uncompressedSize,4)),meta:{percent:100}});else for(this.push({data:r.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},t.prototype.flush=function(){for(var l=this.bytesWritten,e=0;et)throw new Error("End of data reached (data length = "+this.length+", asked index = "+t+"). Corrupted zip ?")},setIndex:function(t){this.checkIndex(t),this.index=t},skip:function(t){this.setIndex(this.index+t)},byteAt:function(){},readInt:function(a){var e=0,n;for(this.checkOffset(a),n=this.index+a-1;n>=this.index;n--)e=(e<<8)+this.byteAt(n);return this.index+=a,e},readString:function(t){return r.transformTo("string",this.readData(t))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var t=this.readInt(4);return new Date(Date.UTC(1980+(127&t>>25),(15&t>>21)-1,31&t>>16,31&t>>11,63&t>>5,(31&t)<<1))}},e.exports=t},{"../utils":32}],19:[function(a,e){"use strict";function t(t){r.call(this,t)}var r=a("./Uint8ArrayReader");a("../utils").inherits(t,r),t.prototype.readData=function(a){this.checkOffset(a);var e=this.data.slice(this.zero+this.index,this.zero+this.index+a);return this.index+=a,e},e.exports=t},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(a,e){"use strict";function t(t){r.call(this,t)}var r=a("./DataReader");a("../utils").inherits(t,r),t.prototype.byteAt=function(t){return this.data.charCodeAt(this.zero+t)},t.prototype.lastIndexOfSignature=function(t){return this.data.lastIndexOf(t)-this.zero},t.prototype.readAndCheckSignature=function(t){return t===this.readData(4)},t.prototype.readData=function(a){this.checkOffset(a);var e=this.data.slice(this.zero+this.index,this.zero+this.index+a);return this.index+=a,e},e.exports=t},{"../utils":32,"./DataReader":18}],21:[function(a,e){"use strict";function t(t){r.call(this,t)}var r=a("./ArrayReader");a("../utils").inherits(t,r),t.prototype.readData=function(a){if(this.checkOffset(a),0===a)return new Uint8Array(0);var e=this.data.subarray(this.zero+this.index,this.zero+this.index+a);return this.index+=a,e},e.exports=t},{"../utils":32,"./ArrayReader":17}],22:[function(r,e){"use strict";var l=r("../utils"),n=r("../support"),i=r("./ArrayReader"),s=r("./StringReader"),a=r("./NodeBufferReader"),o=r("./Uint8ArrayReader");e.exports=function(r){var e=l.getTypeOf(r);return l.checkSupport(e),"string"!==e||n.uint8array?"nodebuffer"===e?new a(r):n.uint8array?new o(l.transformTo("uint8array",r)):new i(l.transformTo("array",r)):new s(r)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(a,e,t){"use strict";t.LOCAL_FILE_HEADER="PK\x03\x04",t.CENTRAL_FILE_HEADER="PK\x01\x02",t.CENTRAL_DIRECTORY_END="PK\x05\x06",t.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x06\x07",t.ZIP64_CENTRAL_DIRECTORY_END="PK\x06\x06",t.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(a,e){"use strict";function t(t){r.call(this,"ConvertWorker to "+t),this.destType=t}var r=a("./GenericWorker"),n=a("../utils");n.inherits(t,r),t.prototype.processChunk=function(t){this.push({data:n.transformTo(this.destType,t.data),meta:t.meta})},e.exports=t},{"../utils":32,"./GenericWorker":28}],25:[function(a,e){"use strict";function t(){r.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}var r=a("./GenericWorker"),n=a("../crc32");a("../utils").inherits(t,r),t.prototype.processChunk=function(t){this.streamInfo.crc32=n(t.data,this.streamInfo.crc32||0),this.push(t)},e.exports=t},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(a,e){"use strict";function t(t){n.call(this,"DataLengthProbe for "+t),this.propName=t,this.withStreamInfo(t,0)}var r=a("../utils"),n=a("./GenericWorker");r.inherits(t,n),t.prototype.processChunk=function(a){if(a){var e=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=e+a.data.length}n.prototype.processChunk.call(this,a)},e.exports=t},{"../utils":32,"./GenericWorker":28}],27:[function(a,e){"use strict";function t(a){n.call(this,"DataWorker");var o=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,a.then(function(t){o.dataIsReady=!0,o.data=t,o.max=t&&t.length||0,o.type=r.getTypeOf(t),o.isPaused||o._tickAndRepeat()},function(t){o.error(t)})}var r=a("../utils"),n=a("./GenericWorker");r.inherits(t,n),t.prototype.cleanUp=function(){n.prototype.cleanUp.call(this),this.data=null},t.prototype.resume=function(){return!!n.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,r.delay(this._tickAndRepeat,[],this)),!0)},t.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(r.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},t.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var a=null,n=d(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":a=this.data.substring(this.index,n);break;case"uint8array":a=this.data.subarray(this.index,n);break;case"array":case"nodebuffer":a=this.data.slice(this.index,n);}return this.index=n,this.push({data:a,meta:{percent:this.max?100*(this.index/this.max):0}})},e.exports=t},{"../utils":32,"./GenericWorker":28}],28:[function(a,e){"use strict";function t(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}t.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(a,e){return this._listeners[a].push(e),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(a,e){if(this._listeners[a])for(var t=0;t "+t:t}},e.exports=t},{}],29:[function(r,e){"use strict";function t(a,e,t){var r=e;"blob"===e||"arraybuffer"===e?r="uint8array":"base64"===e?r="string":void 0;try{this._internalType=r,this._outputType=e,this._mimeType=t,d.checkSupport(r),this._worker=a.pipe(new p(r)),a.lock()}catch(t){this._worker=new i("error"),this._worker.error(t)}}var d=r("../utils"),p=r("./ConvertWorker"),i=r("./GenericWorker"),s=r("../base64"),u=r("../support"),n=r("../external"),a=null;if(u.nodestream)try{a=r("../nodejs/NodejsStreamOutputAdapter")}catch(t){}t.prototype={accumulate:function(t){return e=this,a=t,new n.Promise(function(o,t){var r=[],p=e._internalType,i=e._outputType,u=e._mimeType;e.on("data",function(n,e){r.push(n),a&&a(e)}).on("error",function(a){r=[],t(a)}).on("end",function(){try{var a=function(a,e,t){return"blob"===a?d.newBlob(d.transformTo("arraybuffer",e),t):"base64"===a?s.encode(e):d.transformTo(a,e)}(i,function(a,e){var t=0,o=null,d=0,p;for(p=0;pn;n++)u[n]=252<=n?6:248<=n?5:240<=n?4:224<=n?3:192<=n?2:1;u[254]=u[254]=1,d.utf8encode=function(t){return c.nodebuffer?o.newBufferFrom(t,"utf-8"):function(l){var e=l.length,a=0,d,p,u,m,f;for(m=0;mp?1:2048>p?2:65536>p?3:4;for(d=c.uint8array?new Uint8Array(a):Array(a),m=f=0;fp?d[f++]=p:(2048>p?d[f++]=192|p>>>6:(65536>p?d[f++]=224|p>>>12:(d[f++]=240|p>>>18,d[f++]=128|63&p>>>12),d[f++]=128|63&p>>>6),d[f++]=128|63&p);return d}(t)},d.utf8decode=function(t){return c.nodebuffer?p.transformTo("nodebuffer",t).toString("utf-8"):function(o){var e=o.length,s=Array(2*e),l,d,c,m;for(l=d=0;l(c=o[l++]))s[d++]=c;else if(4<(m=u[c]))s[d++]=65533,l+=m-1;else{for(c&=2===m?31:3===m?15:7;1c?s[d++]=c:(c-=65536,s[d++]=55296|1023&c>>10,s[d++]=56320|1023&c)}return s.length!==d&&(s.subarray?s=s.subarray(0,d):s.length=d),p.applyFromCharCode(s)}(t=p.transformTo(c.uint8array?"uint8array":"array",t))},p.inherits(t,r),t.prototype.processChunk=function(a){var e=p.transformTo(c.uint8array?"uint8array":"array",a.data);if(this.leftOver&&this.leftOver.length){if(c.uint8array){var o=e;(e=new Uint8Array(o.length+this.leftOver.length)).set(this.leftOver,0),e.set(o,this.leftOver.length)}else e=this.leftOver.concat(e);this.leftOver=null}var r=function(a,e){var n;for((e=e||a.length)>a.length&&(e=a.length),n=e-1;0<=n&&128==(192&a[n]);)n--;return 0>n?e:0===n?e:n+u[a[n]]>e?n:e}(e),n=e;r!==e.length&&(c.uint8array?(n=e.subarray(0,r),this.leftOver=e.subarray(r,e.length)):(n=e.slice(0,r),this.leftOver=e.slice(r,e.length))),this.push({data:d.utf8decode(n),meta:a.meta})},t.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:d.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},d.Utf8DecodeWorker=t,p.inherits(a,r),a.prototype.processChunk=function(t){this.push({data:d.utf8encode(t.data),meta:t.meta})},d.Utf8EncodeWorker=a},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(_,e,g){"use strict";function t(t){return t}function o(a,e){for(var t=0;t(o=a.charCodeAt(s))?"0":"")+o.toString(16).toUpperCase();return e},g.delay=function(a,e,t){y(function(){a.apply(t||null,e||[])})},g.inherits=function(a,e){function t(){}t.prototype=e.prototype,a.prototype=new t},g.extend=function(){var a={},n,r;for(n=0;na)throw this.isSignature(0,i.LOCAL_FILE_HEADER)?new Error("Corrupted zip: can't find end of central directory"):new Error("Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html");this.reader.setIndex(a);var s=a;if(this.checkSignature(i.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===d.MAX_VALUE_16BITS||this.diskWithCentralDirStart===d.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===d.MAX_VALUE_16BITS||this.centralDirRecords===d.MAX_VALUE_16BITS||this.centralDirSize===d.MAX_VALUE_32BITS||this.centralDirOffset===d.MAX_VALUE_32BITS){if(this.zip64=!0,0>(a=this.reader.lastIndexOfSignature(i.ZIP64_CENTRAL_DIRECTORY_LOCATOR)))throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(a),this.checkSignature(i.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,i.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(i.ZIP64_CENTRAL_DIRECTORY_END),0>this.relativeOffsetEndOfZip64CentralDir))throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(i.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var t=this.centralDirOffset+this.centralDirSize;this.zip64&&(t+=20,t+=12+this.zip64EndOfCentralSize);var l=s-t;if(0l)throw new Error("Corrupted zip: missing "+o(l)+" bytes.")},prepareReader:function(t){this.reader=l(t)},load:function(t){this.prepareReader(t),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},e.exports=t},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utf8":31,"./utils":32,"./zipEntry":34}],34:[function(r,e){"use strict";function t(a,e){this.options=a,this.loadOptions=e}var l=r("./reader/readerFor"),n=r("./utils"),s=r("./compressedObject"),i=r("./crc32"),a=r("./utf8"),o=r("./compressions"),d=r("./support");t.prototype={isEncrypted:function(){return 1==(1&this.bitFlag)},useUTF8:function(){return 2048==(2048&this.bitFlag)},readLocalPart:function(a){var e,i;if(a.skip(22),this.fileNameLength=a.readInt(2),i=a.readInt(2),this.fileName=a.readData(this.fileNameLength),a.skip(i),-1===this.compressedSize||-1===this.uncompressedSize)throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if(null===(e=function(a){for(var e in o)if(o.hasOwnProperty(e)&&o[e].magic===a)return o[e];return null}(this.compressionMethod)))throw new Error("Corrupted zip : compression "+n.pretty(this.compressionMethod)+" unknown (inner file : "+n.transformTo("string",this.fileName)+")");this.decompressed=new s(this.compressedSize,this.uncompressedSize,this.crc32,e,a.readData(this.compressedSize))},readCentralPart:function(a){this.versionMadeBy=a.readInt(2),a.skip(2),this.bitFlag=a.readInt(2),this.compressionMethod=a.readString(2),this.date=a.readDate(),this.crc32=a.readInt(4),this.compressedSize=a.readInt(4),this.uncompressedSize=a.readInt(4);var e=a.readInt(2);if(this.extraFieldsLength=a.readInt(2),this.fileCommentLength=a.readInt(2),this.diskNumberStart=a.readInt(2),this.internalFileAttributes=a.readInt(2),this.externalFileAttributes=a.readInt(4),this.localHeaderOffset=a.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");a.skip(e),this.readExtraFields(a),this.parseZIP64ExtraField(a),this.fileComment=a.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var t=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),0==t&&(this.dosPermissions=63&this.externalFileAttributes),3==t&&(this.unixPermissions=65535&this.externalFileAttributes>>16),this.dir||"/"!==this.fileNameStr.slice(-1)||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var e=l(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(a){var e=a.index+this.extraFieldsLength,o,s,i;for(this.extraFields||(this.extraFields={});a.index+4e.windowBits&&(e.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new i,this.strm.avail_out=0;var t=p.deflateInit2(this.strm,e.level,e.method,e.windowBits,e.memLevel,e.strategy);if(t!==0)throw new Error(u[t]);if(e.header&&p.deflateSetHeader(this.strm,e.header),e.dictionary){var l;if(l="string"==typeof e.dictionary?o.string2buf(e.dictionary):"[object ArrayBuffer]"===c.call(e.dictionary)?new Uint8Array(e.dictionary):e.dictionary,0!==(t=p.deflateSetDictionary(this.strm,l)))throw new Error(u[t]);this._dict_set=!0}}function r(a,e){var t=new d(e);if(t.push(a,!0),t.err)throw t.msg||u[t.err];return t.result}var p=l("./zlib/deflate"),a=l("./utils/common"),o=l("./utils/strings"),u=l("./zlib/messages"),i=l("./zlib/zstream"),c=Object.prototype.toString;d.prototype.push=function(l,e){var t=this.strm,i=this.options.chunkSize,s,d;if(this.ended)return!1;d=e===~~e?e:!0===e?4:0,t.input="string"==typeof l?o.string2buf(l):"[object ArrayBuffer]"===c.call(l)?new Uint8Array(l):l,t.next_in=0,t.avail_in=t.input.length;do{if(0===t.avail_out&&(t.output=new a.Buf8(i),t.next_out=0,t.avail_out=i),1!==(s=p.deflate(t,d))&&s!==0)return this.onEnd(s),!(this.ended=!0);0!==t.avail_out&&(0!==t.avail_in||4!==d&&2!==d)||("string"===this.options.to?this.onData(o.buf2binstring(a.shrinkBuf(t.output,t.next_out))):this.onData(a.shrinkBuf(t.output,t.next_out)))}while((0e.windowBits&&(e.windowBits=-e.windowBits,0===e.windowBits&&(e.windowBits=-15)),!(0<=e.windowBits&&16>e.windowBits)||a&&a.windowBits||(e.windowBits+=32),15e.windowBits&&0==(15&e.windowBits)&&(e.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new n,this.strm.avail_out=0;var t=g.inflateInit2(this.strm,e.windowBits);if(t!==p.Z_OK)throw new Error(o[t]);this.header=new i,g.inflateGetHeader(this.strm,this.header)}function a(a,e){var t=new u(e);if(t.push(a,!0),t.err)throw t.msg||o[t.err];return t.result}var g=l("./zlib/inflate"),d=l("./utils/common"),c=l("./utils/strings"),p=l("./zlib/constants"),o=l("./zlib/messages"),n=l("./zlib/zstream"),i=l("./zlib/gzheader"),m=Object.prototype.toString;u.prototype.push=function(_,e){var t=this.strm,u=this.options.chunkSize,h=this.options.dictionary,f=!1,y,x,b,w,k,C;if(this.ended)return!1;x=e===~~e?e:!0===e?p.Z_FINISH:p.Z_NO_FLUSH,t.input="string"==typeof _?c.binstring2buf(_):"[object ArrayBuffer]"===m.call(_)?new Uint8Array(_):_,t.next_in=0,t.avail_in=t.input.length;do{if(0===t.avail_out&&(t.output=new d.Buf8(u),t.next_out=0,t.avail_out=u),(y=g.inflate(t,p.Z_NO_FLUSH))===p.Z_NEED_DICT&&h&&(C="string"==typeof h?c.string2buf(h):"[object ArrayBuffer]"===m.call(h)?new Uint8Array(h):h,y=g.inflateSetDictionary(this.strm,C)),y===p.Z_BUF_ERROR&&!0===f&&(y=p.Z_OK,f=!1),y!==p.Z_STREAM_END&&y!==p.Z_OK)return this.onEnd(y),!(this.ended=!0);t.next_out&&(0!==t.avail_out&&y!==p.Z_STREAM_END&&(0!==t.avail_in||x!==p.Z_FINISH&&x!==p.Z_SYNC_FLUSH)||("string"===this.options.to?(b=c.utf8border(t.output,t.next_out),w=t.next_out-b,k=c.buf2string(t.output,b),t.next_out=w,t.avail_out=u-w,w&&d.arraySet(t.output,t.output,b,w,0),this.onData(k)):this.onData(d.shrinkBuf(t.output,t.next_out)))),0===t.avail_in&&0===t.avail_out&&(f=!0)}while((0e&&(a.subarray&&p||!a.subarray&&o))return m.apply(null,d.shrinkBuf(a,e));for(var t="",s=0;sr;r++)u[r]=252<=r?6:248<=r?5:240<=r?4:224<=r?3:192<=r?2:1;u[254]=u[254]=1,t.string2buf=function(l){var e=l.length,a=0,p,u,c,m,f;for(m=0;mu?1:2048>u?2:65536>u?3:4;for(p=new d.Buf8(a),m=f=0;fu?p[f++]=u:(2048>u?p[f++]=192|u>>>6:(65536>u?p[f++]=224|u>>>12:(p[f++]=240|u>>>18,p[f++]=128|63&u>>>12),p[f++]=128|63&u>>>6),p[f++]=128|63&u);return p},t.buf2binstring=function(t){return l(t,t.length)},t.binstring2buf=function(a){for(var e=new d.Buf8(a.length),t=0,o=e.length;t(c=d[o++]))a[p++]=c;else if(4<(m=u[c]))a[p++]=65533,o+=m-1;else{for(c&=2===m?31:3===m?15:7;1c?a[p++]=c:(c-=65536,a[p++]=55296|1023&c>>10,a[p++]=56320|1023&c)}return l(a,p)},t.utf8border=function(a,e){var n;for((e=e||a.length)>a.length&&(e=a.length),n=e-1;0<=n&&128==(192&a[n]);)n--;return 0>n?e:0===n?e:n+u[a[n]]>e?n:e}},{"./common":41}],43:[function(a,e){"use strict";e.exports=function(o,e,t,l){for(var d=0|65535&o,p=0|65535&o>>>16,u=0;0!==t;){for(t-=u=2e3t;t++){o=t;for(var s=0;8>s;s++)o=1&o?3988292384^o>>>1:o>>>1;a[t]=o}return a}();e.exports=function(o,i,t,r){o^=-1;for(var n=r;n>>8^s[255&(o^i[n])];return-1^o}},{}],46:[function(a,e,t){"use strict";function l(a,e){return a.msg=p[e],e}function m(t){return(t<<1)-(4a.avail_out&&(t=a.avail_out),0!==t&&(v.arraySet(a.output,e.pending_buf,e.pending_out,t,a.next_out),a.next_out+=t,e.pending_out+=t,a.total_out+=t,a.avail_out-=t,e.pending-=t,0===e.pending&&(e.pending_out=0))}function o(a,e){d._tr_flush_block(a,0<=a.block_start?a.block_start:-1,a.strstart-a.block_start,e),a.block_start=a.strstart,f(a.strm)}function g(a,e){a.pending_buf[a.pending++]=e}function y(a,e){a.pending_buf[a.pending++]=255&e>>>8,a.pending_buf[a.pending++]=255&e}function s(m,e){var _=m.max_chain_length,g=m.strstart,y=m.prev_length,x=m.nice_match,b=m.strstart>m.w_size-262?m.strstart-(m.w_size-262):0,u=m.window,h=m.w_mask,f=m.prev,l=m.strstart+258,d=u[g+y-1],w=u[g+y],k,C;m.prev_length>=m.good_match&&(_>>=2),x>m.lookahead&&(x=m.lookahead);do if(u[(k=e)+y]===w&&u[k+y-1]===d&&u[k]===u[g]&&u[++k]===u[g+1]){g+=2,k++;do;while(u[++g]===u[++k]&&u[++g]===u[++k]&&u[++g]===u[++k]&&u[++g]===u[++k]&&u[++g]===u[++k]&&u[++g]===u[++k]&&u[++g]===u[++k]&&u[++g]===u[++k]&&gb&&0!=--_);return y<=m.lookahead?y:m.lookahead}function x(d){var e=d.w_size,l,p,m,_,g,y,x,b,w,k;do{if(_=d.window_size-d.lookahead-d.strstart,d.strstart>=e+(e-262)){for(v.arraySet(d.window,d.window,e,e,0),d.match_start-=e,d.strstart-=e,d.block_start-=e,l=p=d.hash_size;m=d.head[--l],d.head[l]=e<=m?m-e:0,--p;);for(l=p=e;m=d.prev[--l],d.prev[l]=e<=m?m-e:0,--p;);_+=e}if(0===d.strm.avail_in)break;if(y=d.strm,x=d.window,b=d.strstart+d.lookahead,k=void 0,(w=_)<(k=y.avail_in)&&(k=w),p=0===k?0:(y.avail_in-=k,v.arraySet(x,y.input,y.next_in,k,b),1===y.state.wrap?y.adler=E(y.adler,x,k,b):2===y.state.wrap&&(y.adler=c(y.adler,x,k,b)),y.next_in+=k,y.total_in+=k,k),d.lookahead+=p,3<=d.lookahead+d.insert)for(g=d.strstart-d.insert,d.ins_h=d.window[g],d.ins_h=(d.ins_h<d.lookahead+d.insert)););}while(d.lookahead<262&&0!==d.strm.avail_in)}function r(a,e){for(var t,i;;){if(a.lookahead<262){if(x(a),a.lookahead<262&&e===0)return 1;if(0===a.lookahead)break}if(t=0,3<=a.lookahead&&(a.ins_h=(a.ins_h<=a.match_length&&(1===a.strategy||3===a.match_length&&4096e.wrap&&(e.wrap=-e.wrap),e.status=e.wrap?42:113,a.adler=2===e.wrap?0:1,e.last_flush=0,d._tr_init(e),0):l(a,-2)}function C(a){var e=k(a),n;return e===0&&((n=a.state).window_size=2*n.w_size,_(n.head),n.max_lazy_match=h[n.level].max_lazy,n.good_match=h[n.level].good_length,n.nice_match=h[n.level].nice_length,n.max_chain_length=h[n.level].max_chain,n.strstart=0,n.block_start=0,n.lookahead=0,n.insert=0,n.match_length=n.prev_length=2,n.match_available=0,n.ins_h=0),e}function S(d,e,p,r,u,i){if(!d)return-2;var s=1;if(-1===e&&(e=6),0>r?(s=0,r=-r):15u||9r||15e||9i||4a.pending_buf_size-5&&(t=a.pending_buf_size-5);;){if(1>=a.lookahead){if(x(a),0===a.lookahead&&e===0)return 1;if(0===a.lookahead)break}a.strstart+=a.lookahead,a.lookahead=0;var s=a.block_start+t;if((0===a.strstart||a.strstart>=s)&&(a.lookahead=a.strstart-s,a.strstart=s,o(a,!1),0===a.strm.avail_out))return 1;if(a.strstart-a.block_start>=a.w_size-262&&(o(a,!1),0===a.strm.avail_out))return 1}return a.insert=0,4===e?(o(a,!0),0===a.strm.avail_out?3:4):(a.strstart>a.block_start&&(o(a,!1),a.strm.avail_out),1)}),new b(4,4,8,4,r),new b(4,5,16,8,r),new b(4,6,32,32,r),new b(4,4,16,16,i),new b(8,16,32,32,i),new b(8,16,128,128,i),new b(8,32,128,256,i),new b(32,128,258,1024,i),new b(32,258,258,4096,i)],t.deflateInit=function(a,e){return S(a,e,8,15,8,0)},t.deflateInit2=S,t.deflateReset=C,t.deflateResetKeep=k,t.deflateSetHeader=function(a,e){return a&&a.state?2===a.state.wrap?(a.state.gzhead=e,0):-2:-2},t.deflate=function(p,e){var t,u,b,w;if(!p||!p.state||5e)return p?l(p,-2):-2;if(u=p.state,!p.output||!p.input&&0!==p.avail_in||666===u.status&&4!==e)return l(p,0===p.avail_out?-5:-2);if(u.strm=p,t=u.last_flush,u.last_flush=e,42===u.status)if(2===u.wrap)p.adler=0,g(u,31),g(u,139),g(u,8),u.gzhead?(g(u,(u.gzhead.text?1:0)+(u.gzhead.hcrc?2:0)+(u.gzhead.extra?4:0)+(u.gzhead.name?8:0)+(u.gzhead.comment?16:0)),g(u,255&u.gzhead.time),g(u,255&u.gzhead.time>>8),g(u,255&u.gzhead.time>>16),g(u,255&u.gzhead.time>>24),g(u,9===u.level?2:2<=u.strategy||2>u.level?4:0),g(u,255&u.gzhead.os),u.gzhead.extra&&u.gzhead.extra.length&&(g(u,255&u.gzhead.extra.length),g(u,255&u.gzhead.extra.length>>8)),u.gzhead.hcrc&&(p.adler=c(p.adler,u.pending_buf,u.pending,0)),u.gzindex=0,u.status=69):(g(u,0),g(u,0),g(u,0),g(u,0),g(u,0),g(u,9===u.level?2:2<=u.strategy||2>u.level?4:0),g(u,3),u.status=113);else{var k=8+(u.w_bits-8<<4)<<8;k|=(2<=u.strategy||2>u.level?0:6>u.level?1:6===u.level?2:3)<<6,0!==u.strstart&&(k|=32),k+=31-k%31,u.status=113,y(u,k),0!==u.strstart&&(y(u,p.adler>>>16),y(u,65535&p.adler)),p.adler=1}if(69===u.status)if(u.gzhead.extra){for(b=u.pending;u.gzindex<(65535&u.gzhead.extra.length)&&(u.pending!==u.pending_buf_size||(u.gzhead.hcrc&&u.pending>b&&(p.adler=c(p.adler,u.pending_buf,u.pending-b,b)),f(p),b=u.pending,u.pending!==u.pending_buf_size));)g(u,255&u.gzhead.extra[u.gzindex]),u.gzindex++;u.gzhead.hcrc&&u.pending>b&&(p.adler=c(p.adler,u.pending_buf,u.pending-b,b)),u.gzindex===u.gzhead.extra.length&&(u.gzindex=0,u.status=73)}else u.status=73;if(73===u.status)if(u.gzhead.name){b=u.pending;do{if(u.pending===u.pending_buf_size&&(u.gzhead.hcrc&&u.pending>b&&(p.adler=c(p.adler,u.pending_buf,u.pending-b,b)),f(p),b=u.pending,u.pending===u.pending_buf_size)){w=1;break}w=u.gzindexb&&(p.adler=c(p.adler,u.pending_buf,u.pending-b,b)),0===w&&(u.gzindex=0,u.status=91)}else u.status=91;if(91===u.status)if(u.gzhead.comment){b=u.pending;do{if(u.pending===u.pending_buf_size&&(u.gzhead.hcrc&&u.pending>b&&(p.adler=c(p.adler,u.pending_buf,u.pending-b,b)),f(p),b=u.pending,u.pending===u.pending_buf_size)){w=1;break}w=u.gzindexb&&(p.adler=c(p.adler,u.pending_buf,u.pending-b,b)),0===w&&(u.status=103)}else u.status=103;if(103===u.status&&(u.gzhead.hcrc?(u.pending+2>u.pending_buf_size&&f(p),u.pending+2<=u.pending_buf_size&&(g(u,255&p.adler),g(u,255&p.adler>>8),p.adler=0,u.status=113)):u.status=113),0!==u.pending){if(f(p),0===p.avail_out)return u.last_flush=-1,0;}else if(0===p.avail_in&&m(e)<=m(t)&&4!==e)return l(p,-5);if(666===u.status&&0!==p.avail_in)return l(p,-5);if(0!==p.avail_in||0!==u.lookahead||0!==e&&666!==u.status){var C=2===u.strategy?function(a,e){for(var t;;){if(0===a.lookahead&&(x(a),0===a.lookahead)){if(0===e)return 1;break}if(a.match_length=0,t=d._tr_tally(a,0,a.window[a.strstart]),a.lookahead--,a.strstart++,t&&(o(a,!1),0===a.strm.avail_out))return 1}return a.insert=0,4===e?(o(a,!0),0===a.strm.avail_out?3:4):a.last_lit&&(o(a,!1),0===a.strm.avail_out)?1:2}(u,e):3===u.strategy?function(l,e){for(var t=l.window,a,p,u,c;;){if(258>=l.lookahead){if(x(l),258>=l.lookahead&&0===e)return 1;if(0===l.lookahead)break}if(l.match_length=0,3<=l.lookahead&&0l.lookahead&&(l.match_length=l.lookahead)}if(3<=l.match_length?(a=d._tr_tally(l,1,l.match_length-3),l.lookahead-=l.match_length,l.strstart+=l.match_length,l.match_length=0):(a=d._tr_tally(l,0,l.window[l.strstart]),l.lookahead--,l.strstart++),a&&(o(l,!1),0===l.strm.avail_out))return 1}return l.insert=0,4===e?(o(l,!0),0===l.strm.avail_out?3:4):l.last_lit&&(o(l,!1),0===l.strm.avail_out)?1:2}(u,e):h[u.level].func(u,e);if(3!==C&&4!==C||(u.status=666),1===C||3===C)return 0===p.avail_out&&(u.last_flush=-1),0;if(2===C&&(1===e?d._tr_align(u):5!=e&&(d._tr_stored_block(u,0,0,!1),3==e&&(_(u.head),0===u.lookahead&&(u.strstart=0,u.block_start=0,u.insert=0))),f(p),0===p.avail_out))return u.last_flush=-1,0}return 4===e?0>=u.wrap?1:(2===u.wrap?(g(u,255&p.adler),g(u,255&p.adler>>8),g(u,255&p.adler>>16),g(u,255&p.adler>>24),g(u,255&p.total_in),g(u,255&p.total_in>>8),g(u,255&p.total_in>>16),g(u,255&p.total_in>>24)):(y(u,p.adler>>>16),y(u,65535&p.adler)),f(p),0=p.w_size&&(0===g&&(_(p.head),p.strstart=0,p.block_start=0,p.insert=0),k=new v.Buf8(p.w_size),v.arraySet(k,e,d-p.w_size,p.w_size,0),e=k,d=p.w_size),y=l.avail_in,b=l.next_in,w=l.input,l.avail_in=d,l.next_in=0,l.input=e,x(p);p.lookahead>=3;){for(c=p.strstart,m=p.lookahead-2;p.ins_h=(p.ins_h<F&&(D+=X[A++]<>>=q=Z>>>24,F-=q,0==(q=255&Z>>>16))Y[O++]=65535&Z;else{if(!(16&q)){if(0==(64&q)){Z=U[(65535&Z)+(D&(1<>>=q,F-=q),15>F&&(D+=X[A++]<>>=q=Z>>>24,F-=q,!(16&(q=255&Z>>>16))){if(0==(64&q)){Z=M[(65535&Z)+(D&(1<>>=q,F-=q,(q=O-B)>3,D&=(1<<(F-=H<<3))-1,C.next_in=A,C.next_out=O,C.avail_in=A>>24)+(65280&t>>>8)+((65280&t)<<8)+((255&t)<<24)}function i(){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 P.Buf16(320),this.work=new P.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function r(a){var e;return a&&a.state?(e=a.state,a.total_in=a.total_out=e.total=0,a.msg="",e.wrap&&(a.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 P.Buf32(852),e.distcode=e.distdyn=new P.Buf32(592),e.sane=1,e.back=-1,0):-2}function a(a){var e;return a&&a.state?((e=a.state).wsize=0,e.whave=0,e.wnext=0,r(a)):-2}function o(o,e){var s,i;return o&&o.state?(i=o.state,0>e?(s=0,e=-e):(s=1+(e>>4),48>e&&(e&=15)),e&&(8>e||15e;)a.lens[e++]=8;for(;256>e;)a.lens[e++]=9;for(;280>e;)a.lens[e++]=7;for(;288>e;)a.lens[e++]=8;for(B(1,a.lens,0,288,h,0,a.work,{bits:9}),e=0;32>e;)a.lens[e++]=5;B(2,a.lens,0,32,_,0,a.work,{bits:5}),u=!1}a.lencode=h,a.lenbits=9,a.distcode=_,a.distbits=5}function L(a,e,t,r){var o=a.state,s;return null===o.window&&(o.wsize=1<=o.wsize?(P.arraySet(o.window,e,t-o.wsize,o.wsize,0),o.wnext=0,o.whave=o.wsize):(r<(s=o.wsize-o.wnext)&&(s=r),P.arraySet(o.window,e,t-r,s,o.wnext),(r-=s)?(P.arraySet(o.window,e,t-r,r,0),o.wnext=r,o.whave=o.wsize):(o.wnext+=s,o.wnext===o.wsize&&(o.wnext=0),o.whaveZ;){if(0===M)break e;M--,W+=j[F++]<>>8,A.check=O(A.check,R,2,0),Z=W=0,A.mode=2;break}if(A.flags=0,A.head&&(A.head.done=!1),!(1&A.wrap)||(((255&W)<<8)+(W>>8))%31){T.msg="incorrect header check",A.mode=30;break}if(8!=(15&W)){T.msg="unknown compression method",A.mode=30;break}if(Z-=4,ae=8+(15&(W>>>=4)),0===A.wbits)A.wbits=ae;else if(ae>A.wbits){T.msg="invalid window size",A.mode=30;break}A.dmax=1<Z;){if(0===M)break e;M--,W+=j[F++]<>8),512&A.flags&&(R[0]=255&W,R[1]=255&W>>>8,A.check=O(A.check,R,2,0)),Z=W=0,A.mode=3;case 3:for(;32>Z;){if(0===M)break e;M--,W+=j[F++]<>>8,R[2]=255&W>>>16,R[3]=255&W>>>24,A.check=O(A.check,R,4,0)),Z=W=0,A.mode=4;case 4:for(;16>Z;){if(0===M)break e;M--,W+=j[F++]<>8),512&A.flags&&(R[0]=255&W,R[1]=255&W>>>8,A.check=O(A.check,R,2,0)),Z=W=0,A.mode=5;case 5:if(1024&A.flags){for(;16>Z;){if(0===M)break e;M--,W+=j[F++]<>>8,A.check=O(A.check,R,2,0)),Z=W=0}else A.head&&(A.head.extra=null);A.mode=6;case 6:if(1024&A.flags&&(M<(K=A.length)&&(K=M),K&&(A.head&&(ae=A.head.extra_len-A.length,A.head.extra||(A.head.extra=Array(A.head.extra_len)),P.arraySet(A.head.extra,j,F,K,ae)),512&A.flags&&(A.check=O(A.check,j,K,F)),M-=K,F+=K,A.length-=K),A.length))break e;A.length=0,A.mode=7;case 7:if(2048&A.flags){if(0===M)break e;for(K=0;ae=j[F+K++],A.head&&ae&&65536>A.length&&(A.head.name+=m(ae)),ae&&KA.length&&(A.head.comment+=m(ae)),ae&&KZ;){if(0===M)break e;M--,W+=j[F++]<>9,A.head.done=!0),T.adler=A.check=0,A.mode=12;break;case 10:for(;32>Z;){if(0===M)break e;M--,W+=j[F++]<>>=7&Z,Z-=7&Z,A.mode=27;break}for(;3>Z;){if(0===M)break e;M--,W+=j[F++]<>>=1)){case 0:A.mode=14;break;case 1:if(p(A),A.mode=20,6!==e)break;W>>>=2,Z-=2;break e;case 2:A.mode=17;break;case 3:T.msg="invalid block type",A.mode=30;}W>>>=2,Z-=2;break;case 14:for(W>>>=7&Z,Z-=7&Z;32>Z;){if(0===M)break e;M--,W+=j[F++]<>>16)){T.msg="invalid stored block lengths",A.mode=30;break}if(A.length=65535&W,Z=W=0,A.mode=15,6===e)break e;case 15:A.mode=16;case 16:if(K=A.length){if(MZ;){if(0===M)break e;M--,W+=j[F++]<>>=5,Z-=5,A.ndist=1+(31&W),W>>>=5,Z-=5,A.ncode=4+(15&W),W>>>=4,Z-=4,286Z;){if(0===M)break e;M--,W+=j[F++]<>>=3,Z-=3}for(;19>A.have;)A.lens[C[A.have++]]=0;if(A.lencode=A.lendyn,A.lenbits=7,re={bits:A.lenbits},ne=B(0,A.lens,0,19,A.lencode,0,A.work,re),A.lenbits=re.bits,ne){T.msg="invalid code lengths set",A.mode=30;break}A.have=0,A.mode=19;case 19:for(;A.have>>16,V=65535&t,!((X=t>>>24)<=Z);){if(0===M)break e;M--,W+=j[F++]<V)W>>>=X,Z-=X,A.lens[A.have++]=V;else{if(16===V){for(oe=X+2;Z>>=X,Z-=X,0===A.have){T.msg="invalid bit length repeat",A.mode=30;break}ae=A.lens[A.have-1],K=3+(3&W),W>>>=2,Z-=2}else if(17===V){for(oe=X+3;Z>>=X)),W>>>=3,Z-=3}else{for(oe=X+7;Z>>=X)),W>>>=7,Z-=7}if(A.have+K>A.nlen+A.ndist){T.msg="invalid bit length repeat",A.mode=30;break}for(;K--;)A.lens[A.have++]=ae}}if(30===A.mode)break;if(0===A.lens[256]){T.msg="invalid code -- missing end-of-block",A.mode=30;break}if(A.lenbits=9,re={bits:A.lenbits},ne=B(1,A.lens,0,A.nlen,A.lencode,0,A.work,re),A.lenbits=re.bits,ne){T.msg="invalid literal/lengths set",A.mode=30;break}if(A.distbits=6,A.distcode=A.distdyn,re={bits:A.distbits},ne=B(2,A.lens,A.nlen,A.ndist,A.distcode,0,A.work,re),A.distbits=re.bits,ne){T.msg="invalid distances set",A.mode=30;break}if(A.mode=20,6===e)break e;case 20:A.mode=21;case 21:if(6<=M&&258<=G){T.next_out=U,T.avail_out=G,T.next_in=F,T.avail_in=M,A.hold=W,A.bits=Z,c(T,H),U=T.next_out,D=T.output,G=T.avail_out,F=T.next_in,j=T.input,M=T.avail_in,W=A.hold,Z=A.bits,12===A.mode&&(A.back=-1);break}for(A.back=0;Y=255&(t=A.lencode[W&(1<>>16,V=65535&t,!((X=t>>>24)<=Z);){if(0===M)break e;M--,W+=j[F++]<>$)])>>>16,V=65535&t,!($+(X=t>>>24)<=Z);){if(0===M)break e;M--,W+=j[F++]<>>=$,Z-=$,A.back+=$}if(W>>>=X,Z-=X,A.back+=X,A.length=V,0===Y){A.mode=26;break}if(32&Y){A.back=-1,A.mode=12;break}if(64&Y){T.msg="invalid literal/length code",A.mode=30;break}A.extra=15&Y,A.mode=22;case 22:if(A.extra){for(oe=A.extra;Z>>=A.extra,Z-=A.extra,A.back+=A.extra}A.was=A.length,A.mode=23;case 23:for(;Y=255&(t=A.distcode[W&(1<>>16,V=65535&t,!((X=t>>>24)<=Z);){if(0===M)break e;M--,W+=j[F++]<>$)])>>>16,V=65535&t,!($+(X=t>>>24)<=Z);){if(0===M)break e;M--,W+=j[F++]<>>=$,Z-=$,A.back+=$}if(W>>>=X,Z-=X,A.back+=X,64&Y){T.msg="invalid distance code",A.mode=30;break}A.offset=V,A.extra=15&Y,A.mode=24;case 24:if(A.extra){for(oe=A.extra;Z>>=A.extra,Z-=A.extra,A.back+=A.extra}if(A.offset>A.dmax){T.msg="invalid distance too far back",A.mode=30;break}A.mode=25;case 25:if(0===G)break e;if(K=H-G,A.offset>K){if((K=A.offset-K)>A.whave&&A.sane){T.msg="invalid distance too far back",A.mode=30;break}Q=K>A.wnext?(K-=A.wnext,A.wsize-K):A.wnext-K,K>A.length&&(K=A.length),J=A.window}else J=D,Q=U-A.offset,K=A.length;for(GZ;){if(0===M)break e;M--,W|=j[F++]<Z;){if(0===M)break e;M--,W+=j[F++]<A.mode&&(27>A.mode||4!==e))&&L(T,T.output,T.next_out,H-T.avail_out)?(A.mode=31,-4):(q-=T.avail_in,H-=T.avail_out,T.total_in+=q,T.total_out+=H,A.total+=H,A.wrap&&H&&(T.adler=A.check=A.flags?O(A.check,D,H,T.next_out-H):I(A.check,D,H,T.next_out-H)),T.data_type=A.bits+(A.last?64:0)+(12===A.mode?128:0)+(20===A.mode||15===A.mode?256:0),(0==q&&0===H||4===e)&&ne===0&&(ne=-5),ne)},t.inflateEnd=function(a){if(!a||!a.state)return-2;var e=a.state;return e.window&&(e.window=null),a.state=null,0},t.inflateGetHeader=function(a,e){var t;return a&&a.state?0==(2&(t=a.state).wrap)?-2:((t.head=e).done=!1,0):-2},t.inflateSetDictionary=function(a,e){var t=e.length,n;return a&&a.state?0!==(n=a.state).wrap&&11!==n.mode?-2:11===n.mode&&I(1,e,t,0)!==n.check?-3:L(a,e,t,t)?(n.mode=31,-4):(n.havedict=1,0):-2},t.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(a,e){"use strict";var L=a("../utils/common"),j=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],D=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],N=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],F=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];e.exports=function(P,e,t,r,n,i,U,a){var o=a.bits,g=0,M=0,G=0,W=0,Z=0,q=0,H=0,K=0,Q=0,J=0,X=null,Y=0,V=new L.Buf16(16),O=new L.Buf16(16),B=null,$=0,ee,te,ae,ne,re,oe,se,ie,le;for(g=0;15>=g;g++)V[g]=0;for(M=0;M=g;g++)if(K<<=1,0>(K-=V[g]))return-1;if(0g;g++)O[g+1]=O[g]+V[g];for(M=0;Moe?(ie=B[$+U[M]],X[Y+U[M]]):(ie=96,0),ee=1<>H)+(te-=ee)]=0|(se<<24|ie<<16|le),0!==te;);for(ee=1<>=1;if(0===ee?J=0:(J&=ee-1,J+=ee),M++,0==--V[g]){if(g===W)break;g=e[t+U[M]]}if(Z=(K-=V[q+H]));)q++,K<<=1;if(Q+=1<t?d[t]:d[256+(t>>>7)]}function k(a,e){a.pending_buf[a.pending++]=255&e,a.pending_buf[a.pending++]=255&e>>>8}function x(a,e,t){a.bi_valid>16-t?(a.bi_buf|=65535&e<>16-a.bi_valid,a.bi_valid+=t-16):(a.bi_buf|=65535&e<>>=1,o<<=1,0<--n;);return o>>>1}function E(l,e,t){var r=Array(16),s=0,d,p;for(d=1;d<=15;d++)r[d]=s=s+t[d-1]<<1;for(p=0;p<=e;p++){var u=l[2*p+1];0!==u&&(l[2*p]=z(r[u]++,u))}}function C(a){var e;for(e=0;286>e;e++)a.dyn_ltree[2*e]=0;for(e=0;30>e;e++)a.dyn_dtree[2*e]=0;for(e=0;19>e;e++)a.bl_tree[2*e]=0;a.dyn_ltree[512]=1,a.opt_len=a.static_len=0,a.last_lit=a.matches=0}function A(t){8l.heap_len;)t[2*(c=l.heap[++l.heap_len]=2>d?++d:0)]=1,l.depth[c]=0,l.opt_len--,a&&(l.static_len-=s[2*c+1]);for(e.max_code=d,p=l.heap_len>>1;1<=p;p--)I(l,t,p);for(c=o;p=l.heap[1],l.heap[1]=l.heap[l.heap_len--],I(l,t,1),u=l.heap[1],l.heap[--l.heap_max]=p,l.heap[--l.heap_max]=u,t[2*c]=t[2*p]+t[2*u],l.depth[c]=(l.depth[p]>=l.depth[u]?l.depth[p]:l.depth[u])+1,t[2*p+1]=t[2*u+1]=c,l.heap[1]=c++,I(l,t,1),2<=l.heap_len;);l.heap[--l.heap_max]=l.heap[1],function(_,e){var t=e.dyn_tree,u=e.max_code,h=e.stat_desc.static_tree,f=e.stat_desc.has_stree,l=e.stat_desc.extra_bits,d=e.stat_desc.extra_base,c=e.stat_desc.max_length,p=0,g,y,x,b,w,k;for(b=0;b<=15;b++)_.bl_count[b]=0;for(t[2*_.heap[_.heap_max]+1]=0,g=_.heap_max+1;573>g;g++)c<(b=t[2*t[2*(y=_.heap[g])+1]+1]+1)&&(b=c,p++),t[2*y+1]=b,u=p?l.bl_tree[34]++:l.bl_tree[36]++:(_!==r&&l.bl_tree[2*_]++,l.bl_tree[32]++),r=_,m=(p=0)===d?(c=138,3):_===d?(c=6,3):(c=7,4))}function R(l,e,t){var r=-1,d=e[1],p=0,c=7,m=4,f,_;for(0===d&&(c=138,m=3),f=0;f<=t;f++)if(_=d,d=e[2*(f+1)+1],!(++p=p?(S(l,17,l.bl_tree),x(l,p-3,3)):(S(l,18,l.bl_tree),x(l,p-11,7)):(_!==r&&(S(l,_,l.bl_tree),p--),S(l,16,l.bl_tree),x(l,p-3,2));r=_,m=(p=0)===d?(c=138,3):_===d?(c=6,3):(c=7,4)}}function P(o,e,t,r){var n,l,d;x(o,0+(r?1:0),3),l=e,d=t,A(n=o),k(n,d),k(n,~d),j.arraySet(n.pending_buf,n.window,l,d,n.pending),n.pending+=d}var j=i("../utils/common"),o=15,_=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],u=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],h=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],a=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],f=Array(576);r(f);var l=Array(60);r(l);var d=Array(512);r(d);var c=Array(256);r(c);var p=Array(29);r(p);var m=Array(30),w,D,F;r(m);var U=!1;t._tr_init=function(t){U||(function(){var a=Array(o+1),s,g,y,x,b;for(x=y=0;28>x;x++)for(p[x]=y,s=0;s<1<<_[x];s++)c[y++]=x;for(c[y-1]=x,x=b=0;16>x;x++)for(m[x]=b,s=0;s<1<>=7;30>x;x++)for(m[x]=b<<7,s=0;s<1<=s;)f[2*s+1]=8,s++,a[8]++;for(;255>=s;)f[2*s+1]=9,s++,a[9]++;for(;279>=s;)f[2*s+1]=7,s++,a[7]++;for(;287>=s;)f[2*s+1]=8,s++,a[8]++;for(E(f,287,a),s=0;30>s;s++)l[2*s+1]=5,l[2*s]=z(s,5);w=new L(f,_,257,286,o),D=new L(l,u,0,30,o),F=new L([],h,0,19,7)}(),U=!0),t.l_desc=new n(t.dyn_ltree,w),t.d_desc=new n(t.dyn_dtree,D),t.bl_desc=new n(t.bl_tree,F),t.bi_buf=0,t.bi_valid=0,C(t)},t._tr_stored_block=P,t._tr_flush_block=function(o,e,t,r){var n=0,d,p;0=n;n++,e>>>=1)if(1&e&&0!==a.dyn_ltree[2*n])return 0;if(0!==a.dyn_ltree[18]||0!==a.dyn_ltree[20]||0!==a.dyn_ltree[26])return 1;for(n=32;256>n;n++)if(0!==a.dyn_ltree[2*n])return 1;return 0}(o)),B(o,o.l_desc),B(o,o.d_desc),n=function(n){var e;for(T(n,n.dyn_ltree,n.l_desc.max_code),T(n,n.dyn_dtree,n.d_desc.max_code),B(n,n.bl_desc),e=18;3<=e&&0===n.bl_tree[2*a[e]+1];e--);return n.opt_len+=3*(e+1)+5+5+4,e}(o),d=o.opt_len+3+7>>>3,(p=o.static_len+3+7>>>3)<=d&&(d=p)):d=p=t+5,t+4<=d&&-1!==e?P(o,e,t,r):4===o.strategy||p===d?(x(o,2+(r?1:0),3),O(o,f,l)):(x(o,4+(r?1:0),3),function(o,e,t,r){var n;for(x(o,e-257,5),x(o,t-1,5),x(o,r-4,4),n=0;n>>8,a.pending_buf[a.d_buf+2*a.last_lit+1]=255&e,a.pending_buf[a.l_buf+a.last_lit]=255&n,a.last_lit++,0===e?a.dyn_ltree[2*n]++:(a.matches++,e--,a.dyn_ltree[2*(c[n]+256+1)]++,a.dyn_dtree[2*y(e)]++),a.last_lit===a.lit_bufsize-1},t._tr_align=function(a){var e;x(a,2,3),S(a,256,f),16===(e=a).bi_valid?(k(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):8<=e.bi_valid&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}},{"../utils/common":41}],53:[function(a,e){"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(a,e){"use strict";e.exports="function"==typeof u?u:function(){var t=[].slice.apply(arguments);t.splice(1,0,0),setTimeout.apply(null,t)}},{}]},{},[10])(10)})}).call(this,void 0===s?"undefined"==typeof self?"undefined"==typeof window?{}:window:self:s)},{}]},{},[1])(1)})}).call(this,void 0===s?"undefined"==typeof self?"undefined"==typeof window?{}:window:self:s)},{}]},{},[1])(1)})}).call(this,void 0===s?"undefined"==typeof self?"undefined"==typeof window?{}:window:self:s)},{}]},{},[1])(1)})}).call(this,void 0===s?"undefined"==typeof self?"undefined"==typeof window?{}:window:self:s)},{}]},{},[1])(1)})}).call(this,"undefined"==typeof s?"undefined"==typeof self?"undefined"==typeof window?{}:window:self:s)},{}]},{},[1])(1)})}).call(this)}).call(this,"undefined"==typeof global?"undefined"==typeof self?"undefined"==typeof window?{}:window:self:global,a("buffer").Buffer,a("timers").setImmediate)},{buffer:12,timers:22}],16:[function(e,t){'use strict';function a(){}function n(e){if("function"!=typeof e)throw new TypeError("resolver must be a function");this.state=f,this.queue=[],this.outcome=void 0,e!==a&&l(this,e)}function r(e,t,a){this.promise=e,"function"==typeof t&&(this.onFulfilled=t,this.callFulfilled=this.otherCallFulfilled),"function"==typeof a&&(this.onRejected=a,this.callRejected=this.otherCallRejected)}function o(t,a,n){p(function(){var e;try{e=a(n)}catch(a){return u.reject(t,a)}e===t?u.reject(t,new TypeError("Cannot resolve promise with itself")):u.resolve(t,e)})}function s(e){var t=e&&e.then;if(e&&("object"==typeof e||"function"==typeof e)&&"function"==typeof t)return function(){t.apply(e,arguments)}}function l(e,t){function a(t){r||(r=!0,u.reject(e,t))}function n(t){r||(r=!0,u.resolve(e,t))}var r=!1,o=d(function(){t(n,a)});"error"===o.status&&a(o.value)}function d(e,t){var a={};try{a.value=e(t),a.status="success"}catch(t){a.status="error",a.value=t}return a}var p=e("immediate"),u={},c=["REJECTED"],m=["FULFILLED"],f=["PENDING"];t.exports=n,n.prototype["finally"]=function(e){if("function"!=typeof e)return this;var t=this.constructor;return this.then(function(a){return t.resolve(e()).then(function(){return a})},function(a){return t.resolve(e()).then(function(){throw a})})},n.prototype["catch"]=function(e){return this.then(null,e)},n.prototype.then=function(e,t){if("function"!=typeof e&&this.state===m||"function"!=typeof t&&this.state===c)return this;var n=new this.constructor(a);if(this.state!==f){var s=this.state===m?e:t;o(n,s,this.outcome)}else this.queue.push(new r(n,e,t));return n},r.prototype.callFulfilled=function(e){u.resolve(this.promise,e)},r.prototype.otherCallFulfilled=function(e){o(this.promise,this.onFulfilled,e)},r.prototype.callRejected=function(e){u.reject(this.promise,e)},r.prototype.otherCallRejected=function(e){o(this.promise,this.onRejected,e)},u.resolve=function(e,t){var a=d(s,t);if("error"===a.status)return u.reject(e,a.value);var n=a.value;if(n)l(e,n);else{e.state=m,e.outcome=t;for(var r=-1,o=e.queue.length;++r=this._max)&&(this._max=1/0),this._lengthCalculator=e.length||a,"function"!=typeof this._lengthCalculator&&(this._lengthCalculator=a),this._allowStale=e.stale||!1,this._maxAge=e.maxAge||null,this._dispose=e.dispose,this.reset()):new r(e)}function o(e,t,a){n(t);var r=e._cache[t];return r&&(s(e,r)?(p(e,r),!e._allowStale&&(r=void 0)):a&&i(e,r),r&&(r=r.value)),r}function s(e,t){if(!t||!t.maxAge&&!e._maxAge)return!1;var a=!1,n=Date.now()-t.now;return a=t.maxAge?n>t.maxAge:e._maxAge&&n>e._maxAge,a}function i(e,t){d(e,t),t.lu=e._mru++,e._lruList[t.lu]=t}function l(e){for(;e._lrue._max;)p(e,e._lruList[e._lru])}function d(e,t){for(delete e._lruList[t.lu];e._lru=e)||(e=1/0),this._max=e,this._length>this._max&&l(this)},get:function(){return this._max},enumerable:!0}),Object.defineProperty(r.prototype,"lengthCalculator",{set:function(e){if("function"!=typeof e)for(var t in this._lengthCalculator=a,this._length=this._itemCount,this._cache)this._cache[t].length=1;else for(var t in this._lengthCalculator=e,this._length=0,this._cache)this._cache[t].length=this._lengthCalculator(this._cache[t].value),this._length+=this._cache[t].length;this._length>this._max&&l(this)},get:function(){return this._lengthCalculator},enumerable:!0}),Object.defineProperty(r.prototype,"length",{get:function(){return this._length},enumerable:!0}),Object.defineProperty(r.prototype,"itemCount",{get:function(){return this._itemCount},enumerable:!0}),r.prototype.forEach=function(e,t){t=t||this;for(var a=0,n=this._itemCount,r=this._mru-1;0<=r&&athis._max?(p(this,this._cache[t]),!1):(this._dispose&&this._dispose(t,this._cache[t].value),this._cache[t].now=o,this._cache[t].maxAge=r,this._cache[t].value=a,this._length+=s-this._cache[t].length,this._cache[t].length=s,this.get(t),this._length>this._max&&l(this),!0);var i=new u(t,a,this._mru++,s,o,r);return i.length>this._max?(this._dispose&&this._dispose(t,a),!1):(this._length+=i.length,this._lruList[i.lu]=this._cache[t]=i,this._itemCount++,this._length>this._max&&l(this),!0)},r.prototype.has=function(t){if(n(t),!e(this._cache,t))return!1;var a=this._cache[t];return!s(this,a)},r.prototype.get=function(e){return n(e),o(this,e,!0)},r.prototype.peek=function(e){return n(e),o(this,e,!1)},r.prototype.pop=function(){var e=this._lruList[this._lru];return p(this,e),e||null},r.prototype.del=function(e){n(e),p(this,this._cache[e])},r.prototype.load=function(e){this.reset();for(var t=Date.now(),a=e.length-1,r;0<=a;a--){r=e[a],n(r.k);var o=r.e||0;if(0===o)this.set(r.k,r.v);else{var s=o-t;0-1.001*ot)r=-ot;else if(r>ot&&r<1.001*ot)r=ot;else{if(r<-ot)return{x:-Infinity,y:-Infinity,z:e.z};if(r>ot)return{x:1/0,y:1/0,z:e.z}}return a>f&&(a-=2*f),i=E(r),d=O(r),l=i*i,s=n/R(1-t*l),{x:(s+o)*d*O(a),y:(s+o)*d*E(a),z:(s*(1-t)+o)*i}}function ye(e,t,n,a){var r=1e-12,s=e.x,l=e.y,d=e.z?e.z:0,p,u,c,m,f,_,g,y,x,b,w,k,C,S,v,E;if(p=R(s*s+l*l),u=R(s*s+l*l+d*d),!(p/nr*r&&C<30);return v=h(w/o(b)),{x:S,y:v,z:E}}function xe(e,t,a){if(1===t)return{x:e.x+a[0],y:e.y+a[1],z:e.z+a[2]};if(2===t){var n=a[0],r=a[1],o=a[2],s=a[3],i=a[4],l=a[5],d=a[6];return{x:d*(e.x-l*e.y+i*e.z)+n,y:d*(l*e.x+e.y-s*e.z)+r,z:d*(-i*e.x+s*e.y+e.z)+o}}}function be(e,t,a){if(1===t)return{x:e.x-a[0],y:e.y-a[1],z:e.z-a[2]};if(2===t){var n=a[0],r=a[1],o=a[2],s=a[3],i=a[4],l=a[5],d=a[6],p=(e.x-n)/d,u=(e.y-r)/d,c=(e.z-o)/d;return{x:p+l*u-i*c,y:-l*p+u+s*c,z:i*p-s*u+c}}}function we(e){return 1===e||2===e}function ke(e,t,a){if(null===e.grids||0===e.grids.length)return console.log("Grid shift grids not found"),-1;for(var n={x:-a.x,y:a.y},s={x:r,y:r},l=[],d=0,p;dn.y||m>n.x||_p&&o(u.y)>p);if(0>t)return console.log("Inverse grid shift iterator failed to converge."),s;s.x=Nt(d.x+n.ll[0]),s.y=d.y+n.ll[1]}else isNaN(d.x)||(s.x=e.x+d.x,s.y=e.y+d.y);return s}function Se(e,a){var n={x:e.x/a.del[0],y:e.y/a.del[1]},t={x:p(n.x),y:p(n.y)},o={x:n.x-1*t.x,y:n.y-1*t.y},s={x:r,y:r},i;if(0>t.x||t.x>=a.lim[0])return s;if(0>t.y||t.y>=a.lim[1])return s;i=t.y*a.lim[0]+t.x;var l={x:a.cvs[i][0],y:a.cvs[i][1]};i++;var d={x:a.cvs[i][0],y:a.cvs[i][1]};i+=a.lim[0];var u={x:a.cvs[i][0],y:a.cvs[i][1]};i--;var c={x:a.cvs[i][0],y:a.cvs[i][1]},m=o.x*o.y,f=o.x*(1-o.y),h=(1-o.x)*(1-o.y),_=(1-o.x)*o.y;return s.x=h*l.x+f*d.x+_*c.x+m*u.x,s.y=h*l.y+f*d.y+_*c.y+m*u.y,s}function ve(e){var t=Number.isFinite;if("function"==typeof t){if(t(e))return;throw new TypeError("coordinates must be finite numbers")}if("number"!=typeof e||e!==e||!isFinite(e))throw new TypeError("coordinates must be finite numbers")}function Ee(e,t){return(1===e.datum.datum_type||2===e.datum.datum_type)&&"WGS84"!==t.datumCode||(1===t.datum.datum_type||2===t.datum.datum_type)&&"WGS84"!==e.datumCode}function Ae(e,t,a){var n;if(Array.isArray(a)&&(a=Ht(a)),Kt(a),e.datum&&t.datum&&Ee(e,t)&&(n=new he("WGS84"),a=Ae(e,n,a),e=n),"enu"!==e.axis&&(a=qt(e,!1,a)),"longlat"===e.projName)a={x:a.x*pt,y:a.y*pt,z:a.z||0};else if(e.to_meter&&(a={x:a.x*e.to_meter,y:a.y*e.to_meter,z:a.z||0}),a=e.inverse(a),!a)return;return(e.from_greenwich&&(a.x+=e.from_greenwich),a=Zt(e.datum,t.datum,a),!!a)?(t.from_greenwich&&(a={x:a.x-t.from_greenwich,y:a.y,z:a.z||0}),"longlat"===t.projName?a={x:a.x*ut,y:a.y*ut,z:a.z||0}:(a=t.forward(a),t.to_meter&&(a={x:a.x/t.to_meter,y:a.y/t.to_meter,z:a.z||0})),"enu"===t.axis?a:qt(t,!0,a)):void 0}function Ie(e,t,a){var n,r,o;return Array.isArray(a)?(n=Ae(e,t,a)||{x:NaN,y:NaN},2t&&3<=n&&12>n&&(y=32),72<=t&&84>t&&(0<=n&&9>n?y=31:9<=n&&21>n?y=33:21<=n&&33>n?y=35:33<=n&&42>n&&(y=37)),l=6*(y-1)-180+3,g=Te(l),d=a/(1-a),c=r/R(1-a*E(s)*E(s)),m=w(s)*w(s),f=d*O(s)*O(s),h=O(s)*(i-g),_=r*((1-a/4-3*a*a/64-5*a*a*a/256)*s-(3*a/8+3*a*a/32+45*a*a*a/1024)*E(2*s)+(15*a*a/256+45*a*a*a/1024)*E(4*s)-35*a*a*a/3072*E(6*s));var x=o*c*(65+65*(65*(65*(1-m+f)))/6+65*(65*(65*(65*(65*(5-18*m+m*m+72*f-58*d)))))/120)+5e5,b=o*(_+c*w(s)*(4225/2+65*(65*(65*(65*(5-m+9*f+4*f*f))))/24+65*(65*(65*(65*(65*(65*(61-58*m+m*m+600*f-330*d))))))/720));return 0>t&&(b+=1e7),{northing:u(b),easting:u(x),zoneNumber:y,zoneLetter:je(t)}}function Pe(e){var t=e.northing,n=e.easting,r=e.zoneLetter,o=e.zoneNumber;if(0>o||60r&&(p-=1e7),x=6*(o-1)-180+3,u=a/(1-a),g=p/s,b=g/(i*(1-a/4-3*a*a/64-5*a*a*a/256)),k=b+(3*d/2-27*d*d*d/32)*E(2*b)+(21*d*d/16-55*d*d*d*d/32)*E(4*b)+151*d*d*d/96*E(6*b),c=i/R(1-a*E(k)*E(k)),m=w(k)*w(k),f=u*O(k)*O(k),h=i*(1-a)/l(1-a*E(k)*E(k),1.5),_=(n-5e5)/(c*s);var C=k-c*w(k)/h*(_*_/2-(5+3*m+10*f-4*f*f-9*u)*_*_*_*_/24+(61+90*m+298*f+45*m*m-252*u-3*f*f)*_*_*_*_*_*_/720);C=Ne(C);var S=(_-(1+2*m+f)*_*_*_/6+(5-2*f+28*m-3*f*f+8*u+24*m*m)*_*_*_*_*_/120)/O(k);S=x+Ne(S);var v;if(e.accuracy){var A=Pe({northing:e.northing+e.accuracy,easting:e.easting+e.accuracy,zoneLetter:e.zoneLetter,zoneNumber:e.zoneNumber});v={top:A.lat,right:A.lon,bottom:C,left:S}}else v={lat:C,lon:S};return v}function je(e){var t="Z";return 84>=e&&72<=e?t="X":72>e&&64<=e?t="W":64>e&&56<=e?t="V":56>e&&48<=e?t="U":48>e&&40<=e?t="T":40>e&&32<=e?t="S":32>e&&24<=e?t="R":24>e&&16<=e?t="Q":16>e&&8<=e?t="P":8>e&&0<=e?t="N":0>e&&-8<=e?t="M":-8>e&&-16<=e?t="L":-16>e&&-24<=e?t="K":-24>e&&-32<=e?t="J":-32>e&&-40<=e?t="H":-40>e&&-48<=e?t="G":-48>e&&-56<=e?t="F":-56>e&&-64<=e?t="E":-64>e&&-72<=e?t="D":-72>e&&-80<=e&&(t="C"),t}function De(e,t){var a="00000"+e.easting,n="00000"+e.northing;return e.zoneNumber+e.zoneLetter+Fe(e.easting,e.northing,e.zoneNumber)+a.substr(a.length-5,t)+n.substr(n.length-5,t)}function Fe(e,t,a){var n=Ue(a),r=p(e/1e5),o=p(t/1e5)%20;return Me(r,o,n)}function Ue(e){var t=e%6;return 0===t&&(t=6),t}function Me(e,t,a){var n=a-1,r="AJSAJS".charCodeAt(n),o="AFAFAF".charCodeAt(n),s=r+e-1,i=o+t,l=!1;90r&&73r)&&l)&&s++,(79===s||79>r&&79r)&&l)&&(s++,73===s&&s++),90o&&73o)&&l)&&i++,(79===i||79>o&&79o)&&l)&&(i++,73===i&&i++),86t)throw"MGRSPoint bad conversion from: "+e;var d=e.charAt(r++);if("A">=d||"B"===d||"Y"===d||"Z"<=d||"I"===d||"O"===d)throw"MGRSPoint zone letter "+d+" not handled: "+e;a=e.substring(r,r+=2);for(var p=Ue(s),u=We(a.charAt(0),p),c=Ze(a.charAt(1),p);cdt?(k=E(this.lat0),_=O(this.lat0),m=1-this.es*k*k,this.B=_*_,this.B=R(1+this.es*this.B*this.B/B),this.A=this.B*this.k0*f/m,g=this.B*f/(_*R(m)),y=g*g-1,0>=y?y=0:(y=R(y),0>this.lat0&&(y=-y)),this.E=y+=g,this.E*=l(Rt(this.e,this.lat0,k),this.B)):(this.B=1/f,this.A=this.k0,this.E=g=y=1),A||I?(A?(v=a(E(c)/g),!I&&(n=c)):(v=n,c=a(g*E(v))),this.lam0=r-a(.5*(y-1/y)*w(v))/this.B):(x=l(Rt(this.e,d,E(d)),this.B),b=l(Rt(this.e,u,E(u)),this.B),y=this.E/x,C=(b-x)/(b+x),S=this.E*this.E,S=(S-b*x)/(S+b*x),m=s-i,m<-e?i-=mt:m>e&&(i+=mt),this.lam0=Nt(.5*(s+i)-h(S*w(.5*this.B*(s-i))/C)/this.B),v=h(2*E(this.B*Nt(s-this.lam0))/(y-1/y)),n=c=a(g*E(v))),this.singam=E(v),this.cosgam=O(v),this.sinrot=E(n),this.cosrot=O(n),this.rB=1/this.B,this.ArB=this.A*this.rB,this.BrA=1/this.ArB,this.no_off?this.u_0=0:(this.u_0=o(this.ArB*h(R(g*g-1)/O(c))),0>this.lat0&&(this.u_0=-this.u_0)),y=.5*v,this.v_pole_n=this.ArB*t(w(ct-y)),this.v_pole_s=this.ArB*t(w(ct+y))}function Je(e){var a=[],n;return a[0]=e*y,n=e*e,a[0]+=n*x,a[1]=n*k,n*=e,a[0]+=n*b,a[1]+=n*C,a[2]=n*S,a}function Xe(e,a){var n=e+e;return e+a[0]*E(n)+a[1]*E(n+n)+a[2]*E(n+n+n)}function Ye(e,t,a,n){var r;return ect&&r<=ot+ct?(n.value=Da.AREA_1,r-=ot):r>ot+ct||r<=-(ot+ct)?(n.value=Da.AREA_2,r=0<=r?r-ft:r+ft):(n.value=Da.AREA_3,r+=ot)),r}function Ve(e,t){var a=e+t;return a<-ft?a+=mt:a>+ft&&(a-=mt),a}function $e(e,t,a,n){for(var r=t,s;n&&(s=e(r),r-=s,!(o(s)=this.text.length)return;e=this.text[this.place++]}switch(this.state){case xt:return this.neutral(e);case bt:return this.keyword(e);case kt:return this.quoted(e);case Ct:return this.afterquote(e);case wt:return this.number(e);case St:}},j.prototype.afterquote=function(e){if("\""===e)return this.word+="\"",void(this.state=kt);if(vt.test(e))return this.word=this.word.trim(),void this.afterItem(e);throw new Error("havn't handled \""+e+"\" in afterquote yet, index "+this.place)},j.prototype.afterItem=function(e){return","===e?(null!==this.word&&this.currentObject.push(this.word),this.word=null,void(this.state=xt)):"]"===e?(this.level--,null!==this.word&&(this.currentObject.push(this.word),this.word=null),this.state=xt,this.currentObject=this.stack.pop(),void(this.currentObject||(this.state=St))):void 0},j.prototype.number=function(e){if(Et.test(e))return void(this.word+=e);if(vt.test(e))return this.word=parseFloat(this.word),void this.afterItem(e);throw new Error("havn't handled \""+e+"\" in number yet, index "+this.place)},j.prototype.quoted=function(e){return"\""===e?void(this.state=Ct):void(this.word+=e)},j.prototype.keyword=function(e){if(/[A-Za-z84]/.test(e))return void(this.word+=e);if("["===e){var t=[];return t.push(this.word),this.level++,null===this.root?this.root=t:this.currentObject.push(t),this.stack.push(this.currentObject),this.currentObject=t,void(this.state=xt)}if(vt.test(e))return void this.afterItem(e);throw new Error("havn't handled \""+e+"\" in keyword yet, index "+this.place)},j.prototype.neutral=function(e){if(/[A-Za-z]/.test(e))return this.word=e,void(this.state=bt);if("\""===e)return this.word="",void(this.state=kt);if(Et.test(e))return this.word=e,void(this.state=wt);if(vt.test(e))return void this.afterItem(e);throw new Error("havn't handled \""+e+"\" in neutral yet, index "+this.place)},j.prototype.output=function(){for(;this.placee?-1:1},Nt=function(e){return o(e)<=ft?e:e-Tt(e)*mt},Rt=function(e,t,a){var n=e*a;return n=l((1-n)/(1+n),.5*e),w(.5*(ot-t))/n},Pt=function(e,t){for(var a=ot-2*h(t),n=0,r,s;15>=n;n++)if(r=e*E(a),s=ot-2*h(t*l((1-r)/(1+r),.5*e))-a,a+=s,1e-10>=o(s))return a;return-9999},jt=[{init:V,forward:function(e){var a=e.x,n=e.y;if(90n*ut&&180a*ut)return null;var r,s;if(o(o(n)-ot)<=dt)return null;if(this.sphere)r=this.x0+this.a*this.k0*Nt(a-this.long0),s=this.y0+this.a*this.k0*t(w(ct+.5*n));else{var i=E(n),l=Rt(this.e,n,i);r=this.x0+this.a*this.k0*Nt(a-this.long0),s=this.y0-this.a*this.k0*t(l)}return e.x=r,e.y=s,e},inverse:function(e){var t=e.x-this.x0,a=e.y-this.y0,n,r;if(this.sphere)r=ot-2*h(_(-a/(this.a*this.k0)));else{var o=_(-a/(this.a*this.k0));if(r=Pt(this.e,o),-9999===r)return null}return n=Nt(this.long0+t/(this.a*this.k0)),e.x=n,e.y=r,e},names:["Mercator","Popular Visualisation Pseudo Mercator","Mercator_1SP","Mercator_Auxiliary_Sphere","merc"]},{init:function(){},forward:$,inverse:$,names:["longlat","identity"]}],Dt={},Ft=[],Ut={};Ut.MERIT={a:6378137,rf:298.257,ellipseName:"MERIT 1983"},Ut.SGS85={a:6378136,rf:298.257,ellipseName:"Soviet Geodetic System 85"},Ut.GRS80={a:6378137,rf:298.257222101,ellipseName:"GRS 1980(IUGG, 1980)"},Ut.IAU76={a:6378140,rf:298.257,ellipseName:"IAU 1976"},Ut.airy={a:6377563.396,b:6356256.91,ellipseName:"Airy 1830"},Ut.APL4={a:6378137,rf:298.25,ellipseName:"Appl. Physics. 1965"},Ut.NWL9D={a:6378145,rf:298.25,ellipseName:"Naval Weapons Lab., 1965"},Ut.mod_airy={a:6377340.189,b:6356034.446,ellipseName:"Modified Airy"},Ut.andrae={a:6377104.43,rf:300,ellipseName:"Andrae 1876 (Den., Iclnd.)"},Ut.aust_SA={a:6378160,rf:298.25,ellipseName:"Australian Natl & S. Amer. 1969"},Ut.GRS67={a:6378160,rf:298.247167427,ellipseName:"GRS 67(IUGG 1967)"},Ut.bessel={a:6377397.155,rf:299.1528128,ellipseName:"Bessel 1841"},Ut.bess_nam={a:6377483.865,rf:299.1528128,ellipseName:"Bessel 1841 (Namibia)"},Ut.clrk66={a:6378206.4,b:6356583.8,ellipseName:"Clarke 1866"},Ut.clrk80={a:6378249.145,rf:293.4663,ellipseName:"Clarke 1880 mod."},Ut.clrk58={a:6378293.645208759,rf:294.2606763692654,ellipseName:"Clarke 1858"},Ut.CPM={a:6375738.7,rf:334.29,ellipseName:"Comm. des Poids et Mesures 1799"},Ut.delmbr={a:6376428,rf:311.5,ellipseName:"Delambre 1810 (Belgium)"},Ut.engelis={a:6378136.05,rf:298.2566,ellipseName:"Engelis 1985"},Ut.evrst30={a:6377276.345,rf:300.8017,ellipseName:"Everest 1830"},Ut.evrst48={a:6377304.063,rf:300.8017,ellipseName:"Everest 1948"},Ut.evrst56={a:6377301.243,rf:300.8017,ellipseName:"Everest 1956"},Ut.evrst69={a:6377295.664,rf:300.8017,ellipseName:"Everest 1969"},Ut.evrstSS={a:6377298.556,rf:300.8017,ellipseName:"Everest (Sabah & Sarawak)"},Ut.fschr60={a:6378166,rf:298.3,ellipseName:"Fischer (Mercury Datum) 1960"},Ut.fschr60m={a:6378155,rf:298.3,ellipseName:"Fischer 1960"},Ut.fschr68={a:6378150,rf:298.3,ellipseName:"Fischer 1968"},Ut.helmert={a:6378200,rf:298.3,ellipseName:"Helmert 1906"},Ut.hough={a:6378270,rf:297,ellipseName:"Hough"},Ut.intl={a:6378388,rf:297,ellipseName:"International 1909 (Hayford)"},Ut.kaula={a:6378163,rf:298.24,ellipseName:"Kaula 1961"},Ut.lerch={a:6378139,rf:298.257,ellipseName:"Lerch 1979"},Ut.mprts={a:6397300,rf:191,ellipseName:"Maupertius 1738"},Ut.new_intl={a:6378157.5,b:6356772.2,ellipseName:"New International 1967"},Ut.plessis={a:6376523,rf:6355863,ellipseName:"Plessis 1817 (France)"},Ut.krass={a:6378245,rf:298.3,ellipseName:"Krassovsky, 1942"},Ut.SEasia={a:6378155,b:6356773.3205,ellipseName:"Southeast Asia"},Ut.walbeck={a:6376896,b:6355834.8467,ellipseName:"Walbeck"},Ut.WGS60={a:6378165,rf:298.3,ellipseName:"WGS 60"},Ut.WGS66={a:6378145,rf:298.25,ellipseName:"WGS 66"},Ut.WGS7={a:6378135,rf:298.26,ellipseName:"WGS 72"};var Mt=Ut.WGS84={a:6378137,rf:298.257223563,ellipseName:"WGS 84"};Ut.sphere={a:6370997,b:6370997,ellipseName:"Normal Sphere (r=6370997)"};var Gt={wgs84:{towgs84:"0,0,0",ellipse:"WGS84",datumName:"WGS84"},ch1903:{towgs84:"674.374,15.056,405.346",ellipse:"bessel",datumName:"swiss"},ggrs87:{towgs84:"-199.87,74.79,246.62",ellipse:"GRS80",datumName:"Greek_Geodetic_Reference_System_1987"},nad83:{towgs84:"0,0,0",ellipse:"GRS80",datumName:"North_American_Datum_1983"},nad27:{nadgrids:"@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat",ellipse:"clrk66",datumName:"North_American_Datum_1927"},potsdam:{towgs84:"598.1,73.7,418.2,0.202,0.045,-2.455,6.7",ellipse:"bessel",datumName:"Potsdam Rauenberg 1950 DHDN"},carthage:{towgs84:"-263.0,6.0,431.0",ellipse:"clark80",datumName:"Carthage 1934 Tunisia"},hermannskogel:{towgs84:"577.326,90.129,463.919,5.137,1.474,5.297,2.4232",ellipse:"bessel",datumName:"Hermannskogel"},osni52:{towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"airy",datumName:"Irish National"},ire65:{towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"mod_airy",datumName:"Ireland 1965"},rassadiran:{towgs84:"-133.63,-157.5,-158.62",ellipse:"intl",datumName:"Rassadiran"},nzgd49:{towgs84:"59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993",ellipse:"intl",datumName:"New Zealand Geodetic Datum 1949"},osgb36:{towgs84:"446.448,-125.157,542.060,0.1502,0.2470,0.8421,-20.4894",ellipse:"airy",datumName:"Airy 1830"},s_jtsk:{towgs84:"589,76,480",ellipse:"bessel",datumName:"S-JTSK (Ferro)"},beduaram:{towgs84:"-106,-87,188",ellipse:"clrk80",datumName:"Beduaram"},gunung_segara:{towgs84:"-403,684,41",ellipse:"bessel",datumName:"Gunung Segara Jakarta"},rnb72:{towgs84:"106.869,-52.2978,103.724,-0.33657,0.456955,-1.84218,1",ellipse:"intl",datumName:"Reseau National Belge 1972"}},Wt={};he.projections={start:function(){jt.forEach(ee)},add:ee,get:function(e){if(!e)return!1;var t=e.toLowerCase();if("undefined"!=typeof Dt[t]&&Ft[Dt[t]])return Ft[Dt[t]]}},he.projections.start(),"use strict";var Zt=function(e,t,a){if(_e(e,t))return a;if(e.datum_type===tt||t.datum_type===tt)return a;var n=e.a,r=e.es;if(e.datum_type===et){var o=ke(e,!1,a);if(0!==o)return;n=at,r=nt}var s=t.a,i=t.b,l=t.es;if(t.datum_type===et&&(s=at,i=6356752.314,l=nt),r===l&&n===s&&!we(e.datum_type)&&!we(t.datum_type))return a;if(a=ge(a,r,n),we(e.datum_type)&&(a=xe(a,e.datum_type,e.datum_params)),we(t.datum_type)&&(a=be(a,t.datum_type,t.datum_params)),a=ye(a,l,s,i),t.datum_type===et){var d=ke(t,!0,a);if(0!==d)return}return a},qt=function(e,a,n){var r=n.x,o=n.y,s=n.z||0,l={},d,p,u;for(u=0;3>u;u++)if(!(a&&2===u&&void 0===n.z))switch(0===u?(d=r,p=-1==="ew".indexOf(e.axis[u])?"y":"x"):1===u?(d=o,p=-1==="ns".indexOf(e.axis[u])?"x":"y"):(d=s,p="z"),e.axis[u]){case"e":l[p]=d;break;case"w":l[p]=-d;break;case"n":l[p]=d;break;case"s":l[p]=-d;break;case"u":void 0!==n[p]&&(l.z=d);break;case"d":void 0!==n[p]&&(l.z=-d);break;default:return null;}return l},Ht=function(e){var t={x:e[0],y:e[1]};return 2dt)return 93;m=0}else m=n(m);0>r&&(m=-m),m=this.a*this.k0*(m-this.lat0)+this.y0}else{var h=d*s,_=l(h,2),g=this.ep2*l(d,2),c=l(g,2),k=o(d)>dt?w(r):0,C=l(k,2),S=l(C,2);p=1-this.es*l(i,2),h/=R(p);var v=$t(r,i,d,this.en);u=this.a*(this.k0*h*(1+_/6*(1-C+g+_/20*(5-18*C+S+14*g-58*C*g+_/42*(61+179*S-S*C-479*C)))))+this.x0,m=this.a*(this.k0*(v-this.ml0+i*s*h/2*(1+_/12*(5-C+9*g+4*c+_/30*(61+S-58*C+270*g-330*C*g+_/56*(1385+543*S-S*C-3111*C))))))+this.y0}return e.x=u,e.y=m,e},inverse:function(e){var n=(e.x-this.x0)*(1/this.a),r=(e.y-this.y0)*(1/this.a),s,p,u,m;if(!this.es){var y=_(n/this.k0),f=.5*(y-1/y),g=this.lat0+r/this.k0,x=O(g);s=R((1-l(x,2))/(1+l(f,2))),u=a(s),0>r&&(u=-u),m=0===f&&0===x?0:Nt(i(f,x)+this.long0)}else if(s=this.ml0+r/this.k0,p=ea(s,this.es,this.en),o(p)dt?w(p):0,C=this.ep2*l(b,2),c=l(C,2),S=l(k,2),t=l(S,2);s=1-this.es*l(h,2);var v=n*R(s)/this.k0,d=l(v,2);s*=k,u=p-.5*(s*d/(1-this.es))*(1-d/12*(5+3*S-9*C*S+C-4*c-d/30*(61+90*S-252*C*S+45*t+46*C-d/56*(1385+3633*S+4095*t+1574*t*S)))),m=Nt(this.long0+v*(1-d/6*(1+2*S+C-d/20*(5+28*S+24*t+8*C*S+6*C-d/42*(61+662*S+1320*t+720*t*S))))/b)}else u=ot*Tt(r),m=0;return e.x=m,e.y=u,e},names:["Fast_Transverse_Mercator","Fast Transverse Mercator"]},aa=function(e){var t=_(e);return t=(t-1/t)/2,t},na=function(e,t){var n=Math.max;e=o(e),t=o(t);var r=n(e,t),a=d(e,t)/(r?r:1);return r*R(1+l(a,2))},ra=function(e){var a=1+e,n=a-1;return 0===n?e:e*t(a)/n},oa=function(e){var t=o(e);return t=ra(t*(1+t/(na(1,t)+1))),0>e?-t:t},sa=function(e,t){for(var a=2*O(2*t),n=e.length-1,r=e[n],o=0,s;0<=--n;)s=-o+a*r+e[n],o=r,r=s;return t+s*E(2*t)},ia=function(e,t){for(var a=2*O(t),n=e.length-1,r=e[n],o=0,s;0<=--n;)s=-o+a*r+e[n],o=r,r=s;return E(t)*s},la=function(e){var t=_(e);return t=(t+1/t)/2,t},da=function(e,t,a){for(var n=E(t),o=O(t),s=aa(a),l=la(a),d=2*o*l,p=-2*n*s,u=e.length-1,c=e[u],m=0,f=0,h=0,_,g;0<=--u;)_=f,g=m,f=c,m=h,c=-_+d*f-p*m+e[u],h=-g+p*f+d*m;return d=n*l,p=o*s,[d*c-p*h,d*h+p*c]},pa={init:function(){if(!this.approx&&(isNaN(this.es)||0>=this.es))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&&(ta.init.apply(this),this.forward=ta.forward,this.inverse=ta.inverse),this.x0=void 0===this.x0?0:this.x0,this.y0=void 0===this.y0?0:this.y0,this.long0=void 0===this.long0?0:this.long0,this.lat0=void 0===this.lat0?0:this.lat0,this.cgb=[],this.cbg=[],this.utg=[],this.gtu=[];var e=this.es/(1+R(1-this.es)),t=e/(2-e),a=t;this.cgb[0]=t*(2+t*(-2/3+t*(-2+t*(116/45+t*(26/45+t*(-2854/675)))))),this.cbg[0]=t*(-2+t*(2/3+t*(4/3+t*(-82/45+t*(32/45+t*(4642/4725)))))),a*=t,this.cgb[1]=a*(7/3+t*(-8/5+t*(-227/45+t*(2704/315+t*(2323/945))))),this.cbg[1]=a*(5/3+t*(-16/15+t*(-13/9+t*(904/315+t*(-1522/945))))),a*=t,this.cgb[2]=a*(56/15+t*(-136/35+t*(-1262/105+t*(73814/2835)))),this.cbg[2]=a*(-26/15+t*(34/21+t*(8/5+t*(-12686/2835)))),a*=t,this.cgb[3]=a*(4279/630+t*(-332/35+t*(-399572/14175))),this.cbg[3]=a*(1237/630+t*(-12/5+t*(-24832/14175))),a*=t,this.cgb[4]=a*(4174/315+t*(-144838/6237)),this.cbg[4]=a*(-734/315+t*(109598/31185)),a*=t,this.cgb[5]=a*(601676/22275),this.cbg[5]=a*(444337/155925),a=l(t,2),this.Qn=this.k0/(1+t)*(1+a*(1/4+a*(1/64+a/256))),this.utg[0]=t*(-.5+t*(2/3+t*(-37/96+t*(1/360+t*(81/512+t*(-96199/604800)))))),this.gtu[0]=t*(.5+t*(-2/3+t*(5/16+t*(41/180+t*(-127/288+t*(7891/37800)))))),this.utg[1]=a*(-1/48+t*(-1/15+t*(437/1440+t*(-46/105+t*(1118711/3870720))))),this.gtu[1]=a*(13/48+t*(-3/5+t*(557/1440+t*(281/630+t*(-1983433/1935360))))),a*=t,this.utg[2]=a*(-17/480+t*(37/840+t*(209/4480+t*(-5569/90720)))),this.gtu[2]=a*(61/240+t*(-103/140+t*(15061/26880+t*(167603/181440)))),a*=t,this.utg[3]=a*(-4397/161280+t*(11/504+t*(830251/7257600))),this.gtu[3]=a*(49561/161280+t*(-179/168+t*(6601661/7257600))),a*=t,this.utg[4]=a*(-4583/161280+t*(108847/3991680)),this.gtu[4]=a*(34729/80640+t*(-3418889/1995840)),a*=t,this.utg[5]=a*(-20648693/638668800),this.gtu[5]=a*(212378941/319334400);var n=sa(this.cbg,this.lat0);this.Zb=-this.Qn*(n+ia(this.gtu,2*n))},forward:function(e){var t=Nt(e.x-this.long0),a=e.y;a=sa(this.cbg,a);var n=E(a),r=O(a),s=E(t),l=O(t);a=i(n,l*r),t=i(s*r,na(n,r*l)),t=oa(w(t));var d=da(this.gtu,2*a,2*t);a+=d[0],t+=d[1];var p,u;return 2.623395162778>=o(t)?(p=this.a*(this.Qn*t)+this.x0,u=this.a*(this.Qn*a+this.Zb)+this.y0):(p=1/0,u=1/0),e.x=p,e.y=u,e},inverse:function(e){var t=(e.x-this.x0)*(1/this.a),a=(e.y-this.y0)*(1/this.a);a=(a-this.Zb)/this.Qn,t/=this.Qn;var n,r;if(2.623395162778>=o(t)){var s=da(this.utg,2*a,2*t);a+=s[0],t+=s[1],t=h(aa(t));var l=E(a),d=O(a),p=E(t),u=O(t);a=i(l*u,na(p,u*d)),t=i(p,u*d),n=Nt(t+this.long0),r=sa(this.cgb,a)}else n=1/0,r=1/0;return e.x=n,e.y=r,e},names:["Extended_Transverse_Mercator","Extended Transverse Mercator","etmerc","Transverse_Mercator","Transverse Mercator","tmerc"]},ua=function(e,t){if(void 0===e){if(e=p(30*(Nt(t)+f)/f)+1,0>e)return 0;if(60dt){if(p=this.E/l(Rt(this.e,e.y,E(e.y)),this.B),c=1/p,n=.5*(p-c),r=.5*(p+c),d=E(this.B*e.x),s=(n*this.singam-86*this.cosgam)/r,o(o(s)-1)c?-ot:ot;else{if(t.y=this.E/R((1+c)/(1-c)),t.y=Pt(this.e,l(t.y,1/this.B)),t.y===1/0)throw new Error;t.x=-this.rB*i(s*this.cosgam-p*this.singam,O(this.BrA*a))}return t.x+=this.lam0,t},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"]},ba={init:function(){if(this.lat2||(this.lat2=this.lat1),this.k0||(this.k0=1),this.x0=this.x0||0,this.y0=this.y0||0,!(o(this.lat1+this.lat2)dt?t(r/p)/t(s/u):a,isNaN(this.ns)&&(this.ns=a),this.f0=r/(this.ns*l(s,this.ns)),this.rh=this.a*this.f0*l(c,this.ns),this.title||(this.title="Lambert Conformal Conic")}},forward:function(e){var t=e.x,a=e.y;o(2*o(a)-f)<=dt&&(a=Tt(a)*(ot-2*dt));var n=o(o(a)-ot),r,s;if(n>dt)r=Rt(this.e,a,E(a)),s=this.a*this.f0*l(r,this.ns);else{if(n=a*this.ns,0>=n)return null;s=0}var i=this.ns*Nt(t-this.long0);return e.x=this.k0*(s*E(i))+this.x0,e.y=this.k0*(this.rh-s*O(i))+this.y0,e},inverse:function(e){var t=(e.x-this.x0)/this.k0,a=this.rh-(e.y-this.y0)/this.k0,n,r,o,s,d;0o(_-e.y)&&(g=1),_=e.y,y+=1;while(0===g&&15>y);return 15<=y?null:e},names:["Krovak","krovak"]},ka=function(e,t,a,n,r){return e*r-t*E(2*r)+a*E(4*r)-n*E(6*r)},Ca=function(e){return 1-.25*e*(1+e/16*(3+1.25*e))},Sa=function(e){return .375*e*(1+.25*e*(1+.46875*e))},va=function(e){return .05859375*e*e*(1+.75*e)},Ea=function(e){return e*e*e*(35/3072)},Aa=function(t,a,e){var n=a*e;return t/R(1-n*n)},e=function(e){return o(e)d;d++)if(l=(e-(t*s-a*E(2*s)+n*E(4*s)-r*E(6*s)))/(t-2*a*O(2*s)+4*n*O(4*s)-6*r*O(6*s)),s+=l,1e-10>=o(l))return s;return NaN},c={init:function(){this.sphere||(this.e0=Ca(this.es),this.e1=Sa(this.es),this.e2=va(this.es),this.e3=Ea(this.es),this.ml0=this.a*ka(this.e0,this.e1,this.e2,this.e3,this.lat0))},forward:function(e){var t=e.x,n=e.y,r,o;if(t=Nt(t-this.long0),this.sphere)r=this.a*a(O(n)*E(t)),o=this.a*(i(w(n),O(t))-this.lat0);else{var s=E(n),l=O(n),d=Aa(this.a,this.e,s),p=w(n)*w(n),u=t*O(n),c=u*u,m=this.es*l*l/(1-this.es),f=this.a*ka(this.e0,this.e1,this.e2,this.e3,n);r=d*u*(1-c*p*(1/6-(8-p+8*m)*c/120)),o=f-this.ml0+d*s/l*c*(.5+(5-p+6*m)*c/24)}return e.x=r+this.x0,e.y=o+this.y0,e},inverse:function(t){t.x-=this.x0,t.y-=this.y0;var n=t.x/this.a,r=t.y/this.a,d,p;if(this.sphere){var u=r+this.lat0;d=a(E(u)*O(n)),p=i(w(n),O(u))}else{var c=this.ml0/this.a+r,m=s(c,this.e0,this.e1,this.e2,this.e3);if(o(o(m)-ot)<=dt)return t.x=this.long0,t.y=ot,0>r&&(t.y*=-1),t;var f=Aa(this.a,this.e,E(m)),h=f*f*f/this.a/this.a*(1-this.es),_=l(w(m),2),g=n*this.a/f,y=g*g;d=m-f*w(m)/h*g*g*(.5-(1+3*_)*g*g/24),p=g*(1-y*(_/3+(1+3*_)*_*y/15))/O(m)}return t.x=Nt(p+this.long0),t.y=e(d),t},names:["Cassini","Cassini_Soldner","cass"]},g=function(e,a){var n;return 1e-7this.lat0?this.S_POLE:this.N_POLE:o(e)dt?(this.ms1*this.ms1-this.ms2*this.ms2)/(this.qs2-this.qs1):this.con,this.c=this.ms1*this.ms1+this.ns0*this.qs1,this.rh=this.a*R(this.c-this.ns0*this.qs0)/this.ns0)},forward:function(e){var t=e.x,a=e.y;this.sin_phi=E(a),this.cos_phi=O(a);var n=g(this.e3,this.sin_phi,this.cos_phi),r=this.a*R(this.c-this.ns0*n)/this.ns0,o=this.ns0*Nt(t-this.long0),s=r*E(o)+this.x0,i=this.rh-r*O(o)+this.y0;return e.x=s,e.y=i,e},inverse:function(e){var t,n,r,o,s,l;return e.x-=this.x0,e.y=this.rh-e.y+this.y0,0<=this.ns0?(t=R(e.x*e.x+e.y*e.y),r=1):(t=-R(e.x*e.x+e.y*e.y),r=-1),o=0,0!==t&&(o=i(r*e.x,r*e.y)),r=t*this.ns0/this.a,this.sphere?l=a((this.c-r*r)/(2*this.ns0)):(n=(this.c-r*r)/this.ns0,l=this.phi1z(this.e3,n)),s=Nt(o/this.ns0+this.long0),e.x=s,e.y=l,e},names:["Albers_Conic_Equal_Area","Albers","aea"],phi1z:function(e,a){var n=I(.5*a),r,s,l,d,p;if(e=u;u++)if(r=E(n),s=O(n),l=e*r,d=1-l*l,p=.5*d*d/s*(a/(1-e*e)-r/d+.5/e*t((1-l)/(1+l))),n+=p,1e-7>=o(p))return n;return null}},L={init:function(){this.sin_p14=E(this.lat0),this.cos_p14=O(this.lat0),this.infinity_dist=1e3*this.a,this.rc=1},forward:function(e){var t=e.x,a=e.y,n,r,s,i,l,d,p,u;return s=Nt(t-this.long0),n=E(a),r=O(a),i=O(s),d=this.sin_p14*n+this.cos_p14*r*i,l=1,0o(o(n)-r))return 0>n?-1*ot:ot;for(var s=a(.5*n),d=0,p,u,c,m;30>d;d++)if(u=E(s),c=O(s),m=e*u,p=l(1-m*m,2)/(2*c)*(n/(1-e*e)-u/(1-m*m)+.5/e*t((1-m)/(1+m))),s+=p,1e-10>=o(p))return s;return NaN},T={init:function(){this.sphere||(this.k0=zt(this.e,E(this.lat_ts),O(this.lat_ts)))},forward:function(e){var t=e.x,a=e.y,n=Nt(t-this.long0),r,o;if(this.sphere)r=this.x0+this.a*n*O(this.lat_ts),o=this.y0+this.a*E(a)/O(this.lat_ts);else{var s=g(this.e,E(a));r=this.x0+this.a*this.k0*n,o=this.y0+.5*(this.a*s)/this.k0}return e.x=r,e.y=o,e},inverse:function(e){e.x-=this.x0,e.y-=this.y0;var t,n;return this.sphere?(t=Nt(this.long0+e.x/this.a/O(this.lat_ts)),n=a(e.y/this.a*O(this.lat_ts))):(n=z(this.e,2*e.y*this.k0/this.a),t=Nt(this.long0+e.x/(this.a*this.k0))),e.x=t,e.y=n,e},names:["cea"]},N={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=O(this.lat_ts)},forward:function(t){var a=t.x,n=t.y,r=Nt(a-this.long0),o=e(n-this.lat0);return t.x=this.x0+this.a*r*this.rc,t.y=this.y0+this.a*o,t},inverse:function(t){var a=t.x,n=t.y;return t.x=Nt(this.long0+(a-this.x0)/(this.a*this.rc)),t.y=e(this.lat0+(n-this.y0)/this.a),t},names:["Equirectangular","Equidistant_Cylindrical","eqc"]},Ia={init:function(){this.temp=this.b/this.a,this.es=1-l(this.temp,2),this.e=R(this.es),this.e0=Ca(this.es),this.e1=Sa(this.es),this.e2=va(this.es),this.e3=Ea(this.es),this.ml0=this.a*ka(this.e0,this.e1,this.e2,this.e3,this.lat0)},forward:function(t){var a=t.x,n=t.y,r=Nt(a-this.long0),s,i,l;if(l=r*E(n),this.sphere)o(n)<=dt?(s=this.a*r,i=-1*this.a*this.lat0):(s=this.a*E(l)/w(n),i=this.a*(e(n-this.lat0)+(1-O(l))/w(n)));else if(o(n)<=dt)s=this.a*r,i=-1*this.ml0;else{var d=Aa(this.a,this.e,E(n))/w(n);s=d*E(l),i=this.a*ka(this.e0,this.e1,this.e2,this.e3,n)-this.ml0+d*(1-O(l))}return t.x=s+this.x0,t.y=i+this.y0,t},inverse:function(e){var t,n,r,s,d,p,u,c,m;if(r=e.x-this.x0,s=e.y-this.y0,this.sphere){if(o(s+this.a*this.lat0)<=dt)t=Nt(r/this.a+this.long0),n=0;else{p=this.lat0+s/this.a,u=r*r/this.a/this.a+p*p,c=p;var f;for(d=20;d;--d)if(f=w(c),m=-1*(p*(c*f+1)-c-.5*(c*c+u)*f)/((c-p)/f-1),c+=m,o(m)<=dt){n=c;break}t=Nt(this.long0+a(r*w(c)/this.a)/E(n))}}else if(o(s+this.ml0)<=dt)n=0,t=Nt(this.long0+r/this.a);else{p=(this.ml0+s)/this.a,u=r*r/this.a/this.a+p*p,c=p;var h,_,g,b,k;for(d=20;d;--d)if(k=this.e*E(c),h=R(1-k*k)*w(c),_=this.a*ka(this.e0,this.e1,this.e2,this.e3,c),g=this.e0-2*this.e1*O(2*c)+4*this.e2*O(4*c)-6*this.e3*O(6*c),b=_/this.a,m=(p*(h*b+1)-b-.5*h*(b*b+u))/(this.es*E(2*c)*(b*b+u-2*p*b)/(4*h)+(p-b)*(h*g-2/E(2*c))-g),c-=m,o(m)<=dt){n=c;break}h=R(1-this.es*l(E(n),2))*w(n),t=Nt(this.long0+a(r*h/this.a)/E(n))}return e.x=t,e.y=n,e},names:["Polyconic","poly"]},Oa={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(e){var t=e.x,a=e.y,r=a-this.lat0,o=t-this.long0,s=1,i=0,l;for(l=1;10>=l;l++)s*=1E-5*(r/rt),i+=this.A[l]*s;var d=i,p=o,u=1,c=0,m=0,f=0,h,_;for(l=1;6>=l;l++)h=u*d-c*p,_=c*d+u*p,u=h,c=_,m=m+this.B_re[l]*u-this.B_im[l]*c,f=f+this.B_im[l]*u+this.B_re[l]*c;return e.x=f*this.a+this.x0,e.y=m*this.a+this.y0,e},inverse:function(e){var t=e.x,a=e.y,r=t-this.x0,o=a-this.y0,s=o/this.a,l=r/this.a,d=1,p=0,u=0,c=0,m,f,h;for(m=1;6>=m;m++)f=d*s-p*l,h=p*s+d*l,d=f,p=h,u=u+this.C_re[m]*d-this.C_im[m]*p,c=c+this.C_im[m]*d+this.C_re[m]*p;for(var _=0;_=m;m++)w=g*u-y*c,k=y*u+g*c,g=w,y=k,x+=(m-1)*(this.B_re[m]*g-this.B_im[m]*y),b+=(m-1)*(this.B_im[m]*g+this.B_re[m]*y);g=1,y=0;var C=this.B_re[1],S=this.B_im[1];for(m=2;6>=m;m++)w=g*u-y*c,k=y*u+g*c,g=w,y=k,C+=m*(this.B_re[m]*g-this.B_im[m]*y),S+=m*(this.B_im[m]*g+this.B_re[m]*y);var v=C*C+S*S;u=(x*C+b*S)/v,c=(b*C-x*S)/v}var E=u,A=c,I=1,O=0;for(m=1;9>=m;m++)I*=E,O+=this.D[m]*I;var B=this.lat0+1E5*(O*rt),L=this.long0+A;return e.x=L,e.y=B,e},names:["New_Zealand_Map_Grid","nzmg"]},Ba={init:function(){},forward:function(e){var a=e.x,n=e.y,r=Nt(a-this.long0),o=this.x0+this.a*r,s=this.y0+1.25*(this.a*t(w(f/4+n/2.5)));return e.x=o,e.y=s,e},inverse:function(e){e.x-=this.x0,e.y-=this.y0;var t=Nt(this.long0+e.x/this.a),a=2.5*(h(_(.8*e.y/this.a))-f/4);return e.x=t,e.y=a,e},names:["Miller_Cylindrical","mill"]},La={init:function(){this.sphere?(this.n=1,this.m=0,this.es=0,this.C_y=R((this.m+1)/this.n),this.C_x=this.C_y/(this.m+1)):this.en=Vt(this.es)},forward:function(e){var t=e.x,n=e.y,r,l;if(t=Nt(t-this.long0),this.sphere){if(!this.m)n=1===this.n?n:a(this.n*E(n));else for(var d=this.n*E(n),p=20,u;p&&(u=(this.m*n+E(n)-d)/(this.m+O(n)),n-=u,!(o(u)f&&(r=f),n=(2*t+E(2*t))/f,1n&&(_=-_),r=this.x0+_;var g=d+c;return _=f*this.R*(h*g-l*R((m+d)*(d+1)-g*g))/(m+d),s=0<=a?this.y0+_:this.y0-_,e.x=r,e.y=s,e},inverse:function(e){var t,a,r,s,i,l,p,u,c,m,h,_,g;return e.x-=this.x0,e.y-=this.y0,h=f*this.R,r=e.x/h,s=e.y/h,i=r*r+s*s,l=-o(s)*(1+i),p=l-2*s*s+r*r,u=-2*l+1+2*s*s+i*i,g=s*s/u+(2*p*p*p/u/u/u-9*l*p/u/u)/27,c=(l-p*p/3/u)/u,m=2*R(-c/3),h=3*g/c/m,12*ot*this.a)?void 0:(n=t/this.a,r=E(n),d=O(n),p=this.long0,o(t)<=dt?u=this.lat0:(u=I(d*this.sin_p12+e.y*r*this.cos_p12/t),c=o(this.lat0)-ot,p=o(c)<=dt?0<=this.lat0?Nt(this.long0+i(e.x,-e.y)):Nt(this.long0-i(-e.x,e.y)):Nt(this.long0+i(e.x*r,t*this.cos_p12*d-e.y*this.sin_p12*r))),e.x=p,e.y=u,e):(m=Ca(this.es),f=Sa(this.es),h=va(this.es),_=Ea(this.es),o(this.sin_p12-1)<=dt?(g=this.a*ka(m,f,h,_,ot),t=R(e.x*e.x+e.y*e.y),y=g-t,u=s(y/this.a,m,f,h,_),p=Nt(this.long0+i(e.x,-1*e.y)),e.x=p,e.y=u,e):o(this.sin_p12+1)<=dt?(g=this.a*ka(m,f,h,_,ot),t=R(e.x*e.x+e.y*e.y),y=t-g,u=s(y/this.a,m,f,h,_),p=Nt(this.long0+i(e.x,e.y)),e.x=p,e.y=u,e):(t=R(e.x*e.x+e.y*e.y),k=i(e.x,e.y),x=Aa(this.a,this.e,this.sin_p12),C=O(k),S=this.e*this.cos_p12*C,v=-S*S/(1-this.es),L=3*this.es*(1-v)*this.sin_p12*this.cos_p12*C/(1-this.es),T=t/x,N=T-v*(1+v)*l(T,3)/6-L*(1+3*v)*l(T,4)/24,P=1-v*N*N/2-T*N*N*N/6,b=a(this.sin_p12*O(N)+this.cos_p12*E(N)*C),p=Nt(this.long0+a(E(k)*E(N)/O(b))),j=E(b),u=i((j-this.es*P*this.sin_p12)*w(b),j*(1-this.es)),e.x=p,e.y=u,e))},names:["Azimuthal_Equidistant","aeqd"]},Pa={init:function(){this.sin_p14=E(this.lat0),this.cos_p14=O(this.lat0)},forward:function(e){var t=e.x,a=e.y,n,r,s,i,l,d,p,u;return s=Nt(t-this.long0),n=E(a),r=O(a),i=O(s),d=this.sin_p14*n+this.cos_p14*r*i,l=1,(0=ot-ct/2?ja.TOP:this.lat0<=-(ot-ct/2)?ja.BOTTOM:o(this.long0)<=ct?ja.FRONT:o(this.long0)<=ot+ct?0=ct&&l<=ot+ct?(o.value=Da.AREA_0,d=l-ot):l>ot+ct||l<=-(ot+ct)?(o.value=Da.AREA_1,d=0-(ot+ct)&&l<=-ct?(o.value=Da.AREA_2,d=l+ot):(o.value=Da.AREA_3,d=l);else if(this.face===ja.BOTTOM)p=ot+i,l>=ct&&l<=ot+ct?(o.value=Da.AREA_0,d=-l+ot):l=-ct?(o.value=Da.AREA_1,d=-l):l<-ct&&l>=-(ot+ct)?(o.value=Da.AREA_2,d=-l-ot):(o.value=Da.AREA_3,d=0=o(e.y)?l.value=Da.AREA_0:0<=e.y&&e.y>=o(e.x)?(l.value=Da.AREA_1,d-=ot):0>e.x&&-e.x>=o(e.y)?(l.value=Da.AREA_2,d=0>d?d+ft:d-ft):(l.value=Da.AREA_3,d+=ot),y=ft/12*w(d),m=E(y)/(O(y)-1/R(2)),f=h(m),u=O(d),c=w(p),_=1-u*u*c*c*(1-O(h(1/O(f)))),-1>_?_=-1:1<_&&(_=1),this.face===ja.TOP)g=n(_),a.phi=ot-g,a.lam=l.value===Da.AREA_0?f+ot:l.value===Da.AREA_1?0>f?f+ft:f-ft:l.value===Da.AREA_2?f-ot:f;else if(this.face===ja.BOTTOM)g=n(_),a.phi=g-ot,a.lam=l.value===Da.AREA_0?-f+ot:l.value===Da.AREA_1?-f:l.value===Da.AREA_2?-f-ot:0>f?-f-ft:-f+ft;else{var x,b,k;x=_,y=x*x,k=1<=y?0:R(1-y)*E(f),y+=k*k,b=1<=y?0:R(1-y),l.value===Da.AREA_1?(y=b,b=-k,k=y):l.value===Da.AREA_2?(b=-b,k=-k):l.value===Da.AREA_3&&(y=b,b=k,k=-y),this.face===ja.RIGHT?(y=x,x=-b,b=y):this.face===ja.BACK?(x=-x,b=-b):this.face===ja.LEFT&&(y=x,x=b,b=-y),a.phi=n(-k)-ot,a.lam=i(b,x),this.face===ja.RIGHT?a.lam=Ve(a.lam,-ot):this.face===ja.BACK?a.lam=Ve(a.lam,-ft):this.face===ja.LEFT&&(a.lam=Ve(a.lam,+ot))}if(0!==this.es){var C,S,v;C=0>a.phi?1:0,S=w(a.phi),v=this.b/R(S*S+this.one_minus_f_squared),a.phi=h(R(this.a*this.a-v*v)/(this.one_minus_f*v)),C&&(a.phi=-a.phi)}return a.lam+=this.long0,e.x=a.lam,e.y=a.phi,e},names:["Quadrilateralized Spherical Cube","Quadrilateralized_Spherical_Cube","qsc"]},Ua=[[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]],Ma=[[-520417e-23,.0124,121431e-23,-845284e-16],[.062,.0124,-1.26793e-9,422642e-15],[.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]],Ga=.8487,Wa=1.3523,Za=ut/5,A=function(e,t){return e[0]+t*(e[1]+t*(e[2]+t*e[3]))},qa=function(e,t){return e[1]+t*(2*e[2]+3*t*e[3])},Ha={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(e){var t=Nt(e.x-this.long0),a=o(e.y),n=p(a*Za);0>n?n=0:18<=n&&(n=17),a=ut*(a-1/Za*n);var r={x:A(Ua[n],a)*t,y:A(Ma[n],a)};return 0>e.y&&(r.y=-r.y),r.x=r.x*this.a*Ga+this.x0,r.y=r.y*this.a*Wa+this.y0,r},inverse:function(e){var a={x:(e.x-this.x0)/(this.a*Ga),y:o(e.y-this.y0)/(this.a*Wa)};if(1<=a.y)a.x/=Ua[18][0],a.y=0>e.y?-ot:ot;else{var n=p(18*a.y);for(0>n?n=0:18<=n&&(n=17);;)if(Ma[n][0]>a.y)--n;else if(Ma[n+1][0]<=a.y)++n;else break;var r=Ma[n],s=5*(a.y-r[0])/(Ma[n+1][0]-r[0]);s=$e(function(e){return(A(r,e)-a.y)/qa(r,e)},s,dt,100),a.x/=A(Ua[n],s),a.y=(5*n+s)*pt,0>e.y&&(a.y=-a.y)}return a.x=Nt(a.x+this.long0),a},names:["Robinson","robin"]},Ka={init:function(){this.name="geocent"},forward:function(e){var t=ge(e,this.es,this.a);return t},inverse:function(e){var t=ye(e,this.es,this.a,this.b);return t},names:["Geocentric","geocentric","geocent","Geocent"]},Qa={N_POLE:0,S_POLE:1,EQUIT:2,OBLIQ:3},Ja={h:{def:1e5,num:!0},azi:{def:0,num:!0,degrees:!0},tilt:{def:0,num:!0,degrees:!0},long0:{def:0,num:!0},lat0:{def:0,num:!0}},Xa={init:function(){if(Object.keys(Ja).forEach(function(e){if("undefined"==typeof this[e])this[e]=Ja[e].def;else if(Ja[e].num&&isNaN(this[e]))throw new Error("Invalid parameter value, must be numeric "+e+" = "+this[e]);else Ja[e].num&&(this[e]=parseFloat(this[e]));Ja[e].degrees&&(this[e]*=pt)}.bind(this)),o(o(this.lat0)-ot)this.lat0?Qa.S_POLE:Qa.N_POLE:o(this.lat0)=this.pn1||1e10 */var o=e("buffer"),s=o.Buffer;s.from&&s.alloc&&s.allocUnsafe&&s.allocUnsafeSlow?t.exports=o:(n(o,a),a.Buffer=r),r.prototype=Object.create(s.prototype),n(s,r),r.from=function(e,t,a){if("number"==typeof e)throw new TypeError("Argument must not be a number");return s(e,t,a)},r.alloc=function(e,t,a){if("number"!=typeof e)throw new TypeError("Argument must be a number");var n=s(e);return void 0===t?n.fill(0):"string"==typeof a?n.fill(t,a):n.fill(t),n},r.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return s(e)},r.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return o.SlowBuffer(e)}},{buffer:12}],21:[function(e,t,a){'use strict';function n(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0;}}function r(e){var t=n(e);if("string"!=typeof t&&(g.isEncoding===y||!y(e)))throw new Error("Unknown encoding: "+e);return t||e}function o(e){this.encoding=r(e);var t;switch(this.encoding){case"utf16le":this.text=u,this.end=c,t=4;break;case"utf8":this.fillLast=p,t=4;break;case"base64":this.text=m,this.end=f,t=3;break;default:return this.write=h,void(this.end=_);}this.lastNeed=0,this.lastTotal=0,this.lastChar=g.allocUnsafe(t)}function s(e){if(127>=e)return 0;return 6==e>>5?2:14==e>>4?3:30==e>>3?4:2==e>>6?-1:-2}function l(e,t,a){var n=t.length-1;if(n=n)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],a.slice(0,-1)}return a}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function c(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var a=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,a)}return t}function m(e,t){var a=(e.length-t)%3;return 0==a?e.toString("base64",t):(this.lastNeed=3-a,this.lastTotal=3,1==a?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-a))}function f(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function h(e){return e.toString(this.encoding)}function _(e){return e&&e.length?this.write(e):""}var g=e("safe-buffer").Buffer,y=g.isEncoding||function(e){switch(e=""+e,e&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1;}};a.StringDecoder=o,o.prototype.write=function(e){if(0===e.length)return"";var t,a;if(this.lastNeed){if(t=this.fillLast(e),void 0===t)return"";a=this.lastNeed,this.lastNeed=0}else a=0;return aarguments.length)&&i.call(arguments,1);return l[t]=!0,o(function(){l[t]&&(n?e.apply(null,n):e.call(null),a.clearImmediate(t))}),t},a.clearImmediate="function"==typeof n?n:function(e){delete l[e]}}).call(this)}).call(this,e("timers").setImmediate,e("timers").clearImmediate)},{"process/browser.js":18,timers:22}],23:[function(e,t){(function(a){(function(){'use strict';function n(e){if(!e)throw new Error("forgot to pass buffer");return m.isBuffer(e)?e:e instanceof a.ArrayBuffer?m.from(e):e.buffer instanceof a.ArrayBuffer?1===e.BYTES_PER_ELEMENT?m.from(e):m.from(e.buffer):void 0}function r(e,t){return"string"==typeof e&&h.has(e)?u.resolve(h.get(e)):r.getShapefile(e,t).then(function(t){return"string"==typeof e&&h.set(e,t),t})}async function o(e,t){const n=await l(e);return r.parseZip(n,t)}let s=e("proj4");s.default&&(s=s.default);const i=e("./unzip"),l=e("./binaryajax"),d=e("./parseShp"),p=e("parsedbf"),u=e("lie"),c=e("lru-cache"),m=e("buffer").Buffer,f=a.URL,h=new c({max:20});r.combine=function(e){const t={type:"FeatureCollection",features:[]};let a=0;for(const n=e[0].length;a{const t=await u.all([l(e,"shp"),l(e,"prj")]);let a=!1;try{t[1]&&(a=s(t[1]))}catch(t){a=!1}return d(t[0],a)},g=async e=>{const[t,a]=await u.all([l(e,"dbf"),l(e,"cpg")]);return p(t,a)},y=(e,t)=>{const a=new f(e);return a.pathname.slice(-4).toLowerCase()===t};r.getShapefile=async function(e,t){if("string"!=typeof e)return r.parseZip(e);if(y(e,".zip"))return o(e,t);const a=await u.all([_(e),g(e)]);return r.combine(a)},r.parseShp=function(e,t){if(e=n(e),m.isBuffer(t)&&(t=t.toString()),"string"==typeof t)try{t=s(t)}catch(a){t=!1}return d(e,t)},r.parseDbf=function(e,t){return e=n(e),p(e,t)},t.exports=r}).call(this)}).call(this,"undefined"==typeof global?"undefined"==typeof self?"undefined"==typeof window?{}:window:self:global)},{"./binaryajax":6,"./parseShp":8,"./unzip":9,buffer:12,lie:16,"lru-cache":17,parsedbf:2,proj4:19}]},{},[23])(23)});