@elizaos/plugin-elizacloud 1.7.4 → 2.0.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser/index.browser.js +3 -3
- package/dist/browser/index.browser.js.map +14 -14
- package/dist/build.d.ts +3 -0
- package/dist/build.d.ts.map +1 -0
- package/dist/cjs/index.node.cjs +286 -275
- package/dist/cjs/index.node.js.map +14 -14
- package/dist/generated/specs/specs.d.ts +55 -0
- package/dist/generated/specs/specs.d.ts.map +1 -0
- package/dist/index.browser.d.ts +1 -0
- package/dist/index.browser.d.ts.map +1 -0
- package/dist/index.d.ts +1 -26
- package/dist/index.d.ts.map +1 -0
- package/dist/index.node.d.ts +1 -0
- package/dist/index.node.d.ts.map +1 -0
- package/dist/init.d.ts +2 -4
- package/dist/init.d.ts.map +1 -0
- package/dist/models/embeddings.d.ts +4 -22
- package/dist/models/embeddings.d.ts.map +1 -0
- package/dist/models/image.d.ts +1 -7
- package/dist/models/image.d.ts.map +1 -0
- package/dist/models/index.d.ts +7 -6
- package/dist/models/index.d.ts.map +1 -0
- package/dist/models/object.d.ts +4 -9
- package/dist/models/object.d.ts.map +1 -0
- package/dist/models/speech.d.ts +2 -7
- package/dist/models/speech.d.ts.map +1 -0
- package/dist/models/text.d.ts +1 -14
- package/dist/models/text.d.ts.map +1 -0
- package/dist/models/tokenization.d.ts +1 -6
- package/dist/models/tokenization.d.ts.map +1 -0
- package/dist/models/transcription.d.ts +1 -3
- package/dist/models/transcription.d.ts.map +1 -0
- package/dist/node/index.node.js +284 -273
- package/dist/node/index.node.js.map +14 -14
- package/dist/providers/openai.d.ts +1 -6
- package/dist/providers/openai.d.ts.map +1 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/utils/config.d.ts +1 -66
- package/dist/utils/config.d.ts.map +1 -0
- package/dist/utils/events.d.ts +6 -8
- package/dist/utils/events.d.ts.map +1 -0
- package/dist/utils/helpers.d.ts +2 -17
- package/dist/utils/helpers.d.ts.map +1 -0
- package/package.json +28 -31
- package/types/index.ts +35 -0
- package/LICENSE +0 -21
- package/README.md +0 -189
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var v6=Object.create;var{getPrototypeOf:u6,defineProperty:I2,getOwnPropertyNames:M1,getOwnPropertyDescriptor:g6}=Object,A1=Object.prototype.hasOwnProperty;var b6=(h,B,w)=>{w=h!=null?v6(u6(h)):{};let U=B||!h||!h.__esModule?I2(w,"default",{value:h,enumerable:!0}):w;for(let Q of M1(h))if(!A1.call(U,Q))I2(U,Q,{get:()=>h[Q],enumerable:!0});return U},j1=new WeakMap,R0=(h)=>{var B=j1.get(h),w;if(B)return B;if(B=I2({},"__esModule",{value:!0}),h&&typeof h==="object"||typeof h==="function")M1(h).map((U)=>!A1.call(B,U)&&I2(B,U,{get:()=>h[U],enumerable:!(w=g6(h,U))||w.enumerable}));return j1.set(h,B),B},p6=(h,B)=>()=>(B||h((B={exports:{}}).exports,B),B.exports);var O1=(h,B)=>{for(var w in B)I2(h,w,{get:B[w],enumerable:!0,configurable:!0,set:(U)=>B[w]=()=>U})};var L1=(h,B)=>()=>(h&&(B=h(h=0)),B);var d0={};O1(d0,{transcode:()=>S8,resolveObjectURL:()=>_8,kStringMaxLength:()=>b1,kMaxLength:()=>G2,isUtf8:()=>R8,isAscii:()=>k8,default:()=>y8,constants:()=>X8,btoa:()=>B8,atob:()=>w8,INSPECT_MAX_BYTES:()=>g1,File:()=>U8,Buffer:()=>P,Blob:()=>Q8});function a6(h){var B=h.length;if(B%4>0)throw Error("Invalid string. Length must be a multiple of 4");var w=h.indexOf("=");if(w===-1)w=B;var U=w===B?0:4-w%4;return[w,U]}function s6(h,B){return(h+B)*3/4-B}function t6(h){var B,w=a6(h),U=w[0],Q=w[1],X=new Uint8Array(s6(U,Q)),J=0,Y=Q>0?U-4:U,K;for(K=0;K<Y;K+=4)B=S0[h.charCodeAt(K)]<<18|S0[h.charCodeAt(K+1)]<<12|S0[h.charCodeAt(K+2)]<<6|S0[h.charCodeAt(K+3)],X[J++]=B>>16&255,X[J++]=B>>8&255,X[J++]=B&255;if(Q===2)B=S0[h.charCodeAt(K)]<<2|S0[h.charCodeAt(K+1)]>>4,X[J++]=B&255;if(Q===1)B=S0[h.charCodeAt(K)]<<10|S0[h.charCodeAt(K+1)]<<4|S0[h.charCodeAt(K+2)]>>2,X[J++]=B>>8&255,X[J++]=B&255;return X}function e6(h){return v0[h>>18&63]+v0[h>>12&63]+v0[h>>6&63]+v0[h&63]}function h8(h,B,w){var U,Q=[];for(var X=B;X<w;X+=3)U=(h[X]<<16&16711680)+(h[X+1]<<8&65280)+(h[X+2]&255),Q.push(e6(U));return Q.join("")}function S1(h){var B,w=h.length,U=w%3,Q=[],X=16383;for(var J=0,Y=w-U;J<Y;J+=X)Q.push(h8(h,J,J+X>Y?Y:J+X));if(U===1)B=h[w-1],Q.push(v0[B>>2]+v0[B<<4&63]+"==");else if(U===2)B=(h[w-2]<<8)+h[w-1],Q.push(v0[B>>10]+v0[B>>4&63]+v0[B<<2&63]+"=");return Q.join("")}function E2(h,B,w,U,Q){var X,J,Y=Q*8-U-1,K=(1<<Y)-1,H=K>>1,G=-7,N=w?Q-1:0,D=w?-1:1,O=h[B+N];N+=D,X=O&(1<<-G)-1,O>>=-G,G+=Y;for(;G>0;X=X*256+h[B+N],N+=D,G-=8);J=X&(1<<-G)-1,X>>=-G,G+=U;for(;G>0;J=J*256+h[B+N],N+=D,G-=8);if(X===0)X=1-H;else if(X===K)return J?NaN:(O?-1:1)*(1/0);else J=J+Math.pow(2,U),X=X-H;return(O?-1:1)*J*Math.pow(2,X-U)}function u1(h,B,w,U,Q,X){var J,Y,K,H=X*8-Q-1,G=(1<<H)-1,N=G>>1,D=Q===23?Math.pow(2,-24)-Math.pow(2,-77):0,O=U?0:X-1,r=U?1:-1,m=B<0||B===0&&1/B<0?1:0;if(B=Math.abs(B),isNaN(B)||B===1/0)Y=isNaN(B)?1:0,J=G;else{if(J=Math.floor(Math.log(B)/Math.LN2),B*(K=Math.pow(2,-J))<1)J--,K*=2;if(J+N>=1)B+=D/K;else B+=D*Math.pow(2,1-N);if(B*K>=2)J++,K/=2;if(J+N>=G)Y=0,J=G;else if(J+N>=1)Y=(B*K-1)*Math.pow(2,Q),J=J+N;else Y=B*Math.pow(2,N-1)*Math.pow(2,Q),J=0}for(;Q>=8;h[w+O]=Y&255,O+=r,Y/=256,Q-=8);J=J<<Q|Y,H+=Q;for(;H>0;h[w+O]=J&255,O+=r,J/=256,H-=8);h[w+O-r]|=m*128}function p0(h){if(h>G2)throw RangeError('The value "'+h+'" is invalid for option "size"');let B=new Uint8Array(h);return Object.setPrototypeOf(B,P.prototype),B}function o2(h,B,w){return class extends w{constructor(){super();Object.defineProperty(this,"message",{value:B.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${h}]`,this.stack,delete this.name}get code(){return h}set code(U){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:U,writable:!0})}toString(){return`${this.name} [${h}]: ${this.message}`}}}function P(h,B,w){if(typeof h==="number"){if(typeof B==="string")throw TypeError('The "string" argument must be of type string. Received type number');return r2(h)}return p1(h,B,w)}function p1(h,B,w){if(typeof h==="string")return q8(h,B);if(ArrayBuffer.isView(h))return K8(h);if(h==null)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof h);if(u0(h,ArrayBuffer)||h&&u0(h.buffer,ArrayBuffer))return m2(h,B,w);if(typeof SharedArrayBuffer<"u"&&(u0(h,SharedArrayBuffer)||h&&u0(h.buffer,SharedArrayBuffer)))return m2(h,B,w);if(typeof h==="number")throw TypeError('The "value" argument must not be of type number. Received type number');let U=h.valueOf&&h.valueOf();if(U!=null&&U!==h)return P.from(U,B,w);let Q=Y8(h);if(Q)return Q;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof h[Symbol.toPrimitive]==="function")return P.from(h[Symbol.toPrimitive]("string"),B,w);throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof h)}function d1(h){if(typeof h!=="number")throw TypeError('"size" argument must be of type number');else if(h<0)throw RangeError('The value "'+h+'" is invalid for option "size"')}function F8(h,B,w){if(d1(h),h<=0)return p0(h);if(B!==void 0)return typeof w==="string"?p0(h).fill(B,w):p0(h).fill(B);return p0(h)}function r2(h){return d1(h),p0(h<0?0:a2(h)|0)}function q8(h,B){if(typeof B!=="string"||B==="")B="utf8";if(!P.isEncoding(B))throw TypeError("Unknown encoding: "+B);let w=i1(h,B)|0,U=p0(w),Q=U.write(h,B);if(Q!==w)U=U.slice(0,Q);return U}function l2(h){let B=h.length<0?0:a2(h.length)|0,w=p0(B);for(let U=0;U<B;U+=1)w[U]=h[U]&255;return w}function K8(h){if(u0(h,Uint8Array)){let B=new Uint8Array(h);return m2(B.buffer,B.byteOffset,B.byteLength)}return l2(h)}function m2(h,B,w){if(B<0||h.byteLength<B)throw RangeError('"offset" is outside of buffer bounds');if(h.byteLength<B+(w||0))throw RangeError('"length" is outside of buffer bounds');let U;if(B===void 0&&w===void 0)U=new Uint8Array(h);else if(w===void 0)U=new Uint8Array(h,B);else U=new Uint8Array(h,B,w);return Object.setPrototypeOf(U,P.prototype),U}function Y8(h){if(P.isBuffer(h)){let B=a2(h.length)|0,w=p0(B);if(w.length===0)return w;return h.copy(w,0,0,B),w}if(h.length!==void 0){if(typeof h.length!=="number"||Number.isNaN(h.length))return p0(0);return l2(h)}if(h.type==="Buffer"&&Array.isArray(h.data))return l2(h.data)}function a2(h){if(h>=G2)throw RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+G2.toString(16)+" bytes");return h|0}function i1(h,B){if(P.isBuffer(h))return h.length;if(ArrayBuffer.isView(h)||u0(h,ArrayBuffer))return h.byteLength;if(typeof h!=="string")throw TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof h);let w=h.length,U=arguments.length>2&&arguments[2]===!0;if(!U&&w===0)return 0;let Q=!1;for(;;)switch(B){case"ascii":case"latin1":case"binary":return w;case"utf8":case"utf-8":return n2(h).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return w*2;case"hex":return w>>>1;case"base64":return e1(h).length;default:if(Q)return U?-1:n2(h).length;B=(""+B).toLowerCase(),Q=!0}}function z8(h,B,w){let U=!1;if(B===void 0||B<0)B=0;if(B>this.length)return"";if(w===void 0||w>this.length)w=this.length;if(w<=0)return"";if(w>>>=0,B>>>=0,w<=B)return"";if(!h)h="utf8";while(!0)switch(h){case"hex":return M8(this,B,w);case"utf8":case"utf-8":return m1(this,B,w);case"ascii":return V8(this,B,w);case"latin1":case"binary":return j8(this,B,w);case"base64":return W8(this,B,w);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A8(this,B,w);default:if(U)throw TypeError("Unknown encoding: "+h);h=(h+"").toLowerCase(),U=!0}}function U2(h,B,w){let U=h[B];h[B]=h[w],h[w]=U}function l1(h,B,w,U,Q){if(h.length===0)return-1;if(typeof w==="string")U=w,w=0;else if(w>2147483647)w=2147483647;else if(w<-2147483648)w=-2147483648;if(w=+w,Number.isNaN(w))w=Q?0:h.length-1;if(w<0)w=h.length+w;if(w>=h.length)if(Q)return-1;else w=h.length-1;else if(w<0)if(Q)w=0;else return-1;if(typeof B==="string")B=P.from(B,U);if(P.isBuffer(B)){if(B.length===0)return-1;return f1(h,B,w,U,Q)}else if(typeof B==="number"){if(B=B&255,typeof Uint8Array.prototype.indexOf==="function")if(Q)return Uint8Array.prototype.indexOf.call(h,B,w);else return Uint8Array.prototype.lastIndexOf.call(h,B,w);return f1(h,[B],w,U,Q)}throw TypeError("val must be string, number or Buffer")}function f1(h,B,w,U,Q){let X=1,J=h.length,Y=B.length;if(U!==void 0){if(U=String(U).toLowerCase(),U==="ucs2"||U==="ucs-2"||U==="utf16le"||U==="utf-16le"){if(h.length<2||B.length<2)return-1;X=2,J/=2,Y/=2,w/=2}}function K(G,N){if(X===1)return G[N];else return G.readUInt16BE(N*X)}let H;if(Q){let G=-1;for(H=w;H<J;H++)if(K(h,H)===K(B,G===-1?0:H-G)){if(G===-1)G=H;if(H-G+1===Y)return G*X}else{if(G!==-1)H-=H-G;G=-1}}else{if(w+Y>J)w=J-Y;for(H=w;H>=0;H--){let G=!0;for(let N=0;N<Y;N++)if(K(h,H+N)!==K(B,N)){G=!1;break}if(G)return H}}return-1}function H8(h,B,w,U){w=Number(w)||0;let Q=h.length-w;if(!U)U=Q;else if(U=Number(U),U>Q)U=Q;let X=B.length;if(U>X/2)U=X/2;let J;for(J=0;J<U;++J){let Y=parseInt(B.substr(J*2,2),16);if(Number.isNaN(Y))return J;h[w+J]=Y}return J}function I8(h,B,w,U){return P2(n2(B,h.length-w),h,w,U)}function $8(h,B,w,U){return P2(x8(B),h,w,U)}function G8(h,B,w,U){return P2(e1(B),h,w,U)}function N8(h,B,w,U){return P2(E8(B,h.length-w),h,w,U)}function W8(h,B,w){if(B===0&&w===h.length)return S1(h);else return S1(h.slice(B,w))}function m1(h,B,w){w=Math.min(h.length,w);let U=[],Q=B;while(Q<w){let X=h[Q],J=null,Y=X>239?4:X>223?3:X>191?2:1;if(Q+Y<=w){let K,H,G,N;switch(Y){case 1:if(X<128)J=X;break;case 2:if(K=h[Q+1],(K&192)===128){if(N=(X&31)<<6|K&63,N>127)J=N}break;case 3:if(K=h[Q+1],H=h[Q+2],(K&192)===128&&(H&192)===128){if(N=(X&15)<<12|(K&63)<<6|H&63,N>2047&&(N<55296||N>57343))J=N}break;case 4:if(K=h[Q+1],H=h[Q+2],G=h[Q+3],(K&192)===128&&(H&192)===128&&(G&192)===128){if(N=(X&15)<<18|(K&63)<<12|(H&63)<<6|G&63,N>65535&&N<1114112)J=N}}}if(J===null)J=65533,Y=1;else if(J>65535)J-=65536,U.push(J>>>10&1023|55296),J=56320|J&1023;U.push(J),Q+=Y}return C8(U)}function C8(h){let B=h.length;if(B<=c1)return String.fromCharCode.apply(String,h);let w="",U=0;while(U<B)w+=String.fromCharCode.apply(String,h.slice(U,U+=c1));return w}function V8(h,B,w){let U="";w=Math.min(h.length,w);for(let Q=B;Q<w;++Q)U+=String.fromCharCode(h[Q]&127);return U}function j8(h,B,w){let U="";w=Math.min(h.length,w);for(let Q=B;Q<w;++Q)U+=String.fromCharCode(h[Q]);return U}function M8(h,B,w){let U=h.length;if(!B||B<0)B=0;if(!w||w<0||w>U)w=U;let Q="";for(let X=B;X<w;++X)Q+=P8[h[X]];return Q}function A8(h,B,w){let U=h.slice(B,w),Q="";for(let X=0;X<U.length-1;X+=2)Q+=String.fromCharCode(U[X]+U[X+1]*256);return Q}function j0(h,B,w){if(h%1!==0||h<0)throw RangeError("offset is not uint");if(h+B>w)throw RangeError("Trying to access beyond buffer length")}function x0(h,B,w,U,Q,X){if(!P.isBuffer(h))throw TypeError('"buffer" argument must be a Buffer instance');if(B>Q||B<X)throw RangeError('"value" argument is out of bounds');if(w+U>h.length)throw RangeError("Index out of range")}function n1(h,B,w,U,Q){t1(B,U,Q,h,w,7);let X=Number(B&BigInt(4294967295));h[w++]=X,X=X>>8,h[w++]=X,X=X>>8,h[w++]=X,X=X>>8,h[w++]=X;let J=Number(B>>BigInt(32)&BigInt(4294967295));return h[w++]=J,J=J>>8,h[w++]=J,J=J>>8,h[w++]=J,J=J>>8,h[w++]=J,w}function o1(h,B,w,U,Q){t1(B,U,Q,h,w,7);let X=Number(B&BigInt(4294967295));h[w+7]=X,X=X>>8,h[w+6]=X,X=X>>8,h[w+5]=X,X=X>>8,h[w+4]=X;let J=Number(B>>BigInt(32)&BigInt(4294967295));return h[w+3]=J,J=J>>8,h[w+2]=J,J=J>>8,h[w+1]=J,J=J>>8,h[w]=J,w+8}function r1(h,B,w,U,Q,X){if(w+U>h.length)throw RangeError("Index out of range");if(w<0)throw RangeError("Index out of range")}function a1(h,B,w,U,Q){if(B=+B,w=w>>>0,!Q)r1(h,B,w,4,340282346638528860000000000000000000000,-340282346638528860000000000000000000000);return u1(h,B,w,U,23,4),w+4}function s1(h,B,w,U,Q){if(B=+B,w=w>>>0,!Q)r1(h,B,w,8,179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,-179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000);return u1(h,B,w,U,52,8),w+8}function v1(h){let B="",w=h.length,U=h[0]==="-"?1:0;for(;w>=U+4;w-=3)B=`_${h.slice(w-3,w)}${B}`;return`${h.slice(0,w)}${B}`}function O8(h,B,w){if(K2(B,"offset"),h[B]===void 0||h[B+w]===void 0)N2(B,h.length-(w+1))}function t1(h,B,w,U,Q,X){if(h>w||h<B){let J=typeof B==="bigint"?"n":"",Y;if(X>3)if(B===0||B===BigInt(0))Y=`>= 0${J} and < 2${J} ** ${(X+1)*8}${J}`;else Y=`>= -(2${J} ** ${(X+1)*8-1}${J}) and < 2 ** ${(X+1)*8-1}${J}`;else Y=`>= ${B}${J} and <= ${w}${J}`;throw new i2("value",Y,h)}O8(U,Q,X)}function K2(h,B){if(typeof h!=="number")throw new J8(B,"number",h)}function N2(h,B,w){if(Math.floor(h)!==h)throw K2(h,w),new i2(w||"offset","an integer",h);if(B<0)throw new Z8;throw new i2(w||"offset",`>= ${w?1:0} and <= ${B}`,h)}function D8(h){if(h=h.split("=")[0],h=h.trim().replace(L8,""),h.length<2)return"";while(h.length%4!==0)h=h+"=";return h}function n2(h,B){B=B||1/0;let w,U=h.length,Q=null,X=[];for(let J=0;J<U;++J){if(w=h.charCodeAt(J),w>55295&&w<57344){if(!Q){if(w>56319){if((B-=3)>-1)X.push(239,191,189);continue}else if(J+1===U){if((B-=3)>-1)X.push(239,191,189);continue}Q=w;continue}if(w<56320){if((B-=3)>-1)X.push(239,191,189);Q=w;continue}w=(Q-55296<<10|w-56320)+65536}else if(Q){if((B-=3)>-1)X.push(239,191,189)}if(Q=null,w<128){if((B-=1)<0)break;X.push(w)}else if(w<2048){if((B-=2)<0)break;X.push(w>>6|192,w&63|128)}else if(w<65536){if((B-=3)<0)break;X.push(w>>12|224,w>>6&63|128,w&63|128)}else if(w<1114112){if((B-=4)<0)break;X.push(w>>18|240,w>>12&63|128,w>>6&63|128,w&63|128)}else throw Error("Invalid code point")}return X}function x8(h){let B=[];for(let w=0;w<h.length;++w)B.push(h.charCodeAt(w)&255);return B}function E8(h,B){let w,U,Q,X=[];for(let J=0;J<h.length;++J){if((B-=2)<0)break;w=h.charCodeAt(J),U=w>>8,Q=w%256,X.push(Q),X.push(U)}return X}function e1(h){return t6(D8(h))}function P2(h,B,w,U){let Q;for(Q=0;Q<U;++Q){if(Q+w>=B.length||Q>=h.length)break;B[Q+w]=h[Q]}return Q}function u0(h,B){return h instanceof B||h!=null&&h.constructor!=null&&h.constructor.name!=null&&h.constructor.name===B.name}function r0(h){return typeof BigInt>"u"?T8:h}function T8(){throw Error("BigInt not supported")}function s2(h){return()=>{throw Error(h+" is not implemented for node:buffer browser polyfill")}}var v0,S0,d2="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",w2,k1,y1,g1=50,G2=2147483647,b1=536870888,B8,w8,U8,Q8,X8,Z8,J8,i2,c1=4096,L8,P8,_8,R8,k8=(h)=>{for(let B of h)if(B.charCodeAt(0)>127)return!1;return!0},S8,y8;var i0=L1(()=>{v0=[],S0=[];for(w2=0,k1=d2.length;w2<k1;++w2)v0[w2]=d2[w2],S0[d2.charCodeAt(w2)]=w2;S0[45]=62;S0[95]=63;y1=typeof Symbol==="function"&&typeof Symbol.for==="function"?Symbol.for("nodejs.util.inspect.custom"):null,B8=globalThis.btoa,w8=globalThis.atob,U8=globalThis.File,Q8=globalThis.Blob,X8={MAX_LENGTH:G2,MAX_STRING_LENGTH:b1};Z8=o2("ERR_BUFFER_OUT_OF_BOUNDS",function(h){if(h)return`${h} is outside of buffer bounds`;return"Attempt to access memory outside buffer bounds"},RangeError),J8=o2("ERR_INVALID_ARG_TYPE",function(h,B){return`The "${h}" argument must be of type number. Received type ${typeof B}`},TypeError),i2=o2("ERR_OUT_OF_RANGE",function(h,B,w){let U=`The value of "${h}" is out of range.`,Q=w;if(Number.isInteger(w)&&Math.abs(w)>4294967296)Q=v1(String(w));else if(typeof w==="bigint"){if(Q=String(w),w>BigInt(2)**BigInt(32)||w<-(BigInt(2)**BigInt(32)))Q=v1(Q);Q+="n"}return U+=` It must be ${B}. Received ${Q}`,U},RangeError);Object.defineProperty(P.prototype,"parent",{enumerable:!0,get:function(){if(!P.isBuffer(this))return;return this.buffer}});Object.defineProperty(P.prototype,"offset",{enumerable:!0,get:function(){if(!P.isBuffer(this))return;return this.byteOffset}});P.poolSize=8192;P.from=function(h,B,w){return p1(h,B,w)};Object.setPrototypeOf(P.prototype,Uint8Array.prototype);Object.setPrototypeOf(P,Uint8Array);P.alloc=function(h,B,w){return F8(h,B,w)};P.allocUnsafe=function(h){return r2(h)};P.allocUnsafeSlow=function(h){return r2(h)};P.isBuffer=function(h){return h!=null&&h._isBuffer===!0&&h!==P.prototype};P.compare=function(h,B){if(u0(h,Uint8Array))h=P.from(h,h.offset,h.byteLength);if(u0(B,Uint8Array))B=P.from(B,B.offset,B.byteLength);if(!P.isBuffer(h)||!P.isBuffer(B))throw TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(h===B)return 0;let w=h.length,U=B.length;for(let Q=0,X=Math.min(w,U);Q<X;++Q)if(h[Q]!==B[Q]){w=h[Q],U=B[Q];break}if(w<U)return-1;if(U<w)return 1;return 0};P.isEncoding=function(h){switch(String(h).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}};P.concat=function(h,B){if(!Array.isArray(h))throw TypeError('"list" argument must be an Array of Buffers');if(h.length===0)return P.alloc(0);let w;if(B===void 0){B=0;for(w=0;w<h.length;++w)B+=h[w].length}let U=P.allocUnsafe(B),Q=0;for(w=0;w<h.length;++w){let X=h[w];if(u0(X,Uint8Array))if(Q+X.length>U.length){if(!P.isBuffer(X))X=P.from(X);X.copy(U,Q)}else Uint8Array.prototype.set.call(U,X,Q);else if(!P.isBuffer(X))throw TypeError('"list" argument must be an Array of Buffers');else X.copy(U,Q);Q+=X.length}return U};P.byteLength=i1;P.prototype._isBuffer=!0;P.prototype.swap16=function(){let h=this.length;if(h%2!==0)throw RangeError("Buffer size must be a multiple of 16-bits");for(let B=0;B<h;B+=2)U2(this,B,B+1);return this};P.prototype.swap32=function(){let h=this.length;if(h%4!==0)throw RangeError("Buffer size must be a multiple of 32-bits");for(let B=0;B<h;B+=4)U2(this,B,B+3),U2(this,B+1,B+2);return this};P.prototype.swap64=function(){let h=this.length;if(h%8!==0)throw RangeError("Buffer size must be a multiple of 64-bits");for(let B=0;B<h;B+=8)U2(this,B,B+7),U2(this,B+1,B+6),U2(this,B+2,B+5),U2(this,B+3,B+4);return this};P.prototype.toString=function(){let h=this.length;if(h===0)return"";if(arguments.length===0)return m1(this,0,h);return z8.apply(this,arguments)};P.prototype.toLocaleString=P.prototype.toString;P.prototype.equals=function(h){if(!P.isBuffer(h))throw TypeError("Argument must be a Buffer");if(this===h)return!0;return P.compare(this,h)===0};P.prototype.inspect=function(){let h="",B=g1;if(h=this.toString("hex",0,B).replace(/(.{2})/g,"$1 ").trim(),this.length>B)h+=" ... ";return"<Buffer "+h+">"};if(y1)P.prototype[y1]=P.prototype.inspect;P.prototype.compare=function(h,B,w,U,Q){if(u0(h,Uint8Array))h=P.from(h,h.offset,h.byteLength);if(!P.isBuffer(h))throw TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof h);if(B===void 0)B=0;if(w===void 0)w=h?h.length:0;if(U===void 0)U=0;if(Q===void 0)Q=this.length;if(B<0||w>h.length||U<0||Q>this.length)throw RangeError("out of range index");if(U>=Q&&B>=w)return 0;if(U>=Q)return-1;if(B>=w)return 1;if(B>>>=0,w>>>=0,U>>>=0,Q>>>=0,this===h)return 0;let X=Q-U,J=w-B,Y=Math.min(X,J),K=this.slice(U,Q),H=h.slice(B,w);for(let G=0;G<Y;++G)if(K[G]!==H[G]){X=K[G],J=H[G];break}if(X<J)return-1;if(J<X)return 1;return 0};P.prototype.includes=function(h,B,w){return this.indexOf(h,B,w)!==-1};P.prototype.indexOf=function(h,B,w){return l1(this,h,B,w,!0)};P.prototype.lastIndexOf=function(h,B,w){return l1(this,h,B,w,!1)};P.prototype.write=function(h,B,w,U){if(B===void 0)U="utf8",w=this.length,B=0;else if(w===void 0&&typeof B==="string")U=B,w=this.length,B=0;else if(isFinite(B))if(B=B>>>0,isFinite(w)){if(w=w>>>0,U===void 0)U="utf8"}else U=w,w=void 0;else throw Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let Q=this.length-B;if(w===void 0||w>Q)w=Q;if(h.length>0&&(w<0||B<0)||B>this.length)throw RangeError("Attempt to write outside buffer bounds");if(!U)U="utf8";let X=!1;for(;;)switch(U){case"hex":return H8(this,h,B,w);case"utf8":case"utf-8":return I8(this,h,B,w);case"ascii":case"latin1":case"binary":return $8(this,h,B,w);case"base64":return G8(this,h,B,w);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return N8(this,h,B,w);default:if(X)throw TypeError("Unknown encoding: "+U);U=(""+U).toLowerCase(),X=!0}};P.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};P.prototype.slice=function(h,B){let w=this.length;if(h=~~h,B=B===void 0?w:~~B,h<0){if(h+=w,h<0)h=0}else if(h>w)h=w;if(B<0){if(B+=w,B<0)B=0}else if(B>w)B=w;if(B<h)B=h;let U=this.subarray(h,B);return Object.setPrototypeOf(U,P.prototype),U};P.prototype.readUintLE=P.prototype.readUIntLE=function(h,B,w){if(h=h>>>0,B=B>>>0,!w)j0(h,B,this.length);let U=this[h],Q=1,X=0;while(++X<B&&(Q*=256))U+=this[h+X]*Q;return U};P.prototype.readUintBE=P.prototype.readUIntBE=function(h,B,w){if(h=h>>>0,B=B>>>0,!w)j0(h,B,this.length);let U=this[h+--B],Q=1;while(B>0&&(Q*=256))U+=this[h+--B]*Q;return U};P.prototype.readUint8=P.prototype.readUInt8=function(h,B){if(h=h>>>0,!B)j0(h,1,this.length);return this[h]};P.prototype.readUint16LE=P.prototype.readUInt16LE=function(h,B){if(h=h>>>0,!B)j0(h,2,this.length);return this[h]|this[h+1]<<8};P.prototype.readUint16BE=P.prototype.readUInt16BE=function(h,B){if(h=h>>>0,!B)j0(h,2,this.length);return this[h]<<8|this[h+1]};P.prototype.readUint32LE=P.prototype.readUInt32LE=function(h,B){if(h=h>>>0,!B)j0(h,4,this.length);return(this[h]|this[h+1]<<8|this[h+2]<<16)+this[h+3]*16777216};P.prototype.readUint32BE=P.prototype.readUInt32BE=function(h,B){if(h=h>>>0,!B)j0(h,4,this.length);return this[h]*16777216+(this[h+1]<<16|this[h+2]<<8|this[h+3])};P.prototype.readBigUInt64LE=r0(function(h){h=h>>>0,K2(h,"offset");let B=this[h],w=this[h+7];if(B===void 0||w===void 0)N2(h,this.length-8);let U=B+this[++h]*256+this[++h]*65536+this[++h]*16777216,Q=this[++h]+this[++h]*256+this[++h]*65536+w*16777216;return BigInt(U)+(BigInt(Q)<<BigInt(32))});P.prototype.readBigUInt64BE=r0(function(h){h=h>>>0,K2(h,"offset");let B=this[h],w=this[h+7];if(B===void 0||w===void 0)N2(h,this.length-8);let U=B*16777216+this[++h]*65536+this[++h]*256+this[++h],Q=this[++h]*16777216+this[++h]*65536+this[++h]*256+w;return(BigInt(U)<<BigInt(32))+BigInt(Q)});P.prototype.readIntLE=function(h,B,w){if(h=h>>>0,B=B>>>0,!w)j0(h,B,this.length);let U=this[h],Q=1,X=0;while(++X<B&&(Q*=256))U+=this[h+X]*Q;if(Q*=128,U>=Q)U-=Math.pow(2,8*B);return U};P.prototype.readIntBE=function(h,B,w){if(h=h>>>0,B=B>>>0,!w)j0(h,B,this.length);let U=B,Q=1,X=this[h+--U];while(U>0&&(Q*=256))X+=this[h+--U]*Q;if(Q*=128,X>=Q)X-=Math.pow(2,8*B);return X};P.prototype.readInt8=function(h,B){if(h=h>>>0,!B)j0(h,1,this.length);if(!(this[h]&128))return this[h];return(255-this[h]+1)*-1};P.prototype.readInt16LE=function(h,B){if(h=h>>>0,!B)j0(h,2,this.length);let w=this[h]|this[h+1]<<8;return w&32768?w|4294901760:w};P.prototype.readInt16BE=function(h,B){if(h=h>>>0,!B)j0(h,2,this.length);let w=this[h+1]|this[h]<<8;return w&32768?w|4294901760:w};P.prototype.readInt32LE=function(h,B){if(h=h>>>0,!B)j0(h,4,this.length);return this[h]|this[h+1]<<8|this[h+2]<<16|this[h+3]<<24};P.prototype.readInt32BE=function(h,B){if(h=h>>>0,!B)j0(h,4,this.length);return this[h]<<24|this[h+1]<<16|this[h+2]<<8|this[h+3]};P.prototype.readBigInt64LE=r0(function(h){h=h>>>0,K2(h,"offset");let B=this[h],w=this[h+7];if(B===void 0||w===void 0)N2(h,this.length-8);let U=this[h+4]+this[h+5]*256+this[h+6]*65536+(w<<24);return(BigInt(U)<<BigInt(32))+BigInt(B+this[++h]*256+this[++h]*65536+this[++h]*16777216)});P.prototype.readBigInt64BE=r0(function(h){h=h>>>0,K2(h,"offset");let B=this[h],w=this[h+7];if(B===void 0||w===void 0)N2(h,this.length-8);let U=(B<<24)+this[++h]*65536+this[++h]*256+this[++h];return(BigInt(U)<<BigInt(32))+BigInt(this[++h]*16777216+this[++h]*65536+this[++h]*256+w)});P.prototype.readFloatLE=function(h,B){if(h=h>>>0,!B)j0(h,4,this.length);return E2(this,h,!0,23,4)};P.prototype.readFloatBE=function(h,B){if(h=h>>>0,!B)j0(h,4,this.length);return E2(this,h,!1,23,4)};P.prototype.readDoubleLE=function(h,B){if(h=h>>>0,!B)j0(h,8,this.length);return E2(this,h,!0,52,8)};P.prototype.readDoubleBE=function(h,B){if(h=h>>>0,!B)j0(h,8,this.length);return E2(this,h,!1,52,8)};P.prototype.writeUintLE=P.prototype.writeUIntLE=function(h,B,w,U){if(h=+h,B=B>>>0,w=w>>>0,!U){let J=Math.pow(2,8*w)-1;x0(this,h,B,w,J,0)}let Q=1,X=0;this[B]=h&255;while(++X<w&&(Q*=256))this[B+X]=h/Q&255;return B+w};P.prototype.writeUintBE=P.prototype.writeUIntBE=function(h,B,w,U){if(h=+h,B=B>>>0,w=w>>>0,!U){let J=Math.pow(2,8*w)-1;x0(this,h,B,w,J,0)}let Q=w-1,X=1;this[B+Q]=h&255;while(--Q>=0&&(X*=256))this[B+Q]=h/X&255;return B+w};P.prototype.writeUint8=P.prototype.writeUInt8=function(h,B,w){if(h=+h,B=B>>>0,!w)x0(this,h,B,1,255,0);return this[B]=h&255,B+1};P.prototype.writeUint16LE=P.prototype.writeUInt16LE=function(h,B,w){if(h=+h,B=B>>>0,!w)x0(this,h,B,2,65535,0);return this[B]=h&255,this[B+1]=h>>>8,B+2};P.prototype.writeUint16BE=P.prototype.writeUInt16BE=function(h,B,w){if(h=+h,B=B>>>0,!w)x0(this,h,B,2,65535,0);return this[B]=h>>>8,this[B+1]=h&255,B+2};P.prototype.writeUint32LE=P.prototype.writeUInt32LE=function(h,B,w){if(h=+h,B=B>>>0,!w)x0(this,h,B,4,4294967295,0);return this[B+3]=h>>>24,this[B+2]=h>>>16,this[B+1]=h>>>8,this[B]=h&255,B+4};P.prototype.writeUint32BE=P.prototype.writeUInt32BE=function(h,B,w){if(h=+h,B=B>>>0,!w)x0(this,h,B,4,4294967295,0);return this[B]=h>>>24,this[B+1]=h>>>16,this[B+2]=h>>>8,this[B+3]=h&255,B+4};P.prototype.writeBigUInt64LE=r0(function(h,B=0){return n1(this,h,B,BigInt(0),BigInt("0xffffffffffffffff"))});P.prototype.writeBigUInt64BE=r0(function(h,B=0){return o1(this,h,B,BigInt(0),BigInt("0xffffffffffffffff"))});P.prototype.writeIntLE=function(h,B,w,U){if(h=+h,B=B>>>0,!U){let Y=Math.pow(2,8*w-1);x0(this,h,B,w,Y-1,-Y)}let Q=0,X=1,J=0;this[B]=h&255;while(++Q<w&&(X*=256)){if(h<0&&J===0&&this[B+Q-1]!==0)J=1;this[B+Q]=(h/X>>0)-J&255}return B+w};P.prototype.writeIntBE=function(h,B,w,U){if(h=+h,B=B>>>0,!U){let Y=Math.pow(2,8*w-1);x0(this,h,B,w,Y-1,-Y)}let Q=w-1,X=1,J=0;this[B+Q]=h&255;while(--Q>=0&&(X*=256)){if(h<0&&J===0&&this[B+Q+1]!==0)J=1;this[B+Q]=(h/X>>0)-J&255}return B+w};P.prototype.writeInt8=function(h,B,w){if(h=+h,B=B>>>0,!w)x0(this,h,B,1,127,-128);if(h<0)h=255+h+1;return this[B]=h&255,B+1};P.prototype.writeInt16LE=function(h,B,w){if(h=+h,B=B>>>0,!w)x0(this,h,B,2,32767,-32768);return this[B]=h&255,this[B+1]=h>>>8,B+2};P.prototype.writeInt16BE=function(h,B,w){if(h=+h,B=B>>>0,!w)x0(this,h,B,2,32767,-32768);return this[B]=h>>>8,this[B+1]=h&255,B+2};P.prototype.writeInt32LE=function(h,B,w){if(h=+h,B=B>>>0,!w)x0(this,h,B,4,2147483647,-2147483648);return this[B]=h&255,this[B+1]=h>>>8,this[B+2]=h>>>16,this[B+3]=h>>>24,B+4};P.prototype.writeInt32BE=function(h,B,w){if(h=+h,B=B>>>0,!w)x0(this,h,B,4,2147483647,-2147483648);if(h<0)h=4294967295+h+1;return this[B]=h>>>24,this[B+1]=h>>>16,this[B+2]=h>>>8,this[B+3]=h&255,B+4};P.prototype.writeBigInt64LE=r0(function(h,B=0){return n1(this,h,B,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});P.prototype.writeBigInt64BE=r0(function(h,B=0){return o1(this,h,B,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});P.prototype.writeFloatLE=function(h,B,w){return a1(this,h,B,!0,w)};P.prototype.writeFloatBE=function(h,B,w){return a1(this,h,B,!1,w)};P.prototype.writeDoubleLE=function(h,B,w){return s1(this,h,B,!0,w)};P.prototype.writeDoubleBE=function(h,B,w){return s1(this,h,B,!1,w)};P.prototype.copy=function(h,B,w,U){if(!P.isBuffer(h))throw TypeError("argument should be a Buffer");if(!w)w=0;if(!U&&U!==0)U=this.length;if(B>=h.length)B=h.length;if(!B)B=0;if(U>0&&U<w)U=w;if(U===w)return 0;if(h.length===0||this.length===0)return 0;if(B<0)throw RangeError("targetStart out of bounds");if(w<0||w>=this.length)throw RangeError("Index out of range");if(U<0)throw RangeError("sourceEnd out of bounds");if(U>this.length)U=this.length;if(h.length-B<U-w)U=h.length-B+w;let Q=U-w;if(this===h&&typeof Uint8Array.prototype.copyWithin==="function")this.copyWithin(B,w,U);else Uint8Array.prototype.set.call(h,this.subarray(w,U),B);return Q};P.prototype.fill=function(h,B,w,U){if(typeof h==="string"){if(typeof B==="string")U=B,B=0,w=this.length;else if(typeof w==="string")U=w,w=this.length;if(U!==void 0&&typeof U!=="string")throw TypeError("encoding must be a string");if(typeof U==="string"&&!P.isEncoding(U))throw TypeError("Unknown encoding: "+U);if(h.length===1){let X=h.charCodeAt(0);if(U==="utf8"&&X<128||U==="latin1")h=X}}else if(typeof h==="number")h=h&255;else if(typeof h==="boolean")h=Number(h);if(B<0||this.length<B||this.length<w)throw RangeError("Out of range index");if(w<=B)return this;if(B=B>>>0,w=w===void 0?this.length:w>>>0,!h)h=0;let Q;if(typeof h==="number")for(Q=B;Q<w;++Q)this[Q]=h;else{let X=P.isBuffer(h)?h:P.from(h,U),J=X.length;if(J===0)throw TypeError('The value "'+h+'" is invalid for argument "value"');for(Q=0;Q<w-B;++Q)this[Q+B]=X[Q%J]}return this};L8=/[^+/0-9A-Za-z-_]/g;P8=function(){let h=Array(256);for(let B=0;B<16;++B){let w=B*16;for(let U=0;U<16;++U)h[w+U]="0123456789abcdef"[B]+"0123456789abcdef"[U]}return h}();_8=s2("resolveObjectURL"),R8=s2("isUtf8"),S8=s2("transcode"),y8=P});var C2={};O1(C2,{setMaxListeners:()=>K6,once:()=>F6,listenerCount:()=>Y6,init:()=>a0,getMaxListeners:()=>H6,getEventListeners:()=>q6,default:()=>i8,captureRejectionSymbol:()=>Q6,addAbortListener:()=>I6,EventEmitter:()=>a0});function X6(h,B){var{_events:w}=h;if(B[0]??=Error("Unhandled error."),!w)throw B[0];var U=w[U6];if(U)for(var Q of B6.call(U))Q.apply(h,B);var X=w.error;if(!X)throw B[0];for(var Q of B6.call(X))Q.apply(h,B);return!0}function v8(h,B,w,U){B.then(void 0,function(Q){queueMicrotask(()=>u8(h,Q,w,U))})}function u8(h,B,w,U){if(typeof h[h6]==="function")h[h6](B,w,...U);else try{h[Q2]=!1,h.emit("error",B)}finally{h[Q2]=!0}}function Z6(h,B,w){w.warned=!0;let U=Error(`Possible EventEmitter memory leak detected. ${w.length} ${String(B)} listeners added to [${h.constructor.name}]. Use emitter.setMaxListeners() to increase limit`);U.name="MaxListenersExceededWarning",U.emitter=h,U.type=B,U.count=w.length,console.warn(U)}function J6(h,B,...w){this.removeListener(h,B),B.apply(this,w)}function F6(h,B,w){var U=w?.signal;if(z6(U,"options.signal"),U?.aborted)throw new t2(void 0,{cause:U?.reason});let{resolve:Q,reject:X,promise:J}=$newPromiseCapability(Promise),Y=(G)=>{if(h.removeListener(B,K),U!=null)T2(U,"abort",H);X(G)},K=(...G)=>{if(typeof h.removeListener==="function")h.removeListener("error",Y);if(U!=null)T2(U,"abort",H);Q(G)};if(w6(h,B,K,{once:!0}),B!=="error"&&typeof h.once==="function")h.once("error",Y);function H(){T2(h,B,K),T2(h,"error",Y),X(new t2(void 0,{cause:U?.reason}))}if(U!=null)w6(U,"abort",H,{once:!0});return J}function q6(h,B){return h.listeners(B)}function K6(h,...B){h1(h,"setMaxListeners",0);var w;if(B&&(w=B.length))for(let U=0;U<w;U++)B[U].setMaxListeners(h);else X2=h}function Y6(h,B){return h.listenerCount(B)}function T2(h,B,w,U){if(typeof h.removeListener==="function")h.removeListener(B,w);else h.removeEventListener(B,w,U)}function w6(h,B,w,U){if(typeof h.on==="function")if(U.once)h.once(B,w);else h.on(B,w);else h.addEventListener(B,w,U)}function Y2(h,B,w){let U=TypeError(`The "${h}" argument must be of type ${B}. Received ${w}`);return U.code="ERR_INVALID_ARG_TYPE",U}function p8(h,B,w){let U=RangeError(`The "${h}" argument is out of range. It must be ${B}. Received ${w}`);return U.code="ERR_OUT_OF_RANGE",U}function z6(h,B){if(h!==void 0&&(h===null||typeof h!=="object"||!("aborted"in h)))throw Y2(B,"AbortSignal",h)}function h1(h,B,w,U){if(typeof h!=="number")throw Y2(B,"number",h);if(w!=null&&h<w||U!=null&&h>U||(w!=null||U!=null)&&Number.isNaN(h))throw p8(B,`${w!=null?`>= ${w}`:""}${w!=null&&U!=null?" && ":""}${U!=null?`<= ${U}`:""}`,h)}function W2(h){if(typeof h!=="function")throw TypeError("The listener must be a function")}function d8(h,B){if(typeof h!=="boolean")throw Y2(B,"boolean",h)}function H6(h){return h?._maxListeners??X2}function I6(h,B){if(h===void 0)throw Y2("signal","AbortSignal",h);if(z6(h,"signal"),typeof B!=="function")throw Y2("listener","function",B);let w;if(h.aborted)queueMicrotask(()=>B());else h.addEventListener("abort",B,{__proto__:null,once:!0}),w=()=>{h.removeEventListener("abort",B)};return{__proto__:null,[Symbol.dispose](){w?.()}}}var e2,Q2,U6,f8,c8,h6,Q6,B6,X2=10,a0=function(h){if(this._events===void 0||this._events===this.__proto__._events)this._events={__proto__:null},this._eventsCount=0;if(this._maxListeners??=void 0,this[Q2]=h?.captureRejections?Boolean(h?.captureRejections):G0[Q2])this.emit=b8},G0,g8=function(h,...B){if(h==="error")return X6(this,B);var{_events:w}=this;if(w===void 0)return!1;var U=w[h];if(U===void 0)return!1;let Q=U.length>1?U.slice():U;for(let X=0,{length:J}=Q;X<J;X++){let Y=Q[X];switch(B.length){case 0:Y.call(this);break;case 1:Y.call(this,B[0]);break;case 2:Y.call(this,B[0],B[1]);break;case 3:Y.call(this,B[0],B[1],B[2]);break;default:Y.apply(this,B);break}}return!0},b8=function(h,...B){if(h==="error")return X6(this,B);var{_events:w}=this;if(w===void 0)return!1;var U=w[h];if(U===void 0)return!1;let Q=U.length>1?U.slice():U;for(let X=0,{length:J}=Q;X<J;X++){let Y=Q[X],K;switch(B.length){case 0:K=Y.call(this);break;case 1:K=Y.call(this,B[0]);break;case 2:K=Y.call(this,B[0],B[1]);break;case 3:K=Y.call(this,B[0],B[1],B[2]);break;default:K=Y.apply(this,B);break}if(K!==void 0&&typeof K?.then==="function"&&K.then===Promise.prototype.then)v8(this,K,h,B)}return!0},t2,i8;var V2=L1(()=>{e2=Symbol.for,Q2=Symbol("kCapture"),U6=e2("events.errorMonitor"),f8=Symbol("events.maxEventTargetListeners"),c8=Symbol("events.maxEventTargetListenersWarned"),h6=e2("nodejs.rejection"),Q6=e2("nodejs.rejection"),B6=Array.prototype.slice,G0=a0.prototype={};G0._events=void 0;G0._eventsCount=0;G0._maxListeners=void 0;G0.setMaxListeners=function(h){return h1(h,"setMaxListeners",0),this._maxListeners=h,this};G0.constructor=a0;G0.getMaxListeners=function(){return this?._maxListeners??X2};G0.emit=g8;G0.addListener=function(h,B){W2(B);var w=this._events;if(!w)w=this._events={__proto__:null},this._eventsCount=0;else if(w.newListener)this.emit("newListener",h,B.listener??B);var U=w[h];if(!U)w[h]=[B],this._eventsCount++;else{U.push(B);var Q=this._maxListeners??X2;if(Q>0&&U.length>Q&&!U.warned)Z6(this,h,U)}return this};G0.on=G0.addListener;G0.prependListener=function(h,B){W2(B);var w=this._events;if(!w)w=this._events={__proto__:null},this._eventsCount=0;else if(w.newListener)this.emit("newListener",h,B.listener??B);var U=w[h];if(!U)w[h]=[B],this._eventsCount++;else{U.unshift(B);var Q=this._maxListeners??X2;if(Q>0&&U.length>Q&&!U.warned)Z6(this,h,U)}return this};G0.once=function(h,B){W2(B);let w=J6.bind(this,h,B);return w.listener=B,this.addListener(h,w),this};G0.prependOnceListener=function(h,B){W2(B);let w=J6.bind(this,h,B);return w.listener=B,this.prependListener(h,w),this};G0.removeListener=function(h,B){W2(B);var{_events:w}=this;if(!w)return this;var U=w[h];if(!U)return this;var Q=U.length;let X=-1;for(let J=Q-1;J>=0;J--)if(U[J]===B||U[J].listener===B){X=J;break}if(X<0)return this;if(X===0)U.shift();else U.splice(X,1);if(U.length===0)delete w[h],this._eventsCount--;return this};G0.off=G0.removeListener;G0.removeAllListeners=function(h){var{_events:B}=this;if(h&&B){if(B[h])delete B[h],this._eventsCount--}else this._events={__proto__:null};return this};G0.listeners=function(h){var{_events:B}=this;if(!B)return[];var w=B[h];if(!w)return[];return w.map((U)=>U.listener??U)};G0.rawListeners=function(h){var{_events:B}=this;if(!B)return[];var w=B[h];if(!w)return[];return w.slice()};G0.listenerCount=function(h){var{_events:B}=this;if(!B)return 0;return B[h]?.length??0};G0.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]};G0[Q2]=!1;t2=class t2 extends Error{constructor(h="The operation was aborted",B=void 0){if(B!==void 0&&typeof B!=="object")throw Y2("options","Object",B);super(h,B);this.code="ABORT_ERR",this.name="AbortError"}};Object.defineProperties(a0,{captureRejections:{get(){return G0[Q2]},set(h){d8(h,"EventEmitter.captureRejections"),G0[Q2]=h},enumerable:!0},defaultMaxListeners:{enumerable:!0,get:()=>{return X2},set:(h)=>{h1(h,"defaultMaxListeners",0),X2=h}},kMaxEventTargetListeners:{value:f8,enumerable:!1,configurable:!1,writable:!1},kMaxEventTargetListenersWarned:{value:c8,enumerable:!1,configurable:!1,writable:!1}});Object.assign(a0,{once:F6,getEventListeners:q6,getMaxListeners:H6,setMaxListeners:K6,EventEmitter:a0,usingDomains:!1,captureRejectionSymbol:Q6,errorMonitor:U6,addAbortListener:I6,init:a0,listenerCount:Y6});i8=a0});var Q1=p6((O4,M6)=>{var I0=(h,B)=>()=>(B||h((B={exports:{}}).exports,B),B.exports),W0=I0((h,B)=>{class w extends Error{constructor(U){if(!Array.isArray(U))throw TypeError(`Expected input to be an Array, got ${typeof U}`);let Q="";for(let X=0;X<U.length;X++)Q+=` ${U[X].stack}
|
|
2
|
-
`;super(Q);this.name="AggregateError",this.errors=U}}B.exports={AggregateError:w,ArrayIsArray(U){return Array.isArray(U)},ArrayPrototypeIncludes(U,Q){return U.includes(Q)},ArrayPrototypeIndexOf(U,Q){return U.indexOf(Q)},ArrayPrototypeJoin(U,Q){return U.join(Q)},ArrayPrototypeMap(U,Q){return U.map(Q)},ArrayPrototypePop(U,Q){return U.pop(Q)},ArrayPrototypePush(U,Q){return U.push(Q)},ArrayPrototypeSlice(U,Q,X){return U.slice(Q,X)},Error,FunctionPrototypeCall(U,Q,...X){return U.call(Q,...X)},FunctionPrototypeSymbolHasInstance(U,Q){return Function.prototype[Symbol.hasInstance].call(U,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(U,Q){return Object.defineProperties(U,Q)},ObjectDefineProperty(U,Q,X){return Object.defineProperty(U,Q,X)},ObjectGetOwnPropertyDescriptor(U,Q){return Object.getOwnPropertyDescriptor(U,Q)},ObjectKeys(U){return Object.keys(U)},ObjectSetPrototypeOf(U,Q){return Object.setPrototypeOf(U,Q)},Promise,PromisePrototypeCatch(U,Q){return U.catch(Q)},PromisePrototypeThen(U,Q,X){return U.then(Q,X)},PromiseReject(U){return Promise.reject(U)},PromiseResolve(U){return Promise.resolve(U)},ReflectApply:Reflect.apply,RegExpPrototypeTest(U,Q){return U.test(Q)},SafeSet:Set,String,StringPrototypeSlice(U,Q,X){return U.slice(Q,X)},StringPrototypeToLowerCase(U){return U.toLowerCase()},StringPrototypeToUpperCase(U){return U.toUpperCase()},StringPrototypeTrim(U){return U.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(U,Q,X){return U.set(Q,X)},Boolean,Uint8Array}}),$6=I0((h,B)=>{B.exports={format(w,...U){return w.replace(/%([sdifj])/g,function(...[Q,X]){let J=U.shift();if(X==="f")return J.toFixed(6);else if(X==="j")return JSON.stringify(J);else if(X==="s"&&typeof J==="object")return`${J.constructor!==Object?J.constructor.name:""} {}`.trim();else return J.toString()})},inspect(w){switch(typeof w){case"string":if(w.includes("'")){if(!w.includes('"'))return`"${w}"`;else if(!w.includes("`")&&!w.includes("${"))return`\`${w}\``}return`'${w}'`;case"number":if(isNaN(w))return"NaN";else if(Object.is(w,-0))return String(w);return w;case"bigint":return`${String(w)}n`;case"boolean":case"undefined":return String(w);case"object":return"{}"}}}}),L0=I0((h,B)=>{var{format:w,inspect:U}=$6(),{AggregateError:Q}=W0(),X=globalThis.AggregateError||Q,J=Symbol("kIsNodeError"),Y=["string","function","number","object","Function","Object","boolean","bigint","symbol"],K=/^([A-Z][a-z0-9]*)+$/,H={};function G(x,q){if(!x)throw new H.ERR_INTERNAL_ASSERTION(q)}function N(x){let q="",C=x.length,M=x[0]==="-"?1:0;for(;C>=M+4;C-=3)q=`_${x.slice(C-3,C)}${q}`;return`${x.slice(0,C)}${q}`}function D(x,q,C){if(typeof q==="function")return G(q.length<=C.length,`Code: ${x}; The provided arguments length (${C.length}) does not match the required ones (${q.length}).`),q(...C);let M=(q.match(/%[dfijoOs]/g)||[]).length;if(G(M===C.length,`Code: ${x}; The provided arguments length (${C.length}) does not match the required ones (${M}).`),C.length===0)return q;return w(q,...C)}function O(x,q,C){if(!C)C=Error;class M extends C{constructor(..._){super(D(x,q,_))}toString(){return`${this.name} [${x}]: ${this.message}`}}Object.defineProperties(M.prototype,{name:{value:C.name,writable:!0,enumerable:!1,configurable:!0},toString:{value(){return`${this.name} [${x}]: ${this.message}`},writable:!0,enumerable:!1,configurable:!0}}),M.prototype.code=x,M.prototype[J]=!0,H[x]=M}function r(x){let q="__node_internal_"+x.name;return Object.defineProperty(x,"name",{value:q}),x}function m(x,q){if(x&&q&&x!==q){if(Array.isArray(q.errors))return q.errors.push(x),q;let C=new X([q,x],q.message);return C.code=q.code,C}return x||q}class L extends Error{constructor(x="The operation was aborted",q=void 0){if(q!==void 0&&typeof q!=="object")throw new H.ERR_INVALID_ARG_TYPE("options","Object",q);super(x,q);this.code="ABORT_ERR",this.name="AbortError"}}O("ERR_ASSERTION","%s",Error),O("ERR_INVALID_ARG_TYPE",(x,q,C)=>{if(G(typeof x==="string","'name' must be a string"),!Array.isArray(q))q=[q];let M="The ";if(x.endsWith(" argument"))M+=`${x} `;else M+=`"${x}" ${x.includes(".")?"property":"argument"} `;M+="must be ";let _=[],d=[],Z0=[];for(let a of q)if(G(typeof a==="string","All expected entries have to be of type string"),Y.includes(a))_.push(a.toLowerCase());else if(K.test(a))d.push(a);else G(a!=="object",'The value "object" should be written as "Object"'),Z0.push(a);if(d.length>0){let a=_.indexOf("object");if(a!==-1)_.splice(_,a,1),d.push("Object")}if(_.length>0){switch(_.length){case 1:M+=`of type ${_[0]}`;break;case 2:M+=`one of type ${_[0]} or ${_[1]}`;break;default:{let a=_.pop();M+=`one of type ${_.join(", ")}, or ${a}`}}if(d.length>0||Z0.length>0)M+=" or "}if(d.length>0){switch(d.length){case 1:M+=`an instance of ${d[0]}`;break;case 2:M+=`an instance of ${d[0]} or ${d[1]}`;break;default:{let a=d.pop();M+=`an instance of ${d.join(", ")}, or ${a}`}}if(Z0.length>0)M+=" or "}switch(Z0.length){case 0:break;case 1:if(Z0[0].toLowerCase()!==Z0[0])M+="an ";M+=`${Z0[0]}`;break;case 2:M+=`one of ${Z0[0]} or ${Z0[1]}`;break;default:{let a=Z0.pop();M+=`one of ${Z0.join(", ")}, or ${a}`}}if(C==null)M+=`. Received ${C}`;else if(typeof C==="function"&&C.name)M+=`. Received function ${C.name}`;else if(typeof C==="object"){var q0;if((q0=C.constructor)!==null&&q0!==void 0&&q0.name)M+=`. Received an instance of ${C.constructor.name}`;else{let a=U(C,{depth:-1});M+=`. Received ${a}`}}else{let a=U(C,{colors:!1});if(a.length>25)a=`${a.slice(0,25)}...`;M+=`. Received type ${typeof C} (${a})`}return M},TypeError),O("ERR_INVALID_ARG_VALUE",(x,q,C="is invalid")=>{let M=U(q);if(M.length>128)M=M.slice(0,128)+"...";return`The ${x.includes(".")?"property":"argument"} '${x}' ${C}. Received ${M}`},TypeError),O("ERR_INVALID_RETURN_VALUE",(x,q,C)=>{var M;let _=C!==null&&C!==void 0&&(M=C.constructor)!==null&&M!==void 0&&M.name?`instance of ${C.constructor.name}`:`type ${typeof C}`;return`Expected ${x} to be returned from the "${q}" function but got ${_}.`},TypeError),O("ERR_MISSING_ARGS",(...x)=>{G(x.length>0,"At least one arg needs to be specified");let q,C=x.length;switch(x=(Array.isArray(x)?x:[x]).map((M)=>`"${M}"`).join(" or "),C){case 1:q+=`The ${x[0]} argument`;break;case 2:q+=`The ${x[0]} and ${x[1]} arguments`;break;default:{let M=x.pop();q+=`The ${x.join(", ")}, and ${M} arguments`}break}return`${q} must be specified`},TypeError),O("ERR_OUT_OF_RANGE",(x,q,C)=>{G(q,'Missing "range" argument');let M;if(Number.isInteger(C)&&Math.abs(C)>4294967296)M=N(String(C));else if(typeof C==="bigint"){M=String(C);let _=BigInt(2)**BigInt(32);if(C>_||C<-_)M=N(M);M+="n"}else M=U(C);return`The value of "${x}" is out of range. It must be ${q}. Received ${M}`},RangeError),O("ERR_MULTIPLE_CALLBACK","Callback called multiple times",Error),O("ERR_METHOD_NOT_IMPLEMENTED","The %s method is not implemented",Error),O("ERR_STREAM_ALREADY_FINISHED","Cannot call %s after a stream was finished",Error),O("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable",Error),O("ERR_STREAM_DESTROYED","Cannot call %s after a stream was destroyed",Error),O("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),O("ERR_STREAM_PREMATURE_CLOSE","Premature close",Error),O("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF",Error),O("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event",Error),O("ERR_STREAM_WRITE_AFTER_END","write after end",Error),O("ERR_UNKNOWN_ENCODING","Unknown encoding: %s",TypeError),B.exports={AbortError:L,aggregateTwoErrors:r(m),hideStackFrames:r,codes:H}}),l8=I0((h,B)=>{Object.defineProperty(h,"__esModule",{value:!0});var w=new WeakMap,U=new WeakMap;function Q(k){let u=w.get(k);return console.assert(u!=null,"'this' is expected an Event object, but got",k),u}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 J(k,u){w.set(this,{eventTarget:k,event:u,eventPhase:2,currentTarget:k,canceled:!1,stopped:!1,immediateStopped:!1,passiveListener:null,timeStamp:u.timeStamp||Date.now()}),Object.defineProperty(this,"isTrusted",{value:!1,enumerable:!0});let W=Object.keys(u);for(let A=0;A<W.length;++A){let E=W[A];if(!(E in this))Object.defineProperty(this,E,Y(E))}}if(J.prototype={get type(){return Q(this).event.type},get target(){return Q(this).eventTarget},get currentTarget(){return Q(this).currentTarget},composedPath(){let k=Q(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 Q(this).eventPhase},stopPropagation(){let k=Q(this);if(k.stopped=!0,typeof k.event.stopPropagation==="function")k.event.stopPropagation()},stopImmediatePropagation(){let k=Q(this);if(k.stopped=!0,k.immediateStopped=!0,typeof k.event.stopImmediatePropagation==="function")k.event.stopImmediatePropagation()},get bubbles(){return Boolean(Q(this).event.bubbles)},get cancelable(){return Boolean(Q(this).event.cancelable)},preventDefault(){X(Q(this))},get defaultPrevented(){return Q(this).canceled},get composed(){return Boolean(Q(this).event.composed)},get timeStamp(){return Q(this).timeStamp},get srcElement(){return Q(this).eventTarget},get cancelBubble(){return Q(this).stopped},set cancelBubble(k){if(!k)return;let u=Q(this);if(u.stopped=!0,typeof u.event.cancelBubble==="boolean")u.event.cancelBubble=!0},get returnValue(){return!Q(this).canceled},set returnValue(k){if(!k)X(Q(this))},initEvent(){}},Object.defineProperty(J.prototype,"constructor",{value:J,configurable:!0,writable:!0}),typeof window<"u"&&typeof window.Event<"u")Object.setPrototypeOf(J.prototype,window.Event.prototype),U.set(window.Event.prototype,J);function Y(k){return{get(){return Q(this).event[k]},set(u){Q(this).event[k]=u},configurable:!0,enumerable:!0}}function K(k){return{value(){let u=Q(this).event;return u[k].apply(u,arguments)},configurable:!0,enumerable:!0}}function H(k,u){let W=Object.keys(u);if(W.length===0)return k;function A(E,j){k.call(this,E,j)}A.prototype=Object.create(k.prototype,{constructor:{value:A,configurable:!0,writable:!0}});for(let E=0;E<W.length;++E){let j=W[E];if(!(j in k.prototype)){let n=typeof Object.getOwnPropertyDescriptor(u,j).value==="function";Object.defineProperty(A.prototype,j,n?K(j):Y(j))}}return A}function G(k){if(k==null||k===Object.prototype)return J;let u=U.get(k);if(u==null)u=H(G(Object.getPrototypeOf(k)),k),U.set(k,u);return u}function N(k,u){return new(G(Object.getPrototypeOf(u)))(k,u)}function D(k){return Q(k).immediateStopped}function O(k,u){Q(k).eventPhase=u}function r(k,u){Q(k).currentTarget=u}function m(k,u){Q(k).passiveListener=u}var L=new WeakMap,x=1,q=2,C=3;function M(k){return k!==null&&typeof k==="object"}function _(k){let u=L.get(k);if(u==null)throw TypeError("'this' is expected an EventTarget object, but got another value.");return u}function d(k){return{get(){let u=_(this).get(k);while(u!=null){if(u.listenerType===C)return u.listener;u=u.next}return null},set(u){if(typeof u!=="function"&&!M(u))u=null;let W=_(this),A=null,E=W.get(k);while(E!=null){if(E.listenerType===C)if(A!==null)A.next=E.next;else if(E.next!==null)W.set(k,E.next);else W.delete(k);else A=E;E=E.next}if(u!==null){let j={listener:u,listenerType:C,passive:!1,once:!1,next:null};if(A===null)W.set(k,j);else A.next=j}},configurable:!0,enumerable:!0}}function Z0(k,u){Object.defineProperty(k,`on${u}`,d(u))}function q0(k){function u(){a.call(this)}u.prototype=Object.create(a.prototype,{constructor:{value:u,configurable:!0,writable:!0}});for(let W=0;W<k.length;++W)Z0(u.prototype,k[W]);return u}function a(){if(this instanceof a){L.set(this,new Map);return}if(arguments.length===1&&Array.isArray(arguments[0]))return q0(arguments[0]);if(arguments.length>0){let k=Array(arguments.length);for(let u=0;u<arguments.length;++u)k[u]=arguments[u];return q0(k)}throw TypeError("Cannot call a class as a function")}if(a.prototype={addEventListener(k,u,W){if(u==null)return;if(typeof u!=="function"&&!M(u))throw TypeError("'listener' should be a function or an object.");let A=_(this),E=M(W),j=(E?Boolean(W.capture):Boolean(W))?x:q,n={listener:u,listenerType:j,passive:E&&Boolean(W.passive),once:E&&Boolean(W.once),next:null},h0=A.get(k);if(h0===void 0){A.set(k,n);return}let U0=null;while(h0!=null){if(h0.listener===u&&h0.listenerType===j)return;U0=h0,h0=h0.next}U0.next=n},removeEventListener(k,u,W){if(u==null)return;let A=_(this),E=(M(W)?Boolean(W.capture):Boolean(W))?x:q,j=null,n=A.get(k);while(n!=null){if(n.listener===u&&n.listenerType===E){if(j!==null)j.next=n.next;else if(n.next!==null)A.set(k,n.next);else A.delete(k);return}j=n,n=n.next}},dispatchEvent(k){if(k==null||typeof k.type!=="string")throw TypeError('"event.type" should be a string.');let u=_(this),W=k.type,A=u.get(W);if(A==null)return!0;let E=N(this,k),j=null;while(A!=null){if(A.once)if(j!==null)j.next=A.next;else if(A.next!==null)u.set(W,A.next);else u.delete(W);else j=A;if(m(E,A.passive?A.listener:null),typeof A.listener==="function")try{A.listener.call(this,E)}catch(n){if(typeof console<"u"&&typeof console.error==="function")console.error(n)}else if(A.listenerType!==C&&typeof A.listener.handleEvent==="function")A.listener.handleEvent(E);if(D(E))break;A=A.next}return m(E,null),O(E,0),r(E,null),!E.defaultPrevented}},Object.defineProperty(a.prototype,"constructor",{value:a,configurable:!0,writable:!0}),typeof window<"u"&&typeof window.EventTarget<"u")Object.setPrototypeOf(a.prototype,window.EventTarget.prototype);h.defineEventAttribute=Z0,h.EventTarget=a,h.default=a,B.exports=a,B.exports.EventTarget=B.exports.default=a,B.exports.defineEventAttribute=Z0}),j2=I0((h,B)=>{Object.defineProperty(h,"__esModule",{value:!0});var w=l8();class U extends w.EventTarget{constructor(){super();throw TypeError("AbortSignal cannot be constructed directly")}get aborted(){let G=J.get(this);if(typeof G!=="boolean")throw TypeError(`Expected 'this' to be an 'AbortSignal' object, but got ${this===null?"null":typeof this}`);return G}}w.defineEventAttribute(U.prototype,"abort");function Q(){let G=Object.create(U.prototype);return w.EventTarget.call(G),J.set(G,!1),G}function X(G){if(J.get(G)!==!1)return;J.set(G,!0),G.dispatchEvent({type:"abort"})}var J=new WeakMap;if(Object.defineProperties(U.prototype,{aborted:{enumerable:!0}}),typeof Symbol==="function"&&typeof Symbol.toStringTag==="symbol")Object.defineProperty(U.prototype,Symbol.toStringTag,{configurable:!0,value:"AbortSignal"});class Y{constructor(){K.set(this,Q())}get signal(){return H(this)}abort(){X(H(this))}}var K=new WeakMap;function H(G){let N=K.get(G);if(N==null)throw TypeError(`Expected 'this' to be an 'AbortController' object, but got ${G===null?"null":typeof G}`);return N}if(Object.defineProperties(Y.prototype,{signal:{enumerable:!0},abort:{enumerable:!0}}),typeof Symbol==="function"&&typeof Symbol.toStringTag==="symbol")Object.defineProperty(Y.prototype,Symbol.toStringTag,{configurable:!0,value:"AbortController"});h.AbortController=Y,h.AbortSignal=U,h.default=Y,B.exports=Y,B.exports.AbortController=B.exports.default=Y,B.exports.AbortSignal=U}),E0=I0((h,B)=>{var w=(i0(),R0(d0)),{format:U,inspect:Q}=$6(),{codes:{ERR_INVALID_ARG_TYPE:X}}=L0(),{kResistStopPropagation:J,AggregateError:Y,SymbolDispose:K}=W0(),H=globalThis.AbortSignal||j2().AbortSignal,G=globalThis.AbortController||j2().AbortController,N=Object.getPrototypeOf(async function(){}).constructor,D=globalThis.Blob||w.Blob,O=typeof D<"u"?function(L){return L instanceof D}:function(L){return!1},r=(L,x)=>{if(L!==void 0&&(L===null||typeof L!=="object"||!("aborted"in L)))throw new X(x,"AbortSignal",L)},m=(L,x)=>{if(typeof L!=="function")throw new X(x,"Function",L)};B.exports={AggregateError:Y,kEmptyObject:Object.freeze({}),once(L){let x=!1;return function(...q){if(x)return;x=!0,L.apply(this,q)}},createDeferredPromise:function(){let L,x;return{promise:new Promise((q,C)=>{L=q,x=C}),resolve:L,reject:x}},promisify(L){return new Promise((x,q)=>{L((C,...M)=>{if(C)return q(C);return x(...M)})})},debuglog(){return function(){}},format:U,inspect:Q,types:{isAsyncFunction(L){return L instanceof N},isArrayBufferView(L){return ArrayBuffer.isView(L)}},isBlob:O,deprecate(L,x){return L},addAbortListener:(V2(),R0(C2)).addAbortListener||function(L,x){if(L===void 0)throw new X("signal","AbortSignal",L);r(L,"signal"),m(x,"listener");let q;if(L.aborted)queueMicrotask(()=>x());else L.addEventListener("abort",x,{__proto__:null,once:!0,[J]:!0}),q=()=>{L.removeEventListener("abort",x)};return{__proto__:null,[K](){var C;(C=q)===null||C===void 0||C()}}},AbortSignalAny:H.any||function(L){if(L.length===1)return L[0];let x=new G,q=()=>x.abort();return L.forEach((C)=>{r(C,"signals"),C.addEventListener("abort",q,{once:!0})}),x.signal.addEventListener("abort",()=>{L.forEach((C)=>C.removeEventListener("abort",q))},{once:!0}),x.signal}},B.exports.promisify.custom=Symbol.for("nodejs.util.promisify.custom")}),M2=I0((h,B)=>{var{ArrayIsArray:w,ArrayPrototypeIncludes:U,ArrayPrototypeJoin:Q,ArrayPrototypeMap:X,NumberIsInteger:J,NumberIsNaN:Y,NumberMAX_SAFE_INTEGER:K,NumberMIN_SAFE_INTEGER:H,NumberParseInt:G,ObjectPrototypeHasOwnProperty:N,RegExpPrototypeExec:D,String:O,StringPrototypeToUpperCase:r,StringPrototypeTrim:m}=W0(),{hideStackFrames:L,codes:{ERR_SOCKET_BAD_PORT:x,ERR_INVALID_ARG_TYPE:q,ERR_INVALID_ARG_VALUE:C,ERR_OUT_OF_RANGE:M,ERR_UNKNOWN_SIGNAL:_}}=L0(),{normalizeEncoding:d}=E0(),{isAsyncFunction:Z0,isArrayBufferView:q0}=E0().types,a={};function k($){return $===($|0)}function u($){return $===$>>>0}var W=/^[0-7]+$/,A="must be a 32-bit unsigned integer or an octal string";function E($,v,s){if(typeof $>"u")$=s;if(typeof $==="string"){if(D(W,$)===null)throw new C(v,$,A);$=G($,8)}return h0($,v),$}var j=L(($,v,s=H,g=K)=>{if(typeof $!=="number")throw new q(v,"number",$);if(!J($))throw new M(v,"an integer",$);if($<s||$>g)throw new M(v,`>= ${s} && <= ${g}`,$)}),n=L(($,v,s=-2147483648,g=2147483647)=>{if(typeof $!=="number")throw new q(v,"number",$);if(!J($))throw new M(v,"an integer",$);if($<s||$>g)throw new M(v,`>= ${s} && <= ${g}`,$)}),h0=L(($,v,s=!1)=>{if(typeof $!=="number")throw new q(v,"number",$);if(!J($))throw new M(v,"an integer",$);let g=s?1:0,X0=4294967295;if($<g||$>X0)throw new M(v,`>= ${g} && <= ${X0}`,$)});function U0($,v){if(typeof $!=="string")throw new q(v,"string",$)}function z0($,v,s=void 0,g){if(typeof $!=="number")throw new q(v,"number",$);if(s!=null&&$<s||g!=null&&$>g||(s!=null||g!=null)&&Y($))throw new M(v,`${s!=null?`>= ${s}`:""}${s!=null&&g!=null?" && ":""}${g!=null?`<= ${g}`:""}`,$)}var f=L(($,v,s)=>{if(!U(s,$)){let g="must be one of: "+Q(X(s,(X0)=>typeof X0==="string"?`'${X0}'`:O(X0)),", ");throw new C(v,$,g)}});function Q0($,v){if(typeof $!=="boolean")throw new q(v,"boolean",$)}function z($,v,s){return $==null||!N($,v)?s:$[v]}var c=L(($,v,s=null)=>{let g=z(s,"allowArray",!1),X0=z(s,"allowFunction",!1);if(!z(s,"nullable",!1)&&$===null||!g&&w($)||typeof $!=="object"&&(!X0||typeof $!=="function"))throw new q(v,"Object",$)}),e=L(($,v)=>{if($!=null&&typeof $!=="object"&&typeof $!=="function")throw new q(v,"a dictionary",$)}),R=L(($,v,s=0)=>{if(!w($))throw new q(v,"Array",$);if($.length<s){let g=`must be longer than ${s}`;throw new C(v,$,g)}});function w0($,v){R($,v);for(let s=0;s<$.length;s++)U0($[s],`${v}[${s}]`)}function J0($,v){R($,v);for(let s=0;s<$.length;s++)Q0($[s],`${v}[${s}]`)}function H0($,v){R($,v);for(let s=0;s<$.length;s++){let g=$[s],X0=`${v}[${s}]`;if(g==null)throw new q(X0,"AbortSignal",g);F0(g,X0)}}function Y0($,v="signal"){if(U0($,v),a[$]===void 0){if(a[r($)]!==void 0)throw new _($+" (signals must use all capital letters)");throw new _($)}}var S=L(($,v="buffer")=>{if(!q0($))throw new q(v,["Buffer","TypedArray","DataView"],$)});function y($,v){let s=d(v),g=$.length;if(s==="hex"&&g%2!==0)throw new C("encoding",v,`is invalid for data of length ${g}`)}function i($,v="Port",s=!0){if(typeof $!=="number"&&typeof $!=="string"||typeof $==="string"&&m($).length===0||+$!==+$>>>0||$>65535||$===0&&!s)throw new x(v,$,s);return $|0}var F0=L(($,v)=>{if($!==void 0&&($===null||typeof $!=="object"||!("aborted"in $)))throw new q(v,"AbortSignal",$)}),K0=L(($,v)=>{if(typeof $!=="function")throw new q(v,"Function",$)}),I=L(($,v)=>{if(typeof $!=="function"||Z0($))throw new q(v,"Function",$)}),V=L(($,v)=>{if($!==void 0)throw new q(v,"undefined",$)});function T($,v,s){if(!U(s,$))throw new q(v,`('${Q(s,"|")}')`,$)}var p=/^(?:<[^>]*>)(?:\s*;\s*[^;"\s]+(?:=(")?[^;"\s]*\1)?)*$/;function o($,v){if(typeof $>"u"||!D(p,$))throw new C(v,$,'must be an array or string of format "</styles.css>; rel=preload; as=style"')}function l($){if(typeof $==="string")return o($,"hints"),$;else if(w($)){let v=$.length,s="";if(v===0)return s;for(let g=0;g<v;g++){let X0=$[g];if(o(X0,"hints"),s+=X0,g!==v-1)s+=", "}return s}throw new C("hints",$,'must be an array or string of format "</styles.css>; rel=preload; as=style"')}B.exports={isInt32:k,isUint32:u,parseFileMode:E,validateArray:R,validateStringArray:w0,validateBooleanArray:J0,validateAbortSignalArray:H0,validateBoolean:Q0,validateBuffer:S,validateDictionary:e,validateEncoding:y,validateFunction:K0,validateInt32:n,validateInteger:j,validateNumber:z0,validateObject:c,validateOneOf:f,validatePlainFunction:I,validatePort:i,validateSignalName:Y0,validateString:U0,validateUint32:h0,validateUndefined:V,validateUnion:T,validateAbortSignal:F0,validateLinkHeaderValue:l}}),Z2=I0((h,B)=>{B.exports=globalThis.process}),m0=I0((h,B)=>{var{SymbolAsyncIterator:w,SymbolIterator:U,SymbolFor:Q}=W0(),X=Q("nodejs.stream.destroyed"),J=Q("nodejs.stream.errored"),Y=Q("nodejs.stream.readable"),K=Q("nodejs.stream.writable"),H=Q("nodejs.stream.disturbed"),G=Q("nodejs.webstream.isClosedPromise"),N=Q("nodejs.webstream.controllerErrorFunction");function D(z,c=!1){var e;return!!(z&&typeof z.pipe==="function"&&typeof z.on==="function"&&(!c||typeof z.pause==="function"&&typeof z.resume==="function")&&(!z._writableState||((e=z._readableState)===null||e===void 0?void 0:e.readable)!==!1)&&(!z._writableState||z._readableState))}function O(z){var c;return!!(z&&typeof z.write==="function"&&typeof z.on==="function"&&(!z._readableState||((c=z._writableState)===null||c===void 0?void 0:c.writable)!==!1))}function r(z){return!!(z&&typeof z.pipe==="function"&&z._readableState&&typeof z.on==="function"&&typeof z.write==="function")}function m(z){return z&&(z._readableState||z._writableState||typeof z.write==="function"&&typeof z.on==="function"||typeof z.pipe==="function"&&typeof z.on==="function")}function L(z){return!!(z&&!m(z)&&typeof z.pipeThrough==="function"&&typeof z.getReader==="function"&&typeof z.cancel==="function")}function x(z){return!!(z&&!m(z)&&typeof z.getWriter==="function"&&typeof z.abort==="function")}function q(z){return!!(z&&!m(z)&&typeof z.readable==="object"&&typeof z.writable==="object")}function C(z){return L(z)||x(z)||q(z)}function M(z,c){if(z==null)return!1;if(c===!0)return typeof z[w]==="function";if(c===!1)return typeof z[U]==="function";return typeof z[w]==="function"||typeof z[U]==="function"}function _(z){if(!m(z))return null;let{_writableState:c,_readableState:e}=z,R=c||e;return!!(z.destroyed||z[X]||R!==null&&R!==void 0&&R.destroyed)}function d(z){if(!O(z))return null;if(z.writableEnded===!0)return!0;let c=z._writableState;if(c!==null&&c!==void 0&&c.errored)return!1;if(typeof(c===null||c===void 0?void 0:c.ended)!=="boolean")return null;return c.ended}function Z0(z,c){if(!O(z))return null;if(z.writableFinished===!0)return!0;let e=z._writableState;if(e!==null&&e!==void 0&&e.errored)return!1;if(typeof(e===null||e===void 0?void 0:e.finished)!=="boolean")return null;return!!(e.finished||c===!1&&e.ended===!0&&e.length===0)}function q0(z){if(!D(z))return null;if(z.readableEnded===!0)return!0;let c=z._readableState;if(!c||c.errored)return!1;if(typeof(c===null||c===void 0?void 0:c.ended)!=="boolean")return null;return c.ended}function a(z,c){if(!D(z))return null;let e=z._readableState;if(e!==null&&e!==void 0&&e.errored)return!1;if(typeof(e===null||e===void 0?void 0:e.endEmitted)!=="boolean")return null;return!!(e.endEmitted||c===!1&&e.ended===!0&&e.length===0)}function k(z){if(z&&z[Y]!=null)return z[Y];if(typeof(z===null||z===void 0?void 0:z.readable)!=="boolean")return null;if(_(z))return!1;return D(z)&&z.readable&&!a(z)}function u(z){if(z&&z[K]!=null)return z[K];if(typeof(z===null||z===void 0?void 0:z.writable)!=="boolean")return null;if(_(z))return!1;return O(z)&&z.writable&&!d(z)}function W(z,c){if(!m(z))return null;if(_(z))return!0;if((c===null||c===void 0?void 0:c.readable)!==!1&&k(z))return!1;if((c===null||c===void 0?void 0:c.writable)!==!1&&u(z))return!1;return!0}function A(z){var c,e;if(!m(z))return null;if(z.writableErrored)return z.writableErrored;return(c=(e=z._writableState)===null||e===void 0?void 0:e.errored)!==null&&c!==void 0?c:null}function E(z){var c,e;if(!m(z))return null;if(z.readableErrored)return z.readableErrored;return(c=(e=z._readableState)===null||e===void 0?void 0:e.errored)!==null&&c!==void 0?c:null}function j(z){if(!m(z))return null;if(typeof z.closed==="boolean")return z.closed;let{_writableState:c,_readableState:e}=z;if(typeof(c===null||c===void 0?void 0:c.closed)==="boolean"||typeof(e===null||e===void 0?void 0:e.closed)==="boolean")return(c===null||c===void 0?void 0:c.closed)||(e===null||e===void 0?void 0:e.closed);if(typeof z._closed==="boolean"&&n(z))return z._closed;return null}function n(z){return typeof z._closed==="boolean"&&typeof z._defaultKeepAlive==="boolean"&&typeof z._removedConnection==="boolean"&&typeof z._removedContLen==="boolean"}function h0(z){return typeof z._sent100==="boolean"&&n(z)}function U0(z){var c;return typeof z._consuming==="boolean"&&typeof z._dumped==="boolean"&&((c=z.req)===null||c===void 0?void 0:c.upgradeOrConnect)===void 0}function z0(z){if(!m(z))return null;let{_writableState:c,_readableState:e}=z,R=c||e;return!R&&h0(z)||!!(R&&R.autoDestroy&&R.emitClose&&R.closed===!1)}function f(z){var c;return!!(z&&((c=z[H])!==null&&c!==void 0?c:z.readableDidRead||z.readableAborted))}function Q0(z){var c,e,R,w0,J0,H0,Y0,S,y,i;return!!(z&&((c=(e=(R=(w0=(J0=(H0=z[J])!==null&&H0!==void 0?H0:z.readableErrored)!==null&&J0!==void 0?J0:z.writableErrored)!==null&&w0!==void 0?w0:(Y0=z._readableState)===null||Y0===void 0?void 0:Y0.errorEmitted)!==null&&R!==void 0?R:(S=z._writableState)===null||S===void 0?void 0:S.errorEmitted)!==null&&e!==void 0?e:(y=z._readableState)===null||y===void 0?void 0:y.errored)!==null&&c!==void 0?c:(i=z._writableState)===null||i===void 0?void 0:i.errored))}B.exports={isDestroyed:_,kIsDestroyed:X,isDisturbed:f,kIsDisturbed:H,isErrored:Q0,kIsErrored:J,isReadable:k,kIsReadable:Y,kIsClosedPromise:G,kControllerErrorFunction:N,kIsWritable:K,isClosed:j,isDuplexNodeStream:r,isFinished:W,isIterable:M,isReadableNodeStream:D,isReadableStream:L,isReadableEnded:q0,isReadableFinished:a,isReadableErrored:E,isNodeStream:m,isWebStream:C,isWritable:u,isWritableNodeStream:O,isWritableStream:x,isWritableEnded:d,isWritableFinished:Z0,isWritableErrored:A,isServerRequest:U0,isServerResponse:h0,willEmitClose:z0,isTransformStream:q}}),s0=I0((h,B)=>{var w=Z2(),{AbortError:U,codes:Q}=L0(),{ERR_INVALID_ARG_TYPE:X,ERR_STREAM_PREMATURE_CLOSE:J}=Q,{kEmptyObject:Y,once:K}=E0(),{validateAbortSignal:H,validateFunction:G,validateObject:N,validateBoolean:D}=M2(),{Promise:O,PromisePrototypeThen:r,SymbolDispose:m}=W0(),{isClosed:L,isReadable:x,isReadableNodeStream:q,isReadableStream:C,isReadableFinished:M,isReadableErrored:_,isWritable:d,isWritableNodeStream:Z0,isWritableStream:q0,isWritableFinished:a,isWritableErrored:k,isNodeStream:u,willEmitClose:W,kIsClosedPromise:A}=m0(),E;function j(f){return f.setHeader&&typeof f.abort==="function"}var n=()=>{};function h0(f,Q0,z){var c,e;if(arguments.length===2)z=Q0,Q0=Y;else if(Q0==null)Q0=Y;else N(Q0,"options");if(G(z,"callback"),H(Q0.signal,"options.signal"),z=K(z),C(f)||q0(f))return U0(f,Q0,z);if(!u(f))throw new X("stream",["ReadableStream","WritableStream","Stream"],f);let R=(c=Q0.readable)!==null&&c!==void 0?c:q(f),w0=(e=Q0.writable)!==null&&e!==void 0?e:Z0(f),J0=f._writableState,H0=f._readableState,Y0=()=>{if(!f.writable)i()},S=W(f)&&q(f)===R&&Z0(f)===w0,y=a(f,!1),i=()=>{if(y=!0,f.destroyed)S=!1;if(S&&(!f.readable||R))return;if(!R||F0)z.call(f)},F0=M(f,!1),K0=()=>{if(F0=!0,f.destroyed)S=!1;if(S&&(!f.writable||w0))return;if(!w0||y)z.call(f)},I=($)=>{z.call(f,$)},V=L(f),T=()=>{V=!0;let $=k(f)||_(f);if($&&typeof $!=="boolean")return z.call(f,$);if(R&&!F0&&q(f,!0)){if(!M(f,!1))return z.call(f,new J)}if(w0&&!y){if(!a(f,!1))return z.call(f,new J)}z.call(f)},p=()=>{V=!0;let $=k(f)||_(f);if($&&typeof $!=="boolean")return z.call(f,$);z.call(f)},o=()=>{f.req.on("finish",i)};if(j(f)){if(f.on("complete",i),!S)f.on("abort",T);if(f.req)o();else f.on("request",o)}else if(w0&&!J0)f.on("end",Y0),f.on("close",Y0);if(!S&&typeof f.aborted==="boolean")f.on("aborted",T);if(f.on("end",K0),f.on("finish",i),Q0.error!==!1)f.on("error",I);if(f.on("close",T),V)w.nextTick(T);else if(J0!==null&&J0!==void 0&&J0.errorEmitted||H0!==null&&H0!==void 0&&H0.errorEmitted){if(!S)w.nextTick(p)}else if(!R&&(!S||x(f))&&(y||d(f)===!1))w.nextTick(p);else if(!w0&&(!S||d(f))&&(F0||x(f)===!1))w.nextTick(p);else if(H0&&f.req&&f.aborted)w.nextTick(p);let l=()=>{if(z=n,f.removeListener("aborted",T),f.removeListener("complete",i),f.removeListener("abort",T),f.removeListener("request",o),f.req)f.req.removeListener("finish",i);f.removeListener("end",Y0),f.removeListener("close",Y0),f.removeListener("finish",i),f.removeListener("end",K0),f.removeListener("error",I),f.removeListener("close",T)};if(Q0.signal&&!V){let $=()=>{let v=z;l(),v.call(f,new U(void 0,{cause:Q0.signal.reason}))};if(Q0.signal.aborted)w.nextTick($);else{E=E||E0().addAbortListener;let v=E(Q0.signal,$),s=z;z=K((...g)=>{v[m](),s.apply(f,g)})}}return l}function U0(f,Q0,z){let c=!1,e=n;if(Q0.signal)if(e=()=>{c=!0,z.call(f,new U(void 0,{cause:Q0.signal.reason}))},Q0.signal.aborted)w.nextTick(e);else{E=E||E0().addAbortListener;let w0=E(Q0.signal,e),J0=z;z=K((...H0)=>{w0[m](),J0.apply(f,H0)})}let R=(...w0)=>{if(!c)w.nextTick(()=>z.apply(f,w0))};return r(f[A].promise,R,R),n}function z0(f,Q0){var z;let c=!1;if(Q0===null)Q0=Y;if((z=Q0)!==null&&z!==void 0&&z.cleanup)D(Q0.cleanup,"cleanup"),c=Q0.cleanup;return new O((e,R)=>{let w0=h0(f,Q0,(J0)=>{if(c)w0();if(J0)R(J0);else e()})})}B.exports=h0,B.exports.finished=z0}),z2=I0((h,B)=>{var w=Z2(),{aggregateTwoErrors:U,codes:{ERR_MULTIPLE_CALLBACK:Q},AbortError:X}=L0(),{Symbol:J}=W0(),{kIsDestroyed:Y,isDestroyed:K,isFinished:H,isServerRequest:G}=m0(),N=J("kDestroy"),D=J("kConstruct");function O(W,A,E){if(W){if(W.stack,A&&!A.errored)A.errored=W;if(E&&!E.errored)E.errored=W}}function r(W,A){let E=this._readableState,j=this._writableState,n=j||E;if(j!==null&&j!==void 0&&j.destroyed||E!==null&&E!==void 0&&E.destroyed){if(typeof A==="function")A();return this}if(O(W,j,E),j)j.destroyed=!0;if(E)E.destroyed=!0;if(!n.constructed)this.once(N,function(h0){m(this,U(h0,W),A)});else m(this,W,A);return this}function m(W,A,E){let j=!1;function n(h0){if(j)return;j=!0;let{_readableState:U0,_writableState:z0}=W;if(O(h0,z0,U0),z0)z0.closed=!0;if(U0)U0.closed=!0;if(typeof E==="function")E(h0);if(h0)w.nextTick(L,W,h0);else w.nextTick(x,W)}try{W._destroy(A||null,n)}catch(h0){n(h0)}}function L(W,A){q(W,A),x(W)}function x(W){let{_readableState:A,_writableState:E}=W;if(E)E.closeEmitted=!0;if(A)A.closeEmitted=!0;if(E!==null&&E!==void 0&&E.emitClose||A!==null&&A!==void 0&&A.emitClose)W.emit("close")}function q(W,A){let{_readableState:E,_writableState:j}=W;if(j!==null&&j!==void 0&&j.errorEmitted||E!==null&&E!==void 0&&E.errorEmitted)return;if(j)j.errorEmitted=!0;if(E)E.errorEmitted=!0;W.emit("error",A)}function C(){let W=this._readableState,A=this._writableState;if(W)W.constructed=!0,W.closed=!1,W.closeEmitted=!1,W.destroyed=!1,W.errored=null,W.errorEmitted=!1,W.reading=!1,W.ended=W.readable===!1,W.endEmitted=W.readable===!1;if(A)A.constructed=!0,A.destroyed=!1,A.closed=!1,A.closeEmitted=!1,A.errored=null,A.errorEmitted=!1,A.finalCalled=!1,A.prefinished=!1,A.ended=A.writable===!1,A.ending=A.writable===!1,A.finished=A.writable===!1}function M(W,A,E){let{_readableState:j,_writableState:n}=W;if(n!==null&&n!==void 0&&n.destroyed||j!==null&&j!==void 0&&j.destroyed)return this;if(j!==null&&j!==void 0&&j.autoDestroy||n!==null&&n!==void 0&&n.autoDestroy)W.destroy(A);else if(A){if(A.stack,n&&!n.errored)n.errored=A;if(j&&!j.errored)j.errored=A;if(E)w.nextTick(q,W,A);else q(W,A)}}function _(W,A){if(typeof W._construct!=="function")return;let{_readableState:E,_writableState:j}=W;if(E)E.constructed=!1;if(j)j.constructed=!1;if(W.once(D,A),W.listenerCount(D)>1)return;w.nextTick(d,W)}function d(W){let A=!1;function E(j){if(A){M(W,j!==null&&j!==void 0?j:new Q);return}A=!0;let{_readableState:n,_writableState:h0}=W,U0=h0||n;if(n)n.constructed=!0;if(h0)h0.constructed=!0;if(U0.destroyed)W.emit(N,j);else if(j)M(W,j,!0);else w.nextTick(Z0,W)}try{W._construct((j)=>{w.nextTick(E,j)})}catch(j){w.nextTick(E,j)}}function Z0(W){W.emit(D)}function q0(W){return(W===null||W===void 0?void 0:W.setHeader)&&typeof W.abort==="function"}function a(W){W.emit("close")}function k(W,A){W.emit("error",A),w.nextTick(a,W)}function u(W,A){if(!W||K(W))return;if(!A&&!H(W))A=new X;if(G(W))W.socket=null,W.destroy(A);else if(q0(W))W.abort();else if(q0(W.req))W.req.abort();else if(typeof W.destroy==="function")W.destroy(A);else if(typeof W.close==="function")W.close();else if(A)w.nextTick(k,W,A);else w.nextTick(a,W);if(!W.destroyed)W[Y]=!0}B.exports={construct:_,destroyer:u,destroy:r,undestroy:C,errorOrDestroy:M}}),B1=I0((h,B)=>{var{ArrayIsArray:w,ObjectSetPrototypeOf:U}=W0(),{EventEmitter:Q}=(V2(),R0(C2));function X(Y){Q.call(this,Y)}U(X.prototype,Q.prototype),U(X,Q),X.prototype.pipe=function(Y,K){let H=this;function G(x){if(Y.writable&&Y.write(x)===!1&&H.pause)H.pause()}H.on("data",G);function N(){if(H.readable&&H.resume)H.resume()}if(Y.on("drain",N),!Y._isStdio&&(!K||K.end!==!1))H.on("end",O),H.on("close",r);let D=!1;function O(){if(D)return;D=!0,Y.end()}function r(){if(D)return;if(D=!0,typeof Y.destroy==="function")Y.destroy()}function m(x){if(L(),Q.listenerCount(this,"error")===0)this.emit("error",x)}J(H,"error",m),J(Y,"error",m);function L(){H.removeListener("data",G),Y.removeListener("drain",N),H.removeListener("end",O),H.removeListener("close",r),H.removeListener("error",m),Y.removeListener("error",m),H.removeListener("end",L),H.removeListener("close",L),Y.removeListener("close",L)}return H.on("end",L),H.on("close",L),Y.on("close",L),Y.emit("pipe",H),Y};function J(Y,K,H){if(typeof Y.prependListener==="function")return Y.prependListener(K,H);if(!Y._events||!Y._events[K])Y.on(K,H);else if(w(Y._events[K]))Y._events[K].unshift(H);else Y._events[K]=[H,Y._events[K]]}B.exports={Stream:X,prependListener:J}}),_2=I0((h,B)=>{var{SymbolDispose:w}=W0(),{AbortError:U,codes:Q}=L0(),{isNodeStream:X,isWebStream:J,kControllerErrorFunction:Y}=m0(),K=s0(),{ERR_INVALID_ARG_TYPE:H}=Q,G,N=(D,O)=>{if(typeof D!=="object"||!("aborted"in D))throw new H(O,"AbortSignal",D)};B.exports.addAbortSignal=function(D,O){if(N(D,"signal"),!X(O)&&!J(O))throw new H("stream",["ReadableStream","WritableStream","Stream"],O);return B.exports.addAbortSignalNoValidate(D,O)},B.exports.addAbortSignalNoValidate=function(D,O){if(typeof D!=="object"||!("aborted"in D))return O;let r=X(O)?()=>{O.destroy(new U(void 0,{cause:D.reason}))}:()=>{O[Y](new U(void 0,{cause:D.reason}))};if(D.aborted)r();else{G=G||E0().addAbortListener;let m=G(D,r);K(O,m[w])}return O}}),m8=I0((h,B)=>{var{StringPrototypeSlice:w,SymbolIterator:U,TypedArrayPrototypeSet:Q,Uint8Array:X}=W0(),{Buffer:J}=(i0(),R0(d0)),{inspect:Y}=E0();B.exports=class{constructor(){this.head=null,this.tail=null,this.length=0}push(K){let H={data:K,next:null};if(this.length>0)this.tail.next=H;else this.head=H;this.tail=H,++this.length}unshift(K){let H={data:K,next:this.head};if(this.length===0)this.tail=H;this.head=H,++this.length}shift(){if(this.length===0)return;let K=this.head.data;if(this.length===1)this.head=this.tail=null;else this.head=this.head.next;return--this.length,K}clear(){this.head=this.tail=null,this.length=0}join(K){if(this.length===0)return"";let H=this.head,G=""+H.data;while((H=H.next)!==null)G+=K+H.data;return G}concat(K){if(this.length===0)return J.alloc(0);let H=J.allocUnsafe(K>>>0),G=this.head,N=0;while(G)Q(H,G.data,N),N+=G.data.length,G=G.next;return H}consume(K,H){let G=this.head.data;if(K<G.length){let N=G.slice(0,K);return this.head.data=G.slice(K),N}if(K===G.length)return this.shift();return H?this._getString(K):this._getBuffer(K)}first(){return this.head.data}*[U](){for(let K=this.head;K;K=K.next)yield K.data}_getString(K){let H="",G=this.head,N=0;do{let D=G.data;if(K>D.length)H+=D,K-=D.length;else{if(K===D.length)if(H+=D,++N,G.next)this.head=G.next;else this.head=this.tail=null;else H+=w(D,0,K),this.head=G,G.data=w(D,K);break}++N}while((G=G.next)!==null);return this.length-=N,H}_getBuffer(K){let H=J.allocUnsafe(K),G=K,N=this.head,D=0;do{let O=N.data;if(K>O.length)Q(H,O,G-K),K-=O.length;else{if(K===O.length)if(Q(H,O,G-K),++D,N.next)this.head=N.next;else this.head=this.tail=null;else Q(H,new X(O.buffer,O.byteOffset,K),G-K),this.head=N,N.data=O.slice(K);break}++D}while((N=N.next)!==null);return this.length-=D,H}[Symbol.for("nodejs.util.inspect.custom")](K,H){return Y(this,{...H,depth:0,customInspect:!1})}}}),R2=I0((h,B)=>{var{MathFloor:w,NumberIsInteger:U}=W0(),{validateInteger:Q}=M2(),{ERR_INVALID_ARG_VALUE:X}=L0().codes,J=16384,Y=16;function K(D,O,r){return D.highWaterMark!=null?D.highWaterMark:O?D[r]:null}function H(D){return D?Y:J}function G(D,O){if(Q(O,"value",0),D)Y=O;else J=O}function N(D,O,r,m){let L=K(O,m,r);if(L!=null){if(!U(L)||L<0){let x=m?`options.${r}`:"options.highWaterMark";throw new X(x,L)}return w(L)}return H(D.objectMode)}B.exports={getHighWaterMark:N,getDefaultHighWaterMark:H,setDefaultHighWaterMark:G}}),n8=I0((h,B)=>{/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */var w=(i0(),R0(d0)),U=w.Buffer;function Q(J,Y){for(var K in J)Y[K]=J[K]}if(U.from&&U.alloc&&U.allocUnsafe&&U.allocUnsafeSlow)B.exports=w;else Q(w,h),h.Buffer=X;function X(J,Y,K){return U(J,Y,K)}X.prototype=Object.create(U.prototype),Q(U,X),X.from=function(J,Y,K){if(typeof J==="number")throw TypeError("Argument must not be a number");return U(J,Y,K)},X.alloc=function(J,Y,K){if(typeof J!=="number")throw TypeError("Argument must be a number");var H=U(J);if(Y!==void 0)if(typeof K==="string")H.fill(Y,K);else H.fill(Y);else H.fill(0);return H},X.allocUnsafe=function(J){if(typeof J!=="number")throw TypeError("Argument must be a number");return U(J)},X.allocUnsafeSlow=function(J){if(typeof J!=="number")throw TypeError("Argument must be a number");return w.SlowBuffer(J)}}),o8=I0((h)=>{var B=n8().Buffer,w=B.isEncoding||function(q){switch(q=""+q,q&&q.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function U(q){if(!q)return"utf8";var C;while(!0)switch(q){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return q;default:if(C)return;q=(""+q).toLowerCase(),C=!0}}function Q(q){var C=U(q);if(typeof C!=="string"&&(B.isEncoding===w||!w(q)))throw Error("Unknown encoding: "+q);return C||q}h.StringDecoder=X;function X(q){this.encoding=Q(q);var C;switch(this.encoding){case"utf16le":this.text=D,this.end=O,C=4;break;case"utf8":this.fillLast=H,C=4;break;case"base64":this.text=r,this.end=m,C=3;break;default:this.write=L,this.end=x;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=B.allocUnsafe(C)}X.prototype.write=function(q){if(q.length===0)return"";var C,M;if(this.lastNeed){if(C=this.fillLast(q),C===void 0)return"";M=this.lastNeed,this.lastNeed=0}else M=0;if(M<q.length)return C?C+this.text(q,M):this.text(q,M);return C||""},X.prototype.end=N,X.prototype.text=G,X.prototype.fillLast=function(q){if(this.lastNeed<=q.length)return q.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);q.copy(this.lastChar,this.lastTotal-this.lastNeed,0,q.length),this.lastNeed-=q.length};function J(q){if(q<=127)return 0;else if(q>>5===6)return 2;else if(q>>4===14)return 3;else if(q>>3===30)return 4;return q>>6===2?-1:-2}function Y(q,C,M){var _=C.length-1;if(_<M)return 0;var d=J(C[_]);if(d>=0){if(d>0)q.lastNeed=d-1;return d}if(--_<M||d===-2)return 0;if(d=J(C[_]),d>=0){if(d>0)q.lastNeed=d-2;return d}if(--_<M||d===-2)return 0;if(d=J(C[_]),d>=0){if(d>0)if(d===2)d=0;else q.lastNeed=d-3;return d}return 0}function K(q,C,M){if((C[0]&192)!==128)return q.lastNeed=0,"�";if(q.lastNeed>1&&C.length>1){if((C[1]&192)!==128)return q.lastNeed=1,"�";if(q.lastNeed>2&&C.length>2){if((C[2]&192)!==128)return q.lastNeed=2,"�"}}}function H(q){var C=this.lastTotal-this.lastNeed,M=K(this,q,C);if(M!==void 0)return M;if(this.lastNeed<=q.length)return q.copy(this.lastChar,C,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);q.copy(this.lastChar,C,0,q.length),this.lastNeed-=q.length}function G(q,C){var M=Y(this,q,C);if(!this.lastNeed)return q.toString("utf8",C);this.lastTotal=M;var _=q.length-(M-this.lastNeed);return q.copy(this.lastChar,0,_),q.toString("utf8",C,_)}function N(q){var C=q&&q.length?this.write(q):"";if(this.lastNeed)return C+"�";return C}function D(q,C){if((q.length-C)%2===0){var M=q.toString("utf16le",C);if(M){var _=M.charCodeAt(M.length-1);if(_>=55296&&_<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=q[q.length-2],this.lastChar[1]=q[q.length-1],M.slice(0,-1)}return M}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=q[q.length-1],q.toString("utf16le",C,q.length-1)}function O(q){var C=q&&q.length?this.write(q):"";if(this.lastNeed){var M=this.lastTotal-this.lastNeed;return C+this.lastChar.toString("utf16le",0,M)}return C}function r(q,C){var M=(q.length-C)%3;if(M===0)return q.toString("base64",C);if(this.lastNeed=3-M,this.lastTotal=3,M===1)this.lastChar[0]=q[q.length-1];else this.lastChar[0]=q[q.length-2],this.lastChar[1]=q[q.length-1];return q.toString("base64",C,q.length-M)}function m(q){var C=q&&q.length?this.write(q):"";if(this.lastNeed)return C+this.lastChar.toString("base64",0,3-this.lastNeed);return C}function L(q){return q.toString(this.encoding)}function x(q){return q&&q.length?this.write(q):""}}),G6=I0((h,B)=>{var w=Z2(),{PromisePrototypeThen:U,SymbolAsyncIterator:Q,SymbolIterator:X}=W0(),{Buffer:J}=(i0(),R0(d0)),{ERR_INVALID_ARG_TYPE:Y,ERR_STREAM_NULL_VALUES:K}=L0().codes;function H(G,N,D){let O;if(typeof N==="string"||N instanceof J)return new G({objectMode:!0,...D,read(){this.push(N),this.push(null)}});let r;if(N&&N[Q])r=!0,O=N[Q]();else if(N&&N[X])r=!1,O=N[X]();else throw new Y("iterable",["Iterable"],N);let m=new G({objectMode:!0,highWaterMark:1,...D}),L=!1;m._read=function(){if(!L)L=!0,q()},m._destroy=function(C,M){U(x(C),()=>w.nextTick(M,C),(_)=>w.nextTick(M,_||C))};async function x(C){let M=C!==void 0&&C!==null,_=typeof O.throw==="function";if(M&&_){let{value:d,done:Z0}=await O.throw(C);if(await d,Z0)return}if(typeof O.return==="function"){let{value:d}=await O.return();await d}}async function q(){for(;;){try{let{value:C,done:M}=r?await O.next():O.next();if(M)m.push(null);else{let _=C&&typeof C.then==="function"?await C:C;if(_===null)throw L=!1,new K;else if(m.push(_))continue;else L=!1}}catch(C){m.destroy(C)}break}}return m}B.exports=H}),k2=I0((h,B)=>{var w=Z2(),{ArrayPrototypeIndexOf:U,NumberIsInteger:Q,NumberIsNaN:X,NumberParseInt:J,ObjectDefineProperties:Y,ObjectKeys:K,ObjectSetPrototypeOf:H,Promise:G,SafeSet:N,SymbolAsyncDispose:D,SymbolAsyncIterator:O,Symbol:r}=W0();B.exports=g,g.ReadableState=s;var{EventEmitter:m}=(V2(),R0(C2)),{Stream:L,prependListener:x}=B1(),{Buffer:q}=(i0(),R0(d0)),{addAbortSignal:C}=_2(),M=s0(),_=E0().debuglog("stream",(Z)=>{_=Z}),d=m8(),Z0=z2(),{getHighWaterMark:q0,getDefaultHighWaterMark:a}=R2(),{aggregateTwoErrors:k,codes:{ERR_INVALID_ARG_TYPE:u,ERR_METHOD_NOT_IMPLEMENTED:W,ERR_OUT_OF_RANGE:A,ERR_STREAM_PUSH_AFTER_EOF:E,ERR_STREAM_UNSHIFT_AFTER_END_EVENT:j},AbortError:n}=L0(),{validateObject:h0}=M2(),U0=r("kPaused"),{StringDecoder:z0}=o8(),f=G6();H(g.prototype,L.prototype),H(g,L);var Q0=()=>{},{errorOrDestroy:z}=Z0,c=1,e=2,R=4,w0=8,J0=16,H0=32,Y0=64,S=128,y=256,i=512,F0=1024,K0=2048,I=4096,V=8192,T=16384,p=32768,o=65536,l=131072,$=262144;function v(Z){return{enumerable:!1,get(){return(this.state&Z)!==0},set(F){if(F)this.state|=Z;else this.state&=~Z}}}Y(s.prototype,{objectMode:v(c),ended:v(e),endEmitted:v(R),reading:v(w0),constructed:v(J0),sync:v(H0),needReadable:v(Y0),emittedReadable:v(S),readableListening:v(y),resumeScheduled:v(i),errorEmitted:v(F0),emitClose:v(K0),autoDestroy:v(I),destroyed:v(V),closed:v(T),closeEmitted:v(p),multiAwaitDrain:v(o),readingMore:v(l),dataEmitted:v($)});function s(Z,F,b){if(typeof b!=="boolean")b=F instanceof l0();if(this.state=K0|I|J0|H0,Z&&Z.objectMode)this.state|=c;if(b&&Z&&Z.readableObjectMode)this.state|=c;if(this.highWaterMark=Z?q0(this,Z,"readableHighWaterMark",b):a(!1),this.buffer=new d,this.length=0,this.pipes=[],this.flowing=null,this[U0]=null,Z&&Z.emitClose===!1)this.state&=~K0;if(Z&&Z.autoDestroy===!1)this.state&=~I;if(this.errored=null,this.defaultEncoding=Z&&Z.defaultEncoding||"utf8",this.awaitDrainWriters=null,this.decoder=null,this.encoding=null,Z&&Z.encoding)this.decoder=new z0(Z.encoding),this.encoding=Z.encoding}function g(Z){if(!(this instanceof g))return new g(Z);let F=this instanceof l0();if(this._readableState=new s(Z,this,F),Z){if(typeof Z.read==="function")this._read=Z.read;if(typeof Z.destroy==="function")this._destroy=Z.destroy;if(typeof Z.construct==="function")this._construct=Z.construct;if(Z.signal&&!F)C(Z.signal,this)}L.call(this,Z),Z0.construct(this,()=>{if(this._readableState.needReadable)q2(this,this._readableState)})}g.prototype.destroy=Z0.destroy,g.prototype._undestroy=Z0.undestroy,g.prototype._destroy=function(Z,F){F(Z)},g.prototype[m.captureRejectionSymbol]=function(Z){this.destroy(Z)},g.prototype[D]=function(){let Z;if(!this.destroyed)Z=this.readableEnded?null:new n,this.destroy(Z);return new G((F,b)=>M(this,(t)=>t&&t!==Z?b(t):F(null)))},g.prototype.push=function(Z,F){return X0(this,Z,F,!1)},g.prototype.unshift=function(Z,F){return X0(this,Z,F,!0)};function X0(Z,F,b,t){_("readableAddChunk",F);let B0=Z._readableState,A0;if((B0.state&c)===0){if(typeof F==="string"){if(b=b||B0.defaultEncoding,B0.encoding!==b)if(t&&B0.encoding)F=q.from(F,b).toString(B0.encoding);else F=q.from(F,b),b=""}else if(F instanceof q)b="";else if(L._isUint8Array(F))F=L._uint8ArrayToBuffer(F),b="";else if(F!=null)A0=new u("chunk",["string","Buffer","Uint8Array"],F)}if(A0)z(Z,A0);else if(F===null)B0.state&=~w0,M0(Z,B0);else if((B0.state&c)!==0||F&&F.length>0)if(t)if((B0.state&R)!==0)z(Z,new j);else if(B0.destroyed||B0.errored)return!1;else $0(Z,B0,F,!0);else if(B0.ended)z(Z,new E);else if(B0.destroyed||B0.errored)return!1;else if(B0.state&=~w0,B0.decoder&&!b)if(F=B0.decoder.write(F),B0.objectMode||F.length!==0)$0(Z,B0,F,!1);else q2(Z,B0);else $0(Z,B0,F,!1);else if(!t)B0.state&=~w0,q2(Z,B0);return!B0.ended&&(B0.length<B0.highWaterMark||B0.length===0)}function $0(Z,F,b,t){if(F.flowing&&F.length===0&&!F.sync&&Z.listenerCount("data")>0){if((F.state&o)!==0)F.awaitDrainWriters.clear();else F.awaitDrainWriters=null;F.dataEmitted=!0,Z.emit("data",b)}else{if(F.length+=F.objectMode?1:b.length,t)F.buffer.unshift(b);else F.buffer.push(b);if((F.state&Y0)!==0)D0(Z)}q2(Z,F)}g.prototype.isPaused=function(){let Z=this._readableState;return Z[U0]===!0||Z.flowing===!1},g.prototype.setEncoding=function(Z){let F=new z0(Z);this._readableState.decoder=F,this._readableState.encoding=this._readableState.decoder.encoding;let b=this._readableState.buffer,t="";for(let B0 of b)t+=F.write(B0);if(b.clear(),t!=="")b.push(t);return this._readableState.length=t.length,this};var P0=1073741824;function T0(Z){if(Z>P0)throw new A("size","<= 1GiB",Z);else Z--,Z|=Z>>>1,Z|=Z>>>2,Z|=Z>>>4,Z|=Z>>>8,Z|=Z>>>16,Z++;return Z}function e0(Z,F){if(Z<=0||F.length===0&&F.ended)return 0;if((F.state&c)!==0)return 1;if(X(Z)){if(F.flowing&&F.length)return F.buffer.first().length;return F.length}if(Z<=F.length)return Z;return F.ended?F.length:0}g.prototype.read=function(Z){if(_("read",Z),Z===void 0)Z=NaN;else if(!Q(Z))Z=J(Z,10);let F=this._readableState,b=Z;if(Z>F.highWaterMark)F.highWaterMark=T0(Z);if(Z!==0)F.state&=~S;if(Z===0&&F.needReadable&&((F.highWaterMark!==0?F.length>=F.highWaterMark:F.length>0)||F.ended)){if(_("read: emitReadable",F.length,F.ended),F.length===0&&F.ended)f2(this);else D0(this);return null}if(Z=e0(Z,F),Z===0&&F.ended){if(F.length===0)f2(this);return null}let t=(F.state&Y0)!==0;if(_("need readable",t),F.length===0||F.length-Z<F.highWaterMark)t=!0,_("length less than watermark",t);if(F.ended||F.reading||F.destroyed||F.errored||!F.constructed)t=!1,_("reading, ended or constructing",t);else if(t){if(_("do read"),F.state|=w0|H0,F.length===0)F.state|=Y0;try{this._read(F.highWaterMark)}catch(A0){z(this,A0)}if(F.state&=~H0,!F.reading)Z=e0(b,F)}let B0;if(Z>0)B0=G1(Z,F);else B0=null;if(B0===null)F.needReadable=F.length<=F.highWaterMark,Z=0;else if(F.length-=Z,F.multiAwaitDrain)F.awaitDrainWriters.clear();else F.awaitDrainWriters=null;if(F.length===0){if(!F.ended)F.needReadable=!0;if(b!==Z&&F.ended)f2(this)}if(B0!==null&&!F.errorEmitted&&!F.closeEmitted)F.dataEmitted=!0,this.emit("data",B0);return B0};function M0(Z,F){if(_("onEofChunk"),F.ended)return;if(F.decoder){let b=F.decoder.end();if(b&&b.length)F.buffer.push(b),F.length+=F.objectMode?1:b.length}if(F.ended=!0,F.sync)D0(Z);else F.needReadable=!1,F.emittedReadable=!0,F2(Z)}function D0(Z){let F=Z._readableState;if(_("emitReadable",F.needReadable,F.emittedReadable),F.needReadable=!1,!F.emittedReadable)_("emitReadable",F.flowing),F.emittedReadable=!0,w.nextTick(F2,Z)}function F2(Z){let F=Z._readableState;if(_("emitReadable_",F.destroyed,F.length,F.ended),!F.destroyed&&!F.errored&&(F.length||F.ended))Z.emit("readable"),F.emittedReadable=!1;F.needReadable=!F.flowing&&!F.ended&&F.length<=F.highWaterMark,I1(Z)}function q2(Z,F){if(!F.readingMore&&F.constructed)F.readingMore=!0,w.nextTick(y0,Z,F)}function y0(Z,F){while(!F.reading&&!F.ended&&(F.length<F.highWaterMark||F.flowing&&F.length===0)){let b=F.length;if(_("maybeReadMore read 0"),Z.read(0),b===F.length)break}F.readingMore=!1}g.prototype._read=function(Z){throw new W("_read()")},g.prototype.pipe=function(Z,F){let b=this,t=this._readableState;if(t.pipes.length===1){if(!t.multiAwaitDrain)t.multiAwaitDrain=!0,t.awaitDrainWriters=new N(t.awaitDrainWriters?[t.awaitDrainWriters]:[])}t.pipes.push(Z),_("pipe count=%d opts=%j",t.pipes.length,F);let B0=(!F||F.end!==!1)&&Z!==w.stdout&&Z!==w.stderr?_0:H2;if(t.endEmitted)w.nextTick(B0);else b.once("end",B0);Z.on("unpipe",A0);function A0(B2,g0){if(_("onunpipe"),B2===b){if(g0&&g0.hasUnpiped===!1)g0.hasUnpiped=!0,c6()}}function _0(){_("onend"),Z.end()}let h2,W1=!1;function c6(){if(_("cleanup"),Z.removeListener("close",u2),Z.removeListener("finish",g2),h2)Z.removeListener("drain",h2);if(Z.removeListener("error",v2),Z.removeListener("unpipe",A0),b.removeListener("end",_0),b.removeListener("end",H2),b.removeListener("data",V1),W1=!0,h2&&t.awaitDrainWriters&&(!Z._writableState||Z._writableState.needDrain))h2()}function C1(){if(!W1){if(t.pipes.length===1&&t.pipes[0]===Z)_("false write response, pause",0),t.awaitDrainWriters=Z,t.multiAwaitDrain=!1;else if(t.pipes.length>1&&t.pipes.includes(Z))_("false write response, pause",t.awaitDrainWriters.size),t.awaitDrainWriters.add(Z);b.pause()}if(!h2)h2=T6(b,Z),Z.on("drain",h2)}b.on("data",V1);function V1(B2){_("ondata");let g0=Z.write(B2);if(_("dest.write",g0),g0===!1)C1()}function v2(B2){if(_("onerror",B2),H2(),Z.removeListener("error",v2),Z.listenerCount("error")===0){let g0=Z._writableState||Z._readableState;if(g0&&!g0.errorEmitted)z(Z,B2);else Z.emit("error",B2)}}x(Z,"error",v2);function u2(){Z.removeListener("finish",g2),H2()}Z.once("close",u2);function g2(){_("onfinish"),Z.removeListener("close",u2),H2()}Z.once("finish",g2);function H2(){_("unpipe"),b.unpipe(Z)}if(Z.emit("pipe",b),Z.writableNeedDrain===!0)C1();else if(!t.flowing)_("pipe resume"),b.resume();return Z};function T6(Z,F){return function(){let b=Z._readableState;if(b.awaitDrainWriters===F)_("pipeOnDrain",1),b.awaitDrainWriters=null;else if(b.multiAwaitDrain)_("pipeOnDrain",b.awaitDrainWriters.size),b.awaitDrainWriters.delete(F);if((!b.awaitDrainWriters||b.awaitDrainWriters.size===0)&&Z.listenerCount("data"))Z.resume()}}g.prototype.unpipe=function(Z){let F=this._readableState,b={hasUnpiped:!1};if(F.pipes.length===0)return this;if(!Z){let B0=F.pipes;F.pipes=[],this.pause();for(let A0=0;A0<B0.length;A0++)B0[A0].emit("unpipe",this,{hasUnpiped:!1});return this}let t=U(F.pipes,Z);if(t===-1)return this;if(F.pipes.splice(t,1),F.pipes.length===0)this.pause();return Z.emit("unpipe",this,b),this},g.prototype.on=function(Z,F){let b=L.prototype.on.call(this,Z,F),t=this._readableState;if(Z==="data"){if(t.readableListening=this.listenerCount("readable")>0,t.flowing!==!1)this.resume()}else if(Z==="readable"){if(!t.endEmitted&&!t.readableListening){if(t.readableListening=t.needReadable=!0,t.flowing=!1,t.emittedReadable=!1,_("on readable",t.length,t.reading),t.length)D0(this);else if(!t.reading)w.nextTick(_6,this)}}return b},g.prototype.addListener=g.prototype.on,g.prototype.removeListener=function(Z,F){let b=L.prototype.removeListener.call(this,Z,F);if(Z==="readable")w.nextTick(H1,this);return b},g.prototype.off=g.prototype.removeListener,g.prototype.removeAllListeners=function(Z){let F=L.prototype.removeAllListeners.apply(this,arguments);if(Z==="readable"||Z===void 0)w.nextTick(H1,this);return F};function H1(Z){let F=Z._readableState;if(F.readableListening=Z.listenerCount("readable")>0,F.resumeScheduled&&F[U0]===!1)F.flowing=!0;else if(Z.listenerCount("data")>0)Z.resume();else if(!F.readableListening)F.flowing=null}function _6(Z){_("readable nexttick read 0"),Z.read(0)}g.prototype.resume=function(){let Z=this._readableState;if(!Z.flowing)_("resume"),Z.flowing=!Z.readableListening,R6(this,Z);return Z[U0]=!1,this};function R6(Z,F){if(!F.resumeScheduled)F.resumeScheduled=!0,w.nextTick(k6,Z,F)}function k6(Z,F){if(_("resume",F.reading),!F.reading)Z.read(0);if(F.resumeScheduled=!1,Z.emit("resume"),I1(Z),F.flowing&&!F.reading)Z.read(0)}g.prototype.pause=function(){if(_("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1)_("pause"),this._readableState.flowing=!1,this.emit("pause");return this._readableState[U0]=!0,this};function I1(Z){let F=Z._readableState;_("flow",F.flowing);while(F.flowing&&Z.read()!==null);}g.prototype.wrap=function(Z){let F=!1;Z.on("data",(t)=>{if(!this.push(t)&&Z.pause)F=!0,Z.pause()}),Z.on("end",()=>{this.push(null)}),Z.on("error",(t)=>{z(this,t)}),Z.on("close",()=>{this.destroy()}),Z.on("destroy",()=>{this.destroy()}),this._read=()=>{if(F&&Z.resume)F=!1,Z.resume()};let b=K(Z);for(let t=1;t<b.length;t++){let B0=b[t];if(this[B0]===void 0&&typeof Z[B0]==="function")this[B0]=Z[B0].bind(Z)}return this},g.prototype[O]=function(){return $1(this)},g.prototype.iterator=function(Z){if(Z!==void 0)h0(Z,"options");return $1(this,Z)};function $1(Z,F){if(typeof Z.read!=="function")Z=g.wrap(Z,{objectMode:!0});let b=S6(Z,F);return b.stream=Z,b}async function*S6(Z,F){let b=Q0;function t(_0){if(this===Z)b(),b=Q0;else b=_0}Z.on("readable",t);let B0,A0=M(Z,{writable:!1},(_0)=>{B0=_0?k(B0,_0):null,b(),b=Q0});try{while(!0){let _0=Z.destroyed?null:Z.read();if(_0!==null)yield _0;else if(B0)throw B0;else if(B0===null)return;else await new G(t)}}catch(_0){throw B0=k(B0,_0),B0}finally{if((B0||(F===null||F===void 0?void 0:F.destroyOnReturn)!==!1)&&(B0===void 0||Z._readableState.autoDestroy))Z0.destroyer(Z,null);else Z.off("readable",t),A0()}}Y(g.prototype,{readable:{__proto__:null,get(){let Z=this._readableState;return!!Z&&Z.readable!==!1&&!Z.destroyed&&!Z.errorEmitted&&!Z.endEmitted},set(Z){if(this._readableState)this._readableState.readable=!!Z}},readableDidRead:{__proto__:null,enumerable:!1,get:function(){return this._readableState.dataEmitted}},readableAborted:{__proto__:null,enumerable:!1,get:function(){return!!(this._readableState.readable!==!1&&(this._readableState.destroyed||this._readableState.errored)&&!this._readableState.endEmitted)}},readableHighWaterMark:{__proto__:null,enumerable:!1,get:function(){return this._readableState.highWaterMark}},readableBuffer:{__proto__:null,enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}},readableFlowing:{__proto__:null,enumerable:!1,get:function(){return this._readableState.flowing},set:function(Z){if(this._readableState)this._readableState.flowing=Z}},readableLength:{__proto__:null,enumerable:!1,get(){return this._readableState.length}},readableObjectMode:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.objectMode:!1}},readableEncoding:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.encoding:null}},errored:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.errored:null}},closed:{__proto__:null,get(){return this._readableState?this._readableState.closed:!1}},destroyed:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.destroyed:!1},set(Z){if(!this._readableState)return;this._readableState.destroyed=Z}},readableEnded:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.endEmitted:!1}}}),Y(s.prototype,{pipesCount:{__proto__:null,get(){return this.pipes.length}},paused:{__proto__:null,get(){return this[U0]!==!1},set(Z){this[U0]=!!Z}}}),g._fromList=G1;function G1(Z,F){if(F.length===0)return null;let b;if(F.objectMode)b=F.buffer.shift();else if(!Z||Z>=F.length){if(F.decoder)b=F.buffer.join("");else if(F.buffer.length===1)b=F.buffer.first();else b=F.buffer.concat(F.length);F.buffer.clear()}else b=F.buffer.consume(Z,F.decoder);return b}function f2(Z){let F=Z._readableState;if(_("endReadable",F.endEmitted),!F.endEmitted)F.ended=!0,w.nextTick(y6,F,Z)}function y6(Z,F){if(_("endReadableNT",Z.endEmitted,Z.length),!Z.errored&&!Z.closeEmitted&&!Z.endEmitted&&Z.length===0){if(Z.endEmitted=!0,F.emit("end"),F.writable&&F.allowHalfOpen===!1)w.nextTick(f6,F);else if(Z.autoDestroy){let b=F._writableState;if(!b||b.autoDestroy&&(b.finished||b.writable===!1))F.destroy()}}}function f6(Z){if(Z.writable&&!Z.writableEnded&&!Z.destroyed)Z.end()}g.from=function(Z,F){return f(g,Z,F)};var c2;function N1(){if(c2===void 0)c2={};return c2}g.fromWeb=function(Z,F){return N1().newStreamReadableFromReadableStream(Z,F)},g.toWeb=function(Z,F){return N1().newReadableStreamFromStreamReadable(Z,F)},g.wrap=function(Z,F){var b,t;return new g({objectMode:(b=(t=Z.readableObjectMode)!==null&&t!==void 0?t:Z.objectMode)!==null&&b!==void 0?b:!0,...F,destroy(B0,A0){Z0.destroyer(Z,B0),A0(B0)}}).wrap(Z)}}),w1=I0((h,B)=>{var w=Z2(),{ArrayPrototypeSlice:U,Error:Q,FunctionPrototypeSymbolHasInstance:X,ObjectDefineProperty:J,ObjectDefineProperties:Y,ObjectSetPrototypeOf:K,StringPrototypeToLowerCase:H,Symbol:G,SymbolHasInstance:N}=W0();B.exports=h0,h0.WritableState=j;var{EventEmitter:D}=(V2(),R0(C2)),O=B1().Stream,{Buffer:r}=(i0(),R0(d0)),m=z2(),{addAbortSignal:L}=_2(),{getHighWaterMark:x,getDefaultHighWaterMark:q}=R2(),{ERR_INVALID_ARG_TYPE:C,ERR_METHOD_NOT_IMPLEMENTED:M,ERR_MULTIPLE_CALLBACK:_,ERR_STREAM_CANNOT_PIPE:d,ERR_STREAM_DESTROYED:Z0,ERR_STREAM_ALREADY_FINISHED:q0,ERR_STREAM_NULL_VALUES:a,ERR_STREAM_WRITE_AFTER_END:k,ERR_UNKNOWN_ENCODING:u}=L0().codes,{errorOrDestroy:W}=m;K(h0.prototype,O.prototype),K(h0,O);function A(){}var E=G("kOnFinished");function j(I,V,T){if(typeof T!=="boolean")T=V instanceof l0();if(this.objectMode=!!(I&&I.objectMode),T)this.objectMode=this.objectMode||!!(I&&I.writableObjectMode);this.highWaterMark=I?x(this,I,"writableHighWaterMark",T):q(!1),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;let p=!!(I&&I.decodeStrings===!1);this.decodeStrings=!p,this.defaultEncoding=I&&I.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=z.bind(void 0,V),this.writecb=null,this.writelen=0,this.afterWriteTickInfo=null,n(this),this.pendingcb=0,this.constructed=!0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!I||I.emitClose!==!1,this.autoDestroy=!I||I.autoDestroy!==!1,this.errored=null,this.closed=!1,this.closeEmitted=!1,this[E]=[]}function n(I){I.buffered=[],I.bufferedIndex=0,I.allBuffers=!0,I.allNoop=!0}j.prototype.getBuffer=function(){return U(this.buffered,this.bufferedIndex)},J(j.prototype,"bufferedRequestCount",{__proto__:null,get(){return this.buffered.length-this.bufferedIndex}});function h0(I){let V=this instanceof l0();if(!V&&!X(h0,this))return new h0(I);if(this._writableState=new j(I,this,V),I){if(typeof I.write==="function")this._write=I.write;if(typeof I.writev==="function")this._writev=I.writev;if(typeof I.destroy==="function")this._destroy=I.destroy;if(typeof I.final==="function")this._final=I.final;if(typeof I.construct==="function")this._construct=I.construct;if(I.signal)L(I.signal,this)}O.call(this,I),m.construct(this,()=>{let T=this._writableState;if(!T.writing)w0(this,T);S(this,T)})}J(h0,N,{__proto__:null,value:function(I){if(X(this,I))return!0;if(this!==h0)return!1;return I&&I._writableState instanceof j}}),h0.prototype.pipe=function(){W(this,new d)};function U0(I,V,T,p){let o=I._writableState;if(typeof T==="function")p=T,T=o.defaultEncoding;else{if(!T)T=o.defaultEncoding;else if(T!=="buffer"&&!r.isEncoding(T))throw new u(T);if(typeof p!=="function")p=A}if(V===null)throw new a;else if(!o.objectMode)if(typeof V==="string"){if(o.decodeStrings!==!1)V=r.from(V,T),T="buffer"}else if(V instanceof r)T="buffer";else if(O._isUint8Array(V))V=O._uint8ArrayToBuffer(V),T="buffer";else throw new C("chunk",["string","Buffer","Uint8Array"],V);let l;if(o.ending)l=new k;else if(o.destroyed)l=new Z0("write");if(l)return w.nextTick(p,l),W(I,l,!0),l;return o.pendingcb++,z0(I,o,V,T,p)}h0.prototype.write=function(I,V,T){return U0(this,I,V,T)===!0},h0.prototype.cork=function(){this._writableState.corked++},h0.prototype.uncork=function(){let I=this._writableState;if(I.corked){if(I.corked--,!I.writing)w0(this,I)}},h0.prototype.setDefaultEncoding=function(I){if(typeof I==="string")I=H(I);if(!r.isEncoding(I))throw new u(I);return this._writableState.defaultEncoding=I,this};function z0(I,V,T,p,o){let l=V.objectMode?1:T.length;V.length+=l;let $=V.length<V.highWaterMark;if(!$)V.needDrain=!0;if(V.writing||V.corked||V.errored||!V.constructed){if(V.buffered.push({chunk:T,encoding:p,callback:o}),V.allBuffers&&p!=="buffer")V.allBuffers=!1;if(V.allNoop&&o!==A)V.allNoop=!1}else V.writelen=l,V.writecb=o,V.writing=!0,V.sync=!0,I._write(T,p,V.onwrite),V.sync=!1;return $&&!V.errored&&!V.destroyed}function f(I,V,T,p,o,l,$){if(V.writelen=p,V.writecb=$,V.writing=!0,V.sync=!0,V.destroyed)V.onwrite(new Z0("write"));else if(T)I._writev(o,V.onwrite);else I._write(o,l,V.onwrite);V.sync=!1}function Q0(I,V,T,p){--V.pendingcb,p(T),R(V),W(I,T)}function z(I,V){let T=I._writableState,p=T.sync,o=T.writecb;if(typeof o!=="function"){W(I,new _);return}if(T.writing=!1,T.writecb=null,T.length-=T.writelen,T.writelen=0,V){if(V.stack,!T.errored)T.errored=V;if(I._readableState&&!I._readableState.errored)I._readableState.errored=V;if(p)w.nextTick(Q0,I,T,V,o);else Q0(I,T,V,o)}else{if(T.buffered.length>T.bufferedIndex)w0(I,T);if(p)if(T.afterWriteTickInfo!==null&&T.afterWriteTickInfo.cb===o)T.afterWriteTickInfo.count++;else T.afterWriteTickInfo={count:1,cb:o,stream:I,state:T},w.nextTick(c,T.afterWriteTickInfo);else e(I,T,1,o)}}function c({stream:I,state:V,count:T,cb:p}){return V.afterWriteTickInfo=null,e(I,V,T,p)}function e(I,V,T,p){if(!V.ending&&!I.destroyed&&V.length===0&&V.needDrain)V.needDrain=!1,I.emit("drain");while(T-- >0)V.pendingcb--,p();if(V.destroyed)R(V);S(I,V)}function R(I){if(I.writing)return;for(let o=I.bufferedIndex;o<I.buffered.length;++o){var V;let{chunk:l,callback:$}=I.buffered[o],v=I.objectMode?1:l.length;I.length-=v,$((V=I.errored)!==null&&V!==void 0?V:new Z0("write"))}let T=I[E].splice(0);for(let o=0;o<T.length;o++){var p;T[o]((p=I.errored)!==null&&p!==void 0?p:new Z0("end"))}n(I)}function w0(I,V){if(V.corked||V.bufferProcessing||V.destroyed||!V.constructed)return;let{buffered:T,bufferedIndex:p,objectMode:o}=V,l=T.length-p;if(!l)return;let $=p;if(V.bufferProcessing=!0,l>1&&I._writev){V.pendingcb-=l-1;let v=V.allNoop?A:(g)=>{for(let X0=$;X0<T.length;++X0)T[X0].callback(g)},s=V.allNoop&&$===0?T:U(T,$);s.allBuffers=V.allBuffers,f(I,V,!0,V.length,s,"",v),n(V)}else{do{let{chunk:v,encoding:s,callback:g}=T[$];T[$++]=null;let X0=o?1:v.length;f(I,V,!1,X0,v,s,g)}while($<T.length&&!V.writing);if($===T.length)n(V);else if($>256)T.splice(0,$),V.bufferedIndex=0;else V.bufferedIndex=$}V.bufferProcessing=!1}h0.prototype._write=function(I,V,T){if(this._writev)this._writev([{chunk:I,encoding:V}],T);else throw new M("_write()")},h0.prototype._writev=null,h0.prototype.end=function(I,V,T){let p=this._writableState;if(typeof I==="function")T=I,I=null,V=null;else if(typeof V==="function")T=V,V=null;let o;if(I!==null&&I!==void 0){let l=U0(this,I,V);if(l instanceof Q)o=l}if(p.corked)p.corked=1,this.uncork();if(o);else if(!p.errored&&!p.ending)p.ending=!0,S(this,p,!0),p.ended=!0;else if(p.finished)o=new q0("end");else if(p.destroyed)o=new Z0("end");if(typeof T==="function")if(o||p.finished)w.nextTick(T,o);else p[E].push(T);return this};function J0(I){return I.ending&&!I.destroyed&&I.constructed&&I.length===0&&!I.errored&&I.buffered.length===0&&!I.finished&&!I.writing&&!I.errorEmitted&&!I.closeEmitted}function H0(I,V){let T=!1;function p(o){if(T){W(I,o!==null&&o!==void 0?o:_());return}if(T=!0,V.pendingcb--,o){let l=V[E].splice(0);for(let $=0;$<l.length;$++)l[$](o);W(I,o,V.sync)}else if(J0(V))V.prefinished=!0,I.emit("prefinish"),V.pendingcb++,w.nextTick(y,I,V)}V.sync=!0,V.pendingcb++;try{I._final(p)}catch(o){p(o)}V.sync=!1}function Y0(I,V){if(!V.prefinished&&!V.finalCalled)if(typeof I._final==="function"&&!V.destroyed)V.finalCalled=!0,H0(I,V);else V.prefinished=!0,I.emit("prefinish")}function S(I,V,T){if(J0(V)){if(Y0(I,V),V.pendingcb===0){if(T)V.pendingcb++,w.nextTick((p,o)=>{if(J0(o))y(p,o);else o.pendingcb--},I,V);else if(J0(V))V.pendingcb++,y(I,V)}}}function y(I,V){V.pendingcb--,V.finished=!0;let T=V[E].splice(0);for(let p=0;p<T.length;p++)T[p]();if(I.emit("finish"),V.autoDestroy){let p=I._readableState;if(!p||p.autoDestroy&&(p.endEmitted||p.readable===!1))I.destroy()}}Y(h0.prototype,{closed:{__proto__:null,get(){return this._writableState?this._writableState.closed:!1}},destroyed:{__proto__:null,get(){return this._writableState?this._writableState.destroyed:!1},set(I){if(this._writableState)this._writableState.destroyed=I}},writable:{__proto__:null,get(){let I=this._writableState;return!!I&&I.writable!==!1&&!I.destroyed&&!I.errored&&!I.ending&&!I.ended},set(I){if(this._writableState)this._writableState.writable=!!I}},writableFinished:{__proto__:null,get(){return this._writableState?this._writableState.finished:!1}},writableObjectMode:{__proto__:null,get(){return this._writableState?this._writableState.objectMode:!1}},writableBuffer:{__proto__:null,get(){return this._writableState&&this._writableState.getBuffer()}},writableEnded:{__proto__:null,get(){return this._writableState?this._writableState.ending:!1}},writableNeedDrain:{__proto__:null,get(){let I=this._writableState;if(!I)return!1;return!I.destroyed&&!I.ending&&I.needDrain}},writableHighWaterMark:{__proto__:null,get(){return this._writableState&&this._writableState.highWaterMark}},writableCorked:{__proto__:null,get(){return this._writableState?this._writableState.corked:0}},writableLength:{__proto__:null,get(){return this._writableState&&this._writableState.length}},errored:{__proto__:null,enumerable:!1,get(){return this._writableState?this._writableState.errored:null}},writableAborted:{__proto__:null,enumerable:!1,get:function(){return!!(this._writableState.writable!==!1&&(this._writableState.destroyed||this._writableState.errored)&&!this._writableState.finished)}}});var i=m.destroy;h0.prototype.destroy=function(I,V){let T=this._writableState;if(!T.destroyed&&(T.bufferedIndex<T.buffered.length||T[E].length))w.nextTick(R,T);return i.call(this,I,V),this},h0.prototype._undestroy=m.undestroy,h0.prototype._destroy=function(I,V){V(I)},h0.prototype[D.captureRejectionSymbol]=function(I){this.destroy(I)};var F0;function K0(){if(F0===void 0)F0={};return F0}h0.fromWeb=function(I,V){return K0().newStreamWritableFromWritableStream(I,V)},h0.toWeb=function(I){return K0().newWritableStreamFromStreamWritable(I)}}),r8=I0((h,B)=>{var w=Z2(),U=(i0(),R0(d0)),{isReadable:Q,isWritable:X,isIterable:J,isNodeStream:Y,isReadableNodeStream:K,isWritableNodeStream:H,isDuplexNodeStream:G,isReadableStream:N,isWritableStream:D}=m0(),O=s0(),{AbortError:r,codes:{ERR_INVALID_ARG_TYPE:m,ERR_INVALID_RETURN_VALUE:L}}=L0(),{destroyer:x}=z2(),q=l0(),C=k2(),M=w1(),{createDeferredPromise:_}=E0(),d=G6(),Z0=globalThis.Blob||U.Blob,q0=typeof Z0<"u"?function(E){return E instanceof Z0}:function(E){return!1},a=globalThis.AbortController||j2().AbortController,{FunctionPrototypeCall:k}=W0();class u extends q{constructor(E){super(E);if((E===null||E===void 0?void 0:E.readable)===!1)this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0;if((E===null||E===void 0?void 0:E.writable)===!1)this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0}}B.exports=function E(j,n){if(G(j))return j;if(K(j))return A({readable:j});if(H(j))return A({writable:j});if(Y(j))return A({writable:!1,readable:!1});if(N(j))return A({readable:C.fromWeb(j)});if(D(j))return A({writable:M.fromWeb(j)});if(typeof j==="function"){let{value:U0,write:z0,final:f,destroy:Q0}=W(j);if(J(U0))return d(u,U0,{objectMode:!0,write:z0,final:f,destroy:Q0});let z=U0===null||U0===void 0?void 0:U0.then;if(typeof z==="function"){let c,e=k(z,U0,(R)=>{if(R!=null)throw new L("nully","body",R)},(R)=>{x(c,R)});return c=new u({objectMode:!0,readable:!1,write:z0,final(R){f(async()=>{try{await e,w.nextTick(R,null)}catch(w0){w.nextTick(R,w0)}})},destroy:Q0})}throw new L("Iterable, AsyncIterable or AsyncFunction",n,U0)}if(q0(j))return E(j.arrayBuffer());if(J(j))return d(u,j,{objectMode:!0,writable:!1});if(N(j===null||j===void 0?void 0:j.readable)&&D(j===null||j===void 0?void 0:j.writable))return u.fromWeb(j);if(typeof(j===null||j===void 0?void 0:j.writable)==="object"||typeof(j===null||j===void 0?void 0:j.readable)==="object"){let U0=j!==null&&j!==void 0&&j.readable?K(j===null||j===void 0?void 0:j.readable)?j===null||j===void 0?void 0:j.readable:E(j.readable):void 0,z0=j!==null&&j!==void 0&&j.writable?H(j===null||j===void 0?void 0:j.writable)?j===null||j===void 0?void 0:j.writable:E(j.writable):void 0;return A({readable:U0,writable:z0})}let h0=j===null||j===void 0?void 0:j.then;if(typeof h0==="function"){let U0;return k(h0,j,(z0)=>{if(z0!=null)U0.push(z0);U0.push(null)},(z0)=>{x(U0,z0)}),U0=new u({objectMode:!0,writable:!1,read(){}})}throw new m(n,["Blob","ReadableStream","WritableStream","Stream","Iterable","AsyncIterable","Function","{ readable, writable } pair","Promise"],j)};function W(E){let{promise:j,resolve:n}=_(),h0=new a,U0=h0.signal;return{value:E(async function*(){while(!0){let z0=j;j=null;let{chunk:f,done:Q0,cb:z}=await z0;if(w.nextTick(z),Q0)return;if(U0.aborted)throw new r(void 0,{cause:U0.reason});({promise:j,resolve:n}=_()),yield f}}(),{signal:U0}),write(z0,f,Q0){let z=n;n=null,z({chunk:z0,done:!1,cb:Q0})},final(z0){let f=n;n=null,f({done:!0,cb:z0})},destroy(z0,f){h0.abort(),f(z0)}}}function A(E){let j=E.readable&&typeof E.readable.read!=="function"?C.wrap(E.readable):E.readable,n=E.writable,h0=!!Q(j),U0=!!X(n),z0,f,Q0,z,c;function e(R){let w0=z;if(z=null,w0)w0(R);else if(R)c.destroy(R)}if(c=new u({readableObjectMode:!!(j!==null&&j!==void 0&&j.readableObjectMode),writableObjectMode:!!(n!==null&&n!==void 0&&n.writableObjectMode),readable:h0,writable:U0}),U0)O(n,(R)=>{if(U0=!1,R)x(j,R);e(R)}),c._write=function(R,w0,J0){if(n.write(R,w0))J0();else z0=J0},c._final=function(R){n.end(),f=R},n.on("drain",function(){if(z0){let R=z0;z0=null,R()}}),n.on("finish",function(){if(f){let R=f;f=null,R()}});if(h0)O(j,(R)=>{if(h0=!1,R)x(j,R);e(R)}),j.on("readable",function(){if(Q0){let R=Q0;Q0=null,R()}}),j.on("end",function(){c.push(null)}),c._read=function(){while(!0){let R=j.read();if(R===null){Q0=c._read;return}if(!c.push(R))return}};return c._destroy=function(R,w0){if(!R&&z!==null)R=new r;if(Q0=null,z0=null,f=null,z===null)w0(R);else z=w0,x(n,R),x(j,R)},c}}),l0=I0((h,B)=>{var{ObjectDefineProperties:w,ObjectGetOwnPropertyDescriptor:U,ObjectKeys:Q,ObjectSetPrototypeOf:X}=W0();B.exports=K;var J=k2(),Y=w1();X(K.prototype,J.prototype),X(K,J);{let D=Q(Y.prototype);for(let O=0;O<D.length;O++){let r=D[O];if(!K.prototype[r])K.prototype[r]=Y.prototype[r]}}function K(D){if(!(this instanceof K))return new K(D);if(J.call(this,D),Y.call(this,D),D){if(this.allowHalfOpen=D.allowHalfOpen!==!1,D.readable===!1)this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0;if(D.writable===!1)this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0}else this.allowHalfOpen=!0}w(K.prototype,{writable:{__proto__:null,...U(Y.prototype,"writable")},writableHighWaterMark:{__proto__:null,...U(Y.prototype,"writableHighWaterMark")},writableObjectMode:{__proto__:null,...U(Y.prototype,"writableObjectMode")},writableBuffer:{__proto__:null,...U(Y.prototype,"writableBuffer")},writableLength:{__proto__:null,...U(Y.prototype,"writableLength")},writableFinished:{__proto__:null,...U(Y.prototype,"writableFinished")},writableCorked:{__proto__:null,...U(Y.prototype,"writableCorked")},writableEnded:{__proto__:null,...U(Y.prototype,"writableEnded")},writableNeedDrain:{__proto__:null,...U(Y.prototype,"writableNeedDrain")},destroyed:{__proto__:null,get(){if(this._readableState===void 0||this._writableState===void 0)return!1;return this._readableState.destroyed&&this._writableState.destroyed},set(D){if(this._readableState&&this._writableState)this._readableState.destroyed=D,this._writableState.destroyed=D}}});var H;function G(){if(H===void 0)H={};return H}K.fromWeb=function(D,O){return G().newStreamDuplexFromReadableWritablePair(D,O)},K.toWeb=function(D){return G().newReadableWritablePairFromDuplex(D)};var N;K.from=function(D){if(!N)N=r8();return N(D,"body")}}),N6=I0((h,B)=>{var{ObjectSetPrototypeOf:w,Symbol:U}=W0();B.exports=K;var{ERR_METHOD_NOT_IMPLEMENTED:Q}=L0().codes,X=l0(),{getHighWaterMark:J}=R2();w(K.prototype,X.prototype),w(K,X);var Y=U("kCallback");function K(N){if(!(this instanceof K))return new K(N);let D=N?J(this,N,"readableHighWaterMark",!0):null;if(D===0)N={...N,highWaterMark:null,readableHighWaterMark:D,writableHighWaterMark:N.writableHighWaterMark||0};if(X.call(this,N),this._readableState.sync=!1,this[Y]=null,N){if(typeof N.transform==="function")this._transform=N.transform;if(typeof N.flush==="function")this._flush=N.flush}this.on("prefinish",G)}function H(N){if(typeof this._flush==="function"&&!this.destroyed)this._flush((D,O)=>{if(D){if(N)N(D);else this.destroy(D);return}if(O!=null)this.push(O);if(this.push(null),N)N()});else if(this.push(null),N)N()}function G(){if(this._final!==H)H.call(this)}K.prototype._final=H,K.prototype._transform=function(N,D,O){throw new Q("_transform()")},K.prototype._write=function(N,D,O){let r=this._readableState,m=this._writableState,L=r.length;this._transform(N,D,(x,q)=>{if(x){O(x);return}if(q!=null)this.push(q);if(m.ended||L===r.length||r.length<r.highWaterMark)O();else this[Y]=O})},K.prototype._read=function(){if(this[Y]){let N=this[Y];this[Y]=null,N()}}}),W6=I0((h,B)=>{var{ObjectSetPrototypeOf:w}=W0();B.exports=Q;var U=N6();w(Q.prototype,U.prototype),w(Q,U);function Q(X){if(!(this instanceof Q))return new Q(X);U.call(this,X)}Q.prototype._transform=function(X,J,Y){Y(null,X)}}),U1=I0((h,B)=>{var w=Z2(),{ArrayIsArray:U,Promise:Q,SymbolAsyncIterator:X,SymbolDispose:J}=W0(),Y=s0(),{once:K}=E0(),H=z2(),G=l0(),{aggregateTwoErrors:N,codes:{ERR_INVALID_ARG_TYPE:D,ERR_INVALID_RETURN_VALUE:O,ERR_MISSING_ARGS:r,ERR_STREAM_DESTROYED:m,ERR_STREAM_PREMATURE_CLOSE:L},AbortError:x}=L0(),{validateFunction:q,validateAbortSignal:C}=M2(),{isIterable:M,isReadable:_,isReadableNodeStream:d,isNodeStream:Z0,isTransformStream:q0,isWebStream:a,isReadableStream:k,isReadableFinished:u}=m0(),W=globalThis.AbortController||j2().AbortController,A,E,j;function n(R,w0,J0){let H0=!1;R.on("close",()=>{H0=!0});let Y0=Y(R,{readable:w0,writable:J0},(S)=>{H0=!S});return{destroy:(S)=>{if(H0)return;H0=!0,H.destroyer(R,S||new m("pipe"))},cleanup:Y0}}function h0(R){return q(R[R.length-1],"streams[stream.length - 1]"),R.pop()}function U0(R){if(M(R))return R;else if(d(R))return z0(R);throw new D("val",["Readable","Iterable","AsyncIterable"],R)}async function*z0(R){if(!E)E=k2();yield*E.prototype[X].call(R)}async function f(R,w0,J0,{end:H0}){let Y0,S=null,y=(K0)=>{if(K0)Y0=K0;if(S){let I=S;S=null,I()}},i=()=>new Q((K0,I)=>{if(Y0)I(Y0);else S=()=>{if(Y0)I(Y0);else K0()}});w0.on("drain",y);let F0=Y(w0,{readable:!1},y);try{if(w0.writableNeedDrain)await i();for await(let K0 of R)if(!w0.write(K0))await i();if(H0)w0.end(),await i();J0()}catch(K0){J0(Y0!==K0?N(Y0,K0):K0)}finally{F0(),w0.off("drain",y)}}async function Q0(R,w0,J0,{end:H0}){if(q0(w0))w0=w0.writable;let Y0=w0.getWriter();try{for await(let S of R)await Y0.ready,Y0.write(S).catch(()=>{});if(await Y0.ready,H0)await Y0.close();J0()}catch(S){try{await Y0.abort(S),J0(S)}catch(y){J0(y)}}}function z(...R){return c(R,K(h0(R)))}function c(R,w0,J0){if(R.length===1&&U(R[0]))R=R[0];if(R.length<2)throw new r("streams");let H0=new W,Y0=H0.signal,S=J0===null||J0===void 0?void 0:J0.signal,y=[];C(S,"options.signal");function i(){o(new x)}j=j||E0().addAbortListener;let F0;if(S)F0=j(S,i);let K0,I,V=[],T=0;function p(g){o(g,--T===0)}function o(g,X0){var $0;if(g&&(!K0||K0.code==="ERR_STREAM_PREMATURE_CLOSE"))K0=g;if(!K0&&!X0)return;while(V.length)V.shift()(K0);if(($0=F0)===null||$0===void 0||$0[J](),H0.abort(),X0){if(!K0)y.forEach((P0)=>P0());w.nextTick(w0,K0,I)}}let l;for(let g=0;g<R.length;g++){let X0=R[g],$0=g<R.length-1,P0=g>0,T0=$0||(J0===null||J0===void 0?void 0:J0.end)!==!1,e0=g===R.length-1;if(Z0(X0)){let M0=function(D0){if(D0&&D0.name!=="AbortError"&&D0.code!=="ERR_STREAM_PREMATURE_CLOSE")p(D0)};var $=M0;if(T0){let{destroy:D0,cleanup:F2}=n(X0,$0,P0);if(V.push(D0),_(X0)&&e0)y.push(F2)}if(X0.on("error",M0),_(X0)&&e0)y.push(()=>{X0.removeListener("error",M0)})}if(g===0)if(typeof X0==="function"){if(l=X0({signal:Y0}),!M(l))throw new O("Iterable, AsyncIterable or Stream","source",l)}else if(M(X0)||d(X0)||q0(X0))l=X0;else l=G.from(X0);else if(typeof X0==="function"){if(q0(l)){var v;l=U0((v=l)===null||v===void 0?void 0:v.readable)}else l=U0(l);if(l=X0(l,{signal:Y0}),$0){if(!M(l,!0))throw new O("AsyncIterable",`transform[${g-1}]`,l)}else{var s;if(!A)A=W6();let M0=new A({objectMode:!0}),D0=(s=l)===null||s===void 0?void 0:s.then;if(typeof D0==="function")T++,D0.call(l,(y0)=>{if(I=y0,y0!=null)M0.write(y0);if(T0)M0.end();w.nextTick(p)},(y0)=>{M0.destroy(y0),w.nextTick(p,y0)});else if(M(l,!0))T++,f(l,M0,p,{end:T0});else if(k(l)||q0(l)){let y0=l.readable||l;T++,f(y0,M0,p,{end:T0})}else throw new O("AsyncIterable or Promise","destination",l);l=M0;let{destroy:F2,cleanup:q2}=n(l,!1,!0);if(V.push(F2),e0)y.push(q2)}}else if(Z0(X0)){if(d(l)){T+=2;let M0=e(l,X0,p,{end:T0});if(_(X0)&&e0)y.push(M0)}else if(q0(l)||k(l)){let M0=l.readable||l;T++,f(M0,X0,p,{end:T0})}else if(M(l))T++,f(l,X0,p,{end:T0});else throw new D("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],l);l=X0}else if(a(X0)){if(d(l))T++,Q0(U0(l),X0,p,{end:T0});else if(k(l)||M(l))T++,Q0(l,X0,p,{end:T0});else if(q0(l))T++,Q0(l.readable,X0,p,{end:T0});else throw new D("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],l);l=X0}else l=G.from(X0)}if(Y0!==null&&Y0!==void 0&&Y0.aborted||S!==null&&S!==void 0&&S.aborted)w.nextTick(i);return l}function e(R,w0,J0,{end:H0}){let Y0=!1;if(w0.on("close",()=>{if(!Y0)J0(new L)}),R.pipe(w0,{end:!1}),H0){let y=function(){Y0=!0,w0.end()};var S=y;if(u(R))w.nextTick(y);else R.once("end",y)}else J0();return Y(R,{readable:!0,writable:!1},(y)=>{let i=R._readableState;if(y&&y.code==="ERR_STREAM_PREMATURE_CLOSE"&&i&&i.ended&&!i.errored&&!i.errorEmitted)R.once("end",J0).once("error",J0);else J0(y)}),Y(w0,{readable:!1,writable:!0},J0)}B.exports={pipelineImpl:c,pipeline:z}}),C6=I0((h,B)=>{var{pipeline:w}=U1(),U=l0(),{destroyer:Q}=z2(),{isNodeStream:X,isReadable:J,isWritable:Y,isWebStream:K,isTransformStream:H,isWritableStream:G,isReadableStream:N}=m0(),{AbortError:D,codes:{ERR_INVALID_ARG_VALUE:O,ERR_MISSING_ARGS:r}}=L0(),m=s0();B.exports=function(...L){if(L.length===0)throw new r("streams");if(L.length===1)return U.from(L[0]);let x=[...L];if(typeof L[0]==="function")L[0]=U.from(L[0]);if(typeof L[L.length-1]==="function"){let W=L.length-1;L[W]=U.from(L[W])}for(let W=0;W<L.length;++W){if(!X(L[W])&&!K(L[W]))continue;if(W<L.length-1&&!(J(L[W])||N(L[W])||H(L[W])))throw new O(`streams[${W}]`,x[W],"must be readable");if(W>0&&!(Y(L[W])||G(L[W])||H(L[W])))throw new O(`streams[${W}]`,x[W],"must be writable")}let q,C,M,_,d;function Z0(W){let A=_;if(_=null,A)A(W);else if(W)d.destroy(W);else if(!u&&!k)d.destroy()}let q0=L[0],a=w(L,Z0),k=!!(Y(q0)||G(q0)||H(q0)),u=!!(J(a)||N(a)||H(a));if(d=new U({writableObjectMode:!!(q0!==null&&q0!==void 0&&q0.writableObjectMode),readableObjectMode:!!(a!==null&&a!==void 0&&a.readableObjectMode),writable:k,readable:u}),k){if(X(q0))d._write=function(A,E,j){if(q0.write(A,E))j();else q=j},d._final=function(A){q0.end(),C=A},q0.on("drain",function(){if(q){let A=q;q=null,A()}});else if(K(q0)){let A=(H(q0)?q0.writable:q0).getWriter();d._write=async function(E,j,n){try{await A.ready,A.write(E).catch(()=>{}),n()}catch(h0){n(h0)}},d._final=async function(E){try{await A.ready,A.close().catch(()=>{}),C=E}catch(j){E(j)}}}let W=H(a)?a.readable:a;m(W,()=>{if(C){let A=C;C=null,A()}})}if(u){if(X(a))a.on("readable",function(){if(M){let W=M;M=null,W()}}),a.on("end",function(){d.push(null)}),d._read=function(){while(!0){let W=a.read();if(W===null){M=d._read;return}if(!d.push(W))return}};else if(K(a)){let W=(H(a)?a.readable:a).getReader();d._read=async function(){while(!0)try{let{value:A,done:E}=await W.read();if(!d.push(A))return;if(E){d.push(null);return}}catch{return}}}}return d._destroy=function(W,A){if(!W&&_!==null)W=new D;if(M=null,q=null,C=null,_===null)A(W);else if(_=A,X(a))Q(a,W)},d}}),a8=I0((h,B)=>{var w=globalThis.AbortController||j2().AbortController,{codes:{ERR_INVALID_ARG_VALUE:U,ERR_INVALID_ARG_TYPE:Q,ERR_MISSING_ARGS:X,ERR_OUT_OF_RANGE:J},AbortError:Y}=L0(),{validateAbortSignal:K,validateInteger:H,validateObject:G}=M2(),N=W0().Symbol("kWeak"),D=W0().Symbol("kResistStopPropagation"),{finished:O}=s0(),r=C6(),{addAbortSignalNoValidate:m}=_2(),{isWritable:L,isNodeStream:x}=m0(),{deprecate:q}=E0(),{ArrayPrototypePush:C,Boolean:M,MathFloor:_,Number:d,NumberIsNaN:Z0,Promise:q0,PromiseReject:a,PromiseResolve:k,PromisePrototypeThen:u,Symbol:W}=W0(),A=W("kEmpty"),E=W("kEof");function j(S,y){if(y!=null)G(y,"options");if((y===null||y===void 0?void 0:y.signal)!=null)K(y.signal,"options.signal");if(x(S)&&!L(S))throw new U("stream",S,"must be writable");let i=r(this,S);if(y!==null&&y!==void 0&&y.signal)m(y.signal,i);return i}function n(S,y){if(typeof S!=="function")throw new Q("fn",["Function","AsyncFunction"],S);if(y!=null)G(y,"options");if((y===null||y===void 0?void 0:y.signal)!=null)K(y.signal,"options.signal");let i=1;if((y===null||y===void 0?void 0:y.concurrency)!=null)i=_(y.concurrency);let F0=i-1;if((y===null||y===void 0?void 0:y.highWaterMark)!=null)F0=_(y.highWaterMark);return H(i,"options.concurrency",1),H(F0,"options.highWaterMark",0),F0+=i,async function*(){let K0=E0().AbortSignalAny([y===null||y===void 0?void 0:y.signal].filter(M)),I=this,V=[],T={signal:K0},p,o,l=!1,$=0;function v(){l=!0,s()}function s(){$-=1,g()}function g(){if(o&&!l&&$<i&&V.length<F0)o(),o=null}async function X0(){try{for await(let $0 of I){if(l)return;if(K0.aborted)throw new Y;try{if($0=S($0,T),$0===A)continue;$0=k($0)}catch(P0){$0=a(P0)}if($+=1,u($0,s,v),V.push($0),p)p(),p=null;if(!l&&(V.length>=F0||$>=i))await new q0((P0)=>{o=P0})}V.push(E)}catch($0){let P0=a($0);u(P0,s,v),V.push(P0)}finally{if(l=!0,p)p(),p=null}}X0();try{while(!0){while(V.length>0){let $0=await V[0];if($0===E)return;if(K0.aborted)throw new Y;if($0!==A)yield $0;V.shift(),g()}await new q0(($0)=>{p=$0})}}finally{if(l=!0,o)o(),o=null}}.call(this)}function h0(S=void 0){if(S!=null)G(S,"options");if((S===null||S===void 0?void 0:S.signal)!=null)K(S.signal,"options.signal");return async function*(){let y=0;for await(let F0 of this){var i;if(S!==null&&S!==void 0&&(i=S.signal)!==null&&i!==void 0&&i.aborted)throw new Y({cause:S.signal.reason});yield[y++,F0]}}.call(this)}async function U0(S,y=void 0){for await(let i of z.call(this,S,y))return!0;return!1}async function z0(S,y=void 0){if(typeof S!=="function")throw new Q("fn",["Function","AsyncFunction"],S);return!await U0.call(this,async(...i)=>{return!await S(...i)},y)}async function f(S,y){for await(let i of z.call(this,S,y))return i;return}async function Q0(S,y){if(typeof S!=="function")throw new Q("fn",["Function","AsyncFunction"],S);async function i(F0,K0){return await S(F0,K0),A}for await(let F0 of n.call(this,i,y));}function z(S,y){if(typeof S!=="function")throw new Q("fn",["Function","AsyncFunction"],S);async function i(F0,K0){if(await S(F0,K0))return F0;return A}return n.call(this,i,y)}class c extends X{constructor(){super("reduce");this.message="Reduce of an empty stream requires an initial value"}}async function e(S,y,i){var F0;if(typeof S!=="function")throw new Q("reducer",["Function","AsyncFunction"],S);if(i!=null)G(i,"options");if((i===null||i===void 0?void 0:i.signal)!=null)K(i.signal,"options.signal");let K0=arguments.length>1;if(i!==null&&i!==void 0&&(F0=i.signal)!==null&&F0!==void 0&&F0.aborted){let o=new Y(void 0,{cause:i.signal.reason});throw this.once("error",()=>{}),await O(this.destroy(o)),o}let I=new w,V=I.signal;if(i!==null&&i!==void 0&&i.signal){let o={once:!0,[N]:this,[D]:!0};i.signal.addEventListener("abort",()=>I.abort(),o)}let T=!1;try{for await(let o of this){var p;if(T=!0,i!==null&&i!==void 0&&(p=i.signal)!==null&&p!==void 0&&p.aborted)throw new Y;if(!K0)y=o,K0=!0;else y=await S(y,o,{signal:V})}if(!T&&!K0)throw new c}finally{I.abort()}return y}async function R(S){if(S!=null)G(S,"options");if((S===null||S===void 0?void 0:S.signal)!=null)K(S.signal,"options.signal");let y=[];for await(let F0 of this){var i;if(S!==null&&S!==void 0&&(i=S.signal)!==null&&i!==void 0&&i.aborted)throw new Y(void 0,{cause:S.signal.reason});C(y,F0)}return y}function w0(S,y){let i=n.call(this,S,y);return async function*(){for await(let F0 of i)yield*F0}.call(this)}function J0(S){if(S=d(S),Z0(S))return 0;if(S<0)throw new J("number",">= 0",S);return S}function H0(S,y=void 0){if(y!=null)G(y,"options");if((y===null||y===void 0?void 0:y.signal)!=null)K(y.signal,"options.signal");return S=J0(S),async function*(){var i;if(y!==null&&y!==void 0&&(i=y.signal)!==null&&i!==void 0&&i.aborted)throw new Y;for await(let K0 of this){var F0;if(y!==null&&y!==void 0&&(F0=y.signal)!==null&&F0!==void 0&&F0.aborted)throw new Y;if(S--<=0)yield K0}}.call(this)}function Y0(S,y=void 0){if(y!=null)G(y,"options");if((y===null||y===void 0?void 0:y.signal)!=null)K(y.signal,"options.signal");return S=J0(S),async function*(){var i;if(y!==null&&y!==void 0&&(i=y.signal)!==null&&i!==void 0&&i.aborted)throw new Y;for await(let K0 of this){var F0;if(y!==null&&y!==void 0&&(F0=y.signal)!==null&&F0!==void 0&&F0.aborted)throw new Y;if(S-- >0)yield K0;if(S<=0)return}}.call(this)}B.exports.streamReturningOperators={asIndexedPairs:q(h0,"readable.asIndexedPairs will be removed in a future version."),drop:H0,filter:z,flatMap:w0,map:n,take:Y0,compose:j},B.exports.promiseReturningOperators={every:z0,forEach:Q0,reduce:e,toArray:R,some:U0,find:f}}),V6=I0((h,B)=>{var{ArrayPrototypePop:w,Promise:U}=W0(),{isIterable:Q,isNodeStream:X,isWebStream:J}=m0(),{pipelineImpl:Y}=U1(),{finished:K}=s0();j6();function H(...G){return new U((N,D)=>{let O,r,m=G[G.length-1];if(m&&typeof m==="object"&&!X(m)&&!Q(m)&&!J(m)){let L=w(G);O=L.signal,r=L.end}Y(G,(L,x)=>{if(L)D(L);else N(x)},{signal:O,end:r})})}B.exports={finished:K,pipeline:H}}),j6=I0((h,B)=>{var{Buffer:w}=(i0(),R0(d0)),{ObjectDefineProperty:U,ObjectKeys:Q,ReflectApply:X}=W0(),{promisify:{custom:J}}=E0(),{streamReturningOperators:Y,promiseReturningOperators:K}=a8(),{codes:{ERR_ILLEGAL_CONSTRUCTOR:H}}=L0(),G=C6(),{setDefaultHighWaterMark:N,getDefaultHighWaterMark:D}=R2(),{pipeline:O}=U1(),{destroyer:r}=z2(),m=s0(),L=V6(),x=m0(),q=B.exports=B1().Stream;q.isDestroyed=x.isDestroyed,q.isDisturbed=x.isDisturbed,q.isErrored=x.isErrored,q.isReadable=x.isReadable,q.isWritable=x.isWritable,q.Readable=k2();for(let M of Q(Y)){let _=function(...Z0){if(new.target)throw H();return q.Readable.from(X(d,this,Z0))},d=Y[M];U(_,"name",{__proto__:null,value:d.name}),U(_,"length",{__proto__:null,value:d.length}),U(q.Readable.prototype,M,{__proto__:null,value:_,enumerable:!1,configurable:!0,writable:!0})}for(let M of Q(K)){let _=function(...Z0){if(new.target)throw H();return X(d,this,Z0)},d=K[M];U(_,"name",{__proto__:null,value:d.name}),U(_,"length",{__proto__:null,value:d.length}),U(q.Readable.prototype,M,{__proto__:null,value:_,enumerable:!1,configurable:!0,writable:!0})}q.Writable=w1(),q.Duplex=l0(),q.Transform=N6(),q.PassThrough=W6(),q.pipeline=O;var{addAbortSignal:C}=_2();q.addAbortSignal=C,q.finished=m,q.destroy=r,q.compose=G,q.setDefaultHighWaterMark=N,q.getDefaultHighWaterMark=D,U(q,"promises",{__proto__:null,configurable:!0,enumerable:!0,get(){return L}}),U(O,J,{__proto__:null,enumerable:!0,get(){return L.pipeline}}),U(m,J,{__proto__:null,enumerable:!0,get(){return L.finished}}),q.Stream=q,q._isUint8Array=function(M){return M instanceof Uint8Array},q._uint8ArrayToBuffer=function(M){return w.from(M.buffer,M.byteOffset,M.byteLength)}}),s8=I0((h,B)=>{var w=Q1();{let U=j6(),Q=V6(),X=U.Readable.destroy;B.exports=U.Readable,B.exports._uint8ArrayToBuffer=U._uint8ArrayToBuffer,B.exports._isUint8Array=U._isUint8Array,B.exports.isDisturbed=U.isDisturbed,B.exports.isErrored=U.isErrored,B.exports.isReadable=U.isReadable,B.exports.Readable=U.Readable,B.exports.Writable=U.Writable,B.exports.Duplex=U.Duplex,B.exports.Transform=U.Transform,B.exports.PassThrough=U.PassThrough,B.exports.addAbortSignal=U.addAbortSignal,B.exports.finished=U.finished,B.exports.destroy=U.destroy,B.exports.destroy=X,B.exports.pipeline=U.pipeline,B.exports.compose=U.compose,Object.defineProperty(U,"promises",{configurable:!0,enumerable:!0,get(){return Q}}),B.exports.Stream=U.Stream}B.exports.default=B.exports});M6.exports=s8()});import{logger as C0,ModelType as V0}from"@elizaos/core";import{logger as c0}from"@elizaos/core";import{logger as $2}from"@elizaos/core";function N0(h,B,w){let U=h.getSetting(B);if(U!==void 0&&U!==null)return String(U);return process.env[B]??w}function n0(){return typeof globalThis<"u"&&typeof globalThis.document<"u"}function D1(h){return n0()&&!!N0(h,"ELIZAOS_CLOUD_BROWSER_BASE_URL")}function f0(h,B=!1){if(n0())return{};let w=B?d6(h):o0(h);return w?{Authorization:`Bearer ${w}`}:{}}function k0(h){let B=N0(h,"ELIZAOS_CLOUD_BROWSER_BASE_URL");return n0()&&B?B:N0(h,"ELIZAOS_CLOUD_BASE_URL","https://www.elizacloud.ai/api/v1")}function x1(h){let B=n0()?N0(h,"ELIZAOS_CLOUD_BROWSER_EMBEDDING_URL")||N0(h,"ELIZAOS_CLOUD_BROWSER_BASE_URL"):N0(h,"ELIZAOS_CLOUD_EMBEDDING_URL");if(B)return $2.debug(`[ELIZAOS_CLOUD] Using specific embedding base URL: ${B}`),B;return $2.debug("[ELIZAOS_CLOUD] Falling back to general base URL for embeddings."),k0(h)}function o0(h){return N0(h,"ELIZAOS_CLOUD_API_KEY")}function d6(h){let B=N0(h,"ELIZAOS_CLOUD_EMBEDDING_API_KEY");if(B)return $2.debug("[ELIZAOS_CLOUD] Using specific embedding API key (present)"),B;return $2.debug("[ELIZAOS_CLOUD] Falling back to general API key for embeddings."),o0(h)}function A2(h){return N0(h,"ELIZAOS_CLOUD_SMALL_MODEL")??N0(h,"SMALL_MODEL","gpt-4o-mini")}function O2(h){return N0(h,"ELIZAOS_CLOUD_LARGE_MODEL")??N0(h,"LARGE_MODEL","gpt-4o")}function E1(h){return N0(h,"ELIZAOS_CLOUD_IMAGE_DESCRIPTION_MODEL","gpt-4o-mini")??"gpt-4o-mini"}function P1(h){return N0(h,"ELIZAOS_CLOUD_IMAGE_GENERATION_MODEL","google/gemini-2.5-flash-image")??"google/gemini-2.5-flash-image"}function T1(h){let B=N0(h,"ELIZAOS_CLOUD_EXPERIMENTAL_TELEMETRY","false"),w=String(B).toLowerCase(),U=w==="true";return $2.debug(`[ELIZAOS_CLOUD] Experimental telemetry in function: "${B}" (type: ${typeof B}, normalized: "${w}", result: ${U})`),U}function _1(h,B){new Promise(async(w)=>{w();try{if(!o0(B)&&!n0()){c0.warn("ELIZAOS_CLOUD_API_KEY is not set in environment - ElizaOS Cloud functionality will be limited"),c0.info("Get your API key from https://www.elizacloud.ai/dashboard/api-keys");return}try{let U=k0(B),Q=await fetch(`${U}/models`,{headers:{...f0(B)}});if(!Q.ok)c0.warn(`ElizaOS Cloud API key validation failed: ${Q.statusText}`),c0.warn("ElizaOS Cloud functionality will be limited until a valid API key is provided"),c0.info("Get your API key from https://www.elizacloud.ai/dashboard/api-keys");else c0.log("ElizaOS Cloud API key validated successfully")}catch(U){let Q=U instanceof Error?U.message:String(U);c0.warn(`Error validating ElizaOS Cloud API key: ${Q}`),c0.warn("ElizaOS Cloud functionality will be limited until a valid API key is provided")}}catch(U){let Q=U?.errors?.map((X)=>X.message).join(", ")||(U instanceof Error?U.message:String(U));c0.warn(`ElizaOS Cloud plugin configuration issue: ${Q} - You need to configure the ELIZAOS_CLOUD_API_KEY in your environment variables`),c0.info("Get your API key from https://www.elizacloud.ai/dashboard/api-keys")}})}import{logger as D2,ModelType as x2}from"@elizaos/core";import{generateText as m6,streamText as n6}from"ai";import{createOpenAI as i6}from"@ai-sdk/openai";function L2(h){let B=k0(h),w=o0(h)??(D1(h)?"eliza-proxy":void 0);return i6({apiKey:w??"",baseURL:B})}import{EventType as l6}from"@elizaos/core";function b0(h,B,w,U){let Q=typeof w==="string"?w.length>200?`${w.slice(0,200)}…`:w:"",X=Number(U.inputTokens||0),J=Number(U.outputTokens||0),Y=Number(U.totalTokens!=null?U.totalTokens:X+J);h.emitEvent(l6.MODEL_USED,{runtime:h,source:"elizacloud",provider:"elizacloud",type:B,prompt:Q,tokens:{prompt:X,completion:J,total:Y}})}function o6(h,B,w){let{prompt:U,stopSequences:Q=[]}=w,X=w.temperature??0.7,J=w.frequencyPenalty??0.7,Y=w.presencePenalty??0.7,K=w.maxOutputTokens??w.maxTokens??8192,H=L2(h),G=B===x2.TEXT_SMALL?A2(h):O2(h),N=B===x2.TEXT_SMALL?"TEXT_SMALL":"TEXT_LARGE",D=T1(h);return{generateParams:{model:H.languageModel(G),prompt:U,system:h.character.system??void 0,temperature:X,maxOutputTokens:K,frequencyPenalty:J,presencePenalty:Y,stopSequences:Q,experimental_telemetry:{isEnabled:D}},modelName:G,modelLabel:N,prompt:U}}function r6(h,B,w,U,Q){D2.debug(`[ELIZAOS_CLOUD] Streaming text with ${Q} model`);let X=n6(w);return{textStream:X.textStream,text:X.text,usage:X.usage.then((J)=>{if(J){b0(h,B,U,J);let Y=J.inputTokens??0,K=J.outputTokens??0;return{promptTokens:Y,completionTokens:K,totalTokens:Y+K}}return}),finishReason:X.finishReason}}async function R1(h,B,w){let{generateParams:U,modelName:Q,modelLabel:X,prompt:J}=o6(h,B,w);if(D2.debug(`[ELIZAOS_CLOUD] Generating text with ${X} model: ${Q}`),w.stream)return r6(h,B,U,J,X);D2.log(`[ELIZAOS_CLOUD] Using ${X} model: ${Q}`),D2.log(J);let Y=await m6(U);if(Y.usage)b0(h,B,J,Y.usage);return Y.text}async function b2(h,B){return R1(h,x2.TEXT_SMALL,B)}async function p2(h,B){return R1(h,x2.TEXT_LARGE,B)}import{logger as J2,ModelType as D6}from"@elizaos/core";import{generateObject as e8,JSONParseError as h4}from"ai";import{logger as A6}from"@elizaos/core";import{JSONParseError as t8}from"ai";function X1(){return async({text:h,error:B})=>{try{if(B instanceof t8){let w=h.replace(/```json\n|\n```|```/g,"");return JSON.parse(w),w}return null}catch(w){let U=w instanceof Error?w.message:String(w);return A6.warn(`Failed to repair JSON text: ${U}`),null}}}async function O6(h){try{let{Readable:B}=await Promise.resolve().then(() => b6(Q1(),1)),w=h.getReader();return new B({async read(){try{let{done:U,value:Q}=await w.read();if(U)this.push(null);else this.push(Q)}catch(U){this.destroy(U)}},destroy(U,Q){w.cancel().finally(()=>Q(U))}})}catch(B){let w=B instanceof Error?B.message:String(B);throw A6.error(`Failed to load node:stream module: ${w}`),Error("Cannot convert stream: node:stream module unavailable. This feature requires a Node.js environment.")}}function L6(h){let w=h.match(/title[:\s]+(.+?)(?:\n|$)/i)?.[1]?.trim()||"Image Analysis",U=h.replace(/title[:\s]+(.+?)(?:\n|$)/i,"").trim();return{title:w,description:U}}async function x6(h,B,w,U){let Q=L2(h),X=U(h);J2.log(`[ELIZAOS_CLOUD] Using ${w} model: ${X}`);let J=B.temperature??0;if(!!B.schema)J2.info(`Using ${w} without schema validation (schema provided but output=no-schema)`);try{let{object:K,usage:H}=await e8({model:Q.languageModel(X),output:"no-schema",prompt:B.prompt,temperature:J,experimental_repairText:X1()});if(H)b0(h,w,B.prompt,H);return K}catch(K){if(K instanceof h4){J2.error(`[generateObject] Failed to parse JSON: ${K.message}`);let G=await X1()({text:K.text,error:K});if(G)try{let N=JSON.parse(G);return J2.info("[generateObject] Successfully repaired JSON."),N}catch(N){let D=N instanceof Error?N.message:String(N);throw J2.error(`[generateObject] Failed to parse repaired JSON: ${D}`),N}else throw J2.error("[generateObject] JSON repair failed."),K}else{let H=K instanceof Error?K.message:String(K);throw J2.error(`[generateObject] Unknown error: ${H}`),K}}}async function Z1(h,B){return x6(h,B,D6.OBJECT_SMALL,A2)}async function J1(h,B){return x6(h,B,D6.OBJECT_LARGE,O2)}import{logger as O0,ModelType as B4,VECTOR_DIMS as E6}from"@elizaos/core";var S2=100;function w4(h){return{remainingRequests:parseInt(h.headers.get("x-ratelimit-remaining-requests")||"",10)||void 0,remainingTokens:parseInt(h.headers.get("x-ratelimit-remaining-tokens")||"",10)||void 0,limitRequests:parseInt(h.headers.get("x-ratelimit-limit-requests")||"",10)||void 0,limitTokens:parseInt(h.headers.get("x-ratelimit-limit-tokens")||"",10)||void 0,resetRequests:h.headers.get("x-ratelimit-reset-requests")||void 0,resetTokens:h.headers.get("x-ratelimit-reset-tokens")||void 0,retryAfter:parseInt(h.headers.get("retry-after")||"",10)||void 0}}function P6(h){let B=N0(h,"ELIZAOS_CLOUD_EMBEDDING_MODEL","text-embedding-3-small"),w=Number.parseInt(N0(h,"ELIZAOS_CLOUD_EMBEDDING_DIMENSIONS","1536")||"1536",10);if(!Object.values(E6).includes(w)){let U=`Invalid embedding dimension: ${w}. Must be one of: ${Object.values(E6).join(", ")}`;throw O0.error(U),Error(U)}return{embeddingModelName:B,embeddingDimension:w}}function t0(h,B){let w=Array(h).fill(0);return w[0]=B,w}async function q1(h,B){let{embeddingDimension:w}=P6(h);if(B===null)return O0.debug("Creating test embedding for initialization"),t0(w,0.1);let U=B;if(typeof U==="object"&&"texts"in U&&Array.isArray(U.texts))return O0.debug(`[Embeddings] Batch mode: ${U.texts.length} texts`),await F1(h,U.texts);let Q;if(typeof B==="string")Q=B;else if(typeof B==="object"&&B.text)Q=B.text;else return O0.warn("Invalid input format for embedding"),t0(w,0.2);if(!Q.trim())return O0.warn("Empty text for embedding"),t0(w,0.3);return(await F1(h,[Q]))[0]}async function F1(h,B){let{embeddingModelName:w,embeddingDimension:U}=P6(h),Q=x1(h);if(!B||B.length===0)return O0.warn("[BatchEmbeddings] Empty texts array"),[];let X=[],J=Array(B.length);for(let Y=0;Y<B.length;Y++){let K=B[Y]?.trim();if(K)X.push({text:K,originalIndex:Y});else J[Y]=t0(U,0.3)}if(X.length===0)return O0.warn("[BatchEmbeddings] All texts were empty"),J;for(let Y=0;Y<X.length;Y+=S2){let K=Math.min(Y+S2,X.length),H=X.slice(Y,K),G=H.map((N)=>N.text);O0.info(`[BatchEmbeddings] Processing batch ${Math.floor(Y/S2)+1}/${Math.ceil(X.length/S2)}: ${H.length} texts`);try{let N=await fetch(`${Q}/embeddings`,{method:"POST",headers:{...f0(h,!0),"Content-Type":"application/json"},body:JSON.stringify({model:w,input:G})}),D=w4(N);if(D.remainingRequests!==void 0&&D.remainingRequests<50)O0.warn(`[BatchEmbeddings] Rate limit: ${D.remainingRequests}/${D.limitRequests} requests remaining`);if(N.status===429){let r=D.retryAfter||30;O0.warn(`[BatchEmbeddings] Rate limited, waiting ${r}s...`),await new Promise((x)=>setTimeout(x,r*1000));let m=await fetch(`${Q}/embeddings`,{method:"POST",headers:{...f0(h,!0),"Content-Type":"application/json"},body:JSON.stringify({model:w,input:G})});if(!m.ok){O0.error(`[BatchEmbeddings] Retry failed: ${m.status}`);for(let x of H)J[x.originalIndex]=t0(U,0.4);continue}let L=await m.json();if(L?.data){for(let x of L.data){let q=H[x.index].originalIndex;J[q]=x.embedding}O0.info(`[BatchEmbeddings] Retry successful for ${H.length} embeddings`)}continue}if(!N.ok){O0.error(`[BatchEmbeddings] API error: ${N.status} - ${N.statusText}`);for(let r of H)J[r.originalIndex]=t0(U,0.4);continue}let O=await N.json();if(!O?.data||!Array.isArray(O.data)){O0.error("[BatchEmbeddings] API returned invalid structure");for(let r of H)J[r.originalIndex]=t0(U,0.5);continue}for(let r of O.data){let m=H[r.index].originalIndex;J[m]=r.embedding}if(O.usage){let r={inputTokens:O.usage.prompt_tokens,outputTokens:0,totalTokens:O.usage.total_tokens};b0(h,B4.TEXT_EMBEDDING,`batch:${H.length}`,r)}O0.debug(`[BatchEmbeddings] Got ${H.length} embeddings (${U}d), remaining: ${D.remainingRequests??"unknown"}`)}catch(N){let D=N instanceof Error?N.message:String(N);O0.error(`[BatchEmbeddings] Error: ${D}`);for(let O of H)J[O.originalIndex]=t0(U,0.6)}}return J}import{logger as y2,ModelType as U4}from"@elizaos/core";async function K1(h,B){let w=B.count||1,U=B.size||"1024x1024",Q=B.prompt,X=P1(h);y2.log(`[ELIZAOS_CLOUD] Using IMAGE model: ${X}`);let J=k0(h),K={"1024x1024":"1:1","1792x1024":"16:9","1024x1792":"9:16"}[U]||"1:1";try{let H=`${J}/generate-image`,G={prompt:Q,numImages:w,aspectRatio:K,model:X},N=await fetch(H,{method:"POST",headers:{...f0(h),"Content-Type":"application/json"},body:JSON.stringify(G)});if(!N.ok){let m=await N.text();throw Error(`Failed to generate image: ${N.status} ${m}`)}return(await N.json()).images.map((m)=>({url:m.url||m.image}))}catch(H){let G=H instanceof Error?H.message:String(H);throw y2.error(`[ELIZAOS_CLOUD] Image generation error: ${G}`),H}}async function Y1(h,B){let w,U,Q=E1(h);y2.log(`[ELIZAOS_CLOUD] Using IMAGE_DESCRIPTION model: ${Q}`);let X=Number.parseInt(N0(h,"ELIZAOS_CLOUD_IMAGE_DESCRIPTION_MAX_TOKENS","8192")||"8192",10);if(typeof B==="string")w=B,U="Please analyze this image and provide a title and detailed description.";else w=B.imageUrl,U=B.prompt||"Please analyze this image and provide a title and detailed description.";let J=[{role:"user",content:[{type:"text",text:U},{type:"image_url",image_url:{url:w}}]}],Y=k0(h);try{let K={model:Q,messages:J,max_tokens:X},H=await fetch(`${Y}/chat/completions`,{method:"POST",headers:{"Content-Type":"application/json",...f0(h)},body:JSON.stringify(K)});if(!H.ok)throw Error(`ElizaOS Cloud API error: ${H.status}`);let N=await H.json(),D=N.choices?.[0]?.message?.content;if(N.usage)b0(h,U4.IMAGE_DESCRIPTION,typeof B==="string"?B:B.prompt||"",{inputTokens:N.usage.prompt_tokens,outputTokens:N.usage.completion_tokens,totalTokens:N.usage.total_tokens});if(!D)return{title:"Failed to analyze image",description:"No response from API"};return L6(D)}catch(K){let H=K instanceof Error?K.message:String(K);return y2.error(`Error analyzing image: ${H}`),{title:"Failed to analyze image",description:`Error: ${H}`}}}import{logger as m4}from"@elizaos/core";async function z1(h,B){let w=N0(h,"ELIZAOS_CLOUD_TTS_MODEL","gpt-4o-mini-tts"),U=N0(h,"ELIZAOS_CLOUD_TTS_VOICE","nova"),Q=N0(h,"ELIZAOS_CLOUD_TTS_INSTRUCTIONS",""),X=k0(h),J=B.model||w,Y=B.voice||U,K=B.instructions??Q,H=B.format||"mp3";try{let G=await fetch(`${X}/audio/speech`,{method:"POST",headers:{...f0(h),"Content-Type":"application/json",...H==="mp3"?{Accept:"audio/mpeg"}:{}},body:JSON.stringify({model:J,voice:Y,input:B.text,format:H,...K&&{instructions:K}})});if(!G.ok){let N=await G.text();throw Error(`ElizaOS Cloud TTS error ${G.status}: ${N}`)}if(!G.body)throw Error("ElizaOS Cloud TTS response body is null");if(!n0())return await O6(G.body);return G.body}catch(G){let N=G instanceof Error?G.message:String(G);throw Error(`Failed to fetch speech from ElizaOS Cloud TTS: ${N}`)}}var Q4={name:"elizaOSCloud",description:"ElizaOS Cloud plugin - Multi-model AI generation with text, image, and video support",config:{ELIZAOS_CLOUD_API_KEY:process.env.ELIZAOS_CLOUD_API_KEY,ELIZAOS_CLOUD_BASE_URL:process.env.ELIZAOS_CLOUD_BASE_URL,ELIZAOS_CLOUD_SMALL_MODEL:process.env.ELIZAOS_CLOUD_SMALL_MODEL,ELIZAOS_CLOUD_LARGE_MODEL:process.env.ELIZAOS_CLOUD_LARGE_MODEL,SMALL_MODEL:process.env.SMALL_MODEL,LARGE_MODEL:process.env.LARGE_MODEL,ELIZAOS_CLOUD_EMBEDDING_MODEL:process.env.ELIZAOS_CLOUD_EMBEDDING_MODEL,ELIZAOS_CLOUD_EMBEDDING_API_KEY:process.env.ELIZAOS_CLOUD_EMBEDDING_API_KEY,ELIZAOS_CLOUD_EMBEDDING_URL:process.env.ELIZAOS_CLOUD_EMBEDDING_URL,ELIZAOS_CLOUD_EMBEDDING_DIMENSIONS:process.env.ELIZAOS_CLOUD_EMBEDDING_DIMENSIONS,ELIZAOS_CLOUD_IMAGE_DESCRIPTION_MODEL:process.env.ELIZAOS_CLOUD_IMAGE_DESCRIPTION_MODEL,ELIZAOS_CLOUD_IMAGE_DESCRIPTION_MAX_TOKENS:process.env.ELIZAOS_CLOUD_IMAGE_DESCRIPTION_MAX_TOKENS,ELIZAOS_CLOUD_EXPERIMENTAL_TELEMETRY:process.env.ELIZAOS_CLOUD_EXPERIMENTAL_TELEMETRY,ELIZAOS_CLOUD_IMAGE_GENERATION_MODEL:process.env.ELIZAOS_CLOUD_IMAGE_GENERATION_MODEL},async init(h,B){_1(h,B)},models:{[V0.TEXT_EMBEDDING]:q1,[V0.TEXT_SMALL]:b2,[V0.TEXT_LARGE]:p2,[V0.IMAGE]:K1,[V0.IMAGE_DESCRIPTION]:Y1,[V0.OBJECT_SMALL]:Z1,[V0.OBJECT_LARGE]:J1},tests:[{name:"ELIZAOS_CLOUD_plugin_tests",tests:[{name:"ELIZAOS_CLOUD_test_url_and_api_key_validation",fn:async(h)=>{let B=k0(h),w=await fetch(`${B}/models`,{headers:{Authorization:`Bearer ${o0(h)}`}}),U=await w.json();if(C0.log({data:U?.data?.length??"N/A"},"Models Available"),!w.ok)throw Error(`Failed to validate OpenAI API key: ${w.statusText}`)}},{name:"ELIZAOS_CLOUD_test_text_embedding",fn:async(h)=>{try{let B=await h.useModel(V0.TEXT_EMBEDDING,{text:"Hello, world!"});C0.log({embedding:B},"embedding")}catch(B){let w=B instanceof Error?B.message:String(B);throw C0.error(`Error in test_text_embedding: ${w}`),B}}},{name:"ELIZAOS_CLOUD_test_text_large",fn:async(h)=>{try{let B=await h.useModel(V0.TEXT_LARGE,{prompt:"What is the nature of reality in 10 words?"});if(B.length===0)throw Error("Failed to generate text");C0.log({text:B},"generated with test_text_large")}catch(B){let w=B instanceof Error?B.message:String(B);throw C0.error(`Error in test_text_large: ${w}`),B}}},{name:"ELIZAOS_CLOUD_test_text_small",fn:async(h)=>{try{let B=await h.useModel(V0.TEXT_SMALL,{prompt:"What is the nature of reality in 10 words?"});if(B.length===0)throw Error("Failed to generate text");C0.log({text:B},"generated with test_text_small")}catch(B){let w=B instanceof Error?B.message:String(B);throw C0.error(`Error in test_text_small: ${w}`),B}}},{name:"ELIZAOS_CLOUD_test_image_generation",fn:async(h)=>{C0.log("ELIZAOS_CLOUD_test_image_generation");try{let B=await h.useModel(V0.IMAGE,{prompt:"A beautiful sunset over a calm ocean",count:1,size:"1024x1024"});C0.log({image:B},"generated with test_image_generation")}catch(B){let w=B instanceof Error?B.message:String(B);throw C0.error(`Error in test_image_generation: ${w}`),B}}},{name:"image-description",fn:async(h)=>{try{C0.log("ELIZAOS_CLOUD_test_image_description");try{let B=await h.useModel(V0.IMAGE_DESCRIPTION,"https://upload.wikimedia.org/wikipedia/commons/thumb/1/1c/Vitalik_Buterin_TechCrunch_London_2015_%28cropped%29.jpg/537px-Vitalik_Buterin_TechCrunch_London_2015_%28cropped%29.jpg");if(B&&typeof B==="object"&&"title"in B&&"description"in B)C0.log({result:B},"Image description");else C0.error("Invalid image description result format:",B)}catch(B){let w=B instanceof Error?B.message:String(B);C0.error(`Error in image description test: ${w}`)}}catch(B){let w=B instanceof Error?B.message:String(B);C0.error(`Error in ELIZAOS_CLOUD_test_image_description: ${w}`)}}},{name:"ELIZAOS_CLOUD_test_transcription",fn:async(h)=>{C0.log("ELIZAOS_CLOUD_test_transcription");try{let w=await(await fetch("https://upload.wikimedia.org/wikipedia/en/4/40/Chris_Benoit_Voice_Message.ogg")).arrayBuffer(),U=await h.useModel(V0.TRANSCRIPTION,Buffer.from(new Uint8Array(w)));C0.log({transcription:U},"generated with test_transcription")}catch(B){let w=B instanceof Error?B.message:String(B);throw C0.error(`Error in test_transcription: ${w}`),B}}},{name:"ELIZAOS_CLOUD_test_text_tokenizer_encode",fn:async(h)=>{let w=await h.useModel(V0.TEXT_TOKENIZER_ENCODE,{prompt:"Hello tokenizer encode!",modelType:V0.TEXT_SMALL});if(!Array.isArray(w)||w.length===0)throw Error("Failed to tokenize text: expected non-empty array of tokens");C0.log({tokens:w},"Tokenized output")}},{name:"ELIZAOS_CLOUD_test_text_tokenizer_decode",fn:async(h)=>{let w=await h.useModel(V0.TEXT_TOKENIZER_ENCODE,{prompt:"Hello tokenizer decode!",modelType:V0.TEXT_SMALL}),U=await h.useModel(V0.TEXT_TOKENIZER_DECODE,{tokens:w,modelType:V0.TEXT_SMALL});if(U!=="Hello tokenizer decode!")throw Error(`Decoded text does not match original. Expected "Hello tokenizer decode!", got "${U}"`);C0.log({decodedText:U},"Decoded text")}},{name:"ELIZAOS_CLOUD_test_text_to_speech",fn:async(h)=>{try{if(!await z1(h,{text:"Hello, this is a test for text-to-speech."}))throw Error("Failed to generate speech");C0.log("Generated speech successfully")}catch(B){let w=B instanceof Error?B.message:String(B);throw C0.error(`Error in ELIZAOS_CLOUD_test_text_to_speech: ${w}`),B}}}]}]},X4=Q4;export{Q4 as elizaOSCloudPlugin,X4 as default};
|
|
1
|
+
var j1=Object.create;var{getPrototypeOf:V1,defineProperty:r2,getOwnPropertyNames:$i,getOwnPropertyDescriptor:W1}=Object,zi=Object.prototype.hasOwnProperty;var p1=(i,h,u)=>{u=i!=null?j1(V1(i)):{};let n=h||!i||!i.__esModule?r2(u,"default",{value:i,enumerable:!0}):u;for(let g of $i(i))if(!zi.call(n,g))r2(n,g,{get:()=>i[g],enumerable:!0});return n},Zi=new WeakMap,Q0=(i)=>{var h=Zi.get(i),u;if(h)return h;if(h=r2({},"__esModule",{value:!0}),i&&typeof i==="object"||typeof i==="function")$i(i).map((n)=>!zi.call(h,n)&&r2(h,n,{get:()=>i[n],enumerable:!(u=W1(i,n))||u.enumerable}));return Zi.set(i,h),h},k1=(i,h)=>()=>(h||i((h={exports:{}}).exports,h),h.exports);var Ji=(i,h)=>{for(var u in h)r2(i,u,{get:h[u],enumerable:!0,configurable:!0,set:(n)=>h[u]=()=>n})};var yi=(i,h)=>()=>(i&&(h=i(i=0)),h);var m0={};Ji(m0,{transcode:()=>Qh,resolveObjectURL:()=>Sh,kStringMaxLength:()=>ki,kMaxLength:()=>O2,isUtf8:()=>Fh,isAscii:()=>Kh,default:()=>Hh,constants:()=>gh,btoa:()=>ih,atob:()=>hh,INSPECT_MAX_BYTES:()=>pi,File:()=>uh,Buffer:()=>G,Blob:()=>nh});function v1(i){var h=i.length;if(h%4>0)throw Error("Invalid string. Length must be a multiple of 4");var u=i.indexOf("=");if(u===-1)u=h;var n=u===h?0:4-u%4;return[u,n]}function b1(i,h){return(i+h)*3/4-h}function e1(i){var h,u=v1(i),n=u[0],g=u[1],c=new Uint8Array(b1(n,g)),I=0,E=g>0?n-4:n,U;for(U=0;U<E;U+=4)h=D0[i.charCodeAt(U)]<<18|D0[i.charCodeAt(U+1)]<<12|D0[i.charCodeAt(U+2)]<<6|D0[i.charCodeAt(U+3)],c[I++]=h>>16&255,c[I++]=h>>8&255,c[I++]=h&255;if(g===2)h=D0[i.charCodeAt(U)]<<2|D0[i.charCodeAt(U+1)]>>4,c[I++]=h&255;if(g===1)h=D0[i.charCodeAt(U)]<<10|D0[i.charCodeAt(U+1)]<<4|D0[i.charCodeAt(U+2)]>>2,c[I++]=h>>8&255,c[I++]=h&255;return c}function a1(i){return j0[i>>18&63]+j0[i>>12&63]+j0[i>>6&63]+j0[i&63]}function s1(i,h,u){var n,g=[];for(var c=h;c<u;c+=3)n=(i[c]<<16&16711680)+(i[c+1]<<8&65280)+(i[c+2]&255),g.push(a1(n));return g.join("")}function Pi(i){var h,u=i.length,n=u%3,g=[],c=16383;for(var I=0,E=u-n;I<E;I+=c)g.push(s1(i,I,I+c>E?E:I+c));if(n===1)h=i[u-1],g.push(j0[h>>2]+j0[h<<4&63]+"==");else if(n===2)h=(i[u-2]<<8)+i[u-1],g.push(j0[h>>10]+j0[h>>4&63]+j0[h<<2&63]+"=");return g.join("")}function X2(i,h,u,n,g){var c,I,E=g*8-n-1,U=(1<<E)-1,T=U>>1,x=-7,R=u?g-1:0,N=u?-1:1,y=i[h+R];R+=N,c=y&(1<<-x)-1,y>>=-x,x+=E;for(;x>0;c=c*256+i[h+R],R+=N,x-=8);I=c&(1<<-x)-1,c>>=-x,x+=n;for(;x>0;I=I*256+i[h+R],R+=N,x-=8);if(c===0)c=1-T;else if(c===U)return I?NaN:(y?-1:1)*(1/0);else I=I+Math.pow(2,n),c=c-T;return(y?-1:1)*I*Math.pow(2,c-n)}function Wi(i,h,u,n,g,c){var I,E,U,T=c*8-g-1,x=(1<<T)-1,R=x>>1,N=g===23?Math.pow(2,-24)-Math.pow(2,-77):0,y=n?0:c-1,v=n?1:-1,t=h<0||h===0&&1/h<0?1:0;if(h=Math.abs(h),isNaN(h)||h===1/0)E=isNaN(h)?1:0,I=x;else{if(I=Math.floor(Math.log(h)/Math.LN2),h*(U=Math.pow(2,-I))<1)I--,U*=2;if(I+R>=1)h+=N/U;else h+=N*Math.pow(2,1-R);if(h*U>=2)I++,U/=2;if(I+R>=x)E=0,I=x;else if(I+R>=1)E=(h*U-1)*Math.pow(2,g),I=I+R;else E=h*Math.pow(2,R-1)*Math.pow(2,g),I=0}for(;g>=8;i[u+y]=E&255,y+=v,E/=256,g-=8);I=I<<g|E,T+=g;for(;T>0;i[u+y]=I&255,y+=v,I/=256,T-=8);i[u+y-v]|=t*128}function k0(i){if(i>O2)throw RangeError('The value "'+i+'" is invalid for option "size"');let h=new Uint8Array(i);return Object.setPrototypeOf(h,G.prototype),h}function o2(i,h,u){return class extends u{constructor(){super();Object.defineProperty(this,"message",{value:h.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${i}]`,this.stack,delete this.name}get code(){return i}set code(n){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:n,writable:!0})}toString(){return`${this.name} [${i}]: ${this.message}`}}}function G(i,h,u){if(typeof i==="number"){if(typeof h==="string")throw TypeError('The "string" argument must be of type string. Received type number');return v2(i)}return mi(i,h,u)}function mi(i,h,u){if(typeof i==="string")return wh(i,h);if(ArrayBuffer.isView(i))return fh(i);if(i==null)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof i);if(V0(i,ArrayBuffer)||i&&V0(i.buffer,ArrayBuffer))return t2(i,h,u);if(typeof SharedArrayBuffer<"u"&&(V0(i,SharedArrayBuffer)||i&&V0(i.buffer,SharedArrayBuffer)))return t2(i,h,u);if(typeof i==="number")throw TypeError('The "value" argument must not be of type number. Received type number');let n=i.valueOf&&i.valueOf();if(n!=null&&n!==i)return G.from(n,h,u);let g=Eh(i);if(g)return g;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof i[Symbol.toPrimitive]==="function")return G.from(i[Symbol.toPrimitive]("string"),h,u);throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof i)}function di(i){if(typeof i!=="number")throw TypeError('"size" argument must be of type number');else if(i<0)throw RangeError('The value "'+i+'" is invalid for option "size"')}function Ih(i,h,u){if(di(i),i<=0)return k0(i);if(h!==void 0)return typeof u==="string"?k0(i).fill(h,u):k0(i).fill(h);return k0(i)}function v2(i){return di(i),k0(i<0?0:b2(i)|0)}function wh(i,h){if(typeof h!=="string"||h==="")h="utf8";if(!G.isEncoding(h))throw TypeError("Unknown encoding: "+h);let u=ti(i,h)|0,n=k0(u),g=n.write(i,h);if(g!==u)n=n.slice(0,g);return n}function d2(i){let h=i.length<0?0:b2(i.length)|0,u=k0(h);for(let n=0;n<h;n+=1)u[n]=i[n]&255;return u}function fh(i){if(V0(i,Uint8Array)){let h=new Uint8Array(i);return t2(h.buffer,h.byteOffset,h.byteLength)}return d2(i)}function t2(i,h,u){if(h<0||i.byteLength<h)throw RangeError('"offset" is outside of buffer bounds');if(i.byteLength<h+(u||0))throw RangeError('"length" is outside of buffer bounds');let n;if(h===void 0&&u===void 0)n=new Uint8Array(i);else if(u===void 0)n=new Uint8Array(i,h);else n=new Uint8Array(i,h,u);return Object.setPrototypeOf(n,G.prototype),n}function Eh(i){if(G.isBuffer(i)){let h=b2(i.length)|0,u=k0(h);if(u.length===0)return u;return i.copy(u,0,0,h),u}if(i.length!==void 0){if(typeof i.length!=="number"||Number.isNaN(i.length))return k0(0);return d2(i)}if(i.type==="Buffer"&&Array.isArray(i.data))return d2(i.data)}function b2(i){if(i>=O2)throw RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+O2.toString(16)+" bytes");return i|0}function ti(i,h){if(G.isBuffer(i))return i.length;if(ArrayBuffer.isView(i)||V0(i,ArrayBuffer))return i.byteLength;if(typeof i!=="string")throw TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof i);let u=i.length,n=arguments.length>2&&arguments[2]===!0;if(!n&&u===0)return 0;let g=!1;for(;;)switch(h){case"ascii":case"latin1":case"binary":return u;case"utf8":case"utf-8":return l2(i).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return u*2;case"hex":return u>>>1;case"base64":return h1(i).length;default:if(g)return n?-1:l2(i).length;h=(""+h).toLowerCase(),g=!0}}function Uh(i,h,u){let n=!1;if(h===void 0||h<0)h=0;if(h>this.length)return"";if(u===void 0||u>this.length)u=this.length;if(u<=0)return"";if(u>>>=0,h>>>=0,u<=h)return"";if(!i)i="utf8";while(!0)switch(i){case"hex":return Zh(this,h,u);case"utf8":case"utf-8":return oi(this,h,u);case"ascii":return Ch(this,h,u);case"latin1":case"binary":return Rh(this,h,u);case"base64":return Lh(this,h,u);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return $h(this,h,u);default:if(n)throw TypeError("Unknown encoding: "+i);i=(i+"").toLowerCase(),n=!0}}function g2(i,h,u){let n=i[h];i[h]=i[u],i[u]=n}function li(i,h,u,n,g){if(i.length===0)return-1;if(typeof u==="string")n=u,u=0;else if(u>2147483647)u=2147483647;else if(u<-2147483648)u=-2147483648;if(u=+u,Number.isNaN(u))u=g?0:i.length-1;if(u<0)u=i.length+u;if(u>=i.length)if(g)return-1;else u=i.length-1;else if(u<0)if(g)u=0;else return-1;if(typeof h==="string")h=G.from(h,n);if(G.isBuffer(h)){if(h.length===0)return-1;return Yi(i,h,u,n,g)}else if(typeof h==="number"){if(h=h&255,typeof Uint8Array.prototype.indexOf==="function")if(g)return Uint8Array.prototype.indexOf.call(i,h,u);else return Uint8Array.prototype.lastIndexOf.call(i,h,u);return Yi(i,[h],u,n,g)}throw TypeError("val must be string, number or Buffer")}function Yi(i,h,u,n,g){let c=1,I=i.length,E=h.length;if(n!==void 0){if(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le"){if(i.length<2||h.length<2)return-1;c=2,I/=2,E/=2,u/=2}}function U(x,R){if(c===1)return x[R];else return x.readUInt16BE(R*c)}let T;if(g){let x=-1;for(T=u;T<I;T++)if(U(i,T)===U(h,x===-1?0:T-x)){if(x===-1)x=T;if(T-x+1===E)return x*c}else{if(x!==-1)T-=T-x;x=-1}}else{if(u+E>I)u=I-E;for(T=u;T>=0;T--){let x=!0;for(let R=0;R<E;R++)if(U(i,T+R)!==U(h,R)){x=!1;break}if(x)return T}}return-1}function Ah(i,h,u,n){u=Number(u)||0;let g=i.length-u;if(!n)n=g;else if(n=Number(n),n>g)n=g;let c=h.length;if(n>c/2)n=c/2;let I;for(I=0;I<n;++I){let E=parseInt(h.substr(I*2,2),16);if(Number.isNaN(E))return I;i[u+I]=E}return I}function Th(i,h,u,n){return q2(l2(h,i.length-u),i,u,n)}function xh(i,h,u,n){return q2(Nh(h),i,u,n)}function rh(i,h,u,n){return q2(h1(h),i,u,n)}function Oh(i,h,u,n){return q2(Xh(h,i.length-u),i,u,n)}function Lh(i,h,u){if(h===0&&u===i.length)return Pi(i);else return Pi(i.slice(h,u))}function oi(i,h,u){u=Math.min(i.length,u);let n=[],g=h;while(g<u){let c=i[g],I=null,E=c>239?4:c>223?3:c>191?2:1;if(g+E<=u){let U,T,x,R;switch(E){case 1:if(c<128)I=c;break;case 2:if(U=i[g+1],(U&192)===128){if(R=(c&31)<<6|U&63,R>127)I=R}break;case 3:if(U=i[g+1],T=i[g+2],(U&192)===128&&(T&192)===128){if(R=(c&15)<<12|(U&63)<<6|T&63,R>2047&&(R<55296||R>57343))I=R}break;case 4:if(U=i[g+1],T=i[g+2],x=i[g+3],(U&192)===128&&(T&192)===128&&(x&192)===128){if(R=(c&15)<<18|(U&63)<<12|(T&63)<<6|x&63,R>65535&&R<1114112)I=R}}}if(I===null)I=65533,E=1;else if(I>65535)I-=65536,n.push(I>>>10&1023|55296),I=56320|I&1023;n.push(I),g+=E}return Mh(n)}function Mh(i){let h=i.length;if(h<=ji)return String.fromCharCode.apply(String,i);let u="",n=0;while(n<h)u+=String.fromCharCode.apply(String,i.slice(n,n+=ji));return u}function Ch(i,h,u){let n="";u=Math.min(i.length,u);for(let g=h;g<u;++g)n+=String.fromCharCode(i[g]&127);return n}function Rh(i,h,u){let n="";u=Math.min(i.length,u);for(let g=h;g<u;++g)n+=String.fromCharCode(i[g]);return n}function Zh(i,h,u){let n=i.length;if(!h||h<0)h=0;if(!u||u<0||u>n)u=n;let g="";for(let c=h;c<u;++c)g+=qh[i[c]];return g}function $h(i,h,u){let n=i.slice(h,u),g="";for(let c=0;c<n.length-1;c+=2)g+=String.fromCharCode(n[c]+n[c+1]*256);return g}function Z0(i,h,u){if(i%1!==0||i<0)throw RangeError("offset is not uint");if(i+h>u)throw RangeError("Trying to access beyond buffer length")}function X0(i,h,u,n,g,c){if(!G.isBuffer(i))throw TypeError('"buffer" argument must be a Buffer instance');if(h>g||h<c)throw RangeError('"value" argument is out of bounds');if(u+n>i.length)throw RangeError("Index out of range")}function vi(i,h,u,n,g){i1(h,n,g,i,u,7);let c=Number(h&BigInt(4294967295));i[u++]=c,c=c>>8,i[u++]=c,c=c>>8,i[u++]=c,c=c>>8,i[u++]=c;let I=Number(h>>BigInt(32)&BigInt(4294967295));return i[u++]=I,I=I>>8,i[u++]=I,I=I>>8,i[u++]=I,I=I>>8,i[u++]=I,u}function bi(i,h,u,n,g){i1(h,n,g,i,u,7);let c=Number(h&BigInt(4294967295));i[u+7]=c,c=c>>8,i[u+6]=c,c=c>>8,i[u+5]=c,c=c>>8,i[u+4]=c;let I=Number(h>>BigInt(32)&BigInt(4294967295));return i[u+3]=I,I=I>>8,i[u+2]=I,I=I>>8,i[u+1]=I,I=I>>8,i[u]=I,u+8}function ei(i,h,u,n,g,c){if(u+n>i.length)throw RangeError("Index out of range");if(u<0)throw RangeError("Index out of range")}function ai(i,h,u,n,g){if(h=+h,u=u>>>0,!g)ei(i,h,u,4,340282346638528860000000000000000000000,-340282346638528860000000000000000000000);return Wi(i,h,u,n,23,4),u+4}function si(i,h,u,n,g){if(h=+h,u=u>>>0,!g)ei(i,h,u,8,179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,-179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000);return Wi(i,h,u,n,52,8),u+8}function Vi(i){let h="",u=i.length,n=i[0]==="-"?1:0;for(;u>=n+4;u-=3)h=`_${i.slice(u-3,u)}${h}`;return`${i.slice(0,u)}${h}`}function zh(i,h,u){if(E2(h,"offset"),i[h]===void 0||i[h+u]===void 0)L2(h,i.length-(u+1))}function i1(i,h,u,n,g,c){if(i>u||i<h){let I=typeof h==="bigint"?"n":"",E;if(c>3)if(h===0||h===BigInt(0))E=`>= 0${I} and < 2${I} ** ${(c+1)*8}${I}`;else E=`>= -(2${I} ** ${(c+1)*8-1}${I}) and < 2 ** ${(c+1)*8-1}${I}`;else E=`>= ${h}${I} and <= ${u}${I}`;throw new m2("value",E,i)}zh(n,g,c)}function E2(i,h){if(typeof i!=="number")throw new Bh(h,"number",i)}function L2(i,h,u){if(Math.floor(i)!==i)throw E2(i,u),new m2(u||"offset","an integer",i);if(h<0)throw new ch;throw new m2(u||"offset",`>= ${u?1:0} and <= ${h}`,i)}function yh(i){if(i=i.split("=")[0],i=i.trim().replace(Jh,""),i.length<2)return"";while(i.length%4!==0)i=i+"=";return i}function l2(i,h){h=h||1/0;let u,n=i.length,g=null,c=[];for(let I=0;I<n;++I){if(u=i.charCodeAt(I),u>55295&&u<57344){if(!g){if(u>56319){if((h-=3)>-1)c.push(239,191,189);continue}else if(I+1===n){if((h-=3)>-1)c.push(239,191,189);continue}g=u;continue}if(u<56320){if((h-=3)>-1)c.push(239,191,189);g=u;continue}u=(g-55296<<10|u-56320)+65536}else if(g){if((h-=3)>-1)c.push(239,191,189)}if(g=null,u<128){if((h-=1)<0)break;c.push(u)}else if(u<2048){if((h-=2)<0)break;c.push(u>>6|192,u&63|128)}else if(u<65536){if((h-=3)<0)break;c.push(u>>12|224,u>>6&63|128,u&63|128)}else if(u<1114112){if((h-=4)<0)break;c.push(u>>18|240,u>>12&63|128,u>>6&63|128,u&63|128)}else throw Error("Invalid code point")}return c}function Nh(i){let h=[];for(let u=0;u<i.length;++u)h.push(i.charCodeAt(u)&255);return h}function Xh(i,h){let u,n,g,c=[];for(let I=0;I<i.length;++I){if((h-=2)<0)break;u=i.charCodeAt(I),n=u>>8,g=u%256,c.push(g),c.push(n)}return c}function h1(i){return e1(yh(i))}function q2(i,h,u,n){let g;for(g=0;g<n;++g){if(g+u>=h.length||g>=i.length)break;h[g+u]=i[g]}return g}function V0(i,h){return i instanceof h||i!=null&&i.constructor!=null&&i.constructor.name!=null&&i.constructor.name===h.name}function e0(i){return typeof BigInt>"u"?Gh:i}function Gh(){throw Error("BigInt not supported")}function e2(i){return()=>{throw Error(i+" is not implemented for node:buffer browser polyfill")}}var j0,D0,k2="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n2,Di,_i,pi=50,O2=2147483647,ki=536870888,ih,hh,uh,nh,gh,ch,Bh,m2,ji=4096,Jh,qh,Sh,Fh,Kh=(i)=>{for(let h of i)if(h.charCodeAt(0)>127)return!1;return!0},Qh,Hh;var d0=yi(()=>{j0=[],D0=[];for(n2=0,Di=k2.length;n2<Di;++n2)j0[n2]=k2[n2],D0[k2.charCodeAt(n2)]=n2;D0[45]=62;D0[95]=63;_i=typeof Symbol==="function"&&typeof Symbol.for==="function"?Symbol.for("nodejs.util.inspect.custom"):null,ih=globalThis.btoa,hh=globalThis.atob,uh=globalThis.File,nh=globalThis.Blob,gh={MAX_LENGTH:O2,MAX_STRING_LENGTH:ki};ch=o2("ERR_BUFFER_OUT_OF_BOUNDS",function(i){if(i)return`${i} is outside of buffer bounds`;return"Attempt to access memory outside buffer bounds"},RangeError),Bh=o2("ERR_INVALID_ARG_TYPE",function(i,h){return`The "${i}" argument must be of type number. Received type ${typeof h}`},TypeError),m2=o2("ERR_OUT_OF_RANGE",function(i,h,u){let n=`The value of "${i}" is out of range.`,g=u;if(Number.isInteger(u)&&Math.abs(u)>4294967296)g=Vi(String(u));else if(typeof u==="bigint"){if(g=String(u),u>BigInt(2)**BigInt(32)||u<-(BigInt(2)**BigInt(32)))g=Vi(g);g+="n"}return n+=` It must be ${h}. Received ${g}`,n},RangeError);Object.defineProperty(G.prototype,"parent",{enumerable:!0,get:function(){if(!G.isBuffer(this))return;return this.buffer}});Object.defineProperty(G.prototype,"offset",{enumerable:!0,get:function(){if(!G.isBuffer(this))return;return this.byteOffset}});G.poolSize=8192;G.from=function(i,h,u){return mi(i,h,u)};Object.setPrototypeOf(G.prototype,Uint8Array.prototype);Object.setPrototypeOf(G,Uint8Array);G.alloc=function(i,h,u){return Ih(i,h,u)};G.allocUnsafe=function(i){return v2(i)};G.allocUnsafeSlow=function(i){return v2(i)};G.isBuffer=function(i){return i!=null&&i._isBuffer===!0&&i!==G.prototype};G.compare=function(i,h){if(V0(i,Uint8Array))i=G.from(i,i.offset,i.byteLength);if(V0(h,Uint8Array))h=G.from(h,h.offset,h.byteLength);if(!G.isBuffer(i)||!G.isBuffer(h))throw TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(i===h)return 0;let u=i.length,n=h.length;for(let g=0,c=Math.min(u,n);g<c;++g)if(i[g]!==h[g]){u=i[g],n=h[g];break}if(u<n)return-1;if(n<u)return 1;return 0};G.isEncoding=function(i){switch(String(i).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}};G.concat=function(i,h){if(!Array.isArray(i))throw TypeError('"list" argument must be an Array of Buffers');if(i.length===0)return G.alloc(0);let u;if(h===void 0){h=0;for(u=0;u<i.length;++u)h+=i[u].length}let n=G.allocUnsafe(h),g=0;for(u=0;u<i.length;++u){let c=i[u];if(V0(c,Uint8Array))if(g+c.length>n.length){if(!G.isBuffer(c))c=G.from(c);c.copy(n,g)}else Uint8Array.prototype.set.call(n,c,g);else if(!G.isBuffer(c))throw TypeError('"list" argument must be an Array of Buffers');else c.copy(n,g);g+=c.length}return n};G.byteLength=ti;G.prototype._isBuffer=!0;G.prototype.swap16=function(){let i=this.length;if(i%2!==0)throw RangeError("Buffer size must be a multiple of 16-bits");for(let h=0;h<i;h+=2)g2(this,h,h+1);return this};G.prototype.swap32=function(){let i=this.length;if(i%4!==0)throw RangeError("Buffer size must be a multiple of 32-bits");for(let h=0;h<i;h+=4)g2(this,h,h+3),g2(this,h+1,h+2);return this};G.prototype.swap64=function(){let i=this.length;if(i%8!==0)throw RangeError("Buffer size must be a multiple of 64-bits");for(let h=0;h<i;h+=8)g2(this,h,h+7),g2(this,h+1,h+6),g2(this,h+2,h+5),g2(this,h+3,h+4);return this};G.prototype.toString=function(){let i=this.length;if(i===0)return"";if(arguments.length===0)return oi(this,0,i);return Uh.apply(this,arguments)};G.prototype.toLocaleString=G.prototype.toString;G.prototype.equals=function(i){if(!G.isBuffer(i))throw TypeError("Argument must be a Buffer");if(this===i)return!0;return G.compare(this,i)===0};G.prototype.inspect=function(){let i="",h=pi;if(i=this.toString("hex",0,h).replace(/(.{2})/g,"$1 ").trim(),this.length>h)i+=" ... ";return"<Buffer "+i+">"};if(_i)G.prototype[_i]=G.prototype.inspect;G.prototype.compare=function(i,h,u,n,g){if(V0(i,Uint8Array))i=G.from(i,i.offset,i.byteLength);if(!G.isBuffer(i))throw TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof i);if(h===void 0)h=0;if(u===void 0)u=i?i.length:0;if(n===void 0)n=0;if(g===void 0)g=this.length;if(h<0||u>i.length||n<0||g>this.length)throw RangeError("out of range index");if(n>=g&&h>=u)return 0;if(n>=g)return-1;if(h>=u)return 1;if(h>>>=0,u>>>=0,n>>>=0,g>>>=0,this===i)return 0;let c=g-n,I=u-h,E=Math.min(c,I),U=this.slice(n,g),T=i.slice(h,u);for(let x=0;x<E;++x)if(U[x]!==T[x]){c=U[x],I=T[x];break}if(c<I)return-1;if(I<c)return 1;return 0};G.prototype.includes=function(i,h,u){return this.indexOf(i,h,u)!==-1};G.prototype.indexOf=function(i,h,u){return li(this,i,h,u,!0)};G.prototype.lastIndexOf=function(i,h,u){return li(this,i,h,u,!1)};G.prototype.write=function(i,h,u,n){if(h===void 0)n="utf8",u=this.length,h=0;else if(u===void 0&&typeof h==="string")n=h,u=this.length,h=0;else if(isFinite(h))if(h=h>>>0,isFinite(u)){if(u=u>>>0,n===void 0)n="utf8"}else n=u,u=void 0;else throw Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let g=this.length-h;if(u===void 0||u>g)u=g;if(i.length>0&&(u<0||h<0)||h>this.length)throw RangeError("Attempt to write outside buffer bounds");if(!n)n="utf8";let c=!1;for(;;)switch(n){case"hex":return Ah(this,i,h,u);case"utf8":case"utf-8":return Th(this,i,h,u);case"ascii":case"latin1":case"binary":return xh(this,i,h,u);case"base64":return rh(this,i,h,u);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Oh(this,i,h,u);default:if(c)throw TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),c=!0}};G.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};G.prototype.slice=function(i,h){let u=this.length;if(i=~~i,h=h===void 0?u:~~h,i<0){if(i+=u,i<0)i=0}else if(i>u)i=u;if(h<0){if(h+=u,h<0)h=0}else if(h>u)h=u;if(h<i)h=i;let n=this.subarray(i,h);return Object.setPrototypeOf(n,G.prototype),n};G.prototype.readUintLE=G.prototype.readUIntLE=function(i,h,u){if(i=i>>>0,h=h>>>0,!u)Z0(i,h,this.length);let n=this[i],g=1,c=0;while(++c<h&&(g*=256))n+=this[i+c]*g;return n};G.prototype.readUintBE=G.prototype.readUIntBE=function(i,h,u){if(i=i>>>0,h=h>>>0,!u)Z0(i,h,this.length);let n=this[i+--h],g=1;while(h>0&&(g*=256))n+=this[i+--h]*g;return n};G.prototype.readUint8=G.prototype.readUInt8=function(i,h){if(i=i>>>0,!h)Z0(i,1,this.length);return this[i]};G.prototype.readUint16LE=G.prototype.readUInt16LE=function(i,h){if(i=i>>>0,!h)Z0(i,2,this.length);return this[i]|this[i+1]<<8};G.prototype.readUint16BE=G.prototype.readUInt16BE=function(i,h){if(i=i>>>0,!h)Z0(i,2,this.length);return this[i]<<8|this[i+1]};G.prototype.readUint32LE=G.prototype.readUInt32LE=function(i,h){if(i=i>>>0,!h)Z0(i,4,this.length);return(this[i]|this[i+1]<<8|this[i+2]<<16)+this[i+3]*16777216};G.prototype.readUint32BE=G.prototype.readUInt32BE=function(i,h){if(i=i>>>0,!h)Z0(i,4,this.length);return this[i]*16777216+(this[i+1]<<16|this[i+2]<<8|this[i+3])};G.prototype.readBigUInt64LE=e0(function(i){i=i>>>0,E2(i,"offset");let h=this[i],u=this[i+7];if(h===void 0||u===void 0)L2(i,this.length-8);let n=h+this[++i]*256+this[++i]*65536+this[++i]*16777216,g=this[++i]+this[++i]*256+this[++i]*65536+u*16777216;return BigInt(n)+(BigInt(g)<<BigInt(32))});G.prototype.readBigUInt64BE=e0(function(i){i=i>>>0,E2(i,"offset");let h=this[i],u=this[i+7];if(h===void 0||u===void 0)L2(i,this.length-8);let n=h*16777216+this[++i]*65536+this[++i]*256+this[++i],g=this[++i]*16777216+this[++i]*65536+this[++i]*256+u;return(BigInt(n)<<BigInt(32))+BigInt(g)});G.prototype.readIntLE=function(i,h,u){if(i=i>>>0,h=h>>>0,!u)Z0(i,h,this.length);let n=this[i],g=1,c=0;while(++c<h&&(g*=256))n+=this[i+c]*g;if(g*=128,n>=g)n-=Math.pow(2,8*h);return n};G.prototype.readIntBE=function(i,h,u){if(i=i>>>0,h=h>>>0,!u)Z0(i,h,this.length);let n=h,g=1,c=this[i+--n];while(n>0&&(g*=256))c+=this[i+--n]*g;if(g*=128,c>=g)c-=Math.pow(2,8*h);return c};G.prototype.readInt8=function(i,h){if(i=i>>>0,!h)Z0(i,1,this.length);if(!(this[i]&128))return this[i];return(255-this[i]+1)*-1};G.prototype.readInt16LE=function(i,h){if(i=i>>>0,!h)Z0(i,2,this.length);let u=this[i]|this[i+1]<<8;return u&32768?u|4294901760:u};G.prototype.readInt16BE=function(i,h){if(i=i>>>0,!h)Z0(i,2,this.length);let u=this[i+1]|this[i]<<8;return u&32768?u|4294901760:u};G.prototype.readInt32LE=function(i,h){if(i=i>>>0,!h)Z0(i,4,this.length);return this[i]|this[i+1]<<8|this[i+2]<<16|this[i+3]<<24};G.prototype.readInt32BE=function(i,h){if(i=i>>>0,!h)Z0(i,4,this.length);return this[i]<<24|this[i+1]<<16|this[i+2]<<8|this[i+3]};G.prototype.readBigInt64LE=e0(function(i){i=i>>>0,E2(i,"offset");let h=this[i],u=this[i+7];if(h===void 0||u===void 0)L2(i,this.length-8);let n=this[i+4]+this[i+5]*256+this[i+6]*65536+(u<<24);return(BigInt(n)<<BigInt(32))+BigInt(h+this[++i]*256+this[++i]*65536+this[++i]*16777216)});G.prototype.readBigInt64BE=e0(function(i){i=i>>>0,E2(i,"offset");let h=this[i],u=this[i+7];if(h===void 0||u===void 0)L2(i,this.length-8);let n=(h<<24)+this[++i]*65536+this[++i]*256+this[++i];return(BigInt(n)<<BigInt(32))+BigInt(this[++i]*16777216+this[++i]*65536+this[++i]*256+u)});G.prototype.readFloatLE=function(i,h){if(i=i>>>0,!h)Z0(i,4,this.length);return X2(this,i,!0,23,4)};G.prototype.readFloatBE=function(i,h){if(i=i>>>0,!h)Z0(i,4,this.length);return X2(this,i,!1,23,4)};G.prototype.readDoubleLE=function(i,h){if(i=i>>>0,!h)Z0(i,8,this.length);return X2(this,i,!0,52,8)};G.prototype.readDoubleBE=function(i,h){if(i=i>>>0,!h)Z0(i,8,this.length);return X2(this,i,!1,52,8)};G.prototype.writeUintLE=G.prototype.writeUIntLE=function(i,h,u,n){if(i=+i,h=h>>>0,u=u>>>0,!n){let I=Math.pow(2,8*u)-1;X0(this,i,h,u,I,0)}let g=1,c=0;this[h]=i&255;while(++c<u&&(g*=256))this[h+c]=i/g&255;return h+u};G.prototype.writeUintBE=G.prototype.writeUIntBE=function(i,h,u,n){if(i=+i,h=h>>>0,u=u>>>0,!n){let I=Math.pow(2,8*u)-1;X0(this,i,h,u,I,0)}let g=u-1,c=1;this[h+g]=i&255;while(--g>=0&&(c*=256))this[h+g]=i/c&255;return h+u};G.prototype.writeUint8=G.prototype.writeUInt8=function(i,h,u){if(i=+i,h=h>>>0,!u)X0(this,i,h,1,255,0);return this[h]=i&255,h+1};G.prototype.writeUint16LE=G.prototype.writeUInt16LE=function(i,h,u){if(i=+i,h=h>>>0,!u)X0(this,i,h,2,65535,0);return this[h]=i&255,this[h+1]=i>>>8,h+2};G.prototype.writeUint16BE=G.prototype.writeUInt16BE=function(i,h,u){if(i=+i,h=h>>>0,!u)X0(this,i,h,2,65535,0);return this[h]=i>>>8,this[h+1]=i&255,h+2};G.prototype.writeUint32LE=G.prototype.writeUInt32LE=function(i,h,u){if(i=+i,h=h>>>0,!u)X0(this,i,h,4,4294967295,0);return this[h+3]=i>>>24,this[h+2]=i>>>16,this[h+1]=i>>>8,this[h]=i&255,h+4};G.prototype.writeUint32BE=G.prototype.writeUInt32BE=function(i,h,u){if(i=+i,h=h>>>0,!u)X0(this,i,h,4,4294967295,0);return this[h]=i>>>24,this[h+1]=i>>>16,this[h+2]=i>>>8,this[h+3]=i&255,h+4};G.prototype.writeBigUInt64LE=e0(function(i,h=0){return vi(this,i,h,BigInt(0),BigInt("0xffffffffffffffff"))});G.prototype.writeBigUInt64BE=e0(function(i,h=0){return bi(this,i,h,BigInt(0),BigInt("0xffffffffffffffff"))});G.prototype.writeIntLE=function(i,h,u,n){if(i=+i,h=h>>>0,!n){let E=Math.pow(2,8*u-1);X0(this,i,h,u,E-1,-E)}let g=0,c=1,I=0;this[h]=i&255;while(++g<u&&(c*=256)){if(i<0&&I===0&&this[h+g-1]!==0)I=1;this[h+g]=(i/c>>0)-I&255}return h+u};G.prototype.writeIntBE=function(i,h,u,n){if(i=+i,h=h>>>0,!n){let E=Math.pow(2,8*u-1);X0(this,i,h,u,E-1,-E)}let g=u-1,c=1,I=0;this[h+g]=i&255;while(--g>=0&&(c*=256)){if(i<0&&I===0&&this[h+g+1]!==0)I=1;this[h+g]=(i/c>>0)-I&255}return h+u};G.prototype.writeInt8=function(i,h,u){if(i=+i,h=h>>>0,!u)X0(this,i,h,1,127,-128);if(i<0)i=255+i+1;return this[h]=i&255,h+1};G.prototype.writeInt16LE=function(i,h,u){if(i=+i,h=h>>>0,!u)X0(this,i,h,2,32767,-32768);return this[h]=i&255,this[h+1]=i>>>8,h+2};G.prototype.writeInt16BE=function(i,h,u){if(i=+i,h=h>>>0,!u)X0(this,i,h,2,32767,-32768);return this[h]=i>>>8,this[h+1]=i&255,h+2};G.prototype.writeInt32LE=function(i,h,u){if(i=+i,h=h>>>0,!u)X0(this,i,h,4,2147483647,-2147483648);return this[h]=i&255,this[h+1]=i>>>8,this[h+2]=i>>>16,this[h+3]=i>>>24,h+4};G.prototype.writeInt32BE=function(i,h,u){if(i=+i,h=h>>>0,!u)X0(this,i,h,4,2147483647,-2147483648);if(i<0)i=4294967295+i+1;return this[h]=i>>>24,this[h+1]=i>>>16,this[h+2]=i>>>8,this[h+3]=i&255,h+4};G.prototype.writeBigInt64LE=e0(function(i,h=0){return vi(this,i,h,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});G.prototype.writeBigInt64BE=e0(function(i,h=0){return bi(this,i,h,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});G.prototype.writeFloatLE=function(i,h,u){return ai(this,i,h,!0,u)};G.prototype.writeFloatBE=function(i,h,u){return ai(this,i,h,!1,u)};G.prototype.writeDoubleLE=function(i,h,u){return si(this,i,h,!0,u)};G.prototype.writeDoubleBE=function(i,h,u){return si(this,i,h,!1,u)};G.prototype.copy=function(i,h,u,n){if(!G.isBuffer(i))throw TypeError("argument should be a Buffer");if(!u)u=0;if(!n&&n!==0)n=this.length;if(h>=i.length)h=i.length;if(!h)h=0;if(n>0&&n<u)n=u;if(n===u)return 0;if(i.length===0||this.length===0)return 0;if(h<0)throw RangeError("targetStart out of bounds");if(u<0||u>=this.length)throw RangeError("Index out of range");if(n<0)throw RangeError("sourceEnd out of bounds");if(n>this.length)n=this.length;if(i.length-h<n-u)n=i.length-h+u;let g=n-u;if(this===i&&typeof Uint8Array.prototype.copyWithin==="function")this.copyWithin(h,u,n);else Uint8Array.prototype.set.call(i,this.subarray(u,n),h);return g};G.prototype.fill=function(i,h,u,n){if(typeof i==="string"){if(typeof h==="string")n=h,h=0,u=this.length;else if(typeof u==="string")n=u,u=this.length;if(n!==void 0&&typeof n!=="string")throw TypeError("encoding must be a string");if(typeof n==="string"&&!G.isEncoding(n))throw TypeError("Unknown encoding: "+n);if(i.length===1){let c=i.charCodeAt(0);if(n==="utf8"&&c<128||n==="latin1")i=c}}else if(typeof i==="number")i=i&255;else if(typeof i==="boolean")i=Number(i);if(h<0||this.length<h||this.length<u)throw RangeError("Out of range index");if(u<=h)return this;if(h=h>>>0,u=u===void 0?this.length:u>>>0,!i)i=0;let g;if(typeof i==="number")for(g=h;g<u;++g)this[g]=i;else{let c=G.isBuffer(i)?i:G.from(i,n),I=c.length;if(I===0)throw TypeError('The value "'+i+'" is invalid for argument "value"');for(g=0;g<u-h;++g)this[g+h]=c[g%I]}return this};Jh=/[^+/0-9A-Za-z-_]/g;qh=function(){let i=Array(256);for(let h=0;h<16;++h){let u=h*16;for(let n=0;n<16;++n)i[u+n]="0123456789abcdef"[h]+"0123456789abcdef"[n]}return i}();Sh=e2("resolveObjectURL"),Fh=e2("isUtf8"),Qh=e2("transcode"),Hh=G});var C2={};Ji(C2,{setMaxListeners:()=>A1,once:()=>E1,listenerCount:()=>T1,init:()=>a0,getMaxListeners:()=>r1,getEventListeners:()=>U1,default:()=>kh,captureRejectionSymbol:()=>B1,addAbortListener:()=>O1,EventEmitter:()=>a0});function I1(i,h){var{_events:u}=i;if(h[0]??=Error("Unhandled error."),!u)throw h[0];var n=u[c1];if(n)for(var g of n1.call(n))g.apply(i,h);var c=u.error;if(!c)throw h[0];for(var g of n1.call(c))g.apply(i,h);return!0}function _h(i,h,u,n){h.then(void 0,function(g){queueMicrotask(()=>Yh(i,g,u,n))})}function Yh(i,h,u,n){if(typeof i[u1]==="function")i[u1](h,u,...n);else try{i[c2]=!1,i.emit("error",h)}finally{i[c2]=!0}}function w1(i,h,u){u.warned=!0;let n=Error(`Possible EventEmitter memory leak detected. ${u.length} ${String(h)} listeners added to [${i.constructor.name}]. Use emitter.setMaxListeners() to increase limit`);n.name="MaxListenersExceededWarning",n.emitter=i,n.type=h,n.count=u.length,console.warn(n)}function f1(i,h,...u){this.removeListener(i,h),h.apply(this,u)}function E1(i,h,u){var n=u?.signal;if(x1(n,"options.signal"),n?.aborted)throw new a2(void 0,{cause:n?.reason});let{resolve:g,reject:c,promise:I}=$newPromiseCapability(Promise),E=(x)=>{if(i.removeListener(h,U),n!=null)G2(n,"abort",T);c(x)},U=(...x)=>{if(typeof i.removeListener==="function")i.removeListener("error",E);if(n!=null)G2(n,"abort",T);g(x)};if(g1(i,h,U,{once:!0}),h!=="error"&&typeof i.once==="function")i.once("error",E);function T(){G2(i,h,U),G2(i,"error",E),c(new a2(void 0,{cause:n?.reason}))}if(n!=null)g1(n,"abort",T,{once:!0});return I}function U1(i,h){return i.listeners(h)}function A1(i,...h){ii(i,"setMaxListeners",0);var u;if(h&&(u=h.length))for(let n=0;n<u;n++)h[n].setMaxListeners(i);else B2=i}function T1(i,h){return i.listenerCount(h)}function G2(i,h,u,n){if(typeof i.removeListener==="function")i.removeListener(h,u);else i.removeEventListener(h,u,n)}function g1(i,h,u,n){if(typeof i.on==="function")if(n.once)i.once(h,u);else i.on(h,u);else i.addEventListener(h,u,n)}function U2(i,h,u){let n=TypeError(`The "${i}" argument must be of type ${h}. Received ${u}`);return n.code="ERR_INVALID_ARG_TYPE",n}function Wh(i,h,u){let n=RangeError(`The "${i}" argument is out of range. It must be ${h}. Received ${u}`);return n.code="ERR_OUT_OF_RANGE",n}function x1(i,h){if(i!==void 0&&(i===null||typeof i!=="object"||!("aborted"in i)))throw U2(h,"AbortSignal",i)}function ii(i,h,u,n){if(typeof i!=="number")throw U2(h,"number",i);if(u!=null&&i<u||n!=null&&i>n||(u!=null||n!=null)&&Number.isNaN(i))throw Wh(h,`${u!=null?`>= ${u}`:""}${u!=null&&n!=null?" && ":""}${n!=null?`<= ${n}`:""}`,i)}function M2(i){if(typeof i!=="function")throw TypeError("The listener must be a function")}function ph(i,h){if(typeof i!=="boolean")throw U2(h,"boolean",i)}function r1(i){return i?._maxListeners??B2}function O1(i,h){if(i===void 0)throw U2("signal","AbortSignal",i);if(x1(i,"signal"),typeof h!=="function")throw U2("listener","function",h);let u;if(i.aborted)queueMicrotask(()=>h());else i.addEventListener("abort",h,{__proto__:null,once:!0}),u=()=>{i.removeEventListener("abort",h)};return{__proto__:null,[Symbol.dispose](){u?.()}}}var s2,c2,c1,Dh,Ph,u1,B1,n1,B2=10,a0=function(i){if(this._events===void 0||this._events===this.__proto__._events)this._events={__proto__:null},this._eventsCount=0;if(this._maxListeners??=void 0,this[c2]=i?.captureRejections?Boolean(i?.captureRejections):O0[c2])this.emit=Vh},O0,jh=function(i,...h){if(i==="error")return I1(this,h);var{_events:u}=this;if(u===void 0)return!1;var n=u[i];if(n===void 0)return!1;let g=n.length>1?n.slice():n;for(let c=0,{length:I}=g;c<I;c++){let E=g[c];switch(h.length){case 0:E.call(this);break;case 1:E.call(this,h[0]);break;case 2:E.call(this,h[0],h[1]);break;case 3:E.call(this,h[0],h[1],h[2]);break;default:E.apply(this,h);break}}return!0},Vh=function(i,...h){if(i==="error")return I1(this,h);var{_events:u}=this;if(u===void 0)return!1;var n=u[i];if(n===void 0)return!1;let g=n.length>1?n.slice():n;for(let c=0,{length:I}=g;c<I;c++){let E=g[c],U;switch(h.length){case 0:U=E.call(this);break;case 1:U=E.call(this,h[0]);break;case 2:U=E.call(this,h[0],h[1]);break;case 3:U=E.call(this,h[0],h[1],h[2]);break;default:U=E.apply(this,h);break}if(U!==void 0&&typeof U?.then==="function"&&U.then===Promise.prototype.then)_h(this,U,i,h)}return!0},a2,kh;var R2=yi(()=>{s2=Symbol.for,c2=Symbol("kCapture"),c1=s2("events.errorMonitor"),Dh=Symbol("events.maxEventTargetListeners"),Ph=Symbol("events.maxEventTargetListenersWarned"),u1=s2("nodejs.rejection"),B1=s2("nodejs.rejection"),n1=Array.prototype.slice,O0=a0.prototype={};O0._events=void 0;O0._eventsCount=0;O0._maxListeners=void 0;O0.setMaxListeners=function(i){return ii(i,"setMaxListeners",0),this._maxListeners=i,this};O0.constructor=a0;O0.getMaxListeners=function(){return this?._maxListeners??B2};O0.emit=jh;O0.addListener=function(i,h){M2(h);var u=this._events;if(!u)u=this._events={__proto__:null},this._eventsCount=0;else if(u.newListener)this.emit("newListener",i,h.listener??h);var n=u[i];if(!n)u[i]=[h],this._eventsCount++;else{n.push(h);var g=this._maxListeners??B2;if(g>0&&n.length>g&&!n.warned)w1(this,i,n)}return this};O0.on=O0.addListener;O0.prependListener=function(i,h){M2(h);var u=this._events;if(!u)u=this._events={__proto__:null},this._eventsCount=0;else if(u.newListener)this.emit("newListener",i,h.listener??h);var n=u[i];if(!n)u[i]=[h],this._eventsCount++;else{n.unshift(h);var g=this._maxListeners??B2;if(g>0&&n.length>g&&!n.warned)w1(this,i,n)}return this};O0.once=function(i,h){M2(h);let u=f1.bind(this,i,h);return u.listener=h,this.addListener(i,u),this};O0.prependOnceListener=function(i,h){M2(h);let u=f1.bind(this,i,h);return u.listener=h,this.prependListener(i,u),this};O0.removeListener=function(i,h){M2(h);var{_events:u}=this;if(!u)return this;var n=u[i];if(!n)return this;var g=n.length;let c=-1;for(let I=g-1;I>=0;I--)if(n[I]===h||n[I].listener===h){c=I;break}if(c<0)return this;if(c===0)n.shift();else n.splice(c,1);if(n.length===0)delete u[i],this._eventsCount--;return this};O0.off=O0.removeListener;O0.removeAllListeners=function(i){var{_events:h}=this;if(i&&h){if(h[i])delete h[i],this._eventsCount--}else this._events={__proto__:null};return this};O0.listeners=function(i){var{_events:h}=this;if(!h)return[];var u=h[i];if(!u)return[];return u.map((n)=>n.listener??n)};O0.rawListeners=function(i){var{_events:h}=this;if(!h)return[];var u=h[i];if(!u)return[];return u.slice()};O0.listenerCount=function(i){var{_events:h}=this;if(!h)return 0;return h[i]?.length??0};O0.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]};O0[c2]=!1;a2=class a2 extends Error{constructor(i="The operation was aborted",h=void 0){if(h!==void 0&&typeof h!=="object")throw U2("options","Object",h);super(i,h);this.code="ABORT_ERR",this.name="AbortError"}};Object.defineProperties(a0,{captureRejections:{get(){return O0[c2]},set(i){ph(i,"EventEmitter.captureRejections"),O0[c2]=i},enumerable:!0},defaultMaxListeners:{enumerable:!0,get:()=>{return B2},set:(i)=>{ii(i,"defaultMaxListeners",0),B2=i}},kMaxEventTargetListeners:{value:Dh,enumerable:!1,configurable:!1,writable:!1},kMaxEventTargetListenersWarned:{value:Ph,enumerable:!1,configurable:!1,writable:!1}});Object.assign(a0,{once:E1,getEventListeners:U1,getMaxListeners:r1,setMaxListeners:A1,EventEmitter:a0,usingDomains:!1,captureRejectionSymbol:B1,errorMonitor:c1,addAbortListener:O1,init:a0,listenerCount:T1});kh=a0});var gi=k1(($u,J1)=>{var x0=(i,h)=>()=>(h||i((h={exports:{}}).exports,h),h.exports),M0=x0((i,h)=>{class u extends Error{constructor(n){if(!Array.isArray(n))throw TypeError(`Expected input to be an Array, got ${typeof n}`);let g="";for(let c=0;c<n.length;c++)g+=` ${n[c].stack}
|
|
2
|
+
`;super(g);this.name="AggregateError",this.errors=n}}h.exports={AggregateError:u,ArrayIsArray(n){return Array.isArray(n)},ArrayPrototypeIncludes(n,g){return n.includes(g)},ArrayPrototypeIndexOf(n,g){return n.indexOf(g)},ArrayPrototypeJoin(n,g){return n.join(g)},ArrayPrototypeMap(n,g){return n.map(g)},ArrayPrototypePop(n,g){return n.pop(g)},ArrayPrototypePush(n,g){return n.push(g)},ArrayPrototypeSlice(n,g,c){return n.slice(g,c)},Error,FunctionPrototypeCall(n,g,...c){return n.call(g,...c)},FunctionPrototypeSymbolHasInstance(n,g){return Function.prototype[Symbol.hasInstance].call(n,g)},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(n,g){return Object.defineProperties(n,g)},ObjectDefineProperty(n,g,c){return Object.defineProperty(n,g,c)},ObjectGetOwnPropertyDescriptor(n,g){return Object.getOwnPropertyDescriptor(n,g)},ObjectKeys(n){return Object.keys(n)},ObjectSetPrototypeOf(n,g){return Object.setPrototypeOf(n,g)},Promise,PromisePrototypeCatch(n,g){return n.catch(g)},PromisePrototypeThen(n,g,c){return n.then(g,c)},PromiseReject(n){return Promise.reject(n)},PromiseResolve(n){return Promise.resolve(n)},ReflectApply:Reflect.apply,RegExpPrototypeTest(n,g){return n.test(g)},SafeSet:Set,String,StringPrototypeSlice(n,g,c){return n.slice(g,c)},StringPrototypeToLowerCase(n){return n.toLowerCase()},StringPrototypeToUpperCase(n){return n.toUpperCase()},StringPrototypeTrim(n){return n.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(n,g,c){return n.set(g,c)},Boolean,Uint8Array}}),L1=x0((i,h)=>{h.exports={format(u,...n){return u.replace(/%([sdifj])/g,function(...[g,c]){let I=n.shift();if(c==="f")return I.toFixed(6);else if(c==="j")return JSON.stringify(I);else if(c==="s"&&typeof I==="object")return`${I.constructor!==Object?I.constructor.name:""} {}`.trim();else return I.toString()})},inspect(u){switch(typeof u){case"string":if(u.includes("'")){if(!u.includes('"'))return`"${u}"`;else if(!u.includes("`")&&!u.includes("${"))return`\`${u}\``}return`'${u}'`;case"number":if(isNaN(u))return"NaN";else if(Object.is(u,-0))return String(u);return u;case"bigint":return`${String(u)}n`;case"boolean":case"undefined":return String(u);case"object":return"{}"}}}}),y0=x0((i,h)=>{var{format:u,inspect:n}=L1(),{AggregateError:g}=M0(),c=globalThis.AggregateError||g,I=Symbol("kIsNodeError"),E=["string","function","number","object","Function","Object","boolean","bigint","symbol"],U=/^([A-Z][a-z0-9]*)+$/,T={};function x(X,f){if(!X)throw new T.ERR_INTERNAL_ASSERTION(f)}function R(X){let f="",M=X.length,$=X[0]==="-"?1:0;for(;M>=$+4;M-=3)f=`_${X.slice(M-3,M)}${f}`;return`${X.slice(0,M)}${f}`}function N(X,f,M){if(typeof f==="function")return x(f.length<=M.length,`Code: ${X}; The provided arguments length (${M.length}) does not match the required ones (${f.length}).`),f(...M);let $=(f.match(/%[dfijoOs]/g)||[]).length;if(x($===M.length,`Code: ${X}; The provided arguments length (${M.length}) does not match the required ones (${$}).`),M.length===0)return f;return u(f,...M)}function y(X,f,M){if(!M)M=Error;class $ extends M{constructor(...F){super(N(X,f,F))}toString(){return`${this.name} [${X}]: ${this.message}`}}Object.defineProperties($.prototype,{name:{value:M.name,writable:!0,enumerable:!1,configurable:!0},toString:{value(){return`${this.name} [${X}]: ${this.message}`},writable:!0,enumerable:!1,configurable:!0}}),$.prototype.code=X,$.prototype[I]=!0,T[X]=$}function v(X){let f="__node_internal_"+X.name;return Object.defineProperty(X,"name",{value:f}),X}function t(X,f){if(X&&f&&X!==f){if(Array.isArray(f.errors))return f.errors.push(X),f;let M=new c([f,X],f.message);return M.code=f.code,M}return X||f}class J extends Error{constructor(X="The operation was aborted",f=void 0){if(f!==void 0&&typeof f!=="object")throw new T.ERR_INVALID_ARG_TYPE("options","Object",f);super(X,f);this.code="ABORT_ERR",this.name="AbortError"}}y("ERR_ASSERTION","%s",Error),y("ERR_INVALID_ARG_TYPE",(X,f,M)=>{if(x(typeof X==="string","'name' must be a string"),!Array.isArray(f))f=[f];let $="The ";if(X.endsWith(" argument"))$+=`${X} `;else $+=`"${X}" ${X.includes(".")?"property":"argument"} `;$+="must be ";let F=[],k=[],B0=[];for(let b of f)if(x(typeof b==="string","All expected entries have to be of type string"),E.includes(b))F.push(b.toLowerCase());else if(U.test(b))k.push(b);else x(b!=="object",'The value "object" should be written as "Object"'),B0.push(b);if(k.length>0){let b=F.indexOf("object");if(b!==-1)F.splice(F,b,1),k.push("Object")}if(F.length>0){switch(F.length){case 1:$+=`of type ${F[0]}`;break;case 2:$+=`one of type ${F[0]} or ${F[1]}`;break;default:{let b=F.pop();$+=`one of type ${F.join(", ")}, or ${b}`}}if(k.length>0||B0.length>0)$+=" or "}if(k.length>0){switch(k.length){case 1:$+=`an instance of ${k[0]}`;break;case 2:$+=`an instance of ${k[0]} or ${k[1]}`;break;default:{let b=k.pop();$+=`an instance of ${k.join(", ")}, or ${b}`}}if(B0.length>0)$+=" or "}switch(B0.length){case 0:break;case 1:if(B0[0].toLowerCase()!==B0[0])$+="an ";$+=`${B0[0]}`;break;case 2:$+=`one of ${B0[0]} or ${B0[1]}`;break;default:{let b=B0.pop();$+=`one of ${B0.join(", ")}, or ${b}`}}if(M==null)$+=`. Received ${M}`;else if(typeof M==="function"&&M.name)$+=`. Received function ${M.name}`;else if(typeof M==="object"){var f0;if((f0=M.constructor)!==null&&f0!==void 0&&f0.name)$+=`. Received an instance of ${M.constructor.name}`;else{let b=n(M,{depth:-1});$+=`. Received ${b}`}}else{let b=n(M,{colors:!1});if(b.length>25)b=`${b.slice(0,25)}...`;$+=`. Received type ${typeof M} (${b})`}return $},TypeError),y("ERR_INVALID_ARG_VALUE",(X,f,M="is invalid")=>{let $=n(f);if($.length>128)$=$.slice(0,128)+"...";return`The ${X.includes(".")?"property":"argument"} '${X}' ${M}. Received ${$}`},TypeError),y("ERR_INVALID_RETURN_VALUE",(X,f,M)=>{var $;let F=M!==null&&M!==void 0&&($=M.constructor)!==null&&$!==void 0&&$.name?`instance of ${M.constructor.name}`:`type ${typeof M}`;return`Expected ${X} to be returned from the "${f}" function but got ${F}.`},TypeError),y("ERR_MISSING_ARGS",(...X)=>{x(X.length>0,"At least one arg needs to be specified");let f,M=X.length;switch(X=(Array.isArray(X)?X:[X]).map(($)=>`"${$}"`).join(" or "),M){case 1:f+=`The ${X[0]} argument`;break;case 2:f+=`The ${X[0]} and ${X[1]} arguments`;break;default:{let $=X.pop();f+=`The ${X.join(", ")}, and ${$} arguments`}break}return`${f} must be specified`},TypeError),y("ERR_OUT_OF_RANGE",(X,f,M)=>{x(f,'Missing "range" argument');let $;if(Number.isInteger(M)&&Math.abs(M)>4294967296)$=R(String(M));else if(typeof M==="bigint"){$=String(M);let F=BigInt(2)**BigInt(32);if(M>F||M<-F)$=R($);$+="n"}else $=n(M);return`The value of "${X}" is out of range. It must be ${f}. Received ${$}`},RangeError),y("ERR_MULTIPLE_CALLBACK","Callback called multiple times",Error),y("ERR_METHOD_NOT_IMPLEMENTED","The %s method is not implemented",Error),y("ERR_STREAM_ALREADY_FINISHED","Cannot call %s after a stream was finished",Error),y("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable",Error),y("ERR_STREAM_DESTROYED","Cannot call %s after a stream was destroyed",Error),y("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),y("ERR_STREAM_PREMATURE_CLOSE","Premature close",Error),y("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF",Error),y("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event",Error),y("ERR_STREAM_WRITE_AFTER_END","write after end",Error),y("ERR_UNKNOWN_ENCODING","Unknown encoding: %s",TypeError),h.exports={AbortError:J,aggregateTwoErrors:v(t),hideStackFrames:v,codes:T}}),mh=x0((i,h)=>{Object.defineProperty(i,"__esModule",{value:!0});var u=new WeakMap,n=new WeakMap;function g(Q){let j=u.get(Q);return console.assert(j!=null,"'this' is expected an Event object, but got",Q),j}function c(Q){if(Q.passiveListener!=null){if(typeof console<"u"&&typeof console.error==="function")console.error("Unable to preventDefault inside passive event listener invocation.",Q.passiveListener);return}if(!Q.event.cancelable)return;if(Q.canceled=!0,typeof Q.event.preventDefault==="function")Q.event.preventDefault()}function I(Q,j){u.set(this,{eventTarget:Q,event:j,eventPhase:2,currentTarget:Q,canceled:!1,stopped:!1,immediateStopped:!1,passiveListener:null,timeStamp:j.timeStamp||Date.now()}),Object.defineProperty(this,"isTrusted",{value:!1,enumerable:!0});let L=Object.keys(j);for(let z=0;z<L.length;++z){let q=L[z];if(!(q in this))Object.defineProperty(this,q,E(q))}}if(I.prototype={get type(){return g(this).event.type},get target(){return g(this).eventTarget},get currentTarget(){return g(this).currentTarget},composedPath(){let Q=g(this).currentTarget;if(Q==null)return[];return[Q]},get NONE(){return 0},get CAPTURING_PHASE(){return 1},get AT_TARGET(){return 2},get BUBBLING_PHASE(){return 3},get eventPhase(){return g(this).eventPhase},stopPropagation(){let Q=g(this);if(Q.stopped=!0,typeof Q.event.stopPropagation==="function")Q.event.stopPropagation()},stopImmediatePropagation(){let Q=g(this);if(Q.stopped=!0,Q.immediateStopped=!0,typeof Q.event.stopImmediatePropagation==="function")Q.event.stopImmediatePropagation()},get bubbles(){return Boolean(g(this).event.bubbles)},get cancelable(){return Boolean(g(this).event.cancelable)},preventDefault(){c(g(this))},get defaultPrevented(){return g(this).canceled},get composed(){return Boolean(g(this).event.composed)},get timeStamp(){return g(this).timeStamp},get srcElement(){return g(this).eventTarget},get cancelBubble(){return g(this).stopped},set cancelBubble(Q){if(!Q)return;let j=g(this);if(j.stopped=!0,typeof j.event.cancelBubble==="boolean")j.event.cancelBubble=!0},get returnValue(){return!g(this).canceled},set returnValue(Q){if(!Q)c(g(this))},initEvent(){}},Object.defineProperty(I.prototype,"constructor",{value:I,configurable:!0,writable:!0}),typeof window<"u"&&typeof window.Event<"u")Object.setPrototypeOf(I.prototype,window.Event.prototype),n.set(window.Event.prototype,I);function E(Q){return{get(){return g(this).event[Q]},set(j){g(this).event[Q]=j},configurable:!0,enumerable:!0}}function U(Q){return{value(){let j=g(this).event;return j[Q].apply(j,arguments)},configurable:!0,enumerable:!0}}function T(Q,j){let L=Object.keys(j);if(L.length===0)return Q;function z(q,Z){Q.call(this,q,Z)}z.prototype=Object.create(Q.prototype,{constructor:{value:z,configurable:!0,writable:!0}});for(let q=0;q<L.length;++q){let Z=L[q];if(!(Z in Q.prototype)){let l=typeof Object.getOwnPropertyDescriptor(j,Z).value==="function";Object.defineProperty(z.prototype,Z,l?U(Z):E(Z))}}return z}function x(Q){if(Q==null||Q===Object.prototype)return I;let j=n.get(Q);if(j==null)j=T(x(Object.getPrototypeOf(Q)),Q),n.set(Q,j);return j}function R(Q,j){return new(x(Object.getPrototypeOf(j)))(Q,j)}function N(Q){return g(Q).immediateStopped}function y(Q,j){g(Q).eventPhase=j}function v(Q,j){g(Q).currentTarget=j}function t(Q,j){g(Q).passiveListener=j}var J=new WeakMap,X=1,f=2,M=3;function $(Q){return Q!==null&&typeof Q==="object"}function F(Q){let j=J.get(Q);if(j==null)throw TypeError("'this' is expected an EventTarget object, but got another value.");return j}function k(Q){return{get(){let j=F(this).get(Q);while(j!=null){if(j.listenerType===M)return j.listener;j=j.next}return null},set(j){if(typeof j!=="function"&&!$(j))j=null;let L=F(this),z=null,q=L.get(Q);while(q!=null){if(q.listenerType===M)if(z!==null)z.next=q.next;else if(q.next!==null)L.set(Q,q.next);else L.delete(Q);else z=q;q=q.next}if(j!==null){let Z={listener:j,listenerType:M,passive:!1,once:!1,next:null};if(z===null)L.set(Q,Z);else z.next=Z}},configurable:!0,enumerable:!0}}function B0(Q,j){Object.defineProperty(Q,`on${j}`,k(j))}function f0(Q){function j(){b.call(this)}j.prototype=Object.create(b.prototype,{constructor:{value:j,configurable:!0,writable:!0}});for(let L=0;L<Q.length;++L)B0(j.prototype,Q[L]);return j}function b(){if(this instanceof b){J.set(this,new Map);return}if(arguments.length===1&&Array.isArray(arguments[0]))return f0(arguments[0]);if(arguments.length>0){let Q=Array(arguments.length);for(let j=0;j<arguments.length;++j)Q[j]=arguments[j];return f0(Q)}throw TypeError("Cannot call a class as a function")}if(b.prototype={addEventListener(Q,j,L){if(j==null)return;if(typeof j!=="function"&&!$(j))throw TypeError("'listener' should be a function or an object.");let z=F(this),q=$(L),Z=(q?Boolean(L.capture):Boolean(L))?X:f,l={listener:j,listenerType:Z,passive:q&&Boolean(L.passive),once:q&&Boolean(L.once),next:null},i0=z.get(Q);if(i0===void 0){z.set(Q,l);return}let n0=null;while(i0!=null){if(i0.listener===j&&i0.listenerType===Z)return;n0=i0,i0=i0.next}n0.next=l},removeEventListener(Q,j,L){if(j==null)return;let z=F(this),q=($(L)?Boolean(L.capture):Boolean(L))?X:f,Z=null,l=z.get(Q);while(l!=null){if(l.listener===j&&l.listenerType===q){if(Z!==null)Z.next=l.next;else if(l.next!==null)z.set(Q,l.next);else z.delete(Q);return}Z=l,l=l.next}},dispatchEvent(Q){if(Q==null||typeof Q.type!=="string")throw TypeError('"event.type" should be a string.');let j=F(this),L=Q.type,z=j.get(L);if(z==null)return!0;let q=R(this,Q),Z=null;while(z!=null){if(z.once)if(Z!==null)Z.next=z.next;else if(z.next!==null)j.set(L,z.next);else j.delete(L);else Z=z;if(t(q,z.passive?z.listener:null),typeof z.listener==="function")try{z.listener.call(this,q)}catch(l){if(typeof console<"u"&&typeof console.error==="function")console.error(l)}else if(z.listenerType!==M&&typeof z.listener.handleEvent==="function")z.listener.handleEvent(q);if(N(q))break;z=z.next}return t(q,null),y(q,0),v(q,null),!q.defaultPrevented}},Object.defineProperty(b.prototype,"constructor",{value:b,configurable:!0,writable:!0}),typeof window<"u"&&typeof window.EventTarget<"u")Object.setPrototypeOf(b.prototype,window.EventTarget.prototype);i.defineEventAttribute=B0,i.EventTarget=b,i.default=b,h.exports=b,h.exports.EventTarget=h.exports.default=b,h.exports.defineEventAttribute=B0}),Z2=x0((i,h)=>{Object.defineProperty(i,"__esModule",{value:!0});var u=mh();class n extends u.EventTarget{constructor(){super();throw TypeError("AbortSignal cannot be constructed directly")}get aborted(){let x=I.get(this);if(typeof x!=="boolean")throw TypeError(`Expected 'this' to be an 'AbortSignal' object, but got ${this===null?"null":typeof this}`);return x}}u.defineEventAttribute(n.prototype,"abort");function g(){let x=Object.create(n.prototype);return u.EventTarget.call(x),I.set(x,!1),x}function c(x){if(I.get(x)!==!1)return;I.set(x,!0),x.dispatchEvent({type:"abort"})}var I=new WeakMap;if(Object.defineProperties(n.prototype,{aborted:{enumerable:!0}}),typeof Symbol==="function"&&typeof Symbol.toStringTag==="symbol")Object.defineProperty(n.prototype,Symbol.toStringTag,{configurable:!0,value:"AbortSignal"});class E{constructor(){U.set(this,g())}get signal(){return T(this)}abort(){c(T(this))}}var U=new WeakMap;function T(x){let R=U.get(x);if(R==null)throw TypeError(`Expected 'this' to be an 'AbortController' object, but got ${x===null?"null":typeof x}`);return R}if(Object.defineProperties(E.prototype,{signal:{enumerable:!0},abort:{enumerable:!0}}),typeof Symbol==="function"&&typeof Symbol.toStringTag==="symbol")Object.defineProperty(E.prototype,Symbol.toStringTag,{configurable:!0,value:"AbortController"});i.AbortController=E,i.AbortSignal=n,i.default=E,h.exports=E,h.exports.AbortController=h.exports.default=E,h.exports.AbortSignal=n}),q0=x0((i,h)=>{var u=(d0(),Q0(m0)),{format:n,inspect:g}=L1(),{codes:{ERR_INVALID_ARG_TYPE:c}}=y0(),{kResistStopPropagation:I,AggregateError:E,SymbolDispose:U}=M0(),T=globalThis.AbortSignal||Z2().AbortSignal,x=globalThis.AbortController||Z2().AbortController,R=Object.getPrototypeOf(async function(){}).constructor,N=globalThis.Blob||u.Blob,y=typeof N<"u"?function(J){return J instanceof N}:function(J){return!1},v=(J,X)=>{if(J!==void 0&&(J===null||typeof J!=="object"||!("aborted"in J)))throw new c(X,"AbortSignal",J)},t=(J,X)=>{if(typeof J!=="function")throw new c(X,"Function",J)};h.exports={AggregateError:E,kEmptyObject:Object.freeze({}),once(J){let X=!1;return function(...f){if(X)return;X=!0,J.apply(this,f)}},createDeferredPromise:function(){let J,X;return{promise:new Promise((f,M)=>{J=f,X=M}),resolve:J,reject:X}},promisify(J){return new Promise((X,f)=>{J((M,...$)=>{if(M)return f(M);return X(...$)})})},debuglog(){return function(){}},format:n,inspect:g,types:{isAsyncFunction(J){return J instanceof R},isArrayBufferView(J){return ArrayBuffer.isView(J)}},isBlob:y,deprecate(J,X){return J},addAbortListener:(R2(),Q0(C2)).addAbortListener||function(J,X){if(J===void 0)throw new c("signal","AbortSignal",J);v(J,"signal"),t(X,"listener");let f;if(J.aborted)queueMicrotask(()=>X());else J.addEventListener("abort",X,{__proto__:null,once:!0,[I]:!0}),f=()=>{J.removeEventListener("abort",X)};return{__proto__:null,[U](){var M;(M=f)===null||M===void 0||M()}}},AbortSignalAny:T.any||function(J){if(J.length===1)return J[0];let X=new x,f=()=>X.abort();return J.forEach((M)=>{v(M,"signals"),M.addEventListener("abort",f,{once:!0})}),X.signal.addEventListener("abort",()=>{J.forEach((M)=>M.removeEventListener("abort",f))},{once:!0}),X.signal}},h.exports.promisify.custom=Symbol.for("nodejs.util.promisify.custom")}),$2=x0((i,h)=>{var{ArrayIsArray:u,ArrayPrototypeIncludes:n,ArrayPrototypeJoin:g,ArrayPrototypeMap:c,NumberIsInteger:I,NumberIsNaN:E,NumberMAX_SAFE_INTEGER:U,NumberMIN_SAFE_INTEGER:T,NumberParseInt:x,ObjectPrototypeHasOwnProperty:R,RegExpPrototypeExec:N,String:y,StringPrototypeToUpperCase:v,StringPrototypeTrim:t}=M0(),{hideStackFrames:J,codes:{ERR_SOCKET_BAD_PORT:X,ERR_INVALID_ARG_TYPE:f,ERR_INVALID_ARG_VALUE:M,ERR_OUT_OF_RANGE:$,ERR_UNKNOWN_SIGNAL:F}}=y0(),{normalizeEncoding:k}=q0(),{isAsyncFunction:B0,isArrayBufferView:f0}=q0().types,b={};function Q(O){return O===(O|0)}function j(O){return O===O>>>0}var L=/^[0-7]+$/,z="must be a 32-bit unsigned integer or an octal string";function q(O,Y,e){if(typeof O>"u")O=e;if(typeof O==="string"){if(N(L,O)===null)throw new M(Y,O,z);O=x(O,8)}return i0(O,Y),O}var Z=J((O,Y,e=T,V=U)=>{if(typeof O!=="number")throw new f(Y,"number",O);if(!I(O))throw new $(Y,"an integer",O);if(O<e||O>V)throw new $(Y,`>= ${e} && <= ${V}`,O)}),l=J((O,Y,e=-2147483648,V=2147483647)=>{if(typeof O!=="number")throw new f(Y,"number",O);if(!I(O))throw new $(Y,"an integer",O);if(O<e||O>V)throw new $(Y,`>= ${e} && <= ${V}`,O)}),i0=J((O,Y,e=!1)=>{if(typeof O!=="number")throw new f(Y,"number",O);if(!I(O))throw new $(Y,"an integer",O);let V=e?1:0,c0=4294967295;if(O<V||O>c0)throw new $(Y,`>= ${V} && <= ${c0}`,O)});function n0(O,Y){if(typeof O!=="string")throw new f(Y,"string",O)}function A0(O,Y,e=void 0,V){if(typeof O!=="number")throw new f(Y,"number",O);if(e!=null&&O<e||V!=null&&O>V||(e!=null||V!=null)&&E(O))throw new $(Y,`${e!=null?`>= ${e}`:""}${e!=null&&V!=null?" && ":""}${V!=null?`<= ${V}`:""}`,O)}var P=J((O,Y,e)=>{if(!n(e,O)){let V="must be one of: "+g(c(e,(c0)=>typeof c0==="string"?`'${c0}'`:y(c0)),", ");throw new M(Y,O,V)}});function g0(O,Y){if(typeof O!=="boolean")throw new f(Y,"boolean",O)}function A(O,Y,e){return O==null||!R(O,Y)?e:O[Y]}var _=J((O,Y,e=null)=>{let V=A(e,"allowArray",!1),c0=A(e,"allowFunction",!1);if(!A(e,"nullable",!1)&&O===null||!V&&u(O)||typeof O!=="object"&&(!c0||typeof O!=="function"))throw new f(Y,"Object",O)}),s=J((O,Y)=>{if(O!=null&&typeof O!=="object"&&typeof O!=="function")throw new f(Y,"a dictionary",O)}),K=J((O,Y,e=0)=>{if(!u(O))throw new f(Y,"Array",O);if(O.length<e){let V=`must be longer than ${e}`;throw new M(Y,O,V)}});function u0(O,Y){K(O,Y);for(let e=0;e<O.length;e++)n0(O[e],`${Y}[${e}]`)}function I0(O,Y){K(O,Y);for(let e=0;e<O.length;e++)g0(O[e],`${Y}[${e}]`)}function T0(O,Y){K(O,Y);for(let e=0;e<O.length;e++){let V=O[e],c0=`${Y}[${e}]`;if(V==null)throw new f(c0,"AbortSignal",V);w0(V,c0)}}function U0(O,Y="signal"){if(n0(O,Y),b[O]===void 0){if(b[v(O)]!==void 0)throw new F(O+" (signals must use all capital letters)");throw new F(O)}}var H=J((O,Y="buffer")=>{if(!f0(O))throw new f(Y,["Buffer","TypedArray","DataView"],O)});function D(O,Y){let e=k(Y),V=O.length;if(e==="hex"&&V%2!==0)throw new M("encoding",Y,`is invalid for data of length ${V}`)}function m(O,Y="Port",e=!0){if(typeof O!=="number"&&typeof O!=="string"||typeof O==="string"&&t(O).length===0||+O!==+O>>>0||O>65535||O===0&&!e)throw new X(Y,O,e);return O|0}var w0=J((O,Y)=>{if(O!==void 0&&(O===null||typeof O!=="object"||!("aborted"in O)))throw new f(Y,"AbortSignal",O)}),E0=J((O,Y)=>{if(typeof O!=="function")throw new f(Y,"Function",O)}),r=J((O,Y)=>{if(typeof O!=="function"||B0(O))throw new f(Y,"Function",O)}),C=J((O,Y)=>{if(O!==void 0)throw new f(Y,"undefined",O)});function S(O,Y,e){if(!n(e,O))throw new f(Y,`('${g(e,"|")}')`,O)}var p=/^(?:<[^>]*>)(?:\s*;\s*[^;"\s]+(?:=(")?[^;"\s]*\1)?)*$/;function o(O,Y){if(typeof O>"u"||!N(p,O))throw new M(Y,O,'must be an array or string of format "</styles.css>; rel=preload; as=style"')}function d(O){if(typeof O==="string")return o(O,"hints"),O;else if(u(O)){let Y=O.length,e="";if(Y===0)return e;for(let V=0;V<Y;V++){let c0=O[V];if(o(c0,"hints"),e+=c0,V!==Y-1)e+=", "}return e}throw new M("hints",O,'must be an array or string of format "</styles.css>; rel=preload; as=style"')}h.exports={isInt32:Q,isUint32:j,parseFileMode:q,validateArray:K,validateStringArray:u0,validateBooleanArray:I0,validateAbortSignalArray:T0,validateBoolean:g0,validateBuffer:H,validateDictionary:s,validateEncoding:D,validateFunction:E0,validateInt32:l,validateInteger:Z,validateNumber:A0,validateObject:_,validateOneOf:P,validatePlainFunction:r,validatePort:m,validateSignalName:U0,validateString:n0,validateUint32:i0,validateUndefined:C,validateUnion:S,validateAbortSignal:w0,validateLinkHeaderValue:d}}),I2=x0((i,h)=>{h.exports=globalThis.process}),l0=x0((i,h)=>{var{SymbolAsyncIterator:u,SymbolIterator:n,SymbolFor:g}=M0(),c=g("nodejs.stream.destroyed"),I=g("nodejs.stream.errored"),E=g("nodejs.stream.readable"),U=g("nodejs.stream.writable"),T=g("nodejs.stream.disturbed"),x=g("nodejs.webstream.isClosedPromise"),R=g("nodejs.webstream.controllerErrorFunction");function N(A,_=!1){var s;return!!(A&&typeof A.pipe==="function"&&typeof A.on==="function"&&(!_||typeof A.pause==="function"&&typeof A.resume==="function")&&(!A._writableState||((s=A._readableState)===null||s===void 0?void 0:s.readable)!==!1)&&(!A._writableState||A._readableState))}function y(A){var _;return!!(A&&typeof A.write==="function"&&typeof A.on==="function"&&(!A._readableState||((_=A._writableState)===null||_===void 0?void 0:_.writable)!==!1))}function v(A){return!!(A&&typeof A.pipe==="function"&&A._readableState&&typeof A.on==="function"&&typeof A.write==="function")}function t(A){return A&&(A._readableState||A._writableState||typeof A.write==="function"&&typeof A.on==="function"||typeof A.pipe==="function"&&typeof A.on==="function")}function J(A){return!!(A&&!t(A)&&typeof A.pipeThrough==="function"&&typeof A.getReader==="function"&&typeof A.cancel==="function")}function X(A){return!!(A&&!t(A)&&typeof A.getWriter==="function"&&typeof A.abort==="function")}function f(A){return!!(A&&!t(A)&&typeof A.readable==="object"&&typeof A.writable==="object")}function M(A){return J(A)||X(A)||f(A)}function $(A,_){if(A==null)return!1;if(_===!0)return typeof A[u]==="function";if(_===!1)return typeof A[n]==="function";return typeof A[u]==="function"||typeof A[n]==="function"}function F(A){if(!t(A))return null;let{_writableState:_,_readableState:s}=A,K=_||s;return!!(A.destroyed||A[c]||K!==null&&K!==void 0&&K.destroyed)}function k(A){if(!y(A))return null;if(A.writableEnded===!0)return!0;let _=A._writableState;if(_!==null&&_!==void 0&&_.errored)return!1;if(typeof(_===null||_===void 0?void 0:_.ended)!=="boolean")return null;return _.ended}function B0(A,_){if(!y(A))return null;if(A.writableFinished===!0)return!0;let s=A._writableState;if(s!==null&&s!==void 0&&s.errored)return!1;if(typeof(s===null||s===void 0?void 0:s.finished)!=="boolean")return null;return!!(s.finished||_===!1&&s.ended===!0&&s.length===0)}function f0(A){if(!N(A))return null;if(A.readableEnded===!0)return!0;let _=A._readableState;if(!_||_.errored)return!1;if(typeof(_===null||_===void 0?void 0:_.ended)!=="boolean")return null;return _.ended}function b(A,_){if(!N(A))return null;let s=A._readableState;if(s!==null&&s!==void 0&&s.errored)return!1;if(typeof(s===null||s===void 0?void 0:s.endEmitted)!=="boolean")return null;return!!(s.endEmitted||_===!1&&s.ended===!0&&s.length===0)}function Q(A){if(A&&A[E]!=null)return A[E];if(typeof(A===null||A===void 0?void 0:A.readable)!=="boolean")return null;if(F(A))return!1;return N(A)&&A.readable&&!b(A)}function j(A){if(A&&A[U]!=null)return A[U];if(typeof(A===null||A===void 0?void 0:A.writable)!=="boolean")return null;if(F(A))return!1;return y(A)&&A.writable&&!k(A)}function L(A,_){if(!t(A))return null;if(F(A))return!0;if((_===null||_===void 0?void 0:_.readable)!==!1&&Q(A))return!1;if((_===null||_===void 0?void 0:_.writable)!==!1&&j(A))return!1;return!0}function z(A){var _,s;if(!t(A))return null;if(A.writableErrored)return A.writableErrored;return(_=(s=A._writableState)===null||s===void 0?void 0:s.errored)!==null&&_!==void 0?_:null}function q(A){var _,s;if(!t(A))return null;if(A.readableErrored)return A.readableErrored;return(_=(s=A._readableState)===null||s===void 0?void 0:s.errored)!==null&&_!==void 0?_:null}function Z(A){if(!t(A))return null;if(typeof A.closed==="boolean")return A.closed;let{_writableState:_,_readableState:s}=A;if(typeof(_===null||_===void 0?void 0:_.closed)==="boolean"||typeof(s===null||s===void 0?void 0:s.closed)==="boolean")return(_===null||_===void 0?void 0:_.closed)||(s===null||s===void 0?void 0:s.closed);if(typeof A._closed==="boolean"&&l(A))return A._closed;return null}function l(A){return typeof A._closed==="boolean"&&typeof A._defaultKeepAlive==="boolean"&&typeof A._removedConnection==="boolean"&&typeof A._removedContLen==="boolean"}function i0(A){return typeof A._sent100==="boolean"&&l(A)}function n0(A){var _;return typeof A._consuming==="boolean"&&typeof A._dumped==="boolean"&&((_=A.req)===null||_===void 0?void 0:_.upgradeOrConnect)===void 0}function A0(A){if(!t(A))return null;let{_writableState:_,_readableState:s}=A,K=_||s;return!K&&i0(A)||!!(K&&K.autoDestroy&&K.emitClose&&K.closed===!1)}function P(A){var _;return!!(A&&((_=A[T])!==null&&_!==void 0?_:A.readableDidRead||A.readableAborted))}function g0(A){var _,s,K,u0,I0,T0,U0,H,D,m;return!!(A&&((_=(s=(K=(u0=(I0=(T0=A[I])!==null&&T0!==void 0?T0:A.readableErrored)!==null&&I0!==void 0?I0:A.writableErrored)!==null&&u0!==void 0?u0:(U0=A._readableState)===null||U0===void 0?void 0:U0.errorEmitted)!==null&&K!==void 0?K:(H=A._writableState)===null||H===void 0?void 0:H.errorEmitted)!==null&&s!==void 0?s:(D=A._readableState)===null||D===void 0?void 0:D.errored)!==null&&_!==void 0?_:(m=A._writableState)===null||m===void 0?void 0:m.errored))}h.exports={isDestroyed:F,kIsDestroyed:c,isDisturbed:P,kIsDisturbed:T,isErrored:g0,kIsErrored:I,isReadable:Q,kIsReadable:E,kIsClosedPromise:x,kControllerErrorFunction:R,kIsWritable:U,isClosed:Z,isDuplexNodeStream:v,isFinished:L,isIterable:$,isReadableNodeStream:N,isReadableStream:J,isReadableEnded:f0,isReadableFinished:b,isReadableErrored:q,isNodeStream:t,isWebStream:M,isWritable:j,isWritableNodeStream:y,isWritableStream:X,isWritableEnded:k,isWritableFinished:B0,isWritableErrored:z,isServerRequest:n0,isServerResponse:i0,willEmitClose:A0,isTransformStream:f}}),s0=x0((i,h)=>{var u=I2(),{AbortError:n,codes:g}=y0(),{ERR_INVALID_ARG_TYPE:c,ERR_STREAM_PREMATURE_CLOSE:I}=g,{kEmptyObject:E,once:U}=q0(),{validateAbortSignal:T,validateFunction:x,validateObject:R,validateBoolean:N}=$2(),{Promise:y,PromisePrototypeThen:v,SymbolDispose:t}=M0(),{isClosed:J,isReadable:X,isReadableNodeStream:f,isReadableStream:M,isReadableFinished:$,isReadableErrored:F,isWritable:k,isWritableNodeStream:B0,isWritableStream:f0,isWritableFinished:b,isWritableErrored:Q,isNodeStream:j,willEmitClose:L,kIsClosedPromise:z}=l0(),q;function Z(P){return P.setHeader&&typeof P.abort==="function"}var l=()=>{};function i0(P,g0,A){var _,s;if(arguments.length===2)A=g0,g0=E;else if(g0==null)g0=E;else R(g0,"options");if(x(A,"callback"),T(g0.signal,"options.signal"),A=U(A),M(P)||f0(P))return n0(P,g0,A);if(!j(P))throw new c("stream",["ReadableStream","WritableStream","Stream"],P);let K=(_=g0.readable)!==null&&_!==void 0?_:f(P),u0=(s=g0.writable)!==null&&s!==void 0?s:B0(P),I0=P._writableState,T0=P._readableState,U0=()=>{if(!P.writable)m()},H=L(P)&&f(P)===K&&B0(P)===u0,D=b(P,!1),m=()=>{if(D=!0,P.destroyed)H=!1;if(H&&(!P.readable||K))return;if(!K||w0)A.call(P)},w0=$(P,!1),E0=()=>{if(w0=!0,P.destroyed)H=!1;if(H&&(!P.writable||u0))return;if(!u0||D)A.call(P)},r=(O)=>{A.call(P,O)},C=J(P),S=()=>{C=!0;let O=Q(P)||F(P);if(O&&typeof O!=="boolean")return A.call(P,O);if(K&&!w0&&f(P,!0)){if(!$(P,!1))return A.call(P,new I)}if(u0&&!D){if(!b(P,!1))return A.call(P,new I)}A.call(P)},p=()=>{C=!0;let O=Q(P)||F(P);if(O&&typeof O!=="boolean")return A.call(P,O);A.call(P)},o=()=>{P.req.on("finish",m)};if(Z(P)){if(P.on("complete",m),!H)P.on("abort",S);if(P.req)o();else P.on("request",o)}else if(u0&&!I0)P.on("end",U0),P.on("close",U0);if(!H&&typeof P.aborted==="boolean")P.on("aborted",S);if(P.on("end",E0),P.on("finish",m),g0.error!==!1)P.on("error",r);if(P.on("close",S),C)u.nextTick(S);else if(I0!==null&&I0!==void 0&&I0.errorEmitted||T0!==null&&T0!==void 0&&T0.errorEmitted){if(!H)u.nextTick(p)}else if(!K&&(!H||X(P))&&(D||k(P)===!1))u.nextTick(p);else if(!u0&&(!H||k(P))&&(w0||X(P)===!1))u.nextTick(p);else if(T0&&P.req&&P.aborted)u.nextTick(p);let d=()=>{if(A=l,P.removeListener("aborted",S),P.removeListener("complete",m),P.removeListener("abort",S),P.removeListener("request",o),P.req)P.req.removeListener("finish",m);P.removeListener("end",U0),P.removeListener("close",U0),P.removeListener("finish",m),P.removeListener("end",E0),P.removeListener("error",r),P.removeListener("close",S)};if(g0.signal&&!C){let O=()=>{let Y=A;d(),Y.call(P,new n(void 0,{cause:g0.signal.reason}))};if(g0.signal.aborted)u.nextTick(O);else{q=q||q0().addAbortListener;let Y=q(g0.signal,O),e=A;A=U((...V)=>{Y[t](),e.apply(P,V)})}}return d}function n0(P,g0,A){let _=!1,s=l;if(g0.signal)if(s=()=>{_=!0,A.call(P,new n(void 0,{cause:g0.signal.reason}))},g0.signal.aborted)u.nextTick(s);else{q=q||q0().addAbortListener;let u0=q(g0.signal,s),I0=A;A=U((...T0)=>{u0[t](),I0.apply(P,T0)})}let K=(...u0)=>{if(!_)u.nextTick(()=>A.apply(P,u0))};return v(P[z].promise,K,K),l}function A0(P,g0){var A;let _=!1;if(g0===null)g0=E;if((A=g0)!==null&&A!==void 0&&A.cleanup)N(g0.cleanup,"cleanup"),_=g0.cleanup;return new y((s,K)=>{let u0=i0(P,g0,(I0)=>{if(_)u0();if(I0)K(I0);else s()})})}h.exports=i0,h.exports.finished=A0}),A2=x0((i,h)=>{var u=I2(),{aggregateTwoErrors:n,codes:{ERR_MULTIPLE_CALLBACK:g},AbortError:c}=y0(),{Symbol:I}=M0(),{kIsDestroyed:E,isDestroyed:U,isFinished:T,isServerRequest:x}=l0(),R=I("kDestroy"),N=I("kConstruct");function y(L,z,q){if(L){if(L.stack,z&&!z.errored)z.errored=L;if(q&&!q.errored)q.errored=L}}function v(L,z){let q=this._readableState,Z=this._writableState,l=Z||q;if(Z!==null&&Z!==void 0&&Z.destroyed||q!==null&&q!==void 0&&q.destroyed){if(typeof z==="function")z();return this}if(y(L,Z,q),Z)Z.destroyed=!0;if(q)q.destroyed=!0;if(!l.constructed)this.once(R,function(i0){t(this,n(i0,L),z)});else t(this,L,z);return this}function t(L,z,q){let Z=!1;function l(i0){if(Z)return;Z=!0;let{_readableState:n0,_writableState:A0}=L;if(y(i0,A0,n0),A0)A0.closed=!0;if(n0)n0.closed=!0;if(typeof q==="function")q(i0);if(i0)u.nextTick(J,L,i0);else u.nextTick(X,L)}try{L._destroy(z||null,l)}catch(i0){l(i0)}}function J(L,z){f(L,z),X(L)}function X(L){let{_readableState:z,_writableState:q}=L;if(q)q.closeEmitted=!0;if(z)z.closeEmitted=!0;if(q!==null&&q!==void 0&&q.emitClose||z!==null&&z!==void 0&&z.emitClose)L.emit("close")}function f(L,z){let{_readableState:q,_writableState:Z}=L;if(Z!==null&&Z!==void 0&&Z.errorEmitted||q!==null&&q!==void 0&&q.errorEmitted)return;if(Z)Z.errorEmitted=!0;if(q)q.errorEmitted=!0;L.emit("error",z)}function M(){let L=this._readableState,z=this._writableState;if(L)L.constructed=!0,L.closed=!1,L.closeEmitted=!1,L.destroyed=!1,L.errored=null,L.errorEmitted=!1,L.reading=!1,L.ended=L.readable===!1,L.endEmitted=L.readable===!1;if(z)z.constructed=!0,z.destroyed=!1,z.closed=!1,z.closeEmitted=!1,z.errored=null,z.errorEmitted=!1,z.finalCalled=!1,z.prefinished=!1,z.ended=z.writable===!1,z.ending=z.writable===!1,z.finished=z.writable===!1}function $(L,z,q){let{_readableState:Z,_writableState:l}=L;if(l!==null&&l!==void 0&&l.destroyed||Z!==null&&Z!==void 0&&Z.destroyed)return this;if(Z!==null&&Z!==void 0&&Z.autoDestroy||l!==null&&l!==void 0&&l.autoDestroy)L.destroy(z);else if(z){if(z.stack,l&&!l.errored)l.errored=z;if(Z&&!Z.errored)Z.errored=z;if(q)u.nextTick(f,L,z);else f(L,z)}}function F(L,z){if(typeof L._construct!=="function")return;let{_readableState:q,_writableState:Z}=L;if(q)q.constructed=!1;if(Z)Z.constructed=!1;if(L.once(N,z),L.listenerCount(N)>1)return;u.nextTick(k,L)}function k(L){let z=!1;function q(Z){if(z){$(L,Z!==null&&Z!==void 0?Z:new g);return}z=!0;let{_readableState:l,_writableState:i0}=L,n0=i0||l;if(l)l.constructed=!0;if(i0)i0.constructed=!0;if(n0.destroyed)L.emit(R,Z);else if(Z)$(L,Z,!0);else u.nextTick(B0,L)}try{L._construct((Z)=>{u.nextTick(q,Z)})}catch(Z){u.nextTick(q,Z)}}function B0(L){L.emit(N)}function f0(L){return(L===null||L===void 0?void 0:L.setHeader)&&typeof L.abort==="function"}function b(L){L.emit("close")}function Q(L,z){L.emit("error",z),u.nextTick(b,L)}function j(L,z){if(!L||U(L))return;if(!z&&!T(L))z=new c;if(x(L))L.socket=null,L.destroy(z);else if(f0(L))L.abort();else if(f0(L.req))L.req.abort();else if(typeof L.destroy==="function")L.destroy(z);else if(typeof L.close==="function")L.close();else if(z)u.nextTick(Q,L,z);else u.nextTick(b,L);if(!L.destroyed)L[E]=!0}h.exports={construct:F,destroyer:j,destroy:v,undestroy:M,errorOrDestroy:$}}),hi=x0((i,h)=>{var{ArrayIsArray:u,ObjectSetPrototypeOf:n}=M0(),{EventEmitter:g}=(R2(),Q0(C2));function c(E){g.call(this,E)}n(c.prototype,g.prototype),n(c,g),c.prototype.pipe=function(E,U){let T=this;function x(X){if(E.writable&&E.write(X)===!1&&T.pause)T.pause()}T.on("data",x);function R(){if(T.readable&&T.resume)T.resume()}if(E.on("drain",R),!E._isStdio&&(!U||U.end!==!1))T.on("end",y),T.on("close",v);let N=!1;function y(){if(N)return;N=!0,E.end()}function v(){if(N)return;if(N=!0,typeof E.destroy==="function")E.destroy()}function t(X){if(J(),g.listenerCount(this,"error")===0)this.emit("error",X)}I(T,"error",t),I(E,"error",t);function J(){T.removeListener("data",x),E.removeListener("drain",R),T.removeListener("end",y),T.removeListener("close",v),T.removeListener("error",t),E.removeListener("error",t),T.removeListener("end",J),T.removeListener("close",J),E.removeListener("close",J)}return T.on("end",J),T.on("close",J),E.on("close",J),E.emit("pipe",T),E};function I(E,U,T){if(typeof E.prependListener==="function")return E.prependListener(U,T);if(!E._events||!E._events[U])E.on(U,T);else if(u(E._events[U]))E._events[U].unshift(T);else E._events[U]=[T,E._events[U]]}h.exports={Stream:c,prependListener:I}}),S2=x0((i,h)=>{var{SymbolDispose:u}=M0(),{AbortError:n,codes:g}=y0(),{isNodeStream:c,isWebStream:I,kControllerErrorFunction:E}=l0(),U=s0(),{ERR_INVALID_ARG_TYPE:T}=g,x,R=(N,y)=>{if(typeof N!=="object"||!("aborted"in N))throw new T(y,"AbortSignal",N)};h.exports.addAbortSignal=function(N,y){if(R(N,"signal"),!c(y)&&!I(y))throw new T("stream",["ReadableStream","WritableStream","Stream"],y);return h.exports.addAbortSignalNoValidate(N,y)},h.exports.addAbortSignalNoValidate=function(N,y){if(typeof N!=="object"||!("aborted"in N))return y;let v=c(y)?()=>{y.destroy(new n(void 0,{cause:N.reason}))}:()=>{y[E](new n(void 0,{cause:N.reason}))};if(N.aborted)v();else{x=x||q0().addAbortListener;let t=x(N,v);U(y,t[u])}return y}}),dh=x0((i,h)=>{var{StringPrototypeSlice:u,SymbolIterator:n,TypedArrayPrototypeSet:g,Uint8Array:c}=M0(),{Buffer:I}=(d0(),Q0(m0)),{inspect:E}=q0();h.exports=class{constructor(){this.head=null,this.tail=null,this.length=0}push(U){let T={data:U,next:null};if(this.length>0)this.tail.next=T;else this.head=T;this.tail=T,++this.length}unshift(U){let T={data:U,next:this.head};if(this.length===0)this.tail=T;this.head=T,++this.length}shift(){if(this.length===0)return;let U=this.head.data;if(this.length===1)this.head=this.tail=null;else this.head=this.head.next;return--this.length,U}clear(){this.head=this.tail=null,this.length=0}join(U){if(this.length===0)return"";let T=this.head,x=""+T.data;while((T=T.next)!==null)x+=U+T.data;return x}concat(U){if(this.length===0)return I.alloc(0);let T=I.allocUnsafe(U>>>0),x=this.head,R=0;while(x)g(T,x.data,R),R+=x.data.length,x=x.next;return T}consume(U,T){let x=this.head.data;if(U<x.length){let R=x.slice(0,U);return this.head.data=x.slice(U),R}if(U===x.length)return this.shift();return T?this._getString(U):this._getBuffer(U)}first(){return this.head.data}*[n](){for(let U=this.head;U;U=U.next)yield U.data}_getString(U){let T="",x=this.head,R=0;do{let N=x.data;if(U>N.length)T+=N,U-=N.length;else{if(U===N.length)if(T+=N,++R,x.next)this.head=x.next;else this.head=this.tail=null;else T+=u(N,0,U),this.head=x,x.data=u(N,U);break}++R}while((x=x.next)!==null);return this.length-=R,T}_getBuffer(U){let T=I.allocUnsafe(U),x=U,R=this.head,N=0;do{let y=R.data;if(U>y.length)g(T,y,x-U),U-=y.length;else{if(U===y.length)if(g(T,y,x-U),++N,R.next)this.head=R.next;else this.head=this.tail=null;else g(T,new c(y.buffer,y.byteOffset,U),x-U),this.head=R,R.data=y.slice(U);break}++N}while((R=R.next)!==null);return this.length-=N,T}[Symbol.for("nodejs.util.inspect.custom")](U,T){return E(this,{...T,depth:0,customInspect:!1})}}}),F2=x0((i,h)=>{var{MathFloor:u,NumberIsInteger:n}=M0(),{validateInteger:g}=$2(),{ERR_INVALID_ARG_VALUE:c}=y0().codes,I=16384,E=16;function U(N,y,v){return N.highWaterMark!=null?N.highWaterMark:y?N[v]:null}function T(N){return N?E:I}function x(N,y){if(g(y,"value",0),N)E=y;else I=y}function R(N,y,v,t){let J=U(y,t,v);if(J!=null){if(!n(J)||J<0){let X=t?`options.${v}`:"options.highWaterMark";throw new c(X,J)}return u(J)}return T(N.objectMode)}h.exports={getHighWaterMark:R,getDefaultHighWaterMark:T,setDefaultHighWaterMark:x}}),th=x0((i,h)=>{/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */var u=(d0(),Q0(m0)),n=u.Buffer;function g(I,E){for(var U in I)E[U]=I[U]}if(n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow)h.exports=u;else g(u,i),i.Buffer=c;function c(I,E,U){return n(I,E,U)}c.prototype=Object.create(n.prototype),g(n,c),c.from=function(I,E,U){if(typeof I==="number")throw TypeError("Argument must not be a number");return n(I,E,U)},c.alloc=function(I,E,U){if(typeof I!=="number")throw TypeError("Argument must be a number");var T=n(I);if(E!==void 0)if(typeof U==="string")T.fill(E,U);else T.fill(E);else T.fill(0);return T},c.allocUnsafe=function(I){if(typeof I!=="number")throw TypeError("Argument must be a number");return n(I)},c.allocUnsafeSlow=function(I){if(typeof I!=="number")throw TypeError("Argument must be a number");return u.SlowBuffer(I)}}),lh=x0((i)=>{var h=th().Buffer,u=h.isEncoding||function(f){switch(f=""+f,f&&f.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function n(f){if(!f)return"utf8";var M;while(!0)switch(f){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return f;default:if(M)return;f=(""+f).toLowerCase(),M=!0}}function g(f){var M=n(f);if(typeof M!=="string"&&(h.isEncoding===u||!u(f)))throw Error("Unknown encoding: "+f);return M||f}i.StringDecoder=c;function c(f){this.encoding=g(f);var M;switch(this.encoding){case"utf16le":this.text=N,this.end=y,M=4;break;case"utf8":this.fillLast=T,M=4;break;case"base64":this.text=v,this.end=t,M=3;break;default:this.write=J,this.end=X;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=h.allocUnsafe(M)}c.prototype.write=function(f){if(f.length===0)return"";var M,$;if(this.lastNeed){if(M=this.fillLast(f),M===void 0)return"";$=this.lastNeed,this.lastNeed=0}else $=0;if($<f.length)return M?M+this.text(f,$):this.text(f,$);return M||""},c.prototype.end=R,c.prototype.text=x,c.prototype.fillLast=function(f){if(this.lastNeed<=f.length)return f.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);f.copy(this.lastChar,this.lastTotal-this.lastNeed,0,f.length),this.lastNeed-=f.length};function I(f){if(f<=127)return 0;else if(f>>5===6)return 2;else if(f>>4===14)return 3;else if(f>>3===30)return 4;return f>>6===2?-1:-2}function E(f,M,$){var F=M.length-1;if(F<$)return 0;var k=I(M[F]);if(k>=0){if(k>0)f.lastNeed=k-1;return k}if(--F<$||k===-2)return 0;if(k=I(M[F]),k>=0){if(k>0)f.lastNeed=k-2;return k}if(--F<$||k===-2)return 0;if(k=I(M[F]),k>=0){if(k>0)if(k===2)k=0;else f.lastNeed=k-3;return k}return 0}function U(f,M,$){if((M[0]&192)!==128)return f.lastNeed=0,"�";if(f.lastNeed>1&&M.length>1){if((M[1]&192)!==128)return f.lastNeed=1,"�";if(f.lastNeed>2&&M.length>2){if((M[2]&192)!==128)return f.lastNeed=2,"�"}}}function T(f){var M=this.lastTotal-this.lastNeed,$=U(this,f,M);if($!==void 0)return $;if(this.lastNeed<=f.length)return f.copy(this.lastChar,M,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);f.copy(this.lastChar,M,0,f.length),this.lastNeed-=f.length}function x(f,M){var $=E(this,f,M);if(!this.lastNeed)return f.toString("utf8",M);this.lastTotal=$;var F=f.length-($-this.lastNeed);return f.copy(this.lastChar,0,F),f.toString("utf8",M,F)}function R(f){var M=f&&f.length?this.write(f):"";if(this.lastNeed)return M+"�";return M}function N(f,M){if((f.length-M)%2===0){var $=f.toString("utf16le",M);if($){var F=$.charCodeAt($.length-1);if(F>=55296&&F<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=f[f.length-2],this.lastChar[1]=f[f.length-1],$.slice(0,-1)}return $}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=f[f.length-1],f.toString("utf16le",M,f.length-1)}function y(f){var M=f&&f.length?this.write(f):"";if(this.lastNeed){var $=this.lastTotal-this.lastNeed;return M+this.lastChar.toString("utf16le",0,$)}return M}function v(f,M){var $=(f.length-M)%3;if($===0)return f.toString("base64",M);if(this.lastNeed=3-$,this.lastTotal=3,$===1)this.lastChar[0]=f[f.length-1];else this.lastChar[0]=f[f.length-2],this.lastChar[1]=f[f.length-1];return f.toString("base64",M,f.length-$)}function t(f){var M=f&&f.length?this.write(f):"";if(this.lastNeed)return M+this.lastChar.toString("base64",0,3-this.lastNeed);return M}function J(f){return f.toString(this.encoding)}function X(f){return f&&f.length?this.write(f):""}}),M1=x0((i,h)=>{var u=I2(),{PromisePrototypeThen:n,SymbolAsyncIterator:g,SymbolIterator:c}=M0(),{Buffer:I}=(d0(),Q0(m0)),{ERR_INVALID_ARG_TYPE:E,ERR_STREAM_NULL_VALUES:U}=y0().codes;function T(x,R,N){let y;if(typeof R==="string"||R instanceof I)return new x({objectMode:!0,...N,read(){this.push(R),this.push(null)}});let v;if(R&&R[g])v=!0,y=R[g]();else if(R&&R[c])v=!1,y=R[c]();else throw new E("iterable",["Iterable"],R);let t=new x({objectMode:!0,highWaterMark:1,...N}),J=!1;t._read=function(){if(!J)J=!0,f()},t._destroy=function(M,$){n(X(M),()=>u.nextTick($,M),(F)=>u.nextTick($,F||M))};async function X(M){let $=M!==void 0&&M!==null,F=typeof y.throw==="function";if($&&F){let{value:k,done:B0}=await y.throw(M);if(await k,B0)return}if(typeof y.return==="function"){let{value:k}=await y.return();await k}}async function f(){for(;;){try{let{value:M,done:$}=v?await y.next():y.next();if($)t.push(null);else{let F=M&&typeof M.then==="function"?await M:M;if(F===null)throw J=!1,new U;else if(t.push(F))continue;else J=!1}}catch(M){t.destroy(M)}break}}return t}h.exports=T}),K2=x0((i,h)=>{var u=I2(),{ArrayPrototypeIndexOf:n,NumberIsInteger:g,NumberIsNaN:c,NumberParseInt:I,ObjectDefineProperties:E,ObjectKeys:U,ObjectSetPrototypeOf:T,Promise:x,SafeSet:R,SymbolAsyncDispose:N,SymbolAsyncIterator:y,Symbol:v}=M0();h.exports=V,V.ReadableState=e;var{EventEmitter:t}=(R2(),Q0(C2)),{Stream:J,prependListener:X}=hi(),{Buffer:f}=(d0(),Q0(m0)),{addAbortSignal:M}=S2(),$=s0(),F=q0().debuglog("stream",(B)=>{F=B}),k=dh(),B0=A2(),{getHighWaterMark:f0,getDefaultHighWaterMark:b}=F2(),{aggregateTwoErrors:Q,codes:{ERR_INVALID_ARG_TYPE:j,ERR_METHOD_NOT_IMPLEMENTED:L,ERR_OUT_OF_RANGE:z,ERR_STREAM_PUSH_AFTER_EOF:q,ERR_STREAM_UNSHIFT_AFTER_END_EVENT:Z},AbortError:l}=y0(),{validateObject:i0}=$2(),n0=v("kPaused"),{StringDecoder:A0}=lh(),P=M1();T(V.prototype,J.prototype),T(V,J);var g0=()=>{},{errorOrDestroy:A}=B0,_=1,s=2,K=4,u0=8,I0=16,T0=32,U0=64,H=128,D=256,m=512,w0=1024,E0=2048,r=4096,C=8192,S=16384,p=32768,o=65536,d=131072,O=262144;function Y(B){return{enumerable:!1,get(){return(this.state&B)!==0},set(w){if(w)this.state|=B;else this.state&=~B}}}E(e.prototype,{objectMode:Y(_),ended:Y(s),endEmitted:Y(K),reading:Y(u0),constructed:Y(I0),sync:Y(T0),needReadable:Y(U0),emittedReadable:Y(H),readableListening:Y(D),resumeScheduled:Y(m),errorEmitted:Y(w0),emitClose:Y(E0),autoDestroy:Y(r),destroyed:Y(C),closed:Y(S),closeEmitted:Y(p),multiAwaitDrain:Y(o),readingMore:Y(d),dataEmitted:Y(O)});function e(B,w,W){if(typeof W!=="boolean")W=w instanceof t0();if(this.state=E0|r|I0|T0,B&&B.objectMode)this.state|=_;if(W&&B&&B.readableObjectMode)this.state|=_;if(this.highWaterMark=B?f0(this,B,"readableHighWaterMark",W):b(!1),this.buffer=new k,this.length=0,this.pipes=[],this.flowing=null,this[n0]=null,B&&B.emitClose===!1)this.state&=~E0;if(B&&B.autoDestroy===!1)this.state&=~r;if(this.errored=null,this.defaultEncoding=B&&B.defaultEncoding||"utf8",this.awaitDrainWriters=null,this.decoder=null,this.encoding=null,B&&B.encoding)this.decoder=new A0(B.encoding),this.encoding=B.encoding}function V(B){if(!(this instanceof V))return new V(B);let w=this instanceof t0();if(this._readableState=new e(B,this,w),B){if(typeof B.read==="function")this._read=B.read;if(typeof B.destroy==="function")this._destroy=B.destroy;if(typeof B.construct==="function")this._construct=B.construct;if(B.signal&&!w)M(B.signal,this)}J.call(this,B),B0.construct(this,()=>{if(this._readableState.needReadable)f2(this,this._readableState)})}V.prototype.destroy=B0.destroy,V.prototype._undestroy=B0.undestroy,V.prototype._destroy=function(B,w){w(B)},V.prototype[t.captureRejectionSymbol]=function(B){this.destroy(B)},V.prototype[N]=function(){let B;if(!this.destroyed)B=this.readableEnded?null:new l,this.destroy(B);return new x((w,W)=>$(this,(a)=>a&&a!==B?W(a):w(null)))},V.prototype.push=function(B,w){return c0(this,B,w,!1)},V.prototype.unshift=function(B,w){return c0(this,B,w,!0)};function c0(B,w,W,a){F("readableAddChunk",w);let h0=B._readableState,z0;if((h0.state&_)===0){if(typeof w==="string"){if(W=W||h0.defaultEncoding,h0.encoding!==W)if(a&&h0.encoding)w=f.from(w,W).toString(h0.encoding);else w=f.from(w,W),W=""}else if(w instanceof f)W="";else if(J._isUint8Array(w))w=J._uint8ArrayToBuffer(w),W="";else if(w!=null)z0=new j("chunk",["string","Buffer","Uint8Array"],w)}if(z0)A(B,z0);else if(w===null)h0.state&=~u0,$0(B,h0);else if((h0.state&_)!==0||w&&w.length>0)if(a)if((h0.state&K)!==0)A(B,new Z);else if(h0.destroyed||h0.errored)return!1;else r0(B,h0,w,!0);else if(h0.ended)A(B,new q);else if(h0.destroyed||h0.errored)return!1;else if(h0.state&=~u0,h0.decoder&&!W)if(w=h0.decoder.write(w),h0.objectMode||w.length!==0)r0(B,h0,w,!1);else f2(B,h0);else r0(B,h0,w,!1);else if(!a)h0.state&=~u0,f2(B,h0);return!h0.ended&&(h0.length<h0.highWaterMark||h0.length===0)}function r0(B,w,W,a){if(w.flowing&&w.length===0&&!w.sync&&B.listenerCount("data")>0){if((w.state&o)!==0)w.awaitDrainWriters.clear();else w.awaitDrainWriters=null;w.dataEmitted=!0,B.emit("data",W)}else{if(w.length+=w.objectMode?1:W.length,a)w.buffer.unshift(W);else w.buffer.push(W);if((w.state&U0)!==0)N0(B)}f2(B,w)}V.prototype.isPaused=function(){let B=this._readableState;return B[n0]===!0||B.flowing===!1},V.prototype.setEncoding=function(B){let w=new A0(B);this._readableState.decoder=w,this._readableState.encoding=this._readableState.decoder.encoding;let W=this._readableState.buffer,a="";for(let h0 of W)a+=w.write(h0);if(W.clear(),a!=="")W.push(a);return this._readableState.length=a.length,this};var S0=1073741824;function F0(B){if(B>S0)throw new z("size","<= 1GiB",B);else B--,B|=B>>>1,B|=B>>>2,B|=B>>>4,B|=B>>>8,B|=B>>>16,B++;return B}function i2(B,w){if(B<=0||w.length===0&&w.ended)return 0;if((w.state&_)!==0)return 1;if(c(B)){if(w.flowing&&w.length)return w.buffer.first().length;return w.length}if(B<=w.length)return B;return w.ended?w.length:0}V.prototype.read=function(B){if(F("read",B),B===void 0)B=NaN;else if(!g(B))B=I(B,10);let w=this._readableState,W=B;if(B>w.highWaterMark)w.highWaterMark=F0(B);if(B!==0)w.state&=~H;if(B===0&&w.needReadable&&((w.highWaterMark!==0?w.length>=w.highWaterMark:w.length>0)||w.ended)){if(F("read: emitReadable",w.length,w.ended),w.length===0&&w.ended)_2(this);else N0(this);return null}if(B=i2(B,w),B===0&&w.ended){if(w.length===0)_2(this);return null}let a=(w.state&U0)!==0;if(F("need readable",a),w.length===0||w.length-B<w.highWaterMark)a=!0,F("length less than watermark",a);if(w.ended||w.reading||w.destroyed||w.errored||!w.constructed)a=!1,F("reading, ended or constructing",a);else if(a){if(F("do read"),w.state|=u0|T0,w.length===0)w.state|=U0;try{this._read(w.highWaterMark)}catch(z0){A(this,z0)}if(w.state&=~T0,!w.reading)B=i2(W,w)}let h0;if(B>0)h0=Oi(B,w);else h0=null;if(h0===null)w.needReadable=w.length<=w.highWaterMark,B=0;else if(w.length-=B,w.multiAwaitDrain)w.awaitDrainWriters.clear();else w.awaitDrainWriters=null;if(w.length===0){if(!w.ended)w.needReadable=!0;if(W!==B&&w.ended)_2(this)}if(h0!==null&&!w.errorEmitted&&!w.closeEmitted)w.dataEmitted=!0,this.emit("data",h0);return h0};function $0(B,w){if(F("onEofChunk"),w.ended)return;if(w.decoder){let W=w.decoder.end();if(W&&W.length)w.buffer.push(W),w.length+=w.objectMode?1:W.length}if(w.ended=!0,w.sync)N0(B);else w.needReadable=!1,w.emittedReadable=!0,w2(B)}function N0(B){let w=B._readableState;if(F("emitReadable",w.needReadable,w.emittedReadable),w.needReadable=!1,!w.emittedReadable)F("emitReadable",w.flowing),w.emittedReadable=!0,u.nextTick(w2,B)}function w2(B){let w=B._readableState;if(F("emitReadable_",w.destroyed,w.length,w.ended),!w.destroyed&&!w.errored&&(w.length||w.ended))B.emit("readable"),w.emittedReadable=!1;w.needReadable=!w.flowing&&!w.ended&&w.length<=w.highWaterMark,xi(B)}function f2(B,w){if(!w.readingMore&&w.constructed)w.readingMore=!0,u.nextTick(P0,B,w)}function P0(B,w){while(!w.reading&&!w.ended&&(w.length<w.highWaterMark||w.flowing&&w.length===0)){let W=w.length;if(F("maybeReadMore read 0"),B.read(0),W===w.length)break}w.readingMore=!1}V.prototype._read=function(B){throw new L("_read()")},V.prototype.pipe=function(B,w){let W=this,a=this._readableState;if(a.pipes.length===1){if(!a.multiAwaitDrain)a.multiAwaitDrain=!0,a.awaitDrainWriters=new R(a.awaitDrainWriters?[a.awaitDrainWriters]:[])}a.pipes.push(B),F("pipe count=%d opts=%j",a.pipes.length,w);let h0=(!w||w.end!==!1)&&B!==u.stdout&&B!==u.stderr?K0:x2;if(a.endEmitted)u.nextTick(h0);else W.once("end",h0);B.on("unpipe",z0);function z0(u2,W0){if(F("onunpipe"),u2===W){if(W0&&W0.hasUnpiped===!1)W0.hasUnpiped=!0,Y1()}}function K0(){F("onend"),B.end()}let h2,Mi=!1;function Y1(){if(F("cleanup"),B.removeListener("close",V2),B.removeListener("finish",W2),h2)B.removeListener("drain",h2);if(B.removeListener("error",j2),B.removeListener("unpipe",z0),W.removeListener("end",K0),W.removeListener("end",x2),W.removeListener("data",Ri),Mi=!0,h2&&a.awaitDrainWriters&&(!B._writableState||B._writableState.needDrain))h2()}function Ci(){if(!Mi){if(a.pipes.length===1&&a.pipes[0]===B)F("false write response, pause",0),a.awaitDrainWriters=B,a.multiAwaitDrain=!1;else if(a.pipes.length>1&&a.pipes.includes(B))F("false write response, pause",a.awaitDrainWriters.size),a.awaitDrainWriters.add(B);W.pause()}if(!h2)h2=F1(W,B),B.on("drain",h2)}W.on("data",Ri);function Ri(u2){F("ondata");let W0=B.write(u2);if(F("dest.write",W0),W0===!1)Ci()}function j2(u2){if(F("onerror",u2),x2(),B.removeListener("error",j2),B.listenerCount("error")===0){let W0=B._writableState||B._readableState;if(W0&&!W0.errorEmitted)A(B,u2);else B.emit("error",u2)}}X(B,"error",j2);function V2(){B.removeListener("finish",W2),x2()}B.once("close",V2);function W2(){F("onfinish"),B.removeListener("close",V2),x2()}B.once("finish",W2);function x2(){F("unpipe"),W.unpipe(B)}if(B.emit("pipe",W),B.writableNeedDrain===!0)Ci();else if(!a.flowing)F("pipe resume"),W.resume();return B};function F1(B,w){return function(){let W=B._readableState;if(W.awaitDrainWriters===w)F("pipeOnDrain",1),W.awaitDrainWriters=null;else if(W.multiAwaitDrain)F("pipeOnDrain",W.awaitDrainWriters.size),W.awaitDrainWriters.delete(w);if((!W.awaitDrainWriters||W.awaitDrainWriters.size===0)&&B.listenerCount("data"))B.resume()}}V.prototype.unpipe=function(B){let w=this._readableState,W={hasUnpiped:!1};if(w.pipes.length===0)return this;if(!B){let h0=w.pipes;w.pipes=[],this.pause();for(let z0=0;z0<h0.length;z0++)h0[z0].emit("unpipe",this,{hasUnpiped:!1});return this}let a=n(w.pipes,B);if(a===-1)return this;if(w.pipes.splice(a,1),w.pipes.length===0)this.pause();return B.emit("unpipe",this,W),this},V.prototype.on=function(B,w){let W=J.prototype.on.call(this,B,w),a=this._readableState;if(B==="data"){if(a.readableListening=this.listenerCount("readable")>0,a.flowing!==!1)this.resume()}else if(B==="readable"){if(!a.endEmitted&&!a.readableListening){if(a.readableListening=a.needReadable=!0,a.flowing=!1,a.emittedReadable=!1,F("on readable",a.length,a.reading),a.length)N0(this);else if(!a.reading)u.nextTick(K1,this)}}return W},V.prototype.addListener=V.prototype.on,V.prototype.removeListener=function(B,w){let W=J.prototype.removeListener.call(this,B,w);if(B==="readable")u.nextTick(Ti,this);return W},V.prototype.off=V.prototype.removeListener,V.prototype.removeAllListeners=function(B){let w=J.prototype.removeAllListeners.apply(this,arguments);if(B==="readable"||B===void 0)u.nextTick(Ti,this);return w};function Ti(B){let w=B._readableState;if(w.readableListening=B.listenerCount("readable")>0,w.resumeScheduled&&w[n0]===!1)w.flowing=!0;else if(B.listenerCount("data")>0)B.resume();else if(!w.readableListening)w.flowing=null}function K1(B){F("readable nexttick read 0"),B.read(0)}V.prototype.resume=function(){let B=this._readableState;if(!B.flowing)F("resume"),B.flowing=!B.readableListening,Q1(this,B);return B[n0]=!1,this};function Q1(B,w){if(!w.resumeScheduled)w.resumeScheduled=!0,u.nextTick(H1,B,w)}function H1(B,w){if(F("resume",w.reading),!w.reading)B.read(0);if(w.resumeScheduled=!1,B.emit("resume"),xi(B),w.flowing&&!w.reading)B.read(0)}V.prototype.pause=function(){if(F("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1)F("pause"),this._readableState.flowing=!1,this.emit("pause");return this._readableState[n0]=!0,this};function xi(B){let w=B._readableState;F("flow",w.flowing);while(w.flowing&&B.read()!==null);}V.prototype.wrap=function(B){let w=!1;B.on("data",(a)=>{if(!this.push(a)&&B.pause)w=!0,B.pause()}),B.on("end",()=>{this.push(null)}),B.on("error",(a)=>{A(this,a)}),B.on("close",()=>{this.destroy()}),B.on("destroy",()=>{this.destroy()}),this._read=()=>{if(w&&B.resume)w=!1,B.resume()};let W=U(B);for(let a=1;a<W.length;a++){let h0=W[a];if(this[h0]===void 0&&typeof B[h0]==="function")this[h0]=B[h0].bind(B)}return this},V.prototype[y]=function(){return ri(this)},V.prototype.iterator=function(B){if(B!==void 0)i0(B,"options");return ri(this,B)};function ri(B,w){if(typeof B.read!=="function")B=V.wrap(B,{objectMode:!0});let W=D1(B,w);return W.stream=B,W}async function*D1(B,w){let W=g0;function a(K0){if(this===B)W(),W=g0;else W=K0}B.on("readable",a);let h0,z0=$(B,{writable:!1},(K0)=>{h0=K0?Q(h0,K0):null,W(),W=g0});try{while(!0){let K0=B.destroyed?null:B.read();if(K0!==null)yield K0;else if(h0)throw h0;else if(h0===null)return;else await new x(a)}}catch(K0){throw h0=Q(h0,K0),h0}finally{if((h0||(w===null||w===void 0?void 0:w.destroyOnReturn)!==!1)&&(h0===void 0||B._readableState.autoDestroy))B0.destroyer(B,null);else B.off("readable",a),z0()}}E(V.prototype,{readable:{__proto__:null,get(){let B=this._readableState;return!!B&&B.readable!==!1&&!B.destroyed&&!B.errorEmitted&&!B.endEmitted},set(B){if(this._readableState)this._readableState.readable=!!B}},readableDidRead:{__proto__:null,enumerable:!1,get:function(){return this._readableState.dataEmitted}},readableAborted:{__proto__:null,enumerable:!1,get:function(){return!!(this._readableState.readable!==!1&&(this._readableState.destroyed||this._readableState.errored)&&!this._readableState.endEmitted)}},readableHighWaterMark:{__proto__:null,enumerable:!1,get:function(){return this._readableState.highWaterMark}},readableBuffer:{__proto__:null,enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}},readableFlowing:{__proto__:null,enumerable:!1,get:function(){return this._readableState.flowing},set:function(B){if(this._readableState)this._readableState.flowing=B}},readableLength:{__proto__:null,enumerable:!1,get(){return this._readableState.length}},readableObjectMode:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.objectMode:!1}},readableEncoding:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.encoding:null}},errored:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.errored:null}},closed:{__proto__:null,get(){return this._readableState?this._readableState.closed:!1}},destroyed:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.destroyed:!1},set(B){if(!this._readableState)return;this._readableState.destroyed=B}},readableEnded:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.endEmitted:!1}}}),E(e.prototype,{pipesCount:{__proto__:null,get(){return this.pipes.length}},paused:{__proto__:null,get(){return this[n0]!==!1},set(B){this[n0]=!!B}}}),V._fromList=Oi;function Oi(B,w){if(w.length===0)return null;let W;if(w.objectMode)W=w.buffer.shift();else if(!B||B>=w.length){if(w.decoder)W=w.buffer.join("");else if(w.buffer.length===1)W=w.buffer.first();else W=w.buffer.concat(w.length);w.buffer.clear()}else W=w.buffer.consume(B,w.decoder);return W}function _2(B){let w=B._readableState;if(F("endReadable",w.endEmitted),!w.endEmitted)w.ended=!0,u.nextTick(P1,w,B)}function P1(B,w){if(F("endReadableNT",B.endEmitted,B.length),!B.errored&&!B.closeEmitted&&!B.endEmitted&&B.length===0){if(B.endEmitted=!0,w.emit("end"),w.writable&&w.allowHalfOpen===!1)u.nextTick(_1,w);else if(B.autoDestroy){let W=w._writableState;if(!W||W.autoDestroy&&(W.finished||W.writable===!1))w.destroy()}}}function _1(B){if(B.writable&&!B.writableEnded&&!B.destroyed)B.end()}V.from=function(B,w){return P(V,B,w)};var Y2;function Li(){if(Y2===void 0)Y2={};return Y2}V.fromWeb=function(B,w){return Li().newStreamReadableFromReadableStream(B,w)},V.toWeb=function(B,w){return Li().newReadableStreamFromStreamReadable(B,w)},V.wrap=function(B,w){var W,a;return new V({objectMode:(W=(a=B.readableObjectMode)!==null&&a!==void 0?a:B.objectMode)!==null&&W!==void 0?W:!0,...w,destroy(h0,z0){B0.destroyer(B,h0),z0(h0)}}).wrap(B)}}),ui=x0((i,h)=>{var u=I2(),{ArrayPrototypeSlice:n,Error:g,FunctionPrototypeSymbolHasInstance:c,ObjectDefineProperty:I,ObjectDefineProperties:E,ObjectSetPrototypeOf:U,StringPrototypeToLowerCase:T,Symbol:x,SymbolHasInstance:R}=M0();h.exports=i0,i0.WritableState=Z;var{EventEmitter:N}=(R2(),Q0(C2)),y=hi().Stream,{Buffer:v}=(d0(),Q0(m0)),t=A2(),{addAbortSignal:J}=S2(),{getHighWaterMark:X,getDefaultHighWaterMark:f}=F2(),{ERR_INVALID_ARG_TYPE:M,ERR_METHOD_NOT_IMPLEMENTED:$,ERR_MULTIPLE_CALLBACK:F,ERR_STREAM_CANNOT_PIPE:k,ERR_STREAM_DESTROYED:B0,ERR_STREAM_ALREADY_FINISHED:f0,ERR_STREAM_NULL_VALUES:b,ERR_STREAM_WRITE_AFTER_END:Q,ERR_UNKNOWN_ENCODING:j}=y0().codes,{errorOrDestroy:L}=t;U(i0.prototype,y.prototype),U(i0,y);function z(){}var q=x("kOnFinished");function Z(r,C,S){if(typeof S!=="boolean")S=C instanceof t0();if(this.objectMode=!!(r&&r.objectMode),S)this.objectMode=this.objectMode||!!(r&&r.writableObjectMode);this.highWaterMark=r?X(this,r,"writableHighWaterMark",S):f(!1),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;let p=!!(r&&r.decodeStrings===!1);this.decodeStrings=!p,this.defaultEncoding=r&&r.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=A.bind(void 0,C),this.writecb=null,this.writelen=0,this.afterWriteTickInfo=null,l(this),this.pendingcb=0,this.constructed=!0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!r||r.emitClose!==!1,this.autoDestroy=!r||r.autoDestroy!==!1,this.errored=null,this.closed=!1,this.closeEmitted=!1,this[q]=[]}function l(r){r.buffered=[],r.bufferedIndex=0,r.allBuffers=!0,r.allNoop=!0}Z.prototype.getBuffer=function(){return n(this.buffered,this.bufferedIndex)},I(Z.prototype,"bufferedRequestCount",{__proto__:null,get(){return this.buffered.length-this.bufferedIndex}});function i0(r){let C=this instanceof t0();if(!C&&!c(i0,this))return new i0(r);if(this._writableState=new Z(r,this,C),r){if(typeof r.write==="function")this._write=r.write;if(typeof r.writev==="function")this._writev=r.writev;if(typeof r.destroy==="function")this._destroy=r.destroy;if(typeof r.final==="function")this._final=r.final;if(typeof r.construct==="function")this._construct=r.construct;if(r.signal)J(r.signal,this)}y.call(this,r),t.construct(this,()=>{let S=this._writableState;if(!S.writing)u0(this,S);H(this,S)})}I(i0,R,{__proto__:null,value:function(r){if(c(this,r))return!0;if(this!==i0)return!1;return r&&r._writableState instanceof Z}}),i0.prototype.pipe=function(){L(this,new k)};function n0(r,C,S,p){let o=r._writableState;if(typeof S==="function")p=S,S=o.defaultEncoding;else{if(!S)S=o.defaultEncoding;else if(S!=="buffer"&&!v.isEncoding(S))throw new j(S);if(typeof p!=="function")p=z}if(C===null)throw new b;else if(!o.objectMode)if(typeof C==="string"){if(o.decodeStrings!==!1)C=v.from(C,S),S="buffer"}else if(C instanceof v)S="buffer";else if(y._isUint8Array(C))C=y._uint8ArrayToBuffer(C),S="buffer";else throw new M("chunk",["string","Buffer","Uint8Array"],C);let d;if(o.ending)d=new Q;else if(o.destroyed)d=new B0("write");if(d)return u.nextTick(p,d),L(r,d,!0),d;return o.pendingcb++,A0(r,o,C,S,p)}i0.prototype.write=function(r,C,S){return n0(this,r,C,S)===!0},i0.prototype.cork=function(){this._writableState.corked++},i0.prototype.uncork=function(){let r=this._writableState;if(r.corked){if(r.corked--,!r.writing)u0(this,r)}},i0.prototype.setDefaultEncoding=function(r){if(typeof r==="string")r=T(r);if(!v.isEncoding(r))throw new j(r);return this._writableState.defaultEncoding=r,this};function A0(r,C,S,p,o){let d=C.objectMode?1:S.length;C.length+=d;let O=C.length<C.highWaterMark;if(!O)C.needDrain=!0;if(C.writing||C.corked||C.errored||!C.constructed){if(C.buffered.push({chunk:S,encoding:p,callback:o}),C.allBuffers&&p!=="buffer")C.allBuffers=!1;if(C.allNoop&&o!==z)C.allNoop=!1}else C.writelen=d,C.writecb=o,C.writing=!0,C.sync=!0,r._write(S,p,C.onwrite),C.sync=!1;return O&&!C.errored&&!C.destroyed}function P(r,C,S,p,o,d,O){if(C.writelen=p,C.writecb=O,C.writing=!0,C.sync=!0,C.destroyed)C.onwrite(new B0("write"));else if(S)r._writev(o,C.onwrite);else r._write(o,d,C.onwrite);C.sync=!1}function g0(r,C,S,p){--C.pendingcb,p(S),K(C),L(r,S)}function A(r,C){let S=r._writableState,p=S.sync,o=S.writecb;if(typeof o!=="function"){L(r,new F);return}if(S.writing=!1,S.writecb=null,S.length-=S.writelen,S.writelen=0,C){if(C.stack,!S.errored)S.errored=C;if(r._readableState&&!r._readableState.errored)r._readableState.errored=C;if(p)u.nextTick(g0,r,S,C,o);else g0(r,S,C,o)}else{if(S.buffered.length>S.bufferedIndex)u0(r,S);if(p)if(S.afterWriteTickInfo!==null&&S.afterWriteTickInfo.cb===o)S.afterWriteTickInfo.count++;else S.afterWriteTickInfo={count:1,cb:o,stream:r,state:S},u.nextTick(_,S.afterWriteTickInfo);else s(r,S,1,o)}}function _({stream:r,state:C,count:S,cb:p}){return C.afterWriteTickInfo=null,s(r,C,S,p)}function s(r,C,S,p){if(!C.ending&&!r.destroyed&&C.length===0&&C.needDrain)C.needDrain=!1,r.emit("drain");while(S-- >0)C.pendingcb--,p();if(C.destroyed)K(C);H(r,C)}function K(r){if(r.writing)return;for(let o=r.bufferedIndex;o<r.buffered.length;++o){var C;let{chunk:d,callback:O}=r.buffered[o],Y=r.objectMode?1:d.length;r.length-=Y,O((C=r.errored)!==null&&C!==void 0?C:new B0("write"))}let S=r[q].splice(0);for(let o=0;o<S.length;o++){var p;S[o]((p=r.errored)!==null&&p!==void 0?p:new B0("end"))}l(r)}function u0(r,C){if(C.corked||C.bufferProcessing||C.destroyed||!C.constructed)return;let{buffered:S,bufferedIndex:p,objectMode:o}=C,d=S.length-p;if(!d)return;let O=p;if(C.bufferProcessing=!0,d>1&&r._writev){C.pendingcb-=d-1;let Y=C.allNoop?z:(V)=>{for(let c0=O;c0<S.length;++c0)S[c0].callback(V)},e=C.allNoop&&O===0?S:n(S,O);e.allBuffers=C.allBuffers,P(r,C,!0,C.length,e,"",Y),l(C)}else{do{let{chunk:Y,encoding:e,callback:V}=S[O];S[O++]=null;let c0=o?1:Y.length;P(r,C,!1,c0,Y,e,V)}while(O<S.length&&!C.writing);if(O===S.length)l(C);else if(O>256)S.splice(0,O),C.bufferedIndex=0;else C.bufferedIndex=O}C.bufferProcessing=!1}i0.prototype._write=function(r,C,S){if(this._writev)this._writev([{chunk:r,encoding:C}],S);else throw new $("_write()")},i0.prototype._writev=null,i0.prototype.end=function(r,C,S){let p=this._writableState;if(typeof r==="function")S=r,r=null,C=null;else if(typeof C==="function")S=C,C=null;let o;if(r!==null&&r!==void 0){let d=n0(this,r,C);if(d instanceof g)o=d}if(p.corked)p.corked=1,this.uncork();if(o);else if(!p.errored&&!p.ending)p.ending=!0,H(this,p,!0),p.ended=!0;else if(p.finished)o=new f0("end");else if(p.destroyed)o=new B0("end");if(typeof S==="function")if(o||p.finished)u.nextTick(S,o);else p[q].push(S);return this};function I0(r){return r.ending&&!r.destroyed&&r.constructed&&r.length===0&&!r.errored&&r.buffered.length===0&&!r.finished&&!r.writing&&!r.errorEmitted&&!r.closeEmitted}function T0(r,C){let S=!1;function p(o){if(S){L(r,o!==null&&o!==void 0?o:F());return}if(S=!0,C.pendingcb--,o){let d=C[q].splice(0);for(let O=0;O<d.length;O++)d[O](o);L(r,o,C.sync)}else if(I0(C))C.prefinished=!0,r.emit("prefinish"),C.pendingcb++,u.nextTick(D,r,C)}C.sync=!0,C.pendingcb++;try{r._final(p)}catch(o){p(o)}C.sync=!1}function U0(r,C){if(!C.prefinished&&!C.finalCalled)if(typeof r._final==="function"&&!C.destroyed)C.finalCalled=!0,T0(r,C);else C.prefinished=!0,r.emit("prefinish")}function H(r,C,S){if(I0(C)){if(U0(r,C),C.pendingcb===0){if(S)C.pendingcb++,u.nextTick((p,o)=>{if(I0(o))D(p,o);else o.pendingcb--},r,C);else if(I0(C))C.pendingcb++,D(r,C)}}}function D(r,C){C.pendingcb--,C.finished=!0;let S=C[q].splice(0);for(let p=0;p<S.length;p++)S[p]();if(r.emit("finish"),C.autoDestroy){let p=r._readableState;if(!p||p.autoDestroy&&(p.endEmitted||p.readable===!1))r.destroy()}}E(i0.prototype,{closed:{__proto__:null,get(){return this._writableState?this._writableState.closed:!1}},destroyed:{__proto__:null,get(){return this._writableState?this._writableState.destroyed:!1},set(r){if(this._writableState)this._writableState.destroyed=r}},writable:{__proto__:null,get(){let r=this._writableState;return!!r&&r.writable!==!1&&!r.destroyed&&!r.errored&&!r.ending&&!r.ended},set(r){if(this._writableState)this._writableState.writable=!!r}},writableFinished:{__proto__:null,get(){return this._writableState?this._writableState.finished:!1}},writableObjectMode:{__proto__:null,get(){return this._writableState?this._writableState.objectMode:!1}},writableBuffer:{__proto__:null,get(){return this._writableState&&this._writableState.getBuffer()}},writableEnded:{__proto__:null,get(){return this._writableState?this._writableState.ending:!1}},writableNeedDrain:{__proto__:null,get(){let r=this._writableState;if(!r)return!1;return!r.destroyed&&!r.ending&&r.needDrain}},writableHighWaterMark:{__proto__:null,get(){return this._writableState&&this._writableState.highWaterMark}},writableCorked:{__proto__:null,get(){return this._writableState?this._writableState.corked:0}},writableLength:{__proto__:null,get(){return this._writableState&&this._writableState.length}},errored:{__proto__:null,enumerable:!1,get(){return this._writableState?this._writableState.errored:null}},writableAborted:{__proto__:null,enumerable:!1,get:function(){return!!(this._writableState.writable!==!1&&(this._writableState.destroyed||this._writableState.errored)&&!this._writableState.finished)}}});var m=t.destroy;i0.prototype.destroy=function(r,C){let S=this._writableState;if(!S.destroyed&&(S.bufferedIndex<S.buffered.length||S[q].length))u.nextTick(K,S);return m.call(this,r,C),this},i0.prototype._undestroy=t.undestroy,i0.prototype._destroy=function(r,C){C(r)},i0.prototype[N.captureRejectionSymbol]=function(r){this.destroy(r)};var w0;function E0(){if(w0===void 0)w0={};return w0}i0.fromWeb=function(r,C){return E0().newStreamWritableFromWritableStream(r,C)},i0.toWeb=function(r){return E0().newWritableStreamFromStreamWritable(r)}}),oh=x0((i,h)=>{var u=I2(),n=(d0(),Q0(m0)),{isReadable:g,isWritable:c,isIterable:I,isNodeStream:E,isReadableNodeStream:U,isWritableNodeStream:T,isDuplexNodeStream:x,isReadableStream:R,isWritableStream:N}=l0(),y=s0(),{AbortError:v,codes:{ERR_INVALID_ARG_TYPE:t,ERR_INVALID_RETURN_VALUE:J}}=y0(),{destroyer:X}=A2(),f=t0(),M=K2(),$=ui(),{createDeferredPromise:F}=q0(),k=M1(),B0=globalThis.Blob||n.Blob,f0=typeof B0<"u"?function(q){return q instanceof B0}:function(q){return!1},b=globalThis.AbortController||Z2().AbortController,{FunctionPrototypeCall:Q}=M0();class j extends f{constructor(q){super(q);if((q===null||q===void 0?void 0:q.readable)===!1)this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0;if((q===null||q===void 0?void 0:q.writable)===!1)this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0}}h.exports=function q(Z,l){if(x(Z))return Z;if(U(Z))return z({readable:Z});if(T(Z))return z({writable:Z});if(E(Z))return z({writable:!1,readable:!1});if(R(Z))return z({readable:M.fromWeb(Z)});if(N(Z))return z({writable:$.fromWeb(Z)});if(typeof Z==="function"){let{value:n0,write:A0,final:P,destroy:g0}=L(Z);if(I(n0))return k(j,n0,{objectMode:!0,write:A0,final:P,destroy:g0});let A=n0===null||n0===void 0?void 0:n0.then;if(typeof A==="function"){let _,s=Q(A,n0,(K)=>{if(K!=null)throw new J("nully","body",K)},(K)=>{X(_,K)});return _=new j({objectMode:!0,readable:!1,write:A0,final(K){P(async()=>{try{await s,u.nextTick(K,null)}catch(u0){u.nextTick(K,u0)}})},destroy:g0})}throw new J("Iterable, AsyncIterable or AsyncFunction",l,n0)}if(f0(Z))return q(Z.arrayBuffer());if(I(Z))return k(j,Z,{objectMode:!0,writable:!1});if(R(Z===null||Z===void 0?void 0:Z.readable)&&N(Z===null||Z===void 0?void 0:Z.writable))return j.fromWeb(Z);if(typeof(Z===null||Z===void 0?void 0:Z.writable)==="object"||typeof(Z===null||Z===void 0?void 0:Z.readable)==="object"){let n0=Z!==null&&Z!==void 0&&Z.readable?U(Z===null||Z===void 0?void 0:Z.readable)?Z===null||Z===void 0?void 0:Z.readable:q(Z.readable):void 0,A0=Z!==null&&Z!==void 0&&Z.writable?T(Z===null||Z===void 0?void 0:Z.writable)?Z===null||Z===void 0?void 0:Z.writable:q(Z.writable):void 0;return z({readable:n0,writable:A0})}let i0=Z===null||Z===void 0?void 0:Z.then;if(typeof i0==="function"){let n0;return Q(i0,Z,(A0)=>{if(A0!=null)n0.push(A0);n0.push(null)},(A0)=>{X(n0,A0)}),n0=new j({objectMode:!0,writable:!1,read(){}})}throw new t(l,["Blob","ReadableStream","WritableStream","Stream","Iterable","AsyncIterable","Function","{ readable, writable } pair","Promise"],Z)};function L(q){let{promise:Z,resolve:l}=F(),i0=new b,n0=i0.signal;return{value:q(async function*(){while(!0){let A0=Z;Z=null;let{chunk:P,done:g0,cb:A}=await A0;if(u.nextTick(A),g0)return;if(n0.aborted)throw new v(void 0,{cause:n0.reason});({promise:Z,resolve:l}=F()),yield P}}(),{signal:n0}),write(A0,P,g0){let A=l;l=null,A({chunk:A0,done:!1,cb:g0})},final(A0){let P=l;l=null,P({done:!0,cb:A0})},destroy(A0,P){i0.abort(),P(A0)}}}function z(q){let Z=q.readable&&typeof q.readable.read!=="function"?M.wrap(q.readable):q.readable,l=q.writable,i0=!!g(Z),n0=!!c(l),A0,P,g0,A,_;function s(K){let u0=A;if(A=null,u0)u0(K);else if(K)_.destroy(K)}if(_=new j({readableObjectMode:!!(Z!==null&&Z!==void 0&&Z.readableObjectMode),writableObjectMode:!!(l!==null&&l!==void 0&&l.writableObjectMode),readable:i0,writable:n0}),n0)y(l,(K)=>{if(n0=!1,K)X(Z,K);s(K)}),_._write=function(K,u0,I0){if(l.write(K,u0))I0();else A0=I0},_._final=function(K){l.end(),P=K},l.on("drain",function(){if(A0){let K=A0;A0=null,K()}}),l.on("finish",function(){if(P){let K=P;P=null,K()}});if(i0)y(Z,(K)=>{if(i0=!1,K)X(Z,K);s(K)}),Z.on("readable",function(){if(g0){let K=g0;g0=null,K()}}),Z.on("end",function(){_.push(null)}),_._read=function(){while(!0){let K=Z.read();if(K===null){g0=_._read;return}if(!_.push(K))return}};return _._destroy=function(K,u0){if(!K&&A!==null)K=new v;if(g0=null,A0=null,P=null,A===null)u0(K);else A=u0,X(l,K),X(Z,K)},_}}),t0=x0((i,h)=>{var{ObjectDefineProperties:u,ObjectGetOwnPropertyDescriptor:n,ObjectKeys:g,ObjectSetPrototypeOf:c}=M0();h.exports=U;var I=K2(),E=ui();c(U.prototype,I.prototype),c(U,I);{let N=g(E.prototype);for(let y=0;y<N.length;y++){let v=N[y];if(!U.prototype[v])U.prototype[v]=E.prototype[v]}}function U(N){if(!(this instanceof U))return new U(N);if(I.call(this,N),E.call(this,N),N){if(this.allowHalfOpen=N.allowHalfOpen!==!1,N.readable===!1)this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0;if(N.writable===!1)this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0}else this.allowHalfOpen=!0}u(U.prototype,{writable:{__proto__:null,...n(E.prototype,"writable")},writableHighWaterMark:{__proto__:null,...n(E.prototype,"writableHighWaterMark")},writableObjectMode:{__proto__:null,...n(E.prototype,"writableObjectMode")},writableBuffer:{__proto__:null,...n(E.prototype,"writableBuffer")},writableLength:{__proto__:null,...n(E.prototype,"writableLength")},writableFinished:{__proto__:null,...n(E.prototype,"writableFinished")},writableCorked:{__proto__:null,...n(E.prototype,"writableCorked")},writableEnded:{__proto__:null,...n(E.prototype,"writableEnded")},writableNeedDrain:{__proto__:null,...n(E.prototype,"writableNeedDrain")},destroyed:{__proto__:null,get(){if(this._readableState===void 0||this._writableState===void 0)return!1;return this._readableState.destroyed&&this._writableState.destroyed},set(N){if(this._readableState&&this._writableState)this._readableState.destroyed=N,this._writableState.destroyed=N}}});var T;function x(){if(T===void 0)T={};return T}U.fromWeb=function(N,y){return x().newStreamDuplexFromReadableWritablePair(N,y)},U.toWeb=function(N){return x().newReadableWritablePairFromDuplex(N)};var R;U.from=function(N){if(!R)R=oh();return R(N,"body")}}),C1=x0((i,h)=>{var{ObjectSetPrototypeOf:u,Symbol:n}=M0();h.exports=U;var{ERR_METHOD_NOT_IMPLEMENTED:g}=y0().codes,c=t0(),{getHighWaterMark:I}=F2();u(U.prototype,c.prototype),u(U,c);var E=n("kCallback");function U(R){if(!(this instanceof U))return new U(R);let N=R?I(this,R,"readableHighWaterMark",!0):null;if(N===0)R={...R,highWaterMark:null,readableHighWaterMark:N,writableHighWaterMark:R.writableHighWaterMark||0};if(c.call(this,R),this._readableState.sync=!1,this[E]=null,R){if(typeof R.transform==="function")this._transform=R.transform;if(typeof R.flush==="function")this._flush=R.flush}this.on("prefinish",x)}function T(R){if(typeof this._flush==="function"&&!this.destroyed)this._flush((N,y)=>{if(N){if(R)R(N);else this.destroy(N);return}if(y!=null)this.push(y);if(this.push(null),R)R()});else if(this.push(null),R)R()}function x(){if(this._final!==T)T.call(this)}U.prototype._final=T,U.prototype._transform=function(R,N,y){throw new g("_transform()")},U.prototype._write=function(R,N,y){let v=this._readableState,t=this._writableState,J=v.length;this._transform(R,N,(X,f)=>{if(X){y(X);return}if(f!=null)this.push(f);if(t.ended||J===v.length||v.length<v.highWaterMark)y();else this[E]=y})},U.prototype._read=function(){if(this[E]){let R=this[E];this[E]=null,R()}}}),R1=x0((i,h)=>{var{ObjectSetPrototypeOf:u}=M0();h.exports=g;var n=C1();u(g.prototype,n.prototype),u(g,n);function g(c){if(!(this instanceof g))return new g(c);n.call(this,c)}g.prototype._transform=function(c,I,E){E(null,c)}}),ni=x0((i,h)=>{var u=I2(),{ArrayIsArray:n,Promise:g,SymbolAsyncIterator:c,SymbolDispose:I}=M0(),E=s0(),{once:U}=q0(),T=A2(),x=t0(),{aggregateTwoErrors:R,codes:{ERR_INVALID_ARG_TYPE:N,ERR_INVALID_RETURN_VALUE:y,ERR_MISSING_ARGS:v,ERR_STREAM_DESTROYED:t,ERR_STREAM_PREMATURE_CLOSE:J},AbortError:X}=y0(),{validateFunction:f,validateAbortSignal:M}=$2(),{isIterable:$,isReadable:F,isReadableNodeStream:k,isNodeStream:B0,isTransformStream:f0,isWebStream:b,isReadableStream:Q,isReadableFinished:j}=l0(),L=globalThis.AbortController||Z2().AbortController,z,q,Z;function l(K,u0,I0){let T0=!1;K.on("close",()=>{T0=!0});let U0=E(K,{readable:u0,writable:I0},(H)=>{T0=!H});return{destroy:(H)=>{if(T0)return;T0=!0,T.destroyer(K,H||new t("pipe"))},cleanup:U0}}function i0(K){return f(K[K.length-1],"streams[stream.length - 1]"),K.pop()}function n0(K){if($(K))return K;else if(k(K))return A0(K);throw new N("val",["Readable","Iterable","AsyncIterable"],K)}async function*A0(K){if(!q)q=K2();yield*q.prototype[c].call(K)}async function P(K,u0,I0,{end:T0}){let U0,H=null,D=(E0)=>{if(E0)U0=E0;if(H){let r=H;H=null,r()}},m=()=>new g((E0,r)=>{if(U0)r(U0);else H=()=>{if(U0)r(U0);else E0()}});u0.on("drain",D);let w0=E(u0,{readable:!1},D);try{if(u0.writableNeedDrain)await m();for await(let E0 of K)if(!u0.write(E0))await m();if(T0)u0.end(),await m();I0()}catch(E0){I0(U0!==E0?R(U0,E0):E0)}finally{w0(),u0.off("drain",D)}}async function g0(K,u0,I0,{end:T0}){if(f0(u0))u0=u0.writable;let U0=u0.getWriter();try{for await(let H of K)await U0.ready,U0.write(H).catch(()=>{});if(await U0.ready,T0)await U0.close();I0()}catch(H){try{await U0.abort(H),I0(H)}catch(D){I0(D)}}}function A(...K){return _(K,U(i0(K)))}function _(K,u0,I0){if(K.length===1&&n(K[0]))K=K[0];if(K.length<2)throw new v("streams");let T0=new L,U0=T0.signal,H=I0===null||I0===void 0?void 0:I0.signal,D=[];M(H,"options.signal");function m(){o(new X)}Z=Z||q0().addAbortListener;let w0;if(H)w0=Z(H,m);let E0,r,C=[],S=0;function p(V){o(V,--S===0)}function o(V,c0){var r0;if(V&&(!E0||E0.code==="ERR_STREAM_PREMATURE_CLOSE"))E0=V;if(!E0&&!c0)return;while(C.length)C.shift()(E0);if((r0=w0)===null||r0===void 0||r0[I](),T0.abort(),c0){if(!E0)D.forEach((S0)=>S0());u.nextTick(u0,E0,r)}}let d;for(let V=0;V<K.length;V++){let c0=K[V],r0=V<K.length-1,S0=V>0,F0=r0||(I0===null||I0===void 0?void 0:I0.end)!==!1,i2=V===K.length-1;if(B0(c0)){let $0=function(N0){if(N0&&N0.name!=="AbortError"&&N0.code!=="ERR_STREAM_PREMATURE_CLOSE")p(N0)};var O=$0;if(F0){let{destroy:N0,cleanup:w2}=l(c0,r0,S0);if(C.push(N0),F(c0)&&i2)D.push(w2)}if(c0.on("error",$0),F(c0)&&i2)D.push(()=>{c0.removeListener("error",$0)})}if(V===0)if(typeof c0==="function"){if(d=c0({signal:U0}),!$(d))throw new y("Iterable, AsyncIterable or Stream","source",d)}else if($(c0)||k(c0)||f0(c0))d=c0;else d=x.from(c0);else if(typeof c0==="function"){if(f0(d)){var Y;d=n0((Y=d)===null||Y===void 0?void 0:Y.readable)}else d=n0(d);if(d=c0(d,{signal:U0}),r0){if(!$(d,!0))throw new y("AsyncIterable",`transform[${V-1}]`,d)}else{var e;if(!z)z=R1();let $0=new z({objectMode:!0}),N0=(e=d)===null||e===void 0?void 0:e.then;if(typeof N0==="function")S++,N0.call(d,(P0)=>{if(r=P0,P0!=null)$0.write(P0);if(F0)$0.end();u.nextTick(p)},(P0)=>{$0.destroy(P0),u.nextTick(p,P0)});else if($(d,!0))S++,P(d,$0,p,{end:F0});else if(Q(d)||f0(d)){let P0=d.readable||d;S++,P(P0,$0,p,{end:F0})}else throw new y("AsyncIterable or Promise","destination",d);d=$0;let{destroy:w2,cleanup:f2}=l(d,!1,!0);if(C.push(w2),i2)D.push(f2)}}else if(B0(c0)){if(k(d)){S+=2;let $0=s(d,c0,p,{end:F0});if(F(c0)&&i2)D.push($0)}else if(f0(d)||Q(d)){let $0=d.readable||d;S++,P($0,c0,p,{end:F0})}else if($(d))S++,P(d,c0,p,{end:F0});else throw new N("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],d);d=c0}else if(b(c0)){if(k(d))S++,g0(n0(d),c0,p,{end:F0});else if(Q(d)||$(d))S++,g0(d,c0,p,{end:F0});else if(f0(d))S++,g0(d.readable,c0,p,{end:F0});else throw new N("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],d);d=c0}else d=x.from(c0)}if(U0!==null&&U0!==void 0&&U0.aborted||H!==null&&H!==void 0&&H.aborted)u.nextTick(m);return d}function s(K,u0,I0,{end:T0}){let U0=!1;if(u0.on("close",()=>{if(!U0)I0(new J)}),K.pipe(u0,{end:!1}),T0){let D=function(){U0=!0,u0.end()};var H=D;if(j(K))u.nextTick(D);else K.once("end",D)}else I0();return E(K,{readable:!0,writable:!1},(D)=>{let m=K._readableState;if(D&&D.code==="ERR_STREAM_PREMATURE_CLOSE"&&m&&m.ended&&!m.errored&&!m.errorEmitted)K.once("end",I0).once("error",I0);else I0(D)}),E(u0,{readable:!1,writable:!0},I0)}h.exports={pipelineImpl:_,pipeline:A}}),Z1=x0((i,h)=>{var{pipeline:u}=ni(),n=t0(),{destroyer:g}=A2(),{isNodeStream:c,isReadable:I,isWritable:E,isWebStream:U,isTransformStream:T,isWritableStream:x,isReadableStream:R}=l0(),{AbortError:N,codes:{ERR_INVALID_ARG_VALUE:y,ERR_MISSING_ARGS:v}}=y0(),t=s0();h.exports=function(...J){if(J.length===0)throw new v("streams");if(J.length===1)return n.from(J[0]);let X=[...J];if(typeof J[0]==="function")J[0]=n.from(J[0]);if(typeof J[J.length-1]==="function"){let L=J.length-1;J[L]=n.from(J[L])}for(let L=0;L<J.length;++L){if(!c(J[L])&&!U(J[L]))continue;if(L<J.length-1&&!(I(J[L])||R(J[L])||T(J[L])))throw new y(`streams[${L}]`,X[L],"must be readable");if(L>0&&!(E(J[L])||x(J[L])||T(J[L])))throw new y(`streams[${L}]`,X[L],"must be writable")}let f,M,$,F,k;function B0(L){let z=F;if(F=null,z)z(L);else if(L)k.destroy(L);else if(!j&&!Q)k.destroy()}let f0=J[0],b=u(J,B0),Q=!!(E(f0)||x(f0)||T(f0)),j=!!(I(b)||R(b)||T(b));if(k=new n({writableObjectMode:!!(f0!==null&&f0!==void 0&&f0.writableObjectMode),readableObjectMode:!!(b!==null&&b!==void 0&&b.readableObjectMode),writable:Q,readable:j}),Q){if(c(f0))k._write=function(z,q,Z){if(f0.write(z,q))Z();else f=Z},k._final=function(z){f0.end(),M=z},f0.on("drain",function(){if(f){let z=f;f=null,z()}});else if(U(f0)){let z=(T(f0)?f0.writable:f0).getWriter();k._write=async function(q,Z,l){try{await z.ready,z.write(q).catch(()=>{}),l()}catch(i0){l(i0)}},k._final=async function(q){try{await z.ready,z.close().catch(()=>{}),M=q}catch(Z){q(Z)}}}let L=T(b)?b.readable:b;t(L,()=>{if(M){let z=M;M=null,z()}})}if(j){if(c(b))b.on("readable",function(){if($){let L=$;$=null,L()}}),b.on("end",function(){k.push(null)}),k._read=function(){while(!0){let L=b.read();if(L===null){$=k._read;return}if(!k.push(L))return}};else if(U(b)){let L=(T(b)?b.readable:b).getReader();k._read=async function(){while(!0)try{let{value:z,done:q}=await L.read();if(!k.push(z))return;if(q){k.push(null);return}}catch{return}}}}return k._destroy=function(L,z){if(!L&&F!==null)L=new N;if($=null,f=null,M=null,F===null)z(L);else if(F=z,c(b))g(b,L)},k}}),vh=x0((i,h)=>{var u=globalThis.AbortController||Z2().AbortController,{codes:{ERR_INVALID_ARG_VALUE:n,ERR_INVALID_ARG_TYPE:g,ERR_MISSING_ARGS:c,ERR_OUT_OF_RANGE:I},AbortError:E}=y0(),{validateAbortSignal:U,validateInteger:T,validateObject:x}=$2(),R=M0().Symbol("kWeak"),N=M0().Symbol("kResistStopPropagation"),{finished:y}=s0(),v=Z1(),{addAbortSignalNoValidate:t}=S2(),{isWritable:J,isNodeStream:X}=l0(),{deprecate:f}=q0(),{ArrayPrototypePush:M,Boolean:$,MathFloor:F,Number:k,NumberIsNaN:B0,Promise:f0,PromiseReject:b,PromiseResolve:Q,PromisePrototypeThen:j,Symbol:L}=M0(),z=L("kEmpty"),q=L("kEof");function Z(H,D){if(D!=null)x(D,"options");if((D===null||D===void 0?void 0:D.signal)!=null)U(D.signal,"options.signal");if(X(H)&&!J(H))throw new n("stream",H,"must be writable");let m=v(this,H);if(D!==null&&D!==void 0&&D.signal)t(D.signal,m);return m}function l(H,D){if(typeof H!=="function")throw new g("fn",["Function","AsyncFunction"],H);if(D!=null)x(D,"options");if((D===null||D===void 0?void 0:D.signal)!=null)U(D.signal,"options.signal");let m=1;if((D===null||D===void 0?void 0:D.concurrency)!=null)m=F(D.concurrency);let w0=m-1;if((D===null||D===void 0?void 0:D.highWaterMark)!=null)w0=F(D.highWaterMark);return T(m,"options.concurrency",1),T(w0,"options.highWaterMark",0),w0+=m,async function*(){let E0=q0().AbortSignalAny([D===null||D===void 0?void 0:D.signal].filter($)),r=this,C=[],S={signal:E0},p,o,d=!1,O=0;function Y(){d=!0,e()}function e(){O-=1,V()}function V(){if(o&&!d&&O<m&&C.length<w0)o(),o=null}async function c0(){try{for await(let r0 of r){if(d)return;if(E0.aborted)throw new E;try{if(r0=H(r0,S),r0===z)continue;r0=Q(r0)}catch(S0){r0=b(S0)}if(O+=1,j(r0,e,Y),C.push(r0),p)p(),p=null;if(!d&&(C.length>=w0||O>=m))await new f0((S0)=>{o=S0})}C.push(q)}catch(r0){let S0=b(r0);j(S0,e,Y),C.push(S0)}finally{if(d=!0,p)p(),p=null}}c0();try{while(!0){while(C.length>0){let r0=await C[0];if(r0===q)return;if(E0.aborted)throw new E;if(r0!==z)yield r0;C.shift(),V()}await new f0((r0)=>{p=r0})}}finally{if(d=!0,o)o(),o=null}}.call(this)}function i0(H=void 0){if(H!=null)x(H,"options");if((H===null||H===void 0?void 0:H.signal)!=null)U(H.signal,"options.signal");return async function*(){let D=0;for await(let w0 of this){var m;if(H!==null&&H!==void 0&&(m=H.signal)!==null&&m!==void 0&&m.aborted)throw new E({cause:H.signal.reason});yield[D++,w0]}}.call(this)}async function n0(H,D=void 0){for await(let m of A.call(this,H,D))return!0;return!1}async function A0(H,D=void 0){if(typeof H!=="function")throw new g("fn",["Function","AsyncFunction"],H);return!await n0.call(this,async(...m)=>{return!await H(...m)},D)}async function P(H,D){for await(let m of A.call(this,H,D))return m;return}async function g0(H,D){if(typeof H!=="function")throw new g("fn",["Function","AsyncFunction"],H);async function m(w0,E0){return await H(w0,E0),z}for await(let w0 of l.call(this,m,D));}function A(H,D){if(typeof H!=="function")throw new g("fn",["Function","AsyncFunction"],H);async function m(w0,E0){if(await H(w0,E0))return w0;return z}return l.call(this,m,D)}class _ extends c{constructor(){super("reduce");this.message="Reduce of an empty stream requires an initial value"}}async function s(H,D,m){var w0;if(typeof H!=="function")throw new g("reducer",["Function","AsyncFunction"],H);if(m!=null)x(m,"options");if((m===null||m===void 0?void 0:m.signal)!=null)U(m.signal,"options.signal");let E0=arguments.length>1;if(m!==null&&m!==void 0&&(w0=m.signal)!==null&&w0!==void 0&&w0.aborted){let o=new E(void 0,{cause:m.signal.reason});throw this.once("error",()=>{}),await y(this.destroy(o)),o}let r=new u,C=r.signal;if(m!==null&&m!==void 0&&m.signal){let o={once:!0,[R]:this,[N]:!0};m.signal.addEventListener("abort",()=>r.abort(),o)}let S=!1;try{for await(let o of this){var p;if(S=!0,m!==null&&m!==void 0&&(p=m.signal)!==null&&p!==void 0&&p.aborted)throw new E;if(!E0)D=o,E0=!0;else D=await H(D,o,{signal:C})}if(!S&&!E0)throw new _}finally{r.abort()}return D}async function K(H){if(H!=null)x(H,"options");if((H===null||H===void 0?void 0:H.signal)!=null)U(H.signal,"options.signal");let D=[];for await(let w0 of this){var m;if(H!==null&&H!==void 0&&(m=H.signal)!==null&&m!==void 0&&m.aborted)throw new E(void 0,{cause:H.signal.reason});M(D,w0)}return D}function u0(H,D){let m=l.call(this,H,D);return async function*(){for await(let w0 of m)yield*w0}.call(this)}function I0(H){if(H=k(H),B0(H))return 0;if(H<0)throw new I("number",">= 0",H);return H}function T0(H,D=void 0){if(D!=null)x(D,"options");if((D===null||D===void 0?void 0:D.signal)!=null)U(D.signal,"options.signal");return H=I0(H),async function*(){var m;if(D!==null&&D!==void 0&&(m=D.signal)!==null&&m!==void 0&&m.aborted)throw new E;for await(let E0 of this){var w0;if(D!==null&&D!==void 0&&(w0=D.signal)!==null&&w0!==void 0&&w0.aborted)throw new E;if(H--<=0)yield E0}}.call(this)}function U0(H,D=void 0){if(D!=null)x(D,"options");if((D===null||D===void 0?void 0:D.signal)!=null)U(D.signal,"options.signal");return H=I0(H),async function*(){var m;if(D!==null&&D!==void 0&&(m=D.signal)!==null&&m!==void 0&&m.aborted)throw new E;for await(let E0 of this){var w0;if(D!==null&&D!==void 0&&(w0=D.signal)!==null&&w0!==void 0&&w0.aborted)throw new E;if(H-- >0)yield E0;if(H<=0)return}}.call(this)}h.exports.streamReturningOperators={asIndexedPairs:f(i0,"readable.asIndexedPairs will be removed in a future version."),drop:T0,filter:A,flatMap:u0,map:l,take:U0,compose:Z},h.exports.promiseReturningOperators={every:A0,forEach:g0,reduce:s,toArray:K,some:n0,find:P}}),$1=x0((i,h)=>{var{ArrayPrototypePop:u,Promise:n}=M0(),{isIterable:g,isNodeStream:c,isWebStream:I}=l0(),{pipelineImpl:E}=ni(),{finished:U}=s0();z1();function T(...x){return new n((R,N)=>{let y,v,t=x[x.length-1];if(t&&typeof t==="object"&&!c(t)&&!g(t)&&!I(t)){let J=u(x);y=J.signal,v=J.end}E(x,(J,X)=>{if(J)N(J);else R(X)},{signal:y,end:v})})}h.exports={finished:U,pipeline:T}}),z1=x0((i,h)=>{var{Buffer:u}=(d0(),Q0(m0)),{ObjectDefineProperty:n,ObjectKeys:g,ReflectApply:c}=M0(),{promisify:{custom:I}}=q0(),{streamReturningOperators:E,promiseReturningOperators:U}=vh(),{codes:{ERR_ILLEGAL_CONSTRUCTOR:T}}=y0(),x=Z1(),{setDefaultHighWaterMark:R,getDefaultHighWaterMark:N}=F2(),{pipeline:y}=ni(),{destroyer:v}=A2(),t=s0(),J=$1(),X=l0(),f=h.exports=hi().Stream;f.isDestroyed=X.isDestroyed,f.isDisturbed=X.isDisturbed,f.isErrored=X.isErrored,f.isReadable=X.isReadable,f.isWritable=X.isWritable,f.Readable=K2();for(let $ of g(E)){let F=function(...B0){if(new.target)throw T();return f.Readable.from(c(k,this,B0))},k=E[$];n(F,"name",{__proto__:null,value:k.name}),n(F,"length",{__proto__:null,value:k.length}),n(f.Readable.prototype,$,{__proto__:null,value:F,enumerable:!1,configurable:!0,writable:!0})}for(let $ of g(U)){let F=function(...B0){if(new.target)throw T();return c(k,this,B0)},k=U[$];n(F,"name",{__proto__:null,value:k.name}),n(F,"length",{__proto__:null,value:k.length}),n(f.Readable.prototype,$,{__proto__:null,value:F,enumerable:!1,configurable:!0,writable:!0})}f.Writable=ui(),f.Duplex=t0(),f.Transform=C1(),f.PassThrough=R1(),f.pipeline=y;var{addAbortSignal:M}=S2();f.addAbortSignal=M,f.finished=t,f.destroy=v,f.compose=x,f.setDefaultHighWaterMark=R,f.getDefaultHighWaterMark=N,n(f,"promises",{__proto__:null,configurable:!0,enumerable:!0,get(){return J}}),n(y,I,{__proto__:null,enumerable:!0,get(){return J.pipeline}}),n(t,I,{__proto__:null,enumerable:!0,get(){return J.finished}}),f.Stream=f,f._isUint8Array=function($){return $ instanceof Uint8Array},f._uint8ArrayToBuffer=function($){return u.from($.buffer,$.byteOffset,$.byteLength)}}),bh=x0((i,h)=>{var u=gi();{let n=z1(),g=$1(),c=n.Readable.destroy;h.exports=n.Readable,h.exports._uint8ArrayToBuffer=n._uint8ArrayToBuffer,h.exports._isUint8Array=n._isUint8Array,h.exports.isDisturbed=n.isDisturbed,h.exports.isErrored=n.isErrored,h.exports.isReadable=n.isReadable,h.exports.Readable=n.Readable,h.exports.Writable=n.Writable,h.exports.Duplex=n.Duplex,h.exports.Transform=n.Transform,h.exports.PassThrough=n.PassThrough,h.exports.addAbortSignal=n.addAbortSignal,h.exports.finished=n.finished,h.exports.destroy=n.destroy,h.exports.destroy=c,h.exports.pipeline=n.pipeline,h.exports.compose=n.compose,Object.defineProperty(n,"promises",{configurable:!0,enumerable:!0,get(){return g}}),h.exports.Stream=n.Stream}h.exports.default=h.exports});J1.exports=bh()});import{logger as C0,ModelType as R0}from"@elizaos/core";import{logger as Y0}from"@elizaos/core";import{logger as z2}from"@elizaos/core";function m1(i){if(typeof process>"u")return;let h=process.env[i];return h===void 0?void 0:String(h)}function L0(i,h,u){let n=i.getSetting(h);if(n!==void 0&&n!==null)return String(n);return m1(h)??u}function o0(){return typeof globalThis<"u"&&typeof globalThis.document<"u"}function Ni(i){return o0()&&!!L0(i,"ELIZAOS_CLOUD_BROWSER_BASE_URL")}function _0(i,h=!1){if(o0())return{};let u=h?d1(i):v0(i);return u?{Authorization:`Bearer ${u}`}:{}}function H0(i){let h=L0(i,"ELIZAOS_CLOUD_BROWSER_BASE_URL");return o0()&&h?h:L0(i,"ELIZAOS_CLOUD_BASE_URL","https://www.elizacloud.ai/api/v1")}function Xi(i){let h=o0()?L0(i,"ELIZAOS_CLOUD_BROWSER_EMBEDDING_URL")||L0(i,"ELIZAOS_CLOUD_BROWSER_BASE_URL"):L0(i,"ELIZAOS_CLOUD_EMBEDDING_URL");if(h)return z2.debug(`[ELIZAOS_CLOUD] Using specific embedding base URL: ${h}`),h;return z2.debug("[ELIZAOS_CLOUD] Falling back to general base URL for embeddings."),H0(i)}function v0(i){return L0(i,"ELIZAOS_CLOUD_API_KEY")}function d1(i){let h=L0(i,"ELIZAOS_CLOUD_EMBEDDING_API_KEY");if(h)return z2.debug("[ELIZAOS_CLOUD] Using specific embedding API key (present)"),h;return z2.debug("[ELIZAOS_CLOUD] Falling back to general API key for embeddings."),v0(i)}function J2(i){return L0(i,"ELIZAOS_CLOUD_SMALL_MODEL")??L0(i,"SMALL_MODEL","gpt-5-mini")}function y2(i){return L0(i,"ELIZAOS_CLOUD_LARGE_MODEL")??L0(i,"LARGE_MODEL","gpt-5")}function qi(i){return L0(i,"ELIZAOS_CLOUD_IMAGE_DESCRIPTION_MODEL","gpt-5-mini")??"gpt-5-mini"}function Gi(i){return L0(i,"ELIZAOS_CLOUD_IMAGE_GENERATION_MODEL","google/gemini-2.5-flash-image")??"google/gemini-2.5-flash-image"}function Si(i){let h=L0(i,"ELIZAOS_CLOUD_EXPERIMENTAL_TELEMETRY","false");return String(h).toLowerCase()==="true"}function Fi(i,h){(async()=>{try{if(!v0(h)&&!o0()){Y0.warn("ELIZAOS_CLOUD_API_KEY is not set in environment - ElizaOS Cloud functionality will be limited"),Y0.info("Get your API key from https://www.elizacloud.ai/dashboard/api-keys");return}try{let u=H0(h),n=await fetch(`${u}/models`,{headers:{..._0(h)}});if(!n.ok)Y0.warn(`ElizaOS Cloud API key validation failed: ${n.statusText}`),Y0.warn("ElizaOS Cloud functionality will be limited until a valid API key is provided"),Y0.info("Get your API key from https://www.elizacloud.ai/dashboard/api-keys");else Y0.log("ElizaOS Cloud API key validated successfully")}catch(u){let n=u instanceof Error?u.message:String(u);Y0.warn(`Error validating ElizaOS Cloud API key: ${n}`),Y0.warn("ElizaOS Cloud functionality will be limited until a valid API key is provided")}}catch(u){let n=u?.errors?.map((g)=>g.message).join(", ")||(u instanceof Error?u.message:String(u));Y0.warn(`ElizaOS Cloud plugin configuration issue: ${n} - You need to configure the ELIZAOS_CLOUD_API_KEY in your environment variables`),Y0.info("Get your API key from https://www.elizacloud.ai/dashboard/api-keys")}})()}import{logger as J0,ModelType as l1,VECTOR_DIMS as Ki}from"@elizaos/core";import{EventType as t1}from"@elizaos/core";function p0(i,h,u,n){let g=Number(n.inputTokens||0),c=Number(n.outputTokens||0),I=Number(n.totalTokens!=null?n.totalTokens:g+c);i.emitEvent(t1.MODEL_USED,{runtime:i,source:"elizacloud",type:h,tokens:{prompt:g,completion:c,total:I}})}var N2=100;function o1(i){return{remainingRequests:parseInt(i.headers.get("x-ratelimit-remaining-requests")||"",10)||void 0,remainingTokens:parseInt(i.headers.get("x-ratelimit-remaining-tokens")||"",10)||void 0,limitRequests:parseInt(i.headers.get("x-ratelimit-limit-requests")||"",10)||void 0,limitTokens:parseInt(i.headers.get("x-ratelimit-limit-tokens")||"",10)||void 0,resetRequests:i.headers.get("x-ratelimit-reset-requests")||void 0,resetTokens:i.headers.get("x-ratelimit-reset-tokens")||void 0,retryAfter:parseInt(i.headers.get("retry-after")||"",10)||void 0}}function Qi(i){let h=L0(i,"ELIZAOS_CLOUD_EMBEDDING_MODEL","text-embedding-3-small"),u=Number.parseInt(L0(i,"ELIZAOS_CLOUD_EMBEDDING_DIMENSIONS","1536")||"1536",10);if(!Object.values(Ki).includes(u)){let n=`Invalid embedding dimension: ${u}. Must be one of: ${Object.values(Ki).join(", ")}`;throw J0.error(n),Error(n)}return{embeddingModelName:h,embeddingDimension:u}}function b0(i,h){let u=Array(i).fill(0);return u[0]=h,u}async function p2(i,h){let{embeddingDimension:u}=Qi(i);if(h===null)return J0.debug("Creating test embedding for initialization"),b0(u,0.1);let n;if(typeof h==="string")n=h;else if(typeof h==="object"&&h.text)n=h.text;else return J0.warn("Invalid input format for embedding"),b0(u,0.2);if(!n.trim())return J0.warn("Empty text for embedding"),b0(u,0.3);return(await Hi(i,[n]))[0]}async function Hi(i,h){let{embeddingModelName:u,embeddingDimension:n}=Qi(i),g=Xi(i);if(!h||h.length===0)return J0.warn("[BatchEmbeddings] Empty texts array"),[];let c=[],I=Array(h.length);for(let E=0;E<h.length;E++){let U=h[E]?.trim();if(U)c.push({text:U,originalIndex:E});else I[E]=b0(n,0.3)}if(c.length===0)return J0.warn("[BatchEmbeddings] All texts were empty"),I;for(let E=0;E<c.length;E+=N2){let U=Math.min(E+N2,c.length),T=c.slice(E,U),x=T.map((R)=>R.text);J0.info(`[BatchEmbeddings] Processing batch ${Math.floor(E/N2)+1}/${Math.ceil(c.length/N2)}: ${T.length} texts`);try{let R=await fetch(`${g}/embeddings`,{method:"POST",headers:{..._0(i,!0),"Content-Type":"application/json"},body:JSON.stringify({model:u,input:x})}),N=o1(R);if(N.remainingRequests!==void 0&&N.remainingRequests<50)J0.warn(`[BatchEmbeddings] Rate limit: ${N.remainingRequests}/${N.limitRequests} requests remaining`);if(R.status===429){let v=N.retryAfter||30;J0.warn(`[BatchEmbeddings] Rate limited, waiting ${v}s...`),await new Promise((X)=>setTimeout(X,v*1000));let t=await fetch(`${g}/embeddings`,{method:"POST",headers:{..._0(i,!0),"Content-Type":"application/json"},body:JSON.stringify({model:u,input:x})});if(!t.ok){J0.error(`[BatchEmbeddings] Retry failed: ${t.status}`);for(let X of T)I[X.originalIndex]=b0(n,0.4);continue}let J=await t.json();if(J?.data){for(let X of J.data){let f=T[X.index].originalIndex;I[f]=X.embedding}J0.info(`[BatchEmbeddings] Retry successful for ${T.length} embeddings`)}continue}if(!R.ok){J0.error(`[BatchEmbeddings] API error: ${R.status} - ${R.statusText}`);for(let v of T)I[v.originalIndex]=b0(n,0.4);continue}let y=await R.json();if(!y?.data||!Array.isArray(y.data)){J0.error("[BatchEmbeddings] API returned invalid structure");for(let v of T)I[v.originalIndex]=b0(n,0.5);continue}for(let v of y.data){let t=T[v.index].originalIndex;I[t]=v.embedding}if(y.usage){let v={inputTokens:y.usage.prompt_tokens,outputTokens:0,totalTokens:y.usage.total_tokens};p0(i,l1.TEXT_EMBEDDING,`batch:${T.length}`,v)}J0.debug(`[BatchEmbeddings] Got ${T.length} embeddings (${n}d), remaining: ${N.remainingRequests??"unknown"}`)}catch(R){let N=R instanceof Error?R.message:String(R);J0.error(`[BatchEmbeddings] Error: ${N}`);for(let y of T)I[y.originalIndex]=b0(n,0.6)}}return I}import{logger as Q2,ModelType as ah}from"@elizaos/core";import{logger as y1}from"@elizaos/core";import{JSONParseError as eh}from"ai";function ci(){return async({text:i,error:h})=>{try{if(h instanceof eh){let u=i.replace(/```json\n|\n```|```/g,"");return JSON.parse(u),u}return null}catch(u){let n=u instanceof Error?u.message:String(u);return y1.warn(`Failed to repair JSON text: ${n}`),null}}}async function N1(i){try{let{Readable:h}=await Promise.resolve().then(() => p1(gi(),1)),u=i.getReader();return new h({async read(){try{let{done:n,value:g}=await u.read();if(n)this.push(null);else this.push(g)}catch(n){this.destroy(n)}},destroy(n,g){u.cancel().finally(()=>g(n))}})}catch(h){let u=h instanceof Error?h.message:String(h);throw y1.error(`Failed to load node:stream module: ${u}`),Error("Cannot convert stream: node:stream module unavailable. This feature requires a Node.js environment.")}}function X1(i){let u=i.match(/title[:\s]+(.+?)(?:\n|$)/i)?.[1]?.trim()||"Image Analysis",n=i.replace(/title[:\s]+(.+?)(?:\n|$)/i,"").trim();return{title:u,description:n}}async function Bi(i,h){let u=h.count||1,n=h.size||"1024x1024",g=h.prompt,c=Gi(i);Q2.log(`[ELIZAOS_CLOUD] Using IMAGE model: ${c}`);let I=H0(i),U={"1024x1024":"1:1","1792x1024":"16:9","1024x1792":"9:16"}[n]||"1:1";try{let T=`${I}/generate-image`,x={prompt:g,numImages:u,aspectRatio:U,model:c},R=await fetch(T,{method:"POST",headers:{..._0(i),"Content-Type":"application/json"},body:JSON.stringify(x)});if(!R.ok){let t=await R.text();throw Error(`Failed to generate image: ${R.status} ${t}`)}return(await R.json()).images.map((t)=>({url:t.url||t.image}))}catch(T){let x=T instanceof Error?T.message:String(T);throw Q2.error(`[ELIZAOS_CLOUD] Image generation error: ${x}`),T}}async function Ii(i,h){let u,n,g=qi(i);Q2.log(`[ELIZAOS_CLOUD] Using IMAGE_DESCRIPTION model: ${g}`);let c=Number.parseInt(L0(i,"ELIZAOS_CLOUD_IMAGE_DESCRIPTION_MAX_TOKENS","8192")||"8192",10);if(typeof h==="string")u=h,n="Please analyze this image and provide a title and detailed description.";else u=h.imageUrl,n=h.prompt||"Please analyze this image and provide a title and detailed description.";let I=[{role:"user",content:[{type:"text",text:n},{type:"image_url",image_url:{url:u}}]}],E=H0(i);try{let U={model:g,messages:I,max_tokens:c},T=await fetch(`${E}/chat/completions`,{method:"POST",headers:{"Content-Type":"application/json",..._0(i)},body:JSON.stringify(U)});if(!T.ok)throw Error(`ElizaOS Cloud API error: ${T.status}`);let x=await T.json(),R=x.choices?.[0]?.message?.content;if(x.usage)p0(i,ah.IMAGE_DESCRIPTION,typeof h==="string"?h:h.prompt||"",{inputTokens:x.usage.prompt_tokens,outputTokens:x.usage.completion_tokens,totalTokens:x.usage.total_tokens});if(!R)return{title:"Failed to analyze image",description:"No response from API"};return X1(R)}catch(U){let T=U instanceof Error?U.message:String(U);return Q2.error(`Error analyzing image: ${T}`),{title:"Failed to analyze image",description:`Error: ${T}`}}}import{logger as T2,ModelType as q1}from"@elizaos/core";import{generateObject as iu,JSONParseError as hu}from"ai";import{createOpenAI as sh}from"@ai-sdk/openai";function H2(i){let h=H0(i),u=v0(i)??(Ni(i)?"eliza-proxy":void 0);return sh({apiKey:u??"",baseURL:h})}async function G1(i,h,u,n){let g=H2(i),c=n(i);T2.log(`[ELIZAOS_CLOUD] Using ${u} model: ${c}`);let I=h.temperature??0;try{let E=g.languageModel(c),{object:U,usage:T}=await iu({model:E,output:"no-schema",prompt:h.prompt,temperature:I,experimental_repairText:ci()});if(T)p0(i,u,h.prompt,T);return U}catch(E){if(E instanceof hu){T2.error(`[generateObject] Failed to parse JSON: ${E.message}`);let T=await ci()({text:E.text,error:E});if(T)try{let x=JSON.parse(T);return T2.info("[generateObject] Successfully repaired JSON."),x}catch(x){let R=x instanceof Error?x.message:String(x);throw T2.error(`[generateObject] Failed to parse repaired JSON: ${R}`),x}else throw T2.error("[generateObject] JSON repair failed."),E}else{let U=E instanceof Error?E.message:String(E);throw T2.error(`[generateObject] Error: ${U}`),E}}}async function wi(i,h){return G1(i,h,q1.OBJECT_SMALL,J2)}async function fi(i,h){return G1(i,h,q1.OBJECT_LARGE,y2)}import{logger as ku}from"@elizaos/core";async function Ei(i,h){let u=L0(i,"ELIZAOS_CLOUD_TTS_MODEL","gpt-5-mini-tts"),n=L0(i,"ELIZAOS_CLOUD_TTS_VOICE","nova"),g=L0(i,"ELIZAOS_CLOUD_TTS_INSTRUCTIONS",""),c=H0(i),I=h.model||u,E=h.voice||n,U=h.instructions??g,T=h.format||"mp3";try{let x=await fetch(`${c}/audio/speech`,{method:"POST",headers:{..._0(i),"Content-Type":"application/json",...T==="mp3"?{Accept:"audio/mpeg"}:{}},body:JSON.stringify({model:I,voice:E,input:h.text,format:T,...U&&{instructions:U}})});if(!x.ok){let R=await x.text();throw Error(`ElizaOS Cloud TTS error ${x.status}: ${R}`)}if(!x.body)throw Error("ElizaOS Cloud TTS response body is null");if(!o0())return await N1(x.body);return x.body}catch(x){let R=x instanceof Error?x.message:String(x);throw Error(`Failed to fetch speech from ElizaOS Cloud TTS: ${R}`)}}import{logger as D2,ModelType as P2}from"@elizaos/core";import{generateText as uu,streamText as nu}from"ai";function gu(i,h,u){let{prompt:n,stopSequences:g=[]}=u,c=u.temperature??0.7,I=u.frequencyPenalty??0.7,E=u.presencePenalty??0.7,U=u.maxTokens??8192,T=H2(i),x=h===P2.TEXT_SMALL?J2(i):y2(i),R=h===P2.TEXT_SMALL?"TEXT_SMALL":"TEXT_LARGE",N=Si(i);return{generateParams:{model:T.languageModel(x),prompt:n,system:i.character.system??void 0,temperature:c,maxOutputTokens:U,frequencyPenalty:I,presencePenalty:E,stopSequences:g,experimental_telemetry:{isEnabled:N}},modelName:x,modelLabel:R,prompt:n}}function cu(i,h,u,n,g){D2.debug(`[ELIZAOS_CLOUD] Streaming text with ${g} model`);let c=nu(u);return{textStream:c.textStream,text:Promise.resolve(c.text),usage:Promise.resolve(c.usage).then((I)=>{if(I){p0(i,h,n,I);let E=I.inputTokens??0,U=I.outputTokens??0;return{promptTokens:E,completionTokens:U,totalTokens:E+U}}return}),finishReason:Promise.resolve(c.finishReason)}}async function S1(i,h,u){let{generateParams:n,modelName:g,modelLabel:c,prompt:I}=gu(i,h,u);if(D2.debug(`[ELIZAOS_CLOUD] Generating text with ${c} model: ${g}`),u.stream)return cu(i,h,n,I,c);D2.log(`[ELIZAOS_CLOUD] Using ${c} model: ${g}`),D2.log(I);let E=await uu(n);if(E.usage)p0(i,h,I,E.usage);return E.text}async function Ui(i,h){return S1(i,P2.TEXT_SMALL,h)}async function Ai(i,h){return S1(i,P2.TEXT_LARGE,h)}function Bu(){if(typeof process>"u")return{};return process.env}var G0=Bu(),Iu={name:"elizaOSCloud",description:"ElizaOS Cloud plugin - Multi-model AI generation with text, image, and video support",config:{ELIZAOS_CLOUD_API_KEY:G0.ELIZAOS_CLOUD_API_KEY??null,ELIZAOS_CLOUD_BASE_URL:G0.ELIZAOS_CLOUD_BASE_URL??null,ELIZAOS_CLOUD_SMALL_MODEL:G0.ELIZAOS_CLOUD_SMALL_MODEL??null,ELIZAOS_CLOUD_LARGE_MODEL:G0.ELIZAOS_CLOUD_LARGE_MODEL??null,SMALL_MODEL:G0.SMALL_MODEL??null,LARGE_MODEL:G0.LARGE_MODEL??null,ELIZAOS_CLOUD_EMBEDDING_MODEL:G0.ELIZAOS_CLOUD_EMBEDDING_MODEL??null,ELIZAOS_CLOUD_EMBEDDING_API_KEY:G0.ELIZAOS_CLOUD_EMBEDDING_API_KEY??null,ELIZAOS_CLOUD_EMBEDDING_URL:G0.ELIZAOS_CLOUD_EMBEDDING_URL??null,ELIZAOS_CLOUD_EMBEDDING_DIMENSIONS:G0.ELIZAOS_CLOUD_EMBEDDING_DIMENSIONS??null,ELIZAOS_CLOUD_IMAGE_DESCRIPTION_MODEL:G0.ELIZAOS_CLOUD_IMAGE_DESCRIPTION_MODEL??null,ELIZAOS_CLOUD_IMAGE_DESCRIPTION_MAX_TOKENS:G0.ELIZAOS_CLOUD_IMAGE_DESCRIPTION_MAX_TOKENS??null,ELIZAOS_CLOUD_EXPERIMENTAL_TELEMETRY:G0.ELIZAOS_CLOUD_EXPERIMENTAL_TELEMETRY??null,ELIZAOS_CLOUD_IMAGE_GENERATION_MODEL:G0.ELIZAOS_CLOUD_IMAGE_GENERATION_MODEL??null},async init(i,h){Fi(i,h)},models:{[R0.TEXT_EMBEDDING]:p2,[R0.TEXT_SMALL]:Ui,[R0.TEXT_LARGE]:Ai,[R0.IMAGE]:Bi,[R0.IMAGE_DESCRIPTION]:Ii,[R0.OBJECT_SMALL]:wi,[R0.OBJECT_LARGE]:fi},tests:[{name:"ELIZAOS_CLOUD_plugin_tests",tests:[{name:"ELIZAOS_CLOUD_test_url_and_api_key_validation",fn:async(i)=>{let h=H0(i),u=await fetch(`${h}/models`,{headers:{Authorization:`Bearer ${v0(i)}`}}),n=await u.json();if(C0.log({data:n?.data?.length??"N/A"},"Models Available"),!u.ok)throw Error(`Failed to validate OpenAI API key: ${u.statusText}`)}},{name:"ELIZAOS_CLOUD_test_text_embedding",fn:async(i)=>{try{let h=await i.useModel(R0.TEXT_EMBEDDING,{text:"Hello, world!"});C0.log({embedding:h},"embedding")}catch(h){let u=h instanceof Error?h.message:String(h);throw C0.error(`Error in test_text_embedding: ${u}`),h}}},{name:"ELIZAOS_CLOUD_test_text_large",fn:async(i)=>{try{let h=await i.useModel(R0.TEXT_LARGE,{prompt:"What is the nature of reality in 10 words?"});if(h.length===0)throw Error("Failed to generate text");C0.log({text:h},"generated with test_text_large")}catch(h){let u=h instanceof Error?h.message:String(h);throw C0.error(`Error in test_text_large: ${u}`),h}}},{name:"ELIZAOS_CLOUD_test_text_small",fn:async(i)=>{try{let h=await i.useModel(R0.TEXT_SMALL,{prompt:"What is the nature of reality in 10 words?"});if(h.length===0)throw Error("Failed to generate text");C0.log({text:h},"generated with test_text_small")}catch(h){let u=h instanceof Error?h.message:String(h);throw C0.error(`Error in test_text_small: ${u}`),h}}},{name:"ELIZAOS_CLOUD_test_image_generation",fn:async(i)=>{C0.log("ELIZAOS_CLOUD_test_image_generation");try{let h=await i.useModel(R0.IMAGE,{prompt:"A beautiful sunset over a calm ocean",count:1,size:"1024x1024"});C0.log({image:h},"generated with test_image_generation")}catch(h){let u=h instanceof Error?h.message:String(h);throw C0.error(`Error in test_image_generation: ${u}`),h}}},{name:"image-description",fn:async(i)=>{try{C0.log("ELIZAOS_CLOUD_test_image_description");try{let h=await i.useModel(R0.IMAGE_DESCRIPTION,"https://upload.wikimedia.org/wikipedia/commons/thumb/1/1c/Vitalik_Buterin_TechCrunch_London_2015_%28cropped%29.jpg/537px-Vitalik_Buterin_TechCrunch_London_2015_%28cropped%29.jpg");if(h&&typeof h==="object"&&"title"in h&&"description"in h)C0.log({result:h},"Image description");else C0.error(`Invalid image description result format: ${JSON.stringify(h)}`)}catch(h){let u=h instanceof Error?h.message:String(h);C0.error(`Error in image description test: ${u}`)}}catch(h){let u=h instanceof Error?h.message:String(h);C0.error(`Error in ELIZAOS_CLOUD_test_image_description: ${u}`)}}},{name:"ELIZAOS_CLOUD_test_transcription",fn:async(i)=>{C0.log("ELIZAOS_CLOUD_test_transcription");try{let u=await(await fetch("https://upload.wikimedia.org/wikipedia/en/4/40/Chris_Benoit_Voice_Message.ogg")).arrayBuffer(),n=await i.useModel(R0.TRANSCRIPTION,Buffer.from(new Uint8Array(u)));C0.log({transcription:n},"generated with test_transcription")}catch(h){let u=h instanceof Error?h.message:String(h);throw C0.error(`Error in test_transcription: ${u}`),h}}},{name:"ELIZAOS_CLOUD_test_text_tokenizer_encode",fn:async(i)=>{let u=await i.useModel(R0.TEXT_TOKENIZER_ENCODE,{prompt:"Hello tokenizer encode!",modelType:R0.TEXT_SMALL});if(!Array.isArray(u)||u.length===0)throw Error("Failed to tokenize text: expected non-empty array of tokens");C0.log({tokens:u},"Tokenized output")}},{name:"ELIZAOS_CLOUD_test_text_tokenizer_decode",fn:async(i)=>{let u=await i.useModel(R0.TEXT_TOKENIZER_ENCODE,{prompt:"Hello tokenizer decode!",modelType:R0.TEXT_SMALL}),n=await i.useModel(R0.TEXT_TOKENIZER_DECODE,{tokens:u,modelType:R0.TEXT_SMALL});if(n!=="Hello tokenizer decode!")throw Error(`Decoded text does not match original. Expected "Hello tokenizer decode!", got "${n}"`);C0.log({decodedText:n},"Decoded text")}},{name:"ELIZAOS_CLOUD_test_text_to_speech",fn:async(i)=>{try{if(!await Ei(i,{text:"Hello, this is a test for text-to-speech."}))throw Error("Failed to generate speech");C0.log("Generated speech successfully")}catch(h){let u=h instanceof Error?h.message:String(h);throw C0.error(`Error in ELIZAOS_CLOUD_test_text_to_speech: ${u}`),h}}}]}]},wu=Iu;export{Iu as elizaOSCloudPlugin,wu as default};
|
|
3
3
|
|
|
4
|
-
//# debugId=
|
|
4
|
+
//# debugId=93D55016346A8E2A64756E2164756E21
|