From aa5432e162be03dbeddb25c5145169859eaeef32 Mon Sep 17 00:00:00 2001 From: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> Date: Sun, 25 Jun 2023 11:33:13 -0700 Subject: [PATCH 01/15] FIx launch.json cwd --- .vscode/launch.json | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index ea8218179e367..22c8bdaddd38c 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -14,7 +14,8 @@ "name": "bun test [file]", "program": "bun-debug", "args": ["test", "${file}"], - "cwd": "${fileDirname}", + // The cwd here must be the same as in CI. Or you will cause test failures that only happen in CI. + "cwd": "${workspaceFolder}/test", "env": { "FORCE_COLOR": "1", "BUN_DEBUG_QUIET_LOGS": "1", @@ -29,7 +30,8 @@ "name": "bun test [file] (fast)", "program": "bun-debug", "args": ["test", "${file}"], - "cwd": "${fileDirname}", + // The cwd here must be the same as in CI. Or you will cause test failures that only happen in CI. + "cwd": "${workspaceFolder}/test", "env": { "FORCE_COLOR": "1", "BUN_DEBUG_QUIET_LOGS": "1" @@ -44,7 +46,8 @@ "name": "bun test [file] (verbose)", "program": "bun-debug", "args": ["test", "${file}"], - "cwd": "${fileDirname}", + // The cwd here must be the same as in CI. Or you will cause test failures that only happen in CI. + "cwd": "${workspaceFolder}/test", "env": { "FORCE_COLOR": "1" }, @@ -57,7 +60,8 @@ "name": "bun test [file] --watch", "program": "bun-debug", "args": ["test", "--watch", "${file}"], - "cwd": "${fileDirname}", + // The cwd here must be the same as in CI. Or you will cause test failures that only happen in CI. + "cwd": "${workspaceFolder}/test", "env": { "FORCE_COLOR": "1", "BUN_DEBUG_QUIET_LOGS": "1" @@ -71,7 +75,8 @@ "name": "bun test [file] --only", "program": "bun-debug", "args": ["test", "--only", "${file}"], - "cwd": "${fileDirname}", + // The cwd here must be the same as in CI. Or you will cause test failures that only happen in CI. + "cwd": "${workspaceFolder}/test", "env": { "FORCE_COLOR": "1", "BUN_DEBUG_QUIET_LOGS": "1" @@ -100,6 +105,7 @@ "name": "bun test [*] (fast)", "program": "bun-debug", "args": ["test"], + // The cwd here must be the same as in CI. Or you will cause test failures that only happen in CI. "cwd": "${workspaceFolder}/test", "env": { "FORCE_COLOR": "1", @@ -114,6 +120,7 @@ "name": "bun test [*] --only", "program": "bun-debug", "args": ["test", "--only"], + // The cwd here must be the same as in CI. Or you will cause test failures that only happen in CI. "cwd": "${workspaceFolder}/test", "env": { "FORCE_COLOR": "1", From 5bd94b8f47efab5ca736e6ec76b72e991df1da11 Mon Sep 17 00:00:00 2001 From: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> Date: Sun, 25 Jun 2023 11:43:54 -0700 Subject: [PATCH 02/15] Add `process.mainModule` --- src/bun.js/bindings/Process.cpp | 12 ++++++++++++ test/cli/run/require-cache-fixture.cjs | 5 +++++ 2 files changed, 17 insertions(+) diff --git a/src/bun.js/bindings/Process.cpp b/src/bun.js/bindings/Process.cpp index 69ee11e60f230..a369faee25cbd 100644 --- a/src/bun.js/bindings/Process.cpp +++ b/src/bun.js/bindings/Process.cpp @@ -10,6 +10,7 @@ #include "ImportMetaObject.h" #include #include "ZigConsoleClient.h" +#include #pragma mark - Node.js Process namespace Zig { @@ -787,6 +788,17 @@ void Process::finishCreation(JSC::VM& vm) this->putDirectNativeFunction(vm, globalObject, JSC::Identifier::fromString(this->vm(), "emitWarning"_s), 1, Process_emitWarning, ImplementationVisibility::Public, NoIntrinsic, 0); + + JSC::JSFunction* requireDotMainFunction = JSFunction::create( + vm, + moduleMainCodeGenerator(vm), + globalObject->globalScope()); + // https://nodejs.org/api/process.html#processmainmodule + this->putDirect( + vm, + JSC::Identifier::fromString(vm, "mainModule"_s), + JSC::GetterSetter::create(vm, globalObject, requireDotMainFunction, JSValue()), + PropertyAttribute::Builtin | PropertyAttribute::Accessor | PropertyAttribute::ReadOnly | PropertyAttribute::DontEnum | 0); } const JSC::ClassInfo Process::s_info = { "Process"_s, &Base::s_info, nullptr, nullptr, diff --git a/test/cli/run/require-cache-fixture.cjs b/test/cli/run/require-cache-fixture.cjs index ce02b86d7a011..838be9cebdca0 100644 --- a/test/cli/run/require-cache-fixture.cjs +++ b/test/cli/run/require-cache-fixture.cjs @@ -8,6 +8,11 @@ if (require.main !== module) { throw new Error("require.main !== module"); } +if (process.mainModule !== module) { + console.error(__filename, module.id); + throw new Error("process.mainModule !== module"); +} + if (__filename !== resolve(module.filename)) { console.error(__filename, module.id); throw new Error("__filename !== module.id"); From 33903ea892db861416f1f68d4c40536540719f4e Mon Sep 17 00:00:00 2001 From: "Alex Lam S.L" Date: Mon, 26 Jun 2023 01:43:58 +0300 Subject: [PATCH 03/15] [install] fix hang in `bun install --production` (#3406) --- src/install/lockfile.zig | 13 ++++---- test/cli/install/bun-install.test.ts | 49 ++++++++++++++++++++++------ 2 files changed, 46 insertions(+), 16 deletions(-) diff --git a/src/install/lockfile.zig b/src/install/lockfile.zig index ce9199ab33681..b17691853593b 100644 --- a/src/install/lockfile.zig +++ b/src/install/lockfile.zig @@ -2033,19 +2033,20 @@ pub const Package = extern struct { cloner.trees_count += @as(u32, @intFromBool(old_resolutions.len > 0)); - for (old_resolutions, 0..) |old_resolution, i| { - if (old_resolution >= max_package_id) continue; + for (old_resolutions, resolutions, 0..) |old_resolution, *resolution, i| { + if (old_resolution >= max_package_id) { + resolution.* = invalid_package_id; + continue; + } const mapped = package_id_mapping[old_resolution]; - const resolve_id = new_package.resolutions.off + @intCast(PackageID, i); - if (mapped < max_package_id) { - resolutions[i] = mapped; + resolution.* = mapped; } else { try cloner.clone_queue.append(.{ .old_resolution = old_resolution, .parent = new_package.meta.id, - .resolve_id = resolve_id, + .resolve_id = new_package.resolutions.off + @intCast(PackageID, i), }); } } diff --git a/test/cli/install/bun-install.test.ts b/test/cli/install/bun-install.test.ts index f44dc5a7eff07..4b3342e3ae3d6 100644 --- a/test/cli/install/bun-install.test.ts +++ b/test/cli/install/bun-install.test.ts @@ -4259,7 +4259,11 @@ it("should perform bin-linking across multiple dependencies", async () => { cache = false `, ); - const { stdout, stderr, exited } = spawn({ + const { + stdout: stdout1, + stderr: stderr1, + exited: exited1, + } = spawn({ cmd: [bunExe(), "install"], cwd: package_dir, stdout: null, @@ -4267,13 +4271,13 @@ cache = false stderr: "pipe", env, }); - expect(stderr).toBeDefined(); - const err = await new Response(stderr).text(); - expect(err).toContain("Saved lockfile"); - expect(err).not.toContain("error:"); - expect(stdout).toBeDefined(); - const out = await new Response(stdout).text(); - expect(out.replace(/\s*\[[0-9\.]+m?s\]\s*$/, "").split(/\r?\n/)).toEqual([ + expect(stderr1).toBeDefined(); + const err1 = await new Response(stderr1).text(); + expect(err1).toContain("Saved lockfile"); + expect(err1).not.toContain("error:"); + expect(stdout1).toBeDefined(); + const out1 = await new Response(stdout1).text(); + expect(out1.replace(/\s*\[[0-9\.]+m?s\]\s*$/, "").split(/\r?\n/)).toEqual([ " + conditional-type-checks@1.0.6", " + prettier@2.8.8", " + tsd@0.22.0", @@ -4281,7 +4285,7 @@ cache = false "", " 119 packages installed", ]); - expect(await exited).toBe(0); + expect(await exited1).toBe(0); expect(await readdirSorted(package_dir)).toEqual(["bun.lockb", "bunfig.toml", "node_modules", "package.json"]); expect(await file(join(package_dir, "package.json")).text()).toEqual(foo_package); expect(await readdirSorted(join(package_dir, "node_modules"))).toEqual([ @@ -4394,4 +4398,29 @@ cache = false "tsd", "tsserver", ]); -}, 10000); + // Perform `bun install --production` with lockfile from before + await rm(join(package_dir, "node_modules"), { force: true, recursive: true }); + const { + stdout: stdout2, + stderr: stderr2, + exited: exited2, + } = spawn({ + cmd: [bunExe(), "install", "--production"], + cwd: package_dir, + stdout: null, + stdin: "pipe", + stderr: "pipe", + env, + }); + expect(stderr2).toBeDefined(); + const err2 = await new Response(stderr2).text(); + expect(err2).not.toContain("Saved lockfile"); + expect(err2).not.toContain("error:"); + expect(stdout2).toBeDefined(); + const out2 = await new Response(stdout2).text(); + expect(out2.replace(/\[[0-9\.]+m?s\]/, "[]").split(/\r?\n/)).toEqual(["[] done", ""]); + expect(await exited2).toBe(0); + expect(await readdirSorted(package_dir)).toEqual(["bun.lockb", "bunfig.toml", "node_modules", "package.json"]); + expect(await file(join(package_dir, "package.json")).text()).toEqual(foo_package); + expect(await readdirSorted(join(package_dir, "node_modules"))).toEqual([]); +}, 20000); From fcf9f0a7eeb3d462d5c6c2110ecdf5a4460c1736 Mon Sep 17 00:00:00 2001 From: Ai Hoshino Date: Mon, 26 Jun 2023 07:15:56 +0800 Subject: [PATCH 04/15] Fix the parameters of WriteStream constructor. (#3402) * Fix the parameters of the `WriteStream` constructor. Close: https://github.com/oven-sh/bun/issues/3395 * test append mode in `createWriteStream` * fix lint * wait first stream finished --- src/js/node/fs.js | 4 ++-- test/js/node/fs/fs.test.ts | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+), 2 deletions(-) diff --git a/src/js/node/fs.js b/src/js/node/fs.js index 2bd752d190055..8d9f0d235b0b6 100644 --- a/src/js/node/fs.js +++ b/src/js/node/fs.js @@ -642,8 +642,8 @@ WriteStream = (function (InternalWriteStream) { }); return Object.defineProperty( - function WriteStream(options) { - return new InternalWriteStream(options); + function WriteStream(path, options) { + return new InternalWriteStream(path, options); }, Symbol.hasInstance, { diff --git a/test/js/node/fs/fs.test.ts b/test/js/node/fs/fs.test.ts index 37c3253a4cbc0..0353968feeb22 100644 --- a/test/js/node/fs/fs.test.ts +++ b/test/js/node/fs/fs.test.ts @@ -1068,6 +1068,44 @@ describe("createWriteStream", () => { expect(exception.code).toBe("ERR_INVALID_ARG_TYPE"); } }); + + it("writing in append mode should not truncate the file", async () => { + const path = `${tmpdir()}/fs.test.js/${Date.now()}.createWriteStreamAppend.txt`; + const stream = createWriteStream(path, { + // @ts-ignore-next-line + flags: "a", + }); + stream.write("first line\n"); + stream.end(); + + await new Promise((resolve, reject) => { + stream.on("error", e => { + reject(e); + }); + + stream.on("finish", () => { + resolve(true); + }); + }); + + const stream2 = createWriteStream(path, { + // @ts-ignore-next-line + flags: "a", + }); + stream2.write("second line\n"); + stream2.end(); + + return await new Promise((resolve, reject) => { + stream2.on("error", e => { + reject(e); + }); + + stream2.on("finish", () => { + expect(readFileSync(path, "utf8")).toBe("first line\nsecond line\n"); + resolve(true); + }); + }); + }); }); describe("fs/promises", () => { From 3ed28f2828a29129a1791b7a4f6935d842d6493c Mon Sep 17 00:00:00 2001 From: Ciro Spaciari Date: Sun, 25 Jun 2023 20:16:25 -0300 Subject: [PATCH 05/15] [fs.watch] fix reference/deinit (#3396) * fix js reference * fix close oops * refactor + hasPendingActivity * fmt * fix race conditions * fixup * add test calling close on error event * fix close inside close + test * cleanup --- src/bun.js/WebKit | 2 +- src/bun.js/bindings/JSSink.cpp | 2 +- src/bun.js/bindings/JSSink.h | 2 +- src/bun.js/bindings/ZigGeneratedClasses.cpp | 10 + src/bun.js/bindings/ZigGeneratedClasses.h | 27 + src/bun.js/bindings/generated_classes.zig | 1 + .../bindings/generated_classes_list.zig | 2 +- src/bun.js/node/node.classes.ts | 1 + src/bun.js/node/node_fs_watcher.zig | 500 +++++++++--------- src/watcher.zig | 20 +- test/js/node/watch/fs.watch.test.js | 45 +- 11 files changed, 352 insertions(+), 260 deletions(-) diff --git a/src/bun.js/WebKit b/src/bun.js/WebKit index 4c8ab8fdfb102..b2f1006a06f81 160000 --- a/src/bun.js/WebKit +++ b/src/bun.js/WebKit @@ -1 +1 @@ -Subproject commit 4c8ab8fdfb102522fdd8e55d4eea53e8ce2755c2 +Subproject commit b2f1006a06f81bc860c89dd4c7cec3e7117c4c4c diff --git a/src/bun.js/bindings/JSSink.cpp b/src/bun.js/bindings/JSSink.cpp index 4acf01ff78339..19bf055991aa7 100644 --- a/src/bun.js/bindings/JSSink.cpp +++ b/src/bun.js/bindings/JSSink.cpp @@ -1,6 +1,6 @@ // AUTO-GENERATED FILE. DO NOT EDIT. -// Generated by 'make generate-sink' at 2023-06-14T21:38:04.394Z +// Generated by 'make generate-sink' at 2023-06-25T17:34:54.187Z // To regenerate this file, run: // // make generate-sink diff --git a/src/bun.js/bindings/JSSink.h b/src/bun.js/bindings/JSSink.h index 37c458e9b7b32..9bf5554c44ca5 100644 --- a/src/bun.js/bindings/JSSink.h +++ b/src/bun.js/bindings/JSSink.h @@ -1,6 +1,6 @@ // AUTO-GENERATED FILE. DO NOT EDIT. -// Generated by 'make generate-sink' at 2023-06-14T21:38:04.394Z +// Generated by 'make generate-sink' at 2023-06-25T17:34:54.186Z // #pragma once diff --git a/src/bun.js/bindings/ZigGeneratedClasses.cpp b/src/bun.js/bindings/ZigGeneratedClasses.cpp index e0a3f33d62694..387580d540d0b 100644 --- a/src/bun.js/bindings/ZigGeneratedClasses.cpp +++ b/src/bun.js/bindings/ZigGeneratedClasses.cpp @@ -5565,6 +5565,12 @@ void JSFSWatcherPrototype::finishCreation(JSC::VM& vm, JSC::JSGlobalObject* glob JSC_TO_STRING_TAG_WITHOUT_TRANSITION(); } +extern "C" bool FSWatcher__hasPendingActivity(void* ptr); +bool JSFSWatcher::hasPendingActivity(void* ctx) +{ + return FSWatcher__hasPendingActivity(ctx); +} + JSFSWatcher::~JSFSWatcher() { if (m_ctx) { @@ -5649,6 +5655,8 @@ void JSFSWatcher::visitChildrenImpl(JSCell* cell, Visitor& visitor) ASSERT_GC_OBJECT_INHERITS(thisObject, info()); Base::visitChildren(thisObject, visitor); visitor.append(thisObject->m_listener); + + visitor.addOpaqueRoot(thisObject->wrapped()); } DEFINE_VISIT_CHILDREN(JSFSWatcher); @@ -5659,6 +5667,8 @@ void JSFSWatcher::visitAdditionalChildren(Visitor& visitor) JSFSWatcher* thisObject = this; ASSERT_GC_OBJECT_INHERITS(thisObject, info()); visitor.append(thisObject->m_listener); + + visitor.addOpaqueRoot(this->wrapped()); } DEFINE_VISIT_ADDITIONAL_CHILDREN(JSFSWatcher); diff --git a/src/bun.js/bindings/ZigGeneratedClasses.h b/src/bun.js/bindings/ZigGeneratedClasses.h index 3fa0e26d2ff9c..1631f960e775d 100644 --- a/src/bun.js/bindings/ZigGeneratedClasses.h +++ b/src/bun.js/bindings/ZigGeneratedClasses.h @@ -623,10 +623,37 @@ class JSFSWatcher final : public JSC::JSDestructibleObject { : Base(vm, structure) { m_ctx = sinkPtr; + m_weakThis = JSC::Weak(this, getOwner()); } void finishCreation(JSC::VM&); + JSC::Weak m_weakThis; + + static bool hasPendingActivity(void* ctx); + + class Owner final : public JSC::WeakHandleOwner { + public: + bool isReachableFromOpaqueRoots(JSC::Handle handle, void* context, JSC::AbstractSlotVisitor& visitor, const char** reason) final + { + auto* controller = JSC::jsCast(handle.slot()->asCell()); + if (JSFSWatcher::hasPendingActivity(controller->wrapped())) { + if (UNLIKELY(reason)) + *reason = "has pending activity"; + return true; + } + + return visitor.containsOpaqueRoot(context); + } + void finalize(JSC::Handle, void* context) final {} + }; + + static JSC::WeakHandleOwner* getOwner() + { + static NeverDestroyed m_owner; + return &m_owner.get(); + } + DECLARE_VISIT_CHILDREN; template void visitAdditionalChildren(Visitor&); DECLARE_VISIT_OUTPUT_CONSTRAINTS; diff --git a/src/bun.js/bindings/generated_classes.zig b/src/bun.js/bindings/generated_classes.zig index 74e30cd835bf2..bdde69c1a1387 100644 --- a/src/bun.js/bindings/generated_classes.zig +++ b/src/bun.js/bindings/generated_classes.zig @@ -1492,6 +1492,7 @@ pub const JSFSWatcher = struct { @export(FSWatcher.doRef, .{ .name = "FSWatcherPrototype__doRef" }); @export(FSWatcher.doUnref, .{ .name = "FSWatcherPrototype__doUnref" }); @export(FSWatcher.finalize, .{ .name = "FSWatcherClass__finalize" }); + @export(FSWatcher.hasPendingActivity, .{ .name = "FSWatcher__hasPendingActivity" }); @export(FSWatcher.hasRef, .{ .name = "FSWatcherPrototype__hasRef" }); } } diff --git a/src/bun.js/bindings/generated_classes_list.zig b/src/bun.js/bindings/generated_classes_list.zig index d90267337bdef..543d492b5ab35 100644 --- a/src/bun.js/bindings/generated_classes_list.zig +++ b/src/bun.js/bindings/generated_classes_list.zig @@ -37,5 +37,5 @@ pub const Classes = struct { pub const BuildArtifact = JSC.API.BuildArtifact; pub const BuildMessage = JSC.BuildMessage; pub const ResolveMessage = JSC.ResolveMessage; - pub const FSWatcher = JSC.Node.FSWatcher.JSObject; + pub const FSWatcher = JSC.Node.FSWatcher; }; diff --git a/src/bun.js/node/node.classes.ts b/src/bun.js/node/node.classes.ts index ce35c940af553..2efad52451dcf 100644 --- a/src/bun.js/node/node.classes.ts +++ b/src/bun.js/node/node.classes.ts @@ -7,6 +7,7 @@ export default [ noConstructor: true, finalize: true, configurable: false, + hasPendingActivity: true, klass: {}, JSType: "0b11101110", proto: { diff --git a/src/bun.js/node/node_fs_watcher.zig b/src/bun.js/node/node_fs_watcher.zig index 397d519161c1f..b1f4ec8a9c5c9 100644 --- a/src/bun.js/node/node_fs_watcher.zig +++ b/src/bun.js/node/node_fs_watcher.zig @@ -4,6 +4,7 @@ const bun = @import("root").bun; const Fs = @import("../../fs.zig"); const Path = @import("../../resolver/resolve_path.zig"); const Encoder = JSC.WebCore.Encoder; +const Mutex = @import("../../lock.zig").Lock; const FSEvents = @import("./fs_events.zig"); @@ -30,17 +31,28 @@ pub const FSWatcher = struct { onAccept: std.ArrayHashMapUnmanaged(FSWatcher.Watcher.HashType, bun.BabyList(OnAcceptCallback), bun.ArrayIdentityContext, false) = .{}, ctx: *VirtualMachine, - js_watcher: ?*JSObject = null, - watcher_instance: ?*FSWatcher.Watcher = null, verbose: bool = false, file_paths: bun.BabyList(string) = .{}, entry_path: ?string = null, entry_dir: string = "", last_change_event: ChangeEvent = .{}, - pub fn toJS(this: *FSWatcher) JSC.JSValue { - return if (this.js_watcher) |js| js.js_this else JSC.JSValue.jsUndefined(); - } + // JSObject + mutex: Mutex, + signal: ?*JSC.AbortSignal, + persistent: bool, + default_watcher: ?*FSWatcher.Watcher, + fsevents_watcher: ?*FSEvents.FSEventsWatcher, + poll_ref: JSC.PollRef = .{}, + globalThis: *JSC.JSGlobalObject, + js_this: JSC.JSValue, + encoding: JSC.Node.Encoding, + // user can call close and pre-detach so we need to track this + closed: bool, + // counts pending tasks so we only deinit after all tasks are done + task_count: u32, + has_pending_activity: std.atomic.Atomic(bool), + pub usingnamespace JSC.Codegen.JSFSWatcher; pub fn eventLoop(this: FSWatcher) *EventLoop { return this.ctx.eventLoop(); @@ -51,6 +63,9 @@ pub const FSWatcher = struct { } pub fn deinit(this: *FSWatcher) void { + // stop all managers and signals + this.detach(); + while (this.file_paths.popOrNull()) |file_path| { bun.default_allocator.destroy(file_path); } @@ -107,41 +122,47 @@ pub const FSWatcher = struct { } pub fn run(this: *FSWatchTask) void { - // this runs on JS Context - if (this.ctx.js_watcher) |js_watcher| { - for (this.entries[0..this.count]) |entry| { - switch (entry.event_type) { - .rename => { - js_watcher.emit(entry.file_path, "rename"); - }, - .change => { - js_watcher.emit(entry.file_path, "change"); - }, - .@"error" => { - // file_path is the error message in this case - js_watcher.emitError(entry.file_path); - }, - .abort => { - js_watcher.emitIfAborted(); - }, - } + // this runs on JS Context Thread + + for (this.entries[0..this.count]) |entry| { + switch (entry.event_type) { + .rename => { + this.ctx.emit(entry.file_path, "rename"); + }, + .change => { + this.ctx.emit(entry.file_path, "change"); + }, + .@"error" => { + // file_path is the error message in this case + this.ctx.emitError(entry.file_path); + }, + .abort => { + this.ctx.emitIfAborted(); + }, } } + + this.ctx.unrefTask(); } pub fn enqueue(this: *FSWatchTask) void { if (this.count == 0) return; - var that = bun.default_allocator.create(FSWatchTask) catch unreachable; + // if false is closed or detached (can still contain valid refs but will not create a new one) + if (this.ctx.refTask()) { + var that = bun.default_allocator.create(FSWatchTask) catch unreachable; - that.* = this.*; - this.count = 0; - that.concurrent_task.task = JSC.Task.init(that); - this.ctx.enqueueTaskConcurrent(&that.concurrent_task); + that.* = this.*; + this.count = 0; + that.concurrent_task.task = JSC.Task.init(that); + this.ctx.enqueueTaskConcurrent(&that.concurrent_task); + return; + } + // closed or detached so just cleanEntries + this.cleanEntries(); } - - pub fn deinit(this: *FSWatchTask) void { + pub fn cleanEntries(this: *FSWatchTask) void { while (this.count > 0) { this.count -= 1; switch (this.entries[this.count].free_type) { @@ -150,6 +171,10 @@ pub const FSWatcher = struct { else => {}, } } + } + + pub fn deinit(this: *FSWatchTask) void { + this.cleanEntries(); bun.default_allocator.destroy(this); } }; @@ -275,7 +300,7 @@ pub const FSWatcher = struct { const kinds = slice.items(.kind); var _on_file_update_path_buf: [bun.MAX_PATH_BYTES]u8 = undefined; - var ctx = this.watcher_instance.?; + var ctx = this.default_watcher.?; defer ctx.flushEvictions(); defer Output.flush(); @@ -540,241 +565,225 @@ pub const FSWatcher = struct { pub fn createFSWatcher(this: Arguments) !JSC.JSValue { const obj = try FSWatcher.init(this); - return obj.toJS(); + if (obj.js_this != .zero) { + return obj.js_this; + } + return JSC.JSValue.jsUndefined(); } }; - pub const JSObject = struct { - signal: ?*JSC.AbortSignal, - persistent: bool, - manager: ?*FSWatcher.Watcher, - fsevents_watcher: ?*FSEvents.FSEventsWatcher, - poll_ref: JSC.PollRef = .{}, - globalThis: ?*JSC.JSGlobalObject, - js_this: JSC.JSValue, - encoding: JSC.Node.Encoding, - closed: bool, - - pub usingnamespace JSC.Codegen.JSFSWatcher; - - pub fn getFSWatcher(this: *JSObject) *FSWatcher { - if (this.manager) |manager| return manager.ctx; - if (this.fsevents_watcher) |manager| return bun.cast(*FSWatcher, manager.ctx.?); - - @panic("No context attached to JSFSWatcher"); + pub fn initJS(this: *FSWatcher, listener: JSC.JSValue) void { + if (this.persistent) { + this.poll_ref.ref(this.ctx); } - pub fn init(globalThis: *JSC.JSGlobalObject, manager: ?*FSWatcher.Watcher, fsevents_watcher: ?*FSEvents.FSEventsWatcher, signal: ?*JSC.AbortSignal, listener: JSC.JSValue, persistent: bool, encoding: JSC.Node.Encoding) !*JSObject { - var obj = try globalThis.allocator().create(JSObject); - obj.* = .{ - .signal = null, - .persistent = persistent, - .manager = manager, - .fsevents_watcher = fsevents_watcher, - .globalThis = globalThis, - .js_this = .zero, - .encoding = encoding, - .closed = false, - }; - const instance = obj.getFSWatcher(); - - if (persistent) { - obj.poll_ref.ref(instance.ctx); - } - - var js_this = JSObject.toJS(obj, globalThis); - JSObject.listenerSetCached(js_this, globalThis, listener); - obj.js_this = js_this; - obj.js_this.protect(); - - if (signal) |s| { - - // already aborted? - if (s.aborted()) { - obj.signal = s.ref(); - // abort next tick - var current_task: FSWatchTask = .{ - .ctx = instance, - }; - current_task.append("", .abort, .none); - current_task.enqueue(); - } else { - // watch for abortion - obj.signal = s.ref().listen(JSObject, obj, JSObject.emitAbort); - } + const js_this = FSWatcher.toJS(this, this.globalThis); + js_this.ensureStillAlive(); + this.js_this = js_this; + FSWatcher.listenerSetCached(js_this, this.globalThis, listener); + + if (this.signal) |s| { + // already aborted? + if (s.aborted()) { + // safely abort next tick + var current_task: FSWatchTask = .{ + .ctx = this, + }; + current_task.append("", .abort, .none); + current_task.enqueue(); + } else { + // watch for abortion + this.signal = s.listen(FSWatcher, this, FSWatcher.emitAbort); } - return obj; } + } - pub fn emitIfAborted(this: *JSObject) void { - if (this.signal) |s| { - if (s.aborted()) { - const err = s.abortReason(); - this.emitAbort(err); - } + pub fn emitIfAborted(this: *FSWatcher) void { + if (this.signal) |s| { + if (s.aborted()) { + const err = s.abortReason(); + this.emitAbort(err); } } + } - pub fn emitAbort(this: *JSObject, err: JSC.JSValue) void { - if (this.closed) return; - defer this.close(true); - - err.ensureStillAlive(); - - if (this.globalThis) |globalThis| { - if (this.js_this != .zero) { - if (JSObject.listenerGetCached(this.js_this)) |listener| { - var args = [_]JSC.JSValue{ - JSC.ZigString.static("error").toValue(globalThis), - if (err.isEmptyOrUndefinedOrNull()) JSC.WebCore.AbortSignal.createAbortError(JSC.ZigString.static("The user aborted a request"), &JSC.ZigString.Empty, globalThis) else err, - }; - _ = listener.callWithGlobalThis( - globalThis, - &args, - ); - } - } + pub fn emitAbort(this: *FSWatcher, err: JSC.JSValue) void { + if (this.closed) return; + defer this.close(); + + err.ensureStillAlive(); + if (this.js_this != .zero) { + const js_this = this.js_this; + js_this.ensureStillAlive(); + if (FSWatcher.listenerGetCached(js_this)) |listener| { + listener.ensureStillAlive(); + var args = [_]JSC.JSValue{ + JSC.ZigString.static("error").toValue(this.globalThis), + if (err.isEmptyOrUndefinedOrNull()) JSC.WebCore.AbortSignal.createAbortError(JSC.ZigString.static("The user aborted a request"), &JSC.ZigString.Empty, this.globalThis) else err, + }; + _ = listener.callWithGlobalThis( + this.globalThis, + &args, + ); } } - pub fn emitError(this: *JSObject, err: string) void { - if (this.closed) return; - defer this.close(true); - - if (this.globalThis) |globalThis| { - if (this.js_this != .zero) { - if (JSObject.listenerGetCached(this.js_this)) |listener| { - var args = [_]JSC.JSValue{ - JSC.ZigString.static("error").toValue(globalThis), - JSC.ZigString.fromUTF8(err).toErrorInstance(globalThis), - }; - _ = listener.callWithGlobalThis( - globalThis, - &args, - ); - } - } + } + pub fn emitError(this: *FSWatcher, err: string) void { + if (this.closed) return; + defer this.close(); + + if (this.js_this != .zero) { + const js_this = this.js_this; + js_this.ensureStillAlive(); + if (FSWatcher.listenerGetCached(js_this)) |listener| { + listener.ensureStillAlive(); + var args = [_]JSC.JSValue{ + JSC.ZigString.static("error").toValue(this.globalThis), + JSC.ZigString.fromUTF8(err).toErrorInstance(this.globalThis), + }; + _ = listener.callWithGlobalThis( + this.globalThis, + &args, + ); } } + } - pub fn emit(this: *JSObject, file_name: string, comptime eventType: string) void { - if (this.globalThis) |globalThis| { - if (this.js_this != .zero) { - if (JSObject.listenerGetCached(this.js_this)) |listener| { - var filename: JSC.JSValue = JSC.JSValue.jsUndefined(); - if (file_name.len > 0) { - if (this.encoding == .buffer) - filename = JSC.ArrayBuffer.createBuffer(globalThis, file_name) - else if (this.encoding == .utf8) { - filename = JSC.ZigString.fromUTF8(file_name).toValueGC(globalThis); - } else { - // convert to desired encoding - filename = Encoder.toStringAtRuntime(file_name.ptr, file_name.len, globalThis, this.encoding); - } - } - var args = [_]JSC.JSValue{ - JSC.ZigString.static(eventType).toValue(globalThis), - filename, - }; - _ = listener.callWithGlobalThis( - globalThis, - &args, - ); + pub fn emit(this: *FSWatcher, file_name: string, comptime eventType: string) void { + if (this.js_this != .zero) { + const js_this = this.js_this; + js_this.ensureStillAlive(); + if (FSWatcher.listenerGetCached(js_this)) |listener| { + listener.ensureStillAlive(); + var filename: JSC.JSValue = JSC.JSValue.jsUndefined(); + if (file_name.len > 0) { + if (this.encoding == .buffer) + filename = JSC.ArrayBuffer.createBuffer(this.globalThis, file_name) + else if (this.encoding == .utf8) { + filename = JSC.ZigString.fromUTF8(file_name).toValueGC(this.globalThis); + } else { + // convert to desired encoding + filename = Encoder.toStringAtRuntime(file_name.ptr, file_name.len, this.globalThis, this.encoding); } } + var args = [_]JSC.JSValue{ + JSC.ZigString.static(eventType).toValue(this.globalThis), + filename, + }; + _ = listener.callWithGlobalThis( + this.globalThis, + &args, + ); } } + } - pub fn ref(this: *JSObject) void { - if (this.closed) return; - - if (!this.persistent) { - this.persistent = true; - this.poll_ref.ref(this.getFSWatcher().ctx); - } - } - - pub fn doRef(this: *JSObject, _: *JSC.JSGlobalObject, _: *JSC.CallFrame) callconv(.C) JSC.JSValue { - this.ref(); - return JSC.JSValue.jsUndefined(); + pub fn doRef(this: *FSWatcher, _: *JSC.JSGlobalObject, _: *JSC.CallFrame) callconv(.C) JSC.JSValue { + if (!this.closed and !this.persistent) { + this.persistent = true; + this.poll_ref.ref(this.ctx); } + return JSC.JSValue.jsUndefined(); + } - pub fn unref(this: *JSObject) void { - if (this.persistent) { - this.persistent = false; - this.poll_ref.unref(this.getFSWatcher().ctx); - } + pub fn doUnref(this: *FSWatcher, _: *JSC.JSGlobalObject, _: *JSC.CallFrame) callconv(.C) JSC.JSValue { + if (this.persistent) { + this.persistent = false; + this.poll_ref.unref(this.ctx); } + return JSC.JSValue.jsUndefined(); + } - pub fn doUnref(this: *JSObject, _: *JSC.JSGlobalObject, _: *JSC.CallFrame) callconv(.C) JSC.JSValue { - this.unref(); - return JSC.JSValue.jsUndefined(); - } + pub fn hasRef(this: *FSWatcher, _: *JSC.JSGlobalObject, _: *JSC.CallFrame) callconv(.C) JSC.JSValue { + return JSC.JSValue.jsBoolean(this.persistent); + } - pub fn hasRef(this: *JSObject, _: *JSC.JSGlobalObject, _: *JSC.CallFrame) callconv(.C) JSC.JSValue { - return JSC.JSValue.jsBoolean(this.persistent); - } + // this can be called from Watcher Thread or JS Context Thread + pub fn refTask(this: *FSWatcher) bool { + this.mutex.lock(); + defer this.mutex.unlock(); + // stop new references + if (this.closed) return false; + this.task_count += 1; + return true; + } - pub fn close( - this: *JSObject, - emitEvent: bool, - ) void { - if (!this.closed) { - if (this.signal) |signal| { - this.signal = null; - signal.detach(this); - } - this.closed = true; - if (emitEvent) { - this.emit("", "close"); - } + pub fn hasPendingActivity(this: *FSWatcher) callconv(.C) bool { + @fence(.Acquire); + return this.has_pending_activity.load(.Acquire); + } + // only called from Main Thread + pub fn updateHasPendingActivity(this: *FSWatcher) void { + @fence(.Release); + this.has_pending_activity.store(false, .Release); + } - this.detach(); - } + // unref is always called on main JS Context Thread + pub fn unrefTask(this: *FSWatcher) void { + this.mutex.lock(); + defer this.mutex.unlock(); + this.task_count -= 1; + if (this.closed and this.task_count == 0) { + this.updateHasPendingActivity(); } + } - pub fn detach(this: *JSObject) void { - this.unref(); + pub fn close( + this: *FSWatcher, + ) void { + this.mutex.lock(); + if (!this.closed) { + this.closed = true; - if (this.js_this != .zero) { - this.js_this.unprotect(); - this.js_this = .zero; - } + // emit should only be called unlocked + this.mutex.unlock(); - this.globalThis = null; + this.emit("", "close"); + // we immediately detach here + this.detach(); - if (this.signal) |signal| { - this.signal = null; - signal.detach(this); - } - if (this.manager) |manager| { - var ctx = manager.ctx; - this.manager = null; - ctx.js_watcher = null; - ctx.deinit(); - manager.deinit(true); + // no need to lock again, because ref checks closed and unref is only called on main thread + if (this.task_count == 0) { + this.updateHasPendingActivity(); } + } else { + this.mutex.unlock(); + } + } - if (this.fsevents_watcher) |manager| { - var ctx = bun.cast(*FSWatcher, manager.ctx.?); - ctx.js_watcher = null; - ctx.deinit(); - manager.deinit(); - } + // this can be called multiple times + pub fn detach(this: *FSWatcher) void { + if (this.persistent) { + this.persistent = false; + this.poll_ref.unref(this.ctx); } - pub fn doClose(this: *JSObject, _: *JSC.JSGlobalObject, _: *JSC.CallFrame) callconv(.C) JSC.JSValue { - this.close(true); - return JSC.JSValue.jsUndefined(); + if (this.signal) |signal| { + this.signal = null; + signal.detach(this); } - pub fn finalize(this: *JSObject) callconv(.C) void { - if (!this.closed) { - this.detach(); - } + if (this.default_watcher) |default_watcher| { + this.default_watcher = null; + default_watcher.deinit(true); + } - bun.default_allocator.destroy(this); + if (this.fsevents_watcher) |fsevents_watcher| { + this.fsevents_watcher = null; + fsevents_watcher.deinit(); } - }; + + this.js_this = .zero; + } + + pub fn doClose(this: *FSWatcher, _: *JSC.JSGlobalObject, _: *JSC.CallFrame) callconv(.C) JSC.JSValue { + this.close(); + return JSC.JSValue.jsUndefined(); + } + + pub fn finalize(this: *FSWatcher) callconv(.C) void { + this.deinit(); + } const PathResult = struct { fd: StoredFileDescriptorType = 0, @@ -837,6 +846,17 @@ pub const FSWatcher = struct { const vm = args.global_this.bunVM(); ctx.* = .{ .ctx = vm, + .mutex = Mutex.init(), + .signal = if (args.signal) |s| s.ref() else null, + .persistent = args.persistent, + .default_watcher = null, + .fsevents_watcher = null, + .globalThis = args.global_this, + .js_this = .zero, + .encoding = args.encoding, + .closed = false, + .task_count = 0, + .has_pending_activity = std.atomic.Atomic(bool).init(true), .verbose = args.verbose, .file_paths = bun.BabyList(string).initCapacity(bun.default_allocator, 1) catch |err| { ctx.deinit(); @@ -850,22 +870,17 @@ pub const FSWatcher = struct { ctx.entry_path = dir_path_clone; ctx.entry_dir = dir_path_clone; - var fsevents_watcher = FSEvents.watch(dir_path_clone, args.recursive, onFSEventUpdate, bun.cast(*anyopaque, ctx)) catch |err| { + ctx.fsevents_watcher = FSEvents.watch(dir_path_clone, args.recursive, onFSEventUpdate, bun.cast(*anyopaque, ctx)) catch |err| { ctx.deinit(); return err; }; - ctx.js_watcher = JSObject.init(args.global_this, null, fsevents_watcher, args.signal, args.listener, args.persistent, args.encoding) catch |err| { - ctx.deinit(); - fsevents_watcher.deinit(); - return err; - }; - + ctx.initJS(args.listener); return ctx; } } - var fs_watcher = FSWatcher.Watcher.init( + var default_watcher = FSWatcher.Watcher.init( ctx, vm.bundler.fs, bun.default_allocator, @@ -874,7 +889,7 @@ pub const FSWatcher = struct { return err; }; - ctx.watcher_instance = fs_watcher; + ctx.default_watcher = default_watcher; if (fs_type.is_file) { var file_path_clone = bun.default_allocator.dupeZ(u8, file_path) catch unreachable; @@ -882,32 +897,23 @@ pub const FSWatcher = struct { ctx.entry_path = file_path_clone; ctx.entry_dir = std.fs.path.dirname(file_path_clone) orelse file_path_clone; - fs_watcher.addFile(fs_type.fd, file_path_clone, FSWatcher.Watcher.getHash(file_path), options.Loader.file, 0, null, false) catch |err| { + default_watcher.addFile(fs_type.fd, file_path_clone, FSWatcher.Watcher.getHash(file_path), options.Loader.file, 0, null, false) catch |err| { ctx.deinit(); - fs_watcher.deinit(true); return err; }; } else { - addDirectory(ctx, fs_watcher, fs_type.fd, file_path, args.recursive, &buf, true) catch |err| { + addDirectory(ctx, default_watcher, fs_type.fd, file_path, args.recursive, &buf, true) catch |err| { ctx.deinit(); - fs_watcher.deinit(true); return err; }; } - fs_watcher.start() catch |err| { + default_watcher.start() catch |err| { ctx.deinit(); - - fs_watcher.deinit(true); - return err; - }; - - ctx.js_watcher = JSObject.init(args.global_this, fs_watcher, null, args.signal, args.listener, args.persistent, args.encoding) catch |err| { - ctx.deinit(); - fs_watcher.deinit(true); return err; }; + ctx.initJS(args.listener); return ctx; } }; diff --git a/src/watcher.zig b/src/watcher.zig index 044770dc4450b..e3b3600adf96b 100644 --- a/src/watcher.zig +++ b/src/watcher.zig @@ -519,7 +519,7 @@ pub fn NewWatcher(comptime ContextType: type) type { var changelist_array: [128]KEvent = std.mem.zeroes([128]KEvent); var changelist = &changelist_array; - while (this.running) { + while (true) { defer Output.flush(); var count_ = std.os.system.kevent( @@ -576,10 +576,12 @@ pub fn NewWatcher(comptime ContextType: type) type { defer this.mutex.unlock(); if (this.running) { this.ctx.onFileUpdate(watchevents, this.changed_filepaths[0..watchevents.len], this.watchlist); + } else { + break; } } } else if (Environment.isLinux) { - restart: while (this.running) { + restart: while (true) { defer Output.flush(); var events = try INotify.read(); @@ -588,14 +590,14 @@ pub fn NewWatcher(comptime ContextType: type) type { // TODO: is this thread safe? var remaining_events = events.len; - var name_off: u8 = 0; - var temp_name_list: [128]?[:0]u8 = undefined; - var temp_name_off: u8 = 0; - const eventlist_index = this.watchlist.items(.eventlist_index); while (remaining_events > 0) { - const slice = events[0..@min(remaining_events, this.watch_events.len)]; + var name_off: u8 = 0; + var temp_name_list: [128]?[:0]u8 = undefined; + var temp_name_off: u8 = 0; + + const slice = events[0..@min(128, remaining_events, this.watch_events.len)]; var watchevents = this.watch_events[0..slice.len]; var watch_event_id: u32 = 0; for (slice) |event| { @@ -647,8 +649,10 @@ pub fn NewWatcher(comptime ContextType: type) type { defer this.mutex.unlock(); if (this.running) { this.ctx.onFileUpdate(all_events[0 .. last_event_index + 1], this.changed_filepaths[0 .. name_off + 1], this.watchlist); - remaining_events -= slice.len; + } else { + break; } + remaining_events -= slice.len; } } } diff --git a/test/js/node/watch/fs.watch.test.js b/test/js/node/watch/fs.watch.test.js index 56e1798f1ef8c..33d05df297f03 100644 --- a/test/js/node/watch/fs.watch.test.js +++ b/test/js/node/watch/fs.watch.test.js @@ -17,6 +17,8 @@ const testDir = tempDirWithFiles("watch", { "relative.txt": "hello", "abort.txt": "hello", "url.txt": "hello", + "close.txt": "hello", + "close-close.txt": "hello", [encodingFileName]: "hello", }); @@ -105,6 +107,7 @@ describe("fs.watch", () => { let err = undefined; watcher.on("change", (event, filename) => { const basename = path.basename(filename); + if (basename === "subfolder") return; count++; try { @@ -274,6 +277,46 @@ describe("fs.watch", () => { } }); + test("calling close from error event should not throw", done => { + const filepath = path.join(testDir, "close.txt"); + try { + const ac = new AbortController(); + const watcher = fs.watch(pathToFileURL(filepath), { signal: ac.signal }); + watcher.once("error", () => { + try { + watcher.close(); + done(); + } catch (e) { + done("Should not error when calling close from error event"); + } + }); + ac.abort(); + } catch (e) { + done(e); + } + }); + + test("calling close from close event should not throw", done => { + const filepath = path.join(testDir, "close-close.txt"); + try { + const ac = new AbortController(); + const watcher = fs.watch(pathToFileURL(filepath), { signal: ac.signal }); + + watcher.once("close", () => { + try { + watcher.close(); + done(); + } catch (e) { + done("Should not error when calling close from close event"); + } + }); + + ac.abort(); + } catch (e) { + done(e); + } + }); + test("Signal aborted after creating the watcher", async () => { const filepath = path.join(testDir, "abort.txt"); @@ -300,7 +343,7 @@ describe("fs.watch", () => { }); }); -describe("fs.promises.watchFile", () => { +describe("fs.promises.watch", () => { test("add file/folder to folder", async () => { let count = 0; const root = path.join(testDir, "add-promise-directory"); From fdfbb18531828fc5dec329d5d9e5c828a3c83921 Mon Sep 17 00:00:00 2001 From: Jarred Sumner Date: Sun, 25 Jun 2023 16:32:27 -0700 Subject: [PATCH 06/15] Support reading embedded files in compiled executables (#3405) * Support reading embedded files in compiled executables * :nail_care: --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> --- src/bun.js/api/bun.zig | 3 +++ src/bun.js/api/server.zig | 22 ++++++++----------- src/bun.js/javascript.zig | 5 ++++- src/bun.js/node/node_fs.zig | 30 +++++++++++++++++++++++++ src/bun.js/webcore/blob.zig | 36 ++++++++++++++++++++++++++++-- src/cli/build_command.zig | 1 + src/standalone_bun.zig | 44 ++++++++++++++++++++++++++++++++++++- 7 files changed, 124 insertions(+), 17 deletions(-) diff --git a/src/bun.js/api/bun.zig b/src/bun.js/api/bun.zig index 034aaa81f2a39..2e6381c745b28 100644 --- a/src/bun.js/api/bun.zig +++ b/src/bun.js/api/bun.zig @@ -896,6 +896,9 @@ pub fn createNodeFS( ) js.JSValueRef { var module = ctx.allocator().create(JSC.Node.NodeJSFS) catch unreachable; module.* = .{}; + var vm = ctx.bunVM(); + if (vm.standalone_module_graph != null) + module.node_fs.vm = vm; return module.toJS(ctx).asObjectRef(); } diff --git a/src/bun.js/api/server.zig b/src/bun.js/api/server.zig index a56ff971f095b..ebfacdcc99784 100644 --- a/src/bun.js/api/server.zig +++ b/src/bun.js/api/server.zig @@ -2744,19 +2744,15 @@ fn NewRequestContext(comptime ssl_enabled: bool, comptime debug_mode: bool, comp // 1. Bun.file("foo") // 2. The content-disposition header is not present if (!has_content_disposition and content_type.category.autosetFilename()) { - if (this.blob.store()) |store| { - if (store.data == .file) { - if (store.data.file.pathlike == .path) { - const basename = std.fs.path.basename(store.data.file.pathlike.path.slice()); - if (basename.len > 0) { - var filename_buf: [1024]u8 = undefined; - - resp.writeHeader( - "content-disposition", - std.fmt.bufPrint(&filename_buf, "filename=\"{s}\"", .{basename[0..@min(basename.len, 1024 - 32)]}) catch "", - ); - } - } + if (this.blob.getFileName()) |filename| { + const basename = std.fs.path.basename(filename); + if (basename.len > 0) { + var filename_buf: [1024]u8 = undefined; + + resp.writeHeader( + "content-disposition", + std.fmt.bufPrint(&filename_buf, "filename=\"{s}\"", .{basename[0..@min(basename.len, 1024 - 32)]}) catch "", + ); } } } diff --git a/src/bun.js/javascript.zig b/src/bun.js/javascript.zig index 3baa25e229e83..cb1a50f1d4c6f 100644 --- a/src/bun.js/javascript.zig +++ b/src/bun.js/javascript.zig @@ -593,7 +593,10 @@ pub const VirtualMachine = struct { pub inline fn nodeFS(this: *VirtualMachine) *Node.NodeFS { return this.node_fs orelse brk: { this.node_fs = bun.default_allocator.create(Node.NodeFS) catch unreachable; - this.node_fs.?.* = Node.NodeFS{}; + this.node_fs.?.* = Node.NodeFS{ + // only used when standalone module graph is enabled + .vm = if (this.standalone_module_graph != null) this else null, + }; break :brk this.node_fs.?; }; } diff --git a/src/bun.js/node/node_fs.zig b/src/bun.js/node/node_fs.zig index 21a65251a6dbf..35c616a892dd1 100644 --- a/src/bun.js/node/node_fs.zig +++ b/src/bun.js/node/node_fs.zig @@ -2492,6 +2492,7 @@ pub const NodeFS = struct { /// That means a stack-allocated buffer won't suffice. Instead, we re-use /// the heap allocated buffer on the NodefS struct sync_error_buf: [bun.MAX_PATH_BYTES]u8 = undefined, + vm: ?*JSC.VirtualMachine = null, pub const ReturnType = Return; @@ -3442,6 +3443,35 @@ pub const NodeFS = struct { const fd = switch (args.path) { .path => brk: { path = args.path.path.sliceZ(&this.sync_error_buf); + if (this.vm) |vm| { + if (vm.standalone_module_graph) |graph| { + if (graph.find(path)) |file| { + if (args.encoding == .buffer) { + return .{ + .result = .{ + .buffer = Buffer.fromBytes( + bun.default_allocator.dupe(u8, file.contents) catch @panic("out of memory"), + bun.default_allocator, + .Uint8Array, + ), + }, + }; + } else if (comptime string_type == .default) + .{ + .result = .{ + .string = bun.default_allocator.dupe(u8, file.contents) catch @panic("out of memory"), + }, + } + else + .{ + .result = .{ + .null_terminated = bun.default_allocator.dupeZ(u8, file.contents) catch @panic("out of memory"), + }, + }; + } + } + } + break :brk switch (Syscall.open( path, os.O.RDONLY | os.O.NOCTTY, diff --git a/src/bun.js/webcore/blob.zig b/src/bun.js/webcore/blob.zig index 1e63ea3a207b8..868acbb802275 100644 --- a/src/bun.js/webcore/blob.zig +++ b/src/bun.js/webcore/blob.zig @@ -952,6 +952,13 @@ pub const Blob = struct { switch (path_) { .path => { const slice = path_.path.slice(); + + if (vm.standalone_module_graph) |graph| { + if (graph.find(slice)) |file| { + return file.blob(globalThis).dupe(); + } + } + var cloned = (allocator.dupeZ(u8, slice) catch unreachable)[0..slice.len]; break :brk .{ @@ -2195,6 +2202,9 @@ pub const Blob = struct { cap: SizeType = 0, allocator: std.mem.Allocator, + /// Used by standalone module graph + stored_name: bun.PathString = bun.PathString.empty, + pub fn init(bytes: []u8, allocator: std.mem.Allocator) ByteStore { return .{ .ptr = bytes.ptr, @@ -2528,17 +2538,31 @@ pub const Blob = struct { this: *Blob, globalThis: *JSC.JSGlobalObject, ) callconv(.C) JSValue { + if (this.getFileName()) |path| { + var str = bun.String.create(path); + return str.toJS(globalThis); + } + + return JSValue.undefined; + } + + pub fn getFileName( + this: *const Blob, + ) ?[]const u8 { if (this.store) |store| { if (store.data == .file) { if (store.data.file.pathlike == .path) { - return ZigString.fromUTF8(store.data.file.pathlike.path.slice()).toValueGC(globalThis); + return store.data.file.pathlike.path.slice(); } // we shouldn't return Number here. + } else if (store.data == .bytes) { + if (store.data.bytes.stored_name.slice().len > 0) + return store.data.bytes.stored_name.slice(); } } - return JSC.JSValue.jsUndefined(); + return null; } // TODO: Move this to a separate `File` object or BunFile @@ -3469,6 +3493,14 @@ pub const AnyBlob = union(enum) { InternalBlob: InternalBlob, WTFStringImpl: bun.WTF.StringImpl, + pub fn getFileName(this: *const AnyBlob) ?[]const u8 { + return switch (this.*) { + .Blob => this.Blob.getFileName(), + .WTFStringImpl => null, + .InternalBlob => null, + }; + } + pub inline fn fastSize(this: *const AnyBlob) Blob.SizeType { return switch (this.*) { .Blob => this.Blob.size, diff --git a/src/cli/build_command.zig b/src/cli/build_command.zig index 44e512996518d..ef99f7765c950 100644 --- a/src/cli/build_command.zig +++ b/src/cli/build_command.zig @@ -107,6 +107,7 @@ pub const BuildCommand = struct { // We never want to hit the filesystem for these files // This "compiled" protocol is specially handled by the module resolver. this_bundler.options.public_path = "compiled://root/"; + this_bundler.resolver.opts.public_path = "compiled://root/"; if (outfile.len == 0) { outfile = std.fs.path.basename(this_bundler.options.entry_points[0]); diff --git a/src/standalone_bun.zig b/src/standalone_bun.zig index e7363fb58defd..b18fe384e8d71 100644 --- a/src/standalone_bun.zig +++ b/src/standalone_bun.zig @@ -18,6 +18,14 @@ pub const StandaloneModuleGraph = struct { return &this.files.values()[this.entry_point_id]; } + pub fn find(this: *const StandaloneModuleGraph, name: []const u8) ?*File { + if (!bun.strings.hasPrefixComptime(name, "compiled://root/")) { + return null; + } + + return this.files.getPtr(name); + } + pub const CompiledModuleGraphFile = struct { name: Schema.StringPointer = .{}, loader: bun.options.Loader = .file, @@ -30,6 +38,32 @@ pub const StandaloneModuleGraph = struct { loader: bun.options.Loader, contents: []const u8 = "", sourcemap: LazySourceMap, + blob_: ?*bun.JSC.WebCore.Blob = null, + + pub fn blob(this: *File, globalObject: *bun.JSC.JSGlobalObject) *bun.JSC.WebCore.Blob { + if (this.blob_ == null) { + var store = bun.JSC.WebCore.Blob.Store.init(@constCast(this.contents), bun.default_allocator) catch @panic("out of memory"); + // make it never free + store.ref(); + + var blob_ = bun.default_allocator.create(bun.JSC.WebCore.Blob) catch @panic("out of memory"); + blob_.* = bun.JSC.WebCore.Blob.initWithStore(store, globalObject); + blob_.allocator = bun.default_allocator; + + if (bun.HTTP.MimeType.byExtensionNoDefault(bun.strings.trimLeadingChar(std.fs.path.extension(this.name), '.'))) |mime| { + store.mime_type = mime; + blob_.content_type = mime.value; + blob_.content_type_was_set = true; + blob_.content_type_allocated = false; + } + + store.data.bytes.stored_name = bun.PathString.init(this.name); + + this.blob_ = blob_; + } + + return this.blob_.?; + } }; pub const LazySourceMap = union(enum) { @@ -152,8 +186,16 @@ pub const StandaloneModuleGraph = struct { continue; } + var dest_path = output_file.dest_path; + if (bun.strings.hasPrefixComptime(dest_path, "./")) { + dest_path = dest_path[2..]; + } + var module = CompiledModuleGraphFile{ - .name = string_builder.fmtAppendCount("{s}{s}", .{ prefix, output_file.dest_path }), + .name = string_builder.fmtAppendCount("{s}{s}", .{ + prefix, + dest_path, + }), .loader = output_file.loader, .contents = string_builder.appendCount(output_file.value.buffer.bytes), }; From 15ac08474ef0b18b94bbf4863b2497e18e968379 Mon Sep 17 00:00:00 2001 From: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> Date: Sun, 25 Jun 2023 16:40:51 -0700 Subject: [PATCH 07/15] fixup --- src/bun.js/node/node_fs.zig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bun.js/node/node_fs.zig b/src/bun.js/node/node_fs.zig index 35c616a892dd1..1298c5d450e90 100644 --- a/src/bun.js/node/node_fs.zig +++ b/src/bun.js/node/node_fs.zig @@ -3457,13 +3457,13 @@ pub const NodeFS = struct { }, }; } else if (comptime string_type == .default) - .{ + return .{ .result = .{ .string = bun.default_allocator.dupe(u8, file.contents) catch @panic("out of memory"), }, } else - .{ + return .{ .result = .{ .null_terminated = bun.default_allocator.dupeZ(u8, file.contents) catch @panic("out of memory"), }, From d8817c2d32a237440a7677622ba351aa95f47c22 Mon Sep 17 00:00:00 2001 From: Tiago Teixeira Date: Mon, 26 Jun 2023 01:43:39 +0200 Subject: [PATCH 08/15] Add support for install with --frozen-lockfile (#3365) * Add support for install with --frozen-lockfile * Add test * Add test for frozenLockfile in config file --- completions/bun.bash | 4 +-- completions/bun.zsh | 6 ++++ completions/spec.yaml | 3 ++ docs/cli/bun-install.md | 4 +++ docs/cli/install.md | 9 +++++ docs/install/index.md | 9 +++++ docs/runtime/configuration.md | 3 ++ src/api/demo/schema.d.ts | 1 + src/api/demo/schema.js | 4 +++ src/api/demo/schema.peechy | 1 + src/api/demo/schema.zig | 10 ++++++ src/api/schema.d.ts | 1 + src/api/schema.js | 10 ++++++ src/api/schema.peechy | 1 + src/api/schema.zig | 10 ++++++ src/bunfig.zig | 6 ++++ src/install/install.zig | 13 ++++++++ test/cli/install/bun-install.test.ts | 49 ++++++++++++++++++++++++++++ 18 files changed, 142 insertions(+), 2 deletions(-) diff --git a/completions/bun.bash b/completions/bun.bash index 7eb83c48b9cc8..499adc4703378 100644 --- a/completions/bun.bash +++ b/completions/bun.bash @@ -92,10 +92,10 @@ _bun_completions() { PACKAGE_OPTIONS[REMOVE_OPTIONS_LONG]=""; PACKAGE_OPTIONS[REMOVE_OPTIONS_SHORT]=""; - PACKAGE_OPTIONS[SHARED_OPTIONS_LONG]="--config --yarn --production --no-save --dry-run --lockfile --force --cache-dir --no-cache --silent --verbose --global --cwd --backend --link-native-bins --help"; + PACKAGE_OPTIONS[SHARED_OPTIONS_LONG]="--config --yarn --production --frozen-lockfile --no-save --dry-run --lockfile --force --cache-dir --no-cache --silent --verbose --global --cwd --backend --link-native-bins --help"; PACKAGE_OPTIONS[SHARED_OPTIONS_SHORT]="-c -y -p -f -g"; - PM_OPTIONS[LONG_OPTIONS]="--config --yarn --production --no-save --dry-run --lockfile --force --cache-dir --no-cache --silent --verbose --no-progress --no-summary --no-verify --ignore-scripts --global --cwd --backend --link-native-bins --help" + PM_OPTIONS[LONG_OPTIONS]="--config --yarn --production --frozen-lockfile --no-save --dry-run --lockfile --force --cache-dir --no-cache --silent --verbose --no-progress --no-summary --no-verify --ignore-scripts --global --cwd --backend --link-native-bins --help" PM_OPTIONS[SHORT_OPTIONS]="-c -y -p -f -g" local cur_word="${COMP_WORDS[${COMP_CWORD}]}"; diff --git a/completions/bun.zsh b/completions/bun.zsh index 946445b6449ea..a8f66b4fa3061 100644 --- a/completions/bun.zsh +++ b/completions/bun.zsh @@ -47,6 +47,7 @@ _bun() { '-g[Add a package globally]' \ '--global[Add a package globally]' \ '--production[Don'"'"'t install devDependencies]' \ + '--frozen-lockfile[Disallow changes to lockfile]' \ '--optional[Add dependency to optionalDependencies]' \ '--development[Add dependency to devDependencies]' \ '-d[Add dependency to devDependencies]' \ @@ -88,6 +89,7 @@ _bun() { '--yarn[Write a yarn.lock file (yarn v1)]' \ '--global[Add a package globally]' \ '--production[Don'"'"'t install devDependencies]' \ + '--frozen-lockfile[Disallow changes to lockfile]' \ '--optional[Add dependency to optionalDependencies]' \ '--development[Add dependency to devDependencies]' \ '-d[Add dependency to devDependencies]' \ @@ -123,6 +125,7 @@ _bun() { '--yarn[Write a yarn.lock file (yarn v1)]' \ '--global[Add a package globally]' \ '--production[Don'"'"'t install devDependencies]' \ + '--frozen-lockfile[Disallow changes to lockfile]' \ '--optional[Add dependency to optionalDependencies]' \ '--development[Add dependency to devDependencies]' \ '-d[Add dependency to devDependencies]' \ @@ -278,6 +281,7 @@ _bun() { '--yarn[Write a yarn.lock file (yarn v1)]' '-p[Do not install devDependencies]' '--production[Do not install devDependencies]' + '--frozen-lockfile[Disallow changes to lockfile]' \ '--no-save[Do not save a lockfile]' '--dry-run[Do not install anything]' '--lockfile[Store & load a lockfile at a specific filepath]' @@ -532,6 +536,7 @@ _bun() { '--yarn[Write a yarn.lock file (yarn v1)]' \ '--production[Don'"'"'t install devDependencies]' \ '-p[Don'"'"'t install devDependencies]' \ + '--frozen-lockfile[Disallow changes to lockfile]' \ '--no-save[]' \ '--dry-run[Don'"'"'t install anything]' \ '--force[Always request the latest versions from the registry & reinstall all dependenices]' \ @@ -565,6 +570,7 @@ _bun() { '--yarn[Write a yarn.lock file (yarn v1)]' \ '--production[Don'"'"'t install devDependencies]' \ '-p[Don'"'"'t install devDependencies]' \ + '--frozen-lockfile[Disallow changes to lockfile]' \ '--no-save[]' \ '--dry-run[Don'"'"'t install anything]' \ '-g[Remove a package globally]' \ diff --git a/completions/spec.yaml b/completions/spec.yaml index 9c37ae89e618e..c3391c19275da 100644 --- a/completions/spec.yaml +++ b/completions/spec.yaml @@ -115,6 +115,7 @@ subcommands: - yarn -- "Write a yarn.lock file (yarn v1)" - production -- "Don't install devDependencies" - p -- "Don't install devDependencies" + - frozen-lockfile -- "Disallow changes to lockfile" - no-save -- - dry-run -- "Don't install anything" - force -- "Always request the latest versions from the registry & reinstall all dependenices" @@ -152,6 +153,7 @@ subcommands: - development -- "Add dependency to devDependencies" - d -- "Add dependency to devDependencies" - p -- "Don't install devDependencies" + - frozen-lockfile -- "Disallow changes to lockfile" - no-save -- - dry-run -- "Don't install anything" - force -- "Always request the latest versions from the registry & reinstall all dependenices" @@ -192,6 +194,7 @@ subcommands: - yarn -- "Write a yarn.lock file (yarn v1)" - production -- "Don't install devDependencies" - p -- "Don't install devDependencies" + - frozen-lockfile -- "Disallow changes to lockfile" - no-save -- - dry-run -- "Don't install anything" - force -- "Always request the latest versions from the registry & reinstall all dependenices" diff --git a/docs/cli/bun-install.md b/docs/cli/bun-install.md index 11cf3ee8134c1..8050070be44ce 100644 --- a/docs/cli/bun-install.md +++ b/docs/cli/bun-install.md @@ -47,6 +47,9 @@ registry = "https://registry.yarnpkg.com/" # Install for production? This is the equivalent to the "--production" CLI argument production = false +# Disallow changes to lockfile? This is the equivalent to the "--fozen-lockfile" CLI argument +frozenLockfile = false + # Don't actually install dryRun = true @@ -108,6 +111,7 @@ export interface Install { scopes: Scopes; registry: Registry; production: boolean; + frozenLockfile: boolean; dryRun: boolean; optional: boolean; dev: boolean; diff --git a/docs/cli/install.md b/docs/cli/install.md index 695c975f9c4c2..4489a0d4ad37f 100644 --- a/docs/cli/install.md +++ b/docs/cli/install.md @@ -49,6 +49,12 @@ To install in production mode (i.e. without `devDependencies`): $ bun install --production ``` +To install dependencies without allowing changes to lockfile (useful on CI): + +```bash +$ bun install --frozen-lockfile +``` + To perform a dry run (i.e. don't actually install anything): ```bash @@ -80,6 +86,9 @@ peer = false # equivalent to `--production` flag production = false +# equivalent to `--frozen-lockfile` flag +frozenLockfile = false + # equivalent to `--dry-run` flag dryRun = false ``` diff --git a/docs/install/index.md b/docs/install/index.md index 48e0012756c08..162a4abacf1f7 100644 --- a/docs/install/index.md +++ b/docs/install/index.md @@ -49,6 +49,12 @@ To install in production mode (i.e. without `devDependencies`): $ bun install --production ``` +To install dependencies without allowing changes to lockfile (useful on CI): + +```bash +$ bun install --frozen-lockfile +``` + To perform a dry run (i.e. don't actually install anything): ```bash @@ -80,6 +86,9 @@ peer = false # equivalent to `--production` flag production = false +# equivalent to `--frozen-lockfile` flag +frozenLockfile = false + # equivalent to `--dry-run` flag dryRun = false ``` diff --git a/docs/runtime/configuration.md b/docs/runtime/configuration.md index e1572c990083c..2ae81713a5d27 100644 --- a/docs/runtime/configuration.md +++ b/docs/runtime/configuration.md @@ -129,6 +129,9 @@ peer = false # equivalent to `--production` flag production = false +# equivalent to `--frozen-lockfile` flag +frozenLockfile = false + # equivalent to `--dry-run` flag dryRun = false ``` diff --git a/src/api/demo/schema.d.ts b/src/api/demo/schema.d.ts index 6f3949c77f5fc..e8a6994e73888 100644 --- a/src/api/demo/schema.d.ts +++ b/src/api/demo/schema.d.ts @@ -681,6 +681,7 @@ export interface BunInstall { disable_manifest_cache?: boolean; global_dir?: string; global_bin_dir?: string; + frozen_lockfile?: boolean; } export declare function encodeStackFrame(message: StackFrame, bb: ByteBuffer): void; diff --git a/src/api/demo/schema.js b/src/api/demo/schema.js index 7bdd13b65e520..d23d64a14d108 100644 --- a/src/api/demo/schema.js +++ b/src/api/demo/schema.js @@ -2992,6 +2992,10 @@ function decodeBunInstall(bb) { result["global_bin_dir"] = bb.readString(); break; + case 19: + result["frozen-lockfile"] = !!bb.readByte(); + break; + default: throw new Error("Attempted to parse invalid message"); } diff --git a/src/api/demo/schema.peechy b/src/api/demo/schema.peechy index 09d3c1fac56f7..e495bb9c017cd 100644 --- a/src/api/demo/schema.peechy +++ b/src/api/demo/schema.peechy @@ -550,4 +550,5 @@ message BunInstall { bool disable_manifest_cache = 16; string global_dir = 17; string global_bin_dir = 18; + string frozen_lockfile = 19; } diff --git a/src/api/demo/schema.zig b/src/api/demo/schema.zig index d57a5c7257057..a6de100de6bef 100644 --- a/src/api/demo/schema.zig +++ b/src/api/demo/schema.zig @@ -2728,6 +2728,9 @@ pub const Api = struct { /// global_bin_dir global_bin_dir: ?[]const u8 = null, + /// frozen_lockfile + frozen_lockfile: ?bool = null, + pub fn decode(reader: anytype) anyerror!BunInstall { var this = std.mem.zeroes(BunInstall); @@ -2791,6 +2794,9 @@ pub const Api = struct { 18 => { this.global_bin_dir = try reader.readValue([]const u8); }, + 19 => { + this.frozen_lockfile = try reader.readValue(bool); + }, else => { return error.InvalidMessage; }, @@ -2872,6 +2878,10 @@ pub const Api = struct { try writer.writeFieldID(18); try writer.writeValue(@TypeOf(global_bin_dir), global_bin_dir); } + if (this.frozen_lockfile) |frozen_lockfile| { + try writer.writeFieldID(19); + try writer.writeInt(@as(u8, @boolToInt(frozen_lockfile))); + } try writer.endMessage(); } }; diff --git a/src/api/schema.d.ts b/src/api/schema.d.ts index 4114d951d46d0..ac61838789958 100644 --- a/src/api/schema.d.ts +++ b/src/api/schema.d.ts @@ -709,6 +709,7 @@ export interface BunInstall { disable_manifest_cache?: boolean; global_dir?: string; global_bin_dir?: string; + frozen_lockfile?: boolean; } export interface ClientServerModule { diff --git a/src/api/schema.js b/src/api/schema.js index c4f2400ed6bd8..270eb9a624b22 100644 --- a/src/api/schema.js +++ b/src/api/schema.js @@ -3044,6 +3044,10 @@ function decodeBunInstall(bb) { result["global_bin_dir"] = bb.readString(); break; + case 19: + result["frozen_lockfile"] = !!bb.readByte(); + break; + default: throw new Error("Attempted to parse invalid message"); } @@ -3164,6 +3168,12 @@ function encodeBunInstall(message, bb) { bb.writeByte(18); bb.writeString(value); } + + var value = message["frozen_lockfile"]; + if (value != null) { + bb.writeByte(19); + bb.writeByte(value); + } bb.writeByte(0); } diff --git a/src/api/schema.peechy b/src/api/schema.peechy index 71e85d68e24e1..6d28381c42975 100644 --- a/src/api/schema.peechy +++ b/src/api/schema.peechy @@ -590,6 +590,7 @@ message BunInstall { bool disable_manifest_cache = 16; string global_dir = 17; string global_bin_dir = 18; + bool frozen_lockfile = 19; } struct ClientServerModule { diff --git a/src/api/schema.zig b/src/api/schema.zig index 1012e60516c6b..708d32ca07d43 100644 --- a/src/api/schema.zig +++ b/src/api/schema.zig @@ -2901,6 +2901,9 @@ pub const Api = struct { /// global_bin_dir global_bin_dir: ?[]const u8 = null, + /// frozen_lockfile + frozen_lockfile: ?bool = null, + pub fn decode(reader: anytype) anyerror!BunInstall { var this = std.mem.zeroes(BunInstall); @@ -2964,6 +2967,9 @@ pub const Api = struct { 18 => { this.global_bin_dir = try reader.readValue([]const u8); }, + 19 => { + this.frozen_lockfile = try reader.readValue(bool); + }, else => { return error.InvalidMessage; }, @@ -3045,6 +3051,10 @@ pub const Api = struct { try writer.writeFieldID(18); try writer.writeValue(@TypeOf(global_bin_dir), global_bin_dir); } + if (this.frozen_lockfile) |frozen_lockfile| { + try writer.writeFieldID(19); + try writer.writeInt(@as(u8, @boolToInt(frozen_lockfile))); + } try writer.endMessage(); } }; diff --git a/src/bunfig.zig b/src/bunfig.zig index 9df2978b0cdf6..597fb0985d087 100644 --- a/src/bunfig.zig +++ b/src/bunfig.zig @@ -322,6 +322,12 @@ pub const Bunfig = struct { } } + if (_bun.get("frozenLockfile")) |frozen_lockfile| { + if (frozen_lockfile.asBool()) |value| { + install.frozen_lockfile = value; + } + } + if (_bun.get("lockfile")) |lockfile_expr| { if (lockfile_expr.get("print")) |lockfile| { try this.expect(lockfile, .e_string); diff --git a/src/install/install.zig b/src/install/install.zig index 32c24548c5f1b..81e2a7bb8e8ec 100644 --- a/src/install/install.zig +++ b/src/install/install.zig @@ -4443,6 +4443,12 @@ pub const PackageManager = struct { } } + if (bun_install.frozen_lockfile) |frozen_lockfile| { + if (frozen_lockfile) { + this.enable.frozen_lockfile = true; + } + } + if (bun_install.save_optional) |save| { this.remote_package_features.optional_dependencies = save; this.local_package_features.optional_dependencies = save; @@ -4676,6 +4682,10 @@ pub const PackageManager = struct { this.enable.frozen_lockfile = true; } + if (cli.frozen_lockfile) { + this.enable.frozen_lockfile = true; + } + if (cli.force) { this.enable.manifest_cache_control = false; this.enable.force_install = true; @@ -5649,6 +5659,7 @@ pub const PackageManager = struct { clap.parseParam("--save Save to package.json") catch unreachable, clap.parseParam("--dry-run Don't install anything") catch unreachable, clap.parseParam("--lockfile Store & load a lockfile at a specific filepath") catch unreachable, + clap.parseParam("--frozen-lockfile Disallow changes to lockfile") catch unreachable, clap.parseParam("-f, --force Always request the latest versions from the registry & reinstall all dependencies") catch unreachable, clap.parseParam("--cache-dir Store & load cached data from a specific directory path") catch unreachable, clap.parseParam("--no-cache Ignore manifest cache entirely") catch unreachable, @@ -5709,6 +5720,7 @@ pub const PackageManager = struct { yarn: bool = false, production: bool = false, + frozen_lockfile: bool = false, no_save: bool = false, dry_run: bool = false, force: bool = false, @@ -5777,6 +5789,7 @@ pub const PackageManager = struct { var cli = CommandLineArguments{}; cli.yarn = args.flag("--yarn"); cli.production = args.flag("--production"); + cli.frozen_lockfile = args.flag("--frozen-lockfile"); cli.no_progress = args.flag("--no-progress"); cli.dry_run = args.flag("--dry-run"); cli.global = args.flag("--global"); diff --git a/test/cli/install/bun-install.test.ts b/test/cli/install/bun-install.test.ts index 4b3342e3ae3d6..6baee23a92e01 100644 --- a/test/cli/install/bun-install.test.ts +++ b/test/cli/install/bun-install.test.ts @@ -4241,6 +4241,55 @@ it("should handle --cwd", async () => { }); }); +it("should handle --frozen-lockfile", async () => { + await writeFile( + join(package_dir, "package.json"), + JSON.stringify({ name: "foo", version: "0.0.1", dependencies: { bar: "0.0.2" } }), + ); + + const { stderr, exited } = spawn({ + cmd: [bunExe(), "install", "--frozen-lockfile"], + cwd: package_dir, + stdout: null, + stdin: "pipe", + stderr: "pipe", + env, + }); + + expect(stderr).toBeDefined(); + const err = await new Response(stderr).text(); + expect(err).toContain("error: lockfile had changes, but lockfile is frozen"); + expect(await exited).toBe(1); +}); + +it("should handle frozenLockfile in config file", async () => { + await writeFile( + join(package_dir, "package.json"), + JSON.stringify({ name: "foo", version: "0.0.1", dependencies: { bar: "0.0.2" } }), + ); + await writeFile( + join(package_dir, "bunfig.toml"), + ` +[install] +frozenLockfile = true +`, + ); + + const { stderr, exited } = spawn({ + cmd: [bunExe(), "install"], + cwd: package_dir, + stdout: null, + stdin: "pipe", + stderr: "pipe", + env, + }); + + expect(stderr).toBeDefined(); + const err = await new Response(stderr).text(); + expect(err).toContain("error: lockfile had changes, but lockfile is frozen"); + expect(await exited).toBe(1); +}); + it("should perform bin-linking across multiple dependencies", async () => { const foo_package = JSON.stringify({ name: "foo", From 662335d81aa39dc53b83f2759312ff0ff3a93af2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Br=C3=BAn=C3=B3=20Salomon?= <35275408+bru02@users.noreply.github.com> Date: Mon, 26 Jun 2023 01:48:03 +0200 Subject: [PATCH 09/15] chore: update lol-html version (#3356) * chore: update lol-html version * add tests --------- Co-authored-by: Jarred Sumner --- src/bun.js/api/html_rewriter.zig | 7 +++++++ src/deps/lol-html | 2 +- src/deps/lol-html.zig | 8 ++++++-- src/generated_versions_list.zig | 2 +- test/js/workerd/html-rewriter.test.js | 15 +++++++++++++++ 5 files changed, 30 insertions(+), 4 deletions(-) diff --git a/src/bun.js/api/html_rewriter.zig b/src/bun.js/api/html_rewriter.zig index 93a41b0958d34..d09c14e42076f 100644 --- a/src/bun.js/api/html_rewriter.zig +++ b/src/bun.js/api/html_rewriter.zig @@ -1016,6 +1016,9 @@ pub const TextChunk = struct { .removed = .{ .get = getterWrap(TextChunk, "removed"), }, + .lastInTextNode = .{ + .get = getterWrap(TextChunk, "lastInTextNode"), + }, .text = .{ .get = getterWrap(TextChunk, "getText"), }, @@ -1084,6 +1087,10 @@ pub const TextChunk = struct { return JSC.JSValue.jsBoolean(this.text_chunk.?.isRemoved()); } + pub fn lastInTextNode(this: *TextChunk, _: *JSGlobalObject) JSValue { + return JSC.JSValue.jsBoolean(this.text_chunk.?.isLastInTextNode()); + } + pub fn finalize(this: *TextChunk) void { this.text_chunk = null; bun.default_allocator.destroy(this); diff --git a/src/deps/lol-html b/src/deps/lol-html index 2eed349dcdfa4..2681dcf0b3e69 160000 --- a/src/deps/lol-html +++ b/src/deps/lol-html @@ -1 +1 @@ -Subproject commit 2eed349dcdfa4ff5c19fe7c6e501cfd687601033 +Subproject commit 2681dcf0b3e6907111565199df8c43cc9aab7fe8 diff --git a/src/deps/lol-html.zig b/src/deps/lol-html.zig index 1d71e6aa6b8a1..9c53450468527 100644 --- a/src/deps/lol-html.zig +++ b/src/deps/lol-html.zig @@ -393,7 +393,8 @@ pub const Element = opaque { extern fn lol_html_element_is_removed(element: *const Element) bool; extern fn lol_html_element_user_data_set(element: *const Element, user_data: ?*anyopaque) void; extern fn lol_html_element_user_data_get(element: *const Element) ?*anyopaque; - extern fn lol_html_element_on_end_tag(element: *Element, end_tag_handler: lol_html_end_tag_handler_t, user_data: ?*anyopaque) c_int; + extern fn lol_html_element_add_end_tag_handler(element: *Element, end_tag_handler: lol_html_end_tag_handler_t, user_data: ?*anyopaque) c_int; + extern fn lol_html_element_clear_end_tag_handlers(element: *Element) void; pub fn getAttribute(element: *const Element, name: []const u8) HTMLString { auto_disable(); @@ -502,7 +503,10 @@ pub const Element = opaque { } pub fn onEndTag(element: *Element, end_tag_handler: lol_html_end_tag_handler_t, user_data: ?*anyopaque) Error!void { auto_disable(); - return switch (lol_html_element_on_end_tag(element, end_tag_handler, user_data)) { + + lol_html_element_clear_end_tag_handlers(element); + + return switch (lol_html_element_add_end_tag_handler(element, end_tag_handler, user_data)) { 0 => {}, -1 => error.Fail, else => unreachable, diff --git a/src/generated_versions_list.zig b/src/generated_versions_list.zig index 90bee0b8c422b..c27f47c83db6e 100644 --- a/src/generated_versions_list.zig +++ b/src/generated_versions_list.zig @@ -9,6 +9,6 @@ pub const webkit = "60d11703a533fd694cd1d6ddda04813eecb5d69f"; pub const zig = @import("std").fmt.comptimePrint("{}", .{@import("builtin").zig_version}); pub const zlib = "885674026394870b7e7a05b7bf1ec5eb7bd8a9c0"; pub const tinycc = "2d3ad9e0d32194ad7fd867b66ebe218dcc8cb5cd"; -pub const lolhtml = "2eed349dcdfa4ff5c19fe7c6e501cfd687601033"; +pub const lolhtml = "2681dcf0b3e6907111565199df8c43cc9aab7fe8"; pub const c_ares = "0e7a5dee0fbb04080750cf6eabbe89d8bae87faa"; pub const usockets = "fafc241e8664243fc0c51d69684d5d02b9805134"; diff --git a/test/js/workerd/html-rewriter.test.js b/test/js/workerd/html-rewriter.test.js index 1ca92a567a376..b6131a09f58b6 100644 --- a/test/js/workerd/html-rewriter.test.js +++ b/test/js/workerd/html-rewriter.test.js @@ -300,4 +300,19 @@ describe("HTMLRewriter", () => { .text(), ).toEqual("
"); }); + + it("it supports lastInTextNode", async () => { + let lastInTextNode; + + await new HTMLRewriter() + .on("p", { + text(text) { + lastInTextNode ??= text.lastInTextNode; + }, + }) + .transform(new Response("

Lorem ipsum!

")) + .text(); + + expect(lastInTextNode).toBeBoolean(); + }); }); From 66195ffeed3948305853b8d95bcb51042b63aa15 Mon Sep 17 00:00:00 2001 From: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> Date: Sun, 25 Jun 2023 16:50:26 -0700 Subject: [PATCH 10/15] Update WebKit --- src/bun.js/WebKit | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bun.js/WebKit b/src/bun.js/WebKit index b2f1006a06f81..a9e3ab9b85cf9 160000 --- a/src/bun.js/WebKit +++ b/src/bun.js/WebKit @@ -1 +1 @@ -Subproject commit b2f1006a06f81bc860c89dd4c7cec3e7117c4c4c +Subproject commit a9e3ab9b85cf911218e1d51eed8079cd955ec578 From 9ebb25427ab4c8bb0f0edfe339471080204b9b52 Mon Sep 17 00:00:00 2001 From: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> Date: Sun, 25 Jun 2023 17:51:24 -0700 Subject: [PATCH 11/15] remove very old stuff --- src/api/demo/.gitignore | 34 - src/api/demo/README.md | 34 - src/api/demo/api.js | 0 src/api/demo/bun.lockb | Bin 72411 -> 0 bytes src/api/demo/lib/api.ts | 280 --- src/api/demo/lib/run.ts | 70 - src/api/demo/lib/scan.ts | 44 - src/api/demo/next-env.d.ts | 5 - src/api/demo/package.json | 29 - src/api/demo/pages/_app.js | 7 - src/api/demo/pages/api/hello.js | 5 - src/api/demo/pages/index.tsx | 68 - src/api/demo/pages/scan.tsx | 67 - src/api/demo/pages/two.tsx | 1 - src/api/demo/pnpm-lock.yaml | 2038 ----------------- src/api/demo/public/favicon.ico | Bin 15086 -> 0 bytes src/api/demo/public/vercel.svg | 4 - src/api/demo/schema.d.ts | 800 ------- src/api/demo/schema.js | 3261 --------------------------- src/api/demo/schema.peechy | 554 ----- src/api/demo/schema.zig | 2888 ------------------------ src/api/demo/styles/Home.module.css | 122 - src/api/demo/styles/globals.css | 16 - src/api/demo/tsconfig.json | 34 - 24 files changed, 10361 deletions(-) delete mode 100644 src/api/demo/.gitignore delete mode 100644 src/api/demo/README.md delete mode 100644 src/api/demo/api.js delete mode 100755 src/api/demo/bun.lockb delete mode 100644 src/api/demo/lib/api.ts delete mode 100644 src/api/demo/lib/run.ts delete mode 100644 src/api/demo/lib/scan.ts delete mode 100644 src/api/demo/next-env.d.ts delete mode 100644 src/api/demo/package.json delete mode 100644 src/api/demo/pages/_app.js delete mode 100644 src/api/demo/pages/api/hello.js delete mode 100644 src/api/demo/pages/index.tsx delete mode 100644 src/api/demo/pages/scan.tsx delete mode 100644 src/api/demo/pages/two.tsx delete mode 100644 src/api/demo/pnpm-lock.yaml delete mode 100644 src/api/demo/public/favicon.ico delete mode 100644 src/api/demo/public/vercel.svg delete mode 100644 src/api/demo/schema.d.ts delete mode 100644 src/api/demo/schema.js delete mode 100644 src/api/demo/schema.peechy delete mode 100644 src/api/demo/schema.zig delete mode 100644 src/api/demo/styles/Home.module.css delete mode 100644 src/api/demo/styles/globals.css delete mode 100644 src/api/demo/tsconfig.json diff --git a/src/api/demo/.gitignore b/src/api/demo/.gitignore deleted file mode 100644 index 1437c53f70bc2..0000000000000 --- a/src/api/demo/.gitignore +++ /dev/null @@ -1,34 +0,0 @@ -# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. - -# dependencies -/node_modules -/.pnp -.pnp.js - -# testing -/coverage - -# next.js -/.next/ -/out/ - -# production -/build - -# misc -.DS_Store -*.pem - -# debug -npm-debug.log* -yarn-debug.log* -yarn-error.log* - -# local env files -.env.local -.env.development.local -.env.test.local -.env.production.local - -# vercel -.vercel diff --git a/src/api/demo/README.md b/src/api/demo/README.md deleted file mode 100644 index b12f3e33e7d5b..0000000000000 --- a/src/api/demo/README.md +++ /dev/null @@ -1,34 +0,0 @@ -This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app). - -## Getting Started - -First, run the development server: - -```bash -npm run dev -# or -yarn dev -``` - -Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. - -You can start editing the page by modifying `pages/index.js`. The page auto-updates as you edit the file. - -[API routes](https://nextjs.org/docs/api-routes/introduction) can be accessed on [http://localhost:3000/api/hello](http://localhost:3000/api/hello). This endpoint can be edited in `pages/api/hello.js`. - -The `pages/api` directory is mapped to `/api/*`. Files in this directory are treated as [API routes](https://nextjs.org/docs/api-routes/introduction) instead of React pages. - -## Learn More - -To learn more about Next.js, take a look at the following resources: - -- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API. -- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial. - -You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome! - -## Deploy on Vercel - -The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js. - -Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details. diff --git a/src/api/demo/api.js b/src/api/demo/api.js deleted file mode 100644 index e69de29bb2d1d..0000000000000 diff --git a/src/api/demo/bun.lockb b/src/api/demo/bun.lockb deleted file mode 100755 index c58932f185c205cd7801416cf963190fef8da746..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 72411 zcmeFa2{e{n`#yZrO{S2@JeD~_l9|l&P%>nm=P~mTp_C$-NybDZMVV4kNh*LXh{_U&0=v}m@or{RA z9hr}$Q6~qCicwQ#Y0%+-QW(sK%})%5U>kRDW7sz4+}Zwuv9)vafZx4+ZM>|!?J(cK zcS;N<%+txs%E!(d;}*14vH=JagM1%HJ9j7hKupPYx*FgfklzW4?FH!I>R}BT=DRQ$ za*+0Lx3Pn1e=jRf&p-@DALJ8)d_61%Lk6%KAQ8aZ07(HlxjWiL zgYwYtTc81XPz>T}{OvSA5|G9NRfPFoc2+h%pp2)TosA>#R|@hsu5f}1oTeG?!pz{>#X0D5ibn*gK+X}RruE`YEcF+fIuKYYd+C2LXisJw3dAY`ncOTKl%*QvkRbmzBGRlPw104$6UlVfx#s2@uxT z2*eEY?Yymhom_1(Ex;M{{}>8u--`kVfnKF!M`v!@B!}|0))D1Aa1B53J~UR zjt4#`Zyt~aO&P`v5cZ?LowcWxjSJ>G%hovj1Q6ES4-(t4-RyH19?%;bpCPmmPzl2RMFktG^<*5zDcq?+MDm z`rQL*sJFC@Pk?{e4~d*xXyxn&)G-)eFDE`{Z!pe%-2-hrZ0$t3w)l(y;W!`#2%oQT zz=Q2z2lSz?5@-lmFGnkHK6_Uy2XT;w`uqUleIF}ND{EIfOa<@@+oKpD5kNO5H#21fU!o=To2qVf`u(Z;hW^fUtkGgtq)fgEVaSc94dAN00_x z6s86cP{Uq;59pUdcq{&M06|lQb%A{Nd^R23>Zfvm&|l^@S^#7K>0p4MDZ{Ejd8mIA zARNa?dKnBnn6J2f-yb|YHdbD?bz)obX^L;%cX4vJ<@2z|NP{$N7bkBIYiBzfA1^R% zc{q7tyzIO^T>b1YpCq>8?gR+?p%LJA|6!o*liJdg1pZ)q3jl=u@C)R_{#2FTN_)CE z@Yw=gd+68K6GJSsbsw{ho^Z(lGd@5kHzyyAC!dd3Akb&nuHRmOP|x4d$;J`nJ9*m$ zz`3~Y*jD@rvRiR@TKPEgx!4811@~Y)1b_$eC(~BDe+9S~q`_hbrg#rb3rNFueh82X zAhZb5A zK2CDIzH)|?8n-jR@I;4}*^k$Qd(+3LX+Cv0P~{(bK0egifj5#Y;+}Swq>EJCoq|e3 zEtp1f#p$A+z3!I+mn7?Z2Dsg)!&2phc)u53ChO|L_lz6)@R2s|MUp9&Hspg8&*wa? z>F@#3q6p>ef!jBzA1#@vg;-B&#y@CTcsEnNApKO>tTOFDe$@UJVeb#~y-8Cmep7KO zH$x6JRF5Xm_}Hme4_BsNWfSNcPEgFe)up{q+H|Lv=MzR>TgwR>i;Xmtkdrr{(rWNi_K-(&374drZ7zm}XB= zpo%UoQ`}79TV=nu2f8Enml3uf!m3`ts2{p@D)HXgv)?HQr_;K<%lmJxchvP+4k{fv zEKe7HxYLJ{H}O=~DTyxJdK;$1UE`5A=B+U7yg4@F!*$dT6qz^++s^jl7RTG|U))zkyUxHpJzxZIduDA4LtK1JJ4ZJf{7c39mrhm*dBz!1k zRa&5E(MOX()hdzrfjoXsXxZ-IeGjs)e7w2VG*hhXWaf2@Go#*L&HqAkdfmIGmaMxe ztLLv$nOQxoNk1@7U38H)zLH?nzmxy{@$Tx28V8B+1OhB?*-geP_N*AKMcqpH&~lne zO#RK2&~>_iV@saAHM=LHNZZzalrJZj&PEvjx^)0YE`>Zy?ugl4rQwMhx~DAb@6Z3L z$XcbLa!1Bz&*D|vnw;U;K*5JI0<7-pfwL7K`i?ygUEXWwvLW1j%~H*VnC+5&?{%uG zF}lddE`uA*ce#Z3q?rylxn4MOq@p9|*qGelnkj3afH|i*>qvO}O9uR1{LeU|>WjzT zD2*=YB$3MYtIKij343YEd-(#ljP)f^QarPsD2@#olPJRT$2#cMTVJWrzKSOth%7CB zH7b0^xAfygteKk=R_cq4QoW5$Gv}OFV!va}o>P5qng~WY)V1HdjTbP!!cieD{%Tp6 zIEk7=OB?fs2b&siH((r6cuv}}&+YuY8(1;^>~Xfw78j2m6(enu!lGuX6-Y6Eo9&e9B_< z#+%aBM6!5XP|;~0?z_15RCKw??u6~RQoDCN;yMrWoc(+Q zH%u5WNe9u_#pc9bzxIaiv|BYX+qyOD*-DKWZnK-OBuy=ua-Bsh8kd89O)OatSnMMZ zZeDLTd7-@Yh4h;fDP6@0ZrZ+OBD zd8rF3%Q9M5$>iW39?7^M4Zn2AbIzN;P4;l8Jq!{a#rTUa6QAZF$G-}9r zEGK5A&AV=+Q&)-*c^(LV#b;ak4B|)yd5q;8Orufj|Dk?!R&ZvI#pQjr2TGEPuD44_ zzBEvxJ-ip^FtgwOZ1%82ypeX+!4nS6Q555BbX4qn!w;N%EB@1mgg7uUUbDqBBAV5? zur_91nQ}Vt<<|QeT;=|m;cnBC0fMbZ*e-xzU$$dI_$z>M0`MUb#su~-J2Hf?0Z1Z% zkKJbB?TC%RApCH^KLq$N4PKpgYzV&<@MQoW#tvQycWels4t#;}!}fz0)Y*w4{NvyY z;ve#NY6w3Te31wKVf#Vfzw5sh@YT2L4>gf~_`5h@S!i@1XhFb-ZT~xMi16J3Uv=9* z)cf7|E4Tea-cDnOeh~lP03U4S!w|nnJ}mQBhLocNPQliCv;Sdvg1;i6?jd{|z*pJ! z4`Tp(|;Qi2tB%J`(p% zpFxCwAMlaqXGe~=3nBa&z=!<@y!L8c-_fMo;DB#QgLHw%Z50>kd*b4)Fh^|KD!=NA!L-ej>17$b$HhdFyxi>VPl*2mO}<_cfR0OJ3h zXBRxC|C(n@0UypE$l42*^Boy7Uy^`Bbol-XmQf6R_QB({BSZMcfDh+CWd20*|4sxc zmjU=NeuV#bJmfyY{|5N*{R7Tj|78B61Di$_lz+k3uXhv*;@=AJVf-*I*nVI--jN~v zOu&cxw|_c+3;@3Twtv`nU@x;HL;N#SZS9{R>7Vew?8jjA{=mN|H3p;o2mHuCotTJ;mQ~;eCWJ#Psj;BN+dI zosd!dAixJdWrxAF6THgp*bx72;CF7ge}VM|`^X&|!e3;;V3YwL#t!p#+6M?s{kL_fBzHzySc&N@NN6w zY3wjY#J>&TD+50A{Oq(22)}5Xzk9plzx)0=4ft^V0^7jNy~j@LfcQVjv$cK^06ygY zE+M)j-OV@&0@Nw9~l{`at-qfDhi;H~quB->rWr;7e@t z;j@G2LLYx+NV#gjm)_<>-v|DRgt~|D7XTmbzaUo_b^q_aBK$*#w$3kL|Lt__LT!Za z4*1sF@gvW`-}y%KTLB-$z4`q76aQE~3`Q34;oJw?;CK7a5b)vt<)79+5%6LE|5JYR zwtpD^KdC<<|JM8i=gddV#NhX-K&%fDhO2e;WU1z=!h(3I7lQkLNe24ndL{?7pZsXyR% z06y~m^-tPg08HL`f8f6u@SXpFPj&R)fB*GQ;{OKt$N#{;2pD{-f4~p@L;g#^*Zl+k zG+^^!{s(+Nz(?Ny;m`)dX-9^P|NDTi0{p}I7w&=KbG#En`1oM*hVTD7owpEegf9p9 zFn&09!u4mTItV`m@Z|v?u3P_P{(TMj;9nS`hs5`Hh?K_xhlj}i1#*5jej~t#@x%6q z_PhM+fDh+iEm*;4!OpGf@g0Uyr4NcwmCpBikwVEZ9{e>Z*|z=!d}Na6VVU49(k zBm3|D|A4;%`1Zj6PW{3-p&{*M3kE;3{=j_XJraKZD?|7>fUmUO{&4=>sUiHYfDg8C z|B4^!hriQ7_$(lJ`E5RIgPpbm!nX!|(1e@g2g&<8-|#+Cwhr)R0UyS_Q{QMl5qNon z>*r4E4Y|+||9XHg3-~+T_imC={3O7K;}_ZgAou?c5&v&c{C`sa{h;!&{yTkck+=~5 zdfWVeTK@#VhtEIs|4-t71NgB0U_8Imhe-VJ@C9rEH~Ig{Ln`?fh?Erqe0ctg#7_Pf z9P}-O9}f7i{gLN>r*%O1-%;^HeIy_4>py)*%F)UGyZ-;F+<(hM_?m!^p8x+_`TsK? z;b#NBJgEOp>y79j{6WA+)(_YRNIxLu{u?5ETDh(H2evDkv<(nGtHM_Q1L|h{NIp#e zl_BL!03Y^0^1Bas9odl~{3^hQ^VcrGf^GP_?LP_l@_-MW!np_0h3UUCq?~}_*84jd zC=A{u2+M3XJZpJwoz*vbpXQl0q=gBs1Fe87=R1%PJs)yohP`U z{eOYb|7mbR^a2-*&lgEO31RzR*^V2Hdq7?~xM08B-@XqK zmM`B)!{ ztj}j~!T7#_3)+7|s5cBQ*dJryf(8-hkHZ8oh%h|?6TtoxLjP0Xg8pW~1q~uxH zf)7}pdOIJDFpCC!K&0Kik4EU9e)~Sd_I-%(DlmT?0?rU z@IJAvBsO@B;na`uZHNtxd}0>&ClZ6 zhZ}bvFCJvepXWcQ*WDh%UAbY!J*@X&Sc6t|m$EeX@w-W?!!2Z776lxq#e0v$E-H*j zbBgNL_Gys_hXEl(7p`51VP`Eu8Fx(;_@xT&sq#+qNWJH6K0l))6=qe;8DG1vvW5Eb z6mAMntZ@CUC&ray4_OcKjhs3x$G)-1r)A!0py33B5M4Ot5yQS~Ru-Nb$vlU>P?kGi zbw52^Z29uMaj2%J7p>r3(-2JlQfqg66RtfT!{SB^Q$Q`NOC-OWQNPb~^T`Jbb3t2s z+pYFRzh`3=`;RlPM9r=GS5mzu+kL1)p}KjjaQtdg)2};6_2e2OM?QSr5YKiz_We@E zd*^}^E-v2t~S>ILWu5eL=+%) zQsWzUk%97nXN1s#a#>j}o53$dTFQ$#`GfatJ#1sM1xn~2e)VbeARH^UDl+$Q=d0qs zNL$60zb?i^V#jFm0i}!n%?*1eZJ&G~Wk!fAHJOl3zV690^&cAw9u?D`k7lxIFkG^A z@85`=FnMyY^}E?JJB2|LJ9mG-J~^Xd^=WOZtDjAEQM!cac&E9&lE-Nk<~sX643dlc zpIG`nn!FmubLn1uu+;4_?}6#bwYE1dzW5o~ldqqi2$m|An!dgN%lW&8f-T~6C>w!Pjabk^V()25LduN%%2ffuw zTPoS77$*6pa;zbdaVX({D+wH1h%PZ&7sp^`K;AF7YivBa%}GG^y2_W}lf6GuUKR;Y zT=VZ`JHVawL?KDc;^27n)sF1N6dgT5%AnFu6gpCZ%U6RdaJTk!TjPubt((+!DeP*c zLh@c&S_V(~i(0#`I{E9p^fRK++h=!$gi4m*Q9Y|e=gONU#&Xg?yE>d|qQ zbL8Di@*02mZiB=N_Y#OWWtmgcKgcCx4p%&r8?5G*oi|nS!L6NmcNz#Gx}=CGKuut&yF1gSsROVJ1eBkjtU2p%K@`c@%9Lc?>d(E;1OZ^>vO!^Wi3T~rx_o8(_p3gcy zx$m&~qw@o@*D5A>W73PXCu3Q^dQd9Zj;XZf*Di6U4wlP0gQpGU>`x~hV9*u=Q zdwy47`yO(BLA9x9llv3*N0N6n1WyP=Ko*?5$GLasT9uq3(o z!v}%&g*;cbpRRJd?!VgKJYkruOMKOPES@#w0VV%@E{}B0DIkRC?ngucVjo0>d@t76 zqsU&WU?mh{e6PvRRryKrPfX=8ZmC7pn3Lzxro!IlMA6GuFs5h} zRs`Qp42S1Th%Pl+x94j%9fqgKO8IuT=C$X`Zx0Z4>JTLduc_fEN9ZmRXqdgv>D=SU zME#SC$mMHxmi>tE&Hn74ZIr#L)CuB`$l;)-t`x7+m2Rw&X*^uCToy1kn|MdI z+OY{w~lvPl0i1R+sda0hXcI|zJsYdxt>F+7`F0&nuuCfs-&uo=V zoX0##>61^f7vv@N$8**`{Lm4eNg?gah}QiSdc$zfcx6cV@w+WbZ5T$WG6q{!Mm_Tz zvhf1}eO~gKybtfpnBKu#(olI$ok1WpDNUw1CwHpw;)pq(xJQ>dN|y<(duUhgmt)ed zwgRcWN@w1mF*KKmu8~~hiIlE+V7+VObxb{rXu`bTmHnMh@rvS2K9j#y(%#ebV!FqM zbDD19e5Mdeml>_gv*EyVD(E%cz#W&_fXu8BzAPnmTis{^lQ0n+zO{GQ2YrvHrbgpk4 zZ&~WjY|;FxgQMABduQ^EQ>UN1)w-X7`L>j?#iV%dbm$Y^E%V| zU=yXu9)^I%2$U`xT6dmL=w*zS15p(YR@Mn&9nAs`nZnoBV&y}6A zFV8K%g=^+BHXXcofMDER>+;zkE`rI5_#oTbkDXqV1q=?iAKduKo^yTti90G@I2R*^ zEu7*ZIMrRGH-7rTna7>Obe#nP&6-c z)|NW!XwBR4wvzVS3>oVz2jLO@%h9;g&(2WGtv8jghPlOj>Mw{GKTVy+K&c^Qhb_9; z>V$r8;Y8~)uTCWGS$c?@@CFb5-Z#9ywm`X}(IsbDUhnq?kcZg}9Ak!GG8L z^2_I?^>KL=@4N;=NWbwQq5!cxyDdqq-FhV4pHdOT;?$%{iO^b|AoMsMzsy!AJ6m|V z$uj<1rGp;JEn5FKjbVCuHx59ssD}N59 zdkC$o|2BqQL&J9OgG0APbKbg;n;oj6Im1kxviPKEm$=ILE0aHN1gP!HBP!4Bl&*HC z>$^%C`0S@4PQ^R=U6aGQ??X0qF$7@%`Ovz1_LLt~X~&CWp?-mT<>KoL>ver~nq!w{ z_lqk3nv!chl-I8F!iT}ys5Xnn%2J;0nQPy#l%_eV%AwX(i&@iSThAK-2I}&ob?<(f zu3P=Q9)BU>A(7XRj{vu|QrAR0p3I`bm*6j-b1#)?rT(gjmSFw)En-BDLpz7rhcm|a zdP16lFC}l;u=!TJ*iBvdyCz~-wE-R~d5>AKd6`j+RcXYYhpC>g>Dj(JXbpb*=}t>0 zm_4Quyl-CfL6(lcPhh}OOWenSgBoR))VVI$_v?A}YCs5_4-mk;FI?*o!&-f|KQL9L z9J{Qh8oiG9Lf_};!m%eKFQe8X_DFI$l~F7ly5)7|-r_f|{E`Ai>SHE+L^DmgA8?rL zc-@3|z0ccfhb`U1h$ukpU=x|!{!ey~QY5sV>ab_jo-iZ(^uDb3p{3V7rUpK-a9?NYn!jf>`2*vnq5=;X)DjXDDj9Pq0Qj2Es+h+)YUd!$Qj9=;vt zs<`>>5|@di$AnDRlS>^-oIi<(De`CzSykXVn0%K=SYl6V@wh?H_4NCg$P=|n;ku(e zcnSjXKnT%A|J^J$fqni7uJYkzkCn?u<-c5aiq1Ff8({uHAmTD$@9Ql%{pHfTXESmH zbOvYeiDza?^O(;x>&;cAIS&XezaXDwg>wQ9_;mxuD~tpS5c^5u+{eTx@8YgC(W~zf zZ{f82OsS`b_bN7z>AbNz?c>z`MNu}NR`QnOIQLYV<^-sNKRB~h99#mhvbNxd! zuf;7W93~pfwL82&3U616Tv`Cxta$RaE*78&T32c|xT50RkQO7S6~hVcma@D{->Of3 ze5hEp-V~XPf9agYO!4=kw+(j`zn)}dIB_90*vw3EPs5ztXjSba*%+Lyc?Y}sdzvU( zm$aBdYoI|{m{O&nuvN?a!>G1bS)hB}-JsoAngz#<0>b<^^MdJ<);6>L(aSpdxa`@f z?>Lnvhq*>}E7x+!zS@izL<jlfv1o8!x?{y7&CI$rSJR3z)c>*d=f^>)q9-M>hv6tl)H6LYsJ)#+8`>Tr}Tt8a;(JSm1{ zc*R+nV}NB-cWb?nK$v!F;qiwD`5MvhmMn5&UA+Yth}O%0ihX1&EnSm( zp(8_X!u-nt&mpNQsNr+IBcCd-#!>#G)Z;`_C|yaku17Fsb5TNjOBx^jz091U@K&aJ z>9gbp>`W;*$F5zw@#DNNmXzfJ&yVBWZ%nTDpY9poYh$SGn;@4o*_6rQ+zrPqvR*(R zh++4gJ)@N`Ys+ie} zv#b*`xi3Y2@Z)6)&`2dben2DZNHHO?=bXbeZPI|O65Wbi^m`%v`wqmgoohLF&o?Cn z*Nlr*jvDVH{UxMKSWeZ*JJ$_-W5zU8=c z)Lnd4dGHDlLgIz*;D}*`a%|<9TNs5agNOu_+lIenU|)64P>*oM9jmZhTz`~o!Ew+G z_n_x)hw!CREB z99s8|5-%QWR4%K#4FisKj~?Y~#Se$@FW5b)A6OpQaP%84ot?7k8~!q={*wrALZ@H4Z)`c+J(9*=c^xIb-?(<*2b2>&-Mh=lL)zy17(dOR0EtafCHG}0kRbjzGm6rD~ zl>NxppFjg?Uq!Sov4CCj+sCA{`@T(#r(>`tV~+4cTlv(1WE zT<1-0tW#N3oEEiK>G)P&-ETBG^xmVS=-{UA)_Saj);*%eue&gKW58SNd>rkW{n-V4 z8sCm}Qmz|Us7fB9&4~a0QSjXB35<80F;~Za%7YxM`&9HLYA-e#@vPTc~z z;CIBZxZ&-JRQxu0llC;-cBMyeI<)6C66OW>ur^%aXJ^p-u={3$Cb4nnu2|Zjs&Izq zZa4a`OzS;X*uz=C5*6v*sH`%`aIRU#g51vY#~W`}AWv(+ZfSiaqTn#+<>>2KCPx^&V$WlJN(4NE9zKvfl6fL+jat_FV_SDPO*+FhN6Tl8 zm=1?X^E=)w_Ya%L_oa3mgL_D*%K{MYQ4qr_a7$iR{FzsAcRK&jlbN<}C3I=mzo`iR zFwmVZ+R*2J-hV+by?Y2#`{|%24dn}&PCO;5uxO10?ec~A4sT;z7a#<6p`JP-3J@#J zcr?YDB=g6~@UPN(N%b~e=68-JQ$`-aZF46%BY1ku$)t+hSWvETL+WUEeC4_MFEf0S zU61O6hYoysMfxOj>pT^M3+GD>v~F|ms7beX6fxVBp6P3I-q{Zp^v2Ilr{uNcP*(eM9#;g~OAz zVx7VhD)yVYVVk;IXx*#cF{y`#it*)0=H*FrGa9o4%?w-4j82a~Jv^XI$({LD>pafa zm_-YtTfNlGi*u>1D$e%|SK zz`Xs(tfW^K1JR}~!DhedqIEm3r!B?3`n6Dypqr16>kwhACtxgi-6nPQ+0h3q=SF1@ zd)6N_kIbCTyQnUHw)KS%KQ9H2=U9aBVs(1r_=BqAOE(;==n2O;m6}d-csIrIz<;f zj^eNRUW^MD6hw~tI?Yj3kCP6c*I~eX@VWD5Po6l%hdCCD=4MT{o zx%u~-h%`2~TiwWP1b->k|N7GTFkJ(R=Eq){GJ8e;NAT z9skm*RBONAoIJ%aPra+p(_daSo4P<13<^U;6d;!Rz05jh=;w=@d^!1&FJcXEl@u<9 z4vP_9nN<3DG9{;{e@}b3fIZ$w8*7>6KJ|fpd?_CY*GEP48f*0f^=Aj*-y&|#XW#># zT_c9ok$$p7bo-t9>nUZNv&U`}vx>^T%^-^&o+v%>+CEJ06kY{c%Z$8srct5RCM&fK37L2jj9ToxALBhIrX(Jv%G!{fBIuPxQ&ucJHk|nwO!$Rx+SIm2_@?;oIY{$96Z-4?eEw z`=v=0_wyp&z*f9lx+ZAd-j|arH)j1dBDuoeKIhLg8g9LsTS~1u&w`ssrxQFWL}~jB z=XRa{(b{vWQS+2DO7G($B$t&frN4X}wNI1AN9&rRbsMbCvAUNnx}B~%GJJuZxblM< zQ-lXznSZf+c8f6?K?&>qH8*L){MuE|Phx$Hwl`IrI2N+2AMLLvxwqm#CO3y_2Q##8 zRK2YM&PxvLrLxgI2M(RPHoeP5Jnr#Z#@>QMr-;JlFQ`;Jx>s|bIg;yguQ!kAwYSUR z``IqkH68D*A(bYbIQJ5zYmU|xu2wj6cJT95lB7U6A1~Jz@Lz55$S0k17i`rxJi1hS z_Kdb|ua>5#QpLc95qio-zrxB0t>K}`J-%^9x*er!fz~bHh;oipOUXMV)A?)F zD^YVQFLb5N8vibpq1)`6b-u%IuDz+lGzO$IOhj$;P|v+oY=60{d2vkK>|&1}&p=@~ zO4kytyCxMwK2{%g|1ygkbNZ_H>P0<^^_Lf7W+L2g$Yc{K(~m3XLg`wgb>|s!@4xUnv*3C( zZE5;V(uw=oX|*y{aSDc9Z5R5l*;ZekjC+b(rWAVFOI&RJh_>fG7d07P%+SG+%s@Zu zbJOtM71^iSpmkG}78sIeUNv&xBU`poHtlVxzZ=KKz*w{LtaIrbZybP@jn_8zkKIYByfEg-uJTTIeu<}ooV{t0%mP>}o1glhcbXjq5+&FK#15eL7$Y zXdvz2h}PZrwUv;8!mZ#25xvKl_POV~WjvU}9~4h<#W$v2<7%8S=B~E3kcgASt@fO( ze5Iy*%O)aSiYijN@j8u=l+)|2^S-Tia6;?SCEKRG6QFi!)m8n;|I?l<3>ej+^hQj#=%UH!|Cu9y!>pL|+(_lBEF58;J2Ev{((N=tA1 zY7$fQKqH2uvJTY_aF2}`_WFa`JeT+%TCuKDckE&YLif+lnw(EJcRb}-SXQF%o7b~O z8uw}$!!fbv{T{nW`IfUe!9pDz3<|o_R|bt+i_z!5u81f=tl$A}+^p4Np$wN#DZhq< zSDtY@srBT3yOTwr6=*2dX&_Ht5W!sAS?p=#F#q6G6mOyS?!m^WmF(-^`8XJVog4xh zNWZzEbxr3lF*@D&^pW|Y#skvR54s617dd?IX8-8vL!z{vKgKYrIekm!QO(FxA<_Uk zys4qm7{z#cGL_Rt7sn+p8C1i)6QT>xKoP@IJKaexnRNOT6G|WGnf{26z29#{UCT1r zN>y+yp+Ri0O}oqP>dlm+Vcbgu?u8FieD+mZr0LwL;-78MnO&hmU;63wxzW$h7KOv2qQIV=pg88}?PRggLSo@!SqCR7S&f*se4$B9`d!AM5F;LBk zD;P?t!p^)|0~$!Yo@m{dfro;=$dWX(RM}4~(GN*If`@6%oHNUxXI z$rAS@>9$Knhm%Obw;6orr#ObasW=CSGENE}LFvLVhZr`Gh?@LVm$H%dgLiK`$s+2n zN!f-92cH?dwIX2gb$nx~;D)f zUpN;dhONEiAN6(PGh34JgmQG}!3&%

I-)1eEsK8((VS6F&Y^)Rx@IJBI4fW#01~ zB%b95r@}ka13EH^^QE~|?$KQXLP$G!BccGYcQf1awBMZWDc~-<7oK-oj?HDVELqJ+ zT;n}Yhec6-x#P4>T42s>BB_FZy^iSMxzXwoYq#X;)d+KEckAT{^gQW<*0o7&ZQv)+ zKK^8Hp~geMw7HwzAx!n&*F5_^(j|M}p1UE-z?F-+U~&5wr!f0HM|lrNe&6a(R<31P zhAMb??>DGX@%o~5zh$Lp4(#$hoGh=MeC64JM;5B#xl_JHrXdCO(_9L)pC#O0aHiEo z6f8z_+*`b`IOA_nc=pEPT;AOX%^;<<7*>?7A6oY+_)q_c+w(FXIiE>;m3Tob!i0W& zBokj?pW4H8Cx%X;C)woO1+vkC5%W%2jPCmKBH;-aXrCk=7PHg5iGPj-{k-|3b*Jtp zHSsMfm}V@#Io=`2!QW5at)nz4#B8izVbv>TY-Sy;m&L@Hby2SI%wlxU95wHq`3H>| zJnt;-@J4ei58$KX4M6LbP=z*Q)+$bTJ#f#**oGKsBn+`*vT$`h-(6E;D|uq>#{JE& zDrMT|y_vA5!MuL_5b*`3QygWP$`h0Yeb~Nglx`qex1sVmbE>?R_Q{zl>;?MV39mCV zzEdVacMkXozx}4f{ZoFRyRdurU%_FYY2+Z4p;otTI692BCFR zsLwvNh)(>p+y4CXN_`i{V2g{%A1(_WaMtfnd_Q0Ftr=o?{t{BQJv zlBF6v($b7ADwh50p4Kv}v`!>!EPDz|44Or8gwG73bkCr5pN`+7*Sj*PAyzW6QN`_9 zk4f&j&UWkGq#AMoeMKWaB)l50F z)j{Y?c8S7;u9wGOaN6)NpW^{S$a4&TqecuXl#CU%DfH_+^72PqYHh}G^Y;qzY)sGY zsW&LManyPznVhozNf3)Wp{}FRun&9LF3YqhsxNuuj?Dfqr<;PkdVmn3dlnG|h~39c zs55_*N4U$Y*C{NFCFDSPdA_@y>R{NLg(>yK8XNZSyQll*DU!cR79}6a^=#0@X(!>| zBN1NbKqX4CtSODs4MXcXJ^EER!Y{ondSc%vGVyCCb>E~O zh>Yv+_rSRW@=`xa zJ$>KNrwC-SHs4A`@2exxx}^(Z56uUxO(suec-HT&Z(Y3+dD41c`460OaWz*30%rRY z(Jc`*hQ zj5tZh732v|^*1gG(NaIOUNmCuL+M7Lb+3`g^emIR;?5~l_#D1MP}I{cJd#+x!P|B+ z2fB-fDGF9qVaX&+d6P?>U#JHe{t$KkI-vp zZLKcFAeM}aPvstE23EyzFI>yfU$Dx4kAptffMWwOERVw*0lyXcVZ+D2_H?Z*YM0mw ztl;h^{CPC;MP=UFTJ0$JZM|LLk3IE`bId^7R1wHfzeze9vQ)_A#20<99q!SQcw-Pz zfLOssS>>;a3Sw8Zh7@MRNNziNs+h?sk@aJL74dg5s)>KaQu`&4IPMARQTM%_Kw)x$@k{jod!T$6LEF-bmO zkUoVBrzCvF5Z$Y2-CJHs0tZ|#@d)!nH4VAm@*iPo5oL-!Ss#4AP|&;Pxx4&XqnCX8`vctW zKK3v8ah|V&=2UPQN;d(mo2XLUi+7Ok7iqiDr6>aXc=6ZClCOkaR^MQnrK_UK&bD(L zzGNGmJI|QZ@Q98=EuZ45W++`-i=%1^rQHFm)NGV)B3gIY%Ff5TThHTzy_Gk|kIQ|6 zZEt_%Qe?{5G3n~xrf?>+D1CA&%&&t%bc8-j`t$iPVNs&bcgRdh{9fiOzV69H@7I&i zy1LrWS1YgLKTc9P;rT>IKb=R;^OJ?an{dgjFNXFu+8$93IhrEHkI0WIp0k=I=*v#L z$zXiK6<_uEYohPF?F@KP@xs4ZKn#1m!sw&ak-?#wU6F28&jh=dueh#PKa#WZ=X^Rj ze=j2`=uo4DIQZLz%i{+Lc&&aCcFUc;(RER~ck*t}MW1@_eLx5q4=IQ!KOn!f9V&t4U^Q))A z$r3mCm0Y_f+LgX{ug;Z|53lmlCChyMjvfzbXkBdP)wX>`ZPSSt4QNf%y-kX4Jikdv z`+T>~iMq0lpJ5dW^CE#bUHb~>Oc>LGcu$HOSl^>MgRf>UOLpuwo~yYE&_db)z8fKi z6&W1EyP~suX01W{&c+A1u+MCmjYjdX)=wVcR0+hKukOXGVHgR!LPJx|KUtR~Sh#J+ zne*v`3@x9}WqvOnTO1&S=%yp00I}z@C1uY|VxC{$e>Z|woYpe!-adQQHs%G_70U?c?m5fJLzF>J%|$o%B(nwIbM3^pIE~At7tWogMt0A@ZtTt^IhMR6lbOwvp*jVVCguo=oi2t zHPH9qyrX3EyNtS#{g2&G2P`a6t)TalnP^?*Q@S%O@@DgTDvN@7j*bftSp(T$wtw-w z5!vtU{gkDY_^d6lk7?dS?j7#^o!%d<>;oM3(s2$c)sgvJE67SjpHF6?b!%j;x-Uoa zOP!SM=+15QN~jN%YZsa2lYbHHSJHQonr-8Sey~ARK{Z9EyJeQlu_UD;L#)E-Uv1x} zj0P{$%WI(80nQbOVIParzhpVny!_6mtyZb9KbT*>oh**yJ2v8^PwuaqY18ae$NQ#B zIg<*=sVmbfzfc-zYTJCw{q2 z^E#K;eVqfjDf=(VQHw`r^NuStw=opjUp}7n>$%5xbu~?joY3AQDgEA_T{#s%1L?P1 zwC=fK*P3M9&YO)P%($e46Z%v}lkjp*i~bq$J!MT&ZowH0^Y z<-TPU9NANK!B%kc6pxF1T(|LGlC)~Iqr|zjDLA_?@~cIp}f&tU8}#PB<0QI)K*W)a_xj6GNbsa zwT8Yp+mZLGF&Y;zF}J>cuYT3o1ozTNy!mL|a|Ac3?;4YIXPMn2Z1AhZ63Qs5w!NWi zChqd|m1h1SD&~u2+C%zs$c?!N6D^e%qjjX_*~~X($6xtwWMvw!;29L6TY%Q>R#+Fg zQd<(aaJ9^T@5%1|>o28u^#*_DN*_*?VGRkOWFp%8YK$jOFlO)kwOIBu+*xP8>sby@ z#Hyye=0AdW3~C{|aIc0KmgvjpleZQFk9CLLxLSDYY*?j!XW+fF29+v_E!e?0m*RVK zu1+cMq#3onxxYHTW~P4Y@2hB|olNL)V)FTZ)vlvJ2+=J>L;+&w?;gpybi=N>G3jy; zj{dHFVJS9@l`f-JYKb%=DPK&qWh~8zjAgjl178SubuJNd|>C+CaFlr(Zhr}ChEZ##AS%Ifb6v8B0dU4)AXSh^(rDD~zPmfpIk}5<+QX}30YC`-bU+|yi=b|*N^EYe(=oceGgajN1ZB5?!;5E1!>vOm9#@p{+LXfmHCw$PVN8~C#^_)z9j-|3r-{DwWHbuP^PEPDt#%B4*5 z>J?kf6ZWrV22JWmrap?iezBCX4!vK8f3tuXHgoXVBK?DlYX{%A?S3{9X1<;-Wv^3G63&l%x_HbP=Uniq^fDI2sZ6I z@+!_>TjKXF>?qbCi|~F#>u_Ne{eFBO5e10d2>9mEbo7~F{8(DM!z3qB@S1vxmg0+_ zWO^E6Nmz9QJQDhud_gg8YbS?s9L}rvE(j4TJ%9B7wD%S8QC!j9n~)-bgy0SdZW|YZ zyA>$X-~=|CNwUdiciG(#0Yacya4S&UDee%gKyi1sQlPj?Df<5B&dkniWH<2Sd*Ayt z?Vp*s=bm%VJ@;I{Gh1wpN6h|RB`Q$hfh0=IIv^Ij}P7?`D~l#JRrK%2@l0b%DZR>vWfWT z)U5c6sW10VsMocM;_B*@7CyUXZTo)3gn+S!2K3LLT_x`1G z&sTk)xT$t$kI+1&`?bFKys!4h*g+r4=LnzL_DQ|I^Zx35q4;rCZf)T-xqZ{*au1F2 z%Hdb+_SNrRq$a+2J*4X#?auN~qbr}>Z_ZPA>)_yxPn~z>8`N<@{ZY;R&W07OHQlN5 zP0gxdBbGc$bWI8P@z5!mzFXyTD?f2K`L|Q*>co9@3wLe4<9%wgMO7y(tgfD&Z_>Iy zSIzK?nKLt}!QEMlO6xxU%V%|2G0-p7OZCime*aTjUn~js%U3SX?NNo^&P-G6z0)Mu z$8n)6PvkuwAJd^c1c~;gH81hcsrKgXz15}OuW!6)(0k`8%eP!>)_HRBhcW@7rhci< z`rQ9K=w`9SHS-kf);`DLYj4~QU#fQ5*W06ZmuCLw?gX`evZ5daiE?*{LUDCkHnLvT zPif}*(G%CSy1m7$>E?Ut=FD5K&%HWx{H^=FF=Y+W-;UVm9tB` z8^sPs=dS!={JMk<2cGR;6T2_+*;4Z=cB zU3vF0CSgGN>P@x|4ZE4EY=~1%mA0+>#nLOrD(1TGnYyP~?gLNG&rGhhwsz4q+O$zE zyVi4EZ!Ac2Hqj2dM4`AkMgP$L=#)BRhrjKStL)K_V25?+;t9jP!}-rO3m8759jJiPH`%s+VLd1 zP4!OEFJ*G~$mO=!)h+UqcaDO?wrCg-O>nGUU~%*Ib$iIy zOZLj;wn#nc@Z;`I4F~2=9#pdJ(@I}H^csH3RNbTHQhkns1zKM6C>mP!S=W$xnmqye zKJ|^5w(rTvi;XAeeRA99>a%$(Ysbm--6xluSmO6h{!dCw)HJN=QMr=q_Clw+6**rm z<=*L?;}ha9dab!UdiI%``F59iqY4Sz?6_mdC)Mk}8qGaWpk@8n`%hOobwVb0zg%vr z+sTTH^Z(eS$&=G3>m0eGeQ#ho}Hx5ELsT&MLx?Rs_UVR|-gXQi9fx2RW_|7T^jJxMEz7cDxe z^_b25E)Lm{<3rUCtBY)$bSuX}-|niu3k&F?1}|^zzsK4C(4Vw-F8c35x!k4$+IY_8 zX3alPro%)f|SKYk1Qaw1NbGzd2mM^&4W^4458Wo70XtT$vq^OJ7GY~)j&isruRhjToyI;J|Q>{jaw8X?U zp~os4+N#?2>8xsVchwT_iywbky2R6E+=sBMSA$wa`rU?KqmL7TyEn{({laQzE!8cJiolD)X^5@QQ)q&6ZwJ|FfB<;>|uFtN6<5m`^=O5a$>V>EEnuUa%_`Bd_ zncQP?xi>EBKb^_{IAqOugI1e#pyr&#pNGsp_vEZm5$!u@{h`Y9>J$sS{&9ng=ZGUy zO8r!1=A;St2F+e}Zu`VrcYkW~a%VT0+~ab&3rqa&ANBFY%g+Y`lH-;Z+b}Mdp>DYg zqaR<(JM_e>4>J}&fAYG@<^>*2+IN^)?be_3of}o0)U49aht29=0xx?E3b`zkOLav2 zbLxMzW3L&8D~0Y}xt&M7^s(=;k_*~3>(^myvtZ?pZh>nX6c{tmqmX{usH5F?&x-pk zY*kWOm+6|Z9k(U7-MRMty&w8Qkm$eE=Zk+%pT`gGnK=0Ah*G5+*1X?q=&abPKUF>- z(jvV1gR?(GRpNf=;xK>7@D&wTzg)Yl|4#!h?W@!Ha<$0NF^#ItSyR&Q`*tx9B+8{e zU;K0Wqy2z(_17Kl=DWPso8UzcodYhlUpuhy;p$C}4PQ0=wCiS%Gp3;**5BGNuJfp2 z6B_PM?t6(IY;|>m9M+mUp{X+BbR$F zA3~4v@a39aZP92Ut z=)2&V4_9+q%_alp{rdJ#$P(>9V@vVR=}X7_d0(CE{wDtQxTo9N_v~tX9Xfqe&K1v# zB^US-Rp9sQ4W>=bldG%p;>6LrH~fA5#=wG!u5m@nYg1P{yHxsesspV-iE^p#iGNNP z%U5euW<%WQO_6{1JomWqyWO=*lu0}DT<-80 z?cLn|nwGnngE6&t*wU_>J?~X0H~P9U#_#Ht-ix)<*YV;HMjrm#4THe7M0F#FxKl+41Ye7SV- z{te^({{O07$PdZ^c~QR&W!dkMGvA2k!VD^PjG{M)u0q}a?+znf%$(8085N45<#}Dm z|Nbk(C=HcbZ`9%HSdsk(Lke#H4g1#y|EK+c)pK|2@fC$>yx4ERTaCH?4g1$FaE<>p zzCnI!PKTa_Wn{L!sk$(R#!bq1{b@96e&|xjE`2}76uZB^6Pc-2B;!C)?3Hkls z97Z~Gx_%m6gkIs?Sn`+bggJp%gq-)kJM8{SB#gg4!bZJwU6WDmsnMCtDy`NNFS5o& zXtbQ?k4BEG@9yjEZqg)i`iPqD{_ZNRCQ_%5aOU~x-_Kw8Kf0%NE;^5fF&z67pUFnz z*)&?SqBuDK@%KJxy@|po-{M*htrbz&cYwGLNi+(ZAn5&E*kE_A8|UX+AL`jql=w&w zN|(|hxmW^Vzw4A6*E|4a3-w(=Yvq`OvV72QXD9(rfbu|R;pp5NoiU@exVgYQU_P(_ zSO_cv76WufhSnG99Lq9*&WEf3$o!Or)xa8nvO#Yhwd|fj}}a2uJ}21495>lN$;Q1BL@5fRR8dFbe1j(0X=v zpa;+s=mmrVy@5V}3J3$#Ksdkw5kMpm1!#b109`)&9-JqxRRPp#MFF57faxZ+ZOjiI zP#dTTlmtovrGYX) zS)d$H1SkeP1)c+sfIooazzN_aa0>Vx*bAHi&I0FvgTOXmCqUoTr{9X9-<_e~qM_fj zDFPG)=(lk418zVE#QhOy2vh<*fa1Vu;5={$*bV#!>;mZbYsv!jdpPvlIpq;n0oVu7 zZ`siA;5OY0zzN6!I0CtV+`xB0PT{#Qu7!YtfGdy>$P2gtl#c=c`6Go> z7}EpW#Vbz5zrA=`f1C4-&KwY2?P#Yj$C7&hVB_AeV_6Nwf$;W*F@_DMWR9}?< z*&(aH2B6mm>H(B)H=rxf1?UWf0OW_AfQ~>1pgr&d&<cS_7?smOu-jInWH~ z2~hf{aiuy!_2oEl3^)qx2gpyUj%)?i11o^uz^}kkU=A=JmERYI} z1k^wnFaj733_X7cn(-+_XNt= z4M;z-&um~8FawwlOap!aW&(2oqRj&+9)%OnVt~Sz0E>Wy0NHo}Ky-OLq7#k6)2Abs zMe&vc%LEL-brrA@SPQHHRtwj4xNZP81Dk-2z!o44*a>V0b^yNtyMbN69^iLiFK`4n z1RMYk0*8T6;G}S+GNk8=zy;tu;6{nz@4`9$>Rh*nZ(y&uS{Nt=TE-tf83#)FP*f$0 zR4OpILZ@T79YTGAJiR?@v6d$fDE%Kt9v@loQF&0jJ$*fWE$v*&+)61mYYgMUK=JqV zBZ{~(Hsbq=&fj?@^Z_Nn)327Nk7aG`0bVUW-Tq=4<3U3FFFU#*okzu%jVLj3b8bgy zfOLHP1A~x_f}or{dScG%sULurKz45K$haaD@3lv{y0BPd-q+5l0P2zLC z+5(C_pO);_u9>4l5G)Xg5GwHk z$WPMMa&E`e%0%$^@T6F(jQBg#@!YT%UE`X7;_Jz5ZO|B1X3nG-^z>0;-PT3t3hDSL z6n`OpVMu$}LEXRo=&H$}z;2$w@Nfry=CJr}LUBbrdt{)RB|0tFRU)xwY9S( zZNI?t-QVGN9^Ov%mUzrjoK6#wsCfBm<%3^)?-}dp;OfYiOV;VM&cSQ&-Mya!b<zLEymk#IJ_Ii2vmLx3=6lYKl zj~(Dz%<+5z`5TG>(z4bqYYoIbL&uAKQ>HcYts!UtugbLK;63Oga`M*ccza3Al(03O z!2_=*$4>9@Zj#4?hicZ>r1M=aKAro&j>>=GLQa&z8%QA=e~Z>@AuTU>7q)#i_*Seo)A-{rYYkxo&%p z!k`Eq60SEZ)u_TJ-kf~C@lCzm5~VbFNP~85HBRH4hIIkOm-i~2p0OzWdu^UxVe!bK z5>FNIkZx;_uDnwHrXob5_z2SOOlmrN>4kQ07=`7hE-2)^X?Hfy7+>D&g2dAd6w>;A zzo!#gEE-r-qI49}>CtLn*poIBH%Jt-NvomerTN_J%NG>e{tgt<+7DxiEOVMQPu4lj znx_^rLpC_!Z@TpQ%9N*q1}M3#d9tQ_iw3))0jt|-4<;2ibFH(Z!T*$Xz9pTk{rZ2( zZr@T0V^Dd>57xW7I@U?tI50b_XcKh;#cz^2Y0vC=&`pI9s%r+l$*eY+6g^cZjy!IYd$6NJEsPI* zAT0?oC_j!%o*#*bN<-TlfQm&UnxUW+17$UPGw2F5z;FkRvSKDEB|)iFW1c$r z&aPsTZkq(2$vGYkTku+?kSNDMDGHuBU29)(+^a4tQT_y_Fern4&YKI@nA}yOyalBQ zC|CR3YUbzDxTHkMi%gXP<)UfhwMC!KVO%9zrz$8VKv^?r(EWmWo=ul1jX)u-TMk#W zuDP`9WQo!P6w2wvAw}2aIa||7q8LFb4$6e*zaDGe?^p$iGD?uv=JK+{79AaB`B?-C zX%IO!?(CR}Q7ID7PC?q`4}TwUesX)5M7awJmA2E$yd|29PSzH7IFAsj?Isn94SyZ) zH6B%9VpKw5OJAR{pL+@(vSj*^otuM5iO_^$zZSFpa$zq{znI+4&7pohcZ}^ky)#Oi zT#&bMM#^JQ+>wq>IN#9whjJCm|9)XK>VhBdqfH9&US&#c`FZ2wiUUAF8st1}L4len zHO?Qw?x?r3Z*l= zPtE0}c9i{7q8tSU|EHX4^s?;t-wh}tQT{+MmEhtP6$f`T)q5gQo(q%`aXA;}tX;}i zqEI$Tw;a1$YFb7|w3jFaK!NE}Oqwb`j()8;D^V(fLe^<e|cJi(Yuc-#}qJ zZ$Tj&)J@VqoL6yraYkWtncU_0x}E3C#JPRUw;VvBu?rgCW6+Oky=*o`b2Fq<06a8G zYoDy$ac$j(mEa+YAJ#2Fq4KHIJo4P3bp>g5NHq%+K`&6yV5U^-wdhcto_)|FvC*I} z)~*B%%6|&;7_|9&(wa<%($AgU96BH_%@Y>kO1jMm4s`y!{K{vh0pr;sNUI;}xZ~Wj+&5V|u(pq4A1GwE zw{w1LHm2z#nuU7$uo3*#N;21CF74;%{vyFMUltEz78a>&NNLCalHhTGF_g<8$~mN{*FJ6nMz84c-}QY|Hgz zB$Ed1u&xCPc}T6+N1po5ESUfb77u71JQx(}8|#c(aLw1_pFN<^$N@ZaK%p`nQncM~ z!8do`7kHrC3Q%Yi;N>uRTIf*~bOR5%`yj<8P{>DnUA&^7)zpDz@4lXaWP{&8A-fGe zd!TgA9G;X8>q#&oRvA=bT2683AOE~llxNASNE$Ra0v@Wtu4g{J-1yJWYe69+z^iTw z>3kfybke00ebJ7BhqeCqK_QDS<(^Dzdii}fmJU^5#aCK~%}d&p=X>YG7n?3!ZLkBa zCCUeS`ztt5$fDzV#cG`D-mXs?1VM#>ta6I{7{Eh4M$hXS?QlQ8P2dUSYp{3*>cx=m zUzS#IXaov!N=28k{xBP$6!tb&JsLok9A97N$*iS0_H{8NC7`RsrE z7plShc+{yf?;*E7A75S7-v#40zJ0?EMFt*Fz~pU1gEf#wWqNL2gNKc7eWcL_zc8nG zCr~`DdWBXA^|%KLc_Q*NxC(E#Ll68{#;v{a7!+!IYoQdP`@!1SSNma#Yr|`;sZ0aW z^1?$VgNN!u<&k?=JUr6u0VsZC>x?{Z#1l+)!L=&y*Ch^3%yWI%+7*n4)sixxQ2REt z!MRecPaSFj3iTM!EeI6yx630df3DwSWFAmxp%2pHj2b1K!LH(xa-e68QNux@_5d0f z;&h2>eK=RGepqUd>vz4FG?r7(>b!L(dUYRLc~iY$sn-k!h4OPW_k+r<+Z{P3Y0wN5 zYLS}lRjZFzc|~i3wRqj4R3>GFRuwt8HP6+dNR_n$w^TYP(-L>UbV<>z(v?OP-AqGZujYUWYqnyoQ*cqmSx~5F zD(YRL@B3ykqnNE(`4mLyQE!&kHTe9L9ST~vw5#<`;6X)6aXt}vH6%3uE{P{=8)U6p z))ws@!1k$A#>dR+UHSc9jLGfm)*n1*m{VqM$$N3U&&wMU&uma=)EQbYFyTe%kTnuz zqd*B-bg$~t)t{G1l&nWWN5NAH(guv4Gq&T$a@!@Itn>3-In8qgiY4 zEv22c4gLw@J^r7BpI+RqG^d2r_GTO_qse7|SyM9hSt8FavqR6qOT- za+M{srzx5iKFdhqv(UR`Tl2NbicU7&ppb3f>AG}a~>4R=}&99lhuQN*vfd= zQr1mSsO9^(JLsRITnEf)*_Z-6=(Ct*Q|l#_+BI(8IDvw(Wudx!erEo1q-5XNw7iVM zT1!Jrq%s_HrsJQE_t@9`-EB~)8H2Ph;GxmR{OF)f2meX>0*YXRmi74l^zpl}>%9x* z_6LQQ*}xM)7L79~T>sLzmfX|D7MBC)1JY;1TA42Bq1Uh~x%$sZngn zre2tViK7jJ${eMP;S$f7c6~nIu`cz1!T@ep17Vg^Xah4lDAw9>A$GU3ilFJqHK0nEX4IoVgDP$ z@J!n75ANNmLBHA;%_cQMu&4i_@M7bX35CNnIxh;#e`8_Yr)BzXGn?>Q2ej#R)_rit zi0|KBZp_OYS}Wj~LxSt)Q$h}!&;c;~;k**|?|rh|zHdktF?q3tny@&Xl0CA2)JBcL zEEJ6ruLCwT#jCyIRi;=a0x4>QQ5DO@>y0r=TFl{0%2<7PoR)*DV?2eHg1soEBo2NV zC|n;)xe+WRT$DNtfn~w$Im&D{m}+}Lt4NIrwZKznh>bRR>Wz^ix0h19Q(_{9cE-~j znWWao#;SBkTdUDQ9o#C_dTm@R4u6`I8XZb6LZ#-E>L^Yf!x?QPl38@5m|3tAZMLV6 zA0=-?ps;Ta8N!{C8v6h{T(L=Dh)q(m&3B5c(j_VlMtv-*EZ;&au?me-tHP$Z5=UHZ zC?ShQnc+9miARY80lWppRcH6Q?*8^A$)wQwvX7nY$g~Hi>l?Opp+gm5ri+ptr=a)|CQtaemKx_+jZPD*GOMFlORa$`hT+tG zoSCy>)AUgxKYb8%BX6^<8*TKHd2m5|ax>fU`R#vj@HZ?CUpqXO{DIAKkBW%77IB6d zshV*K29?gF(d%qvI$cbNOBVul@E^-_80KlnRJf8^R*ej*%(yq$5HCf7Wa$BQ*1jFB zlOxTn($AKi#6u+D7H?6RX=T86nTW?y7$1K^g{2p0hfn5$V3j>FZhM|!X+FVgxzAS3 zvb68uwA?HC15Ko|RIja^YEXasG$PM9oW!6rShR>xj_5|2TEQ@qU< zpKuTXY{H$yrPap^rm;~BQY46w9#|V-&ylTcN?DfMSkfcTU=Z|BMre#Cvkh(1M}^Sz zLD|xbbxTyz5Ma5NG_s+AL1pnB#%p;3H}$)=JwWn7#wKXW(nGdNPHn04EEi$}ATGO$iiY zO4O+_WZ-95N|RY{eZiwMbnYB^VVU$+i#!{gohRPKb>&Y131XL}m;WY#kk{`}y+9D`QRl z)RG{cqEUgI8G(rc1HakD`Zu<5O>-#b>O#)gcD_uh_G)HDC80DXC+e# z{?CX_uPHC}Kcg#E2)=@)S68BZt;Vt{EeMr`e628{B|*^(vZR1-6vd2YEsVFL)R1PY z{>U0di*iV9Wt|^pd+QJ5xS93pFqqbz4=CpwO_LK%7$sA z4uv$g^e##oTLzI}tZqo6F%HLyrA)HTmQXmT3Bkghl0T?PVhtL#9_vhcqsgR?Gh!5s zNh!KDTbjz_k+SkIm1zo0L*s#1Kh}7{b)gju!|rS$tWETFLo3zo5|((~~vMVt%E- zZL$)q$HRPj3e ziXm|;wR8|1<9Uv@^$dC=LU5V`#f{Y}gORgrlE-q!NRAzZplL+_%`Ygsf=>7pul+2` zvWsK=!m7BiN6+D9ORUTz*9OiKWXAdxkBkIu$(I_yT!mYi@dNOlGQXG#z#Da`gt z&3eR)#KvGG$%u&4DkDs+=$H;lGP5#_3c;x4j7ChT_@e|$W1LRM8QF1Fb~Hi9>9O;T z6+_w_id8A&%o;6- z4p|ar)qrgULn(H2-VUeCHsF;#!TE7W+TK2iwV_D@?NVDTk9LXn%55v3sVN~U({RkM z{cwJOs${fL6CTOMb6Twz? zyi-j|=QxpQ0|d9Rp^#j>m8&5It7jA$_LkW4kDNznu#`BSFAwI6lGbnNWWG9^3Z&z* zWYQuB<%CLSZ&gLEh)h3-lRcsFp;I8X>#tmr%$|@Wdt#Q!V15&4#?FILm6+YUi}5Mf z;(fOK5{-3+mVgP#7_6k@NvxI_FMZ zNPIsAT;grEhQgVt1{s+JXR9;J+6a)EHBoXk8~&Bf-l9OM1el-L8*5~Ap>+ABMRdC> zsG)|^$(mP(P)R;r^lQ3IW;@=4qIm5%ymeV_7cG9#OsDs(+8O39N2FvPa zR`UQzv`I(a?4Lj7U+0A={svXczE<)n3~|b4H0S~ZXXQ+IUpo#hAnJ_$wor=11d1Hl zGLj`F#ww(mO-?Z(>r`p*Zm)3DP3xEd%Nhku^w5q5LyqnKCjDfQ#H5=)l1c6RTE=-O zL}d(w;|e2O8}2Tj-$IJ~5oX0upDkL*&an6gb6UI_W5jv`=2R?I4NjQT0ShB2bQmtq z5RO+plvc9B!>k@@UTj0F%q2j-%n2-~{KODjoJ?(7r#i$}9;pC?w;!e9hz+f*G6`m@ zXVgISF?KyE6Wfs*nFJ$KXg0jlX_Xc!68K=5r|6_&2FcbE)RlnAVIjxpoI`_SCPyl z*>8i=sUwuORdGVM%z|Z#+S1K>NiV%ONwO^t_Dymz+=nO{^xJb}U0f`EqUftt7WgEE zg@CLRjKJ8zj9G@#pr_@|C@w+CSGMe@ouvq#O9&DxsWcAKZSs9OPY; zLkk&_&t_jAp(gPq0AW_o{~3w$a+BoBL$fKJpJLG{k)spV{0&A}SbMa$;2=y<jB%pShpW+n z;2RcLv9Kjec%z!c2)AswVo!fbI5?#T^jE@a6yEGIXjM39%)g9gio(lu`gm+qK`9&h zSjB^At7nvuAl-%p;oWWU3U_RU%-#q*ox0#o7s9M!Z<$hjJDjl#Z{cM}XW^SxU=!}( z)AaHje36!*g*8qanHFL&0qjR?P@#NloxkXp|>#pl5e)+?G_9!jht{X+22H# zbCZ18&MlknFw2N5>*{!0IhDnNB-sf$1$~Nue`3v|JxyfEfm`;J zz1$0*QJ{o{TPY_ttS)?HfoG%7Ex^a@FMF^LFfbmxf-ZTbjdW-^7yY&TzySC&31yWH z`lSOUJ^}hA9eL{}?L^8+&X@&OY_v$-l-!>k{nQhSrRZ1lSe%wEvPN z`(y+-*p+eEEBADIf;U}=Bt;~!lL9u>wu&bc$oQm+X+r{YUhK4hS-fQ}gS}yvWfv8U zmV1$X%^r3QLtEud} JB>xNl`42jJGSL74 diff --git a/src/api/demo/lib/api.ts b/src/api/demo/lib/api.ts deleted file mode 100644 index 88dd710015d18..0000000000000 --- a/src/api/demo/lib/api.ts +++ /dev/null @@ -1,280 +0,0 @@ -import * as Schema from "../../schema"; -import { ByteBuffer } from "peechy"; -import path from "path"; -import { Loader } from "../schema"; -// import { transform as sucraseTransform } from "sucrase"; - -export interface WebAssemblyModule { - init(): number; - transform(a: number): number; - bun_malloc(a: number): number; - bun_free(a: number): number; - scan(a: number): number; -} - -const wasm_imports_sym: symbol | string = - process.env.NODE_ENV === "development" ? "wasm_imports" : Symbol("wasm_imports"); - -const ptr_converter = new ArrayBuffer(16); -const ptr_float = new BigUint64Array(ptr_converter); -const slice = new Uint32Array(ptr_converter); - -const Wasi = { - clock_time_get(clk_id, tp) { - return Date.now(); - }, - environ_sizes_get() { - debugger; - return 0; - }, - environ_get(__environ, environ_buf) { - debugger; - return 0; - }, - - fd_close(fd) { - debugger; - return 0; - }, - proc_exit() {}, - - fd_seek(fd, offset_bigint, whence, newOffset) { - debugger; - }, - fd_write(fd, iov, iovcnt, pnum) { - debugger; - }, -}; - -var scratch: Uint8Array; -var scratch2: Uint8Array; - -export class Bun { - static has_initialized = false; - static wasm_source: WebAssembly.WebAssemblyInstantiatedSource = null; - static get wasm_exports(): WebAssemblyModule { - return Bun.wasm_source.instance.exports as any; - } - static get memory(): WebAssembly.Memory { - return Bun.wasm_source.instance.exports.memory as any; - } - - static memory_array: Uint8Array; - - static _decoder: TextDecoder; - - static _wasmPtrToSlice(offset: number | bigint) { - ptr_float[0] = typeof offset === "number" ? BigInt(offset) : offset; - return new Uint8Array(Bun.memory.buffer, slice[0], slice[1]); - } - - static _wasmPtrLenToString(slice: number) { - if (!Bun._decoder) { - Bun._decoder = new TextDecoder("utf8"); - } - - const region = this._wasmPtrToSlice(slice); - return Bun._decoder.decode(region); - } - - // We don't want people to be calling these manually - static [wasm_imports_sym] = { - console_log(slice: number) { - console.log(Bun._wasmPtrLenToString(slice)); - }, - console_error(slice: number) { - console.error(Bun._wasmPtrLenToString(slice)); - }, - console_warn(slice: number) { - console.warn(Bun._wasmPtrLenToString(slice)); - }, - console_info(slice: number) { - console.info(Bun._wasmPtrLenToString(slice)); - }, - - __indirect_function_table: new WebAssembly.Table({ - initial: 0, - element: "anyfunc", - }), - __stack_pointer: new WebAssembly.Global({ - mutable: true, - value: "i32", - }), - __multi3(one: number, two: number) { - return Math.imul(one | 0, two | 0); - }, - fmod(one: number, two: number) { - return one % two; - }, - memset(ptr: number, value: number, len: number) { - Bun.memory_array.fill(value, ptr, ptr + len); - }, - memcpy(ptr: number, value: number, len: number) { - Bun.memory_array.copyWithin(ptr, value, value + len); - }, - // These functions convert a to an unsigned long long, rounding toward zero. Negative values all become zero. - __fixunsdfti(a: number) { - return Math.floor(a); - }, - // These functions return the remainder of the unsigned division of a and b. - __umodti3(a: number, b: number) { - return (a | 0) % (b | 0); - }, - // These functions return the quotient of the unsigned division of a and b. - __udivti3(a: number, b: number) { - return (a | 0) / (b | 0); - }, - // These functions return the result of shifting a left by b bits. - __ashlti3(a: number, b: number) { - return (a | 0) >> (b | 0); - }, - /* Returns: convert a to a double, rounding toward even. */ - __floatuntidf(a: number) { - const mod = a % 2; - if (mod === 0) { - return Math.ceil(a); - } else if (mod === 1) { - return Math.floor(a); - } - }, - emscripten_notify_memory_growth() {}, - }; - - static async init(url) { - // globalThis.sucraseTransform = sucraseTransform; - scratch = new Uint8Array(8096); - - if (Bun.has_initialized) { - return; - } - - Bun.wasm_source = await globalThis.WebAssembly.instantiateStreaming(fetch(url), { - env: Bun[wasm_imports_sym], - wasi_snapshot_preview1: Wasi, - }); - - const res = Bun.wasm_exports.init(); - if (res < 0) { - throw `[Bun] Failed to initialize WASM module: code ${res}`; - } else { - console.log("WASM loaded."); - } - - Bun.has_initialized = true; - } - - static transformSync(content: Uint8Array | string, file_name: string) { - if (!Bun.has_initialized) { - throw "Please run await Bun.init(wasm_url) before using this."; - } - - // if (process.env.NODE_ENV === "development") { - // console.time("[Bun] Transform " + file_name); - // } - - const bb = new ByteBuffer(scratch); - bb.length = 0; - bb.index = 0; - var contents_buffer; - if (typeof content === "string") { - if (!scratch2) { - scratch2 = new Uint8Array(content.length * 2); - } - - let i = 0; - for (; i < content.length; i++) { - if (i > scratch2.length) { - var scratch3 = new Uint8Array(scratch2.length * 2); - scratch3.set(scratch2); - scratch2 = scratch3; - } - scratch2[i] = content.charCodeAt(i); - } - contents_buffer = scratch2.subarray(0, i); - } else { - contents_buffer = content; - } - - Schema.encodeTransform( - { - contents: contents_buffer, - path: file_name, - loader: { - ".jsx": Loader.jsx, - ".tsx": Loader.tsx, - ".ts": Loader.ts, - ".js": Loader.js, - ".json": Loader.json, - }[path.extname(file_name)], - }, - bb, - ); - const data = bb.toUint8Array(); - - const input_ptr = Bun.wasm_exports.bun_malloc(data.length); - var buffer = this._wasmPtrToSlice(input_ptr); - buffer.set(data); - - const resp_ptr = Bun.wasm_exports.transform(input_ptr); - var _bb = new ByteBuffer(this._wasmPtrToSlice(resp_ptr)); - const response = Schema.decodeTransformResponse(_bb); - Bun.wasm_exports.bun_free(input_ptr); - scratch = bb.data; - return response; - } - - static scan(content: Uint8Array | string, file_name: string, loader?: Loader) { - if (!Bun.has_initialized) { - throw "Please run await Bun.init(wasm_url) before using this."; - } - - // if (process.env.NODE_ENV === "development") { - // console.time("[Bun] Transform " + file_name); - // } - scratch.fill(0); - const bb = new ByteBuffer(scratch); - bb.length = 0; - bb.index = 0; - var contents_buffer; - if (typeof content === "string") { - if (!scratch2) { - scratch2 = new Uint8Array(content.length * 2); - } - const encode_into = new TextEncoder().encodeInto(content, scratch2); - contents_buffer = scratch2.subarray(0, encode_into.written); - } else { - contents_buffer = content; - } - - Schema.encodeScan( - { - contents: contents_buffer, - path: file_name, - loader: - loader || - { - ".jsx": Loader.jsx, - ".tsx": Loader.tsx, - ".ts": Loader.ts, - ".js": Loader.js, - ".json": Loader.json, - }[path.extname(file_name)], - }, - bb, - ); - const data = bb.toUint8Array(); - - const input_ptr = Bun.wasm_exports.bun_malloc(data.length); - var buffer = this._wasmPtrToSlice(input_ptr); - buffer.set(data); - - const resp_ptr = Bun.wasm_exports.scan(input_ptr); - var _bb = new ByteBuffer(this._wasmPtrToSlice(resp_ptr)); - const response = Schema.decodeScanResult(_bb); - Bun.wasm_exports.bun_free(input_ptr); - scratch = bb.data; - return response; - } -} - -globalThis.Bun = Bun; diff --git a/src/api/demo/lib/run.ts b/src/api/demo/lib/run.ts deleted file mode 100644 index 87d7035561c9e..0000000000000 --- a/src/api/demo/lib/run.ts +++ /dev/null @@ -1,70 +0,0 @@ -import { transform as _transform, initialize } from "esbuild-wasm"; -import initSwc, { transformSync as transformSyncSWC } from "@swc/wasm-web"; -import { Bun } from "./api"; - -export async function start() { - await initialize({ - worker: false, - wasmURL: "/node_modules/esbuild-wasm/esbuild.wasm", - }); - await Bun.init("/bun-wasm.wasm"); - await initSwc("/node_modules/@swc/wasm-web/wasm_bg.wasm"); -} - -const swcOptions = { - sourceMaps: false, - inlineSourcesContent: false, - jsc: { - target: "es2022", - parser: { - jsx: true, - syntax: "typescript", - tsx: false, - decorators: false, - dynamicImport: false, - }, - }, -}; - -export async function transform(contents, file) { - var result: any = { - timings: { - esbuild: 0, - bun: 0, - swc: 0, - }, - }; - result.timings.esbuild = performance.now(); - result.esbuild = await _transform(contents, { - sourcefile: file, - loader: file.substring(file.lastIndexOf(".") + 1), - }); - result.timings.esbuild = performance.now() - result.timings.esbuild; - - result.timings.bun = performance.now(); - result.bun = Bun.transformSync(contents, file); - result.timings.bun = performance.now() - result.timings.bun; - - if (file.substring(file.lastIndexOf(".") + 1) === "tsx") { - swcOptions.jsc.parser.tsx = true; - swcOptions.jsc.parser.syntax = "typescript"; - } else if (file.substring(file.lastIndexOf(".") + 1) === "jsx") { - swcOptions.jsc.parser.tsx = false; - swcOptions.jsc.parser.jsx = true; - swcOptions.jsc.parser.syntax = "typescript"; - } else { - swcOptions.jsc.parser.tsx = false; - swcOptions.jsc.parser.jsx = false; - swcOptions.jsc.parser.syntax = "javascript"; - } - - result.timings.swc = performance.now(); - result.swc = transformSyncSWC(contents, swcOptions as any); - result.timings.swc = performance.now() - result.timings.swc; - - console.log("esbuild:", result.timings.esbuild, "ms"); - console.log("Bun:", result.timings.bun, "ms"); - console.log("SWC:", result.timings.swc, "ms"); - - return result; -} diff --git a/src/api/demo/lib/scan.ts b/src/api/demo/lib/scan.ts deleted file mode 100644 index c2fd7bb129d62..0000000000000 --- a/src/api/demo/lib/scan.ts +++ /dev/null @@ -1,44 +0,0 @@ -import { init, parse } from "es-module-lexer"; - -import { Bun } from "./api"; - -export async function start() { - await init; - await Bun.init("/bun-wasm.wasm"); -} - -const swcOptions = { - sourceMaps: false, - inlineSourcesContent: false, - jsc: { - target: "es2022", - parser: { - jsx: true, - syntax: "typescript", - tsx: false, - decorators: false, - dynamicImport: false, - }, - }, -}; - -export async function transform(contents, file) { - var result: any = { - timings: { - lexer: 0, - bun: 0, - }, - }; - result.timings.lexer = performance.now(); - result.lexer = await parse(contents, file); - result.timings.lexer = performance.now() - result.timings.lexer; - - result.timings.bun = performance.now(); - result.bun = Bun.scan(contents, file); - result.timings.bun = performance.now() - result.timings.bun; - - console.log("lexer:", result.timings.lexer, "ms"); - console.log("Bun:", result.timings.bun, "ms"); - - return result; -} diff --git a/src/api/demo/next-env.d.ts b/src/api/demo/next-env.d.ts deleted file mode 100644 index 4f11a03dc6cc3..0000000000000 --- a/src/api/demo/next-env.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -/// -/// - -// NOTE: This file should not be edited -// see https://nextjs.org/docs/basic-features/typescript for more information. diff --git a/src/api/demo/package.json b/src/api/demo/package.json deleted file mode 100644 index 59e70aed146aa..0000000000000 --- a/src/api/demo/package.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "name": "demo", - "version": "0.1.0", - "private": true, - "scripts": { - "dev": "next dev", - "build": "next build", - "start": "next start" - }, - "dependencies": { - "@swc/wasm-web": "^1.2.146", - "bun-framework-next": "^12.1.0", - "es-module-loader": "^2.3.0", - "esbuild": "^0.14.23", - "esbuild-wasm": "^0.14.23", - "next": "12", - "peechy": "0.4.32", - "react": "17.0.2", - "react-dom": "17.0.2", - "sucrase": "^3.18.1" - }, - "devDependencies": { - "@types/react": "^17.0.8", - "bun-types": "^0.2.2", - "typescript": "^4.3.2", - "webpack": "^5.38.1", - "webpack-cli": "^4.7.0" - } -} \ No newline at end of file diff --git a/src/api/demo/pages/_app.js b/src/api/demo/pages/_app.js deleted file mode 100644 index 2fc3e07009198..0000000000000 --- a/src/api/demo/pages/_app.js +++ /dev/null @@ -1,7 +0,0 @@ -import "../styles/globals.css"; - -function MyApp({ Component, pageProps }) { - return ; -} - -export default MyApp; diff --git a/src/api/demo/pages/api/hello.js b/src/api/demo/pages/api/hello.js deleted file mode 100644 index e963280fab2cb..0000000000000 --- a/src/api/demo/pages/api/hello.js +++ /dev/null @@ -1,5 +0,0 @@ -// Next.js API route support: https://nextjs.org/docs/api-routes/introduction - -export default (req, res) => { - res.status(200).json({ name: "John Doe" }); -}; diff --git a/src/api/demo/pages/index.tsx b/src/api/demo/pages/index.tsx deleted file mode 100644 index 1f6e4bb82a98b..0000000000000 --- a/src/api/demo/pages/index.tsx +++ /dev/null @@ -1,68 +0,0 @@ -import Head from "next/head"; -import Image from "next/image"; -import styles from "../styles/Home.module.css"; -import { readFile } from "fs/promises"; - -import React from "react"; - -if (typeof window !== "undefined") { - globalThis.Run = await import("../lib/run"); - await import("../lib/api"); -} - -export async function getStaticProps(ctx) { - return { - props: { - // not tested - code: readFile("/Users/jarred/Build/es-module-lexer/test/samples/magic-string.js", { encoding: "utf-8" }), - }, - }; -} - -var textDecoder = new TextDecoder(); -export default function Home({ code }) { - const fileNameRef = React.useRef(null); - const [esbuildResult, setEsbuildResult] = React.useState(""); - const [bunResult, setBunResult] = React.useState(""); - const [swcResult, setSWCResult] = React.useState(""); - React.useEffect(() => { - globalThis.Run.start(); - }, []); - - const runBuild = React.useCallback( - event => { - globalThis.Run.transform(event.target.value, fileNameRef?.current?.value).then(result => { - setEsbuildResult(result.esbuild.code); - setBunResult(textDecoder.decode(result.bun.files[0].data)); - setSWCResult(result.swc.code); - }, console.error); - }, - [fileNameRef, setEsbuildResult, setBunResult, setSWCResult], - ); - return ( -

- - Next.js - - - - -
-
- - - - - - -
-
-
- ); -} diff --git a/src/api/demo/pages/scan.tsx b/src/api/demo/pages/scan.tsx deleted file mode 100644 index 656629dda1653..0000000000000 --- a/src/api/demo/pages/scan.tsx +++ /dev/null @@ -1,67 +0,0 @@ -import Head from "next/head"; -import { readFile } from "fs/promises"; -import styles from "../styles/Home.module.css"; - -import React from "react"; - -if (typeof window !== "undefined") { - globalThis.Scan = await import("../lib/scan"); - await import("../lib/api"); -} - -export async function getStaticProps(ctx) { - return { - props: { - // not tested - code: readFile("/Users/jarred/Build/es-module-lexer/test/samples/magic-string.js", { encoding: "utf-8" }), - defaultFile: "magic-string.js", - }, - }; -} - -var textDecoder = new TextDecoder(); -export default function Home({ code, defaultFile }) { - const fileNameRef = React.useRef(null); - const [lexer, setLexer] = React.useState(""); - const [bunResult, setBunResult] = React.useState(""); - const [file, setFile] = React.useState(defaultFile); - React.useEffect(() => { - globalThis.Scan.start(); - }, []); - - const runBuild = React.useCallback( - event => { - globalThis.Scan.transform(event.target.value, fileNameRef?.current?.value).then(result => { - setLexer(JSON.stringify(result.lexer, null, 2)); - setBunResult(JSON.stringify(result.bun, null, 2)); - }, console.error); - }, - [fileNameRef, setBunResult, setLexer], - ); - return ( -
- - Next.js - - - - -
-
- setFile(event.target.value)} - ref={fileNameRef} - /> - - - - -
-
-
- ); -} diff --git a/src/api/demo/pages/two.tsx b/src/api/demo/pages/two.tsx deleted file mode 100644 index cb0ff5c3b541f..0000000000000 --- a/src/api/demo/pages/two.tsx +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/src/api/demo/pnpm-lock.yaml b/src/api/demo/pnpm-lock.yaml deleted file mode 100644 index bd5b33635c283..0000000000000 --- a/src/api/demo/pnpm-lock.yaml +++ /dev/null @@ -1,2038 +0,0 @@ -lockfileVersion: 5.3 - -specifiers: - next: 10.2.0 - peechy: 0.4.3 - react: 17.0.2 - react-dom: 17.0.2 - sucrase: ^3.18.1 - -dependencies: - next: 10.2.0_react-dom@17.0.2+react@17.0.2 - peechy: 0.4.3 - react: 17.0.2 - react-dom: 17.0.2_react@17.0.2 - sucrase: 3.18.1 - -packages: - - /@babel/code-frame/7.12.11: - resolution: {integrity: sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw==} - dependencies: - '@babel/highlight': 7.14.0 - dev: false - - /@babel/helper-validator-identifier/7.14.0: - resolution: {integrity: sha512-V3ts7zMSu5lfiwWDVWzRDGIN+lnCEUdaXgtVHJgLb1rGaA6jMrtB9EmE7L18foXJIE8Un/A/h6NJfGQp/e1J4A==} - dev: false - - /@babel/highlight/7.14.0: - resolution: {integrity: sha512-YSCOwxvTYEIMSGaBQb5kDDsCopDdiUGsqpatp3fOlI4+2HQSkTmEVWnVuySdAC5EWCqSWWTv0ib63RjR7dTBdg==} - dependencies: - '@babel/helper-validator-identifier': 7.14.0 - chalk: 2.4.2 - js-tokens: 4.0.0 - dev: false - - /@babel/runtime/7.12.5: - resolution: {integrity: sha512-plcc+hbExy3McchJCEQG3knOsuh3HH+Prx1P6cLIkET/0dLuQDEnrT+s27Axgc9bqfsmNUNHfscgMUdBpC9xfg==} - dependencies: - regenerator-runtime: 0.13.7 - dev: false - - /@babel/types/7.8.3: - resolution: {integrity: sha512-jBD+G8+LWpMBBWvVcdr4QysjUE4mU/syrhN17o1u3gx0/WzJB1kwiVZAXRtWbsIPOwW8pF/YJV5+nmetPzepXg==} - dependencies: - esutils: 2.0.3 - lodash: 4.17.21 - to-fast-properties: 2.0.0 - dev: false - - /@hapi/accept/5.0.1: - resolution: {integrity: sha512-fMr4d7zLzsAXo28PRRQPXR1o2Wmu+6z+VY1UzDp0iFo13Twj8WePakwXBiqn3E1aAlTpSNzCXdnnQXFhst8h8Q==} - dependencies: - '@hapi/boom': 9.1.2 - '@hapi/hoek': 9.2.0 - dev: false - - /@hapi/boom/9.1.2: - resolution: {integrity: sha512-uJEJtiNHzKw80JpngDGBCGAmWjBtzxDCz17A9NO2zCi8LLBlb5Frpq4pXwyN+2JQMod4pKz5BALwyneCgDg89Q==} - dependencies: - '@hapi/hoek': 9.2.0 - dev: false - - /@hapi/hoek/9.2.0: - resolution: {integrity: sha512-sqKVVVOe5ivCaXDWivIJYVSaEgdQK9ul7a4Kity5Iw7u9+wBAPbX1RMSnLLmp7O4Vzj0WOWwMAJsTL00xwaNug==} - dev: false - - /@next/env/10.2.0: - resolution: {integrity: sha512-tsWBsn1Rb6hXRaHc/pWMCpZ4Ipkf3OCbZ54ef5ukgIyEvzzGdGFXQshPP2AF7yb+8yMpunWs7vOMZW3e8oPF6A==} - dev: false - - /@next/polyfill-module/10.2.0: - resolution: {integrity: sha512-Nl3GexIUXsmuggkUqrRFyE/2k7UI44JaVzSywtXEyHzxpZm2a5bdMaWuC89pgLiFDDOqmbqyLAbtwm5lNxa7Eg==} - dev: false - - /@next/react-dev-overlay/10.2.0_react-dom@17.0.2+react@17.0.2: - resolution: {integrity: sha512-PRIAoWog41hLN4iJ8dChKp4ysOX0Q8yiNQ/cwzyqEd3EjugkDV5OiKl3mumGKaApJaIra1MX6j1wgQRuLhuWMA==} - peerDependencies: - react: ^16.9.0 || ^17 - react-dom: ^16.9.0 || ^17 - dependencies: - '@babel/code-frame': 7.12.11 - anser: 1.4.9 - chalk: 4.0.0 - classnames: 2.2.6 - css.escape: 1.5.1 - data-uri-to-buffer: 3.0.1 - platform: 1.3.6 - react: 17.0.2 - react-dom: 17.0.2_react@17.0.2 - shell-quote: 1.7.2 - source-map: 0.8.0-beta.0 - stacktrace-parser: 0.1.10 - strip-ansi: 6.0.0 - dev: false - - /@next/react-refresh-utils/10.2.0_react-refresh@0.8.3: - resolution: {integrity: sha512-3I31K9B4hEQRl7yQ44Umyz+szHtuMJrNdwsgJGhoEnUCXSBRHp5wv5Zv8eDa2NewSbe53b2C0oOpivrzmdBakw==} - peerDependencies: - react-refresh: 0.8.3 - webpack: ^4 || ^5 - peerDependenciesMeta: - webpack: - optional: true - dependencies: - react-refresh: 0.8.3 - dev: false - - /@opentelemetry/api/0.14.0: - resolution: {integrity: sha512-L7RMuZr5LzMmZiQSQDy9O1jo0q+DaLy6XpYJfIGfYSfoJA5qzYwUP3sP1uMIQ549DvxAgM3ng85EaPTM/hUHwQ==} - engines: {node: '>=8.0.0'} - dependencies: - '@opentelemetry/context-base': 0.14.0 - dev: false - - /@opentelemetry/context-base/0.14.0: - resolution: {integrity: sha512-sDOAZcYwynHFTbLo6n8kIbLiVF3a3BLkrmehJUyEbT9F+Smbi47kLGS2gG2g0fjBLR/Lr1InPD7kXL7FaTqEkw==} - engines: {node: '>=8.0.0'} - dev: false - - /@types/node/15.0.2: - resolution: {integrity: sha512-p68+a+KoxpoB47015IeYZYRrdqMUcpbK8re/zpFB8Ld46LHC1lPEbp3EXgkEhAYEcPvjJF6ZO+869SQ0aH1dcA==} - dev: false - - /anser/1.4.9: - resolution: {integrity: sha512-AI+BjTeGt2+WFk4eWcqbQ7snZpDBt8SaLlj0RT2h5xfdWaiy51OjYvqwMrNzJLGy8iOAL6nKDITWO+rd4MkYEA==} - dev: false - - /ansi-regex/5.0.0: - resolution: {integrity: sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==} - engines: {node: '>=8'} - dev: false - - /ansi-styles/3.2.1: - resolution: {integrity: sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==} - engines: {node: '>=4'} - dependencies: - color-convert: 1.9.3 - dev: false - - /ansi-styles/4.3.0: - resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} - engines: {node: '>=8'} - dependencies: - color-convert: 2.0.1 - dev: false - - /any-promise/1.3.0: - resolution: {integrity: sha1-q8av7tzqUugJzcA3au0845Y10X8=} - dev: false - - /anymatch/3.1.2: - resolution: {integrity: sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==} - engines: {node: '>= 8'} - dependencies: - normalize-path: 3.0.0 - picomatch: 2.2.3 - dev: false - - /array-filter/1.0.0: - resolution: {integrity: sha1-uveeYubvTCpMC4MSMtr/7CUfnYM=} - dev: false - - /asn1.js/5.4.1: - resolution: {integrity: sha512-+I//4cYPccV8LdmBLiX8CYvf9Sp3vQsrqu2QNXRcrbiWvcx/UdlFiqUJJzxRQxgsZmvhXhn4cSKeSmoFjVdupA==} - dependencies: - bn.js: 4.12.0 - inherits: 2.0.4 - minimalistic-assert: 1.0.1 - safer-buffer: 2.1.2 - dev: false - - /assert/1.5.0: - resolution: {integrity: sha512-EDsgawzwoun2CZkCgtxJbv392v4nbk9XDD06zI+kQYoBM/3RBWLlEyJARDOmhAAosBjWACEkKL6S+lIZtcAubA==} - dependencies: - object-assign: 4.1.1 - util: 0.10.3 - dev: false - - /assert/2.0.0: - resolution: {integrity: sha512-se5Cd+js9dXJnu6Ag2JFc00t+HmHOen+8Q+L7O9zI0PqQXr20uk2J0XQqMxZEeo5U50o8Nvmmx7dZrl+Ufr35A==} - dependencies: - es6-object-assign: 1.1.0 - is-nan: 1.3.2 - object-is: 1.1.5 - util: 0.12.3 - dev: false - - /ast-types/0.13.2: - resolution: {integrity: sha512-uWMHxJxtfj/1oZClOxDEV1sQ1HCDkA4MG8Gr69KKeBjEVH0R84WlejZ0y2DcwyBlpAEMltmVYkVgqfLFb2oyiA==} - engines: {node: '>=4'} - dev: false - - /available-typed-arrays/1.0.2: - resolution: {integrity: sha512-XWX3OX8Onv97LMk/ftVyBibpGwY5a8SmuxZPzeOxqmuEqUCOM9ZE+uIaD1VNJ5QnvU2UQusvmKbuM1FR8QWGfQ==} - engines: {node: '>= 0.4'} - dependencies: - array-filter: 1.0.0 - dev: false - - /babel-plugin-syntax-jsx/6.18.0: - resolution: {integrity: sha1-CvMqmm4Tyno/1QaeYtew9Y0NiUY=} - dev: false - - /balanced-match/1.0.2: - resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} - dev: false - - /base64-js/1.5.1: - resolution: {integrity: sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==} - dev: false - - /big.js/5.2.2: - resolution: {integrity: sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==} - dev: false - - /binary-extensions/2.2.0: - resolution: {integrity: sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==} - engines: {node: '>=8'} - dev: false - - /bn.js/4.12.0: - resolution: {integrity: sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==} - dev: false - - /bn.js/5.2.0: - resolution: {integrity: sha512-D7iWRBvnZE8ecXiLj/9wbxH7Tk79fAh8IHaTNq1RWRixsS02W+5qS+iE9yq6RYl0asXx5tw0bLhmT5pIfbSquw==} - dev: false - - /brace-expansion/1.1.11: - resolution: {integrity: sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==} - dependencies: - balanced-match: 1.0.2 - concat-map: 0.0.1 - dev: false - - /braces/3.0.2: - resolution: {integrity: sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==} - engines: {node: '>=8'} - dependencies: - fill-range: 7.0.1 - dev: false - - /brorand/1.1.0: - resolution: {integrity: sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=} - dev: false - - /browserify-aes/1.2.0: - resolution: {integrity: sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==} - dependencies: - buffer-xor: 1.0.3 - cipher-base: 1.0.4 - create-hash: 1.2.0 - evp_bytestokey: 1.0.3 - inherits: 2.0.4 - safe-buffer: 5.2.1 - dev: false - - /browserify-cipher/1.0.1: - resolution: {integrity: sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==} - dependencies: - browserify-aes: 1.2.0 - browserify-des: 1.0.2 - evp_bytestokey: 1.0.3 - dev: false - - /browserify-des/1.0.2: - resolution: {integrity: sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A==} - dependencies: - cipher-base: 1.0.4 - des.js: 1.0.1 - inherits: 2.0.4 - safe-buffer: 5.2.1 - dev: false - - /browserify-rsa/4.1.0: - resolution: {integrity: sha512-AdEER0Hkspgno2aR97SAf6vi0y0k8NuOpGnVH3O99rcA5Q6sh8QxcngtHuJ6uXwnfAXNM4Gn1Gb7/MV1+Ymbog==} - dependencies: - bn.js: 5.2.0 - randombytes: 2.1.0 - dev: false - - /browserify-sign/4.2.1: - resolution: {integrity: sha512-/vrA5fguVAKKAVTNJjgSm1tRQDHUU6DbwO9IROu/0WAzC8PKhucDSh18J0RMvVeHAn5puMd+QHC2erPRNf8lmg==} - dependencies: - bn.js: 5.2.0 - browserify-rsa: 4.1.0 - create-hash: 1.2.0 - create-hmac: 1.1.7 - elliptic: 6.5.4 - inherits: 2.0.4 - parse-asn1: 5.1.6 - readable-stream: 3.6.0 - safe-buffer: 5.2.1 - dev: false - - /browserify-zlib/0.2.0: - resolution: {integrity: sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA==} - dependencies: - pako: 1.0.11 - dev: false - - /browserslist/4.16.1: - resolution: {integrity: sha512-UXhDrwqsNcpTYJBTZsbGATDxZbiVDsx6UjpmRUmtnP10pr8wAYr5LgFoEFw9ixriQH2mv/NX2SfGzE/o8GndLA==} - engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} - hasBin: true - dependencies: - caniuse-lite: 1.0.30001223 - colorette: 1.2.2 - electron-to-chromium: 1.3.727 - escalade: 3.1.1 - node-releases: 1.1.71 - dev: false - - /buffer-xor/1.0.3: - resolution: {integrity: sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=} - dev: false - - /buffer/4.9.2: - resolution: {integrity: sha512-xq+q3SRMOxGivLhBNaUdC64hDTQwejJ+H0T/NB1XMtTVEwNTrfFF3gAxiyW0Bu/xWEGhjVKgUcMhCrUy2+uCWg==} - dependencies: - base64-js: 1.5.1 - ieee754: 1.2.1 - isarray: 1.0.0 - dev: false - - /buffer/5.6.0: - resolution: {integrity: sha512-/gDYp/UtU0eA1ys8bOs9J6a+E/KWIY+DZ+Q2WESNUA0jFRsJOc0SNUO6xJ5SGA1xueg3NL65W6s+NY5l9cunuw==} - dependencies: - base64-js: 1.5.1 - ieee754: 1.2.1 - dev: false - - /builtin-status-codes/3.0.0: - resolution: {integrity: sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug=} - dev: false - - /bytes/3.1.0: - resolution: {integrity: sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg==} - engines: {node: '>= 0.8'} - dev: false - - /call-bind/1.0.2: - resolution: {integrity: sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==} - dependencies: - function-bind: 1.1.1 - get-intrinsic: 1.1.1 - dev: false - - /camel-case/4.1.2: - resolution: {integrity: sha512-gxGWBrTT1JuMx6R+o5PTXMmUnhnVzLQ9SNutD4YqKtI6ap897t3tKECYla6gCWEkplXnlNybEkZg9GEGxKFCgw==} - dependencies: - pascal-case: 3.1.2 - tslib: 2.2.0 - dev: false - - /caniuse-lite/1.0.30001223: - resolution: {integrity: sha512-k/RYs6zc/fjbxTjaWZemeSmOjO0JJV+KguOBA3NwPup8uzxM1cMhR2BD9XmO86GuqaqTCO8CgkgH9Rz//vdDiA==} - dev: false - - /capital-case/1.0.4: - resolution: {integrity: sha512-ds37W8CytHgwnhGGTi88pcPyR15qoNkOpYwmMMfnWqqWgESapLqvDx6huFjQ5vqWSn2Z06173XNA7LtMOeUh1A==} - dependencies: - no-case: 3.0.4 - tslib: 2.2.0 - upper-case-first: 2.0.2 - dev: false - - /chalk/2.4.2: - resolution: {integrity: sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==} - engines: {node: '>=4'} - dependencies: - ansi-styles: 3.2.1 - escape-string-regexp: 1.0.5 - supports-color: 5.5.0 - dev: false - - /chalk/4.0.0: - resolution: {integrity: sha512-N9oWFcegS0sFr9oh1oz2d7Npos6vNoWW9HvtCg5N1KRFpUhaAhvTv5Y58g880fZaEYSNm3qDz8SU1UrGvp+n7A==} - engines: {node: '>=10'} - dependencies: - ansi-styles: 4.3.0 - supports-color: 7.2.0 - dev: false - - /change-case/4.1.2: - resolution: {integrity: sha512-bSxY2ws9OtviILG1EiY5K7NNxkqg/JnRnFxLtKQ96JaviiIxi7djMrSd0ECT9AC+lttClmYwKw53BWpOMblo7A==} - dependencies: - camel-case: 4.1.2 - capital-case: 1.0.4 - constant-case: 3.0.4 - dot-case: 3.0.4 - header-case: 2.0.4 - no-case: 3.0.4 - param-case: 3.0.4 - pascal-case: 3.1.2 - path-case: 3.0.4 - sentence-case: 3.0.4 - snake-case: 3.0.4 - tslib: 2.2.0 - dev: false - - /chokidar/3.5.1: - resolution: {integrity: sha512-9+s+Od+W0VJJzawDma/gvBNQqkTiqYTWLuZoyAsivsI4AaWTCzHG06/TMjsf1cYe9Cb97UCEhjz7HvnPk2p/tw==} - engines: {node: '>= 8.10.0'} - dependencies: - anymatch: 3.1.2 - braces: 3.0.2 - glob-parent: 5.1.2 - is-binary-path: 2.1.0 - is-glob: 4.0.1 - normalize-path: 3.0.0 - readdirp: 3.5.0 - optionalDependencies: - fsevents: 2.3.2 - dev: false - - /cipher-base/1.0.4: - resolution: {integrity: sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==} - dependencies: - inherits: 2.0.4 - safe-buffer: 5.2.1 - dev: false - - /classnames/2.2.6: - resolution: {integrity: sha512-JR/iSQOSt+LQIWwrwEzJ9uk0xfN3mTVYMwt1Ir5mUcSN6pU+V4zQFFaJsclJbPuAUQH+yfWef6tm7l1quW3C8Q==} - dev: false - - /color-convert/1.9.3: - resolution: {integrity: sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==} - dependencies: - color-name: 1.1.3 - dev: false - - /color-convert/2.0.1: - resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==} - engines: {node: '>=7.0.0'} - dependencies: - color-name: 1.1.4 - dev: false - - /color-name/1.1.3: - resolution: {integrity: sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=} - dev: false - - /color-name/1.1.4: - resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} - dev: false - - /colorette/1.2.2: - resolution: {integrity: sha512-MKGMzyfeuutC/ZJ1cba9NqcNpfeqMUcYmyF1ZFY6/Cn7CNSAKx6a+s48sqLqyAiZuaP2TcqMhoo+dlwFnVxT9w==} - dev: false - - /commander/4.1.1: - resolution: {integrity: sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==} - engines: {node: '>= 6'} - dev: false - - /commondir/1.0.1: - resolution: {integrity: sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=} - dev: false - - /concat-map/0.0.1: - resolution: {integrity: sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=} - dev: false - - /console-browserify/1.2.0: - resolution: {integrity: sha512-ZMkYO/LkF17QvCPqM0gxw8yUzigAOZOSWSHg91FH6orS7vcEj5dVZTidN2fQ14yBSdg97RqhSNwLUXInd52OTA==} - dev: false - - /constant-case/3.0.4: - resolution: {integrity: sha512-I2hSBi7Vvs7BEuJDr5dDHfzb/Ruj3FyvFyh7KLilAjNQw3Be+xgqUBA2W6scVEcL0hL1dwPRtIqEPVUCKkSsyQ==} - dependencies: - no-case: 3.0.4 - tslib: 2.2.0 - upper-case: 2.0.2 - dev: false - - /constants-browserify/1.0.0: - resolution: {integrity: sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U=} - dev: false - - /convert-source-map/1.7.0: - resolution: {integrity: sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA==} - dependencies: - safe-buffer: 5.1.2 - dev: false - - /core-util-is/1.0.2: - resolution: {integrity: sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=} - dev: false - - /create-ecdh/4.0.4: - resolution: {integrity: sha512-mf+TCx8wWc9VpuxfP2ht0iSISLZnt0JgWlrOKZiNqyUZWnjIaCIVNQArMHnCZKfEYRg6IM7A+NeJoN8gf/Ws0A==} - dependencies: - bn.js: 4.12.0 - elliptic: 6.5.4 - dev: false - - /create-hash/1.2.0: - resolution: {integrity: sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==} - dependencies: - cipher-base: 1.0.4 - inherits: 2.0.4 - md5.js: 1.3.5 - ripemd160: 2.0.2 - sha.js: 2.4.11 - dev: false - - /create-hmac/1.1.7: - resolution: {integrity: sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==} - dependencies: - cipher-base: 1.0.4 - create-hash: 1.2.0 - inherits: 2.0.4 - ripemd160: 2.0.2 - safe-buffer: 5.2.1 - sha.js: 2.4.11 - dev: false - - /crypto-browserify/3.12.0: - resolution: {integrity: sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==} - dependencies: - browserify-cipher: 1.0.1 - browserify-sign: 4.2.1 - create-ecdh: 4.0.4 - create-hash: 1.2.0 - create-hmac: 1.1.7 - diffie-hellman: 5.0.3 - inherits: 2.0.4 - pbkdf2: 3.1.2 - public-encrypt: 4.0.3 - randombytes: 2.1.0 - randomfill: 1.0.4 - dev: false - - /css.escape/1.5.1: - resolution: {integrity: sha1-QuJ9T6BK4y+TGktNQZH6nN3ul8s=} - dev: false - - /cssnano-preset-simple/2.0.0_postcss@8.2.13: - resolution: {integrity: sha512-HkufSLkaBJbKBFx/7aj5HmCK9Ni/JedRQm0mT2qBzMG/dEuJOLnMt2lK6K1rwOOyV4j9aSY+knbW9WoS7BYpzg==} - peerDependencies: - postcss: ^8.2.1 - dependencies: - caniuse-lite: 1.0.30001223 - postcss: 8.2.13 - dev: false - - /cssnano-simple/2.0.0_postcss@8.2.13: - resolution: {integrity: sha512-0G3TXaFxlh/szPEG/o3VcmCwl0N3E60XNb9YZZijew5eIs6fLjJuOPxQd9yEBaX2p/YfJtt49i4vYi38iH6/6w==} - peerDependencies: - postcss: ^8.2.2 - dependencies: - cssnano-preset-simple: 2.0.0_postcss@8.2.13 - postcss: 8.2.13 - dev: false - - /data-uri-to-buffer/3.0.1: - resolution: {integrity: sha512-WboRycPNsVw3B3TL559F7kuBUM4d8CgMEvk6xEJlOp7OBPjt6G7z8WMWlD2rOFZLk6OYfFIUGsCOWzcQH9K2og==} - engines: {node: '>= 6'} - dev: false - - /debug/2.6.9: - resolution: {integrity: sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==} - dependencies: - ms: 2.0.0 - dev: false - - /define-properties/1.1.3: - resolution: {integrity: sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==} - engines: {node: '>= 0.4'} - dependencies: - object-keys: 1.1.1 - dev: false - - /depd/1.1.2: - resolution: {integrity: sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=} - engines: {node: '>= 0.6'} - dev: false - - /des.js/1.0.1: - resolution: {integrity: sha512-Q0I4pfFrv2VPd34/vfLrFOoRmlYj3OV50i7fskps1jZWK1kApMWWT9G6RRUeYedLcBDIhnSDaUvJMb3AhUlaEA==} - dependencies: - inherits: 2.0.4 - minimalistic-assert: 1.0.1 - dev: false - - /diffie-hellman/5.0.3: - resolution: {integrity: sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==} - dependencies: - bn.js: 4.12.0 - miller-rabin: 4.0.1 - randombytes: 2.1.0 - dev: false - - /domain-browser/1.2.0: - resolution: {integrity: sha512-jnjyiM6eRyZl2H+W8Q/zLMA481hzi0eszAaBUzIVnmYVDBbnLxVNnfu1HgEBvCbL+71FrxMl3E6lpKH7Ge3OXA==} - engines: {node: '>=0.4', npm: '>=1.2'} - dev: false - - /domain-browser/4.19.0: - resolution: {integrity: sha512-fRA+BaAWOR/yr/t7T9E9GJztHPeFjj8U35ajyAjCDtAAnTn1Rc1f6W6VGPJrO1tkQv9zWu+JRof7z6oQtiYVFQ==} - engines: {node: '>=10'} - dev: false - - /dot-case/3.0.4: - resolution: {integrity: sha512-Kv5nKlh6yRrdrGvxeJ2e5y2eRUpkUosIW4A2AS38zwSz27zu7ufDwQPi5Jhs3XAlGNetl3bmnGhQsMtkKJnj3w==} - dependencies: - no-case: 3.0.4 - tslib: 2.2.0 - dev: false - - /electron-to-chromium/1.3.727: - resolution: {integrity: sha512-Mfz4FIB4FSvEwBpDfdipRIrwd6uo8gUDoRDF4QEYb4h4tSuI3ov594OrjU6on042UlFHouIJpClDODGkPcBSbg==} - dev: false - - /elliptic/6.5.4: - resolution: {integrity: sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==} - dependencies: - bn.js: 4.12.0 - brorand: 1.1.0 - hash.js: 1.1.7 - hmac-drbg: 1.0.1 - inherits: 2.0.4 - minimalistic-assert: 1.0.1 - minimalistic-crypto-utils: 1.0.1 - dev: false - - /emojis-list/2.1.0: - resolution: {integrity: sha1-TapNnbAPmBmIDHn6RXrlsJof04k=} - engines: {node: '>= 0.10'} - dev: false - - /encoding/0.1.13: - resolution: {integrity: sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A==} - dependencies: - iconv-lite: 0.6.2 - dev: false - - /es-abstract/1.18.0: - resolution: {integrity: sha512-LJzK7MrQa8TS0ja2w3YNLzUgJCGPdPOV1yVvezjNnS89D+VR08+Szt2mz3YB2Dck/+w5tfIq/RoUAFqJJGM2yw==} - engines: {node: '>= 0.4'} - dependencies: - call-bind: 1.0.2 - es-to-primitive: 1.2.1 - function-bind: 1.1.1 - get-intrinsic: 1.1.1 - has: 1.0.3 - has-symbols: 1.0.2 - is-callable: 1.2.3 - is-negative-zero: 2.0.1 - is-regex: 1.1.2 - is-string: 1.0.5 - object-inspect: 1.10.2 - object-keys: 1.1.1 - object.assign: 4.1.2 - string.prototype.trimend: 1.0.4 - string.prototype.trimstart: 1.0.4 - unbox-primitive: 1.0.1 - dev: false - - /es-to-primitive/1.2.1: - resolution: {integrity: sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==} - engines: {node: '>= 0.4'} - dependencies: - is-callable: 1.2.3 - is-date-object: 1.0.3 - is-symbol: 1.0.3 - dev: false - - /es6-object-assign/1.1.0: - resolution: {integrity: sha1-wsNYJlYkfDnqEHyx5mUrb58kUjw=} - dev: false - - /escalade/3.1.1: - resolution: {integrity: sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==} - engines: {node: '>=6'} - dev: false - - /escape-string-regexp/1.0.5: - resolution: {integrity: sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=} - engines: {node: '>=0.8.0'} - dev: false - - /esutils/2.0.3: - resolution: {integrity: sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==} - engines: {node: '>=0.10.0'} - dev: false - - /etag/1.8.1: - resolution: {integrity: sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=} - engines: {node: '>= 0.6'} - dev: false - - /events/3.3.0: - resolution: {integrity: sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==} - engines: {node: '>=0.8.x'} - dev: false - - /evp_bytestokey/1.0.3: - resolution: {integrity: sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==} - dependencies: - md5.js: 1.3.5 - safe-buffer: 5.2.1 - dev: false - - /fill-range/7.0.1: - resolution: {integrity: sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==} - engines: {node: '>=8'} - dependencies: - to-regex-range: 5.0.1 - dev: false - - /find-cache-dir/3.3.1: - resolution: {integrity: sha512-t2GDMt3oGC/v+BMwzmllWDuJF/xcDtE5j/fCGbqDD7OLuJkj0cfh1YSA5VKPvwMeLFLNDBkwOKZ2X85jGLVftQ==} - engines: {node: '>=8'} - dependencies: - commondir: 1.0.1 - make-dir: 3.1.0 - pkg-dir: 4.2.0 - dev: false - - /find-up/4.1.0: - resolution: {integrity: sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==} - engines: {node: '>=8'} - dependencies: - locate-path: 5.0.0 - path-exists: 4.0.0 - dev: false - - /foreach/2.0.5: - resolution: {integrity: sha1-C+4AUBiusmDQo6865ljdATbsG5k=} - dev: false - - /fs.realpath/1.0.0: - resolution: {integrity: sha1-FQStJSMVjKpA20onh8sBQRmU6k8=} - dev: false - - /fsevents/2.3.2: - resolution: {integrity: sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==} - engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} - os: [darwin] - dev: false - optional: true - - /function-bind/1.1.1: - resolution: {integrity: sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==} - dev: false - - /get-intrinsic/1.1.1: - resolution: {integrity: sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==} - dependencies: - function-bind: 1.1.1 - has: 1.0.3 - has-symbols: 1.0.2 - dev: false - - /get-orientation/1.1.2: - resolution: {integrity: sha512-/pViTfifW+gBbh/RnlFYHINvELT9Znt+SYyDKAUL6uV6By019AK/s+i9XP4jSwq7lwP38Fd8HVeTxym3+hkwmQ==} - dependencies: - stream-parser: 0.3.1 - dev: false - - /glob-parent/5.1.2: - resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==} - engines: {node: '>= 6'} - dependencies: - is-glob: 4.0.1 - dev: false - - /glob-to-regexp/0.4.1: - resolution: {integrity: sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==} - dev: false - - /glob/7.1.6: - resolution: {integrity: sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==} - dependencies: - fs.realpath: 1.0.0 - inflight: 1.0.6 - inherits: 2.0.4 - minimatch: 3.0.4 - once: 1.4.0 - path-is-absolute: 1.0.1 - dev: false - - /graceful-fs/4.2.6: - resolution: {integrity: sha512-nTnJ528pbqxYanhpDYsi4Rd8MAeaBA67+RZ10CM1m3bTAVFEDcd5AuA4a6W5YkGZ1iNXHzZz8T6TBKLeBuNriQ==} - dev: false - - /has-bigints/1.0.1: - resolution: {integrity: sha512-LSBS2LjbNBTf6287JEbEzvJgftkF5qFkmCo9hDRpAzKhUOlJ+hx8dd4USs00SgsUNwc4617J9ki5YtEClM2ffA==} - dev: false - - /has-flag/3.0.0: - resolution: {integrity: sha1-tdRU3CGZriJWmfNGfloH87lVuv0=} - engines: {node: '>=4'} - dev: false - - /has-flag/4.0.0: - resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} - engines: {node: '>=8'} - dev: false - - /has-symbols/1.0.2: - resolution: {integrity: sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==} - engines: {node: '>= 0.4'} - dev: false - - /has/1.0.3: - resolution: {integrity: sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==} - engines: {node: '>= 0.4.0'} - dependencies: - function-bind: 1.1.1 - dev: false - - /hash-base/3.1.0: - resolution: {integrity: sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA==} - engines: {node: '>=4'} - dependencies: - inherits: 2.0.4 - readable-stream: 3.6.0 - safe-buffer: 5.2.1 - dev: false - - /hash.js/1.1.7: - resolution: {integrity: sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==} - dependencies: - inherits: 2.0.4 - minimalistic-assert: 1.0.1 - dev: false - - /he/1.2.0: - resolution: {integrity: sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==} - hasBin: true - dev: false - - /header-case/2.0.4: - resolution: {integrity: sha512-H/vuk5TEEVZwrR0lp2zed9OCo1uAILMlx0JEMgC26rzyJJ3N1v6XkwHHXJQdR2doSjcGPM6OKPYoJgf0plJ11Q==} - dependencies: - capital-case: 1.0.4 - tslib: 2.2.0 - dev: false - - /hmac-drbg/1.0.1: - resolution: {integrity: sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=} - dependencies: - hash.js: 1.1.7 - minimalistic-assert: 1.0.1 - minimalistic-crypto-utils: 1.0.1 - dev: false - - /http-errors/1.7.3: - resolution: {integrity: sha512-ZTTX0MWrsQ2ZAhA1cejAwDLycFsd7I7nVtnkT3Ol0aqodaKW+0CTZDQ1uBv5whptCnc8e8HeRRJxRs0kmm/Qfw==} - engines: {node: '>= 0.6'} - dependencies: - depd: 1.1.2 - inherits: 2.0.4 - setprototypeof: 1.1.1 - statuses: 1.5.0 - toidentifier: 1.0.0 - dev: false - - /https-browserify/1.0.0: - resolution: {integrity: sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM=} - dev: false - - /iconv-lite/0.4.24: - resolution: {integrity: sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==} - engines: {node: '>=0.10.0'} - dependencies: - safer-buffer: 2.1.2 - dev: false - - /iconv-lite/0.6.2: - resolution: {integrity: sha512-2y91h5OpQlolefMPmUlivelittSWy0rP+oYVpn6A7GwVHNE8AWzoYOBNmlwks3LobaJxgHCYZAnyNo2GgpNRNQ==} - engines: {node: '>=0.10.0'} - dependencies: - safer-buffer: 2.1.2 - dev: false - - /ieee754/1.2.1: - resolution: {integrity: sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==} - dev: false - - /inflight/1.0.6: - resolution: {integrity: sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=} - dependencies: - once: 1.4.0 - wrappy: 1.0.2 - dev: false - - /inherits/2.0.1: - resolution: {integrity: sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE=} - dev: false - - /inherits/2.0.3: - resolution: {integrity: sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=} - dev: false - - /inherits/2.0.4: - resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} - dev: false - - /is-arguments/1.1.0: - resolution: {integrity: sha512-1Ij4lOMPl/xB5kBDn7I+b2ttPMKa8szhEIrXDuXQD/oe3HJLTLhqhgGspwgyGd6MOywBUqVvYicF72lkgDnIHg==} - engines: {node: '>= 0.4'} - dependencies: - call-bind: 1.0.2 - dev: false - - /is-bigint/1.0.2: - resolution: {integrity: sha512-0JV5+SOCQkIdzjBK9buARcV804Ddu7A0Qet6sHi3FimE9ne6m4BGQZfRn+NZiXbBk4F4XmHfDZIipLj9pX8dSA==} - dev: false - - /is-binary-path/2.1.0: - resolution: {integrity: sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==} - engines: {node: '>=8'} - dependencies: - binary-extensions: 2.2.0 - dev: false - - /is-boolean-object/1.1.0: - resolution: {integrity: sha512-a7Uprx8UtD+HWdyYwnD1+ExtTgqQtD2k/1yJgtXP6wnMm8byhkoTZRl+95LLThpzNZJ5aEvi46cdH+ayMFRwmA==} - engines: {node: '>= 0.4'} - dependencies: - call-bind: 1.0.2 - dev: false - - /is-callable/1.2.3: - resolution: {integrity: sha512-J1DcMe8UYTBSrKezuIUTUwjXsho29693unXM2YhJUTR2txK/eG47bvNa/wipPFmZFgr/N6f1GA66dv0mEyTIyQ==} - engines: {node: '>= 0.4'} - dev: false - - /is-date-object/1.0.3: - resolution: {integrity: sha512-tDpEUInNcy2Yw3lNSepK3Wdw1RnXLcIVienz6Ou631Acl15cJyRWK4dgA1vCmOEgIbtOV0W7MHg+AR2Gdg1NXQ==} - engines: {node: '>= 0.4'} - dev: false - - /is-extglob/2.1.1: - resolution: {integrity: sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=} - engines: {node: '>=0.10.0'} - dev: false - - /is-generator-function/1.0.9: - resolution: {integrity: sha512-ZJ34p1uvIfptHCN7sFTjGibB9/oBg17sHqzDLfuwhvmN/qLVvIQXRQ8licZQ35WJ8KuEQt/etnnzQFI9C9Ue/A==} - engines: {node: '>= 0.4'} - dev: false - - /is-glob/4.0.1: - resolution: {integrity: sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==} - engines: {node: '>=0.10.0'} - dependencies: - is-extglob: 2.1.1 - dev: false - - /is-nan/1.3.2: - resolution: {integrity: sha512-E+zBKpQ2t6MEo1VsonYmluk9NxGrbzpeeLC2xIViuO2EjU2xsXsBPwTr3Ykv9l08UYEVEdWeRZNouaZqF6RN0w==} - engines: {node: '>= 0.4'} - dependencies: - call-bind: 1.0.2 - define-properties: 1.1.3 - dev: false - - /is-negative-zero/2.0.1: - resolution: {integrity: sha512-2z6JzQvZRa9A2Y7xC6dQQm4FSTSTNWjKIYYTt4246eMTJmIo0Q+ZyOsU66X8lxK1AbB92dFeglPLrhwpeRKO6w==} - engines: {node: '>= 0.4'} - dev: false - - /is-number-object/1.0.4: - resolution: {integrity: sha512-zohwelOAur+5uXtk8O3GPQ1eAcu4ZX3UwxQhUlfFFMNpUd83gXgjbhJh6HmB6LUNV/ieOLQuDwJO3dWJosUeMw==} - engines: {node: '>= 0.4'} - dev: false - - /is-number/7.0.0: - resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==} - engines: {node: '>=0.12.0'} - dev: false - - /is-regex/1.1.2: - resolution: {integrity: sha512-axvdhb5pdhEVThqJzYXwMlVuZwC+FF2DpcOhTS+y/8jVq4trxyPgfcwIxIKiyeuLlSQYKkmUaPQJ8ZE4yNKXDg==} - engines: {node: '>= 0.4'} - dependencies: - call-bind: 1.0.2 - has-symbols: 1.0.2 - dev: false - - /is-string/1.0.5: - resolution: {integrity: sha512-buY6VNRjhQMiF1qWDouloZlQbRhDPCebwxSjxMjxgemYT46YMd2NR0/H+fBhEfWX4A/w9TBJ+ol+okqJKFE6vQ==} - engines: {node: '>= 0.4'} - dev: false - - /is-symbol/1.0.3: - resolution: {integrity: sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ==} - engines: {node: '>= 0.4'} - dependencies: - has-symbols: 1.0.2 - dev: false - - /is-typed-array/1.1.5: - resolution: {integrity: sha512-S+GRDgJlR3PyEbsX/Fobd9cqpZBuvUS+8asRqYDMLCb2qMzt1oz5m5oxQCxOgUDxiWsOVNi4yaF+/uvdlHlYug==} - engines: {node: '>= 0.4'} - dependencies: - available-typed-arrays: 1.0.2 - call-bind: 1.0.2 - es-abstract: 1.18.0 - foreach: 2.0.5 - has-symbols: 1.0.2 - dev: false - - /isarray/1.0.0: - resolution: {integrity: sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=} - dev: false - - /jest-worker/27.0.0-next.5: - resolution: {integrity: sha512-mk0umAQ5lT+CaOJ+Qp01N6kz48sJG2kr2n1rX0koqKf6FIygQV0qLOdN9SCYID4IVeSigDOcPeGLozdMLYfb5g==} - engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} - dependencies: - '@types/node': 15.0.2 - merge-stream: 2.0.0 - supports-color: 8.1.1 - dev: false - - /js-tokens/4.0.0: - resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} - dev: false - - /json5/1.0.1: - resolution: {integrity: sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==} - hasBin: true - dependencies: - minimist: 1.2.5 - dev: false - - /lines-and-columns/1.1.6: - resolution: {integrity: sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA=} - dev: false - - /loader-utils/1.2.3: - resolution: {integrity: sha512-fkpz8ejdnEMG3s37wGL07iSBDg99O9D5yflE9RGNH3hRdx9SOwYfnGYdZOUIZitN8E+E2vkq3MUMYMvPYl5ZZA==} - engines: {node: '>=4.0.0'} - dependencies: - big.js: 5.2.2 - emojis-list: 2.1.0 - json5: 1.0.1 - dev: false - - /locate-path/5.0.0: - resolution: {integrity: sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==} - engines: {node: '>=8'} - dependencies: - p-locate: 4.1.0 - dev: false - - /lodash.sortby/4.7.0: - resolution: {integrity: sha1-7dFMgk4sycHgsKG0K7UhBRakJDg=} - dev: false - - /lodash/4.17.21: - resolution: {integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==} - dev: false - - /loose-envify/1.4.0: - resolution: {integrity: sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==} - hasBin: true - dependencies: - js-tokens: 4.0.0 - dev: false - - /lower-case/2.0.2: - resolution: {integrity: sha512-7fm3l3NAF9WfN6W3JOmf5drwpVqX78JtoGJ3A6W0a6ZnldM41w2fV5D490psKFTpMds8TJse/eHLFFsNHHjHgg==} - dependencies: - tslib: 2.2.0 - dev: false - - /make-dir/3.1.0: - resolution: {integrity: sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==} - engines: {node: '>=8'} - dependencies: - semver: 6.3.0 - dev: false - - /md5.js/1.3.5: - resolution: {integrity: sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==} - dependencies: - hash-base: 3.1.0 - inherits: 2.0.4 - safe-buffer: 5.2.1 - dev: false - - /merge-stream/2.0.0: - resolution: {integrity: sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==} - dev: false - - /miller-rabin/4.0.1: - resolution: {integrity: sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==} - hasBin: true - dependencies: - bn.js: 4.12.0 - brorand: 1.1.0 - dev: false - - /minimalistic-assert/1.0.1: - resolution: {integrity: sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==} - dev: false - - /minimalistic-crypto-utils/1.0.1: - resolution: {integrity: sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=} - dev: false - - /minimatch/3.0.4: - resolution: {integrity: sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==} - dependencies: - brace-expansion: 1.1.11 - dev: false - - /minimist/1.2.5: - resolution: {integrity: sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==} - dev: false - - /ms/2.0.0: - resolution: {integrity: sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=} - dev: false - - /mz/2.7.0: - resolution: {integrity: sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==} - dependencies: - any-promise: 1.3.0 - object-assign: 4.1.1 - thenify-all: 1.6.0 - dev: false - - /nanoid/3.1.22: - resolution: {integrity: sha512-/2ZUaJX2ANuLtTvqTlgqBQNJoQO398KyJgZloL0PZkC0dpysjncRUPsFe3DUPzz/y3h+u7C46np8RMuvF3jsSQ==} - engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} - hasBin: true - dev: false - - /native-url/0.3.4: - resolution: {integrity: sha512-6iM8R99ze45ivyH8vybJ7X0yekIcPf5GgLV5K0ENCbmRcaRIDoj37BC8iLEmaaBfqqb8enuZ5p0uhY+lVAbAcA==} - dependencies: - querystring: 0.2.1 - dev: false - - /next/10.2.0_react-dom@17.0.2+react@17.0.2: - resolution: {integrity: sha512-PKDKCSF7s82xudu3kQhOEaokxggpbLEWouEUtzP6OqV0YqKYHF+Ff+BFLycEem8ixtTM2M6ElN0VRJcskJfxPQ==} - engines: {node: '>=10.13.0'} - hasBin: true - peerDependencies: - fibers: '>= 3.1.0' - node-sass: ^4.0.0 || ^5.0.0 - react: ^16.6.0 || ^17 - react-dom: ^16.6.0 || ^17 - sass: ^1.3.0 - peerDependenciesMeta: - fibers: - optional: true - node-sass: - optional: true - sass: - optional: true - dependencies: - '@babel/runtime': 7.12.5 - '@hapi/accept': 5.0.1 - '@next/env': 10.2.0 - '@next/polyfill-module': 10.2.0 - '@next/react-dev-overlay': 10.2.0_react-dom@17.0.2+react@17.0.2 - '@next/react-refresh-utils': 10.2.0_react-refresh@0.8.3 - '@opentelemetry/api': 0.14.0 - assert: 2.0.0 - ast-types: 0.13.2 - browserify-zlib: 0.2.0 - browserslist: 4.16.1 - buffer: 5.6.0 - caniuse-lite: 1.0.30001223 - chalk: 2.4.2 - chokidar: 3.5.1 - constants-browserify: 1.0.0 - crypto-browserify: 3.12.0 - cssnano-simple: 2.0.0_postcss@8.2.13 - domain-browser: 4.19.0 - encoding: 0.1.13 - etag: 1.8.1 - find-cache-dir: 3.3.1 - get-orientation: 1.1.2 - https-browserify: 1.0.0 - jest-worker: 27.0.0-next.5 - native-url: 0.3.4 - node-fetch: 2.6.1 - node-html-parser: 1.4.9 - node-libs-browser: 2.2.1 - os-browserify: 0.3.0 - p-limit: 3.1.0 - path-browserify: 1.0.1 - pnp-webpack-plugin: 1.6.4 - postcss: 8.2.13 - process: 0.11.10 - prop-types: 15.7.2 - querystring-es3: 0.2.1 - raw-body: 2.4.1 - react: 17.0.2 - react-dom: 17.0.2_react@17.0.2 - react-is: 16.13.1 - react-refresh: 0.8.3 - stream-browserify: 3.0.0 - stream-http: 3.1.1 - string_decoder: 1.3.0 - styled-jsx: 3.3.2_react@17.0.2 - timers-browserify: 2.0.12 - tty-browserify: 0.0.1 - use-subscription: 1.5.1_react@17.0.2 - util: 0.12.3 - vm-browserify: 1.1.2 - watchpack: 2.1.1 - transitivePeerDependencies: - - typescript - - webpack - dev: false - - /no-case/3.0.4: - resolution: {integrity: sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg==} - dependencies: - lower-case: 2.0.2 - tslib: 2.2.0 - dev: false - - /node-fetch/2.6.1: - resolution: {integrity: sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw==} - engines: {node: 4.x || >=6.0.0} - dev: false - - /node-html-parser/1.4.9: - resolution: {integrity: sha512-UVcirFD1Bn0O+TSmloHeHqZZCxHjvtIeGdVdGMhyZ8/PWlEiZaZ5iJzR189yKZr8p0FXN58BUeC7RHRkf/KYGw==} - dependencies: - he: 1.2.0 - dev: false - - /node-libs-browser/2.2.1: - resolution: {integrity: sha512-h/zcD8H9kaDZ9ALUWwlBUDo6TKF8a7qBSCSEGfjTVIYeqsioSKaAX+BN7NgiMGp6iSIXZ3PxgCu8KS3b71YK5Q==} - dependencies: - assert: 1.5.0 - browserify-zlib: 0.2.0 - buffer: 4.9.2 - console-browserify: 1.2.0 - constants-browserify: 1.0.0 - crypto-browserify: 3.12.0 - domain-browser: 1.2.0 - events: 3.3.0 - https-browserify: 1.0.0 - os-browserify: 0.3.0 - path-browserify: 0.0.1 - process: 0.11.10 - punycode: 1.4.1 - querystring-es3: 0.2.1 - readable-stream: 2.3.7 - stream-browserify: 2.0.2 - stream-http: 2.8.3 - string_decoder: 1.3.0 - timers-browserify: 2.0.12 - tty-browserify: 0.0.0 - url: 0.11.0 - util: 0.11.1 - vm-browserify: 1.1.2 - dev: false - - /node-modules-regexp/1.0.0: - resolution: {integrity: sha1-jZ2+KJZKSsVxLpExZCEHxx6Q7EA=} - engines: {node: '>=0.10.0'} - dev: false - - /node-releases/1.1.71: - resolution: {integrity: sha512-zR6HoT6LrLCRBwukmrVbHv0EpEQjksO6GmFcZQQuCAy139BEsoVKPYnf3jongYW83fAa1torLGYwxxky/p28sg==} - dev: false - - /normalize-path/3.0.0: - resolution: {integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==} - engines: {node: '>=0.10.0'} - dev: false - - /object-assign/4.1.1: - resolution: {integrity: sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=} - engines: {node: '>=0.10.0'} - dev: false - - /object-inspect/1.10.2: - resolution: {integrity: sha512-gz58rdPpadwztRrPjZE9DZLOABUpTGdcANUgOwBFO1C+HZZhePoP83M65WGDmbpwFYJSWqavbl4SgDn4k8RYTA==} - dev: false - - /object-is/1.1.5: - resolution: {integrity: sha512-3cyDsyHgtmi7I7DfSSI2LDp6SK2lwvtbg0p0R1e0RvTqF5ceGx+K2dfSjm1bKDMVCFEDAQvy+o8c6a7VujOddw==} - engines: {node: '>= 0.4'} - dependencies: - call-bind: 1.0.2 - define-properties: 1.1.3 - dev: false - - /object-keys/1.1.1: - resolution: {integrity: sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==} - engines: {node: '>= 0.4'} - dev: false - - /object.assign/4.1.2: - resolution: {integrity: sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==} - engines: {node: '>= 0.4'} - dependencies: - call-bind: 1.0.2 - define-properties: 1.1.3 - has-symbols: 1.0.2 - object-keys: 1.1.1 - dev: false - - /once/1.4.0: - resolution: {integrity: sha1-WDsap3WWHUsROsF9nFC6753Xa9E=} - dependencies: - wrappy: 1.0.2 - dev: false - - /os-browserify/0.3.0: - resolution: {integrity: sha1-hUNzx/XCMVkU/Jv8a9gjj92h7Cc=} - dev: false - - /p-limit/2.3.0: - resolution: {integrity: sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==} - engines: {node: '>=6'} - dependencies: - p-try: 2.2.0 - dev: false - - /p-limit/3.1.0: - resolution: {integrity: sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==} - engines: {node: '>=10'} - dependencies: - yocto-queue: 0.1.0 - dev: false - - /p-locate/4.1.0: - resolution: {integrity: sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==} - engines: {node: '>=8'} - dependencies: - p-limit: 2.3.0 - dev: false - - /p-try/2.2.0: - resolution: {integrity: sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==} - engines: {node: '>=6'} - dev: false - - /pako/1.0.11: - resolution: {integrity: sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==} - dev: false - - /param-case/3.0.4: - resolution: {integrity: sha512-RXlj7zCYokReqWpOPH9oYivUzLYZ5vAPIfEmCTNViosC78F8F0H9y7T7gG2M39ymgutxF5gcFEsyZQSph9Bp3A==} - dependencies: - dot-case: 3.0.4 - tslib: 2.2.0 - dev: false - - /parse-asn1/5.1.6: - resolution: {integrity: sha512-RnZRo1EPU6JBnra2vGHj0yhp6ebyjBZpmUCLHWiFhxlzvBCCpAuZ7elsBp1PVAbQN0/04VD/19rfzlBSwLstMw==} - dependencies: - asn1.js: 5.4.1 - browserify-aes: 1.2.0 - evp_bytestokey: 1.0.3 - pbkdf2: 3.1.2 - safe-buffer: 5.2.1 - dev: false - - /pascal-case/3.1.2: - resolution: {integrity: sha512-uWlGT3YSnK9x3BQJaOdcZwrnV6hPpd8jFH1/ucpiLRPh/2zCVJKS19E4GvYHvaCcACn3foXZ0cLB9Wrx1KGe5g==} - dependencies: - no-case: 3.0.4 - tslib: 2.2.0 - dev: false - - /path-browserify/0.0.1: - resolution: {integrity: sha512-BapA40NHICOS+USX9SN4tyhq+A2RrN/Ws5F0Z5aMHDp98Fl86lX8Oti8B7uN93L4Ifv4fHOEA+pQw87gmMO/lQ==} - dev: false - - /path-browserify/1.0.1: - resolution: {integrity: sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==} - dev: false - - /path-case/3.0.4: - resolution: {integrity: sha512-qO4qCFjXqVTrcbPt/hQfhTQ+VhFsqNKOPtytgNKkKxSoEp3XPUQ8ObFuePylOIok5gjn69ry8XiULxCwot3Wfg==} - dependencies: - dot-case: 3.0.4 - tslib: 2.2.0 - dev: false - - /path-exists/4.0.0: - resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==} - engines: {node: '>=8'} - dev: false - - /path-is-absolute/1.0.1: - resolution: {integrity: sha1-F0uSaHNVNP+8es5r9TpanhtcX18=} - engines: {node: '>=0.10.0'} - dev: false - - /pbkdf2/3.1.2: - resolution: {integrity: sha512-iuh7L6jA7JEGu2WxDwtQP1ddOpaJNC4KlDEFfdQajSGgGPNi4OyDc2R7QnbY2bR9QjBVGwgvTdNJZoE7RaxUMA==} - engines: {node: '>=0.12'} - dependencies: - create-hash: 1.2.0 - create-hmac: 1.1.7 - ripemd160: 2.0.2 - safe-buffer: 5.2.1 - sha.js: 2.4.11 - dev: false - - /peechy/0.4.3: - resolution: {integrity: sha512-V7caZQjhB1KYuvyLgUEtzyTT0xEfU5X+kK26fKoQVGuS5PpuBtJxnI1UcVW1dvxpfYJ/D+mCjUnq+bVCvZSSsw==} - hasBin: true - dependencies: - change-case: 4.1.2 - dev: false - - /picomatch/2.2.3: - resolution: {integrity: sha512-KpELjfwcCDUb9PeigTs2mBJzXUPzAuP2oPcA989He8Rte0+YUAjw1JVedDhuTKPkHjSYzMN3npC9luThGYEKdg==} - engines: {node: '>=8.6'} - dev: false - - /pirates/4.0.1: - resolution: {integrity: sha512-WuNqLTbMI3tmfef2TKxlQmAiLHKtFhlsCZnPIpuv2Ow0RDVO8lfy1Opf4NUzlMXLjPl+Men7AuVdX6TA+s+uGA==} - engines: {node: '>= 6'} - dependencies: - node-modules-regexp: 1.0.0 - dev: false - - /pkg-dir/4.2.0: - resolution: {integrity: sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==} - engines: {node: '>=8'} - dependencies: - find-up: 4.1.0 - dev: false - - /platform/1.3.6: - resolution: {integrity: sha512-fnWVljUchTro6RiCFvCXBbNhJc2NijN7oIQxbwsyL0buWJPG85v81ehlHI9fXrJsMNgTofEoWIQeClKpgxFLrg==} - dev: false - - /pnp-webpack-plugin/1.6.4: - resolution: {integrity: sha512-7Wjy+9E3WwLOEL30D+m8TSTF7qJJUJLONBnwQp0518siuMxUQUbgZwssaFX+QKlZkjHZcw/IpZCt/H0srrntSg==} - engines: {node: '>=6'} - dependencies: - ts-pnp: 1.2.0 - transitivePeerDependencies: - - typescript - dev: false - - /postcss/8.2.13: - resolution: {integrity: sha512-FCE5xLH+hjbzRdpbRb1IMCvPv9yZx2QnDarBEYSN0N0HYk+TcXsEhwdFcFb+SRWOKzKGErhIEbBK2ogyLdTtfQ==} - engines: {node: ^10 || ^12 || >=14} - dependencies: - colorette: 1.2.2 - nanoid: 3.1.22 - source-map: 0.6.1 - dev: false - - /process-nextick-args/2.0.1: - resolution: {integrity: sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==} - dev: false - - /process/0.11.10: - resolution: {integrity: sha1-czIwDoQBYb2j5podHZGn1LwW8YI=} - engines: {node: '>= 0.6.0'} - dev: false - - /prop-types/15.7.2: - resolution: {integrity: sha512-8QQikdH7//R2vurIJSutZ1smHYTcLpRWEOlHnzcWHmBYrOGUysKwSsrC89BCiFj3CbrfJ/nXFdJepOVrY1GCHQ==} - dependencies: - loose-envify: 1.4.0 - object-assign: 4.1.1 - react-is: 16.13.1 - dev: false - - /public-encrypt/4.0.3: - resolution: {integrity: sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q==} - dependencies: - bn.js: 4.12.0 - browserify-rsa: 4.1.0 - create-hash: 1.2.0 - parse-asn1: 5.1.6 - randombytes: 2.1.0 - safe-buffer: 5.2.1 - dev: false - - /punycode/1.3.2: - resolution: {integrity: sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=} - dev: false - - /punycode/1.4.1: - resolution: {integrity: sha1-wNWmOycYgArY4esPpSachN1BhF4=} - dev: false - - /punycode/2.1.1: - resolution: {integrity: sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==} - engines: {node: '>=6'} - dev: false - - /querystring-es3/0.2.1: - resolution: {integrity: sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM=} - engines: {node: '>=0.4.x'} - dev: false - - /querystring/0.2.0: - resolution: {integrity: sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=} - engines: {node: '>=0.4.x'} - dev: false - - /querystring/0.2.1: - resolution: {integrity: sha512-wkvS7mL/JMugcup3/rMitHmd9ecIGd2lhFhK9N3UUQ450h66d1r3Y9nvXzQAW1Lq+wyx61k/1pfKS5KuKiyEbg==} - engines: {node: '>=0.4.x'} - dev: false - - /randombytes/2.1.0: - resolution: {integrity: sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==} - dependencies: - safe-buffer: 5.2.1 - dev: false - - /randomfill/1.0.4: - resolution: {integrity: sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==} - dependencies: - randombytes: 2.1.0 - safe-buffer: 5.2.1 - dev: false - - /raw-body/2.4.1: - resolution: {integrity: sha512-9WmIKF6mkvA0SLmA2Knm9+qj89e+j1zqgyn8aXGd7+nAduPoqgI9lO57SAZNn/Byzo5P7JhXTyg9PzaJbH73bA==} - engines: {node: '>= 0.8'} - dependencies: - bytes: 3.1.0 - http-errors: 1.7.3 - iconv-lite: 0.4.24 - unpipe: 1.0.0 - dev: false - - /react-dom/17.0.2_react@17.0.2: - resolution: {integrity: sha512-s4h96KtLDUQlsENhMn1ar8t2bEa+q/YAtj8pPPdIjPDGBDIVNsrD9aXNWqspUe6AzKCIG0C1HZZLqLV7qpOBGA==} - peerDependencies: - react: 17.0.2 - dependencies: - loose-envify: 1.4.0 - object-assign: 4.1.1 - react: 17.0.2 - scheduler: 0.20.2 - dev: false - - /react-is/16.13.1: - resolution: {integrity: sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==} - dev: false - - /react-refresh/0.8.3: - resolution: {integrity: sha512-X8jZHc7nCMjaCqoU+V2I0cOhNW+QMBwSUkeXnTi8IPe6zaRWfn60ZzvFDZqWPfmSJfjub7dDW1SP0jaHWLu/hg==} - engines: {node: '>=0.10.0'} - dev: false - - /react/17.0.2: - resolution: {integrity: sha512-gnhPt75i/dq/z3/6q/0asP78D0u592D5L1pd7M8P+dck6Fu/jJeL6iVVK23fptSUZj8Vjf++7wXA8UNclGQcbA==} - engines: {node: '>=0.10.0'} - dependencies: - loose-envify: 1.4.0 - object-assign: 4.1.1 - dev: false - - /readable-stream/2.3.7: - resolution: {integrity: sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==} - dependencies: - core-util-is: 1.0.2 - inherits: 2.0.4 - isarray: 1.0.0 - process-nextick-args: 2.0.1 - safe-buffer: 5.1.2 - string_decoder: 1.1.1 - util-deprecate: 1.0.2 - dev: false - - /readable-stream/3.6.0: - resolution: {integrity: sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==} - engines: {node: '>= 6'} - dependencies: - inherits: 2.0.4 - string_decoder: 1.3.0 - util-deprecate: 1.0.2 - dev: false - - /readdirp/3.5.0: - resolution: {integrity: sha512-cMhu7c/8rdhkHXWsY+osBhfSy0JikwpHK/5+imo+LpeasTF8ouErHrlYkwT0++njiyuDvc7OFY5T3ukvZ8qmFQ==} - engines: {node: '>=8.10.0'} - dependencies: - picomatch: 2.2.3 - dev: false - - /regenerator-runtime/0.13.7: - resolution: {integrity: sha512-a54FxoJDIr27pgf7IgeQGxmqUNYrcV338lf/6gH456HZ/PhX+5BcwHXG9ajESmwe6WRO0tAzRUrRmNONWgkrew==} - dev: false - - /ripemd160/2.0.2: - resolution: {integrity: sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==} - dependencies: - hash-base: 3.1.0 - inherits: 2.0.4 - dev: false - - /safe-buffer/5.1.2: - resolution: {integrity: sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==} - dev: false - - /safe-buffer/5.2.1: - resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==} - dev: false - - /safer-buffer/2.1.2: - resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==} - dev: false - - /scheduler/0.20.2: - resolution: {integrity: sha512-2eWfGgAqqWFGqtdMmcL5zCMK1U8KlXv8SQFGglL3CEtd0aDVDWgeF/YoCmvln55m5zSk3J/20hTaSBeSObsQDQ==} - dependencies: - loose-envify: 1.4.0 - object-assign: 4.1.1 - dev: false - - /semver/6.3.0: - resolution: {integrity: sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==} - hasBin: true - dev: false - - /sentence-case/3.0.4: - resolution: {integrity: sha512-8LS0JInaQMCRoQ7YUytAo/xUu5W2XnQxV2HI/6uM6U7CITS1RqPElr30V6uIqyMKM9lJGRVFy5/4CuzcixNYSg==} - dependencies: - no-case: 3.0.4 - tslib: 2.2.0 - upper-case-first: 2.0.2 - dev: false - - /setimmediate/1.0.5: - resolution: {integrity: sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=} - dev: false - - /setprototypeof/1.1.1: - resolution: {integrity: sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw==} - dev: false - - /sha.js/2.4.11: - resolution: {integrity: sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==} - hasBin: true - dependencies: - inherits: 2.0.4 - safe-buffer: 5.2.1 - dev: false - - /shell-quote/1.7.2: - resolution: {integrity: sha512-mRz/m/JVscCrkMyPqHc/bczi3OQHkLTqXHEFu0zDhK/qfv3UcOA4SVmRCLmos4bhjr9ekVQubj/R7waKapmiQg==} - dev: false - - /snake-case/3.0.4: - resolution: {integrity: sha512-LAOh4z89bGQvl9pFfNF8V146i7o7/CqFPbqzYgP+yYzDIDeS9HaNFtXABamRW+AQzEVODcvE79ljJ+8a9YSdMg==} - dependencies: - dot-case: 3.0.4 - tslib: 2.2.0 - dev: false - - /source-map/0.6.1: - resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==} - engines: {node: '>=0.10.0'} - dev: false - - /source-map/0.7.3: - resolution: {integrity: sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==} - engines: {node: '>= 8'} - dev: false - - /source-map/0.8.0-beta.0: - resolution: {integrity: sha512-2ymg6oRBpebeZi9UUNsgQ89bhx01TcTkmNTGnNO88imTmbSgy4nfujrgVEFKWpMTEGA11EDkTt7mqObTPdigIA==} - engines: {node: '>= 8'} - dependencies: - whatwg-url: 7.1.0 - dev: false - - /stacktrace-parser/0.1.10: - resolution: {integrity: sha512-KJP1OCML99+8fhOHxwwzyWrlUuVX5GQ0ZpJTd1DFXhdkrvg1szxfHhawXUZ3g9TkXORQd4/WG68jMlQZ2p8wlg==} - engines: {node: '>=6'} - dependencies: - type-fest: 0.7.1 - dev: false - - /statuses/1.5.0: - resolution: {integrity: sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=} - engines: {node: '>= 0.6'} - dev: false - - /stream-browserify/2.0.2: - resolution: {integrity: sha512-nX6hmklHs/gr2FuxYDltq8fJA1GDlxKQCz8O/IM4atRqBH8OORmBNgfvW5gG10GT/qQ9u0CzIvr2X5Pkt6ntqg==} - dependencies: - inherits: 2.0.4 - readable-stream: 2.3.7 - dev: false - - /stream-browserify/3.0.0: - resolution: {integrity: sha512-H73RAHsVBapbim0tU2JwwOiXUj+fikfiaoYAKHF3VJfA0pe2BCzkhAHBlLG6REzE+2WNZcxOXjK7lkso+9euLA==} - dependencies: - inherits: 2.0.4 - readable-stream: 3.6.0 - dev: false - - /stream-http/2.8.3: - resolution: {integrity: sha512-+TSkfINHDo4J+ZobQLWiMouQYB+UVYFttRA94FpEzzJ7ZdqcL4uUUQ7WkdkI4DSozGmgBUE/a47L+38PenXhUw==} - dependencies: - builtin-status-codes: 3.0.0 - inherits: 2.0.4 - readable-stream: 2.3.7 - to-arraybuffer: 1.0.1 - xtend: 4.0.2 - dev: false - - /stream-http/3.1.1: - resolution: {integrity: sha512-S7OqaYu0EkFpgeGFb/NPOoPLxFko7TPqtEeFg5DXPB4v/KETHG0Ln6fRFrNezoelpaDKmycEmmZ81cC9DAwgYg==} - dependencies: - builtin-status-codes: 3.0.0 - inherits: 2.0.4 - readable-stream: 3.6.0 - xtend: 4.0.2 - dev: false - - /stream-parser/0.3.1: - resolution: {integrity: sha1-FhhUhpRCACGhGC/wrxkRwSl2F3M=} - dependencies: - debug: 2.6.9 - dev: false - - /string-hash/1.1.3: - resolution: {integrity: sha1-6Kr8CsGFW0Zmkp7X3RJ1311sgRs=} - dev: false - - /string.prototype.trimend/1.0.4: - resolution: {integrity: sha512-y9xCjw1P23Awk8EvTpcyL2NIr1j7wJ39f+k6lvRnSMz+mz9CGz9NYPelDk42kOz6+ql8xjfK8oYzy3jAP5QU5A==} - dependencies: - call-bind: 1.0.2 - define-properties: 1.1.3 - dev: false - - /string.prototype.trimstart/1.0.4: - resolution: {integrity: sha512-jh6e984OBfvxS50tdY2nRZnoC5/mLFKOREQfw8t5yytkoUsJRNxvI/E39qu1sD0OtWI3OC0XgKSmcWwziwYuZw==} - dependencies: - call-bind: 1.0.2 - define-properties: 1.1.3 - dev: false - - /string_decoder/1.1.1: - resolution: {integrity: sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==} - dependencies: - safe-buffer: 5.1.2 - dev: false - - /string_decoder/1.3.0: - resolution: {integrity: sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==} - dependencies: - safe-buffer: 5.2.1 - dev: false - - /strip-ansi/6.0.0: - resolution: {integrity: sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==} - engines: {node: '>=8'} - dependencies: - ansi-regex: 5.0.0 - dev: false - - /styled-jsx/3.3.2_react@17.0.2: - resolution: {integrity: sha512-daAkGd5mqhbBhLd6jYAjYBa9LpxYCzsgo/f6qzPdFxVB8yoGbhxvzQgkC0pfmCVvW3JuAEBn0UzFLBfkHVZG1g==} - peerDependencies: - react: 15.x.x || 16.x.x || 17.x.x - dependencies: - '@babel/types': 7.8.3 - babel-plugin-syntax-jsx: 6.18.0 - convert-source-map: 1.7.0 - loader-utils: 1.2.3 - react: 17.0.2 - source-map: 0.7.3 - string-hash: 1.1.3 - stylis: 3.5.4 - stylis-rule-sheet: 0.0.10_stylis@3.5.4 - dev: false - - /stylis-rule-sheet/0.0.10_stylis@3.5.4: - resolution: {integrity: sha512-nTbZoaqoBnmK+ptANthb10ZRZOGC+EmTLLUxeYIuHNkEKcmKgXX1XWKkUBT2Ac4es3NybooPe0SmvKdhKJZAuw==} - peerDependencies: - stylis: ^3.5.0 - dependencies: - stylis: 3.5.4 - dev: false - - /stylis/3.5.4: - resolution: {integrity: sha512-8/3pSmthWM7lsPBKv7NXkzn2Uc9W7NotcwGNpJaa3k7WMM1XDCA4MgT5k/8BIexd5ydZdboXtU90XH9Ec4Bv/Q==} - dev: false - - /sucrase/3.18.1: - resolution: {integrity: sha512-TRyO38wwOPhLLlM8QLOG3TgMj0FKk+arlTrS9pRAanF8cAcHvgRPKIYWGO25mPSp/Rj87zMMTjFfkqIZGI6ZdA==} - engines: {node: '>=8'} - hasBin: true - dependencies: - commander: 4.1.1 - glob: 7.1.6 - lines-and-columns: 1.1.6 - mz: 2.7.0 - pirates: 4.0.1 - ts-interface-checker: 0.1.13 - dev: false - - /supports-color/5.5.0: - resolution: {integrity: sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==} - engines: {node: '>=4'} - dependencies: - has-flag: 3.0.0 - dev: false - - /supports-color/7.2.0: - resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==} - engines: {node: '>=8'} - dependencies: - has-flag: 4.0.0 - dev: false - - /supports-color/8.1.1: - resolution: {integrity: sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==} - engines: {node: '>=10'} - dependencies: - has-flag: 4.0.0 - dev: false - - /thenify-all/1.6.0: - resolution: {integrity: sha1-GhkY1ALY/D+Y+/I02wvMjMEOlyY=} - engines: {node: '>=0.8'} - dependencies: - thenify: 3.3.1 - dev: false - - /thenify/3.3.1: - resolution: {integrity: sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==} - dependencies: - any-promise: 1.3.0 - dev: false - - /timers-browserify/2.0.12: - resolution: {integrity: sha512-9phl76Cqm6FhSX9Xe1ZUAMLtm1BLkKj2Qd5ApyWkXzsMRaA7dgr81kf4wJmQf/hAvg8EEyJxDo3du/0KlhPiKQ==} - engines: {node: '>=0.6.0'} - dependencies: - setimmediate: 1.0.5 - dev: false - - /to-arraybuffer/1.0.1: - resolution: {integrity: sha1-fSKbH8xjfkZsoIEYCDanqr/4P0M=} - dev: false - - /to-fast-properties/2.0.0: - resolution: {integrity: sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=} - engines: {node: '>=4'} - dev: false - - /to-regex-range/5.0.1: - resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} - engines: {node: '>=8.0'} - dependencies: - is-number: 7.0.0 - dev: false - - /toidentifier/1.0.0: - resolution: {integrity: sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw==} - engines: {node: '>=0.6'} - dev: false - - /tr46/1.0.1: - resolution: {integrity: sha1-qLE/1r/SSJUZZ0zN5VujaTtwbQk=} - dependencies: - punycode: 2.1.1 - dev: false - - /ts-interface-checker/0.1.13: - resolution: {integrity: sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==} - dev: false - - /ts-pnp/1.2.0: - resolution: {integrity: sha512-csd+vJOb/gkzvcCHgTGSChYpy5f1/XKNsmvBGO4JXS+z1v2HobugDz4s1IeFXM3wZB44uczs+eazB5Q/ccdhQw==} - engines: {node: '>=6'} - peerDependencies: - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true - dev: false - - /tslib/2.2.0: - resolution: {integrity: sha512-gS9GVHRU+RGn5KQM2rllAlR3dU6m7AcpJKdtH8gFvQiC4Otgk98XnmMU+nZenHt/+VhnBPWwgrJsyrdcw6i23w==} - dev: false - - /tty-browserify/0.0.0: - resolution: {integrity: sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY=} - dev: false - - /tty-browserify/0.0.1: - resolution: {integrity: sha512-C3TaO7K81YvjCgQH9Q1S3R3P3BtN3RIM8n+OvX4il1K1zgE8ZhI0op7kClgkxtutIE8hQrcrHBXvIheqKUUCxw==} - dev: false - - /type-fest/0.7.1: - resolution: {integrity: sha512-Ne2YiiGN8bmrmJJEuTWTLJR32nh/JdL1+PSicowtNb0WFpn59GK8/lfD61bVtzguz7b3PBt74nxpv/Pw5po5Rg==} - engines: {node: '>=8'} - dev: false - - /unbox-primitive/1.0.1: - resolution: {integrity: sha512-tZU/3NqK3dA5gpE1KtyiJUrEB0lxnGkMFHptJ7q6ewdZ8s12QrODwNbhIJStmJkd1QDXa1NRA8aF2A1zk/Ypyw==} - dependencies: - function-bind: 1.1.1 - has-bigints: 1.0.1 - has-symbols: 1.0.2 - which-boxed-primitive: 1.0.2 - dev: false - - /unpipe/1.0.0: - resolution: {integrity: sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=} - engines: {node: '>= 0.8'} - dev: false - - /upper-case-first/2.0.2: - resolution: {integrity: sha512-514ppYHBaKwfJRK/pNC6c/OxfGa0obSnAl106u97Ed0I625Nin96KAjttZF6ZL3e1XLtphxnqrOi9iWgm+u+bg==} - dependencies: - tslib: 2.2.0 - dev: false - - /upper-case/2.0.2: - resolution: {integrity: sha512-KgdgDGJt2TpuwBUIjgG6lzw2GWFRCW9Qkfkiv0DxqHHLYJHmtmdUIKcZd8rHgFSjopVTlw6ggzCm1b8MFQwikg==} - dependencies: - tslib: 2.2.0 - dev: false - - /url/0.11.0: - resolution: {integrity: sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE=} - dependencies: - punycode: 1.3.2 - querystring: 0.2.0 - dev: false - - /use-subscription/1.5.1_react@17.0.2: - resolution: {integrity: sha512-Xv2a1P/yReAjAbhylMfFplFKj9GssgTwN7RlcTxBujFQcloStWNDQdc4g4NRWH9xS4i/FDk04vQBptAXoF3VcA==} - peerDependencies: - react: ^16.8.0 || ^17.0.0 - dependencies: - object-assign: 4.1.1 - react: 17.0.2 - dev: false - - /util-deprecate/1.0.2: - resolution: {integrity: sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=} - dev: false - - /util/0.10.3: - resolution: {integrity: sha1-evsa/lCAUkZInj23/g7TeTNqwPk=} - dependencies: - inherits: 2.0.1 - dev: false - - /util/0.11.1: - resolution: {integrity: sha512-HShAsny+zS2TZfaXxD9tYj4HQGlBezXZMZuM/S5PKLLoZkShZiGk9o5CzukI1LVHZvjdvZ2Sj1aW/Ndn2NB/HQ==} - dependencies: - inherits: 2.0.3 - dev: false - - /util/0.12.3: - resolution: {integrity: sha512-I8XkoQwE+fPQEhy9v012V+TSdH2kp9ts29i20TaaDUXsg7x/onePbhFJUExBfv/2ay1ZOp/Vsm3nDlmnFGSAog==} - dependencies: - inherits: 2.0.4 - is-arguments: 1.1.0 - is-generator-function: 1.0.9 - is-typed-array: 1.1.5 - safe-buffer: 5.2.1 - which-typed-array: 1.1.4 - dev: false - - /vm-browserify/1.1.2: - resolution: {integrity: sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ==} - dev: false - - /watchpack/2.1.1: - resolution: {integrity: sha512-Oo7LXCmc1eE1AjyuSBmtC3+Wy4HcV8PxWh2kP6fOl8yTlNS7r0K9l1ao2lrrUza7V39Y3D/BbJgY8VeSlc5JKw==} - engines: {node: '>=10.13.0'} - dependencies: - glob-to-regexp: 0.4.1 - graceful-fs: 4.2.6 - dev: false - - /webidl-conversions/4.0.2: - resolution: {integrity: sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg==} - dev: false - - /whatwg-url/7.1.0: - resolution: {integrity: sha512-WUu7Rg1DroM7oQvGWfOiAK21n74Gg+T4elXEQYkOhtyLeWiJFoOGLXPKI/9gzIie9CtwVLm8wtw6YJdKyxSjeg==} - dependencies: - lodash.sortby: 4.7.0 - tr46: 1.0.1 - webidl-conversions: 4.0.2 - dev: false - - /which-boxed-primitive/1.0.2: - resolution: {integrity: sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==} - dependencies: - is-bigint: 1.0.2 - is-boolean-object: 1.1.0 - is-number-object: 1.0.4 - is-string: 1.0.5 - is-symbol: 1.0.3 - dev: false - - /which-typed-array/1.1.4: - resolution: {integrity: sha512-49E0SpUe90cjpoc7BOJwyPHRqSAd12c10Qm2amdEZrJPCY2NDxaW01zHITrem+rnETY3dwrbH3UUrUwagfCYDA==} - engines: {node: '>= 0.4'} - dependencies: - available-typed-arrays: 1.0.2 - call-bind: 1.0.2 - es-abstract: 1.18.0 - foreach: 2.0.5 - function-bind: 1.1.1 - has-symbols: 1.0.2 - is-typed-array: 1.1.5 - dev: false - - /wrappy/1.0.2: - resolution: {integrity: sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=} - dev: false - - /xtend/4.0.2: - resolution: {integrity: sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==} - engines: {node: '>=0.4'} - dev: false - - /yocto-queue/0.1.0: - resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} - engines: {node: '>=10'} - dev: false diff --git a/src/api/demo/public/favicon.ico b/src/api/demo/public/favicon.ico deleted file mode 100644 index 4965832f2c9b0605eaa189b7c7fb11124d24e48a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 15086 zcmeHOOH5Q(7(R0cc?bh2AT>N@1PWL!LLfZKyG5c!MTHoP7_p!sBz0k$?pjS;^lmgJ zU6^i~bWuZYHL)9$wuvEKm~qo~(5=Lvx5&Hv;?X#m}i|`yaGY4gX+&b>tew;gcnRQA1kp zBbm04SRuuE{Hn+&1wk%&g;?wja_Is#1gKoFlI7f`Gt}X*-nsMO30b_J@)EFNhzd1QM zdH&qFb9PVqQOx@clvc#KAu}^GrN`q5oP(8>m4UOcp`k&xwzkTio*p?kI4BPtIwX%B zJN69cGsm=x90<;Wmh-bs>43F}ro$}Of@8)4KHndLiR$nW?*{Rl72JPUqRr3ta6e#A z%DTEbi9N}+xPtd1juj8;(CJt3r9NOgb>KTuK|z7!JB_KsFW3(pBN4oh&M&}Nb$Ee2 z$-arA6a)CdsPj`M#1DS>fqj#KF%0q?w50GN4YbmMZIoF{e1yTR=4ablqXHBB2!`wM z1M1ke9+<);|AI;f=2^F1;G6Wfpql?1d5D4rMr?#f(=hkoH)U`6Gb)#xDLjoKjp)1;Js@2Iy5yk zMXUqj+gyk1i0yLjWS|3sM2-1ECc;MAz<4t0P53%7se$$+5Ex`L5TQO_MMXXi04UDIU+3*7Ez&X|mj9cFYBXqM{M;mw_ zpw>azP*qjMyNSD4hh)XZt$gqf8f?eRSFX8VQ4Y+H3jAtvyTrXr`qHAD6`m;aYmH2zOhJC~_*AuT} zvUxC38|JYN94i(05R)dVKgUQF$}#cxV7xZ4FULqFCNX*Forhgp*yr6;DsIk=ub0Hv zpk2L{9Q&|uI^b<6@i(Y+iSxeO_n**4nRLc`P!3ld5jL=nZRw6;DEJ*1z6Pvg+eW|$lnnjO zjd|8>6l{i~UxI244CGn2kK@cJ|#ecwgSyt&HKA2)z zrOO{op^o*- - - \ No newline at end of file diff --git a/src/api/demo/schema.d.ts b/src/api/demo/schema.d.ts deleted file mode 100644 index e8a6994e73888..0000000000000 --- a/src/api/demo/schema.d.ts +++ /dev/null @@ -1,800 +0,0 @@ -import type { ByteBuffer } from "peechy"; - -type byte = number; -type float = number; -type int = number; -type alphanumeric = string; -type uint = number; -type int8 = number; -type lowp = number; -type int16 = number; -type int32 = number; -type float32 = number; -type uint16 = number; -type uint32 = number; -export enum Loader { - jsx = 1, - js = 2, - ts = 3, - tsx = 4, - css = 5, - file = 6, - json = 7, - toml = 8, - wasm = 9, -} -export const LoaderKeys = { - 1: "jsx", - jsx: "jsx", - 2: "js", - js: "js", - 3: "ts", - ts: "ts", - 4: "tsx", - tsx: "tsx", - 5: "css", - css: "css", - 6: "file", - file: "file", - 7: "json", - json: "json", - 8: "toml", - toml: "toml", - 9: "wasm", - wasm: "wasm", -}; -export enum FrameworkEntryPointType { - client = 1, - server = 2, - fallback = 3, -} -export const FrameworkEntryPointTypeKeys = { - 1: "client", - client: "client", - 2: "server", - server: "server", - 3: "fallback", - fallback: "fallback", -}; -export enum StackFrameScope { - Eval = 1, - Module = 2, - Function = 3, - Global = 4, - Wasm = 5, - Constructor = 6, -} -export const StackFrameScopeKeys = { - 1: "Eval", - Eval: "Eval", - 2: "Module", - Module: "Module", - 3: "Function", - Function: "Function", - 4: "Global", - Global: "Global", - 5: "Wasm", - Wasm: "Wasm", - 6: "Constructor", - Constructor: "Constructor", -}; -export enum FallbackStep { - ssr_disabled = 1, - create_vm = 2, - configure_router = 3, - configure_defines = 4, - resolve_entry_point = 5, - load_entry_point = 6, - eval_entry_point = 7, - fetch_event_handler = 8, -} -export const FallbackStepKeys = { - 1: "ssr_disabled", - ssr_disabled: "ssr_disabled", - 2: "create_vm", - create_vm: "create_vm", - 3: "configure_router", - configure_router: "configure_router", - 4: "configure_defines", - configure_defines: "configure_defines", - 5: "resolve_entry_point", - resolve_entry_point: "resolve_entry_point", - 6: "load_entry_point", - load_entry_point: "load_entry_point", - 7: "eval_entry_point", - eval_entry_point: "eval_entry_point", - 8: "fetch_event_handler", - fetch_event_handler: "fetch_event_handler", -}; -export enum ResolveMode { - disable = 1, - lazy = 2, - dev = 3, - bundle = 4, -} -export const ResolveModeKeys = { - 1: "disable", - disable: "disable", - 2: "lazy", - lazy: "lazy", - 3: "dev", - dev: "dev", - 4: "bundle", - bundle: "bundle", -}; -export enum Platform { - browser = 1, - node = 2, - bun = 3, - bun_macro = 4, -} -export const PlatformKeys = { - 1: "browser", - browser: "browser", - 2: "node", - node: "node", - 3: "bun", - bun: "bun", - 4: "bun_macro", - bun_macro: "bun_macro", -}; -export enum CSSInJSBehavior { - facade = 1, - facade_onimportcss = 2, - auto_onimportcss = 3, -} -export const CSSInJSBehaviorKeys = { - 1: "facade", - facade: "facade", - 2: "facade_onimportcss", - facade_onimportcss: "facade_onimportcss", - 3: "auto_onimportcss", - auto_onimportcss: "auto_onimportcss", -}; -export enum JSXRuntime { - automatic = 1, - classic = 2, -} -export const JSXRuntimeKeys = { - 1: "automatic", - automatic: "automatic", - 2: "classic", - classic: "classic", -}; -export enum ScanDependencyMode { - app = 1, - all = 2, -} -export const ScanDependencyModeKeys = { - 1: "app", - app: "app", - 2: "all", - all: "all", -}; -export enum ModuleImportType { - import = 1, - require = 2, -} -export const ModuleImportTypeKeys = { - 1: "import", - import: "import", - 2: "require", - require: "require", -}; -export enum DotEnvBehavior { - disable = 1, - prefix = 2, - load_all = 3, -} -export const DotEnvBehaviorKeys = { - 1: "disable", - disable: "disable", - 2: "prefix", - prefix: "prefix", - 3: "load_all", - load_all: "load_all", -}; -export enum ImportKind { - entry_point = 1, - stmt = 2, - require = 3, - dynamic = 4, - require_resolve = 5, - at = 6, - url = 7, - internal = 8, -} -export const ImportKindKeys = { - 1: "entry_point", - entry_point: "entry_point", - 2: "stmt", - stmt: "stmt", - 3: "require", - require: "require", - 4: "dynamic", - dynamic: "dynamic", - 5: "require_resolve", - require_resolve: "require_resolve", - 6: "at", - at: "at", - 7: "url", - url: "url", - 8: "internal", - internal: "internal", -}; -export enum TransformResponseStatus { - success = 1, - fail = 2, -} -export const TransformResponseStatusKeys = { - 1: "success", - success: "success", - 2: "fail", - fail: "fail", -}; -export enum MessageLevel { - err = 1, - warn = 2, - note = 3, - info = 4, - debug = 5, -} -export const MessageLevelKeys = { - 1: "err", - err: "err", - 2: "warn", - warn: "warn", - 3: "note", - note: "note", - 4: "info", - info: "info", - 5: "debug", - debug: "debug", -}; -export enum Reloader { - disable = 1, - live = 2, - fast_refresh = 3, -} -export const ReloaderKeys = { - 1: "disable", - disable: "disable", - 2: "live", - live: "live", - 3: "fast_refresh", - fast_refresh: "fast_refresh", -}; -export enum WebsocketMessageKind { - welcome = 1, - file_change_notification = 2, - build_success = 3, - build_fail = 4, - manifest_success = 5, - manifest_fail = 6, - resolve_file = 7, - file_change_notification_with_hint = 8, -} -export const WebsocketMessageKindKeys = { - 1: "welcome", - welcome: "welcome", - 2: "file_change_notification", - file_change_notification: "file_change_notification", - 3: "build_success", - build_success: "build_success", - 4: "build_fail", - build_fail: "build_fail", - 5: "manifest_success", - manifest_success: "manifest_success", - 6: "manifest_fail", - manifest_fail: "manifest_fail", - 7: "resolve_file", - resolve_file: "resolve_file", - 8: "file_change_notification_with_hint", - file_change_notification_with_hint: "file_change_notification_with_hint", -}; -export enum WebsocketCommandKind { - build = 1, - manifest = 2, - build_with_file_path = 3, -} -export const WebsocketCommandKindKeys = { - 1: "build", - build: "build", - 2: "manifest", - manifest: "manifest", - 3: "build_with_file_path", - build_with_file_path: "build_with_file_path", -}; -export interface StackFrame { - function_name: string; - file: string; - position: StackFramePosition; - scope: StackFrameScope; -} - -export interface StackFramePosition { - source_offset: int32; - line: int32; - line_start: int32; - line_stop: int32; - column_start: int32; - column_stop: int32; - expression_start: int32; - expression_stop: int32; -} - -export interface SourceLine { - line: int32; - text: string; -} - -export interface StackTrace { - source_lines: SourceLine[]; - frames: StackFrame[]; -} - -export interface JSException { - name?: string; - message?: string; - runtime_type?: uint16; - code?: uint8; - stack?: StackTrace; -} - -export interface Problems { - code: uint16; - name: string; - exceptions: JSException[]; - build: Log; -} - -export interface Router { - routes: StringMap; - route: int32; - params: StringMap; -} - -export interface FallbackMessageContainer { - message?: string; - router?: Router; - reason?: FallbackStep; - problems?: Problems; - cwd?: string; -} - -export interface JSX { - factory: string; - runtime: JSXRuntime; - fragment: string; - development: boolean; - import_source: string; - react_fast_refresh: boolean; -} - -export interface StringPointer { - offset: uint32; - length: uint32; -} - -export interface JavascriptBundledModule { - path: StringPointer; - code: StringPointer; - package_id: uint32; - id: uint32; - path_extname_length: byte; -} - -export interface JavascriptBundledPackage { - name: StringPointer; - version: StringPointer; - hash: uint32; - modules_offset: uint32; - modules_length: uint32; -} - -export interface JavascriptBundle { - modules: JavascriptBundledModule[]; - packages: JavascriptBundledPackage[]; - etag: Uint8Array; - generated_at: uint32; - app_package_json_dependencies_hash: Uint8Array; - import_from_name: Uint8Array; - manifest_string: Uint8Array; -} - -export interface JavascriptBundleContainer { - bundle_format_version?: uint32; - routes?: LoadedRouteConfig; - framework?: LoadedFramework; - bundle?: JavascriptBundle; - code_length?: uint32; -} - -export interface ModuleImportRecord { - kind: ModuleImportType; - path: string; - dynamic: boolean; -} - -export interface Module { - path: string; - imports: ModuleImportRecord[]; -} - -export interface StringMap { - keys: string[]; - values: string[]; -} - -export interface LoaderMap { - extensions: string[]; - loaders: Loader[]; -} - -export interface EnvConfig { - prefix?: string; - defaults?: StringMap; -} - -export interface LoadedEnvConfig { - dotenv: DotEnvBehavior; - defaults: StringMap; - prefix: string; -} - -export interface FrameworkConfig { - package?: string; - client?: FrameworkEntryPointMessage; - server?: FrameworkEntryPointMessage; - fallback?: FrameworkEntryPointMessage; - development?: boolean; - client_css_in_js?: CSSInJSBehavior; - display_name?: string; - overrideModules?: StringMap; -} - -export interface FrameworkEntryPoint { - kind: FrameworkEntryPointType; - path: string; - env: LoadedEnvConfig; -} - -export interface FrameworkEntryPointMap { - client?: FrameworkEntryPoint; - server?: FrameworkEntryPoint; - fallback?: FrameworkEntryPoint; -} - -export interface FrameworkEntryPointMessage { - path?: string; - env?: EnvConfig; -} - -export interface LoadedFramework { - package: string; - display_name: string; - development: boolean; - entry_points: FrameworkEntryPointMap; - client_css_in_js: CSSInJSBehavior; - overrideModules: StringMap; -} - -export interface LoadedRouteConfig { - dir: string; - extensions: string[]; - static_dir: string; - asset_prefix: string; -} - -export interface RouteConfig { - dir?: string[]; - extensions?: string[]; - static_dir?: string; - asset_prefix?: string; -} - -export interface TransformOptions { - jsx?: JSX; - tsconfig_override?: string; - resolve?: ResolveMode; - origin?: string; - absolute_working_dir?: string; - define?: StringMap; - preserve_symlinks?: boolean; - entry_points?: string[]; - write?: boolean; - inject?: string[]; - output_dir?: string; - external?: string[]; - loaders?: LoaderMap; - main_fields?: string[]; - platform?: Platform; - serve?: boolean; - extension_order?: string[]; - generate_node_module_bundle?: boolean; - node_modules_bundle_path?: string; - node_modules_bundle_path_server?: string; - framework?: FrameworkConfig; - router?: RouteConfig; - no_summary?: boolean; - disable_hmr?: boolean; - port?: uint16; - logLevel?: MessageLevel; -} - -export interface FileHandle { - path: string; - size: uint; - fd: uint; -} - -export interface Transform { - handle?: FileHandle; - path?: string; - contents?: Uint8Array; - loader?: Loader; - options?: TransformOptions; -} - -export interface Scan { - path?: string; - contents?: Uint8Array; - loader?: Loader; -} - -export interface ScanResult { - exports: string[]; - imports: ScannedImport[]; -} - -export interface ScannedImport { - path: string; - kind: ImportKind; -} - -export interface OutputFile { - data: Uint8Array; - path: string; -} - -export interface TransformResponse { - status: TransformResponseStatus; - files: OutputFile[]; - errors: Message[]; -} - -export interface Location { - file: string; - namespace: string; - line: int32; - column: int32; - line_text: string; - suggestion: string; - offset: uint; -} - -export interface MessageData { - text?: string; - location?: Location; -} - -export interface MessageMeta { - resolve?: string; - build?: boolean; -} - -export interface Message { - level: MessageLevel; - data: MessageData; - notes: MessageData[]; - on: MessageMeta; -} - -export interface Log { - warnings: uint32; - errors: uint32; - msgs: Message[]; -} - -export interface WebsocketMessage { - timestamp: uint32; - kind: WebsocketMessageKind; -} - -export interface WebsocketMessageWelcome { - epoch: uint32; - javascriptReloader: Reloader; - cwd: string; -} - -export interface WebsocketMessageFileChangeNotification { - id: uint32; - loader: Loader; -} - -export interface WebsocketCommand { - kind: WebsocketCommandKind; - timestamp: uint32; -} - -export interface WebsocketCommandBuild { - id: uint32; -} - -export interface WebsocketCommandManifest { - id: uint32; -} - -export interface WebsocketMessageBuildSuccess { - id: uint32; - from_timestamp: uint32; - loader: Loader; - module_path: string; - blob_length: uint32; -} - -export interface WebsocketMessageBuildFailure { - id: uint32; - from_timestamp: uint32; - loader: Loader; - module_path: string; - log: Log; -} - -export interface WebsocketCommandBuildWithFilePath { - id: uint32; - file_path: string; -} - -export interface WebsocketMessageResolveID { - id: uint32; -} - -export interface NPMRegistry { - url: string; - username: string; - password: string; - token: string; -} - -export interface NPMRegistryMap { - scopes: string[]; - registries: NPMRegistry[]; -} - -export interface BunInstall { - default_registry?: NPMRegistry; - scoped?: NPMRegistryMap; - lockfile_path?: string; - save_lockfile_path?: string; - cache_directory?: string; - dry_run?: boolean; - force?: boolean; - save_dev?: boolean; - save_optional?: boolean; - save_peer?: boolean; - save_lockfile?: boolean; - production?: boolean; - save_yarn_lockfile?: boolean; - native_bin_links?: string[]; - disable_cache?: boolean; - disable_manifest_cache?: boolean; - global_dir?: string; - global_bin_dir?: string; - frozen_lockfile?: boolean; -} - -export declare function encodeStackFrame(message: StackFrame, bb: ByteBuffer): void; -export declare function decodeStackFrame(buffer: ByteBuffer): StackFrame; -export declare function encodeStackFramePosition(message: StackFramePosition, bb: ByteBuffer): void; -export declare function decodeStackFramePosition(buffer: ByteBuffer): StackFramePosition; -export declare function encodeSourceLine(message: SourceLine, bb: ByteBuffer): void; -export declare function decodeSourceLine(buffer: ByteBuffer): SourceLine; -export declare function encodeStackTrace(message: StackTrace, bb: ByteBuffer): void; -export declare function decodeStackTrace(buffer: ByteBuffer): StackTrace; -export declare function encodeJSException(message: JSException, bb: ByteBuffer): void; -export declare function decodeJSException(buffer: ByteBuffer): JSException; -export declare function encodeProblems(message: Problems, bb: ByteBuffer): void; -export declare function decodeProblems(buffer: ByteBuffer): Problems; -export declare function encodeRouter(message: Router, bb: ByteBuffer): void; -export declare function decodeRouter(buffer: ByteBuffer): Router; -export declare function encodeFallbackMessageContainer(message: FallbackMessageContainer, bb: ByteBuffer): void; -export declare function decodeFallbackMessageContainer(buffer: ByteBuffer): FallbackMessageContainer; -export declare function encodeJSX(message: JSX, bb: ByteBuffer): void; -export declare function decodeJSX(buffer: ByteBuffer): JSX; -export declare function encodeStringPointer(message: StringPointer, bb: ByteBuffer): void; -export declare function decodeStringPointer(buffer: ByteBuffer): StringPointer; -export declare function encodeJavascriptBundledModule(message: JavascriptBundledModule, bb: ByteBuffer): void; -export declare function decodeJavascriptBundledModule(buffer: ByteBuffer): JavascriptBundledModule; -export declare function encodeJavascriptBundledPackage(message: JavascriptBundledPackage, bb: ByteBuffer): void; -export declare function decodeJavascriptBundledPackage(buffer: ByteBuffer): JavascriptBundledPackage; -export declare function encodeJavascriptBundle(message: JavascriptBundle, bb: ByteBuffer): void; -export declare function decodeJavascriptBundle(buffer: ByteBuffer): JavascriptBundle; -export declare function encodeJavascriptBundleContainer(message: JavascriptBundleContainer, bb: ByteBuffer): void; -export declare function decodeJavascriptBundleContainer(buffer: ByteBuffer): JavascriptBundleContainer; -export declare function encodeModuleImportRecord(message: ModuleImportRecord, bb: ByteBuffer): void; -export declare function decodeModuleImportRecord(buffer: ByteBuffer): ModuleImportRecord; -export declare function encodeModule(message: Module, bb: ByteBuffer): void; -export declare function decodeModule(buffer: ByteBuffer): Module; -export declare function encodeStringMap(message: StringMap, bb: ByteBuffer): void; -export declare function decodeStringMap(buffer: ByteBuffer): StringMap; -export declare function encodeLoaderMap(message: LoaderMap, bb: ByteBuffer): void; -export declare function decodeLoaderMap(buffer: ByteBuffer): LoaderMap; -export declare function encodeEnvConfig(message: EnvConfig, bb: ByteBuffer): void; -export declare function decodeEnvConfig(buffer: ByteBuffer): EnvConfig; -export declare function encodeLoadedEnvConfig(message: LoadedEnvConfig, bb: ByteBuffer): void; -export declare function decodeLoadedEnvConfig(buffer: ByteBuffer): LoadedEnvConfig; -export declare function encodeFrameworkConfig(message: FrameworkConfig, bb: ByteBuffer): void; -export declare function decodeFrameworkConfig(buffer: ByteBuffer): FrameworkConfig; -export declare function encodeFrameworkEntryPoint(message: FrameworkEntryPoint, bb: ByteBuffer): void; -export declare function decodeFrameworkEntryPoint(buffer: ByteBuffer): FrameworkEntryPoint; -export declare function encodeFrameworkEntryPointMap(message: FrameworkEntryPointMap, bb: ByteBuffer): void; -export declare function decodeFrameworkEntryPointMap(buffer: ByteBuffer): FrameworkEntryPointMap; -export declare function encodeFrameworkEntryPointMessage(message: FrameworkEntryPointMessage, bb: ByteBuffer): void; -export declare function decodeFrameworkEntryPointMessage(buffer: ByteBuffer): FrameworkEntryPointMessage; -export declare function encodeLoadedFramework(message: LoadedFramework, bb: ByteBuffer): void; -export declare function decodeLoadedFramework(buffer: ByteBuffer): LoadedFramework; -export declare function encodeLoadedRouteConfig(message: LoadedRouteConfig, bb: ByteBuffer): void; -export declare function decodeLoadedRouteConfig(buffer: ByteBuffer): LoadedRouteConfig; -export declare function encodeRouteConfig(message: RouteConfig, bb: ByteBuffer): void; -export declare function decodeRouteConfig(buffer: ByteBuffer): RouteConfig; -export declare function encodeTransformOptions(message: TransformOptions, bb: ByteBuffer): void; -export declare function decodeTransformOptions(buffer: ByteBuffer): TransformOptions; -export declare function encodeFileHandle(message: FileHandle, bb: ByteBuffer): void; -export declare function decodeFileHandle(buffer: ByteBuffer): FileHandle; -export declare function encodeTransform(message: Transform, bb: ByteBuffer): void; -export declare function decodeTransform(buffer: ByteBuffer): Transform; -export declare function encodeScan(message: Scan, bb: ByteBuffer): void; -export declare function decodeScan(buffer: ByteBuffer): Scan; -export declare function encodeScanResult(message: ScanResult, bb: ByteBuffer): void; -export declare function decodeScanResult(buffer: ByteBuffer): ScanResult; -export declare function encodeScannedImport(message: ScannedImport, bb: ByteBuffer): void; -export declare function decodeScannedImport(buffer: ByteBuffer): ScannedImport; -export declare function encodeOutputFile(message: OutputFile, bb: ByteBuffer): void; -export declare function decodeOutputFile(buffer: ByteBuffer): OutputFile; -export declare function encodeTransformResponse(message: TransformResponse, bb: ByteBuffer): void; -export declare function decodeTransformResponse(buffer: ByteBuffer): TransformResponse; -export declare function encodeLocation(message: Location, bb: ByteBuffer): void; -export declare function decodeLocation(buffer: ByteBuffer): Location; -export declare function encodeMessageData(message: MessageData, bb: ByteBuffer): void; -export declare function decodeMessageData(buffer: ByteBuffer): MessageData; -export declare function encodeMessageMeta(message: MessageMeta, bb: ByteBuffer): void; -export declare function decodeMessageMeta(buffer: ByteBuffer): MessageMeta; -export declare function encodeMessage(message: Message, bb: ByteBuffer): void; -export declare function decodeMessage(buffer: ByteBuffer): Message; -export declare function encodeLog(message: Log, bb: ByteBuffer): void; -export declare function decodeLog(buffer: ByteBuffer): Log; -export declare function encodeWebsocketMessage(message: WebsocketMessage, bb: ByteBuffer): void; -export declare function decodeWebsocketMessage(buffer: ByteBuffer): WebsocketMessage; -export declare function encodeWebsocketMessageWelcome(message: WebsocketMessageWelcome, bb: ByteBuffer): void; -export declare function decodeWebsocketMessageWelcome(buffer: ByteBuffer): WebsocketMessageWelcome; -export declare function encodeWebsocketMessageFileChangeNotification( - message: WebsocketMessageFileChangeNotification, - bb: ByteBuffer, -): void; -export declare function decodeWebsocketMessageFileChangeNotification( - buffer: ByteBuffer, -): WebsocketMessageFileChangeNotification; -export declare function encodeWebsocketCommand(message: WebsocketCommand, bb: ByteBuffer): void; -export declare function decodeWebsocketCommand(buffer: ByteBuffer): WebsocketCommand; -export declare function encodeWebsocketCommandBuild(message: WebsocketCommandBuild, bb: ByteBuffer): void; -export declare function decodeWebsocketCommandBuild(buffer: ByteBuffer): WebsocketCommandBuild; -export declare function encodeWebsocketCommandManifest(message: WebsocketCommandManifest, bb: ByteBuffer): void; -export declare function decodeWebsocketCommandManifest(buffer: ByteBuffer): WebsocketCommandManifest; -export declare function encodeWebsocketMessageBuildSuccess(message: WebsocketMessageBuildSuccess, bb: ByteBuffer): void; -export declare function decodeWebsocketMessageBuildSuccess(buffer: ByteBuffer): WebsocketMessageBuildSuccess; -export declare function encodeWebsocketMessageBuildFailure(message: WebsocketMessageBuildFailure, bb: ByteBuffer): void; -export declare function decodeWebsocketMessageBuildFailure(buffer: ByteBuffer): WebsocketMessageBuildFailure; -export declare function encodeWebsocketCommandBuildWithFilePath( - message: WebsocketCommandBuildWithFilePath, - bb: ByteBuffer, -): void; -export declare function decodeWebsocketCommandBuildWithFilePath(buffer: ByteBuffer): WebsocketCommandBuildWithFilePath; -export declare function encodeWebsocketMessageResolveID(message: WebsocketMessageResolveID, bb: ByteBuffer): void; -export declare function decodeWebsocketMessageResolveID(buffer: ByteBuffer): WebsocketMessageResolveID; -export declare function encodeNPMRegistry(message: NPMRegistry, bb: ByteBuffer): void; -export declare function decodeNPMRegistry(buffer: ByteBuffer): NPMRegistry; -export declare function encodeNPMRegistryMap(message: NPMRegistryMap, bb: ByteBuffer): void; -export declare function decodeNPMRegistryMap(buffer: ByteBuffer): NPMRegistryMap; -export declare function encodeBunInstall(message: BunInstall, bb: ByteBuffer): void; -export declare function decodeBunInstall(buffer: ByteBuffer): BunInstall; diff --git a/src/api/demo/schema.js b/src/api/demo/schema.js deleted file mode 100644 index d23d64a14d108..0000000000000 --- a/src/api/demo/schema.js +++ /dev/null @@ -1,3261 +0,0 @@ -const Loader = { - 1: 1, - 2: 2, - 3: 3, - 4: 4, - 5: 5, - 6: 6, - 7: 7, - 8: 8, - 9: 9, - jsx: 1, - js: 2, - ts: 3, - tsx: 4, - css: 5, - file: 6, - json: 7, - toml: 8, - wasm: 9, -}; -const LoaderKeys = { - 1: "jsx", - 2: "js", - 3: "ts", - 4: "tsx", - 5: "css", - 6: "file", - 7: "json", - 8: "toml", - 9: "wasm", - jsx: "jsx", - js: "js", - ts: "ts", - tsx: "tsx", - css: "css", - file: "file", - json: "json", - toml: "toml", - wasm: "wasm", -}; -const FrameworkEntryPointType = { - 1: 1, - 2: 2, - 3: 3, - client: 1, - server: 2, - fallback: 3, -}; -const FrameworkEntryPointTypeKeys = { - 1: "client", - 2: "server", - 3: "fallback", - client: "client", - server: "server", - fallback: "fallback", -}; -const StackFrameScope = { - 1: 1, - 2: 2, - 3: 3, - 4: 4, - 5: 5, - 6: 6, - Eval: 1, - Module: 2, - Function: 3, - Global: 4, - Wasm: 5, - Constructor: 6, -}; -const StackFrameScopeKeys = { - 1: "Eval", - 2: "Module", - 3: "Function", - 4: "Global", - 5: "Wasm", - 6: "Constructor", - Eval: "Eval", - Module: "Module", - Function: "Function", - Global: "Global", - Wasm: "Wasm", - Constructor: "Constructor", -}; - -function decodeStackFrame(bb) { - var result = {}; - - result["function_name"] = bb.readString(); - result["file"] = bb.readString(); - result["position"] = decodeStackFramePosition(bb); - result["scope"] = StackFrameScope[bb.readByte()]; - return result; -} - -function encodeStackFrame(message, bb) { - var value = message["function_name"]; - if (value != null) { - bb.writeString(value); - } else { - throw new Error('Missing required field "function_name"'); - } - - var value = message["file"]; - if (value != null) { - bb.writeString(value); - } else { - throw new Error('Missing required field "file"'); - } - - var value = message["position"]; - if (value != null) { - encodeStackFramePosition(value, bb); - } else { - throw new Error('Missing required field "position"'); - } - - var value = message["scope"]; - if (value != null) { - var encoded = StackFrameScope[value]; - if (encoded === void 0) throw new Error("Invalid value " + JSON.stringify(value) + ' for enum "StackFrameScope"'); - bb.writeByte(encoded); - } else { - throw new Error('Missing required field "scope"'); - } -} - -function decodeStackFramePosition(bb) { - var result = {}; - - result["source_offset"] = bb.readInt32(); - result["line"] = bb.readInt32(); - result["line_start"] = bb.readInt32(); - result["line_stop"] = bb.readInt32(); - result["column_start"] = bb.readInt32(); - result["column_stop"] = bb.readInt32(); - result["expression_start"] = bb.readInt32(); - result["expression_stop"] = bb.readInt32(); - return result; -} - -function encodeStackFramePosition(message, bb) { - var value = message["source_offset"]; - if (value != null) { - bb.writeInt32(value); - } else { - throw new Error('Missing required field "source_offset"'); - } - - var value = message["line"]; - if (value != null) { - bb.writeInt32(value); - } else { - throw new Error('Missing required field "line"'); - } - - var value = message["line_start"]; - if (value != null) { - bb.writeInt32(value); - } else { - throw new Error('Missing required field "line_start"'); - } - - var value = message["line_stop"]; - if (value != null) { - bb.writeInt32(value); - } else { - throw new Error('Missing required field "line_stop"'); - } - - var value = message["column_start"]; - if (value != null) { - bb.writeInt32(value); - } else { - throw new Error('Missing required field "column_start"'); - } - - var value = message["column_stop"]; - if (value != null) { - bb.writeInt32(value); - } else { - throw new Error('Missing required field "column_stop"'); - } - - var value = message["expression_start"]; - if (value != null) { - bb.writeInt32(value); - } else { - throw new Error('Missing required field "expression_start"'); - } - - var value = message["expression_stop"]; - if (value != null) { - bb.writeInt32(value); - } else { - throw new Error('Missing required field "expression_stop"'); - } -} - -function decodeSourceLine(bb) { - var result = {}; - - result["line"] = bb.readInt32(); - result["text"] = bb.readString(); - return result; -} - -function encodeSourceLine(message, bb) { - var value = message["line"]; - if (value != null) { - bb.writeInt32(value); - } else { - throw new Error('Missing required field "line"'); - } - - var value = message["text"]; - if (value != null) { - bb.writeString(value); - } else { - throw new Error('Missing required field "text"'); - } -} - -function decodeStackTrace(bb) { - var result = {}; - - var length = bb.readVarUint(); - var values = (result["source_lines"] = Array(length)); - for (var i = 0; i < length; i++) values[i] = decodeSourceLine(bb); - var length = bb.readVarUint(); - var values = (result["frames"] = Array(length)); - for (var i = 0; i < length; i++) values[i] = decodeStackFrame(bb); - return result; -} - -function encodeStackTrace(message, bb) { - var value = message["source_lines"]; - if (value != null) { - var values = value, - n = values.length; - bb.writeVarUint(n); - for (var i = 0; i < n; i++) { - value = values[i]; - encodeSourceLine(value, bb); - } - } else { - throw new Error('Missing required field "source_lines"'); - } - - var value = message["frames"]; - if (value != null) { - var values = value, - n = values.length; - bb.writeVarUint(n); - for (var i = 0; i < n; i++) { - value = values[i]; - encodeStackFrame(value, bb); - } - } else { - throw new Error('Missing required field "frames"'); - } -} - -function decodeJSException(bb) { - var result = {}; - - while (true) { - switch (bb.readByte()) { - case 0: - return result; - - case 1: - result["name"] = bb.readString(); - break; - - case 2: - result["message"] = bb.readString(); - break; - - case 3: - result["runtime_type"] = bb.readUint16(); - break; - - case 4: - result["code"] = bb.readByte(); - break; - - case 5: - result["stack"] = decodeStackTrace(bb); - break; - - default: - throw new Error("Attempted to parse invalid message"); - } - } -} - -function encodeJSException(message, bb) { - var value = message["name"]; - if (value != null) { - bb.writeByte(1); - bb.writeString(value); - } - - var value = message["message"]; - if (value != null) { - bb.writeByte(2); - bb.writeString(value); - } - - var value = message["runtime_type"]; - if (value != null) { - bb.writeByte(3); - bb.writeUint16(value); - } - - var value = message["code"]; - if (value != null) { - bb.writeByte(4); - bb.writeByte(value); - } - - var value = message["stack"]; - if (value != null) { - bb.writeByte(5); - encodeStackTrace(value, bb); - } - bb.writeByte(0); -} -const FallbackStep = { - 1: 1, - 2: 2, - 3: 3, - 4: 4, - 5: 5, - 6: 6, - 7: 7, - 8: 8, - ssr_disabled: 1, - create_vm: 2, - configure_router: 3, - configure_defines: 4, - resolve_entry_point: 5, - load_entry_point: 6, - eval_entry_point: 7, - fetch_event_handler: 8, -}; -const FallbackStepKeys = { - 1: "ssr_disabled", - 2: "create_vm", - 3: "configure_router", - 4: "configure_defines", - 5: "resolve_entry_point", - 6: "load_entry_point", - 7: "eval_entry_point", - 8: "fetch_event_handler", - ssr_disabled: "ssr_disabled", - create_vm: "create_vm", - configure_router: "configure_router", - configure_defines: "configure_defines", - resolve_entry_point: "resolve_entry_point", - load_entry_point: "load_entry_point", - eval_entry_point: "eval_entry_point", - fetch_event_handler: "fetch_event_handler", -}; - -function decodeProblems(bb) { - var result = {}; - - result["code"] = bb.readUint16(); - result["name"] = bb.readString(); - var length = bb.readVarUint(); - var values = (result["exceptions"] = Array(length)); - for (var i = 0; i < length; i++) values[i] = decodeJSException(bb); - result["build"] = decodeLog(bb); - return result; -} - -function encodeProblems(message, bb) { - var value = message["code"]; - if (value != null) { - bb.writeUint16(value); - } else { - throw new Error('Missing required field "code"'); - } - - var value = message["name"]; - if (value != null) { - bb.writeString(value); - } else { - throw new Error('Missing required field "name"'); - } - - var value = message["exceptions"]; - if (value != null) { - var values = value, - n = values.length; - bb.writeVarUint(n); - for (var i = 0; i < n; i++) { - value = values[i]; - encodeJSException(value, bb); - } - } else { - throw new Error('Missing required field "exceptions"'); - } - - var value = message["build"]; - if (value != null) { - encodeLog(value, bb); - } else { - throw new Error('Missing required field "build"'); - } -} - -function decodeRouter(bb) { - var result = {}; - - result["routes"] = decodeStringMap(bb); - result["route"] = bb.readInt32(); - result["params"] = decodeStringMap(bb); - return result; -} - -function encodeRouter(message, bb) { - var value = message["routes"]; - if (value != null) { - encodeStringMap(value, bb); - } else { - throw new Error('Missing required field "routes"'); - } - - var value = message["route"]; - if (value != null) { - bb.writeInt32(value); - } else { - throw new Error('Missing required field "route"'); - } - - var value = message["params"]; - if (value != null) { - encodeStringMap(value, bb); - } else { - throw new Error('Missing required field "params"'); - } -} - -function decodeFallbackMessageContainer(bb) { - var result = {}; - - while (true) { - switch (bb.readByte()) { - case 0: - return result; - - case 1: - result["message"] = bb.readString(); - break; - - case 2: - result["router"] = decodeRouter(bb); - break; - - case 3: - result["reason"] = FallbackStep[bb.readByte()]; - break; - - case 4: - result["problems"] = decodeProblems(bb); - break; - - case 5: - result["cwd"] = bb.readString(); - break; - - default: - throw new Error("Attempted to parse invalid message"); - } - } -} - -function encodeFallbackMessageContainer(message, bb) { - var value = message["message"]; - if (value != null) { - bb.writeByte(1); - bb.writeString(value); - } - - var value = message["router"]; - if (value != null) { - bb.writeByte(2); - encodeRouter(value, bb); - } - - var value = message["reason"]; - if (value != null) { - bb.writeByte(3); - var encoded = FallbackStep[value]; - if (encoded === void 0) throw new Error("Invalid value " + JSON.stringify(value) + ' for enum "FallbackStep"'); - bb.writeByte(encoded); - } - - var value = message["problems"]; - if (value != null) { - bb.writeByte(4); - encodeProblems(value, bb); - } - - var value = message["cwd"]; - if (value != null) { - bb.writeByte(5); - bb.writeString(value); - } - bb.writeByte(0); -} -const ResolveMode = { - 1: 1, - 2: 2, - 3: 3, - 4: 4, - disable: 1, - lazy: 2, - dev: 3, - bundle: 4, -}; -const ResolveModeKeys = { - 1: "disable", - 2: "lazy", - 3: "dev", - 4: "bundle", - disable: "disable", - lazy: "lazy", - dev: "dev", - bundle: "bundle", -}; -const Platform = { - 1: 1, - 2: 2, - 3: 3, - 4: 4, - browser: 1, - node: 2, - bun: 3, - bun_macro: 4, -}; -const PlatformKeys = { - 1: "browser", - 2: "node", - 3: "bun", - 4: "bun_macro", - browser: "browser", - node: "node", - bun: "bun", - bun_macro: "bun_macro", -}; -const CSSInJSBehavior = { - 1: 1, - 2: 2, - 3: 3, - facade: 1, - facade_onimportcss: 2, - auto_onimportcss: 3, -}; -const CSSInJSBehaviorKeys = { - 1: "facade", - 2: "facade_onimportcss", - 3: "auto_onimportcss", - facade: "facade", - facade_onimportcss: "facade_onimportcss", - auto_onimportcss: "auto_onimportcss", -}; -const JSXRuntime = { - 1: 1, - 2: 2, - automatic: 1, - classic: 2, -}; -const JSXRuntimeKeys = { - 1: "automatic", - 2: "classic", - automatic: "automatic", - classic: "classic", -}; - -function decodeJSX(bb) { - var result = {}; - - result["factory"] = bb.readString(); - result["runtime"] = JSXRuntime[bb.readByte()]; - result["fragment"] = bb.readString(); - result["development"] = !!bb.readByte(); - result["import_source"] = bb.readString(); - result["react_fast_refresh"] = !!bb.readByte(); - return result; -} - -function encodeJSX(message, bb) { - var value = message["factory"]; - if (value != null) { - bb.writeString(value); - } else { - throw new Error('Missing required field "factory"'); - } - - var value = message["runtime"]; - if (value != null) { - var encoded = JSXRuntime[value]; - if (encoded === void 0) throw new Error("Invalid value " + JSON.stringify(value) + ' for enum "JSXRuntime"'); - bb.writeByte(encoded); - } else { - throw new Error('Missing required field "runtime"'); - } - - var value = message["fragment"]; - if (value != null) { - bb.writeString(value); - } else { - throw new Error('Missing required field "fragment"'); - } - - var value = message["development"]; - if (value != null) { - bb.writeByte(value); - } else { - throw new Error('Missing required field "development"'); - } - - var value = message["import_source"]; - if (value != null) { - bb.writeString(value); - } else { - throw new Error('Missing required field "import_source"'); - } - - var value = message["react_fast_refresh"]; - if (value != null) { - bb.writeByte(value); - } else { - throw new Error('Missing required field "react_fast_refresh"'); - } -} - -function decodeStringPointer(bb) { - var result = {}; - - result["offset"] = bb.readUint32(); - result["length"] = bb.readUint32(); - return result; -} - -function encodeStringPointer(message, bb) { - var value = message["offset"]; - if (value != null) { - bb.writeUint32(value); - } else { - throw new Error('Missing required field "offset"'); - } - - var value = message["length"]; - if (value != null) { - bb.writeUint32(value); - } else { - throw new Error('Missing required field "length"'); - } -} - -function decodeJavascriptBundledModule(bb) { - var result = {}; - - result["path"] = decodeStringPointer(bb); - result["code"] = decodeStringPointer(bb); - result["package_id"] = bb.readUint32(); - result["id"] = bb.readUint32(); - result["path_extname_length"] = bb.readByte(); - return result; -} - -function encodeJavascriptBundledModule(message, bb) { - var value = message["path"]; - if (value != null) { - encodeStringPointer(value, bb); - } else { - throw new Error('Missing required field "path"'); - } - - var value = message["code"]; - if (value != null) { - encodeStringPointer(value, bb); - } else { - throw new Error('Missing required field "code"'); - } - - var value = message["package_id"]; - if (value != null) { - bb.writeUint32(value); - } else { - throw new Error('Missing required field "package_id"'); - } - - var value = message["id"]; - if (value != null) { - bb.writeUint32(value); - } else { - throw new Error('Missing required field "id"'); - } - - var value = message["path_extname_length"]; - if (value != null) { - bb.writeByte(value); - } else { - throw new Error('Missing required field "path_extname_length"'); - } -} - -function decodeJavascriptBundledPackage(bb) { - var result = {}; - - result["name"] = decodeStringPointer(bb); - result["version"] = decodeStringPointer(bb); - result["hash"] = bb.readUint32(); - result["modules_offset"] = bb.readUint32(); - result["modules_length"] = bb.readUint32(); - return result; -} - -function encodeJavascriptBundledPackage(message, bb) { - var value = message["name"]; - if (value != null) { - encodeStringPointer(value, bb); - } else { - throw new Error('Missing required field "name"'); - } - - var value = message["version"]; - if (value != null) { - encodeStringPointer(value, bb); - } else { - throw new Error('Missing required field "version"'); - } - - var value = message["hash"]; - if (value != null) { - bb.writeUint32(value); - } else { - throw new Error('Missing required field "hash"'); - } - - var value = message["modules_offset"]; - if (value != null) { - bb.writeUint32(value); - } else { - throw new Error('Missing required field "modules_offset"'); - } - - var value = message["modules_length"]; - if (value != null) { - bb.writeUint32(value); - } else { - throw new Error('Missing required field "modules_length"'); - } -} - -function decodeJavascriptBundle(bb) { - var result = {}; - - var length = bb.readVarUint(); - var values = (result["modules"] = Array(length)); - for (var i = 0; i < length; i++) values[i] = decodeJavascriptBundledModule(bb); - var length = bb.readVarUint(); - var values = (result["packages"] = Array(length)); - for (var i = 0; i < length; i++) values[i] = decodeJavascriptBundledPackage(bb); - result["etag"] = bb.readByteArray(); - result["generated_at"] = bb.readUint32(); - result["app_package_json_dependencies_hash"] = bb.readByteArray(); - result["import_from_name"] = bb.readByteArray(); - result["manifest_string"] = bb.readByteArray(); - return result; -} - -function encodeJavascriptBundle(message, bb) { - var value = message["modules"]; - if (value != null) { - var values = value, - n = values.length; - bb.writeVarUint(n); - for (var i = 0; i < n; i++) { - value = values[i]; - encodeJavascriptBundledModule(value, bb); - } - } else { - throw new Error('Missing required field "modules"'); - } - - var value = message["packages"]; - if (value != null) { - var values = value, - n = values.length; - bb.writeVarUint(n); - for (var i = 0; i < n; i++) { - value = values[i]; - encodeJavascriptBundledPackage(value, bb); - } - } else { - throw new Error('Missing required field "packages"'); - } - - var value = message["etag"]; - if (value != null) { - bb.writeByteArray(value); - } else { - throw new Error('Missing required field "etag"'); - } - - var value = message["generated_at"]; - if (value != null) { - bb.writeUint32(value); - } else { - throw new Error('Missing required field "generated_at"'); - } - - var value = message["app_package_json_dependencies_hash"]; - if (value != null) { - bb.writeByteArray(value); - } else { - throw new Error('Missing required field "app_package_json_dependencies_hash"'); - } - - var value = message["import_from_name"]; - if (value != null) { - bb.writeByteArray(value); - } else { - throw new Error('Missing required field "import_from_name"'); - } - - var value = message["manifest_string"]; - if (value != null) { - bb.writeByteArray(value); - } else { - throw new Error('Missing required field "manifest_string"'); - } -} - -function decodeJavascriptBundleContainer(bb) { - var result = {}; - - while (true) { - switch (bb.readByte()) { - case 0: - return result; - - case 1: - result["bundle_format_version"] = bb.readUint32(); - break; - - case 3: - result["routes"] = decodeLoadedRouteConfig(bb); - break; - - case 2: - result["framework"] = decodeLoadedFramework(bb); - break; - - case 4: - result["bundle"] = decodeJavascriptBundle(bb); - break; - - case 5: - result["code_length"] = bb.readUint32(); - break; - - default: - throw new Error("Attempted to parse invalid message"); - } - } -} - -function encodeJavascriptBundleContainer(message, bb) { - var value = message["bundle_format_version"]; - if (value != null) { - bb.writeByte(1); - bb.writeUint32(value); - } - - var value = message["routes"]; - if (value != null) { - bb.writeByte(3); - encodeLoadedRouteConfig(value, bb); - } - - var value = message["framework"]; - if (value != null) { - bb.writeByte(2); - encodeLoadedFramework(value, bb); - } - - var value = message["bundle"]; - if (value != null) { - bb.writeByte(4); - encodeJavascriptBundle(value, bb); - } - - var value = message["code_length"]; - if (value != null) { - bb.writeByte(5); - bb.writeUint32(value); - } - bb.writeByte(0); -} -const ScanDependencyMode = { - 1: 1, - 2: 2, - app: 1, - all: 2, -}; -const ScanDependencyModeKeys = { - 1: "app", - 2: "all", - app: "app", - all: "all", -}; -const ModuleImportType = { - 1: 1, - 2: 2, - import: 1, - require: 2, -}; -const ModuleImportTypeKeys = { - 1: "import", - 2: "require", - import: "import", - require: "require", -}; - -function decodeModuleImportRecord(bb) { - var result = {}; - - result["kind"] = ModuleImportType[bb.readByte()]; - result["path"] = bb.readString(); - result["dynamic"] = !!bb.readByte(); - return result; -} - -function encodeModuleImportRecord(message, bb) { - var value = message["kind"]; - if (value != null) { - var encoded = ModuleImportType[value]; - if (encoded === void 0) throw new Error("Invalid value " + JSON.stringify(value) + ' for enum "ModuleImportType"'); - bb.writeByte(encoded); - } else { - throw new Error('Missing required field "kind"'); - } - - var value = message["path"]; - if (value != null) { - bb.writeString(value); - } else { - throw new Error('Missing required field "path"'); - } - - var value = message["dynamic"]; - if (value != null) { - bb.writeByte(value); - } else { - throw new Error('Missing required field "dynamic"'); - } -} - -function decodeModule(bb) { - var result = {}; - - result["path"] = bb.readString(); - var length = bb.readVarUint(); - var values = (result["imports"] = Array(length)); - for (var i = 0; i < length; i++) values[i] = decodeModuleImportRecord(bb); - return result; -} - -function encodeModule(message, bb) { - var value = message["path"]; - if (value != null) { - bb.writeString(value); - } else { - throw new Error('Missing required field "path"'); - } - - var value = message["imports"]; - if (value != null) { - var values = value, - n = values.length; - bb.writeVarUint(n); - for (var i = 0; i < n; i++) { - value = values[i]; - encodeModuleImportRecord(value, bb); - } - } else { - throw new Error('Missing required field "imports"'); - } -} - -function decodeStringMap(bb) { - var result = {}; - - var length = bb.readVarUint(); - var values = (result["keys"] = Array(length)); - for (var i = 0; i < length; i++) values[i] = bb.readString(); - var length = bb.readVarUint(); - var values = (result["values"] = Array(length)); - for (var i = 0; i < length; i++) values[i] = bb.readString(); - return result; -} - -function encodeStringMap(message, bb) { - var value = message["keys"]; - if (value != null) { - var values = value, - n = values.length; - bb.writeVarUint(n); - for (var i = 0; i < n; i++) { - value = values[i]; - bb.writeString(value); - } - } else { - throw new Error('Missing required field "keys"'); - } - - var value = message["values"]; - if (value != null) { - var values = value, - n = values.length; - bb.writeVarUint(n); - for (var i = 0; i < n; i++) { - value = values[i]; - bb.writeString(value); - } - } else { - throw new Error('Missing required field "values"'); - } -} - -function decodeLoaderMap(bb) { - var result = {}; - - var length = bb.readVarUint(); - var values = (result["extensions"] = Array(length)); - for (var i = 0; i < length; i++) values[i] = bb.readString(); - var length = bb.readVarUint(); - var values = (result["loaders"] = Array(length)); - for (var i = 0; i < length; i++) values[i] = Loader[bb.readByte()]; - return result; -} - -function encodeLoaderMap(message, bb) { - var value = message["extensions"]; - if (value != null) { - var values = value, - n = values.length; - bb.writeVarUint(n); - for (var i = 0; i < n; i++) { - value = values[i]; - bb.writeString(value); - } - } else { - throw new Error('Missing required field "extensions"'); - } - - var value = message["loaders"]; - if (value != null) { - var values = value, - n = values.length; - bb.writeVarUint(n); - for (var i = 0; i < n; i++) { - value = values[i]; - var encoded = Loader[value]; - if (encoded === void 0) throw new Error("Invalid value " + JSON.stringify(value) + ' for enum "Loader"'); - bb.writeByte(encoded); - } - } else { - throw new Error('Missing required field "loaders"'); - } -} -const DotEnvBehavior = { - 1: 1, - 2: 2, - 3: 3, - disable: 1, - prefix: 2, - load_all: 3, -}; -const DotEnvBehaviorKeys = { - 1: "disable", - 2: "prefix", - 3: "load_all", - disable: "disable", - prefix: "prefix", - load_all: "load_all", -}; - -function decodeEnvConfig(bb) { - var result = {}; - - while (true) { - switch (bb.readByte()) { - case 0: - return result; - - case 1: - result["prefix"] = bb.readString(); - break; - - case 2: - result["defaults"] = decodeStringMap(bb); - break; - - default: - throw new Error("Attempted to parse invalid message"); - } - } -} - -function encodeEnvConfig(message, bb) { - var value = message["prefix"]; - if (value != null) { - bb.writeByte(1); - bb.writeString(value); - } - - var value = message["defaults"]; - if (value != null) { - bb.writeByte(2); - encodeStringMap(value, bb); - } - bb.writeByte(0); -} - -function decodeLoadedEnvConfig(bb) { - var result = {}; - - result["dotenv"] = DotEnvBehavior[bb.readVarUint()]; - result["defaults"] = decodeStringMap(bb); - result["prefix"] = bb.readString(); - return result; -} - -function encodeLoadedEnvConfig(message, bb) { - var value = message["dotenv"]; - if (value != null) { - var encoded = DotEnvBehavior[value]; - if (encoded === void 0) throw new Error("Invalid value " + JSON.stringify(value) + ' for enum "DotEnvBehavior"'); - bb.writeVarUint(encoded); - } else { - throw new Error('Missing required field "dotenv"'); - } - - var value = message["defaults"]; - if (value != null) { - encodeStringMap(value, bb); - } else { - throw new Error('Missing required field "defaults"'); - } - - var value = message["prefix"]; - if (value != null) { - bb.writeString(value); - } else { - throw new Error('Missing required field "prefix"'); - } -} - -function decodeFrameworkConfig(bb) { - var result = {}; - - while (true) { - switch (bb.readByte()) { - case 0: - return result; - - case 1: - result["package"] = bb.readString(); - break; - - case 2: - result["client"] = decodeFrameworkEntryPointMessage(bb); - break; - - case 3: - result["server"] = decodeFrameworkEntryPointMessage(bb); - break; - - case 4: - result["fallback"] = decodeFrameworkEntryPointMessage(bb); - break; - - case 5: - result["development"] = !!bb.readByte(); - break; - - case 6: - result["client_css_in_js"] = CSSInJSBehavior[bb.readByte()]; - break; - - case 7: - result["display_name"] = bb.readString(); - break; - - case 8: - result["overrideModules"] = decodeStringMap(bb); - break; - - default: - throw new Error("Attempted to parse invalid message"); - } - } -} - -function encodeFrameworkConfig(message, bb) { - var value = message["package"]; - if (value != null) { - bb.writeByte(1); - bb.writeString(value); - } - - var value = message["client"]; - if (value != null) { - bb.writeByte(2); - encodeFrameworkEntryPointMessage(value, bb); - } - - var value = message["server"]; - if (value != null) { - bb.writeByte(3); - encodeFrameworkEntryPointMessage(value, bb); - } - - var value = message["fallback"]; - if (value != null) { - bb.writeByte(4); - encodeFrameworkEntryPointMessage(value, bb); - } - - var value = message["development"]; - if (value != null) { - bb.writeByte(5); - bb.writeByte(value); - } - - var value = message["client_css_in_js"]; - if (value != null) { - bb.writeByte(6); - var encoded = CSSInJSBehavior[value]; - if (encoded === void 0) throw new Error("Invalid value " + JSON.stringify(value) + ' for enum "CSSInJSBehavior"'); - bb.writeByte(encoded); - } - - var value = message["display_name"]; - if (value != null) { - bb.writeByte(7); - bb.writeString(value); - } - - var value = message["overrideModules"]; - if (value != null) { - bb.writeByte(8); - encodeStringMap(value, bb); - } - bb.writeByte(0); -} - -function decodeFrameworkEntryPoint(bb) { - var result = {}; - - result["kind"] = FrameworkEntryPointType[bb.readByte()]; - result["path"] = bb.readString(); - result["env"] = decodeLoadedEnvConfig(bb); - return result; -} - -function encodeFrameworkEntryPoint(message, bb) { - var value = message["kind"]; - if (value != null) { - var encoded = FrameworkEntryPointType[value]; - if (encoded === void 0) - throw new Error("Invalid value " + JSON.stringify(value) + ' for enum "FrameworkEntryPointType"'); - bb.writeByte(encoded); - } else { - throw new Error('Missing required field "kind"'); - } - - var value = message["path"]; - if (value != null) { - bb.writeString(value); - } else { - throw new Error('Missing required field "path"'); - } - - var value = message["env"]; - if (value != null) { - encodeLoadedEnvConfig(value, bb); - } else { - throw new Error('Missing required field "env"'); - } -} - -function decodeFrameworkEntryPointMap(bb) { - var result = {}; - - while (true) { - switch (bb.readByte()) { - case 0: - return result; - - case 1: - result["client"] = decodeFrameworkEntryPoint(bb); - break; - - case 2: - result["server"] = decodeFrameworkEntryPoint(bb); - break; - - case 3: - result["fallback"] = decodeFrameworkEntryPoint(bb); - break; - - default: - throw new Error("Attempted to parse invalid message"); - } - } -} - -function encodeFrameworkEntryPointMap(message, bb) { - var value = message["client"]; - if (value != null) { - bb.writeByte(1); - encodeFrameworkEntryPoint(value, bb); - } - - var value = message["server"]; - if (value != null) { - bb.writeByte(2); - encodeFrameworkEntryPoint(value, bb); - } - - var value = message["fallback"]; - if (value != null) { - bb.writeByte(3); - encodeFrameworkEntryPoint(value, bb); - } - bb.writeByte(0); -} - -function decodeFrameworkEntryPointMessage(bb) { - var result = {}; - - while (true) { - switch (bb.readByte()) { - case 0: - return result; - - case 1: - result["path"] = bb.readString(); - break; - - case 2: - result["env"] = decodeEnvConfig(bb); - break; - - default: - throw new Error("Attempted to parse invalid message"); - } - } -} - -function encodeFrameworkEntryPointMessage(message, bb) { - var value = message["path"]; - if (value != null) { - bb.writeByte(1); - bb.writeString(value); - } - - var value = message["env"]; - if (value != null) { - bb.writeByte(2); - encodeEnvConfig(value, bb); - } - bb.writeByte(0); -} - -function decodeLoadedFramework(bb) { - var result = {}; - - result["package"] = bb.readString(); - result["display_name"] = bb.readString(); - result["development"] = !!bb.readByte(); - result["entry_points"] = decodeFrameworkEntryPointMap(bb); - result["client_css_in_js"] = CSSInJSBehavior[bb.readByte()]; - result["overrideModules"] = decodeStringMap(bb); - return result; -} - -function encodeLoadedFramework(message, bb) { - var value = message["package"]; - if (value != null) { - bb.writeString(value); - } else { - throw new Error('Missing required field "package"'); - } - - var value = message["display_name"]; - if (value != null) { - bb.writeString(value); - } else { - throw new Error('Missing required field "display_name"'); - } - - var value = message["development"]; - if (value != null) { - bb.writeByte(value); - } else { - throw new Error('Missing required field "development"'); - } - - var value = message["entry_points"]; - if (value != null) { - encodeFrameworkEntryPointMap(value, bb); - } else { - throw new Error('Missing required field "entry_points"'); - } - - var value = message["client_css_in_js"]; - if (value != null) { - var encoded = CSSInJSBehavior[value]; - if (encoded === void 0) throw new Error("Invalid value " + JSON.stringify(value) + ' for enum "CSSInJSBehavior"'); - bb.writeByte(encoded); - } else { - throw new Error('Missing required field "client_css_in_js"'); - } - - var value = message["overrideModules"]; - if (value != null) { - encodeStringMap(value, bb); - } else { - throw new Error('Missing required field "overrideModules"'); - } -} - -function decodeLoadedRouteConfig(bb) { - var result = {}; - - result["dir"] = bb.readString(); - var length = bb.readVarUint(); - var values = (result["extensions"] = Array(length)); - for (var i = 0; i < length; i++) values[i] = bb.readString(); - result["static_dir"] = bb.readString(); - result["asset_prefix"] = bb.readString(); - return result; -} - -function encodeLoadedRouteConfig(message, bb) { - var value = message["dir"]; - if (value != null) { - bb.writeString(value); - } else { - throw new Error('Missing required field "dir"'); - } - - var value = message["extensions"]; - if (value != null) { - var values = value, - n = values.length; - bb.writeVarUint(n); - for (var i = 0; i < n; i++) { - value = values[i]; - bb.writeString(value); - } - } else { - throw new Error('Missing required field "extensions"'); - } - - var value = message["static_dir"]; - if (value != null) { - bb.writeString(value); - } else { - throw new Error('Missing required field "static_dir"'); - } - - var value = message["asset_prefix"]; - if (value != null) { - bb.writeString(value); - } else { - throw new Error('Missing required field "asset_prefix"'); - } -} - -function decodeRouteConfig(bb) { - var result = {}; - - while (true) { - switch (bb.readByte()) { - case 0: - return result; - - case 1: - var length = bb.readVarUint(); - var values = (result["dir"] = Array(length)); - for (var i = 0; i < length; i++) values[i] = bb.readString(); - break; - - case 2: - var length = bb.readVarUint(); - var values = (result["extensions"] = Array(length)); - for (var i = 0; i < length; i++) values[i] = bb.readString(); - break; - - case 3: - result["static_dir"] = bb.readString(); - break; - - case 4: - result["asset_prefix"] = bb.readString(); - break; - - default: - throw new Error("Attempted to parse invalid message"); - } - } -} - -function encodeRouteConfig(message, bb) { - var value = message["dir"]; - if (value != null) { - bb.writeByte(1); - var values = value, - n = values.length; - bb.writeVarUint(n); - for (var i = 0; i < n; i++) { - value = values[i]; - bb.writeString(value); - } - } - - var value = message["extensions"]; - if (value != null) { - bb.writeByte(2); - var values = value, - n = values.length; - bb.writeVarUint(n); - for (var i = 0; i < n; i++) { - value = values[i]; - bb.writeString(value); - } - } - - var value = message["static_dir"]; - if (value != null) { - bb.writeByte(3); - bb.writeString(value); - } - - var value = message["asset_prefix"]; - if (value != null) { - bb.writeByte(4); - bb.writeString(value); - } - bb.writeByte(0); -} - -function decodeTransformOptions(bb) { - var result = {}; - - while (true) { - switch (bb.readByte()) { - case 0: - return result; - - case 1: - result["jsx"] = decodeJSX(bb); - break; - - case 2: - result["tsconfig_override"] = bb.readString(); - break; - - case 3: - result["resolve"] = ResolveMode[bb.readByte()]; - break; - - case 4: - result["origin"] = bb.readString(); - break; - - case 5: - result["absolute_working_dir"] = bb.readString(); - break; - - case 6: - result["define"] = decodeStringMap(bb); - break; - - case 7: - result["preserve_symlinks"] = !!bb.readByte(); - break; - - case 8: - var length = bb.readVarUint(); - var values = (result["entry_points"] = Array(length)); - for (var i = 0; i < length; i++) values[i] = bb.readString(); - break; - - case 9: - result["write"] = !!bb.readByte(); - break; - - case 10: - var length = bb.readVarUint(); - var values = (result["inject"] = Array(length)); - for (var i = 0; i < length; i++) values[i] = bb.readString(); - break; - - case 11: - result["output_dir"] = bb.readString(); - break; - - case 12: - var length = bb.readVarUint(); - var values = (result["external"] = Array(length)); - for (var i = 0; i < length; i++) values[i] = bb.readString(); - break; - - case 13: - result["loaders"] = decodeLoaderMap(bb); - break; - - case 14: - var length = bb.readVarUint(); - var values = (result["main_fields"] = Array(length)); - for (var i = 0; i < length; i++) values[i] = bb.readString(); - break; - - case 15: - result["platform"] = Platform[bb.readByte()]; - break; - - case 16: - result["serve"] = !!bb.readByte(); - break; - - case 17: - var length = bb.readVarUint(); - var values = (result["extension_order"] = Array(length)); - for (var i = 0; i < length; i++) values[i] = bb.readString(); - break; - - case 18: - result["generate_node_module_bundle"] = !!bb.readByte(); - break; - - case 19: - result["node_modules_bundle_path"] = bb.readString(); - break; - - case 20: - result["node_modules_bundle_path_server"] = bb.readString(); - break; - - case 21: - result["framework"] = decodeFrameworkConfig(bb); - break; - - case 22: - result["router"] = decodeRouteConfig(bb); - break; - - case 23: - result["no_summary"] = !!bb.readByte(); - break; - - case 24: - result["disable_hmr"] = !!bb.readByte(); - break; - - case 25: - result["port"] = bb.readUint16(); - break; - - case 26: - result["logLevel"] = MessageLevel[bb.readVarUint()]; - break; - - default: - throw new Error("Attempted to parse invalid message"); - } - } -} - -function encodeTransformOptions(message, bb) { - var value = message["jsx"]; - if (value != null) { - bb.writeByte(1); - encodeJSX(value, bb); - } - - var value = message["tsconfig_override"]; - if (value != null) { - bb.writeByte(2); - bb.writeString(value); - } - - var value = message["resolve"]; - if (value != null) { - bb.writeByte(3); - var encoded = ResolveMode[value]; - if (encoded === void 0) throw new Error("Invalid value " + JSON.stringify(value) + ' for enum "ResolveMode"'); - bb.writeByte(encoded); - } - - var value = message["origin"]; - if (value != null) { - bb.writeByte(4); - bb.writeString(value); - } - - var value = message["absolute_working_dir"]; - if (value != null) { - bb.writeByte(5); - bb.writeString(value); - } - - var value = message["define"]; - if (value != null) { - bb.writeByte(6); - encodeStringMap(value, bb); - } - - var value = message["preserve_symlinks"]; - if (value != null) { - bb.writeByte(7); - bb.writeByte(value); - } - - var value = message["entry_points"]; - if (value != null) { - bb.writeByte(8); - var values = value, - n = values.length; - bb.writeVarUint(n); - for (var i = 0; i < n; i++) { - value = values[i]; - bb.writeString(value); - } - } - - var value = message["write"]; - if (value != null) { - bb.writeByte(9); - bb.writeByte(value); - } - - var value = message["inject"]; - if (value != null) { - bb.writeByte(10); - var values = value, - n = values.length; - bb.writeVarUint(n); - for (var i = 0; i < n; i++) { - value = values[i]; - bb.writeString(value); - } - } - - var value = message["output_dir"]; - if (value != null) { - bb.writeByte(11); - bb.writeString(value); - } - - var value = message["external"]; - if (value != null) { - bb.writeByte(12); - var values = value, - n = values.length; - bb.writeVarUint(n); - for (var i = 0; i < n; i++) { - value = values[i]; - bb.writeString(value); - } - } - - var value = message["loaders"]; - if (value != null) { - bb.writeByte(13); - encodeLoaderMap(value, bb); - } - - var value = message["main_fields"]; - if (value != null) { - bb.writeByte(14); - var values = value, - n = values.length; - bb.writeVarUint(n); - for (var i = 0; i < n; i++) { - value = values[i]; - bb.writeString(value); - } - } - - var value = message["platform"]; - if (value != null) { - bb.writeByte(15); - var encoded = Platform[value]; - if (encoded === void 0) throw new Error("Invalid value " + JSON.stringify(value) + ' for enum "Platform"'); - bb.writeByte(encoded); - } - - var value = message["serve"]; - if (value != null) { - bb.writeByte(16); - bb.writeByte(value); - } - - var value = message["extension_order"]; - if (value != null) { - bb.writeByte(17); - var values = value, - n = values.length; - bb.writeVarUint(n); - for (var i = 0; i < n; i++) { - value = values[i]; - bb.writeString(value); - } - } - - var value = message["generate_node_module_bundle"]; - if (value != null) { - bb.writeByte(18); - bb.writeByte(value); - } - - var value = message["node_modules_bundle_path"]; - if (value != null) { - bb.writeByte(19); - bb.writeString(value); - } - - var value = message["node_modules_bundle_path_server"]; - if (value != null) { - bb.writeByte(20); - bb.writeString(value); - } - - var value = message["framework"]; - if (value != null) { - bb.writeByte(21); - encodeFrameworkConfig(value, bb); - } - - var value = message["router"]; - if (value != null) { - bb.writeByte(22); - encodeRouteConfig(value, bb); - } - - var value = message["no_summary"]; - if (value != null) { - bb.writeByte(23); - bb.writeByte(value); - } - - var value = message["disable_hmr"]; - if (value != null) { - bb.writeByte(24); - bb.writeByte(value); - } - - var value = message["port"]; - if (value != null) { - bb.writeByte(25); - bb.writeUint16(value); - } - - var value = message["logLevel"]; - if (value != null) { - bb.writeByte(26); - var encoded = MessageLevel[value]; - if (encoded === void 0) throw new Error("Invalid value " + JSON.stringify(value) + ' for enum "MessageLevel"'); - bb.writeVarUint(encoded); - } - bb.writeByte(0); -} - -function decodeFileHandle(bb) { - var result = {}; - - result["path"] = bb.readString(); - result["size"] = bb.readVarUint(); - result["fd"] = bb.readVarUint(); - return result; -} - -function encodeFileHandle(message, bb) { - var value = message["path"]; - if (value != null) { - bb.writeString(value); - } else { - throw new Error('Missing required field "path"'); - } - - var value = message["size"]; - if (value != null) { - bb.writeVarUint(value); - } else { - throw new Error('Missing required field "size"'); - } - - var value = message["fd"]; - if (value != null) { - bb.writeVarUint(value); - } else { - throw new Error('Missing required field "fd"'); - } -} - -function decodeTransform(bb) { - var result = {}; - - while (true) { - switch (bb.readByte()) { - case 0: - return result; - - case 1: - result["handle"] = decodeFileHandle(bb); - break; - - case 2: - result["path"] = bb.readString(); - break; - - case 3: - result["contents"] = bb.readByteArray(); - break; - - case 4: - result["loader"] = Loader[bb.readByte()]; - break; - - case 5: - result["options"] = decodeTransformOptions(bb); - break; - - default: - throw new Error("Attempted to parse invalid message"); - } - } -} - -function encodeTransform(message, bb) { - var value = message["handle"]; - if (value != null) { - bb.writeByte(1); - encodeFileHandle(value, bb); - } - - var value = message["path"]; - if (value != null) { - bb.writeByte(2); - bb.writeString(value); - } - - var value = message["contents"]; - if (value != null) { - bb.writeByte(3); - bb.writeByteArray(value); - } - - var value = message["loader"]; - if (value != null) { - bb.writeByte(4); - var encoded = Loader[value]; - if (encoded === void 0) throw new Error("Invalid value " + JSON.stringify(value) + ' for enum "Loader"'); - bb.writeByte(encoded); - } - - var value = message["options"]; - if (value != null) { - bb.writeByte(5); - encodeTransformOptions(value, bb); - } - bb.writeByte(0); -} - -function decodeScan(bb) { - var result = {}; - - while (true) { - switch (bb.readByte()) { - case 0: - return result; - - case 1: - result["path"] = bb.readString(); - break; - - case 2: - result["contents"] = bb.readByteArray(); - break; - - case 3: - result["loader"] = Loader[bb.readByte()]; - break; - - default: - throw new Error("Attempted to parse invalid message"); - } - } -} - -function encodeScan(message, bb) { - var value = message["path"]; - if (value != null) { - bb.writeByte(1); - bb.writeString(value); - } - - var value = message["contents"]; - if (value != null) { - bb.writeByte(2); - bb.writeByteArray(value); - } - - var value = message["loader"]; - if (value != null) { - bb.writeByte(3); - var encoded = Loader[value]; - if (encoded === void 0) throw new Error("Invalid value " + JSON.stringify(value) + ' for enum "Loader"'); - bb.writeByte(encoded); - } - bb.writeByte(0); -} - -function decodeScanResult(bb) { - var result = {}; - - var length = bb.readVarUint(); - var values = (result["exports"] = Array(length)); - for (var i = 0; i < length; i++) values[i] = bb.readString(); - var length = bb.readVarUint(); - var values = (result["imports"] = Array(length)); - for (var i = 0; i < length; i++) values[i] = decodeScannedImport(bb); - return result; -} - -function encodeScanResult(message, bb) { - var value = message["exports"]; - if (value != null) { - var values = value, - n = values.length; - bb.writeVarUint(n); - for (var i = 0; i < n; i++) { - value = values[i]; - bb.writeString(value); - } - } else { - throw new Error('Missing required field "exports"'); - } - - var value = message["imports"]; - if (value != null) { - var values = value, - n = values.length; - bb.writeVarUint(n); - for (var i = 0; i < n; i++) { - value = values[i]; - encodeScannedImport(value, bb); - } - } else { - throw new Error('Missing required field "imports"'); - } -} - -function decodeScannedImport(bb) { - var result = {}; - - result["path"] = bb.readString(); - result["kind"] = ImportKind[bb.readByte()]; - return result; -} - -function encodeScannedImport(message, bb) { - var value = message["path"]; - if (value != null) { - bb.writeString(value); - } else { - throw new Error('Missing required field "path"'); - } - - var value = message["kind"]; - if (value != null) { - var encoded = ImportKind[value]; - if (encoded === void 0) throw new Error("Invalid value " + JSON.stringify(value) + ' for enum "ImportKind"'); - bb.writeByte(encoded); - } else { - throw new Error('Missing required field "kind"'); - } -} -const ImportKind = { - 1: 1, - 2: 2, - 3: 3, - 4: 4, - 5: 5, - 6: 6, - 7: 7, - 8: 8, - entry_point: 1, - stmt: 2, - require: 3, - dynamic: 4, - require_resolve: 5, - at: 6, - url: 7, - internal: 8, -}; -const ImportKindKeys = { - 1: "entry_point", - 2: "stmt", - 3: "require", - 4: "dynamic", - 5: "require_resolve", - 6: "at", - 7: "url", - 8: "internal", - entry_point: "entry_point", - stmt: "stmt", - require: "require", - dynamic: "dynamic", - require_resolve: "require_resolve", - at: "at", - url: "url", - internal: "internal", -}; -const TransformResponseStatus = { - 1: 1, - 2: 2, - success: 1, - fail: 2, -}; -const TransformResponseStatusKeys = { - 1: "success", - 2: "fail", - success: "success", - fail: "fail", -}; - -function decodeOutputFile(bb) { - var result = {}; - - result["data"] = bb.readByteArray(); - result["path"] = bb.readString(); - return result; -} - -function encodeOutputFile(message, bb) { - var value = message["data"]; - if (value != null) { - bb.writeByteArray(value); - } else { - throw new Error('Missing required field "data"'); - } - - var value = message["path"]; - if (value != null) { - bb.writeString(value); - } else { - throw new Error('Missing required field "path"'); - } -} - -function decodeTransformResponse(bb) { - var result = {}; - - result["status"] = TransformResponseStatus[bb.readVarUint()]; - var length = bb.readVarUint(); - var values = (result["files"] = Array(length)); - for (var i = 0; i < length; i++) values[i] = decodeOutputFile(bb); - var length = bb.readVarUint(); - var values = (result["errors"] = Array(length)); - for (var i = 0; i < length; i++) values[i] = decodeMessage(bb); - return result; -} - -function encodeTransformResponse(message, bb) { - var value = message["status"]; - if (value != null) { - var encoded = TransformResponseStatus[value]; - if (encoded === void 0) - throw new Error("Invalid value " + JSON.stringify(value) + ' for enum "TransformResponseStatus"'); - bb.writeVarUint(encoded); - } else { - throw new Error('Missing required field "status"'); - } - - var value = message["files"]; - if (value != null) { - var values = value, - n = values.length; - bb.writeVarUint(n); - for (var i = 0; i < n; i++) { - value = values[i]; - encodeOutputFile(value, bb); - } - } else { - throw new Error('Missing required field "files"'); - } - - var value = message["errors"]; - if (value != null) { - var values = value, - n = values.length; - bb.writeVarUint(n); - for (var i = 0; i < n; i++) { - value = values[i]; - encodeMessage(value, bb); - } - } else { - throw new Error('Missing required field "errors"'); - } -} -const MessageLevel = { - 1: 1, - 2: 2, - 3: 3, - 4: 4, - 5: 5, - err: 1, - warn: 2, - note: 3, - info: 4, - debug: 5, -}; -const MessageLevelKeys = { - 1: "err", - 2: "warn", - 3: "note", - 4: "info", - 5: "debug", - err: "err", - warn: "warn", - note: "note", - info: "info", - debug: "debug", -}; - -function decodeLocation(bb) { - var result = {}; - - result["file"] = bb.readString(); - result["namespace"] = bb.readString(); - result["line"] = bb.readInt32(); - result["column"] = bb.readInt32(); - result["line_text"] = bb.readString(); - result["suggestion"] = bb.readString(); - result["offset"] = bb.readVarUint(); - return result; -} - -function encodeLocation(message, bb) { - var value = message["file"]; - if (value != null) { - bb.writeString(value); - } else { - throw new Error('Missing required field "file"'); - } - - var value = message["namespace"]; - if (value != null) { - bb.writeString(value); - } else { - throw new Error('Missing required field "namespace"'); - } - - var value = message["line"]; - if (value != null) { - bb.writeInt32(value); - } else { - throw new Error('Missing required field "line"'); - } - - var value = message["column"]; - if (value != null) { - bb.writeInt32(value); - } else { - throw new Error('Missing required field "column"'); - } - - var value = message["line_text"]; - if (value != null) { - bb.writeString(value); - } else { - throw new Error('Missing required field "line_text"'); - } - - var value = message["suggestion"]; - if (value != null) { - bb.writeString(value); - } else { - throw new Error('Missing required field "suggestion"'); - } - - var value = message["offset"]; - if (value != null) { - bb.writeVarUint(value); - } else { - throw new Error('Missing required field "offset"'); - } -} - -function decodeMessageData(bb) { - var result = {}; - - while (true) { - switch (bb.readByte()) { - case 0: - return result; - - case 1: - result["text"] = bb.readString(); - break; - - case 2: - result["location"] = decodeLocation(bb); - break; - - default: - throw new Error("Attempted to parse invalid message"); - } - } -} - -function encodeMessageData(message, bb) { - var value = message["text"]; - if (value != null) { - bb.writeByte(1); - bb.writeString(value); - } - - var value = message["location"]; - if (value != null) { - bb.writeByte(2); - encodeLocation(value, bb); - } - bb.writeByte(0); -} - -function decodeMessageMeta(bb) { - var result = {}; - - while (true) { - switch (bb.readByte()) { - case 0: - return result; - - case 1: - result["resolve"] = bb.readString(); - break; - - case 2: - result["build"] = !!bb.readByte(); - break; - - default: - throw new Error("Attempted to parse invalid message"); - } - } -} - -function encodeMessageMeta(message, bb) { - var value = message["resolve"]; - if (value != null) { - bb.writeByte(1); - bb.writeString(value); - } - - var value = message["build"]; - if (value != null) { - bb.writeByte(2); - bb.writeByte(value); - } - bb.writeByte(0); -} - -function decodeMessage(bb) { - var result = {}; - - result["level"] = MessageLevel[bb.readVarUint()]; - result["data"] = decodeMessageData(bb); - var length = bb.readVarUint(); - var values = (result["notes"] = Array(length)); - for (var i = 0; i < length; i++) values[i] = decodeMessageData(bb); - result["on"] = decodeMessageMeta(bb); - return result; -} - -function encodeMessage(message, bb) { - var value = message["level"]; - if (value != null) { - var encoded = MessageLevel[value]; - if (encoded === void 0) throw new Error("Invalid value " + JSON.stringify(value) + ' for enum "MessageLevel"'); - bb.writeVarUint(encoded); - } else { - throw new Error('Missing required field "level"'); - } - - var value = message["data"]; - if (value != null) { - encodeMessageData(value, bb); - } else { - throw new Error('Missing required field "data"'); - } - - var value = message["notes"]; - if (value != null) { - var values = value, - n = values.length; - bb.writeVarUint(n); - for (var i = 0; i < n; i++) { - value = values[i]; - encodeMessageData(value, bb); - } - } else { - throw new Error('Missing required field "notes"'); - } - - var value = message["on"]; - if (value != null) { - encodeMessageMeta(value, bb); - } else { - throw new Error('Missing required field "on"'); - } -} - -function decodeLog(bb) { - var result = {}; - - result["warnings"] = bb.readUint32(); - result["errors"] = bb.readUint32(); - var length = bb.readVarUint(); - var values = (result["msgs"] = Array(length)); - for (var i = 0; i < length; i++) values[i] = decodeMessage(bb); - return result; -} - -function encodeLog(message, bb) { - var value = message["warnings"]; - if (value != null) { - bb.writeUint32(value); - } else { - throw new Error('Missing required field "warnings"'); - } - - var value = message["errors"]; - if (value != null) { - bb.writeUint32(value); - } else { - throw new Error('Missing required field "errors"'); - } - - var value = message["msgs"]; - if (value != null) { - var values = value, - n = values.length; - bb.writeVarUint(n); - for (var i = 0; i < n; i++) { - value = values[i]; - encodeMessage(value, bb); - } - } else { - throw new Error('Missing required field "msgs"'); - } -} -const Reloader = { - 1: 1, - 2: 2, - 3: 3, - disable: 1, - live: 2, - fast_refresh: 3, -}; -const ReloaderKeys = { - 1: "disable", - 2: "live", - 3: "fast_refresh", - disable: "disable", - live: "live", - fast_refresh: "fast_refresh", -}; -const WebsocketMessageKind = { - 1: 1, - 2: 2, - 3: 3, - 4: 4, - 5: 5, - 6: 6, - 7: 7, - 8: 8, - welcome: 1, - file_change_notification: 2, - build_success: 3, - build_fail: 4, - manifest_success: 5, - manifest_fail: 6, - resolve_file: 7, - file_change_notification_with_hint: 8, -}; -const WebsocketMessageKindKeys = { - 1: "welcome", - 2: "file_change_notification", - 3: "build_success", - 4: "build_fail", - 5: "manifest_success", - 6: "manifest_fail", - 7: "resolve_file", - 8: "file_change_notification_with_hint", - welcome: "welcome", - file_change_notification: "file_change_notification", - build_success: "build_success", - build_fail: "build_fail", - manifest_success: "manifest_success", - manifest_fail: "manifest_fail", - resolve_file: "resolve_file", - file_change_notification_with_hint: "file_change_notification_with_hint", -}; -const WebsocketCommandKind = { - 1: 1, - 2: 2, - 3: 3, - build: 1, - manifest: 2, - build_with_file_path: 3, -}; -const WebsocketCommandKindKeys = { - 1: "build", - 2: "manifest", - 3: "build_with_file_path", - build: "build", - manifest: "manifest", - build_with_file_path: "build_with_file_path", -}; - -function decodeWebsocketMessage(bb) { - var result = {}; - - result["timestamp"] = bb.readUint32(); - result["kind"] = WebsocketMessageKind[bb.readByte()]; - return result; -} - -function encodeWebsocketMessage(message, bb) { - var value = message["timestamp"]; - if (value != null) { - bb.writeUint32(value); - } else { - throw new Error('Missing required field "timestamp"'); - } - - var value = message["kind"]; - if (value != null) { - var encoded = WebsocketMessageKind[value]; - if (encoded === void 0) - throw new Error("Invalid value " + JSON.stringify(value) + ' for enum "WebsocketMessageKind"'); - bb.writeByte(encoded); - } else { - throw new Error('Missing required field "kind"'); - } -} - -function decodeWebsocketMessageWelcome(bb) { - var result = {}; - - result["epoch"] = bb.readUint32(); - result["javascriptReloader"] = Reloader[bb.readByte()]; - result["cwd"] = bb.readString(); - return result; -} - -function encodeWebsocketMessageWelcome(message, bb) { - var value = message["epoch"]; - if (value != null) { - bb.writeUint32(value); - } else { - throw new Error('Missing required field "epoch"'); - } - - var value = message["javascriptReloader"]; - if (value != null) { - var encoded = Reloader[value]; - if (encoded === void 0) throw new Error("Invalid value " + JSON.stringify(value) + ' for enum "Reloader"'); - bb.writeByte(encoded); - } else { - throw new Error('Missing required field "javascriptReloader"'); - } - - var value = message["cwd"]; - if (value != null) { - bb.writeString(value); - } else { - throw new Error('Missing required field "cwd"'); - } -} - -function decodeWebsocketMessageFileChangeNotification(bb) { - var result = {}; - - result["id"] = bb.readUint32(); - result["loader"] = Loader[bb.readByte()]; - return result; -} - -function encodeWebsocketMessageFileChangeNotification(message, bb) { - var value = message["id"]; - if (value != null) { - bb.writeUint32(value); - } else { - throw new Error('Missing required field "id"'); - } - - var value = message["loader"]; - if (value != null) { - var encoded = Loader[value]; - if (encoded === void 0) throw new Error("Invalid value " + JSON.stringify(value) + ' for enum "Loader"'); - bb.writeByte(encoded); - } else { - throw new Error('Missing required field "loader"'); - } -} - -function decodeWebsocketCommand(bb) { - var result = {}; - - result["kind"] = WebsocketCommandKind[bb.readByte()]; - result["timestamp"] = bb.readUint32(); - return result; -} - -function encodeWebsocketCommand(message, bb) { - var value = message["kind"]; - if (value != null) { - var encoded = WebsocketCommandKind[value]; - if (encoded === void 0) - throw new Error("Invalid value " + JSON.stringify(value) + ' for enum "WebsocketCommandKind"'); - bb.writeByte(encoded); - } else { - throw new Error('Missing required field "kind"'); - } - - var value = message["timestamp"]; - if (value != null) { - bb.writeUint32(value); - } else { - throw new Error('Missing required field "timestamp"'); - } -} - -function decodeWebsocketCommandBuild(bb) { - var result = {}; - - result["id"] = bb.readUint32(); - return result; -} - -function encodeWebsocketCommandBuild(message, bb) { - var value = message["id"]; - if (value != null) { - bb.writeUint32(value); - } else { - throw new Error('Missing required field "id"'); - } -} - -function decodeWebsocketCommandManifest(bb) { - var result = {}; - - result["id"] = bb.readUint32(); - return result; -} - -function encodeWebsocketCommandManifest(message, bb) { - var value = message["id"]; - if (value != null) { - bb.writeUint32(value); - } else { - throw new Error('Missing required field "id"'); - } -} - -function decodeWebsocketMessageBuildSuccess(bb) { - var result = {}; - - result["id"] = bb.readUint32(); - result["from_timestamp"] = bb.readUint32(); - result["loader"] = Loader[bb.readByte()]; - result["module_path"] = bb.readString(); - result["blob_length"] = bb.readUint32(); - return result; -} - -function encodeWebsocketMessageBuildSuccess(message, bb) { - var value = message["id"]; - if (value != null) { - bb.writeUint32(value); - } else { - throw new Error('Missing required field "id"'); - } - - var value = message["from_timestamp"]; - if (value != null) { - bb.writeUint32(value); - } else { - throw new Error('Missing required field "from_timestamp"'); - } - - var value = message["loader"]; - if (value != null) { - var encoded = Loader[value]; - if (encoded === void 0) throw new Error("Invalid value " + JSON.stringify(value) + ' for enum "Loader"'); - bb.writeByte(encoded); - } else { - throw new Error('Missing required field "loader"'); - } - - var value = message["module_path"]; - if (value != null) { - bb.writeString(value); - } else { - throw new Error('Missing required field "module_path"'); - } - - var value = message["blob_length"]; - if (value != null) { - bb.writeUint32(value); - } else { - throw new Error('Missing required field "blob_length"'); - } -} - -function decodeWebsocketMessageBuildFailure(bb) { - var result = {}; - - result["id"] = bb.readUint32(); - result["from_timestamp"] = bb.readUint32(); - result["loader"] = Loader[bb.readByte()]; - result["module_path"] = bb.readString(); - result["log"] = decodeLog(bb); - return result; -} - -function encodeWebsocketMessageBuildFailure(message, bb) { - var value = message["id"]; - if (value != null) { - bb.writeUint32(value); - } else { - throw new Error('Missing required field "id"'); - } - - var value = message["from_timestamp"]; - if (value != null) { - bb.writeUint32(value); - } else { - throw new Error('Missing required field "from_timestamp"'); - } - - var value = message["loader"]; - if (value != null) { - var encoded = Loader[value]; - if (encoded === void 0) throw new Error("Invalid value " + JSON.stringify(value) + ' for enum "Loader"'); - bb.writeByte(encoded); - } else { - throw new Error('Missing required field "loader"'); - } - - var value = message["module_path"]; - if (value != null) { - bb.writeString(value); - } else { - throw new Error('Missing required field "module_path"'); - } - - var value = message["log"]; - if (value != null) { - encodeLog(value, bb); - } else { - throw new Error('Missing required field "log"'); - } -} - -function decodeWebsocketCommandBuildWithFilePath(bb) { - var result = {}; - - result["id"] = bb.readUint32(); - result["file_path"] = bb.readString(); - return result; -} - -function encodeWebsocketCommandBuildWithFilePath(message, bb) { - var value = message["id"]; - if (value != null) { - bb.writeUint32(value); - } else { - throw new Error('Missing required field "id"'); - } - - var value = message["file_path"]; - if (value != null) { - bb.writeString(value); - } else { - throw new Error('Missing required field "file_path"'); - } -} - -function decodeWebsocketMessageResolveID(bb) { - var result = {}; - - result["id"] = bb.readUint32(); - return result; -} - -function encodeWebsocketMessageResolveID(message, bb) { - var value = message["id"]; - if (value != null) { - bb.writeUint32(value); - } else { - throw new Error('Missing required field "id"'); - } -} - -function decodeNPMRegistry(bb) { - var result = {}; - - result["url"] = bb.readString(); - result["username"] = bb.readString(); - result["password"] = bb.readString(); - result["token"] = bb.readString(); - return result; -} - -function encodeNPMRegistry(message, bb) { - var value = message["url"]; - if (value != null) { - bb.writeString(value); - } else { - throw new Error('Missing required field "url"'); - } - - var value = message["username"]; - if (value != null) { - bb.writeString(value); - } else { - throw new Error('Missing required field "username"'); - } - - var value = message["password"]; - if (value != null) { - bb.writeString(value); - } else { - throw new Error('Missing required field "password"'); - } - - var value = message["token"]; - if (value != null) { - bb.writeString(value); - } else { - throw new Error('Missing required field "token"'); - } -} - -function decodeNPMRegistryMap(bb) { - var result = {}; - - var length = bb.readVarUint(); - var values = (result["scopes"] = Array(length)); - for (var i = 0; i < length; i++) values[i] = bb.readString(); - var length = bb.readVarUint(); - var values = (result["registries"] = Array(length)); - for (var i = 0; i < length; i++) values[i] = decodeNPMRegistry(bb); - return result; -} - -function encodeNPMRegistryMap(message, bb) { - var value = message["scopes"]; - if (value != null) { - var values = value, - n = values.length; - bb.writeVarUint(n); - for (var i = 0; i < n; i++) { - value = values[i]; - bb.writeString(value); - } - } else { - throw new Error('Missing required field "scopes"'); - } - - var value = message["registries"]; - if (value != null) { - var values = value, - n = values.length; - bb.writeVarUint(n); - for (var i = 0; i < n; i++) { - value = values[i]; - encodeNPMRegistry(value, bb); - } - } else { - throw new Error('Missing required field "registries"'); - } -} - -function decodeBunInstall(bb) { - var result = {}; - - while (true) { - switch (bb.readByte()) { - case 0: - return result; - - case 1: - result["default_registry"] = decodeNPMRegistry(bb); - break; - - case 2: - result["scoped"] = decodeNPMRegistryMap(bb); - break; - - case 3: - result["lockfile_path"] = bb.readString(); - break; - - case 4: - result["save_lockfile_path"] = bb.readString(); - break; - - case 5: - result["cache_directory"] = bb.readString(); - break; - - case 6: - result["dry_run"] = !!bb.readByte(); - break; - - case 7: - result["force"] = !!bb.readByte(); - break; - - case 8: - result["save_dev"] = !!bb.readByte(); - break; - - case 9: - result["save_optional"] = !!bb.readByte(); - break; - - case 10: - result["save_peer"] = !!bb.readByte(); - break; - - case 11: - result["save_lockfile"] = !!bb.readByte(); - break; - - case 12: - result["production"] = !!bb.readByte(); - break; - - case 13: - result["save_yarn_lockfile"] = !!bb.readByte(); - break; - - case 14: - var length = bb.readVarUint(); - var values = (result["native_bin_links"] = Array(length)); - for (var i = 0; i < length; i++) values[i] = bb.readString(); - break; - - case 15: - result["disable_cache"] = !!bb.readByte(); - break; - - case 16: - result["disable_manifest_cache"] = !!bb.readByte(); - break; - - case 17: - result["global_dir"] = bb.readString(); - break; - - case 18: - result["global_bin_dir"] = bb.readString(); - break; - - case 19: - result["frozen-lockfile"] = !!bb.readByte(); - break; - - default: - throw new Error("Attempted to parse invalid message"); - } - } -} - -function encodeBunInstall(message, bb) { - var value = message["default_registry"]; - if (value != null) { - bb.writeByte(1); - encodeNPMRegistry(value, bb); - } - - var value = message["scoped"]; - if (value != null) { - bb.writeByte(2); - encodeNPMRegistryMap(value, bb); - } - - var value = message["lockfile_path"]; - if (value != null) { - bb.writeByte(3); - bb.writeString(value); - } - - var value = message["save_lockfile_path"]; - if (value != null) { - bb.writeByte(4); - bb.writeString(value); - } - - var value = message["cache_directory"]; - if (value != null) { - bb.writeByte(5); - bb.writeString(value); - } - - var value = message["dry_run"]; - if (value != null) { - bb.writeByte(6); - bb.writeByte(value); - } - - var value = message["force"]; - if (value != null) { - bb.writeByte(7); - bb.writeByte(value); - } - - var value = message["save_dev"]; - if (value != null) { - bb.writeByte(8); - bb.writeByte(value); - } - - var value = message["save_optional"]; - if (value != null) { - bb.writeByte(9); - bb.writeByte(value); - } - - var value = message["save_peer"]; - if (value != null) { - bb.writeByte(10); - bb.writeByte(value); - } - - var value = message["save_lockfile"]; - if (value != null) { - bb.writeByte(11); - bb.writeByte(value); - } - - var value = message["production"]; - if (value != null) { - bb.writeByte(12); - bb.writeByte(value); - } - - var value = message["save_yarn_lockfile"]; - if (value != null) { - bb.writeByte(13); - bb.writeByte(value); - } - - var value = message["native_bin_links"]; - if (value != null) { - bb.writeByte(14); - var values = value, - n = values.length; - bb.writeVarUint(n); - for (var i = 0; i < n; i++) { - value = values[i]; - bb.writeString(value); - } - } - - var value = message["disable_cache"]; - if (value != null) { - bb.writeByte(15); - bb.writeByte(value); - } - - var value = message["disable_manifest_cache"]; - if (value != null) { - bb.writeByte(16); - bb.writeByte(value); - } - - var value = message["global_dir"]; - if (value != null) { - bb.writeByte(17); - bb.writeString(value); - } - - var value = message["global_bin_dir"]; - if (value != null) { - bb.writeByte(18); - bb.writeString(value); - } - bb.writeByte(0); -} - -export { Loader }; -export { LoaderKeys }; -export { FrameworkEntryPointType }; -export { FrameworkEntryPointTypeKeys }; -export { StackFrameScope }; -export { StackFrameScopeKeys }; -export { decodeStackFrame }; -export { encodeStackFrame }; -export { decodeStackFramePosition }; -export { encodeStackFramePosition }; -export { decodeSourceLine }; -export { encodeSourceLine }; -export { decodeStackTrace }; -export { encodeStackTrace }; -export { decodeJSException }; -export { encodeJSException }; -export { FallbackStep }; -export { FallbackStepKeys }; -export { decodeProblems }; -export { encodeProblems }; -export { decodeRouter }; -export { encodeRouter }; -export { decodeFallbackMessageContainer }; -export { encodeFallbackMessageContainer }; -export { ResolveMode }; -export { ResolveModeKeys }; -export { Platform }; -export { PlatformKeys }; -export { CSSInJSBehavior }; -export { CSSInJSBehaviorKeys }; -export { JSXRuntime }; -export { JSXRuntimeKeys }; -export { decodeJSX }; -export { encodeJSX }; -export { decodeStringPointer }; -export { encodeStringPointer }; -export { decodeJavascriptBundledModule }; -export { encodeJavascriptBundledModule }; -export { decodeJavascriptBundledPackage }; -export { encodeJavascriptBundledPackage }; -export { decodeJavascriptBundle }; -export { encodeJavascriptBundle }; -export { decodeJavascriptBundleContainer }; -export { encodeJavascriptBundleContainer }; -export { ScanDependencyMode }; -export { ScanDependencyModeKeys }; -export { ModuleImportType }; -export { ModuleImportTypeKeys }; -export { decodeModuleImportRecord }; -export { encodeModuleImportRecord }; -export { decodeModule }; -export { encodeModule }; -export { decodeStringMap }; -export { encodeStringMap }; -export { decodeLoaderMap }; -export { encodeLoaderMap }; -export { DotEnvBehavior }; -export { DotEnvBehaviorKeys }; -export { decodeEnvConfig }; -export { encodeEnvConfig }; -export { decodeLoadedEnvConfig }; -export { encodeLoadedEnvConfig }; -export { decodeFrameworkConfig }; -export { encodeFrameworkConfig }; -export { decodeFrameworkEntryPoint }; -export { encodeFrameworkEntryPoint }; -export { decodeFrameworkEntryPointMap }; -export { encodeFrameworkEntryPointMap }; -export { decodeFrameworkEntryPointMessage }; -export { encodeFrameworkEntryPointMessage }; -export { decodeLoadedFramework }; -export { encodeLoadedFramework }; -export { decodeLoadedRouteConfig }; -export { encodeLoadedRouteConfig }; -export { decodeRouteConfig }; -export { encodeRouteConfig }; -export { decodeTransformOptions }; -export { encodeTransformOptions }; -export { decodeFileHandle }; -export { encodeFileHandle }; -export { decodeTransform }; -export { encodeTransform }; -export { decodeScan }; -export { encodeScan }; -export { decodeScanResult }; -export { encodeScanResult }; -export { decodeScannedImport }; -export { encodeScannedImport }; -export { ImportKind }; -export { ImportKindKeys }; -export { TransformResponseStatus }; -export { TransformResponseStatusKeys }; -export { decodeOutputFile }; -export { encodeOutputFile }; -export { decodeTransformResponse }; -export { encodeTransformResponse }; -export { MessageLevel }; -export { MessageLevelKeys }; -export { decodeLocation }; -export { encodeLocation }; -export { decodeMessageData }; -export { encodeMessageData }; -export { decodeMessageMeta }; -export { encodeMessageMeta }; -export { decodeMessage }; -export { encodeMessage }; -export { decodeLog }; -export { encodeLog }; -export { Reloader }; -export { ReloaderKeys }; -export { WebsocketMessageKind }; -export { WebsocketMessageKindKeys }; -export { WebsocketCommandKind }; -export { WebsocketCommandKindKeys }; -export { decodeWebsocketMessage }; -export { encodeWebsocketMessage }; -export { decodeWebsocketMessageWelcome }; -export { encodeWebsocketMessageWelcome }; -export { decodeWebsocketMessageFileChangeNotification }; -export { encodeWebsocketMessageFileChangeNotification }; -export { decodeWebsocketCommand }; -export { encodeWebsocketCommand }; -export { decodeWebsocketCommandBuild }; -export { encodeWebsocketCommandBuild }; -export { decodeWebsocketCommandManifest }; -export { encodeWebsocketCommandManifest }; -export { decodeWebsocketMessageBuildSuccess }; -export { encodeWebsocketMessageBuildSuccess }; -export { decodeWebsocketMessageBuildFailure }; -export { encodeWebsocketMessageBuildFailure }; -export { decodeWebsocketCommandBuildWithFilePath }; -export { encodeWebsocketCommandBuildWithFilePath }; -export { decodeWebsocketMessageResolveID }; -export { encodeWebsocketMessageResolveID }; -export { decodeNPMRegistry }; -export { encodeNPMRegistry }; -export { decodeNPMRegistryMap }; -export { encodeNPMRegistryMap }; -export { decodeBunInstall }; -export { encodeBunInstall }; diff --git a/src/api/demo/schema.peechy b/src/api/demo/schema.peechy deleted file mode 100644 index e495bb9c017cd..0000000000000 --- a/src/api/demo/schema.peechy +++ /dev/null @@ -1,554 +0,0 @@ -package Api; - -smol Loader { - jsx = 1; - js = 2; - ts = 3; - tsx = 4; - css = 5; - file = 6; - json = 7; - toml = 8; - wasm = 9; -} - -smol FrameworkEntryPointType { - client = 1; - server = 2; - fallback = 3; -} - -smol StackFrameScope { - Eval = 1; - Module = 2; - Function = 3; - Global = 4; - Wasm = 5; - Constructor = 6; -} - -struct StackFrame { - string function_name; - string file; - StackFramePosition position; - StackFrameScope scope; -} - -struct StackFramePosition { - int32 source_offset; - int32 line; - int32 line_start; - int32 line_stop; - int32 column_start; - int32 column_stop; - int32 expression_start; - int32 expression_stop; -} - -struct SourceLine { - int32 line; - string text; -} - -struct StackTrace { - SourceLine[] source_lines; - StackFrame[] frames; -} - - -message JSException { - string name = 1; - string message = 2; - - uint16 runtime_type = 3; - uint8 code = 4; - - StackTrace stack = 5; -} - -smol FallbackStep { - ssr_disabled = 1; - create_vm = 2; - configure_router = 3; - configure_defines = 4; - resolve_entry_point = 5; - load_entry_point = 6; - eval_entry_point = 7; - fetch_event_handler = 8; -} - -struct Problems { - uint16 code; - string name; - - JSException[] exceptions; - Log build; -} - -struct Router { - StringMap routes; - int32 route; - StringMap params; -} - -message FallbackMessageContainer { - string message = 1; - Router router = 2; - FallbackStep reason = 3; - Problems problems = 4; - string cwd = 5; -} - - -smol ResolveMode { - disable = 1; - lazy = 2; - dev = 3; - bundle = 4; -} - -smol Target { - browser = 1; - node = 2; - bun = 3; - bun_macro = 4; -} - -smol CSSInJSBehavior { - facade = 1; - facade_onimportcss = 2; - auto_onimportcss = 3; -} - -smol JSXRuntime { - automatic = 1; - classic = 2; -} - -struct JSX { - string factory; - JSXRuntime runtime; - string fragment; - bool development; - - // Probably react - string import_source; - - bool react_fast_refresh; -} - -struct StringPointer { - uint32 offset; - uint32 length; -} - -struct JavascriptBundledModule { - // package-relative path including file extension - StringPointer path; - - // Source code - StringPointer code; - - // index into JavascriptBundle.packages - uint32 package_id; - - // The ESM export is this id ("$" + number.toString(16)) - uint32 id; - - // This lets us efficiently compare strings ignoring the extension - byte path_extname_length; -} - -struct JavascriptBundledPackage { - StringPointer name; - StringPointer version; - uint32 hash; - - uint32 modules_offset; - uint32 modules_length; -} - -struct JavascriptBundle { - // These are sorted alphabetically so you can do binary search - JavascriptBundledModule[] modules; - JavascriptBundledPackage[] packages; - - // This is ASCII-encoded so you can send it directly over HTTP - byte[] etag; - - uint32 generated_at; - - // generated by hashing all ${name}@${version} in sorted order - byte[] app_package_json_dependencies_hash; - - byte[] import_from_name; - - // This is what StringPointer refers to - byte[] manifest_string; -} - -message JavascriptBundleContainer { - uint32 bundle_format_version = 1; - - // These go first so if we change JavaScriptBundle we can still read these - LoadedRouteConfig routes = 3; - LoadedFramework framework = 2; - - JavascriptBundle bundle = 4; - - // Don't technically need to store this, but it may be helpful as a sanity check - uint32 code_length = 5; -} - -smol ScanDependencyMode { - app = 1; - all = 2; -} - -smol ModuleImportType { - import = 1; - require = 2; -} - -struct ModuleImportRecord { - ModuleImportType kind; - string path; - - bool dynamic; -} - -struct Module { - string path; - ModuleImportRecord[] imports; -} - -struct StringMap { - string[] keys; - string[] values; -} - -struct LoaderMap { - string[] extensions; - Loader[] loaders; -} - -enum DotEnvBehavior { - disable = 1; - prefix = 2; - load_all = 3; -} - -message EnvConfig { - string prefix = 1; - StringMap defaults = 2; -} - -struct LoadedEnvConfig { - DotEnvBehavior dotenv; - - StringMap defaults; - string prefix; -} - -message FrameworkConfig { - string package = 1; - FrameworkEntryPointMessage client = 2; - FrameworkEntryPointMessage server = 3; - FrameworkEntryPointMessage fallback = 4; - bool development = 5; - - CSSInJSBehavior client_css_in_js = 6; - string display_name = 7; - - StringMap overrideModules = 8; -} - -struct FrameworkEntryPoint { - FrameworkEntryPointType kind; - string path; - LoadedEnvConfig env; -} - -message FrameworkEntryPointMap { - FrameworkEntryPoint client = 1; - FrameworkEntryPoint server = 2; - FrameworkEntryPoint fallback = 3; -} - -message FrameworkEntryPointMessage { - string path = 1; - EnvConfig env = 2; -} - -struct LoadedFramework { - string package; - string display_name; - bool development; - FrameworkEntryPointMap entry_points; - CSSInJSBehavior client_css_in_js; - StringMap overrideModules; -} - -struct LoadedRouteConfig { - string dir; - string[] extensions; - string static_dir; - string asset_prefix; -} - -message RouteConfig { - string[] dir = 1; - string[] extensions = 2; - string static_dir = 3; - string asset_prefix = 4; -} - -message TransformOptions { - JSX jsx = 1; - string tsconfig_override = 2; - ResolveMode resolve = 3; - - string origin = 4; - string absolute_working_dir = 5; - - StringMap define = 6; - - bool preserve_symlinks = 7; - - string[] entry_points = 8; - bool write = 9; - - string[] inject = 10; - string output_dir = 11; - - string[] external = 12; - - LoaderMap loaders = 13; - - string[] main_fields = 14; - Target target = 15; - - bool serve = 16; - - string[] extension_order = 17; - - bool generate_node_module_bundle = 18; - - string node_modules_bundle_path = 19; - string node_modules_bundle_path_server = 20; - - FrameworkConfig framework = 21; - RouteConfig router = 22; - bool no_summary = 23; - - bool disable_hmr = 24; - - uint16 port = 25; - MessageLevel logLevel = 26; -} - -struct FileHandle { - string path; - uint size; - uint fd; -} - -message Transform { - FileHandle handle = 1; - string path = 2; - byte[] contents = 3; - - Loader loader = 4; - TransformOptions options = 5; -} - -enum TransformResponseStatus { - success = 1; - fail = 2; -} - -struct OutputFile { - byte[] data; - string path; -} - -struct TransformResponse { - TransformResponseStatus status; - OutputFile[] files; - Message[] errors; -} - -enum MessageLevel { - err = 1; - warn =2; - note = 3; - info = 4; - debug = 5; -} - -struct Location { - string file; - string namespace; - int32 line; - int32 column; - string line_text; - string suggestion; - uint offset; -} - -message MessageData { - string text = 1; - Location location = 2; -} - - - -message MessageMeta { - string resolve = 1; - bool build = 2; -} - -struct Message { - MessageLevel level; - MessageData data; - MessageData[] notes; - MessageMeta on; -} - -struct Log { - uint32 warnings; - uint32 errors; - Message[] msgs; -} - - -smol Reloader { - disable = 1; - // equivalent of CMD + R - live = 2; - // React Fast Refresh - fast_refresh = 3; -} - -// The WebSocket protocol -// Server: "hey, this file changed. Does anyone want it?" -// Browser: *checks array* "uhh yeah, ok. rebuild that for me" -// Server: "here u go" -// This makes the client responsible for tracking which files it needs to listen for. -// From a server perspective, this means the filesystem watching thread can send the same WebSocket message -// to every client, which is good for performance. It means if you have 5 tabs open it won't really be different than one tab -// The clients can just ignore files they don't care about -smol WebsocketMessageKind { - welcome = 1; - file_change_notification = 2; - build_success = 3; - build_fail = 4; - manifest_success = 5; - manifest_fail = 6; - resolve_file = 7; - file_change_notification_with_hint = 8; -} - -smol WebsocketCommandKind { - build = 1; - manifest = 2; - build_with_file_path = 3; -} - -// Each websocket message has two messages in it! -// This is the first. -struct WebsocketMessage { - uint32 timestamp; - WebsocketMessageKind kind; -} - -// This is the first. -struct WebsocketMessageWelcome { - uint32 epoch; - Reloader javascriptReloader; - string cwd; -} - -struct WebsocketMessageFileChangeNotification { - uint32 id; - Loader loader; -} - -struct WebsocketCommand { - WebsocketCommandKind kind; - uint32 timestamp; -} - -// The timestamp is used for client-side deduping -struct WebsocketCommandBuild { - uint32 id; -} - -struct WebsocketCommandManifest { - uint32 id; -} - -// We copy the module_path here incase they don't already have it -struct WebsocketMessageBuildSuccess { - uint32 id; - uint32 from_timestamp; - - Loader loader; - string module_path; - - // This is the length of the blob that immediately follows this message. - uint32 blob_length; -} - -struct WebsocketMessageBuildFailure { - uint32 id; - uint32 from_timestamp; - Loader loader; - - string module_path; - Log log; -} - -struct WebsocketCommandBuildWithFilePath { - uint32 id; - string file_path; -} - -struct WebsocketMessageResolveID { - uint32 id; -} - -struct NPMRegistry { - string url; - string username; - string password; - string token; -} - -struct NPMRegistryMap { - string[] scopes; - NPMRegistry[] registries; -} - -message BunInstall { - NPMRegistry default_registry = 1; - NPMRegistryMap scoped = 2; - string lockfile_path = 3; - string save_lockfile_path = 4; - string cache_directory = 5; - bool dry_run = 6; - bool force = 7; - bool save_dev = 8; - bool save_optional = 9; - bool save_peer = 10; - bool save_lockfile = 11; - bool production = 12; - bool save_yarn_lockfile = 13; - string[] native_bin_links = 14; - - bool disable_cache = 15; - bool disable_manifest_cache = 16; - string global_dir = 17; - string global_bin_dir = 18; - string frozen_lockfile = 19; -} diff --git a/src/api/demo/schema.zig b/src/api/demo/schema.zig deleted file mode 100644 index a6de100de6bef..0000000000000 --- a/src/api/demo/schema.zig +++ /dev/null @@ -1,2888 +0,0 @@ -const std = @import("std"); - -pub const Reader = struct { - const Self = @This(); - pub const ReadError = error{EOF}; - - buf: []u8, - remain: []u8, - allocator: std.mem.Allocator, - - pub fn init(buf: []u8, allocator: std.mem.Allocator) Reader { - return Reader{ - .buf = buf, - .remain = buf, - .allocator = allocator, - }; - } - - pub fn read(this: *Self, count: usize) ![]u8 { - const read_count = @min(count, this.remain.len); - if (read_count < count) { - return error.EOF; - } - - var slice = this.remain[0..read_count]; - - this.remain = this.remain[read_count..]; - - return slice; - } - - pub inline fn readAs(this: *Self, comptime T: type) !T { - if (!std.meta.trait.hasUniqueRepresentation(T)) { - @compileError(@typeName(T) ++ " must have unique representation."); - } - - return std.mem.bytesAsValue(T, try this.read(@sizeOf(T))); - } - - pub inline fn readByte(this: *Self) !u8 { - return (try this.read(1))[0]; - } - - pub fn readEnum(this: *Self, comptime Enum: type) !Enum { - const E = error{ - /// An integer was read, but it did not match any of the tags in the supplied enum. - InvalidValue, - }; - const type_info = @typeInfo(Enum).Enum; - const tag = try this.readInt(type_info.tag_type); - - inline for (std.meta.fields(Enum)) |field| { - if (tag == field.value) { - return @field(Enum, field.name); - } - } - - return E.InvalidValue; - } - - pub inline fn readArray(this: *Self, comptime T: type) ![]const T { - const length = try this.readInt(u32); - if (length == 0) { - return &([_]T{}); - } - - switch (comptime T) { - u8 => { - return try this.read(length); - }, - u16, u32, i8, i16, i32 => { - return std.mem.readIntSliceNative(T, this.read(length * @sizeOf(T))); - }, - [:0]const u8, []const u8 => { - var i: u32 = 0; - var array = try this.allocator.alloc(T, length); - while (i < length) : (i += 1) { - array[i] = try this.readArray(u8); - } - return array; - }, - else => { - switch (comptime @typeInfo(T)) { - .Struct => |Struct| { - switch (Struct.layout) { - .Packed => { - const sizeof = @sizeOf(T); - var slice = try this.read(sizeof * length); - return std.mem.bytesAsSlice(T, slice); - }, - else => {}, - } - }, - .Enum => |type_info| { - const enum_values = try this.read(length * @sizeOf(type_info.tag_type)); - return @ptrCast([*]T, enum_values.ptr)[0..length]; - }, - else => {}, - } - - var i: u32 = 0; - var array = try this.allocator.alloc(T, length); - while (i < length) : (i += 1) { - array[i] = try this.readValue(T); - } - - return array; - }, - } - } - - pub inline fn readByteArray(this: *Self) ![]u8 { - const length = try this.readInt(u32); - if (length == 0) { - return &([_]u8{}); - } - - return try this.read(@as(usize, length)); - } - - pub inline fn readInt(this: *Self, comptime T: type) !T { - var slice = try this.read(@sizeOf(T)); - - return std.mem.readIntSliceNative(T, slice); - } - - pub inline fn readBool(this: *Self) !bool { - return (try this.readByte()) > 0; - } - - pub inline fn readValue(this: *Self, comptime T: type) !T { - switch (comptime T) { - bool => { - return try this.readBool(); - }, - u8 => { - return try this.readByte(); - }, - [*:0]const u8, [:0]const u8, []const u8 => { - return try this.readArray(u8); - }, - - []const [:0]const u8, []const [*:0]const u8, []const []const u8 => { - return try this.readArray([]const u8); - }, - []u8, [:0]u8, [*:0]u8 => { - return try this.readArray([]u8); - }, - u16, u32, i8, i16, i32 => { - return std.mem.readIntSliceNative(T, try this.read(@sizeOf(T))); - }, - else => { - switch (comptime @typeInfo(T)) { - .Struct => |Struct| { - switch (Struct.layout) { - .Packed => { - const sizeof = @sizeOf(T); - var slice = try this.read(sizeof); - return @ptrCast(*T, slice[0..sizeof]).*; - }, - else => {}, - } - }, - .Enum => { - return try this.readEnum(T); - }, - else => {}, - } - - return try T.decode(this); - }, - } - - @compileError("Invalid type passed to readValue"); - } -}; - -pub fn Writer(comptime WritableStream: type) type { - return struct { - const Self = @This(); - writable: WritableStream, - - pub fn init(writable: WritableStream) Self { - return Self{ .writable = writable }; - } - - pub inline fn write(this: *Self, bytes: anytype) !void { - _ = try this.writable.write(bytes); - } - - pub inline fn writeByte(this: *Self, byte: u8) !void { - _ = try this.writable.write(&[1]u8{byte}); - } - - pub inline fn writeInt(this: *Self, int: anytype) !void { - try this.write(std.mem.asBytes(&int)); - } - - pub inline fn writeFieldID(this: *Self, comptime id: comptime_int) !void { - try this.writeByte(id); - } - - pub inline fn writeEnum(this: *Self, val: anytype) !void { - try this.writeInt(@intFromEnum(val)); - } - - pub fn writeValue(this: *Self, comptime SliceType: type, slice: SliceType) !void { - switch (SliceType) { - []u16, - []u32, - []i16, - []i32, - []i8, - []const u16, - []const u32, - []const i16, - []const i32, - []const i8, - [:0]u16, - [:0]u32, - [:0]i16, - [:0]i32, - [:0]i8, - [:0]const u16, - [:0]const u32, - [:0]const i16, - [:0]const i32, - [:0]const i8, - [*:0]u16, - [*:0]u32, - [*:0]i16, - [*:0]i32, - [*:0]i8, - [*:0]const u16, - [*:0]const u32, - [*:0]const i16, - [*:0]const i32, - [*:0]const i8, - => { - try this.writeArray(SliceType, slice); - }, - - []u8, - []const u8, - [:0]u8, - [:0]const u8, - [*:0]u8, - [*:0]const u8, - => { - try this.writeArray(u8, slice); - }, - - u8 => { - try this.write(slice); - }, - u16, u32, i16, i32, i8 => { - try this.write(std.mem.asBytes(slice)); - }, - - else => { - try slice.encode(this); - }, - } - } - - pub inline fn writeArray(this: *Self, comptime T: type, slice: anytype) !void { - try this.writeInt(@truncate(u32, slice.len)); - - switch (T) { - u8 => { - try this.write(slice); - }, - u16, u32, i16, i32, i8 => { - try this.write(std.mem.asBytes(slice)); - }, - [:0]u8, - []u8, - []u16, - []u32, - []i16, - []i32, - []i8, - []const u8, - [:0]const u8, - []const u16, - []const u32, - []const i16, - []const i32, - []const i8, - [:0]u16, - [:0]u32, - [:0]i16, - [:0]i32, - [:0]i8, - [:0]const u16, - [:0]const u32, - [:0]const i16, - [:0]const i32, - [:0]const i8, - [*:0]u16, - [*:0]u32, - [*:0]i16, - [*:0]i32, - [*:0]i8, - [*:0]const u16, - [*:0]const u32, - [*:0]const i16, - [*:0]const i32, - [*:0]const i8, - => { - for (slice) |num_slice| { - try this.writeArray(std.meta.Child(@TypeOf(num_slice)), num_slice); - } - }, - else => { - for (slice) |val| { - try val.encode(this); - } - }, - } - } - - pub inline fn endMessage(this: *Self) !void { - try this.writeByte(0); - } - }; -} - -pub const ByteWriter = Writer(*std.io.FixedBufferStream([]u8)); -pub const FileWriter = Writer(std.fs.File); - -pub const Api = struct { - pub const Loader = enum(u8) { - _none, - /// jsx - jsx, - - /// js - js, - - /// ts - ts, - - /// tsx - tsx, - - /// css - css, - - /// file - file, - - /// json - json, - - /// toml - toml, - - /// wasm - wasm, - - _, - - pub fn jsonStringify(self: *const @This(), opts: anytype, o: anytype) !void { - return try std.json.stringify(@tagName(self), opts, o); - } - }; - - pub const FrameworkEntryPointType = enum(u8) { - _none, - /// client - client, - - /// server - server, - - /// fallback - fallback, - - _, - - pub fn jsonStringify(self: *const @This(), opts: anytype, o: anytype) !void { - return try std.json.stringify(@tagName(self), opts, o); - } - }; - - pub const StackFrameScope = enum(u8) { - _none, - /// Eval - eval, - - /// Module - module, - - /// Function - function, - - /// Global - global, - - /// Wasm - wasm, - - /// Constructor - constructor, - - _, - - pub fn jsonStringify(self: *const @This(), opts: anytype, o: anytype) !void { - return try std.json.stringify(@tagName(self), opts, o); - } - }; - - pub const StackFrame = struct { - /// function_name - function_name: []const u8, - - /// file - file: []const u8, - - /// position - position: StackFramePosition, - - /// scope - scope: StackFrameScope, - - pub fn decode(reader: anytype) anyerror!StackFrame { - var this = std.mem.zeroes(StackFrame); - - this.function_name = try reader.readValue([]const u8); - this.file = try reader.readValue([]const u8); - this.position = try reader.readValue(StackFramePosition); - this.scope = try reader.readValue(StackFrameScope); - return this; - } - - pub fn encode(this: *const @This(), writer: anytype) anyerror!void { - try writer.writeValue(@TypeOf(this.function_name), this.function_name); - try writer.writeValue(@TypeOf(this.file), this.file); - try writer.writeValue(@TypeOf(this.position), this.position); - try writer.writeEnum(this.scope); - } - }; - - pub const StackFramePosition = packed struct { - /// source_offset - source_offset: i32 = 0, - - /// line - line: i32 = 0, - - /// line_start - line_start: i32 = 0, - - /// line_stop - line_stop: i32 = 0, - - /// column_start - column_start: i32 = 0, - - /// column_stop - column_stop: i32 = 0, - - /// expression_start - expression_start: i32 = 0, - - /// expression_stop - expression_stop: i32 = 0, - - pub fn decode(reader: anytype) anyerror!StackFramePosition { - var this = std.mem.zeroes(StackFramePosition); - - this.source_offset = try reader.readValue(i32); - this.line = try reader.readValue(i32); - this.line_start = try reader.readValue(i32); - this.line_stop = try reader.readValue(i32); - this.column_start = try reader.readValue(i32); - this.column_stop = try reader.readValue(i32); - this.expression_start = try reader.readValue(i32); - this.expression_stop = try reader.readValue(i32); - return this; - } - - pub fn encode(this: *const @This(), writer: anytype) anyerror!void { - try writer.writeInt(this.source_offset); - try writer.writeInt(this.line); - try writer.writeInt(this.line_start); - try writer.writeInt(this.line_stop); - try writer.writeInt(this.column_start); - try writer.writeInt(this.column_stop); - try writer.writeInt(this.expression_start); - try writer.writeInt(this.expression_stop); - } - }; - - pub const SourceLine = struct { - /// line - line: i32 = 0, - - /// text - text: []const u8, - - pub fn decode(reader: anytype) anyerror!SourceLine { - var this = std.mem.zeroes(SourceLine); - - this.line = try reader.readValue(i32); - this.text = try reader.readValue([]const u8); - return this; - } - - pub fn encode(this: *const @This(), writer: anytype) anyerror!void { - try writer.writeInt(this.line); - try writer.writeValue(@TypeOf(this.text), this.text); - } - }; - - pub const StackTrace = struct { - /// source_lines - source_lines: []const SourceLine, - - /// frames - frames: []const StackFrame, - - pub fn decode(reader: anytype) anyerror!StackTrace { - var this = std.mem.zeroes(StackTrace); - - this.source_lines = try reader.readArray(SourceLine); - this.frames = try reader.readArray(StackFrame); - return this; - } - - pub fn encode(this: *const @This(), writer: anytype) anyerror!void { - try writer.writeArray(SourceLine, this.source_lines); - try writer.writeArray(StackFrame, this.frames); - } - }; - - pub const JsException = struct { - /// name - name: ?[]const u8 = null, - - /// message - message: ?[]const u8 = null, - - /// runtime_type - runtime_type: ?u16 = null, - - /// code - code: ?u8 = null, - - /// stack - stack: ?StackTrace = null, - - pub fn decode(reader: anytype) anyerror!JsException { - var this = std.mem.zeroes(JsException); - - while (true) { - switch (try reader.readByte()) { - 0 => { - return this; - }, - - 1 => { - this.name = try reader.readValue([]const u8); - }, - 2 => { - this.message = try reader.readValue([]const u8); - }, - 3 => { - this.runtime_type = try reader.readValue(u16); - }, - 4 => { - this.code = try reader.readValue(u8); - }, - 5 => { - this.stack = try reader.readValue(StackTrace); - }, - else => { - return error.InvalidMessage; - }, - } - } - unreachable; - } - - pub fn encode(this: *const @This(), writer: anytype) anyerror!void { - if (this.name) |name| { - try writer.writeFieldID(1); - try writer.writeValue(@TypeOf(name), name); - } - if (this.message) |message| { - try writer.writeFieldID(2); - try writer.writeValue(@TypeOf(message), message); - } - if (this.runtime_type) |runtime_type| { - try writer.writeFieldID(3); - try writer.writeInt(runtime_type); - } - if (this.code) |code| { - try writer.writeFieldID(4); - try writer.writeInt(code); - } - if (this.stack) |stack| { - try writer.writeFieldID(5); - try writer.writeValue(@TypeOf(stack), stack); - } - try writer.endMessage(); - } - }; - - pub const FallbackStep = enum(u8) { - _none, - /// ssr_disabled - ssr_disabled, - - /// create_vm - create_vm, - - /// configure_router - configure_router, - - /// configure_defines - configure_defines, - - /// resolve_entry_point - resolve_entry_point, - - /// load_entry_point - load_entry_point, - - /// eval_entry_point - eval_entry_point, - - /// fetch_event_handler - fetch_event_handler, - - _, - - pub fn jsonStringify(self: *const @This(), opts: anytype, o: anytype) !void { - return try std.json.stringify(@tagName(self), opts, o); - } - }; - - pub const Problems = struct { - /// code - code: u16 = 0, - - /// name - name: []const u8, - - /// exceptions - exceptions: []const JsException, - - /// build - build: Log, - - pub fn decode(reader: anytype) anyerror!Problems { - var this = std.mem.zeroes(Problems); - - this.code = try reader.readValue(u16); - this.name = try reader.readValue([]const u8); - this.exceptions = try reader.readArray(JsException); - this.build = try reader.readValue(Log); - return this; - } - - pub fn encode(this: *const @This(), writer: anytype) anyerror!void { - try writer.writeInt(this.code); - try writer.writeValue(@TypeOf(this.name), this.name); - try writer.writeArray(JsException, this.exceptions); - try writer.writeValue(@TypeOf(this.build), this.build); - } - }; - - pub const Router = struct { - /// routes - routes: StringMap, - - /// route - route: i32 = 0, - - /// params - params: StringMap, - - pub fn decode(reader: anytype) anyerror!Router { - var this = std.mem.zeroes(Router); - - this.routes = try reader.readValue(StringMap); - this.route = try reader.readValue(i32); - this.params = try reader.readValue(StringMap); - return this; - } - - pub fn encode(this: *const @This(), writer: anytype) anyerror!void { - try writer.writeValue(@TypeOf(this.routes), this.routes); - try writer.writeInt(this.route); - try writer.writeValue(@TypeOf(this.params), this.params); - } - }; - - pub const FallbackMessageContainer = struct { - /// message - message: ?[]const u8 = null, - - /// router - router: ?Router = null, - - /// reason - reason: ?FallbackStep = null, - - /// problems - problems: ?Problems = null, - - /// cwd - cwd: ?[]const u8 = null, - - pub fn decode(reader: anytype) anyerror!FallbackMessageContainer { - var this = std.mem.zeroes(FallbackMessageContainer); - - while (true) { - switch (try reader.readByte()) { - 0 => { - return this; - }, - - 1 => { - this.message = try reader.readValue([]const u8); - }, - 2 => { - this.router = try reader.readValue(Router); - }, - 3 => { - this.reason = try reader.readValue(FallbackStep); - }, - 4 => { - this.problems = try reader.readValue(Problems); - }, - 5 => { - this.cwd = try reader.readValue([]const u8); - }, - else => { - return error.InvalidMessage; - }, - } - } - unreachable; - } - - pub fn encode(this: *const @This(), writer: anytype) anyerror!void { - if (this.message) |message| { - try writer.writeFieldID(1); - try writer.writeValue(@TypeOf(message), message); - } - if (this.router) |router| { - try writer.writeFieldID(2); - try writer.writeValue(@TypeOf(router), router); - } - if (this.reason) |reason| { - try writer.writeFieldID(3); - try writer.writeEnum(reason); - } - if (this.problems) |problems| { - try writer.writeFieldID(4); - try writer.writeValue(@TypeOf(problems), problems); - } - if (this.cwd) |cwd| { - try writer.writeFieldID(5); - try writer.writeValue(@TypeOf(cwd), cwd); - } - try writer.endMessage(); - } - }; - - pub const ResolveMode = enum(u8) { - _none, - /// disable - disable, - - /// lazy - lazy, - - /// dev - dev, - - /// bundle - bundle, - - _, - - pub fn jsonStringify(self: *const @This(), opts: anytype, o: anytype) !void { - return try std.json.stringify(@tagName(self), opts, o); - } - }; - - pub const Target = enum(u8) { - _none, - /// browser - browser, - - /// node - node, - - /// bun - bun, - - /// bun_macro - bun_macro, - - _, - - pub fn jsonStringify(self: *const @This(), opts: anytype, o: anytype) !void { - return try std.json.stringify(@tagName(self), opts, o); - } - }; - - pub const CssInJsBehavior = enum(u8) { - _none, - /// facade - facade, - - /// facade_onimportcss - facade_onimportcss, - - /// auto_onimportcss - auto_onimportcss, - - _, - - pub fn jsonStringify(self: *const @This(), opts: anytype, o: anytype) !void { - return try std.json.stringify(@tagName(self), opts, o); - } - }; - - pub const JsxRuntime = enum(u8) { - _none, - /// automatic - automatic, - - /// classic - classic, - - _, - - pub fn jsonStringify(self: *const @This(), opts: anytype, o: anytype) !void { - return try std.json.stringify(@tagName(self), opts, o); - } - }; - - pub const Jsx = struct { - /// factory - factory: []const u8, - - /// runtime - runtime: JsxRuntime, - - /// fragment - fragment: []const u8, - - /// development - development: bool = false, - - /// import_source - import_source: []const u8, - - /// react_fast_refresh - react_fast_refresh: bool = false, - - pub fn decode(reader: anytype) anyerror!Jsx { - var this = std.mem.zeroes(Jsx); - - this.factory = try reader.readValue([]const u8); - this.runtime = try reader.readValue(JsxRuntime); - this.fragment = try reader.readValue([]const u8); - this.development = try reader.readValue(bool); - this.import_source = try reader.readValue([]const u8); - this.react_fast_refresh = try reader.readValue(bool); - return this; - } - - pub fn encode(this: *const @This(), writer: anytype) anyerror!void { - try writer.writeValue(@TypeOf(this.factory), this.factory); - try writer.writeEnum(this.runtime); - try writer.writeValue(@TypeOf(this.fragment), this.fragment); - try writer.writeInt(@as(u8, @intFromBool(this.development))); - try writer.writeValue(@TypeOf(this.import_source), this.import_source); - try writer.writeInt(@as(u8, @intFromBool(this.react_fast_refresh))); - } - }; - - pub const StringPointer = packed struct { - /// offset - offset: u32 = 0, - - /// length - length: u32 = 0, - - pub fn decode(reader: anytype) anyerror!StringPointer { - var this = std.mem.zeroes(StringPointer); - - this.offset = try reader.readValue(u32); - this.length = try reader.readValue(u32); - return this; - } - - pub fn encode(this: *const @This(), writer: anytype) anyerror!void { - try writer.writeInt(this.offset); - try writer.writeInt(this.length); - } - }; - - pub const JavascriptBundledModule = struct { - /// path - path: StringPointer, - - /// code - code: StringPointer, - - /// package_id - package_id: u32 = 0, - - /// id - id: u32 = 0, - - /// path_extname_length - path_extname_length: u8 = 0, - - pub fn decode(reader: anytype) anyerror!JavascriptBundledModule { - var this = std.mem.zeroes(JavascriptBundledModule); - - this.path = try reader.readValue(StringPointer); - this.code = try reader.readValue(StringPointer); - this.package_id = try reader.readValue(u32); - this.id = try reader.readValue(u32); - this.path_extname_length = try reader.readValue(u8); - return this; - } - - pub fn encode(this: *const @This(), writer: anytype) anyerror!void { - try writer.writeValue(@TypeOf(this.path), this.path); - try writer.writeValue(@TypeOf(this.code), this.code); - try writer.writeInt(this.package_id); - try writer.writeInt(this.id); - try writer.writeInt(this.path_extname_length); - } - }; - - pub const JavascriptBundledPackage = struct { - /// name - name: StringPointer, - - /// version - version: StringPointer, - - /// hash - hash: u32 = 0, - - /// modules_offset - modules_offset: u32 = 0, - - /// modules_length - modules_length: u32 = 0, - - pub fn decode(reader: anytype) anyerror!JavascriptBundledPackage { - var this = std.mem.zeroes(JavascriptBundledPackage); - - this.name = try reader.readValue(StringPointer); - this.version = try reader.readValue(StringPointer); - this.hash = try reader.readValue(u32); - this.modules_offset = try reader.readValue(u32); - this.modules_length = try reader.readValue(u32); - return this; - } - - pub fn encode(this: *const @This(), writer: anytype) anyerror!void { - try writer.writeValue(@TypeOf(this.name), this.name); - try writer.writeValue(@TypeOf(this.version), this.version); - try writer.writeInt(this.hash); - try writer.writeInt(this.modules_offset); - try writer.writeInt(this.modules_length); - } - }; - - pub const JavascriptBundle = struct { - /// modules - modules: []const JavascriptBundledModule, - - /// packages - packages: []const JavascriptBundledPackage, - - /// etag - etag: []const u8, - - /// generated_at - generated_at: u32 = 0, - - /// app_package_json_dependencies_hash - app_package_json_dependencies_hash: []const u8, - - /// import_from_name - import_from_name: []const u8, - - /// manifest_string - manifest_string: []const u8, - - pub fn decode(reader: anytype) anyerror!JavascriptBundle { - var this = std.mem.zeroes(JavascriptBundle); - - this.modules = try reader.readArray(JavascriptBundledModule); - this.packages = try reader.readArray(JavascriptBundledPackage); - this.etag = try reader.readArray(u8); - this.generated_at = try reader.readValue(u32); - this.app_package_json_dependencies_hash = try reader.readArray(u8); - this.import_from_name = try reader.readArray(u8); - this.manifest_string = try reader.readArray(u8); - return this; - } - - pub fn encode(this: *const @This(), writer: anytype) anyerror!void { - try writer.writeArray(JavascriptBundledModule, this.modules); - try writer.writeArray(JavascriptBundledPackage, this.packages); - try writer.writeArray(u8, this.etag); - try writer.writeInt(this.generated_at); - try writer.writeArray(u8, this.app_package_json_dependencies_hash); - try writer.writeArray(u8, this.import_from_name); - try writer.writeArray(u8, this.manifest_string); - } - }; - - pub const JavascriptBundleContainer = struct { - /// bundle_format_version - bundle_format_version: ?u32 = null, - - /// routes - routes: ?LoadedRouteConfig = null, - - /// framework - framework: ?LoadedFramework = null, - - /// bundle - bundle: ?JavascriptBundle = null, - - /// code_length - code_length: ?u32 = null, - - pub fn decode(reader: anytype) anyerror!JavascriptBundleContainer { - var this = std.mem.zeroes(JavascriptBundleContainer); - - while (true) { - switch (try reader.readByte()) { - 0 => { - return this; - }, - - 1 => { - this.bundle_format_version = try reader.readValue(u32); - }, - 2 => { - this.routes = try reader.readValue(LoadedRouteConfig); - }, - 3 => { - this.framework = try reader.readValue(LoadedFramework); - }, - 4 => { - this.bundle = try reader.readValue(JavascriptBundle); - }, - 5 => { - this.code_length = try reader.readValue(u32); - }, - else => { - return error.InvalidMessage; - }, - } - } - unreachable; - } - - pub fn encode(this: *const @This(), writer: anytype) anyerror!void { - if (this.bundle_format_version) |bundle_format_version| { - try writer.writeFieldID(1); - try writer.writeInt(bundle_format_version); - } - if (this.routes) |routes| { - try writer.writeFieldID(2); - try writer.writeValue(@TypeOf(routes), routes); - } - if (this.framework) |framework| { - try writer.writeFieldID(3); - try writer.writeValue(@TypeOf(framework), framework); - } - if (this.bundle) |bundle| { - try writer.writeFieldID(4); - try writer.writeValue(@TypeOf(bundle), bundle); - } - if (this.code_length) |code_length| { - try writer.writeFieldID(5); - try writer.writeInt(code_length); - } - try writer.endMessage(); - } - }; - - pub const ScanDependencyMode = enum(u8) { - _none, - /// app - app, - - /// all - all, - - _, - - pub fn jsonStringify(self: *const @This(), opts: anytype, o: anytype) !void { - return try std.json.stringify(@tagName(self), opts, o); - } - }; - - pub const ModuleImportType = enum(u8) { - _none, - /// import - import, - - /// require - require, - - _, - - pub fn jsonStringify(self: *const @This(), opts: anytype, o: anytype) !void { - return try std.json.stringify(@tagName(self), opts, o); - } - }; - - pub const ModuleImportRecord = struct { - /// kind - kind: ModuleImportType, - - /// path - path: []const u8, - - /// dynamic - dynamic: bool = false, - - pub fn decode(reader: anytype) anyerror!ModuleImportRecord { - var this = std.mem.zeroes(ModuleImportRecord); - - this.kind = try reader.readValue(ModuleImportType); - this.path = try reader.readValue([]const u8); - this.dynamic = try reader.readValue(bool); - return this; - } - - pub fn encode(this: *const @This(), writer: anytype) anyerror!void { - try writer.writeEnum(this.kind); - try writer.writeValue(@TypeOf(this.path), this.path); - try writer.writeInt(@as(u8, @intFromBool(this.dynamic))); - } - }; - - pub const Module = struct { - /// path - path: []const u8, - - /// imports - imports: []const ModuleImportRecord, - - pub fn decode(reader: anytype) anyerror!Module { - var this = std.mem.zeroes(Module); - - this.path = try reader.readValue([]const u8); - this.imports = try reader.readArray(ModuleImportRecord); - return this; - } - - pub fn encode(this: *const @This(), writer: anytype) anyerror!void { - try writer.writeValue(@TypeOf(this.path), this.path); - try writer.writeArray(ModuleImportRecord, this.imports); - } - }; - - pub const StringMap = struct { - /// keys - keys: []const []const u8, - - /// values - values: []const []const u8, - - pub fn decode(reader: anytype) anyerror!StringMap { - var this = std.mem.zeroes(StringMap); - - this.keys = try reader.readArray([]const u8); - this.values = try reader.readArray([]const u8); - return this; - } - - pub fn encode(this: *const @This(), writer: anytype) anyerror!void { - try writer.writeArray([]const u8, this.keys); - try writer.writeArray([]const u8, this.values); - } - }; - - pub const LoaderMap = struct { - /// extensions - extensions: []const []const u8, - - /// loaders - loaders: []const Loader, - - pub fn decode(reader: anytype) anyerror!LoaderMap { - var this = std.mem.zeroes(LoaderMap); - - this.extensions = try reader.readArray([]const u8); - this.loaders = try reader.readArray(Loader); - return this; - } - - pub fn encode(this: *const @This(), writer: anytype) anyerror!void { - try writer.writeArray([]const u8, this.extensions); - try writer.writeArray(Loader, this.loaders); - } - }; - - pub const DotEnvBehavior = enum(u32) { - _none, - /// disable - disable, - - /// prefix - prefix, - - /// load_all - load_all, - - _, - - pub fn jsonStringify(self: *const @This(), opts: anytype, o: anytype) !void { - return try std.json.stringify(@tagName(self), opts, o); - } - }; - - pub const EnvConfig = struct { - /// prefix - prefix: ?[]const u8 = null, - - /// defaults - defaults: ?StringMap = null, - - pub fn decode(reader: anytype) anyerror!EnvConfig { - var this = std.mem.zeroes(EnvConfig); - - while (true) { - switch (try reader.readByte()) { - 0 => { - return this; - }, - - 1 => { - this.prefix = try reader.readValue([]const u8); - }, - 2 => { - this.defaults = try reader.readValue(StringMap); - }, - else => { - return error.InvalidMessage; - }, - } - } - unreachable; - } - - pub fn encode(this: *const @This(), writer: anytype) anyerror!void { - if (this.prefix) |prefix| { - try writer.writeFieldID(1); - try writer.writeValue(@TypeOf(prefix), prefix); - } - if (this.defaults) |defaults| { - try writer.writeFieldID(2); - try writer.writeValue(@TypeOf(defaults), defaults); - } - try writer.endMessage(); - } - }; - - pub const LoadedEnvConfig = struct { - /// dotenv - dotenv: DotEnvBehavior, - - /// defaults - defaults: StringMap, - - /// prefix - prefix: []const u8, - - pub fn decode(reader: anytype) anyerror!LoadedEnvConfig { - var this = std.mem.zeroes(LoadedEnvConfig); - - this.dotenv = try reader.readValue(DotEnvBehavior); - this.defaults = try reader.readValue(StringMap); - this.prefix = try reader.readValue([]const u8); - return this; - } - - pub fn encode(this: *const @This(), writer: anytype) anyerror!void { - try writer.writeEnum(this.dotenv); - try writer.writeValue(@TypeOf(this.defaults), this.defaults); - try writer.writeValue(@TypeOf(this.prefix), this.prefix); - } - }; - - pub const FrameworkConfig = struct { - /// package - package: ?[]const u8 = null, - - /// client - client: ?FrameworkEntryPointMessage = null, - - /// server - server: ?FrameworkEntryPointMessage = null, - - /// fallback - fallback: ?FrameworkEntryPointMessage = null, - - /// development - development: ?bool = null, - - /// client_css_in_js - client_css_in_js: ?CssInJsBehavior = null, - - /// display_name - display_name: ?[]const u8 = null, - - /// overrideModules - override_modules: ?StringMap = null, - - pub fn decode(reader: anytype) anyerror!FrameworkConfig { - var this = std.mem.zeroes(FrameworkConfig); - - while (true) { - switch (try reader.readByte()) { - 0 => { - return this; - }, - - 1 => { - this.package = try reader.readValue([]const u8); - }, - 2 => { - this.client = try reader.readValue(FrameworkEntryPointMessage); - }, - 3 => { - this.server = try reader.readValue(FrameworkEntryPointMessage); - }, - 4 => { - this.fallback = try reader.readValue(FrameworkEntryPointMessage); - }, - 5 => { - this.development = try reader.readValue(bool); - }, - 6 => { - this.client_css_in_js = try reader.readValue(CssInJsBehavior); - }, - 7 => { - this.display_name = try reader.readValue([]const u8); - }, - 8 => { - this.override_modules = try reader.readValue(StringMap); - }, - else => { - return error.InvalidMessage; - }, - } - } - unreachable; - } - - pub fn encode(this: *const @This(), writer: anytype) anyerror!void { - if (this.package) |package| { - try writer.writeFieldID(1); - try writer.writeValue(@TypeOf(package), package); - } - if (this.client) |client| { - try writer.writeFieldID(2); - try writer.writeValue(@TypeOf(client), client); - } - if (this.server) |server| { - try writer.writeFieldID(3); - try writer.writeValue(@TypeOf(server), server); - } - if (this.fallback) |fallback| { - try writer.writeFieldID(4); - try writer.writeValue(@TypeOf(fallback), fallback); - } - if (this.development) |development| { - try writer.writeFieldID(5); - try writer.writeInt(@as(u8, @intFromBool(development))); - } - if (this.client_css_in_js) |client_css_in_js| { - try writer.writeFieldID(6); - try writer.writeEnum(client_css_in_js); - } - if (this.display_name) |display_name| { - try writer.writeFieldID(7); - try writer.writeValue(@TypeOf(display_name), display_name); - } - if (this.override_modules) |override_modules| { - try writer.writeFieldID(8); - try writer.writeValue(@TypeOf(override_modules), override_modules); - } - try writer.endMessage(); - } - }; - - pub const FrameworkEntryPoint = struct { - /// kind - kind: FrameworkEntryPointType, - - /// path - path: []const u8, - - /// env - env: LoadedEnvConfig, - - pub fn decode(reader: anytype) anyerror!FrameworkEntryPoint { - var this = std.mem.zeroes(FrameworkEntryPoint); - - this.kind = try reader.readValue(FrameworkEntryPointType); - this.path = try reader.readValue([]const u8); - this.env = try reader.readValue(LoadedEnvConfig); - return this; - } - - pub fn encode(this: *const @This(), writer: anytype) anyerror!void { - try writer.writeEnum(this.kind); - try writer.writeValue(@TypeOf(this.path), this.path); - try writer.writeValue(@TypeOf(this.env), this.env); - } - }; - - pub const FrameworkEntryPointMap = struct { - /// client - client: ?FrameworkEntryPoint = null, - - /// server - server: ?FrameworkEntryPoint = null, - - /// fallback - fallback: ?FrameworkEntryPoint = null, - - pub fn decode(reader: anytype) anyerror!FrameworkEntryPointMap { - var this = std.mem.zeroes(FrameworkEntryPointMap); - - while (true) { - switch (try reader.readByte()) { - 0 => { - return this; - }, - - 1 => { - this.client = try reader.readValue(FrameworkEntryPoint); - }, - 2 => { - this.server = try reader.readValue(FrameworkEntryPoint); - }, - 3 => { - this.fallback = try reader.readValue(FrameworkEntryPoint); - }, - else => { - return error.InvalidMessage; - }, - } - } - unreachable; - } - - pub fn encode(this: *const @This(), writer: anytype) anyerror!void { - if (this.client) |client| { - try writer.writeFieldID(1); - try writer.writeValue(@TypeOf(client), client); - } - if (this.server) |server| { - try writer.writeFieldID(2); - try writer.writeValue(@TypeOf(server), server); - } - if (this.fallback) |fallback| { - try writer.writeFieldID(3); - try writer.writeValue(@TypeOf(fallback), fallback); - } - try writer.endMessage(); - } - }; - - pub const FrameworkEntryPointMessage = struct { - /// path - path: ?[]const u8 = null, - - /// env - env: ?EnvConfig = null, - - pub fn decode(reader: anytype) anyerror!FrameworkEntryPointMessage { - var this = std.mem.zeroes(FrameworkEntryPointMessage); - - while (true) { - switch (try reader.readByte()) { - 0 => { - return this; - }, - - 1 => { - this.path = try reader.readValue([]const u8); - }, - 2 => { - this.env = try reader.readValue(EnvConfig); - }, - else => { - return error.InvalidMessage; - }, - } - } - unreachable; - } - - pub fn encode(this: *const @This(), writer: anytype) anyerror!void { - if (this.path) |path| { - try writer.writeFieldID(1); - try writer.writeValue(@TypeOf(path), path); - } - if (this.env) |env| { - try writer.writeFieldID(2); - try writer.writeValue(@TypeOf(env), env); - } - try writer.endMessage(); - } - }; - - pub const LoadedFramework = struct { - /// package - package: []const u8, - - /// display_name - display_name: []const u8, - - /// development - development: bool = false, - - /// entry_points - entry_points: FrameworkEntryPointMap, - - /// client_css_in_js - client_css_in_js: CssInJsBehavior, - - /// overrideModules - override_modules: StringMap, - - pub fn decode(reader: anytype) anyerror!LoadedFramework { - var this = std.mem.zeroes(LoadedFramework); - - this.package = try reader.readValue([]const u8); - this.display_name = try reader.readValue([]const u8); - this.development = try reader.readValue(bool); - this.entry_points = try reader.readValue(FrameworkEntryPointMap); - this.client_css_in_js = try reader.readValue(CssInJsBehavior); - this.override_modules = try reader.readValue(StringMap); - return this; - } - - pub fn encode(this: *const @This(), writer: anytype) anyerror!void { - try writer.writeValue(@TypeOf(this.package), this.package); - try writer.writeValue(@TypeOf(this.display_name), this.display_name); - try writer.writeInt(@as(u8, @intFromBool(this.development))); - try writer.writeValue(@TypeOf(this.entry_points), this.entry_points); - try writer.writeEnum(this.client_css_in_js); - try writer.writeValue(@TypeOf(this.override_modules), this.override_modules); - } - }; - - pub const LoadedRouteConfig = struct { - /// dir - dir: []const u8, - - /// extensions - extensions: []const []const u8, - - /// static_dir - static_dir: []const u8, - - /// asset_prefix - asset_prefix: []const u8, - - pub fn decode(reader: anytype) anyerror!LoadedRouteConfig { - var this = std.mem.zeroes(LoadedRouteConfig); - - this.dir = try reader.readValue([]const u8); - this.extensions = try reader.readArray([]const u8); - this.static_dir = try reader.readValue([]const u8); - this.asset_prefix = try reader.readValue([]const u8); - return this; - } - - pub fn encode(this: *const @This(), writer: anytype) anyerror!void { - try writer.writeValue(@TypeOf(this.dir), this.dir); - try writer.writeArray([]const u8, this.extensions); - try writer.writeValue(@TypeOf(this.static_dir), this.static_dir); - try writer.writeValue(@TypeOf(this.asset_prefix), this.asset_prefix); - } - }; - - pub const RouteConfig = struct { - /// dir - dir: []const []const u8, - - /// extensions - extensions: []const []const u8, - - /// static_dir - static_dir: ?[]const u8 = null, - - /// asset_prefix - asset_prefix: ?[]const u8 = null, - - pub fn decode(reader: anytype) anyerror!RouteConfig { - var this = std.mem.zeroes(RouteConfig); - - while (true) { - switch (try reader.readByte()) { - 0 => { - return this; - }, - - 1 => { - this.dir = try reader.readArray([]const u8); - }, - 2 => { - this.extensions = try reader.readArray([]const u8); - }, - 3 => { - this.static_dir = try reader.readValue([]const u8); - }, - 4 => { - this.asset_prefix = try reader.readValue([]const u8); - }, - else => { - return error.InvalidMessage; - }, - } - } - unreachable; - } - - pub fn encode(this: *const @This(), writer: anytype) anyerror!void { - if (this.dir) |dir| { - try writer.writeFieldID(1); - try writer.writeArray([]const u8, dir); - } - if (this.extensions) |extensions| { - try writer.writeFieldID(2); - try writer.writeArray([]const u8, extensions); - } - if (this.static_dir) |static_dir| { - try writer.writeFieldID(3); - try writer.writeValue(@TypeOf(static_dir), static_dir); - } - if (this.asset_prefix) |asset_prefix| { - try writer.writeFieldID(4); - try writer.writeValue(@TypeOf(asset_prefix), asset_prefix); - } - try writer.endMessage(); - } - }; - - pub const TransformOptions = struct { - /// jsx - jsx: ?Jsx = null, - - /// tsconfig_override - tsconfig_override: ?[]const u8 = null, - - /// resolve - resolve: ?ResolveMode = null, - - /// origin - origin: ?[]const u8 = null, - - /// absolute_working_dir - absolute_working_dir: ?[]const u8 = null, - - /// define - define: ?StringMap = null, - - /// preserve_symlinks - preserve_symlinks: ?bool = null, - - /// entry_points - entry_points: []const []const u8, - - /// write - write: ?bool = null, - - /// inject - inject: []const []const u8, - - /// output_dir - output_dir: ?[]const u8 = null, - - /// external - external: []const []const u8, - - /// loaders - loaders: ?LoaderMap = null, - - /// main_fields - main_fields: []const []const u8, - - /// target - target: ?Target = null, - - /// serve - serve: ?bool = null, - - /// extension_order - extension_order: []const []const u8, - - /// generate_node_module_bundle - generate_node_module_bundle: ?bool = null, - - /// node_modules_bundle_path - node_modules_bundle_path: ?[]const u8 = null, - - /// node_modules_bundle_path_server - node_modules_bundle_path_server: ?[]const u8 = null, - - /// framework - framework: ?FrameworkConfig = null, - - /// router - router: ?RouteConfig = null, - - /// no_summary - no_summary: ?bool = null, - - /// disable_hmr - disable_hmr: ?bool = null, - - /// port - port: ?u16 = null, - - /// logLevel - log_level: ?MessageLevel = null, - - pub fn decode(reader: anytype) anyerror!TransformOptions { - var this = std.mem.zeroes(TransformOptions); - - while (true) { - switch (try reader.readByte()) { - 0 => { - return this; - }, - - 1 => { - this.jsx = try reader.readValue(Jsx); - }, - 2 => { - this.tsconfig_override = try reader.readValue([]const u8); - }, - 3 => { - this.resolve = try reader.readValue(ResolveMode); - }, - 4 => { - this.origin = try reader.readValue([]const u8); - }, - 5 => { - this.absolute_working_dir = try reader.readValue([]const u8); - }, - 6 => { - this.define = try reader.readValue(StringMap); - }, - 7 => { - this.preserve_symlinks = try reader.readValue(bool); - }, - 8 => { - this.entry_points = try reader.readArray([]const u8); - }, - 9 => { - this.write = try reader.readValue(bool); - }, - 10 => { - this.inject = try reader.readArray([]const u8); - }, - 11 => { - this.output_dir = try reader.readValue([]const u8); - }, - 12 => { - this.external = try reader.readArray([]const u8); - }, - 13 => { - this.loaders = try reader.readValue(LoaderMap); - }, - 14 => { - this.main_fields = try reader.readArray([]const u8); - }, - 15 => { - this.target = try reader.readValue(Target); - }, - 16 => { - this.serve = try reader.readValue(bool); - }, - 17 => { - this.extension_order = try reader.readArray([]const u8); - }, - 18 => { - this.generate_node_module_bundle = try reader.readValue(bool); - }, - 19 => { - this.node_modules_bundle_path = try reader.readValue([]const u8); - }, - 20 => { - this.node_modules_bundle_path_server = try reader.readValue([]const u8); - }, - 21 => { - this.framework = try reader.readValue(FrameworkConfig); - }, - 22 => { - this.router = try reader.readValue(RouteConfig); - }, - 23 => { - this.no_summary = try reader.readValue(bool); - }, - 24 => { - this.disable_hmr = try reader.readValue(bool); - }, - 25 => { - this.port = try reader.readValue(u16); - }, - 26 => { - this.log_level = try reader.readValue(MessageLevel); - }, - else => { - return error.InvalidMessage; - }, - } - } - unreachable; - } - - pub fn encode(this: *const @This(), writer: anytype) anyerror!void { - if (this.jsx) |jsx| { - try writer.writeFieldID(1); - try writer.writeValue(@TypeOf(jsx), jsx); - } - if (this.tsconfig_override) |tsconfig_override| { - try writer.writeFieldID(2); - try writer.writeValue(@TypeOf(tsconfig_override), tsconfig_override); - } - if (this.resolve) |resolve| { - try writer.writeFieldID(3); - try writer.writeEnum(resolve); - } - if (this.origin) |origin| { - try writer.writeFieldID(4); - try writer.writeValue(@TypeOf(origin), origin); - } - if (this.absolute_working_dir) |absolute_working_dir| { - try writer.writeFieldID(5); - try writer.writeValue(@TypeOf(absolute_working_dir), absolute_working_dir); - } - if (this.define) |define| { - try writer.writeFieldID(6); - try writer.writeValue(@TypeOf(define), define); - } - if (this.preserve_symlinks) |preserve_symlinks| { - try writer.writeFieldID(7); - try writer.writeInt(@as(u8, @intFromBool(preserve_symlinks))); - } - if (this.entry_points) |entry_points| { - try writer.writeFieldID(8); - try writer.writeArray([]const u8, entry_points); - } - if (this.write) |write| { - try writer.writeFieldID(9); - try writer.writeInt(@as(u8, @intFromBool(write))); - } - if (this.inject) |inject| { - try writer.writeFieldID(10); - try writer.writeArray([]const u8, inject); - } - if (this.output_dir) |output_dir| { - try writer.writeFieldID(11); - try writer.writeValue(@TypeOf(output_dir), output_dir); - } - if (this.external) |external| { - try writer.writeFieldID(12); - try writer.writeArray([]const u8, external); - } - if (this.loaders) |loaders| { - try writer.writeFieldID(13); - try writer.writeValue(@TypeOf(loaders), loaders); - } - if (this.main_fields) |main_fields| { - try writer.writeFieldID(14); - try writer.writeArray([]const u8, main_fields); - } - if (this.target) |target| { - try writer.writeFieldID(15); - try writer.writeEnum(target); - } - if (this.serve) |serve| { - try writer.writeFieldID(16); - try writer.writeInt(@as(u8, @intFromBool(serve))); - } - if (this.extension_order) |extension_order| { - try writer.writeFieldID(17); - try writer.writeArray([]const u8, extension_order); - } - if (this.generate_node_module_bundle) |generate_node_module_bundle| { - try writer.writeFieldID(18); - try writer.writeInt(@as(u8, @intFromBool(generate_node_module_bundle))); - } - if (this.node_modules_bundle_path) |node_modules_bundle_path| { - try writer.writeFieldID(19); - try writer.writeValue(@TypeOf(node_modules_bundle_path), node_modules_bundle_path); - } - if (this.node_modules_bundle_path_server) |node_modules_bundle_path_server| { - try writer.writeFieldID(20); - try writer.writeValue(@TypeOf(node_modules_bundle_path_server), node_modules_bundle_path_server); - } - if (this.framework) |framework| { - try writer.writeFieldID(21); - try writer.writeValue(@TypeOf(framework), framework); - } - if (this.router) |router| { - try writer.writeFieldID(22); - try writer.writeValue(@TypeOf(router), router); - } - if (this.no_summary) |no_summary| { - try writer.writeFieldID(23); - try writer.writeInt(@as(u8, @intFromBool(no_summary))); - } - if (this.disable_hmr) |disable_hmr| { - try writer.writeFieldID(24); - try writer.writeInt(@as(u8, @intFromBool(disable_hmr))); - } - if (this.port) |port| { - try writer.writeFieldID(25); - try writer.writeInt(port); - } - if (this.log_level) |log_level| { - try writer.writeFieldID(26); - try writer.writeEnum(log_level); - } - try writer.endMessage(); - } - }; - - pub const FileHandle = struct { - /// path - path: []const u8, - - /// size - size: u32 = 0, - - /// fd - fd: u32 = 0, - - pub fn decode(reader: anytype) anyerror!FileHandle { - var this = std.mem.zeroes(FileHandle); - - this.path = try reader.readValue([]const u8); - this.size = try reader.readValue(u32); - this.fd = try reader.readValue(u32); - return this; - } - - pub fn encode(this: *const @This(), writer: anytype) anyerror!void { - try writer.writeValue(@TypeOf(this.path), this.path); - try writer.writeInt(this.size); - try writer.writeInt(this.fd); - } - }; - - pub const Transform = struct { - /// handle - handle: ?FileHandle = null, - - /// path - path: ?[]const u8 = null, - - /// contents - contents: []const u8, - - /// loader - loader: ?Loader = null, - - /// options - options: ?TransformOptions = null, - - pub fn decode(reader: anytype) anyerror!Transform { - var this = std.mem.zeroes(Transform); - - while (true) { - switch (try reader.readByte()) { - 0 => { - return this; - }, - - 1 => { - this.handle = try reader.readValue(FileHandle); - }, - 2 => { - this.path = try reader.readValue([]const u8); - }, - 3 => { - this.contents = try reader.readArray(u8); - }, - 4 => { - this.loader = try reader.readValue(Loader); - }, - 5 => { - this.options = try reader.readValue(TransformOptions); - }, - else => { - return error.InvalidMessage; - }, - } - } - unreachable; - } - - pub fn encode(this: *const @This(), writer: anytype) anyerror!void { - if (this.handle) |handle| { - try writer.writeFieldID(1); - try writer.writeValue(@TypeOf(handle), handle); - } - if (this.path) |path| { - try writer.writeFieldID(2); - try writer.writeValue(@TypeOf(path), path); - } - if (this.contents) |contents| { - try writer.writeFieldID(3); - try writer.writeArray(u8, contents); - } - if (this.loader) |loader| { - try writer.writeFieldID(4); - try writer.writeEnum(loader); - } - if (this.options) |options| { - try writer.writeFieldID(5); - try writer.writeValue(@TypeOf(options), options); - } - try writer.endMessage(); - } - }; - - pub const TransformResponseStatus = enum(u32) { - _none, - /// success - success, - - /// fail - fail, - - _, - - pub fn jsonStringify(self: *const @This(), opts: anytype, o: anytype) !void { - return try std.json.stringify(@tagName(self), opts, o); - } - }; - - pub const OutputFile = struct { - /// data - data: []const u8, - - /// path - path: []const u8, - - pub fn decode(reader: anytype) anyerror!OutputFile { - var this = std.mem.zeroes(OutputFile); - - this.data = try reader.readArray(u8); - this.path = try reader.readValue([]const u8); - return this; - } - - pub fn encode(this: *const @This(), writer: anytype) anyerror!void { - try writer.writeArray(u8, this.data); - try writer.writeValue(@TypeOf(this.path), this.path); - } - }; - - pub const TransformResponse = struct { - /// status - status: TransformResponseStatus, - - /// files - files: []const OutputFile, - - /// errors - errors: []const Message, - - pub fn decode(reader: anytype) anyerror!TransformResponse { - var this = std.mem.zeroes(TransformResponse); - - this.status = try reader.readValue(TransformResponseStatus); - this.files = try reader.readArray(OutputFile); - this.errors = try reader.readArray(Message); - return this; - } - - pub fn encode(this: *const @This(), writer: anytype) anyerror!void { - try writer.writeEnum(this.status); - try writer.writeArray(OutputFile, this.files); - try writer.writeArray(Message, this.errors); - } - }; - - pub const MessageLevel = enum(u32) { - _none, - /// err - err, - - /// warn - warn, - - /// note - note, - - /// info - info, - - /// debug - debug, - - _, - - pub fn jsonStringify(self: *const @This(), opts: anytype, o: anytype) !void { - return try std.json.stringify(@tagName(self), opts, o); - } - }; - - pub const Location = struct { - /// file - file: []const u8, - - /// namespace - namespace: []const u8, - - /// line - line: i32 = 0, - - /// column - column: i32 = 0, - - /// line_text - line_text: []const u8, - - /// suggestion - suggestion: []const u8, - - /// offset - offset: u32 = 0, - - pub fn decode(reader: anytype) anyerror!Location { - var this = std.mem.zeroes(Location); - - this.file = try reader.readValue([]const u8); - this.namespace = try reader.readValue([]const u8); - this.line = try reader.readValue(i32); - this.column = try reader.readValue(i32); - this.line_text = try reader.readValue([]const u8); - this.suggestion = try reader.readValue([]const u8); - this.offset = try reader.readValue(u32); - return this; - } - - pub fn encode(this: *const @This(), writer: anytype) anyerror!void { - try writer.writeValue(@TypeOf(this.file), this.file); - try writer.writeValue(@TypeOf(this.namespace), this.namespace); - try writer.writeInt(this.line); - try writer.writeInt(this.column); - try writer.writeValue(@TypeOf(this.line_text), this.line_text); - try writer.writeValue(@TypeOf(this.suggestion), this.suggestion); - try writer.writeInt(this.offset); - } - }; - - pub const MessageData = struct { - /// text - text: ?[]const u8 = null, - - /// location - location: ?Location = null, - - pub fn decode(reader: anytype) anyerror!MessageData { - var this = std.mem.zeroes(MessageData); - - while (true) { - switch (try reader.readByte()) { - 0 => { - return this; - }, - - 1 => { - this.text = try reader.readValue([]const u8); - }, - 2 => { - this.location = try reader.readValue(Location); - }, - else => { - return error.InvalidMessage; - }, - } - } - unreachable; - } - - pub fn encode(this: *const @This(), writer: anytype) anyerror!void { - if (this.text) |text| { - try writer.writeFieldID(1); - try writer.writeValue(@TypeOf(text), text); - } - if (this.location) |location| { - try writer.writeFieldID(2); - try writer.writeValue(@TypeOf(location), location); - } - try writer.endMessage(); - } - }; - - pub const MessageMeta = struct { - /// resolve - resolve: ?[]const u8 = null, - - /// build - build: ?bool = null, - - pub fn decode(reader: anytype) anyerror!MessageMeta { - var this = std.mem.zeroes(MessageMeta); - - while (true) { - switch (try reader.readByte()) { - 0 => { - return this; - }, - - 1 => { - this.resolve = try reader.readValue([]const u8); - }, - 2 => { - this.build = try reader.readValue(bool); - }, - else => { - return error.InvalidMessage; - }, - } - } - unreachable; - } - - pub fn encode(this: *const @This(), writer: anytype) anyerror!void { - if (this.resolve) |resolve| { - try writer.writeFieldID(1); - try writer.writeValue(@TypeOf(resolve), resolve); - } - if (this.build) |build| { - try writer.writeFieldID(2); - try writer.writeInt(@as(u8, @intFromBool(build))); - } - try writer.endMessage(); - } - }; - - pub const Message = struct { - /// level - level: MessageLevel, - - /// data - data: MessageData, - - /// notes - notes: []const MessageData, - - /// on - on: MessageMeta, - - pub fn decode(reader: anytype) anyerror!Message { - var this = std.mem.zeroes(Message); - - this.level = try reader.readValue(MessageLevel); - this.data = try reader.readValue(MessageData); - this.notes = try reader.readArray(MessageData); - this.on = try reader.readValue(MessageMeta); - return this; - } - - pub fn encode(this: *const @This(), writer: anytype) anyerror!void { - try writer.writeEnum(this.level); - try writer.writeValue(@TypeOf(this.data), this.data); - try writer.writeArray(MessageData, this.notes); - try writer.writeValue(@TypeOf(this.on), this.on); - } - }; - - pub const Log = struct { - /// warnings - warnings: u32 = 0, - - /// errors - errors: u32 = 0, - - /// msgs - msgs: []const Message, - - pub fn decode(reader: anytype) anyerror!Log { - var this = std.mem.zeroes(Log); - - this.warnings = try reader.readValue(u32); - this.errors = try reader.readValue(u32); - this.msgs = try reader.readArray(Message); - return this; - } - - pub fn encode(this: *const @This(), writer: anytype) anyerror!void { - try writer.writeInt(this.warnings); - try writer.writeInt(this.errors); - try writer.writeArray(Message, this.msgs); - } - }; - - pub const Reloader = enum(u8) { - _none, - /// disable - disable, - - /// live - live, - - /// fast_refresh - fast_refresh, - - _, - - pub fn jsonStringify(self: *const @This(), opts: anytype, o: anytype) !void { - return try std.json.stringify(@tagName(self), opts, o); - } - }; - - pub const WebsocketMessageKind = enum(u8) { - _none, - /// welcome - welcome, - - /// file_change_notification - file_change_notification, - - /// build_success - build_success, - - /// build_fail - build_fail, - - /// manifest_success - manifest_success, - - /// manifest_fail - manifest_fail, - - /// resolve_file - resolve_file, - - /// file_change_notification_with_hint - file_change_notification_with_hint, - - _, - - pub fn jsonStringify(self: *const @This(), opts: anytype, o: anytype) !void { - return try std.json.stringify(@tagName(self), opts, o); - } - }; - - pub const WebsocketCommandKind = enum(u8) { - _none, - /// build - build, - - /// manifest - manifest, - - /// build_with_file_path - build_with_file_path, - - _, - - pub fn jsonStringify(self: *const @This(), opts: anytype, o: anytype) !void { - return try std.json.stringify(@tagName(self), opts, o); - } - }; - - pub const WebsocketMessage = struct { - /// timestamp - timestamp: u32 = 0, - - /// kind - kind: WebsocketMessageKind, - - pub fn decode(reader: anytype) anyerror!WebsocketMessage { - var this = std.mem.zeroes(WebsocketMessage); - - this.timestamp = try reader.readValue(u32); - this.kind = try reader.readValue(WebsocketMessageKind); - return this; - } - - pub fn encode(this: *const @This(), writer: anytype) anyerror!void { - try writer.writeInt(this.timestamp); - try writer.writeEnum(this.kind); - } - }; - - pub const WebsocketMessageWelcome = struct { - /// epoch - epoch: u32 = 0, - - /// javascriptReloader - javascript_reloader: Reloader, - - /// cwd - cwd: []const u8, - - pub fn decode(reader: anytype) anyerror!WebsocketMessageWelcome { - var this = std.mem.zeroes(WebsocketMessageWelcome); - - this.epoch = try reader.readValue(u32); - this.javascript_reloader = try reader.readValue(Reloader); - this.cwd = try reader.readValue([]const u8); - return this; - } - - pub fn encode(this: *const @This(), writer: anytype) anyerror!void { - try writer.writeInt(this.epoch); - try writer.writeEnum(this.javascript_reloader); - try writer.writeValue(@TypeOf(this.cwd), this.cwd); - } - }; - - pub const WebsocketMessageFileChangeNotification = struct { - /// id - id: u32 = 0, - - /// loader - loader: Loader, - - pub fn decode(reader: anytype) anyerror!WebsocketMessageFileChangeNotification { - var this = std.mem.zeroes(WebsocketMessageFileChangeNotification); - - this.id = try reader.readValue(u32); - this.loader = try reader.readValue(Loader); - return this; - } - - pub fn encode(this: *const @This(), writer: anytype) anyerror!void { - try writer.writeInt(this.id); - try writer.writeEnum(this.loader); - } - }; - - pub const WebsocketCommand = struct { - /// kind - kind: WebsocketCommandKind, - - /// timestamp - timestamp: u32 = 0, - - pub fn decode(reader: anytype) anyerror!WebsocketCommand { - var this = std.mem.zeroes(WebsocketCommand); - - this.kind = try reader.readValue(WebsocketCommandKind); - this.timestamp = try reader.readValue(u32); - return this; - } - - pub fn encode(this: *const @This(), writer: anytype) anyerror!void { - try writer.writeEnum(this.kind); - try writer.writeInt(this.timestamp); - } - }; - - pub const WebsocketCommandBuild = packed struct { - /// id - id: u32 = 0, - - pub fn decode(reader: anytype) anyerror!WebsocketCommandBuild { - var this = std.mem.zeroes(WebsocketCommandBuild); - - this.id = try reader.readValue(u32); - return this; - } - - pub fn encode(this: *const @This(), writer: anytype) anyerror!void { - try writer.writeInt(this.id); - } - }; - - pub const WebsocketCommandManifest = packed struct { - /// id - id: u32 = 0, - - pub fn decode(reader: anytype) anyerror!WebsocketCommandManifest { - var this = std.mem.zeroes(WebsocketCommandManifest); - - this.id = try reader.readValue(u32); - return this; - } - - pub fn encode(this: *const @This(), writer: anytype) anyerror!void { - try writer.writeInt(this.id); - } - }; - - pub const WebsocketMessageBuildSuccess = struct { - /// id - id: u32 = 0, - - /// from_timestamp - from_timestamp: u32 = 0, - - /// loader - loader: Loader, - - /// module_path - module_path: []const u8, - - /// blob_length - blob_length: u32 = 0, - - pub fn decode(reader: anytype) anyerror!WebsocketMessageBuildSuccess { - var this = std.mem.zeroes(WebsocketMessageBuildSuccess); - - this.id = try reader.readValue(u32); - this.from_timestamp = try reader.readValue(u32); - this.loader = try reader.readValue(Loader); - this.module_path = try reader.readValue([]const u8); - this.blob_length = try reader.readValue(u32); - return this; - } - - pub fn encode(this: *const @This(), writer: anytype) anyerror!void { - try writer.writeInt(this.id); - try writer.writeInt(this.from_timestamp); - try writer.writeEnum(this.loader); - try writer.writeValue(@TypeOf(this.module_path), this.module_path); - try writer.writeInt(this.blob_length); - } - }; - - pub const WebsocketMessageBuildFailure = struct { - /// id - id: u32 = 0, - - /// from_timestamp - from_timestamp: u32 = 0, - - /// loader - loader: Loader, - - /// module_path - module_path: []const u8, - - /// log - log: Log, - - pub fn decode(reader: anytype) anyerror!WebsocketMessageBuildFailure { - var this = std.mem.zeroes(WebsocketMessageBuildFailure); - - this.id = try reader.readValue(u32); - this.from_timestamp = try reader.readValue(u32); - this.loader = try reader.readValue(Loader); - this.module_path = try reader.readValue([]const u8); - this.log = try reader.readValue(Log); - return this; - } - - pub fn encode(this: *const @This(), writer: anytype) anyerror!void { - try writer.writeInt(this.id); - try writer.writeInt(this.from_timestamp); - try writer.writeEnum(this.loader); - try writer.writeValue(@TypeOf(this.module_path), this.module_path); - try writer.writeValue(@TypeOf(this.log), this.log); - } - }; - - pub const WebsocketCommandBuildWithFilePath = struct { - /// id - id: u32 = 0, - - /// file_path - file_path: []const u8, - - pub fn decode(reader: anytype) anyerror!WebsocketCommandBuildWithFilePath { - var this = std.mem.zeroes(WebsocketCommandBuildWithFilePath); - - this.id = try reader.readValue(u32); - this.file_path = try reader.readValue([]const u8); - return this; - } - - pub fn encode(this: *const @This(), writer: anytype) anyerror!void { - try writer.writeInt(this.id); - try writer.writeValue(@TypeOf(this.file_path), this.file_path); - } - }; - - pub const WebsocketMessageResolveId = packed struct { - /// id - id: u32 = 0, - - pub fn decode(reader: anytype) anyerror!WebsocketMessageResolveId { - var this = std.mem.zeroes(WebsocketMessageResolveId); - - this.id = try reader.readValue(u32); - return this; - } - - pub fn encode(this: *const @This(), writer: anytype) anyerror!void { - try writer.writeInt(this.id); - } - }; - - pub const NpmRegistry = struct { - /// url - url: []const u8, - - /// username - username: []const u8, - - /// password - password: []const u8, - - /// token - token: []const u8, - - pub fn decode(reader: anytype) anyerror!NpmRegistry { - var this = std.mem.zeroes(NpmRegistry); - - this.url = try reader.readValue([]const u8); - this.username = try reader.readValue([]const u8); - this.password = try reader.readValue([]const u8); - this.token = try reader.readValue([]const u8); - return this; - } - - pub fn encode(this: *const @This(), writer: anytype) anyerror!void { - try writer.writeValue(@TypeOf(this.url), this.url); - try writer.writeValue(@TypeOf(this.username), this.username); - try writer.writeValue(@TypeOf(this.password), this.password); - try writer.writeValue(@TypeOf(this.token), this.token); - } - }; - - pub const NpmRegistryMap = struct { - /// scopes - scopes: []const []const u8, - - /// registries - registries: []const NpmRegistry, - - pub fn decode(reader: anytype) anyerror!NpmRegistryMap { - var this = std.mem.zeroes(NpmRegistryMap); - - this.scopes = try reader.readArray([]const u8); - this.registries = try reader.readArray(NpmRegistry); - return this; - } - - pub fn encode(this: *const @This(), writer: anytype) anyerror!void { - try writer.writeArray([]const u8, this.scopes); - try writer.writeArray(NpmRegistry, this.registries); - } - }; - - pub const BunInstall = struct { - /// default_registry - default_registry: ?NpmRegistry = null, - - /// scoped - scoped: ?NpmRegistryMap = null, - - /// lockfile_path - lockfile_path: ?[]const u8 = null, - - /// save_lockfile_path - save_lockfile_path: ?[]const u8 = null, - - /// cache_directory - cache_directory: ?[]const u8 = null, - - /// dry_run - dry_run: ?bool = null, - - /// force - force: ?bool = null, - - /// save_dev - save_dev: ?bool = null, - - /// save_optional - save_optional: ?bool = null, - - /// save_peer - save_peer: ?bool = null, - - /// save_lockfile - save_lockfile: ?bool = null, - - /// production - production: ?bool = null, - - /// save_yarn_lockfile - save_yarn_lockfile: ?bool = null, - - /// native_bin_links - native_bin_links: []const []const u8, - - /// disable_cache - disable_cache: ?bool = null, - - /// disable_manifest_cache - disable_manifest_cache: ?bool = null, - - /// global_dir - global_dir: ?[]const u8 = null, - - /// global_bin_dir - global_bin_dir: ?[]const u8 = null, - - /// frozen_lockfile - frozen_lockfile: ?bool = null, - - pub fn decode(reader: anytype) anyerror!BunInstall { - var this = std.mem.zeroes(BunInstall); - - while (true) { - switch (try reader.readByte()) { - 0 => { - return this; - }, - - 1 => { - this.default_registry = try reader.readValue(NpmRegistry); - }, - 2 => { - this.scoped = try reader.readValue(NpmRegistryMap); - }, - 3 => { - this.lockfile_path = try reader.readValue([]const u8); - }, - 4 => { - this.save_lockfile_path = try reader.readValue([]const u8); - }, - 5 => { - this.cache_directory = try reader.readValue([]const u8); - }, - 6 => { - this.dry_run = try reader.readValue(bool); - }, - 7 => { - this.force = try reader.readValue(bool); - }, - 8 => { - this.save_dev = try reader.readValue(bool); - }, - 9 => { - this.save_optional = try reader.readValue(bool); - }, - 10 => { - this.save_peer = try reader.readValue(bool); - }, - 11 => { - this.save_lockfile = try reader.readValue(bool); - }, - 12 => { - this.production = try reader.readValue(bool); - }, - 13 => { - this.save_yarn_lockfile = try reader.readValue(bool); - }, - 14 => { - this.native_bin_links = try reader.readArray([]const u8); - }, - 15 => { - this.disable_cache = try reader.readValue(bool); - }, - 16 => { - this.disable_manifest_cache = try reader.readValue(bool); - }, - 17 => { - this.global_dir = try reader.readValue([]const u8); - }, - 18 => { - this.global_bin_dir = try reader.readValue([]const u8); - }, - 19 => { - this.frozen_lockfile = try reader.readValue(bool); - }, - else => { - return error.InvalidMessage; - }, - } - } - unreachable; - } - - pub fn encode(this: *const @This(), writer: anytype) anyerror!void { - if (this.default_registry) |default_registry| { - try writer.writeFieldID(1); - try writer.writeValue(@TypeOf(default_registry), default_registry); - } - if (this.scoped) |scoped| { - try writer.writeFieldID(2); - try writer.writeValue(@TypeOf(scoped), scoped); - } - if (this.lockfile_path) |lockfile_path| { - try writer.writeFieldID(3); - try writer.writeValue(@TypeOf(lockfile_path), lockfile_path); - } - if (this.save_lockfile_path) |save_lockfile_path| { - try writer.writeFieldID(4); - try writer.writeValue(@TypeOf(save_lockfile_path), save_lockfile_path); - } - if (this.cache_directory) |cache_directory| { - try writer.writeFieldID(5); - try writer.writeValue(@TypeOf(cache_directory), cache_directory); - } - if (this.dry_run) |dry_run| { - try writer.writeFieldID(6); - try writer.writeInt(@as(u8, @intFromBool(dry_run))); - } - if (this.force) |force| { - try writer.writeFieldID(7); - try writer.writeInt(@as(u8, @intFromBool(force))); - } - if (this.save_dev) |save_dev| { - try writer.writeFieldID(8); - try writer.writeInt(@as(u8, @intFromBool(save_dev))); - } - if (this.save_optional) |save_optional| { - try writer.writeFieldID(9); - try writer.writeInt(@as(u8, @intFromBool(save_optional))); - } - if (this.save_peer) |save_peer| { - try writer.writeFieldID(10); - try writer.writeInt(@as(u8, @intFromBool(save_peer))); - } - if (this.save_lockfile) |save_lockfile| { - try writer.writeFieldID(11); - try writer.writeInt(@as(u8, @intFromBool(save_lockfile))); - } - if (this.production) |production| { - try writer.writeFieldID(12); - try writer.writeInt(@as(u8, @intFromBool(production))); - } - if (this.save_yarn_lockfile) |save_yarn_lockfile| { - try writer.writeFieldID(13); - try writer.writeInt(@as(u8, @intFromBool(save_yarn_lockfile))); - } - if (this.native_bin_links) |native_bin_links| { - try writer.writeFieldID(14); - try writer.writeArray([]const u8, native_bin_links); - } - if (this.disable_cache) |disable_cache| { - try writer.writeFieldID(15); - try writer.writeInt(@as(u8, @intFromBool(disable_cache))); - } - if (this.disable_manifest_cache) |disable_manifest_cache| { - try writer.writeFieldID(16); - try writer.writeInt(@as(u8, @intFromBool(disable_manifest_cache))); - } - if (this.global_dir) |global_dir| { - try writer.writeFieldID(17); - try writer.writeValue(@TypeOf(global_dir), global_dir); - } - if (this.global_bin_dir) |global_bin_dir| { - try writer.writeFieldID(18); - try writer.writeValue(@TypeOf(global_bin_dir), global_bin_dir); - } - if (this.frozen_lockfile) |frozen_lockfile| { - try writer.writeFieldID(19); - try writer.writeInt(@as(u8, @boolToInt(frozen_lockfile))); - } - try writer.endMessage(); - } - }; -}; diff --git a/src/api/demo/styles/Home.module.css b/src/api/demo/styles/Home.module.css deleted file mode 100644 index a2a622da0c202..0000000000000 --- a/src/api/demo/styles/Home.module.css +++ /dev/null @@ -1,122 +0,0 @@ -.container { - min-height: 100vh; - padding: 0 0.5rem; - display: flex; - flex-direction: column; - justify-content: center; - align-items: center; - height: 100vh; -} - -.main { - padding: 5rem 0; - flex: 1; - display: flex; - flex-direction: column; - justify-content: center; - align-items: center; -} - -.footer { - width: 100%; - height: 100px; - border-top: 1px solid #eaeaea; - display: flex; - justify-content: center; - align-items: center; -} - -.footer a { - display: flex; - justify-content: center; - align-items: center; - flex-grow: 1; -} - -.title a { - color: #0070f3; - text-decoration: none; -} - -.title a:hover, -.title a:focus, -.title a:active { - text-decoration: underline; -} - -.title { - margin: 0; - line-height: 1.15; - font-size: 4rem; -} - -.title, -.description { - text-align: center; -} - -.description { - line-height: 1.5; - font-size: 1.5rem; -} - -.code { - background: #fafafa; - border-radius: 5px; - padding: 0.75rem; - font-size: 1.1rem; - font-family: Menlo, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono, - Bitstream Vera Sans Mono, Courier New, monospace; -} - -.grid { - display: flex; - align-items: center; - justify-content: center; - flex-wrap: wrap; - max-width: 800px; - margin-top: 3rem; -} - -.card { - margin: 1rem; - padding: 1.5rem; - text-align: left; - color: inherit; - text-decoration: none; - border: 1px solid #eaeaea; - border-radius: 10px; - transition: color 0.15s ease, border-color 0.15s ease; - width: 45%; -} - -.card:hover, -.card:focus, -.card:active { - color: #0070f3; - border-color: #0070f3; -} - -.card h2 { - margin: 0 0 1rem 0; - font-size: 1.5rem; -} - -.card p { - margin: 0; - font-size: 1.25rem; - line-height: 1.5; -} - -.logo { - height: 1em; - margin-left: 0.5rem; -} - -@media (max-width: 600px) { - .grid { - width: 100%; - flex-direction: column; - } -} - diff --git a/src/api/demo/styles/globals.css b/src/api/demo/styles/globals.css deleted file mode 100644 index e5e2dcc23baf1..0000000000000 --- a/src/api/demo/styles/globals.css +++ /dev/null @@ -1,16 +0,0 @@ -html, -body { - padding: 0; - margin: 0; - font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, - Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif; -} - -a { - color: inherit; - text-decoration: none; -} - -* { - box-sizing: border-box; -} diff --git a/src/api/demo/tsconfig.json b/src/api/demo/tsconfig.json deleted file mode 100644 index 4fa2cd0094d3d..0000000000000 --- a/src/api/demo/tsconfig.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "compilerOptions": { - "target": "ES2020", - "lib": [ - "dom", - "dom.iterable", - "esnext" - ], - "allowJs": true, - "skipLibCheck": true, - "strict": true, - "noImplicitAny": false, - "forceConsistentCasingInFileNames": true, - "noEmit": true, - "esModuleInterop": true, - "module": "esnext", - "moduleResolution": "node", - "resolveJsonModule": true, - "isolatedModules": true, - "jsx": "preserve", - "types": [ - "bun-types" - ], - "incremental": true - }, - "include": [ - "next-env.d.ts", - "**/*.ts", - "**/*.tsx" - ], - "exclude": [ - "node_modules" - ] -} \ No newline at end of file From e682ffb61c8cfd92d0a2787503a5e7ac611dff9e Mon Sep 17 00:00:00 2001 From: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> Date: Sun, 25 Jun 2023 17:54:21 -0700 Subject: [PATCH 12/15] Update schema.zig --- src/api/schema.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/api/schema.zig b/src/api/schema.zig index 708d32ca07d43..2de80d42cb414 100644 --- a/src/api/schema.zig +++ b/src/api/schema.zig @@ -3053,7 +3053,7 @@ pub const Api = struct { } if (this.frozen_lockfile) |frozen_lockfile| { try writer.writeFieldID(19); - try writer.writeInt(@as(u8, @boolToInt(frozen_lockfile))); + try writer.writeInt(@as(u8, @intFromBool(frozen_lockfile))); } try writer.endMessage(); } From f2285a6d71eba0abc27bc449e9a50116447decf8 Mon Sep 17 00:00:00 2001 From: Jarred Sumner Date: Sun, 25 Jun 2023 17:54:55 -0700 Subject: [PATCH 13/15] Use bun.String in mkdir (#3404) Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> --- src/bun.js/node/node_fs.zig | 32 +++++++++++++++++++------------- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/src/bun.js/node/node_fs.zig b/src/bun.js/node/node_fs.zig index 1298c5d450e90..13d785e977e31 100644 --- a/src/bun.js/node/node_fs.zig +++ b/src/bun.js/node/node_fs.zig @@ -2368,7 +2368,7 @@ const Return = struct { pub const Lchown = void; pub const Link = void; pub const Lstat = Stats; - pub const Mkdir = string; + pub const Mkdir = bun.String; pub const Mkdtemp = JSC.ZigString; pub const Open = FileDescriptor; pub const WriteFile = void; @@ -2997,7 +2997,7 @@ pub const NodeFS = struct { .sync => { const path = args.path.sliceZ(&this.sync_error_buf); return switch (Syscall.mkdir(path, args.mode)) { - .result => Maybe(Return.Mkdir){ .result = "" }, + .result => Maybe(Return.Mkdir){ .result = bun.String.empty }, .err => |err| Maybe(Return.Mkdir){ .err = err }, }; }, @@ -3031,14 +3031,19 @@ pub const NodeFS = struct { }, .EXIST => { - return Option{ .result = "" }; + return Option{ .result = bun.String.empty }; }, // continue .NOENT => {}, } }, .result => { - return Option{ .result = args.path.slice() }; + return Option{ + .result = if (args.path == .slice_with_underlying_string) + args.path.slice_with_underlying_string.underlying + else + bun.String.create(args.path.slice()), + }; }, } @@ -3111,10 +3116,9 @@ pub const NodeFS = struct { switch (err.getErrno()) { // handle the race condition .EXIST => { - var display_path: []const u8 = ""; + var display_path = bun.String.empty; if (first_match != std.math.maxInt(u16)) { - // TODO: this leaks memory - display_path = bun.default_allocator.dupe(u8, display_path[0..first_match]) catch unreachable; + display_path = bun.String.create(working_mem[0..first_match]); } return Option{ .result = display_path }; }, @@ -3126,12 +3130,14 @@ pub const NodeFS = struct { } }, .result => { - var display_path = args.path.slice(); - if (first_match != std.math.maxInt(u16)) { - // TODO: this leaks memory - display_path = bun.default_allocator.dupe(u8, display_path[0..first_match]) catch unreachable; - } - return Option{ .result = display_path }; + return Option{ + .result = if (first_match != std.math.maxInt(u16)) + bun.String.create(working_mem[0..first_match]) + else if (args.path == .slice_with_underlying_string) + args.path.slice_with_underlying_string.underlying + else + bun.String.create(args.path.slice()), + }; }, } }, From 116bcf424564a5f38ddf5f99f34453c175526fdc Mon Sep 17 00:00:00 2001 From: Jarred Sumner Date: Sun, 25 Jun 2023 18:49:16 -0700 Subject: [PATCH 14/15] Fixes #3334 (#3401) Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> --- src/bun.js/api/html_rewriter.zig | 97 +++++++++++++++++---------- test/js/workerd/html-rewriter.test.js | 21 ++++++ 2 files changed, 84 insertions(+), 34 deletions(-) diff --git a/src/bun.js/api/html_rewriter.zig b/src/bun.js/api/html_rewriter.zig index d09c14e42076f..5e14d5503e0f4 100644 --- a/src/bun.js/api/html_rewriter.zig +++ b/src/bun.js/api/html_rewriter.zig @@ -106,7 +106,7 @@ pub const HTMLRewriter = struct { var selector = LOLHTML.HTMLSelector.parse(selector_slice) catch return throwLOLHTMLError(global); - var handler_ = ElementHandler.init(global, listener, exception); + var handler_ = ElementHandler.init(global, listener, exception) catch return .zero; if (exception.* != null) { selector.deinit(); return JSValue.fromRef(exception.*); @@ -154,7 +154,7 @@ pub const HTMLRewriter = struct { thisObject: JSC.C.JSObjectRef, exception: JSC.C.ExceptionRef, ) JSValue { - var handler_ = DocumentHandler.init(global, listener, exception); + var handler_ = DocumentHandler.init(global, listener, exception) catch return .zero; if (exception.* != null) { return JSValue.fromRef(exception.*); } @@ -446,10 +446,14 @@ pub const HTMLRewriter = struct { }, }; - result.body.init.headers = original.body.init.headers; result.body.init.method = original.body.init.method; result.body.init.status_code = original.body.init.status_code; + // https://github.com/oven-sh/bun/issues/3334 + if (original.body.init.headers) |headers| { + result.body.init.headers = headers.cloneThis(global); + } + result.url = bun.default_allocator.dupe(u8, original.url) catch unreachable; result.status_text = bun.default_allocator.dupe(u8, original.status_text) catch unreachable; @@ -723,29 +727,44 @@ const DocumentHandler = struct { "onEndCallback", ); - pub fn init(global: *JSGlobalObject, thisObject: JSValue, exception: JSC.C.ExceptionRef) DocumentHandler { + pub fn init(global: *JSGlobalObject, thisObject: JSValue, exception: JSC.C.ExceptionRef) !DocumentHandler { var handler = DocumentHandler{ .thisObject = thisObject, .global = global, }; - switch (thisObject.jsType()) { - .Object, .ProxyObject, .Cell, .FinalObject => {}, - else => |kind| { - JSC.throwInvalidArguments( - "Expected object but received {s}", - .{@as(string, @tagName(kind))}, - global, - exception, - ); - return undefined; - }, + if (!thisObject.isObject()) { + JSC.throwInvalidArguments( + "Expected object", + .{}, + global, + exception, + ); + return error.InvalidArguments; + } + + errdefer { + if (handler.onDocTypeCallback) |cb| { + cb.unprotect(); + } + + if (handler.onCommentCallback) |cb| { + cb.unprotect(); + } + + if (handler.onTextCallback) |cb| { + cb.unprotect(); + } + + if (handler.onEndCallback) |cb| { + cb.unprotect(); + } } if (thisObject.get(global, "doctype")) |val| { if (val.isUndefinedOrNull() or !val.isCell() or !val.isCallable(global.vm())) { JSC.throwInvalidArguments("doctype must be a function", .{}, global, exception); - return undefined; + return error.InvalidArguments; } JSC.C.JSValueProtect(global, val.asObjectRef()); handler.onDocTypeCallback = val; @@ -754,7 +773,7 @@ const DocumentHandler = struct { if (thisObject.get(global, "comments")) |val| { if (val.isUndefinedOrNull() or !val.isCell() or !val.isCallable(global.vm())) { JSC.throwInvalidArguments("comments must be a function", .{}, global, exception); - return undefined; + return error.InvalidArguments; } JSC.C.JSValueProtect(global, val.asObjectRef()); handler.onCommentCallback = val; @@ -763,7 +782,7 @@ const DocumentHandler = struct { if (thisObject.get(global, "text")) |val| { if (val.isUndefinedOrNull() or !val.isCell() or !val.isCallable(global.vm())) { JSC.throwInvalidArguments("text must be a function", .{}, global, exception); - return undefined; + return error.InvalidArguments; } JSC.C.JSValueProtect(global, val.asObjectRef()); handler.onTextCallback = val; @@ -772,7 +791,7 @@ const DocumentHandler = struct { if (thisObject.get(global, "end")) |val| { if (val.isUndefinedOrNull() or !val.isCell() or !val.isCallable(global.vm())) { JSC.throwInvalidArguments("end must be a function", .{}, global, exception); - return undefined; + return error.InvalidArguments; } JSC.C.JSValueProtect(global, val.asObjectRef()); handler.onEndCallback = val; @@ -863,29 +882,39 @@ const ElementHandler = struct { global: *JSGlobalObject, ctx: ?*HTMLRewriter.BufferOutputSink = null, - pub fn init(global: *JSGlobalObject, thisObject: JSValue, exception: JSC.C.ExceptionRef) ElementHandler { + pub fn init(global: *JSGlobalObject, thisObject: JSValue, exception: JSC.C.ExceptionRef) !ElementHandler { var handler = ElementHandler{ .thisObject = thisObject, .global = global, }; + errdefer { + if (handler.onCommentCallback) |cb| { + cb.unprotect(); + } - switch (thisObject.jsType()) { - .Object, .ProxyObject, .Cell, .FinalObject => {}, - else => |kind| { - JSC.throwInvalidArguments( - "Expected object but received {s}", - .{@as(string, @tagName(kind))}, - global, - exception, - ); - return undefined; - }, + if (handler.onElementCallback) |cb| { + cb.unprotect(); + } + + if (handler.onTextCallback) |cb| { + cb.unprotect(); + } + } + + if (!thisObject.isObject()) { + JSC.throwInvalidArguments( + "Expected object", + .{}, + global, + exception, + ); + return error.InvalidArguments; } if (thisObject.get(global, "element")) |val| { if (val.isUndefinedOrNull() or !val.isCell() or !val.isCallable(global.vm())) { JSC.throwInvalidArguments("element must be a function", .{}, global, exception); - return undefined; + return error.InvalidArguments; } JSC.C.JSValueProtect(global, val.asObjectRef()); handler.onElementCallback = val; @@ -894,7 +923,7 @@ const ElementHandler = struct { if (thisObject.get(global, "comments")) |val| { if (val.isUndefinedOrNull() or !val.isCell() or !val.isCallable(global.vm())) { JSC.throwInvalidArguments("comments must be a function", .{}, global, exception); - return undefined; + return error.InvalidArguments; } JSC.C.JSValueProtect(global, val.asObjectRef()); handler.onCommentCallback = val; @@ -903,7 +932,7 @@ const ElementHandler = struct { if (thisObject.get(global, "text")) |val| { if (val.isUndefinedOrNull() or !val.isCell() or !val.isCallable(global.vm())) { JSC.throwInvalidArguments("text must be a function", .{}, global, exception); - return undefined; + return error.InvalidArguments; } JSC.C.JSValueProtect(global, val.asObjectRef()); handler.onTextCallback = val; diff --git a/test/js/workerd/html-rewriter.test.js b/test/js/workerd/html-rewriter.test.js index b6131a09f58b6..3f7b7493dc405 100644 --- a/test/js/workerd/html-rewriter.test.js +++ b/test/js/workerd/html-rewriter.test.js @@ -316,3 +316,24 @@ describe("HTMLRewriter", () => { expect(lastInTextNode).toBeBoolean(); }); }); + +// By not segfaulting, this test passes +it("#3334 regression", async () => { + for (let i = 0; i < 10; i++) { + const headers = new Headers({ + "content-type": "text/html", + }); + const response = new Response("
content
", { headers }); + + const result = await new HTMLRewriter() + .on("div", { + element(elem) { + elem.setInnerContent("new"); + }, + }) + .transform(response) + .text(); + expect(result).toEqual("
new
"); + } + Bun.gc(true); +}); From 76626ac54b83a5a9a24abee1bc35f13a2196504d Mon Sep 17 00:00:00 2001 From: Jarred Sumner Date: Sun, 25 Jun 2023 19:48:56 -0700 Subject: [PATCH 15/15] Fix test failures in import.meta (#3403) * Fix test failures in import.meta * regenerate * Use bound functions for `import.meta.require` and `import.meta.require.resolve` and `Module.createRequire` --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> --- src/bun.js/bindings/ImportMetaObject.cpp | 193 ++++++++++------ src/bun.js/bindings/ImportMetaObject.h | 4 +- src/bun.js/bindings/ZigGlobalObject.cpp | 17 +- src/bun.js/bindings/ZigGlobalObject.h | 6 +- src/bun.js/modules/NodeModuleModule.cpp | 23 +- src/js/builtins/ImportMetaObject.ts | 11 +- src/js/builtins/Module.ts | 4 +- src/js/out/WebCoreJSBuiltins.cpp | 238 ++++++++++---------- src/js/out/modules/node/assert.js | 84 +++---- src/js/out/modules/node/crypto.js | 8 +- src/js/out/modules/node/path.js | 2 +- src/js/out/modules/node/path.posix.js | 2 +- src/js/out/modules/node/stream.consumers.js | 2 +- src/js/out/modules/node/stream.js | 4 +- src/js/out/modules/node/util.js | 32 +-- test/js/bun/resolve/import-meta.test.js | 11 +- 16 files changed, 350 insertions(+), 291 deletions(-) diff --git a/src/bun.js/bindings/ImportMetaObject.cpp b/src/bun.js/bindings/ImportMetaObject.cpp index d201dafca381c..037305c81008a 100644 --- a/src/bun.js/bindings/ImportMetaObject.cpp +++ b/src/bun.js/bindings/ImportMetaObject.cpp @@ -59,6 +59,7 @@ static EncodedJSValue functionRequireResolve(JSC::JSGlobalObject* globalObject, return JSC::JSValue::encode(JSC::JSValue {}); } default: { + JSValue thisValue = callFrame->thisValue(); JSC::JSValue moduleName = callFrame->argument(0); auto doIt = [&](const WTF::String& fromStr) -> JSC::EncodedJSValue { @@ -130,7 +131,14 @@ Zig::ImportMetaObject* Zig::ImportMetaObject::create(JSC::JSGlobalObject* global JSC_DECLARE_HOST_FUNCTION(jsFunctionRequireResolve); JSC_DEFINE_HOST_FUNCTION(jsFunctionRequireResolve, (JSC::JSGlobalObject * globalObject, JSC::CallFrame* callFrame)) { - return functionRequireResolve(globalObject, callFrame, callFrame->thisValue().toWTFString(globalObject)); + JSValue thisValue = callFrame->thisValue(); + WTF::String fromStr; + + if (thisValue.isString()) { + fromStr = thisValue.toWTFString(globalObject); + } + + return functionRequireResolve(globalObject, callFrame, fromStr); } JSC_DEFINE_CUSTOM_GETTER(jsRequireCacheGetter, (JSC::JSGlobalObject * globalObject, JSC::EncodedJSValue thisValue, JSC::PropertyName)) @@ -224,32 +232,49 @@ class ResolveFunction final : public JSC::InternalFunction { } }; -Structure* Zig::ImportMetaObject::createRequireFunctionStructure(VM& vm, JSGlobalObject* globalObject) +JSObject* Zig::ImportMetaObject::createRequireResolveFunctionUnbound(VM& vm, JSGlobalObject* globalObject) { - - return nullptr; + return ResolveFunction::create(globalObject); } -JSObject* Zig::ImportMetaObject::createRequireFunction(VM& vm, JSGlobalObject* lexicalGlobalObject, const WTF::String& pathString) +JSObject* Zig::ImportMetaObject::createRequireFunctionUnbound(VM& vm, JSGlobalObject* globalObject) { - auto* globalObject = lexicalGlobalObject; - JSFunction* requireFunction = JSFunction::create(vm, importMetaObjectRequireCodeGenerator(vm), lexicalGlobalObject); + auto& builtinNames = WebCore::builtinNames(vm); JSC::JSFunction* requireDotMainFunction = JSFunction::create( vm, moduleMainCodeGenerator(vm), globalObject->globalScope()); - requireFunction->putDirect( + auto* prototype = JSC::constructEmptyObject(globalObject, globalObject->functionPrototype()); + prototype->putDirect( vm, JSC::Identifier::fromString(vm, "main"_s), JSC::GetterSetter::create(vm, globalObject, requireDotMainFunction, JSValue()), PropertyAttribute::Builtin | PropertyAttribute::Accessor | PropertyAttribute::ReadOnly | 0); + prototype->putDirect(vm, JSC::Identifier::fromString(vm, "extensions"_s), constructEmptyObject(globalObject), 0); + prototype->putDirectCustomAccessor(vm, JSC::Identifier::fromString(vm, "cache"_s), JSC::CustomGetterSetter::create(vm, Zig::jsRequireCacheGetter, Zig::jsRequireCacheSetter), 0); + return JSFunction::create(vm, importMetaObjectRequireCodeGenerator(vm), globalObject, JSFunction::createStructure(vm, globalObject, prototype)); +} + +JSObject* Zig::ImportMetaObject::createRequireFunction(VM& vm, JSGlobalObject* lexicalGlobalObject, const WTF::String& pathString) +{ + auto* globalObject = jsCast(lexicalGlobalObject); + auto& builtinNames = WebCore::builtinNames(vm); + + JSFunction* resolveFunctionUnbound = jsCast(globalObject->importMetaRequireResolveFunctionUnbound()); + JSFunction* requireFunctionUnbound = jsCast(globalObject->importMetaRequireFunctionUnbound()); + auto str = jsString(vm, pathString); + + JSFunction* requireFunction = JSC::JSBoundFunction::create(vm, + globalObject, requireFunctionUnbound, + str, ArgList(), 1, jsString(vm, String("require"_s))); - requireFunction->putDirect(vm, JSC::Identifier::fromString(vm, "extensions"_s), JSC::constructEmptyObject(globalObject), 0); - requireFunction->putDirectCustomAccessor(vm, JSC::Identifier::fromString(vm, "cache"_s), JSC::CustomGetterSetter::create(vm, Zig::jsRequireCacheGetter, Zig::jsRequireCacheSetter), 0); - requireFunction->putDirect(vm, JSC::Identifier::fromString(vm, "resolve"_s), ResolveFunction::create(globalObject), JSC::PropertyAttribute::Function | 0); - requireFunction->putDirect(vm, JSC::Identifier::fromString(vm, "path"_s), jsString(vm, pathString)); + JSFunction* resolveFunction = JSC::JSBoundFunction::create(vm, + globalObject, resolveFunctionUnbound, + str, ArgList(), 2, jsString(vm, String("resolve"_s))); + + requireFunction->putDirect(vm, builtinNames.resolvePublicName(), resolveFunction, PropertyAttribute::Function | 0); return requireFunction; } @@ -262,84 +287,107 @@ extern "C" EncodedJSValue functionImportMeta__resolveSync(JSC::JSGlobalObject* g JSC::VM& vm = globalObject->vm(); auto scope = DECLARE_THROW_SCOPE(globalObject->vm()); - switch (callFrame->argumentCount()) { - case 0: { + JSValue thisValue = callFrame->thisValue(); + JSC::JSValue moduleName = callFrame->argument(0); + JSC::JSValue fromValue = callFrame->argument(1); - // not "requires" because "require" could be confusing - JSC::throwTypeError(globalObject, scope, "needs 1 argument (a string)"_s); + if (moduleName.isUndefinedOrNull()) { + JSC::throwTypeError(globalObject, scope, "expects a string"_s); scope.release(); return JSC::JSValue::encode(JSC::JSValue {}); } - default: { - JSC::JSValue moduleName = callFrame->argument(0); - if (moduleName.isUndefinedOrNull()) { - JSC::throwTypeError(globalObject, scope, "expects a string"_s); - scope.release(); - return JSC::JSValue::encode(JSC::JSValue {}); - } + JSC__JSValue from; + bool isESM = true; - JSC__JSValue from; - bool isESM = true; + if (callFrame->argumentCount() > 1) { - if (callFrame->argumentCount() > 1) { - JSC::JSValue fromValue = callFrame->argument(1); - - if (callFrame->argumentCount() > 2) { - JSC::JSValue isESMValue = callFrame->argument(2); - if (isESMValue.isBoolean()) { - isESM = isESMValue.toBoolean(globalObject); - RETURN_IF_EXCEPTION(scope, JSC::JSValue::encode(JSC::JSValue {})); - } + if (callFrame->argumentCount() > 2) { + JSC::JSValue isESMValue = callFrame->argument(2); + if (isESMValue.isBoolean()) { + isESM = isESMValue.toBoolean(globalObject); + RETURN_IF_EXCEPTION(scope, JSC::JSValue::encode(JSC::JSValue {})); } + } - if (!fromValue.isUndefinedOrNull() && fromValue.isObject()) { + if (!fromValue.isUndefinedOrNull() && fromValue.isObject()) { - if (auto pathsObject = fromValue.getObject()->getIfPropertyExists(globalObject, JSC::Identifier::fromString(vm, "paths"_s))) { - if (pathsObject.isCell() && pathsObject.asCell()->type() == JSC::JSType::ArrayType) { - auto pathsArray = JSC::jsCast(pathsObject); - if (pathsArray->length() > 0) { - fromValue = pathsArray->getIndex(globalObject, 0); - RETURN_IF_EXCEPTION(scope, JSC::JSValue::encode(JSC::JSValue {})); - } + if (auto pathsObject = fromValue.getObject()->getIfPropertyExists(globalObject, JSC::Identifier::fromString(vm, "paths"_s))) { + if (pathsObject.isCell() && pathsObject.asCell()->type() == JSC::JSType::ArrayType) { + auto pathsArray = JSC::jsCast(pathsObject); + if (pathsArray->length() > 0) { + fromValue = pathsArray->getIndex(globalObject, 0); + RETURN_IF_EXCEPTION(scope, JSC::JSValue::encode(JSC::JSValue {})); } } - - } else if (fromValue.isBoolean()) { - isESM = fromValue.toBoolean(globalObject); - RETURN_IF_EXCEPTION(scope, JSC::JSValue::encode(JSC::JSValue {})); - } - - if (fromValue.isString()) { - from = JSC::JSValue::encode(fromValue); } - } else { - JSC::JSObject* thisObject = JSC::jsDynamicCast(callFrame->thisValue()); - if (UNLIKELY(!thisObject)) { - auto scope = DECLARE_THROW_SCOPE(globalObject->vm()); - JSC::throwTypeError(globalObject, scope, "import.meta.resolveSync must be bound to an import.meta object"_s); - return JSC::JSValue::encode(JSC::JSValue {}); - } - - auto clientData = WebCore::clientData(vm); - JSValue pathProperty = thisObject->getIfPropertyExists(globalObject, clientData->builtinNames().pathPublicName()); - - if (pathProperty && pathProperty.isString()) - from = JSC::JSValue::encode(pathProperty); + } else if (fromValue.isBoolean()) { + isESM = fromValue.toBoolean(globalObject); + RETURN_IF_EXCEPTION(scope, JSC::JSValue::encode(JSC::JSValue {})); + fromValue = JSC::jsUndefined(); } - auto result = Bun__resolveSync(globalObject, JSC::JSValue::encode(moduleName), from, isESM); + if (fromValue.isString()) { + from = JSC::JSValue::encode(fromValue); + } else if (thisValue.isString()) { + from = JSC::JSValue::encode(thisValue); + } - if (!JSC::JSValue::decode(result).isString()) { - JSC::throwException(globalObject, scope, JSC::JSValue::decode(result)); + } else if (thisValue.isString()) { + from = JSC::JSValue::encode(thisValue); + } else { + JSC::JSObject* thisObject = JSC::jsDynamicCast(thisValue); + if (UNLIKELY(!thisObject)) { + auto scope = DECLARE_THROW_SCOPE(globalObject->vm()); + JSC::throwTypeError(globalObject, scope, "import.meta.resolveSync must be bound to an import.meta object"_s); return JSC::JSValue::encode(JSC::JSValue {}); } + auto clientData = WebCore::clientData(vm); + JSValue pathProperty = thisObject->getIfPropertyExists(globalObject, clientData->builtinNames().pathPublicName()); + + if (pathProperty && pathProperty.isString()) + from = JSC::JSValue::encode(pathProperty); + } + + auto result = Bun__resolveSync(globalObject, JSC::JSValue::encode(moduleName), from, isESM); + + if (!JSC::JSValue::decode(result).isString()) { + JSC::throwException(globalObject, scope, JSC::JSValue::decode(result)); + return JSC::JSValue::encode(JSC::JSValue {}); + } + + scope.release(); + return result; +} + +extern "C" EncodedJSValue functionImportMeta__resolveSyncPrivate(JSC::JSGlobalObject* globalObject, JSC::CallFrame* callFrame) +{ + JSC::VM& vm = globalObject->vm(); + auto scope = DECLARE_THROW_SCOPE(globalObject->vm()); + + JSC::JSValue moduleName = callFrame->argument(0); + JSValue from = callFrame->argument(1); + bool isESM = callFrame->argument(2).asBoolean(); + + if (moduleName.isUndefinedOrNull()) { + JSC::throwTypeError(globalObject, scope, "expected module name as a string"_s); scope.release(); - return result; + return JSC::JSValue::encode(JSC::JSValue {}); } + + RETURN_IF_EXCEPTION(scope, JSC::JSValue::encode(JSC::JSValue {})); + + auto result = Bun__resolveSync(globalObject, JSC::JSValue::encode(moduleName), JSValue::encode(from), isESM); + + if (!JSC::JSValue::decode(result).isString()) { + JSC::throwException(globalObject, scope, JSC::JSValue::decode(result)); + return JSC::JSValue::encode(JSC::JSValue {}); } + + scope.release(); + return result; } JSC_DECLARE_HOST_FUNCTION(functionImportMeta__resolve); @@ -536,7 +584,16 @@ void ImportMetaObject::finishCreation(VM& vm) this->requireProperty.initLater([](const JSC::LazyProperty::Initializer& init) { ImportMetaObject* meta = jsCast(init.owner); - JSFunction* value = jsCast(ImportMetaObject::createRequireFunction(init.vm, meta->globalObject(), meta->url)); + + WTF::URL url = meta->url.startsWith('/') ? WTF::URL::fileURLWithFileSystemPath(meta->url) : WTF::URL(meta->url); + WTF::StringView path; + if (url.protocolIs("file"_s)) { + path = url.fileSystemPath(); + } else { + path = url.path(); + } + + JSFunction* value = jsCast(ImportMetaObject::createRequireFunction(init.vm, meta->globalObject(), path.toString())); init.set(value); }); this->urlProperty.initLater([](const JSC::LazyProperty::Initializer& init) { diff --git a/src/bun.js/bindings/ImportMetaObject.h b/src/bun.js/bindings/ImportMetaObject.h index 2794ddbb6f921..6b5661039ffa5 100644 --- a/src/bun.js/bindings/ImportMetaObject.h +++ b/src/bun.js/bindings/ImportMetaObject.h @@ -9,6 +9,7 @@ #include "JSDOMWrapperCache.h" extern "C" JSC_DECLARE_HOST_FUNCTION(functionImportMeta__resolveSync); +extern "C" JSC_DECLARE_HOST_FUNCTION(functionImportMeta__resolveSyncPrivate); extern "C" JSC::EncodedJSValue Bun__resolve(JSC::JSGlobalObject* global, JSC::EncodedJSValue specifier, JSC::EncodedJSValue from, bool is_esm); extern "C" JSC::EncodedJSValue Bun__resolveSync(JSC::JSGlobalObject* global, JSC::EncodedJSValue specifier, JSC::EncodedJSValue from, bool is_esm); extern "C" JSC::EncodedJSValue Bun__resolveSyncWithSource(JSC::JSGlobalObject* global, JSC::EncodedJSValue specifier, BunString* from, bool is_esm); @@ -27,7 +28,8 @@ class ImportMetaObject final : public JSC::JSNonFinalObject { static ImportMetaObject* create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure, const WTF::String& url); - static JSC::Structure* createRequireFunctionStructure(JSC::VM& vm, JSGlobalObject* globalObject); + static JSC::JSObject* createRequireFunctionUnbound(JSC::VM& vm, JSGlobalObject* globalObject); + static JSC::JSObject* createRequireResolveFunctionUnbound(JSC::VM& vm, JSGlobalObject* globalObject); static JSObject* createRequireFunction(VM& vm, JSGlobalObject* lexicalGlobalObject, const WTF::String& pathString); static ImportMetaObject* create(JSC::JSGlobalObject* globalObject, JSC::JSString* keyString); diff --git a/src/bun.js/bindings/ZigGlobalObject.cpp b/src/bun.js/bindings/ZigGlobalObject.cpp index 401485f51c81c..38d5fb1d6729b 100644 --- a/src/bun.js/bindings/ZigGlobalObject.cpp +++ b/src/bun.js/bindings/ZigGlobalObject.cpp @@ -2975,9 +2975,15 @@ void GlobalObject::finishCreation(VM& vm) init.set(structure); }); - m_importMetaRequireStructure.initLater( - [](const JSC::LazyProperty::Initializer& init) { - init.set(Zig::ImportMetaObject::createRequireFunctionStructure(init.vm, jsCast(init.owner))); + m_importMetaRequireFunctionUnbound.initLater( + [](const JSC::LazyProperty::Initializer& init) { + init.set( + Zig::ImportMetaObject::createRequireFunctionUnbound(init.vm, init.owner)); + }); + m_importMetaRequireResolveFunctionUnbound.initLater( + [](const JSC::LazyProperty::Initializer& init) { + init.set( + Zig::ImportMetaObject::createRequireResolveFunctionUnbound(init.vm, init.owner)); }); m_importMetaObjectStructure.initLater( @@ -3559,7 +3565,7 @@ void GlobalObject::addBuiltinGlobals(JSC::VM& vm) putDirectBuiltinFunction(vm, this, builtinNames.loadCJS2ESMPrivateName(), importMetaObjectLoadCJS2ESMCodeGenerator(vm), PropertyAttribute::Builtin | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly); putDirectBuiltinFunction(vm, this, builtinNames.internalRequirePrivateName(), importMetaObjectInternalRequireCodeGenerator(vm), PropertyAttribute::Builtin | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly); putDirectNativeFunction(vm, this, builtinNames.createUninitializedArrayBufferPrivateName(), 1, functionCreateUninitializedArrayBuffer, ImplementationVisibility::Public, NoIntrinsic, PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly | PropertyAttribute::Function); - putDirectNativeFunction(vm, this, builtinNames.resolveSyncPrivateName(), 1, functionImportMeta__resolveSync, ImplementationVisibility::Public, NoIntrinsic, PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly | PropertyAttribute::Function); + putDirectNativeFunction(vm, this, builtinNames.resolveSyncPrivateName(), 1, functionImportMeta__resolveSyncPrivate, ImplementationVisibility::Public, NoIntrinsic, PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly | PropertyAttribute::Function); putDirectCustomAccessor(vm, JSC::Identifier::fromString(vm, "process"_s), JSC::CustomGetterSetter::create(vm, property_lazyProcessGetter, property_lazyProcessSetter), JSC::PropertyAttribute::CustomAccessor | 0); @@ -4033,7 +4039,8 @@ void GlobalObject::visitChildrenImpl(JSCell* cell, Visitor& visitor) thisObject->m_emitReadableNextTickFunction.visit(visitor); thisObject->m_JSBufferSubclassStructure.visit(visitor); - thisObject->m_importMetaRequireStructure.visit(visitor); + thisObject->m_importMetaRequireFunctionUnbound.visit(visitor); + thisObject->m_importMetaRequireResolveFunctionUnbound.visit(visitor); thisObject->m_importMetaObjectStructure.visit(visitor); thisObject->m_dnsObject.visit(visitor); diff --git a/src/bun.js/bindings/ZigGlobalObject.h b/src/bun.js/bindings/ZigGlobalObject.h index daf0abc5b6492..a5b802cedd5a9 100644 --- a/src/bun.js/bindings/ZigGlobalObject.h +++ b/src/bun.js/bindings/ZigGlobalObject.h @@ -248,7 +248,8 @@ class GlobalObject : public JSC::JSGlobalObject { JSC::JSFunction* emitReadableNextTickFunction() { return m_emitReadableNextTickFunction.getInitializedOnMainThread(this); } - Structure* importMetaRequireStructure() { return m_importMetaRequireStructure.getInitializedOnMainThread(this); } + JSObject* importMetaRequireFunctionUnbound() { return m_importMetaRequireFunctionUnbound.getInitializedOnMainThread(this); } + JSObject* importMetaRequireResolveFunctionUnbound() { return m_importMetaRequireResolveFunctionUnbound.getInitializedOnMainThread(this); } JSObject* lazyRequireCacheObject() { return m_lazyRequireCacheObject.getInitializedOnMainThread(this); } @@ -494,7 +495,8 @@ class GlobalObject : public JSC::JSGlobalObject { LazyProperty m_commonJSModuleObjectStructure; LazyProperty m_commonJSFunctionArgumentsStructure; - LazyProperty m_importMetaRequireStructure; + LazyProperty m_importMetaRequireFunctionUnbound; + LazyProperty m_importMetaRequireResolveFunctionUnbound; LazyProperty m_importMetaObjectStructure; DOMGuardedObjectSet m_guardedObjects WTF_GUARDED_BY_LOCK(m_gcLock); diff --git a/src/bun.js/modules/NodeModuleModule.cpp b/src/bun.js/modules/NodeModuleModule.cpp index f11277709b703..8b278ddd813b2 100644 --- a/src/bun.js/modules/NodeModuleModule.cpp +++ b/src/bun.js/modules/NodeModuleModule.cpp @@ -19,24 +19,12 @@ JSC_DEFINE_HOST_FUNCTION(jsFunctionNodeModuleCreateRequire, return JSC::JSValue::encode(JSC::jsUndefined()); } - auto str = callFrame->uncheckedArgument(0).toStringOrNull(globalObject); + auto val = callFrame->uncheckedArgument(0).toWTFString(globalObject); RETURN_IF_EXCEPTION(scope, JSC::JSValue::encode(JSC::jsUndefined())); - WTF::String val = str->value(globalObject); - auto *meta = Zig::ImportMetaObject::create(globalObject, str); auto clientData = WebCore::clientData(vm); - auto requireFunction = - Zig::ImportMetaObject::createRequireFunction(vm, globalObject, val); - auto nameStr = jsCast(requireFunction)->name(vm); - JSC::JSBoundFunction *boundRequireFunction = - JSC::JSBoundFunction::create(vm, globalObject, requireFunction, meta, - ArgList(), 0, jsString(vm, nameStr)); - boundRequireFunction->putDirect( - vm, clientData->builtinNames().resolvePublicName(), - requireFunction->getDirect( - vm, clientData->builtinNames().resolvePublicName()), - 0); - - RELEASE_AND_RETURN(scope, JSValue::encode(boundRequireFunction)); + RELEASE_AND_RETURN( + scope, JSValue::encode(Zig::ImportMetaObject::createRequireFunction( + vm, globalObject, val))); } JSC_DEFINE_HOST_FUNCTION(jsFunctionNodeModulePaths, (JSC::JSGlobalObject * globalObject, @@ -158,7 +146,8 @@ void generateNodeModuleModule(JSC::JSGlobalObject *globalObject, jsFunctionNodeModulePaths, ImplementationVisibility::Public)); exportNames.append(JSC::Identifier::fromString(vm, "_cache"_s)); - exportValues.append(JSC::constructEmptyObject(globalObject)); + exportValues.append( + jsCast(globalObject)->lazyRequireCacheObject()); exportNames.append(JSC::Identifier::fromString(vm, "builtinModules"_s)); diff --git a/src/js/builtins/ImportMetaObject.ts b/src/js/builtins/ImportMetaObject.ts index 23b795735fd45..934a378817b20 100644 --- a/src/js/builtins/ImportMetaObject.ts +++ b/src/js/builtins/ImportMetaObject.ts @@ -212,15 +212,8 @@ export function createRequireCache() { }); } -$sloppy; -export function require(this: ImportMetaObject, name) { - var from = this?.path ?? arguments.callee?.path; - - if (typeof name !== "string") { - throw new TypeError("require(name) must be a string"); - } - - return $internalRequire($resolveSync(name, from)); +export function require(this: string, name) { + return $internalRequire($resolveSync(name, $toString(this), false)); } $getter; diff --git a/src/js/builtins/Module.ts b/src/js/builtins/Module.ts index ebfc1c47795a4..7ef108258a37f 100644 --- a/src/js/builtins/Module.ts +++ b/src/js/builtins/Module.ts @@ -40,7 +40,7 @@ export function require(this: Module, id: string) { } let esm = Loader.registry.$get(id); - if (esm?.evaluated) { + if (esm?.evaluated && (esm.state ?? 0) >= $ModuleReady) { const mod = esm.module; const namespace = Loader.getModuleNamespaceObject(mod); const exports = @@ -75,7 +75,7 @@ export function require(this: Module, id: string) { esm = Loader.registry.$get(id); // If we can pull out a ModuleNamespaceObject, let's do it. - if (esm?.evaluated) { + if (esm?.evaluated && (esm.state ?? 0) >= $ModuleReady) { const namespace = Loader.getModuleNamespaceObject(esm!.module); return (mod.exports = // if they choose a module diff --git a/src/js/out/WebCoreJSBuiltins.cpp b/src/js/out/WebCoreJSBuiltins.cpp index f494e66355132..d1250f0b924ec 100644 --- a/src/js/out/WebCoreJSBuiltins.cpp +++ b/src/js/out/WebCoreJSBuiltins.cpp @@ -108,7 +108,7 @@ const JSC::ConstructorKind s_writableStreamInternalsCreateWritableStreamCodeCons const JSC::ImplementationVisibility s_writableStreamInternalsCreateWritableStreamCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_writableStreamInternalsCreateWritableStreamCodeLength = 278; static const JSC::Intrinsic s_writableStreamInternalsCreateWritableStreamCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_writableStreamInternalsCreateWritableStreamCode = "(function (u,d,p,N,_,f){\"use strict\";@assert(typeof _===\"number\"&&!@isNaN(_)&&_>=0);const j={};@initializeWritableStreamSlots(j,{});const q=new @WritableStreamDefaultController;return @setUpWritableStreamDefaultController(j,q,u,d,p,N,_,f),@createWritableStreamFromInternal(j)})\n"; +const char* const s_writableStreamInternalsCreateWritableStreamCode = "(function (u,p,d,N,_,f){\"use strict\";@assert(typeof _===\"number\"&&!@isNaN(_)&&_>=0);const j={};@initializeWritableStreamSlots(j,{});const q=new @WritableStreamDefaultController;return @setUpWritableStreamDefaultController(j,q,u,p,d,N,_,f),@createWritableStreamFromInternal(j)})\n"; // createInternalWritableStreamFromUnderlyingSink const JSC::ConstructAbility s_writableStreamInternalsCreateInternalWritableStreamFromUnderlyingSinkCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -116,7 +116,7 @@ const JSC::ConstructorKind s_writableStreamInternalsCreateInternalWritableStream const JSC::ImplementationVisibility s_writableStreamInternalsCreateInternalWritableStreamFromUnderlyingSinkCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_writableStreamInternalsCreateInternalWritableStreamFromUnderlyingSinkCodeLength = 956; static const JSC::Intrinsic s_writableStreamInternalsCreateInternalWritableStreamFromUnderlyingSinkCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_writableStreamInternalsCreateInternalWritableStreamFromUnderlyingSinkCode = "(function (f,o){\"use strict\";const C={};if(f===@undefined)f={};if(o===@undefined)o={};if(!@isObject(f))@throwTypeError(\"WritableStream constructor takes an object as first argument\");if(\"type\"in f)@throwRangeError(\"Invalid type is specified\");const w=@extractSizeAlgorithm(o),E=@extractHighWaterMark(o,1),_={};if(\"start\"in f){if(_[\"start\"]=f[\"start\"],typeof _[\"start\"]!==\"function\")@throwTypeError(\"underlyingSink.start should be a function\")}if(\"write\"in f){if(_[\"write\"]=f[\"write\"],typeof _[\"write\"]!==\"function\")@throwTypeError(\"underlyingSink.write should be a function\")}if(\"close\"in f){if(_[\"close\"]=f[\"close\"],typeof _[\"close\"]!==\"function\")@throwTypeError(\"underlyingSink.close should be a function\")}if(\"abort\"in f){if(_[\"abort\"]=f[\"abort\"],typeof _[\"abort\"]!==\"function\")@throwTypeError(\"underlyingSink.abort should be a function\")}return @initializeWritableStreamSlots(C,f),@setUpWritableStreamDefaultControllerFromUnderlyingSink(C,f,_,E,w),C})\n"; +const char* const s_writableStreamInternalsCreateInternalWritableStreamFromUnderlyingSinkCode = "(function (f,w){\"use strict\";const o={};if(f===@undefined)f={};if(w===@undefined)w={};if(!@isObject(f))@throwTypeError(\"WritableStream constructor takes an object as first argument\");if(\"type\"in f)@throwRangeError(\"Invalid type is specified\");const C=@extractSizeAlgorithm(w),E=@extractHighWaterMark(w,1),_={};if(\"start\"in f){if(_[\"start\"]=f[\"start\"],typeof _[\"start\"]!==\"function\")@throwTypeError(\"underlyingSink.start should be a function\")}if(\"write\"in f){if(_[\"write\"]=f[\"write\"],typeof _[\"write\"]!==\"function\")@throwTypeError(\"underlyingSink.write should be a function\")}if(\"close\"in f){if(_[\"close\"]=f[\"close\"],typeof _[\"close\"]!==\"function\")@throwTypeError(\"underlyingSink.close should be a function\")}if(\"abort\"in f){if(_[\"abort\"]=f[\"abort\"],typeof _[\"abort\"]!==\"function\")@throwTypeError(\"underlyingSink.abort should be a function\")}return @initializeWritableStreamSlots(o,f),@setUpWritableStreamDefaultControllerFromUnderlyingSink(o,f,_,E,C),o})\n"; // initializeWritableStreamSlots const JSC::ConstructAbility s_writableStreamInternalsInitializeWritableStreamSlotsCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -156,7 +156,7 @@ const JSC::ConstructorKind s_writableStreamInternalsSetUpWritableStreamDefaultWr const JSC::ImplementationVisibility s_writableStreamInternalsSetUpWritableStreamDefaultWriterCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_writableStreamInternalsSetUpWritableStreamDefaultWriterCodeLength = 887; static const JSC::Intrinsic s_writableStreamInternalsSetUpWritableStreamDefaultWriterCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_writableStreamInternalsSetUpWritableStreamDefaultWriterCode = "(function (n,g){\"use strict\";if(@isWritableStreamLocked(g))@throwTypeError(\"WritableStream is locked\");@putByIdDirectPrivate(n,\"stream\",g),@putByIdDirectPrivate(g,\"writer\",n);const v=@newPromiseCapability(@Promise),h=@newPromiseCapability(@Promise);@putByIdDirectPrivate(n,\"readyPromise\",v),@putByIdDirectPrivate(n,\"closedPromise\",h);const B=@getByIdDirectPrivate(g,\"state\");if(B===\"writable\"){if(@writableStreamCloseQueuedOrInFlight(g)||!@getByIdDirectPrivate(g,\"backpressure\"))v.@resolve.@call()}else if(B===\"erroring\")v.@reject.@call(@undefined,@getByIdDirectPrivate(g,\"storedError\")),@markPromiseAsHandled(v.@promise);else if(B===\"closed\")v.@resolve.@call(),h.@resolve.@call();else{@assert(B===\"errored\");const _=@getByIdDirectPrivate(g,\"storedError\");v.@reject.@call(@undefined,_),@markPromiseAsHandled(v.@promise),h.@reject.@call(@undefined,_),@markPromiseAsHandled(h.@promise)}})\n"; +const char* const s_writableStreamInternalsSetUpWritableStreamDefaultWriterCode = "(function (n,h){\"use strict\";if(@isWritableStreamLocked(h))@throwTypeError(\"WritableStream is locked\");@putByIdDirectPrivate(n,\"stream\",h),@putByIdDirectPrivate(h,\"writer\",n);const v=@newPromiseCapability(@Promise),B=@newPromiseCapability(@Promise);@putByIdDirectPrivate(n,\"readyPromise\",v),@putByIdDirectPrivate(n,\"closedPromise\",B);const _=@getByIdDirectPrivate(h,\"state\");if(_===\"writable\"){if(@writableStreamCloseQueuedOrInFlight(h)||!@getByIdDirectPrivate(h,\"backpressure\"))v.@resolve.@call()}else if(_===\"erroring\")v.@reject.@call(@undefined,@getByIdDirectPrivate(h,\"storedError\")),@markPromiseAsHandled(v.@promise);else if(_===\"closed\")v.@resolve.@call(),B.@resolve.@call();else{@assert(_===\"errored\");const g=@getByIdDirectPrivate(h,\"storedError\");v.@reject.@call(@undefined,g),@markPromiseAsHandled(v.@promise),B.@reject.@call(@undefined,g),@markPromiseAsHandled(B.@promise)}})\n"; // writableStreamAbort const JSC::ConstructAbility s_writableStreamInternalsWritableStreamAbortCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -164,7 +164,7 @@ const JSC::ConstructorKind s_writableStreamInternalsWritableStreamAbortCodeConst const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamAbortCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_writableStreamInternalsWritableStreamAbortCodeLength = 501; static const JSC::Intrinsic s_writableStreamInternalsWritableStreamAbortCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_writableStreamInternalsWritableStreamAbortCode = "(function (h,B){\"use strict\";const _=@getByIdDirectPrivate(h,\"state\");if(_===\"closed\"||_===\"errored\")return @Promise.@resolve();const f=@getByIdDirectPrivate(h,\"pendingAbortRequest\");if(f!==@undefined)return f.promise.@promise;@assert(_===\"writable\"||_===\"erroring\");let j=!1;if(_===\"erroring\")j=!0,B=@undefined;const c=@newPromiseCapability(@Promise);if(@putByIdDirectPrivate(h,\"pendingAbortRequest\",{promise:c,reason:B,wasAlreadyErroring:j}),!j)@writableStreamStartErroring(h,B);return c.@promise})\n"; +const char* const s_writableStreamInternalsWritableStreamAbortCode = "(function (c,h){\"use strict\";const f=@getByIdDirectPrivate(c,\"state\");if(f===\"closed\"||f===\"errored\")return @Promise.@resolve();const B=@getByIdDirectPrivate(c,\"pendingAbortRequest\");if(B!==@undefined)return B.promise.@promise;@assert(f===\"writable\"||f===\"erroring\");let j=!1;if(f===\"erroring\")j=!0,h=@undefined;const _=@newPromiseCapability(@Promise);if(@putByIdDirectPrivate(c,\"pendingAbortRequest\",{promise:_,reason:h,wasAlreadyErroring:j}),!j)@writableStreamStartErroring(c,h);return _.@promise})\n"; // writableStreamClose const JSC::ConstructAbility s_writableStreamInternalsWritableStreamCloseCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -172,7 +172,7 @@ const JSC::ConstructorKind s_writableStreamInternalsWritableStreamCloseCodeConst const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamCloseCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_writableStreamInternalsWritableStreamCloseCodeLength = 642; static const JSC::Intrinsic s_writableStreamInternalsWritableStreamCloseCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_writableStreamInternalsWritableStreamCloseCode = "(function (_){\"use strict\";const d=@getByIdDirectPrivate(_,\"state\");if(d===\"closed\"||d===\"errored\")return @Promise.@reject(@makeTypeError(\"Cannot close a writable stream that is closed or errored\"));@assert(d===\"writable\"||d===\"erroring\"),@assert(!@writableStreamCloseQueuedOrInFlight(_));const n=@newPromiseCapability(@Promise);@putByIdDirectPrivate(_,\"closeRequest\",n);const u=@getByIdDirectPrivate(_,\"writer\");if(u!==@undefined&&@getByIdDirectPrivate(_,\"backpressure\")&&d===\"writable\")@getByIdDirectPrivate(u,\"readyPromise\").@resolve.@call();return @writableStreamDefaultControllerClose(@getByIdDirectPrivate(_,\"controller\")),n.@promise})\n"; +const char* const s_writableStreamInternalsWritableStreamCloseCode = "(function (n){\"use strict\";const _=@getByIdDirectPrivate(n,\"state\");if(_===\"closed\"||_===\"errored\")return @Promise.@reject(@makeTypeError(\"Cannot close a writable stream that is closed or errored\"));@assert(_===\"writable\"||_===\"erroring\"),@assert(!@writableStreamCloseQueuedOrInFlight(n));const u=@newPromiseCapability(@Promise);@putByIdDirectPrivate(n,\"closeRequest\",u);const d=@getByIdDirectPrivate(n,\"writer\");if(d!==@undefined&&@getByIdDirectPrivate(n,\"backpressure\")&&_===\"writable\")@getByIdDirectPrivate(d,\"readyPromise\").@resolve.@call();return @writableStreamDefaultControllerClose(@getByIdDirectPrivate(n,\"controller\")),u.@promise})\n"; // writableStreamAddWriteRequest const JSC::ConstructAbility s_writableStreamInternalsWritableStreamAddWriteRequestCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -204,7 +204,7 @@ const JSC::ConstructorKind s_writableStreamInternalsWritableStreamFinishErroring const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamFinishErroringCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_writableStreamInternalsWritableStreamFinishErroringCodeLength = 1058; static const JSC::Intrinsic s_writableStreamInternalsWritableStreamFinishErroringCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_writableStreamInternalsWritableStreamFinishErroringCode = "(function (i){\"use strict\";@assert(@getByIdDirectPrivate(i,\"state\")===\"erroring\"),@assert(!@writableStreamHasOperationMarkedInFlight(i)),@putByIdDirectPrivate(i,\"state\",\"errored\");const _=@getByIdDirectPrivate(i,\"controller\");@getByIdDirectPrivate(_,\"errorSteps\").@call();const p=@getByIdDirectPrivate(i,\"storedError\"),h=@getByIdDirectPrivate(i,\"writeRequests\");for(var A=h.shift();A;A=h.shift())A.@reject.@call(@undefined,p);@putByIdDirectPrivate(i,\"writeRequests\",@createFIFO());const B=@getByIdDirectPrivate(i,\"pendingAbortRequest\");if(B===@undefined){@writableStreamRejectCloseAndClosedPromiseIfNeeded(i);return}if(@putByIdDirectPrivate(i,\"pendingAbortRequest\",@undefined),B.wasAlreadyErroring){B.promise.@reject.@call(@undefined,p),@writableStreamRejectCloseAndClosedPromiseIfNeeded(i);return}@getByIdDirectPrivate(_,\"abortSteps\").@call(@undefined,B.reason).@then(()=>{B.promise.@resolve.@call(),@writableStreamRejectCloseAndClosedPromiseIfNeeded(i)},(I)=>{B.promise.@reject.@call(@undefined,I),@writableStreamRejectCloseAndClosedPromiseIfNeeded(i)})})\n"; +const char* const s_writableStreamInternalsWritableStreamFinishErroringCode = "(function (_){\"use strict\";@assert(@getByIdDirectPrivate(_,\"state\")===\"erroring\"),@assert(!@writableStreamHasOperationMarkedInFlight(_)),@putByIdDirectPrivate(_,\"state\",\"errored\");const p=@getByIdDirectPrivate(_,\"controller\");@getByIdDirectPrivate(p,\"errorSteps\").@call();const h=@getByIdDirectPrivate(_,\"storedError\"),i=@getByIdDirectPrivate(_,\"writeRequests\");for(var A=i.shift();A;A=i.shift())A.@reject.@call(@undefined,h);@putByIdDirectPrivate(_,\"writeRequests\",@createFIFO());const B=@getByIdDirectPrivate(_,\"pendingAbortRequest\");if(B===@undefined){@writableStreamRejectCloseAndClosedPromiseIfNeeded(_);return}if(@putByIdDirectPrivate(_,\"pendingAbortRequest\",@undefined),B.wasAlreadyErroring){B.promise.@reject.@call(@undefined,h),@writableStreamRejectCloseAndClosedPromiseIfNeeded(_);return}@getByIdDirectPrivate(p,\"abortSteps\").@call(@undefined,B.reason).@then(()=>{B.promise.@resolve.@call(),@writableStreamRejectCloseAndClosedPromiseIfNeeded(_)},(I)=>{B.promise.@reject.@call(@undefined,I),@writableStreamRejectCloseAndClosedPromiseIfNeeded(_)})})\n"; // writableStreamFinishInFlightClose const JSC::ConstructAbility s_writableStreamInternalsWritableStreamFinishInFlightCloseCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -212,7 +212,7 @@ const JSC::ConstructorKind s_writableStreamInternalsWritableStreamFinishInFlight const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamFinishInFlightCloseCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_writableStreamInternalsWritableStreamFinishInFlightCloseCodeLength = 751; static const JSC::Intrinsic s_writableStreamInternalsWritableStreamFinishInFlightCloseCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_writableStreamInternalsWritableStreamFinishInFlightCloseCode = "(function (d){\"use strict\";@getByIdDirectPrivate(d,\"inFlightCloseRequest\").@resolve.@call(),@putByIdDirectPrivate(d,\"inFlightCloseRequest\",@undefined);const n=@getByIdDirectPrivate(d,\"state\");if(@assert(n===\"writable\"||n===\"erroring\"),n===\"erroring\"){@putByIdDirectPrivate(d,\"storedError\",@undefined);const c=@getByIdDirectPrivate(d,\"pendingAbortRequest\");if(c!==@undefined)c.promise.@resolve.@call(),@putByIdDirectPrivate(d,\"pendingAbortRequest\",@undefined)}@putByIdDirectPrivate(d,\"state\",\"closed\");const _=@getByIdDirectPrivate(d,\"writer\");if(_!==@undefined)@getByIdDirectPrivate(_,\"closedPromise\").@resolve.@call();@assert(@getByIdDirectPrivate(d,\"pendingAbortRequest\")===@undefined),@assert(@getByIdDirectPrivate(d,\"storedError\")===@undefined)})\n"; +const char* const s_writableStreamInternalsWritableStreamFinishInFlightCloseCode = "(function (d){\"use strict\";@getByIdDirectPrivate(d,\"inFlightCloseRequest\").@resolve.@call(),@putByIdDirectPrivate(d,\"inFlightCloseRequest\",@undefined);const n=@getByIdDirectPrivate(d,\"state\");if(@assert(n===\"writable\"||n===\"erroring\"),n===\"erroring\"){@putByIdDirectPrivate(d,\"storedError\",@undefined);const _=@getByIdDirectPrivate(d,\"pendingAbortRequest\");if(_!==@undefined)_.promise.@resolve.@call(),@putByIdDirectPrivate(d,\"pendingAbortRequest\",@undefined)}@putByIdDirectPrivate(d,\"state\",\"closed\");const c=@getByIdDirectPrivate(d,\"writer\");if(c!==@undefined)@getByIdDirectPrivate(c,\"closedPromise\").@resolve.@call();@assert(@getByIdDirectPrivate(d,\"pendingAbortRequest\")===@undefined),@assert(@getByIdDirectPrivate(d,\"storedError\")===@undefined)})\n"; // writableStreamFinishInFlightCloseWithError const JSC::ConstructAbility s_writableStreamInternalsWritableStreamFinishInFlightCloseWithErrorCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -220,7 +220,7 @@ const JSC::ConstructorKind s_writableStreamInternalsWritableStreamFinishInFlight const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamFinishInFlightCloseWithErrorCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_writableStreamInternalsWritableStreamFinishInFlightCloseWithErrorCodeLength = 488; static const JSC::Intrinsic s_writableStreamInternalsWritableStreamFinishInFlightCloseWithErrorCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_writableStreamInternalsWritableStreamFinishInFlightCloseWithErrorCode = "(function (_,c){\"use strict\";const d=@getByIdDirectPrivate(_,\"inFlightCloseRequest\");@assert(d!==@undefined),d.@reject.@call(@undefined,c),@putByIdDirectPrivate(_,\"inFlightCloseRequest\",@undefined);const n=@getByIdDirectPrivate(_,\"state\");@assert(n===\"writable\"||n===\"erroring\");const p=@getByIdDirectPrivate(_,\"pendingAbortRequest\");if(p!==@undefined)p.promise.@reject.@call(@undefined,c),@putByIdDirectPrivate(_,\"pendingAbortRequest\",@undefined);@writableStreamDealWithRejection(_,c)})\n"; +const char* const s_writableStreamInternalsWritableStreamFinishInFlightCloseWithErrorCode = "(function (_,c){\"use strict\";const n=@getByIdDirectPrivate(_,\"inFlightCloseRequest\");@assert(n!==@undefined),n.@reject.@call(@undefined,c),@putByIdDirectPrivate(_,\"inFlightCloseRequest\",@undefined);const d=@getByIdDirectPrivate(_,\"state\");@assert(d===\"writable\"||d===\"erroring\");const p=@getByIdDirectPrivate(_,\"pendingAbortRequest\");if(p!==@undefined)p.promise.@reject.@call(@undefined,c),@putByIdDirectPrivate(_,\"pendingAbortRequest\",@undefined);@writableStreamDealWithRejection(_,c)})\n"; // writableStreamFinishInFlightWrite const JSC::ConstructAbility s_writableStreamInternalsWritableStreamFinishInFlightWriteCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -260,7 +260,7 @@ const JSC::ConstructorKind s_writableStreamInternalsWritableStreamMarkFirstWrite const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamMarkFirstWriteRequestInFlightCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_writableStreamInternalsWritableStreamMarkFirstWriteRequestInFlightCodeLength = 240; static const JSC::Intrinsic s_writableStreamInternalsWritableStreamMarkFirstWriteRequestInFlightCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_writableStreamInternalsWritableStreamMarkFirstWriteRequestInFlightCode = "(function (c){\"use strict\";const d=@getByIdDirectPrivate(c,\"writeRequests\");@assert(@getByIdDirectPrivate(c,\"inFlightWriteRequest\")===@undefined),@assert(d.isNotEmpty());const h=d.shift();@putByIdDirectPrivate(c,\"inFlightWriteRequest\",h)})\n"; +const char* const s_writableStreamInternalsWritableStreamMarkFirstWriteRequestInFlightCode = "(function (d){\"use strict\";const c=@getByIdDirectPrivate(d,\"writeRequests\");@assert(@getByIdDirectPrivate(d,\"inFlightWriteRequest\")===@undefined),@assert(c.isNotEmpty());const h=c.shift();@putByIdDirectPrivate(d,\"inFlightWriteRequest\",h)})\n"; // writableStreamRejectCloseAndClosedPromiseIfNeeded const JSC::ConstructAbility s_writableStreamInternalsWritableStreamRejectCloseAndClosedPromiseIfNeededCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -268,7 +268,7 @@ const JSC::ConstructorKind s_writableStreamInternalsWritableStreamRejectCloseAnd const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamRejectCloseAndClosedPromiseIfNeededCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_writableStreamInternalsWritableStreamRejectCloseAndClosedPromiseIfNeededCodeLength = 516; static const JSC::Intrinsic s_writableStreamInternalsWritableStreamRejectCloseAndClosedPromiseIfNeededCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_writableStreamInternalsWritableStreamRejectCloseAndClosedPromiseIfNeededCode = "(function (i){\"use strict\";@assert(@getByIdDirectPrivate(i,\"state\")===\"errored\");const h=@getByIdDirectPrivate(i,\"storedError\"),n=@getByIdDirectPrivate(i,\"closeRequest\");if(n!==@undefined)@assert(@getByIdDirectPrivate(i,\"inFlightCloseRequest\")===@undefined),n.@reject.@call(@undefined,h),@putByIdDirectPrivate(i,\"closeRequest\",@undefined);const B=@getByIdDirectPrivate(i,\"writer\");if(B!==@undefined){const b=@getByIdDirectPrivate(B,\"closedPromise\");b.@reject.@call(@undefined,h),@markPromiseAsHandled(b.@promise)}})\n"; +const char* const s_writableStreamInternalsWritableStreamRejectCloseAndClosedPromiseIfNeededCode = "(function (h){\"use strict\";@assert(@getByIdDirectPrivate(h,\"state\")===\"errored\");const i=@getByIdDirectPrivate(h,\"storedError\"),n=@getByIdDirectPrivate(h,\"closeRequest\");if(n!==@undefined)@assert(@getByIdDirectPrivate(h,\"inFlightCloseRequest\")===@undefined),n.@reject.@call(@undefined,i),@putByIdDirectPrivate(h,\"closeRequest\",@undefined);const B=@getByIdDirectPrivate(h,\"writer\");if(B!==@undefined){const b=@getByIdDirectPrivate(B,\"closedPromise\");b.@reject.@call(@undefined,i),@markPromiseAsHandled(b.@promise)}})\n"; // writableStreamStartErroring const JSC::ConstructAbility s_writableStreamInternalsWritableStreamStartErroringCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -276,7 +276,7 @@ const JSC::ConstructorKind s_writableStreamInternalsWritableStreamStartErroringC const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamStartErroringCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_writableStreamInternalsWritableStreamStartErroringCodeLength = 544; static const JSC::Intrinsic s_writableStreamInternalsWritableStreamStartErroringCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_writableStreamInternalsWritableStreamStartErroringCode = "(function (i,_){\"use strict\";@assert(@getByIdDirectPrivate(i,\"storedError\")===@undefined),@assert(@getByIdDirectPrivate(i,\"state\")===\"writable\");const d=@getByIdDirectPrivate(i,\"controller\");@assert(d!==@undefined),@putByIdDirectPrivate(i,\"state\",\"erroring\"),@putByIdDirectPrivate(i,\"storedError\",_);const h=@getByIdDirectPrivate(i,\"writer\");if(h!==@undefined)@writableStreamDefaultWriterEnsureReadyPromiseRejected(h,_);if(!@writableStreamHasOperationMarkedInFlight(i)&&@getByIdDirectPrivate(d,\"started\")===1)@writableStreamFinishErroring(i)})\n"; +const char* const s_writableStreamInternalsWritableStreamStartErroringCode = "(function (i,_){\"use strict\";@assert(@getByIdDirectPrivate(i,\"storedError\")===@undefined),@assert(@getByIdDirectPrivate(i,\"state\")===\"writable\");const h=@getByIdDirectPrivate(i,\"controller\");@assert(h!==@undefined),@putByIdDirectPrivate(i,\"state\",\"erroring\"),@putByIdDirectPrivate(i,\"storedError\",_);const d=@getByIdDirectPrivate(i,\"writer\");if(d!==@undefined)@writableStreamDefaultWriterEnsureReadyPromiseRejected(d,_);if(!@writableStreamHasOperationMarkedInFlight(i)&&@getByIdDirectPrivate(h,\"started\")===1)@writableStreamFinishErroring(i)})\n"; // writableStreamUpdateBackpressure const JSC::ConstructAbility s_writableStreamInternalsWritableStreamUpdateBackpressureCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -324,7 +324,7 @@ const JSC::ConstructorKind s_writableStreamInternalsWritableStreamDefaultWriterE const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamDefaultWriterEnsureReadyPromiseRejectedCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_writableStreamInternalsWritableStreamDefaultWriterEnsureReadyPromiseRejectedCodeLength = 327; static const JSC::Intrinsic s_writableStreamInternalsWritableStreamDefaultWriterEnsureReadyPromiseRejectedCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_writableStreamInternalsWritableStreamDefaultWriterEnsureReadyPromiseRejectedCode = "(function (c,g){\"use strict\";let h=@getByIdDirectPrivate(c,\"readyPromise\"),n=h.@promise;if((@getPromiseInternalField(n,@promiseFieldFlags)&@promiseStateMask)!==@promiseStatePending)h=@newPromiseCapability(@Promise),n=h.@promise,@putByIdDirectPrivate(c,\"readyPromise\",h);h.@reject.@call(@undefined,g),@markPromiseAsHandled(n)})\n"; +const char* const s_writableStreamInternalsWritableStreamDefaultWriterEnsureReadyPromiseRejectedCode = "(function (c,n){\"use strict\";let g=@getByIdDirectPrivate(c,\"readyPromise\"),h=g.@promise;if((@getPromiseInternalField(h,@promiseFieldFlags)&@promiseStateMask)!==@promiseStatePending)g=@newPromiseCapability(@Promise),h=g.@promise,@putByIdDirectPrivate(c,\"readyPromise\",g);g.@reject.@call(@undefined,n),@markPromiseAsHandled(h)})\n"; // writableStreamDefaultWriterGetDesiredSize const JSC::ConstructAbility s_writableStreamInternalsWritableStreamDefaultWriterGetDesiredSizeCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -348,7 +348,7 @@ const JSC::ConstructorKind s_writableStreamInternalsWritableStreamDefaultWriterW const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamDefaultWriterWriteCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_writableStreamInternalsWritableStreamDefaultWriterWriteCodeLength = 919; static const JSC::Intrinsic s_writableStreamInternalsWritableStreamDefaultWriterWriteCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_writableStreamInternalsWritableStreamDefaultWriterWriteCode = "(function (d,P){\"use strict\";const W=@getByIdDirectPrivate(d,\"stream\");@assert(W!==@undefined);const _=@getByIdDirectPrivate(W,\"controller\");@assert(_!==@undefined);const b=@writableStreamDefaultControllerGetChunkSize(_,P);if(W!==@getByIdDirectPrivate(d,\"stream\"))return @Promise.@reject(@makeTypeError(\"writer is not stream's writer\"));const f=@getByIdDirectPrivate(W,\"state\");if(f===\"errored\")return @Promise.@reject(@getByIdDirectPrivate(W,\"storedError\"));if(@writableStreamCloseQueuedOrInFlight(W)||f===\"closed\")return @Promise.@reject(@makeTypeError(\"stream is closing or closed\"));if(@writableStreamCloseQueuedOrInFlight(W)||f===\"closed\")return @Promise.@reject(@makeTypeError(\"stream is closing or closed\"));if(f===\"erroring\")return @Promise.@reject(@getByIdDirectPrivate(W,\"storedError\"));@assert(f===\"writable\");const g=@writableStreamAddWriteRequest(W);return @writableStreamDefaultControllerWrite(_,P,b),g})\n"; +const char* const s_writableStreamInternalsWritableStreamDefaultWriterWriteCode = "(function (d,g){\"use strict\";const P=@getByIdDirectPrivate(d,\"stream\");@assert(P!==@undefined);const _=@getByIdDirectPrivate(P,\"controller\");@assert(_!==@undefined);const b=@writableStreamDefaultControllerGetChunkSize(_,g);if(P!==@getByIdDirectPrivate(d,\"stream\"))return @Promise.@reject(@makeTypeError(\"writer is not stream's writer\"));const W=@getByIdDirectPrivate(P,\"state\");if(W===\"errored\")return @Promise.@reject(@getByIdDirectPrivate(P,\"storedError\"));if(@writableStreamCloseQueuedOrInFlight(P)||W===\"closed\")return @Promise.@reject(@makeTypeError(\"stream is closing or closed\"));if(@writableStreamCloseQueuedOrInFlight(P)||W===\"closed\")return @Promise.@reject(@makeTypeError(\"stream is closing or closed\"));if(W===\"erroring\")return @Promise.@reject(@getByIdDirectPrivate(P,\"storedError\"));@assert(W===\"writable\");const f=@writableStreamAddWriteRequest(P);return @writableStreamDefaultControllerWrite(_,g,b),f})\n"; // setUpWritableStreamDefaultController const JSC::ConstructAbility s_writableStreamInternalsSetUpWritableStreamDefaultControllerCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -356,7 +356,7 @@ const JSC::ConstructorKind s_writableStreamInternalsSetUpWritableStreamDefaultCo const JSC::ImplementationVisibility s_writableStreamInternalsSetUpWritableStreamDefaultControllerCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_writableStreamInternalsSetUpWritableStreamDefaultControllerCodeLength = 700; static const JSC::Intrinsic s_writableStreamInternalsSetUpWritableStreamDefaultControllerCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_writableStreamInternalsSetUpWritableStreamDefaultControllerCode = "(function (B,f,j,v,P,q,_,U){\"use strict\";@assert(@isWritableStream(B)),@assert(@getByIdDirectPrivate(B,\"controller\")===@undefined),@putByIdDirectPrivate(f,\"stream\",B),@putByIdDirectPrivate(B,\"controller\",f),@resetQueue(@getByIdDirectPrivate(f,\"queue\")),@putByIdDirectPrivate(f,\"started\",-1),@putByIdDirectPrivate(f,\"startAlgorithm\",j),@putByIdDirectPrivate(f,\"strategySizeAlgorithm\",U),@putByIdDirectPrivate(f,\"strategyHWM\",_),@putByIdDirectPrivate(f,\"writeAlgorithm\",v),@putByIdDirectPrivate(f,\"closeAlgorithm\",P),@putByIdDirectPrivate(f,\"abortAlgorithm\",q);const d=@writableStreamDefaultControllerGetBackpressure(f);@writableStreamUpdateBackpressure(B,d),@writableStreamDefaultControllerStart(f)})\n"; +const char* const s_writableStreamInternalsSetUpWritableStreamDefaultControllerCode = "(function (_,U,d,f,B,j,v,q){\"use strict\";@assert(@isWritableStream(_)),@assert(@getByIdDirectPrivate(_,\"controller\")===@undefined),@putByIdDirectPrivate(U,\"stream\",_),@putByIdDirectPrivate(_,\"controller\",U),@resetQueue(@getByIdDirectPrivate(U,\"queue\")),@putByIdDirectPrivate(U,\"started\",-1),@putByIdDirectPrivate(U,\"startAlgorithm\",d),@putByIdDirectPrivate(U,\"strategySizeAlgorithm\",q),@putByIdDirectPrivate(U,\"strategyHWM\",v),@putByIdDirectPrivate(U,\"writeAlgorithm\",f),@putByIdDirectPrivate(U,\"closeAlgorithm\",B),@putByIdDirectPrivate(U,\"abortAlgorithm\",j);const P=@writableStreamDefaultControllerGetBackpressure(U);@writableStreamUpdateBackpressure(_,P),@writableStreamDefaultControllerStart(U)})\n"; // writableStreamDefaultControllerStart const JSC::ConstructAbility s_writableStreamInternalsWritableStreamDefaultControllerStartCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -364,7 +364,7 @@ const JSC::ConstructorKind s_writableStreamInternalsWritableStreamDefaultControl const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamDefaultControllerStartCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_writableStreamInternalsWritableStreamDefaultControllerStartCodeLength = 647; static const JSC::Intrinsic s_writableStreamInternalsWritableStreamDefaultControllerStartCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_writableStreamInternalsWritableStreamDefaultControllerStartCode = "(function (i){\"use strict\";if(@getByIdDirectPrivate(i,\"started\")!==-1)return;@putByIdDirectPrivate(i,\"started\",0);const _=@getByIdDirectPrivate(i,\"startAlgorithm\");@putByIdDirectPrivate(i,\"startAlgorithm\",@undefined);const d=@getByIdDirectPrivate(i,\"stream\");return @Promise.@resolve(_.@call()).@then(()=>{const u=@getByIdDirectPrivate(d,\"state\");@assert(u===\"writable\"||u===\"erroring\"),@putByIdDirectPrivate(i,\"started\",1),@writableStreamDefaultControllerAdvanceQueueIfNeeded(i)},(u)=>{const p=@getByIdDirectPrivate(d,\"state\");@assert(p===\"writable\"||p===\"erroring\"),@putByIdDirectPrivate(i,\"started\",1),@writableStreamDealWithRejection(d,u)})})\n"; +const char* const s_writableStreamInternalsWritableStreamDefaultControllerStartCode = "(function (p){\"use strict\";if(@getByIdDirectPrivate(p,\"started\")!==-1)return;@putByIdDirectPrivate(p,\"started\",0);const i=@getByIdDirectPrivate(p,\"startAlgorithm\");@putByIdDirectPrivate(p,\"startAlgorithm\",@undefined);const d=@getByIdDirectPrivate(p,\"stream\");return @Promise.@resolve(i.@call()).@then(()=>{const _=@getByIdDirectPrivate(d,\"state\");@assert(_===\"writable\"||_===\"erroring\"),@putByIdDirectPrivate(p,\"started\",1),@writableStreamDefaultControllerAdvanceQueueIfNeeded(p)},(_)=>{const u=@getByIdDirectPrivate(d,\"state\");@assert(u===\"writable\"||u===\"erroring\"),@putByIdDirectPrivate(p,\"started\",1),@writableStreamDealWithRejection(d,_)})})\n"; // setUpWritableStreamDefaultControllerFromUnderlyingSink const JSC::ConstructAbility s_writableStreamInternalsSetUpWritableStreamDefaultControllerFromUnderlyingSinkCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -372,7 +372,7 @@ const JSC::ConstructorKind s_writableStreamInternalsSetUpWritableStreamDefaultCo const JSC::ImplementationVisibility s_writableStreamInternalsSetUpWritableStreamDefaultControllerFromUnderlyingSinkCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_writableStreamInternalsSetUpWritableStreamDefaultControllerFromUnderlyingSinkCodeLength = 573; static const JSC::Intrinsic s_writableStreamInternalsSetUpWritableStreamDefaultControllerFromUnderlyingSinkCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_writableStreamInternalsSetUpWritableStreamDefaultControllerFromUnderlyingSinkCode = "(function (v,q,P,_,j){\"use strict\";const p=new @WritableStreamDefaultController;let x=()=>{},B=()=>{return @Promise.@resolve()},C=()=>{return @Promise.@resolve()},f=()=>{return @Promise.@resolve()};if(\"start\"in P){const E=P[\"start\"];x=()=>@promiseInvokeOrNoopMethodNoCatch(q,E,[p])}if(\"write\"in P){const E=P[\"write\"];B=(F)=>@promiseInvokeOrNoopMethod(q,E,[F,p])}if(\"close\"in P){const E=P[\"close\"];C=()=>@promiseInvokeOrNoopMethod(q,E,[])}if(\"abort\"in P){const E=P[\"abort\"];f=(F)=>@promiseInvokeOrNoopMethod(q,E,[F])}@setUpWritableStreamDefaultController(v,p,x,B,C,f,_,j)})\n"; +const char* const s_writableStreamInternalsSetUpWritableStreamDefaultControllerFromUnderlyingSinkCode = "(function (P,j,B,v,f){\"use strict\";const _=new @WritableStreamDefaultController;let C=()=>{},p=()=>{return @Promise.@resolve()},E=()=>{return @Promise.@resolve()},q=()=>{return @Promise.@resolve()};if(\"start\"in B){const F=B[\"start\"];C=()=>@promiseInvokeOrNoopMethodNoCatch(j,F,[_])}if(\"write\"in B){const F=B[\"write\"];p=(x)=>@promiseInvokeOrNoopMethod(j,F,[x,_])}if(\"close\"in B){const F=B[\"close\"];E=()=>@promiseInvokeOrNoopMethod(j,F,[])}if(\"abort\"in B){const F=B[\"abort\"];q=(x)=>@promiseInvokeOrNoopMethod(j,F,[x])}@setUpWritableStreamDefaultController(P,_,C,p,E,q,v,f)})\n"; // writableStreamDefaultControllerAdvanceQueueIfNeeded const JSC::ConstructAbility s_writableStreamInternalsWritableStreamDefaultControllerAdvanceQueueIfNeededCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -380,7 +380,7 @@ const JSC::ConstructorKind s_writableStreamInternalsWritableStreamDefaultControl const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamDefaultControllerAdvanceQueueIfNeededCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_writableStreamInternalsWritableStreamDefaultControllerAdvanceQueueIfNeededCodeLength = 582; static const JSC::Intrinsic s_writableStreamInternalsWritableStreamDefaultControllerAdvanceQueueIfNeededCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_writableStreamInternalsWritableStreamDefaultControllerAdvanceQueueIfNeededCode = "(function (_){\"use strict\";const d=@getByIdDirectPrivate(_,\"stream\");if(@getByIdDirectPrivate(_,\"started\")!==1)return;if(@assert(d!==@undefined),@getByIdDirectPrivate(d,\"inFlightWriteRequest\")!==@undefined)return;const f=@getByIdDirectPrivate(d,\"state\");if(@assert(f!==\"closed\"||f!==\"errored\"),f===\"erroring\"){@writableStreamFinishErroring(d);return}const h=@getByIdDirectPrivate(_,\"queue\");if(h.content\?.isEmpty()\?\?!1)return;const i=@peekQueueValue(h);if(i===@isCloseSentinel)@writableStreamDefaultControllerProcessClose(_);else @writableStreamDefaultControllerProcessWrite(_,i)})\n"; +const char* const s_writableStreamInternalsWritableStreamDefaultControllerAdvanceQueueIfNeededCode = "(function (_){\"use strict\";const i=@getByIdDirectPrivate(_,\"stream\");if(@getByIdDirectPrivate(_,\"started\")!==1)return;if(@assert(i!==@undefined),@getByIdDirectPrivate(i,\"inFlightWriteRequest\")!==@undefined)return;const d=@getByIdDirectPrivate(i,\"state\");if(@assert(d!==\"closed\"||d!==\"errored\"),d===\"erroring\"){@writableStreamFinishErroring(i);return}const f=@getByIdDirectPrivate(_,\"queue\");if(f.content\?.isEmpty()\?\?!1)return;const h=@peekQueueValue(f);if(h===@isCloseSentinel)@writableStreamDefaultControllerProcessClose(_);else @writableStreamDefaultControllerProcessWrite(_,h)})\n"; // isCloseSentinel const JSC::ConstructAbility s_writableStreamInternalsIsCloseSentinelCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -436,7 +436,7 @@ const JSC::ConstructorKind s_writableStreamInternalsWritableStreamDefaultControl const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamDefaultControllerGetChunkSizeCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_writableStreamInternalsWritableStreamDefaultControllerGetChunkSizeCodeLength = 181; static const JSC::Intrinsic s_writableStreamInternalsWritableStreamDefaultControllerGetChunkSizeCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_writableStreamInternalsWritableStreamDefaultControllerGetChunkSizeCode = "(function (a,i){\"use strict\";try{return @getByIdDirectPrivate(a,\"strategySizeAlgorithm\").@call(@undefined,i)}catch(d){return @writableStreamDefaultControllerErrorIfNeeded(a,d),1}})\n"; +const char* const s_writableStreamInternalsWritableStreamDefaultControllerGetChunkSizeCode = "(function (a,d){\"use strict\";try{return @getByIdDirectPrivate(a,\"strategySizeAlgorithm\").@call(@undefined,d)}catch(i){return @writableStreamDefaultControllerErrorIfNeeded(a,i),1}})\n"; // writableStreamDefaultControllerGetDesiredSize const JSC::ConstructAbility s_writableStreamInternalsWritableStreamDefaultControllerGetDesiredSizeCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -460,7 +460,7 @@ const JSC::ConstructorKind s_writableStreamInternalsWritableStreamDefaultControl const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamDefaultControllerProcessWriteCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_writableStreamInternalsWritableStreamDefaultControllerProcessWriteCodeLength = 734; static const JSC::Intrinsic s_writableStreamInternalsWritableStreamDefaultControllerProcessWriteCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_writableStreamInternalsWritableStreamDefaultControllerProcessWriteCode = "(function (d,_){\"use strict\";const q=@getByIdDirectPrivate(d,\"stream\");@writableStreamMarkFirstWriteRequestInFlight(q),@getByIdDirectPrivate(d,\"writeAlgorithm\").@call(@undefined,_).@then(()=>{@writableStreamFinishInFlightWrite(q);const M=@getByIdDirectPrivate(q,\"state\");if(@assert(M===\"writable\"||M===\"erroring\"),@dequeueValue(@getByIdDirectPrivate(d,\"queue\")),!@writableStreamCloseQueuedOrInFlight(q)&&M===\"writable\"){const i=@writableStreamDefaultControllerGetBackpressure(d);@writableStreamUpdateBackpressure(q,i)}@writableStreamDefaultControllerAdvanceQueueIfNeeded(d)},(M)=>{if(@getByIdDirectPrivate(q,\"state\")===\"writable\")@writableStreamDefaultControllerClearAlgorithms(d);@writableStreamFinishInFlightWriteWithError(q,M)})})\n"; +const char* const s_writableStreamInternalsWritableStreamDefaultControllerProcessWriteCode = "(function (i,q){\"use strict\";const d=@getByIdDirectPrivate(i,\"stream\");@writableStreamMarkFirstWriteRequestInFlight(d),@getByIdDirectPrivate(i,\"writeAlgorithm\").@call(@undefined,q).@then(()=>{@writableStreamFinishInFlightWrite(d);const M=@getByIdDirectPrivate(d,\"state\");if(@assert(M===\"writable\"||M===\"erroring\"),@dequeueValue(@getByIdDirectPrivate(i,\"queue\")),!@writableStreamCloseQueuedOrInFlight(d)&&M===\"writable\"){const _=@writableStreamDefaultControllerGetBackpressure(i);@writableStreamUpdateBackpressure(d,_)}@writableStreamDefaultControllerAdvanceQueueIfNeeded(i)},(M)=>{if(@getByIdDirectPrivate(d,\"state\")===\"writable\")@writableStreamDefaultControllerClearAlgorithms(i);@writableStreamFinishInFlightWriteWithError(d,M)})})\n"; // writableStreamDefaultControllerWrite const JSC::ConstructAbility s_writableStreamInternalsWritableStreamDefaultControllerWriteCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -468,7 +468,7 @@ const JSC::ConstructorKind s_writableStreamInternalsWritableStreamDefaultControl const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamDefaultControllerWriteCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_writableStreamInternalsWritableStreamDefaultControllerWriteCodeLength = 450; static const JSC::Intrinsic s_writableStreamInternalsWritableStreamDefaultControllerWriteCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_writableStreamInternalsWritableStreamDefaultControllerWriteCode = "(function (d,y,B){\"use strict\";try{@enqueueValueWithSize(@getByIdDirectPrivate(d,\"queue\"),y,B);const D=@getByIdDirectPrivate(d,\"stream\"),I=@getByIdDirectPrivate(D,\"state\");if(!@writableStreamCloseQueuedOrInFlight(D)&&I===\"writable\"){const _=@writableStreamDefaultControllerGetBackpressure(d);@writableStreamUpdateBackpressure(D,_)}@writableStreamDefaultControllerAdvanceQueueIfNeeded(d)}catch(D){@writableStreamDefaultControllerErrorIfNeeded(d,D)}})\n"; +const char* const s_writableStreamInternalsWritableStreamDefaultControllerWriteCode = "(function (d,D,y){\"use strict\";try{@enqueueValueWithSize(@getByIdDirectPrivate(d,\"queue\"),D,y);const B=@getByIdDirectPrivate(d,\"stream\"),_=@getByIdDirectPrivate(B,\"state\");if(!@writableStreamCloseQueuedOrInFlight(B)&&_===\"writable\"){const I=@writableStreamDefaultControllerGetBackpressure(d);@writableStreamUpdateBackpressure(B,I)}@writableStreamDefaultControllerAdvanceQueueIfNeeded(d)}catch(B){@writableStreamDefaultControllerErrorIfNeeded(d,B)}})\n"; #define DEFINE_BUILTIN_GENERATOR(codeName, functionName, overriddenName, argumentCount) \ JSC::FunctionExecutable* codeName##Generator(JSC::VM& vm) \ @@ -502,7 +502,7 @@ const JSC::ConstructorKind s_transformStreamInternalsCreateTransformStreamCodeCo const JSC::ImplementationVisibility s_transformStreamInternalsCreateTransformStreamCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_transformStreamInternalsCreateTransformStreamCodeLength = 513; static const JSC::Intrinsic s_transformStreamInternalsCreateTransformStreamCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_transformStreamInternalsCreateTransformStreamCode = "(function (q,x,D,E,_,F,j){\"use strict\";if(E===@undefined)E=1;if(_===@undefined)_=()=>1;if(F===@undefined)F=0;if(j===@undefined)j=()=>1;@assert(E>=0),@assert(F>=0);const G={};@putByIdDirectPrivate(G,\"TransformStream\",!0);const I=new @TransformStream(G),v=@newPromiseCapability(@Promise);@initializeTransformStream(I,v.@promise,E,_,F,j);const B=new @TransformStreamDefaultController;return @setUpTransformStreamDefaultController(I,B,x,D),q().@then(()=>{v.@resolve.@call()},(c)=>{v.@reject.@call(@undefined,c)}),I})\n"; +const char* const s_transformStreamInternalsCreateTransformStreamCode = "(function (I,G,v,_,E,B,D){\"use strict\";if(_===@undefined)_=1;if(E===@undefined)E=()=>1;if(B===@undefined)B=0;if(D===@undefined)D=()=>1;@assert(_>=0),@assert(B>=0);const q={};@putByIdDirectPrivate(q,\"TransformStream\",!0);const F=new @TransformStream(q),j=@newPromiseCapability(@Promise);@initializeTransformStream(F,j.@promise,_,E,B,D);const x=new @TransformStreamDefaultController;return @setUpTransformStreamDefaultController(F,x,G,v),I().@then(()=>{j.@resolve.@call()},(c)=>{j.@reject.@call(@undefined,c)}),F})\n"; // initializeTransformStream const JSC::ConstructAbility s_transformStreamInternalsInitializeTransformStreamCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -510,7 +510,7 @@ const JSC::ConstructorKind s_transformStreamInternalsInitializeTransformStreamCo const JSC::ImplementationVisibility s_transformStreamInternalsInitializeTransformStreamCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_transformStreamInternalsInitializeTransformStreamCodeLength = 1015; static const JSC::Intrinsic s_transformStreamInternalsInitializeTransformStreamCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_transformStreamInternalsInitializeTransformStreamCode = "(function (f,K,B,T,j,J){\"use strict\";const q=()=>{return K},L=(G)=>{return @transformStreamDefaultSinkWriteAlgorithm(f,G)},v=(G)=>{return @transformStreamDefaultSinkAbortAlgorithm(f,G)},x=()=>{return @transformStreamDefaultSinkCloseAlgorithm(f)},C=@createWritableStream(q,L,x,v,B,T),N=()=>{return @transformStreamDefaultSourcePullAlgorithm(f)},D=(G)=>{return @transformStreamErrorWritableAndUnblockWrite(f,G),@Promise.@resolve()},I={};@putByIdDirectPrivate(I,\"start\",q),@putByIdDirectPrivate(I,\"pull\",N),@putByIdDirectPrivate(I,\"cancel\",D);const E={};@putByIdDirectPrivate(E,\"size\",J),@putByIdDirectPrivate(E,\"highWaterMark\",j);const F=new @ReadableStream(I,E);@putByIdDirectPrivate(f,\"writable\",C),@putByIdDirectPrivate(f,\"internalWritable\",@getInternalWritableStream(C)),@putByIdDirectPrivate(f,\"readable\",F),@putByIdDirectPrivate(f,\"backpressure\",@undefined),@putByIdDirectPrivate(f,\"backpressureChangePromise\",@undefined),@transformStreamSetBackpressure(f,!0),@putByIdDirectPrivate(f,\"controller\",@undefined)})\n"; +const char* const s_transformStreamInternalsInitializeTransformStreamCode = "(function (B,T,E,j,F,f){\"use strict\";const G=()=>{return T},q=(N)=>{return @transformStreamDefaultSinkWriteAlgorithm(B,N)},I=(N)=>{return @transformStreamDefaultSinkAbortAlgorithm(B,N)},v=()=>{return @transformStreamDefaultSinkCloseAlgorithm(B)},J=@createWritableStream(G,q,v,I,E,j),x=()=>{return @transformStreamDefaultSourcePullAlgorithm(B)},K=(N)=>{return @transformStreamErrorWritableAndUnblockWrite(B,N),@Promise.@resolve()},C={};@putByIdDirectPrivate(C,\"start\",G),@putByIdDirectPrivate(C,\"pull\",x),@putByIdDirectPrivate(C,\"cancel\",K);const L={};@putByIdDirectPrivate(L,\"size\",f),@putByIdDirectPrivate(L,\"highWaterMark\",F);const D=new @ReadableStream(C,L);@putByIdDirectPrivate(B,\"writable\",J),@putByIdDirectPrivate(B,\"internalWritable\",@getInternalWritableStream(J)),@putByIdDirectPrivate(B,\"readable\",D),@putByIdDirectPrivate(B,\"backpressure\",@undefined),@putByIdDirectPrivate(B,\"backpressureChangePromise\",@undefined),@transformStreamSetBackpressure(B,!0),@putByIdDirectPrivate(B,\"controller\",@undefined)})\n"; // transformStreamError const JSC::ConstructAbility s_transformStreamInternalsTransformStreamErrorCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -518,7 +518,7 @@ const JSC::ConstructorKind s_transformStreamInternalsTransformStreamErrorCodeCon const JSC::ImplementationVisibility s_transformStreamInternalsTransformStreamErrorCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_transformStreamInternalsTransformStreamErrorCodeLength = 222; static const JSC::Intrinsic s_transformStreamInternalsTransformStreamErrorCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_transformStreamInternalsTransformStreamErrorCode = "(function (f,i){\"use strict\";const n=@getByIdDirectPrivate(f,\"readable\"),_=@getByIdDirectPrivate(n,\"readableStreamController\");@readableStreamDefaultControllerError(_,i),@transformStreamErrorWritableAndUnblockWrite(f,i)})\n"; +const char* const s_transformStreamInternalsTransformStreamErrorCode = "(function (_,i){\"use strict\";const n=@getByIdDirectPrivate(_,\"readable\"),f=@getByIdDirectPrivate(n,\"readableStreamController\");@readableStreamDefaultControllerError(f,i),@transformStreamErrorWritableAndUnblockWrite(_,i)})\n"; // transformStreamErrorWritableAndUnblockWrite const JSC::ConstructAbility s_transformStreamInternalsTransformStreamErrorWritableAndUnblockWriteCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -526,7 +526,7 @@ const JSC::ConstructorKind s_transformStreamInternalsTransformStreamErrorWritabl const JSC::ImplementationVisibility s_transformStreamInternalsTransformStreamErrorWritableAndUnblockWriteCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_transformStreamInternalsTransformStreamErrorWritableAndUnblockWriteCodeLength = 339; static const JSC::Intrinsic s_transformStreamInternalsTransformStreamErrorWritableAndUnblockWriteCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_transformStreamInternalsTransformStreamErrorWritableAndUnblockWriteCode = "(function (_,n){\"use strict\";@transformStreamDefaultControllerClearAlgorithms(@getByIdDirectPrivate(_,\"controller\"));const o=@getByIdDirectPrivate(_,\"internalWritable\");if(@writableStreamDefaultControllerErrorIfNeeded(@getByIdDirectPrivate(o,\"controller\"),n),@getByIdDirectPrivate(_,\"backpressure\"))@transformStreamSetBackpressure(_,!1)})\n"; +const char* const s_transformStreamInternalsTransformStreamErrorWritableAndUnblockWriteCode = "(function (n,_){\"use strict\";@transformStreamDefaultControllerClearAlgorithms(@getByIdDirectPrivate(n,\"controller\"));const o=@getByIdDirectPrivate(n,\"internalWritable\");if(@writableStreamDefaultControllerErrorIfNeeded(@getByIdDirectPrivate(o,\"controller\"),_),@getByIdDirectPrivate(n,\"backpressure\"))@transformStreamSetBackpressure(n,!1)})\n"; // transformStreamSetBackpressure const JSC::ConstructAbility s_transformStreamInternalsTransformStreamSetBackpressureCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -542,7 +542,7 @@ const JSC::ConstructorKind s_transformStreamInternalsSetUpTransformStreamDefault const JSC::ImplementationVisibility s_transformStreamInternalsSetUpTransformStreamDefaultControllerCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_transformStreamInternalsSetUpTransformStreamDefaultControllerCodeLength = 294; static const JSC::Intrinsic s_transformStreamInternalsSetUpTransformStreamDefaultControllerCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_transformStreamInternalsSetUpTransformStreamDefaultControllerCode = "(function (d,_,b,P){\"use strict\";@assert(@isTransformStream(d)),@assert(@getByIdDirectPrivate(d,\"controller\")===@undefined),@putByIdDirectPrivate(_,\"stream\",d),@putByIdDirectPrivate(d,\"controller\",_),@putByIdDirectPrivate(_,\"transformAlgorithm\",b),@putByIdDirectPrivate(_,\"flushAlgorithm\",P)})\n"; +const char* const s_transformStreamInternalsSetUpTransformStreamDefaultControllerCode = "(function (d,b,_,P){\"use strict\";@assert(@isTransformStream(d)),@assert(@getByIdDirectPrivate(d,\"controller\")===@undefined),@putByIdDirectPrivate(b,\"stream\",d),@putByIdDirectPrivate(d,\"controller\",b),@putByIdDirectPrivate(b,\"transformAlgorithm\",_),@putByIdDirectPrivate(b,\"flushAlgorithm\",P)})\n"; // setUpTransformStreamDefaultControllerFromTransformer const JSC::ConstructAbility s_transformStreamInternalsSetUpTransformStreamDefaultControllerFromTransformerCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -550,7 +550,7 @@ const JSC::ConstructorKind s_transformStreamInternalsSetUpTransformStreamDefault const JSC::ImplementationVisibility s_transformStreamInternalsSetUpTransformStreamDefaultControllerFromTransformerCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_transformStreamInternalsSetUpTransformStreamDefaultControllerFromTransformerCodeLength = 449; static const JSC::Intrinsic s_transformStreamInternalsSetUpTransformStreamDefaultControllerFromTransformerCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_transformStreamInternalsSetUpTransformStreamDefaultControllerFromTransformerCode = "(function (_,d,p){\"use strict\";const v=new @TransformStreamDefaultController;let b=(q)=>{try{@transformStreamDefaultControllerEnqueue(v,q)}catch(w){return @Promise.@reject(w)}return @Promise.@resolve()},j=()=>{return @Promise.@resolve()};if(\"transform\"in p)b=(q)=>{return @promiseInvokeOrNoopMethod(d,p[\"transform\"],[q,v])};if(\"flush\"in p)j=()=>{return @promiseInvokeOrNoopMethod(d,p[\"flush\"],[v])};@setUpTransformStreamDefaultController(_,v,b,j)})\n"; +const char* const s_transformStreamInternalsSetUpTransformStreamDefaultControllerFromTransformerCode = "(function (_,j,d){\"use strict\";const q=new @TransformStreamDefaultController;let p=(b)=>{try{@transformStreamDefaultControllerEnqueue(q,b)}catch(w){return @Promise.@reject(w)}return @Promise.@resolve()},v=()=>{return @Promise.@resolve()};if(\"transform\"in d)p=(b)=>{return @promiseInvokeOrNoopMethod(j,d[\"transform\"],[b,q])};if(\"flush\"in d)v=()=>{return @promiseInvokeOrNoopMethod(j,d[\"flush\"],[q])};@setUpTransformStreamDefaultController(_,q,p,v)})\n"; // transformStreamDefaultControllerClearAlgorithms const JSC::ConstructAbility s_transformStreamInternalsTransformStreamDefaultControllerClearAlgorithmsCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -566,7 +566,7 @@ const JSC::ConstructorKind s_transformStreamInternalsTransformStreamDefaultContr const JSC::ImplementationVisibility s_transformStreamInternalsTransformStreamDefaultControllerEnqueueCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_transformStreamInternalsTransformStreamDefaultControllerEnqueueCodeLength = 622; static const JSC::Intrinsic s_transformStreamInternalsTransformStreamDefaultControllerEnqueueCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_transformStreamInternalsTransformStreamDefaultControllerEnqueueCode = "(function (_,S){\"use strict\";const f=@getByIdDirectPrivate(_,\"stream\"),g=@getByIdDirectPrivate(f,\"readable\"),i=@getByIdDirectPrivate(g,\"readableStreamController\");if(@assert(i!==@undefined),!@readableStreamDefaultControllerCanCloseOrEnqueue(i))@throwTypeError(\"TransformStream.readable cannot close or enqueue\");try{@readableStreamDefaultControllerEnqueue(i,S)}catch(j){throw @transformStreamErrorWritableAndUnblockWrite(f,j),@getByIdDirectPrivate(g,\"storedError\")}const W=!@readableStreamDefaultControllerShouldCallPull(i);if(W!==@getByIdDirectPrivate(f,\"backpressure\"))@assert(W),@transformStreamSetBackpressure(f,!0)})\n"; +const char* const s_transformStreamInternalsTransformStreamDefaultControllerEnqueueCode = "(function (W,i){\"use strict\";const f=@getByIdDirectPrivate(W,\"stream\"),_=@getByIdDirectPrivate(f,\"readable\"),j=@getByIdDirectPrivate(_,\"readableStreamController\");if(@assert(j!==@undefined),!@readableStreamDefaultControllerCanCloseOrEnqueue(j))@throwTypeError(\"TransformStream.readable cannot close or enqueue\");try{@readableStreamDefaultControllerEnqueue(j,i)}catch(S){throw @transformStreamErrorWritableAndUnblockWrite(f,S),@getByIdDirectPrivate(_,\"storedError\")}const g=!@readableStreamDefaultControllerShouldCallPull(j);if(g!==@getByIdDirectPrivate(f,\"backpressure\"))@assert(g),@transformStreamSetBackpressure(f,!0)})\n"; // transformStreamDefaultControllerError const JSC::ConstructAbility s_transformStreamInternalsTransformStreamDefaultControllerErrorCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -582,7 +582,7 @@ const JSC::ConstructorKind s_transformStreamInternalsTransformStreamDefaultContr const JSC::ImplementationVisibility s_transformStreamInternalsTransformStreamDefaultControllerPerformTransformCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_transformStreamInternalsTransformStreamDefaultControllerPerformTransformCodeLength = 277; static const JSC::Intrinsic s_transformStreamInternalsTransformStreamDefaultControllerPerformTransformCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_transformStreamInternalsTransformStreamDefaultControllerPerformTransformCode = "(function (_,d){\"use strict\";const f=@newPromiseCapability(@Promise);return @getByIdDirectPrivate(_,\"transformAlgorithm\").@call(@undefined,d).@then(()=>{f.@resolve()},(j)=>{@transformStreamError(@getByIdDirectPrivate(_,\"stream\"),j),f.@reject.@call(@undefined,j)}),f.@promise})\n"; +const char* const s_transformStreamInternalsTransformStreamDefaultControllerPerformTransformCode = "(function (_,g){\"use strict\";const d=@newPromiseCapability(@Promise);return @getByIdDirectPrivate(_,\"transformAlgorithm\").@call(@undefined,g).@then(()=>{d.@resolve()},(j)=>{@transformStreamError(@getByIdDirectPrivate(_,\"stream\"),j),d.@reject.@call(@undefined,j)}),d.@promise})\n"; // transformStreamDefaultControllerTerminate const JSC::ConstructAbility s_transformStreamInternalsTransformStreamDefaultControllerTerminateCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -590,7 +590,7 @@ const JSC::ConstructorKind s_transformStreamInternalsTransformStreamDefaultContr const JSC::ImplementationVisibility s_transformStreamInternalsTransformStreamDefaultControllerTerminateCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_transformStreamInternalsTransformStreamDefaultControllerTerminateCodeLength = 367; static const JSC::Intrinsic s_transformStreamInternalsTransformStreamDefaultControllerTerminateCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_transformStreamInternalsTransformStreamDefaultControllerTerminateCode = "(function (i){\"use strict\";const _=@getByIdDirectPrivate(i,\"stream\"),f=@getByIdDirectPrivate(_,\"readable\"),k=@getByIdDirectPrivate(f,\"readableStreamController\");if(@readableStreamDefaultControllerCanCloseOrEnqueue(k))@readableStreamDefaultControllerClose(k);const u=@makeTypeError(\"the stream has been terminated\");@transformStreamErrorWritableAndUnblockWrite(_,u)})\n"; +const char* const s_transformStreamInternalsTransformStreamDefaultControllerTerminateCode = "(function (i){\"use strict\";const f=@getByIdDirectPrivate(i,\"stream\"),k=@getByIdDirectPrivate(f,\"readable\"),u=@getByIdDirectPrivate(k,\"readableStreamController\");if(@readableStreamDefaultControllerCanCloseOrEnqueue(u))@readableStreamDefaultControllerClose(u);const _=@makeTypeError(\"the stream has been terminated\");@transformStreamErrorWritableAndUnblockWrite(f,_)})\n"; // transformStreamDefaultSinkWriteAlgorithm const JSC::ConstructAbility s_transformStreamInternalsTransformStreamDefaultSinkWriteAlgorithmCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -614,7 +614,7 @@ const JSC::ConstructorKind s_transformStreamInternalsTransformStreamDefaultSinkC const JSC::ImplementationVisibility s_transformStreamInternalsTransformStreamDefaultSinkCloseAlgorithmCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_transformStreamInternalsTransformStreamDefaultSinkCloseAlgorithmCodeLength = 789; static const JSC::Intrinsic s_transformStreamInternalsTransformStreamDefaultSinkCloseAlgorithmCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_transformStreamInternalsTransformStreamDefaultSinkCloseAlgorithmCode = "(function (_){\"use strict\";const q=@getByIdDirectPrivate(_,\"readable\"),I=@getByIdDirectPrivate(_,\"controller\"),f=@getByIdDirectPrivate(q,\"readableStreamController\"),j=@getByIdDirectPrivate(I,\"flushAlgorithm\");@assert(j!==@undefined);const k=@getByIdDirectPrivate(I,\"flushAlgorithm\").@call();@transformStreamDefaultControllerClearAlgorithms(I);const u=@newPromiseCapability(@Promise);return k.@then(()=>{if(@getByIdDirectPrivate(q,\"state\")===@streamErrored){u.@reject.@call(@undefined,@getByIdDirectPrivate(q,\"storedError\"));return}if(@readableStreamDefaultControllerCanCloseOrEnqueue(f))@readableStreamDefaultControllerClose(f);u.@resolve()},(v)=>{@transformStreamError(@getByIdDirectPrivate(I,\"stream\"),v),u.@reject.@call(@undefined,@getByIdDirectPrivate(q,\"storedError\"))}),u.@promise})\n"; +const char* const s_transformStreamInternalsTransformStreamDefaultSinkCloseAlgorithmCode = "(function (u){\"use strict\";const j=@getByIdDirectPrivate(u,\"readable\"),f=@getByIdDirectPrivate(u,\"controller\"),I=@getByIdDirectPrivate(j,\"readableStreamController\"),q=@getByIdDirectPrivate(f,\"flushAlgorithm\");@assert(q!==@undefined);const _=@getByIdDirectPrivate(f,\"flushAlgorithm\").@call();@transformStreamDefaultControllerClearAlgorithms(f);const k=@newPromiseCapability(@Promise);return _.@then(()=>{if(@getByIdDirectPrivate(j,\"state\")===@streamErrored){k.@reject.@call(@undefined,@getByIdDirectPrivate(j,\"storedError\"));return}if(@readableStreamDefaultControllerCanCloseOrEnqueue(I))@readableStreamDefaultControllerClose(I);k.@resolve()},(v)=>{@transformStreamError(@getByIdDirectPrivate(f,\"stream\"),v),k.@reject.@call(@undefined,@getByIdDirectPrivate(j,\"storedError\"))}),k.@promise})\n"; // transformStreamDefaultSourcePullAlgorithm const JSC::ConstructAbility s_transformStreamInternalsTransformStreamDefaultSourcePullAlgorithmCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -640,7 +640,7 @@ const JSC::ConstructorKind s_processObjectInternalsBindingCodeConstructorKind = const JSC::ImplementationVisibility s_processObjectInternalsBindingCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_processObjectInternalsBindingCodeLength = 473; static const JSC::Intrinsic s_processObjectInternalsBindingCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_processObjectInternalsBindingCode = "(function (l){\"use strict\";if(l!==\"constants\")@throwTypeError(\"process.binding() is not supported in Bun. If that breaks something, please file an issue and include a reproducible code sample.\");var r=globalThis.Symbol.for(\"process.bindings.constants\"),I=globalThis[r];if(!I){const{constants:d}=globalThis[globalThis.Symbol.for(\"Bun.lazy\")](\"createImportMeta\",\"node:process\").require(\"node:fs\");I={fs:d,zlib:{},crypto:{},os:@Bun._Os().constants},globalThis[r]=I}return I})\n"; +const char* const s_processObjectInternalsBindingCode = "(function (I){\"use strict\";if(I!==\"constants\")@throwTypeError(\"process.binding() is not supported in Bun. If that breaks something, please file an issue and include a reproducible code sample.\");var d=globalThis.Symbol.for(\"process.bindings.constants\"),r=globalThis[d];if(!r){const{constants:l}=globalThis[globalThis.Symbol.for(\"Bun.lazy\")](\"createImportMeta\",\"node:process\").require(\"node:fs\");r={fs:l,zlib:{},crypto:{},os:@Bun._Os().constants},globalThis[d]=r}return r})\n"; // getStdioWriteStream const JSC::ConstructAbility s_processObjectInternalsGetStdioWriteStreamCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -648,7 +648,7 @@ const JSC::ConstructorKind s_processObjectInternalsGetStdioWriteStreamCodeConstr const JSC::ImplementationVisibility s_processObjectInternalsGetStdioWriteStreamCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_processObjectInternalsGetStdioWriteStreamCodeLength = 4250; static const JSC::Intrinsic s_processObjectInternalsGetStdioWriteStreamCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_processObjectInternalsGetStdioWriteStreamCode = "(function (j,H){\"use strict\";var J={path:\"node:process\",require:H},G=(N)=>J.require(N);function K(N){var{Duplex:O,eos:Q,destroy:U}=G(\"node:stream\"),V=class X extends O{#$;#B;#j=!0;#z=!0;#G;#H;#J;#K;#L;#M;get isTTY(){return this.#M\?\?=G(\"node:tty\").isatty(N)}get fd(){return N}constructor(Z){super({readable:!0,writable:!0});this.#G=`/dev/fd/${Z}`}#N(Z){const Y=this.#H;if(this.#H=null,Y)Y(Z);else if(Z)this.destroy(Z);else if(!this.#j&&!this.#z)this.destroy()}_destroy(Z,Y){if(!Z&&this.#H!==null){var P=class A extends Error{code;name;constructor(T=\"The operation was aborted\",x=void 0){if(x!==void 0&&typeof x!==\"object\")throw new Error(`Invalid AbortError options:\\n\\n${JSON.stringify(x,null,2)}`);super(T,x);this.code=\"ABORT_ERR\",this.name=\"AbortError\"}};Z=new P}if(this.#J=null,this.#K=null,this.#H===null)Y(Z);else{if(this.#H=Y,this.#$)U(this.#$,Z);if(this.#B)U(this.#B,Z)}}_write(Z,Y,P){if(!this.#$){var{createWriteStream:A}=G(\"node:fs\"),T=this.#$=A(this.#G);T.on(\"finish\",()=>{if(this.#K){const x=this.#K;this.#K=null,x()}}),T.on(\"drain\",()=>{if(this.#J){const x=this.#J;this.#J=null,x()}}),Q(T,(x)=>{if(this.#z=!1,x)U(T,x);this.#N(x)})}if(T.write(Z,Y))P();else this.#J=P}_final(Z){this.#$&&this.#$.end(),this.#K=Z}#O(){var{createReadStream:Z}=G(\"node:fs\"),Y=this.#B=Z(this.#G);return Y.on(\"readable\",()=>{if(this.#L){const P=this.#L;this.#L=null,P()}else this.read()}),Y.on(\"end\",()=>{this.push(null)}),Q(Y,(P)=>{if(this.#j=!1,P)U(Y,P);this.#N(P)}),Y}_read(){var Z=this.#B;if(!Z)Z=this.#O();while(!0){const Y=Z.read();if(Y===null||!this.push(Y))return}}};return new V(N)}var{EventEmitter:z}=G(\"node:events\");function L(N){if(!N)return!0;var O=N.toLowerCase();return O===\"utf8\"||O===\"utf-8\"||O===\"buffer\"||O===\"binary\"}var M,B=class N extends z{#$;#B;#j;#z;bytesWritten=0;setDefaultEncoding(O){if(this.#B||!L(O))return this.#J(),this.#B.setDefaultEncoding(O)}#G(){switch(this.#$){case 1:{var O=@Bun.stdout.writer({highWaterMark:0});return O.unref(),O}case 2:{var O=@Bun.stderr.writer({highWaterMark:0});return O.unref(),O}default:throw new Error(\"Unsupported writer\")}}#H(){return this.#j\?\?=this.#G()}constructor(O){super();this.#$=O}get fd(){return this.#$}get isTTY(){return this.#z\?\?=G(\"node:tty\").isatty(this.#$)}cursorTo(O,Q,U){return(M\?\?=G(\"readline\")).cursorTo(this,O,Q,U)}moveCursor(O,Q,U){return(M\?\?=G(\"readline\")).moveCursor(this,O,Q,U)}clearLine(O,Q){return(M\?\?=G(\"readline\")).clearLine(this,O,Q)}clearScreenDown(O){return(M\?\?=G(\"readline\")).clearScreenDown(this,O)}ref(){this.#H().ref()}unref(){this.#H().unref()}on(O,Q){if(O===\"close\"||O===\"finish\")return this.#J(),this.#B.on(O,Q);if(O===\"drain\")return super.on(\"drain\",Q);if(O===\"error\")return super.on(\"error\",Q);return super.on(O,Q)}get _writableState(){return this.#J(),this.#B._writableState}get _readableState(){return this.#J(),this.#B._readableState}pipe(O){return this.#J(),this.#B.pipe(O)}unpipe(O){return this.#J(),this.#B.unpipe(O)}#J(){if(this.#B)return;this.#B=K(this.#$);const O=this.eventNames();for(let Q of O)this.#B.on(Q,(...U)=>{this.emit(Q,...U)})}#K(O){var Q=this.#H();const U=Q.write(O);this.bytesWritten+=U;const V=Q.flush(!1);return!!(U||V)}#L(O,Q){if(!L(Q))return this.#J(),this.#B.write(O,Q);return this.#K(O)}#M(O,Q){if(Q)this.emit(\"error\",Q);try{O(Q\?Q:null)}catch(U){this.emit(\"error\",U)}}#N(O,Q,U){if(!L(Q))return this.#J(),this.#B.write(O,Q,U);var V=this.#H();const X=V.write(O),Z=V.flush(!0);if(Z\?.then)return Z.then(()=>{this.#M(U),this.emit(\"drain\")},(Y)=>this.#M(U,Y)),!1;return queueMicrotask(()=>{this.#M(U)}),!!(X||Z)}write(O,Q,U){const V=this._write(O,Q,U);if(V)this.emit(\"drain\");return V}get hasColors(){return @Bun.tty[this.#$].hasColors}_write(O,Q,U){var V=this.#B;if(V)return V.write(O,Q,U);switch(arguments.length){case 0:{var X=new Error(\"Invalid arguments\");throw X.code=\"ERR_INVALID_ARG_TYPE\",X}case 1:return this.#K(O);case 2:if(typeof Q===\"function\")return this.#N(O,\"\",Q);else if(typeof Q===\"string\")return this.#L(O,Q);default:{if(typeof Q!==\"undefined\"&&typeof Q!==\"string\"||typeof U!==\"undefined\"&&typeof U!==\"function\"){var X=new Error(\"Invalid arguments\");throw X.code=\"ERR_INVALID_ARG_TYPE\",X}if(typeof U===\"undefined\")return this.#L(O,Q);return this.#N(O,Q,U)}}}destroy(){return this}end(){return this}};return new B(j)})\n"; +const char* const s_processObjectInternalsGetStdioWriteStreamCode = "(function (U,G){\"use strict\";var H={path:\"node:process\",require:G},J=(L)=>H.require(L);function K(L){var{Duplex:Q,eos:M,destroy:j}=J(\"node:stream\"),N=class Y extends Q{#$;#B;#j=!0;#z=!0;#G;#H;#J;#K;#L;#M;get isTTY(){return this.#M\?\?=J(\"node:tty\").isatty(L)}get fd(){return L}constructor(O){super({readable:!0,writable:!0});this.#G=`/dev/fd/${O}`}#N(O){const z=this.#H;if(this.#H=null,z)z(O);else if(O)this.destroy(O);else if(!this.#j&&!this.#z)this.destroy()}_destroy(O,z){if(!O&&this.#H!==null){var P=class A extends Error{code;name;constructor(T=\"The operation was aborted\",x=void 0){if(x!==void 0&&typeof x!==\"object\")throw new Error(`Invalid AbortError options:\\n\\n${JSON.stringify(x,null,2)}`);super(T,x);this.code=\"ABORT_ERR\",this.name=\"AbortError\"}};O=new P}if(this.#J=null,this.#K=null,this.#H===null)z(O);else{if(this.#H=z,this.#$)j(this.#$,O);if(this.#B)j(this.#B,O)}}_write(O,z,P){if(!this.#$){var{createWriteStream:A}=J(\"node:fs\"),T=this.#$=A(this.#G);T.on(\"finish\",()=>{if(this.#K){const x=this.#K;this.#K=null,x()}}),T.on(\"drain\",()=>{if(this.#J){const x=this.#J;this.#J=null,x()}}),M(T,(x)=>{if(this.#z=!1,x)j(T,x);this.#N(x)})}if(T.write(O,z))P();else this.#J=P}_final(O){this.#$&&this.#$.end(),this.#K=O}#O(){var{createReadStream:O}=J(\"node:fs\"),z=this.#B=O(this.#G);return z.on(\"readable\",()=>{if(this.#L){const P=this.#L;this.#L=null,P()}else this.read()}),z.on(\"end\",()=>{this.push(null)}),M(z,(P)=>{if(this.#j=!1,P)j(z,P);this.#N(P)}),z}_read(){var O=this.#B;if(!O)O=this.#O();while(!0){const z=O.read();if(z===null||!this.push(z))return}}};return new N(L)}var{EventEmitter:V}=J(\"node:events\");function X(L){if(!L)return!0;var Q=L.toLowerCase();return Q===\"utf8\"||Q===\"utf-8\"||Q===\"buffer\"||Q===\"binary\"}var Z,B=class L extends V{#$;#B;#j;#z;bytesWritten=0;setDefaultEncoding(Q){if(this.#B||!X(Q))return this.#J(),this.#B.setDefaultEncoding(Q)}#G(){switch(this.#$){case 1:{var Q=@Bun.stdout.writer({highWaterMark:0});return Q.unref(),Q}case 2:{var Q=@Bun.stderr.writer({highWaterMark:0});return Q.unref(),Q}default:throw new Error(\"Unsupported writer\")}}#H(){return this.#j\?\?=this.#G()}constructor(Q){super();this.#$=Q}get fd(){return this.#$}get isTTY(){return this.#z\?\?=J(\"node:tty\").isatty(this.#$)}cursorTo(Q,M,j){return(Z\?\?=J(\"readline\")).cursorTo(this,Q,M,j)}moveCursor(Q,M,j){return(Z\?\?=J(\"readline\")).moveCursor(this,Q,M,j)}clearLine(Q,M){return(Z\?\?=J(\"readline\")).clearLine(this,Q,M)}clearScreenDown(Q){return(Z\?\?=J(\"readline\")).clearScreenDown(this,Q)}ref(){this.#H().ref()}unref(){this.#H().unref()}on(Q,M){if(Q===\"close\"||Q===\"finish\")return this.#J(),this.#B.on(Q,M);if(Q===\"drain\")return super.on(\"drain\",M);if(Q===\"error\")return super.on(\"error\",M);return super.on(Q,M)}get _writableState(){return this.#J(),this.#B._writableState}get _readableState(){return this.#J(),this.#B._readableState}pipe(Q){return this.#J(),this.#B.pipe(Q)}unpipe(Q){return this.#J(),this.#B.unpipe(Q)}#J(){if(this.#B)return;this.#B=K(this.#$);const Q=this.eventNames();for(let M of Q)this.#B.on(M,(...j)=>{this.emit(M,...j)})}#K(Q){var M=this.#H();const j=M.write(Q);this.bytesWritten+=j;const N=M.flush(!1);return!!(j||N)}#L(Q,M){if(!X(M))return this.#J(),this.#B.write(Q,M);return this.#K(Q)}#M(Q,M){if(M)this.emit(\"error\",M);try{Q(M\?M:null)}catch(j){this.emit(\"error\",j)}}#N(Q,M,j){if(!X(M))return this.#J(),this.#B.write(Q,M,j);var N=this.#H();const Y=N.write(Q),O=N.flush(!0);if(O\?.then)return O.then(()=>{this.#M(j),this.emit(\"drain\")},(z)=>this.#M(j,z)),!1;return queueMicrotask(()=>{this.#M(j)}),!!(Y||O)}write(Q,M,j){const N=this._write(Q,M,j);if(N)this.emit(\"drain\");return N}get hasColors(){return @Bun.tty[this.#$].hasColors}_write(Q,M,j){var N=this.#B;if(N)return N.write(Q,M,j);switch(arguments.length){case 0:{var Y=new Error(\"Invalid arguments\");throw Y.code=\"ERR_INVALID_ARG_TYPE\",Y}case 1:return this.#K(Q);case 2:if(typeof M===\"function\")return this.#N(Q,\"\",M);else if(typeof M===\"string\")return this.#L(Q,M);default:{if(typeof M!==\"undefined\"&&typeof M!==\"string\"||typeof j!==\"undefined\"&&typeof j!==\"function\"){var Y=new Error(\"Invalid arguments\");throw Y.code=\"ERR_INVALID_ARG_TYPE\",Y}if(typeof j===\"undefined\")return this.#L(Q,M);return this.#N(Q,M,j)}}}destroy(){return this}end(){return this}};return new B(U)})\n"; // getStdinStream const JSC::ConstructAbility s_processObjectInternalsGetStdinStreamCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -656,7 +656,7 @@ const JSC::ConstructorKind s_processObjectInternalsGetStdinStreamCodeConstructor const JSC::ImplementationVisibility s_processObjectInternalsGetStdinStreamCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_processObjectInternalsGetStdinStreamCodeLength = 1799; static const JSC::Intrinsic s_processObjectInternalsGetStdinStreamCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_processObjectInternalsGetStdinStreamCode = "(function (Y,j,z){\"use strict\";var L={path:\"node:process\",require:j},G=(U)=>L.require(U),{Duplex:N,eos:H,destroy:Q}=G(\"node:stream\"),T=class U extends N{#Y;#$;#j;#z=!0;#G=!1;#H=!0;#I;#J;#K;get isTTY(){return G(\"tty\").isatty(Y)}get fd(){return Y}constructor(){super({readable:!0,writable:!0})}#L(P){const V=this.#J;if(this.#J=null,V)V(P);else if(P)this.destroy(P);else if(!this.#z&&!this.#H)this.destroy()}_destroy(P,V){if(!P&&this.#J!==null){var I=class J extends Error{constructor(K=\"The operation was aborted\",M=void 0){if(M!==void 0&&typeof M!==\"object\")throw new Error(`Invalid AbortError options:\\n\\n${JSON.stringify(M,null,2)}`);super(K,M);this.code=\"ABORT_ERR\",this.name=\"AbortError\"}};P=new I}if(this.#J===null)V(P);else if(this.#J=V,this.#j)Q(this.#j,P)}setRawMode(P){}on(P,V){if(P===\"readable\")this.ref(),this.#G=!0;return super.on(P,V)}pause(){return this.unref(),super.pause()}resume(){return this.ref(),super.resume()}ref(){this.#Y\?\?=z.stdin.stream().getReader(),this.#$\?\?=setInterval(()=>{},1<<30)}unref(){if(this.#$)clearInterval(this.#$),this.#$=null}async#M(){try{var P,V;const I=this.#Y.readMany();if(!I\?.then)({done:P,value:V}=I);else({done:P,value:V}=await I);if(!P){this.push(V[0]);const J=V.length;for(let K=1;K{if(this.#I){const I=this.#I;this.#I=null,I()}}),V.on(\"drain\",()=>{if(this.#K){const I=this.#K;this.#K=null,I()}}),H(V,(I)=>{if(this.#H=!1,I)Q(V,I);this.#L(I)}),V}_write(P,V,I){var J=this.#j;if(!J)J=this.#N();if(J.write(P,V))I();else this.#K=I}_final(P){this.#j.end(),this.#I=(...V)=>P(...V)}};return new T})\n"; +const char* const s_processObjectInternalsGetStdinStreamCode = "(function (Y,j,H){\"use strict\";var I={path:\"node:process\",require:j},J=(N)=>I.require(N),{Duplex:K,eos:z,destroy:L}=J(\"node:stream\"),M=class N extends K{#Y;#$;#j;#z=!0;#G=!1;#H=!0;#I;#J;#K;get isTTY(){return J(\"tty\").isatty(Y)}get fd(){return Y}constructor(){super({readable:!0,writable:!0})}#L(P){const Q=this.#J;if(this.#J=null,Q)Q(P);else if(P)this.destroy(P);else if(!this.#z&&!this.#H)this.destroy()}_destroy(P,Q){if(!P&&this.#J!==null){var G=class T extends Error{constructor(U=\"The operation was aborted\",V=void 0){if(V!==void 0&&typeof V!==\"object\")throw new Error(`Invalid AbortError options:\\n\\n${JSON.stringify(V,null,2)}`);super(U,V);this.code=\"ABORT_ERR\",this.name=\"AbortError\"}};P=new G}if(this.#J===null)Q(P);else if(this.#J=Q,this.#j)L(this.#j,P)}setRawMode(P){}on(P,Q){if(P===\"readable\")this.ref(),this.#G=!0;return super.on(P,Q)}pause(){return this.unref(),super.pause()}resume(){return this.ref(),super.resume()}ref(){this.#Y\?\?=H.stdin.stream().getReader(),this.#$\?\?=setInterval(()=>{},1<<30)}unref(){if(this.#$)clearInterval(this.#$),this.#$=null}async#M(){try{var P,Q;const G=this.#Y.readMany();if(!G\?.then)({done:P,value:Q}=G);else({done:P,value:Q}=await G);if(!P){this.push(Q[0]);const T=Q.length;for(let U=1;U{if(this.#I){const G=this.#I;this.#I=null,G()}}),Q.on(\"drain\",()=>{if(this.#K){const G=this.#K;this.#K=null,G()}}),z(Q,(G)=>{if(this.#H=!1,G)L(Q,G);this.#L(G)}),Q}_write(P,Q,G){var T=this.#j;if(!T)T=this.#N();if(T.write(P,Q))G();else this.#K=G}_final(P){this.#j.end(),this.#I=(...Q)=>P(...Q)}};return new M})\n"; #define DEFINE_BUILTIN_GENERATOR(codeName, functionName, overriddenName, argumentCount) \ JSC::FunctionExecutable* codeName##Generator(JSC::VM& vm) \ @@ -674,7 +674,7 @@ const JSC::ConstructorKind s_transformStreamInitializeTransformStreamCodeConstru const JSC::ImplementationVisibility s_transformStreamInitializeTransformStreamCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_transformStreamInitializeTransformStreamCodeLength = 1334; static const JSC::Intrinsic s_transformStreamInitializeTransformStreamCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_transformStreamInitializeTransformStreamCode = "(function (){\"use strict\";let u=arguments[0];if(@isObject(u)&&@getByIdDirectPrivate(u,\"TransformStream\"))return this;let j=arguments[1],q=arguments[2];if(u===@undefined)u=null;if(q===@undefined)q={};if(j===@undefined)j={};let F={};if(u!==null){if(\"start\"in u){if(F[\"start\"]=u[\"start\"],typeof F[\"start\"]!==\"function\")@throwTypeError(\"transformer.start should be a function\")}if(\"transform\"in u){if(F[\"transform\"]=u[\"transform\"],typeof F[\"transform\"]!==\"function\")@throwTypeError(\"transformer.transform should be a function\")}if(\"flush\"in u){if(F[\"flush\"]=u[\"flush\"],typeof F[\"flush\"]!==\"function\")@throwTypeError(\"transformer.flush should be a function\")}if(\"readableType\"in u)@throwRangeError(\"TransformStream transformer has a readableType\");if(\"writableType\"in u)@throwRangeError(\"TransformStream transformer has a writableType\")}const v=@extractHighWaterMark(q,0),G=@extractSizeAlgorithm(q),x=@extractHighWaterMark(j,1),I=@extractSizeAlgorithm(j),B=@newPromiseCapability(@Promise);if(@initializeTransformStream(this,B.@promise,x,I,v,G),@setUpTransformStreamDefaultControllerFromTransformer(this,u,F),(\"start\"in F)){const J=@getByIdDirectPrivate(this,\"controller\");(()=>@promiseInvokeOrNoopMethodNoCatch(u,F[\"start\"],[J]))().@then(()=>{B.@resolve.@call()},(_)=>{B.@reject.@call(@undefined,_)})}else B.@resolve.@call();return this})\n"; +const char* const s_transformStreamInitializeTransformStreamCode = "(function (){\"use strict\";let _=arguments[0];if(@isObject(_)&&@getByIdDirectPrivate(_,\"TransformStream\"))return this;let x=arguments[1],u=arguments[2];if(_===@undefined)_=null;if(u===@undefined)u={};if(x===@undefined)x={};let B={};if(_!==null){if(\"start\"in _){if(B[\"start\"]=_[\"start\"],typeof B[\"start\"]!==\"function\")@throwTypeError(\"transformer.start should be a function\")}if(\"transform\"in _){if(B[\"transform\"]=_[\"transform\"],typeof B[\"transform\"]!==\"function\")@throwTypeError(\"transformer.transform should be a function\")}if(\"flush\"in _){if(B[\"flush\"]=_[\"flush\"],typeof B[\"flush\"]!==\"function\")@throwTypeError(\"transformer.flush should be a function\")}if(\"readableType\"in _)@throwRangeError(\"TransformStream transformer has a readableType\");if(\"writableType\"in _)@throwRangeError(\"TransformStream transformer has a writableType\")}const F=@extractHighWaterMark(u,0),j=@extractSizeAlgorithm(u),I=@extractHighWaterMark(x,1),q=@extractSizeAlgorithm(x),E=@newPromiseCapability(@Promise);if(@initializeTransformStream(this,E.@promise,I,q,F,j),@setUpTransformStreamDefaultControllerFromTransformer(this,_,B),(\"start\"in B)){const G=@getByIdDirectPrivate(this,\"controller\");(()=>@promiseInvokeOrNoopMethodNoCatch(_,B[\"start\"],[G]))().@then(()=>{E.@resolve.@call()},(v)=>{E.@reject.@call(@undefined,v)})}else E.@resolve.@call();return this})\n"; // readable const JSC::ConstructAbility s_transformStreamReadableCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -714,9 +714,9 @@ const char* const s_moduleMainCode = "(function (){\"use strict\";return @requir const JSC::ConstructAbility s_moduleRequireCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; const JSC::ConstructorKind s_moduleRequireCodeConstructorKind = JSC::ConstructorKind::None; const JSC::ImplementationVisibility s_moduleRequireCodeImplementationVisibility = JSC::ImplementationVisibility::Public; -const int s_moduleRequireCodeLength = 871; +const int s_moduleRequireCodeLength = 927; static const JSC::Intrinsic s_moduleRequireCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_moduleRequireCode = "(function (_){\"use strict\";const y=@requireMap.@get(_)||@requireMap.@get(_=@resolveSync(_,this.path,!1));if(y)return @evaluateCommonJSModule(y),y.exports;if(_.endsWith(\".json\")||_.endsWith(\".toml\")||_.endsWith(\".node\"))return @internalRequire(_);let M=@Loader.registry.@get(_);if(M\?.evaluated){const h=M.module,l=@Loader.getModuleNamespaceObject(h),r=l\?.[@commonJSSymbol]===0||l\?.default\?.[@commonJSSymbol]===0\?l.default:l;return @requireMap.@set(_,@createCommonJSModule(_,r,!0)),r}const b=@createCommonJSModule(_,{},!1);@requireMap.@set(_,b);var f=this.@require(_,b);if(f===-1){try{f=@requireESM(_)}catch(h){throw @requireMap.@delete(_),h}if(M=@Loader.registry.@get(_),M\?.evaluated){const h=@Loader.getModuleNamespaceObject(M.module);return b.exports=h\?.[@commonJSSymbol]===0||h\?.default\?.[@commonJSSymbol]===0\?h.default:h}}return @evaluateCommonJSModule(b),b.exports})\n"; +const char* const s_moduleRequireCode = "(function (l){\"use strict\";const M=@requireMap.@get(l)||@requireMap.@get(l=@resolveSync(l,this.path,!1));if(M)return @evaluateCommonJSModule(M),M.exports;if(l.endsWith(\".json\")||l.endsWith(\".toml\")||l.endsWith(\".node\"))return @internalRequire(l);let y=@Loader.registry.@get(l);if(y\?.evaluated&&(y.state\?\?0)>=@ModuleReady){const _=y.module,S=@Loader.getModuleNamespaceObject(_),t=S\?.[@commonJSSymbol]===0||S\?.default\?.[@commonJSSymbol]===0\?S.default:S;return @requireMap.@set(l,@createCommonJSModule(l,t,!0)),t}const h=@createCommonJSModule(l,{},!1);@requireMap.@set(l,h);var L=this.@require(l,h);if(L===-1){try{L=@requireESM(l)}catch(_){throw @requireMap.@delete(l),_}if(y=@Loader.registry.@get(l),y\?.evaluated&&(y.state\?\?0)>=@ModuleReady){const _=@Loader.getModuleNamespaceObject(y.module);return h.exports=_\?.[@commonJSSymbol]===0||_\?.default\?.[@commonJSSymbol]===0\?_.default:_}}return @evaluateCommonJSModule(h),h.exports})\n"; // requireResolve const JSC::ConstructAbility s_moduleRequireResolveCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -830,7 +830,7 @@ const JSC::ConstructorKind s_jsBufferPrototypeReadIntLECodeConstructorKind = JSC const JSC::ImplementationVisibility s_jsBufferPrototypeReadIntLECodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_jsBufferPrototypeReadIntLECodeLength = 528; static const JSC::Intrinsic s_jsBufferPrototypeReadIntLECodeIntrinsic = JSC::NoIntrinsic; -const char* const s_jsBufferPrototypeReadIntLECode = "(function (d,r){\"use strict\";const _=this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength);switch(r){case 1:return _.getInt8(d);case 2:return _.getInt16(d,!0);case 3:{const u=_.getUint16(d,!0)+_.getUint8(d+2)*65536;return u|(u&8388608)*510}case 4:return _.getInt32(d,!0);case 5:{const u=_.getUint8(d+4);return(u|(u&128)*33554430)*4294967296+_.getUint32(d,!0)}case 6:{const u=_.getUint16(d+4,!0);return(u|(u&32768)*131070)*4294967296+_.getUint32(d,!0)}}@throwRangeError(\"byteLength must be >= 1 and <= 6\")})\n"; +const char* const s_jsBufferPrototypeReadIntLECode = "(function (d,r){\"use strict\";const u=this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength);switch(r){case 1:return u.getInt8(d);case 2:return u.getInt16(d,!0);case 3:{const _=u.getUint16(d,!0)+u.getUint8(d+2)*65536;return _|(_&8388608)*510}case 4:return u.getInt32(d,!0);case 5:{const _=u.getUint8(d+4);return(_|(_&128)*33554430)*4294967296+u.getUint32(d,!0)}case 6:{const _=u.getUint16(d+4,!0);return(_|(_&32768)*131070)*4294967296+u.getUint32(d,!0)}}@throwRangeError(\"byteLength must be >= 1 and <= 6\")})\n"; // readIntBE const JSC::ConstructAbility s_jsBufferPrototypeReadIntBECodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -982,7 +982,7 @@ const JSC::ConstructorKind s_jsBufferPrototypeWriteInt32BECodeConstructorKind = const JSC::ImplementationVisibility s_jsBufferPrototypeWriteInt32BECodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_jsBufferPrototypeWriteInt32BECodeLength = 135; static const JSC::Intrinsic s_jsBufferPrototypeWriteInt32BECodeIntrinsic = JSC::NoIntrinsic; -const char* const s_jsBufferPrototypeWriteInt32BECode = "(function (d,c){\"use strict\";return(this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength)).setInt32(c,d,!1),c+4})\n"; +const char* const s_jsBufferPrototypeWriteInt32BECode = "(function (c,d){\"use strict\";return(this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength)).setInt32(d,c,!1),d+4})\n"; // writeUInt32LE const JSC::ConstructAbility s_jsBufferPrototypeWriteUInt32LECodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -1006,7 +1006,7 @@ const JSC::ConstructorKind s_jsBufferPrototypeWriteIntLECodeConstructorKind = JS const JSC::ImplementationVisibility s_jsBufferPrototypeWriteIntLECodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_jsBufferPrototypeWriteIntLECodeLength = 573; static const JSC::Intrinsic s_jsBufferPrototypeWriteIntLECodeIntrinsic = JSC::NoIntrinsic; -const char* const s_jsBufferPrototypeWriteIntLECode = "(function (d,r,c){\"use strict\";const j=this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength);switch(c){case 1:{j.setInt8(r,d);break}case 2:{j.setInt16(r,d,!0);break}case 3:{j.setUint16(r,d&65535,!0),j.setInt8(r+2,Math.floor(d*0.0000152587890625));break}case 4:{j.setInt32(r,d,!0);break}case 5:{j.setUint32(r,d|0,!0),j.setInt8(r+4,Math.floor(d*0.00000000023283064365386964));break}case 6:{j.setUint32(r,d|0,!0),j.setInt16(r+4,Math.floor(d*0.00000000023283064365386964),!0);break}default:@throwRangeError(\"byteLength must be >= 1 and <= 6\")}return r+c})\n"; +const char* const s_jsBufferPrototypeWriteIntLECode = "(function (d,j,r){\"use strict\";const c=this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength);switch(r){case 1:{c.setInt8(j,d);break}case 2:{c.setInt16(j,d,!0);break}case 3:{c.setUint16(j,d&65535,!0),c.setInt8(j+2,Math.floor(d*0.0000152587890625));break}case 4:{c.setInt32(j,d,!0);break}case 5:{c.setUint32(j,d|0,!0),c.setInt8(j+4,Math.floor(d*0.00000000023283064365386964));break}case 6:{c.setUint32(j,d|0,!0),c.setInt16(j+4,Math.floor(d*0.00000000023283064365386964),!0);break}default:@throwRangeError(\"byteLength must be >= 1 and <= 6\")}return j+r})\n"; // writeIntBE const JSC::ConstructAbility s_jsBufferPrototypeWriteIntBECodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -1030,7 +1030,7 @@ const JSC::ConstructorKind s_jsBufferPrototypeWriteUIntBECodeConstructorKind = J const JSC::ImplementationVisibility s_jsBufferPrototypeWriteUIntBECodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_jsBufferPrototypeWriteUIntBECodeLength = 579; static const JSC::Intrinsic s_jsBufferPrototypeWriteUIntBECodeIntrinsic = JSC::NoIntrinsic; -const char* const s_jsBufferPrototypeWriteUIntBECode = "(function (d,r,p){\"use strict\";const _=this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength);switch(p){case 1:{_.setUint8(r,d);break}case 2:{_.setUint16(r,d,!1);break}case 3:{_.setUint16(r+1,d&65535,!1),_.setUint8(r,Math.floor(d*0.0000152587890625));break}case 4:{_.setUint32(r,d,!1);break}case 5:{_.setUint32(r+1,d|0,!1),_.setUint8(r,Math.floor(d*0.00000000023283064365386964));break}case 6:{_.setUint32(r+2,d|0,!1),_.setUint16(r,Math.floor(d*0.00000000023283064365386964),!1);break}default:@throwRangeError(\"byteLength must be >= 1 and <= 6\")}return r+p})\n"; +const char* const s_jsBufferPrototypeWriteUIntBECode = "(function (r,p,_){\"use strict\";const d=this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength);switch(_){case 1:{d.setUint8(p,r);break}case 2:{d.setUint16(p,r,!1);break}case 3:{d.setUint16(p+1,r&65535,!1),d.setUint8(p,Math.floor(r*0.0000152587890625));break}case 4:{d.setUint32(p,r,!1);break}case 5:{d.setUint32(p+1,r|0,!1),d.setUint8(p,Math.floor(r*0.00000000023283064365386964));break}case 6:{d.setUint32(p+2,r|0,!1),d.setUint16(p,Math.floor(r*0.00000000023283064365386964),!1);break}default:@throwRangeError(\"byteLength must be >= 1 and <= 6\")}return p+_})\n"; // writeFloatLE const JSC::ConstructAbility s_jsBufferPrototypeWriteFloatLECodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -1126,7 +1126,7 @@ const JSC::ConstructorKind s_jsBufferPrototypeLatin1WriteCodeConstructorKind = J const JSC::ImplementationVisibility s_jsBufferPrototypeLatin1WriteCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_jsBufferPrototypeLatin1WriteCodeLength = 67; static const JSC::Intrinsic s_jsBufferPrototypeLatin1WriteCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_jsBufferPrototypeLatin1WriteCode = "(function (a,d,r){\"use strict\";return this.write(a,d,r,\"latin1\")})\n"; +const char* const s_jsBufferPrototypeLatin1WriteCode = "(function (a,r,d){\"use strict\";return this.write(a,r,d,\"latin1\")})\n"; // asciiWrite const JSC::ConstructAbility s_jsBufferPrototypeAsciiWriteCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -1150,7 +1150,7 @@ const JSC::ConstructorKind s_jsBufferPrototypeBase64urlWriteCodeConstructorKind const JSC::ImplementationVisibility s_jsBufferPrototypeBase64urlWriteCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_jsBufferPrototypeBase64urlWriteCodeLength = 70; static const JSC::Intrinsic s_jsBufferPrototypeBase64urlWriteCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_jsBufferPrototypeBase64urlWriteCode = "(function (a,d,r){\"use strict\";return this.write(a,d,r,\"base64url\")})\n"; +const char* const s_jsBufferPrototypeBase64urlWriteCode = "(function (a,r,d){\"use strict\";return this.write(a,r,d,\"base64url\")})\n"; // hexWrite const JSC::ConstructAbility s_jsBufferPrototypeHexWriteCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -1198,7 +1198,7 @@ const JSC::ConstructorKind s_jsBufferPrototypeAsciiSliceCodeConstructorKind = JS const JSC::ImplementationVisibility s_jsBufferPrototypeAsciiSliceCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_jsBufferPrototypeAsciiSliceCodeLength = 65; static const JSC::Intrinsic s_jsBufferPrototypeAsciiSliceCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_jsBufferPrototypeAsciiSliceCode = "(function (r,d){\"use strict\";return this.toString(r,d,\"ascii\")})\n"; +const char* const s_jsBufferPrototypeAsciiSliceCode = "(function (d,r){\"use strict\";return this.toString(d,r,\"ascii\")})\n"; // base64Slice const JSC::ConstructAbility s_jsBufferPrototypeBase64SliceCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -1238,7 +1238,7 @@ const JSC::ConstructorKind s_jsBufferPrototypeSliceCodeConstructorKind = JSC::Co const JSC::ImplementationVisibility s_jsBufferPrototypeSliceCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_jsBufferPrototypeSliceCodeLength = 260; static const JSC::Intrinsic s_jsBufferPrototypeSliceCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_jsBufferPrototypeSliceCode = "(function (i,m){\"use strict\";var{buffer:q,byteOffset:v,byteLength:c}=this;function w(z,k){if(z=@trunc(z),z===0||@isNaN(z))return 0;else if(z<0)return z+=k,z>0\?z:0;else return zp\?x-p:0)})\n"; +const char* const s_jsBufferPrototypeSliceCode = "(function (c,w){\"use strict\";var{buffer:m,byteOffset:x,byteLength:z}=this;function p(k,v){if(k=@trunc(k),k===0||@isNaN(k))return 0;else if(k<0)return k+=v,k>0\?k:0;else return ki\?q-i:0)})\n"; // parent const JSC::ConstructAbility s_jsBufferPrototypeParentCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -1280,7 +1280,7 @@ const JSC::ConstructorKind s_readableByteStreamControllerInitializeReadableByteS const JSC::ImplementationVisibility s_readableByteStreamControllerInitializeReadableByteStreamControllerCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_readableByteStreamControllerInitializeReadableByteStreamControllerCodeLength = 253; static const JSC::Intrinsic s_readableByteStreamControllerInitializeReadableByteStreamControllerCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_readableByteStreamControllerInitializeReadableByteStreamControllerCode = "(function (f,l,p){\"use strict\";if(arguments.length!==4&&arguments[3]!==@isReadableStream)@throwTypeError(\"ReadableByteStreamController constructor should not be called directly\");return @privateInitializeReadableByteStreamController.@call(this,f,l,p)})\n"; +const char* const s_readableByteStreamControllerInitializeReadableByteStreamControllerCode = "(function (f,p,l){\"use strict\";if(arguments.length!==4&&arguments[3]!==@isReadableStream)@throwTypeError(\"ReadableByteStreamController constructor should not be called directly\");return @privateInitializeReadableByteStreamController.@call(this,f,p,l)})\n"; // enqueue const JSC::ConstructAbility s_readableByteStreamControllerEnqueueCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -1312,7 +1312,7 @@ const JSC::ConstructorKind s_readableByteStreamControllerByobRequestCodeConstruc const JSC::ImplementationVisibility s_readableByteStreamControllerByobRequestCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_readableByteStreamControllerByobRequestCodeLength = 523; static const JSC::Intrinsic s_readableByteStreamControllerByobRequestCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_readableByteStreamControllerByobRequestCode = "(function (){\"use strict\";if(!@isReadableByteStreamController(this))throw @makeGetterTypeError(\"ReadableByteStreamController\",\"byobRequest\");var _=@getByIdDirectPrivate(this,\"byobRequest\");if(_===@undefined){var m=@getByIdDirectPrivate(this,\"pendingPullIntos\");const a=m.peek();if(a){const l=new @Uint8Array(a.buffer,a.byteOffset+a.bytesFilled,a.byteLength-a.bytesFilled);@putByIdDirectPrivate(this,\"byobRequest\",new @ReadableStreamBYOBRequest(this,l,@isReadableStream))}}return @getByIdDirectPrivate(this,\"byobRequest\")})\n"; +const char* const s_readableByteStreamControllerByobRequestCode = "(function (){\"use strict\";if(!@isReadableByteStreamController(this))throw @makeGetterTypeError(\"ReadableByteStreamController\",\"byobRequest\");var _=@getByIdDirectPrivate(this,\"byobRequest\");if(_===@undefined){var a=@getByIdDirectPrivate(this,\"pendingPullIntos\");const l=a.peek();if(l){const m=new @Uint8Array(l.buffer,l.byteOffset+l.bytesFilled,l.byteLength-l.bytesFilled);@putByIdDirectPrivate(this,\"byobRequest\",new @ReadableStreamBYOBRequest(this,m,@isReadableStream))}}return @getByIdDirectPrivate(this,\"byobRequest\")})\n"; // desiredSize const JSC::ConstructAbility s_readableByteStreamControllerDesiredSizeCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -1338,7 +1338,7 @@ const JSC::ConstructorKind s_consoleObjectAsyncIteratorCodeConstructorKind = JSC const JSC::ImplementationVisibility s_consoleObjectAsyncIteratorCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_consoleObjectAsyncIteratorCodeLength = 577; static const JSC::Intrinsic s_consoleObjectAsyncIteratorCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_consoleObjectAsyncIteratorCode = "(function (){\"use strict\";const w=async function*_(){var A=@Bun.stdin.stream().getReader(),F=new globalThis.TextDecoder(\"utf-8\",{fatal:!1}),H,J=@Bun.indexOfLine;try{while(!0){var K,m,L;const D=A.readMany();if(@isPromise(D))({done:K,value:m}=await D);else({done:K,value:m}=D);if(K){if(L)yield F.decode(L);return}var M;for(let z of m){if(M=z,L)M=@Buffer.concat([L,z]),L=null;var q=0,B=J(M,q);while(B!==-1)yield F.decode(M.subarray(q,B)),q=B+1,B=J(M,q);L=M.subarray(q)}}}catch(D){H=D}finally{if(A.releaseLock(),H)throw H}},G=globalThis.Symbol.asyncIterator;return this[G]=w,w()})\n"; +const char* const s_consoleObjectAsyncIteratorCode = "(function (){\"use strict\";const j=async function*A(){var m=@Bun.stdin.stream().getReader(),D=new globalThis.TextDecoder(\"utf-8\",{fatal:!1}),F,G=@Bun.indexOfLine;try{while(!0){var q,H,J;const K=m.readMany();if(@isPromise(K))({done:q,value:H}=await K);else({done:q,value:H}=K);if(q){if(J)yield D.decode(J);return}var w;for(let _ of H){if(w=_,J)w=@Buffer.concat([J,_]),J=null;var L=0,M=G(w,L);while(M!==-1)yield D.decode(w.subarray(L,M)),L=M+1,M=G(w,L);J=w.subarray(L)}}}catch(K){F=K}finally{if(m.releaseLock(),F)throw F}},z=globalThis.Symbol.asyncIterator;return this[z]=j,j()})\n"; // write const JSC::ConstructAbility s_consoleObjectWriteCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -1346,7 +1346,7 @@ const JSC::ConstructorKind s_consoleObjectWriteCodeConstructorKind = JSC::Constr const JSC::ImplementationVisibility s_consoleObjectWriteCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_consoleObjectWriteCodeLength = 310; static const JSC::Intrinsic s_consoleObjectWriteCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_consoleObjectWriteCode = "(function (d){\"use strict\";var _=@getByIdDirectPrivate(this,\"writer\");if(!_){var b=@toLength(d\?.length\?\?0);_=@Bun.stdout.writer({highWaterMark:b>65536\?b:65536}),@putByIdDirectPrivate(this,\"writer\",_)}var c=_.write(d);const f=@argumentCount();for(var a=1;a65536\?_:65536}),@putByIdDirectPrivate(this,\"writer\",d)}var b=d.write(a);const f=@argumentCount();for(var c=1;c{},(S)=>{g.error(S)});function y(){@readableStreamDefaultReaderRead(h).@then(function(S){if(S.done){g.close();return}try{g.enqueue(S.value)}catch(_){g.error(\"ReadableStream chunk enqueueing in the sink failed\");return}y()},function(S){g.error(S)})}y()})\n"; +const char* const s_readableStreamInternalsReadableStreamPipeToCode = "(function (_,y){\"use strict\";@assert(@isReadableStream(_));const c=new @ReadableStreamDefaultReader(_);@getByIdDirectPrivate(c,\"closedPromiseCapability\").@promise.@then(()=>{},(g)=>{y.error(g)});function h(){@readableStreamDefaultReaderRead(c).@then(function(g){if(g.done){y.close();return}try{y.enqueue(g.value)}catch(S){y.error(\"ReadableStream chunk enqueueing in the sink failed\");return}h()},function(g){y.error(g)})}h()})\n"; // acquireReadableStreamDefaultReader const JSC::ConstructAbility s_readableStreamInternalsAcquireReadableStreamDefaultReaderCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -1404,7 +1404,7 @@ const JSC::ConstructorKind s_readableStreamInternalsSetupReadableStreamDefaultCo const JSC::ImplementationVisibility s_readableStreamInternalsSetupReadableStreamDefaultControllerCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_readableStreamInternalsSetupReadableStreamDefaultControllerCodeLength = 523; static const JSC::Intrinsic s_readableStreamInternalsSetupReadableStreamDefaultControllerCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_readableStreamInternalsSetupReadableStreamDefaultControllerCode = "(function (b,j,v,w,_,x,f){\"use strict\";const B=new @ReadableStreamDefaultController(b,j,v,w,@isReadableStream),C=()=>@promiseInvokeOrNoopMethod(j,x,[B]),D=(q)=>@promiseInvokeOrNoopMethod(j,f,[q]);@putByIdDirectPrivate(B,\"pullAlgorithm\",C),@putByIdDirectPrivate(B,\"cancelAlgorithm\",D),@putByIdDirectPrivate(B,\"pull\",@readableStreamDefaultControllerPull),@putByIdDirectPrivate(B,\"cancel\",@readableStreamDefaultControllerCancel),@putByIdDirectPrivate(b,\"readableStreamController\",B),@readableStreamDefaultControllerStart(B)})\n"; +const char* const s_readableStreamInternalsSetupReadableStreamDefaultControllerCode = "(function (f,b,j,q,v,w,x){\"use strict\";const B=new @ReadableStreamDefaultController(f,b,j,q,@isReadableStream),C=()=>@promiseInvokeOrNoopMethod(b,w,[B]),D=(_)=>@promiseInvokeOrNoopMethod(b,x,[_]);@putByIdDirectPrivate(B,\"pullAlgorithm\",C),@putByIdDirectPrivate(B,\"cancelAlgorithm\",D),@putByIdDirectPrivate(B,\"pull\",@readableStreamDefaultControllerPull),@putByIdDirectPrivate(B,\"cancel\",@readableStreamDefaultControllerCancel),@putByIdDirectPrivate(f,\"readableStreamController\",B),@readableStreamDefaultControllerStart(B)})\n"; // createReadableStreamController const JSC::ConstructAbility s_readableStreamInternalsCreateReadableStreamControllerCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -1412,7 +1412,7 @@ const JSC::ConstructorKind s_readableStreamInternalsCreateReadableStreamControll const JSC::ImplementationVisibility s_readableStreamInternalsCreateReadableStreamControllerCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_readableStreamInternalsCreateReadableStreamControllerCodeLength = 671; static const JSC::Intrinsic s_readableStreamInternalsCreateReadableStreamControllerCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_readableStreamInternalsCreateReadableStreamControllerCode = "(function (v,w,A){\"use strict\";const C=w.type,b=@toString(C);if(b===\"bytes\"){if(A.highWaterMark===@undefined)A.highWaterMark=0;if(A.size!==@undefined)@throwRangeError(\"Strategy for a ReadableByteStreamController cannot have a size\");@putByIdDirectPrivate(v,\"readableStreamController\",new @ReadableByteStreamController(v,w,A.highWaterMark,@isReadableStream))}else if(b===\"direct\"){var f=A\?.highWaterMark;@initializeArrayBufferStream.@call(v,w,f)}else if(C===@undefined){if(A.highWaterMark===@undefined)A.highWaterMark=1;@setupReadableStreamDefaultController(v,w,A.size,A.highWaterMark,w.start,w.pull,w.cancel)}else @throwRangeError(\"Invalid type for underlying source\")})\n"; +const char* const s_readableStreamInternalsCreateReadableStreamControllerCode = "(function (f,v,w){\"use strict\";const C=v.type,b=@toString(C);if(b===\"bytes\"){if(w.highWaterMark===@undefined)w.highWaterMark=0;if(w.size!==@undefined)@throwRangeError(\"Strategy for a ReadableByteStreamController cannot have a size\");@putByIdDirectPrivate(f,\"readableStreamController\",new @ReadableByteStreamController(f,v,w.highWaterMark,@isReadableStream))}else if(b===\"direct\"){var A=w\?.highWaterMark;@initializeArrayBufferStream.@call(f,v,A)}else if(C===@undefined){if(w.highWaterMark===@undefined)w.highWaterMark=1;@setupReadableStreamDefaultController(f,v,w.size,w.highWaterMark,v.start,v.pull,v.cancel)}else @throwRangeError(\"Invalid type for underlying source\")})\n"; // readableStreamDefaultControllerStart const JSC::ConstructAbility s_readableStreamInternalsReadableStreamDefaultControllerStartCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -1420,7 +1420,7 @@ const JSC::ConstructorKind s_readableStreamInternalsReadableStreamDefaultControl const JSC::ImplementationVisibility s_readableStreamInternalsReadableStreamDefaultControllerStartCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_readableStreamInternalsReadableStreamDefaultControllerStartCodeLength = 465; static const JSC::Intrinsic s_readableStreamInternalsReadableStreamDefaultControllerStartCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_readableStreamInternalsReadableStreamDefaultControllerStartCode = "(function (m){\"use strict\";if(@getByIdDirectPrivate(m,\"started\")!==-1)return;const B=@getByIdDirectPrivate(m,\"underlyingSource\"),p=B.start;@putByIdDirectPrivate(m,\"started\",0),@promiseInvokeOrNoopMethodNoCatch(B,p,[m]).@then(()=>{@putByIdDirectPrivate(m,\"started\",1),@assert(!@getByIdDirectPrivate(m,\"pulling\")),@assert(!@getByIdDirectPrivate(m,\"pullAgain\")),@readableStreamDefaultControllerCallPullIfNeeded(m)},(a)=>{@readableStreamDefaultControllerError(m,a)})})\n"; +const char* const s_readableStreamInternalsReadableStreamDefaultControllerStartCode = "(function (m){\"use strict\";if(@getByIdDirectPrivate(m,\"started\")!==-1)return;const B=@getByIdDirectPrivate(m,\"underlyingSource\"),a=B.start;@putByIdDirectPrivate(m,\"started\",0),@promiseInvokeOrNoopMethodNoCatch(B,a,[m]).@then(()=>{@putByIdDirectPrivate(m,\"started\",1),@assert(!@getByIdDirectPrivate(m,\"pulling\")),@assert(!@getByIdDirectPrivate(m,\"pullAgain\")),@readableStreamDefaultControllerCallPullIfNeeded(m)},(p)=>{@readableStreamDefaultControllerError(m,p)})})\n"; // readableStreamPipeToWritableStream const JSC::ConstructAbility s_readableStreamInternalsReadableStreamPipeToWritableStreamCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -1428,7 +1428,7 @@ const JSC::ConstructorKind s_readableStreamInternalsReadableStreamPipeToWritable const JSC::ImplementationVisibility s_readableStreamInternalsReadableStreamPipeToWritableStreamCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_readableStreamInternalsReadableStreamPipeToWritableStreamCodeLength = 1631; static const JSC::Intrinsic s_readableStreamInternalsReadableStreamPipeToWritableStreamCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_readableStreamInternalsReadableStreamPipeToWritableStreamCode = "(function (_,z,k,f,q,B){\"use strict\";if(@assert(@isReadableStream(_)),@assert(@isWritableStream(z)),@assert(!@isReadableStreamLocked(_)),@assert(!@isWritableStreamLocked(z)),@assert(B===@undefined||@isAbortSignal(B)),@getByIdDirectPrivate(_,\"underlyingByteSource\")!==@undefined)return @Promise.@reject(\"Piping to a readable bytestream is not supported\");let H={source:_,destination:z,preventAbort:f,preventCancel:q,preventClose:k,signal:B};if(H.reader=@acquireReadableStreamDefaultReader(_),H.writer=@acquireWritableStreamDefaultWriter(z),@putByIdDirectPrivate(_,\"disturbed\",!0),H.finalized=!1,H.shuttingDown=!1,H.promiseCapability=@newPromiseCapability(@Promise),H.pendingReadPromiseCapability=@newPromiseCapability(@Promise),H.pendingReadPromiseCapability.@resolve.@call(),H.pendingWritePromise=@Promise.@resolve(),B!==@undefined){const I=(J)=>{if(H.finalized)return;@pipeToShutdownWithAction(H,()=>{const K=!H.preventAbort&&@getByIdDirectPrivate(H.destination,\"state\")===\"writable\"\?@writableStreamAbort(H.destination,J):@Promise.@resolve(),E=!H.preventCancel&&@getByIdDirectPrivate(H.source,\"state\")===@streamReadable\?@readableStreamCancel(H.source,J):@Promise.@resolve();let w=@newPromiseCapability(@Promise),x=!0,T=()=>{if(x){x=!1;return}w.@resolve.@call()},F=(G)=>{w.@reject.@call(@undefined,G)};return K.@then(T,F),E.@then(T,F),w.@promise},J)};if(@whenSignalAborted(B,I))return H.promiseCapability.@promise}return @pipeToErrorsMustBePropagatedForward(H),@pipeToErrorsMustBePropagatedBackward(H),@pipeToClosingMustBePropagatedForward(H),@pipeToClosingMustBePropagatedBackward(H),@pipeToLoop(H),H.promiseCapability.@promise})\n"; +const char* const s_readableStreamInternalsReadableStreamPipeToWritableStreamCode = "(function (D,I,E,T,k,J){\"use strict\";if(@assert(@isReadableStream(D)),@assert(@isWritableStream(I)),@assert(!@isReadableStreamLocked(D)),@assert(!@isWritableStreamLocked(I)),@assert(J===@undefined||@isAbortSignal(J)),@getByIdDirectPrivate(D,\"underlyingByteSource\")!==@undefined)return @Promise.@reject(\"Piping to a readable bytestream is not supported\");let _={source:D,destination:I,preventAbort:T,preventCancel:k,preventClose:E,signal:J};if(_.reader=@acquireReadableStreamDefaultReader(D),_.writer=@acquireWritableStreamDefaultWriter(I),@putByIdDirectPrivate(D,\"disturbed\",!0),_.finalized=!1,_.shuttingDown=!1,_.promiseCapability=@newPromiseCapability(@Promise),_.pendingReadPromiseCapability=@newPromiseCapability(@Promise),_.pendingReadPromiseCapability.@resolve.@call(),_.pendingWritePromise=@Promise.@resolve(),J!==@undefined){const q=(w)=>{if(_.finalized)return;@pipeToShutdownWithAction(_,()=>{const z=!_.preventAbort&&@getByIdDirectPrivate(_.destination,\"state\")===\"writable\"\?@writableStreamAbort(_.destination,w):@Promise.@resolve(),F=!_.preventCancel&&@getByIdDirectPrivate(_.source,\"state\")===@streamReadable\?@readableStreamCancel(_.source,w):@Promise.@resolve();let G=@newPromiseCapability(@Promise),H=!0,K=()=>{if(H){H=!1;return}G.@resolve.@call()},f=(L)=>{G.@reject.@call(@undefined,L)};return z.@then(K,f),F.@then(K,f),G.@promise},w)};if(@whenSignalAborted(J,q))return _.promiseCapability.@promise}return @pipeToErrorsMustBePropagatedForward(_),@pipeToErrorsMustBePropagatedBackward(_),@pipeToClosingMustBePropagatedForward(_),@pipeToClosingMustBePropagatedBackward(_),@pipeToLoop(_),_.promiseCapability.@promise})\n"; // pipeToLoop const JSC::ConstructAbility s_readableStreamInternalsPipeToLoopCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -1444,7 +1444,7 @@ const JSC::ConstructorKind s_readableStreamInternalsPipeToDoReadWriteCodeConstru const JSC::ImplementationVisibility s_readableStreamInternalsPipeToDoReadWriteCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_readableStreamInternalsPipeToDoReadWriteCodeLength = 731; static const JSC::Intrinsic s_readableStreamInternalsPipeToDoReadWriteCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_readableStreamInternalsPipeToDoReadWriteCode = "(function (m){\"use strict\";return @assert(!m.shuttingDown),m.pendingReadPromiseCapability=@newPromiseCapability(@Promise),@getByIdDirectPrivate(m.writer,\"readyPromise\").@promise.@then(()=>{if(m.shuttingDown){m.pendingReadPromiseCapability.@resolve.@call(@undefined,!1);return}@readableStreamDefaultReaderRead(m.reader).@then((_)=>{const d=!_.done&&@getByIdDirectPrivate(m.writer,\"stream\")!==@undefined;if(m.pendingReadPromiseCapability.@resolve.@call(@undefined,d),!d)return;m.pendingWritePromise=@writableStreamDefaultWriterWrite(m.writer,_.value)},(_)=>{m.pendingReadPromiseCapability.@resolve.@call(@undefined,!1)})},(_)=>{m.pendingReadPromiseCapability.@resolve.@call(@undefined,!1)}),m.pendingReadPromiseCapability.@promise})\n"; +const char* const s_readableStreamInternalsPipeToDoReadWriteCode = "(function (_){\"use strict\";return @assert(!_.shuttingDown),_.pendingReadPromiseCapability=@newPromiseCapability(@Promise),@getByIdDirectPrivate(_.writer,\"readyPromise\").@promise.@then(()=>{if(_.shuttingDown){_.pendingReadPromiseCapability.@resolve.@call(@undefined,!1);return}@readableStreamDefaultReaderRead(_.reader).@then((m)=>{const d=!m.done&&@getByIdDirectPrivate(_.writer,\"stream\")!==@undefined;if(_.pendingReadPromiseCapability.@resolve.@call(@undefined,d),!d)return;_.pendingWritePromise=@writableStreamDefaultWriterWrite(_.writer,m.value)},(m)=>{_.pendingReadPromiseCapability.@resolve.@call(@undefined,!1)})},(m)=>{_.pendingReadPromiseCapability.@resolve.@call(@undefined,!1)}),_.pendingReadPromiseCapability.@promise})\n"; // pipeToErrorsMustBePropagatedForward const JSC::ConstructAbility s_readableStreamInternalsPipeToErrorsMustBePropagatedForwardCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -1452,7 +1452,7 @@ const JSC::ConstructorKind s_readableStreamInternalsPipeToErrorsMustBePropagated const JSC::ImplementationVisibility s_readableStreamInternalsPipeToErrorsMustBePropagatedForwardCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_readableStreamInternalsPipeToErrorsMustBePropagatedForwardCodeLength = 438; static const JSC::Intrinsic s_readableStreamInternalsPipeToErrorsMustBePropagatedForwardCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_readableStreamInternalsPipeToErrorsMustBePropagatedForwardCode = "(function (d){\"use strict\";const _=()=>{d.pendingReadPromiseCapability.@resolve.@call(@undefined,!1);const b=@getByIdDirectPrivate(d.source,\"storedError\");if(!d.preventAbort){@pipeToShutdownWithAction(d,()=>@writableStreamAbort(d.destination,b),b);return}@pipeToShutdown(d,b)};if(@getByIdDirectPrivate(d.source,\"state\")===@streamErrored){_();return}@getByIdDirectPrivate(d.reader,\"closedPromiseCapability\").@promise.@then(@undefined,_)})\n"; +const char* const s_readableStreamInternalsPipeToErrorsMustBePropagatedForwardCode = "(function (_){\"use strict\";const d=()=>{_.pendingReadPromiseCapability.@resolve.@call(@undefined,!1);const b=@getByIdDirectPrivate(_.source,\"storedError\");if(!_.preventAbort){@pipeToShutdownWithAction(_,()=>@writableStreamAbort(_.destination,b),b);return}@pipeToShutdown(_,b)};if(@getByIdDirectPrivate(_.source,\"state\")===@streamErrored){d();return}@getByIdDirectPrivate(_.reader,\"closedPromiseCapability\").@promise.@then(@undefined,d)})\n"; // pipeToErrorsMustBePropagatedBackward const JSC::ConstructAbility s_readableStreamInternalsPipeToErrorsMustBePropagatedBackwardCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -1484,7 +1484,7 @@ const JSC::ConstructorKind s_readableStreamInternalsPipeToShutdownWithActionCode const JSC::ImplementationVisibility s_readableStreamInternalsPipeToShutdownWithActionCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_readableStreamInternalsPipeToShutdownWithActionCodeLength = 458; static const JSC::Intrinsic s_readableStreamInternalsPipeToShutdownWithActionCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_readableStreamInternalsPipeToShutdownWithActionCode = "(function (_,m){\"use strict\";if(_.shuttingDown)return;_.shuttingDown=!0;const b=arguments.length>2,d=arguments[2],g=()=>{m().@then(()=>{if(b)@pipeToFinalize(_,d);else @pipeToFinalize(_)},(j)=>{@pipeToFinalize(_,j)})};if(@getByIdDirectPrivate(_.destination,\"state\")===\"writable\"&&!@writableStreamCloseQueuedOrInFlight(_.destination)){_.pendingReadPromiseCapability.@promise.@then(()=>{_.pendingWritePromise.@then(g,g)},(h)=>@pipeToFinalize(_,h));return}g()})\n"; +const char* const s_readableStreamInternalsPipeToShutdownWithActionCode = "(function (_,g){\"use strict\";if(_.shuttingDown)return;_.shuttingDown=!0;const b=arguments.length>2,d=arguments[2],m=()=>{g().@then(()=>{if(b)@pipeToFinalize(_,d);else @pipeToFinalize(_)},(j)=>{@pipeToFinalize(_,j)})};if(@getByIdDirectPrivate(_.destination,\"state\")===\"writable\"&&!@writableStreamCloseQueuedOrInFlight(_.destination)){_.pendingReadPromiseCapability.@promise.@then(()=>{_.pendingWritePromise.@then(m,m)},(h)=>@pipeToFinalize(_,h));return}m()})\n"; // pipeToShutdown const JSC::ConstructAbility s_readableStreamInternalsPipeToShutdownCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -1508,7 +1508,7 @@ const JSC::ConstructorKind s_readableStreamInternalsReadableStreamTeeCodeConstru const JSC::ImplementationVisibility s_readableStreamInternalsReadableStreamTeeCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_readableStreamInternalsReadableStreamTeeCodeLength = 1104; static const JSC::Intrinsic s_readableStreamInternalsReadableStreamTeeCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_readableStreamInternalsReadableStreamTeeCode = "(function (f,k){\"use strict\";@assert(@isReadableStream(f)),@assert(typeof k===\"boolean\");var i=@getByIdDirectPrivate(f,\"start\");if(i)@putByIdDirectPrivate(f,\"start\",@undefined),i();const q=new @ReadableStreamDefaultReader(f),_={closedOrErrored:!1,canceled1:!1,canceled2:!1,reason1:@undefined,reason2:@undefined};_.cancelPromiseCapability=@newPromiseCapability(@Promise);const v=@readableStreamTeePullFunction(_,q,k),g={};@putByIdDirectPrivate(g,\"pull\",v),@putByIdDirectPrivate(g,\"cancel\",@readableStreamTeeBranch1CancelFunction(_,f));const w={};@putByIdDirectPrivate(w,\"pull\",v),@putByIdDirectPrivate(w,\"cancel\",@readableStreamTeeBranch2CancelFunction(_,f));const x=new @ReadableStream(g),j=new @ReadableStream(w);return @getByIdDirectPrivate(q,\"closedPromiseCapability\").@promise.@then(@undefined,function(y){if(_.closedOrErrored)return;if(@readableStreamDefaultControllerError(x.@readableStreamController,y),@readableStreamDefaultControllerError(j.@readableStreamController,y),_.closedOrErrored=!0,!_.canceled1||!_.canceled2)_.cancelPromiseCapability.@resolve.@call()}),_.branch1=x,_.branch2=j,[x,j]})\n"; +const char* const s_readableStreamInternalsReadableStreamTeeCode = "(function (i,q){\"use strict\";@assert(@isReadableStream(i)),@assert(typeof q===\"boolean\");var k=@getByIdDirectPrivate(i,\"start\");if(k)@putByIdDirectPrivate(i,\"start\",@undefined),k();const _=new @ReadableStreamDefaultReader(i),v={closedOrErrored:!1,canceled1:!1,canceled2:!1,reason1:@undefined,reason2:@undefined};v.cancelPromiseCapability=@newPromiseCapability(@Promise);const w=@readableStreamTeePullFunction(v,_,q),f={};@putByIdDirectPrivate(f,\"pull\",w),@putByIdDirectPrivate(f,\"cancel\",@readableStreamTeeBranch1CancelFunction(v,i));const j={};@putByIdDirectPrivate(j,\"pull\",w),@putByIdDirectPrivate(j,\"cancel\",@readableStreamTeeBranch2CancelFunction(v,i));const g=new @ReadableStream(f),x=new @ReadableStream(j);return @getByIdDirectPrivate(_,\"closedPromiseCapability\").@promise.@then(@undefined,function(y){if(v.closedOrErrored)return;if(@readableStreamDefaultControllerError(g.@readableStreamController,y),@readableStreamDefaultControllerError(x.@readableStreamController,y),v.closedOrErrored=!0,!v.canceled1||!v.canceled2)v.cancelPromiseCapability.@resolve.@call()}),v.branch1=g,v.branch2=x,[g,x]})\n"; // readableStreamTeePullFunction const JSC::ConstructAbility s_readableStreamInternalsReadableStreamTeePullFunctionCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -1516,7 +1516,7 @@ const JSC::ConstructorKind s_readableStreamInternalsReadableStreamTeePullFunctio const JSC::ImplementationVisibility s_readableStreamInternalsReadableStreamTeePullFunctionCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_readableStreamInternalsReadableStreamTeePullFunctionCodeLength = 764; static const JSC::Intrinsic s_readableStreamInternalsReadableStreamTeePullFunctionCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_readableStreamInternalsReadableStreamTeePullFunctionCode = "(function (i,f,m){\"use strict\";return function(){@Promise.prototype.@then.@call(@readableStreamDefaultReaderRead(f),function(_){if(@assert(@isObject(_)),@assert(typeof _.done===\"boolean\"),_.done&&!i.closedOrErrored){if(!i.canceled1)@readableStreamDefaultControllerClose(i.branch1.@readableStreamController);if(!i.canceled2)@readableStreamDefaultControllerClose(i.branch2.@readableStreamController);if(i.closedOrErrored=!0,!i.canceled1||!i.canceled2)i.cancelPromiseCapability.@resolve.@call()}if(i.closedOrErrored)return;if(!i.canceled1)@readableStreamDefaultControllerEnqueue(i.branch1.@readableStreamController,_.value);if(!i.canceled2)@readableStreamDefaultControllerEnqueue(i.branch2.@readableStreamController,m\?@structuredCloneForStream(_.value):_.value)})}})\n"; +const char* const s_readableStreamInternalsReadableStreamTeePullFunctionCode = "(function (m,_,f){\"use strict\";return function(){@Promise.prototype.@then.@call(@readableStreamDefaultReaderRead(_),function(i){if(@assert(@isObject(i)),@assert(typeof i.done===\"boolean\"),i.done&&!m.closedOrErrored){if(!m.canceled1)@readableStreamDefaultControllerClose(m.branch1.@readableStreamController);if(!m.canceled2)@readableStreamDefaultControllerClose(m.branch2.@readableStreamController);if(m.closedOrErrored=!0,!m.canceled1||!m.canceled2)m.cancelPromiseCapability.@resolve.@call()}if(m.closedOrErrored)return;if(!m.canceled1)@readableStreamDefaultControllerEnqueue(m.branch1.@readableStreamController,i.value);if(!m.canceled2)@readableStreamDefaultControllerEnqueue(m.branch2.@readableStreamController,f\?@structuredCloneForStream(i.value):i.value)})}})\n"; // readableStreamTeeBranch1CancelFunction const JSC::ConstructAbility s_readableStreamInternalsReadableStreamTeeBranch1CancelFunctionCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -1564,7 +1564,7 @@ const JSC::ConstructorKind s_readableStreamInternalsReadDirectStreamCodeConstruc const JSC::ImplementationVisibility s_readableStreamInternalsReadDirectStreamCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_readableStreamInternalsReadDirectStreamCodeLength = 900; static const JSC::Intrinsic s_readableStreamInternalsReadDirectStreamCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_readableStreamInternalsReadDirectStreamCode = "(function (_,f,j){\"use strict\";@putByIdDirectPrivate(_,\"underlyingSource\",@undefined),@putByIdDirectPrivate(_,\"start\",@undefined);function q(x,z){if(z&&j\?.cancel){try{var A=j.cancel(z);@markPromiseAsHandled(A)}catch(B){}j=@undefined}if(x){if(@putByIdDirectPrivate(x,\"readableStreamController\",@undefined),@putByIdDirectPrivate(x,\"reader\",@undefined),z)@putByIdDirectPrivate(x,\"state\",@streamErrored),@putByIdDirectPrivate(x,\"storedError\",z);else @putByIdDirectPrivate(x,\"state\",@streamClosed);x=@undefined}}if(!j.pull){q();return}if(!@isCallable(j.pull)){q(),@throwTypeError(\"pull is not a function\");return}@putByIdDirectPrivate(_,\"readableStreamController\",f);const v=@getByIdDirectPrivate(_,\"highWaterMark\");f.start({highWaterMark:!v||v<64\?64:v}),@startDirectStream.@call(f,_,j.pull,q),@putByIdDirectPrivate(_,\"reader\",{});var w=j.pull(f);if(f=@undefined,w&&@isPromise(w))return w.@then(()=>{})})\n"; +const char* const s_readableStreamInternalsReadDirectStreamCode = "(function (j,v,w){\"use strict\";@putByIdDirectPrivate(j,\"underlyingSource\",@undefined),@putByIdDirectPrivate(j,\"start\",@undefined);function x(f,A){if(A&&w\?.cancel){try{var B=w.cancel(A);@markPromiseAsHandled(B)}catch(q){}w=@undefined}if(f){if(@putByIdDirectPrivate(f,\"readableStreamController\",@undefined),@putByIdDirectPrivate(f,\"reader\",@undefined),A)@putByIdDirectPrivate(f,\"state\",@streamErrored),@putByIdDirectPrivate(f,\"storedError\",A);else @putByIdDirectPrivate(f,\"state\",@streamClosed);f=@undefined}}if(!w.pull){x();return}if(!@isCallable(w.pull)){x(),@throwTypeError(\"pull is not a function\");return}@putByIdDirectPrivate(j,\"readableStreamController\",v);const _=@getByIdDirectPrivate(j,\"highWaterMark\");v.start({highWaterMark:!_||_<64\?64:_}),@startDirectStream.@call(v,j,w.pull,x),@putByIdDirectPrivate(j,\"reader\",{});var z=w.pull(v);if(v=@undefined,z&&@isPromise(z))return z.@then(()=>{})})\n"; // assignToStream const JSC::ConstructAbility s_readableStreamInternalsAssignToStreamCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -1580,7 +1580,7 @@ const JSC::ConstructorKind s_readableStreamInternalsReadStreamIntoSinkCodeConstr const JSC::ImplementationVisibility s_readableStreamInternalsReadStreamIntoSinkCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_readableStreamInternalsReadStreamIntoSinkCodeLength = 1395; static const JSC::Intrinsic s_readableStreamInternalsReadStreamIntoSinkCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_readableStreamInternalsReadStreamIntoSinkCode = "(async function (_,D,q){\"use strict\";var c=!1,x=!1;try{var E=_.getReader(),F=E.readMany();if(F&&@isPromise(F))F=await F;if(F.done)return c=!0,D.end();var G=F.value.length;const P=@getByIdDirectPrivate(_,\"highWaterMark\");if(q)@startDirectStream.@call(D,_,@undefined,()=>!x&&@markPromiseAsHandled(_.cancel()));D.start({highWaterMark:P||0});for(var H=0,f=F.value,J=F.value.length;H!B&&@markPromiseAsHandled(c.cancel()));q.start({highWaterMark:_||0});for(var I=0,H=F.value,P=F.value.length;I{var j=@createFulfilledPromise({value:b,done:!1});return b=@undefined,@readableStreamClose(v),v=@undefined,j}}else if(this._pendingRead){var y=this._pendingRead;this._pendingRead=@undefined,@putByIdDirectPrivate(this,\"pull\",@noopDoneFunction),@fulfillPromise(y,{value:@undefined,done:!0})}@readableStreamClose(v)})\n"; +const char* const s_readableStreamInternalsOnCloseDirectStreamCode = "(function (c){\"use strict\";var v=this.@controlledReadableStream;if(!v||@getByIdDirectPrivate(v,\"state\")!==@streamReadable)return;if(this._deferClose!==0){this._deferClose=1,this._deferCloseReason=c;return}if(@putByIdDirectPrivate(v,\"state\",@streamClosing),typeof this.@underlyingSource.close===\"function\")try{this.@underlyingSource.close.@call(this.@underlyingSource,c)}catch(B){}var C;try{C=this.@sink.end(),@putByIdDirectPrivate(this,\"sink\",@undefined)}catch(B){if(this._pendingRead){var S=this._pendingRead;this._pendingRead=@undefined,@rejectPromise(S,B)}@readableStreamError(v,B);return}this.error=this.flush=this.write=this.close=this.end=@onReadableStreamDirectControllerClosed;var b=@getByIdDirectPrivate(v,\"reader\");if(b&&@isReadableStreamDefaultReader(b)){var j=this._pendingRead;if(j&&@isPromise(j)&&C\?.byteLength){this._pendingRead=@undefined,@fulfillPromise(j,{value:C,done:!1}),@readableStreamClose(v);return}}if(C\?.byteLength){var y=@getByIdDirectPrivate(b,\"readRequests\");if(y\?.isNotEmpty()){@readableStreamFulfillReadRequest(v,C,!1),@readableStreamClose(v);return}@putByIdDirectPrivate(v,\"state\",@streamReadable),this.@pull=()=>{var B=@createFulfilledPromise({value:C,done:!1});return C=@undefined,@readableStreamClose(v),v=@undefined,B}}else if(this._pendingRead){var S=this._pendingRead;this._pendingRead=@undefined,@putByIdDirectPrivate(this,\"pull\",@noopDoneFunction),@fulfillPromise(S,{value:@undefined,done:!0})}@readableStreamClose(v)})\n"; // onFlushDirectStream const JSC::ConstructAbility s_readableStreamInternalsOnFlushDirectStreamCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -1636,7 +1636,7 @@ const JSC::ConstructorKind s_readableStreamInternalsOnFlushDirectStreamCodeConst const JSC::ImplementationVisibility s_readableStreamInternalsOnFlushDirectStreamCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_readableStreamInternalsOnFlushDirectStreamCodeLength = 591; static const JSC::Intrinsic s_readableStreamInternalsOnFlushDirectStreamCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_readableStreamInternalsOnFlushDirectStreamCode = "(function (){\"use strict\";var c=this.@controlledReadableStream,B=@getByIdDirectPrivate(c,\"reader\");if(!B||!@isReadableStreamDefaultReader(B))return;var b=this._pendingRead;if(this._pendingRead=@undefined,b&&@isPromise(b)){var i=this.@sink.flush();if(i\?.byteLength)this._pendingRead=@getByIdDirectPrivate(c,\"readRequests\")\?.shift(),@fulfillPromise(b,{value:i,done:!1});else this._pendingRead=b}else if(@getByIdDirectPrivate(c,\"readRequests\")\?.isNotEmpty()){var i=this.@sink.flush();if(i\?.byteLength)@readableStreamFulfillReadRequest(c,i,!1)}else if(this._deferFlush===-1)this._deferFlush=1})\n"; +const char* const s_readableStreamInternalsOnFlushDirectStreamCode = "(function (){\"use strict\";var c=this.@controlledReadableStream,b=@getByIdDirectPrivate(c,\"reader\");if(!b||!@isReadableStreamDefaultReader(b))return;var i=this._pendingRead;if(this._pendingRead=@undefined,i&&@isPromise(i)){var j=this.@sink.flush();if(j\?.byteLength)this._pendingRead=@getByIdDirectPrivate(c,\"readRequests\")\?.shift(),@fulfillPromise(i,{value:j,done:!1});else this._pendingRead=i}else if(@getByIdDirectPrivate(c,\"readRequests\")\?.isNotEmpty()){var j=this.@sink.flush();if(j\?.byteLength)@readableStreamFulfillReadRequest(c,j,!1)}else if(this._deferFlush===-1)this._deferFlush=1})\n"; // createTextStream const JSC::ConstructAbility s_readableStreamInternalsCreateTextStreamCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -1644,7 +1644,7 @@ const JSC::ConstructorKind s_readableStreamInternalsCreateTextStreamCodeConstruc const JSC::ImplementationVisibility s_readableStreamInternalsCreateTextStreamCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_readableStreamInternalsCreateTextStreamCodeLength = 984; static const JSC::Intrinsic s_readableStreamInternalsCreateTextStreamCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_readableStreamInternalsCreateTextStreamCode = "(function (_){\"use strict\";var z,j=[],q=!1,w=!1,x=\"\",A=@toLength(0),C=@newPromiseCapability(@Promise),E=!1;return z={start(){},write(v){if(typeof v===\"string\"){var F=@toLength(v.length);if(F>0)x+=v,q=!0,A+=F;return F}if(!v||!(@ArrayBuffer.@isView(v)||v instanceof @ArrayBuffer))@throwTypeError(\"Expected text, ArrayBuffer or ArrayBufferView\");const G=@toLength(v.byteLength);if(G>0)if(w=!0,x.length>0)@arrayPush(j,x,v),x=\"\";else @arrayPush(j,v);return A+=G,G},flush(){return 0},end(){if(E)return\"\";return z.fulfill()},fulfill(){E=!0;const v=z.finishInternal();return @fulfillPromise(C.@promise,v),v},finishInternal(){if(!q&&!w)return\"\";if(q&&!w)return x;if(w&&!q)return new globalThis.TextDecoder().decode(@Bun.concatArrayBuffers(j));var v=new @Bun.ArrayBufferSink;v.start({highWaterMark:A,asUint8Array:!0});for(let F of j)v.write(F);if(j.length=0,x.length>0)v.write(x),x=\"\";return new globalThis.TextDecoder().decode(v.end())},close(){try{if(!E)E=!0,z.fulfill()}catch(v){}}},[z,C]})\n"; +const char* const s_readableStreamInternalsCreateTextStreamCode = "(function (q){\"use strict\";var j,v=[],w=!1,x=!1,z=\"\",A=@toLength(0),C=@newPromiseCapability(@Promise),E=!1;return j={start(){},write(F){if(typeof F===\"string\"){var G=@toLength(F.length);if(G>0)z+=F,w=!0,A+=G;return G}if(!F||!(@ArrayBuffer.@isView(F)||F instanceof @ArrayBuffer))@throwTypeError(\"Expected text, ArrayBuffer or ArrayBufferView\");const _=@toLength(F.byteLength);if(_>0)if(x=!0,z.length>0)@arrayPush(v,z,F),z=\"\";else @arrayPush(v,F);return A+=_,_},flush(){return 0},end(){if(E)return\"\";return j.fulfill()},fulfill(){E=!0;const F=j.finishInternal();return @fulfillPromise(C.@promise,F),F},finishInternal(){if(!w&&!x)return\"\";if(w&&!x)return z;if(x&&!w)return new globalThis.TextDecoder().decode(@Bun.concatArrayBuffers(v));var F=new @Bun.ArrayBufferSink;F.start({highWaterMark:A,asUint8Array:!0});for(let G of v)F.write(G);if(v.length=0,z.length>0)F.write(z),z=\"\";return new globalThis.TextDecoder().decode(F.end())},close(){try{if(!E)E=!0,j.fulfill()}catch(F){}}},[j,C]})\n"; // initializeTextStream const JSC::ConstructAbility s_readableStreamInternalsInitializeTextStreamCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -1652,7 +1652,7 @@ const JSC::ConstructorKind s_readableStreamInternalsInitializeTextStreamCodeCons const JSC::ImplementationVisibility s_readableStreamInternalsInitializeTextStreamCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_readableStreamInternalsInitializeTextStreamCodeLength = 578; static const JSC::Intrinsic s_readableStreamInternalsInitializeTextStreamCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_readableStreamInternalsInitializeTextStreamCode = "(function (_,m){\"use strict\";var[p,b]=@createTextStream(m),f={@underlyingSource:_,@pull:@onPullDirectStream,@controlledReadableStream:this,@sink:p,close:@onCloseDirectStream,write:p.write,error:@handleDirectStreamError,end:@onCloseDirectStream,@close:@onCloseDirectStream,flush:@onFlushDirectStream,_pendingRead:@undefined,_deferClose:0,_deferFlush:0,_deferCloseReason:@undefined,_handleError:@undefined};return @putByIdDirectPrivate(this,\"readableStreamController\",f),@putByIdDirectPrivate(this,\"underlyingSource\",@undefined),@putByIdDirectPrivate(this,\"start\",@undefined),b})\n"; +const char* const s_readableStreamInternalsInitializeTextStreamCode = "(function (_,m){\"use strict\";var[b,p]=@createTextStream(m),f={@underlyingSource:_,@pull:@onPullDirectStream,@controlledReadableStream:this,@sink:b,close:@onCloseDirectStream,write:b.write,error:@handleDirectStreamError,end:@onCloseDirectStream,@close:@onCloseDirectStream,flush:@onFlushDirectStream,_pendingRead:@undefined,_deferClose:0,_deferFlush:0,_deferCloseReason:@undefined,_handleError:@undefined};return @putByIdDirectPrivate(this,\"readableStreamController\",f),@putByIdDirectPrivate(this,\"underlyingSource\",@undefined),@putByIdDirectPrivate(this,\"start\",@undefined),p})\n"; // initializeArrayStream const JSC::ConstructAbility s_readableStreamInternalsInitializeArrayStreamCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -1660,7 +1660,7 @@ const JSC::ConstructorKind s_readableStreamInternalsInitializeArrayStreamCodeCon const JSC::ImplementationVisibility s_readableStreamInternalsInitializeArrayStreamCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_readableStreamInternalsInitializeArrayStreamCodeLength = 797; static const JSC::Intrinsic s_readableStreamInternalsInitializeArrayStreamCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_readableStreamInternalsInitializeArrayStreamCode = "(function (_,t){\"use strict\";var p=[],b=@newPromiseCapability(@Promise),d=!1;function j(){return d=!0,b.@resolve.@call(@undefined,p),p}var m={start(){},write(v){return @arrayPush(p,v),v.byteLength||v.length},flush(){return 0},end(){if(d)return[];return j()},close(){if(!d)j()}},q={@underlyingSource:_,@pull:@onPullDirectStream,@controlledReadableStream:this,@sink:m,close:@onCloseDirectStream,write:m.write,error:@handleDirectStreamError,end:@onCloseDirectStream,@close:@onCloseDirectStream,flush:@onFlushDirectStream,_pendingRead:@undefined,_deferClose:0,_deferFlush:0,_deferCloseReason:@undefined,_handleError:@undefined};return @putByIdDirectPrivate(this,\"readableStreamController\",q),@putByIdDirectPrivate(this,\"underlyingSource\",@undefined),@putByIdDirectPrivate(this,\"start\",@undefined),b})\n"; +const char* const s_readableStreamInternalsInitializeArrayStreamCode = "(function (_,d){\"use strict\";var j=[],m=@newPromiseCapability(@Promise),t=!1;function b(){return t=!0,m.@resolve.@call(@undefined,j),j}var q={start(){},write(p){return @arrayPush(j,p),p.byteLength||p.length},flush(){return 0},end(){if(t)return[];return b()},close(){if(!t)b()}},v={@underlyingSource:_,@pull:@onPullDirectStream,@controlledReadableStream:this,@sink:q,close:@onCloseDirectStream,write:q.write,error:@handleDirectStreamError,end:@onCloseDirectStream,@close:@onCloseDirectStream,flush:@onFlushDirectStream,_pendingRead:@undefined,_deferClose:0,_deferFlush:0,_deferCloseReason:@undefined,_handleError:@undefined};return @putByIdDirectPrivate(this,\"readableStreamController\",v),@putByIdDirectPrivate(this,\"underlyingSource\",@undefined),@putByIdDirectPrivate(this,\"start\",@undefined),m})\n"; // initializeArrayBufferStream const JSC::ConstructAbility s_readableStreamInternalsInitializeArrayBufferStreamCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -1668,7 +1668,7 @@ const JSC::ConstructorKind s_readableStreamInternalsInitializeArrayBufferStreamC const JSC::ImplementationVisibility s_readableStreamInternalsInitializeArrayBufferStreamCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_readableStreamInternalsInitializeArrayBufferStreamCodeLength = 690; static const JSC::Intrinsic s_readableStreamInternalsInitializeArrayBufferStreamCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_readableStreamInternalsInitializeArrayBufferStreamCode = "(function (_,m){\"use strict\";var w=m&&typeof m===\"number\"\?{highWaterMark:m,stream:!0,asUint8Array:!0}:{stream:!0,asUint8Array:!0},D=new @Bun.ArrayBufferSink;D.start(w);var b={@underlyingSource:_,@pull:@onPullDirectStream,@controlledReadableStream:this,@sink:D,close:@onCloseDirectStream,write:D.write.bind(D),error:@handleDirectStreamError,end:@onCloseDirectStream,@close:@onCloseDirectStream,flush:@onFlushDirectStream,_pendingRead:@undefined,_deferClose:0,_deferFlush:0,_deferCloseReason:@undefined,_handleError:@undefined};@putByIdDirectPrivate(this,\"readableStreamController\",b),@putByIdDirectPrivate(this,\"underlyingSource\",@undefined),@putByIdDirectPrivate(this,\"start\",@undefined)})\n"; +const char* const s_readableStreamInternalsInitializeArrayBufferStreamCode = "(function (_,m){\"use strict\";var w=m&&typeof m===\"number\"\?{highWaterMark:m,stream:!0,asUint8Array:!0}:{stream:!0,asUint8Array:!0},b=new @Bun.ArrayBufferSink;b.start(w);var D={@underlyingSource:_,@pull:@onPullDirectStream,@controlledReadableStream:this,@sink:b,close:@onCloseDirectStream,write:b.write.bind(b),error:@handleDirectStreamError,end:@onCloseDirectStream,@close:@onCloseDirectStream,flush:@onFlushDirectStream,_pendingRead:@undefined,_deferClose:0,_deferFlush:0,_deferCloseReason:@undefined,_handleError:@undefined};@putByIdDirectPrivate(this,\"readableStreamController\",D),@putByIdDirectPrivate(this,\"underlyingSource\",@undefined),@putByIdDirectPrivate(this,\"start\",@undefined)})\n"; // readableStreamError const JSC::ConstructAbility s_readableStreamInternalsReadableStreamErrorCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -1676,7 +1676,7 @@ const JSC::ConstructorKind s_readableStreamInternalsReadableStreamErrorCodeConst const JSC::ImplementationVisibility s_readableStreamInternalsReadableStreamErrorCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_readableStreamInternalsReadableStreamErrorCodeLength = 840; static const JSC::Intrinsic s_readableStreamInternalsReadableStreamErrorCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_readableStreamInternalsReadableStreamErrorCode = "(function (i,c){\"use strict\";@assert(@isReadableStream(i)),@assert(@getByIdDirectPrivate(i,\"state\")===@streamReadable),@putByIdDirectPrivate(i,\"state\",@streamErrored),@putByIdDirectPrivate(i,\"storedError\",c);const n=@getByIdDirectPrivate(i,\"reader\");if(!n)return;if(@isReadableStreamDefaultReader(n)){const _=@getByIdDirectPrivate(n,\"readRequests\");@putByIdDirectPrivate(n,\"readRequests\",@createFIFO());for(var f=_.shift();f;f=_.shift())@rejectPromise(f,c)}else{@assert(@isReadableStreamBYOBReader(n));const _=@getByIdDirectPrivate(n,\"readIntoRequests\");@putByIdDirectPrivate(n,\"readIntoRequests\",@createFIFO());for(var f=_.shift();f;f=_.shift())@rejectPromise(f,c)}@getByIdDirectPrivate(n,\"closedPromiseCapability\").@reject.@call(@undefined,c);const h=@getByIdDirectPrivate(n,\"closedPromiseCapability\").@promise;@markPromiseAsHandled(h)})\n"; +const char* const s_readableStreamInternalsReadableStreamErrorCode = "(function (i,_){\"use strict\";@assert(@isReadableStream(i)),@assert(@getByIdDirectPrivate(i,\"state\")===@streamReadable),@putByIdDirectPrivate(i,\"state\",@streamErrored),@putByIdDirectPrivate(i,\"storedError\",_);const c=@getByIdDirectPrivate(i,\"reader\");if(!c)return;if(@isReadableStreamDefaultReader(c)){const h=@getByIdDirectPrivate(c,\"readRequests\");@putByIdDirectPrivate(c,\"readRequests\",@createFIFO());for(var n=h.shift();n;n=h.shift())@rejectPromise(n,_)}else{@assert(@isReadableStreamBYOBReader(c));const h=@getByIdDirectPrivate(c,\"readIntoRequests\");@putByIdDirectPrivate(c,\"readIntoRequests\",@createFIFO());for(var n=h.shift();n;n=h.shift())@rejectPromise(n,_)}@getByIdDirectPrivate(c,\"closedPromiseCapability\").@reject.@call(@undefined,_);const f=@getByIdDirectPrivate(c,\"closedPromiseCapability\").@promise;@markPromiseAsHandled(f)})\n"; // readableStreamDefaultControllerShouldCallPull const JSC::ConstructAbility s_readableStreamInternalsReadableStreamDefaultControllerShouldCallPullCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -1684,7 +1684,7 @@ const JSC::ConstructorKind s_readableStreamInternalsReadableStreamDefaultControl const JSC::ImplementationVisibility s_readableStreamInternalsReadableStreamDefaultControllerShouldCallPullCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_readableStreamInternalsReadableStreamDefaultControllerShouldCallPullCodeLength = 477; static const JSC::Intrinsic s_readableStreamInternalsReadableStreamDefaultControllerShouldCallPullCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_readableStreamInternalsReadableStreamDefaultControllerShouldCallPullCode = "(function (h){\"use strict\";const i=@getByIdDirectPrivate(h,\"controlledReadableStream\");if(!@readableStreamDefaultControllerCanCloseOrEnqueue(h))return!1;if(@getByIdDirectPrivate(h,\"started\")!==1)return!1;if((!@isReadableStreamLocked(i)||!@getByIdDirectPrivate(@getByIdDirectPrivate(i,\"reader\"),\"readRequests\")\?.isNotEmpty())&&@readableStreamDefaultControllerGetDesiredSize(h)<=0)return!1;const v=@readableStreamDefaultControllerGetDesiredSize(h);return @assert(v!==null),v>0})\n"; +const char* const s_readableStreamInternalsReadableStreamDefaultControllerShouldCallPullCode = "(function (h){\"use strict\";const v=@getByIdDirectPrivate(h,\"controlledReadableStream\");if(!@readableStreamDefaultControllerCanCloseOrEnqueue(h))return!1;if(@getByIdDirectPrivate(h,\"started\")!==1)return!1;if((!@isReadableStreamLocked(v)||!@getByIdDirectPrivate(@getByIdDirectPrivate(v,\"reader\"),\"readRequests\")\?.isNotEmpty())&&@readableStreamDefaultControllerGetDesiredSize(h)<=0)return!1;const i=@readableStreamDefaultControllerGetDesiredSize(h);return @assert(i!==null),i>0})\n"; // readableStreamDefaultControllerCallPullIfNeeded const JSC::ConstructAbility s_readableStreamInternalsReadableStreamDefaultControllerCallPullIfNeededCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -1708,7 +1708,7 @@ const JSC::ConstructorKind s_readableStreamInternalsReadableStreamDefaultControl const JSC::ImplementationVisibility s_readableStreamInternalsReadableStreamDefaultControllerGetDesiredSizeCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_readableStreamInternalsReadableStreamDefaultControllerGetDesiredSizeCodeLength = 283; static const JSC::Intrinsic s_readableStreamInternalsReadableStreamDefaultControllerGetDesiredSizeCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_readableStreamInternalsReadableStreamDefaultControllerGetDesiredSizeCode = "(function (i){\"use strict\";const d=@getByIdDirectPrivate(i,\"controlledReadableStream\"),g=@getByIdDirectPrivate(d,\"state\");if(g===@streamErrored)return null;if(g===@streamClosed)return 0;return @getByIdDirectPrivate(i,\"strategy\").highWaterMark-@getByIdDirectPrivate(i,\"queue\").size})\n"; +const char* const s_readableStreamInternalsReadableStreamDefaultControllerGetDesiredSizeCode = "(function (i){\"use strict\";const g=@getByIdDirectPrivate(i,\"controlledReadableStream\"),d=@getByIdDirectPrivate(g,\"state\");if(d===@streamErrored)return null;if(d===@streamClosed)return 0;return @getByIdDirectPrivate(i,\"strategy\").highWaterMark-@getByIdDirectPrivate(i,\"queue\").size})\n"; // readableStreamReaderGenericCancel const JSC::ConstructAbility s_readableStreamInternalsReadableStreamReaderGenericCancelCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -1716,7 +1716,7 @@ const JSC::ConstructorKind s_readableStreamInternalsReadableStreamReaderGenericC const JSC::ImplementationVisibility s_readableStreamInternalsReadableStreamReaderGenericCancelCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_readableStreamInternalsReadableStreamReaderGenericCancelCodeLength = 133; static const JSC::Intrinsic s_readableStreamInternalsReadableStreamReaderGenericCancelCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_readableStreamInternalsReadableStreamReaderGenericCancelCode = "(function (c,h){\"use strict\";const i=@getByIdDirectPrivate(c,\"ownerReadableStream\");return @assert(!!i),@readableStreamCancel(i,h)})\n"; +const char* const s_readableStreamInternalsReadableStreamReaderGenericCancelCode = "(function (c,i){\"use strict\";const h=@getByIdDirectPrivate(c,\"ownerReadableStream\");return @assert(!!h),@readableStreamCancel(h,i)})\n"; // readableStreamCancel const JSC::ConstructAbility s_readableStreamInternalsReadableStreamCancelCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -1724,7 +1724,7 @@ const JSC::ConstructorKind s_readableStreamInternalsReadableStreamCancelCodeCons const JSC::ImplementationVisibility s_readableStreamInternalsReadableStreamCancelCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_readableStreamInternalsReadableStreamCancelCodeLength = 509; static const JSC::Intrinsic s_readableStreamInternalsReadableStreamCancelCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_readableStreamInternalsReadableStreamCancelCode = "(function (_,d){\"use strict\";@putByIdDirectPrivate(_,\"disturbed\",!0);const h=@getByIdDirectPrivate(_,\"state\");if(h===@streamClosed)return @Promise.@resolve();if(h===@streamErrored)return @Promise.@reject(@getByIdDirectPrivate(_,\"storedError\"));@readableStreamClose(_);var p=@getByIdDirectPrivate(_,\"readableStreamController\"),u=p.@cancel;if(u)return u(p,d).@then(function(){});var i=p.close;if(i)return @Promise.@resolve(p.close(d));@throwTypeError(\"ReadableStreamController has no cancel or close method\")})\n"; +const char* const s_readableStreamInternalsReadableStreamCancelCode = "(function (d,h){\"use strict\";@putByIdDirectPrivate(d,\"disturbed\",!0);const p=@getByIdDirectPrivate(d,\"state\");if(p===@streamClosed)return @Promise.@resolve();if(p===@streamErrored)return @Promise.@reject(@getByIdDirectPrivate(d,\"storedError\"));@readableStreamClose(d);var u=@getByIdDirectPrivate(d,\"readableStreamController\"),_=u.@cancel;if(_)return _(u,h).@then(function(){});var i=u.close;if(i)return @Promise.@resolve(u.close(h));@throwTypeError(\"ReadableStreamController has no cancel or close method\")})\n"; // readableStreamDefaultControllerCancel const JSC::ConstructAbility s_readableStreamInternalsReadableStreamDefaultControllerCancelCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -1732,7 +1732,7 @@ const JSC::ConstructorKind s_readableStreamInternalsReadableStreamDefaultControl const JSC::ImplementationVisibility s_readableStreamInternalsReadableStreamDefaultControllerCancelCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_readableStreamInternalsReadableStreamDefaultControllerCancelCodeLength = 146; static const JSC::Intrinsic s_readableStreamInternalsReadableStreamDefaultControllerCancelCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_readableStreamInternalsReadableStreamDefaultControllerCancelCode = "(function (d,_){\"use strict\";return @putByIdDirectPrivate(d,\"queue\",@newQueue()),@getByIdDirectPrivate(d,\"cancelAlgorithm\").@call(@undefined,_)})\n"; +const char* const s_readableStreamInternalsReadableStreamDefaultControllerCancelCode = "(function (_,d){\"use strict\";return @putByIdDirectPrivate(_,\"queue\",@newQueue()),@getByIdDirectPrivate(_,\"cancelAlgorithm\").@call(@undefined,d)})\n"; // readableStreamDefaultControllerPull const JSC::ConstructAbility s_readableStreamInternalsReadableStreamDefaultControllerPullCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -1740,7 +1740,7 @@ const JSC::ConstructorKind s_readableStreamInternalsReadableStreamDefaultControl const JSC::ImplementationVisibility s_readableStreamInternalsReadableStreamDefaultControllerPullCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_readableStreamInternalsReadableStreamDefaultControllerPullCodeLength = 519; static const JSC::Intrinsic s_readableStreamInternalsReadableStreamDefaultControllerPullCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_readableStreamInternalsReadableStreamDefaultControllerPullCode = "(function (a){\"use strict\";var _=@getByIdDirectPrivate(a,\"queue\");if(_.content.isNotEmpty()){const f=@dequeueValue(_);if(@getByIdDirectPrivate(a,\"closeRequested\")&&_.content.isEmpty())@readableStreamClose(@getByIdDirectPrivate(a,\"controlledReadableStream\"));else @readableStreamDefaultControllerCallPullIfNeeded(a);return @createFulfilledPromise({value:f,done:!1})}const d=@readableStreamAddReadRequest(@getByIdDirectPrivate(a,\"controlledReadableStream\"));return @readableStreamDefaultControllerCallPullIfNeeded(a),d})\n"; +const char* const s_readableStreamInternalsReadableStreamDefaultControllerPullCode = "(function (f){\"use strict\";var a=@getByIdDirectPrivate(f,\"queue\");if(a.content.isNotEmpty()){const _=@dequeueValue(a);if(@getByIdDirectPrivate(f,\"closeRequested\")&&a.content.isEmpty())@readableStreamClose(@getByIdDirectPrivate(f,\"controlledReadableStream\"));else @readableStreamDefaultControllerCallPullIfNeeded(f);return @createFulfilledPromise({value:_,done:!1})}const d=@readableStreamAddReadRequest(@getByIdDirectPrivate(f,\"controlledReadableStream\"));return @readableStreamDefaultControllerCallPullIfNeeded(f),d})\n"; // readableStreamDefaultControllerClose const JSC::ConstructAbility s_readableStreamInternalsReadableStreamDefaultControllerCloseCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -1756,7 +1756,7 @@ const JSC::ConstructorKind s_readableStreamInternalsReadableStreamCloseCodeConst const JSC::ImplementationVisibility s_readableStreamInternalsReadableStreamCloseCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_readableStreamInternalsReadableStreamCloseCodeLength = 617; static const JSC::Intrinsic s_readableStreamInternalsReadableStreamCloseCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_readableStreamInternalsReadableStreamCloseCode = "(function (_){\"use strict\";if(@assert(@getByIdDirectPrivate(_,\"state\")===@streamReadable),@putByIdDirectPrivate(_,\"state\",@streamClosed),!@getByIdDirectPrivate(_,\"reader\"))return;if(@isReadableStreamDefaultReader(@getByIdDirectPrivate(_,\"reader\"))){const i=@getByIdDirectPrivate(@getByIdDirectPrivate(_,\"reader\"),\"readRequests\");if(i.isNotEmpty()){@putByIdDirectPrivate(@getByIdDirectPrivate(_,\"reader\"),\"readRequests\",@createFIFO());for(var d=i.shift();d;d=i.shift())@fulfillPromise(d,{value:@undefined,done:!0})}}@getByIdDirectPrivate(@getByIdDirectPrivate(_,\"reader\"),\"closedPromiseCapability\").@resolve.@call()})\n"; +const char* const s_readableStreamInternalsReadableStreamCloseCode = "(function (_){\"use strict\";if(@assert(@getByIdDirectPrivate(_,\"state\")===@streamReadable),@putByIdDirectPrivate(_,\"state\",@streamClosed),!@getByIdDirectPrivate(_,\"reader\"))return;if(@isReadableStreamDefaultReader(@getByIdDirectPrivate(_,\"reader\"))){const d=@getByIdDirectPrivate(@getByIdDirectPrivate(_,\"reader\"),\"readRequests\");if(d.isNotEmpty()){@putByIdDirectPrivate(@getByIdDirectPrivate(_,\"reader\"),\"readRequests\",@createFIFO());for(var i=d.shift();i;i=d.shift())@fulfillPromise(i,{value:@undefined,done:!0})}}@getByIdDirectPrivate(@getByIdDirectPrivate(_,\"reader\"),\"closedPromiseCapability\").@resolve.@call()})\n"; // readableStreamFulfillReadRequest const JSC::ConstructAbility s_readableStreamInternalsReadableStreamFulfillReadRequestCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -1764,7 +1764,7 @@ const JSC::ConstructorKind s_readableStreamInternalsReadableStreamFulfillReadReq const JSC::ImplementationVisibility s_readableStreamInternalsReadableStreamFulfillReadRequestCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_readableStreamInternalsReadableStreamFulfillReadRequestCodeLength = 157; static const JSC::Intrinsic s_readableStreamInternalsReadableStreamFulfillReadRequestCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_readableStreamInternalsReadableStreamFulfillReadRequestCode = "(function (i,p,y){\"use strict\";const _=@getByIdDirectPrivate(@getByIdDirectPrivate(i,\"reader\"),\"readRequests\").shift();@fulfillPromise(_,{value:p,done:y})})\n"; +const char* const s_readableStreamInternalsReadableStreamFulfillReadRequestCode = "(function (p,y,i){\"use strict\";const _=@getByIdDirectPrivate(@getByIdDirectPrivate(p,\"reader\"),\"readRequests\").shift();@fulfillPromise(_,{value:y,done:i})})\n"; // readableStreamDefaultControllerEnqueue const JSC::ConstructAbility s_readableStreamInternalsReadableStreamDefaultControllerEnqueueCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -1772,7 +1772,7 @@ const JSC::ConstructorKind s_readableStreamInternalsReadableStreamDefaultControl const JSC::ImplementationVisibility s_readableStreamInternalsReadableStreamDefaultControllerEnqueueCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_readableStreamInternalsReadableStreamDefaultControllerEnqueueCodeLength = 659; static const JSC::Intrinsic s_readableStreamInternalsReadableStreamDefaultControllerEnqueueCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_readableStreamInternalsReadableStreamDefaultControllerEnqueueCode = "(function (_,d){\"use strict\";const D=@getByIdDirectPrivate(_,\"controlledReadableStream\");if(@assert(@readableStreamDefaultControllerCanCloseOrEnqueue(_)),@isReadableStreamLocked(D)&&@getByIdDirectPrivate(@getByIdDirectPrivate(D,\"reader\"),\"readRequests\")\?.isNotEmpty()){@readableStreamFulfillReadRequest(D,d,!1),@readableStreamDefaultControllerCallPullIfNeeded(_);return}try{let E=1;if(@getByIdDirectPrivate(_,\"strategy\").size!==@undefined)E=@getByIdDirectPrivate(_,\"strategy\").size(d);@enqueueValueWithSize(@getByIdDirectPrivate(_,\"queue\"),d,E)}catch(E){throw @readableStreamDefaultControllerError(_,E),E}@readableStreamDefaultControllerCallPullIfNeeded(_)})\n"; +const char* const s_readableStreamInternalsReadableStreamDefaultControllerEnqueueCode = "(function (_,d){\"use strict\";const E=@getByIdDirectPrivate(_,\"controlledReadableStream\");if(@assert(@readableStreamDefaultControllerCanCloseOrEnqueue(_)),@isReadableStreamLocked(E)&&@getByIdDirectPrivate(@getByIdDirectPrivate(E,\"reader\"),\"readRequests\")\?.isNotEmpty()){@readableStreamFulfillReadRequest(E,d,!1),@readableStreamDefaultControllerCallPullIfNeeded(_);return}try{let D=1;if(@getByIdDirectPrivate(_,\"strategy\").size!==@undefined)D=@getByIdDirectPrivate(_,\"strategy\").size(d);@enqueueValueWithSize(@getByIdDirectPrivate(_,\"queue\"),d,D)}catch(D){throw @readableStreamDefaultControllerError(_,D),D}@readableStreamDefaultControllerCallPullIfNeeded(_)})\n"; // readableStreamDefaultReaderRead const JSC::ConstructAbility s_readableStreamInternalsReadableStreamDefaultReaderReadCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -1788,7 +1788,7 @@ const JSC::ConstructorKind s_readableStreamInternalsReadableStreamAddReadRequest const JSC::ImplementationVisibility s_readableStreamInternalsReadableStreamAddReadRequestCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_readableStreamInternalsReadableStreamAddReadRequestCodeLength = 274; static const JSC::Intrinsic s_readableStreamInternalsReadableStreamAddReadRequestCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_readableStreamInternalsReadableStreamAddReadRequestCode = "(function (i){\"use strict\";@assert(@isReadableStreamDefaultReader(@getByIdDirectPrivate(i,\"reader\"))),@assert(@getByIdDirectPrivate(i,\"state\")==@streamReadable);const h=@newPromise();return @getByIdDirectPrivate(@getByIdDirectPrivate(i,\"reader\"),\"readRequests\").push(h),h})\n"; +const char* const s_readableStreamInternalsReadableStreamAddReadRequestCode = "(function (h){\"use strict\";@assert(@isReadableStreamDefaultReader(@getByIdDirectPrivate(h,\"reader\"))),@assert(@getByIdDirectPrivate(h,\"state\")==@streamReadable);const i=@newPromise();return @getByIdDirectPrivate(@getByIdDirectPrivate(h,\"reader\"),\"readRequests\").push(i),i})\n"; // isReadableStreamDisturbed const JSC::ConstructAbility s_readableStreamInternalsIsReadableStreamDisturbedCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -1820,7 +1820,7 @@ const JSC::ConstructorKind s_readableStreamInternalsLazyLoadStreamCodeConstructo const JSC::ImplementationVisibility s_readableStreamInternalsLazyLoadStreamCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_readableStreamInternalsLazyLoadStreamCodeLength = 1589; static const JSC::Intrinsic s_readableStreamInternalsLazyLoadStreamCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_readableStreamInternalsLazyLoadStreamCode = "(function (E,m){\"use strict\";var y=@getByIdDirectPrivate(E,\"bunNativeType\"),q=@getByIdDirectPrivate(E,\"bunNativePtr\"),x=@lazyStreamPrototypeMap.@get(y);if(x===@undefined){let U=function(Y){var{c:Z,v:_}=this;this.c=@undefined,this.v=@undefined,K(Y,Z,_)},W=function(Y){try{Y.close()}catch(Z){globalThis.reportError(Z)}},X=function(Y,Z,_,p){p[0]=!1;var z;try{z=F(Y,_,p)}catch(A){return Z.error(A)}return K(z,Z,_)};var P=U,Q=W,O=X,[F,G,H,b,B,D,I]=@lazyLoad(y),J=[!1],K;K=function Y(Z,_,p){if(Z&&@isPromise(Z))return Z.then(U.bind({c:_,v:p}),(z)=>_.error(z));else if(typeof Z===\"number\")if(p&&p.byteLength===Z&&p.buffer===_.byobRequest\?.view\?.buffer)_.byobRequest.respondWithNewView(p);else _.byobRequest.respond(Z);else if(Z.constructor===@Uint8Array)_.enqueue(Z);if(J[0]||Z===!1)@enqueueJob(W,_),J[0]=!1};const j=B\?new FinalizationRegistry(B):null;x=class Y{constructor(Z,_,p){if(this.#f=Z,this.#b={},this.pull=this.#j.bind(this),this.cancel=this.#m.bind(this),this.autoAllocateChunkSize=_,p!==@undefined)this.start=(z)=>{z.enqueue(p)};if(j)j.register(this,Z,this.#b)}#b;pull;cancel;start;#f;type=\"bytes\";autoAllocateChunkSize=0;static startSync=G;#j(Z){var _=this.#f;if(!_){Z.close();return}X(_,Z,Z.byobRequest.view,J)}#m(Z){var _=this.#f;j&&j.unregister(this.#b),D&&D(_,!1),H(_,Z)}static deinit=B;static drain=I},@lazyStreamPrototypeMap.@set(y,x)}const L=x.startSync(q,m);var M;const{drain:f,deinit:N}=x;if(f)M=f(q);if(L===0){if(B&&q&&@enqueueJob(B,q),(M\?.byteLength\?\?0)>0)return{start(U){U.enqueue(M),U.close()},type:\"bytes\"};return{start(U){U.close()},type:\"bytes\"}}return new x(q,L,M)})\n"; +const char* const s_readableStreamInternalsLazyLoadStreamCode = "(function (f,b){\"use strict\";var D=@getByIdDirectPrivate(f,\"bunNativeType\"),E=@getByIdDirectPrivate(f,\"bunNativePtr\"),y=@lazyStreamPrototypeMap.@get(D);if(y===@undefined){let p=function(U){var{c:z,v:A}=this;this.c=@undefined,this.v=@undefined,J(U,z,A)},X=function(U){try{U.close()}catch(z){globalThis.reportError(z)}},P=function(U,z,A,Y){Y[0]=!1;var Q;try{Q=j(U,A,Y)}catch(Z){return z.error(Z)}return J(Q,z,A)};var O=p,W=X,N=P,[j,F,_,G,B,m,H]=@lazyLoad(D),I=[!1],J;J=function U(z,A,Y){if(z&&@isPromise(z))return z.then(p.bind({c:A,v:Y}),(Q)=>A.error(Q));else if(typeof z===\"number\")if(Y&&Y.byteLength===z&&Y.buffer===A.byobRequest\?.view\?.buffer)A.byobRequest.respondWithNewView(Y);else A.byobRequest.respond(z);else if(z.constructor===@Uint8Array)A.enqueue(z);if(I[0]||z===!1)@enqueueJob(X,A),I[0]=!1};const x=B\?new FinalizationRegistry(B):null;y=class U{constructor(z,A,Y){if(this.#f=z,this.#b={},this.pull=this.#j.bind(this),this.cancel=this.#m.bind(this),this.autoAllocateChunkSize=A,Y!==@undefined)this.start=(Q)=>{Q.enqueue(Y)};if(x)x.register(this,z,this.#b)}#b;pull;cancel;start;#f;type=\"bytes\";autoAllocateChunkSize=0;static startSync=F;#j(z){var A=this.#f;if(!A){z.close();return}P(A,z,z.byobRequest.view,I)}#m(z){var A=this.#f;x&&x.unregister(this.#b),m&&m(A,!1),_(A,z)}static deinit=B;static drain=H},@lazyStreamPrototypeMap.@set(D,y)}const K=y.startSync(E,b);var q;const{drain:L,deinit:M}=y;if(L)q=L(E);if(K===0){if(B&&E&&@enqueueJob(B,E),(q\?.byteLength\?\?0)>0)return{start(p){p.enqueue(q),p.close()},type:\"bytes\"};return{start(p){p.close()},type:\"bytes\"}}return new y(E,K,q)})\n"; // readableStreamIntoArray const JSC::ConstructAbility s_readableStreamInternalsReadableStreamIntoArrayCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -1828,7 +1828,7 @@ const JSC::ConstructorKind s_readableStreamInternalsReadableStreamIntoArrayCodeC const JSC::ImplementationVisibility s_readableStreamInternalsReadableStreamIntoArrayCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_readableStreamInternalsReadableStreamIntoArrayCodeLength = 247; static const JSC::Intrinsic s_readableStreamInternalsReadableStreamIntoArrayCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_readableStreamInternalsReadableStreamIntoArrayCode = "(function (_){\"use strict\";var b=_.getReader(),g=b.readMany();async function j(p){if(p.done)return[];var f=p.value||[];while(!0){var q=await b.read();if(q.done)break;f=f.concat(q.value)}return f}if(g&&@isPromise(g))return g.@then(j);return j(g)})\n"; +const char* const s_readableStreamInternalsReadableStreamIntoArrayCode = "(function (f){\"use strict\";var _=f.getReader(),b=_.readMany();async function g(j){if(j.done)return[];var p=j.value||[];while(!0){var q=await _.read();if(q.done)break;p=p.concat(q.value)}return p}if(b&&@isPromise(b))return b.@then(g);return g(b)})\n"; // readableStreamIntoText const JSC::ConstructAbility s_readableStreamInternalsReadableStreamIntoTextCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -1836,7 +1836,7 @@ const JSC::ConstructorKind s_readableStreamInternalsReadableStreamIntoTextCodeCo const JSC::ImplementationVisibility s_readableStreamInternalsReadableStreamIntoTextCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_readableStreamInternalsReadableStreamIntoTextCodeLength = 214; static const JSC::Intrinsic s_readableStreamInternalsReadableStreamIntoTextCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_readableStreamInternalsReadableStreamIntoTextCode = "(function (i){\"use strict\";const[_,d]=@createTextStream(@getByIdDirectPrivate(i,\"highWaterMark\")),h=@readStreamIntoSink(i,_,!1);if(h&&@isPromise(h))return @Promise.@resolve(h).@then(d.@promise);return d.@promise})\n"; +const char* const s_readableStreamInternalsReadableStreamIntoTextCode = "(function (_){\"use strict\";const[i,d]=@createTextStream(@getByIdDirectPrivate(_,\"highWaterMark\")),h=@readStreamIntoSink(_,i,!1);if(h&&@isPromise(h))return @Promise.@resolve(h).@then(d.@promise);return d.@promise})\n"; // readableStreamToArrayBufferDirect const JSC::ConstructAbility s_readableStreamInternalsReadableStreamToArrayBufferDirectCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -1844,7 +1844,7 @@ const JSC::ConstructorKind s_readableStreamInternalsReadableStreamToArrayBufferD const JSC::ImplementationVisibility s_readableStreamInternalsReadableStreamToArrayBufferDirectCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_readableStreamInternalsReadableStreamToArrayBufferDirectCodeLength = 727; static const JSC::Intrinsic s_readableStreamInternalsReadableStreamToArrayBufferDirectCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_readableStreamInternalsReadableStreamToArrayBufferDirectCode = "(function (O,_){\"use strict\";var q=new @Bun.ArrayBufferSink;@putByIdDirectPrivate(O,\"underlyingSource\",@undefined);var z=@getByIdDirectPrivate(O,\"highWaterMark\");q.start(z\?{highWaterMark:z}:{});var v=@newPromiseCapability(@Promise),A=!1,x=_.pull,B=_.close,C={start(){},close(F){if(!A){if(A=!0,B)B();@fulfillPromise(v.@promise,q.end())}},end(){if(!A){if(A=!0,B)B();@fulfillPromise(v.@promise,q.end())}},flush(){return 0},write:q.write.bind(q)},D=!1;try{const F=x(C);if(F&&@isObject(F)&&@isPromise(F))return async function(G,j,w){while(!A)await w(G);return await j}(C,promise,x);return v.@promise}catch(F){return D=!0,@readableStreamError(O,F),@Promise.@reject(F)}finally{if(!D&&O)@readableStreamClose(O);C=B=q=x=O=@undefined}})\n"; +const char* const s_readableStreamInternalsReadableStreamToArrayBufferDirectCode = "(function (q,v){\"use strict\";var w=new @Bun.ArrayBufferSink;@putByIdDirectPrivate(q,\"underlyingSource\",@undefined);var D=@getByIdDirectPrivate(q,\"highWaterMark\");w.start(D\?{highWaterMark:D}:{});var x=@newPromiseCapability(@Promise),F=!1,z=v.pull,A=v.close,B={start(){},close(C){if(!F){if(F=!0,A)A();@fulfillPromise(x.@promise,w.end())}},end(){if(!F){if(F=!0,A)A();@fulfillPromise(x.@promise,w.end())}},flush(){return 0},write:w.write.bind(w)},G=!1;try{const C=z(B);if(C&&@isObject(C)&&@isPromise(C))return async function(O,j,_){while(!F)await _(O);return await j}(B,promise,z);return x.@promise}catch(C){return G=!0,@readableStreamError(q,C),@Promise.@reject(C)}finally{if(!G&&q)@readableStreamClose(q);B=A=w=z=q=@undefined}})\n"; // readableStreamToTextDirect const JSC::ConstructAbility s_readableStreamInternalsReadableStreamToTextDirectCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -1852,7 +1852,7 @@ const JSC::ConstructorKind s_readableStreamInternalsReadableStreamToTextDirectCo const JSC::ImplementationVisibility s_readableStreamInternalsReadableStreamToTextDirectCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_readableStreamInternalsReadableStreamToTextDirectCodeLength = 278; static const JSC::Intrinsic s_readableStreamInternalsReadableStreamToTextDirectCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_readableStreamInternalsReadableStreamToTextDirectCode = "(async function (_,f){\"use strict\";const h=@initializeTextStream.@call(_,f,@undefined);var j=_.getReader();while(@getByIdDirectPrivate(_,\"state\")===@streamReadable){var k=await j.read();if(k.done)break}try{j.releaseLock()}catch(p){}return j=@undefined,_=@undefined,h.@promise})\n"; +const char* const s_readableStreamInternalsReadableStreamToTextDirectCode = "(async function (f,h){\"use strict\";const j=@initializeTextStream.@call(f,h,@undefined);var _=f.getReader();while(@getByIdDirectPrivate(f,\"state\")===@streamReadable){var k=await _.read();if(k.done)break}try{_.releaseLock()}catch(p){}return _=@undefined,f=@undefined,j.@promise})\n"; // readableStreamToArrayDirect const JSC::ConstructAbility s_readableStreamInternalsReadableStreamToArrayDirectCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -1860,7 +1860,7 @@ const JSC::ConstructorKind s_readableStreamInternalsReadableStreamToArrayDirectC const JSC::ImplementationVisibility s_readableStreamInternalsReadableStreamToArrayDirectCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_readableStreamInternalsReadableStreamToArrayDirectCodeLength = 354; static const JSC::Intrinsic s_readableStreamInternalsReadableStreamToArrayDirectCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_readableStreamInternalsReadableStreamToArrayDirectCode = "(async function (f,_){\"use strict\";const j=@initializeArrayStream.@call(f,_,@undefined);_=@undefined;var k=f.getReader();try{while(@getByIdDirectPrivate(f,\"state\")===@streamReadable){var p=await k.read();if(p.done)break}try{k.releaseLock()}catch(q){}return k=@undefined,@Promise.@resolve(j.@promise)}catch(q){throw q}finally{f=@undefined,k=@undefined}})\n"; +const char* const s_readableStreamInternalsReadableStreamToArrayDirectCode = "(async function (_,f){\"use strict\";const k=@initializeArrayStream.@call(_,f,@undefined);f=@undefined;var q=_.getReader();try{while(@getByIdDirectPrivate(_,\"state\")===@streamReadable){var j=await q.read();if(j.done)break}try{q.releaseLock()}catch(p){}return q=@undefined,@Promise.@resolve(k.@promise)}catch(p){throw p}finally{_=@undefined,q=@undefined}})\n"; // readableStreamDefineLazyIterators const JSC::ConstructAbility s_readableStreamInternalsReadableStreamDefineLazyIteratorsCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -1868,7 +1868,7 @@ const JSC::ConstructorKind s_readableStreamInternalsReadableStreamDefineLazyIter const JSC::ImplementationVisibility s_readableStreamInternalsReadableStreamDefineLazyIteratorsCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_readableStreamInternalsReadableStreamDefineLazyIteratorsCodeLength = 516; static const JSC::Intrinsic s_readableStreamInternalsReadableStreamDefineLazyIteratorsCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_readableStreamInternalsReadableStreamDefineLazyIteratorsCode = "(function (k){\"use strict\";var B=globalThis.Symbol.asyncIterator,g=async function*z(D,F){var G=D.getReader(),j;try{while(!0){var x,h;const q=G.readMany();if(@isPromise(q))({done:x,value:h}=await q);else({done:x,value:h}=q);if(x)return;yield*h}}catch(q){j=q}finally{if(G.releaseLock(),!F)D.cancel(j);if(j)throw j}},i=function z(){return g(this,!1)},w=function z({preventCancel:D=!1}={preventCancel:!1}){return g(this,D)};return @Object.@defineProperty(k,B,{value:i}),@Object.@defineProperty(k,\"values\",{value:w}),k})\n"; +const char* const s_readableStreamInternalsReadableStreamDefineLazyIteratorsCode = "(function (F){\"use strict\";var i=globalThis.Symbol.asyncIterator,z=async function*q(D,w){var j=D.getReader(),x;try{while(!0){var k,g;const G=j.readMany();if(@isPromise(G))({done:k,value:g}=await G);else({done:k,value:g}=G);if(k)return;yield*g}}catch(G){x=G}finally{if(j.releaseLock(),!w)D.cancel(x);if(x)throw x}},h=function q(){return z(this,!1)},B=function q({preventCancel:D=!1}={preventCancel:!1}){return z(this,D)};return @Object.@defineProperty(F,i,{value:h}),@Object.@defineProperty(F,\"values\",{value:B}),F})\n"; #define DEFINE_BUILTIN_GENERATOR(codeName, functionName, overriddenName, argumentCount) \ JSC::FunctionExecutable* codeName##Generator(JSC::VM& vm) \ @@ -1894,7 +1894,7 @@ const JSC::ConstructorKind s_transformStreamDefaultControllerDesiredSizeCodeCons const JSC::ImplementationVisibility s_transformStreamDefaultControllerDesiredSizeCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_transformStreamDefaultControllerDesiredSizeCodeLength = 339; static const JSC::Intrinsic s_transformStreamDefaultControllerDesiredSizeCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_transformStreamDefaultControllerDesiredSizeCode = "(function (){\"use strict\";if(!@isTransformStreamDefaultController(this))throw @makeThisTypeError(\"TransformStreamDefaultController\",\"enqueue\");const _=@getByIdDirectPrivate(this,\"stream\"),i=@getByIdDirectPrivate(_,\"readable\"),u=@getByIdDirectPrivate(i,\"readableStreamController\");return @readableStreamDefaultControllerGetDesiredSize(u)})\n"; +const char* const s_transformStreamDefaultControllerDesiredSizeCode = "(function (){\"use strict\";if(!@isTransformStreamDefaultController(this))throw @makeThisTypeError(\"TransformStreamDefaultController\",\"enqueue\");const _=@getByIdDirectPrivate(this,\"stream\"),u=@getByIdDirectPrivate(_,\"readable\"),i=@getByIdDirectPrivate(u,\"readableStreamController\");return @readableStreamDefaultControllerGetDesiredSize(i)})\n"; // enqueue const JSC::ConstructAbility s_transformStreamDefaultControllerEnqueueCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -2020,7 +2020,7 @@ const JSC::ConstructorKind s_readableStreamDefaultReaderReadManyCodeConstructorK const JSC::ImplementationVisibility s_readableStreamDefaultReaderReadManyCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_readableStreamDefaultReaderReadManyCodeLength = 2598; static const JSC::Intrinsic s_readableStreamDefaultReaderReadManyCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_readableStreamDefaultReaderReadManyCode = "(function (){\"use strict\";if(!@isReadableStreamDefaultReader(this))@throwTypeError(\"ReadableStreamDefaultReader.readMany() should not be called directly\");const _=@getByIdDirectPrivate(this,\"ownerReadableStream\");if(!_)@throwTypeError(\"readMany() called on a reader owned by no readable stream\");const x=@getByIdDirectPrivate(_,\"state\");if(@putByIdDirectPrivate(_,\"disturbed\",!0),x===@streamClosed)return{value:[],size:0,done:!0};else if(x===@streamErrored)throw @getByIdDirectPrivate(_,\"storedError\");var F=@getByIdDirectPrivate(_,\"readableStreamController\"),G=@getByIdDirectPrivate(F,\"queue\");if(!G)return F.@pull(F).@then(function({done:w,value:C}){return w\?{done:!0,value:[],size:0}:{value:[C],size:1,done:!1}});const H=G.content;var I=G.size,E=H.toArray(!1),J=E.length;if(J>0){var K=@newArrayWithSize(J);if(@isReadableByteStreamController(F)){{const w=E[0];if(!(@ArrayBuffer.@isView(w)||w instanceof @ArrayBuffer))@putByValDirect(K,0,new @Uint8Array(w.buffer,w.byteOffset,w.byteLength));else @putByValDirect(K,0,w)}for(var d=1;d{if(w.done)return{value:[],size:0,done:!0};var C=@getByIdDirectPrivate(_,\"readableStreamController\"),N=@getByIdDirectPrivate(C,\"queue\"),Q=[w.value].concat(N.content.toArray(!1)),S=Q.length;if(@isReadableByteStreamController(C))for(var T=0;T0){var B=@newArrayWithSize(J);if(@isReadableByteStreamController(H)){{const w=W[0];if(!(@ArrayBuffer.@isView(w)||w instanceof @ArrayBuffer))@putByValDirect(B,0,new @Uint8Array(w.buffer,w.byteOffset,w.byteLength));else @putByValDirect(B,0,w)}for(var C=1;C{if(w.done)return{value:[],size:0,done:!0};var k=@getByIdDirectPrivate(_,\"readableStreamController\"),N=@getByIdDirectPrivate(k,\"queue\"),K=[w.value].concat(N.content.toArray(!1)),A=K.length;if(@isReadableByteStreamController(k))for(var G=0;G0}shift(){var{_head:z,_tail:v,_list:g,_capacityMask:w}=this;if(z===v)return @undefined;var A=g[z];if(@putByValDirect(g,z,@undefined),z=this._head=z+1&w,z<2&&v>1e4&&v<=g.length>>>2)this._shrinkArray();return A}peek(){if(this._head===this._tail)return @undefined;return this._list[this._head]}push(z){var v=this._tail;if(@putByValDirect(this._list,v,z),this._tail=v+1&this._capacityMask,this._tail===this._head)this._growArray()}toArray(z){var v=this._list,g=@toLength(v.length);if(z||this._head>this._tail){var w=@toLength(this._head),A=@toLength(this._tail),B=@toLength(g-w+A),E=@newArrayWithSize(B),x=0;for(var F=w;F>>=1,this._capacityMask>>>=1}}return new k})\n"; +const char* const s_streamInternalsCreateFIFOCode = "(function (){\"use strict\";var v=@Array.prototype.slice;class E{constructor(){this._head=0,this._tail=0,this._capacityMask=3,this._list=@newArrayWithSize(4)}_head;_tail;_capacityMask;_list;size(){if(this._head===this._tail)return 0;if(this._head0}shift(){var{_head:F,_tail:x,_list:g,_capacityMask:A}=this;if(F===x)return @undefined;var B=g[F];if(@putByValDirect(g,F,@undefined),F=this._head=F+1&A,F<2&&x>1e4&&x<=g.length>>>2)this._shrinkArray();return B}peek(){if(this._head===this._tail)return @undefined;return this._list[this._head]}push(F){var x=this._tail;if(@putByValDirect(this._list,x,F),this._tail=x+1&this._capacityMask,this._tail===this._head)this._growArray()}toArray(F){var x=this._list,g=@toLength(x.length);if(F||this._head>this._tail){var A=@toLength(this._head),B=@toLength(this._tail),k=@toLength(g-A+B),z=@newArrayWithSize(k),G=0;for(var w=A;w>>=1,this._capacityMask>>>=1}}return new E})\n"; // newQueue const JSC::ConstructAbility s_streamInternalsNewQueueCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -2150,7 +2150,7 @@ const JSC::ConstructorKind s_streamInternalsEnqueueValueWithSizeCodeConstructorK const JSC::ImplementationVisibility s_streamInternalsEnqueueValueWithSizeCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_streamInternalsEnqueueValueWithSizeCodeLength = 161; static const JSC::Intrinsic s_streamInternalsEnqueueValueWithSizeCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_streamInternalsEnqueueValueWithSizeCode = "(function (n,o,d){\"use strict\";if(d=@toNumber(d),!@isFinite(d)||d<0)@throwRangeError(\"size has an incorrect value\");n.content.push({value:o,size:d}),n.size+=d})\n"; +const char* const s_streamInternalsEnqueueValueWithSizeCode = "(function (n,d,o){\"use strict\";if(o=@toNumber(o),!@isFinite(o)||o<0)@throwRangeError(\"size has an incorrect value\");n.content.push({value:d,size:o}),n.size+=o})\n"; // peekQueueValue const JSC::ConstructAbility s_streamInternalsPeekQueueValueCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -2174,7 +2174,7 @@ const JSC::ConstructorKind s_streamInternalsExtractSizeAlgorithmCodeConstructorK const JSC::ImplementationVisibility s_streamInternalsExtractSizeAlgorithmCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_streamInternalsExtractSizeAlgorithmCodeLength = 176; static const JSC::Intrinsic s_streamInternalsExtractSizeAlgorithmCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_streamInternalsExtractSizeAlgorithmCode = "(function (d){\"use strict\";const p=d.size;if(p===@undefined)return()=>1;if(typeof p!==\"function\")@throwTypeError(\"strategy.size must be a function\");return(w)=>{return p(w)}})\n"; +const char* const s_streamInternalsExtractSizeAlgorithmCode = "(function (d){\"use strict\";const w=d.size;if(w===@undefined)return()=>1;if(typeof w!==\"function\")@throwTypeError(\"strategy.size must be a function\");return(p)=>{return w(p)}})\n"; // extractHighWaterMark const JSC::ConstructAbility s_streamInternalsExtractHighWaterMarkCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -2206,7 +2206,7 @@ const JSC::ConstructorKind s_streamInternalsToDictionaryCodeConstructorKind = JS const JSC::ImplementationVisibility s_streamInternalsToDictionaryCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_streamInternalsToDictionaryCodeLength = 115; static const JSC::Intrinsic s_streamInternalsToDictionaryCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_streamInternalsToDictionaryCode = "(function (c,p,n){\"use strict\";if(c===@undefined||c===null)return p;if(!@isObject(c))@throwTypeError(n);return c})\n"; +const char* const s_streamInternalsToDictionaryCode = "(function (c,n,p){\"use strict\";if(c===@undefined||c===null)return n;if(!@isObject(c))@throwTypeError(p);return c})\n"; #define DEFINE_BUILTIN_GENERATOR(codeName, functionName, overriddenName, argumentCount) \ JSC::FunctionExecutable* codeName##Generator(JSC::VM& vm) \ @@ -2224,7 +2224,7 @@ const JSC::ConstructorKind s_importMetaObjectLoadCJS2ESMCodeConstructorKind = JS const JSC::ImplementationVisibility s_importMetaObjectLoadCJS2ESMCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_importMetaObjectLoadCJS2ESMCodeLength = 1387; static const JSC::Intrinsic s_importMetaObjectLoadCJS2ESMCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_importMetaObjectLoadCJS2ESMCode = "(function (_){\"use strict\";var x=@Loader,z=@createFIFO(),w=_;while(w){var G=x.registry.@get(w);if((G\?.state\?\?0)<=@ModuleFetch)@fulfillModuleSync(w),G=x.registry.@get(w);var D=@getPromiseInternalField(G.fetch,@promiseFieldReactionsOrResult),H=x.parseModule(w,D),I=G.module;if(H&&@isPromise(H)){var J=@getPromiseInternalField(H,@promiseFieldReactionsOrResult),B=@getPromiseInternalField(H,@promiseFieldFlags),F=B&@promiseStateMask;if(F===@promiseStatePending||J&&@isPromise(J))@throwTypeError(`require() async module \"${w}\" is unsupported. use \"await import()\" instead.`);else if(F===@promiseStateRejected){if(!J\?.message)@throwTypeError(`${J+\"\"\?J:\"An error occurred\"} occurred while parsing module \\\"${w}\\\"`);throw J}G.module=I=J}else if(H&&!I)G.module=I=H;@setStateToMax(G,@ModuleLink);var L=I.dependenciesMap,Q=x.requestedModules(I),T=@newArrayWithSize(Q.length);for(var U=0,V=Q.length;U=@ModuleLink)w=z.shift()}var Z=x.linkAndEvaluateModule(_,@undefined);if(Z&&@isPromise(Z))@throwTypeError(`require() async module \\\"${_}\\\" is unsupported. use \"await import()\" instead.`);return x.registry.@get(_)})\n"; +const char* const s_importMetaObjectLoadCJS2ESMCode = "(function (D){\"use strict\";var J=@Loader,z=@createFIFO(),B=D;while(B){var F=J.registry.@get(B);if((F\?.state\?\?0)<=@ModuleFetch)@fulfillModuleSync(B),F=J.registry.@get(B);var G=@getPromiseInternalField(F.fetch,@promiseFieldReactionsOrResult),H=J.parseModule(B,G),I=F.module;if(H&&@isPromise(H)){var L=@getPromiseInternalField(H,@promiseFieldReactionsOrResult),_=@getPromiseInternalField(H,@promiseFieldFlags),w=_&@promiseStateMask;if(w===@promiseStatePending||L&&@isPromise(L))@throwTypeError(`require() async module \"${B}\" is unsupported. use \"await import()\" instead.`);else if(w===@promiseStateRejected){if(!L\?.message)@throwTypeError(`${L+\"\"\?L:\"An error occurred\"} occurred while parsing module \\\"${B}\\\"`);throw L}F.module=I=L}else if(H&&!I)F.module=I=H;@setStateToMax(F,@ModuleLink);var Q=I.dependenciesMap,x=J.requestedModules(I),T=@newArrayWithSize(x.length);for(var U=0,V=x.length;U=@ModuleLink)B=z.shift()}var Z=J.linkAndEvaluateModule(D,@undefined);if(Z&&@isPromise(Z))@throwTypeError(`require() async module \\\"${D}\\\" is unsupported. use \"await import()\" instead.`);return J.registry.@get(D)})\n"; // requireESM const JSC::ConstructAbility s_importMetaObjectRequireESMCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -2232,7 +2232,7 @@ const JSC::ConstructorKind s_importMetaObjectRequireESMCodeConstructorKind = JSC const JSC::ImplementationVisibility s_importMetaObjectRequireESMCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_importMetaObjectRequireESMCodeLength = 325; static const JSC::Intrinsic s_importMetaObjectRequireESMCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_importMetaObjectRequireESMCode = "(function (a){\"use strict\";var c=@Loader.registry.@get(a);if(!c||!c.evaluated)c=@loadCJS2ESM(a);if(!c||!c.evaluated||!c.module)@throwTypeError(`require() failed to evaluate module \"${a}\". This is an internal consistentency error.`);var _=@Loader.getModuleNamespaceObject(c.module);if(_[@commonJSSymbol]===0)return;return _})\n"; +const char* const s_importMetaObjectRequireESMCode = "(function (a){\"use strict\";var _=@Loader.registry.@get(a);if(!_||!_.evaluated)_=@loadCJS2ESM(a);if(!_||!_.evaluated||!_.module)@throwTypeError(`require() failed to evaluate module \"${a}\". This is an internal consistentency error.`);var c=@Loader.getModuleNamespaceObject(_.module);if(c[@commonJSSymbol]===0)return;return c})\n"; // internalRequire const JSC::ConstructAbility s_importMetaObjectInternalRequireCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -2240,7 +2240,7 @@ const JSC::ConstructorKind s_importMetaObjectInternalRequireCodeConstructorKind const JSC::ImplementationVisibility s_importMetaObjectInternalRequireCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_importMetaObjectInternalRequireCodeLength = 747; static const JSC::Intrinsic s_importMetaObjectInternalRequireCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_importMetaObjectInternalRequireCode = "(function (b){\"use strict\";var g=@requireMap.@get(b);const j=b.substring(b.length-5);if(g)return g.exports;if(j===\".json\"){var k=globalThis[Symbol.for(\"_fs\")]||=@Bun.fs(),q=JSON.parse(k.readFileSync(b,\"utf8\"));return @requireMap.@set(b,@createCommonJSModule(b,q,!0)),q}else if(j===\".node\"){const v=@createCommonJSModule(b,{},!0);return process.dlopen(v,b),@requireMap.@set(b,v),v.exports}else if(j===\".toml\"){var k=globalThis[Symbol.for(\"_fs\")]||=@Bun.fs(),q=@Bun.TOML.parse(k.readFileSync(b,\"utf8\"));return @requireMap.@set(b,@createCommonJSModule(b,q,!0)),q}else{var q=@requireESM(b);const n=@requireMap.@get(b);if(n)return n.exports;var _=q\?.default;if(_\?.[@commonJSSymbol]===0)q=_;return @requireMap.@set(b,@createCommonJSModule(b,q,!0)),q}})\n"; +const char* const s_importMetaObjectInternalRequireCode = "(function (k){\"use strict\";var n=@requireMap.@get(k);const j=k.substring(k.length-5);if(n)return n.exports;if(j===\".json\"){var _=globalThis[Symbol.for(\"_fs\")]||=@Bun.fs(),q=JSON.parse(_.readFileSync(k,\"utf8\"));return @requireMap.@set(k,@createCommonJSModule(k,q,!0)),q}else if(j===\".node\"){const v=@createCommonJSModule(k,{},!0);return process.dlopen(v,k),@requireMap.@set(k,v),v.exports}else if(j===\".toml\"){var _=globalThis[Symbol.for(\"_fs\")]||=@Bun.fs(),q=@Bun.TOML.parse(_.readFileSync(k,\"utf8\"));return @requireMap.@set(k,@createCommonJSModule(k,q,!0)),q}else{var q=@requireESM(k);const g=@requireMap.@get(k);if(g)return g.exports;var b=q\?.default;if(b\?.[@commonJSSymbol]===0)q=b;return @requireMap.@set(k,@createCommonJSModule(k,q,!0)),q}})\n"; // createRequireCache const JSC::ConstructAbility s_importMetaObjectCreateRequireCacheCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -2248,15 +2248,15 @@ const JSC::ConstructorKind s_importMetaObjectCreateRequireCacheCodeConstructorKi const JSC::ImplementationVisibility s_importMetaObjectCreateRequireCacheCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_importMetaObjectCreateRequireCacheCodeLength = 854; static const JSC::Intrinsic s_importMetaObjectCreateRequireCacheCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_importMetaObjectCreateRequireCacheCode = "(function (){\"use strict\";var _=new Map,u={};return new Proxy(u,{get(h,f){const t=@requireMap.@get(f);if(t)return t;const L=@Loader.registry.@get(f);if(L\?.evaluated){const b=@Loader.getModuleNamespaceObject(L.module),c=b[@commonJSSymbol]===0||b.default\?.[@commonJSSymbol]\?b.default:b,g=@createCommonJSModule(f,c,!0);return @requireMap.@set(f,g),g}return u[f]},set(h,f,t){return @requireMap.@set(f,t),!0},has(h,f){return @requireMap.@has(f)||@Loader.registry.@has(f)},deleteProperty(h,f){return _.@delete(f),@requireMap.@delete(f),@Loader.registry.@delete(f),!0},ownKeys(h){var f=[...@requireMap.@keys()];const t=[...@Loader.registry.@keys()];for(let L of t)if(!f.includes(L))@arrayPush(f,L);return f},getPrototypeOf(h){return null},getOwnPropertyDescriptor(h,f){if(@requireMap.@has(f)||@Loader.registry.@has(f))return{configurable:!0,enumerable:!0}}})})\n"; +const char* const s_importMetaObjectCreateRequireCacheCode = "(function (){\"use strict\";var _=new Map,f={};return new Proxy(f,{get(h,t){const u=@requireMap.@get(t);if(u)return u;const L=@Loader.registry.@get(t);if(L\?.evaluated){const b=@Loader.getModuleNamespaceObject(L.module),c=b[@commonJSSymbol]===0||b.default\?.[@commonJSSymbol]\?b.default:b,g=@createCommonJSModule(t,c,!0);return @requireMap.@set(t,g),g}return f[t]},set(h,t,u){return @requireMap.@set(t,u),!0},has(h,t){return @requireMap.@has(t)||@Loader.registry.@has(t)},deleteProperty(h,t){return _.@delete(t),@requireMap.@delete(t),@Loader.registry.@delete(t),!0},ownKeys(h){var t=[...@requireMap.@keys()];const u=[...@Loader.registry.@keys()];for(let L of u)if(!t.includes(L))@arrayPush(t,L);return t},getPrototypeOf(h){return null},getOwnPropertyDescriptor(h,t){if(@requireMap.@has(t)||@Loader.registry.@has(t))return{configurable:!0,enumerable:!0}}})})\n"; // require const JSC::ConstructAbility s_importMetaObjectRequireCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; const JSC::ConstructorKind s_importMetaObjectRequireCodeConstructorKind = JSC::ConstructorKind::None; const JSC::ImplementationVisibility s_importMetaObjectRequireCodeImplementationVisibility = JSC::ImplementationVisibility::Public; -const int s_importMetaObjectRequireCodeLength = 173; +const int s_importMetaObjectRequireCodeLength = 89; static const JSC::Intrinsic s_importMetaObjectRequireCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_importMetaObjectRequireCode = "(function (c){var l=this\?.path\?\?arguments.callee\?.path;if(typeof c!==\"string\")@throwTypeError(\"require(name) must be a string\");return @internalRequire(@resolveSync(c,l))})\n"; +const char* const s_importMetaObjectRequireCode = "(function (l){\"use strict\";return @internalRequire(@resolveSync(l,@toString(this),!1))})\n"; // main const JSC::ConstructAbility s_importMetaObjectMainCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -2432,7 +2432,7 @@ const JSC::ConstructorKind s_readableStreamInitializeReadableStreamCodeConstruct const JSC::ImplementationVisibility s_readableStreamInitializeReadableStreamCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_readableStreamInitializeReadableStreamCodeLength = 2065; static const JSC::Intrinsic s_readableStreamInitializeReadableStreamCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_readableStreamInitializeReadableStreamCode = "(function (f,m){\"use strict\";if(f===@undefined)f={@bunNativeType:0,@bunNativePtr:0,@lazy:!1};if(m===@undefined)m={};if(!@isObject(f))@throwTypeError(\"ReadableStream constructor takes an object as first argument\");if(m!==@undefined&&!@isObject(m))@throwTypeError(\"ReadableStream constructor takes an object as second argument, if any\");@putByIdDirectPrivate(this,\"state\",@streamReadable),@putByIdDirectPrivate(this,\"reader\",@undefined),@putByIdDirectPrivate(this,\"storedError\",@undefined),@putByIdDirectPrivate(this,\"disturbed\",!1),@putByIdDirectPrivate(this,\"readableStreamController\",null),@putByIdDirectPrivate(this,\"bunNativeType\",@getByIdDirectPrivate(f,\"bunNativeType\")\?\?0),@putByIdDirectPrivate(this,\"bunNativePtr\",@getByIdDirectPrivate(f,\"bunNativePtr\")\?\?0);const v=f.type===\"direct\",B=!!f.@lazy,I=v||B;if(@getByIdDirectPrivate(f,\"pull\")!==@undefined&&!I){const _=@getByIdDirectPrivate(m,\"size\"),b=@getByIdDirectPrivate(m,\"highWaterMark\");return @putByIdDirectPrivate(this,\"highWaterMark\",b),@putByIdDirectPrivate(this,\"underlyingSource\",@undefined),@setupReadableStreamDefaultController(this,f,_,b!==@undefined\?b:1,@getByIdDirectPrivate(f,\"start\"),@getByIdDirectPrivate(f,\"pull\"),@getByIdDirectPrivate(f,\"cancel\")),this}if(v)@putByIdDirectPrivate(this,\"underlyingSource\",f),@putByIdDirectPrivate(this,\"highWaterMark\",@getByIdDirectPrivate(m,\"highWaterMark\")),@putByIdDirectPrivate(this,\"start\",()=>@createReadableStreamController(this,f,m));else if(I){const _=f.autoAllocateChunkSize;@putByIdDirectPrivate(this,\"highWaterMark\",@undefined),@putByIdDirectPrivate(this,\"underlyingSource\",@undefined),@putByIdDirectPrivate(this,\"highWaterMark\",_||@getByIdDirectPrivate(m,\"highWaterMark\")),@putByIdDirectPrivate(this,\"start\",()=>{const b=@lazyLoadStream(this,_);if(b)@createReadableStreamController(this,b,m)})}else @putByIdDirectPrivate(this,\"underlyingSource\",@undefined),@putByIdDirectPrivate(this,\"highWaterMark\",@getByIdDirectPrivate(m,\"highWaterMark\")),@putByIdDirectPrivate(this,\"start\",@undefined),@createReadableStreamController(this,f,m);return this})\n"; +const char* const s_readableStreamInitializeReadableStreamCode = "(function (_,f){\"use strict\";if(_===@undefined)_={@bunNativeType:0,@bunNativePtr:0,@lazy:!1};if(f===@undefined)f={};if(!@isObject(_))@throwTypeError(\"ReadableStream constructor takes an object as first argument\");if(f!==@undefined&&!@isObject(f))@throwTypeError(\"ReadableStream constructor takes an object as second argument, if any\");@putByIdDirectPrivate(this,\"state\",@streamReadable),@putByIdDirectPrivate(this,\"reader\",@undefined),@putByIdDirectPrivate(this,\"storedError\",@undefined),@putByIdDirectPrivate(this,\"disturbed\",!1),@putByIdDirectPrivate(this,\"readableStreamController\",null),@putByIdDirectPrivate(this,\"bunNativeType\",@getByIdDirectPrivate(_,\"bunNativeType\")\?\?0),@putByIdDirectPrivate(this,\"bunNativePtr\",@getByIdDirectPrivate(_,\"bunNativePtr\")\?\?0);const m=_.type===\"direct\",v=!!_.@lazy,B=m||v;if(@getByIdDirectPrivate(_,\"pull\")!==@undefined&&!B){const I=@getByIdDirectPrivate(f,\"size\"),b=@getByIdDirectPrivate(f,\"highWaterMark\");return @putByIdDirectPrivate(this,\"highWaterMark\",b),@putByIdDirectPrivate(this,\"underlyingSource\",@undefined),@setupReadableStreamDefaultController(this,_,I,b!==@undefined\?b:1,@getByIdDirectPrivate(_,\"start\"),@getByIdDirectPrivate(_,\"pull\"),@getByIdDirectPrivate(_,\"cancel\")),this}if(m)@putByIdDirectPrivate(this,\"underlyingSource\",_),@putByIdDirectPrivate(this,\"highWaterMark\",@getByIdDirectPrivate(f,\"highWaterMark\")),@putByIdDirectPrivate(this,\"start\",()=>@createReadableStreamController(this,_,f));else if(B){const I=_.autoAllocateChunkSize;@putByIdDirectPrivate(this,\"highWaterMark\",@undefined),@putByIdDirectPrivate(this,\"underlyingSource\",@undefined),@putByIdDirectPrivate(this,\"highWaterMark\",I||@getByIdDirectPrivate(f,\"highWaterMark\")),@putByIdDirectPrivate(this,\"start\",()=>{const b=@lazyLoadStream(this,I);if(b)@createReadableStreamController(this,b,f)})}else @putByIdDirectPrivate(this,\"underlyingSource\",@undefined),@putByIdDirectPrivate(this,\"highWaterMark\",@getByIdDirectPrivate(f,\"highWaterMark\")),@putByIdDirectPrivate(this,\"start\",@undefined),@createReadableStreamController(this,_,f);return this})\n"; // readableStreamToArray const JSC::ConstructAbility s_readableStreamReadableStreamToArrayCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -2440,7 +2440,7 @@ const JSC::ConstructorKind s_readableStreamReadableStreamToArrayCodeConstructorK const JSC::ImplementationVisibility s_readableStreamReadableStreamToArrayCodeImplementationVisibility = JSC::ImplementationVisibility::Private; const int s_readableStreamReadableStreamToArrayCodeLength = 173; static const JSC::Intrinsic s_readableStreamReadableStreamToArrayCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_readableStreamReadableStreamToArrayCode = "(function (b){\"use strict\";var _=@getByIdDirectPrivate(b,\"underlyingSource\");if(_!==@undefined)return @readableStreamToArrayDirect(b,_);return @readableStreamIntoArray(b)})\n"; +const char* const s_readableStreamReadableStreamToArrayCode = "(function (_){\"use strict\";var b=@getByIdDirectPrivate(_,\"underlyingSource\");if(b!==@undefined)return @readableStreamToArrayDirect(_,b);return @readableStreamIntoArray(_)})\n"; // readableStreamToText const JSC::ConstructAbility s_readableStreamReadableStreamToTextCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -2456,7 +2456,7 @@ const JSC::ConstructorKind s_readableStreamReadableStreamToArrayBufferCodeConstr const JSC::ImplementationVisibility s_readableStreamReadableStreamToArrayBufferCodeImplementationVisibility = JSC::ImplementationVisibility::Private; const int s_readableStreamReadableStreamToArrayBufferCodeLength = 270; static const JSC::Intrinsic s_readableStreamReadableStreamToArrayBufferCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_readableStreamReadableStreamToArrayBufferCode = "(function (_){\"use strict\";var b=@getByIdDirectPrivate(_,\"underlyingSource\");if(b!==@undefined)return @readableStreamToArrayBufferDirect(_,b);var p=@Bun.readableStreamToArray(_);if(@isPromise(p))return p.then(@Bun.concatArrayBuffers);return @Bun.concatArrayBuffers(p)})\n"; +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"; // readableStreamToJSON const JSC::ConstructAbility s_readableStreamReadableStreamToJSONCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -2480,7 +2480,7 @@ const JSC::ConstructorKind s_readableStreamConsumeReadableStreamCodeConstructorK const JSC::ImplementationVisibility s_readableStreamConsumeReadableStreamCodeImplementationVisibility = JSC::ImplementationVisibility::Private; const int s_readableStreamConsumeReadableStreamCodeLength = 1603; static const JSC::Intrinsic s_readableStreamConsumeReadableStreamCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_readableStreamConsumeReadableStreamCode = "(function (F,q,w){\"use strict\";const x=globalThis.Symbol.for(\"Bun.consumeReadableStreamPrototype\");var A=globalThis[x];if(!A)A=globalThis[x]=[];var B=A[q];if(B===@undefined){var[D,_,k,G,j,H]=globalThis[globalThis.Symbol.for(\"Bun.lazy\")](q);B=class J{handleError;handleClosed;processResult;constructor(K,L){this.#_=L,this.#F=K,this.#$=!1,this.handleError=this._handleError.bind(this),this.handleClosed=this._handleClosed.bind(this),this.processResult=this._processResult.bind(this),K.closed.then(this.handleClosed,this.handleError)}_handleClosed(){if(this.#$)return;this.#$=!0;var K=this.#_;this.#_=0,G(K),H(K)}_handleError(K){if(this.#$)return;this.#$=!0;var L=this.#_;this.#_=0,_(L,K),H(L)}#_;#$=!1;#F;_handleReadMany({value:K,done:L,size:N}){if(L){this.handleClosed();return}if(this.#$)return;k(this.#_,K,L,N)}read(){if(!this.#_)return @throwTypeError(\"ReadableStreamSink is already closed\");return this.processResult(this.#F.read())}_processResult(K){if(K&&@isPromise(K)){if(@getPromiseInternalField(K,@promiseFieldFlags)&@promiseStateFulfilled){const N=@getPromiseInternalField(K,@promiseFieldReactionsOrResult);if(N)K=N}}if(K&&@isPromise(K))return K.then(this.processResult,this.handleError),null;if(K.done)return this.handleClosed(),0;else if(K.value)return K.value;else return-1}readMany(){if(!this.#_)return @throwTypeError(\"ReadableStreamSink is already closed\");return this.processResult(this.#F.readMany())}};const I=q+1;if(A.length{@putByIdDirectPrivate(_,\"started\",1),@assert(!@getByIdDirectPrivate(_,\"pulling\")),@assert(!@getByIdDirectPrivate(_,\"pullAgain\")),@readableByteStreamControllerCallPullIfNeeded(_)},(d)=>{if(@getByIdDirectPrivate(v,\"state\")===@streamReadable)@readableByteStreamControllerError(_,d)}),@putByIdDirectPrivate(this,\"cancel\",@readableByteStreamControllerCancel),@putByIdDirectPrivate(this,\"pull\",@readableByteStreamControllerPull),this})\n"; +const char* const s_readableByteStreamInternalsPrivateInitializeReadableByteStreamControllerCode = "(function (_,f,v){\"use strict\";if(!@isReadableStream(_))@throwTypeError(\"ReadableByteStreamController needs a ReadableStream\");if(@getByIdDirectPrivate(_,\"readableStreamController\")!==null)@throwTypeError(\"ReadableStream already has a controller\");@putByIdDirectPrivate(this,\"controlledReadableStream\",_),@putByIdDirectPrivate(this,\"underlyingByteSource\",f),@putByIdDirectPrivate(this,\"pullAgain\",!1),@putByIdDirectPrivate(this,\"pulling\",!1),@readableByteStreamControllerClearPendingPullIntos(this),@putByIdDirectPrivate(this,\"queue\",@newQueue()),@putByIdDirectPrivate(this,\"started\",0),@putByIdDirectPrivate(this,\"closeRequested\",!1);let b=@toNumber(v);if(@isNaN(b)||b<0)@throwRangeError(\"highWaterMark value is negative or not a number\");@putByIdDirectPrivate(this,\"strategyHWM\",b);let p=f.autoAllocateChunkSize;if(p!==@undefined){if(p=@toNumber(p),p<=0||p===@Infinity||p===-@Infinity)@throwRangeError(\"autoAllocateChunkSize value is negative or equal to positive or negative infinity\")}@putByIdDirectPrivate(this,\"autoAllocateChunkSize\",p),@putByIdDirectPrivate(this,\"pendingPullIntos\",@createFIFO());const R=this;return @promiseInvokeOrNoopNoCatch(@getByIdDirectPrivate(R,\"underlyingByteSource\"),\"start\",[R]).@then(()=>{@putByIdDirectPrivate(R,\"started\",1),@assert(!@getByIdDirectPrivate(R,\"pulling\")),@assert(!@getByIdDirectPrivate(R,\"pullAgain\")),@readableByteStreamControllerCallPullIfNeeded(R)},(d)=>{if(@getByIdDirectPrivate(_,\"state\")===@streamReadable)@readableByteStreamControllerError(R,d)}),@putByIdDirectPrivate(this,\"cancel\",@readableByteStreamControllerCancel),@putByIdDirectPrivate(this,\"pull\",@readableByteStreamControllerPull),this})\n"; // readableStreamByteStreamControllerStart const JSC::ConstructAbility s_readableByteStreamInternalsReadableStreamByteStreamControllerStartCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -2676,7 +2676,7 @@ const JSC::ConstructorKind s_readableByteStreamInternalsReadableByteStreamContro const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableByteStreamControllerCancelCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_readableByteStreamInternalsReadableByteStreamControllerCancelCodeLength = 248; static const JSC::Intrinsic s_readableByteStreamInternalsReadableByteStreamControllerCancelCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_readableByteStreamInternalsReadableByteStreamControllerCancelCode = "(function (a,p){\"use strict\";var u=@getByIdDirectPrivate(a,\"pendingPullIntos\"),_=u.peek();if(_)_.bytesFilled=0;return @putByIdDirectPrivate(a,\"queue\",@newQueue()),@promiseInvokeOrNoop(@getByIdDirectPrivate(a,\"underlyingByteSource\"),\"cancel\",[p])})\n"; +const char* const s_readableByteStreamInternalsReadableByteStreamControllerCancelCode = "(function (a,u){\"use strict\";var p=@getByIdDirectPrivate(a,\"pendingPullIntos\"),_=p.peek();if(_)_.bytesFilled=0;return @putByIdDirectPrivate(a,\"queue\",@newQueue()),@promiseInvokeOrNoop(@getByIdDirectPrivate(a,\"underlyingByteSource\"),\"cancel\",[u])})\n"; // readableByteStreamControllerError const JSC::ConstructAbility s_readableByteStreamInternalsReadableByteStreamControllerErrorCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -2708,7 +2708,7 @@ const JSC::ConstructorKind s_readableByteStreamInternalsReadableByteStreamContro const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableByteStreamControllerGetDesiredSizeCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_readableByteStreamInternalsReadableByteStreamControllerGetDesiredSizeCodeLength = 272; static const JSC::Intrinsic s_readableByteStreamInternalsReadableByteStreamControllerGetDesiredSizeCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_readableByteStreamInternalsReadableByteStreamControllerGetDesiredSizeCode = "(function (u){\"use strict\";const _=@getByIdDirectPrivate(u,\"controlledReadableStream\"),d=@getByIdDirectPrivate(_,\"state\");if(d===@streamErrored)return null;if(d===@streamClosed)return 0;return @getByIdDirectPrivate(u,\"strategyHWM\")-@getByIdDirectPrivate(u,\"queue\").size})\n"; +const char* const s_readableByteStreamInternalsReadableByteStreamControllerGetDesiredSizeCode = "(function (_){\"use strict\";const d=@getByIdDirectPrivate(_,\"controlledReadableStream\"),u=@getByIdDirectPrivate(d,\"state\");if(u===@streamErrored)return null;if(u===@streamClosed)return 0;return @getByIdDirectPrivate(_,\"strategyHWM\")-@getByIdDirectPrivate(_,\"queue\").size})\n"; // readableStreamHasBYOBReader const JSC::ConstructAbility s_readableByteStreamInternalsReadableStreamHasBYOBReaderCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -2740,7 +2740,7 @@ const JSC::ConstructorKind s_readableByteStreamInternalsReadableByteStreamContro const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableByteStreamControllerPullCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_readableByteStreamInternalsReadableByteStreamControllerPullCodeLength = 1005; static const JSC::Intrinsic s_readableByteStreamInternalsReadableByteStreamControllerPullCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_readableByteStreamInternalsReadableByteStreamControllerPullCode = "(function (_){\"use strict\";const F=@getByIdDirectPrivate(_,\"controlledReadableStream\");if(@assert(@readableStreamHasDefaultReader(F)),@getByIdDirectPrivate(_,\"queue\").content\?.isNotEmpty()){const P=@getByIdDirectPrivate(_,\"queue\").content.shift();@getByIdDirectPrivate(_,\"queue\").size-=P.byteLength,@readableByteStreamControllerHandleQueueDrain(_);let h;try{h=new @Uint8Array(P.buffer,P.byteOffset,P.byteLength)}catch(R){return @Promise.@reject(R)}return @createFulfilledPromise({value:h,done:!1})}if(@getByIdDirectPrivate(_,\"autoAllocateChunkSize\")!==@undefined){let P;try{P=@createUninitializedArrayBuffer(@getByIdDirectPrivate(_,\"autoAllocateChunkSize\"))}catch(R){return @Promise.@reject(R)}const h={buffer:P,byteOffset:0,byteLength:@getByIdDirectPrivate(_,\"autoAllocateChunkSize\"),bytesFilled:0,elementSize:1,ctor:@Uint8Array,readerType:\"default\"};@getByIdDirectPrivate(_,\"pendingPullIntos\").push(h)}const d=@readableStreamAddReadRequest(F);return @readableByteStreamControllerCallPullIfNeeded(_),d})\n"; +const char* const s_readableByteStreamInternalsReadableByteStreamControllerPullCode = "(function (h){\"use strict\";const R=@getByIdDirectPrivate(h,\"controlledReadableStream\");if(@assert(@readableStreamHasDefaultReader(R)),@getByIdDirectPrivate(h,\"queue\").content\?.isNotEmpty()){const d=@getByIdDirectPrivate(h,\"queue\").content.shift();@getByIdDirectPrivate(h,\"queue\").size-=d.byteLength,@readableByteStreamControllerHandleQueueDrain(h);let _;try{_=new @Uint8Array(d.buffer,d.byteOffset,d.byteLength)}catch(P){return @Promise.@reject(P)}return @createFulfilledPromise({value:_,done:!1})}if(@getByIdDirectPrivate(h,\"autoAllocateChunkSize\")!==@undefined){let d;try{d=@createUninitializedArrayBuffer(@getByIdDirectPrivate(h,\"autoAllocateChunkSize\"))}catch(P){return @Promise.@reject(P)}const _={buffer:d,byteOffset:0,byteLength:@getByIdDirectPrivate(h,\"autoAllocateChunkSize\"),bytesFilled:0,elementSize:1,ctor:@Uint8Array,readerType:\"default\"};@getByIdDirectPrivate(h,\"pendingPullIntos\").push(_)}const F=@readableStreamAddReadRequest(R);return @readableByteStreamControllerCallPullIfNeeded(h),F})\n"; // readableByteStreamControllerShouldCallPull const JSC::ConstructAbility s_readableByteStreamInternalsReadableByteStreamControllerShouldCallPullCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -2748,7 +2748,7 @@ const JSC::ConstructorKind s_readableByteStreamInternalsReadableByteStreamContro const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableByteStreamControllerShouldCallPullCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_readableByteStreamInternalsReadableByteStreamControllerShouldCallPullCodeLength = 619; static const JSC::Intrinsic s_readableByteStreamInternalsReadableByteStreamControllerShouldCallPullCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_readableByteStreamInternalsReadableByteStreamControllerShouldCallPullCode = "(function (u){\"use strict\";const P=@getByIdDirectPrivate(u,\"controlledReadableStream\");if(@getByIdDirectPrivate(P,\"state\")!==@streamReadable)return!1;if(@getByIdDirectPrivate(u,\"closeRequested\"))return!1;if(!(@getByIdDirectPrivate(u,\"started\")>0))return!1;const b=@getByIdDirectPrivate(P,\"reader\");if(b&&(@getByIdDirectPrivate(b,\"readRequests\")\?.isNotEmpty()||!!@getByIdDirectPrivate(b,\"bunNativePtr\")))return!0;if(@readableStreamHasBYOBReader(P)&&@getByIdDirectPrivate(@getByIdDirectPrivate(P,\"reader\"),\"readIntoRequests\")\?.isNotEmpty())return!0;if(@readableByteStreamControllerGetDesiredSize(u)>0)return!0;return!1})\n"; +const char* const s_readableByteStreamInternalsReadableByteStreamControllerShouldCallPullCode = "(function (u){\"use strict\";const b=@getByIdDirectPrivate(u,\"controlledReadableStream\");if(@getByIdDirectPrivate(b,\"state\")!==@streamReadable)return!1;if(@getByIdDirectPrivate(u,\"closeRequested\"))return!1;if(!(@getByIdDirectPrivate(u,\"started\")>0))return!1;const P=@getByIdDirectPrivate(b,\"reader\");if(P&&(@getByIdDirectPrivate(P,\"readRequests\")\?.isNotEmpty()||!!@getByIdDirectPrivate(P,\"bunNativePtr\")))return!0;if(@readableStreamHasBYOBReader(b)&&@getByIdDirectPrivate(@getByIdDirectPrivate(b,\"reader\"),\"readIntoRequests\")\?.isNotEmpty())return!0;if(@readableByteStreamControllerGetDesiredSize(u)>0)return!0;return!1})\n"; // readableByteStreamControllerCallPullIfNeeded const JSC::ConstructAbility s_readableByteStreamInternalsReadableByteStreamControllerCallPullIfNeededCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -2812,7 +2812,7 @@ const JSC::ConstructorKind s_readableByteStreamInternalsReadableByteStreamContro const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableByteStreamControllerRespondInternalCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_readableByteStreamInternalsReadableByteStreamControllerRespondInternalCodeLength = 464; static const JSC::Intrinsic s_readableByteStreamInternalsReadableByteStreamControllerRespondInternalCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_readableByteStreamInternalsReadableByteStreamControllerRespondInternalCode = "(function (d,u){\"use strict\";let _=@getByIdDirectPrivate(d,\"pendingPullIntos\").peek(),k=@getByIdDirectPrivate(d,\"controlledReadableStream\");if(@getByIdDirectPrivate(k,\"state\")===@streamClosed){if(u!==0)@throwTypeError(\"bytesWritten is different from 0 even though stream is closed\");@readableByteStreamControllerRespondInClosedState(d,_)}else @assert(@getByIdDirectPrivate(k,\"state\")===@streamReadable),@readableByteStreamControllerRespondInReadableState(d,u,_)})\n"; +const char* const s_readableByteStreamInternalsReadableByteStreamControllerRespondInternalCode = "(function (d,_){\"use strict\";let u=@getByIdDirectPrivate(d,\"pendingPullIntos\").peek(),k=@getByIdDirectPrivate(d,\"controlledReadableStream\");if(@getByIdDirectPrivate(k,\"state\")===@streamClosed){if(_!==0)@throwTypeError(\"bytesWritten is different from 0 even though stream is closed\");@readableByteStreamControllerRespondInClosedState(d,u)}else @assert(@getByIdDirectPrivate(k,\"state\")===@streamReadable),@readableByteStreamControllerRespondInReadableState(d,_,u)})\n"; // readableByteStreamControllerRespondInReadableState const JSC::ConstructAbility s_readableByteStreamInternalsReadableByteStreamControllerRespondInReadableStateCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -2844,7 +2844,7 @@ const JSC::ConstructorKind s_readableByteStreamInternalsReadableByteStreamContro const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableByteStreamControllerFillDescriptorFromQueueCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_readableByteStreamInternalsReadableByteStreamControllerFillDescriptorFromQueueCodeLength = 970; static const JSC::Intrinsic s_readableByteStreamInternalsReadableByteStreamControllerFillDescriptorFromQueueCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_readableByteStreamInternalsReadableByteStreamControllerFillDescriptorFromQueueCode = "(function (j,w){\"use strict\";const _=w.bytesFilled-w.bytesFilled%w.elementSize,z=@getByIdDirectPrivate(j,\"queue\").size_)k=E-w.bytesFilled,G=!0;while(k>0){let H=@getByIdDirectPrivate(j,\"queue\").content.peek();const v=k0),@assert(w.bytesFilledv)q=H-k.bytesFilled,J=!0;while(q>0){let j=@getByIdDirectPrivate(_,\"queue\").content.peek();const z=q0),@assert(k.bytesFilled0){if(@readableByteStreamControllerFillDescriptorFromQueue(_,A)){const b=@readableByteStreamControllerConvertDescriptor(A);return @readableByteStreamControllerHandleQueueDrain(_),@createFulfilledPromise({value:b,done:!1})}if(@getByIdDirectPrivate(_,\"closeRequested\")){const b=@makeTypeError(\"Closing stream has been requested\");return @readableByteStreamControllerError(_,b),@Promise.@reject(b)}}A.buffer=@transferBufferToCurrentRealm(A.buffer),@getByIdDirectPrivate(_,\"pendingPullIntos\").push(A);const E=@readableStreamAddReadIntoRequest(L);return @readableByteStreamControllerCallPullIfNeeded(_),E})\n"; +const char* const s_readableByteStreamInternalsReadableByteStreamControllerPullIntoCode = "(function (_,E){\"use strict\";const b=@getByIdDirectPrivate(_,\"controlledReadableStream\");let L=1;if(E.BYTES_PER_ELEMENT!==@undefined)L=E.BYTES_PER_ELEMENT;const d=E.constructor,A={buffer:E.buffer,byteOffset:E.byteOffset,byteLength:E.byteLength,bytesFilled:0,elementSize:L,ctor:d,readerType:\"byob\"};var N=@getByIdDirectPrivate(_,\"pendingPullIntos\");if(N\?.isNotEmpty())return A.buffer=@transferBufferToCurrentRealm(A.buffer),N.push(A),@readableStreamAddReadIntoRequest(b);if(@getByIdDirectPrivate(b,\"state\")===@streamClosed){const k=new d(A.buffer,A.byteOffset,0);return @createFulfilledPromise({value:k,done:!0})}if(@getByIdDirectPrivate(_,\"queue\").size>0){if(@readableByteStreamControllerFillDescriptorFromQueue(_,A)){const k=@readableByteStreamControllerConvertDescriptor(A);return @readableByteStreamControllerHandleQueueDrain(_),@createFulfilledPromise({value:k,done:!1})}if(@getByIdDirectPrivate(_,\"closeRequested\")){const k=@makeTypeError(\"Closing stream has been requested\");return @readableByteStreamControllerError(_,k),@Promise.@reject(k)}}A.buffer=@transferBufferToCurrentRealm(A.buffer),@getByIdDirectPrivate(_,\"pendingPullIntos\").push(A);const R=@readableStreamAddReadIntoRequest(b);return @readableByteStreamControllerCallPullIfNeeded(_),R})\n"; // readableStreamAddReadIntoRequest const JSC::ConstructAbility s_readableByteStreamInternalsReadableStreamAddReadIntoRequestCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -2952,7 +2952,7 @@ const JSC::ConstructorKind s_eventSourceGetEventSourceCodeConstructorKind = JSC: const JSC::ImplementationVisibility s_eventSourceGetEventSourceCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_eventSourceGetEventSourceCodeLength = 5477; static const JSC::Intrinsic s_eventSourceGetEventSourceCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_eventSourceGetEventSourceCode = "(function (){\"use strict\";class j extends EventTarget{#$;#j;#w;#A;#B;#F=!1;#G=null;#J=\"\";#K=\"\";#L=\"\";#M=!0;#O=0;#Q=0;#U=0;#V=null;static#W(w){w.#H()}static#X(w,A){const B=w.data,F=B.#L\?`Last-Event-ID: ${B.#L}\\r\\n`:\"\",G=`GET ${A.pathname}${A.search} HTTP/1.1\\r\\nHost: bun\\r\\nContent-type: text/event-stream\\r\\nContent-length: 0\\r\\n${F}\\r\\n`,J=w.write(G);if(J!==G.length)B.#K=G.substring(J)}static#Y(w,A,B){for(;;){if(B>=A.length)return;let F=-1,G=A.indexOf(\"\\r\\n\",B);const J=G+2;if(G>0)if(w.#O===0){const Q=parseInt(A.substring(B,G),16);if(Q===0){w.#j=2,w.#G\?.end();return}F=J+Q}else F=A.length;else{if(w.#J.length===0){w.#J+=A.substring(B);return}F=A.length}let K=A.substring(J,F);B=F+2;let L=0,M=K.indexOf(\"\\n\\n\");if(M==-1){w.#J+=A.substring(J);return}if(w.#J.length)w.#J+=K,K=w.#J,w.#J=\"\";let O=!0;while(O){const Q=K.substring(L,M);let U,V=\"\",W,X=0,Y=-1;for(;;){let z=Q.indexOf(\"\\n\",X);if(z===-1){if(X>=Q.length)break;z=Q.length}const H=Q.substring(X,z);if(H.startsWith(\"data:\"))if(V.length)V+=`\\n${H.substring(5).trim()}`;else V=H.substring(5).trim();else if(H.startsWith(\"event:\"))U=H.substring(6).trim();else if(H.startsWith(\"id:\"))W=H.substring(3).trim();else if(H.startsWith(\"retry:\")){if(Y=parseInt(H.substring(6).trim(),10),@isNaN(Y))Y=-1}X=z+1}if(w.#L=W||\"\",Y>=0)w.#U=Y;if(V||W||U)w.dispatchEvent(new MessageEvent(U||\"message\",{data:V||\"\",origin:w.#$.origin,source:w,lastEventId:W}));if(K.length===M+2){O=!1;break}const Z=K.indexOf(\"\\n\\n\",M+1);if(Z===-1)break;L=M,M=Z}}}static#Z={open(w){const A=w.data;if(A.#G=w,!A.#F)j.#X(w,A.#$)},handshake(w,A,B){const F=w.data;if(A)j.#X(w,F.#$);else F.#j=2,F.dispatchEvent(new ErrorEvent(\"error\",{error:B})),w.end()},data(w,A){const B=w.data;switch(B.#j){case 0:{let F=A.toString();const G=F.indexOf(\"\\r\\n\\r\\n\");if(G===-1){B.#J+=F;return}if(B.#J.length)B.#J+=F,F=B.#J,B.#J=\"\";const J=F.substring(0,G),K=J.indexOf(\"\\r\\n\");if(K===-1){B.#j=2,B.dispatchEvent(new ErrorEvent(\"error\",{error:new Error(\"Invalid HTTP request\")})),w.end();return}const L=J.substring(0,K);if(L!==\"HTTP/1.1 200 OK\"){B.#j=2,B.dispatchEvent(new ErrorEvent(\"error\",{error:new Error(L)})),w.end();return}let M=K+1,O=!1,Q=-1;for(;;){let V=J.indexOf(\"\\r\\n\",M);if(V===-1){if(M>=J.length){if(!O)B.#j=2,B.dispatchEvent(new ErrorEvent(\"error\",{error:new Error(`EventSource's response has no MIME type and \"text/event-stream\" is required. Aborting the connection.`)})),w.end();return}V=J.length}const W=J.substring(M+1,V),X=W.indexOf(\":\"),Y=W.substring(0,X),Z=Y.localeCompare(\"content-type\",@undefined,{sensitivity:\"accent\"})===0;if(M=V+1,Z)if(W.endsWith(\" text/event-stream\"))O=!0;else{B.#j=2,B.dispatchEvent(new ErrorEvent(\"error\",{error:new Error(`EventSource's response has a MIME type that is not \"text/event-stream\". Aborting the connection.`)})),w.end();return}else if(Y.localeCompare(\"content-length\",@undefined,{sensitivity:\"accent\"})===0){if(Q=parseInt(W.substring(X+1).trim(),10),@isNaN(Q)||Q<=0){B.dispatchEvent(new ErrorEvent(\"error\",{error:new Error(`EventSource's Content-Length is invalid. Aborting the connection.`)})),w.end();return}if(O)break}else if(Y.localeCompare(\"transfer-encoding\",@undefined,{sensitivity:\"accent\"})===0){if(W.substring(X+1).trim()!==\"chunked\"){B.dispatchEvent(new ErrorEvent(\"error\",{error:new Error(`EventSource's Transfer-Encoding is invalid. Aborting the connection.`)})),w.end();return}if(Q=0,O)break}}B.#O=Q,B.#j=1,B.dispatchEvent(new Event(\"open\"));const U=F.substring(G+4);if(j.#Y(B,U,0),B.#O>0){if(B.#Q+=U.length,B.#Q>=B.#O)B.#j=2,w.end()}return}case 1:if(j.#Y(B,A.toString(),2),B.#O>0){if(B.#Q+=A.byteLength,B.#Q>=B.#O)B.#j=2,w.end()}return;default:break}},drain(w){const A=w.data;if(A.#j===0){const B=A.#J;if(B.length){const F=w.write(B);if(F!==B.length)w.data.#K=B.substring(F);else w.data.#K=\"\"}}},close:j.#z,end(w){j.#z(w).dispatchEvent(new ErrorEvent(\"error\",{error:new Error(\"Connection closed by server\")}))},timeout(w){j.#z(w).dispatchEvent(new ErrorEvent(\"error\",{error:new Error(\"Timeout\")}))},binaryType:\"buffer\"};static#z(w){const A=w.data;if(A.#G=null,A.#Q=0,A.#j=2,A.#M){if(A.#V)clearTimeout(A.#V);A.#V=setTimeout(j.#W,A.#U,A)}return A}constructor(w,A=@undefined){super();const B=new URL(w);this.#F=B.protocol===\"https:\",this.#$=B,this.#j=2,process.nextTick(j.#W,this)}ref(){this.#V\?.ref(),this.#G\?.ref()}unref(){this.#V\?.unref(),this.#G\?.unref()}#H(){if(this.#j!==2)return;const w=this.#$,A=this.#F;this.#j=0,@Bun.connect({data:this,socket:j.#Z,hostname:w.hostname,port:parseInt(w.port||(A\?\"443\":\"80\"),10),tls:A\?{requestCert:!0,rejectUnauthorized:!1}:!1}).catch((B)=>{if(super.dispatchEvent(new ErrorEvent(\"error\",{error:B})),this.#M){if(this.#V)this.#V.unref\?.();this.#V=setTimeout(j.#W,1000,this)}})}get url(){return this.#$.href}get readyState(){return this.#j}close(){this.#M=!1,this.#j=2,this.#G\?.unref(),this.#G\?.end()}get onopen(){return this.#B}get onerror(){return this.#w}get onmessage(){return this.#A}set onopen(w){if(this.#B)super.removeEventListener(\"close\",this.#B);super.addEventListener(\"open\",w),this.#B=w}set onerror(w){if(this.#w)super.removeEventListener(\"error\",this.#w);super.addEventListener(\"error\",w),this.#w=w}set onmessage(w){if(this.#A)super.removeEventListener(\"message\",this.#A);super.addEventListener(\"message\",w),this.#A=w}}return Object.defineProperty(j.prototype,\"CONNECTING\",{enumerable:!0,value:0}),Object.defineProperty(j.prototype,\"OPEN\",{enumerable:!0,value:1}),Object.defineProperty(j.prototype,\"CLOSED\",{enumerable:!0,value:2}),j[Symbol.for(\"CommonJS\")]=0,j})\n"; +const char* const s_eventSourceGetEventSourceCode = "(function (){\"use strict\";class A extends EventTarget{#Z;#K;#W;#L;#M;#j=!1;#$=null;#O=\"\";#B=\"\";#z=\"\";#Q=!0;#X=0;#F=0;#H=0;#U=null;static#G(U){U.#Y()}static#J(U,B){const V=U.data,F=V.#z\?`Last-Event-ID: ${V.#z}\\r\\n`:\"\",j=`GET ${B.pathname}${B.search} HTTP/1.1\\r\\nHost: bun\\r\\nContent-type: text/event-stream\\r\\nContent-length: 0\\r\\n${F}\\r\\n`,G=U.write(j);if(G!==j.length)V.#B=j.substring(G)}static#V(U,B,V){for(;;){if(V>=B.length)return;let F=-1,j=B.indexOf(\"\\r\\n\",V);const G=j+2;if(j>0)if(U.#X===0){const Y=parseInt(B.substring(V,j),16);if(Y===0){U.#K=2,U.#$\?.end();return}F=G+Y}else F=B.length;else{if(U.#O.length===0){U.#O+=B.substring(V);return}F=B.length}let W=B.substring(G,F);V=F+2;let J=0,X=W.indexOf(\"\\n\\n\");if(X==-1){U.#O+=B.substring(G);return}if(U.#O.length)U.#O+=W,W=U.#O,U.#O=\"\";let K=!0;while(K){const Y=W.substring(J,X);let L,Z=\"\",M,w=0,O=-1;for(;;){let Q=Y.indexOf(\"\\n\",w);if(Q===-1){if(w>=Y.length)break;Q=Y.length}const H=Y.substring(w,Q);if(H.startsWith(\"data:\"))if(Z.length)Z+=`\\n${H.substring(5).trim()}`;else Z=H.substring(5).trim();else if(H.startsWith(\"event:\"))L=H.substring(6).trim();else if(H.startsWith(\"id:\"))M=H.substring(3).trim();else if(H.startsWith(\"retry:\")){if(O=parseInt(H.substring(6).trim(),10),@isNaN(O))O=-1}w=Q+1}if(U.#z=M||\"\",O>=0)U.#H=O;if(Z||M||L)U.dispatchEvent(new MessageEvent(L||\"message\",{data:Z||\"\",origin:U.#Z.origin,source:U,lastEventId:M}));if(W.length===X+2){K=!1;break}const z=W.indexOf(\"\\n\\n\",X+1);if(z===-1)break;J=X,X=z}}}static#A={open(U){const B=U.data;if(B.#$=U,!B.#j)A.#J(U,B.#Z)},handshake(U,B,V){const F=U.data;if(B)A.#J(U,F.#Z);else F.#K=2,F.dispatchEvent(new ErrorEvent(\"error\",{error:V})),U.end()},data(U,B){const V=U.data;switch(V.#K){case 0:{let F=B.toString();const j=F.indexOf(\"\\r\\n\\r\\n\");if(j===-1){V.#O+=F;return}if(V.#O.length)V.#O+=F,F=V.#O,V.#O=\"\";const G=F.substring(0,j),W=G.indexOf(\"\\r\\n\");if(W===-1){V.#K=2,V.dispatchEvent(new ErrorEvent(\"error\",{error:new Error(\"Invalid HTTP request\")})),U.end();return}const J=G.substring(0,W);if(J!==\"HTTP/1.1 200 OK\"){V.#K=2,V.dispatchEvent(new ErrorEvent(\"error\",{error:new Error(J)})),U.end();return}let X=W+1,K=!1,Y=-1;for(;;){let Z=G.indexOf(\"\\r\\n\",X);if(Z===-1){if(X>=G.length){if(!K)V.#K=2,V.dispatchEvent(new ErrorEvent(\"error\",{error:new Error(`EventSource's response has no MIME type and \"text/event-stream\" is required. Aborting the connection.`)})),U.end();return}Z=G.length}const M=G.substring(X+1,Z),w=M.indexOf(\":\"),O=M.substring(0,w),z=O.localeCompare(\"content-type\",@undefined,{sensitivity:\"accent\"})===0;if(X=Z+1,z)if(M.endsWith(\" text/event-stream\"))K=!0;else{V.#K=2,V.dispatchEvent(new ErrorEvent(\"error\",{error:new Error(`EventSource's response has a MIME type that is not \"text/event-stream\". Aborting the connection.`)})),U.end();return}else if(O.localeCompare(\"content-length\",@undefined,{sensitivity:\"accent\"})===0){if(Y=parseInt(M.substring(w+1).trim(),10),@isNaN(Y)||Y<=0){V.dispatchEvent(new ErrorEvent(\"error\",{error:new Error(`EventSource's Content-Length is invalid. Aborting the connection.`)})),U.end();return}if(K)break}else if(O.localeCompare(\"transfer-encoding\",@undefined,{sensitivity:\"accent\"})===0){if(M.substring(w+1).trim()!==\"chunked\"){V.dispatchEvent(new ErrorEvent(\"error\",{error:new Error(`EventSource's Transfer-Encoding is invalid. Aborting the connection.`)})),U.end();return}if(Y=0,K)break}}V.#X=Y,V.#K=1,V.dispatchEvent(new Event(\"open\"));const L=F.substring(j+4);if(A.#V(V,L,0),V.#X>0){if(V.#F+=L.length,V.#F>=V.#X)V.#K=2,U.end()}return}case 1:if(A.#V(V,B.toString(),2),V.#X>0){if(V.#F+=B.byteLength,V.#F>=V.#X)V.#K=2,U.end()}return;default:break}},drain(U){const B=U.data;if(B.#K===0){const V=B.#O;if(V.length){const F=U.write(V);if(F!==V.length)U.data.#B=V.substring(F);else U.data.#B=\"\"}}},close:A.#w,end(U){A.#w(U).dispatchEvent(new ErrorEvent(\"error\",{error:new Error(\"Connection closed by server\")}))},timeout(U){A.#w(U).dispatchEvent(new ErrorEvent(\"error\",{error:new Error(\"Timeout\")}))},binaryType:\"buffer\"};static#w(U){const B=U.data;if(B.#$=null,B.#F=0,B.#K=2,B.#Q){if(B.#U)clearTimeout(B.#U);B.#U=setTimeout(A.#G,B.#H,B)}return B}constructor(U,B=@undefined){super();const V=new URL(U);this.#j=V.protocol===\"https:\",this.#Z=V,this.#K=2,process.nextTick(A.#G,this)}ref(){this.#U\?.ref(),this.#$\?.ref()}unref(){this.#U\?.unref(),this.#$\?.unref()}#Y(){if(this.#K!==2)return;const U=this.#Z,B=this.#j;this.#K=0,@Bun.connect({data:this,socket:A.#A,hostname:U.hostname,port:parseInt(U.port||(B\?\"443\":\"80\"),10),tls:B\?{requestCert:!0,rejectUnauthorized:!1}:!1}).catch((V)=>{if(super.dispatchEvent(new ErrorEvent(\"error\",{error:V})),this.#Q){if(this.#U)this.#U.unref\?.();this.#U=setTimeout(A.#G,1000,this)}})}get url(){return this.#Z.href}get readyState(){return this.#K}close(){this.#Q=!1,this.#K=2,this.#$\?.unref(),this.#$\?.end()}get onopen(){return this.#M}get onerror(){return this.#W}get onmessage(){return this.#L}set onopen(U){if(this.#M)super.removeEventListener(\"close\",this.#M);super.addEventListener(\"open\",U),this.#M=U}set onerror(U){if(this.#W)super.removeEventListener(\"error\",this.#W);super.addEventListener(\"error\",U),this.#W=U}set onmessage(U){if(this.#L)super.removeEventListener(\"message\",this.#L);super.addEventListener(\"message\",U),this.#L=U}}return Object.defineProperty(A.prototype,\"CONNECTING\",{enumerable:!0,value:0}),Object.defineProperty(A.prototype,\"OPEN\",{enumerable:!0,value:1}),Object.defineProperty(A.prototype,\"CLOSED\",{enumerable:!0,value:2}),A[Symbol.for(\"CommonJS\")]=0,A})\n"; #define DEFINE_BUILTIN_GENERATOR(codeName, functionName, overriddenName, argumentCount) \ JSC::FunctionExecutable* codeName##Generator(JSC::VM& vm) \ diff --git a/src/js/out/modules/node/assert.js b/src/js/out/modules/node/assert.js index 4086ef8d5197a..bdaa04547a54d 100644 --- a/src/js/out/modules/node/assert.js +++ b/src/js/out/modules/node/assert.js @@ -1,53 +1,53 @@ -import X1 from"node:util";var D1=function(){throw new Error("CallTracker is not supported yet")},{Bun:$1}=globalThis[Symbol.for("Bun.lazy")]("primordials"),z1=$1.deepEquals,W1=(H,Q)=>function(){return Q||(0,H[Object.keys(H)[0]])((Q={exports:{}}).exports,Q),Q.exports},Y1=W1({"assert/build/internal/errors.js"(H,Q){function Z(G){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Z=function(T){return typeof T}:Z=function(T){return T&&typeof Symbol=="function"&&T.constructor===Symbol&&T!==Symbol.prototype?"symbol":typeof T},Z(G)}function J(G,T){if(!(G instanceof T))throw new TypeError("Cannot call a class as a function")}function z(G,T){return T&&(Z(T)==="object"||typeof T=="function")?T:X(G)}function X(G){if(G===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return G}function U(G){return U=Object.setPrototypeOf?Object.getPrototypeOf:function(T){return T.__proto__||Object.getPrototypeOf(T)},U(G)}function $(G,T){if(typeof T!="function"&&T!==null)throw new TypeError("Super expression must either be null or a function");G.prototype=Object.create(T&&T.prototype,{constructor:{value:G,writable:!0,configurable:!0}}),T&&K(G,T)}function K(G,T){return K=Object.setPrototypeOf||function(w,O){return w.__proto__=O,w},K(G,T)}var W={},Y,B;function V(G,T,w){w||(w=Error);function O(N,I,P){return typeof T=="string"?T:T(N,I,P)}var F=function(N){$(I,N);function I(P,A,S){var j;return J(this,I),j=z(this,U(I).call(this,O(P,A,S))),j.code=G,j}return I}(w);W[G]=F}function D(G,T){if(Array.isArray(G)){var w=G.length;return G=G.map(function(O){return String(O)}),w>2?"one of ".concat(T," ").concat(G.slice(0,w-1).join(", "),", or ")+G[w-1]:w===2?"one of ".concat(T," ").concat(G[0]," or ").concat(G[1]):"of ".concat(T," ").concat(G[0])}else return"of ".concat(T," ").concat(String(G))}function M(G,T,w){return G.substr(!w||w<0?0:+w,T.length)===T}function q(G,T,w){return(w===void 0||w>G.length)&&(w=G.length),G.substring(w-T.length,w)===T}function v(G,T,w){return typeof w!="number"&&(w=0),w+T.length>G.length?!1:G.indexOf(T,w)!==-1}V("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),V("ERR_INVALID_ARG_TYPE",function(G,T,w){Y===void 0&&(Y=U1()),Y(typeof G=="string","'name' must be a string");var O;typeof T=="string"&&M(T,"not ")?(O="must not be",T=T.replace(/^not /,"")):O="must be";var F;if(q(G," argument"))F="The ".concat(G," ").concat(O," ").concat(D(T,"type"));else{var N=v(G,".")?"property":"argument";F='The "'.concat(G,'" ').concat(N," ").concat(O," ").concat(D(T,"type"))}return F+=". Received type ".concat(Z(w)),F},TypeError),V("ERR_INVALID_ARG_VALUE",function(G,T){var w=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid",O=B.inspect(T);return O.length>128&&(O="".concat(O.slice(0,128),"...")),"The argument '".concat(G,"' ").concat(w,". Received ").concat(O)},TypeError,RangeError),V("ERR_INVALID_RETURN_VALUE",function(G,T,w){var O;return w&&w.constructor&&w.constructor.name?O="instance of ".concat(w.constructor.name):O="type ".concat(Z(w)),"Expected ".concat(G,' to be returned from the "').concat(T,'"')+" function but got ".concat(O,".")},TypeError),V("ERR_MISSING_ARGS",function(){for(var G=arguments.length,T=new Array(G),w=0;w0,"At least one arg needs to be specified");var O="The ",F=T.length;switch(T=T.map(function(N){return'"'.concat(N,'"')}),F){case 1:O+="".concat(T[0]," argument");break;case 2:O+="".concat(T[0]," and ").concat(T[1]," arguments");break;default:O+=T.slice(0,F-1).join(", "),O+=", and ".concat(T[F-1]," arguments");break}return"".concat(O," must be specified")},TypeError),Q.exports.codes=W}}),B1=W1({"assert/build/internal/assert/assertion_error.js"(H,Q){function Z(L){for(var b=1;bL.length)&&(h=L.length),L.substring(h-b.length,h)===b}function F(L,b){if(b=Math.floor(b),L.length==0||b==0)return"";var h=L.length*b;for(b=Math.floor(Math.log(b)/Math.log(2));b;)L+=L,b--;return L+=L.substring(0,h-L.length),L}var N="",I="",P="",A="",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:"},j=10;function R(L){var b=Object.keys(L),h=Object.create(Object.getPrototypeOf(L));return b.forEach(function(k){h[k]=L[k]}),Object.defineProperty(h,"message",{value:L.message}),h}function f(L){return G(L,{compact:!1,customInspect:!1,depth:1000,maxArrayLength:Infinity,showHidden:!1,breakLength:Infinity,showProxy:!1,sorted:!0,getters:!0})}function C(L,b,h){var k="",m="",x=0,y="",g=!1,d=f(L),_=d.split(` -`),u=f(b).split(` -`),n=0,i="";if(h==="strictEqual"&&v(L)==="object"&&v(b)==="object"&&L!==null&&b!==null&&(h="strictEqualObject"),_.length===1&&u.length===1&&_[0]!==u[0]){var p=_[0].length+u[0].length;if(p<=j){if((v(L)!=="object"||L===null)&&(v(b)!=="object"||b===null)&&(L!==0||b!==0))return"".concat(S[h],` +import U1 from"node:util";var w1=function(){throw new Error("CallTracker is not supported yet")},{Bun:K1}=globalThis[Symbol.for("Bun.lazy")]("primordials"),X1=K1.deepEquals,Y1=(b1,Z)=>function(){return Z||(0,b1[Object.keys(b1)[0]])((Z={exports:{}}).exports,Z),Z.exports},B1=Y1({"assert/build/internal/errors.js"(b1,Z){function J(T){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?J=function(w){return typeof w}:J=function(w){return w&&typeof Symbol=="function"&&w.constructor===Symbol&&w!==Symbol.prototype?"symbol":typeof w},J(T)}function z(T,w){if(!(T instanceof w))throw new TypeError("Cannot call a class as a function")}function X(T,w){return w&&(J(w)==="object"||typeof w=="function")?w:U(T)}function U(T){if(T===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return T}function $(T){return $=Object.setPrototypeOf?Object.getPrototypeOf:function(w){return w.__proto__||Object.getPrototypeOf(w)},$(T)}function K(T,w){if(typeof w!="function"&&w!==null)throw new TypeError("Super expression must either be null or a function");T.prototype=Object.create(w&&w.prototype,{constructor:{value:T,writable:!0,configurable:!0}}),w&&W(T,w)}function W(T,w){return W=Object.setPrototypeOf||function(O,F){return O.__proto__=F,O},W(T,w)}var Y={},B,V;function D(T,w,O){O||(O=Error);function F(I,P,A){return typeof w=="string"?w:w(I,P,A)}var N=function(I){K(P,I);function P(A,S,j){var R;return z(this,P),R=X(this,$(P).call(this,F(A,S,j))),R.code=T,R}return P}(O);Y[T]=N}function M(T,w){if(Array.isArray(T)){var O=T.length;return T=T.map(function(F){return String(F)}),O>2?"one of ".concat(w," ").concat(T.slice(0,O-1).join(", "),", or ")+T[O-1]:O===2?"one of ".concat(w," ").concat(T[0]," or ").concat(T[1]):"of ".concat(w," ").concat(T[0])}else return"of ".concat(w," ").concat(String(T))}function q(T,w,O){return T.substr(!O||O<0?0:+O,w.length)===w}function v(T,w,O){return(O===void 0||O>T.length)&&(O=T.length),T.substring(O-w.length,O)===w}function G(T,w,O){return typeof O!="number"&&(O=0),O+w.length>T.length?!1:T.indexOf(w,O)!==-1}D("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),D("ERR_INVALID_ARG_TYPE",function(T,w,O){B===void 0&&(B=$1()),B(typeof T=="string","'name' must be a string");var F;typeof w=="string"&&q(w,"not ")?(F="must not be",w=w.replace(/^not /,"")):F="must be";var N;if(v(T," argument"))N="The ".concat(T," ").concat(F," ").concat(M(w,"type"));else{var I=G(T,".")?"property":"argument";N='The "'.concat(T,'" ').concat(I," ").concat(F," ").concat(M(w,"type"))}return N+=". Received type ".concat(J(O)),N},TypeError),D("ERR_INVALID_ARG_VALUE",function(T,w){var O=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid",F=V.inspect(w);return F.length>128&&(F="".concat(F.slice(0,128),"...")),"The argument '".concat(T,"' ").concat(O,". Received ").concat(F)},TypeError,RangeError),D("ERR_INVALID_RETURN_VALUE",function(T,w,O){var F;return O&&O.constructor&&O.constructor.name?F="instance of ".concat(O.constructor.name):F="type ".concat(J(O)),"Expected ".concat(T,' to be returned from the "').concat(w,'"')+" function but got ".concat(F,".")},TypeError),D("ERR_MISSING_ARGS",function(){for(var T=arguments.length,w=new Array(T),O=0;O0,"At least one arg needs to be specified");var F="The ",N=w.length;switch(w=w.map(function(I){return'"'.concat(I,'"')}),N){case 1:F+="".concat(w[0]," argument");break;case 2:F+="".concat(w[0]," and ").concat(w[1]," arguments");break;default:F+=w.slice(0,N-1).join(", "),F+=", and ".concat(w[N-1]," arguments");break}return"".concat(F," must be specified")},TypeError),Z.exports.codes=Y}}),G1=Y1({"assert/build/internal/assert/assertion_error.js"(b1,Z){function J(b){for(var h=1;hb.length)&&(k=b.length),b.substring(k-h.length,k)===h}function N(b,h){if(h=Math.floor(h),b.length==0||h==0)return"";var k=b.length*h;for(h=Math.floor(Math.log(h)/Math.log(2));h;)b+=b,h--;return b+=b.substring(0,k-b.length),b}var I="",P="",A="",S="",j={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:"},R=10;function f(b){var h=Object.keys(b),k=Object.create(Object.getPrototypeOf(b));return h.forEach(function(m){k[m]=b[m]}),Object.defineProperty(k,"message",{value:b.message}),k}function C(b){return T(b,{compact:!1,customInspect:!1,depth:1000,maxArrayLength:Infinity,showHidden:!1,breakLength:Infinity,showProxy:!1,sorted:!0,getters:!0})}function E(b,h,k){var m="",x="",y=0,g="",d=!1,_=C(b),u=_.split(` +`),n=C(h).split(` +`),i=0,p="";if(k==="strictEqual"&&G(b)==="object"&&G(h)==="object"&&b!==null&&h!==null&&(k="strictEqualObject"),u.length===1&&n.length===1&&u[0]!==n[0]){var l=u[0].length+n[0].length;if(l<=R){if((G(b)!=="object"||b===null)&&(G(h)!=="object"||h===null)&&(b!==0||h!==0))return"".concat(j[k],` -`)+"".concat(_[0]," !== ").concat(u[0],` -`)}else if(h!=="strictEqualObject"){var l=process.stderr&&process.stderr.isTTY?process.stderr.columns:80;if(p2&&(i=` - `.concat(F(" ",n),"^"),n=0)}}}for(var c=_[_.length-1],o=u[u.length-1];c===o&&(n++<2?y=` - `.concat(c).concat(y):k=c,_.pop(),u.pop(),!(_.length===0||u.length===0));)c=_[_.length-1],o=u[u.length-1];var a=Math.max(_.length,u.length);if(a===0){var t=d.split(` -`);if(t.length>30)for(t[26]="".concat(N,"...").concat(A);t.length>27;)t.pop();return"".concat(S.notIdentical,` +`)+"".concat(u[0]," !== ").concat(n[0],` +`)}else if(k!=="strictEqualObject"){var c=process.stderr&&process.stderr.isTTY?process.stderr.columns:80;if(l2&&(p=` + `.concat(N(" ",i),"^"),i=0)}}}for(var o=u[u.length-1],a=n[n.length-1];o===a&&(i++<2?g=` + `.concat(o).concat(g):m=o,u.pop(),n.pop(),!(u.length===0||n.length===0));)o=u[u.length-1],a=n[n.length-1];var t=Math.max(u.length,n.length);if(t===0){var r=_.split(` +`);if(r.length>30)for(r[26]="".concat(I,"...").concat(S);r.length>27;)r.pop();return"".concat(j.notIdentical,` -`).concat(t.join(` +`).concat(r.join(` `),` -`)}n>3&&(y=` -`.concat(N,"...").concat(A).concat(y),g=!0),k!==""&&(y=` - `.concat(k).concat(y),k="");var r=0,s=S[h]+` -`.concat(I,"+ actual").concat(A," ").concat(P,"- expected").concat(A),e=" ".concat(N,"...").concat(A," Lines skipped");for(n=0;n1&&n>2&&(H1>4?(m+=` -`.concat(N,"...").concat(A),g=!0):H1>3&&(m+=` - `.concat(u[n-2]),r++),m+=` - `.concat(u[n-1]),r++),x=n,k+=` -`.concat(P,"-").concat(A," ").concat(u[n]),r++;else if(u.length1&&n>2&&(H1>4?(m+=` -`.concat(N,"...").concat(A),g=!0):H1>3&&(m+=` - `.concat(_[n-2]),r++),m+=` - `.concat(_[n-1]),r++),x=n,m+=` -`.concat(I,"+").concat(A," ").concat(_[n]),r++;else{var Q1=u[n],Z1=_[n],J1=Z1!==Q1&&(!O(Z1,",")||Z1.slice(0,-1)!==Q1);J1&&O(Q1,",")&&Q1.slice(0,-1)===Z1&&(J1=!1,Z1+=","),J1?(H1>1&&n>2&&(H1>4?(m+=` -`.concat(N,"...").concat(A),g=!0):H1>3&&(m+=` - `.concat(_[n-2]),r++),m+=` - `.concat(_[n-1]),r++),x=n,m+=` -`.concat(I,"+").concat(A," ").concat(Z1),k+=` -`.concat(P,"-").concat(A," ").concat(Q1),r+=2):(m+=k,k="",(H1===1||n===0)&&(m+=` - `.concat(Z1),r++))}if(r>20&&n30)for(n[26]="".concat(N,"...").concat(A);n.length>27;)n.pop();n.length===1?k=$(this,q(b).call(this,"".concat(u," ").concat(n[0]))):k=$(this,q(b).call(this,"".concat(u,` +`)}i>3&&(g=` +`.concat(I,"...").concat(S).concat(g),d=!0),m!==""&&(g=` + `.concat(m).concat(g),m="");var s=0,e=j[k]+` +`.concat(P,"+ actual").concat(S," ").concat(A,"- expected").concat(S),H1=" ".concat(I,"...").concat(S," Lines skipped");for(i=0;i1&&i>2&&(Q1>4?(x+=` +`.concat(I,"...").concat(S),d=!0):Q1>3&&(x+=` + `.concat(n[i-2]),s++),x+=` + `.concat(n[i-1]),s++),y=i,m+=` +`.concat(A,"-").concat(S," ").concat(n[i]),s++;else if(n.length1&&i>2&&(Q1>4?(x+=` +`.concat(I,"...").concat(S),d=!0):Q1>3&&(x+=` + `.concat(u[i-2]),s++),x+=` + `.concat(u[i-1]),s++),y=i,x+=` +`.concat(P,"+").concat(S," ").concat(u[i]),s++;else{var Z1=n[i],J1=u[i],z1=J1!==Z1&&(!F(J1,",")||J1.slice(0,-1)!==Z1);z1&&F(Z1,",")&&Z1.slice(0,-1)===J1&&(z1=!1,J1+=","),z1?(Q1>1&&i>2&&(Q1>4?(x+=` +`.concat(I,"...").concat(S),d=!0):Q1>3&&(x+=` + `.concat(u[i-2]),s++),x+=` + `.concat(u[i-1]),s++),y=i,x+=` +`.concat(P,"+").concat(S," ").concat(J1),m+=` +`.concat(A,"-").concat(S," ").concat(Z1),s+=2):(x+=m,m="",(Q1===1||i===0)&&(x+=` + `.concat(J1),s++))}if(s>20&&i30)for(i[26]="".concat(I,"...").concat(S);i.length>27;)i.pop();i.length===1?m=K(this,v(h).call(this,"".concat(n," ").concat(i[0]))):m=K(this,v(h).call(this,"".concat(n,` -`).concat(n.join(` +`).concat(i.join(` `),` -`)))}else{var i=f(g),p="",l=S[x];x==="notDeepEqual"||x==="notEqual"?(i="".concat(S[x],` +`)))}else{var p=C(d),l="",c=j[y];y==="notDeepEqual"||y==="notEqual"?(p="".concat(j[y],` -`).concat(i),i.length>1024&&(i="".concat(i.slice(0,1021),"..."))):(p="".concat(f(d)),i.length>512&&(i="".concat(i.slice(0,509),"...")),p.length>512&&(p="".concat(p.slice(0,509),"...")),x==="deepEqual"||x==="equal"?i="".concat(l,` +`).concat(p),p.length>1024&&(p="".concat(p.slice(0,1021),"..."))):(l="".concat(C(_)),p.length>512&&(p="".concat(p.slice(0,509),"...")),l.length>512&&(l="".concat(l.slice(0,509),"...")),y==="deepEqual"||y==="equal"?p="".concat(c,` -`).concat(i,` +`).concat(p,` should equal -`):p=" ".concat(x," ").concat(p)),k=$(this,q(b).call(this,"".concat(i).concat(p)))}return Error.stackTraceLimit=_,k.generatedMessage=!m,Object.defineProperty(K(k),"name",{value:"AssertionError [ERR_ASSERTION]",enumerable:!1,writable:!0,configurable:!0}),k.code="ERR_ASSERTION",k.actual=g,k.expected=d,k.operator=x,Error.captureStackTrace&&Error.captureStackTrace(K(k),y),k.stack,k.name="AssertionError",$(k)}return U(b,[{key:"toString",value:function(){return"".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:G.custom,value:function(h,k){return G(this,Z({},k,{customInspect:!1,depth:0}))}}]),b}(Y(Error));Q.exports=E}}),U1=W1({"assert/build/assert.js"(H,Q){function Z(x){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Z=function(y){return typeof y}:Z=function(y){return y&&typeof Symbol=="function"&&y.constructor===Symbol&&y!==Symbol.prototype?"symbol":typeof y},Z(x)}function J(x,y){if(!(x instanceof y))throw new TypeError("Cannot call a class as a function")}var z=Y1(),X=z.codes,U=X.ERR_AMBIGUOUS_ARGUMENT,$=X.ERR_INVALID_ARG_TYPE,K=X.ERR_INVALID_ARG_VALUE,W=X.ERR_INVALID_RETURN_VALUE,Y=X.ERR_MISSING_ARGS,B=B1(),V=X1,D=V.inspect,M=X1.types,q=M.isPromise,v=M.isRegExp,G=Object.assign,T=Object.is,w=new Map,O=!1,F=Q.exports=S,N={};function I(x){throw x.message instanceof Error?x.message:new B(x)}function P(x,y,g,d,_){var u=arguments.length,n;if(u===0)n="Failed";else if(u===1)g=x,x=void 0;else{if(O===!1){O=!0;var i=process.emitWarning?process.emitWarning:console.warn.bind(console);i("assert.fail() with more than one argument is deprecated. Please use assert.strictEqual() instead or only pass a message.","DeprecationWarning","DEP0094")}u===2&&(d="!=")}if(g instanceof Error)throw g;var p={actual:x,expected:y,operator:d===void 0?"fail":d,stackStartFn:_||P};g!==void 0&&(p.message=g);var l=new B(p);throw n&&(l.message=n,l.generatedMessage=!0),l}F.fail=P,F.AssertionError=B;function A(x,y,g,d){if(!g){var _=!1;if(y===0)_=!0,d="No value argument passed to `assert.ok()`";else if(d instanceof Error)throw d;var u=new B({actual:g,expected:!0,message:d,operator:"==",stackStartFn:x});throw u.generatedMessage=_,u}}function S(){for(var x=arguments.length,y=new Array(x),g=0;g1?g-1:0),_=1;_1?g-1:0),_=1;_1?g-1:0),_=1;_1?g-1:0),_=1;_1?d-1:0),u=1;u1?d-1:0),u=1;u1?d-1:0),u=1;u1?d-1:0),u=1;ufunction(){return Q||(0,$[R$($)[0]])((Q={exports:{}}).exports,Q),Q.exports},j$=($,Q)=>{for(var Y in Q)L$($,Y,{get:Q[Y],enumerable:!0})};var k$=q$({"node_modules/safe-buffer/index.js"($,Q){var Y=M$,Z=Y.Buffer;function G(U,X){for(var K in U)X[K]=U[K]}Z.from&&Z.alloc&&Z.allocUnsafe&&Z.allocUnsafeSlow?Q.exports=Y:(G(Y,$),$.Buffer=V);function V(U,X,K){return Z(U,X,K)}V.prototype=Object.create(Z.prototype),G(Z,V),V.from=function(U,X,K){if(typeof U=="number")throw new TypeError("Argument must not be a number");return Z(U,X,K)},V.alloc=function(U,X,K){if(typeof U!="number")throw new TypeError("Argument must be a number");var I=Z(U);return X!==void 0?typeof K=="string"?I.fill(X,K):I.fill(X):I.fill(0),I},V.allocUnsafe=function(U){if(typeof U!="number")throw new TypeError("Argument must be a number");return Z(U)},V.allocUnsafeSlow=function(U){if(typeof U!="number")throw new TypeError("Argument must be a number");return Y.SlowBuffer(U)}}}),g$=q$({"node_modules/randombytes/browser.js"($,Q){var Y=65536,Z=4294967295;function G(){throw new Error(`Secure random number generation is not supported by this browser. -Use Chrome, Firefox or Internet Explorer 11`)}var V=k$().Buffer,U=v$;U&&U.getRandomValues?Q.exports=X:Q.exports=G;function X(K,I){if(K>Z)throw new RangeError("requested too many random bytes");var O=V.allocUnsafe(K);if(K>0)if(K>Y)for(var J=0;J=this._blockSize;){for(var O=this._blockOffset;O0;++J)this._length[J]+=F,F=this._length[J]/4294967296|0,F>0&&(this._length[J]-=4294967296*F);return this},V.prototype._update=function(){throw new Error("_update is not implemented")},V.prototype.digest=function(U){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var X=this._digest();U!==void 0&&(X=X.toString(U)),this._block.fill(0),this._blockOffset=0;for(var K=0;K<4;++K)this._length[K]=0;return X},V.prototype._digest=function(){throw new Error("_digest is not implemented")},Q.exports=V}}),x$=q$({"node_modules/md5.js/index.js"($,Q){var Y=_$(),Z=N$(),G=k$().Buffer,V=new Array(16);function U(){Z.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}Y(U,Z),U.prototype._update=function(){for(var F=V,A=0;A<16;++A)F[A]=this._block.readInt32LE(A*4);var H=this._a,W=this._b,E=this._c,T=this._d;H=K(H,W,E,T,F[0],3614090360,7),T=K(T,H,W,E,F[1],3905402710,12),E=K(E,T,H,W,F[2],606105819,17),W=K(W,E,T,H,F[3],3250441966,22),H=K(H,W,E,T,F[4],4118548399,7),T=K(T,H,W,E,F[5],1200080426,12),E=K(E,T,H,W,F[6],2821735955,17),W=K(W,E,T,H,F[7],4249261313,22),H=K(H,W,E,T,F[8],1770035416,7),T=K(T,H,W,E,F[9],2336552879,12),E=K(E,T,H,W,F[10],4294925233,17),W=K(W,E,T,H,F[11],2304563134,22),H=K(H,W,E,T,F[12],1804603682,7),T=K(T,H,W,E,F[13],4254626195,12),E=K(E,T,H,W,F[14],2792965006,17),W=K(W,E,T,H,F[15],1236535329,22),H=I(H,W,E,T,F[1],4129170786,5),T=I(T,H,W,E,F[6],3225465664,9),E=I(E,T,H,W,F[11],643717713,14),W=I(W,E,T,H,F[0],3921069994,20),H=I(H,W,E,T,F[5],3593408605,5),T=I(T,H,W,E,F[10],38016083,9),E=I(E,T,H,W,F[15],3634488961,14),W=I(W,E,T,H,F[4],3889429448,20),H=I(H,W,E,T,F[9],568446438,5),T=I(T,H,W,E,F[14],3275163606,9),E=I(E,T,H,W,F[3],4107603335,14),W=I(W,E,T,H,F[8],1163531501,20),H=I(H,W,E,T,F[13],2850285829,5),T=I(T,H,W,E,F[2],4243563512,9),E=I(E,T,H,W,F[7],1735328473,14),W=I(W,E,T,H,F[12],2368359562,20),H=O(H,W,E,T,F[5],4294588738,4),T=O(T,H,W,E,F[8],2272392833,11),E=O(E,T,H,W,F[11],1839030562,16),W=O(W,E,T,H,F[14],4259657740,23),H=O(H,W,E,T,F[1],2763975236,4),T=O(T,H,W,E,F[4],1272893353,11),E=O(E,T,H,W,F[7],4139469664,16),W=O(W,E,T,H,F[10],3200236656,23),H=O(H,W,E,T,F[13],681279174,4),T=O(T,H,W,E,F[0],3936430074,11),E=O(E,T,H,W,F[3],3572445317,16),W=O(W,E,T,H,F[6],76029189,23),H=O(H,W,E,T,F[9],3654602809,4),T=O(T,H,W,E,F[12],3873151461,11),E=O(E,T,H,W,F[15],530742520,16),W=O(W,E,T,H,F[2],3299628645,23),H=J(H,W,E,T,F[0],4096336452,6),T=J(T,H,W,E,F[7],1126891415,10),E=J(E,T,H,W,F[14],2878612391,15),W=J(W,E,T,H,F[5],4237533241,21),H=J(H,W,E,T,F[12],1700485571,6),T=J(T,H,W,E,F[3],2399980690,10),E=J(E,T,H,W,F[10],4293915773,15),W=J(W,E,T,H,F[1],2240044497,21),H=J(H,W,E,T,F[8],1873313359,6),T=J(T,H,W,E,F[15],4264355552,10),E=J(E,T,H,W,F[6],2734768916,15),W=J(W,E,T,H,F[13],1309151649,21),H=J(H,W,E,T,F[4],4149444226,6),T=J(T,H,W,E,F[11],3174756917,10),E=J(E,T,H,W,F[2],718787259,15),W=J(W,E,T,H,F[9],3951481745,21),this._a=this._a+H|0,this._b=this._b+W|0,this._c=this._c+E|0,this._d=this._d+T|0},U.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var F=G.allocUnsafe(16);return F.writeInt32LE(this._a,0),F.writeInt32LE(this._b,4),F.writeInt32LE(this._c,8),F.writeInt32LE(this._d,12),F};function X(F,A){return F<>>32-A}function K(F,A,H,W,E,T,D){return X(F+(A&H|~A&W)+E+T|0,D)+A|0}function I(F,A,H,W,E,T,D){return X(F+(A&W|H&~W)+E+T|0,D)+A|0}function O(F,A,H,W,E,T,D){return X(F+(A^H^W)+E+T|0,D)+A|0}function J(F,A,H,W,E,T,D){return X(F+(H^(A|~W))+E+T|0,D)+A|0}Q.exports=U}}),B$=q$({"node_modules/ripemd160/index.js"($,Q){var Y=F$,Z=_$(),G=N$(),V=new Array(16),U=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],X=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],K=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],I=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],O=[0,1518500249,1859775393,2400959708,2840853838],J=[1352829926,1548603684,1836072691,2053994217,0];function F(){G.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}Z(F,G),F.prototype._update=function(){for(var C=V,L=0;L<16;++L)C[L]=this._block.readInt32LE(L*4);for(var R=this._a|0,P=this._b|0,z=this._c|0,M=this._d|0,S=this._e|0,v=this._a|0,q=this._b|0,j=this._c|0,k=this._d|0,g=this._e|0,_=0;_<80;_+=1){var N,x;_<16?(N=H(R,P,z,M,S,C[U[_]],O[0],K[_]),x=D(v,q,j,k,g,C[X[_]],J[0],I[_])):_<32?(N=W(R,P,z,M,S,C[U[_]],O[1],K[_]),x=T(v,q,j,k,g,C[X[_]],J[1],I[_])):_<48?(N=E(R,P,z,M,S,C[U[_]],O[2],K[_]),x=E(v,q,j,k,g,C[X[_]],J[2],I[_])):_<64?(N=T(R,P,z,M,S,C[U[_]],O[3],K[_]),x=W(v,q,j,k,g,C[X[_]],J[3],I[_])):(N=D(R,P,z,M,S,C[U[_]],O[4],K[_]),x=H(v,q,j,k,g,C[X[_]],J[4],I[_])),R=S,S=M,M=A(z,10),z=P,P=N,v=g,g=k,k=A(j,10),j=q,q=x}var B=this._b+z+k|0;this._b=this._c+M+g|0,this._c=this._d+S+v|0,this._d=this._e+R+q|0,this._e=this._a+P+j|0,this._a=B},F.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var C=Y.alloc?Y.alloc(20):new Y(20);return C.writeInt32LE(this._a,0),C.writeInt32LE(this._b,4),C.writeInt32LE(this._c,8),C.writeInt32LE(this._d,12),C.writeInt32LE(this._e,16),C};function A(C,L){return C<>>32-L}function H(C,L,R,P,z,M,S,v){return A(C+(L^R^P)+M+S|0,v)+z|0}function W(C,L,R,P,z,M,S,v){return A(C+(L&R|~L&P)+M+S|0,v)+z|0}function E(C,L,R,P,z,M,S,v){return A(C+((L|~R)^P)+M+S|0,v)+z|0}function T(C,L,R,P,z,M,S,v){return A(C+(L&P|R&~P)+M+S|0,v)+z|0}function D(C,L,R,P,z,M,S,v){return A(C+(L^(R|~P))+M+S|0,v)+z|0}Q.exports=F}}),y$=q$({"node_modules/sha.js/hash.js"($,Q){var Y=k$().Buffer;function Z(G,V){this._block=Y.alloc(G),this._finalSize=V,this._blockSize=G,this._len=0}Z.prototype.update=function(G,V){typeof G=="string"&&(V=V||"utf8",G=Y.from(G,V));for(var U=this._block,X=this._blockSize,K=G.length,I=this._len,O=0;O=this._finalSize&&(this._update(this._block),this._block.fill(0));var U=this._len*8;if(U<=4294967295)this._block.writeUInt32BE(U,this._blockSize-4);else{var X=(U&4294967295)>>>0,K=(U-X)/4294967296;this._block.writeUInt32BE(K,this._blockSize-8),this._block.writeUInt32BE(X,this._blockSize-4)}this._update(this._block);var I=this._hash();return G?I.toString(G):I},Z.prototype._update=function(){throw new Error("_update must be implemented by subclass")},Q.exports=Z}}),w$=q$({"node_modules/sha.js/sha.js"($,Q){var Y=_$(),Z=y$(),G=k$().Buffer,V=[1518500249,1859775393,-1894007588,-899497514],U=new Array(80);function X(){this.init(),this._w=U,Z.call(this,64,56)}Y(X,Z),X.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function K(J){return J<<5|J>>>27}function I(J){return J<<30|J>>>2}function O(J,F,A,H){return J===0?F&A|~F&H:J===2?F&A|F&H|A&H:F^A^H}X.prototype._update=function(J){for(var F=this._w,A=this._a|0,H=this._b|0,W=this._c|0,E=this._d|0,T=this._e|0,D=0;D<16;++D)F[D]=J.readInt32BE(D*4);for(;D<80;++D)F[D]=F[D-3]^F[D-8]^F[D-14]^F[D-16];for(var C=0;C<80;++C){var L=~~(C/20),R=K(A)+O(L,H,W,E)+T+F[C]+V[L]|0;T=E,E=W,W=I(H),H=A,A=R}this._a=A+this._a|0,this._b=H+this._b|0,this._c=W+this._c|0,this._d=E+this._d|0,this._e=T+this._e|0},X.prototype._hash=function(){var J=G.allocUnsafe(20);return J.writeInt32BE(this._a|0,0),J.writeInt32BE(this._b|0,4),J.writeInt32BE(this._c|0,8),J.writeInt32BE(this._d|0,12),J.writeInt32BE(this._e|0,16),J},Q.exports=X}}),p$=q$({"node_modules/sha.js/sha1.js"($,Q){var Y=_$(),Z=y$(),G=k$().Buffer,V=[1518500249,1859775393,-1894007588,-899497514],U=new Array(80);function X(){this.init(),this._w=U,Z.call(this,64,56)}Y(X,Z),X.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function K(F){return F<<1|F>>>31}function I(F){return F<<5|F>>>27}function O(F){return F<<30|F>>>2}function J(F,A,H,W){return F===0?A&H|~A&W:F===2?A&H|A&W|H&W:A^H^W}X.prototype._update=function(F){for(var A=this._w,H=this._a|0,W=this._b|0,E=this._c|0,T=this._d|0,D=this._e|0,C=0;C<16;++C)A[C]=F.readInt32BE(C*4);for(;C<80;++C)A[C]=K(A[C-3]^A[C-8]^A[C-14]^A[C-16]);for(var L=0;L<80;++L){var R=~~(L/20),P=I(H)+J(R,W,E,T)+D+A[L]+V[R]|0;D=T,T=E,E=O(W),W=H,H=P}this._a=H+this._a|0,this._b=W+this._b|0,this._c=E+this._c|0,this._d=T+this._d|0,this._e=D+this._e|0},X.prototype._hash=function(){var F=G.allocUnsafe(20);return F.writeInt32BE(this._a|0,0),F.writeInt32BE(this._b|0,4),F.writeInt32BE(this._c|0,8),F.writeInt32BE(this._d|0,12),F.writeInt32BE(this._e|0,16),F},Q.exports=X}}),f$=q$({"node_modules/sha.js/sha256.js"($,Q){var Y=_$(),Z=y$(),G=k$().Buffer,V=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],U=new Array(64);function X(){this.init(),this._w=U,Z.call(this,64,56)}Y(X,Z),X.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this};function K(H,W,E){return E^H&(W^E)}function I(H,W,E){return H&W|E&(H|W)}function O(H){return(H>>>2|H<<30)^(H>>>13|H<<19)^(H>>>22|H<<10)}function J(H){return(H>>>6|H<<26)^(H>>>11|H<<21)^(H>>>25|H<<7)}function F(H){return(H>>>7|H<<25)^(H>>>18|H<<14)^H>>>3}function A(H){return(H>>>17|H<<15)^(H>>>19|H<<13)^H>>>10}X.prototype._update=function(H){for(var W=this._w,E=this._a|0,T=this._b|0,D=this._c|0,C=this._d|0,L=this._e|0,R=this._f|0,P=this._g|0,z=this._h|0,M=0;M<16;++M)W[M]=H.readInt32BE(M*4);for(;M<64;++M)W[M]=A(W[M-2])+W[M-7]+F(W[M-15])+W[M-16]|0;for(var S=0;S<64;++S){var v=z+J(L)+K(L,R,P)+V[S]+W[S]|0,q=O(E)+I(E,T,D)|0;z=P,P=R,R=L,L=C+v|0,C=D,D=T,T=E,E=v+q|0}this._a=E+this._a|0,this._b=T+this._b|0,this._c=D+this._c|0,this._d=C+this._d|0,this._e=L+this._e|0,this._f=R+this._f|0,this._g=P+this._g|0,this._h=z+this._h|0},X.prototype._hash=function(){var H=G.allocUnsafe(32);return H.writeInt32BE(this._a,0),H.writeInt32BE(this._b,4),H.writeInt32BE(this._c,8),H.writeInt32BE(this._d,12),H.writeInt32BE(this._e,16),H.writeInt32BE(this._f,20),H.writeInt32BE(this._g,24),H.writeInt32BE(this._h,28),H},Q.exports=X}}),c$=q$({"node_modules/sha.js/sha224.js"($,Q){var Y=_$(),Z=f$(),G=y$(),V=k$().Buffer,U=new Array(64);function X(){this.init(),this._w=U,G.call(this,64,56)}Y(X,Z),X.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},X.prototype._hash=function(){var K=V.allocUnsafe(28);return K.writeInt32BE(this._a,0),K.writeInt32BE(this._b,4),K.writeInt32BE(this._c,8),K.writeInt32BE(this._d,12),K.writeInt32BE(this._e,16),K.writeInt32BE(this._f,20),K.writeInt32BE(this._g,24),K},Q.exports=X}}),h$=q$({"node_modules/sha.js/sha512.js"($,Q){var Y=_$(),Z=y$(),G=k$().Buffer,V=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],U=new Array(160);function X(){this.init(),this._w=U,Z.call(this,128,112)}Y(X,Z),X.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this};function K(T,D,C){return C^T&(D^C)}function I(T,D,C){return T&D|C&(T|D)}function O(T,D){return(T>>>28|D<<4)^(D>>>2|T<<30)^(D>>>7|T<<25)}function J(T,D){return(T>>>14|D<<18)^(T>>>18|D<<14)^(D>>>9|T<<23)}function F(T,D){return(T>>>1|D<<31)^(T>>>8|D<<24)^T>>>7}function A(T,D){return(T>>>1|D<<31)^(T>>>8|D<<24)^(T>>>7|D<<25)}function H(T,D){return(T>>>19|D<<13)^(D>>>29|T<<3)^T>>>6}function W(T,D){return(T>>>19|D<<13)^(D>>>29|T<<3)^(T>>>6|D<<26)}function E(T,D){return T>>>0>>0?1:0}X.prototype._update=function(T){for(var D=this._w,C=this._ah|0,L=this._bh|0,R=this._ch|0,P=this._dh|0,z=this._eh|0,M=this._fh|0,S=this._gh|0,v=this._hh|0,q=this._al|0,j=this._bl|0,k=this._cl|0,g=this._dl|0,_=this._el|0,N=this._fl|0,x=this._gl|0,B=this._hl|0,y=0;y<32;y+=2)D[y]=T.readInt32BE(y*4),D[y+1]=T.readInt32BE(y*4+4);for(;y<160;y+=2){var w=D[y-30],p=D[y-30+1],f=F(w,p),c=A(p,w);w=D[y-4],p=D[y-4+1];var h=H(w,p),d=W(p,w),b=D[y-14],l=D[y-14+1],o=D[y-32],u=D[y-32+1],n=c+l|0,s=f+b+E(n,c)|0;n=n+d|0,s=s+h+E(n,d)|0,n=n+u|0,s=s+o+E(n,u)|0,D[y]=s,D[y+1]=n}for(var t=0;t<160;t+=2){s=D[t],n=D[t+1];var m=I(C,L,R),a=I(q,j,k),e=O(C,q),r=O(q,C),i=J(z,_),$0=J(_,z),Q0=V[t],Y0=V[t+1],Z0=K(z,M,S),G0=K(_,N,x),V0=B+$0|0,U0=v+i+E(V0,B)|0;V0=V0+G0|0,U0=U0+Z0+E(V0,G0)|0,V0=V0+Y0|0,U0=U0+Q0+E(V0,Y0)|0,V0=V0+n|0,U0=U0+s+E(V0,n)|0;var X0=r+a|0,K0=e+m+E(X0,r)|0;v=S,B=x,S=M,x=N,M=z,N=_,_=g+V0|0,z=P+U0+E(_,g)|0,P=R,g=k,R=L,k=j,L=C,j=q,q=V0+X0|0,C=U0+K0+E(q,V0)|0}this._al=this._al+q|0,this._bl=this._bl+j|0,this._cl=this._cl+k|0,this._dl=this._dl+g|0,this._el=this._el+_|0,this._fl=this._fl+N|0,this._gl=this._gl+x|0,this._hl=this._hl+B|0,this._ah=this._ah+C+E(this._al,q)|0,this._bh=this._bh+L+E(this._bl,j)|0,this._ch=this._ch+R+E(this._cl,k)|0,this._dh=this._dh+P+E(this._dl,g)|0,this._eh=this._eh+z+E(this._el,_)|0,this._fh=this._fh+M+E(this._fl,N)|0,this._gh=this._gh+S+E(this._gl,x)|0,this._hh=this._hh+v+E(this._hl,B)|0},X.prototype._hash=function(){var T=G.allocUnsafe(64);function D(C,L,R){T.writeInt32BE(C,R),T.writeInt32BE(L,R+4)}return D(this._ah,this._al,0),D(this._bh,this._bl,8),D(this._ch,this._cl,16),D(this._dh,this._dl,24),D(this._eh,this._el,32),D(this._fh,this._fl,40),D(this._gh,this._gl,48),D(this._hh,this._hl,56),T},Q.exports=X}}),d$=q$({"node_modules/sha.js/sha384.js"($,Q){var Y=_$(),Z=h$(),G=y$(),V=k$().Buffer,U=new Array(160);function X(){this.init(),this._w=U,G.call(this,128,112)}Y(X,Z),X.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},X.prototype._hash=function(){var K=V.allocUnsafe(48);function I(O,J,F){K.writeInt32BE(O,F),K.writeInt32BE(J,F+4)}return I(this._ah,this._al,0),I(this._bh,this._bl,8),I(this._ch,this._cl,16),I(this._dh,this._dl,24),I(this._eh,this._el,32),I(this._fh,this._fl,40),K},Q.exports=X}}),b$=q$({"node_modules/sha.js/index.js"(Y,Q){var Y=Q.exports=function(Z){Z=Z.toLowerCase();var G=Y[Z];if(!G)throw new Error(Z+" is not supported (we accept pull requests)");return new G};Y.sha=w$(),Y.sha1=p$(),Y.sha224=c$(),Y.sha256=f$(),Y.sha384=d$(),Y.sha512=h$()}}),l$=q$({"node_modules/cipher-base/index.js"($,Q){var Y=k$().Buffer,Z=_$();function G(V){A$.Transform.call(this),this.hashMode=typeof V=="string",this.hashMode?this[V]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}Z(G,A$.Transform),G.prototype.update=function(V,U,X){typeof V=="string"&&(V=Y.from(V,U));var K=this._update(V);return this.hashMode?this:(X&&(K=this._toString(K,X)),K)},G.prototype.setAutoPadding=function(){},G.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},G.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},G.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},G.prototype._transform=function(V,U,X){var K;try{this.hashMode?this._update(V):this.push(this._update(V))}catch(I){K=I}finally{X(K)}},G.prototype._flush=function(V){var U;try{this.push(this.__final())}catch(X){U=X}V(U)},G.prototype._finalOrDigest=function(V){var U=this.__final()||Y.alloc(0);return V&&(U=this._toString(U,V,!0)),U},G.prototype._toString=function(V,U,X){if(this._decoder||(this._decoder=new z$(U),this._encoding=U),this._encoding!==U)throw new Error("can't switch encodings");var K=this._decoder.write(V);return X&&(K+=this._decoder.end()),K},Q.exports=G}}),o$=q$({"node_modules/create-hash/browser.js"($,Q){const Y=function V(U,X){this._options=X,this._hasher=new sY(U,X),this._finalized=!1};Y.prototype=Object.create(A$.Transform.prototype),Y.prototype.update=function V(U,X){return this._checkFinalized(),this._hasher.update(U,X),this},Y.prototype.digest=function V(U,X){return this._checkFinalized(),this._finalized=!0,this._hasher.digest(U,X)},Y.prototype._checkFinalized=function V(){if(this._finalized){var U=new Error("Digest already called");throw U.code="ERR_CRYPTO_HASH_FINALIZED",U}},Y.prototype.copy=function V(){const U=Object.create(Y.prototype);return U._options=this._options,U._hasher=this._hasher.copy(),U._finalized=this._finalized,U};const Z={__proto__:A$.Transform.prototype,...Y.prototype,_transform(V,U,X){this.update(V,U),X&&X()},_flush(V){this.push(this.digest()),V()}},G=["_events","_eventsCount","_final","_maxListeners","_maxListeners","_read","_undestroy","_writableState","_write","_writev","addListener","asIndexedPairs","closed","compose","constructor","cork","destroy","destroyed","drop","emit","end","errored","eventNames","every","filter","find","flatMap","forEach","getMaxListeners","hasOwnProperty","isPaused","isPrototypeOf","iterator","listenerCount","listeners","map","off","on","once","pause","pipe","prependListener","prependOnceListener","propertyIsEnumerable","push","rawListeners","read","readable","readableAborted","readableBuffer","readableDidRead","readableEncoding","readableEnded","readableFlowing","readableHighWaterMark","readableLength","readableObjectMode","reduce","removeAllListeners","removeListener","resume","setDefaultEncoding","setEncoding","setMaxListeners","some","take","toArray","toLocaleString","toString","uncork","unpipe","unshift","valueOf","wrap","writable","writableBuffer","writableCorked","writableEnded","writableFinished","writableHighWaterMark","writableLength","writableNeedDrain","writableObjectMode","write"];for(let V of G)Object.defineProperty(Y.prototype,V,{get(){return Object.setPrototypeOf(this,Z),A$.Transform.call(this,this._options),this[V]},enumerable:!1,configurable:!0});Q.exports=function V(U){return new Y(U)},Q.exports.createHash=Q.exports,Q.exports.Hash=Y}}),u$=q$({"node_modules/create-hmac/legacy.js"($,Q){var Y=_$(),Z=k$().Buffer,G=l$(),V=Z.alloc(128),U=64;function X(K,I){G.call(this,"digest"),typeof I=="string"&&(I=Z.from(I)),this._alg=K,this._key=I,I.length>U?I=K(I):I.lengthA){var H=J==="rmd160"?new X:K(J);F=H.update(F).digest()}else F.lengthY||G!==G)throw new TypeError("Bad key length")}}}),e$=q$({"node_modules/pbkdf2/lib/default-encoding.js"($,Q){var Y;global.process&&global.process.browser?Y="utf-8":global.process&&global.process.version?(Z=parseInt(process.version.split(".")[0].slice(1),10),Y=Z>=6?"utf-8":"binary"):Y="utf-8";var Z;Q.exports=Y}}),r$=q$({"node_modules/pbkdf2/lib/to-buffer.js"($,Q){var Y=k$().Buffer;Q.exports=function(Z,G,V){if(Y.isBuffer(Z))return Z;if(typeof Z=="string")return Y.from(Z,G);if(ArrayBuffer.isView(Z))return Y.from(Z.buffer);throw new TypeError(V+" must be a string, a Buffer, a typed array or a DataView")}}}),i$=q$({"node_modules/pbkdf2/lib/sync-browser.js"($,Q){var Y=n$(),Z=B$(),G=b$(),V=k$().Buffer,U=a$(),X=e$(),K=r$(),I=V.alloc(128),O={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function J(H,W,E){var T=F(H),D=H==="sha512"||H==="sha384"?128:64;W.length>D?W=T(W):W.length>>0},$.writeUInt32BE=function(G,V,U){G[0+U]=V>>>24,G[1+U]=V>>>16&255,G[2+U]=V>>>8&255,G[3+U]=V&255},$.ip=function(G,V,U,X){for(var K=0,I=0,O=6;O>=0;O-=2){for(var J=0;J<=24;J+=8)K<<=1,K|=V>>>J+O&1;for(var J=0;J<=24;J+=8)K<<=1,K|=G>>>J+O&1}for(var O=6;O>=0;O-=2){for(var J=1;J<=25;J+=8)I<<=1,I|=V>>>J+O&1;for(var J=1;J<=25;J+=8)I<<=1,I|=G>>>J+O&1}U[X+0]=K>>>0,U[X+1]=I>>>0},$.rip=function(G,V,U,X){for(var K=0,I=0,O=0;O<4;O++)for(var J=24;J>=0;J-=8)K<<=1,K|=V>>>J+O&1,K<<=1,K|=G>>>J+O&1;for(var O=4;O<8;O++)for(var J=24;J>=0;J-=8)I<<=1,I|=V>>>J+O&1,I<<=1,I|=G>>>J+O&1;U[X+0]=K>>>0,U[X+1]=I>>>0},$.pc1=function(G,V,U,X){for(var K=0,I=0,O=7;O>=5;O--){for(var J=0;J<=24;J+=8)K<<=1,K|=V>>J+O&1;for(var J=0;J<=24;J+=8)K<<=1,K|=G>>J+O&1}for(var J=0;J<=24;J+=8)K<<=1,K|=V>>J+O&1;for(var O=1;O<=3;O++){for(var J=0;J<=24;J+=8)I<<=1,I|=V>>J+O&1;for(var J=0;J<=24;J+=8)I<<=1,I|=G>>J+O&1}for(var J=0;J<=24;J+=8)I<<=1,I|=G>>J+O&1;U[X+0]=K>>>0,U[X+1]=I>>>0},$.r28shl=function(G,V){return G<>>28-V};var Q=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];$.pc2=function(G,V,U,X){for(var K=0,I=0,O=Q.length>>>1,J=0;J>>Q[J]&1;for(var J=O;J>>Q[J]&1;U[X+0]=K>>>0,U[X+1]=I>>>0},$.expand=function(G,V,U){var X=0,K=0;X=(G&1)<<5|G>>>27;for(var I=23;I>=15;I-=4)X<<=6,X|=G>>>I&63;for(var I=11;I>=3;I-=4)K|=G>>>I&63,K<<=6;K|=(G&31)<<1|G>>>31,V[U+0]=X>>>0,V[U+1]=K>>>0};var Y=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];$.substitute=function(G,V){for(var U=0,X=0;X<4;X++){var K=G>>>18-X*6&63,I=Y[X*64+K];U<<=4,U|=I}for(var X=0;X<4;X++){var K=V>>>18-X*6&63,I=Y[256+X*64+K];U<<=4,U|=I}return U>>>0};var Z=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];$.permute=function(G){for(var V=0,U=0;U>>Z[U]&1;return V>>>0},$.padSplit=function(G,V,U){for(var X=G.toString(2);X.length0;X--)V+=this._buffer(G,V),U+=this._flushBuffer(K,U);return V+=this._buffer(G,V),K},Z.prototype.final=function(G){var V;G&&(V=this.update(G));var U;return this.type==="encrypt"?U=this._finalEncrypt():U=this._finalDecrypt(),V?V.concat(U):U},Z.prototype._pad=function(G,V){if(V===0)return!1;for(;V>>1];J=G.r28shl(J,H),F=G.r28shl(F,H),G.pc2(J,F,I.keys,A)}},X.prototype._update=function(I,O,J,F){var A=this._desState,H=G.readUInt32BE(I,O),W=G.readUInt32BE(I,O+4);G.ip(H,W,A.tmp,0),H=A.tmp[0],W=A.tmp[1],this.type==="encrypt"?this._encrypt(A,H,W,A.tmp,0):this._decrypt(A,H,W,A.tmp,0),H=A.tmp[0],W=A.tmp[1],G.writeUInt32BE(J,H,F),G.writeUInt32BE(J,W,F+4)},X.prototype._pad=function(I,O){for(var J=I.length-O,F=O;F>>0,H=R}G.rip(W,H,F,A)},X.prototype._decrypt=function(I,O,J,F,A){for(var H=J,W=O,E=I.keys.length-2;E>=0;E-=2){var T=I.keys[E],D=I.keys[E+1];G.expand(H,I.tmp,0),T^=I.tmp[0],D^=I.tmp[1];var C=G.substitute(T,D),L=G.permute(C),R=H;H=(W^L)>>>0,W=R}G.rip(H,W,F,A)}}}),UQ=q$({"node_modules/des.js/lib/des/cbc.js"($){var Q=ZQ(),Y=_$(),Z={};function G(U){Q.equal(U.length,8,"Invalid IV length"),this.iv=new Array(8);for(var X=0;X>K%8,G._prev=Z(G._prev,U?J:F);return O}function Z(G,V){var U=G.length,X=-1,K=Q.allocUnsafe(G.length);for(G=Q.concat([G,Q.from([V])]);++X>7;return K}$.encrypt=function(G,V,U){for(var X=V.length,K=Q.allocUnsafe(X),I=-1;++I>>24]^W[C>>>16&255]^E[L>>>8&255]^T[R&255]^O[v++],z=H[C>>>24]^W[L>>>16&255]^E[R>>>8&255]^T[D&255]^O[v++],M=H[L>>>24]^W[R>>>16&255]^E[D>>>8&255]^T[C&255]^O[v++],S=H[R>>>24]^W[D>>>16&255]^E[C>>>8&255]^T[L&255]^O[v++],D=P,C=z,L=M,R=S;return P=(F[D>>>24]<<24|F[C>>>16&255]<<16|F[L>>>8&255]<<8|F[R&255])^O[v++],z=(F[C>>>24]<<24|F[L>>>16&255]<<16|F[R>>>8&255]<<8|F[D&255])^O[v++],M=(F[L>>>24]<<24|F[R>>>16&255]<<16|F[D>>>8&255]<<8|F[C&255])^O[v++],S=(F[R>>>24]<<24|F[D>>>16&255]<<16|F[C>>>8&255]<<8|F[L&255])^O[v++],P=P>>>0,z=z>>>0,M=M>>>0,S=S>>>0,[P,z,M,S]}var U=[0,1,2,4,8,16,32,64,128,27,54],X=function(){for(var I=new Array(256),O=0;O<256;O++)O<128?I[O]=O<<1:I[O]=O<<1^283;for(var J=[],F=[],A=[[],[],[],[]],H=[[],[],[],[]],W=0,E=0,T=0;T<256;++T){var D=E^E<<1^E<<2^E<<3^E<<4;D=D>>>8^D&255^99,J[W]=D,F[D]=W;var C=I[W],L=I[C],R=I[L],P=I[D]*257^D*16843008;A[0][W]=P<<24|P>>>8,A[1][W]=P<<16|P>>>16,A[2][W]=P<<8|P>>>24,A[3][W]=P,P=R*16843009^L*65537^C*257^W*16843008,H[0][D]=P<<24|P>>>8,H[1][D]=P<<16|P>>>16,H[2][D]=P<<8|P>>>24,H[3][D]=P,W===0?W=E=1:(W=C^I[I[I[R^C]]],E^=I[I[E]])}return{SBOX:J,INV_SBOX:F,SUB_MIX:A,INV_SUB_MIX:H}}();function K(I){this._key=Z(I),this._reset()}K.blockSize=16,K.keySize=32,K.prototype.blockSize=K.blockSize,K.prototype.keySize=K.keySize,K.prototype._reset=function(){for(var I=this._key,O=I.length,J=O+6,F=(J+1)*4,A=[],H=0;H>>24,W=X.SBOX[W>>>24]<<24|X.SBOX[W>>>16&255]<<16|X.SBOX[W>>>8&255]<<8|X.SBOX[W&255],W^=U[H/O|0]<<24):O>6&&H%O===4&&(W=X.SBOX[W>>>24]<<24|X.SBOX[W>>>16&255]<<16|X.SBOX[W>>>8&255]<<8|X.SBOX[W&255]),A[H]=A[H-O]^W}for(var E=[],T=0;T>>24]]^X.INV_SUB_MIX[1][X.SBOX[C>>>16&255]]^X.INV_SUB_MIX[2][X.SBOX[C>>>8&255]]^X.INV_SUB_MIX[3][X.SBOX[C&255]]}this._nRounds=J,this._keySchedule=A,this._invKeySchedule=E},K.prototype.encryptBlockRaw=function(I){return I=Z(I),V(I,this._keySchedule,X.SUB_MIX,X.SBOX,this._nRounds)},K.prototype.encryptBlock=function(I){var O=this.encryptBlockRaw(I),J=Y.allocUnsafe(16);return J.writeUInt32BE(O[0],0),J.writeUInt32BE(O[1],4),J.writeUInt32BE(O[2],8),J.writeUInt32BE(O[3],12),J},K.prototype.decryptBlock=function(I){I=Z(I);var O=I[1];I[1]=I[3],I[3]=O;var J=V(I,this._invKeySchedule,X.INV_SUB_MIX,X.INV_SBOX,this._nRounds),F=Y.allocUnsafe(16);return F.writeUInt32BE(J[0],0),F.writeUInt32BE(J[3],4),F.writeUInt32BE(J[2],8),F.writeUInt32BE(J[1],12),F},K.prototype.scrub=function(){G(this._keySchedule),G(this._invKeySchedule),G(this._key)},Q.exports.AES=K}}),RQ=q$({"node_modules/browserify-aes/ghash.js"($,Q){var Y=k$().Buffer,Z=Y.alloc(16,0);function G(X){return[X.readUInt32BE(0),X.readUInt32BE(4),X.readUInt32BE(8),X.readUInt32BE(12)]}function V(X){var K=Y.allocUnsafe(16);return K.writeUInt32BE(X[0]>>>0,0),K.writeUInt32BE(X[1]>>>0,4),K.writeUInt32BE(X[2]>>>0,8),K.writeUInt32BE(X[3]>>>0,12),K}function U(X){this.h=X,this.state=Y.alloc(16,0),this.cache=Y.allocUnsafe(0)}U.prototype.ghash=function(X){for(var K=-1;++K0;I--)X[I]=X[I]>>>1|(X[I-1]&1)<<31;X[0]=X[0]>>>1,J&&(X[0]=X[0]^225<<24)}this.state=V(K)},U.prototype.update=function(X){this.cache=Y.concat([this.cache,X]);for(var K;this.cache.length>=16;)K=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(K)},U.prototype.final=function(X,K){return this.cache.length&&this.ghash(Y.concat([this.cache,Z],16)),this.ghash(V([0,X,0,K])),this.state},Q.exports=U}}),PQ=q$({"node_modules/browserify-aes/authCipher.js"($,Q){var Y=LQ(),Z=k$().Buffer,G=l$(),V=_$(),U=RQ(),X=JQ(),K=TQ();function I(F,A){var H=0;F.length!==A.length&&H++;for(var W=Math.min(F.length,A.length),E=0;E0||K>0;){var A=new Z;A.update(F),A.update(V),U&&A.update(U),F=A.digest();var H=0;if(I>0){var W=O.length-I;H=Math.min(I,F.length),F.copy(O,W,0,H),I-=H}if(H0){var E=J.length-K,T=Math.min(K,F.length-H);F.copy(J,E,H,H+T),K-=T}}return F.fill(0),{key:O,iv:J}}Q.exports=G}}),SQ=q$({"node_modules/browserify-aes/encrypter.js"($){var Q=CQ(),Y=PQ(),Z=k$().Buffer,G=zQ(),V=l$(),U=LQ(),X=MQ(),K=_$();function I(H,W,E){V.call(this),this._cache=new J,this._cipher=new U.AES(W),this._prev=Z.from(E),this._mode=H,this._autopadding=!0}K(I,V),I.prototype._update=function(H){this._cache.add(H);for(var W,E,T=[];W=this._cache.get();)E=this._mode.encrypt(this,W),T.push(E);return Z.concat(T)};var O=Z.alloc(16,16);I.prototype._final=function(){var H=this._cache.flush();if(this._autopadding)return H=this._mode.encrypt(this,H),this._cipher.scrub(),H;if(!H.equals(O))throw this._cipher.scrub(),new Error("data not multiple of block length")},I.prototype.setAutoPadding=function(H){return this._autopadding=!!H,this};function J(){this.cache=Z.allocUnsafe(0)}J.prototype.add=function(H){this.cache=Z.concat([this.cache,H])},J.prototype.get=function(){if(this.cache.length>15){var H=this.cache.slice(0,16);return this.cache=this.cache.slice(16),H}return null},J.prototype.flush=function(){for(var H=16-this.cache.length,W=Z.allocUnsafe(H),E=-1;++E16)return W=this.cache.slice(0,16),this.cache=this.cache.slice(16),W}else if(this.cache.length>=16)return W=this.cache.slice(0,16),this.cache=this.cache.slice(16),W;return null},O.prototype.flush=function(){if(this.cache.length)return this.cache};function J(H){var W=H[15];if(W<1||W>16)throw new Error("unable to decrypt data");for(var E=-1;++E0?j:k},U.min=function(j,k){return j.cmp(k)<0?j:k},U.prototype._init=function(j,k,g){if(typeof j=="number")return this._initNumber(j,k,g);if(typeof j=="object")return this._initArray(j,k,g);k==="hex"&&(k=16),G(k===(k|0)&&k>=2&&k<=36),j=j.toString().replace(/\s+/g,"");var _=0;j[0]==="-"&&(_++,this.negative=1),_=0;_-=3)x=j[_]|j[_-1]<<8|j[_-2]<<16,this.words[N]|=x<>>26-B&67108863,B+=24,B>=26&&(B-=26,N++);else if(g==="le")for(_=0,N=0;_>>26-B&67108863,B+=24,B>=26&&(B-=26,N++);return this.strip()};function K(j,k){var g=j.charCodeAt(k);return g>=65&&g<=70?g-55:g>=97&&g<=102?g-87:g-48&15}function I(j,k,g){var _=K(j,g);return g-1>=k&&(_|=K(j,g-1)<<4),_}U.prototype._parseHex=function(j,k,g){this.length=Math.ceil((j.length-k)/6),this.words=new Array(this.length);for(var _=0;_=k;_-=2)B=I(j,k,_)<=18?(N-=18,x+=1,this.words[x]|=B>>>26):N+=8;else{var y=j.length-k;for(_=y%2===0?k+1:k;_=18?(N-=18,x+=1,this.words[x]|=B>>>26):N+=8}this.strip()};function O(j,k,g,_){for(var N=0,x=Math.min(j.length,g),B=k;B=49?N+=y-49+10:y>=17?N+=y-17+10:N+=y}return N}U.prototype._parseBase=function(j,k,g){this.words=[0],this.length=1;for(var _=0,N=1;N<=67108863;N*=k)_++;_--,N=N/k|0;for(var x=j.length-g,B=x%_,y=Math.min(x,x-B)+g,w=0,p=g;p1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},U.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},U.prototype.inspect=function(){return(this.red?""};var J=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],F=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],A=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64000000,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,24300000,28629151,33554432,39135393,45435424,52521875,60466176];U.prototype.toString=function(j,k){j=j||10,k=k|0||1;var g;if(j===16||j==="hex"){g="";for(var _=0,N=0,x=0;x>>24-_&16777215,N!==0||x!==this.length-1?g=J[6-y.length]+y+g:g=y+g,_+=2,_>=26&&(_-=26,x--)}for(N!==0&&(g=N.toString(16)+g);g.length%k!==0;)g="0"+g;return this.negative!==0&&(g="-"+g),g}if(j===(j|0)&&j>=2&&j<=36){var w=F[j],p=A[j];g="";var f=this.clone();for(f.negative=0;!f.isZero();){var c=f.modn(p).toString(j);f=f.idivn(p),f.isZero()?g=c+g:g=J[w-c.length]+c+g}for(this.isZero()&&(g="0"+g);g.length%k!==0;)g="0"+g;return this.negative!==0&&(g="-"+g),g}G(!1,"Base should be between 2 and 36")},U.prototype.toNumber=function(){var j=this.words[0];return this.length===2?j+=this.words[1]*67108864:this.length===3&&this.words[2]===1?j+=4503599627370496+this.words[1]*67108864:this.length>2&&G(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-j:j},U.prototype.toJSON=function(){return this.toString(16)},U.prototype.toBuffer=function(j,k){return G(typeof X<"u"),this.toArrayLike(X,j,k)},U.prototype.toArray=function(j,k){return this.toArrayLike(Array,j,k)},U.prototype.toArrayLike=function(j,k,g){var _=this.byteLength(),N=g||Math.max(1,_);G(_<=N,"byte array longer than desired length"),G(N>0,"Requested array length <= 0"),this.strip();var x=k==="le",B=new j(N),y,w,p=this.clone();if(x){for(w=0;!p.isZero();w++)y=p.andln(255),p.iushrn(8),B[w]=y;for(;w=4096&&(g+=13,k>>>=13),k>=64&&(g+=7,k>>>=7),k>=8&&(g+=4,k>>>=4),k>=2&&(g+=2,k>>>=2),g+k},U.prototype._zeroBits=function(j){if(j===0)return 26;var k=j,g=0;return(k&8191)===0&&(g+=13,k>>>=13),(k&127)===0&&(g+=7,k>>>=7),(k&15)===0&&(g+=4,k>>>=4),(k&3)===0&&(g+=2,k>>>=2),(k&1)===0&&g++,g},U.prototype.bitLength=function(){var j=this.words[this.length-1],k=this._countBits(j);return(this.length-1)*26+k};function H(j){for(var k=new Array(j.bitLength()),g=0;g>>N}return k}U.prototype.zeroBits=function(){if(this.isZero())return 0;for(var j=0,k=0;kj.length?this.clone().ior(j):j.clone().ior(this)},U.prototype.uor=function(j){return this.length>j.length?this.clone().iuor(j):j.clone().iuor(this)},U.prototype.iuand=function(j){var k;this.length>j.length?k=j:k=this;for(var g=0;gj.length?this.clone().iand(j):j.clone().iand(this)},U.prototype.uand=function(j){return this.length>j.length?this.clone().iuand(j):j.clone().iuand(this)},U.prototype.iuxor=function(j){var k,g;this.length>j.length?(k=this,g=j):(k=j,g=this);for(var _=0;_j.length?this.clone().ixor(j):j.clone().ixor(this)},U.prototype.uxor=function(j){return this.length>j.length?this.clone().iuxor(j):j.clone().iuxor(this)},U.prototype.inotn=function(j){G(typeof j=="number"&&j>=0);var k=Math.ceil(j/26)|0,g=j%26;this._expand(k),g>0&&k--;for(var _=0;_0&&(this.words[_]=~this.words[_]&67108863>>26-g),this.strip()},U.prototype.notn=function(j){return this.clone().inotn(j)},U.prototype.setn=function(j,k){G(typeof j=="number"&&j>=0);var g=j/26|0,_=j%26;return this._expand(g+1),k?this.words[g]=this.words[g]|1<<_:this.words[g]=this.words[g]&~(1<<_),this.strip()},U.prototype.iadd=function(j){var k;if(this.negative!==0&&j.negative===0)return this.negative=0,k=this.isub(j),this.negative^=1,this._normSign();if(this.negative===0&&j.negative!==0)return j.negative=0,k=this.isub(j),j.negative=1,k._normSign();var g,_;this.length>j.length?(g=this,_=j):(g=j,_=this);for(var N=0,x=0;x<_.length;x++)k=(g.words[x]|0)+(_.words[x]|0)+N,this.words[x]=k&67108863,N=k>>>26;for(;N!==0&&x>>26;if(this.length=g.length,N!==0)this.words[this.length]=N,this.length++;else if(g!==this)for(;xj.length?this.clone().iadd(j):j.clone().iadd(this)},U.prototype.isub=function(j){if(j.negative!==0){j.negative=0;var k=this.iadd(j);return j.negative=1,k._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(j),this.negative=1,this._normSign();var g=this.cmp(j);if(g===0)return this.negative=0,this.length=1,this.words[0]=0,this;var _,N;g>0?(_=this,N=j):(_=j,N=this);for(var x=0,B=0;B>26,this.words[B]=k&67108863;for(;x!==0&&B<_.length;B++)k=(_.words[B]|0)+x,x=k>>26,this.words[B]=k&67108863;if(x===0&&B<_.length&&_!==this)for(;B<_.length;B++)this.words[B]=_.words[B];return this.length=Math.max(this.length,B),_!==this&&(this.negative=1),this.strip()},U.prototype.sub=function(j){return this.clone().isub(j)};function W(j,k,g){g.negative=k.negative^j.negative;var _=j.length+k.length|0;g.length=_,_=_-1|0;var N=j.words[0]|0,x=k.words[0]|0,B=N*x,y=B&67108863,w=B/67108864|0;g.words[0]=y;for(var p=1;p<_;p++){for(var f=w>>>26,c=w&67108863,h=Math.min(p,k.length-1),d=Math.max(0,p-j.length+1);d<=h;d++){var b=p-d|0;N=j.words[b]|0,x=k.words[d]|0,B=N*x+c,f+=B/67108864|0,c=B&67108863}g.words[p]=c|0,w=f|0}return w!==0?g.words[p]=w|0:g.length--,g.strip()}var E=function(j,k,g){var _=j.words,N=k.words,x=g.words,B=0,y,w,p,f=_[0]|0,c=f&8191,h=f>>>13,d=_[1]|0,b=d&8191,l=d>>>13,o=_[2]|0,u=o&8191,n=o>>>13,s=_[3]|0,t=s&8191,m=s>>>13,a=_[4]|0,e=a&8191,r=a>>>13,i=_[5]|0,$0=i&8191,Q0=i>>>13,Y0=_[6]|0,Z0=Y0&8191,G0=Y0>>>13,V0=_[7]|0,U0=V0&8191,X0=V0>>>13,K0=_[8]|0,I0=K0&8191,O0=K0>>>13,J0=_[9]|0,F0=J0&8191,A0=J0>>>13,H0=N[0]|0,W0=H0&8191,E0=H0>>>13,T0=N[1]|0,D0=T0&8191,C0=T0>>>13,L0=N[2]|0,R0=L0&8191,P0=L0>>>13,z0=N[3]|0,M0=z0&8191,S0=z0>>>13,v0=N[4]|0,q0=v0&8191,j0=v0>>>13,k0=N[5]|0,g0=k0&8191,_0=k0>>>13,N0=N[6]|0,x0=N0&8191,B0=N0>>>13,y0=N[7]|0,w0=y0&8191,p0=y0>>>13,f0=N[8]|0,c0=f0&8191,h0=f0>>>13,d0=N[9]|0,b0=d0&8191,l0=d0>>>13;g.negative=j.negative^k.negative,g.length=19,y=Math.imul(c,W0),w=Math.imul(c,E0),w=w+Math.imul(h,W0)|0,p=Math.imul(h,E0);var o0=(B+y|0)+((w&8191)<<13)|0;B=(p+(w>>>13)|0)+(o0>>>26)|0,o0&=67108863,y=Math.imul(b,W0),w=Math.imul(b,E0),w=w+Math.imul(l,W0)|0,p=Math.imul(l,E0),y=y+Math.imul(c,D0)|0,w=w+Math.imul(c,C0)|0,w=w+Math.imul(h,D0)|0,p=p+Math.imul(h,C0)|0;var u0=(B+y|0)+((w&8191)<<13)|0;B=(p+(w>>>13)|0)+(u0>>>26)|0,u0&=67108863,y=Math.imul(u,W0),w=Math.imul(u,E0),w=w+Math.imul(n,W0)|0,p=Math.imul(n,E0),y=y+Math.imul(b,D0)|0,w=w+Math.imul(b,C0)|0,w=w+Math.imul(l,D0)|0,p=p+Math.imul(l,C0)|0,y=y+Math.imul(c,R0)|0,w=w+Math.imul(c,P0)|0,w=w+Math.imul(h,R0)|0,p=p+Math.imul(h,P0)|0;var n0=(B+y|0)+((w&8191)<<13)|0;B=(p+(w>>>13)|0)+(n0>>>26)|0,n0&=67108863,y=Math.imul(t,W0),w=Math.imul(t,E0),w=w+Math.imul(m,W0)|0,p=Math.imul(m,E0),y=y+Math.imul(u,D0)|0,w=w+Math.imul(u,C0)|0,w=w+Math.imul(n,D0)|0,p=p+Math.imul(n,C0)|0,y=y+Math.imul(b,R0)|0,w=w+Math.imul(b,P0)|0,w=w+Math.imul(l,R0)|0,p=p+Math.imul(l,P0)|0,y=y+Math.imul(c,M0)|0,w=w+Math.imul(c,S0)|0,w=w+Math.imul(h,M0)|0,p=p+Math.imul(h,S0)|0;var s0=(B+y|0)+((w&8191)<<13)|0;B=(p+(w>>>13)|0)+(s0>>>26)|0,s0&=67108863,y=Math.imul(e,W0),w=Math.imul(e,E0),w=w+Math.imul(r,W0)|0,p=Math.imul(r,E0),y=y+Math.imul(t,D0)|0,w=w+Math.imul(t,C0)|0,w=w+Math.imul(m,D0)|0,p=p+Math.imul(m,C0)|0,y=y+Math.imul(u,R0)|0,w=w+Math.imul(u,P0)|0,w=w+Math.imul(n,R0)|0,p=p+Math.imul(n,P0)|0,y=y+Math.imul(b,M0)|0,w=w+Math.imul(b,S0)|0,w=w+Math.imul(l,M0)|0,p=p+Math.imul(l,S0)|0,y=y+Math.imul(c,q0)|0,w=w+Math.imul(c,j0)|0,w=w+Math.imul(h,q0)|0,p=p+Math.imul(h,j0)|0;var t0=(B+y|0)+((w&8191)<<13)|0;B=(p+(w>>>13)|0)+(t0>>>26)|0,t0&=67108863,y=Math.imul($0,W0),w=Math.imul($0,E0),w=w+Math.imul(Q0,W0)|0,p=Math.imul(Q0,E0),y=y+Math.imul(e,D0)|0,w=w+Math.imul(e,C0)|0,w=w+Math.imul(r,D0)|0,p=p+Math.imul(r,C0)|0,y=y+Math.imul(t,R0)|0,w=w+Math.imul(t,P0)|0,w=w+Math.imul(m,R0)|0,p=p+Math.imul(m,P0)|0,y=y+Math.imul(u,M0)|0,w=w+Math.imul(u,S0)|0,w=w+Math.imul(n,M0)|0,p=p+Math.imul(n,S0)|0,y=y+Math.imul(b,q0)|0,w=w+Math.imul(b,j0)|0,w=w+Math.imul(l,q0)|0,p=p+Math.imul(l,j0)|0,y=y+Math.imul(c,g0)|0,w=w+Math.imul(c,_0)|0,w=w+Math.imul(h,g0)|0,p=p+Math.imul(h,_0)|0;var m0=(B+y|0)+((w&8191)<<13)|0;B=(p+(w>>>13)|0)+(m0>>>26)|0,m0&=67108863,y=Math.imul(Z0,W0),w=Math.imul(Z0,E0),w=w+Math.imul(G0,W0)|0,p=Math.imul(G0,E0),y=y+Math.imul($0,D0)|0,w=w+Math.imul($0,C0)|0,w=w+Math.imul(Q0,D0)|0,p=p+Math.imul(Q0,C0)|0,y=y+Math.imul(e,R0)|0,w=w+Math.imul(e,P0)|0,w=w+Math.imul(r,R0)|0,p=p+Math.imul(r,P0)|0,y=y+Math.imul(t,M0)|0,w=w+Math.imul(t,S0)|0,w=w+Math.imul(m,M0)|0,p=p+Math.imul(m,S0)|0,y=y+Math.imul(u,q0)|0,w=w+Math.imul(u,j0)|0,w=w+Math.imul(n,q0)|0,p=p+Math.imul(n,j0)|0,y=y+Math.imul(b,g0)|0,w=w+Math.imul(b,_0)|0,w=w+Math.imul(l,g0)|0,p=p+Math.imul(l,_0)|0,y=y+Math.imul(c,x0)|0,w=w+Math.imul(c,B0)|0,w=w+Math.imul(h,x0)|0,p=p+Math.imul(h,B0)|0;var a0=(B+y|0)+((w&8191)<<13)|0;B=(p+(w>>>13)|0)+(a0>>>26)|0,a0&=67108863,y=Math.imul(U0,W0),w=Math.imul(U0,E0),w=w+Math.imul(X0,W0)|0,p=Math.imul(X0,E0),y=y+Math.imul(Z0,D0)|0,w=w+Math.imul(Z0,C0)|0,w=w+Math.imul(G0,D0)|0,p=p+Math.imul(G0,C0)|0,y=y+Math.imul($0,R0)|0,w=w+Math.imul($0,P0)|0,w=w+Math.imul(Q0,R0)|0,p=p+Math.imul(Q0,P0)|0,y=y+Math.imul(e,M0)|0,w=w+Math.imul(e,S0)|0,w=w+Math.imul(r,M0)|0,p=p+Math.imul(r,S0)|0,y=y+Math.imul(t,q0)|0,w=w+Math.imul(t,j0)|0,w=w+Math.imul(m,q0)|0,p=p+Math.imul(m,j0)|0,y=y+Math.imul(u,g0)|0,w=w+Math.imul(u,_0)|0,w=w+Math.imul(n,g0)|0,p=p+Math.imul(n,_0)|0,y=y+Math.imul(b,x0)|0,w=w+Math.imul(b,B0)|0,w=w+Math.imul(l,x0)|0,p=p+Math.imul(l,B0)|0,y=y+Math.imul(c,w0)|0,w=w+Math.imul(c,p0)|0,w=w+Math.imul(h,w0)|0,p=p+Math.imul(h,p0)|0;var e0=(B+y|0)+((w&8191)<<13)|0;B=(p+(w>>>13)|0)+(e0>>>26)|0,e0&=67108863,y=Math.imul(I0,W0),w=Math.imul(I0,E0),w=w+Math.imul(O0,W0)|0,p=Math.imul(O0,E0),y=y+Math.imul(U0,D0)|0,w=w+Math.imul(U0,C0)|0,w=w+Math.imul(X0,D0)|0,p=p+Math.imul(X0,C0)|0,y=y+Math.imul(Z0,R0)|0,w=w+Math.imul(Z0,P0)|0,w=w+Math.imul(G0,R0)|0,p=p+Math.imul(G0,P0)|0,y=y+Math.imul($0,M0)|0,w=w+Math.imul($0,S0)|0,w=w+Math.imul(Q0,M0)|0,p=p+Math.imul(Q0,S0)|0,y=y+Math.imul(e,q0)|0,w=w+Math.imul(e,j0)|0,w=w+Math.imul(r,q0)|0,p=p+Math.imul(r,j0)|0,y=y+Math.imul(t,g0)|0,w=w+Math.imul(t,_0)|0,w=w+Math.imul(m,g0)|0,p=p+Math.imul(m,_0)|0,y=y+Math.imul(u,x0)|0,w=w+Math.imul(u,B0)|0,w=w+Math.imul(n,x0)|0,p=p+Math.imul(n,B0)|0,y=y+Math.imul(b,w0)|0,w=w+Math.imul(b,p0)|0,w=w+Math.imul(l,w0)|0,p=p+Math.imul(l,p0)|0,y=y+Math.imul(c,c0)|0,w=w+Math.imul(c,h0)|0,w=w+Math.imul(h,c0)|0,p=p+Math.imul(h,h0)|0;var r0=(B+y|0)+((w&8191)<<13)|0;B=(p+(w>>>13)|0)+(r0>>>26)|0,r0&=67108863,y=Math.imul(F0,W0),w=Math.imul(F0,E0),w=w+Math.imul(A0,W0)|0,p=Math.imul(A0,E0),y=y+Math.imul(I0,D0)|0,w=w+Math.imul(I0,C0)|0,w=w+Math.imul(O0,D0)|0,p=p+Math.imul(O0,C0)|0,y=y+Math.imul(U0,R0)|0,w=w+Math.imul(U0,P0)|0,w=w+Math.imul(X0,R0)|0,p=p+Math.imul(X0,P0)|0,y=y+Math.imul(Z0,M0)|0,w=w+Math.imul(Z0,S0)|0,w=w+Math.imul(G0,M0)|0,p=p+Math.imul(G0,S0)|0,y=y+Math.imul($0,q0)|0,w=w+Math.imul($0,j0)|0,w=w+Math.imul(Q0,q0)|0,p=p+Math.imul(Q0,j0)|0,y=y+Math.imul(e,g0)|0,w=w+Math.imul(e,_0)|0,w=w+Math.imul(r,g0)|0,p=p+Math.imul(r,_0)|0,y=y+Math.imul(t,x0)|0,w=w+Math.imul(t,B0)|0,w=w+Math.imul(m,x0)|0,p=p+Math.imul(m,B0)|0,y=y+Math.imul(u,w0)|0,w=w+Math.imul(u,p0)|0,w=w+Math.imul(n,w0)|0,p=p+Math.imul(n,p0)|0,y=y+Math.imul(b,c0)|0,w=w+Math.imul(b,h0)|0,w=w+Math.imul(l,c0)|0,p=p+Math.imul(l,h0)|0,y=y+Math.imul(c,b0)|0,w=w+Math.imul(c,l0)|0,w=w+Math.imul(h,b0)|0,p=p+Math.imul(h,l0)|0;var i0=(B+y|0)+((w&8191)<<13)|0;B=(p+(w>>>13)|0)+(i0>>>26)|0,i0&=67108863,y=Math.imul(F0,D0),w=Math.imul(F0,C0),w=w+Math.imul(A0,D0)|0,p=Math.imul(A0,C0),y=y+Math.imul(I0,R0)|0,w=w+Math.imul(I0,P0)|0,w=w+Math.imul(O0,R0)|0,p=p+Math.imul(O0,P0)|0,y=y+Math.imul(U0,M0)|0,w=w+Math.imul(U0,S0)|0,w=w+Math.imul(X0,M0)|0,p=p+Math.imul(X0,S0)|0,y=y+Math.imul(Z0,q0)|0,w=w+Math.imul(Z0,j0)|0,w=w+Math.imul(G0,q0)|0,p=p+Math.imul(G0,j0)|0,y=y+Math.imul($0,g0)|0,w=w+Math.imul($0,_0)|0,w=w+Math.imul(Q0,g0)|0,p=p+Math.imul(Q0,_0)|0,y=y+Math.imul(e,x0)|0,w=w+Math.imul(e,B0)|0,w=w+Math.imul(r,x0)|0,p=p+Math.imul(r,B0)|0,y=y+Math.imul(t,w0)|0,w=w+Math.imul(t,p0)|0,w=w+Math.imul(m,w0)|0,p=p+Math.imul(m,p0)|0,y=y+Math.imul(u,c0)|0,w=w+Math.imul(u,h0)|0,w=w+Math.imul(n,c0)|0,p=p+Math.imul(n,h0)|0,y=y+Math.imul(b,b0)|0,w=w+Math.imul(b,l0)|0,w=w+Math.imul(l,b0)|0,p=p+Math.imul(l,l0)|0;var $$=(B+y|0)+((w&8191)<<13)|0;B=(p+(w>>>13)|0)+($$>>>26)|0,$$&=67108863,y=Math.imul(F0,R0),w=Math.imul(F0,P0),w=w+Math.imul(A0,R0)|0,p=Math.imul(A0,P0),y=y+Math.imul(I0,M0)|0,w=w+Math.imul(I0,S0)|0,w=w+Math.imul(O0,M0)|0,p=p+Math.imul(O0,S0)|0,y=y+Math.imul(U0,q0)|0,w=w+Math.imul(U0,j0)|0,w=w+Math.imul(X0,q0)|0,p=p+Math.imul(X0,j0)|0,y=y+Math.imul(Z0,g0)|0,w=w+Math.imul(Z0,_0)|0,w=w+Math.imul(G0,g0)|0,p=p+Math.imul(G0,_0)|0,y=y+Math.imul($0,x0)|0,w=w+Math.imul($0,B0)|0,w=w+Math.imul(Q0,x0)|0,p=p+Math.imul(Q0,B0)|0,y=y+Math.imul(e,w0)|0,w=w+Math.imul(e,p0)|0,w=w+Math.imul(r,w0)|0,p=p+Math.imul(r,p0)|0,y=y+Math.imul(t,c0)|0,w=w+Math.imul(t,h0)|0,w=w+Math.imul(m,c0)|0,p=p+Math.imul(m,h0)|0,y=y+Math.imul(u,b0)|0,w=w+Math.imul(u,l0)|0,w=w+Math.imul(n,b0)|0,p=p+Math.imul(n,l0)|0;var Q$=(B+y|0)+((w&8191)<<13)|0;B=(p+(w>>>13)|0)+(Q$>>>26)|0,Q$&=67108863,y=Math.imul(F0,M0),w=Math.imul(F0,S0),w=w+Math.imul(A0,M0)|0,p=Math.imul(A0,S0),y=y+Math.imul(I0,q0)|0,w=w+Math.imul(I0,j0)|0,w=w+Math.imul(O0,q0)|0,p=p+Math.imul(O0,j0)|0,y=y+Math.imul(U0,g0)|0,w=w+Math.imul(U0,_0)|0,w=w+Math.imul(X0,g0)|0,p=p+Math.imul(X0,_0)|0,y=y+Math.imul(Z0,x0)|0,w=w+Math.imul(Z0,B0)|0,w=w+Math.imul(G0,x0)|0,p=p+Math.imul(G0,B0)|0,y=y+Math.imul($0,w0)|0,w=w+Math.imul($0,p0)|0,w=w+Math.imul(Q0,w0)|0,p=p+Math.imul(Q0,p0)|0,y=y+Math.imul(e,c0)|0,w=w+Math.imul(e,h0)|0,w=w+Math.imul(r,c0)|0,p=p+Math.imul(r,h0)|0,y=y+Math.imul(t,b0)|0,w=w+Math.imul(t,l0)|0,w=w+Math.imul(m,b0)|0,p=p+Math.imul(m,l0)|0;var Y$=(B+y|0)+((w&8191)<<13)|0;B=(p+(w>>>13)|0)+(Y$>>>26)|0,Y$&=67108863,y=Math.imul(F0,q0),w=Math.imul(F0,j0),w=w+Math.imul(A0,q0)|0,p=Math.imul(A0,j0),y=y+Math.imul(I0,g0)|0,w=w+Math.imul(I0,_0)|0,w=w+Math.imul(O0,g0)|0,p=p+Math.imul(O0,_0)|0,y=y+Math.imul(U0,x0)|0,w=w+Math.imul(U0,B0)|0,w=w+Math.imul(X0,x0)|0,p=p+Math.imul(X0,B0)|0,y=y+Math.imul(Z0,w0)|0,w=w+Math.imul(Z0,p0)|0,w=w+Math.imul(G0,w0)|0,p=p+Math.imul(G0,p0)|0,y=y+Math.imul($0,c0)|0,w=w+Math.imul($0,h0)|0,w=w+Math.imul(Q0,c0)|0,p=p+Math.imul(Q0,h0)|0,y=y+Math.imul(e,b0)|0,w=w+Math.imul(e,l0)|0,w=w+Math.imul(r,b0)|0,p=p+Math.imul(r,l0)|0;var Z$=(B+y|0)+((w&8191)<<13)|0;B=(p+(w>>>13)|0)+(Z$>>>26)|0,Z$&=67108863,y=Math.imul(F0,g0),w=Math.imul(F0,_0),w=w+Math.imul(A0,g0)|0,p=Math.imul(A0,_0),y=y+Math.imul(I0,x0)|0,w=w+Math.imul(I0,B0)|0,w=w+Math.imul(O0,x0)|0,p=p+Math.imul(O0,B0)|0,y=y+Math.imul(U0,w0)|0,w=w+Math.imul(U0,p0)|0,w=w+Math.imul(X0,w0)|0,p=p+Math.imul(X0,p0)|0,y=y+Math.imul(Z0,c0)|0,w=w+Math.imul(Z0,h0)|0,w=w+Math.imul(G0,c0)|0,p=p+Math.imul(G0,h0)|0,y=y+Math.imul($0,b0)|0,w=w+Math.imul($0,l0)|0,w=w+Math.imul(Q0,b0)|0,p=p+Math.imul(Q0,l0)|0;var G$=(B+y|0)+((w&8191)<<13)|0;B=(p+(w>>>13)|0)+(G$>>>26)|0,G$&=67108863,y=Math.imul(F0,x0),w=Math.imul(F0,B0),w=w+Math.imul(A0,x0)|0,p=Math.imul(A0,B0),y=y+Math.imul(I0,w0)|0,w=w+Math.imul(I0,p0)|0,w=w+Math.imul(O0,w0)|0,p=p+Math.imul(O0,p0)|0,y=y+Math.imul(U0,c0)|0,w=w+Math.imul(U0,h0)|0,w=w+Math.imul(X0,c0)|0,p=p+Math.imul(X0,h0)|0,y=y+Math.imul(Z0,b0)|0,w=w+Math.imul(Z0,l0)|0,w=w+Math.imul(G0,b0)|0,p=p+Math.imul(G0,l0)|0;var V$=(B+y|0)+((w&8191)<<13)|0;B=(p+(w>>>13)|0)+(V$>>>26)|0,V$&=67108863,y=Math.imul(F0,w0),w=Math.imul(F0,p0),w=w+Math.imul(A0,w0)|0,p=Math.imul(A0,p0),y=y+Math.imul(I0,c0)|0,w=w+Math.imul(I0,h0)|0,w=w+Math.imul(O0,c0)|0,p=p+Math.imul(O0,h0)|0,y=y+Math.imul(U0,b0)|0,w=w+Math.imul(U0,l0)|0,w=w+Math.imul(X0,b0)|0,p=p+Math.imul(X0,l0)|0;var U$=(B+y|0)+((w&8191)<<13)|0;B=(p+(w>>>13)|0)+(U$>>>26)|0,U$&=67108863,y=Math.imul(F0,c0),w=Math.imul(F0,h0),w=w+Math.imul(A0,c0)|0,p=Math.imul(A0,h0),y=y+Math.imul(I0,b0)|0,w=w+Math.imul(I0,l0)|0,w=w+Math.imul(O0,b0)|0,p=p+Math.imul(O0,l0)|0;var X$=(B+y|0)+((w&8191)<<13)|0;B=(p+(w>>>13)|0)+(X$>>>26)|0,X$&=67108863,y=Math.imul(F0,b0),w=Math.imul(F0,l0),w=w+Math.imul(A0,b0)|0,p=Math.imul(A0,l0);var K$=(B+y|0)+((w&8191)<<13)|0;return B=(p+(w>>>13)|0)+(K$>>>26)|0,K$&=67108863,x[0]=o0,x[1]=u0,x[2]=n0,x[3]=s0,x[4]=t0,x[5]=m0,x[6]=a0,x[7]=e0,x[8]=r0,x[9]=i0,x[10]=$$,x[11]=Q$,x[12]=Y$,x[13]=Z$,x[14]=G$,x[15]=V$,x[16]=U$,x[17]=X$,x[18]=K$,B!==0&&(x[19]=B,g.length++),g};Math.imul||(E=W);function T(j,k,g){g.negative=k.negative^j.negative,g.length=j.length+k.length;for(var _=0,N=0,x=0;x>>26)|0,N+=B>>>26,B&=67108863}g.words[x]=y,_=B,B=N}return _!==0?g.words[x]=_:g.length--,g.strip()}function D(j,k,g){var _=new C;return _.mulp(j,k,g)}U.prototype.mulTo=function(j,k){var g,_=this.length+j.length;return this.length===10&&j.length===10?g=E(this,j,k):_<63?g=W(this,j,k):_<1024?g=T(this,j,k):g=D(this,j,k),g};function C(j,k){this.x=j,this.y=k}C.prototype.makeRBT=function(j){for(var k=new Array(j),g=U.prototype._countBits(j)-1,_=0;_>=1;return _},C.prototype.permute=function(j,k,g,_,N,x){for(var B=0;B>>1)N++;return 1<>>13,g[2*x+1]=N&8191,N=N>>>13;for(x=2*k;x<_;++x)g[x]=0;G(N===0),G((N&-8192)===0)},C.prototype.stub=function(j){for(var k=new Array(j),g=0;g>=26,k+=_/67108864|0,k+=N>>>26,this.words[g]=N&67108863}return k!==0&&(this.words[g]=k,this.length++),this},U.prototype.muln=function(j){return this.clone().imuln(j)},U.prototype.sqr=function(){return this.mul(this)},U.prototype.isqr=function(){return this.imul(this.clone())},U.prototype.pow=function(j){var k=H(j);if(k.length===0)return new U(1);for(var g=this,_=0;_=0);var k=j%26,g=(j-k)/26,_=67108863>>>26-k<<26-k,N;if(k!==0){var x=0;for(N=0;N>>26-k}x&&(this.words[N]=x,this.length++)}if(g!==0){for(N=this.length-1;N>=0;N--)this.words[N+g]=this.words[N];for(N=0;N=0);var _;k?_=(k-k%26)/26:_=0;var N=j%26,x=Math.min((j-N)/26,this.length),B=67108863^67108863>>>N<x)for(this.length-=x,w=0;w=0&&(p!==0||w>=_);w--){var f=this.words[w]|0;this.words[w]=p<<26-N|f>>>N,p=f&B}return y&&p!==0&&(y.words[y.length++]=p),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},U.prototype.ishrn=function(j,k,g){return G(this.negative===0),this.iushrn(j,k,g)},U.prototype.shln=function(j){return this.clone().ishln(j)},U.prototype.ushln=function(j){return this.clone().iushln(j)},U.prototype.shrn=function(j){return this.clone().ishrn(j)},U.prototype.ushrn=function(j){return this.clone().iushrn(j)},U.prototype.testn=function(j){G(typeof j=="number"&&j>=0);var k=j%26,g=(j-k)/26,_=1<=0);var k=j%26,g=(j-k)/26;if(G(this.negative===0,"imaskn works only with positive numbers"),this.length<=g)return this;if(k!==0&&g++,this.length=Math.min(g,this.length),k!==0){var _=67108863^67108863>>>k<=67108864;k++)this.words[k]-=67108864,k===this.length-1?this.words[k+1]=1:this.words[k+1]++;return this.length=Math.max(this.length,k+1),this},U.prototype.isubn=function(j){if(G(typeof j=="number"),G(j<67108864),j<0)return this.iaddn(-j);if(this.negative!==0)return this.negative=0,this.iaddn(j),this.negative=1,this;if(this.words[0]-=j,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var k=0;k>26)-(y/67108864|0),this.words[N+g]=x&67108863}for(;N>26,this.words[N+g]=x&67108863;if(B===0)return this.strip();for(G(B===-1),B=0,N=0;N>26,this.words[N]=x&67108863;return this.negative=1,this.strip()},U.prototype._wordDiv=function(j,k){var g=this.length-j.length,_=this.clone(),N=j,x=N.words[N.length-1]|0,B=this._countBits(x);g=26-B,g!==0&&(N=N.ushln(g),_.iushln(g),x=N.words[N.length-1]|0);var y=_.length-N.length,w;if(k!=="mod"){w=new U(null),w.length=y+1,w.words=new Array(w.length);for(var p=0;p=0;c--){var h=(_.words[N.length+c]|0)*67108864+(_.words[N.length+c-1]|0);for(h=Math.min(h/x|0,67108863),_._ishlnsubmul(N,h,c);_.negative!==0;)h--,_.negative=0,_._ishlnsubmul(N,1,c),_.isZero()||(_.negative^=1);w&&(w.words[c]=h)}return w&&w.strip(),_.strip(),k!=="div"&&g!==0&&_.iushrn(g),{div:w||null,mod:_}},U.prototype.divmod=function(j,k,g){if(G(!j.isZero()),this.isZero())return{div:new U(0),mod:new U(0)};var _,N,x;return this.negative!==0&&j.negative===0?(x=this.neg().divmod(j,k),k!=="mod"&&(_=x.div.neg()),k!=="div"&&(N=x.mod.neg(),g&&N.negative!==0&&N.iadd(j)),{div:_,mod:N}):this.negative===0&&j.negative!==0?(x=this.divmod(j.neg(),k),k!=="mod"&&(_=x.div.neg()),{div:_,mod:x.mod}):(this.negative&j.negative)!==0?(x=this.neg().divmod(j.neg(),k),k!=="div"&&(N=x.mod.neg(),g&&N.negative!==0&&N.isub(j)),{div:x.div,mod:N}):j.length>this.length||this.cmp(j)<0?{div:new U(0),mod:this}:j.length===1?k==="div"?{div:this.divn(j.words[0]),mod:null}:k==="mod"?{div:null,mod:new U(this.modn(j.words[0]))}:{div:this.divn(j.words[0]),mod:new U(this.modn(j.words[0]))}:this._wordDiv(j,k)},U.prototype.div=function(j){return this.divmod(j,"div",!1).div},U.prototype.mod=function(j){return this.divmod(j,"mod",!1).mod},U.prototype.umod=function(j){return this.divmod(j,"mod",!0).mod},U.prototype.divRound=function(j){var k=this.divmod(j);if(k.mod.isZero())return k.div;var g=k.div.negative!==0?k.mod.isub(j):k.mod,_=j.ushrn(1),N=j.andln(1),x=g.cmp(_);return x<0||N===1&&x===0?k.div:k.div.negative!==0?k.div.isubn(1):k.div.iaddn(1)},U.prototype.modn=function(j){G(j<=67108863);for(var k=(1<<26)%j,g=0,_=this.length-1;_>=0;_--)g=(k*g+(this.words[_]|0))%j;return g},U.prototype.idivn=function(j){G(j<=67108863);for(var k=0,g=this.length-1;g>=0;g--){var _=(this.words[g]|0)+k*67108864;this.words[g]=_/j|0,k=_%j}return this.strip()},U.prototype.divn=function(j){return this.clone().idivn(j)},U.prototype.egcd=function(j){G(j.negative===0),G(!j.isZero());var k=this,g=j.clone();k.negative!==0?k=k.umod(j):k=k.clone();for(var _=new U(1),N=new U(0),x=new U(0),B=new U(1),y=0;k.isEven()&&g.isEven();)k.iushrn(1),g.iushrn(1),++y;for(var w=g.clone(),p=k.clone();!k.isZero();){for(var f=0,c=1;(k.words[0]&c)===0&&f<26;++f,c<<=1);if(f>0)for(k.iushrn(f);f-- >0;)(_.isOdd()||N.isOdd())&&(_.iadd(w),N.isub(p)),_.iushrn(1),N.iushrn(1);for(var h=0,d=1;(g.words[0]&d)===0&&h<26;++h,d<<=1);if(h>0)for(g.iushrn(h);h-- >0;)(x.isOdd()||B.isOdd())&&(x.iadd(w),B.isub(p)),x.iushrn(1),B.iushrn(1);k.cmp(g)>=0?(k.isub(g),_.isub(x),N.isub(B)):(g.isub(k),x.isub(_),B.isub(N))}return{a:x,b:B,gcd:g.iushln(y)}},U.prototype._invmp=function(j){G(j.negative===0),G(!j.isZero());var k=this,g=j.clone();k.negative!==0?k=k.umod(j):k=k.clone();for(var _=new U(1),N=new U(0),x=g.clone();k.cmpn(1)>0&&g.cmpn(1)>0;){for(var B=0,y=1;(k.words[0]&y)===0&&B<26;++B,y<<=1);if(B>0)for(k.iushrn(B);B-- >0;)_.isOdd()&&_.iadd(x),_.iushrn(1);for(var w=0,p=1;(g.words[0]&p)===0&&w<26;++w,p<<=1);if(w>0)for(g.iushrn(w);w-- >0;)N.isOdd()&&N.iadd(x),N.iushrn(1);k.cmp(g)>=0?(k.isub(g),_.isub(N)):(g.isub(k),N.isub(_))}var f;return k.cmpn(1)===0?f=_:f=N,f.cmpn(0)<0&&f.iadd(j),f},U.prototype.gcd=function(j){if(this.isZero())return j.abs();if(j.isZero())return this.abs();var k=this.clone(),g=j.clone();k.negative=0,g.negative=0;for(var _=0;k.isEven()&&g.isEven();_++)k.iushrn(1),g.iushrn(1);do{for(;k.isEven();)k.iushrn(1);for(;g.isEven();)g.iushrn(1);var N=k.cmp(g);if(N<0){var x=k;k=g,g=x}else if(N===0||g.cmpn(1)===0)break;k.isub(g)}while(!0);return g.iushln(_)},U.prototype.invm=function(j){return this.egcd(j).a.umod(j)},U.prototype.isEven=function(){return(this.words[0]&1)===0},U.prototype.isOdd=function(){return(this.words[0]&1)===1},U.prototype.andln=function(j){return this.words[0]&j},U.prototype.bincn=function(j){G(typeof j=="number");var k=j%26,g=(j-k)/26,_=1<>>26,B&=67108863,this.words[x]=B}return N!==0&&(this.words[x]=N,this.length++),this},U.prototype.isZero=function(){return this.length===1&&this.words[0]===0},U.prototype.cmpn=function(j){var k=j<0;if(this.negative!==0&&!k)return-1;if(this.negative===0&&k)return 1;this.strip();var g;if(this.length>1)g=1;else{k&&(j=-j),G(j<=67108863,"Number is too big");var _=this.words[0]|0;g=_===j?0:_j.length)return 1;if(this.length=0;g--){var _=this.words[g]|0,N=j.words[g]|0;if(_!==N){_N&&(k=1);break}}return k},U.prototype.gtn=function(j){return this.cmpn(j)===1},U.prototype.gt=function(j){return this.cmp(j)===1},U.prototype.gten=function(j){return this.cmpn(j)>=0},U.prototype.gte=function(j){return this.cmp(j)>=0},U.prototype.ltn=function(j){return this.cmpn(j)===-1},U.prototype.lt=function(j){return this.cmp(j)===-1},U.prototype.lten=function(j){return this.cmpn(j)<=0},U.prototype.lte=function(j){return this.cmp(j)<=0},U.prototype.eqn=function(j){return this.cmpn(j)===0},U.prototype.eq=function(j){return this.cmp(j)===0},U.red=function(j){return new v(j)},U.prototype.toRed=function(j){return G(!this.red,"Already a number in reduction context"),G(this.negative===0,"red works only with positives"),j.convertTo(this)._forceRed(j)},U.prototype.fromRed=function(){return G(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},U.prototype._forceRed=function(j){return this.red=j,this},U.prototype.forceRed=function(j){return G(!this.red,"Already a number in reduction context"),this._forceRed(j)},U.prototype.redAdd=function(j){return G(this.red,"redAdd works only with red numbers"),this.red.add(this,j)},U.prototype.redIAdd=function(j){return G(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,j)},U.prototype.redSub=function(j){return G(this.red,"redSub works only with red numbers"),this.red.sub(this,j)},U.prototype.redISub=function(j){return G(this.red,"redISub works only with red numbers"),this.red.isub(this,j)},U.prototype.redShl=function(j){return G(this.red,"redShl works only with red numbers"),this.red.shl(this,j)},U.prototype.redMul=function(j){return G(this.red,"redMul works only with red numbers"),this.red._verify2(this,j),this.red.mul(this,j)},U.prototype.redIMul=function(j){return G(this.red,"redMul works only with red numbers"),this.red._verify2(this,j),this.red.imul(this,j)},U.prototype.redSqr=function(){return G(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},U.prototype.redISqr=function(){return G(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},U.prototype.redSqrt=function(){return G(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},U.prototype.redInvm=function(){return G(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},U.prototype.redNeg=function(){return G(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},U.prototype.redPow=function(j){return G(this.red&&!j.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,j)};var L={k256:null,p224:null,p192:null,p25519:null};function R(j,k){this.name=j,this.p=new U(k,16),this.n=this.p.bitLength(),this.k=new U(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}R.prototype._tmp=function(){var j=new U(null);return j.words=new Array(Math.ceil(this.n/13)),j},R.prototype.ireduce=function(j){var k=j,g;do this.split(k,this.tmp),k=this.imulK(k),k=k.iadd(this.tmp),g=k.bitLength();while(g>this.n);var _=g0?k.isub(this.p):k.strip!==void 0?k.strip():k._strip(),k},R.prototype.split=function(j,k){j.iushrn(this.n,0,k)},R.prototype.imulK=function(j){return j.imul(this.k)};function P(){R.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}V(P,R),P.prototype.split=function(j,k){for(var g=4194303,_=Math.min(j.length,9),N=0;N<_;N++)k.words[N]=j.words[N];if(k.length=_,j.length<=9){j.words[0]=0,j.length=1;return}var x=j.words[9];for(k.words[k.length++]=x&g,N=10;N>>22,x=B}x>>>=22,j.words[N-10]=x,x===0&&j.length>10?j.length-=10:j.length-=9},P.prototype.imulK=function(j){j.words[j.length]=0,j.words[j.length+1]=0,j.length+=2;for(var k=0,g=0;g>>=26,j.words[g]=N,k=_}return k!==0&&(j.words[j.length++]=k),j},U._prime=function(j){if(L[j])return L[j];var k;if(j==="k256")k=new P;else if(j==="p224")k=new z;else if(j==="p192")k=new M;else if(j==="p25519")k=new S;else throw new Error("Unknown prime "+j);return L[j]=k,k};function v(j){if(typeof j=="string"){var k=U._prime(j);this.m=k.p,this.prime=k}else G(j.gtn(1),"modulus must be greater than 1"),this.m=j,this.prime=null}v.prototype._verify1=function(j){G(j.negative===0,"red works only with positives"),G(j.red,"red works only with red numbers")},v.prototype._verify2=function(j,k){G((j.negative|k.negative)===0,"red works only with positives"),G(j.red&&j.red===k.red,"red works only with red numbers")},v.prototype.imod=function(j){return this.prime?this.prime.ireduce(j)._forceRed(this):j.umod(this.m)._forceRed(this)},v.prototype.neg=function(j){return j.isZero()?j.clone():this.m.sub(j)._forceRed(this)},v.prototype.add=function(j,k){this._verify2(j,k);var g=j.add(k);return g.cmp(this.m)>=0&&g.isub(this.m),g._forceRed(this)},v.prototype.iadd=function(j,k){this._verify2(j,k);var g=j.iadd(k);return g.cmp(this.m)>=0&&g.isub(this.m),g},v.prototype.sub=function(j,k){this._verify2(j,k);var g=j.sub(k);return g.cmpn(0)<0&&g.iadd(this.m),g._forceRed(this)},v.prototype.isub=function(j,k){this._verify2(j,k);var g=j.isub(k);return g.cmpn(0)<0&&g.iadd(this.m),g},v.prototype.shl=function(j,k){return this._verify1(j),this.imod(j.ushln(k))},v.prototype.imul=function(j,k){return this._verify2(j,k),this.imod(j.imul(k))},v.prototype.mul=function(j,k){return this._verify2(j,k),this.imod(j.mul(k))},v.prototype.isqr=function(j){return this.imul(j,j.clone())},v.prototype.sqr=function(j){return this.mul(j,j)},v.prototype.sqrt=function(j){if(j.isZero())return j.clone();var k=this.m.andln(3);if(G(k%2===1),k===3){var g=this.m.add(new U(1)).iushrn(2);return this.pow(j,g)}for(var _=this.m.subn(1),N=0;!_.isZero()&&_.andln(1)===0;)N++,_.iushrn(1);G(!_.isZero());var x=new U(1).toRed(this),B=x.redNeg(),y=this.m.subn(1).iushrn(1),w=this.m.bitLength();for(w=new U(2*w*w).toRed(this);this.pow(w,y).cmp(B)!==0;)w.redIAdd(B);for(var p=this.pow(w,_),f=this.pow(j,_.addn(1).iushrn(1)),c=this.pow(j,_),h=N;c.cmp(x)!==0;){for(var d=c,b=0;d.cmp(x)!==0;b++)d=d.redSqr();G(b=0;N--){for(var p=k.words[N],f=w-1;f>=0;f--){var c=p>>f&1;if(x!==_[0]&&(x=this.sqr(x)),c===0&&B===0){y=0;continue}B<<=1,B|=c,y++,!(y!==g&&(N!==0||f!==0))&&(x=this.mul(x,_[B]),y=0,B=0)}w=26}return x},v.prototype.convertTo=function(j){var k=j.umod(this.m);return k===j?k.clone():k},v.prototype.convertFrom=function(j){var k=j.clone();return k.red=null,k},U.mont=function(j){return new q(j)};function q(j){v.call(this,j),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new U(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}V(q,v),q.prototype.convertTo=function(j){return this.imod(j.ushln(this.shift))},q.prototype.convertFrom=function(j){var k=this.imod(j.mul(this.rinv));return k.red=null,k},q.prototype.imul=function(j,k){if(j.isZero()||k.isZero())return j.words[0]=0,j.length=1,j;var g=j.imul(k),_=g.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),N=g.isub(_).iushrn(this.shift),x=N;return N.cmp(this.m)>=0?x=N.isub(this.m):N.cmpn(0)<0&&(x=N.iadd(this.m)),x._forceRed(this)},q.prototype.mul=function(j,k){if(j.isZero()||k.isZero())return new U(0)._forceRed(this);var g=j.mul(k),_=g.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),N=g.isub(_).iushrn(this.shift),x=N;return N.cmp(this.m)>=0?x=N.isub(this.m):N.cmpn(0)<0&&(x=N.iadd(this.m)),x._forceRed(this)},q.prototype.invm=function(j){var k=this.imod(j._invmp(this.m).mul(this.r2));return k._forceRed(this)}})(typeof Q>"u"||Q,$)}}),_Q=q$({"node_modules/miller-rabin/node_modules/bn.js/lib/bn.js"($,Q){(function(Y,Z){function G(j,k){if(!j)throw new Error(k||"Assertion failed")}function V(j,k){j.super_=k;var g=function(){};g.prototype=k.prototype,j.prototype=new g,j.prototype.constructor=j}function U(j,k,g){if(U.isBN(j))return j;this.negative=0,this.words=null,this.length=0,this.red=null,j!==null&&((k==="le"||k==="be")&&(g=k,k=10),this._init(j||0,k||10,g||"be"))}typeof Y=="object"?Y.exports=U:Z.BN=U,U.BN=U,U.wordSize=26;var X=F$;U.isBN=function(j){return j instanceof U?!0:j!==null&&typeof j=="object"&&j.constructor.wordSize===U.wordSize&&Array.isArray(j.words)},U.max=function(j,k){return j.cmp(k)>0?j:k},U.min=function(j,k){return j.cmp(k)<0?j:k},U.prototype._init=function(j,k,g){if(typeof j=="number")return this._initNumber(j,k,g);if(typeof j=="object")return this._initArray(j,k,g);k==="hex"&&(k=16),G(k===(k|0)&&k>=2&&k<=36),j=j.toString().replace(/\s+/g,"");var _=0;j[0]==="-"&&(_++,this.negative=1),_=0;_-=3)x=j[_]|j[_-1]<<8|j[_-2]<<16,this.words[N]|=x<>>26-B&67108863,B+=24,B>=26&&(B-=26,N++);else if(g==="le")for(_=0,N=0;_>>26-B&67108863,B+=24,B>=26&&(B-=26,N++);return this.strip()};function K(j,k){var g=j.charCodeAt(k);return g>=65&&g<=70?g-55:g>=97&&g<=102?g-87:g-48&15}function I(j,k,g){var _=K(j,g);return g-1>=k&&(_|=K(j,g-1)<<4),_}U.prototype._parseHex=function(j,k,g){this.length=Math.ceil((j.length-k)/6),this.words=new Array(this.length);for(var _=0;_=k;_-=2)B=I(j,k,_)<=18?(N-=18,x+=1,this.words[x]|=B>>>26):N+=8;else{var y=j.length-k;for(_=y%2===0?k+1:k;_=18?(N-=18,x+=1,this.words[x]|=B>>>26):N+=8}this.strip()};function O(j,k,g,_){for(var N=0,x=Math.min(j.length,g),B=k;B=49?N+=y-49+10:y>=17?N+=y-17+10:N+=y}return N}U.prototype._parseBase=function(j,k,g){this.words=[0],this.length=1;for(var _=0,N=1;N<=67108863;N*=k)_++;_--,N=N/k|0;for(var x=j.length-g,B=x%_,y=Math.min(x,x-B)+g,w=0,p=g;p1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},U.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},U.prototype.inspect=function(){return(this.red?""};var J=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],F=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],A=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64000000,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,24300000,28629151,33554432,39135393,45435424,52521875,60466176];U.prototype.toString=function(j,k){j=j||10,k=k|0||1;var g;if(j===16||j==="hex"){g="";for(var _=0,N=0,x=0;x>>24-_&16777215,N!==0||x!==this.length-1?g=J[6-y.length]+y+g:g=y+g,_+=2,_>=26&&(_-=26,x--)}for(N!==0&&(g=N.toString(16)+g);g.length%k!==0;)g="0"+g;return this.negative!==0&&(g="-"+g),g}if(j===(j|0)&&j>=2&&j<=36){var w=F[j],p=A[j];g="";var f=this.clone();for(f.negative=0;!f.isZero();){var c=f.modn(p).toString(j);f=f.idivn(p),f.isZero()?g=c+g:g=J[w-c.length]+c+g}for(this.isZero()&&(g="0"+g);g.length%k!==0;)g="0"+g;return this.negative!==0&&(g="-"+g),g}G(!1,"Base should be between 2 and 36")},U.prototype.toNumber=function(){var j=this.words[0];return this.length===2?j+=this.words[1]*67108864:this.length===3&&this.words[2]===1?j+=4503599627370496+this.words[1]*67108864:this.length>2&&G(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-j:j},U.prototype.toJSON=function(){return this.toString(16)},U.prototype.toBuffer=function(j,k){return G(typeof X<"u"),this.toArrayLike(X,j,k)},U.prototype.toArray=function(j,k){return this.toArrayLike(Array,j,k)},U.prototype.toArrayLike=function(j,k,g){var _=this.byteLength(),N=g||Math.max(1,_);G(_<=N,"byte array longer than desired length"),G(N>0,"Requested array length <= 0"),this.strip();var x=k==="le",B=new j(N),y,w,p=this.clone();if(x){for(w=0;!p.isZero();w++)y=p.andln(255),p.iushrn(8),B[w]=y;for(;w=4096&&(g+=13,k>>>=13),k>=64&&(g+=7,k>>>=7),k>=8&&(g+=4,k>>>=4),k>=2&&(g+=2,k>>>=2),g+k},U.prototype._zeroBits=function(j){if(j===0)return 26;var k=j,g=0;return(k&8191)===0&&(g+=13,k>>>=13),(k&127)===0&&(g+=7,k>>>=7),(k&15)===0&&(g+=4,k>>>=4),(k&3)===0&&(g+=2,k>>>=2),(k&1)===0&&g++,g},U.prototype.bitLength=function(){var j=this.words[this.length-1],k=this._countBits(j);return(this.length-1)*26+k};function H(j){for(var k=new Array(j.bitLength()),g=0;g>>N}return k}U.prototype.zeroBits=function(){if(this.isZero())return 0;for(var j=0,k=0;kj.length?this.clone().ior(j):j.clone().ior(this)},U.prototype.uor=function(j){return this.length>j.length?this.clone().iuor(j):j.clone().iuor(this)},U.prototype.iuand=function(j){var k;this.length>j.length?k=j:k=this;for(var g=0;gj.length?this.clone().iand(j):j.clone().iand(this)},U.prototype.uand=function(j){return this.length>j.length?this.clone().iuand(j):j.clone().iuand(this)},U.prototype.iuxor=function(j){var k,g;this.length>j.length?(k=this,g=j):(k=j,g=this);for(var _=0;_j.length?this.clone().ixor(j):j.clone().ixor(this)},U.prototype.uxor=function(j){return this.length>j.length?this.clone().iuxor(j):j.clone().iuxor(this)},U.prototype.inotn=function(j){G(typeof j=="number"&&j>=0);var k=Math.ceil(j/26)|0,g=j%26;this._expand(k),g>0&&k--;for(var _=0;_0&&(this.words[_]=~this.words[_]&67108863>>26-g),this.strip()},U.prototype.notn=function(j){return this.clone().inotn(j)},U.prototype.setn=function(j,k){G(typeof j=="number"&&j>=0);var g=j/26|0,_=j%26;return this._expand(g+1),k?this.words[g]=this.words[g]|1<<_:this.words[g]=this.words[g]&~(1<<_),this.strip()},U.prototype.iadd=function(j){var k;if(this.negative!==0&&j.negative===0)return this.negative=0,k=this.isub(j),this.negative^=1,this._normSign();if(this.negative===0&&j.negative!==0)return j.negative=0,k=this.isub(j),j.negative=1,k._normSign();var g,_;this.length>j.length?(g=this,_=j):(g=j,_=this);for(var N=0,x=0;x<_.length;x++)k=(g.words[x]|0)+(_.words[x]|0)+N,this.words[x]=k&67108863,N=k>>>26;for(;N!==0&&x>>26;if(this.length=g.length,N!==0)this.words[this.length]=N,this.length++;else if(g!==this)for(;xj.length?this.clone().iadd(j):j.clone().iadd(this)},U.prototype.isub=function(j){if(j.negative!==0){j.negative=0;var k=this.iadd(j);return j.negative=1,k._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(j),this.negative=1,this._normSign();var g=this.cmp(j);if(g===0)return this.negative=0,this.length=1,this.words[0]=0,this;var _,N;g>0?(_=this,N=j):(_=j,N=this);for(var x=0,B=0;B>26,this.words[B]=k&67108863;for(;x!==0&&B<_.length;B++)k=(_.words[B]|0)+x,x=k>>26,this.words[B]=k&67108863;if(x===0&&B<_.length&&_!==this)for(;B<_.length;B++)this.words[B]=_.words[B];return this.length=Math.max(this.length,B),_!==this&&(this.negative=1),this.strip()},U.prototype.sub=function(j){return this.clone().isub(j)};function W(j,k,g){g.negative=k.negative^j.negative;var _=j.length+k.length|0;g.length=_,_=_-1|0;var N=j.words[0]|0,x=k.words[0]|0,B=N*x,y=B&67108863,w=B/67108864|0;g.words[0]=y;for(var p=1;p<_;p++){for(var f=w>>>26,c=w&67108863,h=Math.min(p,k.length-1),d=Math.max(0,p-j.length+1);d<=h;d++){var b=p-d|0;N=j.words[b]|0,x=k.words[d]|0,B=N*x+c,f+=B/67108864|0,c=B&67108863}g.words[p]=c|0,w=f|0}return w!==0?g.words[p]=w|0:g.length--,g.strip()}var E=function(j,k,g){var _=j.words,N=k.words,x=g.words,B=0,y,w,p,f=_[0]|0,c=f&8191,h=f>>>13,d=_[1]|0,b=d&8191,l=d>>>13,o=_[2]|0,u=o&8191,n=o>>>13,s=_[3]|0,t=s&8191,m=s>>>13,a=_[4]|0,e=a&8191,r=a>>>13,i=_[5]|0,$0=i&8191,Q0=i>>>13,Y0=_[6]|0,Z0=Y0&8191,G0=Y0>>>13,V0=_[7]|0,U0=V0&8191,X0=V0>>>13,K0=_[8]|0,I0=K0&8191,O0=K0>>>13,J0=_[9]|0,F0=J0&8191,A0=J0>>>13,H0=N[0]|0,W0=H0&8191,E0=H0>>>13,T0=N[1]|0,D0=T0&8191,C0=T0>>>13,L0=N[2]|0,R0=L0&8191,P0=L0>>>13,z0=N[3]|0,M0=z0&8191,S0=z0>>>13,v0=N[4]|0,q0=v0&8191,j0=v0>>>13,k0=N[5]|0,g0=k0&8191,_0=k0>>>13,N0=N[6]|0,x0=N0&8191,B0=N0>>>13,y0=N[7]|0,w0=y0&8191,p0=y0>>>13,f0=N[8]|0,c0=f0&8191,h0=f0>>>13,d0=N[9]|0,b0=d0&8191,l0=d0>>>13;g.negative=j.negative^k.negative,g.length=19,y=Math.imul(c,W0),w=Math.imul(c,E0),w=w+Math.imul(h,W0)|0,p=Math.imul(h,E0);var o0=(B+y|0)+((w&8191)<<13)|0;B=(p+(w>>>13)|0)+(o0>>>26)|0,o0&=67108863,y=Math.imul(b,W0),w=Math.imul(b,E0),w=w+Math.imul(l,W0)|0,p=Math.imul(l,E0),y=y+Math.imul(c,D0)|0,w=w+Math.imul(c,C0)|0,w=w+Math.imul(h,D0)|0,p=p+Math.imul(h,C0)|0;var u0=(B+y|0)+((w&8191)<<13)|0;B=(p+(w>>>13)|0)+(u0>>>26)|0,u0&=67108863,y=Math.imul(u,W0),w=Math.imul(u,E0),w=w+Math.imul(n,W0)|0,p=Math.imul(n,E0),y=y+Math.imul(b,D0)|0,w=w+Math.imul(b,C0)|0,w=w+Math.imul(l,D0)|0,p=p+Math.imul(l,C0)|0,y=y+Math.imul(c,R0)|0,w=w+Math.imul(c,P0)|0,w=w+Math.imul(h,R0)|0,p=p+Math.imul(h,P0)|0;var n0=(B+y|0)+((w&8191)<<13)|0;B=(p+(w>>>13)|0)+(n0>>>26)|0,n0&=67108863,y=Math.imul(t,W0),w=Math.imul(t,E0),w=w+Math.imul(m,W0)|0,p=Math.imul(m,E0),y=y+Math.imul(u,D0)|0,w=w+Math.imul(u,C0)|0,w=w+Math.imul(n,D0)|0,p=p+Math.imul(n,C0)|0,y=y+Math.imul(b,R0)|0,w=w+Math.imul(b,P0)|0,w=w+Math.imul(l,R0)|0,p=p+Math.imul(l,P0)|0,y=y+Math.imul(c,M0)|0,w=w+Math.imul(c,S0)|0,w=w+Math.imul(h,M0)|0,p=p+Math.imul(h,S0)|0;var s0=(B+y|0)+((w&8191)<<13)|0;B=(p+(w>>>13)|0)+(s0>>>26)|0,s0&=67108863,y=Math.imul(e,W0),w=Math.imul(e,E0),w=w+Math.imul(r,W0)|0,p=Math.imul(r,E0),y=y+Math.imul(t,D0)|0,w=w+Math.imul(t,C0)|0,w=w+Math.imul(m,D0)|0,p=p+Math.imul(m,C0)|0,y=y+Math.imul(u,R0)|0,w=w+Math.imul(u,P0)|0,w=w+Math.imul(n,R0)|0,p=p+Math.imul(n,P0)|0,y=y+Math.imul(b,M0)|0,w=w+Math.imul(b,S0)|0,w=w+Math.imul(l,M0)|0,p=p+Math.imul(l,S0)|0,y=y+Math.imul(c,q0)|0,w=w+Math.imul(c,j0)|0,w=w+Math.imul(h,q0)|0,p=p+Math.imul(h,j0)|0;var t0=(B+y|0)+((w&8191)<<13)|0;B=(p+(w>>>13)|0)+(t0>>>26)|0,t0&=67108863,y=Math.imul($0,W0),w=Math.imul($0,E0),w=w+Math.imul(Q0,W0)|0,p=Math.imul(Q0,E0),y=y+Math.imul(e,D0)|0,w=w+Math.imul(e,C0)|0,w=w+Math.imul(r,D0)|0,p=p+Math.imul(r,C0)|0,y=y+Math.imul(t,R0)|0,w=w+Math.imul(t,P0)|0,w=w+Math.imul(m,R0)|0,p=p+Math.imul(m,P0)|0,y=y+Math.imul(u,M0)|0,w=w+Math.imul(u,S0)|0,w=w+Math.imul(n,M0)|0,p=p+Math.imul(n,S0)|0,y=y+Math.imul(b,q0)|0,w=w+Math.imul(b,j0)|0,w=w+Math.imul(l,q0)|0,p=p+Math.imul(l,j0)|0,y=y+Math.imul(c,g0)|0,w=w+Math.imul(c,_0)|0,w=w+Math.imul(h,g0)|0,p=p+Math.imul(h,_0)|0;var m0=(B+y|0)+((w&8191)<<13)|0;B=(p+(w>>>13)|0)+(m0>>>26)|0,m0&=67108863,y=Math.imul(Z0,W0),w=Math.imul(Z0,E0),w=w+Math.imul(G0,W0)|0,p=Math.imul(G0,E0),y=y+Math.imul($0,D0)|0,w=w+Math.imul($0,C0)|0,w=w+Math.imul(Q0,D0)|0,p=p+Math.imul(Q0,C0)|0,y=y+Math.imul(e,R0)|0,w=w+Math.imul(e,P0)|0,w=w+Math.imul(r,R0)|0,p=p+Math.imul(r,P0)|0,y=y+Math.imul(t,M0)|0,w=w+Math.imul(t,S0)|0,w=w+Math.imul(m,M0)|0,p=p+Math.imul(m,S0)|0,y=y+Math.imul(u,q0)|0,w=w+Math.imul(u,j0)|0,w=w+Math.imul(n,q0)|0,p=p+Math.imul(n,j0)|0,y=y+Math.imul(b,g0)|0,w=w+Math.imul(b,_0)|0,w=w+Math.imul(l,g0)|0,p=p+Math.imul(l,_0)|0,y=y+Math.imul(c,x0)|0,w=w+Math.imul(c,B0)|0,w=w+Math.imul(h,x0)|0,p=p+Math.imul(h,B0)|0;var a0=(B+y|0)+((w&8191)<<13)|0;B=(p+(w>>>13)|0)+(a0>>>26)|0,a0&=67108863,y=Math.imul(U0,W0),w=Math.imul(U0,E0),w=w+Math.imul(X0,W0)|0,p=Math.imul(X0,E0),y=y+Math.imul(Z0,D0)|0,w=w+Math.imul(Z0,C0)|0,w=w+Math.imul(G0,D0)|0,p=p+Math.imul(G0,C0)|0,y=y+Math.imul($0,R0)|0,w=w+Math.imul($0,P0)|0,w=w+Math.imul(Q0,R0)|0,p=p+Math.imul(Q0,P0)|0,y=y+Math.imul(e,M0)|0,w=w+Math.imul(e,S0)|0,w=w+Math.imul(r,M0)|0,p=p+Math.imul(r,S0)|0,y=y+Math.imul(t,q0)|0,w=w+Math.imul(t,j0)|0,w=w+Math.imul(m,q0)|0,p=p+Math.imul(m,j0)|0,y=y+Math.imul(u,g0)|0,w=w+Math.imul(u,_0)|0,w=w+Math.imul(n,g0)|0,p=p+Math.imul(n,_0)|0,y=y+Math.imul(b,x0)|0,w=w+Math.imul(b,B0)|0,w=w+Math.imul(l,x0)|0,p=p+Math.imul(l,B0)|0,y=y+Math.imul(c,w0)|0,w=w+Math.imul(c,p0)|0,w=w+Math.imul(h,w0)|0,p=p+Math.imul(h,p0)|0;var e0=(B+y|0)+((w&8191)<<13)|0;B=(p+(w>>>13)|0)+(e0>>>26)|0,e0&=67108863,y=Math.imul(I0,W0),w=Math.imul(I0,E0),w=w+Math.imul(O0,W0)|0,p=Math.imul(O0,E0),y=y+Math.imul(U0,D0)|0,w=w+Math.imul(U0,C0)|0,w=w+Math.imul(X0,D0)|0,p=p+Math.imul(X0,C0)|0,y=y+Math.imul(Z0,R0)|0,w=w+Math.imul(Z0,P0)|0,w=w+Math.imul(G0,R0)|0,p=p+Math.imul(G0,P0)|0,y=y+Math.imul($0,M0)|0,w=w+Math.imul($0,S0)|0,w=w+Math.imul(Q0,M0)|0,p=p+Math.imul(Q0,S0)|0,y=y+Math.imul(e,q0)|0,w=w+Math.imul(e,j0)|0,w=w+Math.imul(r,q0)|0,p=p+Math.imul(r,j0)|0,y=y+Math.imul(t,g0)|0,w=w+Math.imul(t,_0)|0,w=w+Math.imul(m,g0)|0,p=p+Math.imul(m,_0)|0,y=y+Math.imul(u,x0)|0,w=w+Math.imul(u,B0)|0,w=w+Math.imul(n,x0)|0,p=p+Math.imul(n,B0)|0,y=y+Math.imul(b,w0)|0,w=w+Math.imul(b,p0)|0,w=w+Math.imul(l,w0)|0,p=p+Math.imul(l,p0)|0,y=y+Math.imul(c,c0)|0,w=w+Math.imul(c,h0)|0,w=w+Math.imul(h,c0)|0,p=p+Math.imul(h,h0)|0;var r0=(B+y|0)+((w&8191)<<13)|0;B=(p+(w>>>13)|0)+(r0>>>26)|0,r0&=67108863,y=Math.imul(F0,W0),w=Math.imul(F0,E0),w=w+Math.imul(A0,W0)|0,p=Math.imul(A0,E0),y=y+Math.imul(I0,D0)|0,w=w+Math.imul(I0,C0)|0,w=w+Math.imul(O0,D0)|0,p=p+Math.imul(O0,C0)|0,y=y+Math.imul(U0,R0)|0,w=w+Math.imul(U0,P0)|0,w=w+Math.imul(X0,R0)|0,p=p+Math.imul(X0,P0)|0,y=y+Math.imul(Z0,M0)|0,w=w+Math.imul(Z0,S0)|0,w=w+Math.imul(G0,M0)|0,p=p+Math.imul(G0,S0)|0,y=y+Math.imul($0,q0)|0,w=w+Math.imul($0,j0)|0,w=w+Math.imul(Q0,q0)|0,p=p+Math.imul(Q0,j0)|0,y=y+Math.imul(e,g0)|0,w=w+Math.imul(e,_0)|0,w=w+Math.imul(r,g0)|0,p=p+Math.imul(r,_0)|0,y=y+Math.imul(t,x0)|0,w=w+Math.imul(t,B0)|0,w=w+Math.imul(m,x0)|0,p=p+Math.imul(m,B0)|0,y=y+Math.imul(u,w0)|0,w=w+Math.imul(u,p0)|0,w=w+Math.imul(n,w0)|0,p=p+Math.imul(n,p0)|0,y=y+Math.imul(b,c0)|0,w=w+Math.imul(b,h0)|0,w=w+Math.imul(l,c0)|0,p=p+Math.imul(l,h0)|0,y=y+Math.imul(c,b0)|0,w=w+Math.imul(c,l0)|0,w=w+Math.imul(h,b0)|0,p=p+Math.imul(h,l0)|0;var i0=(B+y|0)+((w&8191)<<13)|0;B=(p+(w>>>13)|0)+(i0>>>26)|0,i0&=67108863,y=Math.imul(F0,D0),w=Math.imul(F0,C0),w=w+Math.imul(A0,D0)|0,p=Math.imul(A0,C0),y=y+Math.imul(I0,R0)|0,w=w+Math.imul(I0,P0)|0,w=w+Math.imul(O0,R0)|0,p=p+Math.imul(O0,P0)|0,y=y+Math.imul(U0,M0)|0,w=w+Math.imul(U0,S0)|0,w=w+Math.imul(X0,M0)|0,p=p+Math.imul(X0,S0)|0,y=y+Math.imul(Z0,q0)|0,w=w+Math.imul(Z0,j0)|0,w=w+Math.imul(G0,q0)|0,p=p+Math.imul(G0,j0)|0,y=y+Math.imul($0,g0)|0,w=w+Math.imul($0,_0)|0,w=w+Math.imul(Q0,g0)|0,p=p+Math.imul(Q0,_0)|0,y=y+Math.imul(e,x0)|0,w=w+Math.imul(e,B0)|0,w=w+Math.imul(r,x0)|0,p=p+Math.imul(r,B0)|0,y=y+Math.imul(t,w0)|0,w=w+Math.imul(t,p0)|0,w=w+Math.imul(m,w0)|0,p=p+Math.imul(m,p0)|0,y=y+Math.imul(u,c0)|0,w=w+Math.imul(u,h0)|0,w=w+Math.imul(n,c0)|0,p=p+Math.imul(n,h0)|0,y=y+Math.imul(b,b0)|0,w=w+Math.imul(b,l0)|0,w=w+Math.imul(l,b0)|0,p=p+Math.imul(l,l0)|0;var $$=(B+y|0)+((w&8191)<<13)|0;B=(p+(w>>>13)|0)+($$>>>26)|0,$$&=67108863,y=Math.imul(F0,R0),w=Math.imul(F0,P0),w=w+Math.imul(A0,R0)|0,p=Math.imul(A0,P0),y=y+Math.imul(I0,M0)|0,w=w+Math.imul(I0,S0)|0,w=w+Math.imul(O0,M0)|0,p=p+Math.imul(O0,S0)|0,y=y+Math.imul(U0,q0)|0,w=w+Math.imul(U0,j0)|0,w=w+Math.imul(X0,q0)|0,p=p+Math.imul(X0,j0)|0,y=y+Math.imul(Z0,g0)|0,w=w+Math.imul(Z0,_0)|0,w=w+Math.imul(G0,g0)|0,p=p+Math.imul(G0,_0)|0,y=y+Math.imul($0,x0)|0,w=w+Math.imul($0,B0)|0,w=w+Math.imul(Q0,x0)|0,p=p+Math.imul(Q0,B0)|0,y=y+Math.imul(e,w0)|0,w=w+Math.imul(e,p0)|0,w=w+Math.imul(r,w0)|0,p=p+Math.imul(r,p0)|0,y=y+Math.imul(t,c0)|0,w=w+Math.imul(t,h0)|0,w=w+Math.imul(m,c0)|0,p=p+Math.imul(m,h0)|0,y=y+Math.imul(u,b0)|0,w=w+Math.imul(u,l0)|0,w=w+Math.imul(n,b0)|0,p=p+Math.imul(n,l0)|0;var Q$=(B+y|0)+((w&8191)<<13)|0;B=(p+(w>>>13)|0)+(Q$>>>26)|0,Q$&=67108863,y=Math.imul(F0,M0),w=Math.imul(F0,S0),w=w+Math.imul(A0,M0)|0,p=Math.imul(A0,S0),y=y+Math.imul(I0,q0)|0,w=w+Math.imul(I0,j0)|0,w=w+Math.imul(O0,q0)|0,p=p+Math.imul(O0,j0)|0,y=y+Math.imul(U0,g0)|0,w=w+Math.imul(U0,_0)|0,w=w+Math.imul(X0,g0)|0,p=p+Math.imul(X0,_0)|0,y=y+Math.imul(Z0,x0)|0,w=w+Math.imul(Z0,B0)|0,w=w+Math.imul(G0,x0)|0,p=p+Math.imul(G0,B0)|0,y=y+Math.imul($0,w0)|0,w=w+Math.imul($0,p0)|0,w=w+Math.imul(Q0,w0)|0,p=p+Math.imul(Q0,p0)|0,y=y+Math.imul(e,c0)|0,w=w+Math.imul(e,h0)|0,w=w+Math.imul(r,c0)|0,p=p+Math.imul(r,h0)|0,y=y+Math.imul(t,b0)|0,w=w+Math.imul(t,l0)|0,w=w+Math.imul(m,b0)|0,p=p+Math.imul(m,l0)|0;var Y$=(B+y|0)+((w&8191)<<13)|0;B=(p+(w>>>13)|0)+(Y$>>>26)|0,Y$&=67108863,y=Math.imul(F0,q0),w=Math.imul(F0,j0),w=w+Math.imul(A0,q0)|0,p=Math.imul(A0,j0),y=y+Math.imul(I0,g0)|0,w=w+Math.imul(I0,_0)|0,w=w+Math.imul(O0,g0)|0,p=p+Math.imul(O0,_0)|0,y=y+Math.imul(U0,x0)|0,w=w+Math.imul(U0,B0)|0,w=w+Math.imul(X0,x0)|0,p=p+Math.imul(X0,B0)|0,y=y+Math.imul(Z0,w0)|0,w=w+Math.imul(Z0,p0)|0,w=w+Math.imul(G0,w0)|0,p=p+Math.imul(G0,p0)|0,y=y+Math.imul($0,c0)|0,w=w+Math.imul($0,h0)|0,w=w+Math.imul(Q0,c0)|0,p=p+Math.imul(Q0,h0)|0,y=y+Math.imul(e,b0)|0,w=w+Math.imul(e,l0)|0,w=w+Math.imul(r,b0)|0,p=p+Math.imul(r,l0)|0;var Z$=(B+y|0)+((w&8191)<<13)|0;B=(p+(w>>>13)|0)+(Z$>>>26)|0,Z$&=67108863,y=Math.imul(F0,g0),w=Math.imul(F0,_0),w=w+Math.imul(A0,g0)|0,p=Math.imul(A0,_0),y=y+Math.imul(I0,x0)|0,w=w+Math.imul(I0,B0)|0,w=w+Math.imul(O0,x0)|0,p=p+Math.imul(O0,B0)|0,y=y+Math.imul(U0,w0)|0,w=w+Math.imul(U0,p0)|0,w=w+Math.imul(X0,w0)|0,p=p+Math.imul(X0,p0)|0,y=y+Math.imul(Z0,c0)|0,w=w+Math.imul(Z0,h0)|0,w=w+Math.imul(G0,c0)|0,p=p+Math.imul(G0,h0)|0,y=y+Math.imul($0,b0)|0,w=w+Math.imul($0,l0)|0,w=w+Math.imul(Q0,b0)|0,p=p+Math.imul(Q0,l0)|0;var G$=(B+y|0)+((w&8191)<<13)|0;B=(p+(w>>>13)|0)+(G$>>>26)|0,G$&=67108863,y=Math.imul(F0,x0),w=Math.imul(F0,B0),w=w+Math.imul(A0,x0)|0,p=Math.imul(A0,B0),y=y+Math.imul(I0,w0)|0,w=w+Math.imul(I0,p0)|0,w=w+Math.imul(O0,w0)|0,p=p+Math.imul(O0,p0)|0,y=y+Math.imul(U0,c0)|0,w=w+Math.imul(U0,h0)|0,w=w+Math.imul(X0,c0)|0,p=p+Math.imul(X0,h0)|0,y=y+Math.imul(Z0,b0)|0,w=w+Math.imul(Z0,l0)|0,w=w+Math.imul(G0,b0)|0,p=p+Math.imul(G0,l0)|0;var V$=(B+y|0)+((w&8191)<<13)|0;B=(p+(w>>>13)|0)+(V$>>>26)|0,V$&=67108863,y=Math.imul(F0,w0),w=Math.imul(F0,p0),w=w+Math.imul(A0,w0)|0,p=Math.imul(A0,p0),y=y+Math.imul(I0,c0)|0,w=w+Math.imul(I0,h0)|0,w=w+Math.imul(O0,c0)|0,p=p+Math.imul(O0,h0)|0,y=y+Math.imul(U0,b0)|0,w=w+Math.imul(U0,l0)|0,w=w+Math.imul(X0,b0)|0,p=p+Math.imul(X0,l0)|0;var U$=(B+y|0)+((w&8191)<<13)|0;B=(p+(w>>>13)|0)+(U$>>>26)|0,U$&=67108863,y=Math.imul(F0,c0),w=Math.imul(F0,h0),w=w+Math.imul(A0,c0)|0,p=Math.imul(A0,h0),y=y+Math.imul(I0,b0)|0,w=w+Math.imul(I0,l0)|0,w=w+Math.imul(O0,b0)|0,p=p+Math.imul(O0,l0)|0;var X$=(B+y|0)+((w&8191)<<13)|0;B=(p+(w>>>13)|0)+(X$>>>26)|0,X$&=67108863,y=Math.imul(F0,b0),w=Math.imul(F0,l0),w=w+Math.imul(A0,b0)|0,p=Math.imul(A0,l0);var K$=(B+y|0)+((w&8191)<<13)|0;return B=(p+(w>>>13)|0)+(K$>>>26)|0,K$&=67108863,x[0]=o0,x[1]=u0,x[2]=n0,x[3]=s0,x[4]=t0,x[5]=m0,x[6]=a0,x[7]=e0,x[8]=r0,x[9]=i0,x[10]=$$,x[11]=Q$,x[12]=Y$,x[13]=Z$,x[14]=G$,x[15]=V$,x[16]=U$,x[17]=X$,x[18]=K$,B!==0&&(x[19]=B,g.length++),g};Math.imul||(E=W);function T(j,k,g){g.negative=k.negative^j.negative,g.length=j.length+k.length;for(var _=0,N=0,x=0;x>>26)|0,N+=B>>>26,B&=67108863}g.words[x]=y,_=B,B=N}return _!==0?g.words[x]=_:g.length--,g.strip()}function D(j,k,g){var _=new C;return _.mulp(j,k,g)}U.prototype.mulTo=function(j,k){var g,_=this.length+j.length;return this.length===10&&j.length===10?g=E(this,j,k):_<63?g=W(this,j,k):_<1024?g=T(this,j,k):g=D(this,j,k),g};function C(j,k){this.x=j,this.y=k}C.prototype.makeRBT=function(j){for(var k=new Array(j),g=U.prototype._countBits(j)-1,_=0;_>=1;return _},C.prototype.permute=function(j,k,g,_,N,x){for(var B=0;B>>1)N++;return 1<>>13,g[2*x+1]=N&8191,N=N>>>13;for(x=2*k;x<_;++x)g[x]=0;G(N===0),G((N&-8192)===0)},C.prototype.stub=function(j){for(var k=new Array(j),g=0;g>=26,k+=_/67108864|0,k+=N>>>26,this.words[g]=N&67108863}return k!==0&&(this.words[g]=k,this.length++),this},U.prototype.muln=function(j){return this.clone().imuln(j)},U.prototype.sqr=function(){return this.mul(this)},U.prototype.isqr=function(){return this.imul(this.clone())},U.prototype.pow=function(j){var k=H(j);if(k.length===0)return new U(1);for(var g=this,_=0;_=0);var k=j%26,g=(j-k)/26,_=67108863>>>26-k<<26-k,N;if(k!==0){var x=0;for(N=0;N>>26-k}x&&(this.words[N]=x,this.length++)}if(g!==0){for(N=this.length-1;N>=0;N--)this.words[N+g]=this.words[N];for(N=0;N=0);var _;k?_=(k-k%26)/26:_=0;var N=j%26,x=Math.min((j-N)/26,this.length),B=67108863^67108863>>>N<x)for(this.length-=x,w=0;w=0&&(p!==0||w>=_);w--){var f=this.words[w]|0;this.words[w]=p<<26-N|f>>>N,p=f&B}return y&&p!==0&&(y.words[y.length++]=p),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},U.prototype.ishrn=function(j,k,g){return G(this.negative===0),this.iushrn(j,k,g)},U.prototype.shln=function(j){return this.clone().ishln(j)},U.prototype.ushln=function(j){return this.clone().iushln(j)},U.prototype.shrn=function(j){return this.clone().ishrn(j)},U.prototype.ushrn=function(j){return this.clone().iushrn(j)},U.prototype.testn=function(j){G(typeof j=="number"&&j>=0);var k=j%26,g=(j-k)/26,_=1<=0);var k=j%26,g=(j-k)/26;if(G(this.negative===0,"imaskn works only with positive numbers"),this.length<=g)return this;if(k!==0&&g++,this.length=Math.min(g,this.length),k!==0){var _=67108863^67108863>>>k<=67108864;k++)this.words[k]-=67108864,k===this.length-1?this.words[k+1]=1:this.words[k+1]++;return this.length=Math.max(this.length,k+1),this},U.prototype.isubn=function(j){if(G(typeof j=="number"),G(j<67108864),j<0)return this.iaddn(-j);if(this.negative!==0)return this.negative=0,this.iaddn(j),this.negative=1,this;if(this.words[0]-=j,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var k=0;k>26)-(y/67108864|0),this.words[N+g]=x&67108863}for(;N>26,this.words[N+g]=x&67108863;if(B===0)return this.strip();for(G(B===-1),B=0,N=0;N>26,this.words[N]=x&67108863;return this.negative=1,this.strip()},U.prototype._wordDiv=function(j,k){var g=this.length-j.length,_=this.clone(),N=j,x=N.words[N.length-1]|0,B=this._countBits(x);g=26-B,g!==0&&(N=N.ushln(g),_.iushln(g),x=N.words[N.length-1]|0);var y=_.length-N.length,w;if(k!=="mod"){w=new U(null),w.length=y+1,w.words=new Array(w.length);for(var p=0;p=0;c--){var h=(_.words[N.length+c]|0)*67108864+(_.words[N.length+c-1]|0);for(h=Math.min(h/x|0,67108863),_._ishlnsubmul(N,h,c);_.negative!==0;)h--,_.negative=0,_._ishlnsubmul(N,1,c),_.isZero()||(_.negative^=1);w&&(w.words[c]=h)}return w&&w.strip(),_.strip(),k!=="div"&&g!==0&&_.iushrn(g),{div:w||null,mod:_}},U.prototype.divmod=function(j,k,g){if(G(!j.isZero()),this.isZero())return{div:new U(0),mod:new U(0)};var _,N,x;return this.negative!==0&&j.negative===0?(x=this.neg().divmod(j,k),k!=="mod"&&(_=x.div.neg()),k!=="div"&&(N=x.mod.neg(),g&&N.negative!==0&&N.iadd(j)),{div:_,mod:N}):this.negative===0&&j.negative!==0?(x=this.divmod(j.neg(),k),k!=="mod"&&(_=x.div.neg()),{div:_,mod:x.mod}):(this.negative&j.negative)!==0?(x=this.neg().divmod(j.neg(),k),k!=="div"&&(N=x.mod.neg(),g&&N.negative!==0&&N.isub(j)),{div:x.div,mod:N}):j.length>this.length||this.cmp(j)<0?{div:new U(0),mod:this}:j.length===1?k==="div"?{div:this.divn(j.words[0]),mod:null}:k==="mod"?{div:null,mod:new U(this.modn(j.words[0]))}:{div:this.divn(j.words[0]),mod:new U(this.modn(j.words[0]))}:this._wordDiv(j,k)},U.prototype.div=function(j){return this.divmod(j,"div",!1).div},U.prototype.mod=function(j){return this.divmod(j,"mod",!1).mod},U.prototype.umod=function(j){return this.divmod(j,"mod",!0).mod},U.prototype.divRound=function(j){var k=this.divmod(j);if(k.mod.isZero())return k.div;var g=k.div.negative!==0?k.mod.isub(j):k.mod,_=j.ushrn(1),N=j.andln(1),x=g.cmp(_);return x<0||N===1&&x===0?k.div:k.div.negative!==0?k.div.isubn(1):k.div.iaddn(1)},U.prototype.modn=function(j){G(j<=67108863);for(var k=(1<<26)%j,g=0,_=this.length-1;_>=0;_--)g=(k*g+(this.words[_]|0))%j;return g},U.prototype.idivn=function(j){G(j<=67108863);for(var k=0,g=this.length-1;g>=0;g--){var _=(this.words[g]|0)+k*67108864;this.words[g]=_/j|0,k=_%j}return this.strip()},U.prototype.divn=function(j){return this.clone().idivn(j)},U.prototype.egcd=function(j){G(j.negative===0),G(!j.isZero());var k=this,g=j.clone();k.negative!==0?k=k.umod(j):k=k.clone();for(var _=new U(1),N=new U(0),x=new U(0),B=new U(1),y=0;k.isEven()&&g.isEven();)k.iushrn(1),g.iushrn(1),++y;for(var w=g.clone(),p=k.clone();!k.isZero();){for(var f=0,c=1;(k.words[0]&c)===0&&f<26;++f,c<<=1);if(f>0)for(k.iushrn(f);f-- >0;)(_.isOdd()||N.isOdd())&&(_.iadd(w),N.isub(p)),_.iushrn(1),N.iushrn(1);for(var h=0,d=1;(g.words[0]&d)===0&&h<26;++h,d<<=1);if(h>0)for(g.iushrn(h);h-- >0;)(x.isOdd()||B.isOdd())&&(x.iadd(w),B.isub(p)),x.iushrn(1),B.iushrn(1);k.cmp(g)>=0?(k.isub(g),_.isub(x),N.isub(B)):(g.isub(k),x.isub(_),B.isub(N))}return{a:x,b:B,gcd:g.iushln(y)}},U.prototype._invmp=function(j){G(j.negative===0),G(!j.isZero());var k=this,g=j.clone();k.negative!==0?k=k.umod(j):k=k.clone();for(var _=new U(1),N=new U(0),x=g.clone();k.cmpn(1)>0&&g.cmpn(1)>0;){for(var B=0,y=1;(k.words[0]&y)===0&&B<26;++B,y<<=1);if(B>0)for(k.iushrn(B);B-- >0;)_.isOdd()&&_.iadd(x),_.iushrn(1);for(var w=0,p=1;(g.words[0]&p)===0&&w<26;++w,p<<=1);if(w>0)for(g.iushrn(w);w-- >0;)N.isOdd()&&N.iadd(x),N.iushrn(1);k.cmp(g)>=0?(k.isub(g),_.isub(N)):(g.isub(k),N.isub(_))}var f;return k.cmpn(1)===0?f=_:f=N,f.cmpn(0)<0&&f.iadd(j),f},U.prototype.gcd=function(j){if(this.isZero())return j.abs();if(j.isZero())return this.abs();var k=this.clone(),g=j.clone();k.negative=0,g.negative=0;for(var _=0;k.isEven()&&g.isEven();_++)k.iushrn(1),g.iushrn(1);do{for(;k.isEven();)k.iushrn(1);for(;g.isEven();)g.iushrn(1);var N=k.cmp(g);if(N<0){var x=k;k=g,g=x}else if(N===0||g.cmpn(1)===0)break;k.isub(g)}while(!0);return g.iushln(_)},U.prototype.invm=function(j){return this.egcd(j).a.umod(j)},U.prototype.isEven=function(){return(this.words[0]&1)===0},U.prototype.isOdd=function(){return(this.words[0]&1)===1},U.prototype.andln=function(j){return this.words[0]&j},U.prototype.bincn=function(j){G(typeof j=="number");var k=j%26,g=(j-k)/26,_=1<>>26,B&=67108863,this.words[x]=B}return N!==0&&(this.words[x]=N,this.length++),this},U.prototype.isZero=function(){return this.length===1&&this.words[0]===0},U.prototype.cmpn=function(j){var k=j<0;if(this.negative!==0&&!k)return-1;if(this.negative===0&&k)return 1;this.strip();var g;if(this.length>1)g=1;else{k&&(j=-j),G(j<=67108863,"Number is too big");var _=this.words[0]|0;g=_===j?0:_j.length)return 1;if(this.length=0;g--){var _=this.words[g]|0,N=j.words[g]|0;if(_!==N){_N&&(k=1);break}}return k},U.prototype.gtn=function(j){return this.cmpn(j)===1},U.prototype.gt=function(j){return this.cmp(j)===1},U.prototype.gten=function(j){return this.cmpn(j)>=0},U.prototype.gte=function(j){return this.cmp(j)>=0},U.prototype.ltn=function(j){return this.cmpn(j)===-1},U.prototype.lt=function(j){return this.cmp(j)===-1},U.prototype.lten=function(j){return this.cmpn(j)<=0},U.prototype.lte=function(j){return this.cmp(j)<=0},U.prototype.eqn=function(j){return this.cmpn(j)===0},U.prototype.eq=function(j){return this.cmp(j)===0},U.red=function(j){return new v(j)},U.prototype.toRed=function(j){return G(!this.red,"Already a number in reduction context"),G(this.negative===0,"red works only with positives"),j.convertTo(this)._forceRed(j)},U.prototype.fromRed=function(){return G(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},U.prototype._forceRed=function(j){return this.red=j,this},U.prototype.forceRed=function(j){return G(!this.red,"Already a number in reduction context"),this._forceRed(j)},U.prototype.redAdd=function(j){return G(this.red,"redAdd works only with red numbers"),this.red.add(this,j)},U.prototype.redIAdd=function(j){return G(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,j)},U.prototype.redSub=function(j){return G(this.red,"redSub works only with red numbers"),this.red.sub(this,j)},U.prototype.redISub=function(j){return G(this.red,"redISub works only with red numbers"),this.red.isub(this,j)},U.prototype.redShl=function(j){return G(this.red,"redShl works only with red numbers"),this.red.shl(this,j)},U.prototype.redMul=function(j){return G(this.red,"redMul works only with red numbers"),this.red._verify2(this,j),this.red.mul(this,j)},U.prototype.redIMul=function(j){return G(this.red,"redMul works only with red numbers"),this.red._verify2(this,j),this.red.imul(this,j)},U.prototype.redSqr=function(){return G(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},U.prototype.redISqr=function(){return G(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},U.prototype.redSqrt=function(){return G(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},U.prototype.redInvm=function(){return G(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},U.prototype.redNeg=function(){return G(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},U.prototype.redPow=function(j){return G(this.red&&!j.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,j)};var L={k256:null,p224:null,p192:null,p25519:null};function R(j,k){this.name=j,this.p=new U(k,16),this.n=this.p.bitLength(),this.k=new U(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}R.prototype._tmp=function(){var j=new U(null);return j.words=new Array(Math.ceil(this.n/13)),j},R.prototype.ireduce=function(j){var k=j,g;do this.split(k,this.tmp),k=this.imulK(k),k=k.iadd(this.tmp),g=k.bitLength();while(g>this.n);var _=g0?k.isub(this.p):k.strip!==void 0?k.strip():k._strip(),k},R.prototype.split=function(j,k){j.iushrn(this.n,0,k)},R.prototype.imulK=function(j){return j.imul(this.k)};function P(){R.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}V(P,R),P.prototype.split=function(j,k){for(var g=4194303,_=Math.min(j.length,9),N=0;N<_;N++)k.words[N]=j.words[N];if(k.length=_,j.length<=9){j.words[0]=0,j.length=1;return}var x=j.words[9];for(k.words[k.length++]=x&g,N=10;N>>22,x=B}x>>>=22,j.words[N-10]=x,x===0&&j.length>10?j.length-=10:j.length-=9},P.prototype.imulK=function(j){j.words[j.length]=0,j.words[j.length+1]=0,j.length+=2;for(var k=0,g=0;g>>=26,j.words[g]=N,k=_}return k!==0&&(j.words[j.length++]=k),j},U._prime=function(j){if(L[j])return L[j];var k;if(j==="k256")k=new P;else if(j==="p224")k=new z;else if(j==="p192")k=new M;else if(j==="p25519")k=new S;else throw new Error("Unknown prime "+j);return L[j]=k,k};function v(j){if(typeof j=="string"){var k=U._prime(j);this.m=k.p,this.prime=k}else G(j.gtn(1),"modulus must be greater than 1"),this.m=j,this.prime=null}v.prototype._verify1=function(j){G(j.negative===0,"red works only with positives"),G(j.red,"red works only with red numbers")},v.prototype._verify2=function(j,k){G((j.negative|k.negative)===0,"red works only with positives"),G(j.red&&j.red===k.red,"red works only with red numbers")},v.prototype.imod=function(j){return this.prime?this.prime.ireduce(j)._forceRed(this):j.umod(this.m)._forceRed(this)},v.prototype.neg=function(j){return j.isZero()?j.clone():this.m.sub(j)._forceRed(this)},v.prototype.add=function(j,k){this._verify2(j,k);var g=j.add(k);return g.cmp(this.m)>=0&&g.isub(this.m),g._forceRed(this)},v.prototype.iadd=function(j,k){this._verify2(j,k);var g=j.iadd(k);return g.cmp(this.m)>=0&&g.isub(this.m),g},v.prototype.sub=function(j,k){this._verify2(j,k);var g=j.sub(k);return g.cmpn(0)<0&&g.iadd(this.m),g._forceRed(this)},v.prototype.isub=function(j,k){this._verify2(j,k);var g=j.isub(k);return g.cmpn(0)<0&&g.iadd(this.m),g},v.prototype.shl=function(j,k){return this._verify1(j),this.imod(j.ushln(k))},v.prototype.imul=function(j,k){return this._verify2(j,k),this.imod(j.imul(k))},v.prototype.mul=function(j,k){return this._verify2(j,k),this.imod(j.mul(k))},v.prototype.isqr=function(j){return this.imul(j,j.clone())},v.prototype.sqr=function(j){return this.mul(j,j)},v.prototype.sqrt=function(j){if(j.isZero())return j.clone();var k=this.m.andln(3);if(G(k%2===1),k===3){var g=this.m.add(new U(1)).iushrn(2);return this.pow(j,g)}for(var _=this.m.subn(1),N=0;!_.isZero()&&_.andln(1)===0;)N++,_.iushrn(1);G(!_.isZero());var x=new U(1).toRed(this),B=x.redNeg(),y=this.m.subn(1).iushrn(1),w=this.m.bitLength();for(w=new U(2*w*w).toRed(this);this.pow(w,y).cmp(B)!==0;)w.redIAdd(B);for(var p=this.pow(w,_),f=this.pow(j,_.addn(1).iushrn(1)),c=this.pow(j,_),h=N;c.cmp(x)!==0;){for(var d=c,b=0;d.cmp(x)!==0;b++)d=d.redSqr();G(b=0;N--){for(var p=k.words[N],f=w-1;f>=0;f--){var c=p>>f&1;if(x!==_[0]&&(x=this.sqr(x)),c===0&&B===0){y=0;continue}B<<=1,B|=c,y++,!(y!==g&&(N!==0||f!==0))&&(x=this.mul(x,_[B]),y=0,B=0)}w=26}return x},v.prototype.convertTo=function(j){var k=j.umod(this.m);return k===j?k.clone():k},v.prototype.convertFrom=function(j){var k=j.clone();return k.red=null,k},U.mont=function(j){return new q(j)};function q(j){v.call(this,j),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new U(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}V(q,v),q.prototype.convertTo=function(j){return this.imod(j.ushln(this.shift))},q.prototype.convertFrom=function(j){var k=this.imod(j.mul(this.rinv));return k.red=null,k},q.prototype.imul=function(j,k){if(j.isZero()||k.isZero())return j.words[0]=0,j.length=1,j;var g=j.imul(k),_=g.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),N=g.isub(_).iushrn(this.shift),x=N;return N.cmp(this.m)>=0?x=N.isub(this.m):N.cmpn(0)<0&&(x=N.iadd(this.m)),x._forceRed(this)},q.prototype.mul=function(j,k){if(j.isZero()||k.isZero())return new U(0)._forceRed(this);var g=j.mul(k),_=g.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),N=g.isub(_).iushrn(this.shift),x=N;return N.cmp(this.m)>=0?x=N.isub(this.m):N.cmpn(0)<0&&(x=N.iadd(this.m)),x._forceRed(this)},q.prototype.invm=function(j){var k=this.imod(j._invmp(this.m).mul(this.r2));return k._forceRed(this)}})(typeof Q>"u"||Q,$)}}),NQ=q$({"(disabled):node_modules/crypto-browserify/index.js"(){}}),xQ=q$({"node_modules/brorand/index.js"($,Q){var Y;Q.exports=function(G){return Y||(Y=new Z(null)),Y.generate(G)};function Z(G){this.rand=G}Q.exports.Rand=Z,Z.prototype.generate=function(G){return this._rand(G)},Z.prototype._rand=function(G){var V=new F$(G);return H$.getRandomValues(V),V}}}),BQ=q$({"node_modules/miller-rabin/lib/mr.js"($,Q){var Y=_Q(),Z=xQ();function G(V){this.rand=V||new Z.Rand}Q.exports=G,G.create=function(V){return new G(V)},G.prototype._randbelow=function(V){var U=V.bitLength(),X=Math.ceil(U/8);do var K=new Y(this.rand.generate(X));while(K.cmp(V)>=0);return K},G.prototype._randrange=function(V,U){var X=U.sub(V);return V.add(this._randbelow(X))},G.prototype.test=function(V,U,X){var K=V.bitLength(),I=Y.mont(V),O=new Y(1).toRed(I);U||(U=Math.max(1,K/48|0));for(var J=V.subn(1),F=0;!J.testn(F);F++);for(var A=V.shrn(F),H=J.toRed(I),W=!0;U>0;U--){var E=this._randrange(new Y(2),J);X&&X(E);var T=E.toRed(I).redPow(A);if(!(T.cmp(O)===0||T.cmp(H)===0)){for(var D=1;D0;U--){var H=this._randrange(new Y(2),O),W=V.gcd(H);if(W.cmpn(1)!==0)return W;var E=H.toRed(K).redPow(F);if(!(E.cmp(I)===0||E.cmp(A)===0)){for(var T=1;Tz;)S.ishrn(1);if(S.isEven()&&S.iadd(X),S.testn(1)||S.iadd(K),M.cmp(K)){if(!M.cmp(I))for(;S.mod(F).cmp(A);)S.iadd(E)}else for(;S.mod(G).cmp(W);)S.iadd(E);if(v=S.shrn(1),L(v)&&L(S)&&R(v)&&R(S)&&U.test(v)&&U.test(S))return S}}}}),wQ=q$({"node_modules/diffie-hellman/lib/primes.json"($,Q){Q.exports={modp1:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff"},modp2:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff"},modp5:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff"},modp14:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff"},modp15:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff"},modp16:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff"},modp17:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff"},modp18:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff"}}}}),pQ=q$({"node_modules/diffie-hellman/lib/dh.js"($,Q){var Y=gQ(),Z=BQ(),G=new Z,V=new Y(24),U=new Y(11),X=new Y(10),K=new Y(3),I=new Y(7),O=yQ(),J=g$();Q.exports=E;function F(D,C){return C=C||"utf8",F$.isBuffer(D)||(D=new F$(D,C)),this._pub=new Y(D),this}function A(D,C){return C=C||"utf8",F$.isBuffer(D)||(D=new F$(D,C)),this._priv=new Y(D),this}var H={};function W(D,C){var L=C.toString("hex"),R=[L,D.toString(16)].join("_");if(R in H)return H[R];var P=0;if(D.isEven()||!O.simpleSieve||!O.fermatTest(D)||!G.test(D))return P+=1,L==="02"||L==="05"?P+=8:P+=4,H[R]=P,P;G.test(D.shrn(1))||(P+=2);var z;switch(L){case"02":D.mod(V).cmp(U)&&(P+=8);break;case"05":z=D.mod(X),z.cmp(K)&&z.cmp(I)&&(P+=8);break;default:P+=4}return H[R]=P,P}function E(D,C,L){this.setGenerator(C),this.__prime=new Y(D),this._prime=Y.mont(this.__prime),this._primeLen=D.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,L?(this.setPublicKey=F,this.setPrivateKey=A):this._primeCode=8}Object.defineProperty(E.prototype,"verifyError",{enumerable:!0,get:function(){return typeof this._primeCode!="number"&&(this._primeCode=W(this.__prime,this.__gen)),this._primeCode}}),E.prototype.generateKeys=function(){return this._priv||(this._priv=new Y(J(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()},E.prototype.computeSecret=function(D){D=new Y(D),D=D.toRed(this._prime);var C=D.redPow(this._priv).fromRed(),L=new F$(C.toArray()),R=this.getPrime();if(L.length0?_:N},U.min=function(_,N){return _.cmp(N)<0?_:N},U.prototype._init=function(_,N,x){if(typeof _=="number")return this._initNumber(_,N,x);if(typeof _=="object")return this._initArray(_,N,x);N==="hex"&&(N=16),G(N===(N|0)&&N>=2&&N<=36),_=_.toString().replace(/\s+/g,"");var B=0;_[0]==="-"&&(B++,this.negative=1),B<_.length&&(N===16?this._parseHex(_,B,x):(this._parseBase(_,N,B),x==="le"&&this._initArray(this.toArray(),N,x)))},U.prototype._initNumber=function(_,N,x){_<0&&(this.negative=1,_=-_),_<67108864?(this.words=[_&67108863],this.length=1):_<4503599627370496?(this.words=[_&67108863,_/67108864&67108863],this.length=2):(G(_<9007199254740992),this.words=[_&67108863,_/67108864&67108863,1],this.length=3),x==="le"&&this._initArray(this.toArray(),N,x)},U.prototype._initArray=function(_,N,x){if(G(typeof _.length=="number"),_.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(_.length/3),this.words=new Array(this.length);for(var B=0;B=0;B-=3)w=_[B]|_[B-1]<<8|_[B-2]<<16,this.words[y]|=w<>>26-p&67108863,p+=24,p>=26&&(p-=26,y++);else if(x==="le")for(B=0,y=0;B<_.length;B+=3)w=_[B]|_[B+1]<<8|_[B+2]<<16,this.words[y]|=w<>>26-p&67108863,p+=24,p>=26&&(p-=26,y++);return this._strip()};function K(_,N){var x=_.charCodeAt(N);if(x>=48&&x<=57)return x-48;if(x>=65&&x<=70)return x-55;if(x>=97&&x<=102)return x-87;G(!1,"Invalid character in "+_)}function I(_,N,x){var B=K(_,x);return x-1>=N&&(B|=K(_,x-1)<<4),B}U.prototype._parseHex=function(_,N,x){this.length=Math.ceil((_.length-N)/6),this.words=new Array(this.length);for(var B=0;B=N;B-=2)p=I(_,N,B)<=18?(y-=18,w+=1,this.words[w]|=p>>>26):y+=8;else{var f=_.length-N;for(B=f%2===0?N+1:N;B<_.length;B+=2)p=I(_,N,B)<=18?(y-=18,w+=1,this.words[w]|=p>>>26):y+=8}this._strip()};function O(_,N,x,B){for(var y=0,w=0,p=Math.min(_.length,x),f=N;f=49?w=c-49+10:c>=17?w=c-17+10:w=c,G(c>=0&&w1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},U.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<"u"&&typeof Symbol.for=="function")try{U.prototype[Symbol.for("nodejs.util.inspect.custom")]=F}catch{U.prototype.inspect=F}else U.prototype.inspect=F;function F(){return(this.red?""}var A=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],H=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],W=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64000000,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,24300000,28629151,33554432,39135393,45435424,52521875,60466176];U.prototype.toString=function(_,N){_=_||10,N=N|0||1;var x;if(_===16||_==="hex"){x="";for(var B=0,y=0,w=0;w>>24-B&16777215,B+=2,B>=26&&(B-=26,w--),y!==0||w!==this.length-1?x=A[6-f.length]+f+x:x=f+x}for(y!==0&&(x=y.toString(16)+x);x.length%N!==0;)x="0"+x;return this.negative!==0&&(x="-"+x),x}if(_===(_|0)&&_>=2&&_<=36){var c=H[_],h=W[_];x="";var d=this.clone();for(d.negative=0;!d.isZero();){var b=d.modrn(h).toString(_);d=d.idivn(h),d.isZero()?x=b+x:x=A[c-b.length]+b+x}for(this.isZero()&&(x="0"+x);x.length%N!==0;)x="0"+x;return this.negative!==0&&(x="-"+x),x}G(!1,"Base should be between 2 and 36")},U.prototype.toNumber=function(){var _=this.words[0];return this.length===2?_+=this.words[1]*67108864:this.length===3&&this.words[2]===1?_+=4503599627370496+this.words[1]*67108864:this.length>2&&G(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-_:_},U.prototype.toJSON=function(){return this.toString(16,2)},X&&(U.prototype.toBuffer=function(_,N){return this.toArrayLike(X,_,N)}),U.prototype.toArray=function(_,N){return this.toArrayLike(Array,_,N)};var E=function(_,N){return _.allocUnsafe?_.allocUnsafe(N):new _(N)};U.prototype.toArrayLike=function(_,N,x){this._strip();var B=this.byteLength(),y=x||Math.max(1,B);G(B<=y,"byte array longer than desired length"),G(y>0,"Requested array length <= 0");var w=E(_,y),p=N==="le"?"LE":"BE";return this["_toArrayLike"+p](w,B),w},U.prototype._toArrayLikeLE=function(_,N){for(var x=0,B=0,y=0,w=0;y>8&255),x<_.length&&(_[x++]=p>>16&255),w===6?(x<_.length&&(_[x++]=p>>24&255),B=0,w=0):(B=p>>>24,w+=2)}if(x<_.length)for(_[x++]=B;x<_.length;)_[x++]=0},U.prototype._toArrayLikeBE=function(_,N){for(var x=_.length-1,B=0,y=0,w=0;y=0&&(_[x--]=p>>8&255),x>=0&&(_[x--]=p>>16&255),w===6?(x>=0&&(_[x--]=p>>24&255),B=0,w=0):(B=p>>>24,w+=2)}if(x>=0)for(_[x--]=B;x>=0;)_[x--]=0},Math.clz32?U.prototype._countBits=function(_){return 32-Math.clz32(_)}:U.prototype._countBits=function(_){var N=_,x=0;return N>=4096&&(x+=13,N>>>=13),N>=64&&(x+=7,N>>>=7),N>=8&&(x+=4,N>>>=4),N>=2&&(x+=2,N>>>=2),x+N},U.prototype._zeroBits=function(_){if(_===0)return 26;var N=_,x=0;return(N&8191)===0&&(x+=13,N>>>=13),(N&127)===0&&(x+=7,N>>>=7),(N&15)===0&&(x+=4,N>>>=4),(N&3)===0&&(x+=2,N>>>=2),(N&1)===0&&x++,x},U.prototype.bitLength=function(){var _=this.words[this.length-1],N=this._countBits(_);return(this.length-1)*26+N};function T(_){for(var N=new Array(_.bitLength()),x=0;x>>y&1}return N}U.prototype.zeroBits=function(){if(this.isZero())return 0;for(var _=0,N=0;N_.length?this.clone().ior(_):_.clone().ior(this)},U.prototype.uor=function(_){return this.length>_.length?this.clone().iuor(_):_.clone().iuor(this)},U.prototype.iuand=function(_){var N;this.length>_.length?N=_:N=this;for(var x=0;x_.length?this.clone().iand(_):_.clone().iand(this)},U.prototype.uand=function(_){return this.length>_.length?this.clone().iuand(_):_.clone().iuand(this)},U.prototype.iuxor=function(_){var N,x;this.length>_.length?(N=this,x=_):(N=_,x=this);for(var B=0;B_.length?this.clone().ixor(_):_.clone().ixor(this)},U.prototype.uxor=function(_){return this.length>_.length?this.clone().iuxor(_):_.clone().iuxor(this)},U.prototype.inotn=function(_){G(typeof _=="number"&&_>=0);var N=Math.ceil(_/26)|0,x=_%26;this._expand(N),x>0&&N--;for(var B=0;B0&&(this.words[B]=~this.words[B]&67108863>>26-x),this._strip()},U.prototype.notn=function(_){return this.clone().inotn(_)},U.prototype.setn=function(_,N){G(typeof _=="number"&&_>=0);var x=_/26|0,B=_%26;return this._expand(x+1),N?this.words[x]=this.words[x]|1<_.length?(x=this,B=_):(x=_,B=this);for(var y=0,w=0;w>>26;for(;y!==0&&w>>26;if(this.length=x.length,y!==0)this.words[this.length]=y,this.length++;else if(x!==this)for(;w_.length?this.clone().iadd(_):_.clone().iadd(this)},U.prototype.isub=function(_){if(_.negative!==0){_.negative=0;var N=this.iadd(_);return _.negative=1,N._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(_),this.negative=1,this._normSign();var x=this.cmp(_);if(x===0)return this.negative=0,this.length=1,this.words[0]=0,this;var B,y;x>0?(B=this,y=_):(B=_,y=this);for(var w=0,p=0;p>26,this.words[p]=N&67108863;for(;w!==0&&p>26,this.words[p]=N&67108863;if(w===0&&p>>26,b=c&67108863,l=Math.min(h,N.length-1),o=Math.max(0,h-_.length+1);o<=l;o++){var u=h-o|0;y=_.words[u]|0,w=N.words[o]|0,p=y*w+b,d+=p/67108864|0,b=p&67108863}x.words[h]=b|0,c=d|0}return c!==0?x.words[h]=c|0:x.length--,x._strip()}var C=function(_,N,x){var B=_.words,y=N.words,w=x.words,p=0,f,c,h,d=B[0]|0,b=d&8191,l=d>>>13,o=B[1]|0,u=o&8191,n=o>>>13,s=B[2]|0,t=s&8191,m=s>>>13,a=B[3]|0,e=a&8191,r=a>>>13,i=B[4]|0,$0=i&8191,Q0=i>>>13,Y0=B[5]|0,Z0=Y0&8191,G0=Y0>>>13,V0=B[6]|0,U0=V0&8191,X0=V0>>>13,K0=B[7]|0,I0=K0&8191,O0=K0>>>13,J0=B[8]|0,F0=J0&8191,A0=J0>>>13,H0=B[9]|0,W0=H0&8191,E0=H0>>>13,T0=y[0]|0,D0=T0&8191,C0=T0>>>13,L0=y[1]|0,R0=L0&8191,P0=L0>>>13,z0=y[2]|0,M0=z0&8191,S0=z0>>>13,v0=y[3]|0,q0=v0&8191,j0=v0>>>13,k0=y[4]|0,g0=k0&8191,_0=k0>>>13,N0=y[5]|0,x0=N0&8191,B0=N0>>>13,y0=y[6]|0,w0=y0&8191,p0=y0>>>13,f0=y[7]|0,c0=f0&8191,h0=f0>>>13,d0=y[8]|0,b0=d0&8191,l0=d0>>>13,o0=y[9]|0,u0=o0&8191,n0=o0>>>13;x.negative=_.negative^N.negative,x.length=19,f=Math.imul(b,D0),c=Math.imul(b,C0),c=c+Math.imul(l,D0)|0,h=Math.imul(l,C0);var s0=(p+f|0)+((c&8191)<<13)|0;p=(h+(c>>>13)|0)+(s0>>>26)|0,s0&=67108863,f=Math.imul(u,D0),c=Math.imul(u,C0),c=c+Math.imul(n,D0)|0,h=Math.imul(n,C0),f=f+Math.imul(b,R0)|0,c=c+Math.imul(b,P0)|0,c=c+Math.imul(l,R0)|0,h=h+Math.imul(l,P0)|0;var t0=(p+f|0)+((c&8191)<<13)|0;p=(h+(c>>>13)|0)+(t0>>>26)|0,t0&=67108863,f=Math.imul(t,D0),c=Math.imul(t,C0),c=c+Math.imul(m,D0)|0,h=Math.imul(m,C0),f=f+Math.imul(u,R0)|0,c=c+Math.imul(u,P0)|0,c=c+Math.imul(n,R0)|0,h=h+Math.imul(n,P0)|0,f=f+Math.imul(b,M0)|0,c=c+Math.imul(b,S0)|0,c=c+Math.imul(l,M0)|0,h=h+Math.imul(l,S0)|0;var m0=(p+f|0)+((c&8191)<<13)|0;p=(h+(c>>>13)|0)+(m0>>>26)|0,m0&=67108863,f=Math.imul(e,D0),c=Math.imul(e,C0),c=c+Math.imul(r,D0)|0,h=Math.imul(r,C0),f=f+Math.imul(t,R0)|0,c=c+Math.imul(t,P0)|0,c=c+Math.imul(m,R0)|0,h=h+Math.imul(m,P0)|0,f=f+Math.imul(u,M0)|0,c=c+Math.imul(u,S0)|0,c=c+Math.imul(n,M0)|0,h=h+Math.imul(n,S0)|0,f=f+Math.imul(b,q0)|0,c=c+Math.imul(b,j0)|0,c=c+Math.imul(l,q0)|0,h=h+Math.imul(l,j0)|0;var a0=(p+f|0)+((c&8191)<<13)|0;p=(h+(c>>>13)|0)+(a0>>>26)|0,a0&=67108863,f=Math.imul($0,D0),c=Math.imul($0,C0),c=c+Math.imul(Q0,D0)|0,h=Math.imul(Q0,C0),f=f+Math.imul(e,R0)|0,c=c+Math.imul(e,P0)|0,c=c+Math.imul(r,R0)|0,h=h+Math.imul(r,P0)|0,f=f+Math.imul(t,M0)|0,c=c+Math.imul(t,S0)|0,c=c+Math.imul(m,M0)|0,h=h+Math.imul(m,S0)|0,f=f+Math.imul(u,q0)|0,c=c+Math.imul(u,j0)|0,c=c+Math.imul(n,q0)|0,h=h+Math.imul(n,j0)|0,f=f+Math.imul(b,g0)|0,c=c+Math.imul(b,_0)|0,c=c+Math.imul(l,g0)|0,h=h+Math.imul(l,_0)|0;var e0=(p+f|0)+((c&8191)<<13)|0;p=(h+(c>>>13)|0)+(e0>>>26)|0,e0&=67108863,f=Math.imul(Z0,D0),c=Math.imul(Z0,C0),c=c+Math.imul(G0,D0)|0,h=Math.imul(G0,C0),f=f+Math.imul($0,R0)|0,c=c+Math.imul($0,P0)|0,c=c+Math.imul(Q0,R0)|0,h=h+Math.imul(Q0,P0)|0,f=f+Math.imul(e,M0)|0,c=c+Math.imul(e,S0)|0,c=c+Math.imul(r,M0)|0,h=h+Math.imul(r,S0)|0,f=f+Math.imul(t,q0)|0,c=c+Math.imul(t,j0)|0,c=c+Math.imul(m,q0)|0,h=h+Math.imul(m,j0)|0,f=f+Math.imul(u,g0)|0,c=c+Math.imul(u,_0)|0,c=c+Math.imul(n,g0)|0,h=h+Math.imul(n,_0)|0,f=f+Math.imul(b,x0)|0,c=c+Math.imul(b,B0)|0,c=c+Math.imul(l,x0)|0,h=h+Math.imul(l,B0)|0;var r0=(p+f|0)+((c&8191)<<13)|0;p=(h+(c>>>13)|0)+(r0>>>26)|0,r0&=67108863,f=Math.imul(U0,D0),c=Math.imul(U0,C0),c=c+Math.imul(X0,D0)|0,h=Math.imul(X0,C0),f=f+Math.imul(Z0,R0)|0,c=c+Math.imul(Z0,P0)|0,c=c+Math.imul(G0,R0)|0,h=h+Math.imul(G0,P0)|0,f=f+Math.imul($0,M0)|0,c=c+Math.imul($0,S0)|0,c=c+Math.imul(Q0,M0)|0,h=h+Math.imul(Q0,S0)|0,f=f+Math.imul(e,q0)|0,c=c+Math.imul(e,j0)|0,c=c+Math.imul(r,q0)|0,h=h+Math.imul(r,j0)|0,f=f+Math.imul(t,g0)|0,c=c+Math.imul(t,_0)|0,c=c+Math.imul(m,g0)|0,h=h+Math.imul(m,_0)|0,f=f+Math.imul(u,x0)|0,c=c+Math.imul(u,B0)|0,c=c+Math.imul(n,x0)|0,h=h+Math.imul(n,B0)|0,f=f+Math.imul(b,w0)|0,c=c+Math.imul(b,p0)|0,c=c+Math.imul(l,w0)|0,h=h+Math.imul(l,p0)|0;var i0=(p+f|0)+((c&8191)<<13)|0;p=(h+(c>>>13)|0)+(i0>>>26)|0,i0&=67108863,f=Math.imul(I0,D0),c=Math.imul(I0,C0),c=c+Math.imul(O0,D0)|0,h=Math.imul(O0,C0),f=f+Math.imul(U0,R0)|0,c=c+Math.imul(U0,P0)|0,c=c+Math.imul(X0,R0)|0,h=h+Math.imul(X0,P0)|0,f=f+Math.imul(Z0,M0)|0,c=c+Math.imul(Z0,S0)|0,c=c+Math.imul(G0,M0)|0,h=h+Math.imul(G0,S0)|0,f=f+Math.imul($0,q0)|0,c=c+Math.imul($0,j0)|0,c=c+Math.imul(Q0,q0)|0,h=h+Math.imul(Q0,j0)|0,f=f+Math.imul(e,g0)|0,c=c+Math.imul(e,_0)|0,c=c+Math.imul(r,g0)|0,h=h+Math.imul(r,_0)|0,f=f+Math.imul(t,x0)|0,c=c+Math.imul(t,B0)|0,c=c+Math.imul(m,x0)|0,h=h+Math.imul(m,B0)|0,f=f+Math.imul(u,w0)|0,c=c+Math.imul(u,p0)|0,c=c+Math.imul(n,w0)|0,h=h+Math.imul(n,p0)|0,f=f+Math.imul(b,c0)|0,c=c+Math.imul(b,h0)|0,c=c+Math.imul(l,c0)|0,h=h+Math.imul(l,h0)|0;var $$=(p+f|0)+((c&8191)<<13)|0;p=(h+(c>>>13)|0)+($$>>>26)|0,$$&=67108863,f=Math.imul(F0,D0),c=Math.imul(F0,C0),c=c+Math.imul(A0,D0)|0,h=Math.imul(A0,C0),f=f+Math.imul(I0,R0)|0,c=c+Math.imul(I0,P0)|0,c=c+Math.imul(O0,R0)|0,h=h+Math.imul(O0,P0)|0,f=f+Math.imul(U0,M0)|0,c=c+Math.imul(U0,S0)|0,c=c+Math.imul(X0,M0)|0,h=h+Math.imul(X0,S0)|0,f=f+Math.imul(Z0,q0)|0,c=c+Math.imul(Z0,j0)|0,c=c+Math.imul(G0,q0)|0,h=h+Math.imul(G0,j0)|0,f=f+Math.imul($0,g0)|0,c=c+Math.imul($0,_0)|0,c=c+Math.imul(Q0,g0)|0,h=h+Math.imul(Q0,_0)|0,f=f+Math.imul(e,x0)|0,c=c+Math.imul(e,B0)|0,c=c+Math.imul(r,x0)|0,h=h+Math.imul(r,B0)|0,f=f+Math.imul(t,w0)|0,c=c+Math.imul(t,p0)|0,c=c+Math.imul(m,w0)|0,h=h+Math.imul(m,p0)|0,f=f+Math.imul(u,c0)|0,c=c+Math.imul(u,h0)|0,c=c+Math.imul(n,c0)|0,h=h+Math.imul(n,h0)|0,f=f+Math.imul(b,b0)|0,c=c+Math.imul(b,l0)|0,c=c+Math.imul(l,b0)|0,h=h+Math.imul(l,l0)|0;var Q$=(p+f|0)+((c&8191)<<13)|0;p=(h+(c>>>13)|0)+(Q$>>>26)|0,Q$&=67108863,f=Math.imul(W0,D0),c=Math.imul(W0,C0),c=c+Math.imul(E0,D0)|0,h=Math.imul(E0,C0),f=f+Math.imul(F0,R0)|0,c=c+Math.imul(F0,P0)|0,c=c+Math.imul(A0,R0)|0,h=h+Math.imul(A0,P0)|0,f=f+Math.imul(I0,M0)|0,c=c+Math.imul(I0,S0)|0,c=c+Math.imul(O0,M0)|0,h=h+Math.imul(O0,S0)|0,f=f+Math.imul(U0,q0)|0,c=c+Math.imul(U0,j0)|0,c=c+Math.imul(X0,q0)|0,h=h+Math.imul(X0,j0)|0,f=f+Math.imul(Z0,g0)|0,c=c+Math.imul(Z0,_0)|0,c=c+Math.imul(G0,g0)|0,h=h+Math.imul(G0,_0)|0,f=f+Math.imul($0,x0)|0,c=c+Math.imul($0,B0)|0,c=c+Math.imul(Q0,x0)|0,h=h+Math.imul(Q0,B0)|0,f=f+Math.imul(e,w0)|0,c=c+Math.imul(e,p0)|0,c=c+Math.imul(r,w0)|0,h=h+Math.imul(r,p0)|0,f=f+Math.imul(t,c0)|0,c=c+Math.imul(t,h0)|0,c=c+Math.imul(m,c0)|0,h=h+Math.imul(m,h0)|0,f=f+Math.imul(u,b0)|0,c=c+Math.imul(u,l0)|0,c=c+Math.imul(n,b0)|0,h=h+Math.imul(n,l0)|0,f=f+Math.imul(b,u0)|0,c=c+Math.imul(b,n0)|0,c=c+Math.imul(l,u0)|0,h=h+Math.imul(l,n0)|0;var Y$=(p+f|0)+((c&8191)<<13)|0;p=(h+(c>>>13)|0)+(Y$>>>26)|0,Y$&=67108863,f=Math.imul(W0,R0),c=Math.imul(W0,P0),c=c+Math.imul(E0,R0)|0,h=Math.imul(E0,P0),f=f+Math.imul(F0,M0)|0,c=c+Math.imul(F0,S0)|0,c=c+Math.imul(A0,M0)|0,h=h+Math.imul(A0,S0)|0,f=f+Math.imul(I0,q0)|0,c=c+Math.imul(I0,j0)|0,c=c+Math.imul(O0,q0)|0,h=h+Math.imul(O0,j0)|0,f=f+Math.imul(U0,g0)|0,c=c+Math.imul(U0,_0)|0,c=c+Math.imul(X0,g0)|0,h=h+Math.imul(X0,_0)|0,f=f+Math.imul(Z0,x0)|0,c=c+Math.imul(Z0,B0)|0,c=c+Math.imul(G0,x0)|0,h=h+Math.imul(G0,B0)|0,f=f+Math.imul($0,w0)|0,c=c+Math.imul($0,p0)|0,c=c+Math.imul(Q0,w0)|0,h=h+Math.imul(Q0,p0)|0,f=f+Math.imul(e,c0)|0,c=c+Math.imul(e,h0)|0,c=c+Math.imul(r,c0)|0,h=h+Math.imul(r,h0)|0,f=f+Math.imul(t,b0)|0,c=c+Math.imul(t,l0)|0,c=c+Math.imul(m,b0)|0,h=h+Math.imul(m,l0)|0,f=f+Math.imul(u,u0)|0,c=c+Math.imul(u,n0)|0,c=c+Math.imul(n,u0)|0,h=h+Math.imul(n,n0)|0;var Z$=(p+f|0)+((c&8191)<<13)|0;p=(h+(c>>>13)|0)+(Z$>>>26)|0,Z$&=67108863,f=Math.imul(W0,M0),c=Math.imul(W0,S0),c=c+Math.imul(E0,M0)|0,h=Math.imul(E0,S0),f=f+Math.imul(F0,q0)|0,c=c+Math.imul(F0,j0)|0,c=c+Math.imul(A0,q0)|0,h=h+Math.imul(A0,j0)|0,f=f+Math.imul(I0,g0)|0,c=c+Math.imul(I0,_0)|0,c=c+Math.imul(O0,g0)|0,h=h+Math.imul(O0,_0)|0,f=f+Math.imul(U0,x0)|0,c=c+Math.imul(U0,B0)|0,c=c+Math.imul(X0,x0)|0,h=h+Math.imul(X0,B0)|0,f=f+Math.imul(Z0,w0)|0,c=c+Math.imul(Z0,p0)|0,c=c+Math.imul(G0,w0)|0,h=h+Math.imul(G0,p0)|0,f=f+Math.imul($0,c0)|0,c=c+Math.imul($0,h0)|0,c=c+Math.imul(Q0,c0)|0,h=h+Math.imul(Q0,h0)|0,f=f+Math.imul(e,b0)|0,c=c+Math.imul(e,l0)|0,c=c+Math.imul(r,b0)|0,h=h+Math.imul(r,l0)|0,f=f+Math.imul(t,u0)|0,c=c+Math.imul(t,n0)|0,c=c+Math.imul(m,u0)|0,h=h+Math.imul(m,n0)|0;var G$=(p+f|0)+((c&8191)<<13)|0;p=(h+(c>>>13)|0)+(G$>>>26)|0,G$&=67108863,f=Math.imul(W0,q0),c=Math.imul(W0,j0),c=c+Math.imul(E0,q0)|0,h=Math.imul(E0,j0),f=f+Math.imul(F0,g0)|0,c=c+Math.imul(F0,_0)|0,c=c+Math.imul(A0,g0)|0,h=h+Math.imul(A0,_0)|0,f=f+Math.imul(I0,x0)|0,c=c+Math.imul(I0,B0)|0,c=c+Math.imul(O0,x0)|0,h=h+Math.imul(O0,B0)|0,f=f+Math.imul(U0,w0)|0,c=c+Math.imul(U0,p0)|0,c=c+Math.imul(X0,w0)|0,h=h+Math.imul(X0,p0)|0,f=f+Math.imul(Z0,c0)|0,c=c+Math.imul(Z0,h0)|0,c=c+Math.imul(G0,c0)|0,h=h+Math.imul(G0,h0)|0,f=f+Math.imul($0,b0)|0,c=c+Math.imul($0,l0)|0,c=c+Math.imul(Q0,b0)|0,h=h+Math.imul(Q0,l0)|0,f=f+Math.imul(e,u0)|0,c=c+Math.imul(e,n0)|0,c=c+Math.imul(r,u0)|0,h=h+Math.imul(r,n0)|0;var V$=(p+f|0)+((c&8191)<<13)|0;p=(h+(c>>>13)|0)+(V$>>>26)|0,V$&=67108863,f=Math.imul(W0,g0),c=Math.imul(W0,_0),c=c+Math.imul(E0,g0)|0,h=Math.imul(E0,_0),f=f+Math.imul(F0,x0)|0,c=c+Math.imul(F0,B0)|0,c=c+Math.imul(A0,x0)|0,h=h+Math.imul(A0,B0)|0,f=f+Math.imul(I0,w0)|0,c=c+Math.imul(I0,p0)|0,c=c+Math.imul(O0,w0)|0,h=h+Math.imul(O0,p0)|0,f=f+Math.imul(U0,c0)|0,c=c+Math.imul(U0,h0)|0,c=c+Math.imul(X0,c0)|0,h=h+Math.imul(X0,h0)|0,f=f+Math.imul(Z0,b0)|0,c=c+Math.imul(Z0,l0)|0,c=c+Math.imul(G0,b0)|0,h=h+Math.imul(G0,l0)|0,f=f+Math.imul($0,u0)|0,c=c+Math.imul($0,n0)|0,c=c+Math.imul(Q0,u0)|0,h=h+Math.imul(Q0,n0)|0;var U$=(p+f|0)+((c&8191)<<13)|0;p=(h+(c>>>13)|0)+(U$>>>26)|0,U$&=67108863,f=Math.imul(W0,x0),c=Math.imul(W0,B0),c=c+Math.imul(E0,x0)|0,h=Math.imul(E0,B0),f=f+Math.imul(F0,w0)|0,c=c+Math.imul(F0,p0)|0,c=c+Math.imul(A0,w0)|0,h=h+Math.imul(A0,p0)|0,f=f+Math.imul(I0,c0)|0,c=c+Math.imul(I0,h0)|0,c=c+Math.imul(O0,c0)|0,h=h+Math.imul(O0,h0)|0,f=f+Math.imul(U0,b0)|0,c=c+Math.imul(U0,l0)|0,c=c+Math.imul(X0,b0)|0,h=h+Math.imul(X0,l0)|0,f=f+Math.imul(Z0,u0)|0,c=c+Math.imul(Z0,n0)|0,c=c+Math.imul(G0,u0)|0,h=h+Math.imul(G0,n0)|0;var X$=(p+f|0)+((c&8191)<<13)|0;p=(h+(c>>>13)|0)+(X$>>>26)|0,X$&=67108863,f=Math.imul(W0,w0),c=Math.imul(W0,p0),c=c+Math.imul(E0,w0)|0,h=Math.imul(E0,p0),f=f+Math.imul(F0,c0)|0,c=c+Math.imul(F0,h0)|0,c=c+Math.imul(A0,c0)|0,h=h+Math.imul(A0,h0)|0,f=f+Math.imul(I0,b0)|0,c=c+Math.imul(I0,l0)|0,c=c+Math.imul(O0,b0)|0,h=h+Math.imul(O0,l0)|0,f=f+Math.imul(U0,u0)|0,c=c+Math.imul(U0,n0)|0,c=c+Math.imul(X0,u0)|0,h=h+Math.imul(X0,n0)|0;var K$=(p+f|0)+((c&8191)<<13)|0;p=(h+(c>>>13)|0)+(K$>>>26)|0,K$&=67108863,f=Math.imul(W0,c0),c=Math.imul(W0,h0),c=c+Math.imul(E0,c0)|0,h=Math.imul(E0,h0),f=f+Math.imul(F0,b0)|0,c=c+Math.imul(F0,l0)|0,c=c+Math.imul(A0,b0)|0,h=h+Math.imul(A0,l0)|0,f=f+Math.imul(I0,u0)|0,c=c+Math.imul(I0,n0)|0,c=c+Math.imul(O0,u0)|0,h=h+Math.imul(O0,n0)|0;var I$=(p+f|0)+((c&8191)<<13)|0;p=(h+(c>>>13)|0)+(I$>>>26)|0,I$&=67108863,f=Math.imul(W0,b0),c=Math.imul(W0,l0),c=c+Math.imul(E0,b0)|0,h=Math.imul(E0,l0),f=f+Math.imul(F0,u0)|0,c=c+Math.imul(F0,n0)|0,c=c+Math.imul(A0,u0)|0,h=h+Math.imul(A0,n0)|0;var O$=(p+f|0)+((c&8191)<<13)|0;p=(h+(c>>>13)|0)+(O$>>>26)|0,O$&=67108863,f=Math.imul(W0,u0),c=Math.imul(W0,n0),c=c+Math.imul(E0,u0)|0,h=Math.imul(E0,n0);var J$=(p+f|0)+((c&8191)<<13)|0;return p=(h+(c>>>13)|0)+(J$>>>26)|0,J$&=67108863,w[0]=s0,w[1]=t0,w[2]=m0,w[3]=a0,w[4]=e0,w[5]=r0,w[6]=i0,w[7]=$$,w[8]=Q$,w[9]=Y$,w[10]=Z$,w[11]=G$,w[12]=V$,w[13]=U$,w[14]=X$,w[15]=K$,w[16]=I$,w[17]=O$,w[18]=J$,p!==0&&(w[19]=p,x.length++),x};Math.imul||(C=D);function L(_,N,x){x.negative=N.negative^_.negative,x.length=_.length+N.length;for(var B=0,y=0,w=0;w>>26)|0,y+=p>>>26,p&=67108863}x.words[w]=f,B=p,p=y}return B!==0?x.words[w]=B:x.length--,x._strip()}function R(_,N,x){return L(_,N,x)}U.prototype.mulTo=function(_,N){var x,B=this.length+_.length;return this.length===10&&_.length===10?x=C(this,_,N):B<63?x=D(this,_,N):B<1024?x=L(this,_,N):x=R(this,_,N),x};function P(_,N){this.x=_,this.y=N}P.prototype.makeRBT=function(_){for(var N=new Array(_),x=U.prototype._countBits(_)-1,B=0;B<_;B++)N[B]=this.revBin(B,x,_);return N},P.prototype.revBin=function(_,N,x){if(_===0||_===x-1)return _;for(var B=0,y=0;y>=1;return B},P.prototype.permute=function(_,N,x,B,y,w){for(var p=0;p>>1)y++;return 1<>>13,x[2*w+1]=y&8191,y=y>>>13;for(w=2*N;w>=26,x+=y/67108864|0,x+=w>>>26,this.words[B]=w&67108863}return x!==0&&(this.words[B]=x,this.length++),N?this.ineg():this},U.prototype.muln=function(_){return this.clone().imuln(_)},U.prototype.sqr=function(){return this.mul(this)},U.prototype.isqr=function(){return this.imul(this.clone())},U.prototype.pow=function(_){var N=T(_);if(N.length===0)return new U(1);for(var x=this,B=0;B=0);var N=_%26,x=(_-N)/26,B=67108863>>>26-N<<26-N,y;if(N!==0){var w=0;for(y=0;y>>26-N}w&&(this.words[y]=w,this.length++)}if(x!==0){for(y=this.length-1;y>=0;y--)this.words[y+x]=this.words[y];for(y=0;y=0);var B;N?B=(N-N%26)/26:B=0;var y=_%26,w=Math.min((_-y)/26,this.length),p=67108863^67108863>>>y<w)for(this.length-=w,c=0;c=0&&(h!==0||c>=B);c--){var d=this.words[c]|0;this.words[c]=h<<26-y|d>>>y,h=d&p}return f&&h!==0&&(f.words[f.length++]=h),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},U.prototype.ishrn=function(_,N,x){return G(this.negative===0),this.iushrn(_,N,x)},U.prototype.shln=function(_){return this.clone().ishln(_)},U.prototype.ushln=function(_){return this.clone().iushln(_)},U.prototype.shrn=function(_){return this.clone().ishrn(_)},U.prototype.ushrn=function(_){return this.clone().iushrn(_)},U.prototype.testn=function(_){G(typeof _=="number"&&_>=0);var N=_%26,x=(_-N)/26,B=1<=0);var N=_%26,x=(_-N)/26;if(G(this.negative===0,"imaskn works only with positive numbers"),this.length<=x)return this;if(N!==0&&x++,this.length=Math.min(x,this.length),N!==0){var B=67108863^67108863>>>N<=67108864;N++)this.words[N]-=67108864,N===this.length-1?this.words[N+1]=1:this.words[N+1]++;return this.length=Math.max(this.length,N+1),this},U.prototype.isubn=function(_){if(G(typeof _=="number"),G(_<67108864),_<0)return this.iaddn(-_);if(this.negative!==0)return this.negative=0,this.iaddn(_),this.negative=1,this;if(this.words[0]-=_,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var N=0;N>26)-(f/67108864|0),this.words[y+x]=w&67108863}for(;y>26,this.words[y+x]=w&67108863;if(p===0)return this._strip();for(G(p===-1),p=0,y=0;y>26,this.words[y]=w&67108863;return this.negative=1,this._strip()},U.prototype._wordDiv=function(_,N){var x=this.length-_.length,B=this.clone(),y=_,w=y.words[y.length-1]|0,p=this._countBits(w);x=26-p,x!==0&&(y=y.ushln(x),B.iushln(x),w=y.words[y.length-1]|0);var f=B.length-y.length,c;if(N!=="mod"){c=new U(null),c.length=f+1,c.words=new Array(c.length);for(var h=0;h=0;b--){var l=(B.words[y.length+b]|0)*67108864+(B.words[y.length+b-1]|0);for(l=Math.min(l/w|0,67108863),B._ishlnsubmul(y,l,b);B.negative!==0;)l--,B.negative=0,B._ishlnsubmul(y,1,b),B.isZero()||(B.negative^=1);c&&(c.words[b]=l)}return c&&c._strip(),B._strip(),N!=="div"&&x!==0&&B.iushrn(x),{div:c||null,mod:B}},U.prototype.divmod=function(_,N,x){if(G(!_.isZero()),this.isZero())return{div:new U(0),mod:new U(0)};var B,y,w;return this.negative!==0&&_.negative===0?(w=this.neg().divmod(_,N),N!=="mod"&&(B=w.div.neg()),N!=="div"&&(y=w.mod.neg(),x&&y.negative!==0&&y.iadd(_)),{div:B,mod:y}):this.negative===0&&_.negative!==0?(w=this.divmod(_.neg(),N),N!=="mod"&&(B=w.div.neg()),{div:B,mod:w.mod}):(this.negative&_.negative)!==0?(w=this.neg().divmod(_.neg(),N),N!=="div"&&(y=w.mod.neg(),x&&y.negative!==0&&y.isub(_)),{div:w.div,mod:y}):_.length>this.length||this.cmp(_)<0?{div:new U(0),mod:this}:_.length===1?N==="div"?{div:this.divn(_.words[0]),mod:null}:N==="mod"?{div:null,mod:new U(this.modrn(_.words[0]))}:{div:this.divn(_.words[0]),mod:new U(this.modrn(_.words[0]))}:this._wordDiv(_,N)},U.prototype.div=function(_){return this.divmod(_,"div",!1).div},U.prototype.mod=function(_){return this.divmod(_,"mod",!1).mod},U.prototype.umod=function(_){return this.divmod(_,"mod",!0).mod},U.prototype.divRound=function(_){var N=this.divmod(_);if(N.mod.isZero())return N.div;var x=N.div.negative!==0?N.mod.isub(_):N.mod,B=_.ushrn(1),y=_.andln(1),w=x.cmp(B);return w<0||y===1&&w===0?N.div:N.div.negative!==0?N.div.isubn(1):N.div.iaddn(1)},U.prototype.modrn=function(_){var N=_<0;N&&(_=-_),G(_<=67108863);for(var x=(1<<26)%_,B=0,y=this.length-1;y>=0;y--)B=(x*B+(this.words[y]|0))%_;return N?-B:B},U.prototype.modn=function(_){return this.modrn(_)},U.prototype.idivn=function(_){var N=_<0;N&&(_=-_),G(_<=67108863);for(var x=0,B=this.length-1;B>=0;B--){var y=(this.words[B]|0)+x*67108864;this.words[B]=y/_|0,x=y%_}return this._strip(),N?this.ineg():this},U.prototype.divn=function(_){return this.clone().idivn(_)},U.prototype.egcd=function(_){G(_.negative===0),G(!_.isZero());var N=this,x=_.clone();N.negative!==0?N=N.umod(_):N=N.clone();for(var B=new U(1),y=new U(0),w=new U(0),p=new U(1),f=0;N.isEven()&&x.isEven();)N.iushrn(1),x.iushrn(1),++f;for(var c=x.clone(),h=N.clone();!N.isZero();){for(var d=0,b=1;(N.words[0]&b)===0&&d<26;++d,b<<=1);if(d>0)for(N.iushrn(d);d-- >0;)(B.isOdd()||y.isOdd())&&(B.iadd(c),y.isub(h)),B.iushrn(1),y.iushrn(1);for(var l=0,o=1;(x.words[0]&o)===0&&l<26;++l,o<<=1);if(l>0)for(x.iushrn(l);l-- >0;)(w.isOdd()||p.isOdd())&&(w.iadd(c),p.isub(h)),w.iushrn(1),p.iushrn(1);N.cmp(x)>=0?(N.isub(x),B.isub(w),y.isub(p)):(x.isub(N),w.isub(B),p.isub(y))}return{a:w,b:p,gcd:x.iushln(f)}},U.prototype._invmp=function(_){G(_.negative===0),G(!_.isZero());var N=this,x=_.clone();N.negative!==0?N=N.umod(_):N=N.clone();for(var B=new U(1),y=new U(0),w=x.clone();N.cmpn(1)>0&&x.cmpn(1)>0;){for(var p=0,f=1;(N.words[0]&f)===0&&p<26;++p,f<<=1);if(p>0)for(N.iushrn(p);p-- >0;)B.isOdd()&&B.iadd(w),B.iushrn(1);for(var c=0,h=1;(x.words[0]&h)===0&&c<26;++c,h<<=1);if(c>0)for(x.iushrn(c);c-- >0;)y.isOdd()&&y.iadd(w),y.iushrn(1);N.cmp(x)>=0?(N.isub(x),B.isub(y)):(x.isub(N),y.isub(B))}var d;return N.cmpn(1)===0?d=B:d=y,d.cmpn(0)<0&&d.iadd(_),d},U.prototype.gcd=function(_){if(this.isZero())return _.abs();if(_.isZero())return this.abs();var N=this.clone(),x=_.clone();N.negative=0,x.negative=0;for(var B=0;N.isEven()&&x.isEven();B++)N.iushrn(1),x.iushrn(1);do{for(;N.isEven();)N.iushrn(1);for(;x.isEven();)x.iushrn(1);var y=N.cmp(x);if(y<0){var w=N;N=x,x=w}else if(y===0||x.cmpn(1)===0)break;N.isub(x)}while(!0);return x.iushln(B)},U.prototype.invm=function(_){return this.egcd(_).a.umod(_)},U.prototype.isEven=function(){return(this.words[0]&1)===0},U.prototype.isOdd=function(){return(this.words[0]&1)===1},U.prototype.andln=function(_){return this.words[0]&_},U.prototype.bincn=function(_){G(typeof _=="number");var N=_%26,x=(_-N)/26,B=1<>>26,p&=67108863,this.words[w]=p}return y!==0&&(this.words[w]=y,this.length++),this},U.prototype.isZero=function(){return this.length===1&&this.words[0]===0},U.prototype.cmpn=function(_){var N=_<0;if(this.negative!==0&&!N)return-1;if(this.negative===0&&N)return 1;this._strip();var x;if(this.length>1)x=1;else{N&&(_=-_),G(_<=67108863,"Number is too big");var B=this.words[0]|0;x=B===_?0:B<_?-1:1}return this.negative!==0?-x|0:x},U.prototype.cmp=function(_){if(this.negative!==0&&_.negative===0)return-1;if(this.negative===0&&_.negative!==0)return 1;var N=this.ucmp(_);return this.negative!==0?-N|0:N},U.prototype.ucmp=function(_){if(this.length>_.length)return 1;if(this.length<_.length)return-1;for(var N=0,x=this.length-1;x>=0;x--){var B=this.words[x]|0,y=_.words[x]|0;if(B!==y){By&&(N=1);break}}return N},U.prototype.gtn=function(_){return this.cmpn(_)===1},U.prototype.gt=function(_){return this.cmp(_)===1},U.prototype.gten=function(_){return this.cmpn(_)>=0},U.prototype.gte=function(_){return this.cmp(_)>=0},U.prototype.ltn=function(_){return this.cmpn(_)===-1},U.prototype.lt=function(_){return this.cmp(_)===-1},U.prototype.lten=function(_){return this.cmpn(_)<=0},U.prototype.lte=function(_){return this.cmp(_)<=0},U.prototype.eqn=function(_){return this.cmpn(_)===0},U.prototype.eq=function(_){return this.cmp(_)===0},U.red=function(_){return new k(_)},U.prototype.toRed=function(_){return G(!this.red,"Already a number in reduction context"),G(this.negative===0,"red works only with positives"),_.convertTo(this)._forceRed(_)},U.prototype.fromRed=function(){return G(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},U.prototype._forceRed=function(_){return this.red=_,this},U.prototype.forceRed=function(_){return G(!this.red,"Already a number in reduction context"),this._forceRed(_)},U.prototype.redAdd=function(_){return G(this.red,"redAdd works only with red numbers"),this.red.add(this,_)},U.prototype.redIAdd=function(_){return G(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,_)},U.prototype.redSub=function(_){return G(this.red,"redSub works only with red numbers"),this.red.sub(this,_)},U.prototype.redISub=function(_){return G(this.red,"redISub works only with red numbers"),this.red.isub(this,_)},U.prototype.redShl=function(_){return G(this.red,"redShl works only with red numbers"),this.red.shl(this,_)},U.prototype.redMul=function(_){return G(this.red,"redMul works only with red numbers"),this.red._verify2(this,_),this.red.mul(this,_)},U.prototype.redIMul=function(_){return G(this.red,"redMul works only with red numbers"),this.red._verify2(this,_),this.red.imul(this,_)},U.prototype.redSqr=function(){return G(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},U.prototype.redISqr=function(){return G(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},U.prototype.redSqrt=function(){return G(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},U.prototype.redInvm=function(){return G(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},U.prototype.redNeg=function(){return G(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},U.prototype.redPow=function(_){return G(this.red&&!_.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,_)};var z={k256:null,p224:null,p192:null,p25519:null};function M(_,N){this.name=_,this.p=new U(N,16),this.n=this.p.bitLength(),this.k=new U(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}M.prototype._tmp=function(){var _=new U(null);return _.words=new Array(Math.ceil(this.n/13)),_},M.prototype.ireduce=function(_){var N=_,x;do this.split(N,this.tmp),N=this.imulK(N),N=N.iadd(this.tmp),x=N.bitLength();while(x>this.n);var B=x0?N.isub(this.p):N.strip!==void 0?N.strip():N._strip(),N},M.prototype.split=function(_,N){_.iushrn(this.n,0,N)},M.prototype.imulK=function(_){return _.imul(this.k)};function S(){M.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}V(S,M),S.prototype.split=function(_,N){for(var x=4194303,B=Math.min(_.length,9),y=0;y>>22,w=p}w>>>=22,_.words[y-10]=w,w===0&&_.length>10?_.length-=10:_.length-=9},S.prototype.imulK=function(_){_.words[_.length]=0,_.words[_.length+1]=0,_.length+=2;for(var N=0,x=0;x<_.length;x++){var B=_.words[x]|0;N+=B*977,_.words[x]=N&67108863,N=B*64+(N/67108864|0)}return _.words[_.length-1]===0&&(_.length--,_.words[_.length-1]===0&&_.length--),_};function v(){M.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}V(v,M);function q(){M.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}V(q,M);function j(){M.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}V(j,M),j.prototype.imulK=function(_){for(var N=0,x=0;x<_.length;x++){var B=(_.words[x]|0)*19+N,y=B&67108863;B>>>=26,_.words[x]=y,N=B}return N!==0&&(_.words[_.length++]=N),_},U._prime=function(_){if(z[_])return z[_];var N;if(_==="k256")N=new S;else if(_==="p224")N=new v;else if(_==="p192")N=new q;else if(_==="p25519")N=new j;else throw new Error("Unknown prime "+_);return z[_]=N,N};function k(_){if(typeof _=="string"){var N=U._prime(_);this.m=N.p,this.prime=N}else G(_.gtn(1),"modulus must be greater than 1"),this.m=_,this.prime=null}k.prototype._verify1=function(_){G(_.negative===0,"red works only with positives"),G(_.red,"red works only with red numbers")},k.prototype._verify2=function(_,N){G((_.negative|N.negative)===0,"red works only with positives"),G(_.red&&_.red===N.red,"red works only with red numbers")},k.prototype.imod=function(_){return this.prime?this.prime.ireduce(_)._forceRed(this):(J(_,_.umod(this.m)._forceRed(this)),_)},k.prototype.neg=function(_){return _.isZero()?_.clone():this.m.sub(_)._forceRed(this)},k.prototype.add=function(_,N){this._verify2(_,N);var x=_.add(N);return x.cmp(this.m)>=0&&x.isub(this.m),x._forceRed(this)},k.prototype.iadd=function(_,N){this._verify2(_,N);var x=_.iadd(N);return x.cmp(this.m)>=0&&x.isub(this.m),x},k.prototype.sub=function(_,N){this._verify2(_,N);var x=_.sub(N);return x.cmpn(0)<0&&x.iadd(this.m),x._forceRed(this)},k.prototype.isub=function(_,N){this._verify2(_,N);var x=_.isub(N);return x.cmpn(0)<0&&x.iadd(this.m),x},k.prototype.shl=function(_,N){return this._verify1(_),this.imod(_.ushln(N))},k.prototype.imul=function(_,N){return this._verify2(_,N),this.imod(_.imul(N))},k.prototype.mul=function(_,N){return this._verify2(_,N),this.imod(_.mul(N))},k.prototype.isqr=function(_){return this.imul(_,_.clone())},k.prototype.sqr=function(_){return this.mul(_,_)},k.prototype.sqrt=function(_){if(_.isZero())return _.clone();var N=this.m.andln(3);if(G(N%2===1),N===3){var x=this.m.add(new U(1)).iushrn(2);return this.pow(_,x)}for(var B=this.m.subn(1),y=0;!B.isZero()&&B.andln(1)===0;)y++,B.iushrn(1);G(!B.isZero());var w=new U(1).toRed(this),p=w.redNeg(),f=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new U(2*c*c).toRed(this);this.pow(c,f).cmp(p)!==0;)c.redIAdd(p);for(var h=this.pow(c,B),d=this.pow(_,B.addn(1).iushrn(1)),b=this.pow(_,B),l=y;b.cmp(w)!==0;){for(var o=b,u=0;o.cmp(w)!==0;u++)o=o.redSqr();G(u=0;y--){for(var h=N.words[y],d=c-1;d>=0;d--){var b=h>>d&1;if(w!==B[0]&&(w=this.sqr(w)),b===0&&p===0){f=0;continue}p<<=1,p|=b,f++,!(f!==x&&(y!==0||d!==0))&&(w=this.mul(w,B[p]),f=0,p=0)}c=26}return w},k.prototype.convertTo=function(_){var N=_.umod(this.m);return N===_?N.clone():N},k.prototype.convertFrom=function(_){var N=_.clone();return N.red=null,N},U.mont=function(_){return new g(_)};function g(_){k.call(this,_),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new U(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}V(g,k),g.prototype.convertTo=function(_){return this.imod(_.ushln(this.shift))},g.prototype.convertFrom=function(_){var N=this.imod(_.mul(this.rinv));return N.red=null,N},g.prototype.imul=function(_,N){if(_.isZero()||N.isZero())return _.words[0]=0,_.length=1,_;var x=_.imul(N),B=x.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),y=x.isub(B).iushrn(this.shift),w=y;return y.cmp(this.m)>=0?w=y.isub(this.m):y.cmpn(0)<0&&(w=y.iadd(this.m)),w._forceRed(this)},g.prototype.mul=function(_,N){if(_.isZero()||N.isZero())return new U(0)._forceRed(this);var x=_.mul(N),B=x.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),y=x.isub(B).iushrn(this.shift),w=y;return y.cmp(this.m)>=0?w=y.isub(this.m):y.cmpn(0)<0&&(w=y.iadd(this.m)),w._forceRed(this)},g.prototype.invm=function(_){var N=this.imod(_._invmp(this.m).mul(this.r2));return N._forceRed(this)}})(typeof Q>"u"||Q,$)}}),hQ=q$({"node_modules/browserify-rsa/index.js"($,Q){var Y=cQ(),Z=g$();function G(X){var K=V(X),I=K.toRed(Y.mont(X.modulus)).redPow(new Y(X.publicExponent)).fromRed();return{blinder:I,unblinder:K.invm(X.modulus)}}function V(X){var K=X.modulus.byteLength(),I;do I=new Y(Z(K));while(I.cmp(X.modulus)>=0||!I.umod(X.prime1)||!I.umod(X.prime2));return I}function U(X,K){var I=G(K),O=K.modulus.byteLength(),J=new Y(X).mul(I.blinder).umod(K.modulus),F=J.toRed(Y.mont(K.prime1)),A=J.toRed(Y.mont(K.prime2)),H=K.coefficient,W=K.prime1,E=K.prime2,T=F.redPow(K.exponent1).fromRed(),D=A.redPow(K.exponent2).fromRed(),C=T.isub(D).imul(H).umod(W).imul(E);return D.iadd(C).imul(I.unblinder).umod(K.modulus).toArrayLike(F$,"be",O)}U.getr=V,Q.exports=U}}),dQ=q$({"node_modules/elliptic/package.json"($,Q){Q.exports={name:"elliptic",version:"6.5.4",description:"EC cryptography",main:"lib/elliptic.js",files:["lib"],scripts:{lint:"eslint lib test","lint:fix":"npm run lint -- --fix",unit:"istanbul test _mocha --reporter=spec test/index.js",test:"npm run lint && npm run unit",version:"grunt dist && git add dist/"},repository:{type:"git",url:"git@github.com:indutny/elliptic"},keywords:["EC","Elliptic","curve","Cryptography"],author:"Fedor Indutny ",license:"MIT",bugs:{url:"https://github.com/indutny/elliptic/issues"},homepage:"https://github.com/indutny/elliptic",devDependencies:{brfs:"^2.0.2",coveralls:"^3.1.0",eslint:"^7.6.0",grunt:"^1.2.1","grunt-browserify":"^5.3.0","grunt-cli":"^1.3.2","grunt-contrib-connect":"^3.0.0","grunt-contrib-copy":"^1.0.0","grunt-contrib-uglify":"^5.0.0","grunt-mocha-istanbul":"^5.0.2","grunt-saucelabs":"^9.0.1",istanbul:"^0.4.5",mocha:"^8.0.1"},dependencies:{"bn.js":"^4.11.9",brorand:"^1.1.0","hash.js":"^1.0.0","hmac-drbg":"^1.0.1",inherits:"^2.0.4","minimalistic-assert":"^1.0.1","minimalistic-crypto-utils":"^1.0.1"}}}}),bQ=q$({"node_modules/elliptic/node_modules/bn.js/lib/bn.js"($,Q){(function(Y,Z){function G(j,k){if(!j)throw new Error(k||"Assertion failed")}function V(j,k){j.super_=k;var g=function(){};g.prototype=k.prototype,j.prototype=new g,j.prototype.constructor=j}function U(j,k,g){if(U.isBN(j))return j;this.negative=0,this.words=null,this.length=0,this.red=null,j!==null&&((k==="le"||k==="be")&&(g=k,k=10),this._init(j||0,k||10,g||"be"))}typeof Y=="object"?Y.exports=U:Z.BN=U,U.BN=U,U.wordSize=26;var X=F$;U.isBN=function(j){return j instanceof U?!0:j!==null&&typeof j=="object"&&j.constructor.wordSize===U.wordSize&&Array.isArray(j.words)},U.max=function(j,k){return j.cmp(k)>0?j:k},U.min=function(j,k){return j.cmp(k)<0?j:k},U.prototype._init=function(j,k,g){if(typeof j=="number")return this._initNumber(j,k,g);if(typeof j=="object")return this._initArray(j,k,g);k==="hex"&&(k=16),G(k===(k|0)&&k>=2&&k<=36),j=j.toString().replace(/\s+/g,"");var _=0;j[0]==="-"&&(_++,this.negative=1),_=0;_-=3)x=j[_]|j[_-1]<<8|j[_-2]<<16,this.words[N]|=x<>>26-B&67108863,B+=24,B>=26&&(B-=26,N++);else if(g==="le")for(_=0,N=0;_>>26-B&67108863,B+=24,B>=26&&(B-=26,N++);return this.strip()};function K(j,k){var g=j.charCodeAt(k);return g>=65&&g<=70?g-55:g>=97&&g<=102?g-87:g-48&15}function I(j,k,g){var _=K(j,g);return g-1>=k&&(_|=K(j,g-1)<<4),_}U.prototype._parseHex=function(j,k,g){this.length=Math.ceil((j.length-k)/6),this.words=new Array(this.length);for(var _=0;_=k;_-=2)B=I(j,k,_)<=18?(N-=18,x+=1,this.words[x]|=B>>>26):N+=8;else{var y=j.length-k;for(_=y%2===0?k+1:k;_=18?(N-=18,x+=1,this.words[x]|=B>>>26):N+=8}this.strip()};function O(j,k,g,_){for(var N=0,x=Math.min(j.length,g),B=k;B=49?N+=y-49+10:y>=17?N+=y-17+10:N+=y}return N}U.prototype._parseBase=function(j,k,g){this.words=[0],this.length=1;for(var _=0,N=1;N<=67108863;N*=k)_++;_--,N=N/k|0;for(var x=j.length-g,B=x%_,y=Math.min(x,x-B)+g,w=0,p=g;p1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},U.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},U.prototype.inspect=function(){return(this.red?""};var J=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],F=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],A=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64000000,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,24300000,28629151,33554432,39135393,45435424,52521875,60466176];U.prototype.toString=function(j,k){j=j||10,k=k|0||1;var g;if(j===16||j==="hex"){g="";for(var _=0,N=0,x=0;x>>24-_&16777215,N!==0||x!==this.length-1?g=J[6-y.length]+y+g:g=y+g,_+=2,_>=26&&(_-=26,x--)}for(N!==0&&(g=N.toString(16)+g);g.length%k!==0;)g="0"+g;return this.negative!==0&&(g="-"+g),g}if(j===(j|0)&&j>=2&&j<=36){var w=F[j],p=A[j];g="";var f=this.clone();for(f.negative=0;!f.isZero();){var c=f.modn(p).toString(j);f=f.idivn(p),f.isZero()?g=c+g:g=J[w-c.length]+c+g}for(this.isZero()&&(g="0"+g);g.length%k!==0;)g="0"+g;return this.negative!==0&&(g="-"+g),g}G(!1,"Base should be between 2 and 36")},U.prototype.toNumber=function(){var j=this.words[0];return this.length===2?j+=this.words[1]*67108864:this.length===3&&this.words[2]===1?j+=4503599627370496+this.words[1]*67108864:this.length>2&&G(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-j:j},U.prototype.toJSON=function(){return this.toString(16)},U.prototype.toBuffer=function(j,k){return G(typeof X<"u"),this.toArrayLike(X,j,k)},U.prototype.toArray=function(j,k){return this.toArrayLike(Array,j,k)},U.prototype.toArrayLike=function(j,k,g){var _=this.byteLength(),N=g||Math.max(1,_);G(_<=N,"byte array longer than desired length"),G(N>0,"Requested array length <= 0"),this.strip();var x=k==="le",B=new j(N),y,w,p=this.clone();if(x){for(w=0;!p.isZero();w++)y=p.andln(255),p.iushrn(8),B[w]=y;for(;w=4096&&(g+=13,k>>>=13),k>=64&&(g+=7,k>>>=7),k>=8&&(g+=4,k>>>=4),k>=2&&(g+=2,k>>>=2),g+k},U.prototype._zeroBits=function(j){if(j===0)return 26;var k=j,g=0;return(k&8191)===0&&(g+=13,k>>>=13),(k&127)===0&&(g+=7,k>>>=7),(k&15)===0&&(g+=4,k>>>=4),(k&3)===0&&(g+=2,k>>>=2),(k&1)===0&&g++,g},U.prototype.bitLength=function(){var j=this.words[this.length-1],k=this._countBits(j);return(this.length-1)*26+k};function H(j){for(var k=new Array(j.bitLength()),g=0;g>>N}return k}U.prototype.zeroBits=function(){if(this.isZero())return 0;for(var j=0,k=0;kj.length?this.clone().ior(j):j.clone().ior(this)},U.prototype.uor=function(j){return this.length>j.length?this.clone().iuor(j):j.clone().iuor(this)},U.prototype.iuand=function(j){var k;this.length>j.length?k=j:k=this;for(var g=0;gj.length?this.clone().iand(j):j.clone().iand(this)},U.prototype.uand=function(j){return this.length>j.length?this.clone().iuand(j):j.clone().iuand(this)},U.prototype.iuxor=function(j){var k,g;this.length>j.length?(k=this,g=j):(k=j,g=this);for(var _=0;_j.length?this.clone().ixor(j):j.clone().ixor(this)},U.prototype.uxor=function(j){return this.length>j.length?this.clone().iuxor(j):j.clone().iuxor(this)},U.prototype.inotn=function(j){G(typeof j=="number"&&j>=0);var k=Math.ceil(j/26)|0,g=j%26;this._expand(k),g>0&&k--;for(var _=0;_0&&(this.words[_]=~this.words[_]&67108863>>26-g),this.strip()},U.prototype.notn=function(j){return this.clone().inotn(j)},U.prototype.setn=function(j,k){G(typeof j=="number"&&j>=0);var g=j/26|0,_=j%26;return this._expand(g+1),k?this.words[g]=this.words[g]|1<<_:this.words[g]=this.words[g]&~(1<<_),this.strip()},U.prototype.iadd=function(j){var k;if(this.negative!==0&&j.negative===0)return this.negative=0,k=this.isub(j),this.negative^=1,this._normSign();if(this.negative===0&&j.negative!==0)return j.negative=0,k=this.isub(j),j.negative=1,k._normSign();var g,_;this.length>j.length?(g=this,_=j):(g=j,_=this);for(var N=0,x=0;x<_.length;x++)k=(g.words[x]|0)+(_.words[x]|0)+N,this.words[x]=k&67108863,N=k>>>26;for(;N!==0&&x>>26;if(this.length=g.length,N!==0)this.words[this.length]=N,this.length++;else if(g!==this)for(;xj.length?this.clone().iadd(j):j.clone().iadd(this)},U.prototype.isub=function(j){if(j.negative!==0){j.negative=0;var k=this.iadd(j);return j.negative=1,k._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(j),this.negative=1,this._normSign();var g=this.cmp(j);if(g===0)return this.negative=0,this.length=1,this.words[0]=0,this;var _,N;g>0?(_=this,N=j):(_=j,N=this);for(var x=0,B=0;B>26,this.words[B]=k&67108863;for(;x!==0&&B<_.length;B++)k=(_.words[B]|0)+x,x=k>>26,this.words[B]=k&67108863;if(x===0&&B<_.length&&_!==this)for(;B<_.length;B++)this.words[B]=_.words[B];return this.length=Math.max(this.length,B),_!==this&&(this.negative=1),this.strip()},U.prototype.sub=function(j){return this.clone().isub(j)};function W(j,k,g){g.negative=k.negative^j.negative;var _=j.length+k.length|0;g.length=_,_=_-1|0;var N=j.words[0]|0,x=k.words[0]|0,B=N*x,y=B&67108863,w=B/67108864|0;g.words[0]=y;for(var p=1;p<_;p++){for(var f=w>>>26,c=w&67108863,h=Math.min(p,k.length-1),d=Math.max(0,p-j.length+1);d<=h;d++){var b=p-d|0;N=j.words[b]|0,x=k.words[d]|0,B=N*x+c,f+=B/67108864|0,c=B&67108863}g.words[p]=c|0,w=f|0}return w!==0?g.words[p]=w|0:g.length--,g.strip()}var E=function(j,k,g){var _=j.words,N=k.words,x=g.words,B=0,y,w,p,f=_[0]|0,c=f&8191,h=f>>>13,d=_[1]|0,b=d&8191,l=d>>>13,o=_[2]|0,u=o&8191,n=o>>>13,s=_[3]|0,t=s&8191,m=s>>>13,a=_[4]|0,e=a&8191,r=a>>>13,i=_[5]|0,$0=i&8191,Q0=i>>>13,Y0=_[6]|0,Z0=Y0&8191,G0=Y0>>>13,V0=_[7]|0,U0=V0&8191,X0=V0>>>13,K0=_[8]|0,I0=K0&8191,O0=K0>>>13,J0=_[9]|0,F0=J0&8191,A0=J0>>>13,H0=N[0]|0,W0=H0&8191,E0=H0>>>13,T0=N[1]|0,D0=T0&8191,C0=T0>>>13,L0=N[2]|0,R0=L0&8191,P0=L0>>>13,z0=N[3]|0,M0=z0&8191,S0=z0>>>13,v0=N[4]|0,q0=v0&8191,j0=v0>>>13,k0=N[5]|0,g0=k0&8191,_0=k0>>>13,N0=N[6]|0,x0=N0&8191,B0=N0>>>13,y0=N[7]|0,w0=y0&8191,p0=y0>>>13,f0=N[8]|0,c0=f0&8191,h0=f0>>>13,d0=N[9]|0,b0=d0&8191,l0=d0>>>13;g.negative=j.negative^k.negative,g.length=19,y=Math.imul(c,W0),w=Math.imul(c,E0),w=w+Math.imul(h,W0)|0,p=Math.imul(h,E0);var o0=(B+y|0)+((w&8191)<<13)|0;B=(p+(w>>>13)|0)+(o0>>>26)|0,o0&=67108863,y=Math.imul(b,W0),w=Math.imul(b,E0),w=w+Math.imul(l,W0)|0,p=Math.imul(l,E0),y=y+Math.imul(c,D0)|0,w=w+Math.imul(c,C0)|0,w=w+Math.imul(h,D0)|0,p=p+Math.imul(h,C0)|0;var u0=(B+y|0)+((w&8191)<<13)|0;B=(p+(w>>>13)|0)+(u0>>>26)|0,u0&=67108863,y=Math.imul(u,W0),w=Math.imul(u,E0),w=w+Math.imul(n,W0)|0,p=Math.imul(n,E0),y=y+Math.imul(b,D0)|0,w=w+Math.imul(b,C0)|0,w=w+Math.imul(l,D0)|0,p=p+Math.imul(l,C0)|0,y=y+Math.imul(c,R0)|0,w=w+Math.imul(c,P0)|0,w=w+Math.imul(h,R0)|0,p=p+Math.imul(h,P0)|0;var n0=(B+y|0)+((w&8191)<<13)|0;B=(p+(w>>>13)|0)+(n0>>>26)|0,n0&=67108863,y=Math.imul(t,W0),w=Math.imul(t,E0),w=w+Math.imul(m,W0)|0,p=Math.imul(m,E0),y=y+Math.imul(u,D0)|0,w=w+Math.imul(u,C0)|0,w=w+Math.imul(n,D0)|0,p=p+Math.imul(n,C0)|0,y=y+Math.imul(b,R0)|0,w=w+Math.imul(b,P0)|0,w=w+Math.imul(l,R0)|0,p=p+Math.imul(l,P0)|0,y=y+Math.imul(c,M0)|0,w=w+Math.imul(c,S0)|0,w=w+Math.imul(h,M0)|0,p=p+Math.imul(h,S0)|0;var s0=(B+y|0)+((w&8191)<<13)|0;B=(p+(w>>>13)|0)+(s0>>>26)|0,s0&=67108863,y=Math.imul(e,W0),w=Math.imul(e,E0),w=w+Math.imul(r,W0)|0,p=Math.imul(r,E0),y=y+Math.imul(t,D0)|0,w=w+Math.imul(t,C0)|0,w=w+Math.imul(m,D0)|0,p=p+Math.imul(m,C0)|0,y=y+Math.imul(u,R0)|0,w=w+Math.imul(u,P0)|0,w=w+Math.imul(n,R0)|0,p=p+Math.imul(n,P0)|0,y=y+Math.imul(b,M0)|0,w=w+Math.imul(b,S0)|0,w=w+Math.imul(l,M0)|0,p=p+Math.imul(l,S0)|0,y=y+Math.imul(c,q0)|0,w=w+Math.imul(c,j0)|0,w=w+Math.imul(h,q0)|0,p=p+Math.imul(h,j0)|0;var t0=(B+y|0)+((w&8191)<<13)|0;B=(p+(w>>>13)|0)+(t0>>>26)|0,t0&=67108863,y=Math.imul($0,W0),w=Math.imul($0,E0),w=w+Math.imul(Q0,W0)|0,p=Math.imul(Q0,E0),y=y+Math.imul(e,D0)|0,w=w+Math.imul(e,C0)|0,w=w+Math.imul(r,D0)|0,p=p+Math.imul(r,C0)|0,y=y+Math.imul(t,R0)|0,w=w+Math.imul(t,P0)|0,w=w+Math.imul(m,R0)|0,p=p+Math.imul(m,P0)|0,y=y+Math.imul(u,M0)|0,w=w+Math.imul(u,S0)|0,w=w+Math.imul(n,M0)|0,p=p+Math.imul(n,S0)|0,y=y+Math.imul(b,q0)|0,w=w+Math.imul(b,j0)|0,w=w+Math.imul(l,q0)|0,p=p+Math.imul(l,j0)|0,y=y+Math.imul(c,g0)|0,w=w+Math.imul(c,_0)|0,w=w+Math.imul(h,g0)|0,p=p+Math.imul(h,_0)|0;var m0=(B+y|0)+((w&8191)<<13)|0;B=(p+(w>>>13)|0)+(m0>>>26)|0,m0&=67108863,y=Math.imul(Z0,W0),w=Math.imul(Z0,E0),w=w+Math.imul(G0,W0)|0,p=Math.imul(G0,E0),y=y+Math.imul($0,D0)|0,w=w+Math.imul($0,C0)|0,w=w+Math.imul(Q0,D0)|0,p=p+Math.imul(Q0,C0)|0,y=y+Math.imul(e,R0)|0,w=w+Math.imul(e,P0)|0,w=w+Math.imul(r,R0)|0,p=p+Math.imul(r,P0)|0,y=y+Math.imul(t,M0)|0,w=w+Math.imul(t,S0)|0,w=w+Math.imul(m,M0)|0,p=p+Math.imul(m,S0)|0,y=y+Math.imul(u,q0)|0,w=w+Math.imul(u,j0)|0,w=w+Math.imul(n,q0)|0,p=p+Math.imul(n,j0)|0,y=y+Math.imul(b,g0)|0,w=w+Math.imul(b,_0)|0,w=w+Math.imul(l,g0)|0,p=p+Math.imul(l,_0)|0,y=y+Math.imul(c,x0)|0,w=w+Math.imul(c,B0)|0,w=w+Math.imul(h,x0)|0,p=p+Math.imul(h,B0)|0;var a0=(B+y|0)+((w&8191)<<13)|0;B=(p+(w>>>13)|0)+(a0>>>26)|0,a0&=67108863,y=Math.imul(U0,W0),w=Math.imul(U0,E0),w=w+Math.imul(X0,W0)|0,p=Math.imul(X0,E0),y=y+Math.imul(Z0,D0)|0,w=w+Math.imul(Z0,C0)|0,w=w+Math.imul(G0,D0)|0,p=p+Math.imul(G0,C0)|0,y=y+Math.imul($0,R0)|0,w=w+Math.imul($0,P0)|0,w=w+Math.imul(Q0,R0)|0,p=p+Math.imul(Q0,P0)|0,y=y+Math.imul(e,M0)|0,w=w+Math.imul(e,S0)|0,w=w+Math.imul(r,M0)|0,p=p+Math.imul(r,S0)|0,y=y+Math.imul(t,q0)|0,w=w+Math.imul(t,j0)|0,w=w+Math.imul(m,q0)|0,p=p+Math.imul(m,j0)|0,y=y+Math.imul(u,g0)|0,w=w+Math.imul(u,_0)|0,w=w+Math.imul(n,g0)|0,p=p+Math.imul(n,_0)|0,y=y+Math.imul(b,x0)|0,w=w+Math.imul(b,B0)|0,w=w+Math.imul(l,x0)|0,p=p+Math.imul(l,B0)|0,y=y+Math.imul(c,w0)|0,w=w+Math.imul(c,p0)|0,w=w+Math.imul(h,w0)|0,p=p+Math.imul(h,p0)|0;var e0=(B+y|0)+((w&8191)<<13)|0;B=(p+(w>>>13)|0)+(e0>>>26)|0,e0&=67108863,y=Math.imul(I0,W0),w=Math.imul(I0,E0),w=w+Math.imul(O0,W0)|0,p=Math.imul(O0,E0),y=y+Math.imul(U0,D0)|0,w=w+Math.imul(U0,C0)|0,w=w+Math.imul(X0,D0)|0,p=p+Math.imul(X0,C0)|0,y=y+Math.imul(Z0,R0)|0,w=w+Math.imul(Z0,P0)|0,w=w+Math.imul(G0,R0)|0,p=p+Math.imul(G0,P0)|0,y=y+Math.imul($0,M0)|0,w=w+Math.imul($0,S0)|0,w=w+Math.imul(Q0,M0)|0,p=p+Math.imul(Q0,S0)|0,y=y+Math.imul(e,q0)|0,w=w+Math.imul(e,j0)|0,w=w+Math.imul(r,q0)|0,p=p+Math.imul(r,j0)|0,y=y+Math.imul(t,g0)|0,w=w+Math.imul(t,_0)|0,w=w+Math.imul(m,g0)|0,p=p+Math.imul(m,_0)|0,y=y+Math.imul(u,x0)|0,w=w+Math.imul(u,B0)|0,w=w+Math.imul(n,x0)|0,p=p+Math.imul(n,B0)|0,y=y+Math.imul(b,w0)|0,w=w+Math.imul(b,p0)|0,w=w+Math.imul(l,w0)|0,p=p+Math.imul(l,p0)|0,y=y+Math.imul(c,c0)|0,w=w+Math.imul(c,h0)|0,w=w+Math.imul(h,c0)|0,p=p+Math.imul(h,h0)|0;var r0=(B+y|0)+((w&8191)<<13)|0;B=(p+(w>>>13)|0)+(r0>>>26)|0,r0&=67108863,y=Math.imul(F0,W0),w=Math.imul(F0,E0),w=w+Math.imul(A0,W0)|0,p=Math.imul(A0,E0),y=y+Math.imul(I0,D0)|0,w=w+Math.imul(I0,C0)|0,w=w+Math.imul(O0,D0)|0,p=p+Math.imul(O0,C0)|0,y=y+Math.imul(U0,R0)|0,w=w+Math.imul(U0,P0)|0,w=w+Math.imul(X0,R0)|0,p=p+Math.imul(X0,P0)|0,y=y+Math.imul(Z0,M0)|0,w=w+Math.imul(Z0,S0)|0,w=w+Math.imul(G0,M0)|0,p=p+Math.imul(G0,S0)|0,y=y+Math.imul($0,q0)|0,w=w+Math.imul($0,j0)|0,w=w+Math.imul(Q0,q0)|0,p=p+Math.imul(Q0,j0)|0,y=y+Math.imul(e,g0)|0,w=w+Math.imul(e,_0)|0,w=w+Math.imul(r,g0)|0,p=p+Math.imul(r,_0)|0,y=y+Math.imul(t,x0)|0,w=w+Math.imul(t,B0)|0,w=w+Math.imul(m,x0)|0,p=p+Math.imul(m,B0)|0,y=y+Math.imul(u,w0)|0,w=w+Math.imul(u,p0)|0,w=w+Math.imul(n,w0)|0,p=p+Math.imul(n,p0)|0,y=y+Math.imul(b,c0)|0,w=w+Math.imul(b,h0)|0,w=w+Math.imul(l,c0)|0,p=p+Math.imul(l,h0)|0,y=y+Math.imul(c,b0)|0,w=w+Math.imul(c,l0)|0,w=w+Math.imul(h,b0)|0,p=p+Math.imul(h,l0)|0;var i0=(B+y|0)+((w&8191)<<13)|0;B=(p+(w>>>13)|0)+(i0>>>26)|0,i0&=67108863,y=Math.imul(F0,D0),w=Math.imul(F0,C0),w=w+Math.imul(A0,D0)|0,p=Math.imul(A0,C0),y=y+Math.imul(I0,R0)|0,w=w+Math.imul(I0,P0)|0,w=w+Math.imul(O0,R0)|0,p=p+Math.imul(O0,P0)|0,y=y+Math.imul(U0,M0)|0,w=w+Math.imul(U0,S0)|0,w=w+Math.imul(X0,M0)|0,p=p+Math.imul(X0,S0)|0,y=y+Math.imul(Z0,q0)|0,w=w+Math.imul(Z0,j0)|0,w=w+Math.imul(G0,q0)|0,p=p+Math.imul(G0,j0)|0,y=y+Math.imul($0,g0)|0,w=w+Math.imul($0,_0)|0,w=w+Math.imul(Q0,g0)|0,p=p+Math.imul(Q0,_0)|0,y=y+Math.imul(e,x0)|0,w=w+Math.imul(e,B0)|0,w=w+Math.imul(r,x0)|0,p=p+Math.imul(r,B0)|0,y=y+Math.imul(t,w0)|0,w=w+Math.imul(t,p0)|0,w=w+Math.imul(m,w0)|0,p=p+Math.imul(m,p0)|0,y=y+Math.imul(u,c0)|0,w=w+Math.imul(u,h0)|0,w=w+Math.imul(n,c0)|0,p=p+Math.imul(n,h0)|0,y=y+Math.imul(b,b0)|0,w=w+Math.imul(b,l0)|0,w=w+Math.imul(l,b0)|0,p=p+Math.imul(l,l0)|0;var $$=(B+y|0)+((w&8191)<<13)|0;B=(p+(w>>>13)|0)+($$>>>26)|0,$$&=67108863,y=Math.imul(F0,R0),w=Math.imul(F0,P0),w=w+Math.imul(A0,R0)|0,p=Math.imul(A0,P0),y=y+Math.imul(I0,M0)|0,w=w+Math.imul(I0,S0)|0,w=w+Math.imul(O0,M0)|0,p=p+Math.imul(O0,S0)|0,y=y+Math.imul(U0,q0)|0,w=w+Math.imul(U0,j0)|0,w=w+Math.imul(X0,q0)|0,p=p+Math.imul(X0,j0)|0,y=y+Math.imul(Z0,g0)|0,w=w+Math.imul(Z0,_0)|0,w=w+Math.imul(G0,g0)|0,p=p+Math.imul(G0,_0)|0,y=y+Math.imul($0,x0)|0,w=w+Math.imul($0,B0)|0,w=w+Math.imul(Q0,x0)|0,p=p+Math.imul(Q0,B0)|0,y=y+Math.imul(e,w0)|0,w=w+Math.imul(e,p0)|0,w=w+Math.imul(r,w0)|0,p=p+Math.imul(r,p0)|0,y=y+Math.imul(t,c0)|0,w=w+Math.imul(t,h0)|0,w=w+Math.imul(m,c0)|0,p=p+Math.imul(m,h0)|0,y=y+Math.imul(u,b0)|0,w=w+Math.imul(u,l0)|0,w=w+Math.imul(n,b0)|0,p=p+Math.imul(n,l0)|0;var Q$=(B+y|0)+((w&8191)<<13)|0;B=(p+(w>>>13)|0)+(Q$>>>26)|0,Q$&=67108863,y=Math.imul(F0,M0),w=Math.imul(F0,S0),w=w+Math.imul(A0,M0)|0,p=Math.imul(A0,S0),y=y+Math.imul(I0,q0)|0,w=w+Math.imul(I0,j0)|0,w=w+Math.imul(O0,q0)|0,p=p+Math.imul(O0,j0)|0,y=y+Math.imul(U0,g0)|0,w=w+Math.imul(U0,_0)|0,w=w+Math.imul(X0,g0)|0,p=p+Math.imul(X0,_0)|0,y=y+Math.imul(Z0,x0)|0,w=w+Math.imul(Z0,B0)|0,w=w+Math.imul(G0,x0)|0,p=p+Math.imul(G0,B0)|0,y=y+Math.imul($0,w0)|0,w=w+Math.imul($0,p0)|0,w=w+Math.imul(Q0,w0)|0,p=p+Math.imul(Q0,p0)|0,y=y+Math.imul(e,c0)|0,w=w+Math.imul(e,h0)|0,w=w+Math.imul(r,c0)|0,p=p+Math.imul(r,h0)|0,y=y+Math.imul(t,b0)|0,w=w+Math.imul(t,l0)|0,w=w+Math.imul(m,b0)|0,p=p+Math.imul(m,l0)|0;var Y$=(B+y|0)+((w&8191)<<13)|0;B=(p+(w>>>13)|0)+(Y$>>>26)|0,Y$&=67108863,y=Math.imul(F0,q0),w=Math.imul(F0,j0),w=w+Math.imul(A0,q0)|0,p=Math.imul(A0,j0),y=y+Math.imul(I0,g0)|0,w=w+Math.imul(I0,_0)|0,w=w+Math.imul(O0,g0)|0,p=p+Math.imul(O0,_0)|0,y=y+Math.imul(U0,x0)|0,w=w+Math.imul(U0,B0)|0,w=w+Math.imul(X0,x0)|0,p=p+Math.imul(X0,B0)|0,y=y+Math.imul(Z0,w0)|0,w=w+Math.imul(Z0,p0)|0,w=w+Math.imul(G0,w0)|0,p=p+Math.imul(G0,p0)|0,y=y+Math.imul($0,c0)|0,w=w+Math.imul($0,h0)|0,w=w+Math.imul(Q0,c0)|0,p=p+Math.imul(Q0,h0)|0,y=y+Math.imul(e,b0)|0,w=w+Math.imul(e,l0)|0,w=w+Math.imul(r,b0)|0,p=p+Math.imul(r,l0)|0;var Z$=(B+y|0)+((w&8191)<<13)|0;B=(p+(w>>>13)|0)+(Z$>>>26)|0,Z$&=67108863,y=Math.imul(F0,g0),w=Math.imul(F0,_0),w=w+Math.imul(A0,g0)|0,p=Math.imul(A0,_0),y=y+Math.imul(I0,x0)|0,w=w+Math.imul(I0,B0)|0,w=w+Math.imul(O0,x0)|0,p=p+Math.imul(O0,B0)|0,y=y+Math.imul(U0,w0)|0,w=w+Math.imul(U0,p0)|0,w=w+Math.imul(X0,w0)|0,p=p+Math.imul(X0,p0)|0,y=y+Math.imul(Z0,c0)|0,w=w+Math.imul(Z0,h0)|0,w=w+Math.imul(G0,c0)|0,p=p+Math.imul(G0,h0)|0,y=y+Math.imul($0,b0)|0,w=w+Math.imul($0,l0)|0,w=w+Math.imul(Q0,b0)|0,p=p+Math.imul(Q0,l0)|0;var G$=(B+y|0)+((w&8191)<<13)|0;B=(p+(w>>>13)|0)+(G$>>>26)|0,G$&=67108863,y=Math.imul(F0,x0),w=Math.imul(F0,B0),w=w+Math.imul(A0,x0)|0,p=Math.imul(A0,B0),y=y+Math.imul(I0,w0)|0,w=w+Math.imul(I0,p0)|0,w=w+Math.imul(O0,w0)|0,p=p+Math.imul(O0,p0)|0,y=y+Math.imul(U0,c0)|0,w=w+Math.imul(U0,h0)|0,w=w+Math.imul(X0,c0)|0,p=p+Math.imul(X0,h0)|0,y=y+Math.imul(Z0,b0)|0,w=w+Math.imul(Z0,l0)|0,w=w+Math.imul(G0,b0)|0,p=p+Math.imul(G0,l0)|0;var V$=(B+y|0)+((w&8191)<<13)|0;B=(p+(w>>>13)|0)+(V$>>>26)|0,V$&=67108863,y=Math.imul(F0,w0),w=Math.imul(F0,p0),w=w+Math.imul(A0,w0)|0,p=Math.imul(A0,p0),y=y+Math.imul(I0,c0)|0,w=w+Math.imul(I0,h0)|0,w=w+Math.imul(O0,c0)|0,p=p+Math.imul(O0,h0)|0,y=y+Math.imul(U0,b0)|0,w=w+Math.imul(U0,l0)|0,w=w+Math.imul(X0,b0)|0,p=p+Math.imul(X0,l0)|0;var U$=(B+y|0)+((w&8191)<<13)|0;B=(p+(w>>>13)|0)+(U$>>>26)|0,U$&=67108863,y=Math.imul(F0,c0),w=Math.imul(F0,h0),w=w+Math.imul(A0,c0)|0,p=Math.imul(A0,h0),y=y+Math.imul(I0,b0)|0,w=w+Math.imul(I0,l0)|0,w=w+Math.imul(O0,b0)|0,p=p+Math.imul(O0,l0)|0;var X$=(B+y|0)+((w&8191)<<13)|0;B=(p+(w>>>13)|0)+(X$>>>26)|0,X$&=67108863,y=Math.imul(F0,b0),w=Math.imul(F0,l0),w=w+Math.imul(A0,b0)|0,p=Math.imul(A0,l0);var K$=(B+y|0)+((w&8191)<<13)|0;return B=(p+(w>>>13)|0)+(K$>>>26)|0,K$&=67108863,x[0]=o0,x[1]=u0,x[2]=n0,x[3]=s0,x[4]=t0,x[5]=m0,x[6]=a0,x[7]=e0,x[8]=r0,x[9]=i0,x[10]=$$,x[11]=Q$,x[12]=Y$,x[13]=Z$,x[14]=G$,x[15]=V$,x[16]=U$,x[17]=X$,x[18]=K$,B!==0&&(x[19]=B,g.length++),g};Math.imul||(E=W);function T(j,k,g){g.negative=k.negative^j.negative,g.length=j.length+k.length;for(var _=0,N=0,x=0;x>>26)|0,N+=B>>>26,B&=67108863}g.words[x]=y,_=B,B=N}return _!==0?g.words[x]=_:g.length--,g.strip()}function D(j,k,g){var _=new C;return _.mulp(j,k,g)}U.prototype.mulTo=function(j,k){var g,_=this.length+j.length;return this.length===10&&j.length===10?g=E(this,j,k):_<63?g=W(this,j,k):_<1024?g=T(this,j,k):g=D(this,j,k),g};function C(j,k){this.x=j,this.y=k}C.prototype.makeRBT=function(j){for(var k=new Array(j),g=U.prototype._countBits(j)-1,_=0;_>=1;return _},C.prototype.permute=function(j,k,g,_,N,x){for(var B=0;B>>1)N++;return 1<>>13,g[2*x+1]=N&8191,N=N>>>13;for(x=2*k;x<_;++x)g[x]=0;G(N===0),G((N&-8192)===0)},C.prototype.stub=function(j){for(var k=new Array(j),g=0;g>=26,k+=_/67108864|0,k+=N>>>26,this.words[g]=N&67108863}return k!==0&&(this.words[g]=k,this.length++),this},U.prototype.muln=function(j){return this.clone().imuln(j)},U.prototype.sqr=function(){return this.mul(this)},U.prototype.isqr=function(){return this.imul(this.clone())},U.prototype.pow=function(j){var k=H(j);if(k.length===0)return new U(1);for(var g=this,_=0;_=0);var k=j%26,g=(j-k)/26,_=67108863>>>26-k<<26-k,N;if(k!==0){var x=0;for(N=0;N>>26-k}x&&(this.words[N]=x,this.length++)}if(g!==0){for(N=this.length-1;N>=0;N--)this.words[N+g]=this.words[N];for(N=0;N=0);var _;k?_=(k-k%26)/26:_=0;var N=j%26,x=Math.min((j-N)/26,this.length),B=67108863^67108863>>>N<x)for(this.length-=x,w=0;w=0&&(p!==0||w>=_);w--){var f=this.words[w]|0;this.words[w]=p<<26-N|f>>>N,p=f&B}return y&&p!==0&&(y.words[y.length++]=p),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},U.prototype.ishrn=function(j,k,g){return G(this.negative===0),this.iushrn(j,k,g)},U.prototype.shln=function(j){return this.clone().ishln(j)},U.prototype.ushln=function(j){return this.clone().iushln(j)},U.prototype.shrn=function(j){return this.clone().ishrn(j)},U.prototype.ushrn=function(j){return this.clone().iushrn(j)},U.prototype.testn=function(j){G(typeof j=="number"&&j>=0);var k=j%26,g=(j-k)/26,_=1<=0);var k=j%26,g=(j-k)/26;if(G(this.negative===0,"imaskn works only with positive numbers"),this.length<=g)return this;if(k!==0&&g++,this.length=Math.min(g,this.length),k!==0){var _=67108863^67108863>>>k<=67108864;k++)this.words[k]-=67108864,k===this.length-1?this.words[k+1]=1:this.words[k+1]++;return this.length=Math.max(this.length,k+1),this},U.prototype.isubn=function(j){if(G(typeof j=="number"),G(j<67108864),j<0)return this.iaddn(-j);if(this.negative!==0)return this.negative=0,this.iaddn(j),this.negative=1,this;if(this.words[0]-=j,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var k=0;k>26)-(y/67108864|0),this.words[N+g]=x&67108863}for(;N>26,this.words[N+g]=x&67108863;if(B===0)return this.strip();for(G(B===-1),B=0,N=0;N>26,this.words[N]=x&67108863;return this.negative=1,this.strip()},U.prototype._wordDiv=function(j,k){var g=this.length-j.length,_=this.clone(),N=j,x=N.words[N.length-1]|0,B=this._countBits(x);g=26-B,g!==0&&(N=N.ushln(g),_.iushln(g),x=N.words[N.length-1]|0);var y=_.length-N.length,w;if(k!=="mod"){w=new U(null),w.length=y+1,w.words=new Array(w.length);for(var p=0;p=0;c--){var h=(_.words[N.length+c]|0)*67108864+(_.words[N.length+c-1]|0);for(h=Math.min(h/x|0,67108863),_._ishlnsubmul(N,h,c);_.negative!==0;)h--,_.negative=0,_._ishlnsubmul(N,1,c),_.isZero()||(_.negative^=1);w&&(w.words[c]=h)}return w&&w.strip(),_.strip(),k!=="div"&&g!==0&&_.iushrn(g),{div:w||null,mod:_}},U.prototype.divmod=function(j,k,g){if(G(!j.isZero()),this.isZero())return{div:new U(0),mod:new U(0)};var _,N,x;return this.negative!==0&&j.negative===0?(x=this.neg().divmod(j,k),k!=="mod"&&(_=x.div.neg()),k!=="div"&&(N=x.mod.neg(),g&&N.negative!==0&&N.iadd(j)),{div:_,mod:N}):this.negative===0&&j.negative!==0?(x=this.divmod(j.neg(),k),k!=="mod"&&(_=x.div.neg()),{div:_,mod:x.mod}):(this.negative&j.negative)!==0?(x=this.neg().divmod(j.neg(),k),k!=="div"&&(N=x.mod.neg(),g&&N.negative!==0&&N.isub(j)),{div:x.div,mod:N}):j.length>this.length||this.cmp(j)<0?{div:new U(0),mod:this}:j.length===1?k==="div"?{div:this.divn(j.words[0]),mod:null}:k==="mod"?{div:null,mod:new U(this.modn(j.words[0]))}:{div:this.divn(j.words[0]),mod:new U(this.modn(j.words[0]))}:this._wordDiv(j,k)},U.prototype.div=function(j){return this.divmod(j,"div",!1).div},U.prototype.mod=function(j){return this.divmod(j,"mod",!1).mod},U.prototype.umod=function(j){return this.divmod(j,"mod",!0).mod},U.prototype.divRound=function(j){var k=this.divmod(j);if(k.mod.isZero())return k.div;var g=k.div.negative!==0?k.mod.isub(j):k.mod,_=j.ushrn(1),N=j.andln(1),x=g.cmp(_);return x<0||N===1&&x===0?k.div:k.div.negative!==0?k.div.isubn(1):k.div.iaddn(1)},U.prototype.modn=function(j){G(j<=67108863);for(var k=(1<<26)%j,g=0,_=this.length-1;_>=0;_--)g=(k*g+(this.words[_]|0))%j;return g},U.prototype.idivn=function(j){G(j<=67108863);for(var k=0,g=this.length-1;g>=0;g--){var _=(this.words[g]|0)+k*67108864;this.words[g]=_/j|0,k=_%j}return this.strip()},U.prototype.divn=function(j){return this.clone().idivn(j)},U.prototype.egcd=function(j){G(j.negative===0),G(!j.isZero());var k=this,g=j.clone();k.negative!==0?k=k.umod(j):k=k.clone();for(var _=new U(1),N=new U(0),x=new U(0),B=new U(1),y=0;k.isEven()&&g.isEven();)k.iushrn(1),g.iushrn(1),++y;for(var w=g.clone(),p=k.clone();!k.isZero();){for(var f=0,c=1;(k.words[0]&c)===0&&f<26;++f,c<<=1);if(f>0)for(k.iushrn(f);f-- >0;)(_.isOdd()||N.isOdd())&&(_.iadd(w),N.isub(p)),_.iushrn(1),N.iushrn(1);for(var h=0,d=1;(g.words[0]&d)===0&&h<26;++h,d<<=1);if(h>0)for(g.iushrn(h);h-- >0;)(x.isOdd()||B.isOdd())&&(x.iadd(w),B.isub(p)),x.iushrn(1),B.iushrn(1);k.cmp(g)>=0?(k.isub(g),_.isub(x),N.isub(B)):(g.isub(k),x.isub(_),B.isub(N))}return{a:x,b:B,gcd:g.iushln(y)}},U.prototype._invmp=function(j){G(j.negative===0),G(!j.isZero());var k=this,g=j.clone();k.negative!==0?k=k.umod(j):k=k.clone();for(var _=new U(1),N=new U(0),x=g.clone();k.cmpn(1)>0&&g.cmpn(1)>0;){for(var B=0,y=1;(k.words[0]&y)===0&&B<26;++B,y<<=1);if(B>0)for(k.iushrn(B);B-- >0;)_.isOdd()&&_.iadd(x),_.iushrn(1);for(var w=0,p=1;(g.words[0]&p)===0&&w<26;++w,p<<=1);if(w>0)for(g.iushrn(w);w-- >0;)N.isOdd()&&N.iadd(x),N.iushrn(1);k.cmp(g)>=0?(k.isub(g),_.isub(N)):(g.isub(k),N.isub(_))}var f;return k.cmpn(1)===0?f=_:f=N,f.cmpn(0)<0&&f.iadd(j),f},U.prototype.gcd=function(j){if(this.isZero())return j.abs();if(j.isZero())return this.abs();var k=this.clone(),g=j.clone();k.negative=0,g.negative=0;for(var _=0;k.isEven()&&g.isEven();_++)k.iushrn(1),g.iushrn(1);do{for(;k.isEven();)k.iushrn(1);for(;g.isEven();)g.iushrn(1);var N=k.cmp(g);if(N<0){var x=k;k=g,g=x}else if(N===0||g.cmpn(1)===0)break;k.isub(g)}while(!0);return g.iushln(_)},U.prototype.invm=function(j){return this.egcd(j).a.umod(j)},U.prototype.isEven=function(){return(this.words[0]&1)===0},U.prototype.isOdd=function(){return(this.words[0]&1)===1},U.prototype.andln=function(j){return this.words[0]&j},U.prototype.bincn=function(j){G(typeof j=="number");var k=j%26,g=(j-k)/26,_=1<>>26,B&=67108863,this.words[x]=B}return N!==0&&(this.words[x]=N,this.length++),this},U.prototype.isZero=function(){return this.length===1&&this.words[0]===0},U.prototype.cmpn=function(j){var k=j<0;if(this.negative!==0&&!k)return-1;if(this.negative===0&&k)return 1;this.strip();var g;if(this.length>1)g=1;else{k&&(j=-j),G(j<=67108863,"Number is too big");var _=this.words[0]|0;g=_===j?0:_j.length)return 1;if(this.length=0;g--){var _=this.words[g]|0,N=j.words[g]|0;if(_!==N){_N&&(k=1);break}}return k},U.prototype.gtn=function(j){return this.cmpn(j)===1},U.prototype.gt=function(j){return this.cmp(j)===1},U.prototype.gten=function(j){return this.cmpn(j)>=0},U.prototype.gte=function(j){return this.cmp(j)>=0},U.prototype.ltn=function(j){return this.cmpn(j)===-1},U.prototype.lt=function(j){return this.cmp(j)===-1},U.prototype.lten=function(j){return this.cmpn(j)<=0},U.prototype.lte=function(j){return this.cmp(j)<=0},U.prototype.eqn=function(j){return this.cmpn(j)===0},U.prototype.eq=function(j){return this.cmp(j)===0},U.red=function(j){return new v(j)},U.prototype.toRed=function(j){return G(!this.red,"Already a number in reduction context"),G(this.negative===0,"red works only with positives"),j.convertTo(this)._forceRed(j)},U.prototype.fromRed=function(){return G(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},U.prototype._forceRed=function(j){return this.red=j,this},U.prototype.forceRed=function(j){return G(!this.red,"Already a number in reduction context"),this._forceRed(j)},U.prototype.redAdd=function(j){return G(this.red,"redAdd works only with red numbers"),this.red.add(this,j)},U.prototype.redIAdd=function(j){return G(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,j)},U.prototype.redSub=function(j){return G(this.red,"redSub works only with red numbers"),this.red.sub(this,j)},U.prototype.redISub=function(j){return G(this.red,"redISub works only with red numbers"),this.red.isub(this,j)},U.prototype.redShl=function(j){return G(this.red,"redShl works only with red numbers"),this.red.shl(this,j)},U.prototype.redMul=function(j){return G(this.red,"redMul works only with red numbers"),this.red._verify2(this,j),this.red.mul(this,j)},U.prototype.redIMul=function(j){return G(this.red,"redMul works only with red numbers"),this.red._verify2(this,j),this.red.imul(this,j)},U.prototype.redSqr=function(){return G(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},U.prototype.redISqr=function(){return G(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},U.prototype.redSqrt=function(){return G(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},U.prototype.redInvm=function(){return G(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},U.prototype.redNeg=function(){return G(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},U.prototype.redPow=function(j){return G(this.red&&!j.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,j)};var L={k256:null,p224:null,p192:null,p25519:null};function R(j,k){this.name=j,this.p=new U(k,16),this.n=this.p.bitLength(),this.k=new U(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}R.prototype._tmp=function(){var j=new U(null);return j.words=new Array(Math.ceil(this.n/13)),j},R.prototype.ireduce=function(j){var k=j,g;do this.split(k,this.tmp),k=this.imulK(k),k=k.iadd(this.tmp),g=k.bitLength();while(g>this.n);var _=g0?k.isub(this.p):k.strip!==void 0?k.strip():k._strip(),k},R.prototype.split=function(j,k){j.iushrn(this.n,0,k)},R.prototype.imulK=function(j){return j.imul(this.k)};function P(){R.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}V(P,R),P.prototype.split=function(j,k){for(var g=4194303,_=Math.min(j.length,9),N=0;N<_;N++)k.words[N]=j.words[N];if(k.length=_,j.length<=9){j.words[0]=0,j.length=1;return}var x=j.words[9];for(k.words[k.length++]=x&g,N=10;N>>22,x=B}x>>>=22,j.words[N-10]=x,x===0&&j.length>10?j.length-=10:j.length-=9},P.prototype.imulK=function(j){j.words[j.length]=0,j.words[j.length+1]=0,j.length+=2;for(var k=0,g=0;g>>=26,j.words[g]=N,k=_}return k!==0&&(j.words[j.length++]=k),j},U._prime=function(j){if(L[j])return L[j];var k;if(j==="k256")k=new P;else if(j==="p224")k=new z;else if(j==="p192")k=new M;else if(j==="p25519")k=new S;else throw new Error("Unknown prime "+j);return L[j]=k,k};function v(j){if(typeof j=="string"){var k=U._prime(j);this.m=k.p,this.prime=k}else G(j.gtn(1),"modulus must be greater than 1"),this.m=j,this.prime=null}v.prototype._verify1=function(j){G(j.negative===0,"red works only with positives"),G(j.red,"red works only with red numbers")},v.prototype._verify2=function(j,k){G((j.negative|k.negative)===0,"red works only with positives"),G(j.red&&j.red===k.red,"red works only with red numbers")},v.prototype.imod=function(j){return this.prime?this.prime.ireduce(j)._forceRed(this):j.umod(this.m)._forceRed(this)},v.prototype.neg=function(j){return j.isZero()?j.clone():this.m.sub(j)._forceRed(this)},v.prototype.add=function(j,k){this._verify2(j,k);var g=j.add(k);return g.cmp(this.m)>=0&&g.isub(this.m),g._forceRed(this)},v.prototype.iadd=function(j,k){this._verify2(j,k);var g=j.iadd(k);return g.cmp(this.m)>=0&&g.isub(this.m),g},v.prototype.sub=function(j,k){this._verify2(j,k);var g=j.sub(k);return g.cmpn(0)<0&&g.iadd(this.m),g._forceRed(this)},v.prototype.isub=function(j,k){this._verify2(j,k);var g=j.isub(k);return g.cmpn(0)<0&&g.iadd(this.m),g},v.prototype.shl=function(j,k){return this._verify1(j),this.imod(j.ushln(k))},v.prototype.imul=function(j,k){return this._verify2(j,k),this.imod(j.imul(k))},v.prototype.mul=function(j,k){return this._verify2(j,k),this.imod(j.mul(k))},v.prototype.isqr=function(j){return this.imul(j,j.clone())},v.prototype.sqr=function(j){return this.mul(j,j)},v.prototype.sqrt=function(j){if(j.isZero())return j.clone();var k=this.m.andln(3);if(G(k%2===1),k===3){var g=this.m.add(new U(1)).iushrn(2);return this.pow(j,g)}for(var _=this.m.subn(1),N=0;!_.isZero()&&_.andln(1)===0;)N++,_.iushrn(1);G(!_.isZero());var x=new U(1).toRed(this),B=x.redNeg(),y=this.m.subn(1).iushrn(1),w=this.m.bitLength();for(w=new U(2*w*w).toRed(this);this.pow(w,y).cmp(B)!==0;)w.redIAdd(B);for(var p=this.pow(w,_),f=this.pow(j,_.addn(1).iushrn(1)),c=this.pow(j,_),h=N;c.cmp(x)!==0;){for(var d=c,b=0;d.cmp(x)!==0;b++)d=d.redSqr();G(b=0;N--){for(var p=k.words[N],f=w-1;f>=0;f--){var c=p>>f&1;if(x!==_[0]&&(x=this.sqr(x)),c===0&&B===0){y=0;continue}B<<=1,B|=c,y++,!(y!==g&&(N!==0||f!==0))&&(x=this.mul(x,_[B]),y=0,B=0)}w=26}return x},v.prototype.convertTo=function(j){var k=j.umod(this.m);return k===j?k.clone():k},v.prototype.convertFrom=function(j){var k=j.clone();return k.red=null,k},U.mont=function(j){return new q(j)};function q(j){v.call(this,j),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new U(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}V(q,v),q.prototype.convertTo=function(j){return this.imod(j.ushln(this.shift))},q.prototype.convertFrom=function(j){var k=this.imod(j.mul(this.rinv));return k.red=null,k},q.prototype.imul=function(j,k){if(j.isZero()||k.isZero())return j.words[0]=0,j.length=1,j;var g=j.imul(k),_=g.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),N=g.isub(_).iushrn(this.shift),x=N;return N.cmp(this.m)>=0?x=N.isub(this.m):N.cmpn(0)<0&&(x=N.iadd(this.m)),x._forceRed(this)},q.prototype.mul=function(j,k){if(j.isZero()||k.isZero())return new U(0)._forceRed(this);var g=j.mul(k),_=g.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),N=g.isub(_).iushrn(this.shift),x=N;return N.cmp(this.m)>=0?x=N.isub(this.m):N.cmpn(0)<0&&(x=N.iadd(this.m)),x._forceRed(this)},q.prototype.invm=function(j){var k=this.imod(j._invmp(this.m).mul(this.r2));return k._forceRed(this)}})(typeof Q>"u"||Q,$)}}),lQ=q$({"node_modules/minimalistic-crypto-utils/lib/utils.js"($){var Q=$;function Y(V,U){if(Array.isArray(V))return V.slice();if(!V)return[];var X=[];if(typeof V!="string"){for(var K=0;K>8,J=I&255;O?X.push(O,J):X.push(J)}return X}Q.toArray=Y;function Z(V){return V.length===1?"0"+V:V}Q.zero2=Z;function G(V){for(var U="",X=0;X(H>>1)-1?T=(H>>1)-D:T=D,W.isubn(T)):T=0,A[E]=T,W.iushrn(1)}return A}Q.getNAF=V;function U(O,J){var F=[[],[]];O=O.clone(),J=J.clone();for(var A=0,H=0,W;O.cmpn(-A)>0||J.cmpn(-H)>0;){var E=O.andln(3)+A&3,T=J.andln(3)+H&3;E===3&&(E=-1),T===3&&(T=-1);var D;(E&1)===0?D=0:(W=O.andln(7)+A&7,(W===3||W===5)&&T===2?D=-E:D=E),F[0].push(D);var C;(T&1)===0?C=0:(W=J.andln(7)+H&7,(W===3||W===5)&&E===2?C=-T:C=T),F[1].push(C),2*A===D+1&&(A=1-A),2*H===C+1&&(H=1-H),O.iushrn(1),J.iushrn(1)}return F}Q.getJSF=U;function X(O,J,F){var A="_"+J;O.prototype[J]=function(){return this[A]!==void 0?this[A]:this[A]=F.call(this)}}Q.cachedProperty=X;function K(O){return typeof O=="string"?Q.toArray(O,"hex"):O}Q.parseBytes=K;function I(O){return new Y(O,"hex","le")}Q.intFromLE=I}}),uQ=q$({"node_modules/elliptic/lib/elliptic/curve/base.js"($,Q){var Y=bQ(),Z=oQ(),G=Z.getNAF,V=Z.getJSF,U=Z.assert;function X(I,O){this.type=I,this.p=new Y(O.p,16),this.red=O.prime?Y.red(O.prime):Y.mont(this.p),this.zero=new Y(0).toRed(this.red),this.one=new Y(1).toRed(this.red),this.two=new Y(2).toRed(this.red),this.n=O.n&&new Y(O.n,16),this.g=O.g&&this.pointFromJSON(O.g,O.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var J=this.n&&this.p.div(this.n);!J||J.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}Q.exports=X,X.prototype.point=function(){throw new Error("Not implemented")},X.prototype.validate=function(){throw new Error("Not implemented")},X.prototype._fixedNafMul=function(I,O){U(I.precomputed);var J=I._getDoubles(),F=G(O,1,this._bitLength),A=(1<=W;T--)E=(E<<1)+F[T];H.push(E)}for(var D=this.jpoint(null,null,null),C=this.jpoint(null,null,null),L=A;L>0;L--){for(W=0;W=0;E--){for(var T=0;E>=0&&H[E]===0;E--)T++;if(E>=0&&T++,W=W.dblp(T),E<0)break;var D=H[E];U(D!==0),I.type==="affine"?D>0?W=W.mixedAdd(A[D-1>>1]):W=W.mixedAdd(A[-D-1>>1].neg()):D>0?W=W.add(A[D-1>>1]):W=W.add(A[-D-1>>1].neg())}return I.type==="affine"?W.toP():W},X.prototype._wnafMulAdd=function(I,O,J,F,A){var H=this._wnafT1,W=this._wnafT2,E=this._wnafT3,T=0,D,C,L;for(D=0;D=1;D-=2){var P=D-1,z=D;if(H[P]!==1||H[z]!==1){E[P]=G(J[P],H[P],this._bitLength),E[z]=G(J[z],H[z],this._bitLength),T=Math.max(E[P].length,T),T=Math.max(E[z].length,T);continue}var M=[O[P],null,null,O[z]];O[P].y.cmp(O[z].y)===0?(M[1]=O[P].add(O[z]),M[2]=O[P].toJ().mixedAdd(O[z].neg())):O[P].y.cmp(O[z].y.redNeg())===0?(M[1]=O[P].toJ().mixedAdd(O[z]),M[2]=O[P].add(O[z].neg())):(M[1]=O[P].toJ().mixedAdd(O[z]),M[2]=O[P].toJ().mixedAdd(O[z].neg()));var S=[-3,-1,-5,-7,0,7,5,1,3],v=V(J[P],J[z]);for(T=Math.max(v[0].length,T),E[P]=new Array(T),E[z]=new Array(T),C=0;C=0;D--){for(var _=0;D>=0;){var N=!0;for(C=0;C=0&&_++,k=k.dblp(_),D<0)break;for(C=0;C0?L=W[C][x-1>>1]:x<0&&(L=W[C][-x-1>>1].neg()),L.type==="affine"?k=k.mixedAdd(L):k=k.add(L))}}for(D=0;D=Math.ceil((I.bitLength()+1)/O.step):!1},K.prototype._getDoubles=function(I,O){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var J=[this],F=this,A=0;A=0&&(P=D,z=C),L.negative&&(L=L.neg(),R=R.neg()),P.negative&&(P=P.neg(),z=z.neg()),[{a:L,b:R},{a:P,b:z}]},X.prototype._endoSplit=function(O){var J=this.endo.basis,F=J[0],A=J[1],H=A.b.mul(O).divRound(this.n),W=F.b.neg().mul(O).divRound(this.n),E=H.mul(F.a),T=W.mul(A.a),D=H.mul(F.b),C=W.mul(A.b),L=O.sub(E).sub(T),R=D.add(C).neg();return{k1:L,k2:R}},X.prototype.pointFromX=function(O,J){O=new Z(O,16),O.red||(O=O.toRed(this.red));var F=O.redSqr().redMul(O).redIAdd(O.redMul(this.a)).redIAdd(this.b),A=F.redSqrt();if(A.redSqr().redSub(F).cmp(this.zero)!==0)throw new Error("invalid point");var H=A.fromRed().isOdd();return(J&&!H||!J&&H)&&(A=A.redNeg()),this.point(O,A)},X.prototype.validate=function(O){if(O.inf)return!0;var{x:J,y:F}=O,A=this.a.redMul(J),H=J.redSqr().redMul(J).redIAdd(A).redIAdd(this.b);return F.redSqr().redISub(H).cmpn(0)===0},X.prototype._endoWnafMulAdd=function(O,J,F){for(var A=this._endoWnafT1,H=this._endoWnafT2,W=0;W":""},K.prototype.isInfinity=function(){return this.inf},K.prototype.add=function(O){if(this.inf)return O;if(O.inf)return this;if(this.eq(O))return this.dbl();if(this.neg().eq(O))return this.curve.point(null,null);if(this.x.cmp(O.x)===0)return this.curve.point(null,null);var J=this.y.redSub(O.y);J.cmpn(0)!==0&&(J=J.redMul(this.x.redSub(O.x).redInvm()));var F=J.redSqr().redISub(this.x).redISub(O.x),A=J.redMul(this.x.redSub(F)).redISub(this.y);return this.curve.point(F,A)},K.prototype.dbl=function(){if(this.inf)return this;var O=this.y.redAdd(this.y);if(O.cmpn(0)===0)return this.curve.point(null,null);var J=this.curve.a,F=this.x.redSqr(),A=O.redInvm(),H=F.redAdd(F).redIAdd(F).redIAdd(J).redMul(A),W=H.redSqr().redISub(this.x.redAdd(this.x)),E=H.redMul(this.x.redSub(W)).redISub(this.y);return this.curve.point(W,E)},K.prototype.getX=function(){return this.x.fromRed()},K.prototype.getY=function(){return this.y.fromRed()},K.prototype.mul=function(O){return O=new Z(O,16),this.isInfinity()?this:this._hasDoubles(O)?this.curve._fixedNafMul(this,O):this.curve.endo?this.curve._endoWnafMulAdd([this],[O]):this.curve._wnafMul(this,O)},K.prototype.mulAdd=function(O,J,F){var A=[this,J],H=[O,F];return this.curve.endo?this.curve._endoWnafMulAdd(A,H):this.curve._wnafMulAdd(1,A,H,2)},K.prototype.jmulAdd=function(O,J,F){var A=[this,J],H=[O,F];return this.curve.endo?this.curve._endoWnafMulAdd(A,H,!0):this.curve._wnafMulAdd(1,A,H,2,!0)},K.prototype.eq=function(O){return this===O||this.inf===O.inf&&(this.inf||this.x.cmp(O.x)===0&&this.y.cmp(O.y)===0)},K.prototype.neg=function(O){if(this.inf)return this;var J=this.curve.point(this.x,this.y.redNeg());if(O&&this.precomputed){var F=this.precomputed,A=function(H){return H.neg()};J.precomputed={naf:F.naf&&{wnd:F.naf.wnd,points:F.naf.points.map(A)},doubles:F.doubles&&{step:F.doubles.step,points:F.doubles.points.map(A)}}}return J},K.prototype.toJ=function(){if(this.inf)return this.curve.jpoint(null,null,null);var O=this.curve.jpoint(this.x,this.y,this.curve.one);return O};function I(O,J,F,A){V.BasePoint.call(this,O,"jacobian"),J===null&&F===null&&A===null?(this.x=this.curve.one,this.y=this.curve.one,this.z=new Z(0)):(this.x=new Z(J,16),this.y=new Z(F,16),this.z=new Z(A,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}G(I,V.BasePoint),X.prototype.jpoint=function(O,J,F){return new I(this,O,J,F)},I.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var O=this.z.redInvm(),J=O.redSqr(),F=this.x.redMul(J),A=this.y.redMul(J).redMul(O);return this.curve.point(F,A)},I.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},I.prototype.add=function(O){if(this.isInfinity())return O;if(O.isInfinity())return this;var J=O.z.redSqr(),F=this.z.redSqr(),A=this.x.redMul(J),H=O.x.redMul(F),W=this.y.redMul(J.redMul(O.z)),E=O.y.redMul(F.redMul(this.z)),T=A.redSub(H),D=W.redSub(E);if(T.cmpn(0)===0)return D.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var C=T.redSqr(),L=C.redMul(T),R=A.redMul(C),P=D.redSqr().redIAdd(L).redISub(R).redISub(R),z=D.redMul(R.redISub(P)).redISub(W.redMul(L)),M=this.z.redMul(O.z).redMul(T);return this.curve.jpoint(P,z,M)},I.prototype.mixedAdd=function(O){if(this.isInfinity())return O.toJ();if(O.isInfinity())return this;var J=this.z.redSqr(),F=this.x,A=O.x.redMul(J),H=this.y,W=O.y.redMul(J).redMul(this.z),E=F.redSub(A),T=H.redSub(W);if(E.cmpn(0)===0)return T.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var D=E.redSqr(),C=D.redMul(E),L=F.redMul(D),R=T.redSqr().redIAdd(C).redISub(L).redISub(L),P=T.redMul(L.redISub(R)).redISub(H.redMul(C)),z=this.z.redMul(E);return this.curve.jpoint(R,P,z)},I.prototype.dblp=function(O){if(O===0)return this;if(this.isInfinity())return this;if(!O)return this.dbl();var J;if(this.curve.zeroA||this.curve.threeA){var F=this;for(J=0;J=0)return!1;if(F.redIAdd(H),this.x.cmp(F)===0)return!0}},I.prototype.inspect=function(){return this.isInfinity()?"":""},I.prototype.isInfinity=function(){return this.z.cmpn(0)===0}}}),sQ=q$({"node_modules/elliptic/lib/elliptic/curve/mont.js"($,Q){var Y=bQ(),Z=_$(),G=uQ(),V=oQ();function U(K){G.call(this,"mont",K),this.a=new Y(K.a,16).toRed(this.red),this.b=new Y(K.b,16).toRed(this.red),this.i4=new Y(4).toRed(this.red).redInvm(),this.two=new Y(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}Z(U,G),Q.exports=U,U.prototype.validate=function(K){var I=K.normalize().x,O=I.redSqr(),J=O.redMul(I).redAdd(O.redMul(this.a)).redAdd(I),F=J.redSqrt();return F.redSqr().cmp(J)===0};function X(K,I,O){G.BasePoint.call(this,K,"projective"),I===null&&O===null?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new Y(I,16),this.z=new Y(O,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}Z(X,G.BasePoint),U.prototype.decodePoint=function(K,I){return this.point(V.toArray(K,I),1)},U.prototype.point=function(K,I){return new X(this,K,I)},U.prototype.pointFromJSON=function(K){return X.fromJSON(this,K)},X.prototype.precompute=function(){},X.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},X.fromJSON=function(K,I){return new X(K,I[0],I[1]||K.one)},X.prototype.inspect=function(){return this.isInfinity()?"":""},X.prototype.isInfinity=function(){return this.z.cmpn(0)===0},X.prototype.dbl=function(){var K=this.x.redAdd(this.z),I=K.redSqr(),O=this.x.redSub(this.z),J=O.redSqr(),F=I.redSub(J),A=I.redMul(J),H=F.redMul(J.redAdd(this.curve.a24.redMul(F)));return this.curve.point(A,H)},X.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},X.prototype.diffAdd=function(K,I){var O=this.x.redAdd(this.z),J=this.x.redSub(this.z),F=K.x.redAdd(K.z),A=K.x.redSub(K.z),H=A.redMul(O),W=F.redMul(J),E=I.z.redMul(H.redAdd(W).redSqr()),T=I.x.redMul(H.redISub(W).redSqr());return this.curve.point(E,T)},X.prototype.mul=function(K){for(var I=K.clone(),O=this,J=this.curve.point(null,null),F=this,A=[];I.cmpn(0)!==0;I.iushrn(1))A.push(I.andln(1));for(var H=A.length-1;H>=0;H--)A[H]===0?(O=O.diffAdd(J,F),J=J.dbl()):(J=O.diffAdd(J,F),O=O.dbl());return J},X.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},X.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},X.prototype.eq=function(K){return this.getX().cmp(K.getX())===0},X.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},X.prototype.getX=function(){return this.normalize(),this.x.fromRed()}}}),tQ=q$({"node_modules/elliptic/lib/elliptic/curve/edwards.js"($,Q){var Y=oQ(),Z=bQ(),G=_$(),V=uQ(),U=Y.assert;function X(I){this.twisted=(I.a|0)!==1,this.mOneA=this.twisted&&(I.a|0)===-1,this.extended=this.mOneA,V.call(this,"edwards",I),this.a=new Z(I.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new Z(I.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new Z(I.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),U(!this.twisted||this.c.fromRed().cmpn(1)===0),this.oneC=(I.c|0)===1}G(X,V),Q.exports=X,X.prototype._mulA=function(I){return this.mOneA?I.redNeg():this.a.redMul(I)},X.prototype._mulC=function(I){return this.oneC?I:this.c.redMul(I)},X.prototype.jpoint=function(I,O,J,F){return this.point(I,O,J,F)},X.prototype.pointFromX=function(I,O){I=new Z(I,16),I.red||(I=I.toRed(this.red));var J=I.redSqr(),F=this.c2.redSub(this.a.redMul(J)),A=this.one.redSub(this.c2.redMul(this.d).redMul(J)),H=F.redMul(A.redInvm()),W=H.redSqrt();if(W.redSqr().redSub(H).cmp(this.zero)!==0)throw new Error("invalid point");var E=W.fromRed().isOdd();return(O&&!E||!O&&E)&&(W=W.redNeg()),this.point(I,W)},X.prototype.pointFromY=function(I,O){I=new Z(I,16),I.red||(I=I.toRed(this.red));var J=I.redSqr(),F=J.redSub(this.c2),A=J.redMul(this.d).redMul(this.c2).redSub(this.a),H=F.redMul(A.redInvm());if(H.cmp(this.zero)===0){if(O)throw new Error("invalid point");return this.point(this.zero,I)}var W=H.redSqrt();if(W.redSqr().redSub(H).cmp(this.zero)!==0)throw new Error("invalid point");return W.fromRed().isOdd()!==O&&(W=W.redNeg()),this.point(W,I)},X.prototype.validate=function(I){if(I.isInfinity())return!0;I.normalize();var O=I.x.redSqr(),J=I.y.redSqr(),F=O.redMul(this.a).redAdd(J),A=this.c2.redMul(this.one.redAdd(this.d.redMul(O).redMul(J)));return F.cmp(A)===0};function K(I,O,J,F,A){V.BasePoint.call(this,I,"projective"),O===null&&J===null&&F===null?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new Z(O,16),this.y=new Z(J,16),this.z=F?new Z(F,16):this.curve.one,this.t=A&&new Z(A,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}G(K,V.BasePoint),X.prototype.pointFromJSON=function(I){return K.fromJSON(this,I)},X.prototype.point=function(I,O,J,F){return new K(this,I,O,J,F)},K.fromJSON=function(I,O){return new K(I,O[0],O[1],O[2])},K.prototype.inspect=function(){return this.isInfinity()?"":""},K.prototype.isInfinity=function(){return this.x.cmpn(0)===0&&(this.y.cmp(this.z)===0||this.zOne&&this.y.cmp(this.curve.c)===0)},K.prototype._extDbl=function(){var I=this.x.redSqr(),O=this.y.redSqr(),J=this.z.redSqr();J=J.redIAdd(J);var F=this.curve._mulA(I),A=this.x.redAdd(this.y).redSqr().redISub(I).redISub(O),H=F.redAdd(O),W=H.redSub(J),E=F.redSub(O),T=A.redMul(W),D=H.redMul(E),C=A.redMul(E),L=W.redMul(H);return this.curve.point(T,D,L,C)},K.prototype._projDbl=function(){var I=this.x.redAdd(this.y).redSqr(),O=this.x.redSqr(),J=this.y.redSqr(),F,A,H,W,E,T;if(this.curve.twisted){W=this.curve._mulA(O);var D=W.redAdd(J);this.zOne?(F=I.redSub(O).redSub(J).redMul(D.redSub(this.curve.two)),A=D.redMul(W.redSub(J)),H=D.redSqr().redSub(D).redSub(D)):(E=this.z.redSqr(),T=D.redSub(E).redISub(E),F=I.redSub(O).redISub(J).redMul(T),A=D.redMul(W.redSub(J)),H=D.redMul(T))}else W=O.redAdd(J),E=this.curve._mulC(this.z).redSqr(),T=W.redSub(E).redSub(E),F=this.curve._mulC(I.redISub(W)).redMul(T),A=this.curve._mulC(W).redMul(O.redISub(J)),H=W.redMul(T);return this.curve.point(F,A,H)},K.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},K.prototype._extAdd=function(I){var O=this.y.redSub(this.x).redMul(I.y.redSub(I.x)),J=this.y.redAdd(this.x).redMul(I.y.redAdd(I.x)),F=this.t.redMul(this.curve.dd).redMul(I.t),A=this.z.redMul(I.z.redAdd(I.z)),H=J.redSub(O),W=A.redSub(F),E=A.redAdd(F),T=J.redAdd(O),D=H.redMul(W),C=E.redMul(T),L=H.redMul(T),R=W.redMul(E);return this.curve.point(D,C,R,L)},K.prototype._projAdd=function(I){var O=this.z.redMul(I.z),J=O.redSqr(),F=this.x.redMul(I.x),A=this.y.redMul(I.y),H=this.curve.d.redMul(F).redMul(A),W=J.redSub(H),E=J.redAdd(H),T=this.x.redAdd(this.y).redMul(I.x.redAdd(I.y)).redISub(F).redISub(A),D=O.redMul(W).redMul(T),C,L;return this.curve.twisted?(C=O.redMul(E).redMul(A.redSub(this.curve._mulA(F))),L=W.redMul(E)):(C=O.redMul(E).redMul(A.redSub(F)),L=this.curve._mulC(W).redMul(E)),this.curve.point(D,C,L)},K.prototype.add=function(I){return this.isInfinity()?I:I.isInfinity()?this:this.curve.extended?this._extAdd(I):this._projAdd(I)},K.prototype.mul=function(I){return this._hasDoubles(I)?this.curve._fixedNafMul(this,I):this.curve._wnafMul(this,I)},K.prototype.mulAdd=function(I,O,J){return this.curve._wnafMulAdd(1,[this,O],[I,J],2,!1)},K.prototype.jmulAdd=function(I,O,J){return this.curve._wnafMulAdd(1,[this,O],[I,J],2,!0)},K.prototype.normalize=function(){if(this.zOne)return this;var I=this.z.redInvm();return this.x=this.x.redMul(I),this.y=this.y.redMul(I),this.t&&(this.t=this.t.redMul(I)),this.z=this.curve.one,this.zOne=!0,this},K.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},K.prototype.getX=function(){return this.normalize(),this.x.fromRed()},K.prototype.getY=function(){return this.normalize(),this.y.fromRed()},K.prototype.eq=function(I){return this===I||this.getX().cmp(I.getX())===0&&this.getY().cmp(I.getY())===0},K.prototype.eqXToP=function(I){var O=I.toRed(this.curve.red).redMul(this.z);if(this.x.cmp(O)===0)return!0;for(var J=I.clone(),F=this.curve.redN.redMul(this.z);;){if(J.iadd(this.curve.n),J.cmp(this.curve.p)>=0)return!1;if(O.redIAdd(F),this.x.cmp(O)===0)return!0}},K.prototype.toP=K.prototype.normalize,K.prototype.mixedAdd=K.prototype.add}}),mQ=q$({"node_modules/elliptic/lib/elliptic/curve/index.js"($){var Q=$;Q.base=uQ(),Q.short=nQ(),Q.mont=sQ(),Q.edwards=tQ()}}),aQ=q$({"node_modules/hash.js/lib/hash/utils.js"($){var Q=ZQ(),Y=_$();$.inherits=Y;function Z(k,g){return(k.charCodeAt(g)&64512)!==55296||g<0||g+1>=k.length?!1:(k.charCodeAt(g+1)&64512)===56320}function G(k,g){if(Array.isArray(k))return k.slice();if(!k)return[];var _=[];if(typeof k=="string")if(g){if(g==="hex")for(k=k.replace(/[^a-z0-9]+/gi,""),k.length%2!==0&&(k="0"+k),x=0;x>6|192,_[N++]=B&63|128):Z(k,x)?(B=65536+((B&1023)<<10)+(k.charCodeAt(++x)&1023),_[N++]=B>>18|240,_[N++]=B>>12&63|128,_[N++]=B>>6&63|128,_[N++]=B&63|128):(_[N++]=B>>12|224,_[N++]=B>>6&63|128,_[N++]=B&63|128)}else for(x=0;x>>24|k>>>8&65280|k<<8&16711680|(k&255)<<24;return g>>>0}$.htonl=U;function X(k,g){for(var _="",N=0;N>>0}return B}$.join32=O;function J(k,g){for(var _=new Array(k.length*4),N=0,x=0;N>>24,_[x+1]=B>>>16&255,_[x+2]=B>>>8&255,_[x+3]=B&255):(_[x+3]=B>>>24,_[x+2]=B>>>16&255,_[x+1]=B>>>8&255,_[x]=B&255)}return _}$.split32=J;function F(k,g){return k>>>g|k<<32-g}$.rotr32=F;function A(k,g){return k<>>32-g}$.rotl32=A;function H(k,g){return k+g>>>0}$.sum32=H;function W(k,g,_){return k+g+_>>>0}$.sum32_3=W;function E(k,g,_,N){return k+g+_+N>>>0}$.sum32_4=E;function T(k,g,_,N,x){return k+g+_+N+x>>>0}$.sum32_5=T;function D(k,g,_,N){var x=k[g],B=k[g+1],y=N+B>>>0,w=(y>>0,k[g+1]=y}$.sum64=D;function C(k,g,_,N){var x=g+N>>>0,B=(x>>0}$.sum64_hi=C;function L(k,g,_,N){var x=g+N;return x>>>0}$.sum64_lo=L;function R(k,g,_,N,x,B,y,w){var p=0,f=g;f=f+N>>>0,p+=f>>0,p+=f>>0,p+=f>>0}$.sum64_4_hi=R;function P(k,g,_,N,x,B,y,w){var p=g+N+B+w;return p>>>0}$.sum64_4_lo=P;function z(k,g,_,N,x,B,y,w,p,f){var c=0,h=g;h=h+N>>>0,c+=h>>0,c+=h>>0,c+=h>>0,c+=h>>0}$.sum64_5_hi=z;function M(k,g,_,N,x,B,y,w,p,f){var c=g+N+B+w+f;return c>>>0}$.sum64_5_lo=M;function S(k,g,_){var N=g<<32-_|k>>>_;return N>>>0}$.rotr64_hi=S;function v(k,g,_){var N=k<<32-_|g>>>_;return N>>>0}$.rotr64_lo=v;function q(k,g,_){return k>>>_}$.shr64_hi=q;function j(k,g,_){var N=k<<32-_|g>>>_;return N>>>0}$.shr64_lo=j}}),eQ=q$({"node_modules/hash.js/lib/hash/common.js"($){var Q=aQ(),Y=ZQ();function Z(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}$.BlockHash=Z,Z.prototype.update=function(G,V){if(G=Q.toArray(G,V),this.pending?this.pending=this.pending.concat(G):this.pending=G,this.pendingTotal+=G.length,this.pending.length>=this._delta8){G=this.pending;var U=G.length%this._delta8;this.pending=G.slice(G.length-U,G.length),this.pending.length===0&&(this.pending=null),G=Q.join32(G,0,G.length-U,this.endian);for(var X=0;X>>24&255,X[K++]=G>>>16&255,X[K++]=G>>>8&255,X[K++]=G&255}else for(X[K++]=G&255,X[K++]=G>>>8&255,X[K++]=G>>>16&255,X[K++]=G>>>24&255,X[K++]=0,X[K++]=0,X[K++]=0,X[K++]=0,I=8;I>>3}$.g0_256=I;function O(J){return Y(J,17)^Y(J,19)^J>>>10}$.g1_256=O}}),iQ=q$({"node_modules/hash.js/lib/hash/sha/1.js"($,Q){var Y=aQ(),Z=eQ(),G=rQ(),V=Y.rotl32,U=Y.sum32,X=Y.sum32_5,K=G.ft_1,I=Z.BlockHash,O=[1518500249,1859775393,2400959708,3395469782];function J(){if(!(this instanceof J))return new J;I.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}Y.inherits(J,I),Q.exports=J,J.blockSize=512,J.outSize=160,J.hmacStrength=80,J.padLength=64,J.prototype._update=function(F,A){for(var H=this.W,W=0;W<16;W++)H[W]=F[A+W];for(;Wthis.blockSize&&(V=new this.Hash().update(V).digest()),Z(V.length<=this.blockSize);for(var U=V.length;U=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(X,K,I)}Q.exports=V,V.prototype._init=function(U,X,K){var I=U.concat(X).concat(K);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var O=0;O=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(U.concat(K||[])),this._reseed=1},V.prototype.generate=function(U,X,K,I){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");typeof X!="string"&&(I=K,K=X,X=null),K&&(K=Z.toArray(K,I||"hex"),this._update(K));for(var O=[];O.length"}}}),FY=q$({"node_modules/elliptic/lib/elliptic/ec/signature.js"($,Q){var Y=bQ(),Z=oQ(),G=Z.assert;function V(O,J){if(O instanceof V)return O;this._importDER(O,J)||(G(O.r&&O.s,"Signature without r or s"),this.r=new Y(O.r,16),this.s=new Y(O.s,16),O.recoveryParam===void 0?this.recoveryParam=null:this.recoveryParam=O.recoveryParam)}Q.exports=V;function U(){this.place=0}function X(O,J){var F=O[J.place++];if(!(F&128))return F;var A=F&15;if(A===0||A>4)return!1;for(var H=0,W=0,E=J.place;W>>=0;return H<=127?!1:(J.place=E,H)}function K(O){for(var J=0,F=O.length-1;!O[J]&&!(O[J+1]&128)&&J>>3);for(O.push(F|128);--F;)O.push(J>>>(F<<3)&255);O.push(J)}V.prototype.toDER=function(O){var J=this.r.toArray(),F=this.s.toArray();for(J[0]&128&&(J=[0].concat(J)),F[0]&128&&(F=[0].concat(F)),J=K(J),F=K(F);!F[0]&&!(F[1]&128);)F=F.slice(1);var A=[2];I(A,J.length),A=A.concat(J),A.push(2),I(A,F.length);var H=A.concat(F),W=[48];return I(W,H.length),W=W.concat(H),Z.encode(W,O)}}}),AY=q$({"node_modules/elliptic/lib/elliptic/ec/index.js"($,Q){var Y=bQ(),Z=OY(),G=oQ(),V=IY(),U=xQ(),X=G.assert,K=JY(),I=FY();function O(J){if(!(this instanceof O))return new O(J);typeof J=="string"&&(X(Object.prototype.hasOwnProperty.call(V,J),"Unknown curve "+J),J=V[J]),J instanceof V.PresetCurve&&(J={curve:J}),this.curve=J.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=J.curve.g,this.g.precompute(J.curve.n.bitLength()+1),this.hash=J.hash||J.curve.hash}Q.exports=O,O.prototype.keyPair=function(J){return new K(this,J)},O.prototype.keyFromPrivate=function(J,F){return K.fromPrivate(this,J,F)},O.prototype.keyFromPublic=function(J,F){return K.fromPublic(this,J,F)},O.prototype.genKeyPair=function(J){J||(J={});for(var F=new Z({hash:this.hash,pers:J.pers,persEnc:J.persEnc||"utf8",entropy:J.entropy||U(this.hash.hmacStrength),entropyEnc:J.entropy&&J.entropyEnc||"utf8",nonce:this.n.toArray()}),A=this.n.byteLength(),H=this.n.sub(new Y(2));;){var W=new Y(F.generate(A));if(!(W.cmp(H)>0))return W.iaddn(1),this.keyFromPrivate(W)}},O.prototype._truncateToN=function(J,F){var A=J.byteLength()*8-this.n.bitLength();return A>0&&(J=J.ushrn(A)),!F&&J.cmp(this.n)>=0?J.sub(this.n):J},O.prototype.sign=function(J,F,A,H){typeof A=="object"&&(H=A,A=null),H||(H={}),F=this.keyFromPrivate(F,A),J=this._truncateToN(new Y(J,16));for(var W=this.n.byteLength(),E=F.getPrivate().toArray("be",W),T=J.toArray("be",W),D=new Z({hash:this.hash,entropy:E,nonce:T,pers:H.pers,persEnc:H.persEnc||"utf8"}),C=this.n.sub(new Y(1)),L=0;;L++){var R=H.k?H.k(L):new Y(D.generate(this.n.byteLength()));if(R=this._truncateToN(R,!0),!(R.cmpn(1)<=0||R.cmp(C)>=0)){var P=this.g.mul(R);if(!P.isInfinity()){var z=P.getX(),M=z.umod(this.n);if(M.cmpn(0)!==0){var S=R.invm(this.n).mul(M.mul(F.getPrivate()).iadd(J));if(S=S.umod(this.n),S.cmpn(0)!==0){var v=(P.getY().isOdd()?1:0)|(z.cmp(M)!==0?2:0);return H.canonical&&S.cmp(this.nh)>0&&(S=this.n.sub(S),v^=1),new I({r:M,s:S,recoveryParam:v})}}}}}},O.prototype.verify=function(J,F,A,H){J=this._truncateToN(new Y(J,16)),A=this.keyFromPublic(A,H),F=new I(F,"hex");var{r:W,s:E}=F;if(W.cmpn(1)<0||W.cmp(this.n)>=0||E.cmpn(1)<0||E.cmp(this.n)>=0)return!1;var T=E.invm(this.n),D=T.mul(J).umod(this.n),C=T.mul(W).umod(this.n),L;return this.curve._maxwellTrick?(L=this.g.jmulAdd(D,A.getPublic(),C),L.isInfinity()?!1:L.eqXToP(W)):(L=this.g.mulAdd(D,A.getPublic(),C),L.isInfinity()?!1:L.getX().umod(this.n).cmp(W)===0)},O.prototype.recoverPubKey=function(J,F,A,H){X((3&A)===A,"The recovery param is more than two bits"),F=new I(F,H);var W=this.n,E=new Y(J),T=F.r,D=F.s,C=A&1,L=A>>1;if(T.cmp(this.curve.p.umod(this.curve.n))>=0&&L)throw new Error("Unable to find sencond key candinate");L?T=this.curve.pointFromX(T.add(this.curve.n),C):T=this.curve.pointFromX(T,C);var R=F.r.invm(W),P=W.sub(E).mul(R).umod(W),z=D.mul(R).umod(W);return this.g.mulAdd(P,T,z)},O.prototype.getKeyRecoveryParam=function(J,F,A,H){if(F=new I(F,H),F.recoveryParam!==null)return F.recoveryParam;for(var W=0;W<4;W++){var E;try{E=this.recoverPubKey(J,F,W)}catch{continue}if(E.eq(A))return W}throw new Error("Unable to find valid recovery factor")}}}),HY=q$({"node_modules/elliptic/lib/elliptic/eddsa/key.js"($,Q){var Y=oQ(),Z=Y.assert,G=Y.parseBytes,V=Y.cachedProperty;function U(X,K){this.eddsa=X,this._secret=G(K.secret),X.isPoint(K.pub)?this._pub=K.pub:this._pubBytes=G(K.pub)}U.fromPublic=function(X,K){return K instanceof U?K:new U(X,{pub:K})},U.fromSecret=function(X,K){return K instanceof U?K:new U(X,{secret:K})},U.prototype.secret=function(){return this._secret},V(U,"pubBytes",function(){return this.eddsa.encodePoint(this.pub())}),V(U,"pub",function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())}),V(U,"privBytes",function(){var X=this.eddsa,K=this.hash(),I=X.encodingLength-1,O=K.slice(0,X.encodingLength);return O[0]&=248,O[I]&=127,O[I]|=64,O}),V(U,"priv",function(){return this.eddsa.decodeInt(this.privBytes())}),V(U,"hash",function(){return this.eddsa.hash().update(this.secret()).digest()}),V(U,"messagePrefix",function(){return this.hash().slice(this.eddsa.encodingLength)}),U.prototype.sign=function(X){return Z(this._secret,"KeyPair can only verify"),this.eddsa.sign(X,this)},U.prototype.verify=function(X,K){return this.eddsa.verify(X,K,this)},U.prototype.getSecret=function(X){return Z(this._secret,"KeyPair is public only"),Y.encode(this.secret(),X)},U.prototype.getPublic=function(X){return Y.encode(this.pubBytes(),X)},Q.exports=U}}),WY=q$({"node_modules/elliptic/lib/elliptic/eddsa/signature.js"($,Q){var Y=bQ(),Z=oQ(),G=Z.assert,V=Z.cachedProperty,U=Z.parseBytes;function X(K,I){this.eddsa=K,typeof I!="object"&&(I=U(I)),Array.isArray(I)&&(I={R:I.slice(0,K.encodingLength),S:I.slice(K.encodingLength)}),G(I.R&&I.S,"Signature without R or S"),K.isPoint(I.R)&&(this._R=I.R),I.S instanceof Y&&(this._S=I.S),this._Rencoded=Array.isArray(I.R)?I.R:I.Rencoded,this._Sencoded=Array.isArray(I.S)?I.S:I.Sencoded}V(X,"S",function(){return this.eddsa.decodeInt(this.Sencoded())}),V(X,"R",function(){return this.eddsa.decodePoint(this.Rencoded())}),V(X,"Rencoded",function(){return this.eddsa.encodePoint(this.R())}),V(X,"Sencoded",function(){return this.eddsa.encodeInt(this.S())}),X.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},X.prototype.toHex=function(){return Z.encode(this.toBytes(),"hex").toUpperCase()},Q.exports=X}}),EY=q$({"node_modules/elliptic/lib/elliptic/eddsa/index.js"($,Q){var Y=XY(),Z=IY(),G=oQ(),V=G.assert,U=G.parseBytes,X=HY(),K=WY();function I(O){if(V(O==="ed25519","only tested with ed25519 so far"),!(this instanceof I))return new I(O);O=Z[O].curve,this.curve=O,this.g=O.g,this.g.precompute(O.n.bitLength()+1),this.pointClass=O.point().constructor,this.encodingLength=Math.ceil(O.n.bitLength()/8),this.hash=Y.sha512}Q.exports=I,I.prototype.sign=function(O,J){O=U(O);var F=this.keyFromSecret(J),A=this.hashInt(F.messagePrefix(),O),H=this.g.mul(A),W=this.encodePoint(H),E=this.hashInt(W,F.pubBytes(),O).mul(F.priv()),T=A.add(E).umod(this.curve.n);return this.makeSignature({R:H,S:T,Rencoded:W})},I.prototype.verify=function(O,J,F){O=U(O),J=this.makeSignature(J);var A=this.keyFromPublic(F),H=this.hashInt(J.Rencoded(),A.pubBytes(),O),W=this.g.mul(J.S()),E=J.R().add(A.pub().mul(H));return E.eq(W)},I.prototype.hashInt=function(){for(var O=this.hash(),J=0;J0?j:k},U.min=function(j,k){return j.cmp(k)<0?j:k},U.prototype._init=function(j,k,g){if(typeof j=="number")return this._initNumber(j,k,g);if(typeof j=="object")return this._initArray(j,k,g);k==="hex"&&(k=16),G(k===(k|0)&&k>=2&&k<=36),j=j.toString().replace(/\s+/g,"");var _=0;j[0]==="-"&&(_++,this.negative=1),_=0;_-=3)x=j[_]|j[_-1]<<8|j[_-2]<<16,this.words[N]|=x<>>26-B&67108863,B+=24,B>=26&&(B-=26,N++);else if(g==="le")for(_=0,N=0;_>>26-B&67108863,B+=24,B>=26&&(B-=26,N++);return this.strip()};function K(j,k){var g=j.charCodeAt(k);return g>=65&&g<=70?g-55:g>=97&&g<=102?g-87:g-48&15}function I(j,k,g){var _=K(j,g);return g-1>=k&&(_|=K(j,g-1)<<4),_}U.prototype._parseHex=function(j,k,g){this.length=Math.ceil((j.length-k)/6),this.words=new Array(this.length);for(var _=0;_=k;_-=2)B=I(j,k,_)<=18?(N-=18,x+=1,this.words[x]|=B>>>26):N+=8;else{var y=j.length-k;for(_=y%2===0?k+1:k;_=18?(N-=18,x+=1,this.words[x]|=B>>>26):N+=8}this.strip()};function O(j,k,g,_){for(var N=0,x=Math.min(j.length,g),B=k;B=49?N+=y-49+10:y>=17?N+=y-17+10:N+=y}return N}U.prototype._parseBase=function(j,k,g){this.words=[0],this.length=1;for(var _=0,N=1;N<=67108863;N*=k)_++;_--,N=N/k|0;for(var x=j.length-g,B=x%_,y=Math.min(x,x-B)+g,w=0,p=g;p1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},U.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},U.prototype.inspect=function(){return(this.red?""};var J=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],F=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],A=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64000000,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,24300000,28629151,33554432,39135393,45435424,52521875,60466176];U.prototype.toString=function(j,k){j=j||10,k=k|0||1;var g;if(j===16||j==="hex"){g="";for(var _=0,N=0,x=0;x>>24-_&16777215,N!==0||x!==this.length-1?g=J[6-y.length]+y+g:g=y+g,_+=2,_>=26&&(_-=26,x--)}for(N!==0&&(g=N.toString(16)+g);g.length%k!==0;)g="0"+g;return this.negative!==0&&(g="-"+g),g}if(j===(j|0)&&j>=2&&j<=36){var w=F[j],p=A[j];g="";var f=this.clone();for(f.negative=0;!f.isZero();){var c=f.modn(p).toString(j);f=f.idivn(p),f.isZero()?g=c+g:g=J[w-c.length]+c+g}for(this.isZero()&&(g="0"+g);g.length%k!==0;)g="0"+g;return this.negative!==0&&(g="-"+g),g}G(!1,"Base should be between 2 and 36")},U.prototype.toNumber=function(){var j=this.words[0];return this.length===2?j+=this.words[1]*67108864:this.length===3&&this.words[2]===1?j+=4503599627370496+this.words[1]*67108864:this.length>2&&G(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-j:j},U.prototype.toJSON=function(){return this.toString(16)},U.prototype.toBuffer=function(j,k){return G(typeof X<"u"),this.toArrayLike(X,j,k)},U.prototype.toArray=function(j,k){return this.toArrayLike(Array,j,k)},U.prototype.toArrayLike=function(j,k,g){var _=this.byteLength(),N=g||Math.max(1,_);G(_<=N,"byte array longer than desired length"),G(N>0,"Requested array length <= 0"),this.strip();var x=k==="le",B=new j(N),y,w,p=this.clone();if(x){for(w=0;!p.isZero();w++)y=p.andln(255),p.iushrn(8),B[w]=y;for(;w=4096&&(g+=13,k>>>=13),k>=64&&(g+=7,k>>>=7),k>=8&&(g+=4,k>>>=4),k>=2&&(g+=2,k>>>=2),g+k},U.prototype._zeroBits=function(j){if(j===0)return 26;var k=j,g=0;return(k&8191)===0&&(g+=13,k>>>=13),(k&127)===0&&(g+=7,k>>>=7),(k&15)===0&&(g+=4,k>>>=4),(k&3)===0&&(g+=2,k>>>=2),(k&1)===0&&g++,g},U.prototype.bitLength=function(){var j=this.words[this.length-1],k=this._countBits(j);return(this.length-1)*26+k};function H(j){for(var k=new Array(j.bitLength()),g=0;g>>N}return k}U.prototype.zeroBits=function(){if(this.isZero())return 0;for(var j=0,k=0;kj.length?this.clone().ior(j):j.clone().ior(this)},U.prototype.uor=function(j){return this.length>j.length?this.clone().iuor(j):j.clone().iuor(this)},U.prototype.iuand=function(j){var k;this.length>j.length?k=j:k=this;for(var g=0;gj.length?this.clone().iand(j):j.clone().iand(this)},U.prototype.uand=function(j){return this.length>j.length?this.clone().iuand(j):j.clone().iuand(this)},U.prototype.iuxor=function(j){var k,g;this.length>j.length?(k=this,g=j):(k=j,g=this);for(var _=0;_j.length?this.clone().ixor(j):j.clone().ixor(this)},U.prototype.uxor=function(j){return this.length>j.length?this.clone().iuxor(j):j.clone().iuxor(this)},U.prototype.inotn=function(j){G(typeof j=="number"&&j>=0);var k=Math.ceil(j/26)|0,g=j%26;this._expand(k),g>0&&k--;for(var _=0;_0&&(this.words[_]=~this.words[_]&67108863>>26-g),this.strip()},U.prototype.notn=function(j){return this.clone().inotn(j)},U.prototype.setn=function(j,k){G(typeof j=="number"&&j>=0);var g=j/26|0,_=j%26;return this._expand(g+1),k?this.words[g]=this.words[g]|1<<_:this.words[g]=this.words[g]&~(1<<_),this.strip()},U.prototype.iadd=function(j){var k;if(this.negative!==0&&j.negative===0)return this.negative=0,k=this.isub(j),this.negative^=1,this._normSign();if(this.negative===0&&j.negative!==0)return j.negative=0,k=this.isub(j),j.negative=1,k._normSign();var g,_;this.length>j.length?(g=this,_=j):(g=j,_=this);for(var N=0,x=0;x<_.length;x++)k=(g.words[x]|0)+(_.words[x]|0)+N,this.words[x]=k&67108863,N=k>>>26;for(;N!==0&&x>>26;if(this.length=g.length,N!==0)this.words[this.length]=N,this.length++;else if(g!==this)for(;xj.length?this.clone().iadd(j):j.clone().iadd(this)},U.prototype.isub=function(j){if(j.negative!==0){j.negative=0;var k=this.iadd(j);return j.negative=1,k._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(j),this.negative=1,this._normSign();var g=this.cmp(j);if(g===0)return this.negative=0,this.length=1,this.words[0]=0,this;var _,N;g>0?(_=this,N=j):(_=j,N=this);for(var x=0,B=0;B>26,this.words[B]=k&67108863;for(;x!==0&&B<_.length;B++)k=(_.words[B]|0)+x,x=k>>26,this.words[B]=k&67108863;if(x===0&&B<_.length&&_!==this)for(;B<_.length;B++)this.words[B]=_.words[B];return this.length=Math.max(this.length,B),_!==this&&(this.negative=1),this.strip()},U.prototype.sub=function(j){return this.clone().isub(j)};function W(j,k,g){g.negative=k.negative^j.negative;var _=j.length+k.length|0;g.length=_,_=_-1|0;var N=j.words[0]|0,x=k.words[0]|0,B=N*x,y=B&67108863,w=B/67108864|0;g.words[0]=y;for(var p=1;p<_;p++){for(var f=w>>>26,c=w&67108863,h=Math.min(p,k.length-1),d=Math.max(0,p-j.length+1);d<=h;d++){var b=p-d|0;N=j.words[b]|0,x=k.words[d]|0,B=N*x+c,f+=B/67108864|0,c=B&67108863}g.words[p]=c|0,w=f|0}return w!==0?g.words[p]=w|0:g.length--,g.strip()}var E=function(j,k,g){var _=j.words,N=k.words,x=g.words,B=0,y,w,p,f=_[0]|0,c=f&8191,h=f>>>13,d=_[1]|0,b=d&8191,l=d>>>13,o=_[2]|0,u=o&8191,n=o>>>13,s=_[3]|0,t=s&8191,m=s>>>13,a=_[4]|0,e=a&8191,r=a>>>13,i=_[5]|0,$0=i&8191,Q0=i>>>13,Y0=_[6]|0,Z0=Y0&8191,G0=Y0>>>13,V0=_[7]|0,U0=V0&8191,X0=V0>>>13,K0=_[8]|0,I0=K0&8191,O0=K0>>>13,J0=_[9]|0,F0=J0&8191,A0=J0>>>13,H0=N[0]|0,W0=H0&8191,E0=H0>>>13,T0=N[1]|0,D0=T0&8191,C0=T0>>>13,L0=N[2]|0,R0=L0&8191,P0=L0>>>13,z0=N[3]|0,M0=z0&8191,S0=z0>>>13,v0=N[4]|0,q0=v0&8191,j0=v0>>>13,k0=N[5]|0,g0=k0&8191,_0=k0>>>13,N0=N[6]|0,x0=N0&8191,B0=N0>>>13,y0=N[7]|0,w0=y0&8191,p0=y0>>>13,f0=N[8]|0,c0=f0&8191,h0=f0>>>13,d0=N[9]|0,b0=d0&8191,l0=d0>>>13;g.negative=j.negative^k.negative,g.length=19,y=Math.imul(c,W0),w=Math.imul(c,E0),w=w+Math.imul(h,W0)|0,p=Math.imul(h,E0);var o0=(B+y|0)+((w&8191)<<13)|0;B=(p+(w>>>13)|0)+(o0>>>26)|0,o0&=67108863,y=Math.imul(b,W0),w=Math.imul(b,E0),w=w+Math.imul(l,W0)|0,p=Math.imul(l,E0),y=y+Math.imul(c,D0)|0,w=w+Math.imul(c,C0)|0,w=w+Math.imul(h,D0)|0,p=p+Math.imul(h,C0)|0;var u0=(B+y|0)+((w&8191)<<13)|0;B=(p+(w>>>13)|0)+(u0>>>26)|0,u0&=67108863,y=Math.imul(u,W0),w=Math.imul(u,E0),w=w+Math.imul(n,W0)|0,p=Math.imul(n,E0),y=y+Math.imul(b,D0)|0,w=w+Math.imul(b,C0)|0,w=w+Math.imul(l,D0)|0,p=p+Math.imul(l,C0)|0,y=y+Math.imul(c,R0)|0,w=w+Math.imul(c,P0)|0,w=w+Math.imul(h,R0)|0,p=p+Math.imul(h,P0)|0;var n0=(B+y|0)+((w&8191)<<13)|0;B=(p+(w>>>13)|0)+(n0>>>26)|0,n0&=67108863,y=Math.imul(t,W0),w=Math.imul(t,E0),w=w+Math.imul(m,W0)|0,p=Math.imul(m,E0),y=y+Math.imul(u,D0)|0,w=w+Math.imul(u,C0)|0,w=w+Math.imul(n,D0)|0,p=p+Math.imul(n,C0)|0,y=y+Math.imul(b,R0)|0,w=w+Math.imul(b,P0)|0,w=w+Math.imul(l,R0)|0,p=p+Math.imul(l,P0)|0,y=y+Math.imul(c,M0)|0,w=w+Math.imul(c,S0)|0,w=w+Math.imul(h,M0)|0,p=p+Math.imul(h,S0)|0;var s0=(B+y|0)+((w&8191)<<13)|0;B=(p+(w>>>13)|0)+(s0>>>26)|0,s0&=67108863,y=Math.imul(e,W0),w=Math.imul(e,E0),w=w+Math.imul(r,W0)|0,p=Math.imul(r,E0),y=y+Math.imul(t,D0)|0,w=w+Math.imul(t,C0)|0,w=w+Math.imul(m,D0)|0,p=p+Math.imul(m,C0)|0,y=y+Math.imul(u,R0)|0,w=w+Math.imul(u,P0)|0,w=w+Math.imul(n,R0)|0,p=p+Math.imul(n,P0)|0,y=y+Math.imul(b,M0)|0,w=w+Math.imul(b,S0)|0,w=w+Math.imul(l,M0)|0,p=p+Math.imul(l,S0)|0,y=y+Math.imul(c,q0)|0,w=w+Math.imul(c,j0)|0,w=w+Math.imul(h,q0)|0,p=p+Math.imul(h,j0)|0;var t0=(B+y|0)+((w&8191)<<13)|0;B=(p+(w>>>13)|0)+(t0>>>26)|0,t0&=67108863,y=Math.imul($0,W0),w=Math.imul($0,E0),w=w+Math.imul(Q0,W0)|0,p=Math.imul(Q0,E0),y=y+Math.imul(e,D0)|0,w=w+Math.imul(e,C0)|0,w=w+Math.imul(r,D0)|0,p=p+Math.imul(r,C0)|0,y=y+Math.imul(t,R0)|0,w=w+Math.imul(t,P0)|0,w=w+Math.imul(m,R0)|0,p=p+Math.imul(m,P0)|0,y=y+Math.imul(u,M0)|0,w=w+Math.imul(u,S0)|0,w=w+Math.imul(n,M0)|0,p=p+Math.imul(n,S0)|0,y=y+Math.imul(b,q0)|0,w=w+Math.imul(b,j0)|0,w=w+Math.imul(l,q0)|0,p=p+Math.imul(l,j0)|0,y=y+Math.imul(c,g0)|0,w=w+Math.imul(c,_0)|0,w=w+Math.imul(h,g0)|0,p=p+Math.imul(h,_0)|0;var m0=(B+y|0)+((w&8191)<<13)|0;B=(p+(w>>>13)|0)+(m0>>>26)|0,m0&=67108863,y=Math.imul(Z0,W0),w=Math.imul(Z0,E0),w=w+Math.imul(G0,W0)|0,p=Math.imul(G0,E0),y=y+Math.imul($0,D0)|0,w=w+Math.imul($0,C0)|0,w=w+Math.imul(Q0,D0)|0,p=p+Math.imul(Q0,C0)|0,y=y+Math.imul(e,R0)|0,w=w+Math.imul(e,P0)|0,w=w+Math.imul(r,R0)|0,p=p+Math.imul(r,P0)|0,y=y+Math.imul(t,M0)|0,w=w+Math.imul(t,S0)|0,w=w+Math.imul(m,M0)|0,p=p+Math.imul(m,S0)|0,y=y+Math.imul(u,q0)|0,w=w+Math.imul(u,j0)|0,w=w+Math.imul(n,q0)|0,p=p+Math.imul(n,j0)|0,y=y+Math.imul(b,g0)|0,w=w+Math.imul(b,_0)|0,w=w+Math.imul(l,g0)|0,p=p+Math.imul(l,_0)|0,y=y+Math.imul(c,x0)|0,w=w+Math.imul(c,B0)|0,w=w+Math.imul(h,x0)|0,p=p+Math.imul(h,B0)|0;var a0=(B+y|0)+((w&8191)<<13)|0;B=(p+(w>>>13)|0)+(a0>>>26)|0,a0&=67108863,y=Math.imul(U0,W0),w=Math.imul(U0,E0),w=w+Math.imul(X0,W0)|0,p=Math.imul(X0,E0),y=y+Math.imul(Z0,D0)|0,w=w+Math.imul(Z0,C0)|0,w=w+Math.imul(G0,D0)|0,p=p+Math.imul(G0,C0)|0,y=y+Math.imul($0,R0)|0,w=w+Math.imul($0,P0)|0,w=w+Math.imul(Q0,R0)|0,p=p+Math.imul(Q0,P0)|0,y=y+Math.imul(e,M0)|0,w=w+Math.imul(e,S0)|0,w=w+Math.imul(r,M0)|0,p=p+Math.imul(r,S0)|0,y=y+Math.imul(t,q0)|0,w=w+Math.imul(t,j0)|0,w=w+Math.imul(m,q0)|0,p=p+Math.imul(m,j0)|0,y=y+Math.imul(u,g0)|0,w=w+Math.imul(u,_0)|0,w=w+Math.imul(n,g0)|0,p=p+Math.imul(n,_0)|0,y=y+Math.imul(b,x0)|0,w=w+Math.imul(b,B0)|0,w=w+Math.imul(l,x0)|0,p=p+Math.imul(l,B0)|0,y=y+Math.imul(c,w0)|0,w=w+Math.imul(c,p0)|0,w=w+Math.imul(h,w0)|0,p=p+Math.imul(h,p0)|0;var e0=(B+y|0)+((w&8191)<<13)|0;B=(p+(w>>>13)|0)+(e0>>>26)|0,e0&=67108863,y=Math.imul(I0,W0),w=Math.imul(I0,E0),w=w+Math.imul(O0,W0)|0,p=Math.imul(O0,E0),y=y+Math.imul(U0,D0)|0,w=w+Math.imul(U0,C0)|0,w=w+Math.imul(X0,D0)|0,p=p+Math.imul(X0,C0)|0,y=y+Math.imul(Z0,R0)|0,w=w+Math.imul(Z0,P0)|0,w=w+Math.imul(G0,R0)|0,p=p+Math.imul(G0,P0)|0,y=y+Math.imul($0,M0)|0,w=w+Math.imul($0,S0)|0,w=w+Math.imul(Q0,M0)|0,p=p+Math.imul(Q0,S0)|0,y=y+Math.imul(e,q0)|0,w=w+Math.imul(e,j0)|0,w=w+Math.imul(r,q0)|0,p=p+Math.imul(r,j0)|0,y=y+Math.imul(t,g0)|0,w=w+Math.imul(t,_0)|0,w=w+Math.imul(m,g0)|0,p=p+Math.imul(m,_0)|0,y=y+Math.imul(u,x0)|0,w=w+Math.imul(u,B0)|0,w=w+Math.imul(n,x0)|0,p=p+Math.imul(n,B0)|0,y=y+Math.imul(b,w0)|0,w=w+Math.imul(b,p0)|0,w=w+Math.imul(l,w0)|0,p=p+Math.imul(l,p0)|0,y=y+Math.imul(c,c0)|0,w=w+Math.imul(c,h0)|0,w=w+Math.imul(h,c0)|0,p=p+Math.imul(h,h0)|0;var r0=(B+y|0)+((w&8191)<<13)|0;B=(p+(w>>>13)|0)+(r0>>>26)|0,r0&=67108863,y=Math.imul(F0,W0),w=Math.imul(F0,E0),w=w+Math.imul(A0,W0)|0,p=Math.imul(A0,E0),y=y+Math.imul(I0,D0)|0,w=w+Math.imul(I0,C0)|0,w=w+Math.imul(O0,D0)|0,p=p+Math.imul(O0,C0)|0,y=y+Math.imul(U0,R0)|0,w=w+Math.imul(U0,P0)|0,w=w+Math.imul(X0,R0)|0,p=p+Math.imul(X0,P0)|0,y=y+Math.imul(Z0,M0)|0,w=w+Math.imul(Z0,S0)|0,w=w+Math.imul(G0,M0)|0,p=p+Math.imul(G0,S0)|0,y=y+Math.imul($0,q0)|0,w=w+Math.imul($0,j0)|0,w=w+Math.imul(Q0,q0)|0,p=p+Math.imul(Q0,j0)|0,y=y+Math.imul(e,g0)|0,w=w+Math.imul(e,_0)|0,w=w+Math.imul(r,g0)|0,p=p+Math.imul(r,_0)|0,y=y+Math.imul(t,x0)|0,w=w+Math.imul(t,B0)|0,w=w+Math.imul(m,x0)|0,p=p+Math.imul(m,B0)|0,y=y+Math.imul(u,w0)|0,w=w+Math.imul(u,p0)|0,w=w+Math.imul(n,w0)|0,p=p+Math.imul(n,p0)|0,y=y+Math.imul(b,c0)|0,w=w+Math.imul(b,h0)|0,w=w+Math.imul(l,c0)|0,p=p+Math.imul(l,h0)|0,y=y+Math.imul(c,b0)|0,w=w+Math.imul(c,l0)|0,w=w+Math.imul(h,b0)|0,p=p+Math.imul(h,l0)|0;var i0=(B+y|0)+((w&8191)<<13)|0;B=(p+(w>>>13)|0)+(i0>>>26)|0,i0&=67108863,y=Math.imul(F0,D0),w=Math.imul(F0,C0),w=w+Math.imul(A0,D0)|0,p=Math.imul(A0,C0),y=y+Math.imul(I0,R0)|0,w=w+Math.imul(I0,P0)|0,w=w+Math.imul(O0,R0)|0,p=p+Math.imul(O0,P0)|0,y=y+Math.imul(U0,M0)|0,w=w+Math.imul(U0,S0)|0,w=w+Math.imul(X0,M0)|0,p=p+Math.imul(X0,S0)|0,y=y+Math.imul(Z0,q0)|0,w=w+Math.imul(Z0,j0)|0,w=w+Math.imul(G0,q0)|0,p=p+Math.imul(G0,j0)|0,y=y+Math.imul($0,g0)|0,w=w+Math.imul($0,_0)|0,w=w+Math.imul(Q0,g0)|0,p=p+Math.imul(Q0,_0)|0,y=y+Math.imul(e,x0)|0,w=w+Math.imul(e,B0)|0,w=w+Math.imul(r,x0)|0,p=p+Math.imul(r,B0)|0,y=y+Math.imul(t,w0)|0,w=w+Math.imul(t,p0)|0,w=w+Math.imul(m,w0)|0,p=p+Math.imul(m,p0)|0,y=y+Math.imul(u,c0)|0,w=w+Math.imul(u,h0)|0,w=w+Math.imul(n,c0)|0,p=p+Math.imul(n,h0)|0,y=y+Math.imul(b,b0)|0,w=w+Math.imul(b,l0)|0,w=w+Math.imul(l,b0)|0,p=p+Math.imul(l,l0)|0;var $$=(B+y|0)+((w&8191)<<13)|0;B=(p+(w>>>13)|0)+($$>>>26)|0,$$&=67108863,y=Math.imul(F0,R0),w=Math.imul(F0,P0),w=w+Math.imul(A0,R0)|0,p=Math.imul(A0,P0),y=y+Math.imul(I0,M0)|0,w=w+Math.imul(I0,S0)|0,w=w+Math.imul(O0,M0)|0,p=p+Math.imul(O0,S0)|0,y=y+Math.imul(U0,q0)|0,w=w+Math.imul(U0,j0)|0,w=w+Math.imul(X0,q0)|0,p=p+Math.imul(X0,j0)|0,y=y+Math.imul(Z0,g0)|0,w=w+Math.imul(Z0,_0)|0,w=w+Math.imul(G0,g0)|0,p=p+Math.imul(G0,_0)|0,y=y+Math.imul($0,x0)|0,w=w+Math.imul($0,B0)|0,w=w+Math.imul(Q0,x0)|0,p=p+Math.imul(Q0,B0)|0,y=y+Math.imul(e,w0)|0,w=w+Math.imul(e,p0)|0,w=w+Math.imul(r,w0)|0,p=p+Math.imul(r,p0)|0,y=y+Math.imul(t,c0)|0,w=w+Math.imul(t,h0)|0,w=w+Math.imul(m,c0)|0,p=p+Math.imul(m,h0)|0,y=y+Math.imul(u,b0)|0,w=w+Math.imul(u,l0)|0,w=w+Math.imul(n,b0)|0,p=p+Math.imul(n,l0)|0;var Q$=(B+y|0)+((w&8191)<<13)|0;B=(p+(w>>>13)|0)+(Q$>>>26)|0,Q$&=67108863,y=Math.imul(F0,M0),w=Math.imul(F0,S0),w=w+Math.imul(A0,M0)|0,p=Math.imul(A0,S0),y=y+Math.imul(I0,q0)|0,w=w+Math.imul(I0,j0)|0,w=w+Math.imul(O0,q0)|0,p=p+Math.imul(O0,j0)|0,y=y+Math.imul(U0,g0)|0,w=w+Math.imul(U0,_0)|0,w=w+Math.imul(X0,g0)|0,p=p+Math.imul(X0,_0)|0,y=y+Math.imul(Z0,x0)|0,w=w+Math.imul(Z0,B0)|0,w=w+Math.imul(G0,x0)|0,p=p+Math.imul(G0,B0)|0,y=y+Math.imul($0,w0)|0,w=w+Math.imul($0,p0)|0,w=w+Math.imul(Q0,w0)|0,p=p+Math.imul(Q0,p0)|0,y=y+Math.imul(e,c0)|0,w=w+Math.imul(e,h0)|0,w=w+Math.imul(r,c0)|0,p=p+Math.imul(r,h0)|0,y=y+Math.imul(t,b0)|0,w=w+Math.imul(t,l0)|0,w=w+Math.imul(m,b0)|0,p=p+Math.imul(m,l0)|0;var Y$=(B+y|0)+((w&8191)<<13)|0;B=(p+(w>>>13)|0)+(Y$>>>26)|0,Y$&=67108863,y=Math.imul(F0,q0),w=Math.imul(F0,j0),w=w+Math.imul(A0,q0)|0,p=Math.imul(A0,j0),y=y+Math.imul(I0,g0)|0,w=w+Math.imul(I0,_0)|0,w=w+Math.imul(O0,g0)|0,p=p+Math.imul(O0,_0)|0,y=y+Math.imul(U0,x0)|0,w=w+Math.imul(U0,B0)|0,w=w+Math.imul(X0,x0)|0,p=p+Math.imul(X0,B0)|0,y=y+Math.imul(Z0,w0)|0,w=w+Math.imul(Z0,p0)|0,w=w+Math.imul(G0,w0)|0,p=p+Math.imul(G0,p0)|0,y=y+Math.imul($0,c0)|0,w=w+Math.imul($0,h0)|0,w=w+Math.imul(Q0,c0)|0,p=p+Math.imul(Q0,h0)|0,y=y+Math.imul(e,b0)|0,w=w+Math.imul(e,l0)|0,w=w+Math.imul(r,b0)|0,p=p+Math.imul(r,l0)|0;var Z$=(B+y|0)+((w&8191)<<13)|0;B=(p+(w>>>13)|0)+(Z$>>>26)|0,Z$&=67108863,y=Math.imul(F0,g0),w=Math.imul(F0,_0),w=w+Math.imul(A0,g0)|0,p=Math.imul(A0,_0),y=y+Math.imul(I0,x0)|0,w=w+Math.imul(I0,B0)|0,w=w+Math.imul(O0,x0)|0,p=p+Math.imul(O0,B0)|0,y=y+Math.imul(U0,w0)|0,w=w+Math.imul(U0,p0)|0,w=w+Math.imul(X0,w0)|0,p=p+Math.imul(X0,p0)|0,y=y+Math.imul(Z0,c0)|0,w=w+Math.imul(Z0,h0)|0,w=w+Math.imul(G0,c0)|0,p=p+Math.imul(G0,h0)|0,y=y+Math.imul($0,b0)|0,w=w+Math.imul($0,l0)|0,w=w+Math.imul(Q0,b0)|0,p=p+Math.imul(Q0,l0)|0;var G$=(B+y|0)+((w&8191)<<13)|0;B=(p+(w>>>13)|0)+(G$>>>26)|0,G$&=67108863,y=Math.imul(F0,x0),w=Math.imul(F0,B0),w=w+Math.imul(A0,x0)|0,p=Math.imul(A0,B0),y=y+Math.imul(I0,w0)|0,w=w+Math.imul(I0,p0)|0,w=w+Math.imul(O0,w0)|0,p=p+Math.imul(O0,p0)|0,y=y+Math.imul(U0,c0)|0,w=w+Math.imul(U0,h0)|0,w=w+Math.imul(X0,c0)|0,p=p+Math.imul(X0,h0)|0,y=y+Math.imul(Z0,b0)|0,w=w+Math.imul(Z0,l0)|0,w=w+Math.imul(G0,b0)|0,p=p+Math.imul(G0,l0)|0;var V$=(B+y|0)+((w&8191)<<13)|0;B=(p+(w>>>13)|0)+(V$>>>26)|0,V$&=67108863,y=Math.imul(F0,w0),w=Math.imul(F0,p0),w=w+Math.imul(A0,w0)|0,p=Math.imul(A0,p0),y=y+Math.imul(I0,c0)|0,w=w+Math.imul(I0,h0)|0,w=w+Math.imul(O0,c0)|0,p=p+Math.imul(O0,h0)|0,y=y+Math.imul(U0,b0)|0,w=w+Math.imul(U0,l0)|0,w=w+Math.imul(X0,b0)|0,p=p+Math.imul(X0,l0)|0;var U$=(B+y|0)+((w&8191)<<13)|0;B=(p+(w>>>13)|0)+(U$>>>26)|0,U$&=67108863,y=Math.imul(F0,c0),w=Math.imul(F0,h0),w=w+Math.imul(A0,c0)|0,p=Math.imul(A0,h0),y=y+Math.imul(I0,b0)|0,w=w+Math.imul(I0,l0)|0,w=w+Math.imul(O0,b0)|0,p=p+Math.imul(O0,l0)|0;var X$=(B+y|0)+((w&8191)<<13)|0;B=(p+(w>>>13)|0)+(X$>>>26)|0,X$&=67108863,y=Math.imul(F0,b0),w=Math.imul(F0,l0),w=w+Math.imul(A0,b0)|0,p=Math.imul(A0,l0);var K$=(B+y|0)+((w&8191)<<13)|0;return B=(p+(w>>>13)|0)+(K$>>>26)|0,K$&=67108863,x[0]=o0,x[1]=u0,x[2]=n0,x[3]=s0,x[4]=t0,x[5]=m0,x[6]=a0,x[7]=e0,x[8]=r0,x[9]=i0,x[10]=$$,x[11]=Q$,x[12]=Y$,x[13]=Z$,x[14]=G$,x[15]=V$,x[16]=U$,x[17]=X$,x[18]=K$,B!==0&&(x[19]=B,g.length++),g};Math.imul||(E=W);function T(j,k,g){g.negative=k.negative^j.negative,g.length=j.length+k.length;for(var _=0,N=0,x=0;x>>26)|0,N+=B>>>26,B&=67108863}g.words[x]=y,_=B,B=N}return _!==0?g.words[x]=_:g.length--,g.strip()}function D(j,k,g){var _=new C;return _.mulp(j,k,g)}U.prototype.mulTo=function(j,k){var g,_=this.length+j.length;return this.length===10&&j.length===10?g=E(this,j,k):_<63?g=W(this,j,k):_<1024?g=T(this,j,k):g=D(this,j,k),g};function C(j,k){this.x=j,this.y=k}C.prototype.makeRBT=function(j){for(var k=new Array(j),g=U.prototype._countBits(j)-1,_=0;_>=1;return _},C.prototype.permute=function(j,k,g,_,N,x){for(var B=0;B>>1)N++;return 1<>>13,g[2*x+1]=N&8191,N=N>>>13;for(x=2*k;x<_;++x)g[x]=0;G(N===0),G((N&-8192)===0)},C.prototype.stub=function(j){for(var k=new Array(j),g=0;g>=26,k+=_/67108864|0,k+=N>>>26,this.words[g]=N&67108863}return k!==0&&(this.words[g]=k,this.length++),this},U.prototype.muln=function(j){return this.clone().imuln(j)},U.prototype.sqr=function(){return this.mul(this)},U.prototype.isqr=function(){return this.imul(this.clone())},U.prototype.pow=function(j){var k=H(j);if(k.length===0)return new U(1);for(var g=this,_=0;_=0);var k=j%26,g=(j-k)/26,_=67108863>>>26-k<<26-k,N;if(k!==0){var x=0;for(N=0;N>>26-k}x&&(this.words[N]=x,this.length++)}if(g!==0){for(N=this.length-1;N>=0;N--)this.words[N+g]=this.words[N];for(N=0;N=0);var _;k?_=(k-k%26)/26:_=0;var N=j%26,x=Math.min((j-N)/26,this.length),B=67108863^67108863>>>N<x)for(this.length-=x,w=0;w=0&&(p!==0||w>=_);w--){var f=this.words[w]|0;this.words[w]=p<<26-N|f>>>N,p=f&B}return y&&p!==0&&(y.words[y.length++]=p),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},U.prototype.ishrn=function(j,k,g){return G(this.negative===0),this.iushrn(j,k,g)},U.prototype.shln=function(j){return this.clone().ishln(j)},U.prototype.ushln=function(j){return this.clone().iushln(j)},U.prototype.shrn=function(j){return this.clone().ishrn(j)},U.prototype.ushrn=function(j){return this.clone().iushrn(j)},U.prototype.testn=function(j){G(typeof j=="number"&&j>=0);var k=j%26,g=(j-k)/26,_=1<=0);var k=j%26,g=(j-k)/26;if(G(this.negative===0,"imaskn works only with positive numbers"),this.length<=g)return this;if(k!==0&&g++,this.length=Math.min(g,this.length),k!==0){var _=67108863^67108863>>>k<=67108864;k++)this.words[k]-=67108864,k===this.length-1?this.words[k+1]=1:this.words[k+1]++;return this.length=Math.max(this.length,k+1),this},U.prototype.isubn=function(j){if(G(typeof j=="number"),G(j<67108864),j<0)return this.iaddn(-j);if(this.negative!==0)return this.negative=0,this.iaddn(j),this.negative=1,this;if(this.words[0]-=j,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var k=0;k>26)-(y/67108864|0),this.words[N+g]=x&67108863}for(;N>26,this.words[N+g]=x&67108863;if(B===0)return this.strip();for(G(B===-1),B=0,N=0;N>26,this.words[N]=x&67108863;return this.negative=1,this.strip()},U.prototype._wordDiv=function(j,k){var g=this.length-j.length,_=this.clone(),N=j,x=N.words[N.length-1]|0,B=this._countBits(x);g=26-B,g!==0&&(N=N.ushln(g),_.iushln(g),x=N.words[N.length-1]|0);var y=_.length-N.length,w;if(k!=="mod"){w=new U(null),w.length=y+1,w.words=new Array(w.length);for(var p=0;p=0;c--){var h=(_.words[N.length+c]|0)*67108864+(_.words[N.length+c-1]|0);for(h=Math.min(h/x|0,67108863),_._ishlnsubmul(N,h,c);_.negative!==0;)h--,_.negative=0,_._ishlnsubmul(N,1,c),_.isZero()||(_.negative^=1);w&&(w.words[c]=h)}return w&&w.strip(),_.strip(),k!=="div"&&g!==0&&_.iushrn(g),{div:w||null,mod:_}},U.prototype.divmod=function(j,k,g){if(G(!j.isZero()),this.isZero())return{div:new U(0),mod:new U(0)};var _,N,x;return this.negative!==0&&j.negative===0?(x=this.neg().divmod(j,k),k!=="mod"&&(_=x.div.neg()),k!=="div"&&(N=x.mod.neg(),g&&N.negative!==0&&N.iadd(j)),{div:_,mod:N}):this.negative===0&&j.negative!==0?(x=this.divmod(j.neg(),k),k!=="mod"&&(_=x.div.neg()),{div:_,mod:x.mod}):(this.negative&j.negative)!==0?(x=this.neg().divmod(j.neg(),k),k!=="div"&&(N=x.mod.neg(),g&&N.negative!==0&&N.isub(j)),{div:x.div,mod:N}):j.length>this.length||this.cmp(j)<0?{div:new U(0),mod:this}:j.length===1?k==="div"?{div:this.divn(j.words[0]),mod:null}:k==="mod"?{div:null,mod:new U(this.modn(j.words[0]))}:{div:this.divn(j.words[0]),mod:new U(this.modn(j.words[0]))}:this._wordDiv(j,k)},U.prototype.div=function(j){return this.divmod(j,"div",!1).div},U.prototype.mod=function(j){return this.divmod(j,"mod",!1).mod},U.prototype.umod=function(j){return this.divmod(j,"mod",!0).mod},U.prototype.divRound=function(j){var k=this.divmod(j);if(k.mod.isZero())return k.div;var g=k.div.negative!==0?k.mod.isub(j):k.mod,_=j.ushrn(1),N=j.andln(1),x=g.cmp(_);return x<0||N===1&&x===0?k.div:k.div.negative!==0?k.div.isubn(1):k.div.iaddn(1)},U.prototype.modn=function(j){G(j<=67108863);for(var k=(1<<26)%j,g=0,_=this.length-1;_>=0;_--)g=(k*g+(this.words[_]|0))%j;return g},U.prototype.idivn=function(j){G(j<=67108863);for(var k=0,g=this.length-1;g>=0;g--){var _=(this.words[g]|0)+k*67108864;this.words[g]=_/j|0,k=_%j}return this.strip()},U.prototype.divn=function(j){return this.clone().idivn(j)},U.prototype.egcd=function(j){G(j.negative===0),G(!j.isZero());var k=this,g=j.clone();k.negative!==0?k=k.umod(j):k=k.clone();for(var _=new U(1),N=new U(0),x=new U(0),B=new U(1),y=0;k.isEven()&&g.isEven();)k.iushrn(1),g.iushrn(1),++y;for(var w=g.clone(),p=k.clone();!k.isZero();){for(var f=0,c=1;(k.words[0]&c)===0&&f<26;++f,c<<=1);if(f>0)for(k.iushrn(f);f-- >0;)(_.isOdd()||N.isOdd())&&(_.iadd(w),N.isub(p)),_.iushrn(1),N.iushrn(1);for(var h=0,d=1;(g.words[0]&d)===0&&h<26;++h,d<<=1);if(h>0)for(g.iushrn(h);h-- >0;)(x.isOdd()||B.isOdd())&&(x.iadd(w),B.isub(p)),x.iushrn(1),B.iushrn(1);k.cmp(g)>=0?(k.isub(g),_.isub(x),N.isub(B)):(g.isub(k),x.isub(_),B.isub(N))}return{a:x,b:B,gcd:g.iushln(y)}},U.prototype._invmp=function(j){G(j.negative===0),G(!j.isZero());var k=this,g=j.clone();k.negative!==0?k=k.umod(j):k=k.clone();for(var _=new U(1),N=new U(0),x=g.clone();k.cmpn(1)>0&&g.cmpn(1)>0;){for(var B=0,y=1;(k.words[0]&y)===0&&B<26;++B,y<<=1);if(B>0)for(k.iushrn(B);B-- >0;)_.isOdd()&&_.iadd(x),_.iushrn(1);for(var w=0,p=1;(g.words[0]&p)===0&&w<26;++w,p<<=1);if(w>0)for(g.iushrn(w);w-- >0;)N.isOdd()&&N.iadd(x),N.iushrn(1);k.cmp(g)>=0?(k.isub(g),_.isub(N)):(g.isub(k),N.isub(_))}var f;return k.cmpn(1)===0?f=_:f=N,f.cmpn(0)<0&&f.iadd(j),f},U.prototype.gcd=function(j){if(this.isZero())return j.abs();if(j.isZero())return this.abs();var k=this.clone(),g=j.clone();k.negative=0,g.negative=0;for(var _=0;k.isEven()&&g.isEven();_++)k.iushrn(1),g.iushrn(1);do{for(;k.isEven();)k.iushrn(1);for(;g.isEven();)g.iushrn(1);var N=k.cmp(g);if(N<0){var x=k;k=g,g=x}else if(N===0||g.cmpn(1)===0)break;k.isub(g)}while(!0);return g.iushln(_)},U.prototype.invm=function(j){return this.egcd(j).a.umod(j)},U.prototype.isEven=function(){return(this.words[0]&1)===0},U.prototype.isOdd=function(){return(this.words[0]&1)===1},U.prototype.andln=function(j){return this.words[0]&j},U.prototype.bincn=function(j){G(typeof j=="number");var k=j%26,g=(j-k)/26,_=1<>>26,B&=67108863,this.words[x]=B}return N!==0&&(this.words[x]=N,this.length++),this},U.prototype.isZero=function(){return this.length===1&&this.words[0]===0},U.prototype.cmpn=function(j){var k=j<0;if(this.negative!==0&&!k)return-1;if(this.negative===0&&k)return 1;this.strip();var g;if(this.length>1)g=1;else{k&&(j=-j),G(j<=67108863,"Number is too big");var _=this.words[0]|0;g=_===j?0:_j.length)return 1;if(this.length=0;g--){var _=this.words[g]|0,N=j.words[g]|0;if(_!==N){_N&&(k=1);break}}return k},U.prototype.gtn=function(j){return this.cmpn(j)===1},U.prototype.gt=function(j){return this.cmp(j)===1},U.prototype.gten=function(j){return this.cmpn(j)>=0},U.prototype.gte=function(j){return this.cmp(j)>=0},U.prototype.ltn=function(j){return this.cmpn(j)===-1},U.prototype.lt=function(j){return this.cmp(j)===-1},U.prototype.lten=function(j){return this.cmpn(j)<=0},U.prototype.lte=function(j){return this.cmp(j)<=0},U.prototype.eqn=function(j){return this.cmpn(j)===0},U.prototype.eq=function(j){return this.cmp(j)===0},U.red=function(j){return new v(j)},U.prototype.toRed=function(j){return G(!this.red,"Already a number in reduction context"),G(this.negative===0,"red works only with positives"),j.convertTo(this)._forceRed(j)},U.prototype.fromRed=function(){return G(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},U.prototype._forceRed=function(j){return this.red=j,this},U.prototype.forceRed=function(j){return G(!this.red,"Already a number in reduction context"),this._forceRed(j)},U.prototype.redAdd=function(j){return G(this.red,"redAdd works only with red numbers"),this.red.add(this,j)},U.prototype.redIAdd=function(j){return G(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,j)},U.prototype.redSub=function(j){return G(this.red,"redSub works only with red numbers"),this.red.sub(this,j)},U.prototype.redISub=function(j){return G(this.red,"redISub works only with red numbers"),this.red.isub(this,j)},U.prototype.redShl=function(j){return G(this.red,"redShl works only with red numbers"),this.red.shl(this,j)},U.prototype.redMul=function(j){return G(this.red,"redMul works only with red numbers"),this.red._verify2(this,j),this.red.mul(this,j)},U.prototype.redIMul=function(j){return G(this.red,"redMul works only with red numbers"),this.red._verify2(this,j),this.red.imul(this,j)},U.prototype.redSqr=function(){return G(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},U.prototype.redISqr=function(){return G(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},U.prototype.redSqrt=function(){return G(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},U.prototype.redInvm=function(){return G(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},U.prototype.redNeg=function(){return G(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},U.prototype.redPow=function(j){return G(this.red&&!j.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,j)};var L={k256:null,p224:null,p192:null,p25519:null};function R(j,k){this.name=j,this.p=new U(k,16),this.n=this.p.bitLength(),this.k=new U(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}R.prototype._tmp=function(){var j=new U(null);return j.words=new Array(Math.ceil(this.n/13)),j},R.prototype.ireduce=function(j){var k=j,g;do this.split(k,this.tmp),k=this.imulK(k),k=k.iadd(this.tmp),g=k.bitLength();while(g>this.n);var _=g0?k.isub(this.p):k.strip!==void 0?k.strip():k._strip(),k},R.prototype.split=function(j,k){j.iushrn(this.n,0,k)},R.prototype.imulK=function(j){return j.imul(this.k)};function P(){R.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}V(P,R),P.prototype.split=function(j,k){for(var g=4194303,_=Math.min(j.length,9),N=0;N<_;N++)k.words[N]=j.words[N];if(k.length=_,j.length<=9){j.words[0]=0,j.length=1;return}var x=j.words[9];for(k.words[k.length++]=x&g,N=10;N>>22,x=B}x>>>=22,j.words[N-10]=x,x===0&&j.length>10?j.length-=10:j.length-=9},P.prototype.imulK=function(j){j.words[j.length]=0,j.words[j.length+1]=0,j.length+=2;for(var k=0,g=0;g>>=26,j.words[g]=N,k=_}return k!==0&&(j.words[j.length++]=k),j},U._prime=function(j){if(L[j])return L[j];var k;if(j==="k256")k=new P;else if(j==="p224")k=new z;else if(j==="p192")k=new M;else if(j==="p25519")k=new S;else throw new Error("Unknown prime "+j);return L[j]=k,k};function v(j){if(typeof j=="string"){var k=U._prime(j);this.m=k.p,this.prime=k}else G(j.gtn(1),"modulus must be greater than 1"),this.m=j,this.prime=null}v.prototype._verify1=function(j){G(j.negative===0,"red works only with positives"),G(j.red,"red works only with red numbers")},v.prototype._verify2=function(j,k){G((j.negative|k.negative)===0,"red works only with positives"),G(j.red&&j.red===k.red,"red works only with red numbers")},v.prototype.imod=function(j){return this.prime?this.prime.ireduce(j)._forceRed(this):j.umod(this.m)._forceRed(this)},v.prototype.neg=function(j){return j.isZero()?j.clone():this.m.sub(j)._forceRed(this)},v.prototype.add=function(j,k){this._verify2(j,k);var g=j.add(k);return g.cmp(this.m)>=0&&g.isub(this.m),g._forceRed(this)},v.prototype.iadd=function(j,k){this._verify2(j,k);var g=j.iadd(k);return g.cmp(this.m)>=0&&g.isub(this.m),g},v.prototype.sub=function(j,k){this._verify2(j,k);var g=j.sub(k);return g.cmpn(0)<0&&g.iadd(this.m),g._forceRed(this)},v.prototype.isub=function(j,k){this._verify2(j,k);var g=j.isub(k);return g.cmpn(0)<0&&g.iadd(this.m),g},v.prototype.shl=function(j,k){return this._verify1(j),this.imod(j.ushln(k))},v.prototype.imul=function(j,k){return this._verify2(j,k),this.imod(j.imul(k))},v.prototype.mul=function(j,k){return this._verify2(j,k),this.imod(j.mul(k))},v.prototype.isqr=function(j){return this.imul(j,j.clone())},v.prototype.sqr=function(j){return this.mul(j,j)},v.prototype.sqrt=function(j){if(j.isZero())return j.clone();var k=this.m.andln(3);if(G(k%2===1),k===3){var g=this.m.add(new U(1)).iushrn(2);return this.pow(j,g)}for(var _=this.m.subn(1),N=0;!_.isZero()&&_.andln(1)===0;)N++,_.iushrn(1);G(!_.isZero());var x=new U(1).toRed(this),B=x.redNeg(),y=this.m.subn(1).iushrn(1),w=this.m.bitLength();for(w=new U(2*w*w).toRed(this);this.pow(w,y).cmp(B)!==0;)w.redIAdd(B);for(var p=this.pow(w,_),f=this.pow(j,_.addn(1).iushrn(1)),c=this.pow(j,_),h=N;c.cmp(x)!==0;){for(var d=c,b=0;d.cmp(x)!==0;b++)d=d.redSqr();G(b=0;N--){for(var p=k.words[N],f=w-1;f>=0;f--){var c=p>>f&1;if(x!==_[0]&&(x=this.sqr(x)),c===0&&B===0){y=0;continue}B<<=1,B|=c,y++,!(y!==g&&(N!==0||f!==0))&&(x=this.mul(x,_[B]),y=0,B=0)}w=26}return x},v.prototype.convertTo=function(j){var k=j.umod(this.m);return k===j?k.clone():k},v.prototype.convertFrom=function(j){var k=j.clone();return k.red=null,k},U.mont=function(j){return new q(j)};function q(j){v.call(this,j),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new U(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}V(q,v),q.prototype.convertTo=function(j){return this.imod(j.ushln(this.shift))},q.prototype.convertFrom=function(j){var k=this.imod(j.mul(this.rinv));return k.red=null,k},q.prototype.imul=function(j,k){if(j.isZero()||k.isZero())return j.words[0]=0,j.length=1,j;var g=j.imul(k),_=g.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),N=g.isub(_).iushrn(this.shift),x=N;return N.cmp(this.m)>=0?x=N.isub(this.m):N.cmpn(0)<0&&(x=N.iadd(this.m)),x._forceRed(this)},q.prototype.mul=function(j,k){if(j.isZero()||k.isZero())return new U(0)._forceRed(this);var g=j.mul(k),_=g.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),N=g.isub(_).iushrn(this.shift),x=N;return N.cmp(this.m)>=0?x=N.isub(this.m):N.cmpn(0)<0&&(x=N.iadd(this.m)),x._forceRed(this)},q.prototype.invm=function(j){var k=this.imod(j._invmp(this.m).mul(this.r2));return k._forceRed(this)}})(typeof Q>"u"||Q,$)}}),CY=q$({"node_modules/safer-buffer/safer.js"($,Q){var Y=M$,Z=F$,G={},V;for(V in Y)!Y.hasOwnProperty(V)||V==="SlowBuffer"||V==="Buffer"||(G[V]=Y[V]);var U=G.Buffer={};for(V in Z)!Z.hasOwnProperty(V)||V==="allocUnsafe"||V==="allocUnsafeSlow"||(U[V]=Z[V]);if(G.Buffer.prototype=Z.prototype,(!U.from||U.from===Uint8Array.from)&&(U.from=function(X,K,I){if(typeof X=="number")throw new TypeError('The "value" argument must not be of type number. Received type '+typeof X);if(X&&typeof X.length>"u")throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof X);return Z(X,K,I)}),U.alloc||(U.alloc=function(X,K,I){if(typeof X!="number")throw new TypeError('The "size" argument must be of type number. Received type '+typeof X);if(X<0||X>=2*(1<<30))throw new RangeError('The value "'+X+'" is invalid for option "size"');var O=Z(X);return!K||K.length===0?O.fill(0):typeof I=="string"?O.fill(K,I):O.fill(K),O}),!G.kStringMaxLength)try{G.kStringMaxLength=S$}catch{}G.constants||(G.constants={MAX_LENGTH:G.kMaxLength},G.kStringMaxLength&&(G.constants.MAX_STRING_LENGTH=G.kStringMaxLength)),Q.exports=G}}),LY=q$({"node_modules/asn1.js/lib/asn1/base/reporter.js"($){var Q=_$();function Y(G){this._reporterState={obj:null,path:[],options:G||{},errors:[]}}$.Reporter=Y,Y.prototype.isError=function(G){return G instanceof Z},Y.prototype.save=function(){let G=this._reporterState;return{obj:G.obj,pathLen:G.path.length}},Y.prototype.restore=function(G){let V=this._reporterState;V.obj=G.obj,V.path=V.path.slice(0,G.pathLen)},Y.prototype.enterKey=function(G){return this._reporterState.path.push(G)},Y.prototype.exitKey=function(G){let V=this._reporterState;V.path=V.path.slice(0,G-1)},Y.prototype.leaveKey=function(G,V,U){let X=this._reporterState;this.exitKey(G),X.obj!==null&&(X.obj[V]=U)},Y.prototype.path=function(){return this._reporterState.path.join("/")},Y.prototype.enterObject=function(){let G=this._reporterState,V=G.obj;return G.obj={},V},Y.prototype.leaveObject=function(G){let V=this._reporterState,U=V.obj;return V.obj=G,U},Y.prototype.error=function(G){let V,U=this._reporterState,X=G instanceof Z;if(X?V=G:V=new Z(U.path.map(function(K){return"["+JSON.stringify(K)+"]"}).join(""),G.message||G,G.stack),!U.options.partial)throw V;return X||U.errors.push(V),V},Y.prototype.wrapResult=function(G){let V=this._reporterState;return V.options.partial?{result:this.isError(G)?null:G,errors:V.errors}:G};function Z(G,V){this.path=G,this.rethrow(V)}Q(Z,Error),Z.prototype.rethrow=function(G){if(this.message=G+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,Z),!this.stack)try{throw new Error(this.message)}catch(V){this.stack=V.stack}return this}}}),E$=q$({"node_modules/asn1.js/lib/asn1/base/buffer.js"($){var Q=_$(),Y=LY().Reporter,Z=CY().Buffer;function G(U,X){if(Y.call(this,X),!Z.isBuffer(U)){this.error("Input not Buffer");return}this.base=U,this.offset=0,this.length=U.length}Q(G,Y),$.DecoderBuffer=G,G.isDecoderBuffer=function(U){return U instanceof G?!0:typeof U=="object"&&Z.isBuffer(U.base)&&U.constructor.name==="DecoderBuffer"&&typeof U.offset=="number"&&typeof U.length=="number"&&typeof U.save=="function"&&typeof U.restore=="function"&&typeof U.isEmpty=="function"&&typeof U.readUInt8=="function"&&typeof U.skip=="function"&&typeof U.raw=="function"},G.prototype.save=function(){return{offset:this.offset,reporter:Y.prototype.save.call(this)}},G.prototype.restore=function(U){let X=new G(this.base);return X.offset=U.offset,X.length=this.offset,this.offset=U.offset,Y.prototype.restore.call(this,U.reporter),X},G.prototype.isEmpty=function(){return this.offset===this.length},G.prototype.readUInt8=function(U){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(U||"DecoderBuffer overrun")},G.prototype.skip=function(U,X){if(!(this.offset+U<=this.length))return this.error(X||"DecoderBuffer overrun");let K=new G(this.base);return K._reporterState=this._reporterState,K.offset=this.offset,K.length=this.offset+U,this.offset+=U,K},G.prototype.raw=function(U){return this.base.slice(U?U.offset:this.offset,this.length)};function V(U,X){if(Array.isArray(U))this.length=0,this.value=U.map(function(K){return V.isEncoderBuffer(K)||(K=new V(K,X)),this.length+=K.length,K},this);else if(typeof U=="number"){if(!(0<=U&&U<=255))return X.error("non-byte EncoderBuffer value");this.value=U,this.length=1}else if(typeof U=="string")this.value=U,this.length=Z.byteLength(U);else if(Z.isBuffer(U))this.value=U,this.length=U.length;else return X.error("Unsupported type: "+typeof U)}$.EncoderBuffer=V,V.isEncoderBuffer=function(U){return U instanceof V?!0:typeof U=="object"&&U.constructor.name==="EncoderBuffer"&&typeof U.length=="number"&&typeof U.join=="function"},V.prototype.join=function(U,X){return U||(U=Z.alloc(this.length)),X||(X=0),this.length===0||(Array.isArray(this.value)?this.value.forEach(function(K){K.join(U,X),X+=K.length}):(typeof this.value=="number"?U[X]=this.value:typeof this.value=="string"?U.write(this.value,X):Z.isBuffer(this.value)&&this.value.copy(U,X),X+=this.length)),U}}}),RY=q$({"node_modules/asn1.js/lib/asn1/base/node.js"($,Q){var Y=LY().Reporter,Z=E$().EncoderBuffer,G=E$().DecoderBuffer,V=ZQ(),U=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],X=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(U),K=["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"];function I(J,F,A){let H={};this._baseState=H,H.name=A,H.enc=J,H.parent=F||null,H.children=null,H.tag=null,H.args=null,H.reverseArgs=null,H.choice=null,H.optional=!1,H.any=!1,H.obj=!1,H.use=null,H.useDecoder=null,H.key=null,H.default=null,H.explicit=null,H.implicit=null,H.contains=null,H.parent||(H.children=[],this._wrap())}Q.exports=I;var O=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];I.prototype.clone=function(){let J=this._baseState,F={};O.forEach(function(H){F[H]=J[H]});let A=new this.constructor(F.parent);return A._baseState=F,A},I.prototype._wrap=function(){let J=this._baseState;X.forEach(function(F){this[F]=function(){let A=new this.constructor(this);return J.children.push(A),A[F].apply(A,arguments)}},this)},I.prototype._init=function(J){let F=this._baseState;V(F.parent===null),J.call(this),F.children=F.children.filter(function(A){return A._baseState.parent===this},this),V.equal(F.children.length,1,"Root node can have only one child")},I.prototype._useArgs=function(J){let F=this._baseState,A=J.filter(function(H){return H instanceof this.constructor},this);J=J.filter(function(H){return!(H instanceof this.constructor)},this),A.length!==0&&(V(F.children===null),F.children=A,A.forEach(function(H){H._baseState.parent=this},this)),J.length!==0&&(V(F.args===null),F.args=J,F.reverseArgs=J.map(function(H){if(typeof H!="object"||H.constructor!==Object)return H;let W={};return Object.keys(H).forEach(function(E){E==(E|0)&&(E|=0);let T=H[E];W[T]=E}),W}))},K.forEach(function(J){I.prototype[J]=function(){let F=this._baseState;throw new Error(J+" not implemented for encoding: "+F.enc)}}),U.forEach(function(J){I.prototype[J]=function(){let F=this._baseState,A=Array.prototype.slice.call(arguments);return V(F.tag===null),F.tag=J,this._useArgs(A),this}}),I.prototype.use=function(J){V(J);let F=this._baseState;return V(F.use===null),F.use=J,this},I.prototype.optional=function(){let J=this._baseState;return J.optional=!0,this},I.prototype.def=function(J){let F=this._baseState;return V(F.default===null),F.default=J,F.optional=!0,this},I.prototype.explicit=function(J){let F=this._baseState;return V(F.explicit===null&&F.implicit===null),F.explicit=J,this},I.prototype.implicit=function(J){let F=this._baseState;return V(F.explicit===null&&F.implicit===null),F.implicit=J,this},I.prototype.obj=function(){let J=this._baseState,F=Array.prototype.slice.call(arguments);return J.obj=!0,F.length!==0&&this._useArgs(F),this},I.prototype.key=function(J){let F=this._baseState;return V(F.key===null),F.key=J,this},I.prototype.any=function(){let J=this._baseState;return J.any=!0,this},I.prototype.choice=function(J){let F=this._baseState;return V(F.choice===null),F.choice=J,this._useArgs(Object.keys(J).map(function(A){return J[A]})),this},I.prototype.contains=function(J){let F=this._baseState;return V(F.use===null),F.contains=J,this},I.prototype._decode=function(J,F){let A=this._baseState;if(A.parent===null)return J.wrapResult(A.children[0]._decode(J,F));let H=A.default,W=!0,E=null;if(A.key!==null&&(E=J.enterKey(A.key)),A.optional){let D=null;if(A.explicit!==null?D=A.explicit:A.implicit!==null?D=A.implicit:A.tag!==null&&(D=A.tag),D===null&&!A.any){let C=J.save();try{A.choice===null?this._decodeGeneric(A.tag,J,F):this._decodeChoice(J,F),W=!0}catch{W=!1}J.restore(C)}else if(W=this._peekTag(J,D,A.any),J.isError(W))return W}let T;if(A.obj&&W&&(T=J.enterObject()),W){if(A.explicit!==null){let C=this._decodeTag(J,A.explicit);if(J.isError(C))return C;J=C}let D=J.offset;if(A.use===null&&A.choice===null){let C;A.any&&(C=J.save());let L=this._decodeTag(J,A.implicit!==null?A.implicit:A.tag,A.any);if(J.isError(L))return L;A.any?H=J.raw(C):J=L}if(F&&F.track&&A.tag!==null&&F.track(J.path(),D,J.length,"tagged"),F&&F.track&&A.tag!==null&&F.track(J.path(),J.offset,J.length,"content"),A.any||(A.choice===null?H=this._decodeGeneric(A.tag,J,F):H=this._decodeChoice(J,F)),J.isError(H))return H;if(!A.any&&A.choice===null&&A.children!==null&&A.children.forEach(function(C){C._decode(J,F)}),A.contains&&(A.tag==="octstr"||A.tag==="bitstr")){let C=new G(H);H=this._getUse(A.contains,J._reporterState.obj)._decode(C,F)}}return A.obj&&W&&(H=J.leaveObject(T)),A.key!==null&&(H!==null||W===!0)?J.leaveKey(E,A.key,H):E!==null&&J.exitKey(E),H},I.prototype._decodeGeneric=function(J,F,A){let H=this._baseState;return J==="seq"||J==="set"?null:J==="seqof"||J==="setof"?this._decodeList(F,J,H.args[0],A):/str$/.test(J)?this._decodeStr(F,J,A):J==="objid"&&H.args?this._decodeObjid(F,H.args[0],H.args[1],A):J==="objid"?this._decodeObjid(F,null,null,A):J==="gentime"||J==="utctime"?this._decodeTime(F,J,A):J==="null_"?this._decodeNull(F,A):J==="bool"?this._decodeBool(F,A):J==="objDesc"?this._decodeStr(F,J,A):J==="int"||J==="enum"?this._decodeInt(F,H.args&&H.args[0],A):H.use!==null?this._getUse(H.use,F._reporterState.obj)._decode(F,A):F.error("unknown tag: "+J)},I.prototype._getUse=function(J,F){let A=this._baseState;return A.useDecoder=this._use(J,F),V(A.useDecoder._baseState.parent===null),A.useDecoder=A.useDecoder._baseState.children[0],A.implicit!==A.useDecoder._baseState.implicit&&(A.useDecoder=A.useDecoder.clone(),A.useDecoder._baseState.implicit=A.implicit),A.useDecoder},I.prototype._decodeChoice=function(J,F){let A=this._baseState,H=null,W=!1;return Object.keys(A.choice).some(function(E){let T=J.save(),D=A.choice[E];try{let C=D._decode(J,F);if(J.isError(C))return!1;H={type:E,value:C},W=!0}catch{return J.restore(T),!1}return!0},this),W?H:J.error("Choice not matched")},I.prototype._createEncoderBuffer=function(J){return new Z(J,this.reporter)},I.prototype._encode=function(J,F,A){let H=this._baseState;if(H.default!==null&&H.default===J)return;let W=this._encodeValue(J,F,A);if(W!==void 0&&!this._skipDefault(W,F,A))return W},I.prototype._encodeValue=function(J,F,A){let H=this._baseState;if(H.parent===null)return H.children[0]._encode(J,F||new Y);let W=null;if(this.reporter=F,H.optional&&J===void 0)if(H.default!==null)J=H.default;else return;let E=null,T=!1;if(H.any)W=this._createEncoderBuffer(J);else if(H.choice)W=this._encodeChoice(J,F);else if(H.contains)E=this._getUse(H.contains,A)._encode(J,F),T=!0;else if(H.children)E=H.children.map(function(D){if(D._baseState.tag==="null_")return D._encode(null,F,J);if(D._baseState.key===null)return F.error("Child should have a key");let C=F.enterKey(D._baseState.key);if(typeof J!="object")return F.error("Child expected, but input is not object");let L=D._encode(J[D._baseState.key],F,J);return F.leaveKey(C),L},this).filter(function(D){return D}),E=this._createEncoderBuffer(E);else if(H.tag==="seqof"||H.tag==="setof"){if(!(H.args&&H.args.length===1))return F.error("Too many args for : "+H.tag);if(!Array.isArray(J))return F.error("seqof/setof, but data is not Array");let D=this.clone();D._baseState.implicit=null,E=this._createEncoderBuffer(J.map(function(C){let L=this._baseState;return this._getUse(L.args[0],J)._encode(C,F)},D))}else H.use!==null?W=this._getUse(H.use,A)._encode(J,F):(E=this._encodePrimitive(H.tag,J),T=!0);if(!H.any&&H.choice===null){let D=H.implicit!==null?H.implicit:H.tag,C=H.implicit===null?"universal":"context";D===null?H.use===null&&F.error("Tag could be omitted only for .use()"):H.use===null&&(W=this._encodeComposite(D,T,C,E))}return H.explicit!==null&&(W=this._encodeComposite(H.explicit,!1,"context",W)),W},I.prototype._encodeChoice=function(J,F){let A=this._baseState,H=A.choice[J.type];return H||V(!1,J.type+" not found in "+JSON.stringify(Object.keys(A.choice))),H._encode(J.value,F)},I.prototype._encodePrimitive=function(J,F){let A=this._baseState;if(/str$/.test(J))return this._encodeStr(F,J);if(J==="objid"&&A.args)return this._encodeObjid(F,A.reverseArgs[0],A.args[1]);if(J==="objid")return this._encodeObjid(F,null,null);if(J==="gentime"||J==="utctime")return this._encodeTime(F,J);if(J==="null_")return this._encodeNull();if(J==="int"||J==="enum")return this._encodeInt(F,A.args&&A.reverseArgs[0]);if(J==="bool")return this._encodeBool(F);if(J==="objDesc")return this._encodeStr(F,J);throw new Error("Unsupported tag: "+J)},I.prototype._isNumstr=function(J){return/^[0-9 ]*$/.test(J)},I.prototype._isPrintstr=function(J){return/^[A-Za-z0-9 '()+,-./:=?]*$/.test(J)}}}),PY=q$({"node_modules/asn1.js/lib/asn1/constants/der.js"($){function Q(Y){let Z={};return Object.keys(Y).forEach(function(G){(G|0)==G&&(G=G|0);let V=Y[G];Z[V]=G}),Z}$.tagClass={0:"universal",1:"application",2:"context",3:"private"},$.tagClassByName=Q($.tagClass),$.tag={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr",26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"},$.tagByName=Q($.tag)}}),zY=q$({"node_modules/asn1.js/lib/asn1/encoders/der.js"($,Q){var Y=_$(),Z=CY().Buffer,G=RY(),V=PY();function U(O){this.enc="der",this.name=O.name,this.entity=O,this.tree=new X,this.tree._init(O.body)}Q.exports=U,U.prototype.encode=function(O,J){return this.tree._encode(O,J).join()};function X(O){G.call(this,"der",O)}Y(X,G),X.prototype._encodeComposite=function(O,J,F,A){let H=I(O,J,F,this.reporter);if(A.length<128){let T=Z.alloc(2);return T[0]=H,T[1]=A.length,this._createEncoderBuffer([T,A])}let W=1;for(let T=A.length;T>=256;T>>=8)W++;let E=Z.alloc(2+W);E[0]=H,E[1]=128|W;for(let T=1+W,D=A.length;D>0;T--,D>>=8)E[T]=D&255;return this._createEncoderBuffer([E,A])},X.prototype._encodeStr=function(O,J){if(J==="bitstr")return this._createEncoderBuffer([O.unused|0,O.data]);if(J==="bmpstr"){let F=Z.alloc(O.length*2);for(let A=0;A=40)return this.reporter.error("Second objid identifier OOB");O.splice(0,2,O[0]*40+O[1])}let A=0;for(let E=0;E=128;T>>=7)A++}let H=Z.alloc(A),W=H.length-1;for(let E=O.length-1;E>=0;E--){let T=O[E];for(H[W--]=T&127;(T>>=7)>0;)H[W--]=128|T&127}return this._createEncoderBuffer(H)};function K(O){return O<10?"0"+O:O}X.prototype._encodeTime=function(O,J){let F,A=new Date(O);return J==="gentime"?F=[K(A.getUTCFullYear()),K(A.getUTCMonth()+1),K(A.getUTCDate()),K(A.getUTCHours()),K(A.getUTCMinutes()),K(A.getUTCSeconds()),"Z"].join(""):J==="utctime"?F=[K(A.getUTCFullYear()%100),K(A.getUTCMonth()+1),K(A.getUTCDate()),K(A.getUTCHours()),K(A.getUTCMinutes()),K(A.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+J+" time is not supported yet"),this._encodeStr(F,"octstr")},X.prototype._encodeNull=function(){return this._createEncoderBuffer("")},X.prototype._encodeInt=function(O,J){if(typeof O=="string"){if(!J)return this.reporter.error("String int or enum given, but no values map");if(!J.hasOwnProperty(O))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(O));O=J[O]}if(typeof O!="number"&&!Z.isBuffer(O)){let H=O.toArray();!O.sign&&H[0]&128&&H.unshift(0),O=Z.from(H)}if(Z.isBuffer(O)){let H=O.length;O.length===0&&H++;let W=Z.alloc(H);return O.copy(W),O.length===0&&(W[0]=0),this._createEncoderBuffer(W)}if(O<128)return this._createEncoderBuffer(O);if(O<256)return this._createEncoderBuffer([0,O]);let F=1;for(let H=O;H>=256;H>>=8)F++;let A=new Array(F);for(let H=A.length-1;H>=0;H--)A[H]=O&255,O>>=8;return A[0]&128&&A.unshift(0),this._createEncoderBuffer(Z.from(A))},X.prototype._encodeBool=function(O){return this._createEncoderBuffer(O?255:0)},X.prototype._use=function(O,J){return typeof O=="function"&&(O=O(J)),O._getEncoder("der").tree},X.prototype._skipDefault=function(O,J,F){let A=this._baseState,H;if(A.default===null)return!1;let W=O.join();if(A.defaultBuffer===void 0&&(A.defaultBuffer=this._encodeValue(A.default,J,F).join()),W.length!==A.defaultBuffer.length)return!1;for(H=0;H=31?A.error("Multi-octet tag encoding unsupported"):(J||(H|=32),H|=V.tagClassByName[F||"universal"]<<6,H)}}}),MY=q$({"node_modules/asn1.js/lib/asn1/encoders/pem.js"($,Q){var Y=_$(),Z=zY();function G(V){Z.call(this,V),this.enc="pem"}Y(G,Z),Q.exports=G,G.prototype.encode=function(V,U){let X=Z.prototype.encode.call(this,V).toString("base64"),K=["-----BEGIN "+U.label+"-----"];for(let I=0;I>6],W=(A&32)===0;if((A&31)===31){let T=A;for(A=0;(T&128)===128;){if(T=J.readUInt8(F),J.isError(T))return T;A<<=7,A|=T&127}}else A&=31;let E=U.tag[A];return{cls:H,primitive:W,tag:A,tagStr:E}}function O(J,F,A){let H=J.readUInt8(A);if(J.isError(H))return H;if(!F&&H===128)return null;if((H&128)===0)return H;let W=H&127;if(W>4)return J.error("length octect is too long");H=0;for(let E=0;E0&&L.ishrn(R),L}function W(D,C){D=H(D,C),D=D.mod(C);var L=Y.from(D.toArray());if(L.length=F)throw new Error("invalid sig")}Q.exports=X}}),dY=q$({"node_modules/browserify-sign/browser/index.js"($,Q){var Y=k$().Buffer,Z=o$(),G=_$(),V=cY(),U=hY(),X=t$();Object.keys(X).forEach(function(F){X[F].id=Y.from(X[F].id,"hex"),X[F.toLowerCase()]=X[F]});function K(F){A$.Writable.call(this);var A=X[F];if(!A)throw new Error("Unknown message digest");this._hashType=A.hash,this._hash=Z(A.hash),this._tag=A.id,this._signType=A.sign}G(K,A$.Writable),K.prototype._write=function(F,A,H){this._hash.update(F),H()},K.prototype.update=function(F,A){return typeof F=="string"&&(F=Y.from(F,A)),this._hash.update(F),this},K.prototype.sign=function(F,A){this.end();var H=this._hash.digest(),W=V(H,F,this._hashType,this._signType,this._tag);return A?W.toString(A):W};function I(F){A$.Writable.call(this);var A=X[F];if(!A)throw new Error("Unknown message digest");this._hash=Z(A.hash),this._tag=A.id,this._signType=A.sign}G(I,A$.Writable),I.prototype._write=function(F,A,H){this._hash.update(F),H()},I.prototype.update=function(F,A){return typeof F=="string"&&(F=Y.from(F,A)),this._hash.update(F),this},I.prototype.verify=function(F,A,H){typeof A=="string"&&(A=Y.from(A,H)),this.end();var W=this._hash.digest();return U(A,W,F,this._signType,this._tag)};function O(F){return new K(F)}function J(F){return new I(F)}Q.exports={Sign:O,Verify:J,createSign:O,createVerify:J}}}),bY=q$({"node_modules/create-ecdh/node_modules/bn.js/lib/bn.js"($,Q){(function(Y,Z){function G(j,k){if(!j)throw new Error(k||"Assertion failed")}function V(j,k){j.super_=k;var g=function(){};g.prototype=k.prototype,j.prototype=new g,j.prototype.constructor=j}function U(j,k,g){if(U.isBN(j))return j;this.negative=0,this.words=null,this.length=0,this.red=null,j!==null&&((k==="le"||k==="be")&&(g=k,k=10),this._init(j||0,k||10,g||"be"))}typeof Y=="object"?Y.exports=U:Z.BN=U,U.BN=U,U.wordSize=26;var X=F$;U.isBN=function(j){return j instanceof U?!0:j!==null&&typeof j=="object"&&j.constructor.wordSize===U.wordSize&&Array.isArray(j.words)},U.max=function(j,k){return j.cmp(k)>0?j:k},U.min=function(j,k){return j.cmp(k)<0?j:k},U.prototype._init=function(j,k,g){if(typeof j=="number")return this._initNumber(j,k,g);if(typeof j=="object")return this._initArray(j,k,g);k==="hex"&&(k=16),G(k===(k|0)&&k>=2&&k<=36),j=j.toString().replace(/\s+/g,"");var _=0;j[0]==="-"&&(_++,this.negative=1),_=0;_-=3)x=j[_]|j[_-1]<<8|j[_-2]<<16,this.words[N]|=x<>>26-B&67108863,B+=24,B>=26&&(B-=26,N++);else if(g==="le")for(_=0,N=0;_>>26-B&67108863,B+=24,B>=26&&(B-=26,N++);return this.strip()};function K(j,k){var g=j.charCodeAt(k);return g>=65&&g<=70?g-55:g>=97&&g<=102?g-87:g-48&15}function I(j,k,g){var _=K(j,g);return g-1>=k&&(_|=K(j,g-1)<<4),_}U.prototype._parseHex=function(j,k,g){this.length=Math.ceil((j.length-k)/6),this.words=new Array(this.length);for(var _=0;_=k;_-=2)B=I(j,k,_)<=18?(N-=18,x+=1,this.words[x]|=B>>>26):N+=8;else{var y=j.length-k;for(_=y%2===0?k+1:k;_=18?(N-=18,x+=1,this.words[x]|=B>>>26):N+=8}this.strip()};function O(j,k,g,_){for(var N=0,x=Math.min(j.length,g),B=k;B=49?N+=y-49+10:y>=17?N+=y-17+10:N+=y}return N}U.prototype._parseBase=function(j,k,g){this.words=[0],this.length=1;for(var _=0,N=1;N<=67108863;N*=k)_++;_--,N=N/k|0;for(var x=j.length-g,B=x%_,y=Math.min(x,x-B)+g,w=0,p=g;p1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},U.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},U.prototype.inspect=function(){return(this.red?""};var J=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],F=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],A=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64000000,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,24300000,28629151,33554432,39135393,45435424,52521875,60466176];U.prototype.toString=function(j,k){j=j||10,k=k|0||1;var g;if(j===16||j==="hex"){g="";for(var _=0,N=0,x=0;x>>24-_&16777215,N!==0||x!==this.length-1?g=J[6-y.length]+y+g:g=y+g,_+=2,_>=26&&(_-=26,x--)}for(N!==0&&(g=N.toString(16)+g);g.length%k!==0;)g="0"+g;return this.negative!==0&&(g="-"+g),g}if(j===(j|0)&&j>=2&&j<=36){var w=F[j],p=A[j];g="";var f=this.clone();for(f.negative=0;!f.isZero();){var c=f.modn(p).toString(j);f=f.idivn(p),f.isZero()?g=c+g:g=J[w-c.length]+c+g}for(this.isZero()&&(g="0"+g);g.length%k!==0;)g="0"+g;return this.negative!==0&&(g="-"+g),g}G(!1,"Base should be between 2 and 36")},U.prototype.toNumber=function(){var j=this.words[0];return this.length===2?j+=this.words[1]*67108864:this.length===3&&this.words[2]===1?j+=4503599627370496+this.words[1]*67108864:this.length>2&&G(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-j:j},U.prototype.toJSON=function(){return this.toString(16)},U.prototype.toBuffer=function(j,k){return G(typeof X<"u"),this.toArrayLike(X,j,k)},U.prototype.toArray=function(j,k){return this.toArrayLike(Array,j,k)},U.prototype.toArrayLike=function(j,k,g){var _=this.byteLength(),N=g||Math.max(1,_);G(_<=N,"byte array longer than desired length"),G(N>0,"Requested array length <= 0"),this.strip();var x=k==="le",B=new j(N),y,w,p=this.clone();if(x){for(w=0;!p.isZero();w++)y=p.andln(255),p.iushrn(8),B[w]=y;for(;w=4096&&(g+=13,k>>>=13),k>=64&&(g+=7,k>>>=7),k>=8&&(g+=4,k>>>=4),k>=2&&(g+=2,k>>>=2),g+k},U.prototype._zeroBits=function(j){if(j===0)return 26;var k=j,g=0;return(k&8191)===0&&(g+=13,k>>>=13),(k&127)===0&&(g+=7,k>>>=7),(k&15)===0&&(g+=4,k>>>=4),(k&3)===0&&(g+=2,k>>>=2),(k&1)===0&&g++,g},U.prototype.bitLength=function(){var j=this.words[this.length-1],k=this._countBits(j);return(this.length-1)*26+k};function H(j){for(var k=new Array(j.bitLength()),g=0;g>>N}return k}U.prototype.zeroBits=function(){if(this.isZero())return 0;for(var j=0,k=0;kj.length?this.clone().ior(j):j.clone().ior(this)},U.prototype.uor=function(j){return this.length>j.length?this.clone().iuor(j):j.clone().iuor(this)},U.prototype.iuand=function(j){var k;this.length>j.length?k=j:k=this;for(var g=0;gj.length?this.clone().iand(j):j.clone().iand(this)},U.prototype.uand=function(j){return this.length>j.length?this.clone().iuand(j):j.clone().iuand(this)},U.prototype.iuxor=function(j){var k,g;this.length>j.length?(k=this,g=j):(k=j,g=this);for(var _=0;_j.length?this.clone().ixor(j):j.clone().ixor(this)},U.prototype.uxor=function(j){return this.length>j.length?this.clone().iuxor(j):j.clone().iuxor(this)},U.prototype.inotn=function(j){G(typeof j=="number"&&j>=0);var k=Math.ceil(j/26)|0,g=j%26;this._expand(k),g>0&&k--;for(var _=0;_0&&(this.words[_]=~this.words[_]&67108863>>26-g),this.strip()},U.prototype.notn=function(j){return this.clone().inotn(j)},U.prototype.setn=function(j,k){G(typeof j=="number"&&j>=0);var g=j/26|0,_=j%26;return this._expand(g+1),k?this.words[g]=this.words[g]|1<<_:this.words[g]=this.words[g]&~(1<<_),this.strip()},U.prototype.iadd=function(j){var k;if(this.negative!==0&&j.negative===0)return this.negative=0,k=this.isub(j),this.negative^=1,this._normSign();if(this.negative===0&&j.negative!==0)return j.negative=0,k=this.isub(j),j.negative=1,k._normSign();var g,_;this.length>j.length?(g=this,_=j):(g=j,_=this);for(var N=0,x=0;x<_.length;x++)k=(g.words[x]|0)+(_.words[x]|0)+N,this.words[x]=k&67108863,N=k>>>26;for(;N!==0&&x>>26;if(this.length=g.length,N!==0)this.words[this.length]=N,this.length++;else if(g!==this)for(;xj.length?this.clone().iadd(j):j.clone().iadd(this)},U.prototype.isub=function(j){if(j.negative!==0){j.negative=0;var k=this.iadd(j);return j.negative=1,k._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(j),this.negative=1,this._normSign();var g=this.cmp(j);if(g===0)return this.negative=0,this.length=1,this.words[0]=0,this;var _,N;g>0?(_=this,N=j):(_=j,N=this);for(var x=0,B=0;B>26,this.words[B]=k&67108863;for(;x!==0&&B<_.length;B++)k=(_.words[B]|0)+x,x=k>>26,this.words[B]=k&67108863;if(x===0&&B<_.length&&_!==this)for(;B<_.length;B++)this.words[B]=_.words[B];return this.length=Math.max(this.length,B),_!==this&&(this.negative=1),this.strip()},U.prototype.sub=function(j){return this.clone().isub(j)};function W(j,k,g){g.negative=k.negative^j.negative;var _=j.length+k.length|0;g.length=_,_=_-1|0;var N=j.words[0]|0,x=k.words[0]|0,B=N*x,y=B&67108863,w=B/67108864|0;g.words[0]=y;for(var p=1;p<_;p++){for(var f=w>>>26,c=w&67108863,h=Math.min(p,k.length-1),d=Math.max(0,p-j.length+1);d<=h;d++){var b=p-d|0;N=j.words[b]|0,x=k.words[d]|0,B=N*x+c,f+=B/67108864|0,c=B&67108863}g.words[p]=c|0,w=f|0}return w!==0?g.words[p]=w|0:g.length--,g.strip()}var E=function(j,k,g){var _=j.words,N=k.words,x=g.words,B=0,y,w,p,f=_[0]|0,c=f&8191,h=f>>>13,d=_[1]|0,b=d&8191,l=d>>>13,o=_[2]|0,u=o&8191,n=o>>>13,s=_[3]|0,t=s&8191,m=s>>>13,a=_[4]|0,e=a&8191,r=a>>>13,i=_[5]|0,$0=i&8191,Q0=i>>>13,Y0=_[6]|0,Z0=Y0&8191,G0=Y0>>>13,V0=_[7]|0,U0=V0&8191,X0=V0>>>13,K0=_[8]|0,I0=K0&8191,O0=K0>>>13,J0=_[9]|0,F0=J0&8191,A0=J0>>>13,H0=N[0]|0,W0=H0&8191,E0=H0>>>13,T0=N[1]|0,D0=T0&8191,C0=T0>>>13,L0=N[2]|0,R0=L0&8191,P0=L0>>>13,z0=N[3]|0,M0=z0&8191,S0=z0>>>13,v0=N[4]|0,q0=v0&8191,j0=v0>>>13,k0=N[5]|0,g0=k0&8191,_0=k0>>>13,N0=N[6]|0,x0=N0&8191,B0=N0>>>13,y0=N[7]|0,w0=y0&8191,p0=y0>>>13,f0=N[8]|0,c0=f0&8191,h0=f0>>>13,d0=N[9]|0,b0=d0&8191,l0=d0>>>13;g.negative=j.negative^k.negative,g.length=19,y=Math.imul(c,W0),w=Math.imul(c,E0),w=w+Math.imul(h,W0)|0,p=Math.imul(h,E0);var o0=(B+y|0)+((w&8191)<<13)|0;B=(p+(w>>>13)|0)+(o0>>>26)|0,o0&=67108863,y=Math.imul(b,W0),w=Math.imul(b,E0),w=w+Math.imul(l,W0)|0,p=Math.imul(l,E0),y=y+Math.imul(c,D0)|0,w=w+Math.imul(c,C0)|0,w=w+Math.imul(h,D0)|0,p=p+Math.imul(h,C0)|0;var u0=(B+y|0)+((w&8191)<<13)|0;B=(p+(w>>>13)|0)+(u0>>>26)|0,u0&=67108863,y=Math.imul(u,W0),w=Math.imul(u,E0),w=w+Math.imul(n,W0)|0,p=Math.imul(n,E0),y=y+Math.imul(b,D0)|0,w=w+Math.imul(b,C0)|0,w=w+Math.imul(l,D0)|0,p=p+Math.imul(l,C0)|0,y=y+Math.imul(c,R0)|0,w=w+Math.imul(c,P0)|0,w=w+Math.imul(h,R0)|0,p=p+Math.imul(h,P0)|0;var n0=(B+y|0)+((w&8191)<<13)|0;B=(p+(w>>>13)|0)+(n0>>>26)|0,n0&=67108863,y=Math.imul(t,W0),w=Math.imul(t,E0),w=w+Math.imul(m,W0)|0,p=Math.imul(m,E0),y=y+Math.imul(u,D0)|0,w=w+Math.imul(u,C0)|0,w=w+Math.imul(n,D0)|0,p=p+Math.imul(n,C0)|0,y=y+Math.imul(b,R0)|0,w=w+Math.imul(b,P0)|0,w=w+Math.imul(l,R0)|0,p=p+Math.imul(l,P0)|0,y=y+Math.imul(c,M0)|0,w=w+Math.imul(c,S0)|0,w=w+Math.imul(h,M0)|0,p=p+Math.imul(h,S0)|0;var s0=(B+y|0)+((w&8191)<<13)|0;B=(p+(w>>>13)|0)+(s0>>>26)|0,s0&=67108863,y=Math.imul(e,W0),w=Math.imul(e,E0),w=w+Math.imul(r,W0)|0,p=Math.imul(r,E0),y=y+Math.imul(t,D0)|0,w=w+Math.imul(t,C0)|0,w=w+Math.imul(m,D0)|0,p=p+Math.imul(m,C0)|0,y=y+Math.imul(u,R0)|0,w=w+Math.imul(u,P0)|0,w=w+Math.imul(n,R0)|0,p=p+Math.imul(n,P0)|0,y=y+Math.imul(b,M0)|0,w=w+Math.imul(b,S0)|0,w=w+Math.imul(l,M0)|0,p=p+Math.imul(l,S0)|0,y=y+Math.imul(c,q0)|0,w=w+Math.imul(c,j0)|0,w=w+Math.imul(h,q0)|0,p=p+Math.imul(h,j0)|0;var t0=(B+y|0)+((w&8191)<<13)|0;B=(p+(w>>>13)|0)+(t0>>>26)|0,t0&=67108863,y=Math.imul($0,W0),w=Math.imul($0,E0),w=w+Math.imul(Q0,W0)|0,p=Math.imul(Q0,E0),y=y+Math.imul(e,D0)|0,w=w+Math.imul(e,C0)|0,w=w+Math.imul(r,D0)|0,p=p+Math.imul(r,C0)|0,y=y+Math.imul(t,R0)|0,w=w+Math.imul(t,P0)|0,w=w+Math.imul(m,R0)|0,p=p+Math.imul(m,P0)|0,y=y+Math.imul(u,M0)|0,w=w+Math.imul(u,S0)|0,w=w+Math.imul(n,M0)|0,p=p+Math.imul(n,S0)|0,y=y+Math.imul(b,q0)|0,w=w+Math.imul(b,j0)|0,w=w+Math.imul(l,q0)|0,p=p+Math.imul(l,j0)|0,y=y+Math.imul(c,g0)|0,w=w+Math.imul(c,_0)|0,w=w+Math.imul(h,g0)|0,p=p+Math.imul(h,_0)|0;var m0=(B+y|0)+((w&8191)<<13)|0;B=(p+(w>>>13)|0)+(m0>>>26)|0,m0&=67108863,y=Math.imul(Z0,W0),w=Math.imul(Z0,E0),w=w+Math.imul(G0,W0)|0,p=Math.imul(G0,E0),y=y+Math.imul($0,D0)|0,w=w+Math.imul($0,C0)|0,w=w+Math.imul(Q0,D0)|0,p=p+Math.imul(Q0,C0)|0,y=y+Math.imul(e,R0)|0,w=w+Math.imul(e,P0)|0,w=w+Math.imul(r,R0)|0,p=p+Math.imul(r,P0)|0,y=y+Math.imul(t,M0)|0,w=w+Math.imul(t,S0)|0,w=w+Math.imul(m,M0)|0,p=p+Math.imul(m,S0)|0,y=y+Math.imul(u,q0)|0,w=w+Math.imul(u,j0)|0,w=w+Math.imul(n,q0)|0,p=p+Math.imul(n,j0)|0,y=y+Math.imul(b,g0)|0,w=w+Math.imul(b,_0)|0,w=w+Math.imul(l,g0)|0,p=p+Math.imul(l,_0)|0,y=y+Math.imul(c,x0)|0,w=w+Math.imul(c,B0)|0,w=w+Math.imul(h,x0)|0,p=p+Math.imul(h,B0)|0;var a0=(B+y|0)+((w&8191)<<13)|0;B=(p+(w>>>13)|0)+(a0>>>26)|0,a0&=67108863,y=Math.imul(U0,W0),w=Math.imul(U0,E0),w=w+Math.imul(X0,W0)|0,p=Math.imul(X0,E0),y=y+Math.imul(Z0,D0)|0,w=w+Math.imul(Z0,C0)|0,w=w+Math.imul(G0,D0)|0,p=p+Math.imul(G0,C0)|0,y=y+Math.imul($0,R0)|0,w=w+Math.imul($0,P0)|0,w=w+Math.imul(Q0,R0)|0,p=p+Math.imul(Q0,P0)|0,y=y+Math.imul(e,M0)|0,w=w+Math.imul(e,S0)|0,w=w+Math.imul(r,M0)|0,p=p+Math.imul(r,S0)|0,y=y+Math.imul(t,q0)|0,w=w+Math.imul(t,j0)|0,w=w+Math.imul(m,q0)|0,p=p+Math.imul(m,j0)|0,y=y+Math.imul(u,g0)|0,w=w+Math.imul(u,_0)|0,w=w+Math.imul(n,g0)|0,p=p+Math.imul(n,_0)|0,y=y+Math.imul(b,x0)|0,w=w+Math.imul(b,B0)|0,w=w+Math.imul(l,x0)|0,p=p+Math.imul(l,B0)|0,y=y+Math.imul(c,w0)|0,w=w+Math.imul(c,p0)|0,w=w+Math.imul(h,w0)|0,p=p+Math.imul(h,p0)|0;var e0=(B+y|0)+((w&8191)<<13)|0;B=(p+(w>>>13)|0)+(e0>>>26)|0,e0&=67108863,y=Math.imul(I0,W0),w=Math.imul(I0,E0),w=w+Math.imul(O0,W0)|0,p=Math.imul(O0,E0),y=y+Math.imul(U0,D0)|0,w=w+Math.imul(U0,C0)|0,w=w+Math.imul(X0,D0)|0,p=p+Math.imul(X0,C0)|0,y=y+Math.imul(Z0,R0)|0,w=w+Math.imul(Z0,P0)|0,w=w+Math.imul(G0,R0)|0,p=p+Math.imul(G0,P0)|0,y=y+Math.imul($0,M0)|0,w=w+Math.imul($0,S0)|0,w=w+Math.imul(Q0,M0)|0,p=p+Math.imul(Q0,S0)|0,y=y+Math.imul(e,q0)|0,w=w+Math.imul(e,j0)|0,w=w+Math.imul(r,q0)|0,p=p+Math.imul(r,j0)|0,y=y+Math.imul(t,g0)|0,w=w+Math.imul(t,_0)|0,w=w+Math.imul(m,g0)|0,p=p+Math.imul(m,_0)|0,y=y+Math.imul(u,x0)|0,w=w+Math.imul(u,B0)|0,w=w+Math.imul(n,x0)|0,p=p+Math.imul(n,B0)|0,y=y+Math.imul(b,w0)|0,w=w+Math.imul(b,p0)|0,w=w+Math.imul(l,w0)|0,p=p+Math.imul(l,p0)|0,y=y+Math.imul(c,c0)|0,w=w+Math.imul(c,h0)|0,w=w+Math.imul(h,c0)|0,p=p+Math.imul(h,h0)|0;var r0=(B+y|0)+((w&8191)<<13)|0;B=(p+(w>>>13)|0)+(r0>>>26)|0,r0&=67108863,y=Math.imul(F0,W0),w=Math.imul(F0,E0),w=w+Math.imul(A0,W0)|0,p=Math.imul(A0,E0),y=y+Math.imul(I0,D0)|0,w=w+Math.imul(I0,C0)|0,w=w+Math.imul(O0,D0)|0,p=p+Math.imul(O0,C0)|0,y=y+Math.imul(U0,R0)|0,w=w+Math.imul(U0,P0)|0,w=w+Math.imul(X0,R0)|0,p=p+Math.imul(X0,P0)|0,y=y+Math.imul(Z0,M0)|0,w=w+Math.imul(Z0,S0)|0,w=w+Math.imul(G0,M0)|0,p=p+Math.imul(G0,S0)|0,y=y+Math.imul($0,q0)|0,w=w+Math.imul($0,j0)|0,w=w+Math.imul(Q0,q0)|0,p=p+Math.imul(Q0,j0)|0,y=y+Math.imul(e,g0)|0,w=w+Math.imul(e,_0)|0,w=w+Math.imul(r,g0)|0,p=p+Math.imul(r,_0)|0,y=y+Math.imul(t,x0)|0,w=w+Math.imul(t,B0)|0,w=w+Math.imul(m,x0)|0,p=p+Math.imul(m,B0)|0,y=y+Math.imul(u,w0)|0,w=w+Math.imul(u,p0)|0,w=w+Math.imul(n,w0)|0,p=p+Math.imul(n,p0)|0,y=y+Math.imul(b,c0)|0,w=w+Math.imul(b,h0)|0,w=w+Math.imul(l,c0)|0,p=p+Math.imul(l,h0)|0,y=y+Math.imul(c,b0)|0,w=w+Math.imul(c,l0)|0,w=w+Math.imul(h,b0)|0,p=p+Math.imul(h,l0)|0;var i0=(B+y|0)+((w&8191)<<13)|0;B=(p+(w>>>13)|0)+(i0>>>26)|0,i0&=67108863,y=Math.imul(F0,D0),w=Math.imul(F0,C0),w=w+Math.imul(A0,D0)|0,p=Math.imul(A0,C0),y=y+Math.imul(I0,R0)|0,w=w+Math.imul(I0,P0)|0,w=w+Math.imul(O0,R0)|0,p=p+Math.imul(O0,P0)|0,y=y+Math.imul(U0,M0)|0,w=w+Math.imul(U0,S0)|0,w=w+Math.imul(X0,M0)|0,p=p+Math.imul(X0,S0)|0,y=y+Math.imul(Z0,q0)|0,w=w+Math.imul(Z0,j0)|0,w=w+Math.imul(G0,q0)|0,p=p+Math.imul(G0,j0)|0,y=y+Math.imul($0,g0)|0,w=w+Math.imul($0,_0)|0,w=w+Math.imul(Q0,g0)|0,p=p+Math.imul(Q0,_0)|0,y=y+Math.imul(e,x0)|0,w=w+Math.imul(e,B0)|0,w=w+Math.imul(r,x0)|0,p=p+Math.imul(r,B0)|0,y=y+Math.imul(t,w0)|0,w=w+Math.imul(t,p0)|0,w=w+Math.imul(m,w0)|0,p=p+Math.imul(m,p0)|0,y=y+Math.imul(u,c0)|0,w=w+Math.imul(u,h0)|0,w=w+Math.imul(n,c0)|0,p=p+Math.imul(n,h0)|0,y=y+Math.imul(b,b0)|0,w=w+Math.imul(b,l0)|0,w=w+Math.imul(l,b0)|0,p=p+Math.imul(l,l0)|0;var $$=(B+y|0)+((w&8191)<<13)|0;B=(p+(w>>>13)|0)+($$>>>26)|0,$$&=67108863,y=Math.imul(F0,R0),w=Math.imul(F0,P0),w=w+Math.imul(A0,R0)|0,p=Math.imul(A0,P0),y=y+Math.imul(I0,M0)|0,w=w+Math.imul(I0,S0)|0,w=w+Math.imul(O0,M0)|0,p=p+Math.imul(O0,S0)|0,y=y+Math.imul(U0,q0)|0,w=w+Math.imul(U0,j0)|0,w=w+Math.imul(X0,q0)|0,p=p+Math.imul(X0,j0)|0,y=y+Math.imul(Z0,g0)|0,w=w+Math.imul(Z0,_0)|0,w=w+Math.imul(G0,g0)|0,p=p+Math.imul(G0,_0)|0,y=y+Math.imul($0,x0)|0,w=w+Math.imul($0,B0)|0,w=w+Math.imul(Q0,x0)|0,p=p+Math.imul(Q0,B0)|0,y=y+Math.imul(e,w0)|0,w=w+Math.imul(e,p0)|0,w=w+Math.imul(r,w0)|0,p=p+Math.imul(r,p0)|0,y=y+Math.imul(t,c0)|0,w=w+Math.imul(t,h0)|0,w=w+Math.imul(m,c0)|0,p=p+Math.imul(m,h0)|0,y=y+Math.imul(u,b0)|0,w=w+Math.imul(u,l0)|0,w=w+Math.imul(n,b0)|0,p=p+Math.imul(n,l0)|0;var Q$=(B+y|0)+((w&8191)<<13)|0;B=(p+(w>>>13)|0)+(Q$>>>26)|0,Q$&=67108863,y=Math.imul(F0,M0),w=Math.imul(F0,S0),w=w+Math.imul(A0,M0)|0,p=Math.imul(A0,S0),y=y+Math.imul(I0,q0)|0,w=w+Math.imul(I0,j0)|0,w=w+Math.imul(O0,q0)|0,p=p+Math.imul(O0,j0)|0,y=y+Math.imul(U0,g0)|0,w=w+Math.imul(U0,_0)|0,w=w+Math.imul(X0,g0)|0,p=p+Math.imul(X0,_0)|0,y=y+Math.imul(Z0,x0)|0,w=w+Math.imul(Z0,B0)|0,w=w+Math.imul(G0,x0)|0,p=p+Math.imul(G0,B0)|0,y=y+Math.imul($0,w0)|0,w=w+Math.imul($0,p0)|0,w=w+Math.imul(Q0,w0)|0,p=p+Math.imul(Q0,p0)|0,y=y+Math.imul(e,c0)|0,w=w+Math.imul(e,h0)|0,w=w+Math.imul(r,c0)|0,p=p+Math.imul(r,h0)|0,y=y+Math.imul(t,b0)|0,w=w+Math.imul(t,l0)|0,w=w+Math.imul(m,b0)|0,p=p+Math.imul(m,l0)|0;var Y$=(B+y|0)+((w&8191)<<13)|0;B=(p+(w>>>13)|0)+(Y$>>>26)|0,Y$&=67108863,y=Math.imul(F0,q0),w=Math.imul(F0,j0),w=w+Math.imul(A0,q0)|0,p=Math.imul(A0,j0),y=y+Math.imul(I0,g0)|0,w=w+Math.imul(I0,_0)|0,w=w+Math.imul(O0,g0)|0,p=p+Math.imul(O0,_0)|0,y=y+Math.imul(U0,x0)|0,w=w+Math.imul(U0,B0)|0,w=w+Math.imul(X0,x0)|0,p=p+Math.imul(X0,B0)|0,y=y+Math.imul(Z0,w0)|0,w=w+Math.imul(Z0,p0)|0,w=w+Math.imul(G0,w0)|0,p=p+Math.imul(G0,p0)|0,y=y+Math.imul($0,c0)|0,w=w+Math.imul($0,h0)|0,w=w+Math.imul(Q0,c0)|0,p=p+Math.imul(Q0,h0)|0,y=y+Math.imul(e,b0)|0,w=w+Math.imul(e,l0)|0,w=w+Math.imul(r,b0)|0,p=p+Math.imul(r,l0)|0;var Z$=(B+y|0)+((w&8191)<<13)|0;B=(p+(w>>>13)|0)+(Z$>>>26)|0,Z$&=67108863,y=Math.imul(F0,g0),w=Math.imul(F0,_0),w=w+Math.imul(A0,g0)|0,p=Math.imul(A0,_0),y=y+Math.imul(I0,x0)|0,w=w+Math.imul(I0,B0)|0,w=w+Math.imul(O0,x0)|0,p=p+Math.imul(O0,B0)|0,y=y+Math.imul(U0,w0)|0,w=w+Math.imul(U0,p0)|0,w=w+Math.imul(X0,w0)|0,p=p+Math.imul(X0,p0)|0,y=y+Math.imul(Z0,c0)|0,w=w+Math.imul(Z0,h0)|0,w=w+Math.imul(G0,c0)|0,p=p+Math.imul(G0,h0)|0,y=y+Math.imul($0,b0)|0,w=w+Math.imul($0,l0)|0,w=w+Math.imul(Q0,b0)|0,p=p+Math.imul(Q0,l0)|0;var G$=(B+y|0)+((w&8191)<<13)|0;B=(p+(w>>>13)|0)+(G$>>>26)|0,G$&=67108863,y=Math.imul(F0,x0),w=Math.imul(F0,B0),w=w+Math.imul(A0,x0)|0,p=Math.imul(A0,B0),y=y+Math.imul(I0,w0)|0,w=w+Math.imul(I0,p0)|0,w=w+Math.imul(O0,w0)|0,p=p+Math.imul(O0,p0)|0,y=y+Math.imul(U0,c0)|0,w=w+Math.imul(U0,h0)|0,w=w+Math.imul(X0,c0)|0,p=p+Math.imul(X0,h0)|0,y=y+Math.imul(Z0,b0)|0,w=w+Math.imul(Z0,l0)|0,w=w+Math.imul(G0,b0)|0,p=p+Math.imul(G0,l0)|0;var V$=(B+y|0)+((w&8191)<<13)|0;B=(p+(w>>>13)|0)+(V$>>>26)|0,V$&=67108863,y=Math.imul(F0,w0),w=Math.imul(F0,p0),w=w+Math.imul(A0,w0)|0,p=Math.imul(A0,p0),y=y+Math.imul(I0,c0)|0,w=w+Math.imul(I0,h0)|0,w=w+Math.imul(O0,c0)|0,p=p+Math.imul(O0,h0)|0,y=y+Math.imul(U0,b0)|0,w=w+Math.imul(U0,l0)|0,w=w+Math.imul(X0,b0)|0,p=p+Math.imul(X0,l0)|0;var U$=(B+y|0)+((w&8191)<<13)|0;B=(p+(w>>>13)|0)+(U$>>>26)|0,U$&=67108863,y=Math.imul(F0,c0),w=Math.imul(F0,h0),w=w+Math.imul(A0,c0)|0,p=Math.imul(A0,h0),y=y+Math.imul(I0,b0)|0,w=w+Math.imul(I0,l0)|0,w=w+Math.imul(O0,b0)|0,p=p+Math.imul(O0,l0)|0;var X$=(B+y|0)+((w&8191)<<13)|0;B=(p+(w>>>13)|0)+(X$>>>26)|0,X$&=67108863,y=Math.imul(F0,b0),w=Math.imul(F0,l0),w=w+Math.imul(A0,b0)|0,p=Math.imul(A0,l0);var K$=(B+y|0)+((w&8191)<<13)|0;return B=(p+(w>>>13)|0)+(K$>>>26)|0,K$&=67108863,x[0]=o0,x[1]=u0,x[2]=n0,x[3]=s0,x[4]=t0,x[5]=m0,x[6]=a0,x[7]=e0,x[8]=r0,x[9]=i0,x[10]=$$,x[11]=Q$,x[12]=Y$,x[13]=Z$,x[14]=G$,x[15]=V$,x[16]=U$,x[17]=X$,x[18]=K$,B!==0&&(x[19]=B,g.length++),g};Math.imul||(E=W);function T(j,k,g){g.negative=k.negative^j.negative,g.length=j.length+k.length;for(var _=0,N=0,x=0;x>>26)|0,N+=B>>>26,B&=67108863}g.words[x]=y,_=B,B=N}return _!==0?g.words[x]=_:g.length--,g.strip()}function D(j,k,g){var _=new C;return _.mulp(j,k,g)}U.prototype.mulTo=function(j,k){var g,_=this.length+j.length;return this.length===10&&j.length===10?g=E(this,j,k):_<63?g=W(this,j,k):_<1024?g=T(this,j,k):g=D(this,j,k),g};function C(j,k){this.x=j,this.y=k}C.prototype.makeRBT=function(j){for(var k=new Array(j),g=U.prototype._countBits(j)-1,_=0;_>=1;return _},C.prototype.permute=function(j,k,g,_,N,x){for(var B=0;B>>1)N++;return 1<>>13,g[2*x+1]=N&8191,N=N>>>13;for(x=2*k;x<_;++x)g[x]=0;G(N===0),G((N&-8192)===0)},C.prototype.stub=function(j){for(var k=new Array(j),g=0;g>=26,k+=_/67108864|0,k+=N>>>26,this.words[g]=N&67108863}return k!==0&&(this.words[g]=k,this.length++),this},U.prototype.muln=function(j){return this.clone().imuln(j)},U.prototype.sqr=function(){return this.mul(this)},U.prototype.isqr=function(){return this.imul(this.clone())},U.prototype.pow=function(j){var k=H(j);if(k.length===0)return new U(1);for(var g=this,_=0;_=0);var k=j%26,g=(j-k)/26,_=67108863>>>26-k<<26-k,N;if(k!==0){var x=0;for(N=0;N>>26-k}x&&(this.words[N]=x,this.length++)}if(g!==0){for(N=this.length-1;N>=0;N--)this.words[N+g]=this.words[N];for(N=0;N=0);var _;k?_=(k-k%26)/26:_=0;var N=j%26,x=Math.min((j-N)/26,this.length),B=67108863^67108863>>>N<x)for(this.length-=x,w=0;w=0&&(p!==0||w>=_);w--){var f=this.words[w]|0;this.words[w]=p<<26-N|f>>>N,p=f&B}return y&&p!==0&&(y.words[y.length++]=p),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},U.prototype.ishrn=function(j,k,g){return G(this.negative===0),this.iushrn(j,k,g)},U.prototype.shln=function(j){return this.clone().ishln(j)},U.prototype.ushln=function(j){return this.clone().iushln(j)},U.prototype.shrn=function(j){return this.clone().ishrn(j)},U.prototype.ushrn=function(j){return this.clone().iushrn(j)},U.prototype.testn=function(j){G(typeof j=="number"&&j>=0);var k=j%26,g=(j-k)/26,_=1<=0);var k=j%26,g=(j-k)/26;if(G(this.negative===0,"imaskn works only with positive numbers"),this.length<=g)return this;if(k!==0&&g++,this.length=Math.min(g,this.length),k!==0){var _=67108863^67108863>>>k<=67108864;k++)this.words[k]-=67108864,k===this.length-1?this.words[k+1]=1:this.words[k+1]++;return this.length=Math.max(this.length,k+1),this},U.prototype.isubn=function(j){if(G(typeof j=="number"),G(j<67108864),j<0)return this.iaddn(-j);if(this.negative!==0)return this.negative=0,this.iaddn(j),this.negative=1,this;if(this.words[0]-=j,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var k=0;k>26)-(y/67108864|0),this.words[N+g]=x&67108863}for(;N>26,this.words[N+g]=x&67108863;if(B===0)return this.strip();for(G(B===-1),B=0,N=0;N>26,this.words[N]=x&67108863;return this.negative=1,this.strip()},U.prototype._wordDiv=function(j,k){var g=this.length-j.length,_=this.clone(),N=j,x=N.words[N.length-1]|0,B=this._countBits(x);g=26-B,g!==0&&(N=N.ushln(g),_.iushln(g),x=N.words[N.length-1]|0);var y=_.length-N.length,w;if(k!=="mod"){w=new U(null),w.length=y+1,w.words=new Array(w.length);for(var p=0;p=0;c--){var h=(_.words[N.length+c]|0)*67108864+(_.words[N.length+c-1]|0);for(h=Math.min(h/x|0,67108863),_._ishlnsubmul(N,h,c);_.negative!==0;)h--,_.negative=0,_._ishlnsubmul(N,1,c),_.isZero()||(_.negative^=1);w&&(w.words[c]=h)}return w&&w.strip(),_.strip(),k!=="div"&&g!==0&&_.iushrn(g),{div:w||null,mod:_}},U.prototype.divmod=function(j,k,g){if(G(!j.isZero()),this.isZero())return{div:new U(0),mod:new U(0)};var _,N,x;return this.negative!==0&&j.negative===0?(x=this.neg().divmod(j,k),k!=="mod"&&(_=x.div.neg()),k!=="div"&&(N=x.mod.neg(),g&&N.negative!==0&&N.iadd(j)),{div:_,mod:N}):this.negative===0&&j.negative!==0?(x=this.divmod(j.neg(),k),k!=="mod"&&(_=x.div.neg()),{div:_,mod:x.mod}):(this.negative&j.negative)!==0?(x=this.neg().divmod(j.neg(),k),k!=="div"&&(N=x.mod.neg(),g&&N.negative!==0&&N.isub(j)),{div:x.div,mod:N}):j.length>this.length||this.cmp(j)<0?{div:new U(0),mod:this}:j.length===1?k==="div"?{div:this.divn(j.words[0]),mod:null}:k==="mod"?{div:null,mod:new U(this.modn(j.words[0]))}:{div:this.divn(j.words[0]),mod:new U(this.modn(j.words[0]))}:this._wordDiv(j,k)},U.prototype.div=function(j){return this.divmod(j,"div",!1).div},U.prototype.mod=function(j){return this.divmod(j,"mod",!1).mod},U.prototype.umod=function(j){return this.divmod(j,"mod",!0).mod},U.prototype.divRound=function(j){var k=this.divmod(j);if(k.mod.isZero())return k.div;var g=k.div.negative!==0?k.mod.isub(j):k.mod,_=j.ushrn(1),N=j.andln(1),x=g.cmp(_);return x<0||N===1&&x===0?k.div:k.div.negative!==0?k.div.isubn(1):k.div.iaddn(1)},U.prototype.modn=function(j){G(j<=67108863);for(var k=(1<<26)%j,g=0,_=this.length-1;_>=0;_--)g=(k*g+(this.words[_]|0))%j;return g},U.prototype.idivn=function(j){G(j<=67108863);for(var k=0,g=this.length-1;g>=0;g--){var _=(this.words[g]|0)+k*67108864;this.words[g]=_/j|0,k=_%j}return this.strip()},U.prototype.divn=function(j){return this.clone().idivn(j)},U.prototype.egcd=function(j){G(j.negative===0),G(!j.isZero());var k=this,g=j.clone();k.negative!==0?k=k.umod(j):k=k.clone();for(var _=new U(1),N=new U(0),x=new U(0),B=new U(1),y=0;k.isEven()&&g.isEven();)k.iushrn(1),g.iushrn(1),++y;for(var w=g.clone(),p=k.clone();!k.isZero();){for(var f=0,c=1;(k.words[0]&c)===0&&f<26;++f,c<<=1);if(f>0)for(k.iushrn(f);f-- >0;)(_.isOdd()||N.isOdd())&&(_.iadd(w),N.isub(p)),_.iushrn(1),N.iushrn(1);for(var h=0,d=1;(g.words[0]&d)===0&&h<26;++h,d<<=1);if(h>0)for(g.iushrn(h);h-- >0;)(x.isOdd()||B.isOdd())&&(x.iadd(w),B.isub(p)),x.iushrn(1),B.iushrn(1);k.cmp(g)>=0?(k.isub(g),_.isub(x),N.isub(B)):(g.isub(k),x.isub(_),B.isub(N))}return{a:x,b:B,gcd:g.iushln(y)}},U.prototype._invmp=function(j){G(j.negative===0),G(!j.isZero());var k=this,g=j.clone();k.negative!==0?k=k.umod(j):k=k.clone();for(var _=new U(1),N=new U(0),x=g.clone();k.cmpn(1)>0&&g.cmpn(1)>0;){for(var B=0,y=1;(k.words[0]&y)===0&&B<26;++B,y<<=1);if(B>0)for(k.iushrn(B);B-- >0;)_.isOdd()&&_.iadd(x),_.iushrn(1);for(var w=0,p=1;(g.words[0]&p)===0&&w<26;++w,p<<=1);if(w>0)for(g.iushrn(w);w-- >0;)N.isOdd()&&N.iadd(x),N.iushrn(1);k.cmp(g)>=0?(k.isub(g),_.isub(N)):(g.isub(k),N.isub(_))}var f;return k.cmpn(1)===0?f=_:f=N,f.cmpn(0)<0&&f.iadd(j),f},U.prototype.gcd=function(j){if(this.isZero())return j.abs();if(j.isZero())return this.abs();var k=this.clone(),g=j.clone();k.negative=0,g.negative=0;for(var _=0;k.isEven()&&g.isEven();_++)k.iushrn(1),g.iushrn(1);do{for(;k.isEven();)k.iushrn(1);for(;g.isEven();)g.iushrn(1);var N=k.cmp(g);if(N<0){var x=k;k=g,g=x}else if(N===0||g.cmpn(1)===0)break;k.isub(g)}while(!0);return g.iushln(_)},U.prototype.invm=function(j){return this.egcd(j).a.umod(j)},U.prototype.isEven=function(){return(this.words[0]&1)===0},U.prototype.isOdd=function(){return(this.words[0]&1)===1},U.prototype.andln=function(j){return this.words[0]&j},U.prototype.bincn=function(j){G(typeof j=="number");var k=j%26,g=(j-k)/26,_=1<>>26,B&=67108863,this.words[x]=B}return N!==0&&(this.words[x]=N,this.length++),this},U.prototype.isZero=function(){return this.length===1&&this.words[0]===0},U.prototype.cmpn=function(j){var k=j<0;if(this.negative!==0&&!k)return-1;if(this.negative===0&&k)return 1;this.strip();var g;if(this.length>1)g=1;else{k&&(j=-j),G(j<=67108863,"Number is too big");var _=this.words[0]|0;g=_===j?0:_j.length)return 1;if(this.length=0;g--){var _=this.words[g]|0,N=j.words[g]|0;if(_!==N){_N&&(k=1);break}}return k},U.prototype.gtn=function(j){return this.cmpn(j)===1},U.prototype.gt=function(j){return this.cmp(j)===1},U.prototype.gten=function(j){return this.cmpn(j)>=0},U.prototype.gte=function(j){return this.cmp(j)>=0},U.prototype.ltn=function(j){return this.cmpn(j)===-1},U.prototype.lt=function(j){return this.cmp(j)===-1},U.prototype.lten=function(j){return this.cmpn(j)<=0},U.prototype.lte=function(j){return this.cmp(j)<=0},U.prototype.eqn=function(j){return this.cmpn(j)===0},U.prototype.eq=function(j){return this.cmp(j)===0},U.red=function(j){return new v(j)},U.prototype.toRed=function(j){return G(!this.red,"Already a number in reduction context"),G(this.negative===0,"red works only with positives"),j.convertTo(this)._forceRed(j)},U.prototype.fromRed=function(){return G(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},U.prototype._forceRed=function(j){return this.red=j,this},U.prototype.forceRed=function(j){return G(!this.red,"Already a number in reduction context"),this._forceRed(j)},U.prototype.redAdd=function(j){return G(this.red,"redAdd works only with red numbers"),this.red.add(this,j)},U.prototype.redIAdd=function(j){return G(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,j)},U.prototype.redSub=function(j){return G(this.red,"redSub works only with red numbers"),this.red.sub(this,j)},U.prototype.redISub=function(j){return G(this.red,"redISub works only with red numbers"),this.red.isub(this,j)},U.prototype.redShl=function(j){return G(this.red,"redShl works only with red numbers"),this.red.shl(this,j)},U.prototype.redMul=function(j){return G(this.red,"redMul works only with red numbers"),this.red._verify2(this,j),this.red.mul(this,j)},U.prototype.redIMul=function(j){return G(this.red,"redMul works only with red numbers"),this.red._verify2(this,j),this.red.imul(this,j)},U.prototype.redSqr=function(){return G(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},U.prototype.redISqr=function(){return G(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},U.prototype.redSqrt=function(){return G(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},U.prototype.redInvm=function(){return G(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},U.prototype.redNeg=function(){return G(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},U.prototype.redPow=function(j){return G(this.red&&!j.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,j)};var L={k256:null,p224:null,p192:null,p25519:null};function R(j,k){this.name=j,this.p=new U(k,16),this.n=this.p.bitLength(),this.k=new U(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}R.prototype._tmp=function(){var j=new U(null);return j.words=new Array(Math.ceil(this.n/13)),j},R.prototype.ireduce=function(j){var k=j,g;do this.split(k,this.tmp),k=this.imulK(k),k=k.iadd(this.tmp),g=k.bitLength();while(g>this.n);var _=g0?k.isub(this.p):k.strip!==void 0?k.strip():k._strip(),k},R.prototype.split=function(j,k){j.iushrn(this.n,0,k)},R.prototype.imulK=function(j){return j.imul(this.k)};function P(){R.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}V(P,R),P.prototype.split=function(j,k){for(var g=4194303,_=Math.min(j.length,9),N=0;N<_;N++)k.words[N]=j.words[N];if(k.length=_,j.length<=9){j.words[0]=0,j.length=1;return}var x=j.words[9];for(k.words[k.length++]=x&g,N=10;N>>22,x=B}x>>>=22,j.words[N-10]=x,x===0&&j.length>10?j.length-=10:j.length-=9},P.prototype.imulK=function(j){j.words[j.length]=0,j.words[j.length+1]=0,j.length+=2;for(var k=0,g=0;g>>=26,j.words[g]=N,k=_}return k!==0&&(j.words[j.length++]=k),j},U._prime=function(j){if(L[j])return L[j];var k;if(j==="k256")k=new P;else if(j==="p224")k=new z;else if(j==="p192")k=new M;else if(j==="p25519")k=new S;else throw new Error("Unknown prime "+j);return L[j]=k,k};function v(j){if(typeof j=="string"){var k=U._prime(j);this.m=k.p,this.prime=k}else G(j.gtn(1),"modulus must be greater than 1"),this.m=j,this.prime=null}v.prototype._verify1=function(j){G(j.negative===0,"red works only with positives"),G(j.red,"red works only with red numbers")},v.prototype._verify2=function(j,k){G((j.negative|k.negative)===0,"red works only with positives"),G(j.red&&j.red===k.red,"red works only with red numbers")},v.prototype.imod=function(j){return this.prime?this.prime.ireduce(j)._forceRed(this):j.umod(this.m)._forceRed(this)},v.prototype.neg=function(j){return j.isZero()?j.clone():this.m.sub(j)._forceRed(this)},v.prototype.add=function(j,k){this._verify2(j,k);var g=j.add(k);return g.cmp(this.m)>=0&&g.isub(this.m),g._forceRed(this)},v.prototype.iadd=function(j,k){this._verify2(j,k);var g=j.iadd(k);return g.cmp(this.m)>=0&&g.isub(this.m),g},v.prototype.sub=function(j,k){this._verify2(j,k);var g=j.sub(k);return g.cmpn(0)<0&&g.iadd(this.m),g._forceRed(this)},v.prototype.isub=function(j,k){this._verify2(j,k);var g=j.isub(k);return g.cmpn(0)<0&&g.iadd(this.m),g},v.prototype.shl=function(j,k){return this._verify1(j),this.imod(j.ushln(k))},v.prototype.imul=function(j,k){return this._verify2(j,k),this.imod(j.imul(k))},v.prototype.mul=function(j,k){return this._verify2(j,k),this.imod(j.mul(k))},v.prototype.isqr=function(j){return this.imul(j,j.clone())},v.prototype.sqr=function(j){return this.mul(j,j)},v.prototype.sqrt=function(j){if(j.isZero())return j.clone();var k=this.m.andln(3);if(G(k%2===1),k===3){var g=this.m.add(new U(1)).iushrn(2);return this.pow(j,g)}for(var _=this.m.subn(1),N=0;!_.isZero()&&_.andln(1)===0;)N++,_.iushrn(1);G(!_.isZero());var x=new U(1).toRed(this),B=x.redNeg(),y=this.m.subn(1).iushrn(1),w=this.m.bitLength();for(w=new U(2*w*w).toRed(this);this.pow(w,y).cmp(B)!==0;)w.redIAdd(B);for(var p=this.pow(w,_),f=this.pow(j,_.addn(1).iushrn(1)),c=this.pow(j,_),h=N;c.cmp(x)!==0;){for(var d=c,b=0;d.cmp(x)!==0;b++)d=d.redSqr();G(b=0;N--){for(var p=k.words[N],f=w-1;f>=0;f--){var c=p>>f&1;if(x!==_[0]&&(x=this.sqr(x)),c===0&&B===0){y=0;continue}B<<=1,B|=c,y++,!(y!==g&&(N!==0||f!==0))&&(x=this.mul(x,_[B]),y=0,B=0)}w=26}return x},v.prototype.convertTo=function(j){var k=j.umod(this.m);return k===j?k.clone():k},v.prototype.convertFrom=function(j){var k=j.clone();return k.red=null,k},U.mont=function(j){return new q(j)};function q(j){v.call(this,j),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new U(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}V(q,v),q.prototype.convertTo=function(j){return this.imod(j.ushln(this.shift))},q.prototype.convertFrom=function(j){var k=this.imod(j.mul(this.rinv));return k.red=null,k},q.prototype.imul=function(j,k){if(j.isZero()||k.isZero())return j.words[0]=0,j.length=1,j;var g=j.imul(k),_=g.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),N=g.isub(_).iushrn(this.shift),x=N;return N.cmp(this.m)>=0?x=N.isub(this.m):N.cmpn(0)<0&&(x=N.iadd(this.m)),x._forceRed(this)},q.prototype.mul=function(j,k){if(j.isZero()||k.isZero())return new U(0)._forceRed(this);var g=j.mul(k),_=g.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),N=g.isub(_).iushrn(this.shift),x=N;return N.cmp(this.m)>=0?x=N.isub(this.m):N.cmpn(0)<0&&(x=N.iadd(this.m)),x._forceRed(this)},q.prototype.invm=function(j){var k=this.imod(j._invmp(this.m).mul(this.r2));return k._forceRed(this)}})(typeof Q>"u"||Q,$)}}),lY=q$({"node_modules/create-ecdh/browser.js"($,Q){var Y=TY(),Z=bY();Q.exports=function(X){return new V(X)};var G={secp256k1:{name:"secp256k1",byteLength:32},secp224r1:{name:"p224",byteLength:28},prime256v1:{name:"p256",byteLength:32},prime192v1:{name:"p192",byteLength:24},ed25519:{name:"ed25519",byteLength:32},secp384r1:{name:"p384",byteLength:48},secp521r1:{name:"p521",byteLength:66}};G.p224=G.secp224r1,G.p256=G.secp256r1=G.prime256v1,G.p192=G.secp192r1=G.prime192v1,G.p384=G.secp384r1,G.p521=G.secp521r1;function V(X){this.curveType=G[X],this.curveType||(this.curveType={name:X}),this.curve=new Y.ec(this.curveType.name),this.keys=void 0}V.prototype.generateKeys=function(X,K){return this.keys=this.curve.genKeyPair(),this.getPublicKey(X,K)},V.prototype.computeSecret=function(X,K,I){K=K||"utf8",F$.isBuffer(X)||(X=new F$(X,K));var O=this.curve.keyFromPublic(X).getPublic(),J=O.mul(this.keys.getPrivate()).getX();return U(J,I,this.curveType.byteLength)},V.prototype.getPublicKey=function(X,K){var I=this.keys.getPublic(K==="compressed",!0);return K==="hybrid"&&(I[I.length-1]%2?I[0]=7:I[0]=6),U(I,X)},V.prototype.getPrivateKey=function(X){return U(this.keys.getPrivate(),X)},V.prototype.setPublicKey=function(X,K){return K=K||"utf8",F$.isBuffer(X)||(X=new F$(X,K)),this.keys._importPublic(X),this},V.prototype.setPrivateKey=function(X,K){K=K||"utf8",F$.isBuffer(X)||(X=new F$(X,K));var I=new Z(X);return I=I.toString(16),this.keys=this.curve.genKeyPair(),this.keys._importPrivate(I),this};function U(X,K,I){Array.isArray(X)||(X=X.toArray());var O=new F$(X);if(I&&O.length0?j:k},U.min=function(j,k){return j.cmp(k)<0?j:k},U.prototype._init=function(j,k,g){if(typeof j=="number")return this._initNumber(j,k,g);if(typeof j=="object")return this._initArray(j,k,g);k==="hex"&&(k=16),G(k===(k|0)&&k>=2&&k<=36),j=j.toString().replace(/\s+/g,"");var _=0;j[0]==="-"&&(_++,this.negative=1),_=0;_-=3)x=j[_]|j[_-1]<<8|j[_-2]<<16,this.words[N]|=x<>>26-B&67108863,B+=24,B>=26&&(B-=26,N++);else if(g==="le")for(_=0,N=0;_>>26-B&67108863,B+=24,B>=26&&(B-=26,N++);return this.strip()};function K(j,k){var g=j.charCodeAt(k);return g>=65&&g<=70?g-55:g>=97&&g<=102?g-87:g-48&15}function I(j,k,g){var _=K(j,g);return g-1>=k&&(_|=K(j,g-1)<<4),_}U.prototype._parseHex=function(j,k,g){this.length=Math.ceil((j.length-k)/6),this.words=new Array(this.length);for(var _=0;_=k;_-=2)B=I(j,k,_)<=18?(N-=18,x+=1,this.words[x]|=B>>>26):N+=8;else{var y=j.length-k;for(_=y%2===0?k+1:k;_=18?(N-=18,x+=1,this.words[x]|=B>>>26):N+=8}this.strip()};function O(j,k,g,_){for(var N=0,x=Math.min(j.length,g),B=k;B=49?N+=y-49+10:y>=17?N+=y-17+10:N+=y}return N}U.prototype._parseBase=function(j,k,g){this.words=[0],this.length=1;for(var _=0,N=1;N<=67108863;N*=k)_++;_--,N=N/k|0;for(var x=j.length-g,B=x%_,y=Math.min(x,x-B)+g,w=0,p=g;p1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},U.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},U.prototype.inspect=function(){return(this.red?""};var J=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],F=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],A=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64000000,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,24300000,28629151,33554432,39135393,45435424,52521875,60466176];U.prototype.toString=function(j,k){j=j||10,k=k|0||1;var g;if(j===16||j==="hex"){g="";for(var _=0,N=0,x=0;x>>24-_&16777215,N!==0||x!==this.length-1?g=J[6-y.length]+y+g:g=y+g,_+=2,_>=26&&(_-=26,x--)}for(N!==0&&(g=N.toString(16)+g);g.length%k!==0;)g="0"+g;return this.negative!==0&&(g="-"+g),g}if(j===(j|0)&&j>=2&&j<=36){var w=F[j],p=A[j];g="";var f=this.clone();for(f.negative=0;!f.isZero();){var c=f.modn(p).toString(j);f=f.idivn(p),f.isZero()?g=c+g:g=J[w-c.length]+c+g}for(this.isZero()&&(g="0"+g);g.length%k!==0;)g="0"+g;return this.negative!==0&&(g="-"+g),g}G(!1,"Base should be between 2 and 36")},U.prototype.toNumber=function(){var j=this.words[0];return this.length===2?j+=this.words[1]*67108864:this.length===3&&this.words[2]===1?j+=4503599627370496+this.words[1]*67108864:this.length>2&&G(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-j:j},U.prototype.toJSON=function(){return this.toString(16)},U.prototype.toBuffer=function(j,k){return G(typeof X<"u"),this.toArrayLike(X,j,k)},U.prototype.toArray=function(j,k){return this.toArrayLike(Array,j,k)},U.prototype.toArrayLike=function(j,k,g){var _=this.byteLength(),N=g||Math.max(1,_);G(_<=N,"byte array longer than desired length"),G(N>0,"Requested array length <= 0"),this.strip();var x=k==="le",B=new j(N),y,w,p=this.clone();if(x){for(w=0;!p.isZero();w++)y=p.andln(255),p.iushrn(8),B[w]=y;for(;w=4096&&(g+=13,k>>>=13),k>=64&&(g+=7,k>>>=7),k>=8&&(g+=4,k>>>=4),k>=2&&(g+=2,k>>>=2),g+k},U.prototype._zeroBits=function(j){if(j===0)return 26;var k=j,g=0;return(k&8191)===0&&(g+=13,k>>>=13),(k&127)===0&&(g+=7,k>>>=7),(k&15)===0&&(g+=4,k>>>=4),(k&3)===0&&(g+=2,k>>>=2),(k&1)===0&&g++,g},U.prototype.bitLength=function(){var j=this.words[this.length-1],k=this._countBits(j);return(this.length-1)*26+k};function H(j){for(var k=new Array(j.bitLength()),g=0;g>>N}return k}U.prototype.zeroBits=function(){if(this.isZero())return 0;for(var j=0,k=0;kj.length?this.clone().ior(j):j.clone().ior(this)},U.prototype.uor=function(j){return this.length>j.length?this.clone().iuor(j):j.clone().iuor(this)},U.prototype.iuand=function(j){var k;this.length>j.length?k=j:k=this;for(var g=0;gj.length?this.clone().iand(j):j.clone().iand(this)},U.prototype.uand=function(j){return this.length>j.length?this.clone().iuand(j):j.clone().iuand(this)},U.prototype.iuxor=function(j){var k,g;this.length>j.length?(k=this,g=j):(k=j,g=this);for(var _=0;_j.length?this.clone().ixor(j):j.clone().ixor(this)},U.prototype.uxor=function(j){return this.length>j.length?this.clone().iuxor(j):j.clone().iuxor(this)},U.prototype.inotn=function(j){G(typeof j=="number"&&j>=0);var k=Math.ceil(j/26)|0,g=j%26;this._expand(k),g>0&&k--;for(var _=0;_0&&(this.words[_]=~this.words[_]&67108863>>26-g),this.strip()},U.prototype.notn=function(j){return this.clone().inotn(j)},U.prototype.setn=function(j,k){G(typeof j=="number"&&j>=0);var g=j/26|0,_=j%26;return this._expand(g+1),k?this.words[g]=this.words[g]|1<<_:this.words[g]=this.words[g]&~(1<<_),this.strip()},U.prototype.iadd=function(j){var k;if(this.negative!==0&&j.negative===0)return this.negative=0,k=this.isub(j),this.negative^=1,this._normSign();if(this.negative===0&&j.negative!==0)return j.negative=0,k=this.isub(j),j.negative=1,k._normSign();var g,_;this.length>j.length?(g=this,_=j):(g=j,_=this);for(var N=0,x=0;x<_.length;x++)k=(g.words[x]|0)+(_.words[x]|0)+N,this.words[x]=k&67108863,N=k>>>26;for(;N!==0&&x>>26;if(this.length=g.length,N!==0)this.words[this.length]=N,this.length++;else if(g!==this)for(;xj.length?this.clone().iadd(j):j.clone().iadd(this)},U.prototype.isub=function(j){if(j.negative!==0){j.negative=0;var k=this.iadd(j);return j.negative=1,k._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(j),this.negative=1,this._normSign();var g=this.cmp(j);if(g===0)return this.negative=0,this.length=1,this.words[0]=0,this;var _,N;g>0?(_=this,N=j):(_=j,N=this);for(var x=0,B=0;B>26,this.words[B]=k&67108863;for(;x!==0&&B<_.length;B++)k=(_.words[B]|0)+x,x=k>>26,this.words[B]=k&67108863;if(x===0&&B<_.length&&_!==this)for(;B<_.length;B++)this.words[B]=_.words[B];return this.length=Math.max(this.length,B),_!==this&&(this.negative=1),this.strip()},U.prototype.sub=function(j){return this.clone().isub(j)};function W(j,k,g){g.negative=k.negative^j.negative;var _=j.length+k.length|0;g.length=_,_=_-1|0;var N=j.words[0]|0,x=k.words[0]|0,B=N*x,y=B&67108863,w=B/67108864|0;g.words[0]=y;for(var p=1;p<_;p++){for(var f=w>>>26,c=w&67108863,h=Math.min(p,k.length-1),d=Math.max(0,p-j.length+1);d<=h;d++){var b=p-d|0;N=j.words[b]|0,x=k.words[d]|0,B=N*x+c,f+=B/67108864|0,c=B&67108863}g.words[p]=c|0,w=f|0}return w!==0?g.words[p]=w|0:g.length--,g.strip()}var E=function(j,k,g){var _=j.words,N=k.words,x=g.words,B=0,y,w,p,f=_[0]|0,c=f&8191,h=f>>>13,d=_[1]|0,b=d&8191,l=d>>>13,o=_[2]|0,u=o&8191,n=o>>>13,s=_[3]|0,t=s&8191,m=s>>>13,a=_[4]|0,e=a&8191,r=a>>>13,i=_[5]|0,$0=i&8191,Q0=i>>>13,Y0=_[6]|0,Z0=Y0&8191,G0=Y0>>>13,V0=_[7]|0,U0=V0&8191,X0=V0>>>13,K0=_[8]|0,I0=K0&8191,O0=K0>>>13,J0=_[9]|0,F0=J0&8191,A0=J0>>>13,H0=N[0]|0,W0=H0&8191,E0=H0>>>13,T0=N[1]|0,D0=T0&8191,C0=T0>>>13,L0=N[2]|0,R0=L0&8191,P0=L0>>>13,z0=N[3]|0,M0=z0&8191,S0=z0>>>13,v0=N[4]|0,q0=v0&8191,j0=v0>>>13,k0=N[5]|0,g0=k0&8191,_0=k0>>>13,N0=N[6]|0,x0=N0&8191,B0=N0>>>13,y0=N[7]|0,w0=y0&8191,p0=y0>>>13,f0=N[8]|0,c0=f0&8191,h0=f0>>>13,d0=N[9]|0,b0=d0&8191,l0=d0>>>13;g.negative=j.negative^k.negative,g.length=19,y=Math.imul(c,W0),w=Math.imul(c,E0),w=w+Math.imul(h,W0)|0,p=Math.imul(h,E0);var o0=(B+y|0)+((w&8191)<<13)|0;B=(p+(w>>>13)|0)+(o0>>>26)|0,o0&=67108863,y=Math.imul(b,W0),w=Math.imul(b,E0),w=w+Math.imul(l,W0)|0,p=Math.imul(l,E0),y=y+Math.imul(c,D0)|0,w=w+Math.imul(c,C0)|0,w=w+Math.imul(h,D0)|0,p=p+Math.imul(h,C0)|0;var u0=(B+y|0)+((w&8191)<<13)|0;B=(p+(w>>>13)|0)+(u0>>>26)|0,u0&=67108863,y=Math.imul(u,W0),w=Math.imul(u,E0),w=w+Math.imul(n,W0)|0,p=Math.imul(n,E0),y=y+Math.imul(b,D0)|0,w=w+Math.imul(b,C0)|0,w=w+Math.imul(l,D0)|0,p=p+Math.imul(l,C0)|0,y=y+Math.imul(c,R0)|0,w=w+Math.imul(c,P0)|0,w=w+Math.imul(h,R0)|0,p=p+Math.imul(h,P0)|0;var n0=(B+y|0)+((w&8191)<<13)|0;B=(p+(w>>>13)|0)+(n0>>>26)|0,n0&=67108863,y=Math.imul(t,W0),w=Math.imul(t,E0),w=w+Math.imul(m,W0)|0,p=Math.imul(m,E0),y=y+Math.imul(u,D0)|0,w=w+Math.imul(u,C0)|0,w=w+Math.imul(n,D0)|0,p=p+Math.imul(n,C0)|0,y=y+Math.imul(b,R0)|0,w=w+Math.imul(b,P0)|0,w=w+Math.imul(l,R0)|0,p=p+Math.imul(l,P0)|0,y=y+Math.imul(c,M0)|0,w=w+Math.imul(c,S0)|0,w=w+Math.imul(h,M0)|0,p=p+Math.imul(h,S0)|0;var s0=(B+y|0)+((w&8191)<<13)|0;B=(p+(w>>>13)|0)+(s0>>>26)|0,s0&=67108863,y=Math.imul(e,W0),w=Math.imul(e,E0),w=w+Math.imul(r,W0)|0,p=Math.imul(r,E0),y=y+Math.imul(t,D0)|0,w=w+Math.imul(t,C0)|0,w=w+Math.imul(m,D0)|0,p=p+Math.imul(m,C0)|0,y=y+Math.imul(u,R0)|0,w=w+Math.imul(u,P0)|0,w=w+Math.imul(n,R0)|0,p=p+Math.imul(n,P0)|0,y=y+Math.imul(b,M0)|0,w=w+Math.imul(b,S0)|0,w=w+Math.imul(l,M0)|0,p=p+Math.imul(l,S0)|0,y=y+Math.imul(c,q0)|0,w=w+Math.imul(c,j0)|0,w=w+Math.imul(h,q0)|0,p=p+Math.imul(h,j0)|0;var t0=(B+y|0)+((w&8191)<<13)|0;B=(p+(w>>>13)|0)+(t0>>>26)|0,t0&=67108863,y=Math.imul($0,W0),w=Math.imul($0,E0),w=w+Math.imul(Q0,W0)|0,p=Math.imul(Q0,E0),y=y+Math.imul(e,D0)|0,w=w+Math.imul(e,C0)|0,w=w+Math.imul(r,D0)|0,p=p+Math.imul(r,C0)|0,y=y+Math.imul(t,R0)|0,w=w+Math.imul(t,P0)|0,w=w+Math.imul(m,R0)|0,p=p+Math.imul(m,P0)|0,y=y+Math.imul(u,M0)|0,w=w+Math.imul(u,S0)|0,w=w+Math.imul(n,M0)|0,p=p+Math.imul(n,S0)|0,y=y+Math.imul(b,q0)|0,w=w+Math.imul(b,j0)|0,w=w+Math.imul(l,q0)|0,p=p+Math.imul(l,j0)|0,y=y+Math.imul(c,g0)|0,w=w+Math.imul(c,_0)|0,w=w+Math.imul(h,g0)|0,p=p+Math.imul(h,_0)|0;var m0=(B+y|0)+((w&8191)<<13)|0;B=(p+(w>>>13)|0)+(m0>>>26)|0,m0&=67108863,y=Math.imul(Z0,W0),w=Math.imul(Z0,E0),w=w+Math.imul(G0,W0)|0,p=Math.imul(G0,E0),y=y+Math.imul($0,D0)|0,w=w+Math.imul($0,C0)|0,w=w+Math.imul(Q0,D0)|0,p=p+Math.imul(Q0,C0)|0,y=y+Math.imul(e,R0)|0,w=w+Math.imul(e,P0)|0,w=w+Math.imul(r,R0)|0,p=p+Math.imul(r,P0)|0,y=y+Math.imul(t,M0)|0,w=w+Math.imul(t,S0)|0,w=w+Math.imul(m,M0)|0,p=p+Math.imul(m,S0)|0,y=y+Math.imul(u,q0)|0,w=w+Math.imul(u,j0)|0,w=w+Math.imul(n,q0)|0,p=p+Math.imul(n,j0)|0,y=y+Math.imul(b,g0)|0,w=w+Math.imul(b,_0)|0,w=w+Math.imul(l,g0)|0,p=p+Math.imul(l,_0)|0,y=y+Math.imul(c,x0)|0,w=w+Math.imul(c,B0)|0,w=w+Math.imul(h,x0)|0,p=p+Math.imul(h,B0)|0;var a0=(B+y|0)+((w&8191)<<13)|0;B=(p+(w>>>13)|0)+(a0>>>26)|0,a0&=67108863,y=Math.imul(U0,W0),w=Math.imul(U0,E0),w=w+Math.imul(X0,W0)|0,p=Math.imul(X0,E0),y=y+Math.imul(Z0,D0)|0,w=w+Math.imul(Z0,C0)|0,w=w+Math.imul(G0,D0)|0,p=p+Math.imul(G0,C0)|0,y=y+Math.imul($0,R0)|0,w=w+Math.imul($0,P0)|0,w=w+Math.imul(Q0,R0)|0,p=p+Math.imul(Q0,P0)|0,y=y+Math.imul(e,M0)|0,w=w+Math.imul(e,S0)|0,w=w+Math.imul(r,M0)|0,p=p+Math.imul(r,S0)|0,y=y+Math.imul(t,q0)|0,w=w+Math.imul(t,j0)|0,w=w+Math.imul(m,q0)|0,p=p+Math.imul(m,j0)|0,y=y+Math.imul(u,g0)|0,w=w+Math.imul(u,_0)|0,w=w+Math.imul(n,g0)|0,p=p+Math.imul(n,_0)|0,y=y+Math.imul(b,x0)|0,w=w+Math.imul(b,B0)|0,w=w+Math.imul(l,x0)|0,p=p+Math.imul(l,B0)|0,y=y+Math.imul(c,w0)|0,w=w+Math.imul(c,p0)|0,w=w+Math.imul(h,w0)|0,p=p+Math.imul(h,p0)|0;var e0=(B+y|0)+((w&8191)<<13)|0;B=(p+(w>>>13)|0)+(e0>>>26)|0,e0&=67108863,y=Math.imul(I0,W0),w=Math.imul(I0,E0),w=w+Math.imul(O0,W0)|0,p=Math.imul(O0,E0),y=y+Math.imul(U0,D0)|0,w=w+Math.imul(U0,C0)|0,w=w+Math.imul(X0,D0)|0,p=p+Math.imul(X0,C0)|0,y=y+Math.imul(Z0,R0)|0,w=w+Math.imul(Z0,P0)|0,w=w+Math.imul(G0,R0)|0,p=p+Math.imul(G0,P0)|0,y=y+Math.imul($0,M0)|0,w=w+Math.imul($0,S0)|0,w=w+Math.imul(Q0,M0)|0,p=p+Math.imul(Q0,S0)|0,y=y+Math.imul(e,q0)|0,w=w+Math.imul(e,j0)|0,w=w+Math.imul(r,q0)|0,p=p+Math.imul(r,j0)|0,y=y+Math.imul(t,g0)|0,w=w+Math.imul(t,_0)|0,w=w+Math.imul(m,g0)|0,p=p+Math.imul(m,_0)|0,y=y+Math.imul(u,x0)|0,w=w+Math.imul(u,B0)|0,w=w+Math.imul(n,x0)|0,p=p+Math.imul(n,B0)|0,y=y+Math.imul(b,w0)|0,w=w+Math.imul(b,p0)|0,w=w+Math.imul(l,w0)|0,p=p+Math.imul(l,p0)|0,y=y+Math.imul(c,c0)|0,w=w+Math.imul(c,h0)|0,w=w+Math.imul(h,c0)|0,p=p+Math.imul(h,h0)|0;var r0=(B+y|0)+((w&8191)<<13)|0;B=(p+(w>>>13)|0)+(r0>>>26)|0,r0&=67108863,y=Math.imul(F0,W0),w=Math.imul(F0,E0),w=w+Math.imul(A0,W0)|0,p=Math.imul(A0,E0),y=y+Math.imul(I0,D0)|0,w=w+Math.imul(I0,C0)|0,w=w+Math.imul(O0,D0)|0,p=p+Math.imul(O0,C0)|0,y=y+Math.imul(U0,R0)|0,w=w+Math.imul(U0,P0)|0,w=w+Math.imul(X0,R0)|0,p=p+Math.imul(X0,P0)|0,y=y+Math.imul(Z0,M0)|0,w=w+Math.imul(Z0,S0)|0,w=w+Math.imul(G0,M0)|0,p=p+Math.imul(G0,S0)|0,y=y+Math.imul($0,q0)|0,w=w+Math.imul($0,j0)|0,w=w+Math.imul(Q0,q0)|0,p=p+Math.imul(Q0,j0)|0,y=y+Math.imul(e,g0)|0,w=w+Math.imul(e,_0)|0,w=w+Math.imul(r,g0)|0,p=p+Math.imul(r,_0)|0,y=y+Math.imul(t,x0)|0,w=w+Math.imul(t,B0)|0,w=w+Math.imul(m,x0)|0,p=p+Math.imul(m,B0)|0,y=y+Math.imul(u,w0)|0,w=w+Math.imul(u,p0)|0,w=w+Math.imul(n,w0)|0,p=p+Math.imul(n,p0)|0,y=y+Math.imul(b,c0)|0,w=w+Math.imul(b,h0)|0,w=w+Math.imul(l,c0)|0,p=p+Math.imul(l,h0)|0,y=y+Math.imul(c,b0)|0,w=w+Math.imul(c,l0)|0,w=w+Math.imul(h,b0)|0,p=p+Math.imul(h,l0)|0;var i0=(B+y|0)+((w&8191)<<13)|0;B=(p+(w>>>13)|0)+(i0>>>26)|0,i0&=67108863,y=Math.imul(F0,D0),w=Math.imul(F0,C0),w=w+Math.imul(A0,D0)|0,p=Math.imul(A0,C0),y=y+Math.imul(I0,R0)|0,w=w+Math.imul(I0,P0)|0,w=w+Math.imul(O0,R0)|0,p=p+Math.imul(O0,P0)|0,y=y+Math.imul(U0,M0)|0,w=w+Math.imul(U0,S0)|0,w=w+Math.imul(X0,M0)|0,p=p+Math.imul(X0,S0)|0,y=y+Math.imul(Z0,q0)|0,w=w+Math.imul(Z0,j0)|0,w=w+Math.imul(G0,q0)|0,p=p+Math.imul(G0,j0)|0,y=y+Math.imul($0,g0)|0,w=w+Math.imul($0,_0)|0,w=w+Math.imul(Q0,g0)|0,p=p+Math.imul(Q0,_0)|0,y=y+Math.imul(e,x0)|0,w=w+Math.imul(e,B0)|0,w=w+Math.imul(r,x0)|0,p=p+Math.imul(r,B0)|0,y=y+Math.imul(t,w0)|0,w=w+Math.imul(t,p0)|0,w=w+Math.imul(m,w0)|0,p=p+Math.imul(m,p0)|0,y=y+Math.imul(u,c0)|0,w=w+Math.imul(u,h0)|0,w=w+Math.imul(n,c0)|0,p=p+Math.imul(n,h0)|0,y=y+Math.imul(b,b0)|0,w=w+Math.imul(b,l0)|0,w=w+Math.imul(l,b0)|0,p=p+Math.imul(l,l0)|0;var $$=(B+y|0)+((w&8191)<<13)|0;B=(p+(w>>>13)|0)+($$>>>26)|0,$$&=67108863,y=Math.imul(F0,R0),w=Math.imul(F0,P0),w=w+Math.imul(A0,R0)|0,p=Math.imul(A0,P0),y=y+Math.imul(I0,M0)|0,w=w+Math.imul(I0,S0)|0,w=w+Math.imul(O0,M0)|0,p=p+Math.imul(O0,S0)|0,y=y+Math.imul(U0,q0)|0,w=w+Math.imul(U0,j0)|0,w=w+Math.imul(X0,q0)|0,p=p+Math.imul(X0,j0)|0,y=y+Math.imul(Z0,g0)|0,w=w+Math.imul(Z0,_0)|0,w=w+Math.imul(G0,g0)|0,p=p+Math.imul(G0,_0)|0,y=y+Math.imul($0,x0)|0,w=w+Math.imul($0,B0)|0,w=w+Math.imul(Q0,x0)|0,p=p+Math.imul(Q0,B0)|0,y=y+Math.imul(e,w0)|0,w=w+Math.imul(e,p0)|0,w=w+Math.imul(r,w0)|0,p=p+Math.imul(r,p0)|0,y=y+Math.imul(t,c0)|0,w=w+Math.imul(t,h0)|0,w=w+Math.imul(m,c0)|0,p=p+Math.imul(m,h0)|0,y=y+Math.imul(u,b0)|0,w=w+Math.imul(u,l0)|0,w=w+Math.imul(n,b0)|0,p=p+Math.imul(n,l0)|0;var Q$=(B+y|0)+((w&8191)<<13)|0;B=(p+(w>>>13)|0)+(Q$>>>26)|0,Q$&=67108863,y=Math.imul(F0,M0),w=Math.imul(F0,S0),w=w+Math.imul(A0,M0)|0,p=Math.imul(A0,S0),y=y+Math.imul(I0,q0)|0,w=w+Math.imul(I0,j0)|0,w=w+Math.imul(O0,q0)|0,p=p+Math.imul(O0,j0)|0,y=y+Math.imul(U0,g0)|0,w=w+Math.imul(U0,_0)|0,w=w+Math.imul(X0,g0)|0,p=p+Math.imul(X0,_0)|0,y=y+Math.imul(Z0,x0)|0,w=w+Math.imul(Z0,B0)|0,w=w+Math.imul(G0,x0)|0,p=p+Math.imul(G0,B0)|0,y=y+Math.imul($0,w0)|0,w=w+Math.imul($0,p0)|0,w=w+Math.imul(Q0,w0)|0,p=p+Math.imul(Q0,p0)|0,y=y+Math.imul(e,c0)|0,w=w+Math.imul(e,h0)|0,w=w+Math.imul(r,c0)|0,p=p+Math.imul(r,h0)|0,y=y+Math.imul(t,b0)|0,w=w+Math.imul(t,l0)|0,w=w+Math.imul(m,b0)|0,p=p+Math.imul(m,l0)|0;var Y$=(B+y|0)+((w&8191)<<13)|0;B=(p+(w>>>13)|0)+(Y$>>>26)|0,Y$&=67108863,y=Math.imul(F0,q0),w=Math.imul(F0,j0),w=w+Math.imul(A0,q0)|0,p=Math.imul(A0,j0),y=y+Math.imul(I0,g0)|0,w=w+Math.imul(I0,_0)|0,w=w+Math.imul(O0,g0)|0,p=p+Math.imul(O0,_0)|0,y=y+Math.imul(U0,x0)|0,w=w+Math.imul(U0,B0)|0,w=w+Math.imul(X0,x0)|0,p=p+Math.imul(X0,B0)|0,y=y+Math.imul(Z0,w0)|0,w=w+Math.imul(Z0,p0)|0,w=w+Math.imul(G0,w0)|0,p=p+Math.imul(G0,p0)|0,y=y+Math.imul($0,c0)|0,w=w+Math.imul($0,h0)|0,w=w+Math.imul(Q0,c0)|0,p=p+Math.imul(Q0,h0)|0,y=y+Math.imul(e,b0)|0,w=w+Math.imul(e,l0)|0,w=w+Math.imul(r,b0)|0,p=p+Math.imul(r,l0)|0;var Z$=(B+y|0)+((w&8191)<<13)|0;B=(p+(w>>>13)|0)+(Z$>>>26)|0,Z$&=67108863,y=Math.imul(F0,g0),w=Math.imul(F0,_0),w=w+Math.imul(A0,g0)|0,p=Math.imul(A0,_0),y=y+Math.imul(I0,x0)|0,w=w+Math.imul(I0,B0)|0,w=w+Math.imul(O0,x0)|0,p=p+Math.imul(O0,B0)|0,y=y+Math.imul(U0,w0)|0,w=w+Math.imul(U0,p0)|0,w=w+Math.imul(X0,w0)|0,p=p+Math.imul(X0,p0)|0,y=y+Math.imul(Z0,c0)|0,w=w+Math.imul(Z0,h0)|0,w=w+Math.imul(G0,c0)|0,p=p+Math.imul(G0,h0)|0,y=y+Math.imul($0,b0)|0,w=w+Math.imul($0,l0)|0,w=w+Math.imul(Q0,b0)|0,p=p+Math.imul(Q0,l0)|0;var G$=(B+y|0)+((w&8191)<<13)|0;B=(p+(w>>>13)|0)+(G$>>>26)|0,G$&=67108863,y=Math.imul(F0,x0),w=Math.imul(F0,B0),w=w+Math.imul(A0,x0)|0,p=Math.imul(A0,B0),y=y+Math.imul(I0,w0)|0,w=w+Math.imul(I0,p0)|0,w=w+Math.imul(O0,w0)|0,p=p+Math.imul(O0,p0)|0,y=y+Math.imul(U0,c0)|0,w=w+Math.imul(U0,h0)|0,w=w+Math.imul(X0,c0)|0,p=p+Math.imul(X0,h0)|0,y=y+Math.imul(Z0,b0)|0,w=w+Math.imul(Z0,l0)|0,w=w+Math.imul(G0,b0)|0,p=p+Math.imul(G0,l0)|0;var V$=(B+y|0)+((w&8191)<<13)|0;B=(p+(w>>>13)|0)+(V$>>>26)|0,V$&=67108863,y=Math.imul(F0,w0),w=Math.imul(F0,p0),w=w+Math.imul(A0,w0)|0,p=Math.imul(A0,p0),y=y+Math.imul(I0,c0)|0,w=w+Math.imul(I0,h0)|0,w=w+Math.imul(O0,c0)|0,p=p+Math.imul(O0,h0)|0,y=y+Math.imul(U0,b0)|0,w=w+Math.imul(U0,l0)|0,w=w+Math.imul(X0,b0)|0,p=p+Math.imul(X0,l0)|0;var U$=(B+y|0)+((w&8191)<<13)|0;B=(p+(w>>>13)|0)+(U$>>>26)|0,U$&=67108863,y=Math.imul(F0,c0),w=Math.imul(F0,h0),w=w+Math.imul(A0,c0)|0,p=Math.imul(A0,h0),y=y+Math.imul(I0,b0)|0,w=w+Math.imul(I0,l0)|0,w=w+Math.imul(O0,b0)|0,p=p+Math.imul(O0,l0)|0;var X$=(B+y|0)+((w&8191)<<13)|0;B=(p+(w>>>13)|0)+(X$>>>26)|0,X$&=67108863,y=Math.imul(F0,b0),w=Math.imul(F0,l0),w=w+Math.imul(A0,b0)|0,p=Math.imul(A0,l0);var K$=(B+y|0)+((w&8191)<<13)|0;return B=(p+(w>>>13)|0)+(K$>>>26)|0,K$&=67108863,x[0]=o0,x[1]=u0,x[2]=n0,x[3]=s0,x[4]=t0,x[5]=m0,x[6]=a0,x[7]=e0,x[8]=r0,x[9]=i0,x[10]=$$,x[11]=Q$,x[12]=Y$,x[13]=Z$,x[14]=G$,x[15]=V$,x[16]=U$,x[17]=X$,x[18]=K$,B!==0&&(x[19]=B,g.length++),g};Math.imul||(E=W);function T(j,k,g){g.negative=k.negative^j.negative,g.length=j.length+k.length;for(var _=0,N=0,x=0;x>>26)|0,N+=B>>>26,B&=67108863}g.words[x]=y,_=B,B=N}return _!==0?g.words[x]=_:g.length--,g.strip()}function D(j,k,g){var _=new C;return _.mulp(j,k,g)}U.prototype.mulTo=function(j,k){var g,_=this.length+j.length;return this.length===10&&j.length===10?g=E(this,j,k):_<63?g=W(this,j,k):_<1024?g=T(this,j,k):g=D(this,j,k),g};function C(j,k){this.x=j,this.y=k}C.prototype.makeRBT=function(j){for(var k=new Array(j),g=U.prototype._countBits(j)-1,_=0;_>=1;return _},C.prototype.permute=function(j,k,g,_,N,x){for(var B=0;B>>1)N++;return 1<>>13,g[2*x+1]=N&8191,N=N>>>13;for(x=2*k;x<_;++x)g[x]=0;G(N===0),G((N&-8192)===0)},C.prototype.stub=function(j){for(var k=new Array(j),g=0;g>=26,k+=_/67108864|0,k+=N>>>26,this.words[g]=N&67108863}return k!==0&&(this.words[g]=k,this.length++),this},U.prototype.muln=function(j){return this.clone().imuln(j)},U.prototype.sqr=function(){return this.mul(this)},U.prototype.isqr=function(){return this.imul(this.clone())},U.prototype.pow=function(j){var k=H(j);if(k.length===0)return new U(1);for(var g=this,_=0;_=0);var k=j%26,g=(j-k)/26,_=67108863>>>26-k<<26-k,N;if(k!==0){var x=0;for(N=0;N>>26-k}x&&(this.words[N]=x,this.length++)}if(g!==0){for(N=this.length-1;N>=0;N--)this.words[N+g]=this.words[N];for(N=0;N=0);var _;k?_=(k-k%26)/26:_=0;var N=j%26,x=Math.min((j-N)/26,this.length),B=67108863^67108863>>>N<x)for(this.length-=x,w=0;w=0&&(p!==0||w>=_);w--){var f=this.words[w]|0;this.words[w]=p<<26-N|f>>>N,p=f&B}return y&&p!==0&&(y.words[y.length++]=p),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},U.prototype.ishrn=function(j,k,g){return G(this.negative===0),this.iushrn(j,k,g)},U.prototype.shln=function(j){return this.clone().ishln(j)},U.prototype.ushln=function(j){return this.clone().iushln(j)},U.prototype.shrn=function(j){return this.clone().ishrn(j)},U.prototype.ushrn=function(j){return this.clone().iushrn(j)},U.prototype.testn=function(j){G(typeof j=="number"&&j>=0);var k=j%26,g=(j-k)/26,_=1<=0);var k=j%26,g=(j-k)/26;if(G(this.negative===0,"imaskn works only with positive numbers"),this.length<=g)return this;if(k!==0&&g++,this.length=Math.min(g,this.length),k!==0){var _=67108863^67108863>>>k<=67108864;k++)this.words[k]-=67108864,k===this.length-1?this.words[k+1]=1:this.words[k+1]++;return this.length=Math.max(this.length,k+1),this},U.prototype.isubn=function(j){if(G(typeof j=="number"),G(j<67108864),j<0)return this.iaddn(-j);if(this.negative!==0)return this.negative=0,this.iaddn(j),this.negative=1,this;if(this.words[0]-=j,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var k=0;k>26)-(y/67108864|0),this.words[N+g]=x&67108863}for(;N>26,this.words[N+g]=x&67108863;if(B===0)return this.strip();for(G(B===-1),B=0,N=0;N>26,this.words[N]=x&67108863;return this.negative=1,this.strip()},U.prototype._wordDiv=function(j,k){var g=this.length-j.length,_=this.clone(),N=j,x=N.words[N.length-1]|0,B=this._countBits(x);g=26-B,g!==0&&(N=N.ushln(g),_.iushln(g),x=N.words[N.length-1]|0);var y=_.length-N.length,w;if(k!=="mod"){w=new U(null),w.length=y+1,w.words=new Array(w.length);for(var p=0;p=0;c--){var h=(_.words[N.length+c]|0)*67108864+(_.words[N.length+c-1]|0);for(h=Math.min(h/x|0,67108863),_._ishlnsubmul(N,h,c);_.negative!==0;)h--,_.negative=0,_._ishlnsubmul(N,1,c),_.isZero()||(_.negative^=1);w&&(w.words[c]=h)}return w&&w.strip(),_.strip(),k!=="div"&&g!==0&&_.iushrn(g),{div:w||null,mod:_}},U.prototype.divmod=function(j,k,g){if(G(!j.isZero()),this.isZero())return{div:new U(0),mod:new U(0)};var _,N,x;return this.negative!==0&&j.negative===0?(x=this.neg().divmod(j,k),k!=="mod"&&(_=x.div.neg()),k!=="div"&&(N=x.mod.neg(),g&&N.negative!==0&&N.iadd(j)),{div:_,mod:N}):this.negative===0&&j.negative!==0?(x=this.divmod(j.neg(),k),k!=="mod"&&(_=x.div.neg()),{div:_,mod:x.mod}):(this.negative&j.negative)!==0?(x=this.neg().divmod(j.neg(),k),k!=="div"&&(N=x.mod.neg(),g&&N.negative!==0&&N.isub(j)),{div:x.div,mod:N}):j.length>this.length||this.cmp(j)<0?{div:new U(0),mod:this}:j.length===1?k==="div"?{div:this.divn(j.words[0]),mod:null}:k==="mod"?{div:null,mod:new U(this.modn(j.words[0]))}:{div:this.divn(j.words[0]),mod:new U(this.modn(j.words[0]))}:this._wordDiv(j,k)},U.prototype.div=function(j){return this.divmod(j,"div",!1).div},U.prototype.mod=function(j){return this.divmod(j,"mod",!1).mod},U.prototype.umod=function(j){return this.divmod(j,"mod",!0).mod},U.prototype.divRound=function(j){var k=this.divmod(j);if(k.mod.isZero())return k.div;var g=k.div.negative!==0?k.mod.isub(j):k.mod,_=j.ushrn(1),N=j.andln(1),x=g.cmp(_);return x<0||N===1&&x===0?k.div:k.div.negative!==0?k.div.isubn(1):k.div.iaddn(1)},U.prototype.modn=function(j){G(j<=67108863);for(var k=(1<<26)%j,g=0,_=this.length-1;_>=0;_--)g=(k*g+(this.words[_]|0))%j;return g},U.prototype.idivn=function(j){G(j<=67108863);for(var k=0,g=this.length-1;g>=0;g--){var _=(this.words[g]|0)+k*67108864;this.words[g]=_/j|0,k=_%j}return this.strip()},U.prototype.divn=function(j){return this.clone().idivn(j)},U.prototype.egcd=function(j){G(j.negative===0),G(!j.isZero());var k=this,g=j.clone();k.negative!==0?k=k.umod(j):k=k.clone();for(var _=new U(1),N=new U(0),x=new U(0),B=new U(1),y=0;k.isEven()&&g.isEven();)k.iushrn(1),g.iushrn(1),++y;for(var w=g.clone(),p=k.clone();!k.isZero();){for(var f=0,c=1;(k.words[0]&c)===0&&f<26;++f,c<<=1);if(f>0)for(k.iushrn(f);f-- >0;)(_.isOdd()||N.isOdd())&&(_.iadd(w),N.isub(p)),_.iushrn(1),N.iushrn(1);for(var h=0,d=1;(g.words[0]&d)===0&&h<26;++h,d<<=1);if(h>0)for(g.iushrn(h);h-- >0;)(x.isOdd()||B.isOdd())&&(x.iadd(w),B.isub(p)),x.iushrn(1),B.iushrn(1);k.cmp(g)>=0?(k.isub(g),_.isub(x),N.isub(B)):(g.isub(k),x.isub(_),B.isub(N))}return{a:x,b:B,gcd:g.iushln(y)}},U.prototype._invmp=function(j){G(j.negative===0),G(!j.isZero());var k=this,g=j.clone();k.negative!==0?k=k.umod(j):k=k.clone();for(var _=new U(1),N=new U(0),x=g.clone();k.cmpn(1)>0&&g.cmpn(1)>0;){for(var B=0,y=1;(k.words[0]&y)===0&&B<26;++B,y<<=1);if(B>0)for(k.iushrn(B);B-- >0;)_.isOdd()&&_.iadd(x),_.iushrn(1);for(var w=0,p=1;(g.words[0]&p)===0&&w<26;++w,p<<=1);if(w>0)for(g.iushrn(w);w-- >0;)N.isOdd()&&N.iadd(x),N.iushrn(1);k.cmp(g)>=0?(k.isub(g),_.isub(N)):(g.isub(k),N.isub(_))}var f;return k.cmpn(1)===0?f=_:f=N,f.cmpn(0)<0&&f.iadd(j),f},U.prototype.gcd=function(j){if(this.isZero())return j.abs();if(j.isZero())return this.abs();var k=this.clone(),g=j.clone();k.negative=0,g.negative=0;for(var _=0;k.isEven()&&g.isEven();_++)k.iushrn(1),g.iushrn(1);do{for(;k.isEven();)k.iushrn(1);for(;g.isEven();)g.iushrn(1);var N=k.cmp(g);if(N<0){var x=k;k=g,g=x}else if(N===0||g.cmpn(1)===0)break;k.isub(g)}while(!0);return g.iushln(_)},U.prototype.invm=function(j){return this.egcd(j).a.umod(j)},U.prototype.isEven=function(){return(this.words[0]&1)===0},U.prototype.isOdd=function(){return(this.words[0]&1)===1},U.prototype.andln=function(j){return this.words[0]&j},U.prototype.bincn=function(j){G(typeof j=="number");var k=j%26,g=(j-k)/26,_=1<>>26,B&=67108863,this.words[x]=B}return N!==0&&(this.words[x]=N,this.length++),this},U.prototype.isZero=function(){return this.length===1&&this.words[0]===0},U.prototype.cmpn=function(j){var k=j<0;if(this.negative!==0&&!k)return-1;if(this.negative===0&&k)return 1;this.strip();var g;if(this.length>1)g=1;else{k&&(j=-j),G(j<=67108863,"Number is too big");var _=this.words[0]|0;g=_===j?0:_j.length)return 1;if(this.length=0;g--){var _=this.words[g]|0,N=j.words[g]|0;if(_!==N){_N&&(k=1);break}}return k},U.prototype.gtn=function(j){return this.cmpn(j)===1},U.prototype.gt=function(j){return this.cmp(j)===1},U.prototype.gten=function(j){return this.cmpn(j)>=0},U.prototype.gte=function(j){return this.cmp(j)>=0},U.prototype.ltn=function(j){return this.cmpn(j)===-1},U.prototype.lt=function(j){return this.cmp(j)===-1},U.prototype.lten=function(j){return this.cmpn(j)<=0},U.prototype.lte=function(j){return this.cmp(j)<=0},U.prototype.eqn=function(j){return this.cmpn(j)===0},U.prototype.eq=function(j){return this.cmp(j)===0},U.red=function(j){return new v(j)},U.prototype.toRed=function(j){return G(!this.red,"Already a number in reduction context"),G(this.negative===0,"red works only with positives"),j.convertTo(this)._forceRed(j)},U.prototype.fromRed=function(){return G(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},U.prototype._forceRed=function(j){return this.red=j,this},U.prototype.forceRed=function(j){return G(!this.red,"Already a number in reduction context"),this._forceRed(j)},U.prototype.redAdd=function(j){return G(this.red,"redAdd works only with red numbers"),this.red.add(this,j)},U.prototype.redIAdd=function(j){return G(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,j)},U.prototype.redSub=function(j){return G(this.red,"redSub works only with red numbers"),this.red.sub(this,j)},U.prototype.redISub=function(j){return G(this.red,"redISub works only with red numbers"),this.red.isub(this,j)},U.prototype.redShl=function(j){return G(this.red,"redShl works only with red numbers"),this.red.shl(this,j)},U.prototype.redMul=function(j){return G(this.red,"redMul works only with red numbers"),this.red._verify2(this,j),this.red.mul(this,j)},U.prototype.redIMul=function(j){return G(this.red,"redMul works only with red numbers"),this.red._verify2(this,j),this.red.imul(this,j)},U.prototype.redSqr=function(){return G(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},U.prototype.redISqr=function(){return G(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},U.prototype.redSqrt=function(){return G(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},U.prototype.redInvm=function(){return G(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},U.prototype.redNeg=function(){return G(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},U.prototype.redPow=function(j){return G(this.red&&!j.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,j)};var L={k256:null,p224:null,p192:null,p25519:null};function R(j,k){this.name=j,this.p=new U(k,16),this.n=this.p.bitLength(),this.k=new U(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}R.prototype._tmp=function(){var j=new U(null);return j.words=new Array(Math.ceil(this.n/13)),j},R.prototype.ireduce=function(j){var k=j,g;do this.split(k,this.tmp),k=this.imulK(k),k=k.iadd(this.tmp),g=k.bitLength();while(g>this.n);var _=g0?k.isub(this.p):k.strip!==void 0?k.strip():k._strip(),k},R.prototype.split=function(j,k){j.iushrn(this.n,0,k)},R.prototype.imulK=function(j){return j.imul(this.k)};function P(){R.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}V(P,R),P.prototype.split=function(j,k){for(var g=4194303,_=Math.min(j.length,9),N=0;N<_;N++)k.words[N]=j.words[N];if(k.length=_,j.length<=9){j.words[0]=0,j.length=1;return}var x=j.words[9];for(k.words[k.length++]=x&g,N=10;N>>22,x=B}x>>>=22,j.words[N-10]=x,x===0&&j.length>10?j.length-=10:j.length-=9},P.prototype.imulK=function(j){j.words[j.length]=0,j.words[j.length+1]=0,j.length+=2;for(var k=0,g=0;g>>=26,j.words[g]=N,k=_}return k!==0&&(j.words[j.length++]=k),j},U._prime=function(j){if(L[j])return L[j];var k;if(j==="k256")k=new P;else if(j==="p224")k=new z;else if(j==="p192")k=new M;else if(j==="p25519")k=new S;else throw new Error("Unknown prime "+j);return L[j]=k,k};function v(j){if(typeof j=="string"){var k=U._prime(j);this.m=k.p,this.prime=k}else G(j.gtn(1),"modulus must be greater than 1"),this.m=j,this.prime=null}v.prototype._verify1=function(j){G(j.negative===0,"red works only with positives"),G(j.red,"red works only with red numbers")},v.prototype._verify2=function(j,k){G((j.negative|k.negative)===0,"red works only with positives"),G(j.red&&j.red===k.red,"red works only with red numbers")},v.prototype.imod=function(j){return this.prime?this.prime.ireduce(j)._forceRed(this):j.umod(this.m)._forceRed(this)},v.prototype.neg=function(j){return j.isZero()?j.clone():this.m.sub(j)._forceRed(this)},v.prototype.add=function(j,k){this._verify2(j,k);var g=j.add(k);return g.cmp(this.m)>=0&&g.isub(this.m),g._forceRed(this)},v.prototype.iadd=function(j,k){this._verify2(j,k);var g=j.iadd(k);return g.cmp(this.m)>=0&&g.isub(this.m),g},v.prototype.sub=function(j,k){this._verify2(j,k);var g=j.sub(k);return g.cmpn(0)<0&&g.iadd(this.m),g._forceRed(this)},v.prototype.isub=function(j,k){this._verify2(j,k);var g=j.isub(k);return g.cmpn(0)<0&&g.iadd(this.m),g},v.prototype.shl=function(j,k){return this._verify1(j),this.imod(j.ushln(k))},v.prototype.imul=function(j,k){return this._verify2(j,k),this.imod(j.imul(k))},v.prototype.mul=function(j,k){return this._verify2(j,k),this.imod(j.mul(k))},v.prototype.isqr=function(j){return this.imul(j,j.clone())},v.prototype.sqr=function(j){return this.mul(j,j)},v.prototype.sqrt=function(j){if(j.isZero())return j.clone();var k=this.m.andln(3);if(G(k%2===1),k===3){var g=this.m.add(new U(1)).iushrn(2);return this.pow(j,g)}for(var _=this.m.subn(1),N=0;!_.isZero()&&_.andln(1)===0;)N++,_.iushrn(1);G(!_.isZero());var x=new U(1).toRed(this),B=x.redNeg(),y=this.m.subn(1).iushrn(1),w=this.m.bitLength();for(w=new U(2*w*w).toRed(this);this.pow(w,y).cmp(B)!==0;)w.redIAdd(B);for(var p=this.pow(w,_),f=this.pow(j,_.addn(1).iushrn(1)),c=this.pow(j,_),h=N;c.cmp(x)!==0;){for(var d=c,b=0;d.cmp(x)!==0;b++)d=d.redSqr();G(b=0;N--){for(var p=k.words[N],f=w-1;f>=0;f--){var c=p>>f&1;if(x!==_[0]&&(x=this.sqr(x)),c===0&&B===0){y=0;continue}B<<=1,B|=c,y++,!(y!==g&&(N!==0||f!==0))&&(x=this.mul(x,_[B]),y=0,B=0)}w=26}return x},v.prototype.convertTo=function(j){var k=j.umod(this.m);return k===j?k.clone():k},v.prototype.convertFrom=function(j){var k=j.clone();return k.red=null,k},U.mont=function(j){return new q(j)};function q(j){v.call(this,j),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new U(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}V(q,v),q.prototype.convertTo=function(j){return this.imod(j.ushln(this.shift))},q.prototype.convertFrom=function(j){var k=this.imod(j.mul(this.rinv));return k.red=null,k},q.prototype.imul=function(j,k){if(j.isZero()||k.isZero())return j.words[0]=0,j.length=1,j;var g=j.imul(k),_=g.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),N=g.isub(_).iushrn(this.shift),x=N;return N.cmp(this.m)>=0?x=N.isub(this.m):N.cmpn(0)<0&&(x=N.iadd(this.m)),x._forceRed(this)},q.prototype.mul=function(j,k){if(j.isZero()||k.isZero())return new U(0)._forceRed(this);var g=j.mul(k),_=g.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),N=g.isub(_).iushrn(this.shift),x=N;return N.cmp(this.m)>=0?x=N.isub(this.m):N.cmpn(0)<0&&(x=N.iadd(this.m)),x._forceRed(this)},q.prototype.invm=function(j){var k=this.imod(j._invmp(this.m).mul(this.r2));return k._forceRed(this)}})(typeof Q>"u"||Q,$)}}),{CryptoHasher:sY}=globalThis.Bun,tY=q$({"node_modules/public-encrypt/withPublic.js"($,Q){var Y=nY(),Z=k$().Buffer;function G(V,U){return Z.from(V.toRed(Y.mont(U.modulus)).redPow(new Y(U.publicExponent)).fromRed().toArray())}Q.exports=G}}),mY=q$({"node_modules/public-encrypt/publicEncrypt.js"($,Q){var Y=pY(),Z=g$(),G=o$(),V=oY(),U=uY(),X=nY(),K=tY(),I=hQ(),O=k$().Buffer;Q.exports=function(H,W,E){var T;H.padding?T=H.padding:E?T=1:T=4;var D=Y(H),C;if(T===4)C=J(D,W);else if(T===1)C=F(D,W,E);else if(T===3){if(C=new X(W),C.cmp(D.modulus)>=0)throw new Error("data too long for modulus")}else throw new Error("unknown padding");return E?I(C,D):K(C,D)};function J(H,W){var E=H.modulus.byteLength(),T=W.length,D=G("sha1").update(O.alloc(0)).digest(),C=D.length,L=2*C;if(T>E-L-2)throw new Error("message too long");var R=O.alloc(E-T-L-2),P=E-C-1,z=Z(C),M=U(O.concat([D,R,O.alloc(1,1),W],P),V(z,P)),S=U(z,V(M,C));return new X(O.concat([O.alloc(1),S,M],E))}function F(H,W,E){var T=W.length,D=H.modulus.byteLength();if(T>D-11)throw new Error("message too long");var C;return E?C=O.alloc(D-T-3,255):C=A(D-T-3),new X(O.concat([O.from([0,E?1:2]),C,O.alloc(1),W],D))}function A(H){for(var W=O.allocUnsafe(H),E=0,T=Z(H*2),D=0,C;ED||new V(H).cmp(T.modulus)>=0)throw new Error("decryption error");var C;W?C=K(new V(H),T):C=U(H,T);var L=I.alloc(D-C.length);if(C=I.concat([L,C],D),E===4)return O(T,C);if(E===1)return J(T,C,W);if(E===3)return C;throw new Error("unknown padding")};function O(A,H){var W=A.modulus.byteLength(),E=X("sha1").update(I.alloc(0)).digest(),T=E.length;if(H[0]!==0)throw new Error("decryption error");var D=H.slice(1,T+1),C=H.slice(T+1),L=G(D,Z(C,T)),R=G(C,Z(L,W-T-1));if(F(E,R.slice(0,T)))throw new Error("decryption error");for(var P=T;R[P]===0;)P++;if(R[P++]!==1)throw new Error("decryption error");return R.slice(P)}function J(A,H,W){for(var E=H.slice(0,2),T=2,D=0;H[T++]!==0;)if(T>=H.length){D++;break}var C=H.slice(2,T-1);if((E.toString("hex")!=="0002"&&!W||E.toString("hex")!=="0001"&&W)&&D++,C.length<8&&D++,D)throw new Error("decryption error");return H.slice(T)}function F(A,H){A=I.from(A),H=I.from(H);var W=0,E=A.length;A.length!==H.length&&(W++,E=Math.min(A.length,H.length));for(var T=-1;++TV||J<0)throw new TypeError("offset must be a uint32");if(J>G||J>F)throw new RangeError("offset out of range")}function X(J,F,A){if(typeof J!="number"||J!==J)throw new TypeError("size must be a number");if(J>V||J<0)throw new TypeError("size must be a uint32");if(J+F>A||J>G)throw new RangeError("buffer too small")}$.randomFill=K,$.randomFillSync=O;function K(J,F,A,H){if(!Z.isBuffer(J)&&!(J instanceof global.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if(typeof F=="function")H=F,F=0,A=J.length;else if(typeof A=="function")H=A,A=J.length-F;else if(typeof H!="function")throw new TypeError('"cb" argument must be a function');return U(F,J.length),X(A,F,J.length),I(J,F,A,H)}function I(J,F,A,H){if(H){Y(A,function(E,T){if(E)return H(E);T.copy(J,F),H(null,J)});return}var W=Y(A);return W.copy(J,F),J}function O(J,F,A){if(typeof F>"u"&&(F=0),!Z.isBuffer(J)&&!(J instanceof global.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');return U(F,J.length),A===void 0&&(A=J.length-F),X(A,F,J.length),I(J,F,A)}}}),iY=q$({"node_modules/crypto-browserify/index.js"($){$.randomBytes=$.rng=$.pseudoRandomBytes=$.prng=g$(),$.createHash=o$(),$.Hash=$.createHash.Hash,$.createHmac=$.Hmac=s$();var Q=m$(),Y=Object.keys(Q),Z=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(Y);$.getHashes=function(){return Z};var G=QQ();$.pbkdf2=G.pbkdf2,$.pbkdf2Sync=G.pbkdf2Sync;var V=kQ();$.Cipher=V.Cipher,$.createCipher=V.createCipher,$.Cipheriv=V.Cipheriv,$.createCipheriv=V.createCipheriv,$.Decipher=V.Decipher,$.createDecipher=V.createDecipher,$.Decipheriv=V.Decipheriv,$.createDecipheriv=V.createDecipheriv,$.getCiphers=V.getCiphers,$.listCiphers=V.listCiphers;var U=fQ();$.DiffieHellmanGroup=U.DiffieHellmanGroup,$.createDiffieHellmanGroup=U.createDiffieHellmanGroup,$.getDiffieHellman=U.getDiffieHellman,$.createDiffieHellman=U.createDiffieHellman,$.DiffieHellman=U.DiffieHellman;var X=dY();$.createSign=X.createSign,$.Sign=X.Sign,$.createVerify=X.createVerify,$.Verify=X.Verify,$.createECDH=lY();var K=eY();$.publicEncrypt=K.publicEncrypt,$.privateEncrypt=K.privateEncrypt,$.publicDecrypt=K.publicDecrypt,$.privateDecrypt=K.privateDecrypt,$.getRandomValues=(O)=>H$.getRandomValues(O);var I=rY();$.randomFill=I.randomFill,$.randomFillSync=I.randomFillSync,$.createCredentials=function(){throw new Error(["sorry, createCredentials is not implemented yet","we accept pull requests","https://github.com/crypto-browserify/crypto-browserify"].join(` -`))},$.constants={DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,ALPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6}}}),$Z={...iY(),[Symbol.for("CommonJS")]:0},T$="buffer",QZ=($)=>H$.getRandomValues($),YZ=()=>H$.randomUUID(),D$="timingSafeEqual"in H$?($,Q)=>{let{byteLength:Y}=$,{byteLength:Z}=Q;if(typeof Y!="number"||typeof Z!="number")throw new TypeError("Input must be an array buffer view");if(Y!==Z)throw new RangeError("Input buffers must have the same length");return H$.timingSafeEqual($,Q)}:void 0,ZZ="scryptSync"in H$?($,Q,Y,Z)=>{let G=H$.scryptSync($,Q,Y,Z);return T$!=="buffer"?new F$(G).toString(T$):new F$(G)}:void 0,GZ="scryptSync"in H$?function($,Q,Y,Z,G){if(typeof Z=="function"&&(G=Z,Z=void 0),typeof G!="function"){var V=new TypeError("callback must be a function");throw V.code="ERR_INVALID_CALLBACK",V}try{let U=H$.scryptSync($,Q,Y,Z);process.nextTick(G,null,T$!=="buffer"?new F$(U).toString(T$):new F$(U))}catch(U){throw U}}:void 0;D$&&(Object.defineProperty(D$,"name",{value:"::bunternal::"}),Object.defineProperty(GZ,"name",{value:"::bunternal::"}),Object.defineProperty(ZZ,"name",{value:"::bunternal::"}));var C$=H$;j$($Z,{DEFAULT_ENCODING:()=>T$,getRandomValues:()=>QZ,randomUUID:()=>YZ,scrypt:()=>GZ,scryptSync:()=>ZZ,timingSafeEqual:()=>D$,webcrypto:()=>C$,subtle:()=>C$.subtle});var{randomBytes:VZ,rng:UZ,pseudoRandomBytes:XZ,prng:KZ,Hash:IZ,createHash:OZ,createHmac:JZ,Hmac:FZ,getHashes:AZ,pbkdf2:HZ,pbkdf2Sync:WZ,Cipher:EZ,createCipher:TZ,Cipheriv:DZ,createCipheriv:CZ,Decipher:LZ,createDecipher:RZ,Decipheriv:PZ,createDecipheriv:zZ,getCiphers:MZ,listCiphers:SZ,DiffieHellmanGroup:vZ,createDiffieHellmanGroup:qZ,getDiffieHellman:jZ,createDiffieHellman:kZ,DiffieHellman:gZ,createSign:_Z,Sign:NZ,createVerify:xZ,Verify:BZ,createECDH:yZ,publicEncrypt:wZ,privateEncrypt:pZ,publicDecrypt:fZ,privateDecrypt:cZ,randomFill:hZ,randomFillSync:dZ,createCredentials:bZ,constants:lZ}=$Z;var uZ=$Z;/*! safe-buffer. MIT License. Feross Aboukhadijeh */export{C$ as webcrypto,D$ as timingSafeEqual,ZZ as scryptSync,GZ as scrypt,UZ as rng,YZ as randomUUID,dZ as randomFillSync,hZ as randomFill,VZ as randomBytes,wZ as publicEncrypt,fZ as publicDecrypt,XZ as pseudoRandomBytes,KZ as prng,pZ as privateEncrypt,cZ as privateDecrypt,WZ as pbkdf2Sync,HZ as pbkdf2,SZ as listCiphers,QZ as getRandomValues,AZ as getHashes,jZ as getDiffieHellman,MZ as getCiphers,uZ as default,xZ as createVerify,_Z as createSign,JZ as createHmac,OZ as createHash,yZ as createECDH,qZ as createDiffieHellmanGroup,kZ as createDiffieHellman,zZ as createDecipheriv,RZ as createDecipher,bZ as createCredentials,CZ as createCipheriv,TZ as createCipher,lZ as constants,BZ as Verify,NZ as Sign,FZ as Hmac,IZ as Hash,vZ as DiffieHellmanGroup,gZ as DiffieHellman,PZ as Decipheriv,LZ as Decipher,T$ as DEFAULT_ENCODING,DZ as Cipheriv,EZ as Cipher}; +import{StringDecoder as a$} from"node:string_decoder";import*as e$ from"node:buffer";import*as h$ from"node:stream";var s$=Object.defineProperty;var t$=Object.getOwnPropertyNames;var r$=536870888,c$=globalThis.Buffer,d$=globalThis.crypto,i$=d$;var $Q=(X,K)=>function(){return K||(0,X[t$(X)[0]])((K={exports:{}}).exports,K),K.exports},QQ=(X,K)=>{for(var x0 in K)s$(X,x0,{get:K[x0],enumerable:!0})};var YQ=$Q({"node_modules/safe-buffer/index.js"(X,K){var x0=e$,G=x0.Buffer;function Y(Z,Q){for(var U in Z)Q[U]=Z[U]}G.from&&G.alloc&&G.allocUnsafe&&G.allocUnsafeSlow?K.exports=x0:(Y(x0,X),X.Buffer=$);function $(Z,Q,U){return G(Z,Q,U)}$.prototype=Object.create(G.prototype),Y(G,$),$.from=function(Z,Q,U){if(typeof Z=="number")throw new TypeError("Argument must not be a number");return G(Z,Q,U)},$.alloc=function(Z,Q,U){if(typeof Z!="number")throw new TypeError("Argument must be a number");var V=G(Z);return Q!==void 0?typeof U=="string"?V.fill(Q,U):V.fill(Q):V.fill(0),V},$.allocUnsafe=function(Z){if(typeof Z!="number")throw new TypeError("Argument must be a number");return G(Z)},$.allocUnsafeSlow=function(Z){if(typeof Z!="number")throw new TypeError("Argument must be a number");return x0.SlowBuffer(Z)}}}),ZQ=$Q({"node_modules/randombytes/browser.js"(X,K){var x0=65536,G=4294967295;function Y(){throw new Error(`Secure random number generation is not supported by this browser. +Use Chrome, Firefox or Internet Explorer 11`)}var $=YQ().Buffer,Z=i$;Z&&Z.getRandomValues?K.exports=Q:K.exports=Y;function Q(U,V){if(U>G)throw new RangeError("requested too many random bytes");var B0=$.allocUnsafe(U);if(U>0)if(U>x0)for(var H=0;H=this._blockSize;){for(var B0=this._blockOffset;B00;++H)this._length[H]+=y0,y0=this._length[H]/4294967296|0,y0>0&&(this._length[H]-=4294967296*y0);return this},$.prototype._update=function(){throw new Error("_update is not implemented")},$.prototype.digest=function(Z){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var Q=this._digest();Z!==void 0&&(Q=Q.toString(Z)),this._block.fill(0),this._blockOffset=0;for(var U=0;U<4;++U)this._length[U]=0;return Q},$.prototype._digest=function(){throw new Error("_digest is not implemented")},K.exports=$}}),I0=$Q({"node_modules/md5.js/index.js"(X,K){var x0=X0(),G=K0(),Y=YQ().Buffer,$=new Array(16);function Z(){G.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}x0(Z,G),Z.prototype._update=function(){for(var y0=$,W=0;W<16;++W)y0[W]=this._block.readInt32LE(W*4);var w0=this._a,E=this._b,p0=this._c,T=this._d;w0=U(w0,E,p0,T,y0[0],3614090360,7),T=U(T,w0,E,p0,y0[1],3905402710,12),p0=U(p0,T,w0,E,y0[2],606105819,17),E=U(E,p0,T,w0,y0[3],3250441966,22),w0=U(w0,E,p0,T,y0[4],4118548399,7),T=U(T,w0,E,p0,y0[5],1200080426,12),p0=U(p0,T,w0,E,y0[6],2821735955,17),E=U(E,p0,T,w0,y0[7],4249261313,22),w0=U(w0,E,p0,T,y0[8],1770035416,7),T=U(T,w0,E,p0,y0[9],2336552879,12),p0=U(p0,T,w0,E,y0[10],4294925233,17),E=U(E,p0,T,w0,y0[11],2304563134,22),w0=U(w0,E,p0,T,y0[12],1804603682,7),T=U(T,w0,E,p0,y0[13],4254626195,12),p0=U(p0,T,w0,E,y0[14],2792965006,17),E=U(E,p0,T,w0,y0[15],1236535329,22),w0=V(w0,E,p0,T,y0[1],4129170786,5),T=V(T,w0,E,p0,y0[6],3225465664,9),p0=V(p0,T,w0,E,y0[11],643717713,14),E=V(E,p0,T,w0,y0[0],3921069994,20),w0=V(w0,E,p0,T,y0[5],3593408605,5),T=V(T,w0,E,p0,y0[10],38016083,9),p0=V(p0,T,w0,E,y0[15],3634488961,14),E=V(E,p0,T,w0,y0[4],3889429448,20),w0=V(w0,E,p0,T,y0[9],568446438,5),T=V(T,w0,E,p0,y0[14],3275163606,9),p0=V(p0,T,w0,E,y0[3],4107603335,14),E=V(E,p0,T,w0,y0[8],1163531501,20),w0=V(w0,E,p0,T,y0[13],2850285829,5),T=V(T,w0,E,p0,y0[2],4243563512,9),p0=V(p0,T,w0,E,y0[7],1735328473,14),E=V(E,p0,T,w0,y0[12],2368359562,20),w0=B0(w0,E,p0,T,y0[5],4294588738,4),T=B0(T,w0,E,p0,y0[8],2272392833,11),p0=B0(p0,T,w0,E,y0[11],1839030562,16),E=B0(E,p0,T,w0,y0[14],4259657740,23),w0=B0(w0,E,p0,T,y0[1],2763975236,4),T=B0(T,w0,E,p0,y0[4],1272893353,11),p0=B0(p0,T,w0,E,y0[7],4139469664,16),E=B0(E,p0,T,w0,y0[10],3200236656,23),w0=B0(w0,E,p0,T,y0[13],681279174,4),T=B0(T,w0,E,p0,y0[0],3936430074,11),p0=B0(p0,T,w0,E,y0[3],3572445317,16),E=B0(E,p0,T,w0,y0[6],76029189,23),w0=B0(w0,E,p0,T,y0[9],3654602809,4),T=B0(T,w0,E,p0,y0[12],3873151461,11),p0=B0(p0,T,w0,E,y0[15],530742520,16),E=B0(E,p0,T,w0,y0[2],3299628645,23),w0=H(w0,E,p0,T,y0[0],4096336452,6),T=H(T,w0,E,p0,y0[7],1126891415,10),p0=H(p0,T,w0,E,y0[14],2878612391,15),E=H(E,p0,T,w0,y0[5],4237533241,21),w0=H(w0,E,p0,T,y0[12],1700485571,6),T=H(T,w0,E,p0,y0[3],2399980690,10),p0=H(p0,T,w0,E,y0[10],4293915773,15),E=H(E,p0,T,w0,y0[1],2240044497,21),w0=H(w0,E,p0,T,y0[8],1873313359,6),T=H(T,w0,E,p0,y0[15],4264355552,10),p0=H(p0,T,w0,E,y0[6],2734768916,15),E=H(E,p0,T,w0,y0[13],1309151649,21),w0=H(w0,E,p0,T,y0[4],4149444226,6),T=H(T,w0,E,p0,y0[11],3174756917,10),p0=H(p0,T,w0,E,y0[2],718787259,15),E=H(E,p0,T,w0,y0[9],3951481745,21),this._a=this._a+w0|0,this._b=this._b+E|0,this._c=this._c+p0|0,this._d=this._d+T|0},Z.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var y0=Y.allocUnsafe(16);return y0.writeInt32LE(this._a,0),y0.writeInt32LE(this._b,4),y0.writeInt32LE(this._c,8),y0.writeInt32LE(this._d,12),y0};function Q(y0,W){return y0<>>32-W}function U(y0,W,w0,E,p0,T,f0){return Q(y0+(W&w0|~W&E)+p0+T|0,f0)+W|0}function V(y0,W,w0,E,p0,T,f0){return Q(y0+(W&E|w0&~E)+p0+T|0,f0)+W|0}function B0(y0,W,w0,E,p0,T,f0){return Q(y0+(W^w0^E)+p0+T|0,f0)+W|0}function H(y0,W,w0,E,p0,T,f0){return Q(y0+(w0^(W|~E))+p0+T|0,f0)+W|0}K.exports=Z}}),O0=$Q({"node_modules/ripemd160/index.js"(X,K){var x0=c$,G=X0(),Y=K0(),$=new Array(16),Z=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],Q=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],U=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],V=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],B0=[0,1518500249,1859775393,2400959708,2840853838],H=[1352829926,1548603684,1836072691,2053994217,0];function y0(){Y.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}G(y0,Y),y0.prototype._update=function(){for(var D=$,c0=0;c0<16;++c0)D[c0]=this._block.readInt32LE(c0*4);for(var C=this._a|0,h0=this._b|0,L=this._c|0,d0=this._d|0,R=this._e|0,b0=this._a|0,P=this._b|0,l0=this._c|0,z=this._d|0,o0=this._e|0,M=0;M<80;M+=1){var u0,S;M<16?(u0=w0(C,h0,L,d0,R,D[Z[M]],B0[0],U[M]),S=f0(b0,P,l0,z,o0,D[Q[M]],H[0],V[M])):M<32?(u0=E(C,h0,L,d0,R,D[Z[M]],B0[1],U[M]),S=T(b0,P,l0,z,o0,D[Q[M]],H[1],V[M])):M<48?(u0=p0(C,h0,L,d0,R,D[Z[M]],B0[2],U[M]),S=p0(b0,P,l0,z,o0,D[Q[M]],H[2],V[M])):M<64?(u0=T(C,h0,L,d0,R,D[Z[M]],B0[3],U[M]),S=E(b0,P,l0,z,o0,D[Q[M]],H[3],V[M])):(u0=f0(C,h0,L,d0,R,D[Z[M]],B0[4],U[M]),S=w0(b0,P,l0,z,o0,D[Q[M]],H[4],V[M])),C=R,R=d0,d0=W(L,10),L=h0,h0=u0,b0=o0,o0=z,z=W(l0,10),l0=P,P=S}var n0=this._b+L+z|0;this._b=this._c+d0+o0|0,this._c=this._d+R+b0|0,this._d=this._e+C+P|0,this._e=this._a+h0+l0|0,this._a=n0},y0.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var D=x0.alloc?x0.alloc(20):new x0(20);return D.writeInt32LE(this._a,0),D.writeInt32LE(this._b,4),D.writeInt32LE(this._c,8),D.writeInt32LE(this._d,12),D.writeInt32LE(this._e,16),D};function W(D,c0){return D<>>32-c0}function w0(D,c0,C,h0,L,d0,R,b0){return W(D+(c0^C^h0)+d0+R|0,b0)+L|0}function E(D,c0,C,h0,L,d0,R,b0){return W(D+(c0&C|~c0&h0)+d0+R|0,b0)+L|0}function p0(D,c0,C,h0,L,d0,R,b0){return W(D+((c0|~C)^h0)+d0+R|0,b0)+L|0}function T(D,c0,C,h0,L,d0,R,b0){return W(D+(c0&h0|C&~h0)+d0+R|0,b0)+L|0}function f0(D,c0,C,h0,L,d0,R,b0){return W(D+(c0^(C|~h0))+d0+R|0,b0)+L|0}K.exports=y0}}),J0=$Q({"node_modules/sha.js/hash.js"(X,K){var x0=YQ().Buffer;function G(Y,$){this._block=x0.alloc(Y),this._finalSize=$,this._blockSize=Y,this._len=0}G.prototype.update=function(Y,$){typeof Y=="string"&&($=$||"utf8",Y=x0.from(Y,$));for(var Z=this._block,Q=this._blockSize,U=Y.length,V=this._len,B0=0;B0=this._finalSize&&(this._update(this._block),this._block.fill(0));var Z=this._len*8;if(Z<=4294967295)this._block.writeUInt32BE(Z,this._blockSize-4);else{var Q=(Z&4294967295)>>>0,U=(Z-Q)/4294967296;this._block.writeUInt32BE(U,this._blockSize-8),this._block.writeUInt32BE(Q,this._blockSize-4)}this._update(this._block);var V=this._hash();return Y?V.toString(Y):V},G.prototype._update=function(){throw new Error("_update must be implemented by subclass")},K.exports=G}}),F0=$Q({"node_modules/sha.js/sha.js"(X,K){var x0=X0(),G=J0(),Y=YQ().Buffer,$=[1518500249,1859775393,-1894007588,-899497514],Z=new Array(80);function Q(){this.init(),this._w=Z,G.call(this,64,56)}x0(Q,G),Q.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function U(H){return H<<5|H>>>27}function V(H){return H<<30|H>>>2}function B0(H,y0,W,w0){return H===0?y0&W|~y0&w0:H===2?y0&W|y0&w0|W&w0:y0^W^w0}Q.prototype._update=function(H){for(var y0=this._w,W=this._a|0,w0=this._b|0,E=this._c|0,p0=this._d|0,T=this._e|0,f0=0;f0<16;++f0)y0[f0]=H.readInt32BE(f0*4);for(;f0<80;++f0)y0[f0]=y0[f0-3]^y0[f0-8]^y0[f0-14]^y0[f0-16];for(var D=0;D<80;++D){var c0=~~(D/20),C=U(W)+B0(c0,w0,E,p0)+T+y0[D]+$[c0]|0;T=p0,p0=E,E=V(w0),w0=W,W=C}this._a=W+this._a|0,this._b=w0+this._b|0,this._c=E+this._c|0,this._d=p0+this._d|0,this._e=T+this._e|0},Q.prototype._hash=function(){var H=Y.allocUnsafe(20);return H.writeInt32BE(this._a|0,0),H.writeInt32BE(this._b|0,4),H.writeInt32BE(this._c|0,8),H.writeInt32BE(this._d|0,12),H.writeInt32BE(this._e|0,16),H},K.exports=Q}}),A0=$Q({"node_modules/sha.js/sha1.js"(X,K){var x0=X0(),G=J0(),Y=YQ().Buffer,$=[1518500249,1859775393,-1894007588,-899497514],Z=new Array(80);function Q(){this.init(),this._w=Z,G.call(this,64,56)}x0(Q,G),Q.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function U(y0){return y0<<1|y0>>>31}function V(y0){return y0<<5|y0>>>27}function B0(y0){return y0<<30|y0>>>2}function H(y0,W,w0,E){return y0===0?W&w0|~W&E:y0===2?W&w0|W&E|w0&E:W^w0^E}Q.prototype._update=function(y0){for(var W=this._w,w0=this._a|0,E=this._b|0,p0=this._c|0,T=this._d|0,f0=this._e|0,D=0;D<16;++D)W[D]=y0.readInt32BE(D*4);for(;D<80;++D)W[D]=U(W[D-3]^W[D-8]^W[D-14]^W[D-16]);for(var c0=0;c0<80;++c0){var C=~~(c0/20),h0=V(w0)+H(C,E,p0,T)+f0+W[c0]+$[C]|0;f0=T,T=p0,p0=B0(E),E=w0,w0=h0}this._a=w0+this._a|0,this._b=E+this._b|0,this._c=p0+this._c|0,this._d=T+this._d|0,this._e=f0+this._e|0},Q.prototype._hash=function(){var y0=Y.allocUnsafe(20);return y0.writeInt32BE(this._a|0,0),y0.writeInt32BE(this._b|0,4),y0.writeInt32BE(this._c|0,8),y0.writeInt32BE(this._d|0,12),y0.writeInt32BE(this._e|0,16),y0},K.exports=Q}}),H0=$Q({"node_modules/sha.js/sha256.js"(X,K){var x0=X0(),G=J0(),Y=YQ().Buffer,$=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],Z=new Array(64);function Q(){this.init(),this._w=Z,G.call(this,64,56)}x0(Q,G),Q.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this};function U(w0,E,p0){return p0^w0&(E^p0)}function V(w0,E,p0){return w0&E|p0&(w0|E)}function B0(w0){return(w0>>>2|w0<<30)^(w0>>>13|w0<<19)^(w0>>>22|w0<<10)}function H(w0){return(w0>>>6|w0<<26)^(w0>>>11|w0<<21)^(w0>>>25|w0<<7)}function y0(w0){return(w0>>>7|w0<<25)^(w0>>>18|w0<<14)^w0>>>3}function W(w0){return(w0>>>17|w0<<15)^(w0>>>19|w0<<13)^w0>>>10}Q.prototype._update=function(w0){for(var E=this._w,p0=this._a|0,T=this._b|0,f0=this._c|0,D=this._d|0,c0=this._e|0,C=this._f|0,h0=this._g|0,L=this._h|0,d0=0;d0<16;++d0)E[d0]=w0.readInt32BE(d0*4);for(;d0<64;++d0)E[d0]=W(E[d0-2])+E[d0-7]+y0(E[d0-15])+E[d0-16]|0;for(var R=0;R<64;++R){var b0=L+H(c0)+U(c0,C,h0)+$[R]+E[R]|0,P=B0(p0)+V(p0,T,f0)|0;L=h0,h0=C,C=c0,c0=D+b0|0,D=f0,f0=T,T=p0,p0=b0+P|0}this._a=p0+this._a|0,this._b=T+this._b|0,this._c=f0+this._c|0,this._d=D+this._d|0,this._e=c0+this._e|0,this._f=C+this._f|0,this._g=h0+this._g|0,this._h=L+this._h|0},Q.prototype._hash=function(){var w0=Y.allocUnsafe(32);return w0.writeInt32BE(this._a,0),w0.writeInt32BE(this._b,4),w0.writeInt32BE(this._c,8),w0.writeInt32BE(this._d,12),w0.writeInt32BE(this._e,16),w0.writeInt32BE(this._f,20),w0.writeInt32BE(this._g,24),w0.writeInt32BE(this._h,28),w0},K.exports=Q}}),W0=$Q({"node_modules/sha.js/sha224.js"(X,K){var x0=X0(),G=H0(),Y=J0(),$=YQ().Buffer,Z=new Array(64);function Q(){this.init(),this._w=Z,Y.call(this,64,56)}x0(Q,G),Q.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},Q.prototype._hash=function(){var U=$.allocUnsafe(28);return U.writeInt32BE(this._a,0),U.writeInt32BE(this._b,4),U.writeInt32BE(this._c,8),U.writeInt32BE(this._d,12),U.writeInt32BE(this._e,16),U.writeInt32BE(this._f,20),U.writeInt32BE(this._g,24),U},K.exports=Q}}),E0=$Q({"node_modules/sha.js/sha512.js"(X,K){var x0=X0(),G=J0(),Y=YQ().Buffer,$=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],Z=new Array(160);function Q(){this.init(),this._w=Z,G.call(this,128,112)}x0(Q,G),Q.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this};function U(T,f0,D){return D^T&(f0^D)}function V(T,f0,D){return T&f0|D&(T|f0)}function B0(T,f0){return(T>>>28|f0<<4)^(f0>>>2|T<<30)^(f0>>>7|T<<25)}function H(T,f0){return(T>>>14|f0<<18)^(T>>>18|f0<<14)^(f0>>>9|T<<23)}function y0(T,f0){return(T>>>1|f0<<31)^(T>>>8|f0<<24)^T>>>7}function W(T,f0){return(T>>>1|f0<<31)^(T>>>8|f0<<24)^(T>>>7|f0<<25)}function w0(T,f0){return(T>>>19|f0<<13)^(f0>>>29|T<<3)^T>>>6}function E(T,f0){return(T>>>19|f0<<13)^(f0>>>29|T<<3)^(T>>>6|f0<<26)}function p0(T,f0){return T>>>0>>0?1:0}Q.prototype._update=function(T){for(var f0=this._w,D=this._ah|0,c0=this._bh|0,C=this._ch|0,h0=this._dh|0,L=this._eh|0,d0=this._fh|0,R=this._gh|0,b0=this._hh|0,P=this._al|0,l0=this._bl|0,z=this._cl|0,o0=this._dl|0,M=this._el|0,u0=this._fl|0,S=this._gl|0,n0=this._hl|0,v=0;v<32;v+=2)f0[v]=T.readInt32BE(v*4),f0[v+1]=T.readInt32BE(v*4+4);for(;v<160;v+=2){var s0=f0[v-30],I=f0[v-30+1],t0=y0(s0,I),m0=W(I,s0);s0=f0[v-4],I=f0[v-4+1];var a0=w0(s0,I),q=E(I,s0),e0=f0[v-14],r0=f0[v-14+1],i0=f0[v-32],j=f0[v-32+1],$$=m0+r0|0,k=t0+e0+p0($$,m0)|0;$$=$$+q|0,k=k+a0+p0($$,q)|0,$$=$$+j|0,k=k+i0+p0($$,j)|0,f0[v]=k,f0[v+1]=$$}for(var Q$=0;Q$<160;Q$+=2){k=f0[Q$],$$=f0[Q$+1];var g=V(D,c0,C),Y$=V(P,l0,z),_=B0(D,P),Z$=B0(P,D),N=H(L,M),G$=H(M,L),x=$[Q$],V$=$[Q$+1],B=U(L,d0,R),U$=U(M,u0,S),y=n0+G$|0,X$=b0+N+p0(y,n0)|0;y=y+U$|0,X$=X$+B+p0(y,U$)|0,y=y+V$|0,X$=X$+x+p0(y,V$)|0,y=y+$$|0,X$=X$+k+p0(y,$$)|0;var w=Z$+Y$|0,K$=_+g+p0(w,Z$)|0;b0=R,n0=S,R=d0,S=u0,d0=L,u0=M,M=o0+y|0,L=h0+X$+p0(M,o0)|0,h0=C,o0=z,C=c0,z=l0,c0=D,l0=P,P=y+w|0,D=X$+K$+p0(P,y)|0}this._al=this._al+P|0,this._bl=this._bl+l0|0,this._cl=this._cl+z|0,this._dl=this._dl+o0|0,this._el=this._el+M|0,this._fl=this._fl+u0|0,this._gl=this._gl+S|0,this._hl=this._hl+n0|0,this._ah=this._ah+D+p0(this._al,P)|0,this._bh=this._bh+c0+p0(this._bl,l0)|0,this._ch=this._ch+C+p0(this._cl,z)|0,this._dh=this._dh+h0+p0(this._dl,o0)|0,this._eh=this._eh+L+p0(this._el,M)|0,this._fh=this._fh+d0+p0(this._fl,u0)|0,this._gh=this._gh+R+p0(this._gl,S)|0,this._hh=this._hh+b0+p0(this._hl,n0)|0},Q.prototype._hash=function(){var T=Y.allocUnsafe(64);function f0(D,c0,C){T.writeInt32BE(D,C),T.writeInt32BE(c0,C+4)}return f0(this._ah,this._al,0),f0(this._bh,this._bl,8),f0(this._ch,this._cl,16),f0(this._dh,this._dl,24),f0(this._eh,this._el,32),f0(this._fh,this._fl,40),f0(this._gh,this._gl,48),f0(this._hh,this._hl,56),T},K.exports=Q}}),T0=$Q({"node_modules/sha.js/sha384.js"(X,K){var x0=X0(),G=E0(),Y=J0(),$=YQ().Buffer,Z=new Array(160);function Q(){this.init(),this._w=Z,Y.call(this,128,112)}x0(Q,G),Q.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},Q.prototype._hash=function(){var U=$.allocUnsafe(48);function V(B0,H,y0){U.writeInt32BE(B0,y0),U.writeInt32BE(H,y0+4)}return V(this._ah,this._al,0),V(this._bh,this._bl,8),V(this._ch,this._cl,16),V(this._dh,this._dl,24),V(this._eh,this._el,32),V(this._fh,this._fl,40),U},K.exports=Q}}),D0=$Q({"node_modules/sha.js/index.js"(x0,K){var x0=K.exports=function(G){G=G.toLowerCase();var Y=x0[G];if(!Y)throw new Error(G+" is not supported (we accept pull requests)");return new Y};x0.sha=F0(),x0.sha1=A0(),x0.sha224=W0(),x0.sha256=H0(),x0.sha384=T0(),x0.sha512=E0()}}),C0=$Q({"node_modules/cipher-base/index.js"(X,K){var x0=YQ().Buffer,G=X0();function Y($){h$.Transform.call(this),this.hashMode=typeof $=="string",this.hashMode?this[$]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}G(Y,h$.Transform),Y.prototype.update=function($,Z,Q){typeof $=="string"&&($=x0.from($,Z));var U=this._update($);return this.hashMode?this:(Q&&(U=this._toString(U,Q)),U)},Y.prototype.setAutoPadding=function(){},Y.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},Y.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},Y.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},Y.prototype._transform=function($,Z,Q){var U;try{this.hashMode?this._update($):this.push(this._update($))}catch(V){U=V}finally{Q(U)}},Y.prototype._flush=function($){var Z;try{this.push(this.__final())}catch(Q){Z=Q}$(Z)},Y.prototype._finalOrDigest=function($){var Z=this.__final()||x0.alloc(0);return $&&(Z=this._toString(Z,$,!0)),Z},Y.prototype._toString=function($,Z,Q){if(this._decoder||(this._decoder=new a$(Z),this._encoding=Z),this._encoding!==Z)throw new Error("can't switch encodings");var U=this._decoder.write($);return Q&&(U+=this._decoder.end()),U},K.exports=Y}}),L0=$Q({"node_modules/create-hash/browser.js"(X,K){const x0=function $(Z,Q){this._options=Q,this._hasher=new sY(Z,Q),this._finalized=!1};x0.prototype=Object.create(h$.Transform.prototype),x0.prototype.update=function $(Z,Q){return this._checkFinalized(),this._hasher.update(Z,Q),this},x0.prototype.digest=function $(Z,Q){return this._checkFinalized(),this._finalized=!0,this._hasher.digest(Z,Q)},x0.prototype._checkFinalized=function $(){if(this._finalized){var Z=new Error("Digest already called");throw Z.code="ERR_CRYPTO_HASH_FINALIZED",Z}},x0.prototype.copy=function $(){const Z=Object.create(x0.prototype);return Z._options=this._options,Z._hasher=this._hasher.copy(),Z._finalized=this._finalized,Z};const G={__proto__:h$.Transform.prototype,...x0.prototype,_transform($,Z,Q){this.update($,Z),Q&&Q()},_flush($){this.push(this.digest()),$()}},Y=["_events","_eventsCount","_final","_maxListeners","_maxListeners","_read","_undestroy","_writableState","_write","_writev","addListener","asIndexedPairs","closed","compose","constructor","cork","destroy","destroyed","drop","emit","end","errored","eventNames","every","filter","find","flatMap","forEach","getMaxListeners","hasOwnProperty","isPaused","isPrototypeOf","iterator","listenerCount","listeners","map","off","on","once","pause","pipe","prependListener","prependOnceListener","propertyIsEnumerable","push","rawListeners","read","readable","readableAborted","readableBuffer","readableDidRead","readableEncoding","readableEnded","readableFlowing","readableHighWaterMark","readableLength","readableObjectMode","reduce","removeAllListeners","removeListener","resume","setDefaultEncoding","setEncoding","setMaxListeners","some","take","toArray","toLocaleString","toString","uncork","unpipe","unshift","valueOf","wrap","writable","writableBuffer","writableCorked","writableEnded","writableFinished","writableHighWaterMark","writableLength","writableNeedDrain","writableObjectMode","write"];for(let $ of Y)Object.defineProperty(x0.prototype,$,{get(){return Object.setPrototypeOf(this,G),h$.Transform.call(this,this._options),this[$]},enumerable:!1,configurable:!0});K.exports=function $(Z){return new x0(Z)},K.exports.createHash=K.exports,K.exports.Hash=x0}}),R0=$Q({"node_modules/create-hmac/legacy.js"(X,K){var x0=X0(),G=YQ().Buffer,Y=C0(),$=G.alloc(128),Z=64;function Q(U,V){Y.call(this,"digest"),typeof V=="string"&&(V=G.from(V)),this._alg=U,this._key=V,V.length>Z?V=U(V):V.lengthW){var w0=H==="rmd160"?new Q:U(H);y0=w0.update(y0).digest()}else y0.lengthx0||Y!==Y)throw new TypeError("Bad key length")}}}),q0=$Q({"node_modules/pbkdf2/lib/default-encoding.js"(X,K){var x0;global.process&&global.process.browser?x0="utf-8":global.process&&global.process.version?(G=parseInt(process.version.split(".")[0].slice(1),10),x0=G>=6?"utf-8":"binary"):x0="utf-8";var G;K.exports=x0}}),j0=$Q({"node_modules/pbkdf2/lib/to-buffer.js"(X,K){var x0=YQ().Buffer;K.exports=function(G,Y,$){if(x0.isBuffer(G))return G;if(typeof G=="string")return x0.from(G,Y);if(ArrayBuffer.isView(G))return x0.from(G.buffer);throw new TypeError($+" must be a string, a Buffer, a typed array or a DataView")}}}),k0=$Q({"node_modules/pbkdf2/lib/sync-browser.js"(X,K){var x0=P0(),G=O0(),Y=D0(),$=YQ().Buffer,Z=v0(),Q=q0(),U=j0(),V=$.alloc(128),B0={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function H(w0,E,p0){var T=y0(w0),f0=w0==="sha512"||w0==="sha384"?128:64;E.length>f0?E=T(E):E.length>>0},X.writeUInt32BE=function(Y,$,Z){Y[0+Z]=$>>>24,Y[1+Z]=$>>>16&255,Y[2+Z]=$>>>8&255,Y[3+Z]=$&255},X.ip=function(Y,$,Z,Q){for(var U=0,V=0,B0=6;B0>=0;B0-=2){for(var H=0;H<=24;H+=8)U<<=1,U|=$>>>H+B0&1;for(var H=0;H<=24;H+=8)U<<=1,U|=Y>>>H+B0&1}for(var B0=6;B0>=0;B0-=2){for(var H=1;H<=25;H+=8)V<<=1,V|=$>>>H+B0&1;for(var H=1;H<=25;H+=8)V<<=1,V|=Y>>>H+B0&1}Z[Q+0]=U>>>0,Z[Q+1]=V>>>0},X.rip=function(Y,$,Z,Q){for(var U=0,V=0,B0=0;B0<4;B0++)for(var H=24;H>=0;H-=8)U<<=1,U|=$>>>H+B0&1,U<<=1,U|=Y>>>H+B0&1;for(var B0=4;B0<8;B0++)for(var H=24;H>=0;H-=8)V<<=1,V|=$>>>H+B0&1,V<<=1,V|=Y>>>H+B0&1;Z[Q+0]=U>>>0,Z[Q+1]=V>>>0},X.pc1=function(Y,$,Z,Q){for(var U=0,V=0,B0=7;B0>=5;B0--){for(var H=0;H<=24;H+=8)U<<=1,U|=$>>H+B0&1;for(var H=0;H<=24;H+=8)U<<=1,U|=Y>>H+B0&1}for(var H=0;H<=24;H+=8)U<<=1,U|=$>>H+B0&1;for(var B0=1;B0<=3;B0++){for(var H=0;H<=24;H+=8)V<<=1,V|=$>>H+B0&1;for(var H=0;H<=24;H+=8)V<<=1,V|=Y>>H+B0&1}for(var H=0;H<=24;H+=8)V<<=1,V|=Y>>H+B0&1;Z[Q+0]=U>>>0,Z[Q+1]=V>>>0},X.r28shl=function(Y,$){return Y<<$&268435455|Y>>>28-$};var K=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];X.pc2=function(Y,$,Z,Q){for(var U=0,V=0,B0=K.length>>>1,H=0;H>>K[H]&1;for(var H=B0;H>>K[H]&1;Z[Q+0]=U>>>0,Z[Q+1]=V>>>0},X.expand=function(Y,$,Z){var Q=0,U=0;Q=(Y&1)<<5|Y>>>27;for(var V=23;V>=15;V-=4)Q<<=6,Q|=Y>>>V&63;for(var V=11;V>=3;V-=4)U|=Y>>>V&63,U<<=6;U|=(Y&31)<<1|Y>>>31,$[Z+0]=Q>>>0,$[Z+1]=U>>>0};var x0=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];X.substitute=function(Y,$){for(var Z=0,Q=0;Q<4;Q++){var U=Y>>>18-Q*6&63,V=x0[Q*64+U];Z<<=4,Z|=V}for(var Q=0;Q<4;Q++){var U=$>>>18-Q*6&63,V=x0[256+Q*64+U];Z<<=4,Z|=V}return Z>>>0};var G=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];X.permute=function(Y){for(var $=0,Z=0;Z>>G[Z]&1;return $>>>0},X.padSplit=function(Y,$,Z){for(var Q=Y.toString(2);Q.length<$;)Q="0"+Q;for(var U=[],V=0;V<$;V+=Z)U.push(Q.slice(V,V+Z));return U.join(" ")}}}),N0=$Q({"node_modules/minimalistic-assert/index.js"(X,K){K.exports=x0;function x0(G,Y){if(!G)throw new Error(Y||"Assertion failed")}x0.equal=function(G,Y,$){if(G!=Y)throw new Error($||"Assertion failed: "+G+" != "+Y)}}}),VQ=$Q({"node_modules/des.js/lib/des/cipher.js"(X,K){var x0=N0();function G(Y){this.options=Y,this.type=this.options.type,this.blockSize=8,this._init(),this.buffer=new Array(this.blockSize),this.bufferOff=0}K.exports=G,G.prototype._init=function(){},G.prototype.update=function(Y){return Y.length===0?[]:this.type==="decrypt"?this._updateDecrypt(Y):this._updateEncrypt(Y)},G.prototype._buffer=function(Y,$){for(var Z=Math.min(this.buffer.length-this.bufferOff,Y.length-$),Q=0;Q0;Q--)$+=this._buffer(Y,$),Z+=this._flushBuffer(U,Z);return $+=this._buffer(Y,$),U},G.prototype.final=function(Y){var $;Y&&($=this.update(Y));var Z;return this.type==="encrypt"?Z=this._finalEncrypt():Z=this._finalDecrypt(),$?$.concat(Z):Z},G.prototype._pad=function(Y,$){if($===0)return!1;for(;$>>1];H=Y.r28shl(H,w0),y0=Y.r28shl(y0,w0),Y.pc2(H,y0,V.keys,W)}},Q.prototype._update=function(V,B0,H,y0){var W=this._desState,w0=Y.readUInt32BE(V,B0),E=Y.readUInt32BE(V,B0+4);Y.ip(w0,E,W.tmp,0),w0=W.tmp[0],E=W.tmp[1],this.type==="encrypt"?this._encrypt(W,w0,E,W.tmp,0):this._decrypt(W,w0,E,W.tmp,0),w0=W.tmp[0],E=W.tmp[1],Y.writeUInt32BE(H,w0,y0),Y.writeUInt32BE(H,E,y0+4)},Q.prototype._pad=function(V,B0){for(var H=V.length-B0,y0=B0;y0>>0,w0=C}Y.rip(E,w0,y0,W)},Q.prototype._decrypt=function(V,B0,H,y0,W){for(var w0=H,E=B0,p0=V.keys.length-2;p0>=0;p0-=2){var T=V.keys[p0],f0=V.keys[p0+1];Y.expand(w0,V.tmp,0),T^=V.tmp[0],f0^=V.tmp[1];var D=Y.substitute(T,f0),c0=Y.permute(D),C=w0;w0=(E^c0)>>>0,E=C}Y.rip(w0,E,y0,W)}}}),XQ=$Q({"node_modules/des.js/lib/des/cbc.js"(X){var K=N0(),x0=X0(),G={};function Y(Z){K.equal(Z.length,8,"Invalid IV length"),this.iv=new Array(8);for(var Q=0;Q>U%8,Y._prev=G(Y._prev,Z?H:y0);return B0}function G(Y,$){var Z=Y.length,Q=-1,U=K.allocUnsafe(Y.length);for(Y=K.concat([Y,K.from([$])]);++Q>7;return U}X.encrypt=function(Y,$,Z){for(var Q=$.length,U=K.allocUnsafe(Q),V=-1;++V>>24]^E[D>>>16&255]^p0[c0>>>8&255]^T[C&255]^B0[b0++],L=w0[D>>>24]^E[c0>>>16&255]^p0[C>>>8&255]^T[f0&255]^B0[b0++],d0=w0[c0>>>24]^E[C>>>16&255]^p0[f0>>>8&255]^T[D&255]^B0[b0++],R=w0[C>>>24]^E[f0>>>16&255]^p0[D>>>8&255]^T[c0&255]^B0[b0++],f0=h0,D=L,c0=d0,C=R;return h0=(y0[f0>>>24]<<24|y0[D>>>16&255]<<16|y0[c0>>>8&255]<<8|y0[C&255])^B0[b0++],L=(y0[D>>>24]<<24|y0[c0>>>16&255]<<16|y0[C>>>8&255]<<8|y0[f0&255])^B0[b0++],d0=(y0[c0>>>24]<<24|y0[C>>>16&255]<<16|y0[f0>>>8&255]<<8|y0[D&255])^B0[b0++],R=(y0[C>>>24]<<24|y0[f0>>>16&255]<<16|y0[D>>>8&255]<<8|y0[c0&255])^B0[b0++],h0=h0>>>0,L=L>>>0,d0=d0>>>0,R=R>>>0,[h0,L,d0,R]}var Z=[0,1,2,4,8,16,32,64,128,27,54],Q=function(){for(var V=new Array(256),B0=0;B0<256;B0++)B0<128?V[B0]=B0<<1:V[B0]=B0<<1^283;for(var H=[],y0=[],W=[[],[],[],[]],w0=[[],[],[],[]],E=0,p0=0,T=0;T<256;++T){var f0=p0^p0<<1^p0<<2^p0<<3^p0<<4;f0=f0>>>8^f0&255^99,H[E]=f0,y0[f0]=E;var D=V[E],c0=V[D],C=V[c0],h0=V[f0]*257^f0*16843008;W[0][E]=h0<<24|h0>>>8,W[1][E]=h0<<16|h0>>>16,W[2][E]=h0<<8|h0>>>24,W[3][E]=h0,h0=C*16843009^c0*65537^D*257^E*16843008,w0[0][f0]=h0<<24|h0>>>8,w0[1][f0]=h0<<16|h0>>>16,w0[2][f0]=h0<<8|h0>>>24,w0[3][f0]=h0,E===0?E=p0=1:(E=D^V[V[V[C^D]]],p0^=V[V[p0]])}return{SBOX:H,INV_SBOX:y0,SUB_MIX:W,INV_SUB_MIX:w0}}();function U(V){this._key=G(V),this._reset()}U.blockSize=16,U.keySize=32,U.prototype.blockSize=U.blockSize,U.prototype.keySize=U.keySize,U.prototype._reset=function(){for(var V=this._key,B0=V.length,H=B0+6,y0=(H+1)*4,W=[],w0=0;w0>>24,E=Q.SBOX[E>>>24]<<24|Q.SBOX[E>>>16&255]<<16|Q.SBOX[E>>>8&255]<<8|Q.SBOX[E&255],E^=Z[w0/B0|0]<<24):B0>6&&w0%B0===4&&(E=Q.SBOX[E>>>24]<<24|Q.SBOX[E>>>16&255]<<16|Q.SBOX[E>>>8&255]<<8|Q.SBOX[E&255]),W[w0]=W[w0-B0]^E}for(var p0=[],T=0;T>>24]]^Q.INV_SUB_MIX[1][Q.SBOX[D>>>16&255]]^Q.INV_SUB_MIX[2][Q.SBOX[D>>>8&255]]^Q.INV_SUB_MIX[3][Q.SBOX[D&255]]}this._nRounds=H,this._keySchedule=W,this._invKeySchedule=p0},U.prototype.encryptBlockRaw=function(V){return V=G(V),$(V,this._keySchedule,Q.SUB_MIX,Q.SBOX,this._nRounds)},U.prototype.encryptBlock=function(V){var B0=this.encryptBlockRaw(V),H=x0.allocUnsafe(16);return H.writeUInt32BE(B0[0],0),H.writeUInt32BE(B0[1],4),H.writeUInt32BE(B0[2],8),H.writeUInt32BE(B0[3],12),H},U.prototype.decryptBlock=function(V){V=G(V);var B0=V[1];V[1]=V[3],V[3]=B0;var H=$(V,this._invKeySchedule,Q.INV_SUB_MIX,Q.INV_SBOX,this._nRounds),y0=x0.allocUnsafe(16);return y0.writeUInt32BE(H[0],0),y0.writeUInt32BE(H[3],4),y0.writeUInt32BE(H[2],8),y0.writeUInt32BE(H[1],12),y0},U.prototype.scrub=function(){Y(this._keySchedule),Y(this._invKeySchedule),Y(this._key)},K.exports.AES=U}}),PQ=$Q({"node_modules/browserify-aes/ghash.js"(X,K){var x0=YQ().Buffer,G=x0.alloc(16,0);function Y(Q){return[Q.readUInt32BE(0),Q.readUInt32BE(4),Q.readUInt32BE(8),Q.readUInt32BE(12)]}function $(Q){var U=x0.allocUnsafe(16);return U.writeUInt32BE(Q[0]>>>0,0),U.writeUInt32BE(Q[1]>>>0,4),U.writeUInt32BE(Q[2]>>>0,8),U.writeUInt32BE(Q[3]>>>0,12),U}function Z(Q){this.h=Q,this.state=x0.alloc(16,0),this.cache=x0.allocUnsafe(0)}Z.prototype.ghash=function(Q){for(var U=-1;++U0;V--)Q[V]=Q[V]>>>1|(Q[V-1]&1)<<31;Q[0]=Q[0]>>>1,H&&(Q[0]=Q[0]^225<<24)}this.state=$(U)},Z.prototype.update=function(Q){this.cache=x0.concat([this.cache,Q]);for(var U;this.cache.length>=16;)U=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(U)},Z.prototype.final=function(Q,U){return this.cache.length&&this.ghash(x0.concat([this.cache,G],16)),this.ghash($([0,Q,0,U])),this.state},K.exports=Z}}),zQ=$Q({"node_modules/browserify-aes/authCipher.js"(X,K){var x0=RQ(),G=YQ().Buffer,Y=C0(),$=X0(),Z=PQ(),Q=FQ(),U=DQ();function V(y0,W){var w0=0;y0.length!==W.length&&w0++;for(var E=Math.min(y0.length,W.length),p0=0;p00||U>0;){var W=new G;W.update(y0),W.update($),Z&&W.update(Z),y0=W.digest();var w0=0;if(V>0){var E=B0.length-V;w0=Math.min(V,y0.length),y0.copy(B0,E,0,w0),V-=w0}if(w00){var p0=H.length-U,T=Math.min(U,y0.length-w0);y0.copy(H,p0,w0,w0+T),U-=T}}return y0.fill(0),{key:B0,iv:H}}K.exports=Y}}),vQ=$Q({"node_modules/browserify-aes/encrypter.js"(X){var K=LQ(),x0=zQ(),G=YQ().Buffer,Y=MQ(),$=C0(),Z=RQ(),Q=SQ(),U=X0();function V(w0,E,p0){$.call(this),this._cache=new H,this._cipher=new Z.AES(E),this._prev=G.from(p0),this._mode=w0,this._autopadding=!0}U(V,$),V.prototype._update=function(w0){this._cache.add(w0);for(var E,p0,T=[];E=this._cache.get();)p0=this._mode.encrypt(this,E),T.push(p0);return G.concat(T)};var B0=G.alloc(16,16);V.prototype._final=function(){var w0=this._cache.flush();if(this._autopadding)return w0=this._mode.encrypt(this,w0),this._cipher.scrub(),w0;if(!w0.equals(B0))throw this._cipher.scrub(),new Error("data not multiple of block length")},V.prototype.setAutoPadding=function(w0){return this._autopadding=!!w0,this};function H(){this.cache=G.allocUnsafe(0)}H.prototype.add=function(w0){this.cache=G.concat([this.cache,w0])},H.prototype.get=function(){if(this.cache.length>15){var w0=this.cache.slice(0,16);return this.cache=this.cache.slice(16),w0}return null},H.prototype.flush=function(){for(var w0=16-this.cache.length,E=G.allocUnsafe(w0),p0=-1;++p016)return E=this.cache.slice(0,16),this.cache=this.cache.slice(16),E}else if(this.cache.length>=16)return E=this.cache.slice(0,16),this.cache=this.cache.slice(16),E;return null},B0.prototype.flush=function(){if(this.cache.length)return this.cache};function H(w0){var E=w0[15];if(E<1||E>16)throw new Error("unable to decrypt data");for(var p0=-1;++p00?l0:z},Z.min=function(l0,z){return l0.cmp(z)<0?l0:z},Z.prototype._init=function(l0,z,o0){if(typeof l0=="number")return this._initNumber(l0,z,o0);if(typeof l0=="object")return this._initArray(l0,z,o0);z==="hex"&&(z=16),Y(z===(z|0)&&z>=2&&z<=36),l0=l0.toString().replace(/\s+/g,"");var M=0;l0[0]==="-"&&(M++,this.negative=1),M=0;M-=3)S=l0[M]|l0[M-1]<<8|l0[M-2]<<16,this.words[u0]|=S<>>26-n0&67108863,n0+=24,n0>=26&&(n0-=26,u0++);else if(o0==="le")for(M=0,u0=0;M>>26-n0&67108863,n0+=24,n0>=26&&(n0-=26,u0++);return this.strip()};function U(l0,z){var o0=l0.charCodeAt(z);return o0>=65&&o0<=70?o0-55:o0>=97&&o0<=102?o0-87:o0-48&15}function V(l0,z,o0){var M=U(l0,o0);return o0-1>=z&&(M|=U(l0,o0-1)<<4),M}Z.prototype._parseHex=function(l0,z,o0){this.length=Math.ceil((l0.length-z)/6),this.words=new Array(this.length);for(var M=0;M=z;M-=2)n0=V(l0,z,M)<=18?(u0-=18,S+=1,this.words[S]|=n0>>>26):u0+=8;else{var v=l0.length-z;for(M=v%2===0?z+1:z;M=18?(u0-=18,S+=1,this.words[S]|=n0>>>26):u0+=8}this.strip()};function B0(l0,z,o0,M){for(var u0=0,S=Math.min(l0.length,o0),n0=z;n0=49?u0+=v-49+10:v>=17?u0+=v-17+10:u0+=v}return u0}Z.prototype._parseBase=function(l0,z,o0){this.words=[0],this.length=1;for(var M=0,u0=1;u0<=67108863;u0*=z)M++;M--,u0=u0/z|0;for(var S=l0.length-o0,n0=S%M,v=Math.min(S,S-n0)+o0,s0=0,I=o0;I1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},Z.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},Z.prototype.inspect=function(){return(this.red?""};var H=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],y0=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],W=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64000000,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,24300000,28629151,33554432,39135393,45435424,52521875,60466176];Z.prototype.toString=function(l0,z){l0=l0||10,z=z|0||1;var o0;if(l0===16||l0==="hex"){o0="";for(var M=0,u0=0,S=0;S>>24-M&16777215,u0!==0||S!==this.length-1?o0=H[6-v.length]+v+o0:o0=v+o0,M+=2,M>=26&&(M-=26,S--)}for(u0!==0&&(o0=u0.toString(16)+o0);o0.length%z!==0;)o0="0"+o0;return this.negative!==0&&(o0="-"+o0),o0}if(l0===(l0|0)&&l0>=2&&l0<=36){var s0=y0[l0],I=W[l0];o0="";var t0=this.clone();for(t0.negative=0;!t0.isZero();){var m0=t0.modn(I).toString(l0);t0=t0.idivn(I),t0.isZero()?o0=m0+o0:o0=H[s0-m0.length]+m0+o0}for(this.isZero()&&(o0="0"+o0);o0.length%z!==0;)o0="0"+o0;return this.negative!==0&&(o0="-"+o0),o0}Y(!1,"Base should be between 2 and 36")},Z.prototype.toNumber=function(){var l0=this.words[0];return this.length===2?l0+=this.words[1]*67108864:this.length===3&&this.words[2]===1?l0+=4503599627370496+this.words[1]*67108864:this.length>2&&Y(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-l0:l0},Z.prototype.toJSON=function(){return this.toString(16)},Z.prototype.toBuffer=function(l0,z){return Y(typeof Q<"u"),this.toArrayLike(Q,l0,z)},Z.prototype.toArray=function(l0,z){return this.toArrayLike(Array,l0,z)},Z.prototype.toArrayLike=function(l0,z,o0){var M=this.byteLength(),u0=o0||Math.max(1,M);Y(M<=u0,"byte array longer than desired length"),Y(u0>0,"Requested array length <= 0"),this.strip();var S=z==="le",n0=new l0(u0),v,s0,I=this.clone();if(S){for(s0=0;!I.isZero();s0++)v=I.andln(255),I.iushrn(8),n0[s0]=v;for(;s0=4096&&(o0+=13,z>>>=13),z>=64&&(o0+=7,z>>>=7),z>=8&&(o0+=4,z>>>=4),z>=2&&(o0+=2,z>>>=2),o0+z},Z.prototype._zeroBits=function(l0){if(l0===0)return 26;var z=l0,o0=0;return(z&8191)===0&&(o0+=13,z>>>=13),(z&127)===0&&(o0+=7,z>>>=7),(z&15)===0&&(o0+=4,z>>>=4),(z&3)===0&&(o0+=2,z>>>=2),(z&1)===0&&o0++,o0},Z.prototype.bitLength=function(){var l0=this.words[this.length-1],z=this._countBits(l0);return(this.length-1)*26+z};function w0(l0){for(var z=new Array(l0.bitLength()),o0=0;o0>>u0}return z}Z.prototype.zeroBits=function(){if(this.isZero())return 0;for(var l0=0,z=0;zl0.length?this.clone().ior(l0):l0.clone().ior(this)},Z.prototype.uor=function(l0){return this.length>l0.length?this.clone().iuor(l0):l0.clone().iuor(this)},Z.prototype.iuand=function(l0){var z;this.length>l0.length?z=l0:z=this;for(var o0=0;o0l0.length?this.clone().iand(l0):l0.clone().iand(this)},Z.prototype.uand=function(l0){return this.length>l0.length?this.clone().iuand(l0):l0.clone().iuand(this)},Z.prototype.iuxor=function(l0){var z,o0;this.length>l0.length?(z=this,o0=l0):(z=l0,o0=this);for(var M=0;Ml0.length?this.clone().ixor(l0):l0.clone().ixor(this)},Z.prototype.uxor=function(l0){return this.length>l0.length?this.clone().iuxor(l0):l0.clone().iuxor(this)},Z.prototype.inotn=function(l0){Y(typeof l0=="number"&&l0>=0);var z=Math.ceil(l0/26)|0,o0=l0%26;this._expand(z),o0>0&&z--;for(var M=0;M0&&(this.words[M]=~this.words[M]&67108863>>26-o0),this.strip()},Z.prototype.notn=function(l0){return this.clone().inotn(l0)},Z.prototype.setn=function(l0,z){Y(typeof l0=="number"&&l0>=0);var o0=l0/26|0,M=l0%26;return this._expand(o0+1),z?this.words[o0]=this.words[o0]|1<l0.length?(o0=this,M=l0):(o0=l0,M=this);for(var u0=0,S=0;S>>26;for(;u0!==0&&S>>26;if(this.length=o0.length,u0!==0)this.words[this.length]=u0,this.length++;else if(o0!==this)for(;Sl0.length?this.clone().iadd(l0):l0.clone().iadd(this)},Z.prototype.isub=function(l0){if(l0.negative!==0){l0.negative=0;var z=this.iadd(l0);return l0.negative=1,z._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(l0),this.negative=1,this._normSign();var o0=this.cmp(l0);if(o0===0)return this.negative=0,this.length=1,this.words[0]=0,this;var M,u0;o0>0?(M=this,u0=l0):(M=l0,u0=this);for(var S=0,n0=0;n0>26,this.words[n0]=z&67108863;for(;S!==0&&n0>26,this.words[n0]=z&67108863;if(S===0&&n0>>26,m0=s0&67108863,a0=Math.min(I,z.length-1),q=Math.max(0,I-l0.length+1);q<=a0;q++){var e0=I-q|0;u0=l0.words[e0]|0,S=z.words[q]|0,n0=u0*S+m0,t0+=n0/67108864|0,m0=n0&67108863}o0.words[I]=m0|0,s0=t0|0}return s0!==0?o0.words[I]=s0|0:o0.length--,o0.strip()}var p0=function(l0,z,o0){var M=l0.words,u0=z.words,S=o0.words,n0=0,v,s0,I,t0=M[0]|0,m0=t0&8191,a0=t0>>>13,q=M[1]|0,e0=q&8191,r0=q>>>13,i0=M[2]|0,j=i0&8191,$$=i0>>>13,k=M[3]|0,Q$=k&8191,g=k>>>13,Y$=M[4]|0,_=Y$&8191,Z$=Y$>>>13,N=M[5]|0,G$=N&8191,x=N>>>13,V$=M[6]|0,B=V$&8191,U$=V$>>>13,y=M[7]|0,X$=y&8191,w=y>>>13,K$=M[8]|0,p=K$&8191,I$=K$>>>13,f=M[9]|0,O$=f&8191,c=f>>>13,J$=u0[0]|0,h=J$&8191,F$=J$>>>13,d=u0[1]|0,A$=d&8191,b=d>>>13,H$=u0[2]|0,l=H$&8191,W$=H$>>>13,o=u0[3]|0,E$=o&8191,u=o>>>13,T$=u0[4]|0,n=T$&8191,D$=T$>>>13,s=u0[5]|0,C$=s&8191,t=s>>>13,L$=u0[6]|0,m=L$&8191,R$=L$>>>13,a=u0[7]|0,P$=a&8191,O=a>>>13,z$=u0[8]|0,e=z$&8191,M$=z$>>>13,J=u0[9]|0,S$=J&8191,F=J>>>13;o0.negative=l0.negative^z.negative,o0.length=19,v=Math.imul(m0,h),s0=Math.imul(m0,F$),s0=s0+Math.imul(a0,h)|0,I=Math.imul(a0,F$);var v$=(n0+v|0)+((s0&8191)<<13)|0;n0=(I+(s0>>>13)|0)+(v$>>>26)|0,v$&=67108863,v=Math.imul(e0,h),s0=Math.imul(e0,F$),s0=s0+Math.imul(r0,h)|0,I=Math.imul(r0,F$),v=v+Math.imul(m0,A$)|0,s0=s0+Math.imul(m0,b)|0,s0=s0+Math.imul(a0,A$)|0,I=I+Math.imul(a0,b)|0;var r=(n0+v|0)+((s0&8191)<<13)|0;n0=(I+(s0>>>13)|0)+(r>>>26)|0,r&=67108863,v=Math.imul(j,h),s0=Math.imul(j,F$),s0=s0+Math.imul($$,h)|0,I=Math.imul($$,F$),v=v+Math.imul(e0,A$)|0,s0=s0+Math.imul(e0,b)|0,s0=s0+Math.imul(r0,A$)|0,I=I+Math.imul(r0,b)|0,v=v+Math.imul(m0,l)|0,s0=s0+Math.imul(m0,W$)|0,s0=s0+Math.imul(a0,l)|0,I=I+Math.imul(a0,W$)|0;var q$=(n0+v|0)+((s0&8191)<<13)|0;n0=(I+(s0>>>13)|0)+(q$>>>26)|0,q$&=67108863,v=Math.imul(Q$,h),s0=Math.imul(Q$,F$),s0=s0+Math.imul(g,h)|0,I=Math.imul(g,F$),v=v+Math.imul(j,A$)|0,s0=s0+Math.imul(j,b)|0,s0=s0+Math.imul($$,A$)|0,I=I+Math.imul($$,b)|0,v=v+Math.imul(e0,l)|0,s0=s0+Math.imul(e0,W$)|0,s0=s0+Math.imul(r0,l)|0,I=I+Math.imul(r0,W$)|0,v=v+Math.imul(m0,E$)|0,s0=s0+Math.imul(m0,u)|0,s0=s0+Math.imul(a0,E$)|0,I=I+Math.imul(a0,u)|0;var i=(n0+v|0)+((s0&8191)<<13)|0;n0=(I+(s0>>>13)|0)+(i>>>26)|0,i&=67108863,v=Math.imul(_,h),s0=Math.imul(_,F$),s0=s0+Math.imul(Z$,h)|0,I=Math.imul(Z$,F$),v=v+Math.imul(Q$,A$)|0,s0=s0+Math.imul(Q$,b)|0,s0=s0+Math.imul(g,A$)|0,I=I+Math.imul(g,b)|0,v=v+Math.imul(j,l)|0,s0=s0+Math.imul(j,W$)|0,s0=s0+Math.imul($$,l)|0,I=I+Math.imul($$,W$)|0,v=v+Math.imul(e0,E$)|0,s0=s0+Math.imul(e0,u)|0,s0=s0+Math.imul(r0,E$)|0,I=I+Math.imul(r0,u)|0,v=v+Math.imul(m0,n)|0,s0=s0+Math.imul(m0,D$)|0,s0=s0+Math.imul(a0,n)|0,I=I+Math.imul(a0,D$)|0;var j$=(n0+v|0)+((s0&8191)<<13)|0;n0=(I+(s0>>>13)|0)+(j$>>>26)|0,j$&=67108863,v=Math.imul(G$,h),s0=Math.imul(G$,F$),s0=s0+Math.imul(x,h)|0,I=Math.imul(x,F$),v=v+Math.imul(_,A$)|0,s0=s0+Math.imul(_,b)|0,s0=s0+Math.imul(Z$,A$)|0,I=I+Math.imul(Z$,b)|0,v=v+Math.imul(Q$,l)|0,s0=s0+Math.imul(Q$,W$)|0,s0=s0+Math.imul(g,l)|0,I=I+Math.imul(g,W$)|0,v=v+Math.imul(j,E$)|0,s0=s0+Math.imul(j,u)|0,s0=s0+Math.imul($$,E$)|0,I=I+Math.imul($$,u)|0,v=v+Math.imul(e0,n)|0,s0=s0+Math.imul(e0,D$)|0,s0=s0+Math.imul(r0,n)|0,I=I+Math.imul(r0,D$)|0,v=v+Math.imul(m0,C$)|0,s0=s0+Math.imul(m0,t)|0,s0=s0+Math.imul(a0,C$)|0,I=I+Math.imul(a0,t)|0;var k$=(n0+v|0)+((s0&8191)<<13)|0;n0=(I+(s0>>>13)|0)+(k$>>>26)|0,k$&=67108863,v=Math.imul(B,h),s0=Math.imul(B,F$),s0=s0+Math.imul(U$,h)|0,I=Math.imul(U$,F$),v=v+Math.imul(G$,A$)|0,s0=s0+Math.imul(G$,b)|0,s0=s0+Math.imul(x,A$)|0,I=I+Math.imul(x,b)|0,v=v+Math.imul(_,l)|0,s0=s0+Math.imul(_,W$)|0,s0=s0+Math.imul(Z$,l)|0,I=I+Math.imul(Z$,W$)|0,v=v+Math.imul(Q$,E$)|0,s0=s0+Math.imul(Q$,u)|0,s0=s0+Math.imul(g,E$)|0,I=I+Math.imul(g,u)|0,v=v+Math.imul(j,n)|0,s0=s0+Math.imul(j,D$)|0,s0=s0+Math.imul($$,n)|0,I=I+Math.imul($$,D$)|0,v=v+Math.imul(e0,C$)|0,s0=s0+Math.imul(e0,t)|0,s0=s0+Math.imul(r0,C$)|0,I=I+Math.imul(r0,t)|0,v=v+Math.imul(m0,m)|0,s0=s0+Math.imul(m0,R$)|0,s0=s0+Math.imul(a0,m)|0,I=I+Math.imul(a0,R$)|0;var g$=(n0+v|0)+((s0&8191)<<13)|0;n0=(I+(s0>>>13)|0)+(g$>>>26)|0,g$&=67108863,v=Math.imul(X$,h),s0=Math.imul(X$,F$),s0=s0+Math.imul(w,h)|0,I=Math.imul(w,F$),v=v+Math.imul(B,A$)|0,s0=s0+Math.imul(B,b)|0,s0=s0+Math.imul(U$,A$)|0,I=I+Math.imul(U$,b)|0,v=v+Math.imul(G$,l)|0,s0=s0+Math.imul(G$,W$)|0,s0=s0+Math.imul(x,l)|0,I=I+Math.imul(x,W$)|0,v=v+Math.imul(_,E$)|0,s0=s0+Math.imul(_,u)|0,s0=s0+Math.imul(Z$,E$)|0,I=I+Math.imul(Z$,u)|0,v=v+Math.imul(Q$,n)|0,s0=s0+Math.imul(Q$,D$)|0,s0=s0+Math.imul(g,n)|0,I=I+Math.imul(g,D$)|0,v=v+Math.imul(j,C$)|0,s0=s0+Math.imul(j,t)|0,s0=s0+Math.imul($$,C$)|0,I=I+Math.imul($$,t)|0,v=v+Math.imul(e0,m)|0,s0=s0+Math.imul(e0,R$)|0,s0=s0+Math.imul(r0,m)|0,I=I+Math.imul(r0,R$)|0,v=v+Math.imul(m0,P$)|0,s0=s0+Math.imul(m0,O)|0,s0=s0+Math.imul(a0,P$)|0,I=I+Math.imul(a0,O)|0;var _$=(n0+v|0)+((s0&8191)<<13)|0;n0=(I+(s0>>>13)|0)+(_$>>>26)|0,_$&=67108863,v=Math.imul(p,h),s0=Math.imul(p,F$),s0=s0+Math.imul(I$,h)|0,I=Math.imul(I$,F$),v=v+Math.imul(X$,A$)|0,s0=s0+Math.imul(X$,b)|0,s0=s0+Math.imul(w,A$)|0,I=I+Math.imul(w,b)|0,v=v+Math.imul(B,l)|0,s0=s0+Math.imul(B,W$)|0,s0=s0+Math.imul(U$,l)|0,I=I+Math.imul(U$,W$)|0,v=v+Math.imul(G$,E$)|0,s0=s0+Math.imul(G$,u)|0,s0=s0+Math.imul(x,E$)|0,I=I+Math.imul(x,u)|0,v=v+Math.imul(_,n)|0,s0=s0+Math.imul(_,D$)|0,s0=s0+Math.imul(Z$,n)|0,I=I+Math.imul(Z$,D$)|0,v=v+Math.imul(Q$,C$)|0,s0=s0+Math.imul(Q$,t)|0,s0=s0+Math.imul(g,C$)|0,I=I+Math.imul(g,t)|0,v=v+Math.imul(j,m)|0,s0=s0+Math.imul(j,R$)|0,s0=s0+Math.imul($$,m)|0,I=I+Math.imul($$,R$)|0,v=v+Math.imul(e0,P$)|0,s0=s0+Math.imul(e0,O)|0,s0=s0+Math.imul(r0,P$)|0,I=I+Math.imul(r0,O)|0,v=v+Math.imul(m0,e)|0,s0=s0+Math.imul(m0,M$)|0,s0=s0+Math.imul(a0,e)|0,I=I+Math.imul(a0,M$)|0;var N$=(n0+v|0)+((s0&8191)<<13)|0;n0=(I+(s0>>>13)|0)+(N$>>>26)|0,N$&=67108863,v=Math.imul(O$,h),s0=Math.imul(O$,F$),s0=s0+Math.imul(c,h)|0,I=Math.imul(c,F$),v=v+Math.imul(p,A$)|0,s0=s0+Math.imul(p,b)|0,s0=s0+Math.imul(I$,A$)|0,I=I+Math.imul(I$,b)|0,v=v+Math.imul(X$,l)|0,s0=s0+Math.imul(X$,W$)|0,s0=s0+Math.imul(w,l)|0,I=I+Math.imul(w,W$)|0,v=v+Math.imul(B,E$)|0,s0=s0+Math.imul(B,u)|0,s0=s0+Math.imul(U$,E$)|0,I=I+Math.imul(U$,u)|0,v=v+Math.imul(G$,n)|0,s0=s0+Math.imul(G$,D$)|0,s0=s0+Math.imul(x,n)|0,I=I+Math.imul(x,D$)|0,v=v+Math.imul(_,C$)|0,s0=s0+Math.imul(_,t)|0,s0=s0+Math.imul(Z$,C$)|0,I=I+Math.imul(Z$,t)|0,v=v+Math.imul(Q$,m)|0,s0=s0+Math.imul(Q$,R$)|0,s0=s0+Math.imul(g,m)|0,I=I+Math.imul(g,R$)|0,v=v+Math.imul(j,P$)|0,s0=s0+Math.imul(j,O)|0,s0=s0+Math.imul($$,P$)|0,I=I+Math.imul($$,O)|0,v=v+Math.imul(e0,e)|0,s0=s0+Math.imul(e0,M$)|0,s0=s0+Math.imul(r0,e)|0,I=I+Math.imul(r0,M$)|0,v=v+Math.imul(m0,S$)|0,s0=s0+Math.imul(m0,F)|0,s0=s0+Math.imul(a0,S$)|0,I=I+Math.imul(a0,F)|0;var $0=(n0+v|0)+((s0&8191)<<13)|0;n0=(I+(s0>>>13)|0)+($0>>>26)|0,$0&=67108863,v=Math.imul(O$,A$),s0=Math.imul(O$,b),s0=s0+Math.imul(c,A$)|0,I=Math.imul(c,b),v=v+Math.imul(p,l)|0,s0=s0+Math.imul(p,W$)|0,s0=s0+Math.imul(I$,l)|0,I=I+Math.imul(I$,W$)|0,v=v+Math.imul(X$,E$)|0,s0=s0+Math.imul(X$,u)|0,s0=s0+Math.imul(w,E$)|0,I=I+Math.imul(w,u)|0,v=v+Math.imul(B,n)|0,s0=s0+Math.imul(B,D$)|0,s0=s0+Math.imul(U$,n)|0,I=I+Math.imul(U$,D$)|0,v=v+Math.imul(G$,C$)|0,s0=s0+Math.imul(G$,t)|0,s0=s0+Math.imul(x,C$)|0,I=I+Math.imul(x,t)|0,v=v+Math.imul(_,m)|0,s0=s0+Math.imul(_,R$)|0,s0=s0+Math.imul(Z$,m)|0,I=I+Math.imul(Z$,R$)|0,v=v+Math.imul(Q$,P$)|0,s0=s0+Math.imul(Q$,O)|0,s0=s0+Math.imul(g,P$)|0,I=I+Math.imul(g,O)|0,v=v+Math.imul(j,e)|0,s0=s0+Math.imul(j,M$)|0,s0=s0+Math.imul($$,e)|0,I=I+Math.imul($$,M$)|0,v=v+Math.imul(e0,S$)|0,s0=s0+Math.imul(e0,F)|0,s0=s0+Math.imul(r0,S$)|0,I=I+Math.imul(r0,F)|0;var x$=(n0+v|0)+((s0&8191)<<13)|0;n0=(I+(s0>>>13)|0)+(x$>>>26)|0,x$&=67108863,v=Math.imul(O$,l),s0=Math.imul(O$,W$),s0=s0+Math.imul(c,l)|0,I=Math.imul(c,W$),v=v+Math.imul(p,E$)|0,s0=s0+Math.imul(p,u)|0,s0=s0+Math.imul(I$,E$)|0,I=I+Math.imul(I$,u)|0,v=v+Math.imul(X$,n)|0,s0=s0+Math.imul(X$,D$)|0,s0=s0+Math.imul(w,n)|0,I=I+Math.imul(w,D$)|0,v=v+Math.imul(B,C$)|0,s0=s0+Math.imul(B,t)|0,s0=s0+Math.imul(U$,C$)|0,I=I+Math.imul(U$,t)|0,v=v+Math.imul(G$,m)|0,s0=s0+Math.imul(G$,R$)|0,s0=s0+Math.imul(x,m)|0,I=I+Math.imul(x,R$)|0,v=v+Math.imul(_,P$)|0,s0=s0+Math.imul(_,O)|0,s0=s0+Math.imul(Z$,P$)|0,I=I+Math.imul(Z$,O)|0,v=v+Math.imul(Q$,e)|0,s0=s0+Math.imul(Q$,M$)|0,s0=s0+Math.imul(g,e)|0,I=I+Math.imul(g,M$)|0,v=v+Math.imul(j,S$)|0,s0=s0+Math.imul(j,F)|0,s0=s0+Math.imul($$,S$)|0,I=I+Math.imul($$,F)|0;var Q0=(n0+v|0)+((s0&8191)<<13)|0;n0=(I+(s0>>>13)|0)+(Q0>>>26)|0,Q0&=67108863,v=Math.imul(O$,E$),s0=Math.imul(O$,u),s0=s0+Math.imul(c,E$)|0,I=Math.imul(c,u),v=v+Math.imul(p,n)|0,s0=s0+Math.imul(p,D$)|0,s0=s0+Math.imul(I$,n)|0,I=I+Math.imul(I$,D$)|0,v=v+Math.imul(X$,C$)|0,s0=s0+Math.imul(X$,t)|0,s0=s0+Math.imul(w,C$)|0,I=I+Math.imul(w,t)|0,v=v+Math.imul(B,m)|0,s0=s0+Math.imul(B,R$)|0,s0=s0+Math.imul(U$,m)|0,I=I+Math.imul(U$,R$)|0,v=v+Math.imul(G$,P$)|0,s0=s0+Math.imul(G$,O)|0,s0=s0+Math.imul(x,P$)|0,I=I+Math.imul(x,O)|0,v=v+Math.imul(_,e)|0,s0=s0+Math.imul(_,M$)|0,s0=s0+Math.imul(Z$,e)|0,I=I+Math.imul(Z$,M$)|0,v=v+Math.imul(Q$,S$)|0,s0=s0+Math.imul(Q$,F)|0,s0=s0+Math.imul(g,S$)|0,I=I+Math.imul(g,F)|0;var B$=(n0+v|0)+((s0&8191)<<13)|0;n0=(I+(s0>>>13)|0)+(B$>>>26)|0,B$&=67108863,v=Math.imul(O$,n),s0=Math.imul(O$,D$),s0=s0+Math.imul(c,n)|0,I=Math.imul(c,D$),v=v+Math.imul(p,C$)|0,s0=s0+Math.imul(p,t)|0,s0=s0+Math.imul(I$,C$)|0,I=I+Math.imul(I$,t)|0,v=v+Math.imul(X$,m)|0,s0=s0+Math.imul(X$,R$)|0,s0=s0+Math.imul(w,m)|0,I=I+Math.imul(w,R$)|0,v=v+Math.imul(B,P$)|0,s0=s0+Math.imul(B,O)|0,s0=s0+Math.imul(U$,P$)|0,I=I+Math.imul(U$,O)|0,v=v+Math.imul(G$,e)|0,s0=s0+Math.imul(G$,M$)|0,s0=s0+Math.imul(x,e)|0,I=I+Math.imul(x,M$)|0,v=v+Math.imul(_,S$)|0,s0=s0+Math.imul(_,F)|0,s0=s0+Math.imul(Z$,S$)|0,I=I+Math.imul(Z$,F)|0;var Y0=(n0+v|0)+((s0&8191)<<13)|0;n0=(I+(s0>>>13)|0)+(Y0>>>26)|0,Y0&=67108863,v=Math.imul(O$,C$),s0=Math.imul(O$,t),s0=s0+Math.imul(c,C$)|0,I=Math.imul(c,t),v=v+Math.imul(p,m)|0,s0=s0+Math.imul(p,R$)|0,s0=s0+Math.imul(I$,m)|0,I=I+Math.imul(I$,R$)|0,v=v+Math.imul(X$,P$)|0,s0=s0+Math.imul(X$,O)|0,s0=s0+Math.imul(w,P$)|0,I=I+Math.imul(w,O)|0,v=v+Math.imul(B,e)|0,s0=s0+Math.imul(B,M$)|0,s0=s0+Math.imul(U$,e)|0,I=I+Math.imul(U$,M$)|0,v=v+Math.imul(G$,S$)|0,s0=s0+Math.imul(G$,F)|0,s0=s0+Math.imul(x,S$)|0,I=I+Math.imul(x,F)|0;var y$=(n0+v|0)+((s0&8191)<<13)|0;n0=(I+(s0>>>13)|0)+(y$>>>26)|0,y$&=67108863,v=Math.imul(O$,m),s0=Math.imul(O$,R$),s0=s0+Math.imul(c,m)|0,I=Math.imul(c,R$),v=v+Math.imul(p,P$)|0,s0=s0+Math.imul(p,O)|0,s0=s0+Math.imul(I$,P$)|0,I=I+Math.imul(I$,O)|0,v=v+Math.imul(X$,e)|0,s0=s0+Math.imul(X$,M$)|0,s0=s0+Math.imul(w,e)|0,I=I+Math.imul(w,M$)|0,v=v+Math.imul(B,S$)|0,s0=s0+Math.imul(B,F)|0,s0=s0+Math.imul(U$,S$)|0,I=I+Math.imul(U$,F)|0;var Z0=(n0+v|0)+((s0&8191)<<13)|0;n0=(I+(s0>>>13)|0)+(Z0>>>26)|0,Z0&=67108863,v=Math.imul(O$,P$),s0=Math.imul(O$,O),s0=s0+Math.imul(c,P$)|0,I=Math.imul(c,O),v=v+Math.imul(p,e)|0,s0=s0+Math.imul(p,M$)|0,s0=s0+Math.imul(I$,e)|0,I=I+Math.imul(I$,M$)|0,v=v+Math.imul(X$,S$)|0,s0=s0+Math.imul(X$,F)|0,s0=s0+Math.imul(w,S$)|0,I=I+Math.imul(w,F)|0;var w$=(n0+v|0)+((s0&8191)<<13)|0;n0=(I+(s0>>>13)|0)+(w$>>>26)|0,w$&=67108863,v=Math.imul(O$,e),s0=Math.imul(O$,M$),s0=s0+Math.imul(c,e)|0,I=Math.imul(c,M$),v=v+Math.imul(p,S$)|0,s0=s0+Math.imul(p,F)|0,s0=s0+Math.imul(I$,S$)|0,I=I+Math.imul(I$,F)|0;var G0=(n0+v|0)+((s0&8191)<<13)|0;n0=(I+(s0>>>13)|0)+(G0>>>26)|0,G0&=67108863,v=Math.imul(O$,S$),s0=Math.imul(O$,F),s0=s0+Math.imul(c,S$)|0,I=Math.imul(c,F);var p$=(n0+v|0)+((s0&8191)<<13)|0;return n0=(I+(s0>>>13)|0)+(p$>>>26)|0,p$&=67108863,S[0]=v$,S[1]=r,S[2]=q$,S[3]=i,S[4]=j$,S[5]=k$,S[6]=g$,S[7]=_$,S[8]=N$,S[9]=$0,S[10]=x$,S[11]=Q0,S[12]=B$,S[13]=Y0,S[14]=y$,S[15]=Z0,S[16]=w$,S[17]=G0,S[18]=p$,n0!==0&&(S[19]=n0,o0.length++),o0};Math.imul||(p0=E);function T(l0,z,o0){o0.negative=z.negative^l0.negative,o0.length=l0.length+z.length;for(var M=0,u0=0,S=0;S>>26)|0,u0+=n0>>>26,n0&=67108863}o0.words[S]=v,M=n0,n0=u0}return M!==0?o0.words[S]=M:o0.length--,o0.strip()}function f0(l0,z,o0){var M=new D;return M.mulp(l0,z,o0)}Z.prototype.mulTo=function(l0,z){var o0,M=this.length+l0.length;return this.length===10&&l0.length===10?o0=p0(this,l0,z):M<63?o0=E(this,l0,z):M<1024?o0=T(this,l0,z):o0=f0(this,l0,z),o0};function D(l0,z){this.x=l0,this.y=z}D.prototype.makeRBT=function(l0){for(var z=new Array(l0),o0=Z.prototype._countBits(l0)-1,M=0;M>=1;return M},D.prototype.permute=function(l0,z,o0,M,u0,S){for(var n0=0;n0>>1)u0++;return 1<>>13,o0[2*S+1]=u0&8191,u0=u0>>>13;for(S=2*z;S>=26,z+=M/67108864|0,z+=u0>>>26,this.words[o0]=u0&67108863}return z!==0&&(this.words[o0]=z,this.length++),this},Z.prototype.muln=function(l0){return this.clone().imuln(l0)},Z.prototype.sqr=function(){return this.mul(this)},Z.prototype.isqr=function(){return this.imul(this.clone())},Z.prototype.pow=function(l0){var z=w0(l0);if(z.length===0)return new Z(1);for(var o0=this,M=0;M=0);var z=l0%26,o0=(l0-z)/26,M=67108863>>>26-z<<26-z,u0;if(z!==0){var S=0;for(u0=0;u0>>26-z}S&&(this.words[u0]=S,this.length++)}if(o0!==0){for(u0=this.length-1;u0>=0;u0--)this.words[u0+o0]=this.words[u0];for(u0=0;u0=0);var M;z?M=(z-z%26)/26:M=0;var u0=l0%26,S=Math.min((l0-u0)/26,this.length),n0=67108863^67108863>>>u0<S)for(this.length-=S,s0=0;s0=0&&(I!==0||s0>=M);s0--){var t0=this.words[s0]|0;this.words[s0]=I<<26-u0|t0>>>u0,I=t0&n0}return v&&I!==0&&(v.words[v.length++]=I),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},Z.prototype.ishrn=function(l0,z,o0){return Y(this.negative===0),this.iushrn(l0,z,o0)},Z.prototype.shln=function(l0){return this.clone().ishln(l0)},Z.prototype.ushln=function(l0){return this.clone().iushln(l0)},Z.prototype.shrn=function(l0){return this.clone().ishrn(l0)},Z.prototype.ushrn=function(l0){return this.clone().iushrn(l0)},Z.prototype.testn=function(l0){Y(typeof l0=="number"&&l0>=0);var z=l0%26,o0=(l0-z)/26,M=1<=0);var z=l0%26,o0=(l0-z)/26;if(Y(this.negative===0,"imaskn works only with positive numbers"),this.length<=o0)return this;if(z!==0&&o0++,this.length=Math.min(o0,this.length),z!==0){var M=67108863^67108863>>>z<=67108864;z++)this.words[z]-=67108864,z===this.length-1?this.words[z+1]=1:this.words[z+1]++;return this.length=Math.max(this.length,z+1),this},Z.prototype.isubn=function(l0){if(Y(typeof l0=="number"),Y(l0<67108864),l0<0)return this.iaddn(-l0);if(this.negative!==0)return this.negative=0,this.iaddn(l0),this.negative=1,this;if(this.words[0]-=l0,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var z=0;z>26)-(v/67108864|0),this.words[u0+o0]=S&67108863}for(;u0>26,this.words[u0+o0]=S&67108863;if(n0===0)return this.strip();for(Y(n0===-1),n0=0,u0=0;u0>26,this.words[u0]=S&67108863;return this.negative=1,this.strip()},Z.prototype._wordDiv=function(l0,z){var o0=this.length-l0.length,M=this.clone(),u0=l0,S=u0.words[u0.length-1]|0,n0=this._countBits(S);o0=26-n0,o0!==0&&(u0=u0.ushln(o0),M.iushln(o0),S=u0.words[u0.length-1]|0);var v=M.length-u0.length,s0;if(z!=="mod"){s0=new Z(null),s0.length=v+1,s0.words=new Array(s0.length);for(var I=0;I=0;m0--){var a0=(M.words[u0.length+m0]|0)*67108864+(M.words[u0.length+m0-1]|0);for(a0=Math.min(a0/S|0,67108863),M._ishlnsubmul(u0,a0,m0);M.negative!==0;)a0--,M.negative=0,M._ishlnsubmul(u0,1,m0),M.isZero()||(M.negative^=1);s0&&(s0.words[m0]=a0)}return s0&&s0.strip(),M.strip(),z!=="div"&&o0!==0&&M.iushrn(o0),{div:s0||null,mod:M}},Z.prototype.divmod=function(l0,z,o0){if(Y(!l0.isZero()),this.isZero())return{div:new Z(0),mod:new Z(0)};var M,u0,S;return this.negative!==0&&l0.negative===0?(S=this.neg().divmod(l0,z),z!=="mod"&&(M=S.div.neg()),z!=="div"&&(u0=S.mod.neg(),o0&&u0.negative!==0&&u0.iadd(l0)),{div:M,mod:u0}):this.negative===0&&l0.negative!==0?(S=this.divmod(l0.neg(),z),z!=="mod"&&(M=S.div.neg()),{div:M,mod:S.mod}):(this.negative&l0.negative)!==0?(S=this.neg().divmod(l0.neg(),z),z!=="div"&&(u0=S.mod.neg(),o0&&u0.negative!==0&&u0.isub(l0)),{div:S.div,mod:u0}):l0.length>this.length||this.cmp(l0)<0?{div:new Z(0),mod:this}:l0.length===1?z==="div"?{div:this.divn(l0.words[0]),mod:null}:z==="mod"?{div:null,mod:new Z(this.modn(l0.words[0]))}:{div:this.divn(l0.words[0]),mod:new Z(this.modn(l0.words[0]))}:this._wordDiv(l0,z)},Z.prototype.div=function(l0){return this.divmod(l0,"div",!1).div},Z.prototype.mod=function(l0){return this.divmod(l0,"mod",!1).mod},Z.prototype.umod=function(l0){return this.divmod(l0,"mod",!0).mod},Z.prototype.divRound=function(l0){var z=this.divmod(l0);if(z.mod.isZero())return z.div;var o0=z.div.negative!==0?z.mod.isub(l0):z.mod,M=l0.ushrn(1),u0=l0.andln(1),S=o0.cmp(M);return S<0||u0===1&&S===0?z.div:z.div.negative!==0?z.div.isubn(1):z.div.iaddn(1)},Z.prototype.modn=function(l0){Y(l0<=67108863);for(var z=(1<<26)%l0,o0=0,M=this.length-1;M>=0;M--)o0=(z*o0+(this.words[M]|0))%l0;return o0},Z.prototype.idivn=function(l0){Y(l0<=67108863);for(var z=0,o0=this.length-1;o0>=0;o0--){var M=(this.words[o0]|0)+z*67108864;this.words[o0]=M/l0|0,z=M%l0}return this.strip()},Z.prototype.divn=function(l0){return this.clone().idivn(l0)},Z.prototype.egcd=function(l0){Y(l0.negative===0),Y(!l0.isZero());var z=this,o0=l0.clone();z.negative!==0?z=z.umod(l0):z=z.clone();for(var M=new Z(1),u0=new Z(0),S=new Z(0),n0=new Z(1),v=0;z.isEven()&&o0.isEven();)z.iushrn(1),o0.iushrn(1),++v;for(var s0=o0.clone(),I=z.clone();!z.isZero();){for(var t0=0,m0=1;(z.words[0]&m0)===0&&t0<26;++t0,m0<<=1);if(t0>0)for(z.iushrn(t0);t0-- >0;)(M.isOdd()||u0.isOdd())&&(M.iadd(s0),u0.isub(I)),M.iushrn(1),u0.iushrn(1);for(var a0=0,q=1;(o0.words[0]&q)===0&&a0<26;++a0,q<<=1);if(a0>0)for(o0.iushrn(a0);a0-- >0;)(S.isOdd()||n0.isOdd())&&(S.iadd(s0),n0.isub(I)),S.iushrn(1),n0.iushrn(1);z.cmp(o0)>=0?(z.isub(o0),M.isub(S),u0.isub(n0)):(o0.isub(z),S.isub(M),n0.isub(u0))}return{a:S,b:n0,gcd:o0.iushln(v)}},Z.prototype._invmp=function(l0){Y(l0.negative===0),Y(!l0.isZero());var z=this,o0=l0.clone();z.negative!==0?z=z.umod(l0):z=z.clone();for(var M=new Z(1),u0=new Z(0),S=o0.clone();z.cmpn(1)>0&&o0.cmpn(1)>0;){for(var n0=0,v=1;(z.words[0]&v)===0&&n0<26;++n0,v<<=1);if(n0>0)for(z.iushrn(n0);n0-- >0;)M.isOdd()&&M.iadd(S),M.iushrn(1);for(var s0=0,I=1;(o0.words[0]&I)===0&&s0<26;++s0,I<<=1);if(s0>0)for(o0.iushrn(s0);s0-- >0;)u0.isOdd()&&u0.iadd(S),u0.iushrn(1);z.cmp(o0)>=0?(z.isub(o0),M.isub(u0)):(o0.isub(z),u0.isub(M))}var t0;return z.cmpn(1)===0?t0=M:t0=u0,t0.cmpn(0)<0&&t0.iadd(l0),t0},Z.prototype.gcd=function(l0){if(this.isZero())return l0.abs();if(l0.isZero())return this.abs();var z=this.clone(),o0=l0.clone();z.negative=0,o0.negative=0;for(var M=0;z.isEven()&&o0.isEven();M++)z.iushrn(1),o0.iushrn(1);do{for(;z.isEven();)z.iushrn(1);for(;o0.isEven();)o0.iushrn(1);var u0=z.cmp(o0);if(u0<0){var S=z;z=o0,o0=S}else if(u0===0||o0.cmpn(1)===0)break;z.isub(o0)}while(!0);return o0.iushln(M)},Z.prototype.invm=function(l0){return this.egcd(l0).a.umod(l0)},Z.prototype.isEven=function(){return(this.words[0]&1)===0},Z.prototype.isOdd=function(){return(this.words[0]&1)===1},Z.prototype.andln=function(l0){return this.words[0]&l0},Z.prototype.bincn=function(l0){Y(typeof l0=="number");var z=l0%26,o0=(l0-z)/26,M=1<>>26,n0&=67108863,this.words[S]=n0}return u0!==0&&(this.words[S]=u0,this.length++),this},Z.prototype.isZero=function(){return this.length===1&&this.words[0]===0},Z.prototype.cmpn=function(l0){var z=l0<0;if(this.negative!==0&&!z)return-1;if(this.negative===0&&z)return 1;this.strip();var o0;if(this.length>1)o0=1;else{z&&(l0=-l0),Y(l0<=67108863,"Number is too big");var M=this.words[0]|0;o0=M===l0?0:Ml0.length)return 1;if(this.length=0;o0--){var M=this.words[o0]|0,u0=l0.words[o0]|0;if(M!==u0){Mu0&&(z=1);break}}return z},Z.prototype.gtn=function(l0){return this.cmpn(l0)===1},Z.prototype.gt=function(l0){return this.cmp(l0)===1},Z.prototype.gten=function(l0){return this.cmpn(l0)>=0},Z.prototype.gte=function(l0){return this.cmp(l0)>=0},Z.prototype.ltn=function(l0){return this.cmpn(l0)===-1},Z.prototype.lt=function(l0){return this.cmp(l0)===-1},Z.prototype.lten=function(l0){return this.cmpn(l0)<=0},Z.prototype.lte=function(l0){return this.cmp(l0)<=0},Z.prototype.eqn=function(l0){return this.cmpn(l0)===0},Z.prototype.eq=function(l0){return this.cmp(l0)===0},Z.red=function(l0){return new b0(l0)},Z.prototype.toRed=function(l0){return Y(!this.red,"Already a number in reduction context"),Y(this.negative===0,"red works only with positives"),l0.convertTo(this)._forceRed(l0)},Z.prototype.fromRed=function(){return Y(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},Z.prototype._forceRed=function(l0){return this.red=l0,this},Z.prototype.forceRed=function(l0){return Y(!this.red,"Already a number in reduction context"),this._forceRed(l0)},Z.prototype.redAdd=function(l0){return Y(this.red,"redAdd works only with red numbers"),this.red.add(this,l0)},Z.prototype.redIAdd=function(l0){return Y(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,l0)},Z.prototype.redSub=function(l0){return Y(this.red,"redSub works only with red numbers"),this.red.sub(this,l0)},Z.prototype.redISub=function(l0){return Y(this.red,"redISub works only with red numbers"),this.red.isub(this,l0)},Z.prototype.redShl=function(l0){return Y(this.red,"redShl works only with red numbers"),this.red.shl(this,l0)},Z.prototype.redMul=function(l0){return Y(this.red,"redMul works only with red numbers"),this.red._verify2(this,l0),this.red.mul(this,l0)},Z.prototype.redIMul=function(l0){return Y(this.red,"redMul works only with red numbers"),this.red._verify2(this,l0),this.red.imul(this,l0)},Z.prototype.redSqr=function(){return Y(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},Z.prototype.redISqr=function(){return Y(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},Z.prototype.redSqrt=function(){return Y(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},Z.prototype.redInvm=function(){return Y(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},Z.prototype.redNeg=function(){return Y(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},Z.prototype.redPow=function(l0){return Y(this.red&&!l0.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,l0)};var c0={k256:null,p224:null,p192:null,p25519:null};function C(l0,z){this.name=l0,this.p=new Z(z,16),this.n=this.p.bitLength(),this.k=new Z(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}C.prototype._tmp=function(){var l0=new Z(null);return l0.words=new Array(Math.ceil(this.n/13)),l0},C.prototype.ireduce=function(l0){var z=l0,o0;do this.split(z,this.tmp),z=this.imulK(z),z=z.iadd(this.tmp),o0=z.bitLength();while(o0>this.n);var M=o00?z.isub(this.p):z.strip!==void 0?z.strip():z._strip(),z},C.prototype.split=function(l0,z){l0.iushrn(this.n,0,z)},C.prototype.imulK=function(l0){return l0.imul(this.k)};function h0(){C.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}$(h0,C),h0.prototype.split=function(l0,z){for(var o0=4194303,M=Math.min(l0.length,9),u0=0;u0>>22,S=n0}S>>>=22,l0.words[u0-10]=S,S===0&&l0.length>10?l0.length-=10:l0.length-=9},h0.prototype.imulK=function(l0){l0.words[l0.length]=0,l0.words[l0.length+1]=0,l0.length+=2;for(var z=0,o0=0;o0>>=26,l0.words[o0]=u0,z=M}return z!==0&&(l0.words[l0.length++]=z),l0},Z._prime=function(l0){if(c0[l0])return c0[l0];var z;if(l0==="k256")z=new h0;else if(l0==="p224")z=new L;else if(l0==="p192")z=new d0;else if(l0==="p25519")z=new R;else throw new Error("Unknown prime "+l0);return c0[l0]=z,z};function b0(l0){if(typeof l0=="string"){var z=Z._prime(l0);this.m=z.p,this.prime=z}else Y(l0.gtn(1),"modulus must be greater than 1"),this.m=l0,this.prime=null}b0.prototype._verify1=function(l0){Y(l0.negative===0,"red works only with positives"),Y(l0.red,"red works only with red numbers")},b0.prototype._verify2=function(l0,z){Y((l0.negative|z.negative)===0,"red works only with positives"),Y(l0.red&&l0.red===z.red,"red works only with red numbers")},b0.prototype.imod=function(l0){return this.prime?this.prime.ireduce(l0)._forceRed(this):l0.umod(this.m)._forceRed(this)},b0.prototype.neg=function(l0){return l0.isZero()?l0.clone():this.m.sub(l0)._forceRed(this)},b0.prototype.add=function(l0,z){this._verify2(l0,z);var o0=l0.add(z);return o0.cmp(this.m)>=0&&o0.isub(this.m),o0._forceRed(this)},b0.prototype.iadd=function(l0,z){this._verify2(l0,z);var o0=l0.iadd(z);return o0.cmp(this.m)>=0&&o0.isub(this.m),o0},b0.prototype.sub=function(l0,z){this._verify2(l0,z);var o0=l0.sub(z);return o0.cmpn(0)<0&&o0.iadd(this.m),o0._forceRed(this)},b0.prototype.isub=function(l0,z){this._verify2(l0,z);var o0=l0.isub(z);return o0.cmpn(0)<0&&o0.iadd(this.m),o0},b0.prototype.shl=function(l0,z){return this._verify1(l0),this.imod(l0.ushln(z))},b0.prototype.imul=function(l0,z){return this._verify2(l0,z),this.imod(l0.imul(z))},b0.prototype.mul=function(l0,z){return this._verify2(l0,z),this.imod(l0.mul(z))},b0.prototype.isqr=function(l0){return this.imul(l0,l0.clone())},b0.prototype.sqr=function(l0){return this.mul(l0,l0)},b0.prototype.sqrt=function(l0){if(l0.isZero())return l0.clone();var z=this.m.andln(3);if(Y(z%2===1),z===3){var o0=this.m.add(new Z(1)).iushrn(2);return this.pow(l0,o0)}for(var M=this.m.subn(1),u0=0;!M.isZero()&&M.andln(1)===0;)u0++,M.iushrn(1);Y(!M.isZero());var S=new Z(1).toRed(this),n0=S.redNeg(),v=this.m.subn(1).iushrn(1),s0=this.m.bitLength();for(s0=new Z(2*s0*s0).toRed(this);this.pow(s0,v).cmp(n0)!==0;)s0.redIAdd(n0);for(var I=this.pow(s0,M),t0=this.pow(l0,M.addn(1).iushrn(1)),m0=this.pow(l0,M),a0=u0;m0.cmp(S)!==0;){for(var q=m0,e0=0;q.cmp(S)!==0;e0++)q=q.redSqr();Y(e0=0;u0--){for(var I=z.words[u0],t0=s0-1;t0>=0;t0--){var m0=I>>t0&1;if(S!==M[0]&&(S=this.sqr(S)),m0===0&&n0===0){v=0;continue}n0<<=1,n0|=m0,v++,!(v!==o0&&(u0!==0||t0!==0))&&(S=this.mul(S,M[n0]),v=0,n0=0)}s0=26}return S},b0.prototype.convertTo=function(l0){var z=l0.umod(this.m);return z===l0?z.clone():z},b0.prototype.convertFrom=function(l0){var z=l0.clone();return z.red=null,z},Z.mont=function(l0){return new P(l0)};function P(l0){b0.call(this,l0),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new Z(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}$(P,b0),P.prototype.convertTo=function(l0){return this.imod(l0.ushln(this.shift))},P.prototype.convertFrom=function(l0){var z=this.imod(l0.mul(this.rinv));return z.red=null,z},P.prototype.imul=function(l0,z){if(l0.isZero()||z.isZero())return l0.words[0]=0,l0.length=1,l0;var o0=l0.imul(z),M=o0.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),u0=o0.isub(M).iushrn(this.shift),S=u0;return u0.cmp(this.m)>=0?S=u0.isub(this.m):u0.cmpn(0)<0&&(S=u0.iadd(this.m)),S._forceRed(this)},P.prototype.mul=function(l0,z){if(l0.isZero()||z.isZero())return new Z(0)._forceRed(this);var o0=l0.mul(z),M=o0.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),u0=o0.isub(M).iushrn(this.shift),S=u0;return u0.cmp(this.m)>=0?S=u0.isub(this.m):u0.cmpn(0)<0&&(S=u0.iadd(this.m)),S._forceRed(this)},P.prototype.invm=function(l0){var z=this.imod(l0._invmp(this.m).mul(this.r2));return z._forceRed(this)}})(typeof K>"u"||K,X)}}),_Q=$Q({"node_modules/miller-rabin/node_modules/bn.js/lib/bn.js"(X,K){(function(x0,G){function Y(l0,z){if(!l0)throw new Error(z||"Assertion failed")}function $(l0,z){l0.super_=z;var o0=function(){};o0.prototype=z.prototype,l0.prototype=new o0,l0.prototype.constructor=l0}function Z(l0,z,o0){if(Z.isBN(l0))return l0;this.negative=0,this.words=null,this.length=0,this.red=null,l0!==null&&((z==="le"||z==="be")&&(o0=z,z=10),this._init(l0||0,z||10,o0||"be"))}typeof x0=="object"?x0.exports=Z:G.BN=Z,Z.BN=Z,Z.wordSize=26;var Q=c$;Z.isBN=function(l0){return l0 instanceof Z?!0:l0!==null&&typeof l0=="object"&&l0.constructor.wordSize===Z.wordSize&&Array.isArray(l0.words)},Z.max=function(l0,z){return l0.cmp(z)>0?l0:z},Z.min=function(l0,z){return l0.cmp(z)<0?l0:z},Z.prototype._init=function(l0,z,o0){if(typeof l0=="number")return this._initNumber(l0,z,o0);if(typeof l0=="object")return this._initArray(l0,z,o0);z==="hex"&&(z=16),Y(z===(z|0)&&z>=2&&z<=36),l0=l0.toString().replace(/\s+/g,"");var M=0;l0[0]==="-"&&(M++,this.negative=1),M=0;M-=3)S=l0[M]|l0[M-1]<<8|l0[M-2]<<16,this.words[u0]|=S<>>26-n0&67108863,n0+=24,n0>=26&&(n0-=26,u0++);else if(o0==="le")for(M=0,u0=0;M>>26-n0&67108863,n0+=24,n0>=26&&(n0-=26,u0++);return this.strip()};function U(l0,z){var o0=l0.charCodeAt(z);return o0>=65&&o0<=70?o0-55:o0>=97&&o0<=102?o0-87:o0-48&15}function V(l0,z,o0){var M=U(l0,o0);return o0-1>=z&&(M|=U(l0,o0-1)<<4),M}Z.prototype._parseHex=function(l0,z,o0){this.length=Math.ceil((l0.length-z)/6),this.words=new Array(this.length);for(var M=0;M=z;M-=2)n0=V(l0,z,M)<=18?(u0-=18,S+=1,this.words[S]|=n0>>>26):u0+=8;else{var v=l0.length-z;for(M=v%2===0?z+1:z;M=18?(u0-=18,S+=1,this.words[S]|=n0>>>26):u0+=8}this.strip()};function B0(l0,z,o0,M){for(var u0=0,S=Math.min(l0.length,o0),n0=z;n0=49?u0+=v-49+10:v>=17?u0+=v-17+10:u0+=v}return u0}Z.prototype._parseBase=function(l0,z,o0){this.words=[0],this.length=1;for(var M=0,u0=1;u0<=67108863;u0*=z)M++;M--,u0=u0/z|0;for(var S=l0.length-o0,n0=S%M,v=Math.min(S,S-n0)+o0,s0=0,I=o0;I1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},Z.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},Z.prototype.inspect=function(){return(this.red?""};var H=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],y0=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],W=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64000000,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,24300000,28629151,33554432,39135393,45435424,52521875,60466176];Z.prototype.toString=function(l0,z){l0=l0||10,z=z|0||1;var o0;if(l0===16||l0==="hex"){o0="";for(var M=0,u0=0,S=0;S>>24-M&16777215,u0!==0||S!==this.length-1?o0=H[6-v.length]+v+o0:o0=v+o0,M+=2,M>=26&&(M-=26,S--)}for(u0!==0&&(o0=u0.toString(16)+o0);o0.length%z!==0;)o0="0"+o0;return this.negative!==0&&(o0="-"+o0),o0}if(l0===(l0|0)&&l0>=2&&l0<=36){var s0=y0[l0],I=W[l0];o0="";var t0=this.clone();for(t0.negative=0;!t0.isZero();){var m0=t0.modn(I).toString(l0);t0=t0.idivn(I),t0.isZero()?o0=m0+o0:o0=H[s0-m0.length]+m0+o0}for(this.isZero()&&(o0="0"+o0);o0.length%z!==0;)o0="0"+o0;return this.negative!==0&&(o0="-"+o0),o0}Y(!1,"Base should be between 2 and 36")},Z.prototype.toNumber=function(){var l0=this.words[0];return this.length===2?l0+=this.words[1]*67108864:this.length===3&&this.words[2]===1?l0+=4503599627370496+this.words[1]*67108864:this.length>2&&Y(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-l0:l0},Z.prototype.toJSON=function(){return this.toString(16)},Z.prototype.toBuffer=function(l0,z){return Y(typeof Q<"u"),this.toArrayLike(Q,l0,z)},Z.prototype.toArray=function(l0,z){return this.toArrayLike(Array,l0,z)},Z.prototype.toArrayLike=function(l0,z,o0){var M=this.byteLength(),u0=o0||Math.max(1,M);Y(M<=u0,"byte array longer than desired length"),Y(u0>0,"Requested array length <= 0"),this.strip();var S=z==="le",n0=new l0(u0),v,s0,I=this.clone();if(S){for(s0=0;!I.isZero();s0++)v=I.andln(255),I.iushrn(8),n0[s0]=v;for(;s0=4096&&(o0+=13,z>>>=13),z>=64&&(o0+=7,z>>>=7),z>=8&&(o0+=4,z>>>=4),z>=2&&(o0+=2,z>>>=2),o0+z},Z.prototype._zeroBits=function(l0){if(l0===0)return 26;var z=l0,o0=0;return(z&8191)===0&&(o0+=13,z>>>=13),(z&127)===0&&(o0+=7,z>>>=7),(z&15)===0&&(o0+=4,z>>>=4),(z&3)===0&&(o0+=2,z>>>=2),(z&1)===0&&o0++,o0},Z.prototype.bitLength=function(){var l0=this.words[this.length-1],z=this._countBits(l0);return(this.length-1)*26+z};function w0(l0){for(var z=new Array(l0.bitLength()),o0=0;o0>>u0}return z}Z.prototype.zeroBits=function(){if(this.isZero())return 0;for(var l0=0,z=0;zl0.length?this.clone().ior(l0):l0.clone().ior(this)},Z.prototype.uor=function(l0){return this.length>l0.length?this.clone().iuor(l0):l0.clone().iuor(this)},Z.prototype.iuand=function(l0){var z;this.length>l0.length?z=l0:z=this;for(var o0=0;o0l0.length?this.clone().iand(l0):l0.clone().iand(this)},Z.prototype.uand=function(l0){return this.length>l0.length?this.clone().iuand(l0):l0.clone().iuand(this)},Z.prototype.iuxor=function(l0){var z,o0;this.length>l0.length?(z=this,o0=l0):(z=l0,o0=this);for(var M=0;Ml0.length?this.clone().ixor(l0):l0.clone().ixor(this)},Z.prototype.uxor=function(l0){return this.length>l0.length?this.clone().iuxor(l0):l0.clone().iuxor(this)},Z.prototype.inotn=function(l0){Y(typeof l0=="number"&&l0>=0);var z=Math.ceil(l0/26)|0,o0=l0%26;this._expand(z),o0>0&&z--;for(var M=0;M0&&(this.words[M]=~this.words[M]&67108863>>26-o0),this.strip()},Z.prototype.notn=function(l0){return this.clone().inotn(l0)},Z.prototype.setn=function(l0,z){Y(typeof l0=="number"&&l0>=0);var o0=l0/26|0,M=l0%26;return this._expand(o0+1),z?this.words[o0]=this.words[o0]|1<l0.length?(o0=this,M=l0):(o0=l0,M=this);for(var u0=0,S=0;S>>26;for(;u0!==0&&S>>26;if(this.length=o0.length,u0!==0)this.words[this.length]=u0,this.length++;else if(o0!==this)for(;Sl0.length?this.clone().iadd(l0):l0.clone().iadd(this)},Z.prototype.isub=function(l0){if(l0.negative!==0){l0.negative=0;var z=this.iadd(l0);return l0.negative=1,z._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(l0),this.negative=1,this._normSign();var o0=this.cmp(l0);if(o0===0)return this.negative=0,this.length=1,this.words[0]=0,this;var M,u0;o0>0?(M=this,u0=l0):(M=l0,u0=this);for(var S=0,n0=0;n0>26,this.words[n0]=z&67108863;for(;S!==0&&n0>26,this.words[n0]=z&67108863;if(S===0&&n0>>26,m0=s0&67108863,a0=Math.min(I,z.length-1),q=Math.max(0,I-l0.length+1);q<=a0;q++){var e0=I-q|0;u0=l0.words[e0]|0,S=z.words[q]|0,n0=u0*S+m0,t0+=n0/67108864|0,m0=n0&67108863}o0.words[I]=m0|0,s0=t0|0}return s0!==0?o0.words[I]=s0|0:o0.length--,o0.strip()}var p0=function(l0,z,o0){var M=l0.words,u0=z.words,S=o0.words,n0=0,v,s0,I,t0=M[0]|0,m0=t0&8191,a0=t0>>>13,q=M[1]|0,e0=q&8191,r0=q>>>13,i0=M[2]|0,j=i0&8191,$$=i0>>>13,k=M[3]|0,Q$=k&8191,g=k>>>13,Y$=M[4]|0,_=Y$&8191,Z$=Y$>>>13,N=M[5]|0,G$=N&8191,x=N>>>13,V$=M[6]|0,B=V$&8191,U$=V$>>>13,y=M[7]|0,X$=y&8191,w=y>>>13,K$=M[8]|0,p=K$&8191,I$=K$>>>13,f=M[9]|0,O$=f&8191,c=f>>>13,J$=u0[0]|0,h=J$&8191,F$=J$>>>13,d=u0[1]|0,A$=d&8191,b=d>>>13,H$=u0[2]|0,l=H$&8191,W$=H$>>>13,o=u0[3]|0,E$=o&8191,u=o>>>13,T$=u0[4]|0,n=T$&8191,D$=T$>>>13,s=u0[5]|0,C$=s&8191,t=s>>>13,L$=u0[6]|0,m=L$&8191,R$=L$>>>13,a=u0[7]|0,P$=a&8191,O=a>>>13,z$=u0[8]|0,e=z$&8191,M$=z$>>>13,J=u0[9]|0,S$=J&8191,F=J>>>13;o0.negative=l0.negative^z.negative,o0.length=19,v=Math.imul(m0,h),s0=Math.imul(m0,F$),s0=s0+Math.imul(a0,h)|0,I=Math.imul(a0,F$);var v$=(n0+v|0)+((s0&8191)<<13)|0;n0=(I+(s0>>>13)|0)+(v$>>>26)|0,v$&=67108863,v=Math.imul(e0,h),s0=Math.imul(e0,F$),s0=s0+Math.imul(r0,h)|0,I=Math.imul(r0,F$),v=v+Math.imul(m0,A$)|0,s0=s0+Math.imul(m0,b)|0,s0=s0+Math.imul(a0,A$)|0,I=I+Math.imul(a0,b)|0;var r=(n0+v|0)+((s0&8191)<<13)|0;n0=(I+(s0>>>13)|0)+(r>>>26)|0,r&=67108863,v=Math.imul(j,h),s0=Math.imul(j,F$),s0=s0+Math.imul($$,h)|0,I=Math.imul($$,F$),v=v+Math.imul(e0,A$)|0,s0=s0+Math.imul(e0,b)|0,s0=s0+Math.imul(r0,A$)|0,I=I+Math.imul(r0,b)|0,v=v+Math.imul(m0,l)|0,s0=s0+Math.imul(m0,W$)|0,s0=s0+Math.imul(a0,l)|0,I=I+Math.imul(a0,W$)|0;var q$=(n0+v|0)+((s0&8191)<<13)|0;n0=(I+(s0>>>13)|0)+(q$>>>26)|0,q$&=67108863,v=Math.imul(Q$,h),s0=Math.imul(Q$,F$),s0=s0+Math.imul(g,h)|0,I=Math.imul(g,F$),v=v+Math.imul(j,A$)|0,s0=s0+Math.imul(j,b)|0,s0=s0+Math.imul($$,A$)|0,I=I+Math.imul($$,b)|0,v=v+Math.imul(e0,l)|0,s0=s0+Math.imul(e0,W$)|0,s0=s0+Math.imul(r0,l)|0,I=I+Math.imul(r0,W$)|0,v=v+Math.imul(m0,E$)|0,s0=s0+Math.imul(m0,u)|0,s0=s0+Math.imul(a0,E$)|0,I=I+Math.imul(a0,u)|0;var i=(n0+v|0)+((s0&8191)<<13)|0;n0=(I+(s0>>>13)|0)+(i>>>26)|0,i&=67108863,v=Math.imul(_,h),s0=Math.imul(_,F$),s0=s0+Math.imul(Z$,h)|0,I=Math.imul(Z$,F$),v=v+Math.imul(Q$,A$)|0,s0=s0+Math.imul(Q$,b)|0,s0=s0+Math.imul(g,A$)|0,I=I+Math.imul(g,b)|0,v=v+Math.imul(j,l)|0,s0=s0+Math.imul(j,W$)|0,s0=s0+Math.imul($$,l)|0,I=I+Math.imul($$,W$)|0,v=v+Math.imul(e0,E$)|0,s0=s0+Math.imul(e0,u)|0,s0=s0+Math.imul(r0,E$)|0,I=I+Math.imul(r0,u)|0,v=v+Math.imul(m0,n)|0,s0=s0+Math.imul(m0,D$)|0,s0=s0+Math.imul(a0,n)|0,I=I+Math.imul(a0,D$)|0;var j$=(n0+v|0)+((s0&8191)<<13)|0;n0=(I+(s0>>>13)|0)+(j$>>>26)|0,j$&=67108863,v=Math.imul(G$,h),s0=Math.imul(G$,F$),s0=s0+Math.imul(x,h)|0,I=Math.imul(x,F$),v=v+Math.imul(_,A$)|0,s0=s0+Math.imul(_,b)|0,s0=s0+Math.imul(Z$,A$)|0,I=I+Math.imul(Z$,b)|0,v=v+Math.imul(Q$,l)|0,s0=s0+Math.imul(Q$,W$)|0,s0=s0+Math.imul(g,l)|0,I=I+Math.imul(g,W$)|0,v=v+Math.imul(j,E$)|0,s0=s0+Math.imul(j,u)|0,s0=s0+Math.imul($$,E$)|0,I=I+Math.imul($$,u)|0,v=v+Math.imul(e0,n)|0,s0=s0+Math.imul(e0,D$)|0,s0=s0+Math.imul(r0,n)|0,I=I+Math.imul(r0,D$)|0,v=v+Math.imul(m0,C$)|0,s0=s0+Math.imul(m0,t)|0,s0=s0+Math.imul(a0,C$)|0,I=I+Math.imul(a0,t)|0;var k$=(n0+v|0)+((s0&8191)<<13)|0;n0=(I+(s0>>>13)|0)+(k$>>>26)|0,k$&=67108863,v=Math.imul(B,h),s0=Math.imul(B,F$),s0=s0+Math.imul(U$,h)|0,I=Math.imul(U$,F$),v=v+Math.imul(G$,A$)|0,s0=s0+Math.imul(G$,b)|0,s0=s0+Math.imul(x,A$)|0,I=I+Math.imul(x,b)|0,v=v+Math.imul(_,l)|0,s0=s0+Math.imul(_,W$)|0,s0=s0+Math.imul(Z$,l)|0,I=I+Math.imul(Z$,W$)|0,v=v+Math.imul(Q$,E$)|0,s0=s0+Math.imul(Q$,u)|0,s0=s0+Math.imul(g,E$)|0,I=I+Math.imul(g,u)|0,v=v+Math.imul(j,n)|0,s0=s0+Math.imul(j,D$)|0,s0=s0+Math.imul($$,n)|0,I=I+Math.imul($$,D$)|0,v=v+Math.imul(e0,C$)|0,s0=s0+Math.imul(e0,t)|0,s0=s0+Math.imul(r0,C$)|0,I=I+Math.imul(r0,t)|0,v=v+Math.imul(m0,m)|0,s0=s0+Math.imul(m0,R$)|0,s0=s0+Math.imul(a0,m)|0,I=I+Math.imul(a0,R$)|0;var g$=(n0+v|0)+((s0&8191)<<13)|0;n0=(I+(s0>>>13)|0)+(g$>>>26)|0,g$&=67108863,v=Math.imul(X$,h),s0=Math.imul(X$,F$),s0=s0+Math.imul(w,h)|0,I=Math.imul(w,F$),v=v+Math.imul(B,A$)|0,s0=s0+Math.imul(B,b)|0,s0=s0+Math.imul(U$,A$)|0,I=I+Math.imul(U$,b)|0,v=v+Math.imul(G$,l)|0,s0=s0+Math.imul(G$,W$)|0,s0=s0+Math.imul(x,l)|0,I=I+Math.imul(x,W$)|0,v=v+Math.imul(_,E$)|0,s0=s0+Math.imul(_,u)|0,s0=s0+Math.imul(Z$,E$)|0,I=I+Math.imul(Z$,u)|0,v=v+Math.imul(Q$,n)|0,s0=s0+Math.imul(Q$,D$)|0,s0=s0+Math.imul(g,n)|0,I=I+Math.imul(g,D$)|0,v=v+Math.imul(j,C$)|0,s0=s0+Math.imul(j,t)|0,s0=s0+Math.imul($$,C$)|0,I=I+Math.imul($$,t)|0,v=v+Math.imul(e0,m)|0,s0=s0+Math.imul(e0,R$)|0,s0=s0+Math.imul(r0,m)|0,I=I+Math.imul(r0,R$)|0,v=v+Math.imul(m0,P$)|0,s0=s0+Math.imul(m0,O)|0,s0=s0+Math.imul(a0,P$)|0,I=I+Math.imul(a0,O)|0;var _$=(n0+v|0)+((s0&8191)<<13)|0;n0=(I+(s0>>>13)|0)+(_$>>>26)|0,_$&=67108863,v=Math.imul(p,h),s0=Math.imul(p,F$),s0=s0+Math.imul(I$,h)|0,I=Math.imul(I$,F$),v=v+Math.imul(X$,A$)|0,s0=s0+Math.imul(X$,b)|0,s0=s0+Math.imul(w,A$)|0,I=I+Math.imul(w,b)|0,v=v+Math.imul(B,l)|0,s0=s0+Math.imul(B,W$)|0,s0=s0+Math.imul(U$,l)|0,I=I+Math.imul(U$,W$)|0,v=v+Math.imul(G$,E$)|0,s0=s0+Math.imul(G$,u)|0,s0=s0+Math.imul(x,E$)|0,I=I+Math.imul(x,u)|0,v=v+Math.imul(_,n)|0,s0=s0+Math.imul(_,D$)|0,s0=s0+Math.imul(Z$,n)|0,I=I+Math.imul(Z$,D$)|0,v=v+Math.imul(Q$,C$)|0,s0=s0+Math.imul(Q$,t)|0,s0=s0+Math.imul(g,C$)|0,I=I+Math.imul(g,t)|0,v=v+Math.imul(j,m)|0,s0=s0+Math.imul(j,R$)|0,s0=s0+Math.imul($$,m)|0,I=I+Math.imul($$,R$)|0,v=v+Math.imul(e0,P$)|0,s0=s0+Math.imul(e0,O)|0,s0=s0+Math.imul(r0,P$)|0,I=I+Math.imul(r0,O)|0,v=v+Math.imul(m0,e)|0,s0=s0+Math.imul(m0,M$)|0,s0=s0+Math.imul(a0,e)|0,I=I+Math.imul(a0,M$)|0;var N$=(n0+v|0)+((s0&8191)<<13)|0;n0=(I+(s0>>>13)|0)+(N$>>>26)|0,N$&=67108863,v=Math.imul(O$,h),s0=Math.imul(O$,F$),s0=s0+Math.imul(c,h)|0,I=Math.imul(c,F$),v=v+Math.imul(p,A$)|0,s0=s0+Math.imul(p,b)|0,s0=s0+Math.imul(I$,A$)|0,I=I+Math.imul(I$,b)|0,v=v+Math.imul(X$,l)|0,s0=s0+Math.imul(X$,W$)|0,s0=s0+Math.imul(w,l)|0,I=I+Math.imul(w,W$)|0,v=v+Math.imul(B,E$)|0,s0=s0+Math.imul(B,u)|0,s0=s0+Math.imul(U$,E$)|0,I=I+Math.imul(U$,u)|0,v=v+Math.imul(G$,n)|0,s0=s0+Math.imul(G$,D$)|0,s0=s0+Math.imul(x,n)|0,I=I+Math.imul(x,D$)|0,v=v+Math.imul(_,C$)|0,s0=s0+Math.imul(_,t)|0,s0=s0+Math.imul(Z$,C$)|0,I=I+Math.imul(Z$,t)|0,v=v+Math.imul(Q$,m)|0,s0=s0+Math.imul(Q$,R$)|0,s0=s0+Math.imul(g,m)|0,I=I+Math.imul(g,R$)|0,v=v+Math.imul(j,P$)|0,s0=s0+Math.imul(j,O)|0,s0=s0+Math.imul($$,P$)|0,I=I+Math.imul($$,O)|0,v=v+Math.imul(e0,e)|0,s0=s0+Math.imul(e0,M$)|0,s0=s0+Math.imul(r0,e)|0,I=I+Math.imul(r0,M$)|0,v=v+Math.imul(m0,S$)|0,s0=s0+Math.imul(m0,F)|0,s0=s0+Math.imul(a0,S$)|0,I=I+Math.imul(a0,F)|0;var $0=(n0+v|0)+((s0&8191)<<13)|0;n0=(I+(s0>>>13)|0)+($0>>>26)|0,$0&=67108863,v=Math.imul(O$,A$),s0=Math.imul(O$,b),s0=s0+Math.imul(c,A$)|0,I=Math.imul(c,b),v=v+Math.imul(p,l)|0,s0=s0+Math.imul(p,W$)|0,s0=s0+Math.imul(I$,l)|0,I=I+Math.imul(I$,W$)|0,v=v+Math.imul(X$,E$)|0,s0=s0+Math.imul(X$,u)|0,s0=s0+Math.imul(w,E$)|0,I=I+Math.imul(w,u)|0,v=v+Math.imul(B,n)|0,s0=s0+Math.imul(B,D$)|0,s0=s0+Math.imul(U$,n)|0,I=I+Math.imul(U$,D$)|0,v=v+Math.imul(G$,C$)|0,s0=s0+Math.imul(G$,t)|0,s0=s0+Math.imul(x,C$)|0,I=I+Math.imul(x,t)|0,v=v+Math.imul(_,m)|0,s0=s0+Math.imul(_,R$)|0,s0=s0+Math.imul(Z$,m)|0,I=I+Math.imul(Z$,R$)|0,v=v+Math.imul(Q$,P$)|0,s0=s0+Math.imul(Q$,O)|0,s0=s0+Math.imul(g,P$)|0,I=I+Math.imul(g,O)|0,v=v+Math.imul(j,e)|0,s0=s0+Math.imul(j,M$)|0,s0=s0+Math.imul($$,e)|0,I=I+Math.imul($$,M$)|0,v=v+Math.imul(e0,S$)|0,s0=s0+Math.imul(e0,F)|0,s0=s0+Math.imul(r0,S$)|0,I=I+Math.imul(r0,F)|0;var x$=(n0+v|0)+((s0&8191)<<13)|0;n0=(I+(s0>>>13)|0)+(x$>>>26)|0,x$&=67108863,v=Math.imul(O$,l),s0=Math.imul(O$,W$),s0=s0+Math.imul(c,l)|0,I=Math.imul(c,W$),v=v+Math.imul(p,E$)|0,s0=s0+Math.imul(p,u)|0,s0=s0+Math.imul(I$,E$)|0,I=I+Math.imul(I$,u)|0,v=v+Math.imul(X$,n)|0,s0=s0+Math.imul(X$,D$)|0,s0=s0+Math.imul(w,n)|0,I=I+Math.imul(w,D$)|0,v=v+Math.imul(B,C$)|0,s0=s0+Math.imul(B,t)|0,s0=s0+Math.imul(U$,C$)|0,I=I+Math.imul(U$,t)|0,v=v+Math.imul(G$,m)|0,s0=s0+Math.imul(G$,R$)|0,s0=s0+Math.imul(x,m)|0,I=I+Math.imul(x,R$)|0,v=v+Math.imul(_,P$)|0,s0=s0+Math.imul(_,O)|0,s0=s0+Math.imul(Z$,P$)|0,I=I+Math.imul(Z$,O)|0,v=v+Math.imul(Q$,e)|0,s0=s0+Math.imul(Q$,M$)|0,s0=s0+Math.imul(g,e)|0,I=I+Math.imul(g,M$)|0,v=v+Math.imul(j,S$)|0,s0=s0+Math.imul(j,F)|0,s0=s0+Math.imul($$,S$)|0,I=I+Math.imul($$,F)|0;var Q0=(n0+v|0)+((s0&8191)<<13)|0;n0=(I+(s0>>>13)|0)+(Q0>>>26)|0,Q0&=67108863,v=Math.imul(O$,E$),s0=Math.imul(O$,u),s0=s0+Math.imul(c,E$)|0,I=Math.imul(c,u),v=v+Math.imul(p,n)|0,s0=s0+Math.imul(p,D$)|0,s0=s0+Math.imul(I$,n)|0,I=I+Math.imul(I$,D$)|0,v=v+Math.imul(X$,C$)|0,s0=s0+Math.imul(X$,t)|0,s0=s0+Math.imul(w,C$)|0,I=I+Math.imul(w,t)|0,v=v+Math.imul(B,m)|0,s0=s0+Math.imul(B,R$)|0,s0=s0+Math.imul(U$,m)|0,I=I+Math.imul(U$,R$)|0,v=v+Math.imul(G$,P$)|0,s0=s0+Math.imul(G$,O)|0,s0=s0+Math.imul(x,P$)|0,I=I+Math.imul(x,O)|0,v=v+Math.imul(_,e)|0,s0=s0+Math.imul(_,M$)|0,s0=s0+Math.imul(Z$,e)|0,I=I+Math.imul(Z$,M$)|0,v=v+Math.imul(Q$,S$)|0,s0=s0+Math.imul(Q$,F)|0,s0=s0+Math.imul(g,S$)|0,I=I+Math.imul(g,F)|0;var B$=(n0+v|0)+((s0&8191)<<13)|0;n0=(I+(s0>>>13)|0)+(B$>>>26)|0,B$&=67108863,v=Math.imul(O$,n),s0=Math.imul(O$,D$),s0=s0+Math.imul(c,n)|0,I=Math.imul(c,D$),v=v+Math.imul(p,C$)|0,s0=s0+Math.imul(p,t)|0,s0=s0+Math.imul(I$,C$)|0,I=I+Math.imul(I$,t)|0,v=v+Math.imul(X$,m)|0,s0=s0+Math.imul(X$,R$)|0,s0=s0+Math.imul(w,m)|0,I=I+Math.imul(w,R$)|0,v=v+Math.imul(B,P$)|0,s0=s0+Math.imul(B,O)|0,s0=s0+Math.imul(U$,P$)|0,I=I+Math.imul(U$,O)|0,v=v+Math.imul(G$,e)|0,s0=s0+Math.imul(G$,M$)|0,s0=s0+Math.imul(x,e)|0,I=I+Math.imul(x,M$)|0,v=v+Math.imul(_,S$)|0,s0=s0+Math.imul(_,F)|0,s0=s0+Math.imul(Z$,S$)|0,I=I+Math.imul(Z$,F)|0;var Y0=(n0+v|0)+((s0&8191)<<13)|0;n0=(I+(s0>>>13)|0)+(Y0>>>26)|0,Y0&=67108863,v=Math.imul(O$,C$),s0=Math.imul(O$,t),s0=s0+Math.imul(c,C$)|0,I=Math.imul(c,t),v=v+Math.imul(p,m)|0,s0=s0+Math.imul(p,R$)|0,s0=s0+Math.imul(I$,m)|0,I=I+Math.imul(I$,R$)|0,v=v+Math.imul(X$,P$)|0,s0=s0+Math.imul(X$,O)|0,s0=s0+Math.imul(w,P$)|0,I=I+Math.imul(w,O)|0,v=v+Math.imul(B,e)|0,s0=s0+Math.imul(B,M$)|0,s0=s0+Math.imul(U$,e)|0,I=I+Math.imul(U$,M$)|0,v=v+Math.imul(G$,S$)|0,s0=s0+Math.imul(G$,F)|0,s0=s0+Math.imul(x,S$)|0,I=I+Math.imul(x,F)|0;var y$=(n0+v|0)+((s0&8191)<<13)|0;n0=(I+(s0>>>13)|0)+(y$>>>26)|0,y$&=67108863,v=Math.imul(O$,m),s0=Math.imul(O$,R$),s0=s0+Math.imul(c,m)|0,I=Math.imul(c,R$),v=v+Math.imul(p,P$)|0,s0=s0+Math.imul(p,O)|0,s0=s0+Math.imul(I$,P$)|0,I=I+Math.imul(I$,O)|0,v=v+Math.imul(X$,e)|0,s0=s0+Math.imul(X$,M$)|0,s0=s0+Math.imul(w,e)|0,I=I+Math.imul(w,M$)|0,v=v+Math.imul(B,S$)|0,s0=s0+Math.imul(B,F)|0,s0=s0+Math.imul(U$,S$)|0,I=I+Math.imul(U$,F)|0;var Z0=(n0+v|0)+((s0&8191)<<13)|0;n0=(I+(s0>>>13)|0)+(Z0>>>26)|0,Z0&=67108863,v=Math.imul(O$,P$),s0=Math.imul(O$,O),s0=s0+Math.imul(c,P$)|0,I=Math.imul(c,O),v=v+Math.imul(p,e)|0,s0=s0+Math.imul(p,M$)|0,s0=s0+Math.imul(I$,e)|0,I=I+Math.imul(I$,M$)|0,v=v+Math.imul(X$,S$)|0,s0=s0+Math.imul(X$,F)|0,s0=s0+Math.imul(w,S$)|0,I=I+Math.imul(w,F)|0;var w$=(n0+v|0)+((s0&8191)<<13)|0;n0=(I+(s0>>>13)|0)+(w$>>>26)|0,w$&=67108863,v=Math.imul(O$,e),s0=Math.imul(O$,M$),s0=s0+Math.imul(c,e)|0,I=Math.imul(c,M$),v=v+Math.imul(p,S$)|0,s0=s0+Math.imul(p,F)|0,s0=s0+Math.imul(I$,S$)|0,I=I+Math.imul(I$,F)|0;var G0=(n0+v|0)+((s0&8191)<<13)|0;n0=(I+(s0>>>13)|0)+(G0>>>26)|0,G0&=67108863,v=Math.imul(O$,S$),s0=Math.imul(O$,F),s0=s0+Math.imul(c,S$)|0,I=Math.imul(c,F);var p$=(n0+v|0)+((s0&8191)<<13)|0;return n0=(I+(s0>>>13)|0)+(p$>>>26)|0,p$&=67108863,S[0]=v$,S[1]=r,S[2]=q$,S[3]=i,S[4]=j$,S[5]=k$,S[6]=g$,S[7]=_$,S[8]=N$,S[9]=$0,S[10]=x$,S[11]=Q0,S[12]=B$,S[13]=Y0,S[14]=y$,S[15]=Z0,S[16]=w$,S[17]=G0,S[18]=p$,n0!==0&&(S[19]=n0,o0.length++),o0};Math.imul||(p0=E);function T(l0,z,o0){o0.negative=z.negative^l0.negative,o0.length=l0.length+z.length;for(var M=0,u0=0,S=0;S>>26)|0,u0+=n0>>>26,n0&=67108863}o0.words[S]=v,M=n0,n0=u0}return M!==0?o0.words[S]=M:o0.length--,o0.strip()}function f0(l0,z,o0){var M=new D;return M.mulp(l0,z,o0)}Z.prototype.mulTo=function(l0,z){var o0,M=this.length+l0.length;return this.length===10&&l0.length===10?o0=p0(this,l0,z):M<63?o0=E(this,l0,z):M<1024?o0=T(this,l0,z):o0=f0(this,l0,z),o0};function D(l0,z){this.x=l0,this.y=z}D.prototype.makeRBT=function(l0){for(var z=new Array(l0),o0=Z.prototype._countBits(l0)-1,M=0;M>=1;return M},D.prototype.permute=function(l0,z,o0,M,u0,S){for(var n0=0;n0>>1)u0++;return 1<>>13,o0[2*S+1]=u0&8191,u0=u0>>>13;for(S=2*z;S>=26,z+=M/67108864|0,z+=u0>>>26,this.words[o0]=u0&67108863}return z!==0&&(this.words[o0]=z,this.length++),this},Z.prototype.muln=function(l0){return this.clone().imuln(l0)},Z.prototype.sqr=function(){return this.mul(this)},Z.prototype.isqr=function(){return this.imul(this.clone())},Z.prototype.pow=function(l0){var z=w0(l0);if(z.length===0)return new Z(1);for(var o0=this,M=0;M=0);var z=l0%26,o0=(l0-z)/26,M=67108863>>>26-z<<26-z,u0;if(z!==0){var S=0;for(u0=0;u0>>26-z}S&&(this.words[u0]=S,this.length++)}if(o0!==0){for(u0=this.length-1;u0>=0;u0--)this.words[u0+o0]=this.words[u0];for(u0=0;u0=0);var M;z?M=(z-z%26)/26:M=0;var u0=l0%26,S=Math.min((l0-u0)/26,this.length),n0=67108863^67108863>>>u0<S)for(this.length-=S,s0=0;s0=0&&(I!==0||s0>=M);s0--){var t0=this.words[s0]|0;this.words[s0]=I<<26-u0|t0>>>u0,I=t0&n0}return v&&I!==0&&(v.words[v.length++]=I),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},Z.prototype.ishrn=function(l0,z,o0){return Y(this.negative===0),this.iushrn(l0,z,o0)},Z.prototype.shln=function(l0){return this.clone().ishln(l0)},Z.prototype.ushln=function(l0){return this.clone().iushln(l0)},Z.prototype.shrn=function(l0){return this.clone().ishrn(l0)},Z.prototype.ushrn=function(l0){return this.clone().iushrn(l0)},Z.prototype.testn=function(l0){Y(typeof l0=="number"&&l0>=0);var z=l0%26,o0=(l0-z)/26,M=1<=0);var z=l0%26,o0=(l0-z)/26;if(Y(this.negative===0,"imaskn works only with positive numbers"),this.length<=o0)return this;if(z!==0&&o0++,this.length=Math.min(o0,this.length),z!==0){var M=67108863^67108863>>>z<=67108864;z++)this.words[z]-=67108864,z===this.length-1?this.words[z+1]=1:this.words[z+1]++;return this.length=Math.max(this.length,z+1),this},Z.prototype.isubn=function(l0){if(Y(typeof l0=="number"),Y(l0<67108864),l0<0)return this.iaddn(-l0);if(this.negative!==0)return this.negative=0,this.iaddn(l0),this.negative=1,this;if(this.words[0]-=l0,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var z=0;z>26)-(v/67108864|0),this.words[u0+o0]=S&67108863}for(;u0>26,this.words[u0+o0]=S&67108863;if(n0===0)return this.strip();for(Y(n0===-1),n0=0,u0=0;u0>26,this.words[u0]=S&67108863;return this.negative=1,this.strip()},Z.prototype._wordDiv=function(l0,z){var o0=this.length-l0.length,M=this.clone(),u0=l0,S=u0.words[u0.length-1]|0,n0=this._countBits(S);o0=26-n0,o0!==0&&(u0=u0.ushln(o0),M.iushln(o0),S=u0.words[u0.length-1]|0);var v=M.length-u0.length,s0;if(z!=="mod"){s0=new Z(null),s0.length=v+1,s0.words=new Array(s0.length);for(var I=0;I=0;m0--){var a0=(M.words[u0.length+m0]|0)*67108864+(M.words[u0.length+m0-1]|0);for(a0=Math.min(a0/S|0,67108863),M._ishlnsubmul(u0,a0,m0);M.negative!==0;)a0--,M.negative=0,M._ishlnsubmul(u0,1,m0),M.isZero()||(M.negative^=1);s0&&(s0.words[m0]=a0)}return s0&&s0.strip(),M.strip(),z!=="div"&&o0!==0&&M.iushrn(o0),{div:s0||null,mod:M}},Z.prototype.divmod=function(l0,z,o0){if(Y(!l0.isZero()),this.isZero())return{div:new Z(0),mod:new Z(0)};var M,u0,S;return this.negative!==0&&l0.negative===0?(S=this.neg().divmod(l0,z),z!=="mod"&&(M=S.div.neg()),z!=="div"&&(u0=S.mod.neg(),o0&&u0.negative!==0&&u0.iadd(l0)),{div:M,mod:u0}):this.negative===0&&l0.negative!==0?(S=this.divmod(l0.neg(),z),z!=="mod"&&(M=S.div.neg()),{div:M,mod:S.mod}):(this.negative&l0.negative)!==0?(S=this.neg().divmod(l0.neg(),z),z!=="div"&&(u0=S.mod.neg(),o0&&u0.negative!==0&&u0.isub(l0)),{div:S.div,mod:u0}):l0.length>this.length||this.cmp(l0)<0?{div:new Z(0),mod:this}:l0.length===1?z==="div"?{div:this.divn(l0.words[0]),mod:null}:z==="mod"?{div:null,mod:new Z(this.modn(l0.words[0]))}:{div:this.divn(l0.words[0]),mod:new Z(this.modn(l0.words[0]))}:this._wordDiv(l0,z)},Z.prototype.div=function(l0){return this.divmod(l0,"div",!1).div},Z.prototype.mod=function(l0){return this.divmod(l0,"mod",!1).mod},Z.prototype.umod=function(l0){return this.divmod(l0,"mod",!0).mod},Z.prototype.divRound=function(l0){var z=this.divmod(l0);if(z.mod.isZero())return z.div;var o0=z.div.negative!==0?z.mod.isub(l0):z.mod,M=l0.ushrn(1),u0=l0.andln(1),S=o0.cmp(M);return S<0||u0===1&&S===0?z.div:z.div.negative!==0?z.div.isubn(1):z.div.iaddn(1)},Z.prototype.modn=function(l0){Y(l0<=67108863);for(var z=(1<<26)%l0,o0=0,M=this.length-1;M>=0;M--)o0=(z*o0+(this.words[M]|0))%l0;return o0},Z.prototype.idivn=function(l0){Y(l0<=67108863);for(var z=0,o0=this.length-1;o0>=0;o0--){var M=(this.words[o0]|0)+z*67108864;this.words[o0]=M/l0|0,z=M%l0}return this.strip()},Z.prototype.divn=function(l0){return this.clone().idivn(l0)},Z.prototype.egcd=function(l0){Y(l0.negative===0),Y(!l0.isZero());var z=this,o0=l0.clone();z.negative!==0?z=z.umod(l0):z=z.clone();for(var M=new Z(1),u0=new Z(0),S=new Z(0),n0=new Z(1),v=0;z.isEven()&&o0.isEven();)z.iushrn(1),o0.iushrn(1),++v;for(var s0=o0.clone(),I=z.clone();!z.isZero();){for(var t0=0,m0=1;(z.words[0]&m0)===0&&t0<26;++t0,m0<<=1);if(t0>0)for(z.iushrn(t0);t0-- >0;)(M.isOdd()||u0.isOdd())&&(M.iadd(s0),u0.isub(I)),M.iushrn(1),u0.iushrn(1);for(var a0=0,q=1;(o0.words[0]&q)===0&&a0<26;++a0,q<<=1);if(a0>0)for(o0.iushrn(a0);a0-- >0;)(S.isOdd()||n0.isOdd())&&(S.iadd(s0),n0.isub(I)),S.iushrn(1),n0.iushrn(1);z.cmp(o0)>=0?(z.isub(o0),M.isub(S),u0.isub(n0)):(o0.isub(z),S.isub(M),n0.isub(u0))}return{a:S,b:n0,gcd:o0.iushln(v)}},Z.prototype._invmp=function(l0){Y(l0.negative===0),Y(!l0.isZero());var z=this,o0=l0.clone();z.negative!==0?z=z.umod(l0):z=z.clone();for(var M=new Z(1),u0=new Z(0),S=o0.clone();z.cmpn(1)>0&&o0.cmpn(1)>0;){for(var n0=0,v=1;(z.words[0]&v)===0&&n0<26;++n0,v<<=1);if(n0>0)for(z.iushrn(n0);n0-- >0;)M.isOdd()&&M.iadd(S),M.iushrn(1);for(var s0=0,I=1;(o0.words[0]&I)===0&&s0<26;++s0,I<<=1);if(s0>0)for(o0.iushrn(s0);s0-- >0;)u0.isOdd()&&u0.iadd(S),u0.iushrn(1);z.cmp(o0)>=0?(z.isub(o0),M.isub(u0)):(o0.isub(z),u0.isub(M))}var t0;return z.cmpn(1)===0?t0=M:t0=u0,t0.cmpn(0)<0&&t0.iadd(l0),t0},Z.prototype.gcd=function(l0){if(this.isZero())return l0.abs();if(l0.isZero())return this.abs();var z=this.clone(),o0=l0.clone();z.negative=0,o0.negative=0;for(var M=0;z.isEven()&&o0.isEven();M++)z.iushrn(1),o0.iushrn(1);do{for(;z.isEven();)z.iushrn(1);for(;o0.isEven();)o0.iushrn(1);var u0=z.cmp(o0);if(u0<0){var S=z;z=o0,o0=S}else if(u0===0||o0.cmpn(1)===0)break;z.isub(o0)}while(!0);return o0.iushln(M)},Z.prototype.invm=function(l0){return this.egcd(l0).a.umod(l0)},Z.prototype.isEven=function(){return(this.words[0]&1)===0},Z.prototype.isOdd=function(){return(this.words[0]&1)===1},Z.prototype.andln=function(l0){return this.words[0]&l0},Z.prototype.bincn=function(l0){Y(typeof l0=="number");var z=l0%26,o0=(l0-z)/26,M=1<>>26,n0&=67108863,this.words[S]=n0}return u0!==0&&(this.words[S]=u0,this.length++),this},Z.prototype.isZero=function(){return this.length===1&&this.words[0]===0},Z.prototype.cmpn=function(l0){var z=l0<0;if(this.negative!==0&&!z)return-1;if(this.negative===0&&z)return 1;this.strip();var o0;if(this.length>1)o0=1;else{z&&(l0=-l0),Y(l0<=67108863,"Number is too big");var M=this.words[0]|0;o0=M===l0?0:Ml0.length)return 1;if(this.length=0;o0--){var M=this.words[o0]|0,u0=l0.words[o0]|0;if(M!==u0){Mu0&&(z=1);break}}return z},Z.prototype.gtn=function(l0){return this.cmpn(l0)===1},Z.prototype.gt=function(l0){return this.cmp(l0)===1},Z.prototype.gten=function(l0){return this.cmpn(l0)>=0},Z.prototype.gte=function(l0){return this.cmp(l0)>=0},Z.prototype.ltn=function(l0){return this.cmpn(l0)===-1},Z.prototype.lt=function(l0){return this.cmp(l0)===-1},Z.prototype.lten=function(l0){return this.cmpn(l0)<=0},Z.prototype.lte=function(l0){return this.cmp(l0)<=0},Z.prototype.eqn=function(l0){return this.cmpn(l0)===0},Z.prototype.eq=function(l0){return this.cmp(l0)===0},Z.red=function(l0){return new b0(l0)},Z.prototype.toRed=function(l0){return Y(!this.red,"Already a number in reduction context"),Y(this.negative===0,"red works only with positives"),l0.convertTo(this)._forceRed(l0)},Z.prototype.fromRed=function(){return Y(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},Z.prototype._forceRed=function(l0){return this.red=l0,this},Z.prototype.forceRed=function(l0){return Y(!this.red,"Already a number in reduction context"),this._forceRed(l0)},Z.prototype.redAdd=function(l0){return Y(this.red,"redAdd works only with red numbers"),this.red.add(this,l0)},Z.prototype.redIAdd=function(l0){return Y(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,l0)},Z.prototype.redSub=function(l0){return Y(this.red,"redSub works only with red numbers"),this.red.sub(this,l0)},Z.prototype.redISub=function(l0){return Y(this.red,"redISub works only with red numbers"),this.red.isub(this,l0)},Z.prototype.redShl=function(l0){return Y(this.red,"redShl works only with red numbers"),this.red.shl(this,l0)},Z.prototype.redMul=function(l0){return Y(this.red,"redMul works only with red numbers"),this.red._verify2(this,l0),this.red.mul(this,l0)},Z.prototype.redIMul=function(l0){return Y(this.red,"redMul works only with red numbers"),this.red._verify2(this,l0),this.red.imul(this,l0)},Z.prototype.redSqr=function(){return Y(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},Z.prototype.redISqr=function(){return Y(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},Z.prototype.redSqrt=function(){return Y(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},Z.prototype.redInvm=function(){return Y(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},Z.prototype.redNeg=function(){return Y(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},Z.prototype.redPow=function(l0){return Y(this.red&&!l0.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,l0)};var c0={k256:null,p224:null,p192:null,p25519:null};function C(l0,z){this.name=l0,this.p=new Z(z,16),this.n=this.p.bitLength(),this.k=new Z(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}C.prototype._tmp=function(){var l0=new Z(null);return l0.words=new Array(Math.ceil(this.n/13)),l0},C.prototype.ireduce=function(l0){var z=l0,o0;do this.split(z,this.tmp),z=this.imulK(z),z=z.iadd(this.tmp),o0=z.bitLength();while(o0>this.n);var M=o00?z.isub(this.p):z.strip!==void 0?z.strip():z._strip(),z},C.prototype.split=function(l0,z){l0.iushrn(this.n,0,z)},C.prototype.imulK=function(l0){return l0.imul(this.k)};function h0(){C.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}$(h0,C),h0.prototype.split=function(l0,z){for(var o0=4194303,M=Math.min(l0.length,9),u0=0;u0>>22,S=n0}S>>>=22,l0.words[u0-10]=S,S===0&&l0.length>10?l0.length-=10:l0.length-=9},h0.prototype.imulK=function(l0){l0.words[l0.length]=0,l0.words[l0.length+1]=0,l0.length+=2;for(var z=0,o0=0;o0>>=26,l0.words[o0]=u0,z=M}return z!==0&&(l0.words[l0.length++]=z),l0},Z._prime=function(l0){if(c0[l0])return c0[l0];var z;if(l0==="k256")z=new h0;else if(l0==="p224")z=new L;else if(l0==="p192")z=new d0;else if(l0==="p25519")z=new R;else throw new Error("Unknown prime "+l0);return c0[l0]=z,z};function b0(l0){if(typeof l0=="string"){var z=Z._prime(l0);this.m=z.p,this.prime=z}else Y(l0.gtn(1),"modulus must be greater than 1"),this.m=l0,this.prime=null}b0.prototype._verify1=function(l0){Y(l0.negative===0,"red works only with positives"),Y(l0.red,"red works only with red numbers")},b0.prototype._verify2=function(l0,z){Y((l0.negative|z.negative)===0,"red works only with positives"),Y(l0.red&&l0.red===z.red,"red works only with red numbers")},b0.prototype.imod=function(l0){return this.prime?this.prime.ireduce(l0)._forceRed(this):l0.umod(this.m)._forceRed(this)},b0.prototype.neg=function(l0){return l0.isZero()?l0.clone():this.m.sub(l0)._forceRed(this)},b0.prototype.add=function(l0,z){this._verify2(l0,z);var o0=l0.add(z);return o0.cmp(this.m)>=0&&o0.isub(this.m),o0._forceRed(this)},b0.prototype.iadd=function(l0,z){this._verify2(l0,z);var o0=l0.iadd(z);return o0.cmp(this.m)>=0&&o0.isub(this.m),o0},b0.prototype.sub=function(l0,z){this._verify2(l0,z);var o0=l0.sub(z);return o0.cmpn(0)<0&&o0.iadd(this.m),o0._forceRed(this)},b0.prototype.isub=function(l0,z){this._verify2(l0,z);var o0=l0.isub(z);return o0.cmpn(0)<0&&o0.iadd(this.m),o0},b0.prototype.shl=function(l0,z){return this._verify1(l0),this.imod(l0.ushln(z))},b0.prototype.imul=function(l0,z){return this._verify2(l0,z),this.imod(l0.imul(z))},b0.prototype.mul=function(l0,z){return this._verify2(l0,z),this.imod(l0.mul(z))},b0.prototype.isqr=function(l0){return this.imul(l0,l0.clone())},b0.prototype.sqr=function(l0){return this.mul(l0,l0)},b0.prototype.sqrt=function(l0){if(l0.isZero())return l0.clone();var z=this.m.andln(3);if(Y(z%2===1),z===3){var o0=this.m.add(new Z(1)).iushrn(2);return this.pow(l0,o0)}for(var M=this.m.subn(1),u0=0;!M.isZero()&&M.andln(1)===0;)u0++,M.iushrn(1);Y(!M.isZero());var S=new Z(1).toRed(this),n0=S.redNeg(),v=this.m.subn(1).iushrn(1),s0=this.m.bitLength();for(s0=new Z(2*s0*s0).toRed(this);this.pow(s0,v).cmp(n0)!==0;)s0.redIAdd(n0);for(var I=this.pow(s0,M),t0=this.pow(l0,M.addn(1).iushrn(1)),m0=this.pow(l0,M),a0=u0;m0.cmp(S)!==0;){for(var q=m0,e0=0;q.cmp(S)!==0;e0++)q=q.redSqr();Y(e0=0;u0--){for(var I=z.words[u0],t0=s0-1;t0>=0;t0--){var m0=I>>t0&1;if(S!==M[0]&&(S=this.sqr(S)),m0===0&&n0===0){v=0;continue}n0<<=1,n0|=m0,v++,!(v!==o0&&(u0!==0||t0!==0))&&(S=this.mul(S,M[n0]),v=0,n0=0)}s0=26}return S},b0.prototype.convertTo=function(l0){var z=l0.umod(this.m);return z===l0?z.clone():z},b0.prototype.convertFrom=function(l0){var z=l0.clone();return z.red=null,z},Z.mont=function(l0){return new P(l0)};function P(l0){b0.call(this,l0),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new Z(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}$(P,b0),P.prototype.convertTo=function(l0){return this.imod(l0.ushln(this.shift))},P.prototype.convertFrom=function(l0){var z=this.imod(l0.mul(this.rinv));return z.red=null,z},P.prototype.imul=function(l0,z){if(l0.isZero()||z.isZero())return l0.words[0]=0,l0.length=1,l0;var o0=l0.imul(z),M=o0.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),u0=o0.isub(M).iushrn(this.shift),S=u0;return u0.cmp(this.m)>=0?S=u0.isub(this.m):u0.cmpn(0)<0&&(S=u0.iadd(this.m)),S._forceRed(this)},P.prototype.mul=function(l0,z){if(l0.isZero()||z.isZero())return new Z(0)._forceRed(this);var o0=l0.mul(z),M=o0.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),u0=o0.isub(M).iushrn(this.shift),S=u0;return u0.cmp(this.m)>=0?S=u0.isub(this.m):u0.cmpn(0)<0&&(S=u0.iadd(this.m)),S._forceRed(this)},P.prototype.invm=function(l0){var z=this.imod(l0._invmp(this.m).mul(this.r2));return z._forceRed(this)}})(typeof K>"u"||K,X)}}),NQ=$Q({"(disabled):node_modules/crypto-browserify/index.js"(){}}),xQ=$Q({"node_modules/brorand/index.js"(X,K){var x0;K.exports=function(Y){return x0||(x0=new G(null)),x0.generate(Y)};function G(Y){this.rand=Y}K.exports.Rand=G,G.prototype.generate=function(Y){return this._rand(Y)},G.prototype._rand=function(Y){var $=new c$(Y);return d$.getRandomValues($),$}}}),BQ=$Q({"node_modules/miller-rabin/lib/mr.js"(X,K){var x0=_Q(),G=xQ();function Y($){this.rand=$||new G.Rand}K.exports=Y,Y.create=function($){return new Y($)},Y.prototype._randbelow=function($){var Z=$.bitLength(),Q=Math.ceil(Z/8);do var U=new x0(this.rand.generate(Q));while(U.cmp($)>=0);return U},Y.prototype._randrange=function($,Z){var Q=Z.sub($);return $.add(this._randbelow(Q))},Y.prototype.test=function($,Z,Q){var U=$.bitLength(),V=x0.mont($),B0=new x0(1).toRed(V);Z||(Z=Math.max(1,U/48|0));for(var H=$.subn(1),y0=0;!H.testn(y0);y0++);for(var W=$.shrn(y0),w0=H.toRed(V),E=!0;Z>0;Z--){var p0=this._randrange(new x0(2),H);Q&&Q(p0);var T=p0.toRed(V).redPow(W);if(!(T.cmp(B0)===0||T.cmp(w0)===0)){for(var f0=1;f00;Z--){var w0=this._randrange(new x0(2),B0),E=$.gcd(w0);if(E.cmpn(1)!==0)return E;var p0=w0.toRed(U).redPow(y0);if(!(p0.cmp(V)===0||p0.cmp(W)===0)){for(var T=1;TL;)R.ishrn(1);if(R.isEven()&&R.iadd(Q),R.testn(1)||R.iadd(U),d0.cmp(U)){if(!d0.cmp(V))for(;R.mod(y0).cmp(W);)R.iadd(p0)}else for(;R.mod(Y).cmp(E);)R.iadd(p0);if(b0=R.shrn(1),c0(b0)&&c0(R)&&C(b0)&&C(R)&&Z.test(b0)&&Z.test(R))return R}}}}),wQ=$Q({"node_modules/diffie-hellman/lib/primes.json"(X,K){K.exports={modp1:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff"},modp2:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff"},modp5:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff"},modp14:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff"},modp15:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff"},modp16:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff"},modp17:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff"},modp18:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff"}}}}),pQ=$Q({"node_modules/diffie-hellman/lib/dh.js"(X,K){var x0=A(),G=BQ(),Y=new G,$=new x0(24),Z=new x0(11),Q=new x0(10),U=new x0(3),V=new x0(7),B0=yQ(),H=ZQ();K.exports=p0;function y0(f0,D){return D=D||"utf8",c$.isBuffer(f0)||(f0=new c$(f0,D)),this._pub=new x0(f0),this}function W(f0,D){return D=D||"utf8",c$.isBuffer(f0)||(f0=new c$(f0,D)),this._priv=new x0(f0),this}var w0={};function E(f0,D){var c0=D.toString("hex"),C=[c0,f0.toString(16)].join("_");if(C in w0)return w0[C];var h0=0;if(f0.isEven()||!B0.simpleSieve||!B0.fermatTest(f0)||!Y.test(f0))return h0+=1,c0==="02"||c0==="05"?h0+=8:h0+=4,w0[C]=h0,h0;Y.test(f0.shrn(1))||(h0+=2);var L;switch(c0){case"02":f0.mod($).cmp(Z)&&(h0+=8);break;case"05":L=f0.mod(Q),L.cmp(U)&&L.cmp(V)&&(h0+=8);break;default:h0+=4}return w0[C]=h0,h0}function p0(f0,D,c0){this.setGenerator(D),this.__prime=new x0(f0),this._prime=x0.mont(this.__prime),this._primeLen=f0.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,c0?(this.setPublicKey=y0,this.setPrivateKey=W):this._primeCode=8}Object.defineProperty(p0.prototype,"verifyError",{enumerable:!0,get:function(){return typeof this._primeCode!="number"&&(this._primeCode=E(this.__prime,this.__gen)),this._primeCode}}),p0.prototype.generateKeys=function(){return this._priv||(this._priv=new x0(H(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()},p0.prototype.computeSecret=function(f0){f0=new x0(f0),f0=f0.toRed(this._prime);var D=f0.redPow(this._priv).fromRed(),c0=new c$(D.toArray()),C=this.getPrime();if(c0.length0?M:u0},Z.min=function(M,u0){return M.cmp(u0)<0?M:u0},Z.prototype._init=function(M,u0,S){if(typeof M=="number")return this._initNumber(M,u0,S);if(typeof M=="object")return this._initArray(M,u0,S);u0==="hex"&&(u0=16),Y(u0===(u0|0)&&u0>=2&&u0<=36),M=M.toString().replace(/\s+/g,"");var n0=0;M[0]==="-"&&(n0++,this.negative=1),n0=0;n0-=3)s0=M[n0]|M[n0-1]<<8|M[n0-2]<<16,this.words[v]|=s0<>>26-I&67108863,I+=24,I>=26&&(I-=26,v++);else if(S==="le")for(n0=0,v=0;n0>>26-I&67108863,I+=24,I>=26&&(I-=26,v++);return this._strip()};function U(M,u0){var S=M.charCodeAt(u0);if(S>=48&&S<=57)return S-48;if(S>=65&&S<=70)return S-55;if(S>=97&&S<=102)return S-87;Y(!1,"Invalid character in "+M)}function V(M,u0,S){var n0=U(M,S);return S-1>=u0&&(n0|=U(M,S-1)<<4),n0}Z.prototype._parseHex=function(M,u0,S){this.length=Math.ceil((M.length-u0)/6),this.words=new Array(this.length);for(var n0=0;n0=u0;n0-=2)I=V(M,u0,n0)<=18?(v-=18,s0+=1,this.words[s0]|=I>>>26):v+=8;else{var t0=M.length-u0;for(n0=t0%2===0?u0+1:u0;n0=18?(v-=18,s0+=1,this.words[s0]|=I>>>26):v+=8}this._strip()};function B0(M,u0,S,n0){for(var v=0,s0=0,I=Math.min(M.length,S),t0=u0;t0=49?s0=m0-49+10:m0>=17?s0=m0-17+10:s0=m0,Y(m0>=0&&s01&&this.words[this.length-1]===0;)this.length--;return this._normSign()},Z.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<"u"&&typeof Symbol.for=="function")try{Z.prototype[Symbol.for("nodejs.util.inspect.custom")]=y0}catch{Z.prototype.inspect=y0}else Z.prototype.inspect=y0;function y0(){return(this.red?""}var W=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],w0=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],E=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64000000,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,24300000,28629151,33554432,39135393,45435424,52521875,60466176];Z.prototype.toString=function(M,u0){M=M||10,u0=u0|0||1;var S;if(M===16||M==="hex"){S="";for(var n0=0,v=0,s0=0;s0>>24-n0&16777215,n0+=2,n0>=26&&(n0-=26,s0--),v!==0||s0!==this.length-1?S=W[6-t0.length]+t0+S:S=t0+S}for(v!==0&&(S=v.toString(16)+S);S.length%u0!==0;)S="0"+S;return this.negative!==0&&(S="-"+S),S}if(M===(M|0)&&M>=2&&M<=36){var m0=w0[M],a0=E[M];S="";var q=this.clone();for(q.negative=0;!q.isZero();){var e0=q.modrn(a0).toString(M);q=q.idivn(a0),q.isZero()?S=e0+S:S=W[m0-e0.length]+e0+S}for(this.isZero()&&(S="0"+S);S.length%u0!==0;)S="0"+S;return this.negative!==0&&(S="-"+S),S}Y(!1,"Base should be between 2 and 36")},Z.prototype.toNumber=function(){var M=this.words[0];return this.length===2?M+=this.words[1]*67108864:this.length===3&&this.words[2]===1?M+=4503599627370496+this.words[1]*67108864:this.length>2&&Y(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-M:M},Z.prototype.toJSON=function(){return this.toString(16,2)},Q&&(Z.prototype.toBuffer=function(M,u0){return this.toArrayLike(Q,M,u0)}),Z.prototype.toArray=function(M,u0){return this.toArrayLike(Array,M,u0)};var p0=function(M,u0){return M.allocUnsafe?M.allocUnsafe(u0):new M(u0)};Z.prototype.toArrayLike=function(M,u0,S){this._strip();var n0=this.byteLength(),v=S||Math.max(1,n0);Y(n0<=v,"byte array longer than desired length"),Y(v>0,"Requested array length <= 0");var s0=p0(M,v),I=u0==="le"?"LE":"BE";return this["_toArrayLike"+I](s0,n0),s0},Z.prototype._toArrayLikeLE=function(M,u0){for(var S=0,n0=0,v=0,s0=0;v>8&255),S>16&255),s0===6?(S>24&255),n0=0,s0=0):(n0=I>>>24,s0+=2)}if(S=0&&(M[S--]=I>>8&255),S>=0&&(M[S--]=I>>16&255),s0===6?(S>=0&&(M[S--]=I>>24&255),n0=0,s0=0):(n0=I>>>24,s0+=2)}if(S>=0)for(M[S--]=n0;S>=0;)M[S--]=0},Math.clz32?Z.prototype._countBits=function(M){return 32-Math.clz32(M)}:Z.prototype._countBits=function(M){var u0=M,S=0;return u0>=4096&&(S+=13,u0>>>=13),u0>=64&&(S+=7,u0>>>=7),u0>=8&&(S+=4,u0>>>=4),u0>=2&&(S+=2,u0>>>=2),S+u0},Z.prototype._zeroBits=function(M){if(M===0)return 26;var u0=M,S=0;return(u0&8191)===0&&(S+=13,u0>>>=13),(u0&127)===0&&(S+=7,u0>>>=7),(u0&15)===0&&(S+=4,u0>>>=4),(u0&3)===0&&(S+=2,u0>>>=2),(u0&1)===0&&S++,S},Z.prototype.bitLength=function(){var M=this.words[this.length-1],u0=this._countBits(M);return(this.length-1)*26+u0};function T(M){for(var u0=new Array(M.bitLength()),S=0;S>>v&1}return u0}Z.prototype.zeroBits=function(){if(this.isZero())return 0;for(var M=0,u0=0;u0M.length?this.clone().ior(M):M.clone().ior(this)},Z.prototype.uor=function(M){return this.length>M.length?this.clone().iuor(M):M.clone().iuor(this)},Z.prototype.iuand=function(M){var u0;this.length>M.length?u0=M:u0=this;for(var S=0;SM.length?this.clone().iand(M):M.clone().iand(this)},Z.prototype.uand=function(M){return this.length>M.length?this.clone().iuand(M):M.clone().iuand(this)},Z.prototype.iuxor=function(M){var u0,S;this.length>M.length?(u0=this,S=M):(u0=M,S=this);for(var n0=0;n0M.length?this.clone().ixor(M):M.clone().ixor(this)},Z.prototype.uxor=function(M){return this.length>M.length?this.clone().iuxor(M):M.clone().iuxor(this)},Z.prototype.inotn=function(M){Y(typeof M=="number"&&M>=0);var u0=Math.ceil(M/26)|0,S=M%26;this._expand(u0),S>0&&u0--;for(var n0=0;n00&&(this.words[n0]=~this.words[n0]&67108863>>26-S),this._strip()},Z.prototype.notn=function(M){return this.clone().inotn(M)},Z.prototype.setn=function(M,u0){Y(typeof M=="number"&&M>=0);var S=M/26|0,n0=M%26;return this._expand(S+1),u0?this.words[S]=this.words[S]|1<M.length?(S=this,n0=M):(S=M,n0=this);for(var v=0,s0=0;s0>>26;for(;v!==0&&s0>>26;if(this.length=S.length,v!==0)this.words[this.length]=v,this.length++;else if(S!==this)for(;s0M.length?this.clone().iadd(M):M.clone().iadd(this)},Z.prototype.isub=function(M){if(M.negative!==0){M.negative=0;var u0=this.iadd(M);return M.negative=1,u0._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(M),this.negative=1,this._normSign();var S=this.cmp(M);if(S===0)return this.negative=0,this.length=1,this.words[0]=0,this;var n0,v;S>0?(n0=this,v=M):(n0=M,v=this);for(var s0=0,I=0;I>26,this.words[I]=u0&67108863;for(;s0!==0&&I>26,this.words[I]=u0&67108863;if(s0===0&&I>>26,e0=m0&67108863,r0=Math.min(a0,u0.length-1),i0=Math.max(0,a0-M.length+1);i0<=r0;i0++){var j=a0-i0|0;v=M.words[j]|0,s0=u0.words[i0]|0,I=v*s0+e0,q+=I/67108864|0,e0=I&67108863}S.words[a0]=e0|0,m0=q|0}return m0!==0?S.words[a0]=m0|0:S.length--,S._strip()}var D=function(M,u0,S){var n0=M.words,v=u0.words,s0=S.words,I=0,t0,m0,a0,q=n0[0]|0,e0=q&8191,r0=q>>>13,i0=n0[1]|0,j=i0&8191,$$=i0>>>13,k=n0[2]|0,Q$=k&8191,g=k>>>13,Y$=n0[3]|0,_=Y$&8191,Z$=Y$>>>13,N=n0[4]|0,G$=N&8191,x=N>>>13,V$=n0[5]|0,B=V$&8191,U$=V$>>>13,y=n0[6]|0,X$=y&8191,w=y>>>13,K$=n0[7]|0,p=K$&8191,I$=K$>>>13,f=n0[8]|0,O$=f&8191,c=f>>>13,J$=n0[9]|0,h=J$&8191,F$=J$>>>13,d=v[0]|0,A$=d&8191,b=d>>>13,H$=v[1]|0,l=H$&8191,W$=H$>>>13,o=v[2]|0,E$=o&8191,u=o>>>13,T$=v[3]|0,n=T$&8191,D$=T$>>>13,s=v[4]|0,C$=s&8191,t=s>>>13,L$=v[5]|0,m=L$&8191,R$=L$>>>13,a=v[6]|0,P$=a&8191,O=a>>>13,z$=v[7]|0,e=z$&8191,M$=z$>>>13,J=v[8]|0,S$=J&8191,F=J>>>13,v$=v[9]|0,r=v$&8191,q$=v$>>>13;S.negative=M.negative^u0.negative,S.length=19,t0=Math.imul(e0,A$),m0=Math.imul(e0,b),m0=m0+Math.imul(r0,A$)|0,a0=Math.imul(r0,b);var i=(I+t0|0)+((m0&8191)<<13)|0;I=(a0+(m0>>>13)|0)+(i>>>26)|0,i&=67108863,t0=Math.imul(j,A$),m0=Math.imul(j,b),m0=m0+Math.imul($$,A$)|0,a0=Math.imul($$,b),t0=t0+Math.imul(e0,l)|0,m0=m0+Math.imul(e0,W$)|0,m0=m0+Math.imul(r0,l)|0,a0=a0+Math.imul(r0,W$)|0;var j$=(I+t0|0)+((m0&8191)<<13)|0;I=(a0+(m0>>>13)|0)+(j$>>>26)|0,j$&=67108863,t0=Math.imul(Q$,A$),m0=Math.imul(Q$,b),m0=m0+Math.imul(g,A$)|0,a0=Math.imul(g,b),t0=t0+Math.imul(j,l)|0,m0=m0+Math.imul(j,W$)|0,m0=m0+Math.imul($$,l)|0,a0=a0+Math.imul($$,W$)|0,t0=t0+Math.imul(e0,E$)|0,m0=m0+Math.imul(e0,u)|0,m0=m0+Math.imul(r0,E$)|0,a0=a0+Math.imul(r0,u)|0;var k$=(I+t0|0)+((m0&8191)<<13)|0;I=(a0+(m0>>>13)|0)+(k$>>>26)|0,k$&=67108863,t0=Math.imul(_,A$),m0=Math.imul(_,b),m0=m0+Math.imul(Z$,A$)|0,a0=Math.imul(Z$,b),t0=t0+Math.imul(Q$,l)|0,m0=m0+Math.imul(Q$,W$)|0,m0=m0+Math.imul(g,l)|0,a0=a0+Math.imul(g,W$)|0,t0=t0+Math.imul(j,E$)|0,m0=m0+Math.imul(j,u)|0,m0=m0+Math.imul($$,E$)|0,a0=a0+Math.imul($$,u)|0,t0=t0+Math.imul(e0,n)|0,m0=m0+Math.imul(e0,D$)|0,m0=m0+Math.imul(r0,n)|0,a0=a0+Math.imul(r0,D$)|0;var g$=(I+t0|0)+((m0&8191)<<13)|0;I=(a0+(m0>>>13)|0)+(g$>>>26)|0,g$&=67108863,t0=Math.imul(G$,A$),m0=Math.imul(G$,b),m0=m0+Math.imul(x,A$)|0,a0=Math.imul(x,b),t0=t0+Math.imul(_,l)|0,m0=m0+Math.imul(_,W$)|0,m0=m0+Math.imul(Z$,l)|0,a0=a0+Math.imul(Z$,W$)|0,t0=t0+Math.imul(Q$,E$)|0,m0=m0+Math.imul(Q$,u)|0,m0=m0+Math.imul(g,E$)|0,a0=a0+Math.imul(g,u)|0,t0=t0+Math.imul(j,n)|0,m0=m0+Math.imul(j,D$)|0,m0=m0+Math.imul($$,n)|0,a0=a0+Math.imul($$,D$)|0,t0=t0+Math.imul(e0,C$)|0,m0=m0+Math.imul(e0,t)|0,m0=m0+Math.imul(r0,C$)|0,a0=a0+Math.imul(r0,t)|0;var _$=(I+t0|0)+((m0&8191)<<13)|0;I=(a0+(m0>>>13)|0)+(_$>>>26)|0,_$&=67108863,t0=Math.imul(B,A$),m0=Math.imul(B,b),m0=m0+Math.imul(U$,A$)|0,a0=Math.imul(U$,b),t0=t0+Math.imul(G$,l)|0,m0=m0+Math.imul(G$,W$)|0,m0=m0+Math.imul(x,l)|0,a0=a0+Math.imul(x,W$)|0,t0=t0+Math.imul(_,E$)|0,m0=m0+Math.imul(_,u)|0,m0=m0+Math.imul(Z$,E$)|0,a0=a0+Math.imul(Z$,u)|0,t0=t0+Math.imul(Q$,n)|0,m0=m0+Math.imul(Q$,D$)|0,m0=m0+Math.imul(g,n)|0,a0=a0+Math.imul(g,D$)|0,t0=t0+Math.imul(j,C$)|0,m0=m0+Math.imul(j,t)|0,m0=m0+Math.imul($$,C$)|0,a0=a0+Math.imul($$,t)|0,t0=t0+Math.imul(e0,m)|0,m0=m0+Math.imul(e0,R$)|0,m0=m0+Math.imul(r0,m)|0,a0=a0+Math.imul(r0,R$)|0;var N$=(I+t0|0)+((m0&8191)<<13)|0;I=(a0+(m0>>>13)|0)+(N$>>>26)|0,N$&=67108863,t0=Math.imul(X$,A$),m0=Math.imul(X$,b),m0=m0+Math.imul(w,A$)|0,a0=Math.imul(w,b),t0=t0+Math.imul(B,l)|0,m0=m0+Math.imul(B,W$)|0,m0=m0+Math.imul(U$,l)|0,a0=a0+Math.imul(U$,W$)|0,t0=t0+Math.imul(G$,E$)|0,m0=m0+Math.imul(G$,u)|0,m0=m0+Math.imul(x,E$)|0,a0=a0+Math.imul(x,u)|0,t0=t0+Math.imul(_,n)|0,m0=m0+Math.imul(_,D$)|0,m0=m0+Math.imul(Z$,n)|0,a0=a0+Math.imul(Z$,D$)|0,t0=t0+Math.imul(Q$,C$)|0,m0=m0+Math.imul(Q$,t)|0,m0=m0+Math.imul(g,C$)|0,a0=a0+Math.imul(g,t)|0,t0=t0+Math.imul(j,m)|0,m0=m0+Math.imul(j,R$)|0,m0=m0+Math.imul($$,m)|0,a0=a0+Math.imul($$,R$)|0,t0=t0+Math.imul(e0,P$)|0,m0=m0+Math.imul(e0,O)|0,m0=m0+Math.imul(r0,P$)|0,a0=a0+Math.imul(r0,O)|0;var $0=(I+t0|0)+((m0&8191)<<13)|0;I=(a0+(m0>>>13)|0)+($0>>>26)|0,$0&=67108863,t0=Math.imul(p,A$),m0=Math.imul(p,b),m0=m0+Math.imul(I$,A$)|0,a0=Math.imul(I$,b),t0=t0+Math.imul(X$,l)|0,m0=m0+Math.imul(X$,W$)|0,m0=m0+Math.imul(w,l)|0,a0=a0+Math.imul(w,W$)|0,t0=t0+Math.imul(B,E$)|0,m0=m0+Math.imul(B,u)|0,m0=m0+Math.imul(U$,E$)|0,a0=a0+Math.imul(U$,u)|0,t0=t0+Math.imul(G$,n)|0,m0=m0+Math.imul(G$,D$)|0,m0=m0+Math.imul(x,n)|0,a0=a0+Math.imul(x,D$)|0,t0=t0+Math.imul(_,C$)|0,m0=m0+Math.imul(_,t)|0,m0=m0+Math.imul(Z$,C$)|0,a0=a0+Math.imul(Z$,t)|0,t0=t0+Math.imul(Q$,m)|0,m0=m0+Math.imul(Q$,R$)|0,m0=m0+Math.imul(g,m)|0,a0=a0+Math.imul(g,R$)|0,t0=t0+Math.imul(j,P$)|0,m0=m0+Math.imul(j,O)|0,m0=m0+Math.imul($$,P$)|0,a0=a0+Math.imul($$,O)|0,t0=t0+Math.imul(e0,e)|0,m0=m0+Math.imul(e0,M$)|0,m0=m0+Math.imul(r0,e)|0,a0=a0+Math.imul(r0,M$)|0;var x$=(I+t0|0)+((m0&8191)<<13)|0;I=(a0+(m0>>>13)|0)+(x$>>>26)|0,x$&=67108863,t0=Math.imul(O$,A$),m0=Math.imul(O$,b),m0=m0+Math.imul(c,A$)|0,a0=Math.imul(c,b),t0=t0+Math.imul(p,l)|0,m0=m0+Math.imul(p,W$)|0,m0=m0+Math.imul(I$,l)|0,a0=a0+Math.imul(I$,W$)|0,t0=t0+Math.imul(X$,E$)|0,m0=m0+Math.imul(X$,u)|0,m0=m0+Math.imul(w,E$)|0,a0=a0+Math.imul(w,u)|0,t0=t0+Math.imul(B,n)|0,m0=m0+Math.imul(B,D$)|0,m0=m0+Math.imul(U$,n)|0,a0=a0+Math.imul(U$,D$)|0,t0=t0+Math.imul(G$,C$)|0,m0=m0+Math.imul(G$,t)|0,m0=m0+Math.imul(x,C$)|0,a0=a0+Math.imul(x,t)|0,t0=t0+Math.imul(_,m)|0,m0=m0+Math.imul(_,R$)|0,m0=m0+Math.imul(Z$,m)|0,a0=a0+Math.imul(Z$,R$)|0,t0=t0+Math.imul(Q$,P$)|0,m0=m0+Math.imul(Q$,O)|0,m0=m0+Math.imul(g,P$)|0,a0=a0+Math.imul(g,O)|0,t0=t0+Math.imul(j,e)|0,m0=m0+Math.imul(j,M$)|0,m0=m0+Math.imul($$,e)|0,a0=a0+Math.imul($$,M$)|0,t0=t0+Math.imul(e0,S$)|0,m0=m0+Math.imul(e0,F)|0,m0=m0+Math.imul(r0,S$)|0,a0=a0+Math.imul(r0,F)|0;var Q0=(I+t0|0)+((m0&8191)<<13)|0;I=(a0+(m0>>>13)|0)+(Q0>>>26)|0,Q0&=67108863,t0=Math.imul(h,A$),m0=Math.imul(h,b),m0=m0+Math.imul(F$,A$)|0,a0=Math.imul(F$,b),t0=t0+Math.imul(O$,l)|0,m0=m0+Math.imul(O$,W$)|0,m0=m0+Math.imul(c,l)|0,a0=a0+Math.imul(c,W$)|0,t0=t0+Math.imul(p,E$)|0,m0=m0+Math.imul(p,u)|0,m0=m0+Math.imul(I$,E$)|0,a0=a0+Math.imul(I$,u)|0,t0=t0+Math.imul(X$,n)|0,m0=m0+Math.imul(X$,D$)|0,m0=m0+Math.imul(w,n)|0,a0=a0+Math.imul(w,D$)|0,t0=t0+Math.imul(B,C$)|0,m0=m0+Math.imul(B,t)|0,m0=m0+Math.imul(U$,C$)|0,a0=a0+Math.imul(U$,t)|0,t0=t0+Math.imul(G$,m)|0,m0=m0+Math.imul(G$,R$)|0,m0=m0+Math.imul(x,m)|0,a0=a0+Math.imul(x,R$)|0,t0=t0+Math.imul(_,P$)|0,m0=m0+Math.imul(_,O)|0,m0=m0+Math.imul(Z$,P$)|0,a0=a0+Math.imul(Z$,O)|0,t0=t0+Math.imul(Q$,e)|0,m0=m0+Math.imul(Q$,M$)|0,m0=m0+Math.imul(g,e)|0,a0=a0+Math.imul(g,M$)|0,t0=t0+Math.imul(j,S$)|0,m0=m0+Math.imul(j,F)|0,m0=m0+Math.imul($$,S$)|0,a0=a0+Math.imul($$,F)|0,t0=t0+Math.imul(e0,r)|0,m0=m0+Math.imul(e0,q$)|0,m0=m0+Math.imul(r0,r)|0,a0=a0+Math.imul(r0,q$)|0;var B$=(I+t0|0)+((m0&8191)<<13)|0;I=(a0+(m0>>>13)|0)+(B$>>>26)|0,B$&=67108863,t0=Math.imul(h,l),m0=Math.imul(h,W$),m0=m0+Math.imul(F$,l)|0,a0=Math.imul(F$,W$),t0=t0+Math.imul(O$,E$)|0,m0=m0+Math.imul(O$,u)|0,m0=m0+Math.imul(c,E$)|0,a0=a0+Math.imul(c,u)|0,t0=t0+Math.imul(p,n)|0,m0=m0+Math.imul(p,D$)|0,m0=m0+Math.imul(I$,n)|0,a0=a0+Math.imul(I$,D$)|0,t0=t0+Math.imul(X$,C$)|0,m0=m0+Math.imul(X$,t)|0,m0=m0+Math.imul(w,C$)|0,a0=a0+Math.imul(w,t)|0,t0=t0+Math.imul(B,m)|0,m0=m0+Math.imul(B,R$)|0,m0=m0+Math.imul(U$,m)|0,a0=a0+Math.imul(U$,R$)|0,t0=t0+Math.imul(G$,P$)|0,m0=m0+Math.imul(G$,O)|0,m0=m0+Math.imul(x,P$)|0,a0=a0+Math.imul(x,O)|0,t0=t0+Math.imul(_,e)|0,m0=m0+Math.imul(_,M$)|0,m0=m0+Math.imul(Z$,e)|0,a0=a0+Math.imul(Z$,M$)|0,t0=t0+Math.imul(Q$,S$)|0,m0=m0+Math.imul(Q$,F)|0,m0=m0+Math.imul(g,S$)|0,a0=a0+Math.imul(g,F)|0,t0=t0+Math.imul(j,r)|0,m0=m0+Math.imul(j,q$)|0,m0=m0+Math.imul($$,r)|0,a0=a0+Math.imul($$,q$)|0;var Y0=(I+t0|0)+((m0&8191)<<13)|0;I=(a0+(m0>>>13)|0)+(Y0>>>26)|0,Y0&=67108863,t0=Math.imul(h,E$),m0=Math.imul(h,u),m0=m0+Math.imul(F$,E$)|0,a0=Math.imul(F$,u),t0=t0+Math.imul(O$,n)|0,m0=m0+Math.imul(O$,D$)|0,m0=m0+Math.imul(c,n)|0,a0=a0+Math.imul(c,D$)|0,t0=t0+Math.imul(p,C$)|0,m0=m0+Math.imul(p,t)|0,m0=m0+Math.imul(I$,C$)|0,a0=a0+Math.imul(I$,t)|0,t0=t0+Math.imul(X$,m)|0,m0=m0+Math.imul(X$,R$)|0,m0=m0+Math.imul(w,m)|0,a0=a0+Math.imul(w,R$)|0,t0=t0+Math.imul(B,P$)|0,m0=m0+Math.imul(B,O)|0,m0=m0+Math.imul(U$,P$)|0,a0=a0+Math.imul(U$,O)|0,t0=t0+Math.imul(G$,e)|0,m0=m0+Math.imul(G$,M$)|0,m0=m0+Math.imul(x,e)|0,a0=a0+Math.imul(x,M$)|0,t0=t0+Math.imul(_,S$)|0,m0=m0+Math.imul(_,F)|0,m0=m0+Math.imul(Z$,S$)|0,a0=a0+Math.imul(Z$,F)|0,t0=t0+Math.imul(Q$,r)|0,m0=m0+Math.imul(Q$,q$)|0,m0=m0+Math.imul(g,r)|0,a0=a0+Math.imul(g,q$)|0;var y$=(I+t0|0)+((m0&8191)<<13)|0;I=(a0+(m0>>>13)|0)+(y$>>>26)|0,y$&=67108863,t0=Math.imul(h,n),m0=Math.imul(h,D$),m0=m0+Math.imul(F$,n)|0,a0=Math.imul(F$,D$),t0=t0+Math.imul(O$,C$)|0,m0=m0+Math.imul(O$,t)|0,m0=m0+Math.imul(c,C$)|0,a0=a0+Math.imul(c,t)|0,t0=t0+Math.imul(p,m)|0,m0=m0+Math.imul(p,R$)|0,m0=m0+Math.imul(I$,m)|0,a0=a0+Math.imul(I$,R$)|0,t0=t0+Math.imul(X$,P$)|0,m0=m0+Math.imul(X$,O)|0,m0=m0+Math.imul(w,P$)|0,a0=a0+Math.imul(w,O)|0,t0=t0+Math.imul(B,e)|0,m0=m0+Math.imul(B,M$)|0,m0=m0+Math.imul(U$,e)|0,a0=a0+Math.imul(U$,M$)|0,t0=t0+Math.imul(G$,S$)|0,m0=m0+Math.imul(G$,F)|0,m0=m0+Math.imul(x,S$)|0,a0=a0+Math.imul(x,F)|0,t0=t0+Math.imul(_,r)|0,m0=m0+Math.imul(_,q$)|0,m0=m0+Math.imul(Z$,r)|0,a0=a0+Math.imul(Z$,q$)|0;var Z0=(I+t0|0)+((m0&8191)<<13)|0;I=(a0+(m0>>>13)|0)+(Z0>>>26)|0,Z0&=67108863,t0=Math.imul(h,C$),m0=Math.imul(h,t),m0=m0+Math.imul(F$,C$)|0,a0=Math.imul(F$,t),t0=t0+Math.imul(O$,m)|0,m0=m0+Math.imul(O$,R$)|0,m0=m0+Math.imul(c,m)|0,a0=a0+Math.imul(c,R$)|0,t0=t0+Math.imul(p,P$)|0,m0=m0+Math.imul(p,O)|0,m0=m0+Math.imul(I$,P$)|0,a0=a0+Math.imul(I$,O)|0,t0=t0+Math.imul(X$,e)|0,m0=m0+Math.imul(X$,M$)|0,m0=m0+Math.imul(w,e)|0,a0=a0+Math.imul(w,M$)|0,t0=t0+Math.imul(B,S$)|0,m0=m0+Math.imul(B,F)|0,m0=m0+Math.imul(U$,S$)|0,a0=a0+Math.imul(U$,F)|0,t0=t0+Math.imul(G$,r)|0,m0=m0+Math.imul(G$,q$)|0,m0=m0+Math.imul(x,r)|0,a0=a0+Math.imul(x,q$)|0;var w$=(I+t0|0)+((m0&8191)<<13)|0;I=(a0+(m0>>>13)|0)+(w$>>>26)|0,w$&=67108863,t0=Math.imul(h,m),m0=Math.imul(h,R$),m0=m0+Math.imul(F$,m)|0,a0=Math.imul(F$,R$),t0=t0+Math.imul(O$,P$)|0,m0=m0+Math.imul(O$,O)|0,m0=m0+Math.imul(c,P$)|0,a0=a0+Math.imul(c,O)|0,t0=t0+Math.imul(p,e)|0,m0=m0+Math.imul(p,M$)|0,m0=m0+Math.imul(I$,e)|0,a0=a0+Math.imul(I$,M$)|0,t0=t0+Math.imul(X$,S$)|0,m0=m0+Math.imul(X$,F)|0,m0=m0+Math.imul(w,S$)|0,a0=a0+Math.imul(w,F)|0,t0=t0+Math.imul(B,r)|0,m0=m0+Math.imul(B,q$)|0,m0=m0+Math.imul(U$,r)|0,a0=a0+Math.imul(U$,q$)|0;var G0=(I+t0|0)+((m0&8191)<<13)|0;I=(a0+(m0>>>13)|0)+(G0>>>26)|0,G0&=67108863,t0=Math.imul(h,P$),m0=Math.imul(h,O),m0=m0+Math.imul(F$,P$)|0,a0=Math.imul(F$,O),t0=t0+Math.imul(O$,e)|0,m0=m0+Math.imul(O$,M$)|0,m0=m0+Math.imul(c,e)|0,a0=a0+Math.imul(c,M$)|0,t0=t0+Math.imul(p,S$)|0,m0=m0+Math.imul(p,F)|0,m0=m0+Math.imul(I$,S$)|0,a0=a0+Math.imul(I$,F)|0,t0=t0+Math.imul(X$,r)|0,m0=m0+Math.imul(X$,q$)|0,m0=m0+Math.imul(w,r)|0,a0=a0+Math.imul(w,q$)|0;var p$=(I+t0|0)+((m0&8191)<<13)|0;I=(a0+(m0>>>13)|0)+(p$>>>26)|0,p$&=67108863,t0=Math.imul(h,e),m0=Math.imul(h,M$),m0=m0+Math.imul(F$,e)|0,a0=Math.imul(F$,M$),t0=t0+Math.imul(O$,S$)|0,m0=m0+Math.imul(O$,F)|0,m0=m0+Math.imul(c,S$)|0,a0=a0+Math.imul(c,F)|0,t0=t0+Math.imul(p,r)|0,m0=m0+Math.imul(p,q$)|0,m0=m0+Math.imul(I$,r)|0,a0=a0+Math.imul(I$,q$)|0;var V0=(I+t0|0)+((m0&8191)<<13)|0;I=(a0+(m0>>>13)|0)+(V0>>>26)|0,V0&=67108863,t0=Math.imul(h,S$),m0=Math.imul(h,F),m0=m0+Math.imul(F$,S$)|0,a0=Math.imul(F$,F),t0=t0+Math.imul(O$,r)|0,m0=m0+Math.imul(O$,q$)|0,m0=m0+Math.imul(c,r)|0,a0=a0+Math.imul(c,q$)|0;var f$=(I+t0|0)+((m0&8191)<<13)|0;I=(a0+(m0>>>13)|0)+(f$>>>26)|0,f$&=67108863,t0=Math.imul(h,r),m0=Math.imul(h,q$),m0=m0+Math.imul(F$,r)|0,a0=Math.imul(F$,q$);var U0=(I+t0|0)+((m0&8191)<<13)|0;return I=(a0+(m0>>>13)|0)+(U0>>>26)|0,U0&=67108863,s0[0]=i,s0[1]=j$,s0[2]=k$,s0[3]=g$,s0[4]=_$,s0[5]=N$,s0[6]=$0,s0[7]=x$,s0[8]=Q0,s0[9]=B$,s0[10]=Y0,s0[11]=y$,s0[12]=Z0,s0[13]=w$,s0[14]=G0,s0[15]=p$,s0[16]=V0,s0[17]=f$,s0[18]=U0,I!==0&&(s0[19]=I,S.length++),S};Math.imul||(D=f0);function c0(M,u0,S){S.negative=u0.negative^M.negative,S.length=M.length+u0.length;for(var n0=0,v=0,s0=0;s0>>26)|0,v+=I>>>26,I&=67108863}S.words[s0]=t0,n0=I,I=v}return n0!==0?S.words[s0]=n0:S.length--,S._strip()}function C(M,u0,S){return c0(M,u0,S)}Z.prototype.mulTo=function(M,u0){var S,n0=this.length+M.length;return this.length===10&&M.length===10?S=D(this,M,u0):n0<63?S=f0(this,M,u0):n0<1024?S=c0(this,M,u0):S=C(this,M,u0),S};function h0(M,u0){this.x=M,this.y=u0}h0.prototype.makeRBT=function(M){for(var u0=new Array(M),S=Z.prototype._countBits(M)-1,n0=0;n0>=1;return n0},h0.prototype.permute=function(M,u0,S,n0,v,s0){for(var I=0;I>>1)v++;return 1<>>13,S[2*s0+1]=v&8191,v=v>>>13;for(s0=2*u0;s0>=26,S+=v/67108864|0,S+=s0>>>26,this.words[n0]=s0&67108863}return S!==0&&(this.words[n0]=S,this.length++),u0?this.ineg():this},Z.prototype.muln=function(M){return this.clone().imuln(M)},Z.prototype.sqr=function(){return this.mul(this)},Z.prototype.isqr=function(){return this.imul(this.clone())},Z.prototype.pow=function(M){var u0=T(M);if(u0.length===0)return new Z(1);for(var S=this,n0=0;n0=0);var u0=M%26,S=(M-u0)/26,n0=67108863>>>26-u0<<26-u0,v;if(u0!==0){var s0=0;for(v=0;v>>26-u0}s0&&(this.words[v]=s0,this.length++)}if(S!==0){for(v=this.length-1;v>=0;v--)this.words[v+S]=this.words[v];for(v=0;v=0);var n0;u0?n0=(u0-u0%26)/26:n0=0;var v=M%26,s0=Math.min((M-v)/26,this.length),I=67108863^67108863>>>v<s0)for(this.length-=s0,m0=0;m0=0&&(a0!==0||m0>=n0);m0--){var q=this.words[m0]|0;this.words[m0]=a0<<26-v|q>>>v,a0=q&I}return t0&&a0!==0&&(t0.words[t0.length++]=a0),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},Z.prototype.ishrn=function(M,u0,S){return Y(this.negative===0),this.iushrn(M,u0,S)},Z.prototype.shln=function(M){return this.clone().ishln(M)},Z.prototype.ushln=function(M){return this.clone().iushln(M)},Z.prototype.shrn=function(M){return this.clone().ishrn(M)},Z.prototype.ushrn=function(M){return this.clone().iushrn(M)},Z.prototype.testn=function(M){Y(typeof M=="number"&&M>=0);var u0=M%26,S=(M-u0)/26,n0=1<=0);var u0=M%26,S=(M-u0)/26;if(Y(this.negative===0,"imaskn works only with positive numbers"),this.length<=S)return this;if(u0!==0&&S++,this.length=Math.min(S,this.length),u0!==0){var n0=67108863^67108863>>>u0<=67108864;u0++)this.words[u0]-=67108864,u0===this.length-1?this.words[u0+1]=1:this.words[u0+1]++;return this.length=Math.max(this.length,u0+1),this},Z.prototype.isubn=function(M){if(Y(typeof M=="number"),Y(M<67108864),M<0)return this.iaddn(-M);if(this.negative!==0)return this.negative=0,this.iaddn(M),this.negative=1,this;if(this.words[0]-=M,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var u0=0;u0>26)-(t0/67108864|0),this.words[v+S]=s0&67108863}for(;v>26,this.words[v+S]=s0&67108863;if(I===0)return this._strip();for(Y(I===-1),I=0,v=0;v>26,this.words[v]=s0&67108863;return this.negative=1,this._strip()},Z.prototype._wordDiv=function(M,u0){var S=this.length-M.length,n0=this.clone(),v=M,s0=v.words[v.length-1]|0,I=this._countBits(s0);S=26-I,S!==0&&(v=v.ushln(S),n0.iushln(S),s0=v.words[v.length-1]|0);var t0=n0.length-v.length,m0;if(u0!=="mod"){m0=new Z(null),m0.length=t0+1,m0.words=new Array(m0.length);for(var a0=0;a0=0;e0--){var r0=(n0.words[v.length+e0]|0)*67108864+(n0.words[v.length+e0-1]|0);for(r0=Math.min(r0/s0|0,67108863),n0._ishlnsubmul(v,r0,e0);n0.negative!==0;)r0--,n0.negative=0,n0._ishlnsubmul(v,1,e0),n0.isZero()||(n0.negative^=1);m0&&(m0.words[e0]=r0)}return m0&&m0._strip(),n0._strip(),u0!=="div"&&S!==0&&n0.iushrn(S),{div:m0||null,mod:n0}},Z.prototype.divmod=function(M,u0,S){if(Y(!M.isZero()),this.isZero())return{div:new Z(0),mod:new Z(0)};var n0,v,s0;return this.negative!==0&&M.negative===0?(s0=this.neg().divmod(M,u0),u0!=="mod"&&(n0=s0.div.neg()),u0!=="div"&&(v=s0.mod.neg(),S&&v.negative!==0&&v.iadd(M)),{div:n0,mod:v}):this.negative===0&&M.negative!==0?(s0=this.divmod(M.neg(),u0),u0!=="mod"&&(n0=s0.div.neg()),{div:n0,mod:s0.mod}):(this.negative&M.negative)!==0?(s0=this.neg().divmod(M.neg(),u0),u0!=="div"&&(v=s0.mod.neg(),S&&v.negative!==0&&v.isub(M)),{div:s0.div,mod:v}):M.length>this.length||this.cmp(M)<0?{div:new Z(0),mod:this}:M.length===1?u0==="div"?{div:this.divn(M.words[0]),mod:null}:u0==="mod"?{div:null,mod:new Z(this.modrn(M.words[0]))}:{div:this.divn(M.words[0]),mod:new Z(this.modrn(M.words[0]))}:this._wordDiv(M,u0)},Z.prototype.div=function(M){return this.divmod(M,"div",!1).div},Z.prototype.mod=function(M){return this.divmod(M,"mod",!1).mod},Z.prototype.umod=function(M){return this.divmod(M,"mod",!0).mod},Z.prototype.divRound=function(M){var u0=this.divmod(M);if(u0.mod.isZero())return u0.div;var S=u0.div.negative!==0?u0.mod.isub(M):u0.mod,n0=M.ushrn(1),v=M.andln(1),s0=S.cmp(n0);return s0<0||v===1&&s0===0?u0.div:u0.div.negative!==0?u0.div.isubn(1):u0.div.iaddn(1)},Z.prototype.modrn=function(M){var u0=M<0;u0&&(M=-M),Y(M<=67108863);for(var S=(1<<26)%M,n0=0,v=this.length-1;v>=0;v--)n0=(S*n0+(this.words[v]|0))%M;return u0?-n0:n0},Z.prototype.modn=function(M){return this.modrn(M)},Z.prototype.idivn=function(M){var u0=M<0;u0&&(M=-M),Y(M<=67108863);for(var S=0,n0=this.length-1;n0>=0;n0--){var v=(this.words[n0]|0)+S*67108864;this.words[n0]=v/M|0,S=v%M}return this._strip(),u0?this.ineg():this},Z.prototype.divn=function(M){return this.clone().idivn(M)},Z.prototype.egcd=function(M){Y(M.negative===0),Y(!M.isZero());var u0=this,S=M.clone();u0.negative!==0?u0=u0.umod(M):u0=u0.clone();for(var n0=new Z(1),v=new Z(0),s0=new Z(0),I=new Z(1),t0=0;u0.isEven()&&S.isEven();)u0.iushrn(1),S.iushrn(1),++t0;for(var m0=S.clone(),a0=u0.clone();!u0.isZero();){for(var q=0,e0=1;(u0.words[0]&e0)===0&&q<26;++q,e0<<=1);if(q>0)for(u0.iushrn(q);q-- >0;)(n0.isOdd()||v.isOdd())&&(n0.iadd(m0),v.isub(a0)),n0.iushrn(1),v.iushrn(1);for(var r0=0,i0=1;(S.words[0]&i0)===0&&r0<26;++r0,i0<<=1);if(r0>0)for(S.iushrn(r0);r0-- >0;)(s0.isOdd()||I.isOdd())&&(s0.iadd(m0),I.isub(a0)),s0.iushrn(1),I.iushrn(1);u0.cmp(S)>=0?(u0.isub(S),n0.isub(s0),v.isub(I)):(S.isub(u0),s0.isub(n0),I.isub(v))}return{a:s0,b:I,gcd:S.iushln(t0)}},Z.prototype._invmp=function(M){Y(M.negative===0),Y(!M.isZero());var u0=this,S=M.clone();u0.negative!==0?u0=u0.umod(M):u0=u0.clone();for(var n0=new Z(1),v=new Z(0),s0=S.clone();u0.cmpn(1)>0&&S.cmpn(1)>0;){for(var I=0,t0=1;(u0.words[0]&t0)===0&&I<26;++I,t0<<=1);if(I>0)for(u0.iushrn(I);I-- >0;)n0.isOdd()&&n0.iadd(s0),n0.iushrn(1);for(var m0=0,a0=1;(S.words[0]&a0)===0&&m0<26;++m0,a0<<=1);if(m0>0)for(S.iushrn(m0);m0-- >0;)v.isOdd()&&v.iadd(s0),v.iushrn(1);u0.cmp(S)>=0?(u0.isub(S),n0.isub(v)):(S.isub(u0),v.isub(n0))}var q;return u0.cmpn(1)===0?q=n0:q=v,q.cmpn(0)<0&&q.iadd(M),q},Z.prototype.gcd=function(M){if(this.isZero())return M.abs();if(M.isZero())return this.abs();var u0=this.clone(),S=M.clone();u0.negative=0,S.negative=0;for(var n0=0;u0.isEven()&&S.isEven();n0++)u0.iushrn(1),S.iushrn(1);do{for(;u0.isEven();)u0.iushrn(1);for(;S.isEven();)S.iushrn(1);var v=u0.cmp(S);if(v<0){var s0=u0;u0=S,S=s0}else if(v===0||S.cmpn(1)===0)break;u0.isub(S)}while(!0);return S.iushln(n0)},Z.prototype.invm=function(M){return this.egcd(M).a.umod(M)},Z.prototype.isEven=function(){return(this.words[0]&1)===0},Z.prototype.isOdd=function(){return(this.words[0]&1)===1},Z.prototype.andln=function(M){return this.words[0]&M},Z.prototype.bincn=function(M){Y(typeof M=="number");var u0=M%26,S=(M-u0)/26,n0=1<>>26,I&=67108863,this.words[s0]=I}return v!==0&&(this.words[s0]=v,this.length++),this},Z.prototype.isZero=function(){return this.length===1&&this.words[0]===0},Z.prototype.cmpn=function(M){var u0=M<0;if(this.negative!==0&&!u0)return-1;if(this.negative===0&&u0)return 1;this._strip();var S;if(this.length>1)S=1;else{u0&&(M=-M),Y(M<=67108863,"Number is too big");var n0=this.words[0]|0;S=n0===M?0:n0M.length)return 1;if(this.length=0;S--){var n0=this.words[S]|0,v=M.words[S]|0;if(n0!==v){n0v&&(u0=1);break}}return u0},Z.prototype.gtn=function(M){return this.cmpn(M)===1},Z.prototype.gt=function(M){return this.cmp(M)===1},Z.prototype.gten=function(M){return this.cmpn(M)>=0},Z.prototype.gte=function(M){return this.cmp(M)>=0},Z.prototype.ltn=function(M){return this.cmpn(M)===-1},Z.prototype.lt=function(M){return this.cmp(M)===-1},Z.prototype.lten=function(M){return this.cmpn(M)<=0},Z.prototype.lte=function(M){return this.cmp(M)<=0},Z.prototype.eqn=function(M){return this.cmpn(M)===0},Z.prototype.eq=function(M){return this.cmp(M)===0},Z.red=function(M){return new z(M)},Z.prototype.toRed=function(M){return Y(!this.red,"Already a number in reduction context"),Y(this.negative===0,"red works only with positives"),M.convertTo(this)._forceRed(M)},Z.prototype.fromRed=function(){return Y(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},Z.prototype._forceRed=function(M){return this.red=M,this},Z.prototype.forceRed=function(M){return Y(!this.red,"Already a number in reduction context"),this._forceRed(M)},Z.prototype.redAdd=function(M){return Y(this.red,"redAdd works only with red numbers"),this.red.add(this,M)},Z.prototype.redIAdd=function(M){return Y(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,M)},Z.prototype.redSub=function(M){return Y(this.red,"redSub works only with red numbers"),this.red.sub(this,M)},Z.prototype.redISub=function(M){return Y(this.red,"redISub works only with red numbers"),this.red.isub(this,M)},Z.prototype.redShl=function(M){return Y(this.red,"redShl works only with red numbers"),this.red.shl(this,M)},Z.prototype.redMul=function(M){return Y(this.red,"redMul works only with red numbers"),this.red._verify2(this,M),this.red.mul(this,M)},Z.prototype.redIMul=function(M){return Y(this.red,"redMul works only with red numbers"),this.red._verify2(this,M),this.red.imul(this,M)},Z.prototype.redSqr=function(){return Y(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},Z.prototype.redISqr=function(){return Y(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},Z.prototype.redSqrt=function(){return Y(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},Z.prototype.redInvm=function(){return Y(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},Z.prototype.redNeg=function(){return Y(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},Z.prototype.redPow=function(M){return Y(this.red&&!M.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,M)};var L={k256:null,p224:null,p192:null,p25519:null};function d0(M,u0){this.name=M,this.p=new Z(u0,16),this.n=this.p.bitLength(),this.k=new Z(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}d0.prototype._tmp=function(){var M=new Z(null);return M.words=new Array(Math.ceil(this.n/13)),M},d0.prototype.ireduce=function(M){var u0=M,S;do this.split(u0,this.tmp),u0=this.imulK(u0),u0=u0.iadd(this.tmp),S=u0.bitLength();while(S>this.n);var n0=S0?u0.isub(this.p):u0.strip!==void 0?u0.strip():u0._strip(),u0},d0.prototype.split=function(M,u0){M.iushrn(this.n,0,u0)},d0.prototype.imulK=function(M){return M.imul(this.k)};function R(){d0.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}$(R,d0),R.prototype.split=function(M,u0){for(var S=4194303,n0=Math.min(M.length,9),v=0;v>>22,s0=I}s0>>>=22,M.words[v-10]=s0,s0===0&&M.length>10?M.length-=10:M.length-=9},R.prototype.imulK=function(M){M.words[M.length]=0,M.words[M.length+1]=0,M.length+=2;for(var u0=0,S=0;S>>=26,M.words[S]=v,u0=n0}return u0!==0&&(M.words[M.length++]=u0),M},Z._prime=function(M){if(L[M])return L[M];var u0;if(M==="k256")u0=new R;else if(M==="p224")u0=new b0;else if(M==="p192")u0=new P;else if(M==="p25519")u0=new l0;else throw new Error("Unknown prime "+M);return L[M]=u0,u0};function z(M){if(typeof M=="string"){var u0=Z._prime(M);this.m=u0.p,this.prime=u0}else Y(M.gtn(1),"modulus must be greater than 1"),this.m=M,this.prime=null}z.prototype._verify1=function(M){Y(M.negative===0,"red works only with positives"),Y(M.red,"red works only with red numbers")},z.prototype._verify2=function(M,u0){Y((M.negative|u0.negative)===0,"red works only with positives"),Y(M.red&&M.red===u0.red,"red works only with red numbers")},z.prototype.imod=function(M){return this.prime?this.prime.ireduce(M)._forceRed(this):(H(M,M.umod(this.m)._forceRed(this)),M)},z.prototype.neg=function(M){return M.isZero()?M.clone():this.m.sub(M)._forceRed(this)},z.prototype.add=function(M,u0){this._verify2(M,u0);var S=M.add(u0);return S.cmp(this.m)>=0&&S.isub(this.m),S._forceRed(this)},z.prototype.iadd=function(M,u0){this._verify2(M,u0);var S=M.iadd(u0);return S.cmp(this.m)>=0&&S.isub(this.m),S},z.prototype.sub=function(M,u0){this._verify2(M,u0);var S=M.sub(u0);return S.cmpn(0)<0&&S.iadd(this.m),S._forceRed(this)},z.prototype.isub=function(M,u0){this._verify2(M,u0);var S=M.isub(u0);return S.cmpn(0)<0&&S.iadd(this.m),S},z.prototype.shl=function(M,u0){return this._verify1(M),this.imod(M.ushln(u0))},z.prototype.imul=function(M,u0){return this._verify2(M,u0),this.imod(M.imul(u0))},z.prototype.mul=function(M,u0){return this._verify2(M,u0),this.imod(M.mul(u0))},z.prototype.isqr=function(M){return this.imul(M,M.clone())},z.prototype.sqr=function(M){return this.mul(M,M)},z.prototype.sqrt=function(M){if(M.isZero())return M.clone();var u0=this.m.andln(3);if(Y(u0%2===1),u0===3){var S=this.m.add(new Z(1)).iushrn(2);return this.pow(M,S)}for(var n0=this.m.subn(1),v=0;!n0.isZero()&&n0.andln(1)===0;)v++,n0.iushrn(1);Y(!n0.isZero());var s0=new Z(1).toRed(this),I=s0.redNeg(),t0=this.m.subn(1).iushrn(1),m0=this.m.bitLength();for(m0=new Z(2*m0*m0).toRed(this);this.pow(m0,t0).cmp(I)!==0;)m0.redIAdd(I);for(var a0=this.pow(m0,n0),q=this.pow(M,n0.addn(1).iushrn(1)),e0=this.pow(M,n0),r0=v;e0.cmp(s0)!==0;){for(var i0=e0,j=0;i0.cmp(s0)!==0;j++)i0=i0.redSqr();Y(j=0;v--){for(var a0=u0.words[v],q=m0-1;q>=0;q--){var e0=a0>>q&1;if(s0!==n0[0]&&(s0=this.sqr(s0)),e0===0&&I===0){t0=0;continue}I<<=1,I|=e0,t0++,!(t0!==S&&(v!==0||q!==0))&&(s0=this.mul(s0,n0[I]),t0=0,I=0)}m0=26}return s0},z.prototype.convertTo=function(M){var u0=M.umod(this.m);return u0===M?u0.clone():u0},z.prototype.convertFrom=function(M){var u0=M.clone();return u0.red=null,u0},Z.mont=function(M){return new o0(M)};function o0(M){z.call(this,M),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new Z(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}$(o0,z),o0.prototype.convertTo=function(M){return this.imod(M.ushln(this.shift))},o0.prototype.convertFrom=function(M){var u0=this.imod(M.mul(this.rinv));return u0.red=null,u0},o0.prototype.imul=function(M,u0){if(M.isZero()||u0.isZero())return M.words[0]=0,M.length=1,M;var S=M.imul(u0),n0=S.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),v=S.isub(n0).iushrn(this.shift),s0=v;return v.cmp(this.m)>=0?s0=v.isub(this.m):v.cmpn(0)<0&&(s0=v.iadd(this.m)),s0._forceRed(this)},o0.prototype.mul=function(M,u0){if(M.isZero()||u0.isZero())return new Z(0)._forceRed(this);var S=M.mul(u0),n0=S.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),v=S.isub(n0).iushrn(this.shift),s0=v;return v.cmp(this.m)>=0?s0=v.isub(this.m):v.cmpn(0)<0&&(s0=v.iadd(this.m)),s0._forceRed(this)},o0.prototype.invm=function(M){var u0=this.imod(M._invmp(this.m).mul(this.r2));return u0._forceRed(this)}})(typeof K>"u"||K,X)}}),hQ=$Q({"node_modules/browserify-rsa/index.js"(X,K){var x0=cQ(),G=ZQ();function Y(Q){var U=$(Q),V=U.toRed(x0.mont(Q.modulus)).redPow(new x0(Q.publicExponent)).fromRed();return{blinder:V,unblinder:U.invm(Q.modulus)}}function $(Q){var U=Q.modulus.byteLength(),V;do V=new x0(G(U));while(V.cmp(Q.modulus)>=0||!V.umod(Q.prime1)||!V.umod(Q.prime2));return V}function Z(Q,U){var V=Y(U),B0=U.modulus.byteLength(),H=new x0(Q).mul(V.blinder).umod(U.modulus),y0=H.toRed(x0.mont(U.prime1)),W=H.toRed(x0.mont(U.prime2)),w0=U.coefficient,E=U.prime1,p0=U.prime2,T=y0.redPow(U.exponent1).fromRed(),f0=W.redPow(U.exponent2).fromRed(),D=T.isub(f0).imul(w0).umod(E).imul(p0);return f0.iadd(D).imul(V.unblinder).umod(U.modulus).toArrayLike(c$,"be",B0)}Z.getr=$,K.exports=Z}}),dQ=$Q({"node_modules/elliptic/package.json"(X,K){K.exports={name:"elliptic",version:"6.5.4",description:"EC cryptography",main:"lib/elliptic.js",files:["lib"],scripts:{lint:"eslint lib test","lint:fix":"npm run lint -- --fix",unit:"istanbul test _mocha --reporter=spec test/index.js",test:"npm run lint && npm run unit",version:"grunt dist && git add dist/"},repository:{type:"git",url:"git@github.com:indutny/elliptic"},keywords:["EC","Elliptic","curve","Cryptography"],author:"Fedor Indutny ",license:"MIT",bugs:{url:"https://github.com/indutny/elliptic/issues"},homepage:"https://github.com/indutny/elliptic",devDependencies:{brfs:"^2.0.2",coveralls:"^3.1.0",eslint:"^7.6.0",grunt:"^1.2.1","grunt-browserify":"^5.3.0","grunt-cli":"^1.3.2","grunt-contrib-connect":"^3.0.0","grunt-contrib-copy":"^1.0.0","grunt-contrib-uglify":"^5.0.0","grunt-mocha-istanbul":"^5.0.2","grunt-saucelabs":"^9.0.1",istanbul:"^0.4.5",mocha:"^8.0.1"},dependencies:{"bn.js":"^4.11.9",brorand:"^1.1.0","hash.js":"^1.0.0","hmac-drbg":"^1.0.1",inherits:"^2.0.4","minimalistic-assert":"^1.0.1","minimalistic-crypto-utils":"^1.0.1"}}}}),bQ=$Q({"node_modules/elliptic/node_modules/bn.js/lib/bn.js"(X,K){(function(x0,G){function Y(l0,z){if(!l0)throw new Error(z||"Assertion failed")}function $(l0,z){l0.super_=z;var o0=function(){};o0.prototype=z.prototype,l0.prototype=new o0,l0.prototype.constructor=l0}function Z(l0,z,o0){if(Z.isBN(l0))return l0;this.negative=0,this.words=null,this.length=0,this.red=null,l0!==null&&((z==="le"||z==="be")&&(o0=z,z=10),this._init(l0||0,z||10,o0||"be"))}typeof x0=="object"?x0.exports=Z:G.BN=Z,Z.BN=Z,Z.wordSize=26;var Q=c$;Z.isBN=function(l0){return l0 instanceof Z?!0:l0!==null&&typeof l0=="object"&&l0.constructor.wordSize===Z.wordSize&&Array.isArray(l0.words)},Z.max=function(l0,z){return l0.cmp(z)>0?l0:z},Z.min=function(l0,z){return l0.cmp(z)<0?l0:z},Z.prototype._init=function(l0,z,o0){if(typeof l0=="number")return this._initNumber(l0,z,o0);if(typeof l0=="object")return this._initArray(l0,z,o0);z==="hex"&&(z=16),Y(z===(z|0)&&z>=2&&z<=36),l0=l0.toString().replace(/\s+/g,"");var M=0;l0[0]==="-"&&(M++,this.negative=1),M=0;M-=3)S=l0[M]|l0[M-1]<<8|l0[M-2]<<16,this.words[u0]|=S<>>26-n0&67108863,n0+=24,n0>=26&&(n0-=26,u0++);else if(o0==="le")for(M=0,u0=0;M>>26-n0&67108863,n0+=24,n0>=26&&(n0-=26,u0++);return this.strip()};function U(l0,z){var o0=l0.charCodeAt(z);return o0>=65&&o0<=70?o0-55:o0>=97&&o0<=102?o0-87:o0-48&15}function V(l0,z,o0){var M=U(l0,o0);return o0-1>=z&&(M|=U(l0,o0-1)<<4),M}Z.prototype._parseHex=function(l0,z,o0){this.length=Math.ceil((l0.length-z)/6),this.words=new Array(this.length);for(var M=0;M=z;M-=2)n0=V(l0,z,M)<=18?(u0-=18,S+=1,this.words[S]|=n0>>>26):u0+=8;else{var v=l0.length-z;for(M=v%2===0?z+1:z;M=18?(u0-=18,S+=1,this.words[S]|=n0>>>26):u0+=8}this.strip()};function B0(l0,z,o0,M){for(var u0=0,S=Math.min(l0.length,o0),n0=z;n0=49?u0+=v-49+10:v>=17?u0+=v-17+10:u0+=v}return u0}Z.prototype._parseBase=function(l0,z,o0){this.words=[0],this.length=1;for(var M=0,u0=1;u0<=67108863;u0*=z)M++;M--,u0=u0/z|0;for(var S=l0.length-o0,n0=S%M,v=Math.min(S,S-n0)+o0,s0=0,I=o0;I1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},Z.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},Z.prototype.inspect=function(){return(this.red?""};var H=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],y0=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],W=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64000000,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,24300000,28629151,33554432,39135393,45435424,52521875,60466176];Z.prototype.toString=function(l0,z){l0=l0||10,z=z|0||1;var o0;if(l0===16||l0==="hex"){o0="";for(var M=0,u0=0,S=0;S>>24-M&16777215,u0!==0||S!==this.length-1?o0=H[6-v.length]+v+o0:o0=v+o0,M+=2,M>=26&&(M-=26,S--)}for(u0!==0&&(o0=u0.toString(16)+o0);o0.length%z!==0;)o0="0"+o0;return this.negative!==0&&(o0="-"+o0),o0}if(l0===(l0|0)&&l0>=2&&l0<=36){var s0=y0[l0],I=W[l0];o0="";var t0=this.clone();for(t0.negative=0;!t0.isZero();){var m0=t0.modn(I).toString(l0);t0=t0.idivn(I),t0.isZero()?o0=m0+o0:o0=H[s0-m0.length]+m0+o0}for(this.isZero()&&(o0="0"+o0);o0.length%z!==0;)o0="0"+o0;return this.negative!==0&&(o0="-"+o0),o0}Y(!1,"Base should be between 2 and 36")},Z.prototype.toNumber=function(){var l0=this.words[0];return this.length===2?l0+=this.words[1]*67108864:this.length===3&&this.words[2]===1?l0+=4503599627370496+this.words[1]*67108864:this.length>2&&Y(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-l0:l0},Z.prototype.toJSON=function(){return this.toString(16)},Z.prototype.toBuffer=function(l0,z){return Y(typeof Q<"u"),this.toArrayLike(Q,l0,z)},Z.prototype.toArray=function(l0,z){return this.toArrayLike(Array,l0,z)},Z.prototype.toArrayLike=function(l0,z,o0){var M=this.byteLength(),u0=o0||Math.max(1,M);Y(M<=u0,"byte array longer than desired length"),Y(u0>0,"Requested array length <= 0"),this.strip();var S=z==="le",n0=new l0(u0),v,s0,I=this.clone();if(S){for(s0=0;!I.isZero();s0++)v=I.andln(255),I.iushrn(8),n0[s0]=v;for(;s0=4096&&(o0+=13,z>>>=13),z>=64&&(o0+=7,z>>>=7),z>=8&&(o0+=4,z>>>=4),z>=2&&(o0+=2,z>>>=2),o0+z},Z.prototype._zeroBits=function(l0){if(l0===0)return 26;var z=l0,o0=0;return(z&8191)===0&&(o0+=13,z>>>=13),(z&127)===0&&(o0+=7,z>>>=7),(z&15)===0&&(o0+=4,z>>>=4),(z&3)===0&&(o0+=2,z>>>=2),(z&1)===0&&o0++,o0},Z.prototype.bitLength=function(){var l0=this.words[this.length-1],z=this._countBits(l0);return(this.length-1)*26+z};function w0(l0){for(var z=new Array(l0.bitLength()),o0=0;o0>>u0}return z}Z.prototype.zeroBits=function(){if(this.isZero())return 0;for(var l0=0,z=0;zl0.length?this.clone().ior(l0):l0.clone().ior(this)},Z.prototype.uor=function(l0){return this.length>l0.length?this.clone().iuor(l0):l0.clone().iuor(this)},Z.prototype.iuand=function(l0){var z;this.length>l0.length?z=l0:z=this;for(var o0=0;o0l0.length?this.clone().iand(l0):l0.clone().iand(this)},Z.prototype.uand=function(l0){return this.length>l0.length?this.clone().iuand(l0):l0.clone().iuand(this)},Z.prototype.iuxor=function(l0){var z,o0;this.length>l0.length?(z=this,o0=l0):(z=l0,o0=this);for(var M=0;Ml0.length?this.clone().ixor(l0):l0.clone().ixor(this)},Z.prototype.uxor=function(l0){return this.length>l0.length?this.clone().iuxor(l0):l0.clone().iuxor(this)},Z.prototype.inotn=function(l0){Y(typeof l0=="number"&&l0>=0);var z=Math.ceil(l0/26)|0,o0=l0%26;this._expand(z),o0>0&&z--;for(var M=0;M0&&(this.words[M]=~this.words[M]&67108863>>26-o0),this.strip()},Z.prototype.notn=function(l0){return this.clone().inotn(l0)},Z.prototype.setn=function(l0,z){Y(typeof l0=="number"&&l0>=0);var o0=l0/26|0,M=l0%26;return this._expand(o0+1),z?this.words[o0]=this.words[o0]|1<l0.length?(o0=this,M=l0):(o0=l0,M=this);for(var u0=0,S=0;S>>26;for(;u0!==0&&S>>26;if(this.length=o0.length,u0!==0)this.words[this.length]=u0,this.length++;else if(o0!==this)for(;Sl0.length?this.clone().iadd(l0):l0.clone().iadd(this)},Z.prototype.isub=function(l0){if(l0.negative!==0){l0.negative=0;var z=this.iadd(l0);return l0.negative=1,z._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(l0),this.negative=1,this._normSign();var o0=this.cmp(l0);if(o0===0)return this.negative=0,this.length=1,this.words[0]=0,this;var M,u0;o0>0?(M=this,u0=l0):(M=l0,u0=this);for(var S=0,n0=0;n0>26,this.words[n0]=z&67108863;for(;S!==0&&n0>26,this.words[n0]=z&67108863;if(S===0&&n0>>26,m0=s0&67108863,a0=Math.min(I,z.length-1),q=Math.max(0,I-l0.length+1);q<=a0;q++){var e0=I-q|0;u0=l0.words[e0]|0,S=z.words[q]|0,n0=u0*S+m0,t0+=n0/67108864|0,m0=n0&67108863}o0.words[I]=m0|0,s0=t0|0}return s0!==0?o0.words[I]=s0|0:o0.length--,o0.strip()}var p0=function(l0,z,o0){var M=l0.words,u0=z.words,S=o0.words,n0=0,v,s0,I,t0=M[0]|0,m0=t0&8191,a0=t0>>>13,q=M[1]|0,e0=q&8191,r0=q>>>13,i0=M[2]|0,j=i0&8191,$$=i0>>>13,k=M[3]|0,Q$=k&8191,g=k>>>13,Y$=M[4]|0,_=Y$&8191,Z$=Y$>>>13,N=M[5]|0,G$=N&8191,x=N>>>13,V$=M[6]|0,B=V$&8191,U$=V$>>>13,y=M[7]|0,X$=y&8191,w=y>>>13,K$=M[8]|0,p=K$&8191,I$=K$>>>13,f=M[9]|0,O$=f&8191,c=f>>>13,J$=u0[0]|0,h=J$&8191,F$=J$>>>13,d=u0[1]|0,A$=d&8191,b=d>>>13,H$=u0[2]|0,l=H$&8191,W$=H$>>>13,o=u0[3]|0,E$=o&8191,u=o>>>13,T$=u0[4]|0,n=T$&8191,D$=T$>>>13,s=u0[5]|0,C$=s&8191,t=s>>>13,L$=u0[6]|0,m=L$&8191,R$=L$>>>13,a=u0[7]|0,P$=a&8191,O=a>>>13,z$=u0[8]|0,e=z$&8191,M$=z$>>>13,J=u0[9]|0,S$=J&8191,F=J>>>13;o0.negative=l0.negative^z.negative,o0.length=19,v=Math.imul(m0,h),s0=Math.imul(m0,F$),s0=s0+Math.imul(a0,h)|0,I=Math.imul(a0,F$);var v$=(n0+v|0)+((s0&8191)<<13)|0;n0=(I+(s0>>>13)|0)+(v$>>>26)|0,v$&=67108863,v=Math.imul(e0,h),s0=Math.imul(e0,F$),s0=s0+Math.imul(r0,h)|0,I=Math.imul(r0,F$),v=v+Math.imul(m0,A$)|0,s0=s0+Math.imul(m0,b)|0,s0=s0+Math.imul(a0,A$)|0,I=I+Math.imul(a0,b)|0;var r=(n0+v|0)+((s0&8191)<<13)|0;n0=(I+(s0>>>13)|0)+(r>>>26)|0,r&=67108863,v=Math.imul(j,h),s0=Math.imul(j,F$),s0=s0+Math.imul($$,h)|0,I=Math.imul($$,F$),v=v+Math.imul(e0,A$)|0,s0=s0+Math.imul(e0,b)|0,s0=s0+Math.imul(r0,A$)|0,I=I+Math.imul(r0,b)|0,v=v+Math.imul(m0,l)|0,s0=s0+Math.imul(m0,W$)|0,s0=s0+Math.imul(a0,l)|0,I=I+Math.imul(a0,W$)|0;var q$=(n0+v|0)+((s0&8191)<<13)|0;n0=(I+(s0>>>13)|0)+(q$>>>26)|0,q$&=67108863,v=Math.imul(Q$,h),s0=Math.imul(Q$,F$),s0=s0+Math.imul(g,h)|0,I=Math.imul(g,F$),v=v+Math.imul(j,A$)|0,s0=s0+Math.imul(j,b)|0,s0=s0+Math.imul($$,A$)|0,I=I+Math.imul($$,b)|0,v=v+Math.imul(e0,l)|0,s0=s0+Math.imul(e0,W$)|0,s0=s0+Math.imul(r0,l)|0,I=I+Math.imul(r0,W$)|0,v=v+Math.imul(m0,E$)|0,s0=s0+Math.imul(m0,u)|0,s0=s0+Math.imul(a0,E$)|0,I=I+Math.imul(a0,u)|0;var i=(n0+v|0)+((s0&8191)<<13)|0;n0=(I+(s0>>>13)|0)+(i>>>26)|0,i&=67108863,v=Math.imul(_,h),s0=Math.imul(_,F$),s0=s0+Math.imul(Z$,h)|0,I=Math.imul(Z$,F$),v=v+Math.imul(Q$,A$)|0,s0=s0+Math.imul(Q$,b)|0,s0=s0+Math.imul(g,A$)|0,I=I+Math.imul(g,b)|0,v=v+Math.imul(j,l)|0,s0=s0+Math.imul(j,W$)|0,s0=s0+Math.imul($$,l)|0,I=I+Math.imul($$,W$)|0,v=v+Math.imul(e0,E$)|0,s0=s0+Math.imul(e0,u)|0,s0=s0+Math.imul(r0,E$)|0,I=I+Math.imul(r0,u)|0,v=v+Math.imul(m0,n)|0,s0=s0+Math.imul(m0,D$)|0,s0=s0+Math.imul(a0,n)|0,I=I+Math.imul(a0,D$)|0;var j$=(n0+v|0)+((s0&8191)<<13)|0;n0=(I+(s0>>>13)|0)+(j$>>>26)|0,j$&=67108863,v=Math.imul(G$,h),s0=Math.imul(G$,F$),s0=s0+Math.imul(x,h)|0,I=Math.imul(x,F$),v=v+Math.imul(_,A$)|0,s0=s0+Math.imul(_,b)|0,s0=s0+Math.imul(Z$,A$)|0,I=I+Math.imul(Z$,b)|0,v=v+Math.imul(Q$,l)|0,s0=s0+Math.imul(Q$,W$)|0,s0=s0+Math.imul(g,l)|0,I=I+Math.imul(g,W$)|0,v=v+Math.imul(j,E$)|0,s0=s0+Math.imul(j,u)|0,s0=s0+Math.imul($$,E$)|0,I=I+Math.imul($$,u)|0,v=v+Math.imul(e0,n)|0,s0=s0+Math.imul(e0,D$)|0,s0=s0+Math.imul(r0,n)|0,I=I+Math.imul(r0,D$)|0,v=v+Math.imul(m0,C$)|0,s0=s0+Math.imul(m0,t)|0,s0=s0+Math.imul(a0,C$)|0,I=I+Math.imul(a0,t)|0;var k$=(n0+v|0)+((s0&8191)<<13)|0;n0=(I+(s0>>>13)|0)+(k$>>>26)|0,k$&=67108863,v=Math.imul(B,h),s0=Math.imul(B,F$),s0=s0+Math.imul(U$,h)|0,I=Math.imul(U$,F$),v=v+Math.imul(G$,A$)|0,s0=s0+Math.imul(G$,b)|0,s0=s0+Math.imul(x,A$)|0,I=I+Math.imul(x,b)|0,v=v+Math.imul(_,l)|0,s0=s0+Math.imul(_,W$)|0,s0=s0+Math.imul(Z$,l)|0,I=I+Math.imul(Z$,W$)|0,v=v+Math.imul(Q$,E$)|0,s0=s0+Math.imul(Q$,u)|0,s0=s0+Math.imul(g,E$)|0,I=I+Math.imul(g,u)|0,v=v+Math.imul(j,n)|0,s0=s0+Math.imul(j,D$)|0,s0=s0+Math.imul($$,n)|0,I=I+Math.imul($$,D$)|0,v=v+Math.imul(e0,C$)|0,s0=s0+Math.imul(e0,t)|0,s0=s0+Math.imul(r0,C$)|0,I=I+Math.imul(r0,t)|0,v=v+Math.imul(m0,m)|0,s0=s0+Math.imul(m0,R$)|0,s0=s0+Math.imul(a0,m)|0,I=I+Math.imul(a0,R$)|0;var g$=(n0+v|0)+((s0&8191)<<13)|0;n0=(I+(s0>>>13)|0)+(g$>>>26)|0,g$&=67108863,v=Math.imul(X$,h),s0=Math.imul(X$,F$),s0=s0+Math.imul(w,h)|0,I=Math.imul(w,F$),v=v+Math.imul(B,A$)|0,s0=s0+Math.imul(B,b)|0,s0=s0+Math.imul(U$,A$)|0,I=I+Math.imul(U$,b)|0,v=v+Math.imul(G$,l)|0,s0=s0+Math.imul(G$,W$)|0,s0=s0+Math.imul(x,l)|0,I=I+Math.imul(x,W$)|0,v=v+Math.imul(_,E$)|0,s0=s0+Math.imul(_,u)|0,s0=s0+Math.imul(Z$,E$)|0,I=I+Math.imul(Z$,u)|0,v=v+Math.imul(Q$,n)|0,s0=s0+Math.imul(Q$,D$)|0,s0=s0+Math.imul(g,n)|0,I=I+Math.imul(g,D$)|0,v=v+Math.imul(j,C$)|0,s0=s0+Math.imul(j,t)|0,s0=s0+Math.imul($$,C$)|0,I=I+Math.imul($$,t)|0,v=v+Math.imul(e0,m)|0,s0=s0+Math.imul(e0,R$)|0,s0=s0+Math.imul(r0,m)|0,I=I+Math.imul(r0,R$)|0,v=v+Math.imul(m0,P$)|0,s0=s0+Math.imul(m0,O)|0,s0=s0+Math.imul(a0,P$)|0,I=I+Math.imul(a0,O)|0;var _$=(n0+v|0)+((s0&8191)<<13)|0;n0=(I+(s0>>>13)|0)+(_$>>>26)|0,_$&=67108863,v=Math.imul(p,h),s0=Math.imul(p,F$),s0=s0+Math.imul(I$,h)|0,I=Math.imul(I$,F$),v=v+Math.imul(X$,A$)|0,s0=s0+Math.imul(X$,b)|0,s0=s0+Math.imul(w,A$)|0,I=I+Math.imul(w,b)|0,v=v+Math.imul(B,l)|0,s0=s0+Math.imul(B,W$)|0,s0=s0+Math.imul(U$,l)|0,I=I+Math.imul(U$,W$)|0,v=v+Math.imul(G$,E$)|0,s0=s0+Math.imul(G$,u)|0,s0=s0+Math.imul(x,E$)|0,I=I+Math.imul(x,u)|0,v=v+Math.imul(_,n)|0,s0=s0+Math.imul(_,D$)|0,s0=s0+Math.imul(Z$,n)|0,I=I+Math.imul(Z$,D$)|0,v=v+Math.imul(Q$,C$)|0,s0=s0+Math.imul(Q$,t)|0,s0=s0+Math.imul(g,C$)|0,I=I+Math.imul(g,t)|0,v=v+Math.imul(j,m)|0,s0=s0+Math.imul(j,R$)|0,s0=s0+Math.imul($$,m)|0,I=I+Math.imul($$,R$)|0,v=v+Math.imul(e0,P$)|0,s0=s0+Math.imul(e0,O)|0,s0=s0+Math.imul(r0,P$)|0,I=I+Math.imul(r0,O)|0,v=v+Math.imul(m0,e)|0,s0=s0+Math.imul(m0,M$)|0,s0=s0+Math.imul(a0,e)|0,I=I+Math.imul(a0,M$)|0;var N$=(n0+v|0)+((s0&8191)<<13)|0;n0=(I+(s0>>>13)|0)+(N$>>>26)|0,N$&=67108863,v=Math.imul(O$,h),s0=Math.imul(O$,F$),s0=s0+Math.imul(c,h)|0,I=Math.imul(c,F$),v=v+Math.imul(p,A$)|0,s0=s0+Math.imul(p,b)|0,s0=s0+Math.imul(I$,A$)|0,I=I+Math.imul(I$,b)|0,v=v+Math.imul(X$,l)|0,s0=s0+Math.imul(X$,W$)|0,s0=s0+Math.imul(w,l)|0,I=I+Math.imul(w,W$)|0,v=v+Math.imul(B,E$)|0,s0=s0+Math.imul(B,u)|0,s0=s0+Math.imul(U$,E$)|0,I=I+Math.imul(U$,u)|0,v=v+Math.imul(G$,n)|0,s0=s0+Math.imul(G$,D$)|0,s0=s0+Math.imul(x,n)|0,I=I+Math.imul(x,D$)|0,v=v+Math.imul(_,C$)|0,s0=s0+Math.imul(_,t)|0,s0=s0+Math.imul(Z$,C$)|0,I=I+Math.imul(Z$,t)|0,v=v+Math.imul(Q$,m)|0,s0=s0+Math.imul(Q$,R$)|0,s0=s0+Math.imul(g,m)|0,I=I+Math.imul(g,R$)|0,v=v+Math.imul(j,P$)|0,s0=s0+Math.imul(j,O)|0,s0=s0+Math.imul($$,P$)|0,I=I+Math.imul($$,O)|0,v=v+Math.imul(e0,e)|0,s0=s0+Math.imul(e0,M$)|0,s0=s0+Math.imul(r0,e)|0,I=I+Math.imul(r0,M$)|0,v=v+Math.imul(m0,S$)|0,s0=s0+Math.imul(m0,F)|0,s0=s0+Math.imul(a0,S$)|0,I=I+Math.imul(a0,F)|0;var $0=(n0+v|0)+((s0&8191)<<13)|0;n0=(I+(s0>>>13)|0)+($0>>>26)|0,$0&=67108863,v=Math.imul(O$,A$),s0=Math.imul(O$,b),s0=s0+Math.imul(c,A$)|0,I=Math.imul(c,b),v=v+Math.imul(p,l)|0,s0=s0+Math.imul(p,W$)|0,s0=s0+Math.imul(I$,l)|0,I=I+Math.imul(I$,W$)|0,v=v+Math.imul(X$,E$)|0,s0=s0+Math.imul(X$,u)|0,s0=s0+Math.imul(w,E$)|0,I=I+Math.imul(w,u)|0,v=v+Math.imul(B,n)|0,s0=s0+Math.imul(B,D$)|0,s0=s0+Math.imul(U$,n)|0,I=I+Math.imul(U$,D$)|0,v=v+Math.imul(G$,C$)|0,s0=s0+Math.imul(G$,t)|0,s0=s0+Math.imul(x,C$)|0,I=I+Math.imul(x,t)|0,v=v+Math.imul(_,m)|0,s0=s0+Math.imul(_,R$)|0,s0=s0+Math.imul(Z$,m)|0,I=I+Math.imul(Z$,R$)|0,v=v+Math.imul(Q$,P$)|0,s0=s0+Math.imul(Q$,O)|0,s0=s0+Math.imul(g,P$)|0,I=I+Math.imul(g,O)|0,v=v+Math.imul(j,e)|0,s0=s0+Math.imul(j,M$)|0,s0=s0+Math.imul($$,e)|0,I=I+Math.imul($$,M$)|0,v=v+Math.imul(e0,S$)|0,s0=s0+Math.imul(e0,F)|0,s0=s0+Math.imul(r0,S$)|0,I=I+Math.imul(r0,F)|0;var x$=(n0+v|0)+((s0&8191)<<13)|0;n0=(I+(s0>>>13)|0)+(x$>>>26)|0,x$&=67108863,v=Math.imul(O$,l),s0=Math.imul(O$,W$),s0=s0+Math.imul(c,l)|0,I=Math.imul(c,W$),v=v+Math.imul(p,E$)|0,s0=s0+Math.imul(p,u)|0,s0=s0+Math.imul(I$,E$)|0,I=I+Math.imul(I$,u)|0,v=v+Math.imul(X$,n)|0,s0=s0+Math.imul(X$,D$)|0,s0=s0+Math.imul(w,n)|0,I=I+Math.imul(w,D$)|0,v=v+Math.imul(B,C$)|0,s0=s0+Math.imul(B,t)|0,s0=s0+Math.imul(U$,C$)|0,I=I+Math.imul(U$,t)|0,v=v+Math.imul(G$,m)|0,s0=s0+Math.imul(G$,R$)|0,s0=s0+Math.imul(x,m)|0,I=I+Math.imul(x,R$)|0,v=v+Math.imul(_,P$)|0,s0=s0+Math.imul(_,O)|0,s0=s0+Math.imul(Z$,P$)|0,I=I+Math.imul(Z$,O)|0,v=v+Math.imul(Q$,e)|0,s0=s0+Math.imul(Q$,M$)|0,s0=s0+Math.imul(g,e)|0,I=I+Math.imul(g,M$)|0,v=v+Math.imul(j,S$)|0,s0=s0+Math.imul(j,F)|0,s0=s0+Math.imul($$,S$)|0,I=I+Math.imul($$,F)|0;var Q0=(n0+v|0)+((s0&8191)<<13)|0;n0=(I+(s0>>>13)|0)+(Q0>>>26)|0,Q0&=67108863,v=Math.imul(O$,E$),s0=Math.imul(O$,u),s0=s0+Math.imul(c,E$)|0,I=Math.imul(c,u),v=v+Math.imul(p,n)|0,s0=s0+Math.imul(p,D$)|0,s0=s0+Math.imul(I$,n)|0,I=I+Math.imul(I$,D$)|0,v=v+Math.imul(X$,C$)|0,s0=s0+Math.imul(X$,t)|0,s0=s0+Math.imul(w,C$)|0,I=I+Math.imul(w,t)|0,v=v+Math.imul(B,m)|0,s0=s0+Math.imul(B,R$)|0,s0=s0+Math.imul(U$,m)|0,I=I+Math.imul(U$,R$)|0,v=v+Math.imul(G$,P$)|0,s0=s0+Math.imul(G$,O)|0,s0=s0+Math.imul(x,P$)|0,I=I+Math.imul(x,O)|0,v=v+Math.imul(_,e)|0,s0=s0+Math.imul(_,M$)|0,s0=s0+Math.imul(Z$,e)|0,I=I+Math.imul(Z$,M$)|0,v=v+Math.imul(Q$,S$)|0,s0=s0+Math.imul(Q$,F)|0,s0=s0+Math.imul(g,S$)|0,I=I+Math.imul(g,F)|0;var B$=(n0+v|0)+((s0&8191)<<13)|0;n0=(I+(s0>>>13)|0)+(B$>>>26)|0,B$&=67108863,v=Math.imul(O$,n),s0=Math.imul(O$,D$),s0=s0+Math.imul(c,n)|0,I=Math.imul(c,D$),v=v+Math.imul(p,C$)|0,s0=s0+Math.imul(p,t)|0,s0=s0+Math.imul(I$,C$)|0,I=I+Math.imul(I$,t)|0,v=v+Math.imul(X$,m)|0,s0=s0+Math.imul(X$,R$)|0,s0=s0+Math.imul(w,m)|0,I=I+Math.imul(w,R$)|0,v=v+Math.imul(B,P$)|0,s0=s0+Math.imul(B,O)|0,s0=s0+Math.imul(U$,P$)|0,I=I+Math.imul(U$,O)|0,v=v+Math.imul(G$,e)|0,s0=s0+Math.imul(G$,M$)|0,s0=s0+Math.imul(x,e)|0,I=I+Math.imul(x,M$)|0,v=v+Math.imul(_,S$)|0,s0=s0+Math.imul(_,F)|0,s0=s0+Math.imul(Z$,S$)|0,I=I+Math.imul(Z$,F)|0;var Y0=(n0+v|0)+((s0&8191)<<13)|0;n0=(I+(s0>>>13)|0)+(Y0>>>26)|0,Y0&=67108863,v=Math.imul(O$,C$),s0=Math.imul(O$,t),s0=s0+Math.imul(c,C$)|0,I=Math.imul(c,t),v=v+Math.imul(p,m)|0,s0=s0+Math.imul(p,R$)|0,s0=s0+Math.imul(I$,m)|0,I=I+Math.imul(I$,R$)|0,v=v+Math.imul(X$,P$)|0,s0=s0+Math.imul(X$,O)|0,s0=s0+Math.imul(w,P$)|0,I=I+Math.imul(w,O)|0,v=v+Math.imul(B,e)|0,s0=s0+Math.imul(B,M$)|0,s0=s0+Math.imul(U$,e)|0,I=I+Math.imul(U$,M$)|0,v=v+Math.imul(G$,S$)|0,s0=s0+Math.imul(G$,F)|0,s0=s0+Math.imul(x,S$)|0,I=I+Math.imul(x,F)|0;var y$=(n0+v|0)+((s0&8191)<<13)|0;n0=(I+(s0>>>13)|0)+(y$>>>26)|0,y$&=67108863,v=Math.imul(O$,m),s0=Math.imul(O$,R$),s0=s0+Math.imul(c,m)|0,I=Math.imul(c,R$),v=v+Math.imul(p,P$)|0,s0=s0+Math.imul(p,O)|0,s0=s0+Math.imul(I$,P$)|0,I=I+Math.imul(I$,O)|0,v=v+Math.imul(X$,e)|0,s0=s0+Math.imul(X$,M$)|0,s0=s0+Math.imul(w,e)|0,I=I+Math.imul(w,M$)|0,v=v+Math.imul(B,S$)|0,s0=s0+Math.imul(B,F)|0,s0=s0+Math.imul(U$,S$)|0,I=I+Math.imul(U$,F)|0;var Z0=(n0+v|0)+((s0&8191)<<13)|0;n0=(I+(s0>>>13)|0)+(Z0>>>26)|0,Z0&=67108863,v=Math.imul(O$,P$),s0=Math.imul(O$,O),s0=s0+Math.imul(c,P$)|0,I=Math.imul(c,O),v=v+Math.imul(p,e)|0,s0=s0+Math.imul(p,M$)|0,s0=s0+Math.imul(I$,e)|0,I=I+Math.imul(I$,M$)|0,v=v+Math.imul(X$,S$)|0,s0=s0+Math.imul(X$,F)|0,s0=s0+Math.imul(w,S$)|0,I=I+Math.imul(w,F)|0;var w$=(n0+v|0)+((s0&8191)<<13)|0;n0=(I+(s0>>>13)|0)+(w$>>>26)|0,w$&=67108863,v=Math.imul(O$,e),s0=Math.imul(O$,M$),s0=s0+Math.imul(c,e)|0,I=Math.imul(c,M$),v=v+Math.imul(p,S$)|0,s0=s0+Math.imul(p,F)|0,s0=s0+Math.imul(I$,S$)|0,I=I+Math.imul(I$,F)|0;var G0=(n0+v|0)+((s0&8191)<<13)|0;n0=(I+(s0>>>13)|0)+(G0>>>26)|0,G0&=67108863,v=Math.imul(O$,S$),s0=Math.imul(O$,F),s0=s0+Math.imul(c,S$)|0,I=Math.imul(c,F);var p$=(n0+v|0)+((s0&8191)<<13)|0;return n0=(I+(s0>>>13)|0)+(p$>>>26)|0,p$&=67108863,S[0]=v$,S[1]=r,S[2]=q$,S[3]=i,S[4]=j$,S[5]=k$,S[6]=g$,S[7]=_$,S[8]=N$,S[9]=$0,S[10]=x$,S[11]=Q0,S[12]=B$,S[13]=Y0,S[14]=y$,S[15]=Z0,S[16]=w$,S[17]=G0,S[18]=p$,n0!==0&&(S[19]=n0,o0.length++),o0};Math.imul||(p0=E);function T(l0,z,o0){o0.negative=z.negative^l0.negative,o0.length=l0.length+z.length;for(var M=0,u0=0,S=0;S>>26)|0,u0+=n0>>>26,n0&=67108863}o0.words[S]=v,M=n0,n0=u0}return M!==0?o0.words[S]=M:o0.length--,o0.strip()}function f0(l0,z,o0){var M=new D;return M.mulp(l0,z,o0)}Z.prototype.mulTo=function(l0,z){var o0,M=this.length+l0.length;return this.length===10&&l0.length===10?o0=p0(this,l0,z):M<63?o0=E(this,l0,z):M<1024?o0=T(this,l0,z):o0=f0(this,l0,z),o0};function D(l0,z){this.x=l0,this.y=z}D.prototype.makeRBT=function(l0){for(var z=new Array(l0),o0=Z.prototype._countBits(l0)-1,M=0;M>=1;return M},D.prototype.permute=function(l0,z,o0,M,u0,S){for(var n0=0;n0>>1)u0++;return 1<>>13,o0[2*S+1]=u0&8191,u0=u0>>>13;for(S=2*z;S>=26,z+=M/67108864|0,z+=u0>>>26,this.words[o0]=u0&67108863}return z!==0&&(this.words[o0]=z,this.length++),this},Z.prototype.muln=function(l0){return this.clone().imuln(l0)},Z.prototype.sqr=function(){return this.mul(this)},Z.prototype.isqr=function(){return this.imul(this.clone())},Z.prototype.pow=function(l0){var z=w0(l0);if(z.length===0)return new Z(1);for(var o0=this,M=0;M=0);var z=l0%26,o0=(l0-z)/26,M=67108863>>>26-z<<26-z,u0;if(z!==0){var S=0;for(u0=0;u0>>26-z}S&&(this.words[u0]=S,this.length++)}if(o0!==0){for(u0=this.length-1;u0>=0;u0--)this.words[u0+o0]=this.words[u0];for(u0=0;u0=0);var M;z?M=(z-z%26)/26:M=0;var u0=l0%26,S=Math.min((l0-u0)/26,this.length),n0=67108863^67108863>>>u0<S)for(this.length-=S,s0=0;s0=0&&(I!==0||s0>=M);s0--){var t0=this.words[s0]|0;this.words[s0]=I<<26-u0|t0>>>u0,I=t0&n0}return v&&I!==0&&(v.words[v.length++]=I),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},Z.prototype.ishrn=function(l0,z,o0){return Y(this.negative===0),this.iushrn(l0,z,o0)},Z.prototype.shln=function(l0){return this.clone().ishln(l0)},Z.prototype.ushln=function(l0){return this.clone().iushln(l0)},Z.prototype.shrn=function(l0){return this.clone().ishrn(l0)},Z.prototype.ushrn=function(l0){return this.clone().iushrn(l0)},Z.prototype.testn=function(l0){Y(typeof l0=="number"&&l0>=0);var z=l0%26,o0=(l0-z)/26,M=1<=0);var z=l0%26,o0=(l0-z)/26;if(Y(this.negative===0,"imaskn works only with positive numbers"),this.length<=o0)return this;if(z!==0&&o0++,this.length=Math.min(o0,this.length),z!==0){var M=67108863^67108863>>>z<=67108864;z++)this.words[z]-=67108864,z===this.length-1?this.words[z+1]=1:this.words[z+1]++;return this.length=Math.max(this.length,z+1),this},Z.prototype.isubn=function(l0){if(Y(typeof l0=="number"),Y(l0<67108864),l0<0)return this.iaddn(-l0);if(this.negative!==0)return this.negative=0,this.iaddn(l0),this.negative=1,this;if(this.words[0]-=l0,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var z=0;z>26)-(v/67108864|0),this.words[u0+o0]=S&67108863}for(;u0>26,this.words[u0+o0]=S&67108863;if(n0===0)return this.strip();for(Y(n0===-1),n0=0,u0=0;u0>26,this.words[u0]=S&67108863;return this.negative=1,this.strip()},Z.prototype._wordDiv=function(l0,z){var o0=this.length-l0.length,M=this.clone(),u0=l0,S=u0.words[u0.length-1]|0,n0=this._countBits(S);o0=26-n0,o0!==0&&(u0=u0.ushln(o0),M.iushln(o0),S=u0.words[u0.length-1]|0);var v=M.length-u0.length,s0;if(z!=="mod"){s0=new Z(null),s0.length=v+1,s0.words=new Array(s0.length);for(var I=0;I=0;m0--){var a0=(M.words[u0.length+m0]|0)*67108864+(M.words[u0.length+m0-1]|0);for(a0=Math.min(a0/S|0,67108863),M._ishlnsubmul(u0,a0,m0);M.negative!==0;)a0--,M.negative=0,M._ishlnsubmul(u0,1,m0),M.isZero()||(M.negative^=1);s0&&(s0.words[m0]=a0)}return s0&&s0.strip(),M.strip(),z!=="div"&&o0!==0&&M.iushrn(o0),{div:s0||null,mod:M}},Z.prototype.divmod=function(l0,z,o0){if(Y(!l0.isZero()),this.isZero())return{div:new Z(0),mod:new Z(0)};var M,u0,S;return this.negative!==0&&l0.negative===0?(S=this.neg().divmod(l0,z),z!=="mod"&&(M=S.div.neg()),z!=="div"&&(u0=S.mod.neg(),o0&&u0.negative!==0&&u0.iadd(l0)),{div:M,mod:u0}):this.negative===0&&l0.negative!==0?(S=this.divmod(l0.neg(),z),z!=="mod"&&(M=S.div.neg()),{div:M,mod:S.mod}):(this.negative&l0.negative)!==0?(S=this.neg().divmod(l0.neg(),z),z!=="div"&&(u0=S.mod.neg(),o0&&u0.negative!==0&&u0.isub(l0)),{div:S.div,mod:u0}):l0.length>this.length||this.cmp(l0)<0?{div:new Z(0),mod:this}:l0.length===1?z==="div"?{div:this.divn(l0.words[0]),mod:null}:z==="mod"?{div:null,mod:new Z(this.modn(l0.words[0]))}:{div:this.divn(l0.words[0]),mod:new Z(this.modn(l0.words[0]))}:this._wordDiv(l0,z)},Z.prototype.div=function(l0){return this.divmod(l0,"div",!1).div},Z.prototype.mod=function(l0){return this.divmod(l0,"mod",!1).mod},Z.prototype.umod=function(l0){return this.divmod(l0,"mod",!0).mod},Z.prototype.divRound=function(l0){var z=this.divmod(l0);if(z.mod.isZero())return z.div;var o0=z.div.negative!==0?z.mod.isub(l0):z.mod,M=l0.ushrn(1),u0=l0.andln(1),S=o0.cmp(M);return S<0||u0===1&&S===0?z.div:z.div.negative!==0?z.div.isubn(1):z.div.iaddn(1)},Z.prototype.modn=function(l0){Y(l0<=67108863);for(var z=(1<<26)%l0,o0=0,M=this.length-1;M>=0;M--)o0=(z*o0+(this.words[M]|0))%l0;return o0},Z.prototype.idivn=function(l0){Y(l0<=67108863);for(var z=0,o0=this.length-1;o0>=0;o0--){var M=(this.words[o0]|0)+z*67108864;this.words[o0]=M/l0|0,z=M%l0}return this.strip()},Z.prototype.divn=function(l0){return this.clone().idivn(l0)},Z.prototype.egcd=function(l0){Y(l0.negative===0),Y(!l0.isZero());var z=this,o0=l0.clone();z.negative!==0?z=z.umod(l0):z=z.clone();for(var M=new Z(1),u0=new Z(0),S=new Z(0),n0=new Z(1),v=0;z.isEven()&&o0.isEven();)z.iushrn(1),o0.iushrn(1),++v;for(var s0=o0.clone(),I=z.clone();!z.isZero();){for(var t0=0,m0=1;(z.words[0]&m0)===0&&t0<26;++t0,m0<<=1);if(t0>0)for(z.iushrn(t0);t0-- >0;)(M.isOdd()||u0.isOdd())&&(M.iadd(s0),u0.isub(I)),M.iushrn(1),u0.iushrn(1);for(var a0=0,q=1;(o0.words[0]&q)===0&&a0<26;++a0,q<<=1);if(a0>0)for(o0.iushrn(a0);a0-- >0;)(S.isOdd()||n0.isOdd())&&(S.iadd(s0),n0.isub(I)),S.iushrn(1),n0.iushrn(1);z.cmp(o0)>=0?(z.isub(o0),M.isub(S),u0.isub(n0)):(o0.isub(z),S.isub(M),n0.isub(u0))}return{a:S,b:n0,gcd:o0.iushln(v)}},Z.prototype._invmp=function(l0){Y(l0.negative===0),Y(!l0.isZero());var z=this,o0=l0.clone();z.negative!==0?z=z.umod(l0):z=z.clone();for(var M=new Z(1),u0=new Z(0),S=o0.clone();z.cmpn(1)>0&&o0.cmpn(1)>0;){for(var n0=0,v=1;(z.words[0]&v)===0&&n0<26;++n0,v<<=1);if(n0>0)for(z.iushrn(n0);n0-- >0;)M.isOdd()&&M.iadd(S),M.iushrn(1);for(var s0=0,I=1;(o0.words[0]&I)===0&&s0<26;++s0,I<<=1);if(s0>0)for(o0.iushrn(s0);s0-- >0;)u0.isOdd()&&u0.iadd(S),u0.iushrn(1);z.cmp(o0)>=0?(z.isub(o0),M.isub(u0)):(o0.isub(z),u0.isub(M))}var t0;return z.cmpn(1)===0?t0=M:t0=u0,t0.cmpn(0)<0&&t0.iadd(l0),t0},Z.prototype.gcd=function(l0){if(this.isZero())return l0.abs();if(l0.isZero())return this.abs();var z=this.clone(),o0=l0.clone();z.negative=0,o0.negative=0;for(var M=0;z.isEven()&&o0.isEven();M++)z.iushrn(1),o0.iushrn(1);do{for(;z.isEven();)z.iushrn(1);for(;o0.isEven();)o0.iushrn(1);var u0=z.cmp(o0);if(u0<0){var S=z;z=o0,o0=S}else if(u0===0||o0.cmpn(1)===0)break;z.isub(o0)}while(!0);return o0.iushln(M)},Z.prototype.invm=function(l0){return this.egcd(l0).a.umod(l0)},Z.prototype.isEven=function(){return(this.words[0]&1)===0},Z.prototype.isOdd=function(){return(this.words[0]&1)===1},Z.prototype.andln=function(l0){return this.words[0]&l0},Z.prototype.bincn=function(l0){Y(typeof l0=="number");var z=l0%26,o0=(l0-z)/26,M=1<>>26,n0&=67108863,this.words[S]=n0}return u0!==0&&(this.words[S]=u0,this.length++),this},Z.prototype.isZero=function(){return this.length===1&&this.words[0]===0},Z.prototype.cmpn=function(l0){var z=l0<0;if(this.negative!==0&&!z)return-1;if(this.negative===0&&z)return 1;this.strip();var o0;if(this.length>1)o0=1;else{z&&(l0=-l0),Y(l0<=67108863,"Number is too big");var M=this.words[0]|0;o0=M===l0?0:Ml0.length)return 1;if(this.length=0;o0--){var M=this.words[o0]|0,u0=l0.words[o0]|0;if(M!==u0){Mu0&&(z=1);break}}return z},Z.prototype.gtn=function(l0){return this.cmpn(l0)===1},Z.prototype.gt=function(l0){return this.cmp(l0)===1},Z.prototype.gten=function(l0){return this.cmpn(l0)>=0},Z.prototype.gte=function(l0){return this.cmp(l0)>=0},Z.prototype.ltn=function(l0){return this.cmpn(l0)===-1},Z.prototype.lt=function(l0){return this.cmp(l0)===-1},Z.prototype.lten=function(l0){return this.cmpn(l0)<=0},Z.prototype.lte=function(l0){return this.cmp(l0)<=0},Z.prototype.eqn=function(l0){return this.cmpn(l0)===0},Z.prototype.eq=function(l0){return this.cmp(l0)===0},Z.red=function(l0){return new b0(l0)},Z.prototype.toRed=function(l0){return Y(!this.red,"Already a number in reduction context"),Y(this.negative===0,"red works only with positives"),l0.convertTo(this)._forceRed(l0)},Z.prototype.fromRed=function(){return Y(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},Z.prototype._forceRed=function(l0){return this.red=l0,this},Z.prototype.forceRed=function(l0){return Y(!this.red,"Already a number in reduction context"),this._forceRed(l0)},Z.prototype.redAdd=function(l0){return Y(this.red,"redAdd works only with red numbers"),this.red.add(this,l0)},Z.prototype.redIAdd=function(l0){return Y(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,l0)},Z.prototype.redSub=function(l0){return Y(this.red,"redSub works only with red numbers"),this.red.sub(this,l0)},Z.prototype.redISub=function(l0){return Y(this.red,"redISub works only with red numbers"),this.red.isub(this,l0)},Z.prototype.redShl=function(l0){return Y(this.red,"redShl works only with red numbers"),this.red.shl(this,l0)},Z.prototype.redMul=function(l0){return Y(this.red,"redMul works only with red numbers"),this.red._verify2(this,l0),this.red.mul(this,l0)},Z.prototype.redIMul=function(l0){return Y(this.red,"redMul works only with red numbers"),this.red._verify2(this,l0),this.red.imul(this,l0)},Z.prototype.redSqr=function(){return Y(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},Z.prototype.redISqr=function(){return Y(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},Z.prototype.redSqrt=function(){return Y(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},Z.prototype.redInvm=function(){return Y(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},Z.prototype.redNeg=function(){return Y(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},Z.prototype.redPow=function(l0){return Y(this.red&&!l0.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,l0)};var c0={k256:null,p224:null,p192:null,p25519:null};function C(l0,z){this.name=l0,this.p=new Z(z,16),this.n=this.p.bitLength(),this.k=new Z(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}C.prototype._tmp=function(){var l0=new Z(null);return l0.words=new Array(Math.ceil(this.n/13)),l0},C.prototype.ireduce=function(l0){var z=l0,o0;do this.split(z,this.tmp),z=this.imulK(z),z=z.iadd(this.tmp),o0=z.bitLength();while(o0>this.n);var M=o00?z.isub(this.p):z.strip!==void 0?z.strip():z._strip(),z},C.prototype.split=function(l0,z){l0.iushrn(this.n,0,z)},C.prototype.imulK=function(l0){return l0.imul(this.k)};function h0(){C.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}$(h0,C),h0.prototype.split=function(l0,z){for(var o0=4194303,M=Math.min(l0.length,9),u0=0;u0>>22,S=n0}S>>>=22,l0.words[u0-10]=S,S===0&&l0.length>10?l0.length-=10:l0.length-=9},h0.prototype.imulK=function(l0){l0.words[l0.length]=0,l0.words[l0.length+1]=0,l0.length+=2;for(var z=0,o0=0;o0>>=26,l0.words[o0]=u0,z=M}return z!==0&&(l0.words[l0.length++]=z),l0},Z._prime=function(l0){if(c0[l0])return c0[l0];var z;if(l0==="k256")z=new h0;else if(l0==="p224")z=new L;else if(l0==="p192")z=new d0;else if(l0==="p25519")z=new R;else throw new Error("Unknown prime "+l0);return c0[l0]=z,z};function b0(l0){if(typeof l0=="string"){var z=Z._prime(l0);this.m=z.p,this.prime=z}else Y(l0.gtn(1),"modulus must be greater than 1"),this.m=l0,this.prime=null}b0.prototype._verify1=function(l0){Y(l0.negative===0,"red works only with positives"),Y(l0.red,"red works only with red numbers")},b0.prototype._verify2=function(l0,z){Y((l0.negative|z.negative)===0,"red works only with positives"),Y(l0.red&&l0.red===z.red,"red works only with red numbers")},b0.prototype.imod=function(l0){return this.prime?this.prime.ireduce(l0)._forceRed(this):l0.umod(this.m)._forceRed(this)},b0.prototype.neg=function(l0){return l0.isZero()?l0.clone():this.m.sub(l0)._forceRed(this)},b0.prototype.add=function(l0,z){this._verify2(l0,z);var o0=l0.add(z);return o0.cmp(this.m)>=0&&o0.isub(this.m),o0._forceRed(this)},b0.prototype.iadd=function(l0,z){this._verify2(l0,z);var o0=l0.iadd(z);return o0.cmp(this.m)>=0&&o0.isub(this.m),o0},b0.prototype.sub=function(l0,z){this._verify2(l0,z);var o0=l0.sub(z);return o0.cmpn(0)<0&&o0.iadd(this.m),o0._forceRed(this)},b0.prototype.isub=function(l0,z){this._verify2(l0,z);var o0=l0.isub(z);return o0.cmpn(0)<0&&o0.iadd(this.m),o0},b0.prototype.shl=function(l0,z){return this._verify1(l0),this.imod(l0.ushln(z))},b0.prototype.imul=function(l0,z){return this._verify2(l0,z),this.imod(l0.imul(z))},b0.prototype.mul=function(l0,z){return this._verify2(l0,z),this.imod(l0.mul(z))},b0.prototype.isqr=function(l0){return this.imul(l0,l0.clone())},b0.prototype.sqr=function(l0){return this.mul(l0,l0)},b0.prototype.sqrt=function(l0){if(l0.isZero())return l0.clone();var z=this.m.andln(3);if(Y(z%2===1),z===3){var o0=this.m.add(new Z(1)).iushrn(2);return this.pow(l0,o0)}for(var M=this.m.subn(1),u0=0;!M.isZero()&&M.andln(1)===0;)u0++,M.iushrn(1);Y(!M.isZero());var S=new Z(1).toRed(this),n0=S.redNeg(),v=this.m.subn(1).iushrn(1),s0=this.m.bitLength();for(s0=new Z(2*s0*s0).toRed(this);this.pow(s0,v).cmp(n0)!==0;)s0.redIAdd(n0);for(var I=this.pow(s0,M),t0=this.pow(l0,M.addn(1).iushrn(1)),m0=this.pow(l0,M),a0=u0;m0.cmp(S)!==0;){for(var q=m0,e0=0;q.cmp(S)!==0;e0++)q=q.redSqr();Y(e0=0;u0--){for(var I=z.words[u0],t0=s0-1;t0>=0;t0--){var m0=I>>t0&1;if(S!==M[0]&&(S=this.sqr(S)),m0===0&&n0===0){v=0;continue}n0<<=1,n0|=m0,v++,!(v!==o0&&(u0!==0||t0!==0))&&(S=this.mul(S,M[n0]),v=0,n0=0)}s0=26}return S},b0.prototype.convertTo=function(l0){var z=l0.umod(this.m);return z===l0?z.clone():z},b0.prototype.convertFrom=function(l0){var z=l0.clone();return z.red=null,z},Z.mont=function(l0){return new P(l0)};function P(l0){b0.call(this,l0),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new Z(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}$(P,b0),P.prototype.convertTo=function(l0){return this.imod(l0.ushln(this.shift))},P.prototype.convertFrom=function(l0){var z=this.imod(l0.mul(this.rinv));return z.red=null,z},P.prototype.imul=function(l0,z){if(l0.isZero()||z.isZero())return l0.words[0]=0,l0.length=1,l0;var o0=l0.imul(z),M=o0.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),u0=o0.isub(M).iushrn(this.shift),S=u0;return u0.cmp(this.m)>=0?S=u0.isub(this.m):u0.cmpn(0)<0&&(S=u0.iadd(this.m)),S._forceRed(this)},P.prototype.mul=function(l0,z){if(l0.isZero()||z.isZero())return new Z(0)._forceRed(this);var o0=l0.mul(z),M=o0.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),u0=o0.isub(M).iushrn(this.shift),S=u0;return u0.cmp(this.m)>=0?S=u0.isub(this.m):u0.cmpn(0)<0&&(S=u0.iadd(this.m)),S._forceRed(this)},P.prototype.invm=function(l0){var z=this.imod(l0._invmp(this.m).mul(this.r2));return z._forceRed(this)}})(typeof K>"u"||K,X)}}),lQ=$Q({"node_modules/minimalistic-crypto-utils/lib/utils.js"(X){var K=X;function x0($,Z){if(Array.isArray($))return $.slice();if(!$)return[];var Q=[];if(typeof $!="string"){for(var U=0;U<$.length;U++)Q[U]=$[U]|0;return Q}if(Z==="hex"){$=$.replace(/[^a-z0-9]+/gi,""),$.length%2!==0&&($="0"+$);for(var U=0;U<$.length;U+=2)Q.push(parseInt($[U]+$[U+1],16))}else for(var U=0;U<$.length;U++){var V=$.charCodeAt(U),B0=V>>8,H=V&255;B0?Q.push(B0,H):Q.push(H)}return Q}K.toArray=x0;function G($){return $.length===1?"0"+$:$}K.zero2=G;function Y($){for(var Z="",Q=0;Q<$.length;Q++)Z+=G($[Q].toString(16));return Z}K.toHex=Y,K.encode=function($,Z){return Z==="hex"?Y($):$}}}),oQ=$Q({"node_modules/elliptic/lib/elliptic/utils.js"(X){var K=X,x0=bQ(),G=N0(),Y=lQ();K.assert=G,K.toArray=Y.toArray,K.zero2=Y.zero2,K.toHex=Y.toHex,K.encode=Y.encode;function $(B0,H,y0){var W=new Array(Math.max(B0.bitLength(),y0)+1);W.fill(0);for(var w0=1<(w0>>1)-1?T=(w0>>1)-f0:T=f0,E.isubn(T)):T=0,W[p0]=T,E.iushrn(1)}return W}K.getNAF=$;function Z(B0,H){var y0=[[],[]];B0=B0.clone(),H=H.clone();for(var W=0,w0=0,E;B0.cmpn(-W)>0||H.cmpn(-w0)>0;){var p0=B0.andln(3)+W&3,T=H.andln(3)+w0&3;p0===3&&(p0=-1),T===3&&(T=-1);var f0;(p0&1)===0?f0=0:(E=B0.andln(7)+W&7,(E===3||E===5)&&T===2?f0=-p0:f0=p0),y0[0].push(f0);var D;(T&1)===0?D=0:(E=H.andln(7)+w0&7,(E===3||E===5)&&p0===2?D=-T:D=T),y0[1].push(D),2*W===f0+1&&(W=1-W),2*w0===D+1&&(w0=1-w0),B0.iushrn(1),H.iushrn(1)}return y0}K.getJSF=Z;function Q(B0,H,y0){var W="_"+H;B0.prototype[H]=function(){return this[W]!==void 0?this[W]:this[W]=y0.call(this)}}K.cachedProperty=Q;function U(B0){return typeof B0=="string"?K.toArray(B0,"hex"):B0}K.parseBytes=U;function V(B0){return new x0(B0,"hex","le")}K.intFromLE=V}}),uQ=$Q({"node_modules/elliptic/lib/elliptic/curve/base.js"(X,K){var x0=bQ(),G=oQ(),Y=G.getNAF,$=G.getJSF,Z=G.assert;function Q(V,B0){this.type=V,this.p=new x0(B0.p,16),this.red=B0.prime?x0.red(B0.prime):x0.mont(this.p),this.zero=new x0(0).toRed(this.red),this.one=new x0(1).toRed(this.red),this.two=new x0(2).toRed(this.red),this.n=B0.n&&new x0(B0.n,16),this.g=B0.g&&this.pointFromJSON(B0.g,B0.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var H=this.n&&this.p.div(this.n);!H||H.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}K.exports=Q,Q.prototype.point=function(){throw new Error("Not implemented")},Q.prototype.validate=function(){throw new Error("Not implemented")},Q.prototype._fixedNafMul=function(V,B0){Z(V.precomputed);var H=V._getDoubles(),y0=Y(B0,1,this._bitLength),W=(1<=E;T--)p0=(p0<<1)+y0[T];w0.push(p0)}for(var f0=this.jpoint(null,null,null),D=this.jpoint(null,null,null),c0=W;c0>0;c0--){for(E=0;E=0;p0--){for(var T=0;p0>=0&&w0[p0]===0;p0--)T++;if(p0>=0&&T++,E=E.dblp(T),p0<0)break;var f0=w0[p0];Z(f0!==0),V.type==="affine"?f0>0?E=E.mixedAdd(W[f0-1>>1]):E=E.mixedAdd(W[-f0-1>>1].neg()):f0>0?E=E.add(W[f0-1>>1]):E=E.add(W[-f0-1>>1].neg())}return V.type==="affine"?E.toP():E},Q.prototype._wnafMulAdd=function(V,B0,H,y0,W){var w0=this._wnafT1,E=this._wnafT2,p0=this._wnafT3,T=0,f0,D,c0;for(f0=0;f0=1;f0-=2){var h0=f0-1,L=f0;if(w0[h0]!==1||w0[L]!==1){p0[h0]=Y(H[h0],w0[h0],this._bitLength),p0[L]=Y(H[L],w0[L],this._bitLength),T=Math.max(p0[h0].length,T),T=Math.max(p0[L].length,T);continue}var d0=[B0[h0],null,null,B0[L]];B0[h0].y.cmp(B0[L].y)===0?(d0[1]=B0[h0].add(B0[L]),d0[2]=B0[h0].toJ().mixedAdd(B0[L].neg())):B0[h0].y.cmp(B0[L].y.redNeg())===0?(d0[1]=B0[h0].toJ().mixedAdd(B0[L]),d0[2]=B0[h0].add(B0[L].neg())):(d0[1]=B0[h0].toJ().mixedAdd(B0[L]),d0[2]=B0[h0].toJ().mixedAdd(B0[L].neg()));var R=[-3,-1,-5,-7,0,7,5,1,3],b0=$(H[h0],H[L]);for(T=Math.max(b0[0].length,T),p0[h0]=new Array(T),p0[L]=new Array(T),D=0;D=0;f0--){for(var M=0;f0>=0;){var u0=!0;for(D=0;D=0&&M++,z=z.dblp(M),f0<0)break;for(D=0;D0?c0=E[D][S-1>>1]:S<0&&(c0=E[D][-S-1>>1].neg()),c0.type==="affine"?z=z.mixedAdd(c0):z=z.add(c0))}}for(f0=0;f0=Math.ceil((V.bitLength()+1)/B0.step):!1},U.prototype._getDoubles=function(V,B0){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var H=[this],y0=this,W=0;W=0&&(h0=f0,L=D),c0.negative&&(c0=c0.neg(),C=C.neg()),h0.negative&&(h0=h0.neg(),L=L.neg()),[{a:c0,b:C},{a:h0,b:L}]},Q.prototype._endoSplit=function(B0){var H=this.endo.basis,y0=H[0],W=H[1],w0=W.b.mul(B0).divRound(this.n),E=y0.b.neg().mul(B0).divRound(this.n),p0=w0.mul(y0.a),T=E.mul(W.a),f0=w0.mul(y0.b),D=E.mul(W.b),c0=B0.sub(p0).sub(T),C=f0.add(D).neg();return{k1:c0,k2:C}},Q.prototype.pointFromX=function(B0,H){B0=new G(B0,16),B0.red||(B0=B0.toRed(this.red));var y0=B0.redSqr().redMul(B0).redIAdd(B0.redMul(this.a)).redIAdd(this.b),W=y0.redSqrt();if(W.redSqr().redSub(y0).cmp(this.zero)!==0)throw new Error("invalid point");var w0=W.fromRed().isOdd();return(H&&!w0||!H&&w0)&&(W=W.redNeg()),this.point(B0,W)},Q.prototype.validate=function(B0){if(B0.inf)return!0;var{x:H,y:y0}=B0,W=this.a.redMul(H),w0=H.redSqr().redMul(H).redIAdd(W).redIAdd(this.b);return y0.redSqr().redISub(w0).cmpn(0)===0},Q.prototype._endoWnafMulAdd=function(B0,H,y0){for(var W=this._endoWnafT1,w0=this._endoWnafT2,E=0;E":""},U.prototype.isInfinity=function(){return this.inf},U.prototype.add=function(B0){if(this.inf)return B0;if(B0.inf)return this;if(this.eq(B0))return this.dbl();if(this.neg().eq(B0))return this.curve.point(null,null);if(this.x.cmp(B0.x)===0)return this.curve.point(null,null);var H=this.y.redSub(B0.y);H.cmpn(0)!==0&&(H=H.redMul(this.x.redSub(B0.x).redInvm()));var y0=H.redSqr().redISub(this.x).redISub(B0.x),W=H.redMul(this.x.redSub(y0)).redISub(this.y);return this.curve.point(y0,W)},U.prototype.dbl=function(){if(this.inf)return this;var B0=this.y.redAdd(this.y);if(B0.cmpn(0)===0)return this.curve.point(null,null);var H=this.curve.a,y0=this.x.redSqr(),W=B0.redInvm(),w0=y0.redAdd(y0).redIAdd(y0).redIAdd(H).redMul(W),E=w0.redSqr().redISub(this.x.redAdd(this.x)),p0=w0.redMul(this.x.redSub(E)).redISub(this.y);return this.curve.point(E,p0)},U.prototype.getX=function(){return this.x.fromRed()},U.prototype.getY=function(){return this.y.fromRed()},U.prototype.mul=function(B0){return B0=new G(B0,16),this.isInfinity()?this:this._hasDoubles(B0)?this.curve._fixedNafMul(this,B0):this.curve.endo?this.curve._endoWnafMulAdd([this],[B0]):this.curve._wnafMul(this,B0)},U.prototype.mulAdd=function(B0,H,y0){var W=[this,H],w0=[B0,y0];return this.curve.endo?this.curve._endoWnafMulAdd(W,w0):this.curve._wnafMulAdd(1,W,w0,2)},U.prototype.jmulAdd=function(B0,H,y0){var W=[this,H],w0=[B0,y0];return this.curve.endo?this.curve._endoWnafMulAdd(W,w0,!0):this.curve._wnafMulAdd(1,W,w0,2,!0)},U.prototype.eq=function(B0){return this===B0||this.inf===B0.inf&&(this.inf||this.x.cmp(B0.x)===0&&this.y.cmp(B0.y)===0)},U.prototype.neg=function(B0){if(this.inf)return this;var H=this.curve.point(this.x,this.y.redNeg());if(B0&&this.precomputed){var y0=this.precomputed,W=function(w0){return w0.neg()};H.precomputed={naf:y0.naf&&{wnd:y0.naf.wnd,points:y0.naf.points.map(W)},doubles:y0.doubles&&{step:y0.doubles.step,points:y0.doubles.points.map(W)}}}return H},U.prototype.toJ=function(){if(this.inf)return this.curve.jpoint(null,null,null);var B0=this.curve.jpoint(this.x,this.y,this.curve.one);return B0};function V(B0,H,y0,W){$.BasePoint.call(this,B0,"jacobian"),H===null&&y0===null&&W===null?(this.x=this.curve.one,this.y=this.curve.one,this.z=new G(0)):(this.x=new G(H,16),this.y=new G(y0,16),this.z=new G(W,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}Y(V,$.BasePoint),Q.prototype.jpoint=function(B0,H,y0){return new V(this,B0,H,y0)},V.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var B0=this.z.redInvm(),H=B0.redSqr(),y0=this.x.redMul(H),W=this.y.redMul(H).redMul(B0);return this.curve.point(y0,W)},V.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},V.prototype.add=function(B0){if(this.isInfinity())return B0;if(B0.isInfinity())return this;var H=B0.z.redSqr(),y0=this.z.redSqr(),W=this.x.redMul(H),w0=B0.x.redMul(y0),E=this.y.redMul(H.redMul(B0.z)),p0=B0.y.redMul(y0.redMul(this.z)),T=W.redSub(w0),f0=E.redSub(p0);if(T.cmpn(0)===0)return f0.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var D=T.redSqr(),c0=D.redMul(T),C=W.redMul(D),h0=f0.redSqr().redIAdd(c0).redISub(C).redISub(C),L=f0.redMul(C.redISub(h0)).redISub(E.redMul(c0)),d0=this.z.redMul(B0.z).redMul(T);return this.curve.jpoint(h0,L,d0)},V.prototype.mixedAdd=function(B0){if(this.isInfinity())return B0.toJ();if(B0.isInfinity())return this;var H=this.z.redSqr(),y0=this.x,W=B0.x.redMul(H),w0=this.y,E=B0.y.redMul(H).redMul(this.z),p0=y0.redSub(W),T=w0.redSub(E);if(p0.cmpn(0)===0)return T.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var f0=p0.redSqr(),D=f0.redMul(p0),c0=y0.redMul(f0),C=T.redSqr().redIAdd(D).redISub(c0).redISub(c0),h0=T.redMul(c0.redISub(C)).redISub(w0.redMul(D)),L=this.z.redMul(p0);return this.curve.jpoint(C,h0,L)},V.prototype.dblp=function(B0){if(B0===0)return this;if(this.isInfinity())return this;if(!B0)return this.dbl();var H;if(this.curve.zeroA||this.curve.threeA){var y0=this;for(H=0;H=0)return!1;if(y0.redIAdd(w0),this.x.cmp(y0)===0)return!0}},V.prototype.inspect=function(){return this.isInfinity()?"":""},V.prototype.isInfinity=function(){return this.z.cmpn(0)===0}}}),sQ=$Q({"node_modules/elliptic/lib/elliptic/curve/mont.js"(X,K){var x0=bQ(),G=X0(),Y=uQ(),$=oQ();function Z(U){Y.call(this,"mont",U),this.a=new x0(U.a,16).toRed(this.red),this.b=new x0(U.b,16).toRed(this.red),this.i4=new x0(4).toRed(this.red).redInvm(),this.two=new x0(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}G(Z,Y),K.exports=Z,Z.prototype.validate=function(U){var V=U.normalize().x,B0=V.redSqr(),H=B0.redMul(V).redAdd(B0.redMul(this.a)).redAdd(V),y0=H.redSqrt();return y0.redSqr().cmp(H)===0};function Q(U,V,B0){Y.BasePoint.call(this,U,"projective"),V===null&&B0===null?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new x0(V,16),this.z=new x0(B0,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}G(Q,Y.BasePoint),Z.prototype.decodePoint=function(U,V){return this.point($.toArray(U,V),1)},Z.prototype.point=function(U,V){return new Q(this,U,V)},Z.prototype.pointFromJSON=function(U){return Q.fromJSON(this,U)},Q.prototype.precompute=function(){},Q.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},Q.fromJSON=function(U,V){return new Q(U,V[0],V[1]||U.one)},Q.prototype.inspect=function(){return this.isInfinity()?"":""},Q.prototype.isInfinity=function(){return this.z.cmpn(0)===0},Q.prototype.dbl=function(){var U=this.x.redAdd(this.z),V=U.redSqr(),B0=this.x.redSub(this.z),H=B0.redSqr(),y0=V.redSub(H),W=V.redMul(H),w0=y0.redMul(H.redAdd(this.curve.a24.redMul(y0)));return this.curve.point(W,w0)},Q.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},Q.prototype.diffAdd=function(U,V){var B0=this.x.redAdd(this.z),H=this.x.redSub(this.z),y0=U.x.redAdd(U.z),W=U.x.redSub(U.z),w0=W.redMul(B0),E=y0.redMul(H),p0=V.z.redMul(w0.redAdd(E).redSqr()),T=V.x.redMul(w0.redISub(E).redSqr());return this.curve.point(p0,T)},Q.prototype.mul=function(U){for(var V=U.clone(),B0=this,H=this.curve.point(null,null),y0=this,W=[];V.cmpn(0)!==0;V.iushrn(1))W.push(V.andln(1));for(var w0=W.length-1;w0>=0;w0--)W[w0]===0?(B0=B0.diffAdd(H,y0),H=H.dbl()):(H=B0.diffAdd(H,y0),B0=B0.dbl());return H},Q.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},Q.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},Q.prototype.eq=function(U){return this.getX().cmp(U.getX())===0},Q.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},Q.prototype.getX=function(){return this.normalize(),this.x.fromRed()}}}),tQ=$Q({"node_modules/elliptic/lib/elliptic/curve/edwards.js"(X,K){var x0=oQ(),G=bQ(),Y=X0(),$=uQ(),Z=x0.assert;function Q(V){this.twisted=(V.a|0)!==1,this.mOneA=this.twisted&&(V.a|0)===-1,this.extended=this.mOneA,$.call(this,"edwards",V),this.a=new G(V.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new G(V.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new G(V.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),Z(!this.twisted||this.c.fromRed().cmpn(1)===0),this.oneC=(V.c|0)===1}Y(Q,$),K.exports=Q,Q.prototype._mulA=function(V){return this.mOneA?V.redNeg():this.a.redMul(V)},Q.prototype._mulC=function(V){return this.oneC?V:this.c.redMul(V)},Q.prototype.jpoint=function(V,B0,H,y0){return this.point(V,B0,H,y0)},Q.prototype.pointFromX=function(V,B0){V=new G(V,16),V.red||(V=V.toRed(this.red));var H=V.redSqr(),y0=this.c2.redSub(this.a.redMul(H)),W=this.one.redSub(this.c2.redMul(this.d).redMul(H)),w0=y0.redMul(W.redInvm()),E=w0.redSqrt();if(E.redSqr().redSub(w0).cmp(this.zero)!==0)throw new Error("invalid point");var p0=E.fromRed().isOdd();return(B0&&!p0||!B0&&p0)&&(E=E.redNeg()),this.point(V,E)},Q.prototype.pointFromY=function(V,B0){V=new G(V,16),V.red||(V=V.toRed(this.red));var H=V.redSqr(),y0=H.redSub(this.c2),W=H.redMul(this.d).redMul(this.c2).redSub(this.a),w0=y0.redMul(W.redInvm());if(w0.cmp(this.zero)===0){if(B0)throw new Error("invalid point");return this.point(this.zero,V)}var E=w0.redSqrt();if(E.redSqr().redSub(w0).cmp(this.zero)!==0)throw new Error("invalid point");return E.fromRed().isOdd()!==B0&&(E=E.redNeg()),this.point(E,V)},Q.prototype.validate=function(V){if(V.isInfinity())return!0;V.normalize();var B0=V.x.redSqr(),H=V.y.redSqr(),y0=B0.redMul(this.a).redAdd(H),W=this.c2.redMul(this.one.redAdd(this.d.redMul(B0).redMul(H)));return y0.cmp(W)===0};function U(V,B0,H,y0,W){$.BasePoint.call(this,V,"projective"),B0===null&&H===null&&y0===null?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new G(B0,16),this.y=new G(H,16),this.z=y0?new G(y0,16):this.curve.one,this.t=W&&new G(W,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}Y(U,$.BasePoint),Q.prototype.pointFromJSON=function(V){return U.fromJSON(this,V)},Q.prototype.point=function(V,B0,H,y0){return new U(this,V,B0,H,y0)},U.fromJSON=function(V,B0){return new U(V,B0[0],B0[1],B0[2])},U.prototype.inspect=function(){return this.isInfinity()?"":""},U.prototype.isInfinity=function(){return this.x.cmpn(0)===0&&(this.y.cmp(this.z)===0||this.zOne&&this.y.cmp(this.curve.c)===0)},U.prototype._extDbl=function(){var V=this.x.redSqr(),B0=this.y.redSqr(),H=this.z.redSqr();H=H.redIAdd(H);var y0=this.curve._mulA(V),W=this.x.redAdd(this.y).redSqr().redISub(V).redISub(B0),w0=y0.redAdd(B0),E=w0.redSub(H),p0=y0.redSub(B0),T=W.redMul(E),f0=w0.redMul(p0),D=W.redMul(p0),c0=E.redMul(w0);return this.curve.point(T,f0,c0,D)},U.prototype._projDbl=function(){var V=this.x.redAdd(this.y).redSqr(),B0=this.x.redSqr(),H=this.y.redSqr(),y0,W,w0,E,p0,T;if(this.curve.twisted){E=this.curve._mulA(B0);var f0=E.redAdd(H);this.zOne?(y0=V.redSub(B0).redSub(H).redMul(f0.redSub(this.curve.two)),W=f0.redMul(E.redSub(H)),w0=f0.redSqr().redSub(f0).redSub(f0)):(p0=this.z.redSqr(),T=f0.redSub(p0).redISub(p0),y0=V.redSub(B0).redISub(H).redMul(T),W=f0.redMul(E.redSub(H)),w0=f0.redMul(T))}else E=B0.redAdd(H),p0=this.curve._mulC(this.z).redSqr(),T=E.redSub(p0).redSub(p0),y0=this.curve._mulC(V.redISub(E)).redMul(T),W=this.curve._mulC(E).redMul(B0.redISub(H)),w0=E.redMul(T);return this.curve.point(y0,W,w0)},U.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},U.prototype._extAdd=function(V){var B0=this.y.redSub(this.x).redMul(V.y.redSub(V.x)),H=this.y.redAdd(this.x).redMul(V.y.redAdd(V.x)),y0=this.t.redMul(this.curve.dd).redMul(V.t),W=this.z.redMul(V.z.redAdd(V.z)),w0=H.redSub(B0),E=W.redSub(y0),p0=W.redAdd(y0),T=H.redAdd(B0),f0=w0.redMul(E),D=p0.redMul(T),c0=w0.redMul(T),C=E.redMul(p0);return this.curve.point(f0,D,C,c0)},U.prototype._projAdd=function(V){var B0=this.z.redMul(V.z),H=B0.redSqr(),y0=this.x.redMul(V.x),W=this.y.redMul(V.y),w0=this.curve.d.redMul(y0).redMul(W),E=H.redSub(w0),p0=H.redAdd(w0),T=this.x.redAdd(this.y).redMul(V.x.redAdd(V.y)).redISub(y0).redISub(W),f0=B0.redMul(E).redMul(T),D,c0;return this.curve.twisted?(D=B0.redMul(p0).redMul(W.redSub(this.curve._mulA(y0))),c0=E.redMul(p0)):(D=B0.redMul(p0).redMul(W.redSub(y0)),c0=this.curve._mulC(E).redMul(p0)),this.curve.point(f0,D,c0)},U.prototype.add=function(V){return this.isInfinity()?V:V.isInfinity()?this:this.curve.extended?this._extAdd(V):this._projAdd(V)},U.prototype.mul=function(V){return this._hasDoubles(V)?this.curve._fixedNafMul(this,V):this.curve._wnafMul(this,V)},U.prototype.mulAdd=function(V,B0,H){return this.curve._wnafMulAdd(1,[this,B0],[V,H],2,!1)},U.prototype.jmulAdd=function(V,B0,H){return this.curve._wnafMulAdd(1,[this,B0],[V,H],2,!0)},U.prototype.normalize=function(){if(this.zOne)return this;var V=this.z.redInvm();return this.x=this.x.redMul(V),this.y=this.y.redMul(V),this.t&&(this.t=this.t.redMul(V)),this.z=this.curve.one,this.zOne=!0,this},U.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},U.prototype.getX=function(){return this.normalize(),this.x.fromRed()},U.prototype.getY=function(){return this.normalize(),this.y.fromRed()},U.prototype.eq=function(V){return this===V||this.getX().cmp(V.getX())===0&&this.getY().cmp(V.getY())===0},U.prototype.eqXToP=function(V){var B0=V.toRed(this.curve.red).redMul(this.z);if(this.x.cmp(B0)===0)return!0;for(var H=V.clone(),y0=this.curve.redN.redMul(this.z);;){if(H.iadd(this.curve.n),H.cmp(this.curve.p)>=0)return!1;if(B0.redIAdd(y0),this.x.cmp(B0)===0)return!0}},U.prototype.toP=U.prototype.normalize,U.prototype.mixedAdd=U.prototype.add}}),mQ=$Q({"node_modules/elliptic/lib/elliptic/curve/index.js"(X){var K=X;K.base=uQ(),K.short=nQ(),K.mont=sQ(),K.edwards=tQ()}}),aQ=$Q({"node_modules/hash.js/lib/hash/utils.js"(X){var K=N0(),x0=X0();X.inherits=x0;function G(z,o0){return(z.charCodeAt(o0)&64512)!==55296||o0<0||o0+1>=z.length?!1:(z.charCodeAt(o0+1)&64512)===56320}function Y(z,o0){if(Array.isArray(z))return z.slice();if(!z)return[];var M=[];if(typeof z=="string")if(o0){if(o0==="hex")for(z=z.replace(/[^a-z0-9]+/gi,""),z.length%2!==0&&(z="0"+z),S=0;S>6|192,M[u0++]=n0&63|128):G(z,S)?(n0=65536+((n0&1023)<<10)+(z.charCodeAt(++S)&1023),M[u0++]=n0>>18|240,M[u0++]=n0>>12&63|128,M[u0++]=n0>>6&63|128,M[u0++]=n0&63|128):(M[u0++]=n0>>12|224,M[u0++]=n0>>6&63|128,M[u0++]=n0&63|128)}else for(S=0;S>>24|z>>>8&65280|z<<8&16711680|(z&255)<<24;return o0>>>0}X.htonl=Z;function Q(z,o0){for(var M="",u0=0;u0>>0}return n0}X.join32=B0;function H(z,o0){for(var M=new Array(z.length*4),u0=0,S=0;u0>>24,M[S+1]=n0>>>16&255,M[S+2]=n0>>>8&255,M[S+3]=n0&255):(M[S+3]=n0>>>24,M[S+2]=n0>>>16&255,M[S+1]=n0>>>8&255,M[S]=n0&255)}return M}X.split32=H;function y0(z,o0){return z>>>o0|z<<32-o0}X.rotr32=y0;function W(z,o0){return z<>>32-o0}X.rotl32=W;function w0(z,o0){return z+o0>>>0}X.sum32=w0;function E(z,o0,M){return z+o0+M>>>0}X.sum32_3=E;function p0(z,o0,M,u0){return z+o0+M+u0>>>0}X.sum32_4=p0;function T(z,o0,M,u0,S){return z+o0+M+u0+S>>>0}X.sum32_5=T;function f0(z,o0,M,u0){var S=z[o0],n0=z[o0+1],v=u0+n0>>>0,s0=(v>>0,z[o0+1]=v}X.sum64=f0;function D(z,o0,M,u0){var S=o0+u0>>>0,n0=(S>>0}X.sum64_hi=D;function c0(z,o0,M,u0){var S=o0+u0;return S>>>0}X.sum64_lo=c0;function C(z,o0,M,u0,S,n0,v,s0){var I=0,t0=o0;t0=t0+u0>>>0,I+=t0>>0,I+=t0>>0,I+=t0>>0}X.sum64_4_hi=C;function h0(z,o0,M,u0,S,n0,v,s0){var I=o0+u0+n0+s0;return I>>>0}X.sum64_4_lo=h0;function L(z,o0,M,u0,S,n0,v,s0,I,t0){var m0=0,a0=o0;a0=a0+u0>>>0,m0+=a0>>0,m0+=a0>>0,m0+=a0>>0,m0+=a0>>0}X.sum64_5_hi=L;function d0(z,o0,M,u0,S,n0,v,s0,I,t0){var m0=o0+u0+n0+s0+t0;return m0>>>0}X.sum64_5_lo=d0;function R(z,o0,M){var u0=o0<<32-M|z>>>M;return u0>>>0}X.rotr64_hi=R;function b0(z,o0,M){var u0=z<<32-M|o0>>>M;return u0>>>0}X.rotr64_lo=b0;function P(z,o0,M){return z>>>M}X.shr64_hi=P;function l0(z,o0,M){var u0=z<<32-M|o0>>>M;return u0>>>0}X.shr64_lo=l0}}),eQ=$Q({"node_modules/hash.js/lib/hash/common.js"(X){var K=aQ(),x0=N0();function G(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}X.BlockHash=G,G.prototype.update=function(Y,$){if(Y=K.toArray(Y,$),this.pending?this.pending=this.pending.concat(Y):this.pending=Y,this.pendingTotal+=Y.length,this.pending.length>=this._delta8){Y=this.pending;var Z=Y.length%this._delta8;this.pending=Y.slice(Y.length-Z,Y.length),this.pending.length===0&&(this.pending=null),Y=K.join32(Y,0,Y.length-Z,this.endian);for(var Q=0;Q>>24&255,Q[U++]=Y>>>16&255,Q[U++]=Y>>>8&255,Q[U++]=Y&255}else for(Q[U++]=Y&255,Q[U++]=Y>>>8&255,Q[U++]=Y>>>16&255,Q[U++]=Y>>>24&255,Q[U++]=0,Q[U++]=0,Q[U++]=0,Q[U++]=0,V=8;V>>3}X.g0_256=V;function B0(H){return x0(H,17)^x0(H,19)^H>>>10}X.g1_256=B0}}),iQ=$Q({"node_modules/hash.js/lib/hash/sha/1.js"(X,K){var x0=aQ(),G=eQ(),Y=rQ(),$=x0.rotl32,Z=x0.sum32,Q=x0.sum32_5,U=Y.ft_1,V=G.BlockHash,B0=[1518500249,1859775393,2400959708,3395469782];function H(){if(!(this instanceof H))return new H;V.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}x0.inherits(H,V),K.exports=H,H.blockSize=512,H.outSize=160,H.hmacStrength=80,H.padLength=64,H.prototype._update=function(y0,W){for(var w0=this.W,E=0;E<16;E++)w0[E]=y0[W+E];for(;Ethis.blockSize&&($=new this.Hash().update($).digest()),G($.length<=this.blockSize);for(var Z=$.length;Z=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(Q,U,V)}K.exports=$,$.prototype._init=function(Z,Q,U){var V=Z.concat(Q).concat(U);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var B0=0;B0=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(Z.concat(U||[])),this._reseed=1},$.prototype.generate=function(Z,Q,U,V){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");typeof Q!="string"&&(V=U,U=Q,Q=null),U&&(U=G.toArray(U,V||"hex"),this._update(U));for(var B0=[];B0.length"}}}),FY=$Q({"node_modules/elliptic/lib/elliptic/ec/signature.js"(X,K){var x0=bQ(),G=oQ(),Y=G.assert;function $(B0,H){if(B0 instanceof $)return B0;this._importDER(B0,H)||(Y(B0.r&&B0.s,"Signature without r or s"),this.r=new x0(B0.r,16),this.s=new x0(B0.s,16),B0.recoveryParam===void 0?this.recoveryParam=null:this.recoveryParam=B0.recoveryParam)}K.exports=$;function Z(){this.place=0}function Q(B0,H){var y0=B0[H.place++];if(!(y0&128))return y0;var W=y0&15;if(W===0||W>4)return!1;for(var w0=0,E=0,p0=H.place;E>>=0;return w0<=127?!1:(H.place=p0,w0)}function U(B0){for(var H=0,y0=B0.length-1;!B0[H]&&!(B0[H+1]&128)&&H>>3);for(B0.push(y0|128);--y0;)B0.push(H>>>(y0<<3)&255);B0.push(H)}$.prototype.toDER=function(B0){var H=this.r.toArray(),y0=this.s.toArray();for(H[0]&128&&(H=[0].concat(H)),y0[0]&128&&(y0=[0].concat(y0)),H=U(H),y0=U(y0);!y0[0]&&!(y0[1]&128);)y0=y0.slice(1);var W=[2];V(W,H.length),W=W.concat(H),W.push(2),V(W,y0.length);var w0=W.concat(y0),E=[48];return V(E,w0.length),E=E.concat(w0),G.encode(E,B0)}}}),AY=$Q({"node_modules/elliptic/lib/elliptic/ec/index.js"(X,K){var x0=bQ(),G=OY(),Y=oQ(),$=IY(),Z=xQ(),Q=Y.assert,U=JY(),V=FY();function B0(H){if(!(this instanceof B0))return new B0(H);typeof H=="string"&&(Q(Object.prototype.hasOwnProperty.call($,H),"Unknown curve "+H),H=$[H]),H instanceof $.PresetCurve&&(H={curve:H}),this.curve=H.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=H.curve.g,this.g.precompute(H.curve.n.bitLength()+1),this.hash=H.hash||H.curve.hash}K.exports=B0,B0.prototype.keyPair=function(H){return new U(this,H)},B0.prototype.keyFromPrivate=function(H,y0){return U.fromPrivate(this,H,y0)},B0.prototype.keyFromPublic=function(H,y0){return U.fromPublic(this,H,y0)},B0.prototype.genKeyPair=function(H){H||(H={});for(var y0=new G({hash:this.hash,pers:H.pers,persEnc:H.persEnc||"utf8",entropy:H.entropy||Z(this.hash.hmacStrength),entropyEnc:H.entropy&&H.entropyEnc||"utf8",nonce:this.n.toArray()}),W=this.n.byteLength(),w0=this.n.sub(new x0(2));;){var E=new x0(y0.generate(W));if(!(E.cmp(w0)>0))return E.iaddn(1),this.keyFromPrivate(E)}},B0.prototype._truncateToN=function(H,y0){var W=H.byteLength()*8-this.n.bitLength();return W>0&&(H=H.ushrn(W)),!y0&&H.cmp(this.n)>=0?H.sub(this.n):H},B0.prototype.sign=function(H,y0,W,w0){typeof W=="object"&&(w0=W,W=null),w0||(w0={}),y0=this.keyFromPrivate(y0,W),H=this._truncateToN(new x0(H,16));for(var E=this.n.byteLength(),p0=y0.getPrivate().toArray("be",E),T=H.toArray("be",E),f0=new G({hash:this.hash,entropy:p0,nonce:T,pers:w0.pers,persEnc:w0.persEnc||"utf8"}),D=this.n.sub(new x0(1)),c0=0;;c0++){var C=w0.k?w0.k(c0):new x0(f0.generate(this.n.byteLength()));if(C=this._truncateToN(C,!0),!(C.cmpn(1)<=0||C.cmp(D)>=0)){var h0=this.g.mul(C);if(!h0.isInfinity()){var L=h0.getX(),d0=L.umod(this.n);if(d0.cmpn(0)!==0){var R=C.invm(this.n).mul(d0.mul(y0.getPrivate()).iadd(H));if(R=R.umod(this.n),R.cmpn(0)!==0){var b0=(h0.getY().isOdd()?1:0)|(L.cmp(d0)!==0?2:0);return w0.canonical&&R.cmp(this.nh)>0&&(R=this.n.sub(R),b0^=1),new V({r:d0,s:R,recoveryParam:b0})}}}}}},B0.prototype.verify=function(H,y0,W,w0){H=this._truncateToN(new x0(H,16)),W=this.keyFromPublic(W,w0),y0=new V(y0,"hex");var{r:E,s:p0}=y0;if(E.cmpn(1)<0||E.cmp(this.n)>=0||p0.cmpn(1)<0||p0.cmp(this.n)>=0)return!1;var T=p0.invm(this.n),f0=T.mul(H).umod(this.n),D=T.mul(E).umod(this.n),c0;return this.curve._maxwellTrick?(c0=this.g.jmulAdd(f0,W.getPublic(),D),c0.isInfinity()?!1:c0.eqXToP(E)):(c0=this.g.mulAdd(f0,W.getPublic(),D),c0.isInfinity()?!1:c0.getX().umod(this.n).cmp(E)===0)},B0.prototype.recoverPubKey=function(H,y0,W,w0){Q((3&W)===W,"The recovery param is more than two bits"),y0=new V(y0,w0);var E=this.n,p0=new x0(H),T=y0.r,f0=y0.s,D=W&1,c0=W>>1;if(T.cmp(this.curve.p.umod(this.curve.n))>=0&&c0)throw new Error("Unable to find sencond key candinate");c0?T=this.curve.pointFromX(T.add(this.curve.n),D):T=this.curve.pointFromX(T,D);var C=y0.r.invm(E),h0=E.sub(p0).mul(C).umod(E),L=f0.mul(C).umod(E);return this.g.mulAdd(h0,T,L)},B0.prototype.getKeyRecoveryParam=function(H,y0,W,w0){if(y0=new V(y0,w0),y0.recoveryParam!==null)return y0.recoveryParam;for(var E=0;E<4;E++){var p0;try{p0=this.recoverPubKey(H,y0,E)}catch{continue}if(p0.eq(W))return E}throw new Error("Unable to find valid recovery factor")}}}),HY=$Q({"node_modules/elliptic/lib/elliptic/eddsa/key.js"(X,K){var x0=oQ(),G=x0.assert,Y=x0.parseBytes,$=x0.cachedProperty;function Z(Q,U){this.eddsa=Q,this._secret=Y(U.secret),Q.isPoint(U.pub)?this._pub=U.pub:this._pubBytes=Y(U.pub)}Z.fromPublic=function(Q,U){return U instanceof Z?U:new Z(Q,{pub:U})},Z.fromSecret=function(Q,U){return U instanceof Z?U:new Z(Q,{secret:U})},Z.prototype.secret=function(){return this._secret},$(Z,"pubBytes",function(){return this.eddsa.encodePoint(this.pub())}),$(Z,"pub",function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())}),$(Z,"privBytes",function(){var Q=this.eddsa,U=this.hash(),V=Q.encodingLength-1,B0=U.slice(0,Q.encodingLength);return B0[0]&=248,B0[V]&=127,B0[V]|=64,B0}),$(Z,"priv",function(){return this.eddsa.decodeInt(this.privBytes())}),$(Z,"hash",function(){return this.eddsa.hash().update(this.secret()).digest()}),$(Z,"messagePrefix",function(){return this.hash().slice(this.eddsa.encodingLength)}),Z.prototype.sign=function(Q){return G(this._secret,"KeyPair can only verify"),this.eddsa.sign(Q,this)},Z.prototype.verify=function(Q,U){return this.eddsa.verify(Q,U,this)},Z.prototype.getSecret=function(Q){return G(this._secret,"KeyPair is public only"),x0.encode(this.secret(),Q)},Z.prototype.getPublic=function(Q){return x0.encode(this.pubBytes(),Q)},K.exports=Z}}),WY=$Q({"node_modules/elliptic/lib/elliptic/eddsa/signature.js"(X,K){var x0=bQ(),G=oQ(),Y=G.assert,$=G.cachedProperty,Z=G.parseBytes;function Q(U,V){this.eddsa=U,typeof V!="object"&&(V=Z(V)),Array.isArray(V)&&(V={R:V.slice(0,U.encodingLength),S:V.slice(U.encodingLength)}),Y(V.R&&V.S,"Signature without R or S"),U.isPoint(V.R)&&(this._R=V.R),V.S instanceof x0&&(this._S=V.S),this._Rencoded=Array.isArray(V.R)?V.R:V.Rencoded,this._Sencoded=Array.isArray(V.S)?V.S:V.Sencoded}$(Q,"S",function(){return this.eddsa.decodeInt(this.Sencoded())}),$(Q,"R",function(){return this.eddsa.decodePoint(this.Rencoded())}),$(Q,"Rencoded",function(){return this.eddsa.encodePoint(this.R())}),$(Q,"Sencoded",function(){return this.eddsa.encodeInt(this.S())}),Q.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},Q.prototype.toHex=function(){return G.encode(this.toBytes(),"hex").toUpperCase()},K.exports=Q}}),EY=$Q({"node_modules/elliptic/lib/elliptic/eddsa/index.js"(X,K){var x0=XY(),G=IY(),Y=oQ(),$=Y.assert,Z=Y.parseBytes,Q=HY(),U=WY();function V(B0){if($(B0==="ed25519","only tested with ed25519 so far"),!(this instanceof V))return new V(B0);B0=G[B0].curve,this.curve=B0,this.g=B0.g,this.g.precompute(B0.n.bitLength()+1),this.pointClass=B0.point().constructor,this.encodingLength=Math.ceil(B0.n.bitLength()/8),this.hash=x0.sha512}K.exports=V,V.prototype.sign=function(B0,H){B0=Z(B0);var y0=this.keyFromSecret(H),W=this.hashInt(y0.messagePrefix(),B0),w0=this.g.mul(W),E=this.encodePoint(w0),p0=this.hashInt(E,y0.pubBytes(),B0).mul(y0.priv()),T=W.add(p0).umod(this.curve.n);return this.makeSignature({R:w0,S:T,Rencoded:E})},V.prototype.verify=function(B0,H,y0){B0=Z(B0),H=this.makeSignature(H);var W=this.keyFromPublic(y0),w0=this.hashInt(H.Rencoded(),W.pubBytes(),B0),E=this.g.mul(H.S()),p0=H.R().add(W.pub().mul(w0));return p0.eq(E)},V.prototype.hashInt=function(){for(var B0=this.hash(),H=0;H0?l0:z},Z.min=function(l0,z){return l0.cmp(z)<0?l0:z},Z.prototype._init=function(l0,z,o0){if(typeof l0=="number")return this._initNumber(l0,z,o0);if(typeof l0=="object")return this._initArray(l0,z,o0);z==="hex"&&(z=16),Y(z===(z|0)&&z>=2&&z<=36),l0=l0.toString().replace(/\s+/g,"");var M=0;l0[0]==="-"&&(M++,this.negative=1),M=0;M-=3)S=l0[M]|l0[M-1]<<8|l0[M-2]<<16,this.words[u0]|=S<>>26-n0&67108863,n0+=24,n0>=26&&(n0-=26,u0++);else if(o0==="le")for(M=0,u0=0;M>>26-n0&67108863,n0+=24,n0>=26&&(n0-=26,u0++);return this.strip()};function U(l0,z){var o0=l0.charCodeAt(z);return o0>=65&&o0<=70?o0-55:o0>=97&&o0<=102?o0-87:o0-48&15}function V(l0,z,o0){var M=U(l0,o0);return o0-1>=z&&(M|=U(l0,o0-1)<<4),M}Z.prototype._parseHex=function(l0,z,o0){this.length=Math.ceil((l0.length-z)/6),this.words=new Array(this.length);for(var M=0;M=z;M-=2)n0=V(l0,z,M)<=18?(u0-=18,S+=1,this.words[S]|=n0>>>26):u0+=8;else{var v=l0.length-z;for(M=v%2===0?z+1:z;M=18?(u0-=18,S+=1,this.words[S]|=n0>>>26):u0+=8}this.strip()};function B0(l0,z,o0,M){for(var u0=0,S=Math.min(l0.length,o0),n0=z;n0=49?u0+=v-49+10:v>=17?u0+=v-17+10:u0+=v}return u0}Z.prototype._parseBase=function(l0,z,o0){this.words=[0],this.length=1;for(var M=0,u0=1;u0<=67108863;u0*=z)M++;M--,u0=u0/z|0;for(var S=l0.length-o0,n0=S%M,v=Math.min(S,S-n0)+o0,s0=0,I=o0;I1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},Z.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},Z.prototype.inspect=function(){return(this.red?""};var H=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],y0=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],W=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64000000,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,24300000,28629151,33554432,39135393,45435424,52521875,60466176];Z.prototype.toString=function(l0,z){l0=l0||10,z=z|0||1;var o0;if(l0===16||l0==="hex"){o0="";for(var M=0,u0=0,S=0;S>>24-M&16777215,u0!==0||S!==this.length-1?o0=H[6-v.length]+v+o0:o0=v+o0,M+=2,M>=26&&(M-=26,S--)}for(u0!==0&&(o0=u0.toString(16)+o0);o0.length%z!==0;)o0="0"+o0;return this.negative!==0&&(o0="-"+o0),o0}if(l0===(l0|0)&&l0>=2&&l0<=36){var s0=y0[l0],I=W[l0];o0="";var t0=this.clone();for(t0.negative=0;!t0.isZero();){var m0=t0.modn(I).toString(l0);t0=t0.idivn(I),t0.isZero()?o0=m0+o0:o0=H[s0-m0.length]+m0+o0}for(this.isZero()&&(o0="0"+o0);o0.length%z!==0;)o0="0"+o0;return this.negative!==0&&(o0="-"+o0),o0}Y(!1,"Base should be between 2 and 36")},Z.prototype.toNumber=function(){var l0=this.words[0];return this.length===2?l0+=this.words[1]*67108864:this.length===3&&this.words[2]===1?l0+=4503599627370496+this.words[1]*67108864:this.length>2&&Y(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-l0:l0},Z.prototype.toJSON=function(){return this.toString(16)},Z.prototype.toBuffer=function(l0,z){return Y(typeof Q<"u"),this.toArrayLike(Q,l0,z)},Z.prototype.toArray=function(l0,z){return this.toArrayLike(Array,l0,z)},Z.prototype.toArrayLike=function(l0,z,o0){var M=this.byteLength(),u0=o0||Math.max(1,M);Y(M<=u0,"byte array longer than desired length"),Y(u0>0,"Requested array length <= 0"),this.strip();var S=z==="le",n0=new l0(u0),v,s0,I=this.clone();if(S){for(s0=0;!I.isZero();s0++)v=I.andln(255),I.iushrn(8),n0[s0]=v;for(;s0=4096&&(o0+=13,z>>>=13),z>=64&&(o0+=7,z>>>=7),z>=8&&(o0+=4,z>>>=4),z>=2&&(o0+=2,z>>>=2),o0+z},Z.prototype._zeroBits=function(l0){if(l0===0)return 26;var z=l0,o0=0;return(z&8191)===0&&(o0+=13,z>>>=13),(z&127)===0&&(o0+=7,z>>>=7),(z&15)===0&&(o0+=4,z>>>=4),(z&3)===0&&(o0+=2,z>>>=2),(z&1)===0&&o0++,o0},Z.prototype.bitLength=function(){var l0=this.words[this.length-1],z=this._countBits(l0);return(this.length-1)*26+z};function w0(l0){for(var z=new Array(l0.bitLength()),o0=0;o0>>u0}return z}Z.prototype.zeroBits=function(){if(this.isZero())return 0;for(var l0=0,z=0;zl0.length?this.clone().ior(l0):l0.clone().ior(this)},Z.prototype.uor=function(l0){return this.length>l0.length?this.clone().iuor(l0):l0.clone().iuor(this)},Z.prototype.iuand=function(l0){var z;this.length>l0.length?z=l0:z=this;for(var o0=0;o0l0.length?this.clone().iand(l0):l0.clone().iand(this)},Z.prototype.uand=function(l0){return this.length>l0.length?this.clone().iuand(l0):l0.clone().iuand(this)},Z.prototype.iuxor=function(l0){var z,o0;this.length>l0.length?(z=this,o0=l0):(z=l0,o0=this);for(var M=0;Ml0.length?this.clone().ixor(l0):l0.clone().ixor(this)},Z.prototype.uxor=function(l0){return this.length>l0.length?this.clone().iuxor(l0):l0.clone().iuxor(this)},Z.prototype.inotn=function(l0){Y(typeof l0=="number"&&l0>=0);var z=Math.ceil(l0/26)|0,o0=l0%26;this._expand(z),o0>0&&z--;for(var M=0;M0&&(this.words[M]=~this.words[M]&67108863>>26-o0),this.strip()},Z.prototype.notn=function(l0){return this.clone().inotn(l0)},Z.prototype.setn=function(l0,z){Y(typeof l0=="number"&&l0>=0);var o0=l0/26|0,M=l0%26;return this._expand(o0+1),z?this.words[o0]=this.words[o0]|1<l0.length?(o0=this,M=l0):(o0=l0,M=this);for(var u0=0,S=0;S>>26;for(;u0!==0&&S>>26;if(this.length=o0.length,u0!==0)this.words[this.length]=u0,this.length++;else if(o0!==this)for(;Sl0.length?this.clone().iadd(l0):l0.clone().iadd(this)},Z.prototype.isub=function(l0){if(l0.negative!==0){l0.negative=0;var z=this.iadd(l0);return l0.negative=1,z._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(l0),this.negative=1,this._normSign();var o0=this.cmp(l0);if(o0===0)return this.negative=0,this.length=1,this.words[0]=0,this;var M,u0;o0>0?(M=this,u0=l0):(M=l0,u0=this);for(var S=0,n0=0;n0>26,this.words[n0]=z&67108863;for(;S!==0&&n0>26,this.words[n0]=z&67108863;if(S===0&&n0>>26,m0=s0&67108863,a0=Math.min(I,z.length-1),q=Math.max(0,I-l0.length+1);q<=a0;q++){var e0=I-q|0;u0=l0.words[e0]|0,S=z.words[q]|0,n0=u0*S+m0,t0+=n0/67108864|0,m0=n0&67108863}o0.words[I]=m0|0,s0=t0|0}return s0!==0?o0.words[I]=s0|0:o0.length--,o0.strip()}var p0=function(l0,z,o0){var M=l0.words,u0=z.words,S=o0.words,n0=0,v,s0,I,t0=M[0]|0,m0=t0&8191,a0=t0>>>13,q=M[1]|0,e0=q&8191,r0=q>>>13,i0=M[2]|0,j=i0&8191,$$=i0>>>13,k=M[3]|0,Q$=k&8191,g=k>>>13,Y$=M[4]|0,_=Y$&8191,Z$=Y$>>>13,N=M[5]|0,G$=N&8191,x=N>>>13,V$=M[6]|0,B=V$&8191,U$=V$>>>13,y=M[7]|0,X$=y&8191,w=y>>>13,K$=M[8]|0,p=K$&8191,I$=K$>>>13,f=M[9]|0,O$=f&8191,c=f>>>13,J$=u0[0]|0,h=J$&8191,F$=J$>>>13,d=u0[1]|0,A$=d&8191,b=d>>>13,H$=u0[2]|0,l=H$&8191,W$=H$>>>13,o=u0[3]|0,E$=o&8191,u=o>>>13,T$=u0[4]|0,n=T$&8191,D$=T$>>>13,s=u0[5]|0,C$=s&8191,t=s>>>13,L$=u0[6]|0,m=L$&8191,R$=L$>>>13,a=u0[7]|0,P$=a&8191,O=a>>>13,z$=u0[8]|0,e=z$&8191,M$=z$>>>13,J=u0[9]|0,S$=J&8191,F=J>>>13;o0.negative=l0.negative^z.negative,o0.length=19,v=Math.imul(m0,h),s0=Math.imul(m0,F$),s0=s0+Math.imul(a0,h)|0,I=Math.imul(a0,F$);var v$=(n0+v|0)+((s0&8191)<<13)|0;n0=(I+(s0>>>13)|0)+(v$>>>26)|0,v$&=67108863,v=Math.imul(e0,h),s0=Math.imul(e0,F$),s0=s0+Math.imul(r0,h)|0,I=Math.imul(r0,F$),v=v+Math.imul(m0,A$)|0,s0=s0+Math.imul(m0,b)|0,s0=s0+Math.imul(a0,A$)|0,I=I+Math.imul(a0,b)|0;var r=(n0+v|0)+((s0&8191)<<13)|0;n0=(I+(s0>>>13)|0)+(r>>>26)|0,r&=67108863,v=Math.imul(j,h),s0=Math.imul(j,F$),s0=s0+Math.imul($$,h)|0,I=Math.imul($$,F$),v=v+Math.imul(e0,A$)|0,s0=s0+Math.imul(e0,b)|0,s0=s0+Math.imul(r0,A$)|0,I=I+Math.imul(r0,b)|0,v=v+Math.imul(m0,l)|0,s0=s0+Math.imul(m0,W$)|0,s0=s0+Math.imul(a0,l)|0,I=I+Math.imul(a0,W$)|0;var q$=(n0+v|0)+((s0&8191)<<13)|0;n0=(I+(s0>>>13)|0)+(q$>>>26)|0,q$&=67108863,v=Math.imul(Q$,h),s0=Math.imul(Q$,F$),s0=s0+Math.imul(g,h)|0,I=Math.imul(g,F$),v=v+Math.imul(j,A$)|0,s0=s0+Math.imul(j,b)|0,s0=s0+Math.imul($$,A$)|0,I=I+Math.imul($$,b)|0,v=v+Math.imul(e0,l)|0,s0=s0+Math.imul(e0,W$)|0,s0=s0+Math.imul(r0,l)|0,I=I+Math.imul(r0,W$)|0,v=v+Math.imul(m0,E$)|0,s0=s0+Math.imul(m0,u)|0,s0=s0+Math.imul(a0,E$)|0,I=I+Math.imul(a0,u)|0;var i=(n0+v|0)+((s0&8191)<<13)|0;n0=(I+(s0>>>13)|0)+(i>>>26)|0,i&=67108863,v=Math.imul(_,h),s0=Math.imul(_,F$),s0=s0+Math.imul(Z$,h)|0,I=Math.imul(Z$,F$),v=v+Math.imul(Q$,A$)|0,s0=s0+Math.imul(Q$,b)|0,s0=s0+Math.imul(g,A$)|0,I=I+Math.imul(g,b)|0,v=v+Math.imul(j,l)|0,s0=s0+Math.imul(j,W$)|0,s0=s0+Math.imul($$,l)|0,I=I+Math.imul($$,W$)|0,v=v+Math.imul(e0,E$)|0,s0=s0+Math.imul(e0,u)|0,s0=s0+Math.imul(r0,E$)|0,I=I+Math.imul(r0,u)|0,v=v+Math.imul(m0,n)|0,s0=s0+Math.imul(m0,D$)|0,s0=s0+Math.imul(a0,n)|0,I=I+Math.imul(a0,D$)|0;var j$=(n0+v|0)+((s0&8191)<<13)|0;n0=(I+(s0>>>13)|0)+(j$>>>26)|0,j$&=67108863,v=Math.imul(G$,h),s0=Math.imul(G$,F$),s0=s0+Math.imul(x,h)|0,I=Math.imul(x,F$),v=v+Math.imul(_,A$)|0,s0=s0+Math.imul(_,b)|0,s0=s0+Math.imul(Z$,A$)|0,I=I+Math.imul(Z$,b)|0,v=v+Math.imul(Q$,l)|0,s0=s0+Math.imul(Q$,W$)|0,s0=s0+Math.imul(g,l)|0,I=I+Math.imul(g,W$)|0,v=v+Math.imul(j,E$)|0,s0=s0+Math.imul(j,u)|0,s0=s0+Math.imul($$,E$)|0,I=I+Math.imul($$,u)|0,v=v+Math.imul(e0,n)|0,s0=s0+Math.imul(e0,D$)|0,s0=s0+Math.imul(r0,n)|0,I=I+Math.imul(r0,D$)|0,v=v+Math.imul(m0,C$)|0,s0=s0+Math.imul(m0,t)|0,s0=s0+Math.imul(a0,C$)|0,I=I+Math.imul(a0,t)|0;var k$=(n0+v|0)+((s0&8191)<<13)|0;n0=(I+(s0>>>13)|0)+(k$>>>26)|0,k$&=67108863,v=Math.imul(B,h),s0=Math.imul(B,F$),s0=s0+Math.imul(U$,h)|0,I=Math.imul(U$,F$),v=v+Math.imul(G$,A$)|0,s0=s0+Math.imul(G$,b)|0,s0=s0+Math.imul(x,A$)|0,I=I+Math.imul(x,b)|0,v=v+Math.imul(_,l)|0,s0=s0+Math.imul(_,W$)|0,s0=s0+Math.imul(Z$,l)|0,I=I+Math.imul(Z$,W$)|0,v=v+Math.imul(Q$,E$)|0,s0=s0+Math.imul(Q$,u)|0,s0=s0+Math.imul(g,E$)|0,I=I+Math.imul(g,u)|0,v=v+Math.imul(j,n)|0,s0=s0+Math.imul(j,D$)|0,s0=s0+Math.imul($$,n)|0,I=I+Math.imul($$,D$)|0,v=v+Math.imul(e0,C$)|0,s0=s0+Math.imul(e0,t)|0,s0=s0+Math.imul(r0,C$)|0,I=I+Math.imul(r0,t)|0,v=v+Math.imul(m0,m)|0,s0=s0+Math.imul(m0,R$)|0,s0=s0+Math.imul(a0,m)|0,I=I+Math.imul(a0,R$)|0;var g$=(n0+v|0)+((s0&8191)<<13)|0;n0=(I+(s0>>>13)|0)+(g$>>>26)|0,g$&=67108863,v=Math.imul(X$,h),s0=Math.imul(X$,F$),s0=s0+Math.imul(w,h)|0,I=Math.imul(w,F$),v=v+Math.imul(B,A$)|0,s0=s0+Math.imul(B,b)|0,s0=s0+Math.imul(U$,A$)|0,I=I+Math.imul(U$,b)|0,v=v+Math.imul(G$,l)|0,s0=s0+Math.imul(G$,W$)|0,s0=s0+Math.imul(x,l)|0,I=I+Math.imul(x,W$)|0,v=v+Math.imul(_,E$)|0,s0=s0+Math.imul(_,u)|0,s0=s0+Math.imul(Z$,E$)|0,I=I+Math.imul(Z$,u)|0,v=v+Math.imul(Q$,n)|0,s0=s0+Math.imul(Q$,D$)|0,s0=s0+Math.imul(g,n)|0,I=I+Math.imul(g,D$)|0,v=v+Math.imul(j,C$)|0,s0=s0+Math.imul(j,t)|0,s0=s0+Math.imul($$,C$)|0,I=I+Math.imul($$,t)|0,v=v+Math.imul(e0,m)|0,s0=s0+Math.imul(e0,R$)|0,s0=s0+Math.imul(r0,m)|0,I=I+Math.imul(r0,R$)|0,v=v+Math.imul(m0,P$)|0,s0=s0+Math.imul(m0,O)|0,s0=s0+Math.imul(a0,P$)|0,I=I+Math.imul(a0,O)|0;var _$=(n0+v|0)+((s0&8191)<<13)|0;n0=(I+(s0>>>13)|0)+(_$>>>26)|0,_$&=67108863,v=Math.imul(p,h),s0=Math.imul(p,F$),s0=s0+Math.imul(I$,h)|0,I=Math.imul(I$,F$),v=v+Math.imul(X$,A$)|0,s0=s0+Math.imul(X$,b)|0,s0=s0+Math.imul(w,A$)|0,I=I+Math.imul(w,b)|0,v=v+Math.imul(B,l)|0,s0=s0+Math.imul(B,W$)|0,s0=s0+Math.imul(U$,l)|0,I=I+Math.imul(U$,W$)|0,v=v+Math.imul(G$,E$)|0,s0=s0+Math.imul(G$,u)|0,s0=s0+Math.imul(x,E$)|0,I=I+Math.imul(x,u)|0,v=v+Math.imul(_,n)|0,s0=s0+Math.imul(_,D$)|0,s0=s0+Math.imul(Z$,n)|0,I=I+Math.imul(Z$,D$)|0,v=v+Math.imul(Q$,C$)|0,s0=s0+Math.imul(Q$,t)|0,s0=s0+Math.imul(g,C$)|0,I=I+Math.imul(g,t)|0,v=v+Math.imul(j,m)|0,s0=s0+Math.imul(j,R$)|0,s0=s0+Math.imul($$,m)|0,I=I+Math.imul($$,R$)|0,v=v+Math.imul(e0,P$)|0,s0=s0+Math.imul(e0,O)|0,s0=s0+Math.imul(r0,P$)|0,I=I+Math.imul(r0,O)|0,v=v+Math.imul(m0,e)|0,s0=s0+Math.imul(m0,M$)|0,s0=s0+Math.imul(a0,e)|0,I=I+Math.imul(a0,M$)|0;var N$=(n0+v|0)+((s0&8191)<<13)|0;n0=(I+(s0>>>13)|0)+(N$>>>26)|0,N$&=67108863,v=Math.imul(O$,h),s0=Math.imul(O$,F$),s0=s0+Math.imul(c,h)|0,I=Math.imul(c,F$),v=v+Math.imul(p,A$)|0,s0=s0+Math.imul(p,b)|0,s0=s0+Math.imul(I$,A$)|0,I=I+Math.imul(I$,b)|0,v=v+Math.imul(X$,l)|0,s0=s0+Math.imul(X$,W$)|0,s0=s0+Math.imul(w,l)|0,I=I+Math.imul(w,W$)|0,v=v+Math.imul(B,E$)|0,s0=s0+Math.imul(B,u)|0,s0=s0+Math.imul(U$,E$)|0,I=I+Math.imul(U$,u)|0,v=v+Math.imul(G$,n)|0,s0=s0+Math.imul(G$,D$)|0,s0=s0+Math.imul(x,n)|0,I=I+Math.imul(x,D$)|0,v=v+Math.imul(_,C$)|0,s0=s0+Math.imul(_,t)|0,s0=s0+Math.imul(Z$,C$)|0,I=I+Math.imul(Z$,t)|0,v=v+Math.imul(Q$,m)|0,s0=s0+Math.imul(Q$,R$)|0,s0=s0+Math.imul(g,m)|0,I=I+Math.imul(g,R$)|0,v=v+Math.imul(j,P$)|0,s0=s0+Math.imul(j,O)|0,s0=s0+Math.imul($$,P$)|0,I=I+Math.imul($$,O)|0,v=v+Math.imul(e0,e)|0,s0=s0+Math.imul(e0,M$)|0,s0=s0+Math.imul(r0,e)|0,I=I+Math.imul(r0,M$)|0,v=v+Math.imul(m0,S$)|0,s0=s0+Math.imul(m0,F)|0,s0=s0+Math.imul(a0,S$)|0,I=I+Math.imul(a0,F)|0;var $0=(n0+v|0)+((s0&8191)<<13)|0;n0=(I+(s0>>>13)|0)+($0>>>26)|0,$0&=67108863,v=Math.imul(O$,A$),s0=Math.imul(O$,b),s0=s0+Math.imul(c,A$)|0,I=Math.imul(c,b),v=v+Math.imul(p,l)|0,s0=s0+Math.imul(p,W$)|0,s0=s0+Math.imul(I$,l)|0,I=I+Math.imul(I$,W$)|0,v=v+Math.imul(X$,E$)|0,s0=s0+Math.imul(X$,u)|0,s0=s0+Math.imul(w,E$)|0,I=I+Math.imul(w,u)|0,v=v+Math.imul(B,n)|0,s0=s0+Math.imul(B,D$)|0,s0=s0+Math.imul(U$,n)|0,I=I+Math.imul(U$,D$)|0,v=v+Math.imul(G$,C$)|0,s0=s0+Math.imul(G$,t)|0,s0=s0+Math.imul(x,C$)|0,I=I+Math.imul(x,t)|0,v=v+Math.imul(_,m)|0,s0=s0+Math.imul(_,R$)|0,s0=s0+Math.imul(Z$,m)|0,I=I+Math.imul(Z$,R$)|0,v=v+Math.imul(Q$,P$)|0,s0=s0+Math.imul(Q$,O)|0,s0=s0+Math.imul(g,P$)|0,I=I+Math.imul(g,O)|0,v=v+Math.imul(j,e)|0,s0=s0+Math.imul(j,M$)|0,s0=s0+Math.imul($$,e)|0,I=I+Math.imul($$,M$)|0,v=v+Math.imul(e0,S$)|0,s0=s0+Math.imul(e0,F)|0,s0=s0+Math.imul(r0,S$)|0,I=I+Math.imul(r0,F)|0;var x$=(n0+v|0)+((s0&8191)<<13)|0;n0=(I+(s0>>>13)|0)+(x$>>>26)|0,x$&=67108863,v=Math.imul(O$,l),s0=Math.imul(O$,W$),s0=s0+Math.imul(c,l)|0,I=Math.imul(c,W$),v=v+Math.imul(p,E$)|0,s0=s0+Math.imul(p,u)|0,s0=s0+Math.imul(I$,E$)|0,I=I+Math.imul(I$,u)|0,v=v+Math.imul(X$,n)|0,s0=s0+Math.imul(X$,D$)|0,s0=s0+Math.imul(w,n)|0,I=I+Math.imul(w,D$)|0,v=v+Math.imul(B,C$)|0,s0=s0+Math.imul(B,t)|0,s0=s0+Math.imul(U$,C$)|0,I=I+Math.imul(U$,t)|0,v=v+Math.imul(G$,m)|0,s0=s0+Math.imul(G$,R$)|0,s0=s0+Math.imul(x,m)|0,I=I+Math.imul(x,R$)|0,v=v+Math.imul(_,P$)|0,s0=s0+Math.imul(_,O)|0,s0=s0+Math.imul(Z$,P$)|0,I=I+Math.imul(Z$,O)|0,v=v+Math.imul(Q$,e)|0,s0=s0+Math.imul(Q$,M$)|0,s0=s0+Math.imul(g,e)|0,I=I+Math.imul(g,M$)|0,v=v+Math.imul(j,S$)|0,s0=s0+Math.imul(j,F)|0,s0=s0+Math.imul($$,S$)|0,I=I+Math.imul($$,F)|0;var Q0=(n0+v|0)+((s0&8191)<<13)|0;n0=(I+(s0>>>13)|0)+(Q0>>>26)|0,Q0&=67108863,v=Math.imul(O$,E$),s0=Math.imul(O$,u),s0=s0+Math.imul(c,E$)|0,I=Math.imul(c,u),v=v+Math.imul(p,n)|0,s0=s0+Math.imul(p,D$)|0,s0=s0+Math.imul(I$,n)|0,I=I+Math.imul(I$,D$)|0,v=v+Math.imul(X$,C$)|0,s0=s0+Math.imul(X$,t)|0,s0=s0+Math.imul(w,C$)|0,I=I+Math.imul(w,t)|0,v=v+Math.imul(B,m)|0,s0=s0+Math.imul(B,R$)|0,s0=s0+Math.imul(U$,m)|0,I=I+Math.imul(U$,R$)|0,v=v+Math.imul(G$,P$)|0,s0=s0+Math.imul(G$,O)|0,s0=s0+Math.imul(x,P$)|0,I=I+Math.imul(x,O)|0,v=v+Math.imul(_,e)|0,s0=s0+Math.imul(_,M$)|0,s0=s0+Math.imul(Z$,e)|0,I=I+Math.imul(Z$,M$)|0,v=v+Math.imul(Q$,S$)|0,s0=s0+Math.imul(Q$,F)|0,s0=s0+Math.imul(g,S$)|0,I=I+Math.imul(g,F)|0;var B$=(n0+v|0)+((s0&8191)<<13)|0;n0=(I+(s0>>>13)|0)+(B$>>>26)|0,B$&=67108863,v=Math.imul(O$,n),s0=Math.imul(O$,D$),s0=s0+Math.imul(c,n)|0,I=Math.imul(c,D$),v=v+Math.imul(p,C$)|0,s0=s0+Math.imul(p,t)|0,s0=s0+Math.imul(I$,C$)|0,I=I+Math.imul(I$,t)|0,v=v+Math.imul(X$,m)|0,s0=s0+Math.imul(X$,R$)|0,s0=s0+Math.imul(w,m)|0,I=I+Math.imul(w,R$)|0,v=v+Math.imul(B,P$)|0,s0=s0+Math.imul(B,O)|0,s0=s0+Math.imul(U$,P$)|0,I=I+Math.imul(U$,O)|0,v=v+Math.imul(G$,e)|0,s0=s0+Math.imul(G$,M$)|0,s0=s0+Math.imul(x,e)|0,I=I+Math.imul(x,M$)|0,v=v+Math.imul(_,S$)|0,s0=s0+Math.imul(_,F)|0,s0=s0+Math.imul(Z$,S$)|0,I=I+Math.imul(Z$,F)|0;var Y0=(n0+v|0)+((s0&8191)<<13)|0;n0=(I+(s0>>>13)|0)+(Y0>>>26)|0,Y0&=67108863,v=Math.imul(O$,C$),s0=Math.imul(O$,t),s0=s0+Math.imul(c,C$)|0,I=Math.imul(c,t),v=v+Math.imul(p,m)|0,s0=s0+Math.imul(p,R$)|0,s0=s0+Math.imul(I$,m)|0,I=I+Math.imul(I$,R$)|0,v=v+Math.imul(X$,P$)|0,s0=s0+Math.imul(X$,O)|0,s0=s0+Math.imul(w,P$)|0,I=I+Math.imul(w,O)|0,v=v+Math.imul(B,e)|0,s0=s0+Math.imul(B,M$)|0,s0=s0+Math.imul(U$,e)|0,I=I+Math.imul(U$,M$)|0,v=v+Math.imul(G$,S$)|0,s0=s0+Math.imul(G$,F)|0,s0=s0+Math.imul(x,S$)|0,I=I+Math.imul(x,F)|0;var y$=(n0+v|0)+((s0&8191)<<13)|0;n0=(I+(s0>>>13)|0)+(y$>>>26)|0,y$&=67108863,v=Math.imul(O$,m),s0=Math.imul(O$,R$),s0=s0+Math.imul(c,m)|0,I=Math.imul(c,R$),v=v+Math.imul(p,P$)|0,s0=s0+Math.imul(p,O)|0,s0=s0+Math.imul(I$,P$)|0,I=I+Math.imul(I$,O)|0,v=v+Math.imul(X$,e)|0,s0=s0+Math.imul(X$,M$)|0,s0=s0+Math.imul(w,e)|0,I=I+Math.imul(w,M$)|0,v=v+Math.imul(B,S$)|0,s0=s0+Math.imul(B,F)|0,s0=s0+Math.imul(U$,S$)|0,I=I+Math.imul(U$,F)|0;var Z0=(n0+v|0)+((s0&8191)<<13)|0;n0=(I+(s0>>>13)|0)+(Z0>>>26)|0,Z0&=67108863,v=Math.imul(O$,P$),s0=Math.imul(O$,O),s0=s0+Math.imul(c,P$)|0,I=Math.imul(c,O),v=v+Math.imul(p,e)|0,s0=s0+Math.imul(p,M$)|0,s0=s0+Math.imul(I$,e)|0,I=I+Math.imul(I$,M$)|0,v=v+Math.imul(X$,S$)|0,s0=s0+Math.imul(X$,F)|0,s0=s0+Math.imul(w,S$)|0,I=I+Math.imul(w,F)|0;var w$=(n0+v|0)+((s0&8191)<<13)|0;n0=(I+(s0>>>13)|0)+(w$>>>26)|0,w$&=67108863,v=Math.imul(O$,e),s0=Math.imul(O$,M$),s0=s0+Math.imul(c,e)|0,I=Math.imul(c,M$),v=v+Math.imul(p,S$)|0,s0=s0+Math.imul(p,F)|0,s0=s0+Math.imul(I$,S$)|0,I=I+Math.imul(I$,F)|0;var G0=(n0+v|0)+((s0&8191)<<13)|0;n0=(I+(s0>>>13)|0)+(G0>>>26)|0,G0&=67108863,v=Math.imul(O$,S$),s0=Math.imul(O$,F),s0=s0+Math.imul(c,S$)|0,I=Math.imul(c,F);var p$=(n0+v|0)+((s0&8191)<<13)|0;return n0=(I+(s0>>>13)|0)+(p$>>>26)|0,p$&=67108863,S[0]=v$,S[1]=r,S[2]=q$,S[3]=i,S[4]=j$,S[5]=k$,S[6]=g$,S[7]=_$,S[8]=N$,S[9]=$0,S[10]=x$,S[11]=Q0,S[12]=B$,S[13]=Y0,S[14]=y$,S[15]=Z0,S[16]=w$,S[17]=G0,S[18]=p$,n0!==0&&(S[19]=n0,o0.length++),o0};Math.imul||(p0=E);function T(l0,z,o0){o0.negative=z.negative^l0.negative,o0.length=l0.length+z.length;for(var M=0,u0=0,S=0;S>>26)|0,u0+=n0>>>26,n0&=67108863}o0.words[S]=v,M=n0,n0=u0}return M!==0?o0.words[S]=M:o0.length--,o0.strip()}function f0(l0,z,o0){var M=new D;return M.mulp(l0,z,o0)}Z.prototype.mulTo=function(l0,z){var o0,M=this.length+l0.length;return this.length===10&&l0.length===10?o0=p0(this,l0,z):M<63?o0=E(this,l0,z):M<1024?o0=T(this,l0,z):o0=f0(this,l0,z),o0};function D(l0,z){this.x=l0,this.y=z}D.prototype.makeRBT=function(l0){for(var z=new Array(l0),o0=Z.prototype._countBits(l0)-1,M=0;M>=1;return M},D.prototype.permute=function(l0,z,o0,M,u0,S){for(var n0=0;n0>>1)u0++;return 1<>>13,o0[2*S+1]=u0&8191,u0=u0>>>13;for(S=2*z;S>=26,z+=M/67108864|0,z+=u0>>>26,this.words[o0]=u0&67108863}return z!==0&&(this.words[o0]=z,this.length++),this},Z.prototype.muln=function(l0){return this.clone().imuln(l0)},Z.prototype.sqr=function(){return this.mul(this)},Z.prototype.isqr=function(){return this.imul(this.clone())},Z.prototype.pow=function(l0){var z=w0(l0);if(z.length===0)return new Z(1);for(var o0=this,M=0;M=0);var z=l0%26,o0=(l0-z)/26,M=67108863>>>26-z<<26-z,u0;if(z!==0){var S=0;for(u0=0;u0>>26-z}S&&(this.words[u0]=S,this.length++)}if(o0!==0){for(u0=this.length-1;u0>=0;u0--)this.words[u0+o0]=this.words[u0];for(u0=0;u0=0);var M;z?M=(z-z%26)/26:M=0;var u0=l0%26,S=Math.min((l0-u0)/26,this.length),n0=67108863^67108863>>>u0<S)for(this.length-=S,s0=0;s0=0&&(I!==0||s0>=M);s0--){var t0=this.words[s0]|0;this.words[s0]=I<<26-u0|t0>>>u0,I=t0&n0}return v&&I!==0&&(v.words[v.length++]=I),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},Z.prototype.ishrn=function(l0,z,o0){return Y(this.negative===0),this.iushrn(l0,z,o0)},Z.prototype.shln=function(l0){return this.clone().ishln(l0)},Z.prototype.ushln=function(l0){return this.clone().iushln(l0)},Z.prototype.shrn=function(l0){return this.clone().ishrn(l0)},Z.prototype.ushrn=function(l0){return this.clone().iushrn(l0)},Z.prototype.testn=function(l0){Y(typeof l0=="number"&&l0>=0);var z=l0%26,o0=(l0-z)/26,M=1<=0);var z=l0%26,o0=(l0-z)/26;if(Y(this.negative===0,"imaskn works only with positive numbers"),this.length<=o0)return this;if(z!==0&&o0++,this.length=Math.min(o0,this.length),z!==0){var M=67108863^67108863>>>z<=67108864;z++)this.words[z]-=67108864,z===this.length-1?this.words[z+1]=1:this.words[z+1]++;return this.length=Math.max(this.length,z+1),this},Z.prototype.isubn=function(l0){if(Y(typeof l0=="number"),Y(l0<67108864),l0<0)return this.iaddn(-l0);if(this.negative!==0)return this.negative=0,this.iaddn(l0),this.negative=1,this;if(this.words[0]-=l0,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var z=0;z>26)-(v/67108864|0),this.words[u0+o0]=S&67108863}for(;u0>26,this.words[u0+o0]=S&67108863;if(n0===0)return this.strip();for(Y(n0===-1),n0=0,u0=0;u0>26,this.words[u0]=S&67108863;return this.negative=1,this.strip()},Z.prototype._wordDiv=function(l0,z){var o0=this.length-l0.length,M=this.clone(),u0=l0,S=u0.words[u0.length-1]|0,n0=this._countBits(S);o0=26-n0,o0!==0&&(u0=u0.ushln(o0),M.iushln(o0),S=u0.words[u0.length-1]|0);var v=M.length-u0.length,s0;if(z!=="mod"){s0=new Z(null),s0.length=v+1,s0.words=new Array(s0.length);for(var I=0;I=0;m0--){var a0=(M.words[u0.length+m0]|0)*67108864+(M.words[u0.length+m0-1]|0);for(a0=Math.min(a0/S|0,67108863),M._ishlnsubmul(u0,a0,m0);M.negative!==0;)a0--,M.negative=0,M._ishlnsubmul(u0,1,m0),M.isZero()||(M.negative^=1);s0&&(s0.words[m0]=a0)}return s0&&s0.strip(),M.strip(),z!=="div"&&o0!==0&&M.iushrn(o0),{div:s0||null,mod:M}},Z.prototype.divmod=function(l0,z,o0){if(Y(!l0.isZero()),this.isZero())return{div:new Z(0),mod:new Z(0)};var M,u0,S;return this.negative!==0&&l0.negative===0?(S=this.neg().divmod(l0,z),z!=="mod"&&(M=S.div.neg()),z!=="div"&&(u0=S.mod.neg(),o0&&u0.negative!==0&&u0.iadd(l0)),{div:M,mod:u0}):this.negative===0&&l0.negative!==0?(S=this.divmod(l0.neg(),z),z!=="mod"&&(M=S.div.neg()),{div:M,mod:S.mod}):(this.negative&l0.negative)!==0?(S=this.neg().divmod(l0.neg(),z),z!=="div"&&(u0=S.mod.neg(),o0&&u0.negative!==0&&u0.isub(l0)),{div:S.div,mod:u0}):l0.length>this.length||this.cmp(l0)<0?{div:new Z(0),mod:this}:l0.length===1?z==="div"?{div:this.divn(l0.words[0]),mod:null}:z==="mod"?{div:null,mod:new Z(this.modn(l0.words[0]))}:{div:this.divn(l0.words[0]),mod:new Z(this.modn(l0.words[0]))}:this._wordDiv(l0,z)},Z.prototype.div=function(l0){return this.divmod(l0,"div",!1).div},Z.prototype.mod=function(l0){return this.divmod(l0,"mod",!1).mod},Z.prototype.umod=function(l0){return this.divmod(l0,"mod",!0).mod},Z.prototype.divRound=function(l0){var z=this.divmod(l0);if(z.mod.isZero())return z.div;var o0=z.div.negative!==0?z.mod.isub(l0):z.mod,M=l0.ushrn(1),u0=l0.andln(1),S=o0.cmp(M);return S<0||u0===1&&S===0?z.div:z.div.negative!==0?z.div.isubn(1):z.div.iaddn(1)},Z.prototype.modn=function(l0){Y(l0<=67108863);for(var z=(1<<26)%l0,o0=0,M=this.length-1;M>=0;M--)o0=(z*o0+(this.words[M]|0))%l0;return o0},Z.prototype.idivn=function(l0){Y(l0<=67108863);for(var z=0,o0=this.length-1;o0>=0;o0--){var M=(this.words[o0]|0)+z*67108864;this.words[o0]=M/l0|0,z=M%l0}return this.strip()},Z.prototype.divn=function(l0){return this.clone().idivn(l0)},Z.prototype.egcd=function(l0){Y(l0.negative===0),Y(!l0.isZero());var z=this,o0=l0.clone();z.negative!==0?z=z.umod(l0):z=z.clone();for(var M=new Z(1),u0=new Z(0),S=new Z(0),n0=new Z(1),v=0;z.isEven()&&o0.isEven();)z.iushrn(1),o0.iushrn(1),++v;for(var s0=o0.clone(),I=z.clone();!z.isZero();){for(var t0=0,m0=1;(z.words[0]&m0)===0&&t0<26;++t0,m0<<=1);if(t0>0)for(z.iushrn(t0);t0-- >0;)(M.isOdd()||u0.isOdd())&&(M.iadd(s0),u0.isub(I)),M.iushrn(1),u0.iushrn(1);for(var a0=0,q=1;(o0.words[0]&q)===0&&a0<26;++a0,q<<=1);if(a0>0)for(o0.iushrn(a0);a0-- >0;)(S.isOdd()||n0.isOdd())&&(S.iadd(s0),n0.isub(I)),S.iushrn(1),n0.iushrn(1);z.cmp(o0)>=0?(z.isub(o0),M.isub(S),u0.isub(n0)):(o0.isub(z),S.isub(M),n0.isub(u0))}return{a:S,b:n0,gcd:o0.iushln(v)}},Z.prototype._invmp=function(l0){Y(l0.negative===0),Y(!l0.isZero());var z=this,o0=l0.clone();z.negative!==0?z=z.umod(l0):z=z.clone();for(var M=new Z(1),u0=new Z(0),S=o0.clone();z.cmpn(1)>0&&o0.cmpn(1)>0;){for(var n0=0,v=1;(z.words[0]&v)===0&&n0<26;++n0,v<<=1);if(n0>0)for(z.iushrn(n0);n0-- >0;)M.isOdd()&&M.iadd(S),M.iushrn(1);for(var s0=0,I=1;(o0.words[0]&I)===0&&s0<26;++s0,I<<=1);if(s0>0)for(o0.iushrn(s0);s0-- >0;)u0.isOdd()&&u0.iadd(S),u0.iushrn(1);z.cmp(o0)>=0?(z.isub(o0),M.isub(u0)):(o0.isub(z),u0.isub(M))}var t0;return z.cmpn(1)===0?t0=M:t0=u0,t0.cmpn(0)<0&&t0.iadd(l0),t0},Z.prototype.gcd=function(l0){if(this.isZero())return l0.abs();if(l0.isZero())return this.abs();var z=this.clone(),o0=l0.clone();z.negative=0,o0.negative=0;for(var M=0;z.isEven()&&o0.isEven();M++)z.iushrn(1),o0.iushrn(1);do{for(;z.isEven();)z.iushrn(1);for(;o0.isEven();)o0.iushrn(1);var u0=z.cmp(o0);if(u0<0){var S=z;z=o0,o0=S}else if(u0===0||o0.cmpn(1)===0)break;z.isub(o0)}while(!0);return o0.iushln(M)},Z.prototype.invm=function(l0){return this.egcd(l0).a.umod(l0)},Z.prototype.isEven=function(){return(this.words[0]&1)===0},Z.prototype.isOdd=function(){return(this.words[0]&1)===1},Z.prototype.andln=function(l0){return this.words[0]&l0},Z.prototype.bincn=function(l0){Y(typeof l0=="number");var z=l0%26,o0=(l0-z)/26,M=1<>>26,n0&=67108863,this.words[S]=n0}return u0!==0&&(this.words[S]=u0,this.length++),this},Z.prototype.isZero=function(){return this.length===1&&this.words[0]===0},Z.prototype.cmpn=function(l0){var z=l0<0;if(this.negative!==0&&!z)return-1;if(this.negative===0&&z)return 1;this.strip();var o0;if(this.length>1)o0=1;else{z&&(l0=-l0),Y(l0<=67108863,"Number is too big");var M=this.words[0]|0;o0=M===l0?0:Ml0.length)return 1;if(this.length=0;o0--){var M=this.words[o0]|0,u0=l0.words[o0]|0;if(M!==u0){Mu0&&(z=1);break}}return z},Z.prototype.gtn=function(l0){return this.cmpn(l0)===1},Z.prototype.gt=function(l0){return this.cmp(l0)===1},Z.prototype.gten=function(l0){return this.cmpn(l0)>=0},Z.prototype.gte=function(l0){return this.cmp(l0)>=0},Z.prototype.ltn=function(l0){return this.cmpn(l0)===-1},Z.prototype.lt=function(l0){return this.cmp(l0)===-1},Z.prototype.lten=function(l0){return this.cmpn(l0)<=0},Z.prototype.lte=function(l0){return this.cmp(l0)<=0},Z.prototype.eqn=function(l0){return this.cmpn(l0)===0},Z.prototype.eq=function(l0){return this.cmp(l0)===0},Z.red=function(l0){return new b0(l0)},Z.prototype.toRed=function(l0){return Y(!this.red,"Already a number in reduction context"),Y(this.negative===0,"red works only with positives"),l0.convertTo(this)._forceRed(l0)},Z.prototype.fromRed=function(){return Y(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},Z.prototype._forceRed=function(l0){return this.red=l0,this},Z.prototype.forceRed=function(l0){return Y(!this.red,"Already a number in reduction context"),this._forceRed(l0)},Z.prototype.redAdd=function(l0){return Y(this.red,"redAdd works only with red numbers"),this.red.add(this,l0)},Z.prototype.redIAdd=function(l0){return Y(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,l0)},Z.prototype.redSub=function(l0){return Y(this.red,"redSub works only with red numbers"),this.red.sub(this,l0)},Z.prototype.redISub=function(l0){return Y(this.red,"redISub works only with red numbers"),this.red.isub(this,l0)},Z.prototype.redShl=function(l0){return Y(this.red,"redShl works only with red numbers"),this.red.shl(this,l0)},Z.prototype.redMul=function(l0){return Y(this.red,"redMul works only with red numbers"),this.red._verify2(this,l0),this.red.mul(this,l0)},Z.prototype.redIMul=function(l0){return Y(this.red,"redMul works only with red numbers"),this.red._verify2(this,l0),this.red.imul(this,l0)},Z.prototype.redSqr=function(){return Y(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},Z.prototype.redISqr=function(){return Y(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},Z.prototype.redSqrt=function(){return Y(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},Z.prototype.redInvm=function(){return Y(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},Z.prototype.redNeg=function(){return Y(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},Z.prototype.redPow=function(l0){return Y(this.red&&!l0.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,l0)};var c0={k256:null,p224:null,p192:null,p25519:null};function C(l0,z){this.name=l0,this.p=new Z(z,16),this.n=this.p.bitLength(),this.k=new Z(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}C.prototype._tmp=function(){var l0=new Z(null);return l0.words=new Array(Math.ceil(this.n/13)),l0},C.prototype.ireduce=function(l0){var z=l0,o0;do this.split(z,this.tmp),z=this.imulK(z),z=z.iadd(this.tmp),o0=z.bitLength();while(o0>this.n);var M=o00?z.isub(this.p):z.strip!==void 0?z.strip():z._strip(),z},C.prototype.split=function(l0,z){l0.iushrn(this.n,0,z)},C.prototype.imulK=function(l0){return l0.imul(this.k)};function h0(){C.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}$(h0,C),h0.prototype.split=function(l0,z){for(var o0=4194303,M=Math.min(l0.length,9),u0=0;u0>>22,S=n0}S>>>=22,l0.words[u0-10]=S,S===0&&l0.length>10?l0.length-=10:l0.length-=9},h0.prototype.imulK=function(l0){l0.words[l0.length]=0,l0.words[l0.length+1]=0,l0.length+=2;for(var z=0,o0=0;o0>>=26,l0.words[o0]=u0,z=M}return z!==0&&(l0.words[l0.length++]=z),l0},Z._prime=function(l0){if(c0[l0])return c0[l0];var z;if(l0==="k256")z=new h0;else if(l0==="p224")z=new L;else if(l0==="p192")z=new d0;else if(l0==="p25519")z=new R;else throw new Error("Unknown prime "+l0);return c0[l0]=z,z};function b0(l0){if(typeof l0=="string"){var z=Z._prime(l0);this.m=z.p,this.prime=z}else Y(l0.gtn(1),"modulus must be greater than 1"),this.m=l0,this.prime=null}b0.prototype._verify1=function(l0){Y(l0.negative===0,"red works only with positives"),Y(l0.red,"red works only with red numbers")},b0.prototype._verify2=function(l0,z){Y((l0.negative|z.negative)===0,"red works only with positives"),Y(l0.red&&l0.red===z.red,"red works only with red numbers")},b0.prototype.imod=function(l0){return this.prime?this.prime.ireduce(l0)._forceRed(this):l0.umod(this.m)._forceRed(this)},b0.prototype.neg=function(l0){return l0.isZero()?l0.clone():this.m.sub(l0)._forceRed(this)},b0.prototype.add=function(l0,z){this._verify2(l0,z);var o0=l0.add(z);return o0.cmp(this.m)>=0&&o0.isub(this.m),o0._forceRed(this)},b0.prototype.iadd=function(l0,z){this._verify2(l0,z);var o0=l0.iadd(z);return o0.cmp(this.m)>=0&&o0.isub(this.m),o0},b0.prototype.sub=function(l0,z){this._verify2(l0,z);var o0=l0.sub(z);return o0.cmpn(0)<0&&o0.iadd(this.m),o0._forceRed(this)},b0.prototype.isub=function(l0,z){this._verify2(l0,z);var o0=l0.isub(z);return o0.cmpn(0)<0&&o0.iadd(this.m),o0},b0.prototype.shl=function(l0,z){return this._verify1(l0),this.imod(l0.ushln(z))},b0.prototype.imul=function(l0,z){return this._verify2(l0,z),this.imod(l0.imul(z))},b0.prototype.mul=function(l0,z){return this._verify2(l0,z),this.imod(l0.mul(z))},b0.prototype.isqr=function(l0){return this.imul(l0,l0.clone())},b0.prototype.sqr=function(l0){return this.mul(l0,l0)},b0.prototype.sqrt=function(l0){if(l0.isZero())return l0.clone();var z=this.m.andln(3);if(Y(z%2===1),z===3){var o0=this.m.add(new Z(1)).iushrn(2);return this.pow(l0,o0)}for(var M=this.m.subn(1),u0=0;!M.isZero()&&M.andln(1)===0;)u0++,M.iushrn(1);Y(!M.isZero());var S=new Z(1).toRed(this),n0=S.redNeg(),v=this.m.subn(1).iushrn(1),s0=this.m.bitLength();for(s0=new Z(2*s0*s0).toRed(this);this.pow(s0,v).cmp(n0)!==0;)s0.redIAdd(n0);for(var I=this.pow(s0,M),t0=this.pow(l0,M.addn(1).iushrn(1)),m0=this.pow(l0,M),a0=u0;m0.cmp(S)!==0;){for(var q=m0,e0=0;q.cmp(S)!==0;e0++)q=q.redSqr();Y(e0=0;u0--){for(var I=z.words[u0],t0=s0-1;t0>=0;t0--){var m0=I>>t0&1;if(S!==M[0]&&(S=this.sqr(S)),m0===0&&n0===0){v=0;continue}n0<<=1,n0|=m0,v++,!(v!==o0&&(u0!==0||t0!==0))&&(S=this.mul(S,M[n0]),v=0,n0=0)}s0=26}return S},b0.prototype.convertTo=function(l0){var z=l0.umod(this.m);return z===l0?z.clone():z},b0.prototype.convertFrom=function(l0){var z=l0.clone();return z.red=null,z},Z.mont=function(l0){return new P(l0)};function P(l0){b0.call(this,l0),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new Z(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}$(P,b0),P.prototype.convertTo=function(l0){return this.imod(l0.ushln(this.shift))},P.prototype.convertFrom=function(l0){var z=this.imod(l0.mul(this.rinv));return z.red=null,z},P.prototype.imul=function(l0,z){if(l0.isZero()||z.isZero())return l0.words[0]=0,l0.length=1,l0;var o0=l0.imul(z),M=o0.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),u0=o0.isub(M).iushrn(this.shift),S=u0;return u0.cmp(this.m)>=0?S=u0.isub(this.m):u0.cmpn(0)<0&&(S=u0.iadd(this.m)),S._forceRed(this)},P.prototype.mul=function(l0,z){if(l0.isZero()||z.isZero())return new Z(0)._forceRed(this);var o0=l0.mul(z),M=o0.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),u0=o0.isub(M).iushrn(this.shift),S=u0;return u0.cmp(this.m)>=0?S=u0.isub(this.m):u0.cmpn(0)<0&&(S=u0.iadd(this.m)),S._forceRed(this)},P.prototype.invm=function(l0){var z=this.imod(l0._invmp(this.m).mul(this.r2));return z._forceRed(this)}})(typeof K>"u"||K,X)}}),CY=$Q({"node_modules/safer-buffer/safer.js"(X,K){var x0=e$,G=c$,Y={},$;for($ in x0)!x0.hasOwnProperty($)||$==="SlowBuffer"||$==="Buffer"||(Y[$]=x0[$]);var Z=Y.Buffer={};for($ in G)!G.hasOwnProperty($)||$==="allocUnsafe"||$==="allocUnsafeSlow"||(Z[$]=G[$]);if(Y.Buffer.prototype=G.prototype,(!Z.from||Z.from===Uint8Array.from)&&(Z.from=function(Q,U,V){if(typeof Q=="number")throw new TypeError('The "value" argument must not be of type number. Received type '+typeof Q);if(Q&&typeof Q.length>"u")throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof Q);return G(Q,U,V)}),Z.alloc||(Z.alloc=function(Q,U,V){if(typeof Q!="number")throw new TypeError('The "size" argument must be of type number. Received type '+typeof Q);if(Q<0||Q>=2*(1<<30))throw new RangeError('The value "'+Q+'" is invalid for option "size"');var B0=G(Q);return!U||U.length===0?B0.fill(0):typeof V=="string"?B0.fill(U,V):B0.fill(U),B0}),!Y.kStringMaxLength)try{Y.kStringMaxLength=r$}catch{}Y.constants||(Y.constants={MAX_LENGTH:Y.kMaxLength},Y.kStringMaxLength&&(Y.constants.MAX_STRING_LENGTH=Y.kStringMaxLength)),K.exports=Y}}),LY=$Q({"node_modules/asn1.js/lib/asn1/base/reporter.js"(X){var K=X0();function x0(Y){this._reporterState={obj:null,path:[],options:Y||{},errors:[]}}X.Reporter=x0,x0.prototype.isError=function(Y){return Y instanceof G},x0.prototype.save=function(){let Y=this._reporterState;return{obj:Y.obj,pathLen:Y.path.length}},x0.prototype.restore=function(Y){let $=this._reporterState;$.obj=Y.obj,$.path=$.path.slice(0,Y.pathLen)},x0.prototype.enterKey=function(Y){return this._reporterState.path.push(Y)},x0.prototype.exitKey=function(Y){let $=this._reporterState;$.path=$.path.slice(0,Y-1)},x0.prototype.leaveKey=function(Y,$,Z){let Q=this._reporterState;this.exitKey(Y),Q.obj!==null&&(Q.obj[$]=Z)},x0.prototype.path=function(){return this._reporterState.path.join("/")},x0.prototype.enterObject=function(){let Y=this._reporterState,$=Y.obj;return Y.obj={},$},x0.prototype.leaveObject=function(Y){let $=this._reporterState,Z=$.obj;return $.obj=Y,Z},x0.prototype.error=function(Y){let $,Z=this._reporterState,Q=Y instanceof G;if(Q?$=Y:$=new G(Z.path.map(function(U){return"["+JSON.stringify(U)+"]"}).join(""),Y.message||Y,Y.stack),!Z.options.partial)throw $;return Q||Z.errors.push($),$},x0.prototype.wrapResult=function(Y){let $=this._reporterState;return $.options.partial?{result:this.isError(Y)?null:Y,errors:$.errors}:Y};function G(Y,$){this.path=Y,this.rethrow($)}K(G,Error),G.prototype.rethrow=function(Y){if(this.message=Y+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,G),!this.stack)try{throw new Error(this.message)}catch($){this.stack=$.stack}return this}}}),l$=$Q({"node_modules/asn1.js/lib/asn1/base/buffer.js"(X){var K=X0(),x0=LY().Reporter,G=CY().Buffer;function Y(Z,Q){if(x0.call(this,Q),!G.isBuffer(Z)){this.error("Input not Buffer");return}this.base=Z,this.offset=0,this.length=Z.length}K(Y,x0),X.DecoderBuffer=Y,Y.isDecoderBuffer=function(Z){return Z instanceof Y?!0:typeof Z=="object"&&G.isBuffer(Z.base)&&Z.constructor.name==="DecoderBuffer"&&typeof Z.offset=="number"&&typeof Z.length=="number"&&typeof Z.save=="function"&&typeof Z.restore=="function"&&typeof Z.isEmpty=="function"&&typeof Z.readUInt8=="function"&&typeof Z.skip=="function"&&typeof Z.raw=="function"},Y.prototype.save=function(){return{offset:this.offset,reporter:x0.prototype.save.call(this)}},Y.prototype.restore=function(Z){let Q=new Y(this.base);return Q.offset=Z.offset,Q.length=this.offset,this.offset=Z.offset,x0.prototype.restore.call(this,Z.reporter),Q},Y.prototype.isEmpty=function(){return this.offset===this.length},Y.prototype.readUInt8=function(Z){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(Z||"DecoderBuffer overrun")},Y.prototype.skip=function(Z,Q){if(!(this.offset+Z<=this.length))return this.error(Q||"DecoderBuffer overrun");let U=new Y(this.base);return U._reporterState=this._reporterState,U.offset=this.offset,U.length=this.offset+Z,this.offset+=Z,U},Y.prototype.raw=function(Z){return this.base.slice(Z?Z.offset:this.offset,this.length)};function $(Z,Q){if(Array.isArray(Z))this.length=0,this.value=Z.map(function(U){return $.isEncoderBuffer(U)||(U=new $(U,Q)),this.length+=U.length,U},this);else if(typeof Z=="number"){if(!(0<=Z&&Z<=255))return Q.error("non-byte EncoderBuffer value");this.value=Z,this.length=1}else if(typeof Z=="string")this.value=Z,this.length=G.byteLength(Z);else if(G.isBuffer(Z))this.value=Z,this.length=Z.length;else return Q.error("Unsupported type: "+typeof Z)}X.EncoderBuffer=$,$.isEncoderBuffer=function(Z){return Z instanceof $?!0:typeof Z=="object"&&Z.constructor.name==="EncoderBuffer"&&typeof Z.length=="number"&&typeof Z.join=="function"},$.prototype.join=function(Z,Q){return Z||(Z=G.alloc(this.length)),Q||(Q=0),this.length===0||(Array.isArray(this.value)?this.value.forEach(function(U){U.join(Z,Q),Q+=U.length}):(typeof this.value=="number"?Z[Q]=this.value:typeof this.value=="string"?Z.write(this.value,Q):G.isBuffer(this.value)&&this.value.copy(Z,Q),Q+=this.length)),Z}}}),RY=$Q({"node_modules/asn1.js/lib/asn1/base/node.js"(X,K){var x0=LY().Reporter,G=l$().EncoderBuffer,Y=l$().DecoderBuffer,$=N0(),Z=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],Q=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(Z),U=["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"];function V(H,y0,W){let w0={};this._baseState=w0,w0.name=W,w0.enc=H,w0.parent=y0||null,w0.children=null,w0.tag=null,w0.args=null,w0.reverseArgs=null,w0.choice=null,w0.optional=!1,w0.any=!1,w0.obj=!1,w0.use=null,w0.useDecoder=null,w0.key=null,w0.default=null,w0.explicit=null,w0.implicit=null,w0.contains=null,w0.parent||(w0.children=[],this._wrap())}K.exports=V;var B0=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];V.prototype.clone=function(){let H=this._baseState,y0={};B0.forEach(function(w0){y0[w0]=H[w0]});let W=new this.constructor(y0.parent);return W._baseState=y0,W},V.prototype._wrap=function(){let H=this._baseState;Q.forEach(function(y0){this[y0]=function(){let W=new this.constructor(this);return H.children.push(W),W[y0].apply(W,arguments)}},this)},V.prototype._init=function(H){let y0=this._baseState;$(y0.parent===null),H.call(this),y0.children=y0.children.filter(function(W){return W._baseState.parent===this},this),$.equal(y0.children.length,1,"Root node can have only one child")},V.prototype._useArgs=function(H){let y0=this._baseState,W=H.filter(function(w0){return w0 instanceof this.constructor},this);H=H.filter(function(w0){return!(w0 instanceof this.constructor)},this),W.length!==0&&($(y0.children===null),y0.children=W,W.forEach(function(w0){w0._baseState.parent=this},this)),H.length!==0&&($(y0.args===null),y0.args=H,y0.reverseArgs=H.map(function(w0){if(typeof w0!="object"||w0.constructor!==Object)return w0;let E={};return Object.keys(w0).forEach(function(p0){p0==(p0|0)&&(p0|=0);let T=w0[p0];E[T]=p0}),E}))},U.forEach(function(H){V.prototype[H]=function(){let y0=this._baseState;throw new Error(H+" not implemented for encoding: "+y0.enc)}}),Z.forEach(function(H){V.prototype[H]=function(){let y0=this._baseState,W=Array.prototype.slice.call(arguments);return $(y0.tag===null),y0.tag=H,this._useArgs(W),this}}),V.prototype.use=function(H){$(H);let y0=this._baseState;return $(y0.use===null),y0.use=H,this},V.prototype.optional=function(){let H=this._baseState;return H.optional=!0,this},V.prototype.def=function(H){let y0=this._baseState;return $(y0.default===null),y0.default=H,y0.optional=!0,this},V.prototype.explicit=function(H){let y0=this._baseState;return $(y0.explicit===null&&y0.implicit===null),y0.explicit=H,this},V.prototype.implicit=function(H){let y0=this._baseState;return $(y0.explicit===null&&y0.implicit===null),y0.implicit=H,this},V.prototype.obj=function(){let H=this._baseState,y0=Array.prototype.slice.call(arguments);return H.obj=!0,y0.length!==0&&this._useArgs(y0),this},V.prototype.key=function(H){let y0=this._baseState;return $(y0.key===null),y0.key=H,this},V.prototype.any=function(){let H=this._baseState;return H.any=!0,this},V.prototype.choice=function(H){let y0=this._baseState;return $(y0.choice===null),y0.choice=H,this._useArgs(Object.keys(H).map(function(W){return H[W]})),this},V.prototype.contains=function(H){let y0=this._baseState;return $(y0.use===null),y0.contains=H,this},V.prototype._decode=function(H,y0){let W=this._baseState;if(W.parent===null)return H.wrapResult(W.children[0]._decode(H,y0));let w0=W.default,E=!0,p0=null;if(W.key!==null&&(p0=H.enterKey(W.key)),W.optional){let f0=null;if(W.explicit!==null?f0=W.explicit:W.implicit!==null?f0=W.implicit:W.tag!==null&&(f0=W.tag),f0===null&&!W.any){let D=H.save();try{W.choice===null?this._decodeGeneric(W.tag,H,y0):this._decodeChoice(H,y0),E=!0}catch{E=!1}H.restore(D)}else if(E=this._peekTag(H,f0,W.any),H.isError(E))return E}let T;if(W.obj&&E&&(T=H.enterObject()),E){if(W.explicit!==null){let D=this._decodeTag(H,W.explicit);if(H.isError(D))return D;H=D}let f0=H.offset;if(W.use===null&&W.choice===null){let D;W.any&&(D=H.save());let c0=this._decodeTag(H,W.implicit!==null?W.implicit:W.tag,W.any);if(H.isError(c0))return c0;W.any?w0=H.raw(D):H=c0}if(y0&&y0.track&&W.tag!==null&&y0.track(H.path(),f0,H.length,"tagged"),y0&&y0.track&&W.tag!==null&&y0.track(H.path(),H.offset,H.length,"content"),W.any||(W.choice===null?w0=this._decodeGeneric(W.tag,H,y0):w0=this._decodeChoice(H,y0)),H.isError(w0))return w0;if(!W.any&&W.choice===null&&W.children!==null&&W.children.forEach(function(D){D._decode(H,y0)}),W.contains&&(W.tag==="octstr"||W.tag==="bitstr")){let D=new Y(w0);w0=this._getUse(W.contains,H._reporterState.obj)._decode(D,y0)}}return W.obj&&E&&(w0=H.leaveObject(T)),W.key!==null&&(w0!==null||E===!0)?H.leaveKey(p0,W.key,w0):p0!==null&&H.exitKey(p0),w0},V.prototype._decodeGeneric=function(H,y0,W){let w0=this._baseState;return H==="seq"||H==="set"?null:H==="seqof"||H==="setof"?this._decodeList(y0,H,w0.args[0],W):/str$/.test(H)?this._decodeStr(y0,H,W):H==="objid"&&w0.args?this._decodeObjid(y0,w0.args[0],w0.args[1],W):H==="objid"?this._decodeObjid(y0,null,null,W):H==="gentime"||H==="utctime"?this._decodeTime(y0,H,W):H==="null_"?this._decodeNull(y0,W):H==="bool"?this._decodeBool(y0,W):H==="objDesc"?this._decodeStr(y0,H,W):H==="int"||H==="enum"?this._decodeInt(y0,w0.args&&w0.args[0],W):w0.use!==null?this._getUse(w0.use,y0._reporterState.obj)._decode(y0,W):y0.error("unknown tag: "+H)},V.prototype._getUse=function(H,y0){let W=this._baseState;return W.useDecoder=this._use(H,y0),$(W.useDecoder._baseState.parent===null),W.useDecoder=W.useDecoder._baseState.children[0],W.implicit!==W.useDecoder._baseState.implicit&&(W.useDecoder=W.useDecoder.clone(),W.useDecoder._baseState.implicit=W.implicit),W.useDecoder},V.prototype._decodeChoice=function(H,y0){let W=this._baseState,w0=null,E=!1;return Object.keys(W.choice).some(function(p0){let T=H.save(),f0=W.choice[p0];try{let D=f0._decode(H,y0);if(H.isError(D))return!1;w0={type:p0,value:D},E=!0}catch{return H.restore(T),!1}return!0},this),E?w0:H.error("Choice not matched")},V.prototype._createEncoderBuffer=function(H){return new G(H,this.reporter)},V.prototype._encode=function(H,y0,W){let w0=this._baseState;if(w0.default!==null&&w0.default===H)return;let E=this._encodeValue(H,y0,W);if(E!==void 0&&!this._skipDefault(E,y0,W))return E},V.prototype._encodeValue=function(H,y0,W){let w0=this._baseState;if(w0.parent===null)return w0.children[0]._encode(H,y0||new x0);let E=null;if(this.reporter=y0,w0.optional&&H===void 0)if(w0.default!==null)H=w0.default;else return;let p0=null,T=!1;if(w0.any)E=this._createEncoderBuffer(H);else if(w0.choice)E=this._encodeChoice(H,y0);else if(w0.contains)p0=this._getUse(w0.contains,W)._encode(H,y0),T=!0;else if(w0.children)p0=w0.children.map(function(f0){if(f0._baseState.tag==="null_")return f0._encode(null,y0,H);if(f0._baseState.key===null)return y0.error("Child should have a key");let D=y0.enterKey(f0._baseState.key);if(typeof H!="object")return y0.error("Child expected, but input is not object");let c0=f0._encode(H[f0._baseState.key],y0,H);return y0.leaveKey(D),c0},this).filter(function(f0){return f0}),p0=this._createEncoderBuffer(p0);else if(w0.tag==="seqof"||w0.tag==="setof"){if(!(w0.args&&w0.args.length===1))return y0.error("Too many args for : "+w0.tag);if(!Array.isArray(H))return y0.error("seqof/setof, but data is not Array");let f0=this.clone();f0._baseState.implicit=null,p0=this._createEncoderBuffer(H.map(function(D){let c0=this._baseState;return this._getUse(c0.args[0],H)._encode(D,y0)},f0))}else w0.use!==null?E=this._getUse(w0.use,W)._encode(H,y0):(p0=this._encodePrimitive(w0.tag,H),T=!0);if(!w0.any&&w0.choice===null){let f0=w0.implicit!==null?w0.implicit:w0.tag,D=w0.implicit===null?"universal":"context";f0===null?w0.use===null&&y0.error("Tag could be omitted only for .use()"):w0.use===null&&(E=this._encodeComposite(f0,T,D,p0))}return w0.explicit!==null&&(E=this._encodeComposite(w0.explicit,!1,"context",E)),E},V.prototype._encodeChoice=function(H,y0){let W=this._baseState,w0=W.choice[H.type];return w0||$(!1,H.type+" not found in "+JSON.stringify(Object.keys(W.choice))),w0._encode(H.value,y0)},V.prototype._encodePrimitive=function(H,y0){let W=this._baseState;if(/str$/.test(H))return this._encodeStr(y0,H);if(H==="objid"&&W.args)return this._encodeObjid(y0,W.reverseArgs[0],W.args[1]);if(H==="objid")return this._encodeObjid(y0,null,null);if(H==="gentime"||H==="utctime")return this._encodeTime(y0,H);if(H==="null_")return this._encodeNull();if(H==="int"||H==="enum")return this._encodeInt(y0,W.args&&W.reverseArgs[0]);if(H==="bool")return this._encodeBool(y0);if(H==="objDesc")return this._encodeStr(y0,H);throw new Error("Unsupported tag: "+H)},V.prototype._isNumstr=function(H){return/^[0-9 ]*$/.test(H)},V.prototype._isPrintstr=function(H){return/^[A-Za-z0-9 '()+,-./:=?]*$/.test(H)}}}),PY=$Q({"node_modules/asn1.js/lib/asn1/constants/der.js"(X){function K(x0){let G={};return Object.keys(x0).forEach(function(Y){(Y|0)==Y&&(Y=Y|0);let $=x0[Y];G[$]=Y}),G}X.tagClass={0:"universal",1:"application",2:"context",3:"private"},X.tagClassByName=K(X.tagClass),X.tag={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr",26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"},X.tagByName=K(X.tag)}}),zY=$Q({"node_modules/asn1.js/lib/asn1/encoders/der.js"(X,K){var x0=X0(),G=CY().Buffer,Y=RY(),$=PY();function Z(B0){this.enc="der",this.name=B0.name,this.entity=B0,this.tree=new Q,this.tree._init(B0.body)}K.exports=Z,Z.prototype.encode=function(B0,H){return this.tree._encode(B0,H).join()};function Q(B0){Y.call(this,"der",B0)}x0(Q,Y),Q.prototype._encodeComposite=function(B0,H,y0,W){let w0=V(B0,H,y0,this.reporter);if(W.length<128){let T=G.alloc(2);return T[0]=w0,T[1]=W.length,this._createEncoderBuffer([T,W])}let E=1;for(let T=W.length;T>=256;T>>=8)E++;let p0=G.alloc(2+E);p0[0]=w0,p0[1]=128|E;for(let T=1+E,f0=W.length;f0>0;T--,f0>>=8)p0[T]=f0&255;return this._createEncoderBuffer([p0,W])},Q.prototype._encodeStr=function(B0,H){if(H==="bitstr")return this._createEncoderBuffer([B0.unused|0,B0.data]);if(H==="bmpstr"){let y0=G.alloc(B0.length*2);for(let W=0;W=40)return this.reporter.error("Second objid identifier OOB");B0.splice(0,2,B0[0]*40+B0[1])}let W=0;for(let p0=0;p0=128;T>>=7)W++}let w0=G.alloc(W),E=w0.length-1;for(let p0=B0.length-1;p0>=0;p0--){let T=B0[p0];for(w0[E--]=T&127;(T>>=7)>0;)w0[E--]=128|T&127}return this._createEncoderBuffer(w0)};function U(B0){return B0<10?"0"+B0:B0}Q.prototype._encodeTime=function(B0,H){let y0,W=new Date(B0);return H==="gentime"?y0=[U(W.getUTCFullYear()),U(W.getUTCMonth()+1),U(W.getUTCDate()),U(W.getUTCHours()),U(W.getUTCMinutes()),U(W.getUTCSeconds()),"Z"].join(""):H==="utctime"?y0=[U(W.getUTCFullYear()%100),U(W.getUTCMonth()+1),U(W.getUTCDate()),U(W.getUTCHours()),U(W.getUTCMinutes()),U(W.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+H+" time is not supported yet"),this._encodeStr(y0,"octstr")},Q.prototype._encodeNull=function(){return this._createEncoderBuffer("")},Q.prototype._encodeInt=function(B0,H){if(typeof B0=="string"){if(!H)return this.reporter.error("String int or enum given, but no values map");if(!H.hasOwnProperty(B0))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(B0));B0=H[B0]}if(typeof B0!="number"&&!G.isBuffer(B0)){let w0=B0.toArray();!B0.sign&&w0[0]&128&&w0.unshift(0),B0=G.from(w0)}if(G.isBuffer(B0)){let w0=B0.length;B0.length===0&&w0++;let E=G.alloc(w0);return B0.copy(E),B0.length===0&&(E[0]=0),this._createEncoderBuffer(E)}if(B0<128)return this._createEncoderBuffer(B0);if(B0<256)return this._createEncoderBuffer([0,B0]);let y0=1;for(let w0=B0;w0>=256;w0>>=8)y0++;let W=new Array(y0);for(let w0=W.length-1;w0>=0;w0--)W[w0]=B0&255,B0>>=8;return W[0]&128&&W.unshift(0),this._createEncoderBuffer(G.from(W))},Q.prototype._encodeBool=function(B0){return this._createEncoderBuffer(B0?255:0)},Q.prototype._use=function(B0,H){return typeof B0=="function"&&(B0=B0(H)),B0._getEncoder("der").tree},Q.prototype._skipDefault=function(B0,H,y0){let W=this._baseState,w0;if(W.default===null)return!1;let E=B0.join();if(W.defaultBuffer===void 0&&(W.defaultBuffer=this._encodeValue(W.default,H,y0).join()),E.length!==W.defaultBuffer.length)return!1;for(w0=0;w0=31?W.error("Multi-octet tag encoding unsupported"):(H||(w0|=32),w0|=$.tagClassByName[y0||"universal"]<<6,w0)}}}),MY=$Q({"node_modules/asn1.js/lib/asn1/encoders/pem.js"(X,K){var x0=X0(),G=zY();function Y($){G.call(this,$),this.enc="pem"}x0(Y,G),K.exports=Y,Y.prototype.encode=function($,Z){let Q=G.prototype.encode.call(this,$).toString("base64"),U=["-----BEGIN "+Z.label+"-----"];for(let V=0;V>6],E=(W&32)===0;if((W&31)===31){let T=W;for(W=0;(T&128)===128;){if(T=H.readUInt8(y0),H.isError(T))return T;W<<=7,W|=T&127}}else W&=31;let p0=Z.tag[W];return{cls:w0,primitive:E,tag:W,tagStr:p0}}function B0(H,y0,W){let w0=H.readUInt8(W);if(H.isError(w0))return w0;if(!y0&&w0===128)return null;if((w0&128)===0)return w0;let E=w0&127;if(E>4)return H.error("length octect is too long");w0=0;for(let p0=0;p00&&c0.ishrn(C),c0}function E(f0,D){f0=w0(f0,D),f0=f0.mod(D);var c0=x0.from(f0.toArray());if(c0.length=y0)throw new Error("invalid sig")}K.exports=Q}}),dY=$Q({"node_modules/browserify-sign/browser/index.js"(X,K){var x0=YQ().Buffer,G=L0(),Y=X0(),$=cY(),Z=hY(),Q=M0();Object.keys(Q).forEach(function(y0){Q[y0].id=x0.from(Q[y0].id,"hex"),Q[y0.toLowerCase()]=Q[y0]});function U(y0){h$.Writable.call(this);var W=Q[y0];if(!W)throw new Error("Unknown message digest");this._hashType=W.hash,this._hash=G(W.hash),this._tag=W.id,this._signType=W.sign}Y(U,h$.Writable),U.prototype._write=function(y0,W,w0){this._hash.update(y0),w0()},U.prototype.update=function(y0,W){return typeof y0=="string"&&(y0=x0.from(y0,W)),this._hash.update(y0),this},U.prototype.sign=function(y0,W){this.end();var w0=this._hash.digest(),E=$(w0,y0,this._hashType,this._signType,this._tag);return W?E.toString(W):E};function V(y0){h$.Writable.call(this);var W=Q[y0];if(!W)throw new Error("Unknown message digest");this._hash=G(W.hash),this._tag=W.id,this._signType=W.sign}Y(V,h$.Writable),V.prototype._write=function(y0,W,w0){this._hash.update(y0),w0()},V.prototype.update=function(y0,W){return typeof y0=="string"&&(y0=x0.from(y0,W)),this._hash.update(y0),this},V.prototype.verify=function(y0,W,w0){typeof W=="string"&&(W=x0.from(W,w0)),this.end();var E=this._hash.digest();return Z(W,E,y0,this._signType,this._tag)};function B0(y0){return new U(y0)}function H(y0){return new V(y0)}K.exports={Sign:B0,Verify:H,createSign:B0,createVerify:H}}}),bY=$Q({"node_modules/create-ecdh/node_modules/bn.js/lib/bn.js"(X,K){(function(x0,G){function Y(l0,z){if(!l0)throw new Error(z||"Assertion failed")}function $(l0,z){l0.super_=z;var o0=function(){};o0.prototype=z.prototype,l0.prototype=new o0,l0.prototype.constructor=l0}function Z(l0,z,o0){if(Z.isBN(l0))return l0;this.negative=0,this.words=null,this.length=0,this.red=null,l0!==null&&((z==="le"||z==="be")&&(o0=z,z=10),this._init(l0||0,z||10,o0||"be"))}typeof x0=="object"?x0.exports=Z:G.BN=Z,Z.BN=Z,Z.wordSize=26;var Q=c$;Z.isBN=function(l0){return l0 instanceof Z?!0:l0!==null&&typeof l0=="object"&&l0.constructor.wordSize===Z.wordSize&&Array.isArray(l0.words)},Z.max=function(l0,z){return l0.cmp(z)>0?l0:z},Z.min=function(l0,z){return l0.cmp(z)<0?l0:z},Z.prototype._init=function(l0,z,o0){if(typeof l0=="number")return this._initNumber(l0,z,o0);if(typeof l0=="object")return this._initArray(l0,z,o0);z==="hex"&&(z=16),Y(z===(z|0)&&z>=2&&z<=36),l0=l0.toString().replace(/\s+/g,"");var M=0;l0[0]==="-"&&(M++,this.negative=1),M=0;M-=3)S=l0[M]|l0[M-1]<<8|l0[M-2]<<16,this.words[u0]|=S<>>26-n0&67108863,n0+=24,n0>=26&&(n0-=26,u0++);else if(o0==="le")for(M=0,u0=0;M>>26-n0&67108863,n0+=24,n0>=26&&(n0-=26,u0++);return this.strip()};function U(l0,z){var o0=l0.charCodeAt(z);return o0>=65&&o0<=70?o0-55:o0>=97&&o0<=102?o0-87:o0-48&15}function V(l0,z,o0){var M=U(l0,o0);return o0-1>=z&&(M|=U(l0,o0-1)<<4),M}Z.prototype._parseHex=function(l0,z,o0){this.length=Math.ceil((l0.length-z)/6),this.words=new Array(this.length);for(var M=0;M=z;M-=2)n0=V(l0,z,M)<=18?(u0-=18,S+=1,this.words[S]|=n0>>>26):u0+=8;else{var v=l0.length-z;for(M=v%2===0?z+1:z;M=18?(u0-=18,S+=1,this.words[S]|=n0>>>26):u0+=8}this.strip()};function B0(l0,z,o0,M){for(var u0=0,S=Math.min(l0.length,o0),n0=z;n0=49?u0+=v-49+10:v>=17?u0+=v-17+10:u0+=v}return u0}Z.prototype._parseBase=function(l0,z,o0){this.words=[0],this.length=1;for(var M=0,u0=1;u0<=67108863;u0*=z)M++;M--,u0=u0/z|0;for(var S=l0.length-o0,n0=S%M,v=Math.min(S,S-n0)+o0,s0=0,I=o0;I1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},Z.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},Z.prototype.inspect=function(){return(this.red?""};var H=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],y0=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],W=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64000000,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,24300000,28629151,33554432,39135393,45435424,52521875,60466176];Z.prototype.toString=function(l0,z){l0=l0||10,z=z|0||1;var o0;if(l0===16||l0==="hex"){o0="";for(var M=0,u0=0,S=0;S>>24-M&16777215,u0!==0||S!==this.length-1?o0=H[6-v.length]+v+o0:o0=v+o0,M+=2,M>=26&&(M-=26,S--)}for(u0!==0&&(o0=u0.toString(16)+o0);o0.length%z!==0;)o0="0"+o0;return this.negative!==0&&(o0="-"+o0),o0}if(l0===(l0|0)&&l0>=2&&l0<=36){var s0=y0[l0],I=W[l0];o0="";var t0=this.clone();for(t0.negative=0;!t0.isZero();){var m0=t0.modn(I).toString(l0);t0=t0.idivn(I),t0.isZero()?o0=m0+o0:o0=H[s0-m0.length]+m0+o0}for(this.isZero()&&(o0="0"+o0);o0.length%z!==0;)o0="0"+o0;return this.negative!==0&&(o0="-"+o0),o0}Y(!1,"Base should be between 2 and 36")},Z.prototype.toNumber=function(){var l0=this.words[0];return this.length===2?l0+=this.words[1]*67108864:this.length===3&&this.words[2]===1?l0+=4503599627370496+this.words[1]*67108864:this.length>2&&Y(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-l0:l0},Z.prototype.toJSON=function(){return this.toString(16)},Z.prototype.toBuffer=function(l0,z){return Y(typeof Q<"u"),this.toArrayLike(Q,l0,z)},Z.prototype.toArray=function(l0,z){return this.toArrayLike(Array,l0,z)},Z.prototype.toArrayLike=function(l0,z,o0){var M=this.byteLength(),u0=o0||Math.max(1,M);Y(M<=u0,"byte array longer than desired length"),Y(u0>0,"Requested array length <= 0"),this.strip();var S=z==="le",n0=new l0(u0),v,s0,I=this.clone();if(S){for(s0=0;!I.isZero();s0++)v=I.andln(255),I.iushrn(8),n0[s0]=v;for(;s0=4096&&(o0+=13,z>>>=13),z>=64&&(o0+=7,z>>>=7),z>=8&&(o0+=4,z>>>=4),z>=2&&(o0+=2,z>>>=2),o0+z},Z.prototype._zeroBits=function(l0){if(l0===0)return 26;var z=l0,o0=0;return(z&8191)===0&&(o0+=13,z>>>=13),(z&127)===0&&(o0+=7,z>>>=7),(z&15)===0&&(o0+=4,z>>>=4),(z&3)===0&&(o0+=2,z>>>=2),(z&1)===0&&o0++,o0},Z.prototype.bitLength=function(){var l0=this.words[this.length-1],z=this._countBits(l0);return(this.length-1)*26+z};function w0(l0){for(var z=new Array(l0.bitLength()),o0=0;o0>>u0}return z}Z.prototype.zeroBits=function(){if(this.isZero())return 0;for(var l0=0,z=0;zl0.length?this.clone().ior(l0):l0.clone().ior(this)},Z.prototype.uor=function(l0){return this.length>l0.length?this.clone().iuor(l0):l0.clone().iuor(this)},Z.prototype.iuand=function(l0){var z;this.length>l0.length?z=l0:z=this;for(var o0=0;o0l0.length?this.clone().iand(l0):l0.clone().iand(this)},Z.prototype.uand=function(l0){return this.length>l0.length?this.clone().iuand(l0):l0.clone().iuand(this)},Z.prototype.iuxor=function(l0){var z,o0;this.length>l0.length?(z=this,o0=l0):(z=l0,o0=this);for(var M=0;Ml0.length?this.clone().ixor(l0):l0.clone().ixor(this)},Z.prototype.uxor=function(l0){return this.length>l0.length?this.clone().iuxor(l0):l0.clone().iuxor(this)},Z.prototype.inotn=function(l0){Y(typeof l0=="number"&&l0>=0);var z=Math.ceil(l0/26)|0,o0=l0%26;this._expand(z),o0>0&&z--;for(var M=0;M0&&(this.words[M]=~this.words[M]&67108863>>26-o0),this.strip()},Z.prototype.notn=function(l0){return this.clone().inotn(l0)},Z.prototype.setn=function(l0,z){Y(typeof l0=="number"&&l0>=0);var o0=l0/26|0,M=l0%26;return this._expand(o0+1),z?this.words[o0]=this.words[o0]|1<l0.length?(o0=this,M=l0):(o0=l0,M=this);for(var u0=0,S=0;S>>26;for(;u0!==0&&S>>26;if(this.length=o0.length,u0!==0)this.words[this.length]=u0,this.length++;else if(o0!==this)for(;Sl0.length?this.clone().iadd(l0):l0.clone().iadd(this)},Z.prototype.isub=function(l0){if(l0.negative!==0){l0.negative=0;var z=this.iadd(l0);return l0.negative=1,z._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(l0),this.negative=1,this._normSign();var o0=this.cmp(l0);if(o0===0)return this.negative=0,this.length=1,this.words[0]=0,this;var M,u0;o0>0?(M=this,u0=l0):(M=l0,u0=this);for(var S=0,n0=0;n0>26,this.words[n0]=z&67108863;for(;S!==0&&n0>26,this.words[n0]=z&67108863;if(S===0&&n0>>26,m0=s0&67108863,a0=Math.min(I,z.length-1),q=Math.max(0,I-l0.length+1);q<=a0;q++){var e0=I-q|0;u0=l0.words[e0]|0,S=z.words[q]|0,n0=u0*S+m0,t0+=n0/67108864|0,m0=n0&67108863}o0.words[I]=m0|0,s0=t0|0}return s0!==0?o0.words[I]=s0|0:o0.length--,o0.strip()}var p0=function(l0,z,o0){var M=l0.words,u0=z.words,S=o0.words,n0=0,v,s0,I,t0=M[0]|0,m0=t0&8191,a0=t0>>>13,q=M[1]|0,e0=q&8191,r0=q>>>13,i0=M[2]|0,j=i0&8191,$$=i0>>>13,k=M[3]|0,Q$=k&8191,g=k>>>13,Y$=M[4]|0,_=Y$&8191,Z$=Y$>>>13,N=M[5]|0,G$=N&8191,x=N>>>13,V$=M[6]|0,B=V$&8191,U$=V$>>>13,y=M[7]|0,X$=y&8191,w=y>>>13,K$=M[8]|0,p=K$&8191,I$=K$>>>13,f=M[9]|0,O$=f&8191,c=f>>>13,J$=u0[0]|0,h=J$&8191,F$=J$>>>13,d=u0[1]|0,A$=d&8191,b=d>>>13,H$=u0[2]|0,l=H$&8191,W$=H$>>>13,o=u0[3]|0,E$=o&8191,u=o>>>13,T$=u0[4]|0,n=T$&8191,D$=T$>>>13,s=u0[5]|0,C$=s&8191,t=s>>>13,L$=u0[6]|0,m=L$&8191,R$=L$>>>13,a=u0[7]|0,P$=a&8191,O=a>>>13,z$=u0[8]|0,e=z$&8191,M$=z$>>>13,J=u0[9]|0,S$=J&8191,F=J>>>13;o0.negative=l0.negative^z.negative,o0.length=19,v=Math.imul(m0,h),s0=Math.imul(m0,F$),s0=s0+Math.imul(a0,h)|0,I=Math.imul(a0,F$);var v$=(n0+v|0)+((s0&8191)<<13)|0;n0=(I+(s0>>>13)|0)+(v$>>>26)|0,v$&=67108863,v=Math.imul(e0,h),s0=Math.imul(e0,F$),s0=s0+Math.imul(r0,h)|0,I=Math.imul(r0,F$),v=v+Math.imul(m0,A$)|0,s0=s0+Math.imul(m0,b)|0,s0=s0+Math.imul(a0,A$)|0,I=I+Math.imul(a0,b)|0;var r=(n0+v|0)+((s0&8191)<<13)|0;n0=(I+(s0>>>13)|0)+(r>>>26)|0,r&=67108863,v=Math.imul(j,h),s0=Math.imul(j,F$),s0=s0+Math.imul($$,h)|0,I=Math.imul($$,F$),v=v+Math.imul(e0,A$)|0,s0=s0+Math.imul(e0,b)|0,s0=s0+Math.imul(r0,A$)|0,I=I+Math.imul(r0,b)|0,v=v+Math.imul(m0,l)|0,s0=s0+Math.imul(m0,W$)|0,s0=s0+Math.imul(a0,l)|0,I=I+Math.imul(a0,W$)|0;var q$=(n0+v|0)+((s0&8191)<<13)|0;n0=(I+(s0>>>13)|0)+(q$>>>26)|0,q$&=67108863,v=Math.imul(Q$,h),s0=Math.imul(Q$,F$),s0=s0+Math.imul(g,h)|0,I=Math.imul(g,F$),v=v+Math.imul(j,A$)|0,s0=s0+Math.imul(j,b)|0,s0=s0+Math.imul($$,A$)|0,I=I+Math.imul($$,b)|0,v=v+Math.imul(e0,l)|0,s0=s0+Math.imul(e0,W$)|0,s0=s0+Math.imul(r0,l)|0,I=I+Math.imul(r0,W$)|0,v=v+Math.imul(m0,E$)|0,s0=s0+Math.imul(m0,u)|0,s0=s0+Math.imul(a0,E$)|0,I=I+Math.imul(a0,u)|0;var i=(n0+v|0)+((s0&8191)<<13)|0;n0=(I+(s0>>>13)|0)+(i>>>26)|0,i&=67108863,v=Math.imul(_,h),s0=Math.imul(_,F$),s0=s0+Math.imul(Z$,h)|0,I=Math.imul(Z$,F$),v=v+Math.imul(Q$,A$)|0,s0=s0+Math.imul(Q$,b)|0,s0=s0+Math.imul(g,A$)|0,I=I+Math.imul(g,b)|0,v=v+Math.imul(j,l)|0,s0=s0+Math.imul(j,W$)|0,s0=s0+Math.imul($$,l)|0,I=I+Math.imul($$,W$)|0,v=v+Math.imul(e0,E$)|0,s0=s0+Math.imul(e0,u)|0,s0=s0+Math.imul(r0,E$)|0,I=I+Math.imul(r0,u)|0,v=v+Math.imul(m0,n)|0,s0=s0+Math.imul(m0,D$)|0,s0=s0+Math.imul(a0,n)|0,I=I+Math.imul(a0,D$)|0;var j$=(n0+v|0)+((s0&8191)<<13)|0;n0=(I+(s0>>>13)|0)+(j$>>>26)|0,j$&=67108863,v=Math.imul(G$,h),s0=Math.imul(G$,F$),s0=s0+Math.imul(x,h)|0,I=Math.imul(x,F$),v=v+Math.imul(_,A$)|0,s0=s0+Math.imul(_,b)|0,s0=s0+Math.imul(Z$,A$)|0,I=I+Math.imul(Z$,b)|0,v=v+Math.imul(Q$,l)|0,s0=s0+Math.imul(Q$,W$)|0,s0=s0+Math.imul(g,l)|0,I=I+Math.imul(g,W$)|0,v=v+Math.imul(j,E$)|0,s0=s0+Math.imul(j,u)|0,s0=s0+Math.imul($$,E$)|0,I=I+Math.imul($$,u)|0,v=v+Math.imul(e0,n)|0,s0=s0+Math.imul(e0,D$)|0,s0=s0+Math.imul(r0,n)|0,I=I+Math.imul(r0,D$)|0,v=v+Math.imul(m0,C$)|0,s0=s0+Math.imul(m0,t)|0,s0=s0+Math.imul(a0,C$)|0,I=I+Math.imul(a0,t)|0;var k$=(n0+v|0)+((s0&8191)<<13)|0;n0=(I+(s0>>>13)|0)+(k$>>>26)|0,k$&=67108863,v=Math.imul(B,h),s0=Math.imul(B,F$),s0=s0+Math.imul(U$,h)|0,I=Math.imul(U$,F$),v=v+Math.imul(G$,A$)|0,s0=s0+Math.imul(G$,b)|0,s0=s0+Math.imul(x,A$)|0,I=I+Math.imul(x,b)|0,v=v+Math.imul(_,l)|0,s0=s0+Math.imul(_,W$)|0,s0=s0+Math.imul(Z$,l)|0,I=I+Math.imul(Z$,W$)|0,v=v+Math.imul(Q$,E$)|0,s0=s0+Math.imul(Q$,u)|0,s0=s0+Math.imul(g,E$)|0,I=I+Math.imul(g,u)|0,v=v+Math.imul(j,n)|0,s0=s0+Math.imul(j,D$)|0,s0=s0+Math.imul($$,n)|0,I=I+Math.imul($$,D$)|0,v=v+Math.imul(e0,C$)|0,s0=s0+Math.imul(e0,t)|0,s0=s0+Math.imul(r0,C$)|0,I=I+Math.imul(r0,t)|0,v=v+Math.imul(m0,m)|0,s0=s0+Math.imul(m0,R$)|0,s0=s0+Math.imul(a0,m)|0,I=I+Math.imul(a0,R$)|0;var g$=(n0+v|0)+((s0&8191)<<13)|0;n0=(I+(s0>>>13)|0)+(g$>>>26)|0,g$&=67108863,v=Math.imul(X$,h),s0=Math.imul(X$,F$),s0=s0+Math.imul(w,h)|0,I=Math.imul(w,F$),v=v+Math.imul(B,A$)|0,s0=s0+Math.imul(B,b)|0,s0=s0+Math.imul(U$,A$)|0,I=I+Math.imul(U$,b)|0,v=v+Math.imul(G$,l)|0,s0=s0+Math.imul(G$,W$)|0,s0=s0+Math.imul(x,l)|0,I=I+Math.imul(x,W$)|0,v=v+Math.imul(_,E$)|0,s0=s0+Math.imul(_,u)|0,s0=s0+Math.imul(Z$,E$)|0,I=I+Math.imul(Z$,u)|0,v=v+Math.imul(Q$,n)|0,s0=s0+Math.imul(Q$,D$)|0,s0=s0+Math.imul(g,n)|0,I=I+Math.imul(g,D$)|0,v=v+Math.imul(j,C$)|0,s0=s0+Math.imul(j,t)|0,s0=s0+Math.imul($$,C$)|0,I=I+Math.imul($$,t)|0,v=v+Math.imul(e0,m)|0,s0=s0+Math.imul(e0,R$)|0,s0=s0+Math.imul(r0,m)|0,I=I+Math.imul(r0,R$)|0,v=v+Math.imul(m0,P$)|0,s0=s0+Math.imul(m0,O)|0,s0=s0+Math.imul(a0,P$)|0,I=I+Math.imul(a0,O)|0;var _$=(n0+v|0)+((s0&8191)<<13)|0;n0=(I+(s0>>>13)|0)+(_$>>>26)|0,_$&=67108863,v=Math.imul(p,h),s0=Math.imul(p,F$),s0=s0+Math.imul(I$,h)|0,I=Math.imul(I$,F$),v=v+Math.imul(X$,A$)|0,s0=s0+Math.imul(X$,b)|0,s0=s0+Math.imul(w,A$)|0,I=I+Math.imul(w,b)|0,v=v+Math.imul(B,l)|0,s0=s0+Math.imul(B,W$)|0,s0=s0+Math.imul(U$,l)|0,I=I+Math.imul(U$,W$)|0,v=v+Math.imul(G$,E$)|0,s0=s0+Math.imul(G$,u)|0,s0=s0+Math.imul(x,E$)|0,I=I+Math.imul(x,u)|0,v=v+Math.imul(_,n)|0,s0=s0+Math.imul(_,D$)|0,s0=s0+Math.imul(Z$,n)|0,I=I+Math.imul(Z$,D$)|0,v=v+Math.imul(Q$,C$)|0,s0=s0+Math.imul(Q$,t)|0,s0=s0+Math.imul(g,C$)|0,I=I+Math.imul(g,t)|0,v=v+Math.imul(j,m)|0,s0=s0+Math.imul(j,R$)|0,s0=s0+Math.imul($$,m)|0,I=I+Math.imul($$,R$)|0,v=v+Math.imul(e0,P$)|0,s0=s0+Math.imul(e0,O)|0,s0=s0+Math.imul(r0,P$)|0,I=I+Math.imul(r0,O)|0,v=v+Math.imul(m0,e)|0,s0=s0+Math.imul(m0,M$)|0,s0=s0+Math.imul(a0,e)|0,I=I+Math.imul(a0,M$)|0;var N$=(n0+v|0)+((s0&8191)<<13)|0;n0=(I+(s0>>>13)|0)+(N$>>>26)|0,N$&=67108863,v=Math.imul(O$,h),s0=Math.imul(O$,F$),s0=s0+Math.imul(c,h)|0,I=Math.imul(c,F$),v=v+Math.imul(p,A$)|0,s0=s0+Math.imul(p,b)|0,s0=s0+Math.imul(I$,A$)|0,I=I+Math.imul(I$,b)|0,v=v+Math.imul(X$,l)|0,s0=s0+Math.imul(X$,W$)|0,s0=s0+Math.imul(w,l)|0,I=I+Math.imul(w,W$)|0,v=v+Math.imul(B,E$)|0,s0=s0+Math.imul(B,u)|0,s0=s0+Math.imul(U$,E$)|0,I=I+Math.imul(U$,u)|0,v=v+Math.imul(G$,n)|0,s0=s0+Math.imul(G$,D$)|0,s0=s0+Math.imul(x,n)|0,I=I+Math.imul(x,D$)|0,v=v+Math.imul(_,C$)|0,s0=s0+Math.imul(_,t)|0,s0=s0+Math.imul(Z$,C$)|0,I=I+Math.imul(Z$,t)|0,v=v+Math.imul(Q$,m)|0,s0=s0+Math.imul(Q$,R$)|0,s0=s0+Math.imul(g,m)|0,I=I+Math.imul(g,R$)|0,v=v+Math.imul(j,P$)|0,s0=s0+Math.imul(j,O)|0,s0=s0+Math.imul($$,P$)|0,I=I+Math.imul($$,O)|0,v=v+Math.imul(e0,e)|0,s0=s0+Math.imul(e0,M$)|0,s0=s0+Math.imul(r0,e)|0,I=I+Math.imul(r0,M$)|0,v=v+Math.imul(m0,S$)|0,s0=s0+Math.imul(m0,F)|0,s0=s0+Math.imul(a0,S$)|0,I=I+Math.imul(a0,F)|0;var $0=(n0+v|0)+((s0&8191)<<13)|0;n0=(I+(s0>>>13)|0)+($0>>>26)|0,$0&=67108863,v=Math.imul(O$,A$),s0=Math.imul(O$,b),s0=s0+Math.imul(c,A$)|0,I=Math.imul(c,b),v=v+Math.imul(p,l)|0,s0=s0+Math.imul(p,W$)|0,s0=s0+Math.imul(I$,l)|0,I=I+Math.imul(I$,W$)|0,v=v+Math.imul(X$,E$)|0,s0=s0+Math.imul(X$,u)|0,s0=s0+Math.imul(w,E$)|0,I=I+Math.imul(w,u)|0,v=v+Math.imul(B,n)|0,s0=s0+Math.imul(B,D$)|0,s0=s0+Math.imul(U$,n)|0,I=I+Math.imul(U$,D$)|0,v=v+Math.imul(G$,C$)|0,s0=s0+Math.imul(G$,t)|0,s0=s0+Math.imul(x,C$)|0,I=I+Math.imul(x,t)|0,v=v+Math.imul(_,m)|0,s0=s0+Math.imul(_,R$)|0,s0=s0+Math.imul(Z$,m)|0,I=I+Math.imul(Z$,R$)|0,v=v+Math.imul(Q$,P$)|0,s0=s0+Math.imul(Q$,O)|0,s0=s0+Math.imul(g,P$)|0,I=I+Math.imul(g,O)|0,v=v+Math.imul(j,e)|0,s0=s0+Math.imul(j,M$)|0,s0=s0+Math.imul($$,e)|0,I=I+Math.imul($$,M$)|0,v=v+Math.imul(e0,S$)|0,s0=s0+Math.imul(e0,F)|0,s0=s0+Math.imul(r0,S$)|0,I=I+Math.imul(r0,F)|0;var x$=(n0+v|0)+((s0&8191)<<13)|0;n0=(I+(s0>>>13)|0)+(x$>>>26)|0,x$&=67108863,v=Math.imul(O$,l),s0=Math.imul(O$,W$),s0=s0+Math.imul(c,l)|0,I=Math.imul(c,W$),v=v+Math.imul(p,E$)|0,s0=s0+Math.imul(p,u)|0,s0=s0+Math.imul(I$,E$)|0,I=I+Math.imul(I$,u)|0,v=v+Math.imul(X$,n)|0,s0=s0+Math.imul(X$,D$)|0,s0=s0+Math.imul(w,n)|0,I=I+Math.imul(w,D$)|0,v=v+Math.imul(B,C$)|0,s0=s0+Math.imul(B,t)|0,s0=s0+Math.imul(U$,C$)|0,I=I+Math.imul(U$,t)|0,v=v+Math.imul(G$,m)|0,s0=s0+Math.imul(G$,R$)|0,s0=s0+Math.imul(x,m)|0,I=I+Math.imul(x,R$)|0,v=v+Math.imul(_,P$)|0,s0=s0+Math.imul(_,O)|0,s0=s0+Math.imul(Z$,P$)|0,I=I+Math.imul(Z$,O)|0,v=v+Math.imul(Q$,e)|0,s0=s0+Math.imul(Q$,M$)|0,s0=s0+Math.imul(g,e)|0,I=I+Math.imul(g,M$)|0,v=v+Math.imul(j,S$)|0,s0=s0+Math.imul(j,F)|0,s0=s0+Math.imul($$,S$)|0,I=I+Math.imul($$,F)|0;var Q0=(n0+v|0)+((s0&8191)<<13)|0;n0=(I+(s0>>>13)|0)+(Q0>>>26)|0,Q0&=67108863,v=Math.imul(O$,E$),s0=Math.imul(O$,u),s0=s0+Math.imul(c,E$)|0,I=Math.imul(c,u),v=v+Math.imul(p,n)|0,s0=s0+Math.imul(p,D$)|0,s0=s0+Math.imul(I$,n)|0,I=I+Math.imul(I$,D$)|0,v=v+Math.imul(X$,C$)|0,s0=s0+Math.imul(X$,t)|0,s0=s0+Math.imul(w,C$)|0,I=I+Math.imul(w,t)|0,v=v+Math.imul(B,m)|0,s0=s0+Math.imul(B,R$)|0,s0=s0+Math.imul(U$,m)|0,I=I+Math.imul(U$,R$)|0,v=v+Math.imul(G$,P$)|0,s0=s0+Math.imul(G$,O)|0,s0=s0+Math.imul(x,P$)|0,I=I+Math.imul(x,O)|0,v=v+Math.imul(_,e)|0,s0=s0+Math.imul(_,M$)|0,s0=s0+Math.imul(Z$,e)|0,I=I+Math.imul(Z$,M$)|0,v=v+Math.imul(Q$,S$)|0,s0=s0+Math.imul(Q$,F)|0,s0=s0+Math.imul(g,S$)|0,I=I+Math.imul(g,F)|0;var B$=(n0+v|0)+((s0&8191)<<13)|0;n0=(I+(s0>>>13)|0)+(B$>>>26)|0,B$&=67108863,v=Math.imul(O$,n),s0=Math.imul(O$,D$),s0=s0+Math.imul(c,n)|0,I=Math.imul(c,D$),v=v+Math.imul(p,C$)|0,s0=s0+Math.imul(p,t)|0,s0=s0+Math.imul(I$,C$)|0,I=I+Math.imul(I$,t)|0,v=v+Math.imul(X$,m)|0,s0=s0+Math.imul(X$,R$)|0,s0=s0+Math.imul(w,m)|0,I=I+Math.imul(w,R$)|0,v=v+Math.imul(B,P$)|0,s0=s0+Math.imul(B,O)|0,s0=s0+Math.imul(U$,P$)|0,I=I+Math.imul(U$,O)|0,v=v+Math.imul(G$,e)|0,s0=s0+Math.imul(G$,M$)|0,s0=s0+Math.imul(x,e)|0,I=I+Math.imul(x,M$)|0,v=v+Math.imul(_,S$)|0,s0=s0+Math.imul(_,F)|0,s0=s0+Math.imul(Z$,S$)|0,I=I+Math.imul(Z$,F)|0;var Y0=(n0+v|0)+((s0&8191)<<13)|0;n0=(I+(s0>>>13)|0)+(Y0>>>26)|0,Y0&=67108863,v=Math.imul(O$,C$),s0=Math.imul(O$,t),s0=s0+Math.imul(c,C$)|0,I=Math.imul(c,t),v=v+Math.imul(p,m)|0,s0=s0+Math.imul(p,R$)|0,s0=s0+Math.imul(I$,m)|0,I=I+Math.imul(I$,R$)|0,v=v+Math.imul(X$,P$)|0,s0=s0+Math.imul(X$,O)|0,s0=s0+Math.imul(w,P$)|0,I=I+Math.imul(w,O)|0,v=v+Math.imul(B,e)|0,s0=s0+Math.imul(B,M$)|0,s0=s0+Math.imul(U$,e)|0,I=I+Math.imul(U$,M$)|0,v=v+Math.imul(G$,S$)|0,s0=s0+Math.imul(G$,F)|0,s0=s0+Math.imul(x,S$)|0,I=I+Math.imul(x,F)|0;var y$=(n0+v|0)+((s0&8191)<<13)|0;n0=(I+(s0>>>13)|0)+(y$>>>26)|0,y$&=67108863,v=Math.imul(O$,m),s0=Math.imul(O$,R$),s0=s0+Math.imul(c,m)|0,I=Math.imul(c,R$),v=v+Math.imul(p,P$)|0,s0=s0+Math.imul(p,O)|0,s0=s0+Math.imul(I$,P$)|0,I=I+Math.imul(I$,O)|0,v=v+Math.imul(X$,e)|0,s0=s0+Math.imul(X$,M$)|0,s0=s0+Math.imul(w,e)|0,I=I+Math.imul(w,M$)|0,v=v+Math.imul(B,S$)|0,s0=s0+Math.imul(B,F)|0,s0=s0+Math.imul(U$,S$)|0,I=I+Math.imul(U$,F)|0;var Z0=(n0+v|0)+((s0&8191)<<13)|0;n0=(I+(s0>>>13)|0)+(Z0>>>26)|0,Z0&=67108863,v=Math.imul(O$,P$),s0=Math.imul(O$,O),s0=s0+Math.imul(c,P$)|0,I=Math.imul(c,O),v=v+Math.imul(p,e)|0,s0=s0+Math.imul(p,M$)|0,s0=s0+Math.imul(I$,e)|0,I=I+Math.imul(I$,M$)|0,v=v+Math.imul(X$,S$)|0,s0=s0+Math.imul(X$,F)|0,s0=s0+Math.imul(w,S$)|0,I=I+Math.imul(w,F)|0;var w$=(n0+v|0)+((s0&8191)<<13)|0;n0=(I+(s0>>>13)|0)+(w$>>>26)|0,w$&=67108863,v=Math.imul(O$,e),s0=Math.imul(O$,M$),s0=s0+Math.imul(c,e)|0,I=Math.imul(c,M$),v=v+Math.imul(p,S$)|0,s0=s0+Math.imul(p,F)|0,s0=s0+Math.imul(I$,S$)|0,I=I+Math.imul(I$,F)|0;var G0=(n0+v|0)+((s0&8191)<<13)|0;n0=(I+(s0>>>13)|0)+(G0>>>26)|0,G0&=67108863,v=Math.imul(O$,S$),s0=Math.imul(O$,F),s0=s0+Math.imul(c,S$)|0,I=Math.imul(c,F);var p$=(n0+v|0)+((s0&8191)<<13)|0;return n0=(I+(s0>>>13)|0)+(p$>>>26)|0,p$&=67108863,S[0]=v$,S[1]=r,S[2]=q$,S[3]=i,S[4]=j$,S[5]=k$,S[6]=g$,S[7]=_$,S[8]=N$,S[9]=$0,S[10]=x$,S[11]=Q0,S[12]=B$,S[13]=Y0,S[14]=y$,S[15]=Z0,S[16]=w$,S[17]=G0,S[18]=p$,n0!==0&&(S[19]=n0,o0.length++),o0};Math.imul||(p0=E);function T(l0,z,o0){o0.negative=z.negative^l0.negative,o0.length=l0.length+z.length;for(var M=0,u0=0,S=0;S>>26)|0,u0+=n0>>>26,n0&=67108863}o0.words[S]=v,M=n0,n0=u0}return M!==0?o0.words[S]=M:o0.length--,o0.strip()}function f0(l0,z,o0){var M=new D;return M.mulp(l0,z,o0)}Z.prototype.mulTo=function(l0,z){var o0,M=this.length+l0.length;return this.length===10&&l0.length===10?o0=p0(this,l0,z):M<63?o0=E(this,l0,z):M<1024?o0=T(this,l0,z):o0=f0(this,l0,z),o0};function D(l0,z){this.x=l0,this.y=z}D.prototype.makeRBT=function(l0){for(var z=new Array(l0),o0=Z.prototype._countBits(l0)-1,M=0;M>=1;return M},D.prototype.permute=function(l0,z,o0,M,u0,S){for(var n0=0;n0>>1)u0++;return 1<>>13,o0[2*S+1]=u0&8191,u0=u0>>>13;for(S=2*z;S>=26,z+=M/67108864|0,z+=u0>>>26,this.words[o0]=u0&67108863}return z!==0&&(this.words[o0]=z,this.length++),this},Z.prototype.muln=function(l0){return this.clone().imuln(l0)},Z.prototype.sqr=function(){return this.mul(this)},Z.prototype.isqr=function(){return this.imul(this.clone())},Z.prototype.pow=function(l0){var z=w0(l0);if(z.length===0)return new Z(1);for(var o0=this,M=0;M=0);var z=l0%26,o0=(l0-z)/26,M=67108863>>>26-z<<26-z,u0;if(z!==0){var S=0;for(u0=0;u0>>26-z}S&&(this.words[u0]=S,this.length++)}if(o0!==0){for(u0=this.length-1;u0>=0;u0--)this.words[u0+o0]=this.words[u0];for(u0=0;u0=0);var M;z?M=(z-z%26)/26:M=0;var u0=l0%26,S=Math.min((l0-u0)/26,this.length),n0=67108863^67108863>>>u0<S)for(this.length-=S,s0=0;s0=0&&(I!==0||s0>=M);s0--){var t0=this.words[s0]|0;this.words[s0]=I<<26-u0|t0>>>u0,I=t0&n0}return v&&I!==0&&(v.words[v.length++]=I),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},Z.prototype.ishrn=function(l0,z,o0){return Y(this.negative===0),this.iushrn(l0,z,o0)},Z.prototype.shln=function(l0){return this.clone().ishln(l0)},Z.prototype.ushln=function(l0){return this.clone().iushln(l0)},Z.prototype.shrn=function(l0){return this.clone().ishrn(l0)},Z.prototype.ushrn=function(l0){return this.clone().iushrn(l0)},Z.prototype.testn=function(l0){Y(typeof l0=="number"&&l0>=0);var z=l0%26,o0=(l0-z)/26,M=1<=0);var z=l0%26,o0=(l0-z)/26;if(Y(this.negative===0,"imaskn works only with positive numbers"),this.length<=o0)return this;if(z!==0&&o0++,this.length=Math.min(o0,this.length),z!==0){var M=67108863^67108863>>>z<=67108864;z++)this.words[z]-=67108864,z===this.length-1?this.words[z+1]=1:this.words[z+1]++;return this.length=Math.max(this.length,z+1),this},Z.prototype.isubn=function(l0){if(Y(typeof l0=="number"),Y(l0<67108864),l0<0)return this.iaddn(-l0);if(this.negative!==0)return this.negative=0,this.iaddn(l0),this.negative=1,this;if(this.words[0]-=l0,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var z=0;z>26)-(v/67108864|0),this.words[u0+o0]=S&67108863}for(;u0>26,this.words[u0+o0]=S&67108863;if(n0===0)return this.strip();for(Y(n0===-1),n0=0,u0=0;u0>26,this.words[u0]=S&67108863;return this.negative=1,this.strip()},Z.prototype._wordDiv=function(l0,z){var o0=this.length-l0.length,M=this.clone(),u0=l0,S=u0.words[u0.length-1]|0,n0=this._countBits(S);o0=26-n0,o0!==0&&(u0=u0.ushln(o0),M.iushln(o0),S=u0.words[u0.length-1]|0);var v=M.length-u0.length,s0;if(z!=="mod"){s0=new Z(null),s0.length=v+1,s0.words=new Array(s0.length);for(var I=0;I=0;m0--){var a0=(M.words[u0.length+m0]|0)*67108864+(M.words[u0.length+m0-1]|0);for(a0=Math.min(a0/S|0,67108863),M._ishlnsubmul(u0,a0,m0);M.negative!==0;)a0--,M.negative=0,M._ishlnsubmul(u0,1,m0),M.isZero()||(M.negative^=1);s0&&(s0.words[m0]=a0)}return s0&&s0.strip(),M.strip(),z!=="div"&&o0!==0&&M.iushrn(o0),{div:s0||null,mod:M}},Z.prototype.divmod=function(l0,z,o0){if(Y(!l0.isZero()),this.isZero())return{div:new Z(0),mod:new Z(0)};var M,u0,S;return this.negative!==0&&l0.negative===0?(S=this.neg().divmod(l0,z),z!=="mod"&&(M=S.div.neg()),z!=="div"&&(u0=S.mod.neg(),o0&&u0.negative!==0&&u0.iadd(l0)),{div:M,mod:u0}):this.negative===0&&l0.negative!==0?(S=this.divmod(l0.neg(),z),z!=="mod"&&(M=S.div.neg()),{div:M,mod:S.mod}):(this.negative&l0.negative)!==0?(S=this.neg().divmod(l0.neg(),z),z!=="div"&&(u0=S.mod.neg(),o0&&u0.negative!==0&&u0.isub(l0)),{div:S.div,mod:u0}):l0.length>this.length||this.cmp(l0)<0?{div:new Z(0),mod:this}:l0.length===1?z==="div"?{div:this.divn(l0.words[0]),mod:null}:z==="mod"?{div:null,mod:new Z(this.modn(l0.words[0]))}:{div:this.divn(l0.words[0]),mod:new Z(this.modn(l0.words[0]))}:this._wordDiv(l0,z)},Z.prototype.div=function(l0){return this.divmod(l0,"div",!1).div},Z.prototype.mod=function(l0){return this.divmod(l0,"mod",!1).mod},Z.prototype.umod=function(l0){return this.divmod(l0,"mod",!0).mod},Z.prototype.divRound=function(l0){var z=this.divmod(l0);if(z.mod.isZero())return z.div;var o0=z.div.negative!==0?z.mod.isub(l0):z.mod,M=l0.ushrn(1),u0=l0.andln(1),S=o0.cmp(M);return S<0||u0===1&&S===0?z.div:z.div.negative!==0?z.div.isubn(1):z.div.iaddn(1)},Z.prototype.modn=function(l0){Y(l0<=67108863);for(var z=(1<<26)%l0,o0=0,M=this.length-1;M>=0;M--)o0=(z*o0+(this.words[M]|0))%l0;return o0},Z.prototype.idivn=function(l0){Y(l0<=67108863);for(var z=0,o0=this.length-1;o0>=0;o0--){var M=(this.words[o0]|0)+z*67108864;this.words[o0]=M/l0|0,z=M%l0}return this.strip()},Z.prototype.divn=function(l0){return this.clone().idivn(l0)},Z.prototype.egcd=function(l0){Y(l0.negative===0),Y(!l0.isZero());var z=this,o0=l0.clone();z.negative!==0?z=z.umod(l0):z=z.clone();for(var M=new Z(1),u0=new Z(0),S=new Z(0),n0=new Z(1),v=0;z.isEven()&&o0.isEven();)z.iushrn(1),o0.iushrn(1),++v;for(var s0=o0.clone(),I=z.clone();!z.isZero();){for(var t0=0,m0=1;(z.words[0]&m0)===0&&t0<26;++t0,m0<<=1);if(t0>0)for(z.iushrn(t0);t0-- >0;)(M.isOdd()||u0.isOdd())&&(M.iadd(s0),u0.isub(I)),M.iushrn(1),u0.iushrn(1);for(var a0=0,q=1;(o0.words[0]&q)===0&&a0<26;++a0,q<<=1);if(a0>0)for(o0.iushrn(a0);a0-- >0;)(S.isOdd()||n0.isOdd())&&(S.iadd(s0),n0.isub(I)),S.iushrn(1),n0.iushrn(1);z.cmp(o0)>=0?(z.isub(o0),M.isub(S),u0.isub(n0)):(o0.isub(z),S.isub(M),n0.isub(u0))}return{a:S,b:n0,gcd:o0.iushln(v)}},Z.prototype._invmp=function(l0){Y(l0.negative===0),Y(!l0.isZero());var z=this,o0=l0.clone();z.negative!==0?z=z.umod(l0):z=z.clone();for(var M=new Z(1),u0=new Z(0),S=o0.clone();z.cmpn(1)>0&&o0.cmpn(1)>0;){for(var n0=0,v=1;(z.words[0]&v)===0&&n0<26;++n0,v<<=1);if(n0>0)for(z.iushrn(n0);n0-- >0;)M.isOdd()&&M.iadd(S),M.iushrn(1);for(var s0=0,I=1;(o0.words[0]&I)===0&&s0<26;++s0,I<<=1);if(s0>0)for(o0.iushrn(s0);s0-- >0;)u0.isOdd()&&u0.iadd(S),u0.iushrn(1);z.cmp(o0)>=0?(z.isub(o0),M.isub(u0)):(o0.isub(z),u0.isub(M))}var t0;return z.cmpn(1)===0?t0=M:t0=u0,t0.cmpn(0)<0&&t0.iadd(l0),t0},Z.prototype.gcd=function(l0){if(this.isZero())return l0.abs();if(l0.isZero())return this.abs();var z=this.clone(),o0=l0.clone();z.negative=0,o0.negative=0;for(var M=0;z.isEven()&&o0.isEven();M++)z.iushrn(1),o0.iushrn(1);do{for(;z.isEven();)z.iushrn(1);for(;o0.isEven();)o0.iushrn(1);var u0=z.cmp(o0);if(u0<0){var S=z;z=o0,o0=S}else if(u0===0||o0.cmpn(1)===0)break;z.isub(o0)}while(!0);return o0.iushln(M)},Z.prototype.invm=function(l0){return this.egcd(l0).a.umod(l0)},Z.prototype.isEven=function(){return(this.words[0]&1)===0},Z.prototype.isOdd=function(){return(this.words[0]&1)===1},Z.prototype.andln=function(l0){return this.words[0]&l0},Z.prototype.bincn=function(l0){Y(typeof l0=="number");var z=l0%26,o0=(l0-z)/26,M=1<>>26,n0&=67108863,this.words[S]=n0}return u0!==0&&(this.words[S]=u0,this.length++),this},Z.prototype.isZero=function(){return this.length===1&&this.words[0]===0},Z.prototype.cmpn=function(l0){var z=l0<0;if(this.negative!==0&&!z)return-1;if(this.negative===0&&z)return 1;this.strip();var o0;if(this.length>1)o0=1;else{z&&(l0=-l0),Y(l0<=67108863,"Number is too big");var M=this.words[0]|0;o0=M===l0?0:Ml0.length)return 1;if(this.length=0;o0--){var M=this.words[o0]|0,u0=l0.words[o0]|0;if(M!==u0){Mu0&&(z=1);break}}return z},Z.prototype.gtn=function(l0){return this.cmpn(l0)===1},Z.prototype.gt=function(l0){return this.cmp(l0)===1},Z.prototype.gten=function(l0){return this.cmpn(l0)>=0},Z.prototype.gte=function(l0){return this.cmp(l0)>=0},Z.prototype.ltn=function(l0){return this.cmpn(l0)===-1},Z.prototype.lt=function(l0){return this.cmp(l0)===-1},Z.prototype.lten=function(l0){return this.cmpn(l0)<=0},Z.prototype.lte=function(l0){return this.cmp(l0)<=0},Z.prototype.eqn=function(l0){return this.cmpn(l0)===0},Z.prototype.eq=function(l0){return this.cmp(l0)===0},Z.red=function(l0){return new b0(l0)},Z.prototype.toRed=function(l0){return Y(!this.red,"Already a number in reduction context"),Y(this.negative===0,"red works only with positives"),l0.convertTo(this)._forceRed(l0)},Z.prototype.fromRed=function(){return Y(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},Z.prototype._forceRed=function(l0){return this.red=l0,this},Z.prototype.forceRed=function(l0){return Y(!this.red,"Already a number in reduction context"),this._forceRed(l0)},Z.prototype.redAdd=function(l0){return Y(this.red,"redAdd works only with red numbers"),this.red.add(this,l0)},Z.prototype.redIAdd=function(l0){return Y(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,l0)},Z.prototype.redSub=function(l0){return Y(this.red,"redSub works only with red numbers"),this.red.sub(this,l0)},Z.prototype.redISub=function(l0){return Y(this.red,"redISub works only with red numbers"),this.red.isub(this,l0)},Z.prototype.redShl=function(l0){return Y(this.red,"redShl works only with red numbers"),this.red.shl(this,l0)},Z.prototype.redMul=function(l0){return Y(this.red,"redMul works only with red numbers"),this.red._verify2(this,l0),this.red.mul(this,l0)},Z.prototype.redIMul=function(l0){return Y(this.red,"redMul works only with red numbers"),this.red._verify2(this,l0),this.red.imul(this,l0)},Z.prototype.redSqr=function(){return Y(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},Z.prototype.redISqr=function(){return Y(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},Z.prototype.redSqrt=function(){return Y(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},Z.prototype.redInvm=function(){return Y(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},Z.prototype.redNeg=function(){return Y(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},Z.prototype.redPow=function(l0){return Y(this.red&&!l0.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,l0)};var c0={k256:null,p224:null,p192:null,p25519:null};function C(l0,z){this.name=l0,this.p=new Z(z,16),this.n=this.p.bitLength(),this.k=new Z(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}C.prototype._tmp=function(){var l0=new Z(null);return l0.words=new Array(Math.ceil(this.n/13)),l0},C.prototype.ireduce=function(l0){var z=l0,o0;do this.split(z,this.tmp),z=this.imulK(z),z=z.iadd(this.tmp),o0=z.bitLength();while(o0>this.n);var M=o00?z.isub(this.p):z.strip!==void 0?z.strip():z._strip(),z},C.prototype.split=function(l0,z){l0.iushrn(this.n,0,z)},C.prototype.imulK=function(l0){return l0.imul(this.k)};function h0(){C.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}$(h0,C),h0.prototype.split=function(l0,z){for(var o0=4194303,M=Math.min(l0.length,9),u0=0;u0>>22,S=n0}S>>>=22,l0.words[u0-10]=S,S===0&&l0.length>10?l0.length-=10:l0.length-=9},h0.prototype.imulK=function(l0){l0.words[l0.length]=0,l0.words[l0.length+1]=0,l0.length+=2;for(var z=0,o0=0;o0>>=26,l0.words[o0]=u0,z=M}return z!==0&&(l0.words[l0.length++]=z),l0},Z._prime=function(l0){if(c0[l0])return c0[l0];var z;if(l0==="k256")z=new h0;else if(l0==="p224")z=new L;else if(l0==="p192")z=new d0;else if(l0==="p25519")z=new R;else throw new Error("Unknown prime "+l0);return c0[l0]=z,z};function b0(l0){if(typeof l0=="string"){var z=Z._prime(l0);this.m=z.p,this.prime=z}else Y(l0.gtn(1),"modulus must be greater than 1"),this.m=l0,this.prime=null}b0.prototype._verify1=function(l0){Y(l0.negative===0,"red works only with positives"),Y(l0.red,"red works only with red numbers")},b0.prototype._verify2=function(l0,z){Y((l0.negative|z.negative)===0,"red works only with positives"),Y(l0.red&&l0.red===z.red,"red works only with red numbers")},b0.prototype.imod=function(l0){return this.prime?this.prime.ireduce(l0)._forceRed(this):l0.umod(this.m)._forceRed(this)},b0.prototype.neg=function(l0){return l0.isZero()?l0.clone():this.m.sub(l0)._forceRed(this)},b0.prototype.add=function(l0,z){this._verify2(l0,z);var o0=l0.add(z);return o0.cmp(this.m)>=0&&o0.isub(this.m),o0._forceRed(this)},b0.prototype.iadd=function(l0,z){this._verify2(l0,z);var o0=l0.iadd(z);return o0.cmp(this.m)>=0&&o0.isub(this.m),o0},b0.prototype.sub=function(l0,z){this._verify2(l0,z);var o0=l0.sub(z);return o0.cmpn(0)<0&&o0.iadd(this.m),o0._forceRed(this)},b0.prototype.isub=function(l0,z){this._verify2(l0,z);var o0=l0.isub(z);return o0.cmpn(0)<0&&o0.iadd(this.m),o0},b0.prototype.shl=function(l0,z){return this._verify1(l0),this.imod(l0.ushln(z))},b0.prototype.imul=function(l0,z){return this._verify2(l0,z),this.imod(l0.imul(z))},b0.prototype.mul=function(l0,z){return this._verify2(l0,z),this.imod(l0.mul(z))},b0.prototype.isqr=function(l0){return this.imul(l0,l0.clone())},b0.prototype.sqr=function(l0){return this.mul(l0,l0)},b0.prototype.sqrt=function(l0){if(l0.isZero())return l0.clone();var z=this.m.andln(3);if(Y(z%2===1),z===3){var o0=this.m.add(new Z(1)).iushrn(2);return this.pow(l0,o0)}for(var M=this.m.subn(1),u0=0;!M.isZero()&&M.andln(1)===0;)u0++,M.iushrn(1);Y(!M.isZero());var S=new Z(1).toRed(this),n0=S.redNeg(),v=this.m.subn(1).iushrn(1),s0=this.m.bitLength();for(s0=new Z(2*s0*s0).toRed(this);this.pow(s0,v).cmp(n0)!==0;)s0.redIAdd(n0);for(var I=this.pow(s0,M),t0=this.pow(l0,M.addn(1).iushrn(1)),m0=this.pow(l0,M),a0=u0;m0.cmp(S)!==0;){for(var q=m0,e0=0;q.cmp(S)!==0;e0++)q=q.redSqr();Y(e0=0;u0--){for(var I=z.words[u0],t0=s0-1;t0>=0;t0--){var m0=I>>t0&1;if(S!==M[0]&&(S=this.sqr(S)),m0===0&&n0===0){v=0;continue}n0<<=1,n0|=m0,v++,!(v!==o0&&(u0!==0||t0!==0))&&(S=this.mul(S,M[n0]),v=0,n0=0)}s0=26}return S},b0.prototype.convertTo=function(l0){var z=l0.umod(this.m);return z===l0?z.clone():z},b0.prototype.convertFrom=function(l0){var z=l0.clone();return z.red=null,z},Z.mont=function(l0){return new P(l0)};function P(l0){b0.call(this,l0),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new Z(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}$(P,b0),P.prototype.convertTo=function(l0){return this.imod(l0.ushln(this.shift))},P.prototype.convertFrom=function(l0){var z=this.imod(l0.mul(this.rinv));return z.red=null,z},P.prototype.imul=function(l0,z){if(l0.isZero()||z.isZero())return l0.words[0]=0,l0.length=1,l0;var o0=l0.imul(z),M=o0.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),u0=o0.isub(M).iushrn(this.shift),S=u0;return u0.cmp(this.m)>=0?S=u0.isub(this.m):u0.cmpn(0)<0&&(S=u0.iadd(this.m)),S._forceRed(this)},P.prototype.mul=function(l0,z){if(l0.isZero()||z.isZero())return new Z(0)._forceRed(this);var o0=l0.mul(z),M=o0.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),u0=o0.isub(M).iushrn(this.shift),S=u0;return u0.cmp(this.m)>=0?S=u0.isub(this.m):u0.cmpn(0)<0&&(S=u0.iadd(this.m)),S._forceRed(this)},P.prototype.invm=function(l0){var z=this.imod(l0._invmp(this.m).mul(this.r2));return z._forceRed(this)}})(typeof K>"u"||K,X)}}),lY=$Q({"node_modules/create-ecdh/browser.js"(X,K){var x0=TY(),G=bY();K.exports=function(Q){return new $(Q)};var Y={secp256k1:{name:"secp256k1",byteLength:32},secp224r1:{name:"p224",byteLength:28},prime256v1:{name:"p256",byteLength:32},prime192v1:{name:"p192",byteLength:24},ed25519:{name:"ed25519",byteLength:32},secp384r1:{name:"p384",byteLength:48},secp521r1:{name:"p521",byteLength:66}};Y.p224=Y.secp224r1,Y.p256=Y.secp256r1=Y.prime256v1,Y.p192=Y.secp192r1=Y.prime192v1,Y.p384=Y.secp384r1,Y.p521=Y.secp521r1;function $(Q){this.curveType=Y[Q],this.curveType||(this.curveType={name:Q}),this.curve=new x0.ec(this.curveType.name),this.keys=void 0}$.prototype.generateKeys=function(Q,U){return this.keys=this.curve.genKeyPair(),this.getPublicKey(Q,U)},$.prototype.computeSecret=function(Q,U,V){U=U||"utf8",c$.isBuffer(Q)||(Q=new c$(Q,U));var B0=this.curve.keyFromPublic(Q).getPublic(),H=B0.mul(this.keys.getPrivate()).getX();return Z(H,V,this.curveType.byteLength)},$.prototype.getPublicKey=function(Q,U){var V=this.keys.getPublic(U==="compressed",!0);return U==="hybrid"&&(V[V.length-1]%2?V[0]=7:V[0]=6),Z(V,Q)},$.prototype.getPrivateKey=function(Q){return Z(this.keys.getPrivate(),Q)},$.prototype.setPublicKey=function(Q,U){return U=U||"utf8",c$.isBuffer(Q)||(Q=new c$(Q,U)),this.keys._importPublic(Q),this},$.prototype.setPrivateKey=function(Q,U){U=U||"utf8",c$.isBuffer(Q)||(Q=new c$(Q,U));var V=new G(Q);return V=V.toString(16),this.keys=this.curve.genKeyPair(),this.keys._importPrivate(V),this};function Z(Q,U,V){Array.isArray(Q)||(Q=Q.toArray());var B0=new c$(Q);if(V&&B0.length0?l0:z},Z.min=function(l0,z){return l0.cmp(z)<0?l0:z},Z.prototype._init=function(l0,z,o0){if(typeof l0=="number")return this._initNumber(l0,z,o0);if(typeof l0=="object")return this._initArray(l0,z,o0);z==="hex"&&(z=16),Y(z===(z|0)&&z>=2&&z<=36),l0=l0.toString().replace(/\s+/g,"");var M=0;l0[0]==="-"&&(M++,this.negative=1),M=0;M-=3)S=l0[M]|l0[M-1]<<8|l0[M-2]<<16,this.words[u0]|=S<>>26-n0&67108863,n0+=24,n0>=26&&(n0-=26,u0++);else if(o0==="le")for(M=0,u0=0;M>>26-n0&67108863,n0+=24,n0>=26&&(n0-=26,u0++);return this.strip()};function U(l0,z){var o0=l0.charCodeAt(z);return o0>=65&&o0<=70?o0-55:o0>=97&&o0<=102?o0-87:o0-48&15}function V(l0,z,o0){var M=U(l0,o0);return o0-1>=z&&(M|=U(l0,o0-1)<<4),M}Z.prototype._parseHex=function(l0,z,o0){this.length=Math.ceil((l0.length-z)/6),this.words=new Array(this.length);for(var M=0;M=z;M-=2)n0=V(l0,z,M)<=18?(u0-=18,S+=1,this.words[S]|=n0>>>26):u0+=8;else{var v=l0.length-z;for(M=v%2===0?z+1:z;M=18?(u0-=18,S+=1,this.words[S]|=n0>>>26):u0+=8}this.strip()};function B0(l0,z,o0,M){for(var u0=0,S=Math.min(l0.length,o0),n0=z;n0=49?u0+=v-49+10:v>=17?u0+=v-17+10:u0+=v}return u0}Z.prototype._parseBase=function(l0,z,o0){this.words=[0],this.length=1;for(var M=0,u0=1;u0<=67108863;u0*=z)M++;M--,u0=u0/z|0;for(var S=l0.length-o0,n0=S%M,v=Math.min(S,S-n0)+o0,s0=0,I=o0;I1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},Z.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},Z.prototype.inspect=function(){return(this.red?""};var H=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],y0=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],W=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64000000,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,24300000,28629151,33554432,39135393,45435424,52521875,60466176];Z.prototype.toString=function(l0,z){l0=l0||10,z=z|0||1;var o0;if(l0===16||l0==="hex"){o0="";for(var M=0,u0=0,S=0;S>>24-M&16777215,u0!==0||S!==this.length-1?o0=H[6-v.length]+v+o0:o0=v+o0,M+=2,M>=26&&(M-=26,S--)}for(u0!==0&&(o0=u0.toString(16)+o0);o0.length%z!==0;)o0="0"+o0;return this.negative!==0&&(o0="-"+o0),o0}if(l0===(l0|0)&&l0>=2&&l0<=36){var s0=y0[l0],I=W[l0];o0="";var t0=this.clone();for(t0.negative=0;!t0.isZero();){var m0=t0.modn(I).toString(l0);t0=t0.idivn(I),t0.isZero()?o0=m0+o0:o0=H[s0-m0.length]+m0+o0}for(this.isZero()&&(o0="0"+o0);o0.length%z!==0;)o0="0"+o0;return this.negative!==0&&(o0="-"+o0),o0}Y(!1,"Base should be between 2 and 36")},Z.prototype.toNumber=function(){var l0=this.words[0];return this.length===2?l0+=this.words[1]*67108864:this.length===3&&this.words[2]===1?l0+=4503599627370496+this.words[1]*67108864:this.length>2&&Y(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-l0:l0},Z.prototype.toJSON=function(){return this.toString(16)},Z.prototype.toBuffer=function(l0,z){return Y(typeof Q<"u"),this.toArrayLike(Q,l0,z)},Z.prototype.toArray=function(l0,z){return this.toArrayLike(Array,l0,z)},Z.prototype.toArrayLike=function(l0,z,o0){var M=this.byteLength(),u0=o0||Math.max(1,M);Y(M<=u0,"byte array longer than desired length"),Y(u0>0,"Requested array length <= 0"),this.strip();var S=z==="le",n0=new l0(u0),v,s0,I=this.clone();if(S){for(s0=0;!I.isZero();s0++)v=I.andln(255),I.iushrn(8),n0[s0]=v;for(;s0=4096&&(o0+=13,z>>>=13),z>=64&&(o0+=7,z>>>=7),z>=8&&(o0+=4,z>>>=4),z>=2&&(o0+=2,z>>>=2),o0+z},Z.prototype._zeroBits=function(l0){if(l0===0)return 26;var z=l0,o0=0;return(z&8191)===0&&(o0+=13,z>>>=13),(z&127)===0&&(o0+=7,z>>>=7),(z&15)===0&&(o0+=4,z>>>=4),(z&3)===0&&(o0+=2,z>>>=2),(z&1)===0&&o0++,o0},Z.prototype.bitLength=function(){var l0=this.words[this.length-1],z=this._countBits(l0);return(this.length-1)*26+z};function w0(l0){for(var z=new Array(l0.bitLength()),o0=0;o0>>u0}return z}Z.prototype.zeroBits=function(){if(this.isZero())return 0;for(var l0=0,z=0;zl0.length?this.clone().ior(l0):l0.clone().ior(this)},Z.prototype.uor=function(l0){return this.length>l0.length?this.clone().iuor(l0):l0.clone().iuor(this)},Z.prototype.iuand=function(l0){var z;this.length>l0.length?z=l0:z=this;for(var o0=0;o0l0.length?this.clone().iand(l0):l0.clone().iand(this)},Z.prototype.uand=function(l0){return this.length>l0.length?this.clone().iuand(l0):l0.clone().iuand(this)},Z.prototype.iuxor=function(l0){var z,o0;this.length>l0.length?(z=this,o0=l0):(z=l0,o0=this);for(var M=0;Ml0.length?this.clone().ixor(l0):l0.clone().ixor(this)},Z.prototype.uxor=function(l0){return this.length>l0.length?this.clone().iuxor(l0):l0.clone().iuxor(this)},Z.prototype.inotn=function(l0){Y(typeof l0=="number"&&l0>=0);var z=Math.ceil(l0/26)|0,o0=l0%26;this._expand(z),o0>0&&z--;for(var M=0;M0&&(this.words[M]=~this.words[M]&67108863>>26-o0),this.strip()},Z.prototype.notn=function(l0){return this.clone().inotn(l0)},Z.prototype.setn=function(l0,z){Y(typeof l0=="number"&&l0>=0);var o0=l0/26|0,M=l0%26;return this._expand(o0+1),z?this.words[o0]=this.words[o0]|1<l0.length?(o0=this,M=l0):(o0=l0,M=this);for(var u0=0,S=0;S>>26;for(;u0!==0&&S>>26;if(this.length=o0.length,u0!==0)this.words[this.length]=u0,this.length++;else if(o0!==this)for(;Sl0.length?this.clone().iadd(l0):l0.clone().iadd(this)},Z.prototype.isub=function(l0){if(l0.negative!==0){l0.negative=0;var z=this.iadd(l0);return l0.negative=1,z._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(l0),this.negative=1,this._normSign();var o0=this.cmp(l0);if(o0===0)return this.negative=0,this.length=1,this.words[0]=0,this;var M,u0;o0>0?(M=this,u0=l0):(M=l0,u0=this);for(var S=0,n0=0;n0>26,this.words[n0]=z&67108863;for(;S!==0&&n0>26,this.words[n0]=z&67108863;if(S===0&&n0>>26,m0=s0&67108863,a0=Math.min(I,z.length-1),q=Math.max(0,I-l0.length+1);q<=a0;q++){var e0=I-q|0;u0=l0.words[e0]|0,S=z.words[q]|0,n0=u0*S+m0,t0+=n0/67108864|0,m0=n0&67108863}o0.words[I]=m0|0,s0=t0|0}return s0!==0?o0.words[I]=s0|0:o0.length--,o0.strip()}var p0=function(l0,z,o0){var M=l0.words,u0=z.words,S=o0.words,n0=0,v,s0,I,t0=M[0]|0,m0=t0&8191,a0=t0>>>13,q=M[1]|0,e0=q&8191,r0=q>>>13,i0=M[2]|0,j=i0&8191,$$=i0>>>13,k=M[3]|0,Q$=k&8191,g=k>>>13,Y$=M[4]|0,_=Y$&8191,Z$=Y$>>>13,N=M[5]|0,G$=N&8191,x=N>>>13,V$=M[6]|0,B=V$&8191,U$=V$>>>13,y=M[7]|0,X$=y&8191,w=y>>>13,K$=M[8]|0,p=K$&8191,I$=K$>>>13,f=M[9]|0,O$=f&8191,c=f>>>13,J$=u0[0]|0,h=J$&8191,F$=J$>>>13,d=u0[1]|0,A$=d&8191,b=d>>>13,H$=u0[2]|0,l=H$&8191,W$=H$>>>13,o=u0[3]|0,E$=o&8191,u=o>>>13,T$=u0[4]|0,n=T$&8191,D$=T$>>>13,s=u0[5]|0,C$=s&8191,t=s>>>13,L$=u0[6]|0,m=L$&8191,R$=L$>>>13,a=u0[7]|0,P$=a&8191,O=a>>>13,z$=u0[8]|0,e=z$&8191,M$=z$>>>13,J=u0[9]|0,S$=J&8191,F=J>>>13;o0.negative=l0.negative^z.negative,o0.length=19,v=Math.imul(m0,h),s0=Math.imul(m0,F$),s0=s0+Math.imul(a0,h)|0,I=Math.imul(a0,F$);var v$=(n0+v|0)+((s0&8191)<<13)|0;n0=(I+(s0>>>13)|0)+(v$>>>26)|0,v$&=67108863,v=Math.imul(e0,h),s0=Math.imul(e0,F$),s0=s0+Math.imul(r0,h)|0,I=Math.imul(r0,F$),v=v+Math.imul(m0,A$)|0,s0=s0+Math.imul(m0,b)|0,s0=s0+Math.imul(a0,A$)|0,I=I+Math.imul(a0,b)|0;var r=(n0+v|0)+((s0&8191)<<13)|0;n0=(I+(s0>>>13)|0)+(r>>>26)|0,r&=67108863,v=Math.imul(j,h),s0=Math.imul(j,F$),s0=s0+Math.imul($$,h)|0,I=Math.imul($$,F$),v=v+Math.imul(e0,A$)|0,s0=s0+Math.imul(e0,b)|0,s0=s0+Math.imul(r0,A$)|0,I=I+Math.imul(r0,b)|0,v=v+Math.imul(m0,l)|0,s0=s0+Math.imul(m0,W$)|0,s0=s0+Math.imul(a0,l)|0,I=I+Math.imul(a0,W$)|0;var q$=(n0+v|0)+((s0&8191)<<13)|0;n0=(I+(s0>>>13)|0)+(q$>>>26)|0,q$&=67108863,v=Math.imul(Q$,h),s0=Math.imul(Q$,F$),s0=s0+Math.imul(g,h)|0,I=Math.imul(g,F$),v=v+Math.imul(j,A$)|0,s0=s0+Math.imul(j,b)|0,s0=s0+Math.imul($$,A$)|0,I=I+Math.imul($$,b)|0,v=v+Math.imul(e0,l)|0,s0=s0+Math.imul(e0,W$)|0,s0=s0+Math.imul(r0,l)|0,I=I+Math.imul(r0,W$)|0,v=v+Math.imul(m0,E$)|0,s0=s0+Math.imul(m0,u)|0,s0=s0+Math.imul(a0,E$)|0,I=I+Math.imul(a0,u)|0;var i=(n0+v|0)+((s0&8191)<<13)|0;n0=(I+(s0>>>13)|0)+(i>>>26)|0,i&=67108863,v=Math.imul(_,h),s0=Math.imul(_,F$),s0=s0+Math.imul(Z$,h)|0,I=Math.imul(Z$,F$),v=v+Math.imul(Q$,A$)|0,s0=s0+Math.imul(Q$,b)|0,s0=s0+Math.imul(g,A$)|0,I=I+Math.imul(g,b)|0,v=v+Math.imul(j,l)|0,s0=s0+Math.imul(j,W$)|0,s0=s0+Math.imul($$,l)|0,I=I+Math.imul($$,W$)|0,v=v+Math.imul(e0,E$)|0,s0=s0+Math.imul(e0,u)|0,s0=s0+Math.imul(r0,E$)|0,I=I+Math.imul(r0,u)|0,v=v+Math.imul(m0,n)|0,s0=s0+Math.imul(m0,D$)|0,s0=s0+Math.imul(a0,n)|0,I=I+Math.imul(a0,D$)|0;var j$=(n0+v|0)+((s0&8191)<<13)|0;n0=(I+(s0>>>13)|0)+(j$>>>26)|0,j$&=67108863,v=Math.imul(G$,h),s0=Math.imul(G$,F$),s0=s0+Math.imul(x,h)|0,I=Math.imul(x,F$),v=v+Math.imul(_,A$)|0,s0=s0+Math.imul(_,b)|0,s0=s0+Math.imul(Z$,A$)|0,I=I+Math.imul(Z$,b)|0,v=v+Math.imul(Q$,l)|0,s0=s0+Math.imul(Q$,W$)|0,s0=s0+Math.imul(g,l)|0,I=I+Math.imul(g,W$)|0,v=v+Math.imul(j,E$)|0,s0=s0+Math.imul(j,u)|0,s0=s0+Math.imul($$,E$)|0,I=I+Math.imul($$,u)|0,v=v+Math.imul(e0,n)|0,s0=s0+Math.imul(e0,D$)|0,s0=s0+Math.imul(r0,n)|0,I=I+Math.imul(r0,D$)|0,v=v+Math.imul(m0,C$)|0,s0=s0+Math.imul(m0,t)|0,s0=s0+Math.imul(a0,C$)|0,I=I+Math.imul(a0,t)|0;var k$=(n0+v|0)+((s0&8191)<<13)|0;n0=(I+(s0>>>13)|0)+(k$>>>26)|0,k$&=67108863,v=Math.imul(B,h),s0=Math.imul(B,F$),s0=s0+Math.imul(U$,h)|0,I=Math.imul(U$,F$),v=v+Math.imul(G$,A$)|0,s0=s0+Math.imul(G$,b)|0,s0=s0+Math.imul(x,A$)|0,I=I+Math.imul(x,b)|0,v=v+Math.imul(_,l)|0,s0=s0+Math.imul(_,W$)|0,s0=s0+Math.imul(Z$,l)|0,I=I+Math.imul(Z$,W$)|0,v=v+Math.imul(Q$,E$)|0,s0=s0+Math.imul(Q$,u)|0,s0=s0+Math.imul(g,E$)|0,I=I+Math.imul(g,u)|0,v=v+Math.imul(j,n)|0,s0=s0+Math.imul(j,D$)|0,s0=s0+Math.imul($$,n)|0,I=I+Math.imul($$,D$)|0,v=v+Math.imul(e0,C$)|0,s0=s0+Math.imul(e0,t)|0,s0=s0+Math.imul(r0,C$)|0,I=I+Math.imul(r0,t)|0,v=v+Math.imul(m0,m)|0,s0=s0+Math.imul(m0,R$)|0,s0=s0+Math.imul(a0,m)|0,I=I+Math.imul(a0,R$)|0;var g$=(n0+v|0)+((s0&8191)<<13)|0;n0=(I+(s0>>>13)|0)+(g$>>>26)|0,g$&=67108863,v=Math.imul(X$,h),s0=Math.imul(X$,F$),s0=s0+Math.imul(w,h)|0,I=Math.imul(w,F$),v=v+Math.imul(B,A$)|0,s0=s0+Math.imul(B,b)|0,s0=s0+Math.imul(U$,A$)|0,I=I+Math.imul(U$,b)|0,v=v+Math.imul(G$,l)|0,s0=s0+Math.imul(G$,W$)|0,s0=s0+Math.imul(x,l)|0,I=I+Math.imul(x,W$)|0,v=v+Math.imul(_,E$)|0,s0=s0+Math.imul(_,u)|0,s0=s0+Math.imul(Z$,E$)|0,I=I+Math.imul(Z$,u)|0,v=v+Math.imul(Q$,n)|0,s0=s0+Math.imul(Q$,D$)|0,s0=s0+Math.imul(g,n)|0,I=I+Math.imul(g,D$)|0,v=v+Math.imul(j,C$)|0,s0=s0+Math.imul(j,t)|0,s0=s0+Math.imul($$,C$)|0,I=I+Math.imul($$,t)|0,v=v+Math.imul(e0,m)|0,s0=s0+Math.imul(e0,R$)|0,s0=s0+Math.imul(r0,m)|0,I=I+Math.imul(r0,R$)|0,v=v+Math.imul(m0,P$)|0,s0=s0+Math.imul(m0,O)|0,s0=s0+Math.imul(a0,P$)|0,I=I+Math.imul(a0,O)|0;var _$=(n0+v|0)+((s0&8191)<<13)|0;n0=(I+(s0>>>13)|0)+(_$>>>26)|0,_$&=67108863,v=Math.imul(p,h),s0=Math.imul(p,F$),s0=s0+Math.imul(I$,h)|0,I=Math.imul(I$,F$),v=v+Math.imul(X$,A$)|0,s0=s0+Math.imul(X$,b)|0,s0=s0+Math.imul(w,A$)|0,I=I+Math.imul(w,b)|0,v=v+Math.imul(B,l)|0,s0=s0+Math.imul(B,W$)|0,s0=s0+Math.imul(U$,l)|0,I=I+Math.imul(U$,W$)|0,v=v+Math.imul(G$,E$)|0,s0=s0+Math.imul(G$,u)|0,s0=s0+Math.imul(x,E$)|0,I=I+Math.imul(x,u)|0,v=v+Math.imul(_,n)|0,s0=s0+Math.imul(_,D$)|0,s0=s0+Math.imul(Z$,n)|0,I=I+Math.imul(Z$,D$)|0,v=v+Math.imul(Q$,C$)|0,s0=s0+Math.imul(Q$,t)|0,s0=s0+Math.imul(g,C$)|0,I=I+Math.imul(g,t)|0,v=v+Math.imul(j,m)|0,s0=s0+Math.imul(j,R$)|0,s0=s0+Math.imul($$,m)|0,I=I+Math.imul($$,R$)|0,v=v+Math.imul(e0,P$)|0,s0=s0+Math.imul(e0,O)|0,s0=s0+Math.imul(r0,P$)|0,I=I+Math.imul(r0,O)|0,v=v+Math.imul(m0,e)|0,s0=s0+Math.imul(m0,M$)|0,s0=s0+Math.imul(a0,e)|0,I=I+Math.imul(a0,M$)|0;var N$=(n0+v|0)+((s0&8191)<<13)|0;n0=(I+(s0>>>13)|0)+(N$>>>26)|0,N$&=67108863,v=Math.imul(O$,h),s0=Math.imul(O$,F$),s0=s0+Math.imul(c,h)|0,I=Math.imul(c,F$),v=v+Math.imul(p,A$)|0,s0=s0+Math.imul(p,b)|0,s0=s0+Math.imul(I$,A$)|0,I=I+Math.imul(I$,b)|0,v=v+Math.imul(X$,l)|0,s0=s0+Math.imul(X$,W$)|0,s0=s0+Math.imul(w,l)|0,I=I+Math.imul(w,W$)|0,v=v+Math.imul(B,E$)|0,s0=s0+Math.imul(B,u)|0,s0=s0+Math.imul(U$,E$)|0,I=I+Math.imul(U$,u)|0,v=v+Math.imul(G$,n)|0,s0=s0+Math.imul(G$,D$)|0,s0=s0+Math.imul(x,n)|0,I=I+Math.imul(x,D$)|0,v=v+Math.imul(_,C$)|0,s0=s0+Math.imul(_,t)|0,s0=s0+Math.imul(Z$,C$)|0,I=I+Math.imul(Z$,t)|0,v=v+Math.imul(Q$,m)|0,s0=s0+Math.imul(Q$,R$)|0,s0=s0+Math.imul(g,m)|0,I=I+Math.imul(g,R$)|0,v=v+Math.imul(j,P$)|0,s0=s0+Math.imul(j,O)|0,s0=s0+Math.imul($$,P$)|0,I=I+Math.imul($$,O)|0,v=v+Math.imul(e0,e)|0,s0=s0+Math.imul(e0,M$)|0,s0=s0+Math.imul(r0,e)|0,I=I+Math.imul(r0,M$)|0,v=v+Math.imul(m0,S$)|0,s0=s0+Math.imul(m0,F)|0,s0=s0+Math.imul(a0,S$)|0,I=I+Math.imul(a0,F)|0;var $0=(n0+v|0)+((s0&8191)<<13)|0;n0=(I+(s0>>>13)|0)+($0>>>26)|0,$0&=67108863,v=Math.imul(O$,A$),s0=Math.imul(O$,b),s0=s0+Math.imul(c,A$)|0,I=Math.imul(c,b),v=v+Math.imul(p,l)|0,s0=s0+Math.imul(p,W$)|0,s0=s0+Math.imul(I$,l)|0,I=I+Math.imul(I$,W$)|0,v=v+Math.imul(X$,E$)|0,s0=s0+Math.imul(X$,u)|0,s0=s0+Math.imul(w,E$)|0,I=I+Math.imul(w,u)|0,v=v+Math.imul(B,n)|0,s0=s0+Math.imul(B,D$)|0,s0=s0+Math.imul(U$,n)|0,I=I+Math.imul(U$,D$)|0,v=v+Math.imul(G$,C$)|0,s0=s0+Math.imul(G$,t)|0,s0=s0+Math.imul(x,C$)|0,I=I+Math.imul(x,t)|0,v=v+Math.imul(_,m)|0,s0=s0+Math.imul(_,R$)|0,s0=s0+Math.imul(Z$,m)|0,I=I+Math.imul(Z$,R$)|0,v=v+Math.imul(Q$,P$)|0,s0=s0+Math.imul(Q$,O)|0,s0=s0+Math.imul(g,P$)|0,I=I+Math.imul(g,O)|0,v=v+Math.imul(j,e)|0,s0=s0+Math.imul(j,M$)|0,s0=s0+Math.imul($$,e)|0,I=I+Math.imul($$,M$)|0,v=v+Math.imul(e0,S$)|0,s0=s0+Math.imul(e0,F)|0,s0=s0+Math.imul(r0,S$)|0,I=I+Math.imul(r0,F)|0;var x$=(n0+v|0)+((s0&8191)<<13)|0;n0=(I+(s0>>>13)|0)+(x$>>>26)|0,x$&=67108863,v=Math.imul(O$,l),s0=Math.imul(O$,W$),s0=s0+Math.imul(c,l)|0,I=Math.imul(c,W$),v=v+Math.imul(p,E$)|0,s0=s0+Math.imul(p,u)|0,s0=s0+Math.imul(I$,E$)|0,I=I+Math.imul(I$,u)|0,v=v+Math.imul(X$,n)|0,s0=s0+Math.imul(X$,D$)|0,s0=s0+Math.imul(w,n)|0,I=I+Math.imul(w,D$)|0,v=v+Math.imul(B,C$)|0,s0=s0+Math.imul(B,t)|0,s0=s0+Math.imul(U$,C$)|0,I=I+Math.imul(U$,t)|0,v=v+Math.imul(G$,m)|0,s0=s0+Math.imul(G$,R$)|0,s0=s0+Math.imul(x,m)|0,I=I+Math.imul(x,R$)|0,v=v+Math.imul(_,P$)|0,s0=s0+Math.imul(_,O)|0,s0=s0+Math.imul(Z$,P$)|0,I=I+Math.imul(Z$,O)|0,v=v+Math.imul(Q$,e)|0,s0=s0+Math.imul(Q$,M$)|0,s0=s0+Math.imul(g,e)|0,I=I+Math.imul(g,M$)|0,v=v+Math.imul(j,S$)|0,s0=s0+Math.imul(j,F)|0,s0=s0+Math.imul($$,S$)|0,I=I+Math.imul($$,F)|0;var Q0=(n0+v|0)+((s0&8191)<<13)|0;n0=(I+(s0>>>13)|0)+(Q0>>>26)|0,Q0&=67108863,v=Math.imul(O$,E$),s0=Math.imul(O$,u),s0=s0+Math.imul(c,E$)|0,I=Math.imul(c,u),v=v+Math.imul(p,n)|0,s0=s0+Math.imul(p,D$)|0,s0=s0+Math.imul(I$,n)|0,I=I+Math.imul(I$,D$)|0,v=v+Math.imul(X$,C$)|0,s0=s0+Math.imul(X$,t)|0,s0=s0+Math.imul(w,C$)|0,I=I+Math.imul(w,t)|0,v=v+Math.imul(B,m)|0,s0=s0+Math.imul(B,R$)|0,s0=s0+Math.imul(U$,m)|0,I=I+Math.imul(U$,R$)|0,v=v+Math.imul(G$,P$)|0,s0=s0+Math.imul(G$,O)|0,s0=s0+Math.imul(x,P$)|0,I=I+Math.imul(x,O)|0,v=v+Math.imul(_,e)|0,s0=s0+Math.imul(_,M$)|0,s0=s0+Math.imul(Z$,e)|0,I=I+Math.imul(Z$,M$)|0,v=v+Math.imul(Q$,S$)|0,s0=s0+Math.imul(Q$,F)|0,s0=s0+Math.imul(g,S$)|0,I=I+Math.imul(g,F)|0;var B$=(n0+v|0)+((s0&8191)<<13)|0;n0=(I+(s0>>>13)|0)+(B$>>>26)|0,B$&=67108863,v=Math.imul(O$,n),s0=Math.imul(O$,D$),s0=s0+Math.imul(c,n)|0,I=Math.imul(c,D$),v=v+Math.imul(p,C$)|0,s0=s0+Math.imul(p,t)|0,s0=s0+Math.imul(I$,C$)|0,I=I+Math.imul(I$,t)|0,v=v+Math.imul(X$,m)|0,s0=s0+Math.imul(X$,R$)|0,s0=s0+Math.imul(w,m)|0,I=I+Math.imul(w,R$)|0,v=v+Math.imul(B,P$)|0,s0=s0+Math.imul(B,O)|0,s0=s0+Math.imul(U$,P$)|0,I=I+Math.imul(U$,O)|0,v=v+Math.imul(G$,e)|0,s0=s0+Math.imul(G$,M$)|0,s0=s0+Math.imul(x,e)|0,I=I+Math.imul(x,M$)|0,v=v+Math.imul(_,S$)|0,s0=s0+Math.imul(_,F)|0,s0=s0+Math.imul(Z$,S$)|0,I=I+Math.imul(Z$,F)|0;var Y0=(n0+v|0)+((s0&8191)<<13)|0;n0=(I+(s0>>>13)|0)+(Y0>>>26)|0,Y0&=67108863,v=Math.imul(O$,C$),s0=Math.imul(O$,t),s0=s0+Math.imul(c,C$)|0,I=Math.imul(c,t),v=v+Math.imul(p,m)|0,s0=s0+Math.imul(p,R$)|0,s0=s0+Math.imul(I$,m)|0,I=I+Math.imul(I$,R$)|0,v=v+Math.imul(X$,P$)|0,s0=s0+Math.imul(X$,O)|0,s0=s0+Math.imul(w,P$)|0,I=I+Math.imul(w,O)|0,v=v+Math.imul(B,e)|0,s0=s0+Math.imul(B,M$)|0,s0=s0+Math.imul(U$,e)|0,I=I+Math.imul(U$,M$)|0,v=v+Math.imul(G$,S$)|0,s0=s0+Math.imul(G$,F)|0,s0=s0+Math.imul(x,S$)|0,I=I+Math.imul(x,F)|0;var y$=(n0+v|0)+((s0&8191)<<13)|0;n0=(I+(s0>>>13)|0)+(y$>>>26)|0,y$&=67108863,v=Math.imul(O$,m),s0=Math.imul(O$,R$),s0=s0+Math.imul(c,m)|0,I=Math.imul(c,R$),v=v+Math.imul(p,P$)|0,s0=s0+Math.imul(p,O)|0,s0=s0+Math.imul(I$,P$)|0,I=I+Math.imul(I$,O)|0,v=v+Math.imul(X$,e)|0,s0=s0+Math.imul(X$,M$)|0,s0=s0+Math.imul(w,e)|0,I=I+Math.imul(w,M$)|0,v=v+Math.imul(B,S$)|0,s0=s0+Math.imul(B,F)|0,s0=s0+Math.imul(U$,S$)|0,I=I+Math.imul(U$,F)|0;var Z0=(n0+v|0)+((s0&8191)<<13)|0;n0=(I+(s0>>>13)|0)+(Z0>>>26)|0,Z0&=67108863,v=Math.imul(O$,P$),s0=Math.imul(O$,O),s0=s0+Math.imul(c,P$)|0,I=Math.imul(c,O),v=v+Math.imul(p,e)|0,s0=s0+Math.imul(p,M$)|0,s0=s0+Math.imul(I$,e)|0,I=I+Math.imul(I$,M$)|0,v=v+Math.imul(X$,S$)|0,s0=s0+Math.imul(X$,F)|0,s0=s0+Math.imul(w,S$)|0,I=I+Math.imul(w,F)|0;var w$=(n0+v|0)+((s0&8191)<<13)|0;n0=(I+(s0>>>13)|0)+(w$>>>26)|0,w$&=67108863,v=Math.imul(O$,e),s0=Math.imul(O$,M$),s0=s0+Math.imul(c,e)|0,I=Math.imul(c,M$),v=v+Math.imul(p,S$)|0,s0=s0+Math.imul(p,F)|0,s0=s0+Math.imul(I$,S$)|0,I=I+Math.imul(I$,F)|0;var G0=(n0+v|0)+((s0&8191)<<13)|0;n0=(I+(s0>>>13)|0)+(G0>>>26)|0,G0&=67108863,v=Math.imul(O$,S$),s0=Math.imul(O$,F),s0=s0+Math.imul(c,S$)|0,I=Math.imul(c,F);var p$=(n0+v|0)+((s0&8191)<<13)|0;return n0=(I+(s0>>>13)|0)+(p$>>>26)|0,p$&=67108863,S[0]=v$,S[1]=r,S[2]=q$,S[3]=i,S[4]=j$,S[5]=k$,S[6]=g$,S[7]=_$,S[8]=N$,S[9]=$0,S[10]=x$,S[11]=Q0,S[12]=B$,S[13]=Y0,S[14]=y$,S[15]=Z0,S[16]=w$,S[17]=G0,S[18]=p$,n0!==0&&(S[19]=n0,o0.length++),o0};Math.imul||(p0=E);function T(l0,z,o0){o0.negative=z.negative^l0.negative,o0.length=l0.length+z.length;for(var M=0,u0=0,S=0;S>>26)|0,u0+=n0>>>26,n0&=67108863}o0.words[S]=v,M=n0,n0=u0}return M!==0?o0.words[S]=M:o0.length--,o0.strip()}function f0(l0,z,o0){var M=new D;return M.mulp(l0,z,o0)}Z.prototype.mulTo=function(l0,z){var o0,M=this.length+l0.length;return this.length===10&&l0.length===10?o0=p0(this,l0,z):M<63?o0=E(this,l0,z):M<1024?o0=T(this,l0,z):o0=f0(this,l0,z),o0};function D(l0,z){this.x=l0,this.y=z}D.prototype.makeRBT=function(l0){for(var z=new Array(l0),o0=Z.prototype._countBits(l0)-1,M=0;M>=1;return M},D.prototype.permute=function(l0,z,o0,M,u0,S){for(var n0=0;n0>>1)u0++;return 1<>>13,o0[2*S+1]=u0&8191,u0=u0>>>13;for(S=2*z;S>=26,z+=M/67108864|0,z+=u0>>>26,this.words[o0]=u0&67108863}return z!==0&&(this.words[o0]=z,this.length++),this},Z.prototype.muln=function(l0){return this.clone().imuln(l0)},Z.prototype.sqr=function(){return this.mul(this)},Z.prototype.isqr=function(){return this.imul(this.clone())},Z.prototype.pow=function(l0){var z=w0(l0);if(z.length===0)return new Z(1);for(var o0=this,M=0;M=0);var z=l0%26,o0=(l0-z)/26,M=67108863>>>26-z<<26-z,u0;if(z!==0){var S=0;for(u0=0;u0>>26-z}S&&(this.words[u0]=S,this.length++)}if(o0!==0){for(u0=this.length-1;u0>=0;u0--)this.words[u0+o0]=this.words[u0];for(u0=0;u0=0);var M;z?M=(z-z%26)/26:M=0;var u0=l0%26,S=Math.min((l0-u0)/26,this.length),n0=67108863^67108863>>>u0<S)for(this.length-=S,s0=0;s0=0&&(I!==0||s0>=M);s0--){var t0=this.words[s0]|0;this.words[s0]=I<<26-u0|t0>>>u0,I=t0&n0}return v&&I!==0&&(v.words[v.length++]=I),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},Z.prototype.ishrn=function(l0,z,o0){return Y(this.negative===0),this.iushrn(l0,z,o0)},Z.prototype.shln=function(l0){return this.clone().ishln(l0)},Z.prototype.ushln=function(l0){return this.clone().iushln(l0)},Z.prototype.shrn=function(l0){return this.clone().ishrn(l0)},Z.prototype.ushrn=function(l0){return this.clone().iushrn(l0)},Z.prototype.testn=function(l0){Y(typeof l0=="number"&&l0>=0);var z=l0%26,o0=(l0-z)/26,M=1<=0);var z=l0%26,o0=(l0-z)/26;if(Y(this.negative===0,"imaskn works only with positive numbers"),this.length<=o0)return this;if(z!==0&&o0++,this.length=Math.min(o0,this.length),z!==0){var M=67108863^67108863>>>z<=67108864;z++)this.words[z]-=67108864,z===this.length-1?this.words[z+1]=1:this.words[z+1]++;return this.length=Math.max(this.length,z+1),this},Z.prototype.isubn=function(l0){if(Y(typeof l0=="number"),Y(l0<67108864),l0<0)return this.iaddn(-l0);if(this.negative!==0)return this.negative=0,this.iaddn(l0),this.negative=1,this;if(this.words[0]-=l0,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var z=0;z>26)-(v/67108864|0),this.words[u0+o0]=S&67108863}for(;u0>26,this.words[u0+o0]=S&67108863;if(n0===0)return this.strip();for(Y(n0===-1),n0=0,u0=0;u0>26,this.words[u0]=S&67108863;return this.negative=1,this.strip()},Z.prototype._wordDiv=function(l0,z){var o0=this.length-l0.length,M=this.clone(),u0=l0,S=u0.words[u0.length-1]|0,n0=this._countBits(S);o0=26-n0,o0!==0&&(u0=u0.ushln(o0),M.iushln(o0),S=u0.words[u0.length-1]|0);var v=M.length-u0.length,s0;if(z!=="mod"){s0=new Z(null),s0.length=v+1,s0.words=new Array(s0.length);for(var I=0;I=0;m0--){var a0=(M.words[u0.length+m0]|0)*67108864+(M.words[u0.length+m0-1]|0);for(a0=Math.min(a0/S|0,67108863),M._ishlnsubmul(u0,a0,m0);M.negative!==0;)a0--,M.negative=0,M._ishlnsubmul(u0,1,m0),M.isZero()||(M.negative^=1);s0&&(s0.words[m0]=a0)}return s0&&s0.strip(),M.strip(),z!=="div"&&o0!==0&&M.iushrn(o0),{div:s0||null,mod:M}},Z.prototype.divmod=function(l0,z,o0){if(Y(!l0.isZero()),this.isZero())return{div:new Z(0),mod:new Z(0)};var M,u0,S;return this.negative!==0&&l0.negative===0?(S=this.neg().divmod(l0,z),z!=="mod"&&(M=S.div.neg()),z!=="div"&&(u0=S.mod.neg(),o0&&u0.negative!==0&&u0.iadd(l0)),{div:M,mod:u0}):this.negative===0&&l0.negative!==0?(S=this.divmod(l0.neg(),z),z!=="mod"&&(M=S.div.neg()),{div:M,mod:S.mod}):(this.negative&l0.negative)!==0?(S=this.neg().divmod(l0.neg(),z),z!=="div"&&(u0=S.mod.neg(),o0&&u0.negative!==0&&u0.isub(l0)),{div:S.div,mod:u0}):l0.length>this.length||this.cmp(l0)<0?{div:new Z(0),mod:this}:l0.length===1?z==="div"?{div:this.divn(l0.words[0]),mod:null}:z==="mod"?{div:null,mod:new Z(this.modn(l0.words[0]))}:{div:this.divn(l0.words[0]),mod:new Z(this.modn(l0.words[0]))}:this._wordDiv(l0,z)},Z.prototype.div=function(l0){return this.divmod(l0,"div",!1).div},Z.prototype.mod=function(l0){return this.divmod(l0,"mod",!1).mod},Z.prototype.umod=function(l0){return this.divmod(l0,"mod",!0).mod},Z.prototype.divRound=function(l0){var z=this.divmod(l0);if(z.mod.isZero())return z.div;var o0=z.div.negative!==0?z.mod.isub(l0):z.mod,M=l0.ushrn(1),u0=l0.andln(1),S=o0.cmp(M);return S<0||u0===1&&S===0?z.div:z.div.negative!==0?z.div.isubn(1):z.div.iaddn(1)},Z.prototype.modn=function(l0){Y(l0<=67108863);for(var z=(1<<26)%l0,o0=0,M=this.length-1;M>=0;M--)o0=(z*o0+(this.words[M]|0))%l0;return o0},Z.prototype.idivn=function(l0){Y(l0<=67108863);for(var z=0,o0=this.length-1;o0>=0;o0--){var M=(this.words[o0]|0)+z*67108864;this.words[o0]=M/l0|0,z=M%l0}return this.strip()},Z.prototype.divn=function(l0){return this.clone().idivn(l0)},Z.prototype.egcd=function(l0){Y(l0.negative===0),Y(!l0.isZero());var z=this,o0=l0.clone();z.negative!==0?z=z.umod(l0):z=z.clone();for(var M=new Z(1),u0=new Z(0),S=new Z(0),n0=new Z(1),v=0;z.isEven()&&o0.isEven();)z.iushrn(1),o0.iushrn(1),++v;for(var s0=o0.clone(),I=z.clone();!z.isZero();){for(var t0=0,m0=1;(z.words[0]&m0)===0&&t0<26;++t0,m0<<=1);if(t0>0)for(z.iushrn(t0);t0-- >0;)(M.isOdd()||u0.isOdd())&&(M.iadd(s0),u0.isub(I)),M.iushrn(1),u0.iushrn(1);for(var a0=0,q=1;(o0.words[0]&q)===0&&a0<26;++a0,q<<=1);if(a0>0)for(o0.iushrn(a0);a0-- >0;)(S.isOdd()||n0.isOdd())&&(S.iadd(s0),n0.isub(I)),S.iushrn(1),n0.iushrn(1);z.cmp(o0)>=0?(z.isub(o0),M.isub(S),u0.isub(n0)):(o0.isub(z),S.isub(M),n0.isub(u0))}return{a:S,b:n0,gcd:o0.iushln(v)}},Z.prototype._invmp=function(l0){Y(l0.negative===0),Y(!l0.isZero());var z=this,o0=l0.clone();z.negative!==0?z=z.umod(l0):z=z.clone();for(var M=new Z(1),u0=new Z(0),S=o0.clone();z.cmpn(1)>0&&o0.cmpn(1)>0;){for(var n0=0,v=1;(z.words[0]&v)===0&&n0<26;++n0,v<<=1);if(n0>0)for(z.iushrn(n0);n0-- >0;)M.isOdd()&&M.iadd(S),M.iushrn(1);for(var s0=0,I=1;(o0.words[0]&I)===0&&s0<26;++s0,I<<=1);if(s0>0)for(o0.iushrn(s0);s0-- >0;)u0.isOdd()&&u0.iadd(S),u0.iushrn(1);z.cmp(o0)>=0?(z.isub(o0),M.isub(u0)):(o0.isub(z),u0.isub(M))}var t0;return z.cmpn(1)===0?t0=M:t0=u0,t0.cmpn(0)<0&&t0.iadd(l0),t0},Z.prototype.gcd=function(l0){if(this.isZero())return l0.abs();if(l0.isZero())return this.abs();var z=this.clone(),o0=l0.clone();z.negative=0,o0.negative=0;for(var M=0;z.isEven()&&o0.isEven();M++)z.iushrn(1),o0.iushrn(1);do{for(;z.isEven();)z.iushrn(1);for(;o0.isEven();)o0.iushrn(1);var u0=z.cmp(o0);if(u0<0){var S=z;z=o0,o0=S}else if(u0===0||o0.cmpn(1)===0)break;z.isub(o0)}while(!0);return o0.iushln(M)},Z.prototype.invm=function(l0){return this.egcd(l0).a.umod(l0)},Z.prototype.isEven=function(){return(this.words[0]&1)===0},Z.prototype.isOdd=function(){return(this.words[0]&1)===1},Z.prototype.andln=function(l0){return this.words[0]&l0},Z.prototype.bincn=function(l0){Y(typeof l0=="number");var z=l0%26,o0=(l0-z)/26,M=1<>>26,n0&=67108863,this.words[S]=n0}return u0!==0&&(this.words[S]=u0,this.length++),this},Z.prototype.isZero=function(){return this.length===1&&this.words[0]===0},Z.prototype.cmpn=function(l0){var z=l0<0;if(this.negative!==0&&!z)return-1;if(this.negative===0&&z)return 1;this.strip();var o0;if(this.length>1)o0=1;else{z&&(l0=-l0),Y(l0<=67108863,"Number is too big");var M=this.words[0]|0;o0=M===l0?0:Ml0.length)return 1;if(this.length=0;o0--){var M=this.words[o0]|0,u0=l0.words[o0]|0;if(M!==u0){Mu0&&(z=1);break}}return z},Z.prototype.gtn=function(l0){return this.cmpn(l0)===1},Z.prototype.gt=function(l0){return this.cmp(l0)===1},Z.prototype.gten=function(l0){return this.cmpn(l0)>=0},Z.prototype.gte=function(l0){return this.cmp(l0)>=0},Z.prototype.ltn=function(l0){return this.cmpn(l0)===-1},Z.prototype.lt=function(l0){return this.cmp(l0)===-1},Z.prototype.lten=function(l0){return this.cmpn(l0)<=0},Z.prototype.lte=function(l0){return this.cmp(l0)<=0},Z.prototype.eqn=function(l0){return this.cmpn(l0)===0},Z.prototype.eq=function(l0){return this.cmp(l0)===0},Z.red=function(l0){return new b0(l0)},Z.prototype.toRed=function(l0){return Y(!this.red,"Already a number in reduction context"),Y(this.negative===0,"red works only with positives"),l0.convertTo(this)._forceRed(l0)},Z.prototype.fromRed=function(){return Y(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},Z.prototype._forceRed=function(l0){return this.red=l0,this},Z.prototype.forceRed=function(l0){return Y(!this.red,"Already a number in reduction context"),this._forceRed(l0)},Z.prototype.redAdd=function(l0){return Y(this.red,"redAdd works only with red numbers"),this.red.add(this,l0)},Z.prototype.redIAdd=function(l0){return Y(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,l0)},Z.prototype.redSub=function(l0){return Y(this.red,"redSub works only with red numbers"),this.red.sub(this,l0)},Z.prototype.redISub=function(l0){return Y(this.red,"redISub works only with red numbers"),this.red.isub(this,l0)},Z.prototype.redShl=function(l0){return Y(this.red,"redShl works only with red numbers"),this.red.shl(this,l0)},Z.prototype.redMul=function(l0){return Y(this.red,"redMul works only with red numbers"),this.red._verify2(this,l0),this.red.mul(this,l0)},Z.prototype.redIMul=function(l0){return Y(this.red,"redMul works only with red numbers"),this.red._verify2(this,l0),this.red.imul(this,l0)},Z.prototype.redSqr=function(){return Y(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},Z.prototype.redISqr=function(){return Y(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},Z.prototype.redSqrt=function(){return Y(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},Z.prototype.redInvm=function(){return Y(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},Z.prototype.redNeg=function(){return Y(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},Z.prototype.redPow=function(l0){return Y(this.red&&!l0.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,l0)};var c0={k256:null,p224:null,p192:null,p25519:null};function C(l0,z){this.name=l0,this.p=new Z(z,16),this.n=this.p.bitLength(),this.k=new Z(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}C.prototype._tmp=function(){var l0=new Z(null);return l0.words=new Array(Math.ceil(this.n/13)),l0},C.prototype.ireduce=function(l0){var z=l0,o0;do this.split(z,this.tmp),z=this.imulK(z),z=z.iadd(this.tmp),o0=z.bitLength();while(o0>this.n);var M=o00?z.isub(this.p):z.strip!==void 0?z.strip():z._strip(),z},C.prototype.split=function(l0,z){l0.iushrn(this.n,0,z)},C.prototype.imulK=function(l0){return l0.imul(this.k)};function h0(){C.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}$(h0,C),h0.prototype.split=function(l0,z){for(var o0=4194303,M=Math.min(l0.length,9),u0=0;u0>>22,S=n0}S>>>=22,l0.words[u0-10]=S,S===0&&l0.length>10?l0.length-=10:l0.length-=9},h0.prototype.imulK=function(l0){l0.words[l0.length]=0,l0.words[l0.length+1]=0,l0.length+=2;for(var z=0,o0=0;o0>>=26,l0.words[o0]=u0,z=M}return z!==0&&(l0.words[l0.length++]=z),l0},Z._prime=function(l0){if(c0[l0])return c0[l0];var z;if(l0==="k256")z=new h0;else if(l0==="p224")z=new L;else if(l0==="p192")z=new d0;else if(l0==="p25519")z=new R;else throw new Error("Unknown prime "+l0);return c0[l0]=z,z};function b0(l0){if(typeof l0=="string"){var z=Z._prime(l0);this.m=z.p,this.prime=z}else Y(l0.gtn(1),"modulus must be greater than 1"),this.m=l0,this.prime=null}b0.prototype._verify1=function(l0){Y(l0.negative===0,"red works only with positives"),Y(l0.red,"red works only with red numbers")},b0.prototype._verify2=function(l0,z){Y((l0.negative|z.negative)===0,"red works only with positives"),Y(l0.red&&l0.red===z.red,"red works only with red numbers")},b0.prototype.imod=function(l0){return this.prime?this.prime.ireduce(l0)._forceRed(this):l0.umod(this.m)._forceRed(this)},b0.prototype.neg=function(l0){return l0.isZero()?l0.clone():this.m.sub(l0)._forceRed(this)},b0.prototype.add=function(l0,z){this._verify2(l0,z);var o0=l0.add(z);return o0.cmp(this.m)>=0&&o0.isub(this.m),o0._forceRed(this)},b0.prototype.iadd=function(l0,z){this._verify2(l0,z);var o0=l0.iadd(z);return o0.cmp(this.m)>=0&&o0.isub(this.m),o0},b0.prototype.sub=function(l0,z){this._verify2(l0,z);var o0=l0.sub(z);return o0.cmpn(0)<0&&o0.iadd(this.m),o0._forceRed(this)},b0.prototype.isub=function(l0,z){this._verify2(l0,z);var o0=l0.isub(z);return o0.cmpn(0)<0&&o0.iadd(this.m),o0},b0.prototype.shl=function(l0,z){return this._verify1(l0),this.imod(l0.ushln(z))},b0.prototype.imul=function(l0,z){return this._verify2(l0,z),this.imod(l0.imul(z))},b0.prototype.mul=function(l0,z){return this._verify2(l0,z),this.imod(l0.mul(z))},b0.prototype.isqr=function(l0){return this.imul(l0,l0.clone())},b0.prototype.sqr=function(l0){return this.mul(l0,l0)},b0.prototype.sqrt=function(l0){if(l0.isZero())return l0.clone();var z=this.m.andln(3);if(Y(z%2===1),z===3){var o0=this.m.add(new Z(1)).iushrn(2);return this.pow(l0,o0)}for(var M=this.m.subn(1),u0=0;!M.isZero()&&M.andln(1)===0;)u0++,M.iushrn(1);Y(!M.isZero());var S=new Z(1).toRed(this),n0=S.redNeg(),v=this.m.subn(1).iushrn(1),s0=this.m.bitLength();for(s0=new Z(2*s0*s0).toRed(this);this.pow(s0,v).cmp(n0)!==0;)s0.redIAdd(n0);for(var I=this.pow(s0,M),t0=this.pow(l0,M.addn(1).iushrn(1)),m0=this.pow(l0,M),a0=u0;m0.cmp(S)!==0;){for(var q=m0,e0=0;q.cmp(S)!==0;e0++)q=q.redSqr();Y(e0=0;u0--){for(var I=z.words[u0],t0=s0-1;t0>=0;t0--){var m0=I>>t0&1;if(S!==M[0]&&(S=this.sqr(S)),m0===0&&n0===0){v=0;continue}n0<<=1,n0|=m0,v++,!(v!==o0&&(u0!==0||t0!==0))&&(S=this.mul(S,M[n0]),v=0,n0=0)}s0=26}return S},b0.prototype.convertTo=function(l0){var z=l0.umod(this.m);return z===l0?z.clone():z},b0.prototype.convertFrom=function(l0){var z=l0.clone();return z.red=null,z},Z.mont=function(l0){return new P(l0)};function P(l0){b0.call(this,l0),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new Z(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}$(P,b0),P.prototype.convertTo=function(l0){return this.imod(l0.ushln(this.shift))},P.prototype.convertFrom=function(l0){var z=this.imod(l0.mul(this.rinv));return z.red=null,z},P.prototype.imul=function(l0,z){if(l0.isZero()||z.isZero())return l0.words[0]=0,l0.length=1,l0;var o0=l0.imul(z),M=o0.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),u0=o0.isub(M).iushrn(this.shift),S=u0;return u0.cmp(this.m)>=0?S=u0.isub(this.m):u0.cmpn(0)<0&&(S=u0.iadd(this.m)),S._forceRed(this)},P.prototype.mul=function(l0,z){if(l0.isZero()||z.isZero())return new Z(0)._forceRed(this);var o0=l0.mul(z),M=o0.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),u0=o0.isub(M).iushrn(this.shift),S=u0;return u0.cmp(this.m)>=0?S=u0.isub(this.m):u0.cmpn(0)<0&&(S=u0.iadd(this.m)),S._forceRed(this)},P.prototype.invm=function(l0){var z=this.imod(l0._invmp(this.m).mul(this.r2));return z._forceRed(this)}})(typeof K>"u"||K,X)}}),{CryptoHasher:sY}=globalThis.Bun,tY=$Q({"node_modules/public-encrypt/withPublic.js"(X,K){var x0=nY(),G=YQ().Buffer;function Y($,Z){return G.from($.toRed(x0.mont(Z.modulus)).redPow(new x0(Z.publicExponent)).fromRed().toArray())}K.exports=Y}}),mY=$Q({"node_modules/public-encrypt/publicEncrypt.js"(X,K){var x0=pY(),G=ZQ(),Y=L0(),$=oY(),Z=uY(),Q=nY(),U=tY(),V=hQ(),B0=YQ().Buffer;K.exports=function(w0,E,p0){var T;w0.padding?T=w0.padding:p0?T=1:T=4;var f0=x0(w0),D;if(T===4)D=H(f0,E);else if(T===1)D=y0(f0,E,p0);else if(T===3){if(D=new Q(E),D.cmp(f0.modulus)>=0)throw new Error("data too long for modulus")}else throw new Error("unknown padding");return p0?V(D,f0):U(D,f0)};function H(w0,E){var p0=w0.modulus.byteLength(),T=E.length,f0=Y("sha1").update(B0.alloc(0)).digest(),D=f0.length,c0=2*D;if(T>p0-c0-2)throw new Error("message too long");var C=B0.alloc(p0-T-c0-2),h0=p0-D-1,L=G(D),d0=Z(B0.concat([f0,C,B0.alloc(1,1),E],h0),$(L,h0)),R=Z(L,$(d0,D));return new Q(B0.concat([B0.alloc(1),R,d0],p0))}function y0(w0,E,p0){var T=E.length,f0=w0.modulus.byteLength();if(T>f0-11)throw new Error("message too long");var D;return p0?D=B0.alloc(f0-T-3,255):D=W(f0-T-3),new Q(B0.concat([B0.from([0,p0?1:2]),D,B0.alloc(1),E],f0))}function W(w0){for(var E=B0.allocUnsafe(w0),p0=0,T=G(w0*2),f0=0,D;p0f0||new $(w0).cmp(T.modulus)>=0)throw new Error("decryption error");var D;E?D=U(new $(w0),T):D=Z(w0,T);var c0=V.alloc(f0-D.length);if(D=V.concat([c0,D],f0),p0===4)return B0(T,D);if(p0===1)return H(T,D,E);if(p0===3)return D;throw new Error("unknown padding")};function B0(W,w0){var E=W.modulus.byteLength(),p0=Q("sha1").update(V.alloc(0)).digest(),T=p0.length;if(w0[0]!==0)throw new Error("decryption error");var f0=w0.slice(1,T+1),D=w0.slice(T+1),c0=Y(f0,G(D,T)),C=Y(D,G(c0,E-T-1));if(y0(p0,C.slice(0,T)))throw new Error("decryption error");for(var h0=T;C[h0]===0;)h0++;if(C[h0++]!==1)throw new Error("decryption error");return C.slice(h0)}function H(W,w0,E){for(var p0=w0.slice(0,2),T=2,f0=0;w0[T++]!==0;)if(T>=w0.length){f0++;break}var D=w0.slice(2,T-1);if((p0.toString("hex")!=="0002"&&!E||p0.toString("hex")!=="0001"&&E)&&f0++,D.length<8&&f0++,f0)throw new Error("decryption error");return w0.slice(T)}function y0(W,w0){W=V.from(W),w0=V.from(w0);var E=0,p0=W.length;W.length!==w0.length&&(E++,p0=Math.min(W.length,w0.length));for(var T=-1;++T$||H<0)throw new TypeError("offset must be a uint32");if(H>Y||H>y0)throw new RangeError("offset out of range")}function Q(H,y0,W){if(typeof H!="number"||H!==H)throw new TypeError("size must be a number");if(H>$||H<0)throw new TypeError("size must be a uint32");if(H+y0>W||H>Y)throw new RangeError("buffer too small")}X.randomFill=U,X.randomFillSync=B0;function U(H,y0,W,w0){if(!G.isBuffer(H)&&!(H instanceof global.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if(typeof y0=="function")w0=y0,y0=0,W=H.length;else if(typeof W=="function")w0=W,W=H.length-y0;else if(typeof w0!="function")throw new TypeError('"cb" argument must be a function');return Z(y0,H.length),Q(W,y0,H.length),V(H,y0,W,w0)}function V(H,y0,W,w0){if(w0){x0(W,function(p0,T){if(p0)return w0(p0);T.copy(H,y0),w0(null,H)});return}var E=x0(W);return E.copy(H,y0),H}function B0(H,y0,W){if(typeof y0>"u"&&(y0=0),!G.isBuffer(H)&&!(H instanceof global.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');return Z(y0,H.length),W===void 0&&(W=H.length-y0),Q(W,y0,H.length),V(H,y0,W)}}}),iY=$Q({"node_modules/crypto-browserify/index.js"(X){X.randomBytes=X.rng=X.pseudoRandomBytes=X.prng=ZQ(),X.createHash=L0(),X.Hash=X.createHash.Hash,X.createHmac=X.Hmac=z0();var K=S0(),x0=Object.keys(K),G=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(x0);X.getHashes=function(){return G};var Y=g0();X.pbkdf2=Y.pbkdf2,X.pbkdf2Sync=Y.pbkdf2Sync;var $=gQ();X.Cipher=$.Cipher,X.createCipher=$.createCipher,X.Cipheriv=$.Cipheriv,X.createCipheriv=$.createCipheriv,X.Decipher=$.Decipher,X.createDecipher=$.createDecipher,X.Decipheriv=$.Decipheriv,X.createDecipheriv=$.createDecipheriv,X.getCiphers=$.getCiphers,X.listCiphers=$.listCiphers;var Z=fQ();X.DiffieHellmanGroup=Z.DiffieHellmanGroup,X.createDiffieHellmanGroup=Z.createDiffieHellmanGroup,X.getDiffieHellman=Z.getDiffieHellman,X.createDiffieHellman=Z.createDiffieHellman,X.DiffieHellman=Z.DiffieHellman;var Q=dY();X.createSign=Q.createSign,X.Sign=Q.Sign,X.createVerify=Q.createVerify,X.Verify=Q.Verify,X.createECDH=lY();var U=eY();X.publicEncrypt=U.publicEncrypt,X.privateEncrypt=U.privateEncrypt,X.publicDecrypt=U.publicDecrypt,X.privateDecrypt=U.privateDecrypt,X.getRandomValues=(B0)=>d$.getRandomValues(B0);var V=rY();X.randomFill=V.randomFill,X.randomFillSync=V.randomFillSync,X.createCredentials=function(){throw new Error(["sorry, createCredentials is not implemented yet","we accept pull requests","https://github.com/crypto-browserify/crypto-browserify"].join(` +`))},X.constants={DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,ALPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6}}}),$Z={...iY(),[Symbol.for("CommonJS")]:0},o$="buffer",QZ=(X)=>d$.getRandomValues(X),YZ=()=>d$.randomUUID(),u$="timingSafeEqual"in d$?(X,K)=>{let{byteLength:x0}=X,{byteLength:G}=K;if(typeof x0!="number"||typeof G!="number")throw new TypeError("Input must be an array buffer view");if(x0!==G)throw new RangeError("Input buffers must have the same length");return d$.timingSafeEqual(X,K)}:void 0,ZZ="scryptSync"in d$?(X,K,x0,G)=>{let Y=d$.scryptSync(X,K,x0,G);return o$!=="buffer"?new c$(Y).toString(o$):new c$(Y)}:void 0,GZ="scryptSync"in d$?function(X,K,x0,G,Y){if(typeof G=="function"&&(Y=G,G=void 0),typeof Y!="function"){var $=new TypeError("callback must be a function");throw $.code="ERR_INVALID_CALLBACK",$}try{let Z=d$.scryptSync(X,K,x0,G);process.nextTick(Y,null,o$!=="buffer"?new c$(Z).toString(o$):new c$(Z))}catch(Z){throw Z}}:void 0;u$&&(Object.defineProperty(u$,"name",{value:"::bunternal::"}),Object.defineProperty(GZ,"name",{value:"::bunternal::"}),Object.defineProperty(ZZ,"name",{value:"::bunternal::"}));var n$=d$;QQ($Z,{DEFAULT_ENCODING:()=>o$,getRandomValues:()=>QZ,randomUUID:()=>YZ,scrypt:()=>GZ,scryptSync:()=>ZZ,timingSafeEqual:()=>u$,webcrypto:()=>n$,subtle:()=>n$.subtle});var{randomBytes:VZ,rng:UZ,pseudoRandomBytes:XZ,prng:KZ,Hash:IZ,createHash:OZ,createHmac:JZ,Hmac:FZ,getHashes:AZ,pbkdf2:HZ,pbkdf2Sync:WZ,Cipher:EZ,createCipher:TZ,Cipheriv:DZ,createCipheriv:CZ,Decipher:LZ,createDecipher:RZ,Decipheriv:PZ,createDecipheriv:zZ,getCiphers:MZ,listCiphers:SZ,DiffieHellmanGroup:vZ,createDiffieHellmanGroup:qZ,getDiffieHellman:jZ,createDiffieHellman:kZ,DiffieHellman:gZ,createSign:_Z,Sign:NZ,createVerify:xZ,Verify:BZ,createECDH:yZ,publicEncrypt:wZ,privateEncrypt:pZ,publicDecrypt:fZ,privateDecrypt:cZ,randomFill:hZ,randomFillSync:dZ,createCredentials:bZ,constants:lZ}=$Z;var uZ=$Z;/*! safe-buffer. MIT License. Feross Aboukhadijeh */export{n$ as webcrypto,u$ as timingSafeEqual,ZZ as scryptSync,GZ as scrypt,UZ as rng,YZ as randomUUID,dZ as randomFillSync,hZ as randomFill,VZ as randomBytes,wZ as publicEncrypt,fZ as publicDecrypt,XZ as pseudoRandomBytes,KZ as prng,pZ as privateEncrypt,cZ as privateDecrypt,WZ as pbkdf2Sync,HZ as pbkdf2,SZ as listCiphers,QZ as getRandomValues,AZ as getHashes,jZ as getDiffieHellman,MZ as getCiphers,uZ as default,xZ as createVerify,_Z as createSign,JZ as createHmac,OZ as createHash,yZ as createECDH,qZ as createDiffieHellmanGroup,kZ as createDiffieHellman,zZ as createDecipheriv,RZ as createDecipher,bZ as createCredentials,CZ as createCipheriv,TZ as createCipher,lZ as constants,BZ as Verify,NZ as Sign,FZ as Hmac,IZ as Hash,vZ as DiffieHellmanGroup,gZ as DiffieHellman,PZ as Decipheriv,LZ as Decipher,o$ as DEFAULT_ENCODING,DZ as Cipheriv,EZ as Cipher}; diff --git a/src/js/out/modules/node/path.js b/src/js/out/modules/node/path.js index f8cc1ec08f573..4e6003c7d33a5 100644 --- a/src/js/out/modules/node/path.js +++ b/src/js/out/modules/node/path.js @@ -1 +1 @@ -var g=function(i){var f=m({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 f.default=f,f},m=(i)=>Object.assign(Object.create(null),i),k=g(Bun._Path()),q=g(Bun._Path(!1)),v=g(Bun._Path(!0));k.win32=v;k.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}=k;k[Symbol.for("CommonJS")]=0;k.__esModule=!0;var O=k;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,m as createModule,y as basename,L as __esModule}; +var H=function(i){var G=f({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 G.default=G,G},f=(i)=>Object.assign(Object.create(null),i),m=H(Bun._Path()),I=H(Bun._Path(!1)),g=H(Bun._Path(!0));m.win32=g;m.posix=I;var{basename:J,dirname:k,extname:K,format:q,isAbsolute:L,join:v,normalize:N,parse:y,relative:O,resolve:C,toNamespacedPath:z,sep:D,delimiter:A,__esModule:E}=m;m[Symbol.for("CommonJS")]=0;m.__esModule=!0;var F=m;export{g as win32,z as toNamespacedPath,D as sep,C as resolve,O as relative,I as posix,y as parse,N as normalize,v as join,L as isAbsolute,q as format,K as extname,k as dirname,A as delimiter,F as default,f as createModule,J as basename,E as __esModule}; diff --git a/src/js/out/modules/node/path.posix.js b/src/js/out/modules/node/path.posix.js index 64e8a62f5189b..ca08d44b8940b 100644 --- a/src/js/out/modules/node/path.posix.js +++ b/src/js/out/modules/node/path.posix.js @@ -1 +1 @@ -var i=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}},r=i(Bun._Path(!1));r[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}=r,z=r;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 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}},k=r(Bun._Path(!1));k[Symbol.for("CommonJS")]=0;var{basename:e,dirname:m,extname:d,format:l,isAbsolute:s,join:c,normalize:f,parse:g,relative:q,resolve:t,toNamespacedPath:v,sep:w,delimiter:x}=k,z=k;export{v as toNamespacedPath,w as sep,t as resolve,q as relative,g as parse,f as normalize,c as join,s as isAbsolute,l as format,d as extname,m as dirname,x as delimiter,z as default,e as basename}; diff --git a/src/js/out/modules/node/stream.consumers.js b/src/js/out/modules/node/stream.consumers.js index 20bbb7de49294..8e3592104ddcf 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"),p=o.readableStreamToArrayBuffer,c=o.readableStreamToText,g=(h)=>o.readableStreamToText(h).then(JSON.parse),i=async(h)=>{return new Buffer(await p(h))},k=o.readableStreamToBlob,q={[Symbol.for("CommonJS")]:0,arrayBuffer:p,text:c,json:g,buffer:i,blob:k};export{c as text,g as json,q as default,i as buffer,k as blob,p as arrayBuffer}; +var{Bun:k}=globalThis[Symbol.for("Bun.lazy")]("primordials"),p=k.readableStreamToArrayBuffer,o=k.readableStreamToText,h=(c)=>k.readableStreamToText(c).then(JSON.parse),g=async(c)=>{return new Buffer(await p(c))},i=k.readableStreamToBlob,q={[Symbol.for("CommonJS")]:0,arrayBuffer:p,text:o,json:h,buffer:g,blob:i};export{o as text,h as json,q as default,g as buffer,i as blob,p as arrayBuffer}; diff --git a/src/js/out/modules/node/stream.js b/src/js/out/modules/node/stream.js index f96818bd6a6ed..31a1d64c639e5 100644 --- a/src/js/out/modules/node/stream.js +++ b/src/js/out/modules/node/stream.js @@ -1,2 +1,2 @@ -import{EventEmitter as Pq} from"bun:events_native";import{StringDecoder as Sq} from"node:string_decoder";var cq=function(q){return typeof q==="object"&&q!==null&&q instanceof ReadableStream},dq=function(q,Q){if(typeof q!=="boolean")throw new iq(Q,"boolean",q)};var iq=function(q,Q,X){return new Error(`The argument '${q}' is invalid. Received '${X}' for type '${Q}'`)},nq=function(q,Q,X){return new Error(`The value '${Q}' is invalid for argument '${q}'. Reason: ${X}`)},FQ=function(q,Q){var[X,J,H,K,Z,B,Y]=globalThis[Symbol.for("Bun.lazy")](q),$=[!1],z=function(F,L,j,N){if(L>0){const A=j.subarray(0,L),E=j.subarray(L);if(A.byteLength>0)F.push(A);if(N)F.push(null);return E.byteLength>0?E:void 0}if(N)F.push(null);return j},V=function(F,L,j,N){if(L.byteLength>0)F.push(L);if(N)F.push(null);return j},U=process.env.BUN_DISABLE_DYNAMIC_CHUNK_SIZE!=="1";const W=new FinalizationRegistry((F)=>F&&Z(F)),G=512;var M=class F extends Q{#q;#Q=1;#X=!1;#J=void 0;#H;#K=!1;#Z=!U;#B;constructor(L,j={}){super(j);if(typeof j.highWaterMark==="number")this.#H=j.highWaterMark;else this.#H=262144;this.#q=L,this.#X=!1,this.#J=void 0,this.#K=!1,this.#B={},W.register(this,this.#q,this.#B)}_read(L){if(Aq&&Nq("NativeReadable._read",this.__id),this.#K){Aq&&Nq("pendingRead is true",this.__id);return}var j=this.#q;if(Aq&&Nq("ptr @ NativeReadable._read",j,this.__id),j===0){this.push(null);return}if(!this.#X)Aq&&Nq("NativeReadable not constructed yet",this.__id),this.#Y(j);return this.#V(this.#$(L),j)}#Y(L){this.#X=!0;const j=J(L,this.#H);if(Aq&&Nq("NativeReadable internal `start` result",j,this.__id),typeof j==="number"&&j>1)this.#Z=!0,Aq&&Nq("NativeReadable resized",this.__id),this.#H=Math.min(this.#H,j);if(Y){const N=Y(L);if(Aq&&Nq("NativeReadable drain result",N,this.__id),(N?.byteLength??0)>0)this.push(N)}}#$(L=this.#H){var j=this.#J;if(Aq&&Nq("chunk @ #getRemainingChunk",j,this.__id),j?.byteLength??0G?L:G;this.#J=j=new Buffer(N)}return j}push(L,j){return Aq&&Nq("NativeReadable push -- result, encoding",L,j,this.__id),super.push(...arguments)}#z(L,j,N){if(Aq&&Nq("result, isClosed @ #handleResult",L,N,this.__id),typeof L==="number"){if(L>=this.#H&&!this.#Z&&!N)this.#H*=2,this.#Z=!0;return z(this,L,j,N)}else if(typeof L==="boolean")return this.push(null),j?.byteLength??0>0?j:void 0;else if(ArrayBuffer.isView(L)){if(L.byteLength>=this.#H&&!this.#Z&&!N)this.#H*=2,this.#Z=!0,Aq&&Nq("Resized",this.__id);return V(this,L,j,N)}else throw Aq&&Nq("Unknown result type",L,this.__id),new Error("Invalid result from pull")}#V(L,j){Aq&&Nq("#internalRead()",this.__id),$[0]=!1;var N=X(j,L,$);if(xq(N))return this.#K=!0,N.then((A)=>{this.#K=!1,Aq&&Nq("pending no longerrrrrrrr (result returned from pull)",this.__id),this.#J=this.#z(A,L,$[0])},(A)=>{Aq&&Nq("error from pull",A,this.__id),errorOrDestroy(this,A)});else this.#J=this.#z(N,L,$[0])}_destroy(L,j){var N=this.#q;if(N===0){j(L);return}if(W.unregister(this.#B),this.#q=0,B)B(N,!1);Aq&&Nq("NativeReadable destroyed",this.__id),H(N,L),j(L)}ref(){var L=this.#q;if(L===0)return;if(this.#Q++===0)B(L,!0)}unref(){var L=this.#q;if(L===0)return;if(this.#Q--===1)B(L,!1)}};if(!B)M.prototype.ref=void 0,M.prototype.unref=void 0;return M},jQ=function(q,Q){return LQ[q]||=FQ(q,Q)},NQ=function(q,Q,X){if(!(Q&&typeof Q==="object"&&Q instanceof ReadableStream))return;const J=wq(Q);if(!J){Nq("no native readable stream");return}const{stream:H,data:K}=J;return new(jQ(K,q))(H,X)},{isPromise:xq,isCallable:Dq,direct:wq,Object:Tq}=globalThis[Symbol.for("Bun.lazy")]("primordials");globalThis.__IDS_TO_TRACK=process.env.DEBUG_TRACK_EE?.length?process.env.DEBUG_TRACK_EE.split(","):process.env.DEBUG_STREAMS?.length?process.env.DEBUG_STREAMS.split(","):null;var gq=!!process.env.DEBUG_TRACK_EE,Aq=!!(process.env.DEBUG||process.env.DEBUG_STREAMS||gq),Nq=Aq?globalThis.__IDS_TO_TRACK?(...q)=>{const Q=q[q.length-1];if(!globalThis.__IDS_TO_TRACK.includes(Q))return;console.log(`ID: ${Q}`,...q.slice(0,-1))}:(...q)=>console.log(...q.slice(0,-1)):()=>{},fq=Tq.create,kq=Tq.defineProperty,yq=Tq.getOwnPropertyDescriptor,hq=Tq.getOwnPropertyNames,pq=Tq.getPrototypeOf,uq=Tq.prototype.hasOwnProperty,bq=Tq.setPrototypeOf,mq=(q,Q)=>function X(){return Q||(0,q[hq(q)[0]])((Q={exports:{}}).exports,Q),Q.exports};var Iq=process.nextTick;var lq=Array.isArray,Oq=mq({"node_modules/readable-stream/lib/ours/primordials.js"(q,Q){Q.exports={ArrayIsArray(X){return Array.isArray(X)},ArrayPrototypeIncludes(X,J){return X.includes(J)},ArrayPrototypeIndexOf(X,J){return X.indexOf(J)},ArrayPrototypeJoin(X,J){return X.join(J)},ArrayPrototypeMap(X,J){return X.map(J)},ArrayPrototypePop(X,J){return X.pop(J)},ArrayPrototypePush(X,J){return X.push(J)},ArrayPrototypeSlice(X,J,H){return X.slice(J,H)},Error,FunctionPrototypeCall(X,J,...H){return X.call(J,...H)},FunctionPrototypeSymbolHasInstance(X,J){return Function.prototype[Symbol.hasInstance].call(X,J)},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(X,J){return Tq.defineProperties(X,J)},ObjectDefineProperty(X,J,H){return Tq.defineProperty(X,J,H)},ObjectGetOwnPropertyDescriptor(X,J){return Tq.getOwnPropertyDescriptor(X,J)},ObjectKeys(X){return Tq.keys(X)},ObjectSetPrototypeOf(X,J){return Tq.setPrototypeOf(X,J)},Promise,PromisePrototypeCatch(X,J){return X.catch(J)},PromisePrototypeThen(X,J,H){return X.then(J,H)},PromiseReject(X){return Promise.reject(X)},ReflectApply:Reflect.apply,RegExpPrototypeTest(X,J){return X.test(J)},SafeSet:Set,String,StringPrototypeSlice(X,J,H){return X.slice(J,H)},StringPrototypeToLowerCase(X){return X.toLowerCase()},StringPrototypeToUpperCase(X){return X.toUpperCase()},StringPrototypeTrim(X){return X.trim()},Symbol,SymbolAsyncIterator:Symbol.asyncIterator,SymbolHasInstance:Symbol.hasInstance,SymbolIterator:Symbol.iterator,TypedArrayPrototypeSet(X,J,H){return X.set(J,H)},Uint8Array}}}),_q=mq({"node_modules/readable-stream/lib/ours/util.js"(q,Q){var X=Tq.getPrototypeOf(async function(){}).constructor,J=typeof Blob!=="undefined"?function K(Z){return Z instanceof Blob}:function K(Z){return!1},H=class extends Error{constructor(K){if(!Array.isArray(K))throw new TypeError(`Expected input to be an Array, got ${typeof K}`);let Z="";for(let B=0;B{K=Y,Z=$}),resolve:K,reject:Z}},promisify(K){return new Promise((Z,B)=>{K((Y,...$)=>{if(Y)return B(Y);return Z(...$)})})},debuglog(){return function(){}},format(K,...Z){return K.replace(/%([sdifj])/g,function(...[B,Y]){const $=Z.shift();if(Y==="f")return $.toFixed(6);else if(Y==="j")return JSON.stringify($);else if(Y==="s"&&typeof $==="object")return`${$.constructor!==Tq?$.constructor.name:""} {}`.trim();else return $.toString()})},inspect(K){switch(typeof K){case"string":if(K.includes("'")){if(!K.includes('"'))return`"${K}"`;else if(!K.includes("`")&&!K.includes("${"))return`\`${K}\``}return`'${K}'`;case"number":if(isNaN(K))return"NaN";else if(Tq.is(K,-0))return String(K);return K;case"bigint":return`${String(K)}n`;case"boolean":case"undefined":return String(K);case"object":return"{}"}},types:{isAsyncFunction(K){return K instanceof X},isArrayBufferView(K){return ArrayBuffer.isView(K)}},isBlob:J},Q.exports.promisify.custom=Symbol.for("nodejs.util.promisify.custom")}}),oq=mq({"node_modules/readable-stream/lib/ours/errors.js"(q,Q){var{format:X,inspect:J,AggregateError:H}=_q(),K=globalThis.AggregateError||H,Z=Symbol("kIsNodeError"),B=["string","function","number","object","Function","Object","boolean","bigint","symbol"],Y=/^([A-Z][a-z0-9]*)+$/,$="__node_internal_",z={};function V(j,N){if(!j)throw new z.ERR_INTERNAL_ASSERTION(N)}function U(j){let N="",A=j.length;const E=j[0]==="-"?1:0;for(;A>=E+4;A-=3)N=`_${j.slice(A-3,A)}${N}`;return`${j.slice(0,A)}${N}`}function W(j,N,A){if(typeof N==="function")return V(N.length<=A.length,`Code: ${j}; The provided arguments length (${A.length}) does not match the required ones (${N.length}).`),N(...A);const E=(N.match(/%[dfijoOs]/g)||[]).length;if(V(E===A.length,`Code: ${j}; The provided arguments length (${A.length}) does not match the required ones (${E}).`),A.length===0)return N;return X(N,...A)}function G(j,N,A){if(!A)A=Error;class E extends A{constructor(...I){super(W(j,N,I))}toString(){return`${this.name} [${j}]: ${this.message}`}}Tq.defineProperties(E.prototype,{name:{value:A.name,writable:!0,enumerable:!1,configurable:!0},toString:{value(){return`${this.name} [${j}]: ${this.message}`},writable:!0,enumerable:!1,configurable:!0}}),E.prototype.code=j,E.prototype[Z]=!0,z[j]=E}function M(j){const N=$+j.name;return Tq.defineProperty(j,"name",{value:N}),j}function F(j,N){if(j&&N&&j!==N){if(Array.isArray(N.errors))return N.errors.push(j),N;const A=new K([N,j],N.message);return A.code=N.code,A}return j||N}var L=class extends Error{constructor(j="The operation was aborted",N=void 0){if(N!==void 0&&typeof N!=="object")throw new z.ERR_INVALID_ARG_TYPE("options","Object",N);super(j,N);this.code="ABORT_ERR",this.name="AbortError"}};G("ERR_ASSERTION","%s",Error),G("ERR_INVALID_ARG_TYPE",(j,N,A)=>{if(V(typeof j==="string","'name' must be a string"),!Array.isArray(N))N=[N];let E="The ";if(j.endsWith(" argument"))E+=`${j} `;else E+=`"${j}" ${j.includes(".")?"property":"argument"} `;E+="must be ";const I=[],T=[],P=[];for(let O of N)if(V(typeof O==="string","All expected entries have to be of type string"),B.includes(O))I.push(O.toLowerCase());else if(Y.test(O))T.push(O);else V(O!=="object",'The value "object" should be written as "Object"'),P.push(O);if(T.length>0){const O=I.indexOf("object");if(O!==-1)I.splice(I,O,1),T.push("Object")}if(I.length>0){switch(I.length){case 1:E+=`of type ${I[0]}`;break;case 2:E+=`one of type ${I[0]} or ${I[1]}`;break;default:{const O=I.pop();E+=`one of type ${I.join(", ")}, or ${O}`}}if(T.length>0||P.length>0)E+=" or "}if(T.length>0){switch(T.length){case 1:E+=`an instance of ${T[0]}`;break;case 2:E+=`an instance of ${T[0]} or ${T[1]}`;break;default:{const O=T.pop();E+=`an instance of ${T.join(", ")}, or ${O}`}}if(P.length>0)E+=" or "}switch(P.length){case 0:break;case 1:if(P[0].toLowerCase()!==P[0])E+="an ";E+=`${P[0]}`;break;case 2:E+=`one of ${P[0]} or ${P[1]}`;break;default:{const O=P.pop();E+=`one of ${P.join(", ")}, or ${O}`}}if(A==null)E+=`. Received ${A}`;else if(typeof A==="function"&&A.name)E+=`. Received function ${A.name}`;else if(typeof A==="object"){var x;if((x=A.constructor)!==null&&x!==void 0&&x.name)E+=`. Received an instance of ${A.constructor.name}`;else{const O=J(A,{depth:-1});E+=`. Received ${O}`}}else{let O=J(A,{colors:!1});if(O.length>25)O=`${O.slice(0,25)}...`;E+=`. Received type ${typeof A} (${O})`}return E},TypeError),G("ERR_INVALID_ARG_VALUE",(j,N,A="is invalid")=>{let E=J(N);if(E.length>128)E=E.slice(0,128)+"...";return`The ${j.includes(".")?"property":"argument"} '${j}' ${A}. Received ${E}`},TypeError),G("ERR_INVALID_RETURN_VALUE",(j,N,A)=>{var E;const I=A!==null&&A!==void 0&&(E=A.constructor)!==null&&E!==void 0&&E.name?`instance of ${A.constructor.name}`:`type ${typeof A}`;return`Expected ${j} to be returned from the "${N}" function but got ${I}.`},TypeError),G("ERR_MISSING_ARGS",(...j)=>{V(j.length>0,"At least one arg needs to be specified");let N;const A=j.length;switch(j=(Array.isArray(j)?j:[j]).map((E)=>`"${E}"`).join(" or "),A){case 1:N+=`The ${j[0]} argument`;break;case 2:N+=`The ${j[0]} and ${j[1]} arguments`;break;default:{const E=j.pop();N+=`The ${j.join(", ")}, and ${E} arguments`}break}return`${N} must be specified`},TypeError),G("ERR_OUT_OF_RANGE",(j,N,A)=>{V(N,'Missing "range" argument');let E;if(Number.isInteger(A)&&Math.abs(A)>4294967296)E=U(String(A));else if(typeof A==="bigint"){if(E=String(A),A>2n**32n||A<-(2n**32n))E=U(E);E+="n"}else E=J(A);return`The value of "${j}" is out of range. It must be ${N}. Received ${E}`},RangeError),G("ERR_MULTIPLE_CALLBACK","Callback called multiple times",Error),G("ERR_METHOD_NOT_IMPLEMENTED","The %s method is not implemented",Error),G("ERR_STREAM_ALREADY_FINISHED","Cannot call %s after a stream was finished",Error),G("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable",Error),G("ERR_STREAM_DESTROYED","Cannot call %s after a stream was destroyed",Error),G("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),G("ERR_STREAM_PREMATURE_CLOSE","Premature close",Error),G("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF",Error),G("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event",Error),G("ERR_STREAM_WRITE_AFTER_END","write after end",Error),G("ERR_UNKNOWN_ENCODING","Unknown encoding: %s",TypeError),Q.exports={AbortError:L,aggregateTwoErrors:M(F),hideStackFrames:M,codes:z}}}),sq=mq({"node_modules/readable-stream/lib/internal/validators.js"(q,Q){var{ArrayIsArray:X,ArrayPrototypeIncludes:J,ArrayPrototypeJoin:H,ArrayPrototypeMap:K,NumberIsInteger:Z,NumberMAX_SAFE_INTEGER:B,NumberMIN_SAFE_INTEGER:Y,NumberParseInt:$,RegExpPrototypeTest:z,String:V,StringPrototypeToUpperCase:U,StringPrototypeTrim:W}=Oq(),{hideStackFrames:G,codes:{ERR_SOCKET_BAD_PORT:M,ERR_INVALID_ARG_TYPE:F,ERR_INVALID_ARG_VALUE:L,ERR_OUT_OF_RANGE:j,ERR_UNKNOWN_SIGNAL:N}}=oq(),{normalizeEncoding:A}=_q(),{isAsyncFunction:E,isArrayBufferView:I}=_q().types,T={};function P(i){return i===(i|0)}function x(i){return i===i>>>0}var O=/^[0-7]+$/,_="must be a 32-bit unsigned integer or an octal string";function C(i,n,o){if(typeof i==="undefined")i=o;if(typeof i==="string"){if(!z(O,i))throw new L(n,i,_);i=$(i,8)}return w(i,n,0,4294967295),i}var D=G((i,n,o=Y,s=B)=>{if(typeof i!=="number")throw new F(n,"number",i);if(!Z(i))throw new j(n,"an integer",i);if(is)throw new j(n,`>= ${o} && <= ${s}`,i)}),w=G((i,n,o=-2147483648,s=2147483647)=>{if(typeof i!=="number")throw new F(n,"number",i);if(!P(i)){if(!Z(i))throw new j(n,"an integer",i);throw new j(n,`>= ${o} && <= ${s}`,i)}if(is)throw new j(n,`>= ${o} && <= ${s}`,i)}),v=G((i,n,o)=>{if(typeof i!=="number")throw new F(n,"number",i);if(!x(i)){if(!Z(i))throw new j(n,"an integer",i);throw new j(n,`>= ${o?1:0} && < 4294967296`,i)}if(o&&i===0)throw new j(n,">= 1 && < 4294967296",i)});function R(i,n){if(typeof i!=="string")throw new F(n,"string",i)}function S(i,n){if(typeof i!=="number")throw new F(n,"number",i)}var g=G((i,n,o)=>{if(!J(o,i)){const a="must be one of: "+H(K(o,(r)=>typeof r==="string"?`'${r}'`:V(r)),", ");throw new L(n,i,a)}});function f(i,n){if(typeof i!=="boolean")throw new F(n,"boolean",i)}var k=G((i,n,o)=>{const s=o==null,a=s?!1:o.allowArray,r=s?!1:o.allowFunction;if(!(s?!1:o.nullable)&&i===null||!a&&X(i)||typeof i!=="object"&&(!r||typeof i!=="function"))throw new F(n,"Object",i)}),y=G((i,n,o=0)=>{if(!X(i))throw new F(n,"Array",i);if(i.length{if(!I(i))throw new F(n,["Buffer","TypedArray","DataView"],i)});function u(i,n){const o=A(n),s=i.length;if(o==="hex"&&s%2!==0)throw new L("encoding",n,`is invalid for data of length ${s}`)}function b(i,n="Port",o=!0){if(typeof i!=="number"&&typeof i!=="string"||typeof i==="string"&&W(i).length===0||+i!==+i>>>0||i>65535||i===0&&!o)throw new M(n,i,o);return i|0}var m=G((i,n)=>{if(i!==void 0&&(i===null||typeof i!=="object"||!("aborted"in i)))throw new F(n,"AbortSignal",i)}),c=G((i,n)=>{if(typeof i!=="function")throw new F(n,"Function",i)}),d=G((i,n)=>{if(typeof i!=="function"||E(i))throw new F(n,"Function",i)}),l=G((i,n)=>{if(i!==void 0)throw new F(n,"undefined",i)});Q.exports={isInt32:P,isUint32:x,parseFileMode:C,validateArray:y,validateBoolean:f,validateBuffer:p,validateEncoding:u,validateFunction:c,validateInt32:w,validateInteger:D,validateNumber:S,validateObject:k,validateOneOf:g,validatePlainFunction:d,validatePort:b,validateSignalName:h,validateString:R,validateUint32:v,validateUndefined:l,validateAbortSignal:m}}}),aq=mq({"node_modules/readable-stream/lib/internal/streams/utils.js"(q,Q){var{Symbol:X,SymbolAsyncIterator:J,SymbolIterator:H}=Oq(),K=X("kDestroyed"),Z=X("kIsErrored"),B=X("kIsReadable"),Y=X("kIsDisturbed");function $(v,R=!1){var S;return!!(v&&typeof v.pipe==="function"&&typeof v.on==="function"&&(!R||typeof v.pause==="function"&&typeof v.resume==="function")&&(!v._writableState||((S=v._readableState)===null||S===void 0?void 0:S.readable)!==!1)&&(!v._writableState||v._readableState))}function z(v){var R;return!!(v&&typeof v.write==="function"&&typeof v.on==="function"&&(!v._readableState||((R=v._writableState)===null||R===void 0?void 0:R.writable)!==!1))}function V(v){return!!(v&&typeof v.pipe==="function"&&v._readableState&&typeof v.on==="function"&&typeof v.write==="function")}function U(v){return v&&(v._readableState||v._writableState||typeof v.write==="function"&&typeof v.on==="function"||typeof v.pipe==="function"&&typeof v.on==="function")}function W(v,R){if(v==null)return!1;if(R===!0)return typeof v[J]==="function";if(R===!1)return typeof v[H]==="function";return typeof v[J]==="function"||typeof v[H]==="function"}function G(v){if(!U(v))return null;const{_writableState:R,_readableState:S}=v,g=R||S;return!!(v.destroyed||v[K]||g!==null&&g!==void 0&&g.destroyed)}function M(v){if(!z(v))return null;if(v.writableEnded===!0)return!0;const R=v._writableState;if(R!==null&&R!==void 0&&R.errored)return!1;if(typeof(R===null||R===void 0?void 0:R.ended)!=="boolean")return null;return R.ended}function F(v,R){if(!z(v))return null;if(v.writableFinished===!0)return!0;const S=v._writableState;if(S!==null&&S!==void 0&&S.errored)return!1;if(typeof(S===null||S===void 0?void 0:S.finished)!=="boolean")return null;return!!(S.finished||R===!1&&S.ended===!0&&S.length===0)}function L(v){if(!$(v))return null;if(v.readableEnded===!0)return!0;const R=v._readableState;if(!R||R.errored)return!1;if(typeof(R===null||R===void 0?void 0:R.ended)!=="boolean")return null;return R.ended}function j(v,R){if(!$(v))return null;const S=v._readableState;if(S!==null&&S!==void 0&&S.errored)return!1;if(typeof(S===null||S===void 0?void 0:S.endEmitted)!=="boolean")return null;return!!(S.endEmitted||R===!1&&S.ended===!0&&S.length===0)}function N(v){if(v&&v[B]!=null)return v[B];if(typeof(v===null||v===void 0?void 0:v.readable)!=="boolean")return null;if(G(v))return!1;return $(v)&&v.readable&&!j(v)}function A(v){if(typeof(v===null||v===void 0?void 0:v.writable)!=="boolean")return null;if(G(v))return!1;return z(v)&&v.writable&&!M(v)}function E(v,R){if(!U(v))return null;if(G(v))return!0;if((R===null||R===void 0?void 0:R.readable)!==!1&&N(v))return!1;if((R===null||R===void 0?void 0:R.writable)!==!1&&A(v))return!1;return!0}function I(v){var R,S;if(!U(v))return null;if(v.writableErrored)return v.writableErrored;return(R=(S=v._writableState)===null||S===void 0?void 0:S.errored)!==null&&R!==void 0?R:null}function T(v){var R,S;if(!U(v))return null;if(v.readableErrored)return v.readableErrored;return(R=(S=v._readableState)===null||S===void 0?void 0:S.errored)!==null&&R!==void 0?R:null}function P(v){if(!U(v))return null;if(typeof v.closed==="boolean")return v.closed;const{_writableState:R,_readableState:S}=v;if(typeof(R===null||R===void 0?void 0:R.closed)==="boolean"||typeof(S===null||S===void 0?void 0:S.closed)==="boolean")return(R===null||R===void 0?void 0:R.closed)||(S===null||S===void 0?void 0:S.closed);if(typeof v._closed==="boolean"&&x(v))return v._closed;return null}function x(v){return typeof v._closed==="boolean"&&typeof v._defaultKeepAlive==="boolean"&&typeof v._removedConnection==="boolean"&&typeof v._removedContLen==="boolean"}function O(v){return typeof v._sent100==="boolean"&&x(v)}function _(v){var R;return typeof v._consuming==="boolean"&&typeof v._dumped==="boolean"&&((R=v.req)===null||R===void 0?void 0:R.upgradeOrConnect)===void 0}function C(v){if(!U(v))return null;const{_writableState:R,_readableState:S}=v,g=R||S;return!g&&O(v)||!!(g&&g.autoDestroy&&g.emitClose&&g.closed===!1)}function D(v){var R;return!!(v&&((R=v[Y])!==null&&R!==void 0?R:v.readableDidRead||v.readableAborted))}function w(v){var R,S,g,f,k,y,h,p,u,b;return!!(v&&((R=(S=(g=(f=(k=(y=v[Z])!==null&&y!==void 0?y:v.readableErrored)!==null&&k!==void 0?k:v.writableErrored)!==null&&f!==void 0?f:(h=v._readableState)===null||h===void 0?void 0:h.errorEmitted)!==null&&g!==void 0?g:(p=v._writableState)===null||p===void 0?void 0:p.errorEmitted)!==null&&S!==void 0?S:(u=v._readableState)===null||u===void 0?void 0:u.errored)!==null&&R!==void 0?R:(b=v._writableState)===null||b===void 0?void 0:b.errored))}Q.exports={kDestroyed:K,isDisturbed:D,kIsDisturbed:Y,isErrored:w,kIsErrored:Z,isReadable:N,kIsReadable:B,isClosed:P,isDestroyed:G,isDuplexNodeStream:V,isFinished:E,isIterable:W,isReadableNodeStream:$,isReadableEnded:L,isReadableFinished:j,isReadableErrored:T,isNodeStream:U,isWritable:A,isWritableNodeStream:z,isWritableEnded:M,isWritableFinished:F,isWritableErrored:I,isServerRequest:_,isServerResponse:O,willEmitClose:C}}}),rq=mq({"node_modules/readable-stream/lib/internal/streams/end-of-stream.js"(q,Q){var{AbortError:X,codes:J}=oq(),{ERR_INVALID_ARG_TYPE:H,ERR_STREAM_PREMATURE_CLOSE:K}=J,{once:Z}=_q(),{validateAbortSignal:B,validateFunction:Y,validateObject:$}=sq(),{Promise:z}=Oq(),{isClosed:V,isReadable:U,isReadableNodeStream:W,isReadableFinished:G,isReadableErrored:M,isWritable:F,isWritableNodeStream:L,isWritableFinished:j,isWritableErrored:N,isNodeStream:A,willEmitClose:E}=aq();function I(O){return O.setHeader&&typeof O.abort==="function"}var T=()=>{};function P(O,_,C){var D,w;if(arguments.length===2)C=_,_={};else if(_==null)_={};else $(_,"options");Y(C,"callback"),B(_.signal,"options.signal"),C=Z(C);const v=(D=_.readable)!==null&&D!==void 0?D:W(O),R=(w=_.writable)!==null&&w!==void 0?w:L(O);if(!A(O))throw new H("stream","Stream",O);const{_writableState:S,_readableState:g}=O,f=()=>{if(!O.writable)h()};let k=E(O)&&W(O)===v&&L(O)===R,y=j(O,!1);const h=()=>{if(y=!0,O.destroyed)k=!1;if(k&&(!O.readable||v))return;if(!v||p)C.call(O)};let p=G(O,!1);const u=()=>{if(p=!0,O.destroyed)k=!1;if(k&&(!O.writable||R))return;if(!R||y)C.call(O)},b=(i)=>{C.call(O,i)};let m=V(O);const c=()=>{m=!0;const i=N(O)||M(O);if(i&&typeof i!=="boolean")return C.call(O,i);if(v&&!p&&W(O,!0)){if(!G(O,!1))return C.call(O,new K)}if(R&&!y){if(!j(O,!1))return C.call(O,new K)}C.call(O)},d=()=>{O.req.on("finish",h)};if(I(O)){if(O.on("complete",h),!k)O.on("abort",c);if(O.req)d();else O.on("request",d)}else if(R&&!S)O.on("end",f),O.on("close",f);if(!k&&typeof O.aborted==="boolean")O.on("aborted",c);if(O.on("end",u),O.on("finish",h),_.error!==!1)O.on("error",b);if(O.on("close",c),m)Iq(c);else if(S!==null&&S!==void 0&&S.errorEmitted||g!==null&&g!==void 0&&g.errorEmitted){if(!k)Iq(c)}else if(!v&&(!k||U(O))&&(y||F(O)===!1))Iq(c);else if(!R&&(!k||F(O))&&(p||U(O)===!1))Iq(c);else if(g&&O.req&&O.aborted)Iq(c);const l=()=>{if(C=T,O.removeListener("aborted",c),O.removeListener("complete",h),O.removeListener("abort",c),O.removeListener("request",d),O.req)O.req.removeListener("finish",h);O.removeListener("end",f),O.removeListener("close",f),O.removeListener("finish",h),O.removeListener("end",u),O.removeListener("error",b),O.removeListener("close",c)};if(_.signal&&!m){const i=()=>{const n=C;l(),n.call(O,new X(void 0,{cause:_.signal.reason}))};if(_.signal.aborted)Iq(i);else{const n=C;C=Z((...o)=>{_.signal.removeEventListener("abort",i),n.apply(O,o)}),_.signal.addEventListener("abort",i)}}return l}function x(O,_){return new z((C,D)=>{P(O,_,(w)=>{if(w)D(w);else C()})})}Q.exports=P,Q.exports.finished=x}}),tq=mq({"node_modules/readable-stream/lib/internal/streams/operators.js"(q,Q){var{codes:{ERR_INVALID_ARG_TYPE:X,ERR_MISSING_ARGS:J,ERR_OUT_OF_RANGE:H},AbortError:K}=oq(),{validateAbortSignal:Z,validateInteger:B,validateObject:Y}=sq(),$=Oq().Symbol("kWeak"),{finished:z}=rq(),{ArrayPrototypePush:V,MathFloor:U,Number:W,NumberIsNaN:G,Promise:M,PromiseReject:F,PromisePrototypeCatch:L,Symbol:j}=Oq(),N=j("kEmpty"),A=j("kEof");function E(f,k){if(typeof f!=="function")throw new X("fn",["Function","AsyncFunction"],f);if(k!=null)Y(k,"options");if((k===null||k===void 0?void 0:k.signal)!=null)Z(k.signal,"options.signal");let y=1;if((k===null||k===void 0?void 0:k.concurrency)!=null)y=U(k.concurrency);return B(y,"concurrency",1),async function*h(){var p,u;const b=new AbortController,m=this,c=[],d=b.signal,l={signal:d},i=()=>b.abort();if(k!==null&&k!==void 0&&(p=k.signal)!==null&&p!==void 0&&p.aborted)i();k===null||k===void 0||(u=k.signal)===null||u===void 0||u.addEventListener("abort",i);let n,o,s=!1;function a(){s=!0}async function r(){try{for await(let qq of m){var t;if(s)return;if(d.aborted)throw new K;try{qq=f(qq,l)}catch(Qq){qq=F(Qq)}if(qq===N)continue;if(typeof((t=qq)===null||t===void 0?void 0:t.catch)==="function")qq.catch(a);if(c.push(qq),n)n(),n=null;if(!s&&c.length&&c.length>=y)await new M((Qq)=>{o=Qq})}c.push(A)}catch(qq){const Qq=F(qq);L(Qq,a),c.push(Qq)}finally{var e;if(s=!0,n)n(),n=null;k===null||k===void 0||(e=k.signal)===null||e===void 0||e.removeEventListener("abort",i)}}r();try{while(!0){while(c.length>0){const t=await c[0];if(t===A)return;if(d.aborted)throw new K;if(t!==N)yield t;if(c.shift(),o)o(),o=null}await new M((t)=>{n=t})}}finally{if(b.abort(),s=!0,o)o(),o=null}}.call(this)}function I(f=void 0){if(f!=null)Y(f,"options");if((f===null||f===void 0?void 0:f.signal)!=null)Z(f.signal,"options.signal");return async function*k(){let y=0;for await(let p of this){var h;if(f!==null&&f!==void 0&&(h=f.signal)!==null&&h!==void 0&&h.aborted)throw new K({cause:f.signal.reason});yield[y++,p]}}.call(this)}async function T(f,k=void 0){for await(let y of _.call(this,f,k))return!0;return!1}async function P(f,k=void 0){if(typeof f!=="function")throw new X("fn",["Function","AsyncFunction"],f);return!await T.call(this,async(...y)=>{return!await f(...y)},k)}async function x(f,k){for await(let y of _.call(this,f,k))return y;return}async function O(f,k){if(typeof f!=="function")throw new X("fn",["Function","AsyncFunction"],f);async function y(h,p){return await f(h,p),N}for await(let h of E.call(this,y,k));}function _(f,k){if(typeof f!=="function")throw new X("fn",["Function","AsyncFunction"],f);async function y(h,p){if(await f(h,p))return h;return N}return E.call(this,y,k)}var C=class extends J{constructor(){super("reduce");this.message="Reduce of an empty stream requires an initial value"}};async function D(f,k,y){var h;if(typeof f!=="function")throw new X("reducer",["Function","AsyncFunction"],f);if(y!=null)Y(y,"options");if((y===null||y===void 0?void 0:y.signal)!=null)Z(y.signal,"options.signal");let p=arguments.length>1;if(y!==null&&y!==void 0&&(h=y.signal)!==null&&h!==void 0&&h.aborted){const d=new K(void 0,{cause:y.signal.reason});throw this.once("error",()=>{}),await z(this.destroy(d)),d}const u=new AbortController,b=u.signal;if(y!==null&&y!==void 0&&y.signal){const d={once:!0,[$]:this};y.signal.addEventListener("abort",()=>u.abort(),d)}let m=!1;try{for await(let d of this){var c;if(m=!0,y!==null&&y!==void 0&&(c=y.signal)!==null&&c!==void 0&&c.aborted)throw new K;if(!p)k=d,p=!0;else k=await f(k,d,{signal:b})}if(!m&&!p)throw new C}finally{u.abort()}return k}async function w(f){if(f!=null)Y(f,"options");if((f===null||f===void 0?void 0:f.signal)!=null)Z(f.signal,"options.signal");const k=[];for await(let h of this){var y;if(f!==null&&f!==void 0&&(y=f.signal)!==null&&y!==void 0&&y.aborted)throw new K(void 0,{cause:f.signal.reason});V(k,h)}return k}function v(f,k){const y=E.call(this,f,k);return async function*h(){for await(let p of y)yield*p}.call(this)}function R(f){if(f=W(f),G(f))return 0;if(f<0)throw new H("number",">= 0",f);return f}function S(f,k=void 0){if(k!=null)Y(k,"options");if((k===null||k===void 0?void 0:k.signal)!=null)Z(k.signal,"options.signal");return f=R(f),async function*y(){var h;if(k!==null&&k!==void 0&&(h=k.signal)!==null&&h!==void 0&&h.aborted)throw new K;for await(let u of this){var p;if(k!==null&&k!==void 0&&(p=k.signal)!==null&&p!==void 0&&p.aborted)throw new K;if(f--<=0)yield u}}.call(this)}function g(f,k=void 0){if(k!=null)Y(k,"options");if((k===null||k===void 0?void 0:k.signal)!=null)Z(k.signal,"options.signal");return f=R(f),async function*y(){var h;if(k!==null&&k!==void 0&&(h=k.signal)!==null&&h!==void 0&&h.aborted)throw new K;for await(let u of this){var p;if(k!==null&&k!==void 0&&(p=k.signal)!==null&&p!==void 0&&p.aborted)throw new K;if(f-- >0)yield u;else return}}.call(this)}Q.exports.streamReturningOperators={asIndexedPairs:I,drop:S,filter:_,flatMap:v,map:E,take:g},Q.exports.promiseReturningOperators={every:P,forEach:O,reduce:D,toArray:w,some:T,find:x}}}),eq=mq({"node_modules/readable-stream/lib/internal/streams/destroy.js"(q,Q){var{aggregateTwoErrors:X,codes:{ERR_MULTIPLE_CALLBACK:J},AbortError:H}=oq(),{Symbol:K}=Oq(),{kDestroyed:Z,isDestroyed:B,isFinished:Y,isServerRequest:$}=aq(),z="#kDestroy",V="#kConstruct";function U(_,C,D){if(_){if(_.stack,C&&!C.errored)C.errored=_;if(D&&!D.errored)D.errored=_}}function W(_,C){const D=this._readableState,w=this._writableState,v=w||D;if(w&&w.destroyed||D&&D.destroyed){if(typeof C==="function")C();return this}if(U(_,w,D),w)w.destroyed=!0;if(D)D.destroyed=!0;if(!v.constructed)this.once(z,(R)=>{G(this,X(R,_),C)});else G(this,_,C);return this}function G(_,C,D){let w=!1;function v(R){if(w)return;w=!0;const{_readableState:S,_writableState:g}=_;if(U(R,g,S),g)g.closed=!0;if(S)S.closed=!0;if(typeof D==="function")D(R);if(R)Iq(M,_,R);else Iq(F,_)}try{_._destroy(C||null,v)}catch(R){v(R)}}function M(_,C){L(_,C),F(_)}function F(_){const{_readableState:C,_writableState:D}=_;if(D)D.closeEmitted=!0;if(C)C.closeEmitted=!0;if(D&&D.emitClose||C&&C.emitClose)_.emit("close")}function L(_,C){const D=_?._readableState,w=_?._writableState;if(w?.errorEmitted||D?.errorEmitted)return;if(w)w.errorEmitted=!0;if(D)D.errorEmitted=!0;_?.emit?.("error",C)}function j(){const _=this._readableState,C=this._writableState;if(_)_.constructed=!0,_.closed=!1,_.closeEmitted=!1,_.destroyed=!1,_.errored=null,_.errorEmitted=!1,_.reading=!1,_.ended=_.readable===!1,_.endEmitted=_.readable===!1;if(C)C.constructed=!0,C.destroyed=!1,C.closed=!1,C.closeEmitted=!1,C.errored=null,C.errorEmitted=!1,C.finalCalled=!1,C.prefinished=!1,C.ended=C.writable===!1,C.ending=C.writable===!1,C.finished=C.writable===!1}function N(_,C,D){const w=_?._readableState,v=_?._writableState;if(v&&v.destroyed||w&&w.destroyed)return this;if(w&&w.autoDestroy||v&&v.autoDestroy)_.destroy(C);else if(C){if(Error.captureStackTrace(C),v&&!v.errored)v.errored=C;if(w&&!w.errored)w.errored=C;if(D)Iq(L,_,C);else L(_,C)}}function A(_,C){if(typeof _._construct!=="function")return;const{_readableState:D,_writableState:w}=_;if(D)D.constructed=!1;if(w)w.constructed=!1;if(_.once(V,C),_.listenerCount(V)>1)return;Iq(E,_)}function E(_){let C=!1;function D(w){if(C){N(_,w!==null&&w!==void 0?w:new J);return}C=!0;const{_readableState:v,_writableState:R}=_,S=R||v;if(v)v.constructed=!0;if(R)R.constructed=!0;if(S.destroyed)_.emit(z,w);else if(w)N(_,w,!0);else Iq(I,_)}try{_._construct(D)}catch(w){D(w)}}function I(_){_.emit(V)}function T(_){return _&&_.setHeader&&typeof _.abort==="function"}function P(_){_.emit("close")}function x(_,C){_.emit("error",C),Iq(P,_)}function O(_,C){if(!_||B(_))return;if(!C&&!Y(_))C=new H;if($(_))_.socket=null,_.destroy(C);else if(T(_))_.abort();else if(T(_.req))_.req.abort();else if(typeof _.destroy==="function")_.destroy(C);else if(typeof _.close==="function")_.close();else if(C)Iq(x,_);else Iq(P,_);if(!_.destroyed)_[Z]=!0}Q.exports={construct:A,destroyer:O,destroy:W,undestroy:j,errorOrDestroy:N}}}),qQ=mq({"node_modules/readable-stream/lib/internal/streams/legacy.js"(q,Q){var{ArrayIsArray:X,ObjectSetPrototypeOf:J}=Oq();function H(Z){if(!(this instanceof H))return new H(Z);Pq.call(this,Z)}J(H.prototype,Pq.prototype),J(H,Pq),H.prototype.pipe=function(Z,B){const Y=this;function $(F){if(Z.writable&&Z.write(F)===!1&&Y.pause)Y.pause()}Y.on("data",$);function z(){if(Y.readable&&Y.resume)Y.resume()}if(Z.on("drain",z),!Z._isStdio&&(!B||B.end!==!1))Y.on("end",U),Y.on("close",W);let V=!1;function U(){if(V)return;V=!0,Z.end()}function W(){if(V)return;if(V=!0,typeof Z.destroy==="function")Z.destroy()}function G(F){if(M(),Pq.listenerCount(this,"error")===0)this.emit("error",F)}K(Y,"error",G),K(Z,"error",G);function M(){Y.removeListener("data",$),Z.removeListener("drain",z),Y.removeListener("end",U),Y.removeListener("close",W),Y.removeListener("error",G),Z.removeListener("error",G),Y.removeListener("end",M),Y.removeListener("close",M),Z.removeListener("close",M)}return Y.on("end",M),Y.on("close",M),Z.on("close",M),Z.emit("pipe",Y),Z};function K(Z,B,Y){if(typeof Z.prependListener==="function")return Z.prependListener(B,Y);if(!Z._events||!Z._events[B])Z.on(B,Y);else if(X(Z._events[B]))Z._events[B].unshift(Y);else Z._events[B]=[Y,Z._events[B]]}Q.exports={Stream:H,prependListener:K}}}),QQ=mq({"node_modules/readable-stream/lib/internal/streams/add-abort-signal.js"(q,Q){var{AbortError:X,codes:J}=oq(),H=rq(),{ERR_INVALID_ARG_TYPE:K}=J,Z=(Y,$)=>{if(typeof Y!=="object"||!("aborted"in Y))throw new K($,"AbortSignal",Y)};function B(Y){return!!(Y&&typeof Y.pipe==="function")}Q.exports.addAbortSignal=function Y($,z){if(Z($,"signal"),!B(z))throw new K("stream","stream.Stream",z);return Q.exports.addAbortSignalNoValidate($,z)},Q.exports.addAbortSignalNoValidate=function(Y,$){if(typeof Y!=="object"||!("aborted"in Y))return $;const z=()=>{$.destroy(new X(void 0,{cause:Y.reason}))};if(Y.aborted)z();else Y.addEventListener("abort",z),H($,()=>Y.removeEventListener("abort",z));return $}}}),XQ=mq({"node_modules/readable-stream/lib/internal/streams/state.js"(q,Q){var{MathFloor:X,NumberIsInteger:J}=Oq(),{ERR_INVALID_ARG_VALUE:H}=oq().codes;function K(Y,$,z){return Y.highWaterMark!=null?Y.highWaterMark:$?Y[z]:null}function Z(Y){return Y?16:16384}function B(Y,$,z,V){const U=K($,V,z);if(U!=null){if(!J(U)||U<0){const W=V?`options.${z}`:"options.highWaterMark";throw new H(W,U)}return X(U)}return Z(Y.objectMode)}Q.exports={getHighWaterMark:B,getDefaultHighWaterMark:Z}}}),JQ=mq({"node_modules/readable-stream/lib/internal/streams/from.js"(q,Q){var{PromisePrototypeThen:X,SymbolAsyncIterator:J,SymbolIterator:H}=Oq(),{ERR_INVALID_ARG_TYPE:K,ERR_STREAM_NULL_VALUES:Z}=oq().codes;function B(Y,$,z){let V;if(typeof $==="string"||$ instanceof Buffer)return new Y({objectMode:!0,...z,read(){this.push($),this.push(null)}});let U;if($&&$[J])U=!0,V=$[J]();else if($&&$[H])U=!1,V=$[H]();else throw new K("iterable",["Iterable"],$);const W=new Y({objectMode:!0,highWaterMark:1,...z});let G=!1;W._read=function(){if(!G)G=!0,F()},W._destroy=function(L,j){X(M(L),()=>Iq(j,L),(N)=>Iq(j,N||L))};async function M(L){const j=L!==void 0&&L!==null,N=typeof V.throw==="function";if(j&&N){const{value:A,done:E}=await V.throw(L);if(await A,E)return}if(typeof V.return==="function"){const{value:A}=await V.return();await A}}async function F(){for(;;){try{const{value:L,done:j}=U?await V.next():V.next();if(j)W.push(null);else{const N=L&&typeof L.then==="function"?await L:L;if(N===null)throw G=!1,new Z;else if(W.push(N))continue;else G=!1}}catch(L){W.destroy(L)}break}}return W}Q.exports=B}}),HQ,KQ,ZQ=mq({"node_modules/readable-stream/lib/internal/streams/readable.js"(q,Q){var{ArrayPrototypeIndexOf:X,NumberIsInteger:J,NumberIsNaN:H,NumberParseInt:K,ObjectDefineProperties:Z,ObjectKeys:B,ObjectSetPrototypeOf:Y,Promise:$,SafeSet:z,SymbolAsyncIterator:V,Symbol:U}=Oq(),W=globalThis[Symbol.for("Bun.lazy")]("bun:stream").ReadableState,{Stream:G,prependListener:M}=qQ();function F(qq){if(!(this instanceof F))return new F(qq);const Qq=this instanceof Cq();if(this._readableState=new W(qq,this,Qq),qq){const{read:Xq,destroy:Jq,construct:Hq,signal:Kq}=qq;if(typeof Xq==="function")this._read=Xq;if(typeof Jq==="function")this._destroy=Jq;if(typeof Hq==="function")this._construct=Hq;if(Kq&&!Qq)N(Kq,this)}G.call(this,qq),_.construct(this,()=>{if(this._readableState.needReadable)x(this,this._readableState)})}Y(F.prototype,G.prototype),Y(F,G),F.prototype.on=function(qq,Qq){const Xq=G.prototype.on.call(this,qq,Qq),Jq=this._readableState;if(qq==="data")if(Jq.readableListening=this.listenerCount("readable")>0,Jq.flowing!==!1)Aq&&Nq("in flowing mode!",this.__id),this.resume();else Aq&&Nq("in readable mode!",this.__id);else if(qq==="readable"){if(Aq&&Nq("readable listener added!",this.__id),!Jq.endEmitted&&!Jq.readableListening){if(Jq.readableListening=Jq.needReadable=!0,Jq.flowing=!1,Jq.emittedReadable=!1,Aq&&Nq("on readable - state.length, reading, emittedReadable",Jq.length,Jq.reading,Jq.emittedReadable,this.__id),Jq.length)O(this,Jq);else if(!Jq.reading)Iq(l,this)}else if(Jq.endEmitted)Aq&&Nq("end already emitted...",this.__id)}return Xq};class L extends F{#q;#Q;#X;#J;constructor(qq,Qq){const{objectMode:Xq,highWaterMark:Jq,encoding:Hq,signal:Kq}=qq;super({objectMode:Xq,highWaterMark:Jq,encoding:Hq,signal:Kq});this.#X=[],this.#q=void 0,this.#J=Qq,this.#Q=!1}#H(){var qq=this.#X,Qq=0,Xq=qq.length;for(;Qq0)this.#X=[];return!1}#K(qq){qq.releaseLock(),this.#q=void 0,this.#Q=!0,this.push(null);return}async _read(){Aq&&Nq("ReadableFromWeb _read()",this.__id);var qq=this.#J,Qq=this.#q;if(qq)Qq=this.#q=qq.getReader(),this.#J=void 0;else if(this.#H())return;var Xq;try{do{var Jq=!1,Hq;const Kq=Qq.readMany();if(xq(Kq)){if({done:Jq,value:Hq}=await Kq,this.#Q){this.#X.push(...Hq);return}}else({done:Jq,value:Hq}=Kq);if(Jq){this.#K(Qq);return}if(!this.push(Hq[0])){this.#X=Hq.slice(1);return}for(let Zq=1,Bq=Hq.length;Zq{this.#Q=!0,Qq(qq)});return}try{Qq(qq)}catch(Jq){globalThis.reportError(Jq)}}}KQ=L;function j(qq,Qq={}){if(!cq(qq))throw new D("readableStream","ReadableStream",qq);g(Qq,"options");const{highWaterMark:Xq,encoding:Jq,objectMode:Hq=!1,signal:Kq}=Qq;if(Jq!==void 0&&!Buffer.isEncoding(Jq))throw new nq(Jq,"options.encoding");return dq(Hq,"options.objectMode"),NQ(F,qq,Qq)||new L({highWaterMark:Xq,encoding:Jq,objectMode:Hq,signal:Kq},qq)}Q.exports=F,HQ=j;var{addAbortSignal:N}=QQ(),A=rq();const{maybeReadMore:E,resume:I,emitReadable:T,onEofChunk:P}=globalThis[Symbol.for("Bun.lazy")]("bun:stream");function x(qq,Qq){process.nextTick(E,qq,Qq)}function O(qq,Qq){Aq&&Nq("NativeReadable - emitReadable",qq.__id),T(qq,Qq)}var _=eq(),{aggregateTwoErrors:C,codes:{ERR_INVALID_ARG_TYPE:D,ERR_METHOD_NOT_IMPLEMENTED:w,ERR_OUT_OF_RANGE:v,ERR_STREAM_PUSH_AFTER_EOF:R,ERR_STREAM_UNSHIFT_AFTER_END_EVENT:S}}=oq(),{validateObject:g}=sq(),f=JQ(),k=()=>{},{errorOrDestroy:y}=_;F.prototype.destroy=_.destroy,F.prototype._undestroy=_.undestroy,F.prototype._destroy=function(qq,Qq){Qq(qq)},F.prototype[Pq.captureRejectionSymbol]=function(qq){this.destroy(qq)},F.prototype.push=function(qq,Qq){return h(this,qq,Qq,!1)},F.prototype.unshift=function(qq,Qq){return h(this,qq,Qq,!0)};function h(qq,Qq,Xq,Jq){Aq&&Nq("readableAddChunk",Qq,qq.__id);const Hq=qq._readableState;let Kq;if(!Hq.objectMode){if(typeof Qq==="string"){if(Xq=Xq||Hq.defaultEncoding,Hq.encoding!==Xq)if(Jq&&Hq.encoding)Qq=Buffer.from(Qq,Xq).toString(Hq.encoding);else Qq=Buffer.from(Qq,Xq),Xq=""}else if(Qq instanceof Buffer)Xq="";else if(G._isUint8Array(Qq)){if(Jq||!Hq.decoder)Qq=G._uint8ArrayToBuffer(Qq);Xq=""}else if(Qq!=null)Kq=new D("chunk",["string","Buffer","Uint8Array"],Qq)}if(Kq)y(qq,Kq);else if(Qq===null)Hq.reading=!1,P(qq,Hq);else if(Hq.objectMode||Qq&&Qq.length>0)if(Jq)if(Hq.endEmitted)y(qq,new S);else if(Hq.destroyed||Hq.errored)return!1;else p(qq,Hq,Qq,!0);else if(Hq.ended)y(qq,new R);else if(Hq.destroyed||Hq.errored)return!1;else if(Hq.reading=!1,Hq.decoder&&!Xq)if(Qq=Hq.decoder.write(Qq),Hq.objectMode||Qq.length!==0)p(qq,Hq,Qq,!1);else x(qq,Hq);else p(qq,Hq,Qq,!1);else if(!Jq)Hq.reading=!1,x(qq,Hq);return!Hq.ended&&(Hq.length0){if(Qq.multiAwaitDrain)Qq.awaitDrainWriters.clear();else Qq.awaitDrainWriters=null;Qq.dataEmitted=!0,qq.emit("data",Xq)}else{if(Qq.length+=Qq.objectMode?1:Xq.length,Jq)Qq.buffer.unshift(Xq);else Qq.buffer.push(Xq);if(Aq&&Nq("needReadable @ addChunk",Qq.needReadable,qq.__id),Qq.needReadable)O(qq,Qq)}x(qq,Qq)}F.prototype.isPaused=function(){const qq=this._readableState;return qq.paused===!0||qq.flowing===!1},F.prototype.setEncoding=function(qq){const Qq=new Sq(qq);this._readableState.decoder=Qq,this._readableState.encoding=this._readableState.decoder.encoding;const Xq=this._readableState.buffer;let Jq="";for(let Hq=Xq.length;Hq>0;Hq--)Jq+=Qq.write(Xq.shift());if(Jq!=="")Xq.push(Jq);return this._readableState.length=Jq.length,this};var u=1073741824;function b(qq){if(qq>u)throw new v("size","<= 1GiB",qq);else qq--,qq|=qq>>>1,qq|=qq>>>2,qq|=qq>>>4,qq|=qq>>>8,qq|=qq>>>16,qq++;return qq}function m(qq,Qq){if(qq<=0||Qq.length===0&&Qq.ended)return 0;if(Qq.objectMode)return 1;if(H(qq)){if(Qq.flowing&&Qq.length)return Qq.buffer.first().length;return Qq.length}if(qq<=Qq.length)return qq;return Qq.ended?Qq.length:0}F.prototype.read=function(qq){if(Aq&&Nq("read - n =",qq,this.__id),!J(qq))qq=K(qq,10);const Qq=this._readableState,Xq=qq;if(qq>Qq.highWaterMark)Qq.highWaterMark=b(qq);if(qq!==0)Qq.emittedReadable=!1;if(qq===0&&Qq.needReadable&&((Qq.highWaterMark!==0?Qq.length>=Qq.highWaterMark:Qq.length>0)||Qq.ended)){if(Aq&&Nq("read: emitReadable or endReadable",Qq.length,Qq.ended,this.__id),Qq.length===0&&Qq.ended)s(this);else O(this,Qq);return null}if(qq=m(qq,Qq),qq===0&&Qq.ended){if(Aq&&Nq("read: calling endReadable if length 0 -- length, state.ended",Qq.length,Qq.ended,this.__id),Qq.length===0)s(this);return null}let Jq=Qq.needReadable;if(Aq&&Nq("need readable",Jq,this.__id),Qq.length===0||Qq.length-qq0)Kq=o(qq,Qq);else Kq=null;if(Aq&&Nq("ret @ read",Kq,this.__id),Kq===null)Qq.needReadable=Qq.length<=Qq.highWaterMark,Aq&&Nq("state.length while ret = null",Qq.length,this.__id),qq=0;else if(Qq.length-=qq,Qq.multiAwaitDrain)Qq.awaitDrainWriters.clear();else Qq.awaitDrainWriters=null;if(Qq.length===0){if(!Qq.ended)Qq.needReadable=!0;if(Xq!==qq&&Qq.ended)s(this)}if(Kq!==null&&!Qq.errorEmitted&&!Qq.closeEmitted)Qq.dataEmitted=!0,this.emit("data",Kq);return Kq},F.prototype._read=function(qq){throw new w("_read()")},F.prototype.pipe=function(qq,Qq){const Xq=this,Jq=this._readableState;if(Jq.pipes.length===1){if(!Jq.multiAwaitDrain)Jq.multiAwaitDrain=!0,Jq.awaitDrainWriters=new z(Jq.awaitDrainWriters?[Jq.awaitDrainWriters]:[])}Jq.pipes.push(qq),Aq&&Nq("pipe count=%d opts=%j",Jq.pipes.length,Qq,Xq.__id);const Kq=(!Qq||Qq.end!==!1)&&qq!==process.stdout&&qq!==process.stderr?Bq:Fq;if(Jq.endEmitted)Iq(Kq);else Xq.once("end",Kq);qq.on("unpipe",Zq);function Zq(Lq,jq){if(Aq&&Nq("onunpipe",Xq.__id),Lq===Xq){if(jq&&jq.hasUnpiped===!1)jq.hasUnpiped=!0,zq()}}function Bq(){Aq&&Nq("onend",Xq.__id),qq.end()}let Yq,$q=!1;function zq(){if(Aq&&Nq("cleanup",Xq.__id),qq.removeListener("close",Gq),qq.removeListener("finish",Mq),Yq)qq.removeListener("drain",Yq);if(qq.removeListener("error",Wq),qq.removeListener("unpipe",Zq),Xq.removeListener("end",Bq),Xq.removeListener("end",Fq),Xq.removeListener("data",Uq),$q=!0,Yq&&Jq.awaitDrainWriters&&(!qq._writableState||qq._writableState.needDrain))Yq()}function Vq(){if(!$q){if(Jq.pipes.length===1&&Jq.pipes[0]===qq)Aq&&Nq("false write response, pause",0,Xq.__id),Jq.awaitDrainWriters=qq,Jq.multiAwaitDrain=!1;else if(Jq.pipes.length>1&&Jq.pipes.includes(qq))Aq&&Nq("false write response, pause",Jq.awaitDrainWriters.size,Xq.__id),Jq.awaitDrainWriters.add(qq);Xq.pause()}if(!Yq)Yq=c(Xq,qq),qq.on("drain",Yq)}Xq.on("data",Uq);function Uq(Lq){Aq&&Nq("ondata",Xq.__id);const jq=qq.write(Lq);if(Aq&&Nq("dest.write",jq,Xq.__id),jq===!1)Vq()}function Wq(Lq){if(Nq("onerror",Lq),Fq(),qq.removeListener("error",Wq),qq.listenerCount("error")===0){const jq=qq._writableState||qq._readableState;if(jq&&!jq.errorEmitted)y(qq,Lq);else qq.emit("error",Lq)}}M(qq,"error",Wq);function Gq(){qq.removeListener("finish",Mq),Fq()}qq.once("close",Gq);function Mq(){Nq("onfinish"),qq.removeListener("close",Gq),Fq()}qq.once("finish",Mq);function Fq(){Nq("unpipe"),Xq.unpipe(qq)}if(qq.emit("pipe",Xq),qq.writableNeedDrain===!0){if(Jq.flowing)Vq()}else if(!Jq.flowing)Nq("pipe resume"),Xq.resume();return qq};function c(qq,Qq){return function Xq(){const Jq=qq._readableState;if(Jq.awaitDrainWriters===Qq)Nq("pipeOnDrain",1),Jq.awaitDrainWriters=null;else if(Jq.multiAwaitDrain)Nq("pipeOnDrain",Jq.awaitDrainWriters.size),Jq.awaitDrainWriters.delete(Qq);if((!Jq.awaitDrainWriters||Jq.awaitDrainWriters.size===0)&&qq.listenerCount("data"))qq.resume()}}F.prototype.unpipe=function(qq){const Qq=this._readableState,Xq={hasUnpiped:!1};if(Qq.pipes.length===0)return this;if(!qq){const Hq=Qq.pipes;Qq.pipes=[],this.pause();for(let Kq=0;Kq0,Qq.resumeScheduled&&Qq.paused===!1)Qq.flowing=!0;else if(qq.listenerCount("data")>0)qq.resume();else if(!Qq.readableListening)Qq.flowing=null}function l(qq){Aq&&Nq("on readable nextTick, calling read(0)",qq.__id),qq.read(0)}F.prototype.resume=function(){const qq=this._readableState;if(!qq.flowing)Aq&&Nq("resume",this.__id),qq.flowing=!qq.readableListening,I(this,qq);return qq.paused=!1,this},F.prototype.pause=function(){if(Aq&&Nq("call pause flowing=%j",this._readableState.flowing,this.__id),this._readableState.flowing!==!1)Aq&&Nq("pause",this.__id),this._readableState.flowing=!1,this.emit("pause");return this._readableState.paused=!0,this},F.prototype.wrap=function(qq){let Qq=!1;qq.on("data",(Jq)=>{if(!this.push(Jq)&&qq.pause)Qq=!0,qq.pause()}),qq.on("end",()=>{this.push(null)}),qq.on("error",(Jq)=>{y(this,Jq)}),qq.on("close",()=>{this.destroy()}),qq.on("destroy",()=>{this.destroy()}),this._read=()=>{if(Qq&&qq.resume)Qq=!1,qq.resume()};const Xq=B(qq);for(let Jq=1;Jq{Hq=Zq?C(Hq,Zq):null,Xq(),Xq=k});try{while(!0){const Zq=qq.destroyed?null:qq.read();if(Zq!==null)yield Zq;else if(Hq)throw Hq;else if(Hq===null)return;else await new $(Jq)}}catch(Zq){throw Hq=C(Hq,Zq),Hq}finally{if((Hq||(Qq===null||Qq===void 0?void 0:Qq.destroyOnReturn)!==!1)&&(Hq===void 0||qq._readableState.autoDestroy))_.destroyer(qq,null);else qq.off("readable",Jq),Kq()}}Z(F.prototype,{readable:{get(){const qq=this._readableState;return!!qq&&qq.readable!==!1&&!qq.destroyed&&!qq.errorEmitted&&!qq.endEmitted},set(qq){if(this._readableState)this._readableState.readable=!!qq}},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(qq){if(this._readableState)this._readableState.flowing=qq}},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(qq){if(!this._readableState)return;this._readableState.destroyed=qq}},readableEnded:{enumerable:!1,get(){return this._readableState?this._readableState.endEmitted:!1}}}),F._fromList=o;function o(qq,Qq){if(Qq.length===0)return null;let Xq;if(Qq.objectMode)Xq=Qq.buffer.shift();else if(!qq||qq>=Qq.length){if(Qq.decoder)Xq=Qq.buffer.join("");else if(Qq.buffer.length===1)Xq=Qq.buffer.first();else Xq=Qq.buffer.concat(Qq.length);Qq.buffer.clear()}else Xq=Qq.buffer.consume(qq,Qq.decoder);return Xq}function s(qq){const Qq=qq._readableState;if(Aq&&Nq("endEmitted @ endReadable",Qq.endEmitted,qq.__id),!Qq.endEmitted)Qq.ended=!0,Iq(a,Qq,qq)}function a(qq,Qq){if(Aq&&Nq("endReadableNT -- endEmitted, state.length",qq.endEmitted,qq.length,Qq.__id),!qq.errored&&!qq.closeEmitted&&!qq.endEmitted&&qq.length===0){if(qq.endEmitted=!0,Qq.emit("end"),Aq&&Nq("end emitted @ endReadableNT",Qq.__id),Qq.writable&&Qq.allowHalfOpen===!1)Iq(r,Qq);else if(qq.autoDestroy){const Xq=Qq._writableState;if(!Xq||Xq.autoDestroy&&(Xq.finished||Xq.writable===!1))Qq.destroy()}}}function r(qq){if(qq.writable&&!qq.writableEnded&&!qq.destroyed)qq.end()}F.from=function(qq,Qq){return f(F,qq,Qq)};var t={newStreamReadableFromReadableStream:j};function e(){if(t===void 0)t={};return t}F.fromWeb=function(qq,Qq){return e().newStreamReadableFromReadableStream(qq,Qq)},F.toWeb=function(qq){return e().newReadableStreamFromStreamReadable(qq)},F.wrap=function(qq,Qq){var Xq,Jq;return new F({objectMode:(Xq=(Jq=qq.readableObjectMode)!==null&&Jq!==void 0?Jq:qq.objectMode)!==null&&Xq!==void 0?Xq:!0,...Qq,destroy(Hq,Kq){_.destroyer(qq,Hq),Kq(Hq)}}).wrap(qq)}}}),BQ=mq({"node_modules/readable-stream/lib/internal/streams/writable.js"(q,Q){var{ArrayPrototypeSlice:X,Error:J,FunctionPrototypeSymbolHasInstance:H,ObjectDefineProperty:K,ObjectDefineProperties:Z,ObjectSetPrototypeOf:B,StringPrototypeToLowerCase:Y,Symbol:$,SymbolHasInstance:z}=Oq(),V=qQ().Stream,U=eq(),{addAbortSignal:W}=QQ(),{getHighWaterMark:G,getDefaultHighWaterMark:M}=XQ(),{ERR_INVALID_ARG_TYPE:F,ERR_METHOD_NOT_IMPLEMENTED:L,ERR_MULTIPLE_CALLBACK:j,ERR_STREAM_CANNOT_PIPE:N,ERR_STREAM_DESTROYED:A,ERR_STREAM_ALREADY_FINISHED:E,ERR_STREAM_NULL_VALUES:I,ERR_STREAM_WRITE_AFTER_END:T,ERR_UNKNOWN_ENCODING:P}=oq().codes,{errorOrDestroy:x}=U;function O(o={}){const s=this instanceof Cq();if(!s&&!H(O,this))return new O(o);if(this._writableState=new D(o,this,s),o){if(typeof o.write==="function")this._write=o.write;if(typeof o.writev==="function")this._writev=o.writev;if(typeof o.destroy==="function")this._destroy=o.destroy;if(typeof o.final==="function")this._final=o.final;if(typeof o.construct==="function")this._construct=o.construct;if(o.signal)W(o.signal,this)}V.call(this,o),U.construct(this,()=>{const a=this._writableState;if(!a.writing)p(this,a);c(this,a)})}B(O.prototype,V.prototype),B(O,V),Q.exports=O;function _(){}var C=$("kOnFinished");function D(o,s,a){if(typeof a!=="boolean")a=s instanceof Cq();if(this.objectMode=!!(o&&o.objectMode),a)this.objectMode=this.objectMode||!!(o&&o.writableObjectMode);this.highWaterMark=o?G(this,o,"writableHighWaterMark",a):M(!1),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;const r=!!(o&&o.decodeStrings===!1);this.decodeStrings=!r,this.defaultEncoding=o&&o.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=f.bind(void 0,s),this.writecb=null,this.writelen=0,this.afterWriteTickInfo=null,w(this),this.pendingcb=0,this.constructed=!0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!o||o.emitClose!==!1,this.autoDestroy=!o||o.autoDestroy!==!1,this.errored=null,this.closed=!1,this.closeEmitted=!1,this[C]=[]}function w(o){o.buffered=[],o.bufferedIndex=0,o.allBuffers=!0,o.allNoop=!0}D.prototype.getBuffer=function o(){return X(this.buffered,this.bufferedIndex)},K(D.prototype,"bufferedRequestCount",{get(){return this.buffered.length-this.bufferedIndex}}),K(O,z,{value:function(o){if(H(this,o))return!0;if(this!==O)return!1;return o&&o._writableState instanceof D}}),O.prototype.pipe=function(){x(this,new N)};function v(o,s,a,r){const t=o._writableState;if(typeof a==="function")r=a,a=t.defaultEncoding;else{if(!a)a=t.defaultEncoding;else if(a!=="buffer"&&!Buffer.isEncoding(a))throw new P(a);if(typeof r!=="function")r=_}if(s===null)throw new I;else if(!t.objectMode)if(typeof s==="string"){if(t.decodeStrings!==!1)s=Buffer.from(s,a),a="buffer"}else if(s instanceof Buffer)a="buffer";else if(V._isUint8Array(s))s=V._uint8ArrayToBuffer(s),a="buffer";else throw new F("chunk",["string","Buffer","Uint8Array"],s);let e;if(t.ending)e=new T;else if(t.destroyed)e=new A("write");if(e)return Iq(r,e),x(o,e,!0),e;return t.pendingcb++,R(o,t,s,a,r)}O.prototype.write=function(o,s,a){return v(this,o,s,a)===!0},O.prototype.cork=function(){this._writableState.corked++},O.prototype.uncork=function(){const o=this._writableState;if(o.corked){if(o.corked--,!o.writing)p(this,o)}},O.prototype.setDefaultEncoding=function o(s){if(typeof s==="string")s=Y(s);if(!Buffer.isEncoding(s))throw new P(s);return this._writableState.defaultEncoding=s,this};function R(o,s,a,r,t){const e=s.objectMode?1:a.length;s.length+=e;const qq=s.lengtha.bufferedIndex)p(o,a);if(r)if(a.afterWriteTickInfo!==null&&a.afterWriteTickInfo.cb===t)a.afterWriteTickInfo.count++;else a.afterWriteTickInfo={count:1,cb:t,stream:o,state:a},Iq(k,a.afterWriteTickInfo);else y(o,a,1,t)}}function k({stream:o,state:s,count:a,cb:r}){return s.afterWriteTickInfo=null,y(o,s,a,r)}function y(o,s,a,r){if(!s.ending&&!o.destroyed&&s.length===0&&s.needDrain)s.needDrain=!1,o.emit("drain");while(a-- >0)s.pendingcb--,r();if(s.destroyed)h(s);c(o,s)}function h(o){if(o.writing)return;for(let t=o.bufferedIndex;t1&&o._writev){s.pendingcb-=e-1;const Qq=s.allNoop?_:(Jq)=>{for(let Hq=qq;Hq256)a.splice(0,qq),s.bufferedIndex=0;else s.bufferedIndex=qq}s.bufferProcessing=!1}O.prototype._write=function(o,s,a){if(this._writev)this._writev([{chunk:o,encoding:s}],a);else throw new L("_write()")},O.prototype._writev=null,O.prototype.end=function(o,s,a,r=!1){const t=this._writableState;if(Aq&&Nq("end",t,this.__id),typeof o==="function")a=o,o=null,s=null;else if(typeof s==="function")a=s,s=null;let e;if(o!==null&&o!==void 0){let qq;if(!r)qq=v(this,o,s);else qq=this.write(o,s);if(qq instanceof J)e=qq}if(t.corked)t.corked=1,this.uncork();if(e)this.emit("error",e);else if(!t.errored&&!t.ending)t.ending=!0,c(this,t,!0),t.ended=!0;else if(t.finished)e=new E("end");else if(t.destroyed)e=new A("end");if(typeof a==="function")if(e||t.finished)Iq(a,e);else t[C].push(a);return this};function u(o,s){var a=o.ending&&!o.destroyed&&o.constructed&&o.length===0&&!o.errored&&o.buffered.length===0&&!o.finished&&!o.writing&&!o.errorEmitted&&!o.closeEmitted;return Nq("needFinish",a,s),a}function b(o,s){let a=!1;function r(t){if(a){x(o,t!==null&&t!==void 0?t:j());return}if(a=!0,s.pendingcb--,t){const e=s[C].splice(0);for(let qq=0;qq{if(u(t))d(r,t);else t.pendingcb--},o,s);else if(u(s))s.pendingcb++,d(o,s)}}function d(o,s){s.pendingcb--,s.finished=!0;const a=s[C].splice(0);for(let r=0;r{if(g!=null)throw new U("nully","body",g)},(g)=>{W(R,g)});return R=new A({objectMode:!0,readable:!1,write:C,final(g){D(async()=>{try{await S,Iq(g,null)}catch(f){Iq(g,f)}})},destroy:w})}throw new U("Iterable, AsyncIterable or AsyncFunction",x,_)}if(j(P))return T(P.arrayBuffer());if(H(P))return L(A,P,{objectMode:!0,writable:!1});if(typeof(P===null||P===void 0?void 0:P.writable)==="object"||typeof(P===null||P===void 0?void 0:P.readable)==="object"){const _=P!==null&&P!==void 0&&P.readable?Z(P===null||P===void 0?void 0:P.readable)?P===null||P===void 0?void 0:P.readable:T(P.readable):void 0,C=P!==null&&P!==void 0&&P.writable?B(P===null||P===void 0?void 0:P.writable)?P===null||P===void 0?void 0:P.writable:T(P.writable):void 0;return I({readable:_,writable:C})}const O=P===null||P===void 0?void 0:P.then;if(typeof O==="function"){let _;return N(O,P,(C)=>{if(C!=null)_.push(C);_.push(null)},(C)=>{W(_,C)}),_=new A({objectMode:!0,writable:!1,read(){}})}throw new V(x,["Blob","ReadableStream","WritableStream","Stream","Iterable","AsyncIterable","Function","{ readable, writable } pair","Promise"],P)};function E(T){let{promise:P,resolve:x}=F();const O=new AbortController,_=O.signal;return{value:T(async function*(){while(!0){const D=P;P=null;const{chunk:w,done:v,cb:R}=await D;if(Iq(R),v)return;if(_.aborted)throw new z(void 0,{cause:_.reason});({promise:P,resolve:x}=F()),yield w}}(),{signal:_}),write(D,w,v){const R=x;x=null,R({chunk:D,done:!1,cb:v})},final(D){const w=x;x=null,w({done:!0,cb:D})},destroy(D,w){O.abort(),w(D)}}}function I(T){const P=T.readable&&typeof T.readable.read!=="function"?M.wrap(T.readable):T.readable,x=T.writable;let O=!!X(P),_=!!J(x),C,D,w,v,R;function S(g){const f=v;if(v=null,f)f(g);else if(g)R.destroy(g);else if(!O&&!_)R.destroy()}if(R=new A({readableObjectMode:!!(P!==null&&P!==void 0&&P.readableObjectMode),writableObjectMode:!!(x!==null&&x!==void 0&&x.writableObjectMode),readable:O,writable:_}),_)$(x,(g)=>{if(_=!1,g)W(P,g);S(g)}),R._write=function(g,f,k){if(x.write(g,f))k();else C=k},R._final=function(g){x.end(),D=g},x.on("drain",function(){if(C){const g=C;C=null,g()}}),x.on("finish",function(){if(D){const g=D;D=null,g()}});if(O)$(P,(g)=>{if(O=!1,g)W(P,g);S(g)}),P.on("readable",function(){if(w){const g=w;w=null,g()}}),P.on("end",function(){R.push(null)}),R._read=function(){while(!0){const g=P.read();if(g===null){w=R._read;return}if(!R.push(g))return}};return R._destroy=function(g,f){if(!g&&v!==null)g=new z;if(w=null,C=null,D=null,v===null)f(g);else v=f,W(x,g),W(P,g)},R}}}),Cq=mq({"node_modules/readable-stream/lib/internal/streams/duplex.js"(q,Q){var{ObjectDefineProperties:X,ObjectGetOwnPropertyDescriptor:J,ObjectKeys:H,ObjectSetPrototypeOf:K}=Oq(),Z=ZQ();function B(U){if(!(this instanceof B))return new B(U);if(Z.call(this,U),Eq.call(this,U),U){if(this.allowHalfOpen=U.allowHalfOpen!==!1,U.readable===!1)this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0;if(U.writable===!1)this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0}else this.allowHalfOpen=!0}Q.exports=B,K(B.prototype,Z.prototype),K(B,Z);for(var Y in Eq.prototype)if(!B.prototype[Y])B.prototype[Y]=Eq.prototype[Y];X(B.prototype,{writable:J(Eq.prototype,"writable"),writableHighWaterMark:J(Eq.prototype,"writableHighWaterMark"),writableObjectMode:J(Eq.prototype,"writableObjectMode"),writableBuffer:J(Eq.prototype,"writableBuffer"),writableLength:J(Eq.prototype,"writableLength"),writableFinished:J(Eq.prototype,"writableFinished"),writableCorked:J(Eq.prototype,"writableCorked"),writableEnded:J(Eq.prototype,"writableEnded"),writableNeedDrain:J(Eq.prototype,"writableNeedDrain"),destroyed:{get(){if(this._readableState===void 0||this._writableState===void 0)return!1;return this._readableState.destroyed&&this._writableState.destroyed},set(U){if(this._readableState&&this._writableState)this._readableState.destroyed=U,this._writableState.destroyed=U}}});var $;function z(){if($===void 0)$={};return $}B.fromWeb=function(U,W){return z().newStreamDuplexFromReadableWritablePair(U,W)},B.toWeb=function(U){return z().newReadableWritablePairFromDuplex(U)};var V;B.from=function(U){if(!V)V=YQ();return V(U,"body")}}}),$Q=mq({"node_modules/readable-stream/lib/internal/streams/transform.js"(q,Q){var{ObjectSetPrototypeOf:X,Symbol:J}=Oq(),{ERR_METHOD_NOT_IMPLEMENTED:H}=oq().codes,K=Cq();function Z(z){if(!(this instanceof Z))return new Z(z);if(K.call(this,z),this._readableState.sync=!1,this[B]=null,z){if(typeof z.transform==="function")this._transform=z.transform;if(typeof z.flush==="function")this._flush=z.flush}this.on("prefinish",$.bind(this))}X(Z.prototype,K.prototype),X(Z,K),Q.exports=Z;var B=J("kCallback");function Y(z){if(typeof this._flush==="function"&&!this.destroyed)this._flush((V,U)=>{if(V){if(z)z(V);else this.destroy(V);return}if(U!=null)this.push(U);if(this.push(null),z)z()});else if(this.push(null),z)z()}function $(){if(this._final!==Y)Y.call(this)}Z.prototype._final=Y,Z.prototype._transform=function(z,V,U){throw new H("_transform()")},Z.prototype._write=function(z,V,U){const W=this._readableState,G=this._writableState,M=W.length;this._transform(z,V,(F,L)=>{if(F){U(F);return}if(L!=null)this.push(L);if(G.ended||M===W.length||W.length{g=!0});const f=K(v,{readable:R,writable:S},(k)=>{g=!k});return{destroy:(k)=>{if(g)return;g=!0,B.destroyer(v,k||new W("pipe"))},cleanup:f}}function P(v){return M(v[v.length-1],"streams[stream.length - 1]"),v.pop()}function x(v){if(L(v))return v;else if(N(v))return O(v);throw new z("val",["Readable","Iterable","AsyncIterable"],v)}async function*O(v){if(!I)I=ZQ();yield*I.prototype[H].call(v)}async function _(v,R,S,{end:g}){let f,k=null;const y=(u)=>{if(u)f=u;if(k){const b=k;k=null,b()}},h=()=>new J((u,b)=>{if(f)b(f);else k=()=>{if(f)b(f);else u()}});R.on("drain",y);const p=K(R,{readable:!1},y);try{if(R.writableNeedDrain)await h();for await(let u of v)if(!R.write(u))await h();if(g)R.end();await h(),S()}catch(u){S(f!==u?$(f,u):u)}finally{p(),R.off("drain",y)}}function C(...v){return D(v,Z(P(v)))}function D(v,R,S){if(v.length===1&&X(v[0]))v=v[0];if(v.length<2)throw new U("streams");const g=new AbortController,f=g.signal,k=S===null||S===void 0?void 0:S.signal,y=[];F(k,"options.signal");function h(){d(new G)}k===null||k===void 0||k.addEventListener("abort",h);let p,u;const b=[];let m=0;function c(n){d(n,--m===0)}function d(n,o){if(n&&(!p||p.code==="ERR_STREAM_PREMATURE_CLOSE"))p=n;if(!p&&!o)return;while(b.length)b.shift()(p);if(k===null||k===void 0||k.removeEventListener("abort",h),g.abort(),o){if(!p)y.forEach((s)=>s());Iq(R,p,u)}}let l;for(let n=0;n0,r=s||(S===null||S===void 0?void 0:S.end)!==!1,t=n===v.length-1;if(A(o)){let e=function(qq){if(qq&&qq.name!=="AbortError"&&qq.code!=="ERR_STREAM_PREMATURE_CLOSE")c(qq)};if(r){const{destroy:qq,cleanup:Qq}=T(o,s,a);if(b.push(qq),j(o)&&t)y.push(Qq)}if(o.on("error",e),j(o)&&t)y.push(()=>{o.removeListener("error",e)})}if(n===0)if(typeof o==="function"){if(l=o({signal:f}),!L(l))throw new V("Iterable, AsyncIterable or Stream","source",l)}else if(L(o)||N(o))l=o;else l=Y.from(o);else if(typeof o==="function")if(l=x(l),l=o(l,{signal:f}),s){if(!L(l,!0))throw new V("AsyncIterable",`transform[${n-1}]`,l)}else{var i;if(!E)E=zQ();const e=new E({objectMode:!0}),qq=(i=l)===null||i===void 0?void 0:i.then;if(typeof qq==="function")m++,qq.call(l,(Jq)=>{if(u=Jq,Jq!=null)e.write(Jq);if(r)e.end();Iq(c)},(Jq)=>{e.destroy(Jq),Iq(c,Jq)});else if(L(l,!0))m++,_(l,e,c,{end:r});else throw new V("AsyncIterable or Promise","destination",l);l=e;const{destroy:Qq,cleanup:Xq}=T(l,!1,!0);if(b.push(Qq),t)y.push(Xq)}else if(A(o)){if(N(l)){m+=2;const e=w(l,o,c,{end:r});if(j(o)&&t)y.push(e)}else if(L(l))m++,_(l,o,c,{end:r});else throw new z("val",["Readable","Iterable","AsyncIterable"],l);l=o}else l=Y.from(o)}if(f!==null&&f!==void 0&&f.aborted||k!==null&&k!==void 0&&k.aborted)Iq(h);return l}function w(v,R,S,{end:g}){if(v.pipe(R,{end:g}),g)v.once("end",()=>R.end());else S();return K(v,{readable:!0,writable:!1},(f)=>{const k=v._readableState;if(f&&f.code==="ERR_STREAM_PREMATURE_CLOSE"&&k&&k.ended&&!k.errored&&!k.errorEmitted)v.once("end",S).once("error",S);else S(f)}),K(R,{readable:!1,writable:!0},S)}Q.exports={pipelineImpl:D,pipeline:C}}}),UQ=mq({"node_modules/readable-stream/lib/internal/streams/compose.js"(q,Q){var{pipeline:X}=VQ(),J=Cq(),{destroyer:H}=eq(),{isNodeStream:K,isReadable:Z,isWritable:B}=aq(),{AbortError:Y,codes:{ERR_INVALID_ARG_VALUE:$,ERR_MISSING_ARGS:z}}=oq();Q.exports=function V(...U){if(U.length===0)throw new z("streams");if(U.length===1)return J.from(U[0]);const W=[...U];if(typeof U[0]==="function")U[0]=J.from(U[0]);if(typeof U[U.length-1]==="function"){const P=U.length-1;U[P]=J.from(U[P])}for(let P=0;P0&&!B(U[P]))throw new $(`streams[${P}]`,W[P],"must be writable")}let G,M,F,L,j;function N(P){const x=L;if(L=null,x)x(P);else if(P)j.destroy(P);else if(!T&&!I)j.destroy()}const A=U[0],E=X(U,N),I=!!B(A),T=!!Z(E);if(j=new J({writableObjectMode:!!(A!==null&&A!==void 0&&A.writableObjectMode),readableObjectMode:!!(E!==null&&E!==void 0&&E.writableObjectMode),writable:I,readable:T}),I)j._write=function(P,x,O){if(A.write(P,x))O();else G=O},j._final=function(P){A.end(),M=P},A.on("drain",function(){if(G){const P=G;G=null,P()}}),E.on("finish",function(){if(M){const P=M;M=null,P()}});if(T)E.on("readable",function(){if(F){const P=F;F=null,P()}}),E.on("end",function(){j.push(null)}),j._read=function(){while(!0){const P=E.read();if(P===null){F=j._read;return}if(!j.push(P))return}};return j._destroy=function(P,x){if(!P&&L!==null)P=new Y;if(F=null,G=null,M=null,L===null)x(P);else L=x,H(E,P)},j}}}),WQ=mq({"node_modules/readable-stream/lib/stream/promises.js"(q,Q){var{ArrayPrototypePop:X,Promise:J}=Oq(),{isIterable:H,isNodeStream:K}=aq(),{pipelineImpl:Z}=VQ(),{finished:B}=rq();function Y(...$){return new J((z,V)=>{let U,W;const G=$[$.length-1];if(G&&typeof G==="object"&&!K(G)&&!H(G)){const M=X($);U=M.signal,W=M.end}Z($,(M,F)=>{if(M)V(M);else z(F)},{signal:U,end:W})})}Q.exports={finished:B,pipeline:Y}}}),GQ=mq({"node_modules/readable-stream/lib/stream.js"(q,Q){var{ObjectDefineProperty:X,ObjectKeys:J,ReflectApply:H}=Oq(),{promisify:{custom:K}}=_q(),{streamReturningOperators:Z,promiseReturningOperators:B}=tq(),{codes:{ERR_ILLEGAL_CONSTRUCTOR:Y}}=oq(),$=UQ(),{pipeline:z}=VQ(),{destroyer:V}=eq(),U=rq(),W=WQ(),G=aq(),M=Q.exports=qQ().Stream;M.isDisturbed=G.isDisturbed,M.isErrored=G.isErrored,M.isWritable=G.isWritable,M.isReadable=G.isReadable,M.Readable=ZQ();for(let L of J(Z)){let j=function(...A){if(new.target)throw Y();return M.Readable.from(H(N,this,A))};const N=Z[L];X(j,"name",{value:N.name}),X(j,"length",{value:N.length}),X(M.Readable.prototype,L,{value:j,enumerable:!1,configurable:!0,writable:!0})}for(let L of J(B)){let j=function(...A){if(new.target)throw Y();return H(N,this,A)};const N=B[L];X(j,"name",{value:N.name}),X(j,"length",{value:N.length}),X(M.Readable.prototype,L,{value:j,enumerable:!1,configurable:!0,writable:!0})}M.Writable=BQ(),M.Duplex=Cq(),M.Transform=$Q(),M.PassThrough=zQ(),M.pipeline=z;var{addAbortSignal:F}=QQ();M.addAbortSignal=F,M.finished=U,M.destroy=V,M.compose=$,X(M,"promises",{configurable:!0,enumerable:!0,get(){return W}}),X(z,K,{enumerable:!0,get(){return W.pipeline}}),X(U,K,{enumerable:!0,get(){return W.finished}}),M.Stream=M,M._isUint8Array=function L(j){return j instanceof Uint8Array},M._uint8ArrayToBuffer=function L(j){return new Buffer(j.buffer,j.byteOffset,j.byteLength)}}}),MQ=mq({"node_modules/readable-stream/lib/ours/index.js"(q,Q){const X=GQ(),J=WQ(),H=X.Readable.destroy;Q.exports=X,Q.exports._uint8ArrayToBuffer=X._uint8ArrayToBuffer,Q.exports._isUint8Array=X._isUint8Array,Q.exports.isDisturbed=X.isDisturbed,Q.exports.isErrored=X.isErrored,Q.exports.isWritable=X.isWritable,Q.exports.isReadable=X.isReadable,Q.exports.Readable=X.Readable,Q.exports.Writable=X.Writable,Q.exports.Duplex=X.Duplex,Q.exports.Transform=X.Transform,Q.exports.PassThrough=X.PassThrough,Q.exports.addAbortSignal=X.addAbortSignal,Q.exports.finished=X.finished,Q.exports.destroy=X.destroy,Q.exports.destroy=H,Q.exports.pipeline=X.pipeline,Q.exports.compose=X.compose,Q.exports._getNativeReadableStreamPrototype=jQ,Q.exports.NativeWritable=pQ,Tq.defineProperty(X,"promises",{configurable:!0,enumerable:!0,get(){return J}}),Q.exports.Stream=X.Stream,Q.exports.default=Q.exports}}),LQ={0:void 0,1:void 0,2:void 0,3:void 0,4:void 0,5:void 0},Eq=BQ(),pQ=class q extends Eq{#q;#Q;#X=!0;_construct;_destroy;_final;constructor(Q,X={}){super(X);this._construct=this.#J,this._destroy=this.#K,this._final=this.#Z,this.#q=Q}#J(Q){this._writableState.constructed=!0,this.constructed=!0,Q()}#H(){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(Q,X,J,H=this.#X){if(!H)return this.#X=!1,super.write(Q,X,J);if(!this.#Q)this.#H();var K=this.#Q,Z=K.write(Q);if(xq(Z))return Z.then(()=>{this.emit("drain"),K.flush(!0)}),!1;if(K.flush(!0),J)J(null,Q.byteLength);return!0}end(Q,X,J,H=this.#X){return super.end(Q,X,J,H)}#K(Q,X){if(this._writableState.destroyed=!0,X)X(Q)}#Z(Q){if(this.#Q)this.#Q.end();if(Q)Q()}ref(){if(!this.#Q)this.#H();this.#Q.ref()}unref(){if(!this.#Q)return;this.#Q.unref()}},AQ=MQ();AQ[Symbol.for("CommonJS")]=0;AQ[Symbol.for("::bunternal::")]={_ReadableFromWeb:HQ,_ReadableFromWebForUndici:KQ};var lQ=AQ,EQ=AQ._uint8ArrayToBuffer,IQ=AQ._isUint8Array,TQ=AQ.isDisturbed,PQ=AQ.isErrored,xQ=AQ.isWritable,OQ=AQ.isReadable,_Q=AQ.Readable,Eq=AQ.Writable,CQ=AQ.Duplex,DQ=AQ.Transform,wQ=AQ.PassThrough,vQ=AQ.addAbortSignal,RQ=AQ.finished,SQ=AQ.destroy,gQ=AQ.pipeline,fQ=AQ.compose,kQ=AQ.Stream,yQ=AQ["eos"]=rq,hQ=AQ._getNativeReadableStreamPrototype,pQ=AQ.NativeWritable,uQ=kQ.promises;export{uQ as promises,gQ as pipeline,xQ as isWritable,OQ as isReadable,PQ as isErrored,TQ as isDisturbed,RQ as finished,yQ as eos,SQ as destroy,lQ as default,fQ as compose,vQ as addAbortSignal,EQ as _uint8ArrayToBuffer,IQ as _isUint8Array,hQ as _getNativeReadableStreamPrototype,Eq as Writable,DQ as Transform,kQ as Stream,_Q as Readable,wQ as PassThrough,pQ as NativeWritable,CQ as Duplex}; +import{EventEmitter as CQ} from"bun:events_native";import{StringDecoder as Eq} from"node:string_decoder";var M=function(B){return typeof B==="object"&&B!==null&&B instanceof ReadableStream},F=function(B,Y){if(typeof B!=="boolean")throw new yQ(Y,"boolean",B)};var yQ=function(B,Y,U){return new Error(`The argument '${B}' is invalid. Received '${U}' for type '${Y}'`)},xq=function(B,Y,U){return new Error(`The value '${Y}' is invalid for argument '${B}'. Reason: ${U}`)},P=function(B,Y){var[U,H,X,q,J,Q,Z]=globalThis[Symbol.for("Bun.lazy")](B),K=[!1],oq=function(rq,m,tq,c){if(m>0){const eq=tq.subarray(0,m),d=tq.subarray(m);if(eq.byteLength>0)rq.push(eq);if(c)rq.push(null);return d.byteLength>0?d:void 0}if(c)rq.push(null);return tq},p=function(rq,m,tq,c){if(m.byteLength>0)rq.push(m);if(c)rq.push(null);return tq},sq=process.env.BUN_DISABLE_DYNAMIC_CHUNK_SIZE!=="1";const u=new FinalizationRegistry((rq)=>rq&&J(rq)),aq=512;var b=class rq extends Y{#q;#Q=1;#X=!1;#J=void 0;#H;#K=!1;#Z=!sq;#B;constructor(m,tq={}){super(tq);if(typeof tq.highWaterMark==="number")this.#H=tq.highWaterMark;else this.#H=262144;this.#q=m,this.#X=!1,this.#J=void 0,this.#K=!1,this.#B={},u.register(this,this.#q,this.#B)}_read(m){if(OQ&&Gq("NativeReadable._read",this.__id),this.#K){OQ&&Gq("pendingRead is true",this.__id);return}var tq=this.#q;if(OQ&&Gq("ptr @ NativeReadable._read",tq,this.__id),tq===0){this.push(null);return}if(!this.#X)OQ&&Gq("NativeReadable not constructed yet",this.__id),this.#Y(tq);return this.#V(this.#$(m),tq)}#Y(m){this.#X=!0;const tq=H(m,this.#H);if(OQ&&Gq("NativeReadable internal `start` result",tq,this.__id),typeof tq==="number"&&tq>1)this.#Z=!0,OQ&&Gq("NativeReadable resized",this.__id),this.#H=Math.min(this.#H,tq);if(Z){const c=Z(m);if(OQ&&Gq("NativeReadable drain result",c,this.__id),(c?.byteLength??0)>0)this.push(c)}}#$(m=this.#H){var tq=this.#J;if(OQ&&Gq("chunk @ #getRemainingChunk",tq,this.__id),tq?.byteLength??0aq?m:aq;this.#J=tq=new Buffer(c)}return tq}push(m,tq){return OQ&&Gq("NativeReadable push -- result, encoding",m,tq,this.__id),super.push(...arguments)}#z(m,tq,c){if(OQ&&Gq("result, isClosed @ #handleResult",m,c,this.__id),typeof m==="number"){if(m>=this.#H&&!this.#Z&&!c)this.#H*=2,this.#Z=!0;return oq(this,m,tq,c)}else if(typeof m==="boolean")return this.push(null),tq?.byteLength??0>0?tq:void 0;else if(ArrayBuffer.isView(m)){if(m.byteLength>=this.#H&&!this.#Z&&!c)this.#H*=2,this.#Z=!0,OQ&&Gq("Resized",this.__id);return p(this,m,tq,c)}else throw OQ&&Gq("Unknown result type",m,this.__id),new Error("Invalid result from pull")}#V(m,tq){OQ&&Gq("#internalRead()",this.__id),K[0]=!1;var c=U(tq,m,K);if(Lq(c))return this.#K=!0,c.then((eq)=>{this.#K=!1,OQ&&Gq("pending no longerrrrrrrr (result returned from pull)",this.__id),this.#J=this.#z(eq,m,K[0])},(eq)=>{OQ&&Gq("error from pull",eq,this.__id),errorOrDestroy(this,eq)});else this.#J=this.#z(c,m,K[0])}_destroy(m,tq){var c=this.#q;if(c===0){tq(m);return}if(u.unregister(this.#B),this.#q=0,Q)Q(c,!1);OQ&&Gq("NativeReadable destroyed",this.__id),X(c,m),tq(m)}ref(){var m=this.#q;if(m===0)return;if(this.#Q++===0)Q(m,!0)}unref(){var m=this.#q;if(m===0)return;if(this.#Q--===1)Q(m,!1)}};if(!Q)b.prototype.ref=void 0,b.prototype.unref=void 0;return b},O=function(B,Y){return x[B]||=P(B,Y)},_=function(B,Y,U){if(!(Y&&typeof Y==="object"&&Y instanceof ReadableStream))return;const H=vQ(Y);if(!H){Gq("no native readable stream");return}const{stream:X,data:q}=H;return new(O(q,B))(X,U)},{isPromise:Lq,isCallable:Nq,direct:vQ,Object:Fq}=globalThis[Symbol.for("Bun.lazy")]("primordials");globalThis.__IDS_TO_TRACK=process.env.DEBUG_TRACK_EE?.length?process.env.DEBUG_TRACK_EE.split(","):process.env.DEBUG_STREAMS?.length?process.env.DEBUG_STREAMS.split(","):null;var SQ=!!process.env.DEBUG_TRACK_EE,OQ=!!(process.env.DEBUG||process.env.DEBUG_STREAMS||SQ),Gq=OQ?globalThis.__IDS_TO_TRACK?(...B)=>{const Y=B[B.length-1];if(!globalThis.__IDS_TO_TRACK.includes(Y))return;console.log(`ID: ${Y}`,...B.slice(0,-1))}:(...B)=>console.log(...B.slice(0,-1)):()=>{},Iq=Fq.create,gQ=Fq.defineProperty,V=Fq.getOwnPropertyDescriptor,fQ=Fq.getOwnPropertyNames,Tq=Fq.getPrototypeOf,kQ=Fq.prototype.hasOwnProperty,W=Fq.setPrototypeOf,G=(B,Y)=>function U(){return Y||(0,B[fQ(B)[0]])((Y={exports:{}}).exports,Y),Y.exports};var _Q=process.nextTick;var Pq=Array.isArray,DQ=G({"node_modules/readable-stream/lib/ours/primordials.js"(B,Y){Y.exports={ArrayIsArray(U){return Array.isArray(U)},ArrayPrototypeIncludes(U,H){return U.includes(H)},ArrayPrototypeIndexOf(U,H){return U.indexOf(H)},ArrayPrototypeJoin(U,H){return U.join(H)},ArrayPrototypeMap(U,H){return U.map(H)},ArrayPrototypePop(U,H){return U.pop(H)},ArrayPrototypePush(U,H){return U.push(H)},ArrayPrototypeSlice(U,H,X){return U.slice(H,X)},Error,FunctionPrototypeCall(U,H,...X){return U.call(H,...X)},FunctionPrototypeSymbolHasInstance(U,H){return Function.prototype[Symbol.hasInstance].call(U,H)},MathFloor:Math.floor,Number,NumberIsInteger:Number.isInteger,NumberIsNaN:Number.isNaN,NumberMAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER,NumberMIN_SAFE_INTEGER:Number.MIN_SAFE_INTEGER,NumberParseInt:Number.parseInt,ObjectDefineProperties(U,H){return Fq.defineProperties(U,H)},ObjectDefineProperty(U,H,X){return Fq.defineProperty(U,H,X)},ObjectGetOwnPropertyDescriptor(U,H){return Fq.getOwnPropertyDescriptor(U,H)},ObjectKeys(U){return Fq.keys(U)},ObjectSetPrototypeOf(U,H){return Fq.setPrototypeOf(U,H)},Promise,PromisePrototypeCatch(U,H){return U.catch(H)},PromisePrototypeThen(U,H,X){return U.then(H,X)},PromiseReject(U){return Promise.reject(U)},ReflectApply:Reflect.apply,RegExpPrototypeTest(U,H){return U.test(H)},SafeSet:Set,String,StringPrototypeSlice(U,H,X){return U.slice(H,X)},StringPrototypeToLowerCase(U){return U.toLowerCase()},StringPrototypeToUpperCase(U){return U.toUpperCase()},StringPrototypeTrim(U){return U.trim()},Symbol,SymbolAsyncIterator:Symbol.asyncIterator,SymbolHasInstance:Symbol.hasInstance,SymbolIterator:Symbol.iterator,TypedArrayPrototypeSet(U,H,X){return U.set(H,X)},Uint8Array}}}),jq=G({"node_modules/readable-stream/lib/ours/util.js"(B,Y){var U=Fq.getPrototypeOf(async function(){}).constructor,H=typeof Blob!=="undefined"?function q(J){return J instanceof Blob}:function q(J){return!1},X=class extends Error{constructor(q){if(!Array.isArray(q))throw new TypeError(`Expected input to be an Array, got ${typeof q}`);let J="";for(let Q=0;Q{q=Z,J=K}),resolve:q,reject:J}},promisify(q){return new Promise((J,Q)=>{q((Z,...K)=>{if(Z)return Q(Z);return J(...K)})})},debuglog(){return function(){}},format(q,...J){return q.replace(/%([sdifj])/g,function(...[Q,Z]){const K=J.shift();if(Z==="f")return K.toFixed(6);else if(Z==="j")return JSON.stringify(K);else if(Z==="s"&&typeof K==="object")return`${K.constructor!==Fq?K.constructor.name:""} {}`.trim();else return K.toString()})},inspect(q){switch(typeof q){case"string":if(q.includes("'")){if(!q.includes('"'))return`"${q}"`;else if(!q.includes("`")&&!q.includes("${"))return`\`${q}\``}return`'${q}'`;case"number":if(isNaN(q))return"NaN";else if(Fq.is(q,-0))return String(q);return q;case"bigint":return`${String(q)}n`;case"boolean":case"undefined":return String(q);case"object":return"{}"}},types:{isAsyncFunction(q){return q instanceof U},isArrayBufferView(q){return ArrayBuffer.isView(q)}},isBlob:H},Y.exports.promisify.custom=Symbol.for("nodejs.util.promisify.custom")}}),hQ=G({"node_modules/readable-stream/lib/ours/errors.js"(B,Y){var{format:U,inspect:H,AggregateError:X}=jq(),q=globalThis.AggregateError||X,J=Symbol("kIsNodeError"),Q=["string","function","number","object","Function","Object","boolean","bigint","symbol"],Z=/^([A-Z][a-z0-9]*)+$/,K="__node_internal_",oq={};function p(tq,c){if(!tq)throw new oq.ERR_INTERNAL_ASSERTION(c)}function sq(tq){let c="",eq=tq.length;const d=tq[0]==="-"?1:0;for(;eq>=d+4;eq-=3)c=`_${tq.slice(eq-3,eq)}${c}`;return`${tq.slice(0,eq)}${c}`}function u(tq,c,eq){if(typeof c==="function")return p(c.length<=eq.length,`Code: ${tq}; The provided arguments length (${eq.length}) does not match the required ones (${c.length}).`),c(...eq);const d=(c.match(/%[dfijoOs]/g)||[]).length;if(p(d===eq.length,`Code: ${tq}; The provided arguments length (${eq.length}) does not match the required ones (${d}).`),eq.length===0)return c;return U(c,...eq)}function aq(tq,c,eq){if(!eq)eq=Error;class d extends eq{constructor(...qQ){super(u(tq,c,qQ))}toString(){return`${this.name} [${tq}]: ${this.message}`}}Fq.defineProperties(d.prototype,{name:{value:eq.name,writable:!0,enumerable:!1,configurable:!0},toString:{value(){return`${this.name} [${tq}]: ${this.message}`},writable:!0,enumerable:!1,configurable:!0}}),d.prototype.code=tq,d.prototype[J]=!0,oq[tq]=d}function b(tq){const c=K+tq.name;return Fq.defineProperty(tq,"name",{value:c}),tq}function rq(tq,c){if(tq&&c&&tq!==c){if(Array.isArray(c.errors))return c.errors.push(tq),c;const eq=new q([c,tq],c.message);return eq.code=c.code,eq}return tq||c}var m=class extends Error{constructor(tq="The operation was aborted",c=void 0){if(c!==void 0&&typeof c!=="object")throw new oq.ERR_INVALID_ARG_TYPE("options","Object",c);super(tq,c);this.code="ABORT_ERR",this.name="AbortError"}};aq("ERR_ASSERTION","%s",Error),aq("ERR_INVALID_ARG_TYPE",(tq,c,eq)=>{if(p(typeof tq==="string","'name' must be a string"),!Array.isArray(c))c=[c];let d="The ";if(tq.endsWith(" argument"))d+=`${tq} `;else d+=`"${tq}" ${tq.includes(".")?"property":"argument"} `;d+="must be ";const qQ=[],l=[],QQ=[];for(let XQ of c)if(p(typeof XQ==="string","All expected entries have to be of type string"),Q.includes(XQ))qQ.push(XQ.toLowerCase());else if(Z.test(XQ))l.push(XQ);else p(XQ!=="object",'The value "object" should be written as "Object"'),QQ.push(XQ);if(l.length>0){const XQ=qQ.indexOf("object");if(XQ!==-1)qQ.splice(qQ,XQ,1),l.push("Object")}if(qQ.length>0){switch(qQ.length){case 1:d+=`of type ${qQ[0]}`;break;case 2:d+=`one of type ${qQ[0]} or ${qQ[1]}`;break;default:{const XQ=qQ.pop();d+=`one of type ${qQ.join(", ")}, or ${XQ}`}}if(l.length>0||QQ.length>0)d+=" or "}if(l.length>0){switch(l.length){case 1:d+=`an instance of ${l[0]}`;break;case 2:d+=`an instance of ${l[0]} or ${l[1]}`;break;default:{const XQ=l.pop();d+=`an instance of ${l.join(", ")}, or ${XQ}`}}if(QQ.length>0)d+=" or "}switch(QQ.length){case 0:break;case 1:if(QQ[0].toLowerCase()!==QQ[0])d+="an ";d+=`${QQ[0]}`;break;case 2:d+=`one of ${QQ[0]} or ${QQ[1]}`;break;default:{const XQ=QQ.pop();d+=`one of ${QQ.join(", ")}, or ${XQ}`}}if(eq==null)d+=`. Received ${eq}`;else if(typeof eq==="function"&&eq.name)d+=`. Received function ${eq.name}`;else if(typeof eq==="object"){var i;if((i=eq.constructor)!==null&&i!==void 0&&i.name)d+=`. Received an instance of ${eq.constructor.name}`;else{const XQ=H(eq,{depth:-1});d+=`. Received ${XQ}`}}else{let XQ=H(eq,{colors:!1});if(XQ.length>25)XQ=`${XQ.slice(0,25)}...`;d+=`. Received type ${typeof eq} (${XQ})`}return d},TypeError),aq("ERR_INVALID_ARG_VALUE",(tq,c,eq="is invalid")=>{let d=H(c);if(d.length>128)d=d.slice(0,128)+"...";return`The ${tq.includes(".")?"property":"argument"} '${tq}' ${eq}. Received ${d}`},TypeError),aq("ERR_INVALID_RETURN_VALUE",(tq,c,eq)=>{var d;const qQ=eq!==null&&eq!==void 0&&(d=eq.constructor)!==null&&d!==void 0&&d.name?`instance of ${eq.constructor.name}`:`type ${typeof eq}`;return`Expected ${tq} to be returned from the "${c}" function but got ${qQ}.`},TypeError),aq("ERR_MISSING_ARGS",(...tq)=>{p(tq.length>0,"At least one arg needs to be specified");let c;const eq=tq.length;switch(tq=(Array.isArray(tq)?tq:[tq]).map((d)=>`"${d}"`).join(" or "),eq){case 1:c+=`The ${tq[0]} argument`;break;case 2:c+=`The ${tq[0]} and ${tq[1]} arguments`;break;default:{const d=tq.pop();c+=`The ${tq.join(", ")}, and ${d} arguments`}break}return`${c} must be specified`},TypeError),aq("ERR_OUT_OF_RANGE",(tq,c,eq)=>{p(c,'Missing "range" argument');let d;if(Number.isInteger(eq)&&Math.abs(eq)>4294967296)d=sq(String(eq));else if(typeof eq==="bigint"){if(d=String(eq),eq>2n**32n||eq<-(2n**32n))d=sq(d);d+="n"}else d=H(eq);return`The value of "${tq}" is out of range. It must be ${c}. Received ${d}`},RangeError),aq("ERR_MULTIPLE_CALLBACK","Callback called multiple times",Error),aq("ERR_METHOD_NOT_IMPLEMENTED","The %s method is not implemented",Error),aq("ERR_STREAM_ALREADY_FINISHED","Cannot call %s after a stream was finished",Error),aq("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable",Error),aq("ERR_STREAM_DESTROYED","Cannot call %s after a stream was destroyed",Error),aq("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),aq("ERR_STREAM_PREMATURE_CLOSE","Premature close",Error),aq("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF",Error),aq("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event",Error),aq("ERR_STREAM_WRITE_AFTER_END","write after end",Error),aq("ERR_UNKNOWN_ENCODING","Unknown encoding: %s",TypeError),Y.exports={AbortError:m,aggregateTwoErrors:b(rq),hideStackFrames:b,codes:oq}}}),L=G({"node_modules/readable-stream/lib/internal/validators.js"(B,Y){var{ArrayIsArray:U,ArrayPrototypeIncludes:H,ArrayPrototypeJoin:X,ArrayPrototypeMap:q,NumberIsInteger:J,NumberMAX_SAFE_INTEGER:Q,NumberMIN_SAFE_INTEGER:Z,NumberParseInt:K,RegExpPrototypeTest:oq,String:p,StringPrototypeToUpperCase:sq,StringPrototypeTrim:u}=DQ(),{hideStackFrames:aq,codes:{ERR_SOCKET_BAD_PORT:b,ERR_INVALID_ARG_TYPE:rq,ERR_INVALID_ARG_VALUE:m,ERR_OUT_OF_RANGE:tq,ERR_UNKNOWN_SIGNAL:c}}=hQ(),{normalizeEncoding:eq}=jq(),{isAsyncFunction:d,isArrayBufferView:qQ}=jq().types,l={};function QQ(UQ){return UQ===(UQ|0)}function i(UQ){return UQ===UQ>>>0}var XQ=/^[0-7]+$/,n="must be a 32-bit unsigned integer or an octal string";function JQ(UQ,Qq,WQ){if(typeof UQ==="undefined")UQ=WQ;if(typeof UQ==="string"){if(!oq(XQ,UQ))throw new m(Qq,UQ,n);UQ=K(UQ,8)}return HQ(UQ,Qq,0,4294967295),UQ}var o=aq((UQ,Qq,WQ=Z,Xq=Q)=>{if(typeof UQ!=="number")throw new rq(Qq,"number",UQ);if(!J(UQ))throw new tq(Qq,"an integer",UQ);if(UQXq)throw new tq(Qq,`>= ${WQ} && <= ${Xq}`,UQ)}),HQ=aq((UQ,Qq,WQ=-2147483648,Xq=2147483647)=>{if(typeof UQ!=="number")throw new rq(Qq,"number",UQ);if(!QQ(UQ)){if(!J(UQ))throw new tq(Qq,"an integer",UQ);throw new tq(Qq,`>= ${WQ} && <= ${Xq}`,UQ)}if(UQXq)throw new tq(Qq,`>= ${WQ} && <= ${Xq}`,UQ)}),s=aq((UQ,Qq,WQ)=>{if(typeof UQ!=="number")throw new rq(Qq,"number",UQ);if(!i(UQ)){if(!J(UQ))throw new tq(Qq,"an integer",UQ);throw new tq(Qq,`>= ${WQ?1:0} && < 4294967296`,UQ)}if(WQ&&UQ===0)throw new tq(Qq,">= 1 && < 4294967296",UQ)});function KQ(UQ,Qq){if(typeof UQ!=="string")throw new rq(Qq,"string",UQ)}function a(UQ,Qq){if(typeof UQ!=="number")throw new rq(Qq,"number",UQ)}var ZQ=aq((UQ,Qq,WQ)=>{if(!H(WQ,UQ)){const GQ="must be one of: "+X(q(WQ,(Jq)=>typeof Jq==="string"?`'${Jq}'`:p(Jq)),", ");throw new m(Qq,UQ,GQ)}});function r(UQ,Qq){if(typeof UQ!=="boolean")throw new rq(Qq,"boolean",UQ)}var BQ=aq((UQ,Qq,WQ)=>{const Xq=WQ==null,GQ=Xq?!1:WQ.allowArray,Jq=Xq?!1:WQ.allowFunction;if(!(Xq?!1:WQ.nullable)&&UQ===null||!GQ&&U(UQ)||typeof UQ!=="object"&&(!Jq||typeof UQ!=="function"))throw new rq(Qq,"Object",UQ)}),$=aq((UQ,Qq,WQ=0)=>{if(!U(UQ))throw new rq(Qq,"Array",UQ);if(UQ.length{if(!qQ(UQ))throw new rq(Qq,["Buffer","TypedArray","DataView"],UQ)});function $Q(UQ,Qq){const WQ=eq(Qq),Xq=UQ.length;if(WQ==="hex"&&Xq%2!==0)throw new m("encoding",Qq,`is invalid for data of length ${Xq}`)}function t(UQ,Qq="Port",WQ=!0){if(typeof UQ!=="number"&&typeof UQ!=="string"||typeof UQ==="string"&&u(UQ).length===0||+UQ!==+UQ>>>0||UQ>65535||UQ===0&&!WQ)throw new b(Qq,UQ,WQ);return UQ|0}var zQ=aq((UQ,Qq)=>{if(UQ!==void 0&&(UQ===null||typeof UQ!=="object"||!("aborted"in UQ)))throw new rq(Qq,"AbortSignal",UQ)}),e=aq((UQ,Qq)=>{if(typeof UQ!=="function")throw new rq(Qq,"Function",UQ)}),VQ=aq((UQ,Qq)=>{if(typeof UQ!=="function"||d(UQ))throw new rq(Qq,"Function",UQ)}),qq=aq((UQ,Qq)=>{if(UQ!==void 0)throw new rq(Qq,"undefined",UQ)});Y.exports={isInt32:QQ,isUint32:i,parseFileMode:JQ,validateArray:$,validateBoolean:r,validateBuffer:z,validateEncoding:$Q,validateFunction:e,validateInt32:HQ,validateInteger:o,validateNumber:a,validateObject:BQ,validateOneOf:ZQ,validatePlainFunction:VQ,validatePort:t,validateSignalName:YQ,validateString:KQ,validateUint32:s,validateUndefined:qq,validateAbortSignal:zQ}}}),j=G({"node_modules/readable-stream/lib/internal/streams/utils.js"(B,Y){var{Symbol:U,SymbolAsyncIterator:H,SymbolIterator:X}=DQ(),q=U("kDestroyed"),J=U("kIsErrored"),Q=U("kIsReadable"),Z=U("kIsDisturbed");function K(s,KQ=!1){var a;return!!(s&&typeof s.pipe==="function"&&typeof s.on==="function"&&(!KQ||typeof s.pause==="function"&&typeof s.resume==="function")&&(!s._writableState||((a=s._readableState)===null||a===void 0?void 0:a.readable)!==!1)&&(!s._writableState||s._readableState))}function oq(s){var KQ;return!!(s&&typeof s.write==="function"&&typeof s.on==="function"&&(!s._readableState||((KQ=s._writableState)===null||KQ===void 0?void 0:KQ.writable)!==!1))}function p(s){return!!(s&&typeof s.pipe==="function"&&s._readableState&&typeof s.on==="function"&&typeof s.write==="function")}function sq(s){return s&&(s._readableState||s._writableState||typeof s.write==="function"&&typeof s.on==="function"||typeof s.pipe==="function"&&typeof s.on==="function")}function u(s,KQ){if(s==null)return!1;if(KQ===!0)return typeof s[H]==="function";if(KQ===!1)return typeof s[X]==="function";return typeof s[H]==="function"||typeof s[X]==="function"}function aq(s){if(!sq(s))return null;const{_writableState:KQ,_readableState:a}=s,ZQ=KQ||a;return!!(s.destroyed||s[q]||ZQ!==null&&ZQ!==void 0&&ZQ.destroyed)}function b(s){if(!oq(s))return null;if(s.writableEnded===!0)return!0;const KQ=s._writableState;if(KQ!==null&&KQ!==void 0&&KQ.errored)return!1;if(typeof(KQ===null||KQ===void 0?void 0:KQ.ended)!=="boolean")return null;return KQ.ended}function rq(s,KQ){if(!oq(s))return null;if(s.writableFinished===!0)return!0;const a=s._writableState;if(a!==null&&a!==void 0&&a.errored)return!1;if(typeof(a===null||a===void 0?void 0:a.finished)!=="boolean")return null;return!!(a.finished||KQ===!1&&a.ended===!0&&a.length===0)}function m(s){if(!K(s))return null;if(s.readableEnded===!0)return!0;const KQ=s._readableState;if(!KQ||KQ.errored)return!1;if(typeof(KQ===null||KQ===void 0?void 0:KQ.ended)!=="boolean")return null;return KQ.ended}function tq(s,KQ){if(!K(s))return null;const a=s._readableState;if(a!==null&&a!==void 0&&a.errored)return!1;if(typeof(a===null||a===void 0?void 0:a.endEmitted)!=="boolean")return null;return!!(a.endEmitted||KQ===!1&&a.ended===!0&&a.length===0)}function c(s){if(s&&s[Q]!=null)return s[Q];if(typeof(s===null||s===void 0?void 0:s.readable)!=="boolean")return null;if(aq(s))return!1;return K(s)&&s.readable&&!tq(s)}function eq(s){if(typeof(s===null||s===void 0?void 0:s.writable)!=="boolean")return null;if(aq(s))return!1;return oq(s)&&s.writable&&!b(s)}function d(s,KQ){if(!sq(s))return null;if(aq(s))return!0;if((KQ===null||KQ===void 0?void 0:KQ.readable)!==!1&&c(s))return!1;if((KQ===null||KQ===void 0?void 0:KQ.writable)!==!1&&eq(s))return!1;return!0}function qQ(s){var KQ,a;if(!sq(s))return null;if(s.writableErrored)return s.writableErrored;return(KQ=(a=s._writableState)===null||a===void 0?void 0:a.errored)!==null&&KQ!==void 0?KQ:null}function l(s){var KQ,a;if(!sq(s))return null;if(s.readableErrored)return s.readableErrored;return(KQ=(a=s._readableState)===null||a===void 0?void 0:a.errored)!==null&&KQ!==void 0?KQ:null}function QQ(s){if(!sq(s))return null;if(typeof s.closed==="boolean")return s.closed;const{_writableState:KQ,_readableState:a}=s;if(typeof(KQ===null||KQ===void 0?void 0:KQ.closed)==="boolean"||typeof(a===null||a===void 0?void 0:a.closed)==="boolean")return(KQ===null||KQ===void 0?void 0:KQ.closed)||(a===null||a===void 0?void 0:a.closed);if(typeof s._closed==="boolean"&&i(s))return s._closed;return null}function i(s){return typeof s._closed==="boolean"&&typeof s._defaultKeepAlive==="boolean"&&typeof s._removedConnection==="boolean"&&typeof s._removedContLen==="boolean"}function XQ(s){return typeof s._sent100==="boolean"&&i(s)}function n(s){var KQ;return typeof s._consuming==="boolean"&&typeof s._dumped==="boolean"&&((KQ=s.req)===null||KQ===void 0?void 0:KQ.upgradeOrConnect)===void 0}function JQ(s){if(!sq(s))return null;const{_writableState:KQ,_readableState:a}=s,ZQ=KQ||a;return!ZQ&&XQ(s)||!!(ZQ&&ZQ.autoDestroy&&ZQ.emitClose&&ZQ.closed===!1)}function o(s){var KQ;return!!(s&&((KQ=s[Z])!==null&&KQ!==void 0?KQ:s.readableDidRead||s.readableAborted))}function HQ(s){var KQ,a,ZQ,r,BQ,$,YQ,z,$Q,t;return!!(s&&((KQ=(a=(ZQ=(r=(BQ=($=s[J])!==null&&$!==void 0?$:s.readableErrored)!==null&&BQ!==void 0?BQ:s.writableErrored)!==null&&r!==void 0?r:(YQ=s._readableState)===null||YQ===void 0?void 0:YQ.errorEmitted)!==null&&ZQ!==void 0?ZQ:(z=s._writableState)===null||z===void 0?void 0:z.errorEmitted)!==null&&a!==void 0?a:($Q=s._readableState)===null||$Q===void 0?void 0:$Q.errored)!==null&&KQ!==void 0?KQ:(t=s._writableState)===null||t===void 0?void 0:t.errored))}Y.exports={kDestroyed:q,isDisturbed:o,kIsDisturbed:Z,isErrored:HQ,kIsErrored:J,isReadable:c,kIsReadable:Q,isClosed:QQ,isDestroyed:aq,isDuplexNodeStream:p,isFinished:d,isIterable:u,isReadableNodeStream:K,isReadableEnded:m,isReadableFinished:tq,isReadableErrored:l,isNodeStream:sq,isWritable:eq,isWritableNodeStream:oq,isWritableEnded:b,isWritableFinished:rq,isWritableErrored:qQ,isServerRequest:n,isServerResponse:XQ,willEmitClose:JQ}}}),N=G({"node_modules/readable-stream/lib/internal/streams/end-of-stream.js"(B,Y){var{AbortError:U,codes:H}=hQ(),{ERR_INVALID_ARG_TYPE:X,ERR_STREAM_PREMATURE_CLOSE:q}=H,{once:J}=jq(),{validateAbortSignal:Q,validateFunction:Z,validateObject:K}=L(),{Promise:oq}=DQ(),{isClosed:p,isReadable:sq,isReadableNodeStream:u,isReadableFinished:aq,isReadableErrored:b,isWritable:rq,isWritableNodeStream:m,isWritableFinished:tq,isWritableErrored:c,isNodeStream:eq,willEmitClose:d}=j();function qQ(XQ){return XQ.setHeader&&typeof XQ.abort==="function"}var l=()=>{};function QQ(XQ,n,JQ){var o,HQ;if(arguments.length===2)JQ=n,n={};else if(n==null)n={};else K(n,"options");Z(JQ,"callback"),Q(n.signal,"options.signal"),JQ=J(JQ);const s=(o=n.readable)!==null&&o!==void 0?o:u(XQ),KQ=(HQ=n.writable)!==null&&HQ!==void 0?HQ:m(XQ);if(!eq(XQ))throw new X("stream","Stream",XQ);const{_writableState:a,_readableState:ZQ}=XQ,r=()=>{if(!XQ.writable)YQ()};let BQ=d(XQ)&&u(XQ)===s&&m(XQ)===KQ,$=tq(XQ,!1);const YQ=()=>{if($=!0,XQ.destroyed)BQ=!1;if(BQ&&(!XQ.readable||s))return;if(!s||z)JQ.call(XQ)};let z=aq(XQ,!1);const $Q=()=>{if(z=!0,XQ.destroyed)BQ=!1;if(BQ&&(!XQ.writable||KQ))return;if(!KQ||$)JQ.call(XQ)},t=(UQ)=>{JQ.call(XQ,UQ)};let zQ=p(XQ);const e=()=>{zQ=!0;const UQ=c(XQ)||b(XQ);if(UQ&&typeof UQ!=="boolean")return JQ.call(XQ,UQ);if(s&&!z&&u(XQ,!0)){if(!aq(XQ,!1))return JQ.call(XQ,new q)}if(KQ&&!$){if(!tq(XQ,!1))return JQ.call(XQ,new q)}JQ.call(XQ)},VQ=()=>{XQ.req.on("finish",YQ)};if(qQ(XQ)){if(XQ.on("complete",YQ),!BQ)XQ.on("abort",e);if(XQ.req)VQ();else XQ.on("request",VQ)}else if(KQ&&!a)XQ.on("end",r),XQ.on("close",r);if(!BQ&&typeof XQ.aborted==="boolean")XQ.on("aborted",e);if(XQ.on("end",$Q),XQ.on("finish",YQ),n.error!==!1)XQ.on("error",t);if(XQ.on("close",e),zQ)_Q(e);else if(a!==null&&a!==void 0&&a.errorEmitted||ZQ!==null&&ZQ!==void 0&&ZQ.errorEmitted){if(!BQ)_Q(e)}else if(!s&&(!BQ||sq(XQ))&&($||rq(XQ)===!1))_Q(e);else if(!KQ&&(!BQ||rq(XQ))&&(z||sq(XQ)===!1))_Q(e);else if(ZQ&&XQ.req&&XQ.aborted)_Q(e);const qq=()=>{if(JQ=l,XQ.removeListener("aborted",e),XQ.removeListener("complete",YQ),XQ.removeListener("abort",e),XQ.removeListener("request",VQ),XQ.req)XQ.req.removeListener("finish",YQ);XQ.removeListener("end",r),XQ.removeListener("close",r),XQ.removeListener("finish",YQ),XQ.removeListener("end",$Q),XQ.removeListener("error",t),XQ.removeListener("close",e)};if(n.signal&&!zQ){const UQ=()=>{const Qq=JQ;qq(),Qq.call(XQ,new U(void 0,{cause:n.signal.reason}))};if(n.signal.aborted)_Q(UQ);else{const Qq=JQ;JQ=J((...WQ)=>{n.signal.removeEventListener("abort",UQ),Qq.apply(XQ,WQ)}),n.signal.addEventListener("abort",UQ)}}return qq}function i(XQ,n){return new oq((JQ,o)=>{QQ(XQ,n,(HQ)=>{if(HQ)o(HQ);else JQ()})})}Y.exports=QQ,Y.exports.finished=i}}),A=G({"node_modules/readable-stream/lib/internal/streams/operators.js"(B,Y){var{codes:{ERR_INVALID_ARG_TYPE:U,ERR_MISSING_ARGS:H,ERR_OUT_OF_RANGE:X},AbortError:q}=hQ(),{validateAbortSignal:J,validateInteger:Q,validateObject:Z}=L(),K=DQ().Symbol("kWeak"),{finished:oq}=N(),{ArrayPrototypePush:p,MathFloor:sq,Number:u,NumberIsNaN:aq,Promise:b,PromiseReject:rq,PromisePrototypeCatch:m,Symbol:tq}=DQ(),c=tq("kEmpty"),eq=tq("kEof");function d(r,BQ){if(typeof r!=="function")throw new U("fn",["Function","AsyncFunction"],r);if(BQ!=null)Z(BQ,"options");if((BQ===null||BQ===void 0?void 0:BQ.signal)!=null)J(BQ.signal,"options.signal");let $=1;if((BQ===null||BQ===void 0?void 0:BQ.concurrency)!=null)$=sq(BQ.concurrency);return Q($,"concurrency",1),async function*YQ(){var z,$Q;const t=new AbortController,zQ=this,e=[],VQ=t.signal,qq={signal:VQ},UQ=()=>t.abort();if(BQ!==null&&BQ!==void 0&&(z=BQ.signal)!==null&&z!==void 0&&z.aborted)UQ();BQ===null||BQ===void 0||($Q=BQ.signal)===null||$Q===void 0||$Q.addEventListener("abort",UQ);let Qq,WQ,Xq=!1;function GQ(){Xq=!0}async function Jq(){try{for await(let FQ of zQ){var MQ;if(Xq)return;if(VQ.aborted)throw new q;try{FQ=r(FQ,qq)}catch(Kq){FQ=rq(Kq)}if(FQ===c)continue;if(typeof((MQ=FQ)===null||MQ===void 0?void 0:MQ.catch)==="function")FQ.catch(GQ);if(e.push(FQ),Qq)Qq(),Qq=null;if(!Xq&&e.length&&e.length>=$)await new b((Kq)=>{WQ=Kq})}e.push(eq)}catch(FQ){const Kq=rq(FQ);m(Kq,GQ),e.push(Kq)}finally{var Hq;if(Xq=!0,Qq)Qq(),Qq=null;BQ===null||BQ===void 0||(Hq=BQ.signal)===null||Hq===void 0||Hq.removeEventListener("abort",UQ)}}Jq();try{while(!0){while(e.length>0){const MQ=await e[0];if(MQ===eq)return;if(VQ.aborted)throw new q;if(MQ!==c)yield MQ;if(e.shift(),WQ)WQ(),WQ=null}await new b((MQ)=>{Qq=MQ})}}finally{if(t.abort(),Xq=!0,WQ)WQ(),WQ=null}}.call(this)}function qQ(r=void 0){if(r!=null)Z(r,"options");if((r===null||r===void 0?void 0:r.signal)!=null)J(r.signal,"options.signal");return async function*BQ(){let $=0;for await(let z of this){var YQ;if(r!==null&&r!==void 0&&(YQ=r.signal)!==null&&YQ!==void 0&&YQ.aborted)throw new q({cause:r.signal.reason});yield[$++,z]}}.call(this)}async function l(r,BQ=void 0){for await(let $ of n.call(this,r,BQ))return!0;return!1}async function QQ(r,BQ=void 0){if(typeof r!=="function")throw new U("fn",["Function","AsyncFunction"],r);return!await l.call(this,async(...$)=>{return!await r(...$)},BQ)}async function i(r,BQ){for await(let $ of n.call(this,r,BQ))return $;return}async function XQ(r,BQ){if(typeof r!=="function")throw new U("fn",["Function","AsyncFunction"],r);async function $(YQ,z){return await r(YQ,z),c}for await(let YQ of d.call(this,$,BQ));}function n(r,BQ){if(typeof r!=="function")throw new U("fn",["Function","AsyncFunction"],r);async function $(YQ,z){if(await r(YQ,z))return YQ;return c}return d.call(this,$,BQ)}var JQ=class extends H{constructor(){super("reduce");this.message="Reduce of an empty stream requires an initial value"}};async function o(r,BQ,$){var YQ;if(typeof r!=="function")throw new U("reducer",["Function","AsyncFunction"],r);if($!=null)Z($,"options");if(($===null||$===void 0?void 0:$.signal)!=null)J($.signal,"options.signal");let z=arguments.length>1;if($!==null&&$!==void 0&&(YQ=$.signal)!==null&&YQ!==void 0&&YQ.aborted){const VQ=new q(void 0,{cause:$.signal.reason});throw this.once("error",()=>{}),await oq(this.destroy(VQ)),VQ}const $Q=new AbortController,t=$Q.signal;if($!==null&&$!==void 0&&$.signal){const VQ={once:!0,[K]:this};$.signal.addEventListener("abort",()=>$Q.abort(),VQ)}let zQ=!1;try{for await(let VQ of this){var e;if(zQ=!0,$!==null&&$!==void 0&&(e=$.signal)!==null&&e!==void 0&&e.aborted)throw new q;if(!z)BQ=VQ,z=!0;else BQ=await r(BQ,VQ,{signal:t})}if(!zQ&&!z)throw new JQ}finally{$Q.abort()}return BQ}async function HQ(r){if(r!=null)Z(r,"options");if((r===null||r===void 0?void 0:r.signal)!=null)J(r.signal,"options.signal");const BQ=[];for await(let YQ of this){var $;if(r!==null&&r!==void 0&&($=r.signal)!==null&&$!==void 0&&$.aborted)throw new q(void 0,{cause:r.signal.reason});p(BQ,YQ)}return BQ}function s(r,BQ){const $=d.call(this,r,BQ);return async function*YQ(){for await(let z of $)yield*z}.call(this)}function KQ(r){if(r=u(r),aq(r))return 0;if(r<0)throw new X("number",">= 0",r);return r}function a(r,BQ=void 0){if(BQ!=null)Z(BQ,"options");if((BQ===null||BQ===void 0?void 0:BQ.signal)!=null)J(BQ.signal,"options.signal");return r=KQ(r),async function*$(){var YQ;if(BQ!==null&&BQ!==void 0&&(YQ=BQ.signal)!==null&&YQ!==void 0&&YQ.aborted)throw new q;for await(let $Q of this){var z;if(BQ!==null&&BQ!==void 0&&(z=BQ.signal)!==null&&z!==void 0&&z.aborted)throw new q;if(r--<=0)yield $Q}}.call(this)}function ZQ(r,BQ=void 0){if(BQ!=null)Z(BQ,"options");if((BQ===null||BQ===void 0?void 0:BQ.signal)!=null)J(BQ.signal,"options.signal");return r=KQ(r),async function*$(){var YQ;if(BQ!==null&&BQ!==void 0&&(YQ=BQ.signal)!==null&&YQ!==void 0&&YQ.aborted)throw new q;for await(let $Q of this){var z;if(BQ!==null&&BQ!==void 0&&(z=BQ.signal)!==null&&z!==void 0&&z.aborted)throw new q;if(r-- >0)yield $Q;else return}}.call(this)}Y.exports.streamReturningOperators={asIndexedPairs:qQ,drop:a,filter:n,flatMap:s,map:d,take:ZQ},Y.exports.promiseReturningOperators={every:QQ,forEach:XQ,reduce:o,toArray:HQ,some:l,find:i}}}),Oq=G({"node_modules/readable-stream/lib/internal/streams/destroy.js"(B,Y){var{aggregateTwoErrors:U,codes:{ERR_MULTIPLE_CALLBACK:H},AbortError:X}=hQ(),{Symbol:q}=DQ(),{kDestroyed:J,isDestroyed:Q,isFinished:Z,isServerRequest:K}=j(),oq="#kDestroy",p="#kConstruct";function sq(n,JQ,o){if(n){if(n.stack,JQ&&!JQ.errored)JQ.errored=n;if(o&&!o.errored)o.errored=n}}function u(n,JQ){const o=this._readableState,HQ=this._writableState,s=HQ||o;if(HQ&&HQ.destroyed||o&&o.destroyed){if(typeof JQ==="function")JQ();return this}if(sq(n,HQ,o),HQ)HQ.destroyed=!0;if(o)o.destroyed=!0;if(!s.constructed)this.once(oq,(KQ)=>{aq(this,U(KQ,n),JQ)});else aq(this,n,JQ);return this}function aq(n,JQ,o){let HQ=!1;function s(KQ){if(HQ)return;HQ=!0;const{_readableState:a,_writableState:ZQ}=n;if(sq(KQ,ZQ,a),ZQ)ZQ.closed=!0;if(a)a.closed=!0;if(typeof o==="function")o(KQ);if(KQ)_Q(b,n,KQ);else _Q(rq,n)}try{n._destroy(JQ||null,s)}catch(KQ){s(KQ)}}function b(n,JQ){m(n,JQ),rq(n)}function rq(n){const{_readableState:JQ,_writableState:o}=n;if(o)o.closeEmitted=!0;if(JQ)JQ.closeEmitted=!0;if(o&&o.emitClose||JQ&&JQ.emitClose)n.emit("close")}function m(n,JQ){const o=n?._readableState,HQ=n?._writableState;if(HQ?.errorEmitted||o?.errorEmitted)return;if(HQ)HQ.errorEmitted=!0;if(o)o.errorEmitted=!0;n?.emit?.("error",JQ)}function tq(){const n=this._readableState,JQ=this._writableState;if(n)n.constructed=!0,n.closed=!1,n.closeEmitted=!1,n.destroyed=!1,n.errored=null,n.errorEmitted=!1,n.reading=!1,n.ended=n.readable===!1,n.endEmitted=n.readable===!1;if(JQ)JQ.constructed=!0,JQ.destroyed=!1,JQ.closed=!1,JQ.closeEmitted=!1,JQ.errored=null,JQ.errorEmitted=!1,JQ.finalCalled=!1,JQ.prefinished=!1,JQ.ended=JQ.writable===!1,JQ.ending=JQ.writable===!1,JQ.finished=JQ.writable===!1}function c(n,JQ,o){const HQ=n?._readableState,s=n?._writableState;if(s&&s.destroyed||HQ&&HQ.destroyed)return this;if(HQ&&HQ.autoDestroy||s&&s.autoDestroy)n.destroy(JQ);else if(JQ){if(Error.captureStackTrace(JQ),s&&!s.errored)s.errored=JQ;if(HQ&&!HQ.errored)HQ.errored=JQ;if(o)_Q(m,n,JQ);else m(n,JQ)}}function eq(n,JQ){if(typeof n._construct!=="function")return;const{_readableState:o,_writableState:HQ}=n;if(o)o.constructed=!1;if(HQ)HQ.constructed=!1;if(n.once(p,JQ),n.listenerCount(p)>1)return;_Q(d,n)}function d(n){let JQ=!1;function o(HQ){if(JQ){c(n,HQ!==null&&HQ!==void 0?HQ:new H);return}JQ=!0;const{_readableState:s,_writableState:KQ}=n,a=KQ||s;if(s)s.constructed=!0;if(KQ)KQ.constructed=!0;if(a.destroyed)n.emit(oq,HQ);else if(HQ)c(n,HQ,!0);else _Q(qQ,n)}try{n._construct(o)}catch(HQ){o(HQ)}}function qQ(n){n.emit(p)}function l(n){return n&&n.setHeader&&typeof n.abort==="function"}function QQ(n){n.emit("close")}function i(n,JQ){n.emit("error",JQ),_Q(QQ,n)}function XQ(n,JQ){if(!n||Q(n))return;if(!JQ&&!Z(n))JQ=new X;if(K(n))n.socket=null,n.destroy(JQ);else if(l(n))n.abort();else if(l(n.req))n.req.abort();else if(typeof n.destroy==="function")n.destroy(JQ);else if(typeof n.close==="function")n.close();else if(JQ)_Q(i,n);else _Q(QQ,n);if(!n.destroyed)n[J]=!0}Y.exports={construct:eq,destroyer:XQ,destroy:u,undestroy:tq,errorOrDestroy:c}}}),pQ=G({"node_modules/readable-stream/lib/internal/streams/legacy.js"(B,Y){var{ArrayIsArray:U,ObjectSetPrototypeOf:H}=DQ();function X(J){if(!(this instanceof X))return new X(J);CQ.call(this,J)}H(X.prototype,CQ.prototype),H(X,CQ),X.prototype.pipe=function(J,Q){const Z=this;function K(rq){if(J.writable&&J.write(rq)===!1&&Z.pause)Z.pause()}Z.on("data",K);function oq(){if(Z.readable&&Z.resume)Z.resume()}if(J.on("drain",oq),!J._isStdio&&(!Q||Q.end!==!1))Z.on("end",sq),Z.on("close",u);let p=!1;function sq(){if(p)return;p=!0,J.end()}function u(){if(p)return;if(p=!0,typeof J.destroy==="function")J.destroy()}function aq(rq){if(b(),CQ.listenerCount(this,"error")===0)this.emit("error",rq)}q(Z,"error",aq),q(J,"error",aq);function b(){Z.removeListener("data",K),J.removeListener("drain",oq),Z.removeListener("end",sq),Z.removeListener("close",u),Z.removeListener("error",aq),J.removeListener("error",aq),Z.removeListener("end",b),Z.removeListener("close",b),J.removeListener("close",b)}return Z.on("end",b),Z.on("close",b),J.on("close",b),J.emit("pipe",Z),J};function q(J,Q,Z){if(typeof J.prependListener==="function")return J.prependListener(Q,Z);if(!J._events||!J._events[Q])J.on(Q,Z);else if(U(J._events[Q]))J._events[Q].unshift(Z);else J._events[Q]=[Z,J._events[Q]]}Y.exports={Stream:X,prependListener:q}}}),_q=G({"node_modules/readable-stream/lib/internal/streams/add-abort-signal.js"(B,Y){var{AbortError:U,codes:H}=hQ(),X=N(),{ERR_INVALID_ARG_TYPE:q}=H,J=(Z,K)=>{if(typeof Z!=="object"||!("aborted"in Z))throw new q(K,"AbortSignal",Z)};function Q(Z){return!!(Z&&typeof Z.pipe==="function")}Y.exports.addAbortSignal=function Z(K,oq){if(J(K,"signal"),!Q(oq))throw new q("stream","stream.Stream",oq);return Y.exports.addAbortSignalNoValidate(K,oq)},Y.exports.addAbortSignalNoValidate=function(Z,K){if(typeof Z!=="object"||!("aborted"in Z))return K;const oq=()=>{K.destroy(new U(void 0,{cause:Z.reason}))};if(Z.aborted)oq();else Z.addEventListener("abort",oq),X(K,()=>Z.removeEventListener("abort",oq));return K}}}),uQ=G({"node_modules/readable-stream/lib/internal/streams/state.js"(B,Y){var{MathFloor:U,NumberIsInteger:H}=DQ(),{ERR_INVALID_ARG_VALUE:X}=hQ().codes;function q(Z,K,oq){return Z.highWaterMark!=null?Z.highWaterMark:K?Z[oq]:null}function J(Z){return Z?16:16384}function Q(Z,K,oq,p){const sq=q(K,p,oq);if(sq!=null){if(!H(sq)||sq<0){const u=p?`options.${oq}`:"options.highWaterMark";throw new X(u,sq)}return U(sq)}return J(Z.objectMode)}Y.exports={getHighWaterMark:Q,getDefaultHighWaterMark:J}}}),Cq=G({"node_modules/readable-stream/lib/internal/streams/from.js"(B,Y){var{PromisePrototypeThen:U,SymbolAsyncIterator:H,SymbolIterator:X}=DQ(),{ERR_INVALID_ARG_TYPE:q,ERR_STREAM_NULL_VALUES:J}=hQ().codes;function Q(Z,K,oq){let p;if(typeof K==="string"||K instanceof Buffer)return new Z({objectMode:!0,...oq,read(){this.push(K),this.push(null)}});let sq;if(K&&K[H])sq=!0,p=K[H]();else if(K&&K[X])sq=!1,p=K[X]();else throw new q("iterable",["Iterable"],K);const u=new Z({objectMode:!0,highWaterMark:1,...oq});let aq=!1;u._read=function(){if(!aq)aq=!0,rq()},u._destroy=function(m,tq){U(b(m),()=>_Q(tq,m),(c)=>_Q(tq,c||m))};async function b(m){const tq=m!==void 0&&m!==null,c=typeof p.throw==="function";if(tq&&c){const{value:eq,done:d}=await p.throw(m);if(await eq,d)return}if(typeof p.return==="function"){const{value:eq}=await p.return();await eq}}async function rq(){for(;;){try{const{value:m,done:tq}=sq?await p.next():p.next();if(tq)u.push(null);else{const c=m&&typeof m.then==="function"?await m:m;if(c===null)throw aq=!1,new J;else if(u.push(c))continue;else aq=!1}}catch(m){u.destroy(m)}break}}return u}Y.exports=Q}}),bQ,Dq,mQ=G({"node_modules/readable-stream/lib/internal/streams/readable.js"(B,Y){var{ArrayPrototypeIndexOf:U,NumberIsInteger:H,NumberIsNaN:X,NumberParseInt:q,ObjectDefineProperties:J,ObjectKeys:Q,ObjectSetPrototypeOf:Z,Promise:K,SafeSet:oq,SymbolAsyncIterator:p,Symbol:sq}=DQ(),u=globalThis[Symbol.for("Bun.lazy")]("bun:stream").ReadableState,{Stream:aq,prependListener:b}=pQ();function rq(FQ){if(!(this instanceof rq))return new rq(FQ);const Kq=this instanceof wQ();if(this._readableState=new u(FQ,this,Kq),FQ){const{read:LQ,destroy:Zq,construct:jQ,signal:Bq}=FQ;if(typeof LQ==="function")this._read=LQ;if(typeof Zq==="function")this._destroy=Zq;if(typeof jQ==="function")this._construct=jQ;if(Bq&&!Kq)c(Bq,this)}aq.call(this,FQ),n.construct(this,()=>{if(this._readableState.needReadable)i(this,this._readableState)})}Z(rq.prototype,aq.prototype),Z(rq,aq),rq.prototype.on=function(FQ,Kq){const LQ=aq.prototype.on.call(this,FQ,Kq),Zq=this._readableState;if(FQ==="data")if(Zq.readableListening=this.listenerCount("readable")>0,Zq.flowing!==!1)OQ&&Gq("in flowing mode!",this.__id),this.resume();else OQ&&Gq("in readable mode!",this.__id);else if(FQ==="readable"){if(OQ&&Gq("readable listener added!",this.__id),!Zq.endEmitted&&!Zq.readableListening){if(Zq.readableListening=Zq.needReadable=!0,Zq.flowing=!1,Zq.emittedReadable=!1,OQ&&Gq("on readable - state.length, reading, emittedReadable",Zq.length,Zq.reading,Zq.emittedReadable,this.__id),Zq.length)XQ(this,Zq);else if(!Zq.reading)_Q(qq,this)}else if(Zq.endEmitted)OQ&&Gq("end already emitted...",this.__id)}return LQ};class m extends rq{#q;#Q;#X;#J;constructor(FQ,Kq){const{objectMode:LQ,highWaterMark:Zq,encoding:jQ,signal:Bq}=FQ;super({objectMode:LQ,highWaterMark:Zq,encoding:jQ,signal:Bq});this.#X=[],this.#q=void 0,this.#J=Kq,this.#Q=!1}#H(){var FQ=this.#X,Kq=0,LQ=FQ.length;for(;Kq0)this.#X=[];return!1}#K(FQ){FQ.releaseLock(),this.#q=void 0,this.#Q=!0,this.push(null);return}async _read(){OQ&&Gq("ReadableFromWeb _read()",this.__id);var FQ=this.#J,Kq=this.#q;if(FQ)Kq=this.#q=FQ.getReader(),this.#J=void 0;else if(this.#H())return;var LQ;try{do{var Zq=!1,jQ;const Bq=Kq.readMany();if(Lq(Bq)){if({done:Zq,value:jQ}=await Bq,this.#Q){this.#X.push(...jQ);return}}else({done:Zq,value:jQ}=Bq);if(Zq){this.#K(Kq);return}if(!this.push(jQ[0])){this.#X=jQ.slice(1);return}for(let NQ=1,Yq=jQ.length;NQ{this.#Q=!0,Kq(FQ)});return}try{Kq(FQ)}catch(Zq){globalThis.reportError(Zq)}}}Dq=m;function tq(FQ,Kq={}){if(!M(FQ))throw new o("readableStream","ReadableStream",FQ);ZQ(Kq,"options");const{highWaterMark:LQ,encoding:Zq,objectMode:jQ=!1,signal:Bq}=Kq;if(Zq!==void 0&&!Buffer.isEncoding(Zq))throw new xq(Zq,"options.encoding");return F(jQ,"options.objectMode"),_(rq,FQ,Kq)||new m({highWaterMark:LQ,encoding:Zq,objectMode:jQ,signal:Bq},FQ)}Y.exports=rq,bQ=tq;var{addAbortSignal:c}=_q(),eq=N();const{maybeReadMore:d,resume:qQ,emitReadable:l,onEofChunk:QQ}=globalThis[Symbol.for("Bun.lazy")]("bun:stream");function i(FQ,Kq){process.nextTick(d,FQ,Kq)}function XQ(FQ,Kq){OQ&&Gq("NativeReadable - emitReadable",FQ.__id),l(FQ,Kq)}var n=Oq(),{aggregateTwoErrors:JQ,codes:{ERR_INVALID_ARG_TYPE:o,ERR_METHOD_NOT_IMPLEMENTED:HQ,ERR_OUT_OF_RANGE:s,ERR_STREAM_PUSH_AFTER_EOF:KQ,ERR_STREAM_UNSHIFT_AFTER_END_EVENT:a}}=hQ(),{validateObject:ZQ}=L(),r=Cq(),BQ=()=>{},{errorOrDestroy:$}=n;rq.prototype.destroy=n.destroy,rq.prototype._undestroy=n.undestroy,rq.prototype._destroy=function(FQ,Kq){Kq(FQ)},rq.prototype[CQ.captureRejectionSymbol]=function(FQ){this.destroy(FQ)},rq.prototype.push=function(FQ,Kq){return YQ(this,FQ,Kq,!1)},rq.prototype.unshift=function(FQ,Kq){return YQ(this,FQ,Kq,!0)};function YQ(FQ,Kq,LQ,Zq){OQ&&Gq("readableAddChunk",Kq,FQ.__id);const jQ=FQ._readableState;let Bq;if(!jQ.objectMode){if(typeof Kq==="string"){if(LQ=LQ||jQ.defaultEncoding,jQ.encoding!==LQ)if(Zq&&jQ.encoding)Kq=Buffer.from(Kq,LQ).toString(jQ.encoding);else Kq=Buffer.from(Kq,LQ),LQ=""}else if(Kq instanceof Buffer)LQ="";else if(aq._isUint8Array(Kq)){if(Zq||!jQ.decoder)Kq=aq._uint8ArrayToBuffer(Kq);LQ=""}else if(Kq!=null)Bq=new o("chunk",["string","Buffer","Uint8Array"],Kq)}if(Bq)$(FQ,Bq);else if(Kq===null)jQ.reading=!1,QQ(FQ,jQ);else if(jQ.objectMode||Kq&&Kq.length>0)if(Zq)if(jQ.endEmitted)$(FQ,new a);else if(jQ.destroyed||jQ.errored)return!1;else z(FQ,jQ,Kq,!0);else if(jQ.ended)$(FQ,new KQ);else if(jQ.destroyed||jQ.errored)return!1;else if(jQ.reading=!1,jQ.decoder&&!LQ)if(Kq=jQ.decoder.write(Kq),jQ.objectMode||Kq.length!==0)z(FQ,jQ,Kq,!1);else i(FQ,jQ);else z(FQ,jQ,Kq,!1);else if(!Zq)jQ.reading=!1,i(FQ,jQ);return!jQ.ended&&(jQ.length0){if(Kq.multiAwaitDrain)Kq.awaitDrainWriters.clear();else Kq.awaitDrainWriters=null;Kq.dataEmitted=!0,FQ.emit("data",LQ)}else{if(Kq.length+=Kq.objectMode?1:LQ.length,Zq)Kq.buffer.unshift(LQ);else Kq.buffer.push(LQ);if(OQ&&Gq("needReadable @ addChunk",Kq.needReadable,FQ.__id),Kq.needReadable)XQ(FQ,Kq)}i(FQ,Kq)}rq.prototype.isPaused=function(){const FQ=this._readableState;return FQ.paused===!0||FQ.flowing===!1},rq.prototype.setEncoding=function(FQ){const Kq=new Eq(FQ);this._readableState.decoder=Kq,this._readableState.encoding=this._readableState.decoder.encoding;const LQ=this._readableState.buffer;let Zq="";for(let jQ=LQ.length;jQ>0;jQ--)Zq+=Kq.write(LQ.shift());if(Zq!=="")LQ.push(Zq);return this._readableState.length=Zq.length,this};var $Q=1073741824;function t(FQ){if(FQ>$Q)throw new s("size","<= 1GiB",FQ);else FQ--,FQ|=FQ>>>1,FQ|=FQ>>>2,FQ|=FQ>>>4,FQ|=FQ>>>8,FQ|=FQ>>>16,FQ++;return FQ}function zQ(FQ,Kq){if(FQ<=0||Kq.length===0&&Kq.ended)return 0;if(Kq.objectMode)return 1;if(X(FQ)){if(Kq.flowing&&Kq.length)return Kq.buffer.first().length;return Kq.length}if(FQ<=Kq.length)return FQ;return Kq.ended?Kq.length:0}rq.prototype.read=function(FQ){if(OQ&&Gq("read - n =",FQ,this.__id),!H(FQ))FQ=q(FQ,10);const Kq=this._readableState,LQ=FQ;if(FQ>Kq.highWaterMark)Kq.highWaterMark=t(FQ);if(FQ!==0)Kq.emittedReadable=!1;if(FQ===0&&Kq.needReadable&&((Kq.highWaterMark!==0?Kq.length>=Kq.highWaterMark:Kq.length>0)||Kq.ended)){if(OQ&&Gq("read: emitReadable or endReadable",Kq.length,Kq.ended,this.__id),Kq.length===0&&Kq.ended)Xq(this);else XQ(this,Kq);return null}if(FQ=zQ(FQ,Kq),FQ===0&&Kq.ended){if(OQ&&Gq("read: calling endReadable if length 0 -- length, state.ended",Kq.length,Kq.ended,this.__id),Kq.length===0)Xq(this);return null}let Zq=Kq.needReadable;if(OQ&&Gq("need readable",Zq,this.__id),Kq.length===0||Kq.length-FQ0)Bq=WQ(FQ,Kq);else Bq=null;if(OQ&&Gq("ret @ read",Bq,this.__id),Bq===null)Kq.needReadable=Kq.length<=Kq.highWaterMark,OQ&&Gq("state.length while ret = null",Kq.length,this.__id),FQ=0;else if(Kq.length-=FQ,Kq.multiAwaitDrain)Kq.awaitDrainWriters.clear();else Kq.awaitDrainWriters=null;if(Kq.length===0){if(!Kq.ended)Kq.needReadable=!0;if(LQ!==FQ&&Kq.ended)Xq(this)}if(Bq!==null&&!Kq.errorEmitted&&!Kq.closeEmitted)Kq.dataEmitted=!0,this.emit("data",Bq);return Bq},rq.prototype._read=function(FQ){throw new HQ("_read()")},rq.prototype.pipe=function(FQ,Kq){const LQ=this,Zq=this._readableState;if(Zq.pipes.length===1){if(!Zq.multiAwaitDrain)Zq.multiAwaitDrain=!0,Zq.awaitDrainWriters=new oq(Zq.awaitDrainWriters?[Zq.awaitDrainWriters]:[])}Zq.pipes.push(FQ),OQ&&Gq("pipe count=%d opts=%j",Zq.pipes.length,Kq,LQ.__id);const Bq=(!Kq||Kq.end!==!1)&&FQ!==process.stdout&&FQ!==process.stderr?Yq:PQ;if(Zq.endEmitted)_Q(Bq);else LQ.once("end",Bq);FQ.on("unpipe",NQ);function NQ(Wq,xQ){if(OQ&&Gq("onunpipe",LQ.__id),Wq===LQ){if(xQ&&xQ.hasUnpiped===!1)xQ.hasUnpiped=!0,EQ()}}function Yq(){OQ&&Gq("onend",LQ.__id),FQ.end()}let AQ,$q=!1;function EQ(){if(OQ&&Gq("cleanup",LQ.__id),FQ.removeListener("close",TQ),FQ.removeListener("finish",Uq),AQ)FQ.removeListener("drain",AQ);if(FQ.removeListener("error",Vq),FQ.removeListener("unpipe",NQ),LQ.removeListener("end",Yq),LQ.removeListener("end",PQ),LQ.removeListener("data",IQ),$q=!0,AQ&&Zq.awaitDrainWriters&&(!FQ._writableState||FQ._writableState.needDrain))AQ()}function zq(){if(!$q){if(Zq.pipes.length===1&&Zq.pipes[0]===FQ)OQ&&Gq("false write response, pause",0,LQ.__id),Zq.awaitDrainWriters=FQ,Zq.multiAwaitDrain=!1;else if(Zq.pipes.length>1&&Zq.pipes.includes(FQ))OQ&&Gq("false write response, pause",Zq.awaitDrainWriters.size,LQ.__id),Zq.awaitDrainWriters.add(FQ);LQ.pause()}if(!AQ)AQ=e(LQ,FQ),FQ.on("drain",AQ)}LQ.on("data",IQ);function IQ(Wq){OQ&&Gq("ondata",LQ.__id);const xQ=FQ.write(Wq);if(OQ&&Gq("dest.write",xQ,LQ.__id),xQ===!1)zq()}function Vq(Wq){if(Gq("onerror",Wq),PQ(),FQ.removeListener("error",Vq),FQ.listenerCount("error")===0){const xQ=FQ._writableState||FQ._readableState;if(xQ&&!xQ.errorEmitted)$(FQ,Wq);else FQ.emit("error",Wq)}}b(FQ,"error",Vq);function TQ(){FQ.removeListener("finish",Uq),PQ()}FQ.once("close",TQ);function Uq(){Gq("onfinish"),FQ.removeListener("close",TQ),PQ()}FQ.once("finish",Uq);function PQ(){Gq("unpipe"),LQ.unpipe(FQ)}if(FQ.emit("pipe",LQ),FQ.writableNeedDrain===!0){if(Zq.flowing)zq()}else if(!Zq.flowing)Gq("pipe resume"),LQ.resume();return FQ};function e(FQ,Kq){return function LQ(){const Zq=FQ._readableState;if(Zq.awaitDrainWriters===Kq)Gq("pipeOnDrain",1),Zq.awaitDrainWriters=null;else if(Zq.multiAwaitDrain)Gq("pipeOnDrain",Zq.awaitDrainWriters.size),Zq.awaitDrainWriters.delete(Kq);if((!Zq.awaitDrainWriters||Zq.awaitDrainWriters.size===0)&&FQ.listenerCount("data"))FQ.resume()}}rq.prototype.unpipe=function(FQ){const Kq=this._readableState,LQ={hasUnpiped:!1};if(Kq.pipes.length===0)return this;if(!FQ){const jQ=Kq.pipes;Kq.pipes=[],this.pause();for(let Bq=0;Bq0,Kq.resumeScheduled&&Kq.paused===!1)Kq.flowing=!0;else if(FQ.listenerCount("data")>0)FQ.resume();else if(!Kq.readableListening)Kq.flowing=null}function qq(FQ){OQ&&Gq("on readable nextTick, calling read(0)",FQ.__id),FQ.read(0)}rq.prototype.resume=function(){const FQ=this._readableState;if(!FQ.flowing)OQ&&Gq("resume",this.__id),FQ.flowing=!FQ.readableListening,qQ(this,FQ);return FQ.paused=!1,this},rq.prototype.pause=function(){if(OQ&&Gq("call pause flowing=%j",this._readableState.flowing,this.__id),this._readableState.flowing!==!1)OQ&&Gq("pause",this.__id),this._readableState.flowing=!1,this.emit("pause");return this._readableState.paused=!0,this},rq.prototype.wrap=function(FQ){let Kq=!1;FQ.on("data",(Zq)=>{if(!this.push(Zq)&&FQ.pause)Kq=!0,FQ.pause()}),FQ.on("end",()=>{this.push(null)}),FQ.on("error",(Zq)=>{$(this,Zq)}),FQ.on("close",()=>{this.destroy()}),FQ.on("destroy",()=>{this.destroy()}),this._read=()=>{if(Kq&&FQ.resume)Kq=!1,FQ.resume()};const LQ=Q(FQ);for(let Zq=1;Zq{jQ=NQ?JQ(jQ,NQ):null,LQ(),LQ=BQ});try{while(!0){const NQ=FQ.destroyed?null:FQ.read();if(NQ!==null)yield NQ;else if(jQ)throw jQ;else if(jQ===null)return;else await new K(Zq)}}catch(NQ){throw jQ=JQ(jQ,NQ),jQ}finally{if((jQ||(Kq===null||Kq===void 0?void 0:Kq.destroyOnReturn)!==!1)&&(jQ===void 0||FQ._readableState.autoDestroy))n.destroyer(FQ,null);else FQ.off("readable",Zq),Bq()}}J(rq.prototype,{readable:{get(){const FQ=this._readableState;return!!FQ&&FQ.readable!==!1&&!FQ.destroyed&&!FQ.errorEmitted&&!FQ.endEmitted},set(FQ){if(this._readableState)this._readableState.readable=!!FQ}},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(FQ){if(this._readableState)this._readableState.flowing=FQ}},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(FQ){if(!this._readableState)return;this._readableState.destroyed=FQ}},readableEnded:{enumerable:!1,get(){return this._readableState?this._readableState.endEmitted:!1}}}),rq._fromList=WQ;function WQ(FQ,Kq){if(Kq.length===0)return null;let LQ;if(Kq.objectMode)LQ=Kq.buffer.shift();else if(!FQ||FQ>=Kq.length){if(Kq.decoder)LQ=Kq.buffer.join("");else if(Kq.buffer.length===1)LQ=Kq.buffer.first();else LQ=Kq.buffer.concat(Kq.length);Kq.buffer.clear()}else LQ=Kq.buffer.consume(FQ,Kq.decoder);return LQ}function Xq(FQ){const Kq=FQ._readableState;if(OQ&&Gq("endEmitted @ endReadable",Kq.endEmitted,FQ.__id),!Kq.endEmitted)Kq.ended=!0,_Q(GQ,Kq,FQ)}function GQ(FQ,Kq){if(OQ&&Gq("endReadableNT -- endEmitted, state.length",FQ.endEmitted,FQ.length,Kq.__id),!FQ.errored&&!FQ.closeEmitted&&!FQ.endEmitted&&FQ.length===0){if(FQ.endEmitted=!0,Kq.emit("end"),OQ&&Gq("end emitted @ endReadableNT",Kq.__id),Kq.writable&&Kq.allowHalfOpen===!1)_Q(Jq,Kq);else if(FQ.autoDestroy){const LQ=Kq._writableState;if(!LQ||LQ.autoDestroy&&(LQ.finished||LQ.writable===!1))Kq.destroy()}}}function Jq(FQ){if(FQ.writable&&!FQ.writableEnded&&!FQ.destroyed)FQ.end()}rq.from=function(FQ,Kq){return r(rq,FQ,Kq)};var MQ={newStreamReadableFromReadableStream:tq};function Hq(){if(MQ===void 0)MQ={};return MQ}rq.fromWeb=function(FQ,Kq){return Hq().newStreamReadableFromReadableStream(FQ,Kq)},rq.toWeb=function(FQ){return Hq().newReadableStreamFromStreamReadable(FQ)},rq.wrap=function(FQ,Kq){var LQ,Zq;return new rq({objectMode:(LQ=(Zq=FQ.readableObjectMode)!==null&&Zq!==void 0?Zq:FQ.objectMode)!==null&&LQ!==void 0?LQ:!0,...Kq,destroy(jQ,Bq){n.destroyer(FQ,jQ),Bq(jQ)}}).wrap(FQ)}}}),wq=G({"node_modules/readable-stream/lib/internal/streams/writable.js"(B,Y){var{ArrayPrototypeSlice:U,Error:H,FunctionPrototypeSymbolHasInstance:X,ObjectDefineProperty:q,ObjectDefineProperties:J,ObjectSetPrototypeOf:Q,StringPrototypeToLowerCase:Z,Symbol:K,SymbolHasInstance:oq}=DQ(),p=pQ().Stream,sq=Oq(),{addAbortSignal:u}=_q(),{getHighWaterMark:aq,getDefaultHighWaterMark:b}=uQ(),{ERR_INVALID_ARG_TYPE:rq,ERR_METHOD_NOT_IMPLEMENTED:m,ERR_MULTIPLE_CALLBACK:tq,ERR_STREAM_CANNOT_PIPE:c,ERR_STREAM_DESTROYED:eq,ERR_STREAM_ALREADY_FINISHED:d,ERR_STREAM_NULL_VALUES:qQ,ERR_STREAM_WRITE_AFTER_END:l,ERR_UNKNOWN_ENCODING:QQ}=hQ().codes,{errorOrDestroy:i}=sq;function XQ(WQ={}){const Xq=this instanceof wQ();if(!Xq&&!X(XQ,this))return new XQ(WQ);if(this._writableState=new o(WQ,this,Xq),WQ){if(typeof WQ.write==="function")this._write=WQ.write;if(typeof WQ.writev==="function")this._writev=WQ.writev;if(typeof WQ.destroy==="function")this._destroy=WQ.destroy;if(typeof WQ.final==="function")this._final=WQ.final;if(typeof WQ.construct==="function")this._construct=WQ.construct;if(WQ.signal)u(WQ.signal,this)}p.call(this,WQ),sq.construct(this,()=>{const GQ=this._writableState;if(!GQ.writing)z(this,GQ);e(this,GQ)})}Q(XQ.prototype,p.prototype),Q(XQ,p),Y.exports=XQ;function n(){}var JQ=K("kOnFinished");function o(WQ,Xq,GQ){if(typeof GQ!=="boolean")GQ=Xq instanceof wQ();if(this.objectMode=!!(WQ&&WQ.objectMode),GQ)this.objectMode=this.objectMode||!!(WQ&&WQ.writableObjectMode);this.highWaterMark=WQ?aq(this,WQ,"writableHighWaterMark",GQ):b(!1),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;const Jq=!!(WQ&&WQ.decodeStrings===!1);this.decodeStrings=!Jq,this.defaultEncoding=WQ&&WQ.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=r.bind(void 0,Xq),this.writecb=null,this.writelen=0,this.afterWriteTickInfo=null,HQ(this),this.pendingcb=0,this.constructed=!0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!WQ||WQ.emitClose!==!1,this.autoDestroy=!WQ||WQ.autoDestroy!==!1,this.errored=null,this.closed=!1,this.closeEmitted=!1,this[JQ]=[]}function HQ(WQ){WQ.buffered=[],WQ.bufferedIndex=0,WQ.allBuffers=!0,WQ.allNoop=!0}o.prototype.getBuffer=function WQ(){return U(this.buffered,this.bufferedIndex)},q(o.prototype,"bufferedRequestCount",{get(){return this.buffered.length-this.bufferedIndex}}),q(XQ,oq,{value:function(WQ){if(X(this,WQ))return!0;if(this!==XQ)return!1;return WQ&&WQ._writableState instanceof o}}),XQ.prototype.pipe=function(){i(this,new c)};function s(WQ,Xq,GQ,Jq){const MQ=WQ._writableState;if(typeof GQ==="function")Jq=GQ,GQ=MQ.defaultEncoding;else{if(!GQ)GQ=MQ.defaultEncoding;else if(GQ!=="buffer"&&!Buffer.isEncoding(GQ))throw new QQ(GQ);if(typeof Jq!=="function")Jq=n}if(Xq===null)throw new qQ;else if(!MQ.objectMode)if(typeof Xq==="string"){if(MQ.decodeStrings!==!1)Xq=Buffer.from(Xq,GQ),GQ="buffer"}else if(Xq instanceof Buffer)GQ="buffer";else if(p._isUint8Array(Xq))Xq=p._uint8ArrayToBuffer(Xq),GQ="buffer";else throw new rq("chunk",["string","Buffer","Uint8Array"],Xq);let Hq;if(MQ.ending)Hq=new l;else if(MQ.destroyed)Hq=new eq("write");if(Hq)return _Q(Jq,Hq),i(WQ,Hq,!0),Hq;return MQ.pendingcb++,KQ(WQ,MQ,Xq,GQ,Jq)}XQ.prototype.write=function(WQ,Xq,GQ){return s(this,WQ,Xq,GQ)===!0},XQ.prototype.cork=function(){this._writableState.corked++},XQ.prototype.uncork=function(){const WQ=this._writableState;if(WQ.corked){if(WQ.corked--,!WQ.writing)z(this,WQ)}},XQ.prototype.setDefaultEncoding=function WQ(Xq){if(typeof Xq==="string")Xq=Z(Xq);if(!Buffer.isEncoding(Xq))throw new QQ(Xq);return this._writableState.defaultEncoding=Xq,this};function KQ(WQ,Xq,GQ,Jq,MQ){const Hq=Xq.objectMode?1:GQ.length;Xq.length+=Hq;const FQ=Xq.lengthGQ.bufferedIndex)z(WQ,GQ);if(Jq)if(GQ.afterWriteTickInfo!==null&&GQ.afterWriteTickInfo.cb===MQ)GQ.afterWriteTickInfo.count++;else GQ.afterWriteTickInfo={count:1,cb:MQ,stream:WQ,state:GQ},_Q(BQ,GQ.afterWriteTickInfo);else $(WQ,GQ,1,MQ)}}function BQ({stream:WQ,state:Xq,count:GQ,cb:Jq}){return Xq.afterWriteTickInfo=null,$(WQ,Xq,GQ,Jq)}function $(WQ,Xq,GQ,Jq){if(!Xq.ending&&!WQ.destroyed&&Xq.length===0&&Xq.needDrain)Xq.needDrain=!1,WQ.emit("drain");while(GQ-- >0)Xq.pendingcb--,Jq();if(Xq.destroyed)YQ(Xq);e(WQ,Xq)}function YQ(WQ){if(WQ.writing)return;for(let MQ=WQ.bufferedIndex;MQ1&&WQ._writev){Xq.pendingcb-=Hq-1;const Kq=Xq.allNoop?n:(Zq)=>{for(let jQ=FQ;jQ256)GQ.splice(0,FQ),Xq.bufferedIndex=0;else Xq.bufferedIndex=FQ}Xq.bufferProcessing=!1}XQ.prototype._write=function(WQ,Xq,GQ){if(this._writev)this._writev([{chunk:WQ,encoding:Xq}],GQ);else throw new m("_write()")},XQ.prototype._writev=null,XQ.prototype.end=function(WQ,Xq,GQ,Jq=!1){const MQ=this._writableState;if(OQ&&Gq("end",MQ,this.__id),typeof WQ==="function")GQ=WQ,WQ=null,Xq=null;else if(typeof Xq==="function")GQ=Xq,Xq=null;let Hq;if(WQ!==null&&WQ!==void 0){let FQ;if(!Jq)FQ=s(this,WQ,Xq);else FQ=this.write(WQ,Xq);if(FQ instanceof H)Hq=FQ}if(MQ.corked)MQ.corked=1,this.uncork();if(Hq)this.emit("error",Hq);else if(!MQ.errored&&!MQ.ending)MQ.ending=!0,e(this,MQ,!0),MQ.ended=!0;else if(MQ.finished)Hq=new d("end");else if(MQ.destroyed)Hq=new eq("end");if(typeof GQ==="function")if(Hq||MQ.finished)_Q(GQ,Hq);else MQ[JQ].push(GQ);return this};function $Q(WQ,Xq){var GQ=WQ.ending&&!WQ.destroyed&&WQ.constructed&&WQ.length===0&&!WQ.errored&&WQ.buffered.length===0&&!WQ.finished&&!WQ.writing&&!WQ.errorEmitted&&!WQ.closeEmitted;return Gq("needFinish",GQ,Xq),GQ}function t(WQ,Xq){let GQ=!1;function Jq(MQ){if(GQ){i(WQ,MQ!==null&&MQ!==void 0?MQ:tq());return}if(GQ=!0,Xq.pendingcb--,MQ){const Hq=Xq[JQ].splice(0);for(let FQ=0;FQ{if($Q(MQ))VQ(Jq,MQ);else MQ.pendingcb--},WQ,Xq);else if($Q(Xq))Xq.pendingcb++,VQ(WQ,Xq)}}function VQ(WQ,Xq){Xq.pendingcb--,Xq.finished=!0;const GQ=Xq[JQ].splice(0);for(let Jq=0;Jq{if(ZQ!=null)throw new sq("nully","body",ZQ)},(ZQ)=>{u(KQ,ZQ)});return KQ=new eq({objectMode:!0,readable:!1,write:JQ,final(ZQ){o(async()=>{try{await a,_Q(ZQ,null)}catch(r){_Q(ZQ,r)}})},destroy:HQ})}throw new sq("Iterable, AsyncIterable or AsyncFunction",i,n)}if(tq(QQ))return l(QQ.arrayBuffer());if(X(QQ))return m(eq,QQ,{objectMode:!0,writable:!1});if(typeof(QQ===null||QQ===void 0?void 0:QQ.writable)==="object"||typeof(QQ===null||QQ===void 0?void 0:QQ.readable)==="object"){const n=QQ!==null&&QQ!==void 0&&QQ.readable?J(QQ===null||QQ===void 0?void 0:QQ.readable)?QQ===null||QQ===void 0?void 0:QQ.readable:l(QQ.readable):void 0,JQ=QQ!==null&&QQ!==void 0&&QQ.writable?Q(QQ===null||QQ===void 0?void 0:QQ.writable)?QQ===null||QQ===void 0?void 0:QQ.writable:l(QQ.writable):void 0;return qQ({readable:n,writable:JQ})}const XQ=QQ===null||QQ===void 0?void 0:QQ.then;if(typeof XQ==="function"){let n;return c(XQ,QQ,(JQ)=>{if(JQ!=null)n.push(JQ);n.push(null)},(JQ)=>{u(n,JQ)}),n=new eq({objectMode:!0,writable:!1,read(){}})}throw new p(i,["Blob","ReadableStream","WritableStream","Stream","Iterable","AsyncIterable","Function","{ readable, writable } pair","Promise"],QQ)};function d(l){let{promise:QQ,resolve:i}=rq();const XQ=new AbortController,n=XQ.signal;return{value:l(async function*(){while(!0){const o=QQ;QQ=null;const{chunk:HQ,done:s,cb:KQ}=await o;if(_Q(KQ),s)return;if(n.aborted)throw new oq(void 0,{cause:n.reason});({promise:QQ,resolve:i}=rq()),yield HQ}}(),{signal:n}),write(o,HQ,s){const KQ=i;i=null,KQ({chunk:o,done:!1,cb:s})},final(o){const HQ=i;i=null,HQ({done:!0,cb:o})},destroy(o,HQ){XQ.abort(),HQ(o)}}}function qQ(l){const QQ=l.readable&&typeof l.readable.read!=="function"?b.wrap(l.readable):l.readable,i=l.writable;let XQ=!!U(QQ),n=!!H(i),JQ,o,HQ,s,KQ;function a(ZQ){const r=s;if(s=null,r)r(ZQ);else if(ZQ)KQ.destroy(ZQ);else if(!XQ&&!n)KQ.destroy()}if(KQ=new eq({readableObjectMode:!!(QQ!==null&&QQ!==void 0&&QQ.readableObjectMode),writableObjectMode:!!(i!==null&&i!==void 0&&i.writableObjectMode),readable:XQ,writable:n}),n)K(i,(ZQ)=>{if(n=!1,ZQ)u(QQ,ZQ);a(ZQ)}),KQ._write=function(ZQ,r,BQ){if(i.write(ZQ,r))BQ();else JQ=BQ},KQ._final=function(ZQ){i.end(),o=ZQ},i.on("drain",function(){if(JQ){const ZQ=JQ;JQ=null,ZQ()}}),i.on("finish",function(){if(o){const ZQ=o;o=null,ZQ()}});if(XQ)K(QQ,(ZQ)=>{if(XQ=!1,ZQ)u(QQ,ZQ);a(ZQ)}),QQ.on("readable",function(){if(HQ){const ZQ=HQ;HQ=null,ZQ()}}),QQ.on("end",function(){KQ.push(null)}),KQ._read=function(){while(!0){const ZQ=QQ.read();if(ZQ===null){HQ=KQ._read;return}if(!KQ.push(ZQ))return}};return KQ._destroy=function(ZQ,r){if(!ZQ&&s!==null)ZQ=new oq;if(HQ=null,JQ=null,o=null,s===null)r(ZQ);else s=r,u(i,ZQ),u(QQ,ZQ)},KQ}}}),wQ=G({"node_modules/readable-stream/lib/internal/streams/duplex.js"(B,Y){var{ObjectDefineProperties:U,ObjectGetOwnPropertyDescriptor:H,ObjectKeys:X,ObjectSetPrototypeOf:q}=DQ(),J=mQ();function Q(sq){if(!(this instanceof Q))return new Q(sq);if(J.call(this,sq),Mq.call(this,sq),sq){if(this.allowHalfOpen=sq.allowHalfOpen!==!1,sq.readable===!1)this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0;if(sq.writable===!1)this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0}else this.allowHalfOpen=!0}Y.exports=Q,q(Q.prototype,J.prototype),q(Q,J);for(var Z in Mq.prototype)if(!Q.prototype[Z])Q.prototype[Z]=Mq.prototype[Z];U(Q.prototype,{writable:H(Mq.prototype,"writable"),writableHighWaterMark:H(Mq.prototype,"writableHighWaterMark"),writableObjectMode:H(Mq.prototype,"writableObjectMode"),writableBuffer:H(Mq.prototype,"writableBuffer"),writableLength:H(Mq.prototype,"writableLength"),writableFinished:H(Mq.prototype,"writableFinished"),writableCorked:H(Mq.prototype,"writableCorked"),writableEnded:H(Mq.prototype,"writableEnded"),writableNeedDrain:H(Mq.prototype,"writableNeedDrain"),destroyed:{get(){if(this._readableState===void 0||this._writableState===void 0)return!1;return this._readableState.destroyed&&this._writableState.destroyed},set(sq){if(this._readableState&&this._writableState)this._readableState.destroyed=sq,this._writableState.destroyed=sq}}});var K;function oq(){if(K===void 0)K={};return K}Q.fromWeb=function(sq,u){return oq().newStreamDuplexFromReadableWritablePair(sq,u)},Q.toWeb=function(sq){return oq().newReadableWritablePairFromDuplex(sq)};var p;Q.from=function(sq){if(!p)p=cQ();return p(sq,"body")}}}),vq=G({"node_modules/readable-stream/lib/internal/streams/transform.js"(B,Y){var{ObjectSetPrototypeOf:U,Symbol:H}=DQ(),{ERR_METHOD_NOT_IMPLEMENTED:X}=hQ().codes,q=wQ();function J(oq){if(!(this instanceof J))return new J(oq);if(q.call(this,oq),this._readableState.sync=!1,this[Q]=null,oq){if(typeof oq.transform==="function")this._transform=oq.transform;if(typeof oq.flush==="function")this._flush=oq.flush}this.on("prefinish",K.bind(this))}U(J.prototype,q.prototype),U(J,q),Y.exports=J;var Q=H("kCallback");function Z(oq){if(typeof this._flush==="function"&&!this.destroyed)this._flush((p,sq)=>{if(p){if(oq)oq(p);else this.destroy(p);return}if(sq!=null)this.push(sq);if(this.push(null),oq)oq()});else if(this.push(null),oq)oq()}function K(){if(this._final!==Z)Z.call(this)}J.prototype._final=Z,J.prototype._transform=function(oq,p,sq){throw new X("_transform()")},J.prototype._write=function(oq,p,sq){const u=this._readableState,aq=this._writableState,b=u.length;this._transform(oq,p,(rq,m)=>{if(rq){sq(rq);return}if(m!=null)this.push(m);if(aq.ended||b===u.length||u.length{ZQ=!0});const r=q(s,{readable:KQ,writable:a},(BQ)=>{ZQ=!BQ});return{destroy:(BQ)=>{if(ZQ)return;ZQ=!0,Q.destroyer(s,BQ||new u("pipe"))},cleanup:r}}function QQ(s){return b(s[s.length-1],"streams[stream.length - 1]"),s.pop()}function i(s){if(m(s))return s;else if(c(s))return XQ(s);throw new oq("val",["Readable","Iterable","AsyncIterable"],s)}async function*XQ(s){if(!qQ)qQ=mQ();yield*qQ.prototype[X].call(s)}async function n(s,KQ,a,{end:ZQ}){let r,BQ=null;const $=($Q)=>{if($Q)r=$Q;if(BQ){const t=BQ;BQ=null,t()}},YQ=()=>new H(($Q,t)=>{if(r)t(r);else BQ=()=>{if(r)t(r);else $Q()}});KQ.on("drain",$);const z=q(KQ,{readable:!1},$);try{if(KQ.writableNeedDrain)await YQ();for await(let $Q of s)if(!KQ.write($Q))await YQ();if(ZQ)KQ.end();await YQ(),a()}catch($Q){a(r!==$Q?K(r,$Q):$Q)}finally{z(),KQ.off("drain",$)}}function JQ(...s){return o(s,J(QQ(s)))}function o(s,KQ,a){if(s.length===1&&U(s[0]))s=s[0];if(s.length<2)throw new sq("streams");const ZQ=new AbortController,r=ZQ.signal,BQ=a===null||a===void 0?void 0:a.signal,$=[];rq(BQ,"options.signal");function YQ(){VQ(new aq)}BQ===null||BQ===void 0||BQ.addEventListener("abort",YQ);let z,$Q;const t=[];let zQ=0;function e(Qq){VQ(Qq,--zQ===0)}function VQ(Qq,WQ){if(Qq&&(!z||z.code==="ERR_STREAM_PREMATURE_CLOSE"))z=Qq;if(!z&&!WQ)return;while(t.length)t.shift()(z);if(BQ===null||BQ===void 0||BQ.removeEventListener("abort",YQ),ZQ.abort(),WQ){if(!z)$.forEach((Xq)=>Xq());_Q(KQ,z,$Q)}}let qq;for(let Qq=0;Qq0,Jq=Xq||(a===null||a===void 0?void 0:a.end)!==!1,MQ=Qq===s.length-1;if(eq(WQ)){let Hq=function(FQ){if(FQ&&FQ.name!=="AbortError"&&FQ.code!=="ERR_STREAM_PREMATURE_CLOSE")e(FQ)};if(Jq){const{destroy:FQ,cleanup:Kq}=l(WQ,Xq,GQ);if(t.push(FQ),tq(WQ)&&MQ)$.push(Kq)}if(WQ.on("error",Hq),tq(WQ)&&MQ)$.push(()=>{WQ.removeListener("error",Hq)})}if(Qq===0)if(typeof WQ==="function"){if(qq=WQ({signal:r}),!m(qq))throw new p("Iterable, AsyncIterable or Stream","source",qq)}else if(m(WQ)||c(WQ))qq=WQ;else qq=Z.from(WQ);else if(typeof WQ==="function")if(qq=i(qq),qq=WQ(qq,{signal:r}),Xq){if(!m(qq,!0))throw new p("AsyncIterable",`transform[${Qq-1}]`,qq)}else{var UQ;if(!d)d=dQ();const Hq=new d({objectMode:!0}),FQ=(UQ=qq)===null||UQ===void 0?void 0:UQ.then;if(typeof FQ==="function")zQ++,FQ.call(qq,(Zq)=>{if($Q=Zq,Zq!=null)Hq.write(Zq);if(Jq)Hq.end();_Q(e)},(Zq)=>{Hq.destroy(Zq),_Q(e,Zq)});else if(m(qq,!0))zQ++,n(qq,Hq,e,{end:Jq});else throw new p("AsyncIterable or Promise","destination",qq);qq=Hq;const{destroy:Kq,cleanup:LQ}=l(qq,!1,!0);if(t.push(Kq),MQ)$.push(LQ)}else if(eq(WQ)){if(c(qq)){zQ+=2;const Hq=HQ(qq,WQ,e,{end:Jq});if(tq(WQ)&&MQ)$.push(Hq)}else if(m(qq))zQ++,n(qq,WQ,e,{end:Jq});else throw new oq("val",["Readable","Iterable","AsyncIterable"],qq);qq=WQ}else qq=Z.from(WQ)}if(r!==null&&r!==void 0&&r.aborted||BQ!==null&&BQ!==void 0&&BQ.aborted)_Q(YQ);return qq}function HQ(s,KQ,a,{end:ZQ}){if(s.pipe(KQ,{end:ZQ}),ZQ)s.once("end",()=>KQ.end());else a();return q(s,{readable:!0,writable:!1},(r)=>{const BQ=s._readableState;if(r&&r.code==="ERR_STREAM_PREMATURE_CLOSE"&&BQ&&BQ.ended&&!BQ.errored&&!BQ.errorEmitted)s.once("end",a).once("error",a);else a(r)}),q(KQ,{readable:!1,writable:!0},a)}Y.exports={pipelineImpl:o,pipeline:JQ}}}),lQ=G({"node_modules/readable-stream/lib/internal/streams/compose.js"(B,Y){var{pipeline:U}=Rq(),H=wQ(),{destroyer:X}=Oq(),{isNodeStream:q,isReadable:J,isWritable:Q}=j(),{AbortError:Z,codes:{ERR_INVALID_ARG_VALUE:K,ERR_MISSING_ARGS:oq}}=hQ();Y.exports=function p(...sq){if(sq.length===0)throw new oq("streams");if(sq.length===1)return H.from(sq[0]);const u=[...sq];if(typeof sq[0]==="function")sq[0]=H.from(sq[0]);if(typeof sq[sq.length-1]==="function"){const QQ=sq.length-1;sq[QQ]=H.from(sq[QQ])}for(let QQ=0;QQ0&&!Q(sq[QQ]))throw new K(`streams[${QQ}]`,u[QQ],"must be writable")}let aq,b,rq,m,tq;function c(QQ){const i=m;if(m=null,i)i(QQ);else if(QQ)tq.destroy(QQ);else if(!l&&!qQ)tq.destroy()}const eq=sq[0],d=U(sq,c),qQ=!!Q(eq),l=!!J(d);if(tq=new H({writableObjectMode:!!(eq!==null&&eq!==void 0&&eq.writableObjectMode),readableObjectMode:!!(d!==null&&d!==void 0&&d.writableObjectMode),writable:qQ,readable:l}),qQ)tq._write=function(QQ,i,XQ){if(eq.write(QQ,i))XQ();else aq=XQ},tq._final=function(QQ){eq.end(),b=QQ},eq.on("drain",function(){if(aq){const QQ=aq;aq=null,QQ()}}),d.on("finish",function(){if(b){const QQ=b;b=null,QQ()}});if(l)d.on("readable",function(){if(rq){const QQ=rq;rq=null,QQ()}}),d.on("end",function(){tq.push(null)}),tq._read=function(){while(!0){const QQ=d.read();if(QQ===null){rq=tq._read;return}if(!tq.push(QQ))return}};return tq._destroy=function(QQ,i){if(!QQ&&m!==null)QQ=new Z;if(rq=null,aq=null,b=null,m===null)i(QQ);else m=i,X(d,QQ)},tq}}}),E=G({"node_modules/readable-stream/lib/stream/promises.js"(B,Y){var{ArrayPrototypePop:U,Promise:H}=DQ(),{isIterable:X,isNodeStream:q}=j(),{pipelineImpl:J}=Rq(),{finished:Q}=N();function Z(...K){return new H((oq,p)=>{let sq,u;const aq=K[K.length-1];if(aq&&typeof aq==="object"&&!q(aq)&&!X(aq)){const b=U(K);sq=b.signal,u=b.end}J(K,(b,rq)=>{if(b)p(b);else oq(rq)},{signal:sq,end:u})})}Y.exports={finished:Q,pipeline:Z}}}),I=G({"node_modules/readable-stream/lib/stream.js"(B,Y){var{ObjectDefineProperty:U,ObjectKeys:H,ReflectApply:X}=DQ(),{promisify:{custom:q}}=jq(),{streamReturningOperators:J,promiseReturningOperators:Q}=A(),{codes:{ERR_ILLEGAL_CONSTRUCTOR:Z}}=hQ(),K=lQ(),{pipeline:oq}=Rq(),{destroyer:p}=Oq(),sq=N(),u=E(),aq=j(),b=Y.exports=pQ().Stream;b.isDisturbed=aq.isDisturbed,b.isErrored=aq.isErrored,b.isWritable=aq.isWritable,b.isReadable=aq.isReadable,b.Readable=mQ();for(let m of H(J)){let tq=function(...eq){if(new.target)throw Z();return b.Readable.from(X(c,this,eq))};const c=J[m];U(tq,"name",{value:c.name}),U(tq,"length",{value:c.length}),U(b.Readable.prototype,m,{value:tq,enumerable:!1,configurable:!0,writable:!0})}for(let m of H(Q)){let tq=function(...eq){if(new.target)throw Z();return X(c,this,eq)};const c=Q[m];U(tq,"name",{value:c.name}),U(tq,"length",{value:c.length}),U(b.Readable.prototype,m,{value:tq,enumerable:!1,configurable:!0,writable:!0})}b.Writable=wq(),b.Duplex=wQ(),b.Transform=vq(),b.PassThrough=dQ(),b.pipeline=oq;var{addAbortSignal:rq}=_q();b.addAbortSignal=rq,b.finished=sq,b.destroy=p,b.compose=K,U(b,"promises",{configurable:!0,enumerable:!0,get(){return u}}),U(oq,q,{enumerable:!0,get(){return u.pipeline}}),U(sq,q,{enumerable:!0,get(){return u.finished}}),b.Stream=b,b._isUint8Array=function m(tq){return tq instanceof Uint8Array},b._uint8ArrayToBuffer=function m(tq){return new Buffer(tq.buffer,tq.byteOffset,tq.byteLength)}}}),T=G({"node_modules/readable-stream/lib/ours/index.js"(B,Y){const U=I(),H=E(),X=U.Readable.destroy;Y.exports=U,Y.exports._uint8ArrayToBuffer=U._uint8ArrayToBuffer,Y.exports._isUint8Array=U._isUint8Array,Y.exports.isDisturbed=U.isDisturbed,Y.exports.isErrored=U.isErrored,Y.exports.isWritable=U.isWritable,Y.exports.isReadable=U.isReadable,Y.exports.Readable=U.Readable,Y.exports.Writable=U.Writable,Y.exports.Duplex=U.Duplex,Y.exports.Transform=U.Transform,Y.exports.PassThrough=U.PassThrough,Y.exports.addAbortSignal=U.addAbortSignal,Y.exports.finished=U.finished,Y.exports.destroy=U.destroy,Y.exports.destroy=X,Y.exports.pipeline=U.pipeline,Y.exports.compose=U.compose,Y.exports._getNativeReadableStreamPrototype=O,Y.exports.NativeWritable=bq,Fq.defineProperty(U,"promises",{configurable:!0,enumerable:!0,get(){return H}}),Y.exports.Stream=U.Stream,Y.exports.default=Y.exports}}),x={0:void 0,1:void 0,2:void 0,3:void 0,4:void 0,5:void 0},Mq=wq(),bq=class B extends Mq{#q;#Q;#X=!0;_construct;_destroy;_final;constructor(Y,U={}){super(U);this._construct=this.#J,this._destroy=this.#K,this._final=this.#Z,this.#q=Y}#J(Y){this._writableState.constructed=!0,this.constructed=!0,Y()}#H(){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(Y,U,H,X=this.#X){if(!X)return this.#X=!1,super.write(Y,U,H);if(!this.#Q)this.#H();var q=this.#Q,J=q.write(Y);if(Lq(J))return J.then(()=>{this.emit("drain"),q.flush(!0)}),!1;if(q.flush(!0),H)H(null,Y.byteLength);return!0}end(Y,U,H,X=this.#X){return super.end(Y,U,H,X)}#K(Y,U){if(this._writableState.destroyed=!0,U)U(Y)}#Z(Y){if(this.#Q)this.#Q.end();if(Y)Y()}ref(){if(!this.#Q)this.#H();this.#Q.ref()}unref(){if(!this.#Q)return;this.#Q.unref()}},C=T();C[Symbol.for("CommonJS")]=0;C[Symbol.for("::bunternal::")]={_ReadableFromWeb:bQ,_ReadableFromWebForUndici:Dq};var nq=C,D=C._uint8ArrayToBuffer,w=C._isUint8Array,v=C.isDisturbed,R=C.isErrored,S=C.isWritable,g=C.isReadable,f=C.Readable,Mq=C.Writable,k=C.Duplex,y=C.Transform,h=C.PassThrough,Sq=C.addAbortSignal,gq=C.finished,fq=C.destroy,kq=C.pipeline,yq=C.compose,hq=C.Stream,pq=C["eos"]=N,uq=C._getNativeReadableStreamPrototype,bq=C.NativeWritable,mq=hq.promises;export{mq as promises,kq as pipeline,S as isWritable,g as isReadable,R as isErrored,v as isDisturbed,gq as finished,pq as eos,fq as destroy,nq as default,yq as compose,Sq as addAbortSignal,D as _uint8ArrayToBuffer,w as _isUint8Array,uq as _getNativeReadableStreamPrototype,Mq as Writable,y as Transform,hq as Stream,f as Readable,h as PassThrough,bq as NativeWritable,k as Duplex}; diff --git a/src/js/out/modules/node/util.js b/src/js/out/modules/node/util.js index b0881147c5efc..8fbdc2d6caf7a 100644 --- a/src/js/out/modules/node/util.js +++ b/src/js/out/modules/node/util.js @@ -44,21 +44,23 @@ var isFunction = function(value) { }, deprecate = function(fn, msg, code) { if (process.noDeprecation === !0) return fn; - var realFn = fn, wrapper = () => { - return fnToWrap.apply(this, arguments); - }, deprecater = () => { - if (process.throwDeprecation) { - var err = new Error(msg); - if (code) - err.code = code; - throw err; - } else if (process.traceDeprecation) - console.trace(msg); - else - console.error(msg); - return fnToWrap = realFn, realFn.apply(this, arguments); - }, fnToWrap = deprecater; - return wrapper; + var warned = !1; + function deprecated() { + if (!warned) { + if (process.throwDeprecation) { + var err = new Error(msg); + if (code) + err.code = code; + throw err; + } else if (process.traceDeprecation) + console.trace(msg); + else + console.error(msg); + warned = !0; + } + return fn.apply(this, arguments); + } + return deprecated; }, debuglog = function(set) { if (set = set.toUpperCase(), !debugs[set]) if (debugEnvRegex.test(set)) { diff --git a/test/js/bun/resolve/import-meta.test.js b/test/js/bun/resolve/import-meta.test.js index 7d385148bcf75..d6d1455206114 100644 --- a/test/js/bun/resolve/import-meta.test.js +++ b/test/js/bun/resolve/import-meta.test.js @@ -25,9 +25,14 @@ it("import.meta.main", () => { it("import.meta.resolveSync", () => { expect(import.meta.resolveSync("./" + import.meta.file, import.meta.path)).toBe(path); +}); + +it("Module.createRequire", () => { const require = Module.createRequire(import.meta.path); expect(require.resolve(import.meta.path)).toBe(path); expect(require.resolve("./" + import.meta.file)).toBe(path); + const { resolve } = require; + expect(resolve("./" + import.meta.file)).toBe(path); // check it works with URL objects expect(Module.createRequire(new URL(import.meta.url)).resolve(import.meta.path)).toBe(import.meta.path); @@ -68,8 +73,11 @@ it("import.meta.require (json)", () => { }); it("const f = require;require(json)", () => { + function capture(f) { + return f.length; + } const f = require; - console.log(f); + capture(f); expect(f("./require-json.json").hello).toBe(sync.hello); }); @@ -107,7 +115,6 @@ it("Module.createRequire(file://url).resolve(file://url)", () => { const createdRequire = Module.createRequire(import.meta.url); const result1 = createdRequire.resolve("./require-json.json"); const result2 = createdRequire.resolve("file://./require-json.json"); - expect(result1).toBe(expected); expect(result2).toBe(expected); });