aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> 2023-07-10 01:26:02 -0700
committerGravatar Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> 2023-07-10 01:26:02 -0700
commit93b0e94410754eea36a4f5a5a9f953ed959eee99 (patch)
treeb516d9578462f51e7befc58698e848a13fa726a2
parent963d4311e614ac197427104b9cf265bbe2a890af (diff)
downloadbun-93b0e94410754eea36a4f5a5a9f953ed959eee99.tar.gz
bun-93b0e94410754eea36a4f5a5a9f953ed959eee99.tar.zst
bun-93b0e94410754eea36a4f5a5a9f953ed959eee99.zip
trim node:stream a little
-rw-r--r--src/js/build-esm.ts22
-rw-r--r--src/js/node/stream.js28
-rw-r--r--src/js/out/modules/node/stream.js4
3 files changed, 38 insertions, 16 deletions
diff --git a/src/js/build-esm.ts b/src/js/build-esm.ts
index edfe7c04f..8cdca3688 100644
--- a/src/js/build-esm.ts
+++ b/src/js/build-esm.ts
@@ -55,23 +55,39 @@ const opts = {
},
} as const;
+const productionOpts = {
+ ...opts,
+ define: {
+ ...opts.define,
+ "IS_BUN_DEVELOPMENT": "false",
+ },
+};
+
+const devOpts = {
+ ...opts,
+ define: {
+ ...opts.define,
+ "IS_BUN_DEVELOPMENT": "true",
+ },
+};
+
const build_prod_minified = await Bun.build({
entrypoints: entrypoints.filter(file => minifyList.includes(file.slice(import.meta.dir.length + 1))),
minify: true,
- ...opts,
+ ...productionOpts,
});
const build_prod_unminified = await Bun.build({
entrypoints: entrypoints.filter(file => !minifyList.includes(file.slice(import.meta.dir.length + 1))),
minify: { syntax: true },
- ...opts,
+ ...productionOpts,
});
const build_dev = await Bun.build({
entrypoints: entrypoints,
minify: { syntax: true },
sourcemap: "external",
- ...opts,
+ ...devOpts,
});
for (const [build, outdir] of [
diff --git a/src/js/node/stream.js b/src/js/node/stream.js
index 9344fa73f..741b2f65c 100644
--- a/src/js/node/stream.js
+++ b/src/js/node/stream.js
@@ -1,15 +1,20 @@
// Hardcoded module "node:stream" / "readable-stream"
// "readable-stream" npm package
// just transpiled
-var { isPromise, isCallable, direct, Object } = globalThis[Symbol.for("Bun.lazy")]("primordials");
-import { EventEmitter as EE } from "bun:events_native";
-import { StringDecoder } from "node:string_decoder";
-globalThis.__IDS_TO_TRACK = process.env.DEBUG_TRACK_EE?.length
- ? process.env.DEBUG_TRACK_EE.split(",")
- : process.env.DEBUG_STREAMS?.length
- ? process.env.DEBUG_STREAMS.split(",")
- : null;
+// This must go at the top of the file, before any side effects.
+// IS_BUN_DEVELOPMENT is a bundle-only global variable that is set to true when
+// building a development bundle.
+const __TRACK_EE__ = IS_BUN_DEVELOPMENT && !!process.env.DEBUG_TRACK_EE;
+const __DEBUG__ = IS_BUN_DEVELOPMENT && !!(process.env.DEBUG || process.env.DEBUG_STREAMS || __TRACK_EE__);
+
+if (__DEBUG__) {
+ globalThis.__IDS_TO_TRACK = process.env.DEBUG_TRACK_EE?.length
+ ? process.env.DEBUG_TRACK_EE.split(",")
+ : process.env.DEBUG_STREAMS?.length
+ ? process.env.DEBUG_STREAMS.split(",")
+ : null;
+}
// Separating DEBUG, DEBUG_STREAMS and DEBUG_TRACK_EE env vars makes it easier to focus on the
// events in this file rather than all debug output across all files
@@ -18,9 +23,6 @@ globalThis.__IDS_TO_TRACK = process.env.DEBUG_TRACK_EE?.length
// The events and/or all of the outputs for the given stream IDs assigned at stream construction
// By default, child_process gives
-const __TRACK_EE__ = !!process.env.DEBUG_TRACK_EE;
-const __DEBUG__ = !!(process.env.DEBUG || process.env.DEBUG_STREAMS || __TRACK_EE__);
-
var debug = __DEBUG__
? globalThis.__IDS_TO_TRACK
? // If we are tracking IDs for debug event emitters, we should prefix the debug output with the ID
@@ -32,6 +34,10 @@ var debug = __DEBUG__
: (...args) => console.log(...args.slice(0, -1))
: () => {};
+var { isPromise, isCallable, direct, Object } = globalThis[Symbol.for("Bun.lazy")]("primordials");
+import { EventEmitter as EE } from "bun:events_native";
+import { StringDecoder } from "node:string_decoder";
+
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
diff --git a/src/js/out/modules/node/stream.js b/src/js/out/modules/node/stream.js
index f7e94b00d..0497ffd82 100644
--- a/src/js/out/modules/node/stream.js
+++ b/src/js/out/modules/node/stream.js
@@ -1,2 +1,2 @@
-import{EventEmitter as Tq} from"bun:events_native";import{StringDecoder as rq} from"node:string_decoder";var qQ=function(t){return typeof t==="object"&&t!==null&&t instanceof ReadableStream},QQ=function(t,M){if(typeof t!=="boolean")throw new XQ(M,"boolean",t)};var XQ=function(t,M,B){return new Error(`The argument '${t}' is invalid. Received '${B}' for type '${M}'`)},JQ=function(t,M,B){return new Error(`The value '${M}' is invalid for argument '${t}'. Reason: ${B}`)},zQ=function(t,M){var[B,F,y,I,j,R,x]=globalThis[Symbol.for("Bun.lazy")](t),g=[!1],f=function(P,A,K,U){if(A>0){const T=K.subarray(0,A),C=K.subarray(A);if(T.byteLength>0)P.push(T);if(U)P.push(null);return C.byteLength>0?C:void 0}if(U)P.push(null);return K},c=function(P,A,K,U){if(A.byteLength>0)P.push(A);if(U)P.push(null);return K},_=process.env.BUN_DISABLE_DYNAMIC_CHUNK_SIZE!=="1";const i=new FinalizationRegistry((P)=>P&&j(P)),D=512;var p=class P extends M{#q;#Q=1;#X=!1;#H=void 0;#J;#K=!1;#Z=!_;#B;constructor(A,K={}){super(K);if(typeof K.highWaterMark==="number")this.#J=K.highWaterMark;else this.#J=262144;this.#q=A,this.#X=!1,this.#H=void 0,this.#K=!1,this.#B={},i.register(this,this.#q,this.#B)}_read(A){if(n&&d("NativeReadable._read",this.__id),this.#K){n&&d("pendingRead is true",this.__id);return}var K=this.#q;if(n&&d("ptr @ NativeReadable._read",K,this.__id),K===0){this.push(null);return}if(!this.#X)n&&d("NativeReadable not constructed yet",this.__id),this.#$(K);return this.#V(this.#z(A),K)}#$(A){this.#X=!0;const K=F(A,this.#J);if(n&&d("NativeReadable internal `start` result",K,this.__id),typeof K==="number"&&K>1)this.#Z=!0,n&&d("NativeReadable resized",this.__id),this.#J=Math.min(this.#J,K);if(x){const U=x(A);if(n&&d("NativeReadable drain result",U,this.__id),(U?.byteLength??0)>0)this.push(U)}}#z(A=this.#J){var K=this.#H;if(n&&d("chunk @ #getRemainingChunk",K,this.__id),K?.byteLength??0<D){var U=A>D?A:D;this.#H=K=new Buffer(U)}return K}push(A,K){return n&&d("NativeReadable push -- result, encoding",A,K,this.__id),super.push(...arguments)}#Y(A,K,U){if(n&&d("result, isClosed @ #handleResult",A,U,this.__id),typeof A==="number"){if(A>=this.#J&&!this.#Z&&!U)this.#J*=2,this.#Z=!0;return f(this,A,K,U)}else if(typeof A==="boolean")return this.push(null),K?.byteLength??0>0?K:void 0;else if(ArrayBuffer.isView(A)){if(A.byteLength>=this.#J&&!this.#Z&&!U)this.#J*=2,this.#Z=!0,n&&d("Resized",this.__id);return c(this,A,K,U)}else throw n&&d("Unknown result type",A,this.__id),new Error("Invalid result from pull")}#V(A,K){n&&d("#internalRead()",this.__id),g[0]=!1;var U=B(K,A,g);if(Oq(U))return this.#K=!0,U.then((T)=>{this.#K=!1,n&&d("pending no longerrrrrrrr (result returned from pull)",this.__id),this.#H=this.#Y(T,A,g[0])},(T)=>{n&&d("error from pull",T,this.__id),errorOrDestroy(this,T)});else this.#H=this.#Y(U,A,g[0])}_destroy(A,K){var U=this.#q;if(U===0){K(A);return}if(i.unregister(this.#B),this.#q=0,R)R(U,!1);n&&d("NativeReadable destroyed",this.__id),y(U,A),K(A)}ref(){var A=this.#q;if(A===0)return;if(this.#Q++===0)R(A,!0)}unref(){var A=this.#q;if(A===0)return;if(this.#Q--===1)R(A,!1)}};if(!R)p.prototype.ref=void 0,p.prototype.unref=void 0;return p},iq=function(t,M){return VQ[t]||=zQ(t,M)},UQ=function(t,M,B){if(!(M&&typeof M==="object"&&M instanceof ReadableStream))return;const F=aq(M);if(!F){d("no native readable stream");return}const{stream:y,data:I}=F;return new(iq(I,t))(y,B)},{isPromise:Oq,isCallable:sq,direct:aq,Object:Uq}=globalThis[Symbol.for("Bun.lazy")]("primordials");globalThis.__IDS_TO_TRACK=process.env.DEBUG_TRACK_EE?.length?process.env.DEBUG_TRACK_EE.split(","):process.env.DEBUG_STREAMS?.length?process.env.DEBUG_STREAMS.split(","):null;var tq=!!process.env.DEBUG_TRACK_EE,n=!!(process.env.DEBUG||process.env.DEBUG_STREAMS||tq),d=n?globalThis.__IDS_TO_TRACK?(...t)=>{const M=t[t.length-1];if(!globalThis.__IDS_TO_TRACK.includes(M))return;console.log(`ID: ${M}`,...t.slice(0,-1))}:(...t)=>console.log(...t.slice(0,-1)):()=>{},FQ=Uq.create,LQ=Uq.defineProperty,jQ=Uq.getOwnPropertyDescriptor,eq=Uq.getOwnPropertyNames,NQ=Uq.getPrototypeOf,AQ=Uq.prototype.hasOwnProperty,EQ=Uq.setPrototypeOf,$q=(t,M)=>function B(){return M||(0,t[eq(t)[0]])((M={exports:{}}).exports,M),M.exports};var Hq=process.nextTick;var IQ=Array.isArray,Wq=$q({"node_modules/readable-stream/lib/ours/primordials.js"(t,M){M.exports={ArrayIsArray(B){return Array.isArray(B)},ArrayPrototypeIncludes(B,F){return B.includes(F)},ArrayPrototypeIndexOf(B,F){return B.indexOf(F)},ArrayPrototypeJoin(B,F){return B.join(F)},ArrayPrototypeMap(B,F){return B.map(F)},ArrayPrototypePop(B,F){return B.pop(F)},ArrayPrototypePush(B,F){return B.push(F)},ArrayPrototypeSlice(B,F,y){return B.slice(F,y)},Error,FunctionPrototypeCall(B,F,...y){return B.call(F,...y)},FunctionPrototypeSymbolHasInstance(B,F){return Function.prototype[Symbol.hasInstance].call(B,F)},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(B,F){return Uq.defineProperties(B,F)},ObjectDefineProperty(B,F,y){return Uq.defineProperty(B,F,y)},ObjectGetOwnPropertyDescriptor(B,F){return Uq.getOwnPropertyDescriptor(B,F)},ObjectKeys(B){return Uq.keys(B)},ObjectSetPrototypeOf(B,F){return Uq.setPrototypeOf(B,F)},Promise,PromisePrototypeCatch(B,F){return B.catch(F)},PromisePrototypeThen(B,F,y){return B.then(F,y)},PromiseReject(B){return Promise.reject(B)},ReflectApply:Reflect.apply,RegExpPrototypeTest(B,F){return B.test(F)},SafeSet:Set,String,StringPrototypeSlice(B,F,y){return B.slice(F,y)},StringPrototypeToLowerCase(B){return B.toLowerCase()},StringPrototypeToUpperCase(B){return B.toUpperCase()},StringPrototypeTrim(B){return B.trim()},Symbol,SymbolAsyncIterator:Symbol.asyncIterator,SymbolHasInstance:Symbol.hasInstance,SymbolIterator:Symbol.iterator,TypedArrayPrototypeSet(B,F,y){return B.set(F,y)},Uint8Array}}}),Eq=$q({"node_modules/readable-stream/lib/ours/util.js"(t,M){var B=Uq.getPrototypeOf(async function(){}).constructor,F=typeof Blob!=="undefined"?function I(j){return j instanceof Blob}:function I(j){return!1},y=class extends Error{constructor(I){if(!Array.isArray(I))throw new TypeError(`Expected input to be an Array, got ${typeof I}`);let j="";for(let R=0;R<I.length;R++)j+=` ${I[R].stack}
-`;super(j);this.name="AggregateError",this.errors=I}};M.exports={AggregateError:y,once(I){let j=!1;return function(...R){if(j)return;j=!0,I.apply(this,R)}},createDeferredPromise:function(){let I,j;return{promise:new Promise((x,g)=>{I=x,j=g}),resolve:I,reject:j}},promisify(I){return new Promise((j,R)=>{I((x,...g)=>{if(x)return R(x);return j(...g)})})},debuglog(){return function(){}},format(I,...j){return I.replace(/%([sdifj])/g,function(...[R,x]){const g=j.shift();if(x==="f")return g.toFixed(6);else if(x==="j")return JSON.stringify(g);else if(x==="s"&&typeof g==="object")return`${g.constructor!==Uq?g.constructor.name:""} {}`.trim();else return g.toString()})},inspect(I){switch(typeof I){case"string":if(I.includes("'")){if(!I.includes('"'))return`"${I}"`;else if(!I.includes("`")&&!I.includes("${"))return`\`${I}\``}return`'${I}'`;case"number":if(isNaN(I))return"NaN";else if(Uq.is(I,-0))return String(I);return I;case"bigint":return`${String(I)}n`;case"boolean":case"undefined":return String(I);case"object":return"{}"}},types:{isAsyncFunction(I){return I instanceof B},isArrayBufferView(I){return ArrayBuffer.isView(I)}},isBlob:F},M.exports.promisify.custom=Symbol.for("nodejs.util.promisify.custom")}}),Mq=$q({"node_modules/readable-stream/lib/ours/errors.js"(t,M){var{format:B,inspect:F,AggregateError:y}=Eq(),I=globalThis.AggregateError||y,j=Symbol("kIsNodeError"),R=["string","function","number","object","Function","Object","boolean","bigint","symbol"],x=/^([A-Z][a-z0-9]*)+$/,g="__node_internal_",f={};function c(K,U){if(!K)throw new f.ERR_INTERNAL_ASSERTION(U)}function _(K){let U="",T=K.length;const C=K[0]==="-"?1:0;for(;T>=C+4;T-=3)U=`_${K.slice(T-3,T)}${U}`;return`${K.slice(0,T)}${U}`}function i(K,U,T){if(typeof U==="function")return c(U.length<=T.length,`Code: ${K}; The provided arguments length (${T.length}) does not match the required ones (${U.length}).`),U(...T);const C=(U.match(/%[dfijoOs]/g)||[]).length;if(c(C===T.length,`Code: ${K}; The provided arguments length (${T.length}) does not match the required ones (${C}).`),T.length===0)return U;return B(U,...T)}function D(K,U,T){if(!T)T=Error;class C extends T{constructor(...qq){super(i(K,U,qq))}toString(){return`${this.name} [${K}]: ${this.message}`}}Uq.defineProperties(C.prototype,{name:{value:T.name,writable:!0,enumerable:!1,configurable:!0},toString:{value(){return`${this.name} [${K}]: ${this.message}`},writable:!0,enumerable:!1,configurable:!0}}),C.prototype.code=K,C.prototype[j]=!0,f[K]=C}function p(K){const U=g+K.name;return Uq.defineProperty(K,"name",{value:U}),K}function P(K,U){if(K&&U&&K!==U){if(Array.isArray(U.errors))return U.errors.push(K),U;const T=new I([U,K],U.message);return T.code=U.code,T}return K||U}var A=class extends Error{constructor(K="The operation was aborted",U=void 0){if(U!==void 0&&typeof U!=="object")throw new f.ERR_INVALID_ARG_TYPE("options","Object",U);super(K,U);this.code="ABORT_ERR",this.name="AbortError"}};D("ERR_ASSERTION","%s",Error),D("ERR_INVALID_ARG_TYPE",(K,U,T)=>{if(c(typeof K==="string","'name' must be a string"),!Array.isArray(U))U=[U];let C="The ";if(K.endsWith(" argument"))C+=`${K} `;else C+=`"${K}" ${K.includes(".")?"property":"argument"} `;C+="must be ";const qq=[],o=[],$=[];for(let Y of U)if(c(typeof Y==="string","All expected entries have to be of type string"),R.includes(Y))qq.push(Y.toLowerCase());else if(x.test(Y))o.push(Y);else c(Y!=="object",'The value "object" should be written as "Object"'),$.push(Y);if(o.length>0){const Y=qq.indexOf("object");if(Y!==-1)qq.splice(qq,Y,1),o.push("Object")}if(qq.length>0){switch(qq.length){case 1:C+=`of type ${qq[0]}`;break;case 2:C+=`one of type ${qq[0]} or ${qq[1]}`;break;default:{const Y=qq.pop();C+=`one of type ${qq.join(", ")}, or ${Y}`}}if(o.length>0||$.length>0)C+=" or "}if(o.length>0){switch(o.length){case 1:C+=`an instance of ${o[0]}`;break;case 2:C+=`an instance of ${o[0]} or ${o[1]}`;break;default:{const Y=o.pop();C+=`an instance of ${o.join(", ")}, or ${Y}`}}if($.length>0)C+=" or "}switch($.length){case 0:break;case 1:if($[0].toLowerCase()!==$[0])C+="an ";C+=`${$[0]}`;break;case 2:C+=`one of ${$[0]} or ${$[1]}`;break;default:{const Y=$.pop();C+=`one of ${$.join(", ")}, or ${Y}`}}if(T==null)C+=`. Received ${T}`;else if(typeof T==="function"&&T.name)C+=`. Received function ${T.name}`;else if(typeof T==="object"){var s;if((s=T.constructor)!==null&&s!==void 0&&s.name)C+=`. Received an instance of ${T.constructor.name}`;else{const Y=F(T,{depth:-1});C+=`. Received ${Y}`}}else{let Y=F(T,{colors:!1});if(Y.length>25)Y=`${Y.slice(0,25)}...`;C+=`. Received type ${typeof T} (${Y})`}return C},TypeError),D("ERR_INVALID_ARG_VALUE",(K,U,T="is invalid")=>{let C=F(U);if(C.length>128)C=C.slice(0,128)+"...";return`The ${K.includes(".")?"property":"argument"} '${K}' ${T}. Received ${C}`},TypeError),D("ERR_INVALID_RETURN_VALUE",(K,U,T)=>{var C;const qq=T!==null&&T!==void 0&&(C=T.constructor)!==null&&C!==void 0&&C.name?`instance of ${T.constructor.name}`:`type ${typeof T}`;return`Expected ${K} to be returned from the "${U}" function but got ${qq}.`},TypeError),D("ERR_MISSING_ARGS",(...K)=>{c(K.length>0,"At least one arg needs to be specified");let U;const T=K.length;switch(K=(Array.isArray(K)?K:[K]).map((C)=>`"${C}"`).join(" or "),T){case 1:U+=`The ${K[0]} argument`;break;case 2:U+=`The ${K[0]} and ${K[1]} arguments`;break;default:{const C=K.pop();U+=`The ${K.join(", ")}, and ${C} arguments`}break}return`${U} must be specified`},TypeError),D("ERR_OUT_OF_RANGE",(K,U,T)=>{c(U,'Missing "range" argument');let C;if(Number.isInteger(T)&&Math.abs(T)>4294967296)C=_(String(T));else if(typeof T==="bigint"){if(C=String(T),T>2n**32n||T<-(2n**32n))C=_(C);C+="n"}else C=F(T);return`The value of "${K}" is out of range. It must be ${U}. Received ${C}`},RangeError),D("ERR_MULTIPLE_CALLBACK","Callback called multiple times",Error),D("ERR_METHOD_NOT_IMPLEMENTED","The %s method is not implemented",Error),D("ERR_STREAM_ALREADY_FINISHED","Cannot call %s after a stream was finished",Error),D("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable",Error),D("ERR_STREAM_DESTROYED","Cannot call %s after a stream was destroyed",Error),D("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),D("ERR_STREAM_PREMATURE_CLOSE","Premature close",Error),D("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF",Error),D("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event",Error),D("ERR_STREAM_WRITE_AFTER_END","write after end",Error),D("ERR_UNKNOWN_ENCODING","Unknown encoding: %s",TypeError),M.exports={AbortError:A,aggregateTwoErrors:p(P),hideStackFrames:p,codes:f}}}),Cq=$q({"node_modules/readable-stream/lib/internal/validators.js"(t,M){var{ArrayIsArray:B,ArrayPrototypeIncludes:F,ArrayPrototypeJoin:y,ArrayPrototypeMap:I,NumberIsInteger:j,NumberMAX_SAFE_INTEGER:R,NumberMIN_SAFE_INTEGER:x,NumberParseInt:g,RegExpPrototypeTest:f,String:c,StringPrototypeToUpperCase:_,StringPrototypeTrim:i}=Wq(),{hideStackFrames:D,codes:{ERR_SOCKET_BAD_PORT:p,ERR_INVALID_ARG_TYPE:P,ERR_INVALID_ARG_VALUE:A,ERR_OUT_OF_RANGE:K,ERR_UNKNOWN_SIGNAL:U}}=Mq(),{normalizeEncoding:T}=Eq(),{isAsyncFunction:C,isArrayBufferView:qq}=Eq().types,o={};function $(V){return V===(V|0)}function s(V){return V===V>>>0}var Y=/^[0-7]+$/,Z="must be a 32-bit unsigned integer or an octal string";function N(V,h,X){if(typeof V==="undefined")V=X;if(typeof V==="string"){if(!f(Y,V))throw new A(h,V,Z);V=g(V,8)}return u(V,h,0,4294967295),V}var m=D((V,h,X=x,H=R)=>{if(typeof V!=="number")throw new P(h,"number",V);if(!j(V))throw new K(h,"an integer",V);if(V<X||V>H)throw new K(h,`>= ${X} && <= ${H}`,V)}),u=D((V,h,X=-2147483648,H=2147483647)=>{if(typeof V!=="number")throw new P(h,"number",V);if(!$(V)){if(!j(V))throw new K(h,"an integer",V);throw new K(h,`>= ${X} && <= ${H}`,V)}if(V<X||V>H)throw new K(h,`>= ${X} && <= ${H}`,V)}),J=D((V,h,X)=>{if(typeof V!=="number")throw new P(h,"number",V);if(!s(V)){if(!j(V))throw new K(h,"an integer",V);throw new K(h,`>= ${X?1:0} && < 4294967296`,V)}if(X&&V===0)throw new K(h,">= 1 && < 4294967296",V)});function z(V,h){if(typeof V!=="string")throw new P(h,"string",V)}function w(V,h){if(typeof V!=="number")throw new P(h,"number",V)}var S=D((V,h,X)=>{if(!F(X,V)){const L="must be one of: "+y(I(X,(l)=>typeof l==="string"?`'${l}'`:c(l)),", ");throw new A(h,V,L)}});function E(V,h){if(typeof V!=="boolean")throw new P(h,"boolean",V)}var W=D((V,h,X)=>{const H=X==null,L=H?!1:X.allowArray,l=H?!1:X.allowFunction;if(!(H?!1:X.nullable)&&V===null||!L&&B(V)||typeof V!=="object"&&(!l||typeof V!=="function"))throw new P(h,"Object",V)}),b=D((V,h,X=0)=>{if(!B(V))throw new P(h,"Array",V);if(V.length<X){const H=`must be longer than ${X}`;throw new A(h,V,H)}});function a(V,h="signal"){if(z(V,h),o[V]===void 0){if(o[_(V)]!==void 0)throw new U(V+" (signals must use all capital letters)");throw new U(V)}}var r=D((V,h="buffer")=>{if(!qq(V))throw new P(h,["Buffer","TypedArray","DataView"],V)});function Qq(V,h){const X=T(h),H=V.length;if(X==="hex"&&H%2!==0)throw new A("encoding",h,`is invalid for data of length ${H}`)}function Zq(V,h="Port",X=!0){if(typeof V!=="number"&&typeof V!=="string"||typeof V==="string"&&i(V).length===0||+V!==+V>>>0||V>65535||V===0&&!X)throw new p(h,V,X);return V|0}var Vq=D((V,h)=>{if(V!==void 0&&(V===null||typeof V!=="object"||!("aborted"in V)))throw new P(h,"AbortSignal",V)}),Xq=D((V,h)=>{if(typeof V!=="function")throw new P(h,"Function",V)}),Bq=D((V,h)=>{if(typeof V!=="function"||C(V))throw new P(h,"Function",V)}),Jq=D((V,h)=>{if(V!==void 0)throw new P(h,"undefined",V)});M.exports={isInt32:$,isUint32:s,parseFileMode:N,validateArray:b,validateBoolean:E,validateBuffer:r,validateEncoding:Qq,validateFunction:Xq,validateInt32:u,validateInteger:m,validateNumber:w,validateObject:W,validateOneOf:S,validatePlainFunction:Bq,validatePort:Zq,validateSignalName:a,validateString:z,validateUint32:J,validateUndefined:Jq,validateAbortSignal:Vq}}}),Iq=$q({"node_modules/readable-stream/lib/internal/streams/utils.js"(t,M){var{Symbol:B,SymbolAsyncIterator:F,SymbolIterator:y}=Wq(),I=B("kDestroyed"),j=B("kIsErrored"),R=B("kIsReadable"),x=B("kIsDisturbed");function g(J,z=!1){var w;return!!(J&&typeof J.pipe==="function"&&typeof J.on==="function"&&(!z||typeof J.pause==="function"&&typeof J.resume==="function")&&(!J._writableState||((w=J._readableState)===null||w===void 0?void 0:w.readable)!==!1)&&(!J._writableState||J._readableState))}function f(J){var z;return!!(J&&typeof J.write==="function"&&typeof J.on==="function"&&(!J._readableState||((z=J._writableState)===null||z===void 0?void 0:z.writable)!==!1))}function c(J){return!!(J&&typeof J.pipe==="function"&&J._readableState&&typeof J.on==="function"&&typeof J.write==="function")}function _(J){return J&&(J._readableState||J._writableState||typeof J.write==="function"&&typeof J.on==="function"||typeof J.pipe==="function"&&typeof J.on==="function")}function i(J,z){if(J==null)return!1;if(z===!0)return typeof J[F]==="function";if(z===!1)return typeof J[y]==="function";return typeof J[F]==="function"||typeof J[y]==="function"}function D(J){if(!_(J))return null;const{_writableState:z,_readableState:w}=J,S=z||w;return!!(J.destroyed||J[I]||S!==null&&S!==void 0&&S.destroyed)}function p(J){if(!f(J))return null;if(J.writableEnded===!0)return!0;const z=J._writableState;if(z!==null&&z!==void 0&&z.errored)return!1;if(typeof(z===null||z===void 0?void 0:z.ended)!=="boolean")return null;return z.ended}function P(J,z){if(!f(J))return null;if(J.writableFinished===!0)return!0;const w=J._writableState;if(w!==null&&w!==void 0&&w.errored)return!1;if(typeof(w===null||w===void 0?void 0:w.finished)!=="boolean")return null;return!!(w.finished||z===!1&&w.ended===!0&&w.length===0)}function A(J){if(!g(J))return null;if(J.readableEnded===!0)return!0;const z=J._readableState;if(!z||z.errored)return!1;if(typeof(z===null||z===void 0?void 0:z.ended)!=="boolean")return null;return z.ended}function K(J,z){if(!g(J))return null;const w=J._readableState;if(w!==null&&w!==void 0&&w.errored)return!1;if(typeof(w===null||w===void 0?void 0:w.endEmitted)!=="boolean")return null;return!!(w.endEmitted||z===!1&&w.ended===!0&&w.length===0)}function U(J){if(J&&J[R]!=null)return J[R];if(typeof(J===null||J===void 0?void 0:J.readable)!=="boolean")return null;if(D(J))return!1;return g(J)&&J.readable&&!K(J)}function T(J){if(typeof(J===null||J===void 0?void 0:J.writable)!=="boolean")return null;if(D(J))return!1;return f(J)&&J.writable&&!p(J)}function C(J,z){if(!_(J))return null;if(D(J))return!0;if((z===null||z===void 0?void 0:z.readable)!==!1&&U(J))return!1;if((z===null||z===void 0?void 0:z.writable)!==!1&&T(J))return!1;return!0}function qq(J){var z,w;if(!_(J))return null;if(J.writableErrored)return J.writableErrored;return(z=(w=J._writableState)===null||w===void 0?void 0:w.errored)!==null&&z!==void 0?z:null}function o(J){var z,w;if(!_(J))return null;if(J.readableErrored)return J.readableErrored;return(z=(w=J._readableState)===null||w===void 0?void 0:w.errored)!==null&&z!==void 0?z:null}function $(J){if(!_(J))return null;if(typeof J.closed==="boolean")return J.closed;const{_writableState:z,_readableState:w}=J;if(typeof(z===null||z===void 0?void 0:z.closed)==="boolean"||typeof(w===null||w===void 0?void 0:w.closed)==="boolean")return(z===null||z===void 0?void 0:z.closed)||(w===null||w===void 0?void 0:w.closed);if(typeof J._closed==="boolean"&&s(J))return J._closed;return null}function s(J){return typeof J._closed==="boolean"&&typeof J._defaultKeepAlive==="boolean"&&typeof J._removedConnection==="boolean"&&typeof J._removedContLen==="boolean"}function Y(J){return typeof J._sent100==="boolean"&&s(J)}function Z(J){var z;return typeof J._consuming==="boolean"&&typeof J._dumped==="boolean"&&((z=J.req)===null||z===void 0?void 0:z.upgradeOrConnect)===void 0}function N(J){if(!_(J))return null;const{_writableState:z,_readableState:w}=J,S=z||w;return!S&&Y(J)||!!(S&&S.autoDestroy&&S.emitClose&&S.closed===!1)}function m(J){var z;return!!(J&&((z=J[x])!==null&&z!==void 0?z:J.readableDidRead||J.readableAborted))}function u(J){var z,w,S,E,W,b,a,r,Qq,Zq;return!!(J&&((z=(w=(S=(E=(W=(b=J[j])!==null&&b!==void 0?b:J.readableErrored)!==null&&W!==void 0?W:J.writableErrored)!==null&&E!==void 0?E:(a=J._readableState)===null||a===void 0?void 0:a.errorEmitted)!==null&&S!==void 0?S:(r=J._writableState)===null||r===void 0?void 0:r.errorEmitted)!==null&&w!==void 0?w:(Qq=J._readableState)===null||Qq===void 0?void 0:Qq.errored)!==null&&z!==void 0?z:(Zq=J._writableState)===null||Zq===void 0?void 0:Zq.errored))}M.exports={kDestroyed:I,isDisturbed:m,kIsDisturbed:x,isErrored:u,kIsErrored:j,isReadable:U,kIsReadable:R,isClosed:$,isDestroyed:D,isDuplexNodeStream:c,isFinished:C,isIterable:i,isReadableNodeStream:g,isReadableEnded:A,isReadableFinished:K,isReadableErrored:o,isNodeStream:_,isWritable:T,isWritableNodeStream:f,isWritableEnded:p,isWritableFinished:P,isWritableErrored:qq,isServerRequest:Z,isServerResponse:Y,willEmitClose:N}}}),jq=$q({"node_modules/readable-stream/lib/internal/streams/end-of-stream.js"(t,M){var{AbortError:B,codes:F}=Mq(),{ERR_INVALID_ARG_TYPE:y,ERR_STREAM_PREMATURE_CLOSE:I}=F,{once:j}=Eq(),{validateAbortSignal:R,validateFunction:x,validateObject:g}=Cq(),{Promise:f}=Wq(),{isClosed:c,isReadable:_,isReadableNodeStream:i,isReadableFinished:D,isReadableErrored:p,isWritable:P,isWritableNodeStream:A,isWritableFinished:K,isWritableErrored:U,isNodeStream:T,willEmitClose:C}=Iq();function qq(Y){return Y.setHeader&&typeof Y.abort==="function"}var o=()=>{};function $(Y,Z,N){var m,u;if(arguments.length===2)N=Z,Z={};else if(Z==null)Z={};else g(Z,"options");x(N,"callback"),R(Z.signal,"options.signal"),N=j(N);const J=(m=Z.readable)!==null&&m!==void 0?m:i(Y),z=(u=Z.writable)!==null&&u!==void 0?u:A(Y);if(!T(Y))throw new y("stream","Stream",Y);const{_writableState:w,_readableState:S}=Y,E=()=>{if(!Y.writable)a()};let W=C(Y)&&i(Y)===J&&A(Y)===z,b=K(Y,!1);const a=()=>{if(b=!0,Y.destroyed)W=!1;if(W&&(!Y.readable||J))return;if(!J||r)N.call(Y)};let r=D(Y,!1);const Qq=()=>{if(r=!0,Y.destroyed)W=!1;if(W&&(!Y.writable||z))return;if(!z||b)N.call(Y)},Zq=(V)=>{N.call(Y,V)};let Vq=c(Y);const Xq=()=>{Vq=!0;const V=U(Y)||p(Y);if(V&&typeof V!=="boolean")return N.call(Y,V);if(J&&!r&&i(Y,!0)){if(!D(Y,!1))return N.call(Y,new I)}if(z&&!b){if(!K(Y,!1))return N.call(Y,new I)}N.call(Y)},Bq=()=>{Y.req.on("finish",a)};if(qq(Y)){if(Y.on("complete",a),!W)Y.on("abort",Xq);if(Y.req)Bq();else Y.on("request",Bq)}else if(z&&!w)Y.on("end",E),Y.on("close",E);if(!W&&typeof Y.aborted==="boolean")Y.on("aborted",Xq);if(Y.on("end",Qq),Y.on("finish",a),Z.error!==!1)Y.on("error",Zq);if(Y.on("close",Xq),Vq)Hq(Xq);else if(w!==null&&w!==void 0&&w.errorEmitted||S!==null&&S!==void 0&&S.errorEmitted){if(!W)Hq(Xq)}else if(!J&&(!W||_(Y))&&(b||P(Y)===!1))Hq(Xq);else if(!z&&(!W||P(Y))&&(r||_(Y)===!1))Hq(Xq);else if(S&&Y.req&&Y.aborted)Hq(Xq);const Jq=()=>{if(N=o,Y.removeListener("aborted",Xq),Y.removeListener("complete",a),Y.removeListener("abort",Xq),Y.removeListener("request",Bq),Y.req)Y.req.removeListener("finish",a);Y.removeListener("end",E),Y.removeListener("close",E),Y.removeListener("finish",a),Y.removeListener("end",Qq),Y.removeListener("error",Zq),Y.removeListener("close",Xq)};if(Z.signal&&!Vq){const V=()=>{const h=N;Jq(),h.call(Y,new B(void 0,{cause:Z.signal.reason}))};if(Z.signal.aborted)Hq(V);else{const h=N;N=j((...X)=>{Z.signal.removeEventListener("abort",V),h.apply(Y,X)}),Z.signal.addEventListener("abort",V)}}return Jq}function s(Y,Z){return new f((N,m)=>{$(Y,Z,(u)=>{if(u)m(u);else N()})})}M.exports=$,M.exports.finished=s}}),HQ=$q({"node_modules/readable-stream/lib/internal/streams/operators.js"(t,M){var{codes:{ERR_INVALID_ARG_TYPE:B,ERR_MISSING_ARGS:F,ERR_OUT_OF_RANGE:y},AbortError:I}=Mq(),{validateAbortSignal:j,validateInteger:R,validateObject:x}=Cq(),g=Wq().Symbol("kWeak"),{finished:f}=jq(),{ArrayPrototypePush:c,MathFloor:_,Number:i,NumberIsNaN:D,Promise:p,PromiseReject:P,PromisePrototypeCatch:A,Symbol:K}=Wq(),U=K("kEmpty"),T=K("kEof");function C(E,W){if(typeof E!=="function")throw new B("fn",["Function","AsyncFunction"],E);if(W!=null)x(W,"options");if((W===null||W===void 0?void 0:W.signal)!=null)j(W.signal,"options.signal");let b=1;if((W===null||W===void 0?void 0:W.concurrency)!=null)b=_(W.concurrency);return R(b,"concurrency",1),async function*a(){var r,Qq;const Zq=new AbortController,Vq=this,Xq=[],Bq=Zq.signal,Jq={signal:Bq},V=()=>Zq.abort();if(W!==null&&W!==void 0&&(r=W.signal)!==null&&r!==void 0&&r.aborted)V();W===null||W===void 0||(Qq=W.signal)===null||Qq===void 0||Qq.addEventListener("abort",V);let h,X,H=!1;function L(){H=!0}async function l(){try{for await(let q of Vq){var k;if(H)return;if(Bq.aborted)throw new I;try{q=E(q,Jq)}catch(Q){q=P(Q)}if(q===U)continue;if(typeof((k=q)===null||k===void 0?void 0:k.catch)==="function")q.catch(L);if(Xq.push(q),h)h(),h=null;if(!H&&Xq.length&&Xq.length>=b)await new p((Q)=>{X=Q})}Xq.push(T)}catch(q){const Q=P(q);A(Q,L),Xq.push(Q)}finally{var e;if(H=!0,h)h(),h=null;W===null||W===void 0||(e=W.signal)===null||e===void 0||e.removeEventListener("abort",V)}}l();try{while(!0){while(Xq.length>0){const k=await Xq[0];if(k===T)return;if(Bq.aborted)throw new I;if(k!==U)yield k;if(Xq.shift(),X)X(),X=null}await new p((k)=>{h=k})}}finally{if(Zq.abort(),H=!0,X)X(),X=null}}.call(this)}function qq(E=void 0){if(E!=null)x(E,"options");if((E===null||E===void 0?void 0:E.signal)!=null)j(E.signal,"options.signal");return async function*W(){let b=0;for await(let r of this){var a;if(E!==null&&E!==void 0&&(a=E.signal)!==null&&a!==void 0&&a.aborted)throw new I({cause:E.signal.reason});yield[b++,r]}}.call(this)}async function o(E,W=void 0){for await(let b of Z.call(this,E,W))return!0;return!1}async function $(E,W=void 0){if(typeof E!=="function")throw new B("fn",["Function","AsyncFunction"],E);return!await o.call(this,async(...b)=>{return!await E(...b)},W)}async function s(E,W){for await(let b of Z.call(this,E,W))return b;return}async function Y(E,W){if(typeof E!=="function")throw new B("fn",["Function","AsyncFunction"],E);async function b(a,r){return await E(a,r),U}for await(let a of C.call(this,b,W));}function Z(E,W){if(typeof E!=="function")throw new B("fn",["Function","AsyncFunction"],E);async function b(a,r){if(await E(a,r))return a;return U}return C.call(this,b,W)}var N=class extends F{constructor(){super("reduce");this.message="Reduce of an empty stream requires an initial value"}};async function m(E,W,b){var a;if(typeof E!=="function")throw new B("reducer",["Function","AsyncFunction"],E);if(b!=null)x(b,"options");if((b===null||b===void 0?void 0:b.signal)!=null)j(b.signal,"options.signal");let r=arguments.length>1;if(b!==null&&b!==void 0&&(a=b.signal)!==null&&a!==void 0&&a.aborted){const Bq=new I(void 0,{cause:b.signal.reason});throw this.once("error",()=>{}),await f(this.destroy(Bq)),Bq}const Qq=new AbortController,Zq=Qq.signal;if(b!==null&&b!==void 0&&b.signal){const Bq={once:!0,[g]:this};b.signal.addEventListener("abort",()=>Qq.abort(),Bq)}let Vq=!1;try{for await(let Bq of this){var Xq;if(Vq=!0,b!==null&&b!==void 0&&(Xq=b.signal)!==null&&Xq!==void 0&&Xq.aborted)throw new I;if(!r)W=Bq,r=!0;else W=await E(W,Bq,{signal:Zq})}if(!Vq&&!r)throw new N}finally{Qq.abort()}return W}async function u(E){if(E!=null)x(E,"options");if((E===null||E===void 0?void 0:E.signal)!=null)j(E.signal,"options.signal");const W=[];for await(let a of this){var b;if(E!==null&&E!==void 0&&(b=E.signal)!==null&&b!==void 0&&b.aborted)throw new I(void 0,{cause:E.signal.reason});c(W,a)}return W}function J(E,W){const b=C.call(this,E,W);return async function*a(){for await(let r of b)yield*r}.call(this)}function z(E){if(E=i(E),D(E))return 0;if(E<0)throw new y("number",">= 0",E);return E}function w(E,W=void 0){if(W!=null)x(W,"options");if((W===null||W===void 0?void 0:W.signal)!=null)j(W.signal,"options.signal");return E=z(E),async function*b(){var a;if(W!==null&&W!==void 0&&(a=W.signal)!==null&&a!==void 0&&a.aborted)throw new I;for await(let Qq of this){var r;if(W!==null&&W!==void 0&&(r=W.signal)!==null&&r!==void 0&&r.aborted)throw new I;if(E--<=0)yield Qq}}.call(this)}function S(E,W=void 0){if(W!=null)x(W,"options");if((W===null||W===void 0?void 0:W.signal)!=null)j(W.signal,"options.signal");return E=z(E),async function*b(){var a;if(W!==null&&W!==void 0&&(a=W.signal)!==null&&a!==void 0&&a.aborted)throw new I;for await(let Qq of this){var r;if(W!==null&&W!==void 0&&(r=W.signal)!==null&&r!==void 0&&r.aborted)throw new I;if(E-- >0)yield Qq;else return}}.call(this)}M.exports.streamReturningOperators={asIndexedPairs:qq,drop:w,filter:Z,flatMap:J,map:C,take:S},M.exports.promiseReturningOperators={every:$,forEach:Y,reduce:m,toArray:u,some:o,find:s}}}),Pq=$q({"node_modules/readable-stream/lib/internal/streams/destroy.js"(t,M){var{aggregateTwoErrors:B,codes:{ERR_MULTIPLE_CALLBACK:F},AbortError:y}=Mq(),{Symbol:I}=Wq(),{kDestroyed:j,isDestroyed:R,isFinished:x,isServerRequest:g}=Iq(),f="#kDestroy",c="#kConstruct";function _(Z,N,m){if(Z){if(Z.stack,N&&!N.errored)N.errored=Z;if(m&&!m.errored)m.errored=Z}}function i(Z,N){const m=this._readableState,u=this._writableState,J=u||m;if(u&&u.destroyed||m&&m.destroyed){if(typeof N==="function")N();return this}if(_(Z,u,m),u)u.destroyed=!0;if(m)m.destroyed=!0;if(!J.constructed)this.once(f,(z)=>{D(this,B(z,Z),N)});else D(this,Z,N);return this}function D(Z,N,m){let u=!1;function J(z){if(u)return;u=!0;const{_readableState:w,_writableState:S}=Z;if(_(z,S,w),S)S.closed=!0;if(w)w.closed=!0;if(typeof m==="function")m(z);if(z)Hq(p,Z,z);else Hq(P,Z)}try{Z._destroy(N||null,J)}catch(z){J(z)}}function p(Z,N){A(Z,N),P(Z)}function P(Z){const{_readableState:N,_writableState:m}=Z;if(m)m.closeEmitted=!0;if(N)N.closeEmitted=!0;if(m&&m.emitClose||N&&N.emitClose)Z.emit("close")}function A(Z,N){const m=Z?._readableState,u=Z?._writableState;if(u?.errorEmitted||m?.errorEmitted)return;if(u)u.errorEmitted=!0;if(m)m.errorEmitted=!0;Z?.emit?.("error",N)}function K(){const Z=this._readableState,N=this._writableState;if(Z)Z.constructed=!0,Z.closed=!1,Z.closeEmitted=!1,Z.destroyed=!1,Z.errored=null,Z.errorEmitted=!1,Z.reading=!1,Z.ended=Z.readable===!1,Z.endEmitted=Z.readable===!1;if(N)N.constructed=!0,N.destroyed=!1,N.closed=!1,N.closeEmitted=!1,N.errored=null,N.errorEmitted=!1,N.finalCalled=!1,N.prefinished=!1,N.ended=N.writable===!1,N.ending=N.writable===!1,N.finished=N.writable===!1}function U(Z,N,m){const u=Z?._readableState,J=Z?._writableState;if(J&&J.destroyed||u&&u.destroyed)return this;if(u&&u.autoDestroy||J&&J.autoDestroy)Z.destroy(N);else if(N){if(Error.captureStackTrace(N),J&&!J.errored)J.errored=N;if(u&&!u.errored)u.errored=N;if(m)Hq(A,Z,N);else A(Z,N)}}function T(Z,N){if(typeof Z._construct!=="function")return;const{_readableState:m,_writableState:u}=Z;if(m)m.constructed=!1;if(u)u.constructed=!1;if(Z.once(c,N),Z.listenerCount(c)>1)return;Hq(C,Z)}function C(Z){let N=!1;function m(u){if(N){U(Z,u!==null&&u!==void 0?u:new F);return}N=!0;const{_readableState:J,_writableState:z}=Z,w=z||J;if(J)J.constructed=!0;if(z)z.constructed=!0;if(w.destroyed)Z.emit(f,u);else if(u)U(Z,u,!0);else Hq(qq,Z)}try{Z._construct(m)}catch(u){m(u)}}function qq(Z){Z.emit(c)}function o(Z){return Z&&Z.setHeader&&typeof Z.abort==="function"}function $(Z){Z.emit("close")}function s(Z,N){Z.emit("error",N),Hq($,Z)}function Y(Z,N){if(!Z||R(Z))return;if(!N&&!x(Z))N=new y;if(g(Z))Z.socket=null,Z.destroy(N);else if(o(Z))Z.abort();else if(o(Z.req))Z.req.abort();else if(typeof Z.destroy==="function")Z.destroy(N);else if(typeof Z.close==="function")Z.close();else if(N)Hq(s,Z);else Hq($,Z);if(!Z.destroyed)Z[j]=!0}M.exports={construct:T,destroyer:Y,destroy:i,undestroy:K,errorOrDestroy:U}}}),Sq=$q({"node_modules/readable-stream/lib/internal/streams/legacy.js"(t,M){var{ArrayIsArray:B,ObjectSetPrototypeOf:F}=Wq();function y(j){if(!(this instanceof y))return new y(j);Tq.call(this,j)}F(y.prototype,Tq.prototype),F(y,Tq),y.prototype.pipe=function(j,R){const x=this;function g(P){if(j.writable&&j.write(P)===!1&&x.pause)x.pause()}x.on("data",g);function f(){if(x.readable&&x.resume)x.resume()}if(j.on("drain",f),!j._isStdio&&(!R||R.end!==!1))x.on("end",_),x.on("close",i);let c=!1;function _(){if(c)return;c=!0,j.end()}function i(){if(c)return;if(c=!0,typeof j.destroy==="function")j.destroy()}function D(P){if(p(),Tq.listenerCount(this,"error")===0)this.emit("error",P)}I(x,"error",D),I(j,"error",D);function p(){x.removeListener("data",g),j.removeListener("drain",f),x.removeListener("end",_),x.removeListener("close",i),x.removeListener("error",D),j.removeListener("error",D),x.removeListener("end",p),x.removeListener("close",p),j.removeListener("close",p)}return x.on("end",p),x.on("close",p),j.on("close",p),j.emit("pipe",x),j};function I(j,R,x){if(typeof j.prependListener==="function")return j.prependListener(R,x);if(!j._events||!j._events[R])j.on(R,x);else if(B(j._events[R]))j._events[R].unshift(x);else j._events[R]=[x,j._events[R]]}M.exports={Stream:y,prependListener:I}}}),gq=$q({"node_modules/readable-stream/lib/internal/streams/add-abort-signal.js"(t,M){var{AbortError:B,codes:F}=Mq(),y=jq(),{ERR_INVALID_ARG_TYPE:I}=F,j=(x,g)=>{if(typeof x!=="object"||!("aborted"in x))throw new I(g,"AbortSignal",x)};function R(x){return!!(x&&typeof x.pipe==="function")}M.exports.addAbortSignal=function x(g,f){if(j(g,"signal"),!R(f))throw new I("stream","stream.Stream",f);return M.exports.addAbortSignalNoValidate(g,f)},M.exports.addAbortSignalNoValidate=function(x,g){if(typeof x!=="object"||!("aborted"in x))return g;const f=()=>{g.destroy(new B(void 0,{cause:x.reason}))};if(x.aborted)f();else x.addEventListener("abort",f),y(g,()=>x.removeEventListener("abort",f));return g}}}),KQ=$q({"node_modules/readable-stream/lib/internal/streams/state.js"(t,M){var{MathFloor:B,NumberIsInteger:F}=Wq(),{ERR_INVALID_ARG_VALUE:y}=Mq().codes;function I(x,g,f){return x.highWaterMark!=null?x.highWaterMark:g?x[f]:null}function j(x){return x?16:16384}function R(x,g,f,c){const _=I(g,c,f);if(_!=null){if(!F(_)||_<0){const i=c?`options.${f}`:"options.highWaterMark";throw new y(i,_)}return B(_)}return j(x.objectMode)}M.exports={getHighWaterMark:R,getDefaultHighWaterMark:j}}}),pq=$q({"node_modules/readable-stream/lib/internal/streams/from.js"(t,M){var{PromisePrototypeThen:B,SymbolAsyncIterator:F,SymbolIterator:y}=Wq(),{ERR_INVALID_ARG_TYPE:I,ERR_STREAM_NULL_VALUES:j}=Mq().codes;function R(x,g,f){let c;if(typeof g==="string"||g instanceof Buffer)return new x({objectMode:!0,...f,read(){this.push(g),this.push(null)}});let _;if(g&&g[F])_=!0,c=g[F]();else if(g&&g[y])_=!1,c=g[y]();else throw new I("iterable",["Iterable"],g);const i=new x({objectMode:!0,highWaterMark:1,...f});let D=!1;i._read=function(){if(!D)D=!0,P()},i._destroy=function(A,K){B(p(A),()=>Hq(K,A),(U)=>Hq(K,U||A))};async function p(A){const K=A!==void 0&&A!==null,U=typeof c.throw==="function";if(K&&U){const{value:T,done:C}=await c.throw(A);if(await T,C)return}if(typeof c.return==="function"){const{value:T}=await c.return();await T}}async function P(){for(;;){try{const{value:A,done:K}=_?await c.next():c.next();if(K)i.push(null);else{const U=A&&typeof A.then==="function"?await A:A;if(U===null)throw D=!1,new j;else if(i.push(U))continue;else D=!1}}catch(A){i.destroy(A)}break}}return i}M.exports=R}}),uq,bq,Dq=$q({"node_modules/readable-stream/lib/internal/streams/readable.js"(t,M){var{ArrayPrototypeIndexOf:B,NumberIsInteger:F,NumberIsNaN:y,NumberParseInt:I,ObjectDefineProperties:j,ObjectKeys:R,ObjectSetPrototypeOf:x,Promise:g,SafeSet:f,SymbolAsyncIterator:c,Symbol:_}=Wq(),i=globalThis[Symbol.for("Bun.lazy")]("bun:stream").ReadableState,{Stream:D,prependListener:p}=Sq();function P(q){if(!(this instanceof P))return new P(q);const Q=this instanceof Lq();if(this._readableState=new i(q,this,Q),q){const{read:O,destroy:G,construct:v,signal:Kq}=q;if(typeof O==="function")this._read=O;if(typeof G==="function")this._destroy=G;if(typeof v==="function")this._construct=v;if(Kq&&!Q)U(Kq,this)}D.call(this,q),Z.construct(this,()=>{if(this._readableState.needReadable)s(this,this._readableState)})}x(P.prototype,D.prototype),x(P,D),P.prototype.on=function(q,Q){const O=D.prototype.on.call(this,q,Q),G=this._readableState;if(q==="data")if(G.readableListening=this.listenerCount("readable")>0,G.flowing!==!1)n&&d("in flowing mode!",this.__id),this.resume();else n&&d("in readable mode!",this.__id);else if(q==="readable"){if(n&&d("readable listener added!",this.__id),!G.endEmitted&&!G.readableListening){if(G.readableListening=G.needReadable=!0,G.flowing=!1,G.emittedReadable=!1,n&&d("on readable - state.length, reading, emittedReadable",G.length,G.reading,G.emittedReadable,this.__id),G.length)Y(this,G);else if(!G.reading)Hq(Jq,this)}else if(G.endEmitted)n&&d("end already emitted...",this.__id)}return O};class A extends P{#q;#Q;#X;#H;constructor(q,Q){const{objectMode:O,highWaterMark:G,encoding:v,signal:Kq}=q;super({objectMode:O,highWaterMark:G,encoding:v,signal:Kq});this.#X=[],this.#q=void 0,this.#H=Q,this.#Q=!1}#J(){var q=this.#X,Q=0,O=q.length;for(;Q<O;Q++){const G=q[Q];if(q[Q]=void 0,!this.push(G,void 0))return this.#X=q.slice(Q+1),!0}if(O>0)this.#X=[];return!1}#K(q){q.releaseLock(),this.#q=void 0,this.#Q=!0,this.push(null);return}async _read(){n&&d("ReadableFromWeb _read()",this.__id);var q=this.#H,Q=this.#q;if(q)Q=this.#q=q.getReader(),this.#H=void 0;else if(this.#J())return;var O;try{do{var G=!1,v;const Kq=Q.readMany();if(Oq(Kq)){if({done:G,value:v}=await Kq,this.#Q){this.#X.push(...v);return}}else({done:G,value:v}=Kq);if(G){this.#K(Q);return}if(!this.push(v[0])){this.#X=v.slice(1);return}for(let Yq=1,_q=v.length;Yq<_q;Yq++)if(!this.push(v[Yq])){this.#X=v.slice(Yq+1);return}}while(!this.#Q)}catch(Kq){O=Kq}finally{if(O)throw O}}_destroy(q,Q){if(!this.#Q){var O=this.#q;if(O)this.#q=void 0,O.cancel(q).finally(()=>{this.#Q=!0,Q(q)});return}try{Q(q)}catch(G){globalThis.reportError(G)}}}bq=A;function K(q,Q={}){if(!qQ(q))throw new m("readableStream","ReadableStream",q);S(Q,"options");const{highWaterMark:O,encoding:G,objectMode:v=!1,signal:Kq}=Q;if(G!==void 0&&!Buffer.isEncoding(G))throw new JQ(G,"options.encoding");return QQ(v,"options.objectMode"),UQ(P,q,Q)||new A({highWaterMark:O,encoding:G,objectMode:v,signal:Kq},q)}M.exports=P,uq=K;var{addAbortSignal:U}=gq(),T=jq();const{maybeReadMore:C,resume:qq,emitReadable:o,onEofChunk:$}=globalThis[Symbol.for("Bun.lazy")]("bun:stream");function s(q,Q){process.nextTick(C,q,Q)}function Y(q,Q){n&&d("NativeReadable - emitReadable",q.__id),o(q,Q)}var Z=Pq(),{aggregateTwoErrors:N,codes:{ERR_INVALID_ARG_TYPE:m,ERR_METHOD_NOT_IMPLEMENTED:u,ERR_OUT_OF_RANGE:J,ERR_STREAM_PUSH_AFTER_EOF:z,ERR_STREAM_UNSHIFT_AFTER_END_EVENT:w}}=Mq(),{validateObject:S}=Cq(),E=pq(),W=()=>{},{errorOrDestroy:b}=Z;P.prototype.destroy=Z.destroy,P.prototype._undestroy=Z.undestroy,P.prototype._destroy=function(q,Q){Q(q)},P.prototype[Tq.captureRejectionSymbol]=function(q){this.destroy(q)},P.prototype.push=function(q,Q){return a(this,q,Q,!1)},P.prototype.unshift=function(q,Q){return a(this,q,Q,!0)};function a(q,Q,O,G){n&&d("readableAddChunk",Q,q.__id);const v=q._readableState;let Kq;if(!v.objectMode){if(typeof Q==="string"){if(O=O||v.defaultEncoding,v.encoding!==O)if(G&&v.encoding)Q=Buffer.from(Q,O).toString(v.encoding);else Q=Buffer.from(Q,O),O=""}else if(Q instanceof Buffer)O="";else if(D._isUint8Array(Q)){if(G||!v.decoder)Q=D._uint8ArrayToBuffer(Q);O=""}else if(Q!=null)Kq=new m("chunk",["string","Buffer","Uint8Array"],Q)}if(Kq)b(q,Kq);else if(Q===null)v.reading=!1,$(q,v);else if(v.objectMode||Q&&Q.length>0)if(G)if(v.endEmitted)b(q,new w);else if(v.destroyed||v.errored)return!1;else r(q,v,Q,!0);else if(v.ended)b(q,new z);else if(v.destroyed||v.errored)return!1;else if(v.reading=!1,v.decoder&&!O)if(Q=v.decoder.write(Q),v.objectMode||Q.length!==0)r(q,v,Q,!1);else s(q,v);else r(q,v,Q,!1);else if(!G)v.reading=!1,s(q,v);return!v.ended&&(v.length<v.highWaterMark||v.length===0)}function r(q,Q,O,G){if(n&&d("adding chunk",q.__id),n&&d("chunk",O.toString(),q.__id),Q.flowing&&Q.length===0&&!Q.sync&&q.listenerCount("data")>0){if(Q.multiAwaitDrain)Q.awaitDrainWriters.clear();else Q.awaitDrainWriters=null;Q.dataEmitted=!0,q.emit("data",O)}else{if(Q.length+=Q.objectMode?1:O.length,G)Q.buffer.unshift(O);else Q.buffer.push(O);if(n&&d("needReadable @ addChunk",Q.needReadable,q.__id),Q.needReadable)Y(q,Q)}s(q,Q)}P.prototype.isPaused=function(){const q=this._readableState;return q.paused===!0||q.flowing===!1},P.prototype.setEncoding=function(q){const Q=new rq(q);this._readableState.decoder=Q,this._readableState.encoding=this._readableState.decoder.encoding;const O=this._readableState.buffer;let G="";for(let v=O.length;v>0;v--)G+=Q.write(O.shift());if(G!=="")O.push(G);return this._readableState.length=G.length,this};var Qq=1073741824;function Zq(q){if(q>Qq)throw new J("size","<= 1GiB",q);else q--,q|=q>>>1,q|=q>>>2,q|=q>>>4,q|=q>>>8,q|=q>>>16,q++;return q}function Vq(q,Q){if(q<=0||Q.length===0&&Q.ended)return 0;if(Q.objectMode)return 1;if(y(q)){if(Q.flowing&&Q.length)return Q.buffer.first().length;return Q.length}if(q<=Q.length)return q;return Q.ended?Q.length:0}P.prototype.read=function(q){if(n&&d("read - n =",q,this.__id),!F(q))q=I(q,10);const Q=this._readableState,O=q;if(q>Q.highWaterMark)Q.highWaterMark=Zq(q);if(q!==0)Q.emittedReadable=!1;if(q===0&&Q.needReadable&&((Q.highWaterMark!==0?Q.length>=Q.highWaterMark:Q.length>0)||Q.ended)){if(n&&d("read: emitReadable or endReadable",Q.length,Q.ended,this.__id),Q.length===0&&Q.ended)H(this);else Y(this,Q);return null}if(q=Vq(q,Q),q===0&&Q.ended){if(n&&d("read: calling endReadable if length 0 -- length, state.ended",Q.length,Q.ended,this.__id),Q.length===0)H(this);return null}let G=Q.needReadable;if(n&&d("need readable",G,this.__id),Q.length===0||Q.length-q<Q.highWaterMark)G=!0,n&&d("length less than watermark",G,this.__id);if(Q.ended||Q.reading||Q.destroyed||Q.errored||!Q.constructed)n&&d("state.constructed?",Q.constructed,this.__id),G=!1,n&&d("reading, ended or constructing",G,this.__id);else if(G){if(n&&d("do read",this.__id),Q.reading=!0,Q.sync=!0,Q.length===0)Q.needReadable=!0;try{var v=this._read(Q.highWaterMark);if(Oq(v)){n&&d("async _read",this.__id);const Yq=Bun.peek(v);if(n&&d("peeked promise",Yq,this.__id),Yq!==v)v=Yq}if(Oq(v)&&v?.then&&sq(v.then))n&&d("async _read result.then setup",this.__id),v.then(W,function(Yq){b(this,Yq)})}catch(Yq){b(this,Yq)}if(Q.sync=!1,!Q.reading)q=Vq(O,Q)}n&&d("n @ fromList",q,this.__id);let Kq;if(q>0)Kq=X(q,Q);else Kq=null;if(n&&d("ret @ read",Kq,this.__id),Kq===null)Q.needReadable=Q.length<=Q.highWaterMark,n&&d("state.length while ret = null",Q.length,this.__id),q=0;else if(Q.length-=q,Q.multiAwaitDrain)Q.awaitDrainWriters.clear();else Q.awaitDrainWriters=null;if(Q.length===0){if(!Q.ended)Q.needReadable=!0;if(O!==q&&Q.ended)H(this)}if(Kq!==null&&!Q.errorEmitted&&!Q.closeEmitted)Q.dataEmitted=!0,this.emit("data",Kq);return Kq},P.prototype._read=function(q){throw new u("_read()")},P.prototype.pipe=function(q,Q){const O=this,G=this._readableState;if(G.pipes.length===1){if(!G.multiAwaitDrain)G.multiAwaitDrain=!0,G.awaitDrainWriters=new f(G.awaitDrainWriters?[G.awaitDrainWriters]:[])}G.pipes.push(q),n&&d("pipe count=%d opts=%j",G.pipes.length,Q,O.__id);const Kq=(!Q||Q.end!==!1)&&q!==process.stdout&&q!==process.stderr?_q:xq;if(G.endEmitted)Hq(Kq);else O.once("end",Kq);q.on("unpipe",Yq);function Yq(Aq,Fq){if(n&&d("onunpipe",O.__id),Aq===O){if(Fq&&Fq.hasUnpiped===!1)Fq.hasUnpiped=!0,oq()}}function _q(){n&&d("onend",O.__id),q.end()}let Nq,kq=!1;function oq(){if(n&&d("cleanup",O.__id),q.removeListener("close",vq),q.removeListener("finish",Rq),Nq)q.removeListener("drain",Nq);if(q.removeListener("error",wq),q.removeListener("unpipe",Yq),O.removeListener("end",_q),O.removeListener("end",xq),O.removeListener("data",hq),kq=!0,Nq&&G.awaitDrainWriters&&(!q._writableState||q._writableState.needDrain))Nq()}function yq(){if(!kq){if(G.pipes.length===1&&G.pipes[0]===q)n&&d("false write response, pause",0,O.__id),G.awaitDrainWriters=q,G.multiAwaitDrain=!1;else if(G.pipes.length>1&&G.pipes.includes(q))n&&d("false write response, pause",G.awaitDrainWriters.size,O.__id),G.awaitDrainWriters.add(q);O.pause()}if(!Nq)Nq=Xq(O,q),q.on("drain",Nq)}O.on("data",hq);function hq(Aq){n&&d("ondata",O.__id);const Fq=q.write(Aq);if(n&&d("dest.write",Fq,O.__id),Fq===!1)yq()}function wq(Aq){if(d("onerror",Aq),xq(),q.removeListener("error",wq),q.listenerCount("error")===0){const Fq=q._writableState||q._readableState;if(Fq&&!Fq.errorEmitted)b(q,Aq);else q.emit("error",Aq)}}p(q,"error",wq);function vq(){q.removeListener("finish",Rq),xq()}q.once("close",vq);function Rq(){d("onfinish"),q.removeListener("close",vq),xq()}q.once("finish",Rq);function xq(){d("unpipe"),O.unpipe(q)}if(q.emit("pipe",O),q.writableNeedDrain===!0){if(G.flowing)yq()}else if(!G.flowing)d("pipe resume"),O.resume();return q};function Xq(q,Q){return function O(){const G=q._readableState;if(G.awaitDrainWriters===Q)d("pipeOnDrain",1),G.awaitDrainWriters=null;else if(G.multiAwaitDrain)d("pipeOnDrain",G.awaitDrainWriters.size),G.awaitDrainWriters.delete(Q);if((!G.awaitDrainWriters||G.awaitDrainWriters.size===0)&&q.listenerCount("data"))q.resume()}}P.prototype.unpipe=function(q){const Q=this._readableState,O={hasUnpiped:!1};if(Q.pipes.length===0)return this;if(!q){const v=Q.pipes;Q.pipes=[],this.pause();for(let Kq=0;Kq<v.length;Kq++)v[Kq].emit("unpipe",this,{hasUnpiped:!1});return this}const G=B(Q.pipes,q);if(G===-1)return this;if(Q.pipes.splice(G,1),Q.pipes.length===0)this.pause();return q.emit("unpipe",this,O),this},P.prototype.addListener=P.prototype.on,P.prototype.removeListener=function(q,Q){const O=D.prototype.removeListener.call(this,q,Q);if(q==="readable")Hq(Bq,this);return O},P.prototype.off=P.prototype.removeListener,P.prototype.removeAllListeners=function(q){const Q=D.prototype.removeAllListeners.apply(this,arguments);if(q==="readable"||q===void 0)Hq(Bq,this);return Q};function Bq(q){const Q=q._readableState;if(Q.readableListening=q.listenerCount("readable")>0,Q.resumeScheduled&&Q.paused===!1)Q.flowing=!0;else if(q.listenerCount("data")>0)q.resume();else if(!Q.readableListening)Q.flowing=null}function Jq(q){n&&d("on readable nextTick, calling read(0)",q.__id),q.read(0)}P.prototype.resume=function(){const q=this._readableState;if(!q.flowing)n&&d("resume",this.__id),q.flowing=!q.readableListening,qq(this,q);return q.paused=!1,this},P.prototype.pause=function(){if(n&&d("call pause flowing=%j",this._readableState.flowing,this.__id),this._readableState.flowing!==!1)n&&d("pause",this.__id),this._readableState.flowing=!1,this.emit("pause");return this._readableState.paused=!0,this},P.prototype.wrap=function(q){let Q=!1;q.on("data",(G)=>{if(!this.push(G)&&q.pause)Q=!0,q.pause()}),q.on("end",()=>{this.push(null)}),q.on("error",(G)=>{b(this,G)}),q.on("close",()=>{this.destroy()}),q.on("destroy",()=>{this.destroy()}),this._read=()=>{if(Q&&q.resume)Q=!1,q.resume()};const O=R(q);for(let G=1;G<O.length;G++){const v=O[G];if(this[v]===void 0&&typeof q[v]==="function")this[v]=q[v].bind(q)}return this},P.prototype[c]=function(){return V(this)},P.prototype.iterator=function(q){if(q!==void 0)S(q,"options");return V(this,q)};function V(q,Q){if(typeof q.read!=="function")q=P.wrap(q,{objectMode:!0});const O=h(q,Q);return O.stream=q,O}async function*h(q,Q){let O=W;function G(Yq){if(this===q)O(),O=W;else O=Yq}q.on("readable",G);let v;const Kq=T(q,{writable:!1},(Yq)=>{v=Yq?N(v,Yq):null,O(),O=W});try{while(!0){const Yq=q.destroyed?null:q.read();if(Yq!==null)yield Yq;else if(v)throw v;else if(v===null)return;else await new g(G)}}catch(Yq){throw v=N(v,Yq),v}finally{if((v||(Q===null||Q===void 0?void 0:Q.destroyOnReturn)!==!1)&&(v===void 0||q._readableState.autoDestroy))Z.destroyer(q,null);else q.off("readable",G),Kq()}}j(P.prototype,{readable:{get(){const q=this._readableState;return!!q&&q.readable!==!1&&!q.destroyed&&!q.errorEmitted&&!q.endEmitted},set(q){if(this._readableState)this._readableState.readable=!!q}},readableDidRead:{enumerable:!1,get:function(){return this._readableState.dataEmitted}},readableAborted:{enumerable:!1,get:function(){return!!(this._readableState.readable!==!1&&(this._readableState.destroyed||this._readableState.errored)&&!this._readableState.endEmitted)}},readableHighWaterMark:{enumerable:!1,get:function(){return this._readableState.highWaterMark}},readableBuffer:{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}},readableFlowing:{enumerable:!1,get:function(){return this._readableState.flowing},set:function(q){if(this._readableState)this._readableState.flowing=q}},readableLength:{enumerable:!1,get(){return this._readableState.length}},readableObjectMode:{enumerable:!1,get(){return this._readableState?this._readableState.objectMode:!1}},readableEncoding:{enumerable:!1,get(){return this._readableState?this._readableState.encoding:null}},errored:{enumerable:!1,get(){return this._readableState?this._readableState.errored:null}},closed:{get(){return this._readableState?this._readableState.closed:!1}},destroyed:{enumerable:!1,get(){return this._readableState?this._readableState.destroyed:!1},set(q){if(!this._readableState)return;this._readableState.destroyed=q}},readableEnded:{enumerable:!1,get(){return this._readableState?this._readableState.endEmitted:!1}}}),P._fromList=X;function X(q,Q){if(Q.length===0)return null;let O;if(Q.objectMode)O=Q.buffer.shift();else if(!q||q>=Q.length){if(Q.decoder)O=Q.buffer.join("");else if(Q.buffer.length===1)O=Q.buffer.first();else O=Q.buffer.concat(Q.length);Q.buffer.clear()}else O=Q.buffer.consume(q,Q.decoder);return O}function H(q){const Q=q._readableState;if(n&&d("endEmitted @ endReadable",Q.endEmitted,q.__id),!Q.endEmitted)Q.ended=!0,Hq(L,Q,q)}function L(q,Q){if(n&&d("endReadableNT -- endEmitted, state.length",q.endEmitted,q.length,Q.__id),!q.errored&&!q.closeEmitted&&!q.endEmitted&&q.length===0){if(q.endEmitted=!0,Q.emit("end"),n&&d("end emitted @ endReadableNT",Q.__id),Q.writable&&Q.allowHalfOpen===!1)Hq(l,Q);else if(q.autoDestroy){const O=Q._writableState;if(!O||O.autoDestroy&&(O.finished||O.writable===!1))Q.destroy()}}}function l(q){if(q.writable&&!q.writableEnded&&!q.destroyed)q.end()}P.from=function(q,Q){return E(P,q,Q)};var k={newStreamReadableFromReadableStream:K};function e(){if(k===void 0)k={};return k}P.fromWeb=function(q,Q){return e().newStreamReadableFromReadableStream(q,Q)},P.toWeb=function(q){return e().newReadableStreamFromStreamReadable(q)},P.wrap=function(q,Q){var O,G;return new P({objectMode:(O=(G=q.readableObjectMode)!==null&&G!==void 0?G:q.objectMode)!==null&&O!==void 0?O:!0,...Q,destroy(v,Kq){Z.destroyer(q,v),Kq(v)}}).wrap(q)}}}),mq=$q({"node_modules/readable-stream/lib/internal/streams/writable.js"(t,M){var{ArrayPrototypeSlice:B,Error:F,FunctionPrototypeSymbolHasInstance:y,ObjectDefineProperty:I,ObjectDefineProperties:j,ObjectSetPrototypeOf:R,StringPrototypeToLowerCase:x,Symbol:g,SymbolHasInstance:f}=Wq(),c=Sq().Stream,_=Pq(),{addAbortSignal:i}=gq(),{getHighWaterMark:D,getDefaultHighWaterMark:p}=KQ(),{ERR_INVALID_ARG_TYPE:P,ERR_METHOD_NOT_IMPLEMENTED:A,ERR_MULTIPLE_CALLBACK:K,ERR_STREAM_CANNOT_PIPE:U,ERR_STREAM_DESTROYED:T,ERR_STREAM_ALREADY_FINISHED:C,ERR_STREAM_NULL_VALUES:qq,ERR_STREAM_WRITE_AFTER_END:o,ERR_UNKNOWN_ENCODING:$}=Mq().codes,{errorOrDestroy:s}=_;function Y(X={}){const H=this instanceof Lq();if(!H&&!y(Y,this))return new Y(X);if(this._writableState=new m(X,this,H),X){if(typeof X.write==="function")this._write=X.write;if(typeof X.writev==="function")this._writev=X.writev;if(typeof X.destroy==="function")this._destroy=X.destroy;if(typeof X.final==="function")this._final=X.final;if(typeof X.construct==="function")this._construct=X.construct;if(X.signal)i(X.signal,this)}c.call(this,X),_.construct(this,()=>{const L=this._writableState;if(!L.writing)r(this,L);Xq(this,L)})}R(Y.prototype,c.prototype),R(Y,c),M.exports=Y;function Z(){}var N=g("kOnFinished");function m(X,H,L){if(typeof L!=="boolean")L=H instanceof Lq();if(this.objectMode=!!(X&&X.objectMode),L)this.objectMode=this.objectMode||!!(X&&X.writableObjectMode);this.highWaterMark=X?D(this,X,"writableHighWaterMark",L):p(!1),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;const l=!!(X&&X.decodeStrings===!1);this.decodeStrings=!l,this.defaultEncoding=X&&X.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=E.bind(void 0,H),this.writecb=null,this.writelen=0,this.afterWriteTickInfo=null,u(this),this.pendingcb=0,this.constructed=!0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!X||X.emitClose!==!1,this.autoDestroy=!X||X.autoDestroy!==!1,this.errored=null,this.closed=!1,this.closeEmitted=!1,this[N]=[]}function u(X){X.buffered=[],X.bufferedIndex=0,X.allBuffers=!0,X.allNoop=!0}m.prototype.getBuffer=function X(){return B(this.buffered,this.bufferedIndex)},I(m.prototype,"bufferedRequestCount",{get(){return this.buffered.length-this.bufferedIndex}}),I(Y,f,{value:function(X){if(y(this,X))return!0;if(this!==Y)return!1;return X&&X._writableState instanceof m}}),Y.prototype.pipe=function(){s(this,new U)};function J(X,H,L,l){const k=X._writableState;if(typeof L==="function")l=L,L=k.defaultEncoding;else{if(!L)L=k.defaultEncoding;else if(L!=="buffer"&&!Buffer.isEncoding(L))throw new $(L);if(typeof l!=="function")l=Z}if(H===null)throw new qq;else if(!k.objectMode)if(typeof H==="string"){if(k.decodeStrings!==!1)H=Buffer.from(H,L),L="buffer"}else if(H instanceof Buffer)L="buffer";else if(c._isUint8Array(H))H=c._uint8ArrayToBuffer(H),L="buffer";else throw new P("chunk",["string","Buffer","Uint8Array"],H);let e;if(k.ending)e=new o;else if(k.destroyed)e=new T("write");if(e)return Hq(l,e),s(X,e,!0),e;return k.pendingcb++,z(X,k,H,L,l)}Y.prototype.write=function(X,H,L){return J(this,X,H,L)===!0},Y.prototype.cork=function(){this._writableState.corked++},Y.prototype.uncork=function(){const X=this._writableState;if(X.corked){if(X.corked--,!X.writing)r(this,X)}},Y.prototype.setDefaultEncoding=function X(H){if(typeof H==="string")H=x(H);if(!Buffer.isEncoding(H))throw new $(H);return this._writableState.defaultEncoding=H,this};function z(X,H,L,l,k){const e=H.objectMode?1:L.length;H.length+=e;const q=H.length<H.highWaterMark;if(!q)H.needDrain=!0;if(H.writing||H.corked||H.errored||!H.constructed){if(H.buffered.push({chunk:L,encoding:l,callback:k}),H.allBuffers&&l!=="buffer")H.allBuffers=!1;if(H.allNoop&&k!==Z)H.allNoop=!1}else H.writelen=e,H.writecb=k,H.writing=!0,H.sync=!0,X._write(L,l,H.onwrite),H.sync=!1;return q&&!H.errored&&!H.destroyed}function w(X,H,L,l,k,e,q){if(H.writelen=l,H.writecb=q,H.writing=!0,H.sync=!0,H.destroyed)H.onwrite(new T("write"));else if(L)X._writev(k,H.onwrite);else X._write(k,e,H.onwrite);H.sync=!1}function S(X,H,L,l){--H.pendingcb,l(L),a(H),s(X,L)}function E(X,H){const L=X._writableState,l=L.sync,k=L.writecb;if(typeof k!=="function"){s(X,new K);return}if(L.writing=!1,L.writecb=null,L.length-=L.writelen,L.writelen=0,H){if(Error.captureStackTrace(H),!L.errored)L.errored=H;if(X._readableState&&!X._readableState.errored)X._readableState.errored=H;if(l)Hq(S,X,L,H,k);else S(X,L,H,k)}else{if(L.buffered.length>L.bufferedIndex)r(X,L);if(l)if(L.afterWriteTickInfo!==null&&L.afterWriteTickInfo.cb===k)L.afterWriteTickInfo.count++;else L.afterWriteTickInfo={count:1,cb:k,stream:X,state:L},Hq(W,L.afterWriteTickInfo);else b(X,L,1,k)}}function W({stream:X,state:H,count:L,cb:l}){return H.afterWriteTickInfo=null,b(X,H,L,l)}function b(X,H,L,l){if(!H.ending&&!X.destroyed&&H.length===0&&H.needDrain)H.needDrain=!1,X.emit("drain");while(L-- >0)H.pendingcb--,l();if(H.destroyed)a(H);Xq(X,H)}function a(X){if(X.writing)return;for(let k=X.bufferedIndex;k<X.buffered.length;++k){var H;const{chunk:e,callback:q}=X.buffered[k],Q=X.objectMode?1:e.length;X.length-=Q,q((H=X.errored)!==null&&H!==void 0?H:new T("write"))}const L=X[N].splice(0);for(let k=0;k<L.length;k++){var l;L[k]((l=X.errored)!==null&&l!==void 0?l:new T("end"))}u(X)}function r(X,H){if(H.corked||H.bufferProcessing||H.destroyed||!H.constructed)return;const{buffered:L,bufferedIndex:l,objectMode:k}=H,e=L.length-l;if(!e)return;let q=l;if(H.bufferProcessing=!0,e>1&&X._writev){H.pendingcb-=e-1;const Q=H.allNoop?Z:(G)=>{for(let v=q;v<L.length;++v)L[v].callback(G)},O=H.allNoop&&q===0?L:B(L,q);O.allBuffers=H.allBuffers,w(X,H,!0,H.length,O,"",Q),u(H)}else{do{const{chunk:Q,encoding:O,callback:G}=L[q];L[q++]=null;const v=k?1:Q.length;w(X,H,!1,v,Q,O,G)}while(q<L.length&&!H.writing);if(q===L.length)u(H);else if(q>256)L.splice(0,q),H.bufferedIndex=0;else H.bufferedIndex=q}H.bufferProcessing=!1}Y.prototype._write=function(X,H,L){if(this._writev)this._writev([{chunk:X,encoding:H}],L);else throw new A("_write()")},Y.prototype._writev=null,Y.prototype.end=function(X,H,L,l=!1){const k=this._writableState;if(n&&d("end",k,this.__id),typeof X==="function")L=X,X=null,H=null;else if(typeof H==="function")L=H,H=null;let e;if(X!==null&&X!==void 0){let q;if(!l)q=J(this,X,H);else q=this.write(X,H);if(q instanceof F)e=q}if(k.corked)k.corked=1,this.uncork();if(e)this.emit("error",e);else if(!k.errored&&!k.ending)k.ending=!0,Xq(this,k,!0),k.ended=!0;else if(k.finished)e=new C("end");else if(k.destroyed)e=new T("end");if(typeof L==="function")if(e||k.finished)Hq(L,e);else k[N].push(L);return this};function Qq(X,H){var L=X.ending&&!X.destroyed&&X.constructed&&X.length===0&&!X.errored&&X.buffered.length===0&&!X.finished&&!X.writing&&!X.errorEmitted&&!X.closeEmitted;return d("needFinish",L,H),L}function Zq(X,H){let L=!1;function l(k){if(L){s(X,k!==null&&k!==void 0?k:K());return}if(L=!0,H.pendingcb--,k){const e=H[N].splice(0);for(let q=0;q<e.length;q++)e[q](k);s(X,k,H.sync)}else if(Qq(H))H.prefinished=!0,X.emit("prefinish"),H.pendingcb++,Hq(Bq,X,H)}H.sync=!0,H.pendingcb++;try{X._final(l)}catch(k){l(k)}H.sync=!1}function Vq(X,H){if(!H.prefinished&&!H.finalCalled)if(typeof X._final==="function"&&!H.destroyed)H.finalCalled=!0,Zq(X,H);else H.prefinished=!0,X.emit("prefinish")}function Xq(X,H,L){if(n&&d("finishMaybe -- state, sync",H,L,X.__id),!Qq(H,X.__id))return;if(Vq(X,H),H.pendingcb===0){if(L)H.pendingcb++,Hq((l,k)=>{if(Qq(k))Bq(l,k);else k.pendingcb--},X,H);else if(Qq(H))H.pendingcb++,Bq(X,H)}}function Bq(X,H){H.pendingcb--,H.finished=!0;const L=H[N].splice(0);for(let l=0;l<L.length;l++)L[l]();if(X.emit("finish"),H.autoDestroy){const l=X._readableState;if(!l||l.autoDestroy&&(l.endEmitted||l.readable===!1))X.destroy()}}j(Y.prototype,{closed:{get(){return this._writableState?this._writableState.closed:!1}},destroyed:{get(){return this._writableState?this._writableState.destroyed:!1},set(X){if(this._writableState)this._writableState.destroyed=X}},writable:{get(){const X=this._writableState;return!!X&&X.writable!==!1&&!X.destroyed&&!X.errored&&!X.ending&&!X.ended},set(X){if(this._writableState)this._writableState.writable=!!X}},writableFinished:{get(){return this._writableState?this._writableState.finished:!1}},writableObjectMode:{get(){return this._writableState?this._writableState.objectMode:!1}},writableBuffer:{get(){return this._writableState&&this._writableState.getBuffer()}},writableEnded:{get(){return this._writableState?this._writableState.ending:!1}},writableNeedDrain:{get(){const X=this._writableState;if(!X)return!1;return!X.destroyed&&!X.ending&&X.needDrain}},writableHighWaterMark:{get(){return this._writableState&&this._writableState.highWaterMark}},writableCorked:{get(){return this._writableState?this._writableState.corked:0}},writableLength:{get(){return this._writableState&&this._writableState.length}},errored:{enumerable:!1,get(){return this._writableState?this._writableState.errored:null}},writableAborted:{enumerable:!1,get:function(){return!!(this._writableState.writable!==!1&&(this._writableState.destroyed||this._writableState.errored)&&!this._writableState.finished)}}});var Jq=_.destroy;Y.prototype.destroy=function(X,H){const L=this._writableState;if(!L.destroyed&&(L.bufferedIndex<L.buffered.length||L[N].length))Hq(a,L);return Jq.call(this,X,H),this},Y.prototype._undestroy=_.undestroy,Y.prototype._destroy=function(X,H){H(X)},Y.prototype[Tq.captureRejectionSymbol]=function(X){this.destroy(X)};var V;function h(){if(V===void 0)V={};return V}Y.fromWeb=function(X,H){return h().newStreamWritableFromWritableStream(X,H)},Y.toWeb=function(X){return h().newWritableStreamFromStreamWritable(X)}}}),ZQ=$q({"node_modules/readable-stream/lib/internal/streams/duplexify.js"(t,M){var{isReadable:B,isWritable:F,isIterable:y,isNodeStream:I,isReadableNodeStream:j,isWritableNodeStream:R,isDuplexNodeStream:x}=Iq(),g=jq(),{AbortError:f,codes:{ERR_INVALID_ARG_TYPE:c,ERR_INVALID_RETURN_VALUE:_}}=Mq(),{destroyer:i}=Pq(),D=Lq(),p=Dq(),{createDeferredPromise:P}=Eq(),A=pq(),K=typeof Blob!=="undefined"?function o($){return $ instanceof Blob}:function o($){return!1},{FunctionPrototypeCall:U}=Wq();class T extends D{constructor(o){super(o);if((o===null||o===void 0?void 0:o.readable)===!1)this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0;if((o===null||o===void 0?void 0:o.writable)===!1)this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0}}M.exports=function o($,s){if(x($))return $;if(j($))return qq({readable:$});if(R($))return qq({writable:$});if(I($))return qq({writable:!1,readable:!1});if(typeof $==="function"){const{value:Z,write:N,final:m,destroy:u}=C($);if(y(Z))return A(T,Z,{objectMode:!0,write:N,final:m,destroy:u});const J=Z===null||Z===void 0?void 0:Z.then;if(typeof J==="function"){let z;const w=U(J,Z,(S)=>{if(S!=null)throw new _("nully","body",S)},(S)=>{i(z,S)});return z=new T({objectMode:!0,readable:!1,write:N,final(S){m(async()=>{try{await w,Hq(S,null)}catch(E){Hq(S,E)}})},destroy:u})}throw new _("Iterable, AsyncIterable or AsyncFunction",s,Z)}if(K($))return o($.arrayBuffer());if(y($))return A(T,$,{objectMode:!0,writable:!1});if(typeof($===null||$===void 0?void 0:$.writable)==="object"||typeof($===null||$===void 0?void 0:$.readable)==="object"){const Z=$!==null&&$!==void 0&&$.readable?j($===null||$===void 0?void 0:$.readable)?$===null||$===void 0?void 0:$.readable:o($.readable):void 0,N=$!==null&&$!==void 0&&$.writable?R($===null||$===void 0?void 0:$.writable)?$===null||$===void 0?void 0:$.writable:o($.writable):void 0;return qq({readable:Z,writable:N})}const Y=$===null||$===void 0?void 0:$.then;if(typeof Y==="function"){let Z;return U(Y,$,(N)=>{if(N!=null)Z.push(N);Z.push(null)},(N)=>{i(Z,N)}),Z=new T({objectMode:!0,writable:!1,read(){}})}throw new c(s,["Blob","ReadableStream","WritableStream","Stream","Iterable","AsyncIterable","Function","{ readable, writable } pair","Promise"],$)};function C(o){let{promise:$,resolve:s}=P();const Y=new AbortController,Z=Y.signal;return{value:o(async function*(){while(!0){const m=$;$=null;const{chunk:u,done:J,cb:z}=await m;if(Hq(z),J)return;if(Z.aborted)throw new f(void 0,{cause:Z.reason});({promise:$,resolve:s}=P()),yield u}}(),{signal:Z}),write(m,u,J){const z=s;s=null,z({chunk:m,done:!1,cb:J})},final(m){const u=s;s=null,u({done:!0,cb:m})},destroy(m,u){Y.abort(),u(m)}}}function qq(o){const $=o.readable&&typeof o.readable.read!=="function"?p.wrap(o.readable):o.readable,s=o.writable;let Y=!!B($),Z=!!F(s),N,m,u,J,z;function w(S){const E=J;if(J=null,E)E(S);else if(S)z.destroy(S);else if(!Y&&!Z)z.destroy()}if(z=new T({readableObjectMode:!!($!==null&&$!==void 0&&$.readableObjectMode),writableObjectMode:!!(s!==null&&s!==void 0&&s.writableObjectMode),readable:Y,writable:Z}),Z)g(s,(S)=>{if(Z=!1,S)i($,S);w(S)}),z._write=function(S,E,W){if(s.write(S,E))W();else N=W},z._final=function(S){s.end(),m=S},s.on("drain",function(){if(N){const S=N;N=null,S()}}),s.on("finish",function(){if(m){const S=m;m=null,S()}});if(Y)g($,(S)=>{if(Y=!1,S)i($,S);w(S)}),$.on("readable",function(){if(u){const S=u;u=null,S()}}),$.on("end",function(){z.push(null)}),z._read=function(){while(!0){const S=$.read();if(S===null){u=z._read;return}if(!z.push(S))return}};return z._destroy=function(S,E){if(!S&&J!==null)S=new f;if(u=null,N=null,m=null,J===null)E(S);else J=E,i(s,S),i($,S)},z}}}),Lq=$q({"node_modules/readable-stream/lib/internal/streams/duplex.js"(t,M){var{ObjectDefineProperties:B,ObjectGetOwnPropertyDescriptor:F,ObjectKeys:y,ObjectSetPrototypeOf:I}=Wq(),j=Dq();function R(_){if(!(this instanceof R))return new R(_);if(j.call(this,_),Gq.call(this,_),_){if(this.allowHalfOpen=_.allowHalfOpen!==!1,_.readable===!1)this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0;if(_.writable===!1)this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0}else this.allowHalfOpen=!0}M.exports=R,I(R.prototype,j.prototype),I(R,j);for(var x in Gq.prototype)if(!R.prototype[x])R.prototype[x]=Gq.prototype[x];B(R.prototype,{writable:F(Gq.prototype,"writable"),writableHighWaterMark:F(Gq.prototype,"writableHighWaterMark"),writableObjectMode:F(Gq.prototype,"writableObjectMode"),writableBuffer:F(Gq.prototype,"writableBuffer"),writableLength:F(Gq.prototype,"writableLength"),writableFinished:F(Gq.prototype,"writableFinished"),writableCorked:F(Gq.prototype,"writableCorked"),writableEnded:F(Gq.prototype,"writableEnded"),writableNeedDrain:F(Gq.prototype,"writableNeedDrain"),destroyed:{get(){if(this._readableState===void 0||this._writableState===void 0)return!1;return this._readableState.destroyed&&this._writableState.destroyed},set(_){if(this._readableState&&this._writableState)this._readableState.destroyed=_,this._writableState.destroyed=_}}});var g;function f(){if(g===void 0)g={};return g}R.fromWeb=function(_,i){return f().newStreamDuplexFromReadableWritablePair(_,i)},R.toWeb=function(_){return f().newReadableWritablePairFromDuplex(_)};var c;R.from=function(_){if(!c)c=ZQ();return c(_,"body")}}}),cq=$q({"node_modules/readable-stream/lib/internal/streams/transform.js"(t,M){var{ObjectSetPrototypeOf:B,Symbol:F}=Wq(),{ERR_METHOD_NOT_IMPLEMENTED:y}=Mq().codes,I=Lq();function j(f){if(!(this instanceof j))return new j(f);if(I.call(this,f),this._readableState.sync=!1,this[R]=null,f){if(typeof f.transform==="function")this._transform=f.transform;if(typeof f.flush==="function")this._flush=f.flush}this.on("prefinish",g.bind(this))}B(j.prototype,I.prototype),B(j,I),M.exports=j;var R=F("kCallback");function x(f){if(typeof this._flush==="function"&&!this.destroyed)this._flush((c,_)=>{if(c){if(f)f(c);else this.destroy(c);return}if(_!=null)this.push(_);if(this.push(null),f)f()});else if(this.push(null),f)f()}function g(){if(this._final!==x)x.call(this)}j.prototype._final=x,j.prototype._transform=function(f,c,_){throw new y("_transform()")},j.prototype._write=function(f,c,_){const i=this._readableState,D=this._writableState,p=i.length;this._transform(f,c,(P,A)=>{if(P){_(P);return}if(A!=null)this.push(A);if(D.ended||p===i.length||i.length<i.highWaterMark||i.highWaterMark===0||i.length===0)_();else this[R]=_})},j.prototype._read=function(){if(this[R]){const f=this[R];this[R]=null,f()}}}}),dq=$q({"node_modules/readable-stream/lib/internal/streams/passthrough.js"(t,M){var{ObjectSetPrototypeOf:B}=Wq(),F=cq();function y(I){if(!(this instanceof y))return new y(I);F.call(this,I)}B(y.prototype,F.prototype),B(y,F),y.prototype._transform=function(I,j,R){R(null,I)},M.exports=y}}),fq=$q({"node_modules/readable-stream/lib/internal/streams/pipeline.js"(t,M){var{ArrayIsArray:B,Promise:F,SymbolAsyncIterator:y}=Wq(),I=jq(),{once:j}=Eq(),R=Pq(),x=Lq(),{aggregateTwoErrors:g,codes:{ERR_INVALID_ARG_TYPE:f,ERR_INVALID_RETURN_VALUE:c,ERR_MISSING_ARGS:_,ERR_STREAM_DESTROYED:i},AbortError:D}=Mq(),{validateFunction:p,validateAbortSignal:P}=Cq(),{isIterable:A,isReadable:K,isReadableNodeStream:U,isNodeStream:T}=Iq(),C,qq;function o(J,z,w){let S=!1;J.on("close",()=>{S=!0});const E=I(J,{readable:z,writable:w},(W)=>{S=!W});return{destroy:(W)=>{if(S)return;S=!0,R.destroyer(J,W||new i("pipe"))},cleanup:E}}function $(J){return p(J[J.length-1],"streams[stream.length - 1]"),J.pop()}function s(J){if(A(J))return J;else if(U(J))return Y(J);throw new f("val",["Readable","Iterable","AsyncIterable"],J)}async function*Y(J){if(!qq)qq=Dq();yield*qq.prototype[y].call(J)}async function Z(J,z,w,{end:S}){let E,W=null;const b=(Qq)=>{if(Qq)E=Qq;if(W){const Zq=W;W=null,Zq()}},a=()=>new F((Qq,Zq)=>{if(E)Zq(E);else W=()=>{if(E)Zq(E);else Qq()}});z.on("drain",b);const r=I(z,{readable:!1},b);try{if(z.writableNeedDrain)await a();for await(let Qq of J)if(!z.write(Qq))await a();if(S)z.end();await a(),w()}catch(Qq){w(E!==Qq?g(E,Qq):Qq)}finally{r(),z.off("drain",b)}}function N(...J){return m(J,j($(J)))}function m(J,z,w){if(J.length===1&&B(J[0]))J=J[0];if(J.length<2)throw new _("streams");const S=new AbortController,E=S.signal,W=w===null||w===void 0?void 0:w.signal,b=[];P(W,"options.signal");function a(){Bq(new D)}W===null||W===void 0||W.addEventListener("abort",a);let r,Qq;const Zq=[];let Vq=0;function Xq(h){Bq(h,--Vq===0)}function Bq(h,X){if(h&&(!r||r.code==="ERR_STREAM_PREMATURE_CLOSE"))r=h;if(!r&&!X)return;while(Zq.length)Zq.shift()(r);if(W===null||W===void 0||W.removeEventListener("abort",a),S.abort(),X){if(!r)b.forEach((H)=>H());Hq(z,r,Qq)}}let Jq;for(let h=0;h<J.length;h++){const X=J[h],H=h<J.length-1,L=h>0,l=H||(w===null||w===void 0?void 0:w.end)!==!1,k=h===J.length-1;if(T(X)){let e=function(q){if(q&&q.name!=="AbortError"&&q.code!=="ERR_STREAM_PREMATURE_CLOSE")Xq(q)};if(l){const{destroy:q,cleanup:Q}=o(X,H,L);if(Zq.push(q),K(X)&&k)b.push(Q)}if(X.on("error",e),K(X)&&k)b.push(()=>{X.removeListener("error",e)})}if(h===0)if(typeof X==="function"){if(Jq=X({signal:E}),!A(Jq))throw new c("Iterable, AsyncIterable or Stream","source",Jq)}else if(A(X)||U(X))Jq=X;else Jq=x.from(X);else if(typeof X==="function")if(Jq=s(Jq),Jq=X(Jq,{signal:E}),H){if(!A(Jq,!0))throw new c("AsyncIterable",`transform[${h-1}]`,Jq)}else{var V;if(!C)C=dq();const e=new C({objectMode:!0}),q=(V=Jq)===null||V===void 0?void 0:V.then;if(typeof q==="function")Vq++,q.call(Jq,(G)=>{if(Qq=G,G!=null)e.write(G);if(l)e.end();Hq(Xq)},(G)=>{e.destroy(G),Hq(Xq,G)});else if(A(Jq,!0))Vq++,Z(Jq,e,Xq,{end:l});else throw new c("AsyncIterable or Promise","destination",Jq);Jq=e;const{destroy:Q,cleanup:O}=o(Jq,!1,!0);if(Zq.push(Q),k)b.push(O)}else if(T(X)){if(U(Jq)){Vq+=2;const e=u(Jq,X,Xq,{end:l});if(K(X)&&k)b.push(e)}else if(A(Jq))Vq++,Z(Jq,X,Xq,{end:l});else throw new f("val",["Readable","Iterable","AsyncIterable"],Jq);Jq=X}else Jq=x.from(X)}if(E!==null&&E!==void 0&&E.aborted||W!==null&&W!==void 0&&W.aborted)Hq(a);return Jq}function u(J,z,w,{end:S}){if(J.pipe(z,{end:S}),S)J.once("end",()=>z.end());else w();return I(J,{readable:!0,writable:!1},(E)=>{const W=J._readableState;if(E&&E.code==="ERR_STREAM_PREMATURE_CLOSE"&&W&&W.ended&&!W.errored&&!W.errorEmitted)J.once("end",w).once("error",w);else w(E)}),I(z,{readable:!1,writable:!0},w)}M.exports={pipelineImpl:m,pipeline:N}}}),BQ=$q({"node_modules/readable-stream/lib/internal/streams/compose.js"(t,M){var{pipeline:B}=fq(),F=Lq(),{destroyer:y}=Pq(),{isNodeStream:I,isReadable:j,isWritable:R}=Iq(),{AbortError:x,codes:{ERR_INVALID_ARG_VALUE:g,ERR_MISSING_ARGS:f}}=Mq();M.exports=function c(..._){if(_.length===0)throw new f("streams");if(_.length===1)return F.from(_[0]);const i=[..._];if(typeof _[0]==="function")_[0]=F.from(_[0]);if(typeof _[_.length-1]==="function"){const $=_.length-1;_[$]=F.from(_[$])}for(let $=0;$<_.length;++$){if(!I(_[$]))continue;if($<_.length-1&&!j(_[$]))throw new g(`streams[${$}]`,i[$],"must be readable");if($>0&&!R(_[$]))throw new g(`streams[${$}]`,i[$],"must be writable")}let D,p,P,A,K;function U($){const s=A;if(A=null,s)s($);else if($)K.destroy($);else if(!o&&!qq)K.destroy()}const T=_[0],C=B(_,U),qq=!!R(T),o=!!j(C);if(K=new F({writableObjectMode:!!(T!==null&&T!==void 0&&T.writableObjectMode),readableObjectMode:!!(C!==null&&C!==void 0&&C.writableObjectMode),writable:qq,readable:o}),qq)K._write=function($,s,Y){if(T.write($,s))Y();else D=Y},K._final=function($){T.end(),p=$},T.on("drain",function(){if(D){const $=D;D=null,$()}}),C.on("finish",function(){if(p){const $=p;p=null,$()}});if(o)C.on("readable",function(){if(P){const $=P;P=null,$()}}),C.on("end",function(){K.push(null)}),K._read=function(){while(!0){const $=C.read();if($===null){P=K._read;return}if(!K.push($))return}};return K._destroy=function($,s){if(!$&&A!==null)$=new x;if(P=null,D=null,p=null,A===null)s($);else A=s,y(C,$)},K}}}),lq=$q({"node_modules/readable-stream/lib/stream/promises.js"(t,M){var{ArrayPrototypePop:B,Promise:F}=Wq(),{isIterable:y,isNodeStream:I}=Iq(),{pipelineImpl:j}=fq(),{finished:R}=jq();function x(...g){return new F((f,c)=>{let _,i;const D=g[g.length-1];if(D&&typeof D==="object"&&!I(D)&&!y(D)){const p=B(g);_=p.signal,i=p.end}j(g,(p,P)=>{if(p)c(p);else f(P)},{signal:_,end:i})})}M.exports={finished:R,pipeline:x}}}),YQ=$q({"node_modules/readable-stream/lib/stream.js"(t,M){var{ObjectDefineProperty:B,ObjectKeys:F,ReflectApply:y}=Wq(),{promisify:{custom:I}}=Eq(),{streamReturningOperators:j,promiseReturningOperators:R}=HQ(),{codes:{ERR_ILLEGAL_CONSTRUCTOR:x}}=Mq(),g=BQ(),{pipeline:f}=fq(),{destroyer:c}=Pq(),_=jq(),i=lq(),D=Iq(),p=M.exports=Sq().Stream;p.isDisturbed=D.isDisturbed,p.isErrored=D.isErrored,p.isWritable=D.isWritable,p.isReadable=D.isReadable,p.Readable=Dq();for(let A of F(j)){let K=function(...T){if(new.target)throw x();return p.Readable.from(y(U,this,T))};const U=j[A];B(K,"name",{value:U.name}),B(K,"length",{value:U.length}),B(p.Readable.prototype,A,{value:K,enumerable:!1,configurable:!0,writable:!0})}for(let A of F(R)){let K=function(...T){if(new.target)throw x();return y(U,this,T)};const U=R[A];B(K,"name",{value:U.name}),B(K,"length",{value:U.length}),B(p.Readable.prototype,A,{value:K,enumerable:!1,configurable:!0,writable:!0})}p.Writable=mq(),p.Duplex=Lq(),p.Transform=cq(),p.PassThrough=dq(),p.pipeline=f;var{addAbortSignal:P}=gq();p.addAbortSignal=P,p.finished=_,p.destroy=c,p.compose=g,B(p,"promises",{configurable:!0,enumerable:!0,get(){return i}}),B(f,I,{enumerable:!0,get(){return i.pipeline}}),B(_,I,{enumerable:!0,get(){return i.finished}}),p.Stream=p,p._isUint8Array=function A(K){return K instanceof Uint8Array},p._uint8ArrayToBuffer=function A(K){return new Buffer(K.buffer,K.byteOffset,K.byteLength)}}}),$Q=$q({"node_modules/readable-stream/lib/ours/index.js"(t,M){const B=YQ(),F=lq(),y=B.Readable.destroy;M.exports=B,M.exports._uint8ArrayToBuffer=B._uint8ArrayToBuffer,M.exports._isUint8Array=B._isUint8Array,M.exports.isDisturbed=B.isDisturbed,M.exports.isErrored=B.isErrored,M.exports.isWritable=B.isWritable,M.exports.isReadable=B.isReadable,M.exports.Readable=B.Readable,M.exports.Writable=B.Writable,M.exports.Duplex=B.Duplex,M.exports.Transform=B.Transform,M.exports.PassThrough=B.PassThrough,M.exports.addAbortSignal=B.addAbortSignal,M.exports.finished=B.finished,M.exports.destroy=B.destroy,M.exports.destroy=y,M.exports.pipeline=B.pipeline,M.exports.compose=B.compose,M.exports._getNativeReadableStreamPrototype=iq,M.exports.NativeWritable=nq,Uq.defineProperty(B,"promises",{configurable:!0,enumerable:!0,get(){return F}}),M.exports.Stream=B.Stream,M.exports.default=M.exports}}),VQ={0:void 0,1:void 0,2:void 0,3:void 0,4:void 0,5:void 0},Gq=mq(),nq=class t extends Gq{#q;#Q;#X=!0;_construct;_destroy;_final;constructor(M,B={}){super(B);this._construct=this.#H,this._destroy=this.#K,this._final=this.#Z,this.#q=M}#H(M){this._writableState.constructed=!0,this.constructed=!0,M()}#J(){if(typeof this.#q==="object")if(typeof this.#q.write==="function")this.#Q=this.#q;else throw new Error("Invalid FileSink");else this.#Q=Bun.file(this.#q).writer()}write(M,B,F,y=this.#X){if(!y)return this.#X=!1,super.write(M,B,F);if(!this.#Q)this.#J();var I=this.#Q,j=I.write(M);if(Oq(j))return j.then(()=>{this.emit("drain"),I.flush(!0)}),!1;if(I.flush(!0),F)F(null,M.byteLength);return!0}end(M,B,F,y=this.#X){return super.end(M,B,F,y)}#K(M,B){if(this._writableState.destroyed=!0,B)B(M)}#Z(M){if(this.#Q)this.#Q.end();if(M)M()}ref(){if(!this.#Q)this.#J();this.#Q.ref()}unref(){if(!this.#Q)return;this.#Q.unref()}},zq=$Q();zq[Symbol.for("CommonJS")]=0;zq[Symbol.for("::bunternal::")]={_ReadableFromWeb:uq,_ReadableFromWebForUndici:bq};var lQ=zq,TQ=zq._uint8ArrayToBuffer,PQ=zq._isUint8Array,xQ=zq.isDisturbed,OQ=zq.isErrored,_Q=zq.isWritable,CQ=zq.isReadable,DQ=zq.Readable,Gq=zq.Writable,wQ=zq.Duplex,vQ=zq.Transform,RQ=zq.PassThrough,SQ=zq.addAbortSignal,gQ=zq.finished,fQ=zq.destroy,kQ=zq.pipeline,yQ=zq.compose,WQ=zq.Stream,hQ=zq.eos=jq,pQ=zq._getNativeReadableStreamPrototype,nq=zq.NativeWritable,uQ=WQ.promises;export{uQ as promises,kQ as pipeline,_Q as isWritable,CQ as isReadable,OQ as isErrored,xQ as isDisturbed,gQ as finished,hQ as eos,fQ as destroy,lQ as default,yQ as compose,SQ as addAbortSignal,TQ as _uint8ArrayToBuffer,PQ as _isUint8Array,pQ as _getNativeReadableStreamPrototype,Gq as Writable,vQ as Transform,WQ as Stream,DQ as Readable,RQ as PassThrough,nq as NativeWritable,wQ as Duplex};
+import{EventEmitter as Iq} from"bun:events_native";import{StringDecoder as aq} from"node:string_decoder";var tq=function(a){return typeof a==="object"&&a!==null&&a instanceof ReadableStream},eq=function(a,j){if(typeof a!=="boolean")throw new qQ(j,"boolean",a)};var qQ=function(a,j,B){return new Error(`The argument '${a}' is invalid. Received '${B}' for type '${j}'`)},QQ=function(a,j,B){return new Error(`The value '${j}' is invalid for argument '${a}'. Reason: ${B}`)},YQ=function(a,j){var[B,G,y,A,M,R,P]=globalThis[Symbol.for("Bun.lazy")](a),g=[!1],k=function(E,I,Z,U){if(I>0){const T=Z.subarray(0,I),_=Z.subarray(I);if(T.byteLength>0)E.push(T);if(U)E.push(null);return _.byteLength>0?_:void 0}if(U)E.push(null);return Z},c=function(E,I,Z,U){if(I.byteLength>0)E.push(I);if(U)E.push(null);return Z},O=process.env.BUN_DISABLE_DYNAMIC_CHUNK_SIZE!=="1";const l=new FinalizationRegistry((E)=>E&&M(E)),D=512;var p=class E extends j{#q;#Q=1;#X=!1;#H=void 0;#J;#K=!1;#Z=!O;#B;constructor(I,Z={}){super(Z);if(typeof Z.highWaterMark==="number")this.#J=Z.highWaterMark;else this.#J=262144;this.#q=I,this.#X=!1,this.#H=void 0,this.#K=!1,this.#B={},l.register(this,this.#q,this.#B)}_read(I){if(this.#K)return;var Z=this.#q;if(Z===0){this.push(null);return}if(!this.#X)this.#$(Z);return this.#V(this.#z(I),Z)}#$(I){this.#X=!0;const Z=G(I,this.#J);if(typeof Z==="number"&&Z>1)this.#Z=!0,this.#J=Math.min(this.#J,Z);if(P){const U=P(I);if((U?.byteLength??0)>0)this.push(U)}}#z(I=this.#J){var Z=this.#H;if(Z?.byteLength??0<D){var U=I>D?I:D;this.#H=Z=new Buffer(U)}return Z}push(I,Z){return super.push(...arguments)}#Y(I,Z,U){if(typeof I==="number"){if(I>=this.#J&&!this.#Z&&!U)this.#J*=2,this.#Z=!0;return k(this,I,Z,U)}else if(typeof I==="boolean")return this.push(null),Z?.byteLength??0>0?Z:void 0;else if(ArrayBuffer.isView(I)){if(I.byteLength>=this.#J&&!this.#Z&&!U)this.#J*=2,this.#Z=!0;return c(this,I,Z,U)}else throw new Error("Invalid result from pull")}#V(I,Z){g[0]=!1;var U=B(Z,I,g);if(xq(U))return this.#K=!0,U.then((T)=>{this.#K=!1,this.#H=this.#Y(T,I,g[0])},(T)=>{errorOrDestroy(this,T)});else this.#H=this.#Y(U,I,g[0])}_destroy(I,Z){var U=this.#q;if(U===0){Z(I);return}if(l.unregister(this.#B),this.#q=0,R)R(U,!1);y(U,I),Z(I)}ref(){var I=this.#q;if(I===0)return;if(this.#Q++===0)R(I,!0)}unref(){var I=this.#q;if(I===0)return;if(this.#Q--===1)R(I,!1)}};if(!R)p.prototype.ref=void 0,p.prototype.unref=void 0;return p},lq=function(a,j){return $Q[a]||=YQ(a,j)},zQ=function(a,j,B){if(!(j&&typeof j==="object"&&j instanceof ReadableStream))return;const G=sq(j);if(!G){Gq("no native readable stream");return}const{stream:y,data:A}=G;return new(lq(A,a))(y,B)};var Gq=()=>{},{isPromise:xq,isCallable:oq,direct:sq,Object:zq}=globalThis[Symbol.for("Bun.lazy")]("primordials"),GQ=zq.create,MQ=zq.defineProperty,FQ=zq.getOwnPropertyDescriptor,rq=zq.getOwnPropertyNames,LQ=zq.getPrototypeOf,jQ=zq.prototype.hasOwnProperty,NQ=zq.setPrototypeOf,Bq=(a,j)=>function B(){return j||(0,a[rq(a)[0]])((j={exports:{}}).exports,j),j.exports};var Xq=process.nextTick;var AQ=Array.isArray,Vq=Bq({"node_modules/readable-stream/lib/ours/primordials.js"(a,j){j.exports={ArrayIsArray(B){return Array.isArray(B)},ArrayPrototypeIncludes(B,G){return B.includes(G)},ArrayPrototypeIndexOf(B,G){return B.indexOf(G)},ArrayPrototypeJoin(B,G){return B.join(G)},ArrayPrototypeMap(B,G){return B.map(G)},ArrayPrototypePop(B,G){return B.pop(G)},ArrayPrototypePush(B,G){return B.push(G)},ArrayPrototypeSlice(B,G,y){return B.slice(G,y)},Error,FunctionPrototypeCall(B,G,...y){return B.call(G,...y)},FunctionPrototypeSymbolHasInstance(B,G){return Function.prototype[Symbol.hasInstance].call(B,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(B,G){return zq.defineProperties(B,G)},ObjectDefineProperty(B,G,y){return zq.defineProperty(B,G,y)},ObjectGetOwnPropertyDescriptor(B,G){return zq.getOwnPropertyDescriptor(B,G)},ObjectKeys(B){return zq.keys(B)},ObjectSetPrototypeOf(B,G){return zq.setPrototypeOf(B,G)},Promise,PromisePrototypeCatch(B,G){return B.catch(G)},PromisePrototypeThen(B,G,y){return B.then(G,y)},PromiseReject(B){return Promise.reject(B)},ReflectApply:Reflect.apply,RegExpPrototypeTest(B,G){return B.test(G)},SafeSet:Set,String,StringPrototypeSlice(B,G,y){return B.slice(G,y)},StringPrototypeToLowerCase(B){return B.toLowerCase()},StringPrototypeToUpperCase(B){return B.toUpperCase()},StringPrototypeTrim(B){return B.trim()},Symbol,SymbolAsyncIterator:Symbol.asyncIterator,SymbolHasInstance:Symbol.hasInstance,SymbolIterator:Symbol.iterator,TypedArrayPrototypeSet(B,G,y){return B.set(G,y)},Uint8Array}}}),Aq=Bq({"node_modules/readable-stream/lib/ours/util.js"(a,j){var B=zq.getPrototypeOf(async function(){}).constructor,G=typeof Blob!=="undefined"?function A(M){return M instanceof Blob}:function A(M){return!1},y=class extends Error{constructor(A){if(!Array.isArray(A))throw new TypeError(`Expected input to be an Array, got ${typeof A}`);let M="";for(let R=0;R<A.length;R++)M+=` ${A[R].stack}
+`;super(M);this.name="AggregateError",this.errors=A}};j.exports={AggregateError:y,once(A){let M=!1;return function(...R){if(M)return;M=!0,A.apply(this,R)}},createDeferredPromise:function(){let A,M;return{promise:new Promise((P,g)=>{A=P,M=g}),resolve:A,reject:M}},promisify(A){return new Promise((M,R)=>{A((P,...g)=>{if(P)return R(P);return M(...g)})})},debuglog(){return function(){}},format(A,...M){return A.replace(/%([sdifj])/g,function(...[R,P]){const g=M.shift();if(P==="f")return g.toFixed(6);else if(P==="j")return JSON.stringify(g);else if(P==="s"&&typeof g==="object")return`${g.constructor!==zq?g.constructor.name:""} {}`.trim();else return g.toString()})},inspect(A){switch(typeof A){case"string":if(A.includes("'")){if(!A.includes('"'))return`"${A}"`;else if(!A.includes("`")&&!A.includes("${"))return`\`${A}\``}return`'${A}'`;case"number":if(isNaN(A))return"NaN";else if(zq.is(A,-0))return String(A);return A;case"bigint":return`${String(A)}n`;case"boolean":case"undefined":return String(A);case"object":return"{}"}},types:{isAsyncFunction(A){return A instanceof B},isArrayBufferView(A){return ArrayBuffer.isView(A)}},isBlob:G},j.exports.promisify.custom=Symbol.for("nodejs.util.promisify.custom")}}),Wq=Bq({"node_modules/readable-stream/lib/ours/errors.js"(a,j){var{format:B,inspect:G,AggregateError:y}=Aq(),A=globalThis.AggregateError||y,M=Symbol("kIsNodeError"),R=["string","function","number","object","Function","Object","boolean","bigint","symbol"],P=/^([A-Z][a-z0-9]*)+$/,g="__node_internal_",k={};function c(Z,U){if(!Z)throw new k.ERR_INTERNAL_ASSERTION(U)}function O(Z){let U="",T=Z.length;const _=Z[0]==="-"?1:0;for(;T>=_+4;T-=3)U=`_${Z.slice(T-3,T)}${U}`;return`${Z.slice(0,T)}${U}`}function l(Z,U,T){if(typeof U==="function")return c(U.length<=T.length,`Code: ${Z}; The provided arguments length (${T.length}) does not match the required ones (${U.length}).`),U(...T);const _=(U.match(/%[dfijoOs]/g)||[]).length;if(c(_===T.length,`Code: ${Z}; The provided arguments length (${T.length}) does not match the required ones (${_}).`),T.length===0)return U;return B(U,...T)}function D(Z,U,T){if(!T)T=Error;class _ extends T{constructor(...t){super(l(Z,U,t))}toString(){return`${this.name} [${Z}]: ${this.message}`}}zq.defineProperties(_.prototype,{name:{value:T.name,writable:!0,enumerable:!1,configurable:!0},toString:{value(){return`${this.name} [${Z}]: ${this.message}`},writable:!0,enumerable:!1,configurable:!0}}),_.prototype.code=Z,_.prototype[M]=!0,k[Z]=_}function p(Z){const U=g+Z.name;return zq.defineProperty(Z,"name",{value:U}),Z}function E(Z,U){if(Z&&U&&Z!==U){if(Array.isArray(U.errors))return U.errors.push(Z),U;const T=new A([U,Z],U.message);return T.code=U.code,T}return Z||U}var I=class extends Error{constructor(Z="The operation was aborted",U=void 0){if(U!==void 0&&typeof U!=="object")throw new k.ERR_INVALID_ARG_TYPE("options","Object",U);super(Z,U);this.code="ABORT_ERR",this.name="AbortError"}};D("ERR_ASSERTION","%s",Error),D("ERR_INVALID_ARG_TYPE",(Z,U,T)=>{if(c(typeof Z==="string","'name' must be a string"),!Array.isArray(U))U=[U];let _="The ";if(Z.endsWith(" argument"))_+=`${Z} `;else _+=`"${Z}" ${Z.includes(".")?"property":"argument"} `;_+="must be ";const t=[],i=[],$=[];for(let Y of U)if(c(typeof Y==="string","All expected entries have to be of type string"),R.includes(Y))t.push(Y.toLowerCase());else if(P.test(Y))i.push(Y);else c(Y!=="object",'The value "object" should be written as "Object"'),$.push(Y);if(i.length>0){const Y=t.indexOf("object");if(Y!==-1)t.splice(t,Y,1),i.push("Object")}if(t.length>0){switch(t.length){case 1:_+=`of type ${t[0]}`;break;case 2:_+=`one of type ${t[0]} or ${t[1]}`;break;default:{const Y=t.pop();_+=`one of type ${t.join(", ")}, or ${Y}`}}if(i.length>0||$.length>0)_+=" or "}if(i.length>0){switch(i.length){case 1:_+=`an instance of ${i[0]}`;break;case 2:_+=`an instance of ${i[0]} or ${i[1]}`;break;default:{const Y=i.pop();_+=`an instance of ${i.join(", ")}, or ${Y}`}}if($.length>0)_+=" or "}switch($.length){case 0:break;case 1:if($[0].toLowerCase()!==$[0])_+="an ";_+=`${$[0]}`;break;case 2:_+=`one of ${$[0]} or ${$[1]}`;break;default:{const Y=$.pop();_+=`one of ${$.join(", ")}, or ${Y}`}}if(T==null)_+=`. Received ${T}`;else if(typeof T==="function"&&T.name)_+=`. Received function ${T.name}`;else if(typeof T==="object"){var n;if((n=T.constructor)!==null&&n!==void 0&&n.name)_+=`. Received an instance of ${T.constructor.name}`;else{const Y=G(T,{depth:-1});_+=`. Received ${Y}`}}else{let Y=G(T,{colors:!1});if(Y.length>25)Y=`${Y.slice(0,25)}...`;_+=`. Received type ${typeof T} (${Y})`}return _},TypeError),D("ERR_INVALID_ARG_VALUE",(Z,U,T="is invalid")=>{let _=G(U);if(_.length>128)_=_.slice(0,128)+"...";return`The ${Z.includes(".")?"property":"argument"} '${Z}' ${T}. Received ${_}`},TypeError),D("ERR_INVALID_RETURN_VALUE",(Z,U,T)=>{var _;const t=T!==null&&T!==void 0&&(_=T.constructor)!==null&&_!==void 0&&_.name?`instance of ${T.constructor.name}`:`type ${typeof T}`;return`Expected ${Z} to be returned from the "${U}" function but got ${t}.`},TypeError),D("ERR_MISSING_ARGS",(...Z)=>{c(Z.length>0,"At least one arg needs to be specified");let U;const T=Z.length;switch(Z=(Array.isArray(Z)?Z:[Z]).map((_)=>`"${_}"`).join(" or "),T){case 1:U+=`The ${Z[0]} argument`;break;case 2:U+=`The ${Z[0]} and ${Z[1]} arguments`;break;default:{const _=Z.pop();U+=`The ${Z.join(", ")}, and ${_} arguments`}break}return`${U} must be specified`},TypeError),D("ERR_OUT_OF_RANGE",(Z,U,T)=>{c(U,'Missing "range" argument');let _;if(Number.isInteger(T)&&Math.abs(T)>4294967296)_=O(String(T));else if(typeof T==="bigint"){if(_=String(T),T>2n**32n||T<-(2n**32n))_=O(_);_+="n"}else _=G(T);return`The value of "${Z}" is out of range. It must be ${U}. Received ${_}`},RangeError),D("ERR_MULTIPLE_CALLBACK","Callback called multiple times",Error),D("ERR_METHOD_NOT_IMPLEMENTED","The %s method is not implemented",Error),D("ERR_STREAM_ALREADY_FINISHED","Cannot call %s after a stream was finished",Error),D("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable",Error),D("ERR_STREAM_DESTROYED","Cannot call %s after a stream was destroyed",Error),D("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),D("ERR_STREAM_PREMATURE_CLOSE","Premature close",Error),D("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF",Error),D("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event",Error),D("ERR_STREAM_WRITE_AFTER_END","write after end",Error),D("ERR_UNKNOWN_ENCODING","Unknown encoding: %s",TypeError),j.exports={AbortError:I,aggregateTwoErrors:p(E),hideStackFrames:p,codes:k}}}),Cq=Bq({"node_modules/readable-stream/lib/internal/validators.js"(a,j){var{ArrayIsArray:B,ArrayPrototypeIncludes:G,ArrayPrototypeJoin:y,ArrayPrototypeMap:A,NumberIsInteger:M,NumberMAX_SAFE_INTEGER:R,NumberMIN_SAFE_INTEGER:P,NumberParseInt:g,RegExpPrototypeTest:k,String:c,StringPrototypeToUpperCase:O,StringPrototypeTrim:l}=Vq(),{hideStackFrames:D,codes:{ERR_SOCKET_BAD_PORT:p,ERR_INVALID_ARG_TYPE:E,ERR_INVALID_ARG_VALUE:I,ERR_OUT_OF_RANGE:Z,ERR_UNKNOWN_SIGNAL:U}}=Wq(),{normalizeEncoding:T}=Aq(),{isAsyncFunction:_,isArrayBufferView:t}=Aq().types,i={};function $(V){return V===(V|0)}function n(V){return V===V>>>0}var Y=/^[0-7]+$/,K="must be a 32-bit unsigned integer or an octal string";function F(V,h,Q){if(typeof V==="undefined")V=Q;if(typeof V==="string"){if(!k(Y,V))throw new I(h,V,K);V=g(V,8)}return u(V,h,0,4294967295),V}var m=D((V,h,Q=P,H=R)=>{if(typeof V!=="number")throw new E(h,"number",V);if(!M(V))throw new Z(h,"an integer",V);if(V<Q||V>H)throw new Z(h,`>= ${Q} && <= ${H}`,V)}),u=D((V,h,Q=-2147483648,H=2147483647)=>{if(typeof V!=="number")throw new E(h,"number",V);if(!$(V)){if(!M(V))throw new Z(h,"an integer",V);throw new Z(h,`>= ${Q} && <= ${H}`,V)}if(V<Q||V>H)throw new Z(h,`>= ${Q} && <= ${H}`,V)}),J=D((V,h,Q)=>{if(typeof V!=="number")throw new E(h,"number",V);if(!n(V)){if(!M(V))throw new Z(h,"an integer",V);throw new Z(h,`>= ${Q?1:0} && < 4294967296`,V)}if(Q&&V===0)throw new Z(h,">= 1 && < 4294967296",V)});function z(V,h){if(typeof V!=="string")throw new E(h,"string",V)}function w(V,h){if(typeof V!=="number")throw new E(h,"number",V)}var S=D((V,h,Q)=>{if(!G(Q,V)){const L="must be one of: "+y(A(Q,(d)=>typeof d==="string"?`'${d}'`:c(d)),", ");throw new I(h,V,L)}});function N(V,h){if(typeof V!=="boolean")throw new E(h,"boolean",V)}var W=D((V,h,Q)=>{const H=Q==null,L=H?!1:Q.allowArray,d=H?!1:Q.allowFunction;if(!(H?!1:Q.nullable)&&V===null||!L&&B(V)||typeof V!=="object"&&(!d||typeof V!=="function"))throw new E(h,"Object",V)}),b=D((V,h,Q=0)=>{if(!B(V))throw new E(h,"Array",V);if(V.length<Q){const H=`must be longer than ${Q}`;throw new I(h,V,H)}});function o(V,h="signal"){if(z(V,h),i[V]===void 0){if(i[O(V)]!==void 0)throw new U(V+" (signals must use all capital letters)");throw new U(V)}}var s=D((V,h="buffer")=>{if(!t(V))throw new E(h,["Buffer","TypedArray","DataView"],V)});function e(V,h){const Q=T(h),H=V.length;if(Q==="hex"&&H%2!==0)throw new I("encoding",h,`is invalid for data of length ${H}`)}function Hq(V,h="Port",Q=!0){if(typeof V!=="number"&&typeof V!=="string"||typeof V==="string"&&l(V).length===0||+V!==+V>>>0||V>65535||V===0&&!Q)throw new p(h,V,Q);return V|0}var $q=D((V,h)=>{if(V!==void 0&&(V===null||typeof V!=="object"||!("aborted"in V)))throw new E(h,"AbortSignal",V)}),qq=D((V,h)=>{if(typeof V!=="function")throw new E(h,"Function",V)}),Kq=D((V,h)=>{if(typeof V!=="function"||_(V))throw new E(h,"Function",V)}),Qq=D((V,h)=>{if(V!==void 0)throw new E(h,"undefined",V)});j.exports={isInt32:$,isUint32:n,parseFileMode:F,validateArray:b,validateBoolean:N,validateBuffer:s,validateEncoding:e,validateFunction:qq,validateInt32:u,validateInteger:m,validateNumber:w,validateObject:W,validateOneOf:S,validatePlainFunction:Kq,validatePort:Hq,validateSignalName:o,validateString:z,validateUint32:J,validateUndefined:Qq,validateAbortSignal:$q}}}),Eq=Bq({"node_modules/readable-stream/lib/internal/streams/utils.js"(a,j){var{Symbol:B,SymbolAsyncIterator:G,SymbolIterator:y}=Vq(),A=B("kDestroyed"),M=B("kIsErrored"),R=B("kIsReadable"),P=B("kIsDisturbed");function g(J,z=!1){var w;return!!(J&&typeof J.pipe==="function"&&typeof J.on==="function"&&(!z||typeof J.pause==="function"&&typeof J.resume==="function")&&(!J._writableState||((w=J._readableState)===null||w===void 0?void 0:w.readable)!==!1)&&(!J._writableState||J._readableState))}function k(J){var z;return!!(J&&typeof J.write==="function"&&typeof J.on==="function"&&(!J._readableState||((z=J._writableState)===null||z===void 0?void 0:z.writable)!==!1))}function c(J){return!!(J&&typeof J.pipe==="function"&&J._readableState&&typeof J.on==="function"&&typeof J.write==="function")}function O(J){return J&&(J._readableState||J._writableState||typeof J.write==="function"&&typeof J.on==="function"||typeof J.pipe==="function"&&typeof J.on==="function")}function l(J,z){if(J==null)return!1;if(z===!0)return typeof J[G]==="function";if(z===!1)return typeof J[y]==="function";return typeof J[G]==="function"||typeof J[y]==="function"}function D(J){if(!O(J))return null;const{_writableState:z,_readableState:w}=J,S=z||w;return!!(J.destroyed||J[A]||S!==null&&S!==void 0&&S.destroyed)}function p(J){if(!k(J))return null;if(J.writableEnded===!0)return!0;const z=J._writableState;if(z!==null&&z!==void 0&&z.errored)return!1;if(typeof(z===null||z===void 0?void 0:z.ended)!=="boolean")return null;return z.ended}function E(J,z){if(!k(J))return null;if(J.writableFinished===!0)return!0;const w=J._writableState;if(w!==null&&w!==void 0&&w.errored)return!1;if(typeof(w===null||w===void 0?void 0:w.finished)!=="boolean")return null;return!!(w.finished||z===!1&&w.ended===!0&&w.length===0)}function I(J){if(!g(J))return null;if(J.readableEnded===!0)return!0;const z=J._readableState;if(!z||z.errored)return!1;if(typeof(z===null||z===void 0?void 0:z.ended)!=="boolean")return null;return z.ended}function Z(J,z){if(!g(J))return null;const w=J._readableState;if(w!==null&&w!==void 0&&w.errored)return!1;if(typeof(w===null||w===void 0?void 0:w.endEmitted)!=="boolean")return null;return!!(w.endEmitted||z===!1&&w.ended===!0&&w.length===0)}function U(J){if(J&&J[R]!=null)return J[R];if(typeof(J===null||J===void 0?void 0:J.readable)!=="boolean")return null;if(D(J))return!1;return g(J)&&J.readable&&!Z(J)}function T(J){if(typeof(J===null||J===void 0?void 0:J.writable)!=="boolean")return null;if(D(J))return!1;return k(J)&&J.writable&&!p(J)}function _(J,z){if(!O(J))return null;if(D(J))return!0;if((z===null||z===void 0?void 0:z.readable)!==!1&&U(J))return!1;if((z===null||z===void 0?void 0:z.writable)!==!1&&T(J))return!1;return!0}function t(J){var z,w;if(!O(J))return null;if(J.writableErrored)return J.writableErrored;return(z=(w=J._writableState)===null||w===void 0?void 0:w.errored)!==null&&z!==void 0?z:null}function i(J){var z,w;if(!O(J))return null;if(J.readableErrored)return J.readableErrored;return(z=(w=J._readableState)===null||w===void 0?void 0:w.errored)!==null&&z!==void 0?z:null}function $(J){if(!O(J))return null;if(typeof J.closed==="boolean")return J.closed;const{_writableState:z,_readableState:w}=J;if(typeof(z===null||z===void 0?void 0:z.closed)==="boolean"||typeof(w===null||w===void 0?void 0:w.closed)==="boolean")return(z===null||z===void 0?void 0:z.closed)||(w===null||w===void 0?void 0:w.closed);if(typeof J._closed==="boolean"&&n(J))return J._closed;return null}function n(J){return typeof J._closed==="boolean"&&typeof J._defaultKeepAlive==="boolean"&&typeof J._removedConnection==="boolean"&&typeof J._removedContLen==="boolean"}function Y(J){return typeof J._sent100==="boolean"&&n(J)}function K(J){var z;return typeof J._consuming==="boolean"&&typeof J._dumped==="boolean"&&((z=J.req)===null||z===void 0?void 0:z.upgradeOrConnect)===void 0}function F(J){if(!O(J))return null;const{_writableState:z,_readableState:w}=J,S=z||w;return!S&&Y(J)||!!(S&&S.autoDestroy&&S.emitClose&&S.closed===!1)}function m(J){var z;return!!(J&&((z=J[P])!==null&&z!==void 0?z:J.readableDidRead||J.readableAborted))}function u(J){var z,w,S,N,W,b,o,s,e,Hq;return!!(J&&((z=(w=(S=(N=(W=(b=J[M])!==null&&b!==void 0?b:J.readableErrored)!==null&&W!==void 0?W:J.writableErrored)!==null&&N!==void 0?N:(o=J._readableState)===null||o===void 0?void 0:o.errorEmitted)!==null&&S!==void 0?S:(s=J._writableState)===null||s===void 0?void 0:s.errorEmitted)!==null&&w!==void 0?w:(e=J._readableState)===null||e===void 0?void 0:e.errored)!==null&&z!==void 0?z:(Hq=J._writableState)===null||Hq===void 0?void 0:Hq.errored))}j.exports={kDestroyed:A,isDisturbed:m,kIsDisturbed:P,isErrored:u,kIsErrored:M,isReadable:U,kIsReadable:R,isClosed:$,isDestroyed:D,isDuplexNodeStream:c,isFinished:_,isIterable:l,isReadableNodeStream:g,isReadableEnded:I,isReadableFinished:Z,isReadableErrored:i,isNodeStream:O,isWritable:T,isWritableNodeStream:k,isWritableEnded:p,isWritableFinished:E,isWritableErrored:t,isServerRequest:K,isServerResponse:Y,willEmitClose:F}}}),Fq=Bq({"node_modules/readable-stream/lib/internal/streams/end-of-stream.js"(a,j){var{AbortError:B,codes:G}=Wq(),{ERR_INVALID_ARG_TYPE:y,ERR_STREAM_PREMATURE_CLOSE:A}=G,{once:M}=Aq(),{validateAbortSignal:R,validateFunction:P,validateObject:g}=Cq(),{Promise:k}=Vq(),{isClosed:c,isReadable:O,isReadableNodeStream:l,isReadableFinished:D,isReadableErrored:p,isWritable:E,isWritableNodeStream:I,isWritableFinished:Z,isWritableErrored:U,isNodeStream:T,willEmitClose:_}=Eq();function t(Y){return Y.setHeader&&typeof Y.abort==="function"}var i=()=>{};function $(Y,K,F){var m,u;if(arguments.length===2)F=K,K={};else if(K==null)K={};else g(K,"options");P(F,"callback"),R(K.signal,"options.signal"),F=M(F);const J=(m=K.readable)!==null&&m!==void 0?m:l(Y),z=(u=K.writable)!==null&&u!==void 0?u:I(Y);if(!T(Y))throw new y("stream","Stream",Y);const{_writableState:w,_readableState:S}=Y,N=()=>{if(!Y.writable)o()};let W=_(Y)&&l(Y)===J&&I(Y)===z,b=Z(Y,!1);const o=()=>{if(b=!0,Y.destroyed)W=!1;if(W&&(!Y.readable||J))return;if(!J||s)F.call(Y)};let s=D(Y,!1);const e=()=>{if(s=!0,Y.destroyed)W=!1;if(W&&(!Y.writable||z))return;if(!z||b)F.call(Y)},Hq=(V)=>{F.call(Y,V)};let $q=c(Y);const qq=()=>{$q=!0;const V=U(Y)||p(Y);if(V&&typeof V!=="boolean")return F.call(Y,V);if(J&&!s&&l(Y,!0)){if(!D(Y,!1))return F.call(Y,new A)}if(z&&!b){if(!Z(Y,!1))return F.call(Y,new A)}F.call(Y)},Kq=()=>{Y.req.on("finish",o)};if(t(Y)){if(Y.on("complete",o),!W)Y.on("abort",qq);if(Y.req)Kq();else Y.on("request",Kq)}else if(z&&!w)Y.on("end",N),Y.on("close",N);if(!W&&typeof Y.aborted==="boolean")Y.on("aborted",qq);if(Y.on("end",e),Y.on("finish",o),K.error!==!1)Y.on("error",Hq);if(Y.on("close",qq),$q)Xq(qq);else if(w!==null&&w!==void 0&&w.errorEmitted||S!==null&&S!==void 0&&S.errorEmitted){if(!W)Xq(qq)}else if(!J&&(!W||O(Y))&&(b||E(Y)===!1))Xq(qq);else if(!z&&(!W||E(Y))&&(s||O(Y)===!1))Xq(qq);else if(S&&Y.req&&Y.aborted)Xq(qq);const Qq=()=>{if(F=i,Y.removeListener("aborted",qq),Y.removeListener("complete",o),Y.removeListener("abort",qq),Y.removeListener("request",Kq),Y.req)Y.req.removeListener("finish",o);Y.removeListener("end",N),Y.removeListener("close",N),Y.removeListener("finish",o),Y.removeListener("end",e),Y.removeListener("error",Hq),Y.removeListener("close",qq)};if(K.signal&&!$q){const V=()=>{const h=F;Qq(),h.call(Y,new B(void 0,{cause:K.signal.reason}))};if(K.signal.aborted)Xq(V);else{const h=F;F=M((...Q)=>{K.signal.removeEventListener("abort",V),h.apply(Y,Q)}),K.signal.addEventListener("abort",V)}}return Qq}function n(Y,K){return new k((F,m)=>{$(Y,K,(u)=>{if(u)m(u);else F()})})}j.exports=$,j.exports.finished=n}}),XQ=Bq({"node_modules/readable-stream/lib/internal/streams/operators.js"(a,j){var{codes:{ERR_INVALID_ARG_TYPE:B,ERR_MISSING_ARGS:G,ERR_OUT_OF_RANGE:y},AbortError:A}=Wq(),{validateAbortSignal:M,validateInteger:R,validateObject:P}=Cq(),g=Vq().Symbol("kWeak"),{finished:k}=Fq(),{ArrayPrototypePush:c,MathFloor:O,Number:l,NumberIsNaN:D,Promise:p,PromiseReject:E,PromisePrototypeCatch:I,Symbol:Z}=Vq(),U=Z("kEmpty"),T=Z("kEof");function _(N,W){if(typeof N!=="function")throw new B("fn",["Function","AsyncFunction"],N);if(W!=null)P(W,"options");if((W===null||W===void 0?void 0:W.signal)!=null)M(W.signal,"options.signal");let b=1;if((W===null||W===void 0?void 0:W.concurrency)!=null)b=O(W.concurrency);return R(b,"concurrency",1),async function*o(){var s,e;const Hq=new AbortController,$q=this,qq=[],Kq=Hq.signal,Qq={signal:Kq},V=()=>Hq.abort();if(W!==null&&W!==void 0&&(s=W.signal)!==null&&s!==void 0&&s.aborted)V();W===null||W===void 0||(e=W.signal)===null||e===void 0||e.addEventListener("abort",V);let h,Q,H=!1;function L(){H=!0}async function d(){try{for await(let q of $q){var f;if(H)return;if(Kq.aborted)throw new A;try{q=N(q,Qq)}catch(X){q=E(X)}if(q===U)continue;if(typeof((f=q)===null||f===void 0?void 0:f.catch)==="function")q.catch(L);if(qq.push(q),h)h(),h=null;if(!H&&qq.length&&qq.length>=b)await new p((X)=>{Q=X})}qq.push(T)}catch(q){const X=E(q);I(X,L),qq.push(X)}finally{var r;if(H=!0,h)h(),h=null;W===null||W===void 0||(r=W.signal)===null||r===void 0||r.removeEventListener("abort",V)}}d();try{while(!0){while(qq.length>0){const f=await qq[0];if(f===T)return;if(Kq.aborted)throw new A;if(f!==U)yield f;if(qq.shift(),Q)Q(),Q=null}await new p((f)=>{h=f})}}finally{if(Hq.abort(),H=!0,Q)Q(),Q=null}}.call(this)}function t(N=void 0){if(N!=null)P(N,"options");if((N===null||N===void 0?void 0:N.signal)!=null)M(N.signal,"options.signal");return async function*W(){let b=0;for await(let s of this){var o;if(N!==null&&N!==void 0&&(o=N.signal)!==null&&o!==void 0&&o.aborted)throw new A({cause:N.signal.reason});yield[b++,s]}}.call(this)}async function i(N,W=void 0){for await(let b of K.call(this,N,W))return!0;return!1}async function $(N,W=void 0){if(typeof N!=="function")throw new B("fn",["Function","AsyncFunction"],N);return!await i.call(this,async(...b)=>{return!await N(...b)},W)}async function n(N,W){for await(let b of K.call(this,N,W))return b;return}async function Y(N,W){if(typeof N!=="function")throw new B("fn",["Function","AsyncFunction"],N);async function b(o,s){return await N(o,s),U}for await(let o of _.call(this,b,W));}function K(N,W){if(typeof N!=="function")throw new B("fn",["Function","AsyncFunction"],N);async function b(o,s){if(await N(o,s))return o;return U}return _.call(this,b,W)}var F=class extends G{constructor(){super("reduce");this.message="Reduce of an empty stream requires an initial value"}};async function m(N,W,b){var o;if(typeof N!=="function")throw new B("reducer",["Function","AsyncFunction"],N);if(b!=null)P(b,"options");if((b===null||b===void 0?void 0:b.signal)!=null)M(b.signal,"options.signal");let s=arguments.length>1;if(b!==null&&b!==void 0&&(o=b.signal)!==null&&o!==void 0&&o.aborted){const Kq=new A(void 0,{cause:b.signal.reason});throw this.once("error",()=>{}),await k(this.destroy(Kq)),Kq}const e=new AbortController,Hq=e.signal;if(b!==null&&b!==void 0&&b.signal){const Kq={once:!0,[g]:this};b.signal.addEventListener("abort",()=>e.abort(),Kq)}let $q=!1;try{for await(let Kq of this){var qq;if($q=!0,b!==null&&b!==void 0&&(qq=b.signal)!==null&&qq!==void 0&&qq.aborted)throw new A;if(!s)W=Kq,s=!0;else W=await N(W,Kq,{signal:Hq})}if(!$q&&!s)throw new F}finally{e.abort()}return W}async function u(N){if(N!=null)P(N,"options");if((N===null||N===void 0?void 0:N.signal)!=null)M(N.signal,"options.signal");const W=[];for await(let o of this){var b;if(N!==null&&N!==void 0&&(b=N.signal)!==null&&b!==void 0&&b.aborted)throw new A(void 0,{cause:N.signal.reason});c(W,o)}return W}function J(N,W){const b=_.call(this,N,W);return async function*o(){for await(let s of b)yield*s}.call(this)}function z(N){if(N=l(N),D(N))return 0;if(N<0)throw new y("number",">= 0",N);return N}function w(N,W=void 0){if(W!=null)P(W,"options");if((W===null||W===void 0?void 0:W.signal)!=null)M(W.signal,"options.signal");return N=z(N),async function*b(){var o;if(W!==null&&W!==void 0&&(o=W.signal)!==null&&o!==void 0&&o.aborted)throw new A;for await(let e of this){var s;if(W!==null&&W!==void 0&&(s=W.signal)!==null&&s!==void 0&&s.aborted)throw new A;if(N--<=0)yield e}}.call(this)}function S(N,W=void 0){if(W!=null)P(W,"options");if((W===null||W===void 0?void 0:W.signal)!=null)M(W.signal,"options.signal");return N=z(N),async function*b(){var o;if(W!==null&&W!==void 0&&(o=W.signal)!==null&&o!==void 0&&o.aborted)throw new A;for await(let e of this){var s;if(W!==null&&W!==void 0&&(s=W.signal)!==null&&s!==void 0&&s.aborted)throw new A;if(N-- >0)yield e;else return}}.call(this)}j.exports.streamReturningOperators={asIndexedPairs:t,drop:w,filter:K,flatMap:J,map:_,take:S},j.exports.promiseReturningOperators={every:$,forEach:Y,reduce:m,toArray:u,some:i,find:n}}}),Tq=Bq({"node_modules/readable-stream/lib/internal/streams/destroy.js"(a,j){var{aggregateTwoErrors:B,codes:{ERR_MULTIPLE_CALLBACK:G},AbortError:y}=Wq(),{Symbol:A}=Vq(),{kDestroyed:M,isDestroyed:R,isFinished:P,isServerRequest:g}=Eq(),k="#kDestroy",c="#kConstruct";function O(K,F,m){if(K){if(K.stack,F&&!F.errored)F.errored=K;if(m&&!m.errored)m.errored=K}}function l(K,F){const m=this._readableState,u=this._writableState,J=u||m;if(u&&u.destroyed||m&&m.destroyed){if(typeof F==="function")F();return this}if(O(K,u,m),u)u.destroyed=!0;if(m)m.destroyed=!0;if(!J.constructed)this.once(k,(z)=>{D(this,B(z,K),F)});else D(this,K,F);return this}function D(K,F,m){let u=!1;function J(z){if(u)return;u=!0;const{_readableState:w,_writableState:S}=K;if(O(z,S,w),S)S.closed=!0;if(w)w.closed=!0;if(typeof m==="function")m(z);if(z)Xq(p,K,z);else Xq(E,K)}try{K._destroy(F||null,J)}catch(z){J(z)}}function p(K,F){I(K,F),E(K)}function E(K){const{_readableState:F,_writableState:m}=K;if(m)m.closeEmitted=!0;if(F)F.closeEmitted=!0;if(m&&m.emitClose||F&&F.emitClose)K.emit("close")}function I(K,F){const m=K?._readableState,u=K?._writableState;if(u?.errorEmitted||m?.errorEmitted)return;if(u)u.errorEmitted=!0;if(m)m.errorEmitted=!0;K?.emit?.("error",F)}function Z(){const K=this._readableState,F=this._writableState;if(K)K.constructed=!0,K.closed=!1,K.closeEmitted=!1,K.destroyed=!1,K.errored=null,K.errorEmitted=!1,K.reading=!1,K.ended=K.readable===!1,K.endEmitted=K.readable===!1;if(F)F.constructed=!0,F.destroyed=!1,F.closed=!1,F.closeEmitted=!1,F.errored=null,F.errorEmitted=!1,F.finalCalled=!1,F.prefinished=!1,F.ended=F.writable===!1,F.ending=F.writable===!1,F.finished=F.writable===!1}function U(K,F,m){const u=K?._readableState,J=K?._writableState;if(J&&J.destroyed||u&&u.destroyed)return this;if(u&&u.autoDestroy||J&&J.autoDestroy)K.destroy(F);else if(F){if(Error.captureStackTrace(F),J&&!J.errored)J.errored=F;if(u&&!u.errored)u.errored=F;if(m)Xq(I,K,F);else I(K,F)}}function T(K,F){if(typeof K._construct!=="function")return;const{_readableState:m,_writableState:u}=K;if(m)m.constructed=!1;if(u)u.constructed=!1;if(K.once(c,F),K.listenerCount(c)>1)return;Xq(_,K)}function _(K){let F=!1;function m(u){if(F){U(K,u!==null&&u!==void 0?u:new G);return}F=!0;const{_readableState:J,_writableState:z}=K,w=z||J;if(J)J.constructed=!0;if(z)z.constructed=!0;if(w.destroyed)K.emit(k,u);else if(u)U(K,u,!0);else Xq(t,K)}try{K._construct(m)}catch(u){m(u)}}function t(K){K.emit(c)}function i(K){return K&&K.setHeader&&typeof K.abort==="function"}function $(K){K.emit("close")}function n(K,F){K.emit("error",F),Xq($,K)}function Y(K,F){if(!K||R(K))return;if(!F&&!P(K))F=new y;if(g(K))K.socket=null,K.destroy(F);else if(i(K))K.abort();else if(i(K.req))K.req.abort();else if(typeof K.destroy==="function")K.destroy(F);else if(typeof K.close==="function")K.close();else if(F)Xq(n,K);else Xq($,K);if(!K.destroyed)K[M]=!0}j.exports={construct:T,destroyer:Y,destroy:l,undestroy:Z,errorOrDestroy:U}}}),Rq=Bq({"node_modules/readable-stream/lib/internal/streams/legacy.js"(a,j){var{ArrayIsArray:B,ObjectSetPrototypeOf:G}=Vq();function y(M){if(!(this instanceof y))return new y(M);Iq.call(this,M)}G(y.prototype,Iq.prototype),G(y,Iq),y.prototype.pipe=function(M,R){const P=this;function g(E){if(M.writable&&M.write(E)===!1&&P.pause)P.pause()}P.on("data",g);function k(){if(P.readable&&P.resume)P.resume()}if(M.on("drain",k),!M._isStdio&&(!R||R.end!==!1))P.on("end",O),P.on("close",l);let c=!1;function O(){if(c)return;c=!0,M.end()}function l(){if(c)return;if(c=!0,typeof M.destroy==="function")M.destroy()}function D(E){if(p(),Iq.listenerCount(this,"error")===0)this.emit("error",E)}A(P,"error",D),A(M,"error",D);function p(){P.removeListener("data",g),M.removeListener("drain",k),P.removeListener("end",O),P.removeListener("close",l),P.removeListener("error",D),M.removeListener("error",D),P.removeListener("end",p),P.removeListener("close",p),M.removeListener("close",p)}return P.on("end",p),P.on("close",p),M.on("close",p),M.emit("pipe",P),M};function A(M,R,P){if(typeof M.prependListener==="function")return M.prependListener(R,P);if(!M._events||!M._events[R])M.on(R,P);else if(B(M._events[R]))M._events[R].unshift(P);else M._events[R]=[P,M._events[R]]}j.exports={Stream:y,prependListener:A}}}),Sq=Bq({"node_modules/readable-stream/lib/internal/streams/add-abort-signal.js"(a,j){var{AbortError:B,codes:G}=Wq(),y=Fq(),{ERR_INVALID_ARG_TYPE:A}=G,M=(P,g)=>{if(typeof P!=="object"||!("aborted"in P))throw new A(g,"AbortSignal",P)};function R(P){return!!(P&&typeof P.pipe==="function")}j.exports.addAbortSignal=function P(g,k){if(M(g,"signal"),!R(k))throw new A("stream","stream.Stream",k);return j.exports.addAbortSignalNoValidate(g,k)},j.exports.addAbortSignalNoValidate=function(P,g){if(typeof P!=="object"||!("aborted"in P))return g;const k=()=>{g.destroy(new B(void 0,{cause:P.reason}))};if(P.aborted)k();else P.addEventListener("abort",k),y(g,()=>P.removeEventListener("abort",k));return g}}}),JQ=Bq({"node_modules/readable-stream/lib/internal/streams/state.js"(a,j){var{MathFloor:B,NumberIsInteger:G}=Vq(),{ERR_INVALID_ARG_VALUE:y}=Wq().codes;function A(P,g,k){return P.highWaterMark!=null?P.highWaterMark:g?P[k]:null}function M(P){return P?16:16384}function R(P,g,k,c){const O=A(g,c,k);if(O!=null){if(!G(O)||O<0){const l=c?`options.${k}`:"options.highWaterMark";throw new y(l,O)}return B(O)}return M(P.objectMode)}j.exports={getHighWaterMark:R,getDefaultHighWaterMark:M}}}),hq=Bq({"node_modules/readable-stream/lib/internal/streams/from.js"(a,j){var{PromisePrototypeThen:B,SymbolAsyncIterator:G,SymbolIterator:y}=Vq(),{ERR_INVALID_ARG_TYPE:A,ERR_STREAM_NULL_VALUES:M}=Wq().codes;function R(P,g,k){let c;if(typeof g==="string"||g instanceof Buffer)return new P({objectMode:!0,...k,read(){this.push(g),this.push(null)}});let O;if(g&&g[G])O=!0,c=g[G]();else if(g&&g[y])O=!1,c=g[y]();else throw new A("iterable",["Iterable"],g);const l=new P({objectMode:!0,highWaterMark:1,...k});let D=!1;l._read=function(){if(!D)D=!0,E()},l._destroy=function(I,Z){B(p(I),()=>Xq(Z,I),(U)=>Xq(Z,U||I))};async function p(I){const Z=I!==void 0&&I!==null,U=typeof c.throw==="function";if(Z&&U){const{value:T,done:_}=await c.throw(I);if(await T,_)return}if(typeof c.return==="function"){const{value:T}=await c.return();await T}}async function E(){for(;;){try{const{value:I,done:Z}=O?await c.next():c.next();if(Z)l.push(null);else{const U=I&&typeof I.then==="function"?await I:I;if(U===null)throw D=!1,new M;else if(l.push(U))continue;else D=!1}}catch(I){l.destroy(I)}break}}return l}j.exports=R}}),pq,uq,_q=Bq({"node_modules/readable-stream/lib/internal/streams/readable.js"(a,j){var{ArrayPrototypeIndexOf:B,NumberIsInteger:G,NumberIsNaN:y,NumberParseInt:A,ObjectDefineProperties:M,ObjectKeys:R,ObjectSetPrototypeOf:P,Promise:g,SafeSet:k,SymbolAsyncIterator:c,Symbol:O}=Vq(),l=globalThis[Symbol.for("Bun.lazy")]("bun:stream").ReadableState,{Stream:D,prependListener:p}=Rq();function E(q){if(!(this instanceof E))return new E(q);const X=this instanceof Mq();if(this._readableState=new l(q,this,X),q){const{read:C,destroy:x,construct:v,signal:Jq}=q;if(typeof C==="function")this._read=C;if(typeof x==="function")this._destroy=x;if(typeof v==="function")this._construct=v;if(Jq&&!X)U(Jq,this)}D.call(this,q),K.construct(this,()=>{if(this._readableState.needReadable)n(this,this._readableState)})}P(E.prototype,D.prototype),P(E,D),E.prototype.on=function(q,X){const C=D.prototype.on.call(this,q,X),x=this._readableState;if(q==="data"){if(x.readableListening=this.listenerCount("readable")>0,x.flowing!==!1)this.resume()}else if(q==="readable"){if(!x.endEmitted&&!x.readableListening){if(x.readableListening=x.needReadable=!0,x.flowing=!1,x.emittedReadable=!1,x.length)Y(this,x);else if(!x.reading)Xq(Qq,this)}else if(x.endEmitted);}return C};class I extends E{#q;#Q;#X;#H;constructor(q,X){const{objectMode:C,highWaterMark:x,encoding:v,signal:Jq}=q;super({objectMode:C,highWaterMark:x,encoding:v,signal:Jq});this.#X=[],this.#q=void 0,this.#H=X,this.#Q=!1}#J(){var q=this.#X,X=0,C=q.length;for(;X<C;X++){const x=q[X];if(q[X]=void 0,!this.push(x,void 0))return this.#X=q.slice(X+1),!0}if(C>0)this.#X=[];return!1}#K(q){q.releaseLock(),this.#q=void 0,this.#Q=!0,this.push(null);return}async _read(){var q=this.#H,X=this.#q;if(q)X=this.#q=q.getReader(),this.#H=void 0;else if(this.#J())return;var C;try{do{var x=!1,v;const Jq=X.readMany();if(xq(Jq)){if({done:x,value:v}=await Jq,this.#Q){this.#X.push(...v);return}}else({done:x,value:v}=Jq);if(x){this.#K(X);return}if(!this.push(v[0])){this.#X=v.slice(1);return}for(let Zq=1,Oq=v.length;Zq<Oq;Zq++)if(!this.push(v[Zq])){this.#X=v.slice(Zq+1);return}}while(!this.#Q)}catch(Jq){C=Jq}finally{if(C)throw C}}_destroy(q,X){if(!this.#Q){var C=this.#q;if(C)this.#q=void 0,C.cancel(q).finally(()=>{this.#Q=!0,X(q)});return}try{X(q)}catch(x){globalThis.reportError(x)}}}uq=I;function Z(q,X={}){if(!tq(q))throw new m("readableStream","ReadableStream",q);S(X,"options");const{highWaterMark:C,encoding:x,objectMode:v=!1,signal:Jq}=X;if(x!==void 0&&!Buffer.isEncoding(x))throw new QQ(x,"options.encoding");return eq(v,"options.objectMode"),zQ(E,q,X)||new I({highWaterMark:C,encoding:x,objectMode:v,signal:Jq},q)}j.exports=E,pq=Z;var{addAbortSignal:U}=Sq(),T=Fq();const{maybeReadMore:_,resume:t,emitReadable:i,onEofChunk:$}=globalThis[Symbol.for("Bun.lazy")]("bun:stream");function n(q,X){process.nextTick(_,q,X)}function Y(q,X){i(q,X)}var K=Tq(),{aggregateTwoErrors:F,codes:{ERR_INVALID_ARG_TYPE:m,ERR_METHOD_NOT_IMPLEMENTED:u,ERR_OUT_OF_RANGE:J,ERR_STREAM_PUSH_AFTER_EOF:z,ERR_STREAM_UNSHIFT_AFTER_END_EVENT:w}}=Wq(),{validateObject:S}=Cq(),N=hq(),W=()=>{},{errorOrDestroy:b}=K;E.prototype.destroy=K.destroy,E.prototype._undestroy=K.undestroy,E.prototype._destroy=function(q,X){X(q)},E.prototype[Iq.captureRejectionSymbol]=function(q){this.destroy(q)},E.prototype.push=function(q,X){return o(this,q,X,!1)},E.prototype.unshift=function(q,X){return o(this,q,X,!0)};function o(q,X,C,x){const v=q._readableState;let Jq;if(!v.objectMode){if(typeof X==="string"){if(C=C||v.defaultEncoding,v.encoding!==C)if(x&&v.encoding)X=Buffer.from(X,C).toString(v.encoding);else X=Buffer.from(X,C),C=""}else if(X instanceof Buffer)C="";else if(D._isUint8Array(X)){if(x||!v.decoder)X=D._uint8ArrayToBuffer(X);C=""}else if(X!=null)Jq=new m("chunk",["string","Buffer","Uint8Array"],X)}if(Jq)b(q,Jq);else if(X===null)v.reading=!1,$(q,v);else if(v.objectMode||X&&X.length>0)if(x)if(v.endEmitted)b(q,new w);else if(v.destroyed||v.errored)return!1;else s(q,v,X,!0);else if(v.ended)b(q,new z);else if(v.destroyed||v.errored)return!1;else if(v.reading=!1,v.decoder&&!C)if(X=v.decoder.write(X),v.objectMode||X.length!==0)s(q,v,X,!1);else n(q,v);else s(q,v,X,!1);else if(!x)v.reading=!1,n(q,v);return!v.ended&&(v.length<v.highWaterMark||v.length===0)}function s(q,X,C,x){if(X.flowing&&X.length===0&&!X.sync&&q.listenerCount("data")>0){if(X.multiAwaitDrain)X.awaitDrainWriters.clear();else X.awaitDrainWriters=null;X.dataEmitted=!0,q.emit("data",C)}else{if(X.length+=X.objectMode?1:C.length,x)X.buffer.unshift(C);else X.buffer.push(C);if(X.needReadable)Y(q,X)}n(q,X)}E.prototype.isPaused=function(){const q=this._readableState;return q.paused===!0||q.flowing===!1},E.prototype.setEncoding=function(q){const X=new aq(q);this._readableState.decoder=X,this._readableState.encoding=this._readableState.decoder.encoding;const C=this._readableState.buffer;let x="";for(let v=C.length;v>0;v--)x+=X.write(C.shift());if(x!=="")C.push(x);return this._readableState.length=x.length,this};var e=1073741824;function Hq(q){if(q>e)throw new J("size","<= 1GiB",q);else q--,q|=q>>>1,q|=q>>>2,q|=q>>>4,q|=q>>>8,q|=q>>>16,q++;return q}function $q(q,X){if(q<=0||X.length===0&&X.ended)return 0;if(X.objectMode)return 1;if(y(q)){if(X.flowing&&X.length)return X.buffer.first().length;return X.length}if(q<=X.length)return q;return X.ended?X.length:0}E.prototype.read=function(q){if(!G(q))q=A(q,10);const X=this._readableState,C=q;if(q>X.highWaterMark)X.highWaterMark=Hq(q);if(q!==0)X.emittedReadable=!1;if(q===0&&X.needReadable&&((X.highWaterMark!==0?X.length>=X.highWaterMark:X.length>0)||X.ended)){if(X.length===0&&X.ended)H(this);else Y(this,X);return null}if(q=$q(q,X),q===0&&X.ended){if(X.length===0)H(this);return null}let x=X.needReadable;if(X.length===0||X.length-q<X.highWaterMark)x=!0;if(X.ended||X.reading||X.destroyed||X.errored||!X.constructed)x=!1;else if(x){if(X.reading=!0,X.sync=!0,X.length===0)X.needReadable=!0;try{var v=this._read(X.highWaterMark);if(xq(v)){const Zq=Bun.peek(v);if(Zq!==v)v=Zq}if(xq(v)&&v?.then&&oq(v.then))v.then(W,function(Zq){b(this,Zq)})}catch(Zq){b(this,Zq)}if(X.sync=!1,!X.reading)q=$q(C,X)}let Jq;if(q>0)Jq=Q(q,X);else Jq=null;if(Jq===null)X.needReadable=X.length<=X.highWaterMark,q=0;else if(X.length-=q,X.multiAwaitDrain)X.awaitDrainWriters.clear();else X.awaitDrainWriters=null;if(X.length===0){if(!X.ended)X.needReadable=!0;if(C!==q&&X.ended)H(this)}if(Jq!==null&&!X.errorEmitted&&!X.closeEmitted)X.dataEmitted=!0,this.emit("data",Jq);return Jq},E.prototype._read=function(q){throw new u("_read()")},E.prototype.pipe=function(q,X){const C=this,x=this._readableState;if(x.pipes.length===1){if(!x.multiAwaitDrain)x.multiAwaitDrain=!0,x.awaitDrainWriters=new k(x.awaitDrainWriters?[x.awaitDrainWriters]:[])}x.pipes.push(q);const Jq=(!X||X.end!==!1)&&q!==process.stdout&&q!==process.stderr?Oq:Pq;if(x.endEmitted)Xq(Jq);else C.once("end",Jq);q.on("unpipe",Zq);function Zq(jq,Nq){if(jq===C){if(Nq&&Nq.hasUnpiped===!1)Nq.hasUnpiped=!0,nq()}}function Oq(){q.end()}let Lq,kq=!1;function nq(){if(q.removeListener("close",wq),q.removeListener("finish",vq),Lq)q.removeListener("drain",Lq);if(q.removeListener("error",Dq),q.removeListener("unpipe",Zq),C.removeListener("end",Oq),C.removeListener("end",Pq),C.removeListener("data",yq),kq=!0,Lq&&x.awaitDrainWriters&&(!q._writableState||q._writableState.needDrain))Lq()}function fq(){if(!kq){if(x.pipes.length===1&&x.pipes[0]===q)x.awaitDrainWriters=q,x.multiAwaitDrain=!1;else if(x.pipes.length>1&&x.pipes.includes(q))x.awaitDrainWriters.add(q);C.pause()}if(!Lq)Lq=qq(C,q),q.on("drain",Lq)}C.on("data",yq);function yq(jq){if(q.write(jq)===!1)fq()}function Dq(jq){if(Gq("onerror",jq),Pq(),q.removeListener("error",Dq),q.listenerCount("error")===0){const Nq=q._writableState||q._readableState;if(Nq&&!Nq.errorEmitted)b(q,jq);else q.emit("error",jq)}}p(q,"error",Dq);function wq(){q.removeListener("finish",vq),Pq()}q.once("close",wq);function vq(){Gq("onfinish"),q.removeListener("close",wq),Pq()}q.once("finish",vq);function Pq(){Gq("unpipe"),C.unpipe(q)}if(q.emit("pipe",C),q.writableNeedDrain===!0){if(x.flowing)fq()}else if(!x.flowing)Gq("pipe resume"),C.resume();return q};function qq(q,X){return function C(){const x=q._readableState;if(x.awaitDrainWriters===X)Gq("pipeOnDrain",1),x.awaitDrainWriters=null;else if(x.multiAwaitDrain)Gq("pipeOnDrain",x.awaitDrainWriters.size),x.awaitDrainWriters.delete(X);if((!x.awaitDrainWriters||x.awaitDrainWriters.size===0)&&q.listenerCount("data"))q.resume()}}E.prototype.unpipe=function(q){const X=this._readableState,C={hasUnpiped:!1};if(X.pipes.length===0)return this;if(!q){const v=X.pipes;X.pipes=[],this.pause();for(let Jq=0;Jq<v.length;Jq++)v[Jq].emit("unpipe",this,{hasUnpiped:!1});return this}const x=B(X.pipes,q);if(x===-1)return this;if(X.pipes.splice(x,1),X.pipes.length===0)this.pause();return q.emit("unpipe",this,C),this},E.prototype.addListener=E.prototype.on,E.prototype.removeListener=function(q,X){const C=D.prototype.removeListener.call(this,q,X);if(q==="readable")Xq(Kq,this);return C},E.prototype.off=E.prototype.removeListener,E.prototype.removeAllListeners=function(q){const X=D.prototype.removeAllListeners.apply(this,arguments);if(q==="readable"||q===void 0)Xq(Kq,this);return X};function Kq(q){const X=q._readableState;if(X.readableListening=q.listenerCount("readable")>0,X.resumeScheduled&&X.paused===!1)X.flowing=!0;else if(q.listenerCount("data")>0)q.resume();else if(!X.readableListening)X.flowing=null}function Qq(q){q.read(0)}E.prototype.resume=function(){const q=this._readableState;if(!q.flowing)q.flowing=!q.readableListening,t(this,q);return q.paused=!1,this},E.prototype.pause=function(){if(this._readableState.flowing!==!1)this._readableState.flowing=!1,this.emit("pause");return this._readableState.paused=!0,this},E.prototype.wrap=function(q){let X=!1;q.on("data",(x)=>{if(!this.push(x)&&q.pause)X=!0,q.pause()}),q.on("end",()=>{this.push(null)}),q.on("error",(x)=>{b(this,x)}),q.on("close",()=>{this.destroy()}),q.on("destroy",()=>{this.destroy()}),this._read=()=>{if(X&&q.resume)X=!1,q.resume()};const C=R(q);for(let x=1;x<C.length;x++){const v=C[x];if(this[v]===void 0&&typeof q[v]==="function")this[v]=q[v].bind(q)}return this},E.prototype[c]=function(){return V(this)},E.prototype.iterator=function(q){if(q!==void 0)S(q,"options");return V(this,q)};function V(q,X){if(typeof q.read!=="function")q=E.wrap(q,{objectMode:!0});const C=h(q,X);return C.stream=q,C}async function*h(q,X){let C=W;function x(Zq){if(this===q)C(),C=W;else C=Zq}q.on("readable",x);let v;const Jq=T(q,{writable:!1},(Zq)=>{v=Zq?F(v,Zq):null,C(),C=W});try{while(!0){const Zq=q.destroyed?null:q.read();if(Zq!==null)yield Zq;else if(v)throw v;else if(v===null)return;else await new g(x)}}catch(Zq){throw v=F(v,Zq),v}finally{if((v||(X===null||X===void 0?void 0:X.destroyOnReturn)!==!1)&&(v===void 0||q._readableState.autoDestroy))K.destroyer(q,null);else q.off("readable",x),Jq()}}M(E.prototype,{readable:{get(){const q=this._readableState;return!!q&&q.readable!==!1&&!q.destroyed&&!q.errorEmitted&&!q.endEmitted},set(q){if(this._readableState)this._readableState.readable=!!q}},readableDidRead:{enumerable:!1,get:function(){return this._readableState.dataEmitted}},readableAborted:{enumerable:!1,get:function(){return!!(this._readableState.readable!==!1&&(this._readableState.destroyed||this._readableState.errored)&&!this._readableState.endEmitted)}},readableHighWaterMark:{enumerable:!1,get:function(){return this._readableState.highWaterMark}},readableBuffer:{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}},readableFlowing:{enumerable:!1,get:function(){return this._readableState.flowing},set:function(q){if(this._readableState)this._readableState.flowing=q}},readableLength:{enumerable:!1,get(){return this._readableState.length}},readableObjectMode:{enumerable:!1,get(){return this._readableState?this._readableState.objectMode:!1}},readableEncoding:{enumerable:!1,get(){return this._readableState?this._readableState.encoding:null}},errored:{enumerable:!1,get(){return this._readableState?this._readableState.errored:null}},closed:{get(){return this._readableState?this._readableState.closed:!1}},destroyed:{enumerable:!1,get(){return this._readableState?this._readableState.destroyed:!1},set(q){if(!this._readableState)return;this._readableState.destroyed=q}},readableEnded:{enumerable:!1,get(){return this._readableState?this._readableState.endEmitted:!1}}}),E._fromList=Q;function Q(q,X){if(X.length===0)return null;let C;if(X.objectMode)C=X.buffer.shift();else if(!q||q>=X.length){if(X.decoder)C=X.buffer.join("");else if(X.buffer.length===1)C=X.buffer.first();else C=X.buffer.concat(X.length);X.buffer.clear()}else C=X.buffer.consume(q,X.decoder);return C}function H(q){const X=q._readableState;if(!X.endEmitted)X.ended=!0,Xq(L,X,q)}function L(q,X){if(!q.errored&&!q.closeEmitted&&!q.endEmitted&&q.length===0){if(q.endEmitted=!0,X.emit("end"),X.writable&&X.allowHalfOpen===!1)Xq(d,X);else if(q.autoDestroy){const C=X._writableState;if(!C||C.autoDestroy&&(C.finished||C.writable===!1))X.destroy()}}}function d(q){if(q.writable&&!q.writableEnded&&!q.destroyed)q.end()}E.from=function(q,X){return N(E,q,X)};var f={newStreamReadableFromReadableStream:Z};function r(){if(f===void 0)f={};return f}E.fromWeb=function(q,X){return r().newStreamReadableFromReadableStream(q,X)},E.toWeb=function(q){return r().newReadableStreamFromStreamReadable(q)},E.wrap=function(q,X){var C,x;return new E({objectMode:(C=(x=q.readableObjectMode)!==null&&x!==void 0?x:q.objectMode)!==null&&C!==void 0?C:!0,...X,destroy(v,Jq){K.destroyer(q,v),Jq(v)}}).wrap(q)}}}),bq=Bq({"node_modules/readable-stream/lib/internal/streams/writable.js"(a,j){var{ArrayPrototypeSlice:B,Error:G,FunctionPrototypeSymbolHasInstance:y,ObjectDefineProperty:A,ObjectDefineProperties:M,ObjectSetPrototypeOf:R,StringPrototypeToLowerCase:P,Symbol:g,SymbolHasInstance:k}=Vq(),c=Rq().Stream,O=Tq(),{addAbortSignal:l}=Sq(),{getHighWaterMark:D,getDefaultHighWaterMark:p}=JQ(),{ERR_INVALID_ARG_TYPE:E,ERR_METHOD_NOT_IMPLEMENTED:I,ERR_MULTIPLE_CALLBACK:Z,ERR_STREAM_CANNOT_PIPE:U,ERR_STREAM_DESTROYED:T,ERR_STREAM_ALREADY_FINISHED:_,ERR_STREAM_NULL_VALUES:t,ERR_STREAM_WRITE_AFTER_END:i,ERR_UNKNOWN_ENCODING:$}=Wq().codes,{errorOrDestroy:n}=O;function Y(Q={}){const H=this instanceof Mq();if(!H&&!y(Y,this))return new Y(Q);if(this._writableState=new m(Q,this,H),Q){if(typeof Q.write==="function")this._write=Q.write;if(typeof Q.writev==="function")this._writev=Q.writev;if(typeof Q.destroy==="function")this._destroy=Q.destroy;if(typeof Q.final==="function")this._final=Q.final;if(typeof Q.construct==="function")this._construct=Q.construct;if(Q.signal)l(Q.signal,this)}c.call(this,Q),O.construct(this,()=>{const L=this._writableState;if(!L.writing)s(this,L);qq(this,L)})}R(Y.prototype,c.prototype),R(Y,c),j.exports=Y;function K(){}var F=g("kOnFinished");function m(Q,H,L){if(typeof L!=="boolean")L=H instanceof Mq();if(this.objectMode=!!(Q&&Q.objectMode),L)this.objectMode=this.objectMode||!!(Q&&Q.writableObjectMode);this.highWaterMark=Q?D(this,Q,"writableHighWaterMark",L):p(!1),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;const d=!!(Q&&Q.decodeStrings===!1);this.decodeStrings=!d,this.defaultEncoding=Q&&Q.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=N.bind(void 0,H),this.writecb=null,this.writelen=0,this.afterWriteTickInfo=null,u(this),this.pendingcb=0,this.constructed=!0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!Q||Q.emitClose!==!1,this.autoDestroy=!Q||Q.autoDestroy!==!1,this.errored=null,this.closed=!1,this.closeEmitted=!1,this[F]=[]}function u(Q){Q.buffered=[],Q.bufferedIndex=0,Q.allBuffers=!0,Q.allNoop=!0}m.prototype.getBuffer=function Q(){return B(this.buffered,this.bufferedIndex)},A(m.prototype,"bufferedRequestCount",{get(){return this.buffered.length-this.bufferedIndex}}),A(Y,k,{value:function(Q){if(y(this,Q))return!0;if(this!==Y)return!1;return Q&&Q._writableState instanceof m}}),Y.prototype.pipe=function(){n(this,new U)};function J(Q,H,L,d){const f=Q._writableState;if(typeof L==="function")d=L,L=f.defaultEncoding;else{if(!L)L=f.defaultEncoding;else if(L!=="buffer"&&!Buffer.isEncoding(L))throw new $(L);if(typeof d!=="function")d=K}if(H===null)throw new t;else if(!f.objectMode)if(typeof H==="string"){if(f.decodeStrings!==!1)H=Buffer.from(H,L),L="buffer"}else if(H instanceof Buffer)L="buffer";else if(c._isUint8Array(H))H=c._uint8ArrayToBuffer(H),L="buffer";else throw new E("chunk",["string","Buffer","Uint8Array"],H);let r;if(f.ending)r=new i;else if(f.destroyed)r=new T("write");if(r)return Xq(d,r),n(Q,r,!0),r;return f.pendingcb++,z(Q,f,H,L,d)}Y.prototype.write=function(Q,H,L){return J(this,Q,H,L)===!0},Y.prototype.cork=function(){this._writableState.corked++},Y.prototype.uncork=function(){const Q=this._writableState;if(Q.corked){if(Q.corked--,!Q.writing)s(this,Q)}},Y.prototype.setDefaultEncoding=function Q(H){if(typeof H==="string")H=P(H);if(!Buffer.isEncoding(H))throw new $(H);return this._writableState.defaultEncoding=H,this};function z(Q,H,L,d,f){const r=H.objectMode?1:L.length;H.length+=r;const q=H.length<H.highWaterMark;if(!q)H.needDrain=!0;if(H.writing||H.corked||H.errored||!H.constructed){if(H.buffered.push({chunk:L,encoding:d,callback:f}),H.allBuffers&&d!=="buffer")H.allBuffers=!1;if(H.allNoop&&f!==K)H.allNoop=!1}else H.writelen=r,H.writecb=f,H.writing=!0,H.sync=!0,Q._write(L,d,H.onwrite),H.sync=!1;return q&&!H.errored&&!H.destroyed}function w(Q,H,L,d,f,r,q){if(H.writelen=d,H.writecb=q,H.writing=!0,H.sync=!0,H.destroyed)H.onwrite(new T("write"));else if(L)Q._writev(f,H.onwrite);else Q._write(f,r,H.onwrite);H.sync=!1}function S(Q,H,L,d){--H.pendingcb,d(L),o(H),n(Q,L)}function N(Q,H){const L=Q._writableState,d=L.sync,f=L.writecb;if(typeof f!=="function"){n(Q,new Z);return}if(L.writing=!1,L.writecb=null,L.length-=L.writelen,L.writelen=0,H){if(Error.captureStackTrace(H),!L.errored)L.errored=H;if(Q._readableState&&!Q._readableState.errored)Q._readableState.errored=H;if(d)Xq(S,Q,L,H,f);else S(Q,L,H,f)}else{if(L.buffered.length>L.bufferedIndex)s(Q,L);if(d)if(L.afterWriteTickInfo!==null&&L.afterWriteTickInfo.cb===f)L.afterWriteTickInfo.count++;else L.afterWriteTickInfo={count:1,cb:f,stream:Q,state:L},Xq(W,L.afterWriteTickInfo);else b(Q,L,1,f)}}function W({stream:Q,state:H,count:L,cb:d}){return H.afterWriteTickInfo=null,b(Q,H,L,d)}function b(Q,H,L,d){if(!H.ending&&!Q.destroyed&&H.length===0&&H.needDrain)H.needDrain=!1,Q.emit("drain");while(L-- >0)H.pendingcb--,d();if(H.destroyed)o(H);qq(Q,H)}function o(Q){if(Q.writing)return;for(let f=Q.bufferedIndex;f<Q.buffered.length;++f){var H;const{chunk:r,callback:q}=Q.buffered[f],X=Q.objectMode?1:r.length;Q.length-=X,q((H=Q.errored)!==null&&H!==void 0?H:new T("write"))}const L=Q[F].splice(0);for(let f=0;f<L.length;f++){var d;L[f]((d=Q.errored)!==null&&d!==void 0?d:new T("end"))}u(Q)}function s(Q,H){if(H.corked||H.bufferProcessing||H.destroyed||!H.constructed)return;const{buffered:L,bufferedIndex:d,objectMode:f}=H,r=L.length-d;if(!r)return;let q=d;if(H.bufferProcessing=!0,r>1&&Q._writev){H.pendingcb-=r-1;const X=H.allNoop?K:(x)=>{for(let v=q;v<L.length;++v)L[v].callback(x)},C=H.allNoop&&q===0?L:B(L,q);C.allBuffers=H.allBuffers,w(Q,H,!0,H.length,C,"",X),u(H)}else{do{const{chunk:X,encoding:C,callback:x}=L[q];L[q++]=null;const v=f?1:X.length;w(Q,H,!1,v,X,C,x)}while(q<L.length&&!H.writing);if(q===L.length)u(H);else if(q>256)L.splice(0,q),H.bufferedIndex=0;else H.bufferedIndex=q}H.bufferProcessing=!1}Y.prototype._write=function(Q,H,L){if(this._writev)this._writev([{chunk:Q,encoding:H}],L);else throw new I("_write()")},Y.prototype._writev=null,Y.prototype.end=function(Q,H,L,d=!1){const f=this._writableState;if(typeof Q==="function")L=Q,Q=null,H=null;else if(typeof H==="function")L=H,H=null;let r;if(Q!==null&&Q!==void 0){let q;if(!d)q=J(this,Q,H);else q=this.write(Q,H);if(q instanceof G)r=q}if(f.corked)f.corked=1,this.uncork();if(r)this.emit("error",r);else if(!f.errored&&!f.ending)f.ending=!0,qq(this,f,!0),f.ended=!0;else if(f.finished)r=new _("end");else if(f.destroyed)r=new T("end");if(typeof L==="function")if(r||f.finished)Xq(L,r);else f[F].push(L);return this};function e(Q,H){var L=Q.ending&&!Q.destroyed&&Q.constructed&&Q.length===0&&!Q.errored&&Q.buffered.length===0&&!Q.finished&&!Q.writing&&!Q.errorEmitted&&!Q.closeEmitted;return Gq("needFinish",L,H),L}function Hq(Q,H){let L=!1;function d(f){if(L){n(Q,f!==null&&f!==void 0?f:Z());return}if(L=!0,H.pendingcb--,f){const r=H[F].splice(0);for(let q=0;q<r.length;q++)r[q](f);n(Q,f,H.sync)}else if(e(H))H.prefinished=!0,Q.emit("prefinish"),H.pendingcb++,Xq(Kq,Q,H)}H.sync=!0,H.pendingcb++;try{Q._final(d)}catch(f){d(f)}H.sync=!1}function $q(Q,H){if(!H.prefinished&&!H.finalCalled)if(typeof Q._final==="function"&&!H.destroyed)H.finalCalled=!0,Hq(Q,H);else H.prefinished=!0,Q.emit("prefinish")}function qq(Q,H,L){if(!e(H,Q.__id))return;if($q(Q,H),H.pendingcb===0){if(L)H.pendingcb++,Xq((d,f)=>{if(e(f))Kq(d,f);else f.pendingcb--},Q,H);else if(e(H))H.pendingcb++,Kq(Q,H)}}function Kq(Q,H){H.pendingcb--,H.finished=!0;const L=H[F].splice(0);for(let d=0;d<L.length;d++)L[d]();if(Q.emit("finish"),H.autoDestroy){const d=Q._readableState;if(!d||d.autoDestroy&&(d.endEmitted||d.readable===!1))Q.destroy()}}M(Y.prototype,{closed:{get(){return this._writableState?this._writableState.closed:!1}},destroyed:{get(){return this._writableState?this._writableState.destroyed:!1},set(Q){if(this._writableState)this._writableState.destroyed=Q}},writable:{get(){const Q=this._writableState;return!!Q&&Q.writable!==!1&&!Q.destroyed&&!Q.errored&&!Q.ending&&!Q.ended},set(Q){if(this._writableState)this._writableState.writable=!!Q}},writableFinished:{get(){return this._writableState?this._writableState.finished:!1}},writableObjectMode:{get(){return this._writableState?this._writableState.objectMode:!1}},writableBuffer:{get(){return this._writableState&&this._writableState.getBuffer()}},writableEnded:{get(){return this._writableState?this._writableState.ending:!1}},writableNeedDrain:{get(){const Q=this._writableState;if(!Q)return!1;return!Q.destroyed&&!Q.ending&&Q.needDrain}},writableHighWaterMark:{get(){return this._writableState&&this._writableState.highWaterMark}},writableCorked:{get(){return this._writableState?this._writableState.corked:0}},writableLength:{get(){return this._writableState&&this._writableState.length}},errored:{enumerable:!1,get(){return this._writableState?this._writableState.errored:null}},writableAborted:{enumerable:!1,get:function(){return!!(this._writableState.writable!==!1&&(this._writableState.destroyed||this._writableState.errored)&&!this._writableState.finished)}}});var Qq=O.destroy;Y.prototype.destroy=function(Q,H){const L=this._writableState;if(!L.destroyed&&(L.bufferedIndex<L.buffered.length||L[F].length))Xq(o,L);return Qq.call(this,Q,H),this},Y.prototype._undestroy=O.undestroy,Y.prototype._destroy=function(Q,H){H(Q)},Y.prototype[Iq.captureRejectionSymbol]=function(Q){this.destroy(Q)};var V;function h(){if(V===void 0)V={};return V}Y.fromWeb=function(Q,H){return h().newStreamWritableFromWritableStream(Q,H)},Y.toWeb=function(Q){return h().newWritableStreamFromStreamWritable(Q)}}}),HQ=Bq({"node_modules/readable-stream/lib/internal/streams/duplexify.js"(a,j){var{isReadable:B,isWritable:G,isIterable:y,isNodeStream:A,isReadableNodeStream:M,isWritableNodeStream:R,isDuplexNodeStream:P}=Eq(),g=Fq(),{AbortError:k,codes:{ERR_INVALID_ARG_TYPE:c,ERR_INVALID_RETURN_VALUE:O}}=Wq(),{destroyer:l}=Tq(),D=Mq(),p=_q(),{createDeferredPromise:E}=Aq(),I=hq(),Z=typeof Blob!=="undefined"?function i($){return $ instanceof Blob}:function i($){return!1},{FunctionPrototypeCall:U}=Vq();class T extends D{constructor(i){super(i);if((i===null||i===void 0?void 0:i.readable)===!1)this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0;if((i===null||i===void 0?void 0:i.writable)===!1)this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0}}j.exports=function i($,n){if(P($))return $;if(M($))return t({readable:$});if(R($))return t({writable:$});if(A($))return t({writable:!1,readable:!1});if(typeof $==="function"){const{value:K,write:F,final:m,destroy:u}=_($);if(y(K))return I(T,K,{objectMode:!0,write:F,final:m,destroy:u});const J=K===null||K===void 0?void 0:K.then;if(typeof J==="function"){let z;const w=U(J,K,(S)=>{if(S!=null)throw new O("nully","body",S)},(S)=>{l(z,S)});return z=new T({objectMode:!0,readable:!1,write:F,final(S){m(async()=>{try{await w,Xq(S,null)}catch(N){Xq(S,N)}})},destroy:u})}throw new O("Iterable, AsyncIterable or AsyncFunction",n,K)}if(Z($))return i($.arrayBuffer());if(y($))return I(T,$,{objectMode:!0,writable:!1});if(typeof($===null||$===void 0?void 0:$.writable)==="object"||typeof($===null||$===void 0?void 0:$.readable)==="object"){const K=$!==null&&$!==void 0&&$.readable?M($===null||$===void 0?void 0:$.readable)?$===null||$===void 0?void 0:$.readable:i($.readable):void 0,F=$!==null&&$!==void 0&&$.writable?R($===null||$===void 0?void 0:$.writable)?$===null||$===void 0?void 0:$.writable:i($.writable):void 0;return t({readable:K,writable:F})}const Y=$===null||$===void 0?void 0:$.then;if(typeof Y==="function"){let K;return U(Y,$,(F)=>{if(F!=null)K.push(F);K.push(null)},(F)=>{l(K,F)}),K=new T({objectMode:!0,writable:!1,read(){}})}throw new c(n,["Blob","ReadableStream","WritableStream","Stream","Iterable","AsyncIterable","Function","{ readable, writable } pair","Promise"],$)};function _(i){let{promise:$,resolve:n}=E();const Y=new AbortController,K=Y.signal;return{value:i(async function*(){while(!0){const m=$;$=null;const{chunk:u,done:J,cb:z}=await m;if(Xq(z),J)return;if(K.aborted)throw new k(void 0,{cause:K.reason});({promise:$,resolve:n}=E()),yield u}}(),{signal:K}),write(m,u,J){const z=n;n=null,z({chunk:m,done:!1,cb:J})},final(m){const u=n;n=null,u({done:!0,cb:m})},destroy(m,u){Y.abort(),u(m)}}}function t(i){const $=i.readable&&typeof i.readable.read!=="function"?p.wrap(i.readable):i.readable,n=i.writable;let Y=!!B($),K=!!G(n),F,m,u,J,z;function w(S){const N=J;if(J=null,N)N(S);else if(S)z.destroy(S);else if(!Y&&!K)z.destroy()}if(z=new T({readableObjectMode:!!($!==null&&$!==void 0&&$.readableObjectMode),writableObjectMode:!!(n!==null&&n!==void 0&&n.writableObjectMode),readable:Y,writable:K}),K)g(n,(S)=>{if(K=!1,S)l($,S);w(S)}),z._write=function(S,N,W){if(n.write(S,N))W();else F=W},z._final=function(S){n.end(),m=S},n.on("drain",function(){if(F){const S=F;F=null,S()}}),n.on("finish",function(){if(m){const S=m;m=null,S()}});if(Y)g($,(S)=>{if(Y=!1,S)l($,S);w(S)}),$.on("readable",function(){if(u){const S=u;u=null,S()}}),$.on("end",function(){z.push(null)}),z._read=function(){while(!0){const S=$.read();if(S===null){u=z._read;return}if(!z.push(S))return}};return z._destroy=function(S,N){if(!S&&J!==null)S=new k;if(u=null,F=null,m=null,J===null)N(S);else J=N,l(n,S),l($,S)},z}}}),Mq=Bq({"node_modules/readable-stream/lib/internal/streams/duplex.js"(a,j){var{ObjectDefineProperties:B,ObjectGetOwnPropertyDescriptor:G,ObjectKeys:y,ObjectSetPrototypeOf:A}=Vq(),M=_q();function R(O){if(!(this instanceof R))return new R(O);if(M.call(this,O),Uq.call(this,O),O){if(this.allowHalfOpen=O.allowHalfOpen!==!1,O.readable===!1)this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0;if(O.writable===!1)this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0}else this.allowHalfOpen=!0}j.exports=R,A(R.prototype,M.prototype),A(R,M);for(var P in Uq.prototype)if(!R.prototype[P])R.prototype[P]=Uq.prototype[P];B(R.prototype,{writable:G(Uq.prototype,"writable"),writableHighWaterMark:G(Uq.prototype,"writableHighWaterMark"),writableObjectMode:G(Uq.prototype,"writableObjectMode"),writableBuffer:G(Uq.prototype,"writableBuffer"),writableLength:G(Uq.prototype,"writableLength"),writableFinished:G(Uq.prototype,"writableFinished"),writableCorked:G(Uq.prototype,"writableCorked"),writableEnded:G(Uq.prototype,"writableEnded"),writableNeedDrain:G(Uq.prototype,"writableNeedDrain"),destroyed:{get(){if(this._readableState===void 0||this._writableState===void 0)return!1;return this._readableState.destroyed&&this._writableState.destroyed},set(O){if(this._readableState&&this._writableState)this._readableState.destroyed=O,this._writableState.destroyed=O}}});var g;function k(){if(g===void 0)g={};return g}R.fromWeb=function(O,l){return k().newStreamDuplexFromReadableWritablePair(O,l)},R.toWeb=function(O){return k().newReadableWritablePairFromDuplex(O)};var c;R.from=function(O){if(!c)c=HQ();return c(O,"body")}}}),mq=Bq({"node_modules/readable-stream/lib/internal/streams/transform.js"(a,j){var{ObjectSetPrototypeOf:B,Symbol:G}=Vq(),{ERR_METHOD_NOT_IMPLEMENTED:y}=Wq().codes,A=Mq();function M(k){if(!(this instanceof M))return new M(k);if(A.call(this,k),this._readableState.sync=!1,this[R]=null,k){if(typeof k.transform==="function")this._transform=k.transform;if(typeof k.flush==="function")this._flush=k.flush}this.on("prefinish",g.bind(this))}B(M.prototype,A.prototype),B(M,A),j.exports=M;var R=G("kCallback");function P(k){if(typeof this._flush==="function"&&!this.destroyed)this._flush((c,O)=>{if(c){if(k)k(c);else this.destroy(c);return}if(O!=null)this.push(O);if(this.push(null),k)k()});else if(this.push(null),k)k()}function g(){if(this._final!==P)P.call(this)}M.prototype._final=P,M.prototype._transform=function(k,c,O){throw new y("_transform()")},M.prototype._write=function(k,c,O){const l=this._readableState,D=this._writableState,p=l.length;this._transform(k,c,(E,I)=>{if(E){O(E);return}if(I!=null)this.push(I);if(D.ended||p===l.length||l.length<l.highWaterMark||l.highWaterMark===0||l.length===0)O();else this[R]=O})},M.prototype._read=function(){if(this[R]){const k=this[R];this[R]=null,k()}}}}),cq=Bq({"node_modules/readable-stream/lib/internal/streams/passthrough.js"(a,j){var{ObjectSetPrototypeOf:B}=Vq(),G=mq();function y(A){if(!(this instanceof y))return new y(A);G.call(this,A)}B(y.prototype,G.prototype),B(y,G),y.prototype._transform=function(A,M,R){R(null,A)},j.exports=y}}),gq=Bq({"node_modules/readable-stream/lib/internal/streams/pipeline.js"(a,j){var{ArrayIsArray:B,Promise:G,SymbolAsyncIterator:y}=Vq(),A=Fq(),{once:M}=Aq(),R=Tq(),P=Mq(),{aggregateTwoErrors:g,codes:{ERR_INVALID_ARG_TYPE:k,ERR_INVALID_RETURN_VALUE:c,ERR_MISSING_ARGS:O,ERR_STREAM_DESTROYED:l},AbortError:D}=Wq(),{validateFunction:p,validateAbortSignal:E}=Cq(),{isIterable:I,isReadable:Z,isReadableNodeStream:U,isNodeStream:T}=Eq(),_,t;function i(J,z,w){let S=!1;J.on("close",()=>{S=!0});const N=A(J,{readable:z,writable:w},(W)=>{S=!W});return{destroy:(W)=>{if(S)return;S=!0,R.destroyer(J,W||new l("pipe"))},cleanup:N}}function $(J){return p(J[J.length-1],"streams[stream.length - 1]"),J.pop()}function n(J){if(I(J))return J;else if(U(J))return Y(J);throw new k("val",["Readable","Iterable","AsyncIterable"],J)}async function*Y(J){if(!t)t=_q();yield*t.prototype[y].call(J)}async function K(J,z,w,{end:S}){let N,W=null;const b=(e)=>{if(e)N=e;if(W){const Hq=W;W=null,Hq()}},o=()=>new G((e,Hq)=>{if(N)Hq(N);else W=()=>{if(N)Hq(N);else e()}});z.on("drain",b);const s=A(z,{readable:!1},b);try{if(z.writableNeedDrain)await o();for await(let e of J)if(!z.write(e))await o();if(S)z.end();await o(),w()}catch(e){w(N!==e?g(N,e):e)}finally{s(),z.off("drain",b)}}function F(...J){return m(J,M($(J)))}function m(J,z,w){if(J.length===1&&B(J[0]))J=J[0];if(J.length<2)throw new O("streams");const S=new AbortController,N=S.signal,W=w===null||w===void 0?void 0:w.signal,b=[];E(W,"options.signal");function o(){Kq(new D)}W===null||W===void 0||W.addEventListener("abort",o);let s,e;const Hq=[];let $q=0;function qq(h){Kq(h,--$q===0)}function Kq(h,Q){if(h&&(!s||s.code==="ERR_STREAM_PREMATURE_CLOSE"))s=h;if(!s&&!Q)return;while(Hq.length)Hq.shift()(s);if(W===null||W===void 0||W.removeEventListener("abort",o),S.abort(),Q){if(!s)b.forEach((H)=>H());Xq(z,s,e)}}let Qq;for(let h=0;h<J.length;h++){const Q=J[h],H=h<J.length-1,L=h>0,d=H||(w===null||w===void 0?void 0:w.end)!==!1,f=h===J.length-1;if(T(Q)){let r=function(q){if(q&&q.name!=="AbortError"&&q.code!=="ERR_STREAM_PREMATURE_CLOSE")qq(q)};if(d){const{destroy:q,cleanup:X}=i(Q,H,L);if(Hq.push(q),Z(Q)&&f)b.push(X)}if(Q.on("error",r),Z(Q)&&f)b.push(()=>{Q.removeListener("error",r)})}if(h===0)if(typeof Q==="function"){if(Qq=Q({signal:N}),!I(Qq))throw new c("Iterable, AsyncIterable or Stream","source",Qq)}else if(I(Q)||U(Q))Qq=Q;else Qq=P.from(Q);else if(typeof Q==="function")if(Qq=n(Qq),Qq=Q(Qq,{signal:N}),H){if(!I(Qq,!0))throw new c("AsyncIterable",`transform[${h-1}]`,Qq)}else{var V;if(!_)_=cq();const r=new _({objectMode:!0}),q=(V=Qq)===null||V===void 0?void 0:V.then;if(typeof q==="function")$q++,q.call(Qq,(x)=>{if(e=x,x!=null)r.write(x);if(d)r.end();Xq(qq)},(x)=>{r.destroy(x),Xq(qq,x)});else if(I(Qq,!0))$q++,K(Qq,r,qq,{end:d});else throw new c("AsyncIterable or Promise","destination",Qq);Qq=r;const{destroy:X,cleanup:C}=i(Qq,!1,!0);if(Hq.push(X),f)b.push(C)}else if(T(Q)){if(U(Qq)){$q+=2;const r=u(Qq,Q,qq,{end:d});if(Z(Q)&&f)b.push(r)}else if(I(Qq))$q++,K(Qq,Q,qq,{end:d});else throw new k("val",["Readable","Iterable","AsyncIterable"],Qq);Qq=Q}else Qq=P.from(Q)}if(N!==null&&N!==void 0&&N.aborted||W!==null&&W!==void 0&&W.aborted)Xq(o);return Qq}function u(J,z,w,{end:S}){if(J.pipe(z,{end:S}),S)J.once("end",()=>z.end());else w();return A(J,{readable:!0,writable:!1},(N)=>{const W=J._readableState;if(N&&N.code==="ERR_STREAM_PREMATURE_CLOSE"&&W&&W.ended&&!W.errored&&!W.errorEmitted)J.once("end",w).once("error",w);else w(N)}),A(z,{readable:!1,writable:!0},w)}j.exports={pipelineImpl:m,pipeline:F}}}),KQ=Bq({"node_modules/readable-stream/lib/internal/streams/compose.js"(a,j){var{pipeline:B}=gq(),G=Mq(),{destroyer:y}=Tq(),{isNodeStream:A,isReadable:M,isWritable:R}=Eq(),{AbortError:P,codes:{ERR_INVALID_ARG_VALUE:g,ERR_MISSING_ARGS:k}}=Wq();j.exports=function c(...O){if(O.length===0)throw new k("streams");if(O.length===1)return G.from(O[0]);const l=[...O];if(typeof O[0]==="function")O[0]=G.from(O[0]);if(typeof O[O.length-1]==="function"){const $=O.length-1;O[$]=G.from(O[$])}for(let $=0;$<O.length;++$){if(!A(O[$]))continue;if($<O.length-1&&!M(O[$]))throw new g(`streams[${$}]`,l[$],"must be readable");if($>0&&!R(O[$]))throw new g(`streams[${$}]`,l[$],"must be writable")}let D,p,E,I,Z;function U($){const n=I;if(I=null,n)n($);else if($)Z.destroy($);else if(!i&&!t)Z.destroy()}const T=O[0],_=B(O,U),t=!!R(T),i=!!M(_);if(Z=new G({writableObjectMode:!!(T!==null&&T!==void 0&&T.writableObjectMode),readableObjectMode:!!(_!==null&&_!==void 0&&_.writableObjectMode),writable:t,readable:i}),t)Z._write=function($,n,Y){if(T.write($,n))Y();else D=Y},Z._final=function($){T.end(),p=$},T.on("drain",function(){if(D){const $=D;D=null,$()}}),_.on("finish",function(){if(p){const $=p;p=null,$()}});if(i)_.on("readable",function(){if(E){const $=E;E=null,$()}}),_.on("end",function(){Z.push(null)}),Z._read=function(){while(!0){const $=_.read();if($===null){E=Z._read;return}if(!Z.push($))return}};return Z._destroy=function($,n){if(!$&&I!==null)$=new P;if(E=null,D=null,p=null,I===null)n($);else I=n,y(_,$)},Z}}}),dq=Bq({"node_modules/readable-stream/lib/stream/promises.js"(a,j){var{ArrayPrototypePop:B,Promise:G}=Vq(),{isIterable:y,isNodeStream:A}=Eq(),{pipelineImpl:M}=gq(),{finished:R}=Fq();function P(...g){return new G((k,c)=>{let O,l;const D=g[g.length-1];if(D&&typeof D==="object"&&!A(D)&&!y(D)){const p=B(g);O=p.signal,l=p.end}M(g,(p,E)=>{if(p)c(p);else k(E)},{signal:O,end:l})})}j.exports={finished:R,pipeline:P}}}),ZQ=Bq({"node_modules/readable-stream/lib/stream.js"(a,j){var{ObjectDefineProperty:B,ObjectKeys:G,ReflectApply:y}=Vq(),{promisify:{custom:A}}=Aq(),{streamReturningOperators:M,promiseReturningOperators:R}=XQ(),{codes:{ERR_ILLEGAL_CONSTRUCTOR:P}}=Wq(),g=KQ(),{pipeline:k}=gq(),{destroyer:c}=Tq(),O=Fq(),l=dq(),D=Eq(),p=j.exports=Rq().Stream;p.isDisturbed=D.isDisturbed,p.isErrored=D.isErrored,p.isWritable=D.isWritable,p.isReadable=D.isReadable,p.Readable=_q();for(let I of G(M)){let Z=function(...T){if(new.target)throw P();return p.Readable.from(y(U,this,T))};const U=M[I];B(Z,"name",{value:U.name}),B(Z,"length",{value:U.length}),B(p.Readable.prototype,I,{value:Z,enumerable:!1,configurable:!0,writable:!0})}for(let I of G(R)){let Z=function(...T){if(new.target)throw P();return y(U,this,T)};const U=R[I];B(Z,"name",{value:U.name}),B(Z,"length",{value:U.length}),B(p.Readable.prototype,I,{value:Z,enumerable:!1,configurable:!0,writable:!0})}p.Writable=bq(),p.Duplex=Mq(),p.Transform=mq(),p.PassThrough=cq(),p.pipeline=k;var{addAbortSignal:E}=Sq();p.addAbortSignal=E,p.finished=O,p.destroy=c,p.compose=g,B(p,"promises",{configurable:!0,enumerable:!0,get(){return l}}),B(k,A,{enumerable:!0,get(){return l.pipeline}}),B(O,A,{enumerable:!0,get(){return l.finished}}),p.Stream=p,p._isUint8Array=function I(Z){return Z instanceof Uint8Array},p._uint8ArrayToBuffer=function I(Z){return new Buffer(Z.buffer,Z.byteOffset,Z.byteLength)}}}),BQ=Bq({"node_modules/readable-stream/lib/ours/index.js"(a,j){const B=ZQ(),G=dq(),y=B.Readable.destroy;j.exports=B,j.exports._uint8ArrayToBuffer=B._uint8ArrayToBuffer,j.exports._isUint8Array=B._isUint8Array,j.exports.isDisturbed=B.isDisturbed,j.exports.isErrored=B.isErrored,j.exports.isWritable=B.isWritable,j.exports.isReadable=B.isReadable,j.exports.Readable=B.Readable,j.exports.Writable=B.Writable,j.exports.Duplex=B.Duplex,j.exports.Transform=B.Transform,j.exports.PassThrough=B.PassThrough,j.exports.addAbortSignal=B.addAbortSignal,j.exports.finished=B.finished,j.exports.destroy=B.destroy,j.exports.destroy=y,j.exports.pipeline=B.pipeline,j.exports.compose=B.compose,j.exports._getNativeReadableStreamPrototype=lq,j.exports.NativeWritable=iq,zq.defineProperty(B,"promises",{configurable:!0,enumerable:!0,get(){return G}}),j.exports.Stream=B.Stream,j.exports.default=j.exports}}),$Q={0:void 0,1:void 0,2:void 0,3:void 0,4:void 0,5:void 0},Uq=bq(),iq=class a extends Uq{#q;#Q;#X=!0;_construct;_destroy;_final;constructor(j,B={}){super(B);this._construct=this.#H,this._destroy=this.#K,this._final=this.#Z,this.#q=j}#H(j){this._writableState.constructed=!0,this.constructed=!0,j()}#J(){if(typeof this.#q==="object")if(typeof this.#q.write==="function")this.#Q=this.#q;else throw new Error("Invalid FileSink");else this.#Q=Bun.file(this.#q).writer()}write(j,B,G,y=this.#X){if(!y)return this.#X=!1,super.write(j,B,G);if(!this.#Q)this.#J();var A=this.#Q,M=A.write(j);if(xq(M))return M.then(()=>{this.emit("drain"),A.flush(!0)}),!1;if(A.flush(!0),G)G(null,j.byteLength);return!0}end(j,B,G,y=this.#X){return super.end(j,B,G,y)}#K(j,B){if(this._writableState.destroyed=!0,B)B(j)}#Z(j){if(this.#Q)this.#Q.end();if(j)j()}ref(){if(!this.#Q)this.#J();this.#Q.ref()}unref(){if(!this.#Q)return;this.#Q.unref()}},Yq=BQ();Yq[Symbol.for("CommonJS")]=0;Yq[Symbol.for("::bunternal::")]={_ReadableFromWeb:pq,_ReadableFromWebForUndici:uq};var cQ=Yq,EQ=Yq._uint8ArrayToBuffer,IQ=Yq._isUint8Array,TQ=Yq.isDisturbed,PQ=Yq.isErrored,xQ=Yq.isWritable,OQ=Yq.isReadable,CQ=Yq.Readable,Uq=Yq.Writable,_Q=Yq.Duplex,DQ=Yq.Transform,wQ=Yq.PassThrough,vQ=Yq.addAbortSignal,RQ=Yq.finished,SQ=Yq.destroy,gQ=Yq.pipeline,kQ=Yq.compose,VQ=Yq.Stream,fQ=Yq.eos=Fq,yQ=Yq._getNativeReadableStreamPrototype,iq=Yq.NativeWritable,hQ=VQ.promises;export{hQ as promises,gQ as pipeline,xQ as isWritable,OQ as isReadable,PQ as isErrored,TQ as isDisturbed,RQ as finished,fQ as eos,SQ as destroy,cQ as default,kQ as compose,vQ as addAbortSignal,EQ as _uint8ArrayToBuffer,IQ as _isUint8Array,yQ as _getNativeReadableStreamPrototype,Uq as Writable,DQ as Transform,VQ as Stream,CQ as Readable,wQ as PassThrough,iq as NativeWritable,_Q as Duplex};