@imgly/idml-importer
Version:
Import IDML files into the Creative Editor Ecosystem
2 lines • 267 kB
JavaScript
var $J=Object.create;var{getPrototypeOf:JJ,defineProperty:C1,getOwnPropertyNames:U4,getOwnPropertyDescriptor:qJ}=Object,G4=Object.prototype.hasOwnProperty;function Z4(Q){return this[Q]}var VJ,XJ,KJ=(Q,$,J)=>{var q=Q!=null&&typeof Q==="object";if(q){var V=$?VJ??=new WeakMap:XJ??=new WeakMap,X=V.get(Q);if(X)return X}J=Q!=null?$J(JJ(Q)):{};let K=$||!Q||!Q.__esModule?C1(J,"default",{value:Q,enumerable:!0}):J;for(let Y of U4(Q))if(!G4.call(K,Y))C1(K,Y,{get:Z4.bind(Q,Y),enumerable:!0});if(q)V.set(Q,K);return K},d0=(Q)=>{var $=(Y4??=new WeakMap).get(Q),J;if($)return $;if($=C1({},"__esModule",{value:!0}),Q&&typeof Q==="object"||typeof Q==="function"){for(var q of U4(Q))if(!G4.call($,q))C1($,q,{get:Z4.bind(Q,q),enumerable:!(J=qJ(Q,q))||J.enumerable})}return Y4.set(Q,$),$},Y4,Z0=(Q,$)=>()=>($||Q(($={exports:{}}).exports,$),$.exports);var YJ=(Q)=>Q;function UJ(Q,$){this[Q]=YJ.bind(null,$)}var j4=(Q,$)=>{for(var J in $)C1(Q,J,{get:$[J],enumerable:!0,configurable:!0,set:UJ.bind($,J)})};var z4=(Q,$)=>()=>(Q&&($=Q(Q=0)),$);var j2={};j4(j2,{transcode:()=>nJ,resolveObjectURL:()=>dJ,kStringMaxLength:()=>A4,kMaxLength:()=>R1,isUtf8:()=>lJ,isAscii:()=>iJ,default:()=>oJ,constants:()=>FJ,btoa:()=>WJ,atob:()=>BJ,INSPECT_MAX_BYTES:()=>C4,File:()=>PJ,Buffer:()=>b,Blob:()=>MJ});function GJ(Q){var $=Q.length;if($%4>0)throw Error("Invalid string. Length must be a multiple of 4");var J=Q.indexOf("=");if(J===-1)J=$;var q=J===$?0:4-J%4;return[J,q]}function ZJ(Q,$){return(Q+$)*3/4-$}function jJ(Q){var $,J=GJ(Q),q=J[0],V=J[1],X=new Uint8Array(ZJ(q,V)),K=0,Y=V>0?q-4:q,Z;for(Z=0;Z<Y;Z+=4)$=l0[Q.charCodeAt(Z)]<<18|l0[Q.charCodeAt(Z+1)]<<12|l0[Q.charCodeAt(Z+2)]<<6|l0[Q.charCodeAt(Z+3)],X[K++]=$>>16&255,X[K++]=$>>8&255,X[K++]=$&255;if(V===2)$=l0[Q.charCodeAt(Z)]<<2|l0[Q.charCodeAt(Z+1)]>>4,X[K++]=$&255;if(V===1)$=l0[Q.charCodeAt(Z)]<<10|l0[Q.charCodeAt(Z+1)]<<4|l0[Q.charCodeAt(Z+2)]>>2,X[K++]=$>>8&255,X[K++]=$&255;return X}function zJ(Q){return Q2[Q>>18&63]+Q2[Q>>12&63]+Q2[Q>>6&63]+Q2[Q&63]}function HJ(Q,$,J){var q,V=[];for(var X=$;X<J;X+=3)q=(Q[X]<<16&16711680)+(Q[X+1]<<8&65280)+(Q[X+2]&255),V.push(zJ(q));return V.join("")}function w4(Q){var $,J=Q.length,q=J%3,V=[],X=16383;for(var K=0,Y=J-q;K<Y;K+=X)V.push(HJ(Q,K,K+X>Y?Y:K+X));if(q===1)$=Q[J-1],V.push(Q2[$>>2]+Q2[$<<4&63]+"==");else if(q===2)$=(Q[J-2]<<8)+Q[J-1],V.push(Q2[$>>10]+Q2[$>>4&63]+Q2[$<<2&63]+"=");return V.join("")}function G6(Q,$,J,q,V){var X,K,Y=V*8-q-1,Z=(1<<Y)-1,U=Z>>1,G=-7,B=J?V-1:0,H=J?-1:1,W=Q[$+B];B+=H,X=W&(1<<-G)-1,W>>=-G,G+=Y;for(;G>0;X=X*256+Q[$+B],B+=H,G-=8);K=X&(1<<-G)-1,X>>=-G,G+=q;for(;G>0;K=K*256+Q[$+B],B+=H,G-=8);if(X===0)X=1-U;else if(X===Z)return K?NaN:(W?-1:1)*(1/0);else K=K+Math.pow(2,q),X=X-U;return(W?-1:1)*K*Math.pow(2,X-q)}function D4(Q,$,J,q,V,X){var K,Y,Z,U=X*8-V-1,G=(1<<U)-1,B=G>>1,H=V===23?Math.pow(2,-24)-Math.pow(2,-77):0,W=q?0:X-1,A=q?1:-1,T=$<0||$===0&&1/$<0?1:0;if($=Math.abs($),isNaN($)||$===1/0)Y=isNaN($)?1:0,K=G;else{if(K=Math.floor(Math.log($)/Math.LN2),$*(Z=Math.pow(2,-K))<1)K--,Z*=2;if(K+B>=1)$+=H/Z;else $+=H*Math.pow(2,1-B);if($*Z>=2)K++,Z/=2;if(K+B>=G)Y=0,K=G;else if(K+B>=1)Y=($*Z-1)*Math.pow(2,V),K=K+B;else Y=$*Math.pow(2,B-1)*Math.pow(2,V),K=0}for(;V>=8;Q[J+W]=Y&255,W+=A,Y/=256,V-=8);K=K<<V|Y,U+=V;for(;U>0;Q[J+W]=K&255,W+=A,K/=256,U-=8);Q[J+W-A]|=T*128}function Z2(Q){if(Q>R1)throw RangeError('The value "'+Q+'" is invalid for option "size"');let $=new Uint8Array(Q);return Object.setPrototypeOf($,b.prototype),$}function B8(Q,$,J){return class extends J{constructor(){super();Object.defineProperty(this,"message",{value:$.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${Q}]`,this.stack,delete this.name}get code(){return Q}set code(q){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:q,writable:!0})}toString(){return`${this.name} [${Q}]: ${this.message}`}}}function b(Q,$,J){if(typeof Q==="number"){if(typeof $==="string")throw TypeError('The "string" argument must be of type string. Received type number');return P8(Q)}return R4(Q,$,J)}function R4(Q,$,J){if(typeof Q==="string")return IJ(Q,$);if(ArrayBuffer.isView(Q))return OJ(Q);if(Q==null)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof Q);if($2(Q,ArrayBuffer)||Q&&$2(Q.buffer,ArrayBuffer))return H8(Q,$,J);if(typeof SharedArrayBuffer<"u"&&($2(Q,SharedArrayBuffer)||Q&&$2(Q.buffer,SharedArrayBuffer)))return H8(Q,$,J);if(typeof Q==="number")throw TypeError('The "value" argument must not be of type number. Received type number');let q=Q.valueOf&&Q.valueOf();if(q!=null&&q!==Q)return b.from(q,$,J);let V=DJ(Q);if(V)return V;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof Q[Symbol.toPrimitive]==="function")return b.from(Q[Symbol.toPrimitive]("string"),$,J);throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof Q)}function T4(Q){if(typeof Q!=="number")throw TypeError('"size" argument must be of type number');else if(Q<0)throw RangeError('The value "'+Q+'" is invalid for option "size"')}function NJ(Q,$,J){if(T4(Q),Q<=0)return Z2(Q);if($!==void 0)return typeof J==="string"?Z2(Q).fill($,J):Z2(Q).fill($);return Z2(Q)}function P8(Q){return T4(Q),Z2(Q<0?0:M8(Q)|0)}function IJ(Q,$){if(typeof $!=="string"||$==="")$="utf8";if(!b.isEncoding($))throw TypeError("Unknown encoding: "+$);let J=E4(Q,$)|0,q=Z2(J),V=q.write(Q,$);if(V!==J)q=q.slice(0,V);return q}function z8(Q){let $=Q.length<0?0:M8(Q.length)|0,J=Z2($);for(let q=0;q<$;q+=1)J[q]=Q[q]&255;return J}function OJ(Q){if($2(Q,Uint8Array)){let $=new Uint8Array(Q);return H8($.buffer,$.byteOffset,$.byteLength)}return z8(Q)}function H8(Q,$,J){if($<0||Q.byteLength<$)throw RangeError('"offset" is outside of buffer bounds');if(Q.byteLength<$+(J||0))throw RangeError('"length" is outside of buffer bounds');let q;if($===void 0&&J===void 0)q=new Uint8Array(Q);else if(J===void 0)q=new Uint8Array(Q,$);else q=new Uint8Array(Q,$,J);return Object.setPrototypeOf(q,b.prototype),q}function DJ(Q){if(b.isBuffer(Q)){let $=M8(Q.length)|0,J=Z2($);if(J.length===0)return J;return Q.copy(J,0,0,$),J}if(Q.length!==void 0){if(typeof Q.length!=="number"||Number.isNaN(Q.length))return Z2(0);return z8(Q)}if(Q.type==="Buffer"&&Array.isArray(Q.data))return z8(Q.data)}function M8(Q){if(Q>=R1)throw RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+R1.toString(16)+" bytes");return Q|0}function E4(Q,$){if(b.isBuffer(Q))return Q.length;if(ArrayBuffer.isView(Q)||$2(Q,ArrayBuffer))return Q.byteLength;if(typeof Q!=="string")throw TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof Q);let J=Q.length,q=arguments.length>2&&arguments[2]===!0;if(!q&&J===0)return 0;let V=!1;for(;;)switch($){case"ascii":case"latin1":case"binary":return J;case"utf8":case"utf-8":return W8(Q).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return J*2;case"hex":return J>>>1;case"base64":return _4(Q).length;default:if(V)return q?-1:W8(Q).length;$=(""+$).toLowerCase(),V=!0}}function CJ(Q,$,J){let q=!1;if($===void 0||$<0)$=0;if($>this.length)return"";if(J===void 0||J>this.length)J=this.length;if(J<=0)return"";if(J>>>=0,$>>>=0,J<=$)return"";if(!Q)Q="utf8";while(!0)switch(Q){case"hex":return hJ(this,$,J);case"utf8":case"utf-8":return S4(this,$,J);case"ascii":return kJ(this,$,J);case"latin1":case"binary":return yJ(this,$,J);case"base64":return SJ(this,$,J);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return gJ(this,$,J);default:if(q)throw TypeError("Unknown encoding: "+Q);Q=(Q+"").toLowerCase(),q=!0}}function _2(Q,$,J){let q=Q[$];Q[$]=Q[J],Q[J]=q}function v4(Q,$,J,q,V){if(Q.length===0)return-1;if(typeof J==="string")q=J,J=0;else if(J>2147483647)J=2147483647;else if(J<-2147483648)J=-2147483648;if(J=+J,Number.isNaN(J))J=V?0:Q.length-1;if(J<0)J=Q.length+J;if(J>=Q.length)if(V)return-1;else J=Q.length-1;else if(J<0)if(V)J=0;else return-1;if(typeof $==="string")$=b.from($,q);if(b.isBuffer($)){if($.length===0)return-1;return N4(Q,$,J,q,V)}else if(typeof $==="number"){if($=$&255,typeof Uint8Array.prototype.indexOf==="function")if(V)return Uint8Array.prototype.indexOf.call(Q,$,J);else return Uint8Array.prototype.lastIndexOf.call(Q,$,J);return N4(Q,[$],J,q,V)}throw TypeError("val must be string, number or Buffer")}function N4(Q,$,J,q,V){let X=1,K=Q.length,Y=$.length;if(q!==void 0){if(q=String(q).toLowerCase(),q==="ucs2"||q==="ucs-2"||q==="utf16le"||q==="utf-16le"){if(Q.length<2||$.length<2)return-1;X=2,K/=2,Y/=2,J/=2}}function Z(G,B){if(X===1)return G[B];else return G.readUInt16BE(B*X)}let U;if(V){let G=-1;for(U=J;U<K;U++)if(Z(Q,U)===Z($,G===-1?0:U-G)){if(G===-1)G=U;if(U-G+1===Y)return G*X}else{if(G!==-1)U-=U-G;G=-1}}else{if(J+Y>K)J=K-Y;for(U=J;U>=0;U--){let G=!0;for(let B=0;B<Y;B++)if(Z(Q,U+B)!==Z($,B)){G=!1;break}if(G)return U}}return-1}function AJ(Q,$,J,q){J=Number(J)||0;let V=Q.length-J;if(!q)q=V;else if(q=Number(q),q>V)q=V;let X=$.length;if(q>X/2)q=X/2;let K;for(K=0;K<q;++K){let Y=parseInt($.substr(K*2,2),16);if(Number.isNaN(Y))return K;Q[J+K]=Y}return K}function RJ(Q,$,J,q){return Z6(W8($,Q.length-J),Q,J,q)}function TJ(Q,$,J,q){return Z6(uJ($),Q,J,q)}function EJ(Q,$,J,q){return Z6(_4($),Q,J,q)}function vJ(Q,$,J,q){return Z6(pJ($,Q.length-J),Q,J,q)}function SJ(Q,$,J){if($===0&&J===Q.length)return w4(Q);else return w4(Q.slice($,J))}function S4(Q,$,J){J=Math.min(Q.length,J);let q=[],V=$;while(V<J){let X=Q[V],K=null,Y=X>239?4:X>223?3:X>191?2:1;if(V+Y<=J){let Z,U,G,B;switch(Y){case 1:if(X<128)K=X;break;case 2:if(Z=Q[V+1],(Z&192)===128){if(B=(X&31)<<6|Z&63,B>127)K=B}break;case 3:if(Z=Q[V+1],U=Q[V+2],(Z&192)===128&&(U&192)===128){if(B=(X&15)<<12|(Z&63)<<6|U&63,B>2047&&(B<55296||B>57343))K=B}break;case 4:if(Z=Q[V+1],U=Q[V+2],G=Q[V+3],(Z&192)===128&&(U&192)===128&&(G&192)===128){if(B=(X&15)<<18|(Z&63)<<12|(U&63)<<6|G&63,B>65535&&B<1114112)K=B}}}if(K===null)K=65533,Y=1;else if(K>65535)K-=65536,q.push(K>>>10&1023|55296),K=56320|K&1023;q.push(K),V+=Y}return xJ(q)}function xJ(Q){let $=Q.length;if($<=I4)return String.fromCharCode.apply(String,Q);let J="",q=0;while(q<$)J+=String.fromCharCode.apply(String,Q.slice(q,q+=I4));return J}function kJ(Q,$,J){let q="";J=Math.min(Q.length,J);for(let V=$;V<J;++V)q+=String.fromCharCode(Q[V]&127);return q}function yJ(Q,$,J){let q="";J=Math.min(Q.length,J);for(let V=$;V<J;++V)q+=String.fromCharCode(Q[V]);return q}function hJ(Q,$,J){let q=Q.length;if(!$||$<0)$=0;if(!J||J<0||J>q)J=q;let V="";for(let X=$;X<J;++X)V+=cJ[Q[X]];return V}function gJ(Q,$,J){let q=Q.slice($,J),V="";for(let X=0;X<q.length-1;X+=2)V+=String.fromCharCode(q[X]+q[X+1]*256);return V}function T0(Q,$,J){if(Q%1!==0||Q<0)throw RangeError("offset is not uint");if(Q+$>J)throw RangeError("Trying to access beyond buffer length")}function g0(Q,$,J,q,V,X){if(!b.isBuffer(Q))throw TypeError('"buffer" argument must be a Buffer instance');if($>V||$<X)throw RangeError('"value" argument is out of bounds');if(J+q>Q.length)throw RangeError("Index out of range")}function x4(Q,$,J,q,V){f4($,q,V,Q,J,7);let X=Number($&BigInt(4294967295));Q[J++]=X,X=X>>8,Q[J++]=X,X=X>>8,Q[J++]=X,X=X>>8,Q[J++]=X;let K=Number($>>BigInt(32)&BigInt(4294967295));return Q[J++]=K,K=K>>8,Q[J++]=K,K=K>>8,Q[J++]=K,K=K>>8,Q[J++]=K,J}function k4(Q,$,J,q,V){f4($,q,V,Q,J,7);let X=Number($&BigInt(4294967295));Q[J+7]=X,X=X>>8,Q[J+6]=X,X=X>>8,Q[J+5]=X,X=X>>8,Q[J+4]=X;let K=Number($>>BigInt(32)&BigInt(4294967295));return Q[J+3]=K,K=K>>8,Q[J+2]=K,K=K>>8,Q[J+1]=K,K=K>>8,Q[J]=K,J+8}function y4(Q,$,J,q,V,X){if(J+q>Q.length)throw RangeError("Index out of range");if(J<0)throw RangeError("Index out of range")}function h4(Q,$,J,q,V){if($=+$,J=J>>>0,!V)y4(Q,$,J,4,340282346638528860000000000000000000000,-340282346638528860000000000000000000000);return D4(Q,$,J,q,23,4),J+4}function g4(Q,$,J,q,V){if($=+$,J=J>>>0,!V)y4(Q,$,J,8,179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,-179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000);return D4(Q,$,J,q,52,8),J+8}function O4(Q){let $="",J=Q.length,q=Q[0]==="-"?1:0;for(;J>=q+4;J-=3)$=`_${Q.slice(J-3,J)}${$}`;return`${Q.slice(0,J)}${$}`}function fJ(Q,$,J){if(J1($,"offset"),Q[$]===void 0||Q[$+J]===void 0)T1($,Q.length-(J+1))}function f4(Q,$,J,q,V,X){if(Q>J||Q<$){let K=typeof $==="bigint"?"n":"",Y;if(X>3)if($===0||$===BigInt(0))Y=`>= 0${K} and < 2${K} ** ${(X+1)*8}${K}`;else Y=`>= -(2${K} ** ${(X+1)*8-1}${K}) and < 2 ** ${(X+1)*8-1}${K}`;else Y=`>= ${$}${K} and <= ${J}${K}`;throw new j8("value",Y,Q)}fJ(q,V,X)}function J1(Q,$){if(typeof Q!=="number")throw new LJ($,"number",Q)}function T1(Q,$,J){if(Math.floor(Q)!==Q)throw J1(Q,J),new j8(J||"offset","an integer",Q);if($<0)throw new wJ;throw new j8(J||"offset",`>= ${J?1:0} and <= ${$}`,Q)}function bJ(Q){if(Q=Q.split("=")[0],Q=Q.trim().replace(_J,""),Q.length<2)return"";while(Q.length%4!==0)Q=Q+"=";return Q}function W8(Q,$){$=$||1/0;let J,q=Q.length,V=null,X=[];for(let K=0;K<q;++K){if(J=Q.charCodeAt(K),J>55295&&J<57344){if(!V){if(J>56319){if(($-=3)>-1)X.push(239,191,189);continue}else if(K+1===q){if(($-=3)>-1)X.push(239,191,189);continue}V=J;continue}if(J<56320){if(($-=3)>-1)X.push(239,191,189);V=J;continue}J=(V-55296<<10|J-56320)+65536}else if(V){if(($-=3)>-1)X.push(239,191,189)}if(V=null,J<128){if(($-=1)<0)break;X.push(J)}else if(J<2048){if(($-=2)<0)break;X.push(J>>6|192,J&63|128)}else if(J<65536){if(($-=3)<0)break;X.push(J>>12|224,J>>6&63|128,J&63|128)}else if(J<1114112){if(($-=4)<0)break;X.push(J>>18|240,J>>12&63|128,J>>6&63|128,J&63|128)}else throw Error("Invalid code point")}return X}function uJ(Q){let $=[];for(let J=0;J<Q.length;++J)$.push(Q.charCodeAt(J)&255);return $}function pJ(Q,$){let J,q,V,X=[];for(let K=0;K<Q.length;++K){if(($-=2)<0)break;J=Q.charCodeAt(K),q=J>>8,V=J%256,X.push(V),X.push(q)}return X}function _4(Q){return jJ(bJ(Q))}function Z6(Q,$,J,q){let V;for(V=0;V<q;++V){if(V+J>=$.length||V>=Q.length)break;$[V+J]=Q[V]}return V}function $2(Q,$){return Q instanceof $||Q!=null&&Q.constructor!=null&&Q.constructor.name!=null&&Q.constructor.name===$.name}function L2(Q){return typeof BigInt>"u"?mJ:Q}function mJ(){throw Error("BigInt not supported")}function F8(Q){return()=>{throw Error(Q+" is not implemented for node:buffer browser polyfill")}}var Q2,l0,Z8="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",f2,F4,L4,C4=50,R1=2147483647,A4=536870888,WJ,BJ,PJ,MJ,FJ,wJ,LJ,j8,I4=4096,_J,cJ,dJ,lJ,iJ=(Q)=>{for(let $ of Q)if($.charCodeAt(0)>127)return!1;return!0},nJ,oJ;var z2=z4(()=>{Q2=[],l0=[];for(f2=0,F4=Z8.length;f2<F4;++f2)Q2[f2]=Z8[f2],l0[Z8.charCodeAt(f2)]=f2;l0[45]=62;l0[95]=63;L4=typeof Symbol==="function"&&typeof Symbol.for==="function"?Symbol.for("nodejs.util.inspect.custom"):null,WJ=globalThis.btoa,BJ=globalThis.atob,PJ=globalThis.File,MJ=globalThis.Blob,FJ={MAX_LENGTH:R1,MAX_STRING_LENGTH:A4};wJ=B8("ERR_BUFFER_OUT_OF_BOUNDS",function(Q){if(Q)return`${Q} is outside of buffer bounds`;return"Attempt to access memory outside buffer bounds"},RangeError),LJ=B8("ERR_INVALID_ARG_TYPE",function(Q,$){return`The "${Q}" argument must be of type number. Received type ${typeof $}`},TypeError),j8=B8("ERR_OUT_OF_RANGE",function(Q,$,J){let q=`The value of "${Q}" is out of range.`,V=J;if(Number.isInteger(J)&&Math.abs(J)>4294967296)V=O4(String(J));else if(typeof J==="bigint"){if(V=String(J),J>BigInt(2)**BigInt(32)||J<-(BigInt(2)**BigInt(32)))V=O4(V);V+="n"}return q+=` It must be ${$}. Received ${V}`,q},RangeError);Object.defineProperty(b.prototype,"parent",{enumerable:!0,get:function(){if(!b.isBuffer(this))return;return this.buffer}});Object.defineProperty(b.prototype,"offset",{enumerable:!0,get:function(){if(!b.isBuffer(this))return;return this.byteOffset}});b.poolSize=8192;b.from=function(Q,$,J){return R4(Q,$,J)};Object.setPrototypeOf(b.prototype,Uint8Array.prototype);Object.setPrototypeOf(b,Uint8Array);b.alloc=function(Q,$,J){return NJ(Q,$,J)};b.allocUnsafe=function(Q){return P8(Q)};b.allocUnsafeSlow=function(Q){return P8(Q)};b.isBuffer=function(Q){return Q!=null&&Q._isBuffer===!0&&Q!==b.prototype};b.compare=function(Q,$){if($2(Q,Uint8Array))Q=b.from(Q,Q.offset,Q.byteLength);if($2($,Uint8Array))$=b.from($,$.offset,$.byteLength);if(!b.isBuffer(Q)||!b.isBuffer($))throw TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(Q===$)return 0;let J=Q.length,q=$.length;for(let V=0,X=Math.min(J,q);V<X;++V)if(Q[V]!==$[V]){J=Q[V],q=$[V];break}if(J<q)return-1;if(q<J)return 1;return 0};b.isEncoding=function(Q){switch(String(Q).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}};b.concat=function(Q,$){if(!Array.isArray(Q))throw TypeError('"list" argument must be an Array of Buffers');if(Q.length===0)return b.alloc(0);let J;if($===void 0){$=0;for(J=0;J<Q.length;++J)$+=Q[J].length}let q=b.allocUnsafe($),V=0;for(J=0;J<Q.length;++J){let X=Q[J];if($2(X,Uint8Array))if(V+X.length>q.length){if(!b.isBuffer(X))X=b.from(X);X.copy(q,V)}else Uint8Array.prototype.set.call(q,X,V);else if(!b.isBuffer(X))throw TypeError('"list" argument must be an Array of Buffers');else X.copy(q,V);V+=X.length}return q};b.byteLength=E4;b.prototype._isBuffer=!0;b.prototype.swap16=function(){let Q=this.length;if(Q%2!==0)throw RangeError("Buffer size must be a multiple of 16-bits");for(let $=0;$<Q;$+=2)_2(this,$,$+1);return this};b.prototype.swap32=function(){let Q=this.length;if(Q%4!==0)throw RangeError("Buffer size must be a multiple of 32-bits");for(let $=0;$<Q;$+=4)_2(this,$,$+3),_2(this,$+1,$+2);return this};b.prototype.swap64=function(){let Q=this.length;if(Q%8!==0)throw RangeError("Buffer size must be a multiple of 64-bits");for(let $=0;$<Q;$+=8)_2(this,$,$+7),_2(this,$+1,$+6),_2(this,$+2,$+5),_2(this,$+3,$+4);return this};b.prototype.toString=function(){let Q=this.length;if(Q===0)return"";if(arguments.length===0)return S4(this,0,Q);return CJ.apply(this,arguments)};b.prototype.toLocaleString=b.prototype.toString;b.prototype.equals=function(Q){if(!b.isBuffer(Q))throw TypeError("Argument must be a Buffer");if(this===Q)return!0;return b.compare(this,Q)===0};b.prototype.inspect=function(){let Q="",$=C4;if(Q=this.toString("hex",0,$).replace(/(.{2})/g,"$1 ").trim(),this.length>$)Q+=" ... ";return"<Buffer "+Q+">"};if(L4)b.prototype[L4]=b.prototype.inspect;b.prototype.compare=function(Q,$,J,q,V){if($2(Q,Uint8Array))Q=b.from(Q,Q.offset,Q.byteLength);if(!b.isBuffer(Q))throw TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof Q);if($===void 0)$=0;if(J===void 0)J=Q?Q.length:0;if(q===void 0)q=0;if(V===void 0)V=this.length;if($<0||J>Q.length||q<0||V>this.length)throw RangeError("out of range index");if(q>=V&&$>=J)return 0;if(q>=V)return-1;if($>=J)return 1;if($>>>=0,J>>>=0,q>>>=0,V>>>=0,this===Q)return 0;let X=V-q,K=J-$,Y=Math.min(X,K),Z=this.slice(q,V),U=Q.slice($,J);for(let G=0;G<Y;++G)if(Z[G]!==U[G]){X=Z[G],K=U[G];break}if(X<K)return-1;if(K<X)return 1;return 0};b.prototype.includes=function(Q,$,J){return this.indexOf(Q,$,J)!==-1};b.prototype.indexOf=function(Q,$,J){return v4(this,Q,$,J,!0)};b.prototype.lastIndexOf=function(Q,$,J){return v4(this,Q,$,J,!1)};b.prototype.write=function(Q,$,J,q){if($===void 0)q="utf8",J=this.length,$=0;else if(J===void 0&&typeof $==="string")q=$,J=this.length,$=0;else if(isFinite($))if($=$>>>0,isFinite(J)){if(J=J>>>0,q===void 0)q="utf8"}else q=J,J=void 0;else throw Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let V=this.length-$;if(J===void 0||J>V)J=V;if(Q.length>0&&(J<0||$<0)||$>this.length)throw RangeError("Attempt to write outside buffer bounds");if(!q)q="utf8";let X=!1;for(;;)switch(q){case"hex":return AJ(this,Q,$,J);case"utf8":case"utf-8":return RJ(this,Q,$,J);case"ascii":case"latin1":case"binary":return TJ(this,Q,$,J);case"base64":return EJ(this,Q,$,J);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return vJ(this,Q,$,J);default:if(X)throw TypeError("Unknown encoding: "+q);q=(""+q).toLowerCase(),X=!0}};b.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};b.prototype.slice=function(Q,$){let J=this.length;if(Q=~~Q,$=$===void 0?J:~~$,Q<0){if(Q+=J,Q<0)Q=0}else if(Q>J)Q=J;if($<0){if($+=J,$<0)$=0}else if($>J)$=J;if($<Q)$=Q;let q=this.subarray(Q,$);return Object.setPrototypeOf(q,b.prototype),q};b.prototype.readUintLE=b.prototype.readUIntLE=function(Q,$,J){if(Q=Q>>>0,$=$>>>0,!J)T0(Q,$,this.length);let q=this[Q],V=1,X=0;while(++X<$&&(V*=256))q+=this[Q+X]*V;return q};b.prototype.readUintBE=b.prototype.readUIntBE=function(Q,$,J){if(Q=Q>>>0,$=$>>>0,!J)T0(Q,$,this.length);let q=this[Q+--$],V=1;while($>0&&(V*=256))q+=this[Q+--$]*V;return q};b.prototype.readUint8=b.prototype.readUInt8=function(Q,$){if(Q=Q>>>0,!$)T0(Q,1,this.length);return this[Q]};b.prototype.readUint16LE=b.prototype.readUInt16LE=function(Q,$){if(Q=Q>>>0,!$)T0(Q,2,this.length);return this[Q]|this[Q+1]<<8};b.prototype.readUint16BE=b.prototype.readUInt16BE=function(Q,$){if(Q=Q>>>0,!$)T0(Q,2,this.length);return this[Q]<<8|this[Q+1]};b.prototype.readUint32LE=b.prototype.readUInt32LE=function(Q,$){if(Q=Q>>>0,!$)T0(Q,4,this.length);return(this[Q]|this[Q+1]<<8|this[Q+2]<<16)+this[Q+3]*16777216};b.prototype.readUint32BE=b.prototype.readUInt32BE=function(Q,$){if(Q=Q>>>0,!$)T0(Q,4,this.length);return this[Q]*16777216+(this[Q+1]<<16|this[Q+2]<<8|this[Q+3])};b.prototype.readBigUInt64LE=L2(function(Q){Q=Q>>>0,J1(Q,"offset");let $=this[Q],J=this[Q+7];if($===void 0||J===void 0)T1(Q,this.length-8);let q=$+this[++Q]*256+this[++Q]*65536+this[++Q]*16777216,V=this[++Q]+this[++Q]*256+this[++Q]*65536+J*16777216;return BigInt(q)+(BigInt(V)<<BigInt(32))});b.prototype.readBigUInt64BE=L2(function(Q){Q=Q>>>0,J1(Q,"offset");let $=this[Q],J=this[Q+7];if($===void 0||J===void 0)T1(Q,this.length-8);let q=$*16777216+this[++Q]*65536+this[++Q]*256+this[++Q],V=this[++Q]*16777216+this[++Q]*65536+this[++Q]*256+J;return(BigInt(q)<<BigInt(32))+BigInt(V)});b.prototype.readIntLE=function(Q,$,J){if(Q=Q>>>0,$=$>>>0,!J)T0(Q,$,this.length);let q=this[Q],V=1,X=0;while(++X<$&&(V*=256))q+=this[Q+X]*V;if(V*=128,q>=V)q-=Math.pow(2,8*$);return q};b.prototype.readIntBE=function(Q,$,J){if(Q=Q>>>0,$=$>>>0,!J)T0(Q,$,this.length);let q=$,V=1,X=this[Q+--q];while(q>0&&(V*=256))X+=this[Q+--q]*V;if(V*=128,X>=V)X-=Math.pow(2,8*$);return X};b.prototype.readInt8=function(Q,$){if(Q=Q>>>0,!$)T0(Q,1,this.length);if(!(this[Q]&128))return this[Q];return(255-this[Q]+1)*-1};b.prototype.readInt16LE=function(Q,$){if(Q=Q>>>0,!$)T0(Q,2,this.length);let J=this[Q]|this[Q+1]<<8;return J&32768?J|4294901760:J};b.prototype.readInt16BE=function(Q,$){if(Q=Q>>>0,!$)T0(Q,2,this.length);let J=this[Q+1]|this[Q]<<8;return J&32768?J|4294901760:J};b.prototype.readInt32LE=function(Q,$){if(Q=Q>>>0,!$)T0(Q,4,this.length);return this[Q]|this[Q+1]<<8|this[Q+2]<<16|this[Q+3]<<24};b.prototype.readInt32BE=function(Q,$){if(Q=Q>>>0,!$)T0(Q,4,this.length);return this[Q]<<24|this[Q+1]<<16|this[Q+2]<<8|this[Q+3]};b.prototype.readBigInt64LE=L2(function(Q){Q=Q>>>0,J1(Q,"offset");let $=this[Q],J=this[Q+7];if($===void 0||J===void 0)T1(Q,this.length-8);let q=this[Q+4]+this[Q+5]*256+this[Q+6]*65536+(J<<24);return(BigInt(q)<<BigInt(32))+BigInt($+this[++Q]*256+this[++Q]*65536+this[++Q]*16777216)});b.prototype.readBigInt64BE=L2(function(Q){Q=Q>>>0,J1(Q,"offset");let $=this[Q],J=this[Q+7];if($===void 0||J===void 0)T1(Q,this.length-8);let q=($<<24)+this[++Q]*65536+this[++Q]*256+this[++Q];return(BigInt(q)<<BigInt(32))+BigInt(this[++Q]*16777216+this[++Q]*65536+this[++Q]*256+J)});b.prototype.readFloatLE=function(Q,$){if(Q=Q>>>0,!$)T0(Q,4,this.length);return G6(this,Q,!0,23,4)};b.prototype.readFloatBE=function(Q,$){if(Q=Q>>>0,!$)T0(Q,4,this.length);return G6(this,Q,!1,23,4)};b.prototype.readDoubleLE=function(Q,$){if(Q=Q>>>0,!$)T0(Q,8,this.length);return G6(this,Q,!0,52,8)};b.prototype.readDoubleBE=function(Q,$){if(Q=Q>>>0,!$)T0(Q,8,this.length);return G6(this,Q,!1,52,8)};b.prototype.writeUintLE=b.prototype.writeUIntLE=function(Q,$,J,q){if(Q=+Q,$=$>>>0,J=J>>>0,!q){let K=Math.pow(2,8*J)-1;g0(this,Q,$,J,K,0)}let V=1,X=0;this[$]=Q&255;while(++X<J&&(V*=256))this[$+X]=Q/V&255;return $+J};b.prototype.writeUintBE=b.prototype.writeUIntBE=function(Q,$,J,q){if(Q=+Q,$=$>>>0,J=J>>>0,!q){let K=Math.pow(2,8*J)-1;g0(this,Q,$,J,K,0)}let V=J-1,X=1;this[$+V]=Q&255;while(--V>=0&&(X*=256))this[$+V]=Q/X&255;return $+J};b.prototype.writeUint8=b.prototype.writeUInt8=function(Q,$,J){if(Q=+Q,$=$>>>0,!J)g0(this,Q,$,1,255,0);return this[$]=Q&255,$+1};b.prototype.writeUint16LE=b.prototype.writeUInt16LE=function(Q,$,J){if(Q=+Q,$=$>>>0,!J)g0(this,Q,$,2,65535,0);return this[$]=Q&255,this[$+1]=Q>>>8,$+2};b.prototype.writeUint16BE=b.prototype.writeUInt16BE=function(Q,$,J){if(Q=+Q,$=$>>>0,!J)g0(this,Q,$,2,65535,0);return this[$]=Q>>>8,this[$+1]=Q&255,$+2};b.prototype.writeUint32LE=b.prototype.writeUInt32LE=function(Q,$,J){if(Q=+Q,$=$>>>0,!J)g0(this,Q,$,4,4294967295,0);return this[$+3]=Q>>>24,this[$+2]=Q>>>16,this[$+1]=Q>>>8,this[$]=Q&255,$+4};b.prototype.writeUint32BE=b.prototype.writeUInt32BE=function(Q,$,J){if(Q=+Q,$=$>>>0,!J)g0(this,Q,$,4,4294967295,0);return this[$]=Q>>>24,this[$+1]=Q>>>16,this[$+2]=Q>>>8,this[$+3]=Q&255,$+4};b.prototype.writeBigUInt64LE=L2(function(Q,$=0){return x4(this,Q,$,BigInt(0),BigInt("0xffffffffffffffff"))});b.prototype.writeBigUInt64BE=L2(function(Q,$=0){return k4(this,Q,$,BigInt(0),BigInt("0xffffffffffffffff"))});b.prototype.writeIntLE=function(Q,$,J,q){if(Q=+Q,$=$>>>0,!q){let Y=Math.pow(2,8*J-1);g0(this,Q,$,J,Y-1,-Y)}let V=0,X=1,K=0;this[$]=Q&255;while(++V<J&&(X*=256)){if(Q<0&&K===0&&this[$+V-1]!==0)K=1;this[$+V]=(Q/X>>0)-K&255}return $+J};b.prototype.writeIntBE=function(Q,$,J,q){if(Q=+Q,$=$>>>0,!q){let Y=Math.pow(2,8*J-1);g0(this,Q,$,J,Y-1,-Y)}let V=J-1,X=1,K=0;this[$+V]=Q&255;while(--V>=0&&(X*=256)){if(Q<0&&K===0&&this[$+V+1]!==0)K=1;this[$+V]=(Q/X>>0)-K&255}return $+J};b.prototype.writeInt8=function(Q,$,J){if(Q=+Q,$=$>>>0,!J)g0(this,Q,$,1,127,-128);if(Q<0)Q=255+Q+1;return this[$]=Q&255,$+1};b.prototype.writeInt16LE=function(Q,$,J){if(Q=+Q,$=$>>>0,!J)g0(this,Q,$,2,32767,-32768);return this[$]=Q&255,this[$+1]=Q>>>8,$+2};b.prototype.writeInt16BE=function(Q,$,J){if(Q=+Q,$=$>>>0,!J)g0(this,Q,$,2,32767,-32768);return this[$]=Q>>>8,this[$+1]=Q&255,$+2};b.prototype.writeInt32LE=function(Q,$,J){if(Q=+Q,$=$>>>0,!J)g0(this,Q,$,4,2147483647,-2147483648);return this[$]=Q&255,this[$+1]=Q>>>8,this[$+2]=Q>>>16,this[$+3]=Q>>>24,$+4};b.prototype.writeInt32BE=function(Q,$,J){if(Q=+Q,$=$>>>0,!J)g0(this,Q,$,4,2147483647,-2147483648);if(Q<0)Q=4294967295+Q+1;return this[$]=Q>>>24,this[$+1]=Q>>>16,this[$+2]=Q>>>8,this[$+3]=Q&255,$+4};b.prototype.writeBigInt64LE=L2(function(Q,$=0){return x4(this,Q,$,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});b.prototype.writeBigInt64BE=L2(function(Q,$=0){return k4(this,Q,$,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});b.prototype.writeFloatLE=function(Q,$,J){return h4(this,Q,$,!0,J)};b.prototype.writeFloatBE=function(Q,$,J){return h4(this,Q,$,!1,J)};b.prototype.writeDoubleLE=function(Q,$,J){return g4(this,Q,$,!0,J)};b.prototype.writeDoubleBE=function(Q,$,J){return g4(this,Q,$,!1,J)};b.prototype.copy=function(Q,$,J,q){if(!b.isBuffer(Q))throw TypeError("argument should be a Buffer");if(!J)J=0;if(!q&&q!==0)q=this.length;if($>=Q.length)$=Q.length;if(!$)$=0;if(q>0&&q<J)q=J;if(q===J)return 0;if(Q.length===0||this.length===0)return 0;if($<0)throw RangeError("targetStart out of bounds");if(J<0||J>=this.length)throw RangeError("Index out of range");if(q<0)throw RangeError("sourceEnd out of bounds");if(q>this.length)q=this.length;if(Q.length-$<q-J)q=Q.length-$+J;let V=q-J;if(this===Q&&typeof Uint8Array.prototype.copyWithin==="function")this.copyWithin($,J,q);else Uint8Array.prototype.set.call(Q,this.subarray(J,q),$);return V};b.prototype.fill=function(Q,$,J,q){if(typeof Q==="string"){if(typeof $==="string")q=$,$=0,J=this.length;else if(typeof J==="string")q=J,J=this.length;if(q!==void 0&&typeof q!=="string")throw TypeError("encoding must be a string");if(typeof q==="string"&&!b.isEncoding(q))throw TypeError("Unknown encoding: "+q);if(Q.length===1){let X=Q.charCodeAt(0);if(q==="utf8"&&X<128||q==="latin1")Q=X}}else if(typeof Q==="number")Q=Q&255;else if(typeof Q==="boolean")Q=Number(Q);if($<0||this.length<$||this.length<J)throw RangeError("Out of range index");if(J<=$)return this;if($=$>>>0,J=J===void 0?this.length:J>>>0,!Q)Q=0;let V;if(typeof Q==="number")for(V=$;V<J;++V)this[V]=Q;else{let X=b.isBuffer(Q)?Q:b.from(Q,q),K=X.length;if(K===0)throw TypeError('The value "'+Q+'" is invalid for argument "value"');for(V=0;V<J-$;++V)this[V+$]=X[V%K]}return this};_J=/[^+/0-9A-Za-z-_]/g;cJ=function(){let Q=Array(256);for(let $=0;$<16;++$){let J=$*16;for(let q=0;q<16;++q)Q[J+q]="0123456789abcdef"[$]+"0123456789abcdef"[q]}return Q}();dJ=F8("resolveObjectURL"),lJ=F8("isUtf8"),nJ=F8("transcode"),oJ=b});var v1={};j4(v1,{setMaxListeners:()=>r4,once:()=>n4,listenerCount:()=>a4,init:()=>N2,getMaxListeners:()=>t4,getEventListeners:()=>o4,default:()=>qq,captureRejectionSymbol:()=>m4,addAbortListener:()=>e4,EventEmitter:()=>N2});function d4(Q,$){var{_events:J}=Q;if($[0]??=Error("Unhandled error."),!J)throw $[0];var q=J[c4];if(q)for(var V of u4.call(q))V.apply(Q,$);var X=J.error;if(!X)throw $[0];for(var V of u4.call(X))V.apply(Q,$);return!0}function sJ(Q,$,J,q){$.then(void 0,function(V){queueMicrotask(()=>tJ(Q,V,J,q))})}function tJ(Q,$,J,q){if(typeof Q[b4]==="function")Q[b4]($,J,...q);else try{Q[b2]=!1,Q.emit("error",$)}finally{Q[b2]=!0}}function l4(Q,$,J){J.warned=!0;let q=Error(`Possible EventEmitter memory leak detected. ${J.length} ${String($)} listeners added to [${Q.constructor.name}]. Use emitter.setMaxListeners() to increase limit`);q.name="MaxListenersExceededWarning",q.emitter=Q,q.type=$,q.count=J.length,console.warn(q)}function i4(Q,$,...J){this.removeListener(Q,$),$.apply(this,J)}function n4(Q,$,J){var q=J?.signal;if(s4(q,"options.signal"),q?.aborted)throw new w8(void 0,{cause:q?.reason});let{resolve:V,reject:X,promise:K}=$newPromiseCapability(Promise),Y=(G)=>{if(Q.removeListener($,Z),q!=null)j6(q,"abort",U);X(G)},Z=(...G)=>{if(typeof Q.removeListener==="function")Q.removeListener("error",Y);if(q!=null)j6(q,"abort",U);V(G)};if(p4(Q,$,Z,{once:!0}),$!=="error"&&typeof Q.once==="function")Q.once("error",Y);function U(){j6(Q,$,Z),j6(Q,"error",Y),X(new w8(void 0,{cause:q?.reason}))}if(q!=null)p4(q,"abort",U,{once:!0});return K}function o4(Q,$){return Q.listeners($)}function r4(Q,...$){N8(Q,"setMaxListeners",0);var J;if($&&(J=$.length))for(let q=0;q<J;q++)$[q].setMaxListeners(Q);else u2=Q}function a4(Q,$){return Q.listenerCount($)}function j6(Q,$,J,q){if(typeof Q.removeListener==="function")Q.removeListener($,J);else Q.removeEventListener($,J,q)}function p4(Q,$,J,q){if(typeof Q.on==="function")if(q.once)Q.once($,J);else Q.on($,J);else Q.addEventListener($,J,q)}function q1(Q,$,J){let q=TypeError(`The "${Q}" argument must be of type ${$}. Received ${J}`);return q.code="ERR_INVALID_ARG_TYPE",q}function $q(Q,$,J){let q=RangeError(`The "${Q}" argument is out of range. It must be ${$}. Received ${J}`);return q.code="ERR_OUT_OF_RANGE",q}function s4(Q,$){if(Q!==void 0&&(Q===null||typeof Q!=="object"||!("aborted"in Q)))throw q1($,"AbortSignal",Q)}function N8(Q,$,J,q){if(typeof Q!=="number")throw q1($,"number",Q);if(J!=null&&Q<J||q!=null&&Q>q||(J!=null||q!=null)&&Number.isNaN(Q))throw $q($,`${J!=null?`>= ${J}`:""}${J!=null&&q!=null?" && ":""}${q!=null?`<= ${q}`:""}`,Q)}function E1(Q){if(typeof Q!=="function")throw TypeError("The listener must be a function")}function Jq(Q,$){if(typeof Q!=="boolean")throw q1($,"boolean",Q)}function t4(Q){return Q?._maxListeners??u2}function e4(Q,$){if(Q===void 0)throw q1("signal","AbortSignal",Q);if(s4(Q,"signal"),typeof $!=="function")throw q1("listener","function",$);let J;if(Q.aborted)queueMicrotask(()=>$());else Q.addEventListener("abort",$,{__proto__:null,once:!0}),J=()=>{Q.removeEventListener("abort",$)};return{__proto__:null,[Symbol.dispose](){J?.()}}}var L8,b2,c4,rJ,aJ,b4,m4,u4,u2=10,N2=function(Q){if(this._events===void 0||this._events===this.__proto__._events)this._events={__proto__:null},this._eventsCount=0;if(this._maxListeners??=void 0,this[b2]=Q?.captureRejections?Boolean(Q?.captureRejections):N0[b2])this.emit=Qq},N0,eJ=function(Q,...$){if(Q==="error")return d4(this,$);var{_events:J}=this;if(J===void 0)return!1;var q=J[Q];if(q===void 0)return!1;let V=q.length>1?q.slice():q;for(let X=0,{length:K}=V;X<K;X++){let Y=V[X];switch($.length){case 0:Y.call(this);break;case 1:Y.call(this,$[0]);break;case 2:Y.call(this,$[0],$[1]);break;case 3:Y.call(this,$[0],$[1],$[2]);break;default:Y.apply(this,$);break}}return!0},Qq=function(Q,...$){if(Q==="error")return d4(this,$);var{_events:J}=this;if(J===void 0)return!1;var q=J[Q];if(q===void 0)return!1;let V=q.length>1?q.slice():q;for(let X=0,{length:K}=V;X<K;X++){let Y=V[X],Z;switch($.length){case 0:Z=Y.call(this);break;case 1:Z=Y.call(this,$[0]);break;case 2:Z=Y.call(this,$[0],$[1]);break;case 3:Z=Y.call(this,$[0],$[1],$[2]);break;default:Z=Y.apply(this,$);break}if(Z!==void 0&&typeof Z?.then==="function"&&Z.then===Promise.prototype.then)sJ(this,Z,Q,$)}return!0},w8,qq;var S1=z4(()=>{L8=Symbol.for,b2=Symbol("kCapture"),c4=L8("events.errorMonitor"),rJ=Symbol("events.maxEventTargetListeners"),aJ=Symbol("events.maxEventTargetListenersWarned"),b4=L8("nodejs.rejection"),m4=L8("nodejs.rejection"),u4=Array.prototype.slice,N0=N2.prototype={};N0._events=void 0;N0._eventsCount=0;N0._maxListeners=void 0;N0.setMaxListeners=function(Q){return N8(Q,"setMaxListeners",0),this._maxListeners=Q,this};N0.constructor=N2;N0.getMaxListeners=function(){return this?._maxListeners??u2};N0.emit=eJ;N0.addListener=function(Q,$){E1($);var J=this._events;if(!J)J=this._events={__proto__:null},this._eventsCount=0;else if(J.newListener)this.emit("newListener",Q,$.listener??$);var q=J[Q];if(!q)J[Q]=[$],this._eventsCount++;else{q.push($);var V=this._maxListeners??u2;if(V>0&&q.length>V&&!q.warned)l4(this,Q,q)}return this};N0.on=N0.addListener;N0.prependListener=function(Q,$){E1($);var J=this._events;if(!J)J=this._events={__proto__:null},this._eventsCount=0;else if(J.newListener)this.emit("newListener",Q,$.listener??$);var q=J[Q];if(!q)J[Q]=[$],this._eventsCount++;else{q.unshift($);var V=this._maxListeners??u2;if(V>0&&q.length>V&&!q.warned)l4(this,Q,q)}return this};N0.once=function(Q,$){E1($);let J=i4.bind(this,Q,$);return J.listener=$,this.addListener(Q,J),this};N0.prependOnceListener=function(Q,$){E1($);let J=i4.bind(this,Q,$);return J.listener=$,this.prependListener(Q,J),this};N0.removeListener=function(Q,$){E1($);var{_events:J}=this;if(!J)return this;var q=J[Q];if(!q)return this;var V=q.length;let X=-1;for(let K=V-1;K>=0;K--)if(q[K]===$||q[K].listener===$){X=K;break}if(X<0)return this;if(X===0)q.shift();else q.splice(X,1);if(q.length===0)delete J[Q],this._eventsCount--;return this};N0.off=N0.removeListener;N0.removeAllListeners=function(Q){var{_events:$}=this;if(Q&&$){if($[Q])delete $[Q],this._eventsCount--}else this._events={__proto__:null};return this};N0.listeners=function(Q){var{_events:$}=this;if(!$)return[];var J=$[Q];if(!J)return[];return J.map((q)=>q.listener??q)};N0.rawListeners=function(Q){var{_events:$}=this;if(!$)return[];var J=$[Q];if(!J)return[];return J.slice()};N0.listenerCount=function(Q){var{_events:$}=this;if(!$)return 0;return $[Q]?.length??0};N0.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]};N0[b2]=!1;w8=class w8 extends Error{constructor(Q="The operation was aborted",$=void 0){if($!==void 0&&typeof $!=="object")throw q1("options","Object",$);super(Q,$);this.code="ABORT_ERR",this.name="AbortError"}};Object.defineProperties(N2,{captureRejections:{get(){return N0[b2]},set(Q){Jq(Q,"EventEmitter.captureRejections"),N0[b2]=Q},enumerable:!0},defaultMaxListeners:{enumerable:!0,get:()=>{return u2},set:(Q)=>{N8(Q,"defaultMaxListeners",0),u2=Q}},kMaxEventTargetListeners:{value:rJ,enumerable:!1,configurable:!1,writable:!1},kMaxEventTargetListenersWarned:{value:aJ,enumerable:!1,configurable:!1,writable:!1}});Object.assign(N2,{once:n4,getEventListeners:o4,getMaxListeners:t4,setMaxListeners:r4,EventEmitter:N2,usingDomains:!1,captureRejectionSymbol:m4,errorMonitor:c4,addAbortListener:e4,init:N2,listenerCount:a4});qq=N2});var B6=Z0((yU,Y7)=>{var F0=(Q,$)=>()=>($||Q(($={exports:{}}).exports,$),$.exports),O0=F0((Q,$)=>{class J extends Error{constructor(q){if(!Array.isArray(q))throw TypeError(`Expected input to be an Array, got ${typeof q}`);let V="";for(let X=0;X<q.length;X++)V+=` ${q[X].stack}
`;super(V);this.name="AggregateError",this.errors=q}}$.exports={AggregateError:J,ArrayIsArray(q){return Array.isArray(q)},ArrayPrototypeIncludes(q,V){return q.includes(V)},ArrayPrototypeIndexOf(q,V){return q.indexOf(V)},ArrayPrototypeJoin(q,V){return q.join(V)},ArrayPrototypeMap(q,V){return q.map(V)},ArrayPrototypePop(q,V){return q.pop(V)},ArrayPrototypePush(q,V){return q.push(V)},ArrayPrototypeSlice(q,V,X){return q.slice(V,X)},Error,FunctionPrototypeCall(q,V,...X){return q.call(V,...X)},FunctionPrototypeSymbolHasInstance(q,V){return Function.prototype[Symbol.hasInstance].call(q,V)},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(q,V){return Object.defineProperties(q,V)},ObjectDefineProperty(q,V,X){return Object.defineProperty(q,V,X)},ObjectGetOwnPropertyDescriptor(q,V){return Object.getOwnPropertyDescriptor(q,V)},ObjectKeys(q){return Object.keys(q)},ObjectSetPrototypeOf(q,V){return Object.setPrototypeOf(q,V)},Promise,PromisePrototypeCatch(q,V){return q.catch(V)},PromisePrototypeThen(q,V,X){return q.then(V,X)},PromiseReject(q){return Promise.reject(q)},PromiseResolve(q){return Promise.resolve(q)},ReflectApply:Reflect.apply,RegExpPrototypeTest(q,V){return q.test(V)},SafeSet:Set,String,StringPrototypeSlice(q,V,X){return q.slice(V,X)},StringPrototypeToLowerCase(q){return q.toLowerCase()},StringPrototypeToUpperCase(q){return q.toUpperCase()},StringPrototypeTrim(q){return q.trim()},Symbol,SymbolFor:Symbol.for,SymbolAsyncIterator:Symbol.asyncIterator,SymbolHasInstance:Symbol.hasInstance,SymbolIterator:Symbol.iterator,SymbolDispose:Symbol.dispose||Symbol("Symbol.dispose"),SymbolAsyncDispose:Symbol.asyncDispose||Symbol("Symbol.asyncDispose"),TypedArrayPrototypeSet(q,V,X){return q.set(V,X)},Boolean,Uint8Array}}),Q7=F0((Q,$)=>{$.exports={format(J,...q){return J.replace(/%([sdifj])/g,function(...[V,X]){let K=q.shift();if(X==="f")return K.toFixed(6);else if(X==="j")return JSON.stringify(K);else if(X==="s"&&typeof K==="object")return`${K.constructor!==Object?K.constructor.name:""} {}`.trim();else return K.toString()})},inspect(J){switch(typeof J){case"string":if(J.includes("'")){if(!J.includes('"'))return`"${J}"`;else if(!J.includes("`")&&!J.includes("${"))return`\`${J}\``}return`'${J}'`;case"number":if(isNaN(J))return"NaN";else if(Object.is(J,-0))return String(J);return J;case"bigint":return`${String(J)}n`;case"boolean":case"undefined":return String(J);case"object":return"{}"}}}}),k0=F0((Q,$)=>{var{format:J,inspect:q}=Q7(),{AggregateError:V}=O0(),X=globalThis.AggregateError||V,K=Symbol("kIsNodeError"),Y=["string","function","number","object","Function","Object","boolean","bigint","symbol"],Z=/^([A-Z][a-z0-9]*)+$/,U={};function G(F,j){if(!F)throw new U.ERR_INTERNAL_ASSERTION(j)}function B(F){let j="",P=F.length,M=F[0]==="-"?1:0;for(;P>=M+4;P-=3)j=`_${F.slice(P-3,P)}${j}`;return`${F.slice(0,P)}${j}`}function H(F,j,P){if(typeof j==="function")return G(j.length<=P.length,`Code: ${F}; The provided arguments length (${P.length}) does not match the required ones (${j.length}).`),j(...P);let M=(j.match(/%[dfijoOs]/g)||[]).length;if(G(M===P.length,`Code: ${F}; The provided arguments length (${P.length}) does not match the required ones (${M}).`),P.length===0)return j;return J(j,...P)}function W(F,j,P){if(!P)P=Error;class M extends P{constructor(...L){super(H(F,j,L))}toString(){return`${this.name} [${F}]: ${this.message}`}}Object.defineProperties(M.prototype,{name:{value:P.name,writable:!0,enumerable:!1,configurable:!0},toString:{value(){return`${this.name} [${F}]: ${this.message}`},writable:!0,enumerable:!1,configurable:!0}}),M.prototype.code=F,M.prototype[K]=!0,U[F]=M}function A(F){let j="__node_internal_"+F.name;return Object.defineProperty(F,"name",{value:j}),F}function T(F,j){if(F&&j&&F!==j){if(Array.isArray(j.errors))return j.errors.push(F),j;let P=new X([j,F],j.message);return P.code=j.code,P}return F||j}class N extends Error{constructor(F="The operation was aborted",j=void 0){if(j!==void 0&&typeof j!=="object")throw new U.ERR_INVALID_ARG_TYPE("options","Object",j);super(F,j);this.code="ABORT_ERR",this.name="AbortError"}}W("ERR_ASSERTION","%s",Error),W("ERR_INVALID_ARG_TYPE",(F,j,P)=>{if(G(typeof F==="string","'name' must be a string"),!Array.isArray(j))j=[j];let M="The ";if(F.endsWith(" argument"))M+=`${F} `;else M+=`"${F}" ${F.includes(".")?"property":"argument"} `;M+="must be ";let L=[],h=[],m=[];for(let f of j)if(G(typeof f==="string","All expected entries have to be of type string"),Y.includes(f))L.push(f.toLowerCase());else if(Z.test(f))h.push(f);else G(f!=="object",'The value "object" should be written as "Object"'),m.push(f);if(h.length>0){let f=L.indexOf("object");if(f!==-1)L.splice(L,f,1),h.push("Object")}if(L.length>0){switch(L.length){case 1:M+=`of type ${L[0]}`;break;case 2:M+=`one of type ${L[0]} or ${L[1]}`;break;default:{let f=L.pop();M+=`one of type ${L.join(", ")}, or ${f}`}}if(h.length>0||m.length>0)M+=" or "}if(h.length>0){switch(h.length){case 1:M+=`an instance of ${h[0]}`;break;case 2:M+=`an instance of ${h[0]} or ${h[1]}`;break;default:{let f=h.pop();M+=`an instance of ${h.join(", ")}, or ${f}`}}if(m.length>0)M+=" or "}switch(m.length){case 0:break;case 1:if(m[0].toLowerCase()!==m[0])M+="an ";M+=`${m[0]}`;break;case 2:M+=`one of ${m[0]} or ${m[1]}`;break;default:{let f=m.pop();M+=`one of ${m.join(", ")}, or ${f}`}}if(P==null)M+=`. Received ${P}`;else if(typeof P==="function"&&P.name)M+=`. Received function ${P.name}`;else if(typeof P==="object"){var l;if((l=P.constructor)!==null&&l!==void 0&&l.name)M+=`. Received an instance of ${P.constructor.name}`;else{let f=q(P,{depth:-1});M+=`. Received ${f}`}}else{let f=q(P,{colors:!1});if(f.length>25)f=`${f.slice(0,25)}...`;M+=`. Received type ${typeof P} (${f})`}return M},TypeError),W("ERR_INVALID_ARG_VALUE",(F,j,P="is invalid")=>{let M=q(j);if(M.length>128)M=M.slice(0,128)+"...";return`The ${F.includes(".")?"property":"argument"} '${F}' ${P}. Received ${M}`},TypeError),W("ERR_INVALID_RETURN_VALUE",(F,j,P)=>{var M;let L=P!==null&&P!==void 0&&(M=P.constructor)!==null&&M!==void 0&&M.name?`instance of ${P.constructor.name}`:`type ${typeof P}`;return`Expected ${F} to be returned from the "${j}" function but got ${L}.`},TypeError),W("ERR_MISSING_ARGS",(...F)=>{G(F.length>0,"At least one arg needs to be specified");let j,P=F.length;switch(F=(Array.isArray(F)?F:[F]).map((M)=>`"${M}"`).join(" or "),P){case 1:j+=`The ${F[0]} argument`;break;case 2:j+=`The ${F[0]} and ${F[1]} arguments`;break;default:{let M=F.pop();j+=`The ${F.join(", ")}, and ${M} arguments`}break}return`${j} must be specified`},TypeError),W("ERR_OUT_OF_RANGE",(F,j,P)=>{G(j,'Missing "range" argument');let M;if(Number.isInteger(P)&&Math.abs(P)>4294967296)M=B(String(P));else if(typeof P==="bigint"){M=String(P);let L=BigInt(2)**BigInt(32);if(P>L||P<-L)M=B(M);M+="n"}else M=q(P);return`The value of "${F}" is out of range. It must be ${j}. Received ${M}`},RangeError),W("ERR_MULTIPLE_CALLBACK","Callback called multiple times",Error),W("ERR_METHOD_NOT_IMPLEMENTED","The %s method is not implemented",Error),W("ERR_STREAM_ALREADY_FINISHED","Cannot call %s after a stream was finished",Error),W("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable",Error),W("ERR_STREAM_DESTROYED","Cannot call %s after a stream was destroyed",Error),W("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),W("ERR_STREAM_PREMATURE_CLOSE","Premature close",Error),W("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF",Error),W("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event",Error),W("ERR_STREAM_WRITE_AFTER_END","write after end",Error),W("ERR_UNKNOWN_ENCODING","Unknown encoding: %s",TypeError),$.exports={AbortError:N,aggregateTwoErrors:A(T),hideStackFrames:A,codes:U}}),Vq=F0((Q,$)=>{Object.defineProperty(Q,"__esModule",{value:!0});var J=new WeakMap,q=new WeakMap;function V(k){let R=J.get(k);return console.assert(R!=null,"'this' is expected an Event object, but got",k),R}function X(k){if(k.passiveListener!=null){if(typeof console<"u"&&typeof console.error==="function")console.error("Unable to preventDefault inside passive event listener invocation.",k.passiveListener);return}if(!k.event.cancelable)return;if(k.canceled=!0,typeof k.event.preventDefault==="function")k.event.preventDefault()}function K(k,R){J.set(this,{eventTarget:k,event:R,eventPhase:2,currentTarget:k,canceled:!1,stopped:!1,immediateStopped:!1,passiveListener:null,timeStamp:R.timeStamp||Date.now()}),Object.defineProperty(this,"isTrusted",{value:!1,enumerable:!0});let O=Object.keys(R);for(let x=0;x<O.length;++x){let y=O[x];if(!(y in this))Object.defineProperty(this,y,Y(y))}}if(K.prototype={get type(){return V(this).event.type},get target(){return V(this).eventTarget},get currentTarget(){return V(this).currentTarget},composedPath(){let k=V(this).currentTarget;if(k==null)return[];return[k]},get NONE(){return 0},get CAPTURING_PHASE(){return 1},get AT_TARGET(){return 2},get BUBBLING_PHASE(){return 3},get eventPhase(){return V(this).eventPhase},stopPropagation(){let k=V(this);if(k.stopped=!0,typeof k.event.stopPropagation==="function")k.event.stopPropagation()},stopImmediatePropagation(){let k=V(this);if(k.stopped=!0,k.immediateStopped=!0,typeof k.event.stopImmediatePropagation==="function")k.event.stopImmediatePropagation()},get bubbles(){return Boolean(V(this).event.bubbles)},get cancelable(){return Boolean(V(this).event.cancelable)},preventDefault(){X(V(this))},get defaultPrevented(){return V(this).canceled},get composed(){return Boolean(V(this).event.composed)},get timeStamp(){return V(this).timeStamp},get srcElement(){return V(this).eventTarget},get cancelBubble(){return V(this).stopped},set cancelBubble(k){if(!k)return;let R=V(this);if(R.stopped=!0,typeof R.event.cancelBubble==="boolean")R.event.cancelBubble=!0},get returnValue(){return!V(this).canceled},set returnValue(k){if(!k)X(V(this))},initEvent(){}},Object.defineProperty(K.prototype,"constructor",{value:K,configurable:!0,writable:!0}),typeof window<"u"&&typeof window.Event<"u")Object.setPrototypeOf(K.prototype,window.Event.prototype),q.set(window.Event.prototype,K);function Y(k){return{get(){return V(this).event[k]},set(R){V(this).event[k]=R},configurable:!0,enumerable:!0}}function Z(k){return{value(){let R=V(this).event;return R[k].apply(R,arguments)},configurable:!0,enumerable:!0}}function U(k,R){let O=Object.keys(R);if(O.length===0)return k;function x(y,E){k.call(this,y,E)}x.prototype=Object.create(k.prototype,{constructor:{value:x,configurable:!0,writable:!0}});for(let y=0;y<O.length;++y){let E=O[y];if(!(E in k.prototype)){let n=typeof Object.getOwnPropertyDescriptor(R,E).value==="function";Object.defineProperty(x.prototype,E,n?Z(E):Y(E))}}return x}function G(k){if(k==null||k===Object.prototype)return K;let R=q.get(k);if(R==null)R=U(G(Object.getPrototypeOf(k)),k),q.set(k,R);return R}function B(k,R){return new(G(Object.getPrototypeOf(R)))(k,R)}function H(k){return V(k).immediateStopped}function W(k,R){V(k).eventPhase=R}function A(k,R){V(k).currentTarget=R}function T(k,R){V(k).passiveListener=R}var N=new WeakMap,F=1,j=2,P=3;function M(k){return k!==null&&typeof k==="object"}function L(k){let R=N.get(k);if(R==null)throw TypeError("'this' is expected an EventTarget object, but got another value.");return R}function h(k){return{get(){let R=L(this).get(k);while(R!=null){if(R.listenerType===P)return R.listener;R=R.next}return null},set(R){if(typeof R!=="function"&&!M(R))R=null;let O=L(this),x=null,y=O.get(k);while(y!=null){if(y.listenerType===P)if(x!==null)x.next=y.next;else if(y.next!==null)O.set(k,y.next);else O.delete(k);else x=y;y=y.next}if(R!==null){let E={listener:R,listenerType:P,passive:!1,once:!1,next:null};if(x===null)O.set(k,E);else x.next=E}},configurable:!0,enumerable:!0}}function m(k,R){Object.defineProperty(k,`on${R}`,h(R))}function l(k){function R(){f.call(this)}R.prototype=Object.create(f.prototype,{constructor:{value:R,configurable:!0,writable:!0}});for(let O=0;O<k.length;++O)m(R.prototype,k[O]);return R}function f(){if(this instanceof f){N.set(this,new Map);return}if(arguments.length===1&&Array.isArray(arguments[0]))return l(arguments[0]);if(arguments.length>0){let k=Array(arguments.length);for(let R=0;R<arguments.length;++R)k[R]=arguments[R];return l(k)}throw TypeError("Cannot call a class as a function")}if(f.prototype={addEventListener(k,R,O){if(R==null)return;if(typeof R!=="function"&&!M(R))throw TypeError("'listener' should be a function or an object.");let x=L(this),y=M(O),E=(y?Boolean(O.capture):Boolean(O))?F:j,n={listener:R,listenerType:E,passive:y&&Boolean(O.passive),once:y&&Boolean(O.once),next:null},r=x.get(k);if(r===void 0){x.set(k,n);return}let q0=null;while(r!=null){if(r.listener===R&&r.listenerTy