mphttpx 1.2.0-beta.1 → 1.2.0-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/dist/cjs/AbortControllerP.js +31 -0
  2. package/dist/cjs/AbortSignalP.js +126 -0
  3. package/dist/cjs/BlobP.js +131 -0
  4. package/dist/cjs/BodyImpl.js +142 -0
  5. package/dist/cjs/CloseEventP.js +38 -0
  6. package/dist/cjs/CustomEventP.js +35 -0
  7. package/dist/cjs/EventP.js +173 -0
  8. package/dist/cjs/EventTargetP.js +176 -0
  9. package/dist/cjs/FileP.js +36 -0
  10. package/dist/cjs/FileReaderP.js +151 -0
  11. package/dist/cjs/FormDataP.js +250 -0
  12. package/dist/cjs/HeadersP.js +176 -0
  13. package/dist/cjs/MessageEventP.js +64 -0
  14. package/dist/cjs/ProgressEventP.js +69 -0
  15. package/dist/cjs/RequestP.js +158 -0
  16. package/dist/cjs/ResponseP.js +102 -0
  17. package/dist/cjs/TextDecoderP.js +186 -0
  18. package/dist/cjs/TextEncoderP.js +122 -0
  19. package/dist/cjs/URLSearchParamsP.js +230 -0
  20. package/dist/cjs/WebSocketP.js +238 -0
  21. package/dist/cjs/XMLHttpRequestP.js +567 -0
  22. package/dist/cjs/convertor.js +83 -0
  23. package/dist/cjs/fetchP.js +115 -0
  24. package/dist/cjs/index.js +80 -0
  25. package/dist/cjs/isPolyfill.js +56 -0
  26. package/dist/cjs/platform.js +33 -0
  27. package/dist/esm/AbortControllerP.js +28 -0
  28. package/dist/esm/AbortSignalP.js +121 -0
  29. package/dist/esm/BlobP.js +124 -0
  30. package/dist/esm/BodyImpl.js +137 -0
  31. package/dist/esm/CloseEventP.js +35 -0
  32. package/dist/esm/CustomEventP.js +32 -0
  33. package/dist/esm/EventP.js +165 -0
  34. package/dist/esm/EventTargetP.js +168 -0
  35. package/dist/esm/FileP.js +33 -0
  36. package/dist/esm/FileReaderP.js +148 -0
  37. package/dist/esm/FormDataP.js +245 -0
  38. package/dist/esm/HeadersP.js +170 -0
  39. package/dist/esm/MessageEventP.js +61 -0
  40. package/dist/esm/ProgressEventP.js +65 -0
  41. package/dist/esm/RequestP.js +153 -0
  42. package/dist/esm/ResponseP.js +98 -0
  43. package/dist/esm/TextDecoderP.js +183 -0
  44. package/dist/esm/TextEncoderP.js +119 -0
  45. package/dist/esm/URLSearchParamsP.js +227 -0
  46. package/dist/esm/WebSocketP.js +234 -0
  47. package/dist/esm/XMLHttpRequestP.js +563 -0
  48. package/dist/esm/convertor.js +80 -0
  49. package/dist/esm/fetchP.js +111 -0
  50. package/dist/esm/index.js +25 -0
  51. package/dist/esm/isPolyfill.js +48 -0
  52. package/dist/esm/platform.js +31 -0
  53. package/dist/index.d.ts +1 -5
  54. package/package.json +7 -10
  55. package/dist/index.cjs.js +0 -3252
  56. package/dist/index.cjs.min.js +0 -1
  57. package/dist/index.esm.js +0 -3212
  58. package/dist/index.esm.min.js +0 -1
