cool-common-utils 1.0.3 → 1.0.5
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/dist/amap-utils.js +1 -1
- package/dist/amap-utils.mjs +1 -1
- package/dist/commons/vendor-axios-eBPqXPbi.js +1 -0
- package/dist/commons/vendor-axios-qlYN5UV5.js +1 -0
- package/dist/commons/vendor-other-Cd2MOa_2.js +1 -0
- package/dist/commons/vendor-other-odeBaM7w.js +1 -0
- package/dist/commons/vendor-qs-B9_OEdmf.js +1 -0
- package/dist/commons/vendor-qs-L1Bpz2hz.js +1 -0
- package/dist/commons/vendor-socket.io-client-DfIeTHYA.js +1 -0
- package/dist/commons/vendor-socket.io-client-OWv_jVwG.js +1 -0
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/dist/request.js +1 -1
- package/dist/request.mjs +1 -1
- package/dist/socket-io.js +1 -1
- package/dist/socket-io.mjs +1 -1
- package/dist/utils.js +1 -1
- package/dist/utils.mjs +1 -1
- package/dist/websocket.js +1 -1
- package/dist/websocket.mjs +1 -1
- package/package.json +8 -10
- package/dist/commons/vendor-axios-DsdlaZnY.js +0 -1
- package/dist/commons/vendor-axios-DxFWCEd0.js +0 -1
- package/dist/commons/vendor-other-C48Un_So.js +0 -1
- package/dist/commons/vendor-other-oYX07ukn.js +0 -1
- package/dist/commons/vendor-qs-Dasci0ry.js +0 -1
- package/dist/commons/vendor-qs-DpjaCScg.js +0 -1
- package/dist/commons/vendor-socket.io-client-CkipB4mt.js +0 -1
- package/dist/commons/vendor-socket.io-client-DHDwO2X7.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";function e(e,t){return function(){return e.apply(t,arguments)}}const{toString:t}=Object.prototype,{getPrototypeOf:n}=Object,{iterator:r,toStringTag:o}=Symbol,s=(i=Object.create(null),e=>{const n=t.call(e);return i[n]||(i[n]=n.slice(8,-1).toLowerCase())});var i;const a=e=>(e=e.toLowerCase(),t=>s(t)===e),c=e=>t=>typeof t===e,{isArray:l}=Array,u=c("undefined");function f(e){return null!==e&&!u(e)&&null!==e.constructor&&!u(e.constructor)&&h(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const d=a("ArrayBuffer");const p=c("string"),h=c("function"),m=c("number"),b=e=>null!==e&&"object"==typeof e,y=e=>{if("object"!==s(e))return!1;const t=n(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||o in e||r in e)},g=a("Date"),w=a("File"),E=a("Blob"),R=a("FileList");const O="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},S=void 0!==O.FormData?O.FormData:void 0,A=a("URLSearchParams"),[_,T,v,C]=["ReadableStream","Request","Response","Headers"].map(a);function x(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let r,o;if("object"!=typeof e&&(e=[e]),l(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{if(f(e))return;const o=n?Object.getOwnPropertyNames(e):Object.keys(e),s=o.length;let i;for(r=0;r<s;r++)i=o[r],t.call(null,e[i],i,e)}}function N(e,t){if(f(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r,o=n.length;for(;o-- >0;)if(r=n[o],t===r.toLowerCase())return r;return null}const P="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,j=e=>!u(e)&&e!==P;const D=(U="undefined"!=typeof Uint8Array&&n(Uint8Array),e=>U&&e instanceof U);var U;const L=a("HTMLFormElement"),F=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),B=a("RegExp"),k=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};x(n,(n,o)=>{let s;!1!==(s=t(n,o,e))&&(r[o]=s||n)}),Object.defineProperties(e,r)};const q=a("AsyncFunction"),I=(M="function"==typeof setImmediate,z=h(P.postMessage),M?setImmediate:z?(H=`axios@${Math.random()}`,W=[],P.addEventListener("message",({source:e,data:t})=>{e===P&&t===H&&W.length&&W.shift()()},!1),e=>{W.push(e),P.postMessage(H,"*")}):e=>setTimeout(e));var M,z,H,W;const J="undefined"!=typeof queueMicrotask?queueMicrotask.bind(P):"undefined"!=typeof process&&process.nextTick||I;var V={isArray:l,isArrayBuffer:d,isBuffer:f,isFormData:e=>{if(!e)return!1;if(S&&e instanceof S)return!0;const t=n(e);if(!t||t===Object.prototype)return!1;if(!h(e.append))return!1;const r=s(e);return"formdata"===r||"object"===r&&h(e.toString)&&"[object FormData]"===e.toString()},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&d(e.buffer),t},isString:p,isNumber:m,isBoolean:e=>!0===e||!1===e,isObject:b,isPlainObject:y,isEmptyObject:e=>{if(!b(e)||f(e))return!1;try{return 0===Object.keys(e).length&&Object.getPrototypeOf(e)===Object.prototype}catch(e){return!1}},isReadableStream:_,isRequest:T,isResponse:v,isHeaders:C,isUndefined:u,isDate:g,isFile:w,isReactNativeBlob:e=>!(!e||void 0===e.uri),isReactNative:e=>e&&void 0!==e.getParts,isBlob:E,isRegExp:B,isFunction:h,isStream:e=>b(e)&&h(e.pipe),isURLSearchParams:A,isTypedArray:D,isFileList:R,forEach:x,merge:function e(...t){const{caseless:n,skipUndefined:r}=j(this)&&this||{},o={},s=(t,s)=>{if("__proto__"===s||"constructor"===s||"prototype"===s)return;const i=n&&N(o,s)||s,a=F(o,i)?o[i]:void 0;y(a)&&y(t)?o[i]=e(a,t):y(t)?o[i]=e({},t):l(t)?o[i]=t.slice():r&&u(t)||(o[i]=t)};for(let e=0,n=t.length;e<n;e++)t[e]&&x(t[e],s);return o},extend:(t,n,r,{allOwnKeys:o}={})=>(x(n,(n,o)=>{r&&h(n)?Object.defineProperty(t,o,{__proto__:null,value:e(n,r),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(t,o,{__proto__:null,value:n,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:o}),t),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),Object.defineProperty(e.prototype,"constructor",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{__proto__:null,value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,r,o)=>{let s,i,a;const c={};if(t=t||{},null==e)return t;do{for(s=Object.getOwnPropertyNames(e),i=s.length;i-- >0;)a=s[i],o&&!o(a,e,t)||c[a]||(t[a]=e[a],c[a]=!0);e=!1!==r&&n(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},kindOf:s,kindOfTest:a,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return-1!==r&&r===n},toArray:e=>{if(!e)return null;if(l(e))return e;let t=e.length;if(!m(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[r]).call(e);let o;for(;(o=n.next())&&!o.done;){const n=o.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const r=[];for(;null!==(n=e.exec(t));)r.push(n);return r},isHTMLForm:L,hasOwnProperty:F,hasOwnProp:F,reduceDescriptors:k,freezeMethods:e=>{k(e,(t,n)=>{if(h(e)&&["arguments","caller","callee"].includes(n))return!1;const r=e[n];h(r)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))})},toObjectSet:(e,t)=>{const n={},r=e=>{e.forEach(e=>{n[e]=!0})};return l(e)?r(e):r(String(e).split(t)),n},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,n){return t.toUpperCase()+n}),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:N,global:P,isContextDefined:j,isSpecCompliantForm:function(e){return!!(e&&h(e.append)&&"FormData"===e[o]&&e[r])},toJSONObject:e=>{const t=new WeakSet,n=e=>{if(b(e)){if(t.has(e))return;if(f(e))return e;if(!("toJSON"in e)){t.add(e);const r=l(e)?[]:{};return x(e,(e,t)=>{const o=n(e);!u(o)&&(r[t]=o)}),t.delete(e),r}}return e};return n(e)},isAsyncFn:q,isThenable:e=>e&&(b(e)||h(e))&&h(e.then)&&h(e.catch),setImmediate:I,asap:J,isIterable:e=>null!=e&&h(e[r])};const $=V.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]);const K=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),X=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function G(e,t){return V.isArray(e)?e.map(e=>G(e,t)):function(e){let t=0,n=e.length;for(;t<n;){const n=e.charCodeAt(t);if(9!==n&&32!==n)break;t+=1}for(;n>t;){const t=e.charCodeAt(n-1);if(9!==t&&32!==t)break;n-=1}return 0===t&&n===e.length?e:e.slice(t,n)}(String(e).replace(t,""))}function Q(e){const t=Object.create(null);return V.forEach(e.toJSON(),(e,n)=>{t[n]=(e=>G(e,X))(e)}),t}const Y=Symbol("internals");function Z(e){return e&&String(e).trim().toLowerCase()}function ee(e){return!1===e||null==e?e:V.isArray(e)?e.map(ee):(e=>G(e,K))(String(e))}function te(e,t,n,r,o){return V.isFunction(r)?r.call(this,t,n):(o&&(t=n),V.isString(t)?V.isString(r)?-1!==t.indexOf(r):V.isRegExp(r)?r.test(t):void 0:void 0)}let ne=class{constructor(e){e&&this.set(e)}set(e,t,n){const r=this;function o(e,t,n){const o=Z(t);if(!o)throw new Error("header name must be a non-empty string");const s=V.findKey(r,o);(!s||void 0===r[s]||!0===n||void 0===n&&!1!==r[s])&&(r[s||t]=ee(e))}const s=(e,t)=>V.forEach(e,(e,n)=>o(e,n,t));if(V.isPlainObject(e)||e instanceof this.constructor)s(e,t);else if(V.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))s((e=>{const t={};let n,r,o;return e&&e.split("\n").forEach(function(e){o=e.indexOf(":"),n=e.substring(0,o).trim().toLowerCase(),r=e.substring(o+1).trim(),!n||t[n]&&$[n]||("set-cookie"===n?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t})(e),t);else if(V.isObject(e)&&V.isIterable(e)){let n,r,o={};for(const t of e){if(!V.isArray(t))throw TypeError("Object iterator must return a key-value pair");o[r=t[0]]=(n=o[r])?V.isArray(n)?[...n,t[1]]:[n,t[1]]:t[1]}s(o,t)}else null!=e&&o(t,e,n);return this}get(e,t){if(e=Z(e)){const n=V.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}(e);if(V.isFunction(t))return t.call(this,e,n);if(V.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=Z(e)){const n=V.findKey(this,e);return!(!n||void 0===this[n]||t&&!te(0,this[n],n,t))}return!1}delete(e,t){const n=this;let r=!1;function o(e){if(e=Z(e)){const o=V.findKey(n,e);!o||t&&!te(0,n[o],o,t)||(delete n[o],r=!0)}}return V.isArray(e)?e.forEach(o):o(e),r}clear(e){const t=Object.keys(this);let n=t.length,r=!1;for(;n--;){const o=t[n];e&&!te(0,this[o],o,e,!0)||(delete this[o],r=!0)}return r}normalize(e){const t=this,n={};return V.forEach(this,(r,o)=>{const s=V.findKey(n,o);if(s)return t[s]=ee(r),void delete t[o];const i=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,n)=>t.toUpperCase()+n)}(o):String(o).trim();i!==o&&delete t[o],t[i]=ee(r),n[i]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return V.forEach(this,(n,r)=>{null!=n&&!1!==n&&(t[r]=e&&V.isArray(n)?n.join(", "):n)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join("\n")}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach(e=>n.set(e)),n}static accessor(e){const t=(this[Y]=this[Y]={accessors:{}}).accessors,n=this.prototype;function r(e){const r=Z(e);t[r]||(!function(e,t){const n=V.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{__proto__:null,value:function(e,n,o){return this[r].call(this,t,e,n,o)},configurable:!0})})}(n,e),t[r]=!0)}return V.isArray(e)?e.forEach(r):r(e),this}};ne.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),V.reduceDescriptors(ne.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}}),V.freezeMethods(ne);function re(e,t){const n=new Set(t.map(e=>String(e).toLowerCase())),r=[],o=e=>{if(null===e||"object"!=typeof e)return e;if(V.isBuffer(e))return e;if(-1!==r.indexOf(e))return;let t;if(e instanceof ne&&(e=e.toJSON()),r.push(e),V.isArray(e))t=[],e.forEach((e,n)=>{const r=o(e);V.isUndefined(r)||(t[n]=r)});else{if(!V.isPlainObject(e)&&function(e){if(V.hasOwnProp(e,"toJSON"))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(V.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}(e))return r.pop(),e;t=Object.create(null);for(const[r,s]of Object.entries(e)){const e=n.has(r.toLowerCase())?"[REDACTED ****]":o(s);V.isUndefined(e)||(t[r]=e)}}return r.pop(),t};return o(e)}let oe=class e extends Error{static from(t,n,r,o,s,i){const a=new e(t.message,n||t.code,r,o,s);return a.cause=t,a.name=t.name,null!=t.status&&null==a.status&&(a.status=t.status),i&&Object.assign(a,i),a}constructor(e,t,n,r,o){super(e),Object.defineProperty(this,"message",{__proto__:null,value:e,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o,this.status=o.status)}toJSON(){const e=this.config,t=e&&V.hasOwnProp(e,"redact")?e.redact:void 0,n=V.isArray(t)&&t.length>0?re(e,t):V.toJSONObject(e);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:n,code:this.code,status:this.status}}};oe.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",oe.ERR_BAD_OPTION="ERR_BAD_OPTION",oe.ECONNABORTED="ECONNABORTED",oe.ETIMEDOUT="ETIMEDOUT",oe.ECONNREFUSED="ECONNREFUSED",oe.ERR_NETWORK="ERR_NETWORK",oe.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",oe.ERR_DEPRECATED="ERR_DEPRECATED",oe.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",oe.ERR_BAD_REQUEST="ERR_BAD_REQUEST",oe.ERR_CANCELED="ERR_CANCELED",oe.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",oe.ERR_INVALID_URL="ERR_INVALID_URL",oe.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";function se(e){return V.isPlainObject(e)||V.isArray(e)}function ie(e){return V.endsWith(e,"[]")?e.slice(0,-2):e}function ae(e,t,n){return e?e.concat(t).map(function(e,t){return e=ie(e),!n&&t?"["+e+"]":e}).join(n?".":""):t}const ce=V.toFlatObject(V,{},null,function(e){return/^is[A-Z]/.test(e)});function le(e,t,n){if(!V.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const r=(n=V.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,t){return!V.isUndefined(t[e])})).metaTokens,o=n.visitor||f,s=n.dots,i=n.indexes,a=n.Blob||"undefined"!=typeof Blob&&Blob,c=void 0===n.maxDepth?100:n.maxDepth,l=a&&V.isSpecCompliantForm(t);if(!V.isFunction(o))throw new TypeError("visitor must be a function");function u(e){if(null===e)return"";if(V.isDate(e))return e.toISOString();if(V.isBoolean(e))return e.toString();if(!l&&V.isBlob(e))throw new oe("Blob is not supported. Use a Buffer instead.");return V.isArrayBuffer(e)||V.isTypedArray(e)?l&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function f(e,n,o){let a=e;if(V.isReactNative(t)&&V.isReactNativeBlob(e))return t.append(ae(o,n,s),u(e)),!1;if(e&&!o&&"object"==typeof e)if(V.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(V.isArray(e)&&function(e){return V.isArray(e)&&!e.some(se)}(e)||(V.isFileList(e)||V.endsWith(n,"[]"))&&(a=V.toArray(e)))return n=ie(n),a.forEach(function(e,r){!V.isUndefined(e)&&null!==e&&t.append(!0===i?ae([n],r,s):null===i?n:n+"[]",u(e))}),!1;return!!se(e)||(t.append(ae(o,n,s),u(e)),!1)}const d=[],p=Object.assign(ce,{defaultVisitor:f,convertValue:u,isVisitable:se});if(!V.isObject(e))throw new TypeError("data must be an object");return function e(n,r,s=0){if(!V.isUndefined(n)){if(s>c)throw new oe("Object is too deeply nested ("+s+" levels). Max depth: "+c,oe.ERR_FORM_DATA_DEPTH_EXCEEDED);if(-1!==d.indexOf(n))throw Error("Circular reference detected in "+r.join("."));d.push(n),V.forEach(n,function(n,i){!0===(!(V.isUndefined(n)||null===n)&&o.call(t,n,V.isString(i)?i.trim():i,r,p))&&e(n,r?r.concat(i):[i],s+1)}),d.pop()}}(e),t}function ue(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(e){return t[e]})}function fe(e,t){this._pairs=[],e&&le(e,this,t)}const de=fe.prototype;function pe(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function he(e,t,n){if(!t)return e;const r=n&&n.encode||pe,o=V.isFunction(n)?{serialize:n}:n,s=o&&o.serialize;let i;if(i=s?s(t,o):V.isURLSearchParams(t)?t.toString():new fe(t,o).toString(r),i){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}de.append=function(e,t){this._pairs.push([e,t])},de.toString=function(e){const t=e?function(t){return e.call(this,t,ue)}:ue;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};class me{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){V.forEach(this.handlers,function(t){null!==t&&e(t)})}}var be={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},ye={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:fe,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]};const ge="undefined"!=typeof window&&"undefined"!=typeof document,we="object"==typeof navigator&&navigator||void 0,Ee=ge&&(!we||["ReactNative","NativeScript","NS"].indexOf(we.product)<0),Re="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,Oe=ge&&window.location.href||"http://localhost";var Se={...Object.freeze({__proto__:null,hasBrowserEnv:ge,hasStandardBrowserEnv:Ee,hasStandardBrowserWebWorkerEnv:Re,navigator:we,origin:Oe}),...ye};function Ae(e){function t(e,n,r,o){let s=e[o++];if("__proto__"===s)return!0;const i=Number.isFinite(+s),a=o>=e.length;if(s=!s&&V.isArray(r)?r.length:s,a)return V.hasOwnProp(r,s)?r[s]=V.isArray(r[s])?r[s].concat(n):[r[s],n]:r[s]=n,!i;V.hasOwnProp(r,s)&&V.isObject(r[s])||(r[s]=[]);return t(e,n,r[s],o)&&V.isArray(r[s])&&(r[s]=function(e){const t={},n=Object.keys(e);let r;const o=n.length;let s;for(r=0;r<o;r++)s=n[r],t[s]=e[s];return t}(r[s])),!i}if(V.isFormData(e)&&V.isFunction(e.entries)){const n={};return V.forEachEntry(e,(e,r)=>{t(function(e){return V.matchAll(/\w+|\[(\w*)]/g,e).map(e=>"[]"===e[0]?"":e[1]||e[0])}(e),r,n,0)}),n}return null}const _e=(e,t)=>null!=e&&V.hasOwnProp(e,t)?e[t]:void 0;const Te={transitional:be,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const n=t.getContentType()||"",r=n.indexOf("application/json")>-1,o=V.isObject(e);o&&V.isHTMLForm(e)&&(e=new FormData(e));if(V.isFormData(e))return r?JSON.stringify(Ae(e)):e;if(V.isArrayBuffer(e)||V.isBuffer(e)||V.isStream(e)||V.isFile(e)||V.isBlob(e)||V.isReadableStream(e))return e;if(V.isArrayBufferView(e))return e.buffer;if(V.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let s;if(o){const t=_e(this,"formSerializer");if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return le(e,new Se.classes.URLSearchParams,{visitor:function(e,t,n,r){return Se.isNode&&V.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)},...t})}(e,t).toString();if((s=V.isFileList(e))||n.indexOf("multipart/form-data")>-1){const n=_e(this,"env"),r=n&&n.FormData;return le(s?{"files[]":e}:e,r&&new r,t)}}return o||r?(t.setContentType("application/json",!1),function(e,t,n){if(V.isString(e))try{return(t||JSON.parse)(e),V.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=_e(this,"transitional")||Te.transitional,n=t&&t.forcedJSONParsing,r=_e(this,"responseType"),o="json"===r;if(V.isResponse(e)||V.isReadableStream(e))return e;if(e&&V.isString(e)&&(n&&!r||o)){const n=!(t&&t.silentJSONParsing)&&o;try{return JSON.parse(e,_e(this,"parseReviver"))}catch(e){if(n){if("SyntaxError"===e.name)throw oe.from(e,oe.ERR_BAD_RESPONSE,this,null,_e(this,"response"));throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Se.classes.FormData,Blob:Se.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};function ve(e,t){const n=this||Te,r=t||n,o=ne.from(r.headers);let s=r.data;return V.forEach(e,function(e){s=e.call(n,s,o.normalize(),t?t.status:void 0)}),o.normalize(),s}function Ce(e){return!(!e||!e.__CANCEL__)}V.forEach(["delete","get","head","post","put","patch","query"],e=>{Te.headers[e]={}});let xe=class extends oe{constructor(e,t,n){super(null==e?"canceled":e,oe.ERR_CANCELED,t,n),this.name="CanceledError",this.__CANCEL__=!0}};function Ne(e,t,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new oe("Request failed with status code "+n.status,n.status>=400&&n.status<500?oe.ERR_BAD_REQUEST:oe.ERR_BAD_RESPONSE,n.config,n.request,n)):e(n)}const Pe=(e,t,n=3)=>{let r=0;const o=function(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o,s=0,i=0;return t=void 0!==t?t:1e3,function(a){const c=Date.now(),l=r[i];o||(o=c),n[s]=a,r[s]=c;let u=i,f=0;for(;u!==s;)f+=n[u++],u%=e;if(s=(s+1)%e,s===i&&(i=(i+1)%e),c-o<t)return;const d=l&&c-l;return d?Math.round(1e3*f/d):void 0}}(50,250);return function(e,t){let n,r,o=0,s=1e3/t;const i=(t,s=Date.now())=>{o=s,n=null,r&&(clearTimeout(r),r=null),e(...t)};return[(...e)=>{const t=Date.now(),a=t-o;a>=s?i(e,t):(n=e,r||(r=setTimeout(()=>{r=null,i(n)},s-a)))},()=>n&&i(n)]}(n=>{if(!n||"number"!=typeof n.loaded)return;const s=n.loaded,i=n.lengthComputable?n.total:void 0,a=null!=i?Math.min(s,i):s,c=Math.max(0,a-r),l=o(c);r=Math.max(r,a);e({loaded:a,total:i,progress:i?a/i:void 0,bytes:c,rate:l||void 0,estimated:l&&i?(i-a)/l:void 0,event:n,lengthComputable:null!=i,[t?"download":"upload"]:!0})},n)},je=(e,t)=>{const n=null!=e;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},De=e=>(...t)=>V.asap(()=>e(...t));var Ue=Se.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Se.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Se.origin),Se.navigator&&/(msie|trident)/i.test(Se.navigator.userAgent)):()=>!0,Le=Se.hasStandardBrowserEnv?{write(e,t,n,r,o,s,i){if("undefined"==typeof document)return;const a=[`${e}=${encodeURIComponent(t)}`];V.isNumber(n)&&a.push(`expires=${new Date(n).toUTCString()}`),V.isString(r)&&a.push(`path=${r}`),V.isString(o)&&a.push(`domain=${o}`),!0===s&&a.push("secure"),V.isString(i)&&a.push(`SameSite=${i}`),document.cookie=a.join("; ")},read(e){if("undefined"==typeof document)return null;const t=document.cookie.split(";");for(let n=0;n<t.length;n++){const r=t[n].replace(/^\s+/,""),o=r.indexOf("=");if(-1!==o&&r.slice(0,o)===e)return decodeURIComponent(r.slice(o+1))}return null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read:()=>null,remove(){}};function Fe(e,t,n){let r=!("string"==typeof(o=t)&&/^([a-z][a-z\d+\-.]*:)?\/\//i.test(o));var o;return e&&(r||!1===n)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const Be=e=>e instanceof ne?{...e}:e;function ke(e,t){t=t||{};const n=Object.create(null);function r(e,t,n,r){return V.isPlainObject(e)&&V.isPlainObject(t)?V.merge.call({caseless:r},e,t):V.isPlainObject(t)?V.merge({},t):V.isArray(t)?t.slice():t}function o(e,t,n,o){return V.isUndefined(t)?V.isUndefined(e)?void 0:r(void 0,e,0,o):r(e,t,0,o)}function s(e,t){if(!V.isUndefined(t))return r(void 0,t)}function i(e,t){return V.isUndefined(t)?V.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function a(n,o,s){return V.hasOwnProp(t,s)?r(n,o):V.hasOwnProp(e,s)?r(void 0,n):void 0}Object.defineProperty(n,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});const c={url:s,method:s,data:s,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,allowedSocketPaths:i,responseEncoding:i,validateStatus:a,headers:(e,t,n)=>o(Be(e),Be(t),0,!0)};return V.forEach(Object.keys({...e,...t}),function(r){if("__proto__"===r||"constructor"===r||"prototype"===r)return;const s=V.hasOwnProp(c,r)?c[r]:o,i=s(V.hasOwnProp(e,r)?e[r]:void 0,V.hasOwnProp(t,r)?t[r]:void 0,r);V.isUndefined(i)&&s!==a||(n[r]=i)}),n}const qe=["content-type","content-length"];var Ie=e=>{const t=ke({},e),n=e=>V.hasOwnProp(t,e)?t[e]:void 0,r=n("data");let o=n("withXSRFToken");const s=n("xsrfHeaderName"),i=n("xsrfCookieName");let a=n("headers");const c=n("auth"),l=n("baseURL"),u=n("allowAbsoluteUrls"),f=n("url");var d;if(t.headers=a=ne.from(a),t.url=he(Fe(l,f,u),e.params,e.paramsSerializer),c&&a.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?(d=c.password,encodeURIComponent(d).replace(/%([0-9A-F]{2})/gi,(e,t)=>String.fromCharCode(parseInt(t,16)))):""))),V.isFormData(r)&&(Se.hasStandardBrowserEnv||Se.hasStandardBrowserWebWorkerEnv?a.setContentType(void 0):V.isFunction(r.getHeaders)&&function(e,t,n){"content-only"===n?Object.entries(t).forEach(([t,n])=>{qe.includes(t.toLowerCase())&&e.set(t,n)}):e.set(t)}(a,r.getHeaders(),n("formDataHeaderPolicy"))),Se.hasStandardBrowserEnv){V.isFunction(o)&&(o=o(t));if(!0===o||null==o&&Ue(t.url)){const e=s&&i&&Le.read(i);e&&a.set(s,e)}}return t};var Me="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise(function(t,n){const r=Ie(e);let o=r.data;const s=ne.from(r.headers).normalize();let i,a,c,l,u,{responseType:f,onUploadProgress:d,onDownloadProgress:p}=r;function h(){l&&l(),u&&u(),r.cancelToken&&r.cancelToken.unsubscribe(i),r.signal&&r.signal.removeEventListener("abort",i)}let m=new XMLHttpRequest;function b(){if(!m)return;const r=ne.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders());Ne(function(e){t(e),h()},function(e){n(e),h()},{data:f&&"text"!==f&&"json"!==f?m.response:m.responseText,status:m.status,statusText:m.statusText,headers:r,config:e,request:m}),m=null}m.open(r.method.toUpperCase(),r.url,!0),m.timeout=r.timeout,"onloadend"in m?m.onloadend=b:m.onreadystatechange=function(){m&&4===m.readyState&&(0!==m.status||m.responseURL&&m.responseURL.startsWith("file:"))&&setTimeout(b)},m.onabort=function(){m&&(n(new oe("Request aborted",oe.ECONNABORTED,e,m)),h(),m=null)},m.onerror=function(t){const r=t&&t.message?t.message:"Network Error",o=new oe(r,oe.ERR_NETWORK,e,m);o.event=t||null,n(o),h(),m=null},m.ontimeout=function(){let t=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const o=r.transitional||be;r.timeoutErrorMessage&&(t=r.timeoutErrorMessage),n(new oe(t,o.clarifyTimeoutError?oe.ETIMEDOUT:oe.ECONNABORTED,e,m)),h(),m=null},void 0===o&&s.setContentType(null),"setRequestHeader"in m&&V.forEach(Q(s),function(e,t){m.setRequestHeader(t,e)}),V.isUndefined(r.withCredentials)||(m.withCredentials=!!r.withCredentials),f&&"json"!==f&&(m.responseType=r.responseType),p&&([c,u]=Pe(p,!0),m.addEventListener("progress",c)),d&&m.upload&&([a,l]=Pe(d),m.upload.addEventListener("progress",a),m.upload.addEventListener("loadend",l)),(r.cancelToken||r.signal)&&(i=t=>{m&&(n(!t||t.type?new xe(null,e,m):t),m.abort(),h(),m=null)},r.cancelToken&&r.cancelToken.subscribe(i),r.signal&&(r.signal.aborted?i():r.signal.addEventListener("abort",i)));const y=function(e){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||""}(r.url);!y||Se.protocols.includes(y)?m.send(o||null):n(new oe("Unsupported protocol "+y+":",oe.ERR_BAD_REQUEST,e))})};const ze=(e,t)=>{if(e=e?e.filter(Boolean):[],!t&&!e.length)return;const n=new AbortController;let r=!1;const o=function(e){if(!r){r=!0,i();const t=e instanceof Error?e:this.reason;n.abort(t instanceof oe?t:new xe(t instanceof Error?t.message:t))}};let s=t&&setTimeout(()=>{s=null,o(new oe(`timeout of ${t}ms exceeded`,oe.ETIMEDOUT))},t);const i=()=>{e&&(s&&clearTimeout(s),s=null,e.forEach(e=>{e.unsubscribe?e.unsubscribe(o):e.removeEventListener("abort",o)}),e=null)};e.forEach(e=>e.addEventListener("abort",o));const{signal:a}=n;return a.unsubscribe=()=>V.asap(i),a},He=function*(e,t){let n=e.byteLength;if(n<t)return void(yield e);let r,o=0;for(;o<n;)r=o+t,yield e.slice(o,r),o=r},We=async function*(e){if(e[Symbol.asyncIterator])return void(yield*e);const t=e.getReader();try{for(;;){const{done:e,value:n}=await t.read();if(e)break;yield n}}finally{await t.cancel()}},Je=(e,t,n,r)=>{const o=async function*(e,t){for await(const n of We(e))yield*He(n,t)}(e,t);let s,i=0,a=e=>{s||(s=!0,r&&r(e))};return new ReadableStream({async pull(e){try{const{done:t,value:r}=await o.next();if(t)return a(),void e.close();let s=r.byteLength;if(n){let e=i+=s;n(e)}e.enqueue(new Uint8Array(r))}catch(e){throw a(e),e}},cancel:e=>(a(e),o.return())},{highWaterMark:2})};const Ve="1.16.1",{isFunction:$e}=V,Ke=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},Xe=e=>{const t=void 0!==V.global&&null!==V.global?V.global:globalThis,{ReadableStream:n,TextEncoder:r}=t;e=V.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},e);const{fetch:o,Request:s,Response:i}=e,a=o?$e(o):"function"==typeof fetch,c=$e(s),l=$e(i);if(!a)return!1;const u=a&&$e(n),f=a&&("function"==typeof r?(d=new r,e=>d.encode(e)):async e=>new Uint8Array(await new s(e).arrayBuffer()));var d;const p=c&&u&&Ke(()=>{let e=!1;const t=new s(Se.origin,{body:new n,method:"POST",get duplex(){return e=!0,"half"}}),r=t.headers.has("Content-Type");return null!=t.body&&t.body.cancel(),e&&!r}),h=l&&u&&Ke(()=>V.isReadableStream(new i("").body)),m={stream:h&&(e=>e.body)};a&&["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!m[e]&&(m[e]=(t,n)=>{let r=t&&t[e];if(r)return r.call(t);throw new oe(`Response type '${e}' is not supported`,oe.ERR_NOT_SUPPORT,n)})});const b=async(e,t)=>{const n=V.toFiniteNumber(e.getContentLength());return null==n?(async e=>{if(null==e)return 0;if(V.isBlob(e))return e.size;if(V.isSpecCompliantForm(e)){const t=new s(Se.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return V.isArrayBufferView(e)||V.isArrayBuffer(e)?e.byteLength:(V.isURLSearchParams(e)&&(e+=""),V.isString(e)?(await f(e)).byteLength:void 0)})(t):n};return async e=>{let{url:t,method:n,data:a,signal:l,cancelToken:u,timeout:f,onDownloadProgress:d,onUploadProgress:y,responseType:g,headers:w,withCredentials:E="same-origin",fetchOptions:R,maxContentLength:O,maxBodyLength:S}=Ie(e);const A=V.isNumber(O)&&O>-1,_=V.isNumber(S)&&S>-1;let T=o||fetch;g=g?(g+"").toLowerCase():"text";let v=ze([l,u&&u.toAbortSignal()],f),C=null;const x=v&&v.unsubscribe&&(()=>{v.unsubscribe()});let N;try{if(A&&"string"==typeof t&&t.startsWith("data:")){const n=function(e){if(!e||"string"!=typeof e)return 0;if(!e.startsWith("data:"))return 0;const t=e.indexOf(",");if(t<0)return 0;const n=e.slice(5,t),r=e.slice(t+1);if(/;base64/i.test(n)){let e=r.length;const t=r.length;for(let n=0;n<t;n++)if(37===r.charCodeAt(n)&&n+2<t){const t=r.charCodeAt(n+1),o=r.charCodeAt(n+2);(t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102)&&(o>=48&&o<=57||o>=65&&o<=70||o>=97&&o<=102)&&(e-=2,n+=2)}let n=0,o=t-1;const s=e=>e>=2&&37===r.charCodeAt(e-2)&&51===r.charCodeAt(e-1)&&(68===r.charCodeAt(e)||100===r.charCodeAt(e));o>=0&&(61===r.charCodeAt(o)?(n++,o--):s(o)&&(n++,o-=3)),1===n&&o>=0&&(61===r.charCodeAt(o)||s(o))&&n++;const i=3*Math.floor(e/4)-(n||0);return i>0?i:0}if("undefined"!=typeof Buffer&&"function"==typeof Buffer.byteLength)return Buffer.byteLength(r,"utf8");let o=0;for(let e=0,t=r.length;e<t;e++){const n=r.charCodeAt(e);if(n<128)o+=1;else if(n<2048)o+=2;else if(n>=55296&&n<=56319&&e+1<t){const t=r.charCodeAt(e+1);t>=56320&&t<=57343?(o+=4,e++):o+=3}else o+=3}return o}(t);if(n>O)throw new oe("maxContentLength size of "+O+" exceeded",oe.ERR_BAD_RESPONSE,e,C)}if(_&&"get"!==n&&"head"!==n){const t=await b(w,a);if("number"==typeof t&&isFinite(t)&&t>S)throw new oe("Request body larger than maxBodyLength limit",oe.ERR_BAD_REQUEST,e,C)}if(y&&p&&"get"!==n&&"head"!==n&&0!==(N=await b(w,a))){let e,n=new s(t,{method:"POST",body:a,duplex:"half"});if(V.isFormData(a)&&(e=n.headers.get("content-type"))&&w.setContentType(e),n.body){const[e,t]=je(N,Pe(De(y)));a=Je(n.body,65536,e,t)}}V.isString(E)||(E=E?"include":"omit");const o=c&&"credentials"in s.prototype;if(V.isFormData(a)){const e=w.getContentType();e&&/^multipart\/form-data/i.test(e)&&!/boundary=/i.test(e)&&w.delete("content-type")}w.set("User-Agent","axios/"+Ve,!1);const l={...R,signal:v,method:n.toUpperCase(),headers:Q(w.normalize()),body:a,duplex:"half",credentials:o?E:void 0};C=c&&new s(t,l);let u=await(c?T(C,R):T(t,l));if(A){const t=V.toFiniteNumber(u.headers.get("content-length"));if(null!=t&&t>O)throw new oe("maxContentLength size of "+O+" exceeded",oe.ERR_BAD_RESPONSE,e,C)}const f=h&&("stream"===g||"response"===g);if(h&&u.body&&(d||A||f&&x)){const t={};["status","statusText","headers"].forEach(e=>{t[e]=u[e]});const n=V.toFiniteNumber(u.headers.get("content-length")),[r,o]=d&&je(n,Pe(De(d),!0))||[];let s=0;const a=t=>{if(A&&(s=t,s>O))throw new oe("maxContentLength size of "+O+" exceeded",oe.ERR_BAD_RESPONSE,e,C);r&&r(t)};u=new i(Je(u.body,65536,a,()=>{o&&o(),x&&x()}),t)}g=g||"text";let P=await m[V.findKey(m,g)||"text"](u,e);if(A&&!h&&!f){let t;if(null!=P&&("number"==typeof P.byteLength?t=P.byteLength:"number"==typeof P.size?t=P.size:"string"==typeof P&&(t="function"==typeof r?(new r).encode(P).byteLength:P.length)),"number"==typeof t&&t>O)throw new oe("maxContentLength size of "+O+" exceeded",oe.ERR_BAD_RESPONSE,e,C)}return!f&&x&&x(),await new Promise((t,n)=>{Ne(t,n,{data:P,headers:ne.from(u.headers),status:u.status,statusText:u.statusText,config:e,request:C})})}catch(t){if(x&&x(),v&&v.aborted&&v.reason instanceof oe){const n=v.reason;throw n.config=e,C&&(n.request=C),t!==n&&(n.cause=t),n}if(t&&"TypeError"===t.name&&/Load failed|fetch/i.test(t.message))throw Object.assign(new oe("Network Error",oe.ERR_NETWORK,e,C,t&&t.response),{cause:t.cause||t});throw oe.from(t,t&&t.code,e,C,t&&t.response)}}},Ge=new Map,Qe=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:o}=t,s=[r,o,n];let i,a,c=s.length,l=Ge;for(;c--;)i=s[c],a=l.get(i),void 0===a&&l.set(i,a=c?new Map:Xe(t)),l=a;return a};Qe();const Ye={http:null,xhr:Me,fetch:{get:Qe}};V.forEach(Ye,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch(e){}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});const Ze=e=>`- ${e}`,et=e=>V.isFunction(e)||null===e||!1===e;var tt={getAdapter:function(e,t){e=V.isArray(e)?e:[e];const{length:n}=e;let r,o;const s={};for(let i=0;i<n;i++){let n;if(r=e[i],o=r,!et(r)&&(o=Ye[(n=String(r)).toLowerCase()],void 0===o))throw new oe(`Unknown adapter '${n}'`);if(o&&(V.isFunction(o)||(o=o.get(t))))break;s[n||"#"+i]=o}if(!o){const e=Object.entries(s).map(([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build"));let t=n?e.length>1?"since :\n"+e.map(Ze).join("\n"):" "+Ze(e[0]):"as no adapter specified";throw new oe("There is no suitable adapter to dispatch the request "+t,"ERR_NOT_SUPPORT")}return o},adapters:Ye};function nt(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new xe(null,e)}function rt(e){nt(e),e.headers=ne.from(e.headers),e.data=ve.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return tt.getAdapter(e.adapter||Te.adapter,e)(e).then(function(t){nt(e),e.response=t;try{t.data=ve.call(e,e.transformResponse,t)}finally{delete e.response}return t.headers=ne.from(t.headers),t},function(t){if(!Ce(t)&&(nt(e),t&&t.response)){e.response=t.response;try{t.response.data=ve.call(e,e.transformResponse,t.response)}finally{delete e.response}t.response.headers=ne.from(t.response.headers)}return Promise.reject(t)})}const ot={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{ot[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const st={};ot.transitional=function(e,t,n){function r(e,t){return"[Axios v"+Ve+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,o,s)=>{if(!1===e)throw new oe(r(o," has been removed"+(t?" in "+t:"")),oe.ERR_DEPRECATED);return t&&!st[o]&&(st[o]=!0,console.warn(r(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,o,s)}},ot.spelling=function(e){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};var it={assertOptions:function(e,t,n){if("object"!=typeof e)throw new oe("options must be an object",oe.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const s=r[o],i=Object.prototype.hasOwnProperty.call(t,s)?t[s]:void 0;if(i){const t=e[s],n=void 0===t||i(t,s,e);if(!0!==n)throw new oe("option "+s+" must be "+n,oe.ERR_BAD_OPTION_VALUE);continue}if(!0!==n)throw new oe("Unknown option "+s,oe.ERR_BAD_OPTION)}},validators:ot};const at=it.validators;let ct=class{constructor(e){this.defaults=e||{},this.interceptors={request:new me,response:new me}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=new Error;const n=(()=>{if(!t.stack)return"";const e=t.stack.indexOf("\n");return-1===e?"":t.stack.slice(e+1)})();try{if(e.stack){if(n){const t=n.indexOf("\n"),r=-1===t?-1:n.indexOf("\n",t+1),o=-1===r?"":n.slice(r+1);String(e.stack).endsWith(o)||(e.stack+="\n"+n)}}else e.stack=n}catch(e){}}throw e}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=ke(this.defaults,t);const{transitional:n,paramsSerializer:r,headers:o}=t;void 0!==n&&it.assertOptions(n,{silentJSONParsing:at.transitional(at.boolean),forcedJSONParsing:at.transitional(at.boolean),clarifyTimeoutError:at.transitional(at.boolean),legacyInterceptorReqResOrdering:at.transitional(at.boolean)},!1),null!=r&&(V.isFunction(r)?t.paramsSerializer={serialize:r}:it.assertOptions(r,{encode:at.function,serialize:at.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),it.assertOptions(t,{baseUrl:at.spelling("baseURL"),withXsrfToken:at.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let s=o&&V.merge(o.common,o[t.method]);o&&V.forEach(["delete","get","head","post","put","patch","query","common"],e=>{delete o[e]}),t.headers=ne.concat(s,o);const i=[];let a=!0;this.interceptors.request.forEach(function(e){if("function"==typeof e.runWhen&&!1===e.runWhen(t))return;a=a&&e.synchronous;const n=t.transitional||be;n&&n.legacyInterceptorReqResOrdering?i.unshift(e.fulfilled,e.rejected):i.push(e.fulfilled,e.rejected)});const c=[];let l;this.interceptors.response.forEach(function(e){c.push(e.fulfilled,e.rejected)});let u,f=0;if(!a){const e=[rt.bind(this),void 0];for(e.unshift(...i),e.push(...c),u=e.length,l=Promise.resolve(t);f<u;)l=l.then(e[f++],e[f++]);return l}u=i.length;let d=t;for(;f<u;){const e=i[f++],t=i[f++];try{d=e(d)}catch(e){t.call(this,e);break}}try{l=rt.call(this,d)}catch(e){return Promise.reject(e)}for(f=0,u=c.length;f<u;)l=l.then(c[f++],c[f++]);return l}getUri(e){return he(Fe((e=ke(this.defaults,e)).baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}};V.forEach(["delete","get","head","options"],function(e){ct.prototype[e]=function(t,n){return this.request(ke(n||{},{method:e,url:t,data:(n||{}).data}))}}),V.forEach(["post","put","patch","query"],function(e){function t(t){return function(n,r,o){return this.request(ke(o||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}ct.prototype[e]=t(),"query"!==e&&(ct.prototype[e+"Form"]=t(!0))});const lt={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(lt).forEach(([e,t])=>{lt[t]=e});const ut=function t(n){const r=new ct(n),o=e(ct.prototype.request,r);return V.extend(o,ct.prototype,r,{allOwnKeys:!0}),V.extend(o,r,null,{allOwnKeys:!0}),o.create=function(e){return t(ke(n,e))},o}(Te);ut.Axios=ct,ut.CanceledError=xe,ut.CancelToken=class e{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(e){t=e});const n=this;this.promise.then(e=>{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null}),this.promise.then=e=>{let t;const r=new Promise(e=>{n.subscribe(e),t=e}).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e(function(e,r,o){n.reason||(n.reason=new xe(e,r,o),t(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let t;return{token:new e(function(e){t=e}),cancel:t}}},ut.isCancel=Ce,ut.VERSION=Ve,ut.toFormData=le,ut.AxiosError=oe,ut.Cancel=ut.CanceledError,ut.all=function(e){return Promise.all(e)},ut.spread=function(e){return function(t){return e.apply(null,t)}},ut.isAxiosError=function(e){return V.isObject(e)&&!0===e.isAxiosError},ut.mergeConfig=ke,ut.AxiosHeaders=ne,ut.formToJSON=e=>Ae(V.isHTMLForm(e)?new FormData(e):e),ut.getAdapter=tt.getAdapter,ut.HttpStatusCode=lt,ut.default=ut;const{Axios:ft,AxiosError:dt,CanceledError:pt,isCancel:ht,CancelToken:mt,VERSION:bt,all:yt,Cancel:gt,isAxiosError:wt,spread:Et,toFormData:Rt,AxiosHeaders:Ot,HttpStatusCode:St,formToJSON:At,getAdapter:_t,mergeConfig:Tt,create:vt}=ut;exports.axios=ut;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var t,e,r,n,o,i,s,a,c,p,u,f,l,h,y,d,g,b,m,v,w,_,S,A,k,E,P,x,O,T,R,j,B,N,C,I,U,F,M,q,L,W,D,V,$,H,G,J,Y,K,z,X,Q,Z,tt,et,rt,nt,ot,it,st,at,ct,pt,ut,ft,lt,ht,yt,dt,gt,bt,mt,vt,wt,_t,St,At,kt,Et,Pt=require("./vendor-crypto-js-AYnBdXB5.js");function xt(){return e?t:(e=1,t=TypeError)}function Ot(){if(n)return r;n=1;var t="function"==typeof Map&&Map.prototype,e=Object.getOwnPropertyDescriptor&&t?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,o=t&&e&&"function"==typeof e.get?e.get:null,i=t&&Map.prototype.forEach,s="function"==typeof Set&&Set.prototype,a=Object.getOwnPropertyDescriptor&&s?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,c=s&&a&&"function"==typeof a.get?a.get:null,p=s&&Set.prototype.forEach,u="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,f="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,l="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,h=Boolean.prototype.valueOf,y=Object.prototype.toString,d=Function.prototype.toString,g=String.prototype.match,b=String.prototype.slice,m=String.prototype.replace,v=String.prototype.toUpperCase,w=String.prototype.toLowerCase,_=RegExp.prototype.test,S=Array.prototype.concat,A=Array.prototype.join,k=Array.prototype.slice,E=Math.floor,P="function"==typeof BigInt?BigInt.prototype.valueOf:null,x=Object.getOwnPropertySymbols,O="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,T="function"==typeof Symbol&&"object"==typeof Symbol.iterator,R="function"==typeof Symbol&&Symbol.toStringTag&&(typeof Symbol.toStringTag===T||"symbol")?Symbol.toStringTag:null,j=Object.prototype.propertyIsEnumerable,B=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null);function N(t,e){if(t===1/0||t===-1/0||t!=t||t&&t>-1e3&&t<1e3||_.call(/e/,e))return e;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof t){var n=t<0?-E(-t):E(t);if(n!==t){var o=String(n),i=b.call(e,o.length+1);return m.call(o,r,"$&_")+"."+m.call(m.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return m.call(e,r,"$&_")}var C=Pt.require$$0,I=C.custom,U=$(I)?I:null,F={__proto__:null,double:'"',single:"'"},M={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};function q(t,e,r){var n=r.quoteStyle||e,o=F[n];return o+t+o}function L(t){return m.call(String(t),/"/g,""")}function W(t){return!R||!("object"==typeof t&&(R in t||void 0!==t[R]))}function D(t){return"[object Array]"===J(t)&&W(t)}function V(t){return"[object RegExp]"===J(t)&&W(t)}function $(t){if(T)return t&&"object"==typeof t&&t instanceof Symbol;if("symbol"==typeof t)return!0;if(!t||"object"!=typeof t||!O)return!1;try{return O.call(t),!0}catch(t){}return!1}r=function t(e,r,n,s){var a=r||{};if(G(a,"quoteStyle")&&!G(F,a.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(G(a,"maxStringLength")&&("number"==typeof a.maxStringLength?a.maxStringLength<0&&a.maxStringLength!==1/0:null!==a.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var y=!G(a,"customInspect")||a.customInspect;if("boolean"!=typeof y&&"symbol"!==y)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(G(a,"indent")&&null!==a.indent&&"\t"!==a.indent&&!(parseInt(a.indent,10)===a.indent&&a.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(G(a,"numericSeparator")&&"boolean"!=typeof a.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var v=a.numericSeparator;if(void 0===e)return"undefined";if(null===e)return"null";if("boolean"==typeof e)return e?"true":"false";if("string"==typeof e)return K(e,a);if("number"==typeof e){if(0===e)return 1/0/e>0?"0":"-0";var _=String(e);return v?N(e,_):_}if("bigint"==typeof e){var E=String(e)+"n";return v?N(e,E):E}var x=void 0===a.depth?5:a.depth;if(void 0===n&&(n=0),n>=x&&x>0&&"object"==typeof e)return D(e)?"[Array]":"[Object]";var I=function(t,e){var r;if("\t"===t.indent)r="\t";else{if(!("number"==typeof t.indent&&t.indent>0))return null;r=A.call(Array(t.indent+1)," ")}return{base:r,prev:A.call(Array(e+1),r)}}(a,n);if(void 0===s)s=[];else if(Y(s,e)>=0)return"[Circular]";function M(e,r,o){if(r&&(s=k.call(s)).push(r),o){var i={depth:a.depth};return G(a,"quoteStyle")&&(i.quoteStyle=a.quoteStyle),t(e,i,n+1,s)}return t(e,a,n+1,s)}if("function"==typeof e&&!V(e)){var H=function(t){if(t.name)return t.name;var e=g.call(d.call(t),/^function\s*([\w$]+)/);if(e)return e[1];return null}(e),z=et(e,M);return"[Function"+(H?": "+H:" (anonymous)")+"]"+(z.length>0?" { "+A.call(z,", ")+" }":"")}if($(e)){var rt=T?m.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):O.call(e);return"object"!=typeof e||T?rt:X(rt)}if(function(t){if(!t||"object"!=typeof t)return!1;if("undefined"!=typeof HTMLElement&&t instanceof HTMLElement)return!0;return"string"==typeof t.nodeName&&"function"==typeof t.getAttribute}(e)){for(var nt="<"+w.call(String(e.nodeName)),ot=e.attributes||[],it=0;it<ot.length;it++)nt+=" "+ot[it].name+"="+q(L(ot[it].value),"double",a);return nt+=">",e.childNodes&&e.childNodes.length&&(nt+="..."),nt+="</"+w.call(String(e.nodeName))+">"}if(D(e)){if(0===e.length)return"[]";var st=et(e,M);return I&&!function(t){for(var e=0;e<t.length;e++)if(Y(t[e],"\n")>=0)return!1;return!0}(st)?"["+tt(st,I)+"]":"[ "+A.call(st,", ")+" ]"}if(function(t){return"[object Error]"===J(t)&&W(t)}(e)){var at=et(e,M);return"cause"in Error.prototype||!("cause"in e)||j.call(e,"cause")?0===at.length?"["+String(e)+"]":"{ ["+String(e)+"] "+A.call(at,", ")+" }":"{ ["+String(e)+"] "+A.call(S.call("[cause]: "+M(e.cause),at),", ")+" }"}if("object"==typeof e&&y){if(U&&"function"==typeof e[U]&&C)return C(e,{depth:x-n});if("symbol"!==y&&"function"==typeof e.inspect)return e.inspect()}if(function(t){if(!o||!t||"object"!=typeof t)return!1;try{o.call(t);try{c.call(t)}catch(t){return!0}return t instanceof Map}catch(t){}return!1}(e)){var ct=[];return i&&i.call(e,function(t,r){ct.push(M(r,e,!0)+" => "+M(t,e))}),Z("Map",o.call(e),ct,I)}if(function(t){if(!c||!t||"object"!=typeof t)return!1;try{c.call(t);try{o.call(t)}catch(t){return!0}return t instanceof Set}catch(t){}return!1}(e)){var pt=[];return p&&p.call(e,function(t){pt.push(M(t,e))}),Z("Set",c.call(e),pt,I)}if(function(t){if(!u||!t||"object"!=typeof t)return!1;try{u.call(t,u);try{f.call(t,f)}catch(t){return!0}return t instanceof WeakMap}catch(t){}return!1}(e))return Q("WeakMap");if(function(t){if(!f||!t||"object"!=typeof t)return!1;try{f.call(t,f);try{u.call(t,u)}catch(t){return!0}return t instanceof WeakSet}catch(t){}return!1}(e))return Q("WeakSet");if(function(t){if(!l||!t||"object"!=typeof t)return!1;try{return l.call(t),!0}catch(t){}return!1}(e))return Q("WeakRef");if(function(t){return"[object Number]"===J(t)&&W(t)}(e))return X(M(Number(e)));if(function(t){if(!t||"object"!=typeof t||!P)return!1;try{return P.call(t),!0}catch(t){}return!1}(e))return X(M(P.call(e)));if(function(t){return"[object Boolean]"===J(t)&&W(t)}(e))return X(h.call(e));if(function(t){return"[object String]"===J(t)&&W(t)}(e))return X(M(String(e)));if("undefined"!=typeof window&&e===window)return"{ [object Window] }";if("undefined"!=typeof globalThis&&e===globalThis||void 0!==Pt.commonjsGlobal&&e===Pt.commonjsGlobal)return"{ [object globalThis] }";if(!function(t){return"[object Date]"===J(t)&&W(t)}(e)&&!V(e)){var ut=et(e,M),ft=B?B(e)===Object.prototype:e instanceof Object||e.constructor===Object,lt=e instanceof Object?"":"null prototype",ht=!ft&&R&&Object(e)===e&&R in e?b.call(J(e),8,-1):lt?"Object":"",yt=(ft||"function"!=typeof e.constructor?"":e.constructor.name?e.constructor.name+" ":"")+(ht||lt?"["+A.call(S.call([],ht||[],lt||[]),": ")+"] ":"");return 0===ut.length?yt+"{}":I?yt+"{"+tt(ut,I)+"}":yt+"{ "+A.call(ut,", ")+" }"}return String(e)};var H=Object.prototype.hasOwnProperty||function(t){return t in this};function G(t,e){return H.call(t,e)}function J(t){return y.call(t)}function Y(t,e){if(t.indexOf)return t.indexOf(e);for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}function K(t,e){if(t.length>e.maxStringLength){var r=t.length-e.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return K(b.call(t,0,e.maxStringLength),e)+n}var o=M[e.quoteStyle||"single"];return o.lastIndex=0,q(m.call(m.call(t,o,"\\$1"),/[\x00-\x1f]/g,z),"single",e)}function z(t){var e=t.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return r?"\\"+r:"\\x"+(e<16?"0":"")+v.call(e.toString(16))}function X(t){return"Object("+t+")"}function Q(t){return t+" { ? }"}function Z(t,e,r,n){return t+" ("+e+") {"+(n?tt(r,n):A.call(r,", "))+"}"}function tt(t,e){if(0===t.length)return"";var r="\n"+e.prev+e.base;return r+A.call(t,","+r)+"\n"+e.prev}function et(t,e){var r=D(t),n=[];if(r){n.length=t.length;for(var o=0;o<t.length;o++)n[o]=G(t,o)?e(t[o],t):""}var i,s="function"==typeof x?x(t):[];if(T){i={};for(var a=0;a<s.length;a++)i["$"+s[a]]=s[a]}for(var c in t)G(t,c)&&(r&&String(Number(c))===c&&c<t.length||T&&i["$"+c]instanceof Symbol||(_.call(/[^\w$]/,c)?n.push(e(c,t)+": "+e(t[c],t)):n.push(c+": "+e(t[c],t))));if("function"==typeof x)for(var p=0;p<s.length;p++)j.call(t,s[p])&&n.push("["+e(s[p])+"]: "+e(t[s[p]],t));return n}return r}function Tt(){if(i)return o;i=1;var t=Ot(),e=xt(),r=function(t,e,r){for(var n,o=t;null!=(n=o.next);o=n)if(n.key===e)return o.next=n.next,r||(n.next=t.next,t.next=n),n};return o=function(){var n,o={assert:function(r){if(!o.has(r))throw new e("Side channel does not contain "+t(r))},delete:function(t){var e=function(t,e){if(t)return r(t,e,!0)}(n,t);return e&&n&&!n.next&&(n=void 0),!!e},get:function(t){return function(t,e){if(t){var n=r(t,e);return n&&n.value}}(n,t)},has:function(t){return function(t,e){return!!t&&!!r(t,e)}(n,t)},set:function(t,e){n||(n={next:void 0}),function(t,e,n){var o=r(t,e);o?o.value=n:t.next={key:e,next:t.next,value:n}}(n,t,e)}};return o},o}function Rt(){return a?s:(a=1,s=Object)}function jt(){return p?c:(p=1,c=Error)}function Bt(){return f?u:(f=1,u=EvalError)}function Nt(){return h?l:(h=1,l=RangeError)}function Ct(){return d?y:(d=1,y=ReferenceError)}function It(){return b?g:(b=1,g=SyntaxError)}function Ut(){return v?m:(v=1,m=URIError)}function Ft(){return _?w:(_=1,w=Math.abs)}function Mt(){return A?S:(A=1,S=Math.floor)}function qt(){return E?k:(E=1,k=Math.max)}function Lt(){return x?P:(x=1,P=Math.min)}function Wt(){return T?O:(T=1,O=Math.pow)}function Dt(){return j?R:(j=1,R=Math.round)}function Vt(){return N?B:(N=1,B=Number.isNaN||function(t){return t!=t})}function $t(){if(I)return C;I=1;var t=Vt();return C=function(e){return t(e)||0===e?e:e<0?-1:1}}function Ht(){return F?U:(F=1,U=Object.getOwnPropertyDescriptor)}function Gt(){if(q)return M;q=1;var t=Ht();if(t)try{t([],"length")}catch(e){t=null}return M=t}function Jt(){if(W)return L;W=1;var t=Object.defineProperty||!1;if(t)try{t({},"a",{value:1})}catch(e){t=!1}return L=t}function Yt(){if(H)return $;H=1;var t="undefined"!=typeof Symbol&&Symbol,e=V?D:(V=1,D=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var t={},e=Symbol("test"),r=Object(e);if("string"==typeof e)return!1;if("[object Symbol]"!==Object.prototype.toString.call(e))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(var n in t[e]=42,t)return!1;if("function"==typeof Object.keys&&0!==Object.keys(t).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(t).length)return!1;var o=Object.getOwnPropertySymbols(t);if(1!==o.length||o[0]!==e)return!1;if(!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var i=Object.getOwnPropertyDescriptor(t,e);if(42!==i.value||!0!==i.enumerable)return!1}return!0});return $=function(){return"function"==typeof t&&("function"==typeof Symbol&&("symbol"==typeof t("foo")&&("symbol"==typeof Symbol("bar")&&e())))}}function Kt(){return J?G:(J=1,G="undefined"!=typeof Reflect&&Reflect.getPrototypeOf||null)}function zt(){return K?Y:(K=1,Y=Rt().getPrototypeOf||null)}function Xt(){if(X)return z;X=1;var t=Object.prototype.toString,e=Math.max,r=function(t,e){for(var r=[],n=0;n<t.length;n+=1)r[n]=t[n];for(var o=0;o<e.length;o+=1)r[o+t.length]=e[o];return r};return z=function(n){var o=this;if("function"!=typeof o||"[object Function]"!==t.apply(o))throw new TypeError("Function.prototype.bind called on incompatible "+o);for(var i,s=function(t,e){for(var r=[],n=e,o=0;n<t.length;n+=1,o+=1)r[o]=t[n];return r}(arguments,1),a=e(0,o.length-s.length),c=[],p=0;p<a;p++)c[p]="$"+p;if(i=Function("binder","return function ("+function(t,e){for(var r="",n=0;n<t.length;n+=1)r+=t[n],n+1<t.length&&(r+=e);return r}(c,",")+"){ return binder.apply(this,arguments); }")(function(){if(this instanceof i){var t=o.apply(this,r(s,arguments));return Object(t)===t?t:this}return o.apply(n,r(s,arguments))}),o.prototype){var u=function(){};u.prototype=o.prototype,i.prototype=new u,u.prototype=null}return i},z}function Qt(){if(Z)return Q;Z=1;var t=Xt();return Q=Function.prototype.bind||t}function Zt(){return et?tt:(et=1,tt=Function.prototype.call)}function te(){return nt?rt:(nt=1,rt=Function.prototype.apply)}function ee(){if(at)return st;at=1;var t=Qt(),e=te(),r=Zt(),n=it?ot:(it=1,ot="undefined"!=typeof Reflect&&Reflect&&Reflect.apply);return st=n||t.call(r,e)}function re(){if(pt)return ct;pt=1;var t=Qt(),e=xt(),r=Zt(),n=ee();return ct=function(o){if(o.length<1||"function"!=typeof o[0])throw new e("a function is required");return n(t,r,o)}}function ne(){if(ft)return ut;ft=1;var t,e=re(),r=Gt();try{t=[].__proto__===Array.prototype}catch(t){if(!t||"object"!=typeof t||!("code"in t)||"ERR_PROTO_ACCESS"!==t.code)throw t}var n=!!t&&r&&r(Object.prototype,"__proto__"),o=Object,i=o.getPrototypeOf;return ut=n&&"function"==typeof n.get?e([n.get]):"function"==typeof i&&function(t){return i(null==t?t:o(t))},ut}function oe(){if(ht)return lt;ht=1;var t=Kt(),e=zt(),r=ne();return lt=t?function(e){return t(e)}:e?function(t){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new TypeError("getProto: not an object");return e(t)}:r?function(t){return r(t)}:null}function ie(){if(dt)return yt;dt=1;var t=Function.prototype.call,e=Object.prototype.hasOwnProperty,r=Qt();return yt=r.call(t,e)}function se(){if(bt)return gt;var t;bt=1;var e=Rt(),r=jt(),n=Bt(),o=Nt(),i=Ct(),s=It(),a=xt(),c=Ut(),p=Ft(),u=Mt(),f=qt(),l=Lt(),h=Wt(),y=Dt(),d=$t(),g=Function,b=function(t){try{return g('"use strict"; return ('+t+").constructor;")()}catch(t){}},m=Gt(),v=Jt(),w=function(){throw new a},_=m?function(){try{return w}catch(t){try{return m(arguments,"callee").get}catch(t){return w}}}():w,S=Yt()(),A=oe(),k=zt(),E=Kt(),P=te(),x=Zt(),O={},T="undefined"!=typeof Uint8Array&&A?A(Uint8Array):t,R={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?t:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?t:ArrayBuffer,"%ArrayIteratorPrototype%":S&&A?A([][Symbol.iterator]()):t,"%AsyncFromSyncIteratorPrototype%":t,"%AsyncFunction%":O,"%AsyncGenerator%":O,"%AsyncGeneratorFunction%":O,"%AsyncIteratorPrototype%":O,"%Atomics%":"undefined"==typeof Atomics?t:Atomics,"%BigInt%":"undefined"==typeof BigInt?t:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?t:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?t:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?t:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":r,"%eval%":eval,"%EvalError%":n,"%Float16Array%":"undefined"==typeof Float16Array?t:Float16Array,"%Float32Array%":"undefined"==typeof Float32Array?t:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?t:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?t:FinalizationRegistry,"%Function%":g,"%GeneratorFunction%":O,"%Int8Array%":"undefined"==typeof Int8Array?t:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?t:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?t:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":S&&A?A(A([][Symbol.iterator]())):t,"%JSON%":"object"==typeof JSON?JSON:t,"%Map%":"undefined"==typeof Map?t:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&S&&A?A((new Map)[Symbol.iterator]()):t,"%Math%":Math,"%Number%":Number,"%Object%":e,"%Object.getOwnPropertyDescriptor%":m,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?t:Promise,"%Proxy%":"undefined"==typeof Proxy?t:Proxy,"%RangeError%":o,"%ReferenceError%":i,"%Reflect%":"undefined"==typeof Reflect?t:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?t:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&S&&A?A((new Set)[Symbol.iterator]()):t,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?t:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":S&&A?A(""[Symbol.iterator]()):t,"%Symbol%":S?Symbol:t,"%SyntaxError%":s,"%ThrowTypeError%":_,"%TypedArray%":T,"%TypeError%":a,"%Uint8Array%":"undefined"==typeof Uint8Array?t:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?t:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?t:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?t:Uint32Array,"%URIError%":c,"%WeakMap%":"undefined"==typeof WeakMap?t:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?t:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?t:WeakSet,"%Function.prototype.call%":x,"%Function.prototype.apply%":P,"%Object.defineProperty%":v,"%Object.getPrototypeOf%":k,"%Math.abs%":p,"%Math.floor%":u,"%Math.max%":f,"%Math.min%":l,"%Math.pow%":h,"%Math.round%":y,"%Math.sign%":d,"%Reflect.getPrototypeOf%":E};if(A)try{null.error}catch(t){var j=A(A(t));R["%Error.prototype%"]=j}var B=function t(e){var r;if("%AsyncFunction%"===e)r=b("async function () {}");else if("%GeneratorFunction%"===e)r=b("function* () {}");else if("%AsyncGeneratorFunction%"===e)r=b("async function* () {}");else if("%AsyncGenerator%"===e){var n=t("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if("%AsyncIteratorPrototype%"===e){var o=t("%AsyncGenerator%");o&&A&&(r=A(o.prototype))}return R[e]=r,r},N={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},C=Qt(),I=ie(),U=C.call(x,Array.prototype.concat),F=C.call(P,Array.prototype.splice),M=C.call(x,String.prototype.replace),q=C.call(x,String.prototype.slice),L=C.call(x,RegExp.prototype.exec),W=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,D=/\\(\\)?/g,V=function(t,e){var r,n=t;if(I(N,n)&&(n="%"+(r=N[n])[0]+"%"),I(R,n)){var o=R[n];if(o===O&&(o=B(n)),void 0===o&&!e)throw new a("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:o}}throw new s("intrinsic "+t+" does not exist!")};return gt=function(t,e){if("string"!=typeof t||0===t.length)throw new a("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof e)throw new a('"allowMissing" argument must be a boolean');if(null===L(/^%?[^%]*%?$/,t))throw new s("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=function(t){var e=q(t,0,1),r=q(t,-1);if("%"===e&&"%"!==r)throw new s("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==e)throw new s("invalid intrinsic syntax, expected opening `%`");var n=[];return M(t,W,function(t,e,r,o){n[n.length]=r?M(o,D,"$1"):e||t}),n}(t),n=r.length>0?r[0]:"",o=V("%"+n+"%",e),i=o.name,c=o.value,p=!1,u=o.alias;u&&(n=u[0],F(r,U([0,1],u)));for(var f=1,l=!0;f<r.length;f+=1){var h=r[f],y=q(h,0,1),d=q(h,-1);if(('"'===y||"'"===y||"`"===y||'"'===d||"'"===d||"`"===d)&&y!==d)throw new s("property names with quotes must have matching quotes");if("constructor"!==h&&l||(p=!0),I(R,i="%"+(n+="."+h)+"%"))c=R[i];else if(null!=c){if(!(h in c)){if(!e)throw new a("base intrinsic for "+t+" exists, but the property is not available.");return}if(m&&f+1>=r.length){var g=m(c,h);c=(l=!!g)&&"get"in g&&!("originalValue"in g.get)?g.get:c[h]}else l=I(c,h),c=c[h];l&&!p&&(R[i]=c)}}return c},gt}function ae(){if(vt)return mt;vt=1;var t=se(),e=re(),r=e([t("%String.prototype.indexOf%")]);return mt=function(n,o){var i=t(n,!!o);return"function"==typeof i&&r(n,".prototype.")>-1?e([i]):i}}function ce(){if(_t)return wt;_t=1;var t=se(),e=ae(),r=Ot(),n=xt(),o=t("%Map%",!0),i=e("Map.prototype.get",!0),s=e("Map.prototype.set",!0),a=e("Map.prototype.has",!0),c=e("Map.prototype.delete",!0),p=e("Map.prototype.size",!0);return wt=!!o&&function(){var t,e={assert:function(t){if(!e.has(t))throw new n("Side channel does not contain "+r(t))},delete:function(e){if(t){var r=c(t,e);return 0===p(t)&&(t=void 0),r}return!1},get:function(e){if(t)return i(t,e)},has:function(e){return!!t&&a(t,e)},set:function(e,r){t||(t=new o),s(t,e,r)}};return e},wt}exports.__assign=function(){return exports.__assign=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},exports.__assign.apply(this,arguments)},"function"==typeof SuppressedError&&SuppressedError;const pe=Object.create(null);pe.open="0",pe.close="1",pe.ping="2",pe.pong="3",pe.message="4",pe.upgrade="5",pe.noop="6";const ue=Object.create(null);Object.keys(pe).forEach(t=>{ue[pe[t]]=t});const fe={type:"error",data:"parser error"},le="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===Object.prototype.toString.call(Blob),he="function"==typeof ArrayBuffer,ye=t=>"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer instanceof ArrayBuffer,de=({type:t,data:e},r,n)=>le&&e instanceof Blob?r?n(e):ge(e,n):he&&(e instanceof ArrayBuffer||ye(e))?r?n(e):ge(new Blob([e]),n):n(pe[t]+(e||"")),ge=(t,e)=>{const r=new FileReader;return r.onload=function(){const t=r.result.split(",")[1];e("b"+(t||""))},r.readAsDataURL(t)};function be(t){return t instanceof Uint8Array?t:t instanceof ArrayBuffer?new Uint8Array(t):new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}let me;const ve="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",we="undefined"==typeof Uint8Array?[]:new Uint8Array(256);for(let t=0;t<64;t++)we[ve.charCodeAt(t)]=t;const _e="function"==typeof ArrayBuffer,Se=(t,e)=>{if("string"!=typeof t)return{type:"message",data:ke(t,e)};const r=t.charAt(0);if("b"===r)return{type:"message",data:Ae(t.substring(1),e)};return ue[r]?t.length>1?{type:ue[r],data:t.substring(1)}:{type:ue[r]}:fe},Ae=(t,e)=>{if(_e){const r=(t=>{let e,r,n,o,i,s=.75*t.length,a=t.length,c=0;"="===t[t.length-1]&&(s--,"="===t[t.length-2]&&s--);const p=new ArrayBuffer(s),u=new Uint8Array(p);for(e=0;e<a;e+=4)r=we[t.charCodeAt(e)],n=we[t.charCodeAt(e+1)],o=we[t.charCodeAt(e+2)],i=we[t.charCodeAt(e+3)],u[c++]=r<<2|n>>4,u[c++]=(15&n)<<4|o>>2,u[c++]=(3&o)<<6|63&i;return p})(t);return ke(r,e)}return{base64:!0,data:t}},ke=(t,e)=>"blob"===e?t instanceof Blob?t:new Blob([t]):t instanceof ArrayBuffer?t:t.buffer,Ee=String.fromCharCode(30);function Pe(){return new TransformStream({transform(t,e){!function(t,e){le&&t.data instanceof Blob?t.data.arrayBuffer().then(be).then(e):he&&(t.data instanceof ArrayBuffer||ye(t.data))?e(be(t.data)):de(t,!1,t=>{me||(me=new TextEncoder),e(me.encode(t))})}(t,r=>{const n=r.length;let o;if(n<126)o=new Uint8Array(1),new DataView(o.buffer).setUint8(0,n);else if(n<65536){o=new Uint8Array(3);const t=new DataView(o.buffer);t.setUint8(0,126),t.setUint16(1,n)}else{o=new Uint8Array(9);const t=new DataView(o.buffer);t.setUint8(0,127),t.setBigUint64(1,BigInt(n))}t.data&&"string"!=typeof t.data&&(o[0]|=128),e.enqueue(o),e.enqueue(r)})}})}let xe;function Oe(t){return t.reduce((t,e)=>t+e.length,0)}function Te(t,e){if(t[0].length===e)return t.shift();const r=new Uint8Array(e);let n=0;for(let o=0;o<e;o++)r[o]=t[0][n++],n===t[0].length&&(t.shift(),n=0);return t.length&&n<t[0].length&&(t[0]=t[0].slice(n)),r}var Re,je={};var Be=function(){if(Re)return je;function t(e){if(e)return function(e){for(var r in t.prototype)e[r]=t.prototype[r];return e}(e)}return Re=1,je.Emitter=t,t.prototype.on=t.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this},t.prototype.once=function(t,e){function r(){this.off(t,r),e.apply(this,arguments)}return r.fn=e,this.on(t,r),this},t.prototype.off=t.prototype.removeListener=t.prototype.removeAllListeners=t.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var r,n=this._callbacks["$"+t];if(!n)return this;if(1==arguments.length)return delete this._callbacks["$"+t],this;for(var o=0;o<n.length;o++)if((r=n[o])===e||r.fn===e){n.splice(o,1);break}return 0===n.length&&delete this._callbacks["$"+t],this},t.prototype.emit=function(t){this._callbacks=this._callbacks||{};for(var e=new Array(arguments.length-1),r=this._callbacks["$"+t],n=1;n<arguments.length;n++)e[n-1]=arguments[n];if(r){n=0;for(var o=(r=r.slice(0)).length;n<o;++n)r[n].apply(this,e)}return this},t.prototype.emitReserved=t.prototype.emit,t.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]},t.prototype.hasListeners=function(t){return!!this.listeners(t).length},je}();const Ne="function"==typeof Promise&&"function"==typeof Promise.resolve?t=>Promise.resolve().then(t):(t,e)=>e(t,0),Ce="undefined"!=typeof self?self:"undefined"!=typeof window?window:Function("return this")();function Ie(t,...e){return e.reduce((e,r)=>(t.hasOwnProperty(r)&&(e[r]=t[r]),e),{})}const Ue=Ce.setTimeout,Fe=Ce.clearTimeout;function Me(t,e){e.useNativeTimers?(t.setTimeoutFn=Ue.bind(Ce),t.clearTimeoutFn=Fe.bind(Ce)):(t.setTimeoutFn=Ce.setTimeout.bind(Ce),t.clearTimeoutFn=Ce.clearTimeout.bind(Ce))}function qe(t){return"string"==typeof t?function(t){let e=0,r=0;for(let n=0,o=t.length;n<o;n++)e=t.charCodeAt(n),e<128?r+=1:e<2048?r+=2:e<55296||e>=57344?r+=3:(n++,r+=4);return r}(t):Math.ceil(1.33*(t.byteLength||t.size))}function Le(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}class We extends Error{constructor(t,e,r){super(t),this.description=e,this.context=r,this.type="TransportError"}}class De extends Be.Emitter{constructor(t){super(),this.writable=!1,Me(this,t),this.opts=t,this.query=t.query,this.socket=t.socket,this.supportsBinary=!t.forceBase64}onError(t,e,r){return super.emitReserved("error",new We(t,e,r)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return"opening"!==this.readyState&&"open"!==this.readyState||(this.doClose(),this.onClose()),this}send(t){"open"===this.readyState&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const e=Se(t,this.socket.binaryType);this.onPacket(e)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}pause(t){}createUri(t,e={}){return t+"://"+this._hostname()+this._port()+this.opts.path+this._query(e)}_hostname(){const t=this.opts.hostname;return-1===t.indexOf(":")?t:"["+t+"]"}_port(){return this.opts.port&&(this.opts.secure&&443!==Number(this.opts.port)||!this.opts.secure&&80!==Number(this.opts.port))?":"+this.opts.port:""}_query(t){const e=function(t){let e="";for(let r in t)t.hasOwnProperty(r)&&(e.length&&(e+="&"),e+=encodeURIComponent(r)+"="+encodeURIComponent(t[r]));return e}(t);return e.length?"?"+e:""}}class Ve extends De{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(t){this.readyState="pausing";const e=()=>{this.readyState="paused",t()};if(this._polling||!this.writable){let t=0;this._polling&&(t++,this.once("pollComplete",function(){--t||e()})),this.writable||(t++,this.once("drain",function(){--t||e()}))}else e()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){((t,e)=>{const r=t.split(Ee),n=[];for(let t=0;t<r.length;t++){const o=Se(r[t],e);if(n.push(o),"error"===o.type)break}return n})(t,this.socket.binaryType).forEach(t=>{if("opening"===this.readyState&&"open"===t.type&&this.onOpen(),"close"===t.type)return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(t)}),"closed"!==this.readyState&&(this._polling=!1,this.emitReserved("pollComplete"),"open"===this.readyState&&this._poll())}doClose(){const t=()=>{this.write([{type:"close"}])};"open"===this.readyState?t():this.once("open",t)}write(t){this.writable=!1,((t,e)=>{const r=t.length,n=new Array(r);let o=0;t.forEach((t,i)=>{de(t,!1,t=>{n[i]=t,++o===r&&e(n.join(Ee))})})})(t,t=>{this.doWrite(t,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const t=this.opts.secure?"https":"http",e=this.query||{};return!1!==this.opts.timestampRequests&&(e[this.opts.timestampParam]=Le()),this.supportsBinary||e.sid||(e.b64=1),this.createUri(t,e)}}let $e=!1;try{$e="undefined"!=typeof XMLHttpRequest&&"withCredentials"in new XMLHttpRequest}catch(t){}const He=$e;function Ge(){}class Je extends Ve{constructor(t){if(super(t),"undefined"!=typeof location){const e="https:"===location.protocol;let r=location.port;r||(r=e?"443":"80"),this.xd="undefined"!=typeof location&&t.hostname!==location.hostname||r!==t.port}}doWrite(t,e){const r=this.request({method:"POST",data:t});r.on("success",e),r.on("error",(t,e)=>{this.onError("xhr post error",t,e)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(t,e)=>{this.onError("xhr poll error",t,e)}),this.pollXhr=t}}class Ye extends Be.Emitter{constructor(t,e,r){super(),this.createRequest=t,Me(this,r),this._opts=r,this._method=r.method||"GET",this._uri=e,this._data=void 0!==r.data?r.data:null,this._create()}_create(){var t;const e=Ie(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");e.xdomain=!!this._opts.xd;const r=this._xhr=this.createRequest(e);try{r.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let t in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(t)&&r.setRequestHeader(t,this._opts.extraHeaders[t])}}catch(t){}if("POST"===this._method)try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(t){}try{r.setRequestHeader("Accept","*/*")}catch(t){}null===(t=this._opts.cookieJar)||void 0===t||t.addCookies(r),"withCredentials"in r&&(r.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(r.timeout=this._opts.requestTimeout),r.onreadystatechange=()=>{var t;3===r.readyState&&(null===(t=this._opts.cookieJar)||void 0===t||t.parseCookies(r.getResponseHeader("set-cookie"))),4===r.readyState&&(200===r.status||1223===r.status?this._onLoad():this.setTimeoutFn(()=>{this._onError("number"==typeof r.status?r.status:0)},0))},r.send(this._data)}catch(t){return void this.setTimeoutFn(()=>{this._onError(t)},0)}"undefined"!=typeof document&&(this._index=Ye.requestsCount++,Ye.requests[this._index]=this)}_onError(t){this.emitReserved("error",t,this._xhr),this._cleanup(!0)}_cleanup(t){if(void 0!==this._xhr&&null!==this._xhr){if(this._xhr.onreadystatechange=Ge,t)try{this._xhr.abort()}catch(t){}"undefined"!=typeof document&&delete Ye.requests[this._index],this._xhr=null}}_onLoad(){const t=this._xhr.responseText;null!==t&&(this.emitReserved("data",t),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}if(Ye.requestsCount=0,Ye.requests={},"undefined"!=typeof document)if("function"==typeof attachEvent)attachEvent("onunload",Ke);else if("function"==typeof addEventListener){addEventListener("onpagehide"in Ce?"pagehide":"unload",Ke,!1)}function Ke(){for(let t in Ye.requests)Ye.requests.hasOwnProperty(t)&&Ye.requests[t].abort()}const ze=function(){const t=Xe({xdomain:!1});return t&&null!==t.responseType}();function Xe(t){const e=t.xdomain;try{if("undefined"!=typeof XMLHttpRequest&&(!e||He))return new XMLHttpRequest}catch(t){}if(!e)try{return new(Ce[["Active"].concat("Object").join("X")])("Microsoft.XMLHTTP")}catch(t){}}const Qe="undefined"!=typeof navigator&&"string"==typeof navigator.product&&"reactnative"===navigator.product.toLowerCase();class Ze extends De{get name(){return"websocket"}doOpen(){const t=this.uri(),e=this.opts.protocols,r=Qe?{}:Ie(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,e,r)}catch(t){return this.emitReserved("error",t)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let e=0;e<t.length;e++){const r=t[e],n=e===t.length-1;de(r,this.supportsBinary,t=>{try{this.doWrite(r,t)}catch(t){}n&&Ne(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){void 0!==this.ws&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",e=this.query||{};return this.opts.timestampRequests&&(e[this.opts.timestampParam]=Le()),this.supportsBinary||(e.b64=1),this.createUri(t,e)}}const tr=Ce.WebSocket||Ce.MozWebSocket;const er={websocket:class extends Ze{createSocket(t,e,r){return Qe?new tr(t,e,r):e?new tr(t,e):new tr(t)}doWrite(t,e){this.ws.send(e)}},webtransport:class extends De{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(t){return this.emitReserved("error",t)}this._transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(t=>{const e=function(t,e){xe||(xe=new TextDecoder);const r=[];let n=0,o=-1,i=!1;return new TransformStream({transform(s,a){for(r.push(s);;){if(0===n){if(Oe(r)<1)break;const t=Te(r,1);i=!(128&~t[0]),o=127&t[0],n=o<126?3:126===o?1:2}else if(1===n){if(Oe(r)<2)break;const t=Te(r,2);o=new DataView(t.buffer,t.byteOffset,t.length).getUint16(0),n=3}else if(2===n){if(Oe(r)<8)break;const t=Te(r,8),e=new DataView(t.buffer,t.byteOffset,t.length),i=e.getUint32(0);if(i>Math.pow(2,21)-1){a.enqueue(fe);break}o=i*Math.pow(2,32)+e.getUint32(4),n=3}else{if(Oe(r)<o)break;const t=Te(r,o);a.enqueue(Se(i?t:xe.decode(t),e)),n=0}if(0===o||o>t){a.enqueue(fe);break}}}})}(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(e).getReader(),n=Pe();n.readable.pipeTo(t.writable),this._writer=n.writable.getWriter();const o=()=>{r.read().then(({done:t,value:e})=>{t||(this.onPacket(e),o())}).catch(t=>{})};o();const i={type:"open"};this.query.sid&&(i.data=`{"sid":"${this.query.sid}"}`),this._writer.write(i).then(()=>this.onOpen())})})}write(t){this.writable=!1;for(let e=0;e<t.length;e++){const r=t[e],n=e===t.length-1;this._writer.write(r).then(()=>{n&&Ne(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;null===(t=this._transport)||void 0===t||t.close()}},polling:class extends Je{constructor(t){super(t);const e=t&&t.forceBase64;this.supportsBinary=ze&&!e}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new Ye(Xe,this.uri(),t)}}},rr=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,nr=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function or(t){if(t.length>8e3)throw"URI too long";const e=t,r=t.indexOf("["),n=t.indexOf("]");-1!=r&&-1!=n&&(t=t.substring(0,r)+t.substring(r,n).replace(/:/g,";")+t.substring(n,t.length));let o=rr.exec(t||""),i={},s=14;for(;s--;)i[nr[s]]=o[s]||"";return-1!=r&&-1!=n&&(i.source=e,i.host=i.host.substring(1,i.host.length-1).replace(/;/g,":"),i.authority=i.authority.replace("[","").replace("]","").replace(/;/g,":"),i.ipv6uri=!0),i.pathNames=function(t,e){const r=/\/{2,9}/g,n=e.replace(r,"/").split("/");"/"!=e.slice(0,1)&&0!==e.length||n.splice(0,1);"/"==e.slice(-1)&&n.splice(n.length-1,1);return n}(0,i.path),i.queryKey=function(t,e){const r={};return e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(t,e,n){e&&(r[e]=n)}),r}(0,i.query),i}const ir="function"==typeof addEventListener&&"function"==typeof removeEventListener,sr=[];ir&&addEventListener("offline",()=>{sr.forEach(t=>t())},!1);class ar extends Be.Emitter{constructor(t,e){if(super(),this.binaryType="arraybuffer",this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,t&&"object"==typeof t&&(e=t,t=null),t){const r=or(t);e.hostname=r.host,e.secure="https"===r.protocol||"wss"===r.protocol,e.port=r.port,r.query&&(e.query=r.query)}else e.host&&(e.hostname=or(e.host).host);Me(this,e),this.secure=null!=e.secure?e.secure:"undefined"!=typeof location&&"https:"===location.protocol,e.hostname&&!e.port&&(e.port=this.secure?"443":"80"),this.hostname=e.hostname||("undefined"!=typeof location?location.hostname:"localhost"),this.port=e.port||("undefined"!=typeof location&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},e.transports.forEach(t=>{const e=t.prototype.name;this.transports.push(e),this._transportsByName[e]=t}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},e),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),"string"==typeof this.opts.query&&(this.opts.query=function(t){let e={},r=t.split("&");for(let t=0,n=r.length;t<n;t++){let n=r[t].split("=");e[decodeURIComponent(n[0])]=decodeURIComponent(n[1])}return e}(this.opts.query)),ir&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),"localhost"!==this.hostname&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},sr.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const e=Object.assign({},this.opts.query);e.EIO=4,e.transport=t,this.id&&(e.sid=this.id);const r=Object.assign({},this.opts,{query:e,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new this._transportsByName[t](r)}_open(){if(0===this.transports.length)return void this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);const t=this.opts.rememberUpgrade&&ar.priorWebsocketSuccess&&-1!==this.transports.indexOf("websocket")?"websocket":this.transports[0];this.readyState="opening";const e=this.createTransport(t);e.open(),this.setTransport(e)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",t=>this._onClose("transport close",t))}onOpen(){this.readyState="open",ar.priorWebsocketSuccess="websocket"===this.transport.name,this.emitReserved("open"),this.flush()}_onPacket(t){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState)switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const e=new Error("server error");e.code=t.data,this._onError(e);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data)}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this._pingInterval=t.pingInterval,this._pingTimeout=t.pingTimeout,this._maxPayload=t.maxPayload,this.onOpen(),"closed"!==this.readyState&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const t=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+t,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},t),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,0===this.writeBuffer.length?this.emitReserved("drain"):this.flush()}flush(){if("closed"!==this.readyState&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this._getWritablePackets();this.transport.send(t),this._prevBufferLen=t.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&"polling"===this.transport.name&&this.writeBuffer.length>1))return this.writeBuffer;let t=1;for(let e=0;e<this.writeBuffer.length;e++){const r=this.writeBuffer[e].data;if(r&&(t+=qe(r)),e>0&&t>this._maxPayload)return this.writeBuffer.slice(0,e);t+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const t=Date.now()>this._pingTimeoutTime;return t&&(this._pingTimeoutTime=0,Ne(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),t}write(t,e,r){return this._sendPacket("message",t,e,r),this}send(t,e,r){return this._sendPacket("message",t,e,r),this}_sendPacket(t,e,r,n){if("function"==typeof e&&(n=e,e=void 0),"function"==typeof r&&(n=r,r=null),"closing"===this.readyState||"closed"===this.readyState)return;(r=r||{}).compress=!1!==r.compress;const o={type:t,data:e,options:r};this.emitReserved("packetCreate",o),this.writeBuffer.push(o),n&&this.once("flush",n),this.flush()}close(){const t=()=>{this._onClose("forced close"),this.transport.close()},e=()=>{this.off("upgrade",e),this.off("upgradeError",e),t()},r=()=>{this.once("upgrade",e),this.once("upgradeError",e)};return"opening"!==this.readyState&&"open"!==this.readyState||(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():t()}):this.upgrading?r():t()),this}_onError(t){if(ar.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&"opening"===this.readyState)return this.transports.shift(),this._open();this.emitReserved("error",t),this._onClose("transport error",t)}_onClose(t,e){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),ir&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const t=sr.indexOf(this._offlineEventListener);-1!==t&&sr.splice(t,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,e),this.writeBuffer=[],this._prevBufferLen=0}}}ar.protocol=4;class cr extends ar{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),"open"===this.readyState&&this.opts.upgrade)for(let t=0;t<this._upgrades.length;t++)this._probe(this._upgrades[t])}_probe(t){let e=this.createTransport(t),r=!1;ar.priorWebsocketSuccess=!1;const n=()=>{r||(e.send([{type:"ping",data:"probe"}]),e.once("packet",t=>{if(!r)if("pong"===t.type&&"probe"===t.data){if(this.upgrading=!0,this.emitReserved("upgrading",e),!e)return;ar.priorWebsocketSuccess="websocket"===e.name,this.transport.pause(()=>{r||"closed"!==this.readyState&&(p(),this.setTransport(e),e.send([{type:"upgrade"}]),this.emitReserved("upgrade",e),e=null,this.upgrading=!1,this.flush())})}else{const t=new Error("probe error");t.transport=e.name,this.emitReserved("upgradeError",t)}}))};function o(){r||(r=!0,p(),e.close(),e=null)}const i=t=>{const r=new Error("probe error: "+t);r.transport=e.name,o(),this.emitReserved("upgradeError",r)};function s(){i("transport closed")}function a(){i("socket closed")}function c(t){e&&t.name!==e.name&&o()}const p=()=>{e.removeListener("open",n),e.removeListener("error",i),e.removeListener("close",s),this.off("close",a),this.off("upgrading",c)};e.once("open",n),e.once("error",i),e.once("close",s),this.once("close",a),this.once("upgrading",c),-1!==this._upgrades.indexOf("webtransport")&&"webtransport"!==t?this.setTimeoutFn(()=>{r||e.open()},200):e.open()}onHandshake(t){this._upgrades=this._filterUpgrades(t.upgrades),super.onHandshake(t)}_filterUpgrades(t){const e=[];for(let r=0;r<t.length;r++)~this.transports.indexOf(t[r])&&e.push(t[r]);return e}}class pr extends cr{constructor(t,e={}){const r="object"==typeof t?t:e;(!r.transports||r.transports&&"string"==typeof r.transports[0])&&(r.transports=(r.transports||["polling","websocket","webtransport"]).map(t=>er[t]).filter(t=>!!t)),super(t,r)}}const ur="function"==typeof ArrayBuffer,fr=Object.prototype.toString,lr="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===fr.call(Blob),hr="function"==typeof File||"undefined"!=typeof File&&"[object FileConstructor]"===fr.call(File);function yr(t){return ur&&(t instanceof ArrayBuffer||(t=>"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer)(t))||lr&&t instanceof Blob||hr&&t instanceof File}function dr(t,e){if(!t||"object"!=typeof t)return!1;if(Array.isArray(t)){for(let e=0,r=t.length;e<r;e++)if(dr(t[e]))return!0;return!1}if(yr(t))return!0;if(t.toJSON&&"function"==typeof t.toJSON&&1===arguments.length)return dr(t.toJSON(),!0);for(const e in t)if(Object.prototype.hasOwnProperty.call(t,e)&&dr(t[e]))return!0;return!1}function gr(t){const e=[],r=t.data,n=t;return n.data=br(r,e),n.attachments=e.length,{packet:n,buffers:e}}function br(t,e){if(!t)return t;if(yr(t)){const r={_placeholder:!0,num:e.length};return e.push(t),r}if(Array.isArray(t)){const r=new Array(t.length);for(let n=0;n<t.length;n++)r[n]=br(t[n],e);return r}if("object"==typeof t&&!(t instanceof Date)){const r={};for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=br(t[n],e));return r}return t}function mr(t,e){return t.data=vr(t.data,e),delete t.attachments,t}function vr(t,e){if(!t)return t;if(t&&!0===t._placeholder){if("number"==typeof t.num&&t.num>=0&&t.num<e.length)return e[t.num];throw new Error("illegal attachments")}if(Array.isArray(t))for(let r=0;r<t.length;r++)t[r]=vr(t[r],e);else if("object"==typeof t)for(const r in t)Object.prototype.hasOwnProperty.call(t,r)&&(t[r]=vr(t[r],e));return t}const wr=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var _r;exports.PacketType=void 0,(_r=exports.PacketType||(exports.PacketType={}))[_r.CONNECT=0]="CONNECT",_r[_r.DISCONNECT=1]="DISCONNECT",_r[_r.EVENT=2]="EVENT",_r[_r.ACK=3]="ACK",_r[_r.CONNECT_ERROR=4]="CONNECT_ERROR",_r[_r.BINARY_EVENT=5]="BINARY_EVENT",_r[_r.BINARY_ACK=6]="BINARY_ACK";class Sr extends Be.Emitter{constructor(t){super(),this.opts=Object.assign({reviver:void 0,maxAttachments:10},"function"==typeof t?{reviver:t}:t)}add(t){let e;if("string"==typeof t){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");e=this.decodeString(t);const r=e.type===exports.PacketType.BINARY_EVENT;r||e.type===exports.PacketType.BINARY_ACK?(e.type=r?exports.PacketType.EVENT:exports.PacketType.ACK,this.reconstructor=new Ar(e),0===e.attachments&&super.emitReserved("decoded",e)):super.emitReserved("decoded",e)}else{if(!yr(t)&&!t.base64)throw new Error("Unknown type: "+t);if(!this.reconstructor)throw new Error("got binary data when not reconstructing a packet");e=this.reconstructor.takeBinaryData(t),e&&(this.reconstructor=null,super.emitReserved("decoded",e))}}decodeString(t){let e=0;const r={type:Number(t.charAt(0))};if(void 0===exports.PacketType[r.type])throw new Error("unknown packet type "+r.type);if(r.type===exports.PacketType.BINARY_EVENT||r.type===exports.PacketType.BINARY_ACK){const n=e+1;for(;"-"!==t.charAt(++e)&&e!=t.length;);const o=t.substring(n,e);if(o!=Number(o)||"-"!==t.charAt(e))throw new Error("Illegal attachments");const i=Number(o);if(!kr(i)||i<0)throw new Error("Illegal attachments");if(i>this.opts.maxAttachments)throw new Error("too many attachments");r.attachments=i}if("/"===t.charAt(e+1)){const n=e+1;for(;++e;){if(","===t.charAt(e))break;if(e===t.length)break}r.nsp=t.substring(n,e)}else r.nsp="/";const n=t.charAt(e+1);if(""!==n&&Number(n)==n){const n=e+1;for(;++e;){const r=t.charAt(e);if(null==r||Number(r)!=r){--e;break}if(e===t.length)break}r.id=Number(t.substring(n,e+1))}if(t.charAt(++e)){const n=this.tryParse(t.substr(e));if(!Sr.isPayloadValid(r.type,n))throw new Error("invalid payload");r.data=n}return r}tryParse(t){try{return JSON.parse(t,this.opts.reviver)}catch(t){return!1}}static isPayloadValid(t,e){switch(t){case exports.PacketType.CONNECT:return Er(e);case exports.PacketType.DISCONNECT:return void 0===e;case exports.PacketType.CONNECT_ERROR:return"string"==typeof e||Er(e);case exports.PacketType.EVENT:case exports.PacketType.BINARY_EVENT:return Array.isArray(e)&&("number"==typeof e[0]||"string"==typeof e[0]&&-1===wr.indexOf(e[0]));case exports.PacketType.ACK:case exports.PacketType.BINARY_ACK:return Array.isArray(e)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class Ar{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const t=mr(this.reconPack,this.buffers);return this.finishedReconstruction(),t}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const kr=Number.isInteger||function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t};function Er(t){return"[object Object]"===Object.prototype.toString.call(t)}var Pr=Object.freeze({__proto__:null,Decoder:Sr,Encoder:class{constructor(t){this.replacer=t}encode(t){return t.type!==exports.PacketType.EVENT&&t.type!==exports.PacketType.ACK||!dr(t)?[this.encodeAsString(t)]:this.encodeAsBinary({type:t.type===exports.PacketType.EVENT?exports.PacketType.BINARY_EVENT:exports.PacketType.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id})}encodeAsString(t){let e=""+t.type;return t.type!==exports.PacketType.BINARY_EVENT&&t.type!==exports.PacketType.BINARY_ACK||(e+=t.attachments+"-"),t.nsp&&"/"!==t.nsp&&(e+=t.nsp+","),null!=t.id&&(e+=t.id),null!=t.data&&(e+=JSON.stringify(t.data,this.replacer)),e}encodeAsBinary(t){const e=gr(t),r=this.encodeAsString(e.packet),n=e.buffers;return n.unshift(r),n}},get PacketType(){return exports.PacketType}});exports.Socket=pr,exports.__awaiter=function(t,e,r,n){return new(r||(r=Promise))(function(o,i){function s(t){try{c(n.next(t))}catch(t){i(t)}}function a(t){try{c(n.throw(t))}catch(t){i(t)}}function c(t){t.done?o(t.value):function(t){return t instanceof r?t:new r(function(e){e(t)})}(t.value).then(s,a)}c((n=n.apply(t,e||[])).next())})},exports.__generator=function(t,e){var r,n,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(c){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;s&&(s=0,a[0]&&(i=0)),i;)try{if(r=1,n&&(o=2&a[0]?n.return:a[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,a[1])).done)return o;switch(n=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,n=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(6===a[0]&&i.label<o[1]){i.label=o[1],o=a;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(a);break}o[2]&&i.ops.pop(),i.trys.pop();continue}a=e.call(t,i)}catch(t){a=[6,t],n=0}finally{r=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}},exports.__read=function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)s.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return s},exports.__spreadArray=function(t,e,r){if(r||2===arguments.length)for(var n,o=0,i=e.length;o<i;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))},exports.__values=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},exports.cjsExports=Be,exports.installTimerFunctions=Me,exports.nextTick=Ne,exports.parse=or,exports.parser=Pr,exports.requireSideChannel=function(){if(Et)return kt;Et=1;var t=xt(),e=Ot(),r=Tt(),n=ce(),o=function(){if(At)return St;At=1;var t=se(),e=ae(),r=Ot(),n=ce(),o=xt(),i=t("%WeakMap%",!0),s=e("WeakMap.prototype.get",!0),a=e("WeakMap.prototype.set",!0),c=e("WeakMap.prototype.has",!0),p=e("WeakMap.prototype.delete",!0);return St=i?function(){var t,e,u={assert:function(t){if(!u.has(t))throw new o("Side channel does not contain "+r(t))},delete:function(r){if(i&&r&&("object"==typeof r||"function"==typeof r)){if(t)return p(t,r)}else if(n&&e)return e.delete(r);return!1},get:function(r){return i&&r&&("object"==typeof r||"function"==typeof r)&&t?s(t,r):e&&e.get(r)},has:function(r){return i&&r&&("object"==typeof r||"function"==typeof r)&&t?c(t,r):!!e&&e.has(r)},set:function(r,o){i&&r&&("object"==typeof r||"function"==typeof r)?(t||(t=new i),a(t,r,o)):n&&(e||(e=n()),e.set(r,o))}};return u}:n,St}(),i=o||n||r;return kt=function(){var r,n={assert:function(r){if(!n.has(r))throw new t("Side channel does not contain "+e(r))},delete:function(t){return!!r&&r.delete(t)},get:function(t){return r&&r.get(t)},has:function(t){return!!r&&r.has(t)},set:function(t,e){r||(r=i()),r.set(t,e)}};return n},kt};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,c as e}from"./vendor-crypto-js-Dhi5niDn.js";var r,n,o,i,s,a,c,u,p,f,l,h,y,d,g,b,m,v,w,_,S,A,E,O,k,P,R,T,x,j,B,N,C,I,U,F,M,q,L,W,D,V,$,H,G,J,Y,K,z,X,Q,Z,tt,et,rt,nt,ot,it,st,at,ct,ut,pt,ft,lt,ht,yt,dt,gt,bt,mt,vt,wt,_t,St,At,Et,Ot,kt,Pt,Rt=function(){return Rt=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},Rt.apply(this,arguments)};function Tt(t,e,r,n){return new(r||(r=Promise))(function(o,i){function s(t){try{c(n.next(t))}catch(t){i(t)}}function a(t){try{c(n.throw(t))}catch(t){i(t)}}function c(t){t.done?o(t.value):function(t){return t instanceof r?t:new r(function(e){e(t)})}(t.value).then(s,a)}c((n=n.apply(t,e||[])).next())})}function xt(t,e){var r,n,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(c){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;s&&(s=0,a[0]&&(i=0)),i;)try{if(r=1,n&&(o=2&a[0]?n.return:a[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,a[1])).done)return o;switch(n=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,n=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(6===a[0]&&i.label<o[1]){i.label=o[1],o=a;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(a);break}o[2]&&i.ops.pop(),i.trys.pop();continue}a=e.call(t,i)}catch(t){a=[6,t],n=0}finally{r=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}}function jt(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function Bt(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)s.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return s}function Nt(t,e,r){if(r||2===arguments.length)for(var n,o=0,i=e.length;o<i;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))}function Ct(){return n?r:(n=1,r=TypeError)}function It(){if(i)return o;i=1;var r="function"==typeof Map&&Map.prototype,n=Object.getOwnPropertyDescriptor&&r?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,s=r&&n&&"function"==typeof n.get?n.get:null,a=r&&Map.prototype.forEach,c="function"==typeof Set&&Set.prototype,u=Object.getOwnPropertyDescriptor&&c?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,p=c&&u&&"function"==typeof u.get?u.get:null,f=c&&Set.prototype.forEach,l="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,h="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,y="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,d=Boolean.prototype.valueOf,g=Object.prototype.toString,b=Function.prototype.toString,m=String.prototype.match,v=String.prototype.slice,w=String.prototype.replace,_=String.prototype.toUpperCase,S=String.prototype.toLowerCase,A=RegExp.prototype.test,E=Array.prototype.concat,O=Array.prototype.join,k=Array.prototype.slice,P=Math.floor,R="function"==typeof BigInt?BigInt.prototype.valueOf:null,T=Object.getOwnPropertySymbols,x="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,j="function"==typeof Symbol&&"object"==typeof Symbol.iterator,B="function"==typeof Symbol&&Symbol.toStringTag&&(typeof Symbol.toStringTag===j||"symbol")?Symbol.toStringTag:null,N=Object.prototype.propertyIsEnumerable,C=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null);function I(t,e){if(t===1/0||t===-1/0||t!=t||t&&t>-1e3&&t<1e3||A.call(/e/,e))return e;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof t){var n=t<0?-P(-t):P(t);if(n!==t){var o=String(n),i=v.call(e,o.length+1);return w.call(o,r,"$&_")+"."+w.call(w.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return w.call(e,r,"$&_")}var U=t,F=U.custom,M=G(F)?F:null,q={__proto__:null,double:'"',single:"'"},L={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};function W(t,e,r){var n=r.quoteStyle||e,o=q[n];return o+t+o}function D(t){return w.call(String(t),/"/g,""")}function V(t){return!B||!("object"==typeof t&&(B in t||void 0!==t[B]))}function $(t){return"[object Array]"===K(t)&&V(t)}function H(t){return"[object RegExp]"===K(t)&&V(t)}function G(t){if(j)return t&&"object"==typeof t&&t instanceof Symbol;if("symbol"==typeof t)return!0;if(!t||"object"!=typeof t||!x)return!1;try{return x.call(t),!0}catch(t){}return!1}o=function t(r,n,o,i){var c=n||{};if(Y(c,"quoteStyle")&&!Y(q,c.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Y(c,"maxStringLength")&&("number"==typeof c.maxStringLength?c.maxStringLength<0&&c.maxStringLength!==1/0:null!==c.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var u=!Y(c,"customInspect")||c.customInspect;if("boolean"!=typeof u&&"symbol"!==u)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Y(c,"indent")&&null!==c.indent&&"\t"!==c.indent&&!(parseInt(c.indent,10)===c.indent&&c.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Y(c,"numericSeparator")&&"boolean"!=typeof c.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var g=c.numericSeparator;if(void 0===r)return"undefined";if(null===r)return"null";if("boolean"==typeof r)return r?"true":"false";if("string"==typeof r)return X(r,c);if("number"==typeof r){if(0===r)return 1/0/r>0?"0":"-0";var _=String(r);return g?I(r,_):_}if("bigint"==typeof r){var A=String(r)+"n";return g?I(r,A):A}var P=void 0===c.depth?5:c.depth;if(void 0===o&&(o=0),o>=P&&P>0&&"object"==typeof r)return $(r)?"[Array]":"[Object]";var T=function(t,e){var r;if("\t"===t.indent)r="\t";else{if(!("number"==typeof t.indent&&t.indent>0))return null;r=O.call(Array(t.indent+1)," ")}return{base:r,prev:O.call(Array(e+1),r)}}(c,o);if(void 0===i)i=[];else if(z(i,r)>=0)return"[Circular]";function F(e,r,n){if(r&&(i=k.call(i)).push(r),n){var s={depth:c.depth};return Y(c,"quoteStyle")&&(s.quoteStyle=c.quoteStyle),t(e,s,o+1,i)}return t(e,c,o+1,i)}if("function"==typeof r&&!H(r)){var L=function(t){if(t.name)return t.name;var e=m.call(b.call(t),/^function\s*([\w$]+)/);if(e)return e[1];return null}(r),J=nt(r,F);return"[Function"+(L?": "+L:" (anonymous)")+"]"+(J.length>0?" { "+O.call(J,", ")+" }":"")}if(G(r)){var Q=j?w.call(String(r),/^(Symbol\(.*\))_[^)]*$/,"$1"):x.call(r);return"object"!=typeof r||j?Q:Z(Q)}if(function(t){if(!t||"object"!=typeof t)return!1;if("undefined"!=typeof HTMLElement&&t instanceof HTMLElement)return!0;return"string"==typeof t.nodeName&&"function"==typeof t.getAttribute}(r)){for(var ot="<"+S.call(String(r.nodeName)),it=r.attributes||[],st=0;st<it.length;st++)ot+=" "+it[st].name+"="+W(D(it[st].value),"double",c);return ot+=">",r.childNodes&&r.childNodes.length&&(ot+="..."),ot+="</"+S.call(String(r.nodeName))+">"}if($(r)){if(0===r.length)return"[]";var at=nt(r,F);return T&&!function(t){for(var e=0;e<t.length;e++)if(z(t[e],"\n")>=0)return!1;return!0}(at)?"["+rt(at,T)+"]":"[ "+O.call(at,", ")+" ]"}if(function(t){return"[object Error]"===K(t)&&V(t)}(r)){var ct=nt(r,F);return"cause"in Error.prototype||!("cause"in r)||N.call(r,"cause")?0===ct.length?"["+String(r)+"]":"{ ["+String(r)+"] "+O.call(ct,", ")+" }":"{ ["+String(r)+"] "+O.call(E.call("[cause]: "+F(r.cause),ct),", ")+" }"}if("object"==typeof r&&u){if(M&&"function"==typeof r[M]&&U)return U(r,{depth:P-o});if("symbol"!==u&&"function"==typeof r.inspect)return r.inspect()}if(function(t){if(!s||!t||"object"!=typeof t)return!1;try{s.call(t);try{p.call(t)}catch(t){return!0}return t instanceof Map}catch(t){}return!1}(r)){var ut=[];return a&&a.call(r,function(t,e){ut.push(F(e,r,!0)+" => "+F(t,r))}),et("Map",s.call(r),ut,T)}if(function(t){if(!p||!t||"object"!=typeof t)return!1;try{p.call(t);try{s.call(t)}catch(t){return!0}return t instanceof Set}catch(t){}return!1}(r)){var pt=[];return f&&f.call(r,function(t){pt.push(F(t,r))}),et("Set",p.call(r),pt,T)}if(function(t){if(!l||!t||"object"!=typeof t)return!1;try{l.call(t,l);try{h.call(t,h)}catch(t){return!0}return t instanceof WeakMap}catch(t){}return!1}(r))return tt("WeakMap");if(function(t){if(!h||!t||"object"!=typeof t)return!1;try{h.call(t,h);try{l.call(t,l)}catch(t){return!0}return t instanceof WeakSet}catch(t){}return!1}(r))return tt("WeakSet");if(function(t){if(!y||!t||"object"!=typeof t)return!1;try{return y.call(t),!0}catch(t){}return!1}(r))return tt("WeakRef");if(function(t){return"[object Number]"===K(t)&&V(t)}(r))return Z(F(Number(r)));if(function(t){if(!t||"object"!=typeof t||!R)return!1;try{return R.call(t),!0}catch(t){}return!1}(r))return Z(F(R.call(r)));if(function(t){return"[object Boolean]"===K(t)&&V(t)}(r))return Z(d.call(r));if(function(t){return"[object String]"===K(t)&&V(t)}(r))return Z(F(String(r)));if("undefined"!=typeof window&&r===window)return"{ [object Window] }";if("undefined"!=typeof globalThis&&r===globalThis||void 0!==e&&r===e)return"{ [object globalThis] }";if(!function(t){return"[object Date]"===K(t)&&V(t)}(r)&&!H(r)){var ft=nt(r,F),lt=C?C(r)===Object.prototype:r instanceof Object||r.constructor===Object,ht=r instanceof Object?"":"null prototype",yt=!lt&&B&&Object(r)===r&&B in r?v.call(K(r),8,-1):ht?"Object":"",dt=(lt||"function"!=typeof r.constructor?"":r.constructor.name?r.constructor.name+" ":"")+(yt||ht?"["+O.call(E.call([],yt||[],ht||[]),": ")+"] ":"");return 0===ft.length?dt+"{}":T?dt+"{"+rt(ft,T)+"}":dt+"{ "+O.call(ft,", ")+" }"}return String(r)};var J=Object.prototype.hasOwnProperty||function(t){return t in this};function Y(t,e){return J.call(t,e)}function K(t){return g.call(t)}function z(t,e){if(t.indexOf)return t.indexOf(e);for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}function X(t,e){if(t.length>e.maxStringLength){var r=t.length-e.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return X(v.call(t,0,e.maxStringLength),e)+n}var o=L[e.quoteStyle||"single"];return o.lastIndex=0,W(w.call(w.call(t,o,"\\$1"),/[\x00-\x1f]/g,Q),"single",e)}function Q(t){var e=t.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return r?"\\"+r:"\\x"+(e<16?"0":"")+_.call(e.toString(16))}function Z(t){return"Object("+t+")"}function tt(t){return t+" { ? }"}function et(t,e,r,n){return t+" ("+e+") {"+(n?rt(r,n):O.call(r,", "))+"}"}function rt(t,e){if(0===t.length)return"";var r="\n"+e.prev+e.base;return r+O.call(t,","+r)+"\n"+e.prev}function nt(t,e){var r=$(t),n=[];if(r){n.length=t.length;for(var o=0;o<t.length;o++)n[o]=Y(t,o)?e(t[o],t):""}var i,s="function"==typeof T?T(t):[];if(j){i={};for(var a=0;a<s.length;a++)i["$"+s[a]]=s[a]}for(var c in t)Y(t,c)&&(r&&String(Number(c))===c&&c<t.length||j&&i["$"+c]instanceof Symbol||(A.call(/[^\w$]/,c)?n.push(e(c,t)+": "+e(t[c],t)):n.push(c+": "+e(t[c],t))));if("function"==typeof T)for(var u=0;u<s.length;u++)N.call(t,s[u])&&n.push("["+e(s[u])+"]: "+e(t[s[u]],t));return n}return o}function Ut(){if(a)return s;a=1;var t=It(),e=Ct(),r=function(t,e,r){for(var n,o=t;null!=(n=o.next);o=n)if(n.key===e)return o.next=n.next,r||(n.next=t.next,t.next=n),n};return s=function(){var n,o={assert:function(r){if(!o.has(r))throw new e("Side channel does not contain "+t(r))},delete:function(t){var e=function(t,e){if(t)return r(t,e,!0)}(n,t);return e&&n&&!n.next&&(n=void 0),!!e},get:function(t){return function(t,e){if(t){var n=r(t,e);return n&&n.value}}(n,t)},has:function(t){return function(t,e){return!!t&&!!r(t,e)}(n,t)},set:function(t,e){n||(n={next:void 0}),function(t,e,n){var o=r(t,e);o?o.value=n:t.next={key:e,next:t.next,value:n}}(n,t,e)}};return o},s}function Ft(){return u?c:(u=1,c=Object)}function Mt(){return f?p:(f=1,p=Error)}function qt(){return h?l:(h=1,l=EvalError)}function Lt(){return d?y:(d=1,y=RangeError)}function Wt(){return b?g:(b=1,g=ReferenceError)}function Dt(){return v?m:(v=1,m=SyntaxError)}function Vt(){return _?w:(_=1,w=URIError)}function $t(){return A?S:(A=1,S=Math.abs)}function Ht(){return O?E:(O=1,E=Math.floor)}function Gt(){return P?k:(P=1,k=Math.max)}function Jt(){return T?R:(T=1,R=Math.min)}function Yt(){return j?x:(j=1,x=Math.pow)}function Kt(){return N?B:(N=1,B=Math.round)}function zt(){return I?C:(I=1,C=Number.isNaN||function(t){return t!=t})}function Xt(){if(F)return U;F=1;var t=zt();return U=function(e){return t(e)||0===e?e:e<0?-1:1}}function Qt(){return q?M:(q=1,M=Object.getOwnPropertyDescriptor)}function Zt(){if(W)return L;W=1;var t=Qt();if(t)try{t([],"length")}catch(e){t=null}return L=t}function te(){if(V)return D;V=1;var t=Object.defineProperty||!1;if(t)try{t({},"a",{value:1})}catch(e){t=!1}return D=t}function ee(){if(J)return G;J=1;var t="undefined"!=typeof Symbol&&Symbol,e=H?$:(H=1,$=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var t={},e=Symbol("test"),r=Object(e);if("string"==typeof e)return!1;if("[object Symbol]"!==Object.prototype.toString.call(e))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(var n in t[e]=42,t)return!1;if("function"==typeof Object.keys&&0!==Object.keys(t).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(t).length)return!1;var o=Object.getOwnPropertySymbols(t);if(1!==o.length||o[0]!==e)return!1;if(!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var i=Object.getOwnPropertyDescriptor(t,e);if(42!==i.value||!0!==i.enumerable)return!1}return!0});return G=function(){return"function"==typeof t&&("function"==typeof Symbol&&("symbol"==typeof t("foo")&&("symbol"==typeof Symbol("bar")&&e())))}}function re(){return K?Y:(K=1,Y="undefined"!=typeof Reflect&&Reflect.getPrototypeOf||null)}function ne(){return X?z:(X=1,z=Ft().getPrototypeOf||null)}function oe(){if(Z)return Q;Z=1;var t=Object.prototype.toString,e=Math.max,r=function(t,e){for(var r=[],n=0;n<t.length;n+=1)r[n]=t[n];for(var o=0;o<e.length;o+=1)r[o+t.length]=e[o];return r};return Q=function(n){var o=this;if("function"!=typeof o||"[object Function]"!==t.apply(o))throw new TypeError("Function.prototype.bind called on incompatible "+o);for(var i,s=function(t,e){for(var r=[],n=e,o=0;n<t.length;n+=1,o+=1)r[o]=t[n];return r}(arguments,1),a=e(0,o.length-s.length),c=[],u=0;u<a;u++)c[u]="$"+u;if(i=Function("binder","return function ("+function(t,e){for(var r="",n=0;n<t.length;n+=1)r+=t[n],n+1<t.length&&(r+=e);return r}(c,",")+"){ return binder.apply(this,arguments); }")(function(){if(this instanceof i){var t=o.apply(this,r(s,arguments));return Object(t)===t?t:this}return o.apply(n,r(s,arguments))}),o.prototype){var p=function(){};p.prototype=o.prototype,i.prototype=new p,p.prototype=null}return i},Q}function ie(){if(et)return tt;et=1;var t=oe();return tt=Function.prototype.bind||t}function se(){return nt?rt:(nt=1,rt=Function.prototype.call)}function ae(){return it?ot:(it=1,ot=Function.prototype.apply)}function ce(){if(ut)return ct;ut=1;var t=ie(),e=ae(),r=se(),n=at?st:(at=1,st="undefined"!=typeof Reflect&&Reflect&&Reflect.apply);return ct=n||t.call(r,e)}function ue(){if(ft)return pt;ft=1;var t=ie(),e=Ct(),r=se(),n=ce();return pt=function(o){if(o.length<1||"function"!=typeof o[0])throw new e("a function is required");return n(t,r,o)}}function pe(){if(ht)return lt;ht=1;var t,e=ue(),r=Zt();try{t=[].__proto__===Array.prototype}catch(t){if(!t||"object"!=typeof t||!("code"in t)||"ERR_PROTO_ACCESS"!==t.code)throw t}var n=!!t&&r&&r(Object.prototype,"__proto__"),o=Object,i=o.getPrototypeOf;return lt=n&&"function"==typeof n.get?e([n.get]):"function"==typeof i&&function(t){return i(null==t?t:o(t))},lt}function fe(){if(dt)return yt;dt=1;var t=re(),e=ne(),r=pe();return yt=t?function(e){return t(e)}:e?function(t){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new TypeError("getProto: not an object");return e(t)}:r?function(t){return r(t)}:null}function le(){if(bt)return gt;bt=1;var t=Function.prototype.call,e=Object.prototype.hasOwnProperty,r=ie();return gt=r.call(t,e)}function he(){if(vt)return mt;var t;vt=1;var e=Ft(),r=Mt(),n=qt(),o=Lt(),i=Wt(),s=Dt(),a=Ct(),c=Vt(),u=$t(),p=Ht(),f=Gt(),l=Jt(),h=Yt(),y=Kt(),d=Xt(),g=Function,b=function(t){try{return g('"use strict"; return ('+t+").constructor;")()}catch(t){}},m=Zt(),v=te(),w=function(){throw new a},_=m?function(){try{return w}catch(t){try{return m(arguments,"callee").get}catch(t){return w}}}():w,S=ee()(),A=fe(),E=ne(),O=re(),k=ae(),P=se(),R={},T="undefined"!=typeof Uint8Array&&A?A(Uint8Array):t,x={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?t:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?t:ArrayBuffer,"%ArrayIteratorPrototype%":S&&A?A([][Symbol.iterator]()):t,"%AsyncFromSyncIteratorPrototype%":t,"%AsyncFunction%":R,"%AsyncGenerator%":R,"%AsyncGeneratorFunction%":R,"%AsyncIteratorPrototype%":R,"%Atomics%":"undefined"==typeof Atomics?t:Atomics,"%BigInt%":"undefined"==typeof BigInt?t:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?t:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?t:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?t:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":r,"%eval%":eval,"%EvalError%":n,"%Float16Array%":"undefined"==typeof Float16Array?t:Float16Array,"%Float32Array%":"undefined"==typeof Float32Array?t:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?t:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?t:FinalizationRegistry,"%Function%":g,"%GeneratorFunction%":R,"%Int8Array%":"undefined"==typeof Int8Array?t:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?t:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?t:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":S&&A?A(A([][Symbol.iterator]())):t,"%JSON%":"object"==typeof JSON?JSON:t,"%Map%":"undefined"==typeof Map?t:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&S&&A?A((new Map)[Symbol.iterator]()):t,"%Math%":Math,"%Number%":Number,"%Object%":e,"%Object.getOwnPropertyDescriptor%":m,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?t:Promise,"%Proxy%":"undefined"==typeof Proxy?t:Proxy,"%RangeError%":o,"%ReferenceError%":i,"%Reflect%":"undefined"==typeof Reflect?t:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?t:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&S&&A?A((new Set)[Symbol.iterator]()):t,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?t:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":S&&A?A(""[Symbol.iterator]()):t,"%Symbol%":S?Symbol:t,"%SyntaxError%":s,"%ThrowTypeError%":_,"%TypedArray%":T,"%TypeError%":a,"%Uint8Array%":"undefined"==typeof Uint8Array?t:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?t:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?t:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?t:Uint32Array,"%URIError%":c,"%WeakMap%":"undefined"==typeof WeakMap?t:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?t:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?t:WeakSet,"%Function.prototype.call%":P,"%Function.prototype.apply%":k,"%Object.defineProperty%":v,"%Object.getPrototypeOf%":E,"%Math.abs%":u,"%Math.floor%":p,"%Math.max%":f,"%Math.min%":l,"%Math.pow%":h,"%Math.round%":y,"%Math.sign%":d,"%Reflect.getPrototypeOf%":O};if(A)try{null.error}catch(t){var j=A(A(t));x["%Error.prototype%"]=j}var B=function t(e){var r;if("%AsyncFunction%"===e)r=b("async function () {}");else if("%GeneratorFunction%"===e)r=b("function* () {}");else if("%AsyncGeneratorFunction%"===e)r=b("async function* () {}");else if("%AsyncGenerator%"===e){var n=t("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if("%AsyncIteratorPrototype%"===e){var o=t("%AsyncGenerator%");o&&A&&(r=A(o.prototype))}return x[e]=r,r},N={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},C=ie(),I=le(),U=C.call(P,Array.prototype.concat),F=C.call(k,Array.prototype.splice),M=C.call(P,String.prototype.replace),q=C.call(P,String.prototype.slice),L=C.call(P,RegExp.prototype.exec),W=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,D=/\\(\\)?/g,V=function(t,e){var r,n=t;if(I(N,n)&&(n="%"+(r=N[n])[0]+"%"),I(x,n)){var o=x[n];if(o===R&&(o=B(n)),void 0===o&&!e)throw new a("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:o}}throw new s("intrinsic "+t+" does not exist!")};return mt=function(t,e){if("string"!=typeof t||0===t.length)throw new a("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof e)throw new a('"allowMissing" argument must be a boolean');if(null===L(/^%?[^%]*%?$/,t))throw new s("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=function(t){var e=q(t,0,1),r=q(t,-1);if("%"===e&&"%"!==r)throw new s("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==e)throw new s("invalid intrinsic syntax, expected opening `%`");var n=[];return M(t,W,function(t,e,r,o){n[n.length]=r?M(o,D,"$1"):e||t}),n}(t),n=r.length>0?r[0]:"",o=V("%"+n+"%",e),i=o.name,c=o.value,u=!1,p=o.alias;p&&(n=p[0],F(r,U([0,1],p)));for(var f=1,l=!0;f<r.length;f+=1){var h=r[f],y=q(h,0,1),d=q(h,-1);if(('"'===y||"'"===y||"`"===y||'"'===d||"'"===d||"`"===d)&&y!==d)throw new s("property names with quotes must have matching quotes");if("constructor"!==h&&l||(u=!0),I(x,i="%"+(n+="."+h)+"%"))c=x[i];else if(null!=c){if(!(h in c)){if(!e)throw new a("base intrinsic for "+t+" exists, but the property is not available.");return}if(m&&f+1>=r.length){var g=m(c,h);c=(l=!!g)&&"get"in g&&!("originalValue"in g.get)?g.get:c[h]}else l=I(c,h),c=c[h];l&&!u&&(x[i]=c)}}return c},mt}function ye(){if(_t)return wt;_t=1;var t=he(),e=ue(),r=e([t("%String.prototype.indexOf%")]);return wt=function(n,o){var i=t(n,!!o);return"function"==typeof i&&r(n,".prototype.")>-1?e([i]):i}}function de(){if(At)return St;At=1;var t=he(),e=ye(),r=It(),n=Ct(),o=t("%Map%",!0),i=e("Map.prototype.get",!0),s=e("Map.prototype.set",!0),a=e("Map.prototype.has",!0),c=e("Map.prototype.delete",!0),u=e("Map.prototype.size",!0);return St=!!o&&function(){var t,e={assert:function(t){if(!e.has(t))throw new n("Side channel does not contain "+r(t))},delete:function(e){if(t){var r=c(t,e);return 0===u(t)&&(t=void 0),r}return!1},get:function(e){if(t)return i(t,e)},has:function(e){return!!t&&a(t,e)},set:function(e,r){t||(t=new o),s(t,e,r)}};return e},St}function ge(){if(Pt)return kt;Pt=1;var t=Ct(),e=It(),r=Ut(),n=de(),o=function(){if(Ot)return Et;Ot=1;var t=he(),e=ye(),r=It(),n=de(),o=Ct(),i=t("%WeakMap%",!0),s=e("WeakMap.prototype.get",!0),a=e("WeakMap.prototype.set",!0),c=e("WeakMap.prototype.has",!0),u=e("WeakMap.prototype.delete",!0);return Et=i?function(){var t,e,p={assert:function(t){if(!p.has(t))throw new o("Side channel does not contain "+r(t))},delete:function(r){if(i&&r&&("object"==typeof r||"function"==typeof r)){if(t)return u(t,r)}else if(n&&e)return e.delete(r);return!1},get:function(r){return i&&r&&("object"==typeof r||"function"==typeof r)&&t?s(t,r):e&&e.get(r)},has:function(r){return i&&r&&("object"==typeof r||"function"==typeof r)&&t?c(t,r):!!e&&e.has(r)},set:function(r,o){i&&r&&("object"==typeof r||"function"==typeof r)?(t||(t=new i),a(t,r,o)):n&&(e||(e=n()),e.set(r,o))}};return p}:n,Et}(),i=o||n||r;return kt=function(){var r,n={assert:function(r){if(!n.has(r))throw new t("Side channel does not contain "+e(r))},delete:function(t){return!!r&&r.delete(t)},get:function(t){return r&&r.get(t)},has:function(t){return!!r&&r.has(t)},set:function(t,e){r||(r=i()),r.set(t,e)}};return n},kt}"function"==typeof SuppressedError&&SuppressedError;const be=Object.create(null);be.open="0",be.close="1",be.ping="2",be.pong="3",be.message="4",be.upgrade="5",be.noop="6";const me=Object.create(null);Object.keys(be).forEach(t=>{me[be[t]]=t});const ve={type:"error",data:"parser error"},we="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===Object.prototype.toString.call(Blob),_e="function"==typeof ArrayBuffer,Se=t=>"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer instanceof ArrayBuffer,Ae=({type:t,data:e},r,n)=>we&&e instanceof Blob?r?n(e):Ee(e,n):_e&&(e instanceof ArrayBuffer||Se(e))?r?n(e):Ee(new Blob([e]),n):n(be[t]+(e||"")),Ee=(t,e)=>{const r=new FileReader;return r.onload=function(){const t=r.result.split(",")[1];e("b"+(t||""))},r.readAsDataURL(t)};function Oe(t){return t instanceof Uint8Array?t:t instanceof ArrayBuffer?new Uint8Array(t):new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}let ke;const Pe="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Re="undefined"==typeof Uint8Array?[]:new Uint8Array(256);for(let t=0;t<64;t++)Re[Pe.charCodeAt(t)]=t;const Te="function"==typeof ArrayBuffer,xe=(t,e)=>{if("string"!=typeof t)return{type:"message",data:Be(t,e)};const r=t.charAt(0);if("b"===r)return{type:"message",data:je(t.substring(1),e)};return me[r]?t.length>1?{type:me[r],data:t.substring(1)}:{type:me[r]}:ve},je=(t,e)=>{if(Te){const r=(t=>{let e,r,n,o,i,s=.75*t.length,a=t.length,c=0;"="===t[t.length-1]&&(s--,"="===t[t.length-2]&&s--);const u=new ArrayBuffer(s),p=new Uint8Array(u);for(e=0;e<a;e+=4)r=Re[t.charCodeAt(e)],n=Re[t.charCodeAt(e+1)],o=Re[t.charCodeAt(e+2)],i=Re[t.charCodeAt(e+3)],p[c++]=r<<2|n>>4,p[c++]=(15&n)<<4|o>>2,p[c++]=(3&o)<<6|63&i;return u})(t);return Be(r,e)}return{base64:!0,data:t}},Be=(t,e)=>"blob"===e?t instanceof Blob?t:new Blob([t]):t instanceof ArrayBuffer?t:t.buffer,Ne=String.fromCharCode(30);function Ce(){return new TransformStream({transform(t,e){!function(t,e){we&&t.data instanceof Blob?t.data.arrayBuffer().then(Oe).then(e):_e&&(t.data instanceof ArrayBuffer||Se(t.data))?e(Oe(t.data)):Ae(t,!1,t=>{ke||(ke=new TextEncoder),e(ke.encode(t))})}(t,r=>{const n=r.length;let o;if(n<126)o=new Uint8Array(1),new DataView(o.buffer).setUint8(0,n);else if(n<65536){o=new Uint8Array(3);const t=new DataView(o.buffer);t.setUint8(0,126),t.setUint16(1,n)}else{o=new Uint8Array(9);const t=new DataView(o.buffer);t.setUint8(0,127),t.setBigUint64(1,BigInt(n))}t.data&&"string"!=typeof t.data&&(o[0]|=128),e.enqueue(o),e.enqueue(r)})}})}let Ie;function Ue(t){return t.reduce((t,e)=>t+e.length,0)}function Fe(t,e){if(t[0].length===e)return t.shift();const r=new Uint8Array(e);let n=0;for(let o=0;o<e;o++)r[o]=t[0][n++],n===t[0].length&&(t.shift(),n=0);return t.length&&n<t[0].length&&(t[0]=t[0].slice(n)),r}var Me,qe={};var Le=function(){if(Me)return qe;function t(e){if(e)return function(e){for(var r in t.prototype)e[r]=t.prototype[r];return e}(e)}return Me=1,qe.Emitter=t,t.prototype.on=t.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this},t.prototype.once=function(t,e){function r(){this.off(t,r),e.apply(this,arguments)}return r.fn=e,this.on(t,r),this},t.prototype.off=t.prototype.removeListener=t.prototype.removeAllListeners=t.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var r,n=this._callbacks["$"+t];if(!n)return this;if(1==arguments.length)return delete this._callbacks["$"+t],this;for(var o=0;o<n.length;o++)if((r=n[o])===e||r.fn===e){n.splice(o,1);break}return 0===n.length&&delete this._callbacks["$"+t],this},t.prototype.emit=function(t){this._callbacks=this._callbacks||{};for(var e=new Array(arguments.length-1),r=this._callbacks["$"+t],n=1;n<arguments.length;n++)e[n-1]=arguments[n];if(r){n=0;for(var o=(r=r.slice(0)).length;n<o;++n)r[n].apply(this,e)}return this},t.prototype.emitReserved=t.prototype.emit,t.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]},t.prototype.hasListeners=function(t){return!!this.listeners(t).length},qe}();const We="function"==typeof Promise&&"function"==typeof Promise.resolve?t=>Promise.resolve().then(t):(t,e)=>e(t,0),De="undefined"!=typeof self?self:"undefined"!=typeof window?window:Function("return this")();function Ve(t,...e){return e.reduce((e,r)=>(t.hasOwnProperty(r)&&(e[r]=t[r]),e),{})}const $e=De.setTimeout,He=De.clearTimeout;function Ge(t,e){e.useNativeTimers?(t.setTimeoutFn=$e.bind(De),t.clearTimeoutFn=He.bind(De)):(t.setTimeoutFn=De.setTimeout.bind(De),t.clearTimeoutFn=De.clearTimeout.bind(De))}function Je(t){return"string"==typeof t?function(t){let e=0,r=0;for(let n=0,o=t.length;n<o;n++)e=t.charCodeAt(n),e<128?r+=1:e<2048?r+=2:e<55296||e>=57344?r+=3:(n++,r+=4);return r}(t):Math.ceil(1.33*(t.byteLength||t.size))}function Ye(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}class Ke extends Error{constructor(t,e,r){super(t),this.description=e,this.context=r,this.type="TransportError"}}class ze extends Le.Emitter{constructor(t){super(),this.writable=!1,Ge(this,t),this.opts=t,this.query=t.query,this.socket=t.socket,this.supportsBinary=!t.forceBase64}onError(t,e,r){return super.emitReserved("error",new Ke(t,e,r)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return"opening"!==this.readyState&&"open"!==this.readyState||(this.doClose(),this.onClose()),this}send(t){"open"===this.readyState&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const e=xe(t,this.socket.binaryType);this.onPacket(e)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}pause(t){}createUri(t,e={}){return t+"://"+this._hostname()+this._port()+this.opts.path+this._query(e)}_hostname(){const t=this.opts.hostname;return-1===t.indexOf(":")?t:"["+t+"]"}_port(){return this.opts.port&&(this.opts.secure&&443!==Number(this.opts.port)||!this.opts.secure&&80!==Number(this.opts.port))?":"+this.opts.port:""}_query(t){const e=function(t){let e="";for(let r in t)t.hasOwnProperty(r)&&(e.length&&(e+="&"),e+=encodeURIComponent(r)+"="+encodeURIComponent(t[r]));return e}(t);return e.length?"?"+e:""}}class Xe extends ze{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(t){this.readyState="pausing";const e=()=>{this.readyState="paused",t()};if(this._polling||!this.writable){let t=0;this._polling&&(t++,this.once("pollComplete",function(){--t||e()})),this.writable||(t++,this.once("drain",function(){--t||e()}))}else e()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){((t,e)=>{const r=t.split(Ne),n=[];for(let t=0;t<r.length;t++){const o=xe(r[t],e);if(n.push(o),"error"===o.type)break}return n})(t,this.socket.binaryType).forEach(t=>{if("opening"===this.readyState&&"open"===t.type&&this.onOpen(),"close"===t.type)return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(t)}),"closed"!==this.readyState&&(this._polling=!1,this.emitReserved("pollComplete"),"open"===this.readyState&&this._poll())}doClose(){const t=()=>{this.write([{type:"close"}])};"open"===this.readyState?t():this.once("open",t)}write(t){this.writable=!1,((t,e)=>{const r=t.length,n=new Array(r);let o=0;t.forEach((t,i)=>{Ae(t,!1,t=>{n[i]=t,++o===r&&e(n.join(Ne))})})})(t,t=>{this.doWrite(t,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const t=this.opts.secure?"https":"http",e=this.query||{};return!1!==this.opts.timestampRequests&&(e[this.opts.timestampParam]=Ye()),this.supportsBinary||e.sid||(e.b64=1),this.createUri(t,e)}}let Qe=!1;try{Qe="undefined"!=typeof XMLHttpRequest&&"withCredentials"in new XMLHttpRequest}catch(t){}const Ze=Qe;function tr(){}class er extends Xe{constructor(t){if(super(t),"undefined"!=typeof location){const e="https:"===location.protocol;let r=location.port;r||(r=e?"443":"80"),this.xd="undefined"!=typeof location&&t.hostname!==location.hostname||r!==t.port}}doWrite(t,e){const r=this.request({method:"POST",data:t});r.on("success",e),r.on("error",(t,e)=>{this.onError("xhr post error",t,e)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(t,e)=>{this.onError("xhr poll error",t,e)}),this.pollXhr=t}}class rr extends Le.Emitter{constructor(t,e,r){super(),this.createRequest=t,Ge(this,r),this._opts=r,this._method=r.method||"GET",this._uri=e,this._data=void 0!==r.data?r.data:null,this._create()}_create(){var t;const e=Ve(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");e.xdomain=!!this._opts.xd;const r=this._xhr=this.createRequest(e);try{r.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let t in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(t)&&r.setRequestHeader(t,this._opts.extraHeaders[t])}}catch(t){}if("POST"===this._method)try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(t){}try{r.setRequestHeader("Accept","*/*")}catch(t){}null===(t=this._opts.cookieJar)||void 0===t||t.addCookies(r),"withCredentials"in r&&(r.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(r.timeout=this._opts.requestTimeout),r.onreadystatechange=()=>{var t;3===r.readyState&&(null===(t=this._opts.cookieJar)||void 0===t||t.parseCookies(r.getResponseHeader("set-cookie"))),4===r.readyState&&(200===r.status||1223===r.status?this._onLoad():this.setTimeoutFn(()=>{this._onError("number"==typeof r.status?r.status:0)},0))},r.send(this._data)}catch(t){return void this.setTimeoutFn(()=>{this._onError(t)},0)}"undefined"!=typeof document&&(this._index=rr.requestsCount++,rr.requests[this._index]=this)}_onError(t){this.emitReserved("error",t,this._xhr),this._cleanup(!0)}_cleanup(t){if(void 0!==this._xhr&&null!==this._xhr){if(this._xhr.onreadystatechange=tr,t)try{this._xhr.abort()}catch(t){}"undefined"!=typeof document&&delete rr.requests[this._index],this._xhr=null}}_onLoad(){const t=this._xhr.responseText;null!==t&&(this.emitReserved("data",t),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}if(rr.requestsCount=0,rr.requests={},"undefined"!=typeof document)if("function"==typeof attachEvent)attachEvent("onunload",nr);else if("function"==typeof addEventListener){addEventListener("onpagehide"in De?"pagehide":"unload",nr,!1)}function nr(){for(let t in rr.requests)rr.requests.hasOwnProperty(t)&&rr.requests[t].abort()}const or=function(){const t=ir({xdomain:!1});return t&&null!==t.responseType}();function ir(t){const e=t.xdomain;try{if("undefined"!=typeof XMLHttpRequest&&(!e||Ze))return new XMLHttpRequest}catch(t){}if(!e)try{return new(De[["Active"].concat("Object").join("X")])("Microsoft.XMLHTTP")}catch(t){}}const sr="undefined"!=typeof navigator&&"string"==typeof navigator.product&&"reactnative"===navigator.product.toLowerCase();class ar extends ze{get name(){return"websocket"}doOpen(){const t=this.uri(),e=this.opts.protocols,r=sr?{}:Ve(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,e,r)}catch(t){return this.emitReserved("error",t)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let e=0;e<t.length;e++){const r=t[e],n=e===t.length-1;Ae(r,this.supportsBinary,t=>{try{this.doWrite(r,t)}catch(t){}n&&We(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){void 0!==this.ws&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",e=this.query||{};return this.opts.timestampRequests&&(e[this.opts.timestampParam]=Ye()),this.supportsBinary||(e.b64=1),this.createUri(t,e)}}const cr=De.WebSocket||De.MozWebSocket;const ur={websocket:class extends ar{createSocket(t,e,r){return sr?new cr(t,e,r):e?new cr(t,e):new cr(t)}doWrite(t,e){this.ws.send(e)}},webtransport:class extends ze{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(t){return this.emitReserved("error",t)}this._transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(t=>{const e=function(t,e){Ie||(Ie=new TextDecoder);const r=[];let n=0,o=-1,i=!1;return new TransformStream({transform(s,a){for(r.push(s);;){if(0===n){if(Ue(r)<1)break;const t=Fe(r,1);i=!(128&~t[0]),o=127&t[0],n=o<126?3:126===o?1:2}else if(1===n){if(Ue(r)<2)break;const t=Fe(r,2);o=new DataView(t.buffer,t.byteOffset,t.length).getUint16(0),n=3}else if(2===n){if(Ue(r)<8)break;const t=Fe(r,8),e=new DataView(t.buffer,t.byteOffset,t.length),i=e.getUint32(0);if(i>Math.pow(2,21)-1){a.enqueue(ve);break}o=i*Math.pow(2,32)+e.getUint32(4),n=3}else{if(Ue(r)<o)break;const t=Fe(r,o);a.enqueue(xe(i?t:Ie.decode(t),e)),n=0}if(0===o||o>t){a.enqueue(ve);break}}}})}(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(e).getReader(),n=Ce();n.readable.pipeTo(t.writable),this._writer=n.writable.getWriter();const o=()=>{r.read().then(({done:t,value:e})=>{t||(this.onPacket(e),o())}).catch(t=>{})};o();const i={type:"open"};this.query.sid&&(i.data=`{"sid":"${this.query.sid}"}`),this._writer.write(i).then(()=>this.onOpen())})})}write(t){this.writable=!1;for(let e=0;e<t.length;e++){const r=t[e],n=e===t.length-1;this._writer.write(r).then(()=>{n&&We(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;null===(t=this._transport)||void 0===t||t.close()}},polling:class extends er{constructor(t){super(t);const e=t&&t.forceBase64;this.supportsBinary=or&&!e}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new rr(ir,this.uri(),t)}}},pr=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,fr=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function lr(t){if(t.length>8e3)throw"URI too long";const e=t,r=t.indexOf("["),n=t.indexOf("]");-1!=r&&-1!=n&&(t=t.substring(0,r)+t.substring(r,n).replace(/:/g,";")+t.substring(n,t.length));let o=pr.exec(t||""),i={},s=14;for(;s--;)i[fr[s]]=o[s]||"";return-1!=r&&-1!=n&&(i.source=e,i.host=i.host.substring(1,i.host.length-1).replace(/;/g,":"),i.authority=i.authority.replace("[","").replace("]","").replace(/;/g,":"),i.ipv6uri=!0),i.pathNames=function(t,e){const r=/\/{2,9}/g,n=e.replace(r,"/").split("/");"/"!=e.slice(0,1)&&0!==e.length||n.splice(0,1);"/"==e.slice(-1)&&n.splice(n.length-1,1);return n}(0,i.path),i.queryKey=function(t,e){const r={};return e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(t,e,n){e&&(r[e]=n)}),r}(0,i.query),i}const hr="function"==typeof addEventListener&&"function"==typeof removeEventListener,yr=[];hr&&addEventListener("offline",()=>{yr.forEach(t=>t())},!1);class dr extends Le.Emitter{constructor(t,e){if(super(),this.binaryType="arraybuffer",this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,t&&"object"==typeof t&&(e=t,t=null),t){const r=lr(t);e.hostname=r.host,e.secure="https"===r.protocol||"wss"===r.protocol,e.port=r.port,r.query&&(e.query=r.query)}else e.host&&(e.hostname=lr(e.host).host);Ge(this,e),this.secure=null!=e.secure?e.secure:"undefined"!=typeof location&&"https:"===location.protocol,e.hostname&&!e.port&&(e.port=this.secure?"443":"80"),this.hostname=e.hostname||("undefined"!=typeof location?location.hostname:"localhost"),this.port=e.port||("undefined"!=typeof location&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},e.transports.forEach(t=>{const e=t.prototype.name;this.transports.push(e),this._transportsByName[e]=t}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},e),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),"string"==typeof this.opts.query&&(this.opts.query=function(t){let e={},r=t.split("&");for(let t=0,n=r.length;t<n;t++){let n=r[t].split("=");e[decodeURIComponent(n[0])]=decodeURIComponent(n[1])}return e}(this.opts.query)),hr&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),"localhost"!==this.hostname&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},yr.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const e=Object.assign({},this.opts.query);e.EIO=4,e.transport=t,this.id&&(e.sid=this.id);const r=Object.assign({},this.opts,{query:e,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new this._transportsByName[t](r)}_open(){if(0===this.transports.length)return void this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);const t=this.opts.rememberUpgrade&&dr.priorWebsocketSuccess&&-1!==this.transports.indexOf("websocket")?"websocket":this.transports[0];this.readyState="opening";const e=this.createTransport(t);e.open(),this.setTransport(e)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",t=>this._onClose("transport close",t))}onOpen(){this.readyState="open",dr.priorWebsocketSuccess="websocket"===this.transport.name,this.emitReserved("open"),this.flush()}_onPacket(t){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState)switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const e=new Error("server error");e.code=t.data,this._onError(e);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data)}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this._pingInterval=t.pingInterval,this._pingTimeout=t.pingTimeout,this._maxPayload=t.maxPayload,this.onOpen(),"closed"!==this.readyState&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const t=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+t,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},t),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,0===this.writeBuffer.length?this.emitReserved("drain"):this.flush()}flush(){if("closed"!==this.readyState&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this._getWritablePackets();this.transport.send(t),this._prevBufferLen=t.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&"polling"===this.transport.name&&this.writeBuffer.length>1))return this.writeBuffer;let t=1;for(let e=0;e<this.writeBuffer.length;e++){const r=this.writeBuffer[e].data;if(r&&(t+=Je(r)),e>0&&t>this._maxPayload)return this.writeBuffer.slice(0,e);t+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const t=Date.now()>this._pingTimeoutTime;return t&&(this._pingTimeoutTime=0,We(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),t}write(t,e,r){return this._sendPacket("message",t,e,r),this}send(t,e,r){return this._sendPacket("message",t,e,r),this}_sendPacket(t,e,r,n){if("function"==typeof e&&(n=e,e=void 0),"function"==typeof r&&(n=r,r=null),"closing"===this.readyState||"closed"===this.readyState)return;(r=r||{}).compress=!1!==r.compress;const o={type:t,data:e,options:r};this.emitReserved("packetCreate",o),this.writeBuffer.push(o),n&&this.once("flush",n),this.flush()}close(){const t=()=>{this._onClose("forced close"),this.transport.close()},e=()=>{this.off("upgrade",e),this.off("upgradeError",e),t()},r=()=>{this.once("upgrade",e),this.once("upgradeError",e)};return"opening"!==this.readyState&&"open"!==this.readyState||(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():t()}):this.upgrading?r():t()),this}_onError(t){if(dr.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&"opening"===this.readyState)return this.transports.shift(),this._open();this.emitReserved("error",t),this._onClose("transport error",t)}_onClose(t,e){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),hr&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const t=yr.indexOf(this._offlineEventListener);-1!==t&&yr.splice(t,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,e),this.writeBuffer=[],this._prevBufferLen=0}}}dr.protocol=4;class gr extends dr{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),"open"===this.readyState&&this.opts.upgrade)for(let t=0;t<this._upgrades.length;t++)this._probe(this._upgrades[t])}_probe(t){let e=this.createTransport(t),r=!1;dr.priorWebsocketSuccess=!1;const n=()=>{r||(e.send([{type:"ping",data:"probe"}]),e.once("packet",t=>{if(!r)if("pong"===t.type&&"probe"===t.data){if(this.upgrading=!0,this.emitReserved("upgrading",e),!e)return;dr.priorWebsocketSuccess="websocket"===e.name,this.transport.pause(()=>{r||"closed"!==this.readyState&&(u(),this.setTransport(e),e.send([{type:"upgrade"}]),this.emitReserved("upgrade",e),e=null,this.upgrading=!1,this.flush())})}else{const t=new Error("probe error");t.transport=e.name,this.emitReserved("upgradeError",t)}}))};function o(){r||(r=!0,u(),e.close(),e=null)}const i=t=>{const r=new Error("probe error: "+t);r.transport=e.name,o(),this.emitReserved("upgradeError",r)};function s(){i("transport closed")}function a(){i("socket closed")}function c(t){e&&t.name!==e.name&&o()}const u=()=>{e.removeListener("open",n),e.removeListener("error",i),e.removeListener("close",s),this.off("close",a),this.off("upgrading",c)};e.once("open",n),e.once("error",i),e.once("close",s),this.once("close",a),this.once("upgrading",c),-1!==this._upgrades.indexOf("webtransport")&&"webtransport"!==t?this.setTimeoutFn(()=>{r||e.open()},200):e.open()}onHandshake(t){this._upgrades=this._filterUpgrades(t.upgrades),super.onHandshake(t)}_filterUpgrades(t){const e=[];for(let r=0;r<t.length;r++)~this.transports.indexOf(t[r])&&e.push(t[r]);return e}}class br extends gr{constructor(t,e={}){const r="object"==typeof t?t:e;(!r.transports||r.transports&&"string"==typeof r.transports[0])&&(r.transports=(r.transports||["polling","websocket","webtransport"]).map(t=>ur[t]).filter(t=>!!t)),super(t,r)}}const mr="function"==typeof ArrayBuffer,vr=Object.prototype.toString,wr="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===vr.call(Blob),_r="function"==typeof File||"undefined"!=typeof File&&"[object FileConstructor]"===vr.call(File);function Sr(t){return mr&&(t instanceof ArrayBuffer||(t=>"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer)(t))||wr&&t instanceof Blob||_r&&t instanceof File}function Ar(t,e){if(!t||"object"!=typeof t)return!1;if(Array.isArray(t)){for(let e=0,r=t.length;e<r;e++)if(Ar(t[e]))return!0;return!1}if(Sr(t))return!0;if(t.toJSON&&"function"==typeof t.toJSON&&1===arguments.length)return Ar(t.toJSON(),!0);for(const e in t)if(Object.prototype.hasOwnProperty.call(t,e)&&Ar(t[e]))return!0;return!1}function Er(t){const e=[],r=t.data,n=t;return n.data=Or(r,e),n.attachments=e.length,{packet:n,buffers:e}}function Or(t,e){if(!t)return t;if(Sr(t)){const r={_placeholder:!0,num:e.length};return e.push(t),r}if(Array.isArray(t)){const r=new Array(t.length);for(let n=0;n<t.length;n++)r[n]=Or(t[n],e);return r}if("object"==typeof t&&!(t instanceof Date)){const r={};for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=Or(t[n],e));return r}return t}function kr(t,e){return t.data=Pr(t.data,e),delete t.attachments,t}function Pr(t,e){if(!t)return t;if(t&&!0===t._placeholder){if("number"==typeof t.num&&t.num>=0&&t.num<e.length)return e[t.num];throw new Error("illegal attachments")}if(Array.isArray(t))for(let r=0;r<t.length;r++)t[r]=Pr(t[r],e);else if("object"==typeof t)for(const r in t)Object.prototype.hasOwnProperty.call(t,r)&&(t[r]=Pr(t[r],e));return t}const Rr=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var Tr;!function(t){t[t.CONNECT=0]="CONNECT",t[t.DISCONNECT=1]="DISCONNECT",t[t.EVENT=2]="EVENT",t[t.ACK=3]="ACK",t[t.CONNECT_ERROR=4]="CONNECT_ERROR",t[t.BINARY_EVENT=5]="BINARY_EVENT",t[t.BINARY_ACK=6]="BINARY_ACK"}(Tr||(Tr={}));class xr extends Le.Emitter{constructor(t){super(),this.opts=Object.assign({reviver:void 0,maxAttachments:10},"function"==typeof t?{reviver:t}:t)}add(t){let e;if("string"==typeof t){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");e=this.decodeString(t);const r=e.type===Tr.BINARY_EVENT;r||e.type===Tr.BINARY_ACK?(e.type=r?Tr.EVENT:Tr.ACK,this.reconstructor=new jr(e),0===e.attachments&&super.emitReserved("decoded",e)):super.emitReserved("decoded",e)}else{if(!Sr(t)&&!t.base64)throw new Error("Unknown type: "+t);if(!this.reconstructor)throw new Error("got binary data when not reconstructing a packet");e=this.reconstructor.takeBinaryData(t),e&&(this.reconstructor=null,super.emitReserved("decoded",e))}}decodeString(t){let e=0;const r={type:Number(t.charAt(0))};if(void 0===Tr[r.type])throw new Error("unknown packet type "+r.type);if(r.type===Tr.BINARY_EVENT||r.type===Tr.BINARY_ACK){const n=e+1;for(;"-"!==t.charAt(++e)&&e!=t.length;);const o=t.substring(n,e);if(o!=Number(o)||"-"!==t.charAt(e))throw new Error("Illegal attachments");const i=Number(o);if(!Br(i)||i<0)throw new Error("Illegal attachments");if(i>this.opts.maxAttachments)throw new Error("too many attachments");r.attachments=i}if("/"===t.charAt(e+1)){const n=e+1;for(;++e;){if(","===t.charAt(e))break;if(e===t.length)break}r.nsp=t.substring(n,e)}else r.nsp="/";const n=t.charAt(e+1);if(""!==n&&Number(n)==n){const n=e+1;for(;++e;){const r=t.charAt(e);if(null==r||Number(r)!=r){--e;break}if(e===t.length)break}r.id=Number(t.substring(n,e+1))}if(t.charAt(++e)){const n=this.tryParse(t.substr(e));if(!xr.isPayloadValid(r.type,n))throw new Error("invalid payload");r.data=n}return r}tryParse(t){try{return JSON.parse(t,this.opts.reviver)}catch(t){return!1}}static isPayloadValid(t,e){switch(t){case Tr.CONNECT:return Nr(e);case Tr.DISCONNECT:return void 0===e;case Tr.CONNECT_ERROR:return"string"==typeof e||Nr(e);case Tr.EVENT:case Tr.BINARY_EVENT:return Array.isArray(e)&&("number"==typeof e[0]||"string"==typeof e[0]&&-1===Rr.indexOf(e[0]));case Tr.ACK:case Tr.BINARY_ACK:return Array.isArray(e)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class jr{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const t=kr(this.reconPack,this.buffers);return this.finishedReconstruction(),t}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const Br=Number.isInteger||function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t};function Nr(t){return"[object Object]"===Object.prototype.toString.call(t)}var Cr=Object.freeze({__proto__:null,Decoder:xr,Encoder:class{constructor(t){this.replacer=t}encode(t){return t.type!==Tr.EVENT&&t.type!==Tr.ACK||!Ar(t)?[this.encodeAsString(t)]:this.encodeAsBinary({type:t.type===Tr.EVENT?Tr.BINARY_EVENT:Tr.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id})}encodeAsString(t){let e=""+t.type;return t.type!==Tr.BINARY_EVENT&&t.type!==Tr.BINARY_ACK||(e+=t.attachments+"-"),t.nsp&&"/"!==t.nsp&&(e+=t.nsp+","),null!=t.id&&(e+=t.id),null!=t.data&&(e+=JSON.stringify(t.data,this.replacer)),e}encodeAsBinary(t){const e=Er(t),r=this.encodeAsString(e.packet),n=e.buffers;return n.unshift(r),n}},get PacketType(){return Tr}});export{Tr as P,br as S,Rt as _,Cr as a,jt as b,Le as c,Bt as d,Nt as e,Tt as f,xt as g,Ge as i,We as n,lr as p,ge as r};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var e,r,t,o,n,i,a,l,c,s,f=require("./vendor-crypto-js-AYnBdXB5.js"),p=require("./vendor-other-Cd2MOa_2.js");function u(){if(r)return e;r=1;var t=String.prototype.replace,o=/%20/g,n="RFC3986";return e={default:n,formatters:{RFC1738:function(e){return t.call(e,o,"+")},RFC3986:function(e){return String(e)}},RFC1738:"RFC1738",RFC3986:n}}function d(){if(o)return t;o=1;var e=u(),r=p.requireSideChannel(),n=Object.prototype.hasOwnProperty,i=Array.isArray,a=r(),l=function(e,r){return a.set(e,r),e},c=function(e){return a.has(e)},s=function(e){return a.get(e)},f=function(e,r){a.set(e,r)},d=function(){for(var e=[],r=0;r<256;++r)e[e.length]="%"+((r<16?"0":"")+r.toString(16)).toUpperCase();return e}(),y=function(e,r){for(var t=r&&r.plainObjects?{__proto__:null}:{},o=0;o<e.length;++o)void 0!==e[o]&&(t[o]=e[o]);return t},m=1024;return t={arrayToObject:y,assign:function(e,r){return Object.keys(r).reduce(function(e,t){return e[t]=r[t],e},e)},combine:function(e,r,t,o){if(c(e)){var n=s(e)+1;return e[n]=r,f(e,n),e}var i=[].concat(e,r);return i.length>t?l(y(i,{plainObjects:o}),i.length-1):i},compact:function(e){for(var r=[{obj:{o:e},prop:"o"}],t=[],o=0;o<r.length;++o)for(var n=r[o],a=n.obj[n.prop],l=Object.keys(a),c=0;c<l.length;++c){var s=l[c],f=a[s];"object"==typeof f&&null!==f&&-1===t.indexOf(f)&&(r[r.length]={obj:a,prop:s},t[t.length]=f)}return function(e){for(;e.length>1;){var r=e.pop(),t=r.obj[r.prop];if(i(t)){for(var o=[],n=0;n<t.length;++n)void 0!==t[n]&&(o[o.length]=t[n]);r.obj[r.prop]=o}}}(r),e},decode:function(e,r,t){var o=e.replace(/\+/g," ");if("iso-8859-1"===t)return o.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(o)}catch(e){return o}},encode:function(r,t,o,n,i){if(0===r.length)return r;var a=r;if("symbol"==typeof r?a=Symbol.prototype.toString.call(r):"string"!=typeof r&&(a=String(r)),"iso-8859-1"===o)return escape(a).replace(/%u[0-9a-f]{4}/gi,function(e){return"%26%23"+parseInt(e.slice(2),16)+"%3B"});for(var l="",c=0;c<a.length;c+=m){for(var s=a.length>=m?a.slice(c,c+m):a,f=[],p=0;p<s.length;++p){var u=s.charCodeAt(p);45===u||46===u||95===u||126===u||u>=48&&u<=57||u>=65&&u<=90||u>=97&&u<=122||i===e.RFC1738&&(40===u||41===u)?f[f.length]=s.charAt(p):u<128?f[f.length]=d[u]:u<2048?f[f.length]=d[192|u>>6]+d[128|63&u]:u<55296||u>=57344?f[f.length]=d[224|u>>12]+d[128|u>>6&63]+d[128|63&u]:(p+=1,u=65536+((1023&u)<<10|1023&s.charCodeAt(p)),f[f.length]=d[240|u>>18]+d[128|u>>12&63]+d[128|u>>6&63]+d[128|63&u])}l+=f.join("")}return l},isBuffer:function(e){return!(!e||"object"!=typeof e)&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},isOverflow:c,isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},markOverflow:l,maybeMap:function(e,r){if(i(e)){for(var t=[],o=0;o<e.length;o+=1)t[t.length]=r(e[o]);return t}return r(e)},merge:function e(r,t,o){if(!t)return r;if("object"!=typeof t&&"function"!=typeof t){if(i(r)){var a=r.length;if(o&&"number"==typeof o.arrayLimit&&a>o.arrayLimit)return l(y(r.concat(t),o),a);r[a]=t}else{if(!r||"object"!=typeof r)return[r,t];if(c(r)){var p=s(r)+1;r[p]=t,f(r,p)}else{if(o&&o.strictMerge)return[r,t];(o&&(o.plainObjects||o.allowPrototypes)||!n.call(Object.prototype,t))&&(r[t]=!0)}}return r}if(!r||"object"!=typeof r){if(c(t)){for(var u=Object.keys(t),d=o&&o.plainObjects?{__proto__:null,0:r}:{0:r},m=0;m<u.length;m++){d[parseInt(u[m],10)+1]=t[u[m]]}return l(d,s(t)+1)}var h=[r].concat(t);return o&&"number"==typeof o.arrayLimit&&h.length>o.arrayLimit?l(y(h,o),h.length-1):h}var g=r;return i(r)&&!i(t)&&(g=y(r,o)),i(r)&&i(t)?(t.forEach(function(t,i){if(n.call(r,i)){var a=r[i];a&&"object"==typeof a&&t&&"object"==typeof t?r[i]=e(a,t,o):r[r.length]=t}else r[i]=t}),r):Object.keys(t).reduce(function(r,i){var a=t[i];if(n.call(r,i)?r[i]=e(r[i],a,o):r[i]=a,c(t)&&!c(r)&&l(r,s(t)),c(r)){var p=parseInt(i,10);String(p)===i&&p>=0&&p>s(r)&&f(r,p)}return r},g)}},t}function y(){if(i)return n;i=1;var e=p.requireSideChannel(),r=d(),t=u(),o=Object.prototype.hasOwnProperty,a={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,r){return e+"["+r+"]"},repeat:function(e){return e}},l=Array.isArray,c=Array.prototype.push,s=function(e,r){c.apply(e,l(r)?r:[r])},f=Date.prototype.toISOString,y=t.default,m={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,commaRoundTrip:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:r.encode,encodeValuesOnly:!1,filter:void 0,format:y,formatter:t.formatters[y],indices:!1,serializeDate:function(e){return f.call(e)},skipNulls:!1,strictNullHandling:!1},h={},g=function t(o,n,i,a,c,f,p,u,d,y,g,v,b,w,O,E,j,D){for(var A,x=o,L=D,S=0,I=!1;void 0!==(L=L.get(h))&&!I;){var N=L.get(o);if(S+=1,void 0!==N){if(N===S)throw new RangeError("Cyclic object value");I=!0}void 0===L.get(h)&&(S=0)}if("function"==typeof y?x=y(n,x):x instanceof Date?x=b(x):"comma"===i&&l(x)&&(x=r.maybeMap(x,function(e){return e instanceof Date?b(e):e})),null===x){if(f)return O(d&&!E?d(n,m.encoder,j,"key",w):n);x=""}if("string"==typeof(A=x)||"number"==typeof A||"boolean"==typeof A||"symbol"==typeof A||"bigint"==typeof A||r.isBuffer(x))return d?[O(E?n:d(n,m.encoder,j,"key",w))+"="+O(d(x,m.encoder,j,"value",w))]:[O(n)+"="+O(String(x))];var _,R=[];if(void 0===x)return R;if("comma"===i&&l(x))E&&d&&(x=r.maybeMap(x,function(e){return null==e?e:d(e)})),_=[{value:x.length>0?x.join(",")||null:void 0}];else if(l(y))_=y;else{var P=Object.keys(x);_=g?P.sort(g):P}var T=u?String(n).replace(/\./g,"%2E"):String(n),k=a&&l(x)&&1===x.length?T+"[]":T;if(c&&l(x)&&0===x.length)return k+"[]";for(var C=0;C<_.length;++C){var K=_[C],F="object"==typeof K&&K&&void 0!==K.value?K.value:x[K];if(!p||null!==F){var H=v&&u?String(K).replace(/\./g,"%2E"):String(K),M=l(x)?"function"==typeof i?i(k,H):k:k+(v?"."+H:"["+H+"]");D.set(o,S);var Q=e();Q.set(h,D),s(R,t(F,M,i,a,c,f,p,u,"comma"===i&&E&&l(x)?null:d,y,g,v,b,w,O,E,j,Q))}}return R};return n=function(r,n){var i,c=r,f=function(e){if(!e)return m;if(void 0!==e.allowEmptyArrays&&"boolean"!=typeof e.allowEmptyArrays)throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(void 0!==e.encodeDotInKeys&&"boolean"!=typeof e.encodeDotInKeys)throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(null!==e.encoder&&void 0!==e.encoder&&"function"!=typeof e.encoder)throw new TypeError("Encoder has to be a function.");var r=e.charset||m.charset;if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=t.default;if(void 0!==e.format){if(!o.call(t.formatters,e.format))throw new TypeError("Unknown format option provided.");n=e.format}var i,c=t.formatters[n],s=m.filter;if(("function"==typeof e.filter||l(e.filter))&&(s=e.filter),i=e.arrayFormat in a?e.arrayFormat:"indices"in e?e.indices?"indices":"repeat":m.arrayFormat,"commaRoundTrip"in e&&"boolean"!=typeof e.commaRoundTrip)throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var f=void 0===e.allowDots?!0===e.encodeDotInKeys||m.allowDots:!!e.allowDots;return{addQueryPrefix:"boolean"==typeof e.addQueryPrefix?e.addQueryPrefix:m.addQueryPrefix,allowDots:f,allowEmptyArrays:"boolean"==typeof e.allowEmptyArrays?!!e.allowEmptyArrays:m.allowEmptyArrays,arrayFormat:i,charset:r,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:m.charsetSentinel,commaRoundTrip:!!e.commaRoundTrip,delimiter:void 0===e.delimiter?m.delimiter:e.delimiter,encode:"boolean"==typeof e.encode?e.encode:m.encode,encodeDotInKeys:"boolean"==typeof e.encodeDotInKeys?e.encodeDotInKeys:m.encodeDotInKeys,encoder:"function"==typeof e.encoder?e.encoder:m.encoder,encodeValuesOnly:"boolean"==typeof e.encodeValuesOnly?e.encodeValuesOnly:m.encodeValuesOnly,filter:s,format:n,formatter:c,serializeDate:"function"==typeof e.serializeDate?e.serializeDate:m.serializeDate,skipNulls:"boolean"==typeof e.skipNulls?e.skipNulls:m.skipNulls,sort:"function"==typeof e.sort?e.sort:null,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:m.strictNullHandling}}(n);"function"==typeof f.filter?c=(0,f.filter)("",c):l(f.filter)&&(i=f.filter);var p=[];if("object"!=typeof c||null===c)return"";var u=a[f.arrayFormat],d="comma"===u&&f.commaRoundTrip;i||(i=Object.keys(c)),f.sort&&i.sort(f.sort);for(var y=e(),h=0;h<i.length;++h){var v=i[h];if(null!=v){var b=c[v];f.skipNulls&&null===b||s(p,g(b,v,u,d,f.allowEmptyArrays,f.strictNullHandling,f.skipNulls,f.encodeDotInKeys,f.encode?f.encoder:null,f.filter,f.sort,f.allowDots,f.serializeDate,f.format,f.formatter,f.encodeValuesOnly,f.charset,y))}}var w=p.join(f.delimiter),O=!0===f.addQueryPrefix?"?":"";return f.charsetSentinel&&("iso-8859-1"===f.charset?O+="utf8=%26%2310003%3B"+f.delimiter:O+="utf8=%E2%9C%93"+f.delimiter),w.length>0?O+w:""}}function m(){if(l)return a;l=1;var e=d(),r=Object.prototype.hasOwnProperty,t=Array.isArray,o={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:e.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictMerge:!0,strictNullHandling:!1,throwOnLimitExceeded:!1},n=function(e){return e.replace(/&#(\d+);/g,function(e,r){return String.fromCharCode(parseInt(r,10))})},i=function(e,r,t){if(e&&"string"==typeof e&&r.comma&&e.indexOf(",")>-1)return e.split(",");if(r.throwOnLimitExceeded&&t>=r.arrayLimit)throw new RangeError("Array limit exceeded. Only "+r.arrayLimit+" element"+(1===r.arrayLimit?"":"s")+" allowed in an array.");return e},c=function(t,o,n,a){if(t){var l=function(e,t){var o=t.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e;if(t.depth<=0){if(!t.plainObjects&&r.call(Object.prototype,o)&&!t.allowPrototypes)return;return[o]}var n=[],i=o.indexOf("["),a=i>=0?o.slice(0,i):o;if(a){if(!t.plainObjects&&r.call(Object.prototype,a)&&!t.allowPrototypes)return;n[n.length]=a}for(var l=o.length,c=i,s=0;c>=0&&s<t.depth;){for(var f=1,p=c+1,u=-1;p<l&&u<0;){var d=o.charCodeAt(p);91===d?f+=1:93===d&&0==(f-=1)&&(u=p),p+=1}if(u<0)return n[n.length]="["+o.slice(c)+"]",n;var y=o.slice(c,u+1),m=y.slice(1,-1);if(!t.plainObjects&&r.call(Object.prototype,m)&&!t.allowPrototypes)return;n[n.length]=y,s+=1,c=o.indexOf("[",u+1)}if(c>=0){if(!0===t.strictDepth)throw new RangeError("Input depth exceeded depth option of "+t.depth+" and strictDepth is true");n[n.length]="["+o.slice(c)+"]"}return n}(t,n);if(l)return function(r,t,o,n){var a=0;if(r.length>0&&"[]"===r[r.length-1]){var l=r.slice(0,-1).join("");a=Array.isArray(t)&&t[l]?t[l].length:0}for(var c=n?t:i(t,o,a),s=r.length-1;s>=0;--s){var f,p=r[s];if("[]"===p&&o.parseArrays)f=e.isOverflow(c)?c:o.allowEmptyArrays&&(""===c||o.strictNullHandling&&null===c)?[]:e.combine([],c,o.arrayLimit,o.plainObjects);else{f=o.plainObjects?{__proto__:null}:{};var u="["===p.charAt(0)&&"]"===p.charAt(p.length-1)?p.slice(1,-1):p,d=o.decodeDotInKeys?u.replace(/%2E/g,"."):u,y=parseInt(d,10),m=!isNaN(y)&&p!==d&&String(y)===d&&y>=0&&o.parseArrays;if(o.parseArrays||""!==d)if(m&&y<o.arrayLimit)(f=[])[y]=c;else{if(m&&o.throwOnLimitExceeded)throw new RangeError("Array limit exceeded. Only "+o.arrayLimit+" element"+(1===o.arrayLimit?"":"s")+" allowed in an array.");m?(f[y]=c,e.markOverflow(f,y)):"__proto__"!==d&&(f[d]=c)}else f={0:c}}c=f}return c}(l,o,n,a)}};return a=function(a,l){var s=function(r){if(!r)return o;if(void 0!==r.allowEmptyArrays&&"boolean"!=typeof r.allowEmptyArrays)throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(void 0!==r.decodeDotInKeys&&"boolean"!=typeof r.decodeDotInKeys)throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(null!==r.decoder&&void 0!==r.decoder&&"function"!=typeof r.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==r.charset&&"utf-8"!==r.charset&&"iso-8859-1"!==r.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");if(void 0!==r.throwOnLimitExceeded&&"boolean"!=typeof r.throwOnLimitExceeded)throw new TypeError("`throwOnLimitExceeded` option must be a boolean");var t=void 0===r.charset?o.charset:r.charset,n=void 0===r.duplicates?o.duplicates:r.duplicates;if("combine"!==n&&"first"!==n&&"last"!==n)throw new TypeError("The duplicates option must be either combine, first, or last");return{allowDots:void 0===r.allowDots?!0===r.decodeDotInKeys||o.allowDots:!!r.allowDots,allowEmptyArrays:"boolean"==typeof r.allowEmptyArrays?!!r.allowEmptyArrays:o.allowEmptyArrays,allowPrototypes:"boolean"==typeof r.allowPrototypes?r.allowPrototypes:o.allowPrototypes,allowSparse:"boolean"==typeof r.allowSparse?r.allowSparse:o.allowSparse,arrayLimit:"number"==typeof r.arrayLimit?r.arrayLimit:o.arrayLimit,charset:t,charsetSentinel:"boolean"==typeof r.charsetSentinel?r.charsetSentinel:o.charsetSentinel,comma:"boolean"==typeof r.comma?r.comma:o.comma,decodeDotInKeys:"boolean"==typeof r.decodeDotInKeys?r.decodeDotInKeys:o.decodeDotInKeys,decoder:"function"==typeof r.decoder?r.decoder:o.decoder,delimiter:"string"==typeof r.delimiter||e.isRegExp(r.delimiter)?r.delimiter:o.delimiter,depth:"number"==typeof r.depth||!1===r.depth?+r.depth:o.depth,duplicates:n,ignoreQueryPrefix:!0===r.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof r.interpretNumericEntities?r.interpretNumericEntities:o.interpretNumericEntities,parameterLimit:"number"==typeof r.parameterLimit?r.parameterLimit:o.parameterLimit,parseArrays:!1!==r.parseArrays,plainObjects:"boolean"==typeof r.plainObjects?r.plainObjects:o.plainObjects,strictDepth:"boolean"==typeof r.strictDepth?!!r.strictDepth:o.strictDepth,strictMerge:"boolean"==typeof r.strictMerge?!!r.strictMerge:o.strictMerge,strictNullHandling:"boolean"==typeof r.strictNullHandling?r.strictNullHandling:o.strictNullHandling,throwOnLimitExceeded:"boolean"==typeof r.throwOnLimitExceeded&&r.throwOnLimitExceeded}}(l);if(""===a||null==a)return s.plainObjects?{__proto__:null}:{};for(var f="string"==typeof a?function(a,l){var c={__proto__:null},s=l.ignoreQueryPrefix?a.replace(/^\?/,""):a;s=s.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var f=l.parameterLimit===1/0?void 0:l.parameterLimit,p=s.split(l.delimiter,l.throwOnLimitExceeded&&void 0!==f?f+1:f);if(l.throwOnLimitExceeded&&void 0!==f&&p.length>f)throw new RangeError("Parameter limit exceeded. Only "+f+" parameter"+(1===f?"":"s")+" allowed.");var u,d=-1,y=l.charset;if(l.charsetSentinel)for(u=0;u<p.length;++u)0===p[u].indexOf("utf8=")&&("utf8=%E2%9C%93"===p[u]?y="utf-8":"utf8=%26%2310003%3B"===p[u]&&(y="iso-8859-1"),d=u,u=p.length);for(u=0;u<p.length;++u)if(u!==d){var m,h,g=p[u],v=g.indexOf("]="),b=-1===v?g.indexOf("="):v+1;if(-1===b?(m=l.decoder(g,o.decoder,y,"key"),h=l.strictNullHandling?null:""):null!==(m=l.decoder(g.slice(0,b),o.decoder,y,"key"))&&(h=e.maybeMap(i(g.slice(b+1),l,t(c[m])?c[m].length:0),function(e){return l.decoder(e,o.decoder,y,"value")})),h&&l.interpretNumericEntities&&"iso-8859-1"===y&&(h=n(String(h))),g.indexOf("[]=")>-1&&(h=t(h)?[h]:h),l.comma&&t(h)&&h.length>l.arrayLimit){if(l.throwOnLimitExceeded)throw new RangeError("Array limit exceeded. Only "+l.arrayLimit+" element"+(1===l.arrayLimit?"":"s")+" allowed in an array.");h=e.combine([],h,l.arrayLimit,l.plainObjects)}if(null!==m){var w=r.call(c,m);w&&("combine"===l.duplicates||g.indexOf("[]=")>-1)?c[m]=e.combine(c[m],h,l.arrayLimit,l.plainObjects):w&&"last"!==l.duplicates||(c[m]=h)}}return c}(a,s):a,p=s.plainObjects?{__proto__:null}:{},u=Object.keys(f),d=0;d<u.length;++d){var y=u[d],m=c(y,f[y],s,"string"==typeof a);p=e.merge(p,m,s)}return!0===s.allowSparse?p:e.compact(p)}}function h(){if(s)return c;s=1;var e=y(),r=m();return c={formats:u(),parse:r,stringify:e}}var g=h(),v=f.getDefaultExportFromCjs(g);exports.qs=v;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{g as e}from"./vendor-crypto-js-Dhi5niDn.js";import{r}from"./vendor-other-odeBaM7w.js";var t,o,n,i,a,l,c,s,f,p;function u(){if(o)return t;o=1;var e=String.prototype.replace,r=/%20/g,n="RFC3986";return t={default:n,formatters:{RFC1738:function(t){return e.call(t,r,"+")},RFC3986:function(e){return String(e)}},RFC1738:"RFC1738",RFC3986:n}}function d(){if(i)return n;i=1;var e=u(),t=r(),o=Object.prototype.hasOwnProperty,a=Array.isArray,l=t(),c=function(e,r){return l.set(e,r),e},s=function(e){return l.has(e)},f=function(e){return l.get(e)},p=function(e,r){l.set(e,r)},d=function(){for(var e=[],r=0;r<256;++r)e[e.length]="%"+((r<16?"0":"")+r.toString(16)).toUpperCase();return e}(),y=function(e,r){for(var t=r&&r.plainObjects?{__proto__:null}:{},o=0;o<e.length;++o)void 0!==e[o]&&(t[o]=e[o]);return t},m=1024;return n={arrayToObject:y,assign:function(e,r){return Object.keys(r).reduce(function(e,t){return e[t]=r[t],e},e)},combine:function(e,r,t,o){if(s(e)){var n=f(e)+1;return e[n]=r,p(e,n),e}var i=[].concat(e,r);return i.length>t?c(y(i,{plainObjects:o}),i.length-1):i},compact:function(e){for(var r=[{obj:{o:e},prop:"o"}],t=[],o=0;o<r.length;++o)for(var n=r[o],i=n.obj[n.prop],l=Object.keys(i),c=0;c<l.length;++c){var s=l[c],f=i[s];"object"==typeof f&&null!==f&&-1===t.indexOf(f)&&(r[r.length]={obj:i,prop:s},t[t.length]=f)}return function(e){for(;e.length>1;){var r=e.pop(),t=r.obj[r.prop];if(a(t)){for(var o=[],n=0;n<t.length;++n)void 0!==t[n]&&(o[o.length]=t[n]);r.obj[r.prop]=o}}}(r),e},decode:function(e,r,t){var o=e.replace(/\+/g," ");if("iso-8859-1"===t)return o.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(o)}catch(e){return o}},encode:function(r,t,o,n,i){if(0===r.length)return r;var a=r;if("symbol"==typeof r?a=Symbol.prototype.toString.call(r):"string"!=typeof r&&(a=String(r)),"iso-8859-1"===o)return escape(a).replace(/%u[0-9a-f]{4}/gi,function(e){return"%26%23"+parseInt(e.slice(2),16)+"%3B"});for(var l="",c=0;c<a.length;c+=m){for(var s=a.length>=m?a.slice(c,c+m):a,f=[],p=0;p<s.length;++p){var u=s.charCodeAt(p);45===u||46===u||95===u||126===u||u>=48&&u<=57||u>=65&&u<=90||u>=97&&u<=122||i===e.RFC1738&&(40===u||41===u)?f[f.length]=s.charAt(p):u<128?f[f.length]=d[u]:u<2048?f[f.length]=d[192|u>>6]+d[128|63&u]:u<55296||u>=57344?f[f.length]=d[224|u>>12]+d[128|u>>6&63]+d[128|63&u]:(p+=1,u=65536+((1023&u)<<10|1023&s.charCodeAt(p)),f[f.length]=d[240|u>>18]+d[128|u>>12&63]+d[128|u>>6&63]+d[128|63&u])}l+=f.join("")}return l},isBuffer:function(e){return!(!e||"object"!=typeof e)&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},isOverflow:s,isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},markOverflow:c,maybeMap:function(e,r){if(a(e)){for(var t=[],o=0;o<e.length;o+=1)t[t.length]=r(e[o]);return t}return r(e)},merge:function e(r,t,n){if(!t)return r;if("object"!=typeof t&&"function"!=typeof t){if(a(r)){var i=r.length;if(n&&"number"==typeof n.arrayLimit&&i>n.arrayLimit)return c(y(r.concat(t),n),i);r[i]=t}else{if(!r||"object"!=typeof r)return[r,t];if(s(r)){var l=f(r)+1;r[l]=t,p(r,l)}else{if(n&&n.strictMerge)return[r,t];(n&&(n.plainObjects||n.allowPrototypes)||!o.call(Object.prototype,t))&&(r[t]=!0)}}return r}if(!r||"object"!=typeof r){if(s(t)){for(var u=Object.keys(t),d=n&&n.plainObjects?{__proto__:null,0:r}:{0:r},m=0;m<u.length;m++){d[parseInt(u[m],10)+1]=t[u[m]]}return c(d,f(t)+1)}var h=[r].concat(t);return n&&"number"==typeof n.arrayLimit&&h.length>n.arrayLimit?c(y(h,n),h.length-1):h}var g=r;return a(r)&&!a(t)&&(g=y(r,n)),a(r)&&a(t)?(t.forEach(function(t,i){if(o.call(r,i)){var a=r[i];a&&"object"==typeof a&&t&&"object"==typeof t?r[i]=e(a,t,n):r[r.length]=t}else r[i]=t}),r):Object.keys(t).reduce(function(r,i){var a=t[i];if(o.call(r,i)?r[i]=e(r[i],a,n):r[i]=a,s(t)&&!s(r)&&c(r,f(t)),s(r)){var l=parseInt(i,10);String(l)===i&&l>=0&&l>f(r)&&p(r,l)}return r},g)}},n}function y(){if(l)return a;l=1;var e=r(),t=d(),o=u(),n=Object.prototype.hasOwnProperty,i={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,r){return e+"["+r+"]"},repeat:function(e){return e}},c=Array.isArray,s=Array.prototype.push,f=function(e,r){s.apply(e,c(r)?r:[r])},p=Date.prototype.toISOString,y=o.default,m={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,commaRoundTrip:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:t.encode,encodeValuesOnly:!1,filter:void 0,format:y,formatter:o.formatters[y],indices:!1,serializeDate:function(e){return p.call(e)},skipNulls:!1,strictNullHandling:!1},h={},g=function r(o,n,i,a,l,s,p,u,d,y,g,v,b,w,O,E,j,D){for(var A,x=o,L=D,S=0,I=!1;void 0!==(L=L.get(h))&&!I;){var N=L.get(o);if(S+=1,void 0!==N){if(N===S)throw new RangeError("Cyclic object value");I=!0}void 0===L.get(h)&&(S=0)}if("function"==typeof y?x=y(n,x):x instanceof Date?x=b(x):"comma"===i&&c(x)&&(x=t.maybeMap(x,function(e){return e instanceof Date?b(e):e})),null===x){if(s)return O(d&&!E?d(n,m.encoder,j,"key",w):n);x=""}if("string"==typeof(A=x)||"number"==typeof A||"boolean"==typeof A||"symbol"==typeof A||"bigint"==typeof A||t.isBuffer(x))return d?[O(E?n:d(n,m.encoder,j,"key",w))+"="+O(d(x,m.encoder,j,"value",w))]:[O(n)+"="+O(String(x))];var _,R=[];if(void 0===x)return R;if("comma"===i&&c(x))E&&d&&(x=t.maybeMap(x,function(e){return null==e?e:d(e)})),_=[{value:x.length>0?x.join(",")||null:void 0}];else if(c(y))_=y;else{var P=Object.keys(x);_=g?P.sort(g):P}var T=u?String(n).replace(/\./g,"%2E"):String(n),k=a&&c(x)&&1===x.length?T+"[]":T;if(l&&c(x)&&0===x.length)return k+"[]";for(var K=0;K<_.length;++K){var C=_[K],F="object"==typeof C&&C&&void 0!==C.value?C.value:x[C];if(!p||null!==F){var H=v&&u?String(C).replace(/\./g,"%2E"):String(C),M=c(x)?"function"==typeof i?i(k,H):k:k+(v?"."+H:"["+H+"]");D.set(o,S);var Q=e();Q.set(h,D),f(R,r(F,M,i,a,l,s,p,u,"comma"===i&&E&&c(x)?null:d,y,g,v,b,w,O,E,j,Q))}}return R};return a=function(r,t){var a,l=r,s=function(e){if(!e)return m;if(void 0!==e.allowEmptyArrays&&"boolean"!=typeof e.allowEmptyArrays)throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(void 0!==e.encodeDotInKeys&&"boolean"!=typeof e.encodeDotInKeys)throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(null!==e.encoder&&void 0!==e.encoder&&"function"!=typeof e.encoder)throw new TypeError("Encoder has to be a function.");var r=e.charset||m.charset;if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t=o.default;if(void 0!==e.format){if(!n.call(o.formatters,e.format))throw new TypeError("Unknown format option provided.");t=e.format}var a,l=o.formatters[t],s=m.filter;if(("function"==typeof e.filter||c(e.filter))&&(s=e.filter),a=e.arrayFormat in i?e.arrayFormat:"indices"in e?e.indices?"indices":"repeat":m.arrayFormat,"commaRoundTrip"in e&&"boolean"!=typeof e.commaRoundTrip)throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var f=void 0===e.allowDots?!0===e.encodeDotInKeys||m.allowDots:!!e.allowDots;return{addQueryPrefix:"boolean"==typeof e.addQueryPrefix?e.addQueryPrefix:m.addQueryPrefix,allowDots:f,allowEmptyArrays:"boolean"==typeof e.allowEmptyArrays?!!e.allowEmptyArrays:m.allowEmptyArrays,arrayFormat:a,charset:r,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:m.charsetSentinel,commaRoundTrip:!!e.commaRoundTrip,delimiter:void 0===e.delimiter?m.delimiter:e.delimiter,encode:"boolean"==typeof e.encode?e.encode:m.encode,encodeDotInKeys:"boolean"==typeof e.encodeDotInKeys?e.encodeDotInKeys:m.encodeDotInKeys,encoder:"function"==typeof e.encoder?e.encoder:m.encoder,encodeValuesOnly:"boolean"==typeof e.encodeValuesOnly?e.encodeValuesOnly:m.encodeValuesOnly,filter:s,format:t,formatter:l,serializeDate:"function"==typeof e.serializeDate?e.serializeDate:m.serializeDate,skipNulls:"boolean"==typeof e.skipNulls?e.skipNulls:m.skipNulls,sort:"function"==typeof e.sort?e.sort:null,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:m.strictNullHandling}}(t);"function"==typeof s.filter?l=(0,s.filter)("",l):c(s.filter)&&(a=s.filter);var p=[];if("object"!=typeof l||null===l)return"";var u=i[s.arrayFormat],d="comma"===u&&s.commaRoundTrip;a||(a=Object.keys(l)),s.sort&&a.sort(s.sort);for(var y=e(),h=0;h<a.length;++h){var v=a[h];if(null!=v){var b=l[v];s.skipNulls&&null===b||f(p,g(b,v,u,d,s.allowEmptyArrays,s.strictNullHandling,s.skipNulls,s.encodeDotInKeys,s.encode?s.encoder:null,s.filter,s.sort,s.allowDots,s.serializeDate,s.format,s.formatter,s.encodeValuesOnly,s.charset,y))}}var w=p.join(s.delimiter),O=!0===s.addQueryPrefix?"?":"";return s.charsetSentinel&&("iso-8859-1"===s.charset?O+="utf8=%26%2310003%3B"+s.delimiter:O+="utf8=%E2%9C%93"+s.delimiter),w.length>0?O+w:""}}function m(){if(s)return c;s=1;var e=d(),r=Object.prototype.hasOwnProperty,t=Array.isArray,o={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:e.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictMerge:!0,strictNullHandling:!1,throwOnLimitExceeded:!1},n=function(e){return e.replace(/&#(\d+);/g,function(e,r){return String.fromCharCode(parseInt(r,10))})},i=function(e,r,t){if(e&&"string"==typeof e&&r.comma&&e.indexOf(",")>-1)return e.split(",");if(r.throwOnLimitExceeded&&t>=r.arrayLimit)throw new RangeError("Array limit exceeded. Only "+r.arrayLimit+" element"+(1===r.arrayLimit?"":"s")+" allowed in an array.");return e},a=function(t,o,n,a){if(t){var l=function(e,t){var o=t.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e;if(t.depth<=0){if(!t.plainObjects&&r.call(Object.prototype,o)&&!t.allowPrototypes)return;return[o]}var n=[],i=o.indexOf("["),a=i>=0?o.slice(0,i):o;if(a){if(!t.plainObjects&&r.call(Object.prototype,a)&&!t.allowPrototypes)return;n[n.length]=a}for(var l=o.length,c=i,s=0;c>=0&&s<t.depth;){for(var f=1,p=c+1,u=-1;p<l&&u<0;){var d=o.charCodeAt(p);91===d?f+=1:93===d&&0==(f-=1)&&(u=p),p+=1}if(u<0)return n[n.length]="["+o.slice(c)+"]",n;var y=o.slice(c,u+1),m=y.slice(1,-1);if(!t.plainObjects&&r.call(Object.prototype,m)&&!t.allowPrototypes)return;n[n.length]=y,s+=1,c=o.indexOf("[",u+1)}if(c>=0){if(!0===t.strictDepth)throw new RangeError("Input depth exceeded depth option of "+t.depth+" and strictDepth is true");n[n.length]="["+o.slice(c)+"]"}return n}(t,n);if(l)return function(r,t,o,n){var a=0;if(r.length>0&&"[]"===r[r.length-1]){var l=r.slice(0,-1).join("");a=Array.isArray(t)&&t[l]?t[l].length:0}for(var c=n?t:i(t,o,a),s=r.length-1;s>=0;--s){var f,p=r[s];if("[]"===p&&o.parseArrays)f=e.isOverflow(c)?c:o.allowEmptyArrays&&(""===c||o.strictNullHandling&&null===c)?[]:e.combine([],c,o.arrayLimit,o.plainObjects);else{f=o.plainObjects?{__proto__:null}:{};var u="["===p.charAt(0)&&"]"===p.charAt(p.length-1)?p.slice(1,-1):p,d=o.decodeDotInKeys?u.replace(/%2E/g,"."):u,y=parseInt(d,10),m=!isNaN(y)&&p!==d&&String(y)===d&&y>=0&&o.parseArrays;if(o.parseArrays||""!==d)if(m&&y<o.arrayLimit)(f=[])[y]=c;else{if(m&&o.throwOnLimitExceeded)throw new RangeError("Array limit exceeded. Only "+o.arrayLimit+" element"+(1===o.arrayLimit?"":"s")+" allowed in an array.");m?(f[y]=c,e.markOverflow(f,y)):"__proto__"!==d&&(f[d]=c)}else f={0:c}}c=f}return c}(l,o,n,a)}};return c=function(l,c){var s=function(r){if(!r)return o;if(void 0!==r.allowEmptyArrays&&"boolean"!=typeof r.allowEmptyArrays)throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(void 0!==r.decodeDotInKeys&&"boolean"!=typeof r.decodeDotInKeys)throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(null!==r.decoder&&void 0!==r.decoder&&"function"!=typeof r.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==r.charset&&"utf-8"!==r.charset&&"iso-8859-1"!==r.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");if(void 0!==r.throwOnLimitExceeded&&"boolean"!=typeof r.throwOnLimitExceeded)throw new TypeError("`throwOnLimitExceeded` option must be a boolean");var t=void 0===r.charset?o.charset:r.charset,n=void 0===r.duplicates?o.duplicates:r.duplicates;if("combine"!==n&&"first"!==n&&"last"!==n)throw new TypeError("The duplicates option must be either combine, first, or last");return{allowDots:void 0===r.allowDots?!0===r.decodeDotInKeys||o.allowDots:!!r.allowDots,allowEmptyArrays:"boolean"==typeof r.allowEmptyArrays?!!r.allowEmptyArrays:o.allowEmptyArrays,allowPrototypes:"boolean"==typeof r.allowPrototypes?r.allowPrototypes:o.allowPrototypes,allowSparse:"boolean"==typeof r.allowSparse?r.allowSparse:o.allowSparse,arrayLimit:"number"==typeof r.arrayLimit?r.arrayLimit:o.arrayLimit,charset:t,charsetSentinel:"boolean"==typeof r.charsetSentinel?r.charsetSentinel:o.charsetSentinel,comma:"boolean"==typeof r.comma?r.comma:o.comma,decodeDotInKeys:"boolean"==typeof r.decodeDotInKeys?r.decodeDotInKeys:o.decodeDotInKeys,decoder:"function"==typeof r.decoder?r.decoder:o.decoder,delimiter:"string"==typeof r.delimiter||e.isRegExp(r.delimiter)?r.delimiter:o.delimiter,depth:"number"==typeof r.depth||!1===r.depth?+r.depth:o.depth,duplicates:n,ignoreQueryPrefix:!0===r.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof r.interpretNumericEntities?r.interpretNumericEntities:o.interpretNumericEntities,parameterLimit:"number"==typeof r.parameterLimit?r.parameterLimit:o.parameterLimit,parseArrays:!1!==r.parseArrays,plainObjects:"boolean"==typeof r.plainObjects?r.plainObjects:o.plainObjects,strictDepth:"boolean"==typeof r.strictDepth?!!r.strictDepth:o.strictDepth,strictMerge:"boolean"==typeof r.strictMerge?!!r.strictMerge:o.strictMerge,strictNullHandling:"boolean"==typeof r.strictNullHandling?r.strictNullHandling:o.strictNullHandling,throwOnLimitExceeded:"boolean"==typeof r.throwOnLimitExceeded&&r.throwOnLimitExceeded}}(c);if(""===l||null==l)return s.plainObjects?{__proto__:null}:{};for(var f="string"==typeof l?function(a,l){var c={__proto__:null},s=l.ignoreQueryPrefix?a.replace(/^\?/,""):a;s=s.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var f=l.parameterLimit===1/0?void 0:l.parameterLimit,p=s.split(l.delimiter,l.throwOnLimitExceeded&&void 0!==f?f+1:f);if(l.throwOnLimitExceeded&&void 0!==f&&p.length>f)throw new RangeError("Parameter limit exceeded. Only "+f+" parameter"+(1===f?"":"s")+" allowed.");var u,d=-1,y=l.charset;if(l.charsetSentinel)for(u=0;u<p.length;++u)0===p[u].indexOf("utf8=")&&("utf8=%E2%9C%93"===p[u]?y="utf-8":"utf8=%26%2310003%3B"===p[u]&&(y="iso-8859-1"),d=u,u=p.length);for(u=0;u<p.length;++u)if(u!==d){var m,h,g=p[u],v=g.indexOf("]="),b=-1===v?g.indexOf("="):v+1;if(-1===b?(m=l.decoder(g,o.decoder,y,"key"),h=l.strictNullHandling?null:""):null!==(m=l.decoder(g.slice(0,b),o.decoder,y,"key"))&&(h=e.maybeMap(i(g.slice(b+1),l,t(c[m])?c[m].length:0),function(e){return l.decoder(e,o.decoder,y,"value")})),h&&l.interpretNumericEntities&&"iso-8859-1"===y&&(h=n(String(h))),g.indexOf("[]=")>-1&&(h=t(h)?[h]:h),l.comma&&t(h)&&h.length>l.arrayLimit){if(l.throwOnLimitExceeded)throw new RangeError("Array limit exceeded. Only "+l.arrayLimit+" element"+(1===l.arrayLimit?"":"s")+" allowed in an array.");h=e.combine([],h,l.arrayLimit,l.plainObjects)}if(null!==m){var w=r.call(c,m);w&&("combine"===l.duplicates||g.indexOf("[]=")>-1)?c[m]=e.combine(c[m],h,l.arrayLimit,l.plainObjects):w&&"last"!==l.duplicates||(c[m]=h)}}return c}(l,s):l,p=s.plainObjects?{__proto__:null}:{},u=Object.keys(f),d=0;d<u.length;++d){var y=u[d],m=a(y,f[y],s,"string"==typeof l);p=e.merge(p,m,s)}return!0===s.allowSparse?p:e.compact(p)}}function h(){if(p)return f;p=1;var e=y(),r=m();return f={formats:u(),parse:r,stringify:e}}var g=e(h());export{g as q};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{p as t,c as e,P as s,i,a as n,S as o,n as r}from"./vendor-other-odeBaM7w.js";function h(t,e,s){return t.on(e,s),function(){t.off(e,s)}}const c=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class a extends e.Emitter{constructor(t,e,s){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=e,s&&s.auth&&(this.auth=s.auth),this._opts=Object.assign({},s),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[h(t,"open",this.onopen.bind(this)),h(t,"packet",this.onpacket.bind(this)),h(t,"error",this.onerror.bind(this)),h(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected||(this.subEvents(),this.io._reconnecting||this.io.open(),"open"===this.io._readyState&&this.onopen()),this}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...e){var i,n,o;if(c.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(e.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(e),this;const r={type:s.EVENT,data:e,options:{}};if(r.options.compress=!1!==this.flags.compress,"function"==typeof e[e.length-1]){const t=this.ids++,s=e.pop();this._registerAckCallback(t,s),r.id=t}const h=null===(n=null===(i=this.io.engine)||void 0===i?void 0:i.transport)||void 0===n?void 0:n.writable,a=this.connected&&!(null===(o=this.io.engine)||void 0===o?void 0:o._hasPingExpired());return this.flags.volatile&&!h||(a?(this.notifyOutgoingListeners(r),this.packet(r)):this.sendBuffer.push(r)),this.flags={},this}_registerAckCallback(t,e){var s;const i=null!==(s=this.flags.timeout)&&void 0!==s?s:this._opts.ackTimeout;if(void 0===i)return void(this.acks[t]=e);const n=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let e=0;e<this.sendBuffer.length;e++)this.sendBuffer[e].id===t&&this.sendBuffer.splice(e,1);e.call(this,new Error("operation has timed out"))},i),o=(...t)=>{this.io.clearTimeoutFn(n),e.apply(this,t)};o.withError=!0,this.acks[t]=o}emitWithAck(t,...e){return new Promise((s,i)=>{const n=(t,e)=>t?i(t):s(e);n.withError=!0,e.push(n),this.emit(t,...e)})}_addToQueue(t){let e;"function"==typeof t[t.length-1]&&(e=t.pop());const s={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((t,...i)=>{this._queue[0];return null!==t?s.tryCount>this._opts.retries&&(this._queue.shift(),e&&e(t)):(this._queue.shift(),e&&e(null,...i)),s.pending=!1,this._drainQueue()}),this._queue.push(s),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||0===this._queue.length)return;const e=this._queue[0];e.pending&&!t||(e.pending=!0,e.tryCount++,this.flags=e.flags,this.emit.apply(this,e.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){"function"==typeof this.auth?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:s.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,e){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,e),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(t=>{if(!this.sendBuffer.some(e=>String(e.id)===t)){const e=this.acks[t];delete this.acks[t],e.withError&&e.call(this,new Error("socket has been disconnected"))}})}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case s.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case s.EVENT:case s.BINARY_EVENT:this.onevent(t);break;case s.ACK:case s.BINARY_ACK:this.onack(t);break;case s.DISCONNECT:this.ondisconnect();break;case s.CONNECT_ERROR:this.destroy();const e=new Error(t.data.message);e.data=t.data.data,this.emitReserved("connect_error",e)}}onevent(t){const e=t.data||[];null!=t.id&&e.push(this.ack(t.id)),this.connected?this.emitEvent(e):this.receiveBuffer.push(Object.freeze(e))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const e=this._anyListeners.slice();for(const s of e)s.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&"string"==typeof t[t.length-1]&&(this._lastOffset=t[t.length-1])}ack(t){const e=this;let i=!1;return function(...n){i||(i=!0,e.packet({type:s.ACK,id:t,data:n}))}}onack(t){const e=this.acks[t.id];"function"==typeof e&&(delete this.acks[t.id],e.withError&&t.data.unshift(null),e.apply(this,t.data))}onconnect(t,e){this.id=t,this.recovered=e&&this._pid===e,this._pid=e,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:s.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const e=this._anyListeners;for(let s=0;s<e.length;s++)if(t===e[s])return e.splice(s,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(t),this}prependAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(t),this}offAnyOutgoing(t){if(!this._anyOutgoingListeners)return this;if(t){const e=this._anyOutgoingListeners;for(let s=0;s<e.length;s++)if(t===e[s])return e.splice(s,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(t){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const e=this._anyOutgoingListeners.slice();for(const s of e)s.apply(this,t.data)}}}function u(t){t=t||{},this.ms=t.min||100,this.max=t.max||1e4,this.factor=t.factor||2,this.jitter=t.jitter>0&&t.jitter<=1?t.jitter:0,this.attempts=0}u.prototype.duration=function(){var t=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var e=Math.random(),s=Math.floor(e*this.jitter*t);t=1&Math.floor(10*e)?t+s:t-s}return 0|Math.min(t,this.max)},u.prototype.reset=function(){this.attempts=0},u.prototype.setMin=function(t){this.ms=t},u.prototype.setMax=function(t){this.max=t},u.prototype.setJitter=function(t){this.jitter=t};class d extends e.Emitter{constructor(t,e){var s;super(),this.nsps={},this.subs=[],t&&"object"==typeof t&&(e=t,t=void 0),(e=e||{}).path=e.path||"/socket.io",this.opts=e,i(this,e),this.reconnection(!1!==e.reconnection),this.reconnectionAttempts(e.reconnectionAttempts||1/0),this.reconnectionDelay(e.reconnectionDelay||1e3),this.reconnectionDelayMax(e.reconnectionDelayMax||5e3),this.randomizationFactor(null!==(s=e.randomizationFactor)&&void 0!==s?s:.5),this.backoff=new u({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(null==e.timeout?2e4:e.timeout),this._readyState="closed",this.uri=t;const o=e.parser||n;this.encoder=new o.Encoder,this.decoder=new o.Decoder,this._autoConnect=!1!==e.autoConnect,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,t||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(t){return void 0===t?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var e;return void 0===t?this._reconnectionDelay:(this._reconnectionDelay=t,null===(e=this.backoff)||void 0===e||e.setMin(t),this)}randomizationFactor(t){var e;return void 0===t?this._randomizationFactor:(this._randomizationFactor=t,null===(e=this.backoff)||void 0===e||e.setJitter(t),this)}reconnectionDelayMax(t){var e;return void 0===t?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,null===(e=this.backoff)||void 0===e||e.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&0===this.backoff.attempts&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new o(this.uri,this.opts);const e=this.engine,s=this;this._readyState="opening",this.skipReconnect=!1;const i=h(e,"open",function(){s.onopen(),t&&t()}),n=e=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",e),t?t(e):this.maybeReconnectOnOpen()},r=h(e,"error",n);if(!1!==this._timeout){const t=this._timeout,s=this.setTimeoutFn(()=>{i(),n(new Error("timeout")),e.close()},t);this.opts.autoUnref&&s.unref(),this.subs.push(()=>{this.clearTimeoutFn(s)})}return this.subs.push(i),this.subs.push(r),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(h(t,"ping",this.onping.bind(this)),h(t,"data",this.ondata.bind(this)),h(t,"error",this.onerror.bind(this)),h(t,"close",this.onclose.bind(this)),h(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(t){this.onclose("parse error",t)}}ondecoded(t){r(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,e){let s=this.nsps[t];return s?this._autoConnect&&!s.active&&s.connect():(s=new a(this,t,e),this.nsps[t]=s),s}_destroy(t){const e=Object.keys(this.nsps);for(const t of e){if(this.nsps[t].active)return}this._close()}_packet(t){const e=this.encoder.encode(t);for(let s=0;s<e.length;s++)this.engine.write(e[s],t.options)}cleanup(){this.subs.forEach(t=>t()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(t,e){var s;this.cleanup(),null===(s=this.engine)||void 0===s||s.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,e),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const e=this.backoff.duration();this._reconnecting=!0;const s=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),t.skipReconnect||t.open(e=>{e?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",e)):t.onreconnect()}))},e);this.opts.autoUnref&&s.unref(),this.subs.push(()=>{this.clearTimeoutFn(s)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const p={};function f(e,s){"object"==typeof e&&(s=e,e=void 0);const i=function(e,s="",i){let n=e;i=i||"undefined"!=typeof location&&location,null==e&&(e=i.protocol+"//"+i.host),"string"==typeof e&&("/"===e.charAt(0)&&(e="/"===e.charAt(1)?i.protocol+e:i.host+e),/^(https?|wss?):\/\//.test(e)||(e=void 0!==i?i.protocol+"//"+e:"https://"+e),n=t(e)),n.port||(/^(http|ws)$/.test(n.protocol)?n.port="80":/^(http|ws)s$/.test(n.protocol)&&(n.port="443")),n.path=n.path||"/";const o=-1!==n.host.indexOf(":")?"["+n.host+"]":n.host;return n.id=n.protocol+"://"+o+":"+n.port+s,n.href=n.protocol+"://"+o+(i&&i.port===n.port?"":":"+n.port),n}(e,(s=s||{}).path||"/socket.io"),n=i.source,o=i.id,r=i.path,h=p[o]&&r in p[o].nsps;let c;return s.forceNew||s["force new connection"]||!1===s.multiplex||h?c=new d(n,s):(p[o]||(p[o]=new d(n,s)),c=p[o]),i.query&&!s.query&&(s.query=i.queryKey),c.socket(i.path,s)}Object.assign(f,{Manager:d,Socket:a,io:f,connect:f});export{f as l};
|