UNPKG

evrythng

Version:

Official Javascript SDK for the EVRYTHNG API.

1 lines 335 kB
!function(p,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("evrythng",[],e):"object"==typeof exports?exports.evrythng=e():p.evrythng=e()}("undefined"!=typeof self?self:this,(function(){return(()=>{var p={571:(p,e,a)=>{const d=a(165),m=d.fetch.bind({});m.polyfill=!0,global.fetch||(global.fetch=m,global.Response=d.Response,global.Headers=d.Headers,global.Request=d.Request)},165:(p,e,a)=>{const d=a(85),m=d.default||d,i=function(p,e){return/^\/\//.test(p)&&(p="https:"+p),m.call(this,p,e)};i.ponyfill=!0,p.exports=e=i,e.fetch=i,e.Headers=d.Headers,e.Request=d.Request,e.Response=d.Response,e.default=i},658:(p,e,a)=>{"use strict";var d=a(477),m=a(907),i={TRANSITIONAL:0,NONTRANSITIONAL:1};function l(p){return p.split("\0").map((function(p){return p.normalize("NFC")})).join("\0")}function t(p){for(var e=0,a=m.length-1;e<=a;){var d=Math.floor((e+a)/2),i=m[d];if(i[0][0]<=p&&i[0][1]>=p)return i;i[0][0]>p?a=d-1:e=d+1}return null}var s=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g;function r(p){return p.replace(s,"_").length}var o=/[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08E4-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C03\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D01-\u0D03\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u18A9\u1920-\u192B\u1930-\u193B\u19B0-\u19C0\u19C8\u19C9\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF8\u1CF9\u1DC0-\u1DF5\u1DFC-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C4\uA8E0-\uA8F1\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2D]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD804[\uDC00-\uDC02\uDC38-\uDC46\uDC7F-\uDC82\uDCB0-\uDCBA\uDD00-\uDD02\uDD27-\uDD34\uDD73\uDD80-\uDD82\uDDB3-\uDDC0\uDE2C-\uDE37\uDEDF-\uDEEA\uDF01-\uDF03\uDF3C\uDF3E-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF57\uDF62\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDCB0-\uDCC3\uDDAF-\uDDB5\uDDB8-\uDDC0\uDE30-\uDE40\uDEAB-\uDEB7]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF51-\uDF7E\uDF8F-\uDF92]|\uD82F[\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD83A[\uDCD0-\uDCD6]|\uDB40[\uDD00-\uDDEF]/;function n(p,e){"xn--"===p.substr(0,4)&&(p=d.toUnicode(p));var a=!1;(l(p)!==p||"-"===p[3]&&"-"===p[4]||"-"===p[0]||"-"===p[p.length-1]||-1!==p.indexOf(".")||0===p.search(o))&&(a=!0);for(var m=r(p),s=0;s<m;++s){var n=t(p.codePointAt(s));if(u===i.TRANSITIONAL&&"valid"!==n[1]||u===i.NONTRANSITIONAL&&"valid"!==n[1]&&"deviation"!==n[1]){a=!0;break}}return{label:p,error:a}}function u(p,e,a){var d=function(p,e,a){for(var d=!1,m="",l=r(p),s=0;s<l;++s){var o=p.codePointAt(s),n=t(o);switch(n[1]){case"disallowed":d=!0,m+=String.fromCodePoint(o);break;case"ignored":break;case"mapped":m+=String.fromCodePoint.apply(String,n[2]);break;case"deviation":m+=a===i.TRANSITIONAL?String.fromCodePoint.apply(String,n[2]):String.fromCodePoint(o);break;case"valid":m+=String.fromCodePoint(o);break;case"disallowed_STD3_mapped":e?(d=!0,m+=String.fromCodePoint(o)):m+=String.fromCodePoint.apply(String,n[2]);break;case"disallowed_STD3_valid":e&&(d=!0),m+=String.fromCodePoint(o)}}return{string:m,error:d}}(p,e,a);d.string=l(d.string);for(var m=d.string.split("."),s=0;s<m.length;++s)try{var o=n(m[s]);m[s]=o.label,d.error=d.error||o.error}catch(p){d.error=!0}return{string:m.join("."),error:d.error}}p.exports.toASCII=function(p,e,a,m){var i=u(p,e,a),l=i.string.split(".");if(l=l.map((function(p){try{return d.toASCII(p)}catch(e){return i.error=!0,p}})),m){var t=l.slice(0,l.length-1).join(".").length;(t.length>253||0===t.length)&&(i.error=!0);for(var s=0;s<l.length;++s)if(l.length>63||0===l.length){i.error=!0;break}}return i.error?null:l.join(".")},p.exports.toUnicode=function(p,e){var a=u(p,e,i.NONTRANSITIONAL);return{domain:a.string,error:a.error}},p.exports.PROCESSING_OPTIONS=i},808:p=>{"use strict";var e={};function a(p){return p<0?-1:1}function d(p,e){e.unsigned||--p;const d=e.unsigned?0:-Math.pow(2,p),m=Math.pow(2,p)-1,i=e.moduloBitLength?Math.pow(2,e.moduloBitLength):Math.pow(2,p),l=e.moduloBitLength?Math.pow(2,e.moduloBitLength-1):Math.pow(2,p-1);return function(p,t){t||(t={});let s=+p;if(t.enforceRange){if(!Number.isFinite(s))throw new TypeError("Argument is not a finite number");if(s=a(s)*Math.floor(Math.abs(s)),s<d||s>m)throw new TypeError("Argument is not in byte range");return s}if(!isNaN(s)&&t.clamp)return s=function(p){return p%1==.5&&0==(1&p)?Math.floor(p):Math.round(p)}(s),s<d&&(s=d),s>m&&(s=m),s;if(!Number.isFinite(s)||0===s)return 0;if(s=a(s)*Math.floor(Math.abs(s)),s%=i,!e.unsigned&&s>=l)return s-i;if(e.unsigned)if(s<0)s+=i;else if(-0===s)return 0;return s}}p.exports=e,e.void=function(){},e.boolean=function(p){return!!p},e.byte=d(8,{unsigned:!1}),e.octet=d(8,{unsigned:!0}),e.short=d(16,{unsigned:!1}),e["unsigned short"]=d(16,{unsigned:!0}),e.long=d(32,{unsigned:!1}),e["unsigned long"]=d(32,{unsigned:!0}),e["long long"]=d(32,{unsigned:!1,moduloBitLength:64}),e["unsigned long long"]=d(32,{unsigned:!0,moduloBitLength:64}),e.double=function(p){const e=+p;if(!Number.isFinite(e))throw new TypeError("Argument is not a finite floating-point value");return e},e["unrestricted double"]=function(p){const e=+p;if(isNaN(e))throw new TypeError("Argument is NaN");return e},e.float=e.double,e["unrestricted float"]=e["unrestricted double"],e.DOMString=function(p,e){return e||(e={}),e.treatNullAsEmptyString&&null===p?"":String(p)},e.ByteString=function(p,e){const a=String(p);let d;for(let p=0;void 0!==(d=a.codePointAt(p));++p)if(d>255)throw new TypeError("Argument is not a valid bytestring");return a},e.USVString=function(p){const e=String(p),a=e.length,d=[];for(let p=0;p<a;++p){const m=e.charCodeAt(p);if(m<55296||m>57343)d.push(String.fromCodePoint(m));else if(56320<=m&&m<=57343)d.push(String.fromCodePoint(65533));else if(p===a-1)d.push(String.fromCodePoint(65533));else{const a=e.charCodeAt(p+1);if(56320<=a&&a<=57343){const e=1023&m,i=1023&a;d.push(String.fromCodePoint(65536+1024*e+i)),++p}else d.push(String.fromCodePoint(65533))}}return d.join("")},e.Date=function(p,e){if(!(p instanceof Date))throw new TypeError("Argument is not a Date object");if(!isNaN(p))return p},e.RegExp=function(p,e){return p instanceof RegExp||(p=new RegExp(p)),p}},167:(p,e,a)=>{"use strict";const d=a(24);e.implementation=class{constructor(p){const e=p[0],a=p[1];let m=null;if(void 0!==a&&(m=d.basicURLParse(a),"failure"===m))throw new TypeError("Invalid base URL");const i=d.basicURLParse(e,{baseURL:m});if("failure"===i)throw new TypeError("Invalid URL");this._url=i}get href(){return d.serializeURL(this._url)}set href(p){const e=d.basicURLParse(p);if("failure"===e)throw new TypeError("Invalid URL");this._url=e}get origin(){return d.serializeURLOrigin(this._url)}get protocol(){return this._url.scheme+":"}set protocol(p){d.basicURLParse(p+":",{url:this._url,stateOverride:"scheme start"})}get username(){return this._url.username}set username(p){d.cannotHaveAUsernamePasswordPort(this._url)||d.setTheUsername(this._url,p)}get password(){return this._url.password}set password(p){d.cannotHaveAUsernamePasswordPort(this._url)||d.setThePassword(this._url,p)}get host(){const p=this._url;return null===p.host?"":null===p.port?d.serializeHost(p.host):d.serializeHost(p.host)+":"+d.serializeInteger(p.port)}set host(p){this._url.cannotBeABaseURL||d.basicURLParse(p,{url:this._url,stateOverride:"host"})}get hostname(){return null===this._url.host?"":d.serializeHost(this._url.host)}set hostname(p){this._url.cannotBeABaseURL||d.basicURLParse(p,{url:this._url,stateOverride:"hostname"})}get port(){return null===this._url.port?"":d.serializeInteger(this._url.port)}set port(p){d.cannotHaveAUsernamePasswordPort(this._url)||(""===p?this._url.port=null:d.basicURLParse(p,{url:this._url,stateOverride:"port"}))}get pathname(){return this._url.cannotBeABaseURL?this._url.path[0]:0===this._url.path.length?"":"/"+this._url.path.join("/")}set pathname(p){this._url.cannotBeABaseURL||(this._url.path=[],d.basicURLParse(p,{url:this._url,stateOverride:"path start"}))}get search(){return null===this._url.query||""===this._url.query?"":"?"+this._url.query}set search(p){const e=this._url;if(""===p)return void(e.query=null);const a="?"===p[0]?p.substring(1):p;e.query="",d.basicURLParse(a,{url:e,stateOverride:"query"})}get hash(){return null===this._url.fragment||""===this._url.fragment?"":"#"+this._url.fragment}set hash(p){if(""===p)return void(this._url.fragment=null);const e="#"===p[0]?p.substring(1):p;this._url.fragment="",d.basicURLParse(e,{url:this._url,stateOverride:"fragment"})}toJSON(){return this.href}}},221:(p,e,a)=>{"use strict";const d=a(808),m=a(625),i=a(167),l=m.implSymbol;function t(e){if(!this||this[l]||!(this instanceof t))throw new TypeError("Failed to construct 'URL': Please use the 'new' operator, this DOM object constructor cannot be called as a function.");if(arguments.length<1)throw new TypeError("Failed to construct 'URL': 1 argument required, but only "+arguments.length+" present.");const a=[];for(let p=0;p<arguments.length&&p<2;++p)a[p]=arguments[p];a[0]=d.USVString(a[0]),void 0!==a[1]&&(a[1]=d.USVString(a[1])),p.exports.setup(this,a)}t.prototype.toJSON=function(){if(!this||!p.exports.is(this))throw new TypeError("Illegal invocation");const e=[];for(let p=0;p<arguments.length&&p<0;++p)e[p]=arguments[p];return this[l].toJSON.apply(this[l],e)},Object.defineProperty(t.prototype,"href",{get(){return this[l].href},set(p){p=d.USVString(p),this[l].href=p},enumerable:!0,configurable:!0}),t.prototype.toString=function(){if(!this||!p.exports.is(this))throw new TypeError("Illegal invocation");return this.href},Object.defineProperty(t.prototype,"origin",{get(){return this[l].origin},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"protocol",{get(){return this[l].protocol},set(p){p=d.USVString(p),this[l].protocol=p},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"username",{get(){return this[l].username},set(p){p=d.USVString(p),this[l].username=p},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"password",{get(){return this[l].password},set(p){p=d.USVString(p),this[l].password=p},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"host",{get(){return this[l].host},set(p){p=d.USVString(p),this[l].host=p},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"hostname",{get(){return this[l].hostname},set(p){p=d.USVString(p),this[l].hostname=p},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"port",{get(){return this[l].port},set(p){p=d.USVString(p),this[l].port=p},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"pathname",{get(){return this[l].pathname},set(p){p=d.USVString(p),this[l].pathname=p},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"search",{get(){return this[l].search},set(p){p=d.USVString(p),this[l].search=p},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"hash",{get(){return this[l].hash},set(p){p=d.USVString(p),this[l].hash=p},enumerable:!0,configurable:!0}),p.exports={is:p=>!!p&&p[l]instanceof i.implementation,create(p,e){let a=Object.create(t.prototype);return this.setup(a,p,e),a},setup(p,e,a){a||(a={}),a.wrapper=p,p[l]=new i.implementation(e,a),p[l][m.wrapperSymbol]=p},interface:t,expose:{Window:{URL:t},Worker:{URL:t}}}},831:(p,e,a)=>{"use strict";e.URL=a(221).interface,a(24).serializeURL,a(24).serializeURLOrigin,a(24).basicURLParse,a(24).setTheUsername,a(24).setThePassword,a(24).serializeHost,a(24).serializeInteger,a(24).parseURL},24:(p,e,a)=>{"use strict";const d=a(477),m=a(658),i={ftp:21,file:null,gopher:70,http:80,https:443,ws:80,wss:443},l=Symbol("failure");function t(p){return d.ucs2.decode(p).length}function s(p,e){const a=p[e];return isNaN(a)?void 0:String.fromCodePoint(a)}function r(p){return p>=48&&p<=57}function o(p){return p>=65&&p<=90||p>=97&&p<=122}function n(p){return r(p)||p>=65&&p<=70||p>=97&&p<=102}function u(p){return"."===p||"%2e"===p.toLowerCase()}function v(p){return 2===p.length&&o(p.codePointAt(0))&&(":"===p[1]||"|"===p[1])}function c(p){return void 0!==i[p]}function h(p){return c(p.scheme)}function w(p){let e=p.toString(16).toUpperCase();return 1===e.length&&(e="0"+e),"%"+e}function f(p){return p<=31||p>126}const _=new Set([32,34,35,60,62,63,96,123,125]);function y(p){return f(p)||_.has(p)}const N=new Set([47,58,59,61,64,91,92,93,94,124]);function g(p){return y(p)||N.has(p)}function V(p,e){const a=String.fromCodePoint(p);return e(p)?function(p){const e=new Buffer(p);let a="";for(let p=0;p<e.length;++p)a+=w(e[p]);return a}(a):a}function b(p){let e=10;return p.length>=2&&"0"===p.charAt(0)&&"x"===p.charAt(1).toLowerCase()?(p=p.substring(2),e=16):p.length>=2&&"0"===p.charAt(0)&&(p=p.substring(1),e=8),""===p?0:(10===e?/[^0-9]/:16===e?/[^0-9A-Fa-f]/:/[^0-7]/).test(p)?l:parseInt(p,e)}function D(p,e){if("["===p[0])return"]"!==p[p.length-1]?l:function(p){const e=[0,0,0,0,0,0,0,0];let a=0,m=null,i=0;if(58===(p=d.ucs2.decode(p))[i]){if(58!==p[i+1])return l;i+=2,++a,m=a}for(;i<p.length;){if(8===a)return l;if(58===p[i]){if(null!==m)return l;++i,++a,m=a;continue}let d=0,t=0;for(;t<4&&n(p[i]);)d=16*d+parseInt(s(p,i),16),++i,++t;if(46===p[i]){if(0===t)return l;if(i-=t,a>6)return l;let d=0;for(;void 0!==p[i];){let m=null;if(d>0){if(!(46===p[i]&&d<4))return l;++i}if(!r(p[i]))return l;for(;r(p[i]);){const e=parseInt(s(p,i));if(null===m)m=e;else{if(0===m)return l;m=10*m+e}if(m>255)return l;++i}e[a]=256*e[a]+m,++d,2!==d&&4!==d||++a}if(4!==d)return l;break}if(58===p[i]){if(++i,void 0===p[i])return l}else if(void 0!==p[i])return l;e[a]=d,++a}if(null!==m){let p=a-m;for(a=7;0!==a&&p>0;){const d=e[m+p-1];e[m+p-1]=e[a],e[a]=d,--a,--p}}else if(null===m&&8!==a)return l;return e}(p.substring(1,p.length-1));if(!e)return function(p){if(-1!==p.search(/\u0000|\u0009|\u000A|\u000D|\u0020|#|\/|:|\?|@|\[|\\|\]/))return l;let e="";const a=d.ucs2.decode(p);for(let p=0;p<a.length;++p)e+=V(a[p],f);return e}(p);const a=function(p){const e=new Buffer(p),a=[];for(let p=0;p<e.length;++p)37!==e[p]?a.push(e[p]):37===e[p]&&n(e[p+1])&&n(e[p+2])?(a.push(parseInt(e.slice(p+1,p+3).toString(),16)),p+=2):a.push(e[p]);return new Buffer(a).toString()}(p),i=m.toASCII(a,!1,m.PROCESSING_OPTIONS.NONTRANSITIONAL,!1);if(null===i)return l;if(-1!==i.search(/\u0000|\u0009|\u000A|\u000D|\u0020|#|%|\/|:|\?|@|\[|\\|\]/))return l;const t=function(p){const e=p.split(".");if(""===e[e.length-1]&&e.length>1&&e.pop(),e.length>4)return p;const a=[];for(const d of e){if(""===d)return p;const e=b(d);if(e===l)return p;a.push(e)}for(let p=0;p<a.length-1;++p)if(a[p]>255)return l;if(a[a.length-1]>=Math.pow(256,5-a.length))return l;let d=a.pop(),m=0;for(const p of a)d+=p*Math.pow(256,3-m),++m;return d}(i);return"number"==typeof t||t===l?t:i}function S(p){return"number"==typeof p?function(p){let e="",a=p;for(let p=1;p<=4;++p)e=String(a%256)+e,4!==p&&(e="."+e),a=Math.floor(a/256);return e}(p):p instanceof Array?"["+function(p){let e="";const a=function(p){let e=null,a=1,d=null,m=0;for(let i=0;i<p.length;++i)0!==p[i]?(m>a&&(e=d,a=m),d=null,m=0):(null===d&&(d=i),++m);return m>a&&(e=d,a=m),{idx:e,len:a}}(p).idx;let d=!1;for(let m=0;m<=7;++m)d&&0===p[m]||(d&&(d=!1),a!==m?(e+=p[m].toString(16),7!==m&&(e+=":")):(e+=0===m?"::":":",d=!0));return e}(p)+"]":p}function T(p){const e=p.path;var a;0!==e.length&&("file"===p.scheme&&1===e.length&&(a=e[0],/^[A-Za-z]:$/.test(a))||e.pop())}function A(p){return""!==p.username||""!==p.password}function E(p,e,a,m,i){if(this.pointer=0,this.input=p,this.base=e||null,this.encodingOverride=a||"utf-8",this.stateOverride=i,this.url=m,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 p=function(p){return p.replace(/^[\u0000-\u001F\u0020]+|[\u0000-\u001F\u0020]+$/g,"")}(this.input);p!==this.input&&(this.parseError=!0),this.input=p}const t=function(p){return p.replace(/\u0009|\u000A|\u000D/g,"")}(this.input);for(t!==this.input&&(this.parseError=!0),this.input=t,this.state=i||"scheme start",this.buffer="",this.atFlag=!1,this.arrFlag=!1,this.passwordTokenSeenFlag=!1,this.input=d.ucs2.decode(this.input);this.pointer<=this.input.length;++this.pointer){const p=this.input[this.pointer],e=isNaN(p)?void 0:String.fromCodePoint(p),a=this["parse "+this.state](p,e);if(!a)break;if(a===l){this.failure=!0;break}}}E.prototype["parse scheme start"]=function(p,e){if(o(p))this.buffer+=e.toLowerCase(),this.state="scheme";else{if(this.stateOverride)return this.parseError=!0,l;this.state="no scheme",--this.pointer}return!0},E.prototype["parse scheme"]=function(p,e){if(function(p){return o(p)||r(p)}(p)||43===p||45===p||46===p)this.buffer+=e.toLowerCase();else if(58===p){if(this.stateOverride){if(h(this.url)&&!c(this.buffer))return!1;if(!h(this.url)&&c(this.buffer))return!1;if((A(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,l;this.buffer="",this.state="no scheme",this.pointer=-1}return!0},E.prototype["parse no scheme"]=function(p){return null===this.base||this.base.cannotBeABaseURL&&35!==p?l:(this.base.cannotBeABaseURL&&35===p?(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)},E.prototype["parse special relative or authority"]=function(p){return 47===p&&47===this.input[this.pointer+1]?(this.state="special authority ignore slashes",++this.pointer):(this.parseError=!0,this.state="relative",--this.pointer),!0},E.prototype["parse path or authority"]=function(p){return 47===p?this.state="authority":(this.state="path",--this.pointer),!0},E.prototype["parse relative"]=function(p){return this.url.scheme=this.base.scheme,isNaN(p)?(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===p?this.state="relative slash":63===p?(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===p?(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===p?(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},E.prototype["parse relative slash"]=function(p){return!h(this.url)||47!==p&&92!==p?47===p?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===p&&(this.parseError=!0),this.state="special authority ignore slashes"),!0},E.prototype["parse special authority slashes"]=function(p){return 47===p&&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},E.prototype["parse special authority ignore slashes"]=function(p){return 47!==p&&92!==p?(this.state="authority",--this.pointer):this.parseError=!0,!0},E.prototype["parse authority"]=function(p,e){if(64===p){this.parseError=!0,this.atFlag&&(this.buffer="%40"+this.buffer),this.atFlag=!0;const p=t(this.buffer);for(let e=0;e<p;++e){const p=this.buffer.codePointAt(e);if(58===p&&!this.passwordTokenSeenFlag){this.passwordTokenSeenFlag=!0;continue}const a=V(p,g);this.passwordTokenSeenFlag?this.url.password+=a:this.url.username+=a}this.buffer=""}else if(isNaN(p)||47===p||63===p||35===p||h(this.url)&&92===p){if(this.atFlag&&""===this.buffer)return this.parseError=!0,l;this.pointer-=t(this.buffer)+1,this.buffer="",this.state="host"}else this.buffer+=e;return!0},E.prototype["parse hostname"]=E.prototype["parse host"]=function(p,e){if(this.stateOverride&&"file"===this.url.scheme)--this.pointer,this.state="file host";else if(58!==p||this.arrFlag)if(isNaN(p)||47===p||63===p||35===p||h(this.url)&&92===p){if(--this.pointer,h(this.url)&&""===this.buffer)return this.parseError=!0,l;if(this.stateOverride&&""===this.buffer&&(A(this.url)||null!==this.url.port))return this.parseError=!0,!1;const p=D(this.buffer,h(this.url));if(p===l)return l;if(this.url.host=p,this.buffer="",this.state="path start",this.stateOverride)return!1}else 91===p?this.arrFlag=!0:93===p&&(this.arrFlag=!1),this.buffer+=e;else{if(""===this.buffer)return this.parseError=!0,l;const p=D(this.buffer,h(this.url));if(p===l)return l;if(this.url.host=p,this.buffer="",this.state="port","hostname"===this.stateOverride)return!1}return!0},E.prototype["parse port"]=function(p,e){if(r(p))this.buffer+=e;else{if(!(isNaN(p)||47===p||63===p||35===p||h(this.url)&&92===p||this.stateOverride))return this.parseError=!0,l;if(""!==this.buffer){const p=parseInt(this.buffer);if(p>Math.pow(2,16)-1)return this.parseError=!0,l;this.url.port=p===(a=this.url.scheme,i[a])?null:p,this.buffer=""}if(this.stateOverride)return!1;this.state="path start",--this.pointer}var a;return!0};const F=new Set([47,92,63,35]);E.prototype["parse file"]=function(p){var e,a;return this.url.scheme="file",47===p||92===p?(92===p&&(this.parseError=!0),this.state="file slash"):null!==this.base&&"file"===this.base.scheme?isNaN(p)?(this.url.host=this.base.host,this.url.path=this.base.path.slice(),this.url.query=this.base.query):63===p?(this.url.host=this.base.host,this.url.path=this.base.path.slice(),this.url.query="",this.state="query"):35===p?(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||(e=p,a=this.input[this.pointer+1],!o(e)||58!==a&&124!==a)||this.input.length-this.pointer-1>=2&&!F.has(this.input[this.pointer+2])?(this.url.host=this.base.host,this.url.path=this.base.path.slice(),T(this.url)):this.parseError=!0,this.state="path",--this.pointer):(this.state="path",--this.pointer),!0},E.prototype["parse file slash"]=function(p){var e;return 47===p||92===p?(92===p&&(this.parseError=!0),this.state="file host"):(null!==this.base&&"file"===this.base.scheme&&(2===(e=this.base.path[0]).length&&o(e.codePointAt(0))&&":"===e[1]?this.url.path.push(this.base.path[0]):this.url.host=this.base.host),this.state="path",--this.pointer),!0},E.prototype["parse file host"]=function(p,e){if(isNaN(p)||47===p||92===p||63===p||35===p)if(--this.pointer,!this.stateOverride&&v(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 p=D(this.buffer,h(this.url));if(p===l)return l;if("localhost"===p&&(p=""),this.url.host=p,this.stateOverride)return!1;this.buffer="",this.state="path start"}else this.buffer+=e;return!0},E.prototype["parse path start"]=function(p){return h(this.url)?(92===p&&(this.parseError=!0),this.state="path",47!==p&&92!==p&&--this.pointer):this.stateOverride||63!==p?this.stateOverride||35!==p?void 0!==p&&(this.state="path",47!==p&&--this.pointer):(this.url.fragment="",this.state="fragment"):(this.url.query="",this.state="query"),!0},E.prototype["parse path"]=function(p){if(isNaN(p)||47===p||h(this.url)&&92===p||!this.stateOverride&&(63===p||35===p)){if(h(this.url)&&92===p&&(this.parseError=!0),".."===(e=(e=this.buffer).toLowerCase())||"%2e."===e||".%2e"===e||"%2e%2e"===e?(T(this.url),47===p||h(this.url)&&92===p||this.url.path.push("")):!u(this.buffer)||47===p||h(this.url)&&92===p?u(this.buffer)||("file"===this.url.scheme&&0===this.url.path.length&&v(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===p||63===p||35===p))for(;this.url.path.length>1&&""===this.url.path[0];)this.parseError=!0,this.url.path.shift();63===p&&(this.url.query="",this.state="query"),35===p&&(this.url.fragment="",this.state="fragment")}else 37!==p||n(this.input[this.pointer+1])&&n(this.input[this.pointer+2])||(this.parseError=!0),this.buffer+=V(p,y);var e;return!0},E.prototype["parse cannot-be-a-base-URL path"]=function(p){return 63===p?(this.url.query="",this.state="query"):35===p?(this.url.fragment="",this.state="fragment"):(isNaN(p)||37===p||(this.parseError=!0),37!==p||n(this.input[this.pointer+1])&&n(this.input[this.pointer+2])||(this.parseError=!0),isNaN(p)||(this.url.path[0]=this.url.path[0]+V(p,f))),!0},E.prototype["parse query"]=function(p,e){if(isNaN(p)||!this.stateOverride&&35===p){h(this.url)&&"ws"!==this.url.scheme&&"wss"!==this.url.scheme||(this.encodingOverride="utf-8");const e=new Buffer(this.buffer);for(let p=0;p<e.length;++p)e[p]<33||e[p]>126||34===e[p]||35===e[p]||60===e[p]||62===e[p]?this.url.query+=w(e[p]):this.url.query+=String.fromCodePoint(e[p]);this.buffer="",35===p&&(this.url.fragment="",this.state="fragment")}else 37!==p||n(this.input[this.pointer+1])&&n(this.input[this.pointer+2])||(this.parseError=!0),this.buffer+=e;return!0},E.prototype["parse fragment"]=function(p){return isNaN(p)||(0===p?this.parseError=!0:(37!==p||n(this.input[this.pointer+1])&&n(this.input[this.pointer+2])||(this.parseError=!0),this.url.fragment+=V(p,f))),!0},p.exports.serializeURL=function(p,e){let a=p.scheme+":";if(null!==p.host?(a+="//",""===p.username&&""===p.password||(a+=p.username,""!==p.password&&(a+=":"+p.password),a+="@"),a+=S(p.host),null!==p.port&&(a+=":"+p.port)):null===p.host&&"file"===p.scheme&&(a+="//"),p.cannotBeABaseURL)a+=p.path[0];else for(const e of p.path)a+="/"+e;return null!==p.query&&(a+="?"+p.query),e||null===p.fragment||(a+="#"+p.fragment),a},p.exports.serializeURLOrigin=function(e){switch(e.scheme){case"blob":try{return p.exports.serializeURLOrigin(p.exports.parseURL(e.path[0]))}catch(p){return"null"}case"ftp":case"gopher":case"http":case"https":case"ws":case"wss":return function(p){let e=p.scheme+"://";return e+=S(p.host),null!==p.port&&(e+=":"+p.port),e}({scheme:e.scheme,host:e.host,port:e.port});case"file":return"file://";default:return"null"}},p.exports.basicURLParse=function(p,e){void 0===e&&(e={});const a=new E(p,e.baseURL,e.encodingOverride,e.url,e.stateOverride);return a.failure?"failure":a.url},p.exports.setTheUsername=function(p,e){p.username="";const a=d.ucs2.decode(e);for(let e=0;e<a.length;++e)p.username+=V(a[e],g)},p.exports.setThePassword=function(p,e){p.password="";const a=d.ucs2.decode(e);for(let e=0;e<a.length;++e)p.password+=V(a[e],g)},p.exports.serializeHost=S,p.exports.cannotHaveAUsernamePasswordPort=function(p){return null===p.host||""===p.host||p.cannotBeABaseURL||"file"===p.scheme},p.exports.serializeInteger=function(p){return String(p)},p.exports.parseURL=function(e,a){return void 0===a&&(a={}),p.exports.basicURLParse(e,{baseURL:a.baseURL,encodingOverride:a.encodingOverride})}},625:p=>{"use strict";p.exports.mixin=function(p,e){const a=Object.getOwnPropertyNames(e);for(let d=0;d<a.length;++d)Object.defineProperty(p,a[d],Object.getOwnPropertyDescriptor(e,a[d]))},p.exports.wrapperSymbol=Symbol("wrapper"),p.exports.implSymbol=Symbol("impl"),p.exports.wrapperForImpl=function(e){return e[p.exports.wrapperSymbol]},p.exports.implForWrapper=function(e){return e[p.exports.implSymbol]}},477:p=>{"use strict";p.exports=require("punycode")},85:(p,e,a)=>{"use strict";a.r(e),a.d(e,{FetchError:()=>v,Headers:()=>O,Request:()=>H,Response:()=>L,default:()=>Y});const d=require("stream"),m=require("http"),i=require("url");var l=a(831);const t=require("https"),s=require("zlib"),r=d.Readable,o=Symbol("buffer"),n=Symbol("type");class u{constructor(){this[n]="";const p=arguments[0],e=arguments[1],a=[];let d=0;if(p){const e=p,m=Number(e.length);for(let p=0;p<m;p++){const m=e[p];let i;i=m instanceof Buffer?m:ArrayBuffer.isView(m)?Buffer.from(m.buffer,m.byteOffset,m.byteLength):m instanceof ArrayBuffer?Buffer.from(m):m instanceof u?m[o]:Buffer.from("string"==typeof m?m:String(m)),d+=i.length,a.push(i)}}this[o]=Buffer.concat(a);let m=e&&void 0!==e.type&&String(e.type).toLowerCase();m&&!/[^\u0020-\u007E]/.test(m)&&(this[n]=m)}get size(){return this[o].length}get type(){return this[n]}text(){return Promise.resolve(this[o].toString())}arrayBuffer(){const p=this[o],e=p.buffer.slice(p.byteOffset,p.byteOffset+p.byteLength);return Promise.resolve(e)}stream(){const p=new r;return p._read=function(){},p.push(this[o]),p.push(null),p}toString(){return"[object Blob]"}slice(){const p=this.size,e=arguments[0],a=arguments[1];let d,m;d=void 0===e?0:e<0?Math.max(p+e,0):Math.min(e,p),m=void 0===a?p:a<0?Math.max(p+a,0):Math.min(a,p);const i=Math.max(m-d,0),l=this[o].slice(d,d+i),t=new u([],{type:arguments[2]});return t[o]=l,t}}function v(p,e,a){Error.call(this,p),this.message=p,this.type=e,a&&(this.code=this.errno=a.code),Error.captureStackTrace(this,this.constructor)}let c;Object.defineProperties(u.prototype,{size:{enumerable:!0},type:{enumerable:!0},slice:{enumerable:!0}}),Object.defineProperty(u.prototype,Symbol.toStringTag,{value:"Blob",writable:!1,enumerable:!1,configurable:!0}),v.prototype=Object.create(Error.prototype),v.prototype.constructor=v,v.prototype.name="FetchError";try{c=require("encoding").convert}catch(p){}const h=Symbol("Body internals"),w=d.PassThrough;function f(p){var e=this,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},m=a.size;let i=void 0===m?0:m;var l=a.timeout;let t=void 0===l?0:l;null==p?p=null:y(p)?p=Buffer.from(p.toString()):N(p)||Buffer.isBuffer(p)||("[object ArrayBuffer]"===Object.prototype.toString.call(p)?p=Buffer.from(p):ArrayBuffer.isView(p)?p=Buffer.from(p.buffer,p.byteOffset,p.byteLength):p instanceof d||(p=Buffer.from(String(p)))),this[h]={body:p,disturbed:!1,error:null},this.size=i,this.timeout=t,p instanceof d&&p.on("error",(function(p){const a="AbortError"===p.name?p:new v(`Invalid response body while trying to fetch ${e.url}: ${p.message}`,"system",p);e[h].error=a}))}function _(){var p=this;if(this[h].disturbed)return f.Promise.reject(new TypeError(`body used already for: ${this.url}`));if(this[h].disturbed=!0,this[h].error)return f.Promise.reject(this[h].error);let e=this.body;if(null===e)return f.Promise.resolve(Buffer.alloc(0));if(N(e)&&(e=e.stream()),Buffer.isBuffer(e))return f.Promise.resolve(e);if(!(e instanceof d))return f.Promise.resolve(Buffer.alloc(0));let a=[],m=0,i=!1;return new f.Promise((function(d,l){let t;p.timeout&&(t=setTimeout((function(){i=!0,l(new v(`Response timeout while trying to fetch ${p.url} (over ${p.timeout}ms)`,"body-timeout"))}),p.timeout)),e.on("error",(function(e){"AbortError"===e.name?(i=!0,l(e)):l(new v(`Invalid response body while trying to fetch ${p.url}: ${e.message}`,"system",e))})),e.on("data",(function(e){if(!i&&null!==e){if(p.size&&m+e.length>p.size)return i=!0,void l(new v(`content size at ${p.url} over limit: ${p.size}`,"max-size"));m+=e.length,a.push(e)}})),e.on("end",(function(){if(!i){clearTimeout(t);try{d(Buffer.concat(a,m))}catch(e){l(new v(`Could not create Buffer from response body for ${p.url}: ${e.message}`,"system",e))}}}))}))}function y(p){return"object"==typeof p&&"function"==typeof p.append&&"function"==typeof p.delete&&"function"==typeof p.get&&"function"==typeof p.getAll&&"function"==typeof p.has&&"function"==typeof p.set&&("URLSearchParams"===p.constructor.name||"[object URLSearchParams]"===Object.prototype.toString.call(p)||"function"==typeof p.sort)}function N(p){return"object"==typeof p&&"function"==typeof p.arrayBuffer&&"string"==typeof p.type&&"function"==typeof p.stream&&"function"==typeof p.constructor&&"string"==typeof p.constructor.name&&/^(Blob|File)$/.test(p.constructor.name)&&/^(Blob|File)$/.test(p[Symbol.toStringTag])}function g(p){let e,a,m=p.body;if(p.bodyUsed)throw new Error("cannot clone body after it is used");return m instanceof d&&"function"!=typeof m.getBoundary&&(e=new w,a=new w,m.pipe(e),m.pipe(a),p[h].body=e,m=a),m}function V(p){return null===p?null:"string"==typeof p?"text/plain;charset=UTF-8":y(p)?"application/x-www-form-urlencoded;charset=UTF-8":N(p)?p.type||null:Buffer.isBuffer(p)||"[object ArrayBuffer]"===Object.prototype.toString.call(p)||ArrayBuffer.isView(p)?null:"function"==typeof p.getBoundary?`multipart/form-data;boundary=${p.getBoundary()}`:p instanceof d?null:"text/plain;charset=UTF-8"}function b(p){const e=p.body;return null===e?0:N(e)?e.size:Buffer.isBuffer(e)?e.length:e&&"function"==typeof e.getLengthSync&&(e._lengthRetrievers&&0==e._lengthRetrievers.length||e.hasKnownLength&&e.hasKnownLength())?e.getLengthSync():null}f.prototype={get body(){return this[h].body},get bodyUsed(){return this[h].disturbed},arrayBuffer(){return _.call(this).then((function(p){return p.buffer.slice(p.byteOffset,p.byteOffset+p.byteLength)}))},blob(){let p=this.headers&&this.headers.get("content-type")||"";return _.call(this).then((function(e){return Object.assign(new u([],{type:p.toLowerCase()}),{[o]:e})}))},json(){var p=this;return _.call(this).then((function(e){try{return JSON.parse(e.toString())}catch(e){return f.Promise.reject(new v(`invalid json response body at ${p.url} reason: ${e.message}`,"invalid-json"))}}))},text(){return _.call(this).then((function(p){return p.toString()}))},buffer(){return _.call(this)},textConverted(){var p=this;return _.call(this).then((function(e){return function(p,e){if("function"!=typeof c)throw new Error("The package `encoding` must be installed to use the textConverted() function");const a=e.get("content-type");let d,m,i="utf-8";return a&&(d=/charset=([^;]*)/i.exec(a)),m=p.slice(0,1024).toString(),!d&&m&&(d=/<meta.+?charset=(['"])(.+?)\1/i.exec(m)),!d&&m&&(d=/<meta[\s]+?http-equiv=(['"])content-type\1[\s]+?content=(['"])(.+?)\2/i.exec(m),d||(d=/<meta[\s]+?content=(['"])(.+?)\1[\s]+?http-equiv=(['"])content-type\3/i.exec(m),d&&d.pop()),d&&(d=/charset=(.*)/i.exec(d.pop()))),!d&&m&&(d=/<\?xml.+?encoding=(['"])(.+?)\1/i.exec(m)),d&&(i=d.pop(),"gb2312"!==i&&"gbk"!==i||(i="gb18030")),c(p,"UTF-8",i).toString()}(e,p.headers)}))}},Object.defineProperties(f.prototype,{body:{enumerable:!0},bodyUsed:{enumerable:!0},arrayBuffer:{enumerable:!0},blob:{enumerable:!0},json:{enumerable:!0},text:{enumerable:!0}}),f.mixIn=function(p){for(const e of Object.getOwnPropertyNames(f.prototype))if(!(e in p)){const a=Object.getOwnPropertyDescriptor(f.prototype,e);Object.defineProperty(p,e,a)}},f.Promise=global.Promise;const D=/[^\^_`a-zA-Z\-0-9!#$%&'*+.|~]/,S=/[^\t\x20-\x7e\x80-\xff]/;function T(p){if(p=`${p}`,D.test(p)||""===p)throw new TypeError(`${p} is not a legal HTTP header name`)}function A(p){if(p=`${p}`,S.test(p))throw new TypeError(`${p} is not a legal HTTP header value`)}function E(p,e){e=e.toLowerCase();for(const a in p)if(a.toLowerCase()===e)return a}const F=Symbol("map");class O{constructor(){let p=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;if(this[F]=Object.create(null),p instanceof O){const e=p.raw(),a=Object.keys(e);for(const p of a)for(const a of e[p])this.append(p,a)}else if(null==p);else{if("object"!=typeof p)throw new TypeError("Provided initializer must be an object");{const e=p[Symbol.iterator];if(null!=e){if("function"!=typeof e)throw new TypeError("Header pairs must be iterable");const a=[];for(const e of p){if("object"!=typeof e||"function"!=typeof e[Symbol.iterator])throw new TypeError("Each header pair must be iterable");a.push(Array.from(e))}for(const p of a){if(2!==p.length)throw new TypeError("Each header pair must be a name/value tuple");this.append(p[0],p[1])}}else for(const e of Object.keys(p)){const a=p[e];this.append(e,a)}}}}get(p){T(p=`${p}`);const e=E(this[F],p);return void 0===e?null:this[F][e].join(", ")}forEach(p){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,a=P(this),d=0;for(;d<a.length;){var m=a[d];const i=m[0],l=m[1];p.call(e,l,i,this),a=P(this),d++}}set(p,e){e=`${e}`,T(p=`${p}`),A(e);const a=E(this[F],p);this[F][void 0!==a?a:p]=[e]}append(p,e){e=`${e}`,T(p=`${p}`),A(e);const a=E(this[F],p);void 0!==a?this[F][a].push(e):this[F][p]=[e]}has(p){return T(p=`${p}`),void 0!==E(this[F],p)}delete(p){T(p=`${p}`);const e=E(this[F],p);void 0!==e&&delete this[F][e]}raw(){return this[F]}keys(){return j(this,"key")}values(){return j(this,"value")}[Symbol.iterator](){return j(this,"key+value")}}function P(p){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"key+value";const a=Object.keys(p[F]).sort();return a.map("key"===e?function(p){return p.toLowerCase()}:"value"===e?function(e){return p[F][e].join(", ")}:function(e){return[e.toLowerCase(),p[F][e].join(", ")]})}O.prototype.entries=O.prototype[Symbol.iterator],Object.defineProperty(O.prototype,Symbol.toStringTag,{value:"Headers",writable:!1,enumerable:!1,configurable:!0}),Object.defineProperties(O.prototype,{get:{enumerable:!0},forEach:{enumerable:!0},set:{enumerable:!0},append:{enumerable:!0},has:{enumerable:!0},delete:{enumerable:!0},keys:{enumerable:!0},values:{enumerable:!0},entries:{enumerable:!0}});const C=Symbol("internal");function j(p,e){const a=Object.create(B);return a[C]={target:p,kind:e,index:0},a}const B=Object.setPrototypeOf({next(){if(!this||Object.getPrototypeOf(this)!==B)throw new TypeError("Value of `this` is not a HeadersIterator");var p=this[C];const e=p.target,a=p.kind,d=p.index,m=P(e,a);return d>=m.length?{value:void 0,done:!0}:(this[C].index=d+1,{value:m[d],done:!1})}},Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]())));function x(p){const e=Object.assign({__proto__:null},p[F]),a=E(p[F],"Host");return void 0!==a&&(e[a]=e[a][0]),e}Object.defineProperty(B,Symbol.toStringTag,{value:"HeadersIterator",writable:!1,enumerable:!1,configurable:!0});const U=Symbol("Response internals"),R=m.STATUS_CODES;class L{constructor(){let p=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};f.call(this,p,e);const a=e.status||200,d=new O(e.headers);if(null!=p&&!d.has("Content-Type")){const e=V(p);e&&d.append("Content-Type",e)}this[U]={url:e.url,status:a,statusText:e.statusText||R[a],headers:d,counter:e.counter}}get url(){return this[U].url||""}get status(){return this[U].status}get ok(){return this[U].status>=200&&this[U].status<300}get redirected(){return this[U].counter>0}get statusText(){return this[U].statusText}get headers(){return this[U].headers}clone(){return new L(g(this),{url:this.url,status:this.status,statusText:this.statusText,headers:this.headers,ok:this.ok,redirected:this.redirected})}}f.mixIn(L.prototype),Object.defineProperties(L.prototype,{url:{enumerable:!0},status:{enumerable:!0},ok:{enumerable:!0},redirected:{enumerable:!0},statusText:{enumerable:!0},headers:{enumerable:!0},clone:{enumerable:!0}}),Object.defineProperty(L.prototype,Symbol.toStringTag,{value:"Response",writable:!1,enumerable:!1,configurable:!0});const $=Symbol("Request internals"),q=i.URL||l.URL,I=i.parse,k=i.format;function z(p){return/^[a-zA-Z][a-zA-Z\d+\-.]*:/.exec(p)&&(p=new q(p).toString()),I(p)}const K="destroy"in d.Readable.prototype;function M(p){return"object"==typeof p&&"object"==typeof p[$]}class H{constructor(p){let e,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};M(p)?e=z(p.url):(e=p&&p.href?z(p.href):z(`${p}`),p={});let d=a.method||p.method||"GET";if(d=d.toUpperCase(),(null!=a.body||M(p)&&null!==p.body)&&("GET"===d||"HEAD"===d))throw new TypeError("Request with GET/HEAD method cannot have body");let m=null!=a.body?a.body:M(p)&&null!==p.body?g(p):null;f.call(this,m,{timeout:a.timeout||p.timeout||0,size:a.size||p.size||0});const i=new O(a.headers||p.headers||{});if(null!=m&&!i.has("Content-Type")){const p=V(m);p&&i.append("Content-Type",p)}let l=M(p)?p.signal:null;if("signal"in a&&(l=a.signal),null!=l&&!function(p){const e=p&&"object"==typeof p&&Object.getPrototypeOf(p);return!(!e||"AbortSignal"!==e.constructor.name)}(l))throw new TypeError("Expected signal to be an instanceof AbortSignal");this[$]={method:d,redirect:a.redirect||p.redirect||"follow",headers:i,parsedURL:e,signal:l},this.follow=void 0!==a.follow?a.follow:void 0!==p.follow?p.follow:20,this.compress=void 0!==a.compress?a.compress:void 0===p.compress||p.compress,this.counter=a.counter||p.counter||0,this.agent=a.agent||p.agent}get method(){return this[$].method}get url(){return k(this[$].parsedURL)}get headers(){return this[$].headers}get redirect(){return this[$].redirect}get signal(){return this[$].signal}clone(){return new H(this)}}function J(p){Error.call(this,p),this.type="aborted",this.message=p,Error.captureStackTrace(this,this.constructor)}f.mixIn(H.prototype),Object.defineProperty(H.prototype,Symbol.toStringTag,{value:"Request",writable:!1,enumerable:!1,configurable:!0}),Object.defineProperties(H.prototype,{method:{enumerable:!0},url:{enumerable:!0},headers:{enumerable:!0},redirect:{enumerable:!0},clone:{enumerable:!0},signal:{enumerable:!0}}),J.prototype=Object.create(Error.prototype),J.prototype.constructor=J,J.prototype.name="AbortError";const G=i.URL||l.URL,W=d.PassThrough;function Z(p,e){if(!Z.Promise)throw new Error("native promise missing, set fetch.Promise to your favorite alternative");return f.Promise=Z.Promise,new Z.Promise((function(a,i){const l=new H(p,e),r=function(p){const e=p[$].parsedURL,a=new O(p[$].headers);if(a.has("Accept")||a.set("Accept","*/*"),!e.protocol||!e.hostname)throw new TypeError("Only absolute URLs are supported");if(!/^https?:$/.test(e.protocol))throw new TypeError("Only HTTP(S) protocols are supported");if(p.signal&&p.body instanceof d.Readable&&!K)throw new Error("Cancellation of streamed requests with AbortSignal is not supported in node < 8");let m=null;if(null==p.body&&/^(POST|PUT)$/i.test(p.method)&&(m="0"),null!=p.body){const e=b(p);"number"==typeof e&&(m=String(e))}m&&a.set("Content-Length",m),a.has("User-Agent")||a.set("User-Agent","node-fetch/1.0 (+https://github.com/bitinn/node-fetch)"),p.compress&&!a.has("Accept-Encoding")&&a.set("Accept-Encoding","gzip,deflate");let i=p.agent;return"function"==typeof i&&(i=i(e)),a.has("Connection")||i||a.set("Connection","close"),Object.assign({},e,{method:p.method,headers:x(a),agent:i})}(l),o=("https:"===r.protocol?t:m).request,n=l.signal;let u=null;const c=function(){let p=new J("The user aborted a request.");i(p),l.body&&l.body instanceof d.Readable&&l.body.destroy(p),u&&u.body&&u.body.emit("error",p)};if(n&&n.aborted)return void c();const h=function(){c(),_()},w=o(r);let f;function _(){w.abort(),n&&n.removeEventListener("abort",h),clearTimeout(f)}n&&n.addEventListener("abort",h),l.timeout&&w.once("socket",(function(p){f=setTimeout((function(){i(new v(`network timeout at: ${l.url}`,"request-timeout")),_()}),l.timeout)})),w.on("error",(function(p){i(new v(`request to ${l.url} failed, reason: ${p.message}`,"system",p)),_()})),w.on("response",(function(p){clearTimeout(f);const e=function(p){const e=new O;for(const a of Object.keys(p))if(!D.test(a))if(Array.isArray(p[a]))for(const d of p[a])S.test(d)||(void 0===e[F][a]?e[F][a]=[d]:e[F][a].push(d));else S.test(p[a])||(e[F][a]=[p[a]]);return e}(p.headers);if(Z.isRedirect(p.statusCode)){const d=e.get("Location");let m=null;try{m=null===d?null:new G(d,l.url).toString()}catch(p){if("manual"!==l.redirect)return i(new v(`uri requested responds with an invalid redirect URL: ${d}`,"invalid-redirect")),void _()}switch(l.redirect){case"error":return i(new v(`uri requested responds with a redirect, redirect mode is set to error: ${l.url}`,"no-redirect")),void _();case"manual":if(null!==m)try{e.set("Location",m)}catch(p){i(p)}break;case"follow":if(null===m)break;if(l.counter>=l.follow)return i(new v(`maximum redirect reached at: ${l.url}`,"max-redirect")),void _();const d={headers:new O(l.headers),follow:l.follow,counter:l.counter+1,agent:l.agent,compress:l.compress,method:l.method,body:l.body,signal:l.signal,timeout:l.timeout,size:l.size};if(!function(p,e){const a=new G(e).hostname,d=new G(p).hostname;return a===d||"."===a[a.length-d.length-1]&&a.endsWith(d)}(l.url,m))for(const p of["authorization","www-authenticate","cookie","cookie2"])d.headers.delete(p);return 303!==p.statusCode&&l.body&&null===b(l)?(i(new v("Cannot follow redirect with body being a readable stream","unsupported-redirect")),void _()):(303!==p.statusCode&&(301!==p.statusCode&&302!==p.statusCode||"POST"!==l.method)||(d.method="GET",d.body=void 0,d.headers.delete("content-length")),a(Z(new H(m,d))),void _())}}p.once("end",(function(){n&&n.removeEventListener("abort",h)}));let d=p.pipe(new W);const m={url:l.url,status:p.statusCode,statusText:p.statusMessage,headers:e,size:l.size,timeout:l.timeout,counter:l.counter},t=e.get("Content-Encoding");if(!l.compress||"HEAD"===l.method||null===t||204===p.statusCode||304===p.statusCode)return u=new L(d,m),void a(u);const r={flush:s.Z_SYNC_FLUSH,finishFlush:s.Z_SYNC_FLUSH};if("gzip"==t||"x-gzip"==t)return d=d.pipe(s.createGunzip(r)),u=new L(d,m),void a(u);if("deflate"!=t&&"x-deflate"!=t){if("br"==t&&"function"==typeof s.createBrotliDecompress)return d=d.pipe(s.createBrotliDecompress()),u=new L(d,m),void a(u);u=new L(d,m),a(u)}else p.pipe(new W).once("data",(function(p){d=8==(15&p[0])?d.pipe(s.createInflate()):d.pipe(s.createInflateRaw()),u=new L(d,m),a(u)}))})),function(p,e){const a=e.body;null===a?p.end():N(a)?a.stream().pipe(p):Buffer.isBuffer(a)?(p.write(a),p.end()):a.pipe(p)}(w,l)}))}Z.isRedirect=function(p){return 301===p||302===p||303===p||307===p||308===p},Z.Promise=global.Promise;const Y=Z},907:p=>{"use strict";p.exports=JSON.parse('[[[0,44],"disallowed_STD3_valid"],[[45,46],"valid"],[[47,47],"disallowed_STD3_valid"],[[48,57],"valid"],[[58,64],"disallowed_STD3_valid"],[[65,65],"mapped",[97]],[[66,66],"mapped",[98]],[[67,67],"mapped",[99]],[[68,68],"mapped",[100]],[[69,69],"mapped",[101]],[[70,70],"mapped",[102]],[[71,71],"mapped",[103]],[[72,72],"mapped",[104]],[[73,73],"mapped",[105]],[[74,74],"mapped",[106]],[[75,75],"mapped",[107]],[[76,76],"mapped",[108]],[[77,77],"mapped",[109]],[[78,78],"mapped",[110]],[[79,79],"mapped",[111]],[[80,80],"mapped",[112]],[[81,81],"mapped",[113]],[[82,82],"mapped",[114]],[[83,83],"mapped",[115]],[[84,84],"mapped",[116]],[[85,85],"mapped",[117]],[[86,86],"mapped",[118]],[[87,87],"mapped",[119]],[[88,88],"mapped",[120]],[[89,89],"mapped",[121]],[[90,90],"mapped",[122]],[[91,96],"disallowed_STD3_valid"],[[97,122],"valid"],[[123,127],"disallowed_STD3_valid"],[[128,159],"disallowed"],[[160,160],"disallowed_STD3_mapped",[32]],[[161,167],"valid",[],"NV8"],[[168,168],"disallowed_STD3_mapped",[32,776]],[[169,169],"valid",[],"NV8"],[[170,170],"mapped",[97]],[[171,172],"valid",[],"NV8"],[[173,173],"ignored"],[[174,174],"valid",[],"NV8"],[[175,175],"disallowed_STD3_mapped",[32,772]],[[176,177],"valid",[],"NV8"],[[178,178],"mapped",[50]],[[179,179],"mapped",[51]],[[180,180],"disallowed_STD3_mapped",[32,769]],[[181,181],"mapped",[956]],[[182,182],"valid",[],"NV8"],[[183,183],"valid"],[[184,184],"disallowed_STD3_mapped",[32,807]],[[185,185],"mapped",[49]],[[186,186],"mapped",[111]],[[187,187],"valid",[],"NV8"],[[188,188],"mapped",[49,8260,52]],[[189,189],"mapped",[49,8260,50]],[[190,190],"mapped",[51,8260,52]],[[191,191],"valid",[],"NV8"],[[192,192],"mapped",[224]],[[193,193],"mapped",[225]],[[194,194],"mapped",[226]],[[195,195],"mapped",[227]],[[196,196],"mapped",[228]],[[197,197],"mapped",[229