georaster
Version:
Wrapper around Georeferenced Rasters like GeoTIFF, NetCDF, JPG, and PNG that provides a standard interface
1 lines • 728 kB
JavaScript
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.GeoRaster=t():e.GeoRaster=t()}("undefined"!=typeof self?self:this,(function(){return function(e){var t={};function a(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,a),i.l=!0,i.exports}return a.m=e,a.c=t,a.d=function(e,t,n){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,t){if(1&t&&(e=a(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(a.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)a.d(n,i,function(t){return e[t]}.bind(null,i));return n},a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="",a(a.s=105)}([function(e,t,a){"use strict";const n=a(70);e.exports=function(e){return"+"===e[0]&&(e=e.substring(1)),(e=(e=n(e)).replace(/^0+(?=\d)/,"")).includes(".")&&(e=e.replace(/\.?0+$/,"")),""===e&&(e="0"),"-0"===e&&(e="0"),e}},function(e,t){e.exports=require("stream")},function(e,t,a){"use strict";const n=a(4),i=a(0),r=a(16),s=a(36);function o(e,t,a){e=i(e),t=i(t);const o="-"!==e[0],p="-"!==t[0],d=r(e),l=r(t);if(d||l)return o==p?"Infinity":"-Infinity";if("0"===t)throw new Error("[preciso] division by zero");if(""===e||"0"===e)return"0";const u=o!==p?"-":"";return o||(e=n(e)),p||(t=n(t)),u+s(e,t,a)}e.exports=o,e.exports.default=o},function(e,t,a){"use strict";a.d(t,"a",(function(){return n})),a.d(t,"b",(function(){return i})),a.d(t,"c",(function(){return r})),a.d(t,"d",(function(){return s})),a.d(t,"e",(function(){return o}));const n=Symbol("thread.errors"),i=Symbol("thread.events"),r=Symbol("thread.terminate"),s=Symbol("thread.transferable"),o=Symbol("thread.worker")},function(e,t,a){"use strict";const n=a(0);function i(e){return"-"===(e=n(e))[0]?e.substring(1):e}e.exports=i,e.exports.default=i},function(e,t,a){"use strict";function n(e,t){const a=e.length,n=t.length,i=e.indexOf("."),r=t.indexOf("."),s=-1===i?a:i,o=-1===r?n:r,p=s-o;let d=p<0?-1*p:0,l=p<=0?0:p,u=Math.max(s,o)+1+Math.max(a-s,n-o)-1,c=0;for(;c<u;){const a=c-d,n=a===s?".":e[a]||"0",i=c-l,r=i===o?".":t[i]||"0";if(n!==r){if(n>r)return">";if(n<r)return"<"}c++}return"="}e.exports=n,e.exports.default=n},function(e,t,a){"use strict";const n=a(5),i=a(0),r=a(8),s=a(35),o=a(16);function p(e,t,{infinity_minus_infinity:a="NaN"}={}){e=i(e),t=i(t);const p="-"!==e[0],d="-"!==t[0],l=!p,u=!d,c=o(e),m=o(t);if(c&&m)return p&&d?"Infinity":l&u?"-Infinity":a;if(c)return p?"Infinity":"-Infinity";if(m)return d?"Infinity":"-Infinity";if(p&&d)return r(e,t);if(l&&u)return"-"+r(e.substring(1),t.substring(1));if(l&&d)switch(e=e.substring(1),n(e,t)){case"=":return"0";case"<":return s(t,e);case">":return"-"+s(e,t)}else if(p&&!d)switch(t=t.substring(1),n(e,t)){case"=":return"0";case"<":return"-"+s(t,e);case">":return s(e,t)}}e.exports=p,e.exports.default=p},function(e,t,a){"use strict";const n=a(60),i=a(112),r={ftp:21,file:null,gopher:70,http:80,https:443,ws:80,wss:443},s=Symbol("failure");function o(e){return n.ucs2.decode(e).length}function p(e,t){const a=e[t];return isNaN(a)?void 0:String.fromCodePoint(a)}function d(e){return e>=48&&e<=57}function l(e){return e>=65&&e<=90||e>=97&&e<=122}function u(e){return d(e)||e>=65&&e<=70||e>=97&&e<=102}function c(e){return"."===e||"%2e"===e.toLowerCase()}function m(e){return 2===e.length&&l(e.codePointAt(0))&&(":"===e[1]||"|"===e[1])}function f(e){return void 0!==r[e]}function h(e){return f(e.scheme)}function v(e){let t=e.toString(16).toUpperCase();return 1===t.length&&(t="0"+t),"%"+t}function g(e){return e<=31||e>126}const w=new Set([32,34,35,60,62,63,96,123,125]);function b(e){return g(e)||w.has(e)}const y=new Set([47,58,59,61,64,91,92,93,94,124]);function _(e){return b(e)||y.has(e)}function x(e,t){const a=String.fromCodePoint(e);return t(e)?function(e){const t=new Buffer(e);let a="";for(let e=0;e<t.length;++e)a+=v(t[e]);return a}(a):a}function S(e){let t=10;if(e.length>=2&&"0"===e.charAt(0)&&"x"===e.charAt(1).toLowerCase()?(e=e.substring(2),t=16):e.length>=2&&"0"===e.charAt(0)&&(e=e.substring(1),t=8),""===e)return 0;return(10===t?/[^0-9]/:16===t?/[^0-9A-Fa-f]/:/[^0-7]/).test(e)?s:parseInt(e,t)}function k(e,t){if("["===e[0])return"]"!==e[e.length-1]?s:function(e){const t=[0,0,0,0,0,0,0,0];let a=0,i=null,r=0;if(58===(e=n.ucs2.decode(e))[r]){if(58!==e[r+1])return s;r+=2,++a,i=a}for(;r<e.length;){if(8===a)return s;if(58===e[r]){if(null!==i)return s;++r,++a,i=a;continue}let n=0,o=0;for(;o<4&&u(e[r]);)n=16*n+parseInt(p(e,r),16),++r,++o;if(46===e[r]){if(0===o)return s;if(r-=o,a>6)return s;let n=0;for(;void 0!==e[r];){let i=null;if(n>0){if(!(46===e[r]&&n<4))return s;++r}if(!d(e[r]))return s;for(;d(e[r]);){const t=parseInt(p(e,r));if(null===i)i=t;else{if(0===i)return s;i=10*i+t}if(i>255)return s;++r}t[a]=256*t[a]+i,++n,2!==n&&4!==n||++a}if(4!==n)return s;break}if(58===e[r]){if(++r,void 0===e[r])return s}else if(void 0!==e[r])return s;t[a]=n,++a}if(null!==i){let e=a-i;for(a=7;0!==a&&e>0;){const n=t[i+e-1];t[i+e-1]=t[a],t[a]=n,--a,--e}}else if(null===i&&8!==a)return s;return t}(e.substring(1,e.length-1));if(!t)return function(e){if(t=e,-1!==t.search(/\u0000|\u0009|\u000A|\u000D|\u0020|#|\/|:|\?|@|\[|\\|\]/))return s;var t;let a="";const i=n.ucs2.decode(e);for(let e=0;e<i.length;++e)a+=x(i[e],g);return a}(e);const a=function(e){const t=new Buffer(e),a=[];for(let e=0;e<t.length;++e)37!==t[e]?a.push(t[e]):37===t[e]&&u(t[e+1])&&u(t[e+2])?(a.push(parseInt(t.slice(e+1,e+3).toString(),16)),e+=2):a.push(t[e]);return new Buffer(a).toString()}(e),r=i.toASCII(a,!1,i.PROCESSING_OPTIONS.NONTRANSITIONAL,!1);if(null===r)return s;if(-1!==r.search(/\u0000|\u0009|\u000A|\u000D|\u0020|#|%|\/|:|\?|@|\[|\\|\]/))return s;const o=function(e){const t=e.split(".");if(""===t[t.length-1]&&t.length>1&&t.pop(),t.length>4)return e;const a=[];for(const n of t){if(""===n)return e;const t=S(n);if(t===s)return e;a.push(t)}for(let e=0;e<a.length-1;++e)if(a[e]>255)return s;if(a[a.length-1]>=Math.pow(256,5-a.length))return s;let n=a.pop(),i=0;for(const e of a)n+=e*Math.pow(256,3-i),++i;return n}(r);return"number"==typeof o||o===s?o:r}function T(e){return"number"==typeof e?function(e){let t="",a=e;for(let e=1;e<=4;++e)t=String(a%256)+t,4!==e&&(t="."+t),a=Math.floor(a/256);return t}(e):e instanceof Array?"["+function(e){let t="";const a=function(e){let t=null,a=1,n=null,i=0;for(let r=0;r<e.length;++r)0!==e[r]?(i>a&&(t=n,a=i),n=null,i=0):(null===n&&(n=r),++i);i>a&&(t=n,a=i);return{idx:t,len:a}}(e).idx;let n=!1;for(let i=0;i<=7;++i)if(!n||0!==e[i])if(n&&(n=!1),a!==i)t+=e[i].toString(16),7!==i&&(t+=":");else{t+=0===i?"::":":",n=!0}return t}(e)+"]":e}function E(e){const t=e.path;var a;0!==t.length&&("file"===e.scheme&&1===t.length&&(a=t[0],/^[A-Za-z]:$/.test(a))||t.pop())}function N(e){return""!==e.username||""!==e.password}function C(e,t,a,i,r){if(this.pointer=0,this.input=e,this.base=t||null,this.encodingOverride=a||"utf-8",this.stateOverride=r,this.url=i,this.failure=!1,this.parseError=!1,!this.url){this.url={scheme:"",username:"",password:"",host:null,port:null,path:[],query:null,fragment:null,cannotBeABaseURL:!1};const e=function(e){return e.replace(/^[\u0000-\u001F\u0020]+|[\u0000-\u001F\u0020]+$/g,"")}(this.input);e!==this.input&&(this.parseError=!0),this.input=e}const o=function(e){return e.replace(/\u0009|\u000A|\u000D/g,"")}(this.input);for(o!==this.input&&(this.parseError=!0),this.input=o,this.state=r||"scheme start",this.buffer="",this.atFlag=!1,this.arrFlag=!1,this.passwordTokenSeenFlag=!1,this.input=n.ucs2.decode(this.input);this.pointer<=this.input.length;++this.pointer){const e=this.input[this.pointer],t=isNaN(e)?void 0:String.fromCodePoint(e),a=this["parse "+this.state](e,t);if(!a)break;if(a===s){this.failure=!0;break}}}C.prototype["parse scheme start"]=function(e,t){if(l(e))this.buffer+=t.toLowerCase(),this.state="scheme";else{if(this.stateOverride)return this.parseError=!0,s;this.state="no scheme",--this.pointer}return!0},C.prototype["parse scheme"]=function(e,t){if(function(e){return l(e)||d(e)}(e)||43===e||45===e||46===e)this.buffer+=t.toLowerCase();else if(58===e){if(this.stateOverride){if(h(this.url)&&!f(this.buffer))return!1;if(!h(this.url)&&f(this.buffer))return!1;if((N(this.url)||null!==this.url.port)&&"file"===this.buffer)return!1;if("file"===this.url.scheme&&(""===this.url.host||null===this.url.host))return!1}if(this.url.scheme=this.buffer,this.buffer="",this.stateOverride)return!1;"file"===this.url.scheme?(47===this.input[this.pointer+1]&&47===this.input[this.pointer+2]||(this.parseError=!0),this.state="file"):h(this.url)&&null!==this.base&&this.base.scheme===this.url.scheme?this.state="special relative or authority":h(this.url)?this.state="special authority slashes":47===this.input[this.pointer+1]?(this.state="path or authority",++this.pointer):(this.url.cannotBeABaseURL=!0,this.url.path.push(""),this.state="cannot-be-a-base-URL path")}else{if(this.stateOverride)return this.parseError=!0,s;this.buffer="",this.state="no scheme",this.pointer=-1}return!0},C.prototype["parse no scheme"]=function(e){return null===this.base||this.base.cannotBeABaseURL&&35!==e?s:(this.base.cannotBeABaseURL&&35===e?(this.url.scheme=this.base.scheme,this.url.path=this.base.path.slice(),this.url.query=this.base.query,this.url.fragment="",this.url.cannotBeABaseURL=!0,this.state="fragment"):"file"===this.base.scheme?(this.state="file",--this.pointer):(this.state="relative",--this.pointer),!0)},C.prototype["parse special relative or authority"]=function(e){return 47===e&&47===this.input[this.pointer+1]?(this.state="special authority ignore slashes",++this.pointer):(this.parseError=!0,this.state="relative",--this.pointer),!0},C.prototype["parse path or authority"]=function(e){return 47===e?this.state="authority":(this.state="path",--this.pointer),!0},C.prototype["parse relative"]=function(e){return this.url.scheme=this.base.scheme,isNaN(e)?(this.url.username=this.base.username,this.url.password=this.base.password,this.url.host=this.base.host,this.url.port=this.base.port,this.url.path=this.base.path.slice(),this.url.query=this.base.query):47===e?this.state="relative slash":63===e?(this.url.username=this.base.username,this.url.password=this.base.password,this.url.host=this.base.host,this.url.port=this.base.port,this.url.path=this.base.path.slice(),this.url.query="",this.state="query"):35===e?(this.url.username=this.base.username,this.url.password=this.base.password,this.url.host=this.base.host,this.url.port=this.base.port,this.url.path=this.base.path.slice(),this.url.query=this.base.query,this.url.fragment="",this.state="fragment"):h(this.url)&&92===e?(this.parseError=!0,this.state="relative slash"):(this.url.username=this.base.username,this.url.password=this.base.password,this.url.host=this.base.host,this.url.port=this.base.port,this.url.path=this.base.path.slice(0,this.base.path.length-1),this.state="path",--this.pointer),!0},C.prototype["parse relative slash"]=function(e){return!h(this.url)||47!==e&&92!==e?47===e?this.state="authority":(this.url.username=this.base.username,this.url.password=this.base.password,this.url.host=this.base.host,this.url.port=this.base.port,this.state="path",--this.pointer):(92===e&&(this.parseError=!0),this.state="special authority ignore slashes"),!0},C.prototype["parse special authority slashes"]=function(e){return 47===e&&47===this.input[this.pointer+1]?(this.state="special authority ignore slashes",++this.pointer):(this.parseError=!0,this.state="special authority ignore slashes",--this.pointer),!0},C.prototype["parse special authority ignore slashes"]=function(e){return 47!==e&&92!==e?(this.state="authority",--this.pointer):this.parseError=!0,!0},C.prototype["parse authority"]=function(e,t){if(64===e){this.parseError=!0,this.atFlag&&(this.buffer="%40"+this.buffer),this.atFlag=!0;const e=o(this.buffer);for(let t=0;t<e;++t){const e=this.buffer.codePointAt(t);if(58===e&&!this.passwordTokenSeenFlag){this.passwordTokenSeenFlag=!0;continue}const a=x(e,_);this.passwordTokenSeenFlag?this.url.password+=a:this.url.username+=a}this.buffer=""}else if(isNaN(e)||47===e||63===e||35===e||h(this.url)&&92===e){if(this.atFlag&&""===this.buffer)return this.parseError=!0,s;this.pointer-=o(this.buffer)+1,this.buffer="",this.state="host"}else this.buffer+=t;return!0},C.prototype["parse hostname"]=C.prototype["parse host"]=function(e,t){if(this.stateOverride&&"file"===this.url.scheme)--this.pointer,this.state="file host";else if(58!==e||this.arrFlag)if(isNaN(e)||47===e||63===e||35===e||h(this.url)&&92===e){if(--this.pointer,h(this.url)&&""===this.buffer)return this.parseError=!0,s;if(this.stateOverride&&""===this.buffer&&(N(this.url)||null!==this.url.port))return this.parseError=!0,!1;const e=k(this.buffer,h(this.url));if(e===s)return s;if(this.url.host=e,this.buffer="",this.state="path start",this.stateOverride)return!1}else 91===e?this.arrFlag=!0:93===e&&(this.arrFlag=!1),this.buffer+=t;else{if(""===this.buffer)return this.parseError=!0,s;const e=k(this.buffer,h(this.url));if(e===s)return s;if(this.url.host=e,this.buffer="",this.state="port","hostname"===this.stateOverride)return!1}return!0},C.prototype["parse port"]=function(e,t){if(d(e))this.buffer+=t;else{if(!(isNaN(e)||47===e||63===e||35===e||h(this.url)&&92===e||this.stateOverride))return this.parseError=!0,s;if(""!==this.buffer){const e=parseInt(this.buffer);if(e>Math.pow(2,16)-1)return this.parseError=!0,s;this.url.port=e===(a=this.url.scheme,r[a])?null:e,this.buffer=""}if(this.stateOverride)return!1;this.state="path start",--this.pointer}var a;return!0};const D=new Set([47,92,63,35]);C.prototype["parse file"]=function(e){var t,a;return this.url.scheme="file",47===e||92===e?(92===e&&(this.parseError=!0),this.state="file slash"):null!==this.base&&"file"===this.base.scheme?isNaN(e)?(this.url.host=this.base.host,this.url.path=this.base.path.slice(),this.url.query=this.base.query):63===e?(this.url.host=this.base.host,this.url.path=this.base.path.slice(),this.url.query="",this.state="query"):35===e?(this.url.host=this.base.host,this.url.path=this.base.path.slice(),this.url.query=this.base.query,this.url.fragment="",this.state="fragment"):(this.input.length-this.pointer-1==0||(t=e,a=this.input[this.pointer+1],!l(t)||58!==a&&124!==a)||this.input.length-this.pointer-1>=2&&!D.has(this.input[this.pointer+2])?(this.url.host=this.base.host,this.url.path=this.base.path.slice(),E(this.url)):this.parseError=!0,this.state="path",--this.pointer):(this.state="path",--this.pointer),!0},C.prototype["parse file slash"]=function(e){var t;return 47===e||92===e?(92===e&&(this.parseError=!0),this.state="file host"):(null!==this.base&&"file"===this.base.scheme&&(2===(t=this.base.path[0]).length&&l(t.codePointAt(0))&&":"===t[1]?this.url.path.push(this.base.path[0]):this.url.host=this.base.host),this.state="path",--this.pointer),!0},C.prototype["parse file host"]=function(e,t){if(isNaN(e)||47===e||92===e||63===e||35===e)if(--this.pointer,!this.stateOverride&&m(this.buffer))this.parseError=!0,this.state="path";else if(""===this.buffer){if(this.url.host="",this.stateOverride)return!1;this.state="path start"}else{let e=k(this.buffer,h(this.url));if(e===s)return s;if("localhost"===e&&(e=""),this.url.host=e,this.stateOverride)return!1;this.buffer="",this.state="path start"}else this.buffer+=t;return!0},C.prototype["parse path start"]=function(e){return h(this.url)?(92===e&&(this.parseError=!0),this.state="path",47!==e&&92!==e&&--this.pointer):this.stateOverride||63!==e?this.stateOverride||35!==e?void 0!==e&&(this.state="path",47!==e&&--this.pointer):(this.url.fragment="",this.state="fragment"):(this.url.query="",this.state="query"),!0},C.prototype["parse path"]=function(e){if(isNaN(e)||47===e||h(this.url)&&92===e||!this.stateOverride&&(63===e||35===e)){if(h(this.url)&&92===e&&(this.parseError=!0),".."===(t=(t=this.buffer).toLowerCase())||"%2e."===t||".%2e"===t||"%2e%2e"===t?(E(this.url),47===e||h(this.url)&&92===e||this.url.path.push("")):!c(this.buffer)||47===e||h(this.url)&&92===e?c(this.buffer)||("file"===this.url.scheme&&0===this.url.path.length&&m(this.buffer)&&(""!==this.url.host&&null!==this.url.host&&(this.parseError=!0,this.url.host=""),this.buffer=this.buffer[0]+":"),this.url.path.push(this.buffer)):this.url.path.push(""),this.buffer="","file"===this.url.scheme&&(void 0===e||63===e||35===e))for(;this.url.path.length>1&&""===this.url.path[0];)this.parseError=!0,this.url.path.shift();63===e&&(this.url.query="",this.state="query"),35===e&&(this.url.fragment="",this.state="fragment")}else 37!==e||u(this.input[this.pointer+1])&&u(this.input[this.pointer+2])||(this.parseError=!0),this.buffer+=x(e,b);var t;return!0},C.prototype["parse cannot-be-a-base-URL path"]=function(e){return 63===e?(this.url.query="",this.state="query"):35===e?(this.url.fragment="",this.state="fragment"):(isNaN(e)||37===e||(this.parseError=!0),37!==e||u(this.input[this.pointer+1])&&u(this.input[this.pointer+2])||(this.parseError=!0),isNaN(e)||(this.url.path[0]=this.url.path[0]+x(e,g))),!0},C.prototype["parse query"]=function(e,t){if(isNaN(e)||!this.stateOverride&&35===e){h(this.url)&&"ws"!==this.url.scheme&&"wss"!==this.url.scheme||(this.encodingOverride="utf-8");const t=new Buffer(this.buffer);for(let e=0;e<t.length;++e)t[e]<33||t[e]>126||34===t[e]||35===t[e]||60===t[e]||62===t[e]?this.url.query+=v(t[e]):this.url.query+=String.fromCodePoint(t[e]);this.buffer="",35===e&&(this.url.fragment="",this.state="fragment")}else 37!==e||u(this.input[this.pointer+1])&&u(this.input[this.pointer+2])||(this.parseError=!0),this.buffer+=t;return!0},C.prototype["parse fragment"]=function(e){return isNaN(e)||(0===e?this.parseError=!0:(37!==e||u(this.input[this.pointer+1])&&u(this.input[this.pointer+2])||(this.parseError=!0),this.url.fragment+=x(e,g))),!0},e.exports.serializeURL=function(e,t){let a=e.scheme+":";if(null!==e.host?(a+="//",""===e.username&&""===e.password||(a+=e.username,""!==e.password&&(a+=":"+e.password),a+="@"),a+=T(e.host),null!==e.port&&(a+=":"+e.port)):null===e.host&&"file"===e.scheme&&(a+="//"),e.cannotBeABaseURL)a+=e.path[0];else for(const t of e.path)a+="/"+t;return null!==e.query&&(a+="?"+e.query),t||null===e.fragment||(a+="#"+e.fragment),a},e.exports.serializeURLOrigin=function(t){switch(t.scheme){case"blob":try{return e.exports.serializeURLOrigin(e.exports.parseURL(t.path[0]))}catch(e){return"null"}case"ftp":case"gopher":case"http":case"https":case"ws":case"wss":return function(e){let t=e.scheme+"://";return t+=T(e.host),null!==e.port&&(t+=":"+e.port),t}({scheme:t.scheme,host:t.host,port:t.port});case"file":return"file://";default:return"null"}},e.exports.basicURLParse=function(e,t){void 0===t&&(t={});const a=new C(e,t.baseURL,t.encodingOverride,t.url,t.stateOverride);return a.failure?"failure":a.url},e.exports.setTheUsername=function(e,t){e.username="";const a=n.ucs2.decode(t);for(let t=0;t<a.length;++t)e.username+=x(a[t],_)},e.exports.setThePassword=function(e,t){e.password="";const a=n.ucs2.decode(t);for(let t=0;t<a.length;++t)e.password+=x(a[t],_)},e.exports.serializeHost=T,e.exports.cannotHaveAUsernamePasswordPort=function(e){return null===e.host||""===e.host||e.cannotBeABaseURL||"file"===e.scheme},e.exports.serializeInteger=function(e){return String(e)},e.exports.parseURL=function(t,a){return void 0===a&&(a={}),e.exports.basicURLParse(t,{baseURL:a.baseURL,encodingOverride:a.encodingOverride})}},function(e,t,a){"use strict";const{MAX_SAFE_INTEGER_LENGTH:n}=a(34);function i(e,t){const a=e.length,i=t.length,r=e.indexOf("."),s=t.indexOf("."),o=-1===r?a:r,p=-1===s?i:s;if(-1===r&&-1===s&&a<n&&i<n)return(Number(e)+Number(t)).toFixed();const d=o-p;let l=Math.max(o,p),u=Math.max(a-o-1,i-p-1),c=d<0?-1*d:0,m=d<=0?0:d,f=l+1+u-1,h="",v=0,g=f;if(u>0){for(;g>f-u;){const a=e[g-c]||"0",n=t[g-m]||"0";let i=Number(a)+Number(n)+v;i>=10?(i-=10,v=1):v=0,""===h&&0===i||(h=i+h),g--}h&&(h="."+h),g--}if(l>0)for(;g>=0;){const a=e[g-c]||"0",n=t[g-m]||"0";let i=Number(a)+Number(n)+v;i>=10?(i-=10,v=1):v=0,h=i+h,g--}return 1===v&&(h=v+h),"."===h[0]&&(h="0"+h),h}e.exports=i,e.exports.default=i},function(e,t){e.exports=require("url")},function(e,t,a){"use strict";function n(e){return/^[-+]?0(\.0+)?(e[\.\d]+)?$/.test(e)}e.exports=n,e.exports.default=n},function(e,t,a){"undefined"==typeof process||"renderer"===process.type||!0===process.browser||process.__nwjs?e.exports=a(137):e.exports=a(139)},function(e,t,a){"use strict";a.d(t,"a",(function(){return r})),a.d(t,"b",(function(){return s}));const n={deserialize:e=>Object.assign(Error(e.message),{name:e.name,stack:e.stack}),serialize:e=>({__error_marker:"$$error",message:e.message,name:e.name,stack:e.stack})};let i={deserialize(e){return(t=e)&&"object"==typeof t&&"__error_marker"in t&&"$$error"===t.__error_marker?n.deserialize(e):e;var t},serialize:e=>e instanceof Error?n.serialize(e):e};function r(e){return i.deserialize(e)}function s(e){return i.serialize(e)}},function(e,t){e.exports=require("zlib")},function(e,t,a){try{var n=a(25);if("function"!=typeof n.inherits)throw"";e.exports=n.inherits}catch(t){e.exports=a(120)}},function(e,t,a){"use strict";var n=a(31),i=Object.keys||function(e){var t=[];for(var a in e)t.push(a);return t};e.exports=u;var r=Object.create(a(24));r.inherits=a(14);var s=a(61),o=a(64);r.inherits(u,s);for(var p=i(o.prototype),d=0;d<p.length;d++){var l=p[d];u.prototype[l]||(u.prototype[l]=o.prototype[l])}function u(e){if(!(this instanceof u))return new u(e);s.call(this,e),o.call(this,e),e&&!1===e.readable&&(this.readable=!1),e&&!1===e.writable&&(this.writable=!1),this.allowHalfOpen=!0,e&&!1===e.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",c)}function c(){this.allowHalfOpen||this._writableState.ended||n.nextTick(m,this)}function m(e){e.end()}Object.defineProperty(u.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(u.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}}),u.prototype._destroy=function(e,t){this.push(null),this.end(),n.nextTick(t,e)}},function(e,t,a){"use strict";function n(e){return!!e.match(/^(|-|\+)inf(inity)?$/i)}e.exports=n,e.exports.default=n},function(e,t,a){"use strict";const n=a(0),i=a(16);function r(e){return!i(e)&&(!(e=n(e)).includes(".")&&!e.includes("/"))}e.exports=r,e.exports.default=r},function(e,t,a){"use strict";const n=a(4),i=a(0),r=a(5),s=a(47),o=a(40);function p(e,{max_decimal_digits:t}={}){let a=i(e[0]),p=n(a),d="-"===a[0]?"-":"";const l=e.length;for(let t=1;t<l;t++){const o=i(e[t]),l="-"===o[0]?"-":"",u=n(o);d=d!==l?"-":"";p="<"===r(p,u)?s(u,p):s(p,u),a=d+p}return"number"==typeof t&&(a=o(a,{digits:t})),a}e.exports=p,e.exports.default=p},function(e,t,a){const n=a(171);e.exports=function(e){return"+"===e[0]&&(e=e.substring(1)),(e=(e=n(e)).replace(/^0+(?=\d)/,"")).includes(".")&&(e=e.replace(/\.?0+$/,"")),""===e&&(e="0"),e}},function(e,t,a){"use strict";a.d(t,"a",(function(){return f})),a.d(t,"b",(function(){return h}));var n={};let i;function r(){return i||(i=function(){try{throw new Error}catch(e){const t=(""+e.stack).match(/(https?|file|ftp|chrome-extension|moz-extension):\/\/[^)\n]+/g);if(t)return(""+t[0]).replace(/^((?:https?|file|ftp|chrome-extension|moz-extension):\/\/.+)?\/[^/]+(?:\?.*)?$/,"$1")+"/"}return"/"}()),i}a.r(n),a.d(n,"defaultPoolSize",(function(){return s})),a.d(n,"getWorkerImplementation",(function(){return l})),a.d(n,"isWorkerRuntime",(function(){return u}));const s="undefined"!=typeof navigator&&navigator.hardwareConcurrency?navigator.hardwareConcurrency:4,o=e=>/^[a-zA-Z][a-zA-Z\d+\-.]*:/.test(e);function p(e){const t=new Blob([e],{type:"application/javascript"});return URL.createObjectURL(t)}let d;function l(){return d||(d=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 e extends Worker{constructor(e,t){var a,n;"string"==typeof e&&t&&t._baseURL?e=new URL(e,t._baseURL):"string"==typeof e&&!o(e)&&r().match(/^file:\/\//i)&&(e=new URL(e,r().replace(/\/[^\/]+$/,"/")),(null===(a=null==t?void 0:t.CORSWorkaround)||void 0===a||a)&&(e=p(`importScripts(${JSON.stringify(e)});`))),"string"==typeof e&&o(e)&&(null===(n=null==t?void 0:t.CORSWorkaround)||void 0===n||n)&&(e=p(`importScripts(${JSON.stringify(e)});`)),super(e,t)}}class t extends e{constructor(e,t){super(window.URL.createObjectURL(e),t)}static fromText(e,a){const n=new window.Blob([e],{type:"text/javascript"});return new t(n,a)}}return{blob:t,default:e}}()),d}function u(){const e="undefined"!=typeof self&&"undefined"!=typeof Window&&self instanceof Window;return!("undefined"==typeof self||!self.postMessage||e)}var c=a(100);const m="undefined"!=typeof process&&"browser"!==process.arch&&"pid"in process?c:n,f=m.defaultPoolSize,h=m.getWorkerImplementation;m.isWorkerRuntime},function(e,t){e.exports=require("http")},function(e,t){e.exports=require("path")},function(e,t,a){"use strict";var n,i;a.d(t,"a",(function(){return n})),a.d(t,"b",(function(){return i})),function(e){e.cancel="cancel",e.run="run"}(n||(n={})),function(e){e.error="error",e.init="init",e.result="result",e.running="running",e.uncaughtError="uncaughtError"}(i||(i={}))},function(e,t,a){function n(e){return Object.prototype.toString.call(e)}t.isArray=function(e){return Array.isArray?Array.isArray(e):"[object Array]"===n(e)},t.isBoolean=function(e){return"boolean"==typeof e},t.isNull=function(e){return null===e},t.isNullOrUndefined=function(e){return null==e},t.isNumber=function(e){return"number"==typeof e},t.isString=function(e){return"string"==typeof e},t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=function(e){return void 0===e},t.isRegExp=function(e){return"[object RegExp]"===n(e)},t.isObject=function(e){return"object"==typeof e&&null!==e},t.isDate=function(e){return"[object Date]"===n(e)},t.isError=function(e){return"[object Error]"===n(e)||e instanceof Error},t.isFunction=function(e){return"function"==typeof e},t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=a(29).Buffer.isBuffer},function(e,t){e.exports=require("util")},function(e,t,a){"use strict";const n=a(10),i=a(49);function r(e){return n(e)?"":i(e)}e.exports=r,e.exports.default=r},function(e,t,a){"use strict";const n=a(39);function i(e,t){return n(e,"2",t)}e.exports=i,e.exports.default=i},function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var n=a(3);function i(e){throw Error(e)}const r={errors:e=>e[n.a]||i("Error observable not found. Make sure to pass a thread instance as returned by the spawn() promise."),events:e=>e[n.b]||i("Events observable not found. Make sure to pass a thread instance as returned by the spawn() promise."),terminate:e=>e[n.c]()}},function(e,t){e.exports=require("buffer")},function(e,t){e.exports=require("fs")},function(e,t,a){"use strict";"undefined"==typeof process||!process.version||0===process.version.indexOf("v0.")||0===process.version.indexOf("v1.")&&0!==process.version.indexOf("v1.8.")?e.exports={nextTick:function(e,t,a,n){if("function"!=typeof e)throw new TypeError('"callback" argument must be a function');var i,r,s=arguments.length;switch(s){case 0:case 1:return process.nextTick(e);case 2:return process.nextTick((function(){e.call(null,t)}));case 3:return process.nextTick((function(){e.call(null,t,a)}));case 4:return process.nextTick((function(){e.call(null,t,a,n)}));default:for(i=new Array(s-1),r=0;r<i.length;)i[r++]=arguments[r];return process.nextTick((function(){e.apply(null,i)}))}}}:e.exports=process},function(e,t,a){var n=a(29),i=n.Buffer;function r(e,t){for(var a in e)t[a]=e[a]}function s(e,t,a){return i(e,t,a)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=n:(r(n,t),t.Buffer=s),r(i,s),s.from=function(e,t,a){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,a)},s.alloc=function(e,t,a){if("number"!=typeof e)throw new TypeError("Argument must be a number");var n=i(e);return void 0!==t?"string"==typeof a?n.fill(t,a):n.fill(t):n.fill(0),n},s.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},s.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}},function(e,t,a){"use strict";var n="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;function i(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.assign=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var a=t.shift();if(a){if("object"!=typeof a)throw new TypeError(a+"must be non-object");for(var n in a)i(a,n)&&(e[n]=a[n])}}return e},t.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var r={arraySet:function(e,t,a,n,i){if(t.subarray&&e.subarray)e.set(t.subarray(a,a+n),i);else for(var r=0;r<n;r++)e[i+r]=t[a+r]},flattenChunks:function(e){var t,a,n,i,r,s;for(n=0,t=0,a=e.length;t<a;t++)n+=e[t].length;for(s=new Uint8Array(n),i=0,t=0,a=e.length;t<a;t++)r=e[t],s.set(r,i),i+=r.length;return s}},s={arraySet:function(e,t,a,n,i){for(var r=0;r<n;r++)e[i+r]=t[a+r]},flattenChunks:function(e){return[].concat.apply([],e)}};t.setTyped=function(e){e?(t.Buf8=Uint8Array,t.Buf16=Uint16Array,t.Buf32=Int32Array,t.assign(t,r)):(t.Buf8=Array,t.Buf16=Array,t.Buf32=Array,t.assign(t,s))},t.setTyped(n)},function(e,t,a){"use strict";const{MAX_SAFE_INTEGER:n}=a(71),i=n.toString().length-1;e.exports={MAX_SAFE_INTEGER_LENGTH:i}},function(e,t,a){"use strict";const{MAX_SAFE_INTEGER_LENGTH:n}=a(34);function i(e,t){const a=e.length,i=t.length,r=e.indexOf("."),s=t.indexOf("."),o=-1===r?a:r,p=-1===s?i:s;if(-1===r&&-1===s&&a<n&&i<n)return(Number(e)-Number(t)).toFixed();const d=o-p;let l=Math.max(o,p),u=Math.max(a-o-1,i-p-1),c=d<0?-1*d:0,m=d<=0?0:d,f=l+1+u-1,h="",v=0,g=f;if(u>0){for(;g>f-u;){let a=e[g-c]||"0",n=t[g-m]||"0";a-=v,v=0;let i=a-n;if(i<0)for(;i<0;)v++,i+=10;else v&&v--;""===h&&0===i||(h=i+h),g--}""!==h&&(h="."+h),g--}if(l>0){for(;g>0;){let a=e[g-c]||"0",n=t[g-m]||"0";a-=v,v=0;let i=a-n;if(i<0)for(;i<0;)v++,i+=10;else v&&v--;h=i+h,g--}const a=e[0-c]||"0",n=t[0-m]||"0";let i=Number(a)-(v>0?1:0)-Number(n);0!==i&&(h=i+h),h=h.replace(/^0+/,"")}return"."===h[0]&&(h="0"+h),h}e.exports=i,e.exports.default=i},function(e,t,a){"use strict";const n=a(5),i=a(6),r=a(37),s=a(48);function o(e,t,{format:a="string",max_decimal_digits:o=100,ellipsis:p=!1}={}){"0"===e[0]&&(e=e.substring(1)),"0"===t[0]&&(t=t.substring(1));const d=e.indexOf("."),l=t.indexOf("."),u=-1===d?e.length:d,c=-1===l?0:t.length-1-l;let m=!1;e=e.replace(/\./,""),t=t.replace(/\./,"");const f=e.length;let h,v="",g="",w=-1*c,b=0;for(let a=0;a<f;a++){if(v+=e[a],h=n(v,t),">"===h){let e=1,a=i(t,t),s=t;for(;">"!==n(a,v);)e++,s=a,a=i(a,t);if(e=e.toString(),""!==g)for(let t=e.length;t<=b;t++)g+="0";g+=e,v=r(v,s),b=0}else{if("<"===h){""===g&&w++,b++;continue}if("="===h){if(""!==g)for(let e=0;e<b;e++)g+="0";g+="1",v="0",b=0}}}if(v.match(/^0+$/g))"<"===h&&(g+=v.substring(0,v.length-1));else{const e={},a=u-w-g.length+o+1;""===g&&(b=0);for(let s=0;s<a;s++){if(v+="0",p)if(v in e){if(e[v]++,e[v]>3){g+="...",m=!0;break}}else e[v]=1;const a=n(v,t);if(">"===a){let e=1,a=i(t,t),s=t;for(;">"!==n(a,v);)e++,s=a,a=i(a,t);e=e.toString();for(let t=e.length;t<=b;t++)g+="0";if(g+=e,v=r(v,s),"0"===v)break;b=0}else{if("<"===a){b++;continue}if("="===a){for(let e=0;e<b;e++)g+="0";g+="1",b=0;break}}}}const y=u-w,_=g.length;let x;if(y===_)x=0;else if(y<0)g="0."+"0".repeat(Math.abs(y))+g,x=_-y;else if(y>_){for(let e=_;e<y;e++)g+="0";x=0}else y<_?(g=g.substring(0,y)+"."+g.substring(y),x=_-y):0===y&&(g="0."+g,x=_);g=g.replace(/^0+/,""),g=g.replace(/\.\d+0+$/,"");const S=x-o;return m||S>0&&(g=s(g.substring(0,g.length-S+1))),"."===g[0]&&(g="0"+g),"object"===a?{quotient:g,extra_decimals:S}:g}e.exports=o,e.exports.default=o},function(e,t,a){"use strict";const n=a(0),i=a(5),r=a(16),s=a(8),o=a(35);function p(e,t,{infinity_minus_infinity:a="NaN"}={}){e=n(e),t=n(t);const p=!("-"===e[0]),d=!("-"===t[0]),l=r(e),u=r(t);if(l&&u){if(p===d)return a;if(p)return"Infinity";if(d)return"-Infinity"}else{if(l)return e;if(u)return d?"-Infinity":"Infinity"}if(p){if(d){const a=i(e,t);return">"===a?o(e,t):"<"===a?"-"+o(t,e):"0"}return s(e,t.substring(1))}if(d)return"-"+s(e.substring(1),t);{e=e.substring(1),t=t.substring(1);const a=i(e,t);return">"===a?"-"+o(e,t):"<"===a?o(t,e):"0"}}e.exports=p,e.exports.default=p},function(e,t,a){"use strict";const n=a(0),i=a(5);function r(e,t){e=n(e),t=n(t);const a="-"!==e[0],r="-"!==t[0];return a?r?i(e,t):">":r?"<":i(t.substring(1),e.substring(1))}e.exports=r,e.exports.default=r},function(e,t,a){"use strict";const n=a(4),i=a(0),r=a(2),s=a(74),o=a(17),p=a(51),d=a(75),l=a(10),u=a(52),c=a(53),m=a(78),f=a(41),h=a(40),v=a(26),g=a(82);function w(e,t,{zero_to_the_power_of_zero:a="1",ellipsis:w=!1,imaginary:b=!0,max_decimal_digits:y=100,fraction:_=!1}={}){e=i(e),t=i(t);const x=b&&p(e);x&&(e=e.replace(/i$/,""));const S=l(e),k=l(t);if(S&&k)return a;if(k)return"1";const T=v(t);if(S){if("+"===T)return"0";if("-"===T)return"Infinity"}const E=o(t);if("+"===T&&E){let a=c(e,t);return"number"==typeof y&&(a=h(a,{digits:y})),x&&d(t)&&(a+="i"),a}if("-"===T&&E){const a="1",i=c(e,n(t));return r(a,i,{ellipsis:w,max_decimal_digits:y})}if(!E){t=n(t);let[a,i]=t.includes("/")?t.split("/"):s(t);[a,i]=g(a,i);let r=f(e,i,{imaginary:b}),o=u(a,r);return"number"==typeof y&&(o=h(o,{digits:y})),"-"===T&&(o=m(o,{fraction:_,max_decimal_digits:y})),o}}e.exports=w,e.exports.default=w},function(e,t,a){"use strict";const n=a(51),i=a(151);function r(e,{digits:t=0}={}){return n(e)?i(e.substring(0,e.length-1),{digits:t})+"i":i(e,{digits:t})}e.exports=r,e.exports.default=r},function(e,t,a){"use strict";const n=a(4),i=a(0),r=a(5),s=a(79),o=a(17),p=a(77),d=a(53),l=a(80);function u(e,t,{imaginary:a=!0,max_decimal_digits:u=100}={}){if(e=i(e),"1"===(t=i(t)))return e;if("1"===e)return"1";if(!o(t))throw new Error("[preciso] can't find fractional roots");if(p(t))throw new Error("[preciso] can't find root of negative indexes");const c=n(e),m=p(e),f=s(t),h=m&&f;if(h&&!a)throw new Error("[preciso] root has an imaginary number");const v=m&&!f?"-":"",g=l(c,t),w=["9","8","7","6","5","4","3","2","1","0"];let b="";for(let e=0;e<g;e++)for(let a=0;a<w.length;a++){const n=b+w[a];let i=n+"0".repeat(g-e-1);const s=d(i,t),o=r(s,c);if("="===o)return h&&(i+="i"),v+i;if("<"===o){b=n;break}}let y=b+".";for(let e=0;e<u;e++){let e=!1;for(let a=0;a<w.length;a++){let n=y+w[a];const i=d(n,t),s=r(i,c);if("="===s)return h&&(n+="i"),v+n;if("<"===s){y=n,e=!0;break}}if(!e)break}return h&&(y+="i"),v+y}e.exports=u,e.exports.default=u},function(e,t,a){a(19);function n(e,t){const a=e.length,n=t.length,i=e.indexOf("."),r=t.indexOf("."),s=-1===i?a:i,o=-1===r?n:r,p=s-o;let d=p<0?-1*p:0,l=p<=0?0:p,u=Math.max(s,o)+1+Math.max(a-s,n-o)-1,c=0;for(;c<u;){const a=c-d,n=a===s?".":e[a]||"0",i=c-l,r=i===o?".":t[i]||"0";if(n!==r){if(n>r)return">";if(n<r)return"<"}c++}return"="}e.exports=n,e.exports.default=n},function(e,t){e.exports=require("https")},function(e,t,a){"use strict";const n=()=>"function"==typeof Symbol,i=e=>n()&&Boolean(Symbol[e]),r=e=>i(e)?Symbol[e]:"@@"+e;i("asyncIterator")||(Symbol.asyncIterator=Symbol.asyncIterator||Symbol.for("Symbol.asyncIterator"));const s=r("iterator"),o=r("observable"),p=r("species");function d(e,t){const a=e[t];if(null!=a){if("function"!=typeof a)throw new TypeError(a+" is not a function");return a}}function l(e){let t=e.constructor;return void 0!==t&&(t=t[p],null===t&&(t=void 0)),void 0!==t?t:b}function u(e){u.log?u.log(e):setTimeout(()=>{throw e},0)}function c(e){Promise.resolve().then(()=>{try{e()}catch(e){u(e)}})}function m(e){const t=e._cleanup;if(void 0!==t&&(e._cleanup=void 0,t))try{if("function"==typeof t)t();else{const e=d(t,"unsubscribe");e&&e.call(t)}}catch(e){u(e)}}function f(e){e._observer=void 0,e._queue=void 0,e._state="closed"}function h(e,t,a){e._state="running";const n=e._observer;try{const i=n?d(n,t):void 0;switch(t){case"next":i&&i.call(n,a);break;case"error":if(f(e),!i)throw a;i.call(n,a);break;case"complete":f(e),i&&i.call(n)}}catch(e){u(e)}"closed"===e._state?m(e):"running"===e._state&&(e._state="ready")}function v(e,t,a){if("closed"!==e._state)return"buffering"===e._state?(e._queue=e._queue||[],void e._queue.push({type:t,value:a})):"ready"!==e._state?(e._state="buffering",e._queue=[{type:t,value:a}],void c(()=>function(e){const t=e._queue;if(t){e._queue=void 0,e._state="ready";for(const a of t)if(h(e,a.type,a.value),"closed"===e._state)break}}(e))):void h(e,t,a)}class g{constructor(e,t){this._cleanup=void 0,this._observer=e,this._queue=void 0,this._state="initializing";const a=new w(this);try{this._cleanup=t.call(void 0,a)}catch(e){a.error(e)}"initializing"===this._state&&(this._state="ready")}get closed(){return"closed"===this._state}unsubscribe(){"closed"!==this._state&&(f(this),m(this))}}class w{constructor(e){this._subscription=e}get closed(){return"closed"===this._subscription._state}next(e){v(this._subscription,"next",e)}error(e){v(this._subscription,"error",e)}complete(){v(this._subscription,"complete")}}class b{constructor(e){if(!(this instanceof b))throw new TypeError("Observable cannot be called as a function");if("function"!=typeof e)throw new TypeError("Observable initializer must be a function");this._subscriber=e}subscribe(e,t,a){return"object"==typeof e&&null!==e||(e={next:e,error:t,complete:a}),new g(e,this._subscriber)}pipe(e,...t){let a=this;for(const n of[e,...t])a=n(a);return a}tap(e,t,a){const n="object"!=typeof e||null===e?{next:e,error:t,complete:a}:e;return new b(e=>this.subscribe({next(t){n.next&&n.next(t),e.next(t)},error(t){n.error&&n.error(t),e.error(t)},complete(){n.complete&&n.complete(),e.complete()},start(e){n.start&&n.start(e)}}))}forEach(e){return new Promise((t,a)=>{if("function"!=typeof e)return void a(new TypeError(e+" is not a function"));function n(){i.unsubscribe(),t(void 0)}const i=this.subscribe({next(t){try{e(t,n)}catch(e){a(e),i.unsubscribe()}},error(e){a(e)},complete(){t(void 0)}})})}map(e){if("function"!=typeof e)throw new TypeError(e+" is not a function");return new(l(this))(t=>this.subscribe({next(a){let n=a;try{n=e(a)}catch(e){return t.error(e)}t.next(n)},error(e){t.error(e)},complete(){t.complete()}}))}filter(e){if("function"!=typeof e)throw new TypeError(e+" is not a function");return new(l(this))(t=>this.subscribe({next(a){try{if(!e(a))return}catch(e){return t.error(e)}t.next(a)},error(e){t.error(e)},complete(){t.complete()}}))}reduce(e,t){if("function"!=typeof e)throw new TypeError(e+" is not a function");const a=l(this),n=arguments.length>1;let i=!1,r=t;return new a(t=>this.subscribe({next(a){const s=!i;if(i=!0,!s||n)try{r=e(r,a)}catch(e){return t.error(e)}else r=a},error(e){t.error(e)},complete(){if(!i&&!n)return t.error(new TypeError("Cannot reduce an empty sequence"));t.next(r),t.complete()}}))}concat(...e){const t=l(this);return new t(a=>{let n,i=0;return function r(s){n=s.subscribe({next(e){a.next(e)},error(e){a.error(e)},complete(){i===e.length?(n=void 0,a.complete()):r(t.from(e[i++]))}})}(this),()=>{n&&(n.unsubscribe(),n=void 0)}})}flatMap(e){if("function"!=typeof e)throw new TypeError(e+" is not a function");const t=l(this);return new t(a=>{const n=[],i=this.subscribe({next(i){let s;if(e)try{s=e(i)}catch(e){return a.error(e)}else s=i;const o=t.from(s).subscribe({next(e){a.next(e)},error(e){a.error(e)},complete(){const e=n.indexOf(o);e>=0&&n.splice(e,1),r()}});n.push(o)},error(e){a.error(e)},complete(){r()}});function r(){i.closed&&0===n.length&&a.complete()}return()=>{n.forEach(e=>e.unsubscribe()),i.unsubscribe()}})}[(Symbol.observable,o)](){return this}static from(e){const t="function"==typeof this?this:b;if(null==e)throw new TypeError(e+" is not an object");const a=d(e,o);if(a){const n=a.call(e);if(Object(n)!==n)throw new TypeError(n+" is not an object");return function(e){return e instanceof b}(n)&&n.constructor===t?n:new t(e=>n.subscribe(e))}if(i("iterator")){const a=d(e,s);if(a)return new t(t=>{c(()=>{if(!t.closed){for(const n of a.call(e))if(t.next(n),t.closed)return;t.complete()}})})}if(Array.isArray(e))return new t(t=>{c(()=>{if(!t.closed){for(const a of e)if(t.next(a),t.closed)return;t.complete()}})});throw new TypeError(e+" is not observable")}static of(...e){return new("function"==typeof this?this:b)(t=>{c(()=>{if(!t.closed){for(const a of e)if(t.next(a),t.closed)return;t.complete()}})})}static get[p](){return this}}n()&&Object.defineProperty(b,Symbol("extensions"),{value:{symbol:o,hostReportError:u},configurable:!0});t.a=b},,function(e,t,a){"use strict";const n=a(5),i=a(10),r=a(47),s=a(8);function o(e,t,a="1"){if(i(e))return"0";let o=e,p=e;for(;"<"===n(p,t);)p=s(p,a),o=r(o,p);return o}e.exports=o,e.exports.default=o},function(e,t,a){"use strict";const{MAX_SAFE_INTEGER_LENGTH:n}=a(34);function i(e,t){if("0"===e||"0"===t)return"0";const a=e.indexOf("."),i=t.indexOf("."),r=(-1===a?e.length:a)+(-1===i?t.length:i),s=(-1===a?0:e.length-1-a)+(-1===i?0:t.length-1-i);if(0===s&&r<n)return(Number(e)*Number(t)).toFixed(0);const o=e.replace(".",""),p=t.replace(".",""),d=o.length,l=p.length,u=[];let c=d;for(;c>=0;){const e=c,t=c-=15,a=o.substring(t,e);u.push([Number(a),a.length])}const m=[],f=[];for(let e=0,t=l-1;t>=0;t--,e++){const a=p[t],n=Number(a);let i=0,r="";const s=u.length-1;u.forEach(([e,t],a)=>{let o=(i+n*e).toString();const p=o.length;if(p>t&&a!==s){const e=-1*t;r=o.slice(e)+r,i=Number(o.slice(0,e))}else{const e=t-p;for(let t=0;t<e;t++)o="0"+o;i=0,r=o+r}}),r+="0".repeat(e),m.push(r),f.push([Array.from(r).map(e=>Number(e)),r.length])}const h=m.length,v=f[f.length-1][1]+h;let g="",w=0;for(let e=0;e<v;e++){let t=w;const a=Math.min(e,h-1);for(let n=0;n<=a;n++){const[a,i]=f[n],r=i-1-e;r>=0&&(t+=a[r])}t>=10?(t=t.toString(),g=t[t.length-1]+g,w=Number(t.slice(0,-1))):(g=t+g,w=0)}if(0===s)g=g.replace(/^0+/,"");else{const e=g.length-s;g=g.substring(0,e)+"."+g.substring(e),g=g.replace(/^0+/,""),g=g.replace(/\.?0+$/,""),"."===g[0]&&(g="0"+g)}return g}e.exports=i,e.exports.default=i},function(e,t,a){"use strict";const n=a(6),i=a(147),r=["5","6","7","8","9"];function s(e){if(e.match(/\.9+$/))return n(i(e),"1");"+"===e[0]&&(e=e.substring(1));const t=e.length;let a="";const s=e[e.length-1];if(r.includes(s)){let n;for(n=t-2;n>=0;n--){const t=e[n];if("."===t||"-"===t)continue;const i=Number(t)+1;if(10!==i){a=i+a;break}a="0"+a}n>0&&(a=e.substring(0,n)+a)}else a=e.substring(0,t-1);return"."===a[a.length-1]&&(a=a.substring(0,a.length-1)),a.indexOf(".")>-1&&(a=a.replace(/0+$/,"")),a}e.exports=s,e.exports.default=s},function(e,t,a){"use strict";function n(e){return"-"===e[0]?"-":"+"}e.exports=n,e.exports.default=n},function(e,t,a){"use strict";const n=a(0);function i(e){const t=(e=n(e)).indexOf(".");return-1===t?"0":(e.length-t-1).toString()}e.exports=i,e.exports.default=i},function(e,t,a){"use strict";function n(e){return e.includes("i")}e.exports=n,e.exports.default=n},function(e,t,a){"use strict";const n=a(76);function i(){const e=Array.from(arguments),t="object"==typeof e[e.length-1]?e[e.length-1]:void 0,a=Array.isArray(e[0])?e[0]:t?e.slice(0,e.length-1):e;return n(a,t)}e.exports=i,e.exports.default=i},function(e,t,a){"use strict";const n=a(18);function i(e,t){const a=Number(t);let i=e;for(let t=1;t<a;t++)i=n([i,e]);return i}e.exports=i,e.exports.default=i},function(e,t,a){"use strict";const n=a(6);function i(e){let t="0";for(let a of e)t=n(t,a);return t}e.exports=i,e.exports.default=i},function(e,t){const a=9007199254740991..toString().length-1;e.exports={MAX_SAFE_INTEGER:9007199254740991,MAX_SAFE_INTEGER_LENGTH:a}},function(e,t){e.exports=require("events")},function(e,t,a){"use strict";a.d(t,"a",(function(){return D}));var n=a(11),i=a.n(n),r=a(44),s=a(12);const o=()=>{};var p,d=a(3);!function(e){e.internalError="internalError",e.message="message",e.termination="termination"}(p||(p={}));var l=a(188);const u=()=>{},c=e=>e,m=e=>Promise.resolve().then(e);function f(e){throw e}class h extends r.a{constructor(e){super(t=>{const a=this,n=Object.assign(Object.assign({},t),{complete(){t.complete(),a.onCompletion()},error(e){t.error(e),a.onError(e)},next(e){t.next(e),a.onNext(e)}});try{return this.initHasRun=!0,e(n)}catch(e){n.error(e)}}),this.initHasRun=!1,this.fulfillmentCallbacks=[],this.rejectionCallbacks=[],this.firstValueSet=!1,this.state="pending"}onNext(e){this.firstValueSet||(this.firstValue=e,this.firstValueSet=!0)}onError(e){this.state="rejected",this.rejection=e;for(const t of this.rejectionCallbacks)m(()=>t(e))}onCompletion(){this.state="fulfilled";for(const e of this.fulfillmentCallbacks)m(()=>e(this.firstValue))}then(e,t){const a=e||c,n=t||f;let i=!1;return new Promise((e,t)=>{const r=a=>{if(!i){i=!0;try{e(n(a))}catch(e){t(e)}}};return this.initHasRun||this.subscribe({error:r}),"fulfilled"===this.state?e(a(this.firstValue)):"rejected"===this.state?(i=!0,e(n(this.rejection))):(this.fulfillmentCallbacks.push(t=>{try{e(a(t))}catch(e){r(e)}}),void this.rejectionCallbacks.push(r))})}catch(e){return this.then(void 0,e)}finally(e){const t=e||u;return this.then(e=>(t(),e),()=>t())}static from(e){return function(e){return e&&"function"==typeof e.then}(e)?new h(t=>{e.then(e=>{t.next(e),t.complete()},e=>{t.error(e)})}):super.from(e)}}var v=a(104),g=a(23);const w=i()("threads:master:messages");let b=1;function y(e,t){return new r.a(a=>{let n;const i=r=>{var o;if(w("Message from worker:",r.data),r.data&&r.data.uid===t)if((o=r.data)&&o.type===g.b.running)n=r.data.resultType;else if((e=>e&&e.type===g.b.result)(r.data))"promise"===n?(void 0!==r.data.payload&&a.next(Object(s.a)(r.data.payload)),a.complete(),e.removeEventListener("message",i)):(r.data.payload&&a.next(Object(s.a)(r.data.payload)),r.data.complete&&(a.complete(),e.removeEventListener("message",i)));else if((e=>e&&e.type===g.b.error)(r.data)){const t=Object(s.a)(r.data.error);a.error(t),e.removeEventListener("message",i)}};return e.addEventListener("message",i),()=>{if("observable"===n||!n){const a={type:g.a.cancel,uid:t};e.postMessage(a)}e.removeEventListener("message",i)}})}function _(e,t){return(...a)=>{const n=b++,{args:i,transferables:r}=function(e){if(0===e.length)return{args:[],transferables:[]};const t=[],a=[];for(const n of e)Object(v.a)(n)?(t.push(Object(s.b)(n.send)),a.push(...n.transferables)):t.push(Object(s.b)(n));return{args:t,transferables:0===a.length?a:(n=a,Array.from(new Set(n)))};var n}(a),o={type:g.a.run,uid:n,method:t,args:i};w("Sending command to run function to worker:",o);try{e.postMessage(o,r)}catch(e){return h.from(Promise.reject(e))}return h.from(Object(l.a)(y(e,n)))}}var x=function(e,t,a,n){return new(a||(a=Promise))((function(i,r){function s(e){try{p(n.next(e))}catch(e){r(e)}}function o(e){try{p(n.throw(e))}catch(e){r(e)}}function p(e){var t;e.done?i(e.value):(t=e.value,t instanceof a?t:new a((function(e){e(t)}))).then(s,o)}p((n=n.apply(e,t||[])).next())}))};const S=i()("threads:master:messages"),k=i()("threads:master:spawn"),T=i()("threads:master:thread-utils"),E="undefined"!=typeof process&&process.env.THREADS_WORKER_INIT_TIMEOUT?Number.parseInt(process.env.THREADS_WORKER_INIT_TIMEOUT,10):1e4;function N(e){const[t,a]=function(){let e,t=!1,a=o;return[new Promise(n=>{t?n(e):a=n}),n=>{t=!0,e=n,a(e)}]}();return{terminate:()=>x(this,void 0,void 0,(function*(){T("Terminating worker"),yield e.terminate(),a()})),termination:t}}function C(e,t,a,n){const i=a.filter(e=>e.type===p.internalError).map(e=>e.error);return Object.assign(e,{[d.a]:i,[d.b]:a,[d.c]:n,[d.e]:t})}function D(e,t){return x(this,void 0,void 0,(function*(){k("Initializing new thread");const a=t&&t.timeout?t.timeout:E,n=(yield function(e,t,a){return x(this,void 0,void 0,(function*(){let n;const i=new Promise((e,i)=>{n=setTimeout(()=>i(Error(a)),t)}),r=yield Promise.race([e,i]);return clearTimeout(n),r}))}(function(e){return new Promise((t,a)=>{const n=i=>{var r;S("Message from worker before finishing initialization:",i.data),(r=i.data)&&"init"===r.type?(e.removeEventListener("message",n),t(i.data)):(e=>e&&"uncaughtError"===e.type)(i.data)&&(e.removeEventListener("message",n),a(Object(s.a)(i.data.error)))};e.addEventListener("message",n)})}(e),a,`Timeout: Did not receive an init message from worker after ${a}ms. Make sure the worker calls expose().`)).exposed,{termination:i,terminate:o}=N(e),d=function(e,t){return new r.a(a=>{const n=e=>{const t={type:p.message,data:e.data};a.next(t)},i=e=>{T("Unhandled promise rejection event in thread:",e);const t={type:p.internalError,error:Error(e.reason)};a.next(t)};e.addEventListener("message",n),e.addEventListener("unhandledrejection",i),t.then(()=>{const t={type:p.termination};e.removeEventListener("message",n),e.removeEventListener("unhandledrejection",i),a.next(t),a.complete()})})}(e,i);if("function"===n.type){return C(_(e),e,d,o)}if("module"===n.type){return C(function(e,t){const a={};for(const n of t)a[n]=_(e,n);return a}(e,n.methods),e,d,o)}{const e=n.type;throw Error("Worker init message states unexpected type of expose(): "+e)}}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return v}));var n=a(11),i=a.n(n),r=a(103),s=a(188),o=a(44);function p(e){return Promise.all(e.map(e=>{const t=e=>({status:"fulfilled",value:e}),a=e=>({status:"rejected",reason:e}),n=Promis