UNPKG

@meewmeew/payos-bun

Version:

The payOS library provides convenient access to the payOS API from applications written in server-side JavaScript.

2 lines 693 kB
var n2=function(){return g7},Z1=Object.create,r6=Object.defineProperty,H1=Object.getOwnPropertyDescriptor,Y1=Object.getOwnPropertyNames,Q1=Object.getPrototypeOf,J1=Object.prototype.hasOwnProperty,F8=(c,g)=>()=>(c&&(g=c(c=0)),g),j0=(c,g)=>()=>(g||c((g={exports:{}}).exports,g),g.exports),i6=(c,g)=>{for(var E in g)r6(c,E,{get:g[E],enumerable:!0})},f6=(c,g,E,x)=>{if(g&&typeof g=="object"||typeof g=="function")for(let G of Y1(g))!J1.call(c,G)&&G!==E&&r6(c,G,{get:()=>g[G],enumerable:!(x=H1(g,G))||x.enumerable});return c},G8=(c,g,E)=>(f6(c,g,"default"),E&&f6(E,g,"default")),R6=(c,g,E)=>(E=c!=null?Z1(Q1(c)):{},f6(g||!c||!c.__esModule?r6(E,"default",{value:c,enumerable:!0}):E,c)),U6=(c)=>f6(r6({},"__esModule",{value:!0}),c),$1=j0((c)=>{c.byteLength=L,c.toByteArray=U,c.fromByteArray=k;var g=[],E=[],x=typeof Uint8Array<"u"?Uint8Array:Array,G="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(v=0,j=G.length;v<j;++v)g[v]=G[v],E[G.charCodeAt(v)]=v;var v,j;E["-".charCodeAt(0)]=62,E["_".charCodeAt(0)]=63;function V(C){var D=C.length;if(D%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var I=C.indexOf("=");I===-1&&(I=D);var M=I===D?0:4-I%4;return[I,M]}function L(C){var D=V(C),I=D[0],M=D[1];return(I+M)*3/4-M}function P(C,D,I){return(D+I)*3/4-I}function U(C){var D,I=V(C),M=I[0],S=I[1],A=new x(P(C,M,S)),y=0,p=S>0?M-4:M,l;for(l=0;l<p;l+=4)D=E[C.charCodeAt(l)]<<18|E[C.charCodeAt(l+1)]<<12|E[C.charCodeAt(l+2)]<<6|E[C.charCodeAt(l+3)],A[y++]=D>>16&255,A[y++]=D>>8&255,A[y++]=D&255;return S===2&&(D=E[C.charCodeAt(l)]<<2|E[C.charCodeAt(l+1)]>>4,A[y++]=D&255),S===1&&(D=E[C.charCodeAt(l)]<<10|E[C.charCodeAt(l+1)]<<4|E[C.charCodeAt(l+2)]>>2,A[y++]=D>>8&255,A[y++]=D&255),A}function F(C){return g[C>>18&63]+g[C>>12&63]+g[C>>6&63]+g[C&63]}function T(C,D,I){for(var M,S=[],A=D;A<I;A+=3)M=(C[A]<<16&16711680)+(C[A+1]<<8&65280)+(C[A+2]&255),S.push(F(M));return S.join("")}function k(C){for(var D,I=C.length,M=I%3,S=[],A=16383,y=0,p=I-M;y<p;y+=A)S.push(T(C,y,y+A>p?p:y+A));return M===1?(D=C[I-1],S.push(g[D>>2]+g[D<<4&63]+"==")):M===2&&(D=(C[I-2]<<8)+C[I-1],S.push(g[D>>10]+g[D>>4&63]+g[D<<2&63]+"=")),S.join("")}}),j1=j0((c)=>{c.read=function(g,E,x,G,v){var j,V,L=v*8-G-1,P=(1<<L)-1,U=P>>1,F=-7,T=x?v-1:0,k=x?-1:1,C=g[E+T];for(T+=k,j=C&(1<<-F)-1,C>>=-F,F+=L;F>0;j=j*256+g[E+T],T+=k,F-=8);for(V=j&(1<<-F)-1,j>>=-F,F+=G;F>0;V=V*256+g[E+T],T+=k,F-=8);if(j===0)j=1-U;else{if(j===P)return V?NaN:(C?-1:1)*Infinity;V=V+Math.pow(2,G),j=j-U}return(C?-1:1)*V*Math.pow(2,j-G)},c.write=function(g,E,x,G,v,j){var V,L,P,U=j*8-v-1,F=(1<<U)-1,T=F>>1,k=v===23?Math.pow(2,-24)-Math.pow(2,-77):0,C=G?0:j-1,D=G?1:-1,I=E<0||E===0&&1/E<0?1:0;for(E=Math.abs(E),isNaN(E)||E===Infinity?(L=isNaN(E)?1:0,V=F):(V=Math.floor(Math.log(E)/Math.LN2),E*(P=Math.pow(2,-V))<1&&(V--,P*=2),V+T>=1?E+=k/P:E+=k*Math.pow(2,1-T),E*P>=2&&(V++,P/=2),V+T>=F?(L=0,V=F):V+T>=1?(L=(E*P-1)*Math.pow(2,v),V=V+T):(L=E*Math.pow(2,T-1)*Math.pow(2,v),V=0));v>=8;g[x+C]=L&255,C+=D,L/=256,v-=8);for(V=V<<v|L,U+=v;U>0;g[x+C]=V&255,C+=D,V/=256,U-=8);g[x+C-D]|=I*128}}),V6=j0((c)=>{var g=$1(),E=j1(),x=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;c.Buffer=V,c.SlowBuffer=S,c.INSPECT_MAX_BYTES=50;var G=2147483647;c.kMaxLength=G,V.TYPED_ARRAY_SUPPORT=v(),!V.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 v(){try{let O=new Uint8Array(1),B={foo:function(){return 42}};return Object.setPrototypeOf(B,Uint8Array.prototype),Object.setPrototypeOf(O,B),O.foo()===42}catch{return!1}}Object.defineProperty(V.prototype,"parent",{enumerable:!0,get:function(){if(V.isBuffer(this))return this.buffer}}),Object.defineProperty(V.prototype,"offset",{enumerable:!0,get:function(){if(V.isBuffer(this))return this.byteOffset}});function j(O){if(O>G)throw new RangeError('The value "'+O+'" is invalid for option "size"');let B=new Uint8Array(O);return Object.setPrototypeOf(B,V.prototype),B}function V(O,B,b){if(typeof O=="number"){if(typeof B=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return F(O)}return L(O,B,b)}V.poolSize=8192;function L(O,B,b){if(typeof O=="string")return T(O,B);if(ArrayBuffer.isView(O))return C(O);if(O==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof O);if(K0(O,ArrayBuffer)||O&&K0(O.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(K0(O,SharedArrayBuffer)||O&&K0(O.buffer,SharedArrayBuffer)))return D(O,B,b);if(typeof O=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let h=O.valueOf&&O.valueOf();if(h!=null&&h!==O)return V.from(h,B,b);let o=I(O);if(o)return o;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof O[Symbol.toPrimitive]=="function")return V.from(O[Symbol.toPrimitive]("string"),B,b);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof O)}V.from=function(O,B,b){return L(O,B,b)},Object.setPrototypeOf(V.prototype,Uint8Array.prototype),Object.setPrototypeOf(V,Uint8Array);function P(O){if(typeof O!="number")throw new TypeError('"size" argument must be of type number');if(O<0)throw new RangeError('The value "'+O+'" is invalid for option "size"')}function U(O,B,b){return P(O),O<=0?j(O):B!==void 0?typeof b=="string"?j(O).fill(B,b):j(O).fill(B):j(O)}V.alloc=function(O,B,b){return U(O,B,b)};function F(O){return P(O),j(O<0?0:M(O)|0)}V.allocUnsafe=function(O){return F(O)},V.allocUnsafeSlow=function(O){return F(O)};function T(O,B){if((typeof B!="string"||B==="")&&(B="utf8"),!V.isEncoding(B))throw new TypeError("Unknown encoding: "+B);let b=A(O,B)|0,h=j(b),o=h.write(O,B);return o!==b&&(h=h.slice(0,o)),h}function k(O){let B=O.length<0?0:M(O.length)|0,b=j(B);for(let h=0;h<B;h+=1)b[h]=O[h]&255;return b}function C(O){if(K0(O,Uint8Array)){let B=new Uint8Array(O);return D(B.buffer,B.byteOffset,B.byteLength)}return k(O)}function D(O,B,b){if(B<0||O.byteLength<B)throw new RangeError('"offset" is outside of buffer bounds');if(O.byteLength<B+(b||0))throw new RangeError('"length" is outside of buffer bounds');let h;return B===void 0&&b===void 0?h=new Uint8Array(O):b===void 0?h=new Uint8Array(O,B):h=new Uint8Array(O,B,b),Object.setPrototypeOf(h,V.prototype),h}function I(O){if(V.isBuffer(O)){let B=M(O.length)|0,b=j(B);return b.length===0||O.copy(b,0,0,B),b}if(O.length!==void 0)return typeof O.length!="number"||w0(O.length)?j(0):k(O);if(O.type==="Buffer"&&Array.isArray(O.data))return k(O.data)}function M(O){if(O>=G)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+G.toString(16)+" bytes");return O|0}function S(O){return+O!=O&&(O=0),V.alloc(+O)}V.isBuffer=function(O){return O!=null&&O._isBuffer===!0&&O!==V.prototype},V.compare=function(O,B){if(K0(O,Uint8Array)&&(O=V.from(O,O.offset,O.byteLength)),K0(B,Uint8Array)&&(B=V.from(B,B.offset,B.byteLength)),!V.isBuffer(O)||!V.isBuffer(B))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(O===B)return 0;let b=O.length,h=B.length;for(let o=0,P0=Math.min(b,h);o<P0;++o)if(O[o]!==B[o]){b=O[o],h=B[o];break}return b<h?-1:h<b?1:0},V.isEncoding=function(O){switch(String(O).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}},V.concat=function(O,B){if(!Array.isArray(O))throw new TypeError('"list" argument must be an Array of Buffers');if(O.length===0)return V.alloc(0);let b;if(B===void 0)for(B=0,b=0;b<O.length;++b)B+=O[b].length;let h=V.allocUnsafe(B),o=0;for(b=0;b<O.length;++b){let P0=O[b];if(K0(P0,Uint8Array))o+P0.length>h.length?(V.isBuffer(P0)||(P0=V.from(P0)),P0.copy(h,o)):Uint8Array.prototype.set.call(h,P0,o);else if(V.isBuffer(P0))P0.copy(h,o);else throw new TypeError('"list" argument must be an Array of Buffers');o+=P0.length}return h};function A(O,B){if(V.isBuffer(O))return O.length;if(ArrayBuffer.isView(O)||K0(O,ArrayBuffer))return O.byteLength;if(typeof O!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof O);let b=O.length,h=arguments.length>2&&arguments[2]===!0;if(!h&&b===0)return 0;let o=!1;for(;;)switch(B){case"ascii":case"latin1":case"binary":return b;case"utf8":case"utf-8":return e(O).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return b*2;case"hex":return b>>>1;case"base64":return _0(O).length;default:if(o)return h?-1:e(O).length;B=(""+B).toLowerCase(),o=!0}}V.byteLength=A;function y(O,B,b){let h=!1;if((B===void 0||B<0)&&(B=0),B>this.length||((b===void 0||b>this.length)&&(b=this.length),b<=0)||(b>>>=0,B>>>=0,b<=B))return"";for(O||(O="utf8");;)switch(O){case"hex":return $(this,B,b);case"utf8":case"utf-8":return Q(this,B,b);case"ascii":return W(this,B,b);case"latin1":case"binary":return z(this,B,b);case"base64":return H(this,B,b);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Z(this,B,b);default:if(h)throw new TypeError("Unknown encoding: "+O);O=(O+"").toLowerCase(),h=!0}}V.prototype._isBuffer=!0;function p(O,B,b){let h=O[B];O[B]=O[b],O[b]=h}V.prototype.swap16=function(){let O=this.length;if(O%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let B=0;B<O;B+=2)p(this,B,B+1);return this},V.prototype.swap32=function(){let O=this.length;if(O%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let B=0;B<O;B+=4)p(this,B,B+3),p(this,B+1,B+2);return this},V.prototype.swap64=function(){let O=this.length;if(O%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let B=0;B<O;B+=8)p(this,B,B+7),p(this,B+1,B+6),p(this,B+2,B+5),p(this,B+3,B+4);return this},V.prototype.toString=function(){let O=this.length;return O===0?"":arguments.length===0?Q(this,0,O):y.apply(this,arguments)},V.prototype.toLocaleString=V.prototype.toString,V.prototype.equals=function(O){if(!V.isBuffer(O))throw new TypeError("Argument must be a Buffer");return this===O?!0:V.compare(this,O)===0},V.prototype.inspect=function(){let O="",B=c.INSPECT_MAX_BYTES;return O=this.toString("hex",0,B).replace(/(.{2})/g,"$1 ").trim(),this.length>B&&(O+=" ... "),"<Buffer "+O+">"},x&&(V.prototype[x]=V.prototype.inspect),V.prototype.compare=function(O,B,b,h,o){if(K0(O,Uint8Array)&&(O=V.from(O,O.offset,O.byteLength)),!V.isBuffer(O))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof O);if(B===void 0&&(B=0),b===void 0&&(b=O?O.length:0),h===void 0&&(h=0),o===void 0&&(o=this.length),B<0||b>O.length||h<0||o>this.length)throw new RangeError("out of range index");if(h>=o&&B>=b)return 0;if(h>=o)return-1;if(B>=b)return 1;if(B>>>=0,b>>>=0,h>>>=0,o>>>=0,this===O)return 0;let P0=o-h,Y0=b-B,F0=Math.min(P0,Y0),b0=this.slice(h,o),V0=O.slice(B,b);for(let G0=0;G0<F0;++G0)if(b0[G0]!==V0[G0]){P0=b0[G0],Y0=V0[G0];break}return P0<Y0?-1:Y0<P0?1:0};function l(O,B,b,h,o){if(O.length===0)return-1;if(typeof b=="string"?(h=b,b=0):b>2147483647?b=2147483647:b<-2147483648&&(b=-2147483648),b=+b,w0(b)&&(b=o?0:O.length-1),b<0&&(b=O.length+b),b>=O.length){if(o)return-1;b=O.length-1}else if(b<0)if(o)b=0;else return-1;if(typeof B=="string"&&(B=V.from(B,h)),V.isBuffer(B))return B.length===0?-1:n(O,B,b,h,o);if(typeof B=="number")return B=B&255,typeof Uint8Array.prototype.indexOf=="function"?o?Uint8Array.prototype.indexOf.call(O,B,b):Uint8Array.prototype.lastIndexOf.call(O,B,b):n(O,[B],b,h,o);throw new TypeError("val must be string, number or Buffer")}function n(O,B,b,h,o){let P0=1,Y0=O.length,F0=B.length;if(h!==void 0&&(h=String(h).toLowerCase(),h==="ucs2"||h==="ucs-2"||h==="utf16le"||h==="utf-16le")){if(O.length<2||B.length<2)return-1;P0=2,Y0/=2,F0/=2,b/=2}function b0(G0,y0){return P0===1?G0[y0]:G0.readUInt16BE(y0*P0)}let V0;if(o){let G0=-1;for(V0=b;V0<Y0;V0++)if(b0(O,V0)===b0(B,G0===-1?0:V0-G0)){if(G0===-1&&(G0=V0),V0-G0+1===F0)return G0*P0}else G0!==-1&&(V0-=V0-G0),G0=-1}else for(b+F0>Y0&&(b=Y0-F0),V0=b;V0>=0;V0--){let G0=!0;for(let y0=0;y0<F0;y0++)if(b0(O,V0+y0)!==b0(B,y0)){G0=!1;break}if(G0)return V0}return-1}V.prototype.includes=function(O,B,b){return this.indexOf(O,B,b)!==-1},V.prototype.indexOf=function(O,B,b){return l(this,O,B,b,!0)},V.prototype.lastIndexOf=function(O,B,b){return l(this,O,B,b,!1)};function i(O,B,b,h){b=Number(b)||0;let o=O.length-b;h?(h=Number(h),h>o&&(h=o)):h=o;let P0=B.length;h>P0/2&&(h=P0/2);let Y0;for(Y0=0;Y0<h;++Y0){let F0=parseInt(B.substr(Y0*2,2),16);if(w0(F0))return Y0;O[b+Y0]=F0}return Y0}function Q0(O,B,b,h){return $0(e(B,O.length-b),O,b,h)}function a(O,B,b,h){return $0(Z0(B),O,b,h)}function W0(O,B,b,h){return $0(_0(B),O,b,h)}function X(O,B,b,h){return $0(t(B,O.length-b),O,b,h)}V.prototype.write=function(O,B,b,h){if(B===void 0)h="utf8",b=this.length,B=0;else if(b===void 0&&typeof B=="string")h=B,b=this.length,B=0;else if(isFinite(B))B=B>>>0,isFinite(b)?(b=b>>>0,h===void 0&&(h="utf8")):(h=b,b=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let o=this.length-B;if((b===void 0||b>o)&&(b=o),O.length>0&&(b<0||B<0)||B>this.length)throw new RangeError("Attempt to write outside buffer bounds");h||(h="utf8");let P0=!1;for(;;)switch(h){case"hex":return i(this,O,B,b);case"utf8":case"utf-8":return Q0(this,O,B,b);case"ascii":case"latin1":case"binary":return a(this,O,B,b);case"base64":return W0(this,O,B,b);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return X(this,O,B,b);default:if(P0)throw new TypeError("Unknown encoding: "+h);h=(""+h).toLowerCase(),P0=!0}},V.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function H(O,B,b){return B===0&&b===O.length?g.fromByteArray(O):g.fromByteArray(O.slice(B,b))}function Q(O,B,b){b=Math.min(O.length,b);let h=[],o=B;for(;o<b;){let P0=O[o],Y0=null,F0=P0>239?4:P0>223?3:P0>191?2:1;if(o+F0<=b){let b0,V0,G0,y0;switch(F0){case 1:P0<128&&(Y0=P0);break;case 2:b0=O[o+1],(b0&192)===128&&(y0=(P0&31)<<6|b0&63,y0>127&&(Y0=y0));break;case 3:b0=O[o+1],V0=O[o+2],(b0&192)===128&&(V0&192)===128&&(y0=(P0&15)<<12|(b0&63)<<6|V0&63,y0>2047&&(y0<55296||y0>57343)&&(Y0=y0));break;case 4:b0=O[o+1],V0=O[o+2],G0=O[o+3],(b0&192)===128&&(V0&192)===128&&(G0&192)===128&&(y0=(P0&15)<<18|(b0&63)<<12|(V0&63)<<6|G0&63,y0>65535&&y0<1114112&&(Y0=y0))}}Y0===null?(Y0=65533,F0=1):Y0>65535&&(Y0-=65536,h.push(Y0>>>10&1023|55296),Y0=56320|Y0&1023),h.push(Y0),o+=F0}return J(h)}var Y=4096;function J(O){let B=O.length;if(B<=Y)return String.fromCharCode.apply(String,O);let b="",h=0;for(;h<B;)b+=String.fromCharCode.apply(String,O.slice(h,h+=Y));return b}function W(O,B,b){let h="";b=Math.min(O.length,b);for(let o=B;o<b;++o)h+=String.fromCharCode(O[o]&127);return h}function z(O,B,b){let h="";b=Math.min(O.length,b);for(let o=B;o<b;++o)h+=String.fromCharCode(O[o]);return h}function $(O,B,b){let h=O.length;(!B||B<0)&&(B=0),(!b||b<0||b>h)&&(b=h);let o="";for(let P0=B;P0<b;++P0)o+=C0[O[P0]];return o}function Z(O,B,b){let h=O.slice(B,b),o="";for(let P0=0;P0<h.length-1;P0+=2)o+=String.fromCharCode(h[P0]+h[P0+1]*256);return o}V.prototype.slice=function(O,B){let b=this.length;O=~~O,B=B===void 0?b:~~B,O<0?(O+=b,O<0&&(O=0)):O>b&&(O=b),B<0?(B+=b,B<0&&(B=0)):B>b&&(B=b),B<O&&(B=O);let h=this.subarray(O,B);return Object.setPrototypeOf(h,V.prototype),h};function K(O,B,b){if(O%1!==0||O<0)throw new RangeError("offset is not uint");if(O+B>b)throw new RangeError("Trying to access beyond buffer length")}V.prototype.readUintLE=V.prototype.readUIntLE=function(O,B,b){O=O>>>0,B=B>>>0,b||K(O,B,this.length);let h=this[O],o=1,P0=0;for(;++P0<B&&(o*=256);)h+=this[O+P0]*o;return h},V.prototype.readUintBE=V.prototype.readUIntBE=function(O,B,b){O=O>>>0,B=B>>>0,b||K(O,B,this.length);let h=this[O+--B],o=1;for(;B>0&&(o*=256);)h+=this[O+--B]*o;return h},V.prototype.readUint8=V.prototype.readUInt8=function(O,B){return O=O>>>0,B||K(O,1,this.length),this[O]},V.prototype.readUint16LE=V.prototype.readUInt16LE=function(O,B){return O=O>>>0,B||K(O,2,this.length),this[O]|this[O+1]<<8},V.prototype.readUint16BE=V.prototype.readUInt16BE=function(O,B){return O=O>>>0,B||K(O,2,this.length),this[O]<<8|this[O+1]},V.prototype.readUint32LE=V.prototype.readUInt32LE=function(O,B){return O=O>>>0,B||K(O,4,this.length),(this[O]|this[O+1]<<8|this[O+2]<<16)+this[O+3]*16777216},V.prototype.readUint32BE=V.prototype.readUInt32BE=function(O,B){return O=O>>>0,B||K(O,4,this.length),this[O]*16777216+(this[O+1]<<16|this[O+2]<<8|this[O+3])},V.prototype.readBigUInt64LE=z0(function(O){O=O>>>0,J0(O,"offset");let B=this[O],b=this[O+7];(B===void 0||b===void 0)&&w(O,this.length-8);let h=B+this[++O]*256+this[++O]*65536+this[++O]*16777216,o=this[++O]+this[++O]*256+this[++O]*65536+b*16777216;return BigInt(h)+(BigInt(o)<<BigInt(32))}),V.prototype.readBigUInt64BE=z0(function(O){O=O>>>0,J0(O,"offset");let B=this[O],b=this[O+7];(B===void 0||b===void 0)&&w(O,this.length-8);let h=B*16777216+this[++O]*65536+this[++O]*256+this[++O],o=this[++O]*16777216+this[++O]*65536+this[++O]*256+b;return(BigInt(h)<<BigInt(32))+BigInt(o)}),V.prototype.readIntLE=function(O,B,b){O=O>>>0,B=B>>>0,b||K(O,B,this.length);let h=this[O],o=1,P0=0;for(;++P0<B&&(o*=256);)h+=this[O+P0]*o;return o*=128,h>=o&&(h-=Math.pow(2,8*B)),h},V.prototype.readIntBE=function(O,B,b){O=O>>>0,B=B>>>0,b||K(O,B,this.length);let h=B,o=1,P0=this[O+--h];for(;h>0&&(o*=256);)P0+=this[O+--h]*o;return o*=128,P0>=o&&(P0-=Math.pow(2,8*B)),P0},V.prototype.readInt8=function(O,B){return O=O>>>0,B||K(O,1,this.length),this[O]&128?(255-this[O]+1)*-1:this[O]},V.prototype.readInt16LE=function(O,B){O=O>>>0,B||K(O,2,this.length);let b=this[O]|this[O+1]<<8;return b&32768?b|4294901760:b},V.prototype.readInt16BE=function(O,B){O=O>>>0,B||K(O,2,this.length);let b=this[O+1]|this[O]<<8;return b&32768?b|4294901760:b},V.prototype.readInt32LE=function(O,B){return O=O>>>0,B||K(O,4,this.length),this[O]|this[O+1]<<8|this[O+2]<<16|this[O+3]<<24},V.prototype.readInt32BE=function(O,B){return O=O>>>0,B||K(O,4,this.length),this[O]<<24|this[O+1]<<16|this[O+2]<<8|this[O+3]},V.prototype.readBigInt64LE=z0(function(O){O=O>>>0,J0(O,"offset");let B=this[O],b=this[O+7];(B===void 0||b===void 0)&&w(O,this.length-8);let h=this[O+4]+this[O+5]*256+this[O+6]*65536+(b<<24);return(BigInt(h)<<BigInt(32))+BigInt(B+this[++O]*256+this[++O]*65536+this[++O]*16777216)}),V.prototype.readBigInt64BE=z0(function(O){O=O>>>0,J0(O,"offset");let B=this[O],b=this[O+7];(B===void 0||b===void 0)&&w(O,this.length-8);let h=(B<<24)+this[++O]*65536+this[++O]*256+this[++O];return(BigInt(h)<<BigInt(32))+BigInt(this[++O]*16777216+this[++O]*65536+this[++O]*256+b)}),V.prototype.readFloatLE=function(O,B){return O=O>>>0,B||K(O,4,this.length),E.read(this,O,!0,23,4)},V.prototype.readFloatBE=function(O,B){return O=O>>>0,B||K(O,4,this.length),E.read(this,O,!1,23,4)},V.prototype.readDoubleLE=function(O,B){return O=O>>>0,B||K(O,8,this.length),E.read(this,O,!0,52,8)},V.prototype.readDoubleBE=function(O,B){return O=O>>>0,B||K(O,8,this.length),E.read(this,O,!1,52,8)};function R(O,B,b,h,o,P0){if(!V.isBuffer(O))throw new TypeError('"buffer" argument must be a Buffer instance');if(B>o||B<P0)throw new RangeError('"value" argument is out of bounds');if(b+h>O.length)throw new RangeError("Index out of range")}V.prototype.writeUintLE=V.prototype.writeUIntLE=function(O,B,b,h){if(O=+O,B=B>>>0,b=b>>>0,!h){let Y0=Math.pow(2,8*b)-1;R(this,O,B,b,Y0,0)}let o=1,P0=0;for(this[B]=O&255;++P0<b&&(o*=256);)this[B+P0]=O/o&255;return B+b},V.prototype.writeUintBE=V.prototype.writeUIntBE=function(O,B,b,h){if(O=+O,B=B>>>0,b=b>>>0,!h){let Y0=Math.pow(2,8*b)-1;R(this,O,B,b,Y0,0)}let o=b-1,P0=1;for(this[B+o]=O&255;--o>=0&&(P0*=256);)this[B+o]=O/P0&255;return B+b},V.prototype.writeUint8=V.prototype.writeUInt8=function(O,B,b){return O=+O,B=B>>>0,b||R(this,O,B,1,255,0),this[B]=O&255,B+1},V.prototype.writeUint16LE=V.prototype.writeUInt16LE=function(O,B,b){return O=+O,B=B>>>0,b||R(this,O,B,2,65535,0),this[B]=O&255,this[B+1]=O>>>8,B+2},V.prototype.writeUint16BE=V.prototype.writeUInt16BE=function(O,B,b){return O=+O,B=B>>>0,b||R(this,O,B,2,65535,0),this[B]=O>>>8,this[B+1]=O&255,B+2},V.prototype.writeUint32LE=V.prototype.writeUInt32LE=function(O,B,b){return O=+O,B=B>>>0,b||R(this,O,B,4,4294967295,0),this[B+3]=O>>>24,this[B+2]=O>>>16,this[B+1]=O>>>8,this[B]=O&255,B+4},V.prototype.writeUint32BE=V.prototype.writeUInt32BE=function(O,B,b){return O=+O,B=B>>>0,b||R(this,O,B,4,4294967295,0),this[B]=O>>>24,this[B+1]=O>>>16,this[B+2]=O>>>8,this[B+3]=O&255,B+4};function N(O,B,b,h,o){X0(B,h,o,O,b,7);let P0=Number(B&BigInt(4294967295));O[b++]=P0,P0=P0>>8,O[b++]=P0,P0=P0>>8,O[b++]=P0,P0=P0>>8,O[b++]=P0;let Y0=Number(B>>BigInt(32)&BigInt(4294967295));return O[b++]=Y0,Y0=Y0>>8,O[b++]=Y0,Y0=Y0>>8,O[b++]=Y0,Y0=Y0>>8,O[b++]=Y0,b}function _(O,B,b,h,o){X0(B,h,o,O,b,7);let P0=Number(B&BigInt(4294967295));O[b+7]=P0,P0=P0>>8,O[b+6]=P0,P0=P0>>8,O[b+5]=P0,P0=P0>>8,O[b+4]=P0;let Y0=Number(B>>BigInt(32)&BigInt(4294967295));return O[b+3]=Y0,Y0=Y0>>8,O[b+2]=Y0,Y0=Y0>>8,O[b+1]=Y0,Y0=Y0>>8,O[b]=Y0,b+8}V.prototype.writeBigUInt64LE=z0(function(O,B=0){return N(this,O,B,BigInt(0),BigInt("0xffffffffffffffff"))}),V.prototype.writeBigUInt64BE=z0(function(O,B=0){return _(this,O,B,BigInt(0),BigInt("0xffffffffffffffff"))}),V.prototype.writeIntLE=function(O,B,b,h){if(O=+O,B=B>>>0,!h){let F0=Math.pow(2,8*b-1);R(this,O,B,b,F0-1,-F0)}let o=0,P0=1,Y0=0;for(this[B]=O&255;++o<b&&(P0*=256);)O<0&&Y0===0&&this[B+o-1]!==0&&(Y0=1),this[B+o]=(O/P0>>0)-Y0&255;return B+b},V.prototype.writeIntBE=function(O,B,b,h){if(O=+O,B=B>>>0,!h){let F0=Math.pow(2,8*b-1);R(this,O,B,b,F0-1,-F0)}let o=b-1,P0=1,Y0=0;for(this[B+o]=O&255;--o>=0&&(P0*=256);)O<0&&Y0===0&&this[B+o+1]!==0&&(Y0=1),this[B+o]=(O/P0>>0)-Y0&255;return B+b},V.prototype.writeInt8=function(O,B,b){return O=+O,B=B>>>0,b||R(this,O,B,1,127,-128),O<0&&(O=255+O+1),this[B]=O&255,B+1},V.prototype.writeInt16LE=function(O,B,b){return O=+O,B=B>>>0,b||R(this,O,B,2,32767,-32768),this[B]=O&255,this[B+1]=O>>>8,B+2},V.prototype.writeInt16BE=function(O,B,b){return O=+O,B=B>>>0,b||R(this,O,B,2,32767,-32768),this[B]=O>>>8,this[B+1]=O&255,B+2},V.prototype.writeInt32LE=function(O,B,b){return O=+O,B=B>>>0,b||R(this,O,B,4,2147483647,-2147483648),this[B]=O&255,this[B+1]=O>>>8,this[B+2]=O>>>16,this[B+3]=O>>>24,B+4},V.prototype.writeInt32BE=function(O,B,b){return O=+O,B=B>>>0,b||R(this,O,B,4,2147483647,-2147483648),O<0&&(O=4294967295+O+1),this[B]=O>>>24,this[B+1]=O>>>16,this[B+2]=O>>>8,this[B+3]=O&255,B+4},V.prototype.writeBigInt64LE=z0(function(O,B=0){return N(this,O,B,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),V.prototype.writeBigInt64BE=z0(function(O,B=0){return _(this,O,B,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function s(O,B,b,h,o,P0){if(b+h>O.length)throw new RangeError("Index out of range");if(b<0)throw new RangeError("Index out of range")}function r(O,B,b,h,o){return B=+B,b=b>>>0,o||s(O,B,b,4,340282346638528860000000000000000000000,-340282346638528860000000000000000000000),E.write(O,B,b,h,23,4),b+4}V.prototype.writeFloatLE=function(O,B,b){return r(this,O,B,!0,b)},V.prototype.writeFloatBE=function(O,B,b){return r(this,O,B,!1,b)};function H0(O,B,b,h,o){return B=+B,b=b>>>0,o||s(O,B,b,8,179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,-179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000),E.write(O,B,b,h,52,8),b+8}V.prototype.writeDoubleLE=function(O,B,b){return H0(this,O,B,!0,b)},V.prototype.writeDoubleBE=function(O,B,b){return H0(this,O,B,!1,b)},V.prototype.copy=function(O,B,b,h){if(!V.isBuffer(O))throw new TypeError("argument should be a Buffer");if(b||(b=0),!h&&h!==0&&(h=this.length),B>=O.length&&(B=O.length),B||(B=0),h>0&&h<b&&(h=b),h===b||O.length===0||this.length===0)return 0;if(B<0)throw new RangeError("targetStart out of bounds");if(b<0||b>=this.length)throw new RangeError("Index out of range");if(h<0)throw new RangeError("sourceEnd out of bounds");h>this.length&&(h=this.length),O.length-B<h-b&&(h=O.length-B+b);let o=h-b;return this===O&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(B,b,h):Uint8Array.prototype.set.call(O,this.subarray(b,h),B),o},V.prototype.fill=function(O,B,b,h){if(typeof O=="string"){if(typeof B=="string"?(h=B,B=0,b=this.length):typeof b=="string"&&(h=b,b=this.length),h!==void 0&&typeof h!="string")throw new TypeError("encoding must be a string");if(typeof h=="string"&&!V.isEncoding(h))throw new TypeError("Unknown encoding: "+h);if(O.length===1){let P0=O.charCodeAt(0);(h==="utf8"&&P0<128||h==="latin1")&&(O=P0)}}else typeof O=="number"?O=O&255:typeof O=="boolean"&&(O=Number(O));if(B<0||this.length<B||this.length<b)throw new RangeError("Out of range index");if(b<=B)return this;B=B>>>0,b=b===void 0?this.length:b>>>0,O||(O=0);let o;if(typeof O=="number")for(o=B;o<b;++o)this[o]=O;else{let P0=V.isBuffer(O)?O:V.from(O,h),Y0=P0.length;if(Y0===0)throw new TypeError('The value "'+O+'" is invalid for argument "value"');for(o=0;o<b-B;++o)this[o+B]=P0[o%Y0]}return this};var u={};function d(O,B,b){u[O]=class extends b{constructor(){super(),Object.defineProperty(this,"message",{value:B.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${O}]`,this.stack,delete this.name}get code(){return O}set code(h){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:h,writable:!0})}toString(){return`${this.name} [${O}]: ${this.message}`}}}d("ERR_BUFFER_OUT_OF_BOUNDS",function(O){return O?`${O} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),d("ERR_INVALID_ARG_TYPE",function(O,B){return`The "${O}" argument must be of type number. Received type ${typeof B}`},TypeError),d("ERR_OUT_OF_RANGE",function(O,B,b){let h=`The value of "${O}" is out of range.`,o=b;return Number.isInteger(b)&&Math.abs(b)>4294967296?o=f(String(b)):typeof b=="bigint"&&(o=String(b),(b>BigInt(2)**BigInt(32)||b<-(BigInt(2)**BigInt(32)))&&(o=f(o)),o+="n"),h+=` It must be ${B}. Received ${o}`,h},RangeError);function f(O){let B="",b=O.length,h=O[0]==="-"?1:0;for(;b>=h+4;b-=3)B=`_${O.slice(b-3,b)}${B}`;return`${O.slice(0,b)}${B}`}function U0(O,B,b){J0(B,"offset"),(O[B]===void 0||O[B+b]===void 0)&&w(B,O.length-(b+1))}function X0(O,B,b,h,o,P0){if(O>b||O<B){let Y0=typeof B=="bigint"?"n":"",F0;throw P0>3?B===0||B===BigInt(0)?F0=`>= 0${Y0} and < 2${Y0} ** ${(P0+1)*8}${Y0}`:F0=`>= -(2${Y0} ** ${(P0+1)*8-1}${Y0}) and < 2 ** ${(P0+1)*8-1}${Y0}`:F0=`>= ${B}${Y0} and <= ${b}${Y0}`,new u.ERR_OUT_OF_RANGE("value",F0,O)}U0(h,o,P0)}function J0(O,B){if(typeof O!="number")throw new u.ERR_INVALID_ARG_TYPE(B,"number",O)}function w(O,B,b){throw Math.floor(O)!==O?(J0(O,b),new u.ERR_OUT_OF_RANGE(b||"offset","an integer",O)):B<0?new u.ERR_BUFFER_OUT_OF_BOUNDS:new u.ERR_OUT_OF_RANGE(b||"offset",`>= ${b?1:0} and <= ${B}`,O)}var q=/[^+/0-9A-Za-z-_]/g;function m(O){if(O=O.split("=")[0],O=O.trim().replace(q,""),O.length<2)return"";for(;O.length%4!==0;)O=O+"=";return O}function e(O,B){B=B||Infinity;let b,h=O.length,o=null,P0=[];for(let Y0=0;Y0<h;++Y0){if(b=O.charCodeAt(Y0),b>55295&&b<57344){if(!o){if(b>56319){(B-=3)>-1&&P0.push(239,191,189);continue}else if(Y0+1===h){(B-=3)>-1&&P0.push(239,191,189);continue}o=b;continue}if(b<56320){(B-=3)>-1&&P0.push(239,191,189),o=b;continue}b=(o-55296<<10|b-56320)+65536}else o&&(B-=3)>-1&&P0.push(239,191,189);if(o=null,b<128){if((B-=1)<0)break;P0.push(b)}else if(b<2048){if((B-=2)<0)break;P0.push(b>>6|192,b&63|128)}else if(b<65536){if((B-=3)<0)break;P0.push(b>>12|224,b>>6&63|128,b&63|128)}else if(b<1114112){if((B-=4)<0)break;P0.push(b>>18|240,b>>12&63|128,b>>6&63|128,b&63|128)}else throw new Error("Invalid code point")}return P0}function Z0(O){let B=[];for(let b=0;b<O.length;++b)B.push(O.charCodeAt(b)&255);return B}function t(O,B){let b,h,o,P0=[];for(let Y0=0;Y0<O.length&&!((B-=2)<0);++Y0)b=O.charCodeAt(Y0),h=b>>8,o=b%256,P0.push(o),P0.push(h);return P0}function _0(O){return g.toByteArray(m(O))}function $0(O,B,b,h){let o;for(o=0;o<h&&!(o+b>=B.length||o>=O.length);++o)B[o+b]=O[o];return o}function K0(O,B){return O instanceof B||O!=null&&O.constructor!=null&&O.constructor.name!=null&&O.constructor.name===B.name}function w0(O){return O!==O}var C0=function(){let O="0123456789abcdef",B=new Array(256);for(let b=0;b<16;++b){let h=b*16;for(let o=0;o<16;++o)B[h+o]=O[b]+O[o]}return B}();function z0(O){return typeof BigInt>"u"?c0:O}function c0(){throw new Error("BigInt not supported")}}),d0=j0((c,g)=>{var E=V6(),x=E.Buffer;function G(j,V){for(var L in j)V[L]=j[L]}x.from&&x.alloc&&x.allocUnsafe&&x.allocUnsafeSlow?g.exports=E:(G(E,c),c.Buffer=v);function v(j,V,L){return x(j,V,L)}v.prototype=Object.create(x.prototype),G(x,v),v.from=function(j,V,L){if(typeof j=="number")throw new TypeError("Argument must not be a number");return x(j,V,L)},v.alloc=function(j,V,L){if(typeof j!="number")throw new TypeError("Argument must be a number");var P=x(j);return V!==void 0?typeof L=="string"?P.fill(V,L):P.fill(V):P.fill(0),P},v.allocUnsafe=function(j){if(typeof j!="number")throw new TypeError("Argument must be a number");return x(j)},v.allocUnsafeSlow=function(j){if(typeof j!="number")throw new TypeError("Argument must be a number");return E.SlowBuffer(j)}}),w6=j0((c,g)=>{var E=65536,x=4294967295;function G(){throw new Error(`Secure random number generation is not supported by this browser. Use Chrome, Firefox or Internet Explorer 11`)}var v=d0().Buffer,j=global.crypto||global.msCrypto;j&&j.getRandomValues?g.exports=V:g.exports=G;function V(L,P){if(L>x)throw new RangeError("requested too many random bytes");var U=v.allocUnsafe(L);if(L>0)if(L>E)for(var F=0;F<L;F+=E)j.getRandomValues(U.slice(F,F+E));else j.getRandomValues(U);return typeof P=="function"?process.nextTick(function(){P(null,U)}):U}}),p0=j0((c,g)=>{typeof Object.create=="function"?g.exports=function(E,x){x&&(E.super_=x,E.prototype=Object.create(x.prototype,{constructor:{value:E,enumerable:!1,writable:!0,configurable:!0}}))}:g.exports=function(E,x){if(x){E.super_=x;var G=function(){};G.prototype=x.prototype,E.prototype=new G,E.prototype.constructor=E}}}),E6=j0((c,g)=>{var E=typeof Reflect=="object"?Reflect:null,x=E&&typeof E.apply=="function"?E.apply:function(l,n,i){return Function.prototype.apply.call(l,n,i)},G;E&&typeof E.ownKeys=="function"?G=E.ownKeys:Object.getOwnPropertySymbols?G=function(l){return Object.getOwnPropertyNames(l).concat(Object.getOwnPropertySymbols(l))}:G=function(l){return Object.getOwnPropertyNames(l)};function v(l){console&&console.warn&&console.warn(l)}var j=Number.isNaN||function(l){return l!==l};function V(){V.init.call(this)}g.exports=V,g.exports.once=A,V.EventEmitter=V,V.prototype._events=void 0,V.prototype._eventsCount=0,V.prototype._maxListeners=void 0;var L=10;function P(l){if(typeof l!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof l)}Object.defineProperty(V,"defaultMaxListeners",{enumerable:!0,get:function(){return L},set:function(l){if(typeof l!="number"||l<0||j(l))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+l+".");L=l}}),V.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},V.prototype.setMaxListeners=function(l){if(typeof l!="number"||l<0||j(l))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+l+".");return this._maxListeners=l,this};function U(l){return l._maxListeners===void 0?V.defaultMaxListeners:l._maxListeners}V.prototype.getMaxListeners=function(){return U(this)},V.prototype.emit=function(l){for(var n=[],i=1;i<arguments.length;i++)n.push(arguments[i]);var Q0=l==="error",a=this._events;if(a!==void 0)Q0=Q0&&a.error===void 0;else if(!Q0)return!1;if(Q0){var W0;if(n.length>0&&(W0=n[0]),W0 instanceof Error)throw W0;var X=new Error("Unhandled error."+(W0?" ("+W0.message+")":""));throw X.context=W0,X}var H=a[l];if(H===void 0)return!1;if(typeof H=="function")x(H,this,n);else for(var Q=H.length,Y=I(H,Q),i=0;i<Q;++i)x(Y[i],this,n);return!0};function F(l,n,i,Q0){var a,W0,X;if(P(i),W0=l._events,W0===void 0?(W0=l._events=Object.create(null),l._eventsCount=0):(W0.newListener!==void 0&&(l.emit("newListener",n,i.listener?i.listener:i),W0=l._events),X=W0[n]),X===void 0)X=W0[n]=i,++l._eventsCount;else if(typeof X=="function"?X=W0[n]=Q0?[i,X]:[X,i]:Q0?X.unshift(i):X.push(i),a=U(l),a>0&&X.length>a&&!X.warned){X.warned=!0;var H=new Error("Possible EventEmitter memory leak detected. "+X.length+" "+String(n)+" listeners added. Use emitter.setMaxListeners() to increase limit");H.name="MaxListenersExceededWarning",H.emitter=l,H.type=n,H.count=X.length,v(H)}return l}V.prototype.addListener=function(l,n){return F(this,l,n,!1)},V.prototype.on=V.prototype.addListener,V.prototype.prependListener=function(l,n){return F(this,l,n,!0)};function T(){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 k(l,n,i){var Q0={fired:!1,wrapFn:void 0,target:l,type:n,listener:i},a=T.bind(Q0);return a.listener=i,Q0.wrapFn=a,a}V.prototype.once=function(l,n){return P(n),this.on(l,k(this,l,n)),this},V.prototype.prependOnceListener=function(l,n){return P(n),this.prependListener(l,k(this,l,n)),this},V.prototype.removeListener=function(l,n){var i,Q0,a,W0,X;if(P(n),Q0=this._events,Q0===void 0)return this;if(i=Q0[l],i===void 0)return this;if(i===n||i.listener===n)--this._eventsCount===0?this._events=Object.create(null):(delete Q0[l],Q0.removeListener&&this.emit("removeListener",l,i.listener||n));else if(typeof i!="function"){for(a=-1,W0=i.length-1;W0>=0;W0--)if(i[W0]===n||i[W0].listener===n){X=i[W0].listener,a=W0;break}if(a<0)return this;a===0?i.shift():M(i,a),i.length===1&&(Q0[l]=i[0]),Q0.removeListener!==void 0&&this.emit("removeListener",l,X||n)}return this},V.prototype.off=V.prototype.removeListener,V.prototype.removeAllListeners=function(l){var n,i,Q0;if(i=this._events,i===void 0)return this;if(i.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):i[l]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete i[l]),this;if(arguments.length===0){var a=Object.keys(i),W0;for(Q0=0;Q0<a.length;++Q0)W0=a[Q0],W0!=="removeListener"&&this.removeAllListeners(W0);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(n=i[l],typeof n=="function")this.removeListener(l,n);else if(n!==void 0)for(Q0=n.length-1;Q0>=0;Q0--)this.removeListener(l,n[Q0]);return this};function C(l,n,i){var Q0=l._events;if(Q0===void 0)return[];var a=Q0[n];return a===void 0?[]:typeof a=="function"?i?[a.listener||a]:[a]:i?S(a):I(a,a.length)}V.prototype.listeners=function(l){return C(this,l,!0)},V.prototype.rawListeners=function(l){return C(this,l,!1)},V.listenerCount=function(l,n){return typeof l.listenerCount=="function"?l.listenerCount(n):D.call(l,n)},V.prototype.listenerCount=D;function D(l){var n=this._events;if(n!==void 0){var i=n[l];if(typeof i=="function")return 1;if(i!==void 0)return i.length}return 0}V.prototype.eventNames=function(){return this._eventsCount>0?G(this._events):[]};function I(l,n){for(var i=new Array(n),Q0=0;Q0<n;++Q0)i[Q0]=l[Q0];return i}function M(l,n){for(;n+1<l.length;n++)l[n]=l[n+1];l.pop()}function S(l){for(var n=new Array(l.length),i=0;i<n.length;++i)n[i]=l[i].listener||l[i];return n}function A(l,n){return new Promise(function(i,Q0){function a(X){l.removeListener(n,W0),Q0(X)}function W0(){typeof l.removeListener=="function"&&l.removeListener("error",a),i([].slice.call(arguments))}p(l,n,W0,{once:!0}),n!=="error"&&y(l,a,{once:!0})})}function y(l,n,i){typeof l.on=="function"&&p(l,"error",n,i)}function p(l,n,i,Q0){if(typeof l.on=="function")Q0.once?l.once(n,i):l.on(n,i);else if(typeof l.addEventListener=="function")l.addEventListener(n,function a(W0){Q0.once&&l.removeEventListener(n,a),i(W0)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof l)}}),u8=j0((c,g)=>{g.exports=E6().EventEmitter}),t6=j0(()=>{}),K1=j0((c,g)=>{function E(C,D){var I=Object.keys(C);if(Object.getOwnPropertySymbols){var M=Object.getOwnPropertySymbols(C);D&&(M=M.filter(function(S){return Object.getOwnPropertyDescriptor(C,S).enumerable})),I.push.apply(I,M)}return I}function x(C){for(var D=1;D<arguments.length;D++){var I=arguments[D]!=null?arguments[D]:{};D%2?E(Object(I),!0).forEach(function(M){G(C,M,I[M])}):Object.getOwnPropertyDescriptors?Object.defineProperties(C,Object.getOwnPropertyDescriptors(I)):E(Object(I)).forEach(function(M){Object.defineProperty(C,M,Object.getOwnPropertyDescriptor(I,M))})}return C}function G(C,D,I){return D in C?Object.defineProperty(C,D,{value:I,enumerable:!0,configurable:!0,writable:!0}):C[D]=I,C}function v(C,D){if(!(C instanceof D))throw new TypeError("Cannot call a class as a function")}function j(C,D){for(var I=0;I<D.length;I++){var M=D[I];M.enumerable=M.enumerable||!1,M.configurable=!0,"value"in M&&(M.writable=!0),Object.defineProperty(C,M.key,M)}}function V(C,D,I){return D&&j(C.prototype,D),I&&j(C,I),C}var L=V6(),P=L.Buffer,U=t6(),F=U.inspect,T=F&&F.custom||"inspect";function k(C,D,I){P.prototype.copy.call(C,D,I)}g.exports=function(){function C(){v(this,C),this.head=null,this.tail=null,this.length=0}return V(C,[{key:"push",value:function(D){var I={data:D,next:null};this.length>0?this.tail.next=I:this.head=I,this.tail=I,++this.length}},{key:"unshift",value:function(D){var I={data:D,next:this.head};this.length===0&&(this.tail=I),this.head=I,++this.length}},{key:"shift",value:function(){if(this.length!==0){var D=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,D}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(D){if(this.length===0)return"";for(var I=this.head,M=""+I.data;I=I.next;)M+=D+I.data;return M}},{key:"concat",value:function(D){if(this.length===0)return P.alloc(0);for(var I=P.allocUnsafe(D>>>0),M=this.head,S=0;M;)k(M.data,I,S),S+=M.data.length,M=M.next;return I}},{key:"consume",value:function(D,I){var M;return D<this.head.data.length?(M=this.head.data.slice(0,D),this.head.data=this.head.data.slice(D)):D===this.head.data.length?M=this.shift():M=I?this._getString(D):this._getBuffer(D),M}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(D){var I=this.head,M=1,S=I.data;for(D-=S.length;I=I.next;){var A=I.data,y=D>A.length?A.length:D;if(y===A.length?S+=A:S+=A.slice(0,D),D-=y,D===0){y===A.length?(++M,I.next?this.head=I.next:this.head=this.tail=null):(this.head=I,I.data=A.slice(y));break}++M}return this.length-=M,S}},{key:"_getBuffer",value:function(D){var I=P.allocUnsafe(D),M=this.head,S=1;for(M.data.copy(I),D-=M.data.length;M=M.next;){var A=M.data,y=D>A.length?A.length:D;if(A.copy(I,I.length-D,0,y),D-=y,D===0){y===A.length?(++S,M.next?this.head=M.next:this.head=this.tail=null):(this.head=M,M.data=A.slice(y));break}++S}return this.length-=S,I}},{key:T,value:function(D,I){return F(this,x({},I,{depth:0,customInspect:!1}))}}]),C}()}),o8=j0((c,g)=>{function E(L,P){var U=this,F=this._readableState&&this._readableState.destroyed,T=this._writableState&&this._writableState.destroyed;return F||T?(P?P(L):L&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(j,this,L)):process.nextTick(j,this,L)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(L||null,function(k){!P&&k?U._writableState?U._writableState.errorEmitted?process.nextTick(G,U):(U._writableState.errorEmitted=!0,process.nextTick(x,U,k)):process.nextTick(x,U,k):P?(process.nextTick(G,U),P(k)):process.nextTick(G,U)}),this)}function x(L,P){j(L,P),G(L)}function G(L){L._writableState&&!L._writableState.emitClose||L._readableState&&!L._readableState.emitClose||L.emit("close")}function v(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function j(L,P){L.emit("error",P)}function V(L,P){var{_readableState:U,_writableState:F}=L;U&&U.autoDestroy||F&&F.autoDestroy?L.destroy(P):L.emit("error",P)}g.exports={destroy:E,undestroy:v,errorOrDestroy:V}}),y6=j0((c,g)=>{function E(P,U){P.prototype=Object.create(U.prototype),P.prototype.constructor=P,P.__proto__=U}var x={};function G(P,U,F){F||(F=Error);function T(C,D,I){return typeof U=="string"?U:U(C,D,I)}var k=function(C){E(D,C);function D(I,M,S){return C.call(this,T(I,M,S))||this}return D}(F);k.prototype.name=F.name,k.prototype.code=P,x[P]=k}function v(P,U){if(Array.isArray(P)){var F=P.length;return P=P.map(function(T){return String(T)}),F>2?"one of ".concat(U," ").concat(P.slice(0,F-1).join(", "),", or ")+P[F-1]:F===2?"one of ".concat(U," ").concat(P[0]," or ").concat(P[1]):"of ".concat(U," ").concat(P[0])}else return"of ".concat(U," ").concat(String(P))}function j(P,U,F){return P.substr(!F||F<0?0:+F,U.length)===U}function V(P,U,F){return(F===void 0||F>P.length)&&(F=P.length),P.substring(F-U.length,F)===U}function L(P,U,F){return typeof F!="number"&&(F=0),F+U.length>P.length?!1:P.indexOf(U,F)!==-1}G("ERR_INVALID_OPT_VALUE",function(P,U){return'The value "'+U+'" is invalid for option "'+P+'"'},TypeError),G("ERR_INVALID_ARG_TYPE",function(P,U,F){var T;typeof U=="string"&&j(U,"not ")?(T="must not be",U=U.replace(/^not /,"")):T="must be";var k;if(V(P," argument"))k="The ".concat(P," ").concat(T," ").concat(v(U,"type"));else{var C=L(P,".")?"property":"argument";k='The "'.concat(P,'" ').concat(C," ").concat(T," ").concat(v(U,"type"))}return k+=". Received type ".concat(typeof F),k},TypeError),G("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),G("ERR_METHOD_NOT_IMPLEMENTED",function(P){return"The "+P+" method is not implemented"}),G("ERR_STREAM_PREMATURE_CLOSE","Premature close"),G("ERR_STREAM_DESTROYED",function(P){return"Cannot call "+P+" after a stream was destroyed"}),G("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),G("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),G("ERR_STREAM_WRITE_AFTER_END","write after end"),G("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),G("ERR_UNKNOWN_ENCODING",function(P){return"Unknown encoding: "+P},TypeError),G("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),g.exports.codes=x}),s8=j0((c,g)=>{var E=y6().codes.ERR_INVALID_OPT_VALUE;function x(v,j,V){return v.highWaterMark!=null?v.highWaterMark:j?v[V]:null}function G(v,j,V,L){var P=x(j,L,V);if(P!=null){if(!(isFinite(P)&&Math.floor(P)===P)||P<0){var U=L?V:"highWaterMark";throw new E(U,P)}return Math.floor(P)}return v.objectMode?16:16384}g.exports={getHighWaterMark:G}}),f8=j0((c,g)=>{g.exports=E;function E(G,v){if(x("noDeprecation"))return G;var j=!1;function V(){if(!j){if(x("throwDeprecation"))throw new Error(v);x("traceDeprecation")?console.trace(v):console.warn(v),j=!0}return G.apply(this,arguments)}return V}function x(G){try{if(!global.localStorage)return!1}catch{return!1}var v=global.localStorage[G];return v==null?!1:String(v).toLowerCase()==="true"}}),a8=j0((c,g)=>{g.exports=a;function E(u){var d=this;this.next=null,this.entry=null,this.finish=function(){H0(d,u)}}var x;a.WritableState=i;var G={deprecate:f8()},v=u8(),j=V6().Buffer,V=global.Uint8Array||function(){};function L(u){return j.from(u)}function P(u){return j.isBuffer(u)||u instanceof V}var U=o8(),F=s8(),T=F.getHighWaterMark,k=y6().codes,C=k.ERR_INVALID_ARG_TYPE,D=k.ERR_METHOD_NOT_IMPLEMENTED,I=k.ERR_MULTIPLE_CALLBACK,M=k.ERR_STREAM_CANNOT_PIPE,S=k.ERR_STREAM_DESTROYED,A=k.ERR_STREAM_NULL_VALUES,y=k.ERR_STREAM_WRITE_AFTER_END,p=k.ERR_UNKNOWN_ENCODING,l=U.errorOrDestroy;p0()(a,v);function n(){}function i(u,d,f){x=x||M6(),u=u||{},typeof f!="boolean"&&(f=d instanceof x),this.objectMode=!!u.objectMode,f&&(this.objectMode=this.objectMode||!!u.writableObjectMode),this.highWaterMark=T(this,u,"writableHighWaterMark",f),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var U0=u.decodeStrings===!1;this.decodeStrings=!U0,this.defaultEncoding=u.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(X0){z(d,X0)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=u.emitClose!==!1,this.autoDestroy=!!u.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new E(this)}i.prototype.getBuffer=function(){for(var u=this.bufferedRequest,d=[];u;)d.push(u),u=u.next;return d},function(){try{Object.defineProperty(i.prototype,"buffer",{get:G.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}();var Q0;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(Q0=Function.prototype[Symbol.hasInstance],Object.defineProperty(a,Symbol.hasInstance,{value:function(u){return Q0.call(this,u)?!0:this!==a?!1:u&&u._writableState instanceof i}})):Q0=function(u){return u instanceof this};function a(u){x=x||M6();var d=this instanceof x;if(!d&&!Q0.call(a,this))return new a(u);this._writableState=new i(u,this,d),this.writable=!0,u&&(typeof u.write=="function"&&(this._write=u.write),typeof u.writev=="function"&&(this._writev=u.writev),typeof u.destroy=="function"&&(this._destroy=u.destroy),typeof u.final=="function"&&(this._final=u.final)),v.call(this)}a.prototype.pipe=function(){l(this,new M)};function W0(u,d){var f=new y;l(u,f),process.nextTick(d,f)}function X(u,d,f,U0){var X0;return f===null?X0=new A:typeof f!="string"&&!d.objectMode&&(X0=new C("chunk",["string","Buffer"],f)),X0?(l(u,X0),process.nextTick(U0,X0),!1):!0}a.prototype.write=function(u,d,f){var U0=this._writableState,X0=!1,J0=!U0.objectMode&&P(u);return J0&&!j.isBuffer(u)&&(u=L(u)),typeof d=="function"&&(f=d,d=null),J0?d="buffer":d||(d=U0.defaultEncoding),typeof f!="function"&&(f=n),U0.ending?W0(this,f):(J0||X(this,U0,u,f))&&(U0.pendingcb++,X0=Q(this,U0,J0,u,d,f)),X0},a.prototype.cork=function(){this._writableState.corked++},a.prototype.uncork=function(){var u=this._writableState;u.corked&&(u.corked--,!u.writing&&!u.corked&&!u.bufferProcessing&&u.bufferedRequest&&K(this,u))},a.prototype.setDefaultEncoding=function(u){if(typeof u=="string"&&(u=u.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((u+"").toLowerCase())>-1))throw new p(u);return this._writableState.defaultEncoding=u,this},Object.defineProperty(a.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function H(u,d,f){return!u.objectMode&&u.decodeStrings!==!1&&typeof d=="string"&&(d=j.from(d,f)),d}Object.defineProperty(a.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function Q(u,d,f,U0,X0,J0){if(!f){var w=H(d,U0,X0);U0!==w&&(f=!0,X0="buffer",U0=w)}var q=d.objectMode?1:U0.length;d.length+=q;var m=d.length<d.highWaterMark;if(m||(d.needDrain=!0),d.writing||d.corked){var e=d.lastBufferedRequest;d.lastBufferedRequest={chunk:U0,encoding:X0,isBuf:f,callback:J0,next:null},e?e.next=d.lastBufferedRequest:d.bufferedRequest=d.lastBufferedRequest,d.bufferedRequestCount+=1}else Y(u,d,!1,q,U0,X0,J0);return m}function Y(u,d,f,U0,X0,J0,w){d.writelen=U0,d.writecb=w,d.writing=!0,d.sync=!0,d.destroyed?d.onwrite(new S("write")):f?u._writev(X0,d.onwrite):u._write(X0,J0,d.onwrite),d.sync=!1}function J(u,d,f,U0,X0){--d.pendingcb,f?(process.nextTick(X0,U0),process.nextTick(s,u,d),u._writableState.errorEmitted=!0,l(u,U0)):(X0(U0),u._writableState.errorEmitted=!0,l(u,U0),s(u,d))}function W(u){u.writing=!1,u.writecb=null,u.length-=u.writelen,u.writelen=0}function z(u,d){var f=u._writableState,U0=f.sync,X0=f.writecb;if(typeof X0!="function")throw new I;if(W(f),d)J(u,f,U0,d,X0);else{var J0=R(f)||u.destroyed;!J0&&!f.corked&&!f.bufferProcessing&&f.bufferedRequest&&K(u,f),U0?process.nextTick($,u,f,J0,X0):$(u,f,J0,X0)}}function $(u,d,f,U0){f||Z(u,d),d.pendingcb--,U0(),s(u,d)}function Z(u,d){d.length===0&&d.needDrain&&(d.needDrain=!1,u.emit("drain"))}function K(u,d){d.bufferProcessing=!0;var f=d.bufferedRequest;if(u._writev&&f&&f.next){var U0=d.bufferedRequestCount,X0=new Array(U0),J0=d.corkedRequestsFree;J0.entry=f;for(var w=0,q=!0;f;)X0[w]=f,f.isBuf||(q=!1),f=f.next,w+=1;X0.allBuffers=q,Y(u,d,!0,d.length,X0,"",J0.finish),d.pendingcb++,d.lastBufferedRequest=null,J0.next?(d.corkedRequestsFree=J0.next,J0.next=null):d.corkedRequestsFree=new E(d),d.bufferedRequestCount=0}else{for(;f;){var{chunk:m,encoding:e,callback:Z0}=f,t=d.objectMode?1:m.length;if(Y(u,d,!1,t,m,e,Z0),f=f.next,d.bufferedRequestCo