ERP-admin/build/admin/assets/engine.io-client.81030771.js

2 lines
24 KiB
JavaScript
Raw Normal View History

2024-05-21 15:15:41 +08:00
import{n as w}from"./@babel.16688d44.js";import{r as H}from"./engine.io-parser.c748e159.js";import{r as z}from"./@socket.io.77accf6a.js";import{r as F}from"./debug.b392f131.js";var N={},O={},x={},q={},P={},T={},C={},$;function A(){return $||($=1,Object.defineProperty(C,"__esModule",{value:!0}),C.globalThisShim=void 0,C.globalThisShim=(()=>typeof self<"u"?self:typeof window<"u"?window:Function("return this")())()),C}var G;function U(){if(G)return T;G=1,Object.defineProperty(T,"__esModule",{value:!0}),T.byteLength=T.installTimerFunctions=T.pick=void 0;const o=A();function b(n,...r){return r.reduce((s,i)=>(n.hasOwnProperty(i)&&(s[i]=n[i]),s),{})}T.pick=b;const d=o.globalThisShim.setTimeout,m=o.globalThisShim.clearTimeout;function u(n,r){r.useNativeTimers?(n.setTimeoutFn=d.bind(o.globalThisShim),n.clearTimeoutFn=m.bind(o.globalThisShim)):(n.setTimeoutFn=o.globalThisShim.setTimeout.bind(o.globalThisShim),n.clearTimeoutFn=o.globalThisShim.clearTimeout.bind(o.globalThisShim))}T.installTimerFunctions=u;const h=1.33;function y(n){return typeof n=="string"?f(n):Math.ceil((n.byteLength||n.size)*h)}T.byteLength=y;function f(n){let r=0,s=0;for(let i=0,e=n.length;i<e;i++)r=n.charCodeAt(i),r<128?s+=1:r<2048?s+=2:r<55296||r>=57344?s+=3:(i++,s+=4);return s}return T}var R={},V;function ce(){if(V)return R;V=1,Object.defineProperty(R,"__esModule",{value:!0}),R.decode=R.encode=void 0;function o(d){let m="";for(let u in d)d.hasOwnProperty(u)&&(m.length&&(m+="&"),m+=encodeURIComponent(u)+"="+encodeURIComponent(d[u]));return m}R.encode=o;function b(d){let m={},u=d.split("&");for(let h=0,y=u.length;h<y;h++){let f=u[h].split("=");m[decodeURIComponent(f[0])]=decodeURIComponent(f[1])}return m}return R.decode=b,R}var K;function I(){if(K)return P;K=1;var o=w&&w.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(P,"__esModule",{value:!0}),P.Transport=P.TransportError=void 0;const b=H(),d=z,m=U(),u=o(F()),h=ce(),y=(0,u.default)("engine.io-client:transport");class f extends Error{constructor(s,i,e){super(s),this.description=i,this.context=e,this.type="TransportError"}}P.TransportError=f;class n extends d.Emitter{constructor(s){super(),this.writable=!1,(0,m.installTimerFunctions)(this,s),this.opts=s,this.query=s.query,this.socket=s.socket}onError(s,i,e){return super.emitReserved("error",new f(s,i,e)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(s){this.readyState==="open"?this.write(s):y("transport is not open, discarding packets")}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(s){const i=(0,b.decodePacket)(s,this.socket.binaryType);this.onPacket(i)}onPacket(s){super.emitReserved("packet",s)}onClose(s){this.readyState="closed",super.emitReserved("close",s)}pause(s){}createUri(s,i={}){return s+"://"+this._hostname()+this._port()+this.opts.path+this._query(i)}_hostname(){const s=this.opts.hostname;return s.indexOf(":")===-1?s:"["+s+"]"}_port(){return this.opts.port&&(this.opts.secure&&Number(this.opts.port!==443)||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(s){const i=(0,h.encode)(s);return i.length?"?"+i:""}}return P.Transport=n,P}var k={},Y;function he(){if(Y)return k;Y=1,Object.defineProperty(k,"__esModule",{value:!0}),k.yeast=k.decode=k.encode=void 0;const o="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),b=64,d={};let m=0,u=0,h;function y(r){let s="";do s=o[r%b]+s,r=Math.floor(r/b);while(r>0);return s}k.encode=y;function f(r){let s=0;for(u=0;u<r.length;u++)s=s*b+d[r.charAt(u)];return s}k.decode=f;function n(){const r=y(+new Date);return r!==h?(m=0,h=r):r+"."+y(m++)}for(k.yeast=n;u<b;u++)d[o[u]]=u;return k}var E={},L={},Q;function pe(){if(Q)return L;Q=1,Object.defineProperty(L,"__esModule",{value:!0}),L.hasCORS=void 0;let o=!1;try{o=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}return L.hasCORS=o,L}var Z;function de(){if(Z)return E;Z=1,Object.defineProperty(E,"_