mphttpx 2.3.0 → 2.4.0
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.
- package/README.md +69 -953
- package/dist/cjs/fetchP.js +22 -0
- package/dist/cjs/index.js +197 -55
- package/dist/esm/fetchP.js +12 -0
- package/dist/esm/index.js +5 -18
- package/dist/index.d.ts +8 -394
- package/dist/mphttpx.cjs.js +6646 -0
- package/dist/mphttpx.cjs.min.js +1 -1
- package/dist/mphttpx.esm.js +6595 -0
- package/dist/mphttpx.esm.min.js +1 -1
- package/package.json +27 -9
- package/README.zh-CN.md +0 -983
- package/dist/cjs/encoding/TextDecoderP.js +0 -174
- package/dist/cjs/encoding/TextEncoderP.js +0 -121
- package/dist/cjs/event-system/AbortControllerP.js +0 -28
- package/dist/cjs/event-system/AbortSignalP.js +0 -120
- package/dist/cjs/event-system/CloseEventP.js +0 -36
- package/dist/cjs/event-system/CustomEventP.js +0 -35
- package/dist/cjs/event-system/EventP.js +0 -127
- package/dist/cjs/event-system/EventTargetP.js +0 -155
- package/dist/cjs/event-system/MessageEventP.js +0 -61
- package/dist/cjs/event-system/ProgressEventP.js +0 -42
- package/dist/cjs/fetch-api/BodyImpl.js +0 -167
- package/dist/cjs/fetch-api/HeadersP.js +0 -155
- package/dist/cjs/fetch-api/RequestP.js +0 -163
- package/dist/cjs/fetch-api/ResponseP.js +0 -93
- package/dist/cjs/fetch-api/fetchP.js +0 -125
- package/dist/cjs/file-system/BlobP.js +0 -111
- package/dist/cjs/file-system/FileP.js +0 -34
- package/dist/cjs/file-system/FileReaderP.js +0 -173
- package/dist/cjs/helpers/Payload.js +0 -96
- package/dist/cjs/helpers/decode.js +0 -11
- package/dist/cjs/helpers/emitEvent.js +0 -14
- package/dist/cjs/helpers/emitProgressEvent.js +0 -19
- package/dist/cjs/helpers/encode.js +0 -11
- package/dist/cjs/helpers/handlers.js +0 -23
- package/dist/cjs/helpers/isArrayBuffer.js +0 -11
- package/dist/cjs/helpers/isBlob.js +0 -20
- package/dist/cjs/helpers/isEventTarget.js +0 -18
- package/dist/cjs/helpers/isSequence.js +0 -13
- package/dist/cjs/helpers/isURLSearchParams.js +0 -10
- package/dist/cjs/helpers/normalizeMethod.js +0 -11
- package/dist/cjs/helpers/statusTextMap.js +0 -68
- package/dist/cjs/helpers/toBase64.js +0 -28
- package/dist/cjs/mini-program/WebSocketImpl.js +0 -197
- package/dist/cjs/mini-program/XMLHttpRequestImpl.js +0 -493
- package/dist/cjs/mini-program/connectSocket.js +0 -28
- package/dist/cjs/mini-program/platform.js +0 -29
- package/dist/cjs/mini-program/request.js +0 -36
- package/dist/cjs/network/FormDataP.js +0 -160
- package/dist/cjs/network/URLSearchParamsP.js +0 -226
- package/dist/cjs/network/XMLHttpRequestEventTargetP.js +0 -64
- package/dist/cjs/network/XMLHttpRequestUploadP.js +0 -28
- package/dist/cjs/utils.js +0 -56
- package/dist/esm/encoding/TextDecoderP.js +0 -171
- package/dist/esm/encoding/TextEncoderP.js +0 -118
- package/dist/esm/event-system/AbortControllerP.js +0 -25
- package/dist/esm/event-system/AbortSignalP.js +0 -115
- package/dist/esm/event-system/CloseEventP.js +0 -34
- package/dist/esm/event-system/CustomEventP.js +0 -32
- package/dist/esm/event-system/EventP.js +0 -122
- package/dist/esm/event-system/EventTargetP.js +0 -150
- package/dist/esm/event-system/MessageEventP.js +0 -59
- package/dist/esm/event-system/ProgressEventP.js +0 -40
- package/dist/esm/fetch-api/BodyImpl.js +0 -164
- package/dist/esm/fetch-api/HeadersP.js +0 -149
- package/dist/esm/fetch-api/RequestP.js +0 -160
- package/dist/esm/fetch-api/ResponseP.js +0 -90
- package/dist/esm/fetch-api/fetchP.js +0 -121
- package/dist/esm/file-system/BlobP.js +0 -108
- package/dist/esm/file-system/FileP.js +0 -31
- package/dist/esm/file-system/FileReaderP.js +0 -170
- package/dist/esm/helpers/Payload.js +0 -94
- package/dist/esm/helpers/decode.js +0 -9
- package/dist/esm/helpers/emitEvent.js +0 -12
- package/dist/esm/helpers/emitProgressEvent.js +0 -17
- package/dist/esm/helpers/encode.js +0 -9
- package/dist/esm/helpers/handlers.js +0 -20
- package/dist/esm/helpers/isArrayBuffer.js +0 -9
- package/dist/esm/helpers/isBlob.js +0 -18
- package/dist/esm/helpers/isEventTarget.js +0 -16
- package/dist/esm/helpers/isSequence.js +0 -11
- package/dist/esm/helpers/isURLSearchParams.js +0 -8
- package/dist/esm/helpers/normalizeMethod.js +0 -9
- package/dist/esm/helpers/statusTextMap.js +0 -66
- package/dist/esm/helpers/toBase64.js +0 -26
- package/dist/esm/mini-program/WebSocketImpl.js +0 -193
- package/dist/esm/mini-program/XMLHttpRequestImpl.js +0 -489
- package/dist/esm/mini-program/connectSocket.js +0 -26
- package/dist/esm/mini-program/platform.js +0 -27
- package/dist/esm/mini-program/request.js +0 -34
- package/dist/esm/network/FormDataP.js +0 -157
- package/dist/esm/network/URLSearchParamsP.js +0 -223
- package/dist/esm/network/XMLHttpRequestEventTargetP.js +0 -61
- package/dist/esm/network/XMLHttpRequestUploadP.js +0 -25
- package/dist/esm/utils.js +0 -48
package/dist/mphttpx.esm.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const e="function"==typeof Symbol&&(Symbol.iterator||"Symbol(Symbol.iterator)"),t="function"==typeof Symbol&&(Symbol.toStringTag||"Symbol(Symbol.toStringTag)");class r extends Error{constructor(e,t){super(e),void 0!==t&&(this.name=""+t)}get[t](){return"DOMException"}get __MPHTTPX__(){return{chain:["DOMException"]}}}function n(e){return e.__MPHTTPX__.chain[0]}function o(e,t,r){Object.defineProperty(e,t,{value:r})}function s(e,t){return Object.prototype.toString.call(t)===`[object ${e}]`}function a(e,t,r=!1){const n="__MPHTTPX__";return!!t&&"object"==typeof t&&n in t&&!!t[n]&&"object"==typeof t[n]&&"chain"in t[n]&&Array.isArray(t[n].chain)&&(o=t[n].chain.indexOf(e),r?0===o:o>-1);var o}function i(e,t,r,n){if(e<t)throw new TypeError(`Failed to ${n?"execute '"+n+"' on":"construct"} '${r}': ${t} argument${t>1?"s":""} required, but only ${e} present.`)}class u{get encoding(){return"utf-8"}encode(e=""){return l("string"==typeof e?e:""+e).encoded}encodeInto(e,t){if(i(arguments.length,2,"TextEncoder","encodeInto"),!(t instanceof Uint8Array||s("Uint8Array",t)))throw new TypeError("Failed to execute 'encodeInto' on 'TextEncoder': parameter 2 is not of type 'Uint8Array'.");let r=l("string"==typeof e?e:""+e,t);return{read:r.read,written:r.written}}toString(){return"[object TextEncoder]"}get[t](){return"TextEncoder"}get __MPHTTPX__(){return{chain:["TextEncoder"]}}}function l(e,t){const r=void 0!==t;let n=0,o=0,s=e.length,a=0,i=Math.max(32,s+(s>>1)+7),u=r?t:new Uint8Array(i>>3<<3),l=0,c=0,h=0;for(;n<s;){if(l=e.charCodeAt(n),c=1,l>=55296&&l<=56319)if(n+1<s){let t=e.charCodeAt(n+1);56320==(64512&t)?(c=2,n+=2,l=((1023&l)<<10)+(1023&t)+65536):(n+=1,l=65533)}else n+=1,l=65533;else l>=56320&&l<=57343?(n+=1,l=65533):n+=1;if(!r&&a+4>u.length){i+=8,i*=1+n/e.length*2,i=i>>3<<3;let t=new Uint8Array(i);t.set(u),u=t}if(4294967168&l?4294965248&l?4294901760&l?4292870144&l?(l=65533,h=3):h=4:h=3:h=2:h=1,r&&a+h>u.length)break;switch(h){case 1:u[a++]=l;break;case 2:u[a++]=l>>6&31|192,u[a++]=63&l|128;break;case 3:u[a++]=l>>12&15|224,u[a++]=l>>6&63|128,u[a++]=63&l|128;break;case 4:u[a++]=l>>18&7|240,u[a++]=l>>12&63|128,u[a++]=l>>6&63|128,u[a++]=63&l|128}o+=c}return{encoded:r?t:u.slice(0,a),read:o,written:a}}const c="undefined"!=typeof TextEncoder&&TextEncoder||u;function h(e){return s("ArrayBuffer",e)||!!e&&"object"==typeof e&&ArrayBuffer.prototype.isPrototypeOf(e)}const d=["utf-8","utf8","unicode-1-1-utf-8"];class p{constructor(e="utf-8",t){if(-1===d.indexOf(("string"==typeof e?e:""+e).toLowerCase()))throw new RangeError(`Failed to construct 'TextDecoder': encoding ('${e}') not implemented.`);o(this,"__TextDecoder__",new f(t))}get encoding(){return"utf-8"}get fatal(){return g(this).fatal}get ignoreBOM(){return g(this).ignoreBOM}decode(e,t){return function(e,{stream:t=!1}={},r={fatal:!1,initial:0,partial:[]}){if(void 0===e){if(r.partial.length>0&&r.fatal)throw r.partial=[],new TypeError("Incomplete UTF-8 sequence.");return""}let n=h(e)?new Uint8Array(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):(()=>{throw new TypeError("Input could not be converted to any of: ArrayBufferView, ArrayBuffer.")})();r.initial<3&&(r.initial+=n.length,n.length>=3&&239===n[0]&&187===n[1]&&191===n[2]&&(n=n.subarray(3)));if(r.partial.length>0){let e=new Uint8Array(r.partial.length+n.length);e.set(r.partial,0),e.set(n,r.partial.length),n=e,r.partial=[]}let o=n.length,s=[];if(t&&n.length>0){let e=n.length;for(;e>0&&e>n.length-4;){let t=n[e-1];if(128!=(192&t)){(t>239?4:t>223?3:t>191?2:1)>n.length-(e-1)&&(o=e-1);break}--e}r.partial=Array.from(n.slice(o)),n=n.slice(0,o)}let a=0,i=0,u=0,l=0,c=0,d=0,p=0,f=0;for(;f<o;){if(a=0,l=n[f],u=l>239?4:l>223?3:l>191?2:1,f+u<=o)switch(u){case 1:l<128&&(a=l);break;case 2:c=n[f+1],128==(192&c)&&(i=(31&l)<<6|63&c,i>127&&(a=i));break;case 3:c=n[f+1],d=n[f+2],128==(192&c)&&128==(192&d)&&(i=(15&l)<<12|(63&c)<<6|63&d,i>2047&&(i<55296||i>57343)&&(a=i));break;case 4:c=n[f+1],d=n[f+2],p=n[f+3],128==(192&c)&&128==(192&d)&&128==(192&p)&&(i=(15&l)<<18|(63&c)<<12|(63&d)<<6|63&p,i>65535&&i<1114112&&(a=i))}if(0===a&&(1===u&&0!==l||u>1)){if(r.fatal)throw r.partial=[],new TypeError("Decoding failed.");let e=1;for(;f+e<o&&128==(192&n[f+e]);)e+=1;s.push(65533),f+=e;continue}a>65535&&(a-=65536,s.push(a>>>10&1023|55296),a=56320|1023&a),s.push(a),f+=u}return s.length>16384?function(e){let t=[];for(let r=0,n=e.length;r<n;r+=4096)t.push(String.fromCharCode.apply(String,e.slice(r,r+4096)));return t.join("")}(s):function(e){let t="";for(let r=0,n=e.length;r<n;r+=4096)t+=String.fromCharCode.apply(String,e.slice(r,r+4096));return t}(s)}(e,t,g(this))}toString(){return"[object TextDecoder]"}get[t](){return"TextDecoder"}get __MPHTTPX__(){return{chain:["TextDecoder"]}}}class f{constructor({fatal:e=!1,ignoreBOM:t=!1}={}){this.initial=0,this.partial=[],this.fatal=!!e,this.ignoreBOM=!!t}}function g(e){return e.__TextDecoder__}const y="undefined"!=typeof TextDecoder&&TextDecoder||p;function b(e){return(new u).encode(e)}function _(e){return(new p).decode(e)}function m(e,t=!1){return a("Blob",e,t)||function(e,t=!1){let r=["[object Blob]"];t||r.push("[object File]");return(r.indexOf(Object.prototype.toString.call(e))>-1||r.indexOf(String(e))>-1)&&"size"in e&&"number"==typeof e.size&&"arrayBuffer"in e&&"function"==typeof e.arrayBuffer}(e,t)}function v(e){return Array.isArray(e)||!!e&&"object"==typeof e&&"function"==typeof Symbol&&Symbol.iterator&&Symbol.iterator in e&&"function"==typeof e[Symbol.iterator]}class T{constructor(e=[],t){if(!v(e))throw new TypeError("Failed to construct 'Blob/File': The provided value cannot be converted to a sequence.");let r=Array.isArray(e)?e:Array.from(e),n=[],s=0;for(let e=0;e<r.length;++e){let t=r[e];if(m(t))s+=t.size,n.push(t.arrayBuffer().then(e=>new Uint8Array(e)));else{let e=h(t)||ArrayBuffer.isView(t)?S(t):b(t);s+=e.length,n.push(Promise.resolve(e))}}o(this,"__Blob__",new E(Promise.all(n).then(e=>function(e){let t=e.reduce((e,t)=>e+t.byteLength,0),r=new Uint8Array(t);return e.reduce((e,t)=>(r.set(t,e),e+t.byteLength),0),r}(e)))),w(this).size=s,w(this).type=R(null==t?void 0:t.type)}get size(){return w(this).size}get type(){return w(this).type}arrayBuffer(){return w(this).promise.then(e=>x(e.buffer).buffer)}bytes(){return w(this).promise.then(e=>x(e.buffer))}slice(e,t,r){let n=null!=e?e:0,s=null!=t?t:this.size,a=Object.create(T.prototype);return o(a,"__Blob__",new E(w(this).promise.then(e=>x(e.slice(n,s))))),w(a).size=function(e,t,r){const n=t=>{let r=Number(t);return isNaN(r)&&(r=0),r=r>=0?Math.min(r,e):Math.max(0,r+e),r};return Math.max(0,n(r)-n(t))}(this.size,n,s),w(a).type=R(r),a}stream(){throw new TypeError(`Failed to execute 'stream' on '${n(this)}': method not implemented.`)}text(){return w(this).promise.then(e=>_(e))}toString(){return"[object Blob]"}get[t](){return"Blob"}get __MPHTTPX__(){return{chain:["Blob"]}}}class E{constructor(e){this.size=0,this.type="",this.promise=e}}function w(e){return e.__Blob__}function S(e){return h(e)?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}function R(e){let t=""+(void 0!==e?e:"");return/[^\u0020-\u007E]/.test(t)?"":t.toLowerCase()}function x(e){let t=S(e),r=new Uint8Array(new ArrayBuffer(t.byteLength));return r.set(t),r}const P="undefined"!=typeof Blob&&Blob||T;class q extends T{constructor(e,t,r){i(arguments.length,2,"File"),super(e,r),o(this,"__File__",new A),H(this).lastModified=+((null==r?void 0:r.lastModified)?new Date(r.lastModified):new Date)||0,H(this).name=""+t}get lastModified(){return H(this).lastModified}get name(){return H(this).name}get webkitRelativePath(){return""}toString(){return"[object File]"}get[t](){return"File"}get __MPHTTPX__(){return{chain:["File","Blob"]}}}class A{constructor(){this.lastModified=0,this.name=""}}function H(e){return e.__File__}const L="undefined"!=typeof File&&File||q;class C{static get NONE(){return 0}static get CAPTURING_PHASE(){return 1}static get AT_TARGET(){return 2}static get BUBBLING_PHASE(){return 3}constructor(e,t){i(arguments.length,1,"Event"),o(this,"__Event__",new M);const r=O(this);r.type=""+e,r.bubbles=!!(null==t?void 0:t.bubbles),r.cancelable=!!(null==t?void 0:t.cancelable),r.composed=!!(null==t?void 0:t.composed),Object.defineProperty(this,"isTrusted",{enumerable:!0,get:function(){return"YES"===r.isTrusted}})}get NONE(){return 0}get CAPTURING_PHASE(){return 1}get AT_TARGET(){return 2}get BUBBLING_PHASE(){return 3}get bubbles(){return O(this).bubbles}get cancelBubble(){return O(this).cancelBubble}set cancelBubble(e){e&&(O(this).cancelBubble=!0)}get cancelable(){return O(this).cancelable}get composed(){return O(this).composed}get currentTarget(){return O(this).currentTarget}get defaultPrevented(){return O(this).defaultPrevented}get eventPhase(){return O(this).eventPhase}get returnValue(){return O(this).returnValue}set returnValue(e){e||this.preventDefault()}get srcElement(){return O(this).target}get target(){return O(this).target}get timeStamp(){return O(this).timeStamp}get type(){return O(this).type}composedPath(){let e=this.target?[this.target]:[];return this.currentTarget&&this.currentTarget!==this.target&&e.push(this.currentTarget),e}initEvent(e,t,r){i(arguments.length,1,n(this),"initEvent");let o=O(this);o.eventDispatched||(o.type=""+e,o.bubbles=!!t,o.cancelable=!!r)}preventDefault(){let e=O(this);if(e.passive)return console.warn(`Ignoring 'preventDefault()' call on event of type '${this.type}' from a listener registered as 'passive'.`);this.cancelable&&(e.defaultPrevented=!0,e.returnValue=!1)}stopImmediatePropagation(){O(this).immediatePropagationStopped=!0,this.cancelBubble=!0}stopPropagation(){this.cancelBubble=!0}toString(){return"[object Event]"}get[t](){return"Event"}get __MPHTTPX__(){return{chain:["Event"]}}}class M{constructor(){this.bubbles=!1,this.cancelBubble=!1,this.cancelable=!1,this.composed=!1,this.currentTarget=null,this.defaultPrevented=!1,this.eventPhase=0,this.returnValue=!0,this.target=null,this.timeStamp=(new Date).getTime()-F,this.type="",this.passive=!1,this.eventDispatched=!1,this.immediatePropagationStopped=!1,Object.defineProperty(this,"isTrusted",j())}}const F=(new Date).getTime();function O(e){return e.__Event__}function j(){let e=j.name,t=e.length,r="NO";return{configurable:!1,enumerable:!0,get:function(){return r},set:function(n){e===n.slice(0,t)&&(r=n.slice(t+1))}}}function B(e,t){O(e).isTrusted=`${j.name}:${t?"YES":"NO"}`}const N="undefined"!=typeof Event&&Event||C;function D(e){return a("EventTarget",e)||function(e){return!!e&&"object"==typeof e&&"addEventListener"in e&&"function"==typeof e.addEventListener&&"removeEventListener"in e&&"function"==typeof e.removeEventListener}(e)}class U{constructor(){o(this,"__EventTarget__",new I)}addEventListener(e,t,r){if(i(arguments.length,2,n(this),"addEventListener"),"function"!=typeof t&&"object"!=typeof t&&void 0!==t)throw new TypeError(`Failed to execute 'addEventListener' on '${n(this)}': parameter 2 is not of type 'Object'.`);let o=k(this),s=new $(e,t),a=s.options.capture="boolean"==typeof r?r:!!(null==r?void 0:r.capture);if(!o.executors.some(e=>e.equals(s))){if(o.executors.push(s),r&&"object"==typeof r){s.options.once=!!r.once,s.options.passive=!!r.passive;const e=r.signal;e&&D(e)&&!e.aborted&&(s.options.signal=e,function(e,t,r){const n=()=>{k(e).executors=k(e).executors.filter(e=>!e.equals(t)),r.removeEventListener("abort",n)};r.addEventListener("abort",n)}(this,s,e))}if(a){let e=e=>e.options.capture?0:1;o.executors=o.executors.sort((t,r)=>e(t)-e(r))}}}dispatchEvent(e){if(i(arguments.length,1,n(this),"dispatchEvent"),a("Event",e))B(e,!1);else{if(!function(e){const t=e=>"[object "===e.slice(0,8)&&"Event]"===e.slice(-6);return!!e&&"object"==typeof e&&(t(Object.prototype.toString.call(e))||t(String(e)))&&"type"in e&&"string"==typeof e.type}(e))throw new TypeError(`Failed to execute 'dispatchEvent' on '${n(this)}': parameter 1 is not of type 'Event'.`);console.warn(`WARNING: undefined behavior when executing 'dispatchEvent' on '${n(this)}': parameter 1 is not of type 'mphttpx.Event'`)}return X(this,e)}removeEventListener(e,t,r){if(i(arguments.length,2,n(this),"removeEventListener"),"function"!=typeof t&&"object"!=typeof t&&void 0!==t)throw new TypeError(`Failed to execute 'removeEventListener' on '${n(this)}': parameter 2 is not of type 'Object'.`);let o=k(this),s=new $(e,t);s.options.capture="boolean"==typeof r?r:!!(null==r?void 0:r.capture),o.executors.some(e=>e.equals(s))&&(o.executors=o.executors.filter(e=>!e.equals(s)))}toString(){return"[object EventTarget]"}get[t](){return"EventTarget"}get __MPHTTPX__(){return{chain:["EventTarget"]}}}class I{constructor(){this.executors=[]}}function k(e){return e.__EventTarget__}function X(e,t){const r=k(e),n=t.__Event__||{};n.target=e,n.currentTarget=e,n.eventPhase=2,n.eventDispatched=!0;let o=[];for(let s=0;s<r.executors.length&&!n.immediatePropagationStopped;++s){let a=r.executors[s];if(a.type===t.type){a.options.once&&o.push(s),n.passive=!!a.options.passive;try{let r=a.callback;"function"==typeof r&&r.call(e,t)}catch(e){console.error(e)}n.passive=!1}}return o.length>0&&(r.executors=r.executors.reduce((e,t,r)=>(-1===o.indexOf(r)&&e.push(t),e),[])),n.currentTarget=null,n.eventPhase=0,n.eventDispatched=!1,!(t.cancelable&&t.defaultPrevented)}class ${constructor(e,t){var r;this.options={},this.type=""+e,this.callback="function"==typeof(r=t)?r:function(e){return!!e&&"object"==typeof e&&"handleEvent"in e&&"function"==typeof e.handleEvent}(r)?r.handleEvent:r}equals(e){return Object.is(this.type,e.type)&&Object.is(this.callback,e.callback)&&Object.is(this.options.capture,e.options.capture)}}const G="undefined"!=typeof EventTarget&&EventTarget||U;function z(e,t){return function(r){const n="on"+r,o=e[n],s=t[n];"function"==typeof o?U.prototype.addEventListener.call(e,r,s):U.prototype.removeEventListener.call(e,r,s)}}function W(e,t,r){"function"==typeof t&&t.call(e,r)}function V(e){let t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",r=[];for(var n=0;n<e.length;n+=3){let o=e[n],s=n+1<e.length,a=s?e[n+1]:0,i=n+2<e.length,u=i?e[n+2]:0,l=o>>2,c=(3&o)<<4|a>>4,h=(15&a)<<2|u>>6,d=63&u;i||(d=64,s||(h=64)),r.push(t[l],t[c],t[h],t[d])}return r.join("")}class J extends C{constructor(e,t){var r,n;super(e,t),o(this,"__ProgressEvent__",new Y);const s=K(this);s.lengthComputable=!!(null==t?void 0:t.lengthComputable),s.loaded=Number(null!==(r=null==t?void 0:t.loaded)&&void 0!==r?r:0),s.total=Number(null!==(n=null==t?void 0:t.total)&&void 0!==n?n:0),Q("loaded",this.loaded),Q("total",this.total)}get lengthComputable(){return K(this).lengthComputable}get loaded(){return K(this).loaded}get total(){return K(this).total}toString(){return"[object ProgressEvent]"}get[t](){return"ProgressEvent"}get __MPHTTPX__(){return{chain:["ProgressEvent","Event"]}}}class Y{constructor(){this.lengthComputable=!1,this.loaded=0,this.total=0}}function K(e){return e.__ProgressEvent__}function Q(e,t){if(isNaN(t))throw new TypeError(`Failed to construct 'ProgressEvent': Failed to read the '${e}' property from 'ProgressEventInit': The provided double value is non-finite.`)}function Z(e,t,r=0,n=0){let o=new J(t,{lengthComputable:n>0,loaded:r,total:n});o.__Event__.target=e,B(o,!0),X(e,o)}class ee extends U{static get EMPTY(){return 0}static get LOADING(){return 1}static get DONE(){return 2}constructor(){super(),o(this,"__FileReader__",new te(this))}get EMPTY(){return 0}get LOADING(){return 1}get DONE(){return 2}get error(){return re(this).error}get readyState(){return re(this).readyState}get result(){return re(this).result}abort(){2===re(this).pos&&function(e){let t=re(e);t.pos=5,t.error=new r("An ongoing operation was aborted, typically with a call to abort().","AbortError"),t.result=null,t.readyState=2,Z(e,"abort"),se(e)}(this)}readAsArrayBuffer(e){ne(this,"readAsArrayBuffer",arguments.length,e),oe(this,e.size,()=>e.arrayBuffer())}readAsBinaryString(e){ne(this,"readAsBinaryString",arguments.length,e),oe(this,e.size,()=>e.arrayBuffer().then(e=>{let t=[],r=new Uint8Array(e);for(let e=0;e<r.length;++e)t.push(String.fromCharCode(r[e]));return t.join("")}))}readAsDataURL(e){ne(this,"readAsDataURL",arguments.length,e),oe(this,e.size,()=>e.arrayBuffer().then(t=>"data:"+(e.type||"application/octet-stream")+";base64,"+V(new Uint8Array(t))))}readAsText(e,t){if(ne(this,"readAsText",arguments.length,e),void 0!==t){let e=""+t;-1===["utf-8","utf8","unicode-1-1-utf-8"].indexOf(e.toLowerCase())&&console.warn(`Ignoring the execution of 'readAsText' on 'FileReader': encoding ('${e}') not implemented.`)}oe(this,e.size,()=>e.text())}get onabort(){return re(this).onabort}set onabort(e){re(this).onabort=e,re(this).attach("abort")}get onerror(){return re(this).onerror}set onerror(e){re(this).onerror=e,re(this).attach("error")}get onload(){return re(this).onload}set onload(e){re(this).onload=e,re(this).attach("load")}get onloadend(){return re(this).onloadend}set onloadend(e){re(this).onloadend=e,re(this).attach("loadend")}get onloadstart(){return re(this).onloadstart}set onloadstart(e){re(this).onloadstart=e,re(this).attach("loadstart")}get onprogress(){return re(this).onprogress}set onprogress(e){re(this).onprogress=e,re(this).attach("progress")}toString(){return"[object FileReader]"}get[t](){return"FileReader"}get __MPHTTPX__(){return{chain:["FileReader","EventTarget"]}}}class te{constructor(e){var t;this.pos=0,this.readyState=0,this.result=null,this.error=null,this.onabort=null,this.onerror=null,this.onload=null,this.onloadend=null,this.onloadstart=null,this.onprogress=null,this.attach=z(e,(t=e,{onabort:e=>{W(t,t.onabort,e)},onerror:e=>{W(t,t.onerror,e)},onload:e=>{W(t,t.onload,e)},onloadend:e=>{W(t,t.onloadend,e)},onloadstart:e=>{W(t,t.onloadstart,e)},onprogress:e=>{W(t,t.onprogress,e)}}))}}function re(e){return e.__FileReader__}function ne(e,t,n,o){if(i(n,1,"FileReader",t),!m(o))throw new TypeError("Failed to execute '"+t+"' on 'FileReader': parameter 1 is not of type 'Blob'.");if(1===e.readyState)throw new r(`Failed to execute '${t}' on 'FileReader': The object is already busy reading Blobs.`,"InvalidStateError")}function oe(e,t,r){!function(e,t,r){let n=re(e);n.pos=1,n.error=null,n.result=null;const o=()=>(Z(e,"loadstart",0,t),r());(function(e,t,r){let n=re(e);n.pos=2,n.readyState=1,Promise.resolve().then(()=>{if(2===n.pos)return r().then(r=>function(e,t,r){let n=re(e);if(2!==n.pos)return;n.pos=3,n.result=r,n.readyState=2,function(e,t){re(e).pos=4,Z(e,"load",t,t),se(e,t)}(e,t)}(e,t,r)).catch(t=>function(e,t){let r=re(e);if(2!==r.pos)return;r.pos=6,r.error=t,r.result=null,r.readyState=2,Z(e,"error"),se(e)}(e,t))})})(e,t,o)}(e,t,r)}function se(e,t=0){re(e).pos=7,Z(e,"loadend",t,t)}const ae="undefined"!=typeof FileReader&&FileReader||ee;function ie(e){return a("URLSearchParams",e)||s("URLSearchParams",e)}class ue{constructor(e){if(o(this,"__URLSearchParams__",new le),void 0!==e)if(ie(e))e.forEach((e,t)=>{this.append(t,e)},this);else if(e&&"object"==typeof e)if(v(e)){let t=Array.isArray(e)?e:Array.from(e);for(let e=0;e<t.length;++e){let r=t[e];if(!v(r))throw new TypeError("Failed to construct 'URLSearchParams': The provided value cannot be converted to a sequence.");{let e=Array.isArray(r)?r:Array.from(r);if(2!==e.length)throw new TypeError("Failed to construct 'URLSearchParams': Sequence initializer must only contain pair elements");this.append(e[0],e[1])}}}else Object.getOwnPropertyNames(e).forEach(t=>{this.append(t,e[t])},this);else{let t=""+e;0===t.indexOf("?")&&(t=t.slice(1));let r=t.split("&");for(let e=0;e<r.length;++e){let t=r[e],n=t.indexOf("=");n>-1?this.append(fe(t.slice(0,n)),fe(t.slice(n+1))):t&&this.append(fe(t),"")}}}get size(){return ce(this).array.length}append(e,t){he(arguments.length,2,"append"),ce(this).array.push([""+e,de(t)])}delete(e,t){he(arguments.length,1,"delete");let r=""+e,n=-1,o=ce(this).array,s=[];for(let e=0;e<o.length;++e){let a=o[e];a[0]!==r?s.push(a):(1!==arguments.length&&a[1]!==de(t)&&s.push(a),n=e)}n>-1&&(ce(this).array=s)}get(e){he(arguments.length,1,"get");let t=""+e,r=ce(this).array;for(let e=0;e<r.length;++e){let n=r[e];if(n[0]===t)return n[1]}return null}getAll(e){he(arguments.length,1,"getAll");let t=""+e,r=ce(this).array,n=[];for(let e=0;e<r.length;++e){let o=r[e];o[0]===t&&n.push(o[1])}return n}has(e,t){he(arguments.length,1,"has");let r=""+e,n=ce(this).array;for(let e=0;e<n.length;++e){let o=n[e];if(o[0]===r){if(1===arguments.length)return!0;if(o[1]===de(t))return!0}}return!1}set(e,t){he(arguments.length,2,"set");let r=""+e,n=de(t),o=-1,s=ce(this).array,a=[];for(let e=0;e<s.length;++e){let t=s[e];t[0]!==r?a.push(t):-1===o&&(o=e,a.push([r,n]))}-1===o&&a.push([r,n]),ce(this).array=a}sort(){ce(this).array.sort((e,t)=>e[0]<t[0]?-1:e[0]>t[0]?1:0)}forEach(e,t){if(he(arguments.length,1,"forEach"),"function"!=typeof e)throw new TypeError("Failed to execute 'forEach' on 'URLSearchParams': parameter 1 is not of type 'Function'.");let r=ce(this).array;for(let n=0;n<r.length;++n){let o=r[n];e.call(t,o[1],o[0],this)}}entries(){return ce(this).array.map(e=>[e[0],e[1]]).values()}keys(){return ce(this).array.map(e=>e[0]).values()}values(){return ce(this).array.map(e=>e[1]).values()}[e](){return this.entries()}toString(){let e=ce(this).array,t=[];for(let r=0;r<e.length;++r){let n=e[r];t.push(pe(n[0])+"="+pe(n[1]))}return t.join("&")}get[t](){return"URLSearchParams"}get __MPHTTPX__(){return{chain:["URLSearchParams"]}}}class le{constructor(){this.array=[]}}function ce(e){return e.__URLSearchParams__}function he(e,t,r){i(e,t,"URLSearchParams",r)}function de(e){return"string"==typeof e?e:null!=e&&"function"==typeof e.toString?e.toString():JSON.stringify(e)}function pe(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'\(\)~]|%20|%00/g,e=>t[e])}function fe(e){return e.replace(/[ +]/g,"%20").replace(/(%[a-f0-9]{2})+/gi,e=>decodeURIComponent(e))}const ge="undefined"!=typeof URLSearchParams&&URLSearchParams||ue;class ye{constructor(e,t){if(void 0===t){if(void 0!==e)throw new TypeError("Failed to construct 'FormData': parameter 1 not implemented.")}else if(null!==t)throw new TypeError("Failed to construct 'FormData': parameter 1 and parameter 2 not implemented.");o(this,"__FormData__",new be)}append(e,t,r){me(arguments.length,2,"append"),_e(this).array.push(ve(e,t,r))}delete(e){me(arguments.length,1,"delete");let t=""+e,r=-1,n=_e(this).array,o=[];for(let e=0;e<n.length;++e){let s=n[e];s[0]!==t?o.push(s):r=e}r>-1&&(_e(this).array=o)}get(e){me(arguments.length,1,"get");let t=""+e,r=_e(this).array;for(let e=0;e<r.length;++e){let n=r[e];if(n[0]===t)return n[1]}return null}getAll(e){me(arguments.length,1,"getAll");let t=""+e,r=_e(this).array,n=[];for(let e=0;e<r.length;++e){let o=r[e];o[0]===t&&n.push(o[1])}return n}has(e){me(arguments.length,1,"has");let t=""+e,r=_e(this).array;for(let e=0;e<r.length;++e){if(r[e][0]===t)return!0}return!1}set(e,t,r){me(arguments.length,2,"set");let n=""+e,o=ve(e,t,r),s=-1,a=_e(this).array,i=[];for(let e=0;e<a.length;++e){let t=a[e];t[0]!==n?i.push(t):-1===s&&(s=e,i.push(o))}-1===s&&i.push(o),_e(this).array=i}forEach(e,t){if(me(arguments.length,1,"forEach"),"function"!=typeof e)throw new TypeError("Failed to execute 'forEach' on 'FormData': parameter 1 is not of type 'Function'.");let r=_e(this).array;for(let n=0;n<r.length;++n){let o=r[n];e.call(t,o[1],o[0],t)}}entries(){return _e(this).array.map(e=>[e[0],e[1]]).values()}keys(){return _e(this).array.map(e=>e[0]).values()}values(){return _e(this).array.map(e=>e[1]).values()}[e](){return this.entries()}toString(){return"[object FormData]"}get[t](){return"FormData"}get __MPHTTPX__(){return{chain:["FormData"]}}}class be{constructor(){this.array=[]}}function _e(e){return e.__FormData__}function me(e,t,r){return i(e,t,"FormData",r)}function ve(e,t,r){return m(t)?(r=void 0!==r?""+r:"string"==typeof t.name?t.name:"blob",(t.name!==r||m(t,!0))&&(t=new q([t],r)),[""+e,t]):[""+e,""+t]}const Te="undefined"!=typeof FormData&&FormData||ye;class Ee{constructor(e){if(o(this,"__Headers__",new we),void 0!==e)if(Re(e))e.forEach((e,t)=>{xe(this,t,e,"")},this);else if(v(e)){let t=Array.isArray(e)?e:Array.from(e);for(let e=0;e<t.length;++e){let r=t[e];if(!v(r))throw new TypeError("Failed to construct 'Headers': The provided value cannot be converted to a sequence.");{let e=Array.isArray(r)?r:Array.from(r);if(2!==e.length)throw new TypeError("Failed to construct 'Headers': Invalid value");xe(this,e[0],e[1])}}}else{if(!e||"object"!=typeof e)throw new TypeError("Failed to construct 'Headers': The provided value is not of type '(record<ByteString, ByteString> or sequence<sequence<ByteString>>)'.");Object.getOwnPropertyNames(e).forEach(t=>{xe(this,t,e[t])},this)}}append(e,t){qe(arguments.length,2,"append"),xe(this,e,t,"append")}delete(e){qe(arguments.length,1,"delete"),delete Se(this).dict[Ae(e,Pe("delete"))]}get(e){var t;return qe(arguments.length,1,"get"),null!==(t=Se(this).dict[Ae(e,Pe("get"))])&&void 0!==t?t:null}getSetCookie(){let e=this.get("Set-Cookie");return e?e.split(", "):[]}has(e){return qe(arguments.length,1,"has"),Se(this).dict.hasOwnProperty(Ae(e,Pe("has")))}set(e,t){qe(arguments.length,2,"set"),Se(this).dict[Ae(e,Pe("set"))]=He(t)}forEach(e,t){if(qe(arguments.length,1,"forEach"),"function"!=typeof e)throw new TypeError("Failed to execute 'forEach' on 'Headers': parameter 1 is not of type 'Function'.");let r=Se(this).dict,n=Object.getOwnPropertyNames(r);for(let o=0;o<n.length;++o){let s=n[o];e.call(t,r[s],s,this)}}entries(){let e=[];return this.forEach((t,r)=>{e.push([r,t])}),e.values()}keys(){let e=[];return this.forEach((t,r)=>{e.push([r,t])}),e.map(e=>e[0]).values()}values(){let e=[];return this.forEach((t,r)=>{e.push([r,t])}),e.map(e=>e[1]).values()}[e](){return this.entries()}toString(){return"[object Headers]"}get[t](){return"Headers"}get __MPHTTPX__(){return{chain:["Headers"]}}}class we{constructor(){this.dict={}}}function Se(e){return e.__Headers__}function Re(e){return a("Headers",e)||function(e){let t="[object Headers]";return(Object.prototype.toString.call(e)===t||String(e)===t)&&"forEach"in e&&"function"==typeof e.forEach}(e)}function xe(e,t,r,n="constructor"){let o=Ae(t,n?Pe(n):void 0),s=He(r),a=Se(e).dict,i=a[o];a[o]=void 0!==i?`${i}, ${s}`:s}function Pe(e){return()=>{throw new TypeError(`Failed to ${e&&"constructor"!==e?"execute '"+e+"' on":"construct"} 'Headers': Invalid name`)}}function qe(e,t,r){i(e,t,"Headers",r)}function Ae(e,t){return"string"!=typeof e&&(e=""+e),t&&(/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(e)||""===e)&&t(),e.toLowerCase()}function He(e){return"string"==typeof e?e:""+e}const Le="undefined"!=typeof Headers&&Headers||Ee;class Ce{constructor(e){if(this.type="","string"==typeof e)this.promise=Promise.resolve(e),this.type="text/plain;charset=UTF-8",this.calcLength=()=>b(e).length;else if(ie(e)){let t=e.toString();this.promise=Promise.resolve(t),this.type="application/x-www-form-urlencoded;charset=UTF-8",this.calcLength=()=>b(t).length}else if(h(e))this.promise=Promise.resolve(e.slice(0)),this.length=e.byteLength;else if(ArrayBuffer.isView(e)){let t=e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength);this.promise=Promise.resolve(t),this.length=t.byteLength}else if(m(e))this.promise=e.arrayBuffer(),this.type=e.type,this.length=e.size;else if(a("FormData",t=e)||function(e){let t="[object FormData]";return(Object.prototype.toString.call(e)===t||String(e)===t)&&"forEach"in e&&"function"==typeof e.forEach}(t)){let t=function(e){const t="----formdata-mphttpx-"+Math.random(),r=`--${t}\r\nContent-Disposition: form-data; name="`;let n=[];return e.forEach((e,t)=>{"string"==typeof e?n.push(r+Fe(Me(t))+`"\r\n\r\n${Me(e)}\r\n`):n.push(r+Fe(Me(t))+`"; filename="${Fe(e.name)}"\r\nContent-Type: ${e.type||"application/octet-stream"}\r\n\r\n`,e,"\r\n")}),n.push(`--${t}--`),new T(n,{type:"multipart/form-data; boundary="+t})}(e);this.promise=t.arrayBuffer(),this.type=t.type,this.length=t.size}else if(null==e)this.promise=Promise.resolve(""),this.length=0;else{let t=""+e;this.promise=Promise.resolve(t),this.type="text/plain;charset=UTF-8",this.calcLength=()=>b(t).length}var t}get size(){var e;return"number"!=typeof this.length&&this.calcLength&&(this.length=this.calcLength()),null!==(e=this.length)&&void 0!==e?e:0}text(){return this.promise.then(e=>"string"==typeof e?e:_(e))}arrayBuffer(){return this.promise.then(e=>h(e)?e:b(e).buffer)}}function Me(e){return e.replace(/\r?\n|\r/g,"\r\n")}function Fe(e){return e.replace(/\n/g,"%0A").replace(/\r/g,"%0D").replace(/"/g,"%22")}class Oe{constructor(){if(new.target===Oe)throw new TypeError("Failed to construct 'Body': Illegal constructor");o(this,"__Body__",new je)}get bodyUsed(){return Be(this).bodyUsed}get body(){throw new TypeError(`Failed to access 'body' on '${n(this)}': property not implemented.`)}arrayBuffer(){const e="arrayBuffer";return Ue(this,e)||De(this,e)}blob(){const e="blob";return Ue(this,e)||De(this,e)}bytes(){const e="bytes";return Ue(this,e)||De(this,e)}formData(){const e="formData";return Ue(this,e)||De(this,e)}json(){const e="json";return Ue(this,e)||De(this,e)}text(){const e="text";return Ue(this,e)||De(this,e)}toString(){return"[object Body]"}get[t](){return"Body"}get __MPHTTPX__(){return{chain:["Body"]}}}class je{constructor(){this.bodyUsed=!1}}function Be(e){return e.__Body__}function Ne(e,t){const r=e;if(s("ReadableStream",t))throw new TypeError(`Failed to construct '${n(r)}': ReadableStream not implemented.`);null!=t&&(Be(r).payload=new Ce(t))}function De(e,t){let r=Be(e).payload||new Ce;return"json"===t?r.text().then(e=>JSON.parse(e)):"text"===t?r.text():"arrayBuffer"===t?r.arrayBuffer():"bytes"===t?r.arrayBuffer().then(e=>new Uint8Array(e)):"blob"===t?r.promise.then(e=>new T([e])):"formData"===t?r.text().then(e=>function(e,t){const r=()=>{throw new TypeError("Could not parse content as FormData.")};"string"==typeof e&&""!==e.trim()||r();let n=e.indexOf("\r\n");-1===n&&r();let o=e.substring(2,n).trim();o||r();void 0!==t&&t!==o&&r();let s=e.split(`--${o}`).filter(e=>{let t=e.trim();return""!==t&&"--"!==t});0===s.length&&r();let a=new ye;return s.forEach(e=>{let t=e.indexOf("\r\n\r\n");-1===t&&r();let n=e.substring(0,t).trim(),o=n.match(/name="([^"]*)"/);(!o||o.length<2)&&r();let s=o[1],i=n.match(/filename="([^"]*)"/),u=e.substring(t+4);if(i){let e=i[1]||"",t=n.match(/Content-Type: ([^\r\n]+)/),r=t?(t[1]||"").trim():"text/plain",o=u.replace(/\r\n/g,"");a.append(s,new q([o],e,{type:r}))}else a.append(s,u.replace(/^[\r\n]+|[\r\n]+$/g,""))}),a}(e,function(e){if(!e)return;if(!/multipart\/form-data/i.test(e))return;let t=e.match(/boundary\s*=\s*([^;]+)/i);if(t&&t[1]){return t[1].trim().replace(/^["']|["']$/g,"")}}(r.type))):r.promise}function Ue(e,t){if(Be(e).payload){if(e.bodyUsed)return Promise.reject(new TypeError(`Failed to execute '${t}' on '${n(e)}': body stream already read`));Be(e).bodyUsed=!0}}const Ie=["CONNECT","DELETE","GET","HEAD","OPTIONS","PATCH","POST","PUT","TRACE"];function ke(e){let t=e.toUpperCase();return Ie.indexOf(t)>-1?t:e}function Xe(e,t){let r=new C(t);r.__Event__.target=e,B(r,!0),X(e,r)}class $e extends U{static abort(e){let t=Ve();return We(t,!1,e),t}static any(e){if(i(arguments.length,1,"AbortSignal","any"),!v(e))throw new TypeError("Failed to execute 'any' on 'AbortSignal': The provided value cannot be converted to a sequence.");let t=Array.isArray(e)?e:Array.from(e);t.forEach(e=>{if(!D(e))throw new TypeError("Failed to execute 'any' on 'AbortSignal': Failed to convert value to 'AbortSignal'.")});let r=Ve(),n=(()=>{for(let e=0;e<t.length;++e){let r=t[e];if(r.aborted)return r}})();if(n)We(r,!1,n.reason);else{function o(){for(let e=0;e<t.length;++e){t[e].removeEventListener("abort",o)}We(r,!0,this.reason)}for(let s=0;s<t.length;++s){t[s].addEventListener("abort",o)}}return r}static timeout(e){if(i(arguments.length,1,"AbortSignal","timeout"),!(e>=0))throw new TypeError("Failed to execute 'timeout' on 'AbortSignal': Value is outside the 'unsigned long long' value range.");const t=Ve();return setTimeout(()=>We(t,!0,new r("signal timed out","TimeoutError")),e),t}constructor(){if(new.target===$e)throw new TypeError("Failed to construct 'AbortSignal': Illegal constructor");super(),o(this,"__AbortSignal__",new Ge(this))}get aborted(){return ze(this).aborted}get reason(){return ze(this).reason}throwIfAborted(){if(this.aborted)throw this.reason}get onabort(){return ze(this).onabort}set onabort(e){ze(this).onabort=e,ze(this).attach("abort")}toString(){return"[object AbortSignal]"}get[t](){return"AbortSignal"}get __MPHTTPX__(){return{chain:["AbortSignal","EventTarget"]}}}class Ge{constructor(e){var t;this.aborted=!1,this.reason=void 0,this.onabort=null,this.attach=z(e,(t=e,{onabort:e=>{W(t,t.onabort,e)}}))}}function ze(e){return e.__AbortSignal__}function We(e,t=!0,n){const o=ze(e);e.aborted||(o.aborted=!0,o.reason=void 0!==n?n:new r("signal is aborted without reason","AbortError"),t&&Xe(e,"abort"))}function Ve(){let e=Object.create($e.prototype);return o(e,"__EventTarget__",new I),o(e,"__AbortSignal__",new Ge(e)),e}const Je="undefined"!=typeof AbortSignal&&AbortSignal||$e;class Ye extends Oe{constructor(e,t){i(arguments.length,1,"Request"),super(),o(this,"__Request__",new Ke);const r=Qe(this);let n=null!=t?t:{};if("object"!=typeof n)throw new TypeError("Failed to construct 'Request': The provided value is not of type 'RequestInit'.");let s=n.body,u=!1;if(a("Request",l=e)||function(e){let t="[object Request]";return(Object.prototype.toString.call(e)===t||String(e)===t)&&"arrayBuffer"in e&&"function"==typeof e.arrayBuffer}(l)){if(e.bodyUsed)throw new TypeError("Failed to construct 'Request': Cannot construct a Request with a Request object that has already been used.");r.cache=e.cache,r.credentials=e.credentials,void 0===n.headers&&(Qe(this).headers=new Ee(e.headers)),r.method=e.method,r.mode=e.mode,r.signal=e.signal,r.url=e.url,s||(this.__Body__.payload=function(e){let t=Object.create(Ce.prototype);return t.promise=e,t.type="",t}(e.arrayBuffer()),u=!0)}else r.url=""+e;var l;if(n.cache&&(r.cache=n.cache),n.credentials&&(r.credentials=n.credentials),void 0!==n.headers&&(Qe(this).headers=new Ee(n.headers)),n.method&&(r.method=ke(n.method)),n.mode&&(r.mode=n.mode),null!==n.signal&&void 0!==n.signal){if(!D(n.signal))throw new TypeError("Failed to construct 'Request': Failed to read the 'signal' property from 'RequestInit': Failed to convert value to 'AbortSignal'.");r.signal=n.signal}if(("GET"===this.method||"HEAD"===this.method)&&null!=s)throw new TypeError("Failed to construct 'Request': Request with GET/HEAD method cannot have body.");Ne(this,u?null:s);let c=this.__Body__.payload;!this.headers.has("Content-Type")&&c&&c.type&&this.headers.set("Content-Type",c.type),"GET"!==this.method&&"HEAD"!==this.method||"no-cache"!==this.cache&&"no-store"!==this.cache||function(e){let t=/([?&])_=[^&]*/;if(t.test(e.url))Qe(e).url=e.url.replace(t,"$1_="+(new Date).getTime());else{let t=/\?/;Qe(e).url+=(t.test(e.url)?"&":"?")+"_="+(new Date).getTime()}}(this)}get cache(){return Qe(this).cache}get credentials(){return Qe(this).credentials}get destination(){return""}get headers(){return Qe(this).headers||(Qe(this).headers=new Ee),Qe(this).headers}get integrity(){return""}get keepalive(){return!1}get method(){return Qe(this).method}get mode(){return Qe(this).mode}get redirect(){return"follow"}get referrer(){return Qe(this).referrer}get referrerPolicy(){return""}get signal(){return Qe(this).signal||(Qe(this).signal=Ve()),Qe(this).signal}get url(){return Qe(this).url}clone(){if(this.bodyUsed)throw new TypeError("Failed to execute 'clone' on 'Request': Request body is already used");{let e=new Ye(this);return this.__Body__.bodyUsed=!1,e}}toString(){return"[object Request]"}get[t](){return"Request"}get __MPHTTPX__(){return{chain:["Request","Body"]}}}class Ke{constructor(){this.cache="default",this.credentials="same-origin",this.method="GET",this.mode="cors",this.referrer="about:client",this.url=""}}function Qe(e){return e.__Request__}const Ze="undefined"!=typeof Request&&Request||Ye;class et extends Oe{static json(e,t){i(arguments.length,1,"Response","json");let r=new et("string"==typeof e?e:JSON.stringify(e),t);return r.headers.set("Content-Type","application/json"),r}static error(){let e=new et(null,{status:200,statusText:""});return nt(e).status=0,nt(e).type="error",e}static redirect(e,t=302){if(i(arguments.length,1,"Response","redirect"),-1===[301,302,303,307,308].indexOf(t))throw new RangeError("Failed to execute 'redirect' on 'Response': Invalid status code");return new et(null,{status:t,headers:{location:""+e}})}constructor(e,t){super(),o(this,"__Response__",new rt);const r=nt(this);let n=null!=t?t:{};if("object"!=typeof n)throw new TypeError("Failed to construct 'Response': The provided value is not of type 'ResponseInit'.");void 0!==n.headers&&(nt(this).headers=new Ee(n.headers));let s=void 0===n.status?200:n.status;if(s<200||s>599)throw new RangeError(`Failed to construct 'Response': The status provided (${+s}) is outside the range [200, 599].`);r.status=s,r.statusText=void 0===n.statusText?"":""+n.statusText,Ne(this,e);let a=this.__Body__.payload;!this.headers.has("Content-Type")&&a&&a.type&&this.headers.set("Content-Type",a.type)}get headers(){return nt(this).headers||(nt(this).headers=new Ee),nt(this).headers}get ok(){return this.status>=200&&this.status<300}get redirected(){return!1}get status(){return nt(this).status}get statusText(){return nt(this).statusText}get type(){return nt(this).type}get url(){return nt(this).url}clone(){if(this.bodyUsed)throw new TypeError("Failed to execute 'clone' on 'Response': Response body is already used");let e=new et(null,{headers:new Ee(this.headers),status:this.status,statusText:this.statusText});return nt(e).url=this.url,e.__Body__.payload=this.__Body__.payload,e}toString(){return"[object Response]"}get[t](){return"Response"}get __MPHTTPX__(){return{chain:["Response","Body"]}}}class rt{constructor(){this.status=200,this.statusText="",this.type="default",this.url=""}}function nt(e){return e.__Response__}const ot="undefined"!=typeof Response&&Response||et,st={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"};function at(){let e,t="undefined",r="request",n="function";if(e=typeof wx!==t&&typeof(null===wx||void 0===wx?void 0:wx[r])===n&&wx||typeof my!==t&&typeof(null===my||void 0===my?void 0:my[r])===n&&my||typeof qq!==t&&typeof(null===qq||void 0===qq?void 0:qq[r])===n&&qq||typeof jd!==t&&typeof(null===jd||void 0===jd?void 0:jd[r])===n&&jd||typeof swan!==t&&typeof(null===swan||void 0===swan?void 0:swan[r])===n&&swan||typeof tt!==t&&typeof(null===tt||void 0===tt?void 0:tt[r])===n&&tt||typeof ks!==t&&typeof(null===ks||void 0===ks?void 0:ks[r])===n&&ks||typeof qh!==t&&typeof(null===qh||void 0===qh?void 0:qh[r])===n&&qh||typeof xhs!==t&&typeof(null===xhs||void 0===xhs?void 0:xhs[r])===n&&xhs||void 0,typeof XMLHttpRequest!==n||typeof WebSocket!==n)return void 0===e&&(e=typeof uni!==t&&typeof(null===uni||void 0===uni?void 0:uni[r])===n&&uni||typeof Taro!==t&&typeof(null===Taro||void 0===Taro?void 0:Taro[r])===n&&Taro||void 0),e}class it extends U{constructor(){if(new.target===it)throw new TypeError("Failed to construct 'XMLHttpRequestEventTarget': Illegal constructor");super(),o(this,"__XMLHttpRequestEventTarget__",new ut(this))}get onabort(){return lt(this).onabort}set onabort(e){lt(this).onabort=e,lt(this).attach("abort")}get onerror(){return lt(this).onerror}set onerror(e){lt(this).onerror=e,lt(this).attach("error")}get onload(){return lt(this).onload}set onload(e){lt(this).onload=e,lt(this).attach("load")}get onloadend(){return lt(this).onloadend}set onloadend(e){lt(this).onloadend=e,lt(this).attach("loadend")}get onloadstart(){return lt(this).onloadstart}set onloadstart(e){lt(this).onloadstart=e,lt(this).attach("loadstart")}get onprogress(){return lt(this).onprogress}set onprogress(e){lt(this).onprogress=e,lt(this).attach("progress")}get ontimeout(){return lt(this).ontimeout}set ontimeout(e){lt(this).ontimeout=e,lt(this).attach("timeout")}toString(){return"[object XMLHttpRequestEventTarget]"}get[t](){return"XMLHttpRequestEventTarget"}get __MPHTTPX__(){return{chain:["XMLHttpRequestEventTarget","EventTarget"]}}}class ut{constructor(e){var t;this.onabort=null,this.onerror=null,this.onload=null,this.onloadend=null,this.onloadstart=null,this.onprogress=null,this.ontimeout=null,this.attach=z(e,(t=e,{onabort:e=>{W(t,t.onabort,e)},onerror:e=>{W(t,t.onerror,e)},onload:e=>{W(t,t.onload,e)},onloadend:e=>{W(t,t.onloadend,e)},onloadstart:e=>{W(t,t.onloadstart,e)},onprogress:e=>{W(t,t.onprogress,e)},ontimeout:e=>{W(t,t.ontimeout,e)}}))}}function lt(e){return e.__XMLHttpRequestEventTarget__}class ct extends it{constructor(){if(new.target===ct)throw new TypeError("Failed to construct 'XMLHttpRequestUpload': Illegal constructor");super()}toString(){return"[object XMLHttpRequestUpload]"}get[t](){return"XMLHttpRequestUpload"}get __MPHTTPX__(){return{chain:["XMLHttpRequestUpload","XMLHttpRequestEventTarget","EventTarget"]}}}const ht={request:function(){let e=at();return e?e.request:function(e){const t="NOT_SUPPORTED_ERR",r={errMsg:t,errno:9,exception:{retryCount:0,reasons:[{errMsg:t,errno:9}]},useHttpDNS:!1};throw Promise.resolve(r).then(t=>{try{e.fail&&e.fail(t)}catch(e){console.error(e)}}).then(()=>{e.complete&&e.complete(r)}),new ReferenceError("request is not defined")}}()};function dt(e){ht.request=e}class pt extends it{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(),o(this,"__XMLHttpRequest__",new ft(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 gt(this).readyState}get response(){return gt(this).response}get responseText(){return gt(this).responseText}get responseType(){return gt(this).responseType}set responseType(e){if(gt(this).pos>9)throw new r("Failed to set the 'responseType' property on 'XMLHttpRequest': The response type cannot be set if the object's state is LOADING or DONE.","InvalidStateError");bt.indexOf(e)>-1&&(gt(this).responseType=e)}get responseURL(){return gt(this).responseURL}get responseXML(){return null}get status(){return gt(this).status}get statusText(){return gt(this).pos<9?"":gt(this).statusText||st[this.status]||"unknown"}get timeout(){return gt(this).timeout}set timeout(e){gt(this).timeout=e>=0?e:0}get upload(){return gt(this).upload||(gt(this).upload=function(){let e=Object.create(ct.prototype);return o(e,"__EventTarget__",new I),o(e,"__XMLHttpRequestEventTarget__",new ut(e)),e}()),gt(this).upload}get withCredentials(){return gt(this).withCredentials}set withCredentials(e){if(!(gt(this).pos<2))throw new TypeError("Failed to set the 'withCredentials' property on 'XMLHttpRequest': The value may only be set if the object's state is UNSENT or OPENED.");gt(this).withCredentials=!!e}abort(){const e=gt(this),t=e.requestTask;switch(e.pos){case 1:e.requestHeaders=new Ee;break;case 2:case 3:!function(e){gt(e).pos=5,wt(e,4),gt(e).upload&&Z(e.upload,"abort");xt(e,"abort")}(this),Rt(this);break;case 4:case 8:case 9:case 10:Pt(this);case 11:Rt(this)}mt(e),St(t)}getAllResponseHeaders(){const e=gt(this).responseHeaders;if(!e)return"";let t=[];return e.forEach((e,r)=>{t.push(`${r}: ${e}\r\n`)}),t.join("")}getResponseHeader(e){return i(arguments.length,1,"XMLHttpRequest","getResponseHeader"),gt(this).responseHeaders?gt(this).responseHeaders.get(e):null}open(e,t,r=!0,n=null,o=null){i(arguments.length,2,"XMLHttpRequest","open"),r||console.warn("Synchronous XMLHttpRequest is not supported because of its detrimental effects to the end user's experience.");let s=ke(e),a=""+t,u=""+(null!=n?n:""),l=""+(null!=o?o:"");const c=gt(this);if(mt(c),c.method=s,c.requestURL=a,c.requestHeaders=new Ee,u.length>0||l.length>0){let e=`Basic ${V(b(u+":"+l))}`;this.setRequestHeader("Authorization",e)}var h;gt(h=this).pos=1,gt(h).requestId+=1,wt(h,1)}overrideMimeType(e){i(arguments.length,1,"XMLHttpRequest","overrideMimeType"),1===gt(this).pos&&console.error(`TypeError: Failed to execute 'overrideMimeType' on 'XMLHttpRequest': mimeType ('${e}') not implemented.`)}send(e){const t=gt(this),n=t.requestId;if(1!==t.pos)throw new r("Failed to execute 'send' on 'XMLHttpRequest': The object's state must be OPENED.","InvalidStateError");const o={url:t.requestURL,method:t.method,header:yt(t.requestHeaders),dataType:"json"===this.responseType?"json":_t(this.responseType),responseType:_t(this.responseType),withCredentials:this.withCredentials,success:Tt.bind(this,n),fail:Et.bind(this,n)},s="GET"!==t.method&&"HEAD"!==t.method&&null!=e&&new Ce(e);s&&s.type&&!t.requestHeaders.has("Content-Type")&&(o.header["Content-Type"]=s.type);const a=function(e){n===t.requestId&&(2!==t.pos&&8!==t.pos||(o.data=""!==e?e:void 0,o.headers=o.header,t.requestTask=ht.request(o)))}.bind(this);!function(e){if(!e.timeout)return;const t=gt(e),r=()=>{switch(t.pos){case 2:case 3:!function(e){gt(e).pos=7,wt(e,4),gt(e).upload&&Z(e.upload,"timeout");xt(e,"timeout")}(e);break;case 8:At(e)}};t.timeoutId=setTimeout(()=>{let e=t.requestTask;r(),St(e)},e.timeout)}(this);const i=function(e,t){return gt(e).pos=2,Z(e,"loadstart"),t&&function(e,t){let r=gt(e),n=r.requestId;if(2!==r.pos)return;r.pos=3,r.upload&&Z(e.upload,"loadstart",0,t.size);return t.promise.then(o=>{if(n===r.requestId)return function(e,t,r){let n=gt(e);if(3!==n.pos)return;n.pos=4,n.upload&&t.size>0&&Z(e.upload,"load",t.size,t.size);return xt(e,"load",{payload:t,data:r})}(e,t,o)}).catch(t=>{n===r.requestId&&(!function(e){let t=gt(e);if(3!==t.pos)return;t.pos=6,wt(e,4),t.upload&&Z(e.upload,"error");xt(e,"error")}(e),console.error(t))})}(e,t)}(this,s||void 0);i?i.then(e=>{void 0!==e&&a(e)}):a()}setRequestHeader(e,t){if(i(arguments.length,2,"XMLHttpRequest","setRequestHeader"),1!==gt(this).pos)throw new r("Failed to execute 'setRequestHeader' on 'XMLHttpRequest': The object's state must be OPENED.","InvalidStateError");let n=""+e,o=""+t;try{gt(this).requestHeaders.append(n,o)}catch(e){throw new SyntaxError(`Failed to execute 'setRequestHeader' on 'XMLHttpRequest': '${n}' is not a valid HTTP header field name.`)}}get onreadystatechange(){return gt(this).onreadystatechange}set onreadystatechange(e){gt(this).onreadystatechange=e,gt(this).attach("readystatechange")}toString(){return"[object XMLHttpRequest]"}get[t](){return"XMLHttpRequest"}get __MPHTTPX__(){return{chain:["XMLHttpRequest","XMLHttpRequestEventTarget","EventTarget"]}}}class ft{constructor(e){var t;this.pos=0,this.readyState=0,this.response="",this.responseText="",this.responseType="",this.responseURL="",this.status=0,this.statusText="",this.timeout=0,this.withCredentials=!1,this.method="GET",this.requestURL="",this.requestHeaders=null,this.responseHeaders=null,this.timeoutId=0,this.requestId=0,this.requestTask=null,this.onreadystatechange=null,this.attach=z(e,(t=e,{onreadystatechange:e=>{W(t,t.onreadystatechange,e)}}))}}function gt(e){return e.__XMLHttpRequest__}function yt(e){let t={};return e.forEach((e,r)=>{t[r]=e}),t}const bt=["","arraybuffer","blob","document","json","text"];function _t(e){return"blob"===e||"arraybuffer"===e?"arraybuffer":"text"}function mt(e){e.requestTask=null,vt(e),e.response="",e.responseText="",e.responseURL="",e.status=0,e.statusText="",e.requestHeaders=null,e.responseHeaders=null}function vt(e){e.timeoutId&&(clearTimeout(e.timeoutId),e.timeoutId=0)}function Tt(e,t){e===gt(this).requestId&&function(e,t){let r=gt(e);if(2!==r.pos&&8!==r.pos)return;r.pos=9,r.responseURL=r.requestURL,r.status="statusCode"in t?t.statusCode:"status"in t?t.status:200,r.responseHeaders=new Ee("header"in t?t.header:"headers"in t?t.headers:{}),wt(e,2),function(e,t){if(9!==gt(e).pos)return;gt(e).pos=10,wt(e,3),function(e,t){let r=gt(e);if(10!==r.pos)return;r.pos=11;const n=()=>{var n;r.response=function(e,t){let r="string"==typeof t||h(t)?t:JSON.stringify(t);switch(e){case"":case"text":return"string"==typeof r?r:_(r);case"arraybuffer":return h(r)?r:b(r).buffer;case"json":return"string"==typeof t?JSON.parse(t):h(t)?JSON.parse(_(t)):t;case"blob":return new T([r]);default:return r}}(e.responseType,null!==(n=t.data)&&void 0!==n?n:""),e.responseType&&"text"!==e.responseType||(r.responseText=e.response),wt(e,4),function(e){let t=gt(e);if(11!==t.pos)return;t.pos=12;let r=t.responseHeaders.get("Content-Length"),n=r&&parseInt(r)||0;Z(e,"load",n,n),Ht(e,n)}(e)};try{n()}catch(t){qt(e),console.error(t)}}(e,t)}(e,t)}(this,t)}function Et(e,t){if("header"in t&&"statusCode"in t||"headers"in t&&"status"in t)return Tt.call(this,e,{statusCode:"statusCode"in t?t.statusCode:t.status||0,header:"header"in t?t.header:t.headers||{},data:"data"in t&&t.data||""});e===gt(this).requestId&&qt(this,t)}function wt(e,t){e.readyState!==t&&(gt(e).readyState=t,Xe(e,"readystatechange"))}function St(e){e&&"object"==typeof e&&"abort"in e&&"function"==typeof e.abort&&e.abort()}function Rt(e){gt(e).pos=0,gt(e).readyState=0}function xt(e,t,r){let n=gt(e);if(("load"===t&&4===n.pos||"load"!==t)&&(n.pos=8),n.upload){let t=r?r.payload.size:0;Z(e.upload,"loadend",t,t)}switch(t){case"load":return r&&r.data;case"abort":Pt(e);break;case"error":qt(e);break;case"timeout":At(e)}}function Pt(e){gt(e).pos=13,wt(e,4),Z(e,"abort"),Ht(e)}function qt(e,t){let r=gt(e);switch(r.pos){case 2:case 8:case 11:break;default:return}r.pos=14,t&&(r.status=0,r.statusText="errMsg"in t?t.errMsg:"errorMessage"in t?t.errorMessage:""),wt(e,4),Z(e,"error"),Ht(e)}function At(e){gt(e).pos=15,wt(e,4),Z(e,"timeout"),Ht(e)}function Ht(e,t=0){let r=gt(e);r.pos=16,r.requestTask=null,vt(r),Z(e,"loadend",t,t)}const Lt="undefined"!=typeof XMLHttpRequest&&XMLHttpRequest||pt,Ct={XMLHttpRequest:Lt};function Mt(e){Ct.XMLHttpRequest=e}function Ft(e,t){if(i(arguments.length,1,"Window","fetch"),new.target===Ft)throw new TypeError("fetch is not a constructor");return new Promise((n,o)=>{const s=new Ye(e,t),a=s.__Request__.signal;if(a&&a.aborted)return o(a.reason);let i=new Ct.XMLHttpRequest,u=!1,l=s.__Body__.payload;if(i.onload=()=>{let e={headers:Ot(i.getAllResponseHeaders()||""),status:i.status,statusText:i.statusText};0===s.url.indexOf("file://")&&(i.status<200||i.status>599)&&(e.status=200),setTimeout(()=>{const t=new et("response"in i?i.response:i.responseText,e);t.__Response__.url="responseURL"in i?i.responseURL:e.headers.get("X-Request-URL")||"";const r=t.__Body__.payload,o=t.headers.get("Content-Type")||"";r&&o&&(r.type=o),n(t)})},i.onerror=()=>{setTimeout(()=>{o(new TypeError("Failed to fetch"))})},i.ontimeout=()=>{setTimeout(()=>{o(new r("request:fail timeout","TimeoutError"))})},i.onabort=()=>{setTimeout(()=>{o(new r("The user aborted a request.","AbortError"))})},i.open(s.method,s.url,!0),"include"===s.credentials?i.withCredentials=!0:"omit"===s.credentials&&(i.withCredentials=!1),"responseType"in i&&(i.responseType="arraybuffer"),t&&"object"==typeof t&&t.headers&&"object"==typeof t.headers&&!Re(t.headers)){let e=t.headers,r=[];Object.getOwnPropertyNames(e).forEach(t=>{r.push(Ae(t)),i.setRequestHeader(t,He(e[t]))}),s.headers.forEach((e,t)=>{-1===r.indexOf(t)&&i.setRequestHeader(t,e)})}else s.headers.forEach((e,t)=>{i.setRequestHeader(t,e)});if(a){const e=()=>{u=!0,i.abort(),t()},t=()=>{a.removeEventListener("abort",e)};a.addEventListener("abort",e),i.onreadystatechange=()=>{4===i.readyState&&t()}}l?l.promise.then(e=>{u?o(new r("The user aborted a request.","AbortError")):i.send(""!==e?e:void 0)}).catch(e=>{console.error(e),o(new TypeError("Failed to fetch"))}):i.send()})}function Ot(e){let t=new Ee;return e.replace(/\r?\n[\t ]+/g," ").split("\r").map(e=>0===e.indexOf("\n")?e.substring(1,e.length):e).forEach(e=>{let r=e.split(":"),n=r.shift().trim();if(n){let e=r.join(":").trim();try{t.append(n,e)}catch(e){console.warn(`SyntaxError: Response.headers: '${n}' is not a valid HTTP header field name.`)}}}),t}const jt="undefined"!=typeof fetch&&fetch||Ft;class Bt{constructor(){o(this,"__AbortController__",new Nt)}get signal(){return(e=this,e.__AbortController__).signal;var e}abort(e){We(this.signal,!0,e)}toString(){return"[object AbortController]"}get[t](){return"AbortController"}get __MPHTTPX__(){return{chain:["AbortController"]}}}class Nt{constructor(){this.signal=Ve()}}const Dt="undefined"!=typeof AbortController&&AbortController||Bt;class Ut extends C{constructor(e,t){var r;i(arguments.length,1,"CustomEvent"),super(e,t),o(this,"__CustomEvent__",new It),kt(this).detail=null!==(r=null==t?void 0:t.detail)&&void 0!==r?r:null}get detail(){return kt(this).detail}initCustomEvent(e,t,r,n){i(arguments.length,1,"CustomEvent","initCustomEvent"),this.__Event__.eventDispatched||(this.initEvent(e,t,r),kt(this).detail=null!=n?n:null)}toString(){return"[object CustomEvent]"}get[t](){return"CustomEvent"}get __MPHTTPX__(){return{chain:["CustomEvent","Event"]}}}class It{}function kt(e){return e.__CustomEvent__}const Xt="undefined"!=typeof CustomEvent&&CustomEvent||Ut;class $t extends C{constructor(e,t){super(e,t),o(this,"__CloseEvent__",new Gt);const r=zt(this);let n=Number(null==t?void 0:t.code);r.code=isNaN(n)?0:n,void 0!==(null==t?void 0:t.reason)&&(r.reason=""+t.reason),r.wasClean=!!(null==t?void 0:t.wasClean)}get code(){return zt(this).code}get reason(){return zt(this).reason}get wasClean(){return zt(this).wasClean}toString(){return"[object CloseEvent]"}get[t](){return"CloseEvent"}get __MPHTTPX__(){return{chain:["CloseEvent","Event"]}}}class Gt{constructor(){this.code=0,this.reason="",this.wasClean=!1}}function zt(e){return e.__CloseEvent__}class Wt extends C{constructor(e,t){var r;super(e,t),o(this,"__MessageEvent__",new Vt);const n=Jt(this);n.data=null!==(r=null==t?void 0:t.data)&&void 0!==r?r:null,void 0!==(null==t?void 0:t.origin)&&(n.origin=""+t.origin),void 0!==(null==t?void 0:t.lastEventId)&&(n.lastEventId=""+t.lastEventId),void 0!==(null==t?void 0:t.source)&&(n.source=t.source),void 0!==(null==t?void 0:t.ports)&&(n.ports=t.ports)}get data(){return Jt(this).data}get lastEventId(){return Jt(this).lastEventId}get origin(){return Jt(this).origin}get ports(){return Jt(this).ports}get source(){return Jt(this).source}initMessageEvent(e,t,r,n,o,s,a,u){if(i(arguments.length,1,"MessageEvent","initMessageEvent"),this.__Event__.eventDispatched)return;this.initEvent(e,t,r);const l=Jt(this);l.data=null!=n?n:null,void 0!==o&&(l.origin=""+o),void 0!==s&&(l.lastEventId=""+s),void 0!==a&&(l.source=a),void 0!==u&&(l.ports=Array.from(u))}toString(){return"[object MessageEvent]"}get[t](){return"MessageEvent"}get __MPHTTPX__(){return{chain:["MessageEvent","Event"]}}}class Vt{constructor(){this.data=null,this.lastEventId="",this.origin="",this.ports=[],this.source=null}}function Jt(e){return e.__MessageEvent__}const Yt={connectSocket:function(){let e=at();return e?e.connectSocket:function(e){return{send(e){},close(e){},onOpen(e){},onMessage(e){},onError(e){"function"==typeof e&&e({errMsg:"NOT_SUPPORTED_ERR"})},onClose(e){"function"==typeof e&&setTimeout(()=>{e({code:3009,reason:"NOT_SUPPORTED_ERR"})})}}}}()};function Kt(e){Yt.connectSocket=e}class Qt extends U{static get CONNECTING(){return 0}static get OPEN(){return 1}static get CLOSING(){return 2}static get CLOSED(){return 3}constructor(e,t){i(arguments.length,1,"WebSocket"),super();const r=""+e,n=Yt.connectSocket({url:r,protocols:void 0!==t?v(t)?Array.isArray(t)?t:Array.from(t):[""+t]:[],multiple:!0,fail(e){console.error(e)}});if(o(this,"__WebSocket__",new Zt(this,n)),er(this).url=r,!n||"object"!=typeof n)throw new Error(`connectSocket can't establish a connection to the server at ${""+e}.`);var s;!function(e){let t=er(e);t.socketTask.onOpen(r=>{if("header"in r&&r.header&&"object"==typeof r.header){let e=new Ee(r.header);t.protocol=e.get("Sec-WebSocket-Protocol")||""}t.readyState=1,Xe(e,"open")})}(this),function(e){let t=er(e);t.socketTask.onClose(r=>{t.readyState=3;let n=new $t("close",{wasClean:!t.error,code:r.code,reason:r.reason});B(n,!0),X(e,n)})}(this),function(e){let t=er(e);t.socketTask.onError(r=>{console.error(r),t.error=r,t.readyState=3,Xe(e,"error")})}(this),er(s=this).socketTask.onMessage(e=>{let t,r=e.data;if(r&&"object"==typeof r&&"data"in r){if(t=r.data,"isBuffer"in r&&r.isBuffer&&"string"==typeof t)try{t=my.base64ToArrayBuffer(t)}catch(e){}}else t=r;h(t)&&"blob"===s.binaryType&&(t=new T([t]));let n=new Wt("message",{data:t,origin:s.url});B(n,!0),X(s,n)})}get CONNECTING(){return 0}get OPEN(){return 1}get CLOSING(){return 2}get CLOSED(){return 3}get binaryType(){return er(this).binaryType}set binaryType(e){"blob"!==e&&"arraybuffer"!==e||(er(this).binaryType=e)}get bufferedAmount(){return er(this).bufferedAmount}get extensions(){return""}get protocol(){return er(this).protocol}get readyState(){return er(this).readyState}get url(){return er(this).url}close(e,t){let r=er(this);2!==this.readyState&&3!==this.readyState&&(r.readyState=2,r.socketTask.close({code:e,reason:t,fail(e){console.error(e)},complete:()=>{r.readyState=3}}))}send(e){if(i(arguments.length,1,"WebSocket","send"),0===this.readyState)throw new r("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.");const t=function(e){1===this.readyState&&er(this).socketTask.send({data:e,fail(e){console.error(e)}})}.bind(this);new Ce(null!=e?e:""+e).promise.then(t)}get onclose(){return er(this).onclose}set onclose(e){er(this).onclose=e,er(this).attach("close")}get onerror(){return er(this).onerror}set onerror(e){er(this).onerror=e,er(this).attach("error")}get onmessage(){return er(this).onmessage}set onmessage(e){er(this).onmessage=e,er(this).attach("message")}get onopen(){return er(this).onopen}set onopen(e){er(this).onopen=e,er(this).attach("open")}toString(){return"[object WebSocket]"}get[t](){return"WebSocket"}get __MPHTTPX__(){return{chain:["WebSocket","EventTarget"]}}}class Zt{constructor(e,t){var r;this.binaryType="blob",this.bufferedAmount=0,this.protocol="",this.readyState=0,this.url="",this.error=null,this.onclose=null,this.onerror=null,this.onmessage=null,this.onopen=null,this.socketTask=t,this.attach=z(e,(r=e,{onclose:e=>{W(r,r.onclose,e)},onerror:e=>{W(r,r.onerror,e)},onmessage:e=>{W(r,r.onmessage,e)},onopen:e=>{W(r,r.onopen,e)}}))}}function er(e){return e.__WebSocket__}const tr="undefined"!=typeof WebSocket&&WebSocket||Qt;export{Dt as AbortController,Bt as AbortControllerP,Je as AbortSignal,$e as AbortSignalP,P as Blob,T as BlobP,Xt as CustomEvent,Ut as CustomEventP,N as Event,C as EventP,G as EventTarget,U as EventTargetP,L as File,q as FileP,ae as FileReader,ee as FileReaderP,Te as FormData,ye as FormDataP,Le as Headers,Ee as HeadersP,Ze as Request,Ye as RequestP,ot as Response,et as ResponseP,y as TextDecoder,p as TextDecoderP,c as TextEncoder,u as TextEncoderP,ge as URLSearchParams,ue as URLSearchParamsP,tr as WebSocket,Qt as WebSocketP,Lt as XMLHttpRequest,pt as XMLHttpRequestP,jt as fetch,Ft as fetchP,Kt as setConnectSocket,dt as setRequest,Mt as setXMLHttpRequest};
|
|
1
|
+
function e(e,t,n){return t=o(t),function(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,a()?Reflect.construct(t,n||[],o(e).constructor):t.apply(e,n))}function t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,u(r.key),r)}}function r(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function o(e){return o=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},o(e)}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&s(e,t)}function a(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(a=function(){return!!e})()}function s(e,t){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},s(e,t)}function u(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==typeof t?t:t+""}function c(e){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c(e)}function l(e){var t="function"==typeof Map?new Map:void 0;return l=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return function(e,t,n){if(a())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,t);var o=new(e.bind.apply(e,r));return n&&s(o,n.prototype),o}(e,arguments,o(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),s(n,e)},l(e)}var f={iterator:"function"==typeof Symbol&&Symbol.iterator||"Symbol(Symbol.iterator)",toStringTag:"function"==typeof Symbol&&Symbol.toStringTag||"Symbol(Symbol.toStringTag)"},h=function(n,o){function a(n,r){var o;return t(this,a),o=e(this,a,[n]),void 0!==r&&(o.name=""+r),o}return i(a,n),r(a,[{key:o,get:function(){return"DOMException"}},{key:"__MPHTTPX__",get:function(){return{chain:["DOMException"]}}}])}(l(Error),f.toStringTag),d=function(){try{return new DOMException,!0}catch(e){return!1}}()?DOMException:h;function p(e){try{return e.__MPHTTPX__.chain[0]}catch(t){return Object.prototype.toString.call(e).slice(8,-1)}}function y(e,t,n){Object.defineProperty(e,t,{value:n})}function v(e,t){return Object.prototype.toString.call(t)==="[object ".concat(e,"]")}function g(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o="__MPHTTPX__";return!!t&&"object"===c(t)&&o in t&&!!t[o]&&"object"===c(t[o])&&"chain"in t[o]&&Array.isArray(t[o].chain)&&(n=t[o].chain.indexOf(e),r?0===n:n>-1)}var m="function"==typeof Symbol&&!!Symbol.iterator;function b(e){return Array.isArray(e)||!!e&&"object"===c(e)&&m&&Symbol.iterator in e&&"function"==typeof e[Symbol.iterator]}function _(e){var t,n,r,o=0,i=(t={next:function(){return o<e.length?{value:e[o++],done:!1}:{value:void 0,done:!0}}},r=function(){return i},(n=u(n=f.iterator))in t?Object.defineProperty(t,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[n]=r,t);return i}function k(e,t,n,r){if(e<t)throw new TypeError("Failed to ".concat(r?"execute '"+r+"' on":"construct"," '").concat(n,"': ").concat(t," argument").concat(t>1?"s":""," required, but only ").concat(e," present."))}var w=function(){return r(function e(){t(this,e)},[{key:"encoding",get:function(){return"utf-8"}},{key:"encode",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return T("string"==typeof e?e:""+e).encoded}},{key:"encodeInto",value:function(e,t){if(k(arguments.length,2,"TextEncoder","encodeInto"),!Uint8Array.prototype.isPrototypeOf(t)&&!v("Uint8Array",t))throw new TypeError("Failed to execute 'encodeInto' on 'TextEncoder': parameter 2 is not of type 'Uint8Array'.");var n=T("string"==typeof e?e:""+e,t);return{read:n.read,written:n.written}}},{key:"toString",value:function(){return"[object TextEncoder]"}},{key:f.toStringTag,get:function(){return"TextEncoder"}},{key:"__MPHTTPX__",get:function(){return{chain:["TextEncoder"]}}}])}();function T(e,t){for(var n=void 0!==t,r=0,o=0,i=e.length,a=0,s=Math.max(32,i+(i>>1)+7),u=n?t:new Uint8Array(s>>3<<3),c=0,l=0,f=0;r<i;){if(l=1,(c=e.charCodeAt(r))>=55296&&c<=56319)if(r+1<i){var h=e.charCodeAt(r+1);56320==(64512&h)?(l=2,r+=2,c=((1023&c)<<10)+(1023&h)+65536):(r+=1,c=65533)}else r+=1,c=65533;else c>=56320&&c<=57343?(r+=1,c=65533):r+=1;if(!n&&a+4>u.length){s+=8,s=(s*=1+r/e.length*2)>>3<<3;var d=new Uint8Array(s);d.set(u),u=d}if(4294967168&c?4294965248&c?4294901760&c?4292870144&c?(c=65533,f=3):f=4:f=3:f=2:f=1,n&&a+f>u.length)break;switch(f){case 1:u[a++]=c;break;case 2:u[a++]=c>>6&31|192,u[a++]=63&c|128;break;case 3:u[a++]=c>>12&15|224,u[a++]=c>>6&63|128,u[a++]=63&c|128;break;case 4:u[a++]=c>>18&7|240,u[a++]=c>>12&63|128,u[a++]=c>>6&63|128,u[a++]=63&c|128}o+=l}return{encoded:n?t:u.slice(0,a),read:o,written:a}}var E="undefined"!=typeof TextEncoder&&TextEncoder||w,S=["utf-8","utf8","unicode-1-1-utf-8"],R=function(){return r(function e(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"utf-8",r=arguments.length>1?arguments[1]:void 0;if(t(this,e),-1===S.indexOf(("string"==typeof n?n:""+n).toLowerCase()))throw new RangeError("Failed to construct 'TextDecoder': encoding ('".concat(n,"') not implemented."));y(this,"__TextDecoder__",new P(r))},[{key:"encoding",get:function(){return"utf-8"}},{key:"fatal",get:function(){return x(this).fatal}},{key:"ignoreBOM",get:function(){return x(this).ignoreBOM}},{key:"decode",value:function(e,t){return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.stream,r=void 0!==n&&n,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{fatal:!1,ignoreBOM:!1,partial:[]};if(void 0===e){if(o.partial.length>0&&o.fatal)throw o.partial=[],new TypeError("Incomplete UTF-8 sequence.");return""}var i=C(e)?new Uint8Array(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):function(){throw new TypeError("Input could not be converted to any of: ArrayBufferView, ArrayBuffer.")}();if(o.partial.length>0){var a=new Uint8Array(o.partial.length+i.length);a.set(o.partial,0),a.set(i,o.partial.length),i=a,o.partial=[]}!o.ignoreBOM&&i.length>=3&&239===i[0]&&187===i[1]&&191===i[2]&&(i=i.subarray(3));var s=i.length,u=[];if(r&&i.length>0){for(var c=i.length;c>0&&c>i.length-4;){var l=i[c-1];if(128!=(192&l)){(l>239?4:l>223?3:l>191?2:1)>i.length-(c-1)&&(s=c-1);break}--c}o.partial=Array.from(i.slice(s)),i=i.slice(0,s)}var f=0,h=0,d=0,p=0,y=0,v=0,g=0,m=0;for(;m<s;){if(f=0,m+(d=(p=i[m])>239?4:p>223?3:p>191?2:1)<=s)switch(d){case 1:p<128&&(f=p);break;case 2:128==(192&(y=i[m+1]))&&(h=(31&p)<<6|63&y)>127&&(f=h);break;case 3:y=i[m+1],v=i[m+2],128==(192&y)&&128==(192&v)&&(h=(15&p)<<12|(63&y)<<6|63&v)>2047&&(h<55296||h>57343)&&(f=h);break;case 4:y=i[m+1],v=i[m+2],g=i[m+3],128==(192&y)&&128==(192&v)&&128==(192&g)&&(h=(15&p)<<18|(63&y)<<12|(63&v)<<6|63&g)>65535&&h<1114112&&(f=h)}if(0===f&&(1===d&&0!==p||d>1)){if(o.fatal)throw o.partial=[],new TypeError("Decoding failed.");for(var b=1;m+b<s&&128==(192&i[m+b]);)b+=1;u.push(65533),m+=b}else f>65535&&(f-=65536,u.push(f>>>10&1023|55296),f=56320|1023&f),u.push(f),m+=d}return u.length>16384?function(e){for(var t=[],n=0,r=e.length;n<r;n+=4096)t.push(String.fromCharCode.apply(String,e.slice(n,n+4096)));return t.join("")}(u):function(e){for(var t="",n=0,r=e.length;n<r;n+=4096)t+=String.fromCharCode.apply(String,e.slice(n,n+4096));return t}(u)}(e,t,x(this))}},{key:"toString",value:function(){return"[object TextDecoder]"}},{key:f.toStringTag,get:function(){return"TextDecoder"}},{key:"__MPHTTPX__",get:function(){return{chain:["TextDecoder"]}}}])}(),P=r(function e(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=n.fatal,o=void 0!==r&&r,i=n.ignoreBOM,a=void 0!==i&&i;t(this,e),this.partial=[],this.fatal=!!o,this.ignoreBOM=!!a});function x(e){return e.__TextDecoder__}function C(e){return!!e&&"object"===c(e)&&ArrayBuffer.prototype.isPrototypeOf(e)||function(e){return(v("ArrayBuffer",e)||"[object ArrayBuffer]"===String(e))&&!!e&&"object"===c(e)&&"byteLength"in e&&"number"==typeof e.byteLength}(e)}var A="undefined"!=typeof TextDecoder&&TextDecoder||R,q=function(){return r(function e(n,r){t(this,e),k(arguments.length,1,"Event"),y(this,"__Event__",new L);var o=H(this);o.type=""+n,o.bubbles=!!(null==r?void 0:r.bubbles),o.cancelable=!!(null==r?void 0:r.cancelable),o.composed=!!(null==r?void 0:r.composed),Object.defineProperty(this,"isTrusted",{enumerable:!0,get:function(){return"YES"===o.isTrusted}})},[{key:"NONE",get:function(){return 0}},{key:"CAPTURING_PHASE",get:function(){return 1}},{key:"AT_TARGET",get:function(){return 2}},{key:"BUBBLING_PHASE",get:function(){return 3}},{key:"bubbles",get:function(){return H(this).bubbles}},{key:"cancelBubble",get:function(){return H(this).cancelBubble},set:function(e){e&&(H(this).cancelBubble=!0)}},{key:"cancelable",get:function(){return H(this).cancelable}},{key:"composed",get:function(){return H(this).composed}},{key:"currentTarget",get:function(){return H(this).currentTarget}},{key:"defaultPrevented",get:function(){return H(this).defaultPrevented}},{key:"eventPhase",get:function(){return H(this).eventPhase}},{key:"returnValue",get:function(){return H(this).returnValue},set:function(e){e||this.preventDefault()}},{key:"srcElement",get:function(){return H(this).target}},{key:"target",get:function(){return H(this).target}},{key:"timeStamp",get:function(){return H(this).timeStamp}},{key:"type",get:function(){return H(this).type}},{key:"composedPath",value:function(){var e=this.target?[this.target]:[];return this.currentTarget&&this.currentTarget!==this.target&&e.push(this.currentTarget),e}},{key:"initEvent",value:function(e,t,n){k(arguments.length,1,p(this),"initEvent");var r=H(this);r.eventDispatched||(r.type=""+e,r.bubbles=!!t,r.cancelable=!!n)}},{key:"preventDefault",value:function(){var e=H(this);if(e.passive)return console.warn("Ignoring 'preventDefault()' call on event of type '".concat(this.type,"' from a listener registered as 'passive'."));this.cancelable&&(e.defaultPrevented=!0,e.returnValue=!1)}},{key:"stopImmediatePropagation",value:function(){H(this).immediatePropagationStopped=!0,this.cancelBubble=!0}},{key:"stopPropagation",value:function(){this.cancelBubble=!0}},{key:"toString",value:function(){return"[object Event]"}},{key:f.toStringTag,get:function(){return"Event"}},{key:"__MPHTTPX__",get:function(){return{chain:["Event"]}}}],[{key:"NONE",get:function(){return 0}},{key:"CAPTURING_PHASE",get:function(){return 1}},{key:"AT_TARGET",get:function(){return 2}},{key:"BUBBLING_PHASE",get:function(){return 3}}])}(),L=r(function e(){t(this,e),this.bubbles=!1,this.cancelBubble=!1,this.cancelable=!1,this.composed=!1,this.currentTarget=null,this.defaultPrevented=!1,this.eventPhase=0,this.returnValue=!0,this.target=null,this.timeStamp=(new Date).getTime()-O,this.type="",this.passive=!1,this.eventDispatched=!1,this.immediatePropagationStopped=!1,Object.defineProperty(this,"isTrusted",M())});function H(e){return e.__Event__}var O=(new Date).getTime();function j(e){return"name"in e?e.name:"unknown"}function M(){var e=j(M),t=e.length,n="NO";return{configurable:!1,enumerable:!0,get:function(){return n},set:function(r){e===r.slice(0,t)&&(n=r.slice(t+1))}}}function F(e,t){(H(e)||{}).isTrusted="".concat(j(M),":").concat(t?"YES":"NO")}var U="undefined"!=typeof Event&&Event||q,B=function(){return r(function e(){t(this,e),y(this,"__EventTarget__",new D)},[{key:"addEventListener",value:function(e,t,n){if(k(arguments.length,2,p(this),"addEventListener"),"function"!=typeof t&&"object"!==c(t)&&void 0!==t)throw new TypeError("Failed to execute 'addEventListener' on '".concat(p(this),"': parameter 2 is not of type 'Object'."));var r=N(this)||{executors:[]},o=new I(e,t),i=o.options.capture="boolean"==typeof n?n:!!(null==n?void 0:n.capture);if(!r.executors.some(function(e){return e.equals(o)})){if(r.executors.push(o),n&&"object"===c(n)){o.options.once=!!n.once,o.options.passive=!!n.passive;var a=n.signal;a&&W(a)&&!a.aborted&&(o.options.signal=a,function(e,t,n){var r=function(){N(e).executors=N(e).executors.filter(function(e){return!e.equals(t)}),n.removeEventListener("abort",r)};n.addEventListener("abort",r)}(this,o,a))}if(i){var s=function(e){return e.options.capture?0:1};r.executors=r.executors.sort(function(e,t){return s(e)-s(t)})}}}},{key:"dispatchEvent",value:function(e){if(k(arguments.length,1,p(this),"dispatchEvent"),g("Event",e))F(e,!1);else{if(n=function(e){return"[object "===e.slice(0,8)&&"Event]"===e.slice(-6)},!(t=e)||"object"!==c(t)||!n(Object.prototype.toString.call(t))&&!n(String(t))||!("type"in t)||"string"!=typeof t.type)throw new TypeError("Failed to execute 'dispatchEvent' on '".concat(p(this),"': parameter 1 is not of type 'Event'."));console.warn("WARNING: undefined behavior when executing 'dispatchEvent' on '".concat(p(this),"': parameter 1 is not of type 'Event(P)'."))}var t,n;return X(this,e)}},{key:"removeEventListener",value:function(e,t,n){if(k(arguments.length,2,p(this),"removeEventListener"),"function"!=typeof t&&"object"!==c(t)&&void 0!==t)throw new TypeError("Failed to execute 'removeEventListener' on '".concat(p(this),"': parameter 2 is not of type 'Object'."));var r=N(this)||{executors:[]},o=new I(e,t);o.options.capture="boolean"==typeof n?n:!!(null==n?void 0:n.capture),r.executors.some(function(e){return e.equals(o)})&&(r.executors=r.executors.filter(function(e){return!e.equals(o)}))}},{key:"toString",value:function(){return"[object EventTarget]"}},{key:f.toStringTag,get:function(){return"EventTarget"}},{key:"__MPHTTPX__",get:function(){return{chain:["EventTarget"]}}}])}(),D=r(function e(){t(this,e),this.executors=[]});function N(e){return e.__EventTarget__}var I=function(){return r(function e(n,r){var o;t(this,e),this.options={},this.type=""+n,this.callback="function"==typeof(o=r)?o:function(e){return!!e&&"object"===c(e)&&"handleEvent"in e&&"function"==typeof e.handleEvent}(o)?o.handleEvent:o},[{key:"equals",value:function(e){return this.type===e.type&&this.callback===e.callback&&this.options.capture===e.options.capture}}])}();function X(e,t){var n=N(e)||{},r=t.__Event__||{};r.target=e,r.currentTarget=e,r.eventPhase=2,r.eventDispatched=!0;var o=[];Array.isArray(n.executors)||(n.executors=[]);for(var i=0;i<n.executors.length&&!r.immediatePropagationStopped;++i){var a=n.executors[i];if(a.type===t.type){a.options.once&&o.push(i),r.passive=!!a.options.passive;try{var s=a.callback;"function"==typeof s&&s.call(e,t)}catch(e){console.error(e)}r.passive=!1}}return o.length>0&&(n.executors=n.executors.reduce(function(e,t,n){return-1===o.indexOf(n)&&e.push(t),e},[])),r.currentTarget=null,r.eventPhase=0,r.eventDispatched=!1,!(t.cancelable&&t.defaultPrevented)}function z(e,t){return function(n){var r="on"+n,o=e[r],i=t[r];"function"==typeof o?B.prototype.addEventListener.call(e,n,i):B.prototype.removeEventListener.call(e,n,i)}}function G(e,t,n){"function"==typeof t&&t.call(e,n)}function W(e){return g("EventTarget",e)||function(e){return!!e&&"object"===c(e)&&"addEventListener"in e&&"function"==typeof e.addEventListener&&"removeEventListener"in e&&"function"==typeof e.removeEventListener}(e)}var V="undefined"!=typeof EventTarget&&EventTarget||B,$=function(n,o){function a(n,r){var o,i;return t(this,a),k(arguments.length,1,"CustomEvent"),y(o=e(this,a,[n,r]),"__CustomEvent__",new J),K(o).detail=null!==(i=null==r?void 0:r.detail)&&void 0!==i?i:null,o}return i(a,q),r(a,[{key:"detail",get:function(){return K(this).detail}},{key:"initCustomEvent",value:function(e,t,n,r){k(arguments.length,1,"CustomEvent","initCustomEvent"),this.__Event__.eventDispatched||(this.initEvent(e,t,n),K(this).detail=null!=r?r:null)}},{key:"toString",value:function(){return"[object CustomEvent]"}},{key:o,get:function(){return"CustomEvent"}},{key:"__MPHTTPX__",get:function(){return{chain:["CustomEvent","Event"]}}}])}(0,f.toStringTag),J=r(function e(){t(this,e)});function K(e){return e.__CustomEvent__}var Y="undefined"!=typeof CustomEvent&&CustomEvent||$,Q=function(n,o){function a(){var n;if(t(this,a),(n=e(this,a)).constructor===a)throw new TypeError("Failed to construct 'AbortSignal': Illegal constructor");return y(n,"__AbortSignal__",new Z(n)),n}return i(a,B),r(a,[{key:"aborted",get:function(){return ee(this).aborted}},{key:"reason",get:function(){return ee(this).reason}},{key:"throwIfAborted",value:function(){if(this.aborted)throw this.reason}},{key:"onabort",get:function(){return ee(this).onabort},set:function(e){ee(this).onabort=e,ee(this).attach("abort")}},{key:"toString",value:function(){return"[object AbortSignal]"}},{key:o,get:function(){return"AbortSignal"}},{key:"__MPHTTPX__",get:function(){return{chain:["AbortSignal","EventTarget"]}}}],[{key:"abort",value:function(e){var t=te();return ne(t,!1,e),t}},{key:"any",value:function(e){if(k(arguments.length,1,"AbortSignal","any"),!b(e))throw new TypeError("Failed to execute 'any' on 'AbortSignal': The provided value cannot be converted to a sequence.");var t=Array.isArray(e)?e:Array.from(e);t.forEach(function(e){if(!W(e))throw new TypeError("Failed to execute 'any' on 'AbortSignal': Failed to convert value to 'AbortSignal'.")});var n=te(),r=function(){for(var e=0;e<t.length;++e){var n=t[e];if(n.aborted)return n}}();return r?ne(n,!1,r.reason):function(e,t){function n(){for(var r=0;r<t.length;++r){t[r].removeEventListener("abort",n)}ne(e,!0,this.reason)}for(var r=0;r<t.length;++r){t[r].addEventListener("abort",n)}}(n,t),n}},{key:"timeout",value:function(e){if(k(arguments.length,1,"AbortSignal","timeout"),!(e>=0))throw new TypeError("Failed to execute 'timeout' on 'AbortSignal': Value is outside the 'unsigned long long' value range.");var t=te();return setTimeout(function(){ne(t,!0,new d("signal timed out","TimeoutError"))},e),t}}])}(0,f.toStringTag),Z=r(function e(n){var r;t(this,e),this.aborted=!1,this.reason=void 0,this.onabort=null,this.attach=z(n,(r=n,{onabort:function(e){G(r,r.onabort,e)}}))});function ee(e){return e.__AbortSignal__}function te(){var e=Object.create(Q.prototype);return y(e,"__EventTarget__",{executors:[]}),y(e,"__AbortSignal__",new Z(e)),e}function ne(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2?arguments[2]:void 0;if(!e.aborted){var r=ee(e)||{};if(r.aborted=!0,r.reason=void 0!==n?n:new d("signal is aborted without reason","AbortError"),t){var o=new q("abort");o.__Event__.target=e,F(o,!0),X(e,o)}}}var re="undefined"!=typeof AbortSignal&&AbortSignal||Q,oe=function(){return r(function e(){t(this,e),y(this,"__AbortController__",new ie)},[{key:"signal",get:function(){return(e=this,e.__AbortController__).signal;var e}},{key:"abort",value:function(e){ne(this.signal,!0,e)}},{key:"toString",value:function(){return"[object AbortController]"}},{key:f.toStringTag,get:function(){return"AbortController"}},{key:"__MPHTTPX__",get:function(){return{chain:["AbortController"]}}}])}(),ie=r(function e(){t(this,e),this.signal=te()});var ae="undefined"!=typeof AbortController&&AbortController||oe,se=E.prototype.encode.bind(new E),ue=A.prototype.decode.bind(new A),ce={ReadableStream:"undefined"!=typeof ReadableStream&&ReadableStream||void 0};function le(e){ce.ReadableStream=e}var fe=function(){function e(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],r=arguments.length>1?arguments[1]:void 0;if(t(this,e),!b(n))throw new TypeError("Failed to construct 'Blob/File': The provided value cannot be converted to a sequence.");for(var o=Array.isArray(n)?n:Array.from(n),i=[],a=0,s=0;s<o.length;++s){var u=o[s];if(ge(u))a+=u.size,i.push(u.arrayBuffer().then(function(e){return new Uint8Array(e)}));else{var c=C(u)||ArrayBuffer.isView(u)?pe(u):se(u);a+=c.length,i.push(Promise.resolve(c))}}y(this,"__Blob__",new he(Promise.all(i).then(function(e){return function(e){var t=e.reduce(function(e,t){return e+t.byteLength},0),n=new Uint8Array(t);return e.reduce(function(e,t){return n.set(t,e),e+t.byteLength},0),n}(e)}))),de(this).size=a,de(this).type=ye(null==r?void 0:r.type)}return r(e,[{key:"size",get:function(){return de(this).size}},{key:"type",get:function(){return de(this).type}},{key:"arrayBuffer",value:function(){return de(this).promise.then(function(e){return ve(e.buffer).buffer})}},{key:"bytes",value:function(){return de(this).promise.then(function(e){return ve(e.buffer)})}},{key:"slice",value:function(t,n,r){var o=null!=t?t:0,i=null!=n?n:this.size,a=Object.create(e.prototype);return y(a,"__Blob__",new he(de(this).promise.then(function(e){return ve(e.slice(o,i))}))),de(a).size=function(e,t,n){var r=function(t){var n=Number(t);return isNaN(n)&&(n=0),n=n>=0?Math.min(n,e):Math.max(0,n+e)};return Math.max(0,r(n)-r(t))}(this.size,o,i),de(a).type=ye(r),a}},{key:"stream",value:function(){var e=ce.ReadableStream||function(){throw new ReferenceError("ReadableStream is not defined")}(),t=0;try{return new e({type:"bytes",autoAllocateChunkSize:524288,pull:function(e){var n,r=null===(n=e.byobRequest)||void 0===n?void 0:n.view;return this.slice(t,(null==r?void 0:r.byteLength)?t+r.byteLength:void 0).arrayBuffer().then(function(n){var o,i=new Uint8Array(n),a=i.byteLength;t+=a,r.set(i),null===(o=e.byobRequest)||void 0===o||o.respond(a),t>=this.size&&e.close()}.bind(this))}.bind(this)})}catch(n){return new e({pull:function(e){return this.slice(t,t+524288).arrayBuffer().then(function(n){t+=n.byteLength;var r=new Uint8Array(n);e.enqueue(r),t==this.size&&e.close()}.bind(this))}.bind(this)})}}},{key:"text",value:function(){return de(this).promise.then(function(e){return ue(e)})}},{key:"toString",value:function(){return"[object Blob]"}},{key:f.toStringTag,get:function(){return"Blob"}},{key:"__MPHTTPX__",get:function(){return{chain:["Blob"]}}}])}(),he=r(function e(n){t(this,e),this.size=0,this.type="",this.promise=n});function de(e){return e.__Blob__}function pe(e){return C(e)?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}function ye(e){var t=""+(void 0!==e?e:"");return/[^\u0020-\u007E]/.test(t)?"":t.toLowerCase()}function ve(e){var t=pe(e),n=new Uint8Array(new ArrayBuffer(t.byteLength));return n.set(t),n}function ge(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return g("Blob",e,t)||function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=["[object Blob]"];t||n.push("[object File]");return(n.indexOf(Object.prototype.toString.call(e))>-1||n.indexOf(String(e))>-1)&&!!e&&"object"===c(e)&&"size"in e&&"number"==typeof e.size&&"arrayBuffer"in e&&"function"==typeof e.arrayBuffer}(e,t)}var me=function(){try{return 2===new Blob(["ä"]).size}catch(e){return!1}}()?Blob:fe;function be(n){var o=function(n,o){function a(n,r,o){var i;return t(this,a),k(arguments.length,2,"File"),y(i=e(this,a,[n,o]),"__File__",new _e),ke(i).lastModified=+((null==o?void 0:o.lastModified)?new Date(o.lastModified):new Date)||0,ke(i).name=""+r,i}return i(a,n),r(a,[{key:"lastModified",get:function(){return ke(this).lastModified}},{key:"name",get:function(){return ke(this).name}},{key:"webkitRelativePath",get:function(){return""}},{key:"toString",value:function(){return"[object File]"}},{key:o,get:function(){return"File"}}])}(n,f.toStringTag);return n===fe&&Object.defineProperty(o.prototype,"__MPHTTPX__",{configurable:!0,get:function(){return{chain:["File","Blob"]}}}),o}var _e=r(function e(){t(this,e),this.lastModified=0,this.name=""});function ke(e){return e.__File__}var we=be(fe),Te=function(){try{return new File([],""),!0}catch(e){return!1}}()?File:me===fe?we:be(me),Ee=["loaded","total"],Se=function(n,o){function a(n,r){var o,i,s;t(this,a),y(o=e(this,a,[n,r]),"__ProgressEvent__",new Re);var u=Pe(o);u.lengthComputable=!!(null==r?void 0:r.lengthComputable),u.loaded=Number(null!==(i=null==r?void 0:r.loaded)&&void 0!==i?i:0),u.total=Number(null!==(s=null==r?void 0:r.total)&&void 0!==s?s:0);for(var c=0;c<Ee.length;++c){var l=Ee[c];if(isNaN(o[l]))throw new TypeError("Failed to construct 'ProgressEvent': Failed to read the '".concat(l,"' property from 'ProgressEventInit': The provided double value is non-finite."))}return o}return i(a,q),r(a,[{key:"lengthComputable",get:function(){return Pe(this).lengthComputable}},{key:"loaded",get:function(){return Pe(this).loaded}},{key:"total",get:function(){return Pe(this).total}},{key:"toString",value:function(){return"[object ProgressEvent]"}},{key:o,get:function(){return"ProgressEvent"}},{key:"__MPHTTPX__",get:function(){return{chain:["ProgressEvent","Event"]}}}])}(0,f.toStringTag),Re=r(function e(){t(this,e),this.lengthComputable=!1,this.loaded=0,this.total=0});function Pe(e){return e.__ProgressEvent__}function xe(e,t){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,r=new Se(t,{lengthComputable:n>0,loaded:arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,total:n});r.__Event__.target=e,F(r,!0),X(e,r)}var Ce=function(n,o){function a(){var n;return t(this,a),y(n=e(this,a),"__FileReader__",new Ae(n)),n}return i(a,B),r(a,[{key:"EMPTY",get:function(){return 0}},{key:"LOADING",get:function(){return 1}},{key:"DONE",get:function(){return 2}},{key:"error",get:function(){return qe(this).error}},{key:"readyState",get:function(){return qe(this).readyState}},{key:"result",get:function(){return qe(this).result}},{key:"abort",value:function(){var e,t;2===qe(this).pos&&((t=qe(e=this)).pos=5,t.error=new d("An ongoing operation was aborted, typically with a call to abort().","AbortError"),t.result=null,t.readyState=2,xe(e,"abort"),Oe(e))}},{key:"readAsArrayBuffer",value:function(e){Le(this,"readAsArrayBuffer",arguments.length,e),He(this,e.size,function(){return e.arrayBuffer()})}},{key:"readAsBinaryString",value:function(e){Le(this,"readAsBinaryString",arguments.length,e),He(this,e.size,function(){return e.arrayBuffer().then(function(e){for(var t=[],n=new Uint8Array(e),r=0;r<n.length;++r)t.push(String.fromCharCode(n[r]));return t.join("")})})}},{key:"readAsDataURL",value:function(e){Le(this,"readAsDataURL",arguments.length,e),He(this,e.size,function(){return e.arrayBuffer().then(function(t){return"data:"+(e.type||"application/octet-stream")+";base64,"+je(new Uint8Array(t))})})}},{key:"readAsText",value:function(e,t){if(Le(this,"readAsText",arguments.length,e),"function"==typeof TextDecoder){var n=new TextDecoder(t);He(this,e.size,function(){return e.arrayBuffer().then(function(e){return n.decode(e)})})}else{if(void 0!==t){var r=""+t;-1===["utf-8","utf8","unicode-1-1-utf-8"].indexOf(r.toLowerCase())&&console.warn("Ignoring the execution of 'readAsText' on 'FileReader': encoding ('".concat(r,"') not implemented."))}He(this,e.size,function(){return e.text()})}}},{key:"onabort",get:function(){return qe(this).onabort},set:function(e){qe(this).onabort=e,qe(this).attach("abort")}},{key:"onerror",get:function(){return qe(this).onerror},set:function(e){qe(this).onerror=e,qe(this).attach("error")}},{key:"onload",get:function(){return qe(this).onload},set:function(e){qe(this).onload=e,qe(this).attach("load")}},{key:"onloadend",get:function(){return qe(this).onloadend},set:function(e){qe(this).onloadend=e,qe(this).attach("loadend")}},{key:"onloadstart",get:function(){return qe(this).onloadstart},set:function(e){qe(this).onloadstart=e,qe(this).attach("loadstart")}},{key:"onprogress",get:function(){return qe(this).onprogress},set:function(e){qe(this).onprogress=e,qe(this).attach("progress")}},{key:"toString",value:function(){return"[object FileReader]"}},{key:o,get:function(){return"FileReader"}},{key:"__MPHTTPX__",get:function(){return{chain:["FileReader","EventTarget"]}}}],[{key:"EMPTY",get:function(){return 0}},{key:"LOADING",get:function(){return 1}},{key:"DONE",get:function(){return 2}}])}(0,f.toStringTag),Ae=r(function e(n){var r;t(this,e),this.pos=0,this.readyState=0,this.result=null,this.error=null,this.onabort=null,this.onerror=null,this.onload=null,this.onloadend=null,this.onloadstart=null,this.onprogress=null,this.attach=z(n,(r=n,{onabort:function(e){G(r,r.onabort,e)},onerror:function(e){G(r,r.onerror,e)},onload:function(e){G(r,r.onload,e)},onloadend:function(e){G(r,r.onloadend,e)},onloadstart:function(e){G(r,r.onloadstart,e)},onprogress:function(e){G(r,r.onprogress,e)}}))});function qe(e){return e.__FileReader__}function Le(e,t,n,r){if(k(n,1,"FileReader",t),!ge(r))throw new TypeError("Failed to execute '"+t+"' on 'FileReader': parameter 1 is not of type 'Blob'.");if(1===e.readyState)throw new d("Failed to execute '".concat(t,"' on 'FileReader': The object is already busy reading Blobs."),"InvalidStateError")}function He(e,t,n){!function(e,t,n){var r=qe(e);r.pos=1,r.error=null,r.result=null;var o=function(){return xe(e,"loadstart",0,t),n()};(function(e,t,n){var r=qe(e);r.pos=2,r.readyState=1,Promise.resolve().then(function(){if(2===r.pos)return n().then(function(n){return function(e,t,n){var r=qe(e);if(2!==r.pos)return;r.pos=3,r.result=n,r.readyState=2,function(e,t){qe(e).pos=4,xe(e,"load",t,t),Oe(e,t)}(e,t)}(e,t,n)}).catch(function(t){return function(e,t){var n=qe(e);if(2!==n.pos)return;n.pos=6,n.error=t,n.result=null,n.readyState=2,xe(e,"error"),Oe(e)}(e,t)})})})(e,t,o)}(e,t,n)}function Oe(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;qe(e).pos=7,xe(e,"loadend",t,t)}function je(e){for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",n=[],r=0;r<e.length;r+=3){var o=e[r],i=r+1<e.length,a=i?e[r+1]:0,s=r+2<e.length,u=s?e[r+2]:0,c=o>>2,l=(3&o)<<4|a>>4,f=(15&a)<<2|u>>6,h=63&u;s||(h=64,i||(f=64)),n.push(t[c],t[l],t[f],t[h])}return n.join("")}var Me="undefined"!=typeof FileReader&&FileReader||Ce,Fe=function(){return r(function e(n){if(t(this,e),y(this,"__URLSearchParams__",new Ue),void 0!==n)if(ze(n))n.forEach(function(e,t){this.append(t,e)}.bind(this),this);else if(n&&"object"===c(n))if(b(n))for(var r=Array.isArray(n)?n:Array.from(n),o=0;o<r.length;++o){var i=r[o];if(!b(i))throw new TypeError("Failed to construct 'URLSearchParams': The provided value cannot be converted to a sequence.");var a=Array.isArray(i)?i:Array.from(i);if(2!==a.length)throw new TypeError("Failed to construct 'URLSearchParams': Sequence initializer must only contain pair elements");this.append(a[0],a[1])}else Object.getOwnPropertyNames(n).forEach(function(e){this.append(e,n[e])}.bind(this),this);else{var s=""+n;0===s.indexOf("?")&&(s=s.slice(1));for(var u=s.split("&"),l=0;l<u.length;++l){var f=u[l],h=f.indexOf("=");h>-1?this.append(Xe(f.slice(0,h)),Xe(f.slice(h+1))):f&&this.append(Xe(f),"")}}},[{key:"size",get:function(){return Be(this).array.length}},{key:"append",value:function(e,t){De(arguments.length,2,"append"),Be(this).array.push([""+e,Ne(t)])}},{key:"delete",value:function(e,t){De(arguments.length,1,"delete");for(var n=""+e,r=-1,o=Be(this).array,i=[],a=0;a<o.length;++a){var s=o[a];s[0]!==n?i.push(s):(1!==arguments.length&&s[1]!==Ne(t)&&i.push(s),r=a)}r>-1&&(Be(this).array=i)}},{key:"get",value:function(e){De(arguments.length,1,"get");for(var t=""+e,n=Be(this).array,r=0;r<n.length;++r){var o=n[r];if(o[0]===t)return o[1]}return null}},{key:"getAll",value:function(e){De(arguments.length,1,"getAll");for(var t=""+e,n=Be(this).array,r=[],o=0;o<n.length;++o){var i=n[o];i[0]===t&&r.push(i[1])}return r}},{key:"has",value:function(e,t){De(arguments.length,1,"has");for(var n=""+e,r=Be(this).array,o=0;o<r.length;++o){var i=r[o];if(i[0]===n){if(1===arguments.length)return!0;if(i[1]===Ne(t))return!0}}return!1}},{key:"set",value:function(e,t){De(arguments.length,2,"set");for(var n=""+e,r=Ne(t),o=-1,i=Be(this).array,a=[],s=0;s<i.length;++s){var u=i[s];u[0]!==n?a.push(u):-1===o&&(o=s,a.push([n,r]))}-1===o&&a.push([n,r]),Be(this).array=a}},{key:"sort",value:function(){Be(this).array.sort(function(e,t){return e[0]<t[0]?-1:e[0]>t[0]?1:0})}},{key:"forEach",value:function(e,t){if(De(arguments.length,1,"forEach"),"function"!=typeof e)throw new TypeError("Failed to execute 'forEach' on 'URLSearchParams': parameter 1 is not of type 'Function'.");for(var n=Be(this).array,r=0;r<n.length;++r){var o=n[r];e.call(t,o[1],o[0],this)}}},{key:"entries",value:function(){return _(Be(this).array.map(function(e){return[e[0],e[1]]}))}},{key:"keys",value:function(){return _(Be(this).array.map(function(e){return e[0]}))}},{key:"values",value:function(){return _(Be(this).array.map(function(e){return e[1]}))}},{key:f.iterator,value:function(){return this.entries()}},{key:"toString",value:function(){for(var e=Be(this).array,t=[],n=0;n<e.length;++n){var r=e[n];t.push(Ie(r[0])+"="+Ie(r[1]))}return t.join("&")}},{key:f.toStringTag,get:function(){return"URLSearchParams"}},{key:"__MPHTTPX__",get:function(){return{chain:["URLSearchParams"]}}}])}(),Ue=r(function e(){t(this,e),this.array=[]});function Be(e){return e.__URLSearchParams__}function De(e,t,n){k(e,t,"URLSearchParams",n)}function Ne(e){return"string"==typeof e?e:null!=e&&"function"==typeof e.toString?e.toString():JSON.stringify(e)}function Ie(e){var t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'\(\)~]|%20|%00/g,function(e){return t[e]})}function Xe(e){return e.replace(/[ +]/g,"%20").replace(/(%[a-f0-9]{2})+/gi,function(e){return decodeURIComponent(e)})}function ze(e){return g("URLSearchParams",e)||function(e){return v("URLSearchParams",e)||!!e&&"object"===c(e)&&"undefined"!=typeof URLSearchParams&&URLSearchParams&&URLSearchParams.prototype.isPrototypeOf(e)}(e)}var Ge="undefined"!=typeof URLSearchParams&&URLSearchParams||Fe,We=function(){return r(function e(n,r){if(t(this,e),y(this,"__FormData__",new Ve),void 0!==n)try{for(var o=n.elements,i=0;i<o.length;++i){var a=o[i];if(!a.name||a.disabled||"submit"===a.type||"button"===a.type||Ye(a,"form fieldset[disabled] *"))return;if("file"===a.type)for(var s=a.files&&a.files.length?a.files:[new Te([],"",{type:"application/octet-stream"})],u=0;u<s.length;++u)this.append(a.name,s[u]);else if("select-multiple"===a.type||"select-one"===a.type)for(var c=0;c<a.options.length;++c){var l=a.options[c];!l.disabled&&l.selected&&this.append(a.name,l.value)}else if("checkbox"===a.type||"radio"===a.type)a.checked&&this.append(a.name,a.value);else{var f="textarea"===a.type?et(a.value):a.value;this.append(a.name,f)}}}catch(e){throw new TypeError("Failed to construct 'FormData': parameter 1 is not of type 'HTMLFormElement'.")}null!=r&&console.warn("Ignoring the 'submitter' of 'FormData' constructor: parameter 2 not implemented.")},[{key:"append",value:function(e,t,n){Je(arguments.length,2,"append"),$e(this).array.push(Ke(e,t,n))}},{key:"delete",value:function(e){Je(arguments.length,1,"delete");for(var t=""+e,n=-1,r=$e(this).array,o=[],i=0;i<r.length;++i){var a=r[i];a[0]!==t?o.push(a):n=i}n>-1&&($e(this).array=o)}},{key:"get",value:function(e){Je(arguments.length,1,"get");for(var t=""+e,n=$e(this).array,r=0;r<n.length;++r){var o=n[r];if(o[0]===t)return o[1]}return null}},{key:"getAll",value:function(e){Je(arguments.length,1,"getAll");for(var t=""+e,n=$e(this).array,r=[],o=0;o<n.length;++o){var i=n[o];i[0]===t&&r.push(i[1])}return r}},{key:"has",value:function(e){Je(arguments.length,1,"has");for(var t=""+e,n=$e(this).array,r=0;r<n.length;++r){if(n[r][0]===t)return!0}return!1}},{key:"set",value:function(e,t,n){Je(arguments.length,2,"set");for(var r=""+e,o=Ke(e,t,n),i=-1,a=$e(this).array,s=[],u=0;u<a.length;++u){var c=a[u];c[0]!==r?s.push(c):-1===i&&(i=u,s.push(o))}-1===i&&s.push(o),$e(this).array=s}},{key:"forEach",value:function(e,t){if(Je(arguments.length,1,"forEach"),"function"!=typeof e)throw new TypeError("Failed to execute 'forEach' on 'FormData': parameter 1 is not of type 'Function'.");for(var n=$e(this).array,r=0;r<n.length;++r){var o=n[r];e.call(t,o[1],o[0],t)}}},{key:"entries",value:function(){return _($e(this).array.map(function(e){return[e[0],e[1]]}))}},{key:"keys",value:function(){return _($e(this).array.map(function(e){return e[0]}))}},{key:"values",value:function(){return _($e(this).array.map(function(e){return e[1]}))}},{key:f.iterator,value:function(){return this.entries()}},{key:"toString",value:function(){return"[object FormData]"}},{key:f.toStringTag,get:function(){return"FormData"}},{key:"__MPHTTPX__",get:function(){return{chain:["FormData"]}}}])}(),Ve=r(function e(){t(this,e),this.array=[]});function $e(e){return e.__FormData__}function Je(e,t,n){return k(e,t,"FormData",n)}function Ke(e,t,n){if(ge(t)){if(n=void 0!==n?""+n:"string"==typeof t.name?t.name:"blob",t.name!==n||ge(t,!0))t=new(g("Blob",t)?we:Te)([t],n);return[""+e,t]}return[""+e,""+t]}function Ye(e,t){var n="undefined"!=typeof Element&&Element&&Element.prototype;return n&&!n.matches&&(n.matches=n.matchesSelector||n.mozMatchesSelector||n.msMatchesSelector||n.oMatchesSelector||n.webkitMatchesSelector||function(e){for(var t=(this.ownerDocument||this.document).querySelectorAll(e),n=t.length;--n>=0&&t.item(n)!==this;);return n>-1}),!!n&&n.matches.call(e,t)}function Qe(e){return g("FormData",e)||function(e){var t="[object FormData]";return(Object.prototype.toString.call(e)===t||String(e)===t)&&!!e&&"object"===c(e)&&"forEach"in e&&"function"==typeof e.forEach}(e)}function Ze(e,t){var n=t||"----formdata-mphttpx-"+Math.random(),r="--".concat(n,'\r\nContent-Disposition: form-data; name="'),o=[],i=!0;return e.forEach(function(e,t){"string"==typeof e?o.push(r+nt(et(t))+'"\r\n\r\n'.concat(et(e),"\r\n")):(i&&g("Blob",e)&&(i=!1),o.push(r+nt(et(t))+'"; filename="'.concat(nt(e.name),'"\r\nContent-Type: ').concat(e.type||"application/octet-stream","\r\n\r\n"),e,"\r\n"))}),o.push("--".concat(n,"--")),new(i?me:fe)(o,{type:"multipart/form-data; boundary="+n})}function et(e){return e.replace(/\r?\n|\r/g,"\r\n")}function nt(e){return e.replace(/\n/g,"%0A").replace(/\r/g,"%0D").replace(/"/g,"%22")}function rt(e){if(e&&/multipart\/form-data/i.test(e)){var t=e.match(/boundary\s*=\s*([^;]+)/i);if(t&&t[1])return t[1].trim().replace(/^["']|["']$/g,"")}}var ot="undefined"!=typeof FormData&&FormData||We,it=function(){return r(function e(n,r){if(t(this,e),this._type="",r&&(this.type=r),"string"==typeof n)this.promise=Promise.resolve(n),this.type="text/plain;charset=UTF-8",this.calcLength=function(){return se(n).length};else if(ze(n)){var o=n.toString();this.promise=Promise.resolve(o),this.type="application/x-www-form-urlencoded;charset=UTF-8",this.calcLength=function(){return se(o).length}}else if(C(n))this.promise=Promise.resolve(n.slice(0)),this.length=n.byteLength;else if(ArrayBuffer.isView(n)){var i=n.buffer.slice(n.byteOffset,n.byteOffset+n.byteLength);this.promise=Promise.resolve(i),this.length=i.byteLength}else if(ge(n))this.promise=n.arrayBuffer(),this.type=n.type,this.length=n.size;else if(Qe(n)){var a=Ze(n,r?rt(r):void 0);this.promise=a.arrayBuffer(),this.type=a.type,this.length=a.size}else if(null==n)this.promise=Promise.resolve(""),this.length=0;else{var s=""+n;this.promise=Promise.resolve(s),this.type="text/plain;charset=UTF-8",this.calcLength=function(){return se(s).length}}},[{key:"type",get:function(){return this._type},set:function(e){this._type||(this._type=e)}},{key:"size",get:function(){var e;return"number"!=typeof this.length&&this.calcLength&&(this.length=this.calcLength()),null!==(e=this.length)&&void 0!==e?e:0}},{key:"text",value:function(){return this.promise.then(function(e){return"string"==typeof e?e:ue(e)})}},{key:"arrayBuffer",value:function(){return this.promise.then(function(e){return C(e)?e:se(e).buffer})}}])}(),at=function(){return r(function e(){if(t(this,e),this.constructor===e)throw new TypeError("Failed to construct 'Body': Illegal constructor");y(this,"__Body__",new st)},[{key:"bodyUsed",get:function(){return ut(this).bodyUsed}},{key:"body",get:function(){throw new TypeError("Failed to access 'body' on '".concat(p(this),"': property not implemented."))}},{key:"arrayBuffer",value:function(){var e="arrayBuffer";return ht(this,e)||lt(this,e)}},{key:"blob",value:function(){var e="blob";return ht(this,e)||lt(this,e)}},{key:"bytes",value:function(){var e="bytes";return ht(this,e)||lt(this,e)}},{key:"formData",value:function(){var e="formData";return ht(this,e)||lt(this,e)}},{key:"json",value:function(){var e="json";return ht(this,e)||lt(this,e)}},{key:"text",value:function(){var e="text";return ht(this,e)||lt(this,e)}},{key:"toString",value:function(){return"[object Body]"}},{key:f.toStringTag,get:function(){return"Body"}},{key:"__MPHTTPX__",get:function(){return{chain:["Body"]}}}])}(),st=r(function e(){t(this,e),this.bodyUsed=!1});function ut(e){return e.__Body__}function ct(e,t){var n,r=e;if((n=t)&&"object"===c(n)&&"undefined"!=typeof ReadableStream&&ReadableStream&&ReadableStream.prototype.isPrototypeOf(n)||function(e){return(v("ReadableStream",e)||"[object ReadableStream]"===String(e))&&!!e&&"object"===c(e)&&"getReader"in e&&"function"==typeof e.getReader}(t))throw new TypeError("Failed to construct '".concat(p(r),"': ReadableStream not implemented."));null!=t&&(ut(r).payload=new it(t))}function lt(e,t){var n=ut(e).payload||new it;return"json"===t?n.text().then(function(e){return JSON.parse(e)}):"text"===t?n.text():"arrayBuffer"===t?n.arrayBuffer():"bytes"===t?n.arrayBuffer().then(function(e){return new Uint8Array(e)}):"blob"===t?n.promise.then(function(e){return new me([e])}):"formData"===t?n.text().then(function(e){return function(e,t){var n=function(){throw new TypeError("Could not parse content as FormData.")};"string"==typeof e&&""!==e.trim()||n();var r=e.indexOf("\r\n");-1===r&&n();var o=e.substring(2,r).trim();o||n(),void 0!==t&&t!==o&&n();var i=e.split("--".concat(o)).filter(function(e){var t=e.trim();return""!==t&&"--"!==t});0===i.length&&n();var a=[],s=!1;i.forEach(function(e){var t=e.indexOf("\r\n\r\n");-1===t&&n();var r=e.substring(0,t).trim(),o=r.match(/name="([^"]*)"/);(!o||o.length<2)&&n();var i=o[1],u=r.match(/filename="([^"]*)"/),c=e.substring(t+4);if(u){var l=u[1]||"",f=r.match(/Content-Type: ([^\r\n]+)/),h=f?(f[1]||"").trim():"text/plain",d=c.replace(/\r\n/g,"");s=!0,a.push([i,new Te([d],l,{type:h})])}else a.push([i,c.replace(/^[\r\n]+|[\r\n]+$/g,"")])});var u=new(!s||function(){try{var e=new ot;return e.append("file",new Te([],"")),"string"!=typeof e.get("file")}catch(e){return!1}}()?ot:We);return a.forEach(function(e){u.append(e[0],e[1])}),u}(e,rt(n.type))}):n.promise}function ht(e,t){if(ut(e).payload){if(e.bodyUsed)return Promise.reject(new TypeError("Failed to execute '".concat(t,"' on '").concat(p(e),"': body stream already read")));ut(e).bodyUsed=!0}}var dt=function(){return r(function e(n){if(t(this,e),y(this,"__Headers__",new pt),void 0!==n)if(bt(n))n.forEach(function(e,t){vt(this,t,e,"")}.bind(this),this);else if(b(n))for(var r=Array.isArray(n)?n:Array.from(n),o=0;o<r.length;++o){var i=r[o];if(!b(i))throw new TypeError("Failed to construct 'Headers': The provided value cannot be converted to a sequence.");var a=Array.isArray(i)?i:Array.from(i);if(2!==a.length)throw new TypeError("Failed to construct 'Headers': Invalid value");vt(this,a[0],a[1])}else{if(!n||"object"!==c(n))throw new TypeError("Failed to construct 'Headers': The provided value is not of type '(record<ByteString, ByteString> or sequence<sequence<ByteString>>)'.");Object.getOwnPropertyNames(n).forEach(function(e){vt(this,e,n[e])}.bind(this),this)}},[{key:"append",value:function(e,t){mt(arguments.length,2,"append"),vt(this,e,t,"append")}},{key:"delete",value:function(e){mt(arguments.length,1,"delete"),delete yt(this).dict[_t(e,gt("delete"))]}},{key:"get",value:function(e){var t;return mt(arguments.length,1,"get"),null!==(t=yt(this).dict[_t(e,gt("get"))])&&void 0!==t?t:null}},{key:"getSetCookie",value:function(){var e=this.get("Set-Cookie");return e?e.split(", "):[]}},{key:"has",value:function(e){return mt(arguments.length,1,"has"),yt(this).dict.hasOwnProperty(_t(e,gt("has")))}},{key:"set",value:function(e,t){mt(arguments.length,2,"set"),yt(this).dict[_t(e,gt("set"))]=kt(t)}},{key:"forEach",value:function(e,t){if(mt(arguments.length,1,"forEach"),"function"!=typeof e)throw new TypeError("Failed to execute 'forEach' on 'Headers': parameter 1 is not of type 'Function'.");for(var n=yt(this).dict,r=Object.getOwnPropertyNames(n),o=0;o<r.length;++o){var i=r[o];e.call(t,n[i],i,this)}}},{key:"entries",value:function(){var e=[];return this.forEach(function(t,n){e.push([n,t])}),_(e)}},{key:"keys",value:function(){var e=[];return this.forEach(function(t,n){e.push([n,t])}),_(e.map(function(e){return e[0]}))}},{key:"values",value:function(){var e=[];return this.forEach(function(t,n){e.push([n,t])}),_(e.map(function(e){return e[1]}))}},{key:f.iterator,value:function(){return this.entries()}},{key:"toString",value:function(){return"[object Headers]"}},{key:f.toStringTag,get:function(){return"Headers"}},{key:"__MPHTTPX__",get:function(){return{chain:["Headers"]}}}])}(),pt=r(function e(){t(this,e),this.dict={}});function yt(e){return e.__Headers__}function vt(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"constructor",o=_t(t,r?gt(r):void 0),i=kt(n),a=yt(e).dict,s=a[o];a[o]=void 0!==s?"".concat(s,", ").concat(i):i}function gt(e){return function(){throw new TypeError("Failed to ".concat(e&&"constructor"!==e?"execute '"+e+"' on":"construct"," 'Headers': Invalid name"))}}function mt(e,t,n){k(e,t,"Headers",n)}function bt(e){return g("Headers",e)||function(e){var t="[object Headers]";return(Object.prototype.toString.call(e)===t||String(e)===t)&&!!e&&"object"===c(e)&&"forEach"in e&&"function"==typeof e.forEach}(e)}function _t(e,t){return"string"!=typeof e&&(e=""+e),t&&(/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(e)||""===e)&&t(),e.toLowerCase()}function kt(e){return"string"==typeof e?e:""+e}function wt(e){var t=new Et;return e.replace(/\r?\n[\t ]+/g," ").split("\r").map(function(e){return 0===e.indexOf("\n")?e.substring(1,e.length):e}).forEach(function(e){var n=e.split(":"),r=n.shift().trim();if(r){var o=n.join(":").trim();try{t.append(r,o)}catch(e){console.warn("SyntaxError: Response.headers: '".concat(r,"' is not a valid HTTP header field name."))}}}),t}function Tt(e){if(g("Headers",e)&&Et!==dt){var t=new Et;return e.forEach(function(e,n){t.append(n,e)}),t}return new Et(e)}var Et="undefined"!=typeof Headers&&Headers||dt,St=function(n,o){function a(n,r){var o;t(this,a),k(arguments.length,1,"Request"),y(o=e(this,a),"__Request__",new Rt);var i=Pt(o),s=null!=r?r:{};if("object"!==c(s))throw new TypeError("Failed to construct 'Request': The provided value is not of type 'RequestInit'.");var u,l=s.body,f=!1;if(g("Request",u=n)||function(e){var t="[object Request]";return(Object.prototype.toString.call(e)===t||String(e)===t)&&!!e&&"object"===c(e)&&"arrayBuffer"in e&&"function"==typeof e.arrayBuffer}(u)){if(n.bodyUsed)throw new TypeError("Failed to construct 'Request': Cannot construct a Request with a Request object that has already been used.");i.cache=n.cache,i.credentials=n.credentials,void 0===s.headers&&(Pt(o).headers=Tt(n.headers)),i.method=n.method,i.mode=n.mode,i.signal=n.signal,i.url=n.url,l||(o.__Body__.payload=xt(n),f=!0)}else i.url=""+n;if(s.cache&&(i.cache=s.cache),s.credentials&&(i.credentials=s.credentials),void 0!==s.headers&&(Pt(o).headers=Tt(s.headers)),s.method&&(i.method=At(s.method)),s.mode&&(i.mode=s.mode),null!==s.signal&&void 0!==s.signal){if(!W(s.signal))throw new TypeError("Failed to construct 'Request': Failed to read the 'signal' property from 'RequestInit': Failed to convert value to 'AbortSignal'.");i.signal=s.signal}if(("GET"===o.method||"HEAD"===o.method)&&null!=l)throw new TypeError("Failed to construct 'Request': Request with GET/HEAD method cannot have body.");ct(o,f?null:l);var h=o.__Body__.payload;return!o.headers.has("Content-Type")&&h&&h.type&&o.headers.set("Content-Type",h.type),"GET"!==o.method&&"HEAD"!==o.method||"no-cache"!==o.cache&&"no-store"!==o.cache||function(e){var t=/([?&])_=[^&]*/;if(t.test(e.url))Pt(e).url=e.url.replace(t,"$1_="+(new Date).getTime());else{var n=/\?/;Pt(e).url+=(n.test(e.url)?"&":"?")+"_="+(new Date).getTime()}}(o),o}return i(a,at),r(a,[{key:"cache",get:function(){return Pt(this).cache}},{key:"credentials",get:function(){return Pt(this).credentials}},{key:"destination",get:function(){return""}},{key:"headers",get:function(){return Pt(this).headers||(Pt(this).headers=new Et),Pt(this).headers}},{key:"integrity",get:function(){return""}},{key:"keepalive",get:function(){return!1}},{key:"method",get:function(){return Pt(this).method}},{key:"mode",get:function(){return Pt(this).mode}},{key:"redirect",get:function(){return"follow"}},{key:"referrer",get:function(){return Pt(this).referrer}},{key:"referrerPolicy",get:function(){return""}},{key:"signal",get:function(){return Pt(this).signal||(Pt(this).signal=(new ae).signal),Pt(this).signal}},{key:"url",get:function(){return Pt(this).url}},{key:"clone",value:function(){if(this.bodyUsed)throw new TypeError("Failed to execute 'clone' on 'Request': Request body is already used");var e=new a(this);return this.__Body__.bodyUsed=!1,e}},{key:"toString",value:function(){return"[object Request]"}},{key:o,get:function(){return"Request"}},{key:"__MPHTTPX__",get:function(){return{chain:["Request","Body"]}}}])}(0,f.toStringTag),Rt=r(function e(){t(this,e),this.cache="default",this.credentials="same-origin",this.method="GET",this.mode="cors",this.referrer="about:client",this.url=""});function Pt(e){return e.__Request__}function xt(e){var t=Object.create(it.prototype);t.type=e.headers.get("Content-Type")||"";try{t.promise=e.arrayBuffer()}catch(n){try{t.promise=e.text()}catch(n){if("multipart/form-data"===t.type.slice(0,19).toLowerCase())try{t.promise=e.formData().then(function(e){return new it(e,t.type).promise})}catch(e){}}}if(!t.promise)throw new TypeError("Failed to construct 'Request': Failed to read request body data, underlying data is in an invalid format.");return t}var Ct=["CONNECT","DELETE","GET","HEAD","OPTIONS","PATCH","POST","PUT","TRACE"];function At(e){var t=e.toUpperCase();return Ct.indexOf(t)>-1?t:e}var qt="undefined"!=typeof Request&&Request||St,Lt=function(n,o){function a(n,r){var o;t(this,a),y(o=e(this,a),"__Response__",new Ht);var i=Ot(o),s=null!=r?r:{};if("object"!==c(s))throw new TypeError("Failed to construct 'Response': The provided value is not of type 'ResponseInit'.");void 0!==s.headers&&(Ot(o).headers=Tt(s.headers));var u=void 0===s.status?200:s.status;if(u<200||u>599)throw new RangeError("Failed to construct 'Response': The status provided (".concat(+u,") is outside the range [200, 599]."));i.status=u,i.statusText=void 0===s.statusText?"":""+s.statusText,ct(o,n);var l=o.__Body__.payload;return!o.headers.has("Content-Type")&&l&&l.type&&o.headers.set("Content-Type",l.type),o}return i(a,at),r(a,[{key:"headers",get:function(){return Ot(this).headers||(Ot(this).headers=new Et),Ot(this).headers}},{key:"ok",get:function(){return this.status>=200&&this.status<300}},{key:"redirected",get:function(){return!1}},{key:"status",get:function(){return Ot(this).status}},{key:"statusText",get:function(){return Ot(this).statusText}},{key:"type",get:function(){return Ot(this).type}},{key:"url",get:function(){return Ot(this).url}},{key:"clone",value:function(){if(this.bodyUsed)throw new TypeError("Failed to execute 'clone' on 'Response': Response body is already used");var e=new a(null,{headers:Tt(this.headers),status:this.status,statusText:this.statusText});return Ot(e).url=this.url,e.__Body__.payload=this.__Body__.payload,e}},{key:"toString",value:function(){return"[object Response]"}},{key:o,get:function(){return"Response"}},{key:"__MPHTTPX__",get:function(){return{chain:["Response","Body"]}}}],[{key:"json",value:function(e,t){k(arguments.length,1,"Response","json");var n=new a("string"==typeof e?e:JSON.stringify(e),t);return n.headers.set("Content-Type","application/json"),n}},{key:"error",value:function(){var e=new a(null,{status:200,statusText:""});return Ot(e).status=0,Ot(e).type="error",e}},{key:"redirect",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:302;if(k(arguments.length,1,"Response","redirect"),-1===[301,302,303,307,308].indexOf(t))throw new RangeError("Failed to execute 'redirect' on 'Response': Invalid status code");return new a(null,{status:t,headers:{location:""+e}})}}])}(0,f.toStringTag),Ht=r(function e(){t(this,e),this.status=200,this.statusText="",this.type="default",this.url=""});function Ot(e){return e.__Response__}var jt="undefined"!=typeof Response&&Response||Lt,Mt={XMLHttpRequest:"undefined"!=typeof XMLHttpRequest&&XMLHttpRequest||void 0};function Ft(e){Mt.XMLHttpRequest=e}function Ut(e,t){if(k(arguments.length,1,"Window","fetch"),this instanceof Ut)throw new TypeError("fetch is not a constructor");return new Promise(function(n,r){var o=new St(e,t),i=o.__Request__.signal;if(i&&i.aborted)return r(i.reason);var a,s=new(Mt.XMLHttpRequest||function(){throw new ReferenceError("XMLHttpRequest is not defined")}()),u=!1,l=o.__Body__.payload;if(s.onload=function(){var e={headers:wt(s.getAllResponseHeaders()||""),status:s.status,statusText:s.statusText};0===o.url.indexOf("file://")&&(s.status<200||s.status>599)&&(e.status=200),setTimeout(function(){(a=new Lt("response"in s?s.response:s.responseText,e)).__Response__.url="responseURL"in s?s.responseURL:e.headers.get("X-Request-URL")||"";var t=a.__Body__.payload,o=a.headers.get("Content-Type")||"";t&&o&&(t.type=o),u?r(Bt()):n(a)},0)},s.onabort=function(){setTimeout(function(){r(Bt())},0)},s.onerror=function(){setTimeout(function(){r(new TypeError("Failed to fetch"))},0)},s.ontimeout=function(){setTimeout(function(){r(new d("The request timed out.","TimeoutError"))},0)},s.open(o.method,Nt(o.url),!0),"include"===o.credentials?s.withCredentials=!0:"omit"===o.credentials&&(s.withCredentials=!1),"responseType"in s&&(s.responseType="arraybuffer"),t&&"object"===c(t)&&t.headers&&"object"===c(t.headers)&&!bt(t.headers)){var f=t.headers,h=[];Object.getOwnPropertyNames(f).forEach(function(e){h.push(_t(e)),s.setRequestHeader(e,kt(f[e]))}),o.headers.forEach(function(e,t){-1===h.indexOf(t)&&s.setRequestHeader(t,e)})}else o.headers.forEach(function(e,t){s.setRequestHeader(t,e)});if(i){var p=function(){a&&!a.bodyUsed&&((a.__Body__.payload=new it).promise=Promise.reject(Bt()));u=!0,s.abort(),y()},y=function(){i.removeEventListener("abort",p)};i.addEventListener("abort",p),s.onreadystatechange=function(){4===s.readyState&&y()}}l?l.promise.then(function(e){u?r(Bt()):s.send(""!==e?e:void 0)}).catch(function(e){r(new TypeError("Failed to fetch")),console.error(e)}):s.send()})}function Bt(){return new d("The user aborted a request.","AbortError")}var Dt="undefined"!=typeof location&&!!location,Nt=function(e){return""===e&&Dt&&(null===location||void 0===location?void 0:location.href)?location.href:e},It="undefined"!=typeof fetch&&fetch||Ut,Xt={value:!1};function zt(e){Xt.value=!!e}function Gt(e){var t=e||"undefined"!=typeof fetch&&fetch;if(!t||t===Ut)return Ut;if("__MPHTTPX__Polyfill__"in t)return t;function n(e,t){if(e.headers){if((f=e.headers)&&"object"===c(f)&&"has"in f&&"function"==typeof f.has&&"set"in f&&"function"==typeof f.set)e.headers.has("Content-Type")||e.headers.set("Content-Type",t);else if(b(e.headers)){for(var n=!1,r=Array.isArray(e.headers)?e.headers:Array.from(e.headers),o=0;o<r.length;++o){var i=r[o];if(b(i)){var a=Array.isArray(i)?i:Array.from(i);if(a.length>=2&&"content-type"===String(a[0]).toLowerCase()){n=!0;break}}}n||(r.push(["Content-Type",t]),e.headers=r)}else if("object"===c(e.headers)){for(var s=!1,u=Object.getOwnPropertyNames(e.headers),l=0;l<u.length;++l){if("content-type"===u[l].toLowerCase()){s=!0;break}}s||(e.headers["Content-Type"]=t)}}else e.headers={"Content-Type":t};var f}function r(e,r){if(g("Request",e)){var o=e,i=r||{};i.method||(i.method=o.method),i.headers||(i.headers=o.headers),i.mode||(i.mode=o.mode),i.cache||(i.cache=o.cache),i.credentials||(i.credentials=o.credentials),!i.signal&&o.__Request__.signal&&(i.signal=o.signal),i.body||(i.body=xt(o)),e=o.url,r=i}if(r&&r.headers&&g("Headers",r.headers))if("undefined"!=typeof Headers&&Headers&&!("__MPHTTPX__"in Headers.prototype)){var a=new Headers;r.headers.forEach(function(e,t){a.append(t,e)}),r.headers=a}else{var s={};r.headers.forEach(function(e,t){s[t]=e}),r.headers=s}return new Promise(function(o,i){r&&r.body&&(Xt.value?Qe(r.body):g("FormData",r.body))&&(r.body=Ze(r.body));var a=r&&r.body&&((Xt.value?ge(r.body):g("Blob",r.body))&&new it(r.body)||it.prototype.isPrototypeOf(r.body)&&r.body);if(a){a.type&&n(r,a.type);var s=null,u=!1,l=!0;if(e&&"object"===c(e)&&"signal"in e&&W(e.signal)){var f=function(){l&&(u=!0),s()};s=function(){e.signal.removeEventListener("abort",f)},e.signal.addEventListener("abort",f)}a.promise.then(function(n){r.body=""!==n?n:null,u?i(new d("The user aborted a request.","AbortError")):o(t.call(this,e,r)),l=!1}.bind(this)).catch(function(e){i(new TypeError("Failed to fetch")),l=!1,console.error(e)}).then(function(){s&&s()})}else r&&r.body&&g("URLSearchParams",r.body)&&n(r,"application/x-www-form-urlencoded;charset=UTF-8"),o(t.call(this,e,r))}.bind(this))}return r.__MPHTTPX__Polyfill__=!0,r}function Wt(e){var n=e||"undefined"!=typeof XMLHttpRequest&&XMLHttpRequest;if(n&&!("__MPHTTPX__Polyfill__"in n)&&!("__MPHTTPX__"in n.prototype)){var o=n.prototype.abort,i=n.prototype.open,a=n.prototype.send,s=n.prototype.setRequestHeader;n.prototype.abort=function(){c(this).processing&&(c(this).aborted=!0),o.call(this),c(this).hasContentType=!1},n.prototype.open=function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null;c(this).processing&&(c(this).aborted=!0),i.call(this,e,t,n,r,o),c(this).hasContentType=!1},n.prototype.send=function(e){if((Xt.value?Qe(e):g("FormData",e))&&(e=Ze(e),c(this).hasContentType||this.setRequestHeader("Content-Type",e.type)),Xt.value?ge(e):g("Blob",e)){var t=new it(e);t.type&&!c(this).hasContentType&&this.setRequestHeader("Content-Type",t.type);var n=this.withCredentials;c(this).processing=!0,t.promise.then(function(e){c(this).aborted||(n!==this.withCredentials&&(this.withCredentials=n,console.warn("Illegal to set the 'withCredentials' property on 'XMLHttpRequest': The value may only be set if the object's state is UNSENT or OPENED.")),a.call(this,""!==e?e:void 0)),c(this).aborted=!1,c(this).processing=!1}.bind(this)).catch(function(e){c(this).aborted=!1,c(this).processing=!1,console.error(e)}.bind(this))}else g("URLSearchParams",e)&&!c(this).hasContentType&&this.setRequestHeader("Content-Type","application/x-www-form-urlencoded;charset=UTF-8"),a.call(this,e)},n.prototype.setRequestHeader=function(e,t){if(c(this).processing)throw new d("Failed to execute 'setRequestHeader' on 'XMLHttpRequest': The object's state must be OPENED.","InvalidStateError");s.call(this,e,t),"content-type"===String(e).toLowerCase()&&(c(this).hasContentType=!0)},n.__MPHTTPX__Polyfill__=!0;var u=r(function e(){t(this,e),this.aborted=!1,this.processing=!1,this.hasContentType=!1})}function c(e){var t="__XMLHttpRequest_Polyfill__";return t in e||y(e,t,new u),e[t]}}function Vt(e){var t=e||"undefined"!=typeof WebSocket&&WebSocket;if(t&&!("__MPHTTPX__Polyfill__"in t)&&!("__MPHTTPX__"in t.prototype)){var n=t.prototype.send;t.prototype.send=function(e){(Xt.value?ge(e):g("Blob",e))?new it(e).promise.then(function(e){1===this.readyState&&n.call(this,e)}.bind(this)):n.call(this,e)},t.__MPHTTPX__Polyfill__=!0}}var $t,Jt,Kt="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function Yt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Qt,Zt,en,tn={};var nn,rn=function(){if(en)return Zt;en=1;var e=Jt?$t:(Jt=1,$t=function(e,t){if(t=t.split(":")[0],!(e=+e))return!1;switch(t){case"http":case"ws":return 80!==e;case"https":case"wss":return 443!==e;case"ftp":return 21!==e;case"gopher":return 70!==e;case"file":return!1}return 0!==e}),t=function(){if(Qt)return tn;Qt=1;var e=Object.prototype.hasOwnProperty;function t(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch(e){return null}}function n(e){try{return encodeURIComponent(e)}catch(e){return null}}return tn.stringify=function(t,r){r=r||"";var o,i,a=[];for(i in"string"!=typeof r&&(r="?"),t)if(e.call(t,i)){if((o=t[i])||null!=o&&!isNaN(o)||(o=""),i=n(i),o=n(o),null===i||null===o)continue;a.push(i+"="+o)}return a.length?r+a.join("&"):""},tn.parse=function(e){for(var n,r=/([^=?#&]+)=?([^&]*)/g,o={};n=r.exec(e);){var i=t(n[1]),a=t(n[2]);null===i||null===a||i in o||(o[i]=a)}return o},tn}(),n=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,r=/[\n\r\t]/g,o=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,i=/:\d+$/,a=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i,s=/^[a-zA-Z]:/;function u(e){return(e||"").toString().replace(n,"")}var l=[["#","hash"],["?","query"],function(e,t){return d(t.protocol)?e.replace(/\\/g,"/"):e},["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d*)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]],f={hash:1,query:1};function h(e){var t,n=("undefined"!=typeof window?window:void 0!==Kt?Kt:"undefined"!=typeof self?self:{}).location||{},r={},i=c(e=e||n);if("blob:"===e.protocol)r=new y(unescape(e.pathname),{});else if("string"===i)for(t in r=new y(e,{}),f)delete r[t];else if("object"===i){for(t in e)t in f||(r[t]=e[t]);void 0===r.slashes&&(r.slashes=o.test(e.href))}return r}function d(e){return"file:"===e||"ftp:"===e||"http:"===e||"https:"===e||"ws:"===e||"wss:"===e}function p(e,t){e=(e=u(e)).replace(r,""),t=t||{};var n,o=a.exec(e),i=o[1]?o[1].toLowerCase():"",s=!!o[2],c=!!o[3],l=0;return s?c?(n=o[2]+o[3]+o[4],l=o[2].length+o[3].length):(n=o[2]+o[4],l=o[2].length):c?(n=o[3]+o[4],l=o[3].length):n=o[4],"file:"===i?l>=2&&(n=n.slice(2)):d(i)?n=o[4]:i?s&&(n=n.slice(2)):l>=2&&d(t.protocol)&&(n=o[4]),{protocol:i,slashes:s||d(i),slashesCount:l,rest:n}}function y(n,o,i){if(n=(n=u(n)).replace(r,""),!(this instanceof y))return new y(n,o,i);var a,f,v,g,m,b,_=l.slice(),k=c(o),w=this,T=0;for("object"!==k&&"string"!==k&&(i=o,o=null),i&&"function"!=typeof i&&(i=t.parse),a=!(f=p(n||"",o=h(o))).protocol&&!f.slashes,w.slashes=f.slashes||a&&o.slashes,w.protocol=f.protocol||o.protocol||"",n=f.rest,("file:"===f.protocol&&(2!==f.slashesCount||s.test(n))||!f.slashes&&(f.protocol||f.slashesCount<2||!d(w.protocol)))&&(_[3]=[/(.*)/,"pathname"]);T<_.length;T++)"function"!=typeof(g=_[T])?(v=g[0],b=g[1],v!=v?w[b]=n:"string"==typeof v?~(m="@"===v?n.lastIndexOf(v):n.indexOf(v))&&("number"==typeof g[2]?(w[b]=n.slice(0,m),n=n.slice(m+g[2])):(w[b]=n.slice(m),n=n.slice(0,m))):(m=v.exec(n))&&(w[b]=m[1],n=n.slice(0,m.index)),w[b]=w[b]||a&&g[3]&&o[b]||"",g[4]&&(w[b]=w[b].toLowerCase())):n=g(n,w);i&&(w.query=i(w.query)),a&&o.slashes&&"/"!==w.pathname.charAt(0)&&(""!==w.pathname||""!==o.pathname)&&(w.pathname=function(e,t){if(""===e)return t;for(var n=(t||"/").split("/").slice(0,-1).concat(e.split("/")),r=n.length,o=n[r-1],i=!1,a=0;r--;)"."===n[r]?n.splice(r,1):".."===n[r]?(n.splice(r,1),a++):a&&(0===r&&(i=!0),n.splice(r,1),a--);return i&&n.unshift(""),"."!==o&&".."!==o||n.push(""),n.join("/")}(w.pathname,o.pathname)),"/"!==w.pathname.charAt(0)&&d(w.protocol)&&(w.pathname="/"+w.pathname),e(w.port,w.protocol)||(w.host=w.hostname,w.port=""),w.username=w.password="",w.auth&&(~(m=w.auth.indexOf(":"))?(w.username=w.auth.slice(0,m),w.username=encodeURIComponent(decodeURIComponent(w.username)),w.password=w.auth.slice(m+1),w.password=encodeURIComponent(decodeURIComponent(w.password))):w.username=encodeURIComponent(decodeURIComponent(w.auth)),w.auth=w.password?w.username+":"+w.password:w.username),w.origin="file:"!==w.protocol&&d(w.protocol)&&w.host?w.protocol+"//"+w.host:"null",w.href=w.toString()}return y.prototype={set:function(n,r,o){var a=this;switch(n){case"query":"string"==typeof r&&r.length&&(r=(o||t.parse)(r)),a[n]=r;break;case"port":a[n]=r,e(r,a.protocol)?r&&(a.host=a.hostname+":"+r):(a.host=a.hostname,a[n]="");break;case"hostname":a[n]=r,a.port&&(r+=":"+a.port),a.host=r;break;case"host":a[n]=r,i.test(r)?(r=r.split(":"),a.port=r.pop(),a.hostname=r.join(":")):(a.hostname=r,a.port="");break;case"protocol":a.protocol=r.toLowerCase(),a.slashes=!o;break;case"pathname":case"hash":if(r){var s="pathname"===n?"/":"#";a[n]=r.charAt(0)!==s?s+r:r}else a[n]=r;break;case"username":case"password":a[n]=encodeURIComponent(r);break;case"auth":var u=r.indexOf(":");~u?(a.username=r.slice(0,u),a.username=encodeURIComponent(decodeURIComponent(a.username)),a.password=r.slice(u+1),a.password=encodeURIComponent(decodeURIComponent(a.password))):a.username=encodeURIComponent(decodeURIComponent(r))}for(var c=0;c<l.length;c++){var f=l[c];f[4]&&(a[f[1]]=a[f[1]].toLowerCase())}return a.auth=a.password?a.username+":"+a.password:a.username,a.origin="file:"!==a.protocol&&d(a.protocol)&&a.host?a.protocol+"//"+a.host:"null",a.href=a.toString(),a},toString:function(e){e&&"function"==typeof e||(e=t.stringify);var n,r=this,o=r.host,a=r.protocol;a&&":"!==a.charAt(a.length-1)&&(a+=":");var s=a+(r.protocol&&r.slashes||d(r.protocol)?"//":"");return r.username?(s+=r.username,r.password&&(s+=":"+r.password),s+="@"):r.password?(s+=":"+r.password,s+="@"):"file:"!==r.protocol&&d(r.protocol)&&!o&&"/"!==r.pathname&&(s+="@"),(":"===o[o.length-1]||i.test(r.hostname)&&!r.port)&&(o+=":"),s+=o+r.pathname,(n="object"===c(r.query)?e(r.query):r.query)&&(s+="?"!==n.charAt(0)?"?"+n:n),r.hash&&(s+=r.hash),s}},y.extractProtocol=p,y.location=h,y.trimLeft=u,y.qs=t,Zt=y}(),on=Yt(rn),an={exports:{}};var sn=Yt((nn||(nn=1,function(e){e.exports.is_uri=n,e.exports.is_http_uri=r,e.exports.is_https_uri=o,e.exports.is_web_uri=i,e.exports.isUri=n,e.exports.isHttpUri=r,e.exports.isHttpsUri=o,e.exports.isWebUri=i;var t=function(e){return e.match(/(?:([^:\/?#]+):)?(?:\/\/([^\/?#]*))?([^?#]*)(?:\?([^#]*))?(?:#(.*))?/)};function n(e){if(e&&!/[^a-z0-9\:\/\?\#\[\]\@\!\$\&\'\(\)\*\+\,\;\=\.\-\_\~\%]/i.test(e)&&!/%[^0-9a-f]/i.test(e)&&!/%[0-9a-f](:?[^0-9a-f]|$)/i.test(e)){var n,r,o,i,a,s="",u="";if(s=(n=t(e))[1],r=n[2],o=n[3],i=n[4],a=n[5],s&&s.length&&o.length>=0){if(r&&r.length){if(0!==o.length&&!/^\//.test(o))return}else if(/^\/\//.test(o))return;if(/^[a-z][a-z0-9\+\-\.]*$/.test(s.toLowerCase()))return u+=s+":",r&&r.length&&(u+="//"+r),u+=o,i&&i.length&&(u+="?"+i),a&&a.length&&(u+="#"+a),u}}}function r(e,r){if(n(e)){var o,i,a,s,u="",c="",l="",f="";if(u=(o=t(e))[1],c=o[2],i=o[3],a=o[4],s=o[5],u){if(r){if("https"!=u.toLowerCase())return}else if("http"!=u.toLowerCase())return;if(c)return/:(\d+)$/.test(c)&&(l=c.match(/:(\d+)$/)[0],c=c.replace(/:\d+$/,"")),f+=u+":",f+="//"+c,l&&(f+=l),f+=i,a&&a.length&&(f+="?"+a),s&&s.length&&(f+="#"+s),f}}}function o(e){return r(e,!0)}function i(e){return r(e)||o(e)}}(an)),an.exports)),un={value:null};function cn(e){return!!e&&"object"===c(e)&&"function"==typeof(null==e?void 0:e.request)}function ln(){if(null!==un.value)return un.value;var e="undefined";return un.value=("undefined"==typeof wx?"undefined":c(wx))!==e&&cn(wx)&&{mp:wx,name:"WeChat"}||("undefined"==typeof my?"undefined":c(my))!==e&&cn(my)&&{mp:my,name:"Alipay"}||("undefined"==typeof qq?"undefined":c(qq))!==e&&cn(qq)&&{mp:qq,name:"QQ"}||("undefined"==typeof jd?"undefined":c(jd))!==e&&cn(jd)&&{mp:jd,name:"JD"}||("undefined"==typeof swan?"undefined":c(swan))!==e&&cn(swan)&&{mp:swan,name:"Baidu"}||("undefined"==typeof tt?"undefined":c(tt))!==e&&cn(tt)&&{mp:tt,name:"ByteDance"}||("undefined"==typeof ks?"undefined":c(ks))!==e&&cn(ks)&&{mp:ks,name:"Kwai"}||("undefined"==typeof qh?"undefined":c(qh))!==e&&cn(qh)&&{mp:qh,name:"Qihu"}||("undefined"==typeof xhs?"undefined":c(xhs))!==e&&cn(xhs)&&{mp:xhs,name:"RedNote"}||("undefined"==typeof dd?"undefined":c(dd))!==e&&(cn(dd)||"function"==typeof(null===dd||void 0===dd?void 0:dd.httpRequest))&&{mp:dd,name:"DingTalk"}||("undefined"==typeof bl?"undefined":c(bl))!==e&&cn(bl)&&{mp:bl,name:"BiliBili"}||("undefined"==typeof ft?"undefined":c(ft))!==e&&cn(ft)&&{mp:ft,name:"FinClip"}||("undefined"==typeof has?"undefined":c(has))!==e&&cn(has)&&{mp:has,name:"HarmonyASCF"}||("undefined"==typeof uni?"undefined":c(uni))!==e&&cn(uni)&&{mp:uni,name:"UniApp"}||("undefined"==typeof Taro?"undefined":c(Taro))!==e&&cn(Taro)&&{mp:Taro,name:"Taro"}||void 0,un.value}var fn=ln();var hn={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"},dn=function(n,o){function a(){var n;if(t(this,a),(n=e(this,a)).constructor===a)throw new TypeError("Failed to construct 'XMLHttpRequestEventTarget': Illegal constructor");return y(n,"__XMLHttpRequestEventTarget__",new pn(n)),n}return i(a,B),r(a,[{key:"onabort",get:function(){return yn(this).onabort},set:function(e){yn(this).onabort=e,yn(this).attach("abort")}},{key:"onerror",get:function(){return yn(this).onerror},set:function(e){yn(this).onerror=e,yn(this).attach("error")}},{key:"onload",get:function(){return yn(this).onload},set:function(e){yn(this).onload=e,yn(this).attach("load")}},{key:"onloadend",get:function(){return yn(this).onloadend},set:function(e){yn(this).onloadend=e,yn(this).attach("loadend")}},{key:"onloadstart",get:function(){return yn(this).onloadstart},set:function(e){yn(this).onloadstart=e,yn(this).attach("loadstart")}},{key:"onprogress",get:function(){return yn(this).onprogress},set:function(e){yn(this).onprogress=e,yn(this).attach("progress")}},{key:"ontimeout",get:function(){return yn(this).ontimeout},set:function(e){yn(this).ontimeout=e,yn(this).attach("timeout")}},{key:"toString",value:function(){return"[object XMLHttpRequestEventTarget]"}},{key:o,get:function(){return"XMLHttpRequestEventTarget"}},{key:"__MPHTTPX__",get:function(){return{chain:["XMLHttpRequestEventTarget","EventTarget"]}}}])}(0,f.toStringTag),pn=r(function e(n){var r;t(this,e),this.onabort=null,this.onerror=null,this.onload=null,this.onloadend=null,this.onloadstart=null,this.onprogress=null,this.ontimeout=null,this.attach=z(n,(r=n,{onabort:function(e){G(r,r.onabort,e)},onerror:function(e){G(r,r.onerror,e)},onload:function(e){G(r,r.onload,e)},onloadend:function(e){G(r,r.onloadend,e)},onloadstart:function(e){G(r,r.onloadstart,e)},onprogress:function(e){G(r,r.onprogress,e)},ontimeout:function(e){G(r,r.ontimeout,e)}}))});function yn(e){return e.__XMLHttpRequestEventTarget__}var vn=function(n,o){function a(){var n;if(t(this,a),(n=e(this,a)).constructor===a)throw new TypeError("Failed to construct 'XMLHttpRequestUpload': Illegal constructor");return n}return i(a,dn),r(a,[{key:"toString",value:function(){return"[object XMLHttpRequestUpload]"}},{key:o,get:function(){return"XMLHttpRequestUpload"}},{key:"__MPHTTPX__",get:function(){return{chain:["XMLHttpRequestUpload","XMLHttpRequestEventTarget","EventTarget"]}}}])}(0,f.toStringTag);var gn={request:function(e){return e&&(e.mp.request||e.mp.httpRequest)}(fn)||function(e){var t="NOT_SUPPORTED_ERR",n={errMsg:t,errno:9,exception:{retryCount:0,reasons:[{errMsg:t,errno:9}]},useHttpDNS:!1};throw Promise.resolve(n).then(function(t){try{e.fail&&e.fail(t)}catch(e){console.error(e)}e.complete&&e.complete(t)}),new ReferenceError("request is not defined")}};function mn(e){gn.request=e}var bn={get:null,set:null},_n=function(n,o){function a(){var n;return t(this,a),y(n=e(this,a),"__XMLHttpRequest__",new kn(n)),n}return i(a,dn),r(a,[{key:"UNSENT",get:function(){return 0}},{key:"OPENED",get:function(){return 1}},{key:"HEADERS_RECEIVED",get:function(){return 2}},{key:"LOADING",get:function(){return 3}},{key:"DONE",get:function(){return 4}},{key:"readyState",get:function(){return wn(this).readyState}},{key:"response",get:function(){return wn(this).response}},{key:"responseText",get:function(){return wn(this).responseText}},{key:"responseType",get:function(){return wn(this).responseType},set:function(e){if(wn(this).pos>9)throw new d("Failed to set the 'responseType' property on 'XMLHttpRequest': The response type cannot be set if the object's state is LOADING or DONE.","InvalidStateError");En.indexOf(e)>-1&&(wn(this).responseType=e)}},{key:"responseURL",get:function(){return wn(this).responseURL}},{key:"responseXML",get:function(){return null}},{key:"status",get:function(){return wn(this).status}},{key:"statusText",get:function(){return wn(this).pos<9?"":wn(this).statusText||hn[this.status]||"unknown"}},{key:"timeout",get:function(){return wn(this).timeout},set:function(e){wn(this).timeout=e>=0?e:0}},{key:"upload",get:function(){var e;return wn(this).upload||(wn(this).upload=(y(e=Object.create(vn.prototype),"__EventTarget__",{executors:[]}),y(e,"__XMLHttpRequestEventTarget__",new pn(e)),e)),wn(this).upload}},{key:"withCredentials",get:function(){return wn(this).withCredentials},set:function(e){if(!(wn(this).pos<2))throw new TypeError("Failed to set the 'withCredentials' property on 'XMLHttpRequest': The value may only be set if the object's state is UNSENT or OPENED.");wn(this).withCredentials=!!e}},{key:"abort",value:function(){var e=wn(this),t=e.requestTask;switch(e.pos){case 1:e.requestHeaders=new Et;break;case 2:case 3:!function(e){wn(e).pos=5,An(e,4),wn(e).upload&&xe(e.upload,"abort");Hn(e,"abort")}(this),Ln(this);break;case 4:case 8:case 9:case 10:On(this);case 11:Ln(this)}Rn(e),qn(t)}},{key:"getAllResponseHeaders",value:function(){var e=wn(this).responseHeaders;if(!e)return"";var t=[];return e.forEach(function(e,n){t.push("".concat(n,": ").concat(e,"\r\n"))}),t.join("")}},{key:"getResponseHeader",value:function(e){return k(arguments.length,1,"XMLHttpRequest","getResponseHeader"),wn(this).responseHeaders?wn(this).responseHeaders.get(e):null}},{key:"open",value:function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null;k(arguments.length,2,"XMLHttpRequest","open"),n||console.warn("Synchronous XMLHttpRequest is not supported because of its detrimental effects to the end user's experience.");var i,a=At(e),s=""+t,u=""+(null!=r?r:""),c=""+(null!=o?o:""),l=wn(this);if(Rn(l),l.method=a,l.requestURL=s,l.requestHeaders=new Et,u.length>0||c.length>0){var f="Basic ".concat(je(se(u+":"+c)));this.setRequestHeader("Authorization",f)}wn(i=this).pos=1,wn(i).requestId+=1,An(i,1)}},{key:"overrideMimeType",value:function(e){k(arguments.length,1,"XMLHttpRequest","overrideMimeType"),1===wn(this).pos&&console.error("TypeError: Failed to execute 'overrideMimeType' on 'XMLHttpRequest': mimeType ('".concat(e,"') not implemented."))}},{key:"send",value:function(e){var t=wn(this),n=t.requestId;if(1!==t.pos)throw new d("Failed to execute 'send' on 'XMLHttpRequest': The object's state must be OPENED.","InvalidStateError");var r={url:t.requestURL,method:t.method,header:Tn(t.requestHeaders),dataType:"json"===this.responseType?"json":Sn(this.responseType),responseType:Sn(this.responseType),withCredentials:this.withCredentials,success:xn.bind(this,n),fail:Cn.bind(this,n)};if(bn.get&&!t.requestHeaders.has("cookie")){var o=bn.get(r.url,this.withCredentials);o&&(r.enableCookie=!0,r.header.Cookie=o)}var i="GET"!==t.method&&"HEAD"!==t.method&&null!=e&&new it(e);i&&i.type&&!t.requestHeaders.has("Content-Type")&&(r.header["Content-Type"]=i.type);var a=function(e){n===t.requestId&&(2!==t.pos&&8!==t.pos||(r.data=""!==e?e:void 0,r.headers=r.header,t.requestTask=gn.request(r)))}.bind(this);!function(e){if(!e.timeout)return;var t=wn(e),n=function(){switch(t.pos){case 2:case 3:!function(e){wn(e).pos=7,An(e,4),wn(e).upload&&xe(e.upload,"timeout");Hn(e,"timeout")}(e);break;case 8:Mn(e)}};t.timeoutId=setTimeout(function(){var e=t.requestTask;n(),qn(e)},e.timeout)}(this);var s=function(e,t){return wn(e).pos=2,xe(e,"loadstart"),t&&function(e,t){var n=wn(e),r=n.requestId;if(2!==n.pos)return;n.pos=3,n.upload&&xe(e.upload,"loadstart",0,t.size);return t.promise.then(function(o){if(r===n.requestId)return function(e,t,n){var r=wn(e);if(3!==r.pos)return;r.pos=4,r.upload&&t.size>0&&xe(e.upload,"load",t.size,t.size);return Hn(e,"load",{payload:t,data:n})}(e,t,o)}).catch(function(t){r===n.requestId&&(!function(e){var t=wn(e);if(3!==t.pos)return;t.pos=6,An(e,4),t.upload&&xe(e.upload,"error");Hn(e,"error")}(e),console.error(t))})}(e,t)}(this,i||void 0);s?s.then(function(e){void 0!==e&&a(e)}):a()}},{key:"setRequestHeader",value:function(e,t){if(k(arguments.length,2,"XMLHttpRequest","setRequestHeader"),1!==wn(this).pos)throw new d("Failed to execute 'setRequestHeader' on 'XMLHttpRequest': The object's state must be OPENED.","InvalidStateError");var n=""+e,r=""+t;try{wn(this).requestHeaders.append(n,r)}catch(e){throw new SyntaxError("Failed to execute 'setRequestHeader' on 'XMLHttpRequest': '".concat(n,"' is not a valid HTTP header field name."))}}},{key:"onreadystatechange",get:function(){return wn(this).onreadystatechange},set:function(e){wn(this).onreadystatechange=e,wn(this).attach("readystatechange")}},{key:"toString",value:function(){return"[object XMLHttpRequest]"}},{key:o,get:function(){return"XMLHttpRequest"}},{key:"__MPHTTPX__",get:function(){return{chain:["XMLHttpRequest","XMLHttpRequestEventTarget","EventTarget"]}}}],[{key:"UNSENT",get:function(){return 0}},{key:"OPENED",get:function(){return 1}},{key:"HEADERS_RECEIVED",get:function(){return 2}},{key:"LOADING",get:function(){return 3}},{key:"DONE",get:function(){return 4}}])}(0,f.toStringTag),kn=r(function e(n){var r;t(this,e),this.pos=0,this.readyState=0,this.response="",this.responseText="",this.responseType="",this.responseURL="",this.status=0,this.statusText="",this.timeout=0,this.withCredentials=!1,this.method="GET",this.requestURL="",this.requestHeaders=null,this.responseHeaders=null,this.timeoutId=0,this.requestId=0,this.requestTask=null,this.onreadystatechange=null,this.attach=z(n,(r=n,{onreadystatechange:function(e){G(r,r.onreadystatechange,e)}}))});function wn(e){return e.__XMLHttpRequest__}function Tn(e){var t={};return e.forEach(function(e,n){t[n]=e}),t}var En=["","arraybuffer","blob","document","json","text"];function Sn(e){return"blob"===e||"arraybuffer"===e?"arraybuffer":"text"}function Rn(e){e.requestTask=null,Pn(e),e.response="",e.responseText="",e.responseURL="",e.status=0,e.statusText="",e.requestHeaders=null,e.responseHeaders=null}function Pn(e){e.timeoutId&&(clearTimeout(e.timeoutId),e.timeoutId=0)}function xn(e,t){e===wn(this).requestId&&function(e,t){var n=wn(e);if(2!==n.pos&&8!==n.pos)return;if(n.pos=9,n.responseURL=n.requestURL,n.status="statusCode"in t?t.statusCode:"status"in t?t.status:200,n.responseHeaders=new Et("header"in t?t.header:"headers"in t?t.headers:{}),bn.set){var r="cookies"in t&&Array.isArray(t.cookies)?t.cookies:n.responseHeaders.get("Set-Cookie")||"";r.length>0&&bn.set(e.responseURL,e.withCredentials,r)}An(e,2),function(e,t){if(9!==wn(e).pos)return;wn(e).pos=10,An(e,3),function(e,t){var n=wn(e);if(10!==n.pos)return;n.pos=11;var r=function(){var r;n.response=function(e,t){var n="string"==typeof t||C(t)?t:JSON.stringify(t);switch(e){case"":case"text":return"string"==typeof n?n:ue(n);case"arraybuffer":return C(n)?n:se(n).buffer;case"json":return"string"==typeof t?JSON.parse(t):C(t)?JSON.parse(ue(t)):t;case"blob":return new me([n]);default:return n}}(e.responseType,null!==(r=t.data)&&void 0!==r?r:""),e.responseType&&"text"!==e.responseType||(n.responseText=e.response),An(e,4),function(e){var t=wn(e);if(11!==t.pos)return;t.pos=12;var n=t.responseHeaders.get("Content-Length"),r=n&&parseInt(n)||0;xe(e,"load",r,r),Fn(e,r)}(e)};try{r()}catch(t){jn(e),console.error(t)}}(e,t)}(e,t)}(this,t)}function Cn(e,t){if("header"in t&&"statusCode"in t||"headers"in t&&"status"in t)return xn.call(this,e,{statusCode:"statusCode"in t?t.statusCode:t.status||0,header:"header"in t?t.header:t.headers||{},data:"data"in t&&t.data||""});e===wn(this).requestId&&jn(this,t)}function An(e,t){if(e.readyState!==t){wn(e).readyState=t;var n=new q("readystatechange");n.__Event__.target=e,F(n,!0),X(e,n)}}function qn(e){e&&"object"===c(e)&&"abort"in e&&"function"==typeof e.abort&&e.abort()}function Ln(e){wn(e).pos=0,wn(e).readyState=0}function Hn(e,t,n){var r=wn(e);if(("load"===t&&4===r.pos||"load"!==t)&&(r.pos=8),r.upload){var o=n?n.payload.size:0;xe(e.upload,"loadend",o,o)}switch(t){case"load":return n&&n.data;case"abort":On(e);break;case"error":jn(e);break;case"timeout":Mn(e)}}function On(e){wn(e).pos=13,An(e,4),xe(e,"abort"),Fn(e)}function jn(e,t){var n=wn(e);switch(n.pos){case 2:case 8:case 11:break;default:return}n.pos=14,t&&(n.status=0,n.statusText="errMsg"in t?t.errMsg:"errorMessage"in t?t.errorMessage:""),An(e,4),xe(e,"error"),Fn(e)}function Mn(e){wn(e).pos=15,An(e,4),xe(e,"timeout"),Fn(e)}function Fn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=wn(e);n.pos=16,n.requestTask=null,Pn(n),xe(e,"loadend",t,t)}var Un="undefined"!=typeof XMLHttpRequest&&XMLHttpRequest||_n,Bn={decodeValues:!0,map:!1,silent:!1,split:"auto"};function Dn(e){return"string"!=typeof e||e in{}}function Nn(){return Object.create(null)}function In(e){return"string"==typeof e&&!!e.trim()}function Xn(e,t){var n=e.split(";").filter(In),r=n.shift();if(!r)return null;var o=function(e){var t="",n="",r=e.split("=");r.length>1?(t=r.shift(),n=r.join("=")):n=e;return{name:t,value:n}}(r),i=o.name,a=o.value;if(t=t?Object.assign({},Bn,t):Bn,Dn(i))return null;try{a=t.decodeValues?decodeURIComponent(a):a}catch(e){console.error("set-cookie-parser: failed to decode cookie value. Set options.decodeValues=false to disable decoding.",e)}var s=Nn();return s.name=i,s.value=a,n.forEach(function(e){var t=e.split("="),n=t.shift().trim().toLowerCase();if(!Dn(n)){var r=t.join("=").trim();if("expires"===n)s.expires=new Date(r);else if("max-age"===n){var o=parseInt(r,10);Number.isNaN(o)||(s.maxAge=o)}else"secure"===n?s.secure=!0:"httponly"===n?s.httpOnly=!0:"samesite"===n?s.sameSite=r:"partitioned"===n?s.partitioned=!0:n&&(s[n]=r)}}),s}function zn(e,t){if(t=t?Object.assign({},Bn,t):Bn,!e)return t.map?Nn():[];if(e.headers)if("function"==typeof e.headers.getSetCookie)e=e.headers.getSetCookie();else if(e.headers["set-cookie"])e=e.headers["set-cookie"];else{var n=e.headers[Object.keys(e.headers).find(function(e){return"set-cookie"===e.toLowerCase()})];n||!e.headers.cookie||t.silent||console.warn("Warning: set-cookie-parser appears to have been called on a request object. It is designed to parse Set-Cookie headers from responses, not Cookie headers from requests. Set the option {silent: true} to suppress this warning."),e=n}var r=t.split,o=Array.isArray(e);if("auto"===r&&(r=!o),o||(e=[e]),e=e.filter(In),r&&(e=e.map(Gn).flat()),t.map){var i=Nn();return e.reduce(function(e,n){var r=Xn(n,t);return r&&!Dn(r.name)&&(e[r.name]=r),e},i)}return e.map(function(e){return Xn(e,t)}).filter(Boolean)}function Gn(e){if(Array.isArray(e))return e;if("string"!=typeof e)return[];var t,n,r,o,i,a=[],s=0;function u(){for(;s<e.length&&/\s/.test(e.charAt(s));)s+=1;return s<e.length}function c(){return"="!==(n=e.charAt(s))&&";"!==n&&","!==n}for(;s<e.length;){for(t=s,i=!1;u();)if(","===(n=e.charAt(s))){for(r=s,s+=1,u(),o=s;s<e.length&&c();)s+=1;s<e.length&&"="===e.charAt(s)?(i=!0,s=o,a.push(e.substring(t,r)),t=s):s=r+1}else s+=1;(!i||s>=e.length)&&a.push(e.substring(t,e.length))}return a}zn.parseSetCookie=zn,zn.parse=zn,zn.parseString=Xn,zn.splitCookiesString=Gn;var Wn={url:new on("https://example.com")},Vn={value:null},$n=function(){return r(function e(){t(this,e),this.cookies=[],this.restore(),setTimeout(function(){this.persist()}.bind(this),0)},[{key:"storageKey",get:function(){return"__COOKIE_MPHTTPX__"}},{key:"restore",value:function(){if(fn){var e=function(){try{var e="Alipay"!==fn.name?fn.mp.getStorageSync(this.storageKey):fn.mp.getStorageSync({key:this.storageKey}).data,t=e?JSON.parse(e):[];return Array.isArray(t)?t:[]}catch(e){return[]}}.bind(this)();this.cookies=e.filter(function(e){return"object"===c(t=e)&&t&&"number"==typeof t._expires;var t}).map(function(e){var t=Kn(e);return t.expires=new Date(e._expires||0),t})}}},{key:"persist",value:function(){if(fn){var e=this.cookies.filter(function(e){return e.expires&&e.expires>new Date}).map(function(e){var t=Kn(e);return t._expires=e.expires.getTime(),t});fn.mp.setStorage({key:this.storageKey,data:JSON.stringify(e)})}}},{key:"getForUrl",value:function(e,t,n){var r=new on(Jn(t)),o=Wn.url.origin===r.origin;if(!e&&!o&&!n)return"";for(var i={valid:[],expired:[]},a=0;a<this.cookies.length;++a){var s=this.cookies[a];if(!e||!s.httpOnly){if(!e){if(!o&&s.sameSite&&"none"!==s.sameSite.toLowerCase())continue;if("127.0.0.1"!==r.hostname&&"localhost"!==r.hostname&&s.secure&&"https"!==r.protocol)continue}Zn(r.hostname,s.domain)&&er(r.pathname,s.path)&&(!s.expires||s.expires>new Date?i.valid.push(s):i.expired.push(s))}}return i.expired.length>0&&(this.cookies=this.cookies.filter(function(e){return!e.expires||e.expires>new Date}),setTimeout(function(){this.persist()}.bind(this),0)),i.valid.map(function(e){return e.name+"="+e.value}).join("; ")}},{key:"setForUrl",value:function(e,t,n,r){var o=this;if(r){var i=new on(Jn(t)),a=Wn.url.origin===i.origin;if(e||a||n){for(var s=e?zn(""+r,{split:!1}):zn(r),u=function(){var t=s[c];return t.name?e&&t.httpOnly||t.sameSite&&"none"===t.sameSite.toLowerCase()&&!t.secure?0:(t.domain?(t.domain=t.domain.toLowerCase(),t.domain.split(".").filter(function(e){return!!e}).length>=2&&(t.domain=Yn(t.domain))):t.domain=i.hostname,t.path||(t.path=i.pathname),"number"==typeof t.maxAge&&(t.expires=new Date((new Date).getTime()+1e3*t.maxAge)),void(Zn(i.hostname,t.domain)&&(o.cookies=o.cookies.filter(function(e){return r=t,!((n=e).domain===r.domain&&n.path===r.path&&n.name===r.name);var n,r}),(!t.expires||t.expires>new Date)&&(o.cookies=[t].concat(o.cookies))))):0},c=0;c<s.length;++c)u();this.cookies.sort(function(e,t){var n=Yn(e.domain),r=Yn(t.domain);if(n.length!==r.length)return r.length-n.length;var o=Qn(e.path);return Qn(t.path).length-o.length}),this.cookies=this.cookies.filter(function(e){return!e.expires||e.expires>new Date}),setTimeout(function(){this.persist()}.bind(this),0)}}}}])}();function Jn(e){return sn.isUri(e)?e:Wn.url.origin+("/"===e.substring(0,1)?"":"/")+e}function Kn(e){var t={name:e.name,value:e.value};return void 0!==e.domain&&(t.domain=e.domain),void 0!==e.path&&(t.path=e.path),void 0!==e.expires&&(t.expires=e.expires),void 0!==e.secure&&(t.secure=e.secure),void 0!==e.sameSite&&(t.sameSite=e.sameSite),void 0!==e.httpOnly&&(t.httpOnly=e.httpOnly),void 0!==e.partitioned&&(t.partitioned=e.partitioned),t}function Yn(e){return("."===e.substring(0,1)?"":".")+e}function Qn(e){return e+("/"===e.slice(-1)?"":"/")}function Zn(e,t){if(t.split(".").filter(function(e){return!!e}).length<2)return e===t;var n=Yn(e),r=Yn(t);return n.slice(-r.length)===r}function er(e,t){var n=Qn(e),r=Qn(t);return n.slice(0,r.length)===r}var tr=function(){Vn.value||(Vn.value=new $n);var e="undefined"!=typeof document&&document&&"cookie"in document;return{get:function(){return e?document.cookie:Vn.value.getForUrl(!0,Wn.url.href,!1)},set:function(t){e?document.cookie=t:Vn.value.setForUrl(!0,Wn.url.href,!1,t)}}}();function nr(e){sn.isUri(e)&&(Wn.url=new on(e)),Vn.value||(Vn.value=new $n),bn.get||bn.set||(bn.get=$n.prototype.getForUrl.bind(Vn.value,!1),bn.set=$n.prototype.setForUrl.bind(Vn.value,!1))}var rr=(Ft(Un),[It,Ut]),or=rr[0],ir=rr[1],ar=function(n,o){function a(n,r){var o;t(this,a),y(o=e(this,a,[n,r]),"__CloseEvent__",new sr);var i=ur(o),s=Number(null==r?void 0:r.code);return i.code=isNaN(s)?0:s,void 0!==(null==r?void 0:r.reason)&&(i.reason=""+r.reason),i.wasClean=!!(null==r?void 0:r.wasClean),o}return i(a,q),r(a,[{key:"code",get:function(){return ur(this).code}},{key:"reason",get:function(){return ur(this).reason}},{key:"wasClean",get:function(){return ur(this).wasClean}},{key:"toString",value:function(){return"[object CloseEvent]"}},{key:o,get:function(){return"CloseEvent"}},{key:"__MPHTTPX__",get:function(){return{chain:["CloseEvent","Event"]}}}])}(0,f.toStringTag),sr=r(function e(){t(this,e),this.code=0,this.reason="",this.wasClean=!1});function ur(e){return e.__CloseEvent__}var cr=function(n,o){function a(n,r){var o,i;t(this,a),y(o=e(this,a,[n,r]),"__MessageEvent__",new lr);var s=fr(o);return s.data=null!==(i=null==r?void 0:r.data)&&void 0!==i?i:null,void 0!==(null==r?void 0:r.origin)&&(s.origin=""+r.origin),void 0!==(null==r?void 0:r.lastEventId)&&(s.lastEventId=""+r.lastEventId),void 0!==(null==r?void 0:r.source)&&(s.source=r.source),void 0!==(null==r?void 0:r.ports)&&(s.ports=r.ports),o}return i(a,q),r(a,[{key:"data",get:function(){return fr(this).data}},{key:"lastEventId",get:function(){return fr(this).lastEventId}},{key:"origin",get:function(){return fr(this).origin}},{key:"ports",get:function(){return fr(this).ports}},{key:"source",get:function(){return fr(this).source}},{key:"initMessageEvent",value:function(e,t,n,r,o,i,a,s){if(k(arguments.length,1,"MessageEvent","initMessageEvent"),!this.__Event__.eventDispatched){this.initEvent(e,t,n);var u=fr(this);u.data=null!=r?r:null,void 0!==o&&(u.origin=""+o),void 0!==i&&(u.lastEventId=""+i),void 0!==a&&(u.source=a),void 0!==s&&(u.ports=Array.from(s))}}},{key:"toString",value:function(){return"[object MessageEvent]"}},{key:o,get:function(){return"MessageEvent"}},{key:"__MPHTTPX__",get:function(){return{chain:["MessageEvent","Event"]}}}])}(0,f.toStringTag),lr=r(function e(){t(this,e),this.data=null,this.lastEventId="",this.origin="",this.ports=[],this.source=null});function fr(e){return e.__MessageEvent__}var hr=ln();var dr={connectSocket:hr?hr.mp.connectSocket:function(e){return{send:function(e){},close:function(e){},onOpen:function(e){},onMessage:function(e){},onError:function(e){"function"==typeof e&&e({errMsg:"NOT_SUPPORTED_ERR"})},onClose:function(e){"function"==typeof e&&setTimeout(function(){e({code:3009,reason:"NOT_SUPPORTED_ERR"})},0)}}}};function pr(e){dr.connectSocket=e}var yr=function(n,o){function a(n,r){var o;t(this,a),k(arguments.length,1,"WebSocket"),o=e(this,a);var i=""+n,s={url:i,multiple:!0,fail:function(e){console.error(e)}};void 0!==r&&(s.protocols=b(r)?Array.isArray(r)?r:Array.from(r):[""+r]);var u,l,f=dr.connectSocket(s);if(y(o,"__WebSocket__",new vr(o,f)),gr(o).url=i,!f||"object"!==c(f))throw new Error("connectSocket can't establish a connection to the server at ".concat(""+n,"."));return(l=gr(u=o)).socketTask.onOpen(function(e){if("header"in e&&e.header&&"object"===c(e.header)){var t=new Et(e.header);l.protocol=t.get("Sec-WebSocket-Protocol")||""}l.readyState=1,mr(u,"open")}),function(e){var t=gr(e);t.socketTask.onClose(function(n){t.readyState=3;var r=new ar("close",{wasClean:!t.error,code:n.code,reason:n.reason});F(r,!0),X(e,r)})}(o),function(e){var t=gr(e);t.socketTask.onError(function(n){t.error=n,t.readyState=3,mr(e,"error"),console.error(n)})}(o),function(e){gr(e).socketTask.onMessage(function(t){var n,r=t.data;if(r&&"object"===c(r)&&"data"in r){if(n=r.data,"isBuffer"in r&&r.isBuffer&&"string"==typeof n)try{n=hr.mp.base64ToArrayBuffer(n)}catch(e){}}else n=r;C(n)&&"blob"===e.binaryType&&(n=new me([n]));var o=new cr("message",{data:n,origin:e.url});F(o,!0),X(e,o)})}(o),o}return i(a,B),r(a,[{key:"CONNECTING",get:function(){return 0}},{key:"OPEN",get:function(){return 1}},{key:"CLOSING",get:function(){return 2}},{key:"CLOSED",get:function(){return 3}},{key:"binaryType",get:function(){return gr(this).binaryType},set:function(e){"blob"!==e&&"arraybuffer"!==e||(gr(this).binaryType=e)}},{key:"bufferedAmount",get:function(){return gr(this).bufferedAmount}},{key:"extensions",get:function(){return""}},{key:"protocol",get:function(){return gr(this).protocol}},{key:"readyState",get:function(){return gr(this).readyState}},{key:"url",get:function(){return gr(this).url}},{key:"close",value:function(e,t){var n=gr(this);2!==this.readyState&&3!==this.readyState&&(n.readyState=2,n.socketTask.close({code:e,reason:t,fail:function(e){console.error(e)},complete:function(){n.readyState=3}}))}},{key:"send",value:function(e){if(k(arguments.length,1,"WebSocket","send"),0===this.readyState)throw new d("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.");var t=function(e){1===this.readyState&&gr(this).socketTask.send({data:e,fail:function(e){console.error(e)}})}.bind(this);if("string"!=typeof e&&!C(e)&&!ge(e)&&!ArrayBuffer.isView(e))return t(e);new it(e).promise.then(function(e){t(e)})}},{key:"onclose",get:function(){return gr(this).onclose},set:function(e){gr(this).onclose=e,gr(this).attach("close")}},{key:"onerror",get:function(){return gr(this).onerror},set:function(e){gr(this).onerror=e,gr(this).attach("error")}},{key:"onmessage",get:function(){return gr(this).onmessage},set:function(e){gr(this).onmessage=e,gr(this).attach("message")}},{key:"onopen",get:function(){return gr(this).onopen},set:function(e){gr(this).onopen=e,gr(this).attach("open")}},{key:"toString",value:function(){return"[object WebSocket]"}},{key:o,get:function(){return"WebSocket"}},{key:"__MPHTTPX__",get:function(){return{chain:["WebSocket","EventTarget"]}}}],[{key:"CONNECTING",get:function(){return 0}},{key:"OPEN",get:function(){return 1}},{key:"CLOSING",get:function(){return 2}},{key:"CLOSED",get:function(){return 3}}])}(0,f.toStringTag),vr=r(function e(n,r){var o;t(this,e),this.binaryType="blob",this.bufferedAmount=0,this.protocol="",this.readyState=0,this.url="",this.error=null,this.onclose=null,this.onerror=null,this.onmessage=null,this.onopen=null,this.socketTask=r,this.attach=z(n,(o=n,{onclose:function(e){G(o,o.onclose,e)},onerror:function(e){G(o,o.onerror,e)},onmessage:function(e){G(o,o.onmessage,e)},onopen:function(e){G(o,o.onopen,e)}}))});function gr(e){return e.__WebSocket__}function mr(e,t){var n=new q(t);n.__Event__.target=e,F(n,!0),X(e,n)}var br="undefined"!=typeof WebSocket&&WebSocket||yr;export{ae as AbortController,oe as AbortControllerP,re as AbortSignal,Q as AbortSignalP,me as Blob,fe as BlobP,tr as Cookie,Y as CustomEvent,$ as CustomEventP,U as Event,q as EventP,V as EventTarget,B as EventTargetP,Te as File,we as FileP,Me as FileReader,Ce as FileReaderP,ot as FormData,We as FormDataP,Et as Headers,dt as HeadersP,qt as Request,St as RequestP,jt as Response,Lt as ResponseP,A as TextDecoder,R as TextDecoderP,E as TextEncoder,w as TextEncoderP,Ge as URLSearchParams,Fe as URLSearchParamsP,br as WebSocket,yr as WebSocketP,Un as XMLHttpRequest,_n as XMLHttpRequestP,nr as enableCookie,or as fetch,ir as fetchP,Gt as fixFetch,Vt as fixWebSocket,Wt as fixXMLHttpRequest,ln as getPlatform,pr as setConnectSocket,pr as setConnectSocketFunc,zt as setFullOverride,le as setReadableStreamClass,mn as setRequest,mn as setRequestFunc,Ft as setXMLHttpRequest,Ft as setXMLHttpRequestClass};
|
package/package.json
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mphttpx",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.4.0",
|
|
4
|
+
"license": "MIT",
|
|
5
|
+
"author": "Xingzeng Bao",
|
|
6
|
+
"homepage": "https://github.com/baoxingzeng/mphttpx",
|
|
7
|
+
"description": "A polyfill for mini programs.",
|
|
4
8
|
"type": "module",
|
|
5
|
-
"main": "dist/cjs
|
|
6
|
-
"module": "dist/esm
|
|
9
|
+
"main": "dist/mphttpx.cjs.js",
|
|
10
|
+
"module": "dist/mphttpx.esm.js",
|
|
7
11
|
"types": "dist/index.d.ts",
|
|
8
12
|
"files": [
|
|
9
13
|
"README.md",
|
|
@@ -12,15 +16,18 @@
|
|
|
12
16
|
"!dist/cjs/types/**/*",
|
|
13
17
|
"!dist/esm/types/**/*"
|
|
14
18
|
],
|
|
19
|
+
"exports": {
|
|
20
|
+
".": {
|
|
21
|
+
"require": "./dist/cjs/index.js",
|
|
22
|
+
"import": "./dist/esm/index.js",
|
|
23
|
+
"types": "./dist/index.d.ts"
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"sideEffects": false,
|
|
15
27
|
"scripts": {
|
|
16
28
|
"build": "rollup --config",
|
|
17
29
|
"test": "node tests/test.js"
|
|
18
30
|
},
|
|
19
|
-
"sideEffects": false,
|
|
20
|
-
"author": "Xingzeng",
|
|
21
|
-
"license": "MIT",
|
|
22
|
-
"description": "A polyfill for mini-program.",
|
|
23
|
-
"homepage": "https://github.com/baoxingzeng/mphttpx",
|
|
24
31
|
"keywords": [
|
|
25
32
|
"小程序",
|
|
26
33
|
"mini-program",
|
|
@@ -36,7 +43,18 @@
|
|
|
36
43
|
"XMLHttpRequest",
|
|
37
44
|
"WebSocket"
|
|
38
45
|
],
|
|
46
|
+
"dependencies": {
|
|
47
|
+
"fetch-xhr-shim": ">=1.0.0",
|
|
48
|
+
"miniprogram-platform": ">=1.0.0",
|
|
49
|
+
"miniprogram-websocket": ">=1.0.0",
|
|
50
|
+
"miniprogram-xmlhttprequest-shim": ">=1.0.0"
|
|
51
|
+
},
|
|
39
52
|
"devDependencies": {
|
|
53
|
+
"@babel/core": "^7.29.7",
|
|
54
|
+
"@babel/preset-env": "^7.29.7",
|
|
55
|
+
"@rollup/plugin-babel": "^7.1.0",
|
|
56
|
+
"@rollup/plugin-commonjs": "^29.0.3",
|
|
57
|
+
"@rollup/plugin-node-resolve": "^16.0.3",
|
|
40
58
|
"@rollup/plugin-terser": "^0.4.4",
|
|
41
59
|
"@rollup/plugin-typescript": "^12.3.0",
|
|
42
60
|
"cors": "^2.8.5",
|
|
@@ -49,4 +67,4 @@
|
|
|
49
67
|
"ws": "^8.19.0",
|
|
50
68
|
"xhr2": "^0.2.1"
|
|
51
69
|
}
|
|
52
|
-
}
|
|
70
|
+
}
|