aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/js/node/stream.js92
-rw-r--r--src/js/out/modules/node/stream.js4
2 files changed, 87 insertions, 9 deletions
diff --git a/src/js/node/stream.js b/src/js/node/stream.js
index 474ada8d8..1ae0f7fb6 100644
--- a/src/js/node/stream.js
+++ b/src/js/node/stream.js
@@ -3328,16 +3328,94 @@ var require_readable = __commonJS({
};
var webStreamsAdapters = {
newStreamReadableFromReadableStream,
+
+ newReadableStreamFromStreamReadable(streamReadable, options = {}) {
+ // Not using the internal/streams/utils isReadableNodeStream utility
+ // here because it will return false if streamReadable is a Duplex
+ // whose readable option is false. For a Duplex that is not readable,
+ // we want it to pass this check but return a closed ReadableStream.
+ if (typeof streamReadable?._readableState !== "object") {
+ throw new ERR_INVALID_ARG_TYPE("streamReadable", "stream.Readable", streamReadable);
+ }
+ var { isDestroyed, isReadable } = require_utils();
+
+ if (isDestroyed(streamReadable) || !isReadable(streamReadable)) {
+ const readable = new ReadableStream();
+ readable.cancel();
+ return readable;
+ }
+
+ const objectMode = streamReadable.readableObjectMode;
+ const highWaterMark = streamReadable.readableHighWaterMark;
+
+ const evaluateStrategyOrFallback = strategy => {
+ // If there is a strategy available, use it
+ if (strategy) return strategy;
+
+ if (objectMode) {
+ // When running in objectMode explicitly but no strategy, we just fall
+ // back to CountQueuingStrategy
+ return new CountQueuingStrategy({ highWaterMark });
+ }
+
+ // When not running in objectMode explicitly, we just fall
+ // back to a minimal strategy that just specifies the highWaterMark
+ // and no size algorithm. Using a ByteLengthQueuingStrategy here
+ // is unnecessary.
+ return { highWaterMark };
+ };
+
+ const strategy = evaluateStrategyOrFallback(options?.strategy);
+
+ let controller;
+
+ function onData(chunk) {
+ controller.enqueue(chunk);
+ if (controller.desiredSize <= 0) streamReadable.pause();
+ }
+
+ streamReadable.pause();
+
+ const cleanup = finished(streamReadable, error => {
+ if (error?.code === "ERR_STREAM_PREMATURE_CLOSE") {
+ const err = new AbortError(undefined, { cause: error });
+ error = err;
+ }
+
+ cleanup();
+ // This is a protection against non-standard, legacy streams
+ // that happen to emit an error event again after finished is called.
+ streamReadable.on("error", () => {});
+ if (error) return controller.error(error);
+ controller.close();
+ });
+
+ streamReadable.on("data", onData);
+
+ return new ReadableStream(
+ {
+ start(c) {
+ controller = c;
+ },
+
+ pull() {
+ streamReadable.resume();
+ },
+
+ cancel(reason) {
+ destroy(streamReadable, reason);
+ },
+ },
+ strategy,
+ );
+ },
};
- function lazyWebStreams() {
- if (webStreamsAdapters === void 0) webStreamsAdapters = {};
- return webStreamsAdapters;
- }
+
Readable.fromWeb = function (readableStream, options) {
- return lazyWebStreams().newStreamReadableFromReadableStream(readableStream, options);
+ return webStreamsAdapters.newStreamReadableFromReadableStream(readableStream, options);
};
- Readable.toWeb = function (streamReadable) {
- return lazyWebStreams().newReadableStreamFromStreamReadable(streamReadable);
+ Readable.toWeb = function (streamReadable, options) {
+ return webStreamsAdapters.newReadableStreamFromStreamReadable(streamReadable, options);
};
Readable.wrap = function (src, options) {
var _ref, _src$readableObjectMo;
diff --git a/src/js/out/modules/node/stream.js b/src/js/out/modules/node/stream.js
index b001443b4..4836ffe3e 100644
--- a/src/js/out/modules/node/stream.js
+++ b/src/js/out/modules/node/stream.js
@@ -1,2 +1,2 @@
-var UQ=(a)=>{return import.meta.require(a)};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,T]=globalThis[Symbol.for("Bun.lazy")](a),g=[!1],k=function(E,P,Z,U){if(P>0){const I=Z.subarray(0,P),_=Z.subarray(P);if(I.byteLength>0)E.push(I);if(U)E.push(null);return _.byteLength>0?_:void 0}if(U)E.push(null);return Z},c=function(E,P,Z,U){if(P.byteLength>0)E.push(P);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(P,Z={}){super(Z);if(typeof Z.highWaterMark==="number")this.#J=Z.highWaterMark;else this.#J=262144;this.#q=P,this.#X=!1,this.#H=void 0,this.#K=!1,this.#B={},l.register(this,this.#q,this.#B)}_read(P){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(P),Z)}#$(P){this.#X=!0;const Z=G(P,this.#J);if(typeof Z==="number"&&Z>1)this.#Z=!0,this.#J=Math.min(this.#J,Z);if(T){const U=T(P);if((U?.byteLength??0)>0)this.push(U)}}#z(P=this.#J){var Z=this.#H;if(Z?.byteLength??0<D){var U=P>D?P:D;this.#H=Z=new Buffer(U)}return Z}#Y(P,Z,U){if(typeof P==="number"){if(P>=this.#J&&!this.#Z&&!U)this.#J*=2,this.#Z=!0;return k(this,P,Z,U)}else if(typeof P==="boolean")return process.nextTick(()=>{this.push(null)}),Z?.byteLength??0>0?Z:void 0;else if(ArrayBuffer.isView(P)){if(P.byteLength>=this.#J&&!this.#Z&&!U)this.#J*=2,this.#Z=!0;return c(this,P,Z,U)}else throw new Error("Invalid result from pull")}#V(P,Z){g[0]=!1;var U=B(Z,P,g);if(xq(U))return this.#K=!0,U.then((I)=>{this.#K=!1,this.#H=this.#Y(I,P,g[0])},(I)=>{errorOrDestroy(this,I)});else this.#H=this.#Y(U,P,g[0])}_destroy(P,Z){var U=this.#q;if(U===0){Z(P);return}if(l.unregister(this.#B),this.#q=0,R)R(U,!1);y(U,P),Z(P)}ref(){var P=this.#q;if(P===0)return;if(this.#Q++===0)R(P,!0)}unref(){var P=this.#q;if(P===0)return;if(this.#Q--===1)R(P,!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"),FQ=zq.create,LQ=zq.defineProperty,jQ=zq.getOwnPropertyDescriptor,rq=zq.getOwnPropertyNames,NQ=zq.getPrototypeOf,AQ=zq.prototype.hasOwnProperty,EQ=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 IQ=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((T,g)=>{A=T,M=g}),resolve:A,reject:M}},promisify(A){return new Promise((M,R)=>{A((T,...g)=>{if(T)return R(T);return M(...g)})})},debuglog(){return function(){}},format(A,...M){return A.replace(/%([sdifj])/g,function(...[R,T]){const g=M.shift();if(T==="f")return g.toFixed(6);else if(T==="j")return JSON.stringify(g);else if(T==="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"],T=/^([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="",I=Z.length;const _=Z[0]==="-"?1:0;for(;I>=_+4;I-=3)U=`_${Z.slice(I-3,I)}${U}`;return`${Z.slice(0,I)}${U}`}function l(Z,U,I){if(typeof U==="function")return c(U.length<=I.length,`Code: ${Z}; The provided arguments length (${I.length}) does not match the required ones (${U.length}).`),U(...I);const _=(U.match(/%[dfijoOs]/g)||[]).length;if(c(_===I.length,`Code: ${Z}; The provided arguments length (${I.length}) does not match the required ones (${_}).`),I.length===0)return U;return B(U,...I)}function D(Z,U,I){if(!I)I=Error;class _ extends I{constructor(...t){super(l(Z,U,t))}toString(){return`${this.name} [${Z}]: ${this.message}`}}zq.defineProperties(_.prototype,{name:{value:I.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 I=new A([U,Z],U.message);return I.code=U.code,I}return Z||U}var P=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,I)=>{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(T.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(I==null)_+=`. Received ${I}`;else if(typeof I==="function"&&I.name)_+=`. Received function ${I.name}`;else if(typeof I==="object"){var n;if((n=I.constructor)!==null&&n!==void 0&&n.name)_+=`. Received an instance of ${I.constructor.name}`;else{const Y=G(I,{depth:-1});_+=`. Received ${Y}`}}else{let Y=G(I,{colors:!1});if(Y.length>25)Y=`${Y.slice(0,25)}...`;_+=`. Received type ${typeof I} (${Y})`}return _},TypeError),D("ERR_INVALID_ARG_VALUE",(Z,U,I="is invalid")=>{let _=G(U);if(_.length>128)_=_.slice(0,128)+"...";return`The ${Z.includes(".")?"property":"argument"} '${Z}' ${I}. Received ${_}`},TypeError),D("ERR_INVALID_RETURN_VALUE",(Z,U,I)=>{var _;const t=I!==null&&I!==void 0&&(_=I.constructor)!==null&&_!==void 0&&_.name?`instance of ${I.constructor.name}`:`type ${typeof I}`;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 I=Z.length;switch(Z=(Array.isArray(Z)?Z:[Z]).map((_)=>`"${_}"`).join(" or "),I){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,I)=>{c(U,'Missing "range" argument');let _;if(Number.isInteger(I)&&Math.abs(I)>4294967296)_=O(String(I));else if(typeof I==="bigint"){if(_=String(I),I>2n**32n||I<-(2n**32n))_=O(_);_+="n"}else _=G(I);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:P,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:T,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:P,ERR_OUT_OF_RANGE:Z,ERR_UNKNOWN_SIGNAL:U}}=Wq(),{normalizeEncoding:I}=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 P(h,V,K);V=g(V,8)}return u(V,h,0,4294967295),V}var m=D((V,h,Q=T,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 P(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 P(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=I(h),H=V.length;if(Q==="hex"&&H%2!==0)throw new P("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"),T=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 P(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 I(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&&I(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[T])!==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:T,isErrored:u,kIsErrored:M,isReadable:U,kIsReadable:R,isClosed:$,isDestroyed:D,isDuplexNodeStream:c,isFinished:_,isIterable:l,isReadableNodeStream:g,isReadableEnded:P,isReadableFinished:Z,isReadableErrored:i,isNodeStream:O,isWritable:I,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:T,validateObject:g}=Cq(),{Promise:k}=Vq(),{isClosed:c,isReadable:O,isReadableNodeStream:l,isReadableFinished:D,isReadableErrored:p,isWritable:E,isWritableNodeStream:P,isWritableFinished:Z,isWritableErrored:U,isNodeStream:I,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");T(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:P(Y);if(!I(Y))throw new y("stream","Stream",Y);const{_writableState:w,_readableState:S}=Y,N=()=>{if(!Y.writable)o()};let W=_(Y)&&l(Y)===J&&P(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:T}=Cq(),g=Vq().Symbol("kWeak"),{finished:k}=Fq(),{ArrayPrototypePush:c,MathFloor:O,Number:l,NumberIsNaN:D,Promise:p,PromiseReject:E,PromisePrototypeCatch:P,Symbol:Z}=Vq(),U=Z("kEmpty"),I=Z("kEof");function _(N,W){if(typeof N!=="function")throw new B("fn",["Function","AsyncFunction"],N);if(W!=null)T(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(I)}catch(q){const X=E(q);P(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===I)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)T(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)T(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)T(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)T(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)T(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:T,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){P(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 P(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(P,K,F);else P(K,F)}}function I(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&&!T(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:I,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 T=this;function g(E){if(M.writable&&M.write(E)===!1&&T.pause)T.pause()}T.on("data",g);function k(){if(T.readable&&T.resume)T.resume()}if(M.on("drain",k),!M._isStdio&&(!R||R.end!==!1))T.on("end",O),T.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(T,"error",D),A(M,"error",D);function p(){T.removeListener("data",g),M.removeListener("drain",k),T.removeListener("end",O),T.removeListener("close",l),T.removeListener("error",D),M.removeListener("error",D),T.removeListener("end",p),T.removeListener("close",p),M.removeListener("close",p)}return T.on("end",p),T.on("close",p),M.on("close",p),M.emit("pipe",T),M};function A(M,R,T){if(typeof M.prependListener==="function")return M.prependListener(R,T);if(!M._events||!M._events[R])M.on(R,T);else if(B(M._events[R]))M._events[R].unshift(T);else M._events[R]=[T,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=(T,g)=>{if(typeof T!=="object"||!("aborted"in T))throw new A(g,"AbortSignal",T)};function R(T){return!!(T&&typeof T.pipe==="function")}j.exports.addAbortSignal=function T(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(T,g){if(typeof T!=="object"||!("aborted"in T))return g;const k=()=>{g.destroy(new B(void 0,{cause:T.reason}))};if(T.aborted)k();else T.addEventListener("abort",k),y(g,()=>T.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(T,g,k){return T.highWaterMark!=null?T.highWaterMark:g?T[k]:null}function M(T){return T?16:16384}function R(T,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(T.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(T,g,k){let c;if(typeof g==="string"||g instanceof Buffer)return new T({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 T({objectMode:!0,highWaterMark:1,...k});let D=!1;l._read=function(){if(!D)D=!0,E()},l._destroy=function(P,Z){B(p(P),()=>Xq(Z,P),(U)=>Xq(Z,U||P))};async function p(P){const Z=P!==void 0&&P!==null,U=typeof c.throw==="function";if(Z&&U){const{value:I,done:_}=await c.throw(P);if(await I,_)return}if(typeof c.return==="function"){const{value:I}=await c.return();await I}}async function E(){for(;;){try{const{value:P,done:Z}=O?await c.next():c.next();if(Z)l.push(null);else{const U=P&&typeof P.then==="function"?await P:P;if(U===null)throw D=!1,new M;else if(l.push(U))continue;else D=!1}}catch(P){l.destroy(P)}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:T,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)})}T(E.prototype,D.prototype),T(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 P 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=P;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 P({highWaterMark:C,encoding:x,objectMode:v,signal:Jq},q)}j.exports=E,pq=Z;var{addAbortSignal:U}=Sq(),I=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=I(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:T,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:P,ERR_MULTIPLE_CALLBACK:Z,ERR_STREAM_CANNOT_PIPE:U,ERR_STREAM_DESTROYED:I,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 I("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=T(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 I("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 I("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 I("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 P("_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 I("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:T}=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(),P=hq(),Z=typeof Blob!=="undefined"?function i($){return $ instanceof Blob}:function i($){return!1},{FunctionPrototypeCall:U}=Vq();class I 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(T($))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 P(I,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 I({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 P(I,$,{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 I({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 I({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 T in Uq.prototype)if(!R.prototype[T])R.prototype[T]=Uq.prototype[T];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 T(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!==T)T.call(this)}M.prototype._final=T,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,P)=>{if(E){O(E);return}if(P!=null)this.push(P);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(),T=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:P,isReadable:Z,isReadableNodeStream:U,isNodeStream:I}=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(P(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(I(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}),!P(Qq))throw new c("Iterable, AsyncIterable or Stream","source",Qq)}else if(P(Q)||U(Q))Qq=Q;else Qq=T.from(Q);else if(typeof Q==="function")if(Qq=n(Qq),Qq=Q(Qq,{signal:N}),H){if(!P(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(P(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(I(Q)){if(U(Qq)){$q+=2;const r=u(Qq,Q,qq,{end:d});if(Z(Q)&&f)b.push(r)}else if(P(Qq))$q++,K(Qq,Q,qq,{end:d});else throw new k("val",["Readable","Iterable","AsyncIterable"],Qq);Qq=Q}else Qq=T.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:T,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,P,Z;function U($){const n=P;if(P=null,n)n($);else if($)Z.destroy($);else if(!i&&!t)Z.destroy()}const I=O[0],_=B(O,U),t=!!R(I),i=!!M(_);if(Z=new G({writableObjectMode:!!(I!==null&&I!==void 0&&I.writableObjectMode),readableObjectMode:!!(_!==null&&_!==void 0&&_.writableObjectMode),writable:t,readable:i}),t)Z._write=function($,n,Y){if(I.write($,n))Y();else D=Y},Z._final=function($){I.end(),p=$},I.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(!$&&P!==null)$=new T;if(E=null,D=null,p=null,P===null)n($);else P=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 T(...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:T}}}),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:T}}=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 P of G(M)){let Z=function(...I){if(new.target)throw T();return p.Readable.from(y(U,this,I))};const U=M[P];B(Z,"name",{value:U.name}),B(Z,"length",{value:U.length}),B(p.Readable.prototype,P,{value:Z,enumerable:!1,configurable:!0,writable:!0})}for(let P of G(R)){let Z=function(...I){if(new.target)throw T();return y(U,this,I)};const U=R[P];B(Z,"name",{value:U.name}),B(Z,"length",{value:U.length}),B(p.Readable.prototype,P,{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 P(Z){return Z instanceof Uint8Array},p._uint8ArrayToBuffer=function P(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 lQ=Yq,TQ=Yq._uint8ArrayToBuffer,PQ=Yq._isUint8Array,xQ=Yq.isDisturbed,OQ=Yq.isErrored,CQ=Yq.isWritable,_Q=Yq.isReadable,DQ=Yq.Readable,Uq=Yq.Writable,wQ=Yq.Duplex,vQ=Yq.Transform,RQ=Yq.PassThrough,SQ=Yq.addAbortSignal,gQ=Yq.finished,kQ=Yq.destroy,fQ=Yq.pipeline,yQ=Yq.compose,VQ=Yq.Stream,hQ=Yq.eos=Fq,pQ=Yq._getNativeReadableStreamPrototype,iq=Yq.NativeWritable,uQ=VQ.promises;export{uQ as promises,fQ as pipeline,CQ as isWritable,_Q as isReadable,OQ as isErrored,xQ as isDisturbed,gQ as finished,hQ as eos,kQ as destroy,lQ as default,yQ as compose,SQ as addAbortSignal,TQ as _uint8ArrayToBuffer,PQ as _isUint8Array,pQ as _getNativeReadableStreamPrototype,Uq as Writable,vQ as Transform,VQ as Stream,DQ as Readable,RQ as PassThrough,iq as NativeWritable,wQ as Duplex};
+var WQ=(a)=>{return import.meta.require(a)};import{EventEmitter as Tq} from"bun:events_native";import{StringDecoder as sq} from"node:string_decoder";var rq=function(a){return typeof a==="object"&&a!==null&&a instanceof ReadableStream},tq=function(a,j){if(typeof a!=="boolean")throw new eq(j,"boolean",a)};var eq=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}`)},BQ=function(a,j){var[B,G,y,A,M,R,P]=globalThis[Symbol.for("Bun.lazy")](a),g=[!1],k=function(E,x,Z,U){if(x>0){const I=Z.subarray(0,x),D=Z.subarray(x);if(I.byteLength>0)E.push(I);if(U)E.push(null);return D.byteLength>0?D:void 0}if(U)E.push(null);return Z},c=function(E,x,Z,U){if(x.byteLength>0)E.push(x);if(U)E.push(null);return Z},C=process.env.BUN_DISABLE_DYNAMIC_CHUNK_SIZE!=="1";const l=new FinalizationRegistry((E)=>E&&M(E)),w=512;var p=class E extends j{#q;#Q=1;#X=!1;#H=void 0;#J;#K=!1;#Z=!C;#B;constructor(x,Z={}){super(Z);if(typeof Z.highWaterMark==="number")this.#J=Z.highWaterMark;else this.#J=262144;this.#q=x,this.#X=!1,this.#H=void 0,this.#K=!1,this.#B={},l.register(this,this.#q,this.#B)}_read(x){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(x),Z)}#$(x){this.#X=!0;const Z=G(x,this.#J);if(typeof Z==="number"&&Z>1)this.#Z=!0,this.#J=Math.min(this.#J,Z);if(P){const U=P(x);if((U?.byteLength??0)>0)this.push(U)}}#z(x=this.#J){var Z=this.#H;if(Z?.byteLength??0<w){var U=x>w?x:w;this.#H=Z=new Buffer(U)}return Z}#Y(x,Z,U){if(typeof x==="number"){if(x>=this.#J&&!this.#Z&&!U)this.#J*=2,this.#Z=!0;return k(this,x,Z,U)}else if(typeof x==="boolean")return process.nextTick(()=>{this.push(null)}),Z?.byteLength??0>0?Z:void 0;else if(ArrayBuffer.isView(x)){if(x.byteLength>=this.#J&&!this.#Z&&!U)this.#J*=2,this.#Z=!0;return c(this,x,Z,U)}else throw new Error("Invalid result from pull")}#V(x,Z){g[0]=!1;var U=B(Z,x,g);if(Oq(U))return this.#K=!0,U.then((I)=>{this.#K=!1,this.#H=this.#Y(I,x,g[0])},(I)=>{errorOrDestroy(this,I)});else this.#H=this.#Y(U,x,g[0])}_destroy(x,Z){var U=this.#q;if(U===0){Z(x);return}if(l.unregister(this.#B),this.#q=0,R)R(U,!1);y(U,x),Z(x)}ref(){var x=this.#q;if(x===0)return;if(this.#Q++===0)R(x,!0)}unref(){var x=this.#q;if(x===0)return;if(this.#Q--===1)R(x,!1)}};if(!R)p.prototype.ref=void 0,p.prototype.unref=void 0;return p},lq=function(a,j){return YQ[a]||=BQ(a,j)},$Q=function(a,j,B){if(!(j&&typeof j==="object"&&j instanceof ReadableStream))return;const G=oq(j);if(!G){Mq("no native readable stream");return}const{stream:y,data:A}=G;return new(lq(A,a))(y,B)};var Mq=()=>{},{isPromise:Oq,isCallable:nq,direct:oq,Object:zq}=globalThis[Symbol.for("Bun.lazy")]("primordials"),LQ=zq.create,jQ=zq.defineProperty,NQ=zq.getOwnPropertyDescriptor,aq=zq.getOwnPropertyNames,AQ=zq.getPrototypeOf,EQ=zq.prototype.hasOwnProperty,IQ=zq.setPrototypeOf,Zq=(a,j)=>function B(){return j||(0,a[aq(a)[0]])((j={exports:{}}).exports,j),j.exports};var Xq=process.nextTick;var TQ=Array.isArray,Vq=Zq({"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}}}),Eq=Zq({"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=Zq({"node_modules/readable-stream/lib/ours/errors.js"(a,j){var{format:B,inspect:G,AggregateError:y}=Eq(),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 C(Z){let U="",I=Z.length;const D=Z[0]==="-"?1:0;for(;I>=D+4;I-=3)U=`_${Z.slice(I-3,I)}${U}`;return`${Z.slice(0,I)}${U}`}function l(Z,U,I){if(typeof U==="function")return c(U.length<=I.length,`Code: ${Z}; The provided arguments length (${I.length}) does not match the required ones (${U.length}).`),U(...I);const D=(U.match(/%[dfijoOs]/g)||[]).length;if(c(D===I.length,`Code: ${Z}; The provided arguments length (${I.length}) does not match the required ones (${D}).`),I.length===0)return U;return B(U,...I)}function w(Z,U,I){if(!I)I=Error;class D extends I{constructor(...r){super(l(Z,U,r))}toString(){return`${this.name} [${Z}]: ${this.message}`}}zq.defineProperties(D.prototype,{name:{value:I.name,writable:!0,enumerable:!1,configurable:!0},toString:{value(){return`${this.name} [${Z}]: ${this.message}`},writable:!0,enumerable:!1,configurable:!0}}),D.prototype.code=Z,D.prototype[M]=!0,k[Z]=D}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 I=new A([U,Z],U.message);return I.code=U.code,I}return Z||U}var x=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"}};w("ERR_ASSERTION","%s",Error),w("ERR_INVALID_ARG_TYPE",(Z,U,I)=>{if(c(typeof Z==="string","'name' must be a string"),!Array.isArray(U))U=[U];let D="The ";if(Z.endsWith(" argument"))D+=`${Z} `;else D+=`"${Z}" ${Z.includes(".")?"property":"argument"} `;D+="must be ";const r=[],i=[],$=[];for(let Y of U)if(c(typeof Y==="string","All expected entries have to be of type string"),R.includes(Y))r.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=r.indexOf("object");if(Y!==-1)r.splice(r,Y,1),i.push("Object")}if(r.length>0){switch(r.length){case 1:D+=`of type ${r[0]}`;break;case 2:D+=`one of type ${r[0]} or ${r[1]}`;break;default:{const Y=r.pop();D+=`one of type ${r.join(", ")}, or ${Y}`}}if(i.length>0||$.length>0)D+=" or "}if(i.length>0){switch(i.length){case 1:D+=`an instance of ${i[0]}`;break;case 2:D+=`an instance of ${i[0]} or ${i[1]}`;break;default:{const Y=i.pop();D+=`an instance of ${i.join(", ")}, or ${Y}`}}if($.length>0)D+=" or "}switch($.length){case 0:break;case 1:if($[0].toLowerCase()!==$[0])D+="an ";D+=`${$[0]}`;break;case 2:D+=`one of ${$[0]} or ${$[1]}`;break;default:{const Y=$.pop();D+=`one of ${$.join(", ")}, or ${Y}`}}if(I==null)D+=`. Received ${I}`;else if(typeof I==="function"&&I.name)D+=`. Received function ${I.name}`;else if(typeof I==="object"){var n;if((n=I.constructor)!==null&&n!==void 0&&n.name)D+=`. Received an instance of ${I.constructor.name}`;else{const Y=G(I,{depth:-1});D+=`. Received ${Y}`}}else{let Y=G(I,{colors:!1});if(Y.length>25)Y=`${Y.slice(0,25)}...`;D+=`. Received type ${typeof I} (${Y})`}return D},TypeError),w("ERR_INVALID_ARG_VALUE",(Z,U,I="is invalid")=>{let D=G(U);if(D.length>128)D=D.slice(0,128)+"...";return`The ${Z.includes(".")?"property":"argument"} '${Z}' ${I}. Received ${D}`},TypeError),w("ERR_INVALID_RETURN_VALUE",(Z,U,I)=>{var D;const r=I!==null&&I!==void 0&&(D=I.constructor)!==null&&D!==void 0&&D.name?`instance of ${I.constructor.name}`:`type ${typeof I}`;return`Expected ${Z} to be returned from the "${U}" function but got ${r}.`},TypeError),w("ERR_MISSING_ARGS",(...Z)=>{c(Z.length>0,"At least one arg needs to be specified");let U;const I=Z.length;switch(Z=(Array.isArray(Z)?Z:[Z]).map((D)=>`"${D}"`).join(" or "),I){case 1:U+=`The ${Z[0]} argument`;break;case 2:U+=`The ${Z[0]} and ${Z[1]} arguments`;break;default:{const D=Z.pop();U+=`The ${Z.join(", ")}, and ${D} arguments`}break}return`${U} must be specified`},TypeError),w("ERR_OUT_OF_RANGE",(Z,U,I)=>{c(U,'Missing "range" argument');let D;if(Number.isInteger(I)&&Math.abs(I)>4294967296)D=C(String(I));else if(typeof I==="bigint"){if(D=String(I),I>2n**32n||I<-(2n**32n))D=C(D);D+="n"}else D=G(I);return`The value of "${Z}" is out of range. It must be ${U}. Received ${D}`},RangeError),w("ERR_MULTIPLE_CALLBACK","Callback called multiple times",Error),w("ERR_METHOD_NOT_IMPLEMENTED","The %s method is not implemented",Error),w("ERR_STREAM_ALREADY_FINISHED","Cannot call %s after a stream was finished",Error),w("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable",Error),w("ERR_STREAM_DESTROYED","Cannot call %s after a stream was destroyed",Error),w("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),w("ERR_STREAM_PREMATURE_CLOSE","Premature close",Error),w("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF",Error),w("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event",Error),w("ERR_STREAM_WRITE_AFTER_END","write after end",Error),w("ERR_UNKNOWN_ENCODING","Unknown encoding: %s",TypeError),j.exports={AbortError:x,aggregateTwoErrors:p(E),hideStackFrames:p,codes:k}}}),_q=Zq({"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:C,StringPrototypeTrim:l}=Vq(),{hideStackFrames:w,codes:{ERR_SOCKET_BAD_PORT:p,ERR_INVALID_ARG_TYPE:E,ERR_INVALID_ARG_VALUE:x,ERR_OUT_OF_RANGE:Z,ERR_UNKNOWN_SIGNAL:U}}=Wq(),{normalizeEncoding:I}=Eq(),{isAsyncFunction:D,isArrayBufferView:r}=Eq().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,X){if(typeof V==="undefined")V=X;if(typeof V==="string"){if(!k(Y,V))throw new x(h,V,K);V=g(V,8)}return u(V,h,0,4294967295),V}var m=w((V,h,X=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<X||V>H)throw new Z(h,`>= ${X} && <= ${H}`,V)}),u=w((V,h,X=-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,`>= ${X} && <= ${H}`,V)}if(V<X||V>H)throw new Z(h,`>= ${X} && <= ${H}`,V)}),J=w((V,h,X)=>{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,`>= ${X?1:0} && < 4294967296`,V)}if(X&&V===0)throw new Z(h,">= 1 && < 4294967296",V)});function z(V,h){if(typeof V!=="string")throw new E(h,"string",V)}function v(V,h){if(typeof V!=="number")throw new E(h,"number",V)}var S=w((V,h,X)=>{if(!G(X,V)){const L="must be one of: "+y(A(X,(d)=>typeof d==="string"?`'${d}'`:c(d)),", ");throw new x(h,V,L)}});function N(V,h){if(typeof V!=="boolean")throw new E(h,"boolean",V)}var W=w((V,h,X)=>{const H=X==null,L=H?!1:X.allowArray,d=H?!1:X.allowFunction;if(!(H?!1:X.nullable)&&V===null||!L&&B(V)||typeof V!=="object"&&(!d||typeof V!=="function"))throw new E(h,"Object",V)}),b=w((V,h,X=0)=>{if(!B(V))throw new E(h,"Array",V);if(V.length<X){const H=`must be longer than ${X}`;throw new x(h,V,H)}});function o(V,h="signal"){if(z(V,h),i[V]===void 0){if(i[C(V)]!==void 0)throw new U(V+" (signals must use all capital letters)");throw new U(V)}}var s=w((V,h="buffer")=>{if(!r(V))throw new E(h,["Buffer","TypedArray","DataView"],V)});function e(V,h){const X=I(h),H=V.length;if(X==="hex"&&H%2!==0)throw new x("encoding",h,`is invalid for data of length ${H}`)}function Jq(V,h="Port",X=!0){if(typeof V!=="number"&&typeof V!=="string"||typeof V==="string"&&l(V).length===0||+V!==+V>>>0||V>65535||V===0&&!X)throw new p(h,V,X);return V|0}var Yq=w((V,h)=>{if(V!==void 0&&(V===null||typeof V!=="object"||!("aborted"in V)))throw new E(h,"AbortSignal",V)}),qq=w((V,h)=>{if(typeof V!=="function")throw new E(h,"Function",V)}),Hq=w((V,h)=>{if(typeof V!=="function"||D(V))throw new E(h,"Function",V)}),Qq=w((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:v,validateObject:W,validateOneOf:S,validatePlainFunction:Hq,validatePort:Jq,validateSignalName:o,validateString:z,validateUint32:J,validateUndefined:Qq,validateAbortSignal:Yq}}}),Lq=Zq({"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 v;return!!(J&&typeof J.pipe==="function"&&typeof J.on==="function"&&(!z||typeof J.pause==="function"&&typeof J.resume==="function")&&(!J._writableState||((v=J._readableState)===null||v===void 0?void 0:v.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 C(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 w(J){if(!C(J))return null;const{_writableState:z,_readableState:v}=J,S=z||v;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 v=J._writableState;if(v!==null&&v!==void 0&&v.errored)return!1;if(typeof(v===null||v===void 0?void 0:v.finished)!=="boolean")return null;return!!(v.finished||z===!1&&v.ended===!0&&v.length===0)}function x(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 v=J._readableState;if(v!==null&&v!==void 0&&v.errored)return!1;if(typeof(v===null||v===void 0?void 0:v.endEmitted)!=="boolean")return null;return!!(v.endEmitted||z===!1&&v.ended===!0&&v.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(w(J))return!1;return g(J)&&J.readable&&!Z(J)}function I(J){if(typeof(J===null||J===void 0?void 0:J.writable)!=="boolean")return null;if(w(J))return!1;return k(J)&&J.writable&&!p(J)}function D(J,z){if(!C(J))return null;if(w(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&&I(J))return!1;return!0}function r(J){var z,v;if(!C(J))return null;if(J.writableErrored)return J.writableErrored;return(z=(v=J._writableState)===null||v===void 0?void 0:v.errored)!==null&&z!==void 0?z:null}function i(J){var z,v;if(!C(J))return null;if(J.readableErrored)return J.readableErrored;return(z=(v=J._readableState)===null||v===void 0?void 0:v.errored)!==null&&z!==void 0?z:null}function $(J){if(!C(J))return null;if(typeof J.closed==="boolean")return J.closed;const{_writableState:z,_readableState:v}=J;if(typeof(z===null||z===void 0?void 0:z.closed)==="boolean"||typeof(v===null||v===void 0?void 0:v.closed)==="boolean")return(z===null||z===void 0?void 0:z.closed)||(v===null||v===void 0?void 0:v.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(!C(J))return null;const{_writableState:z,_readableState:v}=J,S=z||v;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,v,S,N,W,b,o,s,e,Jq;return!!(J&&((z=(v=(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&&v!==void 0?v:(e=J._readableState)===null||e===void 0?void 0:e.errored)!==null&&z!==void 0?z:(Jq=J._writableState)===null||Jq===void 0?void 0:Jq.errored))}j.exports={kDestroyed:A,isDisturbed:m,kIsDisturbed:P,isErrored:u,kIsErrored:M,isReadable:U,kIsReadable:R,isClosed:$,isDestroyed:w,isDuplexNodeStream:c,isFinished:D,isIterable:l,isReadableNodeStream:g,isReadableEnded:x,isReadableFinished:Z,isReadableErrored:i,isNodeStream:C,isWritable:I,isWritableNodeStream:k,isWritableEnded:p,isWritableFinished:E,isWritableErrored:r,isServerRequest:K,isServerResponse:Y,willEmitClose:F}}}),jq=Zq({"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}=Eq(),{validateAbortSignal:R,validateFunction:P,validateObject:g}=_q(),{Promise:k}=Vq(),{isClosed:c,isReadable:C,isReadableNodeStream:l,isReadableFinished:w,isReadableErrored:p,isWritable:E,isWritableNodeStream:x,isWritableFinished:Z,isWritableErrored:U,isNodeStream:I,willEmitClose:D}=Lq();function r(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:x(Y);if(!I(Y))throw new y("stream","Stream",Y);const{_writableState:v,_readableState:S}=Y,N=()=>{if(!Y.writable)o()};let W=D(Y)&&l(Y)===J&&x(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=w(Y,!1);const e=()=>{if(s=!0,Y.destroyed)W=!1;if(W&&(!Y.writable||z))return;if(!z||b)F.call(Y)},Jq=(V)=>{F.call(Y,V)};let Yq=c(Y);const qq=()=>{Yq=!0;const V=U(Y)||p(Y);if(V&&typeof V!=="boolean")return F.call(Y,V);if(J&&!s&&l(Y,!0)){if(!w(Y,!1))return F.call(Y,new A)}if(z&&!b){if(!Z(Y,!1))return F.call(Y,new A)}F.call(Y)},Hq=()=>{Y.req.on("finish",o)};if(r(Y)){if(Y.on("complete",o),!W)Y.on("abort",qq);if(Y.req)Hq();else Y.on("request",Hq)}else if(z&&!v)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",Jq);if(Y.on("close",qq),Yq)Xq(qq);else if(v!==null&&v!==void 0&&v.errorEmitted||S!==null&&S!==void 0&&S.errorEmitted){if(!W)Xq(qq)}else if(!J&&(!W||C(Y))&&(b||E(Y)===!1))Xq(qq);else if(!z&&(!W||E(Y))&&(s||C(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",Hq),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",Jq),Y.removeListener("close",qq)};if(K.signal&&!Yq){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((...X)=>{K.signal.removeEventListener("abort",V),h.apply(Y,X)}),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}}),QQ=Zq({"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}=_q(),g=Vq().Symbol("kWeak"),{finished:k}=jq(),{ArrayPrototypePush:c,MathFloor:C,Number:l,NumberIsNaN:w,Promise:p,PromiseReject:E,PromisePrototypeCatch:x,Symbol:Z}=Vq(),U=Z("kEmpty"),I=Z("kEof");function D(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=C(W.concurrency);return R(b,"concurrency",1),async function*o(){var s,e;const Jq=new AbortController,Yq=this,qq=[],Hq=Jq.signal,Qq={signal:Hq},V=()=>Jq.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,X,H=!1;function L(){H=!0}async function d(){try{for await(let Q of Yq){var f;if(H)return;if(Hq.aborted)throw new A;try{Q=N(Q,Qq)}catch(T){Q=E(T)}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((T)=>{X=T})}qq.push(I)}catch(Q){const T=E(Q);x(T,L),qq.push(T)}finally{var q;if(H=!0,h)h(),h=null;W===null||W===void 0||(q=W.signal)===null||q===void 0||q.removeEventListener("abort",V)}}d();try{while(!0){while(qq.length>0){const f=await qq[0];if(f===I)return;if(Hq.aborted)throw new A;if(f!==U)yield f;if(qq.shift(),X)X(),X=null}await new p((f)=>{h=f})}}finally{if(Jq.abort(),H=!0,X)X(),X=null}}.call(this)}function r(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 D.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 D.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 Hq=new A(void 0,{cause:b.signal.reason});throw this.once("error",()=>{}),await k(this.destroy(Hq)),Hq}const e=new AbortController,Jq=e.signal;if(b!==null&&b!==void 0&&b.signal){const Hq={once:!0,[g]:this};b.signal.addEventListener("abort",()=>e.abort(),Hq)}let Yq=!1;try{for await(let Hq of this){var qq;if(Yq=!0,b!==null&&b!==void 0&&(qq=b.signal)!==null&&qq!==void 0&&qq.aborted)throw new A;if(!s)W=Hq,s=!0;else W=await N(W,Hq,{signal:Jq})}if(!Yq&&!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=D.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),w(N))return 0;if(N<0)throw new y("number",">= 0",N);return N}function v(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:r,drop:v,filter:K,flatMap:J,map:D,take:S},j.exports.promiseReturningOperators={every:$,forEach:Y,reduce:m,toArray:u,some:i,find:n}}}),Pq=Zq({"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}=Lq(),k="#kDestroy",c="#kConstruct";function C(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(C(K,u,m),u)u.destroyed=!0;if(m)m.destroyed=!0;if(!J.constructed)this.once(k,(z)=>{w(this,B(z,K),F)});else w(this,K,F);return this}function w(K,F,m){let u=!1;function J(z){if(u)return;u=!0;const{_readableState:v,_writableState:S}=K;if(C(z,S,v),S)S.closed=!0;if(v)v.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){x(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 x(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(x,K,F);else x(K,F)}}function I(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(D,K)}function D(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,v=z||J;if(J)J.constructed=!0;if(z)z.constructed=!0;if(v.destroyed)K.emit(k,u);else if(u)U(K,u,!0);else Xq(r,K)}try{K._construct(m)}catch(u){m(u)}}function r(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:I,destroyer:Y,destroy:l,undestroy:Z,errorOrDestroy:U}}}),kq=Zq({"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);Tq.call(this,M)}G(y.prototype,Tq.prototype),G(y,Tq),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",C),P.on("close",l);let c=!1;function C(){if(c)return;c=!0,M.end()}function l(){if(c)return;if(c=!0,typeof M.destroy==="function")M.destroy()}function w(E){if(p(),Tq.listenerCount(this,"error")===0)this.emit("error",E)}A(P,"error",w),A(M,"error",w);function p(){P.removeListener("data",g),M.removeListener("drain",k),P.removeListener("end",C),P.removeListener("close",l),P.removeListener("error",w),M.removeListener("error",w),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}}}),fq=Zq({"node_modules/readable-stream/lib/internal/streams/add-abort-signal.js"(a,j){var{AbortError:B,codes:G}=Wq(),y=jq(),{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}}}),XQ=Zq({"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 C=A(g,c,k);if(C!=null){if(!G(C)||C<0){const l=c?`options.${k}`:"options.highWaterMark";throw new y(l,C)}return B(C)}return M(P.objectMode)}j.exports={getHighWaterMark:R,getDefaultHighWaterMark:M}}}),hq=Zq({"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 C;if(g&&g[G])C=!0,c=g[G]();else if(g&&g[y])C=!1,c=g[y]();else throw new A("iterable",["Iterable"],g);const l=new P({objectMode:!0,highWaterMark:1,...k});let w=!1;l._read=function(){if(!w)w=!0,E()},l._destroy=function(x,Z){B(p(x),()=>Xq(Z,x),(U)=>Xq(Z,U||x))};async function p(x){const Z=x!==void 0&&x!==null,U=typeof c.throw==="function";if(Z&&U){const{value:I,done:D}=await c.throw(x);if(await I,D)return}if(typeof c.return==="function"){const{value:I}=await c.return();await I}}async function E(){for(;;){try{const{value:x,done:Z}=C?await c.next():c.next();if(Z)l.push(null);else{const U=x&&typeof x.then==="function"?await x:x;if(U===null)throw w=!1,new M;else if(l.push(U))continue;else w=!1}}catch(x){l.destroy(x)}break}}return l}j.exports=R}}),pq,uq,Dq=Zq({"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:C}=Vq(),l=globalThis[Symbol.for("Bun.lazy")]("bun:stream").ReadableState,{Stream:w,prependListener:p}=kq();function E(q){if(!(this instanceof E))return new E(q);const Q=this instanceof Fq();if(this._readableState=new l(q,this,Q),q){const{read:T,destroy:O,construct:_,signal:t}=q;if(typeof T==="function")this._read=T;if(typeof O==="function")this._destroy=O;if(typeof _==="function")this._construct=_;if(t&&!Q)U(t,this)}w.call(this,q),K.construct(this,()=>{if(this._readableState.needReadable)n(this,this._readableState)})}P(E.prototype,w.prototype),P(E,w),E.prototype.on=function(q,Q){const T=w.prototype.on.call(this,q,Q),O=this._readableState;if(q==="data"){if(O.readableListening=this.listenerCount("readable")>0,O.flowing!==!1)this.resume()}else if(q==="readable"){if(!O.endEmitted&&!O.readableListening){if(O.readableListening=O.needReadable=!0,O.flowing=!1,O.emittedReadable=!1,O.length)Y(this,O);else if(!O.reading)Xq(Qq,this)}else if(O.endEmitted);}return T};class x extends E{#q;#Q;#X;#H;constructor(q,Q){const{objectMode:T,highWaterMark:O,encoding:_,signal:t}=q;super({objectMode:T,highWaterMark:O,encoding:_,signal:t});this.#X=[],this.#q=void 0,this.#H=Q,this.#Q=!1}#J(){var q=this.#X,Q=0,T=q.length;for(;Q<T;Q++){const O=q[Q];if(q[Q]=void 0,!this.push(O,void 0))return this.#X=q.slice(Q+1),!0}if(T>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,Q=this.#q;if(q)Q=this.#q=q.getReader(),this.#H=void 0;else if(this.#J())return;var T;try{do{var O=!1,_;const t=Q.readMany();if(Oq(t)){if({done:O,value:_}=await t,this.#Q){this.#X.push(..._);return}}else({done:O,value:_}=t);if(O){this.#K(Q);return}if(!this.push(_[0])){this.#X=_.slice(1);return}for(let Kq=1,Iq=_.length;Kq<Iq;Kq++)if(!this.push(_[Kq])){this.#X=_.slice(Kq+1);return}}while(!this.#Q)}catch(t){T=t}finally{if(T)throw T}}_destroy(q,Q){if(!this.#Q){var T=this.#q;if(T)this.#q=void 0,T.cancel(q).finally(()=>{this.#Q=!0,Q(q)});return}try{Q(q)}catch(O){globalThis.reportError(O)}}}uq=x;function Z(q,Q={}){if(!rq(q))throw new m("readableStream","ReadableStream",q);S(Q,"options");const{highWaterMark:T,encoding:O,objectMode:_=!1,signal:t}=Q;if(O!==void 0&&!Buffer.isEncoding(O))throw new qQ(O,"options.encoding");return tq(_,"options.objectMode"),$Q(E,q,Q)||new x({highWaterMark:T,encoding:O,objectMode:_,signal:t},q)}j.exports=E,pq=Z;var{addAbortSignal:U}=fq(),I=jq();const{maybeReadMore:D,resume:r,emitReadable:i,onEofChunk:$}=globalThis[Symbol.for("Bun.lazy")]("bun:stream");function n(q,Q){process.nextTick(D,q,Q)}function Y(q,Q){i(q,Q)}var K=Pq(),{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:v}}=Wq(),{validateObject:S}=_q(),N=hq(),W=()=>{},{errorOrDestroy:b}=K;E.prototype.destroy=K.destroy,E.prototype._undestroy=K.undestroy,E.prototype._destroy=function(q,Q){Q(q)},E.prototype[Tq.captureRejectionSymbol]=function(q){this.destroy(q)},E.prototype.push=function(q,Q){return o(this,q,Q,!1)},E.prototype.unshift=function(q,Q){return o(this,q,Q,!0)};function o(q,Q,T,O){const _=q._readableState;let t;if(!_.objectMode){if(typeof Q==="string"){if(T=T||_.defaultEncoding,_.encoding!==T)if(O&&_.encoding)Q=Buffer.from(Q,T).toString(_.encoding);else Q=Buffer.from(Q,T),T=""}else if(Q instanceof Buffer)T="";else if(w._isUint8Array(Q)){if(O||!_.decoder)Q=w._uint8ArrayToBuffer(Q);T=""}else if(Q!=null)t=new m("chunk",["string","Buffer","Uint8Array"],Q)}if(t)b(q,t);else if(Q===null)_.reading=!1,$(q,_);else if(_.objectMode||Q&&Q.length>0)if(O)if(_.endEmitted)b(q,new v);else if(_.destroyed||_.errored)return!1;else s(q,_,Q,!0);else if(_.ended)b(q,new z);else if(_.destroyed||_.errored)return!1;else if(_.reading=!1,_.decoder&&!T)if(Q=_.decoder.write(Q),_.objectMode||Q.length!==0)s(q,_,Q,!1);else n(q,_);else s(q,_,Q,!1);else if(!O)_.reading=!1,n(q,_);return!_.ended&&(_.length<_.highWaterMark||_.length===0)}function s(q,Q,T,O){if(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",T)}else{if(Q.length+=Q.objectMode?1:T.length,O)Q.buffer.unshift(T);else Q.buffer.push(T);if(Q.needReadable)Y(q,Q)}n(q,Q)}E.prototype.isPaused=function(){const q=this._readableState;return q.paused===!0||q.flowing===!1},E.prototype.setEncoding=function(q){const Q=new sq(q);this._readableState.decoder=Q,this._readableState.encoding=this._readableState.decoder.encoding;const T=this._readableState.buffer;let O="";for(let _=T.length;_>0;_--)O+=Q.write(T.shift());if(O!=="")T.push(O);return this._readableState.length=O.length,this};var e=1073741824;function Jq(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 Yq(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}E.prototype.read=function(q){if(!G(q))q=A(q,10);const Q=this._readableState,T=q;if(q>Q.highWaterMark)Q.highWaterMark=Jq(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(Q.length===0&&Q.ended)H(this);else Y(this,Q);return null}if(q=Yq(q,Q),q===0&&Q.ended){if(Q.length===0)H(this);return null}let O=Q.needReadable;if(Q.length===0||Q.length-q<Q.highWaterMark)O=!0;if(Q.ended||Q.reading||Q.destroyed||Q.errored||!Q.constructed)O=!1;else if(O){if(Q.reading=!0,Q.sync=!0,Q.length===0)Q.needReadable=!0;try{var _=this._read(Q.highWaterMark);if(Oq(_)){const Kq=Bun.peek(_);if(Kq!==_)_=Kq}if(Oq(_)&&_?.then&&nq(_.then))_.then(W,function(Kq){b(this,Kq)})}catch(Kq){b(this,Kq)}if(Q.sync=!1,!Q.reading)q=Yq(T,Q)}let t;if(q>0)t=X(q,Q);else t=null;if(t===null)Q.needReadable=Q.length<=Q.highWaterMark,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(T!==q&&Q.ended)H(this)}if(t!==null&&!Q.errorEmitted&&!Q.closeEmitted)Q.dataEmitted=!0,this.emit("data",t);return t},E.prototype._read=function(q){throw new u("_read()")},E.prototype.pipe=function(q,Q){const T=this,O=this._readableState;if(O.pipes.length===1){if(!O.multiAwaitDrain)O.multiAwaitDrain=!0,O.awaitDrainWriters=new k(O.awaitDrainWriters?[O.awaitDrainWriters]:[])}O.pipes.push(q);const t=(!Q||Q.end!==!1)&&q!==process.stdout&&q!==process.stderr?Iq:xq;if(O.endEmitted)Xq(t);else T.once("end",t);q.on("unpipe",Kq);function Kq(Nq,Aq){if(Nq===T){if(Aq&&Aq.hasUnpiped===!1)Aq.hasUnpiped=!0,wq()}}function Iq(){q.end()}let Gq,Cq=!1;function wq(){if(q.removeListener("close",Sq),q.removeListener("finish",gq),Gq)q.removeListener("drain",Gq);if(q.removeListener("error",Rq),q.removeListener("unpipe",Kq),T.removeListener("end",Iq),T.removeListener("end",xq),T.removeListener("data",vq),Cq=!0,Gq&&O.awaitDrainWriters&&(!q._writableState||q._writableState.needDrain))Gq()}function $q(){if(!Cq){if(O.pipes.length===1&&O.pipes[0]===q)O.awaitDrainWriters=q,O.multiAwaitDrain=!1;else if(O.pipes.length>1&&O.pipes.includes(q))O.awaitDrainWriters.add(q);T.pause()}if(!Gq)Gq=qq(T,q),q.on("drain",Gq)}T.on("data",vq);function vq(Nq){if(q.write(Nq)===!1)$q()}function Rq(Nq){if(Mq("onerror",Nq),xq(),q.removeListener("error",Rq),q.listenerCount("error")===0){const Aq=q._writableState||q._readableState;if(Aq&&!Aq.errorEmitted)b(q,Nq);else q.emit("error",Nq)}}p(q,"error",Rq);function Sq(){q.removeListener("finish",gq),xq()}q.once("close",Sq);function gq(){Mq("onfinish"),q.removeListener("close",Sq),xq()}q.once("finish",gq);function xq(){Mq("unpipe"),T.unpipe(q)}if(q.emit("pipe",T),q.writableNeedDrain===!0){if(O.flowing)$q()}else if(!O.flowing)Mq("pipe resume"),T.resume();return q};function qq(q,Q){return function T(){const O=q._readableState;if(O.awaitDrainWriters===Q)Mq("pipeOnDrain",1),O.awaitDrainWriters=null;else if(O.multiAwaitDrain)Mq("pipeOnDrain",O.awaitDrainWriters.size),O.awaitDrainWriters.delete(Q);if((!O.awaitDrainWriters||O.awaitDrainWriters.size===0)&&q.listenerCount("data"))q.resume()}}E.prototype.unpipe=function(q){const Q=this._readableState,T={hasUnpiped:!1};if(Q.pipes.length===0)return this;if(!q){const _=Q.pipes;Q.pipes=[],this.pause();for(let t=0;t<_.length;t++)_[t].emit("unpipe",this,{hasUnpiped:!1});return this}const O=B(Q.pipes,q);if(O===-1)return this;if(Q.pipes.splice(O,1),Q.pipes.length===0)this.pause();return q.emit("unpipe",this,T),this},E.prototype.addListener=E.prototype.on,E.prototype.removeListener=function(q,Q){const T=w.prototype.removeListener.call(this,q,Q);if(q==="readable")Xq(Hq,this);return T},E.prototype.off=E.prototype.removeListener,E.prototype.removeAllListeners=function(q){const Q=w.prototype.removeAllListeners.apply(this,arguments);if(q==="readable"||q===void 0)Xq(Hq,this);return Q};function Hq(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 Qq(q){q.read(0)}E.prototype.resume=function(){const q=this._readableState;if(!q.flowing)q.flowing=!q.readableListening,r(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 Q=!1;q.on("data",(O)=>{if(!this.push(O)&&q.pause)Q=!0,q.pause()}),q.on("end",()=>{this.push(null)}),q.on("error",(O)=>{b(this,O)}),q.on("close",()=>{this.destroy()}),q.on("destroy",()=>{this.destroy()}),this._read=()=>{if(Q&&q.resume)Q=!1,q.resume()};const T=R(q);for(let O=1;O<T.length;O++){const _=T[O];if(this[_]===void 0&&typeof q[_]==="function")this[_]=q[_].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,Q){if(typeof q.read!=="function")q=E.wrap(q,{objectMode:!0});const T=h(q,Q);return T.stream=q,T}async function*h(q,Q){let T=W;function O(Kq){if(this===q)T(),T=W;else T=Kq}q.on("readable",O);let _;const t=I(q,{writable:!1},(Kq)=>{_=Kq?F(_,Kq):null,T(),T=W});try{while(!0){const Kq=q.destroyed?null:q.read();if(Kq!==null)yield Kq;else if(_)throw _;else if(_===null)return;else await new g(O)}}catch(Kq){throw _=F(_,Kq),_}finally{if((_||(Q===null||Q===void 0?void 0:Q.destroyOnReturn)!==!1)&&(_===void 0||q._readableState.autoDestroy))K.destroyer(q,null);else q.off("readable",O),t()}}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=X;function X(q,Q){if(Q.length===0)return null;let T;if(Q.objectMode)T=Q.buffer.shift();else if(!q||q>=Q.length){if(Q.decoder)T=Q.buffer.join("");else if(Q.buffer.length===1)T=Q.buffer.first();else T=Q.buffer.concat(Q.length);Q.buffer.clear()}else T=Q.buffer.consume(q,Q.decoder);return T}function H(q){const Q=q._readableState;if(!Q.endEmitted)Q.ended=!0,Xq(L,Q,q)}function L(q,Q){if(!q.errored&&!q.closeEmitted&&!q.endEmitted&&q.length===0){if(q.endEmitted=!0,Q.emit("end"),Q.writable&&Q.allowHalfOpen===!1)Xq(d,Q);else if(q.autoDestroy){const T=Q._writableState;if(!T||T.autoDestroy&&(T.finished||T.writable===!1))Q.destroy()}}}function d(q){if(q.writable&&!q.writableEnded&&!q.destroyed)q.end()}E.from=function(q,Q){return N(E,q,Q)};var f={newStreamReadableFromReadableStream:Z,newReadableStreamFromStreamReadable(q,Q={}){if(typeof q?._readableState!=="object")throw new m("streamReadable","stream.Readable",q);var{isDestroyed:T,isReadable:O}=Lq();if(T(q)||!O(q)){const $q=new ReadableStream;return $q.cancel(),$q}const{readableObjectMode:_,readableHighWaterMark:t}=q,Iq=(($q)=>{if($q)return $q;if(_)return new CountQueuingStrategy({highWaterMark:t});return{highWaterMark:t}})(Q?.strategy);let Gq;function Cq($q){if(Gq.enqueue($q),Gq.desiredSize<=0)q.pause()}q.pause();const wq=zQ(q,($q)=>{if($q?.code==="ERR_STREAM_PREMATURE_CLOSE")$q=new AbortError(void 0,{cause:$q});if(wq(),q.on("error",()=>{}),$q)return Gq.error($q);Gq.close()});return q.on("data",Cq),new ReadableStream({start($q){Gq=$q},pull(){q.resume()},cancel($q){VQ(q,$q)}},Iq)}};E.fromWeb=function(q,Q){return f.newStreamReadableFromReadableStream(q,Q)},E.toWeb=function(q,Q){return f.newReadableStreamFromStreamReadable(q,Q)},E.wrap=function(q,Q){var T,O;return new E({objectMode:(T=(O=q.readableObjectMode)!==null&&O!==void 0?O:q.objectMode)!==null&&T!==void 0?T:!0,...Q,destroy(_,t){K.destroyer(q,_),t(_)}}).wrap(q)}}}),bq=Zq({"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=kq().Stream,C=Pq(),{addAbortSignal:l}=fq(),{getHighWaterMark:w,getDefaultHighWaterMark:p}=XQ(),{ERR_INVALID_ARG_TYPE:E,ERR_METHOD_NOT_IMPLEMENTED:x,ERR_MULTIPLE_CALLBACK:Z,ERR_STREAM_CANNOT_PIPE:U,ERR_STREAM_DESTROYED:I,ERR_STREAM_ALREADY_FINISHED:D,ERR_STREAM_NULL_VALUES:r,ERR_STREAM_WRITE_AFTER_END:i,ERR_UNKNOWN_ENCODING:$}=Wq().codes,{errorOrDestroy:n}=C;function Y(X={}){const H=this instanceof Fq();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)l(X.signal,this)}c.call(this,X),C.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(X,H,L){if(typeof L!=="boolean")L=H instanceof Fq();if(this.objectMode=!!(X&&X.objectMode),L)this.objectMode=this.objectMode||!!(X&&X.writableObjectMode);this.highWaterMark=X?w(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 d=!!(X&&X.decodeStrings===!1);this.decodeStrings=!d,this.defaultEncoding=X&&X.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=!X||X.emitClose!==!1,this.autoDestroy=!X||X.autoDestroy!==!1,this.errored=null,this.closed=!1,this.closeEmitted=!1,this[F]=[]}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)},A(m.prototype,"bufferedRequestCount",{get(){return this.buffered.length-this.bufferedIndex}}),A(Y,k,{value:function(X){if(y(this,X))return!0;if(this!==Y)return!1;return X&&X._writableState instanceof m}}),Y.prototype.pipe=function(){n(this,new U)};function J(X,H,L,d){const f=X._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 r;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 q;if(f.ending)q=new i;else if(f.destroyed)q=new I("write");if(q)return Xq(d,q),n(X,q,!0),q;return f.pendingcb++,z(X,f,H,L,d)}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)s(this,X)}},Y.prototype.setDefaultEncoding=function X(H){if(typeof H==="string")H=P(H);if(!Buffer.isEncoding(H))throw new $(H);return this._writableState.defaultEncoding=H,this};function z(X,H,L,d,f){const q=H.objectMode?1:L.length;H.length+=q;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=q,H.writecb=f,H.writing=!0,H.sync=!0,X._write(L,d,H.onwrite),H.sync=!1;return Q&&!H.errored&&!H.destroyed}function v(X,H,L,d,f,q,Q){if(H.writelen=d,H.writecb=Q,H.writing=!0,H.sync=!0,H.destroyed)H.onwrite(new I("write"));else if(L)X._writev(f,H.onwrite);else X._write(f,q,H.onwrite);H.sync=!1}function S(X,H,L,d){--H.pendingcb,d(L),o(H),n(X,L)}function N(X,H){const L=X._writableState,d=L.sync,f=L.writecb;if(typeof f!=="function"){n(X,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(X._readableState&&!X._readableState.errored)X._readableState.errored=H;if(d)Xq(S,X,L,H,f);else S(X,L,H,f)}else{if(L.buffered.length>L.bufferedIndex)s(X,L);if(d)if(L.afterWriteTickInfo!==null&&L.afterWriteTickInfo.cb===f)L.afterWriteTickInfo.count++;else L.afterWriteTickInfo={count:1,cb:f,stream:X,state:L},Xq(W,L.afterWriteTickInfo);else b(X,L,1,f)}}function W({stream:X,state:H,count:L,cb:d}){return H.afterWriteTickInfo=null,b(X,H,L,d)}function b(X,H,L,d){if(!H.ending&&!X.destroyed&&H.length===0&&H.needDrain)H.needDrain=!1,X.emit("drain");while(L-- >0)H.pendingcb--,d();if(H.destroyed)o(H);qq(X,H)}function o(X){if(X.writing)return;for(let f=X.bufferedIndex;f<X.buffered.length;++f){var H;const{chunk:q,callback:Q}=X.buffered[f],T=X.objectMode?1:q.length;X.length-=T,Q((H=X.errored)!==null&&H!==void 0?H:new I("write"))}const L=X[F].splice(0);for(let f=0;f<L.length;f++){var d;L[f]((d=X.errored)!==null&&d!==void 0?d:new I("end"))}u(X)}function s(X,H){if(H.corked||H.bufferProcessing||H.destroyed||!H.constructed)return;const{buffered:L,bufferedIndex:d,objectMode:f}=H,q=L.length-d;if(!q)return;let Q=d;if(H.bufferProcessing=!0,q>1&&X._writev){H.pendingcb-=q-1;const T=H.allNoop?K:(_)=>{for(let t=Q;t<L.length;++t)L[t].callback(_)},O=H.allNoop&&Q===0?L:B(L,Q);O.allBuffers=H.allBuffers,v(X,H,!0,H.length,O,"",T),u(H)}else{do{const{chunk:T,encoding:O,callback:_}=L[Q];L[Q++]=null;const t=f?1:T.length;v(X,H,!1,t,T,O,_)}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 x("_write()")},Y.prototype._writev=null,Y.prototype.end=function(X,H,L,d=!1){const f=this._writableState;if(typeof X==="function")L=X,X=null,H=null;else if(typeof H==="function")L=H,H=null;let q;if(X!==null&&X!==void 0){let Q;if(!d)Q=J(this,X,H);else Q=this.write(X,H);if(Q instanceof G)q=Q}if(f.corked)f.corked=1,this.uncork();if(q)this.emit("error",q);else if(!f.errored&&!f.ending)f.ending=!0,qq(this,f,!0),f.ended=!0;else if(f.finished)q=new D("end");else if(f.destroyed)q=new I("end");if(typeof L==="function")if(q||f.finished)Xq(L,q);else f[F].push(L);return this};function e(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 Mq("needFinish",L,H),L}function Jq(X,H){let L=!1;function d(f){if(L){n(X,f!==null&&f!==void 0?f:Z());return}if(L=!0,H.pendingcb--,f){const q=H[F].splice(0);for(let Q=0;Q<q.length;Q++)q[Q](f);n(X,f,H.sync)}else if(e(H))H.prefinished=!0,X.emit("prefinish"),H.pendingcb++,Xq(Hq,X,H)}H.sync=!0,H.pendingcb++;try{X._final(d)}catch(f){d(f)}H.sync=!1}function Yq(X,H){if(!H.prefinished&&!H.finalCalled)if(typeof X._final==="function"&&!H.destroyed)H.finalCalled=!0,Jq(X,H);else H.prefinished=!0,X.emit("prefinish")}function qq(X,H,L){if(!e(H,X.__id))return;if(Yq(X,H),H.pendingcb===0){if(L)H.pendingcb++,Xq((d,f)=>{if(e(f))Hq(d,f);else f.pendingcb--},X,H);else if(e(H))H.pendingcb++,Hq(X,H)}}function Hq(X,H){H.pendingcb--,H.finished=!0;const L=H[F].splice(0);for(let d=0;d<L.length;d++)L[d]();if(X.emit("finish"),H.autoDestroy){const d=X._readableState;if(!d||d.autoDestroy&&(d.endEmitted||d.readable===!1))X.destroy()}}M(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 Qq=C.destroy;Y.prototype.destroy=function(X,H){const L=this._writableState;if(!L.destroyed&&(L.bufferedIndex<L.buffered.length||L[F].length))Xq(o,L);return Qq.call(this,X,H),this},Y.prototype._undestroy=C.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)}}}),JQ=Zq({"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}=Lq(),g=jq(),{AbortError:k,codes:{ERR_INVALID_ARG_TYPE:c,ERR_INVALID_RETURN_VALUE:C}}=Wq(),{destroyer:l}=Pq(),w=Fq(),p=Dq(),{createDeferredPromise:E}=Eq(),x=hq(),Z=typeof Blob!=="undefined"?function i($){return $ instanceof Blob}:function i($){return!1},{FunctionPrototypeCall:U}=Vq();class I extends w{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 r({readable:$});if(R($))return r({writable:$});if(A($))return r({writable:!1,readable:!1});if(typeof $==="function"){const{value:K,write:F,final:m,destroy:u}=D($);if(y(K))return x(I,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 v=U(J,K,(S)=>{if(S!=null)throw new C("nully","body",S)},(S)=>{l(z,S)});return z=new I({objectMode:!0,readable:!1,write:F,final(S){m(async()=>{try{await v,Xq(S,null)}catch(N){Xq(S,N)}})},destroy:u})}throw new C("Iterable, AsyncIterable or AsyncFunction",n,K)}if(Z($))return i($.arrayBuffer());if(y($))return x(I,$,{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 r({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 I({objectMode:!0,writable:!1,read(){}})}throw new c(n,["Blob","ReadableStream","WritableStream","Stream","Iterable","AsyncIterable","Function","{ readable, writable } pair","Promise"],$)};function D(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 r(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 v(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 I({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);v(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);v(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}}}),Fq=Zq({"node_modules/readable-stream/lib/internal/streams/duplex.js"(a,j){var{ObjectDefineProperties:B,ObjectGetOwnPropertyDescriptor:G,ObjectKeys:y,ObjectSetPrototypeOf:A}=Vq(),M=Dq();function R(C){if(!(this instanceof R))return new R(C);if(M.call(this,C),Uq.call(this,C),C){if(this.allowHalfOpen=C.allowHalfOpen!==!1,C.readable===!1)this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0;if(C.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(C){if(this._readableState&&this._writableState)this._readableState.destroyed=C,this._writableState.destroyed=C}}});var g;function k(){if(g===void 0)g={};return g}R.fromWeb=function(C,l){return k().newStreamDuplexFromReadableWritablePair(C,l)},R.toWeb=function(C){return k().newReadableWritablePairFromDuplex(C)};var c;R.from=function(C){if(!c)c=JQ();return c(C,"body")}}}),mq=Zq({"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=Fq();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,C)=>{if(c){if(k)k(c);else this.destroy(c);return}if(C!=null)this.push(C);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,C){throw new y("_transform()")},M.prototype._write=function(k,c,C){const l=this._readableState,w=this._writableState,p=l.length;this._transform(k,c,(E,x)=>{if(E){C(E);return}if(x!=null)this.push(x);if(w.ended||p===l.length||l.length<l.highWaterMark||l.highWaterMark===0||l.length===0)C();else this[R]=C})},M.prototype._read=function(){if(this[R]){const k=this[R];this[R]=null,k()}}}}),cq=Zq({"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}}),yq=Zq({"node_modules/readable-stream/lib/internal/streams/pipeline.js"(a,j){var{ArrayIsArray:B,Promise:G,SymbolAsyncIterator:y}=Vq(),A=jq(),{once:M}=Eq(),R=Pq(),P=Fq(),{aggregateTwoErrors:g,codes:{ERR_INVALID_ARG_TYPE:k,ERR_INVALID_RETURN_VALUE:c,ERR_MISSING_ARGS:C,ERR_STREAM_DESTROYED:l},AbortError:w}=Wq(),{validateFunction:p,validateAbortSignal:E}=_q(),{isIterable:x,isReadable:Z,isReadableNodeStream:U,isNodeStream:I}=Lq(),D,r;function i(J,z,v){let S=!1;J.on("close",()=>{S=!0});const N=A(J,{readable:z,writable:v},(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(x(J))return J;else if(U(J))return Y(J);throw new k("val",["Readable","Iterable","AsyncIterable"],J)}async function*Y(J){if(!r)r=Dq();yield*r.prototype[y].call(J)}async function K(J,z,v,{end:S}){let N,W=null;const b=(e)=>{if(e)N=e;if(W){const Jq=W;W=null,Jq()}},o=()=>new G((e,Jq)=>{if(N)Jq(N);else W=()=>{if(N)Jq(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(),v()}catch(e){v(N!==e?g(N,e):e)}finally{s(),z.off("drain",b)}}function F(...J){return m(J,M($(J)))}function m(J,z,v){if(J.length===1&&B(J[0]))J=J[0];if(J.length<2)throw new C("streams");const S=new AbortController,N=S.signal,W=v===null||v===void 0?void 0:v.signal,b=[];E(W,"options.signal");function o(){Hq(new w)}W===null||W===void 0||W.addEventListener("abort",o);let s,e;const Jq=[];let Yq=0;function qq(h){Hq(h,--Yq===0)}function Hq(h,X){if(h&&(!s||s.code==="ERR_STREAM_PREMATURE_CLOSE"))s=h;if(!s&&!X)return;while(Jq.length)Jq.shift()(s);if(W===null||W===void 0||W.removeEventListener("abort",o),S.abort(),X){if(!s)b.forEach((H)=>H());Xq(z,s,e)}}let Qq;for(let h=0;h<J.length;h++){const X=J[h],H=h<J.length-1,L=h>0,d=H||(v===null||v===void 0?void 0:v.end)!==!1,f=h===J.length-1;if(I(X)){let q=function(Q){if(Q&&Q.name!=="AbortError"&&Q.code!=="ERR_STREAM_PREMATURE_CLOSE")qq(Q)};if(d){const{destroy:Q,cleanup:T}=i(X,H,L);if(Jq.push(Q),Z(X)&&f)b.push(T)}if(X.on("error",q),Z(X)&&f)b.push(()=>{X.removeListener("error",q)})}if(h===0)if(typeof X==="function"){if(Qq=X({signal:N}),!x(Qq))throw new c("Iterable, AsyncIterable or Stream","source",Qq)}else if(x(X)||U(X))Qq=X;else Qq=P.from(X);else if(typeof X==="function")if(Qq=n(Qq),Qq=X(Qq,{signal:N}),H){if(!x(Qq,!0))throw new c("AsyncIterable",`transform[${h-1}]`,Qq)}else{var V;if(!D)D=cq();const q=new D({objectMode:!0}),Q=(V=Qq)===null||V===void 0?void 0:V.then;if(typeof Q==="function")Yq++,Q.call(Qq,(_)=>{if(e=_,_!=null)q.write(_);if(d)q.end();Xq(qq)},(_)=>{q.destroy(_),Xq(qq,_)});else if(x(Qq,!0))Yq++,K(Qq,q,qq,{end:d});else throw new c("AsyncIterable or Promise","destination",Qq);Qq=q;const{destroy:T,cleanup:O}=i(Qq,!1,!0);if(Jq.push(T),f)b.push(O)}else if(I(X)){if(U(Qq)){Yq+=2;const q=u(Qq,X,qq,{end:d});if(Z(X)&&f)b.push(q)}else if(x(Qq))Yq++,K(Qq,X,qq,{end:d});else throw new k("val",["Readable","Iterable","AsyncIterable"],Qq);Qq=X}else Qq=P.from(X)}if(N!==null&&N!==void 0&&N.aborted||W!==null&&W!==void 0&&W.aborted)Xq(o);return Qq}function u(J,z,v,{end:S}){if(J.pipe(z,{end:S}),S)J.once("end",()=>z.end());else v();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",v).once("error",v);else v(N)}),A(z,{readable:!1,writable:!0},v)}j.exports={pipelineImpl:m,pipeline:F}}}),HQ=Zq({"node_modules/readable-stream/lib/internal/streams/compose.js"(a,j){var{pipeline:B}=yq(),G=Fq(),{destroyer:y}=Pq(),{isNodeStream:A,isReadable:M,isWritable:R}=Lq(),{AbortError:P,codes:{ERR_INVALID_ARG_VALUE:g,ERR_MISSING_ARGS:k}}=Wq();j.exports=function c(...C){if(C.length===0)throw new k("streams");if(C.length===1)return G.from(C[0]);const l=[...C];if(typeof C[0]==="function")C[0]=G.from(C[0]);if(typeof C[C.length-1]==="function"){const $=C.length-1;C[$]=G.from(C[$])}for(let $=0;$<C.length;++$){if(!A(C[$]))continue;if($<C.length-1&&!M(C[$]))throw new g(`streams[${$}]`,l[$],"must be readable");if($>0&&!R(C[$]))throw new g(`streams[${$}]`,l[$],"must be writable")}let w,p,E,x,Z;function U($){const n=x;if(x=null,n)n($);else if($)Z.destroy($);else if(!i&&!r)Z.destroy()}const I=C[0],D=B(C,U),r=!!R(I),i=!!M(D);if(Z=new G({writableObjectMode:!!(I!==null&&I!==void 0&&I.writableObjectMode),readableObjectMode:!!(D!==null&&D!==void 0&&D.writableObjectMode),writable:r,readable:i}),r)Z._write=function($,n,Y){if(I.write($,n))Y();else w=Y},Z._final=function($){I.end(),p=$},I.on("drain",function(){if(w){const $=w;w=null,$()}}),D.on("finish",function(){if(p){const $=p;p=null,$()}});if(i)D.on("readable",function(){if(E){const $=E;E=null,$()}}),D.on("end",function(){Z.push(null)}),Z._read=function(){while(!0){const $=D.read();if($===null){E=Z._read;return}if(!Z.push($))return}};return Z._destroy=function($,n){if(!$&&x!==null)$=new P;if(E=null,w=null,p=null,x===null)n($);else x=n,y(D,$)},Z}}}),dq=Zq({"node_modules/readable-stream/lib/stream/promises.js"(a,j){var{ArrayPrototypePop:B,Promise:G}=Vq(),{isIterable:y,isNodeStream:A}=Lq(),{pipelineImpl:M}=yq(),{finished:R}=jq();function P(...g){return new G((k,c)=>{let C,l;const w=g[g.length-1];if(w&&typeof w==="object"&&!A(w)&&!y(w)){const p=B(g);C=p.signal,l=p.end}M(g,(p,E)=>{if(p)c(p);else k(E)},{signal:C,end:l})})}j.exports={finished:R,pipeline:P}}}),KQ=Zq({"node_modules/readable-stream/lib/stream.js"(a,j){var{ObjectDefineProperty:B,ObjectKeys:G,ReflectApply:y}=Vq(),{promisify:{custom:A}}=Eq(),{streamReturningOperators:M,promiseReturningOperators:R}=QQ(),{codes:{ERR_ILLEGAL_CONSTRUCTOR:P}}=Wq(),g=HQ(),{pipeline:k}=yq(),{destroyer:c}=Pq(),C=jq(),l=dq(),w=Lq(),p=j.exports=kq().Stream;p.isDisturbed=w.isDisturbed,p.isErrored=w.isErrored,p.isWritable=w.isWritable,p.isReadable=w.isReadable,p.Readable=Dq();for(let x of G(M)){let Z=function(...I){if(new.target)throw P();return p.Readable.from(y(U,this,I))};const U=M[x];B(Z,"name",{value:U.name}),B(Z,"length",{value:U.length}),B(p.Readable.prototype,x,{value:Z,enumerable:!1,configurable:!0,writable:!0})}for(let x of G(R)){let Z=function(...I){if(new.target)throw P();return y(U,this,I)};const U=R[x];B(Z,"name",{value:U.name}),B(Z,"length",{value:U.length}),B(p.Readable.prototype,x,{value:Z,enumerable:!1,configurable:!0,writable:!0})}p.Writable=bq(),p.Duplex=Fq(),p.Transform=mq(),p.PassThrough=cq(),p.pipeline=k;var{addAbortSignal:E}=fq();p.addAbortSignal=E,p.finished=C,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(C,A,{enumerable:!0,get(){return l.finished}}),p.Stream=p,p._isUint8Array=function x(Z){return Z instanceof Uint8Array},p._uint8ArrayToBuffer=function x(Z){return new Buffer(Z.buffer,Z.byteOffset,Z.byteLength)}}}),ZQ=Zq({"node_modules/readable-stream/lib/ours/index.js"(a,j){const B=KQ(),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}}),YQ={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(Oq(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()}},Bq=ZQ();Bq[Symbol.for("CommonJS")]=0;Bq[Symbol.for("::bunternal::")]={_ReadableFromWeb:pq,_ReadableFromWebForUndici:uq};var dQ=Bq,PQ=Bq._uint8ArrayToBuffer,xQ=Bq._isUint8Array,OQ=Bq.isDisturbed,CQ=Bq.isErrored,_Q=Bq.isWritable,DQ=Bq.isReadable,wQ=Bq.Readable,Uq=Bq.Writable,vQ=Bq.Duplex,RQ=Bq.Transform,SQ=Bq.PassThrough,gQ=Bq.addAbortSignal,zQ=Bq.finished,VQ=Bq.destroy,kQ=Bq.pipeline,fQ=Bq.compose,UQ=Bq.Stream,yQ=Bq.eos=jq,hQ=Bq._getNativeReadableStreamPrototype,iq=Bq.NativeWritable,pQ=UQ.promises;export{pQ as promises,kQ as pipeline,_Q as isWritable,DQ as isReadable,CQ as isErrored,OQ as isDisturbed,zQ as finished,yQ as eos,VQ as destroy,dQ as default,fQ as compose,gQ as addAbortSignal,PQ as _uint8ArrayToBuffer,xQ as _isUint8Array,hQ as _getNativeReadableStreamPrototype,Uq as Writable,RQ as Transform,UQ as Stream,wQ as Readable,SQ as PassThrough,iq as NativeWritable,vQ as Duplex};