UNPKG

@imgly/idml-importer

Version:

Import IDML files into the Creative Editor Ecosystem

2 lines 326 kB
var uQ=Object.create;var{getPrototypeOf:mQ,defineProperty:N6,getOwnPropertyNames:Cj,getOwnPropertyDescriptor:dQ}=Object,Rj=Object.prototype.hasOwnProperty;var oQ=($,J,j)=>{j=$!=null?uQ(mQ($)):{};const Q=J||!$||!$.__esModule?N6(j,"default",{value:$,enumerable:!0}):j;for(let X of Cj($))if(!Rj.call(Q,X))N6(Q,X,{get:()=>$[X],enumerable:!0});return Q},Dj=new WeakMap,t0=($)=>{var J=Dj.get($),j;if(J)return J;if(J=N6({},"__esModule",{value:!0}),$&&typeof $==="object"||typeof $==="function")Cj($).map((Q)=>!Rj.call(J,Q)&&N6(J,Q,{get:()=>$[Q],enumerable:!(j=dQ($,Q))||j.enumerable}));return Dj.set($,J),J};var Q0=($,J)=>()=>(J||$((J={exports:{}}).exports,J),J.exports);var P8=($,J)=>{for(var j in J)N6($,j,{get:J[j],enumerable:!0,configurable:!0,set:(Q)=>J[j]=()=>Q})};var q8=($,J)=>()=>($&&(J=$($=0)),J);var v8={};P8(v8,{default:()=>nj});var tQ,U8,eQ,$4,j4,J4,V4=($,J)=>()=>($&&(J=$($=0)),J),Z0=($,J)=>()=>(J||$((J={exports:{}}).exports,J),J.exports),pj=($,J)=>{for(var j in J)U8($,j,{get:J[j],enumerable:!0})},X8=($,J,j,Q)=>{if(J&&typeof J=="object"||typeof J=="function")for(let X of $4(J))!J4.call($,X)&&X!==j&&U8($,X,{get:()=>J[X],enumerable:!(Q=eQ(J,X))||Q.enumerable});return $},bj=($,J,j)=>(X8($,J,"default"),j&&X8(j,J,"default")),Y8=($,J,j)=>(j=$!=null?tQ(j4($)):{},X8(J||!$||!$.__esModule?U8(j,"default",{value:$,enumerable:!0}):j,$)),E1=($)=>X8(U8({},"__esModule",{value:!0}),$),Q4,P4,F1,T0,q1,H5,h0,G8,fj,X1,hj,T1,g1,x1,q4,a1,L5,z5,F5,y4,Z5,X4,Y4,_j,K8,cj,U4,y1,uj,mj,A5,G4,dj,K4,oj,lj,nj;var O8=q8(()=>{tQ=Object.create,U8=Object.defineProperty,eQ=Object.getOwnPropertyDescriptor,$4=Object.getOwnPropertyNames,j4=Object.getPrototypeOf,J4=Object.prototype.hasOwnProperty,Q4=Z0(($)=>{$.byteLength=v,$.toByteArray=O,$.fromByteArray=D;var J=[],j=[],Q=typeof Uint8Array<"u"?Uint8Array:Array,X="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(Y=0,U=X.length;Y<U;++Y)J[Y]=X[Y],j[X.charCodeAt(Y)]=Y;var Y,U;j["-".charCodeAt(0)]=62,j["_".charCodeAt(0)]=63;function q(I){var B=I.length;if(B%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var S=I.indexOf("=");S===-1&&(S=B);var T=S===B?0:4-S%4;return[S,T]}function v(I){var B=q(I),S=B[0],T=B[1];return(S+T)*3/4-T}function G(I,B,S){return(B+S)*3/4-S}function O(I){var B,S=q(I),T=S[0],H=S[1],A=new Q(G(I,T,H)),z=0,R=H>0?T-4:T,M;for(M=0;M<R;M+=4)B=j[I.charCodeAt(M)]<<18|j[I.charCodeAt(M+1)]<<12|j[I.charCodeAt(M+2)]<<6|j[I.charCodeAt(M+3)],A[z++]=B>>16&255,A[z++]=B>>8&255,A[z++]=B&255;return H===2&&(B=j[I.charCodeAt(M)]<<2|j[I.charCodeAt(M+1)]>>4,A[z++]=B&255),H===1&&(B=j[I.charCodeAt(M)]<<10|j[I.charCodeAt(M+1)]<<4|j[I.charCodeAt(M+2)]>>2,A[z++]=B>>8&255,A[z++]=B&255),A}function Z(I){return J[I>>18&63]+J[I>>12&63]+J[I>>6&63]+J[I&63]}function F(I,B,S){for(var T,H=[],A=B;A<S;A+=3)T=(I[A]<<16&16711680)+(I[A+1]<<8&65280)+(I[A+2]&255),H.push(Z(T));return H.join("")}function D(I){for(var B,S=I.length,T=S%3,H=[],A=16383,z=0,R=S-T;z<R;z+=A)H.push(F(I,z,z+A>R?R:z+A));return T===1?(B=I[S-1],H.push(J[B>>2]+J[B<<4&63]+"==")):T===2&&(B=(I[S-2]<<8)+I[S-1],H.push(J[B>>10]+J[B>>4&63]+J[B<<2&63]+"=")),H.join("")}}),P4=Z0(($)=>{$.read=function(J,j,Q,X,Y){var U,q,v=Y*8-X-1,G=(1<<v)-1,O=G>>1,Z=-7,F=Q?Y-1:0,D=Q?-1:1,I=J[j+F];for(F+=D,U=I&(1<<-Z)-1,I>>=-Z,Z+=v;Z>0;U=U*256+J[j+F],F+=D,Z-=8);for(q=U&(1<<-Z)-1,U>>=-Z,Z+=X;Z>0;q=q*256+J[j+F],F+=D,Z-=8);if(U===0)U=1-O;else{if(U===G)return q?NaN:(I?-1:1)*(1/0);q=q+Math.pow(2,X),U=U-O}return(I?-1:1)*q*Math.pow(2,U-X)},$.write=function(J,j,Q,X,Y,U){var q,v,G,O=U*8-Y-1,Z=(1<<O)-1,F=Z>>1,D=Y===23?Math.pow(2,-24)-Math.pow(2,-77):0,I=X?0:U-1,B=X?1:-1,S=j<0||j===0&&1/j<0?1:0;for(j=Math.abs(j),isNaN(j)||j===1/0?(v=isNaN(j)?1:0,q=Z):(q=Math.floor(Math.log(j)/Math.LN2),j*(G=Math.pow(2,-q))<1&&(q--,G*=2),q+F>=1?j+=D/G:j+=D*Math.pow(2,1-F),j*G>=2&&(q++,G/=2),q+F>=Z?(v=0,q=Z):q+F>=1?(v=(j*G-1)*Math.pow(2,Y),q=q+F):(v=j*Math.pow(2,F-1)*Math.pow(2,Y),q=0));Y>=8;J[Q+I]=v&255,I+=B,v/=256,Y-=8);for(q=q<<Y|v,O+=Y;O>0;J[Q+I]=q&255,I+=B,q/=256,O-=8);J[Q+I-B]|=S*128}}),F1=Z0(($)=>{var J=Q4(),j=P4(),Q=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;$.Buffer=q,$.SlowBuffer=H,$.INSPECT_MAX_BYTES=50;var X=2147483647;$.kMaxLength=X,q.TYPED_ARRAY_SUPPORT=Y(),!q.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 Y(){try{let V=new Uint8Array(1),P={foo:function(){return 42}};return Object.setPrototypeOf(P,Uint8Array.prototype),Object.setPrototypeOf(V,P),V.foo()===42}catch{return!1}}Object.defineProperty(q.prototype,"parent",{enumerable:!0,get:function(){if(q.isBuffer(this))return this.buffer}}),Object.defineProperty(q.prototype,"offset",{enumerable:!0,get:function(){if(q.isBuffer(this))return this.byteOffset}});function U(V){if(V>X)throw new RangeError('The value "'+V+'" is invalid for option "size"');let P=new Uint8Array(V);return Object.setPrototypeOf(P,q.prototype),P}function q(V,P,y){if(typeof V=="number"){if(typeof P=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return Z(V)}return v(V,P,y)}q.poolSize=8192;function v(V,P,y){if(typeof V=="string")return F(V,P);if(ArrayBuffer.isView(V))return I(V);if(V==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof V);if(v0(V,ArrayBuffer)||V&&v0(V.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(v0(V,SharedArrayBuffer)||V&&v0(V.buffer,SharedArrayBuffer)))return B(V,P,y);if(typeof V=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let K=V.valueOf&&V.valueOf();if(K!=null&&K!==V)return q.from(K,P,y);let W=S(V);if(W)return W;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof V[Symbol.toPrimitive]=="function")return q.from(V[Symbol.toPrimitive]("string"),P,y);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof V)}q.from=function(V,P,y){return v(V,P,y)},Object.setPrototypeOf(q.prototype,Uint8Array.prototype),Object.setPrototypeOf(q,Uint8Array);function G(V){if(typeof V!="number")throw new TypeError('"size" argument must be of type number');if(V<0)throw new RangeError('The value "'+V+'" is invalid for option "size"')}function O(V,P,y){return G(V),V<=0?U(V):P!==void 0?typeof y=="string"?U(V).fill(P,y):U(V).fill(P):U(V)}q.alloc=function(V,P,y){return O(V,P,y)};function Z(V){return G(V),U(V<0?0:T(V)|0)}q.allocUnsafe=function(V){return Z(V)},q.allocUnsafeSlow=function(V){return Z(V)};function F(V,P){if((typeof P!="string"||P==="")&&(P="utf8"),!q.isEncoding(P))throw new TypeError("Unknown encoding: "+P);let y=A(V,P)|0,K=U(y),W=K.write(V,P);return W!==y&&(K=K.slice(0,W)),K}function D(V){let P=V.length<0?0:T(V.length)|0,y=U(P);for(let K=0;K<P;K+=1)y[K]=V[K]&255;return y}function I(V){if(v0(V,Uint8Array)){let P=new Uint8Array(V);return B(P.buffer,P.byteOffset,P.byteLength)}return D(V)}function B(V,P,y){if(P<0||V.byteLength<P)throw new RangeError('"offset" is outside of buffer bounds');if(V.byteLength<P+(y||0))throw new RangeError('"length" is outside of buffer bounds');let K;return P===void 0&&y===void 0?K=new Uint8Array(V):y===void 0?K=new Uint8Array(V,P):K=new Uint8Array(V,P,y),Object.setPrototypeOf(K,q.prototype),K}function S(V){if(q.isBuffer(V)){let P=T(V.length)|0,y=U(P);return y.length===0||V.copy(y,0,0,P),y}if(V.length!==void 0)return typeof V.length!="number"||x0(V.length)?U(0):D(V);if(V.type==="Buffer"&&Array.isArray(V.data))return D(V.data)}function T(V){if(V>=X)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+X.toString(16)+" bytes");return V|0}function H(V){return+V!=V&&(V=0),q.alloc(+V)}q.isBuffer=function(V){return V!=null&&V._isBuffer===!0&&V!==q.prototype},q.compare=function(V,P){if(v0(V,Uint8Array)&&(V=q.from(V,V.offset,V.byteLength)),v0(P,Uint8Array)&&(P=q.from(P,P.offset,P.byteLength)),!q.isBuffer(V)||!q.isBuffer(P))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(V===P)return 0;let y=V.length,K=P.length;for(let W=0,w=Math.min(y,K);W<w;++W)if(V[W]!==P[W]){y=V[W],K=P[W];break}return y<K?-1:K<y?1:0},q.isEncoding=function(V){switch(String(V).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}},q.concat=function(V,P){if(!Array.isArray(V))throw new TypeError('"list" argument must be an Array of Buffers');if(V.length===0)return q.alloc(0);let y;if(P===void 0)for(P=0,y=0;y<V.length;++y)P+=V[y].length;let K=q.allocUnsafe(P),W=0;for(y=0;y<V.length;++y){let w=V[y];if(v0(w,Uint8Array))W+w.length>K.length?(q.isBuffer(w)||(w=q.from(w)),w.copy(K,W)):Uint8Array.prototype.set.call(K,w,W);else if(q.isBuffer(w))w.copy(K,W);else throw new TypeError('"list" argument must be an Array of Buffers');W+=w.length}return K};function A(V,P){if(q.isBuffer(V))return V.length;if(ArrayBuffer.isView(V)||v0(V,ArrayBuffer))return V.byteLength;if(typeof V!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof V);let y=V.length,K=arguments.length>2&&arguments[2]===!0;if(!K&&y===0)return 0;let W=!1;for(;;)switch(P){case"ascii":case"latin1":case"binary":return y;case"utf8":case"utf-8":return d(V).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return y*2;case"hex":return y>>>1;case"base64":return W0(V).length;default:if(W)return K?-1:d(V).length;P=(""+P).toLowerCase(),W=!0}}q.byteLength=A;function z(V,P,y){let K=!1;if((P===void 0||P<0)&&(P=0),P>this.length||((y===void 0||y>this.length)&&(y=this.length),y<=0)||(y>>>=0,P>>>=0,y<=P))return"";for(V||(V="utf8");;)switch(V){case"hex":return J0(this,P,y);case"utf8":case"utf-8":return i(this,P,y);case"ascii":return l(this,P,y);case"latin1":case"binary":return s(this,P,y);case"base64":return h(this,P,y);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return a(this,P,y);default:if(K)throw new TypeError("Unknown encoding: "+V);V=(V+"").toLowerCase(),K=!0}}q.prototype._isBuffer=!0;function R(V,P,y){let K=V[P];V[P]=V[y],V[y]=K}q.prototype.swap16=function(){let V=this.length;if(V%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let P=0;P<V;P+=2)R(this,P,P+1);return this},q.prototype.swap32=function(){let V=this.length;if(V%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let P=0;P<V;P+=4)R(this,P,P+3),R(this,P+1,P+2);return this},q.prototype.swap64=function(){let V=this.length;if(V%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let P=0;P<V;P+=8)R(this,P,P+7),R(this,P+1,P+6),R(this,P+2,P+5),R(this,P+3,P+4);return this},q.prototype.toString=function(){let V=this.length;return V===0?"":arguments.length===0?i(this,0,V):z.apply(this,arguments)},q.prototype.toLocaleString=q.prototype.toString,q.prototype.equals=function(V){if(!q.isBuffer(V))throw new TypeError("Argument must be a Buffer");return this===V?!0:q.compare(this,V)===0},q.prototype.inspect=function(){let V="",P=$.INSPECT_MAX_BYTES;return V=this.toString("hex",0,P).replace(/(.{2})/g,"$1 ").trim(),this.length>P&&(V+=" ... "),"<Buffer "+V+">"},Q&&(q.prototype[Q]=q.prototype.inspect),q.prototype.compare=function(V,P,y,K,W){if(v0(V,Uint8Array)&&(V=q.from(V,V.offset,V.byteLength)),!q.isBuffer(V))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof V);if(P===void 0&&(P=0),y===void 0&&(y=V?V.length:0),K===void 0&&(K=0),W===void 0&&(W=this.length),P<0||y>V.length||K<0||W>this.length)throw new RangeError("out of range index");if(K>=W&&P>=y)return 0;if(K>=W)return-1;if(P>=y)return 1;if(P>>>=0,y>>>=0,K>>>=0,W>>>=0,this===V)return 0;let w=W-K,f=y-P,y0=Math.min(w,f),H0=this.slice(K,W),U0=V.slice(P,y);for(let Y0=0;Y0<y0;++Y0)if(H0[Y0]!==U0[Y0]){w=H0[Y0],f=U0[Y0];break}return w<f?-1:f<w?1:0};function M(V,P,y,K,W){if(V.length===0)return-1;if(typeof y=="string"?(K=y,y=0):y>2147483647?y=2147483647:y<-2147483648&&(y=-2147483648),y=+y,x0(y)&&(y=W?0:V.length-1),y<0&&(y=V.length+y),y>=V.length){if(W)return-1;y=V.length-1}else if(y<0)if(W)y=0;else return-1;if(typeof P=="string"&&(P=q.from(P,K)),q.isBuffer(P))return P.length===0?-1:x(V,P,y,K,W);if(typeof P=="number")return P=P&255,typeof Uint8Array.prototype.indexOf=="function"?W?Uint8Array.prototype.indexOf.call(V,P,y):Uint8Array.prototype.lastIndexOf.call(V,P,y):x(V,[P],y,K,W);throw new TypeError("val must be string, number or Buffer")}function x(V,P,y,K,W){let w=1,f=V.length,y0=P.length;if(K!==void 0&&(K=String(K).toLowerCase(),K==="ucs2"||K==="ucs-2"||K==="utf16le"||K==="utf-16le")){if(V.length<2||P.length<2)return-1;w=2,f/=2,y0/=2,y/=2}function H0(Y0,K0){return w===1?Y0[K0]:Y0.readUInt16BE(K0*w)}let U0;if(W){let Y0=-1;for(U0=y;U0<f;U0++)if(H0(V,U0)===H0(P,Y0===-1?0:U0-Y0)){if(Y0===-1&&(Y0=U0),U0-Y0+1===y0)return Y0*w}else Y0!==-1&&(U0-=U0-Y0),Y0=-1}else for(y+y0>f&&(y=f-y0),U0=y;U0>=0;U0--){let Y0=!0;for(let K0=0;K0<y0;K0++)if(H0(V,U0+K0)!==H0(P,K0)){Y0=!1;break}if(Y0)return U0}return-1}q.prototype.includes=function(V,P,y){return this.indexOf(V,P,y)!==-1},q.prototype.indexOf=function(V,P,y){return M(this,V,P,y,!0)},q.prototype.lastIndexOf=function(V,P,y){return M(this,V,P,y,!1)};function p(V,P,y,K){y=Number(y)||0;let W=V.length-y;K?(K=Number(K),K>W&&(K=W)):K=W;let w=P.length;K>w/2&&(K=w/2);let f;for(f=0;f<K;++f){let y0=parseInt(P.substr(f*2,2),16);if(x0(y0))return f;V[y+f]=y0}return f}function n(V,P,y,K){return G0(d(P,V.length-y),V,y,K)}function r(V,P,y,K){return G0(j0(P),V,y,K)}function m(V,P,y,K){return G0(W0(P),V,y,K)}function N(V,P,y,K){return G0(b(P,V.length-y),V,y,K)}q.prototype.write=function(V,P,y,K){if(P===void 0)K="utf8",y=this.length,P=0;else if(y===void 0&&typeof P=="string")K=P,y=this.length,P=0;else if(isFinite(P))P=P>>>0,isFinite(y)?(y=y>>>0,K===void 0&&(K="utf8")):(K=y,y=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let W=this.length-P;if((y===void 0||y>W)&&(y=W),V.length>0&&(y<0||P<0)||P>this.length)throw new RangeError("Attempt to write outside buffer bounds");K||(K="utf8");let w=!1;for(;;)switch(K){case"hex":return p(this,V,P,y);case"utf8":case"utf-8":return n(this,V,P,y);case"ascii":case"latin1":case"binary":return r(this,V,P,y);case"base64":return m(this,V,P,y);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return N(this,V,P,y);default:if(w)throw new TypeError("Unknown encoding: "+K);K=(""+K).toLowerCase(),w=!0}},q.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function h(V,P,y){return P===0&&y===V.length?J.fromByteArray(V):J.fromByteArray(V.slice(P,y))}function i(V,P,y){y=Math.min(V.length,y);let K=[],W=P;for(;W<y;){let w=V[W],f=null,y0=w>239?4:w>223?3:w>191?2:1;if(W+y0<=y){let H0,U0,Y0,K0;switch(y0){case 1:w<128&&(f=w);break;case 2:H0=V[W+1],(H0&192)===128&&(K0=(w&31)<<6|H0&63,K0>127&&(f=K0));break;case 3:H0=V[W+1],U0=V[W+2],(H0&192)===128&&(U0&192)===128&&(K0=(w&15)<<12|(H0&63)<<6|U0&63,K0>2047&&(K0<55296||K0>57343)&&(f=K0));break;case 4:H0=V[W+1],U0=V[W+2],Y0=V[W+3],(H0&192)===128&&(U0&192)===128&&(Y0&192)===128&&(K0=(w&15)<<18|(H0&63)<<12|(U0&63)<<6|Y0&63,K0>65535&&K0<1114112&&(f=K0))}}f===null?(f=65533,y0=1):f>65535&&(f-=65536,K.push(f>>>10&1023|55296),f=56320|f&1023),K.push(f),W+=y0}return _(K)}var C=4096;function _(V){let P=V.length;if(P<=C)return String.fromCharCode.apply(String,V);let y="",K=0;for(;K<P;)y+=String.fromCharCode.apply(String,V.slice(K,K+=C));return y}function l(V,P,y){let K="";y=Math.min(V.length,y);for(let W=P;W<y;++W)K+=String.fromCharCode(V[W]&127);return K}function s(V,P,y){let K="";y=Math.min(V.length,y);for(let W=P;W<y;++W)K+=String.fromCharCode(V[W]);return K}function J0(V,P,y){let K=V.length;(!P||P<0)&&(P=0),(!y||y<0||y>K)&&(y=K);let W="";for(let w=P;w<y;++w)W+=i0[V[w]];return W}function a(V,P,y){let K=V.slice(P,y),W="";for(let w=0;w<K.length-1;w+=2)W+=String.fromCharCode(K[w]+K[w+1]*256);return W}q.prototype.slice=function(V,P){let y=this.length;V=~~V,P=P===void 0?y:~~P,V<0?(V+=y,V<0&&(V=0)):V>y&&(V=y),P<0?(P+=y,P<0&&(P=0)):P>y&&(P=y),P<V&&(P=V);let K=this.subarray(V,P);return Object.setPrototypeOf(K,q.prototype),K};function o(V,P,y){if(V%1!==0||V<0)throw new RangeError("offset is not uint");if(V+P>y)throw new RangeError("Trying to access beyond buffer length")}q.prototype.readUintLE=q.prototype.readUIntLE=function(V,P,y){V=V>>>0,P=P>>>0,y||o(V,P,this.length);let K=this[V],W=1,w=0;for(;++w<P&&(W*=256);)K+=this[V+w]*W;return K},q.prototype.readUintBE=q.prototype.readUIntBE=function(V,P,y){V=V>>>0,P=P>>>0,y||o(V,P,this.length);let K=this[V+--P],W=1;for(;P>0&&(W*=256);)K+=this[V+--P]*W;return K},q.prototype.readUint8=q.prototype.readUInt8=function(V,P){return V=V>>>0,P||o(V,1,this.length),this[V]},q.prototype.readUint16LE=q.prototype.readUInt16LE=function(V,P){return V=V>>>0,P||o(V,2,this.length),this[V]|this[V+1]<<8},q.prototype.readUint16BE=q.prototype.readUInt16BE=function(V,P){return V=V>>>0,P||o(V,2,this.length),this[V]<<8|this[V+1]},q.prototype.readUint32LE=q.prototype.readUInt32LE=function(V,P){return V=V>>>0,P||o(V,4,this.length),(this[V]|this[V+1]<<8|this[V+2]<<16)+this[V+3]*16777216},q.prototype.readUint32BE=q.prototype.readUInt32BE=function(V,P){return V=V>>>0,P||o(V,4,this.length),this[V]*16777216+(this[V+1]<<16|this[V+2]<<8|this[V+3])},q.prototype.readBigUInt64LE=F0(function(V){V=V>>>0,L0(V,"offset");let P=this[V],y=this[V+7];(P===void 0||y===void 0)&&u(V,this.length-8);let K=P+this[++V]*256+this[++V]*65536+this[++V]*16777216,W=this[++V]+this[++V]*256+this[++V]*65536+y*16777216;return BigInt(K)+(BigInt(W)<<BigInt(32))}),q.prototype.readBigUInt64BE=F0(function(V){V=V>>>0,L0(V,"offset");let P=this[V],y=this[V+7];(P===void 0||y===void 0)&&u(V,this.length-8);let K=P*16777216+this[++V]*65536+this[++V]*256+this[++V],W=this[++V]*16777216+this[++V]*65536+this[++V]*256+y;return(BigInt(K)<<BigInt(32))+BigInt(W)}),q.prototype.readIntLE=function(V,P,y){V=V>>>0,P=P>>>0,y||o(V,P,this.length);let K=this[V],W=1,w=0;for(;++w<P&&(W*=256);)K+=this[V+w]*W;return W*=128,K>=W&&(K-=Math.pow(2,8*P)),K},q.prototype.readIntBE=function(V,P,y){V=V>>>0,P=P>>>0,y||o(V,P,this.length);let K=P,W=1,w=this[V+--K];for(;K>0&&(W*=256);)w+=this[V+--K]*W;return W*=128,w>=W&&(w-=Math.pow(2,8*P)),w},q.prototype.readInt8=function(V,P){return V=V>>>0,P||o(V,1,this.length),this[V]&128?(255-this[V]+1)*-1:this[V]},q.prototype.readInt16LE=function(V,P){V=V>>>0,P||o(V,2,this.length);let y=this[V]|this[V+1]<<8;return y&32768?y|4294901760:y},q.prototype.readInt16BE=function(V,P){V=V>>>0,P||o(V,2,this.length);let y=this[V+1]|this[V]<<8;return y&32768?y|4294901760:y},q.prototype.readInt32LE=function(V,P){return V=V>>>0,P||o(V,4,this.length),this[V]|this[V+1]<<8|this[V+2]<<16|this[V+3]<<24},q.prototype.readInt32BE=function(V,P){return V=V>>>0,P||o(V,4,this.length),this[V]<<24|this[V+1]<<16|this[V+2]<<8|this[V+3]},q.prototype.readBigInt64LE=F0(function(V){V=V>>>0,L0(V,"offset");let P=this[V],y=this[V+7];(P===void 0||y===void 0)&&u(V,this.length-8);let K=this[V+4]+this[V+5]*256+this[V+6]*65536+(y<<24);return(BigInt(K)<<BigInt(32))+BigInt(P+this[++V]*256+this[++V]*65536+this[++V]*16777216)}),q.prototype.readBigInt64BE=F0(function(V){V=V>>>0,L0(V,"offset");let P=this[V],y=this[V+7];(P===void 0||y===void 0)&&u(V,this.length-8);let K=(P<<24)+this[++V]*65536+this[++V]*256+this[++V];return(BigInt(K)<<BigInt(32))+BigInt(this[++V]*16777216+this[++V]*65536+this[++V]*256+y)}),q.prototype.readFloatLE=function(V,P){return V=V>>>0,P||o(V,4,this.length),j.read(this,V,!0,23,4)},q.prototype.readFloatBE=function(V,P){return V=V>>>0,P||o(V,4,this.length),j.read(this,V,!1,23,4)},q.prototype.readDoubleLE=function(V,P){return V=V>>>0,P||o(V,8,this.length),j.read(this,V,!0,52,8)},q.prototype.readDoubleBE=function(V,P){return V=V>>>0,P||o(V,8,this.length),j.read(this,V,!1,52,8)};function L(V,P,y,K,W,w){if(!q.isBuffer(V))throw new TypeError('"buffer" argument must be a Buffer instance');if(P>W||P<w)throw new RangeError('"value" argument is out of bounds');if(y+K>V.length)throw new RangeError("Index out of range")}q.prototype.writeUintLE=q.prototype.writeUIntLE=function(V,P,y,K){if(V=+V,P=P>>>0,y=y>>>0,!K){let f=Math.pow(2,8*y)-1;L(this,V,P,y,f,0)}let W=1,w=0;for(this[P]=V&255;++w<y&&(W*=256);)this[P+w]=V/W&255;return P+y},q.prototype.writeUintBE=q.prototype.writeUIntBE=function(V,P,y,K){if(V=+V,P=P>>>0,y=y>>>0,!K){let f=Math.pow(2,8*y)-1;L(this,V,P,y,f,0)}let W=y-1,w=1;for(this[P+W]=V&255;--W>=0&&(w*=256);)this[P+W]=V/w&255;return P+y},q.prototype.writeUint8=q.prototype.writeUInt8=function(V,P,y){return V=+V,P=P>>>0,y||L(this,V,P,1,255,0),this[P]=V&255,P+1},q.prototype.writeUint16LE=q.prototype.writeUInt16LE=function(V,P,y){return V=+V,P=P>>>0,y||L(this,V,P,2,65535,0),this[P]=V&255,this[P+1]=V>>>8,P+2},q.prototype.writeUint16BE=q.prototype.writeUInt16BE=function(V,P,y){return V=+V,P=P>>>0,y||L(this,V,P,2,65535,0),this[P]=V>>>8,this[P+1]=V&255,P+2},q.prototype.writeUint32LE=q.prototype.writeUInt32LE=function(V,P,y){return V=+V,P=P>>>0,y||L(this,V,P,4,4294967295,0),this[P+3]=V>>>24,this[P+2]=V>>>16,this[P+1]=V>>>8,this[P]=V&255,P+4},q.prototype.writeUint32BE=q.prototype.writeUInt32BE=function(V,P,y){return V=+V,P=P>>>0,y||L(this,V,P,4,4294967295,0),this[P]=V>>>24,this[P+1]=V>>>16,this[P+2]=V>>>8,this[P+3]=V&255,P+4};function k(V,P,y,K,W){P0(P,K,W,V,y,7);let w=Number(P&BigInt(4294967295));V[y++]=w,w=w>>8,V[y++]=w,w=w>>8,V[y++]=w,w=w>>8,V[y++]=w;let f=Number(P>>BigInt(32)&BigInt(4294967295));return V[y++]=f,f=f>>8,V[y++]=f,f=f>>8,V[y++]=f,f=f>>8,V[y++]=f,y}function c(V,P,y,K,W){P0(P,K,W,V,y,7);let w=Number(P&BigInt(4294967295));V[y+7]=w,w=w>>8,V[y+6]=w,w=w>>8,V[y+5]=w,w=w>>8,V[y+4]=w;let f=Number(P>>BigInt(32)&BigInt(4294967295));return V[y+3]=f,f=f>>8,V[y+2]=f,f=f>>8,V[y+1]=f,f=f>>8,V[y]=f,y+8}q.prototype.writeBigUInt64LE=F0(function(V,P=0){return k(this,V,P,BigInt(0),BigInt("0xffffffffffffffff"))}),q.prototype.writeBigUInt64BE=F0(function(V,P=0){return c(this,V,P,BigInt(0),BigInt("0xffffffffffffffff"))}),q.prototype.writeIntLE=function(V,P,y,K){if(V=+V,P=P>>>0,!K){let y0=Math.pow(2,8*y-1);L(this,V,P,y,y0-1,-y0)}let W=0,w=1,f=0;for(this[P]=V&255;++W<y&&(w*=256);)V<0&&f===0&&this[P+W-1]!==0&&(f=1),this[P+W]=(V/w>>0)-f&255;return P+y},q.prototype.writeIntBE=function(V,P,y,K){if(V=+V,P=P>>>0,!K){let y0=Math.pow(2,8*y-1);L(this,V,P,y,y0-1,-y0)}let W=y-1,w=1,f=0;for(this[P+W]=V&255;--W>=0&&(w*=256);)V<0&&f===0&&this[P+W+1]!==0&&(f=1),this[P+W]=(V/w>>0)-f&255;return P+y},q.prototype.writeInt8=function(V,P,y){return V=+V,P=P>>>0,y||L(this,V,P,1,127,-128),V<0&&(V=255+V+1),this[P]=V&255,P+1},q.prototype.writeInt16LE=function(V,P,y){return V=+V,P=P>>>0,y||L(this,V,P,2,32767,-32768),this[P]=V&255,this[P+1]=V>>>8,P+2},q.prototype.writeInt16BE=function(V,P,y){return V=+V,P=P>>>0,y||L(this,V,P,2,32767,-32768),this[P]=V>>>8,this[P+1]=V&255,P+2},q.prototype.writeInt32LE=function(V,P,y){return V=+V,P=P>>>0,y||L(this,V,P,4,2147483647,-2147483648),this[P]=V&255,this[P+1]=V>>>8,this[P+2]=V>>>16,this[P+3]=V>>>24,P+4},q.prototype.writeInt32BE=function(V,P,y){return V=+V,P=P>>>0,y||L(this,V,P,4,2147483647,-2147483648),V<0&&(V=4294967295+V+1),this[P]=V>>>24,this[P+1]=V>>>16,this[P+2]=V>>>8,this[P+3]=V&255,P+4},q.prototype.writeBigInt64LE=F0(function(V,P=0){return k(this,V,P,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),q.prototype.writeBigInt64BE=F0(function(V,P=0){return c(this,V,P,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function t(V,P,y,K,W,w){if(y+K>V.length)throw new RangeError("Index out of range");if(y<0)throw new RangeError("Index out of range")}function q0(V,P,y,K,W){return P=+P,y=y>>>0,W||t(V,P,y,4,340282346638528860000000000000000000000,-340282346638528860000000000000000000000),j.write(V,P,y,K,23,4),y+4}q.prototype.writeFloatLE=function(V,P,y){return q0(this,V,P,!0,y)},q.prototype.writeFloatBE=function(V,P,y){return q0(this,V,P,!1,y)};function $0(V,P,y,K,W){return P=+P,y=y>>>0,W||t(V,P,y,8,179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,-179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000),j.write(V,P,y,K,52,8),y+8}q.prototype.writeDoubleLE=function(V,P,y){return $0(this,V,P,!0,y)},q.prototype.writeDoubleBE=function(V,P,y){return $0(this,V,P,!1,y)},q.prototype.copy=function(V,P,y,K){if(!q.isBuffer(V))throw new TypeError("argument should be a Buffer");if(y||(y=0),!K&&K!==0&&(K=this.length),P>=V.length&&(P=V.length),P||(P=0),K>0&&K<y&&(K=y),K===y||V.length===0||this.length===0)return 0;if(P<0)throw new RangeError("targetStart out of bounds");if(y<0||y>=this.length)throw new RangeError("Index out of range");if(K<0)throw new RangeError("sourceEnd out of bounds");K>this.length&&(K=this.length),V.length-P<K-y&&(K=V.length-P+y);let W=K-y;return this===V&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(P,y,K):Uint8Array.prototype.set.call(V,this.subarray(y,K),P),W},q.prototype.fill=function(V,P,y,K){if(typeof V=="string"){if(typeof P=="string"?(K=P,P=0,y=this.length):typeof y=="string"&&(K=y,y=this.length),K!==void 0&&typeof K!="string")throw new TypeError("encoding must be a string");if(typeof K=="string"&&!q.isEncoding(K))throw new TypeError("Unknown encoding: "+K);if(V.length===1){let w=V.charCodeAt(0);(K==="utf8"&&w<128||K==="latin1")&&(V=w)}}else typeof V=="number"?V=V&255:typeof V=="boolean"&&(V=Number(V));if(P<0||this.length<P||this.length<y)throw new RangeError("Out of range index");if(y<=P)return this;P=P>>>0,y=y===void 0?this.length:y>>>0,V||(V=0);let W;if(typeof V=="number")for(W=P;W<y;++W)this[W]=V;else{let w=q.isBuffer(V)?V:q.from(V,K),f=w.length;if(f===0)throw new TypeError('The value "'+V+'" is invalid for argument "value"');for(W=0;W<y-P;++W)this[W+P]=w[W%f]}return this};var e={};function V0(V,P,y){e[V]=class extends y{constructor(){super(),Object.defineProperty(this,"message",{value:P.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${V}]`,this.stack,delete this.name}get code(){return V}set code(K){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:K,writable:!0})}toString(){return`${this.name} [${V}]: ${this.message}`}}}V0("ERR_BUFFER_OUT_OF_BOUNDS",function(V){return V?`${V} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),V0("ERR_INVALID_ARG_TYPE",function(V,P){return`The "${V}" argument must be of type number. Received type ${typeof P}`},TypeError),V0("ERR_OUT_OF_RANGE",function(V,P,y){let K=`The value of "${V}" is out of range.`,W=y;return Number.isInteger(y)&&Math.abs(y)>4294967296?W=X0(String(y)):typeof y=="bigint"&&(W=String(y),(y>BigInt(2)**BigInt(32)||y<-(BigInt(2)**BigInt(32)))&&(W=X0(W)),W+="n"),K+=` It must be ${P}. Received ${W}`,K},RangeError);function X0(V){let P="",y=V.length,K=V[0]==="-"?1:0;for(;y>=K+4;y-=3)P=`_${V.slice(y-3,y)}${P}`;return`${V.slice(0,y)}${P}`}function O0(V,P,y){L0(P,"offset"),(V[P]===void 0||V[P+y]===void 0)&&u(P,V.length-(y+1))}function P0(V,P,y,K,W,w){if(V>y||V<P){let f=typeof P=="bigint"?"n":"",y0;throw w>3?P===0||P===BigInt(0)?y0=`>= 0${f} and < 2${f} ** ${(w+1)*8}${f}`:y0=`>= -(2${f} ** ${(w+1)*8-1}${f}) and < 2 ** ${(w+1)*8-1}${f}`:y0=`>= ${P}${f} and <= ${y}${f}`,new e.ERR_OUT_OF_RANGE("value",y0,V)}O0(K,W,w)}function L0(V,P){if(typeof V!="number")throw new e.ERR_INVALID_ARG_TYPE(P,"number",V)}function u(V,P,y){throw Math.floor(V)!==V?(L0(V,y),new e.ERR_OUT_OF_RANGE(y||"offset","an integer",V)):P<0?new e.ERR_BUFFER_OUT_OF_BOUNDS:new e.ERR_OUT_OF_RANGE(y||"offset",`>= ${y?1:0} and <= ${P}`,V)}var E=/[^+/0-9A-Za-z-_]/g;function g(V){if(V=V.split("=")[0],V=V.trim().replace(E,""),V.length<2)return"";for(;V.length%4!==0;)V=V+"=";return V}function d(V,P){P=P||1/0;let y,K=V.length,W=null,w=[];for(let f=0;f<K;++f){if(y=V.charCodeAt(f),y>55295&&y<57344){if(!W){if(y>56319){(P-=3)>-1&&w.push(239,191,189);continue}else if(f+1===K){(P-=3)>-1&&w.push(239,191,189);continue}W=y;continue}if(y<56320){(P-=3)>-1&&w.push(239,191,189),W=y;continue}y=(W-55296<<10|y-56320)+65536}else W&&(P-=3)>-1&&w.push(239,191,189);if(W=null,y<128){if((P-=1)<0)break;w.push(y)}else if(y<2048){if((P-=2)<0)break;w.push(y>>6|192,y&63|128)}else if(y<65536){if((P-=3)<0)break;w.push(y>>12|224,y>>6&63|128,y&63|128)}else if(y<1114112){if((P-=4)<0)break;w.push(y>>18|240,y>>12&63|128,y>>6&63|128,y&63|128)}else throw new Error("Invalid code point")}return w}function j0(V){let P=[];for(let y=0;y<V.length;++y)P.push(V.charCodeAt(y)&255);return P}function b(V,P){let y,K,W,w=[];for(let f=0;f<V.length&&!((P-=2)<0);++f)y=V.charCodeAt(f),K=y>>8,W=y%256,w.push(W),w.push(K);return w}function W0(V){return J.toByteArray(g(V))}function G0(V,P,y,K){let W;for(W=0;W<K&&!(W+y>=P.length||W>=V.length);++W)P[W+y]=V[W];return W}function v0(V,P){return V instanceof P||V!=null&&V.constructor!=null&&V.constructor.name!=null&&V.constructor.name===P.name}function x0(V){return V!==V}var i0=function(){let V="0123456789abcdef",P=new Array(256);for(let y=0;y<16;++y){let K=y*16;for(let W=0;W<16;++W)P[K+W]=V[y]+V[W]}return P}();function F0(V){return typeof BigInt>"u"?i1:V}function i1(){throw new Error("BigInt not supported")}}),T0=Z0(($,J)=>{J.exports={ArrayIsArray(j){return Array.isArray(j)},ArrayPrototypeIncludes(j,Q){return j.includes(Q)},ArrayPrototypeIndexOf(j,Q){return j.indexOf(Q)},ArrayPrototypeJoin(j,Q){return j.join(Q)},ArrayPrototypeMap(j,Q){return j.map(Q)},ArrayPrototypePop(j,Q){return j.pop(Q)},ArrayPrototypePush(j,Q){return j.push(Q)},ArrayPrototypeSlice(j,Q,X){return j.slice(Q,X)},Error,FunctionPrototypeCall(j,Q,...X){return j.call(Q,...X)},FunctionPrototypeSymbolHasInstance(j,Q){return Function.prototype[Symbol.hasInstance].call(j,Q)},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(j,Q){return Object.defineProperties(j,Q)},ObjectDefineProperty(j,Q,X){return Object.defineProperty(j,Q,X)},ObjectGetOwnPropertyDescriptor(j,Q){return Object.getOwnPropertyDescriptor(j,Q)},ObjectKeys(j){return Object.keys(j)},ObjectSetPrototypeOf(j,Q){return Object.setPrototypeOf(j,Q)},Promise,PromisePrototypeCatch(j,Q){return j.catch(Q)},PromisePrototypeThen(j,Q,X){return j.then(Q,X)},PromiseReject(j){return Promise.reject(j)},ReflectApply:Reflect.apply,RegExpPrototypeTest(j,Q){return j.test(Q)},SafeSet:Set,String,StringPrototypeSlice(j,Q,X){return j.slice(Q,X)},StringPrototypeToLowerCase(j){return j.toLowerCase()},StringPrototypeToUpperCase(j){return j.toUpperCase()},StringPrototypeTrim(j){return j.trim()},Symbol,SymbolAsyncIterator:Symbol.asyncIterator,SymbolHasInstance:Symbol.hasInstance,SymbolIterator:Symbol.iterator,TypedArrayPrototypeSet(j,Q,X){return j.set(Q,X)},Uint8Array}}),q1=Z0(($,J)=>{var j=F1(),Q=Object.getPrototypeOf(async function(){}).constructor,X=globalThis.Blob||j.Blob,Y=typeof X<"u"?function(q){return q instanceof X}:function(q){return!1},U=class extends Error{constructor(q){if(!Array.isArray(q))throw new TypeError(`Expected input to be an Array, got ${typeof q}`);let v="";for(let G=0;G<q.length;G++)v+=` ${q[G].stack} `;super(v),this.name="AggregateError",this.errors=q}};J.exports={AggregateError:U,kEmptyObject:Object.freeze({}),once(q){let v=!1;return function(...G){v||(v=!0,q.apply(this,G))}},createDeferredPromise:function(){let q,v;return{promise:new Promise((G,O)=>{q=G,v=O}),resolve:q,reject:v}},promisify(q){return new Promise((v,G)=>{q((O,...Z)=>O?G(O):v(...Z))})},debuglog(){return function(){}},format(q,...v){return q.replace(/%([sdifj])/g,function(...[G,O]){let Z=v.shift();return O==="f"?Z.toFixed(6):O==="j"?JSON.stringify(Z):O==="s"&&typeof Z=="object"?`${Z.constructor!==Object?Z.constructor.name:""} {}`.trim():Z.toString()})},inspect(q){switch(typeof q){case"string":if(q.includes("'"))if(q.includes('"')){if(!q.includes("`")&&!q.includes("${"))return`\`${q}\``}else return`"${q}"`;return`'${q}'`;case"number":return isNaN(q)?"NaN":Object.is(q,-0)?String(q):q;case"bigint":return`${String(q)}n`;case"boolean":case"undefined":return String(q);case"object":return"{}"}},types:{isAsyncFunction(q){return q instanceof Q},isArrayBufferView(q){return ArrayBuffer.isView(q)}},isBlob:Y},J.exports.promisify.custom=Symbol.for("nodejs.util.promisify.custom")}),H5=Z0(($,J)=>{var{AbortController:j,AbortSignal:Q}=typeof self<"u"?self:typeof window<"u"?window:void 0;J.exports=j,J.exports.AbortSignal=Q,J.exports.default=j}),h0=Z0(($,J)=>{var{format:j,inspect:Q,AggregateError:X}=q1(),Y=globalThis.AggregateError||X,U=Symbol("kIsNodeError"),q=["string","function","number","object","Function","Object","boolean","bigint","symbol"],v=/^([A-Z][a-z0-9]*)+$/,G="__node_internal_",O={};function Z(H,A){if(!H)throw new O.ERR_INTERNAL_ASSERTION(A)}function F(H){let A="",z=H.length,R=H[0]==="-"?1:0;for(;z>=R+4;z-=3)A=`_${H.slice(z-3,z)}${A}`;return`${H.slice(0,z)}${A}`}function D(H,A,z){if(typeof A=="function")return Z(A.length<=z.length,`Code: ${H}; The provided arguments length (${z.length}) does not match the required ones (${A.length}).`),A(...z);let R=(A.match(/%[dfijoOs]/g)||[]).length;return Z(R===z.length,`Code: ${H}; The provided arguments length (${z.length}) does not match the required ones (${R}).`),z.length===0?A:j(A,...z)}function I(H,A,z){z||(z=Error);class R extends z{constructor(...M){super(D(H,A,M))}toString(){return`${this.name} [${H}]: ${this.message}`}}Object.defineProperties(R.prototype,{name:{value:z.name,writable:!0,enumerable:!1,configurable:!0},toString:{value(){return`${this.name} [${H}]: ${this.message}`},writable:!0,enumerable:!1,configurable:!0}}),R.prototype.code=H,R.prototype[U]=!0,O[H]=R}function B(H){let A=G+H.name;return Object.defineProperty(H,"name",{value:A}),H}function S(H,A){if(H&&A&&H!==A){if(Array.isArray(A.errors))return A.errors.push(H),A;let z=new Y([A,H],A.message);return z.code=A.code,z}return H||A}var T=class extends Error{constructor(H="The operation was aborted",A=void 0){if(A!==void 0&&typeof A!="object")throw new O.ERR_INVALID_ARG_TYPE("options","Object",A);super(H,A),this.code="ABORT_ERR",this.name="AbortError"}};I("ERR_ASSERTION","%s",Error),I("ERR_INVALID_ARG_TYPE",(H,A,z)=>{Z(typeof H=="string","'name' must be a string"),Array.isArray(A)||(A=[A]);let R="The ";H.endsWith(" argument")?R+=`${H} `:R+=`"${H}" ${H.includes(".")?"property":"argument"} `,R+="must be ";let M=[],x=[],p=[];for(let r of A)Z(typeof r=="string","All expected entries have to be of type string"),q.includes(r)?M.push(r.toLowerCase()):v.test(r)?x.push(r):(Z(r!=="object",'The value "object" should be written as "Object"'),p.push(r));if(x.length>0){let r=M.indexOf("object");r!==-1&&(M.splice(M,r,1),x.push("Object"))}if(M.length>0){switch(M.length){case 1:R+=`of type ${M[0]}`;break;case 2:R+=`one of type ${M[0]} or ${M[1]}`;break;default:{let r=M.pop();R+=`one of type ${M.join(", ")}, or ${r}`}}(x.length>0||p.length>0)&&(R+=" or ")}if(x.length>0){switch(x.length){case 1:R+=`an instance of ${x[0]}`;break;case 2:R+=`an instance of ${x[0]} or ${x[1]}`;break;default:{let r=x.pop();R+=`an instance of ${x.join(", ")}, or ${r}`}}p.length>0&&(R+=" or ")}switch(p.length){case 0:break;case 1:p[0].toLowerCase()!==p[0]&&(R+="an "),R+=`${p[0]}`;break;case 2:R+=`one of ${p[0]} or ${p[1]}`;break;default:{let r=p.pop();R+=`one of ${p.join(", ")}, or ${r}`}}if(z==null)R+=`. Received ${z}`;else if(typeof z=="function"&&z.name)R+=`. Received function ${z.name}`;else if(typeof z=="object"){var n;(n=z.constructor)!==null&&n!==void 0&&n.name?R+=`. Received an instance of ${z.constructor.name}`:R+=`. Received ${Q(z,{depth:-1})}`}else{let r=Q(z,{colors:!1});r.length>25&&(r=`${r.slice(0,25)}...`),R+=`. Received type ${typeof z} (${r})`}return R},TypeError),I("ERR_INVALID_ARG_VALUE",(H,A,z="is invalid")=>{let R=Q(A);return R.length>128&&(R=R.slice(0,128)+"..."),`The ${H.includes(".")?"property":"argument"} '${H}' ${z}. Received ${R}`},TypeError),I("ERR_INVALID_RETURN_VALUE",(H,A,z)=>{var R;let M=z!=null&&(R=z.constructor)!==null&&R!==void 0&&R.name?`instance of ${z.constructor.name}`:`type ${typeof z}`;return`Expected ${H} to be returned from the "${A}" function but got ${M}.`},TypeError),I("ERR_MISSING_ARGS",(...H)=>{Z(H.length>0,"At least one arg needs to be specified");let A,z=H.length;switch(H=(Array.isArray(H)?H:[H]).map((R)=>`"${R}"`).join(" or "),z){case 1:A+=`The ${H[0]} argument`;break;case 2:A+=`The ${H[0]} and ${H[1]} arguments`;break;default:{let R=H.pop();A+=`The ${H.join(", ")}, and ${R} arguments`}break}return`${A} must be specified`},TypeError),I("ERR_OUT_OF_RANGE",(H,A,z)=>{Z(A,'Missing "range" argument');let R;return Number.isInteger(z)&&Math.abs(z)>4294967296?R=F(String(z)):typeof z=="bigint"?(R=String(z),(z>2n**32n||z<-(2n**32n))&&(R=F(R)),R+="n"):R=Q(z),`The value of "${H}" is out of range. It must be ${A}. Received ${R}`},RangeError),I("ERR_MULTIPLE_CALLBACK","Callback called multiple times",Error),I("ERR_METHOD_NOT_IMPLEMENTED","The %s method is not implemented",Error),I("ERR_STREAM_ALREADY_FINISHED","Cannot call %s after a stream was finished",Error),I("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable",Error),I("ERR_STREAM_DESTROYED","Cannot call %s after a stream was destroyed",Error),I("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),I("ERR_STREAM_PREMATURE_CLOSE","Premature close",Error),I("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF",Error),I("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event",Error),I("ERR_STREAM_WRITE_AFTER_END","write after end",Error),I("ERR_UNKNOWN_ENCODING","Unknown encoding: %s",TypeError),J.exports={AbortError:T,aggregateTwoErrors:B(S),hideStackFrames:B,codes:O}}),G8=Z0(($,J)=>{var{ArrayIsArray:j,ArrayPrototypeIncludes:Q,ArrayPrototypeJoin:X,ArrayPrototypeMap:Y,NumberIsInteger:U,NumberIsNaN:q,NumberMAX_SAFE_INTEGER:v,NumberMIN_SAFE_INTEGER:G,NumberParseInt:O,ObjectPrototypeHasOwnProperty:Z,RegExpPrototypeExec:F,String:D,StringPrototypeToUpperCase:I,StringPrototypeTrim:B}=T0(),{hideStackFrames:S,codes:{ERR_SOCKET_BAD_PORT:T,ERR_INVALID_ARG_TYPE:H,ERR_INVALID_ARG_VALUE:A,ERR_OUT_OF_RANGE:z,ERR_UNKNOWN_SIGNAL:R}}=h0(),{normalizeEncoding:M}=q1(),{isAsyncFunction:x,isArrayBufferView:p}=q1().types,n={};function r(u){return u===(u|0)}function m(u){return u===u>>>0}var N=/^[0-7]+$/,h="must be a 32-bit unsigned integer or an octal string";function i(u,E,g){if(typeof u>"u"&&(u=g),typeof u=="string"){if(F(N,u)===null)throw new A(E,u,h);u=O(u,8)}return l(u,E),u}var C=S((u,E,g=G,d=v)=>{if(typeof u!="number")throw new H(E,"number",u);if(!U(u))throw new z(E,"an integer",u);if(u<g||u>d)throw new z(E,`>= ${g} && <= ${d}`,u)}),_=S((u,E,g=-2147483648,d=2147483647)=>{if(typeof u!="number")throw new H(E,"number",u);if(!U(u))throw new z(E,"an integer",u);if(u<g||u>d)throw new z(E,`>= ${g} && <= ${d}`,u)}),l=S((u,E,g=!1)=>{if(typeof u!="number")throw new H(E,"number",u);if(!U(u))throw new z(E,"an integer",u);let d=g?1:0,j0=4294967295;if(u<d||u>j0)throw new z(E,`>= ${d} && <= ${j0}`,u)});function s(u,E){if(typeof u!="string")throw new H(E,"string",u)}function J0(u,E,g=void 0,d){if(typeof u!="number")throw new H(E,"number",u);if(g!=null&&u<g||d!=null&&u>d||(g!=null||d!=null)&&q(u))throw new z(E,`${g!=null?`>= ${g}`:""}${g!=null&&d!=null?" && ":""}${d!=null?`<= ${d}`:""}`,u)}var a=S((u,E,g)=>{if(!Q(g,u)){let d=X(Y(g,(b)=>typeof b=="string"?`'${b}'`:D(b)),", "),j0="must be one of: "+d;throw new A(E,u,j0)}});function o(u,E){if(typeof u!="boolean")throw new H(E,"boolean",u)}function L(u,E,g){return u==null||!Z(u,E)?g:u[E]}var k=S((u,E,g=null)=>{let d=L(g,"allowArray",!1),j0=L(g,"allowFunction",!1);if(!L(g,"nullable",!1)&&u===null||!d&&j(u)||typeof u!="object"&&(!j0||typeof u!="function"))throw new H(E,"Object",u)}),c=S((u,E,g=0)=>{if(!j(u))throw new H(E,"Array",u);if(u.length<g){let d=`must be longer than ${g}`;throw new A(E,u,d)}});function t(u,E="signal"){if(s(u,E),n[u]===void 0)throw n[I(u)]!==void 0?new R(u+" (signals must use all capital letters)"):new R(u)}var q0=S((u,E="buffer")=>{if(!p(u))throw new H(E,["Buffer","TypedArray","DataView"],u)});function $0(u,E){let g=M(E),d=u.length;if(g==="hex"&&d%2!==0)throw new A("encoding",E,`is invalid for data of length ${d}`)}function e(u,E="Port",g=!0){if(typeof u!="number"&&typeof u!="string"||typeof u=="string"&&B(u).length===0||+u!==+u>>>0||u>65535||u===0&&!g)throw new T(E,u,g);return u|0}var V0=S((u,E)=>{if(u!==void 0&&(u===null||typeof u!="object"||!("aborted"in u)))throw new H(E,"AbortSignal",u)}),X0=S((u,E)=>{if(typeof u!="function")throw new H(E,"Function",u)}),O0=S((u,E)=>{if(typeof u!="function"||x(u))throw new H(E,"Function",u)}),P0=S((u,E)=>{if(u!==void 0)throw new H(E,"undefined",u)});function L0(u,E,g){if(!Q(g,u))throw new H(E,`('${X(g,"|")}')`,u)}J.exports={isInt32:r,isUint32:m,parseFileMode:i,validateArray:c,validateBoolean:o,validateBuffer:q0,validateEncoding:$0,validateFunction:X0,validateInt32:_,validateInteger:C,validateNumber:J0,validateObject:k,validateOneOf:a,validatePlainFunction:O0,validatePort:e,validateSignalName:t,validateString:s,validateUint32:l,validateUndefined:P0,validateUnion:L0,validateAbortSignal:V0}}),fj=Z0(($,J)=>{var j=J.exports={},Q,X;function Y(){throw new Error("setTimeout has not been defined")}function U(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?Q=setTimeout:Q=Y}catch{Q=Y}try{typeof clearTimeout=="function"?X=clearTimeout:X=U}catch{X=U}})();function q(T){if(Q===setTimeout)return setTimeout(T,0);if((Q===Y||!Q)&&setTimeout)return Q=setTimeout,setTimeout(T,0);try{return Q(T,0)}catch{try{return Q.call(null,T,0)}catch{return Q.call(this,T,0)}}}function v(T){if(X===clearTimeout)return clearTimeout(T);if((X===U||!X)&&clearTimeout)return X=clearTimeout,clearTimeout(T);try{return X(T)}catch{try{return X.call(null,T)}catch{return X.call(this,T)}}}var G=[],O=!1,Z,F=-1;function D(){!O||!Z||(O=!1,Z.length?G=Z.concat(G):F=-1,G.length&&I())}function I(){if(!O){var T=q(D);O=!0;for(var H=G.length;H;){for(Z=G,G=[];++F<H;)Z&&Z[F].run();F=-1,H=G.length}Z=null,O=!1,v(T)}}j.nextTick=function(T){var H=new Array(arguments.length-1);if(arguments.length>1)for(var A=1;A<arguments.length;A++)H[A-1]=arguments[A];G.push(new B(T,H)),G.length===1&&!O&&q(I)};function B(T,H){this.fun=T,this.array=H}B.prototype.run=function(){this.fun.apply(null,this.array)},j.title="browser",j.browser=!0,j.env={},j.argv=[],j.version="",j.versions={};function S(){}j.on=S,j.addListener=S,j.once=S,j.off=S,j.removeListener=S,j.removeAllListeners=S,j.emit=S,j.prependListener=S,j.prependOnceListener=S,j.listeners=function(T){return[]},j.binding=function(T){throw new Error("process.binding is not supported")},j.cwd=function(){return"/"},j.chdir=function(T){throw new Error("process.chdir is not supported")},j.umask=function(){return 0}}),X1={};pj(X1,{default:()=>hj});T1=V4(()=>{bj(X1,Y8(fj())),hj=Y8(fj())}),g1=Z0(($,J)=>{var{Symbol:j,SymbolAsyncIterator:Q,SymbolIterator:X}=T0(),Y=j("kDestroyed"),U=j("kIsErrored"),q=j("kIsReadable"),v=j("kIsDisturbed");function G(C,_=!1){var l;return!!(C&&typeof C.pipe=="function"&&typeof C.on=="function"&&(!_||typeof C.pause=="function"&&typeof C.resume=="function")&&(!C._writableState||((l=C._readableState)===null||l===void 0?void 0:l.readable)!==!1)&&(!C._writableState||C._readableState))}function O(C){var _;return!!(C&&typeof C.write=="function"&&typeof C.on=="function"&&(!C._readableState||((_=C._writableState)===null||_===void 0?void 0:_.writable)!==!1))}function Z(C){return!!(C&&typeof C.pipe=="function"&&C._readableState&&typeof C.on=="function"&&typeof C.write=="function")}function F(C){return C&&(C._readableState||C._writableState||typeof C.write=="function"&&typeof C.on=="function"||typeof C.pipe=="function"&&typeof C.on=="function")}function D(C,_){return C==null?!1:_===!0?typeof C[Q]=="function":_===!1?typeof C[X]=="function":typeof C[Q]=="function"||typeof C[X]=="function"}function I(C){if(!F(C))return null;let{_writableState:_,_readableState:l}=C,s=_||l;return!!(C.destroyed||C[Y]||s!=null&&s.destroyed)}function B(C){if(!O(C))return null;if(C.writableEnded===!0)return!0;let _=C._writableState;return _!=null&&_.errored?!1:typeof _?.ended!="boolean"?null:_.ended}function S(C,_){if(!O(C))return null;if(C.writableFinished===!0)return!0;let l=C._writableState;return l!=null&&l.errored?!1:typeof l?.finished!="boolean"?null:!!(l.finished||_===!1&&l.ended===!0&&l.length===0)}function T(C){if(!G(C))return null;if(C.readableEnded===!0)return!0;let _=C._readableState;return!_||_.errored?!1:typeof _?.ended!="boolean"?null:_.ended}function H(C,_){if(!G(C))return null;let l=C._readableState;return l!=null&&l.errored?!1:typeof l?.endEmitted!="boolean"?null:!!(l.endEmitted||_===!1&&l.ended===!0&&l.length===0)}function A(C){return C&&C[q]!=null?C[q]:typeof C?.readable!="boolean"?null:I(C)?!1:G(C)&&C.readable&&!H(C)}function z(C){return typeof C?.writable!="boolean"?null:I(C)?!1:O(C)&&C.writable&&!B(C)}function R(C,_){return F(C)?I(C)?!0:!(_?.readable!==!1&&A(C)||_?.writable!==!1&&z(C)):null}function M(C){var _,l;return F(C)?C.writableErrored?C.writableErrored:(_=(l=C._writableState)===null||l===void 0?void 0:l.errored)!==null&&_!==void 0?_:null:null}function x(C){var _,l;return F(C)?C.readableErrored?C.readableErrored:(_=(l=C._readableState)===null||l===void 0?void 0:l.errored)!==null&&_!==void 0?_:null:null}function p(C){if(!F(C))return null;if(typeof C.closed=="boolean")return C.closed;let{_writableState:_,_readableState:l}=C;return typeof _?.closed=="boolean"||typeof l?.closed=="boolean"?_?.closed||l?.closed:typeof C._closed=="boolean"&&n(C)?C._closed:null}function n(C){return typeof C._closed=="boolean"&&typeof C._defaultKeepAlive=="boolean"&&typeof C._removedConnection=="boolean"&&typeof C._removedContLen=="boolean"}function r(C){return typeof C._sent100=="boolean"&&n(C)}function m(C){var _;return typeof C._consuming=="boolean"&&typeof C._dumped=="boolean"&&((_=C.req)===null||_===void 0?void 0:_.upgradeOrConnect)===void 0}function N(C){if(!F(C))return null;let{_writableState:_,_readableState:l}=C,s=_||l;return!s&&r(C)||!!(s&&s.autoDestroy&&s.emitClose&&s.closed===!1)}function h(C){var _;return!!(C&&((_=C[v])!==null&&_!==void 0?_:C.readableDidRead||C.readableAborted))}function i(C){var _,l,s,J0,a,o,L,k,c,t;return!!(C&&((_=(l=(s=(J0=(a=(o=C[U])!==null&&o!==void 0?o:C.readableErrored)!==null&&a!==void 0?a:C.writableErrored)!==null&&J0!==void 0?J0:(L=C._readableState)===null||L===void 0?void 0:L.errorEmitted)!==null&&s!==void 0?s:(k=C._writableState)===null||k===void 0?void 0:k.errorEmitted)!==null&&l!==void 0?l:(c=C._readableState)===null||c===void 0?void 0:c.errored)!==null&&_!==void 0?_:(t=C._writableState)===null||t===void 0?void 0:t.errored))}J.exports={kDestroyed:Y,isDisturbed:h,kIsDisturbed:v,isErrored:i,kIsErrored:U,isReadable:A,kIsReadable:q,isClosed:p,isDestroyed:I,isDuplexNodeStream:Z,isFinished:R,isIterable:D,isReadableNodeStream:G,isReadableEnded:T,isReadableFinished:H,isReadableErrored:x,isNodeStream:F,isWritable:z,isWritableNodeStream:O,isWritableEnded:B,isWritableFinished:S,isWritableErrored:M,isServerRequest:m,isServerResponse:r,willEmitClose:N}}),x1=Z0(($,J)=>{var j=(T1(),E1(X1)),{AbortError:Q,codes:X}=h0(),{ERR_INVALID_ARG_TYPE:Y,ERR_STREAM_PREMATURE_CLOSE:U}=X,{kEmptyObject:q,once:v}=q1(),{validateAbortSignal:G,validateFunction:O,validateObject:Z}=G8(),{Promise:F}=T0(),{isClosed:D,isReadable:I,isReadableNodeStream:B,isReadableFinished:S,isReadableErrored:T,isWritable:H,isWritableNodeStream:A,isWritableFinished:z,isWritableErrored:R,isNodeStream:M,willEmitClose:x}=g1();function p(N){return N.setHeader&&typeof N.abort=="function"}var n=()=>{};function r(N,h,i){var C,_;arguments.length===2?(i=h,h=q):h==null?h=q:Z(h,"options"),O(i,"callback"),G(h.signal,"options.signal"),i=v(i);let l=(C=h.readable)!==null&&C!==void 0?C:B(N),s=(_=h.writable)!==null&&_!==void 0?_:A(N);if(!M(N))throw new Y("stream","Stream",N);let{_writableState:J0,_readableState:a}=N,o=()=>{N.writable||c()},L=x(N)&&B(N)===l&&A(N)===s,k=z(N,!1),c=()=>{k=!0,N.destroyed&&(L=!1),!(L&&(!N.readable||l))&&(!l||t)&&i.call(N)},t=S(N,!1),q0=()=>{t=!0,N.destroyed&&(L=!1),!(L&&(!N.writable||s))&&(!s||k)&&i.call(N)},$0=(P0)=>{i.call(N,P0)},e=D(N),V0=()=>{e=!0;let P0=R(N)||T(N);if(P0&&typeof P0!="boolean")return i.call(N,P0);if(l&&!t&&B(N,!0)&&!S(N,!1))return i.call(N,new U);if(s&&!k&&!z(N,!1))return i.call(N,new U);i.call(N)},X0=()=>{N.req.on("finish",c)};p(N)?(N.on("complete",c),L||N.on("abort",V0),N.req?X0():N.on("request",X0)):s&&!J0&&(N.on("end",o),N.on("close",o)),!L&&typeof N.aborted=="boolean"&&N.on("aborted",V0),N.on("end",q0),N.on("finish",c),h.error!==!1&&N.on("error",$0),N.on("close",V0),e?j.nextTick(V0):J0!=null&&J0.errorEmitted||a!=null&&a.errorEmitted?L||j.nextTick(V0):(!l&&(!L||I(N))&&(k||H(N)===!1)||!s&&(!L||H(N))&&(t||I(N)===!1)||a&&N.req&&N.aborted)&&j.nextTick(V0);let O0=()=>{i=n,N.removeListener("aborted",V0),N.removeListener("complete",c),N.removeListener("abort",V0),N.removeListener("request",X0),N.req&&N.req.removeListener("finish",c),N.removeListener("end",o),N.removeListener("close",o),N.removeListener("finish",c),N.removeListener("end",q0),N.removeListener("error",$0),N.removeListener("close",V0)};if(h.signal&&!e){let P0=()=>{let L0=i;O0(),L