!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.GeoRaster=e():t.GeoRaster=e()}("undefined"!=typeof self?self:this,(function(){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)r.d(n,i,function(e){return t[e]}.bind(null,i));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=107)}([function(t,e,r){"use strict";const n=r(73);t.exports=function(t){return"+"===t[0]&&(t=t.substring(1)),(t=(t=n(t)).replace(/^0+(?=\d)/,"")).includes(".")&&(t=t.replace(/\.?0+$/,"")),""===t&&(t="0"),"-0"===t&&(t="0"),t}},function(t,e,r){"use strict";const n=r(4),i=r(0),o=r(15),s=r(32);function a(t,e,r){t=i(t),e=i(e);const a="-"!==t[0],u="-"!==e[0],c=o(t),l=o(e);if(c||l)return a==u?"Infinity":"-Infinity";if("0"===e)throw new Error("[preciso] division by zero");if(""===t||"0"===t)return"0";const f=a!==u?"-":"";return a||(t=n(t)),u||(e=n(e)),f+s(t,e,r)}t.exports=a,t.exports.default=a},function(t,e,r){"use strict";r.d(e,"a",(function(){return n})),r.d(e,"b",(function(){return i})),r.d(e,"c",(function(){return o})),r.d(e,"d",(function(){return s})),r.d(e,"e",(function(){return a}));const n=Symbol("thread.errors"),i=Symbol("thread.events"),o=Symbol("thread.terminate"),s=Symbol("thread.transferable"),a=Symbol("thread.worker")},function(t,e){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(t){"object"==typeof window&&(r=window)}t.exports=r},function(t,e,r){"use strict";const n=r(0);function i(t){return"-"===(t=n(t))[0]?t.substring(1):t}t.exports=i,t.exports.default=i},function(t,e,r){"use strict";function n(t,e){const r=t.length,n=e.length,i=t.indexOf("."),o=e.indexOf("."),s=-1===i?r:i,a=-1===o?n:o,u=s-a;let c=u<0?-1*u:0,l=u<=0?0:u,f=Math.max(s,a)+1+Math.max(r-s,n-a)-1,h=0;for(;ho)return">";if(n":return"-"+s(t,e)}else if(u&&!c)switch(e=e.substring(1),n(t,e)){case"=":return"0";case"<":return"-"+s(e,t);case">":return s(t,e)}}t.exports=u,t.exports.default=u},function(t,e,r){"use strict";(function(t){ /*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh * @license MIT */ var n=r(108),i=r(109),o=r(60);function s(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(t,e){if(s()=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|t}function p(t,e){if(u.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var r=t.length;if(0===r)return 0;for(var n=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return B(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return G(t).length;default:if(n)return B(t).length;e=(""+e).toLowerCase(),n=!0}}function y(t,e,r){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return C(this,e,r);case"utf8":case"utf-8":return k(this,e,r);case"ascii":return T(this,e,r);case"latin1":case"binary":return O(this,e,r);case"base64":return E(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function g(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function m(t,e,r,n,i){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return-1;r=t.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof e&&(e=u.from(e,n)),u.isBuffer(e))return 0===e.length?-1:b(t,e,r,n,i);if("number"==typeof e)return e&=255,u.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):b(t,[e],r,n,i);throw new TypeError("val must be string, number or Buffer")}function b(t,e,r,n,i){var o,s=1,a=t.length,u=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;s=2,a/=2,u/=2,r/=2}function c(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(i){var l=-1;for(o=r;oa&&(r=a-u),o=r;o>=0;o--){for(var f=!0,h=0;hi&&(n=i):n=i;var o=e.length;if(o%2!=0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var s=0;s>8,i=r%256,o.push(i),o.push(n);return o}(e,t.length-r),t,r,n)}function E(t,e,r){return 0===e&&r===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,r))}function k(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;i239?4:c>223?3:c>191?2:1;if(i+f<=r)switch(f){case 1:c<128&&(l=c);break;case 2:128==(192&(o=t[i+1]))&&(u=(31&c)<<6|63&o)>127&&(l=u);break;case 3:o=t[i+1],s=t[i+2],128==(192&o)&&128==(192&s)&&(u=(15&c)<<12|(63&o)<<6|63&s)>2047&&(u<55296||u>57343)&&(l=u);break;case 4:o=t[i+1],s=t[i+2],a=t[i+3],128==(192&o)&&128==(192&s)&&128==(192&a)&&(u=(15&c)<<18|(63&o)<<12|(63&s)<<6|63&a)>65535&&u<1114112&&(l=u)}null===l?(l=65533,f=1):l>65535&&(l-=65536,n.push(l>>>10&1023|55296),l=56320|1023&l),n.push(l),i+=f}return function(t){var e=t.length;if(e<=4096)return String.fromCharCode.apply(String,t);var r="",n=0;for(;n0&&(t=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(t+=" ... ")),""},u.prototype.compare=function(t,e,r,n,i){if(!u.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),e<0||r>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&e>=r)return 0;if(n>=i)return-1;if(e>=r)return 1;if(this===t)return 0;for(var o=(i>>>=0)-(n>>>=0),s=(r>>>=0)-(e>>>=0),a=Math.min(o,s),c=this.slice(n,i),l=t.slice(e,r),f=0;fi)&&(r=i),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return v(this,t,e,r);case"utf8":case"utf-8":return w(this,t,e,r);case"ascii":return x(this,t,e,r);case"latin1":case"binary":return _(this,t,e,r);case"base64":return S(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,t,e,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function T(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;in)&&(r=n);for(var i="",o=e;or)throw new RangeError("Trying to access beyond buffer length")}function R(t,e,r,n,i,o){if(!u.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||et.length)throw new RangeError("Index out of range")}function j(t,e,r,n){e<0&&(e=65535+e+1);for(var i=0,o=Math.min(t.length-r,2);i>>8*(n?i:1-i)}function M(t,e,r,n){e<0&&(e=4294967295+e+1);for(var i=0,o=Math.min(t.length-r,4);i>>8*(n?i:3-i)&255}function L(t,e,r,n,i,o){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function F(t,e,r,n,o){return o||L(t,0,r,4),i.write(t,e,r,n,23,4),r+4}function N(t,e,r,n,o){return o||L(t,0,r,8),i.write(t,e,r,n,52,8),r+8}u.prototype.slice=function(t,e){var r,n=this.length;if((t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(e=void 0===e?n:~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),e0&&(i*=256);)n+=this[t+--e]*i;return n},u.prototype.readUInt8=function(t,e){return e||I(t,1,this.length),this[t]},u.prototype.readUInt16LE=function(t,e){return e||I(t,2,this.length),this[t]|this[t+1]<<8},u.prototype.readUInt16BE=function(t,e){return e||I(t,2,this.length),this[t]<<8|this[t+1]},u.prototype.readUInt32LE=function(t,e){return e||I(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},u.prototype.readUInt32BE=function(t,e){return e||I(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},u.prototype.readIntLE=function(t,e,r){t|=0,e|=0,r||I(t,e,this.length);for(var n=this[t],i=1,o=0;++o=(i*=128)&&(n-=Math.pow(2,8*e)),n},u.prototype.readIntBE=function(t,e,r){t|=0,e|=0,r||I(t,e,this.length);for(var n=e,i=1,o=this[t+--n];n>0&&(i*=256);)o+=this[t+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*e)),o},u.prototype.readInt8=function(t,e){return e||I(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},u.prototype.readInt16LE=function(t,e){e||I(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt16BE=function(t,e){e||I(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt32LE=function(t,e){return e||I(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},u.prototype.readInt32BE=function(t,e){return e||I(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},u.prototype.readFloatLE=function(t,e){return e||I(t,4,this.length),i.read(this,t,!0,23,4)},u.prototype.readFloatBE=function(t,e){return e||I(t,4,this.length),i.read(this,t,!1,23,4)},u.prototype.readDoubleLE=function(t,e){return e||I(t,8,this.length),i.read(this,t,!0,52,8)},u.prototype.readDoubleBE=function(t,e){return e||I(t,8,this.length),i.read(this,t,!1,52,8)},u.prototype.writeUIntLE=function(t,e,r,n){(t=+t,e|=0,r|=0,n)||R(this,t,e,r,Math.pow(2,8*r)-1,0);var i=1,o=0;for(this[e]=255&t;++o=0&&(o*=256);)this[e+i]=t/o&255;return e+r},u.prototype.writeUInt8=function(t,e,r){return t=+t,e|=0,r||R(this,t,e,1,255,0),u.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},u.prototype.writeUInt16LE=function(t,e,r){return t=+t,e|=0,r||R(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):j(this,t,e,!0),e+2},u.prototype.writeUInt16BE=function(t,e,r){return t=+t,e|=0,r||R(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):j(this,t,e,!1),e+2},u.prototype.writeUInt32LE=function(t,e,r){return t=+t,e|=0,r||R(this,t,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):M(this,t,e,!0),e+4},u.prototype.writeUInt32BE=function(t,e,r){return t=+t,e|=0,r||R(this,t,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):M(this,t,e,!1),e+4},u.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e|=0,!n){var i=Math.pow(2,8*r-1);R(this,t,e,r,i-1,-i)}var o=0,s=1,a=0;for(this[e]=255&t;++o>0)-a&255;return e+r},u.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e|=0,!n){var i=Math.pow(2,8*r-1);R(this,t,e,r,i-1,-i)}var o=r-1,s=1,a=0;for(this[e+o]=255&t;--o>=0&&(s*=256);)t<0&&0===a&&0!==this[e+o+1]&&(a=1),this[e+o]=(t/s>>0)-a&255;return e+r},u.prototype.writeInt8=function(t,e,r){return t=+t,e|=0,r||R(this,t,e,1,127,-128),u.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},u.prototype.writeInt16LE=function(t,e,r){return t=+t,e|=0,r||R(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):j(this,t,e,!0),e+2},u.prototype.writeInt16BE=function(t,e,r){return t=+t,e|=0,r||R(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):j(this,t,e,!1),e+2},u.prototype.writeInt32LE=function(t,e,r){return t=+t,e|=0,r||R(this,t,e,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):M(this,t,e,!0),e+4},u.prototype.writeInt32BE=function(t,e,r){return t=+t,e|=0,r||R(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):M(this,t,e,!1),e+4},u.prototype.writeFloatLE=function(t,e,r){return F(this,t,e,!0,r)},u.prototype.writeFloatBE=function(t,e,r){return F(this,t,e,!1,r)},u.prototype.writeDoubleLE=function(t,e,r){return N(this,t,e,!0,r)},u.prototype.writeDoubleBE=function(t,e,r){return N(this,t,e,!1,r)},u.prototype.copy=function(t,e,r,n){if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e=0;--i)t[i+e]=this[i+r];else if(o<1e3||!u.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(o=e;o55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(s+1===n){(e-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;o.push(r)}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function G(t){return n.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(D,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function q(t,e,r,n){for(var i=0;i=e.length||i>=t.length);++i)e[i+r]=t[i];return i}}).call(this,r(3))},function(t,e){var r,n,i=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function a(t){if(r===setTimeout)return setTimeout(t,0);if((r===o||!r)&&setTimeout)return r=setTimeout,setTimeout(t,0);try{return r(t,0)}catch(e){try{return r.call(null,t,0)}catch(e){return r.call(this,t,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:o}catch(t){r=o}try{n="function"==typeof clearTimeout?clearTimeout:s}catch(t){n=s}}();var u,c=[],l=!1,f=-1;function h(){l&&u&&(l=!1,u.length?c=u.concat(c):f=-1,c.length&&d())}function d(){if(!l){var t=a(h);l=!0;for(var e=c.length;e;){for(u=c,c=[];++f1)for(var r=1;r0){for(;m>p-f;){const r=t[m-h]||"0",n=e[m-d]||"0";let i=Number(r)+Number(n)+g;i>=10?(i-=10,g=1):g=0,""===y&&0===i||(y=i+y),m--}y&&(y="."+y),m--}if(l>0)for(;m>=0;){const r=t[m-h]||"0",n=e[m-d]||"0";let i=Number(r)+Number(n)+g;i>=10?(i-=10,g=1):g=0,y=i+y,m--}return 1===g&&(y=g+y),"."===y[0]&&(y="0"+y),y}t.exports=i,t.exports.default=i},function(t,e){"function"==typeof Object.create?t.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(t,e){if(e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}}},function(t,e,r){"use strict";function n(t){return/^[-+]?0(\.0+)?(e[\.\d]+)?$/.test(t)}t.exports=n,t.exports.default=n},function(t,e,r){(function(n){e.formatArgs=function(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+t.exports.humanize(this.diff),!this.useColors)return;const r="color: "+this.color;e.splice(1,0,r,"color: inherit");let n=0,i=0;e[0].replace(/%[a-zA-Z%]/g,t=>{"%%"!==t&&(n++,"%c"===t&&(i=n))}),e.splice(i,0,r)},e.save=function(t){try{t?e.storage.setItem("debug",t):e.storage.removeItem("debug")}catch(t){}},e.load=function(){let t;try{t=e.storage.getItem("debug")}catch(t){}!t&&void 0!==n&&"env"in n&&(t=n.env.DEBUG);return t},e.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},e.storage=function(){try{return localStorage}catch(t){}}(),e.destroy=(()=>{let t=!1;return()=>{t||(t=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),e.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],e.log=console.debug||console.log||(()=>{}),t.exports=r(134)(e);const{formatters:i}=t.exports;i.j=function(t){try{return JSON.stringify(t)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}}).call(this,r(8))},function(t,e,r){"use strict";r.d(e,"a",(function(){return o})),r.d(e,"b",(function(){return s}));const n={deserialize:t=>Object.assign(Error(t.message),{name:t.name,stack:t.stack}),serialize:t=>({__error_marker:"$$error",message:t.message,name:t.name,stack:t.stack})};let i={deserialize(t){return(e=t)&&"object"==typeof e&&"__error_marker"in e&&"$$error"===e.__error_marker?n.deserialize(t):t;var e},serialize:t=>t instanceof Error?n.serialize(t):t};function o(t){return i.deserialize(t)}function s(t){return i.serialize(t)}},function(t,e,r){"use strict";var n=r(28),i=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};t.exports=f;var o=Object.create(r(21));o.inherits=r(10);var s=r(61),a=r(65);o.inherits(f,s);for(var u=i(a.prototype),c=0;c/^[a-zA-Z][a-zA-Z\d+\-.]*:/.test(t);function a(t){const e=new Blob([t],{type:"application/javascript"});return URL.createObjectURL(e)}let u;function c(){return u||(u=function(){if("undefined"==typeof Worker)return class{constructor(){throw Error("No web worker implementation available. You might have tried to spawn a worker within a worker in a browser that doesn't support workers in workers.")}};class t extends Worker{constructor(t,e){var r,n;"string"==typeof t&&e&&e._baseURL?t=new URL(t,e._baseURL):"string"==typeof t&&!s(t)&&i().match(/^file:\/\//i)&&(t=new URL(t,i().replace(/\/[^\/]+$/,"/")),(null===(r=null==e?void 0:e.CORSWorkaround)||void 0===r||r)&&(t=a(`importScripts(${JSON.stringify(t)});`))),"string"==typeof t&&s(t)&&(null===(n=null==e?void 0:e.CORSWorkaround)||void 0===n||n)&&(t=a(`importScripts(${JSON.stringify(t)});`)),super(t,e)}}class e extends t{constructor(t,e){super(window.URL.createObjectURL(t),e)}static fromText(t,r){const n=new window.Blob([t],{type:"text/javascript"});return new e(n,r)}}return{blob:e,default:t}}()),u}},function(t,e,r){"use strict";var n,i;r.d(e,"a",(function(){return n})),r.d(e,"b",(function(){return i})),function(t){t.cancel="cancel",t.run="run"}(n||(n={})),function(t){t.error="error",t.init="init",t.result="result",t.running="running",t.uncaughtError="uncaughtError"}(i||(i={}))},function(t,e,r){function n(t){return Object.prototype.toString.call(t)}e.isArray=function(t){return Array.isArray?Array.isArray(t):"[object Array]"===n(t)},e.isBoolean=function(t){return"boolean"==typeof t},e.isNull=function(t){return null===t},e.isNullOrUndefined=function(t){return null==t},e.isNumber=function(t){return"number"==typeof t},e.isString=function(t){return"string"==typeof t},e.isSymbol=function(t){return"symbol"==typeof t},e.isUndefined=function(t){return void 0===t},e.isRegExp=function(t){return"[object RegExp]"===n(t)},e.isObject=function(t){return"object"==typeof t&&null!==t},e.isDate=function(t){return"[object Date]"===n(t)},e.isError=function(t){return"[object Error]"===n(t)||t instanceof Error},e.isFunction=function(t){return"function"==typeof t},e.isPrimitive=function(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t},e.isBuffer=r(7).Buffer.isBuffer},function(t,e,r){"use strict";const n=r(11),i=r(50);function o(t){return n(t)?"":i(t)}t.exports=o,t.exports.default=o},function(t,e,r){"use strict";const n=r(35);function i(t,e){return n(t,"2",e)}t.exports=i,t.exports.default=i},function(t,e,r){"use strict";r.d(e,"a",(function(){return o}));var n=r(2);function i(t){throw Error(t)}const o={errors:t=>t[n.a]||i("Error observable not found. Make sure to pass a thread instance as returned by the spawn() promise."),events:t=>t[n.b]||i("Events observable not found. Make sure to pass a thread instance as returned by the spawn() promise."),terminate:t=>t[n.c]()}},function(t,e){},function(t,e,r){"use strict";const n=()=>"function"==typeof Symbol,i=t=>n()&&Boolean(Symbol[t]),o=t=>i(t)?Symbol[t]:"@@"+t;i("asyncIterator")||(Symbol.asyncIterator=Symbol.asyncIterator||Symbol.for("Symbol.asyncIterator"));const s=o("iterator"),a=o("observable"),u=o("species");function c(t,e){const r=t[e];if(null!=r){if("function"!=typeof r)throw new TypeError(r+" is not a function");return r}}function l(t){let e=t.constructor;return void 0!==e&&(e=e[u],null===e&&(e=void 0)),void 0!==e?e:v}function f(t){f.log?f.log(t):setTimeout(()=>{throw t},0)}function h(t){Promise.resolve().then(()=>{try{t()}catch(t){f(t)}})}function d(t){const e=t._cleanup;if(void 0!==e&&(t._cleanup=void 0,e))try{if("function"==typeof e)e();else{const t=c(e,"unsubscribe");t&&t.call(e)}}catch(t){f(t)}}function p(t){t._observer=void 0,t._queue=void 0,t._state="closed"}function y(t,e,r){t._state="running";const n=t._observer;try{const i=n?c(n,e):void 0;switch(e){case"next":i&&i.call(n,r);break;case"error":if(p(t),!i)throw r;i.call(n,r);break;case"complete":p(t),i&&i.call(n)}}catch(t){f(t)}"closed"===t._state?d(t):"running"===t._state&&(t._state="ready")}function g(t,e,r){if("closed"!==t._state)return"buffering"===t._state?(t._queue=t._queue||[],void t._queue.push({type:e,value:r})):"ready"!==t._state?(t._state="buffering",t._queue=[{type:e,value:r}],void h(()=>function(t){const e=t._queue;if(e){t._queue=void 0,t._state="ready";for(const r of e)if(y(t,r.type,r.value),"closed"===t._state)break}}(t))):void y(t,e,r)}class m{constructor(t,e){this._cleanup=void 0,this._observer=t,this._queue=void 0,this._state="initializing";const r=new b(this);try{this._cleanup=e.call(void 0,r)}catch(t){r.error(t)}"initializing"===this._state&&(this._state="ready")}get closed(){return"closed"===this._state}unsubscribe(){"closed"!==this._state&&(p(this),d(this))}}class b{constructor(t){this._subscription=t}get closed(){return"closed"===this._subscription._state}next(t){g(this._subscription,"next",t)}error(t){g(this._subscription,"error",t)}complete(){g(this._subscription,"complete")}}class v{constructor(t){if(!(this instanceof v))throw new TypeError("Observable cannot be called as a function");if("function"!=typeof t)throw new TypeError("Observable initializer must be a function");this._subscriber=t}subscribe(t,e,r){return"object"==typeof t&&null!==t||(t={next:t,error:e,complete:r}),new m(t,this._subscriber)}pipe(t,...e){let r=this;for(const n of[t,...e])r=n(r);return r}tap(t,e,r){const n="object"!=typeof t||null===t?{next:t,error:e,complete:r}:t;return new v(t=>this.subscribe({next(e){n.next&&n.next(e),t.next(e)},error(e){n.error&&n.error(e),t.error(e)},complete(){n.complete&&n.complete(),t.complete()},start(t){n.start&&n.start(t)}}))}forEach(t){return new Promise((e,r)=>{if("function"!=typeof t)return void r(new TypeError(t+" is not a function"));function n(){i.unsubscribe(),e(void 0)}const i=this.subscribe({next(e){try{t(e,n)}catch(t){r(t),i.unsubscribe()}},error(t){r(t)},complete(){e(void 0)}})})}map(t){if("function"!=typeof t)throw new TypeError(t+" is not a function");return new(l(this))(e=>this.subscribe({next(r){let n=r;try{n=t(r)}catch(t){return e.error(t)}e.next(n)},error(t){e.error(t)},complete(){e.complete()}}))}filter(t){if("function"!=typeof t)throw new TypeError(t+" is not a function");return new(l(this))(e=>this.subscribe({next(r){try{if(!t(r))return}catch(t){return e.error(t)}e.next(r)},error(t){e.error(t)},complete(){e.complete()}}))}reduce(t,e){if("function"!=typeof t)throw new TypeError(t+" is not a function");const r=l(this),n=arguments.length>1;let i=!1,o=e;return new r(e=>this.subscribe({next(r){const s=!i;if(i=!0,!s||n)try{o=t(o,r)}catch(t){return e.error(t)}else o=r},error(t){e.error(t)},complete(){if(!i&&!n)return e.error(new TypeError("Cannot reduce an empty sequence"));e.next(o),e.complete()}}))}concat(...t){const e=l(this);return new e(r=>{let n,i=0;return function o(s){n=s.subscribe({next(t){r.next(t)},error(t){r.error(t)},complete(){i===t.length?(n=void 0,r.complete()):o(e.from(t[i++]))}})}(this),()=>{n&&(n.unsubscribe(),n=void 0)}})}flatMap(t){if("function"!=typeof t)throw new TypeError(t+" is not a function");const e=l(this);return new e(r=>{const n=[],i=this.subscribe({next(i){let s;if(t)try{s=t(i)}catch(t){return r.error(t)}else s=i;const a=e.from(s).subscribe({next(t){r.next(t)},error(t){r.error(t)},complete(){const t=n.indexOf(a);t>=0&&n.splice(t,1),o()}});n.push(a)},error(t){r.error(t)},complete(){o()}});function o(){i.closed&&0===n.length&&r.complete()}return()=>{n.forEach(t=>t.unsubscribe()),i.unsubscribe()}})}[(Symbol.observable,a)](){return this}static from(t){const e="function"==typeof this?this:v;if(null==t)throw new TypeError(t+" is not an object");const r=c(t,a);if(r){const n=r.call(t);if(Object(n)!==n)throw new TypeError(n+" is not an object");return function(t){return t instanceof v}(n)&&n.constructor===e?n:new e(t=>n.subscribe(t))}if(i("iterator")){const r=c(t,s);if(r)return new e(e=>{h(()=>{if(!e.closed){for(const n of r.call(t))if(e.next(n),e.closed)return;e.complete()}})})}if(Array.isArray(t))return new e(e=>{h(()=>{if(!e.closed){for(const r of t)if(e.next(r),e.closed)return;e.complete()}})});throw new TypeError(t+" is not observable")}static of(...t){return new("function"==typeof this?this:v)(e=>{h(()=>{if(!e.closed){for(const r of t)if(e.next(r),e.closed)return;e.complete()}})})}static get[u](){return this}}n()&&Object.defineProperty(v,Symbol("extensions"),{value:{symbol:a,hostReportError:f},configurable:!0});e.a=v},function(t,e,r){"use strict";var n;r.d(e,"a",(function(){return n})),function(t){t.internalError="internalError",t.message="message",t.termination="termination"}(n||(n={}))},function(t,e,r){"use strict";(function(e){void 0===e||!e.version||0===e.version.indexOf("v0.")||0===e.version.indexOf("v1.")&&0!==e.version.indexOf("v1.8.")?t.exports={nextTick:function(t,r,n,i){if("function"!=typeof t)throw new TypeError('"callback" argument must be a function');var o,s,a=arguments.length;switch(a){case 0:case 1:return e.nextTick(t);case 2:return e.nextTick((function(){t.call(null,r)}));case 3:return e.nextTick((function(){t.call(null,r,n)}));case 4:return e.nextTick((function(){t.call(null,r,n,i)}));default:for(o=new Array(a-1),s=0;s0){for(;m>p-f;){let r=t[m-h]||"0",n=e[m-d]||"0";r-=g,g=0;let i=r-n;if(i<0)for(;i<0;)g++,i+=10;else g&&g--;""===y&&0===i||(y=i+y),m--}""!==y&&(y="."+y),m--}if(l>0){for(;m>0;){let r=t[m-h]||"0",n=e[m-d]||"0";r-=g,g=0;let i=r-n;if(i<0)for(;i<0;)g++,i+=10;else g&&g--;y=i+y,m--}const r=t[0-h]||"0",n=e[0-d]||"0";let i=Number(r)-(g>0?1:0)-Number(n);0!==i&&(y=i+y),y=y.replace(/^0+/,"")}return"."===y[0]&&(y="0"+y),y}t.exports=i,t.exports.default=i},function(t,e,r){"use strict";const n=r(5),i=r(6),o=r(33),s=r(49);function a(t,e,{format:r="string",max_decimal_digits:a=100,ellipsis:u=!1}={}){"0"===t[0]&&(t=t.substring(1)),"0"===e[0]&&(e=e.substring(1));const c=t.indexOf("."),l=e.indexOf("."),f=-1===c?t.length:c,h=-1===l?0:e.length-1-l;let d=!1;t=t.replace(/\./,""),e=e.replace(/\./,"");const p=t.length;let y,g="",m="",b=-1*h,v=0;for(let r=0;r"===y){let t=1,r=i(e,e),s=e;for(;">"!==n(r,g);)t++,s=r,r=i(r,e);if(t=t.toString(),""!==m)for(let e=t.length;e<=v;e++)m+="0";m+=t,g=o(g,s),v=0}else{if("<"===y){""===m&&b++,v++;continue}if("="===y){if(""!==m)for(let t=0;t3){m+="...",d=!0;break}}else t[g]=1;const r=n(g,e);if(">"===r){let t=1,r=i(e,e),s=e;for(;">"!==n(r,g);)t++,s=r,r=i(r,e);t=t.toString();for(let e=t.length;e<=v;e++)m+="0";if(m+=t,g=o(g,s),"0"===g)break;v=0}else{if("<"===r){v++;continue}if("="===r){for(let t=0;tx){for(let t=x;t0&&(m=s(m.substring(0,m.length-S+1))),"."===m[0]&&(m="0"+m),"object"===r?{quotient:m,extra_decimals:S}:m}t.exports=a,t.exports.default=a},function(t,e,r){"use strict";const n=r(0),i=r(5),o=r(15),s=r(9),a=r(31);function u(t,e,{infinity_minus_infinity:r="NaN"}={}){t=n(t),e=n(e);const u=!("-"===t[0]),c=!("-"===e[0]),l=o(t),f=o(e);if(l&&f){if(u===c)return r;if(u)return"Infinity";if(c)return"-Infinity"}else{if(l)return t;if(f)return c?"-Infinity":"Infinity"}if(u){if(c){const r=i(t,e);return">"===r?a(t,e):"<"===r?"-"+a(e,t):"0"}return s(t,e.substring(1))}if(c)return"-"+s(t.substring(1),e);{t=t.substring(1),e=e.substring(1);const r=i(t,e);return">"===r?"-"+a(t,e):"<"===r?a(e,t):"0"}}t.exports=u,t.exports.default=u},function(t,e,r){"use strict";const n=r(0),i=r(5);function o(t,e){t=n(t),e=n(e);const r="-"!==t[0],o="-"!==e[0];return r?o?i(t,e):">":o?"<":i(e.substring(1),t.substring(1))}t.exports=o,t.exports.default=o},function(t,e,r){"use strict";const n=r(4),i=r(0),o=r(1),s=r(77),a=r(16),u=r(52),c=r(78),l=r(11),f=r(53),h=r(54),d=r(81),p=r(37),y=r(36),g=r(22),m=r(85);function b(t,e,{zero_to_the_power_of_zero:r="1",ellipsis:b=!1,imaginary:v=!0,max_decimal_digits:w=100,fraction:x=!1}={}){t=i(t),e=i(e);const _=v&&u(t);_&&(t=t.replace(/i$/,""));const S=l(t),A=l(e);if(S&&A)return r;if(A)return"1";const E=g(e);if(S){if("+"===E)return"0";if("-"===E)return"Infinity"}const k=a(e);if("+"===E&&k){let r=h(t,e);return"number"==typeof w&&(r=y(r,{digits:w})),_&&c(e)&&(r+="i"),r}if("-"===E&&k){const r="1",i=h(t,n(e));return o(r,i,{ellipsis:b,max_decimal_digits:w})}if(!k){e=n(e);let[r,i]=e.includes("/")?e.split("/"):s(e);[r,i]=m(r,i);let o=p(t,i,{imaginary:v}),a=f(r,o);return"number"==typeof w&&(a=y(a,{digits:w})),"-"===E&&(a=d(a,{fraction:x,max_decimal_digits:w})),a}}t.exports=b,t.exports.default=b},function(t,e,r){"use strict";const n=r(52),i=r(164);function o(t,{digits:e=0}={}){return n(t)?i(t.substring(0,t.length-1),{digits:e})+"i":i(t,{digits:e})}t.exports=o,t.exports.default=o},function(t,e,r){"use strict";const n=r(4),i=r(0),o=r(5),s=r(82),a=r(16),u=r(80),c=r(54),l=r(83);function f(t,e,{imaginary:r=!0,max_decimal_digits:f=100}={}){if(t=i(t),"1"===(e=i(e)))return t;if("1"===t)return"1";if(!a(e))throw new Error("[preciso] can't find fractional roots");if(u(e))throw new Error("[preciso] can't find root of negative indexes");const h=n(t),d=u(t),p=s(e),y=d&&p;if(y&&!r)throw new Error("[preciso] root has an imaginary number");const g=d&&!p?"-":"",m=l(h,e),b=["9","8","7","6","5","4","3","2","1","0"];let v="";for(let t=0;to)return">";if(n",'"',"`"," ","\r","\n","\t"]),c=["'"].concat(u),l=["%","/","?",";","#"].concat(c),f=["/","?","#"],h=/^[+a-z0-9A-Z_-]{0,63}$/,d=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,p={javascript:!0,"javascript:":!0},y={javascript:!0,"javascript:":!0},g={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},m=r(142);function b(t,e,r){if(t&&"object"==typeof t&&t instanceof i)return t;var n=new i;return n.parse(t,e,r),n}i.prototype.parse=function(t,e,r){if("string"!=typeof t)throw new TypeError("Parameter 'url' must be a string, not "+typeof t);var i=t.indexOf("?"),s=-1!==i&&i127?R+="x":R+=I[j];if(!R.match(h)){var L=C.slice(0,k),F=C.slice(k+1),N=I.match(d);N&&(L.push(N[1]),F.unshift(N[2])),F.length&&(b="/"+F.join(".")+b),this.hostname=L.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),O||(this.hostname=n.toASCII(this.hostname));var D=this.port?":"+this.port:"",U=this.hostname||"";this.host=U+D,this.href+=this.host,O&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==b[0]&&(b="/"+b))}if(!p[x])for(k=0,P=c.length;k0)&&r.host.split("@"))&&(r.auth=O.shift(),r.hostname=O.shift(),r.host=r.hostname);return r.search=t.search,r.query=t.query,null===r.pathname&&null===r.search||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r}if(!_.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var A=_.slice(-1)[0],E=(r.host||t.host||_.length>1)&&("."===A||".."===A)||""===A,k=0,T=_.length;T>=0;T--)"."===(A=_[T])?_.splice(T,1):".."===A?(_.splice(T,1),k++):k&&(_.splice(T,1),k--);if(!w&&!x)for(;k--;k)_.unshift("..");!w||""===_[0]||_[0]&&"/"===_[0].charAt(0)||_.unshift(""),E&&"/"!==_.join("/").substr(-1)&&_.push("");var O,C=""===_[0]||_[0]&&"/"===_[0].charAt(0);S&&(r.hostname=C?"":_.length?_.shift():"",r.host=r.hostname,(O=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=O.shift(),r.hostname=O.shift(),r.host=r.hostname));return(w=w||r.host&&_.length)&&!C&&_.unshift(""),_.length>0?r.pathname=_.join("/"):(r.pathname=null,r.path=null),null===r.pathname&&null===r.search||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=t.auth||r.auth,r.slashes=r.slashes||t.slashes,r.href=r.format(),r},i.prototype.parseHost=function(){var t=this.host,e=s.exec(t);e&&(":"!==(e=e[0])&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)},e.parse=b,e.resolve=function(t,e){return b(t,!1,!0).resolve(e)},e.resolveObject=function(t,e){return t?b(t,!1,!0).resolveObject(e):e},e.format=function(t){return"string"==typeof t&&(t=b(t)),t instanceof i?t.format():i.prototype.format.call(t)},e.Url=i},function(t,e,r){(function(t){var n=r(136),i=r(70),o=r(138),s=r(139),a=r(39),u=e;u.request=function(e,r){e="string"==typeof e?a.parse(e):o(e);var i=-1===t.location.protocol.search(/^https?:$/)?"http:":"",s=e.protocol||i,u=e.hostname||e.host,c=e.port,l=e.path||"/";u&&-1!==u.indexOf(":")&&(u="["+u+"]"),e.url=(u?s+"//"+u:"")+(c?":"+c:"")+l,e.method=(e.method||"GET").toUpperCase(),e.headers=e.headers||{};var f=new n(e);return r&&f.on("response",r),f},u.get=function(t,e){var r=u.request(t,e);return r.end(),r},u.ClientRequest=n,u.IncomingMessage=i.IncomingMessage,u.Agent=function(){},u.Agent.defaultMaxSockets=4,u.globalAgent=new u.Agent,u.STATUS_CODES=s,u.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]}).call(this,r(3))},,function(t,e,r){(e=t.exports=r(61)).Stream=e,e.Readable=e,e.Writable=r(65),e.Duplex=r(14),e.Transform=r(67),e.PassThrough=r(122)},function(t,e,r){var n=r(7),i=n.Buffer;function o(t,e){for(var r in t)e[r]=t[r]}function s(t,e,r){return i(t,e,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=n:(o(n,e),e.Buffer=s),o(i,s),s.from=function(t,e,r){if("number"==typeof t)throw new TypeError("Argument must not be a number");return i(t,e,r)},s.alloc=function(t,e,r){if("number"!=typeof t)throw new TypeError("Argument must be a number");var n=i(t);return void 0!==e?"string"==typeof r?n.fill(e,r):n.fill(e):n.fill(0),n},s.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return i(t)},s.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return n.SlowBuffer(t)}},function(t,e,r){"use strict";var n=SyntaxError,i=Function,o=TypeError,s=function(t){try{return i('"use strict"; return ('+t+").constructor;")()}catch(t){}},a=Object.getOwnPropertyDescriptor;if(a)try{a({},"")}catch(t){a=null}var u=function(){throw new o},c=a?function(){try{return u}catch(t){try{return a(arguments,"callee").get}catch(t){return u}}}():u,l=r(145)(),f=r(147)(),h=Object.getPrototypeOf||(f?function(t){return t.__proto__}:null),d={},p="undefined"!=typeof Uint8Array&&h?h(Uint8Array):void 0,y={"%AggregateError%":"undefined"==typeof AggregateError?void 0:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?void 0:ArrayBuffer,"%ArrayIteratorPrototype%":l&&h?h([][Symbol.iterator]()):void 0,"%AsyncFromSyncIteratorPrototype%":void 0,"%AsyncFunction%":d,"%AsyncGenerator%":d,"%AsyncGeneratorFunction%":d,"%AsyncIteratorPrototype%":d,"%Atomics%":"undefined"==typeof Atomics?void 0:Atomics,"%BigInt%":"undefined"==typeof BigInt?void 0:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?void 0:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?void 0:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?void 0:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":"undefined"==typeof Float32Array?void 0:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?void 0:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?void 0:FinalizationRegistry,"%Function%":i,"%GeneratorFunction%":d,"%Int8Array%":"undefined"==typeof Int8Array?void 0:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?void 0:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?void 0:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":l&&h?h(h([][Symbol.iterator]())):void 0,"%JSON%":"object"==typeof JSON?JSON:void 0,"%Map%":"undefined"==typeof Map?void 0:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&l&&h?h((new Map)[Symbol.iterator]()):void 0,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?void 0:Promise,"%Proxy%":"undefined"==typeof Proxy?void 0:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":"undefined"==typeof Reflect?void 0:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?void 0:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&l&&h?h((new Set)[Symbol.iterator]()):void 0,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?void 0:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":l&&h?h(""[Symbol.iterator]()):void 0,"%Symbol%":l?Symbol:void 0,"%SyntaxError%":n,"%ThrowTypeError%":c,"%TypedArray%":p,"%TypeError%":o,"%Uint8Array%":"undefined"==typeof Uint8Array?void 0:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?void 0:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?void 0:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?void 0:Uint32Array,"%URIError%":URIError,"%WeakMap%":"undefined"==typeof WeakMap?void 0:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?void 0:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?void 0:WeakSet};if(h)try{null.error}catch(t){var g=h(h(t));y["%Error.prototype%"]=g}var m={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},b=r(45),v=r(149),w=b.call(Function.call,Array.prototype.concat),x=b.call(Function.apply,Array.prototype.splice),_=b.call(Function.call,String.prototype.replace),S=b.call(Function.call,String.prototype.slice),A=b.call(Function.call,RegExp.prototype.exec),E=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,k=/\\(\\)?/g,T=function(t){var e=S(t,0,1),r=S(t,-1);if("%"===e&&"%"!==r)throw new n("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==e)throw new n("invalid intrinsic syntax, expected opening `%`");var i=[];return _(t,E,(function(t,e,r,n){i[i.length]=r?_(n,k,"$1"):e||t})),i},O=function(t,e){var r,i=t;if(v(m,i)&&(i="%"+(r=m[i])[0]+"%"),v(y,i)){var a=y[i];if(a===d&&(a=function t(e){var r;if("%AsyncFunction%"===e)r=s("async function () {}");else if("%GeneratorFunction%"===e)r=s("function* () {}");else if("%AsyncGeneratorFunction%"===e)r=s("async function* () {}");else if("%AsyncGenerator%"===e){var n=t("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if("%AsyncIteratorPrototype%"===e){var i=t("%AsyncGenerator%");i&&h&&(r=h(i.prototype))}return y[e]=r,r}(i)),void 0===a&&!e)throw new o("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:r,name:i,value:a}}throw new n("intrinsic "+t+" does not exist!")};t.exports=function(t,e){if("string"!=typeof t||0===t.length)throw new o("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof e)throw new o('"allowMissing" argument must be a boolean');if(null===A(/^%?[^%]*%?$/,t))throw new n("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=T(t),i=r.length>0?r[0]:"",s=O("%"+i+"%",e),u=s.name,c=s.value,l=!1,f=s.alias;f&&(i=f[0],x(r,w([0,1],f)));for(var h=1,d=!0;h=r.length){var b=a(c,p);c=(d=!!b)&&"get"in b&&!("originalValue"in b.get)?b.get:c[p]}else d=v(c,p),c=c[p];d&&!l&&(y[u]=c)}}return c}},function(t,e,r){"use strict";var n=r(148);t.exports=Function.prototype.bind||n},function(t,e,r){"use strict";var n=String.prototype.replace,i=/%20/g,o="RFC1738",s="RFC3986";t.exports={default:s,formatters:{RFC1738:function(t){return n.call(t,i,"+")},RFC3986:function(t){return String(t)}},RFC1738:o,RFC3986:s}},function(t,e,r){"use strict";const n=r(5),i=r(11),o=r(48),s=r(9);function a(t,e,r="1"){if(i(t))return"0";let a=t,u=t;for(;"<"===n(u,e);)u=s(u,r),a=o(a,u);return a}t.exports=a,t.exports.default=a},function(t,e,r){"use strict";const{MAX_SAFE_INTEGER_LENGTH:n}=r(30);function i(t,e){if("0"===t||"0"===e)return"0";const r=t.indexOf("."),i=e.indexOf("."),o=(-1===r?t.length:r)+(-1===i?e.length:i),s=(-1===r?0:t.length-1-r)+(-1===i?0:e.length-1-i);if(0===s&&o=0;){const t=h,e=h-=15,r=a.substring(e,t);f.push([Number(r),r.length])}const d=[],p=[];for(let t=0,e=l-1;e>=0;e--,t++){const r=u[e],n=Number(r);let i=0,o="";const s=f.length-1;f.forEach(([t,e],r)=>{let a=(i+n*t).toString();const u=a.length;if(u>e&&r!==s){const t=-1*e;o=a.slice(t)+o,i=Number(a.slice(0,t))}else{const t=e-u;for(let e=0;eNumber(t)),o.length])}const y=d.length,g=p[p.length-1][1]+y;let m="",b=0;for(let t=0;t=0&&(e+=r[o])}e>=10?(e=e.toString(),m=e[e.length-1]+m,b=Number(e.slice(0,-1))):(m=e+m,b=0)}if(0===s)m=m.replace(/^0+/,"");else{const t=m.length-s;m=m.substring(0,t)+"."+m.substring(t),m=m.replace(/^0+/,""),m=m.replace(/\.?0+$/,""),"."===m[0]&&(m="0"+m)}return m}t.exports=i,t.exports.default=i},function(t,e,r){"use strict";const n=r(6),i=r(160),o=["5","6","7","8","9"];function s(t){if(t.match(/\.9+$/))return n(i(t),"1");"+"===t[0]&&(t=t.substring(1));const e=t.length;let r="";const s=t[t.length-1];if(o.includes(s)){let n;for(n=e-2;n>=0;n--){const e=t[n];if("."===e||"-"===e)continue;const i=Number(e)+1;if(10!==i){r=i+r;break}r="0"+r}n>0&&(r=t.substring(0,n)+r)}else r=t.substring(0,e-1);return"."===r[r.length-1]&&(r=r.substring(0,r.length-1)),r.indexOf(".")>-1&&(r=r.replace(/0+$/,"")),r}t.exports=s,t.exports.default=s},function(t,e,r){"use strict";function n(t){return"-"===t[0]?"-":"+"}t.exports=n,t.exports.default=n},function(t,e,r){"use strict";const n=r(0);function i(t){const e=(t=n(t)).indexOf(".");return-1===e?"0":(t.length-e-1).toString()}t.exports=i,t.exports.default=i},function(t,e,r){"use strict";function n(t){return t.includes("i")}t.exports=n,t.exports.default=n},function(t,e,r){"use strict";const n=r(79);function i(){const t=Array.from(arguments),e="object"==typeof t[t.length-1]?t[t.length-1]:void 0,r=Array.isArray(t[0])?t[0]:e?t.slice(0,t.length-1):t;return n(r,e)}t.exports=i,t.exports.default=i},function(t,e,r){"use strict";const n=r(17);function i(t,e){const r=Number(e);let i=t;for(let e=1;et.type===c.a.internalError).map(t=>t.error);return Object.assign(t,{[u.a]:i,[u.b]:r,[u.c]:n,[u.e]:e})}function m(t,e){return f(this,void 0,void 0,(function*(){d("Initializing new thread");const r=e&&e.timeout?e.timeout:y,n=(yield function(t,e,r){return f(this,void 0,void 0,(function*(){let n;const i=new Promise((t,i)=>{n=setTimeout(()=>i(Error(r)),e)}),o=yield Promise.race([t,i]);return clearTimeout(n),o}))}(function(t){return new Promise((e,r)=>{const n=i=>{var o;h("Message from worker before finishing initialization:",i.data),(o=i.data)&&"init"===o.type?(t.removeEventListener("message",n),e(i.data)):(t=>t&&"uncaughtError"===t.type)(i.data)&&(t.removeEventListener("message",n),r(Object(s.a)(i.data.error)))};t.addEventListener("message",n)})}(t),r,`Timeout: Did not receive an init message from worker after ${r}ms. Make sure the worker calls expose().`)).exposed,{termination:i,terminate:u}=function(t){const[e,r]=Object(a.a)();return{terminate:()=>f(this,void 0,void 0,(function*(){p("Terminating worker"),yield t.terminate(),r()})),termination:e}}(t),m=function(t,e){return new o.a(r=>{const n=t=>{const e={type:c.a.message,data:t.data};r.next(e)},i=t=>{p("Unhandled promise rejection event in thread:",t);const e={type:c.a.internalError,error:Error(t.reason)};r.next(e)};t.addEventListener("message",n),t.addEventListener("unhandledrejection",i),e.then(()=>{const e={type:c.a.termination};t.removeEventListener("message",n),t.removeEventListener("unhandledrejection",i),r.next(e),r.complete()})})}(t,i);if("function"===n.type){return g(Object(l.a)(t),t,m,u)}if("module"===n.type){return g(Object(l.b)(t,n.methods),t,m,u)}{const t=n.type;throw Error("Worker init message states unexpected type of expose(): "+t)}}))}}).call(this,r(8))},function(t,e,r){"use strict";r.d(e,"a",(function(){return g}));var n=r(12),i=r.n(n),o=r(103),s=r(201),a=r(26);function u(t){return Promise.all(t.map(t=>{const e=t=>({status:"fulfilled",value:t}),r=t=>({status:"rejected",reason:t}),n=Promise.resolve(t);try{return n.then(e,r)}catch(t){return Promise.reject(t)}}))}var c,l=r(19);!function(t){t.initialized="initialized",t.taskCanceled="taskCanceled",t.taskCompleted="taskCompleted",t.taskFailed="taskFailed",t.taskQueued="taskQueued",t.taskQueueDrained="taskQueueDrained",t.taskStart="taskStart",t.terminated="terminated"}(c||(c={}));var f=r(24),h=function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function s(t){try{u(n.next(t))}catch(t){o(t)}}function a(t){try{u(n.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(s,a)}u((n=n.apply(t,e||[])).next())}))};let d=1;class p{constructor(t,e){this.eventSubject=new o.a,this.initErrors=[],this.isClosing=!1,this.nextTaskID=1,this.taskQueue=[];const r="number"==typeof e?{size:e}:e||{},{size:n=l.a}=r;this.debug=i()("threads:pool:"+(r.name||String(d++)).replace(/\W/g," ").trim().replace(/\s+/g,"-")),this.options=r,this.workers=function(t,e){return function(t){const e=[];for(let r=0;r({init:t(),runningTasks:[]}))}(t,n),this.eventObservable=Object(s.a)(a.a.from(this.eventSubject)),Promise.all(this.workers.map(t=>t.init)).then(()=>this.eventSubject.next({type:c.initialized,size:this.workers.length}),t=>{this.debug("Error while initializing pool worker:",t),this.eventSubject.error(t),this.initErrors.push(t)})}findIdlingWorker(){const{concurrency:t=1}=this.options;return this.workers.find(e=>e.runningTasks.lengthh(this,void 0,void 0,(function*(){var n;yield(n=0,new Promise(t=>setTimeout(t,n)));try{yield this.runPoolTask(t,e)}finally{t.runningTasks=t.runningTasks.filter(t=>t!==r),this.isClosing||this.scheduleWork()}})))();t.runningTasks.push(r)}))}scheduleWork(){this.debug("Attempt de-queueing a task in order to run it...");const t=this.findIdlingWorker();if(!t)return;const e=this.taskQueue.shift();if(!e)return this.debug("Task queue is empty"),void this.eventSubject.next({type:c.taskQueueDrained});this.run(t,e)}taskCompletion(t){return new Promise((e,r)=>{const n=this.events().subscribe(i=>{i.type===c.taskCompleted&&i.taskID===t?(n.unsubscribe(),e(i.returnValue)):i.type===c.taskFailed&&i.taskID===t?(n.unsubscribe(),r(i.error)):i.type===c.terminated&&(n.unsubscribe(),r(Error("Pool has been terminated before task was run.")))})})}settled(t=!1){return h(this,void 0,void 0,(function*(){const e=()=>{return t=this.workers,e=t=>t.runningTasks,t.reduce((t,r)=>[...t,...e(r)],[]);var t,e},r=[],n=this.eventObservable.subscribe(t=>{t.type===c.taskFailed&&r.push(t.error)});return this.initErrors.length>0?Promise.reject(this.initErrors[0]):t&&0===this.taskQueue.length?(yield u(e()),r):(yield new Promise((t,e)=>{const r=this.eventObservable.subscribe({next(e){e.type===c.taskQueueDrained&&(r.unsubscribe(),t(void 0))},error:e})}),yield u(e()),n.unsubscribe(),r)}))}completed(t=!1){return h(this,void 0,void 0,(function*(){const e=this.settled(t),r=new Promise((t,r)=>{const n=this.eventObservable.subscribe({next(i){i.type===c.taskQueueDrained?(n.unsubscribe(),t(e)):i.type===c.taskFailed&&(n.unsubscribe(),r(i.error))},error:r})}),n=yield Promise.race([e,r]);if(n.length>0)throw n[0]}))}events(){return this.eventObservable}queue(t){const{maxQueuedJobs:e=1/0}=this.options;if(this.isClosing)throw Error("Cannot schedule pool tasks after terminate() has been called.");if(this.initErrors.length>0)throw this.initErrors[0];const r=this.nextTaskID++,n=this.taskCompletion(r);n.catch(t=>{this.debug(`Task #${r} errored:`,t)});const i={id:r,run:t,cancel:()=>{-1!==this.taskQueue.indexOf(i)&&(this.taskQueue=this.taskQueue.filter(t=>t!==i),this.eventSubject.next({type:c.taskCanceled,taskID:i.id}))},then:n.then.bind(n)};if(this.taskQueue.length>=e)throw Error("Maximum number of pool tasks queued. Refusing to queue another one.\nThis usually happens for one of two reasons: We are either at peak workload right now or some tasks just won't finish, thus blocking the pool.");return this.debug(`Queueing task #${i.id}...`),this.taskQueue.push(i),this.eventSubject.next({type:c.taskQueued,taskID:i.id}),this.scheduleWork(),i}terminate(t){return h(this,void 0,void 0,(function*(){this.isClosing=!0,t||(yield this.completed(!0)),this.eventSubject.next({type:c.terminated,remainingQueue:[...this.taskQueue]}),this.eventSubject.complete(),yield Promise.all(this.workers.map(t=>h(this,void 0,void 0,(function*(){return f.a.terminate(yield t.init)}))))}))}}function y(t,e){return new p(t,e)}p.EventType=c,y.EventType=c;const g=y},function(t,e,r){"use strict";r.d(e,"a",(function(){return b})),r.d(e,"b",(function(){return v}));var n=r(12),i=r.n(n),o=r(26),s=r(201),a=r(13);const u=()=>{},c=t=>t,l=t=>Promise.resolve().then(t);function f(t){throw t}class h extends o.a{constructor(t){super(e=>{const r=this,n=Object.assign(Object.assign({},e),{complete(){e.complete(),r.onCompletion()},error(t){e.error(t),r.onError(t)},next(t){e.next(t),r.onNext(t)}});try{return this.initHasRun=!0,t(n)}catch(t){n.error(t)}}),this.initHasRun=!1,this.fulfillmentCallbacks=[],this.rejectionCallbacks=[],this.firstValueSet=!1,this.state="pending"}onNext(t){this.firstValueSet||(this.firstValue=t,this.firstValueSet=!0)}onError(t){this.state="rejected",this.rejection=t;for(const e of this.rejectionCallbacks)l(()=>e(t))}onCompletion(){this.state="fulfilled";for(const t of this.fulfillmentCallbacks)l(()=>t(this.firstValue))}then(t,e){const r=t||c,n=e||f;let i=!1;return new Promise((t,e)=>{const o=r=>{if(!i){i=!0;try{t(n(r))}catch(t){e(t)}}};return this.initHasRun||this.subscribe({error:o}),"fulfilled"===this.state?t(r(this.firstValue)):"rejected"===this.state?(i=!0,t(n(this.rejection))):(this.fulfillmentCallbacks.push(e=>{try{t(r(e))}catch(t){o(t)}}),void this.rejectionCallbacks.push(o))})}catch(t){return this.then(void 0,t)}finally(t){const e=t||u;return this.then(t=>(e(),t),()=>e())}static from(t){return function(t){return t&&"function"==typeof t.then}(t)?new h(e=>{t.then(t=>{e.next(t),e.complete()},t=>{e.error(t)})}):super.from(t)}}var d=r(105),p=r(20);const y=i()("threads:master:messages");let g=1;function m(t,e){return new o.a(r=>{let n;const i=o=>{var s;if(y("Message from worker:",o.data),o.data&&o.data.uid===e)if((s=o.data)&&s.type===p.b.running)n=o.data.resultType;else if((t=>t&&t.type===p.b.result)(o.data))"promise"===n?(void 0!==o.data.payload&&r.next(Object(a.a)(o.data.payload)),r.complete(),t.removeEventListener("message",i)):(o.data.payload&&r.next(Object(a.a)(o.data.payload)),o.data.complete&&(r.complete(),t.removeEventListener("message",i)));else if((t=>t&&t.type===p.b.error)(o.data)){const e=Object(a.a)(o.data.error);r.error(e),t.removeEventListener("message",i)}};return t.addEventListener("message",i),()=>{if("observable"===n||!n){const r={type:p.a.cancel,uid:e};t.postMessage(r)}t.removeEventListener("message",i)}})}function b(t,e){return(...r)=>{const n=g++,{args:i,transferables:o}=function(t){if(0===t.length)return{args:[],transferables:[]};const e=[],r=[];for(const n of t)Object(d.a)(n)?(e.push(Object(a.b)(n.send)),r.push(...n.transferables)):e.push(Object(a.b)(n));return{args:e,transferables:0===r.length?r:(n=r,Array.from(new Set(n)))};var n}(r),u={type:p.a.run,uid:n,method:e,args:i};y("Sending command to run function to worker:",u);try{t.postMessage(u,o)}catch(t){return h.from(Promise.reject(t))}return h.from(Object(s.a)(m(t,n)))}}function v(t,e){const r={};for(const n of e)r[n]=b(t,n);return r}},function(t,e){var r={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==r.call(t)}},function(t,e,r){"use strict";(function(e,n){var i=r(28);t.exports=v;var o,s=r(60);v.ReadableState=b;r(62).EventEmitter;var a=function(t,e){return t.listeners(e).length},u=r(63),c=r(43).Buffer,l=(void 0!==e?e:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};var f=Object.create(r(21));f.inherits=r(10);var h=r(115),d=void 0;d=h&&h.debuglog?h.debuglog("stream"):function(){};var p,y=r(116),g=r(64);f.inherits(v,u);var m=["error","close","destroy","pause","resume"];function b(t,e){t=t||{};var n=e instanceof(o=o||r(14));this.objectMode=!!t.objectMode,n&&(this.objectMode=this.objectMode||!!t.readableObjectMode);var i=t.highWaterMark,s=t.readableHighWaterMark,a=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:n&&(s||0===s)?s:a,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new y,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(p||(p=r(66).StringDecoder),this.decoder=new p(t.encoding),this.encoding=t.encoding)}function v(t){if(o=o||r(14),!(this instanceof v))return new v(t);this._readableState=new b(t,this),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),u.call(this)}function w(t,e,r,n,i){var o,s=t._readableState;null===e?(s.reading=!1,function(t,e){if(e.ended)return;if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,S(t)}(t,s)):(i||(o=function(t,e){var r;n=e,c.isBuffer(n)||n instanceof l||"string"==typeof e||void 0===e||t.objectMode||(r=new TypeError("Invalid non-string/buffer chunk"));var n;return r}(s,e)),o?t.emit("error",o):s.objectMode||e&&e.length>0?("string"==typeof e||s.objectMode||Object.getPrototypeOf(e)===c.prototype||(e=function(t){return c.from(t)}(e)),n?s.endEmitted?t.emit("error",new Error("stream.unshift() after end event")):x(t,s,e,!0):s.ended?t.emit("error",new Error("stream.push() after EOF")):(s.reading=!1,s.decoder&&!r?(e=s.decoder.write(e),s.objectMode||0!==e.length?x(t,s,e,!1):E(t,s)):x(t,s,e,!1))):n||(s.reading=!1));return function(t){return!t.ended&&(t.needReadable||t.lengthe.highWaterMark&&(e.highWaterMark=function(t){return t>=8388608?t=8388608:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function S(t){var e=t._readableState;e.needReadable=!1,e.emittedReadable||(d("emitReadable",e.flowing),e.emittedReadable=!0,e.sync?i.nextTick(A,t):A(t))}function A(t){d("emit readable"),t.emit("readable"),C(t)}function E(t,e){e.readingMore||(e.readingMore=!0,i.nextTick(k,t,e))}function k(t,e){for(var r=e.length;!e.reading&&!e.flowing&&!e.ended&&e.length=e.length?(r=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.head.data:e.buffer.concat(e.length),e.buffer.clear()):r=function(t,e,r){var n;to.length?o.length:t;if(s===o.length?i+=o:i+=o.slice(0,t),0===(t-=s)){s===o.length?(++n,r.next?e.head=r.next:e.head=e.tail=null):(e.head=r,r.data=o.slice(s));break}++n}return e.length-=n,i}(t,e):function(t,e){var r=c.allocUnsafe(t),n=e.head,i=1;n.data.copy(r),t-=n.data.length;for(;n=n.next;){var o=n.data,s=t>o.length?o.length:t;if(o.copy(r,r.length-t,0,s),0===(t-=s)){s===o.length?(++i,n.next?e.head=n.next:e.head=e.tail=null):(e.head=n,n.data=o.slice(s));break}++i}return e.length-=i,r}(t,e);return n}(t,e.buffer,e.decoder),r);var r}function I(t){var e=t._readableState;if(e.length>0)throw new Error('"endReadable()" called on non-empty stream');e.endEmitted||(e.ended=!0,i.nextTick(R,e,t))}function R(t,e){t.endEmitted||0!==t.length||(t.endEmitted=!0,e.readable=!1,e.emit("end"))}function j(t,e){for(var r=0,n=t.length;r=e.highWaterMark||e.ended))return d("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?I(this):S(this),null;if(0===(t=_(t,e))&&e.ended)return 0===e.length&&I(this),null;var n,i=e.needReadable;return d("need readable",i),(0===e.length||e.length-t0?P(t,e):null)?(e.needReadable=!0,t=0):e.length-=t,0===e.length&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&I(this)),null!==n&&this.emit("data",n),n},v.prototype._read=function(t){this.emit("error",new Error("_read() is not implemented"))},v.prototype.pipe=function(t,e){var r=this,o=this._readableState;switch(o.pipesCount){case 0:o.pipes=t;break;case 1:o.pipes=[o.pipes,t];break;default:o.pipes.push(t)}o.pipesCount+=1,d("pipe count=%d opts=%j",o.pipesCount,e);var u=(!e||!1!==e.end)&&t!==n.stdout&&t!==n.stderr?l:v;function c(e,n){d("onunpipe"),e===r&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,d("cleanup"),t.removeListener("close",m),t.removeListener("finish",b),t.removeListener("drain",f),t.removeListener("error",g),t.removeListener("unpipe",c),r.removeListener("end",l),r.removeListener("end",v),r.removeListener("data",y),h=!0,!o.awaitDrain||t._writableState&&!t._writableState.needDrain||f())}function l(){d("onend"),t.end()}o.endEmitted?i.nextTick(u):r.once("end",u),t.on("unpipe",c);var f=function(t){return function(){var e=t._readableState;d("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&a(t,"data")&&(e.flowing=!0,C(t))}}(r);t.on("drain",f);var h=!1;var p=!1;function y(e){d("ondata"),p=!1,!1!==t.write(e)||p||((1===o.pipesCount&&o.pipes===t||o.pipesCount>1&&-1!==j(o.pipes,t))&&!h&&(d("false write response, pause",o.awaitDrain),o.awaitDrain++,p=!0),r.pause())}function g(e){d("onerror",e),v(),t.removeListener("error",g),0===a(t,"error")&&t.emit("error",e)}function m(){t.removeListener("finish",b),v()}function b(){d("onfinish"),t.removeListener("close",m),v()}function v(){d("unpipe"),r.unpipe(t)}return r.on("data",y),function(t,e,r){if("function"==typeof t.prependListener)return t.prependListener(e,r);t._events&&t._events[e]?s(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]:t.on(e,r)}(t,"error",g),t.once("close",m),t.once("finish",b),t.emit("pipe",r),o.flowing||(d("pipe resume"),r.resume()),t},v.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes||(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r)),this;if(!t){var n=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var o=0;o0&&s.length>i&&!s.warned){s.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=t,u.type=e,u.count=s.length,a=u,console&&console.warn&&console.warn(a)}return t}function h(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function d(t,e,r){var n={fired:!1,wrapFn:void 0,target:t,type:e,listener:r},i=h.bind(n);return i.listener=r,n.wrapFn=i,i}function p(t,e,r){var n=t._events;if(void 0===n)return[];var i=n[e];return void 0===i?[]:"function"==typeof i?r?[i.listener||i]:[i]:r?function(t){for(var e=new Array(t.length),r=0;r0&&(s=e[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var u=i[t];if(void 0===u)return!1;if("function"==typeof u)o(u,this,e);else{var c=u.length,l=g(u,c);for(r=0;r=0;o--)if(r[o]===e||r[o].listener===e){s=r[o].listener,i=o;break}if(i<0)return this;0===i?r.shift():function(t,e){for(;e+1=0;n--)this.removeListener(t,e[n]);return this},a.prototype.listeners=function(t){return p(this,t,!0)},a.prototype.rawListeners=function(t){return p(this,t,!1)},a.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):y.call(t,e)},a.prototype.listenerCount=y,a.prototype.eventNames=function(){return this._eventsCount>0?n(this._events):[]}},function(t,e,r){t.exports=r(62).EventEmitter},function(t,e,r){"use strict";var n=r(28);function i(t,e){t.emit("error",e)}t.exports={destroy:function(t,e){var r=this,o=this._readableState&&this._readableState.destroyed,s=this._writableState&&this._writableState.destroyed;return o||s?(e?e(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,n.nextTick(i,this,t)):n.nextTick(i,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,(function(t){!e&&t?r._writableState?r._writableState.errorEmitted||(r._writableState.errorEmitted=!0,n.nextTick(i,r,t)):n.nextTick(i,r,t):e&&e(t)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}},function(t,e,r){"use strict";(function(e,n,i){var o=r(28);function s(t){var e=this;this.next=null,this.entry=null,this.finish=function(){!function(t,e,r){var n=t.entry;t.entry=null;for(;n;){var i=n.callback;e.pendingcb--,i(r),n=n.next}e.corkedRequestsFree.next=t}(e,t)}}t.exports=b;var a,u=!e.browser&&["v0.10","v0.9."].indexOf(e.version.slice(0,5))>-1?n:o.nextTick;b.WritableState=m;var c=Object.create(r(21));c.inherits=r(10);var l={deprecate:r(120)},f=r(63),h=r(43).Buffer,d=(void 0!==i?i:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};var p,y=r(64);function g(){}function m(t,e){a=a||r(14),t=t||{};var n=e instanceof a;this.objectMode=!!t.objectMode,n&&(this.objectMode=this.objectMode||!!t.writableObjectMode);var i=t.highWaterMark,c=t.writableHighWaterMark,l=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:n&&(c||0===c)?c:l,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var f=!1===t.decodeStrings;this.decodeStrings=!f,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){!function(t,e){var r=t._writableState,n=r.sync,i=r.writecb;if(function(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}(r),e)!function(t,e,r,n,i){--e.pendingcb,r?(o.nextTick(i,n),o.nextTick(A,t,e),t._writableState.errorEmitted=!0,t.emit("error",n)):(i(n),t._writableState.errorEmitted=!0,t.emit("error",n),A(t,e))}(t,r,n,e,i);else{var s=_(r);s||r.corked||r.bufferProcessing||!r.bufferedRequest||x(t,r),n?u(w,t,r,s,i):w(t,r,s,i)}}(e,t)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new s(this)}function b(t){if(a=a||r(14),!(p.call(b,this)||this instanceof a))return new b(t);this._writableState=new m(t,this),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),f.call(this)}function v(t,e,r,n,i,o,s){e.writelen=n,e.writecb=s,e.writing=!0,e.sync=!0,r?t._writev(i,e.onwrite):t._write(i,o,e.onwrite),e.sync=!1}function w(t,e,r,n){r||function(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}(t,e),e.pendingcb--,n(),A(t,e)}function x(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var n=e.bufferedRequestCount,i=new Array(n),o=e.corkedRequestsFree;o.entry=r;for(var a=0,u=!0;r;)i[a]=r,r.isBuf||(u=!1),r=r.next,a+=1;i.allBuffers=u,v(t,e,!0,e.length,i,"",o.finish),e.pendingcb++,e.lastBufferedRequest=null,o.next?(e.corkedRequestsFree=o.next,o.next=null):e.corkedRequestsFree=new s(e),e.bufferedRequestCount=0}else{for(;r;){var c=r.chunk,l=r.encoding,f=r.callback;if(v(t,e,!1,e.objectMode?1:c.length,c,l,f),r=r.next,e.bufferedRequestCount--,e.writing)break}null===r&&(e.lastBufferedRequest=null)}e.bufferedRequest=r,e.bufferProcessing=!1}function _(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function S(t,e){t._final((function(r){e.pendingcb--,r&&t.emit("error",r),e.prefinished=!0,t.emit("prefinish"),A(t,e)}))}function A(t,e){var r=_(e);return r&&(!function(t,e){e.prefinished||e.finalCalled||("function"==typeof t._final?(e.pendingcb++,e.finalCalled=!0,o.nextTick(S,t,e)):(e.prefinished=!0,t.emit("prefinish")))}(t,e),0===e.pendingcb&&(e.finished=!0,t.emit("finish"))),r}c.inherits(b,f),m.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},function(){try{Object.defineProperty(m.prototype,"buffer",{get:l.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(t){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(p=Function.prototype[Symbol.hasInstance],Object.defineProperty(b,Symbol.hasInstance,{value:function(t){return!!p.call(this,t)||this===b&&(t&&t._writableState instanceof m)}})):p=function(t){return t instanceof this},b.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},b.prototype.write=function(t,e,r){var n,i=this._writableState,s=!1,a=!i.objectMode&&(n=t,h.isBuffer(n)||n instanceof d);return a&&!h.isBuffer(t)&&(t=function(t){return h.from(t)}(t)),"function"==typeof e&&(r=e,e=null),a?e="buffer":e||(e=i.defaultEncoding),"function"!=typeof r&&(r=g),i.ended?function(t,e){var r=new Error("write after end");t.emit("error",r),o.nextTick(e,r)}(this,r):(a||function(t,e,r,n){var i=!0,s=!1;return null===r?s=new TypeError("May not write null values to stream"):"string"==typeof r||void 0===r||e.objectMode||(s=new TypeError("Invalid non-string/buffer chunk")),s&&(t.emit("error",s),o.nextTick(n,s),i=!1),i}(this,i,t,r))&&(i.pendingcb++,s=function(t,e,r,n,i,o){if(!r){var s=function(t,e,r){t.objectMode||!1===t.decodeStrings||"string"!=typeof e||(e=h.from(e,r));return e}(e,n,i);n!==s&&(r=!0,i="buffer",n=s)}var a=e.objectMode?1:n.length;e.length+=a;var u=e.length-1))throw new TypeError("Unknown encoding: "+t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(b.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),b.prototype._write=function(t,e,r){r(new Error("_write() is not implemented"))},b.prototype._writev=null,b.prototype.end=function(t,e,r){var n=this._writableState;"function"==typeof t?(r=t,t=null,e=null):"function"==typeof e&&(r=e,e=null),null!=t&&this.write(t,e),n.corked&&(n.corked=1,this.uncork()),n.ending||function(t,e,r){e.ending=!0,A(t,e),r&&(e.finished?o.nextTick(r):t.once("finish",r));e.ended=!0,t.writable=!1}(this,n,r)},Object.defineProperty(b.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),b.prototype.destroy=y.destroy,b.prototype._undestroy=y.undestroy,b.prototype._destroy=function(t,e){this.end(),e(t)}}).call(this,r(8),r(118).setImmediate,r(3))},function(t,e,r){"use strict";var n=r(121).Buffer,i=n.isEncoding||function(t){switch((t=""+t)&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(t){var e;switch(this.encoding=function(t){var e=function(t){if(!t)return"utf8";for(var e;;)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}(t);if("string"!=typeof e&&(n.isEncoding===i||!i(t)))throw new Error("Unknown encoding: "+t);return e||t}(t),this.encoding){case"utf16le":this.text=u,this.end=c,e=4;break;case"utf8":this.fillLast=a,e=4;break;case"base64":this.text=l,this.end=f,e=3;break;default:return this.write=h,void(this.end=d)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(e)}function s(t){return t<=127?0:t>>5==6?2:t>>4==14?3:t>>3==30?4:-1}function a(t){var e=this.lastTotal-this.lastNeed,r=function(t,e,r){if(128!=(192&e[0]))return t.lastNeed=0,"�".repeat(r);if(t.lastNeed>1&&e.length>1){if(128!=(192&e[1]))return t.lastNeed=1,"�".repeat(r+1);if(t.lastNeed>2&&e.length>2&&128!=(192&e[2]))return t.lastNeed=2,"�".repeat(r+2)}}(this,t,e);return void 0!==r?r:this.lastNeed<=t.length?(t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(t.copy(this.lastChar,e,0,t.length),void(this.lastNeed-=t.length))}function u(t,e){if((t.length-e)%2==0){var r=t.toString("utf16le",e);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function c(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,r)}return e}function l(t,e){var r=(t.length-e)%3;return 0===r?t.toString("base64",e):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-r))}function f(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function h(t){return t.toString(this.encoding)}function d(t){return t&&t.length?this.write(t):""}e.StringDecoder=o,o.prototype.write=function(t){if(0===t.length)return"";var e,r;if(this.lastNeed){if(void 0===(e=this.fillLast(t)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r=0)return i>0&&(t.lastNeed=i-1),i;if(--n=0)return i>0&&(t.lastNeed=i-2),i;if(--n=0)return i>0&&(2===i?i=0:t.lastNeed=i-3),i;return 0}(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var n=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,n),t.toString("utf8",e,n)},o.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length}},function(t,e,r){"use strict";t.exports=s;var n=r(14),i=Object.create(r(21));function o(t,e){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(!n)return this.emit("error",new Error("write callback called multiple times"));r.writechunk=null,r.writecb=null,null!=e&&this.push(e),n(t);var i=this._readableState;i.reading=!1,(i.needReadable||i.lengthObject(o.a)(r),e)}async decode(t,e){return new Promise((r,n)=>{this.pool.queue(async i=>{try{const n=await i(t,e);r(n)}catch(t){n(t)}})})}destroy(){this.pool.terminate(!0)}}}).call(this,r(133))},function(t,e,r){(function(t){e.fetch=a(t.fetch)&&a(t.ReadableStream),e.writableStream=a(t.WritableStream),e.abortController=a(t.AbortController),e.blobConstructor=!1;try{new Blob([new ArrayBuffer(1)]),e.blobConstructor=!0}catch(t){}var r;function n(){if(void 0!==r)return r;if(t.XMLHttpRequest){r=new t.XMLHttpRequest;try{r.open("GET",t.XDomainRequest?"/":"https://example.com")}catch(t){r=null}}else r=null;return r}function i(t){var e=n();if(!e)return!1;try{return e.responseType=t,e.responseType===t}catch(t){}return!1}var o=void 0!==t.ArrayBuffer,s=o&&a(t.ArrayBuffer.prototype.slice);function a(t){return"function"==typeof t}e.arraybuffer=e.fetch||o&&i("arraybuffer"),e.msstream=!e.fetch&&s&&i("ms-stream"),e.mozchunkedarraybuffer=!e.fetch&&o&&i("moz-chunked-arraybuffer"),e.overrideMimeType=e.fetch||!!n()&&a(n().overrideMimeType),e.vbArray=a(t.VBArray),r=null}).call(this,r(3))},function(t,e,r){(function(t,n,i){var o=r(69),s=r(10),a=r(42),u=e.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},c=e.IncomingMessage=function(e,r,s,u){var c=this;if(a.Readable.call(c),c._mode=s,c.headers={},c.rawHeaders=[],c.trailers={},c.rawTrailers=[],c.on("end",(function(){t.nextTick((function(){c.emit("close")}))})),"fetch"===s){if(c._fetchResponse=r,c.url=r.url,c.statusCode=r.status,c.statusMessage=r.statusText,r.headers.forEach((function(t,e){c.headers[e.toLowerCase()]=t,c.rawHeaders.push(e,t)})),o.writableStream){var l=new WritableStream({write:function(t){return new Promise((function(e,r){c._destroyed?r():c.push(new n(t))?e():c._resumeFetch=e}))},close:function(){i.clearTimeout(u),c._destroyed||c.push(null)},abort:function(t){c._destroyed||c.emit("error",t)}});try{return void r.body.pipeTo(l).catch((function(t){i.clearTimeout(u),c._destroyed||c.emit("error",t)}))}catch(t){}}var f=r.body.getReader();!function t(){f.read().then((function(e){if(!c._destroyed){if(e.done)return i.clearTimeout(u),void c.push(null);c.push(new n(e.value)),t()}})).catch((function(t){i.clearTimeout(u),c._destroyed||c.emit("error",t)}))}()}else{if(c._xhr=e,c._pos=0,c.url=e.responseURL,c.statusCode=e.status,c.statusMessage=e.statusText,e.getAllResponseHeaders().split(/\r?\n/).forEach((function(t){var e=t.match(/^([^:]+):\s*(.*)/);if(e){var r=e[1].toLowerCase();"set-cookie"===r?(void 0===c.headers[r]&&(c.headers[r]=[]),c.headers[r].push(e[2])):void 0!==c.headers[r]?c.headers[r]+=", "+e[2]:c.headers[r]=e[2],c.rawHeaders.push(e[1],e[2])}})),c._charset="x-user-defined",!o.overrideMimeType){var h=c.rawHeaders["mime-type"];if(h){var d=h.match(/;\s*charset=([^;])(;|$)/);d&&(c._charset=d[1].toLowerCase())}c._charset||(c._charset="utf-8")}}};s(c,a.Readable),c.prototype._read=function(){var t=this._resumeFetch;t&&(this._resumeFetch=null,t())},c.prototype._onXHRProgress=function(){var t=this,e=t._xhr,r=null;switch(t._mode){case"text:vbarray":if(e.readyState!==u.DONE)break;try{r=new i.VBArray(e.responseBody).toArray()}catch(t){}if(null!==r){t.push(new n(r));break}case"text":try{r=e.responseText}catch(e){t._mode="text:vbarray";break}if(r.length>t._pos){var o=r.substr(t._pos);if("x-user-defined"===t._charset){for(var s=new n(o.length),a=0;at._pos&&(t.push(new n(new Uint8Array(c.result.slice(t._pos)))),t._pos=c.result.byteLength)},c.onload=function(){t.push(null)},c.readAsArrayBuffer(r)}t._xhr.readyState===u.DONE&&"ms-stream"!==t._mode&&t.push(null)}}).call(this,r(8),r(7).Buffer,r(3))},function(t,e,r){"use strict";var n=r(46),i=Object.prototype.hasOwnProperty,o=Array.isArray,s=function(){for(var t=[],e=0;e<256;++e)t.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return t}(),a=function(t,e){for(var r=e&&e.plainObjects?Object.create(null):{},n=0;n1;){var e=t.pop(),r=e.obj[e.prop];if(o(r)){for(var n=[],i=0;i=48&&l<=57||l>=65&&l<=90||l>=97&&l<=122||o===n.RFC1738&&(40===l||41===l)?u+=a.charAt(c):l<128?u+=s[l]:l<2048?u+=s[192|l>>6]+s[128|63&l]:l<55296||l>=57344?u+=s[224|l>>12]+s[128|l>>6&63]+s[128|63&l]:(c+=1,l=65536+((1023&l)<<10|1023&a.charCodeAt(c)),u+=s[240|l>>18]+s[128|l>>12&63]+s[128|l>>6&63]+s[128|63&l])}return u},isBuffer:function(t){return!(!t||"object"!=typeof t)&&!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))},isRegExp:function(t){return"[object RegExp]"===Object.prototype.toString.call(t)},maybeMap:function(t,e){if(o(t)){for(var r=[],n=0;ne++t.next());return e.every(({done:t})=>t)?{done:!0}:{done:!1,value:e.map(({value:t})=>t)}}))}}},function(t,e,r){"use strict";function n(t){"+"===t[0]&&(t=t.substring(1));const e="-"===t[0]?"-":"";"-"===e&&(t=t.substring(1));const r=t.indexOf("e");if(-1===r)return e+t;let n=t.indexOf(".");-1===n&&(n=r);const i=Number(t.substring(r+1)),o=t.substring(0,r).replace(".",""),s=n+i,a=o.length;if(s>=a){const t=s-a;let r=o;for(let e=0;es;e--)t+="0";return t+=o,e+t}return e+o.substring(0,s)+"."+o.substring(s)}t.exports=n,t.exports.default=n},function(t,e,r){"use strict";t.exports={MAX_SAFE_INTEGER:9007199254740991}},function(t,e,r){"use strict";const n=r(47);function i(t){return"0"===t?"1":n("1",t)}t.exports=i,t.exports.default=i},function(t,e,r){"use strict";const n=r(4),i=r(0),o=r(9),s=r(22);function a(t){if(-1===(t=i(t)).indexOf("."))return t;const e=s(t);return t=n(t).split(".")[0],"+"===e?o(t,"1"):"-"===e?"0"===t||""===t?"0":"-"+t:void 0}t.exports=a,t.exports.default=a},function(t,e,r){"use strict";const n=r(51);function i(t){const e=n(t);return[t.replace(/\./g,"").replace(/^0/,""),1+"0".repeat(e)]}t.exports=i,t.exports.default=i},function(t,e,r){const n=r(0),i=r(16);function o(t){if(t=n(t),!i(t))throw new Error("can't call is_odd on decimal");return["1","3","5","7","9"].includes(t.charAt(t.length-1))}t.exports=o,t.exports.default=o},function(t,e,r){"use strict";const n=r(52),i=r(15),o=r(78),s=r(11),a=r(17),u=r(50);function c(t,{max_decimal_digits:e,infinity_times_zero:r="NaN"}={}){const c=t.some(t=>i(t)),l=t.some(t=>s(t));if(c&&l)return r;if(c){return t.filter(t=>"-"===u(t)).length%2==0?"Infinity":"-Infinity"}if(l)return"0";const f=o(t.filter(t=>n(t)).length.toString());let h=a(t.map(t=>t.replace(/i$/,"")),{max_decimal_digits:e});return f&&(h+="i"),h}t.exports=c,t.exports.default=c},function(t,e,r){"use strict";const n=r(0);function i(t){return"-"===(t=n(t))[0]}t.exports=i,t.exports.default=i},function(t,e,r){"use strict";const n=r(1),i=r(165),o=r(166);function s(t,{max_decimal_digits:e=100,fraction:r=!1}={}){if(i(t)){const[i,s]=o(t);return r?s+"/"+i:n(s,i,{max_decimal_digits:e})}return r?"1/"+t:n("1",t,{max_decimal_digits:e})}t.exports=s,t.exports.default=s},function(t,e,r){"use strict";const n=r(0),i=r(16);function o(t){if(t=n(t),!i(t))throw new Error("can't call is_even on decimal");return["0","2","4","6","8"].includes(t.charAt(t.length-1))}t.exports=o,t.exports.default=o},function(t,e,r){"use strict";const n=r(76),i=r(84),o=r(1);function s(t,e){const r=i(t);return"0"===r?"0":n(o(r,e,{max_decimal_digits:1}))}t.exports=s,t.exports.default=s},function(t,e,r){"use strict";const n=r(4),i=r(0);function o(t){const e=(t=n(i(t))).indexOf(".");return(-1===e?t.length:e).toString()}t.exports=o,t.exports.default=o},function(t,e,r){"use strict";const n=r(1),i=r(82),o=r(86),s=r(87);function a(t,e){const r=s("2",o(["1000",e,e]));for(;t.endsWith("0")&&e.endsWith("0");)t=t.substring(0,t.length-1),e=e.substring(0,e.length-1);for(;i(t)&&i(e);)t=n(t,"2"),e=n(e,"2");let a=!0;for(;a;){a=!1;for(let i=0;i"<"!==n(r,t)&&">"!==n(r,e));let a="13";for(;">"!==n(a,e);)/^\d+5/.test(a)||/^(\d)\1+/.test(a)||["9","7","3"].every(t=>!o(i(a,t)))&&r.push(a),a=s(a,"2");return r}t.exports=a,t.exports.default=a},function(t,e,r){"use strict";const n=r(6),i=r(1);function o({max_decimal_digits:t=100,steps:e=100}={}){let r="1",o="1";for(let s=1;s":return"-"+s(t,e)}else if(r&&!a)switch(e=e.substring(1),n(t,e)){case"=":return"0";case"<":return"-"+s(e,t);case">":return s(t,e)}}t.exports=a,t.exports.default=a},function(t,e,r){const{MAX_SAFE_INTEGER_LENGTH:n}=r(56);t.exports=function(t,e){const r=t.length,i=e.length,o=t.indexOf("."),s=e.indexOf("."),a=-1===o?r:o,u=-1===s?i:s;if(-1===o&&-1===s&&r0){for(;m>p-f;){const r=t[m-h]||"0",n=e[m-d]||"0";let i=Number(r)+Number(n)+g;i>=10?(i-=10,g=1):g=0,""===y&&0===i||(y=i+y),m--}y&&(y="."+y),m--}if(l>0)for(;m>=0;){const r=t[m-h]||"0",n=e[m-d]||"0";let i=Number(r)+Number(n)+g;i>=10?(i-=10,g=1):g=0,y=i+y,m--}return 1===g&&(y=g+y),"."===y[0]&&(y="0"+y),y}},function(t,e,r){const{MAX_SAFE_INTEGER_LENGTH:n}=r(56);t.exports=function(t,e){const r=t.length,i=e.length,o=t.indexOf("."),s=e.indexOf("."),a=-1===o?r:o,u=-1===s?i:s;if(-1===o&&-1===s&&r0){for(;m>p-f;){let r=t[m-h]||"0",n=e[m-d]||"0";r-=g,g=0;let i=r-n;if(i<0)for(;i<0;)g++,i+=10;else g&&g--;""===y&&0===i||(y=i+y),m--}""!==y&&(y="."+y),m--}if(l>0){for(;m>0;){let r=t[m-h]||"0",n=e[m-d]||"0";r-=g,g=0;let i=r-n;if(i<0)for(;i<0;)g++,i+=10;else g&&g--;y=i+y,m--}const r=t[0-h]||"0",n=e[0-d]||"0";let i=Number(r)-(g>0?1:0)-Number(n);0!==i&&(y=i+y),y=y.replace(/^0+/,"")}return"."===y[0]&&(y="0"+y),y}},function(t,e,r){const n=r(18);function i(t){return"-"===(t=n(t))[0]?t.substring(1):t}t.exports=i,t.exports.default=i},function(t,e,r){"use strict";t.exports={countIn1D:function(t){return t.reduce((function(t,e){return void 0===t[e]?t[e]=1:t[e]++,t}),{})},countIn2D:function(t){return t.reduce((function(t,e){return e.forEach((function(e){void 0===t[e]?t[e]=1:t[e]++})),t}),{})},unflatten:function(t,e){for(var r=e.height,n=e.width,i=[],o=0;o>24)/500+a,c=a-(t[e+2]<<24>>24)/200;u=.95047*(u*u*u>.008856?u*u*u:(u-16/116)/7.787),a=1*(a*a*a>.008856?a*a*a:(a-16/116)/7.787),c=1.08883*(c*c*c>.008856?c*c*c:(c-16/116)/7.787),i=3.2406*u+-1.5372*a+-.4986*c,o=-.9689*u+1.8758*a+.0415*c,s=.0557*u+-.204*a+1.057*c,i=i>.0031308?1.055*i**(1/2.4)-.055:12.92*i,o=o>.0031308?1.055*o**(1/2.4)-.055:12.92*o,s=s>.0031308?1.055*s**(1/2.4)-.055:12.92*s,n[r]=255*Math.max(0,Math.min(1,i)),n[r+1]=255*Math.max(0,Math.min(1,o)),n[r+2]=255*Math.max(0,Math.min(1,s))}return n}function S(t,e){let r=t.length-e,n=0;do{for(let r=e;r>0;r--)t[n+e]+=t[n],n++;r-=e}while(r>0)}function A(t,e,r){let n=0,i=t.length;const o=i/r;for(;i>e;){for(let r=e;r>0;--r)t[n+e]+=t[n],++n;i-=e}const s=t.slice();for(let e=0;e=t.byteLength);++o){let n;if(2===e){switch(i[0]){case 8:n=new Uint8Array(t,o*a*r*s,a*r*s);break;case 16:n=new Uint16Array(t,o*a*r*s,a*r*s/2);break;case 32:n=new Uint32Array(t,o*a*r*s,a*r*s/4);break;default:throw new Error(`Predictor 2 not allowed with ${i[0]} bits per sample.`)}S(n,a)}else 3===e&&(n=new Uint8Array(t,o*a*r*s,a*r*s),A(n,a,s))}return t}(r,n,e?t.TileWidth:t.ImageWidth,e?t.TileLength:t.RowsPerStrip||t.ImageLength,t.BitsPerSample,t.PlanarConfiguration)}return r}}class k extends E{decodeBlock(t){return t}}function T(t,e){for(let r=e.length-1;r>=0;r--)t.push(e[r]);return t}function O(t){const e=new Uint16Array(4093),r=new Uint8Array(4093);for(let t=0;t<=257;t++)e[t]=4096,r[t]=t;let n=258,i=9,o=0;function s(){n=258,i=9}function a(t){const e=function(t,e,r){const n=e%8,i=Math.floor(e/8),o=8-n,s=e+r-8*(i+1);let a=8*(i+2)-(e+r);const u=8*(i+2)-e;if(a=Math.max(0,a),i>=t.length)return console.warn("ran off the end of the buffer before finding EOI_CODE (end on input code)"),257;let c=t[i]&2**(8-n)-1;c<<=r-o;let l=c;if(i+1>>a;e<<=Math.max(0,r-u),l+=e}if(s>8&&i+2>>n}return l}(t,o,i);return o+=i,e}function u(t,i){return r[n]=i,e[n]=t,n++,n-1}function c(t){const n=[];for(let i=t;4096!==i;i=e[i])n.push(r[i]);return n}const l=[];s();const f=new Uint8Array(t);let h,d=a(f);for(;257!==d;){if(256===d){for(s(),d=a(f);256===d;)d=a(f);if(257===d)break;if(d>256)throw new Error("corrupted code at scanline "+d);T(l,c(d)),h=d}else if(d=2**i&&(12===i?h=void 0:i++),d=a(f)}return new Uint8Array(l)}class C extends E{decodeBlock(t){return O(t).buffer}}const P=new Int32Array([0,1,8,16,9,2,3,10,17,24,32,25,18,11,4,5,12,19,26,33,40,48,41,34,27,20,13,6,7,14,21,28,35,42,49,56,57,50,43,36,29,22,15,23,30,37,44,51,58,59,52,45,38,31,39,46,53,60,61,54,47,55,62,63]);function I(t,e){let r=0;const n=[];let i=16;for(;i>0&&!t[i-1];)--i;n.push({children:[],index:0});let o,s=n[0];for(let a=0;a0;)s=n.pop();for(s.index++,n.push(s);n.length<=a;)n.push(o={children:[],index:0}),s.children[s.index]=o.children,s=o;r++}a+10)return p--,d>>p&1;if(d=t[h++],255===d){const e=t[h++];if(e)throw new Error("unexpected marker: "+(d<<8|e).toString(16))}return p=7,d>>>7}function g(t){let e,r=t;for(;null!==(e=y());){if(r=r[e],"number"==typeof r)return r;if("object"!=typeof r)throw new Error("invalid huffman sequence")}return null}function m(t){let e=t,r=0;for(;e>0;){const t=y();if(null===t)return;r=r<<1|t,--e}return r}function b(t){const e=m(t);return e>=1<0)return void v--;let r=o;const n=s;for(;r<=n;){const n=g(t.huffmanTableAC),i=15&n,o=n>>4;if(0===i){if(o<15){v=m(o)+(1<>4,0===r)i<15?(v=m(i)+(1<>4;if(0===n){if(o<15)break;i+=16}else{i+=o;e[P[i]]=b(n),i++}}};let R,j,M=0;j=1===A?n[0].blocksPerLine*n[0].blocksPerColumn:c*r.mcusPerColumn;const L=i||j;for(;M=65488&&R<=65495))break;h+=2}return h-f}function j(t,e){const r=[],{blocksPerLine:n,blocksPerColumn:i}=e,o=n<<3,s=new Int32Array(64),a=new Uint8Array(64);function u(t,r,n){const i=e.quantizationTable;let o,s,a,u,c,l,f,h,d;const p=n;let y;for(y=0;y<64;y++)p[y]=t[y]*i[y];for(y=0;y<8;++y){const t=8*y;0!==p[1+t]||0!==p[2+t]||0!==p[3+t]||0!==p[4+t]||0!==p[5+t]||0!==p[6+t]||0!==p[7+t]?(o=5793*p[0+t]+128>>8,s=5793*p[4+t]+128>>8,a=p[2+t],u=p[6+t],c=2896*(p[1+t]-p[7+t])+128>>8,h=2896*(p[1+t]+p[7+t])+128>>8,l=p[3+t]<<4,f=p[5+t]<<4,d=o-s+1>>1,o=o+s+1>>1,s=d,d=3784*a+1567*u+128>>8,a=1567*a-3784*u+128>>8,u=d,d=c-f+1>>1,c=c+f+1>>1,f=d,d=h+l+1>>1,l=h-l+1>>1,h=d,d=o-u+1>>1,o=o+u+1>>1,u=d,d=s-a+1>>1,s=s+a+1>>1,a=d,d=2276*c+3406*h+2048>>12,c=3406*c-2276*h+2048>>12,h=d,d=799*l+4017*f+2048>>12,l=4017*l-799*f+2048>>12,f=d,p[0+t]=o+h,p[7+t]=o-h,p[1+t]=s+f,p[6+t]=s-f,p[2+t]=a+l,p[5+t]=a-l,p[3+t]=u+c,p[4+t]=u-c):(d=5793*p[0+t]+512>>10,p[0+t]=d,p[1+t]=d,p[2+t]=d,p[3+t]=d,p[4+t]=d,p[5+t]=d,p[6+t]=d,p[7+t]=d)}for(y=0;y<8;++y){const t=y;0!==p[8+t]||0!==p[16+t]||0!==p[24+t]||0!==p[32+t]||0!==p[40+t]||0!==p[48+t]||0!==p[56+t]?(o=5793*p[0+t]+2048>>12,s=5793*p[32+t]+2048>>12,a=p[16+t],u=p[48+t],c=2896*(p[8+t]-p[56+t])+2048>>12,h=2896*(p[8+t]+p[56+t])+2048>>12,l=p[24+t],f=p[40+t],d=o-s+1>>1,o=o+s+1>>1,s=d,d=3784*a+1567*u+2048>>12,a=1567*a-3784*u+2048>>12,u=d,d=c-f+1>>1,c=c+f+1>>1,f=d,d=h+l+1>>1,l=h-l+1>>1,h=d,d=o-u+1>>1,o=o+u+1>>1,u=d,d=s-a+1>>1,s=s+a+1>>1,a=d,d=2276*c+3406*h+2048>>12,c=3406*c-2276*h+2048>>12,h=d,d=799*l+4017*f+2048>>12,l=4017*l-799*f+2048>>12,f=d,p[0+t]=o+h,p[56+t]=o-h,p[8+t]=s+f,p[48+t]=s-f,p[16+t]=a+l,p[40+t]=a-l,p[24+t]=u+c,p[32+t]=u-c):(d=5793*n[y+0]+8192>>14,p[0+t]=d,p[8+t]=d,p[16+t]=d,p[24+t]=d,p[32+t]=d,p[40+t]=d,p[48+t]=d,p[56+t]=d)}for(y=0;y<64;++y){const t=128+(p[y]+8>>4);r[y]=t<0?0:t>255?255:t}}for(let t=0;t>4==0)for(let r=0;r<64;r++){i[P[r]]=t[e++]}else{if(n>>4!=1)throw new Error("DQT: invalid table spec");for(let t=0;t<64;t++){i[P[t]]=r()}}this.quantizationTables[15&n]=i}break}case 65472:case 65473:case 65474:{r();const n={extended:65473===o,progressive:65474===o,precision:t[e++],scanLines:r(),samplesPerLine:r(),components:{},componentsOrder:[]},s=t[e++];let a;for(let r=0;r>4,i=15&t[e+1],o=t[e+2];n.componentsOrder.push(a),n.components[a]={h:r,v:i,quantizationIdx:o},e+=3}i(n),this.frames.push(n);break}case 65476:{const n=r();for(let r=2;r>4==0?this.huffmanTablesDC[15&n]=I(i,s):this.huffmanTablesAC[15&n]=I(i,s)}break}case 65501:r(),this.resetInterval=r();break;case 65498:{r();const n=t[e++],i=[],o=this.frames[0];for(let r=0;r>4],r.huffmanTableAC=this.huffmanTablesAC[15&n],i.push(r)}const s=t[e++],a=t[e++],u=t[e++],c=R(t,e,o,i,this.resetInterval,s,a,u>>4,15&u);e+=c;break}case 65535:255!==t[e]&&e--;break;default:if(255===t[e-3]&&t[e-2]>=192&&t[e-2]<=254){e-=3;break}throw new Error("unknown JPEG marker "+o.toString(16))}o=r()}}getResult(){const{frames:t}=this;if(0===this.frames.length)throw new Error("no frames were decoded");this.frames.length>1&&console.warn("more than one frame is not supported");for(let t=0;t{const a=B(t,n,i);for(let u=0;u{const a=B(t,n,i);for(let u=0;u=this.fileDirectory.BitsPerSample.length)throw new RangeError(`Sample index ${t} is out of range.`);const e=this.fileDirectory.BitsPerSample[t];if(e%8!=0)throw new Error(`Sample bit-width of ${e} is not supported.`);return e/8}getReaderForSample(t){const e=this.fileDirectory.SampleFormat?this.fileDirectory.SampleFormat[t]:1,r=this.fileDirectory.BitsPerSample[t];switch(e){case 1:switch(r){case 8:return DataView.prototype.getUint8;case 16:return DataView.prototype.getUint16;case 32:return DataView.prototype.getUint32}break;case 2:switch(r){case 8:return DataView.prototype.getInt8;case 16:return DataView.prototype.getInt16;case 32:return DataView.prototype.getInt32}break;case 3:switch(r){case 32:return DataView.prototype.getFloat32;case 64:return DataView.prototype.getFloat64}}throw Error("Unsupported data format/bitsPerSample")}getArrayForSample(t,e){return W(this.fileDirectory.SampleFormat?this.fileDirectory.SampleFormat[t]:1,this.fileDirectory.BitsPerSample[t],e)}async getTileOrStrip(t,e,r,n){const i=Math.ceil(this.getWidth()/this.getTileWidth()),o=Math.ceil(this.getHeight()/this.getTileHeight());let s;const{tiles:a}=this;let u,c;1===this.planarConfiguration?s=e*i+t:2===this.planarConfiguration&&(s=r*i*o+e*i+t),this.isTiled?(u=this.fileDirectory.TileOffsets[s],c=this.fileDirectory.TileByteCounts[s]):(u=this.fileDirectory.StripOffsets[s],c=this.fileDirectory.StripByteCounts[s]);const l=await this.source.fetch(u,c);let f;return null===a?f=n.decode(this.fileDirectory,l):a[s]||(f=n.decode(this.fileDirectory,l),a[s]=f),{x:t,y:e,sample:r,data:await f}}async _readRaster(t,e,r,n,i,o,s,a){const u=this.getTileWidth(),c=this.getTileHeight(),l=Math.max(Math.floor(t[0]/u),0),f=Math.min(Math.ceil(t[2]/u),Math.ceil(this.getWidth()/this.getTileWidth())),h=Math.max(Math.floor(t[1]/c),0),d=Math.min(Math.ceil(t[3]/c),Math.ceil(this.getHeight()/this.getTileHeight())),p=t[2]-t[0];let y=this.getBytesPerPixel();const g=[],m=[];for(let t=0;t{const o=i.data,s=new DataView(o),a=i.y*c,f=i.x*u,h=(i.y+1)*c,d=(i.x+1)*u,b=m[l],w=Math.min(c,c-(h-t[3])),x=Math.min(u,u-(d-t[2]));for(let i=Math.max(0,t[1]-a);iu[2]||u[1]>u[3])throw new Error("Invalid subsets");const c=(u[2]-u[0])*(u[3]-u[1]);if(e&&e.length){for(let t=0;t=this.fileDirectory.SamplesPerPixel)return Promise.reject(new RangeError(`Invalid sample index '${e[t]}'.`))}else for(let t=0;ts[2]||s[1]>s[3])throw new Error("Invalid subsets");const a=this.fileDirectory.PhotometricInterpretation;if(a===d.RGB){let i=[0,1,2];if(this.fileDirectory.ExtraSamples!==p.Unspecified&&o){i=[];for(let t=0;t"Item"===t.tagName);t&&(o=o.filter(e=>Number(e.attributes.sample)===t));for(let t=0;t0;let i=!0;for(let o=0;o<8;o++){let s=this._dataView.getUint8(t+(e?o:7-o));n&&(i?0!==s&&(s=255&~(s-1),i=!1):s=255&~s),r+=s*256**o}return n&&(r=-r),r}getUint8(t,e){return this._dataView.getUint8(t,e)}getInt8(t,e){return this._dataView.getInt8(t,e)}getUint16(t,e){return this._dataView.getUint16(t,e)}getInt16(t,e){return this._dataView.getInt16(t,e)}getUint32(t,e){return this._dataView.getUint32(t,e)}getInt32(t,e){return this._dataView.getInt32(t,e)}getFloat32(t,e){return this._dataView.getFloat32(t,e)}getFloat64(t,e){return this._dataView.getFloat64(t,e)}}class K{constructor(t,e,r,n){this._dataView=new DataView(t),this._sliceOffset=e,this._littleEndian=r,this._bigTiff=n}get sliceOffset(){return this._sliceOffset}get sliceTop(){return this._sliceOffset+this.buffer.byteLength}get littleEndian(){return this._littleEndian}get bigTiff(){return this._bigTiff}get buffer(){return this._dataView.buffer}covers(t,e){return this.sliceOffset<=t&&this.sliceTop>=t+e}readUint8(t){return this._dataView.getUint8(t-this._sliceOffset,this._littleEndian)}readInt8(t){return this._dataView.getInt8(t-this._sliceOffset,this._littleEndian)}readUint16(t){return this._dataView.getUint16(t-this._sliceOffset,this._littleEndian)}readInt16(t){return this._dataView.getInt16(t-this._sliceOffset,this._littleEndian)}readUint32(t){return this._dataView.getUint32(t-this._sliceOffset,this._littleEndian)}readInt32(t){return this._dataView.getInt32(t-this._sliceOffset,this._littleEndian)}readFloat32(t){return this._dataView.getFloat32(t-this._sliceOffset,this._littleEndian)}readFloat64(t){return this._dataView.getFloat64(t-this._sliceOffset,this._littleEndian)}readUint64(t){const e=this.readUint32(t),r=this.readUint32(t+4);let n;if(this._littleEndian){if(n=e+2**32*r,!Number.isSafeInteger(n))throw new Error(n+" exceeds MAX_SAFE_INTEGER. Precision may be lost. Please report if you get this message to https://github.com/geotiffjs/geotiff.js/issues");return n}if(n=2**32*e+r,!Number.isSafeInteger(n))throw new Error(n+" exceeds MAX_SAFE_INTEGER. Precision may be lost. Please report if you get this message to https://github.com/geotiffjs/geotiff.js/issues");return n}readInt64(t){let e=0;const r=(128&this._dataView.getUint8(t+(this._littleEndian?7:0)))>0;let n=!0;for(let i=0;i<8;i++){let o=this._dataView.getUint8(t+(this._littleEndian?i:7-i));r&&(n?0!==o&&(o=255&~(o-1),n=!1):o=255&~o),e+=o*256**i}return r&&(e=-e),e}readOffset(t){return this._bigTiff?this.readUint64(t):this.readUint32(t)}}var Y=r(68),Z=r(7),X=r(25),Q=r(40),J=r.n(Q),tt=r(106),et=r.n(tt),rt=r(39),nt=r.n(rt);class it{constructor(t,{blockSize:e=65536}={}){this.retrievalFunction=t,this.blockSize=e,this.blockRequests=new Map,this.blocks=new Map,this.blockIdsAwaitingRequest=null}async fetch(t,e,r=!1){const n=t+e,i=[],o=[],s=[];for(let e=Math.floor(t/this.blockSize)*this.blockSize;esetTimeout(e,t))}(),this.blockIdsAwaitingRequest){const t=function(t){if(0===t.length)return[];const e=[];let r=[];e.push(r);for(let n=0;n{const e=await t,i=r*this.blockSize,o=Math.min(i+this.blockSize,e.data.byteLength),s=e.data.slice(i,o);this.blockRequests.delete(n),this.blocks.set(n,{data:s,offset:e.offset+i,length:s.byteLength,top:e.offset+o})})())}}this.blockIdsAwaitingRequest=null}const a=[];for(const t of o)this.blockRequests.has(t)&&a.push(this.blockRequests.get(t));await Promise.all(a),await Promise.all(s);return function(t,e,r){const n=e+r,i=new ArrayBuffer(r),o=new Uint8Array(i);for(const r of t){const t=r.offset-e,i=r.top-n;let s,a=0,u=0;t<0?a=-t:t>0&&(u=t),s=i<0?r.length-a:n-r.offset-a;const c=new Uint8Array(r.data,a,s);o.set(c,u)}return i}(i.map(t=>this.blocks.get(t)),t,e)}async requestData(t,e){const r=await this.retrievalFunction(t,e);return r.length?r.length!==r.data.byteLength&&(r.data=r.data.slice(0,r.length)):r.length=r.data.byteLength,r.top=r.offset+r.length,r}}function ot(t,e){const{forceXHR:r}=e;if("function"==typeof fetch&&!r)return function(t,{headers:e={},blockSize:r}={}){return new it(async(r,n)=>{const i=await fetch(t,{headers:{...e,Range:`bytes=${r}-${r+n-1}`}});if(i.ok){if(206===i.status){return{data:i.arrayBuffer?await i.arrayBuffer():(await i.buffer()).buffer,offset:r,length:n}}{const t=i.arrayBuffer?await i.arrayBuffer():(await i.buffer()).buffer;return{data:t,offset:0,length:t.byteLength}}}throw new Error("Error fetching data.")},{blockSize:r})}(t,e);if("undefined"!=typeof XMLHttpRequest)return function(t,{headers:e={},blockSize:r}={}){return new it(async(r,n)=>new Promise((i,o)=>{const s=new XMLHttpRequest;s.open("GET",t),s.responseType="arraybuffer";const a={...e,Range:`bytes=${r}-${r+n-1}`};for(const[t,e]of Object.entries(a))s.setRequestHeader(t,e);s.onload=()=>{const t=s.response;206===s.status?i({data:t,offset:r,length:n}):i({data:t,offset:0,length:t.byteLength})},s.onerror=o,s.send()}),{blockSize:r})}(t,e);if(J.a.get)return function(t,{headers:e={},blockSize:r}={}){return new it(async(r,n)=>new Promise((i,o)=>{const s=nt.a.parse(t);("http:"===s.protocol?J.a:et.a).get({...s,headers:{...e,Range:`bytes=${r}-${r+n-1}`}},t=>{const e=[];t.on("data",t=>{e.push(t)}),t.on("end",()=>{const t=Z.Buffer.concat(e).buffer;i({data:t,offset:r,length:t.byteLength})})}).on("error",o)}),{blockSize:r})}(t,e);throw new Error("No remote source available")}function st(t){const e=function(t,e,r){return new Promise((n,i)=>{Object(X.open)(t,e,r,(t,e)=>{t?i(t):n(e)})})}(t,"r");return{async fetch(t,r){const n=await e,{buffer:i}=await function(...t){return new Promise((e,r)=>{Object(X.read)(...t,(t,n,i)=>{t?r(t):e({bytesRead:n,buffer:i})})})}(n,Z.Buffer.alloc(r),0,r,t);return i.buffer},async close(){const t=await e;return await function(t){return new Promise((e,r)=>{Object(X.close)(t,t=>{t?r(t):e()})})}(t)}}}function at(t,e){for(const r in e)e.hasOwnProperty(r)&&(t[r]=e[r])}function ut(t,e){if(t.length{let r=e;for(;0!==t[r];)r++;return r},readUshort:(t,e)=>t[e]<<8|t[e+1],readShort:(t,e)=>{const r=yt.ui8;return r[0]=t[e+1],r[1]=t[e+0],yt.i16[0]},readInt:(t,e)=>{const r=yt.ui8;return r[0]=t[e+3],r[1]=t[e+2],r[2]=t[e+1],r[3]=t[e+0],yt.i32[0]},readUint:(t,e)=>{const r=yt.ui8;return r[0]=t[e+3],r[1]=t[e+2],r[2]=t[e+1],r[3]=t[e+0],yt.ui32[0]},readASCII:(t,e,r)=>r.map(r=>String.fromCharCode(t[e+r])).join(""),readFloat:(t,e)=>{const r=yt.ui8;return lt(4,n=>{r[n]=t[e+3-n]}),yt.fl32[0]},readDouble:(t,e)=>{const r=yt.ui8;return lt(8,n=>{r[n]=t[e+7-n]}),yt.fl64[0]},writeUshort:(t,e,r)=>{t[e]=r>>8&255,t[e+1]=255&r},writeUint:(t,e,r)=>{t[e]=r>>24&255,t[e+1]=r>>16&255,t[e+2]=r>>8&255,t[e+3]=r>>0&255},writeASCII:(t,e,r)=>{lt(r.length,n=>{t[e+n]=r.charCodeAt(n)})},ui8:new Uint8Array(8)};yt.fl64=new Float64Array(yt.ui8.buffer),yt.writeDouble=(t,e,r)=>{yt.fl64[0]=r,lt(8,r=>{t[e+r]=yt.ui8[7-r]})};const gt=t=>{const e=new Uint8Array(1e3);let r=4;const n=yt;e[0]=77,e[1]=77,e[3]=42;let i=8;if(n.writeUint(e,r,i),r+=4,t.forEach((r,o)=>{const s=((t,e,r,n)=>{let i=r;const o=Object.keys(n).filter(t=>null!=t&&"undefined"!==t);t.writeUshort(e,i,o.length),i+=2;let s=i+12*o.length+4;for(const r of o){let o=null;"number"==typeof r?o=r:"string"==typeof r&&(o=parseInt(r,10));const a=c[o],u=pt[a];if(null==a||void 0===a||void 0===a)throw new Error("unknown type of tag: "+o);let l=n[r];if(void 0===l)throw new Error("failed to get value for key "+r);"ASCII"===a&&"string"==typeof l&&!1===ut(l,"\0")&&(l+="\0");const f=l.length;t.writeUshort(e,i,o),i+=2,t.writeUshort(e,i,u),i+=2,t.writeUint(e,i,f),i+=4;let h=[-1,1,1,2,4,8,0,0,0,0,0,0,8][u]*f,d=i;h>4&&(t.writeUint(e,i,s),d=s),"ASCII"===a?t.writeASCII(e,d,l):"SHORT"===a?lt(f,r=>{t.writeUshort(e,d+2*r,l[r])}):"LONG"===a?lt(f,r=>{t.writeUint(e,d+4*r,l[r])}):"RATIONAL"===a?lt(f,r=>{t.writeUint(e,d+8*r,Math.round(1e4*l[r])),t.writeUint(e,d+8*r+4,1e4)}):"DOUBLE"===a&<(f,r=>{t.writeDouble(e,d+8*r,l[r])}),h>4&&(h+=1&h,s+=h),i+=4}return[i,s]})(n,e,i,r);i=s[1],o{lt(i,r=>{lt(n,n=>{o.push(t[n][e][r])})})})),e.ImageLength=r,delete e.height,e.ImageWidth=i,delete e.width,e.BitsPerSample||(e.BitsPerSample=lt(n,()=>8)),mt.forEach(t=>{const r=t[0];if(!e[r]){const n=t[1];e[r]=n}}),e.PhotometricInterpretation||(e.PhotometricInterpretation=3===e.BitsPerSample.length?2:1),e.SamplesPerPixel||(e.SamplesPerPixel=[n]),e.StripByteCounts||(e.StripByteCounts=[n*r*i]),e.ModelPixelScale||(e.ModelPixelScale=[360/i,180/r,0]),e.SampleFormat||(e.SampleFormat=lt(n,()=>1));const s=Object.keys(e).filter(t=>ut(t,"GeoKey")).sort((t,e)=>dt[t]-dt[e]);if(!e.GeoKeyDirectory){const t=[1,1,0,s.length];s.forEach(r=>{const n=Number(dt[r]);let i,o,s;t.push(n),"SHORT"===c[n]?(i=1,o=0,s=e[r]):"GeogCitationGeoKey"===r?(i=e.GeoAsciiParams.length,o=Number(dt.GeoAsciiParams),s=0):console.log("[geotiff.js] couldn't get TIFFTagLocation for "+r),t.push(o),t.push(i),t.push(s)}),e.GeoKeyDirectory=t}for(const t in s)s.hasOwnProperty(t)&&delete e[t];["Compression","ExtraSamples","GeographicTypeGeoKey","GTModelTypeGeoKey","GTRasterTypeGeoKey","ImageLength","ImageWidth","PhotometricInterpretation","PlanarConfiguration","ResolutionUnit","SamplesPerPixel","XPosition","YPosition"].forEach(t=>{var r;e[t]&&(e[t]=(r=e[t],Array.isArray(r)?r:[r]))});const a=(t=>{const e={};for(const r in t)"StripOffsets"!==r&&(dt[r]||console.error(r,"not in name2code:",Object.keys(dt)),e[dt[r]]=t[r]);return e})(e);return((t,e,r,n)=>{if(null==r)throw new Error("you passed into encodeImage a width of type "+r);if(null==e)throw new Error("you passed into encodeImage a width of type "+e);const i={256:[e],257:[r],273:[1e3],278:[r],305:"geotiff.js"};if(n)for(const t in n)n.hasOwnProperty(t)&&(i[t]=n[t]);const o=new Uint8Array(gt([i])),s=new Uint8Array(t),a=i[277],u=new Uint8Array(1e3+e*r*a);return lt(o.length,t=>{u[t]=o[t]}),function(t,e){const{length:r}=t;for(let n=0;n{u[1e3+e]=t}),u.buffer})(o,i,r,a)}class vt{log(){}info(){}warn(){}error(){}time(){}timeEnd(){}}let wt=new vt;function xt(t=new vt){wt=t}function _t(t){switch(t){case h.BYTE:case h.ASCII:case h.SBYTE:case h.UNDEFINED:return 1;case h.SHORT:case h.SSHORT:return 2;case h.LONG:case h.SLONG:case h.FLOAT:case h.IFD:return 4;case h.RATIONAL:case h.SRATIONAL:case h.DOUBLE:case h.LONG8:case h.SLONG8:case h.IFD8:return 8;default:throw new RangeError("Invalid field type: "+t)}}function St(t,e,r,n){let i=null,o=null;const s=_t(e);switch(e){case h.BYTE:case h.ASCII:case h.UNDEFINED:i=new Uint8Array(r),o=t.readUint8;break;case h.SBYTE:i=new Int8Array(r),o=t.readInt8;break;case h.SHORT:i=new Uint16Array(r),o=t.readUint16;break;case h.SSHORT:i=new Int16Array(r),o=t.readInt16;break;case h.LONG:case h.IFD:i=new Uint32Array(r),o=t.readUint32;break;case h.SLONG:i=new Int32Array(r),o=t.readInt32;break;case h.LONG8:case h.IFD8:i=new Array(r),o=t.readUint64;break;case h.SLONG8:i=new Array(r),o=t.readInt64;break;case h.RATIONAL:i=new Uint32Array(2*r),o=t.readUint32;break;case h.SRATIONAL:i=new Int32Array(2*r),o=t.readInt32;break;case h.FLOAT:i=new Float32Array(r),o=t.readFloat32;break;case h.DOUBLE:i=new Float64Array(r),o=t.readFloat64;break;default:throw new RangeError("Invalid field type: "+e)}if(e!==h.RATIONAL&&e!==h.SRATIONAL)for(let e=0;et.getWidth()-e.getWidth());for(let e=0;en||o&&o>s)break}}let f=e;if(s){const[t,e]=a.getOrigin(),[r,n]=u.getResolution(a);f=[Math.round((s[0]-t)/r),Math.round((s[1]-e)/n),Math.round((s[2]-t)/r),Math.round((s[3]-e)/n)],f=[Math.min(f[0],f[2]),Math.min(f[1],f[3]),Math.max(f[0],f[2]),Math.max(f[1],f[3])]}return u.readRasters({...t,window:f})}}class Tt extends kt{constructor(t,e,r,n,i={}){super(),this.source=t,this.littleEndian=e,this.bigTiff=r,this.firstIFDOffset=n,this.cache=i.cache||!1,this.ifdRequests=[],this.ghostValues=null}async getSlice(t,e){const r=this.bigTiff?4048:1024;return new K(await this.source.fetch(t,void 0!==e?e:r),t,this.littleEndian,this.bigTiff)}async parseFileDirectoryAt(t){const e=this.bigTiff?20:12,r=this.bigTiff?8:2;let n=await this.getSlice(t);const i=this.bigTiff?n.readUint64(t):n.readUint16(t),o=i*e+(this.bigTiff?16:6);n.covers(t,o)||(n=await this.getSlice(t,o));const s={};let u=t+(this.bigTiff?8:2);for(let t=0;t{const e=await this.ifdRequests[t-1];if(0===e.nextIFDByteOffset)throw new Et(t);return this.parseFileDirectoryAt(e.nextIFDByteOffset)})(),this.ifdRequests[t]}async getImage(t=0){const e=await this.requestIFD(t);return new V(e.fileDirectory,e.geoKeyDirectory,this.dataView,this.littleEndian,this.cache,this.source)}async getImageCount(){let t=0,e=!0;for(;e;)try{await this.requestIFD(t),++t}catch(t){if(!(t instanceof Et))throw t;e=!1}return t}async getGhostValues(){const t=this.bigTiff?16:8;if(this.ghostValues)return this.ghostValues;const e="GDAL_STRUCTURAL_METADATA_SIZE=",r=e.length+100;let n=await this.getSlice(t,r);if(e===St(n,h.ASCII,e.length,t)){const e=St(n,h.ASCII,r,t).split("\n")[0],i=Number(e.split("=")[1].split(" ")[0])+e.length;i>r&&(n=await this.getSlice(t,i));const o=St(n,h.ASCII,i,t);this.ghostValues={},o.split("\n").filter(t=>t.length>0).map(t=>t.split("=")).forEach(([t,e])=>{this.ghostValues[t]=e})}return this.ghostValues}static async fromSource(t,e){const r=await t.fetch(0,1024),n=new $(r),i=n.getUint16(0,0);let o;if(18761===i)o=!0;else{if(19789!==i)throw new TypeError("Invalid byte order value.");o=!1}const s=n.getUint16(2,o);let a;if(42===s)a=!1;else{if(43!==s)throw new TypeError("Invalid magic number.");a=!0;if(8!==n.getUint16(4,o))throw new Error("Unsupported offset byte-size.")}const u=a?n.getUint64(8,o):n.getUint32(4,o);return new Tt(t,o,a,u,e)}close(){return"function"==typeof this.source.close&&this.source.close()}}e.default=Tt;class Ot extends kt{constructor(t,e){super(),this.mainFile=t,this.overviewFiles=e,this.imageFiles=[t].concat(e),this.fileDirectoriesPerFile=null,this.fileDirectoriesPerFileParsing=null,this.imageCount=null}async parseFileDirectoriesPerFile(){const t=[this.mainFile.parseFileDirectoryAt(this.mainFile.firstIFDOffset)].concat(this.overviewFiles.map(t=>t.parseFileDirectoryAt(t.firstIFDOffset)));return this.fileDirectoriesPerFile=await Promise.all(t),this.fileDirectoriesPerFile}async getImage(t=0){await this.getImageCount(),await this.parseFileDirectoriesPerFile();let e=0,r=0;for(let n=0;nt.getImageCount()));return this.imageCounts=await Promise.all(t),this.imageCount=this.imageCounts.reduce((t,e)=>t+e,0),this.imageCount}}async function Ct(t,e={}){return Tt.fromSource(ot(t,e))}async function Pt(t){return Tt.fromSource(function(t){return{fetch:async(e,r)=>t.slice(e,e+r)}}(t))}async function It(t){return Tt.fromSource(st(t))}async function Rt(t){return Tt.fromSource((e=t,{fetch:async(t,r)=>new Promise((n,i)=>{const o=e.slice(t,t+r),s=new FileReader;s.onload=t=>n(t.target.result),s.onerror=i,s.readAsArrayBuffer(o)})}));var e}async function jt(t,e=[],r={}){const n=await Tt.fromSource(ot(t,r)),i=await Promise.all(e.map(t=>Tt.fromSource(ot(t,r))));return new Ot(n,i)}async function Mt(t,e){return bt(t,e)}},function(t,e,r){function n(t,e){"use strict";var r=(e=e||{}).pos||0,i="<".charCodeAt(0),o=">".charCodeAt(0),s="-".charCodeAt(0),a="/".charCodeAt(0),u="!".charCodeAt(0),c="'".charCodeAt(0),l='"'.charCodeAt(0);function f(){for(var e=[];t[r];)if(t.charCodeAt(r)==i){if(t.charCodeAt(r+1)===a)return(r=t.indexOf(">",r))+1&&(r+=1),e;if(t.charCodeAt(r+1)===u){if(t.charCodeAt(r+2)==s){for(;-1!==r&&(t.charCodeAt(r)!==o||t.charCodeAt(r-1)!=s||t.charCodeAt(r-2)!=s||-1==r);)r=t.indexOf(">",r+1);-1===r&&(r=t.length)}else for(r+=2;t.charCodeAt(r)!==o&&t[r];)r++;r++;continue}var n=y();e.push(n)}else{var c=h();c.trim().length>0&&e.push(c),r++}return e}function h(){var e=r;return-2===(r=t.indexOf("<",r)-1)&&(r=t.length),t.slice(e,r+1)}function d(){for(var e=r;-1==="\n\t>/= ".indexOf(t[r])&&t[r];)r++;return t.slice(e,r)}var p=e.noChildNodes||["img","br","input","meta","link"];function y(){r++;const e=d(),n={};let i=[];for(;t.charCodeAt(r)!==o&&t[r];){var s=t.charCodeAt(r);if(s>64&&s<91||s>96&&s<123){for(var u=d(),h=t.charCodeAt(r);h&&h!==c&&h!==l&&!(h>64&&h<91||h>96&&h<123)&&h!==o;)r++,h=t.charCodeAt(r);if(h===c||h===l){var y=g();if(-1===r)return{tagName:e,attributes:n,children:i}}else y=null,r--;n[u]=y}r++}if(t.charCodeAt(r-1)!==a)if("script"==e){var m=r+1;r=t.indexOf("<\/script>",r),i=[t.slice(m,r-1)],r+=9}else if("style"==e){m=r+1;r=t.indexOf("",r),i=[t.slice(m,r-1)],r+=8}else-1==p.indexOf(e)&&(r++,i=f());else r++;return{tagName:e,attributes:n,children:i}}function g(){var e=t[r],n=++r;return r=t.indexOf(e,n),t.slice(n,r)}var m,b=null;if(void 0!==e.attrValue){e.attrName=e.attrName||"id";for(b=[];-1!==(m=void 0,m=new RegExp("\\s"+e.attrName+"\\s*=['\"]"+e.attrValue+"['\"]").exec(t),r=m?m.index:-1);)-1!==(r=t.lastIndexOf("<",r))&&b.push(y()),t=t.substr(r),r=0}else b=e.parseNode?y():f();return e.filter&&(b=n.filter(b,e.filter)),e.setPos&&(b.pos=r),b}n.simplify=function(t){var e={};if(!t.length)return"";if(1===t.length&&"string"==typeof t[0])return t[0];for(var r in t.forEach((function(t){if("object"==typeof t){e[t.tagName]||(e[t.tagName]=[]);var r=n.simplify(t.children||[]);e[t.tagName].push(r),t.attributes&&(r._attributes=t.attributes)}})),e)1==e[r].length&&(e[r]=e[r][0]);return e},n.filter=function(t,e){var r=[];return t.forEach((function(t){if("object"==typeof t&&e(t)&&r.push(t),t.children){var i=n.filter(t.children,e);r=r.concat(i)}})),r},n.stringify=function(t){var e="";function r(t){if(t)for(var r=0;r"}return r(t),e},n.toContentString=function(t){if(Array.isArray(t)){var e="";return t.forEach((function(t){e=(e+=" "+n.toContentString(t)).trim()})),e}return"object"==typeof t?n.toContentString(t.children):" "+t},n.getElementById=function(t,e,r){var i=n(t,{attrValue:e});return r?n.simplify(i):i[0]},n.getElementsByClassName=function(t,e,r){const i=n(t,{attrName:"class",attrValue:"[a-zA-Z0-9-s ]*"+e+"[a-zA-Z0-9-s ]*"});return r?n.simplify(i):i},n.parseStream=function(t,e){if("string"==typeof e&&(e=e.length+2),"string"==typeof t){var i=r(25);t=i.createReadStream(t,{start:e}),e=0}var o=e,s="";return t.on("data",(function(e){s+=e;for(var r=0;;){if(!(o=s.indexOf("<",o)+1))return void(o=r);if("/"!==s[o+1]){var i=n(s,{pos:o-1,parseNode:!0,setPos:!0});if((o=i.pos)>s.length-1||oo.length-1||i=0&&e.windowBits<16&&(e.windowBits=-e.windowBits,0===e.windowBits&&(e.windowBits=-15)),!(e.windowBits>=0&&e.windowBits<16)||t&&t.windowBits||(e.windowBits+=32),e.windowBits>15&&e.windowBits<48&&0==(15&e.windowBits)&&(e.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new u,this.strm.avail_out=0;var r=n.inflateInit2(this.strm,e.windowBits);if(r!==s.Z_OK)throw new Error(a[r]);if(this.header=new c,n.inflateGetHeader(this.strm,this.header),e.dictionary&&("string"==typeof e.dictionary?e.dictionary=o.string2buf(e.dictionary):"[object ArrayBuffer]"===l.call(e.dictionary)&&(e.dictionary=new Uint8Array(e.dictionary)),e.raw&&(r=n.inflateSetDictionary(this.strm,e.dictionary))!==s.Z_OK))throw new Error(a[r])}function h(t,e){var r=new f(e);if(r.push(t,!0),r.err)throw r.msg||a[r.err];return r.result}f.prototype.push=function(t,e){var r,a,u,c,f,h=this.strm,d=this.options.chunkSize,p=this.options.dictionary,y=!1;if(this.ended)return!1;a=e===~~e?e:!0===e?s.Z_FINISH:s.Z_NO_FLUSH,"string"==typeof t?h.input=o.binstring2buf(t):"[object ArrayBuffer]"===l.call(t)?h.input=new Uint8Array(t):h.input=t,h.next_in=0,h.avail_in=h.input.length;do{if(0===h.avail_out&&(h.output=new i.Buf8(d),h.next_out=0,h.avail_out=d),(r=n.inflate(h,s.Z_NO_FLUSH))===s.Z_NEED_DICT&&p&&(r=n.inflateSetDictionary(this.strm,p)),r===s.Z_BUF_ERROR&&!0===y&&(r=s.Z_OK,y=!1),r!==s.Z_STREAM_END&&r!==s.Z_OK)return this.onEnd(r),this.ended=!0,!1;h.next_out&&(0!==h.avail_out&&r!==s.Z_STREAM_END&&(0!==h.avail_in||a!==s.Z_FINISH&&a!==s.Z_SYNC_FLUSH)||("string"===this.options.to?(u=o.utf8border(h.output,h.next_out),c=h.next_out-u,f=o.buf2string(h.output,u),h.next_out=c,h.avail_out=d-c,c&&i.arraySet(h.output,h.output,u,c,0),this.onData(f)):this.onData(i.shrinkBuf(h.output,h.next_out)))),0===h.avail_in&&0===h.avail_out&&(y=!0)}while((h.avail_in>0||0===h.avail_out)&&r!==s.Z_STREAM_END);return r===s.Z_STREAM_END&&(a=s.Z_FINISH),a===s.Z_FINISH?(r=n.inflateEnd(this.strm),this.onEnd(r),this.ended=!0,r===s.Z_OK):a!==s.Z_SYNC_FLUSH||(this.onEnd(s.Z_OK),h.avail_out=0,!0)},f.prototype.onData=function(t){this.chunks.push(t)},f.prototype.onEnd=function(t){t===s.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},e.Inflate=f,e.inflate=h,e.inflateRaw=function(t,e){return(e=e||{}).raw=!0,h(t,e)},e.ungzip=h},function(t,e,r){"use strict";var n=r(26);class i extends n.a{constructor(){super(t=>(this._observers.add(t),()=>this._observers.delete(t))),this._observers=new Set}next(t){for(const e of this._observers)e.next(t)}error(t){for(const e of this._observers)e.error(t)}complete(){for(const t of this._observers)t.complete()}}e.a=i},function(t,e,r){"use strict";r.d(e,"a",(function(){return i}));const n=()=>{};function i(){let t,e=!1,r=n;return[new Promise(n=>{e?n(t):r=n}),n=>{e=!0,t=n,r(t)}]}},function(t,e,r){"use strict";r.d(e,"a",(function(){return i}));var n=r(2);function i(t){return t&&"object"==typeof t&&t[n.d]}},function(t,e,r){var n=r(40),i=r(39),o=t.exports;for(var s in n)n.hasOwnProperty(s)&&(o[s]=n[s]);function a(t){if("string"==typeof t&&(t=i.parse(t)),t.protocol||(t.protocol="https:"),"https:"!==t.protocol)throw new Error('Protocol "'+t.protocol+'" not supported. Expected "https:"');return t}o.request=function(t,e){return t=a(t),n.request.call(this,t,e)},o.get=function(t,e){return t=a(t),n.get.call(this,t,e)}},function(t,e,r){"use strict";(function(e){var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i=function(){function t(t,e){for(var r=0;r0?s-4:s;for(r=0;r>16&255,u[l++]=e>>8&255,u[l++]=255&e;2===a&&(e=i[t.charCodeAt(r)]<<2|i[t.charCodeAt(r+1)]>>4,u[l++]=255&e);1===a&&(e=i[t.charCodeAt(r)]<<10|i[t.charCodeAt(r+1)]<<4|i[t.charCodeAt(r+2)]>>2,u[l++]=e>>8&255,u[l++]=255&e);return u},e.fromByteArray=function(t){for(var e,r=t.length,i=r%3,o=[],s=0,a=r-i;sa?a:s+16383));1===i?(e=t[r-1],o.push(n[e>>2]+n[e<<4&63]+"==")):2===i&&(e=(t[r-2]<<8)+t[r-1],o.push(n[e>>10]+n[e>>4&63]+n[e<<2&63]+"="));return o.join("")};for(var n=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,u=s.length;a0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function l(t,e,r){for(var i,o,s=[],a=e;a>18&63]+n[o>>12&63]+n[o>>6&63]+n[63&o]);return s.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},function(t,e){ /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */ e.read=function(t,e,r,n,i){var o,s,a=8*i-n-1,u=(1<>1,l=-7,f=r?i-1:0,h=r?-1:1,d=t[e+f];for(f+=h,o=d&(1<<-l)-1,d>>=-l,l+=a;l>0;o=256*o+t[e+f],f+=h,l-=8);for(s=o&(1<<-l)-1,o>>=-l,l+=n;l>0;s=256*s+t[e+f],f+=h,l-=8);if(0===o)o=1-c;else{if(o===u)return s?NaN:1/0*(d?-1:1);s+=Math.pow(2,n),o-=c}return(d?-1:1)*s*Math.pow(2,o-n)},e.write=function(t,e,r,n,i,o){var s,a,u,c=8*o-i-1,l=(1<>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:o-1,p=n?1:-1,y=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=l):(s=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-s))<1&&(s--,u*=2),(e+=s+f>=1?h/u:h*Math.pow(2,1-f))*u>=2&&(s++,u/=2),s+f>=l?(a=0,s=l):s+f>=1?(a=(e*u-1)*Math.pow(2,i),s+=f):(a=e*Math.pow(2,f-1)*Math.pow(2,i),s=0));i>=8;t[r+d]=255&a,d+=p,a/=256,i-=8);for(s=s<0;t[r+d]=255&s,d+=p,s/=256,c-=8);t[r+d-p]|=128*y}},function(t,e){var r="undefined"!=typeof self?self:this,n=function(){function t(){this.fetch=!1,this.DOMException=r.DOMException}return t.prototype=r,new t}();!function(t){!function(e){var r="URLSearchParams"in t,n="Symbol"in t&&"iterator"in Symbol,i="FileReader"in t&&"Blob"in t&&function(){try{return new Blob,!0}catch(t){return!1}}(),o="FormData"in t,s="ArrayBuffer"in t;if(s)var a=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],u=ArrayBuffer.isView||function(t){return t&&a.indexOf(Object.prototype.toString.call(t))>-1};function c(t){if("string"!=typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(t))throw new TypeError("Invalid character in header field name");return t.toLowerCase()}function l(t){return"string"!=typeof t&&(t=String(t)),t}function f(t){var e={next:function(){var e=t.shift();return{done:void 0===e,value:e}}};return n&&(e[Symbol.iterator]=function(){return e}),e}function h(t){this.map={},t instanceof h?t.forEach((function(t,e){this.append(e,t)}),this):Array.isArray(t)?t.forEach((function(t){this.append(t[0],t[1])}),this):t&&Object.getOwnPropertyNames(t).forEach((function(e){this.append(e,t[e])}),this)}function d(t){if(t.bodyUsed)return Promise.reject(new TypeError("Already read"));t.bodyUsed=!0}function p(t){return new Promise((function(e,r){t.onload=function(){e(t.result)},t.onerror=function(){r(t.error)}}))}function y(t){var e=new FileReader,r=p(e);return e.readAsArrayBuffer(t),r}function g(t){if(t.slice)return t.slice(0);var e=new Uint8Array(t.byteLength);return e.set(new Uint8Array(t)),e.buffer}function m(){return this.bodyUsed=!1,this._initBody=function(t){var e;this._bodyInit=t,t?"string"==typeof t?this._bodyText=t:i&&Blob.prototype.isPrototypeOf(t)?this._bodyBlob=t:o&&FormData.prototype.isPrototypeOf(t)?this._bodyFormData=t:r&&URLSearchParams.prototype.isPrototypeOf(t)?this._bodyText=t.toString():s&&i&&((e=t)&&DataView.prototype.isPrototypeOf(e))?(this._bodyArrayBuffer=g(t.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):s&&(ArrayBuffer.prototype.isPrototypeOf(t)||u(t))?this._bodyArrayBuffer=g(t):this._bodyText=t=Object.prototype.toString.call(t):this._bodyText="",this.headers.get("content-type")||("string"==typeof t?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):r&&URLSearchParams.prototype.isPrototypeOf(t)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},i&&(this.blob=function(){var t=d(this);if(t)return t;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?d(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(y)}),this.text=function(){var t,e,r,n=d(this);if(n)return n;if(this._bodyBlob)return t=this._bodyBlob,e=new FileReader,r=p(e),e.readAsText(t),r;if(this._bodyArrayBuffer)return Promise.resolve(function(t){for(var e=new Uint8Array(t),r=new Array(e.length),n=0;n-1?n:r),this.mode=e.mode||this.mode||null,this.signal=e.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&i)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(i)}function w(t){var e=new FormData;return t.trim().split("&").forEach((function(t){if(t){var r=t.split("="),n=r.shift().replace(/\+/g," "),i=r.join("=").replace(/\+/g," ");e.append(decodeURIComponent(n),decodeURIComponent(i))}})),e}function x(t,e){e||(e={}),this.type="default",this.status=void 0===e.status?200:e.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in e?e.statusText:"OK",this.headers=new h(e.headers),this.url=e.url||"",this._initBody(t)}v.prototype.clone=function(){return new v(this,{body:this._bodyInit})},m.call(v.prototype),m.call(x.prototype),x.prototype.clone=function(){return new x(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new h(this.headers),url:this.url})},x.error=function(){var t=new x(null,{status:0,statusText:""});return t.type="error",t};var _=[301,302,303,307,308];x.redirect=function(t,e){if(-1===_.indexOf(e))throw new RangeError("Invalid status code");return new x(null,{status:e,headers:{location:t}})},e.DOMException=t.DOMException;try{new e.DOMException}catch(t){e.DOMException=function(t,e){this.message=t,this.name=e;var r=Error(t);this.stack=r.stack},e.DOMException.prototype=Object.create(Error.prototype),e.DOMException.prototype.constructor=e.DOMException}function S(t,r){return new Promise((function(n,o){var s=new v(t,r);if(s.signal&&s.signal.aborted)return o(new e.DOMException("Aborted","AbortError"));var a=new XMLHttpRequest;function u(){a.abort()}a.onload=function(){var t,e,r={status:a.status,statusText:a.statusText,headers:(t=a.getAllResponseHeaders()||"",e=new h,t.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(t){var r=t.split(":"),n=r.shift().trim();if(n){var i=r.join(":").trim();e.append(n,i)}})),e)};r.url="responseURL"in a?a.responseURL:r.headers.get("X-Request-URL");var i="response"in a?a.response:a.responseText;n(new x(i,r))},a.onerror=function(){o(new TypeError("Network request failed"))},a.ontimeout=function(){o(new TypeError("Network request failed"))},a.onabort=function(){o(new e.DOMException("Aborted","AbortError"))},a.open(s.method,s.url,!0),"include"===s.credentials?a.withCredentials=!0:"omit"===s.credentials&&(a.withCredentials=!1),"responseType"in a&&i&&(a.responseType="blob"),s.headers.forEach((function(t,e){a.setRequestHeader(e,t)})),s.signal&&(s.signal.addEventListener("abort",u),a.onreadystatechange=function(){4===a.readyState&&s.signal.removeEventListener("abort",u)}),a.send(void 0===s._bodyInit?null:s._bodyInit)}))}S.polyfill=!0,t.fetch||(t.fetch=S,t.Headers=h,t.Request=v,t.Response=x),e.Headers=h,e.Request=v,e.Response=x,e.fetch=S,Object.defineProperty(e,"__esModule",{value:!0})}({})}(n),n.fetch.ponyfill=!0,delete n.fetch.polyfill;var i=n;(e=i.fetch).default=i.fetch,e.fetch=i.fetch,e.Headers=i.Headers,e.Request=i.Request,e.Response=i.Response,t.exports=e},function(t,e,r){"use strict";t.exports=function(){return r(112)('!function(t){var e={};function r(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)r.d(n,i,function(e){return t[e]}.bind(null,i));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=106)}([function(t,e,r){"use strict";const n=r(73);t.exports=function(t){return"+"===t[0]&&(t=t.substring(1)),(t=(t=n(t)).replace(/^0+(?=\\d)/,"")).includes(".")&&(t=t.replace(/\\.?0+$/,"")),""===t&&(t="0"),"-0"===t&&(t="0"),t}},function(t,e,r){"use strict";const n=r(4),i=r(0),o=r(15),s=r(32);function a(t,e,r){t=i(t),e=i(e);const a="-"!==t[0],u="-"!==e[0],c=o(t),l=o(e);if(c||l)return a==u?"Infinity":"-Infinity";if("0"===e)throw new Error("[preciso] division by zero");if(""===t||"0"===t)return"0";const f=a!==u?"-":"";return a||(t=n(t)),u||(e=n(e)),f+s(t,e,r)}t.exports=a,t.exports.default=a},function(t,e,r){"use strict";r.d(e,"a",(function(){return n})),r.d(e,"b",(function(){return i})),r.d(e,"c",(function(){return o})),r.d(e,"d",(function(){return s})),r.d(e,"e",(function(){return a}));const n=Symbol("thread.errors"),i=Symbol("thread.events"),o=Symbol("thread.terminate"),s=Symbol("thread.transferable"),a=Symbol("thread.worker")},function(t,e){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(t){"object"==typeof window&&(r=window)}t.exports=r},function(t,e,r){"use strict";const n=r(0);function i(t){return"-"===(t=n(t))[0]?t.substring(1):t}t.exports=i,t.exports.default=i},function(t,e,r){"use strict";function n(t,e){const r=t.length,n=e.length,i=t.indexOf("."),o=e.indexOf("."),s=-1===i?r:i,a=-1===o?n:o,u=s-a;let c=u<0?-1*u:0,l=u<=0?0:u,f=Math.max(s,a)+1+Math.max(r-s,n-a)-1,h=0;for(;ho)return">";if(n":return"-"+s(t,e)}else if(u&&!c)switch(e=e.substring(1),n(t,e)){case"=":return"0";case"<":return"-"+s(e,t);case">":return s(t,e)}}t.exports=u,t.exports.default=u},function(t,e){var r,n,i=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function a(t){if(r===setTimeout)return setTimeout(t,0);if((r===o||!r)&&setTimeout)return r=setTimeout,setTimeout(t,0);try{return r(t,0)}catch(e){try{return r.call(null,t,0)}catch(e){return r.call(this,t,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:o}catch(t){r=o}try{n="function"==typeof clearTimeout?clearTimeout:s}catch(t){n=s}}();var u,c=[],l=!1,f=-1;function h(){l&&u&&(l=!1,u.length?c=u.concat(c):f=-1,c.length&&d())}function d(){if(!l){var t=a(h);l=!0;for(var e=c.length;e;){for(u=c,c=[];++f1)for(var r=1;r0){for(;m>p-f;){const r=t[m-h]||"0",n=e[m-d]||"0";let i=Number(r)+Number(n)+g;i>=10?(i-=10,g=1):g=0,""===y&&0===i||(y=i+y),m--}y&&(y="."+y),m--}if(l>0)for(;m>=0;){const r=t[m-h]||"0",n=e[m-d]||"0";let i=Number(r)+Number(n)+g;i>=10?(i-=10,g=1):g=0,y=i+y,m--}return 1===g&&(y=g+y),"."===y[0]&&(y="0"+y),y}t.exports=i,t.exports.default=i},function(t,e,r){"use strict";(function(t){\n/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\nvar n=r(108),i=r(109),o=r(61);function s(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(t,e){if(s()=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|t}function p(t,e){if(u.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var r=t.length;if(0===r)return 0;for(var n=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return B(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return G(t).length;default:if(n)return B(t).length;e=(""+e).toLowerCase(),n=!0}}function y(t,e,r){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return O(this,e,r);case"utf8":case"utf-8":return k(this,e,r);case"ascii":return T(this,e,r);case"latin1":case"binary":return C(this,e,r);case"base64":return E(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function g(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function m(t,e,r,n,i){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return-1;r=t.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof e&&(e=u.from(e,n)),u.isBuffer(e))return 0===e.length?-1:b(t,e,r,n,i);if("number"==typeof e)return e&=255,u.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):b(t,[e],r,n,i);throw new TypeError("val must be string, number or Buffer")}function b(t,e,r,n,i){var o,s=1,a=t.length,u=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;s=2,a/=2,u/=2,r/=2}function c(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(i){var l=-1;for(o=r;oa&&(r=a-u),o=r;o>=0;o--){for(var f=!0,h=0;hi&&(n=i):n=i;var o=e.length;if(o%2!=0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var s=0;s>8,i=r%256,o.push(i),o.push(n);return o}(e,t.length-r),t,r,n)}function E(t,e,r){return 0===e&&r===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,r))}function k(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;i239?4:c>223?3:c>191?2:1;if(i+f<=r)switch(f){case 1:c<128&&(l=c);break;case 2:128==(192&(o=t[i+1]))&&(u=(31&c)<<6|63&o)>127&&(l=u);break;case 3:o=t[i+1],s=t[i+2],128==(192&o)&&128==(192&s)&&(u=(15&c)<<12|(63&o)<<6|63&s)>2047&&(u<55296||u>57343)&&(l=u);break;case 4:o=t[i+1],s=t[i+2],a=t[i+3],128==(192&o)&&128==(192&s)&&128==(192&a)&&(u=(15&c)<<18|(63&o)<<12|(63&s)<<6|63&a)>65535&&u<1114112&&(l=u)}null===l?(l=65533,f=1):l>65535&&(l-=65536,n.push(l>>>10&1023|55296),l=56320|1023&l),n.push(l),i+=f}return function(t){var e=t.length;if(e<=4096)return String.fromCharCode.apply(String,t);var r="",n=0;for(;n0&&(t=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(t+=" ... ")),""},u.prototype.compare=function(t,e,r,n,i){if(!u.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),e<0||r>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&e>=r)return 0;if(n>=i)return-1;if(e>=r)return 1;if(this===t)return 0;for(var o=(i>>>=0)-(n>>>=0),s=(r>>>=0)-(e>>>=0),a=Math.min(o,s),c=this.slice(n,i),l=t.slice(e,r),f=0;fi)&&(r=i),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return v(this,t,e,r);case"utf8":case"utf-8":return w(this,t,e,r);case"ascii":return x(this,t,e,r);case"latin1":case"binary":return _(this,t,e,r);case"base64":return S(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,t,e,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function T(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;in)&&(r=n);for(var i="",o=e;or)throw new RangeError("Trying to access beyond buffer length")}function R(t,e,r,n,i,o){if(!u.isBuffer(t))throw new TypeError(\'"buffer" argument must be a Buffer instance\');if(e>i||et.length)throw new RangeError("Index out of range")}function j(t,e,r,n){e<0&&(e=65535+e+1);for(var i=0,o=Math.min(t.length-r,2);i>>8*(n?i:1-i)}function M(t,e,r,n){e<0&&(e=4294967295+e+1);for(var i=0,o=Math.min(t.length-r,4);i>>8*(n?i:3-i)&255}function L(t,e,r,n,i,o){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function F(t,e,r,n,o){return o||L(t,0,r,4),i.write(t,e,r,n,23,4),r+4}function N(t,e,r,n,o){return o||L(t,0,r,8),i.write(t,e,r,n,52,8),r+8}u.prototype.slice=function(t,e){var r,n=this.length;if((t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(e=void 0===e?n:~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),e0&&(i*=256);)n+=this[t+--e]*i;return n},u.prototype.readUInt8=function(t,e){return e||P(t,1,this.length),this[t]},u.prototype.readUInt16LE=function(t,e){return e||P(t,2,this.length),this[t]|this[t+1]<<8},u.prototype.readUInt16BE=function(t,e){return e||P(t,2,this.length),this[t]<<8|this[t+1]},u.prototype.readUInt32LE=function(t,e){return e||P(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},u.prototype.readUInt32BE=function(t,e){return e||P(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},u.prototype.readIntLE=function(t,e,r){t|=0,e|=0,r||P(t,e,this.length);for(var n=this[t],i=1,o=0;++o=(i*=128)&&(n-=Math.pow(2,8*e)),n},u.prototype.readIntBE=function(t,e,r){t|=0,e|=0,r||P(t,e,this.length);for(var n=e,i=1,o=this[t+--n];n>0&&(i*=256);)o+=this[t+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*e)),o},u.prototype.readInt8=function(t,e){return e||P(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},u.prototype.readInt16LE=function(t,e){e||P(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt16BE=function(t,e){e||P(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt32LE=function(t,e){return e||P(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},u.prototype.readInt32BE=function(t,e){return e||P(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},u.prototype.readFloatLE=function(t,e){return e||P(t,4,this.length),i.read(this,t,!0,23,4)},u.prototype.readFloatBE=function(t,e){return e||P(t,4,this.length),i.read(this,t,!1,23,4)},u.prototype.readDoubleLE=function(t,e){return e||P(t,8,this.length),i.read(this,t,!0,52,8)},u.prototype.readDoubleBE=function(t,e){return e||P(t,8,this.length),i.read(this,t,!1,52,8)},u.prototype.writeUIntLE=function(t,e,r,n){(t=+t,e|=0,r|=0,n)||R(this,t,e,r,Math.pow(2,8*r)-1,0);var i=1,o=0;for(this[e]=255&t;++o=0&&(o*=256);)this[e+i]=t/o&255;return e+r},u.prototype.writeUInt8=function(t,e,r){return t=+t,e|=0,r||R(this,t,e,1,255,0),u.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},u.prototype.writeUInt16LE=function(t,e,r){return t=+t,e|=0,r||R(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):j(this,t,e,!0),e+2},u.prototype.writeUInt16BE=function(t,e,r){return t=+t,e|=0,r||R(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):j(this,t,e,!1),e+2},u.prototype.writeUInt32LE=function(t,e,r){return t=+t,e|=0,r||R(this,t,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):M(this,t,e,!0),e+4},u.prototype.writeUInt32BE=function(t,e,r){return t=+t,e|=0,r||R(this,t,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):M(this,t,e,!1),e+4},u.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e|=0,!n){var i=Math.pow(2,8*r-1);R(this,t,e,r,i-1,-i)}var o=0,s=1,a=0;for(this[e]=255&t;++o>0)-a&255;return e+r},u.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e|=0,!n){var i=Math.pow(2,8*r-1);R(this,t,e,r,i-1,-i)}var o=r-1,s=1,a=0;for(this[e+o]=255&t;--o>=0&&(s*=256);)t<0&&0===a&&0!==this[e+o+1]&&(a=1),this[e+o]=(t/s>>0)-a&255;return e+r},u.prototype.writeInt8=function(t,e,r){return t=+t,e|=0,r||R(this,t,e,1,127,-128),u.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},u.prototype.writeInt16LE=function(t,e,r){return t=+t,e|=0,r||R(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):j(this,t,e,!0),e+2},u.prototype.writeInt16BE=function(t,e,r){return t=+t,e|=0,r||R(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):j(this,t,e,!1),e+2},u.prototype.writeInt32LE=function(t,e,r){return t=+t,e|=0,r||R(this,t,e,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):M(this,t,e,!0),e+4},u.prototype.writeInt32BE=function(t,e,r){return t=+t,e|=0,r||R(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):M(this,t,e,!1),e+4},u.prototype.writeFloatLE=function(t,e,r){return F(this,t,e,!0,r)},u.prototype.writeFloatBE=function(t,e,r){return F(this,t,e,!1,r)},u.prototype.writeDoubleLE=function(t,e,r){return N(this,t,e,!0,r)},u.prototype.writeDoubleBE=function(t,e,r){return N(this,t,e,!1,r)},u.prototype.copy=function(t,e,r,n){if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e=0;--i)t[i+e]=this[i+r];else if(o<1e3||!u.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(o=e;o55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(s+1===n){(e-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;o.push(r)}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function G(t){return n.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\\s+|\\s+$/g,"")}(t).replace(D,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function q(t,e,r,n){for(var i=0;i=e.length||i>=t.length);++i)e[i+r]=t[i];return i}}).call(this,r(3))},function(t,e){"function"==typeof Object.create?t.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(t,e){if(e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}}},function(t,e,r){"use strict";function n(t){return/^[-+]?0(\\.0+)?(e[\\.\\d]+)?$/.test(t)}t.exports=n,t.exports.default=n},function(t,e,r){(function(n){e.formatArgs=function(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+t.exports.humanize(this.diff),!this.useColors)return;const r="color: "+this.color;e.splice(1,0,r,"color: inherit");let n=0,i=0;e[0].replace(/%[a-zA-Z%]/g,t=>{"%%"!==t&&(n++,"%c"===t&&(i=n))}),e.splice(i,0,r)},e.save=function(t){try{t?e.storage.setItem("debug",t):e.storage.removeItem("debug")}catch(t){}},e.load=function(){let t;try{t=e.storage.getItem("debug")}catch(t){}!t&&void 0!==n&&"env"in n&&(t=n.env.DEBUG);return t},e.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\\/(\\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/)},e.storage=function(){try{return localStorage}catch(t){}}(),e.destroy=(()=>{let t=!1;return()=>{t||(t=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),e.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],e.log=console.debug||console.log||(()=>{}),t.exports=r(129)(e);const{formatters:i}=t.exports;i.j=function(t){try{return JSON.stringify(t)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}}).call(this,r(7))},function(t,e,r){"use strict";r.d(e,"a",(function(){return o})),r.d(e,"b",(function(){return s}));const n={deserialize:t=>Object.assign(Error(t.message),{name:t.name,stack:t.stack}),serialize:t=>({__error_marker:"$$error",message:t.message,name:t.name,stack:t.stack})};let i={deserialize(t){return(e=t)&&"object"==typeof e&&"__error_marker"in e&&"$$error"===e.__error_marker?n.deserialize(t):t;var e},serialize:t=>t instanceof Error?n.serialize(t):t};function o(t){return i.deserialize(t)}function s(t){return i.serialize(t)}},function(t,e,r){"use strict";var n=r(28),i=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};t.exports=f;var o=Object.create(r(21));o.inherits=r(10);var s=r(60),a=r(65);o.inherits(f,s);for(var u=i(a.prototype),c=0;c/^[a-zA-Z][a-zA-Z\\d+\\-.]*:/.test(t);function a(t){const e=new Blob([t],{type:"application/javascript"});return URL.createObjectURL(e)}let u;function c(){return u||(u=function(){if("undefined"==typeof Worker)return class{constructor(){throw Error("No web worker implementation available. You might have tried to spawn a worker within a worker in a browser that doesn\'t support workers in workers.")}};class t extends Worker{constructor(t,e){var r,n;"string"==typeof t&&e&&e._baseURL?t=new URL(t,e._baseURL):"string"==typeof t&&!s(t)&&i().match(/^file:\\/\\//i)&&(t=new URL(t,i().replace(/\\/[^\\/]+$/,"/")),(null===(r=null==e?void 0:e.CORSWorkaround)||void 0===r||r)&&(t=a(`importScripts(${JSON.stringify(t)});`))),"string"==typeof t&&s(t)&&(null===(n=null==e?void 0:e.CORSWorkaround)||void 0===n||n)&&(t=a(`importScripts(${JSON.stringify(t)});`)),super(t,e)}}class e extends t{constructor(t,e){super(window.URL.createObjectURL(t),e)}static fromText(t,r){const n=new window.Blob([t],{type:"text/javascript"});return new e(n,r)}}return{blob:e,default:t}}()),u}},function(t,e,r){"use strict";var n,i;r.d(e,"a",(function(){return n})),r.d(e,"b",(function(){return i})),function(t){t.cancel="cancel",t.run="run"}(n||(n={})),function(t){t.error="error",t.init="init",t.result="result",t.running="running",t.uncaughtError="uncaughtError"}(i||(i={}))},function(t,e,r){function n(t){return Object.prototype.toString.call(t)}e.isArray=function(t){return Array.isArray?Array.isArray(t):"[object Array]"===n(t)},e.isBoolean=function(t){return"boolean"==typeof t},e.isNull=function(t){return null===t},e.isNullOrUndefined=function(t){return null==t},e.isNumber=function(t){return"number"==typeof t},e.isString=function(t){return"string"==typeof t},e.isSymbol=function(t){return"symbol"==typeof t},e.isUndefined=function(t){return void 0===t},e.isRegExp=function(t){return"[object RegExp]"===n(t)},e.isObject=function(t){return"object"==typeof t&&null!==t},e.isDate=function(t){return"[object Date]"===n(t)},e.isError=function(t){return"[object Error]"===n(t)||t instanceof Error},e.isFunction=function(t){return"function"==typeof t},e.isPrimitive=function(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t},e.isBuffer=r(9).Buffer.isBuffer},function(t,e,r){"use strict";const n=r(11),i=r(50);function o(t){return n(t)?"":i(t)}t.exports=o,t.exports.default=o},function(t,e,r){"use strict";const n=r(35);function i(t,e){return n(t,"2",e)}t.exports=i,t.exports.default=i},function(t,e,r){"use strict";r.d(e,"a",(function(){return o}));var n=r(2);function i(t){throw Error(t)}const o={errors:t=>t[n.a]||i("Error observable not found. Make sure to pass a thread instance as returned by the spawn() promise."),events:t=>t[n.b]||i("Events observable not found. Make sure to pass a thread instance as returned by the spawn() promise."),terminate:t=>t[n.c]()}},function(t,e){},function(t,e,r){"use strict";const n=()=>"function"==typeof Symbol,i=t=>n()&&Boolean(Symbol[t]),o=t=>i(t)?Symbol[t]:"@@"+t;i("asyncIterator")||(Symbol.asyncIterator=Symbol.asyncIterator||Symbol.for("Symbol.asyncIterator"));const s=o("iterator"),a=o("observable"),u=o("species");function c(t,e){const r=t[e];if(null!=r){if("function"!=typeof r)throw new TypeError(r+" is not a function");return r}}function l(t){let e=t.constructor;return void 0!==e&&(e=e[u],null===e&&(e=void 0)),void 0!==e?e:v}function f(t){f.log?f.log(t):setTimeout(()=>{throw t},0)}function h(t){Promise.resolve().then(()=>{try{t()}catch(t){f(t)}})}function d(t){const e=t._cleanup;if(void 0!==e&&(t._cleanup=void 0,e))try{if("function"==typeof e)e();else{const t=c(e,"unsubscribe");t&&t.call(e)}}catch(t){f(t)}}function p(t){t._observer=void 0,t._queue=void 0,t._state="closed"}function y(t,e,r){t._state="running";const n=t._observer;try{const i=n?c(n,e):void 0;switch(e){case"next":i&&i.call(n,r);break;case"error":if(p(t),!i)throw r;i.call(n,r);break;case"complete":p(t),i&&i.call(n)}}catch(t){f(t)}"closed"===t._state?d(t):"running"===t._state&&(t._state="ready")}function g(t,e,r){if("closed"!==t._state)return"buffering"===t._state?(t._queue=t._queue||[],void t._queue.push({type:e,value:r})):"ready"!==t._state?(t._state="buffering",t._queue=[{type:e,value:r}],void h(()=>function(t){const e=t._queue;if(e){t._queue=void 0,t._state="ready";for(const r of e)if(y(t,r.type,r.value),"closed"===t._state)break}}(t))):void y(t,e,r)}class m{constructor(t,e){this._cleanup=void 0,this._observer=t,this._queue=void 0,this._state="initializing";const r=new b(this);try{this._cleanup=e.call(void 0,r)}catch(t){r.error(t)}"initializing"===this._state&&(this._state="ready")}get closed(){return"closed"===this._state}unsubscribe(){"closed"!==this._state&&(p(this),d(this))}}class b{constructor(t){this._subscription=t}get closed(){return"closed"===this._subscription._state}next(t){g(this._subscription,"next",t)}error(t){g(this._subscription,"error",t)}complete(){g(this._subscription,"complete")}}class v{constructor(t){if(!(this instanceof v))throw new TypeError("Observable cannot be called as a function");if("function"!=typeof t)throw new TypeError("Observable initializer must be a function");this._subscriber=t}subscribe(t,e,r){return"object"==typeof t&&null!==t||(t={next:t,error:e,complete:r}),new m(t,this._subscriber)}pipe(t,...e){let r=this;for(const n of[t,...e])r=n(r);return r}tap(t,e,r){const n="object"!=typeof t||null===t?{next:t,error:e,complete:r}:t;return new v(t=>this.subscribe({next(e){n.next&&n.next(e),t.next(e)},error(e){n.error&&n.error(e),t.error(e)},complete(){n.complete&&n.complete(),t.complete()},start(t){n.start&&n.start(t)}}))}forEach(t){return new Promise((e,r)=>{if("function"!=typeof t)return void r(new TypeError(t+" is not a function"));function n(){i.unsubscribe(),e(void 0)}const i=this.subscribe({next(e){try{t(e,n)}catch(t){r(t),i.unsubscribe()}},error(t){r(t)},complete(){e(void 0)}})})}map(t){if("function"!=typeof t)throw new TypeError(t+" is not a function");return new(l(this))(e=>this.subscribe({next(r){let n=r;try{n=t(r)}catch(t){return e.error(t)}e.next(n)},error(t){e.error(t)},complete(){e.complete()}}))}filter(t){if("function"!=typeof t)throw new TypeError(t+" is not a function");return new(l(this))(e=>this.subscribe({next(r){try{if(!t(r))return}catch(t){return e.error(t)}e.next(r)},error(t){e.error(t)},complete(){e.complete()}}))}reduce(t,e){if("function"!=typeof t)throw new TypeError(t+" is not a function");const r=l(this),n=arguments.length>1;let i=!1,o=e;return new r(e=>this.subscribe({next(r){const s=!i;if(i=!0,!s||n)try{o=t(o,r)}catch(t){return e.error(t)}else o=r},error(t){e.error(t)},complete(){if(!i&&!n)return e.error(new TypeError("Cannot reduce an empty sequence"));e.next(o),e.complete()}}))}concat(...t){const e=l(this);return new e(r=>{let n,i=0;return function o(s){n=s.subscribe({next(t){r.next(t)},error(t){r.error(t)},complete(){i===t.length?(n=void 0,r.complete()):o(e.from(t[i++]))}})}(this),()=>{n&&(n.unsubscribe(),n=void 0)}})}flatMap(t){if("function"!=typeof t)throw new TypeError(t+" is not a function");const e=l(this);return new e(r=>{const n=[],i=this.subscribe({next(i){let s;if(t)try{s=t(i)}catch(t){return r.error(t)}else s=i;const a=e.from(s).subscribe({next(t){r.next(t)},error(t){r.error(t)},complete(){const t=n.indexOf(a);t>=0&&n.splice(t,1),o()}});n.push(a)},error(t){r.error(t)},complete(){o()}});function o(){i.closed&&0===n.length&&r.complete()}return()=>{n.forEach(t=>t.unsubscribe()),i.unsubscribe()}})}[(Symbol.observable,a)](){return this}static from(t){const e="function"==typeof this?this:v;if(null==t)throw new TypeError(t+" is not an object");const r=c(t,a);if(r){const n=r.call(t);if(Object(n)!==n)throw new TypeError(n+" is not an object");return function(t){return t instanceof v}(n)&&n.constructor===e?n:new e(t=>n.subscribe(t))}if(i("iterator")){const r=c(t,s);if(r)return new e(e=>{h(()=>{if(!e.closed){for(const n of r.call(t))if(e.next(n),e.closed)return;e.complete()}})})}if(Array.isArray(t))return new e(e=>{h(()=>{if(!e.closed){for(const r of t)if(e.next(r),e.closed)return;e.complete()}})});throw new TypeError(t+" is not observable")}static of(...t){return new("function"==typeof this?this:v)(e=>{h(()=>{if(!e.closed){for(const r of t)if(e.next(r),e.closed)return;e.complete()}})})}static get[u](){return this}}n()&&Object.defineProperty(v,Symbol("extensions"),{value:{symbol:a,hostReportError:f},configurable:!0});e.a=v},function(t,e,r){"use strict";var n;r.d(e,"a",(function(){return n})),function(t){t.internalError="internalError",t.message="message",t.termination="termination"}(n||(n={}))},function(t,e,r){"use strict";(function(e){void 0===e||!e.version||0===e.version.indexOf("v0.")||0===e.version.indexOf("v1.")&&0!==e.version.indexOf("v1.8.")?t.exports={nextTick:function(t,r,n,i){if("function"!=typeof t)throw new TypeError(\'"callback" argument must be a function\');var o,s,a=arguments.length;switch(a){case 0:case 1:return e.nextTick(t);case 2:return e.nextTick((function(){t.call(null,r)}));case 3:return e.nextTick((function(){t.call(null,r,n)}));case 4:return e.nextTick((function(){t.call(null,r,n,i)}));default:for(o=new Array(a-1),s=0;s0){for(;m>p-f;){let r=t[m-h]||"0",n=e[m-d]||"0";r-=g,g=0;let i=r-n;if(i<0)for(;i<0;)g++,i+=10;else g&&g--;""===y&&0===i||(y=i+y),m--}""!==y&&(y="."+y),m--}if(l>0){for(;m>0;){let r=t[m-h]||"0",n=e[m-d]||"0";r-=g,g=0;let i=r-n;if(i<0)for(;i<0;)g++,i+=10;else g&&g--;y=i+y,m--}const r=t[0-h]||"0",n=e[0-d]||"0";let i=Number(r)-(g>0?1:0)-Number(n);0!==i&&(y=i+y),y=y.replace(/^0+/,"")}return"."===y[0]&&(y="0"+y),y}t.exports=i,t.exports.default=i},function(t,e,r){"use strict";const n=r(5),i=r(6),o=r(33),s=r(49);function a(t,e,{format:r="string",max_decimal_digits:a=100,ellipsis:u=!1}={}){"0"===t[0]&&(t=t.substring(1)),"0"===e[0]&&(e=e.substring(1));const c=t.indexOf("."),l=e.indexOf("."),f=-1===c?t.length:c,h=-1===l?0:e.length-1-l;let d=!1;t=t.replace(/\\./,""),e=e.replace(/\\./,"");const p=t.length;let y,g="",m="",b=-1*h,v=0;for(let r=0;r"===y){let t=1,r=i(e,e),s=e;for(;">"!==n(r,g);)t++,s=r,r=i(r,e);if(t=t.toString(),""!==m)for(let e=t.length;e<=v;e++)m+="0";m+=t,g=o(g,s),v=0}else{if("<"===y){""===m&&b++,v++;continue}if("="===y){if(""!==m)for(let t=0;t3){m+="...",d=!0;break}}else t[g]=1;const r=n(g,e);if(">"===r){let t=1,r=i(e,e),s=e;for(;">"!==n(r,g);)t++,s=r,r=i(r,e);t=t.toString();for(let e=t.length;e<=v;e++)m+="0";if(m+=t,g=o(g,s),"0"===g)break;v=0}else{if("<"===r){v++;continue}if("="===r){for(let t=0;tx){for(let t=x;t0&&(m=s(m.substring(0,m.length-S+1))),"."===m[0]&&(m="0"+m),"object"===r?{quotient:m,extra_decimals:S}:m}t.exports=a,t.exports.default=a},function(t,e,r){"use strict";const n=r(0),i=r(5),o=r(15),s=r(8),a=r(31);function u(t,e,{infinity_minus_infinity:r="NaN"}={}){t=n(t),e=n(e);const u=!("-"===t[0]),c=!("-"===e[0]),l=o(t),f=o(e);if(l&&f){if(u===c)return r;if(u)return"Infinity";if(c)return"-Infinity"}else{if(l)return t;if(f)return c?"-Infinity":"Infinity"}if(u){if(c){const r=i(t,e);return">"===r?a(t,e):"<"===r?"-"+a(e,t):"0"}return s(t,e.substring(1))}if(c)return"-"+s(t.substring(1),e);{t=t.substring(1),e=e.substring(1);const r=i(t,e);return">"===r?"-"+a(t,e):"<"===r?a(e,t):"0"}}t.exports=u,t.exports.default=u},function(t,e,r){"use strict";const n=r(0),i=r(5);function o(t,e){t=n(t),e=n(e);const r="-"!==t[0],o="-"!==e[0];return r?o?i(t,e):">":o?"<":i(e.substring(1),t.substring(1))}t.exports=o,t.exports.default=o},function(t,e,r){"use strict";const n=r(4),i=r(0),o=r(1),s=r(77),a=r(16),u=r(52),c=r(78),l=r(11),f=r(53),h=r(54),d=r(81),p=r(37),y=r(36),g=r(22),m=r(85);function b(t,e,{zero_to_the_power_of_zero:r="1",ellipsis:b=!1,imaginary:v=!0,max_decimal_digits:w=100,fraction:x=!1}={}){t=i(t),e=i(e);const _=v&&u(t);_&&(t=t.replace(/i$/,""));const S=l(t),A=l(e);if(S&&A)return r;if(A)return"1";const E=g(e);if(S){if("+"===E)return"0";if("-"===E)return"Infinity"}const k=a(e);if("+"===E&&k){let r=h(t,e);return"number"==typeof w&&(r=y(r,{digits:w})),_&&c(e)&&(r+="i"),r}if("-"===E&&k){const r="1",i=h(t,n(e));return o(r,i,{ellipsis:b,max_decimal_digits:w})}if(!k){e=n(e);let[r,i]=e.includes("/")?e.split("/"):s(e);[r,i]=m(r,i);let o=p(t,i,{imaginary:v}),a=f(r,o);return"number"==typeof w&&(a=y(a,{digits:w})),"-"===E&&(a=d(a,{fraction:x,max_decimal_digits:w})),a}}t.exports=b,t.exports.default=b},function(t,e,r){"use strict";const n=r(52),i=r(159);function o(t,{digits:e=0}={}){return n(t)?i(t.substring(0,t.length-1),{digits:e})+"i":i(t,{digits:e})}t.exports=o,t.exports.default=o},function(t,e,r){"use strict";const n=r(4),i=r(0),o=r(5),s=r(82),a=r(16),u=r(80),c=r(54),l=r(83);function f(t,e,{imaginary:r=!0,max_decimal_digits:f=100}={}){if(t=i(t),"1"===(e=i(e)))return t;if("1"===t)return"1";if(!a(e))throw new Error("[preciso] can\'t find fractional roots");if(u(e))throw new Error("[preciso] can\'t find root of negative indexes");const h=n(t),d=u(t),p=s(e),y=d&&p;if(y&&!r)throw new Error("[preciso] root has an imaginary number");const g=d&&!p?"-":"",m=l(h,e),b=["9","8","7","6","5","4","3","2","1","0"];let v="";for(let t=0;to)return">";if(n",\'"\',"`"," ","\\r","\\n","\\t"]),c=["\'"].concat(u),l=["%","/","?",";","#"].concat(c),f=["/","?","#"],h=/^[+a-z0-9A-Z_-]{0,63}$/,d=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,p={javascript:!0,"javascript:":!0},y={javascript:!0,"javascript:":!0},g={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},m=r(137);function b(t,e,r){if(t&&"object"==typeof t&&t instanceof i)return t;var n=new i;return n.parse(t,e,r),n}i.prototype.parse=function(t,e,r){if("string"!=typeof t)throw new TypeError("Parameter \'url\' must be a string, not "+typeof t);var i=t.indexOf("?"),s=-1!==i&&i127?R+="x":R+=P[j];if(!R.match(h)){var L=O.slice(0,k),F=O.slice(k+1),N=P.match(d);N&&(L.push(N[1]),F.unshift(N[2])),F.length&&(b="/"+F.join(".")+b),this.hostname=L.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),C||(this.hostname=n.toASCII(this.hostname));var D=this.port?":"+this.port:"",U=this.hostname||"";this.host=U+D,this.href+=this.host,C&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==b[0]&&(b="/"+b))}if(!p[x])for(k=0,I=c.length;k0)&&r.host.split("@"))&&(r.auth=C.shift(),r.hostname=C.shift(),r.host=r.hostname);return r.search=t.search,r.query=t.query,null===r.pathname&&null===r.search||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r}if(!_.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var A=_.slice(-1)[0],E=(r.host||t.host||_.length>1)&&("."===A||".."===A)||""===A,k=0,T=_.length;T>=0;T--)"."===(A=_[T])?_.splice(T,1):".."===A?(_.splice(T,1),k++):k&&(_.splice(T,1),k--);if(!w&&!x)for(;k--;k)_.unshift("..");!w||""===_[0]||_[0]&&"/"===_[0].charAt(0)||_.unshift(""),E&&"/"!==_.join("/").substr(-1)&&_.push("");var C,O=""===_[0]||_[0]&&"/"===_[0].charAt(0);S&&(r.hostname=O?"":_.length?_.shift():"",r.host=r.hostname,(C=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=C.shift(),r.hostname=C.shift(),r.host=r.hostname));return(w=w||r.host&&_.length)&&!O&&_.unshift(""),_.length>0?r.pathname=_.join("/"):(r.pathname=null,r.path=null),null===r.pathname&&null===r.search||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=t.auth||r.auth,r.slashes=r.slashes||t.slashes,r.href=r.format(),r},i.prototype.parseHost=function(){var t=this.host,e=s.exec(t);e&&(":"!==(e=e[0])&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)},e.parse=b,e.resolve=function(t,e){return b(t,!1,!0).resolve(e)},e.resolveObject=function(t,e){return t?b(t,!1,!0).resolveObject(e):e},e.format=function(t){return"string"==typeof t&&(t=b(t)),t instanceof i?t.format():i.prototype.format.call(t)},e.Url=i},function(t,e,r){(function(t){var n=r(131),i=r(70),o=r(133),s=r(134),a=r(39),u=e;u.request=function(e,r){e="string"==typeof e?a.parse(e):o(e);var i=-1===t.location.protocol.search(/^https?:$/)?"http:":"",s=e.protocol||i,u=e.hostname||e.host,c=e.port,l=e.path||"/";u&&-1!==u.indexOf(":")&&(u="["+u+"]"),e.url=(u?s+"//"+u:"")+(c?":"+c:"")+l,e.method=(e.method||"GET").toUpperCase(),e.headers=e.headers||{};var f=new n(e);return r&&f.on("response",r),f},u.get=function(t,e){var r=u.request(t,e);return r.end(),r},u.ClientRequest=n,u.IncomingMessage=i.IncomingMessage,u.Agent=function(){},u.Agent.defaultMaxSockets=4,u.globalAgent=new u.Agent,u.STATUS_CODES=s,u.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]}).call(this,r(3))},,function(t,e,r){(e=t.exports=r(60)).Stream=e,e.Readable=e,e.Writable=r(65),e.Duplex=r(14),e.Transform=r(67),e.PassThrough=r(117)},function(t,e,r){var n=r(9),i=n.Buffer;function o(t,e){for(var r in t)e[r]=t[r]}function s(t,e,r){return i(t,e,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=n:(o(n,e),e.Buffer=s),o(i,s),s.from=function(t,e,r){if("number"==typeof t)throw new TypeError("Argument must not be a number");return i(t,e,r)},s.alloc=function(t,e,r){if("number"!=typeof t)throw new TypeError("Argument must be a number");var n=i(t);return void 0!==e?"string"==typeof r?n.fill(e,r):n.fill(e):n.fill(0),n},s.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return i(t)},s.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return n.SlowBuffer(t)}},function(t,e,r){"use strict";var n=SyntaxError,i=Function,o=TypeError,s=function(t){try{return i(\'"use strict"; return (\'+t+").constructor;")()}catch(t){}},a=Object.getOwnPropertyDescriptor;if(a)try{a({},"")}catch(t){a=null}var u=function(){throw new o},c=a?function(){try{return u}catch(t){try{return a(arguments,"callee").get}catch(t){return u}}}():u,l=r(140)(),f=r(142)(),h=Object.getPrototypeOf||(f?function(t){return t.__proto__}:null),d={},p="undefined"!=typeof Uint8Array&&h?h(Uint8Array):void 0,y={"%AggregateError%":"undefined"==typeof AggregateError?void 0:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?void 0:ArrayBuffer,"%ArrayIteratorPrototype%":l&&h?h([][Symbol.iterator]()):void 0,"%AsyncFromSyncIteratorPrototype%":void 0,"%AsyncFunction%":d,"%AsyncGenerator%":d,"%AsyncGeneratorFunction%":d,"%AsyncIteratorPrototype%":d,"%Atomics%":"undefined"==typeof Atomics?void 0:Atomics,"%BigInt%":"undefined"==typeof BigInt?void 0:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?void 0:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?void 0:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?void 0:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":"undefined"==typeof Float32Array?void 0:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?void 0:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?void 0:FinalizationRegistry,"%Function%":i,"%GeneratorFunction%":d,"%Int8Array%":"undefined"==typeof Int8Array?void 0:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?void 0:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?void 0:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":l&&h?h(h([][Symbol.iterator]())):void 0,"%JSON%":"object"==typeof JSON?JSON:void 0,"%Map%":"undefined"==typeof Map?void 0:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&l&&h?h((new Map)[Symbol.iterator]()):void 0,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?void 0:Promise,"%Proxy%":"undefined"==typeof Proxy?void 0:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":"undefined"==typeof Reflect?void 0:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?void 0:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&l&&h?h((new Set)[Symbol.iterator]()):void 0,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?void 0:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":l&&h?h(""[Symbol.iterator]()):void 0,"%Symbol%":l?Symbol:void 0,"%SyntaxError%":n,"%ThrowTypeError%":c,"%TypedArray%":p,"%TypeError%":o,"%Uint8Array%":"undefined"==typeof Uint8Array?void 0:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?void 0:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?void 0:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?void 0:Uint32Array,"%URIError%":URIError,"%WeakMap%":"undefined"==typeof WeakMap?void 0:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?void 0:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?void 0:WeakSet};if(h)try{null.error}catch(t){var g=h(h(t));y["%Error.prototype%"]=g}var m={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},b=r(45),v=r(144),w=b.call(Function.call,Array.prototype.concat),x=b.call(Function.apply,Array.prototype.splice),_=b.call(Function.call,String.prototype.replace),S=b.call(Function.call,String.prototype.slice),A=b.call(Function.call,RegExp.prototype.exec),E=/[^%.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|(["\'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|%$))/g,k=/\\\\(\\\\)?/g,T=function(t){var e=S(t,0,1),r=S(t,-1);if("%"===e&&"%"!==r)throw new n("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==e)throw new n("invalid intrinsic syntax, expected opening `%`");var i=[];return _(t,E,(function(t,e,r,n){i[i.length]=r?_(n,k,"$1"):e||t})),i},C=function(t,e){var r,i=t;if(v(m,i)&&(i="%"+(r=m[i])[0]+"%"),v(y,i)){var a=y[i];if(a===d&&(a=function t(e){var r;if("%AsyncFunction%"===e)r=s("async function () {}");else if("%GeneratorFunction%"===e)r=s("function* () {}");else if("%AsyncGeneratorFunction%"===e)r=s("async function* () {}");else if("%AsyncGenerator%"===e){var n=t("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if("%AsyncIteratorPrototype%"===e){var i=t("%AsyncGenerator%");i&&h&&(r=h(i.prototype))}return y[e]=r,r}(i)),void 0===a&&!e)throw new o("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:r,name:i,value:a}}throw new n("intrinsic "+t+" does not exist!")};t.exports=function(t,e){if("string"!=typeof t||0===t.length)throw new o("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof e)throw new o(\'"allowMissing" argument must be a boolean\');if(null===A(/^%?[^%]*%?$/,t))throw new n("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=T(t),i=r.length>0?r[0]:"",s=C("%"+i+"%",e),u=s.name,c=s.value,l=!1,f=s.alias;f&&(i=f[0],x(r,w([0,1],f)));for(var h=1,d=!0;h=r.length){var b=a(c,p);c=(d=!!b)&&"get"in b&&!("originalValue"in b.get)?b.get:c[p]}else d=v(c,p),c=c[p];d&&!l&&(y[u]=c)}}return c}},function(t,e,r){"use strict";var n=r(143);t.exports=Function.prototype.bind||n},function(t,e,r){"use strict";var n=String.prototype.replace,i=/%20/g,o="RFC1738",s="RFC3986";t.exports={default:s,formatters:{RFC1738:function(t){return n.call(t,i,"+")},RFC3986:function(t){return String(t)}},RFC1738:o,RFC3986:s}},function(t,e,r){"use strict";const n=r(5),i=r(11),o=r(48),s=r(8);function a(t,e,r="1"){if(i(t))return"0";let a=t,u=t;for(;"<"===n(u,e);)u=s(u,r),a=o(a,u);return a}t.exports=a,t.exports.default=a},function(t,e,r){"use strict";const{MAX_SAFE_INTEGER_LENGTH:n}=r(30);function i(t,e){if("0"===t||"0"===e)return"0";const r=t.indexOf("."),i=e.indexOf("."),o=(-1===r?t.length:r)+(-1===i?e.length:i),s=(-1===r?0:t.length-1-r)+(-1===i?0:e.length-1-i);if(0===s&&o=0;){const t=h,e=h-=15,r=a.substring(e,t);f.push([Number(r),r.length])}const d=[],p=[];for(let t=0,e=l-1;e>=0;e--,t++){const r=u[e],n=Number(r);let i=0,o="";const s=f.length-1;f.forEach(([t,e],r)=>{let a=(i+n*t).toString();const u=a.length;if(u>e&&r!==s){const t=-1*e;o=a.slice(t)+o,i=Number(a.slice(0,t))}else{const t=e-u;for(let e=0;eNumber(t)),o.length])}const y=d.length,g=p[p.length-1][1]+y;let m="",b=0;for(let t=0;t=0&&(e+=r[o])}e>=10?(e=e.toString(),m=e[e.length-1]+m,b=Number(e.slice(0,-1))):(m=e+m,b=0)}if(0===s)m=m.replace(/^0+/,"");else{const t=m.length-s;m=m.substring(0,t)+"."+m.substring(t),m=m.replace(/^0+/,""),m=m.replace(/\\.?0+$/,""),"."===m[0]&&(m="0"+m)}return m}t.exports=i,t.exports.default=i},function(t,e,r){"use strict";const n=r(6),i=r(155),o=["5","6","7","8","9"];function s(t){if(t.match(/\\.9+$/))return n(i(t),"1");"+"===t[0]&&(t=t.substring(1));const e=t.length;let r="";const s=t[t.length-1];if(o.includes(s)){let n;for(n=e-2;n>=0;n--){const e=t[n];if("."===e||"-"===e)continue;const i=Number(e)+1;if(10!==i){r=i+r;break}r="0"+r}n>0&&(r=t.substring(0,n)+r)}else r=t.substring(0,e-1);return"."===r[r.length-1]&&(r=r.substring(0,r.length-1)),r.indexOf(".")>-1&&(r=r.replace(/0+$/,"")),r}t.exports=s,t.exports.default=s},function(t,e,r){"use strict";function n(t){return"-"===t[0]?"-":"+"}t.exports=n,t.exports.default=n},function(t,e,r){"use strict";const n=r(0);function i(t){const e=(t=n(t)).indexOf(".");return-1===e?"0":(t.length-e-1).toString()}t.exports=i,t.exports.default=i},function(t,e,r){"use strict";function n(t){return t.includes("i")}t.exports=n,t.exports.default=n},function(t,e,r){"use strict";const n=r(79);function i(){const t=Array.from(arguments),e="object"==typeof t[t.length-1]?t[t.length-1]:void 0,r=Array.isArray(t[0])?t[0]:e?t.slice(0,t.length-1):t;return n(r,e)}t.exports=i,t.exports.default=i},function(t,e,r){"use strict";const n=r(17);function i(t,e){const r=Number(e);let i=t;for(let e=1;et.type===c.a.internalError).map(t=>t.error);return Object.assign(t,{[u.a]:i,[u.b]:r,[u.c]:n,[u.e]:e})}function m(t,e){return f(this,void 0,void 0,(function*(){d("Initializing new thread");const r=e&&e.timeout?e.timeout:y,n=(yield function(t,e,r){return f(this,void 0,void 0,(function*(){let n;const i=new Promise((t,i)=>{n=setTimeout(()=>i(Error(r)),e)}),o=yield Promise.race([t,i]);return clearTimeout(n),o}))}(function(t){return new Promise((e,r)=>{const n=i=>{var o;h("Message from worker before finishing initialization:",i.data),(o=i.data)&&"init"===o.type?(t.removeEventListener("message",n),e(i.data)):(t=>t&&"uncaughtError"===t.type)(i.data)&&(t.removeEventListener("message",n),r(Object(s.a)(i.data.error)))};t.addEventListener("message",n)})}(t),r,`Timeout: Did not receive an init message from worker after ${r}ms. Make sure the worker calls expose().`)).exposed,{termination:i,terminate:u}=function(t){const[e,r]=Object(a.a)();return{terminate:()=>f(this,void 0,void 0,(function*(){p("Terminating worker"),yield t.terminate(),r()})),termination:e}}(t),m=function(t,e){return new o.a(r=>{const n=t=>{const e={type:c.a.message,data:t.data};r.next(e)},i=t=>{p("Unhandled promise rejection event in thread:",t);const e={type:c.a.internalError,error:Error(t.reason)};r.next(e)};t.addEventListener("message",n),t.addEventListener("unhandledrejection",i),e.then(()=>{const e={type:c.a.termination};t.removeEventListener("message",n),t.removeEventListener("unhandledrejection",i),r.next(e),r.complete()})})}(t,i);if("function"===n.type){return g(Object(l.a)(t),t,m,u)}if("module"===n.type){return g(Object(l.b)(t,n.methods),t,m,u)}{const t=n.type;throw Error("Worker init message states unexpected type of expose(): "+t)}}))}}).call(this,r(7))},function(t,e,r){"use strict";r.d(e,"a",(function(){return g}));var n=r(12),i=r.n(n),o=r(102),s=r(197),a=r(26);function u(t){return Promise.all(t.map(t=>{const e=t=>({status:"fulfilled",value:t}),r=t=>({status:"rejected",reason:t}),n=Promise.resolve(t);try{return n.then(e,r)}catch(t){return Promise.reject(t)}}))}var c,l=r(19);!function(t){t.initialized="initialized",t.taskCanceled="taskCanceled",t.taskCompleted="taskCompleted",t.taskFailed="taskFailed",t.taskQueued="taskQueued",t.taskQueueDrained="taskQueueDrained",t.taskStart="taskStart",t.terminated="terminated"}(c||(c={}));var f=r(24),h=function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function s(t){try{u(n.next(t))}catch(t){o(t)}}function a(t){try{u(n.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(s,a)}u((n=n.apply(t,e||[])).next())}))};let d=1;class p{constructor(t,e){this.eventSubject=new o.a,this.initErrors=[],this.isClosing=!1,this.nextTaskID=1,this.taskQueue=[];const r="number"==typeof e?{size:e}:e||{},{size:n=l.a}=r;this.debug=i()("threads:pool:"+(r.name||String(d++)).replace(/\\W/g," ").trim().replace(/\\s+/g,"-")),this.options=r,this.workers=function(t,e){return function(t){const e=[];for(let r=0;r({init:t(),runningTasks:[]}))}(t,n),this.eventObservable=Object(s.a)(a.a.from(this.eventSubject)),Promise.all(this.workers.map(t=>t.init)).then(()=>this.eventSubject.next({type:c.initialized,size:this.workers.length}),t=>{this.debug("Error while initializing pool worker:",t),this.eventSubject.error(t),this.initErrors.push(t)})}findIdlingWorker(){const{concurrency:t=1}=this.options;return this.workers.find(e=>e.runningTasks.lengthh(this,void 0,void 0,(function*(){var n;yield(n=0,new Promise(t=>setTimeout(t,n)));try{yield this.runPoolTask(t,e)}finally{t.runningTasks=t.runningTasks.filter(t=>t!==r),this.isClosing||this.scheduleWork()}})))();t.runningTasks.push(r)}))}scheduleWork(){this.debug("Attempt de-queueing a task in order to run it...");const t=this.findIdlingWorker();if(!t)return;const e=this.taskQueue.shift();if(!e)return this.debug("Task queue is empty"),void this.eventSubject.next({type:c.taskQueueDrained});this.run(t,e)}taskCompletion(t){return new Promise((e,r)=>{const n=this.events().subscribe(i=>{i.type===c.taskCompleted&&i.taskID===t?(n.unsubscribe(),e(i.returnValue)):i.type===c.taskFailed&&i.taskID===t?(n.unsubscribe(),r(i.error)):i.type===c.terminated&&(n.unsubscribe(),r(Error("Pool has been terminated before task was run.")))})})}settled(t=!1){return h(this,void 0,void 0,(function*(){const e=()=>{return t=this.workers,e=t=>t.runningTasks,t.reduce((t,r)=>[...t,...e(r)],[]);var t,e},r=[],n=this.eventObservable.subscribe(t=>{t.type===c.taskFailed&&r.push(t.error)});return this.initErrors.length>0?Promise.reject(this.initErrors[0]):t&&0===this.taskQueue.length?(yield u(e()),r):(yield new Promise((t,e)=>{const r=this.eventObservable.subscribe({next(e){e.type===c.taskQueueDrained&&(r.unsubscribe(),t(void 0))},error:e})}),yield u(e()),n.unsubscribe(),r)}))}completed(t=!1){return h(this,void 0,void 0,(function*(){const e=this.settled(t),r=new Promise((t,r)=>{const n=this.eventObservable.subscribe({next(i){i.type===c.taskQueueDrained?(n.unsubscribe(),t(e)):i.type===c.taskFailed&&(n.unsubscribe(),r(i.error))},error:r})}),n=yield Promise.race([e,r]);if(n.length>0)throw n[0]}))}events(){return this.eventObservable}queue(t){const{maxQueuedJobs:e=1/0}=this.options;if(this.isClosing)throw Error("Cannot schedule pool tasks after terminate() has been called.");if(this.initErrors.length>0)throw this.initErrors[0];const r=this.nextTaskID++,n=this.taskCompletion(r);n.catch(t=>{this.debug(`Task #${r} errored:`,t)});const i={id:r,run:t,cancel:()=>{-1!==this.taskQueue.indexOf(i)&&(this.taskQueue=this.taskQueue.filter(t=>t!==i),this.eventSubject.next({type:c.taskCanceled,taskID:i.id}))},then:n.then.bind(n)};if(this.taskQueue.length>=e)throw Error("Maximum number of pool tasks queued. Refusing to queue another one.\\nThis usually happens for one of two reasons: We are either at peak workload right now or some tasks just won\'t finish, thus blocking the pool.");return this.debug(`Queueing task #${i.id}...`),this.taskQueue.push(i),this.eventSubject.next({type:c.taskQueued,taskID:i.id}),this.scheduleWork(),i}terminate(t){return h(this,void 0,void 0,(function*(){this.isClosing=!0,t||(yield this.completed(!0)),this.eventSubject.next({type:c.terminated,remainingQueue:[...this.taskQueue]}),this.eventSubject.complete(),yield Promise.all(this.workers.map(t=>h(this,void 0,void 0,(function*(){return f.a.terminate(yield t.init)}))))}))}}function y(t,e){return new p(t,e)}p.EventType=c,y.EventType=c;const g=y},function(t,e,r){"use strict";r.d(e,"a",(function(){return b})),r.d(e,"b",(function(){return v}));var n=r(12),i=r.n(n),o=r(26),s=r(197),a=r(13);const u=()=>{},c=t=>t,l=t=>Promise.resolve().then(t);function f(t){throw t}class h extends o.a{constructor(t){super(e=>{const r=this,n=Object.assign(Object.assign({},e),{complete(){e.complete(),r.onCompletion()},error(t){e.error(t),r.onError(t)},next(t){e.next(t),r.onNext(t)}});try{return this.initHasRun=!0,t(n)}catch(t){n.error(t)}}),this.initHasRun=!1,this.fulfillmentCallbacks=[],this.rejectionCallbacks=[],this.firstValueSet=!1,this.state="pending"}onNext(t){this.firstValueSet||(this.firstValue=t,this.firstValueSet=!0)}onError(t){this.state="rejected",this.rejection=t;for(const e of this.rejectionCallbacks)l(()=>e(t))}onCompletion(){this.state="fulfilled";for(const t of this.fulfillmentCallbacks)l(()=>t(this.firstValue))}then(t,e){const r=t||c,n=e||f;let i=!1;return new Promise((t,e)=>{const o=r=>{if(!i){i=!0;try{t(n(r))}catch(t){e(t)}}};return this.initHasRun||this.subscribe({error:o}),"fulfilled"===this.state?t(r(this.firstValue)):"rejected"===this.state?(i=!0,t(n(this.rejection))):(this.fulfillmentCallbacks.push(e=>{try{t(r(e))}catch(t){o(t)}}),void this.rejectionCallbacks.push(o))})}catch(t){return this.then(void 0,t)}finally(t){const e=t||u;return this.then(t=>(e(),t),()=>e())}static from(t){return function(t){return t&&"function"==typeof t.then}(t)?new h(e=>{t.then(t=>{e.next(t),e.complete()},t=>{e.error(t)})}):super.from(t)}}var d=r(104),p=r(20);const y=i()("threads:master:messages");let g=1;function m(t,e){return new o.a(r=>{let n;const i=o=>{var s;if(y("Message from worker:",o.data),o.data&&o.data.uid===e)if((s=o.data)&&s.type===p.b.running)n=o.data.resultType;else if((t=>t&&t.type===p.b.result)(o.data))"promise"===n?(void 0!==o.data.payload&&r.next(Object(a.a)(o.data.payload)),r.complete(),t.removeEventListener("message",i)):(o.data.payload&&r.next(Object(a.a)(o.data.payload)),o.data.complete&&(r.complete(),t.removeEventListener("message",i)));else if((t=>t&&t.type===p.b.error)(o.data)){const e=Object(a.a)(o.data.error);r.error(e),t.removeEventListener("message",i)}};return t.addEventListener("message",i),()=>{if("observable"===n||!n){const r={type:p.a.cancel,uid:e};t.postMessage(r)}t.removeEventListener("message",i)}})}function b(t,e){return(...r)=>{const n=g++,{args:i,transferables:o}=function(t){if(0===t.length)return{args:[],transferables:[]};const e=[],r=[];for(const n of t)Object(d.a)(n)?(e.push(Object(a.b)(n.send)),r.push(...n.transferables)):e.push(Object(a.b)(n));return{args:e,transferables:0===r.length?r:(n=r,Array.from(new Set(n)))};var n}(r),u={type:p.a.run,uid:n,method:e,args:i};y("Sending command to run function to worker:",u);try{t.postMessage(u,o)}catch(t){return h.from(Promise.reject(t))}return h.from(Object(s.a)(m(t,n)))}}function v(t,e){const r={};for(const n of e)r[n]=b(t,n);return r}},function(t,e,r){"use strict";(function(e,n){var i=r(28);t.exports=v;var o,s=r(61);v.ReadableState=b;r(62).EventEmitter;var a=function(t,e){return t.listeners(e).length},u=r(63),c=r(43).Buffer,l=(void 0!==e?e:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};var f=Object.create(r(21));f.inherits=r(10);var h=r(110),d=void 0;d=h&&h.debuglog?h.debuglog("stream"):function(){};var p,y=r(111),g=r(64);f.inherits(v,u);var m=["error","close","destroy","pause","resume"];function b(t,e){t=t||{};var n=e instanceof(o=o||r(14));this.objectMode=!!t.objectMode,n&&(this.objectMode=this.objectMode||!!t.readableObjectMode);var i=t.highWaterMark,s=t.readableHighWaterMark,a=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:n&&(s||0===s)?s:a,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new y,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(p||(p=r(66).StringDecoder),this.decoder=new p(t.encoding),this.encoding=t.encoding)}function v(t){if(o=o||r(14),!(this instanceof v))return new v(t);this._readableState=new b(t,this),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),u.call(this)}function w(t,e,r,n,i){var o,s=t._readableState;null===e?(s.reading=!1,function(t,e){if(e.ended)return;if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,S(t)}(t,s)):(i||(o=function(t,e){var r;n=e,c.isBuffer(n)||n instanceof l||"string"==typeof e||void 0===e||t.objectMode||(r=new TypeError("Invalid non-string/buffer chunk"));var n;return r}(s,e)),o?t.emit("error",o):s.objectMode||e&&e.length>0?("string"==typeof e||s.objectMode||Object.getPrototypeOf(e)===c.prototype||(e=function(t){return c.from(t)}(e)),n?s.endEmitted?t.emit("error",new Error("stream.unshift() after end event")):x(t,s,e,!0):s.ended?t.emit("error",new Error("stream.push() after EOF")):(s.reading=!1,s.decoder&&!r?(e=s.decoder.write(e),s.objectMode||0!==e.length?x(t,s,e,!1):E(t,s)):x(t,s,e,!1))):n||(s.reading=!1));return function(t){return!t.ended&&(t.needReadable||t.lengthe.highWaterMark&&(e.highWaterMark=function(t){return t>=8388608?t=8388608:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function S(t){var e=t._readableState;e.needReadable=!1,e.emittedReadable||(d("emitReadable",e.flowing),e.emittedReadable=!0,e.sync?i.nextTick(A,t):A(t))}function A(t){d("emit readable"),t.emit("readable"),O(t)}function E(t,e){e.readingMore||(e.readingMore=!0,i.nextTick(k,t,e))}function k(t,e){for(var r=e.length;!e.reading&&!e.flowing&&!e.ended&&e.length=e.length?(r=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.head.data:e.buffer.concat(e.length),e.buffer.clear()):r=function(t,e,r){var n;to.length?o.length:t;if(s===o.length?i+=o:i+=o.slice(0,t),0===(t-=s)){s===o.length?(++n,r.next?e.head=r.next:e.head=e.tail=null):(e.head=r,r.data=o.slice(s));break}++n}return e.length-=n,i}(t,e):function(t,e){var r=c.allocUnsafe(t),n=e.head,i=1;n.data.copy(r),t-=n.data.length;for(;n=n.next;){var o=n.data,s=t>o.length?o.length:t;if(o.copy(r,r.length-t,0,s),0===(t-=s)){s===o.length?(++i,n.next?e.head=n.next:e.head=e.tail=null):(e.head=n,n.data=o.slice(s));break}++i}return e.length-=i,r}(t,e);return n}(t,e.buffer,e.decoder),r);var r}function P(t){var e=t._readableState;if(e.length>0)throw new Error(\'"endReadable()" called on non-empty stream\');e.endEmitted||(e.ended=!0,i.nextTick(R,e,t))}function R(t,e){t.endEmitted||0!==t.length||(t.endEmitted=!0,e.readable=!1,e.emit("end"))}function j(t,e){for(var r=0,n=t.length;r=e.highWaterMark||e.ended))return d("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?P(this):S(this),null;if(0===(t=_(t,e))&&e.ended)return 0===e.length&&P(this),null;var n,i=e.needReadable;return d("need readable",i),(0===e.length||e.length-t0?I(t,e):null)?(e.needReadable=!0,t=0):e.length-=t,0===e.length&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&P(this)),null!==n&&this.emit("data",n),n},v.prototype._read=function(t){this.emit("error",new Error("_read() is not implemented"))},v.prototype.pipe=function(t,e){var r=this,o=this._readableState;switch(o.pipesCount){case 0:o.pipes=t;break;case 1:o.pipes=[o.pipes,t];break;default:o.pipes.push(t)}o.pipesCount+=1,d("pipe count=%d opts=%j",o.pipesCount,e);var u=(!e||!1!==e.end)&&t!==n.stdout&&t!==n.stderr?l:v;function c(e,n){d("onunpipe"),e===r&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,d("cleanup"),t.removeListener("close",m),t.removeListener("finish",b),t.removeListener("drain",f),t.removeListener("error",g),t.removeListener("unpipe",c),r.removeListener("end",l),r.removeListener("end",v),r.removeListener("data",y),h=!0,!o.awaitDrain||t._writableState&&!t._writableState.needDrain||f())}function l(){d("onend"),t.end()}o.endEmitted?i.nextTick(u):r.once("end",u),t.on("unpipe",c);var f=function(t){return function(){var e=t._readableState;d("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&a(t,"data")&&(e.flowing=!0,O(t))}}(r);t.on("drain",f);var h=!1;var p=!1;function y(e){d("ondata"),p=!1,!1!==t.write(e)||p||((1===o.pipesCount&&o.pipes===t||o.pipesCount>1&&-1!==j(o.pipes,t))&&!h&&(d("false write response, pause",o.awaitDrain),o.awaitDrain++,p=!0),r.pause())}function g(e){d("onerror",e),v(),t.removeListener("error",g),0===a(t,"error")&&t.emit("error",e)}function m(){t.removeListener("finish",b),v()}function b(){d("onfinish"),t.removeListener("close",m),v()}function v(){d("unpipe"),r.unpipe(t)}return r.on("data",y),function(t,e,r){if("function"==typeof t.prependListener)return t.prependListener(e,r);t._events&&t._events[e]?s(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]:t.on(e,r)}(t,"error",g),t.once("close",m),t.once("finish",b),t.emit("pipe",r),o.flowing||(d("pipe resume"),r.resume()),t},v.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes||(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r)),this;if(!t){var n=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var o=0;o0&&s.length>i&&!s.warned){s.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=t,u.type=e,u.count=s.length,a=u,console&&console.warn&&console.warn(a)}return t}function h(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function d(t,e,r){var n={fired:!1,wrapFn:void 0,target:t,type:e,listener:r},i=h.bind(n);return i.listener=r,n.wrapFn=i,i}function p(t,e,r){var n=t._events;if(void 0===n)return[];var i=n[e];return void 0===i?[]:"function"==typeof i?r?[i.listener||i]:[i]:r?function(t){for(var e=new Array(t.length),r=0;r0&&(s=e[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var u=i[t];if(void 0===u)return!1;if("function"==typeof u)o(u,this,e);else{var c=u.length,l=g(u,c);for(r=0;r=0;o--)if(r[o]===e||r[o].listener===e){s=r[o].listener,i=o;break}if(i<0)return this;0===i?r.shift():function(t,e){for(;e+1=0;n--)this.removeListener(t,e[n]);return this},a.prototype.listeners=function(t){return p(this,t,!0)},a.prototype.rawListeners=function(t){return p(this,t,!1)},a.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):y.call(t,e)},a.prototype.listenerCount=y,a.prototype.eventNames=function(){return this._eventsCount>0?n(this._events):[]}},function(t,e,r){t.exports=r(62).EventEmitter},function(t,e,r){"use strict";var n=r(28);function i(t,e){t.emit("error",e)}t.exports={destroy:function(t,e){var r=this,o=this._readableState&&this._readableState.destroyed,s=this._writableState&&this._writableState.destroyed;return o||s?(e?e(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,n.nextTick(i,this,t)):n.nextTick(i,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,(function(t){!e&&t?r._writableState?r._writableState.errorEmitted||(r._writableState.errorEmitted=!0,n.nextTick(i,r,t)):n.nextTick(i,r,t):e&&e(t)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}},function(t,e,r){"use strict";(function(e,n,i){var o=r(28);function s(t){var e=this;this.next=null,this.entry=null,this.finish=function(){!function(t,e,r){var n=t.entry;t.entry=null;for(;n;){var i=n.callback;e.pendingcb--,i(r),n=n.next}e.corkedRequestsFree.next=t}(e,t)}}t.exports=b;var a,u=!e.browser&&["v0.10","v0.9."].indexOf(e.version.slice(0,5))>-1?n:o.nextTick;b.WritableState=m;var c=Object.create(r(21));c.inherits=r(10);var l={deprecate:r(115)},f=r(63),h=r(43).Buffer,d=(void 0!==i?i:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};var p,y=r(64);function g(){}function m(t,e){a=a||r(14),t=t||{};var n=e instanceof a;this.objectMode=!!t.objectMode,n&&(this.objectMode=this.objectMode||!!t.writableObjectMode);var i=t.highWaterMark,c=t.writableHighWaterMark,l=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:n&&(c||0===c)?c:l,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var f=!1===t.decodeStrings;this.decodeStrings=!f,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){!function(t,e){var r=t._writableState,n=r.sync,i=r.writecb;if(function(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}(r),e)!function(t,e,r,n,i){--e.pendingcb,r?(o.nextTick(i,n),o.nextTick(A,t,e),t._writableState.errorEmitted=!0,t.emit("error",n)):(i(n),t._writableState.errorEmitted=!0,t.emit("error",n),A(t,e))}(t,r,n,e,i);else{var s=_(r);s||r.corked||r.bufferProcessing||!r.bufferedRequest||x(t,r),n?u(w,t,r,s,i):w(t,r,s,i)}}(e,t)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new s(this)}function b(t){if(a=a||r(14),!(p.call(b,this)||this instanceof a))return new b(t);this._writableState=new m(t,this),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),f.call(this)}function v(t,e,r,n,i,o,s){e.writelen=n,e.writecb=s,e.writing=!0,e.sync=!0,r?t._writev(i,e.onwrite):t._write(i,o,e.onwrite),e.sync=!1}function w(t,e,r,n){r||function(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}(t,e),e.pendingcb--,n(),A(t,e)}function x(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var n=e.bufferedRequestCount,i=new Array(n),o=e.corkedRequestsFree;o.entry=r;for(var a=0,u=!0;r;)i[a]=r,r.isBuf||(u=!1),r=r.next,a+=1;i.allBuffers=u,v(t,e,!0,e.length,i,"",o.finish),e.pendingcb++,e.lastBufferedRequest=null,o.next?(e.corkedRequestsFree=o.next,o.next=null):e.corkedRequestsFree=new s(e),e.bufferedRequestCount=0}else{for(;r;){var c=r.chunk,l=r.encoding,f=r.callback;if(v(t,e,!1,e.objectMode?1:c.length,c,l,f),r=r.next,e.bufferedRequestCount--,e.writing)break}null===r&&(e.lastBufferedRequest=null)}e.bufferedRequest=r,e.bufferProcessing=!1}function _(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function S(t,e){t._final((function(r){e.pendingcb--,r&&t.emit("error",r),e.prefinished=!0,t.emit("prefinish"),A(t,e)}))}function A(t,e){var r=_(e);return r&&(!function(t,e){e.prefinished||e.finalCalled||("function"==typeof t._final?(e.pendingcb++,e.finalCalled=!0,o.nextTick(S,t,e)):(e.prefinished=!0,t.emit("prefinish")))}(t,e),0===e.pendingcb&&(e.finished=!0,t.emit("finish"))),r}c.inherits(b,f),m.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},function(){try{Object.defineProperty(m.prototype,"buffer",{get:l.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(t){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(p=Function.prototype[Symbol.hasInstance],Object.defineProperty(b,Symbol.hasInstance,{value:function(t){return!!p.call(this,t)||this===b&&(t&&t._writableState instanceof m)}})):p=function(t){return t instanceof this},b.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},b.prototype.write=function(t,e,r){var n,i=this._writableState,s=!1,a=!i.objectMode&&(n=t,h.isBuffer(n)||n instanceof d);return a&&!h.isBuffer(t)&&(t=function(t){return h.from(t)}(t)),"function"==typeof e&&(r=e,e=null),a?e="buffer":e||(e=i.defaultEncoding),"function"!=typeof r&&(r=g),i.ended?function(t,e){var r=new Error("write after end");t.emit("error",r),o.nextTick(e,r)}(this,r):(a||function(t,e,r,n){var i=!0,s=!1;return null===r?s=new TypeError("May not write null values to stream"):"string"==typeof r||void 0===r||e.objectMode||(s=new TypeError("Invalid non-string/buffer chunk")),s&&(t.emit("error",s),o.nextTick(n,s),i=!1),i}(this,i,t,r))&&(i.pendingcb++,s=function(t,e,r,n,i,o){if(!r){var s=function(t,e,r){t.objectMode||!1===t.decodeStrings||"string"!=typeof e||(e=h.from(e,r));return e}(e,n,i);n!==s&&(r=!0,i="buffer",n=s)}var a=e.objectMode?1:n.length;e.length+=a;var u=e.length-1))throw new TypeError("Unknown encoding: "+t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(b.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),b.prototype._write=function(t,e,r){r(new Error("_write() is not implemented"))},b.prototype._writev=null,b.prototype.end=function(t,e,r){var n=this._writableState;"function"==typeof t?(r=t,t=null,e=null):"function"==typeof e&&(r=e,e=null),null!=t&&this.write(t,e),n.corked&&(n.corked=1,this.uncork()),n.ending||function(t,e,r){e.ending=!0,A(t,e),r&&(e.finished?o.nextTick(r):t.once("finish",r));e.ended=!0,t.writable=!1}(this,n,r)},Object.defineProperty(b.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),b.prototype.destroy=y.destroy,b.prototype._undestroy=y.undestroy,b.prototype._destroy=function(t,e){this.end(),e(t)}}).call(this,r(7),r(113).setImmediate,r(3))},function(t,e,r){"use strict";var n=r(116).Buffer,i=n.isEncoding||function(t){switch((t=""+t)&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(t){var e;switch(this.encoding=function(t){var e=function(t){if(!t)return"utf8";for(var e;;)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}(t);if("string"!=typeof e&&(n.isEncoding===i||!i(t)))throw new Error("Unknown encoding: "+t);return e||t}(t),this.encoding){case"utf16le":this.text=u,this.end=c,e=4;break;case"utf8":this.fillLast=a,e=4;break;case"base64":this.text=l,this.end=f,e=3;break;default:return this.write=h,void(this.end=d)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(e)}function s(t){return t<=127?0:t>>5==6?2:t>>4==14?3:t>>3==30?4:-1}function a(t){var e=this.lastTotal-this.lastNeed,r=function(t,e,r){if(128!=(192&e[0]))return t.lastNeed=0,"�".repeat(r);if(t.lastNeed>1&&e.length>1){if(128!=(192&e[1]))return t.lastNeed=1,"�".repeat(r+1);if(t.lastNeed>2&&e.length>2&&128!=(192&e[2]))return t.lastNeed=2,"�".repeat(r+2)}}(this,t,e);return void 0!==r?r:this.lastNeed<=t.length?(t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(t.copy(this.lastChar,e,0,t.length),void(this.lastNeed-=t.length))}function u(t,e){if((t.length-e)%2==0){var r=t.toString("utf16le",e);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function c(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,r)}return e}function l(t,e){var r=(t.length-e)%3;return 0===r?t.toString("base64",e):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-r))}function f(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function h(t){return t.toString(this.encoding)}function d(t){return t&&t.length?this.write(t):""}e.StringDecoder=o,o.prototype.write=function(t){if(0===t.length)return"";var e,r;if(this.lastNeed){if(void 0===(e=this.fillLast(t)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r=0)return i>0&&(t.lastNeed=i-1),i;if(--n=0)return i>0&&(t.lastNeed=i-2),i;if(--n=0)return i>0&&(2===i?i=0:t.lastNeed=i-3),i;return 0}(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var n=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,n),t.toString("utf8",e,n)},o.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length}},function(t,e,r){"use strict";t.exports=s;var n=r(14),i=Object.create(r(21));function o(t,e){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(!n)return this.emit("error",new Error("write callback called multiple times"));r.writechunk=null,r.writecb=null,null!=e&&this.push(e),n(t);var i=this._readableState;i.reading=!1,(i.needReadable||i.lengthObject(o.a)(r),e)}async decode(t,e){return new Promise((r,n)=>{this.pool.queue(async i=>{try{const n=await i(t,e);r(n)}catch(t){n(t)}})})}destroy(){this.pool.terminate(!0)}}}).call(this,r(128))},function(t,e,r){(function(t){e.fetch=a(t.fetch)&&a(t.ReadableStream),e.writableStream=a(t.WritableStream),e.abortController=a(t.AbortController),e.blobConstructor=!1;try{new Blob([new ArrayBuffer(1)]),e.blobConstructor=!0}catch(t){}var r;function n(){if(void 0!==r)return r;if(t.XMLHttpRequest){r=new t.XMLHttpRequest;try{r.open("GET",t.XDomainRequest?"/":"https://example.com")}catch(t){r=null}}else r=null;return r}function i(t){var e=n();if(!e)return!1;try{return e.responseType=t,e.responseType===t}catch(t){}return!1}var o=void 0!==t.ArrayBuffer,s=o&&a(t.ArrayBuffer.prototype.slice);function a(t){return"function"==typeof t}e.arraybuffer=e.fetch||o&&i("arraybuffer"),e.msstream=!e.fetch&&s&&i("ms-stream"),e.mozchunkedarraybuffer=!e.fetch&&o&&i("moz-chunked-arraybuffer"),e.overrideMimeType=e.fetch||!!n()&&a(n().overrideMimeType),e.vbArray=a(t.VBArray),r=null}).call(this,r(3))},function(t,e,r){(function(t,n,i){var o=r(69),s=r(10),a=r(42),u=e.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},c=e.IncomingMessage=function(e,r,s,u){var c=this;if(a.Readable.call(c),c._mode=s,c.headers={},c.rawHeaders=[],c.trailers={},c.rawTrailers=[],c.on("end",(function(){t.nextTick((function(){c.emit("close")}))})),"fetch"===s){if(c._fetchResponse=r,c.url=r.url,c.statusCode=r.status,c.statusMessage=r.statusText,r.headers.forEach((function(t,e){c.headers[e.toLowerCase()]=t,c.rawHeaders.push(e,t)})),o.writableStream){var l=new WritableStream({write:function(t){return new Promise((function(e,r){c._destroyed?r():c.push(new n(t))?e():c._resumeFetch=e}))},close:function(){i.clearTimeout(u),c._destroyed||c.push(null)},abort:function(t){c._destroyed||c.emit("error",t)}});try{return void r.body.pipeTo(l).catch((function(t){i.clearTimeout(u),c._destroyed||c.emit("error",t)}))}catch(t){}}var f=r.body.getReader();!function t(){f.read().then((function(e){if(!c._destroyed){if(e.done)return i.clearTimeout(u),void c.push(null);c.push(new n(e.value)),t()}})).catch((function(t){i.clearTimeout(u),c._destroyed||c.emit("error",t)}))}()}else{if(c._xhr=e,c._pos=0,c.url=e.responseURL,c.statusCode=e.status,c.statusMessage=e.statusText,e.getAllResponseHeaders().split(/\\r?\\n/).forEach((function(t){var e=t.match(/^([^:]+):\\s*(.*)/);if(e){var r=e[1].toLowerCase();"set-cookie"===r?(void 0===c.headers[r]&&(c.headers[r]=[]),c.headers[r].push(e[2])):void 0!==c.headers[r]?c.headers[r]+=", "+e[2]:c.headers[r]=e[2],c.rawHeaders.push(e[1],e[2])}})),c._charset="x-user-defined",!o.overrideMimeType){var h=c.rawHeaders["mime-type"];if(h){var d=h.match(/;\\s*charset=([^;])(;|$)/);d&&(c._charset=d[1].toLowerCase())}c._charset||(c._charset="utf-8")}}};s(c,a.Readable),c.prototype._read=function(){var t=this._resumeFetch;t&&(this._resumeFetch=null,t())},c.prototype._onXHRProgress=function(){var t=this,e=t._xhr,r=null;switch(t._mode){case"text:vbarray":if(e.readyState!==u.DONE)break;try{r=new i.VBArray(e.responseBody).toArray()}catch(t){}if(null!==r){t.push(new n(r));break}case"text":try{r=e.responseText}catch(e){t._mode="text:vbarray";break}if(r.length>t._pos){var o=r.substr(t._pos);if("x-user-defined"===t._charset){for(var s=new n(o.length),a=0;at._pos&&(t.push(new n(new Uint8Array(c.result.slice(t._pos)))),t._pos=c.result.byteLength)},c.onload=function(){t.push(null)},c.readAsArrayBuffer(r)}t._xhr.readyState===u.DONE&&"ms-stream"!==t._mode&&t.push(null)}}).call(this,r(7),r(9).Buffer,r(3))},function(t,e,r){"use strict";var n=r(46),i=Object.prototype.hasOwnProperty,o=Array.isArray,s=function(){for(var t=[],e=0;e<256;++e)t.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return t}(),a=function(t,e){for(var r=e&&e.plainObjects?Object.create(null):{},n=0;n1;){var e=t.pop(),r=e.obj[e.prop];if(o(r)){for(var n=[],i=0;i=48&&l<=57||l>=65&&l<=90||l>=97&&l<=122||o===n.RFC1738&&(40===l||41===l)?u+=a.charAt(c):l<128?u+=s[l]:l<2048?u+=s[192|l>>6]+s[128|63&l]:l<55296||l>=57344?u+=s[224|l>>12]+s[128|l>>6&63]+s[128|63&l]:(c+=1,l=65536+((1023&l)<<10|1023&a.charCodeAt(c)),u+=s[240|l>>18]+s[128|l>>12&63]+s[128|l>>6&63]+s[128|63&l])}return u},isBuffer:function(t){return!(!t||"object"!=typeof t)&&!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))},isRegExp:function(t){return"[object RegExp]"===Object.prototype.toString.call(t)},maybeMap:function(t,e){if(o(t)){for(var r=[],n=0;ne++t.next());return e.every(({done:t})=>t)?{done:!0}:{done:!1,value:e.map(({value:t})=>t)}}))}}},function(t,e,r){"use strict";function n(t){"+"===t[0]&&(t=t.substring(1));const e="-"===t[0]?"-":"";"-"===e&&(t=t.substring(1));const r=t.indexOf("e");if(-1===r)return e+t;let n=t.indexOf(".");-1===n&&(n=r);const i=Number(t.substring(r+1)),o=t.substring(0,r).replace(".",""),s=n+i,a=o.length;if(s>=a){const t=s-a;let r=o;for(let e=0;es;e--)t+="0";return t+=o,e+t}return e+o.substring(0,s)+"."+o.substring(s)}t.exports=n,t.exports.default=n},function(t,e,r){"use strict";t.exports={MAX_SAFE_INTEGER:9007199254740991}},function(t,e,r){"use strict";const n=r(47);function i(t){return"0"===t?"1":n("1",t)}t.exports=i,t.exports.default=i},function(t,e,r){"use strict";const n=r(4),i=r(0),o=r(8),s=r(22);function a(t){if(-1===(t=i(t)).indexOf("."))return t;const e=s(t);return t=n(t).split(".")[0],"+"===e?o(t,"1"):"-"===e?"0"===t||""===t?"0":"-"+t:void 0}t.exports=a,t.exports.default=a},function(t,e,r){"use strict";const n=r(51);function i(t){const e=n(t);return[t.replace(/\\./g,"").replace(/^0/,""),1+"0".repeat(e)]}t.exports=i,t.exports.default=i},function(t,e,r){const n=r(0),i=r(16);function o(t){if(t=n(t),!i(t))throw new Error("can\'t call is_odd on decimal");return["1","3","5","7","9"].includes(t.charAt(t.length-1))}t.exports=o,t.exports.default=o},function(t,e,r){"use strict";const n=r(52),i=r(15),o=r(78),s=r(11),a=r(17),u=r(50);function c(t,{max_decimal_digits:e,infinity_times_zero:r="NaN"}={}){const c=t.some(t=>i(t)),l=t.some(t=>s(t));if(c&&l)return r;if(c){return t.filter(t=>"-"===u(t)).length%2==0?"Infinity":"-Infinity"}if(l)return"0";const f=o(t.filter(t=>n(t)).length.toString());let h=a(t.map(t=>t.replace(/i$/,"")),{max_decimal_digits:e});return f&&(h+="i"),h}t.exports=c,t.exports.default=c},function(t,e,r){"use strict";const n=r(0);function i(t){return"-"===(t=n(t))[0]}t.exports=i,t.exports.default=i},function(t,e,r){"use strict";const n=r(1),i=r(160),o=r(161);function s(t,{max_decimal_digits:e=100,fraction:r=!1}={}){if(i(t)){const[i,s]=o(t);return r?s+"/"+i:n(s,i,{max_decimal_digits:e})}return r?"1/"+t:n("1",t,{max_decimal_digits:e})}t.exports=s,t.exports.default=s},function(t,e,r){"use strict";const n=r(0),i=r(16);function o(t){if(t=n(t),!i(t))throw new Error("can\'t call is_even on decimal");return["0","2","4","6","8"].includes(t.charAt(t.length-1))}t.exports=o,t.exports.default=o},function(t,e,r){"use strict";const n=r(76),i=r(84),o=r(1);function s(t,e){const r=i(t);return"0"===r?"0":n(o(r,e,{max_decimal_digits:1}))}t.exports=s,t.exports.default=s},function(t,e,r){"use strict";const n=r(4),i=r(0);function o(t){const e=(t=n(i(t))).indexOf(".");return(-1===e?t.length:e).toString()}t.exports=o,t.exports.default=o},function(t,e,r){"use strict";const n=r(1),i=r(82),o=r(86),s=r(87);function a(t,e){const r=s("2",o(["1000",e,e]));for(;t.endsWith("0")&&e.endsWith("0");)t=t.substring(0,t.length-1),e=e.substring(0,e.length-1);for(;i(t)&&i(e);)t=n(t,"2"),e=n(e,"2");let a=!0;for(;a;){a=!1;for(let i=0;i"<"!==n(r,t)&&">"!==n(r,e));let a="13";for(;">"!==n(a,e);)/^\\d+5/.test(a)||/^(\\d)\\1+/.test(a)||["9","7","3"].every(t=>!o(i(a,t)))&&r.push(a),a=s(a,"2");return r}t.exports=a,t.exports.default=a},function(t,e,r){"use strict";const n=r(6),i=r(1);function o({max_decimal_digits:t=100,steps:e=100}={}){let r="1",o="1";for(let s=1;s":return"-"+s(t,e)}else if(r&&!a)switch(e=e.substring(1),n(t,e)){case"=":return"0";case"<":return"-"+s(e,t);case">":return s(t,e)}}t.exports=a,t.exports.default=a},function(t,e,r){const{MAX_SAFE_INTEGER_LENGTH:n}=r(56);t.exports=function(t,e){const r=t.length,i=e.length,o=t.indexOf("."),s=e.indexOf("."),a=-1===o?r:o,u=-1===s?i:s;if(-1===o&&-1===s&&r0){for(;m>p-f;){const r=t[m-h]||"0",n=e[m-d]||"0";let i=Number(r)+Number(n)+g;i>=10?(i-=10,g=1):g=0,""===y&&0===i||(y=i+y),m--}y&&(y="."+y),m--}if(l>0)for(;m>=0;){const r=t[m-h]||"0",n=e[m-d]||"0";let i=Number(r)+Number(n)+g;i>=10?(i-=10,g=1):g=0,y=i+y,m--}return 1===g&&(y=g+y),"."===y[0]&&(y="0"+y),y}},function(t,e,r){const{MAX_SAFE_INTEGER_LENGTH:n}=r(56);t.exports=function(t,e){const r=t.length,i=e.length,o=t.indexOf("."),s=e.indexOf("."),a=-1===o?r:o,u=-1===s?i:s;if(-1===o&&-1===s&&r0){for(;m>p-f;){let r=t[m-h]||"0",n=e[m-d]||"0";r-=g,g=0;let i=r-n;if(i<0)for(;i<0;)g++,i+=10;else g&&g--;""===y&&0===i||(y=i+y),m--}""!==y&&(y="."+y),m--}if(l>0){for(;m>0;){let r=t[m-h]||"0",n=e[m-d]||"0";r-=g,g=0;let i=r-n;if(i<0)for(;i<0;)g++,i+=10;else g&&g--;y=i+y,m--}const r=t[0-h]||"0",n=e[0-d]||"0";let i=Number(r)-(g>0?1:0)-Number(n);0!==i&&(y=i+y),y=y.replace(/^0+/,"")}return"."===y[0]&&(y="0"+y),y}},function(t,e,r){const n=r(18);function i(t){return"-"===(t=n(t))[0]?t.substring(1):t}t.exports=i,t.exports.default=i},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var r=[],n=!0,i=!1,o=void 0;try{for(var s,a=t[Symbol.iterator]();!(n=(s=a.next()).done)&&(r.push(s.value),!e||r.length!==e);n=!0);}catch(t){i=!0,o=t}finally{try{!n&&a.return&&a.return()}finally{if(i)throw o}}return r}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};e.default=function(t,e){return new Promise((function(r,o){try{e&&console.log("starting parseData with",t),e&&console.log("\\tGeoTIFF:","undefined"==typeof GeoTIFF?"undefined":i(GeoTIFF));var u={},c=void 0,h=void 0;if("object"===t.rasterType)u.values=t.data,u.height=c=t.metadata.height||u.values[0].length,u.width=h=t.metadata.width||u.values[0][0].length,u.pixelHeight=t.metadata.pixelHeight,u.pixelWidth=t.metadata.pixelWidth,u.projection=t.metadata.projection,u.xmin=t.metadata.xmin,u.ymax=t.metadata.ymax,u.noDataValue=t.metadata.noDataValue,u.numberOfRasters=u.values.length,u.xmax=u.xmin+u.width*u.pixelWidth,u.ymin=u.ymax-u.height*u.pixelHeight,u._data=null,r(f(u));else if("geotiff"===t.rasterType){u._data=t.data;var d=s.fromArrayBuffer;"url"===t.sourceType?d=s.fromUrl:"Blob"===t.sourceType&&(d=s.fromBlob),e&&console.log("data.rasterType is geotiff"),r(d(t.data).then((function(r){return e&&console.log("geotiff:",r),r.getImage().then((function(r){try{e&&console.log("image:",r);var i=r.fileDirectory,s=r.getGeoKeys()||{},d=s.GeographicTypeGeoKey,p=s.ProjectedCSTypeGeoKey;u.projection=p||d||t.metadata.projection,e&&console.log("projection:",u.projection),u.height=c=r.getHeight(),e&&console.log("result.height:",u.height),u.width=h=r.getWidth(),e&&console.log("result.width:",u.width);var y=r.getResolution(),g=n(y,2),m=g[0],b=g[1];u.pixelHeight=Math.abs(b),u.pixelWidth=Math.abs(m);var v=r.getOrigin(),w=n(v,2),x=w[0],_=w[1];return u.xmin=x,u.xmax=u.xmin+h*u.pixelWidth,u.ymax=_,u.ymin=u.ymax-c*u.pixelHeight,u.noDataValue=i.GDAL_NODATA?parseFloat(i.GDAL_NODATA):null,u.numberOfRasters=i.SamplesPerPixel,i.ColorMap&&(u.palette=(0,a.getPalette)(r)),"url"!==t.sourceType?r.readRasters().then((function(t){return u.values=t.map((function(t){return(0,l.unflatten)(t,{height:c,width:h})})),f(u)})):u}catch(t){o(t),console.error("[georaster] error parsing georaster:",t)}}))})))}}catch(t){o(t),console.error("[georaster] error parsing georaster:",t)}}))};var o,s=r(193),a=r(150),u=r(151),c=(o=u)&&o.__esModule?o:{default:o},l=r(192);function f(t){var e=(0,c.default)(t.values,{height:t.height,layout:"[band][row][column]",noData:t.noDataValue,precise:!1,stats:["max","min","range"],width:t.width});return t.maxs=e.bands.map((function(t){return t.max})),t.mins=e.bands.map((function(t){return t.min})),t.ranges=e.bands.map((function(t){return t.range})),t}},function(t,e,r){function n(t,e){"use strict";var r=(e=e||{}).pos||0,i="<".charCodeAt(0),o=">".charCodeAt(0),s="-".charCodeAt(0),a="/".charCodeAt(0),u="!".charCodeAt(0),c="\'".charCodeAt(0),l=\'"\'.charCodeAt(0);function f(){for(var e=[];t[r];)if(t.charCodeAt(r)==i){if(t.charCodeAt(r+1)===a)return(r=t.indexOf(">",r))+1&&(r+=1),e;if(t.charCodeAt(r+1)===u){if(t.charCodeAt(r+2)==s){for(;-1!==r&&(t.charCodeAt(r)!==o||t.charCodeAt(r-1)!=s||t.charCodeAt(r-2)!=s||-1==r);)r=t.indexOf(">",r+1);-1===r&&(r=t.length)}else for(r+=2;t.charCodeAt(r)!==o&&t[r];)r++;r++;continue}var n=y();e.push(n)}else{var c=h();c.trim().length>0&&e.push(c),r++}return e}function h(){var e=r;return-2===(r=t.indexOf("<",r)-1)&&(r=t.length),t.slice(e,r+1)}function d(){for(var e=r;-1==="\\n\\t>/= ".indexOf(t[r])&&t[r];)r++;return t.slice(e,r)}var p=e.noChildNodes||["img","br","input","meta","link"];function y(){r++;const e=d(),n={};let i=[];for(;t.charCodeAt(r)!==o&&t[r];){var s=t.charCodeAt(r);if(s>64&&s<91||s>96&&s<123){for(var u=d(),h=t.charCodeAt(r);h&&h!==c&&h!==l&&!(h>64&&h<91||h>96&&h<123)&&h!==o;)r++,h=t.charCodeAt(r);if(h===c||h===l){var y=g();if(-1===r)return{tagName:e,attributes:n,children:i}}else y=null,r--;n[u]=y}r++}if(t.charCodeAt(r-1)!==a)if("script"==e){var m=r+1;r=t.indexOf("<\\/script>",r),i=[t.slice(m,r-1)],r+=9}else if("style"==e){m=r+1;r=t.indexOf("",r),i=[t.slice(m,r-1)],r+=8}else-1==p.indexOf(e)&&(r++,i=f());else r++;return{tagName:e,attributes:n,children:i}}function g(){var e=t[r],n=++r;return r=t.indexOf(e,n),t.slice(n,r)}var m,b=null;if(void 0!==e.attrValue){e.attrName=e.attrName||"id";for(b=[];-1!==(m=void 0,m=new RegExp("\\\\s"+e.attrName+"\\\\s*=[\'\\"]"+e.attrValue+"[\'\\"]").exec(t),r=m?m.index:-1);)-1!==(r=t.lastIndexOf("<",r))&&b.push(y()),t=t.substr(r),r=0}else b=e.parseNode?y():f();return e.filter&&(b=n.filter(b,e.filter)),e.setPos&&(b.pos=r),b}n.simplify=function(t){var e={};if(!t.length)return"";if(1===t.length&&"string"==typeof t[0])return t[0];for(var r in t.forEach((function(t){if("object"==typeof t){e[t.tagName]||(e[t.tagName]=[]);var r=n.simplify(t.children||[]);e[t.tagName].push(r),t.attributes&&(r._attributes=t.attributes)}})),e)1==e[r].length&&(e[r]=e[r][0]);return e},n.filter=function(t,e){var r=[];return t.forEach((function(t){if("object"==typeof t&&e(t)&&r.push(t),t.children){var i=n.filter(t.children,e);r=r.concat(i)}})),r},n.stringify=function(t){var e="";function r(t){if(t)for(var r=0;r",r(t.children),e+=""}return r(t),e},n.toContentString=function(t){if(Array.isArray(t)){var e="";return t.forEach((function(t){e=(e+=" "+n.toContentString(t)).trim()})),e}return"object"==typeof t?n.toContentString(t.children):" "+t},n.getElementById=function(t,e,r){var i=n(t,{attrValue:e});return r?n.simplify(i):i[0]},n.getElementsByClassName=function(t,e,r){const i=n(t,{attrName:"class",attrValue:"[a-zA-Z0-9-s ]*"+e+"[a-zA-Z0-9-s ]*"});return r?n.simplify(i):i},n.parseStream=function(t,e){if("string"==typeof e&&(e=e.length+2),"string"==typeof t){var i=r(25);t=i.createReadStream(t,{start:e}),e=0}var o=e,s="";return t.on("data",(function(e){s+=e;for(var r=0;;){if(!(o=s.indexOf("<",o)+1))return void(o=r);if("/"!==s[o+1]){var i=n(s,{pos:o-1,parseNode:!0,setPos:!0});if((o=i.pos)>s.length-1||oo.length-1||i=0&&e.windowBits<16&&(e.windowBits=-e.windowBits,0===e.windowBits&&(e.windowBits=-15)),!(e.windowBits>=0&&e.windowBits<16)||t&&t.windowBits||(e.windowBits+=32),e.windowBits>15&&e.windowBits<48&&0==(15&e.windowBits)&&(e.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new u,this.strm.avail_out=0;var r=n.inflateInit2(this.strm,e.windowBits);if(r!==s.Z_OK)throw new Error(a[r]);if(this.header=new c,n.inflateGetHeader(this.strm,this.header),e.dictionary&&("string"==typeof e.dictionary?e.dictionary=o.string2buf(e.dictionary):"[object ArrayBuffer]"===l.call(e.dictionary)&&(e.dictionary=new Uint8Array(e.dictionary)),e.raw&&(r=n.inflateSetDictionary(this.strm,e.dictionary))!==s.Z_OK))throw new Error(a[r])}function h(t,e){var r=new f(e);if(r.push(t,!0),r.err)throw r.msg||a[r.err];return r.result}f.prototype.push=function(t,e){var r,a,u,c,f,h=this.strm,d=this.options.chunkSize,p=this.options.dictionary,y=!1;if(this.ended)return!1;a=e===~~e?e:!0===e?s.Z_FINISH:s.Z_NO_FLUSH,"string"==typeof t?h.input=o.binstring2buf(t):"[object ArrayBuffer]"===l.call(t)?h.input=new Uint8Array(t):h.input=t,h.next_in=0,h.avail_in=h.input.length;do{if(0===h.avail_out&&(h.output=new i.Buf8(d),h.next_out=0,h.avail_out=d),(r=n.inflate(h,s.Z_NO_FLUSH))===s.Z_NEED_DICT&&p&&(r=n.inflateSetDictionary(this.strm,p)),r===s.Z_BUF_ERROR&&!0===y&&(r=s.Z_OK,y=!1),r!==s.Z_STREAM_END&&r!==s.Z_OK)return this.onEnd(r),this.ended=!0,!1;h.next_out&&(0!==h.avail_out&&r!==s.Z_STREAM_END&&(0!==h.avail_in||a!==s.Z_FINISH&&a!==s.Z_SYNC_FLUSH)||("string"===this.options.to?(u=o.utf8border(h.output,h.next_out),c=h.next_out-u,f=o.buf2string(h.output,u),h.next_out=c,h.avail_out=d-c,c&&i.arraySet(h.output,h.output,u,c,0),this.onData(f)):this.onData(i.shrinkBuf(h.output,h.next_out)))),0===h.avail_in&&0===h.avail_out&&(y=!0)}while((h.avail_in>0||0===h.avail_out)&&r!==s.Z_STREAM_END);return r===s.Z_STREAM_END&&(a=s.Z_FINISH),a===s.Z_FINISH?(r=n.inflateEnd(this.strm),this.onEnd(r),this.ended=!0,r===s.Z_OK):a!==s.Z_SYNC_FLUSH||(this.onEnd(s.Z_OK),h.avail_out=0,!0)},f.prototype.onData=function(t){this.chunks.push(t)},f.prototype.onEnd=function(t){t===s.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},e.Inflate=f,e.inflate=h,e.inflateRaw=function(t,e){return(e=e||{}).raw=!0,h(t,e)},e.ungzip=h},function(t,e,r){"use strict";var n=r(26);class i extends n.a{constructor(){super(t=>(this._observers.add(t),()=>this._observers.delete(t))),this._observers=new Set}next(t){for(const e of this._observers)e.next(t)}error(t){for(const e of this._observers)e.error(t)}complete(){for(const t of this._observers)t.complete()}}e.a=i},function(t,e,r){"use strict";r.d(e,"a",(function(){return i}));const n=()=>{};function i(){let t,e=!1,r=n;return[new Promise(n=>{e?n(t):r=n}),n=>{e=!0,t=n,r(t)}]}},function(t,e,r){"use strict";r.d(e,"a",(function(){return i}));var n=r(2);function i(t){return t&&"object"==typeof t&&t[n.d]}},function(t,e,r){var n=r(40),i=r(39),o=t.exports;for(var s in n)n.hasOwnProperty(s)&&(o[s]=n[s]);function a(t){if("string"==typeof t&&(t=i.parse(t)),t.protocol||(t.protocol="https:"),"https:"!==t.protocol)throw new Error(\'Protocol "\'+t.protocol+\'" not supported. Expected "https:"\');return t}o.request=function(t,e){return t=a(t),n.request.call(this,t,e)},o.get=function(t,e){return t=a(t),n.get.call(this,t,e)}},function(t,e,r){"use strict";r.r(e);var n=r(99),i=r.n(n);self;onmessage=t=>{const e=t.data;i()(e).then(t=>{const e=[];if(t.values){let r;t.values.forEach(t=>t.forEach(({buffer:t})=>{t instanceof ArrayBuffer&&t!==r&&(e.push(t),r=t)}))}t._data instanceof ArrayBuffer&&e.push(t._data),postMessage(t,e),close()})}},function(t,e,r){(function(e){var n=r(42).Transform,i=r(10);function o(t){n.call(this,t),this._destroyed=!1}function s(t,e,r){r(null,t)}function a(t){return function(e,r,n){return"function"==typeof e&&(n=r,r=e,e={}),"function"!=typeof r&&(r=s),"function"!=typeof n&&(n=null),t(e,r,n)}}i(o,n),o.prototype.destroy=function(t){if(!this._destroyed){this._destroyed=!0;var r=this;e.nextTick((function(){t&&r.emit("error",t),r.emit("close")}))}},t.exports=a((function(t,e,r){var n=new o(t);return n._transform=e,r&&(n._flush=r),n})),t.exports.ctor=a((function(t,e,r){function n(e){if(!(this instanceof n))return new n(e);this.options=Object.assign({},t,e),o.call(this,this.options)}return i(n,o),n.prototype._transform=e,r&&(n.prototype._flush=r),n})),t.exports.obj=a((function(t,e,r){var n=new o(Object.assign({objectMode:!0,highWaterMark:16},t));return n._transform=e,r&&(n._flush=r),n}))}).call(this,r(7))},function(t,e,r){"use strict";e.byteLength=function(t){var e=c(t),r=e[0],n=e[1];return 3*(r+n)/4-n},e.toByteArray=function(t){var e,r,n=c(t),s=n[0],a=n[1],u=new o(function(t,e,r){return 3*(e+r)/4-r}(0,s,a)),l=0,f=a>0?s-4:s;for(r=0;r>16&255,u[l++]=e>>8&255,u[l++]=255&e;2===a&&(e=i[t.charCodeAt(r)]<<2|i[t.charCodeAt(r+1)]>>4,u[l++]=255&e);1===a&&(e=i[t.charCodeAt(r)]<<10|i[t.charCodeAt(r+1)]<<4|i[t.charCodeAt(r+2)]>>2,u[l++]=e>>8&255,u[l++]=255&e);return u},e.fromByteArray=function(t){for(var e,r=t.length,i=r%3,o=[],s=0,a=r-i;sa?a:s+16383));1===i?(e=t[r-1],o.push(n[e>>2]+n[e<<4&63]+"==")):2===i&&(e=(t[r-2]<<8)+t[r-1],o.push(n[e>>10]+n[e>>4&63]+n[e<<2&63]+"="));return o.join("")};for(var n=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,u=s.length;a0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function l(t,e,r){for(var i,o,s=[],a=e;a>18&63]+n[o>>12&63]+n[o>>6&63]+n[63&o]);return s.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},function(t,e){\n/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */\ne.read=function(t,e,r,n,i){var o,s,a=8*i-n-1,u=(1<>1,l=-7,f=r?i-1:0,h=r?-1:1,d=t[e+f];for(f+=h,o=d&(1<<-l)-1,d>>=-l,l+=a;l>0;o=256*o+t[e+f],f+=h,l-=8);for(s=o&(1<<-l)-1,o>>=-l,l+=n;l>0;s=256*s+t[e+f],f+=h,l-=8);if(0===o)o=1-c;else{if(o===u)return s?NaN:1/0*(d?-1:1);s+=Math.pow(2,n),o-=c}return(d?-1:1)*s*Math.pow(2,o-n)},e.write=function(t,e,r,n,i,o){var s,a,u,c=8*o-i-1,l=(1<>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:o-1,p=n?1:-1,y=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=l):(s=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-s))<1&&(s--,u*=2),(e+=s+f>=1?h/u:h*Math.pow(2,1-f))*u>=2&&(s++,u/=2),s+f>=l?(a=0,s=l):s+f>=1?(a=(e*u-1)*Math.pow(2,i),s+=f):(a=e*Math.pow(2,f-1)*Math.pow(2,i),s=0));i>=8;t[r+d]=255&a,d+=p,a/=256,i-=8);for(s=s<0;t[r+d]=255&s,d+=p,s/=256,c-=8);t[r+d-p]|=128*y}},function(t,e){},function(t,e,r){"use strict";var n=r(43).Buffer,i=r(112);t.exports=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.head=null,this.tail=null,this.length=0}return t.prototype.push=function(t){var e={data:t,next:null};this.length>0?this.tail.next=e:this.head=e,this.tail=e,++this.length},t.prototype.unshift=function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length},t.prototype.shift=function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}},t.prototype.clear=function(){this.head=this.tail=null,this.length=0},t.prototype.join=function(t){if(0===this.length)return"";for(var e=this.head,r=""+e.data;e=e.next;)r+=t+e.data;return r},t.prototype.concat=function(t){if(0===this.length)return n.alloc(0);for(var e,r,i,o=n.allocUnsafe(t>>>0),s=this.head,a=0;s;)e=s.data,r=o,i=a,e.copy(r,i),a+=s.data.length,s=s.next;return o},t}(),i&&i.inspect&&i.inspect.custom&&(t.exports.prototype[i.inspect.custom]=function(){var t=i.inspect({length:this.length});return this.constructor.name+" "+t})},function(t,e){},function(t,e,r){(function(t){var n=void 0!==t&&t||"undefined"!=typeof self&&self||window,i=Function.prototype.apply;function o(t,e){this._id=t,this._clearFn=e}e.setTimeout=function(){return new o(i.call(setTimeout,n,arguments),clearTimeout)},e.setInterval=function(){return new o(i.call(setInterval,n,arguments),clearInterval)},e.clearTimeout=e.clearInterval=function(t){t&&t.close()},o.prototype.unref=o.prototype.ref=function(){},o.prototype.close=function(){this._clearFn.call(n,this._id)},e.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},e.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},e._unrefActive=e.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;e>=0&&(t._idleTimeoutId=setTimeout((function(){t._onTimeout&&t._onTimeout()}),e))},r(114),e.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==t&&t.setImmediate||this&&this.setImmediate,e.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==t&&t.clearImmediate||this&&this.clearImmediate}).call(this,r(3))},function(t,e,r){(function(t,e){!function(t,r){"use strict";if(!t.setImmediate){var n,i,o,s,a,u=1,c={},l=!1,f=t.document,h=Object.getPrototypeOf&&Object.getPrototypeOf(t);h=h&&h.setTimeout?h:t,"[object process]"==={}.toString.call(t.process)?n=function(t){e.nextTick((function(){p(t)}))}:!function(){if(t.postMessage&&!t.importScripts){var e=!0,r=t.onmessage;return t.onmessage=function(){e=!1},t.postMessage("","*"),t.onmessage=r,e}}()?t.MessageChannel?((o=new MessageChannel).port1.onmessage=function(t){p(t.data)},n=function(t){o.port2.postMessage(t)}):f&&"onreadystatechange"in f.createElement("script")?(i=f.documentElement,n=function(t){var e=f.createElement("script");e.onreadystatechange=function(){p(t),e.onreadystatechange=null,i.removeChild(e),e=null},i.appendChild(e)}):n=function(t){setTimeout(p,0,t)}:(s="setImmediate$"+Math.random()+"$",a=function(e){e.source===t&&"string"==typeof e.data&&0===e.data.indexOf(s)&&p(+e.data.slice(s.length))},t.addEventListener?t.addEventListener("message",a,!1):t.attachEvent("onmessage",a),n=function(e){t.postMessage(s+e,"*")}),h.setImmediate=function(t){"function"!=typeof t&&(t=new Function(""+t));for(var e=new Array(arguments.length-1),r=0;r>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24)}function c(){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 n.Buf16(320),this.work=new n.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function l(t){var e;return t&&t.state?(e=t.state,t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=1&e.wrap),e.mode=1,e.last=0,e.havedict=0,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new n.Buf32(852),e.distcode=e.distdyn=new n.Buf32(592),e.sane=1,e.back=-1,0):-2}function f(t){var e;return t&&t.state?((e=t.state).wsize=0,e.whave=0,e.wnext=0,l(t)):-2}function h(t,e){var r,n;return t&&t.state?(n=t.state,e<0?(r=0,e=-e):(r=1+(e>>4),e<48&&(e&=15)),e&&(e<8||e>15)?-2:(null!==n.window&&n.wbits!==e&&(n.window=null),n.wrap=r,n.wbits=e,f(t))):-2}function d(t,e){var r,n;return t?(n=new c,t.state=n,n.window=null,0!==(r=h(t,e))&&(t.state=null),r):-2}var p,y,g=!0;function m(t){if(g){var e;for(p=new n.Buf32(512),y=new n.Buf32(32),e=0;e<144;)t.lens[e++]=8;for(;e<256;)t.lens[e++]=9;for(;e<280;)t.lens[e++]=7;for(;e<288;)t.lens[e++]=8;for(a(1,t.lens,0,288,p,0,t.work,{bits:9}),e=0;e<32;)t.lens[e++]=5;a(2,t.lens,0,32,y,0,t.work,{bits:5}),g=!1}t.lencode=p,t.lenbits=9,t.distcode=y,t.distbits=5}function b(t,e,r,i){var o,s=t.state;return null===s.window&&(s.wsize=1<=s.wsize?(n.arraySet(s.window,e,r-s.wsize,s.wsize,0),s.wnext=0,s.whave=s.wsize):((o=s.wsize-s.wnext)>i&&(o=i),n.arraySet(s.window,e,r-i,o,s.wnext),(i-=o)?(n.arraySet(s.window,e,r-i,i,0),s.wnext=i,s.whave=s.wsize):(s.wnext+=o,s.wnext===s.wsize&&(s.wnext=0),s.whave>>8&255,r.check=o(r.check,L,2,0),y=0,g=0,r.mode=2;break}if(r.flags=0,r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&y)<<8)+(y>>8))%31){t.msg="incorrect header check",r.mode=30;break}if(8!=(15&y)){t.msg="unknown compression method",r.mode=30;break}if(g-=4,I=8+(15&(y>>>=4)),0===r.wbits)r.wbits=I;else if(I>r.wbits){t.msg="invalid window size",r.mode=30;break}r.dmax=1<>8&1),512&r.flags&&(L[0]=255&y,L[1]=y>>>8&255,r.check=o(r.check,L,2,0)),y=0,g=0,r.mode=3;case 3:for(;g<32;){if(0===d)break t;d--,y+=c[f++]<>>8&255,L[2]=y>>>16&255,L[3]=y>>>24&255,r.check=o(r.check,L,4,0)),y=0,g=0,r.mode=4;case 4:for(;g<16;){if(0===d)break t;d--,y+=c[f++]<>8),512&r.flags&&(L[0]=255&y,L[1]=y>>>8&255,r.check=o(r.check,L,2,0)),y=0,g=0,r.mode=5;case 5:if(1024&r.flags){for(;g<16;){if(0===d)break t;d--,y+=c[f++]<>>8&255,r.check=o(r.check,L,2,0)),y=0,g=0}else r.head&&(r.head.extra=null);r.mode=6;case 6:if(1024&r.flags&&((x=r.length)>d&&(x=d),x&&(r.head&&(I=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),n.arraySet(r.head.extra,c,f,x,I)),512&r.flags&&(r.check=o(r.check,c,x,f)),d-=x,f+=x,r.length-=x),r.length))break t;r.length=0,r.mode=7;case 7:if(2048&r.flags){if(0===d)break t;x=0;do{I=c[f+x++],r.head&&I&&r.length<65536&&(r.head.name+=String.fromCharCode(I))}while(I&&x>9&1,r.head.done=!0),t.adler=r.check=0,r.mode=12;break;case 10:for(;g<32;){if(0===d)break t;d--,y+=c[f++]<>>=7&g,g-=7&g,r.mode=27;break}for(;g<3;){if(0===d)break t;d--,y+=c[f++]<>>=1)){case 0:r.mode=14;break;case 1:if(m(r),r.mode=20,6===e){y>>>=2,g-=2;break t}break;case 2:r.mode=17;break;case 3:t.msg="invalid block type",r.mode=30}y>>>=2,g-=2;break;case 14:for(y>>>=7&g,g-=7&g;g<32;){if(0===d)break t;d--,y+=c[f++]<>>16^65535)){t.msg="invalid stored block lengths",r.mode=30;break}if(r.length=65535&y,y=0,g=0,r.mode=15,6===e)break t;case 15:r.mode=16;case 16:if(x=r.length){if(x>d&&(x=d),x>p&&(x=p),0===x)break t;n.arraySet(l,c,f,x,h),d-=x,f+=x,p-=x,h+=x,r.length-=x;break}r.mode=12;break;case 17:for(;g<14;){if(0===d)break t;d--,y+=c[f++]<>>=5,g-=5,r.ndist=1+(31&y),y>>>=5,g-=5,r.ncode=4+(15&y),y>>>=4,g-=4,r.nlen>286||r.ndist>30){t.msg="too many length or distance symbols",r.mode=30;break}r.have=0,r.mode=18;case 18:for(;r.have>>=3,g-=3}for(;r.have<19;)r.lens[F[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,R={bits:r.lenbits},P=a(0,r.lens,0,19,r.lencode,0,r.work,R),r.lenbits=R.bits,P){t.msg="invalid code lengths set",r.mode=30;break}r.have=0,r.mode=19;case 19:for(;r.have>>16&255,k=65535&M,!((A=M>>>24)<=g);){if(0===d)break t;d--,y+=c[f++]<>>=A,g-=A,r.lens[r.have++]=k;else{if(16===k){for(j=A+2;g>>=A,g-=A,0===r.have){t.msg="invalid bit length repeat",r.mode=30;break}I=r.lens[r.have-1],x=3+(3&y),y>>>=2,g-=2}else if(17===k){for(j=A+3;g>>=A)),y>>>=3,g-=3}else{for(j=A+7;g>>=A)),y>>>=7,g-=7}if(r.have+x>r.nlen+r.ndist){t.msg="invalid bit length repeat",r.mode=30;break}for(;x--;)r.lens[r.have++]=I}}if(30===r.mode)break;if(0===r.lens[256]){t.msg="invalid code -- missing end-of-block",r.mode=30;break}if(r.lenbits=9,R={bits:r.lenbits},P=a(1,r.lens,0,r.nlen,r.lencode,0,r.work,R),r.lenbits=R.bits,P){t.msg="invalid literal/lengths set",r.mode=30;break}if(r.distbits=6,r.distcode=r.distdyn,R={bits:r.distbits},P=a(2,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,R),r.distbits=R.bits,P){t.msg="invalid distances set",r.mode=30;break}if(r.mode=20,6===e)break t;case 20:r.mode=21;case 21:if(d>=6&&p>=258){t.next_out=h,t.avail_out=p,t.next_in=f,t.avail_in=d,r.hold=y,r.bits=g,s(t,w),h=t.next_out,l=t.output,p=t.avail_out,f=t.next_in,c=t.input,d=t.avail_in,y=r.hold,g=r.bits,12===r.mode&&(r.back=-1);break}for(r.back=0;E=(M=r.lencode[y&(1<>>16&255,k=65535&M,!((A=M>>>24)<=g);){if(0===d)break t;d--,y+=c[f++]<>T)])>>>16&255,k=65535&M,!(T+(A=M>>>24)<=g);){if(0===d)break t;d--,y+=c[f++]<>>=T,g-=T,r.back+=T}if(y>>>=A,g-=A,r.back+=A,r.length=k,0===E){r.mode=26;break}if(32&E){r.back=-1,r.mode=12;break}if(64&E){t.msg="invalid literal/length code",r.mode=30;break}r.extra=15&E,r.mode=22;case 22:if(r.extra){for(j=r.extra;g>>=r.extra,g-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=23;case 23:for(;E=(M=r.distcode[y&(1<>>16&255,k=65535&M,!((A=M>>>24)<=g);){if(0===d)break t;d--,y+=c[f++]<>T)])>>>16&255,k=65535&M,!(T+(A=M>>>24)<=g);){if(0===d)break t;d--,y+=c[f++]<>>=T,g-=T,r.back+=T}if(y>>>=A,g-=A,r.back+=A,64&E){t.msg="invalid distance code",r.mode=30;break}r.offset=k,r.extra=15&E,r.mode=24;case 24:if(r.extra){for(j=r.extra;g>>=r.extra,g-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){t.msg="invalid distance too far back",r.mode=30;break}r.mode=25;case 25:if(0===p)break t;if(x=w-p,r.offset>x){if((x=r.offset-x)>r.whave&&r.sane){t.msg="invalid distance too far back",r.mode=30;break}x>r.wnext?(x-=r.wnext,_=r.wsize-x):_=r.wnext-x,x>r.length&&(x=r.length),S=r.window}else S=l,_=h-r.offset,x=r.length;x>p&&(x=p),p-=x,r.length-=x;do{l[h++]=S[_++]}while(--x);0===r.length&&(r.mode=21);break;case 26:if(0===p)break t;l[h++]=r.length,p--,r.mode=21;break;case 27:if(r.wrap){for(;g<32;){if(0===d)break t;d--,y|=c[f++]<>>16&65535|0,s=0;0!==r;){r-=s=r>2e3?2e3:r;do{o=o+(i=i+e[n++]|0)|0}while(--s);i%=65521,o%=65521}return i|o<<16|0}},function(t,e,r){"use strict";var n=function(){for(var t,e=[],r=0;r<256;r++){t=r;for(var n=0;n<8;n++)t=1&t?3988292384^t>>>1:t>>>1;e[r]=t}return e}();t.exports=function(t,e,r,i){var o=n,s=i+r;t^=-1;for(var a=i;a>>8^o[255&(t^e[a])];return-1^t}},function(t,e,r){"use strict";t.exports=function(t,e){var r,n,i,o,s,a,u,c,l,f,h,d,p,y,g,m,b,v,w,x,_,S,A,E,k;r=t.state,n=t.next_in,E=t.input,i=n+(t.avail_in-5),o=t.next_out,k=t.output,s=o-(e-t.avail_out),a=o+(t.avail_out-257),u=r.dmax,c=r.wsize,l=r.whave,f=r.wnext,h=r.window,d=r.hold,p=r.bits,y=r.lencode,g=r.distcode,m=(1<>>=w=v>>>24,p-=w,0===(w=v>>>16&255))k[o++]=65535&v;else{if(!(16&w)){if(0==(64&w)){v=y[(65535&v)+(d&(1<>>=w,p-=w),p<15&&(d+=E[n++]<>>=w=v>>>24,p-=w,!(16&(w=v>>>16&255))){if(0==(64&w)){v=g[(65535&v)+(d&(1<u){t.msg="invalid distance too far back",r.mode=30;break t}if(d>>>=w,p-=w,_>(w=o-s)){if((w=_-w)>l&&r.sane){t.msg="invalid distance too far back",r.mode=30;break t}if(S=0,A=h,0===f){if(S+=c-w,w2;)k[o++]=A[S++],k[o++]=A[S++],k[o++]=A[S++],x-=3;x&&(k[o++]=A[S++],x>1&&(k[o++]=A[S++]))}else{S=o-_;do{k[o++]=k[S++],k[o++]=k[S++],k[o++]=k[S++],x-=3}while(x>2);x&&(k[o++]=k[S++],x>1&&(k[o++]=k[S++]))}break}}break}}while(n>3,d&=(1<<(p-=x<<3))-1,t.next_in=n,t.next_out=o,t.avail_in=n=1&&0===L[k];k--);if(T>k&&(T=k),0===k)return c[l++]=20971520,c[l++]=20971520,h.bits=1,0;for(E=1;E0&&(0===t||1!==k))return-1;for(F[1]=0,S=1;S<15;S++)F[S+1]=F[S]+L[S];for(A=0;A852||2===t&&P>592)return 1;for(;;){v=S-O,f[A]b?(w=N[D+f[A]],x=j[M+f[A]]):(w=96,x=0),d=1<>O)+(p-=d)]=v<<24|w<<16|x|0}while(0!==p);for(d=1<>=1;if(0!==d?(R&=d-1,R+=d):R=0,A++,0==--L[S]){if(S===k)break;S=e[r+f[A]]}if(S>T&&(R&g)!==y){for(0===O&&(O=T),m+=E,I=1<<(C=S-O);C+O852||2===t&&P>592)return 1;c[y=R&g]=T<<24|C<<16|m-l|0}}return 0!==R&&(c[m+R]=S-O<<24|64<<16|0),h.bits=T,0}},function(t,e,r){"use strict";var n=r(29),i=!0,o=!0;try{String.fromCharCode.apply(null,[0])}catch(t){i=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(t){o=!1}for(var s=new n.Buf8(256),a=0;a<256;a++)s[a]=a>=252?6:a>=248?5:a>=240?4:a>=224?3:a>=192?2:1;function u(t,e){if(e<65534&&(t.subarray&&o||!t.subarray&&i))return String.fromCharCode.apply(null,n.shrinkBuf(t,e));for(var r="",s=0;s>>6,e[s++]=128|63&r):r<65536?(e[s++]=224|r>>>12,e[s++]=128|r>>>6&63,e[s++]=128|63&r):(e[s++]=240|r>>>18,e[s++]=128|r>>>12&63,e[s++]=128|r>>>6&63,e[s++]=128|63&r);return e},e.buf2binstring=function(t){return u(t,t.length)},e.binstring2buf=function(t){for(var e=new n.Buf8(t.length),r=0,i=e.length;r4)c[n++]=65533,r+=o-1;else{for(i&=2===o?31:3===o?15:7;o>1&&r1?c[n++]=65533:i<65536?c[n++]=i:(i-=65536,c[n++]=55296|i>>10&1023,c[n++]=56320|1023&i)}return u(c,n)},e.utf8border=function(t,e){var r;for((e=e||t.length)>t.length&&(e=t.length),r=e-1;r>=0&&128==(192&t[r]);)r--;return r<0||0===r?e:r+s[t[r]]>e?r:e}},function(t,e,r){"use strict";t.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},function(t,e,r){"use strict";t.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},function(t,e,r){"use strict";t.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}},function(t,e,r){"use strict";t.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},function(t,e,r){t.exports=r.p+"0.bce5ef15ddaa1e171e9d.worker.worker.js"},function(t,e,r){t.exports=function(t){function e(t){let r,i,o,s=null;function a(...t){if(!a.enabled)return;const n=a,i=Number(new Date),o=i-(r||i);n.diff=o,n.prev=r,n.curr=i,r=i,t[0]=e.coerce(t[0]),"string"!=typeof t[0]&&t.unshift("%O");let s=0;t[0]=t[0].replace(/%([a-zA-Z%])/g,(r,i)=>{if("%%"===r)return"%";s++;const o=e.formatters[i];if("function"==typeof o){const e=t[s];r=o.call(n,e),t.splice(s,1),s--}return r}),e.formatArgs.call(n,t);(n.log||e.log).apply(n,t)}return a.namespace=t,a.useColors=e.useColors(),a.color=e.selectColor(t),a.extend=n,a.destroy=e.destroy,Object.defineProperty(a,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==s?s:(i!==e.namespaces&&(i=e.namespaces,o=e.enabled(t)),o),set:t=>{s=t}}),"function"==typeof e.init&&e.init(a),a}function n(t,r){const n=e(this.namespace+(void 0===r?":":r)+t);return n.log=this.log,n}function i(t){return t.toString().substring(2,t.toString().length-2).replace(/\\.\\*\\?$/,"*")}return e.debug=e,e.default=e,e.coerce=function(t){if(t instanceof Error)return t.stack||t.message;return t},e.disable=function(){const t=[...e.names.map(i),...e.skips.map(i).map(t=>"-"+t)].join(",");return e.enable(""),t},e.enable=function(t){let r;e.save(t),e.namespaces=t,e.names=[],e.skips=[];const n=("string"==typeof t?t:"").split(/[\\s,]+/),i=n.length;for(r=0;r{e[r]=t[r]}),e.names=[],e.skips=[],e.formatters={},e.selectColor=function(t){let r=0;for(let e=0;e=1.5*r;return Math.round(t/r)+" "+n+(i?"s":"")}t.exports=function(t,e){e=e||{};var a=typeof t;if("string"===a&&t.length>0)return function(t){if((t=String(t)).length>100)return;var e=/^(-?(?:\\d+)?\\.?\\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(!e)return;var s=parseFloat(e[1]);switch((e[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*s;case"weeks":case"week":case"w":return 6048e5*s;case"days":case"day":case"d":return s*o;case"hours":case"hour":case"hrs":case"hr":case"h":return s*i;case"minutes":case"minute":case"mins":case"min":case"m":return s*n;case"seconds":case"second":case"secs":case"sec":case"s":return s*r;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}(t);if("number"===a&&isFinite(t))return e.long?function(t){var e=Math.abs(t);if(e>=o)return s(t,e,o,"day");if(e>=i)return s(t,e,i,"hour");if(e>=n)return s(t,e,n,"minute");if(e>=r)return s(t,e,r,"second");return t+" ms"}(t):function(t){var e=Math.abs(t);if(e>=o)return Math.round(t/o)+"d";if(e>=i)return Math.round(t/i)+"h";if(e>=n)return Math.round(t/n)+"m";if(e>=r)return Math.round(t/r)+"s";return t+"ms"}(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))}},function(t,e,r){(function(e,n,i){var o=r(69),s=r(10),a=r(70),u=r(42),c=r(132),l=a.IncomingMessage,f=a.readyStates;var h=t.exports=function(t){var r,n=this;u.Writable.call(n),n._opts=t,n._body=[],n._headers={},t.auth&&n.setHeader("Authorization","Basic "+new e(t.auth).toString("base64")),Object.keys(t.headers).forEach((function(e){n.setHeader(e,t.headers[e])}));var i=!0;if("disable-fetch"===t.mode||"requestTimeout"in t&&!o.abortController)i=!1,r=!0;else if("prefer-streaming"===t.mode)r=!1;else if("allow-wrong-content-type"===t.mode)r=!o.overrideMimeType;else{if(t.mode&&"default"!==t.mode&&"prefer-fast"!==t.mode)throw new Error("Invalid value for opts.mode");r=!0}n._mode=function(t,e){return o.fetch&&e?"fetch":o.mozchunkedarraybuffer?"moz-chunked-arraybuffer":o.msstream?"ms-stream":o.arraybuffer&&t?"arraybuffer":o.vbArray&&t?"text:vbarray":"text"}(r,i),n._fetchTimer=null,n.on("finish",(function(){n._onFinish()}))};s(h,u.Writable),h.prototype.setHeader=function(t,e){var r=t.toLowerCase();-1===d.indexOf(r)&&(this._headers[r]={name:t,value:e})},h.prototype.getHeader=function(t){var e=this._headers[t.toLowerCase()];return e?e.value:null},h.prototype.removeHeader=function(t){delete this._headers[t.toLowerCase()]},h.prototype._onFinish=function(){var t=this;if(!t._destroyed){var r=t._opts,s=t._headers,a=null;"GET"!==r.method&&"HEAD"!==r.method&&(a=o.arraybuffer?c(e.concat(t._body)):o.blobConstructor?new n.Blob(t._body.map((function(t){return c(t)})),{type:(s["content-type"]||{}).value||""}):e.concat(t._body).toString());var u=[];if(Object.keys(s).forEach((function(t){var e=s[t].name,r=s[t].value;Array.isArray(r)?r.forEach((function(t){u.push([e,t])})):u.push([e,r])})),"fetch"===t._mode){var l=null;if(o.abortController){var h=new AbortController;l=h.signal,t._fetchAbortController=h,"requestTimeout"in r&&0!==r.requestTimeout&&(t._fetchTimer=n.setTimeout((function(){t.emit("requestTimeout"),t._fetchAbortController&&t._fetchAbortController.abort()}),r.requestTimeout))}n.fetch(t._opts.url,{method:t._opts.method,headers:u,body:a||void 0,mode:"cors",credentials:r.withCredentials?"include":"same-origin",signal:l}).then((function(e){t._fetchResponse=e,t._connect()}),(function(e){n.clearTimeout(t._fetchTimer),t._destroyed||t.emit("error",e)}))}else{var d=t._xhr=new n.XMLHttpRequest;try{d.open(t._opts.method,t._opts.url,!0)}catch(e){return void i.nextTick((function(){t.emit("error",e)}))}"responseType"in d&&(d.responseType=t._mode.split(":")[0]),"withCredentials"in d&&(d.withCredentials=!!r.withCredentials),"text"===t._mode&&"overrideMimeType"in d&&d.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in r&&(d.timeout=r.requestTimeout,d.ontimeout=function(){t.emit("requestTimeout")}),u.forEach((function(t){d.setRequestHeader(t[0],t[1])})),t._response=null,d.onreadystatechange=function(){switch(d.readyState){case f.LOADING:case f.DONE:t._onXHRProgress()}},"moz-chunked-arraybuffer"===t._mode&&(d.onprogress=function(){t._onXHRProgress()}),d.onerror=function(){t._destroyed||t.emit("error",new Error("XHR error"))};try{d.send(a)}catch(e){return void i.nextTick((function(){t.emit("error",e)}))}}}},h.prototype._onXHRProgress=function(){(function(t){try{var e=t.status;return null!==e&&0!==e}catch(t){return!1}})(this._xhr)&&!this._destroyed&&(this._response||this._connect(),this._response._onXHRProgress())},h.prototype._connect=function(){var t=this;t._destroyed||(t._response=new l(t._xhr,t._fetchResponse,t._mode,t._fetchTimer),t._response.on("error",(function(e){t.emit("error",e)})),t.emit("response",t._response))},h.prototype._write=function(t,e,r){this._body.push(t),r()},h.prototype.abort=h.prototype.destroy=function(){this._destroyed=!0,n.clearTimeout(this._fetchTimer),this._response&&(this._response._destroyed=!0),this._xhr?this._xhr.abort():this._fetchAbortController&&this._fetchAbortController.abort()},h.prototype.end=function(t,e,r){"function"==typeof t&&(r=t,t=void 0),u.Writable.prototype.end.call(this,t,e,r)},h.prototype.flushHeaders=function(){},h.prototype.setTimeout=function(){},h.prototype.setNoDelay=function(){},h.prototype.setSocketKeepAlive=function(){};var d=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","via"]}).call(this,r(9).Buffer,r(3),r(7))},function(t,e,r){var n=r(9).Buffer;t.exports=function(t){if(t instanceof Uint8Array){if(0===t.byteOffset&&t.byteLength===t.buffer.byteLength)return t.buffer;if("function"==typeof t.buffer.slice)return t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength)}if(n.isBuffer(t)){for(var e=new Uint8Array(t.length),r=t.length,i=0;i= 0x80 (not a basic code point)","invalid-input":"Invalid input"},d=Math.floor,p=String.fromCharCode;function y(t){throw new RangeError(h[t])}function g(t,e){for(var r=t.length,n=[];r--;)n[r]=e(t[r]);return n}function m(t,e){var r=t.split("@"),n="";return r.length>1&&(n=r[0]+"@",t=r[1]),n+g((t=t.replace(f,".")).split("."),e).join(".")}function b(t){for(var e,r,n=[],i=0,o=t.length;i=55296&&e<=56319&&i65535&&(e+=p((t-=65536)>>>10&1023|55296),t=56320|1023&t),e+=p(t)})).join("")}function w(t,e){return t+22+75*(t<26)-((0!=e)<<5)}function x(t,e,r){var n=0;for(t=r?d(t/700):t>>1,t+=d(t/e);t>455;n+=36)t=d(t/35);return d(n+36*t/(t+38))}function _(t){var e,r,n,i,o,s,a,c,l,f,h,p=[],g=t.length,m=0,b=128,w=72;for((r=t.lastIndexOf("-"))<0&&(r=0),n=0;n=128&&y("not-basic"),p.push(t.charCodeAt(n));for(i=r>0?r+1:0;i=g&&y("invalid-input"),((c=(h=t.charCodeAt(i++))-48<10?h-22:h-65<26?h-65:h-97<26?h-97:36)>=36||c>d((u-m)/s))&&y("overflow"),m+=c*s,!(c<(l=a<=w?1:a>=w+26?26:a-w));a+=36)s>d(u/(f=36-l))&&y("overflow"),s*=f;w=x(m-o,e=p.length+1,0==o),d(m/e)>u-b&&y("overflow"),b+=d(m/e),m%=e,p.splice(m++,0,b)}return v(p)}function S(t){var e,r,n,i,o,s,a,c,l,f,h,g,m,v,_,S=[];for(g=(t=b(t)).length,e=128,r=0,o=72,s=0;s=e&&hd((u-r)/(m=n+1))&&y("overflow"),r+=(a-e)*m,e=a,s=0;su&&y("overflow"),h==e){for(c=r,l=36;!(c<(f=l<=o?1:l>=o+26?26:l-o));l+=36)_=c-f,v=36-f,S.push(p(w(f+_%v,0))),c=d(_/v);S.push(p(w(c,0))),o=x(r,m,n==i),r=0,++n}++r,++e}return S.join("")}a={version:"1.4.1",ucs2:{decode:b,encode:v},decode:_,encode:S,toASCII:function(t){return m(t,(function(t){return l.test(t)?"xn--"+S(t):t}))},toUnicode:function(t){return m(t,(function(t){return c.test(t)?_(t.slice(4).toLowerCase()):t}))}},void 0===(i=function(){return a}.call(e,r,e,t))||(t.exports=i)}()}).call(this,r(136)(t),r(3))},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e,r){"use strict";var n=r(138),i=r(149),o=r(46);t.exports={formats:o,parse:i,stringify:n}},function(t,e,r){"use strict";var n=r(139),i=r(71),o=r(46),s=Object.prototype.hasOwnProperty,a={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,e){return t+"["+e+"]"},repeat:function(t){return t}},u=Array.isArray,c=Array.prototype.push,l=function(t,e){c.apply(t,u(e)?e:[e])},f=Date.prototype.toISOString,h=o.default,d={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:i.encode,encodeValuesOnly:!1,format:h,formatter:o.formatters[h],indices:!1,serializeDate:function(t){return f.call(t)},skipNulls:!1,strictNullHandling:!1},p={},y=function t(e,r,o,s,a,c,f,h,y,g,m,b,v,w,x,_){for(var S,A=e,E=_,k=0,T=!1;void 0!==(E=E.get(p))&&!T;){var C=E.get(e);if(k+=1,void 0!==C){if(C===k)throw new RangeError("Cyclic object value");T=!0}void 0===E.get(p)&&(k=0)}if("function"==typeof h?A=h(r,A):A instanceof Date?A=m(A):"comma"===o&&u(A)&&(A=i.maybeMap(A,(function(t){return t instanceof Date?m(t):t}))),null===A){if(a)return f&&!w?f(r,d.encoder,x,"key",b):r;A=""}if("string"==typeof(S=A)||"number"==typeof S||"boolean"==typeof S||"symbol"==typeof S||"bigint"==typeof S||i.isBuffer(A))return f?[v(w?r:f(r,d.encoder,x,"key",b))+"="+v(f(A,d.encoder,x,"value",b))]:[v(r)+"="+v(String(A))];var O,I=[];if(void 0===A)return I;if("comma"===o&&u(A))w&&f&&(A=i.maybeMap(A,f)),O=[{value:A.length>0?A.join(",")||null:void 0}];else if(u(h))O=h;else{var P=Object.keys(A);O=y?P.sort(y):P}for(var R=s&&u(A)&&1===A.length?r+"[]":r,j=0;j0?x+w:""}},function(t,e,r){"use strict";var n=r(44),i=r(145),o=r(147),s=n("%TypeError%"),a=n("%WeakMap%",!0),u=n("%Map%",!0),c=i("WeakMap.prototype.get",!0),l=i("WeakMap.prototype.set",!0),f=i("WeakMap.prototype.has",!0),h=i("Map.prototype.get",!0),d=i("Map.prototype.set",!0),p=i("Map.prototype.has",!0),y=function(t,e){for(var r,n=t;null!==(r=n.next);n=r)if(r.key===e)return n.next=r.next,r.next=t.next,t.next=r,r};t.exports=function(){var t,e,r,n={assert:function(t){if(!n.has(t))throw new s("Side channel does not contain "+o(t))},get:function(n){if(a&&n&&("object"==typeof n||"function"==typeof n)){if(t)return c(t,n)}else if(u){if(e)return h(e,n)}else if(r)return function(t,e){var r=y(t,e);return r&&r.value}(r,n)},has:function(n){if(a&&n&&("object"==typeof n||"function"==typeof n)){if(t)return f(t,n)}else if(u){if(e)return p(e,n)}else if(r)return function(t,e){return!!y(t,e)}(r,n);return!1},set:function(n,i){a&&n&&("object"==typeof n||"function"==typeof n)?(t||(t=new a),l(t,n,i)):u?(e||(e=new u),d(e,n,i)):(r||(r={key:{},next:null}),function(t,e,r){var n=y(t,e);n?n.value=r:t.next={key:e,next:t.next,value:r}}(r,n,i))}};return n}},function(t,e,r){"use strict";var n="undefined"!=typeof Symbol&&Symbol,i=r(141);t.exports=function(){return"function"==typeof n&&("function"==typeof Symbol&&("symbol"==typeof n("foo")&&("symbol"==typeof Symbol("bar")&&i())))}},function(t,e,r){"use strict";t.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var t={},e=Symbol("test"),r=Object(e);if("string"==typeof e)return!1;if("[object Symbol]"!==Object.prototype.toString.call(e))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(e in t[e]=42,t)return!1;if("function"==typeof Object.keys&&0!==Object.keys(t).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(t).length)return!1;var n=Object.getOwnPropertySymbols(t);if(1!==n.length||n[0]!==e)return!1;if(!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var i=Object.getOwnPropertyDescriptor(t,e);if(42!==i.value||!0!==i.enumerable)return!1}return!0}},function(t,e,r){"use strict";var n={foo:{}},i=Object;t.exports=function(){return{__proto__:n}.foo===n.foo&&!({__proto__:null}instanceof i)}},function(t,e,r){"use strict";var n="Function.prototype.bind called on incompatible ",i=Array.prototype.slice,o=Object.prototype.toString;t.exports=function(t){var e=this;if("function"!=typeof e||"[object Function]"!==o.call(e))throw new TypeError(n+e);for(var r,s=i.call(arguments,1),a=function(){if(this instanceof r){var n=e.apply(this,s.concat(i.call(arguments)));return Object(n)===n?n:this}return e.apply(t,s.concat(i.call(arguments)))},u=Math.max(0,e.length-s.length),c=[],l=0;l-1?i(r):r}},function(t,e,r){"use strict";var n=r(45),i=r(44),o=i("%Function.prototype.apply%"),s=i("%Function.prototype.call%"),a=i("%Reflect.apply%",!0)||n.call(s,o),u=i("%Object.getOwnPropertyDescriptor%",!0),c=i("%Object.defineProperty%",!0),l=i("%Math.max%");if(c)try{c({},"a",{value:1})}catch(t){c=null}t.exports=function(t){var e=a(n,s,arguments);if(u&&c){var r=u(e,"length");r.configurable&&c(e,"length",{value:1+l(0,t.length-(arguments.length-1))})}return e};var f=function(){return a(n,o,arguments)};c?c(t.exports,"apply",{value:f}):t.exports.apply=f},function(t,e,r){var n="function"==typeof Map&&Map.prototype,i=Object.getOwnPropertyDescriptor&&n?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,o=n&&i&&"function"==typeof i.get?i.get:null,s=n&&Map.prototype.forEach,a="function"==typeof Set&&Set.prototype,u=Object.getOwnPropertyDescriptor&&a?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,c=a&&u&&"function"==typeof u.get?u.get:null,l=a&&Set.prototype.forEach,f="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,h="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,d="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,p=Boolean.prototype.valueOf,y=Object.prototype.toString,g=Function.prototype.toString,m=String.prototype.match,b=String.prototype.slice,v=String.prototype.replace,w=String.prototype.toUpperCase,x=String.prototype.toLowerCase,_=RegExp.prototype.test,S=Array.prototype.concat,A=Array.prototype.join,E=Array.prototype.slice,k=Math.floor,T="function"==typeof BigInt?BigInt.prototype.valueOf:null,C=Object.getOwnPropertySymbols,O="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,I="function"==typeof Symbol&&"object"==typeof Symbol.iterator,P="function"==typeof Symbol&&Symbol.toStringTag&&(typeof Symbol.toStringTag===I||"symbol")?Symbol.toStringTag:null,R=Object.prototype.propertyIsEnumerable,j=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null);function M(t,e){if(t===1/0||t===-1/0||t!=t||t&&t>-1e3&&t<1e3||_.call(/e/,e))return e;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof t){var n=t<0?-k(-t):k(t);if(n!==t){var i=String(n),o=b.call(e,i.length+1);return v.call(i,r,"$&_")+"."+v.call(v.call(o,/([0-9]{3})/g,"$&_"),/_$/,"")}}return v.call(e,r,"$&_")}var L=r(148),F=L.custom,N=q(F)?F:null;function D(t,e,r){var n="double"===(r.quoteStyle||e)?\'"\':"\'";return n+t+n}function U(t){return v.call(String(t),/"/g,""")}function B(t){return!("[object Array]"!==W(t)||P&&"object"==typeof t&&P in t)}function G(t){return!("[object RegExp]"!==W(t)||P&&"object"==typeof t&&P in t)}function q(t){if(I)return t&&"object"==typeof t&&t instanceof Symbol;if("symbol"==typeof t)return!0;if(!t||"object"!=typeof t||!O)return!1;try{return O.call(t),!0}catch(t){}return!1}t.exports=function t(e,r,n,i){var a=r||{};if(H(a,"quoteStyle")&&"single"!==a.quoteStyle&&"double"!==a.quoteStyle)throw new TypeError(\'option "quoteStyle" must be "single" or "double"\');if(H(a,"maxStringLength")&&("number"==typeof a.maxStringLength?a.maxStringLength<0&&a.maxStringLength!==1/0:null!==a.maxStringLength))throw new TypeError(\'option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`\');var u=!H(a,"customInspect")||a.customInspect;if("boolean"!=typeof u&&"symbol"!==u)throw new TypeError("option \\"customInspect\\", if provided, must be `true`, `false`, or `\'symbol\'`");if(H(a,"indent")&&null!==a.indent&&"\\t"!==a.indent&&!(parseInt(a.indent,10)===a.indent&&a.indent>0))throw new TypeError(\'option "indent" must be "\\\\t", an integer > 0, or `null`\');if(H(a,"numericSeparator")&&"boolean"!=typeof a.numericSeparator)throw new TypeError(\'option "numericSeparator", if provided, must be `true` or `false`\');var y=a.numericSeparator;if(void 0===e)return"undefined";if(null===e)return"null";if("boolean"==typeof e)return e?"true":"false";if("string"==typeof e)return function t(e,r){if(e.length>r.maxStringLength){var n=e.length-r.maxStringLength,i="... "+n+" more character"+(n>1?"s":"");return t(b.call(e,0,r.maxStringLength),r)+i}return D(v.call(v.call(e,/([\'\\\\])/g,"\\\\$1"),/[\\x00-\\x1f]/g,K),"single",r)}(e,a);if("number"==typeof e){if(0===e)return 1/0/e>0?"0":"-0";var w=String(e);return y?M(e,w):w}if("bigint"==typeof e){var _=String(e)+"n";return y?M(e,_):_}var k=void 0===a.depth?5:a.depth;if(void 0===n&&(n=0),n>=k&&k>0&&"object"==typeof e)return B(e)?"[Array]":"[Object]";var C=function(t,e){var r;if("\\t"===t.indent)r="\\t";else{if(!("number"==typeof t.indent&&t.indent>0))return null;r=A.call(Array(t.indent+1)," ")}return{base:r,prev:A.call(Array(e+1),r)}}(a,n);if(void 0===i)i=[];else if(V(i,e)>=0)return"[Circular]";function F(e,r,o){if(r&&(i=E.call(i)).push(r),o){var s={depth:a.depth};return H(a,"quoteStyle")&&(s.quoteStyle=a.quoteStyle),t(e,s,n+1,i)}return t(e,a,n+1,i)}if("function"==typeof e&&!G(e)){var z=function(t){if(t.name)return t.name;var e=m.call(g.call(t),/^function\\s*([\\w$]+)/);if(e)return e[1];return null}(e),J=Q(e,F);return"[Function"+(z?": "+z:" (anonymous)")+"]"+(J.length>0?" { "+A.call(J,", ")+" }":"")}if(q(e)){var tt=I?v.call(String(e),/^(Symbol\\(.*\\))_[^)]*$/,"$1"):O.call(e);return"object"!=typeof e||I?tt:$(tt)}if(function(t){if(!t||"object"!=typeof t)return!1;if("undefined"!=typeof HTMLElement&&t instanceof HTMLElement)return!0;return"string"==typeof t.nodeName&&"function"==typeof t.getAttribute}(e)){for(var et="<"+x.call(String(e.nodeName)),rt=e.attributes||[],nt=0;nt"}if(B(e)){if(0===e.length)return"[]";var it=Q(e,F);return C&&!function(t){for(var e=0;e=0)return!1;return!0}(it)?"["+X(it,C)+"]":"[ "+A.call(it,", ")+" ]"}if(function(t){return!("[object Error]"!==W(t)||P&&"object"==typeof t&&P in t)}(e)){var ot=Q(e,F);return"cause"in Error.prototype||!("cause"in e)||R.call(e,"cause")?0===ot.length?"["+String(e)+"]":"{ ["+String(e)+"] "+A.call(ot,", ")+" }":"{ ["+String(e)+"] "+A.call(S.call("[cause]: "+F(e.cause),ot),", ")+" }"}if("object"==typeof e&&u){if(N&&"function"==typeof e[N]&&L)return L(e,{depth:k-n});if("symbol"!==u&&"function"==typeof e.inspect)return e.inspect()}if(function(t){if(!o||!t||"object"!=typeof t)return!1;try{o.call(t);try{c.call(t)}catch(t){return!0}return t instanceof Map}catch(t){}return!1}(e)){var st=[];return s&&s.call(e,(function(t,r){st.push(F(r,e,!0)+" => "+F(t,e))})),Z("Map",o.call(e),st,C)}if(function(t){if(!c||!t||"object"!=typeof t)return!1;try{c.call(t);try{o.call(t)}catch(t){return!0}return t instanceof Set}catch(t){}return!1}(e)){var at=[];return l&&l.call(e,(function(t){at.push(F(t,e))})),Z("Set",c.call(e),at,C)}if(function(t){if(!f||!t||"object"!=typeof t)return!1;try{f.call(t,f);try{h.call(t,h)}catch(t){return!0}return t instanceof WeakMap}catch(t){}return!1}(e))return Y("WeakMap");if(function(t){if(!h||!t||"object"!=typeof t)return!1;try{h.call(t,h);try{f.call(t,f)}catch(t){return!0}return t instanceof WeakSet}catch(t){}return!1}(e))return Y("WeakSet");if(function(t){if(!d||!t||"object"!=typeof t)return!1;try{return d.call(t),!0}catch(t){}return!1}(e))return Y("WeakRef");if(function(t){return!("[object Number]"!==W(t)||P&&"object"==typeof t&&P in t)}(e))return $(F(Number(e)));if(function(t){if(!t||"object"!=typeof t||!T)return!1;try{return T.call(t),!0}catch(t){}return!1}(e))return $(F(T.call(e)));if(function(t){return!("[object Boolean]"!==W(t)||P&&"object"==typeof t&&P in t)}(e))return $(p.call(e));if(function(t){return!("[object String]"!==W(t)||P&&"object"==typeof t&&P in t)}(e))return $(F(String(e)));if(!function(t){return!("[object Date]"!==W(t)||P&&"object"==typeof t&&P in t)}(e)&&!G(e)){var ut=Q(e,F),ct=j?j(e)===Object.prototype:e instanceof Object||e.constructor===Object,lt=e instanceof Object?"":"null prototype",ft=!ct&&P&&Object(e)===e&&P in e?b.call(W(e),8,-1):lt?"Object":"",ht=(ct||"function"!=typeof e.constructor?"":e.constructor.name?e.constructor.name+" ":"")+(ft||lt?"["+A.call(S.call([],ft||[],lt||[]),": ")+"] ":"");return 0===ut.length?ht+"{}":C?ht+"{"+X(ut,C)+"}":ht+"{ "+A.call(ut,", ")+" }"}return String(e)};var z=Object.prototype.hasOwnProperty||function(t){return t in this};function H(t,e){return z.call(t,e)}function W(t){return y.call(t)}function V(t,e){if(t.indexOf)return t.indexOf(e);for(var r=0,n=t.length;r-1?t.split(","):t},c=function(t,e,r,n){if(t){var o=r.allowDots?t.replace(/\\.([^.[]+)/g,"[$1]"):t,s=/(\\[[^[\\]]*])/g,a=r.depth>0&&/(\\[[^[\\]]*])/.exec(o),c=a?o.slice(0,a.index):o,l=[];if(c){if(!r.plainObjects&&i.call(Object.prototype,c)&&!r.allowPrototypes)return;l.push(c)}for(var f=0;r.depth>0&&null!==(a=s.exec(o))&&f=0;--o){var s,a=t[o];if("[]"===a&&r.parseArrays)s=[].concat(i);else{s=r.plainObjects?Object.create(null):{};var c="["===a.charAt(0)&&"]"===a.charAt(a.length-1)?a.slice(1,-1):a,l=parseInt(c,10);r.parseArrays||""!==c?!isNaN(l)&&a!==c&&String(l)===c&&l>=0&&r.parseArrays&&l<=r.arrayLimit?(s=[])[l]=i:"__proto__"!==c&&(s[c]=i):s={0:i}}i=s}return i}(l,e,r,n)}};t.exports=function(t,e){var r=function(t){if(!t)return s;if(null!==t.decoder&&void 0!==t.decoder&&"function"!=typeof t.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==t.charset&&"utf-8"!==t.charset&&"iso-8859-1"!==t.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var e=void 0===t.charset?s.charset:t.charset;return{allowDots:void 0===t.allowDots?s.allowDots:!!t.allowDots,allowPrototypes:"boolean"==typeof t.allowPrototypes?t.allowPrototypes:s.allowPrototypes,allowSparse:"boolean"==typeof t.allowSparse?t.allowSparse:s.allowSparse,arrayLimit:"number"==typeof t.arrayLimit?t.arrayLimit:s.arrayLimit,charset:e,charsetSentinel:"boolean"==typeof t.charsetSentinel?t.charsetSentinel:s.charsetSentinel,comma:"boolean"==typeof t.comma?t.comma:s.comma,decoder:"function"==typeof t.decoder?t.decoder:s.decoder,delimiter:"string"==typeof t.delimiter||n.isRegExp(t.delimiter)?t.delimiter:s.delimiter,depth:"number"==typeof t.depth||!1===t.depth?+t.depth:s.depth,ignoreQueryPrefix:!0===t.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof t.interpretNumericEntities?t.interpretNumericEntities:s.interpretNumericEntities,parameterLimit:"number"==typeof t.parameterLimit?t.parameterLimit:s.parameterLimit,parseArrays:!1!==t.parseArrays,plainObjects:"boolean"==typeof t.plainObjects?t.plainObjects:s.plainObjects,strictNullHandling:"boolean"==typeof t.strictNullHandling?t.strictNullHandling:s.strictNullHandling}}(e);if(""===t||null==t)return r.plainObjects?Object.create(null):{};for(var l="string"==typeof t?function(t,e){var r,c={__proto__:null},l=e.ignoreQueryPrefix?t.replace(/^\\?/,""):t,f=e.parameterLimit===1/0?void 0:e.parameterLimit,h=l.split(e.delimiter,f),d=-1,p=e.charset;if(e.charsetSentinel)for(r=0;r-1&&(g=o(g)?[g]:g),i.call(c,y)?c[y]=n.combine(c[y],g):c[y]=g}return c}(t,r):t,f=r.plainObjects?Object.create(null):{},h=Object.keys(l),d=0;d{e&&console.log("starting getPalette with image",t);const{fileDirectory:r}=t,{BitsPerSample:n,ColorMap:i,ImageLength:o,ImageWidth:s,PhotometricInterpretation:a,SampleFormat:u,SamplesPerPixel:c}=r;if(!i)throw new Error("[geotiff-palette]: the image does not contain a color map, so we can\'t make a palette.");const l=Math.pow(2,n);e&&console.log("[geotiff-palette]: count:",l);const f=i.length/3;if(e&&console.log("[geotiff-palette]: bandSize:",f),f!==l)throw new Error("[geotiff-palette]: can\'t handle situations where the color map has more or less values than the number of possible values in a raster");const h=f,d=h+f,p=[];for(let t=0;te in t?i(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,c=(t,e)=>i(t,"name",{value:e,configurable:!0});const l=r(152),f=r(187),h=r(189),d=c(t=>new Array(t).fill(0).map((t,e)=>e),"range");function p(t,e={}){var r=e,{bands:n,height:i,precise:c=!1,stats:p,width:y,layout:g}=r,m=((t,e)=>{var r={};for(var n in t)s.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&o)for(var n of o(t))e.indexOf(n)<0&&a.call(t,n)&&(r[n]=t[n]);return r})(r,["bands","height","precise","stats","width","layout"]);if("function"==typeof t.then)throw new Error("[calc-image-stats] you passed in a promise as the data values. please resolve the promise first before calling calcImageStats");const b=f({bands:n,data:t,height:i,layout:g,width:y});null!=n||(n=b.bands),null!=i||(i=b.height),null!=g||(g=b.layout),null!=y||(y=b.width);const v=d(n).map(e=>{let r;const f=((t,e)=>{for(var r in e||(e={}))s.call(e,r)&&u(t,r,e[r]);if(o)for(var r of o(e))a.call(e,r)&&u(t,r,e[r]);return t})({precise:c,stats:p},m);if(["[band][row,column]","[band][column,row]"].includes(g))r=t[e];else if(["[band][row][column]","[band][column][row]"].includes(g))r=t[e],f.chunked=!0;else if(1===n&&["[band,row,column]","[row,column,band]","[column,band,row]","[column,row,band]"].includes(g))r=t;else{const o={band:[e,e]},s={band:n,column:y,row:i};r=h.iterClip({data:t,layout:g,rect:o,sizes:s})}return l(r,f)});return{depth:n,height:i,width:y,bands:v}}c(p,"calcImageStats"),void 0!==(n=function(){return p}.call(e,r,e,t))&&(t.exports=n),t.exports=p,t.exports.default=p,t.exports.calcImageStats=p,"object"==typeof self&&(self.calcImageStats=p),"object"==typeof window&&(self.calcImageStats=p)},function(t,e,r){var n;const{getOrCreateIterator:i}=r(72),{add:o,compare:s,divide:a,mean:u,multiply:c,pow:l,sort:f,subtract:h,sum:d}=r(153),p=r(176);function y(t,{async:e=!1,chunked:r=!1,noData:n,filter:d,calcCount:y=!0,calcHistogram:g=!0,calcInvalid:m=!0,calcMax:b=!0,calcMean:v=!0,calcMedian:w=!0,calcMin:x=!0,calcMode:_=!0,calcModes:S=!0,calcProduct:A=!0,calcRange:E=!0,calcStd:k=!0,calcSum:T=!0,calcValid:C=!0,calcVariance:O=!0,calcUniques:I=!0,precise:P=!1,precise_max_decimal_digits:R=100,stats:j}={debugLevel:0}){j&&(j.forEach(t=>{["count","histogram","invalid","max","mean","median","min","mode","modes","product","range","sum","std","valid","variance","uniques"].includes(t)||console.warn(`[calc-stats] skipping unknown stat "${t}"`)}),y=j.includes("count"),g=j.includes("histogram"),m=j.includes("invalid"),b=j.includes("max"),v=j.includes("mean"),w=j.includes("median"),x=j.includes("min"),_=j.includes("mode"),S=j.includes("modes"),A=j.includes("product"),E=j.includes("range"),k=j.includes("std"),T=j.includes("sum"),C=j.includes("valid"),O=j.includes("variance"),I=j.includes("uniques"));const M=i(t);let L,F,N,D=g||w||_||S||O||k||I,U=y||v||w||A||C||O||k||"function"==typeof d,B=y||m||"function"==typeof d,G=T||v||O||k,q=x||E,z=b||E,H=A,W=0,V=0,K=0,$=P?"0":0;const Y={};let Z,X;Z=P?t=>{t=t.toString(),U&&W++,!q||void 0!==L&&"<"!==s(t,L)||(L=t),!z||void 0!==F&&">"!==s(t,F)||(F=t),H&&(N=1===W?t:c(N,t)),G&&($=o($,t)),D&&(t in Y?Y[t].ct++:Y[t]={n:t.toString(),ct:1})}:t=>{U&&W++,q&&(void 0===L||tF)&&(F=t),H&&(N=1===W?t:N*t),G&&($+=t),D&&(t in Y?Y[t].ct++:Y[t]={n:t,ct:1})},X="number"==typeof n&&"function"==typeof d?t=>{K++,"number"!=typeof t||isNaN(t)||t===n||!0!==d({valid:W,index:K,value:t})?B&&V++:Z(t)}:"number"==typeof n?t=>{"number"!=typeof t||isNaN(t)||t===n?B&&V++:Z(t)}:"function"==typeof d?t=>{K++,"number"!=typeof t||isNaN(t)||!0!==d({valid:W,index:K,value:t})?B&&V++:Z(t)}:t=>{"number"!=typeof t||isNaN(t)?B&&V++:Z(t)};const Q=()=>{const t={};if(y&&(t.count=P?o(V.toString(),W.toString()):V+W),C&&(t.valid=P?W.toString():W),m&&(t.invalid=P?V.toString():V),w&&(t.median=p.calculate({counts:Y,precise:P,total:W})),x&&(t.min=L),b&&(t.max=F),A&&(t.product=N),T&&(t.sum=$),E&&(t.range=P?h(F.toString(),L.toString()):F-L),v||O||k){const e=P?a($,W.toString(),{max_decimal_digits:R}):$/W;if(v&&(t.mean=e),O||k){const r=(({count:t,histogram:e,mean_value:r,precise:n=!1})=>{if(n){r=r.toString();const n=Object.values(e).reduce((t,{n:e,ct:n})=>{const i=h(e.toString(),r);return o(t,c(n.toString(),l(i,"2")))},"0");return a(n,t.toString())}return Object.values(e).reduce((t,{n:e,ct:n})=>t+n*Math.pow(e-r,2),0)/t})({count:W,histogram:Y,mean_value:e,precise:P});O&&(t.variance=r),k&&(t.std=P?Math.sqrt(Number(r)).toString():Math.sqrt(r))}}if(g&&(P&&Object.values(Y).forEach(t=>{t.ct=t.ct.toString()}),t.histogram=Y),_||S){let e=0,r=[];for(let t in Y){const{n:n,ct:i}=Y[t];i===e?r.push(P?n.toString():n):i>e&&(e=i,r=[P?n.toString():n])}S&&(t.modes=r),_&&(t.mode=P?u(r):r.reduce((t,e)=>t+e,0)/r.length)}return I&&(t.uniques=P?f(Object.keys(Y)):Object.values(Y).map(({n:t})=>t).sort((t,e)=>t-e)),t};if(r){if(e)return(async()=>{for await(let t of M)for(let e of t)X(e);return Q()})();for(let t of M)for(let e of t)X(e);return Q()}if(e)return(async()=>{for await(let t of M)X(t);return Q()})();for(let t of M)X(t);return Q()}void 0===(n=function(){return y}.call(e,r,e,t))||(t.exports=n),t.exports=y,t.exports.default=y,t.exports.calcStats=y,"object"==typeof self&&(self.calcStats=y),"object"==typeof window&&(window.calcStats=y)},function(t,e,r){"use strict";var n;const i=r(4),o=r(6),s=r(154),a=r(76),u=r(0),c=r(34),l=r(5),f=r(156),h=r(158),d=r(51),p=r(84),y=r(162),g=r(163),m=r(1),b=r(88),v=r(89),w=r(73),x=r(75),_=r(164),S=r(165),A=r(77),E=r(166),k=r(167),T=r(15),C=r(16),O=r(90),I=r(91),P=r(11),R=r(8),j=r(32),M=r(48),L=r(31),F=r(168),N={absolute:i,add:o,binomial_coefficient:s,ceil:a,clean:u,compare:c,compare_positive:l,constants:f,cosine_radians:h,count_decimal_digits:d,count_integer_digits:p,cube:y,cube_root:g,divide:m,eulers_number:b,exp:v,expand:w,factorial:x,flip_sign:_,floor:S,fraction:A,hypotenuse:E,is_infinity:T,is_integer:C,is_factorial:k,is_negative_infinity:O,is_positive_infinity:I,is_zero:P,long_addition:R,long_division:j,long_multiplication:M,long_subtraction:L,mean:r(169),max:F,min:r(86),multiply:r(53),multiply_array:r(79),multiply_range:r(47),nilakantha:r(170),ols:r(171),pow:r(35),pow_positive:r(54),primes:r(87),reciprocal:r(81),remainder:r(172),root:r(37),root_integer_digits:r(83),round:r(36),round_last_decimal:r(49),sign:r(22),sign_nonzero:r(50),simplify_fraction:r(85),sine_radians:r(173),softmax:r(174),sort:r(175),square:r(23),square_root:r(92),subtract:r(33),sum:r(55),truncate:r(93)};void 0===(n=function(){return N}.call(e,r,e,t))||(t.exports=n),t.exports=N,t.exports.default=N,"object"==typeof window&&(window.preciso=N),"object"==typeof self&&(self.preciso=N)},function(t,e,r){"use strict";const n=r(0),i=r(5),o=r(75),s=r(8),a=r(31),u=r(32),c=r(47);function l(t,e){switch(t=n(t),e=n(e),i(t,e)){case"=":return"1";case">":{const r=a(t,e),n=c(s(e,"1"),t),i=o(r);return u(n,i)}case"<":throw new Error("[binominal_coefficient] unsupported")}}t.exports=l,t.exports.default=l},function(t,e,r){"use strict";function n(t){return t.substring(0,t.indexOf("."))}t.exports=n,t.exports.default=n},function(t,e,r){"use strict";const{MAX_SAFE_INTEGER:n}=r(74),{MAX_SAFE_INTEGER_LENGTH:i}=r(30),{PI:o}=r(157);t.exports={MAX_SAFE_INTEGER:n,MAX_SAFE_INTEGER_LENGTH:i,PI:o}},function(t,e){t.exports={PI_100:"3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679"}},function(t,e,r){"use strict";const n=r(6),i=r(11),o=r(23),s=r(17),a=r(1);function u(t,{steps:e=100,max_decimal_digits:r=100}={}){if(i(t))return"0";let u,c="-",l="1",f=e,h=o(t),d="1",p="1",y="0";for(let t=0;tn(t));return i(o(s),e)}t.exports=s,t.exports.default=s},function(t,e,r){"use strict";function n(t){return!!t.match(/^\\d+!$/i)}t.exports=n,t.exports.default=n},function(t,e,r){"use strict";const n=r(0),i=r(34);function o(t){"string"==typeof t&&(t=Array.prototype.slice.call(arguments));let e=n(t[0]);const r=t.length;for(let n=1;n"===i(r,e)&&(e=r)}return e}t.exports=o,t.exports.default=o},function(t,e,r){"use strict";const n=r(6),i=r(1);function o(t,e){let r=0,o="0";for(let e of t)r++,o=n(o,e);return i(o,r.toString(),e)}t.exports=o,t.exports.default=o},function(t,e,r){"use strict";const n=r(6),i=r(8),o=r(1),s=r(17);function a(t=100,{divide_options:e}={}){let r="+",a="3",u="2",c="3",l="4";for(let f=1;fi(t,{max_decimal_digits:e}));const r=o(t);return t.map(t=>n(t,r,{max_decimal_digits:e,ellipsis:!1}))}t.exports=s,t.exports.default=s},function(t,e,r){"use strict";const n=r(34);function i(t,{direction:e="ascending"}={direction:"ascending"}){const r="desc"===e||"descending"===e?"<":">";return t.sort((t,e)=>n(t,e)===r?1:-1)}t.exports=i,t.exports.default=i},function(t,e,r){var n;const i=r(177),o=r(186);function s({counts:t,nums:e,no_data:r,precise:n,threshold:s=50,total:a}){return void 0!==t||void 0!==a||e.length>s?i({counts:t,no_data:r,nums:e,precise:n,total:a}):o({no_data:r,nums:e,precise:n})}const a={calculate:s};void 0===(n=function(){return a}.call(e,r,e,t))||(t.exports=n),t.exports=a,t.exports.default={calculate:s},"object"==typeof window&&(window.mediana=a),"object"==typeof self&&(self.mediana=a)},function(t,e,r){const n=r(178),i=r(94);function o({counts:t,nums:e,no_data:r,precise:o=!1,total:s}){void 0!==t&&void 0!==s||({counts:t,total:s}=n({nums:e,no_data:r}));const a=Object.values(t).sort((t,e)=>t.n-e.n),u=s/2,c=a.length;if(0!==c){if(1===c)return o?a[0].n.toString():a[0].n;{let t=0;if(s%2==0)for(let e=0;eu)return t-n===u?i(a[e-1].n,r,{precise:o}):o?r.toString():r}else for(let e=0;eu)return o?r.toString():r}}}}t.exports=o,t.exports.default=o},function(t,e){function r({nums:t,no_data:e}){let r=t.length;const n={};let i=0;if(void 0!==e)for(let o=0;o=a){const t=s-a;let r=o;for(let e=0;es;t--)result+="0";return result+=o,e+result}return e+o.substring(0,s)+"."+o.substring(s)}t.exports=r,t.exports.default=r},function(t,e,r){const n=r(98),i=r(18),o=r(181);function s(t,e,r){if(t=i(t),"0"===(e=i(e)))throw new Error("[preciso] division by zero");if(""===t||"0"===t)return"0";const s="-"!==t[0],a="-"!==e[0],u=s!==a?"-":"";return s||(t=n(t)),a||(e=n(e)),u+o(t,e,r)}t.exports=s,t.exports.default=s},function(t,e,r){const n=r(38),i=r(95),o=(r(182),r(184)),s=r(185);t.exports=function(t,e,{max_decimal_digits:r=100,ellipsis:a=!1}={}){"0"===t[0]&&(t=t.substring(1)),"0"===e[0]&&(e=e.substring(1));const u=t.indexOf("."),c=e.indexOf("."),l=-1===u?t.length:u,f=-1===c?0:e.length-1-c;let h=!1;t=t.replace(/\\./,""),e=e.replace(/\\./,"");const d=t.length;let p,y="",g="",m=-1*f,b=0;for(let r=0;r"===p){let t=1,r=i(e,e),s=e;for(;">"!==n(r,y);)t++,s=r,r=i(r,e);if(t=t.toString(),""!==g)for(let e=t.length;e<=b;e++)g+="0";g+=t,y=o(y,s),b=0}else{if("<"===p){""===g&&m++,b++;continue}if("="===p){if(""!==g)for(let t=0;t3){g+="...",h=!0;break}}else t[y]=1;const r=n(y,e);if(">"===r){let t=1,r=i(e,e),s=e;for(;">"!==n(r,y);)t++,s=r,r=i(r,e);t=t.toString();for(let e=t.length;e<=b;e++)g+="0";if(g+=t,y=o(y,s),"0"===y)break;b=0}else{if("<"===r){b++;continue}if("="===r){for(let t=0;tw){for(let t=w;t0&&(g=s(g.substring(0,g.length-t+1)))}return"."===g[0]&&(g="0"+g),g}},function(t,e,r){const n=r(98),i=r(18),o=r(38),s=r(183);function a(t,e){t=i(t),e=i(e);const r="-"!==t[0]!==("-"!==e[0])?"-":"";t=n(t),e=n(e);if("<"===o(t,e)){const r=t;t=e,e=r}return r+s(t,e)}t.exports=a,t.exports.default=a},function(t,e,r){const{MAX_SAFE_INTEGER_LENGTH:n}=r(56);t.exports=function(t,e){if("0"===t||"0"===e)return"0";const r=t.indexOf("."),i=e.indexOf("."),o=(-1===r?t.length:r)+(-1===i?e.length:i),s=(-1===r?0:t.length-1-r)+(-1===i?0:e.length-1-i);if(0===s&&o=0;){const t=h,e=h-=15,r=a.substring(e,t);f.push([Number(r),r.length])}const d=[],p=[];for(let t=0,e=l-1;e>=0;e--,t++){const r=u[e],n=Number(r);let i=0,o="";const s=f.length-1;f.forEach(([t,e],r)=>{let a=(i+n*t).toString();const u=a.length;if(u>e&&r!==s){const t=-1*e;o=a.slice(t)+o,i=Number(a.slice(0,t))}else{const t=e-u;for(let e=0;eNumber(t)),o.length])}const y=d.length,g=p[p.length-1][1]+y;let m="",b=0;for(let t=0;t=0&&(e+=r[o])}e>=10?(e=e.toString(),m=e[e.length-1]+m,b=Number(e.slice(0,-1))):(m=e+m,b=0)}if(0===s)m=m.replace(/^0+/,"");else{const t=m.length-s;m=m.substring(0,t)+"."+m.substring(t),m=m.replace(/^0+/,""),m=m.replace(/\\.?0+$/,""),"."===m[0]&&(m="0"+m)}return m}},function(t,e,r){const n=r(18),i=r(38),o=r(96),s=r(97);function a(t,e){t=n(t),e=n(e);const r="-"!==t[0],a="-"!==e[0];if(r){if(a){const r=i(t,e);return">"===r?s(t,e):"<"===r?"-"+s(e,t):"0"}return o(t,e.substring(1))}if(a)return"-"+o(t.substring(1),e);{t=t.substring(1),e=e.substring(1);const r=i(t,e);return">"===r?"-"+s(t,e):"<"===r?s(e,t):"0"}}t.exports=a,t.exports.default=a},function(t,e){const r=["5","6","7","8","9"];t.exports=function(t){"+"===t[0]&&(t=t.substring(1));const e=t.length;let n="";const i=t[t.length-1];if(r.includes(i)){let r;for(r=e-2;r>=0;r--){const e=t[r];if("."===e||"-"===e)continue;const i=Number(e)+1;if(10!==i){n=i+n;break}n="0"+n}r>0&&(n=t.substring(0,r)+n)}else n=t.substring(0,e-1);return"."===n[n.length-1]&&(n=n.substring(0,n.length-1)),n.indexOf(".")>-1&&(n=n.replace(/0+$/,"")),n}},function(t,e,r){const n=r(94);function i({nums:t,no_data:e,precise:r=!1}){switch((t=t.filter(t=>t!==e).sort((t,e)=>t-e)).length){case 0:return;case 1:return r?t[0].toString():t[0];default:const e=t.length/2;if(t.length%2==0)return n(t[e-1],t[e],{precise:r});{const n=Math.floor(e);return r?t[n].toString():t[n]}}}t.exports=i,t.exports.default=i},function(t,e,r){var n;const i=r(188);function o({bands:t,data:e,height:r,layout:n,width:o}){const s=i(e);if("[row,column,band]"===n||1===s)return{layout:"[row,column,band]",bands:t||(r&&o?e.length/(r*o):void 0),height:r||(t&&o?e.length/(t*o):void 0),width:o||(t&&r?e.length/(t*r):void 0)};if(2===s){if(!r||!o)return e.lengthArray.isArray(t)||t instanceof Int8Array||t instanceof Uint8Array||t instanceof Uint8ClampedArray||t instanceof Int16Array||t instanceof Uint16Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Float32Array||t instanceof Float64Array||t instanceof BigInt64Array||t instanceof BigUint64Array;let r=0,n=t;for(;e(n);)r++,n=n[0];return r}},function(t,e,r){const n={},{wrapNextFunction:i}=r(72),o=r(190),s=r(191),a={Array:Array,Int8Array:Int8Array,Uint8Array:Uint8Array,Uint8ClampedArray:Uint8ClampedArray,Int16Array:Int16Array,Uint16Array:Uint16Array,Float32Array:Float32Array,Float64Array:Float64Array};try{a.BigInt64Array=BigInt64Array,a.BigUint64Array=BigUint64Array}catch(t){}const u=t=>t.match(/\\[[^\\]]+\\]/g),c=t=>t.startsWith("[")&&t.endsWith("]")?t.substring(1,t.length-1):t,l=t=>t.startsWith("(")&&t.endsWith(")")?t.substring(1,t.length-1):t,f=t=>t.match(/(\\(.*?\\)|[^\\(,\\s]+)(?=\\s*,|\\s*$)/g),h=t=>{t=c(t),t=l(t);const e=f(t);return 1===e.length?{type:"Vector",dim:e[0]}:{type:"Matrix",parts:e.map(h)}};function d(t){const e=t.match(/[^ A-Za-z,\\[\\]]/g);if(e)throw new Error("The following invalid characters were used: "+e.map(t=>`"${t}"`).join(", "));return!0}function p(t,{useLayoutCache:e=!0}={useLayoutCache:!0}){if(e&&t in n)return n[t];d(t);const r=u(t).map(h),i={type:"Layout",summary:r.map(t=>"Matrix"===t.type?t.parts.length:1),dims:r};return e&&(n[t]=i),i}function y({useLayoutCache:t=!0,data:e,layout:r,sizes:n={}}){"string"==typeof r&&(r=p(r,{useLayoutCache:t}));const{dims:i}=r,o=i.length,a=m({useLayoutCache:t,layout:r,sizes:n}),u=o-1,c=r.summary.toString();if(c in s){const t={data:e};return r.dims.map((e,r)=>{"Vector"===e.type?t[`d${r}v0`]=e.dim:"Matrix"===e.type&&e.parts.forEach((e,n)=>{t[`d${r}v${n}`]=e.dim,t[`m${r}v${n}`]=a[e.dim]})}),s[c].bind(t)}return({point:t,value:r})=>{let n=e;for(let e=0;ee+a[r]*t[r],0),o?n[c]=r:n=n[c]}}}function g({rect:t={}}){if(t)for(let e in t){const r=t[e];if(2!==r.length)throw new Error("[xdim] uh oh. invalid hyper-rectangle");const[n,i]=r;if(n>i)throw new Error(`[xdim] uh oh. invalid range for "${e}". Start of ${n} can\'t be greater than end of ${i}.`);if(n<0)throw new Error("[xdim] uh oh. invalid hyper-rectangle with start "+n)}}function m({useLayoutCache:t=!0,layout:e,sizes:r}){"string"==typeof e&&(e=p(e,{useLayoutCache:t}));const{dims:n}=e,i=n.length;let o={};for(let t=0;t=0;e--){const{dim:i}=t[e];o[i]=n,n*=r[t[e].dim]}}}return o}function b({useLayoutCache:t=!0,data:e,layout:r,point:n,sizes:i={}}){let o,s;"string"==typeof r&&(r=p(r,{useLayoutCache:t}));let a=e;const{dims:u}=r,c=u.length;for(let t=0;t=0;e--){const o=t[e];if("Vector"===o.type){const{dim:t}=o;if(r+=u*n[t],e>0){if(!(t in i))throw new Error(`you cannot calculate the location without knowing the size of the "${t}" dimension.`);u*=i[t]}}}o=a,s=r,a=a[r]}}return{index:s,value:a,parent:o}}function v({arr:t,fill:e,lens:r,arrayTypes:n}){if(0===r.length)return t;const i=r[0];if(1===r.length){const r=n?n[n.length-1]:"Array";for(let n=0;n"Vector"===t.type?n[t.dim]:"Matrix"===t.type?t.parts.reduce((t,e)=>{if(!(e.dim in n))throw new Error(`[xdim] could not find "${e.dim}" in sizes: { ${Object.keys(n).join(", ")} }`);return t*n[e.dim]},1):void 0);return{data:w({fill:t,shape:o,arrayTypes:i}),shape:o,arrayTypes:i}}function _({start:t=0,end:e=100}){let r=t-1;return e+=1,i((function(){return r++,r===e?{done:!0}:{done:!1,value:r}}))}function S({order:t,sizes:e,rect:r={}}){const n=Array.isArray(t)?t:Object.keys(e).sort((t,r)=>e[t]-e[r]),o=new Array(n.length),s={};for(let t=0;t=0;t--){const{value:i,done:a}=o[t].next();if(!a){for(let i=t+1;i{"Vector"===e.type?t[`d${r}v0`]=e.dim:"Matrix"===e.type&&e.parts.forEach((e,n)=>{t[`d${r}v${n}`]=e.dim,t[`m${r}v${n}`]=a[e.dim]})}),o[c].bind(t)}return({point:t})=>{let r=e;for(let e=0;ee+a[r]*t[r],0),n)return{index:s,parent:r,value:r[s]};r=r[s]}}},prepareUpdate:y,removeBraces:c,removeParentheses:l,select:b,transform:function({data:t,fill:e,from:r,to:n,sizes:i,useLayoutCache:o=!0}){"string"==typeof r&&(r=p(r,{useLayoutCache:o})),"string"==typeof n&&(n=p(n,{useLayoutCache:o}));const{data:s}=x({fill:e,layout:n,sizes:i}),a=y({useLayoutCache:o,data:s,layout:n,sizes:i}),u=S({sizes:i});for(point of u){const{value:e}=b({data:t,layout:r,point:point,sizes:i});a({point:point,value:e})}return{data:s}},update:function({useLayoutCache:t=!0,data:e,layout:r,point:n,sizes:i={},value:o}){"string"==typeof r&&(r=p(r,{useLayoutCache:t}));const{dims:s}=r;for(let t=0;t=0;r--){const o=t[r],{dim:s}=o;if(u+=e*n[s],r>0){if(!(s in i))throw new Error(`you cannot calculate the location without knowing the size of the "${s}" dimension.`);e*=i[s]}}}r?e[u]=o:e=e[u]}},clip:function({useLayoutCache:t=!0,data:e,layout:r,rect:n,sizes:i={},flat:o=!1,validate:s=!0}){s&&g({rect:n}),"string"==typeof r&&(r=p(r,{useLayoutCache:t}));let a=[e];if(r.dims.forEach(t=>{let e=[];a.forEach(r=>{if("Vector"===t.type){const[i,o]=n[t.dim];e=e.concat(r.slice(i,o+1))}else{const{parts:o}=t;let s=[0],a=1;for(let t=o.length-1;t>=0;t--){const e=o[t],{dim:r}=e,[u,c]=n[r],l=[];for(let t=u;t<=c;t++)s.forEach(e=>{l.push(e+a*t)});s=l,a*=i[r]}s.forEach(t=>{e.push(r[t])})}}),a=e}),o)return{data:a};const u=Object.fromEntries(Object.entries(n).map(([t,[e,r]])=>[t,r-e+1])),{data:c}=x({layout:r,sizes:u}),l=r.dims.length,f=(t,e)=>{if(e===l)for(let e=0;ef(t,e+1))};return f(c,1),{data:c}},validateRect:g}},function(t,e){t.exports={1:function({point:t}){const e=this.data,r=t[this.d0v0];return{parent:e,index:r,value:e[r]}},2:function({point:t}){const e=this.data,r=this.m0v0*t[this.d0v0]+this.m0v1*t[this.d0v1];return{parent:e,index:r,value:e[r]}},3:function({point:t}){const e=this.data,r=this.m0v0*t[this.d0v0]+this.m0v1*t[this.d0v1]+this.m0v2*t[this.d0v2];return{parent:e,index:r,value:e[r]}},4:function({point:t}){const e=this.data,r=this.m0v0*t[this.d0v0]+this.m0v1*t[this.d0v1]+this.m0v2*t[this.d0v2]+this.m0v3*t[this.d0v3];return{parent:e,index:r,value:e[r]}},5:function({point:t}){const e=this.data,r=this.m0v0*t[this.d0v0]+this.m0v1*t[this.d0v1]+this.m0v2*t[this.d0v2]+this.m0v3*t[this.d0v3]+this.m0v4*t[this.d0v4];return{parent:e,index:r,value:e[r]}},"1,1":function({point:t}){const e=this.data[t[this.d0v0]],r=t[this.d1v0];return{parent:e,index:r,value:e[r]}},"1,2":function({point:t}){const e=this.data[t[this.d0v0]],r=this.m1v0*t[this.d1v0]+this.m1v1*t[this.d1v1];return{parent:e,index:r,value:e[r]}},"1,3":function({point:t}){const e=this.data[t[this.d0v0]],r=this.m1v0*t[this.d1v0]+this.m1v1*t[this.d1v1]+this.m1v2*t[this.d1v2];return{parent:e,index:r,value:e[r]}},"1,4":function({point:t}){const e=this.data[t[this.d0v0]],r=this.m1v0*t[this.d1v0]+this.m1v1*t[this.d1v1]+this.m1v2*t[this.d1v2]+this.m1v3*t[this.d1v3];return{parent:e,index:r,value:e[r]}},"1,5":function({point:t}){const e=this.data[t[this.d0v0]],r=this.m1v0*t[this.d1v0]+this.m1v1*t[this.d1v1]+this.m1v2*t[this.d1v2]+this.m1v3*t[this.d1v3]+this.m1v4*t[this.d1v4];return{parent:e,index:r,value:e[r]}},"1,1,1":function({point:t}){const e=this.data[t[this.d0v0]][t[this.d1v0]],r=t[this.d2v0];return{parent:e,index:r,value:e[r]}},"1,1,2":function({point:t}){const e=this.data[t[this.d0v0]][t[this.d1v0]],r=this.m2v0*t[this.d2v0]+this.m2v1*t[this.d2v1];return{parent:e,index:r,value:e[r]}},"1,1,3":function({point:t}){const e=this.data[t[this.d0v0]][t[this.d1v0]],r=this.m2v0*t[this.d2v0]+this.m2v1*t[this.d2v1]+this.m2v2*t[this.d2v2];return{parent:e,index:r,value:e[r]}},"1,1,4":function({point:t}){const e=this.data[t[this.d0v0]][t[this.d1v0]],r=this.m2v0*t[this.d2v0]+this.m2v1*t[this.d2v1]+this.m2v2*t[this.d2v2]+this.m2v3*t[this.d2v3];return{parent:e,index:r,value:e[r]}},"1,1,5":function({point:t}){const e=this.data[t[this.d0v0]][t[this.d1v0]],r=this.m2v0*t[this.d2v0]+this.m2v1*t[this.d2v1]+this.m2v2*t[this.d2v2]+this.m2v3*t[this.d2v3]+this.m2v4*t[this.d2v4];return{parent:e,index:r,value:e[r]}},"1,1,1,1":function({point:t}){const e=this.data[t[this.d0v0]][t[this.d1v0]][t[this.d2v0]],r=t[this.d3v0];return{parent:e,index:r,value:e[r]}},"1,1,1,2":function({point:t}){const e=this.data[t[this.d0v0]][t[this.d1v0]][t[this.d2v0]],r=this.m3v0*t[this.d3v0]+this.m3v1*t[this.d3v1];return{parent:e,index:r,value:e[r]}},"1,1,1,3":function({point:t}){const e=this.data[t[this.d0v0]][t[this.d1v0]][t[this.d2v0]],r=this.m3v0*t[this.d3v0]+this.m3v1*t[this.d3v1]+this.m3v2*t[this.d3v2];return{parent:e,index:r,value:e[r]}},"1,1,1,4":function({point:t}){const e=this.data[t[this.d0v0]][t[this.d1v0]][t[this.d2v0]],r=this.m3v0*t[this.d3v0]+this.m3v1*t[this.d3v1]+this.m3v2*t[this.d3v2]+this.m3v3*t[this.d3v3];return{parent:e,index:r,value:e[r]}},"1,1,1,5":function({point:t}){const e=this.data[t[this.d0v0]][t[this.d1v0]][t[this.d2v0]],r=this.m3v0*t[this.d3v0]+this.m3v1*t[this.d3v1]+this.m3v2*t[this.d3v2]+this.m3v3*t[this.d3v3]+this.m3v4*t[this.d3v4];return{parent:e,index:r,value:e[r]}},"1,1,1,1,1":function({point:t}){const e=this.data[t[this.d0v0]][t[this.d1v0]][t[this.d2v0]][t[this.d3v0]],r=t[this.d4v0];return{parent:e,index:r,value:e[r]}},"1,1,1,1,2":function({point:t}){const e=this.data[t[this.d0v0]][t[this.d1v0]][t[this.d2v0]][t[this.d3v0]],r=this.m4v0*t[this.d4v0]+this.m4v1*t[this.d4v1];return{parent:e,index:r,value:e[r]}},"1,1,1,1,3":function({point:t}){const e=this.data[t[this.d0v0]][t[this.d1v0]][t[this.d2v0]][t[this.d3v0]],r=this.m4v0*t[this.d4v0]+this.m4v1*t[this.d4v1]+this.m4v2*t[this.d4v2];return{parent:e,index:r,value:e[r]}},"1,1,1,1,4":function({point:t}){const e=this.data[t[this.d0v0]][t[this.d1v0]][t[this.d2v0]][t[this.d3v0]],r=this.m4v0*t[this.d4v0]+this.m4v1*t[this.d4v1]+this.m4v2*t[this.d4v2]+this.m4v3*t[this.d4v3];return{parent:e,index:r,value:e[r]}},"1,1,1,1,5":function({point:t}){const e=this.data[t[this.d0v0]][t[this.d1v0]][t[this.d2v0]][t[this.d3v0]],r=this.m4v0*t[this.d4v0]+this.m4v1*t[this.d4v1]+this.m4v2*t[this.d4v2]+this.m4v3*t[this.d4v3]+this.m4v4*t[this.d4v4];return{parent:e,index:r,value:e[r]}}}},function(t,e){t.exports={1:function({point:t,value:e}){this.data[t[this.d0v0]]=e},2:function({point:t,value:e}){this.data[this.m0v0*t[this.d0v0]+this.m0v1*t[this.d0v1]]=e},3:function({point:t,value:e}){this.data[this.m0v0*t[this.d0v0]+this.m0v1*t[this.d0v1]+this.m0v2*t[this.d0v2]]=e},4:function({point:t,value:e}){this.data[this.m0v0*t[this.d0v0]+this.m0v1*t[this.d0v1]+this.m0v2*t[this.d0v2]+this.m0v3*t[this.d0v3]]=e},5:function({point:t,value:e}){this.data[this.m0v0*t[this.d0v0]+this.m0v1*t[this.d0v1]+this.m0v2*t[this.d0v2]+this.m0v3*t[this.d0v3]+this.m0v4*t[this.d0v4]]=e},"1,1":function({point:t,value:e}){this.data[t[this.d0v0]][t[this.d1v0]]=e},"1,2":function({point:t,value:e}){this.data[t[this.d0v0]][this.m1v0*t[this.d1v0]+this.m1v1*t[this.d1v1]]=e},"1,3":function({point:t,value:e}){this.data[t[this.d0v0]][this.m1v0*t[this.d1v0]+this.m1v1*t[this.d1v1]+this.m1v2*t[this.d1v2]]=e},"1,4":function({point:t,value:e}){this.data[t[this.d0v0]][this.m1v0*t[this.d1v0]+this.m1v1*t[this.d1v1]+this.m1v2*t[this.d1v2]+this.m1v3*t[this.d1v3]]=e},"1,5":function({point:t,value:e}){this.data[t[this.d0v0]][this.m1v0*t[this.d1v0]+this.m1v1*t[this.d1v1]+this.m1v2*t[this.d1v2]+this.m1v3*t[this.d1v3]+this.m1v4*t[this.d1v4]]=e},"1,1,1":function({point:t,value:e}){this.data[t[this.d0v0]][t[this.d1v0]][t[this.d2v0]]=e},"1,1,2":function({point:t,value:e}){this.data[t[this.d0v0]][t[this.d1v0]][this.m2v0*t[this.d2v0]+this.m2v1*t[this.d2v1]]=e},"1,1,3":function({point:t,value:e}){this.data[t[this.d0v0]][t[this.d1v0]][this.m2v0*t[this.d2v0]+this.m2v1*t[this.d2v1]+this.m2v2*t[this.d2v2]]=e},"1,1,4":function({point:t,value:e}){this.data[t[this.d0v0]][t[this.d1v0]][this.m2v0*t[this.d2v0]+this.m2v1*t[this.d2v1]+this.m2v2*t[this.d2v2]+this.m2v3*t[this.d2v3]]=e},"1,1,5":function({point:t,value:e}){this.data[t[this.d0v0]][t[this.d1v0]][this.m2v0*t[this.d2v0]+this.m2v1*t[this.d2v1]+this.m2v2*t[this.d2v2]+this.m2v3*t[this.d2v3]+this.m2v4*t[this.d2v4]]=e},"1,1,1,1":function({point:t,value:e}){this.data[t[this.d0v0]][t[this.d1v0]][t[this.d2v0]][t[this.d3v0]]=e},"1,1,1,2":function({point:t,value:e}){this.data[t[this.d0v0]][t[this.d1v0]][t[this.d2v0]][this.m3v0*t[this.d3v0]+this.m3v1*t[this.d3v1]]=e},"1,1,1,3":function({point:t,value:e}){this.data[t[this.d0v0]][t[this.d1v0]][t[this.d2v0]][this.m3v0*t[this.d3v0]+this.m3v1*t[this.d3v1]+this.m3v2*t[this.d3v2]]=e},"1,1,1,4":function({point:t,value:e}){this.data[t[this.d0v0]][t[this.d1v0]][t[this.d2v0]][this.m3v0*t[this.d3v0]+this.m3v1*t[this.d3v1]+this.m3v2*t[this.d3v2]+this.m3v3*t[this.d3v3]]=e},"1,1,1,5":function({point:t,value:e}){this.data[t[this.d0v0]][t[this.d1v0]][t[this.d2v0]][this.m3v0*t[this.d3v0]+this.m3v1*t[this.d3v1]+this.m3v2*t[this.d3v2]+this.m3v3*t[this.d3v3]+this.m3v4*t[this.d3v4]]=e},"1,1,1,1,1":function({point:t,value:e}){this.data[t[this.d0v0]][t[this.d1v0]][t[this.d2v0]][t[this.d3v0]][t[this.d4v0]]=e},"1,1,1,1,2":function({point:t,value:e}){this.data[t[this.d0v0]][t[this.d1v0]][t[this.d2v0]][t[this.d3v0]][this.m4v0*t[this.d4v0]+this.m4v1*t[this.d4v1]]=e},"1,1,1,1,3":function({point:t,value:e}){this.data[t[this.d0v0]][t[this.d1v0]][t[this.d2v0]][t[this.d3v0]][this.m4v0*t[this.d4v0]+this.m4v1*t[this.d4v1]+this.m4v2*t[this.d4v2]]=e},"1,1,1,1,4":function({point:t,value:e}){this.data[t[this.d0v0]][t[this.d1v0]][t[this.d2v0]][t[this.d3v0]][this.m4v0*t[this.d4v0]+this.m4v1*t[this.d4v1]+this.m4v2*t[this.d4v2]+this.m4v3*t[this.d4v3]]=e},"1,1,1,1,5":function({point:t,value:e}){this.data[t[this.d0v0]][t[this.d1v0]][t[this.d2v0]][t[this.d3v0]][this.m4v0*t[this.d4v0]+this.m4v1*t[this.d4v1]+this.m4v2*t[this.d4v2]+this.m4v3*t[this.d4v3]+this.m4v4*t[this.d4v4]]=e}}},function(t,e,r){"use strict";t.exports={countIn1D:function(t){return t.reduce((function(t,e){return void 0===t[e]?t[e]=1:t[e]++,t}),{})},countIn2D:function(t){return t.reduce((function(t,e){return e.forEach((function(e){void 0===t[e]?t[e]=1:t[e]++})),t}),{})},unflatten:function(t,e){for(var r=e.height,n=e.width,i=[],o=0;o>24)/500+a,c=a-(t[e+2]<<24>>24)/200;u=.95047*(u*u*u>.008856?u*u*u:(u-16/116)/7.787),a=1*(a*a*a>.008856?a*a*a:(a-16/116)/7.787),c=1.08883*(c*c*c>.008856?c*c*c:(c-16/116)/7.787),i=3.2406*u+-1.5372*a+-.4986*c,o=-.9689*u+1.8758*a+.0415*c,s=.0557*u+-.204*a+1.057*c,i=i>.0031308?1.055*i**(1/2.4)-.055:12.92*i,o=o>.0031308?1.055*o**(1/2.4)-.055:12.92*o,s=s>.0031308?1.055*s**(1/2.4)-.055:12.92*s,n[r]=255*Math.max(0,Math.min(1,i)),n[r+1]=255*Math.max(0,Math.min(1,o)),n[r+2]=255*Math.max(0,Math.min(1,s))}return n}function S(t,e){let r=t.length-e,n=0;do{for(let r=e;r>0;r--)t[n+e]+=t[n],n++;r-=e}while(r>0)}function A(t,e,r){let n=0,i=t.length;const o=i/r;for(;i>e;){for(let r=e;r>0;--r)t[n+e]+=t[n],++n;i-=e}const s=t.slice();for(let e=0;e=t.byteLength);++o){let n;if(2===e){switch(i[0]){case 8:n=new Uint8Array(t,o*a*r*s,a*r*s);break;case 16:n=new Uint16Array(t,o*a*r*s,a*r*s/2);break;case 32:n=new Uint32Array(t,o*a*r*s,a*r*s/4);break;default:throw new Error(`Predictor 2 not allowed with ${i[0]} bits per sample.`)}S(n,a)}else 3===e&&(n=new Uint8Array(t,o*a*r*s,a*r*s),A(n,a,s))}return t}(r,n,e?t.TileWidth:t.ImageWidth,e?t.TileLength:t.RowsPerStrip||t.ImageLength,t.BitsPerSample,t.PlanarConfiguration)}return r}}class k extends E{decodeBlock(t){return t}}function T(t,e){for(let r=e.length-1;r>=0;r--)t.push(e[r]);return t}function C(t){const e=new Uint16Array(4093),r=new Uint8Array(4093);for(let t=0;t<=257;t++)e[t]=4096,r[t]=t;let n=258,i=9,o=0;function s(){n=258,i=9}function a(t){const e=function(t,e,r){const n=e%8,i=Math.floor(e/8),o=8-n,s=e+r-8*(i+1);let a=8*(i+2)-(e+r);const u=8*(i+2)-e;if(a=Math.max(0,a),i>=t.length)return console.warn("ran off the end of the buffer before finding EOI_CODE (end on input code)"),257;let c=t[i]&2**(8-n)-1;c<<=r-o;let l=c;if(i+1>>a;e<<=Math.max(0,r-u),l+=e}if(s>8&&i+2>>n}return l}(t,o,i);return o+=i,e}function u(t,i){return r[n]=i,e[n]=t,n++,n-1}function c(t){const n=[];for(let i=t;4096!==i;i=e[i])n.push(r[i]);return n}const l=[];s();const f=new Uint8Array(t);let h,d=a(f);for(;257!==d;){if(256===d){for(s(),d=a(f);256===d;)d=a(f);if(257===d)break;if(d>256)throw new Error("corrupted code at scanline "+d);T(l,c(d)),h=d}else if(d=2**i&&(12===i?h=void 0:i++),d=a(f)}return new Uint8Array(l)}class O extends E{decodeBlock(t){return C(t).buffer}}const I=new Int32Array([0,1,8,16,9,2,3,10,17,24,32,25,18,11,4,5,12,19,26,33,40,48,41,34,27,20,13,6,7,14,21,28,35,42,49,56,57,50,43,36,29,22,15,23,30,37,44,51,58,59,52,45,38,31,39,46,53,60,61,54,47,55,62,63]);function P(t,e){let r=0;const n=[];let i=16;for(;i>0&&!t[i-1];)--i;n.push({children:[],index:0});let o,s=n[0];for(let a=0;a0;)s=n.pop();for(s.index++,n.push(s);n.length<=a;)n.push(o={children:[],index:0}),s.children[s.index]=o.children,s=o;r++}a+10)return p--,d>>p&1;if(d=t[h++],255===d){const e=t[h++];if(e)throw new Error("unexpected marker: "+(d<<8|e).toString(16))}return p=7,d>>>7}function g(t){let e,r=t;for(;null!==(e=y());){if(r=r[e],"number"==typeof r)return r;if("object"!=typeof r)throw new Error("invalid huffman sequence")}return null}function m(t){let e=t,r=0;for(;e>0;){const t=y();if(null===t)return;r=r<<1|t,--e}return r}function b(t){const e=m(t);return e>=1<0)return void v--;let r=o;const n=s;for(;r<=n;){const n=g(t.huffmanTableAC),i=15&n,o=n>>4;if(0===i){if(o<15){v=m(o)+(1<>4,0===r)i<15?(v=m(i)+(1<>4;if(0===n){if(o<15)break;i+=16}else{i+=o;e[I[i]]=b(n),i++}}};let R,j,M=0;j=1===A?n[0].blocksPerLine*n[0].blocksPerColumn:c*r.mcusPerColumn;const L=i||j;for(;M=65488&&R<=65495))break;h+=2}return h-f}function j(t,e){const r=[],{blocksPerLine:n,blocksPerColumn:i}=e,o=n<<3,s=new Int32Array(64),a=new Uint8Array(64);function u(t,r,n){const i=e.quantizationTable;let o,s,a,u,c,l,f,h,d;const p=n;let y;for(y=0;y<64;y++)p[y]=t[y]*i[y];for(y=0;y<8;++y){const t=8*y;0!==p[1+t]||0!==p[2+t]||0!==p[3+t]||0!==p[4+t]||0!==p[5+t]||0!==p[6+t]||0!==p[7+t]?(o=5793*p[0+t]+128>>8,s=5793*p[4+t]+128>>8,a=p[2+t],u=p[6+t],c=2896*(p[1+t]-p[7+t])+128>>8,h=2896*(p[1+t]+p[7+t])+128>>8,l=p[3+t]<<4,f=p[5+t]<<4,d=o-s+1>>1,o=o+s+1>>1,s=d,d=3784*a+1567*u+128>>8,a=1567*a-3784*u+128>>8,u=d,d=c-f+1>>1,c=c+f+1>>1,f=d,d=h+l+1>>1,l=h-l+1>>1,h=d,d=o-u+1>>1,o=o+u+1>>1,u=d,d=s-a+1>>1,s=s+a+1>>1,a=d,d=2276*c+3406*h+2048>>12,c=3406*c-2276*h+2048>>12,h=d,d=799*l+4017*f+2048>>12,l=4017*l-799*f+2048>>12,f=d,p[0+t]=o+h,p[7+t]=o-h,p[1+t]=s+f,p[6+t]=s-f,p[2+t]=a+l,p[5+t]=a-l,p[3+t]=u+c,p[4+t]=u-c):(d=5793*p[0+t]+512>>10,p[0+t]=d,p[1+t]=d,p[2+t]=d,p[3+t]=d,p[4+t]=d,p[5+t]=d,p[6+t]=d,p[7+t]=d)}for(y=0;y<8;++y){const t=y;0!==p[8+t]||0!==p[16+t]||0!==p[24+t]||0!==p[32+t]||0!==p[40+t]||0!==p[48+t]||0!==p[56+t]?(o=5793*p[0+t]+2048>>12,s=5793*p[32+t]+2048>>12,a=p[16+t],u=p[48+t],c=2896*(p[8+t]-p[56+t])+2048>>12,h=2896*(p[8+t]+p[56+t])+2048>>12,l=p[24+t],f=p[40+t],d=o-s+1>>1,o=o+s+1>>1,s=d,d=3784*a+1567*u+2048>>12,a=1567*a-3784*u+2048>>12,u=d,d=c-f+1>>1,c=c+f+1>>1,f=d,d=h+l+1>>1,l=h-l+1>>1,h=d,d=o-u+1>>1,o=o+u+1>>1,u=d,d=s-a+1>>1,s=s+a+1>>1,a=d,d=2276*c+3406*h+2048>>12,c=3406*c-2276*h+2048>>12,h=d,d=799*l+4017*f+2048>>12,l=4017*l-799*f+2048>>12,f=d,p[0+t]=o+h,p[56+t]=o-h,p[8+t]=s+f,p[48+t]=s-f,p[16+t]=a+l,p[40+t]=a-l,p[24+t]=u+c,p[32+t]=u-c):(d=5793*n[y+0]+8192>>14,p[0+t]=d,p[8+t]=d,p[16+t]=d,p[24+t]=d,p[32+t]=d,p[40+t]=d,p[48+t]=d,p[56+t]=d)}for(y=0;y<64;++y){const t=128+(p[y]+8>>4);r[y]=t<0?0:t>255?255:t}}for(let t=0;t>4==0)for(let r=0;r<64;r++){i[I[r]]=t[e++]}else{if(n>>4!=1)throw new Error("DQT: invalid table spec");for(let t=0;t<64;t++){i[I[t]]=r()}}this.quantizationTables[15&n]=i}break}case 65472:case 65473:case 65474:{r();const n={extended:65473===o,progressive:65474===o,precision:t[e++],scanLines:r(),samplesPerLine:r(),components:{},componentsOrder:[]},s=t[e++];let a;for(let r=0;r>4,i=15&t[e+1],o=t[e+2];n.componentsOrder.push(a),n.components[a]={h:r,v:i,quantizationIdx:o},e+=3}i(n),this.frames.push(n);break}case 65476:{const n=r();for(let r=2;r>4==0?this.huffmanTablesDC[15&n]=P(i,s):this.huffmanTablesAC[15&n]=P(i,s)}break}case 65501:r(),this.resetInterval=r();break;case 65498:{r();const n=t[e++],i=[],o=this.frames[0];for(let r=0;r>4],r.huffmanTableAC=this.huffmanTablesAC[15&n],i.push(r)}const s=t[e++],a=t[e++],u=t[e++],c=R(t,e,o,i,this.resetInterval,s,a,u>>4,15&u);e+=c;break}case 65535:255!==t[e]&&e--;break;default:if(255===t[e-3]&&t[e-2]>=192&&t[e-2]<=254){e-=3;break}throw new Error("unknown JPEG marker "+o.toString(16))}o=r()}}getResult(){const{frames:t}=this;if(0===this.frames.length)throw new Error("no frames were decoded");this.frames.length>1&&console.warn("more than one frame is not supported");for(let t=0;t{const a=B(t,n,i);for(let u=0;u{const a=B(t,n,i);for(let u=0;u=this.fileDirectory.BitsPerSample.length)throw new RangeError(`Sample index ${t} is out of range.`);const e=this.fileDirectory.BitsPerSample[t];if(e%8!=0)throw new Error(`Sample bit-width of ${e} is not supported.`);return e/8}getReaderForSample(t){const e=this.fileDirectory.SampleFormat?this.fileDirectory.SampleFormat[t]:1,r=this.fileDirectory.BitsPerSample[t];switch(e){case 1:switch(r){case 8:return DataView.prototype.getUint8;case 16:return DataView.prototype.getUint16;case 32:return DataView.prototype.getUint32}break;case 2:switch(r){case 8:return DataView.prototype.getInt8;case 16:return DataView.prototype.getInt16;case 32:return DataView.prototype.getInt32}break;case 3:switch(r){case 32:return DataView.prototype.getFloat32;case 64:return DataView.prototype.getFloat64}}throw Error("Unsupported data format/bitsPerSample")}getArrayForSample(t,e){return W(this.fileDirectory.SampleFormat?this.fileDirectory.SampleFormat[t]:1,this.fileDirectory.BitsPerSample[t],e)}async getTileOrStrip(t,e,r,n){const i=Math.ceil(this.getWidth()/this.getTileWidth()),o=Math.ceil(this.getHeight()/this.getTileHeight());let s;const{tiles:a}=this;let u,c;1===this.planarConfiguration?s=e*i+t:2===this.planarConfiguration&&(s=r*i*o+e*i+t),this.isTiled?(u=this.fileDirectory.TileOffsets[s],c=this.fileDirectory.TileByteCounts[s]):(u=this.fileDirectory.StripOffsets[s],c=this.fileDirectory.StripByteCounts[s]);const l=await this.source.fetch(u,c);let f;return null===a?f=n.decode(this.fileDirectory,l):a[s]||(f=n.decode(this.fileDirectory,l),a[s]=f),{x:t,y:e,sample:r,data:await f}}async _readRaster(t,e,r,n,i,o,s,a){const u=this.getTileWidth(),c=this.getTileHeight(),l=Math.max(Math.floor(t[0]/u),0),f=Math.min(Math.ceil(t[2]/u),Math.ceil(this.getWidth()/this.getTileWidth())),h=Math.max(Math.floor(t[1]/c),0),d=Math.min(Math.ceil(t[3]/c),Math.ceil(this.getHeight()/this.getTileHeight())),p=t[2]-t[0];let y=this.getBytesPerPixel();const g=[],m=[];for(let t=0;t{const o=i.data,s=new DataView(o),a=i.y*c,f=i.x*u,h=(i.y+1)*c,d=(i.x+1)*u,b=m[l],w=Math.min(c,c-(h-t[3])),x=Math.min(u,u-(d-t[2]));for(let i=Math.max(0,t[1]-a);iu[2]||u[1]>u[3])throw new Error("Invalid subsets");const c=(u[2]-u[0])*(u[3]-u[1]);if(e&&e.length){for(let t=0;t=this.fileDirectory.SamplesPerPixel)return Promise.reject(new RangeError(`Invalid sample index \'${e[t]}\'.`))}else for(let t=0;ts[2]||s[1]>s[3])throw new Error("Invalid subsets");const a=this.fileDirectory.PhotometricInterpretation;if(a===d.RGB){let i=[0,1,2];if(this.fileDirectory.ExtraSamples!==p.Unspecified&&o){i=[];for(let t=0;t"Item"===t.tagName);t&&(o=o.filter(e=>Number(e.attributes.sample)===t));for(let t=0;t0;let i=!0;for(let o=0;o<8;o++){let s=this._dataView.getUint8(t+(e?o:7-o));n&&(i?0!==s&&(s=255&~(s-1),i=!1):s=255&~s),r+=s*256**o}return n&&(r=-r),r}getUint8(t,e){return this._dataView.getUint8(t,e)}getInt8(t,e){return this._dataView.getInt8(t,e)}getUint16(t,e){return this._dataView.getUint16(t,e)}getInt16(t,e){return this._dataView.getInt16(t,e)}getUint32(t,e){return this._dataView.getUint32(t,e)}getInt32(t,e){return this._dataView.getInt32(t,e)}getFloat32(t,e){return this._dataView.getFloat32(t,e)}getFloat64(t,e){return this._dataView.getFloat64(t,e)}}class ${constructor(t,e,r,n){this._dataView=new DataView(t),this._sliceOffset=e,this._littleEndian=r,this._bigTiff=n}get sliceOffset(){return this._sliceOffset}get sliceTop(){return this._sliceOffset+this.buffer.byteLength}get littleEndian(){return this._littleEndian}get bigTiff(){return this._bigTiff}get buffer(){return this._dataView.buffer}covers(t,e){return this.sliceOffset<=t&&this.sliceTop>=t+e}readUint8(t){return this._dataView.getUint8(t-this._sliceOffset,this._littleEndian)}readInt8(t){return this._dataView.getInt8(t-this._sliceOffset,this._littleEndian)}readUint16(t){return this._dataView.getUint16(t-this._sliceOffset,this._littleEndian)}readInt16(t){return this._dataView.getInt16(t-this._sliceOffset,this._littleEndian)}readUint32(t){return this._dataView.getUint32(t-this._sliceOffset,this._littleEndian)}readInt32(t){return this._dataView.getInt32(t-this._sliceOffset,this._littleEndian)}readFloat32(t){return this._dataView.getFloat32(t-this._sliceOffset,this._littleEndian)}readFloat64(t){return this._dataView.getFloat64(t-this._sliceOffset,this._littleEndian)}readUint64(t){const e=this.readUint32(t),r=this.readUint32(t+4);let n;if(this._littleEndian){if(n=e+2**32*r,!Number.isSafeInteger(n))throw new Error(n+" exceeds MAX_SAFE_INTEGER. Precision may be lost. Please report if you get this message to https://github.com/geotiffjs/geotiff.js/issues");return n}if(n=2**32*e+r,!Number.isSafeInteger(n))throw new Error(n+" exceeds MAX_SAFE_INTEGER. Precision may be lost. Please report if you get this message to https://github.com/geotiffjs/geotiff.js/issues");return n}readInt64(t){let e=0;const r=(128&this._dataView.getUint8(t+(this._littleEndian?7:0)))>0;let n=!0;for(let i=0;i<8;i++){let o=this._dataView.getUint8(t+(this._littleEndian?i:7-i));r&&(n?0!==o&&(o=255&~(o-1),n=!1):o=255&~o),e+=o*256**i}return r&&(e=-e),e}readOffset(t){return this._bigTiff?this.readUint64(t):this.readUint32(t)}}var Y=r(68),Z=r(9),X=r(25),Q=r(40),J=r.n(Q),tt=r(105),et=r.n(tt),rt=r(39),nt=r.n(rt);class it{constructor(t,{blockSize:e=65536}={}){this.retrievalFunction=t,this.blockSize=e,this.blockRequests=new Map,this.blocks=new Map,this.blockIdsAwaitingRequest=null}async fetch(t,e,r=!1){const n=t+e,i=[],o=[],s=[];for(let e=Math.floor(t/this.blockSize)*this.blockSize;esetTimeout(e,t))}(),this.blockIdsAwaitingRequest){const t=function(t){if(0===t.length)return[];const e=[];let r=[];e.push(r);for(let n=0;n{const e=await t,i=r*this.blockSize,o=Math.min(i+this.blockSize,e.data.byteLength),s=e.data.slice(i,o);this.blockRequests.delete(n),this.blocks.set(n,{data:s,offset:e.offset+i,length:s.byteLength,top:e.offset+o})})())}}this.blockIdsAwaitingRequest=null}const a=[];for(const t of o)this.blockRequests.has(t)&&a.push(this.blockRequests.get(t));await Promise.all(a),await Promise.all(s);return function(t,e,r){const n=e+r,i=new ArrayBuffer(r),o=new Uint8Array(i);for(const r of t){const t=r.offset-e,i=r.top-n;let s,a=0,u=0;t<0?a=-t:t>0&&(u=t),s=i<0?r.length-a:n-r.offset-a;const c=new Uint8Array(r.data,a,s);o.set(c,u)}return i}(i.map(t=>this.blocks.get(t)),t,e)}async requestData(t,e){const r=await this.retrievalFunction(t,e);return r.length?r.length!==r.data.byteLength&&(r.data=r.data.slice(0,r.length)):r.length=r.data.byteLength,r.top=r.offset+r.length,r}}function ot(t,e){const{forceXHR:r}=e;if("function"==typeof fetch&&!r)return function(t,{headers:e={},blockSize:r}={}){return new it(async(r,n)=>{const i=await fetch(t,{headers:{...e,Range:`bytes=${r}-${r+n-1}`}});if(i.ok){if(206===i.status){return{data:i.arrayBuffer?await i.arrayBuffer():(await i.buffer()).buffer,offset:r,length:n}}{const t=i.arrayBuffer?await i.arrayBuffer():(await i.buffer()).buffer;return{data:t,offset:0,length:t.byteLength}}}throw new Error("Error fetching data.")},{blockSize:r})}(t,e);if("undefined"!=typeof XMLHttpRequest)return function(t,{headers:e={},blockSize:r}={}){return new it(async(r,n)=>new Promise((i,o)=>{const s=new XMLHttpRequest;s.open("GET",t),s.responseType="arraybuffer";const a={...e,Range:`bytes=${r}-${r+n-1}`};for(const[t,e]of Object.entries(a))s.setRequestHeader(t,e);s.onload=()=>{const t=s.response;206===s.status?i({data:t,offset:r,length:n}):i({data:t,offset:0,length:t.byteLength})},s.onerror=o,s.send()}),{blockSize:r})}(t,e);if(J.a.get)return function(t,{headers:e={},blockSize:r}={}){return new it(async(r,n)=>new Promise((i,o)=>{const s=nt.a.parse(t);("http:"===s.protocol?J.a:et.a).get({...s,headers:{...e,Range:`bytes=${r}-${r+n-1}`}},t=>{const e=[];t.on("data",t=>{e.push(t)}),t.on("end",()=>{const t=Z.Buffer.concat(e).buffer;i({data:t,offset:r,length:t.byteLength})})}).on("error",o)}),{blockSize:r})}(t,e);throw new Error("No remote source available")}function st(t){const e=function(t,e,r){return new Promise((n,i)=>{Object(X.open)(t,e,r,(t,e)=>{t?i(t):n(e)})})}(t,"r");return{async fetch(t,r){const n=await e,{buffer:i}=await function(...t){return new Promise((e,r)=>{Object(X.read)(...t,(t,n,i)=>{t?r(t):e({bytesRead:n,buffer:i})})})}(n,Z.Buffer.alloc(r),0,r,t);return i.buffer},async close(){const t=await e;return await function(t){return new Promise((e,r)=>{Object(X.close)(t,t=>{t?r(t):e()})})}(t)}}}function at(t,e){for(const r in e)e.hasOwnProperty(r)&&(t[r]=e[r])}function ut(t,e){if(t.length{let r=e;for(;0!==t[r];)r++;return r},readUshort:(t,e)=>t[e]<<8|t[e+1],readShort:(t,e)=>{const r=yt.ui8;return r[0]=t[e+1],r[1]=t[e+0],yt.i16[0]},readInt:(t,e)=>{const r=yt.ui8;return r[0]=t[e+3],r[1]=t[e+2],r[2]=t[e+1],r[3]=t[e+0],yt.i32[0]},readUint:(t,e)=>{const r=yt.ui8;return r[0]=t[e+3],r[1]=t[e+2],r[2]=t[e+1],r[3]=t[e+0],yt.ui32[0]},readASCII:(t,e,r)=>r.map(r=>String.fromCharCode(t[e+r])).join(""),readFloat:(t,e)=>{const r=yt.ui8;return lt(4,n=>{r[n]=t[e+3-n]}),yt.fl32[0]},readDouble:(t,e)=>{const r=yt.ui8;return lt(8,n=>{r[n]=t[e+7-n]}),yt.fl64[0]},writeUshort:(t,e,r)=>{t[e]=r>>8&255,t[e+1]=255&r},writeUint:(t,e,r)=>{t[e]=r>>24&255,t[e+1]=r>>16&255,t[e+2]=r>>8&255,t[e+3]=r>>0&255},writeASCII:(t,e,r)=>{lt(r.length,n=>{t[e+n]=r.charCodeAt(n)})},ui8:new Uint8Array(8)};yt.fl64=new Float64Array(yt.ui8.buffer),yt.writeDouble=(t,e,r)=>{yt.fl64[0]=r,lt(8,r=>{t[e+r]=yt.ui8[7-r]})};const gt=t=>{const e=new Uint8Array(1e3);let r=4;const n=yt;e[0]=77,e[1]=77,e[3]=42;let i=8;if(n.writeUint(e,r,i),r+=4,t.forEach((r,o)=>{const s=((t,e,r,n)=>{let i=r;const o=Object.keys(n).filter(t=>null!=t&&"undefined"!==t);t.writeUshort(e,i,o.length),i+=2;let s=i+12*o.length+4;for(const r of o){let o=null;"number"==typeof r?o=r:"string"==typeof r&&(o=parseInt(r,10));const a=c[o],u=pt[a];if(null==a||void 0===a||void 0===a)throw new Error("unknown type of tag: "+o);let l=n[r];if(void 0===l)throw new Error("failed to get value for key "+r);"ASCII"===a&&"string"==typeof l&&!1===ut(l,"\\0")&&(l+="\\0");const f=l.length;t.writeUshort(e,i,o),i+=2,t.writeUshort(e,i,u),i+=2,t.writeUint(e,i,f),i+=4;let h=[-1,1,1,2,4,8,0,0,0,0,0,0,8][u]*f,d=i;h>4&&(t.writeUint(e,i,s),d=s),"ASCII"===a?t.writeASCII(e,d,l):"SHORT"===a?lt(f,r=>{t.writeUshort(e,d+2*r,l[r])}):"LONG"===a?lt(f,r=>{t.writeUint(e,d+4*r,l[r])}):"RATIONAL"===a?lt(f,r=>{t.writeUint(e,d+8*r,Math.round(1e4*l[r])),t.writeUint(e,d+8*r+4,1e4)}):"DOUBLE"===a&<(f,r=>{t.writeDouble(e,d+8*r,l[r])}),h>4&&(h+=1&h,s+=h),i+=4}return[i,s]})(n,e,i,r);i=s[1],o{lt(i,r=>{lt(n,n=>{o.push(t[n][e][r])})})})),e.ImageLength=r,delete e.height,e.ImageWidth=i,delete e.width,e.BitsPerSample||(e.BitsPerSample=lt(n,()=>8)),mt.forEach(t=>{const r=t[0];if(!e[r]){const n=t[1];e[r]=n}}),e.PhotometricInterpretation||(e.PhotometricInterpretation=3===e.BitsPerSample.length?2:1),e.SamplesPerPixel||(e.SamplesPerPixel=[n]),e.StripByteCounts||(e.StripByteCounts=[n*r*i]),e.ModelPixelScale||(e.ModelPixelScale=[360/i,180/r,0]),e.SampleFormat||(e.SampleFormat=lt(n,()=>1));const s=Object.keys(e).filter(t=>ut(t,"GeoKey")).sort((t,e)=>dt[t]-dt[e]);if(!e.GeoKeyDirectory){const t=[1,1,0,s.length];s.forEach(r=>{const n=Number(dt[r]);let i,o,s;t.push(n),"SHORT"===c[n]?(i=1,o=0,s=e[r]):"GeogCitationGeoKey"===r?(i=e.GeoAsciiParams.length,o=Number(dt.GeoAsciiParams),s=0):console.log("[geotiff.js] couldn\'t get TIFFTagLocation for "+r),t.push(o),t.push(i),t.push(s)}),e.GeoKeyDirectory=t}for(const t in s)s.hasOwnProperty(t)&&delete e[t];["Compression","ExtraSamples","GeographicTypeGeoKey","GTModelTypeGeoKey","GTRasterTypeGeoKey","ImageLength","ImageWidth","PhotometricInterpretation","PlanarConfiguration","ResolutionUnit","SamplesPerPixel","XPosition","YPosition"].forEach(t=>{var r;e[t]&&(e[t]=(r=e[t],Array.isArray(r)?r:[r]))});const a=(t=>{const e={};for(const r in t)"StripOffsets"!==r&&(dt[r]||console.error(r,"not in name2code:",Object.keys(dt)),e[dt[r]]=t[r]);return e})(e);return((t,e,r,n)=>{if(null==r)throw new Error("you passed into encodeImage a width of type "+r);if(null==e)throw new Error("you passed into encodeImage a width of type "+e);const i={256:[e],257:[r],273:[1e3],278:[r],305:"geotiff.js"};if(n)for(const t in n)n.hasOwnProperty(t)&&(i[t]=n[t]);const o=new Uint8Array(gt([i])),s=new Uint8Array(t),a=i[277],u=new Uint8Array(1e3+e*r*a);return lt(o.length,t=>{u[t]=o[t]}),function(t,e){const{length:r}=t;for(let n=0;n{u[1e3+e]=t}),u.buffer})(o,i,r,a)}class vt{log(){}info(){}warn(){}error(){}time(){}timeEnd(){}}let wt=new vt;function xt(t=new vt){wt=t}function _t(t){switch(t){case h.BYTE:case h.ASCII:case h.SBYTE:case h.UNDEFINED:return 1;case h.SHORT:case h.SSHORT:return 2;case h.LONG:case h.SLONG:case h.FLOAT:case h.IFD:return 4;case h.RATIONAL:case h.SRATIONAL:case h.DOUBLE:case h.LONG8:case h.SLONG8:case h.IFD8:return 8;default:throw new RangeError("Invalid field type: "+t)}}function St(t,e,r,n){let i=null,o=null;const s=_t(e);switch(e){case h.BYTE:case h.ASCII:case h.UNDEFINED:i=new Uint8Array(r),o=t.readUint8;break;case h.SBYTE:i=new Int8Array(r),o=t.readInt8;break;case h.SHORT:i=new Uint16Array(r),o=t.readUint16;break;case h.SSHORT:i=new Int16Array(r),o=t.readInt16;break;case h.LONG:case h.IFD:i=new Uint32Array(r),o=t.readUint32;break;case h.SLONG:i=new Int32Array(r),o=t.readInt32;break;case h.LONG8:case h.IFD8:i=new Array(r),o=t.readUint64;break;case h.SLONG8:i=new Array(r),o=t.readInt64;break;case h.RATIONAL:i=new Uint32Array(2*r),o=t.readUint32;break;case h.SRATIONAL:i=new Int32Array(2*r),o=t.readInt32;break;case h.FLOAT:i=new Float32Array(r),o=t.readFloat32;break;case h.DOUBLE:i=new Float64Array(r),o=t.readFloat64;break;default:throw new RangeError("Invalid field type: "+e)}if(e!==h.RATIONAL&&e!==h.SRATIONAL)for(let e=0;et.getWidth()-e.getWidth());for(let e=0;en||o&&o>s)break}}let f=e;if(s){const[t,e]=a.getOrigin(),[r,n]=u.getResolution(a);f=[Math.round((s[0]-t)/r),Math.round((s[1]-e)/n),Math.round((s[2]-t)/r),Math.round((s[3]-e)/n)],f=[Math.min(f[0],f[2]),Math.min(f[1],f[3]),Math.max(f[0],f[2]),Math.max(f[1],f[3])]}return u.readRasters({...t,window:f})}}class Tt extends kt{constructor(t,e,r,n,i={}){super(),this.source=t,this.littleEndian=e,this.bigTiff=r,this.firstIFDOffset=n,this.cache=i.cache||!1,this.ifdRequests=[],this.ghostValues=null}async getSlice(t,e){const r=this.bigTiff?4048:1024;return new $(await this.source.fetch(t,void 0!==e?e:r),t,this.littleEndian,this.bigTiff)}async parseFileDirectoryAt(t){const e=this.bigTiff?20:12,r=this.bigTiff?8:2;let n=await this.getSlice(t);const i=this.bigTiff?n.readUint64(t):n.readUint16(t),o=i*e+(this.bigTiff?16:6);n.covers(t,o)||(n=await this.getSlice(t,o));const s={};let u=t+(this.bigTiff?8:2);for(let t=0;t{const e=await this.ifdRequests[t-1];if(0===e.nextIFDByteOffset)throw new Et(t);return this.parseFileDirectoryAt(e.nextIFDByteOffset)})(),this.ifdRequests[t]}async getImage(t=0){const e=await this.requestIFD(t);return new V(e.fileDirectory,e.geoKeyDirectory,this.dataView,this.littleEndian,this.cache,this.source)}async getImageCount(){let t=0,e=!0;for(;e;)try{await this.requestIFD(t),++t}catch(t){if(!(t instanceof Et))throw t;e=!1}return t}async getGhostValues(){const t=this.bigTiff?16:8;if(this.ghostValues)return this.ghostValues;const e="GDAL_STRUCTURAL_METADATA_SIZE=",r=e.length+100;let n=await this.getSlice(t,r);if(e===St(n,h.ASCII,e.length,t)){const e=St(n,h.ASCII,r,t).split("\\n")[0],i=Number(e.split("=")[1].split(" ")[0])+e.length;i>r&&(n=await this.getSlice(t,i));const o=St(n,h.ASCII,i,t);this.ghostValues={},o.split("\\n").filter(t=>t.length>0).map(t=>t.split("=")).forEach(([t,e])=>{this.ghostValues[t]=e})}return this.ghostValues}static async fromSource(t,e){const r=await t.fetch(0,1024),n=new K(r),i=n.getUint16(0,0);let o;if(18761===i)o=!0;else{if(19789!==i)throw new TypeError("Invalid byte order value.");o=!1}const s=n.getUint16(2,o);let a;if(42===s)a=!1;else{if(43!==s)throw new TypeError("Invalid magic number.");a=!0;if(8!==n.getUint16(4,o))throw new Error("Unsupported offset byte-size.")}const u=a?n.getUint64(8,o):n.getUint32(4,o);return new Tt(t,o,a,u,e)}close(){return"function"==typeof this.source.close&&this.source.close()}}e.default=Tt;class Ct extends kt{constructor(t,e){super(),this.mainFile=t,this.overviewFiles=e,this.imageFiles=[t].concat(e),this.fileDirectoriesPerFile=null,this.fileDirectoriesPerFileParsing=null,this.imageCount=null}async parseFileDirectoriesPerFile(){const t=[this.mainFile.parseFileDirectoryAt(this.mainFile.firstIFDOffset)].concat(this.overviewFiles.map(t=>t.parseFileDirectoryAt(t.firstIFDOffset)));return this.fileDirectoriesPerFile=await Promise.all(t),this.fileDirectoriesPerFile}async getImage(t=0){await this.getImageCount(),await this.parseFileDirectoriesPerFile();let e=0,r=0;for(let n=0;nt.getImageCount()));return this.imageCounts=await Promise.all(t),this.imageCount=this.imageCounts.reduce((t,e)=>t+e,0),this.imageCount}}async function Ot(t,e={}){return Tt.fromSource(ot(t,e))}async function It(t){return Tt.fromSource(function(t){return{fetch:async(e,r)=>t.slice(e,e+r)}}(t))}async function Pt(t){return Tt.fromSource(st(t))}async function Rt(t){return Tt.fromSource((e=t,{fetch:async(t,r)=>new Promise((n,i)=>{const o=e.slice(t,t+r),s=new FileReader;s.onload=t=>n(t.target.result),s.onerror=i,s.readAsArrayBuffer(o)})}));var e}async function jt(t,e=[],r={}){const n=await Tt.fromSource(ot(t,r)),i=await Promise.all(e.map(t=>Tt.fromSource(ot(t,r))));return new Ct(n,i)}async function Mt(t,e){return bt(t,e)}},function(t,e,r){"use strict";r.d(e,"a",(function(){return i}));var n=r(19);Object(n.b)().blob;const i=Object(n.b)().default},,,function(t,e,r){"use strict";var n=r(26),i=r(102);var o=function(t){"function"==typeof t?t():t&&"function"==typeof t.unsubscribe&&t.unsubscribe()};e.a=function(t){const e=new i.a;let r,s=0;return new n.a(n=>{r||(r=t.subscribe(e));const i=e.subscribe(n);return s++,()=>{s--,i.unsubscribe(),0===s&&(o(r),r=void 0)}})}}]);',null)}},function(t,e,r){"use strict";var n=window.URL||window.webkitURL;t.exports=function(t,e){try{try{var r;try{(r=new(window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder)).append(t),r=r.getBlob()}catch(e){r=new Blob([t])}return new Worker(n.createObjectURL(r))}catch(e){return new Worker("data:application/javascript,"+encodeURIComponent(t))}}catch(t){if(!e)throw Error("Inline worker is not supported");return new Worker(e)}}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var r=[],n=!0,i=!1,o=void 0;try{for(var s,a=t[Symbol.iterator]();!(n=(s=a.next()).done)&&(r.push(s.value),!e||r.length!==e);n=!0);}catch(t){i=!0,o=t}finally{try{!n&&a.return&&a.return()}finally{if(i)throw o}}return r}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};e.default=function(t,e){return new Promise((function(r,o){try{e&&console.log("starting parseData with",t),e&&console.log("\tGeoTIFF:","undefined"==typeof GeoTIFF?"undefined":i(GeoTIFF));var u={},c=void 0,h=void 0;if("object"===t.rasterType)u.values=t.data,u.height=c=t.metadata.height||u.values[0].length,u.width=h=t.metadata.width||u.values[0][0].length,u.pixelHeight=t.metadata.pixelHeight,u.pixelWidth=t.metadata.pixelWidth,u.projection=t.metadata.projection,u.xmin=t.metadata.xmin,u.ymax=t.metadata.ymax,u.noDataValue=t.metadata.noDataValue,u.numberOfRasters=u.values.length,u.xmax=u.xmin+u.width*u.pixelWidth,u.ymin=u.ymax-u.height*u.pixelHeight,u._data=null,r(f(u));else if("geotiff"===t.rasterType){u._data=t.data;var d=s.fromArrayBuffer;"url"===t.sourceType?d=s.fromUrl:"Blob"===t.sourceType&&(d=s.fromBlob),e&&console.log("data.rasterType is geotiff"),r(d(t.data).then((function(r){return e&&console.log("geotiff:",r),r.getImage().then((function(r){try{e&&console.log("image:",r);var i=r.fileDirectory,s=r.getGeoKeys()||{},d=s.GeographicTypeGeoKey,p=s.ProjectedCSTypeGeoKey;u.projection=p||d||t.metadata.projection,e&&console.log("projection:",u.projection),u.height=c=r.getHeight(),e&&console.log("result.height:",u.height),u.width=h=r.getWidth(),e&&console.log("result.width:",u.width);var y=r.getResolution(),g=n(y,2),m=g[0],b=g[1];u.pixelHeight=Math.abs(b),u.pixelWidth=Math.abs(m);var v=r.getOrigin(),w=n(v,2),x=w[0],_=w[1];return u.xmin=x,u.xmax=u.xmin+h*u.pixelWidth,u.ymax=_,u.ymin=u.ymax-c*u.pixelHeight,u.noDataValue=i.GDAL_NODATA?parseFloat(i.GDAL_NODATA):null,u.numberOfRasters=i.SamplesPerPixel,i.ColorMap&&(u.palette=(0,a.getPalette)(r)),"url"!==t.sourceType?r.readRasters().then((function(t){return u.values=t.map((function(t){return(0,l.unflatten)(t,{height:c,width:h})})),f(u)})):u}catch(t){o(t),console.error("[georaster] error parsing georaster:",t)}}))})))}}catch(t){o(t),console.error("[georaster] error parsing georaster:",t)}}))};var o,s=r(100),a=r(155),u=r(156),c=(o=u)&&o.__esModule?o:{default:o},l=r(99);function f(t){var e=(0,c.default)(t.values,{height:t.height,layout:"[band][row][column]",noData:t.noDataValue,precise:!1,stats:["max","min","range"],width:t.width});return t.maxs=e.bands.map((function(t){return t.max})),t.mins=e.bands.map((function(t){return t.min})),t.ranges=e.bands.map((function(t){return t.range})),t}},function(t,e,r){(function(e){var n=r(42).Transform,i=r(10);function o(t){n.call(this,t),this._destroyed=!1}function s(t,e,r){r(null,t)}function a(t){return function(e,r,n){return"function"==typeof e&&(n=r,r=e,e={}),"function"!=typeof r&&(r=s),"function"!=typeof n&&(n=null),t(e,r,n)}}i(o,n),o.prototype.destroy=function(t){if(!this._destroyed){this._destroyed=!0;var r=this;e.nextTick((function(){t&&r.emit("error",t),r.emit("close")}))}},t.exports=a((function(t,e,r){var n=new o(t);return n._transform=e,r&&(n._flush=r),n})),t.exports.ctor=a((function(t,e,r){function n(e){if(!(this instanceof n))return new n(e);this.options=Object.assign({},t,e),o.call(this,this.options)}return i(n,o),n.prototype._transform=e,r&&(n.prototype._flush=r),n})),t.exports.obj=a((function(t,e,r){var n=new o(Object.assign({objectMode:!0,highWaterMark:16},t));return n._transform=e,r&&(n._flush=r),n}))}).call(this,r(8))},function(t,e){},function(t,e,r){"use strict";var n=r(43).Buffer,i=r(117);t.exports=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.head=null,this.tail=null,this.length=0}return t.prototype.push=function(t){var e={data:t,next:null};this.length>0?this.tail.next=e:this.head=e,this.tail=e,++this.length},t.prototype.unshift=function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length},t.prototype.shift=function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}},t.prototype.clear=function(){this.head=this.tail=null,this.length=0},t.prototype.join=function(t){if(0===this.length)return"";for(var e=this.head,r=""+e.data;e=e.next;)r+=t+e.data;return r},t.prototype.concat=function(t){if(0===this.length)return n.alloc(0);for(var e,r,i,o=n.allocUnsafe(t>>>0),s=this.head,a=0;s;)e=s.data,r=o,i=a,e.copy(r,i),a+=s.data.length,s=s.next;return o},t}(),i&&i.inspect&&i.inspect.custom&&(t.exports.prototype[i.inspect.custom]=function(){var t=i.inspect({length:this.length});return this.constructor.name+" "+t})},function(t,e){},function(t,e,r){(function(t){var n=void 0!==t&&t||"undefined"!=typeof self&&self||window,i=Function.prototype.apply;function o(t,e){this._id=t,this._clearFn=e}e.setTimeout=function(){return new o(i.call(setTimeout,n,arguments),clearTimeout)},e.setInterval=function(){return new o(i.call(setInterval,n,arguments),clearInterval)},e.clearTimeout=e.clearInterval=function(t){t&&t.close()},o.prototype.unref=o.prototype.ref=function(){},o.prototype.close=function(){this._clearFn.call(n,this._id)},e.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},e.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},e._unrefActive=e.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;e>=0&&(t._idleTimeoutId=setTimeout((function(){t._onTimeout&&t._onTimeout()}),e))},r(119),e.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==t&&t.setImmediate||this&&this.setImmediate,e.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==t&&t.clearImmediate||this&&this.clearImmediate}).call(this,r(3))},function(t,e,r){(function(t,e){!function(t,r){"use strict";if(!t.setImmediate){var n,i,o,s,a,u=1,c={},l=!1,f=t.document,h=Object.getPrototypeOf&&Object.getPrototypeOf(t);h=h&&h.setTimeout?h:t,"[object process]"==={}.toString.call(t.process)?n=function(t){e.nextTick((function(){p(t)}))}:!function(){if(t.postMessage&&!t.importScripts){var e=!0,r=t.onmessage;return t.onmessage=function(){e=!1},t.postMessage("","*"),t.onmessage=r,e}}()?t.MessageChannel?((o=new MessageChannel).port1.onmessage=function(t){p(t.data)},n=function(t){o.port2.postMessage(t)}):f&&"onreadystatechange"in f.createElement("script")?(i=f.documentElement,n=function(t){var e=f.createElement("script");e.onreadystatechange=function(){p(t),e.onreadystatechange=null,i.removeChild(e),e=null},i.appendChild(e)}):n=function(t){setTimeout(p,0,t)}:(s="setImmediate$"+Math.random()+"$",a=function(e){e.source===t&&"string"==typeof e.data&&0===e.data.indexOf(s)&&p(+e.data.slice(s.length))},t.addEventListener?t.addEventListener("message",a,!1):t.attachEvent("onmessage",a),n=function(e){t.postMessage(s+e,"*")}),h.setImmediate=function(t){"function"!=typeof t&&(t=new Function(""+t));for(var e=new Array(arguments.length-1),r=0;r>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24)}function c(){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 n.Buf16(320),this.work=new n.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function l(t){var e;return t&&t.state?(e=t.state,t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=1&e.wrap),e.mode=1,e.last=0,e.havedict=0,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new n.Buf32(852),e.distcode=e.distdyn=new n.Buf32(592),e.sane=1,e.back=-1,0):-2}function f(t){var e;return t&&t.state?((e=t.state).wsize=0,e.whave=0,e.wnext=0,l(t)):-2}function h(t,e){var r,n;return t&&t.state?(n=t.state,e<0?(r=0,e=-e):(r=1+(e>>4),e<48&&(e&=15)),e&&(e<8||e>15)?-2:(null!==n.window&&n.wbits!==e&&(n.window=null),n.wrap=r,n.wbits=e,f(t))):-2}function d(t,e){var r,n;return t?(n=new c,t.state=n,n.window=null,0!==(r=h(t,e))&&(t.state=null),r):-2}var p,y,g=!0;function m(t){if(g){var e;for(p=new n.Buf32(512),y=new n.Buf32(32),e=0;e<144;)t.lens[e++]=8;for(;e<256;)t.lens[e++]=9;for(;e<280;)t.lens[e++]=7;for(;e<288;)t.lens[e++]=8;for(a(1,t.lens,0,288,p,0,t.work,{bits:9}),e=0;e<32;)t.lens[e++]=5;a(2,t.lens,0,32,y,0,t.work,{bits:5}),g=!1}t.lencode=p,t.lenbits=9,t.distcode=y,t.distbits=5}function b(t,e,r,i){var o,s=t.state;return null===s.window&&(s.wsize=1<=s.wsize?(n.arraySet(s.window,e,r-s.wsize,s.wsize,0),s.wnext=0,s.whave=s.wsize):((o=s.wsize-s.wnext)>i&&(o=i),n.arraySet(s.window,e,r-i,o,s.wnext),(i-=o)?(n.arraySet(s.window,e,r-i,i,0),s.wnext=i,s.whave=s.wsize):(s.wnext+=o,s.wnext===s.wsize&&(s.wnext=0),s.whave>>8&255,r.check=o(r.check,L,2,0),y=0,g=0,r.mode=2;break}if(r.flags=0,r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&y)<<8)+(y>>8))%31){t.msg="incorrect header check",r.mode=30;break}if(8!=(15&y)){t.msg="unknown compression method",r.mode=30;break}if(g-=4,P=8+(15&(y>>>=4)),0===r.wbits)r.wbits=P;else if(P>r.wbits){t.msg="invalid window size",r.mode=30;break}r.dmax=1<>8&1),512&r.flags&&(L[0]=255&y,L[1]=y>>>8&255,r.check=o(r.check,L,2,0)),y=0,g=0,r.mode=3;case 3:for(;g<32;){if(0===d)break t;d--,y+=c[f++]<>>8&255,L[2]=y>>>16&255,L[3]=y>>>24&255,r.check=o(r.check,L,4,0)),y=0,g=0,r.mode=4;case 4:for(;g<16;){if(0===d)break t;d--,y+=c[f++]<>8),512&r.flags&&(L[0]=255&y,L[1]=y>>>8&255,r.check=o(r.check,L,2,0)),y=0,g=0,r.mode=5;case 5:if(1024&r.flags){for(;g<16;){if(0===d)break t;d--,y+=c[f++]<>>8&255,r.check=o(r.check,L,2,0)),y=0,g=0}else r.head&&(r.head.extra=null);r.mode=6;case 6:if(1024&r.flags&&((x=r.length)>d&&(x=d),x&&(r.head&&(P=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),n.arraySet(r.head.extra,c,f,x,P)),512&r.flags&&(r.check=o(r.check,c,x,f)),d-=x,f+=x,r.length-=x),r.length))break t;r.length=0,r.mode=7;case 7:if(2048&r.flags){if(0===d)break t;x=0;do{P=c[f+x++],r.head&&P&&r.length<65536&&(r.head.name+=String.fromCharCode(P))}while(P&&x>9&1,r.head.done=!0),t.adler=r.check=0,r.mode=12;break;case 10:for(;g<32;){if(0===d)break t;d--,y+=c[f++]<>>=7&g,g-=7&g,r.mode=27;break}for(;g<3;){if(0===d)break t;d--,y+=c[f++]<>>=1)){case 0:r.mode=14;break;case 1:if(m(r),r.mode=20,6===e){y>>>=2,g-=2;break t}break;case 2:r.mode=17;break;case 3:t.msg="invalid block type",r.mode=30}y>>>=2,g-=2;break;case 14:for(y>>>=7&g,g-=7&g;g<32;){if(0===d)break t;d--,y+=c[f++]<>>16^65535)){t.msg="invalid stored block lengths",r.mode=30;break}if(r.length=65535&y,y=0,g=0,r.mode=15,6===e)break t;case 15:r.mode=16;case 16:if(x=r.length){if(x>d&&(x=d),x>p&&(x=p),0===x)break t;n.arraySet(l,c,f,x,h),d-=x,f+=x,p-=x,h+=x,r.length-=x;break}r.mode=12;break;case 17:for(;g<14;){if(0===d)break t;d--,y+=c[f++]<>>=5,g-=5,r.ndist=1+(31&y),y>>>=5,g-=5,r.ncode=4+(15&y),y>>>=4,g-=4,r.nlen>286||r.ndist>30){t.msg="too many length or distance symbols",r.mode=30;break}r.have=0,r.mode=18;case 18:for(;r.have>>=3,g-=3}for(;r.have<19;)r.lens[F[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,R={bits:r.lenbits},I=a(0,r.lens,0,19,r.lencode,0,r.work,R),r.lenbits=R.bits,I){t.msg="invalid code lengths set",r.mode=30;break}r.have=0,r.mode=19;case 19:for(;r.have>>16&255,k=65535&M,!((A=M>>>24)<=g);){if(0===d)break t;d--,y+=c[f++]<>>=A,g-=A,r.lens[r.have++]=k;else{if(16===k){for(j=A+2;g>>=A,g-=A,0===r.have){t.msg="invalid bit length repeat",r.mode=30;break}P=r.lens[r.have-1],x=3+(3&y),y>>>=2,g-=2}else if(17===k){for(j=A+3;g>>=A)),y>>>=3,g-=3}else{for(j=A+7;g>>=A)),y>>>=7,g-=7}if(r.have+x>r.nlen+r.ndist){t.msg="invalid bit length repeat",r.mode=30;break}for(;x--;)r.lens[r.have++]=P}}if(30===r.mode)break;if(0===r.lens[256]){t.msg="invalid code -- missing end-of-block",r.mode=30;break}if(r.lenbits=9,R={bits:r.lenbits},I=a(1,r.lens,0,r.nlen,r.lencode,0,r.work,R),r.lenbits=R.bits,I){t.msg="invalid literal/lengths set",r.mode=30;break}if(r.distbits=6,r.distcode=r.distdyn,R={bits:r.distbits},I=a(2,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,R),r.distbits=R.bits,I){t.msg="invalid distances set",r.mode=30;break}if(r.mode=20,6===e)break t;case 20:r.mode=21;case 21:if(d>=6&&p>=258){t.next_out=h,t.avail_out=p,t.next_in=f,t.avail_in=d,r.hold=y,r.bits=g,s(t,w),h=t.next_out,l=t.output,p=t.avail_out,f=t.next_in,c=t.input,d=t.avail_in,y=r.hold,g=r.bits,12===r.mode&&(r.back=-1);break}for(r.back=0;E=(M=r.lencode[y&(1<>>16&255,k=65535&M,!((A=M>>>24)<=g);){if(0===d)break t;d--,y+=c[f++]<>T)])>>>16&255,k=65535&M,!(T+(A=M>>>24)<=g);){if(0===d)break t;d--,y+=c[f++]<>>=T,g-=T,r.back+=T}if(y>>>=A,g-=A,r.back+=A,r.length=k,0===E){r.mode=26;break}if(32&E){r.back=-1,r.mode=12;break}if(64&E){t.msg="invalid literal/length code",r.mode=30;break}r.extra=15&E,r.mode=22;case 22:if(r.extra){for(j=r.extra;g>>=r.extra,g-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=23;case 23:for(;E=(M=r.distcode[y&(1<>>16&255,k=65535&M,!((A=M>>>24)<=g);){if(0===d)break t;d--,y+=c[f++]<>T)])>>>16&255,k=65535&M,!(T+(A=M>>>24)<=g);){if(0===d)break t;d--,y+=c[f++]<>>=T,g-=T,r.back+=T}if(y>>>=A,g-=A,r.back+=A,64&E){t.msg="invalid distance code",r.mode=30;break}r.offset=k,r.extra=15&E,r.mode=24;case 24:if(r.extra){for(j=r.extra;g>>=r.extra,g-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){t.msg="invalid distance too far back",r.mode=30;break}r.mode=25;case 25:if(0===p)break t;if(x=w-p,r.offset>x){if((x=r.offset-x)>r.whave&&r.sane){t.msg="invalid distance too far back",r.mode=30;break}x>r.wnext?(x-=r.wnext,_=r.wsize-x):_=r.wnext-x,x>r.length&&(x=r.length),S=r.window}else S=l,_=h-r.offset,x=r.length;x>p&&(x=p),p-=x,r.length-=x;do{l[h++]=S[_++]}while(--x);0===r.length&&(r.mode=21);break;case 26:if(0===p)break t;l[h++]=r.length,p--,r.mode=21;break;case 27:if(r.wrap){for(;g<32;){if(0===d)break t;d--,y|=c[f++]<>>16&65535|0,s=0;0!==r;){r-=s=r>2e3?2e3:r;do{o=o+(i=i+e[n++]|0)|0}while(--s);i%=65521,o%=65521}return i|o<<16|0}},function(t,e,r){"use strict";var n=function(){for(var t,e=[],r=0;r<256;r++){t=r;for(var n=0;n<8;n++)t=1&t?3988292384^t>>>1:t>>>1;e[r]=t}return e}();t.exports=function(t,e,r,i){var o=n,s=i+r;t^=-1;for(var a=i;a>>8^o[255&(t^e[a])];return-1^t}},function(t,e,r){"use strict";t.exports=function(t,e){var r,n,i,o,s,a,u,c,l,f,h,d,p,y,g,m,b,v,w,x,_,S,A,E,k;r=t.state,n=t.next_in,E=t.input,i=n+(t.avail_in-5),o=t.next_out,k=t.output,s=o-(e-t.avail_out),a=o+(t.avail_out-257),u=r.dmax,c=r.wsize,l=r.whave,f=r.wnext,h=r.window,d=r.hold,p=r.bits,y=r.lencode,g=r.distcode,m=(1<>>=w=v>>>24,p-=w,0===(w=v>>>16&255))k[o++]=65535&v;else{if(!(16&w)){if(0==(64&w)){v=y[(65535&v)+(d&(1<>>=w,p-=w),p<15&&(d+=E[n++]<>>=w=v>>>24,p-=w,!(16&(w=v>>>16&255))){if(0==(64&w)){v=g[(65535&v)+(d&(1<u){t.msg="invalid distance too far back",r.mode=30;break t}if(d>>>=w,p-=w,_>(w=o-s)){if((w=_-w)>l&&r.sane){t.msg="invalid distance too far back",r.mode=30;break t}if(S=0,A=h,0===f){if(S+=c-w,w2;)k[o++]=A[S++],k[o++]=A[S++],k[o++]=A[S++],x-=3;x&&(k[o++]=A[S++],x>1&&(k[o++]=A[S++]))}else{S=o-_;do{k[o++]=k[S++],k[o++]=k[S++],k[o++]=k[S++],x-=3}while(x>2);x&&(k[o++]=k[S++],x>1&&(k[o++]=k[S++]))}break}}break}}while(n>3,d&=(1<<(p-=x<<3))-1,t.next_in=n,t.next_out=o,t.avail_in=n=1&&0===L[k];k--);if(T>k&&(T=k),0===k)return c[l++]=20971520,c[l++]=20971520,h.bits=1,0;for(E=1;E0&&(0===t||1!==k))return-1;for(F[1]=0,S=1;S<15;S++)F[S+1]=F[S]+L[S];for(A=0;A852||2===t&&I>592)return 1;for(;;){v=S-C,f[A]b?(w=N[D+f[A]],x=j[M+f[A]]):(w=96,x=0),d=1<>C)+(p-=d)]=v<<24|w<<16|x|0}while(0!==p);for(d=1<>=1;if(0!==d?(R&=d-1,R+=d):R=0,A++,0==--L[S]){if(S===k)break;S=e[r+f[A]]}if(S>T&&(R&g)!==y){for(0===C&&(C=T),m+=E,P=1<<(O=S-C);O+C852||2===t&&I>592)return 1;c[y=R&g]=T<<24|O<<16|m-l|0}}return 0!==R&&(c[m+R]=S-C<<24|64<<16|0),h.bits=T,0}},function(t,e,r){"use strict";var n=r(29),i=!0,o=!0;try{String.fromCharCode.apply(null,[0])}catch(t){i=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(t){o=!1}for(var s=new n.Buf8(256),a=0;a<256;a++)s[a]=a>=252?6:a>=248?5:a>=240?4:a>=224?3:a>=192?2:1;function u(t,e){if(e<65534&&(t.subarray&&o||!t.subarray&&i))return String.fromCharCode.apply(null,n.shrinkBuf(t,e));for(var r="",s=0;s>>6,e[s++]=128|63&r):r<65536?(e[s++]=224|r>>>12,e[s++]=128|r>>>6&63,e[s++]=128|63&r):(e[s++]=240|r>>>18,e[s++]=128|r>>>12&63,e[s++]=128|r>>>6&63,e[s++]=128|63&r);return e},e.buf2binstring=function(t){return u(t,t.length)},e.binstring2buf=function(t){for(var e=new n.Buf8(t.length),r=0,i=e.length;r4)c[n++]=65533,r+=o-1;else{for(i&=2===o?31:3===o?15:7;o>1&&r1?c[n++]=65533:i<65536?c[n++]=i:(i-=65536,c[n++]=55296|i>>10&1023,c[n++]=56320|1023&i)}return u(c,n)},e.utf8border=function(t,e){var r;for((e=e||t.length)>t.length&&(e=t.length),r=e-1;r>=0&&128==(192&t[r]);)r--;return r<0||0===r?e:r+s[t[r]]>e?r:e}},function(t,e,r){"use strict";t.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},function(t,e,r){"use strict";t.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},function(t,e,r){"use strict";t.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}},function(t,e,r){"use strict";t.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},function(t,e,r){t.exports=r.p+"0.georaster.browser.bundle.min.worker.js"},function(t,e,r){t.exports=function(t){function e(t){let r,i,o,s=null;function a(...t){if(!a.enabled)return;const n=a,i=Number(new Date),o=i-(r||i);n.diff=o,n.prev=r,n.curr=i,r=i,t[0]=e.coerce(t[0]),"string"!=typeof t[0]&&t.unshift("%O");let s=0;t[0]=t[0].replace(/%([a-zA-Z%])/g,(r,i)=>{if("%%"===r)return"%";s++;const o=e.formatters[i];if("function"==typeof o){const e=t[s];r=o.call(n,e),t.splice(s,1),s--}return r}),e.formatArgs.call(n,t);(n.log||e.log).apply(n,t)}return a.namespace=t,a.useColors=e.useColors(),a.color=e.selectColor(t),a.extend=n,a.destroy=e.destroy,Object.defineProperty(a,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==s?s:(i!==e.namespaces&&(i=e.namespaces,o=e.enabled(t)),o),set:t=>{s=t}}),"function"==typeof e.init&&e.init(a),a}function n(t,r){const n=e(this.namespace+(void 0===r?":":r)+t);return n.log=this.log,n}function i(t){return t.toString().substring(2,t.toString().length-2).replace(/\.\*\?$/,"*")}return e.debug=e,e.default=e,e.coerce=function(t){if(t instanceof Error)return t.stack||t.message;return t},e.disable=function(){const t=[...e.names.map(i),...e.skips.map(i).map(t=>"-"+t)].join(",");return e.enable(""),t},e.enable=function(t){let r;e.save(t),e.namespaces=t,e.names=[],e.skips=[];const n=("string"==typeof t?t:"").split(/[\s,]+/),i=n.length;for(r=0;r{e[r]=t[r]}),e.names=[],e.skips=[],e.formatters={},e.selectColor=function(t){let r=0;for(let e=0;e=1.5*r;return Math.round(t/r)+" "+n+(i?"s":"")}t.exports=function(t,e){e=e||{};var a=typeof t;if("string"===a&&t.length>0)return function(t){if((t=String(t)).length>100)return;var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(!e)return;var s=parseFloat(e[1]);switch((e[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*s;case"weeks":case"week":case"w":return 6048e5*s;case"days":case"day":case"d":return s*o;case"hours":case"hour":case"hrs":case"hr":case"h":return s*i;case"minutes":case"minute":case"mins":case"min":case"m":return s*n;case"seconds":case"second":case"secs":case"sec":case"s":return s*r;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}(t);if("number"===a&&isFinite(t))return e.long?function(t){var e=Math.abs(t);if(e>=o)return s(t,e,o,"day");if(e>=i)return s(t,e,i,"hour");if(e>=n)return s(t,e,n,"minute");if(e>=r)return s(t,e,r,"second");return t+" ms"}(t):function(t){var e=Math.abs(t);if(e>=o)return Math.round(t/o)+"d";if(e>=i)return Math.round(t/i)+"h";if(e>=n)return Math.round(t/n)+"m";if(e>=r)return Math.round(t/r)+"s";return t+"ms"}(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))}},function(t,e,r){(function(e,n,i){var o=r(69),s=r(10),a=r(70),u=r(42),c=r(137),l=a.IncomingMessage,f=a.readyStates;var h=t.exports=function(t){var r,n=this;u.Writable.call(n),n._opts=t,n._body=[],n._headers={},t.auth&&n.setHeader("Authorization","Basic "+new e(t.auth).toString("base64")),Object.keys(t.headers).forEach((function(e){n.setHeader(e,t.headers[e])}));var i=!0;if("disable-fetch"===t.mode||"requestTimeout"in t&&!o.abortController)i=!1,r=!0;else if("prefer-streaming"===t.mode)r=!1;else if("allow-wrong-content-type"===t.mode)r=!o.overrideMimeType;else{if(t.mode&&"default"!==t.mode&&"prefer-fast"!==t.mode)throw new Error("Invalid value for opts.mode");r=!0}n._mode=function(t,e){return o.fetch&&e?"fetch":o.mozchunkedarraybuffer?"moz-chunked-arraybuffer":o.msstream?"ms-stream":o.arraybuffer&&t?"arraybuffer":o.vbArray&&t?"text:vbarray":"text"}(r,i),n._fetchTimer=null,n.on("finish",(function(){n._onFinish()}))};s(h,u.Writable),h.prototype.setHeader=function(t,e){var r=t.toLowerCase();-1===d.indexOf(r)&&(this._headers[r]={name:t,value:e})},h.prototype.getHeader=function(t){var e=this._headers[t.toLowerCase()];return e?e.value:null},h.prototype.removeHeader=function(t){delete this._headers[t.toLowerCase()]},h.prototype._onFinish=function(){var t=this;if(!t._destroyed){var r=t._opts,s=t._headers,a=null;"GET"!==r.method&&"HEAD"!==r.method&&(a=o.arraybuffer?c(e.concat(t._body)):o.blobConstructor?new n.Blob(t._body.map((function(t){return c(t)})),{type:(s["content-type"]||{}).value||""}):e.concat(t._body).toString());var u=[];if(Object.keys(s).forEach((function(t){var e=s[t].name,r=s[t].value;Array.isArray(r)?r.forEach((function(t){u.push([e,t])})):u.push([e,r])})),"fetch"===t._mode){var l=null;if(o.abortController){var h=new AbortController;l=h.signal,t._fetchAbortController=h,"requestTimeout"in r&&0!==r.requestTimeout&&(t._fetchTimer=n.setTimeout((function(){t.emit("requestTimeout"),t._fetchAbortController&&t._fetchAbortController.abort()}),r.requestTimeout))}n.fetch(t._opts.url,{method:t._opts.method,headers:u,body:a||void 0,mode:"cors",credentials:r.withCredentials?"include":"same-origin",signal:l}).then((function(e){t._fetchResponse=e,t._connect()}),(function(e){n.clearTimeout(t._fetchTimer),t._destroyed||t.emit("error",e)}))}else{var d=t._xhr=new n.XMLHttpRequest;try{d.open(t._opts.method,t._opts.url,!0)}catch(e){return void i.nextTick((function(){t.emit("error",e)}))}"responseType"in d&&(d.responseType=t._mode.split(":")[0]),"withCredentials"in d&&(d.withCredentials=!!r.withCredentials),"text"===t._mode&&"overrideMimeType"in d&&d.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in r&&(d.timeout=r.requestTimeout,d.ontimeout=function(){t.emit("requestTimeout")}),u.forEach((function(t){d.setRequestHeader(t[0],t[1])})),t._response=null,d.onreadystatechange=function(){switch(d.readyState){case f.LOADING:case f.DONE:t._onXHRProgress()}},"moz-chunked-arraybuffer"===t._mode&&(d.onprogress=function(){t._onXHRProgress()}),d.onerror=function(){t._destroyed||t.emit("error",new Error("XHR error"))};try{d.send(a)}catch(e){return void i.nextTick((function(){t.emit("error",e)}))}}}},h.prototype._onXHRProgress=function(){(function(t){try{var e=t.status;return null!==e&&0!==e}catch(t){return!1}})(this._xhr)&&!this._destroyed&&(this._response||this._connect(),this._response._onXHRProgress())},h.prototype._connect=function(){var t=this;t._destroyed||(t._response=new l(t._xhr,t._fetchResponse,t._mode,t._fetchTimer),t._response.on("error",(function(e){t.emit("error",e)})),t.emit("response",t._response))},h.prototype._write=function(t,e,r){this._body.push(t),r()},h.prototype.abort=h.prototype.destroy=function(){this._destroyed=!0,n.clearTimeout(this._fetchTimer),this._response&&(this._response._destroyed=!0),this._xhr?this._xhr.abort():this._fetchAbortController&&this._fetchAbortController.abort()},h.prototype.end=function(t,e,r){"function"==typeof t&&(r=t,t=void 0),u.Writable.prototype.end.call(this,t,e,r)},h.prototype.flushHeaders=function(){},h.prototype.setTimeout=function(){},h.prototype.setNoDelay=function(){},h.prototype.setSocketKeepAlive=function(){};var d=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","via"]}).call(this,r(7).Buffer,r(3),r(8))},function(t,e,r){var n=r(7).Buffer;t.exports=function(t){if(t instanceof Uint8Array){if(0===t.byteOffset&&t.byteLength===t.buffer.byteLength)return t.buffer;if("function"==typeof t.buffer.slice)return t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength)}if(n.isBuffer(t)){for(var e=new Uint8Array(t.length),r=t.length,i=0;i= 0x80 (not a basic code point)","invalid-input":"Invalid input"},d=Math.floor,p=String.fromCharCode;function y(t){throw new RangeError(h[t])}function g(t,e){for(var r=t.length,n=[];r--;)n[r]=e(t[r]);return n}function m(t,e){var r=t.split("@"),n="";return r.length>1&&(n=r[0]+"@",t=r[1]),n+g((t=t.replace(f,".")).split("."),e).join(".")}function b(t){for(var e,r,n=[],i=0,o=t.length;i=55296&&e<=56319&&i65535&&(e+=p((t-=65536)>>>10&1023|55296),t=56320|1023&t),e+=p(t)})).join("")}function w(t,e){return t+22+75*(t<26)-((0!=e)<<5)}function x(t,e,r){var n=0;for(t=r?d(t/700):t>>1,t+=d(t/e);t>455;n+=36)t=d(t/35);return d(n+36*t/(t+38))}function _(t){var e,r,n,i,o,s,a,c,l,f,h,p=[],g=t.length,m=0,b=128,w=72;for((r=t.lastIndexOf("-"))<0&&(r=0),n=0;n=128&&y("not-basic"),p.push(t.charCodeAt(n));for(i=r>0?r+1:0;i=g&&y("invalid-input"),((c=(h=t.charCodeAt(i++))-48<10?h-22:h-65<26?h-65:h-97<26?h-97:36)>=36||c>d((u-m)/s))&&y("overflow"),m+=c*s,!(c<(l=a<=w?1:a>=w+26?26:a-w));a+=36)s>d(u/(f=36-l))&&y("overflow"),s*=f;w=x(m-o,e=p.length+1,0==o),d(m/e)>u-b&&y("overflow"),b+=d(m/e),m%=e,p.splice(m++,0,b)}return v(p)}function S(t){var e,r,n,i,o,s,a,c,l,f,h,g,m,v,_,S=[];for(g=(t=b(t)).length,e=128,r=0,o=72,s=0;s=e&&hd((u-r)/(m=n+1))&&y("overflow"),r+=(a-e)*m,e=a,s=0;su&&y("overflow"),h==e){for(c=r,l=36;!(c<(f=l<=o?1:l>=o+26?26:l-o));l+=36)_=c-f,v=36-f,S.push(p(w(f+_%v,0))),c=d(_/v);S.push(p(w(c,0))),o=x(r,m,n==i),r=0,++n}++r,++e}return S.join("")}a={version:"1.4.1",ucs2:{decode:b,encode:v},decode:_,encode:S,toASCII:function(t){return m(t,(function(t){return l.test(t)?"xn--"+S(t):t}))},toUnicode:function(t){return m(t,(function(t){return c.test(t)?_(t.slice(4).toLowerCase()):t}))}},void 0===(i=function(){return a}.call(e,r,e,t))||(t.exports=i)}()}).call(this,r(141)(t),r(3))},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e,r){"use strict";var n=r(143),i=r(154),o=r(46);t.exports={formats:o,parse:i,stringify:n}},function(t,e,r){"use strict";var n=r(144),i=r(71),o=r(46),s=Object.prototype.hasOwnProperty,a={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,e){return t+"["+e+"]"},repeat:function(t){return t}},u=Array.isArray,c=Array.prototype.push,l=function(t,e){c.apply(t,u(e)?e:[e])},f=Date.prototype.toISOString,h=o.default,d={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:i.encode,encodeValuesOnly:!1,format:h,formatter:o.formatters[h],indices:!1,serializeDate:function(t){return f.call(t)},skipNulls:!1,strictNullHandling:!1},p={},y=function t(e,r,o,s,a,c,f,h,y,g,m,b,v,w,x,_){for(var S,A=e,E=_,k=0,T=!1;void 0!==(E=E.get(p))&&!T;){var O=E.get(e);if(k+=1,void 0!==O){if(O===k)throw new RangeError("Cyclic object value");T=!0}void 0===E.get(p)&&(k=0)}if("function"==typeof h?A=h(r,A):A instanceof Date?A=m(A):"comma"===o&&u(A)&&(A=i.maybeMap(A,(function(t){return t instanceof Date?m(t):t}))),null===A){if(a)return f&&!w?f(r,d.encoder,x,"key",b):r;A=""}if("string"==typeof(S=A)||"number"==typeof S||"boolean"==typeof S||"symbol"==typeof S||"bigint"==typeof S||i.isBuffer(A))return f?[v(w?r:f(r,d.encoder,x,"key",b))+"="+v(f(A,d.encoder,x,"value",b))]:[v(r)+"="+v(String(A))];var C,P=[];if(void 0===A)return P;if("comma"===o&&u(A))w&&f&&(A=i.maybeMap(A,f)),C=[{value:A.length>0?A.join(",")||null:void 0}];else if(u(h))C=h;else{var I=Object.keys(A);C=y?I.sort(y):I}for(var R=s&&u(A)&&1===A.length?r+"[]":r,j=0;j0?x+w:""}},function(t,e,r){"use strict";var n=r(44),i=r(150),o=r(152),s=n("%TypeError%"),a=n("%WeakMap%",!0),u=n("%Map%",!0),c=i("WeakMap.prototype.get",!0),l=i("WeakMap.prototype.set",!0),f=i("WeakMap.prototype.has",!0),h=i("Map.prototype.get",!0),d=i("Map.prototype.set",!0),p=i("Map.prototype.has",!0),y=function(t,e){for(var r,n=t;null!==(r=n.next);n=r)if(r.key===e)return n.next=r.next,r.next=t.next,t.next=r,r};t.exports=function(){var t,e,r,n={assert:function(t){if(!n.has(t))throw new s("Side channel does not contain "+o(t))},get:function(n){if(a&&n&&("object"==typeof n||"function"==typeof n)){if(t)return c(t,n)}else if(u){if(e)return h(e,n)}else if(r)return function(t,e){var r=y(t,e);return r&&r.value}(r,n)},has:function(n){if(a&&n&&("object"==typeof n||"function"==typeof n)){if(t)return f(t,n)}else if(u){if(e)return p(e,n)}else if(r)return function(t,e){return!!y(t,e)}(r,n);return!1},set:function(n,i){a&&n&&("object"==typeof n||"function"==typeof n)?(t||(t=new a),l(t,n,i)):u?(e||(e=new u),d(e,n,i)):(r||(r={key:{},next:null}),function(t,e,r){var n=y(t,e);n?n.value=r:t.next={key:e,next:t.next,value:r}}(r,n,i))}};return n}},function(t,e,r){"use strict";var n="undefined"!=typeof Symbol&&Symbol,i=r(146);t.exports=function(){return"function"==typeof n&&("function"==typeof Symbol&&("symbol"==typeof n("foo")&&("symbol"==typeof Symbol("bar")&&i())))}},function(t,e,r){"use strict";t.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var t={},e=Symbol("test"),r=Object(e);if("string"==typeof e)return!1;if("[object Symbol]"!==Object.prototype.toString.call(e))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(e in t[e]=42,t)return!1;if("function"==typeof Object.keys&&0!==Object.keys(t).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(t).length)return!1;var n=Object.getOwnPropertySymbols(t);if(1!==n.length||n[0]!==e)return!1;if(!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var i=Object.getOwnPropertyDescriptor(t,e);if(42!==i.value||!0!==i.enumerable)return!1}return!0}},function(t,e,r){"use strict";var n={foo:{}},i=Object;t.exports=function(){return{__proto__:n}.foo===n.foo&&!({__proto__:null}instanceof i)}},function(t,e,r){"use strict";var n="Function.prototype.bind called on incompatible ",i=Array.prototype.slice,o=Object.prototype.toString;t.exports=function(t){var e=this;if("function"!=typeof e||"[object Function]"!==o.call(e))throw new TypeError(n+e);for(var r,s=i.call(arguments,1),a=function(){if(this instanceof r){var n=e.apply(this,s.concat(i.call(arguments)));return Object(n)===n?n:this}return e.apply(t,s.concat(i.call(arguments)))},u=Math.max(0,e.length-s.length),c=[],l=0;l-1?i(r):r}},function(t,e,r){"use strict";var n=r(45),i=r(44),o=i("%Function.prototype.apply%"),s=i("%Function.prototype.call%"),a=i("%Reflect.apply%",!0)||n.call(s,o),u=i("%Object.getOwnPropertyDescriptor%",!0),c=i("%Object.defineProperty%",!0),l=i("%Math.max%");if(c)try{c({},"a",{value:1})}catch(t){c=null}t.exports=function(t){var e=a(n,s,arguments);if(u&&c){var r=u(e,"length");r.configurable&&c(e,"length",{value:1+l(0,t.length-(arguments.length-1))})}return e};var f=function(){return a(n,o,arguments)};c?c(t.exports,"apply",{value:f}):t.exports.apply=f},function(t,e,r){var n="function"==typeof Map&&Map.prototype,i=Object.getOwnPropertyDescriptor&&n?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,o=n&&i&&"function"==typeof i.get?i.get:null,s=n&&Map.prototype.forEach,a="function"==typeof Set&&Set.prototype,u=Object.getOwnPropertyDescriptor&&a?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,c=a&&u&&"function"==typeof u.get?u.get:null,l=a&&Set.prototype.forEach,f="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,h="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,d="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,p=Boolean.prototype.valueOf,y=Object.prototype.toString,g=Function.prototype.toString,m=String.prototype.match,b=String.prototype.slice,v=String.prototype.replace,w=String.prototype.toUpperCase,x=String.prototype.toLowerCase,_=RegExp.prototype.test,S=Array.prototype.concat,A=Array.prototype.join,E=Array.prototype.slice,k=Math.floor,T="function"==typeof BigInt?BigInt.prototype.valueOf:null,O=Object.getOwnPropertySymbols,C="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,P="function"==typeof Symbol&&"object"==typeof Symbol.iterator,I="function"==typeof Symbol&&Symbol.toStringTag&&(typeof Symbol.toStringTag===P||"symbol")?Symbol.toStringTag:null,R=Object.prototype.propertyIsEnumerable,j=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null);function M(t,e){if(t===1/0||t===-1/0||t!=t||t&&t>-1e3&&t<1e3||_.call(/e/,e))return e;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof t){var n=t<0?-k(-t):k(t);if(n!==t){var i=String(n),o=b.call(e,i.length+1);return v.call(i,r,"$&_")+"."+v.call(v.call(o,/([0-9]{3})/g,"$&_"),/_$/,"")}}return v.call(e,r,"$&_")}var L=r(153),F=L.custom,N=q(F)?F:null;function D(t,e,r){var n="double"===(r.quoteStyle||e)?'"':"'";return n+t+n}function U(t){return v.call(String(t),/"/g,""")}function B(t){return!("[object Array]"!==W(t)||I&&"object"==typeof t&&I in t)}function G(t){return!("[object RegExp]"!==W(t)||I&&"object"==typeof t&&I in t)}function q(t){if(P)return t&&"object"==typeof t&&t instanceof Symbol;if("symbol"==typeof t)return!0;if(!t||"object"!=typeof t||!C)return!1;try{return C.call(t),!0}catch(t){}return!1}t.exports=function t(e,r,n,i){var a=r||{};if(H(a,"quoteStyle")&&"single"!==a.quoteStyle&&"double"!==a.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(H(a,"maxStringLength")&&("number"==typeof a.maxStringLength?a.maxStringLength<0&&a.maxStringLength!==1/0:null!==a.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var u=!H(a,"customInspect")||a.customInspect;if("boolean"!=typeof u&&"symbol"!==u)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(H(a,"indent")&&null!==a.indent&&"\t"!==a.indent&&!(parseInt(a.indent,10)===a.indent&&a.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(H(a,"numericSeparator")&&"boolean"!=typeof a.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var y=a.numericSeparator;if(void 0===e)return"undefined";if(null===e)return"null";if("boolean"==typeof e)return e?"true":"false";if("string"==typeof e)return function t(e,r){if(e.length>r.maxStringLength){var n=e.length-r.maxStringLength,i="... "+n+" more character"+(n>1?"s":"");return t(b.call(e,0,r.maxStringLength),r)+i}return D(v.call(v.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,$),"single",r)}(e,a);if("number"==typeof e){if(0===e)return 1/0/e>0?"0":"-0";var w=String(e);return y?M(e,w):w}if("bigint"==typeof e){var _=String(e)+"n";return y?M(e,_):_}var k=void 0===a.depth?5:a.depth;if(void 0===n&&(n=0),n>=k&&k>0&&"object"==typeof e)return B(e)?"[Array]":"[Object]";var O=function(t,e){var r;if("\t"===t.indent)r="\t";else{if(!("number"==typeof t.indent&&t.indent>0))return null;r=A.call(Array(t.indent+1)," ")}return{base:r,prev:A.call(Array(e+1),r)}}(a,n);if(void 0===i)i=[];else if(V(i,e)>=0)return"[Circular]";function F(e,r,o){if(r&&(i=E.call(i)).push(r),o){var s={depth:a.depth};return H(a,"quoteStyle")&&(s.quoteStyle=a.quoteStyle),t(e,s,n+1,i)}return t(e,a,n+1,i)}if("function"==typeof e&&!G(e)){var z=function(t){if(t.name)return t.name;var e=m.call(g.call(t),/^function\s*([\w$]+)/);if(e)return e[1];return null}(e),J=Q(e,F);return"[Function"+(z?": "+z:" (anonymous)")+"]"+(J.length>0?" { "+A.call(J,", ")+" }":"")}if(q(e)){var tt=P?v.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):C.call(e);return"object"!=typeof e||P?tt:K(tt)}if(function(t){if(!t||"object"!=typeof t)return!1;if("undefined"!=typeof HTMLElement&&t instanceof HTMLElement)return!0;return"string"==typeof t.nodeName&&"function"==typeof t.getAttribute}(e)){for(var et="<"+x.call(String(e.nodeName)),rt=e.attributes||[],nt=0;nt"}if(B(e)){if(0===e.length)return"[]";var it=Q(e,F);return O&&!function(t){for(var e=0;e=0)return!1;return!0}(it)?"["+X(it,O)+"]":"[ "+A.call(it,", ")+" ]"}if(function(t){return!("[object Error]"!==W(t)||I&&"object"==typeof t&&I in t)}(e)){var ot=Q(e,F);return"cause"in Error.prototype||!("cause"in e)||R.call(e,"cause")?0===ot.length?"["+String(e)+"]":"{ ["+String(e)+"] "+A.call(ot,", ")+" }":"{ ["+String(e)+"] "+A.call(S.call("[cause]: "+F(e.cause),ot),", ")+" }"}if("object"==typeof e&&u){if(N&&"function"==typeof e[N]&&L)return L(e,{depth:k-n});if("symbol"!==u&&"function"==typeof e.inspect)return e.inspect()}if(function(t){if(!o||!t||"object"!=typeof t)return!1;try{o.call(t);try{c.call(t)}catch(t){return!0}return t instanceof Map}catch(t){}return!1}(e)){var st=[];return s&&s.call(e,(function(t,r){st.push(F(r,e,!0)+" => "+F(t,e))})),Z("Map",o.call(e),st,O)}if(function(t){if(!c||!t||"object"!=typeof t)return!1;try{c.call(t);try{o.call(t)}catch(t){return!0}return t instanceof Set}catch(t){}return!1}(e)){var at=[];return l&&l.call(e,(function(t){at.push(F(t,e))})),Z("Set",c.call(e),at,O)}if(function(t){if(!f||!t||"object"!=typeof t)return!1;try{f.call(t,f);try{h.call(t,h)}catch(t){return!0}return t instanceof WeakMap}catch(t){}return!1}(e))return Y("WeakMap");if(function(t){if(!h||!t||"object"!=typeof t)return!1;try{h.call(t,h);try{f.call(t,f)}catch(t){return!0}return t instanceof WeakSet}catch(t){}return!1}(e))return Y("WeakSet");if(function(t){if(!d||!t||"object"!=typeof t)return!1;try{return d.call(t),!0}catch(t){}return!1}(e))return Y("WeakRef");if(function(t){return!("[object Number]"!==W(t)||I&&"object"==typeof t&&I in t)}(e))return K(F(Number(e)));if(function(t){if(!t||"object"!=typeof t||!T)return!1;try{return T.call(t),!0}catch(t){}return!1}(e))return K(F(T.call(e)));if(function(t){return!("[object Boolean]"!==W(t)||I&&"object"==typeof t&&I in t)}(e))return K(p.call(e));if(function(t){return!("[object String]"!==W(t)||I&&"object"==typeof t&&I in t)}(e))return K(F(String(e)));if(!function(t){return!("[object Date]"!==W(t)||I&&"object"==typeof t&&I in t)}(e)&&!G(e)){var ut=Q(e,F),ct=j?j(e)===Object.prototype:e instanceof Object||e.constructor===Object,lt=e instanceof Object?"":"null prototype",ft=!ct&&I&&Object(e)===e&&I in e?b.call(W(e),8,-1):lt?"Object":"",ht=(ct||"function"!=typeof e.constructor?"":e.constructor.name?e.constructor.name+" ":"")+(ft||lt?"["+A.call(S.call([],ft||[],lt||[]),": ")+"] ":"");return 0===ut.length?ht+"{}":O?ht+"{"+X(ut,O)+"}":ht+"{ "+A.call(ut,", ")+" }"}return String(e)};var z=Object.prototype.hasOwnProperty||function(t){return t in this};function H(t,e){return z.call(t,e)}function W(t){return y.call(t)}function V(t,e){if(t.indexOf)return t.indexOf(e);for(var r=0,n=t.length;r-1?t.split(","):t},c=function(t,e,r,n){if(t){var o=r.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,s=/(\[[^[\]]*])/g,a=r.depth>0&&/(\[[^[\]]*])/.exec(o),c=a?o.slice(0,a.index):o,l=[];if(c){if(!r.plainObjects&&i.call(Object.prototype,c)&&!r.allowPrototypes)return;l.push(c)}for(var f=0;r.depth>0&&null!==(a=s.exec(o))&&f=0;--o){var s,a=t[o];if("[]"===a&&r.parseArrays)s=[].concat(i);else{s=r.plainObjects?Object.create(null):{};var c="["===a.charAt(0)&&"]"===a.charAt(a.length-1)?a.slice(1,-1):a,l=parseInt(c,10);r.parseArrays||""!==c?!isNaN(l)&&a!==c&&String(l)===c&&l>=0&&r.parseArrays&&l<=r.arrayLimit?(s=[])[l]=i:"__proto__"!==c&&(s[c]=i):s={0:i}}i=s}return i}(l,e,r,n)}};t.exports=function(t,e){var r=function(t){if(!t)return s;if(null!==t.decoder&&void 0!==t.decoder&&"function"!=typeof t.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==t.charset&&"utf-8"!==t.charset&&"iso-8859-1"!==t.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var e=void 0===t.charset?s.charset:t.charset;return{allowDots:void 0===t.allowDots?s.allowDots:!!t.allowDots,allowPrototypes:"boolean"==typeof t.allowPrototypes?t.allowPrototypes:s.allowPrototypes,allowSparse:"boolean"==typeof t.allowSparse?t.allowSparse:s.allowSparse,arrayLimit:"number"==typeof t.arrayLimit?t.arrayLimit:s.arrayLimit,charset:e,charsetSentinel:"boolean"==typeof t.charsetSentinel?t.charsetSentinel:s.charsetSentinel,comma:"boolean"==typeof t.comma?t.comma:s.comma,decoder:"function"==typeof t.decoder?t.decoder:s.decoder,delimiter:"string"==typeof t.delimiter||n.isRegExp(t.delimiter)?t.delimiter:s.delimiter,depth:"number"==typeof t.depth||!1===t.depth?+t.depth:s.depth,ignoreQueryPrefix:!0===t.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof t.interpretNumericEntities?t.interpretNumericEntities:s.interpretNumericEntities,parameterLimit:"number"==typeof t.parameterLimit?t.parameterLimit:s.parameterLimit,parseArrays:!1!==t.parseArrays,plainObjects:"boolean"==typeof t.plainObjects?t.plainObjects:s.plainObjects,strictNullHandling:"boolean"==typeof t.strictNullHandling?t.strictNullHandling:s.strictNullHandling}}(e);if(""===t||null==t)return r.plainObjects?Object.create(null):{};for(var l="string"==typeof t?function(t,e){var r,c={__proto__:null},l=e.ignoreQueryPrefix?t.replace(/^\?/,""):t,f=e.parameterLimit===1/0?void 0:e.parameterLimit,h=l.split(e.delimiter,f),d=-1,p=e.charset;if(e.charsetSentinel)for(r=0;r-1&&(g=o(g)?[g]:g),i.call(c,y)?c[y]=n.combine(c[y],g):c[y]=g}return c}(t,r):t,f=r.plainObjects?Object.create(null):{},h=Object.keys(l),d=0;d{e&&console.log("starting getPalette with image",t);const{fileDirectory:r}=t,{BitsPerSample:n,ColorMap:i,ImageLength:o,ImageWidth:s,PhotometricInterpretation:a,SampleFormat:u,SamplesPerPixel:c}=r;if(!i)throw new Error("[geotiff-palette]: the image does not contain a color map, so we can't make a palette.");const l=Math.pow(2,n);e&&console.log("[geotiff-palette]: count:",l);const f=i.length/3;if(e&&console.log("[geotiff-palette]: bandSize:",f),f!==l)throw new Error("[geotiff-palette]: can't handle situations where the color map has more or less values than the number of possible values in a raster");const h=f,d=h+f,p=[];for(let t=0;te in t?i(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,c=(t,e)=>i(t,"name",{value:e,configurable:!0});const l=r(157),f=r(192),h=r(194),d=c(t=>new Array(t).fill(0).map((t,e)=>e),"range");function p(t,e={}){var r=e,{bands:n,height:i,precise:c=!1,stats:p,width:y,layout:g}=r,m=((t,e)=>{var r={};for(var n in t)s.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&o)for(var n of o(t))e.indexOf(n)<0&&a.call(t,n)&&(r[n]=t[n]);return r})(r,["bands","height","precise","stats","width","layout"]);if("function"==typeof t.then)throw new Error("[calc-image-stats] you passed in a promise as the data values. please resolve the promise first before calling calcImageStats");const b=f({bands:n,data:t,height:i,layout:g,width:y});null!=n||(n=b.bands),null!=i||(i=b.height),null!=g||(g=b.layout),null!=y||(y=b.width);const v=d(n).map(e=>{let r;const f=((t,e)=>{for(var r in e||(e={}))s.call(e,r)&&u(t,r,e[r]);if(o)for(var r of o(e))a.call(e,r)&&u(t,r,e[r]);return t})({precise:c,stats:p},m);if(["[band][row,column]","[band][column,row]"].includes(g))r=t[e];else if(["[band][row][column]","[band][column][row]"].includes(g))r=t[e],f.chunked=!0;else if(1===n&&["[band,row,column]","[row,column,band]","[column,band,row]","[column,row,band]"].includes(g))r=t;else{const o={band:[e,e]},s={band:n,column:y,row:i};r=h.iterClip({data:t,layout:g,rect:o,sizes:s})}return l(r,f)});return{depth:n,height:i,width:y,bands:v}}c(p,"calcImageStats"),void 0!==(n=function(){return p}.call(e,r,e,t))&&(t.exports=n),t.exports=p,t.exports.default=p,t.exports.calcImageStats=p,"object"==typeof self&&(self.calcImageStats=p),"object"==typeof window&&(self.calcImageStats=p)},function(t,e,r){var n;const{getOrCreateIterator:i}=r(72),{add:o,compare:s,divide:a,mean:u,multiply:c,pow:l,sort:f,subtract:h,sum:d}=r(158),p=r(181);function y(t,{async:e=!1,chunked:r=!1,noData:n,filter:d,calcCount:y=!0,calcHistogram:g=!0,calcInvalid:m=!0,calcMax:b=!0,calcMean:v=!0,calcMedian:w=!0,calcMin:x=!0,calcMode:_=!0,calcModes:S=!0,calcProduct:A=!0,calcRange:E=!0,calcStd:k=!0,calcSum:T=!0,calcValid:O=!0,calcVariance:C=!0,calcUniques:P=!0,precise:I=!1,precise_max_decimal_digits:R=100,stats:j}={debugLevel:0}){j&&(j.forEach(t=>{["count","histogram","invalid","max","mean","median","min","mode","modes","product","range","sum","std","valid","variance","uniques"].includes(t)||console.warn(`[calc-stats] skipping unknown stat "${t}"`)}),y=j.includes("count"),g=j.includes("histogram"),m=j.includes("invalid"),b=j.includes("max"),v=j.includes("mean"),w=j.includes("median"),x=j.includes("min"),_=j.includes("mode"),S=j.includes("modes"),A=j.includes("product"),E=j.includes("range"),k=j.includes("std"),T=j.includes("sum"),O=j.includes("valid"),C=j.includes("variance"),P=j.includes("uniques"));const M=i(t);let L,F,N,D=g||w||_||S||C||k||P,U=y||v||w||A||O||C||k||"function"==typeof d,B=y||m||"function"==typeof d,G=T||v||C||k,q=x||E,z=b||E,H=A,W=0,V=0,$=0,K=I?"0":0;const Y={};let Z,X;Z=I?t=>{t=t.toString(),U&&W++,!q||void 0!==L&&"<"!==s(t,L)||(L=t),!z||void 0!==F&&">"!==s(t,F)||(F=t),H&&(N=1===W?t:c(N,t)),G&&(K=o(K,t)),D&&(t in Y?Y[t].ct++:Y[t]={n:t.toString(),ct:1})}:t=>{U&&W++,q&&(void 0===L||tF)&&(F=t),H&&(N=1===W?t:N*t),G&&(K+=t),D&&(t in Y?Y[t].ct++:Y[t]={n:t,ct:1})},X="number"==typeof n&&"function"==typeof d?t=>{$++,"number"!=typeof t||isNaN(t)||t===n||!0!==d({valid:W,index:$,value:t})?B&&V++:Z(t)}:"number"==typeof n?t=>{"number"!=typeof t||isNaN(t)||t===n?B&&V++:Z(t)}:"function"==typeof d?t=>{$++,"number"!=typeof t||isNaN(t)||!0!==d({valid:W,index:$,value:t})?B&&V++:Z(t)}:t=>{"number"!=typeof t||isNaN(t)?B&&V++:Z(t)};const Q=()=>{const t={};if(y&&(t.count=I?o(V.toString(),W.toString()):V+W),O&&(t.valid=I?W.toString():W),m&&(t.invalid=I?V.toString():V),w&&(t.median=p.calculate({counts:Y,precise:I,total:W})),x&&(t.min=L),b&&(t.max=F),A&&(t.product=N),T&&(t.sum=K),E&&(t.range=I?h(F.toString(),L.toString()):F-L),v||C||k){const e=I?a(K,W.toString(),{max_decimal_digits:R}):K/W;if(v&&(t.mean=e),C||k){const r=(({count:t,histogram:e,mean_value:r,precise:n=!1})=>{if(n){r=r.toString();const n=Object.values(e).reduce((t,{n:e,ct:n})=>{const i=h(e.toString(),r);return o(t,c(n.toString(),l(i,"2")))},"0");return a(n,t.toString())}return Object.values(e).reduce((t,{n:e,ct:n})=>t+n*Math.pow(e-r,2),0)/t})({count:W,histogram:Y,mean_value:e,precise:I});C&&(t.variance=r),k&&(t.std=I?Math.sqrt(Number(r)).toString():Math.sqrt(r))}}if(g&&(I&&Object.values(Y).forEach(t=>{t.ct=t.ct.toString()}),t.histogram=Y),_||S){let e=0,r=[];for(let t in Y){const{n:n,ct:i}=Y[t];i===e?r.push(I?n.toString():n):i>e&&(e=i,r=[I?n.toString():n])}S&&(t.modes=r),_&&(t.mode=I?u(r):r.reduce((t,e)=>t+e,0)/r.length)}return P&&(t.uniques=I?f(Object.keys(Y)):Object.values(Y).map(({n:t})=>t).sort((t,e)=>t-e)),t};if(r){if(e)return(async()=>{for await(let t of M)for(let e of t)X(e);return Q()})();for(let t of M)for(let e of t)X(e);return Q()}if(e)return(async()=>{for await(let t of M)X(t);return Q()})();for(let t of M)X(t);return Q()}void 0===(n=function(){return y}.call(e,r,e,t))||(t.exports=n),t.exports=y,t.exports.default=y,t.exports.calcStats=y,"object"==typeof self&&(self.calcStats=y),"object"==typeof window&&(window.calcStats=y)},function(t,e,r){"use strict";var n;const i=r(4),o=r(6),s=r(159),a=r(76),u=r(0),c=r(34),l=r(5),f=r(161),h=r(163),d=r(51),p=r(84),y=r(167),g=r(168),m=r(1),b=r(88),v=r(89),w=r(73),x=r(75),_=r(169),S=r(170),A=r(77),E=r(171),k=r(172),T=r(15),O=r(16),C=r(90),P=r(91),I=r(11),R=r(9),j=r(32),M=r(48),L=r(31),F=r(173),N={absolute:i,add:o,binomial_coefficient:s,ceil:a,clean:u,compare:c,compare_positive:l,constants:f,cosine_radians:h,count_decimal_digits:d,count_integer_digits:p,cube:y,cube_root:g,divide:m,eulers_number:b,exp:v,expand:w,factorial:x,flip_sign:_,floor:S,fraction:A,hypotenuse:E,is_infinity:T,is_integer:O,is_factorial:k,is_negative_infinity:C,is_positive_infinity:P,is_zero:I,long_addition:R,long_division:j,long_multiplication:M,long_subtraction:L,mean:r(174),max:F,min:r(86),multiply:r(53),multiply_array:r(79),multiply_range:r(47),nilakantha:r(175),ols:r(176),pow:r(35),pow_positive:r(54),primes:r(87),reciprocal:r(81),remainder:r(177),root:r(37),root_integer_digits:r(83),round:r(36),round_last_decimal:r(49),sign:r(22),sign_nonzero:r(50),simplify_fraction:r(85),sine_radians:r(178),softmax:r(179),sort:r(180),square:r(23),square_root:r(92),subtract:r(33),sum:r(55),truncate:r(93)};void 0===(n=function(){return N}.call(e,r,e,t))||(t.exports=n),t.exports=N,t.exports.default=N,"object"==typeof window&&(window.preciso=N),"object"==typeof self&&(self.preciso=N)},function(t,e,r){"use strict";const n=r(0),i=r(5),o=r(75),s=r(9),a=r(31),u=r(32),c=r(47);function l(t,e){switch(t=n(t),e=n(e),i(t,e)){case"=":return"1";case">":{const r=a(t,e),n=c(s(e,"1"),t),i=o(r);return u(n,i)}case"<":throw new Error("[binominal_coefficient] unsupported")}}t.exports=l,t.exports.default=l},function(t,e,r){"use strict";function n(t){return t.substring(0,t.indexOf("."))}t.exports=n,t.exports.default=n},function(t,e,r){"use strict";const{MAX_SAFE_INTEGER:n}=r(74),{MAX_SAFE_INTEGER_LENGTH:i}=r(30),{PI:o}=r(162);t.exports={MAX_SAFE_INTEGER:n,MAX_SAFE_INTEGER_LENGTH:i,PI:o}},function(t,e){t.exports={PI_100:"3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679"}},function(t,e,r){"use strict";const n=r(6),i=r(11),o=r(23),s=r(17),a=r(1);function u(t,{steps:e=100,max_decimal_digits:r=100}={}){if(i(t))return"0";let u,c="-",l="1",f=e,h=o(t),d="1",p="1",y="0";for(let t=0;tn(t));return i(o(s),e)}t.exports=s,t.exports.default=s},function(t,e,r){"use strict";function n(t){return!!t.match(/^\d+!$/i)}t.exports=n,t.exports.default=n},function(t,e,r){"use strict";const n=r(0),i=r(34);function o(t){"string"==typeof t&&(t=Array.prototype.slice.call(arguments));let e=n(t[0]);const r=t.length;for(let n=1;n"===i(r,e)&&(e=r)}return e}t.exports=o,t.exports.default=o},function(t,e,r){"use strict";const n=r(6),i=r(1);function o(t,e){let r=0,o="0";for(let e of t)r++,o=n(o,e);return i(o,r.toString(),e)}t.exports=o,t.exports.default=o},function(t,e,r){"use strict";const n=r(6),i=r(9),o=r(1),s=r(17);function a(t=100,{divide_options:e}={}){let r="+",a="3",u="2",c="3",l="4";for(let f=1;fi(t,{max_decimal_digits:e}));const r=o(t);return t.map(t=>n(t,r,{max_decimal_digits:e,ellipsis:!1}))}t.exports=s,t.exports.default=s},function(t,e,r){"use strict";const n=r(34);function i(t,{direction:e="ascending"}={direction:"ascending"}){const r="desc"===e||"descending"===e?"<":">";return t.sort((t,e)=>n(t,e)===r?1:-1)}t.exports=i,t.exports.default=i},function(t,e,r){var n;const i=r(182),o=r(191);function s({counts:t,nums:e,no_data:r,precise:n,threshold:s=50,total:a}){return void 0!==t||void 0!==a||e.length>s?i({counts:t,no_data:r,nums:e,precise:n,total:a}):o({no_data:r,nums:e,precise:n})}const a={calculate:s};void 0===(n=function(){return a}.call(e,r,e,t))||(t.exports=n),t.exports=a,t.exports.default={calculate:s},"object"==typeof window&&(window.mediana=a),"object"==typeof self&&(self.mediana=a)},function(t,e,r){const n=r(183),i=r(94);function o({counts:t,nums:e,no_data:r,precise:o=!1,total:s}){void 0!==t&&void 0!==s||({counts:t,total:s}=n({nums:e,no_data:r}));const a=Object.values(t).sort((t,e)=>t.n-e.n),u=s/2,c=a.length;if(0!==c){if(1===c)return o?a[0].n.toString():a[0].n;{let t=0;if(s%2==0)for(let e=0;eu)return t-n===u?i(a[e-1].n,r,{precise:o}):o?r.toString():r}else for(let e=0;eu)return o?r.toString():r}}}}t.exports=o,t.exports.default=o},function(t,e){function r({nums:t,no_data:e}){let r=t.length;const n={};let i=0;if(void 0!==e)for(let o=0;o=a){const t=s-a;let r=o;for(let e=0;es;t--)result+="0";return result+=o,e+result}return e+o.substring(0,s)+"."+o.substring(s)}t.exports=r,t.exports.default=r},function(t,e,r){const n=r(98),i=r(18),o=r(186);function s(t,e,r){if(t=i(t),"0"===(e=i(e)))throw new Error("[preciso] division by zero");if(""===t||"0"===t)return"0";const s="-"!==t[0],a="-"!==e[0],u=s!==a?"-":"";return s||(t=n(t)),a||(e=n(e)),u+o(t,e,r)}t.exports=s,t.exports.default=s},function(t,e,r){const n=r(38),i=r(95),o=(r(187),r(189)),s=r(190);t.exports=function(t,e,{max_decimal_digits:r=100,ellipsis:a=!1}={}){"0"===t[0]&&(t=t.substring(1)),"0"===e[0]&&(e=e.substring(1));const u=t.indexOf("."),c=e.indexOf("."),l=-1===u?t.length:u,f=-1===c?0:e.length-1-c;let h=!1;t=t.replace(/\./,""),e=e.replace(/\./,"");const d=t.length;let p,y="",g="",m=-1*f,b=0;for(let r=0;r"===p){let t=1,r=i(e,e),s=e;for(;">"!==n(r,y);)t++,s=r,r=i(r,e);if(t=t.toString(),""!==g)for(let e=t.length;e<=b;e++)g+="0";g+=t,y=o(y,s),b=0}else{if("<"===p){""===g&&m++,b++;continue}if("="===p){if(""!==g)for(let t=0;t3){g+="...",h=!0;break}}else t[y]=1;const r=n(y,e);if(">"===r){let t=1,r=i(e,e),s=e;for(;">"!==n(r,y);)t++,s=r,r=i(r,e);t=t.toString();for(let e=t.length;e<=b;e++)g+="0";if(g+=t,y=o(y,s),"0"===y)break;b=0}else{if("<"===r){b++;continue}if("="===r){for(let t=0;tw){for(let t=w;t0&&(g=s(g.substring(0,g.length-t+1)))}return"."===g[0]&&(g="0"+g),g}},function(t,e,r){const n=r(98),i=r(18),o=r(38),s=r(188);function a(t,e){t=i(t),e=i(e);const r="-"!==t[0]!==("-"!==e[0])?"-":"";t=n(t),e=n(e);if("<"===o(t,e)){const r=t;t=e,e=r}return r+s(t,e)}t.exports=a,t.exports.default=a},function(t,e,r){const{MAX_SAFE_INTEGER_LENGTH:n}=r(56);t.exports=function(t,e){if("0"===t||"0"===e)return"0";const r=t.indexOf("."),i=e.indexOf("."),o=(-1===r?t.length:r)+(-1===i?e.length:i),s=(-1===r?0:t.length-1-r)+(-1===i?0:e.length-1-i);if(0===s&&o=0;){const t=h,e=h-=15,r=a.substring(e,t);f.push([Number(r),r.length])}const d=[],p=[];for(let t=0,e=l-1;e>=0;e--,t++){const r=u[e],n=Number(r);let i=0,o="";const s=f.length-1;f.forEach(([t,e],r)=>{let a=(i+n*t).toString();const u=a.length;if(u>e&&r!==s){const t=-1*e;o=a.slice(t)+o,i=Number(a.slice(0,t))}else{const t=e-u;for(let e=0;eNumber(t)),o.length])}const y=d.length,g=p[p.length-1][1]+y;let m="",b=0;for(let t=0;t=0&&(e+=r[o])}e>=10?(e=e.toString(),m=e[e.length-1]+m,b=Number(e.slice(0,-1))):(m=e+m,b=0)}if(0===s)m=m.replace(/^0+/,"");else{const t=m.length-s;m=m.substring(0,t)+"."+m.substring(t),m=m.replace(/^0+/,""),m=m.replace(/\.?0+$/,""),"."===m[0]&&(m="0"+m)}return m}},function(t,e,r){const n=r(18),i=r(38),o=r(96),s=r(97);function a(t,e){t=n(t),e=n(e);const r="-"!==t[0],a="-"!==e[0];if(r){if(a){const r=i(t,e);return">"===r?s(t,e):"<"===r?"-"+s(e,t):"0"}return o(t,e.substring(1))}if(a)return"-"+o(t.substring(1),e);{t=t.substring(1),e=e.substring(1);const r=i(t,e);return">"===r?"-"+s(t,e):"<"===r?s(e,t):"0"}}t.exports=a,t.exports.default=a},function(t,e){const r=["5","6","7","8","9"];t.exports=function(t){"+"===t[0]&&(t=t.substring(1));const e=t.length;let n="";const i=t[t.length-1];if(r.includes(i)){let r;for(r=e-2;r>=0;r--){const e=t[r];if("."===e||"-"===e)continue;const i=Number(e)+1;if(10!==i){n=i+n;break}n="0"+n}r>0&&(n=t.substring(0,r)+n)}else n=t.substring(0,e-1);return"."===n[n.length-1]&&(n=n.substring(0,n.length-1)),n.indexOf(".")>-1&&(n=n.replace(/0+$/,"")),n}},function(t,e,r){const n=r(94);function i({nums:t,no_data:e,precise:r=!1}){switch((t=t.filter(t=>t!==e).sort((t,e)=>t-e)).length){case 0:return;case 1:return r?t[0].toString():t[0];default:const e=t.length/2;if(t.length%2==0)return n(t[e-1],t[e],{precise:r});{const n=Math.floor(e);return r?t[n].toString():t[n]}}}t.exports=i,t.exports.default=i},function(t,e,r){var n;const i=r(193);function o({bands:t,data:e,height:r,layout:n,width:o}){const s=i(e);if("[row,column,band]"===n||1===s)return{layout:"[row,column,band]",bands:t||(r&&o?e.length/(r*o):void 0),height:r||(t&&o?e.length/(t*o):void 0),width:o||(t&&r?e.length/(t*r):void 0)};if(2===s){if(!r||!o)return e.lengthArray.isArray(t)||t instanceof Int8Array||t instanceof Uint8Array||t instanceof Uint8ClampedArray||t instanceof Int16Array||t instanceof Uint16Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Float32Array||t instanceof Float64Array||t instanceof BigInt64Array||t instanceof BigUint64Array;let r=0,n=t;for(;e(n);)r++,n=n[0];return r}},function(t,e,r){const n={},{wrapNextFunction:i}=r(72),o=r(195),s=r(196),a={Array:Array,Int8Array:Int8Array,Uint8Array:Uint8Array,Uint8ClampedArray:Uint8ClampedArray,Int16Array:Int16Array,Uint16Array:Uint16Array,Float32Array:Float32Array,Float64Array:Float64Array};try{a.BigInt64Array=BigInt64Array,a.BigUint64Array=BigUint64Array}catch(t){}const u=t=>t.match(/\[[^\]]+\]/g),c=t=>t.startsWith("[")&&t.endsWith("]")?t.substring(1,t.length-1):t,l=t=>t.startsWith("(")&&t.endsWith(")")?t.substring(1,t.length-1):t,f=t=>t.match(/(\(.*?\)|[^\(,\s]+)(?=\s*,|\s*$)/g),h=t=>{t=c(t),t=l(t);const e=f(t);return 1===e.length?{type:"Vector",dim:e[0]}:{type:"Matrix",parts:e.map(h)}};function d(t){const e=t.match(/[^ A-Za-z,\[\]]/g);if(e)throw new Error("The following invalid characters were used: "+e.map(t=>`"${t}"`).join(", "));return!0}function p(t,{useLayoutCache:e=!0}={useLayoutCache:!0}){if(e&&t in n)return n[t];d(t);const r=u(t).map(h),i={type:"Layout",summary:r.map(t=>"Matrix"===t.type?t.parts.length:1),dims:r};return e&&(n[t]=i),i}function y({useLayoutCache:t=!0,data:e,layout:r,sizes:n={}}){"string"==typeof r&&(r=p(r,{useLayoutCache:t}));const{dims:i}=r,o=i.length,a=m({useLayoutCache:t,layout:r,sizes:n}),u=o-1,c=r.summary.toString();if(c in s){const t={data:e};return r.dims.map((e,r)=>{"Vector"===e.type?t[`d${r}v0`]=e.dim:"Matrix"===e.type&&e.parts.forEach((e,n)=>{t[`d${r}v${n}`]=e.dim,t[`m${r}v${n}`]=a[e.dim]})}),s[c].bind(t)}return({point:t,value:r})=>{let n=e;for(let e=0;ee+a[r]*t[r],0),o?n[c]=r:n=n[c]}}}function g({rect:t={}}){if(t)for(let e in t){const r=t[e];if(2!==r.length)throw new Error("[xdim] uh oh. invalid hyper-rectangle");const[n,i]=r;if(n>i)throw new Error(`[xdim] uh oh. invalid range for "${e}". Start of ${n} can't be greater than end of ${i}.`);if(n<0)throw new Error("[xdim] uh oh. invalid hyper-rectangle with start "+n)}}function m({useLayoutCache:t=!0,layout:e,sizes:r}){"string"==typeof e&&(e=p(e,{useLayoutCache:t}));const{dims:n}=e,i=n.length;let o={};for(let t=0;t=0;e--){const{dim:i}=t[e];o[i]=n,n*=r[t[e].dim]}}}return o}function b({useLayoutCache:t=!0,data:e,layout:r,point:n,sizes:i={}}){let o,s;"string"==typeof r&&(r=p(r,{useLayoutCache:t}));let a=e;const{dims:u}=r,c=u.length;for(let t=0;t=0;e--){const o=t[e];if("Vector"===o.type){const{dim:t}=o;if(r+=u*n[t],e>0){if(!(t in i))throw new Error(`you cannot calculate the location without knowing the size of the "${t}" dimension.`);u*=i[t]}}}o=a,s=r,a=a[r]}}return{index:s,value:a,parent:o}}function v({arr:t,fill:e,lens:r,arrayTypes:n}){if(0===r.length)return t;const i=r[0];if(1===r.length){const r=n?n[n.length-1]:"Array";for(let n=0;n"Vector"===t.type?n[t.dim]:"Matrix"===t.type?t.parts.reduce((t,e)=>{if(!(e.dim in n))throw new Error(`[xdim] could not find "${e.dim}" in sizes: { ${Object.keys(n).join(", ")} }`);return t*n[e.dim]},1):void 0);return{data:w({fill:t,shape:o,arrayTypes:i}),shape:o,arrayTypes:i}}function _({start:t=0,end:e=100}){let r=t-1;return e+=1,i((function(){return r++,r===e?{done:!0}:{done:!1,value:r}}))}function S({order:t,sizes:e,rect:r={}}){const n=Array.isArray(t)?t:Object.keys(e).sort((t,r)=>e[t]-e[r]),o=new Array(n.length),s={};for(let t=0;t=0;t--){const{value:i,done:a}=o[t].next();if(!a){for(let i=t+1;i{"Vector"===e.type?t[`d${r}v0`]=e.dim:"Matrix"===e.type&&e.parts.forEach((e,n)=>{t[`d${r}v${n}`]=e.dim,t[`m${r}v${n}`]=a[e.dim]})}),o[c].bind(t)}return({point:t})=>{let r=e;for(let e=0;ee+a[r]*t[r],0),n)return{index:s,parent:r,value:r[s]};r=r[s]}}},prepareUpdate:y,removeBraces:c,removeParentheses:l,select:b,transform:function({data:t,fill:e,from:r,to:n,sizes:i,useLayoutCache:o=!0}){"string"==typeof r&&(r=p(r,{useLayoutCache:o})),"string"==typeof n&&(n=p(n,{useLayoutCache:o}));const{data:s}=x({fill:e,layout:n,sizes:i}),a=y({useLayoutCache:o,data:s,layout:n,sizes:i}),u=S({sizes:i});for(point of u){const{value:e}=b({data:t,layout:r,point:point,sizes:i});a({point:point,value:e})}return{data:s}},update:function({useLayoutCache:t=!0,data:e,layout:r,point:n,sizes:i={},value:o}){"string"==typeof r&&(r=p(r,{useLayoutCache:t}));const{dims:s}=r;for(let t=0;t=0;r--){const o=t[r],{dim:s}=o;if(u+=e*n[s],r>0){if(!(s in i))throw new Error(`you cannot calculate the location without knowing the size of the "${s}" dimension.`);e*=i[s]}}}r?e[u]=o:e=e[u]}},clip:function({useLayoutCache:t=!0,data:e,layout:r,rect:n,sizes:i={},flat:o=!1,validate:s=!0}){s&&g({rect:n}),"string"==typeof r&&(r=p(r,{useLayoutCache:t}));let a=[e];if(r.dims.forEach(t=>{let e=[];a.forEach(r=>{if("Vector"===t.type){const[i,o]=n[t.dim];e=e.concat(r.slice(i,o+1))}else{const{parts:o}=t;let s=[0],a=1;for(let t=o.length-1;t>=0;t--){const e=o[t],{dim:r}=e,[u,c]=n[r],l=[];for(let t=u;t<=c;t++)s.forEach(e=>{l.push(e+a*t)});s=l,a*=i[r]}s.forEach(t=>{e.push(r[t])})}}),a=e}),o)return{data:a};const u=Object.fromEntries(Object.entries(n).map(([t,[e,r]])=>[t,r-e+1])),{data:c}=x({layout:r,sizes:u}),l=r.dims.length,f=(t,e)=>{if(e===l)for(let e=0;ef(t,e+1))};return f(c,1),{data:c}},validateRect:g}},function(t,e){t.exports={1:function({point:t}){const e=this.data,r=t[this.d0v0];return{parent:e,index:r,value:e[r]}},2:function({point:t}){const e=this.data,r=this.m0v0*t[this.d0v0]+this.m0v1*t[this.d0v1];return{parent:e,index:r,value:e[r]}},3:function({point:t}){const e=this.data,r=this.m0v0*t[this.d0v0]+this.m0v1*t[this.d0v1]+this.m0v2*t[this.d0v2];return{parent:e,index:r,value:e[r]}},4:function({point:t}){const e=this.data,r=this.m0v0*t[this.d0v0]+this.m0v1*t[this.d0v1]+this.m0v2*t[this.d0v2]+this.m0v3*t[this.d0v3];return{parent:e,index:r,value:e[r]}},5:function({point:t}){const e=this.data,r=this.m0v0*t[this.d0v0]+this.m0v1*t[this.d0v1]+this.m0v2*t[this.d0v2]+this.m0v3*t[this.d0v3]+this.m0v4*t[this.d0v4];return{parent:e,index:r,value:e[r]}},"1,1":function({point:t}){const e=this.data[t[this.d0v0]],r=t[this.d1v0];return{parent:e,index:r,value:e[r]}},"1,2":function({point:t}){const e=this.data[t[this.d0v0]],r=this.m1v0*t[this.d1v0]+this.m1v1*t[this.d1v1];return{parent:e,index:r,value:e[r]}},"1,3":function({point:t}){const e=this.data[t[this.d0v0]],r=this.m1v0*t[this.d1v0]+this.m1v1*t[this.d1v1]+this.m1v2*t[this.d1v2];return{parent:e,index:r,value:e[r]}},"1,4":function({point:t}){const e=this.data[t[this.d0v0]],r=this.m1v0*t[this.d1v0]+this.m1v1*t[this.d1v1]+this.m1v2*t[this.d1v2]+this.m1v3*t[this.d1v3];return{parent:e,index:r,value:e[r]}},"1,5":function({point:t}){const e=this.data[t[this.d0v0]],r=this.m1v0*t[this.d1v0]+this.m1v1*t[this.d1v1]+this.m1v2*t[this.d1v2]+this.m1v3*t[this.d1v3]+this.m1v4*t[this.d1v4];return{parent:e,index:r,value:e[r]}},"1,1,1":function({point:t}){const e=this.data[t[this.d0v0]][t[this.d1v0]],r=t[this.d2v0];return{parent:e,index:r,value:e[r]}},"1,1,2":function({point:t}){const e=this.data[t[this.d0v0]][t[this.d1v0]],r=this.m2v0*t[this.d2v0]+this.m2v1*t[this.d2v1];return{parent:e,index:r,value:e[r]}},"1,1,3":function({point:t}){const e=this.data[t[this.d0v0]][t[this.d1v0]],r=this.m2v0*t[this.d2v0]+this.m2v1*t[this.d2v1]+this.m2v2*t[this.d2v2];return{parent:e,index:r,value:e[r]}},"1,1,4":function({point:t}){const e=this.data[t[this.d0v0]][t[this.d1v0]],r=this.m2v0*t[this.d2v0]+this.m2v1*t[this.d2v1]+this.m2v2*t[this.d2v2]+this.m2v3*t[this.d2v3];return{parent:e,index:r,value:e[r]}},"1,1,5":function({point:t}){const e=this.data[t[this.d0v0]][t[this.d1v0]],r=this.m2v0*t[this.d2v0]+this.m2v1*t[this.d2v1]+this.m2v2*t[this.d2v2]+this.m2v3*t[this.d2v3]+this.m2v4*t[this.d2v4];return{parent:e,index:r,value:e[r]}},"1,1,1,1":function({point:t}){const e=this.data[t[this.d0v0]][t[this.d1v0]][t[this.d2v0]],r=t[this.d3v0];return{parent:e,index:r,value:e[r]}},"1,1,1,2":function({point:t}){const e=this.data[t[this.d0v0]][t[this.d1v0]][t[this.d2v0]],r=this.m3v0*t[this.d3v0]+this.m3v1*t[this.d3v1];return{parent:e,index:r,value:e[r]}},"1,1,1,3":function({point:t}){const e=this.data[t[this.d0v0]][t[this.d1v0]][t[this.d2v0]],r=this.m3v0*t[this.d3v0]+this.m3v1*t[this.d3v1]+this.m3v2*t[this.d3v2];return{parent:e,index:r,value:e[r]}},"1,1,1,4":function({point:t}){const e=this.data[t[this.d0v0]][t[this.d1v0]][t[this.d2v0]],r=this.m3v0*t[this.d3v0]+this.m3v1*t[this.d3v1]+this.m3v2*t[this.d3v2]+this.m3v3*t[this.d3v3];return{parent:e,index:r,value:e[r]}},"1,1,1,5":function({point:t}){const e=this.data[t[this.d0v0]][t[this.d1v0]][t[this.d2v0]],r=this.m3v0*t[this.d3v0]+this.m3v1*t[this.d3v1]+this.m3v2*t[this.d3v2]+this.m3v3*t[this.d3v3]+this.m3v4*t[this.d3v4];return{parent:e,index:r,value:e[r]}},"1,1,1,1,1":function({point:t}){const e=this.data[t[this.d0v0]][t[this.d1v0]][t[this.d2v0]][t[this.d3v0]],r=t[this.d4v0];return{parent:e,index:r,value:e[r]}},"1,1,1,1,2":function({point:t}){const e=this.data[t[this.d0v0]][t[this.d1v0]][t[this.d2v0]][t[this.d3v0]],r=this.m4v0*t[this.d4v0]+this.m4v1*t[this.d4v1];return{parent:e,index:r,value:e[r]}},"1,1,1,1,3":function({point:t}){const e=this.data[t[this.d0v0]][t[this.d1v0]][t[this.d2v0]][t[this.d3v0]],r=this.m4v0*t[this.d4v0]+this.m4v1*t[this.d4v1]+this.m4v2*t[this.d4v2];return{parent:e,index:r,value:e[r]}},"1,1,1,1,4":function({point:t}){const e=this.data[t[this.d0v0]][t[this.d1v0]][t[this.d2v0]][t[this.d3v0]],r=this.m4v0*t[this.d4v0]+this.m4v1*t[this.d4v1]+this.m4v2*t[this.d4v2]+this.m4v3*t[this.d4v3];return{parent:e,index:r,value:e[r]}},"1,1,1,1,5":function({point:t}){const e=this.data[t[this.d0v0]][t[this.d1v0]][t[this.d2v0]][t[this.d3v0]],r=this.m4v0*t[this.d4v0]+this.m4v1*t[this.d4v1]+this.m4v2*t[this.d4v2]+this.m4v3*t[this.d4v3]+this.m4v4*t[this.d4v4];return{parent:e,index:r,value:e[r]}}}},function(t,e){t.exports={1:function({point:t,value:e}){this.data[t[this.d0v0]]=e},2:function({point:t,value:e}){this.data[this.m0v0*t[this.d0v0]+this.m0v1*t[this.d0v1]]=e},3:function({point:t,value:e}){this.data[this.m0v0*t[this.d0v0]+this.m0v1*t[this.d0v1]+this.m0v2*t[this.d0v2]]=e},4:function({point:t,value:e}){this.data[this.m0v0*t[this.d0v0]+this.m0v1*t[this.d0v1]+this.m0v2*t[this.d0v2]+this.m0v3*t[this.d0v3]]=e},5:function({point:t,value:e}){this.data[this.m0v0*t[this.d0v0]+this.m0v1*t[this.d0v1]+this.m0v2*t[this.d0v2]+this.m0v3*t[this.d0v3]+this.m0v4*t[this.d0v4]]=e},"1,1":function({point:t,value:e}){this.data[t[this.d0v0]][t[this.d1v0]]=e},"1,2":function({point:t,value:e}){this.data[t[this.d0v0]][this.m1v0*t[this.d1v0]+this.m1v1*t[this.d1v1]]=e},"1,3":function({point:t,value:e}){this.data[t[this.d0v0]][this.m1v0*t[this.d1v0]+this.m1v1*t[this.d1v1]+this.m1v2*t[this.d1v2]]=e},"1,4":function({point:t,value:e}){this.data[t[this.d0v0]][this.m1v0*t[this.d1v0]+this.m1v1*t[this.d1v1]+this.m1v2*t[this.d1v2]+this.m1v3*t[this.d1v3]]=e},"1,5":function({point:t,value:e}){this.data[t[this.d0v0]][this.m1v0*t[this.d1v0]+this.m1v1*t[this.d1v1]+this.m1v2*t[this.d1v2]+this.m1v3*t[this.d1v3]+this.m1v4*t[this.d1v4]]=e},"1,1,1":function({point:t,value:e}){this.data[t[this.d0v0]][t[this.d1v0]][t[this.d2v0]]=e},"1,1,2":function({point:t,value:e}){this.data[t[this.d0v0]][t[this.d1v0]][this.m2v0*t[this.d2v0]+this.m2v1*t[this.d2v1]]=e},"1,1,3":function({point:t,value:e}){this.data[t[this.d0v0]][t[this.d1v0]][this.m2v0*t[this.d2v0]+this.m2v1*t[this.d2v1]+this.m2v2*t[this.d2v2]]=e},"1,1,4":function({point:t,value:e}){this.data[t[this.d0v0]][t[this.d1v0]][this.m2v0*t[this.d2v0]+this.m2v1*t[this.d2v1]+this.m2v2*t[this.d2v2]+this.m2v3*t[this.d2v3]]=e},"1,1,5":function({point:t,value:e}){this.data[t[this.d0v0]][t[this.d1v0]][this.m2v0*t[this.d2v0]+this.m2v1*t[this.d2v1]+this.m2v2*t[this.d2v2]+this.m2v3*t[this.d2v3]+this.m2v4*t[this.d2v4]]=e},"1,1,1,1":function({point:t,value:e}){this.data[t[this.d0v0]][t[this.d1v0]][t[this.d2v0]][t[this.d3v0]]=e},"1,1,1,2":function({point:t,value:e}){this.data[t[this.d0v0]][t[this.d1v0]][t[this.d2v0]][this.m3v0*t[this.d3v0]+this.m3v1*t[this.d3v1]]=e},"1,1,1,3":function({point:t,value:e}){this.data[t[this.d0v0]][t[this.d1v0]][t[this.d2v0]][this.m3v0*t[this.d3v0]+this.m3v1*t[this.d3v1]+this.m3v2*t[this.d3v2]]=e},"1,1,1,4":function({point:t,value:e}){this.data[t[this.d0v0]][t[this.d1v0]][t[this.d2v0]][this.m3v0*t[this.d3v0]+this.m3v1*t[this.d3v1]+this.m3v2*t[this.d3v2]+this.m3v3*t[this.d3v3]]=e},"1,1,1,5":function({point:t,value:e}){this.data[t[this.d0v0]][t[this.d1v0]][t[this.d2v0]][this.m3v0*t[this.d3v0]+this.m3v1*t[this.d3v1]+this.m3v2*t[this.d3v2]+this.m3v3*t[this.d3v3]+this.m3v4*t[this.d3v4]]=e},"1,1,1,1,1":function({point:t,value:e}){this.data[t[this.d0v0]][t[this.d1v0]][t[this.d2v0]][t[this.d3v0]][t[this.d4v0]]=e},"1,1,1,1,2":function({point:t,value:e}){this.data[t[this.d0v0]][t[this.d1v0]][t[this.d2v0]][t[this.d3v0]][this.m4v0*t[this.d4v0]+this.m4v1*t[this.d4v1]]=e},"1,1,1,1,3":function({point:t,value:e}){this.data[t[this.d0v0]][t[this.d1v0]][t[this.d2v0]][t[this.d3v0]][this.m4v0*t[this.d4v0]+this.m4v1*t[this.d4v1]+this.m4v2*t[this.d4v2]]=e},"1,1,1,1,4":function({point:t,value:e}){this.data[t[this.d0v0]][t[this.d1v0]][t[this.d2v0]][t[this.d3v0]][this.m4v0*t[this.d4v0]+this.m4v1*t[this.d4v1]+this.m4v2*t[this.d4v2]+this.m4v3*t[this.d4v3]]=e},"1,1,1,1,5":function({point:t,value:e}){this.data[t[this.d0v0]][t[this.d1v0]][t[this.d2v0]][t[this.d3v0]][this.m4v0*t[this.d4v0]+this.m4v1*t[this.d4v1]+this.m4v2*t[this.d4v2]+this.m4v3*t[this.d4v3]+this.m4v4*t[this.d4v4]]=e}}},function(t,e,r){"use strict";function n(t,e){if("undefined"==typeof ImageData)throw"toCanvas is not supported in your environment";{const r=document.createElement("CANVAS"),n=e&&e.height?Math.min(t.height,e.height):Math.min(t.height,100),i=e&&e.width?Math.min(t.width,e.width):Math.min(t.width,100);r.height=n,r.width=i,r.style.minHeight="200px",r.style.minWidth="400px",r.style.maxWidth="100%";const o=r.getContext("2d"),s=function(t,e,r){if(t.values){const{noDataValue:n,mins:i,ranges:o,values:s}=t,a=s.length,u=t.width/e,c=t.height/r,l=new Uint8ClampedArray(e*r*4);for(let t=0;t{try{return t[f][h]}catch(t){console.error(t)}});if(d.every(t=>void 0!==t&&t!==n)){const n=t*(4*e)+4*r;if(1===a){const t=Math.round(d[0]),e=Math.round((t-i[0])/o[0]*255);l[n]=e,l[n+1]=e,l[n+2]=e,l[n+3]=255}else if(3===a)try{const[t,e,r]=d;l[n]=t,l[n+1]=e,l[n+2]=r,l[n+3]=255}catch(t){console.error(t)}else if(4===a)try{const[t,e,r,i]=d;l[n]=t,l[n+1]=e,l[n+2]=r,l[n+3]=i}catch(t){console.error(t)}}}return new ImageData(l,e,r)}}(t,i,n);return o.putImageData(s,0,0),r}}r.r(e),r.d(e,"default",(function(){return n}))},function(t,e,r){"use strict";r.d(e,"a",(function(){return i}));var n=r(19);Object(n.b)().blob;const i=Object(n.b)().default},,,function(t,e,r){"use strict";var n=r(26),i=r(103);var o=function(t){"function"==typeof t?t():t&&"function"==typeof t.unsubscribe&&t.unsubscribe()};e.a=function(t){const e=new i.a;let r,s=0;return new n.a(n=>{r||(r=t.subscribe(e));const i=e.subscribe(n);return s++,()=>{s--,i.unsubscribe(),0===s&&(o(r),r=void 0)}})}}])}));