UNPKG

mqtt

Version:

A library for the MQTT protocol

2 lines 311 kB
var fs=Object.defineProperty;var Dg=Object.getOwnPropertyDescriptor;var jg=Object.getOwnPropertyNames;var Fg=Object.prototype.hasOwnProperty;var Ae=(t,e)=>()=>(t&&(e=t(t=0)),e);var O=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Ar=(t,e)=>{for(var r in e)fs(t,r,{get:e[r],enumerable:!0})},Wg=(t,e,r,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of jg(e))!Fg.call(t,n)&&n!==r&&fs(t,n,{get:()=>e[n],enumerable:!(i=Dg(e,n))||i.enumerable});return t};var Q=t=>Wg(fs({},"__esModule",{value:!0}),t);var _=Ae(()=>{});var R={};Ar(R,{_debugEnd:()=>lu,_debugProcess:()=>au,_events:()=>Au,_eventsCount:()=>Iu,_exiting:()=>Wl,_fatalExceptions:()=>iu,_getActiveHandles:()=>zl,_getActiveRequests:()=>Vl,_kill:()=>Gl,_linkedBinding:()=>jl,_maxListeners:()=>Su,_preload_modules:()=>mu,_rawDebug:()=>Nl,_startProfilerIdleNotifier:()=>uu,_stopProfilerIdleNotifier:()=>cu,_tickCallback:()=>ou,abort:()=>pu,addListener:()=>Tu,allowedNodeEnvironmentFlags:()=>eu,arch:()=>Il,argv:()=>Cl,argv0:()=>_u,assert:()=>tu,binding:()=>Ol,chdir:()=>ql,config:()=>$l,cpuUsage:()=>Di,cwd:()=>Ll,debugPort:()=>wu,default:()=>Lu,dlopen:()=>Hl,domain:()=>Fl,emit:()=>Bu,emitWarning:()=>xl,env:()=>Rl,execArgv:()=>Pl,execPath:()=>yu,exit:()=>Xl,features:()=>ru,hasUncaughtExceptionCaptureCallback:()=>su,hrtime:()=>Ni,kill:()=>Jl,listeners:()=>Mu,memoryUsage:()=>Yl,moduleLoadList:()=>Dl,nextTick:()=>El,off:()=>Cu,on:()=>gt,once:()=>Ru,openStdin:()=>Zl,pid:()=>gu,platform:()=>Tl,ppid:()=>bu,prependListener:()=>xu,prependOnceListener:()=>Ou,reallyExit:()=>Kl,release:()=>Ul,removeAllListeners:()=>ku,removeListener:()=>Pu,resourceUsage:()=>Ql,setSourceMapsEnabled:()=>vu,setUncaughtExceptionCaptureCallback:()=>nu,stderr:()=>hu,stdin:()=>du,stdout:()=>fu,title:()=>Al,umask:()=>Ml,uptime:()=>Eu,version:()=>kl,versions:()=>Bl});function ps(t){throw new Error("Node.js process "+t+" is not supported by JSPM core outside of Node.js")}function $g(){!Ir||!Gt||(Ir=!1,Gt.length?pt=Gt.concat(pt):Ui=-1,pt.length&&vl())}function vl(){if(!Ir){var t=setTimeout($g,0);Ir=!0;for(var e=pt.length;e;){for(Gt=pt,pt=[];++Ui<e;)Gt&&Gt[Ui].run();Ui=-1,e=pt.length}Gt=null,Ir=!1,clearTimeout(t)}}function El(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];pt.push(new Sl(t,e)),pt.length===1&&!Ir&&setTimeout(vl,0)}function Sl(t,e){this.fun=t,this.array=e}function _e(){}function jl(t){ps("_linkedBinding")}function Hl(t){ps("dlopen")}function Vl(){return[]}function zl(){return[]}function tu(t,e){if(!t)throw new Error(e||"assertion error")}function su(){return!1}function Eu(){return kt.now()/1e3}function Ni(t){var e=Math.floor((Date.now()-kt.now())*.001),r=kt.now()*.001,i=Math.floor(r)+e,n=Math.floor(r%1*1e9);return t&&(i=i-t[0],n=n-t[1],n<0&&(i--,n+=ds)),[i,n]}function gt(){return Lu}function Mu(t){return[]}var pt,Ir,Gt,Ui,Al,Il,Tl,Rl,Cl,Pl,kl,Bl,xl,Ol,Ml,Ll,ql,Ul,Nl,Dl,Fl,Wl,$l,Kl,Gl,Di,Ql,Yl,Jl,Xl,Zl,eu,ru,iu,nu,ou,au,lu,uu,cu,fu,hu,du,pu,gu,bu,yu,wu,_u,mu,vu,kt,hs,ds,Su,Au,Iu,Tu,Ru,Cu,Pu,ku,Bu,xu,Ou,Lu,qu=Ae(()=>{_();v();m();pt=[],Ir=!1,Ui=-1;Sl.prototype.run=function(){this.fun.apply(null,this.array)};Al="browser",Il="x64",Tl="browser",Rl={PATH:"/usr/bin",LANG:navigator.language+".UTF-8",PWD:"/",HOME:"/home",TMP:"/tmp"},Cl=["/usr/bin/node"],Pl=[],kl="v16.8.0",Bl={},xl=function(t,e){console.warn((e?e+": ":"")+t)},Ol=function(t){ps("binding")},Ml=function(t){return 0},Ll=function(){return"/"},ql=function(t){},Ul={name:"node",sourceUrl:"",headersUrl:"",libUrl:""};Nl=_e,Dl=[];Fl={},Wl=!1,$l={};Kl=_e,Gl=_e,Di=function(){return{}},Ql=Di,Yl=Di,Jl=_e,Xl=_e,Zl=_e,eu={};ru={inspector:!1,debug:!1,uv:!1,ipv6:!1,tls_alpn:!1,tls_sni:!1,tls_ocsp:!1,tls:!1,cached_builtins:!0},iu=_e,nu=_e;ou=_e,au=_e,lu=_e,uu=_e,cu=_e,fu=void 0,hu=void 0,du=void 0,pu=_e,gu=2,bu=1,yu="/bin/usr/node",wu=9229,_u="node",mu=[],vu=_e,kt={now:typeof performance<"u"?performance.now.bind(performance):void 0,timing:typeof performance<"u"?performance.timing:void 0};kt.now===void 0&&(hs=Date.now(),kt.timing&&kt.timing.navigationStart&&(hs=kt.timing.navigationStart),kt.now=()=>Date.now()-hs);ds=1e9;Ni.bigint=function(t){var e=Ni(t);return typeof BigInt>"u"?e[0]*ds+e[1]:BigInt(e[0]*ds)+BigInt(e[1])};Su=10,Au={},Iu=0;Tu=gt,Ru=gt,Cu=gt,Pu=gt,ku=gt,Bu=_e,xu=gt,Ou=gt;Lu={version:kl,versions:Bl,arch:Il,platform:Tl,release:Ul,_rawDebug:Nl,moduleLoadList:Dl,binding:Ol,_linkedBinding:jl,_events:Au,_eventsCount:Iu,_maxListeners:Su,on:gt,addListener:Tu,once:Ru,off:Cu,removeListener:Pu,removeAllListeners:ku,emit:Bu,prependListener:xu,prependOnceListener:Ou,listeners:Mu,domain:Fl,_exiting:Wl,config:$l,dlopen:Hl,uptime:Eu,_getActiveRequests:Vl,_getActiveHandles:zl,reallyExit:Kl,_kill:Gl,cpuUsage:Di,resourceUsage:Ql,memoryUsage:Yl,kill:Jl,exit:Xl,openStdin:Zl,allowedNodeEnvironmentFlags:eu,assert:tu,features:ru,_fatalExceptions:iu,setUncaughtExceptionCaptureCallback:nu,hasUncaughtExceptionCaptureCallback:su,emitWarning:xl,nextTick:El,_tickCallback:ou,_debugProcess:au,_debugEnd:lu,_startProfilerIdleNotifier:uu,_stopProfilerIdleNotifier:cu,stdout:fu,stdin:du,stderr:hu,abort:pu,umask:Ml,chdir:ql,cwd:Ll,env:Rl,title:Al,argv:Cl,execArgv:Pl,pid:gu,ppid:bu,execPath:yu,debugPort:wu,hrtime:Ni,argv0:_u,_preload_modules:mu,setSourceMapsEnabled:vu}});var m=Ae(()=>{qu()});var ye={};Ar(ye,{Buffer:()=>x,INSPECT_MAX_BYTES:()=>Kg,default:()=>Bt,kMaxLength:()=>Gg});function Hg(){if(Uu)return si;Uu=!0,si.byteLength=a,si.toByteArray=f,si.fromByteArray=g;for(var t=[],e=[],r=typeof Uint8Array<"u"?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n=0,o=i.length;n<o;++n)t[n]=i[n],e[i.charCodeAt(n)]=n;e[45]=62,e[95]=63;function s(b){var E=b.length;if(E%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var w=b.indexOf("=");w===-1&&(w=E);var S=w===E?0:4-w%4;return[w,S]}function a(b){var E=s(b),w=E[0],S=E[1];return(w+S)*3/4-S}function u(b,E,w){return(E+w)*3/4-w}function f(b){var E,w=s(b),S=w[0],I=w[1],C=new r(u(b,S,I)),k=0,M=I>0?S-4:S,q;for(q=0;q<M;q+=4)E=e[b.charCodeAt(q)]<<18|e[b.charCodeAt(q+1)]<<12|e[b.charCodeAt(q+2)]<<6|e[b.charCodeAt(q+3)],C[k++]=E>>16&255,C[k++]=E>>8&255,C[k++]=E&255;return I===2&&(E=e[b.charCodeAt(q)]<<2|e[b.charCodeAt(q+1)]>>4,C[k++]=E&255),I===1&&(E=e[b.charCodeAt(q)]<<10|e[b.charCodeAt(q+1)]<<4|e[b.charCodeAt(q+2)]>>2,C[k++]=E>>8&255,C[k++]=E&255),C}function d(b){return t[b>>18&63]+t[b>>12&63]+t[b>>6&63]+t[b&63]}function h(b,E,w){for(var S,I=[],C=E;C<w;C+=3)S=(b[C]<<16&16711680)+(b[C+1]<<8&65280)+(b[C+2]&255),I.push(d(S));return I.join("")}function g(b){for(var E,w=b.length,S=w%3,I=[],C=16383,k=0,M=w-S;k<M;k+=C)I.push(h(b,k,k+C>M?M:k+C));return S===1?(E=b[w-1],I.push(t[E>>2]+t[E<<4&63]+"==")):S===2&&(E=(b[w-2]<<8)+b[w-1],I.push(t[E>>10]+t[E>>4&63]+t[E<<2&63]+"=")),I.join("")}return si}function Vg(){if(Nu)return ji;Nu=!0;return ji.read=function(t,e,r,i,n){var o,s,a=n*8-i-1,u=(1<<a)-1,f=u>>1,d=-7,h=r?n-1:0,g=r?-1:1,b=t[e+h];for(h+=g,o=b&(1<<-d)-1,b>>=-d,d+=a;d>0;o=o*256+t[e+h],h+=g,d-=8);for(s=o&(1<<-d)-1,o>>=-d,d+=i;d>0;s=s*256+t[e+h],h+=g,d-=8);if(o===0)o=1-f;else{if(o===u)return s?NaN:(b?-1:1)*(1/0);s=s+Math.pow(2,i),o=o-f}return(b?-1:1)*s*Math.pow(2,o-i)},ji.write=function(t,e,r,i,n,o){var s,a,u,f=o*8-n-1,d=(1<<f)-1,h=d>>1,g=n===23?Math.pow(2,-24)-Math.pow(2,-77):0,b=i?0:o-1,E=i?1:-1,w=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=d):(s=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-s))<1&&(s--,u*=2),s+h>=1?e+=g/u:e+=g*Math.pow(2,1-h),e*u>=2&&(s++,u/=2),s+h>=d?(a=0,s=d):s+h>=1?(a=(e*u-1)*Math.pow(2,n),s=s+h):(a=e*Math.pow(2,h-1)*Math.pow(2,n),s=0));n>=8;t[r+b]=a&255,b+=E,a/=256,n-=8);for(s=s<<n|a,f+=n;f>0;t[r+b]=s&255,b+=E,s/=256,f-=8);t[r+b-E]|=w*128},ji}function zg(){if(Du)return Qt;Du=!0;let t=Hg(),e=Vg(),r=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;Qt.Buffer=s,Qt.SlowBuffer=I,Qt.INSPECT_MAX_BYTES=50;let i=2147483647;Qt.kMaxLength=i,s.TYPED_ARRAY_SUPPORT=n(),!s.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function n(){try{let p=new Uint8Array(1),l={foo:function(){return 42}};return Object.setPrototypeOf(l,Uint8Array.prototype),Object.setPrototypeOf(p,l),p.foo()===42}catch{return!1}}Object.defineProperty(s.prototype,"parent",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.buffer}}),Object.defineProperty(s.prototype,"offset",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.byteOffset}});function o(p){if(p>i)throw new RangeError('The value "'+p+'" is invalid for option "size"');let l=new Uint8Array(p);return Object.setPrototypeOf(l,s.prototype),l}function s(p,l,c){if(typeof p=="number"){if(typeof l=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return d(p)}return a(p,l,c)}s.poolSize=8192;function a(p,l,c){if(typeof p=="string")return h(p,l);if(ArrayBuffer.isView(p))return b(p);if(p==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof p);if(Ge(p,ArrayBuffer)||p&&Ge(p.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Ge(p,SharedArrayBuffer)||p&&Ge(p.buffer,SharedArrayBuffer)))return E(p,l,c);if(typeof p=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let y=p.valueOf&&p.valueOf();if(y!=null&&y!==p)return s.from(y,l,c);let A=w(p);if(A)return A;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof p[Symbol.toPrimitive]=="function")return s.from(p[Symbol.toPrimitive]("string"),l,c);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof p)}s.from=function(p,l,c){return a(p,l,c)},Object.setPrototypeOf(s.prototype,Uint8Array.prototype),Object.setPrototypeOf(s,Uint8Array);function u(p){if(typeof p!="number")throw new TypeError('"size" argument must be of type number');if(p<0)throw new RangeError('The value "'+p+'" is invalid for option "size"')}function f(p,l,c){return u(p),p<=0?o(p):l!==void 0?typeof c=="string"?o(p).fill(l,c):o(p).fill(l):o(p)}s.alloc=function(p,l,c){return f(p,l,c)};function d(p){return u(p),o(p<0?0:S(p)|0)}s.allocUnsafe=function(p){return d(p)},s.allocUnsafeSlow=function(p){return d(p)};function h(p,l){if((typeof l!="string"||l==="")&&(l="utf8"),!s.isEncoding(l))throw new TypeError("Unknown encoding: "+l);let c=C(p,l)|0,y=o(c),A=y.write(p,l);return A!==c&&(y=y.slice(0,A)),y}function g(p){let l=p.length<0?0:S(p.length)|0,c=o(l);for(let y=0;y<l;y+=1)c[y]=p[y]&255;return c}function b(p){if(Ge(p,Uint8Array)){let l=new Uint8Array(p);return E(l.buffer,l.byteOffset,l.byteLength)}return g(p)}function E(p,l,c){if(l<0||p.byteLength<l)throw new RangeError('"offset" is outside of buffer bounds');if(p.byteLength<l+(c||0))throw new RangeError('"length" is outside of buffer bounds');let y;return l===void 0&&c===void 0?y=new Uint8Array(p):c===void 0?y=new Uint8Array(p,l):y=new Uint8Array(p,l,c),Object.setPrototypeOf(y,s.prototype),y}function w(p){if(s.isBuffer(p)){let l=S(p.length)|0,c=o(l);return c.length===0||p.copy(c,0,0,l),c}if(p.length!==void 0)return typeof p.length!="number"||cs(p.length)?o(0):g(p);if(p.type==="Buffer"&&Array.isArray(p.data))return g(p.data)}function S(p){if(p>=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return p|0}function I(p){return+p!=p&&(p=0),s.alloc(+p)}s.isBuffer=function(l){return l!=null&&l._isBuffer===!0&&l!==s.prototype},s.compare=function(l,c){if(Ge(l,Uint8Array)&&(l=s.from(l,l.offset,l.byteLength)),Ge(c,Uint8Array)&&(c=s.from(c,c.offset,c.byteLength)),!s.isBuffer(l)||!s.isBuffer(c))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(l===c)return 0;let y=l.length,A=c.length;for(let T=0,P=Math.min(y,A);T<P;++T)if(l[T]!==c[T]){y=l[T],A=c[T];break}return y<A?-1:A<y?1:0},s.isEncoding=function(l){switch(String(l).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},s.concat=function(l,c){if(!Array.isArray(l))throw new TypeError('"list" argument must be an Array of Buffers');if(l.length===0)return s.alloc(0);let y;if(c===void 0)for(c=0,y=0;y<l.length;++y)c+=l[y].length;let A=s.allocUnsafe(c),T=0;for(y=0;y<l.length;++y){let P=l[y];if(Ge(P,Uint8Array))T+P.length>A.length?(s.isBuffer(P)||(P=s.from(P)),P.copy(A,T)):Uint8Array.prototype.set.call(A,P,T);else if(s.isBuffer(P))P.copy(A,T);else throw new TypeError('"list" argument must be an Array of Buffers');T+=P.length}return A};function C(p,l){if(s.isBuffer(p))return p.length;if(ArrayBuffer.isView(p)||Ge(p,ArrayBuffer))return p.byteLength;if(typeof p!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof p);let c=p.length,y=arguments.length>2&&arguments[2]===!0;if(!y&&c===0)return 0;let A=!1;for(;;)switch(l){case"ascii":case"latin1":case"binary":return c;case"utf8":case"utf-8":return us(p).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return c*2;case"hex":return c>>>1;case"base64":return ml(p).length;default:if(A)return y?-1:us(p).length;l=(""+l).toLowerCase(),A=!0}}s.byteLength=C;function k(p,l,c){let y=!1;if((l===void 0||l<0)&&(l=0),l>this.length||((c===void 0||c>this.length)&&(c=this.length),c<=0)||(c>>>=0,l>>>=0,c<=l))return"";for(p||(p="utf8");;)switch(p){case"hex":return kg(this,l,c);case"utf8":case"utf-8":return Se(this,l,c);case"ascii":return as(this,l,c);case"latin1":case"binary":return Pg(this,l,c);case"base64":return Fe(this,l,c);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Bg(this,l,c);default:if(y)throw new TypeError("Unknown encoding: "+p);p=(p+"").toLowerCase(),y=!0}}s.prototype._isBuffer=!0;function M(p,l,c){let y=p[l];p[l]=p[c],p[c]=y}s.prototype.swap16=function(){let l=this.length;if(l%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let c=0;c<l;c+=2)M(this,c,c+1);return this},s.prototype.swap32=function(){let l=this.length;if(l%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let c=0;c<l;c+=4)M(this,c,c+3),M(this,c+1,c+2);return this},s.prototype.swap64=function(){let l=this.length;if(l%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let c=0;c<l;c+=8)M(this,c,c+7),M(this,c+1,c+6),M(this,c+2,c+5),M(this,c+3,c+4);return this},s.prototype.toString=function(){let l=this.length;return l===0?"":arguments.length===0?Se(this,0,l):k.apply(this,arguments)},s.prototype.toLocaleString=s.prototype.toString,s.prototype.equals=function(l){if(!s.isBuffer(l))throw new TypeError("Argument must be a Buffer");return this===l?!0:s.compare(this,l)===0},s.prototype.inspect=function(){let l="",c=Qt.INSPECT_MAX_BYTES;return l=this.toString("hex",0,c).replace(/(.{2})/g,"$1 ").trim(),this.length>c&&(l+=" ... "),"<Buffer "+l+">"},r&&(s.prototype[r]=s.prototype.inspect),s.prototype.compare=function(l,c,y,A,T){if(Ge(l,Uint8Array)&&(l=s.from(l,l.offset,l.byteLength)),!s.isBuffer(l))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof l);if(c===void 0&&(c=0),y===void 0&&(y=l?l.length:0),A===void 0&&(A=0),T===void 0&&(T=this.length),c<0||y>l.length||A<0||T>this.length)throw new RangeError("out of range index");if(A>=T&&c>=y)return 0;if(A>=T)return-1;if(c>=y)return 1;if(c>>>=0,y>>>=0,A>>>=0,T>>>=0,this===l)return 0;let P=T-A,W=y-c,ae=Math.min(P,W),re=this.slice(A,T),le=l.slice(c,y);for(let J=0;J<ae;++J)if(re[J]!==le[J]){P=re[J],W=le[J];break}return P<W?-1:W<P?1:0};function q(p,l,c,y,A){if(p.length===0)return-1;if(typeof c=="string"?(y=c,c=0):c>2147483647?c=2147483647:c<-2147483648&&(c=-2147483648),c=+c,cs(c)&&(c=A?0:p.length-1),c<0&&(c=p.length+c),c>=p.length){if(A)return-1;c=p.length-1}else if(c<0)if(A)c=0;else return-1;if(typeof l=="string"&&(l=s.from(l,y)),s.isBuffer(l))return l.length===0?-1:G(p,l,c,y,A);if(typeof l=="number")return l=l&255,typeof Uint8Array.prototype.indexOf=="function"?A?Uint8Array.prototype.indexOf.call(p,l,c):Uint8Array.prototype.lastIndexOf.call(p,l,c):G(p,[l],c,y,A);throw new TypeError("val must be string, number or Buffer")}function G(p,l,c,y,A){let T=1,P=p.length,W=l.length;if(y!==void 0&&(y=String(y).toLowerCase(),y==="ucs2"||y==="ucs-2"||y==="utf16le"||y==="utf-16le")){if(p.length<2||l.length<2)return-1;T=2,P/=2,W/=2,c/=2}function ae(le,J){return T===1?le[J]:le.readUInt16BE(J*T)}let re;if(A){let le=-1;for(re=c;re<P;re++)if(ae(p,re)===ae(l,le===-1?0:re-le)){if(le===-1&&(le=re),re-le+1===W)return le*T}else le!==-1&&(re-=re-le),le=-1}else for(c+W>P&&(c=P-W),re=c;re>=0;re--){let le=!0;for(let J=0;J<W;J++)if(ae(p,re+J)!==ae(l,J)){le=!1;break}if(le)return re}return-1}s.prototype.includes=function(l,c,y){return this.indexOf(l,c,y)!==-1},s.prototype.indexOf=function(l,c,y){return q(this,l,c,y,!0)},s.prototype.lastIndexOf=function(l,c,y){return q(this,l,c,y,!1)};function F(p,l,c,y){c=Number(c)||0;let A=p.length-c;y?(y=Number(y),y>A&&(y=A)):y=A;let T=l.length;y>T/2&&(y=T/2);let P;for(P=0;P<y;++P){let W=parseInt(l.substr(P*2,2),16);if(cs(W))return P;p[c+P]=W}return P}function K(p,l,c,y){return qi(us(l,p.length-c),p,c,y)}function $(p,l,c,y){return qi(Lg(l),p,c,y)}function te(p,l,c,y){return qi(ml(l),p,c,y)}function dt(p,l,c,y){return qi(qg(l,p.length-c),p,c,y)}s.prototype.write=function(l,c,y,A){if(c===void 0)A="utf8",y=this.length,c=0;else if(y===void 0&&typeof c=="string")A=c,y=this.length,c=0;else if(isFinite(c))c=c>>>0,isFinite(y)?(y=y>>>0,A===void 0&&(A="utf8")):(A=y,y=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let T=this.length-c;if((y===void 0||y>T)&&(y=T),l.length>0&&(y<0||c<0)||c>this.length)throw new RangeError("Attempt to write outside buffer bounds");A||(A="utf8");let P=!1;for(;;)switch(A){case"hex":return F(this,l,c,y);case"utf8":case"utf-8":return K(this,l,c,y);case"ascii":case"latin1":case"binary":return $(this,l,c,y);case"base64":return te(this,l,c,y);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return dt(this,l,c,y);default:if(P)throw new TypeError("Unknown encoding: "+A);A=(""+A).toLowerCase(),P=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Fe(p,l,c){return l===0&&c===p.length?t.fromByteArray(p):t.fromByteArray(p.slice(l,c))}function Se(p,l,c){c=Math.min(p.length,c);let y=[],A=l;for(;A<c;){let T=p[A],P=null,W=T>239?4:T>223?3:T>191?2:1;if(A+W<=c){let ae,re,le,J;switch(W){case 1:T<128&&(P=T);break;case 2:ae=p[A+1],(ae&192)===128&&(J=(T&31)<<6|ae&63,J>127&&(P=J));break;case 3:ae=p[A+1],re=p[A+2],(ae&192)===128&&(re&192)===128&&(J=(T&15)<<12|(ae&63)<<6|re&63,J>2047&&(J<55296||J>57343)&&(P=J));break;case 4:ae=p[A+1],re=p[A+2],le=p[A+3],(ae&192)===128&&(re&192)===128&&(le&192)===128&&(J=(T&15)<<18|(ae&63)<<12|(re&63)<<6|le&63,J>65535&&J<1114112&&(P=J))}}P===null?(P=65533,W=1):P>65535&&(P-=65536,y.push(P>>>10&1023|55296),P=56320|P&1023),y.push(P),A+=W}return vr(y)}let mr=4096;function vr(p){let l=p.length;if(l<=mr)return String.fromCharCode.apply(String,p);let c="",y=0;for(;y<l;)c+=String.fromCharCode.apply(String,p.slice(y,y+=mr));return c}function as(p,l,c){let y="";c=Math.min(p.length,c);for(let A=l;A<c;++A)y+=String.fromCharCode(p[A]&127);return y}function Pg(p,l,c){let y="";c=Math.min(p.length,c);for(let A=l;A<c;++A)y+=String.fromCharCode(p[A]);return y}function kg(p,l,c){let y=p.length;(!l||l<0)&&(l=0),(!c||c<0||c>y)&&(c=y);let A="";for(let T=l;T<c;++T)A+=Ug[p[T]];return A}function Bg(p,l,c){let y=p.slice(l,c),A="";for(let T=0;T<y.length-1;T+=2)A+=String.fromCharCode(y[T]+y[T+1]*256);return A}s.prototype.slice=function(l,c){let y=this.length;l=~~l,c=c===void 0?y:~~c,l<0?(l+=y,l<0&&(l=0)):l>y&&(l=y),c<0?(c+=y,c<0&&(c=0)):c>y&&(c=y),c<l&&(c=l);let A=this.subarray(l,c);return Object.setPrototypeOf(A,s.prototype),A};function be(p,l,c){if(p%1!==0||p<0)throw new RangeError("offset is not uint");if(p+l>c)throw new RangeError("Trying to access beyond buffer length")}s.prototype.readUintLE=s.prototype.readUIntLE=function(l,c,y){l=l>>>0,c=c>>>0,y||be(l,c,this.length);let A=this[l],T=1,P=0;for(;++P<c&&(T*=256);)A+=this[l+P]*T;return A},s.prototype.readUintBE=s.prototype.readUIntBE=function(l,c,y){l=l>>>0,c=c>>>0,y||be(l,c,this.length);let A=this[l+--c],T=1;for(;c>0&&(T*=256);)A+=this[l+--c]*T;return A},s.prototype.readUint8=s.prototype.readUInt8=function(l,c){return l=l>>>0,c||be(l,1,this.length),this[l]},s.prototype.readUint16LE=s.prototype.readUInt16LE=function(l,c){return l=l>>>0,c||be(l,2,this.length),this[l]|this[l+1]<<8},s.prototype.readUint16BE=s.prototype.readUInt16BE=function(l,c){return l=l>>>0,c||be(l,2,this.length),this[l]<<8|this[l+1]},s.prototype.readUint32LE=s.prototype.readUInt32LE=function(l,c){return l=l>>>0,c||be(l,4,this.length),(this[l]|this[l+1]<<8|this[l+2]<<16)+this[l+3]*16777216},s.prototype.readUint32BE=s.prototype.readUInt32BE=function(l,c){return l=l>>>0,c||be(l,4,this.length),this[l]*16777216+(this[l+1]<<16|this[l+2]<<8|this[l+3])},s.prototype.readBigUInt64LE=Pt(function(l){l=l>>>0,Sr(l,"offset");let c=this[l],y=this[l+7];(c===void 0||y===void 0)&&ni(l,this.length-8);let A=c+this[++l]*2**8+this[++l]*2**16+this[++l]*2**24,T=this[++l]+this[++l]*2**8+this[++l]*2**16+y*2**24;return BigInt(A)+(BigInt(T)<<BigInt(32))}),s.prototype.readBigUInt64BE=Pt(function(l){l=l>>>0,Sr(l,"offset");let c=this[l],y=this[l+7];(c===void 0||y===void 0)&&ni(l,this.length-8);let A=c*2**24+this[++l]*2**16+this[++l]*2**8+this[++l],T=this[++l]*2**24+this[++l]*2**16+this[++l]*2**8+y;return(BigInt(A)<<BigInt(32))+BigInt(T)}),s.prototype.readIntLE=function(l,c,y){l=l>>>0,c=c>>>0,y||be(l,c,this.length);let A=this[l],T=1,P=0;for(;++P<c&&(T*=256);)A+=this[l+P]*T;return T*=128,A>=T&&(A-=Math.pow(2,8*c)),A},s.prototype.readIntBE=function(l,c,y){l=l>>>0,c=c>>>0,y||be(l,c,this.length);let A=c,T=1,P=this[l+--A];for(;A>0&&(T*=256);)P+=this[l+--A]*T;return T*=128,P>=T&&(P-=Math.pow(2,8*c)),P},s.prototype.readInt8=function(l,c){return l=l>>>0,c||be(l,1,this.length),this[l]&128?(255-this[l]+1)*-1:this[l]},s.prototype.readInt16LE=function(l,c){l=l>>>0,c||be(l,2,this.length);let y=this[l]|this[l+1]<<8;return y&32768?y|4294901760:y},s.prototype.readInt16BE=function(l,c){l=l>>>0,c||be(l,2,this.length);let y=this[l+1]|this[l]<<8;return y&32768?y|4294901760:y},s.prototype.readInt32LE=function(l,c){return l=l>>>0,c||be(l,4,this.length),this[l]|this[l+1]<<8|this[l+2]<<16|this[l+3]<<24},s.prototype.readInt32BE=function(l,c){return l=l>>>0,c||be(l,4,this.length),this[l]<<24|this[l+1]<<16|this[l+2]<<8|this[l+3]},s.prototype.readBigInt64LE=Pt(function(l){l=l>>>0,Sr(l,"offset");let c=this[l],y=this[l+7];(c===void 0||y===void 0)&&ni(l,this.length-8);let A=this[l+4]+this[l+5]*2**8+this[l+6]*2**16+(y<<24);return(BigInt(A)<<BigInt(32))+BigInt(c+this[++l]*2**8+this[++l]*2**16+this[++l]*2**24)}),s.prototype.readBigInt64BE=Pt(function(l){l=l>>>0,Sr(l,"offset");let c=this[l],y=this[l+7];(c===void 0||y===void 0)&&ni(l,this.length-8);let A=(c<<24)+this[++l]*2**16+this[++l]*2**8+this[++l];return(BigInt(A)<<BigInt(32))+BigInt(this[++l]*2**24+this[++l]*2**16+this[++l]*2**8+y)}),s.prototype.readFloatLE=function(l,c){return l=l>>>0,c||be(l,4,this.length),e.read(this,l,!0,23,4)},s.prototype.readFloatBE=function(l,c){return l=l>>>0,c||be(l,4,this.length),e.read(this,l,!1,23,4)},s.prototype.readDoubleLE=function(l,c){return l=l>>>0,c||be(l,8,this.length),e.read(this,l,!0,52,8)},s.prototype.readDoubleBE=function(l,c){return l=l>>>0,c||be(l,8,this.length),e.read(this,l,!1,52,8)};function Ce(p,l,c,y,A,T){if(!s.isBuffer(p))throw new TypeError('"buffer" argument must be a Buffer instance');if(l>A||l<T)throw new RangeError('"value" argument is out of bounds');if(c+y>p.length)throw new RangeError("Index out of range")}s.prototype.writeUintLE=s.prototype.writeUIntLE=function(l,c,y,A){if(l=+l,c=c>>>0,y=y>>>0,!A){let W=Math.pow(2,8*y)-1;Ce(this,l,c,y,W,0)}let T=1,P=0;for(this[c]=l&255;++P<y&&(T*=256);)this[c+P]=l/T&255;return c+y},s.prototype.writeUintBE=s.prototype.writeUIntBE=function(l,c,y,A){if(l=+l,c=c>>>0,y=y>>>0,!A){let W=Math.pow(2,8*y)-1;Ce(this,l,c,y,W,0)}let T=y-1,P=1;for(this[c+T]=l&255;--T>=0&&(P*=256);)this[c+T]=l/P&255;return c+y},s.prototype.writeUint8=s.prototype.writeUInt8=function(l,c,y){return l=+l,c=c>>>0,y||Ce(this,l,c,1,255,0),this[c]=l&255,c+1},s.prototype.writeUint16LE=s.prototype.writeUInt16LE=function(l,c,y){return l=+l,c=c>>>0,y||Ce(this,l,c,2,65535,0),this[c]=l&255,this[c+1]=l>>>8,c+2},s.prototype.writeUint16BE=s.prototype.writeUInt16BE=function(l,c,y){return l=+l,c=c>>>0,y||Ce(this,l,c,2,65535,0),this[c]=l>>>8,this[c+1]=l&255,c+2},s.prototype.writeUint32LE=s.prototype.writeUInt32LE=function(l,c,y){return l=+l,c=c>>>0,y||Ce(this,l,c,4,4294967295,0),this[c+3]=l>>>24,this[c+2]=l>>>16,this[c+1]=l>>>8,this[c]=l&255,c+4},s.prototype.writeUint32BE=s.prototype.writeUInt32BE=function(l,c,y){return l=+l,c=c>>>0,y||Ce(this,l,c,4,4294967295,0),this[c]=l>>>24,this[c+1]=l>>>16,this[c+2]=l>>>8,this[c+3]=l&255,c+4};function dl(p,l,c,y,A){_l(l,y,A,p,c,7);let T=Number(l&BigInt(4294967295));p[c++]=T,T=T>>8,p[c++]=T,T=T>>8,p[c++]=T,T=T>>8,p[c++]=T;let P=Number(l>>BigInt(32)&BigInt(4294967295));return p[c++]=P,P=P>>8,p[c++]=P,P=P>>8,p[c++]=P,P=P>>8,p[c++]=P,c}function pl(p,l,c,y,A){_l(l,y,A,p,c,7);let T=Number(l&BigInt(4294967295));p[c+7]=T,T=T>>8,p[c+6]=T,T=T>>8,p[c+5]=T,T=T>>8,p[c+4]=T;let P=Number(l>>BigInt(32)&BigInt(4294967295));return p[c+3]=P,P=P>>8,p[c+2]=P,P=P>>8,p[c+1]=P,P=P>>8,p[c]=P,c+8}s.prototype.writeBigUInt64LE=Pt(function(l,c=0){return dl(this,l,c,BigInt(0),BigInt("0xffffffffffffffff"))}),s.prototype.writeBigUInt64BE=Pt(function(l,c=0){return pl(this,l,c,BigInt(0),BigInt("0xffffffffffffffff"))}),s.prototype.writeIntLE=function(l,c,y,A){if(l=+l,c=c>>>0,!A){let ae=Math.pow(2,8*y-1);Ce(this,l,c,y,ae-1,-ae)}let T=0,P=1,W=0;for(this[c]=l&255;++T<y&&(P*=256);)l<0&&W===0&&this[c+T-1]!==0&&(W=1),this[c+T]=(l/P>>0)-W&255;return c+y},s.prototype.writeIntBE=function(l,c,y,A){if(l=+l,c=c>>>0,!A){let ae=Math.pow(2,8*y-1);Ce(this,l,c,y,ae-1,-ae)}let T=y-1,P=1,W=0;for(this[c+T]=l&255;--T>=0&&(P*=256);)l<0&&W===0&&this[c+T+1]!==0&&(W=1),this[c+T]=(l/P>>0)-W&255;return c+y},s.prototype.writeInt8=function(l,c,y){return l=+l,c=c>>>0,y||Ce(this,l,c,1,127,-128),l<0&&(l=255+l+1),this[c]=l&255,c+1},s.prototype.writeInt16LE=function(l,c,y){return l=+l,c=c>>>0,y||Ce(this,l,c,2,32767,-32768),this[c]=l&255,this[c+1]=l>>>8,c+2},s.prototype.writeInt16BE=function(l,c,y){return l=+l,c=c>>>0,y||Ce(this,l,c,2,32767,-32768),this[c]=l>>>8,this[c+1]=l&255,c+2},s.prototype.writeInt32LE=function(l,c,y){return l=+l,c=c>>>0,y||Ce(this,l,c,4,2147483647,-2147483648),this[c]=l&255,this[c+1]=l>>>8,this[c+2]=l>>>16,this[c+3]=l>>>24,c+4},s.prototype.writeInt32BE=function(l,c,y){return l=+l,c=c>>>0,y||Ce(this,l,c,4,2147483647,-2147483648),l<0&&(l=4294967295+l+1),this[c]=l>>>24,this[c+1]=l>>>16,this[c+2]=l>>>8,this[c+3]=l&255,c+4},s.prototype.writeBigInt64LE=Pt(function(l,c=0){return dl(this,l,c,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),s.prototype.writeBigInt64BE=Pt(function(l,c=0){return pl(this,l,c,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function gl(p,l,c,y,A,T){if(c+y>p.length)throw new RangeError("Index out of range");if(c<0)throw new RangeError("Index out of range")}function bl(p,l,c,y,A){return l=+l,c=c>>>0,A||gl(p,l,c,4),e.write(p,l,c,y,23,4),c+4}s.prototype.writeFloatLE=function(l,c,y){return bl(this,l,c,!0,y)},s.prototype.writeFloatBE=function(l,c,y){return bl(this,l,c,!1,y)};function yl(p,l,c,y,A){return l=+l,c=c>>>0,A||gl(p,l,c,8),e.write(p,l,c,y,52,8),c+8}s.prototype.writeDoubleLE=function(l,c,y){return yl(this,l,c,!0,y)},s.prototype.writeDoubleBE=function(l,c,y){return yl(this,l,c,!1,y)},s.prototype.copy=function(l,c,y,A){if(!s.isBuffer(l))throw new TypeError("argument should be a Buffer");if(y||(y=0),!A&&A!==0&&(A=this.length),c>=l.length&&(c=l.length),c||(c=0),A>0&&A<y&&(A=y),A===y||l.length===0||this.length===0)return 0;if(c<0)throw new RangeError("targetStart out of bounds");if(y<0||y>=this.length)throw new RangeError("Index out of range");if(A<0)throw new RangeError("sourceEnd out of bounds");A>this.length&&(A=this.length),l.length-c<A-y&&(A=l.length-c+y);let T=A-y;return this===l&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(c,y,A):Uint8Array.prototype.set.call(l,this.subarray(y,A),c),T},s.prototype.fill=function(l,c,y,A){if(typeof l=="string"){if(typeof c=="string"?(A=c,c=0,y=this.length):typeof y=="string"&&(A=y,y=this.length),A!==void 0&&typeof A!="string")throw new TypeError("encoding must be a string");if(typeof A=="string"&&!s.isEncoding(A))throw new TypeError("Unknown encoding: "+A);if(l.length===1){let P=l.charCodeAt(0);(A==="utf8"&&P<128||A==="latin1")&&(l=P)}}else typeof l=="number"?l=l&255:typeof l=="boolean"&&(l=Number(l));if(c<0||this.length<c||this.length<y)throw new RangeError("Out of range index");if(y<=c)return this;c=c>>>0,y=y===void 0?this.length:y>>>0,l||(l=0);let T;if(typeof l=="number")for(T=c;T<y;++T)this[T]=l;else{let P=s.isBuffer(l)?l:s.from(l,A),W=P.length;if(W===0)throw new TypeError('The value "'+l+'" is invalid for argument "value"');for(T=0;T<y-c;++T)this[T+c]=P[T%W]}return this};let Er={};function ls(p,l,c){Er[p]=class extends c{constructor(){super(),Object.defineProperty(this,"message",{value:l.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${p}]`,this.stack,delete this.name}get code(){return p}set code(A){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:A,writable:!0})}toString(){return`${this.name} [${p}]: ${this.message}`}}}ls("ERR_BUFFER_OUT_OF_BOUNDS",function(p){return p?`${p} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),ls("ERR_INVALID_ARG_TYPE",function(p,l){return`The "${p}" argument must be of type number. Received type ${typeof l}`},TypeError),ls("ERR_OUT_OF_RANGE",function(p,l,c){let y=`The value of "${p}" is out of range.`,A=c;return Number.isInteger(c)&&Math.abs(c)>2**32?A=wl(String(c)):typeof c=="bigint"&&(A=String(c),(c>BigInt(2)**BigInt(32)||c<-(BigInt(2)**BigInt(32)))&&(A=wl(A)),A+="n"),y+=` It must be ${l}. Received ${A}`,y},RangeError);function wl(p){let l="",c=p.length,y=p[0]==="-"?1:0;for(;c>=y+4;c-=3)l=`_${p.slice(c-3,c)}${l}`;return`${p.slice(0,c)}${l}`}function xg(p,l,c){Sr(l,"offset"),(p[l]===void 0||p[l+c]===void 0)&&ni(l,p.length-(c+1))}function _l(p,l,c,y,A,T){if(p>c||p<l){let P=typeof l=="bigint"?"n":"",W;throw T>3?l===0||l===BigInt(0)?W=`>= 0${P} and < 2${P} ** ${(T+1)*8}${P}`:W=`>= -(2${P} ** ${(T+1)*8-1}${P}) and < 2 ** ${(T+1)*8-1}${P}`:W=`>= ${l}${P} and <= ${c}${P}`,new Er.ERR_OUT_OF_RANGE("value",W,p)}xg(y,A,T)}function Sr(p,l){if(typeof p!="number")throw new Er.ERR_INVALID_ARG_TYPE(l,"number",p)}function ni(p,l,c){throw Math.floor(p)!==p?(Sr(p,c),new Er.ERR_OUT_OF_RANGE(c||"offset","an integer",p)):l<0?new Er.ERR_BUFFER_OUT_OF_BOUNDS:new Er.ERR_OUT_OF_RANGE(c||"offset",`>= ${c?1:0} and <= ${l}`,p)}let Og=/[^+/0-9A-Za-z-_]/g;function Mg(p){if(p=p.split("=")[0],p=p.trim().replace(Og,""),p.length<2)return"";for(;p.length%4!==0;)p=p+"=";return p}function us(p,l){l=l||1/0;let c,y=p.length,A=null,T=[];for(let P=0;P<y;++P){if(c=p.charCodeAt(P),c>55295&&c<57344){if(!A){if(c>56319){(l-=3)>-1&&T.push(239,191,189);continue}else if(P+1===y){(l-=3)>-1&&T.push(239,191,189);continue}A=c;continue}if(c<56320){(l-=3)>-1&&T.push(239,191,189),A=c;continue}c=(A-55296<<10|c-56320)+65536}else A&&(l-=3)>-1&&T.push(239,191,189);if(A=null,c<128){if((l-=1)<0)break;T.push(c)}else if(c<2048){if((l-=2)<0)break;T.push(c>>6|192,c&63|128)}else if(c<65536){if((l-=3)<0)break;T.push(c>>12|224,c>>6&63|128,c&63|128)}else if(c<1114112){if((l-=4)<0)break;T.push(c>>18|240,c>>12&63|128,c>>6&63|128,c&63|128)}else throw new Error("Invalid code point")}return T}function Lg(p){let l=[];for(let c=0;c<p.length;++c)l.push(p.charCodeAt(c)&255);return l}function qg(p,l){let c,y,A,T=[];for(let P=0;P<p.length&&!((l-=2)<0);++P)c=p.charCodeAt(P),y=c>>8,A=c%256,T.push(A),T.push(y);return T}function ml(p){return t.toByteArray(Mg(p))}function qi(p,l,c,y){let A;for(A=0;A<y&&!(A+c>=l.length||A>=p.length);++A)l[A+c]=p[A];return A}function Ge(p,l){return p instanceof l||p!=null&&p.constructor!=null&&p.constructor.name!=null&&p.constructor.name===l.name}function cs(p){return p!==p}let Ug=function(){let p="0123456789abcdef",l=new Array(256);for(let c=0;c<16;++c){let y=c*16;for(let A=0;A<16;++A)l[y+A]=p[c]+p[A]}return l}();function Pt(p){return typeof BigInt>"u"?Ng:p}function Ng(){throw new Error("BigInt not supported")}return Qt}var si,Uu,ji,Nu,Qt,Du,Bt,x,Kg,Gg,he=Ae(()=>{_();v();m();si={},Uu=!1;ji={},Nu=!1;Qt={},Du=!1;Bt=zg();Bt.Buffer;Bt.SlowBuffer;Bt.INSPECT_MAX_BYTES;Bt.kMaxLength;x=Bt.Buffer,Kg=Bt.INSPECT_MAX_BYTES,Gg=Bt.kMaxLength});var v=Ae(()=>{he()});var ju=O(bs=>{"use strict";_();v();m();Object.defineProperty(bs,"__esModule",{value:!0});var gs=class{constructor(e){this.aliasToTopic={},this.max=e}put(e,r){return r===0||r>this.max?!1:(this.aliasToTopic[r]=e,this.length=Object.keys(this.aliasToTopic).length,!0)}getTopicByAlias(e){return this.aliasToTopic[e]}clear(){this.aliasToTopic={}}};bs.default=gs});var ie=O((DA,Fu)=>{"use strict";_();v();m();var ys=class extends Error{constructor(e){if(!Array.isArray(e))throw new TypeError(`Expected input to be an Array, got ${typeof e}`);let r="";for(let i=0;i<e.length;i++)r+=` ${e[i].stack} `;super(r),this.name="AggregateError",this.errors=e}};Fu.exports={AggregateError:ys,ArrayIsArray(t){return Array.isArray(t)},ArrayPrototypeIncludes(t,e){return t.includes(e)},ArrayPrototypeIndexOf(t,e){return t.indexOf(e)},ArrayPrototypeJoin(t,e){return t.join(e)},ArrayPrototypeMap(t,e){return t.map(e)},ArrayPrototypePop(t,e){return t.pop(e)},ArrayPrototypePush(t,e){return t.push(e)},ArrayPrototypeSlice(t,e,r){return t.slice(e,r)},Error,FunctionPrototypeCall(t,e,...r){return t.call(e,...r)},FunctionPrototypeSymbolHasInstance(t,e){return Function.prototype[Symbol.hasInstance].call(t,e)},MathFloor:Math.floor,Number,NumberIsInteger:Number.isInteger,NumberIsNaN:Number.isNaN,NumberMAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER,NumberMIN_SAFE_INTEGER:Number.MIN_SAFE_INTEGER,NumberParseInt:Number.parseInt,ObjectDefineProperties(t,e){return Object.defineProperties(t,e)},ObjectDefineProperty(t,e,r){return Object.defineProperty(t,e,r)},ObjectGetOwnPropertyDescriptor(t,e){return Object.getOwnPropertyDescriptor(t,e)},ObjectKeys(t){return Object.keys(t)},ObjectSetPrototypeOf(t,e){return Object.setPrototypeOf(t,e)},Promise,PromisePrototypeCatch(t,e){return t.catch(e)},PromisePrototypeThen(t,e,r){return t.then(e,r)},PromiseReject(t){return Promise.reject(t)},PromiseResolve(t){return Promise.resolve(t)},ReflectApply:Reflect.apply,RegExpPrototypeTest(t,e){return t.test(e)},SafeSet:Set,String,StringPrototypeSlice(t,e,r){return t.slice(e,r)},StringPrototypeToLowerCase(t){return t.toLowerCase()},StringPrototypeToUpperCase(t){return t.toUpperCase()},StringPrototypeTrim(t){return t.trim()},Symbol,SymbolFor:Symbol.for,SymbolAsyncIterator:Symbol.asyncIterator,SymbolHasInstance:Symbol.hasInstance,SymbolIterator:Symbol.iterator,SymbolDispose:Symbol.dispose||Symbol("Symbol.dispose"),SymbolAsyncDispose:Symbol.asyncDispose||Symbol("Symbol.asyncDispose"),TypedArrayPrototypeSet(t,e,r){return t.set(e,r)},Boolean,Uint8Array}});var ws=O((QA,Wu)=>{"use strict";_();v();m();Wu.exports={format(t,...e){return t.replace(/%([sdifj])/g,function(...[r,i]){let n=e.shift();return i==="f"?n.toFixed(6):i==="j"?JSON.stringify(n):i==="s"&&typeof n=="object"?`${n.constructor!==Object?n.constructor.name:""} {}`.trim():n.toString()})},inspect(t){switch(typeof t){case"string":if(t.includes("'"))if(t.includes('"')){if(!t.includes("`")&&!t.includes("${"))return`\`${t}\``}else return`"${t}"`;return`'${t}'`;case"number":return isNaN(t)?"NaN":Object.is(t,-0)?String(t):t;case"bigint":return`${String(t)}n`;case"boolean":case"undefined":return String(t);case"object":return"{}"}}}});var me=O((sI,Vu)=>{"use strict";_();v();m();var{format:Qg,inspect:Fi}=ws(),{AggregateError:Yg}=ie(),Jg=globalThis.AggregateError||Yg,Xg=Symbol("kIsNodeError"),Zg=["string","function","number","object","Function","Object","boolean","bigint","symbol"],eb=/^([A-Z][a-z0-9]*)+$/,tb="__node_internal_",Wi={};function Yt(t,e){if(!t)throw new Wi.ERR_INTERNAL_ASSERTION(e)}function $u(t){let e="",r=t.length,i=t[0]==="-"?1:0;for(;r>=i+4;r-=3)e=`_${t.slice(r-3,r)}${e}`;return`${t.slice(0,r)}${e}`}function rb(t,e,r){if(typeof e=="function")return Yt(e.length<=r.length,`Code: ${t}; The provided arguments length (${r.length}) does not match the required ones (${e.length}).`),e(...r);let i=(e.match(/%[dfijoOs]/g)||[]).length;return Yt(i===r.length,`Code: ${t}; The provided arguments length (${r.length}) does not match the required ones (${i}).`),r.length===0?e:Qg(e,...r)}function we(t,e,r){r||(r=Error);class i extends r{constructor(...o){super(rb(t,e,o))}toString(){return`${this.name} [${t}]: ${this.message}`}}Object.defineProperties(i.prototype,{name:{value:r.name,writable:!0,enumerable:!1,configurable:!0},toString:{value(){return`${this.name} [${t}]: ${this.message}`},writable:!0,enumerable:!1,configurable:!0}}),i.prototype.code=t,i.prototype[Xg]=!0,Wi[t]=i}function Hu(t){let e=tb+t.name;return Object.defineProperty(t,"name",{value:e}),t}function ib(t,e){if(t&&e&&t!==e){if(Array.isArray(e.errors))return e.errors.push(t),e;let r=new Jg([e,t],e.message);return r.code=e.code,r}return t||e}var _s=class extends Error{constructor(e="The operation was aborted",r=void 0){if(r!==void 0&&typeof r!="object")throw new Wi.ERR_INVALID_ARG_TYPE("options","Object",r);super(e,r),this.code="ABORT_ERR",this.name="AbortError"}};we("ERR_ASSERTION","%s",Error);we("ERR_INVALID_ARG_TYPE",(t,e,r)=>{Yt(typeof t=="string","'name' must be a string"),Array.isArray(e)||(e=[e]);let i="The ";t.endsWith(" argument")?i+=`${t} `:i+=`"${t}" ${t.includes(".")?"property":"argument"} `,i+="must be ";let n=[],o=[],s=[];for(let u of e)Yt(typeof u=="string","All expected entries have to be of type string"),Zg.includes(u)?n.push(u.toLowerCase()):eb.test(u)?o.push(u):(Yt(u!=="object",'The value "object" should be written as "Object"'),s.push(u));if(o.length>0){let u=n.indexOf("object");u!==-1&&(n.splice(n,u,1),o.push("Object"))}if(n.length>0){switch(n.length){case 1:i+=`of type ${n[0]}`;break;case 2:i+=`one of type ${n[0]} or ${n[1]}`;break;default:{let u=n.pop();i+=`one of type ${n.join(", ")}, or ${u}`}}(o.length>0||s.length>0)&&(i+=" or ")}if(o.length>0){switch(o.length){case 1:i+=`an instance of ${o[0]}`;break;case 2:i+=`an instance of ${o[0]} or ${o[1]}`;break;default:{let u=o.pop();i+=`an instance of ${o.join(", ")}, or ${u}`}}s.length>0&&(i+=" or ")}switch(s.length){case 0:break;case 1:s[0].toLowerCase()!==s[0]&&(i+="an "),i+=`${s[0]}`;break;case 2:i+=`one of ${s[0]} or ${s[1]}`;break;default:{let u=s.pop();i+=`one of ${s.join(", ")}, or ${u}`}}if(r==null)i+=`. Received ${r}`;else if(typeof r=="function"&&r.name)i+=`. Received function ${r.name}`;else if(typeof r=="object"){var a;if((a=r.constructor)!==null&&a!==void 0&&a.name)i+=`. Received an instance of ${r.constructor.name}`;else{let u=Fi(r,{depth:-1});i+=`. Received ${u}`}}else{let u=Fi(r,{colors:!1});u.length>25&&(u=`${u.slice(0,25)}...`),i+=`. Received type ${typeof r} (${u})`}return i},TypeError);we("ERR_INVALID_ARG_VALUE",(t,e,r="is invalid")=>{let i=Fi(e);return i.length>128&&(i=i.slice(0,128)+"..."),`The ${t.includes(".")?"property":"argument"} '${t}' ${r}. Received ${i}`},TypeError);we("ERR_INVALID_RETURN_VALUE",(t,e,r)=>{var i;let n=r!=null&&(i=r.constructor)!==null&&i!==void 0&&i.name?`instance of ${r.constructor.name}`:`type ${typeof r}`;return`Expected ${t} to be returned from the "${e}" function but got ${n}.`},TypeError);we("ERR_MISSING_ARGS",(...t)=>{Yt(t.length>0,"At least one arg needs to be specified");let e,r=t.length;switch(t=(Array.isArray(t)?t:[t]).map(i=>`"${i}"`).join(" or "),r){case 1:e+=`The ${t[0]} argument`;break;case 2:e+=`The ${t[0]} and ${t[1]} arguments`;break;default:{let i=t.pop();e+=`The ${t.join(", ")}, and ${i} arguments`}break}return`${e} must be specified`},TypeError);we("ERR_OUT_OF_RANGE",(t,e,r)=>{Yt(e,'Missing "range" argument');let i;if(Number.isInteger(r)&&Math.abs(r)>2**32)i=$u(String(r));else if(typeof r=="bigint"){i=String(r);let n=BigInt(2)**BigInt(32);(r>n||r<-n)&&(i=$u(i)),i+="n"}else i=Fi(r);return`The value of "${t}" is out of range. It must be ${e}. Received ${i}`},RangeError);we("ERR_MULTIPLE_CALLBACK","Callback called multiple times",Error);we("ERR_METHOD_NOT_IMPLEMENTED","The %s method is not implemented",Error);we("ERR_STREAM_ALREADY_FINISHED","Cannot call %s after a stream was finished",Error);we("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable",Error);we("ERR_STREAM_DESTROYED","Cannot call %s after a stream was destroyed",Error);we("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);we("ERR_STREAM_PREMATURE_CLOSE","Premature close",Error);we("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF",Error);we("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event",Error);we("ERR_STREAM_WRITE_AFTER_END","write after end",Error);we("ERR_UNKNOWN_ENCODING","Unknown encoding: %s",TypeError);Vu.exports={AbortError:_s,aggregateTwoErrors:Hu(ib),hideStackFrames:Hu,codes:Wi}});var Tr=O((gI,$i)=>{"use strict";_();v();m();var{AbortController:zu,AbortSignal:nb}=typeof self<"u"?self:typeof window<"u"?window:void 0;$i.exports=zu;$i.exports.AbortSignal=nb;$i.exports.default=zu});function Y(){Y.init.call(this)}function Hi(t){if(typeof t!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}function rc(t){return t._maxListeners===void 0?Y.defaultMaxListeners:t._maxListeners}function Yu(t,e,r,i){var n,o,s,a;if(Hi(r),(o=t._events)===void 0?(o=t._events=Object.create(null),t._eventsCount=0):(o.newListener!==void 0&&(t.emit("newListener",e,r.listener?r.listener:r),o=t._events),s=o[e]),s===void 0)s=o[e]=r,++t._eventsCount;else if(typeof s=="function"?s=o[e]=i?[r,s]:[s,r]:i?s.unshift(r):s.push(r),(n=rc(t))>0&&s.length>n&&!s.warned){s.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=t,u.type=e,u.count=s.length,a=u,console&&console.warn&&console.warn(a)}return t}function sb(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function Ju(t,e,r){var i={fired:!1,wrapFn:void 0,target:t,type:e,listener:r},n=sb.bind(i);return n.listener=r,i.wrapFn=n,n}function Xu(t,e,r){var i=t._events;if(i===void 0)return[];var n=i[e];return n===void 0?[]:typeof n=="function"?r?[n.listener||n]:[n]:r?function(o){for(var s=new Array(o.length),a=0;a<s.length;++a)s[a]=o[a].listener||o[a];return s}(n):ic(n,n.length)}function Zu(t){var e=this._events;if(e!==void 0){var r=e[t];if(typeof r=="function")return 1;if(r!==void 0)return r.length}return 0}function ic(t,e){for(var r=new Array(e),i=0;i<e;++i)r[i]=t[i];return r}var ec,tc,Rr,Ku,Gu,Qu,Pe,ms=Ae(()=>{_();v();m();Rr=typeof Reflect=="object"?Reflect:null,Ku=Rr&&typeof Rr.apply=="function"?Rr.apply:function(t,e,r){return Function.prototype.apply.call(t,e,r)};tc=Rr&&typeof Rr.ownKeys=="function"?Rr.ownKeys:Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:function(t){return Object.getOwnPropertyNames(t)};Gu=Number.isNaN||function(t){return t!=t};ec=Y,Y.EventEmitter=Y,Y.prototype._events=void 0,Y.prototype._eventsCount=0,Y.prototype._maxListeners=void 0;Qu=10;Object.defineProperty(Y,"defaultMaxListeners",{enumerable:!0,get:function(){return Qu},set:function(t){if(typeof t!="number"||t<0||Gu(t))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+t+".");Qu=t}}),Y.init=function(){this._events!==void 0&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},Y.prototype.setMaxListeners=function(t){if(typeof t!="number"||t<0||Gu(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this},Y.prototype.getMaxListeners=function(){return rc(this)},Y.prototype.emit=function(t){for(var e=[],r=1;r<arguments.length;r++)e.push(arguments[r]);var i=t==="error",n=this._events;if(n!==void 0)i=i&&n.error===void 0;else if(!i)return!1;if(i){var o;if(e.length>0&&(o=e[0]),o instanceof Error)throw o;var s=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw s.context=o,s}var a=n[t];if(a===void 0)return!1;if(typeof a=="function")Ku(a,this,e);else{var u=a.length,f=ic(a,u);for(r=0;r<u;++r)Ku(f[r],this,e)}return!0},Y.prototype.addListener=function(t,e){return Yu(this,t,e,!1)},Y.prototype.on=Y.prototype.addListener,Y.prototype.prependListener=function(t,e){return Yu(this,t,e,!0)},Y.prototype.once=function(t,e){return Hi(e),this.on(t,Ju(this,t,e)),this},Y.prototype.prependOnceListener=function(t,e){return Hi(e),this.prependListener(t,Ju(this,t,e)),this},Y.prototype.removeListener=function(t,e){var r,i,n,o,s;if(Hi(e),(i=this._events)===void 0)return this;if((r=i[t])===void 0)return this;if(r===e||r.listener===e)--this._eventsCount==0?this._events=Object.create(null):(delete i[t],i.removeListener&&this.emit("removeListener",t,r.listener||e));else if(typeof r!="function"){for(n=-1,o=r.length-1;o>=0;o--)if(r[o]===e||r[o].listener===e){s=r[o].listener,n=o;break}if(n<0)return this;n===0?r.shift():function(a,u){for(;u+1<a.length;u++)a[u]=a[u+1];a.pop()}(r,n),r.length===1&&(i[t]=r[0]),i.removeListener!==void 0&&this.emit("removeListener",t,s||e)}return this},Y.prototype.off=Y.prototype.removeListener,Y.prototype.removeAllListeners=function(t){var e,r,i;if((r=this._events)===void 0)return this;if(r.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):r[t]!==void 0&&(--this._eventsCount==0?this._events=Object.create(null):delete r[t]),this;if(arguments.length===0){var n,o=Object.keys(r);for(i=0;i<o.length;++i)(n=o[i])!=="removeListener"&&this.removeAllListeners(n);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(typeof(e=r[t])=="function")this.removeListener(t,e);else if(e!==void 0)for(i=e.length-1;i>=0;i--)this.removeListener(t,e[i]);return this},Y.prototype.listeners=function(t){return Xu(this,t,!0)},Y.prototype.rawListeners=function(t){return Xu(this,t,!1)},Y.listenerCount=function(t,e){return typeof t.listenerCount=="function"?t.listenerCount(e):Zu.call(t,e)},Y.prototype.listenerCount=Zu,Y.prototype.eventNames=function(){return this._eventsCount>0?tc(this._events):[]};Pe=ec;Pe.EventEmitter;Pe.defaultMaxListeners;Pe.init;Pe.listenerCount;Pe.EventEmitter;Pe.defaultMaxListeners;Pe.init;Pe.listenerCount});var xt={};Ar(xt,{EventEmitter:()=>ob,default:()=>Pe,defaultMaxListeners:()=>ab,init:()=>lb,listenerCount:()=>ub,on:()=>cb,once:()=>fb});var ob,ab,lb,ub,cb,fb,Ot=Ae(()=>{_();v();m();ms();ms();Pe.once=function(t,e){return new Promise((r,i)=>{function n(...s){o!==void 0&&t.removeListener("error",o),r(s)}let o;e!=="error"&&(o=s=>{t.removeListener(name,n),i(s)},t.once("error",o)),t.once(e,n)})};Pe.on=function(t,e){let r=[],i=[],n=null,o=!1,s={async next(){let f=r.shift();if(f)return createIterResult(f,!1);if(n){let d=Promise.reject(n);return n=null,d}return o?createIterResult(void 0,!0):new Promise((d,h)=>i.push({resolve:d,reject:h}))},async return(){t.removeListener(e,a),t.removeListener("error",u),o=!0;for(let f of i)f.resolve(createIterResult(void 0,!0));return createIterResult(void 0,!0)},throw(f){n=f,t.removeListener(e,a),t.removeListener("error",u)},[Symbol.asyncIterator](){return this}};return t.on(e,a),t.on("error",u),s;function a(...f){let d=i.shift();d?d.resolve(createIterResult(f,!1)):r.push(f)}function u(f){o=!0;let d=i.shift();d?d.reject(f):n=f,s.return()}};({EventEmitter:ob,defaultMaxListeners:ab,init:lb,listenerCount:ub,on:cb,once:fb}=Pe)});var Ie=O((zI,Es)=>{"use strict";_();v();m();var hb=(he(),Q(ye)),{format:db,inspect:pb}=ws(),{codes:{ERR_INVALID_ARG_TYPE:vs}}=me(),{kResistStopPropagation:gb,AggregateError:bb,SymbolDispose:yb}=ie(),wb=globalThis.AbortSignal||Tr().AbortSignal,_b=globalThis.AbortController||Tr().AbortController,mb=Object.getPrototypeOf(async function(){}).constructor,nc=globalThis.Blob||hb.Blob,vb=typeof nc<"u"?function(e){return e instanceof nc}:function(e){return!1},sc=(t,e)=>{if(t!==void 0&&(t===null||typeof t!="object"||!("aborted"in t)))throw new vs(e,"AbortSignal",t)},Eb=(t,e)=>{if(typeof t!="function")throw new vs(e,"Function",t)};Es.exports={AggregateError:bb,kEmptyObject:Object.freeze({}),once(t){let e=!1;return function(...r){e||(e=!0,t.apply(this,r))}},createDeferredPromise:function(){let t,e;return{promise:new Promise((i,n)=>{t=i,e=n}),resolve:t,reject:e}},promisify(t){return new Promise((e,r)=>{t((i,...n)=>i?r(i):e(...n))})},debuglog(){return function(){}},format:db,inspect:pb,types:{isAsyncFunction(t){return t instanceof mb},isArrayBufferView(t){return ArrayBuffer.isView(t)}},isBlob:vb,deprecate(t,e){return t},addAbortListener:(Ot(),Q(xt)).addAbortListener||function(e,r){if(e===void 0)throw new vs("signal","AbortSignal",e);sc(e,"signal"),Eb(r,"listener");let i;return e.aborted?queueMicrotask(()=>r()):(e.addEventListener("abort",r,{__prot