diff options
24 files changed, 440 insertions, 65 deletions
diff --git a/docs/api/utils.md b/docs/api/utils.md index 24cb94ed2..7366649b7 100644 --- a/docs/api/utils.md +++ b/docs/api/utils.md @@ -460,6 +460,12 @@ await Bun.readableStreamToText(stream); // returns all chunks as an array await Bun.readableStreamToArray(stream); // => unknown[] + +// returns all chunks as a FormData object (encoded as x-www-form-urlencoded) +await Bun.readableStreamToFormData(stream); + +// returns all chunks as a FormData object (encoded as multipart/form-data) +await Bun.readableStreamToFormData(stream, multipartFormBoundary); ``` ## `Bun.resolveSync()` diff --git a/packages/bun-types/bun.d.ts b/packages/bun-types/bun.d.ts index d4e27fb4b..efd8a91b6 100644 --- a/packages/bun-types/bun.d.ts +++ b/packages/bun-types/bun.d.ts @@ -301,6 +301,38 @@ declare module "bun" { /** * Consume all data from a {@link ReadableStream} until it closes or errors. * + * Reads the multi-part or URL-encoded form data into a {@link FormData} object + * + * @param stream The stream to consume. + * @params multipartBoundaryExcludingDashes Optional boundary to use for multipart form data. If none is provided, assumes it is a URLEncoded form. + * @returns A promise that resolves with the data encoded into a {@link FormData} object. + * + * ## Multipart form data example + * + * ```ts + * // without dashes + * const boundary = "WebKitFormBoundary" + Math.random().toString(16).slice(2); + * + * const myStream = getStreamFromSomewhere() // ... + * const formData = await Bun.readableStreamToFormData(stream, boundary); + * formData.get("foo"); // "bar" + * ``` + * ## URL-encoded form data example + * + * ```ts + * const stream = new Response("hello=123").body; + * const formData = await Bun.readableStreamToFormData(stream); + * formData.get("hello"); // "123" + * ``` + */ + export function readableStreamToFormData( + stream: ReadableStream<string | TypedArray | ArrayBufferView>, + multipartBoundaryExcludingDashes?: string | TypedArray | ArrayBufferView, + ): Promise<FormData>; + + /** + * Consume all data from a {@link ReadableStream} until it closes or errors. + * * Concatenate the chunks into a single string. Chunks must be a TypedArray or an ArrayBuffer. If you need to support chunks of different types, consider {@link readableStreamToBlob}. * * @param stream The stream to consume. @@ -1316,7 +1348,7 @@ declare module "bun" { * This is slightly different than the browser {@link WebSocket} which Bun supports for clients. * * Powered by [uWebSockets](https://github.com/uNetworking/uWebSockets). - * + * * @example * import { serve } from "bun"; * @@ -1346,7 +1378,10 @@ declare module "bun" { * ws.send("Compress this.", true); * ws.send(new Uint8Array([1, 2, 3, 4])); */ - send(data: string | BufferSource, compress?: boolean): ServerWebSocketSendStatus; + send( + data: string | BufferSource, + compress?: boolean, + ): ServerWebSocketSendStatus; /** * Sends a text message to the client. @@ -1368,7 +1403,10 @@ declare module "bun" { * ws.send(new TextEncoder().encode("Hello!")); * ws.send(new Uint8Array([1, 2, 3, 4]), true); */ - sendBinary(data: BufferSource, compress?: boolean): ServerWebSocketSendStatus; + sendBinary( + data: BufferSource, + compress?: boolean, + ): ServerWebSocketSendStatus; /** * Closes the connection. @@ -1382,9 +1420,9 @@ declare module "bun" { * - `4000` through `4999` are reserved for applications (you can use it!) * * To close the connection abruptly, use `terminate()`. - * + * * @param code The close code to send - * @param reason The close reason to send + * @param reason The close reason to send */ close(code?: number, reason?: string): void; @@ -1420,7 +1458,11 @@ declare module "bun" { * ws.publish("chat", "Compress this.", true); * ws.publish("chat", new Uint8Array([1, 2, 3, 4])); */ - publish(topic: string, data: string | BufferSource, compress?: boolean): ServerWebSocketSendStatus; + publish( + topic: string, + data: string | BufferSource, + compress?: boolean, + ): ServerWebSocketSendStatus; /** * Sends a text message to subscribers of the topic. @@ -1432,7 +1474,11 @@ declare module "bun" { * ws.publish("chat", "Hello!"); * ws.publish("chat", "Compress this.", true); */ - publishText(topic: string, data: string, compress?: boolean): ServerWebSocketSendStatus; + publishText( + topic: string, + data: string, + compress?: boolean, + ): ServerWebSocketSendStatus; /** * Sends a binary message to subscribers of the topic. @@ -1444,7 +1490,11 @@ declare module "bun" { * ws.publish("chat", new TextEncoder().encode("Hello!")); * ws.publish("chat", new Uint8Array([1, 2, 3, 4]), true); */ - publishBinary(topic: string, data: BufferSource, compress?: boolean): ServerWebSocketSendStatus; + publishBinary( + topic: string, + data: BufferSource, + compress?: boolean, + ): ServerWebSocketSendStatus; /** * Subscribes a client to the topic. @@ -1510,7 +1560,7 @@ declare module "bun" { * @example * console.log(socket.readyState); // 1 */ - readonly readyState: WebSocketReadyState + readonly readyState: WebSocketReadyState; /** * Sets how binary data is returned in events. @@ -1533,7 +1583,7 @@ declare module "bun" { * * @example * import { serve } from "bun"; - * + * * serve({ * fetch(request, server) { * const data = { @@ -1620,7 +1670,10 @@ declare module "bun" { * @param ws The websocket that sent the message * @param message The message received */ - message(ws: ServerWebSocket<T>, message: string | Buffer): void | Promise<void>; + message( + ws: ServerWebSocket<T>, + message: string | Buffer, + ): void | Promise<void>; /** * Called when a connection is opened. @@ -1644,7 +1697,11 @@ declare module "bun" { * @param code The close code * @param message The close message */ - close?(ws: ServerWebSocket<T>, code: number, reason: string): void | Promise<void>; + close?( + ws: ServerWebSocket<T>, + code: number, + reason: string, + ): void | Promise<void>; /** * Called when a ping is sent. @@ -1722,7 +1779,7 @@ declare module "bun" { */ decompress?: WebSocketCompressor | boolean; }; - } + }; interface GenericServeOptions { /** diff --git a/src/bun.js/bindings/ZigGlobalObject.cpp b/src/bun.js/bindings/ZigGlobalObject.cpp index 602c60f29..f267fcbb7 100644 --- a/src/bun.js/bindings/ZigGlobalObject.cpp +++ b/src/bun.js/bindings/ZigGlobalObject.cpp @@ -1661,7 +1661,7 @@ JSC: return JSValue::encode(obj); } - if(string == "rootCertificates"_s) { + if (string == "rootCertificates"_s) { auto sourceOrigin = callFrame->callerSourceOrigin(vm).url(); bool isBuiltin = sourceOrigin.protocolIs("builtin"_s); if (!isBuiltin) { @@ -1673,7 +1673,7 @@ JSC: return JSValue::encode(JSC::jsUndefined()); } auto rootCertificates = JSC::JSArray::create(vm, globalObject->arrayStructureForIndexingTypeDuringAllocation(JSC::ArrayWithContiguous), size); - for(auto i = 0; i < size; i++) { + for (auto i = 0; i < size; i++) { auto raw = out[i]; auto str = WTF::String::fromUTF8(raw.str, raw.len); rootCertificates->putDirectIndex(globalObject, i, JSC::jsString(vm, str)); @@ -2575,7 +2575,6 @@ extern "C" JSC__JSValue Bun__Jest__testModuleObject(Zig::GlobalObject* globalObj return JSValue::encode(globalObject->lazyTestModuleObject()); } -static inline JSC__JSValue ZigGlobalObject__readableStreamToArrayBufferBody(Zig::GlobalObject* globalObject, JSC__JSValue readableStreamValue); static inline JSC__JSValue ZigGlobalObject__readableStreamToArrayBufferBody(Zig::GlobalObject* globalObject, JSC__JSValue readableStreamValue) { auto& vm = globalObject->vm(); @@ -2602,7 +2601,6 @@ static inline JSC__JSValue ZigGlobalObject__readableStreamToArrayBufferBody(Zig: return JSValue::encode(result); if (UNLIKELY(!object)) { - auto throwScope = DECLARE_THROW_SCOPE(vm); throwTypeError(globalObject, throwScope, "Expected object"_s); return JSValue::encode(jsUndefined()); @@ -2648,6 +2646,30 @@ extern "C" JSC__JSValue ZigGlobalObject__readableStreamToText(Zig::GlobalObject* return JSC::JSValue::encode(call(globalObject, function, callData, JSC::jsUndefined(), arguments)); } +extern "C" JSC__JSValue ZigGlobalObject__readableStreamToFormData(Zig::GlobalObject* globalObject, JSC__JSValue readableStreamValue, JSC__JSValue contentTypeValue) +{ + auto& vm = globalObject->vm(); + + auto clientData = WebCore::clientData(vm); + auto& builtinNames = WebCore::builtinNames(vm); + + JSC::JSFunction* function = nullptr; + if (auto readableStreamToFormData = globalObject->m_readableStreamToFormData.get()) { + function = readableStreamToFormData; + } else { + function = JSFunction::create(vm, static_cast<JSC::FunctionExecutable*>(readableStreamReadableStreamToFormDataCodeGenerator(vm)), globalObject); + + globalObject->m_readableStreamToFormData.set(vm, globalObject, function); + } + + JSC::MarkedArgumentBuffer arguments = JSC::MarkedArgumentBuffer(); + arguments.append(JSValue::decode(readableStreamValue)); + arguments.append(JSValue::decode(contentTypeValue)); + + auto callData = JSC::getCallData(function); + return JSC::JSValue::encode(call(globalObject, function, callData, JSC::jsUndefined(), arguments)); +} + extern "C" JSC__JSValue ZigGlobalObject__readableStreamToJSON(Zig::GlobalObject* globalObject, JSC__JSValue readableStreamValue); extern "C" JSC__JSValue ZigGlobalObject__readableStreamToJSON(Zig::GlobalObject* globalObject, JSC__JSValue readableStreamValue) { @@ -4331,6 +4353,12 @@ void GlobalObject::installAPIGlobals(JSClassRef* globals, int count, JSC::VM& vm } { + JSC::Identifier identifier = JSC::Identifier::fromString(vm, "readableStreamToFormData"_s); + object->putDirectBuiltinFunction(vm, this, identifier, readableStreamReadableStreamToFormDataCodeGenerator(vm), + JSC::PropertyAttribute::Function | JSC::PropertyAttribute::DontDelete | 0); + } + + { JSC::Identifier identifier = JSC::Identifier::fromString(vm, "readableStreamToText"_s); object->putDirectBuiltinFunction(vm, this, identifier, readableStreamReadableStreamToTextCodeGenerator(vm), JSC::PropertyAttribute::Function | JSC::PropertyAttribute::DontDelete | 0); @@ -4546,6 +4574,7 @@ void GlobalObject::visitChildrenImpl(JSCell* cell, Visitor& visitor) visitor.append(thisObject->m_readableStreamToBlob); visitor.append(thisObject->m_readableStreamToJSON); visitor.append(thisObject->m_readableStreamToText); + visitor.append(thisObject->m_readableStreamToFormData); visitor.append(thisObject->m_JSTextDecoderSetterValue); visitor.append(thisObject->m_JSResponseSetterValue); diff --git a/src/bun.js/bindings/ZigGlobalObject.h b/src/bun.js/bindings/ZigGlobalObject.h index 956724b49..0e126f7f7 100644 --- a/src/bun.js/bindings/ZigGlobalObject.h +++ b/src/bun.js/bindings/ZigGlobalObject.h @@ -377,6 +377,7 @@ public: mutable WriteBarrier<JSFunction> m_readableStreamToBlob; mutable WriteBarrier<JSFunction> m_readableStreamToJSON; mutable WriteBarrier<JSFunction> m_readableStreamToText; + mutable WriteBarrier<JSFunction> m_readableStreamToFormData; mutable WriteBarrier<Unknown> m_JSBufferSetterValue; mutable WriteBarrier<Unknown> m_JSFetchHeadersSetterValue; mutable WriteBarrier<Unknown> m_JSMessageEventSetterValue; diff --git a/src/bun.js/bindings/bindings.zig b/src/bun.js/bindings/bindings.zig index 64958cb3e..10e14ccc1 100644 --- a/src/bun.js/bindings/bindings.zig +++ b/src/bun.js/bindings/bindings.zig @@ -2890,6 +2890,7 @@ pub const JSGlobalObject = extern struct { extern fn ZigGlobalObject__readableStreamToArrayBuffer(*JSGlobalObject, JSValue) JSValue; extern fn ZigGlobalObject__readableStreamToText(*JSGlobalObject, JSValue) JSValue; extern fn ZigGlobalObject__readableStreamToJSON(*JSGlobalObject, JSValue) JSValue; + extern fn ZigGlobalObject__readableStreamToFormData(*JSGlobalObject, JSValue, JSValue) JSValue; extern fn ZigGlobalObject__readableStreamToBlob(*JSGlobalObject, JSValue) JSValue; pub fn readableStreamToArrayBuffer(this: *JSGlobalObject, value: JSValue) JSValue { @@ -2912,6 +2913,11 @@ pub const JSGlobalObject = extern struct { return ZigGlobalObject__readableStreamToBlob(this, value); } + pub fn readableStreamToFormData(this: *JSGlobalObject, value: JSValue, content_type: JSValue) JSValue { + if (comptime is_bindgen) unreachable; + return ZigGlobalObject__readableStreamToFormData(this, value, content_type); + } + pub const Extern = [_][]const u8{ "reload", "bunVM", diff --git a/src/bun.js/bindings/webcore/JSDOMFormData.cpp b/src/bun.js/bindings/webcore/JSDOMFormData.cpp index ca91bd83e..fb725faa3 100644 --- a/src/bun.js/bindings/webcore/JSDOMFormData.cpp +++ b/src/bun.js/bindings/webcore/JSDOMFormData.cpp @@ -184,6 +184,8 @@ template<> JSValue JSDOMFormDataDOMConstructor::prototypeForStructure(JSC::VM& v return globalObject.functionPrototype(); } +extern "C" EncodedJSValue FormData__jsFunctionFromMultipartData(JSC::JSGlobalObject* globalObject, JSC::CallFrame* callframe); + template<> void JSDOMFormDataDOMConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject) { putDirect(vm, vm.propertyNames->length, jsNumber(0), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); @@ -191,6 +193,7 @@ template<> void JSDOMFormDataDOMConstructor::initializeProperties(VM& vm, JSDOMG m_originalName.set(vm, this, nameString); putDirect(vm, vm.propertyNames->name, nameString, JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); putDirect(vm, vm.propertyNames->prototype, JSDOMFormData::prototype(vm, globalObject), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum | JSC::PropertyAttribute::DontDelete); + putDirectNativeFunction(vm, &globalObject, vm.propertyNames->from, 1, FormData__jsFunctionFromMultipartData, ImplementationVisibility::Public, NoIntrinsic, JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontDelete | 0); } /* Hash table for prototype */ diff --git a/src/bun.js/webcore/body.zig b/src/bun.js/webcore/body.zig index 169ac8fa4..2007063f3 100644 --- a/src/bun.js/webcore/body.zig +++ b/src/bun.js/webcore/body.zig @@ -241,12 +241,23 @@ pub const Body = struct { // .JavaScript // } switch (action) { - .getText, .getJSON, .getBlob, .getArrayBuffer => { + .getFormData, .getText, .getJSON, .getBlob, .getArrayBuffer => { value.promise = switch (action) { .getJSON => globalThis.readableStreamToJSON(readable.value), .getArrayBuffer => globalThis.readableStreamToArrayBuffer(readable.value), .getText => globalThis.readableStreamToText(readable.value), .getBlob => globalThis.readableStreamToBlob(readable.value), + .getFormData => |form_data| brk: { + defer { + form_data.?.deinit(); + value.action.getFormData = null; + } + + break :brk globalThis.readableStreamToFormData(readable.value, switch (form_data.?.encoding) { + .Multipart => |multipart| bun.String.init(multipart).toJSConst(globalThis), + .URLEncoded => JSC.JSValue.jsUndefined(), + }); + }, else => unreachable, }; value.promise.?.ensureStillAlive(); @@ -257,8 +268,6 @@ pub const Body = struct { return value.promise.?; }, - // TODO: - .getFormData => {}, .none => {}, } diff --git a/src/js/builtins/ReadableStream.ts b/src/js/builtins/ReadableStream.ts index 5a5b7e119..419a8e696 100644 --- a/src/js/builtins/ReadableStream.ts +++ b/src/js/builtins/ReadableStream.ts @@ -149,6 +149,16 @@ export function readableStreamToArrayBuffer(stream: ReadableStream<ArrayBuffer>) } $linkTimeConstant; +export function readableStreamToFormData( + stream: ReadableStream<ArrayBuffer>, + contentType: string | ArrayBuffer | ArrayBufferView, +): Promise<FormData> { + return Bun.readableStreamToBlob(stream).then(blob => { + return FormData.from(blob, contentType); + }); +} + +$linkTimeConstant; export function readableStreamToJSON(stream: ReadableStream): unknown { return Bun.readableStreamToText(stream).$then(globalThis.JSON.parse); } diff --git a/src/js/out/WebCoreJSBuiltins.cpp b/src/js/out/WebCoreJSBuiltins.cpp index 82a7bfabb..8dc4abf50 100644 --- a/src/js/out/WebCoreJSBuiltins.cpp +++ b/src/js/out/WebCoreJSBuiltins.cpp @@ -2492,6 +2492,14 @@ const int s_readableStreamReadableStreamToArrayBufferCodeLength = 270; static const JSC::Intrinsic s_readableStreamReadableStreamToArrayBufferCodeIntrinsic = JSC::NoIntrinsic; const char* const s_readableStreamReadableStreamToArrayBufferCode = "(function (_){\"use strict\";var p=@getByIdDirectPrivate(_,\"underlyingSource\");if(p!==@undefined)return @readableStreamToArrayBufferDirect(_,p);var b=@Bun.readableStreamToArray(_);if(@isPromise(b))return b.then(@Bun.concatArrayBuffers);return @Bun.concatArrayBuffers(b)})\n"; +// readableStreamToFormData +const JSC::ConstructAbility s_readableStreamReadableStreamToFormDataCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; +const JSC::ConstructorKind s_readableStreamReadableStreamToFormDataCodeConstructorKind = JSC::ConstructorKind::None; +const JSC::ImplementationVisibility s_readableStreamReadableStreamToFormDataCodeImplementationVisibility = JSC::ImplementationVisibility::Private; +const int s_readableStreamReadableStreamToFormDataCodeLength = 106; +static const JSC::Intrinsic s_readableStreamReadableStreamToFormDataCodeIntrinsic = JSC::NoIntrinsic; +const char* const s_readableStreamReadableStreamToFormDataCode = "(function (r,d){\"use strict\";return @Bun.readableStreamToBlob(r).then((u)=>{return FormData.from(u,d)})})\n"; + // readableStreamToJSON const JSC::ConstructAbility s_readableStreamReadableStreamToJSONCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; const JSC::ConstructorKind s_readableStreamReadableStreamToJSONCodeConstructorKind = JSC::ConstructorKind::None; diff --git a/src/js/out/WebCoreJSBuiltins.h b/src/js/out/WebCoreJSBuiltins.h index db4b19316..135e01f17 100644 --- a/src/js/out/WebCoreJSBuiltins.h +++ b/src/js/out/WebCoreJSBuiltins.h @@ -4671,6 +4671,14 @@ extern const JSC::ConstructAbility s_readableStreamReadableStreamToArrayBufferCo extern const JSC::ConstructorKind s_readableStreamReadableStreamToArrayBufferCodeConstructorKind; extern const JSC::ImplementationVisibility s_readableStreamReadableStreamToArrayBufferCodeImplementationVisibility; +// readableStreamToFormData +#define WEBCORE_BUILTIN_READABLESTREAM_READABLESTREAMTOFORMDATA 1 +extern const char* const s_readableStreamReadableStreamToFormDataCode; +extern const int s_readableStreamReadableStreamToFormDataCodeLength; +extern const JSC::ConstructAbility s_readableStreamReadableStreamToFormDataCodeConstructAbility; +extern const JSC::ConstructorKind s_readableStreamReadableStreamToFormDataCodeConstructorKind; +extern const JSC::ImplementationVisibility s_readableStreamReadableStreamToFormDataCodeImplementationVisibility; + // readableStreamToJSON #define WEBCORE_BUILTIN_READABLESTREAM_READABLESTREAMTOJSON 1 extern const char* const s_readableStreamReadableStreamToJSONCode; @@ -4780,6 +4788,7 @@ extern const JSC::ImplementationVisibility s_readableStreamLazyAsyncIteratorCode macro(readableStreamToArray, readableStreamReadableStreamToArray, 1) \ macro(readableStreamToText, readableStreamReadableStreamToText, 1) \ macro(readableStreamToArrayBuffer, readableStreamReadableStreamToArrayBuffer, 1) \ + macro(readableStreamToFormData, readableStreamReadableStreamToFormData, 3) \ macro(readableStreamToJSON, readableStreamReadableStreamToJSON, 1) \ macro(readableStreamToBlob, readableStreamReadableStreamToBlob, 1) \ macro(consumeReadableStream, readableStreamConsumeReadableStream, 3) \ @@ -4799,6 +4808,7 @@ extern const JSC::ImplementationVisibility s_readableStreamLazyAsyncIteratorCode macro(readableStreamReadableStreamToArrayCode, readableStreamToArray, ASCIILiteral(), s_readableStreamReadableStreamToArrayCodeLength) \ macro(readableStreamReadableStreamToTextCode, readableStreamToText, ASCIILiteral(), s_readableStreamReadableStreamToTextCodeLength) \ macro(readableStreamReadableStreamToArrayBufferCode, readableStreamToArrayBuffer, ASCIILiteral(), s_readableStreamReadableStreamToArrayBufferCodeLength) \ + macro(readableStreamReadableStreamToFormDataCode, readableStreamToFormData, ASCIILiteral(), s_readableStreamReadableStreamToFormDataCodeLength) \ macro(readableStreamReadableStreamToJSONCode, readableStreamToJSON, ASCIILiteral(), s_readableStreamReadableStreamToJSONCodeLength) \ macro(readableStreamReadableStreamToBlobCode, readableStreamToBlob, ASCIILiteral(), s_readableStreamReadableStreamToBlobCodeLength) \ macro(readableStreamConsumeReadableStreamCode, consumeReadableStream, ASCIILiteral(), s_readableStreamConsumeReadableStreamCodeLength) \ @@ -4818,6 +4828,7 @@ extern const JSC::ImplementationVisibility s_readableStreamLazyAsyncIteratorCode macro(readableStreamToArray) \ macro(readableStreamToText) \ macro(readableStreamToArrayBuffer) \ + macro(readableStreamToFormData) \ macro(readableStreamToJSON) \ macro(readableStreamToBlob) \ macro(consumeReadableStream) \ diff --git a/src/js/out/modules/node/assert.js b/src/js/out/modules/node/assert.js index 2e398354a..3067445ce 100644 --- a/src/js/out/modules/node/assert.js +++ b/src/js/out/modules/node/assert.js @@ -1,9 +1,9 @@ -import J0 from"node:util";var V0=function(){throw new Error("CallTracker is not supported yet")},{Bun:U0}=globalThis[Symbol.for("Bun.lazy")]("primordials"),t=U0.deepEquals,X0=(p,L)=>function(){return L||(0,p[Object.keys(p)[0]])((L={exports:{}}).exports,L),L.exports},$0=X0({"assert/build/internal/errors.js"(p,L){function A(U){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?A=function(X){return typeof X}:A=function(X){return X&&typeof Symbol=="function"&&X.constructor===Symbol&&X!==Symbol.prototype?"symbol":typeof X},A(U)}function i(U,X){if(!(U instanceof X))throw new TypeError("Cannot call a class as a function")}function l(U,X){return X&&(A(X)==="object"||typeof X=="function")?X:b(U)}function b(U){if(U===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return U}function x(U){return x=Object.setPrototypeOf?Object.getPrototypeOf:function(X){return X.__proto__||Object.getPrototypeOf(X)},x(U)}function I(U,X){if(typeof X!="function"&&X!==null)throw new TypeError("Super expression must either be null or a function");U.prototype=Object.create(X&&X.prototype,{constructor:{value:U,writable:!0,configurable:!0}}),X&&m(U,X)}function m(U,X){return m=Object.setPrototypeOf||function(D,v){return D.__proto__=v,D},m(U,X)}var u={},N,C;function j(U,X,D){D||(D=Error);function v(T,G,f){return typeof X=="string"?X:X(T,G,f)}var M=function(T){I(G,T);function G(f,O,S){var y;return i(this,G),y=l(this,x(G).call(this,v(f,O,S))),y.code=U,y}return G}(D);u[U]=M}function n(U,X){if(Array.isArray(U)){var D=U.length;return U=U.map(function(v){return String(v)}),D>2?"one of ".concat(X," ").concat(U.slice(0,D-1).join(", "),", or ")+U[D-1]:D===2?"one of ".concat(X," ").concat(U[0]," or ").concat(U[1]):"of ".concat(X," ").concat(U[0])}else return"of ".concat(X," ").concat(String(U))}function h(U,X,D){return U.substr(!D||D<0?0:+D,X.length)===X}function R(U,X,D){return(D===void 0||D>U.length)&&(D=U.length),U.substring(D-X.length,D)===X}function P(U,X,D){return typeof D!="number"&&(D=0),D+X.length>U.length?!1:U.indexOf(X,D)!==-1}j("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),j("ERR_INVALID_ARG_TYPE",function(U,X,D){N===void 0&&(N=z0()),N(typeof U=="string","'name' must be a string");var v;typeof X=="string"&&h(X,"not ")?(v="must not be",X=X.replace(/^not /,"")):v="must be";var M;if(R(U," argument"))M="The ".concat(U," ").concat(v," ").concat(n(X,"type"));else{var T=P(U,".")?"property":"argument";M='The "'.concat(U,'" ').concat(T," ").concat(v," ").concat(n(X,"type"))}return M+=". Received type ".concat(A(D)),M},TypeError),j("ERR_INVALID_ARG_VALUE",function(U,X){var D=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid",v=C.inspect(X);return v.length>128&&(v="".concat(v.slice(0,128),"...")),"The argument '".concat(U,"' ").concat(D,". Received ").concat(v)},TypeError,RangeError),j("ERR_INVALID_RETURN_VALUE",function(U,X,D){var v;return D&&D.constructor&&D.constructor.name?v="instance of ".concat(D.constructor.name):v="type ".concat(A(D)),"Expected ".concat(U,' to be returned from the "').concat(X,'"')+" function but got ".concat(v,".")},TypeError),j("ERR_MISSING_ARGS",function(){for(var U=arguments.length,X=new Array(U),D=0;D<U;D++)X[D]=arguments[D];N===void 0&&(N=z0()),N(X.length>0,"At least one arg needs to be specified");var v="The ",M=X.length;switch(X=X.map(function(T){return'"'.concat(T,'"')}),M){case 1:v+="".concat(X[0]," argument");break;case 2:v+="".concat(X[0]," and ").concat(X[1]," arguments");break;default:v+=X.slice(0,M-1).join(", "),v+=", and ".concat(X[M-1]," arguments");break}return"".concat(v," must be specified")},TypeError),L.exports.codes=u}}),B0=X0({"assert/build/internal/assert/assertion_error.js"(p,L){function A(Y){for(var J=1;J<arguments.length;J++){var $=arguments[J]!=null?arguments[J]:{},V=Object.keys($);typeof Object.getOwnPropertySymbols=="function"&&(V=V.concat(Object.getOwnPropertySymbols($).filter(function(q){return Object.getOwnPropertyDescriptor($,q).enumerable}))),V.forEach(function(q){i(Y,q,$[q])})}return Y}function i(Y,J,$){return(J in Y)?Object.defineProperty(Y,J,{value:$,enumerable:!0,configurable:!0,writable:!0}):Y[J]=$,Y}function l(Y,J){if(!(Y instanceof J))throw new TypeError("Cannot call a class as a function")}function b(Y,J){for(var $=0;$<J.length;$++){var V=J[$];V.enumerable=V.enumerable||!1,V.configurable=!0,("value"in V)&&(V.writable=!0),Object.defineProperty(Y,V.key,V)}}function x(Y,J,$){return J&&b(Y.prototype,J),$&&b(Y,$),Y}function I(Y,J){return J&&(P(J)==="object"||typeof J=="function")?J:m(Y)}function m(Y){if(Y===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Y}function u(Y,J){if(typeof J!="function"&&J!==null)throw new TypeError("Super expression must either be null or a function");Y.prototype=Object.create(J&&J.prototype,{constructor:{value:Y,writable:!0,configurable:!0}}),J&&h(Y,J)}function N(Y){var J=typeof Map=="function"?new Map:void 0;return N=function($){if($===null||!n($))return $;if(typeof $!="function")throw new TypeError("Super expression must either be null or a function");if(typeof J!="undefined"){if(J.has($))return J.get($);J.set($,V)}function V(){return j($,arguments,R(this).constructor)}return V.prototype=Object.create($.prototype,{constructor:{value:V,enumerable:!1,writable:!0,configurable:!0}}),h(V,$)},N(Y)}function C(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function j(Y,J,$){return C()?j=Reflect.construct:j=function(V,q,Z){var H=[null];H.push.apply(H,q);var Q=Function.bind.apply(V,H),z=new Q;return Z&&h(z,Z.prototype),z},j.apply(null,arguments)}function n(Y){return Function.toString.call(Y).indexOf("[native code]")!==-1}function h(Y,J){return h=Object.setPrototypeOf||function($,V){return $.__proto__=V,$},h(Y,J)}function R(Y){return R=Object.setPrototypeOf?Object.getPrototypeOf:function(J){return J.__proto__||Object.getPrototypeOf(J)},R(Y)}function P(Y){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?P=function(J){return typeof J}:P=function(J){return J&&typeof Symbol=="function"&&J.constructor===Symbol&&J!==Symbol.prototype?"symbol":typeof J},P(Y)}var U=J0.inspect,X=$0(),D=X.codes.ERR_INVALID_ARG_TYPE;function v(Y,J,$){return($===void 0||$>Y.length)&&($=Y.length),Y.substring($-J.length,$)===J}function M(Y,J){if(J=Math.floor(J),Y.length==0||J==0)return"";var $=Y.length*J;for(J=Math.floor(Math.log(J)/Math.log(2));J;)Y+=Y,J--;return Y+=Y.substring(0,$-Y.length),Y}var T="",G="",f="",O="",S={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"},y=10;function c(Y){var J=Object.keys(Y),$=Object.create(Object.getPrototypeOf(Y));return J.forEach(function(V){$[V]=Y[V]}),Object.defineProperty($,"message",{value:Y.message}),$}function g(Y){return U(Y,{compact:!1,customInspect:!1,depth:1000,maxArrayLength:Infinity,showHidden:!1,breakLength:Infinity,showProxy:!1,sorted:!0,getters:!0})}function s(Y,J,$){var V="",q="",Z=0,H="",Q=!1,z=g(Y),K=z.split(` -`),W=g(J).split(` +var D0=(g)=>{return import.meta.require(g)};import J0 from"node:util";var V0=function(){throw new Error("CallTracker is not supported yet")},{Bun:U0}=globalThis[Symbol.for("Bun.lazy")]("primordials"),t=U0.deepEquals,X0=(g,L)=>function(){return L||(0,g[Object.keys(g)[0]])((L={exports:{}}).exports,L),L.exports},$0=X0({"assert/build/internal/errors.js"(g,L){function A(U){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?A=function(X){return typeof X}:A=function(X){return X&&typeof Symbol=="function"&&X.constructor===Symbol&&X!==Symbol.prototype?"symbol":typeof X},A(U)}function i(U,X){if(!(U instanceof X))throw new TypeError("Cannot call a class as a function")}function l(U,X){return X&&(A(X)==="object"||typeof X=="function")?X:b(U)}function b(U){if(U===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return U}function x(U){return x=Object.setPrototypeOf?Object.getPrototypeOf:function(X){return X.__proto__||Object.getPrototypeOf(X)},x(U)}function I(U,X){if(typeof X!="function"&&X!==null)throw new TypeError("Super expression must either be null or a function");U.prototype=Object.create(X&&X.prototype,{constructor:{value:U,writable:!0,configurable:!0}}),X&&m(U,X)}function m(U,X){return m=Object.setPrototypeOf||function(D,v){return D.__proto__=v,D},m(U,X)}var n={},N,C;function j(U,X,D){D||(D=Error);function v(T,G,f){return typeof X=="string"?X:X(T,G,f)}var M=function(T){I(G,T);function G(f,O,S){var y;return i(this,G),y=l(this,x(G).call(this,v(f,O,S))),y.code=U,y}return G}(D);n[U]=M}function p(U,X){if(Array.isArray(U)){var D=U.length;return U=U.map(function(v){return String(v)}),D>2?"one of ".concat(X," ").concat(U.slice(0,D-1).join(", "),", or ")+U[D-1]:D===2?"one of ".concat(X," ").concat(U[0]," or ").concat(U[1]):"of ".concat(X," ").concat(U[0])}else return"of ".concat(X," ").concat(String(U))}function h(U,X,D){return U.substr(!D||D<0?0:+D,X.length)===X}function R(U,X,D){return(D===void 0||D>U.length)&&(D=U.length),U.substring(D-X.length,D)===X}function P(U,X,D){return typeof D!="number"&&(D=0),D+X.length>U.length?!1:U.indexOf(X,D)!==-1}j("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),j("ERR_INVALID_ARG_TYPE",function(U,X,D){N===void 0&&(N=z0()),N(typeof U=="string","'name' must be a string");var v;typeof X=="string"&&h(X,"not ")?(v="must not be",X=X.replace(/^not /,"")):v="must be";var M;if(R(U," argument"))M="The ".concat(U," ").concat(v," ").concat(p(X,"type"));else{var T=P(U,".")?"property":"argument";M='The "'.concat(U,'" ').concat(T," ").concat(v," ").concat(p(X,"type"))}return M+=". Received type ".concat(A(D)),M},TypeError),j("ERR_INVALID_ARG_VALUE",function(U,X){var D=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid",v=C.inspect(X);return v.length>128&&(v="".concat(v.slice(0,128),"...")),"The argument '".concat(U,"' ").concat(D,". Received ").concat(v)},TypeError,RangeError),j("ERR_INVALID_RETURN_VALUE",function(U,X,D){var v;return D&&D.constructor&&D.constructor.name?v="instance of ".concat(D.constructor.name):v="type ".concat(A(D)),"Expected ".concat(U,' to be returned from the "').concat(X,'"')+" function but got ".concat(v,".")},TypeError),j("ERR_MISSING_ARGS",function(){for(var U=arguments.length,X=new Array(U),D=0;D<U;D++)X[D]=arguments[D];N===void 0&&(N=z0()),N(X.length>0,"At least one arg needs to be specified");var v="The ",M=X.length;switch(X=X.map(function(T){return'"'.concat(T,'"')}),M){case 1:v+="".concat(X[0]," argument");break;case 2:v+="".concat(X[0]," and ").concat(X[1]," arguments");break;default:v+=X.slice(0,M-1).join(", "),v+=", and ".concat(X[M-1]," arguments");break}return"".concat(v," must be specified")},TypeError),L.exports.codes=n}}),B0=X0({"assert/build/internal/assert/assertion_error.js"(g,L){function A(Y){for(var J=1;J<arguments.length;J++){var $=arguments[J]!=null?arguments[J]:{},V=Object.keys($);typeof Object.getOwnPropertySymbols=="function"&&(V=V.concat(Object.getOwnPropertySymbols($).filter(function(q){return Object.getOwnPropertyDescriptor($,q).enumerable}))),V.forEach(function(q){i(Y,q,$[q])})}return Y}function i(Y,J,$){return(J in Y)?Object.defineProperty(Y,J,{value:$,enumerable:!0,configurable:!0,writable:!0}):Y[J]=$,Y}function l(Y,J){if(!(Y instanceof J))throw new TypeError("Cannot call a class as a function")}function b(Y,J){for(var $=0;$<J.length;$++){var V=J[$];V.enumerable=V.enumerable||!1,V.configurable=!0,("value"in V)&&(V.writable=!0),Object.defineProperty(Y,V.key,V)}}function x(Y,J,$){return J&&b(Y.prototype,J),$&&b(Y,$),Y}function I(Y,J){return J&&(P(J)==="object"||typeof J=="function")?J:m(Y)}function m(Y){if(Y===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Y}function n(Y,J){if(typeof J!="function"&&J!==null)throw new TypeError("Super expression must either be null or a function");Y.prototype=Object.create(J&&J.prototype,{constructor:{value:Y,writable:!0,configurable:!0}}),J&&h(Y,J)}function N(Y){var J=typeof Map=="function"?new Map:void 0;return N=function($){if($===null||!p($))return $;if(typeof $!="function")throw new TypeError("Super expression must either be null or a function");if(typeof J!="undefined"){if(J.has($))return J.get($);J.set($,V)}function V(){return j($,arguments,R(this).constructor)}return V.prototype=Object.create($.prototype,{constructor:{value:V,enumerable:!1,writable:!0,configurable:!0}}),h(V,$)},N(Y)}function C(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function j(Y,J,$){return C()?j=Reflect.construct:j=function(V,q,Z){var H=[null];H.push.apply(H,q);var Q=Function.bind.apply(V,H),z=new Q;return Z&&h(z,Z.prototype),z},j.apply(null,arguments)}function p(Y){return Function.toString.call(Y).indexOf("[native code]")!==-1}function h(Y,J){return h=Object.setPrototypeOf||function($,V){return $.__proto__=V,$},h(Y,J)}function R(Y){return R=Object.setPrototypeOf?Object.getPrototypeOf:function(J){return J.__proto__||Object.getPrototypeOf(J)},R(Y)}function P(Y){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?P=function(J){return typeof J}:P=function(J){return J&&typeof Symbol=="function"&&J.constructor===Symbol&&J!==Symbol.prototype?"symbol":typeof J},P(Y)}var U=J0.inspect,X=$0(),D=X.codes.ERR_INVALID_ARG_TYPE;function v(Y,J,$){return($===void 0||$>Y.length)&&($=Y.length),Y.substring($-J.length,$)===J}function M(Y,J){if(J=Math.floor(J),Y.length==0||J==0)return"";var $=Y.length*J;for(J=Math.floor(Math.log(J)/Math.log(2));J;)Y+=Y,J--;return Y+=Y.substring(0,$-Y.length),Y}var T="",G="",f="",O="",S={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"},y=10;function c(Y){var J=Object.keys(Y),$=Object.create(Object.getPrototypeOf(Y));return J.forEach(function(V){$[V]=Y[V]}),Object.defineProperty($,"message",{value:Y.message}),$}function d(Y){return U(Y,{compact:!1,customInspect:!1,depth:1000,maxArrayLength:Infinity,showHidden:!1,breakLength:Infinity,showProxy:!1,sorted:!0,getters:!0})}function s(Y,J,$){var V="",q="",Z=0,H="",Q=!1,z=d(Y),K=z.split(` +`),W=d(J).split(` `),B=0,w="";if($==="strictEqual"&&P(Y)==="object"&&P(J)==="object"&&Y!==null&&J!==null&&($="strictEqualObject"),K.length===1&&W.length===1&&K[0]!==W[0]){var F=K[0].length+W[0].length;if(F<=y){if((P(Y)!=="object"||Y===null)&&(P(J)!=="object"||J===null)&&(Y!==0||J!==0))return"".concat(S[$],` `)+"".concat(K[0]," !== ").concat(W[0],` -`)}else if($!=="strictEqualObject"){var d=process.stderr&&process.stderr.isTTY?process.stderr.columns:80;if(F<d){for(;K[0][B]===W[0][B];)B++;B>2&&(w=` +`)}else if($!=="strictEqualObject"){var _=process.stderr&&process.stderr.isTTY?process.stderr.columns:80;if(F<_){for(;K[0][B]===W[0][B];)B++;B>2&&(w=` `.concat(M(" ",B),"^"),B=0)}}}for(var e=K[K.length-1],Y0=W[W.length-1];e===Y0&&(B++<2?H=` `.concat(e).concat(H):V=e,K.pop(),W.pop(),!(K.length===0||W.length===0));)e=K[K.length-1],Y0=W[W.length-1];var Q0=Math.max(K.length,W.length);if(Q0===0){var o=z.split(` `);if(o.length>30)for(o[26]="".concat(T,"...").concat(O);o.length>27;)o.pop();return"".concat(S.notIdentical,` @@ -21,33 +21,33 @@ import J0 from"node:util";var V0=function(){throw new Error("CallTracker is not `.concat(T,"...").concat(O),Q=!0):k>3&&(q+=` `.concat(K[B-2]),E++),q+=` `.concat(K[B-1]),E++),Z=B,q+=` -`.concat(G,"+").concat(O," ").concat(K[B]),E++;else{var a=W[B],_=K[B],Z0=_!==a&&(!v(_,",")||_.slice(0,-1)!==a);Z0&&v(a,",")&&a.slice(0,-1)===_&&(Z0=!1,_+=","),Z0?(k>1&&B>2&&(k>4?(q+=` +`.concat(G,"+").concat(O," ").concat(K[B]),E++;else{var a=W[B],u=K[B],Z0=u!==a&&(!v(u,",")||u.slice(0,-1)!==a);Z0&&v(a,",")&&a.slice(0,-1)===u&&(Z0=!1,u+=","),Z0?(k>1&&B>2&&(k>4?(q+=` `.concat(T,"...").concat(O),Q=!0):k>3&&(q+=` `.concat(K[B-2]),E++),q+=` `.concat(K[B-1]),E++),Z=B,q+=` -`.concat(G,"+").concat(O," ").concat(_),V+=` +`.concat(G,"+").concat(O," ").concat(u),V+=` `.concat(f,"-").concat(O," ").concat(a),E+=2):(q+=V,V="",(k===1||B===0)&&(q+=` - `.concat(_),E++))}if(E>20&&B<Q0-2)return"".concat(K0).concat(W0,` + `.concat(u),E++))}if(E>20&&B<Q0-2)return"".concat(K0).concat(W0,` `).concat(q,` `).concat(T,"...").concat(O).concat(V,` `)+"".concat(T,"...").concat(O)}return"".concat(K0).concat(Q?W0:"",` -`).concat(q).concat(V).concat(H).concat(w)}var r=function(Y){u(J,Y);function J($){var V;if(l(this,J),P($)!=="object"||$===null)throw new D("options","Object",$);var{message:q,operator:Z,stackStartFn:H,actual:Q,expected:z}=$,K=Error.stackTraceLimit;if(Error.stackTraceLimit=0,q!=null)V=I(this,R(J).call(this,String(q)));else if(process.stderr&&process.stderr.isTTY&&(process.stderr&&process.stderr.getColorDepth&&process.stderr.getColorDepth()!==1?(T="[34m",G="[32m",O="[39m",f="[31m"):(T="",G="",O="",f="")),P(Q)==="object"&&Q!==null&&P(z)==="object"&&z!==null&&("stack"in Q)&&Q instanceof Error&&("stack"in z)&&z instanceof Error&&(Q=c(Q),z=c(z)),Z==="deepStrictEqual"||Z==="strictEqual")V=I(this,R(J).call(this,s(Q,z,Z)));else if(Z==="notDeepStrictEqual"||Z==="notStrictEqual"){var W=S[Z],B=g(Q).split(` +`).concat(q).concat(V).concat(H).concat(w)}var r=function(Y){n(J,Y);function J($){var V;if(l(this,J),P($)!=="object"||$===null)throw new D("options","Object",$);var{message:q,operator:Z,stackStartFn:H,actual:Q,expected:z}=$,K=Error.stackTraceLimit;if(Error.stackTraceLimit=0,q!=null)V=I(this,R(J).call(this,String(q)));else if(process.stderr&&process.stderr.isTTY&&(process.stderr&&process.stderr.getColorDepth&&process.stderr.getColorDepth()!==1?(T="[34m",G="[32m",O="[39m",f="[31m"):(T="",G="",O="",f="")),P(Q)==="object"&&Q!==null&&P(z)==="object"&&z!==null&&("stack"in Q)&&Q instanceof Error&&("stack"in z)&&z instanceof Error&&(Q=c(Q),z=c(z)),Z==="deepStrictEqual"||Z==="strictEqual")V=I(this,R(J).call(this,s(Q,z,Z)));else if(Z==="notDeepStrictEqual"||Z==="notStrictEqual"){var W=S[Z],B=d(Q).split(` `);if(Z==="notStrictEqual"&&P(Q)==="object"&&Q!==null&&(W=S.notStrictEqualObject),B.length>30)for(B[26]="".concat(T,"...").concat(O);B.length>27;)B.pop();B.length===1?V=I(this,R(J).call(this,"".concat(W," ").concat(B[0]))):V=I(this,R(J).call(this,"".concat(W,` `).concat(B.join(` `),` -`)))}else{var w=g(Q),F="",d=S[Z];Z==="notDeepEqual"||Z==="notEqual"?(w="".concat(S[Z],` +`)))}else{var w=d(Q),F="",_=S[Z];Z==="notDeepEqual"||Z==="notEqual"?(w="".concat(S[Z],` -`).concat(w),w.length>1024&&(w="".concat(w.slice(0,1021),"..."))):(F="".concat(g(z)),w.length>512&&(w="".concat(w.slice(0,509),"...")),F.length>512&&(F="".concat(F.slice(0,509),"...")),Z==="deepEqual"||Z==="equal"?w="".concat(d,` +`).concat(w),w.length>1024&&(w="".concat(w.slice(0,1021),"..."))):(F="".concat(d(z)),w.length>512&&(w="".concat(w.slice(0,509),"...")),F.length>512&&(F="".concat(F.slice(0,509),"...")),Z==="deepEqual"||Z==="equal"?w="".concat(_,` `).concat(w,` should equal -`):F=" ".concat(Z," ").concat(F)),V=I(this,R(J).call(this,"".concat(w).concat(F)))}return Error.stackTraceLimit=K,V.generatedMessage=!q,Object.defineProperty(m(V),"name",{value:"AssertionError [ERR_ASSERTION]",enumerable:!1,writable:!0,configurable:!0}),V.code="ERR_ASSERTION",V.actual=Q,V.expected=z,V.operator=Z,Error.captureStackTrace&&Error.captureStackTrace(m(V),H),V.stack,V.name="AssertionError",I(V)}return x(J,[{key:"toString",value:function(){return"".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:U.custom,value:function($,V){return U(this,A({},V,{customInspect:!1,depth:0}))}}]),J}(N(Error));L.exports=r}}),z0=X0({"assert/build/assert.js"(p,L){function A(Z){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?A=function(H){return typeof H}:A=function(H){return H&&typeof Symbol=="function"&&H.constructor===Symbol&&H!==Symbol.prototype?"symbol":typeof H},A(Z)}function i(Z,H){if(!(Z instanceof H))throw new TypeError("Cannot call a class as a function")}var l=$0(),b=l.codes,x=b.ERR_AMBIGUOUS_ARGUMENT,I=b.ERR_INVALID_ARG_TYPE,m=b.ERR_INVALID_ARG_VALUE,u=b.ERR_INVALID_RETURN_VALUE,N=b.ERR_MISSING_ARGS,C=B0(),j=J0,n=j.inspect,h=J0.types,R=h.isPromise,P=h.isRegExp,U=Object.assign,X=Object.is,D=new Map,v=!1,M=L.exports=S,T={};function G(Z){throw Z.message instanceof Error?Z.message:new C(Z)}function f(Z,H,Q,z,K){var W=arguments.length,B;if(W===0)B="Failed";else if(W===1)Q=Z,Z=void 0;else{if(v===!1){v=!0;var w=process.emitWarning?process.emitWarning:console.warn.bind(console);w("assert.fail() with more than one argument is deprecated. Please use assert.strictEqual() instead or only pass a message.","DeprecationWarning","DEP0094")}W===2&&(z="!=")}if(Q instanceof Error)throw Q;var F={actual:Z,expected:H,operator:z===void 0?"fail":z,stackStartFn:K||f};Q!==void 0&&(F.message=Q);var d=new C(F);throw B&&(d.message=B,d.generatedMessage=!0),d}M.fail=f,M.AssertionError=C;function O(Z,H,Q,z){if(!Q){var K=!1;if(H===0)K=!0,z="No value argument passed to `assert.ok()`";else if(z instanceof Error)throw z;var W=new C({actual:Q,expected:!0,message:z,operator:"==",stackStartFn:Z});throw W.generatedMessage=K,W}}function S(){for(var Z=arguments.length,H=new Array(Z),Q=0;Q<Z;Q++)H[Q]=arguments[Q];O.apply(void 0,[S,H.length].concat(H))}M.ok=S,M.equal=function Z(H,Q,z){if(arguments.length<2)throw new N("actual","expected");H!=Q&&G({actual:H,expected:Q,message:z,operator:"==",stackStartFn:Z})},M.notEqual=function Z(H,Q,z){if(arguments.length<2)throw new N("actual","expected");H==Q&&G({actual:H,expected:Q,message:z,operator:"!=",stackStartFn:Z})},M.deepEqual=function Z(H,Q,z){if(arguments.length<2)throw new N("actual","expected");t(H,Q,!1)||G({actual:H,expected:Q,message:z,operator:"deepEqual",stackStartFn:Z})},M.notDeepEqual=function Z(H,Q,z){if(arguments.length<2)throw new N("actual","expected");t(H,Q,!1)&&G({actual:H,expected:Q,message:z,operator:"notDeepEqual",stackStartFn:Z})},M.deepStrictEqual=function Z(H,Q,z){if(arguments.length<2)throw new N("actual","expected");t(H,Q,!0)||G({actual:H,expected:Q,message:z,operator:"deepStrictEqual",stackStartFn:Z})},M.notDeepStrictEqual=y;function y(Z,H,Q){if(arguments.length<2)throw new N("actual","expected");t(Z,H,!0)&&G({actual:Z,expected:H,message:Q,operator:"notDeepStrictEqual",stackStartFn:y})}M.strictEqual=function Z(H,Q,z){if(arguments.length<2)throw new N("actual","expected");X(H,Q)||G({actual:H,expected:Q,message:z,operator:"strictEqual",stackStartFn:Z})},M.notStrictEqual=function Z(H,Q,z){if(arguments.length<2)throw new N("actual","expected");X(H,Q)&&G({actual:H,expected:Q,message:z,operator:"notStrictEqual",stackStartFn:Z})},M.match=function Z(H,Q,z){if(arguments.length<2)throw new N("actual","expected");if(!P(Q))throw new I("expected","RegExp",Q);Q.test(H)||G({actual:H,expected:Q,message:z,operator:"match",stackStartFn:Z})};var c=function Z(H,Q,z){var K=this;i(this,Z),Q.forEach(function(W){(W in H)&&(z!==void 0&&typeof z[W]=="string"&&P(H[W])&&H[W].test(z[W])?K[W]=z[W]:K[W]=H[W])})};function g(Z,H,Q,z,K,W){if(!(Q in Z)||!t(Z[Q],H[Q],!0)){if(!z){var B=new c(Z,K),w=new c(H,K,Z),F=new C({actual:B,expected:w,operator:"deepStrictEqual",stackStartFn:W});throw F.actual=Z,F.expected=H,F.operator=W.name,F}G({actual:Z,expected:H,message:z,operator:W.name,stackStartFn:W})}}function s(Z,H,Q,z){if(typeof H!="function"){if(P(H))return H.test(Z);if(arguments.length===2)throw new I("expected",["Function","RegExp"],H);if(A(Z)!=="object"||Z===null){var K=new C({actual:Z,expected:H,message:Q,operator:"deepStrictEqual",stackStartFn:z});throw K.operator=z.name,K}var W=Object.keys(H);if(H instanceof Error)W.push("name","message");else if(W.length===0)throw new m("error",H,"may not be an empty object");return W.forEach(function(B){return typeof Z[B]=="string"&&P(H[B])&&H[B].test(Z[B])||g(Z,H,B,Q,W,z)}),!0}return H.prototype!==void 0&&Z instanceof H?!0:Error.isPrototypeOf(H)?!1:H.call({},Z)===!0}function r(Z){if(typeof Z!="function")throw new I("fn","Function",Z);try{Z()}catch(H){return H}return T}function Y(Z){return R(Z)||Z!==null&&A(Z)==="object"&&typeof Z.then=="function"&&typeof Z.catch=="function"}function J(Z){return Promise.resolve().then(function(){var H;if(typeof Z=="function"){if(H=Z(),!Y(H))throw new u("instance of Promise","promiseFn",H)}else if(Y(Z))H=Z;else throw new I("promiseFn",["Function","Promise"],Z);return Promise.resolve().then(function(){return H}).then(function(){return T}).catch(function(Q){return Q})})}function $(Z,H,Q,z){if(typeof Q=="string"){if(arguments.length===4)throw new I("error",["Object","Error","Function","RegExp"],Q);if(A(H)==="object"&&H!==null){if(H.message===Q)throw new x("error/message",'The error message "'.concat(H.message,'" is identical to the message.'))}else if(H===Q)throw new x("error/message",'The error "'.concat(H,'" is identical to the message.'));z=Q,Q=void 0}else if(Q!=null&&A(Q)!=="object"&&typeof Q!="function")throw new I("error",["Object","Error","Function","RegExp"],Q);if(H===T){var K="";Q&&Q.name&&(K+=" (".concat(Q.name,")")),K+=z?": ".concat(z):".";var W=Z.name==="rejects"?"rejection":"exception";G({actual:void 0,expected:Q,operator:Z.name,message:"Missing expected ".concat(W).concat(K),stackStartFn:Z})}if(Q&&!s(H,Q,z,Z))throw H}function V(Z,H,Q,z){if(H!==T){if(typeof Q=="string"&&(z=Q,Q=void 0),!Q||s(H,Q)){var K=z?": ".concat(z):".",W=Z.name==="doesNotReject"?"rejection":"exception";G({actual:H,expected:Q,operator:Z.name,message:"Got unwanted ".concat(W).concat(K,` -`)+'Actual message: "'.concat(H&&H.message,'"'),stackStartFn:Z})}throw H}}M.throws=function Z(H){for(var Q=arguments.length,z=new Array(Q>1?Q-1:0),K=1;K<Q;K++)z[K-1]=arguments[K];$.apply(void 0,[Z,r(H)].concat(z))},M.rejects=function Z(H){for(var Q=arguments.length,z=new Array(Q>1?Q-1:0),K=1;K<Q;K++)z[K-1]=arguments[K];return J(H).then(function(W){return $.apply(void 0,[Z,W].concat(z))})},M.doesNotThrow=function Z(H){for(var Q=arguments.length,z=new Array(Q>1?Q-1:0),K=1;K<Q;K++)z[K-1]=arguments[K];V.apply(void 0,[Z,r(H)].concat(z))},M.doesNotReject=function Z(H){for(var Q=arguments.length,z=new Array(Q>1?Q-1:0),K=1;K<Q;K++)z[K-1]=arguments[K];return J(H).then(function(W){return V.apply(void 0,[Z,W].concat(z))})},M.ifError=function Z(H){if(H!=null){var Q="ifError got unwanted exception: ";A(H)==="object"&&typeof H.message=="string"?H.message.length===0&&H.constructor?Q+=H.constructor.name:Q+=H.message:Q+=n(H);var z=new C({actual:H,expected:null,operator:"ifError",message:Q,stackStartFn:Z}),K=H.stack;if(typeof K=="string"){var W=K.split(` +`):F=" ".concat(Z," ").concat(F)),V=I(this,R(J).call(this,"".concat(w).concat(F)))}return Error.stackTraceLimit=K,V.generatedMessage=!q,Object.defineProperty(m(V),"name",{value:"AssertionError [ERR_ASSERTION]",enumerable:!1,writable:!0,configurable:!0}),V.code="ERR_ASSERTION",V.actual=Q,V.expected=z,V.operator=Z,Error.captureStackTrace&&Error.captureStackTrace(m(V),H),V.stack,V.name="AssertionError",I(V)}return x(J,[{key:"toString",value:function(){return"".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:U.custom,value:function($,V){return U(this,A({},V,{customInspect:!1,depth:0}))}}]),J}(N(Error));L.exports=r}}),z0=X0({"assert/build/assert.js"(g,L){function A(Z){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?A=function(H){return typeof H}:A=function(H){return H&&typeof Symbol=="function"&&H.constructor===Symbol&&H!==Symbol.prototype?"symbol":typeof H},A(Z)}function i(Z,H){if(!(Z instanceof H))throw new TypeError("Cannot call a class as a function")}var l=$0(),b=l.codes,x=b.ERR_AMBIGUOUS_ARGUMENT,I=b.ERR_INVALID_ARG_TYPE,m=b.ERR_INVALID_ARG_VALUE,n=b.ERR_INVALID_RETURN_VALUE,N=b.ERR_MISSING_ARGS,C=B0(),j=J0,p=j.inspect,h=J0.types,R=h.isPromise,P=h.isRegExp,U=Object.assign,X=Object.is,D=new Map,v=!1,M=L.exports=S,T={};function G(Z){throw Z.message instanceof Error?Z.message:new C(Z)}function f(Z,H,Q,z,K){var W=arguments.length,B;if(W===0)B="Failed";else if(W===1)Q=Z,Z=void 0;else{if(v===!1){v=!0;var w=process.emitWarning?process.emitWarning:console.warn.bind(console);w("assert.fail() with more than one argument is deprecated. Please use assert.strictEqual() instead or only pass a message.","DeprecationWarning","DEP0094")}W===2&&(z="!=")}if(Q instanceof Error)throw Q;var F={actual:Z,expected:H,operator:z===void 0?"fail":z,stackStartFn:K||f};Q!==void 0&&(F.message=Q);var _=new C(F);throw B&&(_.message=B,_.generatedMessage=!0),_}M.fail=f,M.AssertionError=C;function O(Z,H,Q,z){if(!Q){var K=!1;if(H===0)K=!0,z="No value argument passed to `assert.ok()`";else if(z instanceof Error)throw z;var W=new C({actual:Q,expected:!0,message:z,operator:"==",stackStartFn:Z});throw W.generatedMessage=K,W}}function S(){for(var Z=arguments.length,H=new Array(Z),Q=0;Q<Z;Q++)H[Q]=arguments[Q];O.apply(void 0,[S,H.length].concat(H))}M.ok=S,M.equal=function Z(H,Q,z){if(arguments.length<2)throw new N("actual","expected");H!=Q&&G({actual:H,expected:Q,message:z,operator:"==",stackStartFn:Z})},M.notEqual=function Z(H,Q,z){if(arguments.length<2)throw new N("actual","expected");H==Q&&G({actual:H,expected:Q,message:z,operator:"!=",stackStartFn:Z})},M.deepEqual=function Z(H,Q,z){if(arguments.length<2)throw new N("actual","expected");t(H,Q,!1)||G({actual:H,expected:Q,message:z,operator:"deepEqual",stackStartFn:Z})},M.notDeepEqual=function Z(H,Q,z){if(arguments.length<2)throw new N("actual","expected");t(H,Q,!1)&&G({actual:H,expected:Q,message:z,operator:"notDeepEqual",stackStartFn:Z})},M.deepStrictEqual=function Z(H,Q,z){if(arguments.length<2)throw new N("actual","expected");t(H,Q,!0)||G({actual:H,expected:Q,message:z,operator:"deepStrictEqual",stackStartFn:Z})},M.notDeepStrictEqual=y;function y(Z,H,Q){if(arguments.length<2)throw new N("actual","expected");t(Z,H,!0)&&G({actual:Z,expected:H,message:Q,operator:"notDeepStrictEqual",stackStartFn:y})}M.strictEqual=function Z(H,Q,z){if(arguments.length<2)throw new N("actual","expected");X(H,Q)||G({actual:H,expected:Q,message:z,operator:"strictEqual",stackStartFn:Z})},M.notStrictEqual=function Z(H,Q,z){if(arguments.length<2)throw new N("actual","expected");X(H,Q)&&G({actual:H,expected:Q,message:z,operator:"notStrictEqual",stackStartFn:Z})},M.match=function Z(H,Q,z){if(arguments.length<2)throw new N("actual","expected");if(!P(Q))throw new I("expected","RegExp",Q);Q.test(H)||G({actual:H,expected:Q,message:z,operator:"match",stackStartFn:Z})};var c=function Z(H,Q,z){var K=this;i(this,Z),Q.forEach(function(W){(W in H)&&(z!==void 0&&typeof z[W]=="string"&&P(H[W])&&H[W].test(z[W])?K[W]=z[W]:K[W]=H[W])})};function d(Z,H,Q,z,K,W){if(!(Q in Z)||!t(Z[Q],H[Q],!0)){if(!z){var B=new c(Z,K),w=new c(H,K,Z),F=new C({actual:B,expected:w,operator:"deepStrictEqual",stackStartFn:W});throw F.actual=Z,F.expected=H,F.operator=W.name,F}G({actual:Z,expected:H,message:z,operator:W.name,stackStartFn:W})}}function s(Z,H,Q,z){if(typeof H!="function"){if(P(H))return H.test(Z);if(arguments.length===2)throw new I("expected",["Function","RegExp"],H);if(A(Z)!=="object"||Z===null){var K=new C({actual:Z,expected:H,message:Q,operator:"deepStrictEqual",stackStartFn:z});throw K.operator=z.name,K}var W=Object.keys(H);if(H instanceof Error)W.push("name","message");else if(W.length===0)throw new m("error",H,"may not be an empty object");return W.forEach(function(B){return typeof Z[B]=="string"&&P(H[B])&&H[B].test(Z[B])||d(Z,H,B,Q,W,z)}),!0}return H.prototype!==void 0&&Z instanceof H?!0:Error.isPrototypeOf(H)?!1:H.call({},Z)===!0}function r(Z){if(typeof Z!="function")throw new I("fn","Function",Z);try{Z()}catch(H){return H}return T}function Y(Z){return R(Z)||Z!==null&&A(Z)==="object"&&typeof Z.then=="function"&&typeof Z.catch=="function"}function J(Z){return Promise.resolve().then(function(){var H;if(typeof Z=="function"){if(H=Z(),!Y(H))throw new n("instance of Promise","promiseFn",H)}else if(Y(Z))H=Z;else throw new I("promiseFn",["Function","Promise"],Z);return Promise.resolve().then(function(){return H}).then(function(){return T}).catch(function(Q){return Q})})}function $(Z,H,Q,z){if(typeof Q=="string"){if(arguments.length===4)throw new I("error",["Object","Error","Function","RegExp"],Q);if(A(H)==="object"&&H!==null){if(H.message===Q)throw new x("error/message",'The error message "'.concat(H.message,'" is identical to the message.'))}else if(H===Q)throw new x("error/message",'The error "'.concat(H,'" is identical to the message.'));z=Q,Q=void 0}else if(Q!=null&&A(Q)!=="object"&&typeof Q!="function")throw new I("error",["Object","Error","Function","RegExp"],Q);if(H===T){var K="";Q&&Q.name&&(K+=" (".concat(Q.name,")")),K+=z?": ".concat(z):".";var W=Z.name==="rejects"?"rejection":"exception";G({actual:void 0,expected:Q,operator:Z.name,message:"Missing expected ".concat(W).concat(K),stackStartFn:Z})}if(Q&&!s(H,Q,z,Z))throw H}function V(Z,H,Q,z){if(H!==T){if(typeof Q=="string"&&(z=Q,Q=void 0),!Q||s(H,Q)){var K=z?": ".concat(z):".",W=Z.name==="doesNotReject"?"rejection":"exception";G({actual:H,expected:Q,operator:Z.name,message:"Got unwanted ".concat(W).concat(K,` +`)+'Actual message: "'.concat(H&&H.message,'"'),stackStartFn:Z})}throw H}}M.throws=function Z(H){for(var Q=arguments.length,z=new Array(Q>1?Q-1:0),K=1;K<Q;K++)z[K-1]=arguments[K];$.apply(void 0,[Z,r(H)].concat(z))},M.rejects=function Z(H){for(var Q=arguments.length,z=new Array(Q>1?Q-1:0),K=1;K<Q;K++)z[K-1]=arguments[K];return J(H).then(function(W){return $.apply(void 0,[Z,W].concat(z))})},M.doesNotThrow=function Z(H){for(var Q=arguments.length,z=new Array(Q>1?Q-1:0),K=1;K<Q;K++)z[K-1]=arguments[K];V.apply(void 0,[Z,r(H)].concat(z))},M.doesNotReject=function Z(H){for(var Q=arguments.length,z=new Array(Q>1?Q-1:0),K=1;K<Q;K++)z[K-1]=arguments[K];return J(H).then(function(W){return V.apply(void 0,[Z,W].concat(z))})},M.ifError=function Z(H){if(H!=null){var Q="ifError got unwanted exception: ";A(H)==="object"&&typeof H.message=="string"?H.message.length===0&&H.constructor?Q+=H.constructor.name:Q+=H.message:Q+=p(H);var z=new C({actual:H,expected:null,operator:"ifError",message:Q,stackStartFn:Z}),K=H.stack;if(typeof K=="string"){var W=K.split(` `);W.shift();for(var B=z.stack.split(` `),w=0;w<W.length;w++){var F=B.indexOf(W[w]);if(F!==-1){B=B.slice(0,F);break}}z.stack="".concat(B.join(` `),` `).concat(W.join(` -`))}throw z}};function q(){for(var Z=arguments.length,H=new Array(Z),Q=0;Q<Z;Q++)H[Q]=arguments[Q];O.apply(void 0,[q,H.length].concat(H))}M.strict=U(q,M,{equal:M.strictEqual,deepEqual:M.deepStrictEqual,notEqual:M.notStrictEqual,notDeepEqual:M.notDeepStrictEqual}),M.strict.strict=M.strict}}),H0=z0();H0[Symbol.for("CommonJS")]=0;H0.CallTracker=V0;var{AssertionError:M0,assert:v0,deepEqual:q0,deepStrictEqual:G0,doesNotReject:T0,doesNotThrow:O0,equal:w0,fail:F0,ifError:N0,notDeepEqual:P0,notDeepStrictEqual:A0,notEqual:I0,notStrictEqual:S0,ok:j0,rejects:R0,strict:f0,strictEqual:C0,throws:E0}=H0,b0=H0;export{E0 as throws,C0 as strictEqual,f0 as strict,R0 as rejects,j0 as ok,S0 as notStrictEqual,I0 as notEqual,A0 as notDeepStrictEqual,P0 as notDeepEqual,N0 as ifError,F0 as fail,w0 as equal,O0 as doesNotThrow,T0 as doesNotReject,b0 as default,G0 as deepStrictEqual,q0 as deepEqual,v0 as assert,M0 as AssertionError}; +`))}throw z}};function q(){for(var Z=arguments.length,H=new Array(Z),Q=0;Q<Z;Q++)H[Q]=arguments[Q];O.apply(void 0,[q,H.length].concat(H))}M.strict=U(q,M,{equal:M.strictEqual,deepEqual:M.deepStrictEqual,notEqual:M.notStrictEqual,notDeepEqual:M.notDeepStrictEqual}),M.strict.strict=M.strict}}),H0=z0();H0[Symbol.for("CommonJS")]=0;H0.CallTracker=V0;var{AssertionError:q0,assert:G0,deepEqual:T0,deepStrictEqual:O0,doesNotReject:w0,doesNotThrow:F0,equal:N0,fail:P0,ifError:A0,notDeepEqual:I0,notDeepStrictEqual:S0,notEqual:j0,notStrictEqual:R0,ok:f0,rejects:C0,strict:E0,strictEqual:L0,throws:b0}=H0,k0=H0;export{b0 as throws,L0 as strictEqual,E0 as strict,C0 as rejects,f0 as ok,R0 as notStrictEqual,j0 as notEqual,S0 as notDeepStrictEqual,I0 as notDeepEqual,A0 as ifError,P0 as fail,N0 as equal,F0 as doesNotThrow,w0 as doesNotReject,k0 as default,O0 as deepStrictEqual,T0 as deepEqual,G0 as assert,q0 as AssertionError}; diff --git a/src/js/out/modules/node/fs.promises.js b/src/js/out/modules/node/fs.promises.js index 90adbae88..9ac3c6f65 100644 --- a/src/js/out/modules/node/fs.promises.js +++ b/src/js/out/modules/node/fs.promises.js @@ -1 +1 @@ -function J(B,C={}){const G=[];if(B instanceof URL)throw new TypeError("Watch URLs are not supported yet");else if(Buffer.isBuffer(B))B=B.toString();else if(typeof B!=="string")throw new TypeError("Expected path to be a string or Buffer");let D=null;if(typeof C==="string")C={encoding:C};return S.watch(B,C||{},(z,A)=>{if(G.push({eventType:z,filename:A}),D){const H=D;D=null,H()}}),{async*[Symbol.asyncIterator](){let z=!1;while(!z){while(G.length){let A=G.shift();if(A.eventType==="close"){z=!0;break}if(A.eventType==="error")throw z=!0,A.filename;yield A}await new Promise((A)=>D=A)}}}}var S=Bun.fs(),I="::bunternal::",q={[I]:(B)=>{var C={[I]:function(G,D,z){var A;try{A=B.apply(S,z),z=void 0}catch(H){z=void 0,D(H);return}G(A)}}[I];return async function(...G){return await new Promise((D,z)=>{process.nextTick(C,D,z,G)})}}}[I],K=q(S.accessSync),L=q(S.appendFileSync),M=q(S.closeSync),N=q(S.copyFileSync),O=q(S.existsSync),P=q(S.chownSync),Q=q(S.chmodSync),U=q(S.fchmodSync),V=q(S.fchownSync),X=q(S.fstatSync),Y=q(S.fsyncSync),Z=q(S.ftruncateSync),_=q(S.futimesSync),$=q(S.lchmodSync),T=q(S.lchownSync),W=q(S.linkSync),k=q(S.lstatSync),E=q(S.mkdirSync),x=q(S.mkdtempSync),F=q(S.openSync),R=q(S.readSync),g=q(S.writeSync),h=q(S.readdirSync),j=q(S.readFileSync),w=q(S.writeFileSync),b=q(S.readlinkSync),u=q(S.realpathSync),d=q(S.renameSync),c=q(S.statSync),v=q(S.symlinkSync),a=q(S.truncateSync),y=q(S.unlinkSync),l=q(S.utimesSync),p=q(S.lutimesSync),m=q(S.rmSync),n=q(S.rmdirSync),t=(B,C,G)=>{return new Promise((D,z)=>{try{var A=S.writevSync(B,C,G)}catch(H){z(H);return}D({bytesWritten:A,buffers:C})})},o=(B,C,G)=>{return new Promise((D,z)=>{try{var A=S.readvSync(B,C,G)}catch(H){z(H);return}D({bytesRead:A,buffers:C})})},r={access:K,appendFile:L,close:M,copyFile:N,exists:O,chown:P,chmod:Q,fchmod:U,fchown:V,fstat:X,fsync:Y,ftruncate:Z,futimes:_,lchmod:$,lchown:T,link:W,lstat:k,mkdir:E,mkdtemp:x,open:F,read:R,write:g,readdir:h,readFile:j,writeFile:w,readlink:b,realpath:u,rename:d,stat:c,symlink:v,truncate:a,unlink:y,utimes:l,lutimes:p,rm:m,rmdir:n,watch:J,writev:t,readv:o,constants,[Symbol.for("CommonJS")]:0};export{t as writev,w as writeFile,g as write,J as watch,l as utimes,y as unlink,a as truncate,v as symlink,c as stat,n as rmdir,m as rm,d as rename,u as realpath,o as readv,b as readlink,h as readdir,j as readFile,R as read,F as open,x as mkdtemp,E as mkdir,p as lutimes,k as lstat,W as link,T as lchown,$ as lchmod,_ as futimes,Z as ftruncate,Y as fsync,X as fstat,V as fchown,U as fchmod,O as exists,r as default,N as copyFile,M as close,P as chown,Q as chmod,L as appendFile,K as access}; +var r=(B)=>{return import.meta.require(B)};function J(B,C={}){const G=[];if(B instanceof URL)throw new TypeError("Watch URLs are not supported yet");else if(Buffer.isBuffer(B))B=B.toString();else if(typeof B!=="string")throw new TypeError("Expected path to be a string or Buffer");let D=null;if(typeof C==="string")C={encoding:C};return S.watch(B,C||{},(z,A)=>{if(G.push({eventType:z,filename:A}),D){const H=D;D=null,H()}}),{async*[Symbol.asyncIterator](){let z=!1;while(!z){while(G.length){let A=G.shift();if(A.eventType==="close"){z=!0;break}if(A.eventType==="error")throw z=!0,A.filename;yield A}await new Promise((A)=>D=A)}}}}var S=Bun.fs(),I="::bunternal::",q={[I]:(B)=>{var C={[I]:function(G,D,z){var A;try{A=B.apply(S,z),z=void 0}catch(H){z=void 0,D(H);return}G(A)}}[I];return async function(...G){return await new Promise((D,z)=>{process.nextTick(C,D,z,G)})}}}[I],K=q(S.accessSync),L=q(S.appendFileSync),M=q(S.closeSync),N=q(S.copyFileSync),O=q(S.existsSync),P=q(S.chownSync),Q=q(S.chmodSync),U=q(S.fchmodSync),V=q(S.fchownSync),X=q(S.fstatSync),Y=q(S.fsyncSync),Z=q(S.ftruncateSync),_=q(S.futimesSync),$=q(S.lchmodSync),T=q(S.lchownSync),W=q(S.linkSync),k=q(S.lstatSync),E=q(S.mkdirSync),x=q(S.mkdtempSync),F=q(S.openSync),R=q(S.readSync),g=q(S.writeSync),h=q(S.readdirSync),j=q(S.readFileSync),w=q(S.writeFileSync),b=q(S.readlinkSync),u=q(S.realpathSync),d=q(S.renameSync),c=q(S.statSync),v=q(S.symlinkSync),a=q(S.truncateSync),y=q(S.unlinkSync),l=q(S.utimesSync),p=q(S.lutimesSync),m=q(S.rmSync),n=q(S.rmdirSync),t=(B,C,G)=>{return new Promise((D,z)=>{try{var A=S.writevSync(B,C,G)}catch(H){z(H);return}D({bytesWritten:A,buffers:C})})},o=(B,C,G)=>{return new Promise((D,z)=>{try{var A=S.readvSync(B,C,G)}catch(H){z(H);return}D({bytesRead:A,buffers:C})})},f={access:K,appendFile:L,close:M,copyFile:N,exists:O,chown:P,chmod:Q,fchmod:U,fchown:V,fstat:X,fsync:Y,ftruncate:Z,futimes:_,lchmod:$,lchown:T,link:W,lstat:k,mkdir:E,mkdtemp:x,open:F,read:R,write:g,readdir:h,readFile:j,writeFile:w,readlink:b,realpath:u,rename:d,stat:c,symlink:v,truncate:a,unlink:y,utimes:l,lutimes:p,rm:m,rmdir:n,watch:J,writev:t,readv:o,constants,[Symbol.for("CommonJS")]:0};export{t as writev,w as writeFile,g as write,J as watch,l as utimes,y as unlink,a as truncate,v as symlink,c as stat,n as rmdir,m as rm,d as rename,u as realpath,o as readv,b as readlink,h as readdir,j as readFile,R as read,F as open,x as mkdtemp,E as mkdir,p as lutimes,k as lstat,W as link,T as lchown,$ as lchmod,_ as futimes,Z as ftruncate,Y as fsync,X as fstat,V as fchown,U as fchmod,O as exists,f as default,N as copyFile,M as close,P as chown,Q as chmod,L as appendFile,K as access}; diff --git a/src/js/out/modules/node/path.js b/src/js/out/modules/node/path.js index edc4f1d3c..bea7f4149 100644 --- a/src/js/out/modules/node/path.js +++ b/src/js/out/modules/node/path.js @@ -1 +1 @@ -var g=function(i){var m=k({basename:i.basename.bind(i),dirname:i.dirname.bind(i),extname:i.extname.bind(i),format:i.format.bind(i),isAbsolute:i.isAbsolute.bind(i),join:i.join.bind(i),normalize:i.normalize.bind(i),parse:i.parse.bind(i),relative:i.relative.bind(i),resolve:i.resolve.bind(i),toNamespacedPath:i.toNamespacedPath.bind(i),sep:i.sep,delimiter:i.delimiter});return m.default=m,m},k=(i)=>Object.assign(Object.create(null),i),f=g(Bun._Path()),q=g(Bun._Path(!1)),v=g(Bun._Path(!0));f.win32=v;f.posix=q;var{basename:y,dirname:z,extname:A,format:B,isAbsolute:C,join:D,normalize:E,parse:F,relative:G,resolve:H,toNamespacedPath:I,sep:J,delimiter:K,__esModule:L}=f;f[Symbol.for("CommonJS")]=0;f.__esModule=!0;var O=f;export{v as win32,I as toNamespacedPath,J as sep,H as resolve,G as relative,q as posix,F as parse,E as normalize,D as join,C as isAbsolute,B as format,A as extname,z as dirname,K as delimiter,O as default,k as createModule,y as basename,L as __esModule}; +var y=(i)=>{return import.meta.require(i)};var g=function(i){var m=k({basename:i.basename.bind(i),dirname:i.dirname.bind(i),extname:i.extname.bind(i),format:i.format.bind(i),isAbsolute:i.isAbsolute.bind(i),join:i.join.bind(i),normalize:i.normalize.bind(i),parse:i.parse.bind(i),relative:i.relative.bind(i),resolve:i.resolve.bind(i),toNamespacedPath:i.toNamespacedPath.bind(i),sep:i.sep,delimiter:i.delimiter});return m.default=m,m},k=(i)=>Object.assign(Object.create(null),i),f=g(Bun._Path()),q=g(Bun._Path(!1)),v=g(Bun._Path(!0));f.win32=v;f.posix=q;var{basename:A,dirname:B,extname:C,format:D,isAbsolute:E,join:F,normalize:G,parse:H,relative:I,resolve:J,toNamespacedPath:K,sep:L,delimiter:N,__esModule:O}=f;f[Symbol.for("CommonJS")]=0;f.__esModule=!0;var Q=f;export{v as win32,K as toNamespacedPath,L as sep,J as resolve,I as relative,q as posix,H as parse,G as normalize,F as join,E as isAbsolute,D as format,C as extname,B as dirname,N as delimiter,Q as default,k as createModule,A as basename,O as __esModule}; diff --git a/src/js/out/modules/node/path.posix.js b/src/js/out/modules/node/path.posix.js index 179f2b9aa..9588492d7 100644 --- a/src/js/out/modules/node/path.posix.js +++ b/src/js/out/modules/node/path.posix.js @@ -1 +1 @@ -var r=function(e){return{basename:e.basename.bind(e),dirname:e.dirname.bind(e),extname:e.extname.bind(e),format:e.format.bind(e),isAbsolute:e.isAbsolute.bind(e),join:e.join.bind(e),normalize:e.normalize.bind(e),parse:e.parse.bind(e),relative:e.relative.bind(e),resolve:e.resolve.bind(e),toNamespacedPath:e.toNamespacedPath.bind(e),sep:e.sep,delimiter:e.delimiter}},i=r(Bun._Path(!1));i[Symbol.for("CommonJS")]=0;var{basename:d,dirname:l,extname:s,format:c,isAbsolute:f,join:g,normalize:k,parse:m,relative:q,resolve:t,toNamespacedPath:v,sep:w,delimiter:x}=i,z=i;export{v as toNamespacedPath,w as sep,t as resolve,q as relative,m as parse,k as normalize,g as join,f as isAbsolute,c as format,s as extname,l as dirname,x as delimiter,z as default,d as basename}; +var d=(e)=>{return import.meta.require(e)};var r=function(e){return{basename:e.basename.bind(e),dirname:e.dirname.bind(e),extname:e.extname.bind(e),format:e.format.bind(e),isAbsolute:e.isAbsolute.bind(e),join:e.join.bind(e),normalize:e.normalize.bind(e),parse:e.parse.bind(e),relative:e.relative.bind(e),resolve:e.resolve.bind(e),toNamespacedPath:e.toNamespacedPath.bind(e),sep:e.sep,delimiter:e.delimiter}},i=r(Bun._Path(!1));i[Symbol.for("CommonJS")]=0;var{basename:s,dirname:c,extname:f,format:g,isAbsolute:k,join:m,normalize:q,parse:t,relative:v,resolve:w,toNamespacedPath:x,sep:y,delimiter:z}=i,B=i;export{x as toNamespacedPath,y as sep,w as resolve,v as relative,t as parse,q as normalize,m as join,k as isAbsolute,g as format,f as extname,c as dirname,z as delimiter,B as default,s as basename}; diff --git a/src/js/out/modules/node/path.win32.js b/src/js/out/modules/node/path.win32.js index a1b929c52..8d6a0d1d4 100644 --- a/src/js/out/modules/node/path.win32.js +++ b/src/js/out/modules/node/path.win32.js @@ -1 +1 @@ -var r=function(i){return{basename:i.basename.bind(i),dirname:i.dirname.bind(i),extname:i.extname.bind(i),format:i.format.bind(i),isAbsolute:i.isAbsolute.bind(i),join:i.join.bind(i),normalize:i.normalize.bind(i),parse:i.parse.bind(i),relative:i.relative.bind(i),resolve:i.resolve.bind(i),toNamespacedPath:i.toNamespacedPath.bind(i),sep:i.sep,delimiter:i.delimiter}},e=r(Bun._Path(!0)),{basename:s,dirname:t,extname:c,format:d,isAbsolute:f,join:g,normalize:k,parse:l,relative:m,resolve:n,toNamespacedPath:q,sep:v,delimiter:w}=e,y=e;export{q as toNamespacedPath,v as sep,n as resolve,m as relative,l as parse,k as normalize,g as join,f as isAbsolute,d as format,c as extname,t as dirname,w as delimiter,y as default,s as basename}; +var s=(i)=>{return import.meta.require(i)};var r=function(i){return{basename:i.basename.bind(i),dirname:i.dirname.bind(i),extname:i.extname.bind(i),format:i.format.bind(i),isAbsolute:i.isAbsolute.bind(i),join:i.join.bind(i),normalize:i.normalize.bind(i),parse:i.parse.bind(i),relative:i.relative.bind(i),resolve:i.resolve.bind(i),toNamespacedPath:i.toNamespacedPath.bind(i),sep:i.sep,delimiter:i.delimiter}},e=r(Bun._Path(!0)),{basename:c,dirname:d,extname:f,format:g,isAbsolute:k,join:l,normalize:m,parse:n,relative:q,resolve:v,toNamespacedPath:w,sep:x,delimiter:y}=e,A=e;export{w as toNamespacedPath,x as sep,v as resolve,q as relative,n as parse,m as normalize,l as join,k as isAbsolute,g as format,f as extname,d as dirname,y as delimiter,A as default,c as basename}; diff --git a/src/js/out/modules/node/stream.consumers.js b/src/js/out/modules/node/stream.consumers.js index 7a4fa6b46..96ecae4e7 100644 --- a/src/js/out/modules/node/stream.consumers.js +++ b/src/js/out/modules/node/stream.consumers.js @@ -1 +1 @@ -var{Bun:o}=globalThis[Symbol.for("Bun.lazy")]("primordials"),O=o.readableStreamToArrayBuffer,c=o.readableStreamToText,g=(p)=>o.readableStreamToText(p).then(JSON.parse),h=async(p)=>{return new Buffer(await O(p))},i=o.readableStreamToBlob,k={[Symbol.for("CommonJS")]:0,arrayBuffer:O,text:c,json:g,buffer:h,blob:i};export{c as text,g as json,k as default,h as buffer,i as blob,O as arrayBuffer}; +var k=(o)=>{return import.meta.require(o)};var{Bun:p}=globalThis[Symbol.for("Bun.lazy")]("primordials"),O=p.readableStreamToArrayBuffer,c=p.readableStreamToText,g=(o)=>p.readableStreamToText(o).then(JSON.parse),h=async(o)=>{return new Buffer(await O(o))},i=p.readableStreamToBlob,v={[Symbol.for("CommonJS")]:0,arrayBuffer:O,text:c,json:g,buffer:h,blob:i};export{c as text,g as json,v as default,h as buffer,i as blob,O as arrayBuffer}; diff --git a/src/js/out/modules/node/stream.js b/src/js/out/modules/node/stream.js index 06727e66e..b001443b4 100644 --- a/src/js/out/modules/node/stream.js +++ b/src/js/out/modules/node/stream.js @@ -1,2 +1,2 @@ -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"),GQ=zq.create,MQ=zq.defineProperty,FQ=zq.getOwnPropertyDescriptor,rq=zq.getOwnPropertyNames,LQ=zq.getPrototypeOf,jQ=zq.prototype.hasOwnProperty,NQ=zq.setPrototypeOf,Bq=(a,j)=>function B(){return j||(0,a[rq(a)[0]])((j={exports:{}}).exports,j),j.exports};var Xq=process.nextTick;var AQ=Array.isArray,Vq=Bq({"node_modules/readable-stream/lib/ours/primordials.js"(a,j){j.exports={ArrayIsArray(B){return Array.isArray(B)},ArrayPrototypeIncludes(B,G){return B.includes(G)},ArrayPrototypeIndexOf(B,G){return B.indexOf(G)},ArrayPrototypeJoin(B,G){return B.join(G)},ArrayPrototypeMap(B,G){return B.map(G)},ArrayPrototypePop(B,G){return B.pop(G)},ArrayPrototypePush(B,G){return B.push(G)},ArrayPrototypeSlice(B,G,y){return B.slice(G,y)},Error,FunctionPrototypeCall(B,G,...y){return B.call(G,...y)},FunctionPrototypeSymbolHasInstance(B,G){return Function.prototype[Symbol.hasInstance].call(B,G)},MathFloor:Math.floor,Number,NumberIsInteger:Number.isInteger,NumberIsNaN:Number.isNaN,NumberMAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER,NumberMIN_SAFE_INTEGER:Number.MIN_SAFE_INTEGER,NumberParseInt:Number.parseInt,ObjectDefineProperties(B,G){return zq.defineProperties(B,G)},ObjectDefineProperty(B,G,y){return zq.defineProperty(B,G,y)},ObjectGetOwnPropertyDescriptor(B,G){return zq.getOwnPropertyDescriptor(B,G)},ObjectKeys(B){return zq.keys(B)},ObjectSetPrototypeOf(B,G){return zq.setPrototypeOf(B,G)},Promise,PromisePrototypeCatch(B,G){return B.catch(G)},PromisePrototypeThen(B,G,y){return B.then(G,y)},PromiseReject(B){return Promise.reject(B)},ReflectApply:Reflect.apply,RegExpPrototypeTest(B,G){return B.test(G)},SafeSet:Set,String,StringPrototypeSlice(B,G,y){return B.slice(G,y)},StringPrototypeToLowerCase(B){return B.toLowerCase()},StringPrototypeToUpperCase(B){return B.toUpperCase()},StringPrototypeTrim(B){return B.trim()},Symbol,SymbolAsyncIterator:Symbol.asyncIterator,SymbolHasInstance:Symbol.hasInstance,SymbolIterator:Symbol.iterator,TypedArrayPrototypeSet(B,G,y){return B.set(G,y)},Uint8Array}}}),Aq=Bq({"node_modules/readable-stream/lib/ours/util.js"(a,j){var B=zq.getPrototypeOf(async function(){}).constructor,G=typeof Blob!=="undefined"?function A(M){return M instanceof Blob}:function A(M){return!1},y=class extends Error{constructor(A){if(!Array.isArray(A))throw new TypeError(`Expected input to be an Array, got ${typeof A}`);let M="";for(let R=0;R<A.length;R++)M+=` ${A[R].stack} -`;super(M);this.name="AggregateError",this.errors=A}};j.exports={AggregateError:y,once(A){let M=!1;return function(...R){if(M)return;M=!0,A.apply(this,R)}},createDeferredPromise:function(){let A,M;return{promise:new Promise((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 cQ=Yq,EQ=Yq._uint8ArrayToBuffer,IQ=Yq._isUint8Array,TQ=Yq.isDisturbed,PQ=Yq.isErrored,xQ=Yq.isWritable,OQ=Yq.isReadable,CQ=Yq.Readable,Uq=Yq.Writable,_Q=Yq.Duplex,DQ=Yq.Transform,wQ=Yq.PassThrough,vQ=Yq.addAbortSignal,RQ=Yq.finished,SQ=Yq.destroy,gQ=Yq.pipeline,kQ=Yq.compose,VQ=Yq.Stream,fQ=Yq.eos=Fq,yQ=Yq._getNativeReadableStreamPrototype,iq=Yq.NativeWritable,hQ=VQ.promises;export{hQ as promises,gQ as pipeline,xQ as isWritable,OQ as isReadable,PQ as isErrored,TQ as isDisturbed,RQ as finished,fQ as eos,SQ as destroy,cQ as default,kQ as compose,vQ as addAbortSignal,EQ as _uint8ArrayToBuffer,IQ as _isUint8Array,yQ as _getNativeReadableStreamPrototype,Uq as Writable,DQ as Transform,VQ as Stream,CQ as Readable,wQ as PassThrough,iq as NativeWritable,_Q as Duplex}; +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}; diff --git a/src/js/out/modules/node/stream.promises.js b/src/js/out/modules/node/stream.promises.js index 838d40efa..00ad9e501 100644 --- a/src/js/out/modules/node/stream.promises.js +++ b/src/js/out/modules/node/stream.promises.js @@ -1 +1 @@ -import{promises as J} from"node:stream";var{pipeline:S,finished:b}=J,g={pipeline:S,finished:b,[Symbol.for("CommonJS")]:0};export{S as pipeline,b as finished,g as default}; +var g=(J)=>{return import.meta.require(J)};import{promises as S} from"node:stream";var{pipeline:b,finished:c}=S,q={pipeline:b,finished:c,[Symbol.for("CommonJS")]:0};export{b as pipeline,c as finished,q as default}; diff --git a/src/js/out/modules/node/stream.web.js b/src/js/out/modules/node/stream.web.js index fc68592e3..933a2c6d1 100644 --- a/src/js/out/modules/node/stream.web.js +++ b/src/js/out/modules/node/stream.web.js @@ -1 +1 @@ -var{ReadableStream:j,ReadableStreamDefaultReader:k,ReadableStreamBYOBReader:v,ReadableStreamBYOBRequest:w,ReadableByteStreamController:z,ReadableStreamDefaultController:A,TransformStream:F,TransformStreamDefaultController:G,WritableStream:H,WritableStreamDefaultWriter:I,WritableStreamDefaultController:J,ByteLengthQueuingStrategy:K,CountQueuingStrategy:M,TextEncoderStream:N,TextDecoderStream:P,CompressionStream:U,DecompressionStream:V}=globalThis,W={ReadableStream:j,ReadableStreamDefaultReader:k,ReadableStreamBYOBReader:v,ReadableStreamBYOBRequest:w,ReadableByteStreamController:z,ReadableStreamDefaultController:A,TransformStream:F,TransformStreamDefaultController:G,WritableStream:H,WritableStreamDefaultWriter:I,WritableStreamDefaultController:J,ByteLengthQueuingStrategy:K,CountQueuingStrategy:M,TextEncoderStream:N,TextDecoderStream:P,CompressionStream:U,DecompressionStream:V,[Symbol.for("CommonJS")]:0};export{W as default,I as WritableStreamDefaultWriter,J as WritableStreamDefaultController,H as WritableStream,G as TransformStreamDefaultController,F as TransformStream,N as TextEncoderStream,P as TextDecoderStream,k as ReadableStreamDefaultReader,A as ReadableStreamDefaultController,w as ReadableStreamBYOBRequest,v as ReadableStreamBYOBReader,j as ReadableStream,z as ReadableByteStreamController,V as DecompressionStream,M as CountQueuingStrategy,U as CompressionStream,K as ByteLengthQueuingStrategy}; +var X=(j)=>{return import.meta.require(j)};var{ReadableStream:k,ReadableStreamDefaultReader:v,ReadableStreamBYOBReader:w,ReadableStreamBYOBRequest:z,ReadableByteStreamController:A,ReadableStreamDefaultController:F,TransformStream:G,TransformStreamDefaultController:H,WritableStream:I,WritableStreamDefaultWriter:J,WritableStreamDefaultController:K,ByteLengthQueuingStrategy:M,CountQueuingStrategy:N,TextEncoderStream:P,TextDecoderStream:U,CompressionStream:V,DecompressionStream:W}=globalThis,_={ReadableStream:k,ReadableStreamDefaultReader:v,ReadableStreamBYOBReader:w,ReadableStreamBYOBRequest:z,ReadableByteStreamController:A,ReadableStreamDefaultController:F,TransformStream:G,TransformStreamDefaultController:H,WritableStream:I,WritableStreamDefaultWriter:J,WritableStreamDefaultController:K,ByteLengthQueuingStrategy:M,CountQueuingStrategy:N,TextEncoderStream:P,TextDecoderStream:U,CompressionStream:V,DecompressionStream:W,[Symbol.for("CommonJS")]:0};export{_ as default,J as WritableStreamDefaultWriter,K as WritableStreamDefaultController,I as WritableStream,H as TransformStreamDefaultController,G as TransformStream,P as TextEncoderStream,U as TextDecoderStream,v as ReadableStreamDefaultReader,F as ReadableStreamDefaultController,z as ReadableStreamBYOBRequest,w as ReadableStreamBYOBReader,k as ReadableStream,A as ReadableByteStreamController,W as DecompressionStream,N as CountQueuingStrategy,V as CompressionStream,M as ByteLengthQueuingStrategy}; diff --git a/src/js/out/modules/node/url.js b/src/js/out/modules/node/url.js index 882ae8db8..580178688 100644 --- a/src/js/out/modules/node/url.js +++ b/src/js/out/modules/node/url.js @@ -1 +1 @@ -var $=function(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null},g=function(N,J,f){if(N&&typeof N==="object"&&N instanceof $)return N;var X=new $;return X.parse(N,J,f),X},t=function(N){if(typeof N==="string")N=g(N);if(!(N instanceof $))return $.prototype.format.call(N);return N.format()},ff=function(N,J){return g(N,!1,!0).resolve(J)},Nf=function(N,J){if(!N)return J;return g(N,!1,!0).resolveObject(J)},Bf=function(N){const J={protocol:N.protocol,hostname:typeof N.hostname==="string"&&N.hostname.startsWith("[")?N.hostname.slice(1,-1):N.hostname,hash:N.hash,search:N.search,pathname:N.pathname,path:`${N.pathname||""}${N.search||""}`,href:N.href};if(N.port!=="")J.port=Number(N.port);if(N.username||N.password)J.auth=`${decodeURIComponent(N.username)}:${decodeURIComponent(N.password)}`;return J},{URL:n,URLSearchParams:H}=globalThis,i=/^([a-z0-9.+-]+:)/i,o=/:[0-9]*$/,u=/^(\/\/?(?!\/)[^?\s]*)(\?[^\s]*)?$/,a=["<",">",'"',"`"," ","\r","\n","\t"],l=["{","}","|","\\","^","`"].concat(a),E=["'"].concat(l),m=["%","/","?",";","#"].concat(E),c=["/","?","#"],s=255,P=/^[+a-z0-9A-Z_-]{0,63}$/,r=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,e={javascript:!0,"javascript:":!0},d={javascript:!0,"javascript:":!0},L={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};$.prototype.parse=function(N,J,f){if(typeof N!=="string")throw new TypeError("Parameter 'url' must be a string, not "+typeof N);var X=N.indexOf("?"),V=X!==-1&&X<N.indexOf("#")?"?":"#",O=N.split(V),_=/\\/g;O[0]=O[0].replace(_,"/"),N=O.join(V);var B=N;if(B=B.trim(),!f&&N.split("#").length===1){var D=u.exec(B);if(D){if(this.path=B,this.href=B,this.pathname=D[1],D[2])if(this.search=D[2],J)this.query=new H(this.search.substr(1)).toJSON();else this.query=this.search.substr(1);else if(J)this.search="",this.query={};return this}}var Y=i.exec(B);if(Y){Y=Y[0];var I=Y.toLowerCase();this.protocol=I,B=B.substr(Y.length)}if(f||Y||B.match(/^\/\/[^@/]+@[^@/]+/)){var w=B.substr(0,2)==="//";if(w&&!(Y&&d[Y]))B=B.substr(2),this.slashes=!0}if(!d[Y]&&(w||Y&&!L[Y])){var W=-1;for(var K=0;K<c.length;K++){var T=B.indexOf(c[K]);if(T!==-1&&(W===-1||T<W))W=T}var A,Z;if(W===-1)Z=B.lastIndexOf("@");else Z=B.lastIndexOf("@",W);if(Z!==-1)A=B.slice(0,Z),B=B.slice(Z+1),this.auth=decodeURIComponent(A);W=-1;for(var K=0;K<m.length;K++){var T=B.indexOf(m[K]);if(T!==-1&&(W===-1||T<W))W=T}if(W===-1)W=B.length;this.host=B.slice(0,W),B=B.slice(W),this.parseHost(),this.hostname=this.hostname||"";var R=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!R){var G=this.hostname.split(/\./);for(var K=0,M=G.length;K<M;K++){var x=G[K];if(!x)continue;if(!x.match(P)){var z="";for(var C=0,S=x.length;C<S;C++)if(x.charCodeAt(C)>127)z+="x";else z+=x[C];if(!z.match(P)){var q=G.slice(0,K),F=G.slice(K+1),Q=x.match(r);if(Q)q.push(Q[1]),F.unshift(Q[2]);if(F.length)B="/"+F.join(".")+B;this.hostname=q.join(".");break}}}}if(this.hostname.length>s)this.hostname="";else this.hostname=this.hostname.toLowerCase();if(!R)this.hostname=new n("http://"+this.hostname).hostname;var b=this.port?":"+this.port:"",v=this.hostname||"";if(this.host=v+b,this.href+=this.host,R){if(this.hostname=this.hostname.substr(1,this.hostname.length-2),B[0]!=="/")B="/"+B}}if(!e[I])for(var K=0,M=E.length;K<M;K++){var j=E[K];if(B.indexOf(j)===-1)continue;var y=encodeURIComponent(j);if(y===j)y=escape(j);B=B.split(j).join(y)}var k=B.indexOf("#");if(k!==-1)this.hash=B.substr(k),B=B.slice(0,k);var U=B.indexOf("?");if(U!==-1){if(this.search=B.substr(U),this.query=B.substr(U+1),J)this.query=new H(this.query);B=B.slice(0,U)}else if(J)this.search="",this.query={};if(B)this.pathname=B;if(L[I]&&this.hostname&&!this.pathname)this.pathname="/";if(this.pathname||this.search){var b=this.pathname||"",h=this.search||"";this.path=b+h}return this.href=this.format(),this};$.prototype.format=function(){var N=this.auth||"";if(N)N=encodeURIComponent(N),N=N.replace(/%3A/i,":"),N+="@";var J=this.protocol||"",f=this.pathname||"",X=this.hash||"",V=!1,O="";if(this.host)V=N+this.host;else if(this.hostname){if(V=N+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port)V+=":"+this.port}if(this.query&&typeof this.query==="object"&&Object.keys(this.query).length)O=new H(this.query).toString();var _=this.search||O&&"?"+O||"";if(J&&J.substr(-1)!==":")J+=":";if(this.slashes||(!J||L[J])&&V!==!1){if(V="//"+(V||""),f&&f.charAt(0)!=="/")f="/"+f}else if(!V)V="";if(X&&X.charAt(0)!=="#")X="#"+X;if(_&&_.charAt(0)!=="?")_="?"+_;return f=f.replace(/[?#]/g,function(B){return encodeURIComponent(B)}),_=_.replace("#","%23"),J+V+f+_+X};$.prototype.resolve=function(N){return this.resolveObject(g(N,!1,!0)).format()};$.prototype.resolveObject=function(N){if(typeof N==="string"){var J=new $;J.parse(N,!1,!0),N=J}var f=new $,X=Object.keys(this);for(var V=0;V<X.length;V++){var O=X[V];f[O]=this[O]}if(f.hash=N.hash,N.href==="")return f.href=f.format(),f;if(N.slashes&&!N.protocol){var _=Object.keys(N);for(var B=0;B<_.length;B++){var D=_[B];if(D!=="protocol")f[D]=N[D]}if(L[f.protocol]&&f.hostname&&!f.pathname)f.pathname="/",f.path=f.pathname;return f.href=f.format(),f}if(N.protocol&&N.protocol!==f.protocol){if(!L[N.protocol]){var Y=Object.keys(N);for(var I=0;I<Y.length;I++){var w=Y[I];f[w]=N[w]}return f.href=f.format(),f}if(f.protocol=N.protocol,!N.host&&!d[N.protocol]){var M=(N.pathname||"").split("/");while(M.length&&!(N.host=M.shift()));if(!N.host)N.host="";if(!N.hostname)N.hostname="";if(M[0]!=="")M.unshift("");if(M.length<2)M.unshift("");f.pathname=M.join("/")}else f.pathname=N.pathname;if(f.search=N.search,f.query=N.query,f.host=N.host||"",f.auth=N.auth,f.hostname=N.hostname||N.host,f.port=N.port,f.pathname||f.search){var W=f.pathname||"",K=f.search||"";f.path=W+K}return f.slashes=f.slashes||N.slashes,f.href=f.format(),f}var T=f.pathname&&f.pathname.charAt(0)==="/",A=N.host||N.pathname&&N.pathname.charAt(0)==="/",Z=A||T||f.host&&N.pathname,R=Z,G=f.pathname&&f.pathname.split("/")||[],M=N.pathname&&N.pathname.split("/")||[],x=f.protocol&&!L[f.protocol];if(x){if(f.hostname="",f.port=null,f.host)if(G[0]==="")G[0]=f.host;else G.unshift(f.host);if(f.host="",N.protocol){if(N.hostname=null,N.port=null,N.host)if(M[0]==="")M[0]=N.host;else M.unshift(N.host);N.host=null}Z=Z&&(M[0]===""||G[0]==="")}if(A)f.host=N.host||N.host===""?N.host:f.host,f.hostname=N.hostname||N.hostname===""?N.hostname:f.hostname,f.search=N.search,f.query=N.query,G=M;else if(M.length){if(!G)G=[];G.pop(),G=G.concat(M),f.search=N.search,f.query=N.query}else if(N.search!=null){if(x){f.host=G.shift(),f.hostname=f.host;var z=f.host&&f.host.indexOf("@")>0?f.host.split("@"):!1;if(z)f.auth=z.shift(),f.hostname=z.shift(),f.host=f.hostname}if(f.search=N.search,f.query=N.query,f.pathname!==null||f.search!==null)f.path=(f.pathname?f.pathname:"")+(f.search?f.search:"");return f.href=f.format(),f}if(!G.length){if(f.pathname=null,f.search)f.path="/"+f.search;else f.path=null;return f.href=f.format(),f}var C=G.slice(-1)[0],S=(f.host||N.host||G.length>1)&&(C==="."||C==="..")||C==="",q=0;for(var F=G.length;F>=0;F--)if(C=G[F],C===".")G.splice(F,1);else if(C==="..")G.splice(F,1),q++;else if(q)G.splice(F,1),q--;if(!Z&&!R)for(;q--;q)G.unshift("..");if(Z&&G[0]!==""&&(!G[0]||G[0].charAt(0)!=="/"))G.unshift("");if(S&&G.join("/").substr(-1)!=="/")G.push("");var Q=G[0]===""||G[0]&&G[0].charAt(0)==="/";if(x){f.hostname=Q?"":G.length?G.shift():"",f.host=f.hostname;var z=f.host&&f.host.indexOf("@")>0?f.host.split("@"):!1;if(z)f.auth=z.shift(),f.hostname=z.shift(),f.host=f.hostname}if(Z=Z||f.host&&G.length,Z&&!Q)G.unshift("");if(G.length>0)f.pathname=G.join("/");else f.pathname=null,f.path=null;if(f.pathname!==null||f.search!==null)f.path=(f.pathname?f.pathname:"")+(f.search?f.search:"");return f.auth=N.auth||f.auth,f.slashes=f.slashes||N.slashes,f.href=f.format(),f};$.prototype.parseHost=function(){var N=this.host,J=o.exec(N);if(J){if(J=J[0],J!==":")this.port=J.substr(1);N=N.substr(0,N.length-J.length)}if(N)this.hostname=N};var p=globalThis[Symbol.for("Bun.lazy")],Gf=p("pathToFileURL"),Jf=p("fileURLToPath"),Kf={parse:g,resolve:ff,resolveObject:Nf,format:t,Url:$,URLSearchParams:H,URL:n,pathToFileURL:Gf,fileURLToPath:Jf,urlToHttpOptions:Bf,[Symbol.for("CommonJS")]:0};export{Bf as urlToHttpOptions,Nf as resolveObject,ff as resolve,Gf as pathToFileURL,g as parse,t as format,Jf as fileURLToPath,Kf as default,$ as Url,H as URLSearchParams,n as URL}; +var Kf=(N)=>{return import.meta.require(N)};var $=function(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null},g=function(N,J,f){if(N&&typeof N==="object"&&N instanceof $)return N;var X=new $;return X.parse(N,J,f),X},t=function(N){if(typeof N==="string")N=g(N);if(!(N instanceof $))return $.prototype.format.call(N);return N.format()},ff=function(N,J){return g(N,!1,!0).resolve(J)},Nf=function(N,J){if(!N)return J;return g(N,!1,!0).resolveObject(J)},Bf=function(N){const J={protocol:N.protocol,hostname:typeof N.hostname==="string"&&N.hostname.startsWith("[")?N.hostname.slice(1,-1):N.hostname,hash:N.hash,search:N.search,pathname:N.pathname,path:`${N.pathname||""}${N.search||""}`,href:N.href};if(N.port!=="")J.port=Number(N.port);if(N.username||N.password)J.auth=`${decodeURIComponent(N.username)}:${decodeURIComponent(N.password)}`;return J},{URL:n,URLSearchParams:H}=globalThis,i=/^([a-z0-9.+-]+:)/i,o=/:[0-9]*$/,u=/^(\/\/?(?!\/)[^?\s]*)(\?[^\s]*)?$/,a=["<",">",'"',"`"," ","\r","\n","\t"],l=["{","}","|","\\","^","`"].concat(a),E=["'"].concat(l),m=["%","/","?",";","#"].concat(E),c=["/","?","#"],s=255,P=/^[+a-z0-9A-Z_-]{0,63}$/,r=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,e={javascript:!0,"javascript:":!0},d={javascript:!0,"javascript:":!0},L={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};$.prototype.parse=function(N,J,f){if(typeof N!=="string")throw new TypeError("Parameter 'url' must be a string, not "+typeof N);var X=N.indexOf("?"),V=X!==-1&&X<N.indexOf("#")?"?":"#",O=N.split(V),_=/\\/g;O[0]=O[0].replace(_,"/"),N=O.join(V);var B=N;if(B=B.trim(),!f&&N.split("#").length===1){var D=u.exec(B);if(D){if(this.path=B,this.href=B,this.pathname=D[1],D[2])if(this.search=D[2],J)this.query=new H(this.search.substr(1)).toJSON();else this.query=this.search.substr(1);else if(J)this.search="",this.query={};return this}}var Y=i.exec(B);if(Y){Y=Y[0];var I=Y.toLowerCase();this.protocol=I,B=B.substr(Y.length)}if(f||Y||B.match(/^\/\/[^@/]+@[^@/]+/)){var w=B.substr(0,2)==="//";if(w&&!(Y&&d[Y]))B=B.substr(2),this.slashes=!0}if(!d[Y]&&(w||Y&&!L[Y])){var W=-1;for(var K=0;K<c.length;K++){var T=B.indexOf(c[K]);if(T!==-1&&(W===-1||T<W))W=T}var A,Z;if(W===-1)Z=B.lastIndexOf("@");else Z=B.lastIndexOf("@",W);if(Z!==-1)A=B.slice(0,Z),B=B.slice(Z+1),this.auth=decodeURIComponent(A);W=-1;for(var K=0;K<m.length;K++){var T=B.indexOf(m[K]);if(T!==-1&&(W===-1||T<W))W=T}if(W===-1)W=B.length;this.host=B.slice(0,W),B=B.slice(W),this.parseHost(),this.hostname=this.hostname||"";var R=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!R){var G=this.hostname.split(/\./);for(var K=0,M=G.length;K<M;K++){var x=G[K];if(!x)continue;if(!x.match(P)){var z="";for(var C=0,S=x.length;C<S;C++)if(x.charCodeAt(C)>127)z+="x";else z+=x[C];if(!z.match(P)){var q=G.slice(0,K),F=G.slice(K+1),Q=x.match(r);if(Q)q.push(Q[1]),F.unshift(Q[2]);if(F.length)B="/"+F.join(".")+B;this.hostname=q.join(".");break}}}}if(this.hostname.length>s)this.hostname="";else this.hostname=this.hostname.toLowerCase();if(!R)this.hostname=new n("http://"+this.hostname).hostname;var b=this.port?":"+this.port:"",v=this.hostname||"";if(this.host=v+b,this.href+=this.host,R){if(this.hostname=this.hostname.substr(1,this.hostname.length-2),B[0]!=="/")B="/"+B}}if(!e[I])for(var K=0,M=E.length;K<M;K++){var j=E[K];if(B.indexOf(j)===-1)continue;var y=encodeURIComponent(j);if(y===j)y=escape(j);B=B.split(j).join(y)}var k=B.indexOf("#");if(k!==-1)this.hash=B.substr(k),B=B.slice(0,k);var U=B.indexOf("?");if(U!==-1){if(this.search=B.substr(U),this.query=B.substr(U+1),J)this.query=new H(this.query);B=B.slice(0,U)}else if(J)this.search="",this.query={};if(B)this.pathname=B;if(L[I]&&this.hostname&&!this.pathname)this.pathname="/";if(this.pathname||this.search){var b=this.pathname||"",h=this.search||"";this.path=b+h}return this.href=this.format(),this};$.prototype.format=function(){var N=this.auth||"";if(N)N=encodeURIComponent(N),N=N.replace(/%3A/i,":"),N+="@";var J=this.protocol||"",f=this.pathname||"",X=this.hash||"",V=!1,O="";if(this.host)V=N+this.host;else if(this.hostname){if(V=N+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port)V+=":"+this.port}if(this.query&&typeof this.query==="object"&&Object.keys(this.query).length)O=new H(this.query).toString();var _=this.search||O&&"?"+O||"";if(J&&J.substr(-1)!==":")J+=":";if(this.slashes||(!J||L[J])&&V!==!1){if(V="//"+(V||""),f&&f.charAt(0)!=="/")f="/"+f}else if(!V)V="";if(X&&X.charAt(0)!=="#")X="#"+X;if(_&&_.charAt(0)!=="?")_="?"+_;return f=f.replace(/[?#]/g,function(B){return encodeURIComponent(B)}),_=_.replace("#","%23"),J+V+f+_+X};$.prototype.resolve=function(N){return this.resolveObject(g(N,!1,!0)).format()};$.prototype.resolveObject=function(N){if(typeof N==="string"){var J=new $;J.parse(N,!1,!0),N=J}var f=new $,X=Object.keys(this);for(var V=0;V<X.length;V++){var O=X[V];f[O]=this[O]}if(f.hash=N.hash,N.href==="")return f.href=f.format(),f;if(N.slashes&&!N.protocol){var _=Object.keys(N);for(var B=0;B<_.length;B++){var D=_[B];if(D!=="protocol")f[D]=N[D]}if(L[f.protocol]&&f.hostname&&!f.pathname)f.pathname="/",f.path=f.pathname;return f.href=f.format(),f}if(N.protocol&&N.protocol!==f.protocol){if(!L[N.protocol]){var Y=Object.keys(N);for(var I=0;I<Y.length;I++){var w=Y[I];f[w]=N[w]}return f.href=f.format(),f}if(f.protocol=N.protocol,!N.host&&!d[N.protocol]){var M=(N.pathname||"").split("/");while(M.length&&!(N.host=M.shift()));if(!N.host)N.host="";if(!N.hostname)N.hostname="";if(M[0]!=="")M.unshift("");if(M.length<2)M.unshift("");f.pathname=M.join("/")}else f.pathname=N.pathname;if(f.search=N.search,f.query=N.query,f.host=N.host||"",f.auth=N.auth,f.hostname=N.hostname||N.host,f.port=N.port,f.pathname||f.search){var W=f.pathname||"",K=f.search||"";f.path=W+K}return f.slashes=f.slashes||N.slashes,f.href=f.format(),f}var T=f.pathname&&f.pathname.charAt(0)==="/",A=N.host||N.pathname&&N.pathname.charAt(0)==="/",Z=A||T||f.host&&N.pathname,R=Z,G=f.pathname&&f.pathname.split("/")||[],M=N.pathname&&N.pathname.split("/")||[],x=f.protocol&&!L[f.protocol];if(x){if(f.hostname="",f.port=null,f.host)if(G[0]==="")G[0]=f.host;else G.unshift(f.host);if(f.host="",N.protocol){if(N.hostname=null,N.port=null,N.host)if(M[0]==="")M[0]=N.host;else M.unshift(N.host);N.host=null}Z=Z&&(M[0]===""||G[0]==="")}if(A)f.host=N.host||N.host===""?N.host:f.host,f.hostname=N.hostname||N.hostname===""?N.hostname:f.hostname,f.search=N.search,f.query=N.query,G=M;else if(M.length){if(!G)G=[];G.pop(),G=G.concat(M),f.search=N.search,f.query=N.query}else if(N.search!=null){if(x){f.host=G.shift(),f.hostname=f.host;var z=f.host&&f.host.indexOf("@")>0?f.host.split("@"):!1;if(z)f.auth=z.shift(),f.hostname=z.shift(),f.host=f.hostname}if(f.search=N.search,f.query=N.query,f.pathname!==null||f.search!==null)f.path=(f.pathname?f.pathname:"")+(f.search?f.search:"");return f.href=f.format(),f}if(!G.length){if(f.pathname=null,f.search)f.path="/"+f.search;else f.path=null;return f.href=f.format(),f}var C=G.slice(-1)[0],S=(f.host||N.host||G.length>1)&&(C==="."||C==="..")||C==="",q=0;for(var F=G.length;F>=0;F--)if(C=G[F],C===".")G.splice(F,1);else if(C==="..")G.splice(F,1),q++;else if(q)G.splice(F,1),q--;if(!Z&&!R)for(;q--;q)G.unshift("..");if(Z&&G[0]!==""&&(!G[0]||G[0].charAt(0)!=="/"))G.unshift("");if(S&&G.join("/").substr(-1)!=="/")G.push("");var Q=G[0]===""||G[0]&&G[0].charAt(0)==="/";if(x){f.hostname=Q?"":G.length?G.shift():"",f.host=f.hostname;var z=f.host&&f.host.indexOf("@")>0?f.host.split("@"):!1;if(z)f.auth=z.shift(),f.hostname=z.shift(),f.host=f.hostname}if(Z=Z||f.host&&G.length,Z&&!Q)G.unshift("");if(G.length>0)f.pathname=G.join("/");else f.pathname=null,f.path=null;if(f.pathname!==null||f.search!==null)f.path=(f.pathname?f.pathname:"")+(f.search?f.search:"");return f.auth=N.auth||f.auth,f.slashes=f.slashes||N.slashes,f.href=f.format(),f};$.prototype.parseHost=function(){var N=this.host,J=o.exec(N);if(J){if(J=J[0],J!==":")this.port=J.substr(1);N=N.substr(0,N.length-J.length)}if(N)this.hostname=N};var p=globalThis[Symbol.for("Bun.lazy")],Gf=p("pathToFileURL"),Jf=p("fileURLToPath"),Vf={parse:g,resolve:ff,resolveObject:Nf,format:t,Url:$,URLSearchParams:H,URL:n,pathToFileURL:Gf,fileURLToPath:Jf,urlToHttpOptions:Bf,[Symbol.for("CommonJS")]:0};export{Bf as urlToHttpOptions,Nf as resolveObject,ff as resolve,Gf as pathToFileURL,g as parse,t as format,Jf as fileURLToPath,Vf as default,$ as Url,H as URLSearchParams,n as URL}; diff --git a/src/js/out/modules/node/zlib.js b/src/js/out/modules/node/zlib.js index 3558e2548..395658878 100644 --- a/src/js/out/modules/node/zlib.js +++ b/src/js/out/modules/node/zlib.js @@ -1 +1 @@ -import{default as R0} from"node:assert";import*as t0 from"node:assert";import*as o0 from"node:buffer";import*as s0 from"node:stream";import*as W1 from"node:util";var j1,J1,Y1,G1,q1,X1,U1,P1,K1,F1,H1,z1,Z1,L1,C1,N1,I1,O1,B1,D1,M1,k1,v1,R1,A1,g1,w1,T1,S1;var y1=Object.getOwnPropertyNames;var A0=(Y,g)=>function b(){return g||(0,Y[y1(Y)[0]])((g={exports:{}}).exports,g),g.exports};var E1=A0({"node_modules/pako/lib/zlib/zstream.js"(Y,g){function b(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}g.exports=b}}),r0=A0({"node_modules/pako/lib/utils/common.js"(Y){var g=typeof Uint8Array!=="undefined"&&typeof Uint16Array!=="undefined"&&typeof Int32Array!=="undefined";function b(C,w){return Object.prototype.hasOwnProperty.call(C,w)}Y.assign=function(C){var w=Array.prototype.slice.call(arguments,1);while(w.length){var v=w.shift();if(!v)continue;if(typeof v!=="object")throw new TypeError(v+"must be non-object");for(var k in v)if(b(v,k))C[k]=v[k]}return C},Y.shrinkBuf=function(C,w){if(C.length===w)return C;if(C.subarray)return C.subarray(0,w);return C.length=w,C};var L={arraySet:function(C,w,v,k,B){if(w.subarray&&C.subarray){C.set(w.subarray(v,v+k),B);return}for(var N=0;N<k;N++)C[B+N]=w[v+N]},flattenChunks:function(C){var w,v,k,B,N,y;k=0;for(w=0,v=C.length;w<v;w++)k+=C[w].length;y=new Uint8Array(k),B=0;for(w=0,v=C.length;w<v;w++)N=C[w],y.set(N,B),B+=N.length;return y}},n={arraySet:function(C,w,v,k,B){for(var N=0;N<k;N++)C[B+N]=w[v+N]},flattenChunks:function(C){return[].concat.apply([],C)}};Y.setTyped=function(C){if(C)Y.Buf8=Uint8Array,Y.Buf16=Uint16Array,Y.Buf32=Int32Array,Y.assign(Y,L);else Y.Buf8=Array,Y.Buf16=Array,Y.Buf32=Array,Y.assign(Y,n)},Y.setTyped(g)}}),x1=A0({"node_modules/pako/lib/zlib/trees.js"(Y){var g=r0(),b=4,L=0,n=1,C=2;function w(W){var F=W.length;while(--F>=0)W[F]=0}var v=0,k=1,B=2,N=3,y=258,m=29,p=256,t=p+1+m,u=30,s=19,W0=2*t+1,E=15,S=16,J0=7,G0=256,F0=16,f=17,d=18,z=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],h=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],V0=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],j=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],K=512,O=new Array((t+2)*2);w(O);var I=new Array(u*2);w(I);var c=new Array(K);w(c);var l=new Array(y-N+1);w(l);var D=new Array(m);w(D);var Q0=new Array(u);w(Q0);function i(W,F,Z,R,G){this.static_tree=W,this.extra_bits=F,this.extra_base=Z,this.elems=R,this.max_length=G,this.has_stree=W&&W.length}var H0,N0,I0;function K0(W,F){this.dyn_tree=W,this.max_code=0,this.stat_desc=F}function X0(W){return W<256?c[W]:c[256+(W>>>7)]}function U0(W,F){W.pending_buf[W.pending++]=F&255,W.pending_buf[W.pending++]=F>>>8&255}function a(W,F,Z){if(W.bi_valid>S-Z)W.bi_buf|=F<<W.bi_valid&65535,U0(W,W.bi_buf),W.bi_buf=F>>S-W.bi_valid,W.bi_valid+=Z-S;else W.bi_buf|=F<<W.bi_valid&65535,W.bi_valid+=Z}function Y0(W,F,Z){a(W,Z[F*2],Z[F*2+1])}function r(W,F){var Z=0;do Z|=W&1,W>>>=1,Z<<=1;while(--F>0);return Z>>>1}function z0(W){if(W.bi_valid===16)U0(W,W.bi_buf),W.bi_buf=0,W.bi_valid=0;else if(W.bi_valid>=8)W.pending_buf[W.pending++]=W.bi_buf&255,W.bi_buf>>=8,W.bi_valid-=8}function Z0(W,F){var{dyn_tree:Z,max_code:R}=F,G=F.stat_desc.static_tree,P=F.stat_desc.has_stree,$=F.stat_desc.extra_bits,H=F.stat_desc.extra_base,x=F.stat_desc.max_length,Q,X,U,V,J,q,T=0;for(V=0;V<=E;V++)W.bl_count[V]=0;Z[W.heap[W.heap_max]*2+1]=0;for(Q=W.heap_max+1;Q<W0;Q++){if(X=W.heap[Q],V=Z[Z[X*2+1]*2+1]+1,V>x)V=x,T++;if(Z[X*2+1]=V,X>R)continue;if(W.bl_count[V]++,J=0,X>=H)J=$[X-H];if(q=Z[X*2],W.opt_len+=q*(V+J),P)W.static_len+=q*(G[X*2+1]+J)}if(T===0)return;do{V=x-1;while(W.bl_count[V]===0)V--;W.bl_count[V]--,W.bl_count[V+1]+=2,W.bl_count[x]--,T-=2}while(T>0);for(V=x;V!==0;V--){X=W.bl_count[V];while(X!==0){if(U=W.heap[--Q],U>R)continue;if(Z[U*2+1]!==V)W.opt_len+=(V-Z[U*2+1])*Z[U*2],Z[U*2+1]=V;X--}}}function g0(W,F,Z){var R=new Array(E+1),G=0,P,$;for(P=1;P<=E;P++)R[P]=G=G+Z[P-1]<<1;for($=0;$<=F;$++){var H=W[$*2+1];if(H===0)continue;W[$*2]=r(R[H]++,H)}}function j0(){var W,F,Z,R,G,P=new Array(E+1);Z=0;for(R=0;R<m-1;R++){D[R]=Z;for(W=0;W<1<<z[R];W++)l[Z++]=R}l[Z-1]=R,G=0;for(R=0;R<16;R++){Q0[R]=G;for(W=0;W<1<<h[R];W++)c[G++]=R}G>>=7;for(;R<u;R++){Q0[R]=G<<7;for(W=0;W<1<<h[R]-7;W++)c[256+G++]=R}for(F=0;F<=E;F++)P[F]=0;W=0;while(W<=143)O[W*2+1]=8,W++,P[8]++;while(W<=255)O[W*2+1]=9,W++,P[9]++;while(W<=279)O[W*2+1]=7,W++,P[7]++;while(W<=287)O[W*2+1]=8,W++,P[8]++;g0(O,t+1,P);for(W=0;W<u;W++)I[W*2+1]=5,I[W*2]=r(W,5);H0=new i(O,z,p+1,t,E),N0=new i(I,h,0,u,E),I0=new i(new Array(0),V0,0,s,J0)}function M0(W){var F;for(F=0;F<t;F++)W.dyn_ltree[F*2]=0;for(F=0;F<u;F++)W.dyn_dtree[F*2]=0;for(F=0;F<s;F++)W.bl_tree[F*2]=0;W.dyn_ltree[G0*2]=1,W.opt_len=W.static_len=0,W.last_lit=W.matches=0}function c0(W){if(W.bi_valid>8)U0(W,W.bi_buf);else if(W.bi_valid>0)W.pending_buf[W.pending++]=W.bi_buf;W.bi_buf=0,W.bi_valid=0}function w0(W,F,Z,R){if(c0(W),R)U0(W,Z),U0(W,~Z);g.arraySet(W.pending_buf,W.window,F,Z,W.pending),W.pending+=Z}function v0(W,F,Z,R){var G=F*2,P=Z*2;return W[G]<W[P]||W[G]===W[P]&&R[F]<=R[Z]}function q0(W,F,Z){var R=W.heap[Z],G=Z<<1;while(G<=W.heap_len){if(G<W.heap_len&&v0(F,W.heap[G+1],W.heap[G],W.depth))G++;if(v0(F,R,W.heap[G],W.depth))break;W.heap[Z]=W.heap[G],Z=G,G<<=1}W.heap[Z]=R}function _(W,F,Z){var R,G,P=0,$,H;if(W.last_lit!==0)do if(R=W.pending_buf[W.d_buf+P*2]<<8|W.pending_buf[W.d_buf+P*2+1],G=W.pending_buf[W.l_buf+P],P++,R===0)Y0(W,G,F);else{if($=l[G],Y0(W,$+p+1,F),H=z[$],H!==0)G-=D[$],a(W,G,H);if(R--,$=X0(R),Y0(W,$,Z),H=h[$],H!==0)R-=Q0[$],a(W,R,H)}while(P<W.last_lit);Y0(W,G0,F)}function T0(W,F){var Z=F.dyn_tree,R=F.stat_desc.static_tree,G=F.stat_desc.has_stree,P=F.stat_desc.elems,$,H,x=-1,Q;W.heap_len=0,W.heap_max=W0;for($=0;$<P;$++)if(Z[$*2]!==0)W.heap[++W.heap_len]=x=$,W.depth[$]=0;else Z[$*2+1]=0;while(W.heap_len<2)if(Q=W.heap[++W.heap_len]=x<2?++x:0,Z[Q*2]=1,W.depth[Q]=0,W.opt_len--,G)W.static_len-=R[Q*2+1];F.max_code=x;for($=W.heap_len>>1;$>=1;$--)q0(W,Z,$);Q=P;do $=W.heap[1],W.heap[1]=W.heap[W.heap_len--],q0(W,Z,1),H=W.heap[1],W.heap[--W.heap_max]=$,W.heap[--W.heap_max]=H,Z[Q*2]=Z[$*2]+Z[H*2],W.depth[Q]=(W.depth[$]>=W.depth[H]?W.depth[$]:W.depth[H])+1,Z[$*2+1]=Z[H*2+1]=Q,W.heap[1]=Q++,q0(W,Z,1);while(W.heap_len>=2);W.heap[--W.heap_max]=W.heap[1],Z0(W,F),g0(Z,x,W.bl_count)}function p0(W,F,Z){var R,G=-1,P,$=F[1],H=0,x=7,Q=4;if($===0)x=138,Q=3;F[(Z+1)*2+1]=65535;for(R=0;R<=Z;R++){if(P=$,$=F[(R+1)*2+1],++H<x&&P===$)continue;else if(H<Q)W.bl_tree[P*2]+=H;else if(P!==0){if(P!==G)W.bl_tree[P*2]++;W.bl_tree[F0*2]++}else if(H<=10)W.bl_tree[f*2]++;else W.bl_tree[d*2]++;if(H=0,G=P,$===0)x=138,Q=3;else if(P===$)x=6,Q=3;else x=7,Q=4}}function b0(W,F,Z){var R,G=-1,P,$=F[1],H=0,x=7,Q=4;if($===0)x=138,Q=3;for(R=0;R<=Z;R++){if(P=$,$=F[(R+1)*2+1],++H<x&&P===$)continue;else if(H<Q)do Y0(W,P,W.bl_tree);while(--H!==0);else if(P!==0){if(P!==G)Y0(W,P,W.bl_tree),H--;Y0(W,F0,W.bl_tree),a(W,H-3,2)}else if(H<=10)Y0(W,f,W.bl_tree),a(W,H-3,3);else Y0(W,d,W.bl_tree),a(W,H-11,7);if(H=0,G=P,$===0)x=138,Q=3;else if(P===$)x=6,Q=3;else x=7,Q=4}}function S0(W){var F;p0(W,W.dyn_ltree,W.l_desc.max_code),p0(W,W.dyn_dtree,W.d_desc.max_code),T0(W,W.bl_desc);for(F=s-1;F>=3;F--)if(W.bl_tree[j[F]*2+1]!==0)break;return W.opt_len+=3*(F+1)+5+5+4,F}function i0(W,F,Z,R){var G;a(W,F-257,5),a(W,Z-1,5),a(W,R-4,4);for(G=0;G<R;G++)a(W,W.bl_tree[j[G]*2+1],3);b0(W,W.dyn_ltree,F-1),b0(W,W.dyn_dtree,Z-1)}function d0(W){var F=4093624447,Z;for(Z=0;Z<=31;Z++,F>>>=1)if(F&1&&W.dyn_ltree[Z*2]!==0)return L;if(W.dyn_ltree[18]!==0||W.dyn_ltree[20]!==0||W.dyn_ltree[26]!==0)return n;for(Z=32;Z<p;Z++)if(W.dyn_ltree[Z*2]!==0)return n;return L}var E0=!1;function _0(W){if(!E0)j0(),E0=!0;W.l_desc=new K0(W.dyn_ltree,H0),W.d_desc=new K0(W.dyn_dtree,N0),W.bl_desc=new K0(W.bl_tree,I0),W.bi_buf=0,W.bi_valid=0,M0(W)}function m0(W,F,Z,R){a(W,(v<<1)+(R?1:0),3),w0(W,F,Z,!0)}function B0(W){a(W,k<<1,3),Y0(W,G0,O),z0(W)}function h0(W,F,Z,R){var G,P,$=0;if(W.level>0){if(W.strm.data_type===C)W.strm.data_type=d0(W);if(T0(W,W.l_desc),T0(W,W.d_desc),$=S0(W),G=W.opt_len+3+7>>>3,P=W.static_len+3+7>>>3,P<=G)G=P}else G=P=Z+5;if(Z+4<=G&&F!==-1)m0(W,F,Z,R);else if(W.strategy===b||P===G)a(W,(k<<1)+(R?1:0),3),_(W,O,I);else a(W,(B<<1)+(R?1:0),3),i0(W,W.l_desc.max_code+1,W.d_desc.max_code+1,$+1),_(W,W.dyn_ltree,W.dyn_dtree);if(M0(W),R)c0(W)}function n0(W,F,Z){if(W.pending_buf[W.d_buf+W.last_lit*2]=F>>>8&255,W.pending_buf[W.d_buf+W.last_lit*2+1]=F&255,W.pending_buf[W.l_buf+W.last_lit]=Z&255,W.last_lit++,F===0)W.dyn_ltree[Z*2]++;else W.matches++,F--,W.dyn_ltree[(l[Z]+p+1)*2]++,W.dyn_dtree[X0(F)*2]++;return W.last_lit===W.lit_bufsize-1}Y._tr_init=_0,Y._tr_stored_block=m0,Y._tr_flush_block=h0,Y._tr_tally=n0,Y._tr_align=B0}}),Q1=A0({"node_modules/pako/lib/zlib/adler32.js"(Y,g){function b(L,n,C,w){var v=L&65535|0,k=L>>>16&65535|0,B=0;while(C!==0){B=C>2000?2000:C,C-=B;do v=v+n[w++]|0,k=k+v|0;while(--B);v%=65521,k%=65521}return v|k<<16|0}g.exports=b}}),$1=A0({"node_modules/pako/lib/zlib/crc32.js"(Y,g){function b(){var C,w=[];for(var v=0;v<256;v++){C=v;for(var k=0;k<8;k++)C=C&1?3988292384^C>>>1:C>>>1;w[v]=C}return w}var L=b();function n(C,w,v,k){var B=L,N=k+v;C^=-1;for(var y=k;y<N;y++)C=C>>>8^B[(C^w[y])&255];return C^-1}g.exports=n}}),h1=A0({"node_modules/pako/lib/zlib/messages.js"(Y,g){g.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}}}),f1=A0({"node_modules/pako/lib/zlib/deflate.js"(Y){var g=r0(),b=x1(),L=Q1(),n=$1(),C=h1(),w=0,v=1,k=3,B=4,N=5,y=0,m=1,p=-2,t=-3,u=-5,s=-1,W0=1,E=2,S=3,J0=4,G0=0,F0=2,f=8,d=9,z=15,h=8,V0=29,j=256,K=j+1+V0,O=30,I=19,c=2*K+1,l=15,D=3,Q0=258,i=Q0+D+1,H0=32,N0=42,I0=69,K0=73,X0=91,U0=103,a=113,Y0=666,r=1,z0=2,Z0=3,g0=4,j0=3;function M0(Q,X){return Q.msg=C[X],X}function c0(Q){return(Q<<1)-(Q>4?9:0)}function w0(Q){var X=Q.length;while(--X>=0)Q[X]=0}function v0(Q){var X=Q.state,U=X.pending;if(U>Q.avail_out)U=Q.avail_out;if(U===0)return;if(g.arraySet(Q.output,X.pending_buf,X.pending_out,U,Q.next_out),Q.next_out+=U,X.pending_out+=U,Q.total_out+=U,Q.avail_out-=U,X.pending-=U,X.pending===0)X.pending_out=0}function q0(Q,X){b._tr_flush_block(Q,Q.block_start>=0?Q.block_start:-1,Q.strstart-Q.block_start,X),Q.block_start=Q.strstart,v0(Q.strm)}function _(Q,X){Q.pending_buf[Q.pending++]=X}function T0(Q,X){Q.pending_buf[Q.pending++]=X>>>8&255,Q.pending_buf[Q.pending++]=X&255}function p0(Q,X,U,V){var J=Q.avail_in;if(J>V)J=V;if(J===0)return 0;if(Q.avail_in-=J,g.arraySet(X,Q.input,Q.next_in,J,U),Q.state.wrap===1)Q.adler=L(Q.adler,X,J,U);else if(Q.state.wrap===2)Q.adler=n(Q.adler,X,J,U);return Q.next_in+=J,Q.total_in+=J,J}function b0(Q,X){var{max_chain_length:U,strstart:V}=Q,J,q,T=Q.prev_length,M=Q.nice_match,A=Q.strstart>Q.w_size-i?Q.strstart-(Q.w_size-i):0,o=Q.window,f0=Q.w_mask,P0=Q.prev,e=Q.strstart+Q0,C0=o[V+T-1],D0=o[V+T];if(Q.prev_length>=Q.good_match)U>>=2;if(M>Q.lookahead)M=Q.lookahead;do{if(J=X,o[J+T]!==D0||o[J+T-1]!==C0||o[J]!==o[V]||o[++J]!==o[V+1])continue;V+=2,J++;do;while(o[++V]===o[++J]&&o[++V]===o[++J]&&o[++V]===o[++J]&&o[++V]===o[++J]&&o[++V]===o[++J]&&o[++V]===o[++J]&&o[++V]===o[++J]&&o[++V]===o[++J]&&V<e);if(q=Q0-(e-V),V=e-Q0,q>T){if(Q.match_start=X,T=q,q>=M)break;C0=o[V+T-1],D0=o[V+T]}}while((X=P0[X&f0])>A&&--U!==0);if(T<=Q.lookahead)return T;return Q.lookahead}function S0(Q){var X=Q.w_size,U,V,J,q,T;do{if(q=Q.window_size-Q.lookahead-Q.strstart,Q.strstart>=X+(X-i)){g.arraySet(Q.window,Q.window,X,X,0),Q.match_start-=X,Q.strstart-=X,Q.block_start-=X,V=Q.hash_size,U=V;do J=Q.head[--U],Q.head[U]=J>=X?J-X:0;while(--V);V=X,U=V;do J=Q.prev[--U],Q.prev[U]=J>=X?J-X:0;while(--V);q+=X}if(Q.strm.avail_in===0)break;if(V=p0(Q.strm,Q.window,Q.strstart+Q.lookahead,q),Q.lookahead+=V,Q.lookahead+Q.insert>=D){T=Q.strstart-Q.insert,Q.ins_h=Q.window[T],Q.ins_h=(Q.ins_h<<Q.hash_shift^Q.window[T+1])&Q.hash_mask;while(Q.insert)if(Q.ins_h=(Q.ins_h<<Q.hash_shift^Q.window[T+D-1])&Q.hash_mask,Q.prev[T&Q.w_mask]=Q.head[Q.ins_h],Q.head[Q.ins_h]=T,T++,Q.insert--,Q.lookahead+Q.insert<D)break}}while(Q.lookahead<i&&Q.strm.avail_in!==0)}function i0(Q,X){var U=65535;if(U>Q.pending_buf_size-5)U=Q.pending_buf_size-5;for(;;){if(Q.lookahead<=1){if(S0(Q),Q.lookahead===0&&X===w)return r;if(Q.lookahead===0)break}Q.strstart+=Q.lookahead,Q.lookahead=0;var V=Q.block_start+U;if(Q.strstart===0||Q.strstart>=V){if(Q.lookahead=Q.strstart-V,Q.strstart=V,q0(Q,!1),Q.strm.avail_out===0)return r}if(Q.strstart-Q.block_start>=Q.w_size-i){if(q0(Q,!1),Q.strm.avail_out===0)return r}}if(Q.insert=0,X===B){if(q0(Q,!0),Q.strm.avail_out===0)return Z0;return g0}if(Q.strstart>Q.block_start){if(q0(Q,!1),Q.strm.avail_out===0)return r}return r}function d0(Q,X){var U,V;for(;;){if(Q.lookahead<i){if(S0(Q),Q.lookahead<i&&X===w)return r;if(Q.lookahead===0)break}if(U=0,Q.lookahead>=D)Q.ins_h=(Q.ins_h<<Q.hash_shift^Q.window[Q.strstart+D-1])&Q.hash_mask,U=Q.prev[Q.strstart&Q.w_mask]=Q.head[Q.ins_h],Q.head[Q.ins_h]=Q.strstart;if(U!==0&&Q.strstart-U<=Q.w_size-i)Q.match_length=b0(Q,U);if(Q.match_length>=D)if(V=b._tr_tally(Q,Q.strstart-Q.match_start,Q.match_length-D),Q.lookahead-=Q.match_length,Q.match_length<=Q.max_lazy_match&&Q.lookahead>=D){Q.match_length--;do Q.strstart++,Q.ins_h=(Q.ins_h<<Q.hash_shift^Q.window[Q.strstart+D-1])&Q.hash_mask,U=Q.prev[Q.strstart&Q.w_mask]=Q.head[Q.ins_h],Q.head[Q.ins_h]=Q.strstart;while(--Q.match_length!==0);Q.strstart++}else Q.strstart+=Q.match_length,Q.match_length=0,Q.ins_h=Q.window[Q.strstart],Q.ins_h=(Q.ins_h<<Q.hash_shift^Q.window[Q.strstart+1])&Q.hash_mask;else V=b._tr_tally(Q,0,Q.window[Q.strstart]),Q.lookahead--,Q.strstart++;if(V){if(q0(Q,!1),Q.strm.avail_out===0)return r}}if(Q.insert=Q.strstart<D-1?Q.strstart:D-1,X===B){if(q0(Q,!0),Q.strm.avail_out===0)return Z0;return g0}if(Q.last_lit){if(q0(Q,!1),Q.strm.avail_out===0)return r}return z0}function E0(Q,X){var U,V,J;for(;;){if(Q.lookahead<i){if(S0(Q),Q.lookahead<i&&X===w)return r;if(Q.lookahead===0)break}if(U=0,Q.lookahead>=D)Q.ins_h=(Q.ins_h<<Q.hash_shift^Q.window[Q.strstart+D-1])&Q.hash_mask,U=Q.prev[Q.strstart&Q.w_mask]=Q.head[Q.ins_h],Q.head[Q.ins_h]=Q.strstart;if(Q.prev_length=Q.match_length,Q.prev_match=Q.match_start,Q.match_length=D-1,U!==0&&Q.prev_length<Q.max_lazy_match&&Q.strstart-U<=Q.w_size-i){if(Q.match_length=b0(Q,U),Q.match_length<=5&&(Q.strategy===W0||Q.match_length===D&&Q.strstart-Q.match_start>4096))Q.match_length=D-1}if(Q.prev_length>=D&&Q.match_length<=Q.prev_length){J=Q.strstart+Q.lookahead-D,V=b._tr_tally(Q,Q.strstart-1-Q.prev_match,Q.prev_length-D),Q.lookahead-=Q.prev_length-1,Q.prev_length-=2;do if(++Q.strstart<=J)Q.ins_h=(Q.ins_h<<Q.hash_shift^Q.window[Q.strstart+D-1])&Q.hash_mask,U=Q.prev[Q.strstart&Q.w_mask]=Q.head[Q.ins_h],Q.head[Q.ins_h]=Q.strstart;while(--Q.prev_length!==0);if(Q.match_available=0,Q.match_length=D-1,Q.strstart++,V){if(q0(Q,!1),Q.strm.avail_out===0)return r}}else if(Q.match_available){if(V=b._tr_tally(Q,0,Q.window[Q.strstart-1]),V)q0(Q,!1);if(Q.strstart++,Q.lookahead--,Q.strm.avail_out===0)return r}else Q.match_available=1,Q.strstart++,Q.lookahead--}if(Q.match_available)V=b._tr_tally(Q,0,Q.window[Q.strstart-1]),Q.match_available=0;if(Q.insert=Q.strstart<D-1?Q.strstart:D-1,X===B){if(q0(Q,!0),Q.strm.avail_out===0)return Z0;return g0}if(Q.last_lit){if(q0(Q,!1),Q.strm.avail_out===0)return r}return z0}function _0(Q,X){var U,V,J,q,T=Q.window;for(;;){if(Q.lookahead<=Q0){if(S0(Q),Q.lookahead<=Q0&&X===w)return r;if(Q.lookahead===0)break}if(Q.match_length=0,Q.lookahead>=D&&Q.strstart>0){if(J=Q.strstart-1,V=T[J],V===T[++J]&&V===T[++J]&&V===T[++J]){q=Q.strstart+Q0;do;while(V===T[++J]&&V===T[++J]&&V===T[++J]&&V===T[++J]&&V===T[++J]&&V===T[++J]&&V===T[++J]&&V===T[++J]&&J<q);if(Q.match_length=Q0-(q-J),Q.match_length>Q.lookahead)Q.match_length=Q.lookahead}}if(Q.match_length>=D)U=b._tr_tally(Q,1,Q.match_length-D),Q.lookahead-=Q.match_length,Q.strstart+=Q.match_length,Q.match_length=0;else U=b._tr_tally(Q,0,Q.window[Q.strstart]),Q.lookahead--,Q.strstart++;if(U){if(q0(Q,!1),Q.strm.avail_out===0)return r}}if(Q.insert=0,X===B){if(q0(Q,!0),Q.strm.avail_out===0)return Z0;return g0}if(Q.last_lit){if(q0(Q,!1),Q.strm.avail_out===0)return r}return z0}function m0(Q,X){var U;for(;;){if(Q.lookahead===0){if(S0(Q),Q.lookahead===0){if(X===w)return r;break}}if(Q.match_length=0,U=b._tr_tally(Q,0,Q.window[Q.strstart]),Q.lookahead--,Q.strstart++,U){if(q0(Q,!1),Q.strm.avail_out===0)return r}}if(Q.insert=0,X===B){if(q0(Q,!0),Q.strm.avail_out===0)return Z0;return g0}if(Q.last_lit){if(q0(Q,!1),Q.strm.avail_out===0)return r}return z0}function B0(Q,X,U,V,J){this.good_length=Q,this.max_lazy=X,this.nice_length=U,this.max_chain=V,this.func=J}var h0=[new B0(0,0,0,0,i0),new B0(4,4,8,4,d0),new B0(4,5,16,8,d0),new B0(4,6,32,32,d0),new B0(4,4,16,16,E0),new B0(8,16,32,32,E0),new B0(8,16,128,128,E0),new B0(8,32,128,256,E0),new B0(32,128,258,1024,E0),new B0(32,258,258,4096,E0)];function n0(Q){Q.window_size=2*Q.w_size,w0(Q.head),Q.max_lazy_match=h0[Q.level].max_lazy,Q.good_match=h0[Q.level].good_length,Q.nice_match=h0[Q.level].nice_length,Q.max_chain_length=h0[Q.level].max_chain,Q.strstart=0,Q.block_start=0,Q.lookahead=0,Q.insert=0,Q.match_length=Q.prev_length=D-1,Q.match_available=0,Q.ins_h=0}function W(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=f,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new g.Buf16(c*2),this.dyn_dtree=new g.Buf16((2*O+1)*2),this.bl_tree=new g.Buf16((2*I+1)*2),w0(this.dyn_ltree),w0(this.dyn_dtree),w0(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new g.Buf16(l+1),this.heap=new g.Buf16(2*K+1),w0(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new g.Buf16(2*K+1),w0(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function F(Q){var X;if(!Q||!Q.state)return M0(Q,p);if(Q.total_in=Q.total_out=0,Q.data_type=F0,X=Q.state,X.pending=0,X.pending_out=0,X.wrap<0)X.wrap=-X.wrap;return X.status=X.wrap?N0:a,Q.adler=X.wrap===2?0:1,X.last_flush=w,b._tr_init(X),y}function Z(Q){var X=F(Q);if(X===y)n0(Q.state);return X}function R(Q,X){if(!Q||!Q.state)return p;if(Q.state.wrap!==2)return p;return Q.state.gzhead=X,y}function G(Q,X,U,V,J,q){if(!Q)return p;var T=1;if(X===s)X=6;if(V<0)T=0,V=-V;else if(V>15)T=2,V-=16;if(J<1||J>d||U!==f||V<8||V>15||X<0||X>9||q<0||q>J0)return M0(Q,p);if(V===8)V=9;var M=new W;return Q.state=M,M.strm=Q,M.wrap=T,M.gzhead=null,M.w_bits=V,M.w_size=1<<M.w_bits,M.w_mask=M.w_size-1,M.hash_bits=J+7,M.hash_size=1<<M.hash_bits,M.hash_mask=M.hash_size-1,M.hash_shift=~~((M.hash_bits+D-1)/D),M.window=new g.Buf8(M.w_size*2),M.head=new g.Buf16(M.hash_size),M.prev=new g.Buf16(M.w_size),M.lit_bufsize=1<<J+6,M.pending_buf_size=M.lit_bufsize*4,M.pending_buf=new g.Buf8(M.pending_buf_size),M.d_buf=1*M.lit_bufsize,M.l_buf=3*M.lit_bufsize,M.level=X,M.strategy=q,M.method=U,Z(Q)}function P(Q,X){return G(Q,X,f,z,h,G0)}function $(Q,X){var U,V,J,q;if(!Q||!Q.state||X>N||X<0)return Q?M0(Q,p):p;if(V=Q.state,!Q.output||!Q.input&&Q.avail_in!==0||V.status===Y0&&X!==B)return M0(Q,Q.avail_out===0?u:p);if(V.strm=Q,U=V.last_flush,V.last_flush=X,V.status===N0)if(V.wrap===2)if(Q.adler=0,_(V,31),_(V,139),_(V,8),!V.gzhead)_(V,0),_(V,0),_(V,0),_(V,0),_(V,0),_(V,V.level===9?2:V.strategy>=E||V.level<2?4:0),_(V,j0),V.status=a;else{if(_(V,(V.gzhead.text?1:0)+(V.gzhead.hcrc?2:0)+(!V.gzhead.extra?0:4)+(!V.gzhead.name?0:8)+(!V.gzhead.comment?0:16)),_(V,V.gzhead.time&255),_(V,V.gzhead.time>>8&255),_(V,V.gzhead.time>>16&255),_(V,V.gzhead.time>>24&255),_(V,V.level===9?2:V.strategy>=E||V.level<2?4:0),_(V,V.gzhead.os&255),V.gzhead.extra&&V.gzhead.extra.length)_(V,V.gzhead.extra.length&255),_(V,V.gzhead.extra.length>>8&255);if(V.gzhead.hcrc)Q.adler=n(Q.adler,V.pending_buf,V.pending,0);V.gzindex=0,V.status=I0}else{var T=f+(V.w_bits-8<<4)<<8,M=-1;if(V.strategy>=E||V.level<2)M=0;else if(V.level<6)M=1;else if(V.level===6)M=2;else M=3;if(T|=M<<6,V.strstart!==0)T|=H0;if(T+=31-T%31,V.status=a,T0(V,T),V.strstart!==0)T0(V,Q.adler>>>16),T0(V,Q.adler&65535);Q.adler=1}if(V.status===I0)if(V.gzhead.extra){J=V.pending;while(V.gzindex<(V.gzhead.extra.length&65535)){if(V.pending===V.pending_buf_size){if(V.gzhead.hcrc&&V.pending>J)Q.adler=n(Q.adler,V.pending_buf,V.pending-J,J);if(v0(Q),J=V.pending,V.pending===V.pending_buf_size)break}_(V,V.gzhead.extra[V.gzindex]&255),V.gzindex++}if(V.gzhead.hcrc&&V.pending>J)Q.adler=n(Q.adler,V.pending_buf,V.pending-J,J);if(V.gzindex===V.gzhead.extra.length)V.gzindex=0,V.status=K0}else V.status=K0;if(V.status===K0)if(V.gzhead.name){J=V.pending;do{if(V.pending===V.pending_buf_size){if(V.gzhead.hcrc&&V.pending>J)Q.adler=n(Q.adler,V.pending_buf,V.pending-J,J);if(v0(Q),J=V.pending,V.pending===V.pending_buf_size){q=1;break}}if(V.gzindex<V.gzhead.name.length)q=V.gzhead.name.charCodeAt(V.gzindex++)&255;else q=0;_(V,q)}while(q!==0);if(V.gzhead.hcrc&&V.pending>J)Q.adler=n(Q.adler,V.pending_buf,V.pending-J,J);if(q===0)V.gzindex=0,V.status=X0}else V.status=X0;if(V.status===X0)if(V.gzhead.comment){J=V.pending;do{if(V.pending===V.pending_buf_size){if(V.gzhead.hcrc&&V.pending>J)Q.adler=n(Q.adler,V.pending_buf,V.pending-J,J);if(v0(Q),J=V.pending,V.pending===V.pending_buf_size){q=1;break}}if(V.gzindex<V.gzhead.comment.length)q=V.gzhead.comment.charCodeAt(V.gzindex++)&255;else q=0;_(V,q)}while(q!==0);if(V.gzhead.hcrc&&V.pending>J)Q.adler=n(Q.adler,V.pending_buf,V.pending-J,J);if(q===0)V.status=U0}else V.status=U0;if(V.status===U0)if(V.gzhead.hcrc){if(V.pending+2>V.pending_buf_size)v0(Q);if(V.pending+2<=V.pending_buf_size)_(V,Q.adler&255),_(V,Q.adler>>8&255),Q.adler=0,V.status=a}else V.status=a;if(V.pending!==0){if(v0(Q),Q.avail_out===0)return V.last_flush=-1,y}else if(Q.avail_in===0&&c0(X)<=c0(U)&&X!==B)return M0(Q,u);if(V.status===Y0&&Q.avail_in!==0)return M0(Q,u);if(Q.avail_in!==0||V.lookahead!==0||X!==w&&V.status!==Y0){var A=V.strategy===E?m0(V,X):V.strategy===S?_0(V,X):h0[V.level].func(V,X);if(A===Z0||A===g0)V.status=Y0;if(A===r||A===Z0){if(Q.avail_out===0)V.last_flush=-1;return y}if(A===z0){if(X===v)b._tr_align(V);else if(X!==N){if(b._tr_stored_block(V,0,0,!1),X===k){if(w0(V.head),V.lookahead===0)V.strstart=0,V.block_start=0,V.insert=0}}if(v0(Q),Q.avail_out===0)return V.last_flush=-1,y}}if(X!==B)return y;if(V.wrap<=0)return m;if(V.wrap===2)_(V,Q.adler&255),_(V,Q.adler>>8&255),_(V,Q.adler>>16&255),_(V,Q.adler>>24&255),_(V,Q.total_in&255),_(V,Q.total_in>>8&255),_(V,Q.total_in>>16&255),_(V,Q.total_in>>24&255);else T0(V,Q.adler>>>16),T0(V,Q.adler&65535);if(v0(Q),V.wrap>0)V.wrap=-V.wrap;return V.pending!==0?y:m}function H(Q){var X;if(!Q||!Q.state)return p;if(X=Q.state.status,X!==N0&&X!==I0&&X!==K0&&X!==X0&&X!==U0&&X!==a&&X!==Y0)return M0(Q,p);return Q.state=null,X===a?M0(Q,t):y}function x(Q,X){var U=X.length,V,J,q,T,M,A,o,f0;if(!Q||!Q.state)return p;if(V=Q.state,T=V.wrap,T===2||T===1&&V.status!==N0||V.lookahead)return p;if(T===1)Q.adler=L(Q.adler,X,U,0);if(V.wrap=0,U>=V.w_size){if(T===0)w0(V.head),V.strstart=0,V.block_start=0,V.insert=0;f0=new g.Buf8(V.w_size),g.arraySet(f0,X,U-V.w_size,V.w_size,0),X=f0,U=V.w_size}M=Q.avail_in,A=Q.next_in,o=Q.input,Q.avail_in=U,Q.next_in=0,Q.input=X,S0(V);while(V.lookahead>=D){J=V.strstart,q=V.lookahead-(D-1);do V.ins_h=(V.ins_h<<V.hash_shift^V.window[J+D-1])&V.hash_mask,V.prev[J&V.w_mask]=V.head[V.ins_h],V.head[V.ins_h]=J,J++;while(--q);V.strstart=J,V.lookahead=D-1,S0(V)}return V.strstart+=V.lookahead,V.block_start=V.strstart,V.insert=V.lookahead,V.lookahead=0,V.match_length=V.prev_length=D-1,V.match_available=0,Q.next_in=A,Q.input=o,Q.avail_in=M,V.wrap=T,y}Y.deflateInit=P,Y.deflateInit2=G,Y.deflateReset=Z,Y.deflateResetKeep=F,Y.deflateSetHeader=R,Y.deflate=$,Y.deflateEnd=H,Y.deflateSetDictionary=x,Y.deflateInfo="pako deflate (from Nodeca project)"}}),u1=A0({"node_modules/pako/lib/zlib/inffast.js"(Y,g){var b=30,L=12;g.exports=function n(C,w){var v,k,B,N,y,m,p,t,u,s,W0,E,S,J0,G0,F0,f,d,z,h,V0,j,K,O,I;v=C.state,k=C.next_in,O=C.input,B=k+(C.avail_in-5),N=C.next_out,I=C.output,y=N-(w-C.avail_out),m=N+(C.avail_out-257),p=v.dmax,t=v.wsize,u=v.whave,s=v.wnext,W0=v.window,E=v.hold,S=v.bits,J0=v.lencode,G0=v.distcode,F0=(1<<v.lenbits)-1,f=(1<<v.distbits)-1;Q:do{if(S<15)E+=O[k++]<<S,S+=8,E+=O[k++]<<S,S+=8;d=J0[E&F0];$:for(;;){if(z=d>>>24,E>>>=z,S-=z,z=d>>>16&255,z===0)I[N++]=d&65535;else if(z&16){if(h=d&65535,z&=15,z){if(S<z)E+=O[k++]<<S,S+=8;h+=E&(1<<z)-1,E>>>=z,S-=z}if(S<15)E+=O[k++]<<S,S+=8,E+=O[k++]<<S,S+=8;d=G0[E&f];V:for(;;){if(z=d>>>24,E>>>=z,S-=z,z=d>>>16&255,z&16){if(V0=d&65535,z&=15,S<z){if(E+=O[k++]<<S,S+=8,S<z)E+=O[k++]<<S,S+=8}if(V0+=E&(1<<z)-1,V0>p){C.msg="invalid distance too far back",v.mode=b;break Q}if(E>>>=z,S-=z,z=N-y,V0>z){if(z=V0-z,z>u){if(v.sane){C.msg="invalid distance too far back",v.mode=b;break Q}}if(j=0,K=W0,s===0){if(j+=t-z,z<h){h-=z;do I[N++]=W0[j++];while(--z);j=N-V0,K=I}}else if(s<z){if(j+=t+s-z,z-=s,z<h){h-=z;do I[N++]=W0[j++];while(--z);if(j=0,s<h){z=s,h-=z;do I[N++]=W0[j++];while(--z);j=N-V0,K=I}}}else if(j+=s-z,z<h){h-=z;do I[N++]=W0[j++];while(--z);j=N-V0,K=I}while(h>2)I[N++]=K[j++],I[N++]=K[j++],I[N++]=K[j++],h-=3;if(h){if(I[N++]=K[j++],h>1)I[N++]=K[j++]}}else{j=N-V0;do I[N++]=I[j++],I[N++]=I[j++],I[N++]=I[j++],h-=3;while(h>2);if(h){if(I[N++]=I[j++],h>1)I[N++]=I[j++]}}}else if((z&64)===0){d=G0[(d&65535)+(E&(1<<z)-1)];continue V}else{C.msg="invalid distance code",v.mode=b;break Q}break}}else if((z&64)===0){d=J0[(d&65535)+(E&(1<<z)-1)];continue $}else if(z&32){v.mode=L;break Q}else{C.msg="invalid literal/length code",v.mode=b;break Q}break}}while(k<B&&N<m);h=S>>3,k-=h,S-=h<<3,E&=(1<<S)-1,C.next_in=k,C.next_out=N,C.avail_in=k<B?5+(B-k):5-(k-B),C.avail_out=N<m?257+(m-N):257-(N-m),v.hold=E,v.bits=S;return}}}),b1=A0({"node_modules/pako/lib/zlib/inftrees.js"(Y,g){var b=r0(),L=15,n=852,C=592,w=0,v=1,k=2,B=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],N=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],y=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],m=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];g.exports=function p(t,u,s,W0,E,S,J0,G0){var F0=G0.bits,f=0,d=0,z=0,h=0,V0=0,j=0,K=0,O=0,I=0,c=0,l,D,Q0,i,H0,N0=null,I0=0,K0,X0=new b.Buf16(L+1),U0=new b.Buf16(L+1),a=null,Y0=0,r,z0,Z0;for(f=0;f<=L;f++)X0[f]=0;for(d=0;d<W0;d++)X0[u[s+d]]++;V0=F0;for(h=L;h>=1;h--)if(X0[h]!==0)break;if(V0>h)V0=h;if(h===0)return E[S++]=1<<24|64<<16|0,E[S++]=1<<24|64<<16|0,G0.bits=1,0;for(z=1;z<h;z++)if(X0[z]!==0)break;if(V0<z)V0=z;O=1;for(f=1;f<=L;f++)if(O<<=1,O-=X0[f],O<0)return-1;if(O>0&&(t===w||h!==1))return-1;U0[1]=0;for(f=1;f<L;f++)U0[f+1]=U0[f]+X0[f];for(d=0;d<W0;d++)if(u[s+d]!==0)J0[U0[u[s+d]]++]=d;if(t===w)N0=a=J0,K0=19;else if(t===v)N0=B,I0-=257,a=N,Y0-=257,K0=256;else N0=y,a=m,K0=-1;if(c=0,d=0,f=z,H0=S,j=V0,K=0,Q0=-1,I=1<<V0,i=I-1,t===v&&I>n||t===k&&I>C)return 1;for(;;){if(r=f-K,J0[d]<K0)z0=0,Z0=J0[d];else if(J0[d]>K0)z0=a[Y0+J0[d]],Z0=N0[I0+J0[d]];else z0=96,Z0=0;l=1<<f-K,D=1<<j,z=D;do D-=l,E[H0+(c>>K)+D]=r<<24|z0<<16|Z0|0;while(D!==0);l=1<<f-1;while(c&l)l>>=1;if(l!==0)c&=l-1,c+=l;else c=0;if(d++,--X0[f]===0){if(f===h)break;f=u[s+J0[d]]}if(f>V0&&(c&i)!==Q0){if(K===0)K=V0;H0+=z,j=f-K,O=1<<j;while(j+K<h){if(O-=X0[j+K],O<=0)break;j++,O<<=1}if(I+=1<<j,t===v&&I>n||t===k&&I>C)return 1;Q0=c&i,E[Q0]=V0<<24|j<<16|H0-S|0}}if(c!==0)E[H0+c]=f-K<<24|64<<16|0;return G0.bits=V0,0}}}),d1=A0({"node_modules/pako/lib/zlib/inflate.js"(Y){var g=r0(),b=Q1(),L=$1(),n=u1(),C=b1(),w=0,v=1,k=2,B=4,N=5,y=6,m=0,p=1,t=2,u=-2,s=-3,W0=-4,E=-5,S=8,J0=1,G0=2,F0=3,f=4,d=5,z=6,h=7,V0=8,j=9,K=10,O=11,I=12,c=13,l=14,D=15,Q0=16,i=17,H0=18,N0=19,I0=20,K0=21,X0=22,U0=23,a=24,Y0=25,r=26,z0=27,Z0=28,g0=29,j0=30,M0=31,c0=32,w0=852,v0=592,q0=15,_=q0;function T0(G){return(G>>>24&255)+(G>>>8&65280)+((G&65280)<<8)+((G&255)<<24)}function p0(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new g.Buf16(320),this.work=new g.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function b0(G){var P;if(!G||!G.state)return u;if(P=G.state,G.total_in=G.total_out=P.total=0,G.msg="",P.wrap)G.adler=P.wrap&1;return P.mode=J0,P.last=0,P.havedict=0,P.dmax=32768,P.head=null,P.hold=0,P.bits=0,P.lencode=P.lendyn=new g.Buf32(w0),P.distcode=P.distdyn=new g.Buf32(v0),P.sane=1,P.back=-1,m}function S0(G){var P;if(!G||!G.state)return u;return P=G.state,P.wsize=0,P.whave=0,P.wnext=0,b0(G)}function i0(G,P){var $,H;if(!G||!G.state)return u;if(H=G.state,P<0)$=0,P=-P;else if($=(P>>4)+1,P<48)P&=15;if(P&&(P<8||P>15))return u;if(H.window!==null&&H.wbits!==P)H.window=null;return H.wrap=$,H.wbits=P,S0(G)}function d0(G,P){var $,H;if(!G)return u;if(H=new p0,G.state=H,H.window=null,$=i0(G,P),$!==m)G.state=null;return $}function E0(G){return d0(G,_)}var _0=!0,m0,B0;function h0(G){if(_0){var P;m0=new g.Buf32(512),B0=new g.Buf32(32),P=0;while(P<144)G.lens[P++]=8;while(P<256)G.lens[P++]=9;while(P<280)G.lens[P++]=7;while(P<288)G.lens[P++]=8;C(v,G.lens,0,288,m0,0,G.work,{bits:9}),P=0;while(P<32)G.lens[P++]=5;C(k,G.lens,0,32,B0,0,G.work,{bits:5}),_0=!1}G.lencode=m0,G.lenbits=9,G.distcode=B0,G.distbits=5}function n0(G,P,$,H){var x,Q=G.state;if(Q.window===null)Q.wsize=1<<Q.wbits,Q.wnext=0,Q.whave=0,Q.window=new g.Buf8(Q.wsize);if(H>=Q.wsize)g.arraySet(Q.window,P,$-Q.wsize,Q.wsize,0),Q.wnext=0,Q.whave=Q.wsize;else{if(x=Q.wsize-Q.wnext,x>H)x=H;if(g.arraySet(Q.window,P,$-H,x,Q.wnext),H-=x,H)g.arraySet(Q.window,P,$-H,H,0),Q.wnext=H,Q.whave=Q.wsize;else{if(Q.wnext+=x,Q.wnext===Q.wsize)Q.wnext=0;if(Q.whave<Q.wsize)Q.whave+=x}}return 0}function W(G,P){var $,H,x,Q,X,U,V,J,q,T,M,A,o,f0,P0=0,e,C0,D0,k0,a0,l0,L0,y0,O0=new g.Buf8(4),u0,x0,e0=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!G||!G.state||!G.output||!G.input&&G.avail_in!==0)return u;if($=G.state,$.mode===I)$.mode=c;X=G.next_out,x=G.output,V=G.avail_out,Q=G.next_in,H=G.input,U=G.avail_in,J=$.hold,q=$.bits,T=U,M=V,y0=m;Q:for(;;)switch($.mode){case J0:if($.wrap===0){$.mode=c;break}while(q<16){if(U===0)break Q;U--,J+=H[Q++]<<q,q+=8}if($.wrap&2&&J===35615){$.check=0,O0[0]=J&255,O0[1]=J>>>8&255,$.check=L($.check,O0,2,0),J=0,q=0,$.mode=G0;break}if($.flags=0,$.head)$.head.done=!1;if(!($.wrap&1)||(((J&255)<<8)+(J>>8))%31){G.msg="incorrect header check",$.mode=j0;break}if((J&15)!==S){G.msg="unknown compression method",$.mode=j0;break}if(J>>>=4,q-=4,L0=(J&15)+8,$.wbits===0)$.wbits=L0;else if(L0>$.wbits){G.msg="invalid window size",$.mode=j0;break}$.dmax=1<<L0,G.adler=$.check=1,$.mode=J&512?K:I,J=0,q=0;break;case G0:while(q<16){if(U===0)break Q;U--,J+=H[Q++]<<q,q+=8}if($.flags=J,($.flags&255)!==S){G.msg="unknown compression method",$.mode=j0;break}if($.flags&57344){G.msg="unknown header flags set",$.mode=j0;break}if($.head)$.head.text=J>>8&1;if($.flags&512)O0[0]=J&255,O0[1]=J>>>8&255,$.check=L($.check,O0,2,0);J=0,q=0,$.mode=F0;case F0:while(q<32){if(U===0)break Q;U--,J+=H[Q++]<<q,q+=8}if($.head)$.head.time=J;if($.flags&512)O0[0]=J&255,O0[1]=J>>>8&255,O0[2]=J>>>16&255,O0[3]=J>>>24&255,$.check=L($.check,O0,4,0);J=0,q=0,$.mode=f;case f:while(q<16){if(U===0)break Q;U--,J+=H[Q++]<<q,q+=8}if($.head)$.head.xflags=J&255,$.head.os=J>>8;if($.flags&512)O0[0]=J&255,O0[1]=J>>>8&255,$.check=L($.check,O0,2,0);J=0,q=0,$.mode=d;case d:if($.flags&1024){while(q<16){if(U===0)break Q;U--,J+=H[Q++]<<q,q+=8}if($.length=J,$.head)$.head.extra_len=J;if($.flags&512)O0[0]=J&255,O0[1]=J>>>8&255,$.check=L($.check,O0,2,0);J=0,q=0}else if($.head)$.head.extra=null;$.mode=z;case z:if($.flags&1024){if(A=$.length,A>U)A=U;if(A){if($.head){if(L0=$.head.extra_len-$.length,!$.head.extra)$.head.extra=new Array($.head.extra_len);g.arraySet($.head.extra,H,Q,A,L0)}if($.flags&512)$.check=L($.check,H,A,Q);U-=A,Q+=A,$.length-=A}if($.length)break Q}$.length=0,$.mode=h;case h:if($.flags&2048){if(U===0)break Q;A=0;do if(L0=H[Q+A++],$.head&&L0&&$.length<65536)$.head.name+=String.fromCharCode(L0);while(L0&&A<U);if($.flags&512)$.check=L($.check,H,A,Q);if(U-=A,Q+=A,L0)break Q}else if($.head)$.head.name=null;$.length=0,$.mode=V0;case V0:if($.flags&4096){if(U===0)break Q;A=0;do if(L0=H[Q+A++],$.head&&L0&&$.length<65536)$.head.comment+=String.fromCharCode(L0);while(L0&&A<U);if($.flags&512)$.check=L($.check,H,A,Q);if(U-=A,Q+=A,L0)break Q}else if($.head)$.head.comment=null;$.mode=j;case j:if($.flags&512){while(q<16){if(U===0)break Q;U--,J+=H[Q++]<<q,q+=8}if(J!==($.check&65535)){G.msg="header crc mismatch",$.mode=j0;break}J=0,q=0}if($.head)$.head.hcrc=$.flags>>9&1,$.head.done=!0;G.adler=$.check=0,$.mode=I;break;case K:while(q<32){if(U===0)break Q;U--,J+=H[Q++]<<q,q+=8}G.adler=$.check=T0(J),J=0,q=0,$.mode=O;case O:if($.havedict===0)return G.next_out=X,G.avail_out=V,G.next_in=Q,G.avail_in=U,$.hold=J,$.bits=q,t;G.adler=$.check=1,$.mode=I;case I:if(P===N||P===y)break Q;case c:if($.last){J>>>=q&7,q-=q&7,$.mode=z0;break}while(q<3){if(U===0)break Q;U--,J+=H[Q++]<<q,q+=8}switch($.last=J&1,J>>>=1,q-=1,J&3){case 0:$.mode=l;break;case 1:if(h0($),$.mode=I0,P===y){J>>>=2,q-=2;break Q}break;case 2:$.mode=i;break;case 3:G.msg="invalid block type",$.mode=j0}J>>>=2,q-=2;break;case l:J>>>=q&7,q-=q&7;while(q<32){if(U===0)break Q;U--,J+=H[Q++]<<q,q+=8}if((J&65535)!==(J>>>16^65535)){G.msg="invalid stored block lengths",$.mode=j0;break}if($.length=J&65535,J=0,q=0,$.mode=D,P===y)break Q;case D:$.mode=Q0;case Q0:if(A=$.length,A){if(A>U)A=U;if(A>V)A=V;if(A===0)break Q;g.arraySet(x,H,Q,A,X),U-=A,Q+=A,V-=A,X+=A,$.length-=A;break}$.mode=I;break;case i:while(q<14){if(U===0)break Q;U--,J+=H[Q++]<<q,q+=8}if($.nlen=(J&31)+257,J>>>=5,q-=5,$.ndist=(J&31)+1,J>>>=5,q-=5,$.ncode=(J&15)+4,J>>>=4,q-=4,$.nlen>286||$.ndist>30){G.msg="too many length or distance symbols",$.mode=j0;break}$.have=0,$.mode=H0;case H0:while($.have<$.ncode){while(q<3){if(U===0)break Q;U--,J+=H[Q++]<<q,q+=8}$.lens[e0[$.have++]]=J&7,J>>>=3,q-=3}while($.have<19)$.lens[e0[$.have++]]=0;if($.lencode=$.lendyn,$.lenbits=7,u0={bits:$.lenbits},y0=C(w,$.lens,0,19,$.lencode,0,$.work,u0),$.lenbits=u0.bits,y0){G.msg="invalid code lengths set",$.mode=j0;break}$.have=0,$.mode=N0;case N0:while($.have<$.nlen+$.ndist){for(;;){if(P0=$.lencode[J&(1<<$.lenbits)-1],e=P0>>>24,C0=P0>>>16&255,D0=P0&65535,e<=q)break;if(U===0)break Q;U--,J+=H[Q++]<<q,q+=8}if(D0<16)J>>>=e,q-=e,$.lens[$.have++]=D0;else{if(D0===16){x0=e+2;while(q<x0){if(U===0)break Q;U--,J+=H[Q++]<<q,q+=8}if(J>>>=e,q-=e,$.have===0){G.msg="invalid bit length repeat",$.mode=j0;break}L0=$.lens[$.have-1],A=3+(J&3),J>>>=2,q-=2}else if(D0===17){x0=e+3;while(q<x0){if(U===0)break Q;U--,J+=H[Q++]<<q,q+=8}J>>>=e,q-=e,L0=0,A=3+(J&7),J>>>=3,q-=3}else{x0=e+7;while(q<x0){if(U===0)break Q;U--,J+=H[Q++]<<q,q+=8}J>>>=e,q-=e,L0=0,A=11+(J&127),J>>>=7,q-=7}if($.have+A>$.nlen+$.ndist){G.msg="invalid bit length repeat",$.mode=j0;break}while(A--)$.lens[$.have++]=L0}}if($.mode===j0)break;if($.lens[256]===0){G.msg="invalid code -- missing end-of-block",$.mode=j0;break}if($.lenbits=9,u0={bits:$.lenbits},y0=C(v,$.lens,0,$.nlen,$.lencode,0,$.work,u0),$.lenbits=u0.bits,y0){G.msg="invalid literal/lengths set",$.mode=j0;break}if($.distbits=6,$.distcode=$.distdyn,u0={bits:$.distbits},y0=C(k,$.lens,$.nlen,$.ndist,$.distcode,0,$.work,u0),$.distbits=u0.bits,y0){G.msg="invalid distances set",$.mode=j0;break}if($.mode=I0,P===y)break Q;case I0:$.mode=K0;case K0:if(U>=6&&V>=258){if(G.next_out=X,G.avail_out=V,G.next_in=Q,G.avail_in=U,$.hold=J,$.bits=q,n(G,M),X=G.next_out,x=G.output,V=G.avail_out,Q=G.next_in,H=G.input,U=G.avail_in,J=$.hold,q=$.bits,$.mode===I)$.back=-1;break}$.back=0;for(;;){if(P0=$.lencode[J&(1<<$.lenbits)-1],e=P0>>>24,C0=P0>>>16&255,D0=P0&65535,e<=q)break;if(U===0)break Q;U--,J+=H[Q++]<<q,q+=8}if(C0&&(C0&240)===0){k0=e,a0=C0,l0=D0;for(;;){if(P0=$.lencode[l0+((J&(1<<k0+a0)-1)>>k0)],e=P0>>>24,C0=P0>>>16&255,D0=P0&65535,k0+e<=q)break;if(U===0)break Q;U--,J+=H[Q++]<<q,q+=8}J>>>=k0,q-=k0,$.back+=k0}if(J>>>=e,q-=e,$.back+=e,$.length=D0,C0===0){$.mode=r;break}if(C0&32){$.back=-1,$.mode=I;break}if(C0&64){G.msg="invalid literal/length code",$.mode=j0;break}$.extra=C0&15,$.mode=X0;case X0:if($.extra){x0=$.extra;while(q<x0){if(U===0)break Q;U--,J+=H[Q++]<<q,q+=8}$.length+=J&(1<<$.extra)-1,J>>>=$.extra,q-=$.extra,$.back+=$.extra}$.was=$.length,$.mode=U0;case U0:for(;;){if(P0=$.distcode[J&(1<<$.distbits)-1],e=P0>>>24,C0=P0>>>16&255,D0=P0&65535,e<=q)break;if(U===0)break Q;U--,J+=H[Q++]<<q,q+=8}if((C0&240)===0){k0=e,a0=C0,l0=D0;for(;;){if(P0=$.distcode[l0+((J&(1<<k0+a0)-1)>>k0)],e=P0>>>24,C0=P0>>>16&255,D0=P0&65535,k0+e<=q)break;if(U===0)break Q;U--,J+=H[Q++]<<q,q+=8}J>>>=k0,q-=k0,$.back+=k0}if(J>>>=e,q-=e,$.back+=e,C0&64){G.msg="invalid distance code",$.mode=j0;break}$.offset=D0,$.extra=C0&15,$.mode=a;case a:if($.extra){x0=$.extra;while(q<x0){if(U===0)break Q;U--,J+=H[Q++]<<q,q+=8}$.offset+=J&(1<<$.extra)-1,J>>>=$.extra,q-=$.extra,$.back+=$.extra}if($.offset>$.dmax){G.msg="invalid distance too far back",$.mode=j0;break}$.mode=Y0;case Y0:if(V===0)break Q;if(A=M-V,$.offset>A){if(A=$.offset-A,A>$.whave){if($.sane){G.msg="invalid distance too far back",$.mode=j0;break}}if(A>$.wnext)A-=$.wnext,o=$.wsize-A;else o=$.wnext-A;if(A>$.length)A=$.length;f0=$.window}else f0=x,o=X-$.offset,A=$.length;if(A>V)A=V;V-=A,$.length-=A;do x[X++]=f0[o++];while(--A);if($.length===0)$.mode=K0;break;case r:if(V===0)break Q;x[X++]=$.length,V--,$.mode=K0;break;case z0:if($.wrap){while(q<32){if(U===0)break Q;U--,J|=H[Q++]<<q,q+=8}if(M-=V,G.total_out+=M,$.total+=M,M)G.adler=$.check=$.flags?L($.check,x,M,X-M):b($.check,x,M,X-M);if(M=V,($.flags?J:T0(J))!==$.check){G.msg="incorrect data check",$.mode=j0;break}J=0,q=0}$.mode=Z0;case Z0:if($.wrap&&$.flags){while(q<32){if(U===0)break Q;U--,J+=H[Q++]<<q,q+=8}if(J!==($.total&4294967295)){G.msg="incorrect length check",$.mode=j0;break}J=0,q=0}$.mode=g0;case g0:y0=p;break Q;case j0:y0=s;break Q;case M0:return W0;case c0:default:return u}if(G.next_out=X,G.avail_out=V,G.next_in=Q,G.avail_in=U,$.hold=J,$.bits=q,$.wsize||M!==G.avail_out&&$.mode<j0&&($.mode<z0||P!==B)){if(n0(G,G.output,G.next_out,M-G.avail_out))return $.mode=M0,W0}if(T-=G.avail_in,M-=G.avail_out,G.total_in+=T,G.total_out+=M,$.total+=M,$.wrap&&M)G.adler=$.check=$.flags?L($.check,x,M,G.next_out-M):b($.check,x,M,G.next_out-M);if(G.data_type=$.bits+($.last?64:0)+($.mode===I?128:0)+($.mode===I0||$.mode===D?256:0),(T===0&&M===0||P===B)&&y0===m)y0=E;return y0}function F(G){if(!G||!G.state)return u;var P=G.state;if(P.window)P.window=null;return G.state=null,m}function Z(G,P){var $;if(!G||!G.state)return u;if($=G.state,($.wrap&2)===0)return u;return $.head=P,P.done=!1,m}function R(G,P){var $=P.length,H,x,Q;if(!G||!G.state)return u;if(H=G.state,H.wrap!==0&&H.mode!==O)return u;if(H.mode===O){if(x=1,x=b(x,P,$,0),x!==H.check)return s}if(Q=n0(G,P,$,$),Q)return H.mode=M0,W0;return H.havedict=1,m}Y.inflateReset=S0,Y.inflateReset2=i0,Y.inflateResetKeep=b0,Y.inflateInit=E0,Y.inflateInit2=d0,Y.inflate=W,Y.inflateEnd=F,Y.inflateGetHeader=Z,Y.inflateSetDictionary=R,Y.inflateInfo="pako inflate (from Nodeca project)"}}),V1=A0({"node_modules/pako/lib/zlib/constants.js"(Y,g){g.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}}}),m1=A0({"node_modules/browserify-zlib/lib/binding.js"(Y){var g=E1(),b=f1(),L=d1(),n=V1();for(C in n)Y[C]=n[C];var C;Y.NONE=0,Y.DEFLATE=1,Y.INFLATE=2,Y.GZIP=3,Y.GUNZIP=4,Y.DEFLATERAW=5,Y.INFLATERAW=6,Y.UNZIP=7;var w=31,v=139;function k(B){if(typeof B!=="number"||B<Y.DEFLATE||B>Y.UNZIP)throw new TypeError("Bad argument");this.dictionary=null,this.err=0,this.flush=0,this.init_done=!1,this.level=0,this.memLevel=0,this.mode=B,this.strategy=0,this.windowBits=0,this.write_in_progress=!1,this.pending_close=!1,this.gzip_id_bytes_read=0}k.prototype.close=function(){if(this.write_in_progress){this.pending_close=!0;return}if(this.pending_close=!1,R0(this.init_done,"close before init"),R0(this.mode<=Y.UNZIP),this.mode===Y.DEFLATE||this.mode===Y.GZIP||this.mode===Y.DEFLATERAW)b.deflateEnd(this.strm);else if(this.mode===Y.INFLATE||this.mode===Y.GUNZIP||this.mode===Y.INFLATERAW||this.mode===Y.UNZIP)L.inflateEnd(this.strm);this.mode=Y.NONE,this.dictionary=null},k.prototype.write=function(B,N,y,m,p,t,u){return this._write(!0,B,N,y,m,p,t,u)},k.prototype.writeSync=function(B,N,y,m,p,t,u){return this._write(!1,B,N,y,m,p,t,u)},k.prototype._write=function(B,N,y,m,p,t,u,s){if(R0.equal(arguments.length,8),R0(this.init_done,"write before init"),R0(this.mode!==Y.NONE,"already finalized"),R0.equal(!1,this.write_in_progress,"write already in progress"),R0.equal(!1,this.pending_close,"close is pending"),this.write_in_progress=!0,R0.equal(!1,N===void 0,"must provide flush value"),this.write_in_progress=!0,N!==Y.Z_NO_FLUSH&&N!==Y.Z_PARTIAL_FLUSH&&N!==Y.Z_SYNC_FLUSH&&N!==Y.Z_FULL_FLUSH&&N!==Y.Z_FINISH&&N!==Y.Z_BLOCK)throw new Error("Invalid flush value");if(y==null)y=Buffer.alloc(0),p=0,m=0;if(this.strm.avail_in=p,this.strm.input=y,this.strm.next_in=m,this.strm.avail_out=s,this.strm.output=t,this.strm.next_out=u,this.flush=N,!B){if(this._process(),this._checkError())return this._afterSync();return}var W0=this;return process.nextTick(function(){W0._process(),W0._after()}),this},k.prototype._afterSync=function(){var B=this.strm.avail_out,N=this.strm.avail_in;return this.write_in_progress=!1,[N,B]},k.prototype._process=function(){var B=null;switch(this.mode){case Y.DEFLATE:case Y.GZIP:case Y.DEFLATERAW:this.err=b.deflate(this.strm,this.flush);break;case Y.UNZIP:if(this.strm.avail_in>0)B=this.strm.next_in;switch(this.gzip_id_bytes_read){case 0:if(B===null)break;if(this.strm.input[B]===w){if(this.gzip_id_bytes_read=1,B++,this.strm.avail_in===1)break}else{this.mode=Y.INFLATE;break}case 1:if(B===null)break;if(this.strm.input[B]===v)this.gzip_id_bytes_read=2,this.mode=Y.GUNZIP;else this.mode=Y.INFLATE;break;default:throw new Error("invalid number of gzip magic number bytes read")}case Y.INFLATE:case Y.GUNZIP:case Y.INFLATERAW:if(this.err=L.inflate(this.strm,this.flush),this.err===Y.Z_NEED_DICT&&this.dictionary){if(this.err=L.inflateSetDictionary(this.strm,this.dictionary),this.err===Y.Z_OK)this.err=L.inflate(this.strm,this.flush);else if(this.err===Y.Z_DATA_ERROR)this.err=Y.Z_NEED_DICT}while(this.strm.avail_in>0&&this.mode===Y.GUNZIP&&this.err===Y.Z_STREAM_END&&this.strm.next_in[0]!==0)this.reset(),this.err=L.inflate(this.strm,this.flush);break;default:throw new Error("Unknown mode "+this.mode)}},k.prototype._checkError=function(){switch(this.err){case Y.Z_OK:case Y.Z_BUF_ERROR:if(this.strm.avail_out!==0&&this.flush===Y.Z_FINISH)return this._error("unexpected end of file"),!1;break;case Y.Z_STREAM_END:break;case Y.Z_NEED_DICT:if(this.dictionary==null)this._error("Missing dictionary");else this._error("Bad dictionary");return!1;default:return this._error("Zlib error"),!1}return!0},k.prototype._after=function(){if(!this._checkError())return;var B=this.strm.avail_out,N=this.strm.avail_in;if(this.write_in_progress=!1,this.callback(N,B),this.pending_close)this.close()},k.prototype._error=function(B){if(this.strm.msg)B=this.strm.msg;if(this.onerror(B,this.err),this.write_in_progress=!1,this.pending_close)this.close()},k.prototype.init=function(B,N,y,m,p){R0(arguments.length===4||arguments.length===5,"init(windowBits, level, memLevel, strategy, [dictionary])"),R0(B>=8&&B<=15,"invalid windowBits"),R0(N>=-1&&N<=9,"invalid compression level"),R0(y>=1&&y<=9,"invalid memlevel"),R0(m===Y.Z_FILTERED||m===Y.Z_HUFFMAN_ONLY||m===Y.Z_RLE||m===Y.Z_FIXED||m===Y.Z_DEFAULT_STRATEGY,"invalid strategy"),this._init(N,B,y,m,p),this._setDictionary()},k.prototype.params=function(){throw new Error("deflateParams Not supported")},k.prototype.reset=function(){this._reset(),this._setDictionary()},k.prototype._init=function(B,N,y,m,p){if(this.level=B,this.windowBits=N,this.memLevel=y,this.strategy=m,this.flush=Y.Z_NO_FLUSH,this.err=Y.Z_OK,this.mode===Y.GZIP||this.mode===Y.GUNZIP)this.windowBits+=16;if(this.mode===Y.UNZIP)this.windowBits+=32;if(this.mode===Y.DEFLATERAW||this.mode===Y.INFLATERAW)this.windowBits=-1*this.windowBits;switch(this.strm=new g,this.mode){case Y.DEFLATE:case Y.GZIP:case Y.DEFLATERAW:this.err=b.deflateInit2(this.strm,this.level,Y.Z_DEFLATED,this.windowBits,this.memLevel,this.strategy);break;case Y.INFLATE:case Y.GUNZIP:case Y.INFLATERAW:case Y.UNZIP:this.err=L.inflateInit2(this.strm,this.windowBits);break;default:throw new Error("Unknown mode "+this.mode)}if(this.err!==Y.Z_OK)this._error("Init error");this.dictionary=p,this.write_in_progress=!1,this.init_done=!0},k.prototype._setDictionary=function(){if(this.dictionary==null)return;switch(this.err=Y.Z_OK,this.mode){case Y.DEFLATE:case Y.DEFLATERAW:this.err=b.deflateSetDictionary(this.strm,this.dictionary);break;default:break}if(this.err!==Y.Z_OK)this._error("Failed to set dictionary")},k.prototype._reset=function(){switch(this.err=Y.Z_OK,this.mode){case Y.DEFLATE:case Y.DEFLATERAW:case Y.GZIP:this.err=b.deflateReset(this.strm);break;case Y.INFLATE:case Y.INFLATERAW:case Y.GUNZIP:this.err=L.inflateReset(this.strm);break;default:break}if(this.err!==Y.Z_OK)this._error("Failed to reset stream")},Y.Zlib=k}}),c1=A0({"node_modules/browserify-zlib/lib/index.js"(Y){var g=o0.Buffer,b=s0.Transform,L=m1(),n=W1,C=t0.ok,w=o0.kMaxLength,v="Cannot create final Buffer. It would be larger than 0x"+w.toString(16)+" bytes";L.Z_MIN_WINDOWBITS=8,L.Z_MAX_WINDOWBITS=15,L.Z_DEFAULT_WINDOWBITS=15,L.Z_MIN_CHUNK=64,L.Z_MAX_CHUNK=Infinity,L.Z_DEFAULT_CHUNK=16384,L.Z_MIN_MEMLEVEL=1,L.Z_MAX_MEMLEVEL=9,L.Z_DEFAULT_MEMLEVEL=8,L.Z_MIN_LEVEL=-1,L.Z_MAX_LEVEL=9,L.Z_DEFAULT_LEVEL=L.Z_DEFAULT_COMPRESSION;var k=Object.keys(L);for(N=0;N<k.length;N++)if(B=k[N],B.match(/^Z/))Object.defineProperty(Y,B,{enumerable:!0,value:L[B],writable:!1});var B,N,y={Z_OK:L.Z_OK,Z_STREAM_END:L.Z_STREAM_END,Z_NEED_DICT:L.Z_NEED_DICT,Z_ERRNO:L.Z_ERRNO,Z_STREAM_ERROR:L.Z_STREAM_ERROR,Z_DATA_ERROR:L.Z_DATA_ERROR,Z_MEM_ERROR:L.Z_MEM_ERROR,Z_BUF_ERROR:L.Z_BUF_ERROR,Z_VERSION_ERROR:L.Z_VERSION_ERROR},m=Object.keys(y);for(t=0;t<m.length;t++)p=m[t],y[y[p]]=p;var p,t;Object.defineProperty(Y,"codes",{enumerable:!0,value:Object.freeze(y),writable:!1}),Y.constants=V1(),Y.Deflate=W0,Y.Inflate=E,Y.Gzip=S,Y.Gunzip=J0,Y.DeflateRaw=G0,Y.InflateRaw=F0,Y.Unzip=f,Y.createDeflate=function(j){return new W0(j)},Y.createInflate=function(j){return new E(j)},Y.createDeflateRaw=function(j){return new G0(j)},Y.createInflateRaw=function(j){return new F0(j)},Y.createGzip=function(j){return new S(j)},Y.createGunzip=function(j){return new J0(j)},Y.createUnzip=function(j){return new f(j)},Y.deflate=function(j,K,O){if(typeof K==="function")O=K,K={};return u(new W0(K),j,O)},Y.deflateSync=function(j,K){return s(new W0(K),j)},Y.gzip=function(j,K,O){if(typeof K==="function")O=K,K={};return u(new S(K),j,O)},Y.gzipSync=function(j,K){return s(new S(K),j)},Y.deflateRaw=function(j,K,O){if(typeof K==="function")O=K,K={};return u(new G0(K),j,O)},Y.deflateRawSync=function(j,K){return s(new G0(K),j)},Y.unzip=function(j,K,O){if(typeof K==="function")O=K,K={};return u(new f(K),j,O)},Y.unzipSync=function(j,K){return s(new f(K),j)},Y.inflate=function(j,K,O){if(typeof K==="function")O=K,K={};return u(new E(K),j,O)},Y.inflateSync=function(j,K){return s(new E(K),j)},Y.gunzip=function(j,K,O){if(typeof K==="function")O=K,K={};return u(new J0(K),j,O)},Y.gunzipSync=function(j,K){return s(new J0(K),j)},Y.inflateRaw=function(j,K,O){if(typeof K==="function")O=K,K={};return u(new F0(K),j,O)},Y.inflateRawSync=function(j,K){return s(new F0(K),j)};function u(j,K,O){var I=[],c=0;j.on("error",D),j.on("end",Q0),j.end(K),l();function l(){var i;while((i=j.read())!==null)I.push(i),c+=i.length;j.once("readable",l)}function D(i){j.removeListener("end",Q0),j.removeListener("readable",l),O(i)}function Q0(){var i,H0=null;if(c>=w)H0=new RangeError(v);else i=g.concat(I,c);I=[],j.close(),O(H0,i)}}function s(j,K){if(typeof K==="string")K=g.from(K);if(!g.isBuffer(K))throw new TypeError("Not a string or buffer");var O=j._finishFlushFlag;return j._processChunk(K,O)}function W0(j){if(!(this instanceof W0))return new W0(j);z.call(this,j,L.DEFLATE)}function E(j){if(!(this instanceof E))return new E(j);z.call(this,j,L.INFLATE)}function S(j){if(!(this instanceof S))return new S(j);z.call(this,j,L.GZIP)}function J0(j){if(!(this instanceof J0))return new J0(j);z.call(this,j,L.GUNZIP)}function G0(j){if(!(this instanceof G0))return new G0(j);z.call(this,j,L.DEFLATERAW)}function F0(j){if(!(this instanceof F0))return new F0(j);z.call(this,j,L.INFLATERAW)}function f(j){if(!(this instanceof f))return new f(j);z.call(this,j,L.UNZIP)}function d(j){return j===L.Z_NO_FLUSH||j===L.Z_PARTIAL_FLUSH||j===L.Z_SYNC_FLUSH||j===L.Z_FULL_FLUSH||j===L.Z_FINISH||j===L.Z_BLOCK}function z(j,K){var O=this;if(this._opts=j=j||{},this._chunkSize=j.chunkSize||Y.Z_DEFAULT_CHUNK,b.call(this,j),j.flush&&!d(j.flush))throw new Error("Invalid flush flag: "+j.flush);if(j.finishFlush&&!d(j.finishFlush))throw new Error("Invalid flush flag: "+j.finishFlush);if(this._flushFlag=j.flush||L.Z_NO_FLUSH,this._finishFlushFlag=typeof j.finishFlush!=="undefined"?j.finishFlush:L.Z_FINISH,j.chunkSize){if(j.chunkSize<Y.Z_MIN_CHUNK||j.chunkSize>Y.Z_MAX_CHUNK)throw new Error("Invalid chunk size: "+j.chunkSize)}if(j.windowBits){if(j.windowBits<Y.Z_MIN_WINDOWBITS||j.windowBits>Y.Z_MAX_WINDOWBITS)throw new Error("Invalid windowBits: "+j.windowBits)}if(j.level){if(j.level<Y.Z_MIN_LEVEL||j.level>Y.Z_MAX_LEVEL)throw new Error("Invalid compression level: "+j.level)}if(j.memLevel){if(j.memLevel<Y.Z_MIN_MEMLEVEL||j.memLevel>Y.Z_MAX_MEMLEVEL)throw new Error("Invalid memLevel: "+j.memLevel)}if(j.strategy){if(j.strategy!=Y.Z_FILTERED&&j.strategy!=Y.Z_HUFFMAN_ONLY&&j.strategy!=Y.Z_RLE&&j.strategy!=Y.Z_FIXED&&j.strategy!=Y.Z_DEFAULT_STRATEGY)throw new Error("Invalid strategy: "+j.strategy)}if(j.dictionary){if(!g.isBuffer(j.dictionary))throw new Error("Invalid dictionary: it should be a Buffer instance")}this._handle=new L.Zlib(K);var I=this;this._hadError=!1,this._handle.onerror=function(D,Q0){h(I),I._hadError=!0;var i=new Error(D);i.errno=Q0,i.code=Y.codes[Q0],I.emit("error",i)};var c=Y.Z_DEFAULT_COMPRESSION;if(typeof j.level==="number")c=j.level;var l=Y.Z_DEFAULT_STRATEGY;if(typeof j.strategy==="number")l=j.strategy;this._handle.init(j.windowBits||Y.Z_DEFAULT_WINDOWBITS,c,j.memLevel||Y.Z_DEFAULT_MEMLEVEL,l,j.dictionary),this._buffer=g.allocUnsafe(this._chunkSize),this._offset=0,this._level=c,this._strategy=l,this.once("end",this.close),Object.defineProperty(this,"_closed",{get:function(){return!O._handle},configurable:!0,enumerable:!0})}n.inherits(z,b),z.prototype.params=function(j,K,O){if(j<Y.Z_MIN_LEVEL||j>Y.Z_MAX_LEVEL)throw new RangeError("Invalid compression level: "+j);if(K!=Y.Z_FILTERED&&K!=Y.Z_HUFFMAN_ONLY&&K!=Y.Z_RLE&&K!=Y.Z_FIXED&&K!=Y.Z_DEFAULT_STRATEGY)throw new TypeError("Invalid strategy: "+K);if(this._level!==j||this._strategy!==K){var I=this;this.flush(L.Z_SYNC_FLUSH,function(){if(C(I._handle,"zlib binding closed"),I._handle.params(j,K),!I._hadError){if(I._level=j,I._strategy=K,O)O()}})}else process.nextTick(O)},z.prototype.reset=function(){return C(this._handle,"zlib binding closed"),this._handle.reset()},z.prototype._flush=function(j){this._transform(g.alloc(0),"",j)},z.prototype.flush=function(j,K){var O=this,I=this._writableState;if(typeof j==="function"||j===void 0&&!K)K=j,j=L.Z_FULL_FLUSH;if(I.ended){if(K)process.nextTick(K)}else if(I.ending){if(K)this.once("end",K)}else if(I.needDrain){if(K)this.once("drain",function(){return O.flush(j,K)})}else this._flushFlag=j,this.write(g.alloc(0),"",K)},z.prototype.close=function(j){h(this,j),process.nextTick(V0,this)};function h(j,K){if(K)process.nextTick(K);if(!j._handle)return;j._handle.close(),j._handle=null}function V0(j){j.emit("close")}z.prototype._transform=function(j,K,O){var I,c=this._writableState,l=c.ending||c.ended,D=l&&(!j||c.length===j.length);if(j!==null&&!g.isBuffer(j))return O(new Error("invalid input"));if(!this._handle)return O(new Error("zlib binding closed"));if(D)I=this._finishFlushFlag;else if(I=this._flushFlag,j.length>=c.length)this._flushFlag=this._opts.flush||L.Z_NO_FLUSH;this._processChunk(j,I,O)},z.prototype._processChunk=function(j,K,O){var I=j&&j.length,c=this._chunkSize-this._offset,l=0,D=this,Q0=typeof O==="function";if(!Q0){var i=[],H0=0,N0;this.on("error",function(a){N0=a}),C(this._handle,"zlib binding closed");do var I0=this._handle.writeSync(K,j,l,I,this._buffer,this._offset,c);while(!this._hadError&&U0(I0[0],I0[1]));if(this._hadError)throw N0;if(H0>=w)throw h(this),new RangeError(v);var K0=g.concat(i,H0);return h(this),K0}C(this._handle,"zlib binding closed");var X0=this._handle.write(K,j,l,I,this._buffer,this._offset,c);X0.buffer=j,X0.callback=U0;function U0(a,Y0){if(this)this.buffer=null,this.callback=null;if(D._hadError)return;var r=c-Y0;if(C(r>=0,"have should not go down"),r>0){var z0=D._buffer.slice(D._offset,D._offset+r);if(D._offset+=r,Q0)D.push(z0);else i.push(z0),H0+=z0.length}if(Y0===0||D._offset>=D._chunkSize)c=D._chunkSize,D._offset=0,D._buffer=g.allocUnsafe(D._chunkSize);if(Y0===0){if(l+=I-a,I=a,!Q0)return!0;var Z0=D._handle.write(K,j,l,I,D._buffer,D._offset,D._chunkSize);Z0.callback=U0,Z0.buffer=j;return}if(!Q0)return!1;O()}},n.inherits(W0,z),n.inherits(E,z),n.inherits(S,z),n.inherits(J0,z),n.inherits(G0,z),n.inherits(F0,z),n.inherits(f,z)}}),$0=c1();$0[Symbol.for("CommonJS")]=0;var _1=$0;j1=$0.Deflate;J1=$0.Inflate;Y1=$0.Gzip;G1=$0.Gunzip;q1=$0.DeflateRaw;X1=$0.InflateRaw;U1=$0.Unzip;P1=$0.createDeflate;K1=$0.createInflate;F1=$0.createDeflateRaw;H1=$0.createInflateRaw;z1=$0.createGzip;Z1=$0.createGunzip;L1=$0.createUnzip;C1=$0.deflate;N1=$0.deflateSync;I1=$0.gzip;O1=$0.gzipSync;B1=$0.deflateRaw;D1=$0.deflateRawSync;M1=$0.unzip;k1=$0.unzipSync;v1=$0.inflate;R1=$0.inflateSync;A1=$0.gunzip;g1=$0.gunzipSync;w1=$0.inflateRaw;T1=$0.inflateRawSync;S1=$0.constants;export{k1 as unzipSync,M1 as unzip,R1 as inflateSync,T1 as inflateRawSync,w1 as inflateRaw,v1 as inflate,O1 as gzipSync,I1 as gzip,g1 as gunzipSync,A1 as gunzip,N1 as deflateSync,D1 as deflateRawSync,B1 as deflateRaw,C1 as deflate,_1 as default,L1 as createUnzip,H1 as createInflateRaw,K1 as createInflate,z1 as createGzip,Z1 as createGunzip,F1 as createDeflateRaw,P1 as createDeflate,S1 as constants,U1 as Unzip,X1 as InflateRaw,J1 as Inflate,Y1 as Gzip,G1 as Gunzip,q1 as DeflateRaw,j1 as Deflate}; +var p1=(Y)=>{return import.meta.require(Y)};import{default as R0} from"node:assert";import*as t0 from"node:assert";import*as o0 from"node:buffer";import*as s0 from"node:stream";import*as W1 from"node:util";var j1,J1,Y1,G1,q1,X1,U1,P1,K1,F1,H1,z1,Z1,L1,C1,N1,I1,O1,B1,D1,M1,k1,v1,R1,A1,g1,w1,T1,S1;var y1=Object.getOwnPropertyNames;var A0=(Y,g)=>function b(){return g||(0,Y[y1(Y)[0]])((g={exports:{}}).exports,g),g.exports};var E1=A0({"node_modules/pako/lib/zlib/zstream.js"(Y,g){function b(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}g.exports=b}}),r0=A0({"node_modules/pako/lib/utils/common.js"(Y){var g=typeof Uint8Array!=="undefined"&&typeof Uint16Array!=="undefined"&&typeof Int32Array!=="undefined";function b(C,w){return Object.prototype.hasOwnProperty.call(C,w)}Y.assign=function(C){var w=Array.prototype.slice.call(arguments,1);while(w.length){var v=w.shift();if(!v)continue;if(typeof v!=="object")throw new TypeError(v+"must be non-object");for(var k in v)if(b(v,k))C[k]=v[k]}return C},Y.shrinkBuf=function(C,w){if(C.length===w)return C;if(C.subarray)return C.subarray(0,w);return C.length=w,C};var L={arraySet:function(C,w,v,k,B){if(w.subarray&&C.subarray){C.set(w.subarray(v,v+k),B);return}for(var N=0;N<k;N++)C[B+N]=w[v+N]},flattenChunks:function(C){var w,v,k,B,N,y;k=0;for(w=0,v=C.length;w<v;w++)k+=C[w].length;y=new Uint8Array(k),B=0;for(w=0,v=C.length;w<v;w++)N=C[w],y.set(N,B),B+=N.length;return y}},n={arraySet:function(C,w,v,k,B){for(var N=0;N<k;N++)C[B+N]=w[v+N]},flattenChunks:function(C){return[].concat.apply([],C)}};Y.setTyped=function(C){if(C)Y.Buf8=Uint8Array,Y.Buf16=Uint16Array,Y.Buf32=Int32Array,Y.assign(Y,L);else Y.Buf8=Array,Y.Buf16=Array,Y.Buf32=Array,Y.assign(Y,n)},Y.setTyped(g)}}),x1=A0({"node_modules/pako/lib/zlib/trees.js"(Y){var g=r0(),b=4,L=0,n=1,C=2;function w(W){var F=W.length;while(--F>=0)W[F]=0}var v=0,k=1,B=2,N=3,y=258,m=29,p=256,t=p+1+m,u=30,s=19,W0=2*t+1,E=15,S=16,J0=7,G0=256,F0=16,f=17,d=18,z=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],h=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],V0=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],j=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],K=512,O=new Array((t+2)*2);w(O);var I=new Array(u*2);w(I);var c=new Array(K);w(c);var l=new Array(y-N+1);w(l);var D=new Array(m);w(D);var Q0=new Array(u);w(Q0);function i(W,F,Z,R,G){this.static_tree=W,this.extra_bits=F,this.extra_base=Z,this.elems=R,this.max_length=G,this.has_stree=W&&W.length}var H0,N0,I0;function K0(W,F){this.dyn_tree=W,this.max_code=0,this.stat_desc=F}function X0(W){return W<256?c[W]:c[256+(W>>>7)]}function U0(W,F){W.pending_buf[W.pending++]=F&255,W.pending_buf[W.pending++]=F>>>8&255}function a(W,F,Z){if(W.bi_valid>S-Z)W.bi_buf|=F<<W.bi_valid&65535,U0(W,W.bi_buf),W.bi_buf=F>>S-W.bi_valid,W.bi_valid+=Z-S;else W.bi_buf|=F<<W.bi_valid&65535,W.bi_valid+=Z}function Y0(W,F,Z){a(W,Z[F*2],Z[F*2+1])}function r(W,F){var Z=0;do Z|=W&1,W>>>=1,Z<<=1;while(--F>0);return Z>>>1}function z0(W){if(W.bi_valid===16)U0(W,W.bi_buf),W.bi_buf=0,W.bi_valid=0;else if(W.bi_valid>=8)W.pending_buf[W.pending++]=W.bi_buf&255,W.bi_buf>>=8,W.bi_valid-=8}function Z0(W,F){var{dyn_tree:Z,max_code:R}=F,G=F.stat_desc.static_tree,P=F.stat_desc.has_stree,$=F.stat_desc.extra_bits,H=F.stat_desc.extra_base,x=F.stat_desc.max_length,Q,X,U,V,J,q,T=0;for(V=0;V<=E;V++)W.bl_count[V]=0;Z[W.heap[W.heap_max]*2+1]=0;for(Q=W.heap_max+1;Q<W0;Q++){if(X=W.heap[Q],V=Z[Z[X*2+1]*2+1]+1,V>x)V=x,T++;if(Z[X*2+1]=V,X>R)continue;if(W.bl_count[V]++,J=0,X>=H)J=$[X-H];if(q=Z[X*2],W.opt_len+=q*(V+J),P)W.static_len+=q*(G[X*2+1]+J)}if(T===0)return;do{V=x-1;while(W.bl_count[V]===0)V--;W.bl_count[V]--,W.bl_count[V+1]+=2,W.bl_count[x]--,T-=2}while(T>0);for(V=x;V!==0;V--){X=W.bl_count[V];while(X!==0){if(U=W.heap[--Q],U>R)continue;if(Z[U*2+1]!==V)W.opt_len+=(V-Z[U*2+1])*Z[U*2],Z[U*2+1]=V;X--}}}function g0(W,F,Z){var R=new Array(E+1),G=0,P,$;for(P=1;P<=E;P++)R[P]=G=G+Z[P-1]<<1;for($=0;$<=F;$++){var H=W[$*2+1];if(H===0)continue;W[$*2]=r(R[H]++,H)}}function j0(){var W,F,Z,R,G,P=new Array(E+1);Z=0;for(R=0;R<m-1;R++){D[R]=Z;for(W=0;W<1<<z[R];W++)l[Z++]=R}l[Z-1]=R,G=0;for(R=0;R<16;R++){Q0[R]=G;for(W=0;W<1<<h[R];W++)c[G++]=R}G>>=7;for(;R<u;R++){Q0[R]=G<<7;for(W=0;W<1<<h[R]-7;W++)c[256+G++]=R}for(F=0;F<=E;F++)P[F]=0;W=0;while(W<=143)O[W*2+1]=8,W++,P[8]++;while(W<=255)O[W*2+1]=9,W++,P[9]++;while(W<=279)O[W*2+1]=7,W++,P[7]++;while(W<=287)O[W*2+1]=8,W++,P[8]++;g0(O,t+1,P);for(W=0;W<u;W++)I[W*2+1]=5,I[W*2]=r(W,5);H0=new i(O,z,p+1,t,E),N0=new i(I,h,0,u,E),I0=new i(new Array(0),V0,0,s,J0)}function M0(W){var F;for(F=0;F<t;F++)W.dyn_ltree[F*2]=0;for(F=0;F<u;F++)W.dyn_dtree[F*2]=0;for(F=0;F<s;F++)W.bl_tree[F*2]=0;W.dyn_ltree[G0*2]=1,W.opt_len=W.static_len=0,W.last_lit=W.matches=0}function c0(W){if(W.bi_valid>8)U0(W,W.bi_buf);else if(W.bi_valid>0)W.pending_buf[W.pending++]=W.bi_buf;W.bi_buf=0,W.bi_valid=0}function w0(W,F,Z,R){if(c0(W),R)U0(W,Z),U0(W,~Z);g.arraySet(W.pending_buf,W.window,F,Z,W.pending),W.pending+=Z}function v0(W,F,Z,R){var G=F*2,P=Z*2;return W[G]<W[P]||W[G]===W[P]&&R[F]<=R[Z]}function q0(W,F,Z){var R=W.heap[Z],G=Z<<1;while(G<=W.heap_len){if(G<W.heap_len&&v0(F,W.heap[G+1],W.heap[G],W.depth))G++;if(v0(F,R,W.heap[G],W.depth))break;W.heap[Z]=W.heap[G],Z=G,G<<=1}W.heap[Z]=R}function _(W,F,Z){var R,G,P=0,$,H;if(W.last_lit!==0)do if(R=W.pending_buf[W.d_buf+P*2]<<8|W.pending_buf[W.d_buf+P*2+1],G=W.pending_buf[W.l_buf+P],P++,R===0)Y0(W,G,F);else{if($=l[G],Y0(W,$+p+1,F),H=z[$],H!==0)G-=D[$],a(W,G,H);if(R--,$=X0(R),Y0(W,$,Z),H=h[$],H!==0)R-=Q0[$],a(W,R,H)}while(P<W.last_lit);Y0(W,G0,F)}function T0(W,F){var Z=F.dyn_tree,R=F.stat_desc.static_tree,G=F.stat_desc.has_stree,P=F.stat_desc.elems,$,H,x=-1,Q;W.heap_len=0,W.heap_max=W0;for($=0;$<P;$++)if(Z[$*2]!==0)W.heap[++W.heap_len]=x=$,W.depth[$]=0;else Z[$*2+1]=0;while(W.heap_len<2)if(Q=W.heap[++W.heap_len]=x<2?++x:0,Z[Q*2]=1,W.depth[Q]=0,W.opt_len--,G)W.static_len-=R[Q*2+1];F.max_code=x;for($=W.heap_len>>1;$>=1;$--)q0(W,Z,$);Q=P;do $=W.heap[1],W.heap[1]=W.heap[W.heap_len--],q0(W,Z,1),H=W.heap[1],W.heap[--W.heap_max]=$,W.heap[--W.heap_max]=H,Z[Q*2]=Z[$*2]+Z[H*2],W.depth[Q]=(W.depth[$]>=W.depth[H]?W.depth[$]:W.depth[H])+1,Z[$*2+1]=Z[H*2+1]=Q,W.heap[1]=Q++,q0(W,Z,1);while(W.heap_len>=2);W.heap[--W.heap_max]=W.heap[1],Z0(W,F),g0(Z,x,W.bl_count)}function p0(W,F,Z){var R,G=-1,P,$=F[1],H=0,x=7,Q=4;if($===0)x=138,Q=3;F[(Z+1)*2+1]=65535;for(R=0;R<=Z;R++){if(P=$,$=F[(R+1)*2+1],++H<x&&P===$)continue;else if(H<Q)W.bl_tree[P*2]+=H;else if(P!==0){if(P!==G)W.bl_tree[P*2]++;W.bl_tree[F0*2]++}else if(H<=10)W.bl_tree[f*2]++;else W.bl_tree[d*2]++;if(H=0,G=P,$===0)x=138,Q=3;else if(P===$)x=6,Q=3;else x=7,Q=4}}function b0(W,F,Z){var R,G=-1,P,$=F[1],H=0,x=7,Q=4;if($===0)x=138,Q=3;for(R=0;R<=Z;R++){if(P=$,$=F[(R+1)*2+1],++H<x&&P===$)continue;else if(H<Q)do Y0(W,P,W.bl_tree);while(--H!==0);else if(P!==0){if(P!==G)Y0(W,P,W.bl_tree),H--;Y0(W,F0,W.bl_tree),a(W,H-3,2)}else if(H<=10)Y0(W,f,W.bl_tree),a(W,H-3,3);else Y0(W,d,W.bl_tree),a(W,H-11,7);if(H=0,G=P,$===0)x=138,Q=3;else if(P===$)x=6,Q=3;else x=7,Q=4}}function S0(W){var F;p0(W,W.dyn_ltree,W.l_desc.max_code),p0(W,W.dyn_dtree,W.d_desc.max_code),T0(W,W.bl_desc);for(F=s-1;F>=3;F--)if(W.bl_tree[j[F]*2+1]!==0)break;return W.opt_len+=3*(F+1)+5+5+4,F}function i0(W,F,Z,R){var G;a(W,F-257,5),a(W,Z-1,5),a(W,R-4,4);for(G=0;G<R;G++)a(W,W.bl_tree[j[G]*2+1],3);b0(W,W.dyn_ltree,F-1),b0(W,W.dyn_dtree,Z-1)}function d0(W){var F=4093624447,Z;for(Z=0;Z<=31;Z++,F>>>=1)if(F&1&&W.dyn_ltree[Z*2]!==0)return L;if(W.dyn_ltree[18]!==0||W.dyn_ltree[20]!==0||W.dyn_ltree[26]!==0)return n;for(Z=32;Z<p;Z++)if(W.dyn_ltree[Z*2]!==0)return n;return L}var E0=!1;function _0(W){if(!E0)j0(),E0=!0;W.l_desc=new K0(W.dyn_ltree,H0),W.d_desc=new K0(W.dyn_dtree,N0),W.bl_desc=new K0(W.bl_tree,I0),W.bi_buf=0,W.bi_valid=0,M0(W)}function m0(W,F,Z,R){a(W,(v<<1)+(R?1:0),3),w0(W,F,Z,!0)}function B0(W){a(W,k<<1,3),Y0(W,G0,O),z0(W)}function h0(W,F,Z,R){var G,P,$=0;if(W.level>0){if(W.strm.data_type===C)W.strm.data_type=d0(W);if(T0(W,W.l_desc),T0(W,W.d_desc),$=S0(W),G=W.opt_len+3+7>>>3,P=W.static_len+3+7>>>3,P<=G)G=P}else G=P=Z+5;if(Z+4<=G&&F!==-1)m0(W,F,Z,R);else if(W.strategy===b||P===G)a(W,(k<<1)+(R?1:0),3),_(W,O,I);else a(W,(B<<1)+(R?1:0),3),i0(W,W.l_desc.max_code+1,W.d_desc.max_code+1,$+1),_(W,W.dyn_ltree,W.dyn_dtree);if(M0(W),R)c0(W)}function n0(W,F,Z){if(W.pending_buf[W.d_buf+W.last_lit*2]=F>>>8&255,W.pending_buf[W.d_buf+W.last_lit*2+1]=F&255,W.pending_buf[W.l_buf+W.last_lit]=Z&255,W.last_lit++,F===0)W.dyn_ltree[Z*2]++;else W.matches++,F--,W.dyn_ltree[(l[Z]+p+1)*2]++,W.dyn_dtree[X0(F)*2]++;return W.last_lit===W.lit_bufsize-1}Y._tr_init=_0,Y._tr_stored_block=m0,Y._tr_flush_block=h0,Y._tr_tally=n0,Y._tr_align=B0}}),Q1=A0({"node_modules/pako/lib/zlib/adler32.js"(Y,g){function b(L,n,C,w){var v=L&65535|0,k=L>>>16&65535|0,B=0;while(C!==0){B=C>2000?2000:C,C-=B;do v=v+n[w++]|0,k=k+v|0;while(--B);v%=65521,k%=65521}return v|k<<16|0}g.exports=b}}),$1=A0({"node_modules/pako/lib/zlib/crc32.js"(Y,g){function b(){var C,w=[];for(var v=0;v<256;v++){C=v;for(var k=0;k<8;k++)C=C&1?3988292384^C>>>1:C>>>1;w[v]=C}return w}var L=b();function n(C,w,v,k){var B=L,N=k+v;C^=-1;for(var y=k;y<N;y++)C=C>>>8^B[(C^w[y])&255];return C^-1}g.exports=n}}),h1=A0({"node_modules/pako/lib/zlib/messages.js"(Y,g){g.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}}}),f1=A0({"node_modules/pako/lib/zlib/deflate.js"(Y){var g=r0(),b=x1(),L=Q1(),n=$1(),C=h1(),w=0,v=1,k=3,B=4,N=5,y=0,m=1,p=-2,t=-3,u=-5,s=-1,W0=1,E=2,S=3,J0=4,G0=0,F0=2,f=8,d=9,z=15,h=8,V0=29,j=256,K=j+1+V0,O=30,I=19,c=2*K+1,l=15,D=3,Q0=258,i=Q0+D+1,H0=32,N0=42,I0=69,K0=73,X0=91,U0=103,a=113,Y0=666,r=1,z0=2,Z0=3,g0=4,j0=3;function M0(Q,X){return Q.msg=C[X],X}function c0(Q){return(Q<<1)-(Q>4?9:0)}function w0(Q){var X=Q.length;while(--X>=0)Q[X]=0}function v0(Q){var X=Q.state,U=X.pending;if(U>Q.avail_out)U=Q.avail_out;if(U===0)return;if(g.arraySet(Q.output,X.pending_buf,X.pending_out,U,Q.next_out),Q.next_out+=U,X.pending_out+=U,Q.total_out+=U,Q.avail_out-=U,X.pending-=U,X.pending===0)X.pending_out=0}function q0(Q,X){b._tr_flush_block(Q,Q.block_start>=0?Q.block_start:-1,Q.strstart-Q.block_start,X),Q.block_start=Q.strstart,v0(Q.strm)}function _(Q,X){Q.pending_buf[Q.pending++]=X}function T0(Q,X){Q.pending_buf[Q.pending++]=X>>>8&255,Q.pending_buf[Q.pending++]=X&255}function p0(Q,X,U,V){var J=Q.avail_in;if(J>V)J=V;if(J===0)return 0;if(Q.avail_in-=J,g.arraySet(X,Q.input,Q.next_in,J,U),Q.state.wrap===1)Q.adler=L(Q.adler,X,J,U);else if(Q.state.wrap===2)Q.adler=n(Q.adler,X,J,U);return Q.next_in+=J,Q.total_in+=J,J}function b0(Q,X){var{max_chain_length:U,strstart:V}=Q,J,q,T=Q.prev_length,M=Q.nice_match,A=Q.strstart>Q.w_size-i?Q.strstart-(Q.w_size-i):0,o=Q.window,f0=Q.w_mask,P0=Q.prev,e=Q.strstart+Q0,C0=o[V+T-1],D0=o[V+T];if(Q.prev_length>=Q.good_match)U>>=2;if(M>Q.lookahead)M=Q.lookahead;do{if(J=X,o[J+T]!==D0||o[J+T-1]!==C0||o[J]!==o[V]||o[++J]!==o[V+1])continue;V+=2,J++;do;while(o[++V]===o[++J]&&o[++V]===o[++J]&&o[++V]===o[++J]&&o[++V]===o[++J]&&o[++V]===o[++J]&&o[++V]===o[++J]&&o[++V]===o[++J]&&o[++V]===o[++J]&&V<e);if(q=Q0-(e-V),V=e-Q0,q>T){if(Q.match_start=X,T=q,q>=M)break;C0=o[V+T-1],D0=o[V+T]}}while((X=P0[X&f0])>A&&--U!==0);if(T<=Q.lookahead)return T;return Q.lookahead}function S0(Q){var X=Q.w_size,U,V,J,q,T;do{if(q=Q.window_size-Q.lookahead-Q.strstart,Q.strstart>=X+(X-i)){g.arraySet(Q.window,Q.window,X,X,0),Q.match_start-=X,Q.strstart-=X,Q.block_start-=X,V=Q.hash_size,U=V;do J=Q.head[--U],Q.head[U]=J>=X?J-X:0;while(--V);V=X,U=V;do J=Q.prev[--U],Q.prev[U]=J>=X?J-X:0;while(--V);q+=X}if(Q.strm.avail_in===0)break;if(V=p0(Q.strm,Q.window,Q.strstart+Q.lookahead,q),Q.lookahead+=V,Q.lookahead+Q.insert>=D){T=Q.strstart-Q.insert,Q.ins_h=Q.window[T],Q.ins_h=(Q.ins_h<<Q.hash_shift^Q.window[T+1])&Q.hash_mask;while(Q.insert)if(Q.ins_h=(Q.ins_h<<Q.hash_shift^Q.window[T+D-1])&Q.hash_mask,Q.prev[T&Q.w_mask]=Q.head[Q.ins_h],Q.head[Q.ins_h]=T,T++,Q.insert--,Q.lookahead+Q.insert<D)break}}while(Q.lookahead<i&&Q.strm.avail_in!==0)}function i0(Q,X){var U=65535;if(U>Q.pending_buf_size-5)U=Q.pending_buf_size-5;for(;;){if(Q.lookahead<=1){if(S0(Q),Q.lookahead===0&&X===w)return r;if(Q.lookahead===0)break}Q.strstart+=Q.lookahead,Q.lookahead=0;var V=Q.block_start+U;if(Q.strstart===0||Q.strstart>=V){if(Q.lookahead=Q.strstart-V,Q.strstart=V,q0(Q,!1),Q.strm.avail_out===0)return r}if(Q.strstart-Q.block_start>=Q.w_size-i){if(q0(Q,!1),Q.strm.avail_out===0)return r}}if(Q.insert=0,X===B){if(q0(Q,!0),Q.strm.avail_out===0)return Z0;return g0}if(Q.strstart>Q.block_start){if(q0(Q,!1),Q.strm.avail_out===0)return r}return r}function d0(Q,X){var U,V;for(;;){if(Q.lookahead<i){if(S0(Q),Q.lookahead<i&&X===w)return r;if(Q.lookahead===0)break}if(U=0,Q.lookahead>=D)Q.ins_h=(Q.ins_h<<Q.hash_shift^Q.window[Q.strstart+D-1])&Q.hash_mask,U=Q.prev[Q.strstart&Q.w_mask]=Q.head[Q.ins_h],Q.head[Q.ins_h]=Q.strstart;if(U!==0&&Q.strstart-U<=Q.w_size-i)Q.match_length=b0(Q,U);if(Q.match_length>=D)if(V=b._tr_tally(Q,Q.strstart-Q.match_start,Q.match_length-D),Q.lookahead-=Q.match_length,Q.match_length<=Q.max_lazy_match&&Q.lookahead>=D){Q.match_length--;do Q.strstart++,Q.ins_h=(Q.ins_h<<Q.hash_shift^Q.window[Q.strstart+D-1])&Q.hash_mask,U=Q.prev[Q.strstart&Q.w_mask]=Q.head[Q.ins_h],Q.head[Q.ins_h]=Q.strstart;while(--Q.match_length!==0);Q.strstart++}else Q.strstart+=Q.match_length,Q.match_length=0,Q.ins_h=Q.window[Q.strstart],Q.ins_h=(Q.ins_h<<Q.hash_shift^Q.window[Q.strstart+1])&Q.hash_mask;else V=b._tr_tally(Q,0,Q.window[Q.strstart]),Q.lookahead--,Q.strstart++;if(V){if(q0(Q,!1),Q.strm.avail_out===0)return r}}if(Q.insert=Q.strstart<D-1?Q.strstart:D-1,X===B){if(q0(Q,!0),Q.strm.avail_out===0)return Z0;return g0}if(Q.last_lit){if(q0(Q,!1),Q.strm.avail_out===0)return r}return z0}function E0(Q,X){var U,V,J;for(;;){if(Q.lookahead<i){if(S0(Q),Q.lookahead<i&&X===w)return r;if(Q.lookahead===0)break}if(U=0,Q.lookahead>=D)Q.ins_h=(Q.ins_h<<Q.hash_shift^Q.window[Q.strstart+D-1])&Q.hash_mask,U=Q.prev[Q.strstart&Q.w_mask]=Q.head[Q.ins_h],Q.head[Q.ins_h]=Q.strstart;if(Q.prev_length=Q.match_length,Q.prev_match=Q.match_start,Q.match_length=D-1,U!==0&&Q.prev_length<Q.max_lazy_match&&Q.strstart-U<=Q.w_size-i){if(Q.match_length=b0(Q,U),Q.match_length<=5&&(Q.strategy===W0||Q.match_length===D&&Q.strstart-Q.match_start>4096))Q.match_length=D-1}if(Q.prev_length>=D&&Q.match_length<=Q.prev_length){J=Q.strstart+Q.lookahead-D,V=b._tr_tally(Q,Q.strstart-1-Q.prev_match,Q.prev_length-D),Q.lookahead-=Q.prev_length-1,Q.prev_length-=2;do if(++Q.strstart<=J)Q.ins_h=(Q.ins_h<<Q.hash_shift^Q.window[Q.strstart+D-1])&Q.hash_mask,U=Q.prev[Q.strstart&Q.w_mask]=Q.head[Q.ins_h],Q.head[Q.ins_h]=Q.strstart;while(--Q.prev_length!==0);if(Q.match_available=0,Q.match_length=D-1,Q.strstart++,V){if(q0(Q,!1),Q.strm.avail_out===0)return r}}else if(Q.match_available){if(V=b._tr_tally(Q,0,Q.window[Q.strstart-1]),V)q0(Q,!1);if(Q.strstart++,Q.lookahead--,Q.strm.avail_out===0)return r}else Q.match_available=1,Q.strstart++,Q.lookahead--}if(Q.match_available)V=b._tr_tally(Q,0,Q.window[Q.strstart-1]),Q.match_available=0;if(Q.insert=Q.strstart<D-1?Q.strstart:D-1,X===B){if(q0(Q,!0),Q.strm.avail_out===0)return Z0;return g0}if(Q.last_lit){if(q0(Q,!1),Q.strm.avail_out===0)return r}return z0}function _0(Q,X){var U,V,J,q,T=Q.window;for(;;){if(Q.lookahead<=Q0){if(S0(Q),Q.lookahead<=Q0&&X===w)return r;if(Q.lookahead===0)break}if(Q.match_length=0,Q.lookahead>=D&&Q.strstart>0){if(J=Q.strstart-1,V=T[J],V===T[++J]&&V===T[++J]&&V===T[++J]){q=Q.strstart+Q0;do;while(V===T[++J]&&V===T[++J]&&V===T[++J]&&V===T[++J]&&V===T[++J]&&V===T[++J]&&V===T[++J]&&V===T[++J]&&J<q);if(Q.match_length=Q0-(q-J),Q.match_length>Q.lookahead)Q.match_length=Q.lookahead}}if(Q.match_length>=D)U=b._tr_tally(Q,1,Q.match_length-D),Q.lookahead-=Q.match_length,Q.strstart+=Q.match_length,Q.match_length=0;else U=b._tr_tally(Q,0,Q.window[Q.strstart]),Q.lookahead--,Q.strstart++;if(U){if(q0(Q,!1),Q.strm.avail_out===0)return r}}if(Q.insert=0,X===B){if(q0(Q,!0),Q.strm.avail_out===0)return Z0;return g0}if(Q.last_lit){if(q0(Q,!1),Q.strm.avail_out===0)return r}return z0}function m0(Q,X){var U;for(;;){if(Q.lookahead===0){if(S0(Q),Q.lookahead===0){if(X===w)return r;break}}if(Q.match_length=0,U=b._tr_tally(Q,0,Q.window[Q.strstart]),Q.lookahead--,Q.strstart++,U){if(q0(Q,!1),Q.strm.avail_out===0)return r}}if(Q.insert=0,X===B){if(q0(Q,!0),Q.strm.avail_out===0)return Z0;return g0}if(Q.last_lit){if(q0(Q,!1),Q.strm.avail_out===0)return r}return z0}function B0(Q,X,U,V,J){this.good_length=Q,this.max_lazy=X,this.nice_length=U,this.max_chain=V,this.func=J}var h0=[new B0(0,0,0,0,i0),new B0(4,4,8,4,d0),new B0(4,5,16,8,d0),new B0(4,6,32,32,d0),new B0(4,4,16,16,E0),new B0(8,16,32,32,E0),new B0(8,16,128,128,E0),new B0(8,32,128,256,E0),new B0(32,128,258,1024,E0),new B0(32,258,258,4096,E0)];function n0(Q){Q.window_size=2*Q.w_size,w0(Q.head),Q.max_lazy_match=h0[Q.level].max_lazy,Q.good_match=h0[Q.level].good_length,Q.nice_match=h0[Q.level].nice_length,Q.max_chain_length=h0[Q.level].max_chain,Q.strstart=0,Q.block_start=0,Q.lookahead=0,Q.insert=0,Q.match_length=Q.prev_length=D-1,Q.match_available=0,Q.ins_h=0}function W(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=f,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new g.Buf16(c*2),this.dyn_dtree=new g.Buf16((2*O+1)*2),this.bl_tree=new g.Buf16((2*I+1)*2),w0(this.dyn_ltree),w0(this.dyn_dtree),w0(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new g.Buf16(l+1),this.heap=new g.Buf16(2*K+1),w0(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new g.Buf16(2*K+1),w0(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function F(Q){var X;if(!Q||!Q.state)return M0(Q,p);if(Q.total_in=Q.total_out=0,Q.data_type=F0,X=Q.state,X.pending=0,X.pending_out=0,X.wrap<0)X.wrap=-X.wrap;return X.status=X.wrap?N0:a,Q.adler=X.wrap===2?0:1,X.last_flush=w,b._tr_init(X),y}function Z(Q){var X=F(Q);if(X===y)n0(Q.state);return X}function R(Q,X){if(!Q||!Q.state)return p;if(Q.state.wrap!==2)return p;return Q.state.gzhead=X,y}function G(Q,X,U,V,J,q){if(!Q)return p;var T=1;if(X===s)X=6;if(V<0)T=0,V=-V;else if(V>15)T=2,V-=16;if(J<1||J>d||U!==f||V<8||V>15||X<0||X>9||q<0||q>J0)return M0(Q,p);if(V===8)V=9;var M=new W;return Q.state=M,M.strm=Q,M.wrap=T,M.gzhead=null,M.w_bits=V,M.w_size=1<<M.w_bits,M.w_mask=M.w_size-1,M.hash_bits=J+7,M.hash_size=1<<M.hash_bits,M.hash_mask=M.hash_size-1,M.hash_shift=~~((M.hash_bits+D-1)/D),M.window=new g.Buf8(M.w_size*2),M.head=new g.Buf16(M.hash_size),M.prev=new g.Buf16(M.w_size),M.lit_bufsize=1<<J+6,M.pending_buf_size=M.lit_bufsize*4,M.pending_buf=new g.Buf8(M.pending_buf_size),M.d_buf=1*M.lit_bufsize,M.l_buf=3*M.lit_bufsize,M.level=X,M.strategy=q,M.method=U,Z(Q)}function P(Q,X){return G(Q,X,f,z,h,G0)}function $(Q,X){var U,V,J,q;if(!Q||!Q.state||X>N||X<0)return Q?M0(Q,p):p;if(V=Q.state,!Q.output||!Q.input&&Q.avail_in!==0||V.status===Y0&&X!==B)return M0(Q,Q.avail_out===0?u:p);if(V.strm=Q,U=V.last_flush,V.last_flush=X,V.status===N0)if(V.wrap===2)if(Q.adler=0,_(V,31),_(V,139),_(V,8),!V.gzhead)_(V,0),_(V,0),_(V,0),_(V,0),_(V,0),_(V,V.level===9?2:V.strategy>=E||V.level<2?4:0),_(V,j0),V.status=a;else{if(_(V,(V.gzhead.text?1:0)+(V.gzhead.hcrc?2:0)+(!V.gzhead.extra?0:4)+(!V.gzhead.name?0:8)+(!V.gzhead.comment?0:16)),_(V,V.gzhead.time&255),_(V,V.gzhead.time>>8&255),_(V,V.gzhead.time>>16&255),_(V,V.gzhead.time>>24&255),_(V,V.level===9?2:V.strategy>=E||V.level<2?4:0),_(V,V.gzhead.os&255),V.gzhead.extra&&V.gzhead.extra.length)_(V,V.gzhead.extra.length&255),_(V,V.gzhead.extra.length>>8&255);if(V.gzhead.hcrc)Q.adler=n(Q.adler,V.pending_buf,V.pending,0);V.gzindex=0,V.status=I0}else{var T=f+(V.w_bits-8<<4)<<8,M=-1;if(V.strategy>=E||V.level<2)M=0;else if(V.level<6)M=1;else if(V.level===6)M=2;else M=3;if(T|=M<<6,V.strstart!==0)T|=H0;if(T+=31-T%31,V.status=a,T0(V,T),V.strstart!==0)T0(V,Q.adler>>>16),T0(V,Q.adler&65535);Q.adler=1}if(V.status===I0)if(V.gzhead.extra){J=V.pending;while(V.gzindex<(V.gzhead.extra.length&65535)){if(V.pending===V.pending_buf_size){if(V.gzhead.hcrc&&V.pending>J)Q.adler=n(Q.adler,V.pending_buf,V.pending-J,J);if(v0(Q),J=V.pending,V.pending===V.pending_buf_size)break}_(V,V.gzhead.extra[V.gzindex]&255),V.gzindex++}if(V.gzhead.hcrc&&V.pending>J)Q.adler=n(Q.adler,V.pending_buf,V.pending-J,J);if(V.gzindex===V.gzhead.extra.length)V.gzindex=0,V.status=K0}else V.status=K0;if(V.status===K0)if(V.gzhead.name){J=V.pending;do{if(V.pending===V.pending_buf_size){if(V.gzhead.hcrc&&V.pending>J)Q.adler=n(Q.adler,V.pending_buf,V.pending-J,J);if(v0(Q),J=V.pending,V.pending===V.pending_buf_size){q=1;break}}if(V.gzindex<V.gzhead.name.length)q=V.gzhead.name.charCodeAt(V.gzindex++)&255;else q=0;_(V,q)}while(q!==0);if(V.gzhead.hcrc&&V.pending>J)Q.adler=n(Q.adler,V.pending_buf,V.pending-J,J);if(q===0)V.gzindex=0,V.status=X0}else V.status=X0;if(V.status===X0)if(V.gzhead.comment){J=V.pending;do{if(V.pending===V.pending_buf_size){if(V.gzhead.hcrc&&V.pending>J)Q.adler=n(Q.adler,V.pending_buf,V.pending-J,J);if(v0(Q),J=V.pending,V.pending===V.pending_buf_size){q=1;break}}if(V.gzindex<V.gzhead.comment.length)q=V.gzhead.comment.charCodeAt(V.gzindex++)&255;else q=0;_(V,q)}while(q!==0);if(V.gzhead.hcrc&&V.pending>J)Q.adler=n(Q.adler,V.pending_buf,V.pending-J,J);if(q===0)V.status=U0}else V.status=U0;if(V.status===U0)if(V.gzhead.hcrc){if(V.pending+2>V.pending_buf_size)v0(Q);if(V.pending+2<=V.pending_buf_size)_(V,Q.adler&255),_(V,Q.adler>>8&255),Q.adler=0,V.status=a}else V.status=a;if(V.pending!==0){if(v0(Q),Q.avail_out===0)return V.last_flush=-1,y}else if(Q.avail_in===0&&c0(X)<=c0(U)&&X!==B)return M0(Q,u);if(V.status===Y0&&Q.avail_in!==0)return M0(Q,u);if(Q.avail_in!==0||V.lookahead!==0||X!==w&&V.status!==Y0){var A=V.strategy===E?m0(V,X):V.strategy===S?_0(V,X):h0[V.level].func(V,X);if(A===Z0||A===g0)V.status=Y0;if(A===r||A===Z0){if(Q.avail_out===0)V.last_flush=-1;return y}if(A===z0){if(X===v)b._tr_align(V);else if(X!==N){if(b._tr_stored_block(V,0,0,!1),X===k){if(w0(V.head),V.lookahead===0)V.strstart=0,V.block_start=0,V.insert=0}}if(v0(Q),Q.avail_out===0)return V.last_flush=-1,y}}if(X!==B)return y;if(V.wrap<=0)return m;if(V.wrap===2)_(V,Q.adler&255),_(V,Q.adler>>8&255),_(V,Q.adler>>16&255),_(V,Q.adler>>24&255),_(V,Q.total_in&255),_(V,Q.total_in>>8&255),_(V,Q.total_in>>16&255),_(V,Q.total_in>>24&255);else T0(V,Q.adler>>>16),T0(V,Q.adler&65535);if(v0(Q),V.wrap>0)V.wrap=-V.wrap;return V.pending!==0?y:m}function H(Q){var X;if(!Q||!Q.state)return p;if(X=Q.state.status,X!==N0&&X!==I0&&X!==K0&&X!==X0&&X!==U0&&X!==a&&X!==Y0)return M0(Q,p);return Q.state=null,X===a?M0(Q,t):y}function x(Q,X){var U=X.length,V,J,q,T,M,A,o,f0;if(!Q||!Q.state)return p;if(V=Q.state,T=V.wrap,T===2||T===1&&V.status!==N0||V.lookahead)return p;if(T===1)Q.adler=L(Q.adler,X,U,0);if(V.wrap=0,U>=V.w_size){if(T===0)w0(V.head),V.strstart=0,V.block_start=0,V.insert=0;f0=new g.Buf8(V.w_size),g.arraySet(f0,X,U-V.w_size,V.w_size,0),X=f0,U=V.w_size}M=Q.avail_in,A=Q.next_in,o=Q.input,Q.avail_in=U,Q.next_in=0,Q.input=X,S0(V);while(V.lookahead>=D){J=V.strstart,q=V.lookahead-(D-1);do V.ins_h=(V.ins_h<<V.hash_shift^V.window[J+D-1])&V.hash_mask,V.prev[J&V.w_mask]=V.head[V.ins_h],V.head[V.ins_h]=J,J++;while(--q);V.strstart=J,V.lookahead=D-1,S0(V)}return V.strstart+=V.lookahead,V.block_start=V.strstart,V.insert=V.lookahead,V.lookahead=0,V.match_length=V.prev_length=D-1,V.match_available=0,Q.next_in=A,Q.input=o,Q.avail_in=M,V.wrap=T,y}Y.deflateInit=P,Y.deflateInit2=G,Y.deflateReset=Z,Y.deflateResetKeep=F,Y.deflateSetHeader=R,Y.deflate=$,Y.deflateEnd=H,Y.deflateSetDictionary=x,Y.deflateInfo="pako deflate (from Nodeca project)"}}),u1=A0({"node_modules/pako/lib/zlib/inffast.js"(Y,g){var b=30,L=12;g.exports=function n(C,w){var v,k,B,N,y,m,p,t,u,s,W0,E,S,J0,G0,F0,f,d,z,h,V0,j,K,O,I;v=C.state,k=C.next_in,O=C.input,B=k+(C.avail_in-5),N=C.next_out,I=C.output,y=N-(w-C.avail_out),m=N+(C.avail_out-257),p=v.dmax,t=v.wsize,u=v.whave,s=v.wnext,W0=v.window,E=v.hold,S=v.bits,J0=v.lencode,G0=v.distcode,F0=(1<<v.lenbits)-1,f=(1<<v.distbits)-1;Q:do{if(S<15)E+=O[k++]<<S,S+=8,E+=O[k++]<<S,S+=8;d=J0[E&F0];$:for(;;){if(z=d>>>24,E>>>=z,S-=z,z=d>>>16&255,z===0)I[N++]=d&65535;else if(z&16){if(h=d&65535,z&=15,z){if(S<z)E+=O[k++]<<S,S+=8;h+=E&(1<<z)-1,E>>>=z,S-=z}if(S<15)E+=O[k++]<<S,S+=8,E+=O[k++]<<S,S+=8;d=G0[E&f];V:for(;;){if(z=d>>>24,E>>>=z,S-=z,z=d>>>16&255,z&16){if(V0=d&65535,z&=15,S<z){if(E+=O[k++]<<S,S+=8,S<z)E+=O[k++]<<S,S+=8}if(V0+=E&(1<<z)-1,V0>p){C.msg="invalid distance too far back",v.mode=b;break Q}if(E>>>=z,S-=z,z=N-y,V0>z){if(z=V0-z,z>u){if(v.sane){C.msg="invalid distance too far back",v.mode=b;break Q}}if(j=0,K=W0,s===0){if(j+=t-z,z<h){h-=z;do I[N++]=W0[j++];while(--z);j=N-V0,K=I}}else if(s<z){if(j+=t+s-z,z-=s,z<h){h-=z;do I[N++]=W0[j++];while(--z);if(j=0,s<h){z=s,h-=z;do I[N++]=W0[j++];while(--z);j=N-V0,K=I}}}else if(j+=s-z,z<h){h-=z;do I[N++]=W0[j++];while(--z);j=N-V0,K=I}while(h>2)I[N++]=K[j++],I[N++]=K[j++],I[N++]=K[j++],h-=3;if(h){if(I[N++]=K[j++],h>1)I[N++]=K[j++]}}else{j=N-V0;do I[N++]=I[j++],I[N++]=I[j++],I[N++]=I[j++],h-=3;while(h>2);if(h){if(I[N++]=I[j++],h>1)I[N++]=I[j++]}}}else if((z&64)===0){d=G0[(d&65535)+(E&(1<<z)-1)];continue V}else{C.msg="invalid distance code",v.mode=b;break Q}break}}else if((z&64)===0){d=J0[(d&65535)+(E&(1<<z)-1)];continue $}else if(z&32){v.mode=L;break Q}else{C.msg="invalid literal/length code",v.mode=b;break Q}break}}while(k<B&&N<m);h=S>>3,k-=h,S-=h<<3,E&=(1<<S)-1,C.next_in=k,C.next_out=N,C.avail_in=k<B?5+(B-k):5-(k-B),C.avail_out=N<m?257+(m-N):257-(N-m),v.hold=E,v.bits=S;return}}}),b1=A0({"node_modules/pako/lib/zlib/inftrees.js"(Y,g){var b=r0(),L=15,n=852,C=592,w=0,v=1,k=2,B=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],N=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],y=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],m=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];g.exports=function p(t,u,s,W0,E,S,J0,G0){var F0=G0.bits,f=0,d=0,z=0,h=0,V0=0,j=0,K=0,O=0,I=0,c=0,l,D,Q0,i,H0,N0=null,I0=0,K0,X0=new b.Buf16(L+1),U0=new b.Buf16(L+1),a=null,Y0=0,r,z0,Z0;for(f=0;f<=L;f++)X0[f]=0;for(d=0;d<W0;d++)X0[u[s+d]]++;V0=F0;for(h=L;h>=1;h--)if(X0[h]!==0)break;if(V0>h)V0=h;if(h===0)return E[S++]=1<<24|64<<16|0,E[S++]=1<<24|64<<16|0,G0.bits=1,0;for(z=1;z<h;z++)if(X0[z]!==0)break;if(V0<z)V0=z;O=1;for(f=1;f<=L;f++)if(O<<=1,O-=X0[f],O<0)return-1;if(O>0&&(t===w||h!==1))return-1;U0[1]=0;for(f=1;f<L;f++)U0[f+1]=U0[f]+X0[f];for(d=0;d<W0;d++)if(u[s+d]!==0)J0[U0[u[s+d]]++]=d;if(t===w)N0=a=J0,K0=19;else if(t===v)N0=B,I0-=257,a=N,Y0-=257,K0=256;else N0=y,a=m,K0=-1;if(c=0,d=0,f=z,H0=S,j=V0,K=0,Q0=-1,I=1<<V0,i=I-1,t===v&&I>n||t===k&&I>C)return 1;for(;;){if(r=f-K,J0[d]<K0)z0=0,Z0=J0[d];else if(J0[d]>K0)z0=a[Y0+J0[d]],Z0=N0[I0+J0[d]];else z0=96,Z0=0;l=1<<f-K,D=1<<j,z=D;do D-=l,E[H0+(c>>K)+D]=r<<24|z0<<16|Z0|0;while(D!==0);l=1<<f-1;while(c&l)l>>=1;if(l!==0)c&=l-1,c+=l;else c=0;if(d++,--X0[f]===0){if(f===h)break;f=u[s+J0[d]]}if(f>V0&&(c&i)!==Q0){if(K===0)K=V0;H0+=z,j=f-K,O=1<<j;while(j+K<h){if(O-=X0[j+K],O<=0)break;j++,O<<=1}if(I+=1<<j,t===v&&I>n||t===k&&I>C)return 1;Q0=c&i,E[Q0]=V0<<24|j<<16|H0-S|0}}if(c!==0)E[H0+c]=f-K<<24|64<<16|0;return G0.bits=V0,0}}}),d1=A0({"node_modules/pako/lib/zlib/inflate.js"(Y){var g=r0(),b=Q1(),L=$1(),n=u1(),C=b1(),w=0,v=1,k=2,B=4,N=5,y=6,m=0,p=1,t=2,u=-2,s=-3,W0=-4,E=-5,S=8,J0=1,G0=2,F0=3,f=4,d=5,z=6,h=7,V0=8,j=9,K=10,O=11,I=12,c=13,l=14,D=15,Q0=16,i=17,H0=18,N0=19,I0=20,K0=21,X0=22,U0=23,a=24,Y0=25,r=26,z0=27,Z0=28,g0=29,j0=30,M0=31,c0=32,w0=852,v0=592,q0=15,_=q0;function T0(G){return(G>>>24&255)+(G>>>8&65280)+((G&65280)<<8)+((G&255)<<24)}function p0(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new g.Buf16(320),this.work=new g.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function b0(G){var P;if(!G||!G.state)return u;if(P=G.state,G.total_in=G.total_out=P.total=0,G.msg="",P.wrap)G.adler=P.wrap&1;return P.mode=J0,P.last=0,P.havedict=0,P.dmax=32768,P.head=null,P.hold=0,P.bits=0,P.lencode=P.lendyn=new g.Buf32(w0),P.distcode=P.distdyn=new g.Buf32(v0),P.sane=1,P.back=-1,m}function S0(G){var P;if(!G||!G.state)return u;return P=G.state,P.wsize=0,P.whave=0,P.wnext=0,b0(G)}function i0(G,P){var $,H;if(!G||!G.state)return u;if(H=G.state,P<0)$=0,P=-P;else if($=(P>>4)+1,P<48)P&=15;if(P&&(P<8||P>15))return u;if(H.window!==null&&H.wbits!==P)H.window=null;return H.wrap=$,H.wbits=P,S0(G)}function d0(G,P){var $,H;if(!G)return u;if(H=new p0,G.state=H,H.window=null,$=i0(G,P),$!==m)G.state=null;return $}function E0(G){return d0(G,_)}var _0=!0,m0,B0;function h0(G){if(_0){var P;m0=new g.Buf32(512),B0=new g.Buf32(32),P=0;while(P<144)G.lens[P++]=8;while(P<256)G.lens[P++]=9;while(P<280)G.lens[P++]=7;while(P<288)G.lens[P++]=8;C(v,G.lens,0,288,m0,0,G.work,{bits:9}),P=0;while(P<32)G.lens[P++]=5;C(k,G.lens,0,32,B0,0,G.work,{bits:5}),_0=!1}G.lencode=m0,G.lenbits=9,G.distcode=B0,G.distbits=5}function n0(G,P,$,H){var x,Q=G.state;if(Q.window===null)Q.wsize=1<<Q.wbits,Q.wnext=0,Q.whave=0,Q.window=new g.Buf8(Q.wsize);if(H>=Q.wsize)g.arraySet(Q.window,P,$-Q.wsize,Q.wsize,0),Q.wnext=0,Q.whave=Q.wsize;else{if(x=Q.wsize-Q.wnext,x>H)x=H;if(g.arraySet(Q.window,P,$-H,x,Q.wnext),H-=x,H)g.arraySet(Q.window,P,$-H,H,0),Q.wnext=H,Q.whave=Q.wsize;else{if(Q.wnext+=x,Q.wnext===Q.wsize)Q.wnext=0;if(Q.whave<Q.wsize)Q.whave+=x}}return 0}function W(G,P){var $,H,x,Q,X,U,V,J,q,T,M,A,o,f0,P0=0,e,C0,D0,k0,a0,l0,L0,y0,O0=new g.Buf8(4),u0,x0,e0=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!G||!G.state||!G.output||!G.input&&G.avail_in!==0)return u;if($=G.state,$.mode===I)$.mode=c;X=G.next_out,x=G.output,V=G.avail_out,Q=G.next_in,H=G.input,U=G.avail_in,J=$.hold,q=$.bits,T=U,M=V,y0=m;Q:for(;;)switch($.mode){case J0:if($.wrap===0){$.mode=c;break}while(q<16){if(U===0)break Q;U--,J+=H[Q++]<<q,q+=8}if($.wrap&2&&J===35615){$.check=0,O0[0]=J&255,O0[1]=J>>>8&255,$.check=L($.check,O0,2,0),J=0,q=0,$.mode=G0;break}if($.flags=0,$.head)$.head.done=!1;if(!($.wrap&1)||(((J&255)<<8)+(J>>8))%31){G.msg="incorrect header check",$.mode=j0;break}if((J&15)!==S){G.msg="unknown compression method",$.mode=j0;break}if(J>>>=4,q-=4,L0=(J&15)+8,$.wbits===0)$.wbits=L0;else if(L0>$.wbits){G.msg="invalid window size",$.mode=j0;break}$.dmax=1<<L0,G.adler=$.check=1,$.mode=J&512?K:I,J=0,q=0;break;case G0:while(q<16){if(U===0)break Q;U--,J+=H[Q++]<<q,q+=8}if($.flags=J,($.flags&255)!==S){G.msg="unknown compression method",$.mode=j0;break}if($.flags&57344){G.msg="unknown header flags set",$.mode=j0;break}if($.head)$.head.text=J>>8&1;if($.flags&512)O0[0]=J&255,O0[1]=J>>>8&255,$.check=L($.check,O0,2,0);J=0,q=0,$.mode=F0;case F0:while(q<32){if(U===0)break Q;U--,J+=H[Q++]<<q,q+=8}if($.head)$.head.time=J;if($.flags&512)O0[0]=J&255,O0[1]=J>>>8&255,O0[2]=J>>>16&255,O0[3]=J>>>24&255,$.check=L($.check,O0,4,0);J=0,q=0,$.mode=f;case f:while(q<16){if(U===0)break Q;U--,J+=H[Q++]<<q,q+=8}if($.head)$.head.xflags=J&255,$.head.os=J>>8;if($.flags&512)O0[0]=J&255,O0[1]=J>>>8&255,$.check=L($.check,O0,2,0);J=0,q=0,$.mode=d;case d:if($.flags&1024){while(q<16){if(U===0)break Q;U--,J+=H[Q++]<<q,q+=8}if($.length=J,$.head)$.head.extra_len=J;if($.flags&512)O0[0]=J&255,O0[1]=J>>>8&255,$.check=L($.check,O0,2,0);J=0,q=0}else if($.head)$.head.extra=null;$.mode=z;case z:if($.flags&1024){if(A=$.length,A>U)A=U;if(A){if($.head){if(L0=$.head.extra_len-$.length,!$.head.extra)$.head.extra=new Array($.head.extra_len);g.arraySet($.head.extra,H,Q,A,L0)}if($.flags&512)$.check=L($.check,H,A,Q);U-=A,Q+=A,$.length-=A}if($.length)break Q}$.length=0,$.mode=h;case h:if($.flags&2048){if(U===0)break Q;A=0;do if(L0=H[Q+A++],$.head&&L0&&$.length<65536)$.head.name+=String.fromCharCode(L0);while(L0&&A<U);if($.flags&512)$.check=L($.check,H,A,Q);if(U-=A,Q+=A,L0)break Q}else if($.head)$.head.name=null;$.length=0,$.mode=V0;case V0:if($.flags&4096){if(U===0)break Q;A=0;do if(L0=H[Q+A++],$.head&&L0&&$.length<65536)$.head.comment+=String.fromCharCode(L0);while(L0&&A<U);if($.flags&512)$.check=L($.check,H,A,Q);if(U-=A,Q+=A,L0)break Q}else if($.head)$.head.comment=null;$.mode=j;case j:if($.flags&512){while(q<16){if(U===0)break Q;U--,J+=H[Q++]<<q,q+=8}if(J!==($.check&65535)){G.msg="header crc mismatch",$.mode=j0;break}J=0,q=0}if($.head)$.head.hcrc=$.flags>>9&1,$.head.done=!0;G.adler=$.check=0,$.mode=I;break;case K:while(q<32){if(U===0)break Q;U--,J+=H[Q++]<<q,q+=8}G.adler=$.check=T0(J),J=0,q=0,$.mode=O;case O:if($.havedict===0)return G.next_out=X,G.avail_out=V,G.next_in=Q,G.avail_in=U,$.hold=J,$.bits=q,t;G.adler=$.check=1,$.mode=I;case I:if(P===N||P===y)break Q;case c:if($.last){J>>>=q&7,q-=q&7,$.mode=z0;break}while(q<3){if(U===0)break Q;U--,J+=H[Q++]<<q,q+=8}switch($.last=J&1,J>>>=1,q-=1,J&3){case 0:$.mode=l;break;case 1:if(h0($),$.mode=I0,P===y){J>>>=2,q-=2;break Q}break;case 2:$.mode=i;break;case 3:G.msg="invalid block type",$.mode=j0}J>>>=2,q-=2;break;case l:J>>>=q&7,q-=q&7;while(q<32){if(U===0)break Q;U--,J+=H[Q++]<<q,q+=8}if((J&65535)!==(J>>>16^65535)){G.msg="invalid stored block lengths",$.mode=j0;break}if($.length=J&65535,J=0,q=0,$.mode=D,P===y)break Q;case D:$.mode=Q0;case Q0:if(A=$.length,A){if(A>U)A=U;if(A>V)A=V;if(A===0)break Q;g.arraySet(x,H,Q,A,X),U-=A,Q+=A,V-=A,X+=A,$.length-=A;break}$.mode=I;break;case i:while(q<14){if(U===0)break Q;U--,J+=H[Q++]<<q,q+=8}if($.nlen=(J&31)+257,J>>>=5,q-=5,$.ndist=(J&31)+1,J>>>=5,q-=5,$.ncode=(J&15)+4,J>>>=4,q-=4,$.nlen>286||$.ndist>30){G.msg="too many length or distance symbols",$.mode=j0;break}$.have=0,$.mode=H0;case H0:while($.have<$.ncode){while(q<3){if(U===0)break Q;U--,J+=H[Q++]<<q,q+=8}$.lens[e0[$.have++]]=J&7,J>>>=3,q-=3}while($.have<19)$.lens[e0[$.have++]]=0;if($.lencode=$.lendyn,$.lenbits=7,u0={bits:$.lenbits},y0=C(w,$.lens,0,19,$.lencode,0,$.work,u0),$.lenbits=u0.bits,y0){G.msg="invalid code lengths set",$.mode=j0;break}$.have=0,$.mode=N0;case N0:while($.have<$.nlen+$.ndist){for(;;){if(P0=$.lencode[J&(1<<$.lenbits)-1],e=P0>>>24,C0=P0>>>16&255,D0=P0&65535,e<=q)break;if(U===0)break Q;U--,J+=H[Q++]<<q,q+=8}if(D0<16)J>>>=e,q-=e,$.lens[$.have++]=D0;else{if(D0===16){x0=e+2;while(q<x0){if(U===0)break Q;U--,J+=H[Q++]<<q,q+=8}if(J>>>=e,q-=e,$.have===0){G.msg="invalid bit length repeat",$.mode=j0;break}L0=$.lens[$.have-1],A=3+(J&3),J>>>=2,q-=2}else if(D0===17){x0=e+3;while(q<x0){if(U===0)break Q;U--,J+=H[Q++]<<q,q+=8}J>>>=e,q-=e,L0=0,A=3+(J&7),J>>>=3,q-=3}else{x0=e+7;while(q<x0){if(U===0)break Q;U--,J+=H[Q++]<<q,q+=8}J>>>=e,q-=e,L0=0,A=11+(J&127),J>>>=7,q-=7}if($.have+A>$.nlen+$.ndist){G.msg="invalid bit length repeat",$.mode=j0;break}while(A--)$.lens[$.have++]=L0}}if($.mode===j0)break;if($.lens[256]===0){G.msg="invalid code -- missing end-of-block",$.mode=j0;break}if($.lenbits=9,u0={bits:$.lenbits},y0=C(v,$.lens,0,$.nlen,$.lencode,0,$.work,u0),$.lenbits=u0.bits,y0){G.msg="invalid literal/lengths set",$.mode=j0;break}if($.distbits=6,$.distcode=$.distdyn,u0={bits:$.distbits},y0=C(k,$.lens,$.nlen,$.ndist,$.distcode,0,$.work,u0),$.distbits=u0.bits,y0){G.msg="invalid distances set",$.mode=j0;break}if($.mode=I0,P===y)break Q;case I0:$.mode=K0;case K0:if(U>=6&&V>=258){if(G.next_out=X,G.avail_out=V,G.next_in=Q,G.avail_in=U,$.hold=J,$.bits=q,n(G,M),X=G.next_out,x=G.output,V=G.avail_out,Q=G.next_in,H=G.input,U=G.avail_in,J=$.hold,q=$.bits,$.mode===I)$.back=-1;break}$.back=0;for(;;){if(P0=$.lencode[J&(1<<$.lenbits)-1],e=P0>>>24,C0=P0>>>16&255,D0=P0&65535,e<=q)break;if(U===0)break Q;U--,J+=H[Q++]<<q,q+=8}if(C0&&(C0&240)===0){k0=e,a0=C0,l0=D0;for(;;){if(P0=$.lencode[l0+((J&(1<<k0+a0)-1)>>k0)],e=P0>>>24,C0=P0>>>16&255,D0=P0&65535,k0+e<=q)break;if(U===0)break Q;U--,J+=H[Q++]<<q,q+=8}J>>>=k0,q-=k0,$.back+=k0}if(J>>>=e,q-=e,$.back+=e,$.length=D0,C0===0){$.mode=r;break}if(C0&32){$.back=-1,$.mode=I;break}if(C0&64){G.msg="invalid literal/length code",$.mode=j0;break}$.extra=C0&15,$.mode=X0;case X0:if($.extra){x0=$.extra;while(q<x0){if(U===0)break Q;U--,J+=H[Q++]<<q,q+=8}$.length+=J&(1<<$.extra)-1,J>>>=$.extra,q-=$.extra,$.back+=$.extra}$.was=$.length,$.mode=U0;case U0:for(;;){if(P0=$.distcode[J&(1<<$.distbits)-1],e=P0>>>24,C0=P0>>>16&255,D0=P0&65535,e<=q)break;if(U===0)break Q;U--,J+=H[Q++]<<q,q+=8}if((C0&240)===0){k0=e,a0=C0,l0=D0;for(;;){if(P0=$.distcode[l0+((J&(1<<k0+a0)-1)>>k0)],e=P0>>>24,C0=P0>>>16&255,D0=P0&65535,k0+e<=q)break;if(U===0)break Q;U--,J+=H[Q++]<<q,q+=8}J>>>=k0,q-=k0,$.back+=k0}if(J>>>=e,q-=e,$.back+=e,C0&64){G.msg="invalid distance code",$.mode=j0;break}$.offset=D0,$.extra=C0&15,$.mode=a;case a:if($.extra){x0=$.extra;while(q<x0){if(U===0)break Q;U--,J+=H[Q++]<<q,q+=8}$.offset+=J&(1<<$.extra)-1,J>>>=$.extra,q-=$.extra,$.back+=$.extra}if($.offset>$.dmax){G.msg="invalid distance too far back",$.mode=j0;break}$.mode=Y0;case Y0:if(V===0)break Q;if(A=M-V,$.offset>A){if(A=$.offset-A,A>$.whave){if($.sane){G.msg="invalid distance too far back",$.mode=j0;break}}if(A>$.wnext)A-=$.wnext,o=$.wsize-A;else o=$.wnext-A;if(A>$.length)A=$.length;f0=$.window}else f0=x,o=X-$.offset,A=$.length;if(A>V)A=V;V-=A,$.length-=A;do x[X++]=f0[o++];while(--A);if($.length===0)$.mode=K0;break;case r:if(V===0)break Q;x[X++]=$.length,V--,$.mode=K0;break;case z0:if($.wrap){while(q<32){if(U===0)break Q;U--,J|=H[Q++]<<q,q+=8}if(M-=V,G.total_out+=M,$.total+=M,M)G.adler=$.check=$.flags?L($.check,x,M,X-M):b($.check,x,M,X-M);if(M=V,($.flags?J:T0(J))!==$.check){G.msg="incorrect data check",$.mode=j0;break}J=0,q=0}$.mode=Z0;case Z0:if($.wrap&&$.flags){while(q<32){if(U===0)break Q;U--,J+=H[Q++]<<q,q+=8}if(J!==($.total&4294967295)){G.msg="incorrect length check",$.mode=j0;break}J=0,q=0}$.mode=g0;case g0:y0=p;break Q;case j0:y0=s;break Q;case M0:return W0;case c0:default:return u}if(G.next_out=X,G.avail_out=V,G.next_in=Q,G.avail_in=U,$.hold=J,$.bits=q,$.wsize||M!==G.avail_out&&$.mode<j0&&($.mode<z0||P!==B)){if(n0(G,G.output,G.next_out,M-G.avail_out))return $.mode=M0,W0}if(T-=G.avail_in,M-=G.avail_out,G.total_in+=T,G.total_out+=M,$.total+=M,$.wrap&&M)G.adler=$.check=$.flags?L($.check,x,M,G.next_out-M):b($.check,x,M,G.next_out-M);if(G.data_type=$.bits+($.last?64:0)+($.mode===I?128:0)+($.mode===I0||$.mode===D?256:0),(T===0&&M===0||P===B)&&y0===m)y0=E;return y0}function F(G){if(!G||!G.state)return u;var P=G.state;if(P.window)P.window=null;return G.state=null,m}function Z(G,P){var $;if(!G||!G.state)return u;if($=G.state,($.wrap&2)===0)return u;return $.head=P,P.done=!1,m}function R(G,P){var $=P.length,H,x,Q;if(!G||!G.state)return u;if(H=G.state,H.wrap!==0&&H.mode!==O)return u;if(H.mode===O){if(x=1,x=b(x,P,$,0),x!==H.check)return s}if(Q=n0(G,P,$,$),Q)return H.mode=M0,W0;return H.havedict=1,m}Y.inflateReset=S0,Y.inflateReset2=i0,Y.inflateResetKeep=b0,Y.inflateInit=E0,Y.inflateInit2=d0,Y.inflate=W,Y.inflateEnd=F,Y.inflateGetHeader=Z,Y.inflateSetDictionary=R,Y.inflateInfo="pako inflate (from Nodeca project)"}}),V1=A0({"node_modules/pako/lib/zlib/constants.js"(Y,g){g.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}}}),m1=A0({"node_modules/browserify-zlib/lib/binding.js"(Y){var g=E1(),b=f1(),L=d1(),n=V1();for(C in n)Y[C]=n[C];var C;Y.NONE=0,Y.DEFLATE=1,Y.INFLATE=2,Y.GZIP=3,Y.GUNZIP=4,Y.DEFLATERAW=5,Y.INFLATERAW=6,Y.UNZIP=7;var w=31,v=139;function k(B){if(typeof B!=="number"||B<Y.DEFLATE||B>Y.UNZIP)throw new TypeError("Bad argument");this.dictionary=null,this.err=0,this.flush=0,this.init_done=!1,this.level=0,this.memLevel=0,this.mode=B,this.strategy=0,this.windowBits=0,this.write_in_progress=!1,this.pending_close=!1,this.gzip_id_bytes_read=0}k.prototype.close=function(){if(this.write_in_progress){this.pending_close=!0;return}if(this.pending_close=!1,R0(this.init_done,"close before init"),R0(this.mode<=Y.UNZIP),this.mode===Y.DEFLATE||this.mode===Y.GZIP||this.mode===Y.DEFLATERAW)b.deflateEnd(this.strm);else if(this.mode===Y.INFLATE||this.mode===Y.GUNZIP||this.mode===Y.INFLATERAW||this.mode===Y.UNZIP)L.inflateEnd(this.strm);this.mode=Y.NONE,this.dictionary=null},k.prototype.write=function(B,N,y,m,p,t,u){return this._write(!0,B,N,y,m,p,t,u)},k.prototype.writeSync=function(B,N,y,m,p,t,u){return this._write(!1,B,N,y,m,p,t,u)},k.prototype._write=function(B,N,y,m,p,t,u,s){if(R0.equal(arguments.length,8),R0(this.init_done,"write before init"),R0(this.mode!==Y.NONE,"already finalized"),R0.equal(!1,this.write_in_progress,"write already in progress"),R0.equal(!1,this.pending_close,"close is pending"),this.write_in_progress=!0,R0.equal(!1,N===void 0,"must provide flush value"),this.write_in_progress=!0,N!==Y.Z_NO_FLUSH&&N!==Y.Z_PARTIAL_FLUSH&&N!==Y.Z_SYNC_FLUSH&&N!==Y.Z_FULL_FLUSH&&N!==Y.Z_FINISH&&N!==Y.Z_BLOCK)throw new Error("Invalid flush value");if(y==null)y=Buffer.alloc(0),p=0,m=0;if(this.strm.avail_in=p,this.strm.input=y,this.strm.next_in=m,this.strm.avail_out=s,this.strm.output=t,this.strm.next_out=u,this.flush=N,!B){if(this._process(),this._checkError())return this._afterSync();return}var W0=this;return process.nextTick(function(){W0._process(),W0._after()}),this},k.prototype._afterSync=function(){var B=this.strm.avail_out,N=this.strm.avail_in;return this.write_in_progress=!1,[N,B]},k.prototype._process=function(){var B=null;switch(this.mode){case Y.DEFLATE:case Y.GZIP:case Y.DEFLATERAW:this.err=b.deflate(this.strm,this.flush);break;case Y.UNZIP:if(this.strm.avail_in>0)B=this.strm.next_in;switch(this.gzip_id_bytes_read){case 0:if(B===null)break;if(this.strm.input[B]===w){if(this.gzip_id_bytes_read=1,B++,this.strm.avail_in===1)break}else{this.mode=Y.INFLATE;break}case 1:if(B===null)break;if(this.strm.input[B]===v)this.gzip_id_bytes_read=2,this.mode=Y.GUNZIP;else this.mode=Y.INFLATE;break;default:throw new Error("invalid number of gzip magic number bytes read")}case Y.INFLATE:case Y.GUNZIP:case Y.INFLATERAW:if(this.err=L.inflate(this.strm,this.flush),this.err===Y.Z_NEED_DICT&&this.dictionary){if(this.err=L.inflateSetDictionary(this.strm,this.dictionary),this.err===Y.Z_OK)this.err=L.inflate(this.strm,this.flush);else if(this.err===Y.Z_DATA_ERROR)this.err=Y.Z_NEED_DICT}while(this.strm.avail_in>0&&this.mode===Y.GUNZIP&&this.err===Y.Z_STREAM_END&&this.strm.next_in[0]!==0)this.reset(),this.err=L.inflate(this.strm,this.flush);break;default:throw new Error("Unknown mode "+this.mode)}},k.prototype._checkError=function(){switch(this.err){case Y.Z_OK:case Y.Z_BUF_ERROR:if(this.strm.avail_out!==0&&this.flush===Y.Z_FINISH)return this._error("unexpected end of file"),!1;break;case Y.Z_STREAM_END:break;case Y.Z_NEED_DICT:if(this.dictionary==null)this._error("Missing dictionary");else this._error("Bad dictionary");return!1;default:return this._error("Zlib error"),!1}return!0},k.prototype._after=function(){if(!this._checkError())return;var B=this.strm.avail_out,N=this.strm.avail_in;if(this.write_in_progress=!1,this.callback(N,B),this.pending_close)this.close()},k.prototype._error=function(B){if(this.strm.msg)B=this.strm.msg;if(this.onerror(B,this.err),this.write_in_progress=!1,this.pending_close)this.close()},k.prototype.init=function(B,N,y,m,p){R0(arguments.length===4||arguments.length===5,"init(windowBits, level, memLevel, strategy, [dictionary])"),R0(B>=8&&B<=15,"invalid windowBits"),R0(N>=-1&&N<=9,"invalid compression level"),R0(y>=1&&y<=9,"invalid memlevel"),R0(m===Y.Z_FILTERED||m===Y.Z_HUFFMAN_ONLY||m===Y.Z_RLE||m===Y.Z_FIXED||m===Y.Z_DEFAULT_STRATEGY,"invalid strategy"),this._init(N,B,y,m,p),this._setDictionary()},k.prototype.params=function(){throw new Error("deflateParams Not supported")},k.prototype.reset=function(){this._reset(),this._setDictionary()},k.prototype._init=function(B,N,y,m,p){if(this.level=B,this.windowBits=N,this.memLevel=y,this.strategy=m,this.flush=Y.Z_NO_FLUSH,this.err=Y.Z_OK,this.mode===Y.GZIP||this.mode===Y.GUNZIP)this.windowBits+=16;if(this.mode===Y.UNZIP)this.windowBits+=32;if(this.mode===Y.DEFLATERAW||this.mode===Y.INFLATERAW)this.windowBits=-1*this.windowBits;switch(this.strm=new g,this.mode){case Y.DEFLATE:case Y.GZIP:case Y.DEFLATERAW:this.err=b.deflateInit2(this.strm,this.level,Y.Z_DEFLATED,this.windowBits,this.memLevel,this.strategy);break;case Y.INFLATE:case Y.GUNZIP:case Y.INFLATERAW:case Y.UNZIP:this.err=L.inflateInit2(this.strm,this.windowBits);break;default:throw new Error("Unknown mode "+this.mode)}if(this.err!==Y.Z_OK)this._error("Init error");this.dictionary=p,this.write_in_progress=!1,this.init_done=!0},k.prototype._setDictionary=function(){if(this.dictionary==null)return;switch(this.err=Y.Z_OK,this.mode){case Y.DEFLATE:case Y.DEFLATERAW:this.err=b.deflateSetDictionary(this.strm,this.dictionary);break;default:break}if(this.err!==Y.Z_OK)this._error("Failed to set dictionary")},k.prototype._reset=function(){switch(this.err=Y.Z_OK,this.mode){case Y.DEFLATE:case Y.DEFLATERAW:case Y.GZIP:this.err=b.deflateReset(this.strm);break;case Y.INFLATE:case Y.INFLATERAW:case Y.GUNZIP:this.err=L.inflateReset(this.strm);break;default:break}if(this.err!==Y.Z_OK)this._error("Failed to reset stream")},Y.Zlib=k}}),c1=A0({"node_modules/browserify-zlib/lib/index.js"(Y){var g=o0.Buffer,b=s0.Transform,L=m1(),n=W1,C=t0.ok,w=o0.kMaxLength,v="Cannot create final Buffer. It would be larger than 0x"+w.toString(16)+" bytes";L.Z_MIN_WINDOWBITS=8,L.Z_MAX_WINDOWBITS=15,L.Z_DEFAULT_WINDOWBITS=15,L.Z_MIN_CHUNK=64,L.Z_MAX_CHUNK=Infinity,L.Z_DEFAULT_CHUNK=16384,L.Z_MIN_MEMLEVEL=1,L.Z_MAX_MEMLEVEL=9,L.Z_DEFAULT_MEMLEVEL=8,L.Z_MIN_LEVEL=-1,L.Z_MAX_LEVEL=9,L.Z_DEFAULT_LEVEL=L.Z_DEFAULT_COMPRESSION;var k=Object.keys(L);for(N=0;N<k.length;N++)if(B=k[N],B.match(/^Z/))Object.defineProperty(Y,B,{enumerable:!0,value:L[B],writable:!1});var B,N,y={Z_OK:L.Z_OK,Z_STREAM_END:L.Z_STREAM_END,Z_NEED_DICT:L.Z_NEED_DICT,Z_ERRNO:L.Z_ERRNO,Z_STREAM_ERROR:L.Z_STREAM_ERROR,Z_DATA_ERROR:L.Z_DATA_ERROR,Z_MEM_ERROR:L.Z_MEM_ERROR,Z_BUF_ERROR:L.Z_BUF_ERROR,Z_VERSION_ERROR:L.Z_VERSION_ERROR},m=Object.keys(y);for(t=0;t<m.length;t++)p=m[t],y[y[p]]=p;var p,t;Object.defineProperty(Y,"codes",{enumerable:!0,value:Object.freeze(y),writable:!1}),Y.constants=V1(),Y.Deflate=W0,Y.Inflate=E,Y.Gzip=S,Y.Gunzip=J0,Y.DeflateRaw=G0,Y.InflateRaw=F0,Y.Unzip=f,Y.createDeflate=function(j){return new W0(j)},Y.createInflate=function(j){return new E(j)},Y.createDeflateRaw=function(j){return new G0(j)},Y.createInflateRaw=function(j){return new F0(j)},Y.createGzip=function(j){return new S(j)},Y.createGunzip=function(j){return new J0(j)},Y.createUnzip=function(j){return new f(j)},Y.deflate=function(j,K,O){if(typeof K==="function")O=K,K={};return u(new W0(K),j,O)},Y.deflateSync=function(j,K){return s(new W0(K),j)},Y.gzip=function(j,K,O){if(typeof K==="function")O=K,K={};return u(new S(K),j,O)},Y.gzipSync=function(j,K){return s(new S(K),j)},Y.deflateRaw=function(j,K,O){if(typeof K==="function")O=K,K={};return u(new G0(K),j,O)},Y.deflateRawSync=function(j,K){return s(new G0(K),j)},Y.unzip=function(j,K,O){if(typeof K==="function")O=K,K={};return u(new f(K),j,O)},Y.unzipSync=function(j,K){return s(new f(K),j)},Y.inflate=function(j,K,O){if(typeof K==="function")O=K,K={};return u(new E(K),j,O)},Y.inflateSync=function(j,K){return s(new E(K),j)},Y.gunzip=function(j,K,O){if(typeof K==="function")O=K,K={};return u(new J0(K),j,O)},Y.gunzipSync=function(j,K){return s(new J0(K),j)},Y.inflateRaw=function(j,K,O){if(typeof K==="function")O=K,K={};return u(new F0(K),j,O)},Y.inflateRawSync=function(j,K){return s(new F0(K),j)};function u(j,K,O){var I=[],c=0;j.on("error",D),j.on("end",Q0),j.end(K),l();function l(){var i;while((i=j.read())!==null)I.push(i),c+=i.length;j.once("readable",l)}function D(i){j.removeListener("end",Q0),j.removeListener("readable",l),O(i)}function Q0(){var i,H0=null;if(c>=w)H0=new RangeError(v);else i=g.concat(I,c);I=[],j.close(),O(H0,i)}}function s(j,K){if(typeof K==="string")K=g.from(K);if(!g.isBuffer(K))throw new TypeError("Not a string or buffer");var O=j._finishFlushFlag;return j._processChunk(K,O)}function W0(j){if(!(this instanceof W0))return new W0(j);z.call(this,j,L.DEFLATE)}function E(j){if(!(this instanceof E))return new E(j);z.call(this,j,L.INFLATE)}function S(j){if(!(this instanceof S))return new S(j);z.call(this,j,L.GZIP)}function J0(j){if(!(this instanceof J0))return new J0(j);z.call(this,j,L.GUNZIP)}function G0(j){if(!(this instanceof G0))return new G0(j);z.call(this,j,L.DEFLATERAW)}function F0(j){if(!(this instanceof F0))return new F0(j);z.call(this,j,L.INFLATERAW)}function f(j){if(!(this instanceof f))return new f(j);z.call(this,j,L.UNZIP)}function d(j){return j===L.Z_NO_FLUSH||j===L.Z_PARTIAL_FLUSH||j===L.Z_SYNC_FLUSH||j===L.Z_FULL_FLUSH||j===L.Z_FINISH||j===L.Z_BLOCK}function z(j,K){var O=this;if(this._opts=j=j||{},this._chunkSize=j.chunkSize||Y.Z_DEFAULT_CHUNK,b.call(this,j),j.flush&&!d(j.flush))throw new Error("Invalid flush flag: "+j.flush);if(j.finishFlush&&!d(j.finishFlush))throw new Error("Invalid flush flag: "+j.finishFlush);if(this._flushFlag=j.flush||L.Z_NO_FLUSH,this._finishFlushFlag=typeof j.finishFlush!=="undefined"?j.finishFlush:L.Z_FINISH,j.chunkSize){if(j.chunkSize<Y.Z_MIN_CHUNK||j.chunkSize>Y.Z_MAX_CHUNK)throw new Error("Invalid chunk size: "+j.chunkSize)}if(j.windowBits){if(j.windowBits<Y.Z_MIN_WINDOWBITS||j.windowBits>Y.Z_MAX_WINDOWBITS)throw new Error("Invalid windowBits: "+j.windowBits)}if(j.level){if(j.level<Y.Z_MIN_LEVEL||j.level>Y.Z_MAX_LEVEL)throw new Error("Invalid compression level: "+j.level)}if(j.memLevel){if(j.memLevel<Y.Z_MIN_MEMLEVEL||j.memLevel>Y.Z_MAX_MEMLEVEL)throw new Error("Invalid memLevel: "+j.memLevel)}if(j.strategy){if(j.strategy!=Y.Z_FILTERED&&j.strategy!=Y.Z_HUFFMAN_ONLY&&j.strategy!=Y.Z_RLE&&j.strategy!=Y.Z_FIXED&&j.strategy!=Y.Z_DEFAULT_STRATEGY)throw new Error("Invalid strategy: "+j.strategy)}if(j.dictionary){if(!g.isBuffer(j.dictionary))throw new Error("Invalid dictionary: it should be a Buffer instance")}this._handle=new L.Zlib(K);var I=this;this._hadError=!1,this._handle.onerror=function(D,Q0){h(I),I._hadError=!0;var i=new Error(D);i.errno=Q0,i.code=Y.codes[Q0],I.emit("error",i)};var c=Y.Z_DEFAULT_COMPRESSION;if(typeof j.level==="number")c=j.level;var l=Y.Z_DEFAULT_STRATEGY;if(typeof j.strategy==="number")l=j.strategy;this._handle.init(j.windowBits||Y.Z_DEFAULT_WINDOWBITS,c,j.memLevel||Y.Z_DEFAULT_MEMLEVEL,l,j.dictionary),this._buffer=g.allocUnsafe(this._chunkSize),this._offset=0,this._level=c,this._strategy=l,this.once("end",this.close),Object.defineProperty(this,"_closed",{get:function(){return!O._handle},configurable:!0,enumerable:!0})}n.inherits(z,b),z.prototype.params=function(j,K,O){if(j<Y.Z_MIN_LEVEL||j>Y.Z_MAX_LEVEL)throw new RangeError("Invalid compression level: "+j);if(K!=Y.Z_FILTERED&&K!=Y.Z_HUFFMAN_ONLY&&K!=Y.Z_RLE&&K!=Y.Z_FIXED&&K!=Y.Z_DEFAULT_STRATEGY)throw new TypeError("Invalid strategy: "+K);if(this._level!==j||this._strategy!==K){var I=this;this.flush(L.Z_SYNC_FLUSH,function(){if(C(I._handle,"zlib binding closed"),I._handle.params(j,K),!I._hadError){if(I._level=j,I._strategy=K,O)O()}})}else process.nextTick(O)},z.prototype.reset=function(){return C(this._handle,"zlib binding closed"),this._handle.reset()},z.prototype._flush=function(j){this._transform(g.alloc(0),"",j)},z.prototype.flush=function(j,K){var O=this,I=this._writableState;if(typeof j==="function"||j===void 0&&!K)K=j,j=L.Z_FULL_FLUSH;if(I.ended){if(K)process.nextTick(K)}else if(I.ending){if(K)this.once("end",K)}else if(I.needDrain){if(K)this.once("drain",function(){return O.flush(j,K)})}else this._flushFlag=j,this.write(g.alloc(0),"",K)},z.prototype.close=function(j){h(this,j),process.nextTick(V0,this)};function h(j,K){if(K)process.nextTick(K);if(!j._handle)return;j._handle.close(),j._handle=null}function V0(j){j.emit("close")}z.prototype._transform=function(j,K,O){var I,c=this._writableState,l=c.ending||c.ended,D=l&&(!j||c.length===j.length);if(j!==null&&!g.isBuffer(j))return O(new Error("invalid input"));if(!this._handle)return O(new Error("zlib binding closed"));if(D)I=this._finishFlushFlag;else if(I=this._flushFlag,j.length>=c.length)this._flushFlag=this._opts.flush||L.Z_NO_FLUSH;this._processChunk(j,I,O)},z.prototype._processChunk=function(j,K,O){var I=j&&j.length,c=this._chunkSize-this._offset,l=0,D=this,Q0=typeof O==="function";if(!Q0){var i=[],H0=0,N0;this.on("error",function(a){N0=a}),C(this._handle,"zlib binding closed");do var I0=this._handle.writeSync(K,j,l,I,this._buffer,this._offset,c);while(!this._hadError&&U0(I0[0],I0[1]));if(this._hadError)throw N0;if(H0>=w)throw h(this),new RangeError(v);var K0=g.concat(i,H0);return h(this),K0}C(this._handle,"zlib binding closed");var X0=this._handle.write(K,j,l,I,this._buffer,this._offset,c);X0.buffer=j,X0.callback=U0;function U0(a,Y0){if(this)this.buffer=null,this.callback=null;if(D._hadError)return;var r=c-Y0;if(C(r>=0,"have should not go down"),r>0){var z0=D._buffer.slice(D._offset,D._offset+r);if(D._offset+=r,Q0)D.push(z0);else i.push(z0),H0+=z0.length}if(Y0===0||D._offset>=D._chunkSize)c=D._chunkSize,D._offset=0,D._buffer=g.allocUnsafe(D._chunkSize);if(Y0===0){if(l+=I-a,I=a,!Q0)return!0;var Z0=D._handle.write(K,j,l,I,D._buffer,D._offset,D._chunkSize);Z0.callback=U0,Z0.buffer=j;return}if(!Q0)return!1;O()}},n.inherits(W0,z),n.inherits(E,z),n.inherits(S,z),n.inherits(J0,z),n.inherits(G0,z),n.inherits(F0,z),n.inherits(f,z)}}),$0=c1();$0[Symbol.for("CommonJS")]=0;var a1=$0;j1=$0.Deflate;J1=$0.Inflate;Y1=$0.Gzip;G1=$0.Gunzip;q1=$0.DeflateRaw;X1=$0.InflateRaw;U1=$0.Unzip;P1=$0.createDeflate;K1=$0.createInflate;F1=$0.createDeflateRaw;H1=$0.createInflateRaw;z1=$0.createGzip;Z1=$0.createGunzip;L1=$0.createUnzip;C1=$0.deflate;N1=$0.deflateSync;I1=$0.gzip;O1=$0.gzipSync;B1=$0.deflateRaw;D1=$0.deflateRawSync;M1=$0.unzip;k1=$0.unzipSync;v1=$0.inflate;R1=$0.inflateSync;A1=$0.gunzip;g1=$0.gunzipSync;w1=$0.inflateRaw;T1=$0.inflateRawSync;S1=$0.constants;export{k1 as unzipSync,M1 as unzip,R1 as inflateSync,T1 as inflateRawSync,w1 as inflateRaw,v1 as inflate,O1 as gzipSync,I1 as gzip,g1 as gunzipSync,A1 as gunzip,N1 as deflateSync,D1 as deflateRawSync,B1 as deflateRaw,C1 as deflate,a1 as default,L1 as createUnzip,H1 as createInflateRaw,K1 as createInflate,z1 as createGzip,Z1 as createGunzip,F1 as createDeflateRaw,P1 as createDeflate,S1 as constants,U1 as Unzip,X1 as InflateRaw,J1 as Inflate,Y1 as Gzip,G1 as Gunzip,q1 as DeflateRaw,j1 as Deflate}; diff --git a/src/url.zig b/src/url.zig index 550704491..605f438ee 100644 --- a/src/url.zig +++ b/src/url.zig @@ -906,10 +906,10 @@ pub const FormData = struct { this.allocator.destroy(this); } - pub fn toJS(this: *AsyncFormData, global: *bun.JSC.JSGlobalObject, data: []const u8, promise: bun.JSC.AnyPromise) void { + pub fn toJS(this: *AsyncFormData, global: *JSC.JSGlobalObject, data: []const u8, promise: JSC.AnyPromise) void { if (this.encoding == .Multipart and this.encoding.Multipart.len == 0) { log("AsnycFormData.toJS -> promise.reject missing boundary", .{}); - promise.reject(global, bun.JSC.ZigString.init("FormData missing boundary").toErrorInstance(global)); + promise.reject(global, JSC.ZigString.init("FormData missing boundary").toErrorInstance(global)); return; } @@ -955,47 +955,113 @@ pub const FormData = struct { }; pub const External = extern struct { - name: bun.JSC.ZigString, - value: bun.JSC.ZigString, - blob: ?*bun.JSC.WebCore.Blob = null, + name: JSC.ZigString, + value: JSC.ZigString, + blob: ?*JSC.WebCore.Blob = null, }; }; - pub fn toJS(globalThis: *bun.JSC.JSGlobalObject, input: []const u8, encoding: Encoding) !bun.JSC.JSValue { + pub fn toJS(globalThis: *JSC.JSGlobalObject, input: []const u8, encoding: Encoding) !JSC.JSValue { switch (encoding) { .URLEncoded => { - var str = bun.JSC.ZigString.fromUTF8(input); - return bun.JSC.DOMFormData.createFromURLQuery(globalThis, &str); + var str = JSC.ZigString.fromUTF8(input); + return JSC.DOMFormData.createFromURLQuery(globalThis, &str); }, .Multipart => |boundary| return toJSFromMultipartData(globalThis, input, boundary), } } + const JSC = bun.JSC; + + pub fn jsFunctionFromMultipartData( + globalThis: *JSC.JSGlobalObject, + callframe: *JSC.CallFrame, + ) callconv(.C) JSC.JSValue { + JSC.markBinding(@src()); + + const args_ = callframe.arguments(2); + + const args = args_.ptr[0..2]; + + const input_value = args[0]; + const boundary_value = args[1]; + var boundary_slice = JSC.ZigString.Slice.empty; + defer boundary_slice.deinit(); + + var encoding = Encoding{ + .URLEncoded = {}, + }; + + if (input_value.isEmptyOrUndefinedOrNull()) { + globalThis.throwInvalidArguments("input must not be empty", .{}); + return .zero; + } + + if (!boundary_value.isEmptyOrUndefinedOrNull()) { + if (boundary_value.asArrayBuffer(globalThis)) |array_buffer| { + if (array_buffer.byteSlice().len > 0) + encoding = .{ .Multipart = array_buffer.byteSlice() }; + } else if (boundary_value.isString()) { + boundary_slice = boundary_value.toSliceOrNull(globalThis) orelse return .zero; + if (boundary_slice.len > 0) { + encoding = .{ .Multipart = boundary_slice.slice() }; + } + } else { + globalThis.throwInvalidArguments("boundary must be a string or ArrayBufferView", .{}); + return .zero; + } + } + var input_slice = JSC.ZigString.Slice{}; + defer input_slice.deinit(); + var input: []const u8 = ""; + + if (input_value.asArrayBuffer(globalThis)) |array_buffer| { + input = array_buffer.byteSlice(); + } else if (input_value.isString()) { + input_slice = input_value.toSliceOrNull(globalThis) orelse return .zero; + input = input_slice.slice(); + } else if (input_value.as(JSC.WebCore.Blob)) |blob| { + input = blob.sharedView(); + } else { + globalThis.throwInvalidArguments("input must be a string or ArrayBufferView", .{}); + return .zero; + } + + return FormData.toJS(globalThis, input, encoding) catch |err| { + globalThis.throwError(err, "while parsing FormData"); + return .zero; + }; + } + + comptime { + if (!JSC.is_bindgen) + @export(jsFunctionFromMultipartData, .{ .name = "FormData__jsFunctionFromMultipartData" }); + } pub fn toJSFromMultipartData( - globalThis: *bun.JSC.JSGlobalObject, + globalThis: *JSC.JSGlobalObject, input: []const u8, boundary: []const u8, - ) !bun.JSC.JSValue { - const form_data_value = bun.JSC.DOMFormData.create(globalThis); + ) !JSC.JSValue { + const form_data_value = JSC.DOMFormData.create(globalThis); form_data_value.ensureStillAlive(); - var form = bun.JSC.DOMFormData.fromJS(form_data_value) orelse { + var form = JSC.DOMFormData.fromJS(form_data_value) orelse { log("failed to create DOMFormData.fromJS", .{}); return error.@"failed to parse multipart data"; }; const Wrapper = struct { - globalThis: *bun.JSC.JSGlobalObject, - form: *bun.JSC.DOMFormData, + globalThis: *JSC.JSGlobalObject, + form: *JSC.DOMFormData, pub fn onEntry(wrap: *@This(), name: bun.Semver.String, field: Field, buf: []const u8) void { var value_str = field.value.slice(buf); - var key = bun.JSC.ZigString.initUTF8(name.slice(buf)); + var key = JSC.ZigString.initUTF8(name.slice(buf)); if (field.is_file) { var filename_str = field.filename.slice(buf); - var blob = bun.JSC.WebCore.Blob.create(value_str, bun.default_allocator, wrap.globalThis, false); + var blob = JSC.WebCore.Blob.create(value_str, bun.default_allocator, wrap.globalThis, false); defer blob.detach(); - var filename = bun.JSC.ZigString.initUTF8(filename_str); + var filename = JSC.ZigString.initUTF8(filename_str); const content_type: []const u8 = brk: { if (!field.content_type.isEmpty()) { break :brk field.content_type.slice(buf); @@ -1027,7 +1093,7 @@ pub const FormData = struct { wrap.form.appendBlob(wrap.globalThis, &key, &blob, &filename); } else { - var value = bun.JSC.ZigString.initUTF8(value_str); + var value = JSC.ZigString.initUTF8(value_str); wrap.form.append(&key, &value); } } diff --git a/test/js/web/html/FormData.test.ts b/test/js/web/html/FormData.test.ts index 45b4f2f5a..8c66abb10 100644 --- a/test/js/web/html/FormData.test.ts +++ b/test/js/web/html/FormData.test.ts @@ -226,6 +226,21 @@ describe("FormData", () => { } }); + test("FormData.from (URLSearchParams)", () => { + expect( + // @ts-expect-error + FormData.from( + new URLSearchParams({ + a: "b", + c: "d", + }).toString(), + ).toJSON(), + ).toEqual({ + a: "b", + c: "d", + }); + }); + it("should throw on bad boundary", async () => { const response = new Response('foo\r\nContent-Disposition: form-data; name="foo"\r\n\r\nbar\r\n', { headers: { diff --git a/test/js/web/streams/streams.test.js b/test/js/web/streams/streams.test.js index 5fc25b37c..55843cb23 100644 --- a/test/js/web/streams/streams.test.js +++ b/test/js/web/streams/streams.test.js @@ -1,13 +1,167 @@ import { file, readableStreamToArrayBuffer, readableStreamToArray, readableStreamToText, ArrayBufferSink } from "bun"; -import { expect, it, beforeEach, afterEach, describe } from "bun:test"; +import { expect, it, beforeEach, afterEach, describe, test } from "bun:test"; import { mkfifo } from "mkfifo"; import { realpathSync, unlinkSync, writeFileSync } from "node:fs"; import { join } from "node:path"; import { tmpdir } from "os"; -import { gc } from "harness"; -beforeEach(() => gc()); -afterEach(() => gc()); +describe("readableStreamToFormData", () => { + const fixtures = { + withTextFile: [ + [ + "--WebKitFormBoundary7MA4YWxkTrZu0gW\r\n", + 'Content-Disposition: form-data; name="file"; filename="test.txt"\r\n', + "Content-Type: text/plain\r\n", + "\r\n", + "hello world", + "\r\n", + "--WebKitFormBoundary7MA4YWxkTrZu0gW--\r\n", + "\r\n", + ], + (() => { + const fd = new FormData(); + fd.append("file", new Blob(["hello world"]), "test.txt"); + return fd; + })(), + ], + withTextFileAndField: [ + [ + "--WebKitFormBoundary7MA4YWxkTrZu0gW\r\n", + 'Content-Disposition: form-data; name="field"\r\n', + "\r\n", + "value", + "\r\n", + "--WebKitFormBoundary7MA4YWxkTrZu0gW\r\n", + 'Content-Disposition: form-data; name="file"; filename="test.txt"\r\n', + "Content-Type: text/plain\r\n", + "\r\n", + "hello world", + "\r\n", + "--WebKitFormBoundary7MA4YWxkTrZu0gW--\r\n", + "\r\n", + ], + (() => { + const fd = new FormData(); + fd.append("file", new Blob(["hello world"]), "test.txt"); + fd.append("field", "value"); + return fd; + })(), + ], + + with1Field: [ + [ + "--WebKitFormBoundary7MA4YWxkTrZu0gW\r\n", + 'Content-Disposition: form-data; name="field"\r\n', + "\r\n", + "value", + "\r\n", + "--WebKitFormBoundary7MA4YWxkTrZu0gW--\r\n", + "\r\n", + ], + (() => { + const fd = new FormData(); + fd.append("field", "value"); + return fd; + })(), + ], + + empty: [["--WebKitFormBoundary7MA4YWxkTrZu0gW--\r\n", "\r\n"], new FormData()], + }; + for (let name in fixtures) { + const [chunks, expected] = fixtures[name]; + function responseWithStart(start) { + return new Response( + new ReadableStream({ + start(controller) { + for (let chunk of chunks) { + controller.enqueue(chunk); + } + controller.close(); + }, + }), + { + headers: { + "content-type": "multipart/form-data; boundary=WebKitFormBoundary7MA4YWxkTrZu0gW", + }, + }, + ); + } + + function responseWithPull(start) { + return new Response( + new ReadableStream({ + pull(controller) { + for (let chunk of chunks) { + controller.enqueue(chunk); + } + controller.close(); + }, + }), + { + headers: { + "content-type": "multipart/form-data; boundary=WebKitFormBoundary7MA4YWxkTrZu0gW", + }, + }, + ); + } + + function responseWithPullAsync(start) { + return new Response( + new ReadableStream({ + async pull(controller) { + for (let chunk of chunks) { + await Bun.sleep(0); + controller.enqueue(chunk); + } + controller.close(); + }, + }), + { + headers: { + "content-type": "multipart/form-data; boundary=WebKitFormBoundary7MA4YWxkTrZu0gW", + }, + }, + ); + } + + test("response.formData()", async () => { + expect((await responseWithPull().formData()).toJSON()).toEqual(expected.toJSON()); + expect((await responseWithStart().formData()).toJSON()).toEqual(expected.toJSON()); + expect((await responseWithPullAsync().formData()).toJSON()).toEqual(expected.toJSON()); + }); + + test("Bun.readableStreamToFormData", async () => { + expect( + ( + await Bun.readableStreamToFormData(await responseWithPull().body, "WebKitFormBoundary7MA4YWxkTrZu0gW") + ).toJSON(), + ).toEqual(expected.toJSON()); + }); + + test("FormData.from", async () => { + expect(FormData.from(await responseWithPull().text(), "WebKitFormBoundary7MA4YWxkTrZu0gW").toJSON()).toEqual( + expected.toJSON(), + ); + + expect(FormData.from(await responseWithPull().blob(), "WebKitFormBoundary7MA4YWxkTrZu0gW").toJSON()).toEqual( + expected.toJSON(), + ); + + expect( + FormData.from( + await (await responseWithPull().blob()).arrayBuffer(), + "WebKitFormBoundary7MA4YWxkTrZu0gW", + ).toJSON(), + ).toEqual(expected.toJSON()); + }); + } + + test("URL-encoded example", async () => { + const stream = new Response("hello=123").body; + const formData = await Bun.readableStreamToFormData(stream); + expect(formData.get("hello")).toBe("123"); + }); +}); describe("WritableStream", () => { it("works", async () => { |