moreShopAdmin/build/admin/assets/engine.io-parser.4305f785.js

2 lines
5.2 KiB
JavaScript
Raw Normal View History

2024-11-18 16:19:56 +08:00
var C={},g={},h={},S;function m(){if(S)return h;S=1,Object.defineProperty(h,"__esModule",{value:!0}),h.ERROR_PACKET=h.PACKET_TYPES_REVERSE=h.PACKET_TYPES=void 0;const e=Object.create(null);h.PACKET_TYPES=e,e.open="0",e.close="1",e.ping="2",e.pong="3",e.message="4",e.upgrade="5",e.noop="6";const l=Object.create(null);h.PACKET_TYPES_REVERSE=l,Object.keys(e).forEach(_=>{l[e[_]]=_});const b={type:"error",data:"parser error"};return h.ERROR_PACKET=b,h}var O;function K(){if(O)return g;O=1,Object.defineProperty(g,"__esModule",{value:!0}),g.encodePacket=void 0,g.encodePacketToBinary=o;const e=m(),l=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",b=typeof ArrayBuffer=="function",_=n=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(n):n&&n.buffer instanceof ArrayBuffer,a=({type:n,data:s},P,t)=>l&&s instanceof Blob?P?t(s):d(s,t):b&&(s instanceof ArrayBuffer||_(s))?P?t(s):d(new Blob([s]),t):t(e.PACKET_TYPES[n]+(s||""));g.encodePacket=a;const d=(n,s)=>{const P=new FileReader;return P.onload=function(){const t=P.result.split(",")[1];s("b"+(t||""))},P.readAsDataURL(n)};function r(n){return n instanceof Uint8Array?n:n instanceof ArrayBuffer?new Uint8Array(n):new Uint8Array(n.buffer,n.byteOffset,n.byteLength)}let u;function o(n,s){if(l&&n.data instanceof Blob)return n.data.arrayBuffer().then(r).then(s);if(b&&(n.data instanceof ArrayBuffer||_(n.data)))return s(r(n.data));a(n,!1,P=>{u||(u=new TextEncoder),s(u.encode(P))})}return g}var T={},w={},j;function q(){if(j)return w;j=1,Object.defineProperty(w,"__esModule",{value:!0}),w.decode=w.encode=void 0;const e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",l=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let a=0;a<e.length;a++)l[e.charCodeAt(a)]=a;const b=a=>{let d=new Uint8Array(a),r,u=d.length,o="";for(r=0;r<u;r+=3)o+=e[d[r]>>2],o+=e[(d[r]&3)<<4|d[r+1]>>4],o+=e[(d[r+1]&15)<<2|d[r+2]>>6],o+=e[d[r+2]&63];return u%3===2?o=o.substring(0,o.length-1)+"=":u%3===1&&(o=o.substring(0,o.length-2)+"=="),o};w.encode=b;const _=a=>{let d=a.length*.75,r=a.length,u,o=0,n,s,P,t;a[a.length-1]==="="&&(d--,a[a.length-2]==="="&&d--);const y=new ArrayBuffer(d),f=new Uint8Array(y);for(u=0;u<r;u+=4)n=l[a.charCodeAt(u)],s=l[a.charCodeAt(u+1)],P=l[a.charCodeAt(u+2)],t=l[a.charCodeAt(u+3)],f[o++]=n<<2|s>>4,f[o++]=(s&15)<<4|P>>2,f[o++]=(P&3)<<6|t&63;return y};return w.decode=_,w}var U;function D(){if(U)return T;U=1,Object.defineProperty(T,"__esModule",{value:!0}),T.decodePacket=void 0;const e=m(),l=q(),b=typeof ArrayBuffer=="function",_=(r,u)=>{if(typeof r!="string")return{type:"message",data:d(r,u)};const o=r.charAt(0);return o==="b"?{type:"message",data:a(r.substring(1),u)}:e.PACKET_TYPES_REVERSE[o]?r.length>1?{type:e.PACKET_TYPES_REVERSE[o],data:r.substring(1)}:{type:e.PACKET_TYPES_REVERSE[o]}:e.ERROR_PACKET};T.decodePacket=_;const a=(r,u)=>{if(b){const o=(0,l.decode)(r);return d(o,u)}else return{base64:!0,data:r}},d=(r,u)=>{switch(u){case"blob":return r instanceof Blob?r:new Blob([r]);case"arraybuffer":default:return r instanceof ArrayBuffer?r:r.buffer}};return T}var k;function V(){return k||(k=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.decodePayload=e.decodePacket=e.encodePayload=e.encodePacket=e.protocol=void 0,e.createPacketEncoderStream=u,e.createPacketDecoderStream=P;const l=K();Object.defineProperty(e,"encodePacket",{enumerable:!0,get:function(){return l.encodePacket}});const b=D();Object.defineProperty(e,"decodePacket",{enumerable:!0,get:function(){return b.decodePacket}});const _=m(),a=String.fromCharCode(30),d=(t,y)=>{const f=t.length,i=new Array(f);let c=0;t.forEach((E,B)=>{(0,l.encodePacket)(E,!1,R=>{i[B]=R,++c===f&&y(i.join(a))})})};e.encodePayload=d;const r=(t,y)=>{const f=t.split(a),i=[];for(let c=0;c<f.length;c++){const E=(0,b.decodePacket)(f[c],y);if(i.push(E),E.type==="error")break}return i};e.decodePayload=r;function u(){return new TransformStream({transform(t,y){(0,l.encodePacketToBinary)(t,f=>{const i=f.length;let c;if(i<126)c=new Uint8Array(1),new DataView(c.buffer).setUint8(0,i);el