@@ -1 +0,0 @@
1
- "use strict";const t="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||"undefined"!=typeof global&&global||{},e="MPHTTPX";function r(t,e,r,o){if(t.length<e)throw new TypeError(`Failed to ${o?"execute '"+o+"' on":"construct"} '${r}': ${e} argument${e>1?"s":""} required, but only ${t.length} present.`)}class o extends Error{constructor(t,e){super(t),this.name="Error",e&&(this.name=e)}}function n(t,e){return Object.prototype.toString.call(e)===`[object ${t}]`}function s(t,r,o=!1){return!!r&&"object"==typeof r&&"isPolyfill"in r&&!!r.isPolyfill&&"object"==typeof r.isPolyfill&&"symbol"in r.isPolyfill&&r.isPolyfill.symbol===e&&"hierarchy"in r.isPolyfill&&Array.isArray(r.isPolyfill.hierarchy)&&(n=r.isPolyfill.hierarchy.indexOf(t),o?0===n:n>-1);var n}function i(t){return n("ArrayBuffer",t)||!!t&&"object"==typeof t&&ArrayBuffer.prototype.isPrototypeOf(t)}class a{get encoding(){return"utf-8"}encode(t=""){return l(""+t).encoded}encodeInto(...t){const[e,o]=t;r(t,2,"TextEncoder","encodeInto");let s=""+e;if(!(o instanceof Uint8Array||n("Uint8Array",o)))throw new TypeError("Failed to execute 'encodeInto' on 'TextEncoder': parameter 2 is not of type 'Uint8Array'.");let i=l(s,o);return{read:i.read,written:i.written}}toString(){return"[object TextEncoder]"}get[Symbol.toStringTag](){return"TextEncoder"}get isPolyfill(){return{symbol:e,hierarchy:["TextEncoder"]}}}function l(t,e){const r=void 0!==e;let o=0,n=0,s=t.length,i=0,a=Math.max(32,s+(s>>1)+7),l=r?e:new Uint8Array(a>>3<<3);for(;o<s;){let e,u=t.charCodeAt(o),c=1;if(u>=55296&&u<=56319)if(o+1<s){let e=t.charCodeAt(o+1);56320==(64512&e)?(c=2,o+=2,u=((1023&u)<<10)+(1023&e)+65536):(o+=1,u=65533)}else o+=1,u=65533;else u>=56320&&u<=57343?(o+=1,u=65533):o+=1;if(!r&&i+4>l.length){a+=8,a*=1+o/t.length*2,a=a>>3<<3;let e=new Uint8Array(a);e.set(l),l=e}if(4294967168&u?4294965248&u?4294901760&u?4292870144&u?(u=65533,e=3):e=4:e=3:e=2:e=1,r&&i+e>l.length)break;switch(e){case 1:l[i++]=u;break;case 2:l[i++]=u>>6&31|192,l[i++]=63&u|128;break;case 3:l[i++]=u>>12&15|224,l[i++]=u>>6&63|128,l[i++]=63&u|128;break;case 4:l[i++]=u>>18&7|240,l[i++]=u>>12&63|128,l[i++]=u>>6&63|128,l[i++]=63&u|128}n+=c}return{encoded:r?e:l.slice(0,i),read:n,written:i}}const u=t.TextEncoder||a;var c,h;const d=Symbol();class p{constructor(t="utf-8",{fatal:e=!1,ignoreBOM:r=!1}={}){let o=""+t;if(-1===["utf-8","utf8","unicode-1-1-utf-8"].indexOf(o.toLowerCase()))throw new RangeError(`Failed to construct 'TextDecoder': encoding ('${o}') not implemented.`);this[d]=new f,this[d].fatal=!!e,this[d].ignoreBOM=!!r}get encoding(){return"utf-8"}get fatal(){return this[d].fatal}get ignoreBOM(){return this[d].ignoreBOM}decode(t,{stream:e=!1}={}){const r=this[d];let o;if(void 0===t){if(r[y].length>0&&this.fatal)throw r[y]=[],new TypeError("TextDecoder: Incomplete UTF-8 sequence.");return""}if(i(t))o=new Uint8Array(t);else if(t instanceof Uint8Array||n("Uint8Array",t))o=t;else{if(!ArrayBuffer.isView(t))throw new TypeError("Failed to execute 'decode' on 'TextDecoder': parameter 1 is not of type 'ArrayBuffer'.");o=new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}if(r[g]<3&&(r[g]+=o.length,o.length>=3&&239===o[0]&&187===o[1]&&191===o[2]&&(o=o.subarray(3))),r[y].length>0){let t=new Uint8Array(r[y].length+o.length);t.set(r[y],0),t.set(o,r[y].length),o=t,r[y]=[]}let s=o.length,a=[];if(e&&o.length>0){let t=o.length;for(;t>0&&t>o.length-4;){let e=o[t-1];if(128!=(192&e)){b(e)>o.length-(t-1)&&(s=t-1);break}t--}r[y]=Array.from(o.slice(s)),o=o.slice(0,s)}let l=0;for(;l<s;){let t=null,e=o[l],n=b(e);if(l+n<=s){let r,s,i,a;switch(n){case 1:e<128&&(t=e);break;case 2:r=o[l+1],128==(192&r)&&(a=(31&e)<<6|63&r,a>127&&(t=a));break;case 3:r=o[l+1],s=o[l+2],128==(192&r)&&128==(192&s)&&(a=(15&e)<<12|(63&r)<<6|63&s,a>2047&&(a<55296||a>57343)&&(t=a));break;case 4:r=o[l+1],s=o[l+2],i=o[l+3],128==(192&r)&&128==(192&s)&&128==(192&i)&&(a=(15&e)<<18|(63&r)<<12|(63&s)<<6|63&i,a>65535&&a<1114112&&(t=a))}}if(null===t){if(this.fatal)throw r[y]=[],new TypeError("TextDecoder.decode: Decoding failed.");let t=1;for(;l+t<s&&128==(192&o[l+t]);)t+=1;a.push(65533),l+=t;continue}t>65535&&(t-=65536,a.push(t>>>10&1023|55296),t=56320|1023&t),a.push(t),l+=n}return a.length>16384?m(a):v(a)}toString(){return"[object TextDecoder]"}get[Symbol.toStringTag](){return"TextDecoder"}get isPolyfill(){return{symbol:e,hierarchy:["TextDecoder"]}}}const g=Symbol(),y=Symbol();class f{constructor(){this.fatal=!1,this.ignoreBOM=!1,this[c]=0,this[h]=[]}}function b(t){return t>239?4:t>223?3:t>191?2:1}c=g,h=y;const m=t=>{let e=[];for(let r=0,o=t.length;r<o;r+=4096)e.push(String.fromCharCode.apply(String,t.slice(r,r+4096)));return e.join("")},v=t=>{let e="";for(let r=0,o=t.length;r<o;r+=4096)e+=String.fromCharCode.apply(String,t.slice(r,r+4096));return e},S=t.TextDecoder||p,T=Symbol();class E{constructor(t=[],e){if(!(Array.isArray(t)||t&&"object"==typeof t&&Symbol.iterator in t))throw new TypeError("Failed to construct 'Blob/File': The provided value cannot be converted to a sequence.");let r=Array.isArray(t)?t:Array.from(t),o=[];for(let t=0;t<r.length;++t){let e=r[t];s("Blob",e)?o.push(e[T][w]):i(e)||ArrayBuffer.isView(e)?o.push(A(e)):o.push(C(""+e))}this[T]=new x(function(t){let e=t.reduce((t,e)=>t+e.byteLength,0),r=new Uint8Array(e);return t.reduce((t,e)=>(r.set(e,t),t+e.byteLength),0),r}(o));const n=this[T];n.size=n[w].length;let a=""+((null==e?void 0:e.type)||"");n.type=/[^\u0020-\u007E]/.test(a)?"":a.toLowerCase()}get size(){return this[T].size}get type(){return this[T].type}arrayBuffer(){return Promise.resolve(P(this[T][w].buffer).buffer)}bytes(){return Promise.resolve(P(this[T][w].buffer))}slice(t,e,r){let o=this[T][w].slice(null!=t?t:0,null!=e?e:this[T][w].length);return new E([o],{type:""+(null!=r?r:"")})}stream(){throw new TypeError("Failed to execute 'stream' on 'Blob': method not implemented.")}text(){return Promise.resolve(q(this[T][w]))}toString(){return"[object Blob]"}get[Symbol.toStringTag](){return"Blob"}get isPolyfill(){return{symbol:e,hierarchy:["Blob"]}}}const w=Symbol();class x{constructor(t){this.size=0,this.type="",this[w]=t}}function R(t){return t[T][w]}function A(t){return i(t)?new Uint8Array(t):new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}function P(t){let e=A(t),r=new Uint8Array(new ArrayBuffer(e.byteLength));return r.set(e),r}function C(t){return(new a).encode(t)}function q(t){return(new p).decode(t)}function L(t){let e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",r=[];for(var o=0;o<t.length;o+=3){let n=t[o],s=o+1<t.length,i=s?t[o+1]:0,a=o+2<t.length,l=a?t[o+2]:0,u=n>>2,c=(3&n)<<4|i>>4,h=(15&i)<<2|l>>6,d=63&l;a||(d=64,s||(h=64)),r.push(e[u],e[c],e[h],e[d])}return r.join("")}const F=t.Blob||E,O=Symbol();class j extends E{constructor(...t){const[e,o,n]=t;r(t,2,"File"),super(e,n),this[O]=new H,this[O].lastModified=+((null==n?void 0:n.lastModified)?new Date(n.lastModified):new Date)||0,this[O].name=""+o}get lastModified(){return this[O].lastModified}get name(){return this[O].name}get webkitRelativePath(){return""}toString(){return"[object File]"}get[Symbol.toStringTag](){return"File"}get isPolyfill(){return{symbol:e,hierarchy:["File","Blob"]}}}class H{constructor(){this.lastModified=0,this.name=""}}const M=t.Blob?t.File:j;var U,N,D,B,k;const I=Symbol();class ${static get NONE(){return 0}static get CAPTURING_PHASE(){return 1}static get AT_TARGET(){return 2}static get BUBBLING_PHASE(){return 3}constructor(...t){const[e,o]=t;r(t,1,new.target.name),this[I]=new J;const n=this[I];n.type=""+e,n.bubbles=!!(null==o?void 0:o.bubbles),n.cancelable=!!(null==o?void 0:o.cancelable),n.composed=!!(null==o?void 0:o.composed),Object.defineProperty(this,"isTrusted",{enumerable:!0,get:function(){return this[I][G]}.bind(this)})}get type(){return this[I].type}get bubbles(){return this[I].bubbles}get cancelable(){return this[I].cancelable}get composed(){return this[I].composed}get target(){return this[I].target}get currentTarget(){return this[I].currentTarget}get eventPhase(){return this[I].eventPhase}get NONE(){return 0}get CAPTURING_PHASE(){return 1}get AT_TARGET(){return 2}get BUBBLING_PHASE(){return 3}get srcElement(){return this[I].target}get cancelBubble(){return this[I].cancelBubble}set cancelBubble(t){this[I].cancelBubble=!!t}get defaultPrevented(){return this[I].defaultPrevented}get returnValue(){return this[I].returnValue}set returnValue(t){t||this.preventDefault()}get timeStamp(){return this[I].timeStamp}composedPath(){let t=this.target?[this.target]:[];return this.currentTarget&&this.currentTarget!==this.target&&t.push(this.currentTarget),t}initEvent(...t){const[e,o,n]=t;r(t,1,"Event","initEvent");const s=this[I];s[z]||(s.type=""+e,s.bubbles=!!o,s.cancelable=!!n)}preventDefault(){const t=this[I];t[_]?console.warn(`Ignoring 'preventDefault()' call on event of type '${this.type}' from a listener registered as 'passive'.`):this.cancelable&&(t[V]=!0,t.defaultPrevented=!0,t.returnValue=!1)}stopImmediatePropagation(){this[I][W]=!0,this.cancelBubble=!0}stopPropagation(){this.cancelBubble=!0}toString(){return"[object Event]"}get[Symbol.toStringTag](){return"Event"}get isPolyfill(){return{symbol:e,hierarchy:["Event"]}}}const X=(new Date).getTime(),G=Symbol(),_=Symbol(),z=Symbol(),V=Symbol(),W=Symbol();class J{constructor(){this.type="",this.bubbles=!1,this.cancelable=!1,this.composed=!1,this.target=null,this.currentTarget=null,this.eventPhase=0,this.cancelBubble=!1,this.defaultPrevented=!1,this.returnValue=!0,this.timeStamp=(new Date).getTime()-X,this[U]=!1,this[N]=!1,this[D]=!1,this[B]=!1,this[k]=!1}}function Y(t,e){Object.defineProperty(t[I],G,{value:e,writable:!0,enumerable:!0,configurable:!0})}U=G,N=_,D=z,B=V,k=W;function K(t,e){const r=t[I];switch(e){case 0:return r[_];case 1:return r[z];case 2:return r[V];case 3:return r[W]}}function Q(t,e,r){const o=t[I];switch(e){case 0:o[_]=r;break;case 1:o[z]=r;break;case 2:o[V]=r;break;case 3:o[W]=r}}function Z(t,e,r,o=!0){let n=new $(e,r);return n[I].target=t,n[I][G]=o,n}const et=t.EventTarget?t.Event:$;var rt;const ot=Symbol();class nt{constructor(){this[ot]=new it(this),this[ot].name=new.target.name}addEventListener(...t){const[e,o,n]=t;if(r(t,2,this[ot].name,"addEventListener"),"function"!=typeof o&&"object"!=typeof o&&void 0!==o)throw new TypeError(`Failed to execute 'addEventListener' on '${this[ot].name}': parameter 2 is not of type 'Object'.`);const i=this[ot],a=new lt(e,o);if(a.options.capture="boolean"==typeof n?n:!!(null==n?void 0:n.capture),!i[st].some(t=>t.equals(a))){if(n&&"object"==typeof n){const{once:t,passive:e,signal:r}=n;a.options.once=!!t,a.options.passive=!!e,r&&s("EventTarget",r)&&(a.options.signal=r,function(t,e,r){const o=t[ot],n=()=>{o[st]=o[st].filter(t=>!t.equals(r)),e.removeEventListener("abort",n)};e.addEventListener("abort",n)}(this,r,a))}i[st].push(a);const t=t=>t.options.capture?0:1;i[st]=i[st].sort((e,r)=>t(e)-t(r))}}dispatchEvent(...t){const[e]=t;if(r(t,1,this[ot].name,"dispatchEvent"),!(e instanceof $))throw new TypeError(`Failed to execute 'dispatchEvent' on '${this[ot].name}': parameter 1 is not of type 'Event'.`);return Y(e,!1),e[I].target=this,at(this,e)}removeEventListener(...t){const[e,o,n]=t;if(r(t,2,this[ot].name,"removeEventListener"),"function"!=typeof o&&"object"!=typeof o&&void 0!==o)throw new TypeError(`Failed to execute 'removeEventListener' on '${this[ot].name}': parameter 2 is not of type 'Object'.`);const s=this[ot],i=new lt(e,o);i.options.capture="boolean"==typeof n?n:!!(null==n?void 0:n.capture),s[st].some(t=>t.equals(i))&&(s[st]=s[st].filter(t=>!t.equals(i)))}toString(){return"[object EventTarget]"}get[Symbol.toStringTag](){return"EventTarget"}get isPolyfill(){return{symbol:e,hierarchy:["EventTarget"]}}}const st=Symbol();class it{constructor(t){this.name="EventTarget",this[rt]=[],this.target=t}}function at(t,e){const r=t[ot],o=e[I];e.target||(o.target=t),o.currentTarget=t,o.eventPhase=2,Q(e,1,!0);let n=[];for(let o=0;o<r[st].length&&!K(e,3);++o){let s=r[st][o];if(s.type===e.type){s.options.once&&n.push(o),Q(e,0,!!s.options.passive);try{let r=s.callback;"function"==typeof r&&r.call(t,e)}catch(t){console.error(t)}Q(e,0,!1)}}return n.length>0&&(r[st]=r[st].reduce((t,e,r)=>(-1===n.indexOf(r)&&t.push(e),t),[])),o.currentTarget=null,o.eventPhase=0,Q(e,1,!1),!(e.cancelable&&K(e,2))}rt=st;class lt{constructor(t,e){var r;this.options={},this.type=""+t,this.callback="function"==typeof(r=e)?r:function(t){return!!t&&"object"==typeof t&&"handleEvent"in t&&"function"==typeof t.handleEvent}(r)?r.handleEvent:r}equals(t){return Object.is(this.type,t.type)&&Object.is(this.callback,t.callback)&&Object.is(this.options.capture,t.options.capture)}}function ut(t,e,r,o){"function"==typeof r?t.addEventListener(e,o):t.removeEventListener(e,o)}function ct(t,e,r){"function"==typeof e&&e.call(t,r)}const ht=t.EventTarget||nt,dt=Symbol();class pt extends ${constructor(t,e){var r,o;super(t,e),this[dt]=new gt;const n=this[dt];n.lengthComputable=!!(null==e?void 0:e.lengthComputable),n.loaded=Number(null!==(r=null==e?void 0:e.loaded)&&void 0!==r?r:0),n.total=Number(null!==(o=null==e?void 0:e.total)&&void 0!==o?o:0);let s="";if(isNaN(n.loaded)&&(s="loaded"),isNaN(n.total)&&(s="total"),s)throw new TypeError(`Failed to construct 'ProgressEvent': Failed to read the '${s}' property from 'ProgressEventInit': The provided double value is non-finite.`)}get lengthComputable(){return yt(this[dt].lengthComputable)}get loaded(){return yt(this[dt].loaded)}get total(){return yt(this[dt].total)}toString(){return"[object ProgressEvent]"}get[Symbol.toStringTag](){return"ProgressEvent"}get isPolyfill(){return{symbol:e,hierarchy:["ProgressEvent","Event"]}}}class gt{constructor(){this.lengthComputable=!1,this.loaded=0,this.total=0}}function yt(t){return"function"==typeof t?t():t}function ft(t,e,r=0,o=0){let n=function(t,e,{lengthComputable:r=!1,loaded:o=0,total:n=0}={}){let s=new pt(e);return s[dt].lengthComputable=r,s[dt].loaded=o,s[dt].total=n,s[I].target=t,Y(s,!0),s}(t,e,{lengthComputable:()=>yt(o)>0,loaded:r,total:o});at(t,n)}var bt;t.EventTarget&&t.ProgressEvent;const mt=Symbol();class vt extends nt{static get EMPTY(){return 0}static get LOADING(){return 1}static get DONE(){return 2}constructor(){super(),this[mt]=new Tt(this)}get readyState(){return this[mt].readyState}get result(){return this[mt].result}get EMPTY(){return 0}get LOADING(){return 1}get DONE(){return 2}get error(){return this[mt].error}abort(){if(1===this.readyState){const t=this[mt];t.readyState=2,t.result=null,t.error=new o("An ongoing operation was aborted, typically with a call to abort().","AbortError"),ft(this,"abort")}}readAsArrayBuffer(...t){Et(this,"readAsArrayBuffer",t,t=>{this[mt].result=R(t).buffer.slice(0)})}readAsBinaryString(...t){Et(this,"readAsBinaryString",t,t=>{let e=[],r=R(t);for(let t=0;t<r.length;++t){let o=r[t];e.push(String.fromCharCode(o))}this[mt].result=e.join("")})}readAsDataURL(...t){Et(this,"readAsDataURL",t,t=>{this[mt].result="data:"+(t.type||"application/octet-stream")+";base64,"+L(R(t))})}readAsText(...t){const e=t.length>1?t[1]:void 0;Et(this,"readAsText",t,t=>{if(void 0!==e){let t=""+e;-1===["utf-8","utf8","unicode-1-1-utf-8"].indexOf(t.toLowerCase())&&console.error(`TypeError: Failed to execute 'readAsText' on 'FileReader': encoding ('${t}') not implemented.`)}this[mt].result=q(R(t))})}get onabort(){return this[mt].onabort}set onabort(t){this[mt].onabort=t,wt(this,"abort")}get onerror(){return this[mt].onerror}set onerror(t){this[mt].onerror=t,wt(this,"error")}get onload(){return this[mt].onload}set onload(t){this[mt].onload=t,wt(this,"load")}get onloadend(){return this[mt].onloadend}set onloadend(t){this[mt].onloadend=t,wt(this,"loadend")}get onloadstart(){return this[mt].onloadstart}set onloadstart(t){this[mt].onloadstart=t,wt(this,"loadstart")}get onprogress(){return this[mt].onprogress}set onprogress(t){this[mt].onprogress=t,wt(this,"progress")}toString(){return"[object FileReader]"}get[Symbol.toStringTag](){return"FileReader"}get isPolyfill(){return{symbol:e,hierarchy:["FileReader","EventTarget"]}}}const St=Symbol();class Tt{constructor(t){var e;this.readyState=0,this.result=null,this.error=null,this[bt]=(e=this,{onabort:t=>{ct(e.target,e.onabort,t)},onerror:t=>{ct(e.target,e.onerror,t)},onload:t=>{ct(e.target,e.onload,t)},onloadend:t=>{ct(e.target,e.onloadend,t)},onloadstart:t=>{ct(e.target,e.onloadstart,t)},onprogress:t=>{ct(e.target,e.onprogress,t)}}),this.onabort=null,this.onerror=null,this.onload=null,this.onloadend=null,this.onloadstart=null,this.onprogress=null,this.target=t}}function Et(t,e,o,n){const[i]=o;if(r(o,1,"FileReader",e),!s("Blob",i))throw new TypeError("Failed to execute '"+e+"' on 'FileReader': parameter 1 is not of type 'Blob'.");const a=t[mt];a.error=null,a.readyState=1,ft(a.target,"loadstart",0,i.size),setTimeout(()=>{if(1===a.readyState){a.readyState=2;try{n(i),ft(a.target,"load",i.size,i.size)}catch(t){a.result=null,a.error=t,ft(a.target,"error",0,i.size)}}ft(a.target,"loadend",a.result?i.size:0,i.size)})}function wt(t,e){const r=t[mt],o="on"+e;ut(t,e,r[o],r[St][o])}bt=St;const xt=t.Blob?t.FileReader:vt;var Rt;const At=Symbol(),Pt=(t,e,o)=>{r(t,e,"URLSearchParams",o)};class Ct{constructor(t){if(this[At]=new Lt,void 0!==t)if(n("URLSearchParams",t)||s("URLSearchParams",t))t.forEach((t,e)=>{this.append(e,t)},this);else if(t&&"object"==typeof t)if(Array.isArray(t)||Symbol.iterator in t){let e=Array.isArray(t)?t:Array.from(t);for(let t=0;t<e.length;++t){let r=e[t];if(!(Array.isArray(r)||r&&"object"==typeof r&&Symbol.iterator in r))throw new TypeError("Failed to construct 'URLSearchParams': The provided value cannot be converted to a sequence.");{let t=Array.isArray(r)?r:Array.from(r);if(2!==t.length)throw new TypeError("Failed to construct 'URLSearchParams': Sequence initializer must only contain pair elements");this.append(t[0],t[1])}}}else Object.getOwnPropertyNames(t).forEach(e=>{this.append(e,t[e])},this);else{let e=""+t;0===e.indexOf("?")&&(e=e.slice(1));let r=e.split("&");for(let t=0;t<r.length;++t){let e=r[t],o=e.indexOf("=");o>-1?this.append(jt(e.slice(0,o)),jt(e.slice(o+1))):e&&this.append(jt(e),"")}}}get size(){return this[At][qt].length}append(...t){const[e,r]=t;Pt(t,2,"append"),this[At][qt].push([""+e,Ft(r)])}delete(...t){const[e,r]=t;Pt(t,1,"delete");let o=""+e,n=-1,s=this[At][qt],i=[];for(let e=0;e<s.length;++e){let a=s[e];a[0]!==o?i.push(a):(1!==t.length&&a[1]!==Ft(r)&&i.push(a),n=e)}n>-1&&(this[At][qt]=i)}get(...t){const[e]=t;Pt(t,1,"get");let r=""+e,o=this[At][qt];for(let t=0;t<o.length;++t){let e=o[t];if(e[0]===r)return e[1]}return null}getAll(...t){const[e]=t;Pt(t,1,"getAll");let r=""+e,o=this[At][qt],n=[];for(let t=0;t<o.length;++t){let e=o[t];e[0]===r&&n.push(e[1])}return n}has(...t){const[e,r]=t;Pt(t,1,"has");let o=""+e,n=this[At][qt];for(let e=0;e<n.length;++e){let s=n[e];if(s[0]===o){if(1===t.length)return!0;if(s[1]===Ft(r))return!0}}return!1}set(...t){const[e,r]=t;Pt(t,2,"set");let o=""+e,n=Ft(r),s=-1,i=this[At][qt],a=[];for(let t=0;t<i.length;++t){let e=i[t];e[0]!==o?a.push(e):-1===s&&(s=t,a.push([o,n]))}-1===s&&a.push([o,n]),this[At][qt]=a}sort(){this[At][qt].sort((t,e)=>t[0]<e[0]?-1:t[0]>e[0]?1:0)}forEach(...t){const[e,r]=t;if(Pt(t,1,"forEach"),"function"!=typeof e)throw new TypeError("Failed to execute 'forEach' on 'URLSearchParams': parameter 1 is not of type 'Function'.");let o=this[At][qt];for(let t=0;t<o.length;++t){let n=o[t];e.call(r,n[1],n[0],this)}}entries(){return this[At][qt].map(t=>[t[0],t[1]]).values()}keys(){return this[At][qt].map(t=>t[0]).values()}values(){return this[At][qt].map(t=>t[1]).values()}[Symbol.iterator](){return this.entries()}toString(){let t=this[At][qt],e=[];for(let r=0;r<t.length;++r){let o=t[r];e.push(Ot(o[0])+"="+Ot(o[1]))}return e.join("&")}get[Symbol.toStringTag](){return"URLSearchParams"}get isPolyfill(){return{symbol:e,hierarchy:["URLSearchParams"]}}}const qt=Symbol();class Lt{constructor(){this[Rt]=[]}}function Ft(t){return"string"==typeof t?t:null!=t&&"function"==typeof t.toString?t.toString():JSON.stringify(t)}function Ot(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'\(\)~]|%20|%00/g,t=>e[t])}function jt(t){return t.replace(/[ +]/g,"%20").replace(/(%[a-f0-9]{2})+/gi,t=>decodeURIComponent(t))}Rt=qt;const Ht=t.URLSearchParams||Ct;var Mt;const Ut=Symbol(),Nt=(t,e,o)=>{r(t,e,"FormData",o)};class Dt{constructor(t,e){void 0===e?void 0!==t&&console.error("TypeError: Failed to construct 'FormData': parameter 1 not implemented."):null!==e&&console.error("TypeError: Failed to construct 'FormData': parameter 1 and parameter 2 not implemented."),this[Ut]=new kt}append(...t){const[e,r,o]=t;Nt(t,2,"append"),this[Ut][Bt].push(It(e,r,o))}delete(...t){const[e]=t;Nt(t,1,"delete");let r=""+e,o=-1,n=this[Ut][Bt],s=[];for(let t=0;t<n.length;++t){let e=n[t];e[0]!==r?s.push(e):o=t}o>-1&&(this[Ut][Bt]=s)}get(...t){const[e]=t;Nt(t,1,"get");let r=""+e,o=this[Ut][Bt];for(let t=0;t<o.length;++t){let e=o[t];if(e[0]===r)return e[1]}return null}getAll(...t){const[e]=t;Nt(t,1,"getAll");let r=""+e,o=this[Ut][Bt],n=[];for(let t=0;t<o.length;++t){let e=o[t];e[0]===r&&n.push(e[1])}return n}has(...t){const[e]=t;Nt(t,1,"has");let r=""+e,o=this[Ut][Bt];for(let t=0;t<o.length;++t){if(o[t][0]===r)return!0}return!1}set(...t){const[e,r,o]=t;Nt(t,2,"set");let n=""+e,s=It(e,r,o),i=-1,a=this[Ut][Bt],l=[];for(let t=0;t<a.length;++t){let e=a[t];e[0]!==n?l.push(e):-1===i&&(i=t,l.push(s))}-1===i&&l.push(s),this[Ut][Bt]=l}forEach(...t){const[e,r]=t;if(Nt(t,1,"forEach"),"function"!=typeof e)throw new TypeError("Failed to execute 'forEach' on 'FormData': parameter 1 is not of type 'Function'.");let o=this[Ut][Bt];for(let t=0;t<o.length;++t){let n=o[t];e.call(r,n[1],n[0],r)}}entries(){return this[Ut][Bt].map(t=>[t[0],t[1]]).values()}keys(){return this[Ut][Bt].map(t=>t[0]).values()}values(){return this[Ut][Bt].map(t=>t[1]).values()}[Symbol.iterator](){return this.entries()}toString(){return"[object FormData]"}get[Symbol.toStringTag](){return"FormData"}get isPolyfill(){return{symbol:e,hierarchy:["FormData"]}}}const Bt=Symbol();class kt{constructor(){this[Mt]=[]}}function It(t,e,r){return s("Blob",e)?(r=void 0!==r?""+r:"string"==typeof e.name?e.name:"blob",(e.name!==r||n("Blob",e)||s("Blob",e,!0))&&(e=new j([e],r)),[""+t,e]):[""+t,""+e]}function $t(t){return t.replace(/\r?\n|\r/g,"\r\n")}function Xt(t){return t.replace(/\n/g,"%0A").replace(/\r/g,"%0D").replace(/"/g,"%22")}Mt=Bt;const Gt=t.FormData||Dt;var _t,zt;const Vt=Symbol(),Wt=(t,e,o)=>{r(t,e,"Headers",o)};class Jt{constructor(t){if(this[Vt]=new Qt,void 0!==t)if(n("Headers",t)||s("Headers",t))t.forEach((t,e)=>{Zt(this,e,t)},this);else if(Array.isArray(t)||t&&"object"==typeof t&&Symbol.iterator in t){(Array.isArray(t)?t:Array.from(t)).forEach(t=>{if(!(Array.isArray(t)||t&&"object"==typeof t&&Symbol.iterator in t))throw new TypeError("Failed to construct 'Headers': The provided value cannot be converted to a sequence.");{let e=Array.isArray(t)?t:Array.from(t);if(2!==e.length)throw new TypeError("Failed to construct 'Headers': Invalid value");this.append(e[0],e[1])}},this)}else{if(!t||"object"!=typeof t)throw new TypeError("Failed to construct 'Headers': The provided value is not of type '(record<ByteString, ByteString> or sequence<sequence<ByteString>>)'.");Object.getOwnPropertyNames(t).forEach(e=>{this.append(e,t[e])},this)}this[Vt][Yt]=!0}append(...t){const[e,r]=t;Wt(t,2,"append"),Zt(this,ee(e,te(this[Vt][Yt]?"append":"")),re(r))}delete(...t){const[e]=t;Wt(t,1,"delete");let r=ee(e,te("delete"));delete this[Vt][Kt][r]}get(...t){var e;const[r]=t;Wt(t,1,"get");let o=ee(r,te("get"));return null!==(e=this[Vt][Kt][o])&&void 0!==e?e:null}getSetCookie(){let t=this.get("Set-Cookie");return t?t.split(", "):[]}has(...t){const[e]=t;Wt(t,1,"has");let r=ee(e,te("has"));return this[Vt][Kt].hasOwnProperty(r)}set(...t){const[e,r]=t;Wt(t,2,"set");let o=ee(e,te("set")),n=re(r);this[Vt][Kt][o]=n}forEach(...t){const[e,r]=t;if(Wt(t,1,"forEach"),"function"!=typeof e)throw new TypeError("Failed to execute 'forEach' on 'Headers': parameter 1 is not of type 'Function'.");let o=Object.getOwnPropertyNames(this[Vt][Kt]);for(let t=0;t<o.length;++t){let n=o[t];e.call(r,this[Vt][Kt][n],n,this)}}entries(){let t=[];return this.forEach((e,r)=>{t.push([r,e])}),t.values()}keys(){let t=[];return this.forEach((e,r)=>{t.push(r)}),t.values()}values(){let t=[];return this.forEach((e,r)=>{t.push(e)}),t.values()}[Symbol.iterator](){return this.entries()}toString(){return"[object Headers]"}get[Symbol.toStringTag](){return"Headers"}get isPolyfill(){return{symbol:e,hierarchy:["Headers"]}}}const Yt=Symbol(),Kt=Symbol();class Qt{constructor(){this[_t]=!1,this[zt]={}}}function Zt(t,e,r){let o=t[Vt][Kt],n=o[e];o[e]=void 0!==n?`${n}, ${r}`:r}function te(t){return()=>{throw new TypeError(`Failed to ${t?"execute '"+t+"' on":"construct"} 'Headers': Invalid name`)}}function ee(t,e){return"string"!=typeof t&&(t=""+t),e&&(/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(t)||""===t)&&e(),t.toLowerCase()}function re(t){return"string"==typeof t?t:""+t}function oe(t){let e=new Jt;return t.replace(/\r?\n[\t ]+/g," ").split("\r").map(t=>0===t.indexOf("\n")?t.substring(1,t.length):t).forEach(t=>{let r=t.split(":"),o=r.shift().trim();if(o){let t=r.join(":").trim();try{e.append(o,t)}catch(t){console.warn(`SyntaxError: Response.headers: '${o}' is not a valid HTTP header field name.`)}}}),e}_t=Yt,zt=Kt;const ne=t.Headers||Jt;var se;const ie=Symbol();class ae{constructor(){if(new.target===ae)throw new TypeError("Failed to construct 'Body': Illegal constructor");this[ie]=new ue}get body(){if(!this[ie][le])return null;throw new TypeError(`Failed to access 'body' on '${this[ie].name}': property not implemented.`)}get bodyUsed(){return this[ie].bodyUsed}arrayBuffer(){const t="arrayBuffer";return pe(this,t)||de(this,t)}blob(){const t="blob";return pe(this,t)||de(this,t)}bytes(){const t="bytes";return pe(this,t)||de(this,t)}formData(){const t="formData";return pe(this,t)||de(this,t)}json(){const t="json";return pe(this,t)||de(this,t)}text(){const t="text";return pe(this,t)||de(this,t)}toString(){return"[object Body]"}get[Symbol.toStringTag](){return"Body"}get isPolyfill(){return{symbol:e,hierarchy:["Body"]}}}const le=Symbol();class ue{constructor(){this.name="Body",this.bodyUsed=!1,this[se]=""}}function ce(t,e){const r=t;if(n("ReadableStream",e))throw new TypeError(`Failed to construct '${r[ie].name}': ReadableStream not implemented.`);r[ie][le]=ge(e,!0,t=>{r.headers.has("Content-Type")||r.headers.set("Content-Type",t)})}function he(t){return t[ie][le]}function de(t,e){return new Promise((r,o)=>{try{r(function(t,e){const r=t[ie][le];if("arrayBuffer"===e)return ye("arraybuffer",r);if("blob"===e)return ye("blob",r);if("bytes"===e){let t=ye("arraybuffer",r);return new Uint8Array(t)}if("formData"===e){const e=t=>{if(!t)return;if(!/multipart\/form-data/i.test(t))return;let e=t.match(/boundary\s*=\s*([^;]+)/i);if(e&&e[1]){return e[1].trim().replace(/^["']|["']$/g,"")}};return function(t,e){const r=()=>{throw new TypeError("Could not parse content as FormData.")};"string"==typeof t&&""!==t.trim()||r();let o=t.indexOf("\r\n");-1===o&&r();let n=t.substring(2,o).trim();n||r(),void 0!==e&&e!==n&&r();let s=t.split(`--${n}`).filter(t=>{let e=t.trim();return""!==e&&"--"!==e});0===s.length&&r();let i=new Dt;return s.forEach(t=>{let e=t.indexOf("\r\n\r\n");-1===e&&r();let o=t.substring(0,e).trim(),n=o.match(/name="([^"]*)"/);(!n||n.length<2)&&r();let s=n[1],a=o.match(/filename="([^"]*)"/),l=t.substring(e+4);if(a){let t=a[1]||"",e=o.match(/Content-Type: ([^\r\n]+)/),r=e?(e[1]||"").trim():"text/plain",n=l.replace(/\r\n/g,"");i.append(s,new j([n],t,{type:r}))}else i.append(s,l.replace(/^[\r\n]+|[\r\n]+$/g,""))}),i}(ye("text",r),e(t.headers.get("Content-Type"))||"")}return ye("json"===e?"json":"text",r)}(t,e))}catch(t){o(t)}})}function pe(t,e){const r=t[ie];if(r[le])return r.bodyUsed?Promise.reject(new TypeError(`Failed to execute '${e}' on '${r.name}': body stream already read`)):void(r.bodyUsed=!0)}function ge(t,e=!0,r,o){let a;if("string"==typeof t)a=t,r&&r("text/plain;charset=UTF-8");else if(n("URLSearchParams",t)||s("URLSearchParams",t))a=t.toString(),r&&r("application/x-www-form-urlencoded;charset=UTF-8");else if(i(t))a=e?t.slice(0):t;else if(ArrayBuffer.isView(t))a=t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength);else if(s("Blob",t))a=R(t).buffer.slice(0),r&&t.type&&r(t.type);else if(s("FormData",t)){let e=function(t){const e="----formdata-mphttpx-"+Math.random(),r=`--${e}\r\nContent-Disposition: form-data; name="`;let o=[];for(let e=0;e<t[Ut][Bt].length;++e){let n=t[Ut][Bt][e],s=n[0],i=n[1];"string"==typeof i?o.push(r+Xt($t(s))+`"\r\n\r\n${$t(i)}\r\n`):o.push(r+Xt($t(s))+`"; filename="${Xt(i.name)}"\r\nContent-Type: ${i.type||"application/octet-stream"}\r\n\r\n`,i,"\r\n")}return o.push(`--${e}--`),new E(o,{type:"multipart/form-data; boundary="+e})}(t);a=R(e).buffer,r&&r(e.type)}else a=t?""+t:"";if(o){let t=!1,e=0;o(()=>(t||(t=!0,e=("string"==typeof a?C(a).buffer:a).byteLength),e))}return a}function ye(t,e){let r=e?"string"==typeof e||i(e)?e:JSON.stringify(e):"";return t&&"text"!==t?"json"===t?JSON.parse("string"==typeof r?r:q(r)):"arraybuffer"===t?i(r)?r.slice(0):C(r).buffer:"blob"===t?new E([r]):r:"string"==typeof r?r:q(r)}var fe;se=le;const be=Symbol();class me extends nt{static abort(t){let e=Ee();return Te(e,t,!1),e}static any(...t){const[e]=t;if(r(t,1,"AbortSignal","any"),!(Array.isArray(e)||e&&"object"==typeof e&&Symbol.iterator in e))throw new TypeError("Failed to execute 'any' on 'AbortSignal': The provided value cannot be converted to a sequence.");let o=Array.isArray(e)?e:Array.from(e);o.forEach(t=>{if(!s("EventTarget",t))throw new TypeError("Failed to execute 'any' on 'AbortSignal': Failed to convert value to 'AbortSignal'.")});let n=Ee(),i=o.find(t=>t.aborted);if(i)Te(n,i.reason,!1);else{function a(t){for(let t=0;t<o.length;++t){o[t].removeEventListener("abort",a)}Te(n,this.reason,!0,t.isTrusted)}for(let l=0;l<o.length;++l){o[l].addEventListener("abort",a)}}return n}static timeout(...t){const[e]=t;if(r(t,1,"AbortSignal","timeout"),!(e>=0))throw new TypeError("Failed to execute 'timeout' on 'AbortSignal': Value is outside the 'unsigned long long' value range.");let n=Ee();return setTimeout(()=>{Te(n,new o("signal timed out","TimeoutError"))},e),n}constructor(){if(new.target===me)throw new TypeError("Failed to construct 'AbortSignal': Illegal constructor");super(),this[be]=new Se(this)}get aborted(){return this[be].aborted}get reason(){return this[be].reason}throwIfAborted(){if(this.aborted)throw this.reason}get onabort(){return this[be].onabort}set onabort(t){this[be].onabort=t,ut(this,"abort",t,this[be][ve].onabort)}toString(){return"[object AbortSignal]"}get[Symbol.toStringTag](){return"AbortSignal"}get isPolyfill(){return{symbol:e,hierarchy:["AbortSignal","EventTarget"]}}}const ve=Symbol();class Se{constructor(t){var e;this.aborted=!1,this.reason=void 0,this[fe]=(e=this,{onabort:t=>{ct(e.target,e.onabort,t)}}),this.onabort=null,this.target=t}}function Te(t,e,r=!0,n=!0){const s=t[be];if(!s.aborted&&(s.aborted=!0,s.reason=null!=e?e:new o("signal is aborted without reason","AbortError"),r)){at(t,Z(t,"abort",void 0,n))}}function Ee(){let t=Object.create(me.prototype);return t[ot]=new it(t),t[be]=new Se(t),t}fe=ve;const we=t.AbortSignal||me,xe=Symbol();class Re{constructor(){this[xe]=new Ae}get signal(){return this[xe].signal}abort(t){Te(this[xe].signal,t)}toString(){return"[object AbortController]"}get[Symbol.toStringTag](){return"AbortController"}get isPolyfill(){return{symbol:e,hierarchy:["AbortController"]}}}class Ae{constructor(){this.signal=Ee()}}const Pe=t.AbortController||Re,Ce=Symbol();class qe extends ae{constructor(...t){const[e,o]=t;r(t,1,"Request"),super(),this[ie].name="Request",this[Ce]=new Le;const n=this[Ce];let i=null!=o?o:{};if("object"!=typeof i)throw new TypeError("Failed to construct 'Request': The provided value is not of type 'RequestInit'.");let a=i.body;if(s("Request",e)){if(e.bodyUsed)throw new TypeError("Failed to construct 'Request': Cannot construct a Request with a Request object that has already been used.");n.cache=e.cache,n.credentials=e.credentials,i.headers||(n.headers=new Jt(e.headers)),n.method=e.method,n.mode=e.mode;let t=e[Ce].signal;t&&(n.signal=t),n.url=e.url;let r=he(e);a||""===r||(a=r,e[ie].bodyUsed=!0)}else n.url=""+e;if(i.cache&&(n.cache=i.cache),i.credentials&&(n.credentials=i.credentials),i.headers&&(n.headers=new Jt(i.headers)),i.method&&(n.method=Oe(i.method)),i.mode&&(n.mode=i.mode),i.signal&&(n.signal=i.signal),("GET"===this.method||"HEAD"===this.method)&&a)throw new TypeError("Failed to construct 'Request': Request with GET/HEAD method cannot have body.");if(ce(this,a),!("GET"!==this.method&&"HEAD"!==this.method||"no-store"!==i.cache&&"no-cache"!==i.cache)){let t=/([?&])_=[^&]*/;if(t.test(this.url))n.url=this.url.replace(t,"$1_="+(new Date).getTime());else{let t=/\?/;n.url+=(t.test(this.url)?"&":"?")+"_="+(new Date).getTime()}}}get cache(){return this[Ce].cache}get credentials(){return this[Ce].credentials}get destination(){return this[Ce].destination}get headers(){const t=this[Ce];return t.headers||(t.headers=new Jt),t.headers}get integrity(){return this[Ce].integrity}get keepalive(){return this[Ce].keepalive}get method(){return this[Ce].method}get mode(){return this[Ce].mode}get redirect(){return this[Ce].redirect}get referrer(){return this[Ce].referrer}get referrerPolicy(){return this[Ce].referrerPolicy}get signal(){const t=this[Ce];return t.signal||(t.signal=(new Re).signal),t.signal}get url(){return this[Ce].url}clone(){var t;if(this.bodyUsed)throw new TypeError("Failed to execute 'clone' on 'Request': Request body is already used");return new qe(this,{body:null!==(t=he(this))&&void 0!==t?t:null})}toString(){return"[object Request]"}get[Symbol.toStringTag](){return"Request"}get isPolyfill(){return{symbol:e,hierarchy:["Request"]}}}class Le{constructor(){this.cache="default",this.credentials="same-origin",this.destination="",this.integrity="",this.keepalive=!1,this.method="GET",this.mode="cors",this.redirect="follow",this.referrer="about:client",this.referrerPolicy="",this.url=""}}const Fe=["CONNECT","DELETE","GET","HEAD","OPTIONS","PATCH","POST","PUT","TRACE"];function Oe(t){let e=t.toUpperCase();return Fe.indexOf(e)>-1?e:t}const je=t.Request||qe;const He=function(){let e,r="undefined",o="request",n="function";if(e=typeof wx!==r&&typeof(null===wx||void 0===wx?void 0:wx[o])===n&&wx||typeof my!==r&&typeof(null===my||void 0===my?void 0:my[o])===n&&my||typeof qq!==r&&typeof(null===qq||void 0===qq?void 0:qq[o])===n&&qq||typeof jd!==r&&typeof(null===jd||void 0===jd?void 0:jd[o])===n&&jd||typeof swan!==r&&typeof(null===swan||void 0===swan?void 0:swan[o])===n&&swan||typeof tt!==r&&typeof(null===tt||void 0===tt?void 0:tt[o])===n&&tt||typeof ks!==r&&typeof(null===ks||void 0===ks?void 0:ks[o])===n&&ks||typeof qh!==r&&typeof(null===qh||void 0===qh?void 0:qh[o])===n&&qh||typeof xhs!==r&&typeof(null===xhs||void 0===xhs?void 0:xhs[o])===n&&xhs||void 0,typeof t.XMLHttpRequest!==n)return void 0===e&&(e=typeof uni!==r&&typeof(null===uni||void 0===uni?void 0:uni[o])===n&&uni||typeof Taro!==r&&typeof(null===Taro||void 0===Taro?void 0:Taro[o])===n&&Taro||void 0),e}(),Me=He?He.request:function(t){const e="NOT_SUPPORTED_ERR",r={errMsg:e,errno:9,exception:{retryCount:0,reasons:[{errMsg:e,errno:9}]},useHttpDNS:!1};throw Promise.resolve(r).then(e=>{try{t.fail&&t.fail(e)}catch(t){console.error(t)}}).then(()=>{t.complete&&t.complete(r)}),new ReferenceError("request is not defined")};var Ue;const Ne=Symbol();class De extends nt{constructor(){if(new.target===De)throw new TypeError("Failed to construct 'XMLHttpRequestEventTarget': Illegal constructor");super(),this[Ne]=new ke(this)}get onabort(){return this[Ne].onabort}set onabort(t){this[Ne].onabort=t,Ie(this,"abort")}get onerror(){return this[Ne].onerror}set onerror(t){this[Ne].onerror=t,Ie(this,"error")}get onload(){return this[Ne].onload}set onload(t){this[Ne].onload=t,Ie(this,"load")}get onloadend(){return this[Ne].onloadend}set onloadend(t){this[Ne].onloadend=t,Ie(this,"loadend")}get onloadstart(){return this[Ne].onloadstart}set onloadstart(t){this[Ne].onloadstart=t,Ie(this,"loadstart")}get onprogress(){return this[Ne].onprogress}set onprogress(t){this[Ne].onprogress=t,Ie(this,"progress")}get ontimeout(){return this[Ne].ontimeout}set ontimeout(t){this[Ne].ontimeout=t,Ie(this,"timeout")}toString(){return"[object XMLHttpRequestEventTarget]"}get[Symbol.toStringTag](){return"XMLHttpRequestEventTarget"}get isPolyfill(){return{symbol:e,hierarchy:["XMLHttpRequestEventTarget","EventTarget"]}}}const Be=Symbol();class ke{constructor(t){var e;this[Ue]=(e=this,{onabort:t=>{ct(e.target,e.onabort,t)},onerror:t=>{ct(e.target,e.onerror,t)},onload:t=>{ct(e.target,e.onload,t)},onloadend:t=>{ct(e.target,e.onloadend,t)},onloadstart:t=>{ct(e.target,e.onloadstart,t)},onprogress:t=>{ct(e.target,e.onprogress,t)},ontimeout:t=>{ct(e.target,e.ontimeout,t)}}),this.onabort=null,this.onerror=null,this.onload=null,this.onloadend=null,this.onloadstart=null,this.onprogress=null,this.ontimeout=null,this.target=t}}function Ie(t,e){const r=t[Ne],o="on"+e;ut(t,e,r[o],r[Be][o])}Ue=Be;const $e=["","text","json","arraybuffer","blob","document"];const Xe={100:"Continue",101:"Switching Protocols",102:"Processing",103:"Early Hints",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Content Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Too Early",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",510:"Not Extended",511:"Network Authentication Required"};class Ge extends De{constructor(){if(new.target===Ge)throw new TypeError("Failed to construct 'XMLHttpRequestUpload': Illegal constructor");super()}toString(){return"[object XMLHttpRequestUpload]"}get[Symbol.toStringTag](){return"XMLHttpRequestUpload"}get isPolyfill(){return{symbol:e,hierarchy:["XMLHttpRequestUpload","XMLHttpRequestEventTarget","EventTarget"]}}}var _e,ze,Ve,We,Je,Ye,Ke,Qe,Ze,tr;const er={request:Me},rr=Symbol();class or extends De{static get UNSENT(){return 0}static get OPENED(){return 1}static get HEADERS_RECEIVED(){return 2}static get LOADING(){return 3}static get DONE(){return 4}constructor(){super(),this[rr]=new gr(this)}get UNSENT(){return 0}get OPENED(){return 1}get HEADERS_RECEIVED(){return 2}get LOADING(){return 3}get DONE(){return 4}get readyState(){return this[rr].readyState}get response(){return this[rr].response}get responseText(){return this.responseType&&"text"!==this.responseType?"":this.response}get responseType(){return this[rr].responseType}set responseType(t){var e;this[rr].responseType=(e=t,$e.indexOf(e)>-1?e:"")}get responseURL(){return this[rr].responseURL}get responseXML(){return null}get status(){return this[rr].status}get statusText(){return 0===this.readyState||1===this.readyState?"":this[rr].statusText||(t=this.status,Xe[t]||"unknown");var t}get timeout(){return this[rr].timeout}set timeout(t){this[rr].timeout=t>0?t:0}get upload(){const t=this[rr];return t.upload||(t.upload=function(){let t=Object.create(Ge.prototype);return t[ot]=new it(t),t[Ne]=new ke(t),t}()),t.upload}get withCredentials(){return this[rr].withCredentials}set withCredentials(t){this[rr].withCredentials=!!t}abort(){Sr(this)}getAllResponseHeaders(){const t=this[rr][hr];if(!t)return"";let e=[];return t.forEach((t,r)=>{e.push(`${r}: ${t}\r\n`)}),e.join("")}getResponseHeader(...t){const[e]=t;return r(t,1,"XMLHttpRequest","getResponseHeader"),this[rr][hr]?this[rr][hr].get(e):null}open(...t){const[e,o,n=!0,s=null,i=null]=t;r(t,2,"XMLHttpRequest","open"),n||console.warn("Synchronous XMLHttpRequest is not supported because of its detrimental effects to the end user's experience.");const a=this[rr];if(Sr(this,!1),a[ur]=Oe(e),a[lr]=""+o,null!==s||null!==i){let t=""+(null!=s?s:""),e=""+(null!=i?i:"");if(t.length>0||e.length>0){let r=`Basic ${L(C(t+":"+e))}`;this.setRequestHeader("Authorization",r)}}a[sr]=!0,Er(this,1)}overrideMimeType(...t){const[e]=t;r(t,1,"XMLHttpRequest","overrideMimeType"),this[rr][sr]&&console.error(`TypeError: Failed to execute 'overrideMimeType' on 'XMLHttpRequest': mimeType ('${e}') not implemented.`)}send(t){const e=this[rr];if(!e[sr]||1!==e.readyState)throw new o("Failed to execute 'send' on 'XMLHttpRequest': The object's state must be OPENED.","InvalidStateError");e[sr]=!1;const r="GET"!==e[ur]&&"HEAD"!==e[ur],n=r&&!e[cr].has("Content-Type"),s=r&&!!t;let i=()=>0;const a=n?t=>{e[cr].set("Content-Type",t)}:void 0,l=s?t=>{i=t}:void 0;let u=t;try{u=ge(t,!1,a,l)}catch(t){console.warn(t)}let c={url:e[lr],method:e[ur],header:(()=>{let t={};return e[cr].forEach((e,r)=>{t[r]=e}),t})(),data:""!==u?u:void 0,dataType:"json"===e.responseType?"json":yr(e.responseType),responseType:yr(e.responseType),withCredentials:e.withCredentials,success:fr.bind(this),fail:br.bind(this),complete:mr.bind(this)};c.headers=c.header,e[pr]=er.request(c),ft(this,"loadstart"),s&&e.upload&&ft(this.upload,"loadstart",0,i),setTimeout(()=>{if(e.upload){const t=e[sr]||1!==e.readyState,r=t?0:i;t?ft(this.upload,"abort"):s&&ft(this.upload,"load",r,r),(t||s)&&ft(this.upload,"loadend",r,r)}}),function(t){const e=t[rr];e.timeout&&(e[ar]=setTimeout(()=>{e.status||4===e.readyState||(e[pr]&&vr(e[pr]),Er(t,4),ft(t,"timeout"))},e.timeout))}(this)}setRequestHeader(...t){const[e,n]=t;r(t,2,"XMLHttpRequest","setRequestHeader");const s=this[rr];if(!s[sr]||1!==s.readyState)throw new o("Failed to execute 'setRequestHeader' on 'XMLHttpRequest': The object's state must be OPENED.","InvalidStateError");let i=""+e,a=""+n;try{s[cr].append(i,a)}catch(t){throw new SyntaxError(`Failed to execute 'setRequestHeader' on 'XMLHttpRequest': '${i}' is not a valid HTTP header field name.`)}}get onreadystatechange(){return this[rr].onreadystatechange}set onreadystatechange(t){this[rr].onreadystatechange=t,ut(this,"readystatechange",t,this[rr][nr].onreadystatechange)}toString(){return"[object XMLHttpRequest]"}get[Symbol.toStringTag](){return"XMLHttpRequest"}get isPolyfill(){return{symbol:e,hierarchy:["XMLHttpRequest","XMLHttpRequestEventTarget","EventTarget"]}}}const nr=Symbol(),sr=Symbol(),ir=Symbol(),ar=Symbol(),lr=Symbol(),ur=Symbol(),cr=Symbol(),hr=Symbol(),dr=Symbol(),pr=Symbol();class gr{constructor(t){var e;this.readyState=0,this.response="",this.responseType="",this.responseURL="",this.status=0,this.statusText="",this.timeout=0,this.withCredentials=!1,this[_e]=(e=this,{onreadystatechange:t=>{ct(e.target,e.onreadystatechange,t)}}),this.onreadystatechange=null,this[ze]=!1,this[Ve]=!1,this[We]=0,this[Je]="",this[Ye]="GET",this[Ke]=new Jt,this[Qe]=null,this[Ze]=()=>0,this[tr]=null,this.target=t}}function yr(t){return"blob"===t||"arraybuffer"===t?"arraybuffer":"text"}function fr(t){const e=this[rr];e.responseURL=e[lr],e.status="statusCode"in t?t.statusCode:"status"in t?t.status:200,e[hr]=new Jt("header"in t?t.header:"headers"in t?t.headers:{});let r=e[hr].get("Content-Length");e[dr]=()=>r?parseInt(r):0,1===e.readyState&&(Er(this,2),Er(this,3),setTimeout(()=>{if(!e[sr]){let r=e[dr];try{e.response=ye(e.responseType,t.data),ft(this,"load",r,r)}catch(t){console.error(t),ft(this,"error")}}}))}function br(t){if("header"in t&&"statusCode"in t||"headers"in t&&"status"in t)return void fr.call(this,{statusCode:"statusCode"in t?t.statusCode:t.status||0,header:"header"in t?t.header:t.headers||{},data:"data"in t&&t.data||""});const e=this[rr];e.status=0,e.statusText="errMsg"in t?t.errMsg:"errorMessage"in t?t.errorMessage:"",e[sr]||0===e.readyState||4===e.readyState||(ft(this,"error"),Tr(this))}function mr(){const t=this[rr];t[pr]=null,t[sr]||1!==t.readyState&&3!==t.readyState||Er(this,4),setTimeout(()=>{if(!t[sr]){let e=t[dr];ft(this,"loadend",e,e)}})}function vr(t){"abort"in t&&"function"==typeof t.abort&&t.abort()}function Sr(t,e=!0){const r=t[rr],o=e?setTimeout:t=>{t()};r[ir]=!0,r[pr]&&4!==r.readyState&&(e&&Er(t,4),o(()=>{const o=r[pr];o&&vr(o),e&&ft(t,"abort"),e&&!o&&ft(t,"loadend")})),o(()=>{r[ir]&&(e&&(r.readyState=0),function(t){const e=t[rr];e[ir]=!1,Tr(t),e.response="",e.responseURL="",e.status=0,e.statusText="",e[cr]=new Jt,e[hr]=null,e[dr]=()=>0}(t))})}function Tr(t){const e=t[rr];e[ar]&&(clearTimeout(e[ar]),e[ar]=0)}function Er(t,e){const r=t[rr];let o=e!==r.readyState;if(r.readyState=e,o){at(t,Z(t,"readystatechange"))}}_e=nr,ze=sr,Ve=ir,We=ar,Je=lr,Ye=ur,Ke=cr,Qe=hr,Ze=dr,tr=pr;const wr=or,xr="undefined"!=typeof XMLHttpRequest&&XMLHttpRequest||wr,Rr=Symbol();class Ar extends ae{constructor(t,e){super(),this[ie].name="Response",this[Rr]=new Pr;const r=this[Rr];let o=null!=e?e:{};if("object"!=typeof o)throw new TypeError("Failed to construct 'Response': The provided value is not of type 'ResponseInit'.");let n=void 0===o.status?200:o.status;if(n<200||n>500)throw new RangeError(`Failed to construct 'Response': The status provided (${+n}) is outside the range [200, 599].`);o.headers&&(r.headers=new Jt(o.headers)),r.ok=n>=200&&n<300,r.status=n,r.statusText=void 0===o.statusText?"":""+o.statusText,ce(this,t)}get headers(){const t=this[Rr];return t.headers||(t.headers=new Jt),t.headers}get ok(){return this[Rr].ok}get redirected(){return this[Rr].redirected}get status(){return this[Rr].status}get statusText(){return this[Rr].statusText}get type(){return this[Rr].type}get url(){return this[Rr].url}clone(){if(this.bodyUsed)throw new TypeError("Failed to execute 'clone' on 'Response': Response body is already used");let t=new Ar(he(this),{headers:new Jt(this.headers),status:this.status,statusText:this.statusText});return t[Rr].url=this.url,t}static json(...t){const[e,o]=t;r(t,1,"Response","json");let n=new Ar("string"==typeof e?e:JSON.stringify(e),o);return n.headers.set("Content-Type","application/json"),n}static error(){let t=new Ar(null,{status:200,statusText:""});return t[Rr].ok=!1,t[Rr].status=0,t[Rr].type="error",t}static redirect(...t){const[e,o=301]=t;if(r(t,1,"Response","redirect"),-1===[301,302,303,307,308].indexOf(o))throw new RangeError("Failed to execute 'redirect' on 'Response': Invalid status code");return new Ar(null,{status:o,headers:{location:""+e}})}toString(){return"[object Response]"}get[Symbol.toStringTag](){return"Response"}get isPolyfill(){return{symbol:e,hierarchy:["Response"]}}}class Pr{constructor(){this.ok=!0,this.redirected=!1,this.status=200,this.statusText="",this.type="default",this.url=""}}const Cr=t.Response||Ar,qr={XMLHttpRequest:xr};function Lr(...t){if(new.target===Lr)throw new TypeError("fetch is not a constructor");const[e,i]=t;return r(t,1,"Window","fetch"),new Promise((t,r)=>{const a=new qe(e,i),l=a[Ce].signal;if(l&&l.aborted)return r(l.reason);let u=new qr.XMLHttpRequest;if(u.onload=function(){let e={headers:oe(u.getAllResponseHeaders()||""),status:u.status,statusText:u.statusText};0===a.url.indexOf("file://")&&(u.status<200||u.status>599)&&(e.status=200),setTimeout(()=>{let r=new Ar("response"in u?u.response:u.responseText,e);r[Rr].url="responseURL"in u?u.responseURL:e.headers.get("X-Request-URL")||"",t(r)})},u.onerror=function(){setTimeout(function(){r(new TypeError("Failed to fetch"))})},u.ontimeout=function(){setTimeout(function(){r(new o("request:fail timeout","TimeoutError"))})},u.onabort=function(){setTimeout(function(){r(new o("request:fail abort","AbortError"))})},u.open(a.method,a.url,!0),"include"===a.credentials?u.withCredentials=!0:"omit"===a.credentials&&(u.withCredentials=!1),"responseType"in u&&(u.responseType="arraybuffer"),!i||"object"!=typeof i||"object"!=typeof i.headers||n("Headers",i.headers)||s("Headers",i.headers))a.headers.forEach((t,e)=>{u.setRequestHeader(e,t)});else{let t=i.headers,e=[];Object.getOwnPropertyNames(t).forEach(r=>{e.push(ee(r)),u.setRequestHeader(r,re(t[r]))}),a.headers.forEach((t,r)=>{-1===e.indexOf(r)&&u.setRequestHeader(r,t)})}if(l){const t=()=>{u.abort()};l.addEventListener("abort",t),u.onreadystatechange=function(){4===u.readyState&&l.removeEventListener("abort",t)}}let c=he(a);u.send(""!==c?c:void 0)})}const Fr=t.fetch||Lr,Or=Symbol();class jr extends ${constructor(t,e){var r;super(t,e),this[Or]=new Hr,this[Or].detail=null!==(r=null==e?void 0:e.detail)&&void 0!==r?r:null}get detail(){return this[Or].detail}initCustomEvent(...t){const[e,o,n,s]=t;r(t,1,"CustomEvent","initCustomEvent"),K(this,1)||(this.initEvent(e,o,n),this[Or].detail=null!=s?s:null)}toString(){return"[object CustomEvent]"}get[Symbol.toStringTag](){return"CustomEvent"}get isPolyfill(){return{symbol:e,hierarchy:["CustomEvent","Event"]}}}class Hr{}const Mr=t.EventTarget?t.CustomEvent:jr,Ur=Symbol();class Nr extends ${constructor(t,e){var r;super(t,e),this[Ur]=new Dr;const o=this[Ur];let n=Number(null!==(r=null==e?void 0:e.code)&&void 0!==r?r:0);o.code=isNaN(n)?0:n,void 0!==(null==e?void 0:e.reason)&&(o.reason=""+e.reason),o.wasClean=!!(null==e?void 0:e.wasClean)}get code(){return this[Ur].code}get reason(){return this[Ur].reason}get wasClean(){return this[Ur].wasClean}toString(){return"[object CloseEvent]"}get[Symbol.toStringTag](){return"CloseEvent"}get isPolyfill(){return{symbol:e,hierarchy:["CloseEvent","Event"]}}}class Dr{constructor(){this.code=0,this.reason="",this.wasClean=!1}}t.EventTarget&&t.CloseEvent;const Br=Symbol();class kr extends ${constructor(t,e){var r;super(t,e),this[Br]=new Ir;const o=this[Br];o.data=null!==(r=null==e?void 0:e.data)&&void 0!==r?r:null,void 0!==(null==e?void 0:e.origin)&&(o.origin=""+e.origin),void 0!==(null==e?void 0:e.lastEventId)&&(o.lastEventId=""+e.lastEventId),void 0!==(null==e?void 0:e.source)&&(o.source=e.source),void 0!==(null==e?void 0:e.ports)&&(o.ports=e.ports)}get data(){return this[Br].data}get lastEventId(){return this[Br].lastEventId}get origin(){return this[Br].origin}get ports(){return this[Br].ports}get source(){return this[Br].source}initMessageEvent(...t){const[e,o,n,s,i,a,l,u]=t;if(r(t,1,"MessageEvent","initMessageEvent"),K(this,1))return;this.initEvent(e,o,n);const c=this[Br];c.data=null!=s?s:null,void 0!==i&&(c.origin=""+i),void 0!==a&&(c.lastEventId=""+a),void 0!==l&&(c.source=l),void 0!==u&&(c.ports=u)}toString(){return"[object MessageEvent]"}get[Symbol.toStringTag](){return"MessageEvent"}get isPolyfill(){return{symbol:e,hierarchy:["MessageEvent","Event"]}}}class Ir{constructor(){this.data=null,this.lastEventId="",this.origin="",this.ports=[],this.source=null}}t.EventTarget&&t.MessageEvent;var $r,Xr;const Gr={connectSocket:He?He.connectSocket:function(t){return{send(t){},close(t){},onOpen(t){},onMessage(t){},onError(t){"function"==typeof t&&t({errMsg:"NOT_SUPPORTED_ERR"})},onClose(t){"function"==typeof t&&setTimeout(()=>{t({code:3009,reason:"NOT_SUPPORTED_ERR"})})}}}},_r=Symbol();class zr extends nt{static get CONNECTING(){return 0}static get OPEN(){return 1}static get CLOSING(){return 2}static get CLOSED(){return 3}constructor(...t){const[e,o]=t;r(t,1,"WebSocket"),super(),this[_r]=new Yr(this,{url:""+e,protocols:void 0!==o?Array.isArray(o)||o&&"object"==typeof o&&Symbol.iterator in o?Array.isArray(o)?o:Array.from(o):[""+o]:[],multiple:!0,fail(t){console.error(t)}});let n=this[_r][Vr];if(!n||"object"!=typeof n)throw new Error(`connectSocket can't establish a connection to the server at ${""+e}.`);!function(t){let e=t;e[_r][Vr].onOpen(t=>{if("header"in t&&t.header&&"object"==typeof t.header){let r=new Jt(t.header);e[_r].protocol=r.get("Sec-WebSocket-Protocol")||""}e[_r].readyState=1,at(e,Z(e,"open"))})}(this),function(t){let e=t;e[_r][Vr].onClose(t=>{e[_r].readyState=3;let r=new Nr("close",{wasClean:!e[_r][Wr],code:t.code,reason:t.reason});Y(r,!0),at(e,r)})}(this),function(t){let e=t;e[_r][Vr].onError(t=>{console.error(t),e[_r][Wr]=t,e[_r].readyState=3,at(e,Z(e,"error"))})}(this),function(t){let e=t;e[_r][Vr].onMessage(t=>{let r,o=t.data;if(o&&"object"==typeof o&&"data"in o){if(r=o.data,"isBuffer"in o&&o.isBuffer&&"string"==typeof r)try{r=my.base64ToArrayBuffer(r)}catch(t){}}else r=o;i(r)&&"blob"===e.binaryType&&(r=new E([r]));let n=new kr("message",{data:r,origin:e.url});Y(n,!0),at(e,n)})}(this)}get CONNECTING(){return 0}get OPEN(){return 1}get CLOSING(){return 2}get CLOSED(){return 3}get binaryType(){return this[_r].binaryType}set binaryType(t){"blob"!==t&&"arraybuffer"!==t||(this[_r].binaryType=t)}get bufferedAmount(){return this[_r].bufferedAmount}get extensions(){return this[_r].extensions}get protocol(){return this[_r].protocol}get readyState(){return this[_r].readyState}get url(){return this[_r].url}close(t,e){2!==this.readyState&&3!==this.readyState&&(this[_r].readyState=2,this[_r][Vr].close({code:t,reason:e,fail(t){console.error(t)},complete:function(){this[_r].readyState=3}.bind(this)}))}send(...t){const[e]=t;if(r(t,1,"WebSocket","send"),0===this.readyState)throw new o("Failed to execute 'send' on 'WebSocket': Still in CONNECTING state.","InvalidStateError");if(2===this.readyState||3===this.readyState)return console.error("WebSocket is already in CLOSING or CLOSED state.");let n;n=i(e)?e:ArrayBuffer.isView(e)?e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength):s("Blob",e)?R(e).buffer.slice(0):""+e,this[_r][Vr].send({data:n,fail(t){console.error(t)}})}get onclose(){return this[_r].onclose}set onclose(t){this[_r].onclose=t,Kr(this,"close")}get onerror(){return this[_r].onerror}set onerror(t){this[_r].onerror=t,Kr(this,"error")}get onmessage(){return this[_r].onmessage}set onmessage(t){this[_r].onmessage=t,Kr(this,"message")}get onopen(){return this[_r].onopen}set onopen(t){this[_r].onopen=t,Kr(this,"open")}toString(){return"[object WebSocket]"}get[Symbol.toStringTag](){return"WebSocket"}get isPolyfill(){return{symbol:e,hierarchy:["WebSocket","EventTarget"]}}}const Vr=Symbol(),Wr=Symbol(),Jr=Symbol();class Yr{constructor(t,e){var r;this.binaryType="blob",this.bufferedAmount=0,this.extensions="",this.protocol="",this.readyState=0,this[$r]=null,this[Xr]=(r=this,{onclose:t=>{ct(r.target,r.onclose,t)},onerror:t=>{ct(r.target,r.onerror,t)},onmessage:t=>{ct(r.target,r.onmessage,t)},onopen:t=>{ct(r.target,r.onopen,t)}}),this.onclose=null,this.onerror=null,this.onmessage=null,this.onopen=null,this.target=t,this.url=e.url,this[Vr]=Gr.connectSocket(e)}}function Kr(t,e){const r=t[_r],o="on"+e;ut(t,e,r[o],r[Jr][o])}$r=Wr,Xr=Jr;const Qr=zr,Zr="undefined"!=typeof WebSocket&&WebSocket||Qr;exports.AbortController=Pe,exports.AbortControllerP=Re,exports.AbortSignal=we,exports.AbortSignalP=me,exports.Blob=F,exports.BlobP=E,exports.CustomEvent=Mr,exports.CustomEventP=jr,exports.Event=et,exports.EventP=$,exports.EventTarget=ht,exports.EventTargetP=nt,exports.File=M,exports.FileP=j,exports.FileReader=xt,exports.FileReaderP=vt,exports.FormData=Gt,exports.FormDataP=Dt,exports.Headers=ne,exports.HeadersP=Jt,exports.Request=je,exports.RequestP=qe,exports.Response=Cr,exports.ResponseP=Ar,exports.TextDecoder=S,exports.TextDecoderP=p,exports.TextEncoder=u,exports.TextEncoderP=a,exports.URLSearchParams=Ht,exports.URLSearchParamsP=Ct,exports.WebSocket=Zr,exports.WebSocketP=Qr,exports.XMLHttpRequest=xr,exports.XMLHttpRequestP=wr,exports.fetch=Fr,exports.fetchP=Lr,exports.setConnectSocket=t=>{Gr.connectSocket=t},exports.setRequest=t=>{er.request=t},exports.setXMLHttpRequest=t=>{qr.XMLHttpRequest=t};