import { fileURLToPath as __eveFileURLToPath } from "node:url"; import { dirname as __eveDirname } from "node:path"; const __filename = __eveFileURLToPath(import.meta.url); const __dirname = __eveDirname(__filename); import { n as __exportAll } from "../_runtime.mjs"; import { F as zodSchema, M as tool, T as jsonSchema } from "./@ai-sdk/gateway+[...].mjs"; import { a as generateText, n as ToolLoopAgent, o as isStepCount, r as convertDataContentToBase64String, s as registerTelemetry, t as MockLanguageModelV3 } from "./ai.mjs"; import { createRequire } from "node:module"; import { Readable } from "node:stream"; import ee, { createHash, createSign, randomBytes, randomUUID, webcrypto } from "node:crypto"; import { inspect, promisify, types } from "node:util"; import g, { existsSync, mkdirSync, promises, readFileSync, realpathSync, statSync, writeFileSync } from "node:fs"; import * as p$2 from "node:path"; import G, { basename, dirname, extname, isAbsolute, join, posix, resolve, sep } from "node:path"; import { fileURLToPath, pathToFileURL } from "node:url"; import { AsyncLocalStorage } from "node:async_hooks"; import { BlockList, isIP } from "node:net"; import * as lr$3 from "path"; import b, { dirname as dirname$1, resolve as resolve$1 } from "path"; import * as ur$3 from "fs"; import { createWriteStream } from "fs"; import E from "os"; import * as v$1 from "node:fs/promises"; import Xn, { access, constants, cp, mkdir, readFile, readdir, readlink, realpath, rename, rm, stat, unlink, utimes, writeFile } from "node:fs/promises"; import { execFile, spawn, spawnSync } from "node:child_process"; import { setTimeout as setTimeout$1 } from "node:timers/promises"; import { EventEmitter } from "node:events"; import * as dr$3 from "net"; import { createRequire as createRequire$1 } from "module"; import pr, { homedir } from "node:os"; import { Script, createContext, runInContext } from "node:vm"; import { Worker } from "node:worker_threads"; import { dirname as dirname$2 } from "node:path/posix"; import { Buffer as Buffer$1 } from "node:buffer"; import { Readable as Readable$1 } from "stream"; import w from "zlib"; import { pipeline } from "stream/promises"; import { mkdir as mkdir$1 } from "fs/promises"; import * as k$1 from "node:constants"; //#region node_modules/eve/dist/src/internal/nitro/routes/index.js const DEPLOYMENT_URL_PLACEHOLDER = `{{DEPLOYMENT_URL}}`; const HOME_PAGE_HTML_TEMPLATE = ` eve
running

eve

The agent is up and accepting messages. Read the docs

eve dev ${DEPLOYMENT_URL_PLACEHOLDER}
`; function escapeHtml(e) { return e.replaceAll(`&`, `&`).replaceAll(`<`, `<`).replaceAll(`>`, `>`).replaceAll(`"`, `"`).replaceAll(`'`, `'`); } function pickFirstForwardedValue(e) { if (e === null) return; let t = e.split(`,`)[0]?.trim(); if (!(t === void 0 || t.length === 0)) return t; } function resolveDeploymentUrl(e) { let t = e.headers, n = new URL(e.url), r = pickFirstForwardedValue(t.get(`x-forwarded-host`)), i = pickFirstForwardedValue(t.get(`x-forwarded-proto`)), a = r ?? t.get(`host`) ?? n.host; return `${i ?? n.protocol.replace(/:$/, ``)}://${a}`; } function buildHomePageResponse(n) { let r = resolveDeploymentUrl(n), i = HOME_PAGE_HTML_TEMPLATE.replace(DEPLOYMENT_URL_PLACEHOLDER, escapeHtml(r)); return new Response(i, { headers: { "cache-control": `no-store`, "content-type": `text/html; charset=utf-8` } }); } function handleHomePageRequest(e) { return buildHomePageResponse(e.req); } //#endregion //#region node_modules/eve/dist/src/shared/guards.js function isObject(e) { return typeof e == `object` && !!e && !Array.isArray(e); } function isNonEmptyString(e) { return typeof e == `string` && e.length > 0; } function isThenable(e) { return isObject(e) && typeof e.then == `function`; } function isPlainRecord(e) { if (!isObject(e)) return !1; let t = Object.getPrototypeOf(e); return t === Object.prototype || t === null; } //#endregion //#region node_modules/eve/dist/src/compiled/@opentelemetry/api/index.js const e$5 = `1.9.1`; const t$15 = /^(\d+)\.(\d+)\.(\d+)(-(.+))?$/; function n$17(e) { let n = /* @__PURE__ */ new Set([e]), r = /* @__PURE__ */ new Set(), i = e.match(t$15); if (!i) return () => !1; let a = { major: +i[1], minor: +i[2], patch: +i[3], prerelease: i[4] }; if (a.prerelease != null) return function(t) { return t === e; }; function o(e) { return r.add(e), !1; } function s(e) { return n.add(e), !0; } return function(e) { if (n.has(e)) return !0; if (r.has(e)) return !1; let i = e.match(t$15); if (!i) return o(e); let c = { major: +i[1], minor: +i[2], patch: +i[3], prerelease: i[4] }; return c.prerelease != null || a.major !== c.major ? o(e) : a.major === 0 ? a.minor === c.minor && a.patch <= c.patch ? s(e) : o(e) : a.minor <= c.minor ? s(e) : o(e); }; } const r$19 = n$17(e$5); const i$18 = e$5.split(`.`)[0]; const a$15 = Symbol.for(`opentelemetry.js.api.${i$18}`); const o$15 = typeof globalThis == `object` ? globalThis : typeof self == `object` ? self : typeof window == `object` ? window : typeof global == `object` ? global : {}; function s$13(t, n, r, i = !1) { let s = o$15[a$15] = o$15[a$15] ?? { version: e$5 }; if (!i && s[t]) { let e = Error(`@opentelemetry/api: Attempted duplicate registration of API: ${t}`); return r.error(e.stack || e.message), !1; } if (s.version !== `1.9.1`) { let n = Error(`@opentelemetry/api: Registration of version v${s.version} for ${t} does not match previously registered API v${e$5}`); return r.error(n.stack || n.message), !1; } return s[t] = n, r.debug(`@opentelemetry/api: Registered a global for ${t} v${e$5}.`), !0; } function c$15(e) { let t = o$15[a$15]?.version; if (!(!t || !r$19(t))) return o$15[a$15]?.[e]; } function l$14(t, n) { n.debug(`@opentelemetry/api: Unregistering a global for ${t} v${e$5}.`); let r = o$15[a$15]; r && delete r[t]; } var ee$9 = class { constructor(e) { this._namespace = e.namespace || `DiagComponentLogger`; } debug(...e) { return u$16(`debug`, this._namespace, e); } error(...e) { return u$16(`error`, this._namespace, e); } info(...e) { return u$16(`info`, this._namespace, e); } warn(...e) { return u$16(`warn`, this._namespace, e); } verbose(...e) { return u$16(`verbose`, this._namespace, e); } }; function u$16(e, t, n) { let r = c$15(`diag`); if (r) return r[e](t, ...n); } var d$16; (function(e) { e[e.NONE = 0] = `NONE`, e[e.ERROR = 30] = `ERROR`, e[e.WARN = 50] = `WARN`, e[e.INFO = 60] = `INFO`, e[e.DEBUG = 70] = `DEBUG`, e[e.VERBOSE = 80] = `VERBOSE`, e[e.ALL = 9999] = `ALL`; })(d$16 ||= {}); function te$9(e, t) { e < d$16.NONE ? e = d$16.NONE : e > d$16.ALL && (e = d$16.ALL), t ||= {}; function n(n, r) { let i = t[n]; return typeof i == `function` && e >= r ? i.bind(t) : function() {}; } return { error: n(`error`, d$16.ERROR), warn: n(`warn`, d$16.WARN), info: n(`info`, d$16.INFO), debug: n(`debug`, d$16.DEBUG), verbose: n(`verbose`, d$16.VERBOSE) }; } var f$15 = class e { static instance() { return this._instance ||= new e(), this._instance; } constructor() { function e(e) { return function(...t) { let n = c$15(`diag`); if (n) return n[e](...t); }; } let t = this; t.setLogger = (e, n = { logLevel: d$16.INFO }) => { if (e === t) { let e = Error(`Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation`); return t.error(e.stack ?? e.message), !1; } typeof n == `number` && (n = { logLevel: n }); let r = c$15(`diag`), i = te$9(n.logLevel ?? d$16.INFO, e); if (r && !n.suppressOverrideMessage) { let e = Error().stack ?? ``; r.warn(`Current logger will be overwritten from ${e}`), i.warn(`Current logger will overwrite one already registered from ${e}`); } return s$13(`diag`, i, t, !0); }, t.disable = () => { l$14(`diag`, t); }, t.createComponentLogger = (e) => new ee$9(e), t.verbose = e(`verbose`), t.debug = e(`debug`), t.info = e(`info`), t.warn = e(`warn`), t.error = e(`error`); } }; var ne$9 = class e { constructor(e) { this._entries = e ? new Map(e) : /* @__PURE__ */ new Map(); } getEntry(e) { let t = this._entries.get(e); if (t) return Object.assign({}, t); } getAllEntries() { return Array.from(this._entries.entries()); } setEntry(t, n) { let r = new e(this._entries); return r._entries.set(t, n), r; } removeEntry(t) { let n = new e(this._entries); return n._entries.delete(t), n; } removeEntries(...t) { let n = new e(this._entries); for (let e of t) n._entries.delete(e); return n; } clear() { return new e(); } }; const ie$10 = f$15.instance(); function ae$11(e = {}) { return new ne$9(new Map(Object.entries(e))); } function p$16(e) { return Symbol.for(e); } const m$12 = new class e { constructor(t) { let n = this; n._currentContext = t ? new Map(t) : /* @__PURE__ */ new Map(), n.getValue = (e) => n._currentContext.get(e), n.setValue = (t, r) => { let i = new e(n._currentContext); return i._currentContext.set(t, r), i; }, n.deleteValue = (t) => { let r = new e(n._currentContext); return r._currentContext.delete(t), r; }; } }(); const g$13 = {}; if (typeof console < `u`) for (let e of [ `error`, `warn`, `info`, `debug`, `trace`, `log` ]) typeof console[e] == `function` && (g$13[e] = console[e]); var ce$12 = class { constructor() {} createGauge(e, t) { return _e$11; } createHistogram(e, t) { return ve$11; } createCounter(e, t) { return ge$11; } createUpDownCounter(e, t) { return ye$11; } createObservableGauge(e, t) { return xe$11; } createObservableCounter(e, t) { return be$11; } createObservableUpDownCounter(e, t) { return Se$11; } addBatchObservableCallback(e, t) {} removeBatchObservableCallback(e) {} }; var _$12 = class {}; var le$12 = class extends _$12 { add(e, t) {} }; var ue$12 = class extends _$12 { add(e, t) {} }; var de$12 = class extends _$12 { record(e, t) {} }; var fe$12 = class extends _$12 { record(e, t) {} }; var v$12 = class { addCallback(e) {} removeCallback(e) {} }; var pe$11 = class extends v$12 {}; var me$11 = class extends v$12 {}; var he$11 = class extends v$12 {}; const y$10 = new ce$12(); const ge$11 = new le$12(); const _e$11 = new de$12(); const ve$11 = new fe$12(); const ye$11 = new ue$12(); const be$11 = new pe$11(); const xe$11 = new me$11(); const Se$11 = new he$11(); var we$11; (function(e) { e[e.INT = 0] = `INT`, e[e.DOUBLE = 1] = `DOUBLE`; })(we$11 ||= {}); const Te$11 = { get(e, t) { if (e != null) return e[t]; }, keys(e) { return e == null ? [] : Object.keys(e); } }; const b$13 = { set(e, t, n) { e != null && (e[t] = n); } }; var Ee$11 = class { active() { return m$12; } with(e, t, n, ...r) { return t.call(n, ...r); } bind(e, t) { return t; } enable() { return this; } disable() { return this; } }; const x$14 = `context`; const De$10 = new Ee$11(); var S$15 = class e { constructor() {} static getInstance() { return this._instance ||= new e(), this._instance; } setGlobalContextManager(e) { return s$13(x$14, e, f$15.instance()); } active() { return this._getContextManager().active(); } with(e, t, n, ...r) { return this._getContextManager().with(e, t, n, ...r); } bind(e, t) { return this._getContextManager().bind(e, t); } _getContextManager() { return c$15(x$14) || De$10; } disable() { this._getContextManager().disable(), l$14(x$14, f$15.instance()); } }; var C$16; (function(e) { e[e.NONE = 0] = `NONE`, e[e.SAMPLED = 1] = `SAMPLED`; })(C$16 ||= {}); const w$16 = `0000000000000000`; const T$16 = `00000000000000000000000000000000`; const E$16 = { traceId: T$16, spanId: w$16, traceFlags: C$16.NONE }; var D$15 = class { constructor(e = E$16) { this._spanContext = e; } spanContext() { return this._spanContext; } setAttribute(e, t) { return this; } setAttributes(e) { return this; } addEvent(e, t) { return this; } addLink(e) { return this; } addLinks(e) { return this; } setStatus(e) { return this; } updateName(e) { return this; } end(e) {} isRecording() { return !1; } recordException(e, t) {} }; const O$14 = p$16(`OpenTelemetry Context Key SPAN`); function k$15(e) { return e.getValue(O$14) || void 0; } function Oe$11() { return k$15(S$15.getInstance().active()); } function A$14(e, t) { return e.setValue(O$14, t); } function ke$10(e) { return e.deleteValue(O$14); } function Ae$11(e, t) { return A$14(e, new D$15(t)); } function j$14(e) { return k$15(e)?.spanContext(); } const M$14 = new Uint8Array([ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1 ]); function N$13(e, t) { if (typeof e != `string` || e.length !== t) return !1; let n = 0; for (let t = 0; t < e.length; t += 4) n += (M$14[e.charCodeAt(t)] | 0) + (M$14[e.charCodeAt(t + 1)] | 0) + (M$14[e.charCodeAt(t + 2)] | 0) + (M$14[e.charCodeAt(t + 3)] | 0); return n === t; } function P$13(e) { return N$13(e, 32) && e !== `00000000000000000000000000000000`; } function F$13(e) { return N$13(e, 16) && e !== `0000000000000000`; } function I$13(e) { return P$13(e.traceId) && F$13(e.spanId); } function je$12(e) { return new D$15(e); } const L$12 = S$15.getInstance(); var R$14 = class { startSpan(e, t, n = L$12.active()) { if (t?.root) return new D$15(); let r = n && j$14(n); return Me$11(r) && I$13(r) ? new D$15(r) : new D$15(); } startActiveSpan(e, t, n, r) { let i, a, o; if (arguments.length < 2) return; arguments.length === 2 ? o = t : arguments.length === 3 ? (i = t, o = n) : (i = t, a = n, o = r); let s = a ?? L$12.active(), c = this.startSpan(e, i, s), l = A$14(s, c); return L$12.with(l, o, void 0, c); } }; function Me$11(e) { return typeof e == `object` && !!e && `spanId` in e && typeof e.spanId == `string` && `traceId` in e && typeof e.traceId == `string` && `traceFlags` in e && typeof e.traceFlags == `number`; } const Ne$12 = new R$14(); var z$14 = class { constructor(e, t, n, r) { this._provider = e, this.name = t, this.version = n, this.options = r; } startSpan(e, t, n) { return this._getTracer().startSpan(e, t, n); } startActiveSpan(e, t, n, r) { let i = this._getTracer(); return Reflect.apply(i.startActiveSpan, i, arguments); } _getTracer() { if (this._delegate) return this._delegate; let e = this._provider.getDelegateTracer(this.name, this.version, this.options); return e ? (this._delegate = e, this._delegate) : Ne$12; } }; const Pe$11 = new class { getTracer(e, t, n) { return new R$14(); } }(); var B$15 = class { getTracer(e, t, n) { return this.getDelegateTracer(e, t, n) ?? new z$14(this, e, t, n); } getDelegate() { return this._delegate ?? Pe$11; } setDelegate(e) { this._delegate = e; } getDelegateTracer(e, t, n) { return this._delegate?.getTracer(e, t, n); } }; var V$14; (function(e) { e[e.NOT_RECORD = 0] = `NOT_RECORD`, e[e.RECORD = 1] = `RECORD`, e[e.RECORD_AND_SAMPLED = 2] = `RECORD_AND_SAMPLED`; })(V$14 ||= {}); var H$13; (function(e) { e[e.INTERNAL = 0] = `INTERNAL`, e[e.SERVER = 1] = `SERVER`, e[e.CLIENT = 2] = `CLIENT`, e[e.PRODUCER = 3] = `PRODUCER`, e[e.CONSUMER = 4] = `CONSUMER`; })(H$13 ||= {}); var U$13; (function(e) { e[e.UNSET = 0] = `UNSET`, e[e.OK = 1] = `OK`, e[e.ERROR = 2] = `ERROR`; })(U$13 ||= {}); const W$11 = `[_0-9a-z-*/]`; const Fe$11 = RegExp(`^(?:${`[a-z]${W$11}{0,255}`}|${`[a-z0-9]${W$11}{0,240}@[a-z]${W$11}{0,13}`})$`); const G$11 = S$15.getInstance(); const K$12 = f$15.instance(); const He$10 = new class { getMeter(e, t, n) { return y$10; } }(); const q$12 = `metrics`; const J$12 = class e { constructor() {} static getInstance() { return this._instance ||= new e(), this._instance; } setGlobalMeterProvider(e) { return s$13(q$12, e, f$15.instance()); } getMeterProvider() { return c$15(q$12) || He$10; } getMeter(e, t, n) { return this.getMeterProvider().getMeter(e, t, n); } disable() { l$14(q$12, f$15.instance()); } }.getInstance(); var Ue$10 = class { inject(e, t) {} extract(e, t) { return e; } fields() { return []; } }; const Y$15 = p$16(`OpenTelemetry Baggage Key`); function X$15(e) { return e.getValue(Y$15) || void 0; } function We$10() { return X$15(S$15.getInstance().active()); } function Ge$10(e, t) { return e.setValue(Y$15, t); } function Ke$10(e) { return e.deleteValue(Y$15); } const Z$14 = `propagation`; const qe$10 = new Ue$10(); const Je$11 = class e { constructor() { this.createBaggage = ae$11, this.getBaggage = X$15, this.getActiveBaggage = We$10, this.setBaggage = Ge$10, this.deleteBaggage = Ke$10; } static getInstance() { return this._instance ||= new e(), this._instance; } setGlobalPropagator(e) { return s$13(Z$14, e, f$15.instance()); } inject(e, t, n = b$13) { return this._getGlobalPropagator().inject(e, t, n); } extract(e, t, n = Te$11) { return this._getGlobalPropagator().extract(e, t, n); } fields() { return this._getGlobalPropagator().fields(); } disable() { l$14(Z$14, f$15.instance()); } _getGlobalPropagator() { return c$15(Z$14) || qe$10; } }.getInstance(); const Q$13 = `trace`; const $$13 = class e { constructor() { this._proxyTracerProvider = new B$15(), this.wrapSpanContext = je$12, this.isSpanContextValid = I$13, this.deleteSpan = ke$10, this.getSpan = k$15, this.getActiveSpan = Oe$11, this.getSpanContext = j$14, this.setSpan = A$14, this.setSpanContext = Ae$11; } static getInstance() { return this._instance ||= new e(), this._instance; } setGlobalTracerProvider(e) { let t = s$13(Q$13, this._proxyTracerProvider, f$15.instance()); return t && this._proxyTracerProvider.setDelegate(e), t; } getTracerProvider() { return c$15(Q$13) || this._proxyTracerProvider; } getTracer(e, t) { return this.getTracerProvider().getTracer(e, t); } disable() { l$14(Q$13, f$15.instance()), this._proxyTracerProvider = new B$15(); } }.getInstance(); //#endregion //#region node_modules/eve/dist/src/compiled/@ai-sdk/provider/index.js var e$4 = `vercel.ai.error`; var t$14 = Symbol.for(e$4); var n$16; var r$18; var i$17 = class i extends (r$18 = Error, n$16 = t$14, r$18) { constructor({ name: e, message: t, cause: r }) { super(t), this[n$16] = !0, this.name = e, this.cause = r; } static isInstance(t) { return i.hasMarker(t, e$4); } static hasMarker(e, t) { let n = Symbol.for(t); return typeof e == `object` && !!e && n in e && typeof e[n] == `boolean` && e[n] === !0; } }; var ee$8 = `AI_APICallError`; var a$14 = `vercel.ai.error.${ee$8}`; var o$14 = Symbol.for(a$14); var te$8; var s$12; var c$14 = class extends (s$12 = i$17, te$8 = o$14, s$12) { constructor({ message: e, url: t, requestBodyValues: n, statusCode: r, responseHeaders: i, responseBody: a, cause: o, isRetryable: s = r != null && (r === 408 || r === 409 || r === 429 || r >= 500), data: c }) { super({ name: ee$8, message: e, cause: o }), this[te$8] = !0, this.url = t, this.requestBodyValues = n, this.statusCode = r, this.responseHeaders = i, this.responseBody = a, this.isRetryable = s, this.data = c; } static isInstance(e) { return i$17.hasMarker(e, a$14); } }; var l$13 = `AI_EmptyResponseBodyError`; var u$15 = `vercel.ai.error.${l$13}`; var ne$8 = Symbol.for(u$15); var d$15; var f$14; var re$9 = class extends (f$14 = i$17, d$15 = ne$8, f$14) { constructor({ message: e = `Empty response body` } = {}) { super({ name: l$13, message: e }), this[d$15] = !0; } static isInstance(e) { return i$17.hasMarker(e, u$15); } }; function p$15(e) { return e == null ? `unknown error` : typeof e == `string` ? e : e instanceof Error ? e.toString() : JSON.stringify(e); } var m$11 = `AI_InvalidArgumentError`; var h$13 = `vercel.ai.error.${m$11}`; var ie$9 = Symbol.for(h$13); var g$12; var _$11; var ae$10 = class extends (_$11 = i$17, g$12 = ie$9, _$11) { constructor({ message: e, cause: t, argument: n }) { super({ name: m$11, message: e, cause: t }), this[g$12] = !0, this.argument = n; } static isInstance(e) { return i$17.hasMarker(e, h$13); } }; var v$11 = `AI_InvalidPromptError`; var y$9 = `vercel.ai.error.${v$11}`; var oe$10 = Symbol.for(y$9); var b$12; var x$13; var se$11 = class extends (x$13 = i$17, b$12 = oe$10, x$13) { constructor({ prompt: e, message: t, cause: n }) { super({ name: v$11, message: `Invalid prompt: ${t}`, cause: n }), this[b$12] = !0, this.prompt = e; } static isInstance(e) { return i$17.hasMarker(e, y$9); } }; var S$14 = `AI_InvalidResponseDataError`; var C$15 = `vercel.ai.error.${S$14}`; var ce$11 = Symbol.for(C$15); var w$15; var T$15; var le$11 = class extends (T$15 = i$17, w$15 = ce$11, T$15) { constructor({ data: e, message: t = `Invalid response data: ${JSON.stringify(e)}.` }) { super({ name: S$14, message: t }), this[w$15] = !0, this.data = e; } static isInstance(e) { return i$17.hasMarker(e, C$15); } }; var E$15 = `AI_JSONParseError`; var D$14 = `vercel.ai.error.${E$15}`; var ue$11 = Symbol.for(D$14); var O$13; var k$14; var de$11 = class extends (k$14 = i$17, O$13 = ue$11, k$14) { constructor({ text: e, cause: t }) { super({ name: E$15, message: `JSON parsing failed: Text: ${e}. Error message: ${p$15(t)}`, cause: t }), this[O$13] = !0, this.text = e; } static isInstance(e) { return i$17.hasMarker(e, D$14); } }; var A$13 = `AI_LoadAPIKeyError`; var j$13 = `vercel.ai.error.${A$13}`; var fe$11 = Symbol.for(j$13); var M$13; var N$12; var pe$10 = class extends (N$12 = i$17, M$13 = fe$11, N$12) { constructor({ message: e }) { super({ name: A$13, message: e }), this[M$13] = !0; } static isInstance(e) { return i$17.hasMarker(e, j$13); } }; var P$12 = `AI_LoadSettingError`; var F$12 = `vercel.ai.error.${P$12}`; var me$10 = Symbol.for(F$12); var I$12; var L$11; var he$10 = class extends (L$11 = i$17, I$12 = me$10, L$11) { constructor({ message: e }) { super({ name: P$12, message: e }), this[I$12] = !0; } static isInstance(e) { return i$17.hasMarker(e, F$12); } }; var ge$10 = `AI_NoContentGeneratedError`; var R$13 = `vercel.ai.error.${ge$10}`; var _e$10 = Symbol.for(R$13); var z$13; var B$14; var ve$10 = class extends (B$14 = i$17, z$13 = _e$10, B$14) { constructor({ message: e = `No content generated.` } = {}) { super({ name: ge$10, message: e }), this[z$13] = !0; } static isInstance(e) { return i$17.hasMarker(e, R$13); } }; var V$13 = `AI_NoSuchModelError`; var H$12 = `vercel.ai.error.${V$13}`; var ye$10 = Symbol.for(H$12); var U$12; var W$10; var be$10 = class extends (W$10 = i$17, U$12 = ye$10, W$10) { constructor({ errorName: e = V$13, modelId: t, modelType: n, message: r = `No such ${n}: ${t}` }) { super({ name: e, message: r }), this[U$12] = !0, this.modelId = t, this.modelType = n; } static isInstance(e) { return i$17.hasMarker(e, H$12); } }; var G$10 = `AI_NoSuchProviderReferenceError`; var K$11 = `vercel.ai.error.${G$10}`; var xe$10 = Symbol.for(K$11); var q$11; var J$11; var Se$10 = class extends (J$11 = i$17, q$11 = xe$10, J$11) { constructor({ provider: e, reference: t, message: n = `No provider reference found for provider '${e}'. Available providers: ${Object.keys(t).join(`, `)}` }) { super({ name: G$10, message: n }), this[q$11] = !0, this.provider = e, this.reference = t; } static isInstance(e) { return i$17.hasMarker(e, K$11); } }; var Y$14 = `AI_TooManyEmbeddingValuesForCallError`; var X$14 = `vercel.ai.error.${Y$14}`; var Ce$10 = Symbol.for(X$14); var Z$13; var we$10; var Te$10 = class extends (we$10 = i$17, Z$13 = Ce$10, we$10) { constructor(e) { super({ name: Y$14, message: `Too many values for a single embedding call. The ${e.provider} model "${e.modelId}" can only embed up to ${e.maxEmbeddingsPerCall} values per call, but ${e.values.length} values were provided.` }), this[Z$13] = !0, this.provider = e.provider, this.modelId = e.modelId, this.maxEmbeddingsPerCall = e.maxEmbeddingsPerCall, this.values = e.values; } static isInstance(e) { return i$17.hasMarker(e, X$14); } }; var Ee$10 = `AI_TypeValidationError`; var De$9 = `vercel.ai.error.${Ee$10}`; var Oe$10 = Symbol.for(De$9); var Q$12; var ke$9; var Ae$10 = class e extends (ke$9 = i$17, Q$12 = Oe$10, ke$9) { constructor({ value: e, cause: t, context: n }) { let r = `Type validation failed`; if (n?.field && (r += ` for ${n.field}`), n?.entityName || n?.entityId) { r += ` (`; let e = []; n.entityName && e.push(n.entityName), n.entityId && e.push(`id: "${n.entityId}"`), r += e.join(`, `), r += `)`; } super({ name: Ee$10, message: `${r}: Value: ${JSON.stringify(e)}. Error message: ${p$15(t)}`, cause: t }), this[Q$12] = !0, this.value = e, this.context = n; } static isInstance(e) { return i$17.hasMarker(e, De$9); } static wrap({ value: t, cause: n, context: r }) { return e.isInstance(n) && n.value === t && n.context?.field === r?.field && n.context?.entityName === r?.entityName && n.context?.entityId === r?.entityId ? n : new e({ value: t, cause: n, context: r }); } }; var je$11 = `AI_UnsupportedFunctionalityError`; var Me$10 = `vercel.ai.error.${je$11}`; var Ne$11 = Symbol.for(Me$10); var Pe$10; var Fe$10; var Ie$10 = class extends (Fe$10 = i$17, Pe$10 = Ne$11, Fe$10) { constructor({ functionality: e, message: t = `'${e}' functionality not supported.` }) { super({ name: je$11, message: t }), this[Pe$10] = !0, this.functionality = e; } static isInstance(e) { return i$17.hasMarker(e, Me$10); } }; function $$12(e) { return e === null || typeof e == `string` || typeof e == `number` || typeof e == `boolean` ? !0 : Array.isArray(e) ? e.every($$12) : typeof e == `object` ? Object.entries(e).every(([e, t]) => typeof e == `string` && (t === void 0 || $$12(t))) : !1; } function Re$10(e) { return typeof e == `object` && !!e && Object.entries(e).every(([e, t]) => typeof e == `string` && (t === void 0 || $$12(t))); } //#endregion //#region node_modules/eve/dist/src/internal/logging.js const LEVEL_SEVERITY = { debug: 10, info: 20, warn: 30, error: 40 }; function createLogger(e) { return { debug(t, n) { write(`debug`, e, t, n); }, info(t, n) { write(`info`, e, t, n); }, warn(t, n) { write(`warn`, e, t, n); }, error(t, n) { write(`error`, e, t, n), recordOnActiveSpan(t, n); } }; } function logError(e, t, n, r) { let i = formatError(n); return e.error(t, { ...r, error: i }), typeof i.errorId == `string` ? i.errorId : createErrorId(); } function createErrorId() { return crypto.randomUUID(); } function formatError(e, t) { let n = { errorId: t ?? createErrorId(), message: extractErrorMessage(e) }, r = extractErrorName(e); return r !== void 0 && (n.name = r), n.detail = inspectError(e), n; } function extractErrorName(e) { if (e instanceof Error) return e.name === `Error` ? void 0 : e.name; if (isObject(e) && isNonEmptyString(e.name) && e.name !== `Error`) return e.name; } function extractErrorMessage(e) { return isObject(e) && !(e instanceof Error) && typeof e.message == `string` ? e.message : p$15(e); } function recordErrorOnSpan(e, t) { let n = t instanceof Error ? t.message : p$15(t), i = t instanceof Error ? t.name : `Error`; e.setStatus({ code: U$13.ERROR, message: n }), e.recordException({ message: n, name: i, stack: inspectError(t) }); } function resolveThreshold() { let e = process.env.EVE_LOG_LEVEL?.toLowerCase(); return e === `debug` || e === `info` || e === `warn` || e === `error` ? LEVEL_SEVERITY[e] : LEVEL_SEVERITY.info; } function write(e, t, n, r) { if (LEVEL_SEVERITY[e] < resolveThreshold()) return; let i = e === `error` ? console.error : e === `warn` ? console.warn : console.log, a = `[eve:${t}] ${n}`; if (r === void 0) { i(a); return; } i(a, renderFields(r)); } function renderFields(e) { let t = {}; for (let [n, r] of Object.entries(e)) if (r !== void 0) { if (r instanceof Error) { t[n] = formatError(r); continue; } t[n] = r; } return t; } function recordOnActiveSpan(e, t) { let n = $$13.getActiveSpan(); if (n === void 0) return; let a = t?.error; if (a instanceof Error) { recordErrorOnSpan(n, a); return; } if (isFormattedError(a)) { n.setStatus({ code: U$13.ERROR, message: a.message }), n.recordException({ message: a.message, name: typeof a.name == `string` ? a.name : `Error`, stack: typeof a.detail == `string` ? a.detail : void 0 }); return; } n.addEvent(e, t ? renderFields(t) : void 0); } function isFormattedError(e) { return isObject(e) && typeof e.errorId == `string` && typeof e.message == `string`; } function inspectError(t) { return truncate(inspect(t, { breakLength: Infinity, compact: !1, depth: 10, maxStringLength: 8192 }), 16384); } function truncate(e, t) { if (Buffer.byteLength(e, `utf8`) <= t) return e; let n = e.slice(0, t); for (; Buffer.byteLength(n, `utf8`) > t && n.length > 0;) n = n.slice(0, -1); return `${n}<…truncated>`; } //#endregion //#region node_modules/eve/dist/src/execution/runtime-errors.js var RuntimeNoActiveSessionError = class extends Error { code = `NO_ACTIVE_SESSION`; continuationToken; constructor(e) { super(`No active session for continuationToken "${e}".`), this.name = `RuntimeNoActiveSessionError`, this.continuationToken = e; } }; function isRuntimeNoActiveSessionError(e) { return e instanceof RuntimeNoActiveSessionError; } //#endregion //#region node_modules/eve/dist/src/internal/package-name.js const EVE_PACKAGE_NAME = `eve`; //#endregion //#region node_modules/eve/dist/src/internal/application/package.js let cachedPackageInfo; const BUNDLED_FALLBACK_PACKAGE_VERSION = `0.16.2`; function resolveFallbackPackageVersion() { return BUNDLED_FALLBACK_PACKAGE_VERSION.startsWith(`__`) ? `0.0.0` : BUNDLED_FALLBACK_PACKAGE_VERSION; } const FALLBACK_PACKAGE_INFO = { name: EVE_PACKAGE_NAME, version: resolveFallbackPackageVersion() }; function resolveCurrentModulePath() { return typeof __filename == `string` ? __filename : resolveCurrentModulePathFromStack(); } function resolveCurrentModulePathFromStack() { let e = Error.prepareStackTrace; try { Error.prepareStackTrace = (e, t) => t; let e = Error().stack?.[0]?.getFileName(); if (typeof e != `string` || e.length === 0) throw Error(`Failed to resolve the current module path from the stack trace.`); return e.startsWith(`file:`) ? fileURLToPath(e) : e; } finally { Error.prepareStackTrace = e; } } const require = createRequire(resolveCurrentModulePath()); function isBuildOutputPackageRoot(e) { return basename(e) === `dist` && existsSync(join(dirname(e), `package.json`)); } function resolvePackageBuildRoot() { let e = dirname(realpathSync(resolveCurrentModulePath())); for (;;) { if (isBuildOutputPackageRoot(e)) return e; let t = dirname(e); if (t === e) return null; e = t; } } function findNearestPackageRoot$1(e) { let n = e; for (;;) { if (existsSync(join(n, `package.json`)) && !isBuildOutputPackageRoot(n)) return n; let r = dirname(n); if (r === n) throw Error(`Failed to resolve package root from "${e}".`); n = r; } } function resolvePackageRoot() { return findNearestPackageRoot$1(dirname(realpathSync(resolveCurrentModulePath()))); } function tryResolvePackageRoot() { try { return resolvePackageRoot(); } catch { return; } } function rewriteSourceFilePathForBuild(e) { return e.replace(/\.[cm]?tsx?$/, `.js`); } function resolvePackageSourceFilePath(e) { let t = resolvePackageBuildRoot(); return t === null ? join(resolvePackageRoot(), e) : join(t, rewriteSourceFilePathForBuild(e)); } function normalizeInstalledPackageInfo(e) { let t = e; if (!(typeof t.name != `string` || typeof t.version != `string`)) return { name: t.name, version: t.version }; } function tryReadInstalledPackageInfo(e, t) { let r = normalizeInstalledPackageInfo(JSON.parse(readFileSync(e, `utf8`))); if (r?.name === t) return r; } function resolveInstalledPackageInfo() { if (cachedPackageInfo) return cachedPackageInfo; let e = tryResolvePackageRoot(), t = e === void 0 ? void 0 : tryReadInstalledPackageInfo(join(e, `package.json`), EVE_PACKAGE_NAME); if (t) return cachedPackageInfo = t, cachedPackageInfo; try { let e = tryReadInstalledPackageInfo(require.resolve(`${EVE_PACKAGE_NAME}/package.json`), EVE_PACKAGE_NAME); if (e) return cachedPackageInfo = e, cachedPackageInfo; } catch {} return cachedPackageInfo = { ...FALLBACK_PACKAGE_INFO }, cachedPackageInfo; } //#endregion //#region node_modules/eve/dist/src/runtime/compiled-artifacts-source.js function createBundledRuntimeCompiledArtifactsSource() { return { kind: `bundled` }; } function createDiskRuntimeCompiledArtifactsSource(e, t = {}) { return t.moduleMapLoaderPath !== void 0 || t.sandboxAppRoot !== void 0 ? { appRoot: e, kind: `disk`, moduleMapLoaderPath: t.moduleMapLoaderPath, sandboxAppRoot: t.sandboxAppRoot } : { appRoot: e, kind: `disk` }; } function getRuntimeCompiledArtifactsAppRoot(e) { return e.kind === `disk` ? e.appRoot : void 0; } function getRuntimeCompiledArtifactsSandboxAppRoot(e) { return e.kind === `disk` ? e.sandboxAppRoot ?? e.appRoot : void 0; } function getRuntimeCompiledArtifactsCacheKey(e) { return e.kind === `disk` ? e.moduleMapLoaderPath === void 0 ? `disk:${e.appRoot}` : `disk:${e.appRoot}:authored-source:${e.moduleMapLoaderPath}` : `bundled`; } //#endregion //#region node_modules/eve/dist/src/runtime/graph.js const ROOT_RUNTIME_AGENT_NODE_ID = `__root__`; function getResolvedRuntimeAgentNode(e, t) { if (t === void 0 || t === `__root__`) return e.root; let n = e.nodesByNodeId.get(t); if (n === void 0) throw Error(`Missing runtime agent node for node id "${t}".`); return n; } //#endregion //#region node_modules/eve/dist/src/compiled/_chunks/client/core-Bm8azZA6.js var e$3 = Object.defineProperty; var t$13 = (t, n) => { let r = {}; for (var i in t) e$3(r, i, { get: t[i], enumerable: !0 }); return n || e$3(r, Symbol.toStringTag, { value: `Module` }), r; }; var n$15; const r$17 = Object.freeze({ status: `aborted` }); function i$16(e, t, n) { function r(n, r) { if (n._zod || Object.defineProperty(n, "_zod", { value: { def: r, constr: o, traits: /* @__PURE__ */ new Set() }, enumerable: !1 }), n._zod.traits.has(e)) return; n._zod.traits.add(e), t(n, r); let i = o.prototype, a = Object.keys(i); for (let e = 0; e < a.length; e++) { let t = a[e]; t in n || (n[t] = i[t].bind(n)); } } let i = n?.Parent ?? Object; class a extends i {} Object.defineProperty(a, "name", { value: e }); function o(e) { var t; let i = n?.Parent ? new a() : this; r(i, e), (t = i._zod).deferred ?? (t.deferred = []); for (let e of i._zod.deferred) e(); return i; } return Object.defineProperty(o, "init", { value: r }), Object.defineProperty(o, Symbol.hasInstance, { value: (t) => n?.Parent && t instanceof n.Parent ? !0 : t?._zod?.traits?.has(e) }), Object.defineProperty(o, "name", { value: e }), o; } const a$13 = Symbol(`zod_brand`); var o$13 = class extends Error { constructor() { super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`); } }; var s$11 = class extends Error { constructor(e) { super(`Encountered unidirectional transform during encode: ${e}`), this.name = `ZodEncodeError`; } }; (n$15 = globalThis).__zod_globalConfig ?? (n$15.__zod_globalConfig = {}); const c$13 = globalThis.__zod_globalConfig; function l$12(e) { return e && Object.assign(c$13, e), c$13; } var u$14 = t$13({ BIGINT_FORMAT_RANGES: () => we$9, Class: () => He$9, NUMBER_FORMAT_RANGES: () => Ce$9, aborted: () => E$14, allowsEval: () => he$9, assert: () => te$7, assertEqual: () => d$14, assertIs: () => p$14, assertNever: () => ee$7, assertNotEqual: () => f$13, assignProp: () => v$10, base64ToUint8Array: () => Ie$9, base64urlToUint8Array: () => Re$9, cached: () => h$12, captureStackTrace: () => me$9, cleanEnum: () => Fe$9, cleanRegex: () => ie$8, clone: () => C$14, cloneDef: () => ce$10, createTransparentProxy: () => xe$9, defineLazy: () => _$10, esc: () => fe$10, escapeRegex: () => S$13, explicitlyAborted: () => Me$9, extend: () => De$8, finalizeIssue: () => k$13, floatSafeRemainder: () => ae$9, getElementAtPath: () => le$10, getEnumValues: () => ne$7, getLengthableOrigin: () => Pe$9, getParsedType: () => ve$9, getSizableOrigin: () => Ne$10, hexToUint8Array: () => Be$9, isObject: () => b$11, isPlainObject: () => x$12, issue: () => j$12, joinValues: () => m$10, jsonStringifyReplacer: () => re$8, merge: () => ke$8, mergeDefs: () => y$8, normalizeParams: () => w$14, nullish: () => g$11, numKeys: () => _e$9, objectClone: () => se$10, omit: () => Ee$9, optionalKeys: () => Se$9, parsedType: () => A$12, partial: () => Ae$9, pick: () => Te$9, prefixIssues: () => D$13, primitiveTypes: () => be$9, promiseAllObject: () => ue$10, propertyKeyTypes: () => ye$9, randomString: () => de$10, required: () => je$10, safeExtend: () => Oe$9, shallowClone: () => ge$9, slugify: () => pe$9, stringifyPrimitive: () => T$14, uint8ArrayToBase64: () => Le$9, uint8ArrayToBase64url: () => ze$9, uint8ArrayToHex: () => Ve$9, unwrapMessage: () => O$12 }); function d$14(e) { return e; } function f$13(e) { return e; } function p$14(e) {} function ee$7(e) { throw Error(`Unexpected value in exhaustive check`); } function te$7(e) {} function ne$7(e) { let t = Object.values(e).filter((e) => typeof e == `number`); return Object.entries(e).filter(([e, n]) => t.indexOf(+e) === -1).map(([e, t]) => t); } function m$10(e, t = `|`) { return e.map((e) => T$14(e)).join(t); } function re$8(e, t) { return typeof t == `bigint` ? t.toString() : t; } function h$12(e) { return { get value() { { let t = e(); return Object.defineProperty(this, "value", { value: t }), t; } } }; } function g$11(e) { return e == null; } function ie$8(e) { let t = +!!e.startsWith(`^`), n = e.endsWith(`$`) ? e.length - 1 : e.length; return e.slice(t, n); } function ae$9(e, t) { let n = e / t, r = Math.round(n), i = 2 ** -52 * Math.max(Math.abs(n), 1); return Math.abs(n - r) < i ? 0 : n - r; } const oe$9 = Symbol(`evaluating`); function _$10(e, t, n) { let r; Object.defineProperty(e, t, { get() { if (r !== oe$9) return r === void 0 && (r = oe$9, r = n()), r; }, set(n) { Object.defineProperty(e, t, { value: n }); }, configurable: !0 }); } function se$10(e) { return Object.create(Object.getPrototypeOf(e), Object.getOwnPropertyDescriptors(e)); } function v$10(e, t, n) { Object.defineProperty(e, t, { value: n, writable: !0, enumerable: !0, configurable: !0 }); } function y$8(...e) { let t = {}; for (let n of e) Object.assign(t, Object.getOwnPropertyDescriptors(n)); return Object.defineProperties({}, t); } function ce$10(e) { return y$8(e._zod.def); } function le$10(e, t) { return t ? t.reduce((e, t) => e?.[t], e) : e; } function ue$10(e) { let t = Object.keys(e), n = t.map((t) => e[t]); return Promise.all(n).then((e) => { let n = {}; for (let r = 0; r < t.length; r++) n[t[r]] = e[r]; return n; }); } function de$10(e = 10) { let t = ``; for (let n = 0; n < e; n++) t += `abcdefghijklmnopqrstuvwxyz`[Math.floor(Math.random() * 26)]; return t; } function fe$10(e) { return JSON.stringify(e); } function pe$9(e) { return e.toLowerCase().trim().replace(/[^\w\s-]/g, ``).replace(/[\s_-]+/g, `-`).replace(/^-+|-+$/g, ``); } const me$9 = `captureStackTrace` in Error ? Error.captureStackTrace : (...e) => {}; function b$11(e) { return typeof e == `object` && !!e && !Array.isArray(e); } const he$9 = h$12(() => { if (c$13.jitless || typeof navigator < `u` && navigator?.userAgent?.includes(`Cloudflare`)) return !1; try { return Function(``), !0; } catch { return !1; } }); function x$12(e) { if (b$11(e) === !1) return !1; let t = e.constructor; if (t === void 0 || typeof t != `function`) return !0; let n = t.prototype; return !(b$11(n) === !1 || Object.prototype.hasOwnProperty.call(n, `isPrototypeOf`) === !1); } function ge$9(e) { return x$12(e) ? { ...e } : Array.isArray(e) ? [...e] : e instanceof Map ? new Map(e) : e instanceof Set ? new Set(e) : e; } function _e$9(e) { let t = 0; for (let n in e) Object.prototype.hasOwnProperty.call(e, n) && t++; return t; } const ve$9 = (e) => { let t = typeof e; switch (t) { case `undefined`: return `undefined`; case `string`: return `string`; case `number`: return Number.isNaN(e) ? `nan` : `number`; case `boolean`: return `boolean`; case `function`: return `function`; case `bigint`: return `bigint`; case `symbol`: return `symbol`; case `object`: return Array.isArray(e) ? `array` : e === null ? `null` : e.then && typeof e.then == `function` && e.catch && typeof e.catch == `function` ? `promise` : typeof Map < `u` && e instanceof Map ? `map` : typeof Set < `u` && e instanceof Set ? `set` : typeof Date < `u` && e instanceof Date ? `date` : typeof File < `u` && e instanceof File ? `file` : `object`; default: throw Error(`Unknown data type: ${t}`); } }; const ye$9 = /* @__PURE__ */ new Set([ `string`, `number`, `symbol` ]); const be$9 = /* @__PURE__ */ new Set([ `string`, `number`, `bigint`, `boolean`, `symbol`, `undefined` ]); function S$13(e) { return e.replace(/[.*+?^${}()|[\]\\]/g, `\\$&`); } function C$14(e, t, n) { let r = new e._zod.constr(t ?? e._zod.def); return (!t || n?.parent) && (r._zod.parent = e), r; } function w$14(e) { let t = e; if (!t) return {}; if (typeof t == `string`) return { error: () => t }; if (t?.message !== void 0) { if (t?.error !== void 0) throw Error("Cannot specify both `message` and `error` params"); t.error = t.message; } return delete t.message, typeof t.error == `string` ? { ...t, error: () => t.error } : t; } function xe$9(e) { let t; return new Proxy({}, { get(n, r, i) { return t ??= e(), Reflect.get(t, r, i); }, set(n, r, i, a) { return t ??= e(), Reflect.set(t, r, i, a); }, has(n, r) { return t ??= e(), Reflect.has(t, r); }, deleteProperty(n, r) { return t ??= e(), Reflect.deleteProperty(t, r); }, ownKeys(n) { return t ??= e(), Reflect.ownKeys(t); }, getOwnPropertyDescriptor(n, r) { return t ??= e(), Reflect.getOwnPropertyDescriptor(t, r); }, defineProperty(n, r, i) { return t ??= e(), Reflect.defineProperty(t, r, i); } }); } function T$14(e) { return typeof e == `bigint` ? e.toString() + `n` : typeof e == `string` ? `"${e}"` : `${e}`; } function Se$9(e) { return Object.keys(e).filter((t) => e[t]._zod.optin === `optional` && e[t]._zod.optout === `optional`); } const Ce$9 = { safeint: [-(2 ** 53 - 1), 2 ** 53 - 1], int32: [-2147483648, 2147483647], uint32: [0, 4294967295], float32: [-34028234663852886e22, 34028234663852886e22], float64: [-Number.MAX_VALUE, Number.MAX_VALUE] }; const we$9 = { int64: [BigInt(`-9223372036854775808`), BigInt(`9223372036854775807`)], uint64: [BigInt(0), BigInt(`18446744073709551615`)] }; function Te$9(e, t) { let n = e._zod.def, r = n.checks; if (r && r.length > 0) throw Error(`.pick() cannot be used on object schemas containing refinements`); return C$14(e, y$8(e._zod.def, { get shape() { let e = {}; for (let r in t) { if (!(r in n.shape)) throw Error(`Unrecognized key: "${r}"`); t[r] && (e[r] = n.shape[r]); } return v$10(this, `shape`, e), e; }, checks: [] })); } function Ee$9(e, t) { let n = e._zod.def, r = n.checks; if (r && r.length > 0) throw Error(`.omit() cannot be used on object schemas containing refinements`); return C$14(e, y$8(e._zod.def, { get shape() { let r = { ...e._zod.def.shape }; for (let e in t) { if (!(e in n.shape)) throw Error(`Unrecognized key: "${e}"`); t[e] && delete r[e]; } return v$10(this, `shape`, r), r; }, checks: [] })); } function De$8(e, t) { if (!x$12(t)) throw Error(`Invalid input to extend: expected a plain object`); let n = e._zod.def.checks; if (n && n.length > 0) { let n = e._zod.def.shape; for (let e in t) if (Object.getOwnPropertyDescriptor(n, e) !== void 0) throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead."); } return C$14(e, y$8(e._zod.def, { get shape() { let n = { ...e._zod.def.shape, ...t }; return v$10(this, `shape`, n), n; } })); } function Oe$9(e, t) { if (!x$12(t)) throw Error(`Invalid input to safeExtend: expected a plain object`); return C$14(e, y$8(e._zod.def, { get shape() { let n = { ...e._zod.def.shape, ...t }; return v$10(this, `shape`, n), n; } })); } function ke$8(e, t) { if (e._zod.def.checks?.length) throw Error(`.merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.`); return C$14(e, y$8(e._zod.def, { get shape() { let n = { ...e._zod.def.shape, ...t._zod.def.shape }; return v$10(this, `shape`, n), n; }, get catchall() { return t._zod.def.catchall; }, checks: t._zod.def.checks ?? [] })); } function Ae$9(e, t, n) { let r = t._zod.def.checks; if (r && r.length > 0) throw Error(`.partial() cannot be used on object schemas containing refinements`); return C$14(t, y$8(t._zod.def, { get shape() { let r = t._zod.def.shape, i = { ...r }; if (n) for (let t in n) { if (!(t in r)) throw Error(`Unrecognized key: "${t}"`); n[t] && (i[t] = e ? new e({ type: `optional`, innerType: r[t] }) : r[t]); } else for (let t in r) i[t] = e ? new e({ type: `optional`, innerType: r[t] }) : r[t]; return v$10(this, `shape`, i), i; }, checks: [] })); } function je$10(e, t, n) { return C$14(t, y$8(t._zod.def, { get shape() { let r = t._zod.def.shape, i = { ...r }; if (n) for (let t in n) { if (!(t in i)) throw Error(`Unrecognized key: "${t}"`); n[t] && (i[t] = new e({ type: `nonoptional`, innerType: r[t] })); } else for (let t in r) i[t] = new e({ type: `nonoptional`, innerType: r[t] }); return v$10(this, `shape`, i), i; } })); } function E$14(e, t = 0) { if (e.aborted === !0) return !0; for (let n = t; n < e.issues.length; n++) if (e.issues[n]?.continue !== !0) return !0; return !1; } function Me$9(e, t = 0) { if (e.aborted === !0) return !0; for (let n = t; n < e.issues.length; n++) if (e.issues[n]?.continue === !1) return !0; return !1; } function D$13(e, t) { return t.map((t) => { var n; return (n = t).path ?? (n.path = []), t.path.unshift(e), t; }); } function O$12(e) { return typeof e == `string` ? e : e?.message; } function k$13(e, t, n) { let r = e.message ? e.message : O$12(e.inst?._zod.def?.error?.(e)) ?? O$12(t?.error?.(e)) ?? O$12(n.customError?.(e)) ?? O$12(n.localeError?.(e)) ?? `Invalid input`, { inst: i, continue: a, input: o, ...s } = e; return s.path ??= [], s.message = r, t?.reportInput && (s.input = o), s; } function Ne$10(e) { return e instanceof Set ? `set` : e instanceof Map ? `map` : e instanceof File ? `file` : `unknown`; } function Pe$9(e) { return Array.isArray(e) ? `array` : typeof e == `string` ? `string` : `unknown`; } function A$12(e) { let t = typeof e; switch (t) { case `number`: return Number.isNaN(e) ? `nan` : `number`; case `object`: { if (e === null) return `null`; if (Array.isArray(e)) return `array`; let t = e; if (t && Object.getPrototypeOf(t) !== Object.prototype && `constructor` in t && t.constructor) return t.constructor.name; } } return t; } function j$12(...e) { let [t, n, r] = e; return typeof t == `string` ? { message: t, code: `custom`, input: n, inst: r } : { ...t }; } function Fe$9(e) { return Object.entries(e).filter(([e, t]) => Number.isNaN(Number.parseInt(e, 10))).map((e) => e[1]); } function Ie$9(e) { let t = atob(e), n = new Uint8Array(t.length); for (let e = 0; e < t.length; e++) n[e] = t.charCodeAt(e); return n; } function Le$9(e) { let t = ``; for (let n = 0; n < e.length; n++) t += String.fromCharCode(e[n]); return btoa(t); } function Re$9(e) { let t = e.replace(/-/g, `+`).replace(/_/g, `/`); return Ie$9(t + `=`.repeat((4 - t.length % 4) % 4)); } function ze$9(e) { return Le$9(e).replace(/\+/g, `-`).replace(/\//g, `_`).replace(/=/g, ``); } function Be$9(e) { let t = e.replace(/^0x/, ``); if (t.length % 2 != 0) throw Error(`Invalid hex string length`); let n = new Uint8Array(t.length / 2); for (let e = 0; e < t.length; e += 2) n[e / 2] = Number.parseInt(t.slice(e, e + 2), 16); return n; } function Ve$9(e) { return Array.from(e).map((e) => e.toString(16).padStart(2, `0`)).join(``); } var He$9 = class { constructor(...e) {} }; const Ue$9 = (e, t) => { e.name = `$ZodError`, Object.defineProperty(e, "_zod", { value: e._zod, enumerable: !1 }), Object.defineProperty(e, "issues", { value: t, enumerable: !1 }), e.message = JSON.stringify(t, re$8, 2), Object.defineProperty(e, "toString", { value: () => e.message, enumerable: !1 }); }; const We$9 = i$16(`$ZodError`, Ue$9); const M$12 = i$16(`$ZodError`, Ue$9, { Parent: Error }); function Ge$9(e, t = (e) => e.message) { let n = {}, r = []; for (let i of e.issues) i.path.length > 0 ? (n[i.path[0]] = n[i.path[0]] || [], n[i.path[0]].push(t(i))) : r.push(t(i)); return { formErrors: r, fieldErrors: n }; } function Ke$9(e, t = (e) => e.message) { let n = { _errors: [] }, r = (e, i = []) => { for (let a of e.issues) if (a.code === `invalid_union` && a.errors.length) a.errors.map((e) => r({ issues: e }, [...i, ...a.path])); else if (a.code === `invalid_key`) r({ issues: a.issues }, [...i, ...a.path]); else if (a.code === `invalid_element`) r({ issues: a.issues }, [...i, ...a.path]); else { let e = [...i, ...a.path]; if (e.length === 0) n._errors.push(t(a)); else { let r = n, i = 0; for (; i < e.length;) { let n = e[i]; i === e.length - 1 ? (r[n] = r[n] || { _errors: [] }, r[n]._errors.push(t(a))) : r[n] = r[n] || { _errors: [] }, r = r[n], i++; } } } }; return r(e), n; } function qe$9(e, t = (e) => e.message) { let n = { errors: [] }, r = (e, i = []) => { var a, o; for (let s of e.issues) if (s.code === `invalid_union` && s.errors.length) s.errors.map((e) => r({ issues: e }, [...i, ...s.path])); else if (s.code === `invalid_key`) r({ issues: s.issues }, [...i, ...s.path]); else if (s.code === `invalid_element`) r({ issues: s.issues }, [...i, ...s.path]); else { let e = [...i, ...s.path]; if (e.length === 0) { n.errors.push(t(s)); continue; } let r = n, c = 0; for (; c < e.length;) { let n = e[c], i = c === e.length - 1; typeof n == `string` ? (r.properties ??= {}, (a = r.properties)[n] ?? (a[n] = { errors: [] }), r = r.properties[n]) : (r.items ??= [], (o = r.items)[n] ?? (o[n] = { errors: [] }), r = r.items[n]), i && r.errors.push(t(s)), c++; } } }; return r(e), n; } function Je$10(e) { let t = [], n = e.map((e) => typeof e == `object` ? e.key : e); for (let e of n) typeof e == `number` ? t.push(`[${e}]`) : typeof e == `symbol` ? t.push(`[${JSON.stringify(String(e))}]`) : /[^\w$]/.test(e) ? t.push(`[${JSON.stringify(e)}]`) : (t.length && t.push(`.`), t.push(e)); return t.join(``); } function Ye$10(e) { let t = [], n = [...e.issues].sort((e, t) => (e.path ?? []).length - (t.path ?? []).length); for (let e of n) t.push(`✖ ${e.message}`), e.path?.length && t.push(` → at ${Je$10(e.path)}`); return t.join(` `); } const N$11 = (e) => (t, n, r, i) => { let a = r ? { ...r, async: !1 } : { async: !1 }, s = t._zod.run({ value: n, issues: [] }, a); if (s instanceof Promise) throw new o$13(); if (s.issues.length) { let t = new ((i?.Err) ?? e)(s.issues.map((e) => k$13(e, a, l$12()))); throw me$9(t, i?.callee), t; } return s.value; }; const Xe$9 = N$11(M$12); const P$11 = (e) => async (t, n, r, i) => { let a = r ? { ...r, async: !0 } : { async: !0 }, o = t._zod.run({ value: n, issues: [] }, a); if (o instanceof Promise && (o = await o), o.issues.length) { let t = new ((i?.Err) ?? e)(o.issues.map((e) => k$13(e, a, l$12()))); throw me$9(t, i?.callee), t; } return o.value; }; const Ze$10 = P$11(M$12); const F$11 = (e) => (t, n, r) => { let i = r ? { ...r, async: !1 } : { async: !1 }, a = t._zod.run({ value: n, issues: [] }, i); if (a instanceof Promise) throw new o$13(); return a.issues.length ? { success: !1, error: new (e ?? We$9)(a.issues.map((e) => k$13(e, i, l$12()))) } : { success: !0, data: a.value }; }; const Qe$9 = F$11(M$12); const I$11 = (e) => async (t, n, r) => { let i = r ? { ...r, async: !0 } : { async: !0 }, a = t._zod.run({ value: n, issues: [] }, i); return a instanceof Promise && (a = await a), a.issues.length ? { success: !1, error: new e(a.issues.map((e) => k$13(e, i, l$12()))) } : { success: !0, data: a.value }; }; const $e$9 = I$11(M$12); const et$9 = (e) => (t, n, r) => { let i = r ? { ...r, direction: `backward` } : { direction: `backward` }; return N$11(e)(t, n, i); }; const tt$10 = et$9(M$12); const nt$10 = (e) => (t, n, r) => N$11(e)(t, n, r); const rt$9 = nt$10(M$12); const it$8 = (e) => async (t, n, r) => { let i = r ? { ...r, direction: `backward` } : { direction: `backward` }; return P$11(e)(t, n, i); }; const at$8 = it$8(M$12); const ot$8 = (e) => async (t, n, r) => P$11(e)(t, n, r); const st$8 = ot$8(M$12); const ct$8 = (e) => (t, n, r) => { let i = r ? { ...r, direction: `backward` } : { direction: `backward` }; return F$11(e)(t, n, i); }; const lt$8 = ct$8(M$12); const ut$8 = (e) => (t, n, r) => F$11(e)(t, n, r); const dt$8 = ut$8(M$12); const ft$8 = (e) => async (t, n, r) => { let i = r ? { ...r, direction: `backward` } : { direction: `backward` }; return I$11(e)(t, n, i); }; const pt$8 = ft$8(M$12); const mt$8 = (e) => async (t, n, r) => I$11(e)(t, n, r); const ht$8 = mt$8(M$12); var gt$8 = t$13({ base64: () => Vt$7, base64url: () => Ht$7, bigint: () => $t$7, boolean: () => nn$6, browserEmail: () => Pt$7, cidrv4: () => zt$8, cidrv6: () => Bt$6, cuid: () => _t$8, cuid2: () => vt$8, date: () => Jt$7, datetime: () => Zt$6, domain: () => Wt$6, duration: () => Ct$8, e164: () => Kt$7, email: () => kt$8, emoji: () => Ft$7, extendedDuration: () => wt$8, guid: () => Tt$8, hex: () => cn$6, hostname: () => Ut$6, html5Email: () => At$8, httpProtocol: () => Gt$6, idnEmail: () => Nt$7, integer: () => en$7, ipv4: () => It$7, ipv6: () => Lt$8, ksuid: () => xt$8, lowercase: () => on$6, mac: () => Rt$7, md5_base64: () => un$6, md5_base64url: () => dn$6, md5_hex: () => ln$6, nanoid: () => St$8, null: () => rn$7, number: () => tn$7, rfc5322Email: () => jt$8, sha1_base64: () => pn$6, sha1_base64url: () => mn$6, sha1_hex: () => fn$6, sha256_base64: () => gn$7, sha256_base64url: () => _n$7, sha256_hex: () => hn$6, sha384_base64: () => yn$7, sha384_base64url: () => bn$7, sha384_hex: () => vn$7, sha512_base64: () => Sn$6, sha512_base64url: () => Cn$6, sha512_hex: () => xn$6, string: () => Qt$7, time: () => Xt$7, ulid: () => yt$8, undefined: () => an$6, unicodeEmail: () => Mt$8, uppercase: () => sn$6, uuid: () => L$10, uuid4: () => Et$9, uuid6: () => Dt$8, uuid7: () => Ot$8, xid: () => bt$8 }); const _t$8 = /^[cC][0-9a-z]{6,}$/; const vt$8 = /^[0-9a-z]+$/; const yt$8 = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/; const bt$8 = /^[0-9a-vA-V]{20}$/; const xt$8 = /^[A-Za-z0-9]{27}$/; const St$8 = /^[a-zA-Z0-9_-]{21}$/; const Ct$8 = /^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/; const wt$8 = /^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/; const Tt$8 = /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/; const L$10 = (e) => e ? RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`) : /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/; const Et$9 = L$10(4); const Dt$8 = L$10(6); const Ot$8 = L$10(7); const kt$8 = /^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/; const At$8 = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/; const jt$8 = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/; const Mt$8 = /^[^\s@"]{1,64}@[^\s@]{1,255}$/u; const Nt$7 = Mt$8; const Pt$7 = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/; function Ft$7() { return RegExp(`^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`, `u`); } const It$7 = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/; const Lt$8 = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/; const Rt$7 = (e) => { let t = S$13(e ?? `:`); return RegExp(`^(?:[0-9A-F]{2}${t}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${t}){5}[0-9a-f]{2}$`); }; const zt$8 = /^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/; const Bt$6 = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/; const Vt$7 = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/; const Ht$7 = /^[A-Za-z0-9_-]*$/; const Ut$6 = /^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/; const Wt$6 = /^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/; const Gt$6 = /^https?$/; const Kt$7 = /^\+[1-9]\d{6,14}$/; const qt$7 = `(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`; const Jt$7 = RegExp(`^${qt$7}$`); function Yt$7(e) { let t = `(?:[01]\\d|2[0-3]):[0-5]\\d`; return typeof e.precision == `number` ? e.precision === -1 ? `${t}` : e.precision === 0 ? `${t}:[0-5]\\d` : `${t}:[0-5]\\d\\.\\d{${e.precision}}` : `${t}(?::[0-5]\\d(?:\\.\\d+)?)?`; } function Xt$7(e) { return RegExp(`^${Yt$7(e)}$`); } function Zt$6(e) { let t = Yt$7({ precision: e.precision }), n = [`Z`]; e.local && n.push(``), e.offset && n.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`); let r = `${t}(?:${n.join(`|`)})`; return RegExp(`^${qt$7}T(?:${r})$`); } const Qt$7 = (e) => { let t = e ? `[\\s\\S]{${e?.minimum ?? 0},${e?.maximum ?? ``}}` : `[\\s\\S]*`; return RegExp(`^${t}$`); }; const $t$7 = /^-?\d+n?$/; const en$7 = /^-?\d+$/; const tn$7 = /^-?\d+(?:\.\d+)?$/; const nn$6 = /^(?:true|false)$/i; const rn$7 = /^null$/i; const an$6 = /^undefined$/i; const on$6 = /^[^A-Z]*$/; const sn$6 = /^[^a-z]*$/; const cn$6 = /^[0-9a-fA-F]*$/; function R$12(e, t) { return RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`); } function z$12(e) { return RegExp(`^[A-Za-z0-9_-]{${e}}$`); } const ln$6 = /^[0-9a-fA-F]{32}$/; const un$6 = R$12(22, `==`); const dn$6 = z$12(22); const fn$6 = /^[0-9a-fA-F]{40}$/; const pn$6 = R$12(27, `=`); const mn$6 = z$12(27); const hn$6 = /^[0-9a-fA-F]{64}$/; const gn$7 = R$12(43, `=`); const _n$7 = z$12(43); const vn$7 = /^[0-9a-fA-F]{96}$/; const yn$7 = R$12(64, ``); const bn$7 = z$12(64); const xn$6 = /^[0-9a-fA-F]{128}$/; const Sn$6 = R$12(86, `==`); const Cn$6 = z$12(86); const B$13 = i$16(`$ZodCheck`, (e, t) => { var n; e._zod ??= {}, e._zod.def = t, (n = e._zod).onattach ?? (n.onattach = []); }); const wn$6 = { number: `number`, bigint: `bigint`, object: `date` }; const Tn$6 = i$16(`$ZodCheckLessThan`, (e, t) => { B$13.init(e, t); let n = wn$6[typeof t.value]; e._zod.onattach.push((e) => { let n = e._zod.bag, r = (t.inclusive ? n.maximum : n.exclusiveMaximum) ?? Infinity; t.value < r && (t.inclusive ? n.maximum = t.value : n.exclusiveMaximum = t.value); }), e._zod.check = (r) => { (t.inclusive ? r.value <= t.value : r.value < t.value) || r.issues.push({ origin: n, code: `too_big`, maximum: typeof t.value == `object` ? t.value.getTime() : t.value, input: r.value, inclusive: t.inclusive, inst: e, continue: !t.abort }); }; }); const En$6 = i$16(`$ZodCheckGreaterThan`, (e, t) => { B$13.init(e, t); let n = wn$6[typeof t.value]; e._zod.onattach.push((e) => { let n = e._zod.bag, r = (t.inclusive ? n.minimum : n.exclusiveMinimum) ?? -Infinity; t.value > r && (t.inclusive ? n.minimum = t.value : n.exclusiveMinimum = t.value); }), e._zod.check = (r) => { (t.inclusive ? r.value >= t.value : r.value > t.value) || r.issues.push({ origin: n, code: `too_small`, minimum: typeof t.value == `object` ? t.value.getTime() : t.value, input: r.value, inclusive: t.inclusive, inst: e, continue: !t.abort }); }; }); const Dn$6 = i$16(`$ZodCheckMultipleOf`, (e, t) => { B$13.init(e, t), e._zod.onattach.push((e) => { var n; (n = e._zod.bag).multipleOf ?? (n.multipleOf = t.value); }), e._zod.check = (n) => { if (typeof n.value != typeof t.value) throw Error(`Cannot mix number and bigint in multiple_of check.`); (typeof n.value == `bigint` ? n.value % t.value === BigInt(0) : ae$9(n.value, t.value) === 0) || n.issues.push({ origin: typeof n.value, code: `not_multiple_of`, divisor: t.value, input: n.value, inst: e, continue: !t.abort }); }; }); const On$6 = i$16(`$ZodCheckNumberFormat`, (e, t) => { B$13.init(e, t), t.format = t.format || `float64`; let n = t.format?.includes(`int`), r = n ? `int` : `number`, [i, a] = Ce$9[t.format]; e._zod.onattach.push((e) => { let r = e._zod.bag; r.format = t.format, r.minimum = i, r.maximum = a, n && (r.pattern = en$7); }), e._zod.check = (o) => { let s = o.value; if (n) { if (!Number.isInteger(s)) { o.issues.push({ expected: r, format: t.format, code: `invalid_type`, continue: !1, input: s, inst: e }); return; } if (!Number.isSafeInteger(s)) { s > 0 ? o.issues.push({ input: s, code: `too_big`, maximum: 2 ** 53 - 1, note: `Integers must be within the safe integer range.`, inst: e, origin: r, inclusive: !0, continue: !t.abort }) : o.issues.push({ input: s, code: `too_small`, minimum: -(2 ** 53 - 1), note: `Integers must be within the safe integer range.`, inst: e, origin: r, inclusive: !0, continue: !t.abort }); return; } } s < i && o.issues.push({ origin: `number`, input: s, code: `too_small`, minimum: i, inclusive: !0, inst: e, continue: !t.abort }), s > a && o.issues.push({ origin: `number`, input: s, code: `too_big`, maximum: a, inclusive: !0, inst: e, continue: !t.abort }); }; }); const kn$6 = i$16(`$ZodCheckBigIntFormat`, (e, t) => { B$13.init(e, t); let [n, r] = we$9[t.format]; e._zod.onattach.push((e) => { let i = e._zod.bag; i.format = t.format, i.minimum = n, i.maximum = r; }), e._zod.check = (i) => { let a = i.value; a < n && i.issues.push({ origin: `bigint`, input: a, code: `too_small`, minimum: n, inclusive: !0, inst: e, continue: !t.abort }), a > r && i.issues.push({ origin: `bigint`, input: a, code: `too_big`, maximum: r, inclusive: !0, inst: e, continue: !t.abort }); }; }); const An$5 = i$16(`$ZodCheckMaxSize`, (e, t) => { var n; B$13.init(e, t), (n = e._zod.def).when ?? (n.when = (e) => { let t = e.value; return !g$11(t) && t.size !== void 0; }), e._zod.onattach.push((e) => { let n = e._zod.bag.maximum ?? Infinity; t.maximum < n && (e._zod.bag.maximum = t.maximum); }), e._zod.check = (n) => { let r = n.value; r.size <= t.maximum || n.issues.push({ origin: Ne$10(r), code: `too_big`, maximum: t.maximum, inclusive: !0, input: r, inst: e, continue: !t.abort }); }; }); const jn$5 = i$16(`$ZodCheckMinSize`, (e, t) => { var n; B$13.init(e, t), (n = e._zod.def).when ?? (n.when = (e) => { let t = e.value; return !g$11(t) && t.size !== void 0; }), e._zod.onattach.push((e) => { let n = e._zod.bag.minimum ?? -Infinity; t.minimum > n && (e._zod.bag.minimum = t.minimum); }), e._zod.check = (n) => { let r = n.value; r.size >= t.minimum || n.issues.push({ origin: Ne$10(r), code: `too_small`, minimum: t.minimum, inclusive: !0, input: r, inst: e, continue: !t.abort }); }; }); const Mn$6 = i$16(`$ZodCheckSizeEquals`, (e, t) => { var n; B$13.init(e, t), (n = e._zod.def).when ?? (n.when = (e) => { let t = e.value; return !g$11(t) && t.size !== void 0; }), e._zod.onattach.push((e) => { let n = e._zod.bag; n.minimum = t.size, n.maximum = t.size, n.size = t.size; }), e._zod.check = (n) => { let r = n.value, i = r.size; if (i === t.size) return; let a = i > t.size; n.issues.push({ origin: Ne$10(r), ...a ? { code: `too_big`, maximum: t.size } : { code: `too_small`, minimum: t.size }, inclusive: !0, exact: !0, input: n.value, inst: e, continue: !t.abort }); }; }); const Nn$5 = i$16(`$ZodCheckMaxLength`, (e, t) => { var n; B$13.init(e, t), (n = e._zod.def).when ?? (n.when = (e) => { let t = e.value; return !g$11(t) && t.length !== void 0; }), e._zod.onattach.push((e) => { let n = e._zod.bag.maximum ?? Infinity; t.maximum < n && (e._zod.bag.maximum = t.maximum); }), e._zod.check = (n) => { let r = n.value; if (r.length <= t.maximum) return; let i = Pe$9(r); n.issues.push({ origin: i, code: `too_big`, maximum: t.maximum, inclusive: !0, input: r, inst: e, continue: !t.abort }); }; }); const Pn$5 = i$16(`$ZodCheckMinLength`, (e, t) => { var n; B$13.init(e, t), (n = e._zod.def).when ?? (n.when = (e) => { let t = e.value; return !g$11(t) && t.length !== void 0; }), e._zod.onattach.push((e) => { let n = e._zod.bag.minimum ?? -Infinity; t.minimum > n && (e._zod.bag.minimum = t.minimum); }), e._zod.check = (n) => { let r = n.value; if (r.length >= t.minimum) return; let i = Pe$9(r); n.issues.push({ origin: i, code: `too_small`, minimum: t.minimum, inclusive: !0, input: r, inst: e, continue: !t.abort }); }; }); const Fn$4 = i$16(`$ZodCheckLengthEquals`, (e, t) => { var n; B$13.init(e, t), (n = e._zod.def).when ?? (n.when = (e) => { let t = e.value; return !g$11(t) && t.length !== void 0; }), e._zod.onattach.push((e) => { let n = e._zod.bag; n.minimum = t.length, n.maximum = t.length, n.length = t.length; }), e._zod.check = (n) => { let r = n.value, i = r.length; if (i === t.length) return; let a = Pe$9(r), o = i > t.length; n.issues.push({ origin: a, ...o ? { code: `too_big`, maximum: t.length } : { code: `too_small`, minimum: t.length }, inclusive: !0, exact: !0, input: n.value, inst: e, continue: !t.abort }); }; }); const V$12 = i$16(`$ZodCheckStringFormat`, (e, t) => { var n, r; B$13.init(e, t), e._zod.onattach.push((e) => { let n = e._zod.bag; n.format = t.format, t.pattern && (n.patterns ??= /* @__PURE__ */ new Set(), n.patterns.add(t.pattern)); }), t.pattern ? (n = e._zod).check ?? (n.check = (n) => { t.pattern.lastIndex = 0, !t.pattern.test(n.value) && n.issues.push({ origin: `string`, code: `invalid_format`, format: t.format, input: n.value, ...t.pattern ? { pattern: t.pattern.toString() } : {}, inst: e, continue: !t.abort }); }) : (r = e._zod).check ?? (r.check = () => {}); }); const In$4 = i$16(`$ZodCheckRegex`, (e, t) => { V$12.init(e, t), e._zod.check = (n) => { t.pattern.lastIndex = 0, !t.pattern.test(n.value) && n.issues.push({ origin: `string`, code: `invalid_format`, format: `regex`, input: n.value, pattern: t.pattern.toString(), inst: e, continue: !t.abort }); }; }); const Ln$4 = i$16(`$ZodCheckLowerCase`, (e, t) => { t.pattern ??= on$6, V$12.init(e, t); }); const Rn$4 = i$16(`$ZodCheckUpperCase`, (e, t) => { t.pattern ??= sn$6, V$12.init(e, t); }); const zn$4 = i$16(`$ZodCheckIncludes`, (e, t) => { B$13.init(e, t); let n = S$13(t.includes), r = new RegExp(typeof t.position == `number` ? `^.{${t.position}}${n}` : n); t.pattern = r, e._zod.onattach.push((e) => { let t = e._zod.bag; t.patterns ??= /* @__PURE__ */ new Set(), t.patterns.add(r); }), e._zod.check = (n) => { n.value.includes(t.includes, t.position) || n.issues.push({ origin: `string`, code: `invalid_format`, format: `includes`, includes: t.includes, input: n.value, inst: e, continue: !t.abort }); }; }); const Bn$4 = i$16(`$ZodCheckStartsWith`, (e, t) => { B$13.init(e, t); let n = RegExp(`^${S$13(t.prefix)}.*`); t.pattern ??= n, e._zod.onattach.push((e) => { let t = e._zod.bag; t.patterns ??= /* @__PURE__ */ new Set(), t.patterns.add(n); }), e._zod.check = (n) => { n.value.startsWith(t.prefix) || n.issues.push({ origin: `string`, code: `invalid_format`, format: `starts_with`, prefix: t.prefix, input: n.value, inst: e, continue: !t.abort }); }; }); const Vn$4 = i$16(`$ZodCheckEndsWith`, (e, t) => { B$13.init(e, t); let n = RegExp(`.*${S$13(t.suffix)}$`); t.pattern ??= n, e._zod.onattach.push((e) => { let t = e._zod.bag; t.patterns ??= /* @__PURE__ */ new Set(), t.patterns.add(n); }), e._zod.check = (n) => { n.value.endsWith(t.suffix) || n.issues.push({ origin: `string`, code: `invalid_format`, format: `ends_with`, suffix: t.suffix, input: n.value, inst: e, continue: !t.abort }); }; }); function Hn$4(e, t, n) { e.issues.length && t.issues.push(...D$13(n, e.issues)); } const Un$4 = i$16(`$ZodCheckProperty`, (e, t) => { B$13.init(e, t), e._zod.check = (e) => { let n = t.schema._zod.run({ value: e.value[t.property], issues: [] }, {}); if (n instanceof Promise) return n.then((n) => Hn$4(n, e, t.property)); Hn$4(n, e, t.property); }; }); const Wn$4 = i$16(`$ZodCheckMimeType`, (e, t) => { B$13.init(e, t); let n = new Set(t.mime); e._zod.onattach.push((e) => { e._zod.bag.mime = t.mime; }), e._zod.check = (r) => { n.has(r.value.type) || r.issues.push({ code: `invalid_value`, values: t.mime, input: r.value.type, inst: e, continue: !t.abort }); }; }); const Gn$4 = i$16(`$ZodCheckOverwrite`, (e, t) => { B$13.init(e, t), e._zod.check = (e) => { e.value = t.tx(e.value); }; }); var Kn$4 = class { constructor(e = []) { this.content = [], this.indent = 0, this && (this.args = e); } indented(e) { this.indent += 1, e(this), --this.indent; } write(e) { if (typeof e == `function`) { e(this, { execution: `sync` }), e(this, { execution: `async` }); return; } let t = e.split(` `).filter((e) => e), n = Math.min(...t.map((e) => e.length - e.trimStart().length)), r = t.map((e) => e.slice(n)).map((e) => ` `.repeat(this.indent * 2) + e); for (let e of r) this.content.push(e); } compile() { let e = Function, t = this?.args, n = [...(this?.content ?? [``]).map((e) => ` ${e}`)]; return new e(...t, n.join(` `)); } }; const qn$4 = { major: 4, minor: 4, patch: 3 }; const H$11 = i$16(`$ZodType`, (e, t) => { var n; e ??= {}, e._zod.def = t, e._zod.bag = e._zod.bag || {}, e._zod.version = qn$4; let r = [...e._zod.def.checks ?? []]; e._zod.traits.has(`$ZodCheck`) && r.unshift(e); for (let t of r) for (let n of t._zod.onattach) n(e); if (r.length === 0) (n = e._zod).deferred ?? (n.deferred = []), e._zod.deferred?.push(() => { e._zod.run = e._zod.parse; }); else { let t = (e, t, n) => { let r = E$14(e), i; for (let a of t) { if (a._zod.def.when) { if (Me$9(e) || !a._zod.def.when(e)) continue; } else if (r) continue; let t = e.issues.length, s = a._zod.check(e); if (s instanceof Promise && n?.async === !1) throw new o$13(); if (i || s instanceof Promise) i = (i ?? Promise.resolve()).then(async () => { await s, e.issues.length !== t && (r ||= E$14(e, t)); }); else { if (e.issues.length === t) continue; r ||= E$14(e, t); } } return i ? i.then(() => e) : e; }, n = (n, i, a) => { if (E$14(n)) return n.aborted = !0, n; let s = t(i, r, a); if (s instanceof Promise) { if (a.async === !1) throw new o$13(); return s.then((t) => e._zod.parse(t, a)); } return e._zod.parse(s, a); }; e._zod.run = (i, a) => { if (a.skipChecks) return e._zod.parse(i, a); if (a.direction === `backward`) { let t = e._zod.parse({ value: i.value, issues: [] }, { ...a, skipChecks: !0 }); return t instanceof Promise ? t.then((e) => n(e, i, a)) : n(t, i, a); } let s = e._zod.parse(i, a); if (s instanceof Promise) { if (a.async === !1) throw new o$13(); return s.then((e) => t(e, r, a)); } return t(s, r, a); }; } _$10(e, `~standard`, () => ({ validate: (t) => { try { let n = Qe$9(e, t); return n.success ? { value: n.data } : { issues: n.error?.issues }; } catch { return $e$9(e, t).then((e) => e.success ? { value: e.data } : { issues: e.error?.issues }); } }, vendor: `zod`, version: 1 })); }); const Jn$4 = i$16(`$ZodString`, (e, t) => { H$11.init(e, t), e._zod.pattern = [...e?._zod.bag?.patterns ?? []].pop() ?? Qt$7(e._zod.bag), e._zod.parse = (n, r) => { if (t.coerce) try { n.value = String(n.value); } catch {} return typeof n.value == `string` || n.issues.push({ expected: `string`, code: `invalid_type`, input: n.value, inst: e }), n; }; }); const U$11 = i$16(`$ZodStringFormat`, (e, t) => { V$12.init(e, t), Jn$4.init(e, t); }); const Yn$4 = i$16(`$ZodGUID`, (e, t) => { t.pattern ??= Tt$8, U$11.init(e, t); }); const Xn$5 = i$16(`$ZodUUID`, (e, t) => { if (t.version) { let e = { v1: 1, v2: 2, v3: 3, v4: 4, v5: 5, v6: 6, v7: 7, v8: 8 }[t.version]; if (e === void 0) throw Error(`Invalid UUID version: "${t.version}"`); t.pattern ??= L$10(e); } else t.pattern ??= L$10(); U$11.init(e, t); }); const Zn$4 = i$16(`$ZodEmail`, (e, t) => { t.pattern ??= kt$8, U$11.init(e, t); }); const Qn$4 = i$16(`$ZodURL`, (e, t) => { U$11.init(e, t), e._zod.check = (n) => { try { let r = n.value.trim(); if (!t.normalize && t.protocol?.source === Gt$6.source && !/^https?:\/\//i.test(r)) { n.issues.push({ code: `invalid_format`, format: `url`, note: `Invalid URL format`, input: n.value, inst: e, continue: !t.abort }); return; } let i = new URL(r); t.hostname && (t.hostname.lastIndex = 0, t.hostname.test(i.hostname) || n.issues.push({ code: `invalid_format`, format: `url`, note: `Invalid hostname`, pattern: t.hostname.source, input: n.value, inst: e, continue: !t.abort })), t.protocol && (t.protocol.lastIndex = 0, t.protocol.test(i.protocol.endsWith(`:`) ? i.protocol.slice(0, -1) : i.protocol) || n.issues.push({ code: `invalid_format`, format: `url`, note: `Invalid protocol`, pattern: t.protocol.source, input: n.value, inst: e, continue: !t.abort })), t.normalize ? n.value = i.href : n.value = r; return; } catch { n.issues.push({ code: `invalid_format`, format: `url`, input: n.value, inst: e, continue: !t.abort }); } }; }); const $n$4 = i$16(`$ZodEmoji`, (e, t) => { t.pattern ??= Ft$7(), U$11.init(e, t); }); const er$4 = i$16(`$ZodNanoID`, (e, t) => { t.pattern ??= St$8, U$11.init(e, t); }); const tr$4 = i$16(`$ZodCUID`, (e, t) => { t.pattern ??= _t$8, U$11.init(e, t); }); const nr$4 = i$16(`$ZodCUID2`, (e, t) => { t.pattern ??= vt$8, U$11.init(e, t); }); const rr$4 = i$16(`$ZodULID`, (e, t) => { t.pattern ??= yt$8, U$11.init(e, t); }); const ir$4 = i$16(`$ZodXID`, (e, t) => { t.pattern ??= bt$8, U$11.init(e, t); }); const ar$4 = i$16(`$ZodKSUID`, (e, t) => { t.pattern ??= xt$8, U$11.init(e, t); }); const or$4 = i$16(`$ZodISODateTime`, (e, t) => { t.pattern ??= Zt$6(t), U$11.init(e, t); }); const sr$4 = i$16(`$ZodISODate`, (e, t) => { t.pattern ??= Jt$7, U$11.init(e, t); }); const cr$4 = i$16(`$ZodISOTime`, (e, t) => { t.pattern ??= Xt$7(t), U$11.init(e, t); }); const lr$5 = i$16(`$ZodISODuration`, (e, t) => { t.pattern ??= Ct$8, U$11.init(e, t); }); const ur$5 = i$16(`$ZodIPv4`, (e, t) => { t.pattern ??= It$7, U$11.init(e, t), e._zod.bag.format = `ipv4`; }); const dr$5 = i$16(`$ZodIPv6`, (e, t) => { t.pattern ??= Lt$8, U$11.init(e, t), e._zod.bag.format = `ipv6`, e._zod.check = (n) => { try { new URL(`http://[${n.value}]`); } catch { n.issues.push({ code: `invalid_format`, format: `ipv6`, input: n.value, inst: e, continue: !t.abort }); } }; }); const fr$4 = i$16(`$ZodMAC`, (e, t) => { t.pattern ??= Rt$7(t.delimiter), U$11.init(e, t), e._zod.bag.format = `mac`; }); const pr$5 = i$16(`$ZodCIDRv4`, (e, t) => { t.pattern ??= zt$8, U$11.init(e, t); }); const mr$4 = i$16(`$ZodCIDRv6`, (e, t) => { t.pattern ??= Bt$6, U$11.init(e, t), e._zod.check = (n) => { let r = n.value.split(`/`); try { if (r.length !== 2) throw Error(); let [e, t] = r; if (!t) throw Error(); let n = Number(t); if (`${n}` !== t || n < 0 || n > 128) throw Error(); new URL(`http://[${e}]`); } catch { n.issues.push({ code: `invalid_format`, format: `cidrv6`, input: n.value, inst: e, continue: !t.abort }); } }; }); function hr$4(e) { if (e === ``) return !0; if (/\s/.test(e) || e.length % 4 != 0) return !1; try { return atob(e), !0; } catch { return !1; } } const gr$4 = i$16(`$ZodBase64`, (e, t) => { t.pattern ??= Vt$7, U$11.init(e, t), e._zod.bag.contentEncoding = `base64`, e._zod.check = (n) => { hr$4(n.value) || n.issues.push({ code: `invalid_format`, format: `base64`, input: n.value, inst: e, continue: !t.abort }); }; }); function _r$5(e) { if (!Ht$7.test(e)) return !1; let t = e.replace(/[-_]/g, (e) => e === `-` ? `+` : `/`); return hr$4(t.padEnd(Math.ceil(t.length / 4) * 4, `=`)); } const vr$5 = i$16(`$ZodBase64URL`, (e, t) => { t.pattern ??= Ht$7, U$11.init(e, t), e._zod.bag.contentEncoding = `base64url`, e._zod.check = (n) => { _r$5(n.value) || n.issues.push({ code: `invalid_format`, format: `base64url`, input: n.value, inst: e, continue: !t.abort }); }; }); const yr$5 = i$16(`$ZodE164`, (e, t) => { t.pattern ??= Kt$7, U$11.init(e, t); }); function br$5(e, t = null) { try { let n = e.split(`.`); if (n.length !== 3) return !1; let [r] = n; if (!r) return !1; let i = JSON.parse(atob(r)); return !(`typ` in i && i?.typ !== `JWT` || !i.alg || t && (!(`alg` in i) || i.alg !== t)); } catch { return !1; } } const xr$5 = i$16(`$ZodJWT`, (e, t) => { U$11.init(e, t), e._zod.check = (n) => { br$5(n.value, t.alg) || n.issues.push({ code: `invalid_format`, format: `jwt`, input: n.value, inst: e, continue: !t.abort }); }; }); const Sr$5 = i$16(`$ZodCustomStringFormat`, (e, t) => { U$11.init(e, t), e._zod.check = (n) => { t.fn(n.value) || n.issues.push({ code: `invalid_format`, format: t.format, input: n.value, inst: e, continue: !t.abort }); }; }); const Cr$5 = i$16(`$ZodNumber`, (e, t) => { H$11.init(e, t), e._zod.pattern = e._zod.bag.pattern ?? tn$7, e._zod.parse = (n, r) => { if (t.coerce) try { n.value = Number(n.value); } catch {} let i = n.value; if (typeof i == `number` && !Number.isNaN(i) && Number.isFinite(i)) return n; let a = typeof i == `number` ? Number.isNaN(i) ? `NaN` : Number.isFinite(i) ? void 0 : `Infinity` : void 0; return n.issues.push({ expected: `number`, code: `invalid_type`, input: i, inst: e, ...a ? { received: a } : {} }), n; }; }); const wr$5 = i$16(`$ZodNumberFormat`, (e, t) => { On$6.init(e, t), Cr$5.init(e, t); }); const Tr$5 = i$16(`$ZodBoolean`, (e, t) => { H$11.init(e, t), e._zod.pattern = nn$6, e._zod.parse = (n, r) => { if (t.coerce) try { n.value = !!n.value; } catch {} let i = n.value; return typeof i == `boolean` || n.issues.push({ expected: `boolean`, code: `invalid_type`, input: i, inst: e }), n; }; }); const Er$5 = i$16(`$ZodBigInt`, (e, t) => { H$11.init(e, t), e._zod.pattern = $t$7, e._zod.parse = (n, r) => { if (t.coerce) try { n.value = BigInt(n.value); } catch {} return typeof n.value == `bigint` || n.issues.push({ expected: `bigint`, code: `invalid_type`, input: n.value, inst: e }), n; }; }); const Dr$5 = i$16(`$ZodBigIntFormat`, (e, t) => { kn$6.init(e, t), Er$5.init(e, t); }); const Or$5 = i$16(`$ZodSymbol`, (e, t) => { H$11.init(e, t), e._zod.parse = (t, n) => { let r = t.value; return typeof r == `symbol` || t.issues.push({ expected: `symbol`, code: `invalid_type`, input: r, inst: e }), t; }; }); const kr$5 = i$16(`$ZodUndefined`, (e, t) => { H$11.init(e, t), e._zod.pattern = an$6, e._zod.values = /* @__PURE__ */ new Set([void 0]), e._zod.parse = (t, n) => { let r = t.value; return r === void 0 || t.issues.push({ expected: `undefined`, code: `invalid_type`, input: r, inst: e }), t; }; }); const Ar$5 = i$16(`$ZodNull`, (e, t) => { H$11.init(e, t), e._zod.pattern = rn$7, e._zod.values = /* @__PURE__ */ new Set([null]), e._zod.parse = (t, n) => { let r = t.value; return r === null || t.issues.push({ expected: `null`, code: `invalid_type`, input: r, inst: e }), t; }; }); const jr$5 = i$16(`$ZodAny`, (e, t) => { H$11.init(e, t), e._zod.parse = (e) => e; }); const Mr$5 = i$16(`$ZodUnknown`, (e, t) => { H$11.init(e, t), e._zod.parse = (e) => e; }); const Nr$5 = i$16(`$ZodNever`, (e, t) => { H$11.init(e, t), e._zod.parse = (t, n) => (t.issues.push({ expected: `never`, code: `invalid_type`, input: t.value, inst: e }), t); }); const Pr$5 = i$16(`$ZodVoid`, (e, t) => { H$11.init(e, t), e._zod.parse = (t, n) => { let r = t.value; return r === void 0 || t.issues.push({ expected: `void`, code: `invalid_type`, input: r, inst: e }), t; }; }); const Fr$5 = i$16(`$ZodDate`, (e, t) => { H$11.init(e, t), e._zod.parse = (n, r) => { if (t.coerce) try { n.value = new Date(n.value); } catch {} let i = n.value, a = i instanceof Date; return a && !Number.isNaN(i.getTime()) || n.issues.push({ expected: `date`, code: `invalid_type`, input: i, ...a ? { received: `Invalid Date` } : {}, inst: e }), n; }; }); function Ir$5(e, t, n) { e.issues.length && t.issues.push(...D$13(n, e.issues)), t.value[n] = e.value; } const Lr$5 = i$16(`$ZodArray`, (e, t) => { H$11.init(e, t), e._zod.parse = (n, r) => { let i = n.value; if (!Array.isArray(i)) return n.issues.push({ expected: `array`, code: `invalid_type`, input: i, inst: e }), n; n.value = Array(i.length); let a = []; for (let e = 0; e < i.length; e++) { let o = i[e], s = t.element._zod.run({ value: o, issues: [] }, r); s instanceof Promise ? a.push(s.then((t) => Ir$5(t, n, e))) : Ir$5(s, n, e); } return a.length ? Promise.all(a).then(() => n) : n; }; }); function Rr$5(e, t, n, r, i, a) { let o = n in r; if (e.issues.length) { if (i && a && !o) return; t.issues.push(...D$13(n, e.issues)); } if (!o && !i) { e.issues.length || t.issues.push({ code: `invalid_type`, expected: `nonoptional`, input: void 0, path: [n] }); return; } e.value === void 0 ? o && (t.value[n] = void 0) : t.value[n] = e.value; } function zr$5(e) { let t = Object.keys(e.shape); for (let n of t) if (!e.shape?.[n]?._zod?.traits?.has(`$ZodType`)) throw Error(`Invalid element at key "${n}": expected a Zod schema`); let n = Se$9(e.shape); return { ...e, keys: t, keySet: new Set(t), numKeys: t.length, optionalKeys: new Set(n) }; } function Br$5(e, t, n, r, i, a) { let o = [], s = i.keySet, c = i.catchall._zod, l = c.def.type, u = c.optin === `optional`, d = c.optout === `optional`; for (let i in t) { if (i === `__proto__` || s.has(i)) continue; if (l === `never`) { o.push(i); continue; } let a = c.run({ value: t[i], issues: [] }, r); a instanceof Promise ? e.push(a.then((e) => Rr$5(e, n, i, t, u, d))) : Rr$5(a, n, i, t, u, d); } return o.length && n.issues.push({ code: `unrecognized_keys`, keys: o, input: t, inst: a }), e.length ? Promise.all(e).then(() => n) : n; } const Vr$5 = i$16(`$ZodObject`, (e, t) => { if (H$11.init(e, t), !Object.getOwnPropertyDescriptor(t, `shape`)?.get) { let e = t.shape; Object.defineProperty(t, "shape", { get: () => { let n = { ...e }; return Object.defineProperty(t, "shape", { value: n }), n; } }); } let n = h$12(() => zr$5(t)); _$10(e._zod, `propValues`, () => { let e = t.shape, n = {}; for (let t in e) { let r = e[t]._zod; if (r.values) { n[t] ?? (n[t] = /* @__PURE__ */ new Set()); for (let e of r.values) n[t].add(e); } } return n; }); let r = b$11, i = t.catchall, a; e._zod.parse = (t, o) => { a ??= n.value; let s = t.value; if (!r(s)) return t.issues.push({ expected: `object`, code: `invalid_type`, input: s, inst: e }), t; t.value = {}; let c = [], l = a.shape; for (let e of a.keys) { let n = l[e], r = n._zod.optin === `optional`, i = n._zod.optout === `optional`, a = n._zod.run({ value: s[e], issues: [] }, o); a instanceof Promise ? c.push(a.then((n) => Rr$5(n, t, e, s, r, i))) : Rr$5(a, t, e, s, r, i); } return i ? Br$5(c, s, t, o, n.value, e) : c.length ? Promise.all(c).then(() => t) : t; }; }); const Hr$5 = i$16(`$ZodObjectJIT`, (e, t) => { Vr$5.init(e, t); let n = e._zod.parse, r = h$12(() => zr$5(t)), i = (e) => { let t = new Kn$4([ `shape`, `payload`, `ctx` ]), n = r.value, i = (e) => { let t = fe$10(e); return `shape[${t}]._zod.run({ value: input[${t}], issues: [] }, ctx)`; }; t.write(`const input = payload.value;`); let a = Object.create(null), o = 0; for (let e of n.keys) a[e] = `key_${o++}`; t.write(`const newResult = {};`); for (let r of n.keys) { let n = a[r], o = fe$10(r), s = e[r], c = s?._zod?.optin === `optional`, l = s?._zod?.optout === `optional`; t.write(`const ${n} = ${i(r)};`), c && l ? t.write(` if (${n}.issues.length) { if (${o} in input) { payload.issues = payload.issues.concat(${n}.issues.map(iss => ({ ...iss, path: iss.path ? [${o}, ...iss.path] : [${o}] }))); } } if (${n}.value === undefined) { if (${o} in input) { newResult[${o}] = undefined; } } else { newResult[${o}] = ${n}.value; } `) : c ? t.write(` if (${n}.issues.length) { payload.issues = payload.issues.concat(${n}.issues.map(iss => ({ ...iss, path: iss.path ? [${o}, ...iss.path] : [${o}] }))); } if (${n}.value === undefined) { if (${o} in input) { newResult[${o}] = undefined; } } else { newResult[${o}] = ${n}.value; } `) : t.write(` const ${n}_present = ${o} in input; if (${n}.issues.length) { payload.issues = payload.issues.concat(${n}.issues.map(iss => ({ ...iss, path: iss.path ? [${o}, ...iss.path] : [${o}] }))); } if (!${n}_present && !${n}.issues.length) { payload.issues.push({ code: "invalid_type", expected: "nonoptional", input: undefined, path: [${o}] }); } if (${n}_present) { if (${n}.value === undefined) { newResult[${o}] = undefined; } else { newResult[${o}] = ${n}.value; } } `); } t.write(`payload.value = newResult;`), t.write(`return payload;`); let s = t.compile(); return (t, n) => s(e, t, n); }, a, o = b$11, s = !c$13.jitless, l = s && he$9.value, u = t.catchall, d; e._zod.parse = (c, f) => { d ??= r.value; let p = c.value; return o(p) ? s && l && f?.async === !1 && f.jitless !== !0 ? (a ||= i(t.shape), c = a(c, f), u ? Br$5([], p, c, f, d, e) : c) : n(c, f) : (c.issues.push({ expected: `object`, code: `invalid_type`, input: p, inst: e }), c); }; }); function Ur$5(e, t, n, r) { for (let n of e) if (n.issues.length === 0) return t.value = n.value, t; let i = e.filter((e) => !E$14(e)); return i.length === 1 ? (t.value = i[0].value, i[0]) : (t.issues.push({ code: `invalid_union`, input: t.value, inst: n, errors: e.map((e) => e.issues.map((e) => k$13(e, r, l$12()))) }), t); } const Wr$5 = i$16(`$ZodUnion`, (e, t) => { H$11.init(e, t), _$10(e._zod, `optin`, () => t.options.some((e) => e._zod.optin === `optional`) ? `optional` : void 0), _$10(e._zod, `optout`, () => t.options.some((e) => e._zod.optout === `optional`) ? `optional` : void 0), _$10(e._zod, `values`, () => { if (t.options.every((e) => e._zod.values)) return new Set(t.options.flatMap((e) => Array.from(e._zod.values))); }), _$10(e._zod, `pattern`, () => { if (t.options.every((e) => e._zod.pattern)) { let e = t.options.map((e) => e._zod.pattern); return RegExp(`^(${e.map((e) => ie$8(e.source)).join(`|`)})$`); } }); let n = t.options.length === 1 ? t.options[0]._zod.run : null; e._zod.parse = (r, i) => { if (n) return n(r, i); let a = !1, o = []; for (let e of t.options) { let t = e._zod.run({ value: r.value, issues: [] }, i); if (t instanceof Promise) o.push(t), a = !0; else { if (t.issues.length === 0) return t; o.push(t); } } return a ? Promise.all(o).then((t) => Ur$5(t, r, e, i)) : Ur$5(o, r, e, i); }; }); function Gr$5(e, t, n, r) { let i = e.filter((e) => e.issues.length === 0); return i.length === 1 ? (t.value = i[0].value, t) : (i.length === 0 ? t.issues.push({ code: `invalid_union`, input: t.value, inst: n, errors: e.map((e) => e.issues.map((e) => k$13(e, r, l$12()))) }) : t.issues.push({ code: `invalid_union`, input: t.value, inst: n, errors: [], inclusive: !1 }), t); } const Kr$5 = i$16(`$ZodXor`, (e, t) => { Wr$5.init(e, t), t.inclusive = !1; let n = t.options.length === 1 ? t.options[0]._zod.run : null; e._zod.parse = (r, i) => { if (n) return n(r, i); let a = !1, o = []; for (let e of t.options) { let t = e._zod.run({ value: r.value, issues: [] }, i); t instanceof Promise ? (o.push(t), a = !0) : o.push(t); } return a ? Promise.all(o).then((t) => Gr$5(t, r, e, i)) : Gr$5(o, r, e, i); }; }); const qr$5 = i$16(`$ZodDiscriminatedUnion`, (e, t) => { t.inclusive = !1, Wr$5.init(e, t); let n = e._zod.parse; _$10(e._zod, `propValues`, () => { let e = {}; for (let n of t.options) { let r = n._zod.propValues; if (!r || Object.keys(r).length === 0) throw Error(`Invalid discriminated union option at index "${t.options.indexOf(n)}"`); for (let [t, n] of Object.entries(r)) { e[t] || (e[t] = /* @__PURE__ */ new Set()); for (let r of n) e[t].add(r); } } return e; }); let r = h$12(() => { let e = t.options, n = /* @__PURE__ */ new Map(); for (let r of e) { let e = r._zod.propValues?.[t.discriminator]; if (!e || e.size === 0) throw Error(`Invalid discriminated union option at index "${t.options.indexOf(r)}"`); for (let t of e) { if (n.has(t)) throw Error(`Duplicate discriminator value "${String(t)}"`); n.set(t, r); } } return n; }); e._zod.parse = (i, a) => { let o = i.value; if (!b$11(o)) return i.issues.push({ code: `invalid_type`, expected: `object`, input: o, inst: e }), i; let s = r.value.get(o?.[t.discriminator]); return s ? s._zod.run(i, a) : t.unionFallback || a.direction === `backward` ? n(i, a) : (i.issues.push({ code: `invalid_union`, errors: [], note: `No matching discriminator`, discriminator: t.discriminator, options: Array.from(r.value.keys()), input: o, path: [t.discriminator], inst: e }), i); }; }); const Jr$5 = i$16(`$ZodIntersection`, (e, t) => { H$11.init(e, t), e._zod.parse = (e, n) => { let r = e.value, i = t.left._zod.run({ value: r, issues: [] }, n), a = t.right._zod.run({ value: r, issues: [] }, n); return i instanceof Promise || a instanceof Promise ? Promise.all([i, a]).then(([t, n]) => Xr$5(e, t, n)) : Xr$5(e, i, a); }; }); function Yr$5(e, t) { if (e === t || e instanceof Date && t instanceof Date && +e == +t) return { valid: !0, data: e }; if (x$12(e) && x$12(t)) { let n = Object.keys(t), r = Object.keys(e).filter((e) => n.indexOf(e) !== -1), i = { ...e, ...t }; for (let n of r) { let r = Yr$5(e[n], t[n]); if (!r.valid) return { valid: !1, mergeErrorPath: [n, ...r.mergeErrorPath] }; i[n] = r.data; } return { valid: !0, data: i }; } if (Array.isArray(e) && Array.isArray(t)) { if (e.length !== t.length) return { valid: !1, mergeErrorPath: [] }; let n = []; for (let r = 0; r < e.length; r++) { let i = e[r], a = t[r], o = Yr$5(i, a); if (!o.valid) return { valid: !1, mergeErrorPath: [r, ...o.mergeErrorPath] }; n.push(o.data); } return { valid: !0, data: n }; } return { valid: !1, mergeErrorPath: [] }; } function Xr$5(e, t, n) { let r = /* @__PURE__ */ new Map(), i; for (let n of t.issues) if (n.code === `unrecognized_keys`) { i ??= n; for (let e of n.keys) r.has(e) || r.set(e, {}), r.get(e).l = !0; } else e.issues.push(n); for (let t of n.issues) if (t.code === `unrecognized_keys`) for (let e of t.keys) r.has(e) || r.set(e, {}), r.get(e).r = !0; else e.issues.push(t); let a = [...r].filter(([, e]) => e.l && e.r).map(([e]) => e); if (a.length && i && e.issues.push({ ...i, keys: a }), E$14(e)) return e; let o = Yr$5(t.value, n.value); if (!o.valid) throw Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`); return e.value = o.data, e; } const Zr$5 = i$16(`$ZodTuple`, (e, t) => { H$11.init(e, t); let n = t.items; e._zod.parse = (r, i) => { let a = r.value; if (!Array.isArray(a)) return r.issues.push({ input: a, inst: e, expected: `tuple`, code: `invalid_type` }), r; r.value = []; let o = [], s = Qr$5(n, `optin`), c = Qr$5(n, `optout`); if (!t.rest) { if (a.length < s) return r.issues.push({ code: `too_small`, minimum: s, inclusive: !0, input: a, inst: e, origin: `array` }), r; a.length > n.length && r.issues.push({ code: `too_big`, maximum: n.length, inclusive: !0, input: a, inst: e, origin: `array` }); } let l = Array(n.length); for (let e = 0; e < n.length; e++) { let t = n[e]._zod.run({ value: a[e], issues: [] }, i); t instanceof Promise ? o.push(t.then((t) => { l[e] = t; })) : l[e] = t; } if (t.rest) { let e = n.length - 1, s = a.slice(n.length); for (let n of s) { e++; let a = t.rest._zod.run({ value: n, issues: [] }, i); a instanceof Promise ? o.push(a.then((t) => $r$5(t, r, e))) : $r$5(a, r, e); } } return o.length ? Promise.all(o).then(() => ei$5(l, r, n, a, c)) : ei$5(l, r, n, a, c); }; }); function Qr$5(e, t) { for (let n = e.length - 1; n >= 0; n--) if (e[n]._zod[t] !== `optional`) return n + 1; return 0; } function $r$5(e, t, n) { e.issues.length && t.issues.push(...D$13(n, e.issues)), t.value[n] = e.value; } function ei$5(e, t, n, r, i) { for (let a = 0; a < n.length; a++) { let n = e[a], o = a < r.length; if (n.issues.length) { if (!o && a >= i) { t.value.length = a; break; } t.issues.push(...D$13(a, n.issues)); } t.value[a] = n.value; } for (let e = t.value.length - 1; e >= r.length && n[e]._zod.optout === `optional` && t.value[e] === void 0; e--) t.value.length = e; return t; } const ti$5 = i$16(`$ZodRecord`, (e, t) => { H$11.init(e, t), e._zod.parse = (n, r) => { let i = n.value; if (!x$12(i)) return n.issues.push({ expected: `record`, code: `invalid_type`, input: i, inst: e }), n; let a = [], o = t.keyType._zod.values; if (o) { n.value = {}; let s = /* @__PURE__ */ new Set(); for (let c of o) if (typeof c == `string` || typeof c == `number` || typeof c == `symbol`) { s.add(typeof c == `number` ? c.toString() : c); let o = t.keyType._zod.run({ value: c, issues: [] }, r); if (o instanceof Promise) throw Error(`Async schemas not supported in object keys currently`); if (o.issues.length) { n.issues.push({ code: `invalid_key`, origin: `record`, issues: o.issues.map((e) => k$13(e, r, l$12())), input: c, path: [c], inst: e }); continue; } let u = o.value, d = t.valueType._zod.run({ value: i[c], issues: [] }, r); d instanceof Promise ? a.push(d.then((e) => { e.issues.length && n.issues.push(...D$13(c, e.issues)), n.value[u] = e.value; })) : (d.issues.length && n.issues.push(...D$13(c, d.issues)), n.value[u] = d.value); } let c; for (let e in i) s.has(e) || (c ??= [], c.push(e)); c && c.length > 0 && n.issues.push({ code: `unrecognized_keys`, input: i, inst: e, keys: c }); } else { n.value = {}; for (let o of Reflect.ownKeys(i)) { if (o === `__proto__` || !Object.prototype.propertyIsEnumerable.call(i, o)) continue; let s = t.keyType._zod.run({ value: o, issues: [] }, r); if (s instanceof Promise) throw Error(`Async schemas not supported in object keys currently`); if (typeof o == `string` && tn$7.test(o) && s.issues.length) { let e = t.keyType._zod.run({ value: Number(o), issues: [] }, r); if (e instanceof Promise) throw Error(`Async schemas not supported in object keys currently`); e.issues.length === 0 && (s = e); } if (s.issues.length) { t.mode === `loose` ? n.value[o] = i[o] : n.issues.push({ code: `invalid_key`, origin: `record`, issues: s.issues.map((e) => k$13(e, r, l$12())), input: o, path: [o], inst: e }); continue; } let c = t.valueType._zod.run({ value: i[o], issues: [] }, r); c instanceof Promise ? a.push(c.then((e) => { e.issues.length && n.issues.push(...D$13(o, e.issues)), n.value[s.value] = e.value; })) : (c.issues.length && n.issues.push(...D$13(o, c.issues)), n.value[s.value] = c.value); } } return a.length ? Promise.all(a).then(() => n) : n; }; }); const ni$5 = i$16(`$ZodMap`, (e, t) => { H$11.init(e, t), e._zod.parse = (n, r) => { let i = n.value; if (!(i instanceof Map)) return n.issues.push({ expected: `map`, code: `invalid_type`, input: i, inst: e }), n; let a = []; n.value = /* @__PURE__ */ new Map(); for (let [o, s] of i) { let c = t.keyType._zod.run({ value: o, issues: [] }, r), l = t.valueType._zod.run({ value: s, issues: [] }, r); c instanceof Promise || l instanceof Promise ? a.push(Promise.all([c, l]).then(([t, a]) => { ri$5(t, a, n, o, i, e, r); })) : ri$5(c, l, n, o, i, e, r); } return a.length ? Promise.all(a).then(() => n) : n; }; }); function ri$5(e, t, n, r, i, a, o) { e.issues.length && (ye$9.has(typeof r) ? n.issues.push(...D$13(r, e.issues)) : n.issues.push({ code: `invalid_key`, origin: `map`, input: i, inst: a, issues: e.issues.map((e) => k$13(e, o, l$12())) })), t.issues.length && (ye$9.has(typeof r) ? n.issues.push(...D$13(r, t.issues)) : n.issues.push({ origin: `map`, code: `invalid_element`, input: i, inst: a, key: r, issues: t.issues.map((e) => k$13(e, o, l$12())) })), n.value.set(e.value, t.value); } const ii$5 = i$16(`$ZodSet`, (e, t) => { H$11.init(e, t), e._zod.parse = (n, r) => { let i = n.value; if (!(i instanceof Set)) return n.issues.push({ input: i, inst: e, expected: `set`, code: `invalid_type` }), n; let a = []; n.value = /* @__PURE__ */ new Set(); for (let e of i) { let i = t.valueType._zod.run({ value: e, issues: [] }, r); i instanceof Promise ? a.push(i.then((e) => ai$5(e, n))) : ai$5(i, n); } return a.length ? Promise.all(a).then(() => n) : n; }; }); function ai$5(e, t) { e.issues.length && t.issues.push(...e.issues), t.value.add(e.value); } const oi$5 = i$16(`$ZodEnum`, (e, t) => { H$11.init(e, t); let n = ne$7(t.entries), r = new Set(n); e._zod.values = r, e._zod.pattern = RegExp(`^(${n.filter((e) => ye$9.has(typeof e)).map((e) => typeof e == `string` ? S$13(e) : e.toString()).join(`|`)})$`), e._zod.parse = (t, i) => { let a = t.value; return r.has(a) || t.issues.push({ code: `invalid_value`, values: n, input: a, inst: e }), t; }; }); const si$5 = i$16(`$ZodLiteral`, (e, t) => { if (H$11.init(e, t), t.values.length === 0) throw Error(`Cannot create literal schema with no valid values`); let n = new Set(t.values); e._zod.values = n, e._zod.pattern = RegExp(`^(${t.values.map((e) => typeof e == `string` ? S$13(e) : e ? S$13(e.toString()) : String(e)).join(`|`)})$`), e._zod.parse = (r, i) => { let a = r.value; return n.has(a) || r.issues.push({ code: `invalid_value`, values: t.values, input: a, inst: e }), r; }; }); const ci$5 = i$16(`$ZodFile`, (e, t) => { H$11.init(e, t), e._zod.parse = (t, n) => { let r = t.value; return r instanceof File || t.issues.push({ expected: `file`, code: `invalid_type`, input: r, inst: e }), t; }; }); const li$5 = i$16(`$ZodTransform`, (e, t) => { H$11.init(e, t), e._zod.optin = `optional`, e._zod.parse = (n, r) => { if (r.direction === `backward`) throw new s$11(e.constructor.name); let i = t.transform(n.value, n); if (r.async) return (i instanceof Promise ? i : Promise.resolve(i)).then((e) => (n.value = e, n.fallback = !0, n)); if (i instanceof Promise) throw new o$13(); return n.value = i, n.fallback = !0, n; }; }); function ui$5(e, t) { return t === void 0 && (e.issues.length || e.fallback) ? { issues: [], value: void 0 } : e; } const di$5 = i$16(`$ZodOptional`, (e, t) => { H$11.init(e, t), e._zod.optin = `optional`, e._zod.optout = `optional`, _$10(e._zod, `values`, () => t.innerType._zod.values ? /* @__PURE__ */ new Set([...t.innerType._zod.values, void 0]) : void 0), _$10(e._zod, `pattern`, () => { let e = t.innerType._zod.pattern; return e ? RegExp(`^(${ie$8(e.source)})?$`) : void 0; }), e._zod.parse = (e, n) => { if (t.innerType._zod.optin === `optional`) { let r = e.value, i = t.innerType._zod.run(e, n); return i instanceof Promise ? i.then((e) => ui$5(e, r)) : ui$5(i, r); } return e.value === void 0 ? e : t.innerType._zod.run(e, n); }; }); const fi$5 = i$16(`$ZodExactOptional`, (e, t) => { di$5.init(e, t), _$10(e._zod, `values`, () => t.innerType._zod.values), _$10(e._zod, `pattern`, () => t.innerType._zod.pattern), e._zod.parse = (e, n) => t.innerType._zod.run(e, n); }); const pi$5 = i$16(`$ZodNullable`, (e, t) => { H$11.init(e, t), _$10(e._zod, `optin`, () => t.innerType._zod.optin), _$10(e._zod, `optout`, () => t.innerType._zod.optout), _$10(e._zod, `pattern`, () => { let e = t.innerType._zod.pattern; return e ? RegExp(`^(${ie$8(e.source)}|null)$`) : void 0; }), _$10(e._zod, `values`, () => t.innerType._zod.values ? /* @__PURE__ */ new Set([...t.innerType._zod.values, null]) : void 0), e._zod.parse = (e, n) => e.value === null ? e : t.innerType._zod.run(e, n); }); const mi$5 = i$16(`$ZodDefault`, (e, t) => { H$11.init(e, t), e._zod.optin = `optional`, _$10(e._zod, `values`, () => t.innerType._zod.values), e._zod.parse = (e, n) => { if (n.direction === `backward`) return t.innerType._zod.run(e, n); if (e.value === void 0) return e.value = t.defaultValue, e; let r = t.innerType._zod.run(e, n); return r instanceof Promise ? r.then((e) => hi$5(e, t)) : hi$5(r, t); }; }); function hi$5(e, t) { return e.value === void 0 && (e.value = t.defaultValue), e; } const gi$5 = i$16(`$ZodPrefault`, (e, t) => { H$11.init(e, t), e._zod.optin = `optional`, _$10(e._zod, `values`, () => t.innerType._zod.values), e._zod.parse = (e, n) => (n.direction === `backward` || e.value === void 0 && (e.value = t.defaultValue), t.innerType._zod.run(e, n)); }); const _i$5 = i$16(`$ZodNonOptional`, (e, t) => { H$11.init(e, t), _$10(e._zod, `values`, () => { let e = t.innerType._zod.values; return e ? new Set([...e].filter((e) => e !== void 0)) : void 0; }), e._zod.parse = (n, r) => { let i = t.innerType._zod.run(n, r); return i instanceof Promise ? i.then((t) => vi$5(t, e)) : vi$5(i, e); }; }); function vi$5(e, t) { return !e.issues.length && e.value === void 0 && e.issues.push({ code: `invalid_type`, expected: `nonoptional`, input: e.value, inst: t }), e; } const yi$5 = i$16(`$ZodSuccess`, (e, t) => { H$11.init(e, t), e._zod.parse = (e, n) => { if (n.direction === `backward`) throw new s$11(`ZodSuccess`); let r = t.innerType._zod.run(e, n); return r instanceof Promise ? r.then((t) => (e.value = t.issues.length === 0, e)) : (e.value = r.issues.length === 0, e); }; }); const bi$5 = i$16(`$ZodCatch`, (e, t) => { H$11.init(e, t), e._zod.optin = `optional`, _$10(e._zod, `optout`, () => t.innerType._zod.optout), _$10(e._zod, `values`, () => t.innerType._zod.values), e._zod.parse = (e, n) => { if (n.direction === `backward`) return t.innerType._zod.run(e, n); let r = t.innerType._zod.run(e, n); return r instanceof Promise ? r.then((r) => (e.value = r.value, r.issues.length && (e.value = t.catchValue({ ...e, error: { issues: r.issues.map((e) => k$13(e, n, l$12())) }, input: e.value }), e.issues = [], e.fallback = !0), e)) : (e.value = r.value, r.issues.length && (e.value = t.catchValue({ ...e, error: { issues: r.issues.map((e) => k$13(e, n, l$12())) }, input: e.value }), e.issues = [], e.fallback = !0), e); }; }); const xi$5 = i$16(`$ZodNaN`, (e, t) => { H$11.init(e, t), e._zod.parse = (t, n) => ((typeof t.value != `number` || !Number.isNaN(t.value)) && t.issues.push({ input: t.value, inst: e, expected: `nan`, code: `invalid_type` }), t); }); const Si$6 = i$16(`$ZodPipe`, (e, t) => { H$11.init(e, t), _$10(e._zod, `values`, () => t.in._zod.values), _$10(e._zod, `optin`, () => t.in._zod.optin), _$10(e._zod, `optout`, () => t.out._zod.optout), _$10(e._zod, `propValues`, () => t.in._zod.propValues), e._zod.parse = (e, n) => { if (n.direction === `backward`) { let r = t.out._zod.run(e, n); return r instanceof Promise ? r.then((e) => Ci$6(e, t.in, n)) : Ci$6(r, t.in, n); } let r = t.in._zod.run(e, n); return r instanceof Promise ? r.then((e) => Ci$6(e, t.out, n)) : Ci$6(r, t.out, n); }; }); function Ci$6(e, t, n) { return e.issues.length ? (e.aborted = !0, e) : t._zod.run({ value: e.value, issues: e.issues, fallback: e.fallback }, n); } const wi$6 = i$16(`$ZodCodec`, (e, t) => { H$11.init(e, t), _$10(e._zod, `values`, () => t.in._zod.values), _$10(e._zod, `optin`, () => t.in._zod.optin), _$10(e._zod, `optout`, () => t.out._zod.optout), _$10(e._zod, `propValues`, () => t.in._zod.propValues), e._zod.parse = (e, n) => { if ((n.direction || `forward`) === `forward`) { let r = t.in._zod.run(e, n); return r instanceof Promise ? r.then((e) => Ti$6(e, t, n)) : Ti$6(r, t, n); } else { let r = t.out._zod.run(e, n); return r instanceof Promise ? r.then((e) => Ti$6(e, t, n)) : Ti$6(r, t, n); } }; }); function Ti$6(e, t, n) { if (e.issues.length) return e.aborted = !0, e; if ((n.direction || `forward`) === `forward`) { let r = t.transform(e.value, e); return r instanceof Promise ? r.then((r) => Ei$6(e, r, t.out, n)) : Ei$6(e, r, t.out, n); } else { let r = t.reverseTransform(e.value, e); return r instanceof Promise ? r.then((r) => Ei$6(e, r, t.in, n)) : Ei$6(e, r, t.in, n); } } function Ei$6(e, t, n, r) { return e.issues.length ? (e.aborted = !0, e) : n._zod.run({ value: t, issues: e.issues }, r); } const Di$6 = i$16(`$ZodPreprocess`, (e, t) => { Si$6.init(e, t); }); const Oi$6 = i$16(`$ZodReadonly`, (e, t) => { H$11.init(e, t), _$10(e._zod, `propValues`, () => t.innerType._zod.propValues), _$10(e._zod, `values`, () => t.innerType._zod.values), _$10(e._zod, `optin`, () => t.innerType?._zod?.optin), _$10(e._zod, `optout`, () => t.innerType?._zod?.optout), e._zod.parse = (e, n) => { if (n.direction === `backward`) return t.innerType._zod.run(e, n); let r = t.innerType._zod.run(e, n); return r instanceof Promise ? r.then(ki$6) : ki$6(r); }; }); function ki$6(e) { return e.value = Object.freeze(e.value), e; } const Ai$6 = i$16(`$ZodTemplateLiteral`, (e, t) => { H$11.init(e, t); let n = []; for (let e of t.parts) if (typeof e == `object` && e) { if (!e._zod.pattern) throw Error(`Invalid template literal part, no pattern found: ${[...e._zod.traits].shift()}`); let t = e._zod.pattern instanceof RegExp ? e._zod.pattern.source : e._zod.pattern; if (!t) throw Error(`Invalid template literal part: ${e._zod.traits}`); let r = +!!t.startsWith(`^`), i = t.endsWith(`$`) ? t.length - 1 : t.length; n.push(t.slice(r, i)); } else if (e === null || be$9.has(typeof e)) n.push(S$13(`${e}`)); else throw Error(`Invalid template literal part: ${e}`); e._zod.pattern = RegExp(`^${n.join(``)}$`), e._zod.parse = (n, r) => typeof n.value == `string` ? (e._zod.pattern.lastIndex = 0, e._zod.pattern.test(n.value) || n.issues.push({ input: n.value, inst: e, code: `invalid_format`, format: t.format ?? `template_literal`, pattern: e._zod.pattern.source }), n) : (n.issues.push({ input: n.value, inst: e, expected: `string`, code: `invalid_type` }), n); }); const ji$6 = i$16(`$ZodFunction`, (e, t) => (H$11.init(e, t), e._def = t, e._zod.def = t, e.implement = (t) => { if (typeof t != `function`) throw Error(`implement() must be called with a function`); return function(...n) { let r = e._def.input ? Xe$9(e._def.input, n) : n, i = Reflect.apply(t, this, r); return e._def.output ? Xe$9(e._def.output, i) : i; }; }, e.implementAsync = (t) => { if (typeof t != `function`) throw Error(`implementAsync() must be called with a function`); return async function(...n) { let r = e._def.input ? await Ze$10(e._def.input, n) : n, i = await Reflect.apply(t, this, r); return e._def.output ? await Ze$10(e._def.output, i) : i; }; }, e._zod.parse = (t, n) => typeof t.value == `function` ? (e._def.output && e._def.output._zod.def.type === `promise` ? t.value = e.implementAsync(t.value) : t.value = e.implement(t.value), t) : (t.issues.push({ code: `invalid_type`, expected: `function`, input: t.value, inst: e }), t), e.input = (...t) => { let n = e.constructor; return Array.isArray(t[0]) ? new n({ type: `function`, input: new Zr$5({ type: `tuple`, items: t[0], rest: t[1] }), output: e._def.output }) : new n({ type: `function`, input: t[0], output: e._def.output }); }, e.output = (t) => { let n = e.constructor; return new n({ type: `function`, input: e._def.input, output: t }); }, e)); const Mi$6 = i$16(`$ZodPromise`, (e, t) => { H$11.init(e, t), e._zod.parse = (e, n) => Promise.resolve(e.value).then((e) => t.innerType._zod.run({ value: e, issues: [] }, n)); }); const Ni$6 = i$16(`$ZodLazy`, (e, t) => { H$11.init(e, t), _$10(e._zod, `innerType`, () => { let e = t; return e._cachedInner ||= t.getter(), e._cachedInner; }), _$10(e._zod, `pattern`, () => e._zod.innerType?._zod?.pattern), _$10(e._zod, `propValues`, () => e._zod.innerType?._zod?.propValues), _$10(e._zod, `optin`, () => e._zod.innerType?._zod?.optin ?? void 0), _$10(e._zod, `optout`, () => e._zod.innerType?._zod?.optout ?? void 0), e._zod.parse = (t, n) => e._zod.innerType._zod.run(t, n); }); const Pi$6 = i$16(`$ZodCustom`, (e, t) => { B$13.init(e, t), H$11.init(e, t), e._zod.parse = (e, t) => e, e._zod.check = (n) => { let r = n.value, i = t.fn(r); if (i instanceof Promise) return i.then((t) => Fi$6(t, n, r, e)); Fi$6(i, n, r, e); }; }); function Fi$6(e, t, n, r) { if (!e) { let e = { code: `custom`, input: n, inst: r, path: [...r._zod.def.path ?? []], continue: !r._zod.def.abort }; r._zod.def.params && (e.params = r._zod.def.params), t.issues.push(j$12(e)); } } const Ii$6 = () => { let e = { string: { unit: `حرف`, verb: `أن يحوي` }, file: { unit: `بايت`, verb: `أن يحوي` }, array: { unit: `عنصر`, verb: `أن يحوي` }, set: { unit: `عنصر`, verb: `أن يحوي` } }; function t(t) { return e[t] ?? null; } let n = { regex: `مدخل`, email: `بريد إلكتروني`, url: `رابط`, emoji: `إيموجي`, uuid: `UUID`, uuidv4: `UUIDv4`, uuidv6: `UUIDv6`, nanoid: `nanoid`, guid: `GUID`, cuid: `cuid`, cuid2: `cuid2`, ulid: `ULID`, xid: `XID`, ksuid: `KSUID`, datetime: `تاريخ ووقت بمعيار ISO`, date: `تاريخ بمعيار ISO`, time: `وقت بمعيار ISO`, duration: `مدة بمعيار ISO`, ipv4: `عنوان IPv4`, ipv6: `عنوان IPv6`, cidrv4: `مدى عناوين بصيغة IPv4`, cidrv6: `مدى عناوين بصيغة IPv6`, base64: `نَص بترميز base64-encoded`, base64url: `نَص بترميز base64url-encoded`, json_string: `نَص على هيئة JSON`, e164: `رقم هاتف بمعيار E.164`, jwt: `JWT`, template_literal: `مدخل` }, r = { nan: `NaN` }; return (e) => { switch (e.code) { case `invalid_type`: { let t = r[e.expected] ?? e.expected, n = A$12(e.input), i = r[n] ?? n; return /^[A-Z]/.test(e.expected) ? `مدخلات غير مقبولة: يفترض إدخال instanceof ${e.expected}، ولكن تم إدخال ${i}` : `مدخلات غير مقبولة: يفترض إدخال ${t}، ولكن تم إدخال ${i}`; } case `invalid_value`: return e.values.length === 1 ? `مدخلات غير مقبولة: يفترض إدخال ${T$14(e.values[0])}` : `اختيار غير مقبول: يتوقع انتقاء أحد هذه الخيارات: ${m$10(e.values, `|`)}`; case `too_big`: { let n = e.inclusive ? `<=` : `<`, r = t(e.origin); return r ? ` أكبر من اللازم: يفترض أن تكون ${e.origin ?? `القيمة`} ${n} ${e.maximum.toString()} ${r.unit ?? `عنصر`}` : `أكبر من اللازم: يفترض أن تكون ${e.origin ?? `القيمة`} ${n} ${e.maximum.toString()}`; } case `too_small`: { let n = e.inclusive ? `>=` : `>`, r = t(e.origin); return r ? `أصغر من اللازم: يفترض لـ ${e.origin} أن يكون ${n} ${e.minimum.toString()} ${r.unit}` : `أصغر من اللازم: يفترض لـ ${e.origin} أن يكون ${n} ${e.minimum.toString()}`; } case `invalid_format`: { let t = e; return t.format === `starts_with` ? `نَص غير مقبول: يجب أن يبدأ بـ "${e.prefix}"` : t.format === `ends_with` ? `نَص غير مقبول: يجب أن ينتهي بـ "${t.suffix}"` : t.format === `includes` ? `نَص غير مقبول: يجب أن يتضمَّن "${t.includes}"` : t.format === `regex` ? `نَص غير مقبول: يجب أن يطابق النمط ${t.pattern}` : `${n[t.format] ?? e.format} غير مقبول`; } case `not_multiple_of`: return `رقم غير مقبول: يجب أن يكون من مضاعفات ${e.divisor}`; case `unrecognized_keys`: return `معرف${e.keys.length > 1 ? `ات` : ``} غريب${e.keys.length > 1 ? `ة` : ``}: ${m$10(e.keys, `، `)}`; case `invalid_key`: return `معرف غير مقبول في ${e.origin}`; case `invalid_union`: return `مدخل غير مقبول`; case `invalid_element`: return `مدخل غير مقبول في ${e.origin}`; default: return `مدخل غير مقبول`; } }; }; function Li$6() { return { localeError: Ii$6() }; } const Ri$6 = () => { let e = { string: { unit: `simvol`, verb: `olmalıdır` }, file: { unit: `bayt`, verb: `olmalıdır` }, array: { unit: `element`, verb: `olmalıdır` }, set: { unit: `element`, verb: `olmalıdır` } }; function t(t) { return e[t] ?? null; } let n = { regex: `input`, email: `email address`, url: `URL`, emoji: `emoji`, uuid: `UUID`, uuidv4: `UUIDv4`, uuidv6: `UUIDv6`, nanoid: `nanoid`, guid: `GUID`, cuid: `cuid`, cuid2: `cuid2`, ulid: `ULID`, xid: `XID`, ksuid: `KSUID`, datetime: `ISO datetime`, date: `ISO date`, time: `ISO time`, duration: `ISO duration`, ipv4: `IPv4 address`, ipv6: `IPv6 address`, cidrv4: `IPv4 range`, cidrv6: `IPv6 range`, base64: `base64-encoded string`, base64url: `base64url-encoded string`, json_string: `JSON string`, e164: `E.164 number`, jwt: `JWT`, template_literal: `input` }, r = { nan: `NaN` }; return (e) => { switch (e.code) { case `invalid_type`: { let t = r[e.expected] ?? e.expected, n = A$12(e.input), i = r[n] ?? n; return /^[A-Z]/.test(e.expected) ? `Yanlış dəyər: gözlənilən instanceof ${e.expected}, daxil olan ${i}` : `Yanlış dəyər: gözlənilən ${t}, daxil olan ${i}`; } case `invalid_value`: return e.values.length === 1 ? `Yanlış dəyər: gözlənilən ${T$14(e.values[0])}` : `Yanlış seçim: aşağıdakılardan biri olmalıdır: ${m$10(e.values, `|`)}`; case `too_big`: { let n = e.inclusive ? `<=` : `<`, r = t(e.origin); return r ? `Çox böyük: gözlənilən ${e.origin ?? `dəyər`} ${n}${e.maximum.toString()} ${r.unit ?? `element`}` : `Çox böyük: gözlənilən ${e.origin ?? `dəyər`} ${n}${e.maximum.toString()}`; } case `too_small`: { let n = e.inclusive ? `>=` : `>`, r = t(e.origin); return r ? `Çox kiçik: gözlənilən ${e.origin} ${n}${e.minimum.toString()} ${r.unit}` : `Çox kiçik: gözlənilən ${e.origin} ${n}${e.minimum.toString()}`; } case `invalid_format`: { let t = e; return t.format === `starts_with` ? `Yanlış mətn: "${t.prefix}" ilə başlamalıdır` : t.format === `ends_with` ? `Yanlış mətn: "${t.suffix}" ilə bitməlidir` : t.format === `includes` ? `Yanlış mətn: "${t.includes}" daxil olmalıdır` : t.format === `regex` ? `Yanlış mətn: ${t.pattern} şablonuna uyğun olmalıdır` : `Yanlış ${n[t.format] ?? e.format}`; } case `not_multiple_of`: return `Yanlış ədəd: ${e.divisor} ilə bölünə bilən olmalıdır`; case `unrecognized_keys`: return `Tanınmayan açar${e.keys.length > 1 ? `lar` : ``}: ${m$10(e.keys, `, `)}`; case `invalid_key`: return `${e.origin} daxilində yanlış açar`; case `invalid_union`: return `Yanlış dəyər`; case `invalid_element`: return `${e.origin} daxilində yanlış dəyər`; default: return `Yanlış dəyər`; } }; }; function zi$6() { return { localeError: Ri$6() }; } function Bi$6(e, t, n, r) { let i = Math.abs(e), a = i % 10, o = i % 100; return o >= 11 && o <= 19 ? r : a === 1 ? t : a >= 2 && a <= 4 ? n : r; } const Vi$6 = () => { let e = { string: { unit: { one: `сімвал`, few: `сімвалы`, many: `сімвалаў` }, verb: `мець` }, array: { unit: { one: `элемент`, few: `элементы`, many: `элементаў` }, verb: `мець` }, set: { unit: { one: `элемент`, few: `элементы`, many: `элементаў` }, verb: `мець` }, file: { unit: { one: `байт`, few: `байты`, many: `байтаў` }, verb: `мець` } }; function t(t) { return e[t] ?? null; } let n = { regex: `увод`, email: `email адрас`, url: `URL`, emoji: `эмодзі`, uuid: `UUID`, uuidv4: `UUIDv4`, uuidv6: `UUIDv6`, nanoid: `nanoid`, guid: `GUID`, cuid: `cuid`, cuid2: `cuid2`, ulid: `ULID`, xid: `XID`, ksuid: `KSUID`, datetime: `ISO дата і час`, date: `ISO дата`, time: `ISO час`, duration: `ISO працягласць`, ipv4: `IPv4 адрас`, ipv6: `IPv6 адрас`, cidrv4: `IPv4 дыяпазон`, cidrv6: `IPv6 дыяпазон`, base64: `радок у фармаце base64`, base64url: `радок у фармаце base64url`, json_string: `JSON радок`, e164: `нумар E.164`, jwt: `JWT`, template_literal: `увод` }, r = { nan: `NaN`, number: `лік`, array: `масіў` }; return (e) => { switch (e.code) { case `invalid_type`: { let t = r[e.expected] ?? e.expected, n = A$12(e.input), i = r[n] ?? n; return /^[A-Z]/.test(e.expected) ? `Няправільны ўвод: чакаўся instanceof ${e.expected}, атрымана ${i}` : `Няправільны ўвод: чакаўся ${t}, атрымана ${i}`; } case `invalid_value`: return e.values.length === 1 ? `Няправільны ўвод: чакалася ${T$14(e.values[0])}` : `Няправільны варыянт: чакаўся адзін з ${m$10(e.values, `|`)}`; case `too_big`: { let n = e.inclusive ? `<=` : `<`, r = t(e.origin); if (r) { let t = Bi$6(Number(e.maximum), r.unit.one, r.unit.few, r.unit.many); return `Занадта вялікі: чакалася, што ${e.origin ?? `значэнне`} павінна ${r.verb} ${n}${e.maximum.toString()} ${t}`; } return `Занадта вялікі: чакалася, што ${e.origin ?? `значэнне`} павінна быць ${n}${e.maximum.toString()}`; } case `too_small`: { let n = e.inclusive ? `>=` : `>`, r = t(e.origin); if (r) { let t = Bi$6(Number(e.minimum), r.unit.one, r.unit.few, r.unit.many); return `Занадта малы: чакалася, што ${e.origin} павінна ${r.verb} ${n}${e.minimum.toString()} ${t}`; } return `Занадта малы: чакалася, што ${e.origin} павінна быць ${n}${e.minimum.toString()}`; } case `invalid_format`: { let t = e; return t.format === `starts_with` ? `Няправільны радок: павінен пачынацца з "${t.prefix}"` : t.format === `ends_with` ? `Няправільны радок: павінен заканчвацца на "${t.suffix}"` : t.format === `includes` ? `Няправільны радок: павінен змяшчаць "${t.includes}"` : t.format === `regex` ? `Няправільны радок: павінен адпавядаць шаблону ${t.pattern}` : `Няправільны ${n[t.format] ?? e.format}`; } case `not_multiple_of`: return `Няправільны лік: павінен быць кратным ${e.divisor}`; case `unrecognized_keys`: return `Нераспазнаны ${e.keys.length > 1 ? `ключы` : `ключ`}: ${m$10(e.keys, `, `)}`; case `invalid_key`: return `Няправільны ключ у ${e.origin}`; case `invalid_union`: return `Няправільны ўвод`; case `invalid_element`: return `Няправільнае значэнне ў ${e.origin}`; default: return `Няправільны ўвод`; } }; }; function Hi$6() { return { localeError: Vi$6() }; } const Ui$6 = () => { let e = { string: { unit: `символа`, verb: `да съдържа` }, file: { unit: `байта`, verb: `да съдържа` }, array: { unit: `елемента`, verb: `да съдържа` }, set: { unit: `елемента`, verb: `да съдържа` } }; function t(t) { return e[t] ?? null; } let n = { regex: `вход`, email: `имейл адрес`, url: `URL`, emoji: `емоджи`, uuid: `UUID`, uuidv4: `UUIDv4`, uuidv6: `UUIDv6`, nanoid: `nanoid`, guid: `GUID`, cuid: `cuid`, cuid2: `cuid2`, ulid: `ULID`, xid: `XID`, ksuid: `KSUID`, datetime: `ISO време`, date: `ISO дата`, time: `ISO време`, duration: `ISO продължителност`, ipv4: `IPv4 адрес`, ipv6: `IPv6 адрес`, cidrv4: `IPv4 диапазон`, cidrv6: `IPv6 диапазон`, base64: `base64-кодиран низ`, base64url: `base64url-кодиран низ`, json_string: `JSON низ`, e164: `E.164 номер`, jwt: `JWT`, template_literal: `вход` }, r = { nan: `NaN`, number: `число`, array: `масив` }; return (e) => { switch (e.code) { case `invalid_type`: { let t = r[e.expected] ?? e.expected, n = A$12(e.input), i = r[n] ?? n; return /^[A-Z]/.test(e.expected) ? `Невалиден вход: очакван instanceof ${e.expected}, получен ${i}` : `Невалиден вход: очакван ${t}, получен ${i}`; } case `invalid_value`: return e.values.length === 1 ? `Невалиден вход: очакван ${T$14(e.values[0])}` : `Невалидна опция: очаквано едно от ${m$10(e.values, `|`)}`; case `too_big`: { let n = e.inclusive ? `<=` : `<`, r = t(e.origin); return r ? `Твърде голямо: очаква се ${e.origin ?? `стойност`} да съдържа ${n}${e.maximum.toString()} ${r.unit ?? `елемента`}` : `Твърде голямо: очаква се ${e.origin ?? `стойност`} да бъде ${n}${e.maximum.toString()}`; } case `too_small`: { let n = e.inclusive ? `>=` : `>`, r = t(e.origin); return r ? `Твърде малко: очаква се ${e.origin} да съдържа ${n}${e.minimum.toString()} ${r.unit}` : `Твърде малко: очаква се ${e.origin} да бъде ${n}${e.minimum.toString()}`; } case `invalid_format`: { let t = e; if (t.format === `starts_with`) return `Невалиден низ: трябва да започва с "${t.prefix}"`; if (t.format === `ends_with`) return `Невалиден низ: трябва да завършва с "${t.suffix}"`; if (t.format === `includes`) return `Невалиден низ: трябва да включва "${t.includes}"`; if (t.format === `regex`) return `Невалиден низ: трябва да съвпада с ${t.pattern}`; let r = `Невалиден`; return t.format === `emoji` && (r = `Невалидно`), t.format === `datetime` && (r = `Невалидно`), t.format === `date` && (r = `Невалидна`), t.format === `time` && (r = `Невалидно`), t.format === `duration` && (r = `Невалидна`), `${r} ${n[t.format] ?? e.format}`; } case `not_multiple_of`: return `Невалидно число: трябва да бъде кратно на ${e.divisor}`; case `unrecognized_keys`: return `Неразпознат${e.keys.length > 1 ? `и` : ``} ключ${e.keys.length > 1 ? `ове` : ``}: ${m$10(e.keys, `, `)}`; case `invalid_key`: return `Невалиден ключ в ${e.origin}`; case `invalid_union`: return `Невалиден вход`; case `invalid_element`: return `Невалидна стойност в ${e.origin}`; default: return `Невалиден вход`; } }; }; function Wi$6() { return { localeError: Ui$6() }; } const Gi$6 = () => { let e = { string: { unit: `caràcters`, verb: `contenir` }, file: { unit: `bytes`, verb: `contenir` }, array: { unit: `elements`, verb: `contenir` }, set: { unit: `elements`, verb: `contenir` } }; function t(t) { return e[t] ?? null; } let n = { regex: `entrada`, email: `adreça electrònica`, url: `URL`, emoji: `emoji`, uuid: `UUID`, uuidv4: `UUIDv4`, uuidv6: `UUIDv6`, nanoid: `nanoid`, guid: `GUID`, cuid: `cuid`, cuid2: `cuid2`, ulid: `ULID`, xid: `XID`, ksuid: `KSUID`, datetime: `data i hora ISO`, date: `data ISO`, time: `hora ISO`, duration: `durada ISO`, ipv4: `adreça IPv4`, ipv6: `adreça IPv6`, cidrv4: `rang IPv4`, cidrv6: `rang IPv6`, base64: `cadena codificada en base64`, base64url: `cadena codificada en base64url`, json_string: `cadena JSON`, e164: `número E.164`, jwt: `JWT`, template_literal: `entrada` }, r = { nan: `NaN` }; return (e) => { switch (e.code) { case `invalid_type`: { let t = r[e.expected] ?? e.expected, n = A$12(e.input), i = r[n] ?? n; return /^[A-Z]/.test(e.expected) ? `Tipus invàlid: s'esperava instanceof ${e.expected}, s'ha rebut ${i}` : `Tipus invàlid: s'esperava ${t}, s'ha rebut ${i}`; } case `invalid_value`: return e.values.length === 1 ? `Valor invàlid: s'esperava ${T$14(e.values[0])}` : `Opció invàlida: s'esperava una de ${m$10(e.values, ` o `)}`; case `too_big`: { let n = e.inclusive ? `com a màxim` : `menys de`, r = t(e.origin); return r ? `Massa gran: s'esperava que ${e.origin ?? `el valor`} contingués ${n} ${e.maximum.toString()} ${r.unit ?? `elements`}` : `Massa gran: s'esperava que ${e.origin ?? `el valor`} fos ${n} ${e.maximum.toString()}`; } case `too_small`: { let n = e.inclusive ? `com a mínim` : `més de`, r = t(e.origin); return r ? `Massa petit: s'esperava que ${e.origin} contingués ${n} ${e.minimum.toString()} ${r.unit}` : `Massa petit: s'esperava que ${e.origin} fos ${n} ${e.minimum.toString()}`; } case `invalid_format`: { let t = e; return t.format === `starts_with` ? `Format invàlid: ha de començar amb "${t.prefix}"` : t.format === `ends_with` ? `Format invàlid: ha d'acabar amb "${t.suffix}"` : t.format === `includes` ? `Format invàlid: ha d'incloure "${t.includes}"` : t.format === `regex` ? `Format invàlid: ha de coincidir amb el patró ${t.pattern}` : `Format invàlid per a ${n[t.format] ?? e.format}`; } case `not_multiple_of`: return `Número invàlid: ha de ser múltiple de ${e.divisor}`; case `unrecognized_keys`: return `Clau${e.keys.length > 1 ? `s` : ``} no reconeguda${e.keys.length > 1 ? `s` : ``}: ${m$10(e.keys, `, `)}`; case `invalid_key`: return `Clau invàlida a ${e.origin}`; case `invalid_union`: return `Entrada invàlida`; case `invalid_element`: return `Element invàlid a ${e.origin}`; default: return `Entrada invàlida`; } }; }; function Ki$6() { return { localeError: Gi$6() }; } const qi$6 = () => { let e = { string: { unit: `znaků`, verb: `mít` }, file: { unit: `bajtů`, verb: `mít` }, array: { unit: `prvků`, verb: `mít` }, set: { unit: `prvků`, verb: `mít` } }; function t(t) { return e[t] ?? null; } let n = { regex: `regulární výraz`, email: `e-mailová adresa`, url: `URL`, emoji: `emoji`, uuid: `UUID`, uuidv4: `UUIDv4`, uuidv6: `UUIDv6`, nanoid: `nanoid`, guid: `GUID`, cuid: `cuid`, cuid2: `cuid2`, ulid: `ULID`, xid: `XID`, ksuid: `KSUID`, datetime: `datum a čas ve formátu ISO`, date: `datum ve formátu ISO`, time: `čas ve formátu ISO`, duration: `doba trvání ISO`, ipv4: `IPv4 adresa`, ipv6: `IPv6 adresa`, cidrv4: `rozsah IPv4`, cidrv6: `rozsah IPv6`, base64: `řetězec zakódovaný ve formátu base64`, base64url: `řetězec zakódovaný ve formátu base64url`, json_string: `řetězec ve formátu JSON`, e164: `číslo E.164`, jwt: `JWT`, template_literal: `vstup` }, r = { nan: `NaN`, number: `číslo`, string: `řetězec`, function: `funkce`, array: `pole` }; return (e) => { switch (e.code) { case `invalid_type`: { let t = r[e.expected] ?? e.expected, n = A$12(e.input), i = r[n] ?? n; return /^[A-Z]/.test(e.expected) ? `Neplatný vstup: očekáváno instanceof ${e.expected}, obdrženo ${i}` : `Neplatný vstup: očekáváno ${t}, obdrženo ${i}`; } case `invalid_value`: return e.values.length === 1 ? `Neplatný vstup: očekáváno ${T$14(e.values[0])}` : `Neplatná možnost: očekávána jedna z hodnot ${m$10(e.values, `|`)}`; case `too_big`: { let n = e.inclusive ? `<=` : `<`, r = t(e.origin); return r ? `Hodnota je příliš velká: ${e.origin ?? `hodnota`} musí mít ${n}${e.maximum.toString()} ${r.unit ?? `prvků`}` : `Hodnota je příliš velká: ${e.origin ?? `hodnota`} musí být ${n}${e.maximum.toString()}`; } case `too_small`: { let n = e.inclusive ? `>=` : `>`, r = t(e.origin); return r ? `Hodnota je příliš malá: ${e.origin ?? `hodnota`} musí mít ${n}${e.minimum.toString()} ${r.unit ?? `prvků`}` : `Hodnota je příliš malá: ${e.origin ?? `hodnota`} musí být ${n}${e.minimum.toString()}`; } case `invalid_format`: { let t = e; return t.format === `starts_with` ? `Neplatný řetězec: musí začínat na "${t.prefix}"` : t.format === `ends_with` ? `Neplatný řetězec: musí končit na "${t.suffix}"` : t.format === `includes` ? `Neplatný řetězec: musí obsahovat "${t.includes}"` : t.format === `regex` ? `Neplatný řetězec: musí odpovídat vzoru ${t.pattern}` : `Neplatný formát ${n[t.format] ?? e.format}`; } case `not_multiple_of`: return `Neplatné číslo: musí být násobkem ${e.divisor}`; case `unrecognized_keys`: return `Neznámé klíče: ${m$10(e.keys, `, `)}`; case `invalid_key`: return `Neplatný klíč v ${e.origin}`; case `invalid_union`: return `Neplatný vstup`; case `invalid_element`: return `Neplatná hodnota v ${e.origin}`; default: return `Neplatný vstup`; } }; }; function Ji$6() { return { localeError: qi$6() }; } const Yi$6 = () => { let e = { string: { unit: `tegn`, verb: `havde` }, file: { unit: `bytes`, verb: `havde` }, array: { unit: `elementer`, verb: `indeholdt` }, set: { unit: `elementer`, verb: `indeholdt` } }; function t(t) { return e[t] ?? null; } let n = { regex: `input`, email: `e-mailadresse`, url: `URL`, emoji: `emoji`, uuid: `UUID`, uuidv4: `UUIDv4`, uuidv6: `UUIDv6`, nanoid: `nanoid`, guid: `GUID`, cuid: `cuid`, cuid2: `cuid2`, ulid: `ULID`, xid: `XID`, ksuid: `KSUID`, datetime: `ISO dato- og klokkeslæt`, date: `ISO-dato`, time: `ISO-klokkeslæt`, duration: `ISO-varighed`, ipv4: `IPv4-område`, ipv6: `IPv6-område`, cidrv4: `IPv4-spektrum`, cidrv6: `IPv6-spektrum`, base64: `base64-kodet streng`, base64url: `base64url-kodet streng`, json_string: `JSON-streng`, e164: `E.164-nummer`, jwt: `JWT`, template_literal: `input` }, r = { nan: `NaN`, string: `streng`, number: `tal`, boolean: `boolean`, array: `liste`, object: `objekt`, set: `sæt`, file: `fil` }; return (e) => { switch (e.code) { case `invalid_type`: { let t = r[e.expected] ?? e.expected, n = A$12(e.input), i = r[n] ?? n; return /^[A-Z]/.test(e.expected) ? `Ugyldigt input: forventede instanceof ${e.expected}, fik ${i}` : `Ugyldigt input: forventede ${t}, fik ${i}`; } case `invalid_value`: return e.values.length === 1 ? `Ugyldig værdi: forventede ${T$14(e.values[0])}` : `Ugyldigt valg: forventede en af følgende ${m$10(e.values, `|`)}`; case `too_big`: { let n = e.inclusive ? `<=` : `<`, i = t(e.origin), a = r[e.origin] ?? e.origin; return i ? `For stor: forventede ${a ?? `value`} ${i.verb} ${n} ${e.maximum.toString()} ${i.unit ?? `elementer`}` : `For stor: forventede ${a ?? `value`} havde ${n} ${e.maximum.toString()}`; } case `too_small`: { let n = e.inclusive ? `>=` : `>`, i = t(e.origin), a = r[e.origin] ?? e.origin; return i ? `For lille: forventede ${a} ${i.verb} ${n} ${e.minimum.toString()} ${i.unit}` : `For lille: forventede ${a} havde ${n} ${e.minimum.toString()}`; } case `invalid_format`: { let t = e; return t.format === `starts_with` ? `Ugyldig streng: skal starte med "${t.prefix}"` : t.format === `ends_with` ? `Ugyldig streng: skal ende med "${t.suffix}"` : t.format === `includes` ? `Ugyldig streng: skal indeholde "${t.includes}"` : t.format === `regex` ? `Ugyldig streng: skal matche mønsteret ${t.pattern}` : `Ugyldig ${n[t.format] ?? e.format}`; } case `not_multiple_of`: return `Ugyldigt tal: skal være deleligt med ${e.divisor}`; case `unrecognized_keys`: return `${e.keys.length > 1 ? `Ukendte nøgler` : `Ukendt nøgle`}: ${m$10(e.keys, `, `)}`; case `invalid_key`: return `Ugyldig nøgle i ${e.origin}`; case `invalid_union`: return `Ugyldigt input: matcher ingen af de tilladte typer`; case `invalid_element`: return `Ugyldig værdi i ${e.origin}`; default: return `Ugyldigt input`; } }; }; function Xi$6() { return { localeError: Yi$6() }; } const Zi$6 = () => { let e = { string: { unit: `Zeichen`, verb: `zu haben` }, file: { unit: `Bytes`, verb: `zu haben` }, array: { unit: `Elemente`, verb: `zu haben` }, set: { unit: `Elemente`, verb: `zu haben` } }; function t(t) { return e[t] ?? null; } let n = { regex: `Eingabe`, email: `E-Mail-Adresse`, url: `URL`, emoji: `Emoji`, uuid: `UUID`, uuidv4: `UUIDv4`, uuidv6: `UUIDv6`, nanoid: `nanoid`, guid: `GUID`, cuid: `cuid`, cuid2: `cuid2`, ulid: `ULID`, xid: `XID`, ksuid: `KSUID`, datetime: `ISO-Datum und -Uhrzeit`, date: `ISO-Datum`, time: `ISO-Uhrzeit`, duration: `ISO-Dauer`, ipv4: `IPv4-Adresse`, ipv6: `IPv6-Adresse`, cidrv4: `IPv4-Bereich`, cidrv6: `IPv6-Bereich`, base64: `Base64-codierter String`, base64url: `Base64-URL-codierter String`, json_string: `JSON-String`, e164: `E.164-Nummer`, jwt: `JWT`, template_literal: `Eingabe` }, r = { nan: `NaN`, number: `Zahl`, array: `Array` }; return (e) => { switch (e.code) { case `invalid_type`: { let t = r[e.expected] ?? e.expected, n = A$12(e.input), i = r[n] ?? n; return /^[A-Z]/.test(e.expected) ? `Ungültige Eingabe: erwartet instanceof ${e.expected}, erhalten ${i}` : `Ungültige Eingabe: erwartet ${t}, erhalten ${i}`; } case `invalid_value`: return e.values.length === 1 ? `Ungültige Eingabe: erwartet ${T$14(e.values[0])}` : `Ungültige Option: erwartet eine von ${m$10(e.values, `|`)}`; case `too_big`: { let n = e.inclusive ? `<=` : `<`, r = t(e.origin); return r ? `Zu groß: erwartet, dass ${e.origin ?? `Wert`} ${n}${e.maximum.toString()} ${r.unit ?? `Elemente`} hat` : `Zu groß: erwartet, dass ${e.origin ?? `Wert`} ${n}${e.maximum.toString()} ist`; } case `too_small`: { let n = e.inclusive ? `>=` : `>`, r = t(e.origin); return r ? `Zu klein: erwartet, dass ${e.origin} ${n}${e.minimum.toString()} ${r.unit} hat` : `Zu klein: erwartet, dass ${e.origin} ${n}${e.minimum.toString()} ist`; } case `invalid_format`: { let t = e; return t.format === `starts_with` ? `Ungültiger String: muss mit "${t.prefix}" beginnen` : t.format === `ends_with` ? `Ungültiger String: muss mit "${t.suffix}" enden` : t.format === `includes` ? `Ungültiger String: muss "${t.includes}" enthalten` : t.format === `regex` ? `Ungültiger String: muss dem Muster ${t.pattern} entsprechen` : `Ungültig: ${n[t.format] ?? e.format}`; } case `not_multiple_of`: return `Ungültige Zahl: muss ein Vielfaches von ${e.divisor} sein`; case `unrecognized_keys`: return `${e.keys.length > 1 ? `Unbekannte Schlüssel` : `Unbekannter Schlüssel`}: ${m$10(e.keys, `, `)}`; case `invalid_key`: return `Ungültiger Schlüssel in ${e.origin}`; case `invalid_union`: return `Ungültige Eingabe`; case `invalid_element`: return `Ungültiger Wert in ${e.origin}`; default: return `Ungültige Eingabe`; } }; }; function Qi$6() { return { localeError: Zi$6() }; } const $i$6 = () => { let e = { string: { unit: `χαρακτήρες`, verb: `να έχει` }, file: { unit: `bytes`, verb: `να έχει` }, array: { unit: `στοιχεία`, verb: `να έχει` }, set: { unit: `στοιχεία`, verb: `να έχει` }, map: { unit: `καταχωρήσεις`, verb: `να έχει` } }; function t(t) { return e[t] ?? null; } let n = { regex: `είσοδος`, email: `διεύθυνση email`, url: `URL`, emoji: `emoji`, uuid: `UUID`, uuidv4: `UUIDv4`, uuidv6: `UUIDv6`, nanoid: `nanoid`, guid: `GUID`, cuid: `cuid`, cuid2: `cuid2`, ulid: `ULID`, xid: `XID`, ksuid: `KSUID`, datetime: `ISO ημερομηνία και ώρα`, date: `ISO ημερομηνία`, time: `ISO ώρα`, duration: `ISO διάρκεια`, ipv4: `διεύθυνση IPv4`, ipv6: `διεύθυνση IPv6`, mac: `διεύθυνση MAC`, cidrv4: `εύρος IPv4`, cidrv6: `εύρος IPv6`, base64: `συμβολοσειρά κωδικοποιημένη σε base64`, base64url: `συμβολοσειρά κωδικοποιημένη σε base64url`, json_string: `συμβολοσειρά JSON`, e164: `αριθμός E.164`, jwt: `JWT`, template_literal: `είσοδος` }, r = { nan: `NaN` }; return (e) => { switch (e.code) { case `invalid_type`: { let t = r[e.expected] ?? e.expected, n = A$12(e.input), i = r[n] ?? n; return typeof e.expected == `string` && /^[A-Z]/.test(e.expected) ? `Μη έγκυρη είσοδος: αναμενόταν instanceof ${e.expected}, λήφθηκε ${i}` : `Μη έγκυρη είσοδος: αναμενόταν ${t}, λήφθηκε ${i}`; } case `invalid_value`: return e.values.length === 1 ? `Μη έγκυρη είσοδος: αναμενόταν ${T$14(e.values[0])}` : `Μη έγκυρη επιλογή: αναμενόταν ένα από ${m$10(e.values, `|`)}`; case `too_big`: { let n = e.inclusive ? `<=` : `<`, r = t(e.origin); return r ? `Πολύ μεγάλο: αναμενόταν ${e.origin ?? `τιμή`} να έχει ${n}${e.maximum.toString()} ${r.unit ?? `στοιχεία`}` : `Πολύ μεγάλο: αναμενόταν ${e.origin ?? `τιμή`} να είναι ${n}${e.maximum.toString()}`; } case `too_small`: { let n = e.inclusive ? `>=` : `>`, r = t(e.origin); return r ? `Πολύ μικρό: αναμενόταν ${e.origin} να έχει ${n}${e.minimum.toString()} ${r.unit}` : `Πολύ μικρό: αναμενόταν ${e.origin} να είναι ${n}${e.minimum.toString()}`; } case `invalid_format`: { let t = e; return t.format === `starts_with` ? `Μη έγκυρη συμβολοσειρά: πρέπει να ξεκινά με "${t.prefix}"` : t.format === `ends_with` ? `Μη έγκυρη συμβολοσειρά: πρέπει να τελειώνει με "${t.suffix}"` : t.format === `includes` ? `Μη έγκυρη συμβολοσειρά: πρέπει να περιέχει "${t.includes}"` : t.format === `regex` ? `Μη έγκυρη συμβολοσειρά: πρέπει να ταιριάζει με το μοτίβο ${t.pattern}` : `Μη έγκυρο: ${n[t.format] ?? e.format}`; } case `not_multiple_of`: return `Μη έγκυρος αριθμός: πρέπει να είναι πολλαπλάσιο του ${e.divisor}`; case `unrecognized_keys`: return `Άγνωστ${e.keys.length > 1 ? `α` : `ο`} κλειδ${e.keys.length > 1 ? `ιά` : `ί`}: ${m$10(e.keys, `, `)}`; case `invalid_key`: return `Μη έγκυρο κλειδί στο ${e.origin}`; case `invalid_union`: return `Μη έγκυρη είσοδος`; case `invalid_element`: return `Μη έγκυρη τιμή στο ${e.origin}`; default: return `Μη έγκυρη είσοδος`; } }; }; function ea$6() { return { localeError: $i$6() }; } const ta$6 = () => { let e = { string: { unit: `characters`, verb: `to have` }, file: { unit: `bytes`, verb: `to have` }, array: { unit: `items`, verb: `to have` }, set: { unit: `items`, verb: `to have` }, map: { unit: `entries`, verb: `to have` } }; function t(t) { return e[t] ?? null; } let n = { regex: `input`, email: `email address`, url: `URL`, emoji: `emoji`, uuid: `UUID`, uuidv4: `UUIDv4`, uuidv6: `UUIDv6`, nanoid: `nanoid`, guid: `GUID`, cuid: `cuid`, cuid2: `cuid2`, ulid: `ULID`, xid: `XID`, ksuid: `KSUID`, datetime: `ISO datetime`, date: `ISO date`, time: `ISO time`, duration: `ISO duration`, ipv4: `IPv4 address`, ipv6: `IPv6 address`, mac: `MAC address`, cidrv4: `IPv4 range`, cidrv6: `IPv6 range`, base64: `base64-encoded string`, base64url: `base64url-encoded string`, json_string: `JSON string`, e164: `E.164 number`, jwt: `JWT`, template_literal: `input` }, r = { nan: `NaN` }; return (e) => { switch (e.code) { case `invalid_type`: { let t = r[e.expected] ?? e.expected, n = A$12(e.input); return `Invalid input: expected ${t}, received ${r[n] ?? n}`; } case `invalid_value`: return e.values.length === 1 ? `Invalid input: expected ${T$14(e.values[0])}` : `Invalid option: expected one of ${m$10(e.values, `|`)}`; case `too_big`: { let n = e.inclusive ? `<=` : `<`, r = t(e.origin); return r ? `Too big: expected ${e.origin ?? `value`} to have ${n}${e.maximum.toString()} ${r.unit ?? `elements`}` : `Too big: expected ${e.origin ?? `value`} to be ${n}${e.maximum.toString()}`; } case `too_small`: { let n = e.inclusive ? `>=` : `>`, r = t(e.origin); return r ? `Too small: expected ${e.origin} to have ${n}${e.minimum.toString()} ${r.unit}` : `Too small: expected ${e.origin} to be ${n}${e.minimum.toString()}`; } case `invalid_format`: { let t = e; return t.format === `starts_with` ? `Invalid string: must start with "${t.prefix}"` : t.format === `ends_with` ? `Invalid string: must end with "${t.suffix}"` : t.format === `includes` ? `Invalid string: must include "${t.includes}"` : t.format === `regex` ? `Invalid string: must match pattern ${t.pattern}` : `Invalid ${n[t.format] ?? e.format}`; } case `not_multiple_of`: return `Invalid number: must be a multiple of ${e.divisor}`; case `unrecognized_keys`: return `Unrecognized key${e.keys.length > 1 ? `s` : ``}: ${m$10(e.keys, `, `)}`; case `invalid_key`: return `Invalid key in ${e.origin}`; case `invalid_union`: return e.options && Array.isArray(e.options) && e.options.length > 0 ? `Invalid discriminator value. Expected ${e.options.map((e) => `'${e}'`).join(` | `)}` : `Invalid input`; case `invalid_element`: return `Invalid value in ${e.origin}`; default: return `Invalid input`; } }; }; function na$6() { return { localeError: ta$6() }; } const ra$6 = () => { let e = { string: { unit: `karaktrojn`, verb: `havi` }, file: { unit: `bajtojn`, verb: `havi` }, array: { unit: `elementojn`, verb: `havi` }, set: { unit: `elementojn`, verb: `havi` } }; function t(t) { return e[t] ?? null; } let n = { regex: `enigo`, email: `retadreso`, url: `URL`, emoji: `emoĝio`, uuid: `UUID`, uuidv4: `UUIDv4`, uuidv6: `UUIDv6`, nanoid: `nanoid`, guid: `GUID`, cuid: `cuid`, cuid2: `cuid2`, ulid: `ULID`, xid: `XID`, ksuid: `KSUID`, datetime: `ISO-datotempo`, date: `ISO-dato`, time: `ISO-tempo`, duration: `ISO-daŭro`, ipv4: `IPv4-adreso`, ipv6: `IPv6-adreso`, cidrv4: `IPv4-rango`, cidrv6: `IPv6-rango`, base64: `64-ume kodita karaktraro`, base64url: `URL-64-ume kodita karaktraro`, json_string: `JSON-karaktraro`, e164: `E.164-nombro`, jwt: `JWT`, template_literal: `enigo` }, r = { nan: `NaN`, number: `nombro`, array: `tabelo`, null: `senvalora` }; return (e) => { switch (e.code) { case `invalid_type`: { let t = r[e.expected] ?? e.expected, n = A$12(e.input), i = r[n] ?? n; return /^[A-Z]/.test(e.expected) ? `Nevalida enigo: atendiĝis instanceof ${e.expected}, riceviĝis ${i}` : `Nevalida enigo: atendiĝis ${t}, riceviĝis ${i}`; } case `invalid_value`: return e.values.length === 1 ? `Nevalida enigo: atendiĝis ${T$14(e.values[0])}` : `Nevalida opcio: atendiĝis unu el ${m$10(e.values, `|`)}`; case `too_big`: { let n = e.inclusive ? `<=` : `<`, r = t(e.origin); return r ? `Tro granda: atendiĝis ke ${e.origin ?? `valoro`} havu ${n}${e.maximum.toString()} ${r.unit ?? `elementojn`}` : `Tro granda: atendiĝis ke ${e.origin ?? `valoro`} havu ${n}${e.maximum.toString()}`; } case `too_small`: { let n = e.inclusive ? `>=` : `>`, r = t(e.origin); return r ? `Tro malgranda: atendiĝis ke ${e.origin} havu ${n}${e.minimum.toString()} ${r.unit}` : `Tro malgranda: atendiĝis ke ${e.origin} estu ${n}${e.minimum.toString()}`; } case `invalid_format`: { let t = e; return t.format === `starts_with` ? `Nevalida karaktraro: devas komenciĝi per "${t.prefix}"` : t.format === `ends_with` ? `Nevalida karaktraro: devas finiĝi per "${t.suffix}"` : t.format === `includes` ? `Nevalida karaktraro: devas inkluzivi "${t.includes}"` : t.format === `regex` ? `Nevalida karaktraro: devas kongrui kun la modelo ${t.pattern}` : `Nevalida ${n[t.format] ?? e.format}`; } case `not_multiple_of`: return `Nevalida nombro: devas esti oblo de ${e.divisor}`; case `unrecognized_keys`: return `Nekonata${e.keys.length > 1 ? `j` : ``} ŝlosilo${e.keys.length > 1 ? `j` : ``}: ${m$10(e.keys, `, `)}`; case `invalid_key`: return `Nevalida ŝlosilo en ${e.origin}`; case `invalid_union`: return `Nevalida enigo`; case `invalid_element`: return `Nevalida valoro en ${e.origin}`; default: return `Nevalida enigo`; } }; }; function ia$6() { return { localeError: ra$6() }; } const aa$6 = () => { let e = { string: { unit: `caracteres`, verb: `tener` }, file: { unit: `bytes`, verb: `tener` }, array: { unit: `elementos`, verb: `tener` }, set: { unit: `elementos`, verb: `tener` } }; function t(t) { return e[t] ?? null; } let n = { regex: `entrada`, email: `dirección de correo electrónico`, url: `URL`, emoji: `emoji`, uuid: `UUID`, uuidv4: `UUIDv4`, uuidv6: `UUIDv6`, nanoid: `nanoid`, guid: `GUID`, cuid: `cuid`, cuid2: `cuid2`, ulid: `ULID`, xid: `XID`, ksuid: `KSUID`, datetime: `fecha y hora ISO`, date: `fecha ISO`, time: `hora ISO`, duration: `duración ISO`, ipv4: `dirección IPv4`, ipv6: `dirección IPv6`, cidrv4: `rango IPv4`, cidrv6: `rango IPv6`, base64: `cadena codificada en base64`, base64url: `URL codificada en base64`, json_string: `cadena JSON`, e164: `número E.164`, jwt: `JWT`, template_literal: `entrada` }, r = { nan: `NaN`, string: `texto`, number: `número`, boolean: `booleano`, array: `arreglo`, object: `objeto`, set: `conjunto`, file: `archivo`, date: `fecha`, bigint: `número grande`, symbol: `símbolo`, undefined: `indefinido`, null: `nulo`, function: `función`, map: `mapa`, record: `registro`, tuple: `tupla`, enum: `enumeración`, union: `unión`, literal: `literal`, promise: `promesa`, void: `vacío`, never: `nunca`, unknown: `desconocido`, any: `cualquiera` }; return (e) => { switch (e.code) { case `invalid_type`: { let t = r[e.expected] ?? e.expected, n = A$12(e.input), i = r[n] ?? n; return /^[A-Z]/.test(e.expected) ? `Entrada inválida: se esperaba instanceof ${e.expected}, recibido ${i}` : `Entrada inválida: se esperaba ${t}, recibido ${i}`; } case `invalid_value`: return e.values.length === 1 ? `Entrada inválida: se esperaba ${T$14(e.values[0])}` : `Opción inválida: se esperaba una de ${m$10(e.values, `|`)}`; case `too_big`: { let n = e.inclusive ? `<=` : `<`, i = t(e.origin), a = r[e.origin] ?? e.origin; return i ? `Demasiado grande: se esperaba que ${a ?? `valor`} tuviera ${n}${e.maximum.toString()} ${i.unit ?? `elementos`}` : `Demasiado grande: se esperaba que ${a ?? `valor`} fuera ${n}${e.maximum.toString()}`; } case `too_small`: { let n = e.inclusive ? `>=` : `>`, i = t(e.origin), a = r[e.origin] ?? e.origin; return i ? `Demasiado pequeño: se esperaba que ${a} tuviera ${n}${e.minimum.toString()} ${i.unit}` : `Demasiado pequeño: se esperaba que ${a} fuera ${n}${e.minimum.toString()}`; } case `invalid_format`: { let t = e; return t.format === `starts_with` ? `Cadena inválida: debe comenzar con "${t.prefix}"` : t.format === `ends_with` ? `Cadena inválida: debe terminar en "${t.suffix}"` : t.format === `includes` ? `Cadena inválida: debe incluir "${t.includes}"` : t.format === `regex` ? `Cadena inválida: debe coincidir con el patrón ${t.pattern}` : `Inválido ${n[t.format] ?? e.format}`; } case `not_multiple_of`: return `Número inválido: debe ser múltiplo de ${e.divisor}`; case `unrecognized_keys`: return `Llave${e.keys.length > 1 ? `s` : ``} desconocida${e.keys.length > 1 ? `s` : ``}: ${m$10(e.keys, `, `)}`; case `invalid_key`: return `Llave inválida en ${r[e.origin] ?? e.origin}`; case `invalid_union`: return `Entrada inválida`; case `invalid_element`: return `Valor inválido en ${r[e.origin] ?? e.origin}`; default: return `Entrada inválida`; } }; }; function oa$6() { return { localeError: aa$6() }; } const sa$6 = () => { let e = { string: { unit: `کاراکتر`, verb: `داشته باشد` }, file: { unit: `بایت`, verb: `داشته باشد` }, array: { unit: `آیتم`, verb: `داشته باشد` }, set: { unit: `آیتم`, verb: `داشته باشد` } }; function t(t) { return e[t] ?? null; } let n = { regex: `ورودی`, email: `آدرس ایمیل`, url: `URL`, emoji: `ایموجی`, uuid: `UUID`, uuidv4: `UUIDv4`, uuidv6: `UUIDv6`, nanoid: `nanoid`, guid: `GUID`, cuid: `cuid`, cuid2: `cuid2`, ulid: `ULID`, xid: `XID`, ksuid: `KSUID`, datetime: `تاریخ و زمان ایزو`, date: `تاریخ ایزو`, time: `زمان ایزو`, duration: `مدت زمان ایزو`, ipv4: `IPv4 آدرس`, ipv6: `IPv6 آدرس`, cidrv4: `IPv4 دامنه`, cidrv6: `IPv6 دامنه`, base64: `base64-encoded رشته`, base64url: `base64url-encoded رشته`, json_string: `JSON رشته`, e164: `E.164 عدد`, jwt: `JWT`, template_literal: `ورودی` }, r = { nan: `NaN`, number: `عدد`, array: `آرایه` }; return (e) => { switch (e.code) { case `invalid_type`: { let t = r[e.expected] ?? e.expected, n = A$12(e.input), i = r[n] ?? n; return /^[A-Z]/.test(e.expected) ? `ورودی نامعتبر: می‌بایست instanceof ${e.expected} می‌بود، ${i} دریافت شد` : `ورودی نامعتبر: می‌بایست ${t} می‌بود، ${i} دریافت شد`; } case `invalid_value`: return e.values.length === 1 ? `ورودی نامعتبر: می‌بایست ${T$14(e.values[0])} می‌بود` : `گزینه نامعتبر: می‌بایست یکی از ${m$10(e.values, `|`)} می‌بود`; case `too_big`: { let n = e.inclusive ? `<=` : `<`, r = t(e.origin); return r ? `خیلی بزرگ: ${e.origin ?? `مقدار`} باید ${n}${e.maximum.toString()} ${r.unit ?? `عنصر`} باشد` : `خیلی بزرگ: ${e.origin ?? `مقدار`} باید ${n}${e.maximum.toString()} باشد`; } case `too_small`: { let n = e.inclusive ? `>=` : `>`, r = t(e.origin); return r ? `خیلی کوچک: ${e.origin} باید ${n}${e.minimum.toString()} ${r.unit} باشد` : `خیلی کوچک: ${e.origin} باید ${n}${e.minimum.toString()} باشد`; } case `invalid_format`: { let t = e; return t.format === `starts_with` ? `رشته نامعتبر: باید با "${t.prefix}" شروع شود` : t.format === `ends_with` ? `رشته نامعتبر: باید با "${t.suffix}" تمام شود` : t.format === `includes` ? `رشته نامعتبر: باید شامل "${t.includes}" باشد` : t.format === `regex` ? `رشته نامعتبر: باید با الگوی ${t.pattern} مطابقت داشته باشد` : `${n[t.format] ?? e.format} نامعتبر`; } case `not_multiple_of`: return `عدد نامعتبر: باید مضرب ${e.divisor} باشد`; case `unrecognized_keys`: return `کلید${e.keys.length > 1 ? `های` : ``} ناشناس: ${m$10(e.keys, `, `)}`; case `invalid_key`: return `کلید ناشناس در ${e.origin}`; case `invalid_union`: return `ورودی نامعتبر`; case `invalid_element`: return `مقدار نامعتبر در ${e.origin}`; default: return `ورودی نامعتبر`; } }; }; function ca$6() { return { localeError: sa$6() }; } const la$6 = () => { let e = { string: { unit: `merkkiä`, subject: `merkkijonon` }, file: { unit: `tavua`, subject: `tiedoston` }, array: { unit: `alkiota`, subject: `listan` }, set: { unit: `alkiota`, subject: `joukon` }, number: { unit: ``, subject: `luvun` }, bigint: { unit: ``, subject: `suuren kokonaisluvun` }, int: { unit: ``, subject: `kokonaisluvun` }, date: { unit: ``, subject: `päivämäärän` } }; function t(t) { return e[t] ?? null; } let n = { regex: `säännöllinen lauseke`, email: `sähköpostiosoite`, url: `URL-osoite`, emoji: `emoji`, uuid: `UUID`, uuidv4: `UUIDv4`, uuidv6: `UUIDv6`, nanoid: `nanoid`, guid: `GUID`, cuid: `cuid`, cuid2: `cuid2`, ulid: `ULID`, xid: `XID`, ksuid: `KSUID`, datetime: `ISO-aikaleima`, date: `ISO-päivämäärä`, time: `ISO-aika`, duration: `ISO-kesto`, ipv4: `IPv4-osoite`, ipv6: `IPv6-osoite`, cidrv4: `IPv4-alue`, cidrv6: `IPv6-alue`, base64: `base64-koodattu merkkijono`, base64url: `base64url-koodattu merkkijono`, json_string: `JSON-merkkijono`, e164: `E.164-luku`, jwt: `JWT`, template_literal: `templaattimerkkijono` }, r = { nan: `NaN` }; return (e) => { switch (e.code) { case `invalid_type`: { let t = r[e.expected] ?? e.expected, n = A$12(e.input), i = r[n] ?? n; return /^[A-Z]/.test(e.expected) ? `Virheellinen tyyppi: odotettiin instanceof ${e.expected}, oli ${i}` : `Virheellinen tyyppi: odotettiin ${t}, oli ${i}`; } case `invalid_value`: return e.values.length === 1 ? `Virheellinen syöte: täytyy olla ${T$14(e.values[0])}` : `Virheellinen valinta: täytyy olla yksi seuraavista: ${m$10(e.values, `|`)}`; case `too_big`: { let n = e.inclusive ? `<=` : `<`, r = t(e.origin); return r ? `Liian suuri: ${r.subject} täytyy olla ${n}${e.maximum.toString()} ${r.unit}`.trim() : `Liian suuri: arvon täytyy olla ${n}${e.maximum.toString()}`; } case `too_small`: { let n = e.inclusive ? `>=` : `>`, r = t(e.origin); return r ? `Liian pieni: ${r.subject} täytyy olla ${n}${e.minimum.toString()} ${r.unit}`.trim() : `Liian pieni: arvon täytyy olla ${n}${e.minimum.toString()}`; } case `invalid_format`: { let t = e; return t.format === `starts_with` ? `Virheellinen syöte: täytyy alkaa "${t.prefix}"` : t.format === `ends_with` ? `Virheellinen syöte: täytyy loppua "${t.suffix}"` : t.format === `includes` ? `Virheellinen syöte: täytyy sisältää "${t.includes}"` : t.format === `regex` ? `Virheellinen syöte: täytyy vastata säännöllistä lauseketta ${t.pattern}` : `Virheellinen ${n[t.format] ?? e.format}`; } case `not_multiple_of`: return `Virheellinen luku: täytyy olla luvun ${e.divisor} monikerta`; case `unrecognized_keys`: return `${e.keys.length > 1 ? `Tuntemattomat avaimet` : `Tuntematon avain`}: ${m$10(e.keys, `, `)}`; case `invalid_key`: return `Virheellinen avain tietueessa`; case `invalid_union`: return `Virheellinen unioni`; case `invalid_element`: return `Virheellinen arvo joukossa`; default: return `Virheellinen syöte`; } }; }; function ua$6() { return { localeError: la$6() }; } const da$6 = () => { let e = { string: { unit: `caractères`, verb: `avoir` }, file: { unit: `octets`, verb: `avoir` }, array: { unit: `éléments`, verb: `avoir` }, set: { unit: `éléments`, verb: `avoir` } }; function t(t) { return e[t] ?? null; } let n = { regex: `entrée`, email: `adresse e-mail`, url: `URL`, emoji: `emoji`, uuid: `UUID`, uuidv4: `UUIDv4`, uuidv6: `UUIDv6`, nanoid: `nanoid`, guid: `GUID`, cuid: `cuid`, cuid2: `cuid2`, ulid: `ULID`, xid: `XID`, ksuid: `KSUID`, datetime: `date et heure ISO`, date: `date ISO`, time: `heure ISO`, duration: `durée ISO`, ipv4: `adresse IPv4`, ipv6: `adresse IPv6`, cidrv4: `plage IPv4`, cidrv6: `plage IPv6`, base64: `chaîne encodée en base64`, base64url: `chaîne encodée en base64url`, json_string: `chaîne JSON`, e164: `numéro E.164`, jwt: `JWT`, template_literal: `entrée` }, r = { string: `chaîne`, number: `nombre`, int: `entier`, boolean: `booléen`, bigint: `grand entier`, symbol: `symbole`, undefined: `indéfini`, null: `null`, never: `jamais`, void: `vide`, date: `date`, array: `tableau`, object: `objet`, tuple: `tuple`, record: `enregistrement`, map: `carte`, set: `ensemble`, file: `fichier`, nonoptional: `non-optionnel`, nan: `NaN`, function: `fonction` }; return (e) => { switch (e.code) { case `invalid_type`: { let t = r[e.expected] ?? e.expected, n = A$12(e.input), i = r[n] ?? n; return /^[A-Z]/.test(e.expected) ? `Entrée invalide : instanceof ${e.expected} attendu, ${i} reçu` : `Entrée invalide : ${t} attendu, ${i} reçu`; } case `invalid_value`: return e.values.length === 1 ? `Entrée invalide : ${T$14(e.values[0])} attendu` : `Option invalide : une valeur parmi ${m$10(e.values, `|`)} attendue`; case `too_big`: { let n = e.inclusive ? `<=` : `<`, i = t(e.origin); return i ? `Trop grand : ${r[e.origin] ?? `valeur`} doit ${i.verb} ${n}${e.maximum.toString()} ${i.unit ?? `élément(s)`}` : `Trop grand : ${r[e.origin] ?? `valeur`} doit être ${n}${e.maximum.toString()}`; } case `too_small`: { let n = e.inclusive ? `>=` : `>`, i = t(e.origin); return i ? `Trop petit : ${r[e.origin] ?? `valeur`} doit ${i.verb} ${n}${e.minimum.toString()} ${i.unit}` : `Trop petit : ${r[e.origin] ?? `valeur`} doit être ${n}${e.minimum.toString()}`; } case `invalid_format`: { let t = e; return t.format === `starts_with` ? `Chaîne invalide : doit commencer par "${t.prefix}"` : t.format === `ends_with` ? `Chaîne invalide : doit se terminer par "${t.suffix}"` : t.format === `includes` ? `Chaîne invalide : doit inclure "${t.includes}"` : t.format === `regex` ? `Chaîne invalide : doit correspondre au modèle ${t.pattern}` : `${n[t.format] ?? e.format} invalide`; } case `not_multiple_of`: return `Nombre invalide : doit être un multiple de ${e.divisor}`; case `unrecognized_keys`: return `Clé${e.keys.length > 1 ? `s` : ``} non reconnue${e.keys.length > 1 ? `s` : ``} : ${m$10(e.keys, `, `)}`; case `invalid_key`: return `Clé invalide dans ${e.origin}`; case `invalid_union`: return `Entrée invalide`; case `invalid_element`: return `Valeur invalide dans ${e.origin}`; default: return `Entrée invalide`; } }; }; function fa$6() { return { localeError: da$6() }; } const pa$6 = () => { let e = { string: { unit: `caractères`, verb: `avoir` }, file: { unit: `octets`, verb: `avoir` }, array: { unit: `éléments`, verb: `avoir` }, set: { unit: `éléments`, verb: `avoir` } }; function t(t) { return e[t] ?? null; } let n = { regex: `entrée`, email: `adresse courriel`, url: `URL`, emoji: `emoji`, uuid: `UUID`, uuidv4: `UUIDv4`, uuidv6: `UUIDv6`, nanoid: `nanoid`, guid: `GUID`, cuid: `cuid`, cuid2: `cuid2`, ulid: `ULID`, xid: `XID`, ksuid: `KSUID`, datetime: `date-heure ISO`, date: `date ISO`, time: `heure ISO`, duration: `durée ISO`, ipv4: `adresse IPv4`, ipv6: `adresse IPv6`, cidrv4: `plage IPv4`, cidrv6: `plage IPv6`, base64: `chaîne encodée en base64`, base64url: `chaîne encodée en base64url`, json_string: `chaîne JSON`, e164: `numéro E.164`, jwt: `JWT`, template_literal: `entrée` }, r = { nan: `NaN` }; return (e) => { switch (e.code) { case `invalid_type`: { let t = r[e.expected] ?? e.expected, n = A$12(e.input), i = r[n] ?? n; return /^[A-Z]/.test(e.expected) ? `Entrée invalide : attendu instanceof ${e.expected}, reçu ${i}` : `Entrée invalide : attendu ${t}, reçu ${i}`; } case `invalid_value`: return e.values.length === 1 ? `Entrée invalide : attendu ${T$14(e.values[0])}` : `Option invalide : attendu l'une des valeurs suivantes ${m$10(e.values, `|`)}`; case `too_big`: { let n = e.inclusive ? `≤` : `<`, r = t(e.origin); return r ? `Trop grand : attendu que ${e.origin ?? `la valeur`} ait ${n}${e.maximum.toString()} ${r.unit}` : `Trop grand : attendu que ${e.origin ?? `la valeur`} soit ${n}${e.maximum.toString()}`; } case `too_small`: { let n = e.inclusive ? `≥` : `>`, r = t(e.origin); return r ? `Trop petit : attendu que ${e.origin} ait ${n}${e.minimum.toString()} ${r.unit}` : `Trop petit : attendu que ${e.origin} soit ${n}${e.minimum.toString()}`; } case `invalid_format`: { let t = e; return t.format === `starts_with` ? `Chaîne invalide : doit commencer par "${t.prefix}"` : t.format === `ends_with` ? `Chaîne invalide : doit se terminer par "${t.suffix}"` : t.format === `includes` ? `Chaîne invalide : doit inclure "${t.includes}"` : t.format === `regex` ? `Chaîne invalide : doit correspondre au motif ${t.pattern}` : `${n[t.format] ?? e.format} invalide`; } case `not_multiple_of`: return `Nombre invalide : doit être un multiple de ${e.divisor}`; case `unrecognized_keys`: return `Clé${e.keys.length > 1 ? `s` : ``} non reconnue${e.keys.length > 1 ? `s` : ``} : ${m$10(e.keys, `, `)}`; case `invalid_key`: return `Clé invalide dans ${e.origin}`; case `invalid_union`: return `Entrée invalide`; case `invalid_element`: return `Valeur invalide dans ${e.origin}`; default: return `Entrée invalide`; } }; }; function ma$6() { return { localeError: pa$6() }; } const ha$6 = () => { let e = { string: { label: `מחרוזת`, gender: `f` }, number: { label: `מספר`, gender: `m` }, boolean: { label: `ערך בוליאני`, gender: `m` }, bigint: { label: `BigInt`, gender: `m` }, date: { label: `תאריך`, gender: `m` }, array: { label: `מערך`, gender: `m` }, object: { label: `אובייקט`, gender: `m` }, null: { label: `ערך ריק (null)`, gender: `m` }, undefined: { label: `ערך לא מוגדר (undefined)`, gender: `m` }, symbol: { label: `סימבול (Symbol)`, gender: `m` }, function: { label: `פונקציה`, gender: `f` }, map: { label: `מפה (Map)`, gender: `f` }, set: { label: `קבוצה (Set)`, gender: `f` }, file: { label: `קובץ`, gender: `m` }, promise: { label: `Promise`, gender: `m` }, NaN: { label: `NaN`, gender: `m` }, unknown: { label: `ערך לא ידוע`, gender: `m` }, value: { label: `ערך`, gender: `m` } }, t = { string: { unit: `תווים`, shortLabel: `קצר`, longLabel: `ארוך` }, file: { unit: `בייטים`, shortLabel: `קטן`, longLabel: `גדול` }, array: { unit: `פריטים`, shortLabel: `קטן`, longLabel: `גדול` }, set: { unit: `פריטים`, shortLabel: `קטן`, longLabel: `גדול` }, number: { unit: ``, shortLabel: `קטן`, longLabel: `גדול` } }, n = (t) => t ? e[t] : void 0, r = (t) => { let r = n(t); return r ? r.label : t ?? e.unknown.label; }, i = (e) => `ה${r(e)}`, a = (e) => (n(e)?.gender ?? `m`) === `f` ? `צריכה להיות` : `צריך להיות`, o = (e) => e ? t[e] ?? null : null, s = { regex: { label: `קלט`, gender: `m` }, email: { label: `כתובת אימייל`, gender: `f` }, url: { label: `כתובת רשת`, gender: `f` }, emoji: { label: `אימוג'י`, gender: `m` }, uuid: { label: `UUID`, gender: `m` }, nanoid: { label: `nanoid`, gender: `m` }, guid: { label: `GUID`, gender: `m` }, cuid: { label: `cuid`, gender: `m` }, cuid2: { label: `cuid2`, gender: `m` }, ulid: { label: `ULID`, gender: `m` }, xid: { label: `XID`, gender: `m` }, ksuid: { label: `KSUID`, gender: `m` }, datetime: { label: `תאריך וזמן ISO`, gender: `m` }, date: { label: `תאריך ISO`, gender: `m` }, time: { label: `זמן ISO`, gender: `m` }, duration: { label: `משך זמן ISO`, gender: `m` }, ipv4: { label: `כתובת IPv4`, gender: `f` }, ipv6: { label: `כתובת IPv6`, gender: `f` }, cidrv4: { label: `טווח IPv4`, gender: `m` }, cidrv6: { label: `טווח IPv6`, gender: `m` }, base64: { label: `מחרוזת בבסיס 64`, gender: `f` }, base64url: { label: `מחרוזת בבסיס 64 לכתובות רשת`, gender: `f` }, json_string: { label: `מחרוזת JSON`, gender: `f` }, e164: { label: `מספר E.164`, gender: `m` }, jwt: { label: `JWT`, gender: `m` }, ends_with: { label: `קלט`, gender: `m` }, includes: { label: `קלט`, gender: `m` }, lowercase: { label: `קלט`, gender: `m` }, starts_with: { label: `קלט`, gender: `m` }, uppercase: { label: `קלט`, gender: `m` } }, c = { nan: `NaN` }; return (t) => { switch (t.code) { case `invalid_type`: { let n = t.expected, i = c[n ?? ``] ?? r(n), a = A$12(t.input), o = c[a] ?? e[a]?.label ?? a; return /^[A-Z]/.test(t.expected) ? `קלט לא תקין: צריך להיות instanceof ${t.expected}, התקבל ${o}` : `קלט לא תקין: צריך להיות ${i}, התקבל ${o}`; } case `invalid_value`: { if (t.values.length === 1) return `ערך לא תקין: הערך חייב להיות ${T$14(t.values[0])}`; let e = t.values.map((e) => T$14(e)); if (t.values.length === 2) return `ערך לא תקין: האפשרויות המתאימות הן ${e[0]} או ${e[1]}`; let n = e[e.length - 1]; return `ערך לא תקין: האפשרויות המתאימות הן ${e.slice(0, -1).join(`, `)} או ${n}`; } case `too_big`: { let e = o(t.origin), n = i(t.origin ?? `value`); if (t.origin === `string`) return `${e?.longLabel ?? `ארוך`} מדי: ${n} צריכה להכיל ${t.maximum.toString()} ${e?.unit ?? ``} ${t.inclusive ? `או פחות` : `לכל היותר`}`.trim(); if (t.origin === `number`) return `גדול מדי: ${n} צריך להיות ${t.inclusive ? `קטן או שווה ל-${t.maximum}` : `קטן מ-${t.maximum}`}`; if (t.origin === `array` || t.origin === `set`) return `גדול מדי: ${n} ${t.origin === `set` ? `צריכה` : `צריך`} להכיל ${t.inclusive ? `${t.maximum} ${e?.unit ?? ``} או פחות` : `פחות מ-${t.maximum} ${e?.unit ?? ``}`}`.trim(); let r = t.inclusive ? `<=` : `<`, s = a(t.origin ?? `value`); return e?.unit ? `${e.longLabel} מדי: ${n} ${s} ${r}${t.maximum.toString()} ${e.unit}` : `${e?.longLabel ?? `גדול`} מדי: ${n} ${s} ${r}${t.maximum.toString()}`; } case `too_small`: { let e = o(t.origin), n = i(t.origin ?? `value`); if (t.origin === `string`) return `${e?.shortLabel ?? `קצר`} מדי: ${n} צריכה להכיל ${t.minimum.toString()} ${e?.unit ?? ``} ${t.inclusive ? `או יותר` : `לפחות`}`.trim(); if (t.origin === `number`) return `קטן מדי: ${n} צריך להיות ${t.inclusive ? `גדול או שווה ל-${t.minimum}` : `גדול מ-${t.minimum}`}`; if (t.origin === `array` || t.origin === `set`) { let r = t.origin === `set` ? `צריכה` : `צריך`; return t.minimum === 1 && t.inclusive ? `קטן מדי: ${n} ${r} להכיל ${t.origin, `לפחות פריט אחד`}` : `קטן מדי: ${n} ${r} להכיל ${t.inclusive ? `${t.minimum} ${e?.unit ?? ``} או יותר` : `יותר מ-${t.minimum} ${e?.unit ?? ``}`}`.trim(); } let r = t.inclusive ? `>=` : `>`, s = a(t.origin ?? `value`); return e?.unit ? `${e.shortLabel} מדי: ${n} ${s} ${r}${t.minimum.toString()} ${e.unit}` : `${e?.shortLabel ?? `קטן`} מדי: ${n} ${s} ${r}${t.minimum.toString()}`; } case `invalid_format`: { let e = t; if (e.format === `starts_with`) return `המחרוזת חייבת להתחיל ב "${e.prefix}"`; if (e.format === `ends_with`) return `המחרוזת חייבת להסתיים ב "${e.suffix}"`; if (e.format === `includes`) return `המחרוזת חייבת לכלול "${e.includes}"`; if (e.format === `regex`) return `המחרוזת חייבת להתאים לתבנית ${e.pattern}`; let n = s[e.format]; return `${n?.label ?? e.format} לא ${(n?.gender ?? `m`) === `f` ? `תקינה` : `תקין`}`; } case `not_multiple_of`: return `מספר לא תקין: חייב להיות מכפלה של ${t.divisor}`; case `unrecognized_keys`: return `מפתח${t.keys.length > 1 ? `ות` : ``} לא מזוה${t.keys.length > 1 ? `ים` : `ה`}: ${m$10(t.keys, `, `)}`; case `invalid_key`: return `שדה לא תקין באובייקט`; case `invalid_union`: return `קלט לא תקין`; case `invalid_element`: return `ערך לא תקין ב${i(t.origin ?? `array`)}`; default: return `קלט לא תקין`; } }; }; function ga$6() { return { localeError: ha$6() }; } const _a$6 = () => { let e = { string: { unit: `znakova`, verb: `imati` }, file: { unit: `bajtova`, verb: `imati` }, array: { unit: `stavki`, verb: `imati` }, set: { unit: `stavki`, verb: `imati` } }; function t(t) { return e[t] ?? null; } let n = { regex: `unos`, email: `email adresa`, url: `URL`, emoji: `emoji`, uuid: `UUID`, uuidv4: `UUIDv4`, uuidv6: `UUIDv6`, nanoid: `nanoid`, guid: `GUID`, cuid: `cuid`, cuid2: `cuid2`, ulid: `ULID`, xid: `XID`, ksuid: `KSUID`, datetime: `ISO datum i vrijeme`, date: `ISO datum`, time: `ISO vrijeme`, duration: `ISO trajanje`, ipv4: `IPv4 adresa`, ipv6: `IPv6 adresa`, cidrv4: `IPv4 raspon`, cidrv6: `IPv6 raspon`, base64: `base64 kodirani tekst`, base64url: `base64url kodirani tekst`, json_string: `JSON tekst`, e164: `E.164 broj`, jwt: `JWT`, template_literal: `unos` }, r = { nan: `NaN`, string: `tekst`, number: `broj`, boolean: `boolean`, array: `niz`, object: `objekt`, set: `skup`, file: `datoteka`, date: `datum`, bigint: `bigint`, symbol: `simbol`, undefined: `undefined`, null: `null`, function: `funkcija`, map: `mapa` }; return (e) => { switch (e.code) { case `invalid_type`: { let t = r[e.expected] ?? e.expected, n = A$12(e.input), i = r[n] ?? n; return /^[A-Z]/.test(e.expected) ? `Neispravan unos: očekuje se instanceof ${e.expected}, a primljeno je ${i}` : `Neispravan unos: očekuje se ${t}, a primljeno je ${i}`; } case `invalid_value`: return e.values.length === 1 ? `Neispravna vrijednost: očekivano ${T$14(e.values[0])}` : `Neispravna opcija: očekivano jedno od ${m$10(e.values, `|`)}`; case `too_big`: { let n = e.inclusive ? `<=` : `<`, i = t(e.origin), a = r[e.origin] ?? e.origin; return i ? `Preveliko: očekivano da ${a ?? `vrijednost`} ima ${n}${e.maximum.toString()} ${i.unit ?? `elemenata`}` : `Preveliko: očekivano da ${a ?? `vrijednost`} bude ${n}${e.maximum.toString()}`; } case `too_small`: { let n = e.inclusive ? `>=` : `>`, i = t(e.origin), a = r[e.origin] ?? e.origin; return i ? `Premalo: očekivano da ${a} ima ${n}${e.minimum.toString()} ${i.unit}` : `Premalo: očekivano da ${a} bude ${n}${e.minimum.toString()}`; } case `invalid_format`: { let t = e; return t.format === `starts_with` ? `Neispravan tekst: mora započinjati s "${t.prefix}"` : t.format === `ends_with` ? `Neispravan tekst: mora završavati s "${t.suffix}"` : t.format === `includes` ? `Neispravan tekst: mora sadržavati "${t.includes}"` : t.format === `regex` ? `Neispravan tekst: mora odgovarati uzorku ${t.pattern}` : `Neispravna ${n[t.format] ?? e.format}`; } case `not_multiple_of`: return `Neispravan broj: mora biti višekratnik od ${e.divisor}`; case `unrecognized_keys`: return `Neprepoznat${e.keys.length > 1 ? `i ključevi` : ` ključ`}: ${m$10(e.keys, `, `)}`; case `invalid_key`: return `Neispravan ključ u ${r[e.origin] ?? e.origin}`; case `invalid_union`: return `Neispravan unos`; case `invalid_element`: return `Neispravna vrijednost u ${r[e.origin] ?? e.origin}`; default: return `Neispravan unos`; } }; }; function va$6() { return { localeError: _a$6() }; } const ya$6 = () => { let e = { string: { unit: `karakter`, verb: `legyen` }, file: { unit: `byte`, verb: `legyen` }, array: { unit: `elem`, verb: `legyen` }, set: { unit: `elem`, verb: `legyen` } }; function t(t) { return e[t] ?? null; } let n = { regex: `bemenet`, email: `email cím`, url: `URL`, emoji: `emoji`, uuid: `UUID`, uuidv4: `UUIDv4`, uuidv6: `UUIDv6`, nanoid: `nanoid`, guid: `GUID`, cuid: `cuid`, cuid2: `cuid2`, ulid: `ULID`, xid: `XID`, ksuid: `KSUID`, datetime: `ISO időbélyeg`, date: `ISO dátum`, time: `ISO idő`, duration: `ISO időintervallum`, ipv4: `IPv4 cím`, ipv6: `IPv6 cím`, cidrv4: `IPv4 tartomány`, cidrv6: `IPv6 tartomány`, base64: `base64-kódolt string`, base64url: `base64url-kódolt string`, json_string: `JSON string`, e164: `E.164 szám`, jwt: `JWT`, template_literal: `bemenet` }, r = { nan: `NaN`, number: `szám`, array: `tömb` }; return (e) => { switch (e.code) { case `invalid_type`: { let t = r[e.expected] ?? e.expected, n = A$12(e.input), i = r[n] ?? n; return /^[A-Z]/.test(e.expected) ? `Érvénytelen bemenet: a várt érték instanceof ${e.expected}, a kapott érték ${i}` : `Érvénytelen bemenet: a várt érték ${t}, a kapott érték ${i}`; } case `invalid_value`: return e.values.length === 1 ? `Érvénytelen bemenet: a várt érték ${T$14(e.values[0])}` : `Érvénytelen opció: valamelyik érték várt ${m$10(e.values, `|`)}`; case `too_big`: { let n = e.inclusive ? `<=` : `<`, r = t(e.origin); return r ? `Túl nagy: ${e.origin ?? `érték`} mérete túl nagy ${n}${e.maximum.toString()} ${r.unit ?? `elem`}` : `Túl nagy: a bemeneti érték ${e.origin ?? `érték`} túl nagy: ${n}${e.maximum.toString()}`; } case `too_small`: { let n = e.inclusive ? `>=` : `>`, r = t(e.origin); return r ? `Túl kicsi: a bemeneti érték ${e.origin} mérete túl kicsi ${n}${e.minimum.toString()} ${r.unit}` : `Túl kicsi: a bemeneti érték ${e.origin} túl kicsi ${n}${e.minimum.toString()}`; } case `invalid_format`: { let t = e; return t.format === `starts_with` ? `Érvénytelen string: "${t.prefix}" értékkel kell kezdődnie` : t.format === `ends_with` ? `Érvénytelen string: "${t.suffix}" értékkel kell végződnie` : t.format === `includes` ? `Érvénytelen string: "${t.includes}" értéket kell tartalmaznia` : t.format === `regex` ? `Érvénytelen string: ${t.pattern} mintának kell megfelelnie` : `Érvénytelen ${n[t.format] ?? e.format}`; } case `not_multiple_of`: return `Érvénytelen szám: ${e.divisor} többszörösének kell lennie`; case `unrecognized_keys`: return `Ismeretlen kulcs${e.keys.length > 1 ? `s` : ``}: ${m$10(e.keys, `, `)}`; case `invalid_key`: return `Érvénytelen kulcs ${e.origin}`; case `invalid_union`: return `Érvénytelen bemenet`; case `invalid_element`: return `Érvénytelen érték: ${e.origin}`; default: return `Érvénytelen bemenet`; } }; }; function ba$6() { return { localeError: ya$6() }; } function xa$6(e, t, n) { return Math.abs(e) === 1 ? t : n; } function W$9(e) { if (!e) return ``; let t = [ `ա`, `ե`, `ը`, `ի`, `ո`, `ու`, `օ` ], n = e[e.length - 1]; return e + (t.includes(n) ? `ն` : `ը`); } const Sa$6 = () => { let e = { string: { unit: { one: `նշան`, many: `նշաններ` }, verb: `ունենալ` }, file: { unit: { one: `բայթ`, many: `բայթեր` }, verb: `ունենալ` }, array: { unit: { one: `տարր`, many: `տարրեր` }, verb: `ունենալ` }, set: { unit: { one: `տարր`, many: `տարրեր` }, verb: `ունենալ` } }; function t(t) { return e[t] ?? null; } let n = { regex: `մուտք`, email: `էլ. հասցե`, url: `URL`, emoji: `էմոջի`, uuid: `UUID`, uuidv4: `UUIDv4`, uuidv6: `UUIDv6`, nanoid: `nanoid`, guid: `GUID`, cuid: `cuid`, cuid2: `cuid2`, ulid: `ULID`, xid: `XID`, ksuid: `KSUID`, datetime: `ISO ամսաթիվ և ժամ`, date: `ISO ամսաթիվ`, time: `ISO ժամ`, duration: `ISO տևողություն`, ipv4: `IPv4 հասցե`, ipv6: `IPv6 հասցե`, cidrv4: `IPv4 միջակայք`, cidrv6: `IPv6 միջակայք`, base64: `base64 ձևաչափով տող`, base64url: `base64url ձևաչափով տող`, json_string: `JSON տող`, e164: `E.164 համար`, jwt: `JWT`, template_literal: `մուտք` }, r = { nan: `NaN`, number: `թիվ`, array: `զանգված` }; return (e) => { switch (e.code) { case `invalid_type`: { let t = r[e.expected] ?? e.expected, n = A$12(e.input), i = r[n] ?? n; return /^[A-Z]/.test(e.expected) ? `Սխալ մուտքագրում․ սպասվում էր instanceof ${e.expected}, ստացվել է ${i}` : `Սխալ մուտքագրում․ սպասվում էր ${t}, ստացվել է ${i}`; } case `invalid_value`: return e.values.length === 1 ? `Սխալ մուտքագրում․ սպասվում էր ${T$14(e.values[1])}` : `Սխալ տարբերակ․ սպասվում էր հետևյալներից մեկը՝ ${m$10(e.values, `|`)}`; case `too_big`: { let n = e.inclusive ? `<=` : `<`, r = t(e.origin); if (r) { let t = xa$6(Number(e.maximum), r.unit.one, r.unit.many); return `Չափազանց մեծ արժեք․ սպասվում է, որ ${W$9(e.origin ?? `արժեք`)} կունենա ${n}${e.maximum.toString()} ${t}`; } return `Չափազանց մեծ արժեք․ սպասվում է, որ ${W$9(e.origin ?? `արժեք`)} լինի ${n}${e.maximum.toString()}`; } case `too_small`: { let n = e.inclusive ? `>=` : `>`, r = t(e.origin); if (r) { let t = xa$6(Number(e.minimum), r.unit.one, r.unit.many); return `Չափազանց փոքր արժեք․ սպասվում է, որ ${W$9(e.origin)} կունենա ${n}${e.minimum.toString()} ${t}`; } return `Չափազանց փոքր արժեք․ սպասվում է, որ ${W$9(e.origin)} լինի ${n}${e.minimum.toString()}`; } case `invalid_format`: { let t = e; return t.format === `starts_with` ? `Սխալ տող․ պետք է սկսվի "${t.prefix}"-ով` : t.format === `ends_with` ? `Սխալ տող․ պետք է ավարտվի "${t.suffix}"-ով` : t.format === `includes` ? `Սխալ տող․ պետք է պարունակի "${t.includes}"` : t.format === `regex` ? `Սխալ տող․ պետք է համապատասխանի ${t.pattern} ձևաչափին` : `Սխալ ${n[t.format] ?? e.format}`; } case `not_multiple_of`: return `Սխալ թիվ․ պետք է բազմապատիկ լինի ${e.divisor}-ի`; case `unrecognized_keys`: return `Չճանաչված բանալի${e.keys.length > 1 ? `ներ` : ``}. ${m$10(e.keys, `, `)}`; case `invalid_key`: return `Սխալ բանալի ${W$9(e.origin)}-ում`; case `invalid_union`: return `Սխալ մուտքագրում`; case `invalid_element`: return `Սխալ արժեք ${W$9(e.origin)}-ում`; default: return `Սխալ մուտքագրում`; } }; }; function Ca$6() { return { localeError: Sa$6() }; } const wa$6 = () => { let e = { string: { unit: `karakter`, verb: `memiliki` }, file: { unit: `byte`, verb: `memiliki` }, array: { unit: `item`, verb: `memiliki` }, set: { unit: `item`, verb: `memiliki` } }; function t(t) { return e[t] ?? null; } let n = { regex: `input`, email: `alamat email`, url: `URL`, emoji: `emoji`, uuid: `UUID`, uuidv4: `UUIDv4`, uuidv6: `UUIDv6`, nanoid: `nanoid`, guid: `GUID`, cuid: `cuid`, cuid2: `cuid2`, ulid: `ULID`, xid: `XID`, ksuid: `KSUID`, datetime: `tanggal dan waktu format ISO`, date: `tanggal format ISO`, time: `jam format ISO`, duration: `durasi format ISO`, ipv4: `alamat IPv4`, ipv6: `alamat IPv6`, cidrv4: `rentang alamat IPv4`, cidrv6: `rentang alamat IPv6`, base64: `string dengan enkode base64`, base64url: `string dengan enkode base64url`, json_string: `string JSON`, e164: `angka E.164`, jwt: `JWT`, template_literal: `input` }, r = { nan: `NaN` }; return (e) => { switch (e.code) { case `invalid_type`: { let t = r[e.expected] ?? e.expected, n = A$12(e.input), i = r[n] ?? n; return /^[A-Z]/.test(e.expected) ? `Input tidak valid: diharapkan instanceof ${e.expected}, diterima ${i}` : `Input tidak valid: diharapkan ${t}, diterima ${i}`; } case `invalid_value`: return e.values.length === 1 ? `Input tidak valid: diharapkan ${T$14(e.values[0])}` : `Pilihan tidak valid: diharapkan salah satu dari ${m$10(e.values, `|`)}`; case `too_big`: { let n = e.inclusive ? `<=` : `<`, r = t(e.origin); return r ? `Terlalu besar: diharapkan ${e.origin ?? `value`} memiliki ${n}${e.maximum.toString()} ${r.unit ?? `elemen`}` : `Terlalu besar: diharapkan ${e.origin ?? `value`} menjadi ${n}${e.maximum.toString()}`; } case `too_small`: { let n = e.inclusive ? `>=` : `>`, r = t(e.origin); return r ? `Terlalu kecil: diharapkan ${e.origin} memiliki ${n}${e.minimum.toString()} ${r.unit}` : `Terlalu kecil: diharapkan ${e.origin} menjadi ${n}${e.minimum.toString()}`; } case `invalid_format`: { let t = e; return t.format === `starts_with` ? `String tidak valid: harus dimulai dengan "${t.prefix}"` : t.format === `ends_with` ? `String tidak valid: harus berakhir dengan "${t.suffix}"` : t.format === `includes` ? `String tidak valid: harus menyertakan "${t.includes}"` : t.format === `regex` ? `String tidak valid: harus sesuai pola ${t.pattern}` : `${n[t.format] ?? e.format} tidak valid`; } case `not_multiple_of`: return `Angka tidak valid: harus kelipatan dari ${e.divisor}`; case `unrecognized_keys`: return `Kunci tidak dikenali ${e.keys.length > 1 ? `s` : ``}: ${m$10(e.keys, `, `)}`; case `invalid_key`: return `Kunci tidak valid di ${e.origin}`; case `invalid_union`: return `Input tidak valid`; case `invalid_element`: return `Nilai tidak valid di ${e.origin}`; default: return `Input tidak valid`; } }; }; function Ta$6() { return { localeError: wa$6() }; } const Ea$6 = () => { let e = { string: { unit: `stafi`, verb: `að hafa` }, file: { unit: `bæti`, verb: `að hafa` }, array: { unit: `hluti`, verb: `að hafa` }, set: { unit: `hluti`, verb: `að hafa` } }; function t(t) { return e[t] ?? null; } let n = { regex: `gildi`, email: `netfang`, url: `vefslóð`, emoji: `emoji`, uuid: `UUID`, uuidv4: `UUIDv4`, uuidv6: `UUIDv6`, nanoid: `nanoid`, guid: `GUID`, cuid: `cuid`, cuid2: `cuid2`, ulid: `ULID`, xid: `XID`, ksuid: `KSUID`, datetime: `ISO dagsetning og tími`, date: `ISO dagsetning`, time: `ISO tími`, duration: `ISO tímalengd`, ipv4: `IPv4 address`, ipv6: `IPv6 address`, cidrv4: `IPv4 range`, cidrv6: `IPv6 range`, base64: `base64-encoded strengur`, base64url: `base64url-encoded strengur`, json_string: `JSON strengur`, e164: `E.164 tölugildi`, jwt: `JWT`, template_literal: `gildi` }, r = { nan: `NaN`, number: `númer`, array: `fylki` }; return (e) => { switch (e.code) { case `invalid_type`: { let t = r[e.expected] ?? e.expected, n = A$12(e.input), i = r[n] ?? n; return /^[A-Z]/.test(e.expected) ? `Rangt gildi: Þú slóst inn ${i} þar sem á að vera instanceof ${e.expected}` : `Rangt gildi: Þú slóst inn ${i} þar sem á að vera ${t}`; } case `invalid_value`: return e.values.length === 1 ? `Rangt gildi: gert ráð fyrir ${T$14(e.values[0])}` : `Ógilt val: má vera eitt af eftirfarandi ${m$10(e.values, `|`)}`; case `too_big`: { let n = e.inclusive ? `<=` : `<`, r = t(e.origin); return r ? `Of stórt: gert er ráð fyrir að ${e.origin ?? `gildi`} hafi ${n}${e.maximum.toString()} ${r.unit ?? `hluti`}` : `Of stórt: gert er ráð fyrir að ${e.origin ?? `gildi`} sé ${n}${e.maximum.toString()}`; } case `too_small`: { let n = e.inclusive ? `>=` : `>`, r = t(e.origin); return r ? `Of lítið: gert er ráð fyrir að ${e.origin} hafi ${n}${e.minimum.toString()} ${r.unit}` : `Of lítið: gert er ráð fyrir að ${e.origin} sé ${n}${e.minimum.toString()}`; } case `invalid_format`: { let t = e; return t.format === `starts_with` ? `Ógildur strengur: verður að byrja á "${t.prefix}"` : t.format === `ends_with` ? `Ógildur strengur: verður að enda á "${t.suffix}"` : t.format === `includes` ? `Ógildur strengur: verður að innihalda "${t.includes}"` : t.format === `regex` ? `Ógildur strengur: verður að fylgja mynstri ${t.pattern}` : `Rangt ${n[t.format] ?? e.format}`; } case `not_multiple_of`: return `Röng tala: verður að vera margfeldi af ${e.divisor}`; case `unrecognized_keys`: return `Óþekkt ${e.keys.length > 1 ? `ir lyklar` : `ur lykill`}: ${m$10(e.keys, `, `)}`; case `invalid_key`: return `Rangur lykill í ${e.origin}`; case `invalid_union`: return `Rangt gildi`; case `invalid_element`: return `Rangt gildi í ${e.origin}`; default: return `Rangt gildi`; } }; }; function Da$6() { return { localeError: Ea$6() }; } const Oa$6 = () => { let e = { string: { unit: `caratteri`, verb: `avere` }, file: { unit: `byte`, verb: `avere` }, array: { unit: `elementi`, verb: `avere` }, set: { unit: `elementi`, verb: `avere` } }; function t(t) { return e[t] ?? null; } let n = { regex: `input`, email: `indirizzo email`, url: `URL`, emoji: `emoji`, uuid: `UUID`, uuidv4: `UUIDv4`, uuidv6: `UUIDv6`, nanoid: `nanoid`, guid: `GUID`, cuid: `cuid`, cuid2: `cuid2`, ulid: `ULID`, xid: `XID`, ksuid: `KSUID`, datetime: `data e ora ISO`, date: `data ISO`, time: `ora ISO`, duration: `durata ISO`, ipv4: `indirizzo IPv4`, ipv6: `indirizzo IPv6`, cidrv4: `intervallo IPv4`, cidrv6: `intervallo IPv6`, base64: `stringa codificata in base64`, base64url: `URL codificata in base64`, json_string: `stringa JSON`, e164: `numero E.164`, jwt: `JWT`, template_literal: `input` }, r = { nan: `NaN`, number: `numero`, array: `vettore` }; return (e) => { switch (e.code) { case `invalid_type`: { let t = r[e.expected] ?? e.expected, n = A$12(e.input), i = r[n] ?? n; return /^[A-Z]/.test(e.expected) ? `Input non valido: atteso instanceof ${e.expected}, ricevuto ${i}` : `Input non valido: atteso ${t}, ricevuto ${i}`; } case `invalid_value`: return e.values.length === 1 ? `Input non valido: atteso ${T$14(e.values[0])}` : `Opzione non valida: atteso uno tra ${m$10(e.values, `|`)}`; case `too_big`: { let n = e.inclusive ? `<=` : `<`, r = t(e.origin); return r ? `Troppo grande: ${e.origin ?? `valore`} deve avere ${n}${e.maximum.toString()} ${r.unit ?? `elementi`}` : `Troppo grande: ${e.origin ?? `valore`} deve essere ${n}${e.maximum.toString()}`; } case `too_small`: { let n = e.inclusive ? `>=` : `>`, r = t(e.origin); return r ? `Troppo piccolo: ${e.origin} deve avere ${n}${e.minimum.toString()} ${r.unit}` : `Troppo piccolo: ${e.origin} deve essere ${n}${e.minimum.toString()}`; } case `invalid_format`: { let t = e; return t.format === `starts_with` ? `Stringa non valida: deve iniziare con "${t.prefix}"` : t.format === `ends_with` ? `Stringa non valida: deve terminare con "${t.suffix}"` : t.format === `includes` ? `Stringa non valida: deve includere "${t.includes}"` : t.format === `regex` ? `Stringa non valida: deve corrispondere al pattern ${t.pattern}` : `Input non valido: ${n[t.format] ?? e.format}`; } case `not_multiple_of`: return `Numero non valido: deve essere un multiplo di ${e.divisor}`; case `unrecognized_keys`: return `Chiav${e.keys.length > 1 ? `i` : `e`} non riconosciut${e.keys.length > 1 ? `e` : `a`}: ${m$10(e.keys, `, `)}`; case `invalid_key`: return `Chiave non valida in ${e.origin}`; case `invalid_union`: return `Input non valido`; case `invalid_element`: return `Valore non valido in ${e.origin}`; default: return `Input non valido`; } }; }; function ka$6() { return { localeError: Oa$6() }; } const Aa$6 = () => { let e = { string: { unit: `文字`, verb: `である` }, file: { unit: `バイト`, verb: `である` }, array: { unit: `要素`, verb: `である` }, set: { unit: `要素`, verb: `である` } }; function t(t) { return e[t] ?? null; } let n = { regex: `入力値`, email: `メールアドレス`, url: `URL`, emoji: `絵文字`, uuid: `UUID`, uuidv4: `UUIDv4`, uuidv6: `UUIDv6`, nanoid: `nanoid`, guid: `GUID`, cuid: `cuid`, cuid2: `cuid2`, ulid: `ULID`, xid: `XID`, ksuid: `KSUID`, datetime: `ISO日時`, date: `ISO日付`, time: `ISO時刻`, duration: `ISO期間`, ipv4: `IPv4アドレス`, ipv6: `IPv6アドレス`, cidrv4: `IPv4範囲`, cidrv6: `IPv6範囲`, base64: `base64エンコード文字列`, base64url: `base64urlエンコード文字列`, json_string: `JSON文字列`, e164: `E.164番号`, jwt: `JWT`, template_literal: `入力値` }, r = { nan: `NaN`, number: `数値`, array: `配列` }; return (e) => { switch (e.code) { case `invalid_type`: { let t = r[e.expected] ?? e.expected, n = A$12(e.input), i = r[n] ?? n; return /^[A-Z]/.test(e.expected) ? `無効な入力: instanceof ${e.expected}が期待されましたが、${i}が入力されました` : `無効な入力: ${t}が期待されましたが、${i}が入力されました`; } case `invalid_value`: return e.values.length === 1 ? `無効な入力: ${T$14(e.values[0])}が期待されました` : `無効な選択: ${m$10(e.values, `、`)}のいずれかである必要があります`; case `too_big`: { let n = e.inclusive ? `以下である` : `より小さい`, r = t(e.origin); return r ? `大きすぎる値: ${e.origin ?? `値`}は${e.maximum.toString()}${r.unit ?? `要素`}${n}必要があります` : `大きすぎる値: ${e.origin ?? `値`}は${e.maximum.toString()}${n}必要があります`; } case `too_small`: { let n = e.inclusive ? `以上である` : `より大きい`, r = t(e.origin); return r ? `小さすぎる値: ${e.origin}は${e.minimum.toString()}${r.unit}${n}必要があります` : `小さすぎる値: ${e.origin}は${e.minimum.toString()}${n}必要があります`; } case `invalid_format`: { let t = e; return t.format === `starts_with` ? `無効な文字列: "${t.prefix}"で始まる必要があります` : t.format === `ends_with` ? `無効な文字列: "${t.suffix}"で終わる必要があります` : t.format === `includes` ? `無効な文字列: "${t.includes}"を含む必要があります` : t.format === `regex` ? `無効な文字列: パターン${t.pattern}に一致する必要があります` : `無効な${n[t.format] ?? e.format}`; } case `not_multiple_of`: return `無効な数値: ${e.divisor}の倍数である必要があります`; case `unrecognized_keys`: return `認識されていないキー${e.keys.length > 1 ? `群` : ``}: ${m$10(e.keys, `、`)}`; case `invalid_key`: return `${e.origin}内の無効なキー`; case `invalid_union`: return `無効な入力`; case `invalid_element`: return `${e.origin}内の無効な値`; default: return `無効な入力`; } }; }; function ja$6() { return { localeError: Aa$6() }; } const Ma$6 = () => { let e = { string: { unit: `სიმბოლო`, verb: `უნდა შეიცავდეს` }, file: { unit: `ბაიტი`, verb: `უნდა შეიცავდეს` }, array: { unit: `ელემენტი`, verb: `უნდა შეიცავდეს` }, set: { unit: `ელემენტი`, verb: `უნდა შეიცავდეს` } }; function t(t) { return e[t] ?? null; } let n = { regex: `შეყვანა`, email: `ელ-ფოსტის მისამართი`, url: `URL`, emoji: `ემოჯი`, uuid: `UUID`, uuidv4: `UUIDv4`, uuidv6: `UUIDv6`, nanoid: `nanoid`, guid: `GUID`, cuid: `cuid`, cuid2: `cuid2`, ulid: `ULID`, xid: `XID`, ksuid: `KSUID`, datetime: `თარიღი-დრო`, date: `თარიღი`, time: `დრო`, duration: `ხანგრძლივობა`, ipv4: `IPv4 მისამართი`, ipv6: `IPv6 მისამართი`, cidrv4: `IPv4 დიაპაზონი`, cidrv6: `IPv6 დიაპაზონი`, base64: `base64-კოდირებული ველი`, base64url: `base64url-კოდირებული ველი`, json_string: `JSON ველი`, e164: `E.164 ნომერი`, jwt: `JWT`, template_literal: `შეყვანა` }, r = { nan: `NaN`, number: `რიცხვი`, string: `ველი`, boolean: `ბულეანი`, function: `ფუნქცია`, array: `მასივი` }; return (e) => { switch (e.code) { case `invalid_type`: { let t = r[e.expected] ?? e.expected, n = A$12(e.input), i = r[n] ?? n; return /^[A-Z]/.test(e.expected) ? `არასწორი შეყვანა: მოსალოდნელი instanceof ${e.expected}, მიღებული ${i}` : `არასწორი შეყვანა: მოსალოდნელი ${t}, მიღებული ${i}`; } case `invalid_value`: return e.values.length === 1 ? `არასწორი შეყვანა: მოსალოდნელი ${T$14(e.values[0])}` : `არასწორი ვარიანტი: მოსალოდნელია ერთ-ერთი ${m$10(e.values, `|`)}-დან`; case `too_big`: { let n = e.inclusive ? `<=` : `<`, r = t(e.origin); return r ? `ზედმეტად დიდი: მოსალოდნელი ${e.origin ?? `მნიშვნელობა`} ${r.verb} ${n}${e.maximum.toString()} ${r.unit}` : `ზედმეტად დიდი: მოსალოდნელი ${e.origin ?? `მნიშვნელობა`} იყოს ${n}${e.maximum.toString()}`; } case `too_small`: { let n = e.inclusive ? `>=` : `>`, r = t(e.origin); return r ? `ზედმეტად პატარა: მოსალოდნელი ${e.origin} ${r.verb} ${n}${e.minimum.toString()} ${r.unit}` : `ზედმეტად პატარა: მოსალოდნელი ${e.origin} იყოს ${n}${e.minimum.toString()}`; } case `invalid_format`: { let t = e; return t.format === `starts_with` ? `არასწორი ველი: უნდა იწყებოდეს "${t.prefix}"-ით` : t.format === `ends_with` ? `არასწორი ველი: უნდა მთავრდებოდეს "${t.suffix}"-ით` : t.format === `includes` ? `არასწორი ველი: უნდა შეიცავდეს "${t.includes}"-ს` : t.format === `regex` ? `არასწორი ველი: უნდა შეესაბამებოდეს შაბლონს ${t.pattern}` : `არასწორი ${n[t.format] ?? e.format}`; } case `not_multiple_of`: return `არასწორი რიცხვი: უნდა იყოს ${e.divisor}-ის ჯერადი`; case `unrecognized_keys`: return `უცნობი გასაღებ${e.keys.length > 1 ? `ები` : `ი`}: ${m$10(e.keys, `, `)}`; case `invalid_key`: return `არასწორი გასაღები ${e.origin}-ში`; case `invalid_union`: return `არასწორი შეყვანა`; case `invalid_element`: return `არასწორი მნიშვნელობა ${e.origin}-ში`; default: return `არასწორი შეყვანა`; } }; }; function Na$6() { return { localeError: Ma$6() }; } const Pa$6 = () => { let e = { string: { unit: `តួអក្សរ`, verb: `គួរមាន` }, file: { unit: `បៃ`, verb: `គួរមាន` }, array: { unit: `ធាតុ`, verb: `គួរមាន` }, set: { unit: `ធាតុ`, verb: `គួរមាន` } }; function t(t) { return e[t] ?? null; } let n = { regex: `ទិន្នន័យបញ្ចូល`, email: `អាសយដ្ឋានអ៊ីមែល`, url: `URL`, emoji: `សញ្ញាអារម្មណ៍`, uuid: `UUID`, uuidv4: `UUIDv4`, uuidv6: `UUIDv6`, nanoid: `nanoid`, guid: `GUID`, cuid: `cuid`, cuid2: `cuid2`, ulid: `ULID`, xid: `XID`, ksuid: `KSUID`, datetime: `កាលបរិច្ឆេទ និងម៉ោង ISO`, date: `កាលបរិច្ឆេទ ISO`, time: `ម៉ោង ISO`, duration: `រយៈពេល ISO`, ipv4: `អាសយដ្ឋាន IPv4`, ipv6: `អាសយដ្ឋាន IPv6`, cidrv4: `ដែនអាសយដ្ឋាន IPv4`, cidrv6: `ដែនអាសយដ្ឋាន IPv6`, base64: `ខ្សែអក្សរអ៊ិកូដ base64`, base64url: `ខ្សែអក្សរអ៊ិកូដ base64url`, json_string: `ខ្សែអក្សរ JSON`, e164: `លេខ E.164`, jwt: `JWT`, template_literal: `ទិន្នន័យបញ្ចូល` }, r = { nan: `NaN`, number: `លេខ`, array: `អារេ (Array)`, null: `គ្មានតម្លៃ (null)` }; return (e) => { switch (e.code) { case `invalid_type`: { let t = r[e.expected] ?? e.expected, n = A$12(e.input), i = r[n] ?? n; return /^[A-Z]/.test(e.expected) ? `ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ instanceof ${e.expected} ប៉ុន្តែទទួលបាន ${i}` : `ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${t} ប៉ុន្តែទទួលបាន ${i}`; } case `invalid_value`: return e.values.length === 1 ? `ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${T$14(e.values[0])}` : `ជម្រើសមិនត្រឹមត្រូវ៖ ត្រូវជាមួយក្នុងចំណោម ${m$10(e.values, `|`)}`; case `too_big`: { let n = e.inclusive ? `<=` : `<`, r = t(e.origin); return r ? `ធំពេក៖ ត្រូវការ ${e.origin ?? `តម្លៃ`} ${n} ${e.maximum.toString()} ${r.unit ?? `ធាតុ`}` : `ធំពេក៖ ត្រូវការ ${e.origin ?? `តម្លៃ`} ${n} ${e.maximum.toString()}`; } case `too_small`: { let n = e.inclusive ? `>=` : `>`, r = t(e.origin); return r ? `តូចពេក៖ ត្រូវការ ${e.origin} ${n} ${e.minimum.toString()} ${r.unit}` : `តូចពេក៖ ត្រូវការ ${e.origin} ${n} ${e.minimum.toString()}`; } case `invalid_format`: { let t = e; return t.format === `starts_with` ? `ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវចាប់ផ្តើមដោយ "${t.prefix}"` : t.format === `ends_with` ? `ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវបញ្ចប់ដោយ "${t.suffix}"` : t.format === `includes` ? `ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវមាន "${t.includes}"` : t.format === `regex` ? `ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវតែផ្គូផ្គងនឹងទម្រង់ដែលបានកំណត់ ${t.pattern}` : `មិនត្រឹមត្រូវ៖ ${n[t.format] ?? e.format}`; } case `not_multiple_of`: return `លេខមិនត្រឹមត្រូវ៖ ត្រូវតែជាពហុគុណនៃ ${e.divisor}`; case `unrecognized_keys`: return `រកឃើញសោមិនស្គាល់៖ ${m$10(e.keys, `, `)}`; case `invalid_key`: return `សោមិនត្រឹមត្រូវនៅក្នុង ${e.origin}`; case `invalid_union`: return `ទិន្នន័យមិនត្រឹមត្រូវ`; case `invalid_element`: return `ទិន្នន័យមិនត្រឹមត្រូវនៅក្នុង ${e.origin}`; default: return `ទិន្នន័យមិនត្រឹមត្រូវ`; } }; }; function Fa$6() { return { localeError: Pa$6() }; } function Ia$6() { return Fa$6(); } const La$6 = () => { let e = { string: { unit: `문자`, verb: `to have` }, file: { unit: `바이트`, verb: `to have` }, array: { unit: `개`, verb: `to have` }, set: { unit: `개`, verb: `to have` } }; function t(t) { return e[t] ?? null; } let n = { regex: `입력`, email: `이메일 주소`, url: `URL`, emoji: `이모지`, uuid: `UUID`, uuidv4: `UUIDv4`, uuidv6: `UUIDv6`, nanoid: `nanoid`, guid: `GUID`, cuid: `cuid`, cuid2: `cuid2`, ulid: `ULID`, xid: `XID`, ksuid: `KSUID`, datetime: `ISO 날짜시간`, date: `ISO 날짜`, time: `ISO 시간`, duration: `ISO 기간`, ipv4: `IPv4 주소`, ipv6: `IPv6 주소`, cidrv4: `IPv4 범위`, cidrv6: `IPv6 범위`, base64: `base64 인코딩 문자열`, base64url: `base64url 인코딩 문자열`, json_string: `JSON 문자열`, e164: `E.164 번호`, jwt: `JWT`, template_literal: `입력` }, r = { nan: `NaN` }; return (e) => { switch (e.code) { case `invalid_type`: { let t = r[e.expected] ?? e.expected, n = A$12(e.input), i = r[n] ?? n; return /^[A-Z]/.test(e.expected) ? `잘못된 입력: 예상 타입은 instanceof ${e.expected}, 받은 타입은 ${i}입니다` : `잘못된 입력: 예상 타입은 ${t}, 받은 타입은 ${i}입니다`; } case `invalid_value`: return e.values.length === 1 ? `잘못된 입력: 값은 ${T$14(e.values[0])} 이어야 합니다` : `잘못된 옵션: ${m$10(e.values, `또는 `)} 중 하나여야 합니다`; case `too_big`: { let n = e.inclusive ? `이하` : `미만`, r = n === `미만` ? `이어야 합니다` : `여야 합니다`, i = t(e.origin), a = i?.unit ?? `요소`; return i ? `${e.origin ?? `값`}이 너무 큽니다: ${e.maximum.toString()}${a} ${n}${r}` : `${e.origin ?? `값`}이 너무 큽니다: ${e.maximum.toString()} ${n}${r}`; } case `too_small`: { let n = e.inclusive ? `이상` : `초과`, r = n === `이상` ? `이어야 합니다` : `여야 합니다`, i = t(e.origin), a = i?.unit ?? `요소`; return i ? `${e.origin ?? `값`}이 너무 작습니다: ${e.minimum.toString()}${a} ${n}${r}` : `${e.origin ?? `값`}이 너무 작습니다: ${e.minimum.toString()} ${n}${r}`; } case `invalid_format`: { let t = e; return t.format === `starts_with` ? `잘못된 문자열: "${t.prefix}"(으)로 시작해야 합니다` : t.format === `ends_with` ? `잘못된 문자열: "${t.suffix}"(으)로 끝나야 합니다` : t.format === `includes` ? `잘못된 문자열: "${t.includes}"을(를) 포함해야 합니다` : t.format === `regex` ? `잘못된 문자열: 정규식 ${t.pattern} 패턴과 일치해야 합니다` : `잘못된 ${n[t.format] ?? e.format}`; } case `not_multiple_of`: return `잘못된 숫자: ${e.divisor}의 배수여야 합니다`; case `unrecognized_keys`: return `인식할 수 없는 키: ${m$10(e.keys, `, `)}`; case `invalid_key`: return `잘못된 키: ${e.origin}`; case `invalid_union`: return `잘못된 입력`; case `invalid_element`: return `잘못된 값: ${e.origin}`; default: return `잘못된 입력`; } }; }; function Ra$6() { return { localeError: La$6() }; } const G$9 = (e) => e.charAt(0).toUpperCase() + e.slice(1); function za$6(e) { let t = Math.abs(e), n = t % 10, r = t % 100; return r >= 11 && r <= 19 || n === 0 ? `many` : n === 1 ? `one` : `few`; } const Ba$6 = () => { let e = { string: { unit: { one: `simbolis`, few: `simboliai`, many: `simbolių` }, verb: { smaller: { inclusive: `turi būti ne ilgesnė kaip`, notInclusive: `turi būti trumpesnė kaip` }, bigger: { inclusive: `turi būti ne trumpesnė kaip`, notInclusive: `turi būti ilgesnė kaip` } } }, file: { unit: { one: `baitas`, few: `baitai`, many: `baitų` }, verb: { smaller: { inclusive: `turi būti ne didesnis kaip`, notInclusive: `turi būti mažesnis kaip` }, bigger: { inclusive: `turi būti ne mažesnis kaip`, notInclusive: `turi būti didesnis kaip` } } }, array: { unit: { one: `elementą`, few: `elementus`, many: `elementų` }, verb: { smaller: { inclusive: `turi turėti ne daugiau kaip`, notInclusive: `turi turėti mažiau kaip` }, bigger: { inclusive: `turi turėti ne mažiau kaip`, notInclusive: `turi turėti daugiau kaip` } } }, set: { unit: { one: `elementą`, few: `elementus`, many: `elementų` }, verb: { smaller: { inclusive: `turi turėti ne daugiau kaip`, notInclusive: `turi turėti mažiau kaip` }, bigger: { inclusive: `turi turėti ne mažiau kaip`, notInclusive: `turi turėti daugiau kaip` } } } }; function t(t, n, r, i) { let a = e[t] ?? null; return a === null ? a : { unit: a.unit[n], verb: a.verb[i][r ? `inclusive` : `notInclusive`] }; } let n = { regex: `įvestis`, email: `el. pašto adresas`, url: `URL`, emoji: `jaustukas`, uuid: `UUID`, uuidv4: `UUIDv4`, uuidv6: `UUIDv6`, nanoid: `nanoid`, guid: `GUID`, cuid: `cuid`, cuid2: `cuid2`, ulid: `ULID`, xid: `XID`, ksuid: `KSUID`, datetime: `ISO data ir laikas`, date: `ISO data`, time: `ISO laikas`, duration: `ISO trukmė`, ipv4: `IPv4 adresas`, ipv6: `IPv6 adresas`, cidrv4: `IPv4 tinklo prefiksas (CIDR)`, cidrv6: `IPv6 tinklo prefiksas (CIDR)`, base64: `base64 užkoduota eilutė`, base64url: `base64url užkoduota eilutė`, json_string: `JSON eilutė`, e164: `E.164 numeris`, jwt: `JWT`, template_literal: `įvestis` }, r = { nan: `NaN`, number: `skaičius`, bigint: `sveikasis skaičius`, string: `eilutė`, boolean: `loginė reikšmė`, undefined: `neapibrėžta reikšmė`, function: `funkcija`, symbol: `simbolis`, array: `masyvas`, object: `objektas`, null: `nulinė reikšmė` }; return (e) => { switch (e.code) { case `invalid_type`: { let t = r[e.expected] ?? e.expected, n = A$12(e.input), i = r[n] ?? n; return /^[A-Z]/.test(e.expected) ? `Gautas tipas ${i}, o tikėtasi - instanceof ${e.expected}` : `Gautas tipas ${i}, o tikėtasi - ${t}`; } case `invalid_value`: return e.values.length === 1 ? `Privalo būti ${T$14(e.values[0])}` : `Privalo būti vienas iš ${m$10(e.values, `|`)} pasirinkimų`; case `too_big`: { let n = r[e.origin] ?? e.origin, i = t(e.origin, za$6(Number(e.maximum)), e.inclusive ?? !1, `smaller`); if (i?.verb) return `${G$9(n ?? e.origin ?? `reikšmė`)} ${i.verb} ${e.maximum.toString()} ${i.unit ?? `elementų`}`; let a = e.inclusive ? `ne didesnis kaip` : `mažesnis kaip`; return `${G$9(n ?? e.origin ?? `reikšmė`)} turi būti ${a} ${e.maximum.toString()} ${i?.unit}`; } case `too_small`: { let n = r[e.origin] ?? e.origin, i = t(e.origin, za$6(Number(e.minimum)), e.inclusive ?? !1, `bigger`); if (i?.verb) return `${G$9(n ?? e.origin ?? `reikšmė`)} ${i.verb} ${e.minimum.toString()} ${i.unit ?? `elementų`}`; let a = e.inclusive ? `ne mažesnis kaip` : `didesnis kaip`; return `${G$9(n ?? e.origin ?? `reikšmė`)} turi būti ${a} ${e.minimum.toString()} ${i?.unit}`; } case `invalid_format`: { let t = e; return t.format === `starts_with` ? `Eilutė privalo prasidėti "${t.prefix}"` : t.format === `ends_with` ? `Eilutė privalo pasibaigti "${t.suffix}"` : t.format === `includes` ? `Eilutė privalo įtraukti "${t.includes}"` : t.format === `regex` ? `Eilutė privalo atitikti ${t.pattern}` : `Neteisingas ${n[t.format] ?? e.format}`; } case `not_multiple_of`: return `Skaičius privalo būti ${e.divisor} kartotinis.`; case `unrecognized_keys`: return `Neatpažint${e.keys.length > 1 ? `i` : `as`} rakt${e.keys.length > 1 ? `ai` : `as`}: ${m$10(e.keys, `, `)}`; case `invalid_key`: return `Rastas klaidingas raktas`; case `invalid_union`: return `Klaidinga įvestis`; case `invalid_element`: return `${G$9(r[e.origin] ?? e.origin ?? e.origin ?? `reikšmė`)} turi klaidingą įvestį`; default: return `Klaidinga įvestis`; } }; }; function Va$6() { return { localeError: Ba$6() }; } const Ha$6 = () => { let e = { string: { unit: `знаци`, verb: `да имаат` }, file: { unit: `бајти`, verb: `да имаат` }, array: { unit: `ставки`, verb: `да имаат` }, set: { unit: `ставки`, verb: `да имаат` } }; function t(t) { return e[t] ?? null; } let n = { regex: `внес`, email: `адреса на е-пошта`, url: `URL`, emoji: `емоџи`, uuid: `UUID`, uuidv4: `UUIDv4`, uuidv6: `UUIDv6`, nanoid: `nanoid`, guid: `GUID`, cuid: `cuid`, cuid2: `cuid2`, ulid: `ULID`, xid: `XID`, ksuid: `KSUID`, datetime: `ISO датум и време`, date: `ISO датум`, time: `ISO време`, duration: `ISO времетраење`, ipv4: `IPv4 адреса`, ipv6: `IPv6 адреса`, cidrv4: `IPv4 опсег`, cidrv6: `IPv6 опсег`, base64: `base64-енкодирана низа`, base64url: `base64url-енкодирана низа`, json_string: `JSON низа`, e164: `E.164 број`, jwt: `JWT`, template_literal: `внес` }, r = { nan: `NaN`, number: `број`, array: `низа` }; return (e) => { switch (e.code) { case `invalid_type`: { let t = r[e.expected] ?? e.expected, n = A$12(e.input), i = r[n] ?? n; return /^[A-Z]/.test(e.expected) ? `Грешен внес: се очекува instanceof ${e.expected}, примено ${i}` : `Грешен внес: се очекува ${t}, примено ${i}`; } case `invalid_value`: return e.values.length === 1 ? `Invalid input: expected ${T$14(e.values[0])}` : `Грешана опција: се очекува една ${m$10(e.values, `|`)}`; case `too_big`: { let n = e.inclusive ? `<=` : `<`, r = t(e.origin); return r ? `Премногу голем: се очекува ${e.origin ?? `вредноста`} да има ${n}${e.maximum.toString()} ${r.unit ?? `елементи`}` : `Премногу голем: се очекува ${e.origin ?? `вредноста`} да биде ${n}${e.maximum.toString()}`; } case `too_small`: { let n = e.inclusive ? `>=` : `>`, r = t(e.origin); return r ? `Премногу мал: се очекува ${e.origin} да има ${n}${e.minimum.toString()} ${r.unit}` : `Премногу мал: се очекува ${e.origin} да биде ${n}${e.minimum.toString()}`; } case `invalid_format`: { let t = e; return t.format === `starts_with` ? `Неважечка низа: мора да започнува со "${t.prefix}"` : t.format === `ends_with` ? `Неважечка низа: мора да завршува со "${t.suffix}"` : t.format === `includes` ? `Неважечка низа: мора да вклучува "${t.includes}"` : t.format === `regex` ? `Неважечка низа: мора да одгоара на патернот ${t.pattern}` : `Invalid ${n[t.format] ?? e.format}`; } case `not_multiple_of`: return `Грешен број: мора да биде делив со ${e.divisor}`; case `unrecognized_keys`: return `${e.keys.length > 1 ? `Непрепознаени клучеви` : `Непрепознаен клуч`}: ${m$10(e.keys, `, `)}`; case `invalid_key`: return `Грешен клуч во ${e.origin}`; case `invalid_union`: return `Грешен внес`; case `invalid_element`: return `Грешна вредност во ${e.origin}`; default: return `Грешен внес`; } }; }; function Ua$6() { return { localeError: Ha$6() }; } const Wa$6 = () => { let e = { string: { unit: `aksara`, verb: `mempunyai` }, file: { unit: `bait`, verb: `mempunyai` }, array: { unit: `elemen`, verb: `mempunyai` }, set: { unit: `elemen`, verb: `mempunyai` } }; function t(t) { return e[t] ?? null; } let n = { regex: `input`, email: `alamat e-mel`, url: `URL`, emoji: `emoji`, uuid: `UUID`, uuidv4: `UUIDv4`, uuidv6: `UUIDv6`, nanoid: `nanoid`, guid: `GUID`, cuid: `cuid`, cuid2: `cuid2`, ulid: `ULID`, xid: `XID`, ksuid: `KSUID`, datetime: `tarikh masa ISO`, date: `tarikh ISO`, time: `masa ISO`, duration: `tempoh ISO`, ipv4: `alamat IPv4`, ipv6: `alamat IPv6`, cidrv4: `julat IPv4`, cidrv6: `julat IPv6`, base64: `string dikodkan base64`, base64url: `string dikodkan base64url`, json_string: `string JSON`, e164: `nombor E.164`, jwt: `JWT`, template_literal: `input` }, r = { nan: `NaN`, number: `nombor` }; return (e) => { switch (e.code) { case `invalid_type`: { let t = r[e.expected] ?? e.expected, n = A$12(e.input), i = r[n] ?? n; return /^[A-Z]/.test(e.expected) ? `Input tidak sah: dijangka instanceof ${e.expected}, diterima ${i}` : `Input tidak sah: dijangka ${t}, diterima ${i}`; } case `invalid_value`: return e.values.length === 1 ? `Input tidak sah: dijangka ${T$14(e.values[0])}` : `Pilihan tidak sah: dijangka salah satu daripada ${m$10(e.values, `|`)}`; case `too_big`: { let n = e.inclusive ? `<=` : `<`, r = t(e.origin); return r ? `Terlalu besar: dijangka ${e.origin ?? `nilai`} ${r.verb} ${n}${e.maximum.toString()} ${r.unit ?? `elemen`}` : `Terlalu besar: dijangka ${e.origin ?? `nilai`} adalah ${n}${e.maximum.toString()}`; } case `too_small`: { let n = e.inclusive ? `>=` : `>`, r = t(e.origin); return r ? `Terlalu kecil: dijangka ${e.origin} ${r.verb} ${n}${e.minimum.toString()} ${r.unit}` : `Terlalu kecil: dijangka ${e.origin} adalah ${n}${e.minimum.toString()}`; } case `invalid_format`: { let t = e; return t.format === `starts_with` ? `String tidak sah: mesti bermula dengan "${t.prefix}"` : t.format === `ends_with` ? `String tidak sah: mesti berakhir dengan "${t.suffix}"` : t.format === `includes` ? `String tidak sah: mesti mengandungi "${t.includes}"` : t.format === `regex` ? `String tidak sah: mesti sepadan dengan corak ${t.pattern}` : `${n[t.format] ?? e.format} tidak sah`; } case `not_multiple_of`: return `Nombor tidak sah: perlu gandaan ${e.divisor}`; case `unrecognized_keys`: return `Kunci tidak dikenali: ${m$10(e.keys, `, `)}`; case `invalid_key`: return `Kunci tidak sah dalam ${e.origin}`; case `invalid_union`: return `Input tidak sah`; case `invalid_element`: return `Nilai tidak sah dalam ${e.origin}`; default: return `Input tidak sah`; } }; }; function Ga$6() { return { localeError: Wa$6() }; } const Ka$6 = () => { let e = { string: { unit: `tekens`, verb: `heeft` }, file: { unit: `bytes`, verb: `heeft` }, array: { unit: `elementen`, verb: `heeft` }, set: { unit: `elementen`, verb: `heeft` } }; function t(t) { return e[t] ?? null; } let n = { regex: `invoer`, email: `emailadres`, url: `URL`, emoji: `emoji`, uuid: `UUID`, uuidv4: `UUIDv4`, uuidv6: `UUIDv6`, nanoid: `nanoid`, guid: `GUID`, cuid: `cuid`, cuid2: `cuid2`, ulid: `ULID`, xid: `XID`, ksuid: `KSUID`, datetime: `ISO datum en tijd`, date: `ISO datum`, time: `ISO tijd`, duration: `ISO duur`, ipv4: `IPv4-adres`, ipv6: `IPv6-adres`, cidrv4: `IPv4-bereik`, cidrv6: `IPv6-bereik`, base64: `base64-gecodeerde tekst`, base64url: `base64 URL-gecodeerde tekst`, json_string: `JSON string`, e164: `E.164-nummer`, jwt: `JWT`, template_literal: `invoer` }, r = { nan: `NaN`, number: `getal` }; return (e) => { switch (e.code) { case `invalid_type`: { let t = r[e.expected] ?? e.expected, n = A$12(e.input), i = r[n] ?? n; return /^[A-Z]/.test(e.expected) ? `Ongeldige invoer: verwacht instanceof ${e.expected}, ontving ${i}` : `Ongeldige invoer: verwacht ${t}, ontving ${i}`; } case `invalid_value`: return e.values.length === 1 ? `Ongeldige invoer: verwacht ${T$14(e.values[0])}` : `Ongeldige optie: verwacht één van ${m$10(e.values, `|`)}`; case `too_big`: { let n = e.inclusive ? `<=` : `<`, r = t(e.origin), i = e.origin === `date` ? `laat` : e.origin === `string` ? `lang` : `groot`; return r ? `Te ${i}: verwacht dat ${e.origin ?? `waarde`} ${n}${e.maximum.toString()} ${r.unit ?? `elementen`} ${r.verb}` : `Te ${i}: verwacht dat ${e.origin ?? `waarde`} ${n}${e.maximum.toString()} is`; } case `too_small`: { let n = e.inclusive ? `>=` : `>`, r = t(e.origin), i = e.origin === `date` ? `vroeg` : e.origin === `string` ? `kort` : `klein`; return r ? `Te ${i}: verwacht dat ${e.origin} ${n}${e.minimum.toString()} ${r.unit} ${r.verb}` : `Te ${i}: verwacht dat ${e.origin} ${n}${e.minimum.toString()} is`; } case `invalid_format`: { let t = e; return t.format === `starts_with` ? `Ongeldige tekst: moet met "${t.prefix}" beginnen` : t.format === `ends_with` ? `Ongeldige tekst: moet op "${t.suffix}" eindigen` : t.format === `includes` ? `Ongeldige tekst: moet "${t.includes}" bevatten` : t.format === `regex` ? `Ongeldige tekst: moet overeenkomen met patroon ${t.pattern}` : `Ongeldig: ${n[t.format] ?? e.format}`; } case `not_multiple_of`: return `Ongeldig getal: moet een veelvoud van ${e.divisor} zijn`; case `unrecognized_keys`: return `Onbekende key${e.keys.length > 1 ? `s` : ``}: ${m$10(e.keys, `, `)}`; case `invalid_key`: return `Ongeldige key in ${e.origin}`; case `invalid_union`: return `Ongeldige invoer`; case `invalid_element`: return `Ongeldige waarde in ${e.origin}`; default: return `Ongeldige invoer`; } }; }; function qa$6() { return { localeError: Ka$6() }; } const Ja$5 = () => { let e = { string: { unit: `tegn`, verb: `å ha` }, file: { unit: `bytes`, verb: `å ha` }, array: { unit: `elementer`, verb: `å inneholde` }, set: { unit: `elementer`, verb: `å inneholde` } }; function t(t) { return e[t] ?? null; } let n = { regex: `input`, email: `e-postadresse`, url: `URL`, emoji: `emoji`, uuid: `UUID`, uuidv4: `UUIDv4`, uuidv6: `UUIDv6`, nanoid: `nanoid`, guid: `GUID`, cuid: `cuid`, cuid2: `cuid2`, ulid: `ULID`, xid: `XID`, ksuid: `KSUID`, datetime: `ISO dato- og klokkeslett`, date: `ISO-dato`, time: `ISO-klokkeslett`, duration: `ISO-varighet`, ipv4: `IPv4-område`, ipv6: `IPv6-område`, cidrv4: `IPv4-spekter`, cidrv6: `IPv6-spekter`, base64: `base64-enkodet streng`, base64url: `base64url-enkodet streng`, json_string: `JSON-streng`, e164: `E.164-nummer`, jwt: `JWT`, template_literal: `input` }, r = { nan: `NaN`, number: `tall`, array: `liste` }; return (e) => { switch (e.code) { case `invalid_type`: { let t = r[e.expected] ?? e.expected, n = A$12(e.input), i = r[n] ?? n; return /^[A-Z]/.test(e.expected) ? `Ugyldig input: forventet instanceof ${e.expected}, fikk ${i}` : `Ugyldig input: forventet ${t}, fikk ${i}`; } case `invalid_value`: return e.values.length === 1 ? `Ugyldig verdi: forventet ${T$14(e.values[0])}` : `Ugyldig valg: forventet en av ${m$10(e.values, `|`)}`; case `too_big`: { let n = e.inclusive ? `<=` : `<`, r = t(e.origin); return r ? `For stor(t): forventet ${e.origin ?? `value`} til å ha ${n}${e.maximum.toString()} ${r.unit ?? `elementer`}` : `For stor(t): forventet ${e.origin ?? `value`} til å ha ${n}${e.maximum.toString()}`; } case `too_small`: { let n = e.inclusive ? `>=` : `>`, r = t(e.origin); return r ? `For lite(n): forventet ${e.origin} til å ha ${n}${e.minimum.toString()} ${r.unit}` : `For lite(n): forventet ${e.origin} til å ha ${n}${e.minimum.toString()}`; } case `invalid_format`: { let t = e; return t.format === `starts_with` ? `Ugyldig streng: må starte med "${t.prefix}"` : t.format === `ends_with` ? `Ugyldig streng: må ende med "${t.suffix}"` : t.format === `includes` ? `Ugyldig streng: må inneholde "${t.includes}"` : t.format === `regex` ? `Ugyldig streng: må matche mønsteret ${t.pattern}` : `Ugyldig ${n[t.format] ?? e.format}`; } case `not_multiple_of`: return `Ugyldig tall: må være et multiplum av ${e.divisor}`; case `unrecognized_keys`: return `${e.keys.length > 1 ? `Ukjente nøkler` : `Ukjent nøkkel`}: ${m$10(e.keys, `, `)}`; case `invalid_key`: return `Ugyldig nøkkel i ${e.origin}`; case `invalid_union`: return `Ugyldig input`; case `invalid_element`: return `Ugyldig verdi i ${e.origin}`; default: return `Ugyldig input`; } }; }; function Ya$5() { return { localeError: Ja$5() }; } const Xa$5 = () => { let e = { string: { unit: `harf`, verb: `olmalıdır` }, file: { unit: `bayt`, verb: `olmalıdır` }, array: { unit: `unsur`, verb: `olmalıdır` }, set: { unit: `unsur`, verb: `olmalıdır` } }; function t(t) { return e[t] ?? null; } let n = { regex: `giren`, email: `epostagâh`, url: `URL`, emoji: `emoji`, uuid: `UUID`, uuidv4: `UUIDv4`, uuidv6: `UUIDv6`, nanoid: `nanoid`, guid: `GUID`, cuid: `cuid`, cuid2: `cuid2`, ulid: `ULID`, xid: `XID`, ksuid: `KSUID`, datetime: `ISO hengâmı`, date: `ISO tarihi`, time: `ISO zamanı`, duration: `ISO müddeti`, ipv4: `IPv4 nişânı`, ipv6: `IPv6 nişânı`, cidrv4: `IPv4 menzili`, cidrv6: `IPv6 menzili`, base64: `base64-şifreli metin`, base64url: `base64url-şifreli metin`, json_string: `JSON metin`, e164: `E.164 sayısı`, jwt: `JWT`, template_literal: `giren` }, r = { nan: `NaN`, number: `numara`, array: `saf`, null: `gayb` }; return (e) => { switch (e.code) { case `invalid_type`: { let t = r[e.expected] ?? e.expected, n = A$12(e.input), i = r[n] ?? n; return /^[A-Z]/.test(e.expected) ? `Fâsit giren: umulan instanceof ${e.expected}, alınan ${i}` : `Fâsit giren: umulan ${t}, alınan ${i}`; } case `invalid_value`: return e.values.length === 1 ? `Fâsit giren: umulan ${T$14(e.values[0])}` : `Fâsit tercih: mûteberler ${m$10(e.values, `|`)}`; case `too_big`: { let n = e.inclusive ? `<=` : `<`, r = t(e.origin); return r ? `Fazla büyük: ${e.origin ?? `value`}, ${n}${e.maximum.toString()} ${r.unit ?? `elements`} sahip olmalıydı.` : `Fazla büyük: ${e.origin ?? `value`}, ${n}${e.maximum.toString()} olmalıydı.`; } case `too_small`: { let n = e.inclusive ? `>=` : `>`, r = t(e.origin); return r ? `Fazla küçük: ${e.origin}, ${n}${e.minimum.toString()} ${r.unit} sahip olmalıydı.` : `Fazla küçük: ${e.origin}, ${n}${e.minimum.toString()} olmalıydı.`; } case `invalid_format`: { let t = e; return t.format === `starts_with` ? `Fâsit metin: "${t.prefix}" ile başlamalı.` : t.format === `ends_with` ? `Fâsit metin: "${t.suffix}" ile bitmeli.` : t.format === `includes` ? `Fâsit metin: "${t.includes}" ihtivâ etmeli.` : t.format === `regex` ? `Fâsit metin: ${t.pattern} nakşına uymalı.` : `Fâsit ${n[t.format] ?? e.format}`; } case `not_multiple_of`: return `Fâsit sayı: ${e.divisor} katı olmalıydı.`; case `unrecognized_keys`: return `Tanınmayan anahtar ${e.keys.length > 1 ? `s` : ``}: ${m$10(e.keys, `, `)}`; case `invalid_key`: return `${e.origin} için tanınmayan anahtar var.`; case `invalid_union`: return `Giren tanınamadı.`; case `invalid_element`: return `${e.origin} için tanınmayan kıymet var.`; default: return `Kıymet tanınamadı.`; } }; }; function Za$5() { return { localeError: Xa$5() }; } const Qa$5 = () => { let e = { string: { unit: `توکي`, verb: `ولري` }, file: { unit: `بایټس`, verb: `ولري` }, array: { unit: `توکي`, verb: `ولري` }, set: { unit: `توکي`, verb: `ولري` } }; function t(t) { return e[t] ?? null; } let n = { regex: `ورودي`, email: `بریښنالیک`, url: `یو آر ال`, emoji: `ایموجي`, uuid: `UUID`, uuidv4: `UUIDv4`, uuidv6: `UUIDv6`, nanoid: `nanoid`, guid: `GUID`, cuid: `cuid`, cuid2: `cuid2`, ulid: `ULID`, xid: `XID`, ksuid: `KSUID`, datetime: `نیټه او وخت`, date: `نېټه`, time: `وخت`, duration: `موده`, ipv4: `د IPv4 پته`, ipv6: `د IPv6 پته`, cidrv4: `د IPv4 ساحه`, cidrv6: `د IPv6 ساحه`, base64: `base64-encoded متن`, base64url: `base64url-encoded متن`, json_string: `JSON متن`, e164: `د E.164 شمېره`, jwt: `JWT`, template_literal: `ورودي` }, r = { nan: `NaN`, number: `عدد`, array: `ارې` }; return (e) => { switch (e.code) { case `invalid_type`: { let t = r[e.expected] ?? e.expected, n = A$12(e.input), i = r[n] ?? n; return /^[A-Z]/.test(e.expected) ? `ناسم ورودي: باید instanceof ${e.expected} وای, مګر ${i} ترلاسه شو` : `ناسم ورودي: باید ${t} وای, مګر ${i} ترلاسه شو`; } case `invalid_value`: return e.values.length === 1 ? `ناسم ورودي: باید ${T$14(e.values[0])} وای` : `ناسم انتخاب: باید یو له ${m$10(e.values, `|`)} څخه وای`; case `too_big`: { let n = e.inclusive ? `<=` : `<`, r = t(e.origin); return r ? `ډیر لوی: ${e.origin ?? `ارزښت`} باید ${n}${e.maximum.toString()} ${r.unit ?? `عنصرونه`} ولري` : `ډیر لوی: ${e.origin ?? `ارزښت`} باید ${n}${e.maximum.toString()} وي`; } case `too_small`: { let n = e.inclusive ? `>=` : `>`, r = t(e.origin); return r ? `ډیر کوچنی: ${e.origin} باید ${n}${e.minimum.toString()} ${r.unit} ولري` : `ډیر کوچنی: ${e.origin} باید ${n}${e.minimum.toString()} وي`; } case `invalid_format`: { let t = e; return t.format === `starts_with` ? `ناسم متن: باید د "${t.prefix}" سره پیل شي` : t.format === `ends_with` ? `ناسم متن: باید د "${t.suffix}" سره پای ته ورسيږي` : t.format === `includes` ? `ناسم متن: باید "${t.includes}" ولري` : t.format === `regex` ? `ناسم متن: باید د ${t.pattern} سره مطابقت ولري` : `${n[t.format] ?? e.format} ناسم دی`; } case `not_multiple_of`: return `ناسم عدد: باید د ${e.divisor} مضرب وي`; case `unrecognized_keys`: return `ناسم ${e.keys.length > 1 ? `کلیډونه` : `کلیډ`}: ${m$10(e.keys, `, `)}`; case `invalid_key`: return `ناسم کلیډ په ${e.origin} کې`; case `invalid_union`: return `ناسمه ورودي`; case `invalid_element`: return `ناسم عنصر په ${e.origin} کې`; default: return `ناسمه ورودي`; } }; }; function $a$5() { return { localeError: Qa$5() }; } const eo$5 = () => { let e = { string: { unit: `znaków`, verb: `mieć` }, file: { unit: `bajtów`, verb: `mieć` }, array: { unit: `elementów`, verb: `mieć` }, set: { unit: `elementów`, verb: `mieć` } }; function t(t) { return e[t] ?? null; } let n = { regex: `wyrażenie`, email: `adres email`, url: `URL`, emoji: `emoji`, uuid: `UUID`, uuidv4: `UUIDv4`, uuidv6: `UUIDv6`, nanoid: `nanoid`, guid: `GUID`, cuid: `cuid`, cuid2: `cuid2`, ulid: `ULID`, xid: `XID`, ksuid: `KSUID`, datetime: `data i godzina w formacie ISO`, date: `data w formacie ISO`, time: `godzina w formacie ISO`, duration: `czas trwania ISO`, ipv4: `adres IPv4`, ipv6: `adres IPv6`, cidrv4: `zakres IPv4`, cidrv6: `zakres IPv6`, base64: `ciąg znaków zakodowany w formacie base64`, base64url: `ciąg znaków zakodowany w formacie base64url`, json_string: `ciąg znaków w formacie JSON`, e164: `liczba E.164`, jwt: `JWT`, template_literal: `wejście` }, r = { nan: `NaN`, number: `liczba`, array: `tablica` }; return (e) => { switch (e.code) { case `invalid_type`: { let t = r[e.expected] ?? e.expected, n = A$12(e.input), i = r[n] ?? n; return /^[A-Z]/.test(e.expected) ? `Nieprawidłowe dane wejściowe: oczekiwano instanceof ${e.expected}, otrzymano ${i}` : `Nieprawidłowe dane wejściowe: oczekiwano ${t}, otrzymano ${i}`; } case `invalid_value`: return e.values.length === 1 ? `Nieprawidłowe dane wejściowe: oczekiwano ${T$14(e.values[0])}` : `Nieprawidłowa opcja: oczekiwano jednej z wartości ${m$10(e.values, `|`)}`; case `too_big`: { let n = e.inclusive ? `<=` : `<`, r = t(e.origin); return r ? `Za duża wartość: oczekiwano, że ${e.origin ?? `wartość`} będzie mieć ${n}${e.maximum.toString()} ${r.unit ?? `elementów`}` : `Zbyt duż(y/a/e): oczekiwano, że ${e.origin ?? `wartość`} będzie wynosić ${n}${e.maximum.toString()}`; } case `too_small`: { let n = e.inclusive ? `>=` : `>`, r = t(e.origin); return r ? `Za mała wartość: oczekiwano, że ${e.origin ?? `wartość`} będzie mieć ${n}${e.minimum.toString()} ${r.unit ?? `elementów`}` : `Zbyt mał(y/a/e): oczekiwano, że ${e.origin ?? `wartość`} będzie wynosić ${n}${e.minimum.toString()}`; } case `invalid_format`: { let t = e; return t.format === `starts_with` ? `Nieprawidłowy ciąg znaków: musi zaczynać się od "${t.prefix}"` : t.format === `ends_with` ? `Nieprawidłowy ciąg znaków: musi kończyć się na "${t.suffix}"` : t.format === `includes` ? `Nieprawidłowy ciąg znaków: musi zawierać "${t.includes}"` : t.format === `regex` ? `Nieprawidłowy ciąg znaków: musi odpowiadać wzorcowi ${t.pattern}` : `Nieprawidłow(y/a/e) ${n[t.format] ?? e.format}`; } case `not_multiple_of`: return `Nieprawidłowa liczba: musi być wielokrotnością ${e.divisor}`; case `unrecognized_keys`: return `Nierozpoznane klucze${e.keys.length > 1 ? `s` : ``}: ${m$10(e.keys, `, `)}`; case `invalid_key`: return `Nieprawidłowy klucz w ${e.origin}`; case `invalid_union`: return `Nieprawidłowe dane wejściowe`; case `invalid_element`: return `Nieprawidłowa wartość w ${e.origin}`; default: return `Nieprawidłowe dane wejściowe`; } }; }; function to$5() { return { localeError: eo$5() }; } const no$4 = () => { let e = { string: { unit: `caracteres`, verb: `ter` }, file: { unit: `bytes`, verb: `ter` }, array: { unit: `itens`, verb: `ter` }, set: { unit: `itens`, verb: `ter` } }; function t(t) { return e[t] ?? null; } let n = { regex: `padrão`, email: `endereço de e-mail`, url: `URL`, emoji: `emoji`, uuid: `UUID`, uuidv4: `UUIDv4`, uuidv6: `UUIDv6`, nanoid: `nanoid`, guid: `GUID`, cuid: `cuid`, cuid2: `cuid2`, ulid: `ULID`, xid: `XID`, ksuid: `KSUID`, datetime: `data e hora ISO`, date: `data ISO`, time: `hora ISO`, duration: `duração ISO`, ipv4: `endereço IPv4`, ipv6: `endereço IPv6`, cidrv4: `faixa de IPv4`, cidrv6: `faixa de IPv6`, base64: `texto codificado em base64`, base64url: `URL codificada em base64`, json_string: `texto JSON`, e164: `número E.164`, jwt: `JWT`, template_literal: `entrada` }, r = { nan: `NaN`, number: `número`, null: `nulo` }; return (e) => { switch (e.code) { case `invalid_type`: { let t = r[e.expected] ?? e.expected, n = A$12(e.input), i = r[n] ?? n; return /^[A-Z]/.test(e.expected) ? `Tipo inválido: esperado instanceof ${e.expected}, recebido ${i}` : `Tipo inválido: esperado ${t}, recebido ${i}`; } case `invalid_value`: return e.values.length === 1 ? `Entrada inválida: esperado ${T$14(e.values[0])}` : `Opção inválida: esperada uma das ${m$10(e.values, `|`)}`; case `too_big`: { let n = e.inclusive ? `<=` : `<`, r = t(e.origin); return r ? `Muito grande: esperado que ${e.origin ?? `valor`} tivesse ${n}${e.maximum.toString()} ${r.unit ?? `elementos`}` : `Muito grande: esperado que ${e.origin ?? `valor`} fosse ${n}${e.maximum.toString()}`; } case `too_small`: { let n = e.inclusive ? `>=` : `>`, r = t(e.origin); return r ? `Muito pequeno: esperado que ${e.origin} tivesse ${n}${e.minimum.toString()} ${r.unit}` : `Muito pequeno: esperado que ${e.origin} fosse ${n}${e.minimum.toString()}`; } case `invalid_format`: { let t = e; return t.format === `starts_with` ? `Texto inválido: deve começar com "${t.prefix}"` : t.format === `ends_with` ? `Texto inválido: deve terminar com "${t.suffix}"` : t.format === `includes` ? `Texto inválido: deve incluir "${t.includes}"` : t.format === `regex` ? `Texto inválido: deve corresponder ao padrão ${t.pattern}` : `${n[t.format] ?? e.format} inválido`; } case `not_multiple_of`: return `Número inválido: deve ser múltiplo de ${e.divisor}`; case `unrecognized_keys`: return `Chave${e.keys.length > 1 ? `s` : ``} desconhecida${e.keys.length > 1 ? `s` : ``}: ${m$10(e.keys, `, `)}`; case `invalid_key`: return `Chave inválida em ${e.origin}`; case `invalid_union`: return `Entrada inválida`; case `invalid_element`: return `Valor inválido em ${e.origin}`; default: return `Campo inválido`; } }; }; function ro$4() { return { localeError: no$4() }; } const io$4 = () => { let e = { string: { unit: `caractere`, verb: `să aibă` }, file: { unit: `octeți`, verb: `să aibă` }, array: { unit: `elemente`, verb: `să aibă` }, set: { unit: `elemente`, verb: `să aibă` }, map: { unit: `intrări`, verb: `să aibă` } }; function t(t) { return e[t] ?? null; } let n = { regex: `intrare`, email: `adresă de email`, url: `URL`, emoji: `emoji`, uuid: `UUID`, uuidv4: `UUIDv4`, uuidv6: `UUIDv6`, nanoid: `nanoid`, guid: `GUID`, cuid: `cuid`, cuid2: `cuid2`, ulid: `ULID`, xid: `XID`, ksuid: `KSUID`, datetime: `dată și oră ISO`, date: `dată ISO`, time: `oră ISO`, duration: `durată ISO`, ipv4: `adresă IPv4`, ipv6: `adresă IPv6`, mac: `adresă MAC`, cidrv4: `interval IPv4`, cidrv6: `interval IPv6`, base64: `șir codat base64`, base64url: `șir codat base64url`, json_string: `șir JSON`, e164: `număr E.164`, jwt: `JWT`, template_literal: `intrare` }, r = { nan: `NaN`, string: `șir`, number: `număr`, boolean: `boolean`, function: `funcție`, array: `matrice`, object: `obiect`, undefined: `nedefinit`, symbol: `simbol`, bigint: `număr mare`, void: `void`, never: `never`, map: `hartă`, set: `set` }; return (e) => { switch (e.code) { case `invalid_type`: { let t = r[e.expected] ?? e.expected, n = A$12(e.input); return `Intrare invalidă: așteptat ${t}, primit ${r[n] ?? n}`; } case `invalid_value`: return e.values.length === 1 ? `Intrare invalidă: așteptat ${T$14(e.values[0])}` : `Opțiune invalidă: așteptat una dintre ${m$10(e.values, `|`)}`; case `too_big`: { let n = e.inclusive ? `<=` : `<`, r = t(e.origin); return r ? `Prea mare: așteptat ca ${e.origin ?? `valoarea`} ${r.verb} ${n}${e.maximum.toString()} ${r.unit ?? `elemente`}` : `Prea mare: așteptat ca ${e.origin ?? `valoarea`} să fie ${n}${e.maximum.toString()}`; } case `too_small`: { let n = e.inclusive ? `>=` : `>`, r = t(e.origin); return r ? `Prea mic: așteptat ca ${e.origin} ${r.verb} ${n}${e.minimum.toString()} ${r.unit}` : `Prea mic: așteptat ca ${e.origin} să fie ${n}${e.minimum.toString()}`; } case `invalid_format`: { let t = e; return t.format === `starts_with` ? `Șir invalid: trebuie să înceapă cu "${t.prefix}"` : t.format === `ends_with` ? `Șir invalid: trebuie să se termine cu "${t.suffix}"` : t.format === `includes` ? `Șir invalid: trebuie să includă "${t.includes}"` : t.format === `regex` ? `Șir invalid: trebuie să se potrivească cu modelul ${t.pattern}` : `Format invalid: ${n[t.format] ?? e.format}`; } case `not_multiple_of`: return `Număr invalid: trebuie să fie multiplu de ${e.divisor}`; case `unrecognized_keys`: return `Chei nerecunoscute: ${m$10(e.keys, `, `)}`; case `invalid_key`: return `Cheie invalidă în ${e.origin}`; case `invalid_union`: return `Intrare invalidă`; case `invalid_element`: return `Valoare invalidă în ${e.origin}`; default: return `Intrare invalidă`; } }; }; function ao$4() { return { localeError: io$4() }; } function oo$4(e, t, n, r) { let i = Math.abs(e), a = i % 10, o = i % 100; return o >= 11 && o <= 19 ? r : a === 1 ? t : a >= 2 && a <= 4 ? n : r; } const so$4 = () => { let e = { string: { unit: { one: `символ`, few: `символа`, many: `символов` }, verb: `иметь` }, file: { unit: { one: `байт`, few: `байта`, many: `байт` }, verb: `иметь` }, array: { unit: { one: `элемент`, few: `элемента`, many: `элементов` }, verb: `иметь` }, set: { unit: { one: `элемент`, few: `элемента`, many: `элементов` }, verb: `иметь` } }; function t(t) { return e[t] ?? null; } let n = { regex: `ввод`, email: `email адрес`, url: `URL`, emoji: `эмодзи`, uuid: `UUID`, uuidv4: `UUIDv4`, uuidv6: `UUIDv6`, nanoid: `nanoid`, guid: `GUID`, cuid: `cuid`, cuid2: `cuid2`, ulid: `ULID`, xid: `XID`, ksuid: `KSUID`, datetime: `ISO дата и время`, date: `ISO дата`, time: `ISO время`, duration: `ISO длительность`, ipv4: `IPv4 адрес`, ipv6: `IPv6 адрес`, cidrv4: `IPv4 диапазон`, cidrv6: `IPv6 диапазон`, base64: `строка в формате base64`, base64url: `строка в формате base64url`, json_string: `JSON строка`, e164: `номер E.164`, jwt: `JWT`, template_literal: `ввод` }, r = { nan: `NaN`, number: `число`, array: `массив` }; return (e) => { switch (e.code) { case `invalid_type`: { let t = r[e.expected] ?? e.expected, n = A$12(e.input), i = r[n] ?? n; return /^[A-Z]/.test(e.expected) ? `Неверный ввод: ожидалось instanceof ${e.expected}, получено ${i}` : `Неверный ввод: ожидалось ${t}, получено ${i}`; } case `invalid_value`: return e.values.length === 1 ? `Неверный ввод: ожидалось ${T$14(e.values[0])}` : `Неверный вариант: ожидалось одно из ${m$10(e.values, `|`)}`; case `too_big`: { let n = e.inclusive ? `<=` : `<`, r = t(e.origin); if (r) { let t = oo$4(Number(e.maximum), r.unit.one, r.unit.few, r.unit.many); return `Слишком большое значение: ожидалось, что ${e.origin ?? `значение`} будет иметь ${n}${e.maximum.toString()} ${t}`; } return `Слишком большое значение: ожидалось, что ${e.origin ?? `значение`} будет ${n}${e.maximum.toString()}`; } case `too_small`: { let n = e.inclusive ? `>=` : `>`, r = t(e.origin); if (r) { let t = oo$4(Number(e.minimum), r.unit.one, r.unit.few, r.unit.many); return `Слишком маленькое значение: ожидалось, что ${e.origin} будет иметь ${n}${e.minimum.toString()} ${t}`; } return `Слишком маленькое значение: ожидалось, что ${e.origin} будет ${n}${e.minimum.toString()}`; } case `invalid_format`: { let t = e; return t.format === `starts_with` ? `Неверная строка: должна начинаться с "${t.prefix}"` : t.format === `ends_with` ? `Неверная строка: должна заканчиваться на "${t.suffix}"` : t.format === `includes` ? `Неверная строка: должна содержать "${t.includes}"` : t.format === `regex` ? `Неверная строка: должна соответствовать шаблону ${t.pattern}` : `Неверный ${n[t.format] ?? e.format}`; } case `not_multiple_of`: return `Неверное число: должно быть кратным ${e.divisor}`; case `unrecognized_keys`: return `Нераспознанн${e.keys.length > 1 ? `ые` : `ый`} ключ${e.keys.length > 1 ? `и` : ``}: ${m$10(e.keys, `, `)}`; case `invalid_key`: return `Неверный ключ в ${e.origin}`; case `invalid_union`: return `Неверные входные данные`; case `invalid_element`: return `Неверное значение в ${e.origin}`; default: return `Неверные входные данные`; } }; }; function co$4() { return { localeError: so$4() }; } const lo$4 = () => { let e = { string: { unit: `znakov`, verb: `imeti` }, file: { unit: `bajtov`, verb: `imeti` }, array: { unit: `elementov`, verb: `imeti` }, set: { unit: `elementov`, verb: `imeti` } }; function t(t) { return e[t] ?? null; } let n = { regex: `vnos`, email: `e-poštni naslov`, url: `URL`, emoji: `emoji`, uuid: `UUID`, uuidv4: `UUIDv4`, uuidv6: `UUIDv6`, nanoid: `nanoid`, guid: `GUID`, cuid: `cuid`, cuid2: `cuid2`, ulid: `ULID`, xid: `XID`, ksuid: `KSUID`, datetime: `ISO datum in čas`, date: `ISO datum`, time: `ISO čas`, duration: `ISO trajanje`, ipv4: `IPv4 naslov`, ipv6: `IPv6 naslov`, cidrv4: `obseg IPv4`, cidrv6: `obseg IPv6`, base64: `base64 kodiran niz`, base64url: `base64url kodiran niz`, json_string: `JSON niz`, e164: `E.164 številka`, jwt: `JWT`, template_literal: `vnos` }, r = { nan: `NaN`, number: `število`, array: `tabela` }; return (e) => { switch (e.code) { case `invalid_type`: { let t = r[e.expected] ?? e.expected, n = A$12(e.input), i = r[n] ?? n; return /^[A-Z]/.test(e.expected) ? `Neveljaven vnos: pričakovano instanceof ${e.expected}, prejeto ${i}` : `Neveljaven vnos: pričakovano ${t}, prejeto ${i}`; } case `invalid_value`: return e.values.length === 1 ? `Neveljaven vnos: pričakovano ${T$14(e.values[0])}` : `Neveljavna možnost: pričakovano eno izmed ${m$10(e.values, `|`)}`; case `too_big`: { let n = e.inclusive ? `<=` : `<`, r = t(e.origin); return r ? `Preveliko: pričakovano, da bo ${e.origin ?? `vrednost`} imelo ${n}${e.maximum.toString()} ${r.unit ?? `elementov`}` : `Preveliko: pričakovano, da bo ${e.origin ?? `vrednost`} ${n}${e.maximum.toString()}`; } case `too_small`: { let n = e.inclusive ? `>=` : `>`, r = t(e.origin); return r ? `Premajhno: pričakovano, da bo ${e.origin} imelo ${n}${e.minimum.toString()} ${r.unit}` : `Premajhno: pričakovano, da bo ${e.origin} ${n}${e.minimum.toString()}`; } case `invalid_format`: { let t = e; return t.format === `starts_with` ? `Neveljaven niz: mora se začeti z "${t.prefix}"` : t.format === `ends_with` ? `Neveljaven niz: mora se končati z "${t.suffix}"` : t.format === `includes` ? `Neveljaven niz: mora vsebovati "${t.includes}"` : t.format === `regex` ? `Neveljaven niz: mora ustrezati vzorcu ${t.pattern}` : `Neveljaven ${n[t.format] ?? e.format}`; } case `not_multiple_of`: return `Neveljavno število: mora biti večkratnik ${e.divisor}`; case `unrecognized_keys`: return `Neprepoznan${e.keys.length > 1 ? `i ključi` : ` ključ`}: ${m$10(e.keys, `, `)}`; case `invalid_key`: return `Neveljaven ključ v ${e.origin}`; case `invalid_union`: return `Neveljaven vnos`; case `invalid_element`: return `Neveljavna vrednost v ${e.origin}`; default: return `Neveljaven vnos`; } }; }; function uo$4() { return { localeError: lo$4() }; } const fo$4 = () => { let e = { string: { unit: `tecken`, verb: `att ha` }, file: { unit: `bytes`, verb: `att ha` }, array: { unit: `objekt`, verb: `att innehålla` }, set: { unit: `objekt`, verb: `att innehålla` } }; function t(t) { return e[t] ?? null; } let n = { regex: `reguljärt uttryck`, email: `e-postadress`, url: `URL`, emoji: `emoji`, uuid: `UUID`, uuidv4: `UUIDv4`, uuidv6: `UUIDv6`, nanoid: `nanoid`, guid: `GUID`, cuid: `cuid`, cuid2: `cuid2`, ulid: `ULID`, xid: `XID`, ksuid: `KSUID`, datetime: `ISO-datum och tid`, date: `ISO-datum`, time: `ISO-tid`, duration: `ISO-varaktighet`, ipv4: `IPv4-intervall`, ipv6: `IPv6-intervall`, cidrv4: `IPv4-spektrum`, cidrv6: `IPv6-spektrum`, base64: `base64-kodad sträng`, base64url: `base64url-kodad sträng`, json_string: `JSON-sträng`, e164: `E.164-nummer`, jwt: `JWT`, template_literal: `mall-literal` }, r = { nan: `NaN`, number: `antal`, array: `lista` }; return (e) => { switch (e.code) { case `invalid_type`: { let t = r[e.expected] ?? e.expected, n = A$12(e.input), i = r[n] ?? n; return /^[A-Z]/.test(e.expected) ? `Ogiltig inmatning: förväntat instanceof ${e.expected}, fick ${i}` : `Ogiltig inmatning: förväntat ${t}, fick ${i}`; } case `invalid_value`: return e.values.length === 1 ? `Ogiltig inmatning: förväntat ${T$14(e.values[0])}` : `Ogiltigt val: förväntade en av ${m$10(e.values, `|`)}`; case `too_big`: { let n = e.inclusive ? `<=` : `<`, r = t(e.origin); return r ? `För stor(t): förväntade ${e.origin ?? `värdet`} att ha ${n}${e.maximum.toString()} ${r.unit ?? `element`}` : `För stor(t): förväntat ${e.origin ?? `värdet`} att ha ${n}${e.maximum.toString()}`; } case `too_small`: { let n = e.inclusive ? `>=` : `>`, r = t(e.origin); return r ? `För lite(t): förväntade ${e.origin ?? `värdet`} att ha ${n}${e.minimum.toString()} ${r.unit}` : `För lite(t): förväntade ${e.origin ?? `värdet`} att ha ${n}${e.minimum.toString()}`; } case `invalid_format`: { let t = e; return t.format === `starts_with` ? `Ogiltig sträng: måste börja med "${t.prefix}"` : t.format === `ends_with` ? `Ogiltig sträng: måste sluta med "${t.suffix}"` : t.format === `includes` ? `Ogiltig sträng: måste innehålla "${t.includes}"` : t.format === `regex` ? `Ogiltig sträng: måste matcha mönstret "${t.pattern}"` : `Ogiltig(t) ${n[t.format] ?? e.format}`; } case `not_multiple_of`: return `Ogiltigt tal: måste vara en multipel av ${e.divisor}`; case `unrecognized_keys`: return `${e.keys.length > 1 ? `Okända nycklar` : `Okänd nyckel`}: ${m$10(e.keys, `, `)}`; case `invalid_key`: return `Ogiltig nyckel i ${e.origin ?? `värdet`}`; case `invalid_union`: return `Ogiltig input`; case `invalid_element`: return `Ogiltigt värde i ${e.origin ?? `värdet`}`; default: return `Ogiltig input`; } }; }; function po$4() { return { localeError: fo$4() }; } const mo$4 = () => { let e = { string: { unit: `எழுத்துக்கள்`, verb: `கொண்டிருக்க வேண்டும்` }, file: { unit: `பைட்டுகள்`, verb: `கொண்டிருக்க வேண்டும்` }, array: { unit: `உறுப்புகள்`, verb: `கொண்டிருக்க வேண்டும்` }, set: { unit: `உறுப்புகள்`, verb: `கொண்டிருக்க வேண்டும்` } }; function t(t) { return e[t] ?? null; } let n = { regex: `உள்ளீடு`, email: `மின்னஞ்சல் முகவரி`, url: `URL`, emoji: `emoji`, uuid: `UUID`, uuidv4: `UUIDv4`, uuidv6: `UUIDv6`, nanoid: `nanoid`, guid: `GUID`, cuid: `cuid`, cuid2: `cuid2`, ulid: `ULID`, xid: `XID`, ksuid: `KSUID`, datetime: `ISO தேதி நேரம்`, date: `ISO தேதி`, time: `ISO நேரம்`, duration: `ISO கால அளவு`, ipv4: `IPv4 முகவரி`, ipv6: `IPv6 முகவரி`, cidrv4: `IPv4 வரம்பு`, cidrv6: `IPv6 வரம்பு`, base64: `base64-encoded சரம்`, base64url: `base64url-encoded சரம்`, json_string: `JSON சரம்`, e164: `E.164 எண்`, jwt: `JWT`, template_literal: `input` }, r = { nan: `NaN`, number: `எண்`, array: `அணி`, null: `வெறுமை` }; return (e) => { switch (e.code) { case `invalid_type`: { let t = r[e.expected] ?? e.expected, n = A$12(e.input), i = r[n] ?? n; return /^[A-Z]/.test(e.expected) ? `தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது instanceof ${e.expected}, பெறப்பட்டது ${i}` : `தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${t}, பெறப்பட்டது ${i}`; } case `invalid_value`: return e.values.length === 1 ? `தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${T$14(e.values[0])}` : `தவறான விருப்பம்: எதிர்பார்க்கப்பட்டது ${m$10(e.values, `|`)} இல் ஒன்று`; case `too_big`: { let n = e.inclusive ? `<=` : `<`, r = t(e.origin); return r ? `மிக பெரியது: எதிர்பார்க்கப்பட்டது ${e.origin ?? `மதிப்பு`} ${n}${e.maximum.toString()} ${r.unit ?? `உறுப்புகள்`} ஆக இருக்க வேண்டும்` : `மிக பெரியது: எதிர்பார்க்கப்பட்டது ${e.origin ?? `மதிப்பு`} ${n}${e.maximum.toString()} ஆக இருக்க வேண்டும்`; } case `too_small`: { let n = e.inclusive ? `>=` : `>`, r = t(e.origin); return r ? `மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${e.origin} ${n}${e.minimum.toString()} ${r.unit} ஆக இருக்க வேண்டும்` : `மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${e.origin} ${n}${e.minimum.toString()} ஆக இருக்க வேண்டும்`; } case `invalid_format`: { let t = e; return t.format === `starts_with` ? `தவறான சரம்: "${t.prefix}" இல் தொடங்க வேண்டும்` : t.format === `ends_with` ? `தவறான சரம்: "${t.suffix}" இல் முடிவடைய வேண்டும்` : t.format === `includes` ? `தவறான சரம்: "${t.includes}" ஐ உள்ளடக்க வேண்டும்` : t.format === `regex` ? `தவறான சரம்: ${t.pattern} முறைபாட்டுடன் பொருந்த வேண்டும்` : `தவறான ${n[t.format] ?? e.format}`; } case `not_multiple_of`: return `தவறான எண்: ${e.divisor} இன் பலமாக இருக்க வேண்டும்`; case `unrecognized_keys`: return `அடையாளம் தெரியாத விசை${e.keys.length > 1 ? `கள்` : ``}: ${m$10(e.keys, `, `)}`; case `invalid_key`: return `${e.origin} இல் தவறான விசை`; case `invalid_union`: return `தவறான உள்ளீடு`; case `invalid_element`: return `${e.origin} இல் தவறான மதிப்பு`; default: return `தவறான உள்ளீடு`; } }; }; function ho$4() { return { localeError: mo$4() }; } const go$4 = () => { let e = { string: { unit: `ตัวอักษร`, verb: `ควรมี` }, file: { unit: `ไบต์`, verb: `ควรมี` }, array: { unit: `รายการ`, verb: `ควรมี` }, set: { unit: `รายการ`, verb: `ควรมี` } }; function t(t) { return e[t] ?? null; } let n = { regex: `ข้อมูลที่ป้อน`, email: `ที่อยู่อีเมล`, url: `URL`, emoji: `อิโมจิ`, uuid: `UUID`, uuidv4: `UUIDv4`, uuidv6: `UUIDv6`, nanoid: `nanoid`, guid: `GUID`, cuid: `cuid`, cuid2: `cuid2`, ulid: `ULID`, xid: `XID`, ksuid: `KSUID`, datetime: `วันที่เวลาแบบ ISO`, date: `วันที่แบบ ISO`, time: `เวลาแบบ ISO`, duration: `ช่วงเวลาแบบ ISO`, ipv4: `ที่อยู่ IPv4`, ipv6: `ที่อยู่ IPv6`, cidrv4: `ช่วง IP แบบ IPv4`, cidrv6: `ช่วง IP แบบ IPv6`, base64: `ข้อความแบบ Base64`, base64url: `ข้อความแบบ Base64 สำหรับ URL`, json_string: `ข้อความแบบ JSON`, e164: `เบอร์โทรศัพท์ระหว่างประเทศ (E.164)`, jwt: `โทเคน JWT`, template_literal: `ข้อมูลที่ป้อน` }, r = { nan: `NaN`, number: `ตัวเลข`, array: `อาร์เรย์ (Array)`, null: `ไม่มีค่า (null)` }; return (e) => { switch (e.code) { case `invalid_type`: { let t = r[e.expected] ?? e.expected, n = A$12(e.input), i = r[n] ?? n; return /^[A-Z]/.test(e.expected) ? `ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น instanceof ${e.expected} แต่ได้รับ ${i}` : `ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น ${t} แต่ได้รับ ${i}`; } case `invalid_value`: return e.values.length === 1 ? `ค่าไม่ถูกต้อง: ควรเป็น ${T$14(e.values[0])}` : `ตัวเลือกไม่ถูกต้อง: ควรเป็นหนึ่งใน ${m$10(e.values, `|`)}`; case `too_big`: { let n = e.inclusive ? `ไม่เกิน` : `น้อยกว่า`, r = t(e.origin); return r ? `เกินกำหนด: ${e.origin ?? `ค่า`} ควรมี${n} ${e.maximum.toString()} ${r.unit ?? `รายการ`}` : `เกินกำหนด: ${e.origin ?? `ค่า`} ควรมี${n} ${e.maximum.toString()}`; } case `too_small`: { let n = e.inclusive ? `อย่างน้อย` : `มากกว่า`, r = t(e.origin); return r ? `น้อยกว่ากำหนด: ${e.origin} ควรมี${n} ${e.minimum.toString()} ${r.unit}` : `น้อยกว่ากำหนด: ${e.origin} ควรมี${n} ${e.minimum.toString()}`; } case `invalid_format`: { let t = e; return t.format === `starts_with` ? `รูปแบบไม่ถูกต้อง: ข้อความต้องขึ้นต้นด้วย "${t.prefix}"` : t.format === `ends_with` ? `รูปแบบไม่ถูกต้อง: ข้อความต้องลงท้ายด้วย "${t.suffix}"` : t.format === `includes` ? `รูปแบบไม่ถูกต้อง: ข้อความต้องมี "${t.includes}" อยู่ในข้อความ` : t.format === `regex` ? `รูปแบบไม่ถูกต้อง: ต้องตรงกับรูปแบบที่กำหนด ${t.pattern}` : `รูปแบบไม่ถูกต้อง: ${n[t.format] ?? e.format}`; } case `not_multiple_of`: return `ตัวเลขไม่ถูกต้อง: ต้องเป็นจำนวนที่หารด้วย ${e.divisor} ได้ลงตัว`; case `unrecognized_keys`: return `พบคีย์ที่ไม่รู้จัก: ${m$10(e.keys, `, `)}`; case `invalid_key`: return `คีย์ไม่ถูกต้องใน ${e.origin}`; case `invalid_union`: return `ข้อมูลไม่ถูกต้อง: ไม่ตรงกับรูปแบบยูเนียนที่กำหนดไว้`; case `invalid_element`: return `ข้อมูลไม่ถูกต้องใน ${e.origin}`; default: return `ข้อมูลไม่ถูกต้อง`; } }; }; function _o$4() { return { localeError: go$4() }; } const vo$4 = () => { let e = { string: { unit: `karakter`, verb: `olmalı` }, file: { unit: `bayt`, verb: `olmalı` }, array: { unit: `öğe`, verb: `olmalı` }, set: { unit: `öğe`, verb: `olmalı` } }; function t(t) { return e[t] ?? null; } let n = { regex: `girdi`, email: `e-posta adresi`, url: `URL`, emoji: `emoji`, uuid: `UUID`, uuidv4: `UUIDv4`, uuidv6: `UUIDv6`, nanoid: `nanoid`, guid: `GUID`, cuid: `cuid`, cuid2: `cuid2`, ulid: `ULID`, xid: `XID`, ksuid: `KSUID`, datetime: `ISO tarih ve saat`, date: `ISO tarih`, time: `ISO saat`, duration: `ISO süre`, ipv4: `IPv4 adresi`, ipv6: `IPv6 adresi`, cidrv4: `IPv4 aralığı`, cidrv6: `IPv6 aralığı`, base64: `base64 ile şifrelenmiş metin`, base64url: `base64url ile şifrelenmiş metin`, json_string: `JSON dizesi`, e164: `E.164 sayısı`, jwt: `JWT`, template_literal: `Şablon dizesi` }, r = { nan: `NaN` }; return (e) => { switch (e.code) { case `invalid_type`: { let t = r[e.expected] ?? e.expected, n = A$12(e.input), i = r[n] ?? n; return /^[A-Z]/.test(e.expected) ? `Geçersiz değer: beklenen instanceof ${e.expected}, alınan ${i}` : `Geçersiz değer: beklenen ${t}, alınan ${i}`; } case `invalid_value`: return e.values.length === 1 ? `Geçersiz değer: beklenen ${T$14(e.values[0])}` : `Geçersiz seçenek: aşağıdakilerden biri olmalı: ${m$10(e.values, `|`)}`; case `too_big`: { let n = e.inclusive ? `<=` : `<`, r = t(e.origin); return r ? `Çok büyük: beklenen ${e.origin ?? `değer`} ${n}${e.maximum.toString()} ${r.unit ?? `öğe`}` : `Çok büyük: beklenen ${e.origin ?? `değer`} ${n}${e.maximum.toString()}`; } case `too_small`: { let n = e.inclusive ? `>=` : `>`, r = t(e.origin); return r ? `Çok küçük: beklenen ${e.origin} ${n}${e.minimum.toString()} ${r.unit}` : `Çok küçük: beklenen ${e.origin} ${n}${e.minimum.toString()}`; } case `invalid_format`: { let t = e; return t.format === `starts_with` ? `Geçersiz metin: "${t.prefix}" ile başlamalı` : t.format === `ends_with` ? `Geçersiz metin: "${t.suffix}" ile bitmeli` : t.format === `includes` ? `Geçersiz metin: "${t.includes}" içermeli` : t.format === `regex` ? `Geçersiz metin: ${t.pattern} desenine uymalı` : `Geçersiz ${n[t.format] ?? e.format}`; } case `not_multiple_of`: return `Geçersiz sayı: ${e.divisor} ile tam bölünebilmeli`; case `unrecognized_keys`: return `Tanınmayan anahtar${e.keys.length > 1 ? `lar` : ``}: ${m$10(e.keys, `, `)}`; case `invalid_key`: return `${e.origin} içinde geçersiz anahtar`; case `invalid_union`: return `Geçersiz değer`; case `invalid_element`: return `${e.origin} içinde geçersiz değer`; default: return `Geçersiz değer`; } }; }; function yo$4() { return { localeError: vo$4() }; } const bo$4 = () => { let e = { string: { unit: `символів`, verb: `матиме` }, file: { unit: `байтів`, verb: `матиме` }, array: { unit: `елементів`, verb: `матиме` }, set: { unit: `елементів`, verb: `матиме` } }; function t(t) { return e[t] ?? null; } let n = { regex: `вхідні дані`, email: `адреса електронної пошти`, url: `URL`, emoji: `емодзі`, uuid: `UUID`, uuidv4: `UUIDv4`, uuidv6: `UUIDv6`, nanoid: `nanoid`, guid: `GUID`, cuid: `cuid`, cuid2: `cuid2`, ulid: `ULID`, xid: `XID`, ksuid: `KSUID`, datetime: `дата та час ISO`, date: `дата ISO`, time: `час ISO`, duration: `тривалість ISO`, ipv4: `адреса IPv4`, ipv6: `адреса IPv6`, cidrv4: `діапазон IPv4`, cidrv6: `діапазон IPv6`, base64: `рядок у кодуванні base64`, base64url: `рядок у кодуванні base64url`, json_string: `рядок JSON`, e164: `номер E.164`, jwt: `JWT`, template_literal: `вхідні дані` }, r = { nan: `NaN`, number: `число`, array: `масив` }; return (e) => { switch (e.code) { case `invalid_type`: { let t = r[e.expected] ?? e.expected, n = A$12(e.input), i = r[n] ?? n; return /^[A-Z]/.test(e.expected) ? `Неправильні вхідні дані: очікується instanceof ${e.expected}, отримано ${i}` : `Неправильні вхідні дані: очікується ${t}, отримано ${i}`; } case `invalid_value`: return e.values.length === 1 ? `Неправильні вхідні дані: очікується ${T$14(e.values[0])}` : `Неправильна опція: очікується одне з ${m$10(e.values, `|`)}`; case `too_big`: { let n = e.inclusive ? `<=` : `<`, r = t(e.origin); return r ? `Занадто велике: очікується, що ${e.origin ?? `значення`} ${r.verb} ${n}${e.maximum.toString()} ${r.unit ?? `елементів`}` : `Занадто велике: очікується, що ${e.origin ?? `значення`} буде ${n}${e.maximum.toString()}`; } case `too_small`: { let n = e.inclusive ? `>=` : `>`, r = t(e.origin); return r ? `Занадто мале: очікується, що ${e.origin} ${r.verb} ${n}${e.minimum.toString()} ${r.unit}` : `Занадто мале: очікується, що ${e.origin} буде ${n}${e.minimum.toString()}`; } case `invalid_format`: { let t = e; return t.format === `starts_with` ? `Неправильний рядок: повинен починатися з "${t.prefix}"` : t.format === `ends_with` ? `Неправильний рядок: повинен закінчуватися на "${t.suffix}"` : t.format === `includes` ? `Неправильний рядок: повинен містити "${t.includes}"` : t.format === `regex` ? `Неправильний рядок: повинен відповідати шаблону ${t.pattern}` : `Неправильний ${n[t.format] ?? e.format}`; } case `not_multiple_of`: return `Неправильне число: повинно бути кратним ${e.divisor}`; case `unrecognized_keys`: return `Нерозпізнаний ключ${e.keys.length > 1 ? `і` : ``}: ${m$10(e.keys, `, `)}`; case `invalid_key`: return `Неправильний ключ у ${e.origin}`; case `invalid_union`: return `Неправильні вхідні дані`; case `invalid_element`: return `Неправильне значення у ${e.origin}`; default: return `Неправильні вхідні дані`; } }; }; function xo$4() { return { localeError: bo$4() }; } function So$4() { return xo$4(); } const Co$4 = () => { let e = { string: { unit: `حروف`, verb: `ہونا` }, file: { unit: `بائٹس`, verb: `ہونا` }, array: { unit: `آئٹمز`, verb: `ہونا` }, set: { unit: `آئٹمز`, verb: `ہونا` } }; function t(t) { return e[t] ?? null; } let n = { regex: `ان پٹ`, email: `ای میل ایڈریس`, url: `یو آر ایل`, emoji: `ایموجی`, uuid: `یو یو آئی ڈی`, uuidv4: `یو یو آئی ڈی وی 4`, uuidv6: `یو یو آئی ڈی وی 6`, nanoid: `نینو آئی ڈی`, guid: `جی یو آئی ڈی`, cuid: `سی یو آئی ڈی`, cuid2: `سی یو آئی ڈی 2`, ulid: `یو ایل آئی ڈی`, xid: `ایکس آئی ڈی`, ksuid: `کے ایس یو آئی ڈی`, datetime: `آئی ایس او ڈیٹ ٹائم`, date: `آئی ایس او تاریخ`, time: `آئی ایس او وقت`, duration: `آئی ایس او مدت`, ipv4: `آئی پی وی 4 ایڈریس`, ipv6: `آئی پی وی 6 ایڈریس`, cidrv4: `آئی پی وی 4 رینج`, cidrv6: `آئی پی وی 6 رینج`, base64: `بیس 64 ان کوڈڈ سٹرنگ`, base64url: `بیس 64 یو آر ایل ان کوڈڈ سٹرنگ`, json_string: `جے ایس او این سٹرنگ`, e164: `ای 164 نمبر`, jwt: `جے ڈبلیو ٹی`, template_literal: `ان پٹ` }, r = { nan: `NaN`, number: `نمبر`, array: `آرے`, null: `نل` }; return (e) => { switch (e.code) { case `invalid_type`: { let t = r[e.expected] ?? e.expected, n = A$12(e.input), i = r[n] ?? n; return /^[A-Z]/.test(e.expected) ? `غلط ان پٹ: instanceof ${e.expected} متوقع تھا، ${i} موصول ہوا` : `غلط ان پٹ: ${t} متوقع تھا، ${i} موصول ہوا`; } case `invalid_value`: return e.values.length === 1 ? `غلط ان پٹ: ${T$14(e.values[0])} متوقع تھا` : `غلط آپشن: ${m$10(e.values, `|`)} میں سے ایک متوقع تھا`; case `too_big`: { let n = e.inclusive ? `<=` : `<`, r = t(e.origin); return r ? `بہت بڑا: ${e.origin ?? `ویلیو`} کے ${n}${e.maximum.toString()} ${r.unit ?? `عناصر`} ہونے متوقع تھے` : `بہت بڑا: ${e.origin ?? `ویلیو`} کا ${n}${e.maximum.toString()} ہونا متوقع تھا`; } case `too_small`: { let n = e.inclusive ? `>=` : `>`, r = t(e.origin); return r ? `بہت چھوٹا: ${e.origin} کے ${n}${e.minimum.toString()} ${r.unit} ہونے متوقع تھے` : `بہت چھوٹا: ${e.origin} کا ${n}${e.minimum.toString()} ہونا متوقع تھا`; } case `invalid_format`: { let t = e; return t.format === `starts_with` ? `غلط سٹرنگ: "${t.prefix}" سے شروع ہونا چاہیے` : t.format === `ends_with` ? `غلط سٹرنگ: "${t.suffix}" پر ختم ہونا چاہیے` : t.format === `includes` ? `غلط سٹرنگ: "${t.includes}" شامل ہونا چاہیے` : t.format === `regex` ? `غلط سٹرنگ: پیٹرن ${t.pattern} سے میچ ہونا چاہیے` : `غلط ${n[t.format] ?? e.format}`; } case `not_multiple_of`: return `غلط نمبر: ${e.divisor} کا مضاعف ہونا چاہیے`; case `unrecognized_keys`: return `غیر تسلیم شدہ کی${e.keys.length > 1 ? `ز` : ``}: ${m$10(e.keys, `، `)}`; case `invalid_key`: return `${e.origin} میں غلط کی`; case `invalid_union`: return `غلط ان پٹ`; case `invalid_element`: return `${e.origin} میں غلط ویلیو`; default: return `غلط ان پٹ`; } }; }; function wo$4() { return { localeError: Co$4() }; } const To$4 = () => { let e = { string: { unit: `belgi`, verb: `bo‘lishi kerak` }, file: { unit: `bayt`, verb: `bo‘lishi kerak` }, array: { unit: `element`, verb: `bo‘lishi kerak` }, set: { unit: `element`, verb: `bo‘lishi kerak` }, map: { unit: `yozuv`, verb: `bo‘lishi kerak` } }; function t(t) { return e[t] ?? null; } let n = { regex: `kirish`, email: `elektron pochta manzili`, url: `URL`, emoji: `emoji`, uuid: `UUID`, uuidv4: `UUIDv4`, uuidv6: `UUIDv6`, nanoid: `nanoid`, guid: `GUID`, cuid: `cuid`, cuid2: `cuid2`, ulid: `ULID`, xid: `XID`, ksuid: `KSUID`, datetime: `ISO sana va vaqti`, date: `ISO sana`, time: `ISO vaqt`, duration: `ISO davomiylik`, ipv4: `IPv4 manzil`, ipv6: `IPv6 manzil`, mac: `MAC manzil`, cidrv4: `IPv4 diapazon`, cidrv6: `IPv6 diapazon`, base64: `base64 kodlangan satr`, base64url: `base64url kodlangan satr`, json_string: `JSON satr`, e164: `E.164 raqam`, jwt: `JWT`, template_literal: `kirish` }, r = { nan: `NaN`, number: `raqam`, array: `massiv` }; return (e) => { switch (e.code) { case `invalid_type`: { let t = r[e.expected] ?? e.expected, n = A$12(e.input), i = r[n] ?? n; return /^[A-Z]/.test(e.expected) ? `Noto‘g‘ri kirish: kutilgan instanceof ${e.expected}, qabul qilingan ${i}` : `Noto‘g‘ri kirish: kutilgan ${t}, qabul qilingan ${i}`; } case `invalid_value`: return e.values.length === 1 ? `Noto‘g‘ri kirish: kutilgan ${T$14(e.values[0])}` : `Noto‘g‘ri variant: quyidagilardan biri kutilgan ${m$10(e.values, `|`)}`; case `too_big`: { let n = e.inclusive ? `<=` : `<`, r = t(e.origin); return r ? `Juda katta: kutilgan ${e.origin ?? `qiymat`} ${n}${e.maximum.toString()} ${r.unit} ${r.verb}` : `Juda katta: kutilgan ${e.origin ?? `qiymat`} ${n}${e.maximum.toString()}`; } case `too_small`: { let n = e.inclusive ? `>=` : `>`, r = t(e.origin); return r ? `Juda kichik: kutilgan ${e.origin} ${n}${e.minimum.toString()} ${r.unit} ${r.verb}` : `Juda kichik: kutilgan ${e.origin} ${n}${e.minimum.toString()}`; } case `invalid_format`: { let t = e; return t.format === `starts_with` ? `Noto‘g‘ri satr: "${t.prefix}" bilan boshlanishi kerak` : t.format === `ends_with` ? `Noto‘g‘ri satr: "${t.suffix}" bilan tugashi kerak` : t.format === `includes` ? `Noto‘g‘ri satr: "${t.includes}" ni o‘z ichiga olishi kerak` : t.format === `regex` ? `Noto‘g‘ri satr: ${t.pattern} shabloniga mos kelishi kerak` : `Noto‘g‘ri ${n[t.format] ?? e.format}`; } case `not_multiple_of`: return `Noto‘g‘ri raqam: ${e.divisor} ning karralisi bo‘lishi kerak`; case `unrecognized_keys`: return `Noma’lum kalit${e.keys.length > 1 ? `lar` : ``}: ${m$10(e.keys, `, `)}`; case `invalid_key`: return `${e.origin} dagi kalit noto‘g‘ri`; case `invalid_union`: return `Noto‘g‘ri kirish`; case `invalid_element`: return `${e.origin} da noto‘g‘ri qiymat`; default: return `Noto‘g‘ri kirish`; } }; }; function Eo$4() { return { localeError: To$4() }; } const Do$4 = () => { let e = { string: { unit: `ký tự`, verb: `có` }, file: { unit: `byte`, verb: `có` }, array: { unit: `phần tử`, verb: `có` }, set: { unit: `phần tử`, verb: `có` } }; function t(t) { return e[t] ?? null; } let n = { regex: `đầu vào`, email: `địa chỉ email`, url: `URL`, emoji: `emoji`, uuid: `UUID`, uuidv4: `UUIDv4`, uuidv6: `UUIDv6`, nanoid: `nanoid`, guid: `GUID`, cuid: `cuid`, cuid2: `cuid2`, ulid: `ULID`, xid: `XID`, ksuid: `KSUID`, datetime: `ngày giờ ISO`, date: `ngày ISO`, time: `giờ ISO`, duration: `khoảng thời gian ISO`, ipv4: `địa chỉ IPv4`, ipv6: `địa chỉ IPv6`, cidrv4: `dải IPv4`, cidrv6: `dải IPv6`, base64: `chuỗi mã hóa base64`, base64url: `chuỗi mã hóa base64url`, json_string: `chuỗi JSON`, e164: `số E.164`, jwt: `JWT`, template_literal: `đầu vào` }, r = { nan: `NaN`, number: `số`, array: `mảng` }; return (e) => { switch (e.code) { case `invalid_type`: { let t = r[e.expected] ?? e.expected, n = A$12(e.input), i = r[n] ?? n; return /^[A-Z]/.test(e.expected) ? `Đầu vào không hợp lệ: mong đợi instanceof ${e.expected}, nhận được ${i}` : `Đầu vào không hợp lệ: mong đợi ${t}, nhận được ${i}`; } case `invalid_value`: return e.values.length === 1 ? `Đầu vào không hợp lệ: mong đợi ${T$14(e.values[0])}` : `Tùy chọn không hợp lệ: mong đợi một trong các giá trị ${m$10(e.values, `|`)}`; case `too_big`: { let n = e.inclusive ? `<=` : `<`, r = t(e.origin); return r ? `Quá lớn: mong đợi ${e.origin ?? `giá trị`} ${r.verb} ${n}${e.maximum.toString()} ${r.unit ?? `phần tử`}` : `Quá lớn: mong đợi ${e.origin ?? `giá trị`} ${n}${e.maximum.toString()}`; } case `too_small`: { let n = e.inclusive ? `>=` : `>`, r = t(e.origin); return r ? `Quá nhỏ: mong đợi ${e.origin} ${r.verb} ${n}${e.minimum.toString()} ${r.unit}` : `Quá nhỏ: mong đợi ${e.origin} ${n}${e.minimum.toString()}`; } case `invalid_format`: { let t = e; return t.format === `starts_with` ? `Chuỗi không hợp lệ: phải bắt đầu bằng "${t.prefix}"` : t.format === `ends_with` ? `Chuỗi không hợp lệ: phải kết thúc bằng "${t.suffix}"` : t.format === `includes` ? `Chuỗi không hợp lệ: phải bao gồm "${t.includes}"` : t.format === `regex` ? `Chuỗi không hợp lệ: phải khớp với mẫu ${t.pattern}` : `${n[t.format] ?? e.format} không hợp lệ`; } case `not_multiple_of`: return `Số không hợp lệ: phải là bội số của ${e.divisor}`; case `unrecognized_keys`: return `Khóa không được nhận dạng: ${m$10(e.keys, `, `)}`; case `invalid_key`: return `Khóa không hợp lệ trong ${e.origin}`; case `invalid_union`: return `Đầu vào không hợp lệ`; case `invalid_element`: return `Giá trị không hợp lệ trong ${e.origin}`; default: return `Đầu vào không hợp lệ`; } }; }; function Oo$4() { return { localeError: Do$4() }; } const ko$4 = () => { let e = { string: { unit: `字符`, verb: `包含` }, file: { unit: `字节`, verb: `包含` }, array: { unit: `项`, verb: `包含` }, set: { unit: `项`, verb: `包含` } }; function t(t) { return e[t] ?? null; } let n = { regex: `输入`, email: `电子邮件`, url: `URL`, emoji: `表情符号`, uuid: `UUID`, uuidv4: `UUIDv4`, uuidv6: `UUIDv6`, nanoid: `nanoid`, guid: `GUID`, cuid: `cuid`, cuid2: `cuid2`, ulid: `ULID`, xid: `XID`, ksuid: `KSUID`, datetime: `ISO日期时间`, date: `ISO日期`, time: `ISO时间`, duration: `ISO时长`, ipv4: `IPv4地址`, ipv6: `IPv6地址`, cidrv4: `IPv4网段`, cidrv6: `IPv6网段`, base64: `base64编码字符串`, base64url: `base64url编码字符串`, json_string: `JSON字符串`, e164: `E.164号码`, jwt: `JWT`, template_literal: `输入` }, r = { nan: `NaN`, number: `数字`, array: `数组`, null: `空值(null)` }; return (e) => { switch (e.code) { case `invalid_type`: { let t = r[e.expected] ?? e.expected, n = A$12(e.input), i = r[n] ?? n; return /^[A-Z]/.test(e.expected) ? `无效输入:期望 instanceof ${e.expected},实际接收 ${i}` : `无效输入:期望 ${t},实际接收 ${i}`; } case `invalid_value`: return e.values.length === 1 ? `无效输入:期望 ${T$14(e.values[0])}` : `无效选项:期望以下之一 ${m$10(e.values, `|`)}`; case `too_big`: { let n = e.inclusive ? `<=` : `<`, r = t(e.origin); return r ? `数值过大:期望 ${e.origin ?? `值`} ${n}${e.maximum.toString()} ${r.unit ?? `个元素`}` : `数值过大:期望 ${e.origin ?? `值`} ${n}${e.maximum.toString()}`; } case `too_small`: { let n = e.inclusive ? `>=` : `>`, r = t(e.origin); return r ? `数值过小:期望 ${e.origin} ${n}${e.minimum.toString()} ${r.unit}` : `数值过小:期望 ${e.origin} ${n}${e.minimum.toString()}`; } case `invalid_format`: { let t = e; return t.format === `starts_with` ? `无效字符串:必须以 "${t.prefix}" 开头` : t.format === `ends_with` ? `无效字符串:必须以 "${t.suffix}" 结尾` : t.format === `includes` ? `无效字符串:必须包含 "${t.includes}"` : t.format === `regex` ? `无效字符串:必须满足正则表达式 ${t.pattern}` : `无效${n[t.format] ?? e.format}`; } case `not_multiple_of`: return `无效数字:必须是 ${e.divisor} 的倍数`; case `unrecognized_keys`: return `出现未知的键(key): ${m$10(e.keys, `, `)}`; case `invalid_key`: return `${e.origin} 中的键(key)无效`; case `invalid_union`: return `无效输入`; case `invalid_element`: return `${e.origin} 中包含无效值(value)`; default: return `无效输入`; } }; }; function Ao$4() { return { localeError: ko$4() }; } const jo$4 = () => { let e = { string: { unit: `字元`, verb: `擁有` }, file: { unit: `位元組`, verb: `擁有` }, array: { unit: `項目`, verb: `擁有` }, set: { unit: `項目`, verb: `擁有` } }; function t(t) { return e[t] ?? null; } let n = { regex: `輸入`, email: `郵件地址`, url: `URL`, emoji: `emoji`, uuid: `UUID`, uuidv4: `UUIDv4`, uuidv6: `UUIDv6`, nanoid: `nanoid`, guid: `GUID`, cuid: `cuid`, cuid2: `cuid2`, ulid: `ULID`, xid: `XID`, ksuid: `KSUID`, datetime: `ISO 日期時間`, date: `ISO 日期`, time: `ISO 時間`, duration: `ISO 期間`, ipv4: `IPv4 位址`, ipv6: `IPv6 位址`, cidrv4: `IPv4 範圍`, cidrv6: `IPv6 範圍`, base64: `base64 編碼字串`, base64url: `base64url 編碼字串`, json_string: `JSON 字串`, e164: `E.164 數值`, jwt: `JWT`, template_literal: `輸入` }, r = { nan: `NaN` }; return (e) => { switch (e.code) { case `invalid_type`: { let t = r[e.expected] ?? e.expected, n = A$12(e.input), i = r[n] ?? n; return /^[A-Z]/.test(e.expected) ? `無效的輸入值:預期為 instanceof ${e.expected},但收到 ${i}` : `無效的輸入值:預期為 ${t},但收到 ${i}`; } case `invalid_value`: return e.values.length === 1 ? `無效的輸入值:預期為 ${T$14(e.values[0])}` : `無效的選項:預期為以下其中之一 ${m$10(e.values, `|`)}`; case `too_big`: { let n = e.inclusive ? `<=` : `<`, r = t(e.origin); return r ? `數值過大:預期 ${e.origin ?? `值`} 應為 ${n}${e.maximum.toString()} ${r.unit ?? `個元素`}` : `數值過大:預期 ${e.origin ?? `值`} 應為 ${n}${e.maximum.toString()}`; } case `too_small`: { let n = e.inclusive ? `>=` : `>`, r = t(e.origin); return r ? `數值過小:預期 ${e.origin} 應為 ${n}${e.minimum.toString()} ${r.unit}` : `數值過小:預期 ${e.origin} 應為 ${n}${e.minimum.toString()}`; } case `invalid_format`: { let t = e; return t.format === `starts_with` ? `無效的字串:必須以 "${t.prefix}" 開頭` : t.format === `ends_with` ? `無效的字串:必須以 "${t.suffix}" 結尾` : t.format === `includes` ? `無效的字串:必須包含 "${t.includes}"` : t.format === `regex` ? `無效的字串:必須符合格式 ${t.pattern}` : `無效的 ${n[t.format] ?? e.format}`; } case `not_multiple_of`: return `無效的數字:必須為 ${e.divisor} 的倍數`; case `unrecognized_keys`: return `無法識別的鍵值${e.keys.length > 1 ? `們` : ``}:${m$10(e.keys, `、`)}`; case `invalid_key`: return `${e.origin} 中有無效的鍵值`; case `invalid_union`: return `無效的輸入值`; case `invalid_element`: return `${e.origin} 中有無效的值`; default: return `無效的輸入值`; } }; }; function Mo$4() { return { localeError: jo$4() }; } const No$4 = () => { let e = { string: { unit: `àmi`, verb: `ní` }, file: { unit: `bytes`, verb: `ní` }, array: { unit: `nkan`, verb: `ní` }, set: { unit: `nkan`, verb: `ní` } }; function t(t) { return e[t] ?? null; } let n = { regex: `ẹ̀rọ ìbáwọlé`, email: `àdírẹ́sì ìmẹ́lì`, url: `URL`, emoji: `emoji`, uuid: `UUID`, uuidv4: `UUIDv4`, uuidv6: `UUIDv6`, nanoid: `nanoid`, guid: `GUID`, cuid: `cuid`, cuid2: `cuid2`, ulid: `ULID`, xid: `XID`, ksuid: `KSUID`, datetime: `àkókò ISO`, date: `ọjọ́ ISO`, time: `àkókò ISO`, duration: `àkókò tó pé ISO`, ipv4: `àdírẹ́sì IPv4`, ipv6: `àdírẹ́sì IPv6`, cidrv4: `àgbègbè IPv4`, cidrv6: `àgbègbè IPv6`, base64: `ọ̀rọ̀ tí a kọ́ ní base64`, base64url: `ọ̀rọ̀ base64url`, json_string: `ọ̀rọ̀ JSON`, e164: `nọ́mbà E.164`, jwt: `JWT`, template_literal: `ẹ̀rọ ìbáwọlé` }, r = { nan: `NaN`, number: `nọ́mbà`, array: `akopọ` }; return (e) => { switch (e.code) { case `invalid_type`: { let t = r[e.expected] ?? e.expected, n = A$12(e.input), i = r[n] ?? n; return /^[A-Z]/.test(e.expected) ? `Ìbáwọlé aṣìṣe: a ní láti fi instanceof ${e.expected}, àmọ̀ a rí ${i}` : `Ìbáwọlé aṣìṣe: a ní láti fi ${t}, àmọ̀ a rí ${i}`; } case `invalid_value`: return e.values.length === 1 ? `Ìbáwọlé aṣìṣe: a ní láti fi ${T$14(e.values[0])}` : `Àṣàyàn aṣìṣe: yan ọ̀kan lára ${m$10(e.values, `|`)}`; case `too_big`: { let n = e.inclusive ? `<=` : `<`, r = t(e.origin); return r ? `Tó pọ̀ jù: a ní láti jẹ́ pé ${e.origin ?? `iye`} ${r.verb} ${n}${e.maximum} ${r.unit}` : `Tó pọ̀ jù: a ní láti jẹ́ ${n}${e.maximum}`; } case `too_small`: { let n = e.inclusive ? `>=` : `>`, r = t(e.origin); return r ? `Kéré ju: a ní láti jẹ́ pé ${e.origin} ${r.verb} ${n}${e.minimum} ${r.unit}` : `Kéré ju: a ní láti jẹ́ ${n}${e.minimum}`; } case `invalid_format`: { let t = e; return t.format === `starts_with` ? `Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ bẹ̀rẹ̀ pẹ̀lú "${t.prefix}"` : t.format === `ends_with` ? `Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ parí pẹ̀lú "${t.suffix}"` : t.format === `includes` ? `Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ ní "${t.includes}"` : t.format === `regex` ? `Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ bá àpẹẹrẹ mu ${t.pattern}` : `Aṣìṣe: ${n[t.format] ?? e.format}`; } case `not_multiple_of`: return `Nọ́mbà aṣìṣe: gbọ́dọ̀ jẹ́ èyà pípín ti ${e.divisor}`; case `unrecognized_keys`: return `Bọtìnì àìmọ̀: ${m$10(e.keys, `, `)}`; case `invalid_key`: return `Bọtìnì aṣìṣe nínú ${e.origin}`; case `invalid_union`: return `Ìbáwọlé aṣìṣe`; case `invalid_element`: return `Iye aṣìṣe nínú ${e.origin}`; default: return `Ìbáwọlé aṣìṣe`; } }; }; function Po$4() { return { localeError: No$4() }; } var Fo$4 = t$13({ ar: () => Li$6, az: () => zi$6, be: () => Hi$6, bg: () => Wi$6, ca: () => Ki$6, cs: () => Ji$6, da: () => Xi$6, de: () => Qi$6, el: () => ea$6, en: () => na$6, eo: () => ia$6, es: () => oa$6, fa: () => ca$6, fi: () => ua$6, fr: () => fa$6, frCA: () => ma$6, he: () => ga$6, hr: () => va$6, hu: () => ba$6, hy: () => Ca$6, id: () => Ta$6, is: () => Da$6, it: () => ka$6, ja: () => ja$6, ka: () => Na$6, kh: () => Ia$6, km: () => Fa$6, ko: () => Ra$6, lt: () => Va$6, mk: () => Ua$6, ms: () => Ga$6, nl: () => qa$6, no: () => Ya$5, ota: () => Za$5, pl: () => to$5, ps: () => $a$5, pt: () => ro$4, ro: () => ao$4, ru: () => co$4, sl: () => uo$4, sv: () => po$4, ta: () => ho$4, th: () => _o$4, tr: () => yo$4, ua: () => So$4, uk: () => xo$4, ur: () => wo$4, uz: () => Eo$4, vi: () => Oo$4, yo: () => Po$4, zhCN: () => Ao$4, zhTW: () => Mo$4 }); var Io$4; const Lo$4 = Symbol(`ZodOutput`); const Ro$4 = Symbol(`ZodInput`); var zo$4 = class { constructor() { this._map = /* @__PURE__ */ new WeakMap(), this._idmap = /* @__PURE__ */ new Map(); } add(e, ...t) { let n = t[0]; return this._map.set(e, n), n && typeof n == `object` && `id` in n && this._idmap.set(n.id, e), this; } clear() { return this._map = /* @__PURE__ */ new WeakMap(), this._idmap = /* @__PURE__ */ new Map(), this; } remove(e) { let t = this._map.get(e); return t && typeof t == `object` && `id` in t && this._idmap.delete(t.id), this._map.delete(e), this; } get(e) { let t = e._zod.parent; if (t) { let n = { ...this.get(t) ?? {} }; delete n.id; let r = { ...n, ...this._map.get(e) }; return Object.keys(r).length ? r : void 0; } return this._map.get(e); } has(e) { return this._map.has(e); } }; function Bo$4() { return new zo$4(); } (Io$4 = globalThis).__zod_globalRegistry ?? (Io$4.__zod_globalRegistry = Bo$4()); const K$10 = globalThis.__zod_globalRegistry; function Vo$4(e, t) { return new e({ type: `string`, ...w$14(t) }); } function Ho$4(e, t) { return new e({ type: `string`, coerce: !0, ...w$14(t) }); } function Uo$4(e, t) { return new e({ type: `string`, format: `email`, check: `string_format`, abort: !1, ...w$14(t) }); } function Wo$4(e, t) { return new e({ type: `string`, format: `guid`, check: `string_format`, abort: !1, ...w$14(t) }); } function Go$4(e, t) { return new e({ type: `string`, format: `uuid`, check: `string_format`, abort: !1, ...w$14(t) }); } function Ko$4(e, t) { return new e({ type: `string`, format: `uuid`, check: `string_format`, abort: !1, version: `v4`, ...w$14(t) }); } function qo$4(e, t) { return new e({ type: `string`, format: `uuid`, check: `string_format`, abort: !1, version: `v6`, ...w$14(t) }); } function Jo$4(e, t) { return new e({ type: `string`, format: `uuid`, check: `string_format`, abort: !1, version: `v7`, ...w$14(t) }); } function Yo$4(e, t) { return new e({ type: `string`, format: `url`, check: `string_format`, abort: !1, ...w$14(t) }); } function Xo$4(e, t) { return new e({ type: `string`, format: `emoji`, check: `string_format`, abort: !1, ...w$14(t) }); } function Zo$4(e, t) { return new e({ type: `string`, format: `nanoid`, check: `string_format`, abort: !1, ...w$14(t) }); } function Qo$4(e, t) { return new e({ type: `string`, format: `cuid`, check: `string_format`, abort: !1, ...w$14(t) }); } function $o$4(e, t) { return new e({ type: `string`, format: `cuid2`, check: `string_format`, abort: !1, ...w$14(t) }); } function es$4(e, t) { return new e({ type: `string`, format: `ulid`, check: `string_format`, abort: !1, ...w$14(t) }); } function ts$4(e, t) { return new e({ type: `string`, format: `xid`, check: `string_format`, abort: !1, ...w$14(t) }); } function ns$4(e, t) { return new e({ type: `string`, format: `ksuid`, check: `string_format`, abort: !1, ...w$14(t) }); } function rs$4(e, t) { return new e({ type: `string`, format: `ipv4`, check: `string_format`, abort: !1, ...w$14(t) }); } function is$4(e, t) { return new e({ type: `string`, format: `ipv6`, check: `string_format`, abort: !1, ...w$14(t) }); } function as$4(e, t) { return new e({ type: `string`, format: `mac`, check: `string_format`, abort: !1, ...w$14(t) }); } function os$4(e, t) { return new e({ type: `string`, format: `cidrv4`, check: `string_format`, abort: !1, ...w$14(t) }); } function ss$4(e, t) { return new e({ type: `string`, format: `cidrv6`, check: `string_format`, abort: !1, ...w$14(t) }); } function cs$4(e, t) { return new e({ type: `string`, format: `base64`, check: `string_format`, abort: !1, ...w$14(t) }); } function ls$4(e, t) { return new e({ type: `string`, format: `base64url`, check: `string_format`, abort: !1, ...w$14(t) }); } function us$4(e, t) { return new e({ type: `string`, format: `e164`, check: `string_format`, abort: !1, ...w$14(t) }); } function ds$4(e, t) { return new e({ type: `string`, format: `jwt`, check: `string_format`, abort: !1, ...w$14(t) }); } const fs$4 = { Any: null, Minute: -1, Second: 0, Millisecond: 3, Microsecond: 6 }; function ps$4(e, t) { return new e({ type: `string`, format: `datetime`, check: `string_format`, offset: !1, local: !1, precision: null, ...w$14(t) }); } function ms$4(e, t) { return new e({ type: `string`, format: `date`, check: `string_format`, ...w$14(t) }); } function hs$4(e, t) { return new e({ type: `string`, format: `time`, check: `string_format`, precision: null, ...w$14(t) }); } function gs$4(e, t) { return new e({ type: `string`, format: `duration`, check: `string_format`, ...w$14(t) }); } function _s$4(e, t) { return new e({ type: `number`, checks: [], ...w$14(t) }); } function vs$4(e, t) { return new e({ type: `number`, coerce: !0, checks: [], ...w$14(t) }); } function ys$4(e, t) { return new e({ type: `number`, check: `number_format`, abort: !1, format: `safeint`, ...w$14(t) }); } function bs$4(e, t) { return new e({ type: `number`, check: `number_format`, abort: !1, format: `float32`, ...w$14(t) }); } function xs$4(e, t) { return new e({ type: `number`, check: `number_format`, abort: !1, format: `float64`, ...w$14(t) }); } function Ss$4(e, t) { return new e({ type: `number`, check: `number_format`, abort: !1, format: `int32`, ...w$14(t) }); } function Cs$4(e, t) { return new e({ type: `number`, check: `number_format`, abort: !1, format: `uint32`, ...w$14(t) }); } function ws$4(e, t) { return new e({ type: `boolean`, ...w$14(t) }); } function Ts$4(e, t) { return new e({ type: `boolean`, coerce: !0, ...w$14(t) }); } function Es$4(e, t) { return new e({ type: `bigint`, ...w$14(t) }); } function Ds$4(e, t) { return new e({ type: `bigint`, coerce: !0, ...w$14(t) }); } function Os$4(e, t) { return new e({ type: `bigint`, check: `bigint_format`, abort: !1, format: `int64`, ...w$14(t) }); } function ks$4(e, t) { return new e({ type: `bigint`, check: `bigint_format`, abort: !1, format: `uint64`, ...w$14(t) }); } function As$4(e, t) { return new e({ type: `symbol`, ...w$14(t) }); } function js$4(e, t) { return new e({ type: `undefined`, ...w$14(t) }); } function Ms$4(e, t) { return new e({ type: `null`, ...w$14(t) }); } function Ns$4(e) { return new e({ type: `any` }); } function Ps$4(e) { return new e({ type: `unknown` }); } function Fs$4(e, t) { return new e({ type: `never`, ...w$14(t) }); } function Is$4(e, t) { return new e({ type: `void`, ...w$14(t) }); } function Ls$4(e, t) { return new e({ type: `date`, ...w$14(t) }); } function Rs$3(e, t) { return new e({ type: `date`, coerce: !0, ...w$14(t) }); } function zs$3(e, t) { return new e({ type: `nan`, ...w$14(t) }); } function Bs$3(e, t) { return new Tn$6({ check: `less_than`, ...w$14(t), value: e, inclusive: !1 }); } function Vs$3(e, t) { return new Tn$6({ check: `less_than`, ...w$14(t), value: e, inclusive: !0 }); } function Hs$3(e, t) { return new En$6({ check: `greater_than`, ...w$14(t), value: e, inclusive: !1 }); } function q$10(e, t) { return new En$6({ check: `greater_than`, ...w$14(t), value: e, inclusive: !0 }); } function Us$3(e) { return Hs$3(0, e); } function Ws$3(e) { return Bs$3(0, e); } function Gs$3(e) { return Vs$3(0, e); } function Ks$3(e) { return q$10(0, e); } function qs$3(e, t) { return new Dn$6({ check: `multiple_of`, ...w$14(t), value: e }); } function Js$3(e, t) { return new An$5({ check: `max_size`, ...w$14(t), maximum: e }); } function Ys$3(e, t) { return new jn$5({ check: `min_size`, ...w$14(t), minimum: e }); } function Xs$3(e, t) { return new Mn$6({ check: `size_equals`, ...w$14(t), size: e }); } function Zs$3(e, t) { return new Nn$5({ check: `max_length`, ...w$14(t), maximum: e }); } function Qs$3(e, t) { return new Pn$5({ check: `min_length`, ...w$14(t), minimum: e }); } function $s$3(e, t) { return new Fn$4({ check: `length_equals`, ...w$14(t), length: e }); } function ec$3(e, t) { return new In$4({ check: `string_format`, format: `regex`, ...w$14(t), pattern: e }); } function tc$3(e) { return new Ln$4({ check: `string_format`, format: `lowercase`, ...w$14(e) }); } function nc$3(e) { return new Rn$4({ check: `string_format`, format: `uppercase`, ...w$14(e) }); } function rc$3(e, t) { return new zn$4({ check: `string_format`, format: `includes`, ...w$14(t), includes: e }); } function ic$3(e, t) { return new Bn$4({ check: `string_format`, format: `starts_with`, ...w$14(t), prefix: e }); } function ac$3(e, t) { return new Vn$4({ check: `string_format`, format: `ends_with`, ...w$14(t), suffix: e }); } function oc$3(e, t, n) { return new Un$4({ check: `property`, property: e, schema: t, ...w$14(n) }); } function sc$3(e, t) { return new Wn$4({ check: `mime_type`, mime: e, ...w$14(t) }); } function J$10(e) { return new Gn$4({ check: `overwrite`, tx: e }); } function cc$3(e) { return J$10((t) => t.normalize(e)); } function lc$3() { return J$10((e) => e.trim()); } function uc$3() { return J$10((e) => e.toLowerCase()); } function dc$3() { return J$10((e) => e.toUpperCase()); } function fc$3() { return J$10((e) => pe$9(e)); } function pc$3(e, t, n) { return new e({ type: `array`, element: t, ...w$14(n) }); } function mc$3(e, t, n) { return new e({ type: `union`, options: t, ...w$14(n) }); } function hc$3(e, t, n) { return new e({ type: `union`, options: t, inclusive: !1, ...w$14(n) }); } function gc$3(e, t, n, r) { return new e({ type: `union`, options: n, discriminator: t, ...w$14(r) }); } function _c$3(e, t, n) { return new e({ type: `intersection`, left: t, right: n }); } function vc$3(e, t, n, r) { let i = n instanceof H$11; return new e({ type: `tuple`, items: t, rest: i ? n : null, ...w$14(i ? r : n) }); } function yc$3(e, t, n, r) { return new e({ type: `record`, keyType: t, valueType: n, ...w$14(r) }); } function bc$3(e, t, n, r) { return new e({ type: `map`, keyType: t, valueType: n, ...w$14(r) }); } function xc$3(e, t, n) { return new e({ type: `set`, valueType: t, ...w$14(n) }); } function Sc$3(e, t, n) { return new e({ type: `enum`, entries: Array.isArray(t) ? Object.fromEntries(t.map((e) => [e, e])) : t, ...w$14(n) }); } function Cc$3(e, t, n) { return new e({ type: `enum`, entries: t, ...w$14(n) }); } function wc$3(e, t, n) { return new e({ type: `literal`, values: Array.isArray(t) ? t : [t], ...w$14(n) }); } function Tc$3(e, t) { return new e({ type: `file`, ...w$14(t) }); } function Ec$3(e, t) { return new e({ type: `transform`, transform: t }); } function Dc$3(e, t) { return new e({ type: `optional`, innerType: t }); } function Oc$3(e, t) { return new e({ type: `nullable`, innerType: t }); } function kc$3(e, t, n) { return new e({ type: `default`, innerType: t, get defaultValue() { return typeof n == `function` ? n() : ge$9(n); } }); } function Ac$3(e, t, n) { return new e({ type: `nonoptional`, innerType: t, ...w$14(n) }); } function jc$3(e, t) { return new e({ type: `success`, innerType: t }); } function Mc$3(e, t, n) { return new e({ type: `catch`, innerType: t, catchValue: typeof n == `function` ? n : () => n }); } function Nc$3(e, t, n) { return new e({ type: `pipe`, in: t, out: n }); } function Pc$3(e, t) { return new e({ type: `readonly`, innerType: t }); } function Fc$3(e, t, n) { return new e({ type: `template_literal`, parts: t, ...w$14(n) }); } function Ic$3(e, t) { return new e({ type: `lazy`, getter: t }); } function Lc$3(e, t) { return new e({ type: `promise`, innerType: t }); } function Rc$3(e, t, n) { let r = w$14(n); return r.abort ??= !0, new e({ type: `custom`, check: `custom`, fn: t, ...r }); } function zc$3(e, t, n) { return new e({ type: `custom`, check: `custom`, fn: t, ...w$14(n) }); } function Bc$3(e, t) { let n = Vc$3((t) => (t.addIssue = (e) => { if (typeof e == `string`) t.issues.push(j$12(e, t.value, n._zod.def)); else { let r = e; r.fatal && (r.continue = !1), r.code ??= `custom`, r.input ??= t.value, r.inst ??= n, r.continue ??= !n._zod.def.abort, t.issues.push(j$12(r)); } }, e(t.value, t)), t); return n; } function Vc$3(e, t) { let n = new B$13({ check: `custom`, ...w$14(t) }); return n._zod.check = e, n; } function Hc$3(e) { let t = new B$13({ check: `describe` }); return t._zod.onattach = [(t) => { let n = K$10.get(t) ?? {}; K$10.add(t, { ...n, description: e }); }], t._zod.check = () => {}, t; } function Uc$3(e) { let t = new B$13({ check: `meta` }); return t._zod.onattach = [(t) => { let n = K$10.get(t) ?? {}; K$10.add(t, { ...n, ...e }); }], t._zod.check = () => {}, t; } function Wc$3(e, t) { let n = w$14(t), r = n.truthy ?? [ `true`, `1`, `yes`, `on`, `y`, `enabled` ], i = n.falsy ?? [ `false`, `0`, `no`, `off`, `n`, `disabled` ]; n.case !== `sensitive` && (r = r.map((e) => typeof e == `string` ? e.toLowerCase() : e), i = i.map((e) => typeof e == `string` ? e.toLowerCase() : e)); let a = new Set(r), o = new Set(i), s = e.Codec ?? wi$6, c = e.Boolean ?? Tr$5, l = new s({ type: `pipe`, in: new (e.String ?? Jn$4)({ type: `string`, error: n.error }), out: new c({ type: `boolean`, error: n.error }), transform: ((e, t) => { let r = e; return n.case !== `sensitive` && (r = r.toLowerCase()), a.has(r) ? !0 : o.has(r) ? !1 : (t.issues.push({ code: `invalid_value`, expected: `stringbool`, values: [...a, ...o], input: t.value, inst: l, continue: !1 }), {}); }), reverseTransform: ((e, t) => e === !0 ? r[0] || `true` : i[0] || `false`), error: n.error }); return l; } function Gc$3(e, t, n, r = {}) { let i = w$14(r), a = { ...w$14(r), check: `string_format`, type: `string`, format: t, fn: typeof n == `function` ? n : (e) => n.test(e), ...i }; return n instanceof RegExp && (a.pattern = n), new e(a); } function Y$13(e) { let t = e?.target ?? `draft-2020-12`; return t === `draft-4` && (t = `draft-04`), t === `draft-7` && (t = `draft-07`), { processors: e.processors ?? {}, metadataRegistry: e?.metadata ?? K$10, target: t, unrepresentable: e?.unrepresentable ?? `throw`, override: e?.override ?? (() => {}), io: e?.io ?? `output`, counter: 0, seen: /* @__PURE__ */ new Map(), cycles: e?.cycles ?? `ref`, reused: e?.reused ?? `inline`, external: e?.external ?? void 0 }; } function X$13(e, t, n = { path: [], schemaPath: [] }) { var r; let i = e._zod.def, a = t.seen.get(e); if (a) return a.count++, n.schemaPath.includes(e) && (a.cycle = n.path), a.schema; let o = { schema: {}, count: 1, cycle: void 0, path: n.path }; t.seen.set(e, o); let s = e._zod.toJSONSchema?.(); if (s) o.schema = s; else { let r = { ...n, schemaPath: [...n.schemaPath, e], path: n.path }; if (e._zod.processJSONSchema) e._zod.processJSONSchema(t, o.schema, r); else { let n = o.schema, a = t.processors[i.type]; if (!a) throw Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`); a(e, t, n, r); } let a = e._zod.parent; a && (o.ref ||= a, X$13(a, t, r), t.seen.get(a).isParent = !0); } let c = t.metadataRegistry.get(e); return c && Object.assign(o.schema, c), t.io === `input` && $$11(e) && (delete o.schema.examples, delete o.schema.default), t.io === `input` && `_prefault` in o.schema && ((r = o.schema).default ?? (r.default = o.schema._prefault)), delete o.schema._prefault, t.seen.get(e).schema; } function Z$12(e, t) { let n = e.seen.get(t); if (!n) throw Error(`Unprocessed schema. This is a bug in Zod.`); let r = /* @__PURE__ */ new Map(); for (let t of e.seen.entries()) { let n = e.metadataRegistry.get(t[0])?.id; if (n) { let e = r.get(n); if (e && e !== t[0]) throw Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`); r.set(n, t[0]); } } let i = (t) => { let r = e.target === `draft-2020-12` ? `$defs` : `definitions`; if (e.external) { let n = e.external.registry.get(t[0])?.id, i = e.external.uri ?? ((e) => e); if (n) return { ref: i(n) }; let a = t[1].defId ?? t[1].schema.id ?? `schema${e.counter++}`; return t[1].defId = a, { defId: a, ref: `${i(`__shared`)}#/${r}/${a}` }; } if (t[1] === n) return { ref: `#` }; let i = `#/${r}/`, a = t[1].schema.id ?? `__schema${e.counter++}`; return { defId: a, ref: i + a }; }, a = (e) => { if (e[1].schema.$ref) return; let t = e[1], { ref: n, defId: r } = i(e); t.def = { ...t.schema }, r && (t.defId = r); let a = t.schema; for (let e in a) delete a[e]; a.$ref = n; }; if (e.cycles === `throw`) for (let t of e.seen.entries()) { let e = t[1]; if (e.cycle) throw Error(`Cycle detected: #/${e.cycle?.join(`/`)}/ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`); } for (let n of e.seen.entries()) { let r = n[1]; if (t === n[0]) { a(n); continue; } if (e.external) { let r = e.external.registry.get(n[0])?.id; if (t !== n[0] && r) { a(n); continue; } } if (e.metadataRegistry.get(n[0])?.id) { a(n); continue; } if (r.cycle) { a(n); continue; } if (r.count > 1 && e.reused === `ref`) { a(n); continue; } } } function Q$11(e, t) { let n = e.seen.get(t); if (!n) throw Error(`Unprocessed schema. This is a bug in Zod.`); let r = (t) => { let n = e.seen.get(t); if (n.ref === null) return; let i = n.def ?? n.schema, a = { ...i }, o = n.ref; if (n.ref = null, o) { r(o); let n = e.seen.get(o), s = n.schema; if (s.$ref && (e.target === `draft-07` || e.target === `draft-04` || e.target === `openapi-3.0`) ? (i.allOf = i.allOf ?? [], i.allOf.push(s)) : Object.assign(i, s), Object.assign(i, a), t._zod.parent === o) for (let e in i) e === `$ref` || e === `allOf` || e in a || delete i[e]; if (s.$ref && n.def) for (let e in i) e === `$ref` || e === `allOf` || e in n.def && JSON.stringify(i[e]) === JSON.stringify(n.def[e]) && delete i[e]; } let s = t._zod.parent; if (s && s !== o) { r(s); let t = e.seen.get(s); if (t?.schema.$ref && (i.$ref = t.schema.$ref, t.def)) for (let e in i) e === `$ref` || e === `allOf` || e in t.def && JSON.stringify(i[e]) === JSON.stringify(t.def[e]) && delete i[e]; } e.override({ zodSchema: t, jsonSchema: i, path: n.path ?? [] }); }; for (let t of [...e.seen.entries()].reverse()) r(t[0]); let i = {}; if (e.target === `draft-2020-12` ? i.$schema = `https://json-schema.org/draft/2020-12/schema` : e.target === `draft-07` ? i.$schema = `http://json-schema.org/draft-07/schema#` : e.target === `draft-04` ? i.$schema = `http://json-schema.org/draft-04/schema#` : e.target, e.external?.uri) { let n = e.external.registry.get(t)?.id; if (!n) throw Error("Schema is missing an `id` property"); i.$id = e.external.uri(n); } Object.assign(i, n.def ?? n.schema); let a = e.metadataRegistry.get(t)?.id; a !== void 0 && i.id === a && delete i.id; let o = e.external?.defs ?? {}; for (let t of e.seen.entries()) { let e = t[1]; e.def && e.defId && (e.def.id === e.defId && delete e.def.id, o[e.defId] = e.def); } e.external || Object.keys(o).length > 0 && (e.target === `draft-2020-12` ? i.$defs = o : i.definitions = o); try { let n = JSON.parse(JSON.stringify(i)); return Object.defineProperty(n, "~standard", { value: { ...t[`~standard`], jsonSchema: { input: qc$3(t, `input`, e.processors), output: qc$3(t, `output`, e.processors) } }, enumerable: !1, writable: !1 }), n; } catch { throw Error(`Error converting schema to JSON.`); } } function $$11(e, t) { let n = t ?? { seen: /* @__PURE__ */ new Set() }; if (n.seen.has(e)) return !1; n.seen.add(e); let r = e._zod.def; if (r.type === `transform`) return !0; if (r.type === `array`) return $$11(r.element, n); if (r.type === `set`) return $$11(r.valueType, n); if (r.type === `lazy`) return $$11(r.getter(), n); if (r.type === `promise` || r.type === `optional` || r.type === `nonoptional` || r.type === `nullable` || r.type === `readonly` || r.type === "default" || r.type === `prefault`) return $$11(r.innerType, n); if (r.type === `intersection`) return $$11(r.left, n) || $$11(r.right, n); if (r.type === `record` || r.type === `map`) return $$11(r.keyType, n) || $$11(r.valueType, n); if (r.type === `pipe`) return e._zod.traits.has(`$ZodCodec`) ? !0 : $$11(r.in, n) || $$11(r.out, n); if (r.type === `object`) { for (let e in r.shape) if ($$11(r.shape[e], n)) return !0; return !1; } if (r.type === `union`) { for (let e of r.options) if ($$11(e, n)) return !0; return !1; } if (r.type === `tuple`) { for (let e of r.items) if ($$11(e, n)) return !0; return !!(r.rest && $$11(r.rest, n)); } return !1; } const Kc$3 = (e, t = {}) => (n) => { let r = Y$13({ ...n, processors: t }); return X$13(e, r), Z$12(r, e), Q$11(r, e); }; const qc$3 = (e, t, n = {}) => (r) => { let { libraryOptions: i, target: a } = r ?? {}, o = Y$13({ ...i ?? {}, target: a, io: t, processors: n }); return X$13(e, o), Z$12(o, e), Q$11(o, e); }; const Jc$3 = { guid: `uuid`, url: `uri`, datetime: `date-time`, json_string: `json-string`, regex: `` }; const Yc$3 = (e, t, n, r) => { let i = n; i.type = `string`; let { minimum: a, maximum: o, format: s, patterns: c, contentEncoding: l } = e._zod.bag; if (typeof a == `number` && (i.minLength = a), typeof o == `number` && (i.maxLength = o), s && (i.format = Jc$3[s] ?? s, i.format === `` && delete i.format, s === `time` && delete i.format), l && (i.contentEncoding = l), c && c.size > 0) { let e = [...c]; e.length === 1 ? i.pattern = e[0].source : e.length > 1 && (i.allOf = [...e.map((e) => ({ ...t.target === `draft-07` || t.target === `draft-04` || t.target === `openapi-3.0` ? { type: `string` } : {}, pattern: e.source }))]); } }; const Xc$3 = (e, t, n, r) => { let i = n, { minimum: a, maximum: o, format: s, multipleOf: c, exclusiveMaximum: l, exclusiveMinimum: u } = e._zod.bag; typeof s == `string` && s.includes(`int`) ? i.type = `integer` : i.type = `number`; let d = typeof u == `number` && u >= (a ?? -Infinity), f = typeof l == `number` && l <= (o ?? Infinity), p = t.target === `draft-04` || t.target === `openapi-3.0`; d ? p ? (i.minimum = u, i.exclusiveMinimum = !0) : i.exclusiveMinimum = u : typeof a == `number` && (i.minimum = a), f ? p ? (i.maximum = l, i.exclusiveMaximum = !0) : i.exclusiveMaximum = l : typeof o == `number` && (i.maximum = o), typeof c == `number` && (i.multipleOf = c); }; const Zc$3 = (e, t, n, r) => { n.type = `boolean`; }; const Qc$3 = (e, t, n, r) => { if (t.unrepresentable === `throw`) throw Error(`BigInt cannot be represented in JSON Schema`); }; const $c$3 = (e, t, n, r) => { if (t.unrepresentable === `throw`) throw Error(`Symbols cannot be represented in JSON Schema`); }; const el$3 = (e, t, n, r) => { t.target === `openapi-3.0` ? (n.type = `string`, n.nullable = !0, n.enum = [null]) : n.type = `null`; }; const tl$3 = (e, t, n, r) => { if (t.unrepresentable === `throw`) throw Error(`Undefined cannot be represented in JSON Schema`); }; const nl$3 = (e, t, n, r) => { if (t.unrepresentable === `throw`) throw Error(`Void cannot be represented in JSON Schema`); }; const rl$3 = (e, t, n, r) => { n.not = {}; }; const il$3 = (e, t, n, r) => {}; const al$3 = (e, t, n, r) => {}; const ol$3 = (e, t, n, r) => { if (t.unrepresentable === `throw`) throw Error(`Date cannot be represented in JSON Schema`); }; const sl$3 = (e, t, n, r) => { let i = e._zod.def, a = ne$7(i.entries); a.every((e) => typeof e == `number`) && (n.type = `number`), a.every((e) => typeof e == `string`) && (n.type = `string`), n.enum = a; }; const cl$3 = (e, t, n, r) => { let i = e._zod.def, a = []; for (let e of i.values) if (e === void 0) { if (t.unrepresentable === `throw`) throw Error("Literal `undefined` cannot be represented in JSON Schema"); } else if (typeof e == `bigint`) { if (t.unrepresentable === `throw`) throw Error(`BigInt literals cannot be represented in JSON Schema`); a.push(Number(e)); } else a.push(e); if (a.length !== 0) if (a.length === 1) { let e = a[0]; n.type = e === null ? `null` : typeof e, t.target === `draft-04` || t.target === `openapi-3.0` ? n.enum = [e] : n.const = e; } else a.every((e) => typeof e == `number`) && (n.type = `number`), a.every((e) => typeof e == `string`) && (n.type = `string`), a.every((e) => typeof e == `boolean`) && (n.type = `boolean`), a.every((e) => e === null) && (n.type = `null`), n.enum = a; }; const ll$3 = (e, t, n, r) => { if (t.unrepresentable === `throw`) throw Error(`NaN cannot be represented in JSON Schema`); }; const ul$3 = (e, t, n, r) => { let i = n, a = e._zod.pattern; if (!a) throw Error(`Pattern not found in template literal`); i.type = `string`, i.pattern = a.source; }; const dl$3 = (e, t, n, r) => { let i = n, a = { type: `string`, format: `binary`, contentEncoding: `binary` }, { minimum: o, maximum: s, mime: c } = e._zod.bag; o !== void 0 && (a.minLength = o), s !== void 0 && (a.maxLength = s), c ? c.length === 1 ? (a.contentMediaType = c[0], Object.assign(i, a)) : (Object.assign(i, a), i.anyOf = c.map((e) => ({ contentMediaType: e }))) : Object.assign(i, a); }; const fl$3 = (e, t, n, r) => { n.type = `boolean`; }; const pl$3 = (e, t, n, r) => { if (t.unrepresentable === `throw`) throw Error(`Custom types cannot be represented in JSON Schema`); }; const ml$3 = (e, t, n, r) => { if (t.unrepresentable === `throw`) throw Error(`Function types cannot be represented in JSON Schema`); }; const hl$3 = (e, t, n, r) => { if (t.unrepresentable === `throw`) throw Error(`Transforms cannot be represented in JSON Schema`); }; const gl$3 = (e, t, n, r) => { if (t.unrepresentable === `throw`) throw Error(`Map cannot be represented in JSON Schema`); }; const _l$3 = (e, t, n, r) => { if (t.unrepresentable === `throw`) throw Error(`Set cannot be represented in JSON Schema`); }; const vl$3 = (e, t, n, r) => { let i = n, a = e._zod.def, { minimum: o, maximum: s } = e._zod.bag; typeof o == `number` && (i.minItems = o), typeof s == `number` && (i.maxItems = s), i.type = `array`, i.items = X$13(a.element, t, { ...r, path: [...r.path, `items`] }); }; const yl$3 = (e, t, n, r) => { let i = n, a = e._zod.def; i.type = `object`, i.properties = {}; let o = a.shape; for (let e in o) i.properties[e] = X$13(o[e], t, { ...r, path: [ ...r.path, `properties`, e ] }); let s = new Set(Object.keys(o)), c = new Set([...s].filter((e) => { let n = a.shape[e]._zod; return t.io === `input` ? n.optin === void 0 : n.optout === void 0; })); c.size > 0 && (i.required = Array.from(c)), a.catchall?._zod.def.type === `never` ? i.additionalProperties = !1 : a.catchall ? a.catchall && (i.additionalProperties = X$13(a.catchall, t, { ...r, path: [...r.path, `additionalProperties`] })) : t.io === `output` && (i.additionalProperties = !1); }; const bl$3 = (e, t, n, r) => { let i = e._zod.def, a = i.inclusive === !1, o = i.options.map((e, n) => X$13(e, t, { ...r, path: [ ...r.path, a ? `oneOf` : `anyOf`, n ] })); a ? n.oneOf = o : n.anyOf = o; }; const xl$3 = (e, t, n, r) => { let i = e._zod.def, a = X$13(i.left, t, { ...r, path: [ ...r.path, `allOf`, 0 ] }), o = X$13(i.right, t, { ...r, path: [ ...r.path, `allOf`, 1 ] }), s = (e) => `allOf` in e && Object.keys(e).length === 1; n.allOf = [...s(a) ? a.allOf : [a], ...s(o) ? o.allOf : [o]]; }; const Sl$3 = (e, t, n, r) => { let i = n, a = e._zod.def; i.type = `array`; let o = t.target === `draft-2020-12` ? `prefixItems` : `items`, s = t.target === `draft-2020-12` || t.target === `openapi-3.0` ? `items` : `additionalItems`, c = a.items.map((e, n) => X$13(e, t, { ...r, path: [ ...r.path, o, n ] })), l = a.rest ? X$13(a.rest, t, { ...r, path: [ ...r.path, s, ...t.target === `openapi-3.0` ? [a.items.length] : [] ] }) : null; t.target === `draft-2020-12` ? (i.prefixItems = c, l && (i.items = l)) : t.target === `openapi-3.0` ? (i.items = { anyOf: c }, l && i.items.anyOf.push(l), i.minItems = c.length, l || (i.maxItems = c.length)) : (i.items = c, l && (i.additionalItems = l)); let { minimum: u, maximum: d } = e._zod.bag; typeof u == `number` && (i.minItems = u), typeof d == `number` && (i.maxItems = d); }; const Cl$3 = (e, t, n, r) => { let i = n, a = e._zod.def; i.type = `object`; let o = a.keyType, s = o._zod.bag?.patterns; if (a.mode === `loose` && s && s.size > 0) { let e = X$13(a.valueType, t, { ...r, path: [ ...r.path, `patternProperties`, `*` ] }); i.patternProperties = {}; for (let t of s) i.patternProperties[t.source] = e; } else (t.target === `draft-07` || t.target === `draft-2020-12`) && (i.propertyNames = X$13(a.keyType, t, { ...r, path: [...r.path, `propertyNames`] })), i.additionalProperties = X$13(a.valueType, t, { ...r, path: [...r.path, `additionalProperties`] }); let c = o._zod.values; if (c) { let e = [...c].filter((e) => typeof e == `string` || typeof e == `number`); e.length > 0 && (i.required = e); } }; const wl$3 = (e, t, n, r) => { let i = e._zod.def, a = X$13(i.innerType, t, r), o = t.seen.get(e); t.target === `openapi-3.0` ? (o.ref = i.innerType, n.nullable = !0) : n.anyOf = [a, { type: `null` }]; }; const Tl$3 = (e, t, n, r) => { let i = e._zod.def; X$13(i.innerType, t, r); let a = t.seen.get(e); a.ref = i.innerType; }; const El$3 = (e, t, n, r) => { let i = e._zod.def; X$13(i.innerType, t, r); let a = t.seen.get(e); a.ref = i.innerType, n.default = JSON.parse(JSON.stringify(i.defaultValue)); }; const Dl$3 = (e, t, n, r) => { let i = e._zod.def; X$13(i.innerType, t, r); let a = t.seen.get(e); a.ref = i.innerType, t.io === `input` && (n._prefault = JSON.parse(JSON.stringify(i.defaultValue))); }; const Ol$3 = (e, t, n, r) => { let i = e._zod.def; X$13(i.innerType, t, r); let a = t.seen.get(e); a.ref = i.innerType; let o; try { o = i.catchValue(void 0); } catch { throw Error(`Dynamic catch values are not supported in JSON Schema`); } n.default = o; }; const kl$3 = (e, t, n, r) => { let i = e._zod.def, a = i.in._zod.traits.has(`$ZodTransform`), o = t.io === `input` ? a ? i.out : i.in : i.out; X$13(o, t, r); let s = t.seen.get(e); s.ref = o; }; const Al$3 = (e, t, n, r) => { let i = e._zod.def; X$13(i.innerType, t, r); let a = t.seen.get(e); a.ref = i.innerType, n.readOnly = !0; }; const jl$3 = (e, t, n, r) => { let i = e._zod.def; X$13(i.innerType, t, r); let a = t.seen.get(e); a.ref = i.innerType; }; const Ml$3 = (e, t, n, r) => { let i = e._zod.def; X$13(i.innerType, t, r); let a = t.seen.get(e); a.ref = i.innerType; }; const Nl$3 = (e, t, n, r) => { let i = e._zod.innerType; X$13(i, t, r); let a = t.seen.get(e); a.ref = i; }; const Pl$3 = { string: Yc$3, number: Xc$3, boolean: Zc$3, bigint: Qc$3, symbol: $c$3, null: el$3, undefined: tl$3, void: nl$3, never: rl$3, any: il$3, unknown: al$3, date: ol$3, enum: sl$3, literal: cl$3, nan: ll$3, template_literal: ul$3, file: dl$3, success: fl$3, custom: pl$3, function: ml$3, transform: hl$3, map: gl$3, set: _l$3, array: vl$3, object: yl$3, union: bl$3, intersection: xl$3, tuple: Sl$3, record: Cl$3, nullable: wl$3, nonoptional: Tl$3, default: El$3, prefault: Dl$3, catch: Ol$3, pipe: kl$3, readonly: Al$3, promise: jl$3, optional: Ml$3, lazy: Nl$3 }; function Fl$3(e, t) { if (`_idmap` in e) { let n = e, r = Y$13({ ...t, processors: Pl$3 }), i = {}; for (let e of n._idmap.entries()) { let [t, n] = e; X$13(n, r); } let a = {}; r.external = { registry: n, uri: t?.uri, defs: i }; for (let e of n._idmap.entries()) { let [t, n] = e; Z$12(r, n), a[t] = Q$11(r, n); } return Object.keys(i).length > 0 && (a.__shared = { [r.target === `draft-2020-12` ? `$defs` : `definitions`]: i }), { schemas: a }; } let n = Y$13({ ...t, processors: Pl$3 }); return X$13(e, n), Z$12(n, e), Q$11(n, e); } var Il$3 = class { get metadataRegistry() { return this.ctx.metadataRegistry; } get target() { return this.ctx.target; } get unrepresentable() { return this.ctx.unrepresentable; } get override() { return this.ctx.override; } get io() { return this.ctx.io; } get counter() { return this.ctx.counter; } set counter(e) { this.ctx.counter = e; } get seen() { return this.ctx.seen; } constructor(e) { let t = e?.target ?? `draft-2020-12`; t === `draft-4` && (t = `draft-04`), t === `draft-7` && (t = `draft-07`), this.ctx = Y$13({ processors: Pl$3, target: t, ...e?.metadata && { metadata: e.metadata }, ...e?.unrepresentable && { unrepresentable: e.unrepresentable }, ...e?.override && { override: e.override }, ...e?.io && { io: e.io } }); } process(e, t = { path: [], schemaPath: [] }) { return X$13(e, this.ctx, t); } emit(e, t) { t && (t.cycles && (this.ctx.cycles = t.cycles), t.reused && (this.ctx.reused = t.reused), t.external && (this.ctx.external = t.external)), Z$12(this.ctx, e); let { "~standard": n, ...r } = Q$11(this.ctx, e); return r; } }; var Ll$3 = t$13({}); var Rl$3 = t$13({ $ZodAny: () => jr$5, $ZodArray: () => Lr$5, $ZodAsyncError: () => o$13, $ZodBase64: () => gr$4, $ZodBase64URL: () => vr$5, $ZodBigInt: () => Er$5, $ZodBigIntFormat: () => Dr$5, $ZodBoolean: () => Tr$5, $ZodCIDRv4: () => pr$5, $ZodCIDRv6: () => mr$4, $ZodCUID: () => tr$4, $ZodCUID2: () => nr$4, $ZodCatch: () => bi$5, $ZodCheck: () => B$13, $ZodCheckBigIntFormat: () => kn$6, $ZodCheckEndsWith: () => Vn$4, $ZodCheckGreaterThan: () => En$6, $ZodCheckIncludes: () => zn$4, $ZodCheckLengthEquals: () => Fn$4, $ZodCheckLessThan: () => Tn$6, $ZodCheckLowerCase: () => Ln$4, $ZodCheckMaxLength: () => Nn$5, $ZodCheckMaxSize: () => An$5, $ZodCheckMimeType: () => Wn$4, $ZodCheckMinLength: () => Pn$5, $ZodCheckMinSize: () => jn$5, $ZodCheckMultipleOf: () => Dn$6, $ZodCheckNumberFormat: () => On$6, $ZodCheckOverwrite: () => Gn$4, $ZodCheckProperty: () => Un$4, $ZodCheckRegex: () => In$4, $ZodCheckSizeEquals: () => Mn$6, $ZodCheckStartsWith: () => Bn$4, $ZodCheckStringFormat: () => V$12, $ZodCheckUpperCase: () => Rn$4, $ZodCodec: () => wi$6, $ZodCustom: () => Pi$6, $ZodCustomStringFormat: () => Sr$5, $ZodDate: () => Fr$5, $ZodDefault: () => mi$5, $ZodDiscriminatedUnion: () => qr$5, $ZodE164: () => yr$5, $ZodEmail: () => Zn$4, $ZodEmoji: () => $n$4, $ZodEncodeError: () => s$11, $ZodEnum: () => oi$5, $ZodError: () => We$9, $ZodExactOptional: () => fi$5, $ZodFile: () => ci$5, $ZodFunction: () => ji$6, $ZodGUID: () => Yn$4, $ZodIPv4: () => ur$5, $ZodIPv6: () => dr$5, $ZodISODate: () => sr$4, $ZodISODateTime: () => or$4, $ZodISODuration: () => lr$5, $ZodISOTime: () => cr$4, $ZodIntersection: () => Jr$5, $ZodJWT: () => xr$5, $ZodKSUID: () => ar$4, $ZodLazy: () => Ni$6, $ZodLiteral: () => si$5, $ZodMAC: () => fr$4, $ZodMap: () => ni$5, $ZodNaN: () => xi$5, $ZodNanoID: () => er$4, $ZodNever: () => Nr$5, $ZodNonOptional: () => _i$5, $ZodNull: () => Ar$5, $ZodNullable: () => pi$5, $ZodNumber: () => Cr$5, $ZodNumberFormat: () => wr$5, $ZodObject: () => Vr$5, $ZodObjectJIT: () => Hr$5, $ZodOptional: () => di$5, $ZodPipe: () => Si$6, $ZodPrefault: () => gi$5, $ZodPreprocess: () => Di$6, $ZodPromise: () => Mi$6, $ZodReadonly: () => Oi$6, $ZodRealError: () => M$12, $ZodRecord: () => ti$5, $ZodRegistry: () => zo$4, $ZodSet: () => ii$5, $ZodString: () => Jn$4, $ZodStringFormat: () => U$11, $ZodSuccess: () => yi$5, $ZodSymbol: () => Or$5, $ZodTemplateLiteral: () => Ai$6, $ZodTransform: () => li$5, $ZodTuple: () => Zr$5, $ZodType: () => H$11, $ZodULID: () => rr$4, $ZodURL: () => Qn$4, $ZodUUID: () => Xn$5, $ZodUndefined: () => kr$5, $ZodUnion: () => Wr$5, $ZodUnknown: () => Mr$5, $ZodVoid: () => Pr$5, $ZodXID: () => ir$4, $ZodXor: () => Kr$5, $brand: () => a$13, $constructor: () => i$16, $input: () => Ro$4, $output: () => Lo$4, Doc: () => Kn$4, JSONSchema: () => Ll$3, JSONSchemaGenerator: () => Il$3, NEVER: () => r$17, TimePrecision: () => fs$4, _any: () => Ns$4, _array: () => pc$3, _base64: () => cs$4, _base64url: () => ls$4, _bigint: () => Es$4, _boolean: () => ws$4, _catch: () => Mc$3, _check: () => Vc$3, _cidrv4: () => os$4, _cidrv6: () => ss$4, _coercedBigint: () => Ds$4, _coercedBoolean: () => Ts$4, _coercedDate: () => Rs$3, _coercedNumber: () => vs$4, _coercedString: () => Ho$4, _cuid: () => Qo$4, _cuid2: () => $o$4, _custom: () => Rc$3, _date: () => Ls$4, _decode: () => nt$10, _decodeAsync: () => ot$8, _default: () => kc$3, _discriminatedUnion: () => gc$3, _e164: () => us$4, _email: () => Uo$4, _emoji: () => Xo$4, _encode: () => et$9, _encodeAsync: () => it$8, _endsWith: () => ac$3, _enum: () => Sc$3, _file: () => Tc$3, _float32: () => bs$4, _float64: () => xs$4, _gt: () => Hs$3, _gte: () => q$10, _guid: () => Wo$4, _includes: () => rc$3, _int: () => ys$4, _int32: () => Ss$4, _int64: () => Os$4, _intersection: () => _c$3, _ipv4: () => rs$4, _ipv6: () => is$4, _isoDate: () => ms$4, _isoDateTime: () => ps$4, _isoDuration: () => gs$4, _isoTime: () => hs$4, _jwt: () => ds$4, _ksuid: () => ns$4, _lazy: () => Ic$3, _length: () => $s$3, _literal: () => wc$3, _lowercase: () => tc$3, _lt: () => Bs$3, _lte: () => Vs$3, _mac: () => as$4, _map: () => bc$3, _max: () => Vs$3, _maxLength: () => Zs$3, _maxSize: () => Js$3, _mime: () => sc$3, _min: () => q$10, _minLength: () => Qs$3, _minSize: () => Ys$3, _multipleOf: () => qs$3, _nan: () => zs$3, _nanoid: () => Zo$4, _nativeEnum: () => Cc$3, _negative: () => Ws$3, _never: () => Fs$4, _nonnegative: () => Ks$3, _nonoptional: () => Ac$3, _nonpositive: () => Gs$3, _normalize: () => cc$3, _null: () => Ms$4, _nullable: () => Oc$3, _number: () => _s$4, _optional: () => Dc$3, _overwrite: () => J$10, _parse: () => N$11, _parseAsync: () => P$11, _pipe: () => Nc$3, _positive: () => Us$3, _promise: () => Lc$3, _property: () => oc$3, _readonly: () => Pc$3, _record: () => yc$3, _refine: () => zc$3, _regex: () => ec$3, _safeDecode: () => ut$8, _safeDecodeAsync: () => mt$8, _safeEncode: () => ct$8, _safeEncodeAsync: () => ft$8, _safeParse: () => F$11, _safeParseAsync: () => I$11, _set: () => xc$3, _size: () => Xs$3, _slugify: () => fc$3, _startsWith: () => ic$3, _string: () => Vo$4, _stringFormat: () => Gc$3, _stringbool: () => Wc$3, _success: () => jc$3, _superRefine: () => Bc$3, _symbol: () => As$4, _templateLiteral: () => Fc$3, _toLowerCase: () => uc$3, _toUpperCase: () => dc$3, _transform: () => Ec$3, _trim: () => lc$3, _tuple: () => vc$3, _uint32: () => Cs$4, _uint64: () => ks$4, _ulid: () => es$4, _undefined: () => js$4, _union: () => mc$3, _unknown: () => Ps$4, _uppercase: () => nc$3, _url: () => Yo$4, _uuid: () => Go$4, _uuidv4: () => Ko$4, _uuidv6: () => qo$4, _uuidv7: () => Jo$4, _void: () => Is$4, _xid: () => ts$4, _xor: () => hc$3, clone: () => C$14, config: () => l$12, createStandardJSONSchemaMethod: () => qc$3, createToJSONSchemaMethod: () => Kc$3, decode: () => rt$9, decodeAsync: () => st$8, describe: () => Hc$3, encode: () => tt$10, encodeAsync: () => at$8, extractDefs: () => Z$12, finalize: () => Q$11, flattenError: () => Ge$9, formatError: () => Ke$9, globalConfig: () => c$13, globalRegistry: () => K$10, initializeContext: () => Y$13, isValidBase64: () => hr$4, isValidBase64URL: () => _r$5, isValidJWT: () => br$5, locales: () => Fo$4, meta: () => Uc$3, parse: () => Xe$9, parseAsync: () => Ze$10, prettifyError: () => Ye$10, process: () => X$13, regexes: () => gt$8, registry: () => Bo$4, safeDecode: () => dt$8, safeDecodeAsync: () => ht$8, safeEncode: () => lt$8, safeEncodeAsync: () => pt$8, safeParse: () => Qe$9, safeParseAsync: () => $e$9, toDotPath: () => Je$10, toJSONSchema: () => Fl$3, treeifyError: () => qe$9, util: () => u$14, version: () => qn$4 }); //#endregion //#region node_modules/eve/dist/src/compiled/zod/index.js var Si$5 = t$13({ endsWith: () => ac$3, gt: () => Hs$3, gte: () => q$10, includes: () => rc$3, length: () => $s$3, lowercase: () => tc$3, lt: () => Bs$3, lte: () => Vs$3, maxLength: () => Zs$3, maxSize: () => Js$3, mime: () => sc$3, minLength: () => Qs$3, minSize: () => Ys$3, multipleOf: () => qs$3, negative: () => Ws$3, nonnegative: () => Ks$3, nonpositive: () => Gs$3, normalize: () => cc$3, overwrite: () => J$10, positive: () => Us$3, property: () => oc$3, regex: () => ec$3, size: () => Xs$3, slugify: () => fc$3, startsWith: () => ic$3, toLowerCase: () => uc$3, toUpperCase: () => dc$3, trim: () => lc$3, uppercase: () => nc$3 }); var Ci$5 = t$13({ ZodISODate: () => Ei$5, ZodISODateTime: () => wi$5, ZodISODuration: () => Ai$5, ZodISOTime: () => Oi$5, date: () => Di$5, datetime: () => Ti$5, duration: () => ji$5, time: () => ki$5 }); const wi$5 = i$16(`ZodISODateTime`, (e, t) => { or$4.init(e, t), T$13.init(e, t); }); function Ti$5(e) { return ps$4(wi$5, e); } const Ei$5 = i$16(`ZodISODate`, (e, t) => { sr$4.init(e, t), T$13.init(e, t); }); function Di$5(e) { return ms$4(Ei$5, e); } const Oi$5 = i$16(`ZodISOTime`, (e, t) => { cr$4.init(e, t), T$13.init(e, t); }); function ki$5(e) { return hs$4(Oi$5, e); } const Ai$5 = i$16(`ZodISODuration`, (e, t) => { lr$5.init(e, t), T$13.init(e, t); }); function ji$5(e) { return gs$4(Ai$5, e); } const Mi$5 = (e, t) => { We$9.init(e, t), e.name = `ZodError`, Object.defineProperties(e, { format: { value: (t) => Ke$9(e, t) }, flatten: { value: (t) => Ge$9(e, t) }, addIssue: { value: (t) => { e.issues.push(t), e.message = JSON.stringify(e.issues, re$8, 2); } }, addIssues: { value: (t) => { e.issues.push(...t), e.message = JSON.stringify(e.issues, re$8, 2); } }, isEmpty: { get() { return e.issues.length === 0; } } }); }; const Ni$5 = i$16(`ZodError`, Mi$5); const b$10 = i$16(`ZodError`, Mi$5, { Parent: Error }); const Pi$5 = N$11(b$10); const Fi$5 = P$11(b$10); const Ii$5 = F$11(b$10); const Li$5 = I$11(b$10); const Ri$5 = et$9(b$10); const zi$5 = nt$10(b$10); const Bi$5 = it$8(b$10); const Vi$5 = ot$8(b$10); const Hi$5 = ct$8(b$10); const Ui$5 = ut$8(b$10); const Wi$5 = ft$8(b$10); const Gi$5 = mt$8(b$10); var Ki$5 = t$13({ ZodAny: () => Qa$4, ZodArray: () => oo$3, ZodBase64: () => Ca$5, ZodBase64URL: () => Ta$5, ZodBigInt: () => R$11, ZodBigIntFormat: () => Ua$5, ZodBoolean: () => L$9, ZodCIDRv4: () => ya$5, ZodCIDRv6: () => xa$5, ZodCUID: () => M$11, ZodCUID2: () => N$10, ZodCatch: () => Yo$3, ZodCodec: () => Y$12, ZodCustom: () => Z$11, ZodCustomStringFormat: () => P$10, ZodDate: () => io$3, ZodDefault: () => Vo$3, ZodDiscriminatedUnion: () => ho$3, ZodE164: () => Da$5, ZodEmail: () => E$13, ZodEmoji: () => A$11, ZodEnum: () => G$8, ZodExactOptional: () => Lo$3, ZodFile: () => Mo$3, ZodFunction: () => ds$3, ZodGUID: () => D$12, ZodIPv4: () => pa$5, ZodIPv6: () => _a$5, ZodIntersection: () => _o$3, ZodJWT: () => ka$5, ZodKSUID: () => da$5, ZodLazy: () => ss$3, ZodLiteral: () => Ao$3, ZodMAC: () => ha$5, ZodMap: () => wo$3, ZodNaN: () => Zo$3, ZodNanoID: () => j$11, ZodNever: () => to$4, ZodNonOptional: () => Go$3, ZodNull: () => Xa$4, ZodNullable: () => zo$3, ZodNumber: () => F$10, ZodNumberFormat: () => I$10, ZodObject: () => H$10, ZodOptional: () => Io$3, ZodPipe: () => J$9, ZodPrefault: () => Uo$3, ZodPreprocess: () => ns$3, ZodPromise: () => ls$3, ZodReadonly: () => rs$3, ZodRecord: () => W$8, ZodSet: () => Eo$3, ZodString: () => C$13, ZodStringFormat: () => T$13, ZodSuccess: () => qo$3, ZodSymbol: () => Ka$5, ZodTemplateLiteral: () => as$3, ZodTransform: () => Po$3, ZodTuple: () => yo$3, ZodType: () => x$11, ZodULID: () => sa$5, ZodURL: () => k$12, ZodUUID: () => O$11, ZodUndefined: () => Ja$4, ZodUnion: () => U$10, ZodUnknown: () => eo$4, ZodVoid: () => no$3, ZodXID: () => la$5, ZodXor: () => po$3, _ZodString: () => S$12, _default: () => Ho$3, _function: () => X$12, any: () => $a$4, array: () => V$11, base64: () => wa$5, base64url: () => Ea$5, bigint: () => Ha$5, boolean: () => Va$5, catch: () => Xo$3, check: () => fs$3, cidrv4: () => ba$5, cidrv6: () => Sa$5, codec: () => es$3, cuid: () => aa$5, cuid2: () => oa$5, custom: () => ps$3, date: () => ao$3, describe: () => gs$3, discriminatedUnion: () => go$3, e164: () => Oa$5, email: () => Yi$5, emoji: () => ra$5, enum: () => Oo$3, exactOptional: () => Ro$3, file: () => No$3, float32: () => La$5, float64: () => Ra$5, function: () => X$12, guid: () => Xi$5, hash: () => Pa$5, hex: () => Na$5, hostname: () => Ma$5, httpUrl: () => na$5, instanceof: () => vs$3, int: () => Ia$5, int32: () => za$5, int64: () => Wa$5, intersection: () => vo$3, invertCodec: () => ts$3, ipv4: () => ma$5, ipv6: () => va$5, json: () => bs$3, jwt: () => Aa$5, keyof: () => so$3, ksuid: () => fa$5, lazy: () => cs$3, literal: () => jo$3, looseObject: () => uo$3, looseRecord: () => Co$3, mac: () => ga$5, map: () => To$3, meta: () => _s$3, nan: () => Qo$3, nanoid: () => ia$5, nativeEnum: () => ko$3, never: () => B$12, nonoptional: () => Ko$3, null: () => Za$4, nullable: () => q$9, nullish: () => Bo$3, number: () => Fa$5, object: () => co$3, optional: () => K$9, partialRecord: () => So$3, pipe: () => $o$3, prefault: () => Wo$3, preprocess: () => xs$3, promise: () => us$3, readonly: () => is$3, record: () => xo$3, refine: () => ms$3, set: () => Do$3, strictObject: () => lo$3, string: () => w$13, stringFormat: () => ja$5, stringbool: () => ys$3, success: () => Jo$3, superRefine: () => hs$3, symbol: () => qa$5, templateLiteral: () => os$3, transform: () => Fo$3, tuple: () => bo$3, uint32: () => Ba$5, uint64: () => Ga$5, ulid: () => ca$5, undefined: () => Ya$4, union: () => fo$3, unknown: () => z$11, url: () => ta$5, uuid: () => Zi$5, uuidv4: () => Qi$5, uuidv6: () => $i$5, uuidv7: () => ea$5, void: () => ro$3, xid: () => ua$5, xor: () => mo$3 }); const qi$5 = /* @__PURE__ */ new WeakMap(); function Ji$5(e, t, n) { let r = Object.getPrototypeOf(e), i = qi$5.get(r); if (i || (i = /* @__PURE__ */ new Set(), qi$5.set(r, i)), !i.has(t)) { i.add(t); for (let e in n) { let t = n[e]; Object.defineProperty(r, e, { configurable: !0, enumerable: !1, get() { let n = t.bind(this); return Object.defineProperty(this, e, { configurable: !0, writable: !0, enumerable: !0, value: n }), n; }, set(t) { Object.defineProperty(this, e, { configurable: !0, writable: !0, enumerable: !0, value: t }); } }); } } } const x$11 = i$16(`ZodType`, (e, t) => (H$11.init(e, t), Object.assign(e[`~standard`], { jsonSchema: { input: qc$3(e, `input`), output: qc$3(e, `output`) } }), e.toJSONSchema = Kc$3(e, {}), e.def = t, e.type = t.type, Object.defineProperty(e, "_def", { value: t }), e.parse = (t, n) => Pi$5(e, t, n, { callee: e.parse }), e.safeParse = (t, n) => Ii$5(e, t, n), e.parseAsync = async (t, n) => Fi$5(e, t, n, { callee: e.parseAsync }), e.safeParseAsync = async (t, n) => Li$5(e, t, n), e.spa = e.safeParseAsync, e.encode = (t, n) => Ri$5(e, t, n), e.decode = (t, n) => zi$5(e, t, n), e.encodeAsync = async (t, n) => Bi$5(e, t, n), e.decodeAsync = async (t, n) => Vi$5(e, t, n), e.safeEncode = (t, n) => Hi$5(e, t, n), e.safeDecode = (t, n) => Ui$5(e, t, n), e.safeEncodeAsync = async (t, n) => Wi$5(e, t, n), e.safeDecodeAsync = async (t, n) => Gi$5(e, t, n), Ji$5(e, `ZodType`, { check(...e) { let t = this.def; return this.clone(y$8(t, { checks: [...t.checks ?? [], ...e.map((e) => typeof e == `function` ? { _zod: { check: e, def: { check: `custom` }, onattach: [] } } : e)] }), { parent: !0 }); }, with(...e) { return this.check(...e); }, clone(e, t) { return C$14(this, e, t); }, brand() { return this; }, register(e, t) { return e.add(this, t), this; }, refine(e, t) { return this.check(ms$3(e, t)); }, superRefine(e, t) { return this.check(hs$3(e, t)); }, overwrite(e) { return this.check(J$10(e)); }, optional() { return K$9(this); }, exactOptional() { return Ro$3(this); }, nullable() { return q$9(this); }, nullish() { return K$9(q$9(this)); }, nonoptional(e) { return Ko$3(this, e); }, array() { return V$11(this); }, or(e) { return fo$3([this, e]); }, and(e) { return vo$3(this, e); }, transform(e) { return $o$3(this, Fo$3(e)); }, default(e) { return Ho$3(this, e); }, prefault(e) { return Wo$3(this, e); }, catch(e) { return Xo$3(this, e); }, pipe(e) { return $o$3(this, e); }, readonly() { return is$3(this); }, describe(e) { let t = this.clone(); return K$10.add(t, { description: e }), t; }, meta(...e) { if (e.length === 0) return K$10.get(this); let t = this.clone(); return K$10.add(t, e[0]), t; }, isOptional() { return this.safeParse(void 0).success; }, isNullable() { return this.safeParse(null).success; }, apply(e) { return e(this); } }), Object.defineProperty(e, "description", { get() { return K$10.get(e)?.description; }, configurable: !0 }), e)); const S$12 = i$16(`_ZodString`, (e, t) => { Jn$4.init(e, t), x$11.init(e, t), e._zod.processJSONSchema = (t, n, r) => Yc$3(e, t, n, r); let n = e._zod.bag; e.format = n.format ?? null, e.minLength = n.minimum ?? null, e.maxLength = n.maximum ?? null, Ji$5(e, `_ZodString`, { regex(...e) { return this.check(ec$3(...e)); }, includes(...e) { return this.check(rc$3(...e)); }, startsWith(...e) { return this.check(ic$3(...e)); }, endsWith(...e) { return this.check(ac$3(...e)); }, min(...e) { return this.check(Qs$3(...e)); }, max(...e) { return this.check(Zs$3(...e)); }, length(...e) { return this.check($s$3(...e)); }, nonempty(...e) { return this.check(Qs$3(1, ...e)); }, lowercase(e) { return this.check(tc$3(e)); }, uppercase(e) { return this.check(nc$3(e)); }, trim() { return this.check(lc$3()); }, normalize(...e) { return this.check(cc$3(...e)); }, toLowerCase() { return this.check(uc$3()); }, toUpperCase() { return this.check(dc$3()); }, slugify() { return this.check(fc$3()); } }); }); const C$13 = i$16(`ZodString`, (e, t) => { Jn$4.init(e, t), S$12.init(e, t), e.email = (t) => e.check(Uo$4(E$13, t)), e.url = (t) => e.check(Yo$4(k$12, t)), e.jwt = (t) => e.check(ds$4(ka$5, t)), e.emoji = (t) => e.check(Xo$4(A$11, t)), e.guid = (t) => e.check(Wo$4(D$12, t)), e.uuid = (t) => e.check(Go$4(O$11, t)), e.uuidv4 = (t) => e.check(Ko$4(O$11, t)), e.uuidv6 = (t) => e.check(qo$4(O$11, t)), e.uuidv7 = (t) => e.check(Jo$4(O$11, t)), e.nanoid = (t) => e.check(Zo$4(j$11, t)), e.guid = (t) => e.check(Wo$4(D$12, t)), e.cuid = (t) => e.check(Qo$4(M$11, t)), e.cuid2 = (t) => e.check($o$4(N$10, t)), e.ulid = (t) => e.check(es$4(sa$5, t)), e.base64 = (t) => e.check(cs$4(Ca$5, t)), e.base64url = (t) => e.check(ls$4(Ta$5, t)), e.xid = (t) => e.check(ts$4(la$5, t)), e.ksuid = (t) => e.check(ns$4(da$5, t)), e.ipv4 = (t) => e.check(rs$4(pa$5, t)), e.ipv6 = (t) => e.check(is$4(_a$5, t)), e.cidrv4 = (t) => e.check(os$4(ya$5, t)), e.cidrv6 = (t) => e.check(ss$4(xa$5, t)), e.e164 = (t) => e.check(us$4(Da$5, t)), e.datetime = (t) => e.check(Ti$5(t)), e.date = (t) => e.check(Di$5(t)), e.time = (t) => e.check(ki$5(t)), e.duration = (t) => e.check(ji$5(t)); }); function w$13(e) { return Vo$4(C$13, e); } const T$13 = i$16(`ZodStringFormat`, (e, t) => { U$11.init(e, t), S$12.init(e, t); }); const E$13 = i$16(`ZodEmail`, (e, t) => { Zn$4.init(e, t), T$13.init(e, t); }); function Yi$5(e) { return Uo$4(E$13, e); } const D$12 = i$16(`ZodGUID`, (e, t) => { Yn$4.init(e, t), T$13.init(e, t); }); function Xi$5(e) { return Wo$4(D$12, e); } const O$11 = i$16(`ZodUUID`, (e, t) => { Xn$5.init(e, t), T$13.init(e, t); }); function Zi$5(e) { return Go$4(O$11, e); } function Qi$5(e) { return Ko$4(O$11, e); } function $i$5(e) { return qo$4(O$11, e); } function ea$5(e) { return Jo$4(O$11, e); } const k$12 = i$16(`ZodURL`, (e, t) => { Qn$4.init(e, t), T$13.init(e, t); }); function ta$5(e) { return Yo$4(k$12, e); } function na$5(e) { return Yo$4(k$12, { protocol: Gt$6, hostname: Wt$6, ...w$14(e) }); } const A$11 = i$16(`ZodEmoji`, (e, n) => { $n$4.init(e, n), T$13.init(e, n); }); function ra$5(e) { return Xo$4(A$11, e); } const j$11 = i$16(`ZodNanoID`, (e, t) => { er$4.init(e, t), T$13.init(e, t); }); function ia$5(e) { return Zo$4(j$11, e); } const M$11 = i$16(`ZodCUID`, (e, t) => { tr$4.init(e, t), T$13.init(e, t); }); function aa$5(e) { return Qo$4(M$11, e); } const N$10 = i$16(`ZodCUID2`, (e, t) => { nr$4.init(e, t), T$13.init(e, t); }); function oa$5(e) { return $o$4(N$10, e); } const sa$5 = i$16(`ZodULID`, (e, t) => { rr$4.init(e, t), T$13.init(e, t); }); function ca$5(e) { return es$4(sa$5, e); } const la$5 = i$16(`ZodXID`, (e, t) => { ir$4.init(e, t), T$13.init(e, t); }); function ua$5(e) { return ts$4(la$5, e); } const da$5 = i$16(`ZodKSUID`, (e, t) => { ar$4.init(e, t), T$13.init(e, t); }); function fa$5(e) { return ns$4(da$5, e); } const pa$5 = i$16(`ZodIPv4`, (e, t) => { ur$5.init(e, t), T$13.init(e, t); }); function ma$5(e) { return rs$4(pa$5, e); } const ha$5 = i$16(`ZodMAC`, (e, t) => { fr$4.init(e, t), T$13.init(e, t); }); function ga$5(e) { return as$4(ha$5, e); } const _a$5 = i$16(`ZodIPv6`, (e, t) => { dr$5.init(e, t), T$13.init(e, t); }); function va$5(e) { return is$4(_a$5, e); } const ya$5 = i$16(`ZodCIDRv4`, (e, t) => { pr$5.init(e, t), T$13.init(e, t); }); function ba$5(e) { return os$4(ya$5, e); } const xa$5 = i$16(`ZodCIDRv6`, (e, t) => { mr$4.init(e, t), T$13.init(e, t); }); function Sa$5(e) { return ss$4(xa$5, e); } const Ca$5 = i$16(`ZodBase64`, (e, t) => { gr$4.init(e, t), T$13.init(e, t); }); function wa$5(e) { return cs$4(Ca$5, e); } const Ta$5 = i$16(`ZodBase64URL`, (e, t) => { vr$5.init(e, t), T$13.init(e, t); }); function Ea$5(e) { return ls$4(Ta$5, e); } const Da$5 = i$16(`ZodE164`, (e, t) => { yr$5.init(e, t), T$13.init(e, t); }); function Oa$5(e) { return us$4(Da$5, e); } const ka$5 = i$16(`ZodJWT`, (e, t) => { xr$5.init(e, t), T$13.init(e, t); }); function Aa$5(e) { return ds$4(ka$5, e); } const P$10 = i$16(`ZodCustomStringFormat`, (e, t) => { Sr$5.init(e, t), T$13.init(e, t); }); function ja$5(e, t, n = {}) { return Gc$3(P$10, e, t, n); } function Ma$5(e) { return Gc$3(P$10, `hostname`, Ut$6, e); } function Na$5(e) { return Gc$3(P$10, `hex`, cn$6, e); } function Pa$5(e, t) { let n = `${e}_${t?.enc ?? `hex`}`, r = gt$8[n]; if (!r) throw Error(`Unrecognized hash format: ${n}`); return Gc$3(P$10, n, r, t); } const F$10 = i$16(`ZodNumber`, (e, t) => { Cr$5.init(e, t), x$11.init(e, t), e._zod.processJSONSchema = (t, n, r) => Xc$3(e, t, n, r), Ji$5(e, `ZodNumber`, { gt(e, t) { return this.check(Hs$3(e, t)); }, gte(e, t) { return this.check(q$10(e, t)); }, min(e, t) { return this.check(q$10(e, t)); }, lt(e, t) { return this.check(Bs$3(e, t)); }, lte(e, t) { return this.check(Vs$3(e, t)); }, max(e, t) { return this.check(Vs$3(e, t)); }, int(e) { return this.check(Ia$5(e)); }, safe(e) { return this.check(Ia$5(e)); }, positive(e) { return this.check(Hs$3(0, e)); }, nonnegative(e) { return this.check(q$10(0, e)); }, negative(e) { return this.check(Bs$3(0, e)); }, nonpositive(e) { return this.check(Vs$3(0, e)); }, multipleOf(e, t) { return this.check(qs$3(e, t)); }, step(e, t) { return this.check(qs$3(e, t)); }, finite() { return this; } }); let n = e._zod.bag; e.minValue = Math.max(n.minimum ?? -Infinity, n.exclusiveMinimum ?? -Infinity) ?? null, e.maxValue = Math.min(n.maximum ?? Infinity, n.exclusiveMaximum ?? Infinity) ?? null, e.isInt = (n.format ?? ``).includes(`int`) || Number.isSafeInteger(n.multipleOf ?? .5), e.isFinite = !0, e.format = n.format ?? null; }); function Fa$5(e) { return _s$4(F$10, e); } const I$10 = i$16(`ZodNumberFormat`, (e, t) => { wr$5.init(e, t), F$10.init(e, t); }); function Ia$5(e) { return ys$4(I$10, e); } function La$5(e) { return bs$4(I$10, e); } function Ra$5(e) { return xs$4(I$10, e); } function za$5(e) { return Ss$4(I$10, e); } function Ba$5(e) { return Cs$4(I$10, e); } const L$9 = i$16(`ZodBoolean`, (e, t) => { Tr$5.init(e, t), x$11.init(e, t), e._zod.processJSONSchema = (t, n, r) => Zc$3(e, t, n, r); }); function Va$5(e) { return ws$4(L$9, e); } const R$11 = i$16(`ZodBigInt`, (e, t) => { Er$5.init(e, t), x$11.init(e, t), e._zod.processJSONSchema = (t, n, r) => Qc$3(e, t, n, r), e.gte = (t, n) => e.check(q$10(t, n)), e.min = (t, n) => e.check(q$10(t, n)), e.gt = (t, n) => e.check(Hs$3(t, n)), e.gte = (t, n) => e.check(q$10(t, n)), e.min = (t, n) => e.check(q$10(t, n)), e.lt = (t, n) => e.check(Bs$3(t, n)), e.lte = (t, n) => e.check(Vs$3(t, n)), e.max = (t, n) => e.check(Vs$3(t, n)), e.positive = (t) => e.check(Hs$3(BigInt(0), t)), e.negative = (t) => e.check(Bs$3(BigInt(0), t)), e.nonpositive = (t) => e.check(Vs$3(BigInt(0), t)), e.nonnegative = (t) => e.check(q$10(BigInt(0), t)), e.multipleOf = (t, n) => e.check(qs$3(t, n)); let n = e._zod.bag; e.minValue = n.minimum ?? null, e.maxValue = n.maximum ?? null, e.format = n.format ?? null; }); function Ha$5(e) { return Es$4(R$11, e); } const Ua$5 = i$16(`ZodBigIntFormat`, (e, t) => { Dr$5.init(e, t), R$11.init(e, t); }); function Wa$5(e) { return Os$4(Ua$5, e); } function Ga$5(e) { return ks$4(Ua$5, e); } const Ka$5 = i$16(`ZodSymbol`, (e, t) => { Or$5.init(e, t), x$11.init(e, t), e._zod.processJSONSchema = (t, n, r) => $c$3(e, t, n, r); }); function qa$5(e) { return As$4(Ka$5, e); } const Ja$4 = i$16(`ZodUndefined`, (e, t) => { kr$5.init(e, t), x$11.init(e, t), e._zod.processJSONSchema = (t, n, r) => tl$3(e, t, n, r); }); function Ya$4(e) { return js$4(Ja$4, e); } const Xa$4 = i$16(`ZodNull`, (e, t) => { Ar$5.init(e, t), x$11.init(e, t), e._zod.processJSONSchema = (t, n, r) => el$3(e, t, n, r); }); function Za$4(e) { return Ms$4(Xa$4, e); } const Qa$4 = i$16(`ZodAny`, (e, t) => { jr$5.init(e, t), x$11.init(e, t), e._zod.processJSONSchema = (t, n, r) => void 0; }); function $a$4() { return Ns$4(Qa$4); } const eo$4 = i$16(`ZodUnknown`, (e, t) => { Mr$5.init(e, t), x$11.init(e, t), e._zod.processJSONSchema = (t, n, r) => void 0; }); function z$11() { return Ps$4(eo$4); } const to$4 = i$16(`ZodNever`, (e, t) => { Nr$5.init(e, t), x$11.init(e, t), e._zod.processJSONSchema = (t, n, r) => rl$3(e, t, n, r); }); function B$12(e) { return Fs$4(to$4, e); } const no$3 = i$16(`ZodVoid`, (e, t) => { Pr$5.init(e, t), x$11.init(e, t), e._zod.processJSONSchema = (t, n, r) => nl$3(e, t, n, r); }); function ro$3(e) { return Is$4(no$3, e); } const io$3 = i$16(`ZodDate`, (e, t) => { Fr$5.init(e, t), x$11.init(e, t), e._zod.processJSONSchema = (t, n, r) => ol$3(e, t, n, r), e.min = (t, n) => e.check(q$10(t, n)), e.max = (t, n) => e.check(Vs$3(t, n)); let n = e._zod.bag; e.minDate = n.minimum ? new Date(n.minimum) : null, e.maxDate = n.maximum ? new Date(n.maximum) : null; }); function ao$3(e) { return Ls$4(io$3, e); } const oo$3 = i$16(`ZodArray`, (e, t) => { Lr$5.init(e, t), x$11.init(e, t), e._zod.processJSONSchema = (t, n, r) => vl$3(e, t, n, r), e.element = t.element, Ji$5(e, `ZodArray`, { min(e, t) { return this.check(Qs$3(e, t)); }, nonempty(e) { return this.check(Qs$3(1, e)); }, max(e, t) { return this.check(Zs$3(e, t)); }, length(e, t) { return this.check($s$3(e, t)); }, unwrap() { return this.element; } }); }); function V$11(e, t) { return pc$3(oo$3, e, t); } function so$3(e) { let t = e._zod.def.shape; return Oo$3(Object.keys(t)); } const H$10 = i$16(`ZodObject`, (e, t) => { Hr$5.init(e, t), x$11.init(e, t), e._zod.processJSONSchema = (t, n, r) => yl$3(e, t, n, r), _$10(e, `shape`, () => t.shape), Ji$5(e, `ZodObject`, { keyof() { return Oo$3(Object.keys(this._zod.def.shape)); }, catchall(e) { return this.clone({ ...this._zod.def, catchall: e }); }, passthrough() { return this.clone({ ...this._zod.def, catchall: z$11() }); }, loose() { return this.clone({ ...this._zod.def, catchall: z$11() }); }, strict() { return this.clone({ ...this._zod.def, catchall: B$12() }); }, strip() { return this.clone({ ...this._zod.def, catchall: void 0 }); }, extend(e) { return De$8(this, e); }, safeExtend(e) { return Oe$9(this, e); }, merge(e) { return ke$8(this, e); }, pick(e) { return Te$9(this, e); }, omit(e) { return Ee$9(this, e); }, partial(...e) { return Ae$9(Io$3, this, e[0]); }, required(...e) { return je$10(Go$3, this, e[0]); } }); }); function co$3(e, t) { return new H$10({ type: `object`, shape: e ?? {}, ...w$14(t) }); } function lo$3(e, t) { return new H$10({ type: `object`, shape: e, catchall: B$12(), ...w$14(t) }); } function uo$3(e, t) { return new H$10({ type: `object`, shape: e, catchall: z$11(), ...w$14(t) }); } const U$10 = i$16(`ZodUnion`, (e, t) => { Wr$5.init(e, t), x$11.init(e, t), e._zod.processJSONSchema = (t, n, r) => bl$3(e, t, n, r), e.options = t.options; }); function fo$3(e, t) { return new U$10({ type: `union`, options: e, ...w$14(t) }); } const po$3 = i$16(`ZodXor`, (e, t) => { U$10.init(e, t), Kr$5.init(e, t), e._zod.processJSONSchema = (t, n, r) => bl$3(e, t, n, r), e.options = t.options; }); function mo$3(e, t) { return new po$3({ type: `union`, options: e, inclusive: !1, ...w$14(t) }); } const ho$3 = i$16(`ZodDiscriminatedUnion`, (e, t) => { U$10.init(e, t), qr$5.init(e, t); }); function go$3(e, t, n) { return new ho$3({ type: `union`, options: t, discriminator: e, ...w$14(n) }); } const _o$3 = i$16(`ZodIntersection`, (e, t) => { Jr$5.init(e, t), x$11.init(e, t), e._zod.processJSONSchema = (t, n, r) => xl$3(e, t, n, r); }); function vo$3(e, t) { return new _o$3({ type: `intersection`, left: e, right: t }); } const yo$3 = i$16(`ZodTuple`, (e, t) => { Zr$5.init(e, t), x$11.init(e, t), e._zod.processJSONSchema = (t, n, r) => Sl$3(e, t, n, r), e.rest = (t) => e.clone({ ...e._zod.def, rest: t }); }); function bo$3(e, t, n) { let r = t instanceof H$11; return new yo$3({ type: `tuple`, items: e, rest: r ? t : null, ...w$14(r ? n : t) }); } const W$8 = i$16(`ZodRecord`, (e, t) => { ti$5.init(e, t), x$11.init(e, t), e._zod.processJSONSchema = (t, n, r) => Cl$3(e, t, n, r), e.keyType = t.keyType, e.valueType = t.valueType; }); function xo$3(e, t, n) { return !t || !t._zod ? new W$8({ type: `record`, keyType: w$13(), valueType: e, ...w$14(t) }) : new W$8({ type: `record`, keyType: e, valueType: t, ...w$14(n) }); } function So$3(e, t, n) { let r = C$14(e); return r._zod.values = void 0, new W$8({ type: `record`, keyType: r, valueType: t, ...w$14(n) }); } function Co$3(e, t, n) { return new W$8({ type: `record`, keyType: e, valueType: t, mode: `loose`, ...w$14(n) }); } const wo$3 = i$16(`ZodMap`, (e, t) => { ni$5.init(e, t), x$11.init(e, t), e._zod.processJSONSchema = (t, n, r) => gl$3(e, t, n, r), e.keyType = t.keyType, e.valueType = t.valueType, e.min = (...t) => e.check(Ys$3(...t)), e.nonempty = (t) => e.check(Ys$3(1, t)), e.max = (...t) => e.check(Js$3(...t)), e.size = (...t) => e.check(Xs$3(...t)); }); function To$3(e, t, n) { return new wo$3({ type: `map`, keyType: e, valueType: t, ...w$14(n) }); } const Eo$3 = i$16(`ZodSet`, (e, t) => { ii$5.init(e, t), x$11.init(e, t), e._zod.processJSONSchema = (t, n, r) => _l$3(e, t, n, r), e.min = (...t) => e.check(Ys$3(...t)), e.nonempty = (t) => e.check(Ys$3(1, t)), e.max = (...t) => e.check(Js$3(...t)), e.size = (...t) => e.check(Xs$3(...t)); }); function Do$3(e, t) { return new Eo$3({ type: `set`, valueType: e, ...w$14(t) }); } const G$8 = i$16(`ZodEnum`, (e, t) => { oi$5.init(e, t), x$11.init(e, t), e._zod.processJSONSchema = (t, n, r) => sl$3(e, t, n, r), e.enum = t.entries, e.options = Object.values(t.entries); let n = new Set(Object.keys(t.entries)); e.extract = (e, r) => { let i = {}; for (let r of e) if (n.has(r)) i[r] = t.entries[r]; else throw Error(`Key ${r} not found in enum`); return new G$8({ ...t, checks: [], ...w$14(r), entries: i }); }, e.exclude = (e, r) => { let i = { ...t.entries }; for (let t of e) if (n.has(t)) delete i[t]; else throw Error(`Key ${t} not found in enum`); return new G$8({ ...t, checks: [], ...w$14(r), entries: i }); }; }); function Oo$3(e, t) { return new G$8({ type: `enum`, entries: Array.isArray(e) ? Object.fromEntries(e.map((e) => [e, e])) : e, ...w$14(t) }); } function ko$3(e, t) { return new G$8({ type: `enum`, entries: e, ...w$14(t) }); } const Ao$3 = i$16(`ZodLiteral`, (e, t) => { si$5.init(e, t), x$11.init(e, t), e._zod.processJSONSchema = (t, n, r) => cl$3(e, t, n, r), e.values = new Set(t.values), Object.defineProperty(e, "value", { get() { if (t.values.length > 1) throw Error("This schema contains multiple valid literal values. Use `.values` instead."); return t.values[0]; } }); }); function jo$3(e, t) { return new Ao$3({ type: `literal`, values: Array.isArray(e) ? e : [e], ...w$14(t) }); } const Mo$3 = i$16(`ZodFile`, (e, t) => { ci$5.init(e, t), x$11.init(e, t), e._zod.processJSONSchema = (t, n, r) => dl$3(e, t, n, r), e.min = (t, n) => e.check(Ys$3(t, n)), e.max = (t, n) => e.check(Js$3(t, n)), e.mime = (t, n) => e.check(sc$3(Array.isArray(t) ? t : [t], n)); }); function No$3(e) { return Tc$3(Mo$3, e); } const Po$3 = i$16(`ZodTransform`, (e, t) => { li$5.init(e, t), x$11.init(e, t), e._zod.processJSONSchema = (t, n, r) => hl$3(e, t, n, r), e._zod.parse = (n, r) => { if (r.direction === `backward`) throw new s$11(e.constructor.name); n.addIssue = (r) => { if (typeof r == `string`) n.issues.push(j$12(r, n.value, t)); else { let t = r; t.fatal && (t.continue = !1), t.code ??= `custom`, t.input ??= n.value, t.inst ??= e, n.issues.push(j$12(t)); } }; let i = t.transform(n.value, n); return i instanceof Promise ? i.then((e) => (n.value = e, n.fallback = !0, n)) : (n.value = i, n.fallback = !0, n); }; }); function Fo$3(e) { return new Po$3({ type: `transform`, transform: e }); } const Io$3 = i$16(`ZodOptional`, (e, t) => { di$5.init(e, t), x$11.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ml$3(e, t, n, r), e.unwrap = () => e._zod.def.innerType; }); function K$9(e) { return new Io$3({ type: `optional`, innerType: e }); } const Lo$3 = i$16(`ZodExactOptional`, (e, t) => { fi$5.init(e, t), x$11.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ml$3(e, t, n, r), e.unwrap = () => e._zod.def.innerType; }); function Ro$3(e) { return new Lo$3({ type: `optional`, innerType: e }); } const zo$3 = i$16(`ZodNullable`, (e, t) => { pi$5.init(e, t), x$11.init(e, t), e._zod.processJSONSchema = (t, n, r) => wl$3(e, t, n, r), e.unwrap = () => e._zod.def.innerType; }); function q$9(e) { return new zo$3({ type: `nullable`, innerType: e }); } function Bo$3(e) { return K$9(q$9(e)); } const Vo$3 = i$16(`ZodDefault`, (e, t) => { mi$5.init(e, t), x$11.init(e, t), e._zod.processJSONSchema = (t, n, r) => El$3(e, t, n, r), e.unwrap = () => e._zod.def.innerType, e.removeDefault = e.unwrap; }); function Ho$3(e, t) { return new Vo$3({ type: `default`, innerType: e, get defaultValue() { return typeof t == `function` ? t() : ge$9(t); } }); } const Uo$3 = i$16(`ZodPrefault`, (e, t) => { gi$5.init(e, t), x$11.init(e, t), e._zod.processJSONSchema = (t, n, r) => Dl$3(e, t, n, r), e.unwrap = () => e._zod.def.innerType; }); function Wo$3(e, t) { return new Uo$3({ type: `prefault`, innerType: e, get defaultValue() { return typeof t == `function` ? t() : ge$9(t); } }); } const Go$3 = i$16(`ZodNonOptional`, (e, t) => { _i$5.init(e, t), x$11.init(e, t), e._zod.processJSONSchema = (t, n, r) => Tl$3(e, t, n, r), e.unwrap = () => e._zod.def.innerType; }); function Ko$3(e, t) { return new Go$3({ type: `nonoptional`, innerType: e, ...w$14(t) }); } const qo$3 = i$16(`ZodSuccess`, (e, t) => { yi$5.init(e, t), x$11.init(e, t), e._zod.processJSONSchema = (t, n, r) => fl$3(e, t, n, r), e.unwrap = () => e._zod.def.innerType; }); function Jo$3(e) { return new qo$3({ type: `success`, innerType: e }); } const Yo$3 = i$16(`ZodCatch`, (e, t) => { bi$5.init(e, t), x$11.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ol$3(e, t, n, r), e.unwrap = () => e._zod.def.innerType, e.removeCatch = e.unwrap; }); function Xo$3(e, t) { return new Yo$3({ type: `catch`, innerType: e, catchValue: typeof t == `function` ? t : () => t }); } const Zo$3 = i$16(`ZodNaN`, (e, t) => { xi$5.init(e, t), x$11.init(e, t), e._zod.processJSONSchema = (t, n, r) => ll$3(e, t, n, r); }); function Qo$3(e) { return zs$3(Zo$3, e); } const J$9 = i$16(`ZodPipe`, (e, t) => { Si$6.init(e, t), x$11.init(e, t), e._zod.processJSONSchema = (t, n, r) => kl$3(e, t, n, r), e.in = t.in, e.out = t.out; }); function $o$3(e, t) { return new J$9({ type: `pipe`, in: e, out: t }); } const Y$12 = i$16(`ZodCodec`, (e, t) => { J$9.init(e, t), wi$6.init(e, t); }); function es$3(e, t, n) { return new Y$12({ type: `pipe`, in: e, out: t, transform: n.decode, reverseTransform: n.encode }); } function ts$3(e) { let t = e._zod.def; return new Y$12({ type: `pipe`, in: t.out, out: t.in, transform: t.reverseTransform, reverseTransform: t.transform }); } const ns$3 = i$16(`ZodPreprocess`, (e, t) => { J$9.init(e, t), Di$6.init(e, t); }); const rs$3 = i$16(`ZodReadonly`, (e, t) => { Oi$6.init(e, t), x$11.init(e, t), e._zod.processJSONSchema = (t, n, r) => Al$3(e, t, n, r), e.unwrap = () => e._zod.def.innerType; }); function is$3(e) { return new rs$3({ type: `readonly`, innerType: e }); } const as$3 = i$16(`ZodTemplateLiteral`, (e, t) => { Ai$6.init(e, t), x$11.init(e, t), e._zod.processJSONSchema = (t, n, r) => ul$3(e, t, n, r); }); function os$3(e, t) { return new as$3({ type: `template_literal`, parts: e, ...w$14(t) }); } const ss$3 = i$16(`ZodLazy`, (e, t) => { Ni$6.init(e, t), x$11.init(e, t), e._zod.processJSONSchema = (t, n, r) => Nl$3(e, t, n, r), e.unwrap = () => e._zod.def.getter(); }); function cs$3(e) { return new ss$3({ type: `lazy`, getter: e }); } const ls$3 = i$16(`ZodPromise`, (e, t) => { Mi$6.init(e, t), x$11.init(e, t), e._zod.processJSONSchema = (t, n, r) => jl$3(e, t, n, r), e.unwrap = () => e._zod.def.innerType; }); function us$3(e) { return new ls$3({ type: `promise`, innerType: e }); } const ds$3 = i$16(`ZodFunction`, (e, t) => { ji$6.init(e, t), x$11.init(e, t), e._zod.processJSONSchema = (t, n, r) => ml$3(e, t, n, r); }); function X$12(e) { return new ds$3({ type: `function`, input: Array.isArray(e?.input) ? bo$3(e?.input) : e?.input ?? V$11(z$11()), output: e?.output ?? z$11() }); } const Z$11 = i$16(`ZodCustom`, (e, t) => { Pi$6.init(e, t), x$11.init(e, t), e._zod.processJSONSchema = (t, n, r) => pl$3(e, t, n, r); }); function fs$3(e) { let t = new B$13({ check: `custom` }); return t._zod.check = e, t; } function ps$3(e, t) { return Rc$3(Z$11, e ?? (() => !0), t); } function ms$3(e, t = {}) { return zc$3(Z$11, e, t); } function hs$3(e, t) { return Bc$3(e, t); } const gs$3 = Hc$3; const _s$3 = Uc$3; function vs$3(e, t = {}) { let n = new Z$11({ type: `custom`, check: `custom`, fn: (t) => t instanceof e, abort: !0, ...w$14(t) }); return n._zod.bag.Class = e, n._zod.check = (t) => { t.value instanceof e || t.issues.push({ code: `invalid_type`, expected: e.name, input: t.value, inst: n, path: [...n._zod.def.path ?? []] }); }, n; } const ys$3 = (...e) => Wc$3({ Codec: Y$12, Boolean: L$9, String: C$13 }, ...e); function bs$3(e) { let t = cs$3(() => fo$3([ w$13(e), Fa$5(), Va$5(), Za$4(), V$11(t), xo$3(w$13(), t) ])); return t; } function xs$3(e, t) { return new ns$3({ type: `pipe`, in: Fo$3(e), out: t }); } const Ss$3 = { invalid_type: `invalid_type`, too_big: `too_big`, too_small: `too_small`, invalid_format: `invalid_format`, not_multiple_of: `not_multiple_of`, unrecognized_keys: `unrecognized_keys`, invalid_union: `invalid_union`, invalid_key: `invalid_key`, invalid_element: `invalid_element`, invalid_value: `invalid_value`, custom: `custom` }; function Cs$3(e) { l$12({ customError: e }); } function ws$3() { return l$12().customError; } var Ts$3; Ts$3 ||= {}; const Q$10 = { ...Ki$5, ...Si$5, iso: Ci$5 }; const Es$3 = new Set(`$schema.$ref.$defs.definitions.$id.id.$comment.$anchor.$vocabulary.$dynamicRef.$dynamicAnchor.type.enum.const.anyOf.oneOf.allOf.not.properties.required.additionalProperties.patternProperties.propertyNames.minProperties.maxProperties.items.prefixItems.additionalItems.minItems.maxItems.uniqueItems.contains.minContains.maxContains.minLength.maxLength.pattern.format.minimum.maximum.exclusiveMinimum.exclusiveMaximum.multipleOf.description.default.contentEncoding.contentMediaType.contentSchema.unevaluatedItems.unevaluatedProperties.if.then.else.dependentSchemas.dependentRequired.nullable.readOnly`.split(`.`)); function Ds$3(e, t) { let n = e.$schema; return n === `https://json-schema.org/draft/2020-12/schema` ? `draft-2020-12` : n === `http://json-schema.org/draft-07/schema#` ? `draft-7` : n === `http://json-schema.org/draft-04/schema#` ? `draft-4` : t ?? `draft-2020-12`; } function Os$3(e, t) { if (!e.startsWith(`#`)) throw Error(`External $ref is not supported, only local refs (#/...) are allowed`); let n = e.slice(1).split(`/`).filter(Boolean); if (n.length === 0) return t.rootSchema; let r = t.version === `draft-2020-12` ? `$defs` : `definitions`; if (n[0] === r) { let r = n[1]; if (!r || !t.defs[r]) throw Error(`Reference not found: ${e}`); return t.defs[r]; } throw Error(`Reference not found: ${e}`); } function ks$3(e, t) { if (e.not !== void 0) { if (typeof e.not == `object` && Object.keys(e.not).length === 0) return Q$10.never(); throw Error(`not is not supported in Zod (except { not: {} } for never)`); } if (e.unevaluatedItems !== void 0) throw Error(`unevaluatedItems is not supported`); if (e.unevaluatedProperties !== void 0) throw Error(`unevaluatedProperties is not supported`); if (e.if !== void 0 || e.then !== void 0 || e.else !== void 0) throw Error(`Conditional schemas (if/then/else) are not supported`); if (e.dependentSchemas !== void 0 || e.dependentRequired !== void 0) throw Error(`dependentSchemas and dependentRequired are not supported`); if (e.$ref) { let n = e.$ref; if (t.refs.has(n)) return t.refs.get(n); if (t.processing.has(n)) return Q$10.lazy(() => { if (!t.refs.has(n)) throw Error(`Circular reference not resolved: ${n}`); return t.refs.get(n); }); t.processing.add(n); let r = $$10(Os$3(n, t), t); return t.refs.set(n, r), t.processing.delete(n), r; } if (e.enum !== void 0) { let n = e.enum; if (t.version === `openapi-3.0` && e.nullable === !0 && n.length === 1 && n[0] === null) return Q$10.null(); if (n.length === 0) return Q$10.never(); if (n.length === 1) return Q$10.literal(n[0]); if (n.every((e) => typeof e == `string`)) return Q$10.enum(n); let r = n.map((e) => Q$10.literal(e)); return r.length < 2 ? r[0] : Q$10.union([ r[0], r[1], ...r.slice(2) ]); } if (e.const !== void 0) return Q$10.literal(e.const); let n = e.type; if (Array.isArray(n)) { let r = n.map((n) => ks$3({ ...e, type: n }, t)); return r.length === 0 ? Q$10.never() : r.length === 1 ? r[0] : Q$10.union(r); } if (!n) return Q$10.any(); let r; switch (n) { case `string`: { let t = Q$10.string(); if (e.format) { let n = e.format; n === `email` ? t = t.check(Q$10.email()) : n === `uri` || n === `uri-reference` ? t = t.check(Q$10.url()) : n === `uuid` || n === `guid` ? t = t.check(Q$10.uuid()) : n === `date-time` ? t = t.check(Q$10.iso.datetime()) : n === `date` ? t = t.check(Q$10.iso.date()) : n === `time` ? t = t.check(Q$10.iso.time()) : n === `duration` ? t = t.check(Q$10.iso.duration()) : n === `ipv4` ? t = t.check(Q$10.ipv4()) : n === `ipv6` ? t = t.check(Q$10.ipv6()) : n === `mac` ? t = t.check(Q$10.mac()) : n === `cidr` ? t = t.check(Q$10.cidrv4()) : n === `cidr-v6` ? t = t.check(Q$10.cidrv6()) : n === `base64` ? t = t.check(Q$10.base64()) : n === `base64url` ? t = t.check(Q$10.base64url()) : n === `e164` ? t = t.check(Q$10.e164()) : n === `jwt` ? t = t.check(Q$10.jwt()) : n === `emoji` ? t = t.check(Q$10.emoji()) : n === `nanoid` ? t = t.check(Q$10.nanoid()) : n === `cuid` ? t = t.check(Q$10.cuid()) : n === `cuid2` ? t = t.check(Q$10.cuid2()) : n === `ulid` ? t = t.check(Q$10.ulid()) : n === `xid` ? t = t.check(Q$10.xid()) : n === `ksuid` && (t = t.check(Q$10.ksuid())); } typeof e.minLength == `number` && (t = t.min(e.minLength)), typeof e.maxLength == `number` && (t = t.max(e.maxLength)), e.pattern && (t = t.regex(new RegExp(e.pattern))), r = t; break; } case `number`: case `integer`: { let t = n === `integer` ? Q$10.number().int() : Q$10.number(); typeof e.minimum == `number` && (t = t.min(e.minimum)), typeof e.maximum == `number` && (t = t.max(e.maximum)), typeof e.exclusiveMinimum == `number` ? t = t.gt(e.exclusiveMinimum) : e.exclusiveMinimum === !0 && typeof e.minimum == `number` && (t = t.gt(e.minimum)), typeof e.exclusiveMaximum == `number` ? t = t.lt(e.exclusiveMaximum) : e.exclusiveMaximum === !0 && typeof e.maximum == `number` && (t = t.lt(e.maximum)), typeof e.multipleOf == `number` && (t = t.multipleOf(e.multipleOf)), r = t; break; } case `boolean`: r = Q$10.boolean(); break; case `null`: r = Q$10.null(); break; case `object`: { let n = {}, i = e.properties || {}, a = new Set(e.required || []); for (let [e, r] of Object.entries(i)) { let i = $$10(r, t); n[e] = a.has(e) ? i : i.optional(); } if (e.propertyNames) { let i = $$10(e.propertyNames, t), a = e.additionalProperties && typeof e.additionalProperties == `object` ? $$10(e.additionalProperties, t) : Q$10.any(); if (Object.keys(n).length === 0) { r = Q$10.record(i, a); break; } let o = Q$10.object(n).passthrough(), s = Q$10.looseRecord(i, a); r = Q$10.intersection(o, s); break; } if (e.patternProperties) { let i = e.patternProperties, a = Object.keys(i), o = []; for (let e of a) { let n = $$10(i[e], t), r = Q$10.string().regex(new RegExp(e)); o.push(Q$10.looseRecord(r, n)); } let s = []; if (Object.keys(n).length > 0 && s.push(Q$10.object(n).passthrough()), s.push(...o), s.length === 0) r = Q$10.object({}).passthrough(); else if (s.length === 1) r = s[0]; else { let e = Q$10.intersection(s[0], s[1]); for (let t = 2; t < s.length; t++) e = Q$10.intersection(e, s[t]); r = e; } break; } let o = Q$10.object(n); r = e.additionalProperties === !1 ? o.strict() : typeof e.additionalProperties == `object` ? o.catchall($$10(e.additionalProperties, t)) : o.passthrough(); break; } case `array`: { let n = e.prefixItems, i = e.items; if (n && Array.isArray(n)) { let a = n.map((e) => $$10(e, t)), o = i && typeof i == `object` && !Array.isArray(i) ? $$10(i, t) : void 0; r = o ? Q$10.tuple(a).rest(o) : Q$10.tuple(a), typeof e.minItems == `number` && (r = r.check(Q$10.minLength(e.minItems))), typeof e.maxItems == `number` && (r = r.check(Q$10.maxLength(e.maxItems))); } else if (Array.isArray(i)) { let n = i.map((e) => $$10(e, t)), a = e.additionalItems && typeof e.additionalItems == `object` ? $$10(e.additionalItems, t) : void 0; r = a ? Q$10.tuple(n).rest(a) : Q$10.tuple(n), typeof e.minItems == `number` && (r = r.check(Q$10.minLength(e.minItems))), typeof e.maxItems == `number` && (r = r.check(Q$10.maxLength(e.maxItems))); } else if (i !== void 0) { let n = $$10(i, t), a = Q$10.array(n); typeof e.minItems == `number` && (a = a.min(e.minItems)), typeof e.maxItems == `number` && (a = a.max(e.maxItems)), r = a; } else r = Q$10.array(Q$10.any()); break; } default: throw Error(`Unsupported type: ${n}`); } return r; } function $$10(e, t) { if (typeof e == `boolean`) return e ? Q$10.any() : Q$10.never(); let n = ks$3(e, t), r = e.type || e.enum !== void 0 || e.const !== void 0; if (e.anyOf && Array.isArray(e.anyOf)) { let i = e.anyOf.map((e) => $$10(e, t)), a = Q$10.union(i); n = r ? Q$10.intersection(n, a) : a; } if (e.oneOf && Array.isArray(e.oneOf)) { let i = e.oneOf.map((e) => $$10(e, t)), a = Q$10.xor(i); n = r ? Q$10.intersection(n, a) : a; } if (e.allOf && Array.isArray(e.allOf)) if (e.allOf.length === 0) n = r ? n : Q$10.any(); else { let i = r ? n : $$10(e.allOf[0], t), a = +!r; for (let n = a; n < e.allOf.length; n++) i = Q$10.intersection(i, $$10(e.allOf[n], t)); n = i; } e.nullable === !0 && t.version === `openapi-3.0` && (n = Q$10.nullable(n)), e.readOnly === !0 && (n = Q$10.readonly(n)), e.default !== void 0 && (n = n.default(e.default)); let i = {}; for (let t of [ `$id`, `id`, `$comment`, `$anchor`, `$vocabulary`, `$dynamicRef`, `$dynamicAnchor` ]) t in e && (i[t] = e[t]); for (let t of [ `contentEncoding`, `contentMediaType`, `contentSchema` ]) t in e && (i[t] = e[t]); for (let t of Object.keys(e)) Es$3.has(t) || (i[t] = e[t]); return Object.keys(i).length > 0 && t.registry.add(n, i), e.description && (n = n.describe(e.description)), n; } function As$3(e, t) { if (typeof e == `boolean`) return e ? Q$10.any() : Q$10.never(); let n; try { n = JSON.parse(JSON.stringify(e)); } catch { throw Error(`fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas`); } let r = { version: Ds$3(n, t?.defaultTarget), defs: n.$defs || n.definitions || {}, refs: /* @__PURE__ */ new Map(), processing: /* @__PURE__ */ new Set(), rootSchema: n, registry: t?.registry ?? K$10 }; return $$10(n, r); } var js$3 = t$13({ bigint: () => Fs$3, boolean: () => Ps$3, date: () => Is$3, number: () => Ns$3, string: () => Ms$3 }); function Ms$3(e) { return Ho$4(C$13, e); } function Ns$3(e) { return vs$4(F$10, e); } function Ps$3(e) { return Ts$4(L$9, e); } function Fs$3(t) { return Ds$4(R$11, t); } function Is$3(e) { return Rs$3(io$3, e); } var Ls$3 = t$13({ $brand: () => a$13, $input: () => Ro$4, $output: () => Lo$4, NEVER: () => r$17, TimePrecision: () => fs$4, ZodAny: () => Qa$4, ZodArray: () => oo$3, ZodBase64: () => Ca$5, ZodBase64URL: () => Ta$5, ZodBigInt: () => R$11, ZodBigIntFormat: () => Ua$5, ZodBoolean: () => L$9, ZodCIDRv4: () => ya$5, ZodCIDRv6: () => xa$5, ZodCUID: () => M$11, ZodCUID2: () => N$10, ZodCatch: () => Yo$3, ZodCodec: () => Y$12, ZodCustom: () => Z$11, ZodCustomStringFormat: () => P$10, ZodDate: () => io$3, ZodDefault: () => Vo$3, ZodDiscriminatedUnion: () => ho$3, ZodE164: () => Da$5, ZodEmail: () => E$13, ZodEmoji: () => A$11, ZodEnum: () => G$8, ZodError: () => Ni$5, ZodExactOptional: () => Lo$3, ZodFile: () => Mo$3, ZodFirstPartyTypeKind: () => Ts$3, ZodFunction: () => ds$3, ZodGUID: () => D$12, ZodIPv4: () => pa$5, ZodIPv6: () => _a$5, ZodISODate: () => Ei$5, ZodISODateTime: () => wi$5, ZodISODuration: () => Ai$5, ZodISOTime: () => Oi$5, ZodIntersection: () => _o$3, ZodIssueCode: () => Ss$3, ZodJWT: () => ka$5, ZodKSUID: () => da$5, ZodLazy: () => ss$3, ZodLiteral: () => Ao$3, ZodMAC: () => ha$5, ZodMap: () => wo$3, ZodNaN: () => Zo$3, ZodNanoID: () => j$11, ZodNever: () => to$4, ZodNonOptional: () => Go$3, ZodNull: () => Xa$4, ZodNullable: () => zo$3, ZodNumber: () => F$10, ZodNumberFormat: () => I$10, ZodObject: () => H$10, ZodOptional: () => Io$3, ZodPipe: () => J$9, ZodPrefault: () => Uo$3, ZodPreprocess: () => ns$3, ZodPromise: () => ls$3, ZodReadonly: () => rs$3, ZodRealError: () => b$10, ZodRecord: () => W$8, ZodSet: () => Eo$3, ZodString: () => C$13, ZodStringFormat: () => T$13, ZodSuccess: () => qo$3, ZodSymbol: () => Ka$5, ZodTemplateLiteral: () => as$3, ZodTransform: () => Po$3, ZodTuple: () => yo$3, ZodType: () => x$11, ZodULID: () => sa$5, ZodURL: () => k$12, ZodUUID: () => O$11, ZodUndefined: () => Ja$4, ZodUnion: () => U$10, ZodUnknown: () => eo$4, ZodVoid: () => no$3, ZodXID: () => la$5, ZodXor: () => po$3, _ZodString: () => S$12, _default: () => Ho$3, _function: () => X$12, any: () => $a$4, array: () => V$11, base64: () => wa$5, base64url: () => Ea$5, bigint: () => Ha$5, boolean: () => Va$5, catch: () => Xo$3, check: () => fs$3, cidrv4: () => ba$5, cidrv6: () => Sa$5, clone: () => C$14, codec: () => es$3, coerce: () => js$3, config: () => l$12, core: () => Rl$3, cuid: () => aa$5, cuid2: () => oa$5, custom: () => ps$3, date: () => ao$3, decode: () => zi$5, decodeAsync: () => Vi$5, describe: () => gs$3, discriminatedUnion: () => go$3, e164: () => Oa$5, email: () => Yi$5, emoji: () => ra$5, encode: () => Ri$5, encodeAsync: () => Bi$5, endsWith: () => ac$3, enum: () => Oo$3, exactOptional: () => Ro$3, file: () => No$3, flattenError: () => Ge$9, float32: () => La$5, float64: () => Ra$5, formatError: () => Ke$9, fromJSONSchema: () => As$3, function: () => X$12, getErrorMap: () => ws$3, globalRegistry: () => K$10, gt: () => Hs$3, gte: () => q$10, guid: () => Xi$5, hash: () => Pa$5, hex: () => Na$5, hostname: () => Ma$5, httpUrl: () => na$5, includes: () => rc$3, instanceof: () => vs$3, int: () => Ia$5, int32: () => za$5, int64: () => Wa$5, intersection: () => vo$3, invertCodec: () => ts$3, ipv4: () => ma$5, ipv6: () => va$5, iso: () => Ci$5, json: () => bs$3, jwt: () => Aa$5, keyof: () => so$3, ksuid: () => fa$5, lazy: () => cs$3, length: () => $s$3, literal: () => jo$3, locales: () => Fo$4, looseObject: () => uo$3, looseRecord: () => Co$3, lowercase: () => tc$3, lt: () => Bs$3, lte: () => Vs$3, mac: () => ga$5, map: () => To$3, maxLength: () => Zs$3, maxSize: () => Js$3, meta: () => _s$3, mime: () => sc$3, minLength: () => Qs$3, minSize: () => Ys$3, multipleOf: () => qs$3, nan: () => Qo$3, nanoid: () => ia$5, nativeEnum: () => ko$3, negative: () => Ws$3, never: () => B$12, nonnegative: () => Ks$3, nonoptional: () => Ko$3, nonpositive: () => Gs$3, normalize: () => cc$3, null: () => Za$4, nullable: () => q$9, nullish: () => Bo$3, number: () => Fa$5, object: () => co$3, optional: () => K$9, overwrite: () => J$10, parse: () => Pi$5, parseAsync: () => Fi$5, partialRecord: () => So$3, pipe: () => $o$3, positive: () => Us$3, prefault: () => Wo$3, preprocess: () => xs$3, prettifyError: () => Ye$10, promise: () => us$3, property: () => oc$3, readonly: () => is$3, record: () => xo$3, refine: () => ms$3, regex: () => ec$3, regexes: () => gt$8, registry: () => Bo$4, safeDecode: () => Ui$5, safeDecodeAsync: () => Gi$5, safeEncode: () => Hi$5, safeEncodeAsync: () => Wi$5, safeParse: () => Ii$5, safeParseAsync: () => Li$5, set: () => Do$3, setErrorMap: () => Cs$3, size: () => Xs$3, slugify: () => fc$3, startsWith: () => ic$3, strictObject: () => lo$3, string: () => w$13, stringFormat: () => ja$5, stringbool: () => ys$3, success: () => Jo$3, superRefine: () => hs$3, symbol: () => qa$5, templateLiteral: () => os$3, toJSONSchema: () => Fl$3, toLowerCase: () => uc$3, toUpperCase: () => dc$3, transform: () => Fo$3, treeifyError: () => qe$9, trim: () => lc$3, tuple: () => bo$3, uint32: () => Ba$5, uint64: () => Ga$5, ulid: () => ca$5, undefined: () => Ya$4, union: () => fo$3, unknown: () => z$11, uppercase: () => nc$3, url: () => ta$5, util: () => u$14, uuid: () => Zi$5, uuidv4: () => Qi$5, uuidv6: () => $i$5, uuidv7: () => ea$5, void: () => ro$3, xid: () => ua$5, xor: () => mo$3 }); l$12(na$6()); //#endregion //#region node_modules/eve/dist/src/discover/diagnostics.js const discoverDiagnosticSeveritySchema = Ls$3.union([Ls$3.literal(`error`), Ls$3.literal(`warning`)]); const discoverDiagnosticSchema = Ls$3.object({ code: Ls$3.string(), message: Ls$3.string(), severity: discoverDiagnosticSeveritySchema, sourcePath: Ls$3.string() }).strict(); const discoverDiagnosticsSummarySchema = Ls$3.object({ errors: Ls$3.number().finite(), warnings: Ls$3.number().finite() }).strict(); //#endregion //#region node_modules/eve/dist/src/shared/json.js const INVALID_JSON_VALUE_CANDIDATE = Symbol(`invalid-json-value-candidate`); function parseJsonValue(t) { let n = normalizeJsonValueCandidate(t); if (n === INVALID_JSON_VALUE_CANDIDATE) throw TypeError(`Expected a JSON-serializable value.`); return n; } function parseJsonObject(e) { let t = parseJsonValue(e); if (!isJsonObjectValue(t)) throw TypeError(`Expected a JSON-serializable object.`); return t; } function normalizeJsonValueCandidate(t, n = /* @__PURE__ */ new WeakSet()) { if (t === null || typeof t == `boolean` || typeof t == `string`) return t; if (typeof t == `number`) return Number.isFinite(t) ? t : INVALID_JSON_VALUE_CANDIDATE; if (Array.isArray(t)) { let r = []; for (let i of t) { let t = normalizeJsonValueCandidate(i, n); if (t === INVALID_JSON_VALUE_CANDIDATE) return INVALID_JSON_VALUE_CANDIDATE; r.push(t); } return r; } if (typeof t != `object` || t === void 0 || !isPlainObject(t) || n.has(t)) return INVALID_JSON_VALUE_CANDIDATE; n.add(t); let r = {}; for (let [i, a] of Object.entries(t)) { if (a === void 0) continue; let t = normalizeJsonValueCandidate(a, n); if (t === INVALID_JSON_VALUE_CANDIDATE) return INVALID_JSON_VALUE_CANDIDATE; r[i] = t; } return n.delete(t), r; } function isJsonObjectValue(e) { return e !== null && !Array.isArray(e) && typeof e == `object`; } function isPlainObject(e) { let t = Object.getPrototypeOf(e); return t === null || t === Object.prototype; } //#endregion //#region node_modules/eve/dist/src/shared/json-schemas.js const jsonValueSchema = Ls$3.unknown().transform((t, r) => { try { return parseJsonValue(t); } catch (t) { return r.addIssue({ code: `custom`, message: formatJsonParseError(t, `Expected a JSON-serializable value.`) }), Ls$3.NEVER; } }); const jsonObjectSchema = Ls$3.unknown().transform((n, r) => { try { return parseJsonObject(n); } catch (t) { return r.addIssue({ code: `custom`, message: formatJsonParseError(t, `Expected a JSON-serializable object.`) }), Ls$3.NEVER; } }); function formatJsonParseError(e, t) { return e instanceof Error ? e.message : t; } //#endregion //#region node_modules/eve/dist/src/compiler/remote-agent-node.js const compiledRemoteAgentNodeSchema = Ls$3.object({ description: Ls$3.string(), entryPath: Ls$3.string(), exportName: Ls$3.string().optional(), logicalPath: Ls$3.string(), name: Ls$3.string(), nodeId: Ls$3.string(), outputSchema: jsonObjectSchema.optional(), path: Ls$3.string(), rootPath: Ls$3.string(), sourceId: Ls$3.string(), sourceKind: Ls$3.literal(`module`), url: Ls$3.string() }).strict(); //#endregion //#region node_modules/eve/dist/src/compiler/manifest.js const COMPILED_AGENT_MANIFEST_KIND = `eve-agent-compiled-manifest`; const ROOT_COMPILED_AGENT_NODE_ID = `__root__`; const moduleSourceRefSchema = Ls$3.object({ exportName: Ls$3.string().optional(), sourceKind: Ls$3.literal(`module`), logicalPath: Ls$3.string(), sourceId: Ls$3.string() }).strict(); const channelMethodSchema = Ls$3.union([ Ls$3.literal(`GET`), Ls$3.literal(`POST`), Ls$3.literal(`PUT`), Ls$3.literal(`PATCH`), Ls$3.literal(`DELETE`), Ls$3.literal(`WEBSOCKET`) ]); const compiledChannelCorsSchema = Ls$3.object({ origin: Ls$3.union([ Ls$3.literal(`*`), Ls$3.literal(`null`), Ls$3.array(Ls$3.string()) ]).optional(), methods: Ls$3.union([Ls$3.literal(`*`), Ls$3.array(Ls$3.string())]).optional(), allowHeaders: Ls$3.union([Ls$3.literal(`*`), Ls$3.array(Ls$3.string())]).optional(), exposeHeaders: Ls$3.union([Ls$3.literal(`*`), Ls$3.array(Ls$3.string())]).optional(), credentials: Ls$3.boolean().optional(), maxAge: Ls$3.union([Ls$3.string(), Ls$3.literal(!1)]).optional(), preflight: Ls$3.object({ statusCode: Ls$3.number().int().min(100).max(599).optional() }).strict().optional() }).strict(); const compiledChannelDefinitionSchema = Ls$3.object({ kind: Ls$3.literal(`channel`), name: Ls$3.string(), logicalPath: Ls$3.string(), method: channelMethodSchema, urlPath: Ls$3.string(), sourceId: Ls$3.string(), sourceKind: Ls$3.literal(`module`), exportName: Ls$3.string().optional(), adapterKind: Ls$3.string().optional(), cors: compiledChannelCorsSchema.optional() }).strict(); const disabledCompiledChannelEntrySchema = Ls$3.object({ kind: Ls$3.literal(`disabled`), name: Ls$3.string(), logicalPath: Ls$3.string() }).strict(); const compiledChannelEntrySchema = Ls$3.union([compiledChannelDefinitionSchema, disabledCompiledChannelEntrySchema]); const modelRoutingSchema = Ls$3.union([Ls$3.object({ kind: Ls$3.literal(`gateway`), target: Ls$3.string(), byok: Ls$3.string().optional() }).strict(), Ls$3.object({ kind: Ls$3.literal(`external`), provider: Ls$3.string() }).strict()]); const compiledRuntimeModelReferenceSchema = Ls$3.object({ contextWindowTokens: Ls$3.number().int().positive().optional(), id: Ls$3.string(), source: moduleSourceRefSchema.optional(), providerOptions: Ls$3.record(Ls$3.string(), jsonObjectSchema).optional(), routing: modelRoutingSchema }).strict(); const compiledAgentBuildDefinitionSchema = Ls$3.object({ externalDependencies: Ls$3.array(Ls$3.string()).optional() }).strict(); const compiledAgentWorkflowWorldDefinitionSchema = Ls$3.string(); const compiledAgentWorkflowDefinitionSchema = Ls$3.object({ world: compiledAgentWorkflowWorldDefinitionSchema.optional() }).strict(); const compiledAgentCompactionDefinitionSchema = Ls$3.object({ model: compiledRuntimeModelReferenceSchema.optional(), thresholdPercent: Ls$3.number().finite().min(0).max(1).optional() }).strict(); const compiledAgentConfigSchema = Ls$3.object({ build: compiledAgentBuildDefinitionSchema.optional(), compaction: compiledAgentCompactionDefinitionSchema.optional(), description: Ls$3.string().optional(), experimental: Ls$3.object({ workflow: compiledAgentWorkflowDefinitionSchema.optional() }).strict().optional(), model: compiledRuntimeModelReferenceSchema, name: Ls$3.string(), outputSchema: jsonObjectSchema.optional(), reasoning: Ls$3.enum([ `provider-default`, `none`, `minimal`, `low`, `medium`, `high`, `xhigh` ]).optional(), source: moduleSourceRefSchema.optional() }).strict(); const compiledInstructionsSchema = Ls$3.object({ name: Ls$3.string(), logicalPath: Ls$3.string(), markdown: Ls$3.string(), sourceId: Ls$3.string(), sourceKind: Ls$3.union([Ls$3.literal(`markdown`), Ls$3.literal(`module`)]) }).strict(); const compiledSkillBaseFields = { name: Ls$3.string(), description: Ls$3.string(), license: Ls$3.string().optional(), markdown: Ls$3.string(), metadata: Ls$3.record(Ls$3.string(), Ls$3.string()).optional(), sourceId: Ls$3.string(), logicalPath: Ls$3.string() }; const compiledSkillSourceSchema = Ls$3.discriminatedUnion(`sourceKind`, [ Ls$3.object({ ...compiledSkillBaseFields, sourceKind: Ls$3.literal(`markdown`) }).strict(), Ls$3.object({ ...compiledSkillBaseFields, sourceKind: Ls$3.literal(`module`), exportName: Ls$3.string().optional() }).strict(), Ls$3.object({ ...compiledSkillBaseFields, sourceKind: Ls$3.literal(`skill-package`), skillId: Ls$3.string(), skillFilePath: Ls$3.string(), rootPath: Ls$3.string(), assetsPath: Ls$3.string().optional(), referencesPath: Ls$3.string().optional(), scriptsPath: Ls$3.string().optional() }).strict() ]); const compiledScheduleDefinitionSchema = Ls$3.object({ cron: Ls$3.string(), hasRun: Ls$3.boolean(), name: Ls$3.string(), logicalPath: Ls$3.string(), markdown: Ls$3.string().optional(), sourceId: Ls$3.string(), sourceKind: Ls$3.union([Ls$3.literal(`markdown`), Ls$3.literal(`module`)]) }).strict(); const compiledSandboxDefinitionSchema = Ls$3.object({ backendName: Ls$3.string().optional(), description: Ls$3.string().optional(), exportName: Ls$3.string().optional(), logicalPath: Ls$3.string(), revalidationKey: Ls$3.string().optional(), sourceHash: Ls$3.string(), sourceId: Ls$3.string(), sourceKind: Ls$3.literal(`module`) }).strict(); const compiledSandboxWorkspaceSchema = Ls$3.object({ logicalPath: Ls$3.string(), rootEntries: Ls$3.array(Ls$3.string()).readonly(), sourceId: Ls$3.string(), sourcePath: Ls$3.string() }).strict(); const compiledWorkspaceResourceRootSchema = Ls$3.object({ contentHash: Ls$3.string().optional(), logicalPath: Ls$3.string(), rootEntries: Ls$3.array(Ls$3.string()).readonly() }).strict(); const compiledConnectionDefinitionSchema = Ls$3.object({ connectionName: Ls$3.string(), description: Ls$3.string(), exportName: Ls$3.string().optional(), logicalPath: Ls$3.string(), protocol: Ls$3.enum([`mcp`, `openapi`]).default(`mcp`), sourceId: Ls$3.string(), sourceKind: Ls$3.literal(`module`), url: Ls$3.string(), vercelConnect: Ls$3.object({ connector: Ls$3.string() }).strict().optional() }).strict(); const compiledToolDefinitionSchema = Ls$3.object({ description: Ls$3.string(), exportName: Ls$3.string().optional(), inputSchema: jsonObjectSchema.nullable(), logicalPath: Ls$3.string(), name: Ls$3.string(), outputSchema: jsonObjectSchema.optional(), sourceId: Ls$3.string(), sourceKind: Ls$3.literal(`module`) }).strict(); const compiledDynamicToolDefinitionSchema = Ls$3.object({ eventNames: Ls$3.array(Ls$3.string()).readonly(), exportName: Ls$3.string().optional(), logicalPath: Ls$3.string(), slug: Ls$3.string(), sourceId: Ls$3.string(), sourceKind: Ls$3.literal(`module`) }).strict(); const compiledDynamicSkillDefinitionSchema = Ls$3.object({ eventNames: Ls$3.array(Ls$3.string()).readonly(), exportName: Ls$3.string().optional(), logicalPath: Ls$3.string(), slug: Ls$3.string(), sourceId: Ls$3.string(), sourceKind: Ls$3.literal(`module`) }).strict(); const compiledDynamicInstructionsDefinitionSchema = Ls$3.object({ eventNames: Ls$3.array(Ls$3.string()).readonly(), exportName: Ls$3.string().optional(), logicalPath: Ls$3.string(), slug: Ls$3.string(), sourceId: Ls$3.string(), sourceKind: Ls$3.literal(`module`) }).strict(); const compiledHookDefinitionSchema = Ls$3.object({ exportName: Ls$3.string().optional(), logicalPath: Ls$3.string(), slug: Ls$3.string(), sourceId: Ls$3.string(), sourceKind: Ls$3.literal(`module`) }).strict(); const compiledAgentNodeManifestSchema = Ls$3.object({ agentRoot: Ls$3.string(), appRoot: Ls$3.string(), channels: Ls$3.array(compiledChannelEntrySchema), config: compiledAgentConfigSchema, connections: Ls$3.array(compiledConnectionDefinitionSchema), diagnosticsSummary: discoverDiagnosticsSummarySchema, disabledFrameworkTools: Ls$3.array(Ls$3.string()).readonly(), workflowEnabled: Ls$3.boolean().default(!1), dynamicInstructions: Ls$3.array(compiledDynamicInstructionsDefinitionSchema).default([]), dynamicSkills: Ls$3.array(compiledDynamicSkillDefinitionSchema).default([]), dynamicTools: Ls$3.array(compiledDynamicToolDefinitionSchema).default([]), hooks: Ls$3.array(compiledHookDefinitionSchema), sandbox: compiledSandboxDefinitionSchema.nullable(), sandboxWorkspaces: Ls$3.array(compiledSandboxWorkspaceSchema), schedules: Ls$3.array(compiledScheduleDefinitionSchema), remoteAgents: Ls$3.array(compiledRemoteAgentNodeSchema), skills: Ls$3.array(compiledSkillSourceSchema).readonly(), instructions: compiledInstructionsSchema.optional(), tools: Ls$3.array(compiledToolDefinitionSchema), workspaceResourceRoot: compiledWorkspaceResourceRootSchema }).strict(); const compiledSubagentNodeSchema = Ls$3.object({ agent: compiledAgentNodeManifestSchema, description: Ls$3.string(), entryPath: Ls$3.string(), logicalPath: Ls$3.string(), name: Ls$3.string(), nodeId: Ls$3.string(), rootPath: Ls$3.string(), sourceId: Ls$3.string(), sourceKind: Ls$3.literal(`module`), exportName: Ls$3.string().optional() }).strict(); const compiledSubagentEdgeSchema = Ls$3.object({ childNodeId: Ls$3.string(), parentNodeId: Ls$3.string() }).strict(); const compiledAgentManifestSchema = Ls$3.object({ agentRoot: Ls$3.string(), appRoot: Ls$3.string(), channels: Ls$3.array(compiledChannelEntrySchema), config: compiledAgentConfigSchema, connections: Ls$3.array(compiledConnectionDefinitionSchema), diagnosticsSummary: discoverDiagnosticsSummarySchema, disabledFrameworkTools: Ls$3.array(Ls$3.string()).readonly(), workflowEnabled: Ls$3.boolean().default(!1), dynamicInstructions: Ls$3.array(compiledDynamicInstructionsDefinitionSchema).default([]), dynamicSkills: Ls$3.array(compiledDynamicSkillDefinitionSchema).default([]), dynamicTools: Ls$3.array(compiledDynamicToolDefinitionSchema).default([]), hooks: Ls$3.array(compiledHookDefinitionSchema), kind: Ls$3.literal(COMPILED_AGENT_MANIFEST_KIND), remoteAgents: Ls$3.array(compiledRemoteAgentNodeSchema), sandbox: compiledSandboxDefinitionSchema.nullable(), sandboxWorkspaces: Ls$3.array(compiledSandboxWorkspaceSchema), schedules: Ls$3.array(compiledScheduleDefinitionSchema), skills: Ls$3.array(compiledSkillSourceSchema).readonly(), subagentEdges: Ls$3.array(compiledSubagentEdgeSchema), subagents: Ls$3.array(compiledSubagentNodeSchema), instructions: compiledInstructionsSchema.optional(), tools: Ls$3.array(compiledToolDefinitionSchema), version: Ls$3.literal(31), workspaceResourceRoot: compiledWorkspaceResourceRootSchema }).strict(); //#endregion //#region node_modules/eve/dist/src/runtime/sessions/runtime-session.js function createRuntimeSession(e = `test-session`) { return { bundleCache: /* @__PURE__ */ new Map(), bundleCacheKeyBySourceKey: /* @__PURE__ */ new Map(), compiledArtifacts: null, id: e }; } const RUNTIME_SESSION_STORAGE_GLOBAL_KEY = Symbol.for(`eve.runtime-session-storage`); const RUNTIME_SESSION_DEFAULT_GLOBAL_KEY = Symbol.for(`eve.runtime-session-default`); const globalContainer$1 = globalThis; globalContainer$1[RUNTIME_SESSION_STORAGE_GLOBAL_KEY] === void 0 && (globalContainer$1[RUNTIME_SESSION_STORAGE_GLOBAL_KEY] = new AsyncLocalStorage()); const runtimeSessionStorage = globalContainer$1[RUNTIME_SESSION_STORAGE_GLOBAL_KEY]; function resolveProcessDefaultSession() { return globalContainer$1[RUNTIME_SESSION_DEFAULT_GLOBAL_KEY] === void 0 && (globalContainer$1[RUNTIME_SESSION_DEFAULT_GLOBAL_KEY] = createRuntimeSession(`process-default`)), globalContainer$1[RUNTIME_SESSION_DEFAULT_GLOBAL_KEY]; } function getActiveRuntimeSession() { return runtimeSessionStorage.getStore() ?? resolveProcessDefaultSession(); } //#endregion //#region node_modules/eve/dist/src/runtime/loaders/bundled-artifacts.js function installBundledCompiledArtifacts(e) { getActiveRuntimeSession().compiledArtifacts = { manifest: e.manifest, metadata: e.metadata, moduleMap: e.moduleMap }; } function readBundledCompiledArtifacts() { return getActiveRuntimeSession().compiledArtifacts; } //#endregion //#region node_modules/eve/dist/src/runtime/loaders/artifact-paths.js function resolveRuntimeCompilerArtifactPaths(e) { let t = normalizeFilesystemPath(e), n = `${t}/.eve/discovery`, r = `${t}/.eve/compile`; return { appRoot: t, compiledManifestPath: `${r}/compiled-agent-manifest.json`, compileDirectoryPath: r, compileMetadataPath: `${r}/compile-metadata.json`, diagnosticsPath: `${n}/diagnostics.json`, discoveryDirectoryPath: n, discoveryManifestPath: `${n}/agent-discovery-manifest.json`, moduleMapPath: `${r}/module-map.mjs` }; } function normalizeFilesystemPath(e) { let t = e.replaceAll(`\\`, `/`); return t === `/` ? t : t.replace(/\/+$/, ``); } //#endregion //#region node_modules/eve/dist/src/compiled/zod-validation-error/index.js function t$12(e) { return e instanceof Object && `name` in e && (e.name === `ZodError` || e.name === `$ZodError`) && `issues` in e && Array.isArray(e.issues); } var n$14 = `ZodValidationError`; var r$16 = class extends Error { name; details; constructor(e, t) { super(e, t), this.name = n$14, this.details = i$15(t); } toString() { return this.message; } }; function i$15(e) { if (e) { let n = e.cause; if (t$12(n)) return n.issues; } return []; } function f$12(e) { return e.description ?? ``; } function O$10(e) { return e.length !== 0; } var k$11 = /[$_\p{ID_Start}][$\u200c\u200d\p{ID_Continue}]*/u; function A$10(e) { if (e.length === 1) { let t = e[0]; return typeof t == `symbol` && (t = f$12(t)), t.toString() || `""`; } return e.reduce((e, t) => typeof t == `number` ? e + `[` + t.toString() + `]` : (typeof t == `symbol` && (t = f$12(t)), t.includes(`"`) ? e + `["` + j$10(t) + `"]` : k$11.test(t) ? e + (e.length === 0 ? `` : `.`) + t : e + `["` + t + `"]`), ``); } function j$10(e) { return e.replace(/"/g, `\\"`); } function M$10(e) { return e.length === 0 ? e : e.charAt(0).toUpperCase() + e.slice(1); } var N$9 = { prefix: `Validation error`, prefixSeparator: `: `, maxIssuesInMessage: 99, unionSeparator: ` or `, issueSeparator: `; `, includePath: !0, forceTitleCase: !0 }; function P$9(e = {}) { let t = { ...N$9, ...e }; return function(e) { return I$9(e.slice(0, t.maxIssuesInMessage).map((e) => F$9(e, t)).join(t.issueSeparator), t); }; } function F$9(e, t) { if (e.code === `invalid_union` && O$10(e.errors)) { let n = e.errors.map((n) => n.map((n) => F$9({ ...n, path: e.path.concat(n.path) }, t)).join(t.issueSeparator)); return Array.from(new Set(n)).join(t.unionSeparator); } let n = []; t.forceTitleCase ? n.push(M$10(e.message)) : n.push(e.message); pathCondition: if (t.includePath && e.path !== void 0 && O$10(e.path)) { if (e.path.length === 1) { let t = e.path[0]; if (typeof t == `number`) { n.push(` at index ${t}`); break pathCondition; } } n.push(` at "${A$10(e.path)}"`); } return n.join(``); } function I$9(e, t) { return t.prefix == null ? e.length > 0 ? e : N$9.prefix : e.length > 0 ? [t.prefix, e].join(t.prefixSeparator) : t.prefix; } function R$10(e, t = {}) { let n = e.issues, i; return i = O$10(n) ? z$10(t)(n) : e.message, new r$16(i, { cause: e }); } function z$10(e) { return `messageBuilder` in e ? e.messageBuilder : P$9(e); } var B$11 = (e = {}) => (n) => t$12(n) ? R$10(n, e) : n instanceof Error ? new r$16(n.message, { cause: n }) : new r$16(`Unknown error`); function V$10(e, t = {}) { return B$11(t)(e); } //#endregion //#region node_modules/eve/dist/src/runtime/validation.js function formatValidationError(e) { return V$10(e, { prefix: void 0 }).message; } //#endregion //#region node_modules/eve/dist/src/runtime/loaders/manifest.js const BUNDLED_MANIFEST_SOURCE = `bundled compiled manifest`; var LoadCompiledManifestError = class extends Error { manifestPath; constructor(e, t) { super(e), this.name = `LoadCompiledManifestError`, t !== void 0 && (this.manifestPath = t); } }; async function loadCompiledManifest(e) { let r = e.compiledArtifactsSource.kind === `disk` ? resolveRuntimeCompilerArtifactPaths(e.compiledArtifactsSource.appRoot).compiledManifestPath : void 0; if (r !== void 0) { let { readFile: e } = await import(`node:fs/promises`), t; try { t = JSON.parse(await e(r, `utf8`)); } catch (e) { throw new LoadCompiledManifestError(formatLoadErrorMessage$2(e), r); } return parseCompiledManifest(t, r); } let a = readBundledCompiledArtifacts(); if (a !== null) return parseCompiledManifest(a.manifest, BUNDLED_MANIFEST_SOURCE); throw new LoadCompiledManifestError(`Compiled manifest is unavailable without an app root or bundled compiled artifacts.`, BUNDLED_MANIFEST_SOURCE); } function parseCompiledManifest(t, n) { let i = compiledAgentManifestSchema.safeParse(t); if (!i.success) throw new LoadCompiledManifestError(`Expected "${n}" to contain a valid compiled eve agent manifest. ${formatValidationError(i.error)}`, n); return i.data; } function formatLoadErrorMessage$2(e) { return e instanceof Error ? e.message : `Unknown manifest load failure.`; } //#endregion //#region node_modules/eve/dist/src/internal/authored-module.js function getAuthoredModuleExport(e, t) { return e[t.exportName ?? `default`]; } async function materializeAuthoredModuleExport(e) { return typeof e == `function` ? await e() : e; } function expectObjectRecord(e, t) { if (typeof e != `object` || !e || Array.isArray(e)) throw Error(t); return e; } function expectString(e, t) { if (typeof e != `string`) throw Error(t); return e; } function expectFunction(e, t) { if (typeof e != `function`) throw Error(t); return e; } function expectProviderOptions(e, t) { let n = expectObjectRecord(e, t), r = {}; for (let [e, i] of Object.entries(n)) r[e] = expectObjectRecord(i, t); return r; } function expectOnlyKnownKeys(e, t, n) { let r = new Set(t); for (let t of Object.keys(e)) if (!r.has(t)) throw Error(`${n} Unknown key "${t}".`); } //#endregion //#region node_modules/eve/dist/src/runtime/skills/fragment-context.js const LOAD_SKILL_TOOL_NAME = `load_skill`; //#endregion //#region node_modules/eve/dist/src/internal/runtime-registry.js var RuntimeRegistryError = class extends Error { registry; entryName; logicalPath; sourceId; constructor(e, t, n = {}) { super(t), this.name = `RuntimeRegistryError`, this.registry = e, n.entryName !== void 0 && (this.entryName = n.entryName), n.logicalPath !== void 0 && (this.logicalPath = n.logicalPath), n.sourceId !== void 0 && (this.sourceId = n.sourceId); } }; var RuntimeRegistry = class { registry; _entries = /* @__PURE__ */ new Map(); _reserved; constructor(e, t = []) { this.registry = e, this._reserved = new Set(t); } get size() { return this._entries.size; } has(e) { return this._entries.has(e); } get(e) { return this._entries.get(e) ?? null; } asMap() { return this._entries; } register(e, t, n = {}) { if (this._entries.has(e)) throw new RuntimeRegistryError(this.registry, n.duplicateMessage ?? `Duplicate ${this.registry} name "${e}".`, { ...n.location, entryName: e }); if (this._reserved.has(e)) throw new RuntimeRegistryError(this.registry, n.reservedMessage ?? `${capitalize(this.registry)} "${e}" collides with another runtime-visible name.`, { ...n.location, entryName: e }); this._entries.set(e, t), this._reserved.add(e); } set(e, t) { this._entries.set(e, t), this._reserved.add(e); } }; function capitalize(e) { return e.length === 0 ? e : e.charAt(0).toUpperCase() + e.slice(1); } //#endregion //#region node_modules/eve/dist/src/runtime/tools/registry.js async function createRuntimeToolRegistry(t, n = {}) { let r = [], i = new RuntimeRegistry(`tool`, n.reservedToolNames ?? []); for (let e of t.tools) { let t = await createPreparedRuntimeTool(e); i.register(e.name, { definition: e, prepared: t }, { location: { logicalPath: e.logicalPath, sourceId: e.sourceId }, duplicateMessage: `Found multiple authored tools named "${e.name}". Tool names must be unique at runtime.`, reservedMessage: `Tool "${e.name}" collides with another runtime-visible tool name.` }), r.push(t); } return { preparedTools: r, toolsByName: i.asMap() }; } function findRegisteredRuntimeTool(e, t) { return e.toolsByName.get(t) ?? null; } async function createPreparedRuntimeTool(e) { return { description: e.description, inputSchema: e.inputSchema, kind: `authored-tool`, logicalPath: e.logicalPath, name: e.name, outputSchema: e.outputSchema, sourceId: e.sourceId }; } //#endregion //#region node_modules/eve/dist/src/runtime/subagents/registry.js const SUBAGENT_TOOL_INPUT_SCHEMA = Object.freeze({ type: `object`, properties: Object.freeze({ message: Object.freeze({ type: `string`, description: `The message to send to the subagent. Provide all context the subagent needs to complete the task; the subagent does not see the parent's history.` }), outputSchema: Object.freeze({ type: `object`, description: `When provided, the subagent runs in task mode and must produce structured output matching this JSON Schema. The structured output becomes the tool result.` }) }), required: Object.freeze([`message`]), additionalProperties: !1 }); function createRuntimeSubagentRegistry(t) { let n = [], r = new RuntimeRegistry(`subagent`, t.reservedToolNames ?? []), i = /* @__PURE__ */ new Map(); for (let e of t.subagents) { let t = { logicalPath: e.logicalPath, sourceId: e.sourceId }; if (i.has(e.nodeId)) throw new RuntimeRegistryError(`subagent`, `Found multiple runtime subagents mapped to node id "${e.nodeId}".`, { ...t, entryName: e.name }); let a = createPreparedRuntimeSubagentTool(e), o = { definition: e, prepared: a }; r.register(e.name, o, { location: t, duplicateMessage: `Found multiple subagents named "${e.name}". Subagent names must be unique at runtime.`, reservedMessage: `Subagent "${e.name}" collides with another runtime-visible tool name.` }), n.push(a), i.set(e.nodeId, o); } return { preparedTools: n, subagentsByName: r.asMap(), subagentsByNodeId: i }; } function createPreparedRuntimeSubagentTool(e) { return { description: e.description, inputSchema: SUBAGENT_TOOL_INPUT_SCHEMA, kind: e.kind, logicalPath: e.logicalPath, name: e.name, nodeId: e.nodeId, outputSchema: e.kind === `remote` ? e.outputSchema : void 0, sourceId: e.sourceId }; } //#endregion //#region node_modules/eve/dist/src/shared/workflow-sandbox.js const WORKFLOW_TOOL_NAME = `Workflow`; const WORKFLOW_SANDBOX_MODULE_KEY = Symbol.for(`eve.workflowSandbox.module`); const WORKFLOW_SANDBOX_MODULE_SPECIFIER = [ `#compiled`, `experimental-ai-sdk-code-mode`, `index.js` ].join(`/`); let workflowSandboxModulePromise; async function createWorkflowSandboxTool(e) { let { createCodeModeTool: t } = await loadWorkflowSandboxModule(); return t(e.hostTools, createWorkflowSandboxOptions(e.continuationSecurity, e.lifecycle)); } async function requestWorkflowSandboxInterrupt(e) { let { requestCodeModeInterrupt: t } = await loadWorkflowSandboxModule(); return t(e); } async function getWorkflowSandboxInterrupt(e, t) { let { getCodeModeInterrupt: n } = await loadWorkflowSandboxModule(); return n(e, t); } async function continueWorkflowSandboxInterrupt(e) { let { continueCodeModeInterrupt: t } = await loadWorkflowSandboxModule(); return t({ interrupt: e.interrupt, options: createWorkflowSandboxOptions(e.continuationSecurity, e.lifecycle), resolution: e.resolution, tools: e.tools }); } async function unwrapWorkflowSandboxResult(e, t) { let { unwrapCodeModeResult: n } = await loadWorkflowSandboxModule(); return n(e, t); } function readWorkflowSandboxResolution(e) { if (typeof e != `object` || !e) return; let t = e.codeModeInterrupt; if (!(typeof t != `object` || !t)) return t.resolution; } function createWorkflowSandboxOptions(e, t) { let n = { continuationSecurity: e }; return t !== void 0 && (n.lifecycle = t), n; } async function loadWorkflowSandboxModule() { let e = globalThis[WORKFLOW_SANDBOX_MODULE_KEY]; return e === void 0 ? (workflowSandboxModulePromise ??= importWorkflowSandboxModule(WORKFLOW_SANDBOX_MODULE_SPECIFIER), await workflowSandboxModulePromise) : e; } async function importWorkflowSandboxModule(e) { return await import(e); } //#endregion //#region node_modules/eve/dist/src/runtime/governance/auth/vercel-oidc-project.js const VERCEL_OIDC_PROJECT_RESOLVERS = Symbol.for(`eve.vercel-oidc-project-resolvers`); const globalResolverRegistry = globalThis; globalResolverRegistry[VERCEL_OIDC_PROJECT_RESOLVERS] === void 0 && (globalResolverRegistry[VERCEL_OIDC_PROJECT_RESOLVERS] = /* @__PURE__ */ new WeakMap()); const projectResolvers = globalResolverRegistry[VERCEL_OIDC_PROJECT_RESOLVERS]; async function withVercelOidcProjectResolver(e, t) { let n = projectResolvers.get(e.request); projectResolvers.set(e.request, e.resolveCurrentProject); try { return await t(); } finally { n === void 0 ? projectResolvers.delete(e.request) : projectResolvers.set(e.request, n); } } async function resolveVercelOidcCurrentProject(e) { let t = projectResolvers.get(e); return t === void 0 ? void 0 : await t(); } //#endregion //#region node_modules/eve/dist/src/compiled/_chunks/workflow/chunk-BHKSVoKr.js var t$11 = Object.create; var n$13 = Object.defineProperty; var r$15 = Object.getOwnPropertyDescriptor; var i$14 = Object.getOwnPropertyNames; var a$12 = Object.getPrototypeOf; var o$12 = Object.prototype.hasOwnProperty; var s$10 = (e, t) => () => (e && (t = e(e = 0)), t); var c$12 = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t.exports); var l$11 = (e, t) => { let r = {}; for (var i in e) n$13(r, i, { get: e[i], enumerable: !0 }); return t || n$13(r, Symbol.toStringTag, { value: `Module` }), r; }; var u$13 = (e, t, a, s) => { if (t && typeof t == `object` || typeof t == `function`) for (var c = i$14(t), l = 0, u = c.length, d; l < u; l++) d = c[l], !o$12.call(e, d) && d !== a && n$13(e, d, { get: ((e) => t[e]).bind(null, d), enumerable: !(s = r$15(t, d)) || s.enumerable }); return e; }; var d$13 = (e, r, i) => (i = e == null ? {} : t$11(a$12(e)), u$13(r || !e || !e.__esModule ? n$13(i, `default`, { value: e, enumerable: !0 }) : i, e)); var f$11 = createRequire(import.meta.url); //#endregion //#region node_modules/eve/dist/src/compiled/jose/index.js const t$10 = new TextEncoder(); const n$12 = new TextDecoder(); function i$13(...e) { let t = e.reduce((e, { length: t }) => e + t, 0), n = new Uint8Array(t), r = 0; for (let t of e) n.set(t, r), r += t.length; return n; } function c$11(e) { let t = new Uint8Array(e.length); for (let n = 0; n < e.length; n++) { let r = e.charCodeAt(n); if (r > 127) throw TypeError(`non-ASCII string encountered in encode()`); t[n] = r; } return t; } function l$10(e) { if (Uint8Array.prototype.toBase64) return e.toBase64(); let t = 32768, n = []; for (let r = 0; r < e.length; r += t) n.push(String.fromCharCode.apply(null, e.subarray(r, r + t))); return btoa(n.join(``)); } function u$12(e) { if (Uint8Array.fromBase64) return Uint8Array.fromBase64(e); let t = atob(e), n = new Uint8Array(t.length); for (let e = 0; e < t.length; e++) n[e] = t.charCodeAt(e); return n; } var d$12 = l$11({ decode: () => f$10, encode: () => p$13 }); function f$10(e) { if (Uint8Array.fromBase64) return Uint8Array.fromBase64(typeof e == `string` ? e : n$12.decode(e), { alphabet: `base64url` }); let t = e; t instanceof Uint8Array && (t = n$12.decode(t)), t = t.replace(/-/g, `+`).replace(/_/g, `/`); try { return u$12(t); } catch { throw TypeError(`The input to be decoded is not correctly encoded.`); } } function p$13(e) { let n = e; return typeof n == `string` && (n = t$10.encode(n)), Uint8Array.prototype.toBase64 ? n.toBase64({ alphabet: `base64url`, omitPadding: !0 }) : l$10(n).replace(/=/g, ``).replace(/\+/g, `-`).replace(/\//g, `_`); } const m$9 = (e, t = `algorithm.name`) => TypeError(`CryptoKey does not support this operation, its ${t} must be ${e}`); const h$11 = (e, t) => e.name === t; function g$10(e) { return parseInt(e.name.slice(4), 10); } function _$9(e, t) { if (g$10(e.hash) !== t) throw m$9(`SHA-${t}`, `algorithm.hash`); } function v$9(e) { switch (e) { case `ES256`: return `P-256`; case `ES384`: return `P-384`; case `ES512`: return `P-521`; default: throw Error(`unreachable`); } } function y$7(e, t) { if (t && !e.usages.includes(t)) throw TypeError(`CryptoKey does not support this operation, its usages must include ${t}.`); } function ee$6(e, t, n) { switch (t) { case `HS256`: case `HS384`: case `HS512`: if (!h$11(e.algorithm, `HMAC`)) throw m$9(`HMAC`); _$9(e.algorithm, parseInt(t.slice(2), 10)); break; case `RS256`: case `RS384`: case `RS512`: if (!h$11(e.algorithm, `RSASSA-PKCS1-v1_5`)) throw m$9(`RSASSA-PKCS1-v1_5`); _$9(e.algorithm, parseInt(t.slice(2), 10)); break; case `PS256`: case `PS384`: case `PS512`: if (!h$11(e.algorithm, `RSA-PSS`)) throw m$9(`RSA-PSS`); _$9(e.algorithm, parseInt(t.slice(2), 10)); break; case `Ed25519`: case `EdDSA`: if (!h$11(e.algorithm, `Ed25519`)) throw m$9(`Ed25519`); break; case `ML-DSA-44`: case `ML-DSA-65`: case `ML-DSA-87`: if (!h$11(e.algorithm, t)) throw m$9(t); break; case `ES256`: case `ES384`: case `ES512`: { if (!h$11(e.algorithm, `ECDSA`)) throw m$9(`ECDSA`); let n = v$9(t); if (e.algorithm.namedCurve !== n) throw m$9(n, `algorithm.namedCurve`); break; } default: throw TypeError(`CryptoKey does not support this operation`); } y$7(e, n); } function x$10(e, t, ...n) { if (n = n.filter(Boolean), n.length > 2) { let t = n.pop(); e += `one of type ${n.join(`, `)}, or ${t}.`; } else n.length === 2 ? e += `one of type ${n[0]} or ${n[1]}.` : e += `of type ${n[0]}.`; return t == null ? e += ` Received ${t}` : typeof t == `function` && t.name ? e += ` Received function ${t.name}` : typeof t == `object` && t && t.constructor?.name && (e += ` Received an instance of ${t.constructor.name}`), e; } const S$11 = (e, ...t) => x$10(`Key must be `, e, ...t); const te$6 = (e, t, ...n) => x$10(`Key for the ${e} algorithm must be `, t, ...n); var ne$6 = l$11({ JOSEAlgNotAllowed: () => ie$7, JOSEError: () => C$12, JOSENotSupported: () => T$12, JWEDecryptionFailed: () => E$12, JWEInvalid: () => D$11, JWKInvalid: () => ae$8, JWKSInvalid: () => oe$8, JWKSMultipleMatchingKeys: () => ce$9, JWKSNoMatchingKey: () => se$9, JWKSTimeout: () => le$9, JWSInvalid: () => O$9, JWSSignatureVerificationFailed: () => ue$9, JWTClaimValidationFailed: () => w$12, JWTExpired: () => re$7, JWTInvalid: () => k$10 }); var C$12 = class extends Error { static code = `ERR_JOSE_GENERIC`; code = `ERR_JOSE_GENERIC`; constructor(e, t) { super(e, t), this.name = this.constructor.name, Error.captureStackTrace?.(this, this.constructor); } }; var w$12 = class extends C$12 { static code = `ERR_JWT_CLAIM_VALIDATION_FAILED`; code = `ERR_JWT_CLAIM_VALIDATION_FAILED`; claim; reason; payload; constructor(e, t, n = `unspecified`, r = `unspecified`) { super(e, { cause: { claim: n, reason: r, payload: t } }), this.claim = n, this.reason = r, this.payload = t; } }; var re$7 = class extends C$12 { static code = `ERR_JWT_EXPIRED`; code = `ERR_JWT_EXPIRED`; claim; reason; payload; constructor(e, t, n = `unspecified`, r = `unspecified`) { super(e, { cause: { claim: n, reason: r, payload: t } }), this.claim = n, this.reason = r, this.payload = t; } }; var ie$7 = class extends C$12 { static code = `ERR_JOSE_ALG_NOT_ALLOWED`; code = `ERR_JOSE_ALG_NOT_ALLOWED`; }; var T$12 = class extends C$12 { static code = `ERR_JOSE_NOT_SUPPORTED`; code = `ERR_JOSE_NOT_SUPPORTED`; }; var E$12 = class extends C$12 { static code = `ERR_JWE_DECRYPTION_FAILED`; code = `ERR_JWE_DECRYPTION_FAILED`; constructor(e = `decryption operation failed`, t) { super(e, t); } }; var D$11 = class extends C$12 { static code = `ERR_JWE_INVALID`; code = `ERR_JWE_INVALID`; }; var O$9 = class extends C$12 { static code = `ERR_JWS_INVALID`; code = `ERR_JWS_INVALID`; }; var k$10 = class extends C$12 { static code = `ERR_JWT_INVALID`; code = `ERR_JWT_INVALID`; }; var ae$8 = class extends C$12 { static code = `ERR_JWK_INVALID`; code = `ERR_JWK_INVALID`; }; var oe$8 = class extends C$12 { static code = `ERR_JWKS_INVALID`; code = `ERR_JWKS_INVALID`; }; var se$9 = class extends C$12 { static code = `ERR_JWKS_NO_MATCHING_KEY`; code = `ERR_JWKS_NO_MATCHING_KEY`; constructor(e = `no applicable key found in the JSON Web Key Set`, t) { super(e, t); } }; var ce$9 = class extends C$12 { [Symbol.asyncIterator]; static code = `ERR_JWKS_MULTIPLE_MATCHING_KEYS`; code = `ERR_JWKS_MULTIPLE_MATCHING_KEYS`; constructor(e = `multiple matching keys found in the JSON Web Key Set`, t) { super(e, t); } }; var le$9 = class extends C$12 { static code = `ERR_JWKS_TIMEOUT`; code = `ERR_JWKS_TIMEOUT`; constructor(e = `request timed out`, t) { super(e, t); } }; var ue$9 = class extends C$12 { static code = `ERR_JWS_SIGNATURE_VERIFICATION_FAILED`; code = `ERR_JWS_SIGNATURE_VERIFICATION_FAILED`; constructor(e = `signature verification failed`, t) { super(e, t); } }; const j$9 = (e) => { if (e?.[Symbol.toStringTag] === `CryptoKey`) return !0; try { return e instanceof CryptoKey; } catch { return !1; } }; const de$9 = (e) => e?.[Symbol.toStringTag] === `KeyObject`; const fe$9 = (e) => j$9(e) || de$9(e); function P$8(e, t, n) { try { return f$10(e); } catch { throw new n(`Failed to base64url decode the ${t}`); } } const Ae$8 = (e) => typeof e == `object` && !!e; function F$8(e) { if (!Ae$8(e) || Object.prototype.toString.call(e) !== `[object Object]`) return !1; if (Object.getPrototypeOf(e) === null) return !0; let t = e; for (; Object.getPrototypeOf(t) !== null;) t = Object.getPrototypeOf(t); return Object.getPrototypeOf(e) === t; } function I$8(...e) { let t = e.filter(Boolean); if (t.length === 0 || t.length === 1) return !0; let n; for (let e of t) { let t = Object.keys(e); if (!n || n.size === 0) { n = new Set(t); continue; } for (let e of t) { if (n.has(e)) return !1; n.add(e); } } return !0; } const L$8 = (e) => F$8(e) && typeof e.kty == `string`; const je$9 = (e) => e.kty !== `oct` && (e.kty === `AKP` && typeof e.priv == `string` || typeof e.d == `string`); const Me$8 = (e) => e.kty !== `oct` && e.d === void 0 && e.priv === void 0; const Ne$9 = (e) => e.kty === `oct` && typeof e.k == `string`; function R$9(e, t) { if (e.startsWith(`RS`) || e.startsWith(`PS`)) { let { modulusLength: n } = t.algorithm; if (typeof n != `number` || n < 2048) throw TypeError(`${e} requires key modulusLength to be 2048 bits or larger`); } } function Je$9(e, t) { let n = `SHA-${e.slice(-3)}`; switch (e) { case `HS256`: case `HS384`: case `HS512`: return { hash: n, name: `HMAC` }; case `PS256`: case `PS384`: case `PS512`: return { hash: n, name: `RSA-PSS`, saltLength: parseInt(e.slice(-3), 10) >> 3 }; case `RS256`: case `RS384`: case `RS512`: return { hash: n, name: `RSASSA-PKCS1-v1_5` }; case `ES256`: case `ES384`: case `ES512`: return { hash: n, name: `ECDSA`, namedCurve: t.namedCurve }; case `Ed25519`: case `EdDSA`: return { name: `Ed25519` }; case `ML-DSA-44`: case `ML-DSA-65`: case `ML-DSA-87`: return { name: e }; default: throw new T$12(`alg ${e} is not supported either by JOSE or your javascript runtime`); } } async function Ye$9(e, t, n) { if (t instanceof Uint8Array) { if (!e.startsWith(`HS`)) throw TypeError(S$11(t, `CryptoKey`, `KeyObject`, `JSON Web Key`)); return crypto.subtle.importKey(`raw`, t, { hash: `SHA-${e.slice(-3)}`, name: `HMAC` }, !1, [n]); } return ee$6(t, e, n), t; } async function Ze$9(e, t, n, r) { let i = await Ye$9(e, t, `verify`); R$9(e, i); let a = Je$9(e, i.algorithm); try { return await crypto.subtle.verify(a, i, n, r); } catch { return !1; } } const z$9 = `Invalid or unsupported JWK "alg" (Algorithm) Parameter value`; function tt$9(e) { let t, n; switch (e.kty) { case `AKP`: switch (e.alg) { case `ML-DSA-44`: case `ML-DSA-65`: case `ML-DSA-87`: t = { name: e.alg }, n = e.priv ? [`sign`] : [`verify`]; break; default: throw new T$12(z$9); } break; case `RSA`: switch (e.alg) { case `PS256`: case `PS384`: case `PS512`: t = { name: `RSA-PSS`, hash: `SHA-${e.alg.slice(-3)}` }, n = e.d ? [`sign`] : [`verify`]; break; case `RS256`: case `RS384`: case `RS512`: t = { name: `RSASSA-PKCS1-v1_5`, hash: `SHA-${e.alg.slice(-3)}` }, n = e.d ? [`sign`] : [`verify`]; break; case `RSA-OAEP`: case `RSA-OAEP-256`: case `RSA-OAEP-384`: case `RSA-OAEP-512`: t = { name: `RSA-OAEP`, hash: `SHA-${parseInt(e.alg.slice(-3), 10) || 1}` }, n = e.d ? [`decrypt`, `unwrapKey`] : [`encrypt`, `wrapKey`]; break; default: throw new T$12(z$9); } break; case `EC`: switch (e.alg) { case `ES256`: case `ES384`: case `ES512`: t = { name: `ECDSA`, namedCurve: { ES256: `P-256`, ES384: `P-384`, ES512: `P-521` }[e.alg] }, n = e.d ? [`sign`] : [`verify`]; break; case `ECDH-ES`: case `ECDH-ES+A128KW`: case `ECDH-ES+A192KW`: case `ECDH-ES+A256KW`: t = { name: `ECDH`, namedCurve: e.crv }, n = e.d ? [`deriveBits`] : []; break; default: throw new T$12(z$9); } break; case `OKP`: switch (e.alg) { case `Ed25519`: case `EdDSA`: t = { name: `Ed25519` }, n = e.d ? [`sign`] : [`verify`]; break; case `ECDH-ES`: case `ECDH-ES+A128KW`: case `ECDH-ES+A192KW`: case `ECDH-ES+A256KW`: t = { name: e.crv }, n = e.d ? [`deriveBits`] : []; break; default: throw new T$12(z$9); } break; default: throw new T$12(`Invalid or unsupported JWK "kty" (Key Type) Parameter value`); } return { algorithm: t, keyUsages: n }; } async function B$10(e) { if (!e.alg) throw TypeError(`"alg" argument is required when "jwk.alg" is not present`); let { algorithm: t, keyUsages: n } = tt$9(e), r = { ...e }; return r.kty !== `AKP` && delete r.alg, delete r.use, crypto.subtle.importKey(`jwk`, r, t, e.ext ?? !(e.d || e.priv), e.key_ops ?? n); } const V$9 = `given KeyObject instance cannot be used for this algorithm`; let H$9; const nt$9 = async (e, t, n, r = !1) => { H$9 ||= /* @__PURE__ */ new WeakMap(); let i = H$9.get(e); if (i?.[n]) return i[n]; let a = await B$10({ ...t, alg: n }); return r && Object.freeze(e), i ? i[n] = a : H$9.set(e, { [n]: a }), a; }; const rt$8 = (e, t) => { H$9 ||= /* @__PURE__ */ new WeakMap(); let n = H$9.get(e); if (n?.[t]) return n[t]; let r = e.type === `public`, i = !!r, a; if (e.asymmetricKeyType === `x25519`) { switch (t) { case `ECDH-ES`: case `ECDH-ES+A128KW`: case `ECDH-ES+A192KW`: case `ECDH-ES+A256KW`: break; default: throw TypeError(V$9); } a = e.toCryptoKey(e.asymmetricKeyType, i, r ? [] : [`deriveBits`]); } if (e.asymmetricKeyType === `ed25519`) { if (t !== `EdDSA` && t !== `Ed25519`) throw TypeError(V$9); a = e.toCryptoKey(e.asymmetricKeyType, i, [r ? `verify` : `sign`]); } switch (e.asymmetricKeyType) { case `ml-dsa-44`: case `ml-dsa-65`: case `ml-dsa-87`: if (t !== e.asymmetricKeyType.toUpperCase()) throw TypeError(V$9); a = e.toCryptoKey(e.asymmetricKeyType, i, [r ? `verify` : `sign`]); } if (e.asymmetricKeyType === `rsa`) { let n; switch (t) { case `RSA-OAEP`: n = `SHA-1`; break; case `RS256`: case `PS256`: case `RSA-OAEP-256`: n = `SHA-256`; break; case `RS384`: case `PS384`: case `RSA-OAEP-384`: n = `SHA-384`; break; case `RS512`: case `PS512`: case `RSA-OAEP-512`: n = `SHA-512`; break; default: throw TypeError(V$9); } if (t.startsWith(`RSA-OAEP`)) return e.toCryptoKey({ name: `RSA-OAEP`, hash: n }, i, r ? [`encrypt`] : [`decrypt`]); a = e.toCryptoKey({ name: t.startsWith(`PS`) ? `RSA-PSS` : `RSASSA-PKCS1-v1_5`, hash: n }, i, [r ? `verify` : `sign`]); } if (e.asymmetricKeyType === `ec`) { let n = (/* @__PURE__ */ new Map([ [`prime256v1`, `P-256`], [`secp384r1`, `P-384`], [`secp521r1`, `P-521`] ])).get(e.asymmetricKeyDetails?.namedCurve); if (!n) throw TypeError(V$9); let o = { ES256: `P-256`, ES384: `P-384`, ES512: `P-521` }; o[t] && n === o[t] && (a = e.toCryptoKey({ name: `ECDSA`, namedCurve: n }, i, [r ? `verify` : `sign`])), t.startsWith(`ECDH-ES`) && (a = e.toCryptoKey({ name: `ECDH`, namedCurve: n }, i, r ? [] : [`deriveBits`])); } if (!a) throw TypeError(V$9); return n ? n[t] = a : H$9.set(e, { [t]: a }), a; }; async function U$9(e, t) { if (e instanceof Uint8Array || j$9(e)) return e; if (de$9(e)) { if (e.type === `secret`) return e.export(); if (`toCryptoKey` in e && typeof e.toCryptoKey == `function`) try { return rt$8(e, t); } catch (e) { if (e instanceof TypeError) throw e; } return nt$9(e, e.export({ format: `jwk` }), t); } if (L$8(e)) return e.k ? f$10(e.k) : nt$9(e, e, t, !0); throw Error(`unreachable`); } async function Et$8(e, t, n) { if (!F$8(e)) throw TypeError(`JWK must be an object`); let r; switch (t ??= e.alg, r ??= n?.extractable ?? e.ext, e.kty) { case `oct`: if (typeof e.k != `string` || !e.k) throw TypeError(`missing "k" (Key Value) Parameter value`); return f$10(e.k); case `RSA`: if (`oth` in e && e.oth !== void 0) throw new T$12(`RSA JWK "oth" (Other Primes Info) Parameter value is not supported`); return B$10({ ...e, alg: t, ext: r }); case `AKP`: if (typeof e.alg != `string` || !e.alg) throw TypeError(`missing "alg" (Algorithm) Parameter value`); if (t !== void 0 && t !== e.alg) throw TypeError(`JWK alg and alg option value mismatch`); return B$10({ ...e, ext: r }); case `EC`: case `OKP`: return B$10({ ...e, alg: t, ext: r }); default: throw new T$12(`Unsupported "kty" (Key Type) Parameter value`); } } function q$8(e, t, n, r, i) { if (i.crit !== void 0 && r?.crit === void 0) throw new e(`"crit" (Critical) Header Parameter MUST be integrity protected`); if (!r || r.crit === void 0) return /* @__PURE__ */ new Set(); if (!Array.isArray(r.crit) || r.crit.length === 0 || r.crit.some((e) => typeof e != `string` || e.length === 0)) throw new e(`"crit" (Critical) Header Parameter MUST be an array of non-empty strings when present`); let a; a = n === void 0 ? t : new Map([...Object.entries(n), ...t.entries()]); for (let t of r.crit) { if (!a.has(t)) throw new T$12(`Extension Header Parameter "${t}" is not recognized`); if (i[t] === void 0) throw new e(`Extension Header Parameter "${t}" is missing`); if (a.get(t) && r[t] === void 0) throw new e(`Extension Header Parameter "${t}" MUST be integrity protected`); } return new Set(r.crit); } function It$6(e, t) { if (t !== void 0 && (!Array.isArray(t) || t.some((e) => typeof e != `string`))) throw TypeError(`"${e}" option must be an array of strings`); if (t) return new Set(t); } const J$8 = (e) => e?.[Symbol.toStringTag]; const Lt$7 = (e, t, n) => { if (t.use !== void 0) { let e; switch (n) { case `sign`: case `verify`: e = `sig`; break; case `encrypt`: case `decrypt`: e = `enc`; break; } if (t.use !== e) throw TypeError(`Invalid key for this operation, its "use" must be "${e}" when present`); } if (t.alg !== void 0 && t.alg !== e) throw TypeError(`Invalid key for this operation, its "alg" must be "${e}" when present`); if (Array.isArray(t.key_ops)) { let r; switch (!0) { case n === `sign` || n === `verify`: case e === `dir`: case e.includes(`CBC-HS`): r = n; break; case e.startsWith(`PBES2`): r = `deriveBits`; break; case /^A\d{3}(?:GCM)?(?:KW)?$/.test(e): r = !e.includes(`GCM`) && e.endsWith(`KW`) ? n === `encrypt` ? `wrapKey` : `unwrapKey` : n; break; case n === `encrypt` && e.startsWith(`RSA`): r = `wrapKey`; break; case n === `decrypt`: r = e.startsWith(`RSA`) ? `unwrapKey` : `deriveBits`; break; } if (r && t.key_ops?.includes?.(r) === !1) throw TypeError(`Invalid key for this operation, its "key_ops" must include "${r}" when present`); } return !0; }; const Rt$6 = (e, t, n) => { if (!(t instanceof Uint8Array)) { if (L$8(t)) { if (Ne$9(t) && Lt$7(e, t, n)) return; throw TypeError(`JSON Web Key for symmetric algorithms must have JWK "kty" (Key Type) equal to "oct" and the JWK "k" (Key Value) present`); } if (!fe$9(t)) throw TypeError(te$6(e, t, `CryptoKey`, `KeyObject`, `JSON Web Key`, `Uint8Array`)); if (t.type !== `secret`) throw TypeError(`${J$8(t)} instances for symmetric algorithms must be of type "secret"`); } }; const zt$7 = (e, t, n) => { if (L$8(t)) switch (n) { case `decrypt`: case `sign`: if (je$9(t) && Lt$7(e, t, n)) return; throw TypeError(`JSON Web Key for this operation must be a private JWK`); case `encrypt`: case `verify`: if (Me$8(t) && Lt$7(e, t, n)) return; throw TypeError(`JSON Web Key for this operation must be a public JWK`); } if (!fe$9(t)) throw TypeError(te$6(e, t, `CryptoKey`, `KeyObject`, `JSON Web Key`)); if (t.type === `secret`) throw TypeError(`${J$8(t)} instances for asymmetric algorithms must not be of type "secret"`); if (t.type === `public`) switch (n) { case `sign`: throw TypeError(`${J$8(t)} instances for asymmetric algorithm signing must be of type "private"`); case `decrypt`: throw TypeError(`${J$8(t)} instances for asymmetric algorithm decryption must be of type "private"`); } if (t.type === `private`) switch (n) { case `verify`: throw TypeError(`${J$8(t)} instances for asymmetric algorithm verifying must be of type "public"`); case `encrypt`: throw TypeError(`${J$8(t)} instances for asymmetric algorithm encryption must be of type "public"`); } }; function Y$11(e, t, n) { switch (e.substring(0, 2)) { case `A1`: case `A2`: case `di`: case `HS`: case `PB`: Rt$6(e, t, n); break; default: zt$7(e, t, n); } } async function Yt$6(e, r, a) { if (!F$8(e)) throw new O$9(`Flattened JWS must be an object`); if (e.protected === void 0 && e.header === void 0) throw new O$9(`Flattened JWS must have either of the "protected" or "header" members`); if (e.protected !== void 0 && typeof e.protected != `string`) throw new O$9(`JWS Protected Header incorrect type`); if (e.payload === void 0) throw new O$9(`JWS Payload missing`); if (typeof e.signature != `string`) throw new O$9(`JWS Signature missing or incorrect type`); if (e.header !== void 0 && !F$8(e.header)) throw new O$9(`JWS Unprotected Header incorrect type`); let o = {}; if (e.protected) try { let t = f$10(e.protected); o = JSON.parse(n$12.decode(t)); } catch { throw new O$9(`JWS Protected Header is invalid`); } if (!I$8(o, e.header)) throw new O$9(`JWS Protected and JWS Unprotected Header Parameter names must be disjoint`); let s = { ...o, ...e.header }, l = q$8(O$9, /* @__PURE__ */ new Map([[`b64`, !0]]), a?.crit, o, s), u = !0; if (l.has(`b64`) && (u = o.b64, typeof u != `boolean`)) throw new O$9(`The "b64" (base64url-encode payload) Header Parameter must be a boolean`); let { alg: d } = s; if (typeof d != `string` || !d) throw new O$9(`JWS "alg" (Algorithm) Header Parameter missing or invalid`); let p = a && It$6(`algorithms`, a.algorithms); if (p && !p.has(d)) throw new ie$7(`"alg" (Algorithm) Header Parameter value not allowed`); if (u) { if (typeof e.payload != `string`) throw new O$9(`JWS Payload must be a string`); } else if (typeof e.payload != `string` && !(e.payload instanceof Uint8Array)) throw new O$9(`JWS Payload must be a string or an Uint8Array instance`); let m = !1; typeof r == `function` && (r = await r(o, e), m = !0), Y$11(d, r, `verify`); let h = i$13(e.protected === void 0 ? /* @__PURE__ */ new Uint8Array() : c$11(e.protected), c$11(`.`), typeof e.payload == `string` ? u ? c$11(e.payload) : t$10.encode(e.payload) : e.payload), g = P$8(e.signature, `signature`, O$9), _ = await U$9(r, d); if (!await Ze$9(d, _, g, h)) throw new ue$9(); let v; v = u ? P$8(e.payload, `payload`, O$9) : typeof e.payload == `string` ? t$10.encode(e.payload) : e.payload; let y = { payload: v }; return e.protected !== void 0 && (y.protectedHeader = o), e.header !== void 0 && (y.unprotectedHeader = e.header), m ? { ...y, key: _ } : y; } async function Xt$6(e, t, r) { if (e instanceof Uint8Array && (e = n$12.decode(e)), typeof e != `string`) throw new O$9(`Compact JWS must be a string or Uint8Array`); let { 0: i, 1: a, 2: o, length: s } = e.split(`.`); if (s !== 3) throw new O$9(`Invalid Compact JWS`); let c = await Yt$6({ payload: a, protected: i, signature: o }, t, r), l = { payload: c.payload, protectedHeader: c.protectedHeader }; return typeof t == `function` ? { ...l, key: c.key } : l; } const X$11 = (e) => Math.floor(e.getTime() / 1e3); const Qt$6 = /^(\+|\-)? ?(\d+|\d+\.\d+) ?(seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)(?: (ago|from now))?$/i; function Z$10(e) { let t = Qt$6.exec(e); if (!t || t[4] && t[1]) throw TypeError(`Invalid time period format`); let n = parseFloat(t[2]), r = t[3].toLowerCase(), i; switch (r) { case `sec`: case `secs`: case `second`: case `seconds`: case `s`: i = Math.round(n); break; case `minute`: case `minutes`: case `min`: case `mins`: case `m`: i = Math.round(n * 60); break; case `hour`: case `hours`: case `hr`: case `hrs`: case `h`: i = Math.round(n * 3600); break; case `day`: case `days`: case `d`: i = Math.round(n * 86400); break; case `week`: case `weeks`: case `w`: i = Math.round(n * 604800); break; default: i = Math.round(n * 31557600); break; } return t[1] === `-` || t[4] === `ago` ? -i : i; } const $t$6 = (e) => e.includes(`/`) ? e.toLowerCase() : `application/${e.toLowerCase()}`; const en$6 = (e, t) => typeof e == `string` ? t.includes(e) : Array.isArray(e) ? t.some(Set.prototype.has.bind(new Set(e))) : !1; function tn$6(e, t, r = {}) { let i; try { i = JSON.parse(n$12.decode(t)); } catch {} if (!F$8(i)) throw new k$10(`JWT Claims Set must be a top-level JSON object`); let { typ: a } = r; if (a && (typeof e.typ != `string` || $t$6(e.typ) !== $t$6(a))) throw new w$12(`unexpected "typ" JWT header value`, i, `typ`, `check_failed`); let { requiredClaims: o = [], issuer: s, subject: c, audience: l, maxTokenAge: u } = r, d = [...o]; u !== void 0 && d.push(`iat`), l !== void 0 && d.push(`aud`), c !== void 0 && d.push(`sub`), s !== void 0 && d.push(`iss`); for (let e of new Set(d.reverse())) if (!(e in i)) throw new w$12(`missing required "${e}" claim`, i, e, `missing`); if (s && !(Array.isArray(s) ? s : [s]).includes(i.iss)) throw new w$12(`unexpected "iss" claim value`, i, `iss`, `check_failed`); if (c && i.sub !== c) throw new w$12(`unexpected "sub" claim value`, i, `sub`, `check_failed`); if (l && !en$6(i.aud, typeof l == `string` ? [l] : l)) throw new w$12(`unexpected "aud" claim value`, i, `aud`, `check_failed`); let f; switch (typeof r.clockTolerance) { case `string`: f = Z$10(r.clockTolerance); break; case `number`: f = r.clockTolerance; break; case `undefined`: f = 0; break; default: throw TypeError(`Invalid clockTolerance option type`); } let { currentDate: p } = r, m = X$11(p || /* @__PURE__ */ new Date()); if ((i.iat !== void 0 || u) && typeof i.iat != `number`) throw new w$12(`"iat" claim must be a number`, i, `iat`, `invalid`); if (i.nbf !== void 0) { if (typeof i.nbf != `number`) throw new w$12(`"nbf" claim must be a number`, i, `nbf`, `invalid`); if (i.nbf > m + f) throw new w$12(`"nbf" claim timestamp check failed`, i, `nbf`, `check_failed`); } if (i.exp !== void 0) { if (typeof i.exp != `number`) throw new w$12(`"exp" claim must be a number`, i, `exp`, `invalid`); if (i.exp <= m - f) throw new re$7(`"exp" claim timestamp check failed`, i, `exp`, `check_failed`); } if (u) { let e = m - i.iat, t = typeof u == `number` ? u : Z$10(u); if (e - f > t) throw new re$7(`"iat" claim timestamp check failed (too far in the past)`, i, `iat`, `check_failed`); if (e < 0 - f) throw new w$12(`"iat" claim timestamp check failed (it should be in the past)`, i, `iat`, `check_failed`); } return i; } async function rn$6(e, t, n) { let r = await Xt$6(e, t, n); if (r.protectedHeader.crit?.includes(`b64`) && r.protectedHeader.b64 === !1) throw new k$10(`JWTs MUST NOT use unencoded payload`); let i = { payload: tn$6(r.protectedHeader, r.payload, n), protectedHeader: r.protectedHeader }; return typeof t == `function` ? { ...i, key: r.key } : i; } function gn$6(e) { switch (typeof e == `string` && e.slice(0, 2)) { case `RS`: case `PS`: return `RSA`; case `ES`: return `EC`; case `Ed`: return `OKP`; case `ML`: return `AKP`; default: throw new T$12(`Unsupported "alg" value for a JSON Web Key Set`); } } function _n$6(e) { return e && typeof e == `object` && Array.isArray(e.keys) && e.keys.every(vn$6); } function vn$6(e) { return F$8(e); } var yn$6 = class { #e; #t = /* @__PURE__ */ new WeakMap(); constructor(e) { if (!_n$6(e)) throw new oe$8(`JSON Web Key Set malformed`); this.#e = structuredClone(e); } jwks() { return this.#e; } async getKey(e, t) { let { alg: n, kid: r } = { ...e, ...t?.header }, i = gn$6(n), a = this.#e.keys.filter((e) => { let t = i === e.kty; if (t && typeof r == `string` && (t = r === e.kid), t && (typeof e.alg == `string` || i === `AKP`) && (t = n === e.alg), t && typeof e.use == `string` && (t = e.use === `sig`), t && Array.isArray(e.key_ops) && (t = e.key_ops.includes(`verify`)), t) switch (n) { case `ES256`: t = e.crv === `P-256`; break; case `ES384`: t = e.crv === `P-384`; break; case `ES512`: t = e.crv === `P-521`; break; case `Ed25519`: case `EdDSA`: t = e.crv === `Ed25519`; break; } return t; }), { 0: o, length: s } = a; if (s === 0) throw new se$9(); if (s !== 1) { let e = new ce$9(), t = this.#t; throw e[Symbol.asyncIterator] = async function* () { for (let e of a) try { yield await bn$6(t, e, n); } catch {} }, e; } return bn$6(this.#t, o, n); } }; async function bn$6(e, t, n) { let r = e.get(t) || e.set(t, {}).get(t); if (r[n] === void 0) { let e = await Et$8({ ...t, ext: !0 }, n); if (e instanceof Uint8Array || e.type !== `public`) throw new oe$8(`JSON Web Key Set members must be public keys`); r[n] = e; } return r[n]; } function xn$5(e) { let t = new yn$6(e), n = async (e, n) => t.getKey(e, n); return Object.defineProperties(n, { jwks: { value: () => structuredClone(t.jwks()), enumerable: !1, configurable: !1, writable: !1 } }), n; } function Sn$5() { return typeof WebSocketPair < `u` || typeof navigator < `u` && navigator.userAgent === `Cloudflare-Workers` || typeof EdgeRuntime < `u` && EdgeRuntime === `vercel`; } let Cn$5; (typeof navigator > `u` || !navigator.userAgent?.startsWith?.(`Mozilla/5.0 `)) && (Cn$5 = `jose/v6.2.3`); const wn$5 = Symbol(); async function Tn$5(e, t, n, r = fetch) { let i = await r(e, { method: `GET`, signal: n, redirect: `manual`, headers: t }).catch((e) => { throw e.name === `TimeoutError` ? new le$9() : e; }); if (i.status !== 200) throw new C$12(`Expected 200 OK from the JSON Web Key Set HTTP response`); try { return await i.json(); } catch { throw new C$12(`Failed to parse the JSON Web Key Set HTTP response as JSON`); } } const En$5 = Symbol(); function Dn$5(e, t) { return !(typeof e != `object` || !e || !(`uat` in e) || typeof e.uat != `number` || Date.now() - e.uat >= t || !(`jwks` in e) || !F$8(e.jwks) || !Array.isArray(e.jwks.keys) || !Array.prototype.every.call(e.jwks.keys, F$8)); } var On$5 = class { #e; #t; #n; #r; #i; #a; #o; #s; #c; #l; constructor(e, t) { if (!(e instanceof URL)) throw TypeError(`url must be an instance of URL`); this.#e = new URL(e.href), this.#t = typeof t?.timeoutDuration == `number` ? t?.timeoutDuration : 5e3, this.#n = typeof t?.cooldownDuration == `number` ? t?.cooldownDuration : 3e4, this.#r = typeof t?.cacheMaxAge == `number` ? t?.cacheMaxAge : 6e5, this.#o = new Headers(t?.headers), Cn$5 && !this.#o.has(`User-Agent`) && this.#o.set(`User-Agent`, Cn$5), this.#o.has(`accept`) || (this.#o.set(`accept`, `application/json`), this.#o.append(`accept`, `application/jwk-set+json`)), this.#s = t?.[wn$5], t?.[En$5] !== void 0 && (this.#l = t?.[En$5], Dn$5(t?.[En$5], this.#r) && (this.#i = this.#l.uat, this.#c = xn$5(this.#l.jwks))); } pendingFetch() { return !!this.#a; } coolingDown() { return typeof this.#i == `number` ? Date.now() < this.#i + this.#n : !1; } fresh() { return typeof this.#i == `number` ? Date.now() < this.#i + this.#r : !1; } jwks() { return this.#c?.jwks(); } async getKey(e, t) { (!this.#c || !this.fresh()) && await this.reload(); try { return await this.#c(e, t); } catch (n) { if (n instanceof se$9 && this.coolingDown() === !1) return await this.reload(), this.#c(e, t); throw n; } } async reload() { this.#a && Sn$5() && (this.#a = void 0), this.#a ||= Tn$5(this.#e.href, this.#o, AbortSignal.timeout(this.#t), this.#s).then((e) => { this.#c = xn$5(e), this.#l && (this.#l.uat = Date.now(), this.#l.jwks = e), this.#i = Date.now(), this.#a = void 0; }).catch((e) => { throw this.#a = void 0, e; }), await this.#a; } }; function kn$5(e, t) { let n = new On$5(e, t), r = async (e, t) => n.getKey(e, t); return Object.defineProperties(r, { coolingDown: { get: () => n.coolingDown(), enumerable: !0, configurable: !1 }, fresh: { get: () => n.fresh(), enumerable: !0, configurable: !1 }, reload: { value: () => n.reload(), enumerable: !0, configurable: !1, writable: !1 }, reloading: { get: () => n.pendingFetch(), enumerable: !0, configurable: !1 }, jwks: { value: () => n.jwks(), enumerable: !0, configurable: !1, writable: !1 } }), r; } function Mn$5(e) { if (typeof e != `string`) throw new k$10(`JWTs must use Compact JWS serialization, JWT must be a string`); let { 1: t, length: r } = e.split(`.`); if (r === 5) throw new k$10(`Only JWTs using Compact JWS serialization can be decoded`); if (r !== 3) throw new k$10(`Invalid JWT`); if (!t) throw new k$10(`JWTs must contain a payload`); let i; try { i = f$10(t); } catch { throw new k$10(`Failed to base64url decode the payload`); } let a; try { a = JSON.parse(n$12.decode(i)); } catch { throw new k$10(`Failed to parse the decoded payload as JSON`); } if (!F$8(a)) throw new k$10(`Invalid JWT Claims Set`); return a; } //#endregion //#region node_modules/eve/dist/src/runtime/governance/auth/token-claims.js const STANDARD_PROJECTED_CLAIM_KEYS = /* @__PURE__ */ new Set([ `aud`, `exp`, `iat`, `iss`, `jti`, `nbf`, `sub` ]); function normalizeJwtClaims(e) { let t = {}; for (let [n, r] of Object.entries(e)) { if (typeof r == `string`) { t[n] = r; continue; } Array.isArray(r) && r.every((e) => typeof e == `string`) && (t[n] = Object.freeze([...r])); } return Object.freeze(t); } function createJwtAttributeProjection(t) { let n = normalizeJwtClaims(t); return Object.freeze(Object.fromEntries(Object.entries(n).filter(([t]) => !STANDARD_PROJECTED_CLAIM_KEYS.has(t)))); } function areTokenClaimMatchersSatisfied(e, t) { let n = normalizeJwtClaims(e); if (t.subjects !== void 0) { let n = typeof e.sub == `string` ? e.sub : null; if (n === null || !t.subjects.some((e) => matchesWildcardPattern(e, n))) return !1; } return t.claims === void 0 ? !0 : Object.entries(t.claims).every(([e, t]) => { let r = n[e]; return r === void 0 ? !1 : typeof r == `string` ? t.includes(r) : r.some((e) => t.includes(e)); }); } function createJwtAuthenticatedCallerPrincipal(e) { let t = readFirstStringClaim(e.payload, [...e.issuerClaims ?? [], `iss`]), n = e.subjectClaim ?? `sub`, r = readFirstStringClaim(e.payload, [n]); if (t === void 0 || r === void 0) throw Error(`Expected verified JWT payloads to include string iss and ${n} claims.`); let i = normalizeJwtClaims(e.payload); return { attributes: createJwtAttributeProjection(e.payload), authenticator: e.authenticator, claims: i, issuer: t, principalId: `${t}:${r}`, principalType: e.principalType, subject: r }; } function readFirstStringClaim(e, t) { for (let n of t) { let t = e[n]; if (typeof t == `string` && t.length > 0) return t; } } function matchesWildcardPattern(e, t) { if (!e.includes(`*`)) return e === t; let n = e.replaceAll(/[.+?^${}()|[\]\\]/g, `\\$&`).replaceAll(`*`, `.*`); return RegExp(`^${n}$`).test(t); } //#endregion //#region node_modules/eve/dist/src/runtime/governance/auth/oidc.js const oidcDiscoveryDocumentSchema = Ls$3.object({ issuer: Ls$3.string().optional(), jwks_uri: Ls$3.string().url() }).passthrough(); const oidcDiscoveryDocumentCache = /* @__PURE__ */ new Map(); const oidcJwksCache = /* @__PURE__ */ new Map(); async function authenticateOidcStrategy(e) { let t; try { t = await getOidcRemoteJwks(e.strategy); } catch (e) { return { kind: `misconfigured`, message: `Failed to load OIDC discovery metadata. ${e instanceof Error ? e.message : `Unknown discovery failure.`}` }; } try { let a = await rn$6(e.token, t, { audience: [...e.strategy.audiences], clockTolerance: e.strategy.clockSkewSeconds, issuer: e.strategy.issuer }); if (e.strategy.acceptCurrentVercelProject && e.strategy.issuer.startsWith(`https://oidc.vercel.com/`) && a.payload.external_sub !== void 0) return typeof a.payload.external_sub != `string` || a.payload.external_sub.length === 0 || !currentVercelProjectMatches({ payload: a.payload, strategy: e.strategy }) || !currentVercelEnvironmentMatches({ payload: a.payload, strategy: e.strategy }) ? { kind: `caller-not-allowed` } : { kind: `authenticated`, principal: createJwtAuthenticatedCallerPrincipal({ authenticator: `oidc`, issuerClaims: [`external_iss`, `connector_id`], payload: a.payload, principalType: `user`, subjectClaim: `external_sub` }) }; if (e.strategy.acceptCurrentVercelProject && e.strategy.issuer.startsWith(`https://oidc.vercel.com/`) && a.payload.user_id !== void 0) { if (typeof a.payload.user_id != `string` || a.payload.user_id.length === 0 || a.payload.environment !== `development` || !currentVercelProjectMatches({ payload: a.payload, strategy: e.strategy })) return { kind: `caller-not-allowed` }; if (currentVercelEnvironmentMatches({ payload: a.payload, strategy: e.strategy })) return { kind: `authenticated`, principal: createJwtAuthenticatedCallerPrincipal({ authenticator: `oidc`, payload: a.payload, principalType: `user`, subjectClaim: `user_id` }) }; if (e.strategy.currentVercelProject?.environment !== `preview`) return { kind: `caller-not-allowed` }; } if (typeof a.payload.sub != `string` || a.payload.sub.length === 0) return { kind: `not-authenticated` }; let o = e.strategy.acceptCurrentVercelProject && isCurrentVercelProjectToken({ issuer: e.strategy.issuer, payload: a.payload, strategy: e.strategy }), s = o && isCurrentVercelEnvironmentToken({ payload: a.payload, strategy: e.strategy }); return !o && !areTokenClaimMatchersSatisfied(a.payload, e.strategy) ? { kind: `caller-not-allowed` } : { kind: `authenticated`, principal: createJwtAuthenticatedCallerPrincipal({ authenticator: `oidc`, payload: a.payload, principalType: s ? `runtime` : `service` }) }; } catch { return { kind: `not-authenticated` }; } } async function getOidcRemoteJwks(e) { let n = await getOidcDiscoveryDocument(e.discoveryUrl), r = oidcJwksCache.get(n.jwks_uri); if (r !== void 0) return r; let i = kn$5(new URL(n.jwks_uri)); return oidcJwksCache.set(n.jwks_uri, i), i; } async function getOidcDiscoveryDocument(e) { let t = oidcDiscoveryDocumentCache.get(e); if (t !== void 0) return await t; let n = fetch(e, { headers: { accept: `application/json` } }).then(async (e) => { if (!e.ok) throw Error(`Discovery route returned HTTP ${e.status}.`); return oidcDiscoveryDocumentSchema.parse(await e.json()); }).catch((t) => { throw oidcDiscoveryDocumentCache.delete(e), t; }); return oidcDiscoveryDocumentCache.set(e, n), await n; } function isCurrentVercelProjectToken(e) { if (!e.issuer.startsWith(`https://oidc.vercel.com`)) return !1; let t = e.strategy.currentVercelProject; return t === void 0 ? !1 : typeof e.payload.project_id == `string` && e.payload.project_id === t.projectId; } function currentVercelProjectMatches(e) { let t = e.strategy.currentVercelProject; return t === void 0 ? !1 : typeof e.payload.project_id == `string` && e.payload.project_id === t.projectId; } function isCurrentVercelEnvironmentToken(e) { let t = e.strategy.currentVercelProject?.environment; return t === void 0 || t.length === 0 ? !1 : typeof e.payload.environment == `string` && e.payload.environment === t; } function currentVercelEnvironmentMatches(e) { let t = e.strategy.currentVercelProject?.environment; return t === void 0 || t.length === 0 ? !1 : typeof e.payload.environment == `string` && e.payload.environment === t; } //#endregion //#region node_modules/eve/dist/src/runtime/governance/auth/types.js function createRuntimeSessionAuthContext(e) { return { attributes: e.attributes, authenticator: e.authenticator, issuer: e.issuer, principalId: e.principalId, principalType: e.principalType, subject: e.subject }; } //#endregion //#region node_modules/eve/dist/src/public/channels/auth.js const vercelOidcLog = createLogger(`auth.vercel-oidc`); async function runOidcVerification(e, t) { if (e === null || e.length === 0) return { kind: `not-authenticated` }; let n = { acceptCurrentVercelProject: t.acceptCurrentVercelProject, audiences: [...t.audiences], clockSkewSeconds: t.clockSkewSeconds ?? 30, discoveryUrl: t.discoveryUrl ?? `${t.issuer.replace(/\/$/, ``)}/.well-known/openid-configuration`, issuer: t.issuer, kind: `oidc`, ...t.claims === void 0 ? {} : { claims: t.claims }, ...t.subjects === void 0 ? {} : { subjects: t.subjects } }; return await authenticateOidcStrategy({ strategy: t.currentVercelProject === void 0 ? n : { ...n, currentVercelProject: t.currentVercelProject }, token: e }); } function extractBearerToken$1(e) { if (e === null) return null; let t = /^Bearer\s+(.+)$/i.exec(e)?.[1]?.trim(); return t === void 0 || t.length === 0 ? null : t; } function createUnauthorizedResponse(e = {}) { let t = e.status ?? 401, n = e.code ?? (t === 403 ? `forbidden` : `unauthorized`), r = e.message ?? (t === 403 ? `Forbidden.` : `Authorization is required for this route.`), i = e.challenges ?? [], a = new Headers({ "cache-control": `no-store` }); for (let e of i) a.append(`www-authenticate`, formatChallenge(e)); return Response.json({ code: n, error: r, ok: !1 }, { headers: a, status: t }); } function formatChallenge(e) { if (e.parameters === void 0 || Object.keys(e.parameters).length === 0) return e.scheme; let t = Object.entries(e.parameters).map(([e, t]) => `${e}="${escapeChallengeValue(t)}"`).join(`, `); return `${e.scheme} ${t}`; } function escapeChallengeValue(e) { return e.replaceAll(`\\`, `\\\\`).replaceAll(`"`, `\\"`); } async function routeAuth(e, t) { let n = Array.isArray(t) ? t : [t]; try { for (let t of n) { let n = await t(e); if (n) return n; } } catch (e) { if (typeof e == `object` && e && `response` in e && e.response instanceof Response) return e.response; throw e; } return createUnauthorizedResponse({ challenges: [{ scheme: `Bearer` }] }); } function localDev() { return (e) => process.env.VERCEL && process.env.VERCEL_ENV === `development` || isLoopbackRequest(e) ? LOCAL_DEV_SESSION_AUTH_CONTEXT : null; } const LOOPBACK_HOSTNAMES = /* @__PURE__ */ new Set([`localhost`, `[::1]`]); const LOOPBACK_IPV4_PREFIX = /^127\./; function isLoopbackRequest(e) { let t; try { t = new URL(e.url).hostname; } catch { return !1; } return !!(LOOPBACK_HOSTNAMES.has(t) || LOOPBACK_IPV4_PREFIX.test(t) || t.endsWith(`.localhost`)); } const LOCAL_DEV_SESSION_AUTH_CONTEXT = { attributes: {}, authenticator: `local-dev`, principalId: `local-dev`, principalType: `local-dev` }; async function verifyVercelOidc(e, t = {}) { if (e === null || e.length === 0) return { ok: !1 }; let n = decodeUnverifiedJwtClaims(e); if (n === null) return vercelOidcLog.debug(`Rejected token that failed to decode as a JWT.`), { ok: !1 }; if (!n.issuer.startsWith(`https://oidc.vercel.com/`)) return vercelOidcLog.debug(`Rejected token whose issuer is not a Vercel OIDC issuer.`, { issuer: n.issuer }), { ok: !1 }; if (n.audiences.length === 0) return vercelOidcLog.debug(`Rejected token with no audience claim.`, { issuer: n.issuer }), { ok: !1 }; if (!n.audiences.some((e) => e.startsWith(`https://vercel.com/`))) return vercelOidcLog.debug(`Rejected token whose audience is not a Vercel audience.`, { audiences: n.audiences, issuer: n.issuer }), { ok: !1 }; let r = resolveCurrentVercelProject(t), i = await runOidcVerification(e, { acceptCurrentVercelProject: !0, audiences: n.audiences, currentVercelProject: r, issuer: n.issuer, subjects: t.subjects ?? [] }); return i.kind === `authenticated` ? (vercelOidcLog.debug(`Accepted Vercel OIDC token.`, { issuer: n.issuer, principalType: i.principal.principalType, subject: i.principal.subject }), { ok: !0, sessionAuth: createRuntimeSessionAuthContext(i.principal) }) : (vercelOidcLog.debug(`Rejected Vercel OIDC token after verification.`, { audiences: n.audiences, issuer: n.issuer, reason: i.kind, subjectsConfigured: (t.subjects ?? []).length > 0, ...i.kind === `misconfigured` ? { detail: i.message } : {} }), { ok: !1 }); } function resolveCurrentVercelProject(e) { if (e.currentVercelProject !== void 0) return e.currentVercelProject; let t = process.env.VERCEL_PROJECT_ID?.trim(); if (t === void 0 || t.length === 0) return; let n = process.env.VERCEL_TARGET_ENV?.trim() || process.env.VERCEL_ENV?.trim(); return n === void 0 || n.length === 0 ? { projectId: t } : { environment: n, projectId: t }; } function vercelOidc(e = {}) { return async (n) => { let r = extractBearerToken$1(n.headers.get(`authorization`)), i = e.currentVercelProject ?? (r !== null && isLocalDevelopmentVercelOidcRequest(n) ? await resolveVercelOidcCurrentProject(n) : void 0), a = await verifyVercelOidc(r, i === void 0 ? e : { ...e, currentVercelProject: i }); return a.ok ? a.sessionAuth : null; }; } function isLocalDevelopmentVercelOidcRequest(e) { return process.env.VERCEL_ENV === `development` ? !0 : process.env.VERCEL_ENV === `preview` || process.env.VERCEL_ENV === `production` ? !1 : isLoopbackRequest(e); } function decodeUnverifiedJwtClaims(e) { let t; try { t = Mn$5(e); } catch { return null; } return typeof t.iss != `string` || t.iss.length === 0 ? null : { audiences: typeof t.aud == `string` ? [t.aud] : Array.isArray(t.aud) ? t.aud.filter((e) => typeof e == `string`) : [], issuer: t.iss }; } //#endregion //#region node_modules/eve/dist/src/channel/routes.js function GET(e, t) { return { transport: `http`, method: `GET`, path: e, handler: t }; } function POST$1(e, t) { return { transport: `http`, method: `POST`, path: e, handler: t }; } function isHttpRouteDefinition(e) { return e.transport !== `websocket`; } function isWebSocketRouteDefinition(e) { return e.transport === `websocket`; } //#endregion //#region node_modules/eve/dist/src/internal/attachments/sandbox-refs.js const SANDBOX_URL_SCHEME = `eve-sandbox:`; const PATH_QUERY_KEY = `path`; const SIZE_QUERY_KEY = `size`; const TYPE_QUERY_KEY = `type`; function isValidSize$1(e) { return Number.isFinite(e) && Number.isInteger(e) && e >= 0; } function encodeSandboxRef(t) { if (typeof t.path != `string` || t.path.length === 0) throw RangeError(`SandboxRef.path must be a non-empty string.`); if (!isValidSize$1(t.size)) throw RangeError(`SandboxRef.size must be a non-negative integer. Received: ${String(t.size)}.`); if (typeof t.mediaType != `string` || t.mediaType.length === 0) throw RangeError(`SandboxRef.mediaType must be a non-empty string.`); let n = new URL(SANDBOX_URL_SCHEME); return n.searchParams.set(PATH_QUERY_KEY, t.path), n.searchParams.set(SIZE_QUERY_KEY, String(t.size)), n.searchParams.set(TYPE_QUERY_KEY, t.mediaType), n; } function decodeSandboxRef(t) { let n = t instanceof URL ? t : new URL(t); if (n.protocol !== `eve-sandbox:`) throw Error(`SandboxRef URL must use scheme "${SANDBOX_URL_SCHEME}". Got: "${n.protocol}".`); let r = n.searchParams.get(PATH_QUERY_KEY); if (r === null || r === ``) throw Error(`SandboxRef URL is missing the required "path" query param.`); let i = n.searchParams.get(SIZE_QUERY_KEY); if (i === null || i === ``) throw Error(`SandboxRef URL is missing the required "size" query param.`); let a = Number(i); if (!isValidSize$1(a)) throw Error(`SandboxRef URL "size" must be a non-negative integer. Got: ${JSON.stringify(i)}.`); let o = n.searchParams.get(TYPE_QUERY_KEY); if (o === null || o === ``) throw Error(`SandboxRef URL is missing the required "type" query param.`); return { mediaType: o, path: r, size: a }; } function isSandboxRefUrl(e) { return e instanceof URL && e.protocol === `eve-sandbox:`; } //#endregion //#region node_modules/eve/dist/src/shared/errors.js function toErrorMessage(t) { return t instanceof Error ? t.message : typeof t == `string` ? t : t == null ? String(t) : isObject(t) ? typeof t.message == `string` && t.message.length > 0 ? t.message : safeJsonStringify(t) : String(t); } function toError(t) { if (t instanceof Error) return t; let n = Error(toErrorMessage(t)); return isObject(t) ? (typeof t.name == `string` && t.name.length > 0 && (n.name = t.name), typeof t.stack == `string` && t.stack.length > 0 && (n.stack = t.stack), `cause` in t && t.cause !== void 0 && t.cause !== t && (n.cause = t.cause), n) : n; } function safeJsonStringify(e) { try { return JSON.stringify(e) ?? String(e); } catch { return String(e); } } //#endregion //#region node_modules/eve/dist/src/internal/attachments/refs.js const ATTACHMENT_REF_SCHEME = `eve-attachment:`; function isValidSize(e) { return Number.isFinite(e) && Number.isInteger(e) && e >= 0; } function parseAttachmentRef(n) { if (n.protocol !== `eve-attachment:`) throw Error(`AttachmentRef URL must use scheme "${ATTACHMENT_REF_SCHEME}". Got: "${n.protocol}".`); let r = n.searchParams.get(`v`); if (r !== `1`) throw Error(`AttachmentRef wire format version must be "1". Got: ${r === null ? `missing` : JSON.stringify(r)}.`); let i = n.searchParams.get(`p`); if (i === null || i === ``) throw Error(`AttachmentRef URL is missing the required "p" payload query param.`); let a; try { let e = Buffer.from(i, `base64url`).toString(`utf8`); a = JSON.parse(e); } catch (t) { throw Error(`AttachmentRef payload is not valid base64url-encoded JSON: ${toErrorMessage(t)}`); } if (typeof a != `object` || !a || Array.isArray(a)) throw Error(`AttachmentRef payload must decode to a JSON object.`); let o = a; if (!(`params` in o)) throw Error(`AttachmentRef payload is missing the required "params" field.`); let s = o.params; if (!(`size` in o)) return { params: s }; let c = o.size; if (typeof c != `number` || !isValidSize(c)) throw Error(`AttachmentRef payload "size" must be a non-negative integer. Got: ${JSON.stringify(c)}.`); return { params: s, size: c }; } function isAttachmentRefUrl(e) { return e instanceof URL && e.protocol === `eve-attachment:`; } //#endregion //#region node_modules/eve/dist/src/internal/attachments/url-refs.js const EVE_URL_SCHEME = `eve-url:`; function serializeUrlFilePart(e) { return `${EVE_URL_SCHEME}${e.href}`; } function isSerializedUrlFilePart(e) { return typeof e == `string` && e.startsWith(EVE_URL_SCHEME); } function deserializeUrlFilePart(e) { return new URL(e.slice(8)); } const INTERNAL_REF_SCHEMES = [ EVE_URL_SCHEME, SANDBOX_URL_SCHEME, ATTACHMENT_REF_SCHEME ]; function hasInternalRefScheme(e) { return INTERNAL_REF_SCHEMES.some((t) => e.startsWith(t)); } //#endregion //#region node_modules/eve/dist/src/protocol/message.js const EVE_SESSION_ID_HEADER = `x-eve-session-id`; const EVE_STREAM_FORMAT_HEADER = `x-eve-stream-format`; const EVE_STREAM_VERSION_HEADER = `x-eve-stream-version`; const EVE_MESSAGE_STREAM_CONTENT_TYPE = `application/x-ndjson; charset=utf-8`; const EVE_MESSAGE_STREAM_FORMAT = `ndjson`; const EVE_MESSAGE_STREAM_VERSION = `16`; const textEncoder = new TextEncoder(); function createSessionStartedEvent(e) { let t = {}; return e?.invocation !== void 0 && (t.invocation = e.invocation), e?.runtime !== void 0 && (t.runtime = e.runtime), { data: t, type: `session.started` }; } function createTurnStartedEvent(e) { return { data: { sequence: e.sequence, turnId: e.turnId }, type: `turn.started` }; } function createMessageReceivedEvent(e) { return { data: { message: summarizeUserContent(e.message), sequence: e.sequence, turnId: e.turnId }, type: `message.received` }; } function summarizeUserContent(e) { if (typeof e == `string`) return e; let t = []; for (let n of e) if (n.type === `text`) t.push(n.text); else if (n.type === `file`) { let e = n.filename ?? n.mediaType; t.push(`[file: ${e} (${n.mediaType})]`); } else n.type === `image` && t.push(`[image: ${n.mediaType ?? `image`}]`); return t.join(` `); } function createActionsRequestedEvent(e) { return { data: { actions: e.actions, sequence: e.sequence, stepIndex: e.stepIndex, turnId: e.turnId }, type: `actions.requested` }; } function createAuthorizationRequiredEvent(e) { let t = { description: e.description, name: e.name, sequence: e.sequence, stepIndex: e.stepIndex, turnId: e.turnId }; return e.authorization !== void 0 && (t.authorization = e.authorization), e.webhookUrl !== void 0 && (t.webhookUrl = e.webhookUrl), { data: t, type: `authorization.required` }; } function createAuthorizationCompletedEvent(e) { let t = { name: e.name, outcome: e.outcome, sequence: e.sequence, stepIndex: e.stepIndex, turnId: e.turnId }; return e.authorization !== void 0 && (t.authorization = e.authorization), e.reason !== void 0 && (t.reason = e.reason), { data: t, type: `authorization.completed` }; } function createInputRequestedEvent(e) { return { data: { requests: e.requests, sequence: e.sequence, stepIndex: e.stepIndex, turnId: e.turnId }, type: `input.requested` }; } function createActionResultEvent(e) { let t = e.rejected === !0 ? { error: buildActionResultError(e.result), status: `rejected` } : normalizeActionResultOutcome(e.result); return { data: { error: t.error, result: e.result, sequence: e.sequence, stepIndex: e.stepIndex, status: t.status, turnId: e.turnId }, type: `action.result` }; } function createSubagentCalledEvent(e) { return { data: { callId: e.callId, childSessionId: e.childSessionId, sessionId: e.sessionId, sequence: e.sequence, name: e.name, remote: e.remote, toolName: e.toolName, turnId: e.turnId, workflowId: e.workflowId }, type: `subagent.called` }; } function createMessageAppendedEvent(e) { return { data: { messageDelta: e.messageDelta, messageSoFar: e.messageSoFar, sequence: e.sequence, stepIndex: e.stepIndex, turnId: e.turnId }, type: `message.appended` }; } function createReasoningAppendedEvent(e) { return { data: { reasoningDelta: e.reasoningDelta, reasoningSoFar: e.reasoningSoFar, sequence: e.sequence, stepIndex: e.stepIndex, turnId: e.turnId }, type: `reasoning.appended` }; } function createMessageCompletedEvent(e) { return { data: { finishReason: e.finishReason ?? `stop`, message: e.message, sequence: e.sequence, stepIndex: e.stepIndex, turnId: e.turnId }, type: `message.completed` }; } function createReasoningCompletedEvent(e) { return { data: { reasoning: e.reasoning, sequence: e.sequence, stepIndex: e.stepIndex, turnId: e.turnId }, type: `reasoning.completed` }; } function createResultCompletedEvent(e) { return { data: { result: e.result, sequence: e.sequence, stepIndex: e.stepIndex, turnId: e.turnId }, type: `result.completed` }; } function createStepStartedEvent(e) { return { data: { sequence: e.sequence, stepIndex: e.stepIndex, turnId: e.turnId }, type: `step.started` }; } function createStepCompletedEvent(e) { let t = { finishReason: e.finishReason, sequence: e.sequence, stepIndex: e.stepIndex, turnId: e.turnId }; return e.usage !== void 0 && (t.usage = e.usage), { data: t, type: `step.completed` }; } function createStepFailedEvent(e) { return { data: { code: e.code, details: e.details, message: e.message, sequence: e.sequence, stepIndex: e.stepIndex, turnId: e.turnId }, type: `step.failed` }; } function createTurnCompletedEvent(e) { return { data: { sequence: e.sequence, turnId: e.turnId }, type: `turn.completed` }; } function createTurnFailedEvent(e) { return { data: { code: e.code, details: e.details, message: e.message, sequence: e.sequence, turnId: e.turnId }, type: `turn.failed` }; } function createCompactionRequestedEvent(e) { return { data: { modelId: e.modelId, sequence: e.sequence, sessionId: e.sessionId, turnId: e.turnId, usageInputTokens: e.usageInputTokens ?? null }, type: `compaction.requested` }; } function createCompactionCompletedEvent(e) { return { data: { modelId: e.modelId, sequence: e.sequence, sessionId: e.sessionId, turnId: e.turnId }, type: `compaction.completed` }; } function createSessionWaitingEvent() { return { data: { wait: `next-user-message` }, type: `session.waiting` }; } function createSessionFailedEvent(e) { return { data: { code: e.code, details: e.details, message: e.message, sessionId: e.sessionId }, type: `session.failed` }; } function createSessionCompletedEvent() { return { type: `session.completed` }; } function timestampHandleMessageStreamEvent(e, t = (/* @__PURE__ */ new Date()).toISOString()) { return { ...e, meta: { at: t } }; } function encodeMessageStreamEvent(e) { return textEncoder.encode(`${JSON.stringify(e)}\n`); } function normalizeActionResultOutcome(e) { if (e.isError === !0) return { error: buildActionResultError(e), status: `failed` }; let t = readActionResultOutputError(e.output); return t === void 0 ? { status: `completed` } : { error: t, status: `failed` }; } function buildActionResultError(e) { let t = readActionResultOutputError(e.output); return t === void 0 ? { code: `ACTION_RESULT_FAILED`, message: formatActionResultOutput(e.output) } : t; } function readActionResultOutputError(e) { let t = parseActionResultOutputRecord(e); if (t === void 0) return; let n = typeof t.code == `string` && t.code.length > 0 ? t.code : void 0, r = typeof t.message == `string` && t.message.length > 0 ? t.message : void 0; if (!(n === void 0 || r === void 0)) return { code: n, message: r }; } function parseActionResultOutputRecord(e) { if (typeof e == `object` && e) return e; if (typeof e != `string`) return; let t = e.trim(); if (t.length !== 0) try { let e = JSON.parse(t); if (typeof e == `object` && e) return e; } catch { return; } } function formatActionResultOutput(e) { if (typeof e == `string`) return e; let t = JSON.stringify(e); return typeof t == `string` && t.length > 0 ? t : `Action failed.`; } //#endregion //#region node_modules/eve/dist/src/runtime/actions/types.js const runtimeToolCallActionRequestSchema = Ls$3.object({ callId: Ls$3.string(), input: jsonObjectSchema, kind: Ls$3.literal(`tool-call`), toolName: Ls$3.string() }).strict(); const runtimeSubagentCallActionRequestSchema = Ls$3.object({ callId: Ls$3.string(), description: Ls$3.string(), input: jsonObjectSchema, kind: Ls$3.literal(`subagent-call`), name: Ls$3.string(), nodeId: Ls$3.string(), subagentName: Ls$3.string() }).strict(); const runtimeRemoteAgentCallActionRequestSchema = Ls$3.object({ callId: Ls$3.string(), description: Ls$3.string(), input: jsonObjectSchema, kind: Ls$3.literal(`remote-agent-call`), name: Ls$3.string(), nodeId: Ls$3.string(), remoteAgentName: Ls$3.string() }).strict(); const runtimeLoadSkillActionRequestSchema = Ls$3.object({ callId: Ls$3.string(), input: jsonObjectSchema, kind: Ls$3.literal(`load-skill`) }).strict(); const runtimeActionRequestSchema = Ls$3.discriminatedUnion(`kind`, [ runtimeLoadSkillActionRequestSchema, runtimeRemoteAgentCallActionRequestSchema, runtimeSubagentCallActionRequestSchema, runtimeToolCallActionRequestSchema ]); Ls$3.object({ callId: Ls$3.string(), isError: Ls$3.boolean().optional(), kind: Ls$3.literal(`tool-result`), output: jsonValueSchema, toolName: Ls$3.string() }).strict(), Ls$3.object({ callId: Ls$3.string(), isError: Ls$3.boolean().optional(), kind: Ls$3.literal(`subagent-result`), output: jsonValueSchema, subagentName: Ls$3.string() }).strict(), Ls$3.object({ callId: Ls$3.string(), isError: Ls$3.boolean().optional(), kind: Ls$3.literal(`load-skill-result`), output: jsonValueSchema, name: Ls$3.string().optional() }).strict(); //#endregion //#region node_modules/eve/dist/src/runtime/input/types.js const inputOptionSchema = Ls$3.object({ description: Ls$3.string().describe(`Optional additional context for this option.`).optional(), id: Ls$3.string().describe(`Stable identifier for the option.`), label: Ls$3.string().describe(`User-facing label for the option.`), style: Ls$3.enum([ `primary`, `danger`, `default` ]).describe(`Visual treatment hint for the option.`).optional() }).strict(); const inputRequestSchema = Ls$3.object({ action: runtimeToolCallActionRequestSchema, allowFreeform: Ls$3.boolean().describe(`Whether the user may answer with freeform text instead of selecting one of the provided options.`).optional(), display: Ls$3.enum([ `confirmation`, `select`, `text` ]).describe(`Rendering hint: the channel uses this to pick a UX treatment.`).optional(), options: Ls$3.array(inputOptionSchema).describe(`Selectable answer options to present to the user.`).optional(), prompt: Ls$3.string().describe(`The prompt to present to the user.`), requestId: Ls$3.string().describe(`Stable identifier for this request.`) }).strict(); const inputResponseSchema = Ls$3.object({ optionId: Ls$3.string().optional(), requestId: Ls$3.string(), text: Ls$3.string().optional() }).strict(); function isInputResponse(e) { return inputResponseSchema.safeParse(e).success; } //#endregion //#region node_modules/eve/dist/src/protocol/routes.js const EVE_ROUTE_PREFIX = `/eve/v1`; const EVE_HEALTH_ROUTE_PATH = `${EVE_ROUTE_PREFIX}/health`; const EVE_INFO_ROUTE_PATH = `${EVE_ROUTE_PREFIX}/info`; const EVE_CREATE_SESSION_ROUTE_PATH = `${EVE_ROUTE_PREFIX}/session`; const EVE_CONTINUE_SESSION_ROUTE_PATTERN = `${EVE_ROUTE_PREFIX}/session/:sessionId`; const EVE_MESSAGE_STREAM_ROUTE_PATTERN = `${EVE_ROUTE_PREFIX}/session/:sessionId/stream`; const EVE_DEV_DISPATCH_SCHEDULE_ROUTE_PATTERN = `${EVE_ROUTE_PREFIX}/dev/schedules/:scheduleId`; const EVE_DEV_RUNTIME_ARTIFACTS_ROUTE_PATH = `${EVE_ROUTE_PREFIX}/dev/runtime-artifacts`; const EVE_DEV_RUNTIME_ARTIFACTS_REBUILD_ROUTE_PATH = `${EVE_DEV_RUNTIME_ARTIFACTS_ROUTE_PATH}/rebuild`; const EVE_CONNECTION_CALLBACK_ROUTE_PATTERN = `${EVE_ROUTE_PREFIX}/connections/:name/callback/:token`; const EVE_CALLBACK_ROUTE_PATTERN = `${EVE_ROUTE_PREFIX}/callback/:token`; function createEveConnectionCallbackRoutePath(e, t) { return `${EVE_ROUTE_PREFIX}/connections/${encodeURIComponent(e)}/callback/${encodeURIComponent(t)}`; } function createEveCallbackRoutePath(e) { return `${EVE_ROUTE_PREFIX}/callback/${encodeURIComponent(e)}`; } //#endregion //#region node_modules/eve/dist/src/shared/network-address.js const httpServerUrlSchema = Ls$3.url({ protocol: /^https?$/ }); const reservedRanges = new BlockList(); reservedRanges.addSubnet(`0.0.0.0`, 8, `ipv4`), reservedRanges.addSubnet(`10.0.0.0`, 8, `ipv4`), reservedRanges.addSubnet(`100.64.0.0`, 10, `ipv4`), reservedRanges.addSubnet(`169.254.0.0`, 16, `ipv4`), reservedRanges.addSubnet(`172.16.0.0`, 12, `ipv4`), reservedRanges.addSubnet(`192.168.0.0`, 16, `ipv4`), reservedRanges.addSubnet(`198.18.0.0`, 15, `ipv4`), reservedRanges.addAddress(`::`, `ipv6`), reservedRanges.addSubnet(`fc00::`, 7, `ipv6`), reservedRanges.addSubnet(`fe80::`, 10, `ipv6`); function normalizeAddress(e) { let t = e.trim().replace(/^\[(.*)\]$/u, `$1`), n = t.indexOf(`%`), r = n === -1 ? t : t.slice(0, n); if (r.toLowerCase().startsWith(`::ffff:`)) { let e = r.slice(7); if (isIP(e) === 4) return e; } return r; } function isReservedIpAddress(e) { let t = normalizeAddress(e), n = isIP(t); return n === 0 ? !1 : reservedRanges.check(t, n === 4 ? `ipv4` : `ipv6`); } //#endregion //#region node_modules/eve/dist/src/channel/session-callback.js const sessionCallbackSchema = Ls$3.object({ callId: Ls$3.string().min(1), subagentName: Ls$3.string().min(1), token: Ls$3.string().min(1), url: Ls$3.string().min(1) }).strict().superRefine((e, t) => { let r; try { r = new URL(e.url); } catch { t.addIssue({ code: `custom`, message: `Callback url must be absolute.`, path: [`url`] }); return; } readCallbackUrlToken(r) !== e.token && t.addIssue({ code: `custom`, message: `Callback url token must match callback token.`, path: [`url`] }), isReservedIpAddress(r.hostname) && t.addIssue({ code: `custom`, message: `Callback url host must not be a private or reserved address.`, path: [`url`] }); }); function parseSessionCallback(e) { let t = sessionCallbackSchema.safeParse(e); return t.success ? { callback: t.data, ok: !0 } : { cause: t.error, message: formatSessionCallbackParseError(t.error), ok: !1 }; } function readCallbackUrlToken(e) { let n = createEveCallbackRoutePath(``); if (!e.pathname.startsWith(n)) return null; let r = e.pathname.slice(n.length); if (r.length === 0 || r.includes(`/`)) return null; try { return decodeURIComponent(r); } catch { return null; } } function formatSessionCallbackParseError(e) { return `Invalid callback metadata: ${e.issues.map((e) => `${e.path.length === 0 ? `callback` : `callback.${e.path.join(`.`)}`}: ${e.message}`).join(`; `)}`; } //#endregion //#region node_modules/eve/dist/src/channel/compiled-channel.js const CHANNEL_SENTINEL = `eve:channel`; const CHANNEL_INSTRUMENTATION_KIND = Symbol.for(`eve.channel.instrumentationKind`); const CHANNEL_INSTRUMENTATION_KINDS = Symbol.for(`eve.channel.instrumentationKinds`); const channelInstrumentationKindGlobal = globalThis; channelInstrumentationKindGlobal[CHANNEL_INSTRUMENTATION_KINDS] ??= /* @__PURE__ */ new Map(); const channelInstrumentationKinds = channelInstrumentationKindGlobal[CHANNEL_INSTRUMENTATION_KINDS]; function isCompiledChannel(e) { return typeof e == `object` && !!e && e.__kind === `eve:channel`; } function setChannelInstrumentationKind(e, t) { Object.defineProperty(e, CHANNEL_INSTRUMENTATION_KIND, { configurable: !0, enumerable: !1, value: t }); let n = channelRouteSignature(e); n !== void 0 && channelInstrumentationKinds.set(n, t); } function channelRouteSignature(e) { if (e.routes.length !== 0) return e.routes.map((e) => `${e.method.toUpperCase()} ${e.path}`).sort().join(` `); } //#endregion //#region node_modules/eve/dist/src/channel/adapter.js const log$20 = createLogger(`channel.adapter`); function defaultDeliverResult(e) { if (e.message !== void 0) return { inputResponses: e.inputResponses, message: e.message, context: e.context, outputSchema: e.outputSchema }; if (e.inputResponses !== void 0 && e.inputResponses.length > 0) return { inputResponses: e.inputResponses, context: e.context, outputSchema: e.outputSchema }; if (e.context !== void 0 && e.context.length > 0) return { context: e.context, outputSchema: e.outputSchema }; if (e.outputSchema !== void 0) return { outputSchema: e.outputSchema }; } function getAdapterKind(e) { return e.kind; } async function callAdapterEventHandler(e, t, n) { let r = e[t.type]; if (r === void 0) return t; try { await r(`data` in t ? t.data : void 0, n); } catch (n) { log$20.error(`adapter event handler threw — event swallowed`, { adapterKind: getAdapterKind(e), eventType: t.type, error: n }); } return t; } //#endregion //#region node_modules/eve/dist/src/context/key.js const KEY_REGISTRY_GLOBAL_KEY = Symbol.for(`eve.context-key-registry`); const globalKeyRegistryContainer = globalThis; globalKeyRegistryContainer[KEY_REGISTRY_GLOBAL_KEY] === void 0 && (globalKeyRegistryContainer[KEY_REGISTRY_GLOBAL_KEY] = /* @__PURE__ */ new Map()); const keyRegistry = globalKeyRegistryContainer[KEY_REGISTRY_GLOBAL_KEY]; var ContextKey = class { name; codec; constructor(e, t = {}) { this.name = e, this.codec = t.codec; let n = keyRegistry.get(e); if (n !== void 0 && n.codec === void 0 != (this.codec === void 0)) throw Error(`ContextKey name collision: "${e}" is already registered ${n.codec ? `with` : `without`} a codec, but a key ${this.codec ? `with` : `without`} a codec is being registered under the same name. This silently breaks context serialization — use a distinct name.`); keyRegistry.set(e, this); } }; function resolveKey(e) { return keyRegistry.get(e); } //#endregion //#region node_modules/eve/dist/src/context/keys.js const AuthKey = new ContextKey(`eve.auth`); const InitiatorAuthKey = new ContextKey(`eve.initiatorAuth`); const SessionIdKey = new ContextKey(`eve.sessionId`); const ContinuationTokenKey = new ContextKey(`eve.continuationToken`); const ChannelRequestIdKey = new ContextKey(`eve.channelRequestId`); const ChannelInstrumentationKey = new ContextKey(`eve.channelInstrumentation`); const ModeKey = new ContextKey(`eve.mode`); const ParentSessionKey = new ContextKey(`eve.parentSession`); const CapabilitiesKey = new ContextKey(`eve.capabilities`); const SessionCallbackKey = new ContextKey(`eve.sessionCallback`); const SessionKey = new ContextKey(`eve.session`); const SandboxKey = new ContextKey(`eve.sandbox`); const SessionDynamicToolMetadataKey = new ContextKey(`eve.sessionDynamicToolMetadata`); const TurnDynamicToolMetadataKey = new ContextKey(`eve.turnDynamicToolMetadata`); const LiveStepToolsKey = new ContextKey(`eve.liveStepTools`); const DynamicSkillManifestKey = new ContextKey(`eve.dynamicSkillManifest`); const SessionDynamicInstructionsKey = new ContextKey(`eve.sessionDynamicInstructions`); const TurnDynamicInstructionsKey = new ContextKey(`eve.turnDynamicInstructions`); //#endregion //#region node_modules/eve/dist/src/context/container.js const EVE_CONTEXT_STORAGE_KEY = Symbol.for(`eve.context-storage`); var ContextContainer = class { _durableValues = /* @__PURE__ */ new Map(); _virtualValues = /* @__PURE__ */ new Map(); get(e) { return this._virtualValues.has(e.name) ? this._virtualValues.get(e.name) : this._durableValues.get(e.name); } require(e) { if (!this.has(e)) throw Error(`Context key "${e.name}" is not set.`); return this.get(e); } has(e) { return this._virtualValues.has(e.name) || this._durableValues.has(e.name); } set(e, t) { let n = typeof t == `function` ? t(this.get(e)) : t; return this._durableValues.set(e.name, n), n; } ensure(e, t) { return this.has(e) ? this.require(e) : this.set(e, t()); } clearVirtualContext() { this._virtualValues.clear(); } setVirtualContext(e, t) { this._virtualValues.set(e.name, t); } *entries() { for (let [e, n] of this._durableValues) { let r = resolveKey(e); r !== void 0 && (yield [r, n]); } } }; const globalContextStorage = globalThis; globalContextStorage[EVE_CONTEXT_STORAGE_KEY] === void 0 && (globalContextStorage[EVE_CONTEXT_STORAGE_KEY] = new AsyncLocalStorage()); const contextStorage = globalContextStorage[EVE_CONTEXT_STORAGE_KEY]; function loadContext() { let e = contextStorage.getStore(); if (e === void 0) throw Error(`No active eve context. Call this function only from authored runtime code such as tools, steps, and model callbacks.`); return e; } //#endregion //#region node_modules/eve/dist/src/runtime/workspace/types.js const WORKSPACE_ROOT$1 = `/workspace`; //#endregion //#region node_modules/eve/dist/src/runtime/skills/sandbox-access.js const FRONTMATTER_PATTERN = /^---\r?\n[\s\S]*?\r?\n---\r?\n?/; function assertSafeSkillId(e) { if (e.length === 0 || e.trim() !== e || e.startsWith(`.`) || e.includes(`/`) || e.includes(`\\`) || e.includes(`..`) || /^[A-Za-z]:/.test(e)) throw Error(`Expected skill id to be a non-empty safe path segment without whitespace, separators, "." prefix, or "..".`); } async function loadSkillFromSandbox(e, n, r = []) { assertSafeSkillId(n); let i = await requireSandboxSession$1(e), a = skillFilePath(n, `SKILL.md`), o = await i.readTextFile({ path: a }); if (o === null) { let e = r.length > 0 ? ` Available skills: ${r.join(`, `)}.` : ``; throw Error(`No skill named "${n}" at ${a}.${e}`); } return o.replace(FRONTMATTER_PATTERN, ``); } function createSandboxSkillHandle(e, t) { return assertSafeSkillId(t), { name: t, file(n) { assertSafeSkillRelativePath(n); let r = skillFilePath(t, n); return { async bytes() { let t = await (await requireSandboxSession$1(e)).readBinaryFile({ path: r }); if (t === null) throw Error(`Skill file not found: ${r}`); return t; }, async text() { let t = await (await requireSandboxSession$1(e)).readTextFile({ path: r }); if (t === null) throw Error(`Skill file not found: ${r}`); return t; } }; } }; } function assertSafeSkillRelativePath(e) { if (e.length === 0 || e.startsWith(`/`) || e.includes(`\\`) || e.split(`/`).some((e) => e.length === 0 || e === `.` || e === `..`)) throw Error(`Expected skill file path to be a relative path inside the skill directory.`); } async function requireSandboxSession$1(e) { let t = await e.get(); if (t === null) throw Error(`The sandbox is not available in the current authored runtime context.`); return t; } function skillFilePath(t, n) { return `${WORKSPACE_ROOT$1}/skills/${t}/${n}`; } //#endregion //#region node_modules/eve/dist/src/context/build-callback-context.js function buildCallbackContext() { let r = loadContext(), i = r.require(SessionKey); return { session: { id: i.sessionId, auth: i.auth, turn: i.turn, parent: i.parent }, getSandbox() { let t = r.get(SandboxKey); if (t === void 0) throw Error(`eve sandbox runtime access is unavailable in the current async context. Call ctx.getSandbox() only from authored runtime functions such as tools, hooks, and channel events.`); return t.get().then((e) => { if (e === null) throw Error(`The sandbox is not available in the current authored runtime context.`); return e; }); }, getSkill(t) { let n = r.get(SandboxKey); if (n === void 0) throw Error(`eve sandbox runtime access is unavailable in the current async context. Call ctx.getSkill() only from authored runtime functions such as tools, hooks, and channel events.`); return createSandboxSkillHandle(n, t); } }; } //#endregion //#region node_modules/eve/dist/src/channel/cors.js function normalizeChannelCors(e) { if (e === void 0 || e === !1) return; if (e === !0) return {}; if (typeof e != `object` || !e || Array.isArray(e)) throw Error(`Expected channel cors to be a boolean or a serializable CORS options object.`); let t = {}; if (e.origin !== void 0 && (t.origin = normalizeOrigin(e.origin)), e.methods !== void 0 && (t.methods = normalizeWildcardOrStringList(e.methods, `methods`)), e.allowHeaders !== void 0 && (t.allowHeaders = normalizeWildcardOrStringList(e.allowHeaders, `allowHeaders`)), e.exposeHeaders !== void 0 && (t.exposeHeaders = normalizeWildcardOrStringList(e.exposeHeaders, `exposeHeaders`)), e.credentials !== void 0) { if (typeof e.credentials != `boolean`) throw Error(`Expected channel cors.credentials to be a boolean.`); t.credentials = e.credentials; } return e.maxAge !== void 0 && (t.maxAge = normalizeMaxAge(e.maxAge)), e.preflight !== void 0 && (t.preflight = normalizePreflight(e.preflight)), t; } function normalizeOrigin(e) { if (e === `*` || e === `null`) return e; if (!Array.isArray(e)) throw Error(`Expected channel cors.origin to be "*", "null", or an array of origins.`); return e.map((e) => { if (typeof e != `string` || e.length === 0) throw Error(`Expected channel cors.origin entries to be non-empty strings.`); return e; }); } function normalizeWildcardOrStringList(e, t) { if (e === `*`) return e; if (!Array.isArray(e)) throw Error(`Expected channel cors.${t} to be "*" or an array of strings.`); return e.map((e) => { if (typeof e != `string` || e.length === 0) throw Error(`Expected channel cors.${t} entries to be non-empty strings.`); return e; }); } function normalizeMaxAge(e) { if (e === !1) return !1; if (typeof e == `number`) { if (!Number.isFinite(e) || e < 0) throw Error(`Expected channel cors.maxAge to be a non-negative finite number.`); return String(e); } if (typeof e == `string` && e.length > 0) return e; throw Error(`Expected channel cors.maxAge to be false, a string, or a number.`); } function normalizePreflight(e) { if (typeof e != `object` || !e || Array.isArray(e)) throw Error(`Expected channel cors.preflight to be an object.`); let t = e.statusCode; if (t === void 0) return {}; if (!Number.isInteger(t) || t < 100 || t > 599) throw Error(`Expected channel cors.preflight.statusCode to be an HTTP status code.`); return { statusCode: t }; } //#endregion //#region node_modules/eve/dist/src/channel/http.js const HTTP_ADAPTER_KIND = `http`; const HTTP_ADAPTER = { kind: HTTP_ADAPTER_KIND }; //#endregion //#region node_modules/eve/dist/src/public/definitions/defineChannel.js function defineChannel(t) { let n = buildAdapter(t), i = normalizeChannelCors(t.cors); return { __kind: CHANNEL_SENTINEL, routes: t.routes, adapter: n, cors: i, receive: t.receive }; } function buildAdapter(e) { let r = e.state != null, a = e.context != null, o = e.fetchFile !== void 0, s = e.metadata, c = r || a || s !== void 0, l = {}, u = !1, d = [ `turn.started`, `actions.requested`, `action.result`, `message.completed`, `message.appended`, `reasoning.appended`, `reasoning.completed`, `input.requested`, `turn.failed`, `turn.completed`, `session.failed`, `session.completed`, `session.waiting`, `authorization.required`, `authorization.completed` ], f = e.events; for (let e of d) { let t = f?.[e]; t && (u = !0, l[e] = (r, i) => { let a = { ...i, continuationToken: i.session?.continuationToken ?? ``, setContinuationToken: (e) => i.session?.setContinuationToken(e) }; return e === `session.failed` ? t(r, a) : t(r, a, buildCallbackContext()); }); } return !c && !u && !o ? { kind: e.kindHint ?? HTTP_ADAPTER_KIND } : { kind: e.kindHint ?? `defineChannel`, state: r ? { ...e.state } : {}, fetchFile: e.fetchFile, instrumentation: s === void 0 ? void 0 : { metadata(e) { return s(e); } }, createAdapterContext(t) { let n = t.state, r = t.session; return { ...a ? e.context(n, r) : {}, state: n, ctx: t.ctx, session: r }; }, deliver(e) { return defaultDeliverResult(e); }, ...l }; } //#endregion //#region node_modules/eve/dist/src/internal/attachments/data.js async function fileDataToBytes(e) { return typeof Buffer < `u` && Buffer.isBuffer(e) ? e : e instanceof Uint8Array ? Buffer.from(e) : e instanceof ArrayBuffer ? Buffer.from(new Uint8Array(e)) : typeof e == `string` ? decodeStringData(e) : e instanceof URL && e.protocol === `data:` ? decodeStringData(e.href) : null; } function getKnownByteLength(n) { return typeof Buffer < `u` && Buffer.isBuffer(n) || n instanceof Uint8Array || n instanceof ArrayBuffer ? n.byteLength : typeof n == `string` ? computeStringByteLength(n) : isAttachmentRefUrl(n) ? parseAttachmentRef(n).size ?? null : n instanceof URL && n.protocol === `data:` ? computeStringByteLength(n.href) : null; } function decodeStringData(e) { if (e.startsWith(`data:`)) { let t = e.indexOf(`,`); if (t === -1) return null; let n = e.slice(5, t), r = e.slice(t + 1); return n.endsWith(`;base64`) ? Buffer.from(r, `base64`) : Buffer.from(decodeURIComponent(r), `utf8`); } return /^https?:\/\//.test(e) ? null : Buffer.from(e, `base64`); } function computeStringByteLength(e) { if (e.startsWith(`data:`)) { let t = e.indexOf(`,`); if (t === -1) return null; let n = e.slice(5, t), r = e.slice(t + 1); if (n.endsWith(`;base64`)) return estimateBase64ByteLength(r); try { return Buffer.byteLength(decodeURIComponent(r), `utf8`); } catch { return Buffer.byteLength(r, `utf8`); } } return /^https?:\/\//.test(e) ? null : estimateBase64ByteLength(e); } function estimateBase64ByteLength(e) { let t = e.trimEnd(); if (t.length === 0) return 0; let n = 0; return t.endsWith(`==`) ? n = 2 : t.endsWith(`=`) && (n = 1), Math.max(0, Math.floor(t.length * 3 / 4) - n); } //#endregion //#region node_modules/eve/dist/src/public/channels/upload-policy.js const DEFAULT_UPLOAD_POLICY = Object.freeze({ allowedMediaTypes: `*`, maxBytes: 25 * 1024 * 1024 }); function mergeUploadPolicy(e, n = DEFAULT_UPLOAD_POLICY) { if (e === `disabled`) return `disabled`; if (e === void 0) return n; let r = e.maxBytes ?? n.maxBytes, i = e.allowedMediaTypes ?? n.allowedMediaTypes; if (r < 0 || !Number.isFinite(r)) throw RangeError(`UploadPolicy.maxBytes must be a non-negative finite number. Received: ${String(r)}.`); return { allowedMediaTypes: i, maxBytes: r }; } function isMediaTypeAllowed(e, t) { if (t === `disabled`) return !1; if (t.allowedMediaTypes === `*`) return !0; let n = e.toLowerCase(); for (let e of t.allowedMediaTypes) { let t = e.toLowerCase(); if (t === n) return !0; if (t.endsWith(`/*`)) { let e = t.slice(0, -1); if (n.startsWith(e)) return !0; } } return !1; } function evaluateFilePart(t, n) { if (n === `disabled` || !isMediaTypeAllowed(t.mediaType, n)) { let e = { allowedMediaTypes: n === `disabled` || n.allowedMediaTypes === `*` ? [] : [...n.allowedMediaTypes], kind: `disallowed-media-type`, mediaType: t.mediaType }; return t.filename === void 0 ? e : { ...e, filename: t.filename }; } let r = getKnownByteLength(t.data); if (r !== null && r > n.maxBytes) { let e = { byteLength: r, kind: `too-large`, limit: n.maxBytes, mediaType: t.mediaType }; return t.filename === void 0 ? e : { ...e, filename: t.filename }; } return null; } function collectUploadPolicyViolations(e, t) { if (typeof e == `string`) return []; let n = []; for (let r of e) { if (r.type !== `file`) continue; let e = evaluateFilePart(r, t); e !== null && n.push(e); } return n; } function formatUploadPolicyViolation(e) { let t = e.filename ?? e.mediaType; if (e.kind === `too-large`) return `${t} (${e.byteLength} bytes) exceeds the ${e.limit}-byte upload limit.`; let n = e.allowedMediaTypes.length > 0 ? ` Allowed: ${e.allowedMediaTypes.join(`, `)}.` : ``; return `${t} has media type "${e.mediaType}" which is not allowed by this route.${n}`; } //#endregion //#region node_modules/eve/dist/src/public/channels/eve.js const log$19 = createLogger(`eve.channel`); function defaultEveAuth(e) { return e.eve.caller; } function eveChannel(e) { let t = mergeUploadPolicy(e.uploadPolicy); return defineChannel({ cors: normalizeEveCors(e.cors), routes: [ POST$1(`/eve/v1/session`, async (n, { send: r }) => { let i = await routeAuth(n, e.auth); if (i instanceof Response) return i; let a = i, o; try { o = await n.json(); } catch { return Response.json({ error: `Invalid JSON body.`, ok: !1 }, { status: 400 }); } if (typeof o != `object` || !o) return Response.json({ error: `Expected a JSON object.`, ok: !1 }, { status: 400 }); let s = parseCreateBody(o); if (s instanceof Response) return s; let c = checkUploadPolicy(s, t); if (c !== null) return c; let l = await resolveOnMessage({ auth: a, config: e, message: s.message, request: n }); if (l instanceof Response) return l; if (!l.dispatch) return droppedMessageResponse(); let u = `eve:${crypto.randomUUID()}`, d = await r(createSendPayload(s, mergeContext(s.context, l.context)), { auth: l.auth, callback: s.callback, continuationToken: u, mode: s.mode }); return Response.json({ continuationToken: d.continuationToken, ok: !0, sessionId: d.id }, { headers: { "cache-control": `no-store`, [EVE_SESSION_ID_HEADER]: d.id }, status: 202 }); }), POST$1(`/eve/v1/session/:sessionId`, async (n, { send: r, getSession: i, params: a }) => { let o = await routeAuth(n, e.auth); if (o instanceof Response) return o; let s = o, c = a.sessionId; if (!c) return Response.json({ error: `Missing session id.`, ok: !1 }, { status: 400 }); try { i(c); } catch { return Response.json({ error: `Session not found.`, ok: !1 }, { status: 404 }); } let l; try { l = await n.json(); } catch { return Response.json({ error: `Invalid JSON body.`, ok: !1 }, { status: 400 }); } if (typeof l != `object` || !l) return Response.json({ error: `Expected a JSON object.`, ok: !1 }, { status: 400 }); let u = parseContinueBody(l); if (u instanceof Response) return u; let d = checkUploadPolicy(u, t); if (d !== null) return d; let f = u.context, p = s; if (u.message !== void 0) { let t = await resolveOnMessage({ auth: s, config: e, message: u.message, request: n, sessionId: c }); if (t instanceof Response) return t; if (!t.dispatch) return droppedMessageResponse(); f = mergeContext(u.context, t.context), p = t.auth; } let m = await r({ inputResponses: u.inputResponses, message: u.message, context: f, outputSchema: u.outputSchema }, { auth: p, continuationToken: u.continuationToken }); return Response.json({ ok: !0, sessionId: m.id }, { headers: { "cache-control": `no-store`, [EVE_SESSION_ID_HEADER]: m.id }, status: 200 }); }), GET(`/eve/v1/session/:sessionId/stream`, async (t, { getSession: n, params: c }) => { let l = await routeAuth(t, e.auth); if (l instanceof Response) return l; let u = c.sessionId; if (!u) return Response.json({ error: `Missing session id.`, ok: !1 }, { status: 400 }); let d = parseStartIndex(t); if (d instanceof Response) return d; try { let e = serializeAsNdjson(await n(u).getEventStream({ startIndex: d })); return new Response(e, { headers: { "cache-control": `no-store, no-transform`, "content-type": EVE_MESSAGE_STREAM_CONTENT_TYPE, "x-accel-buffering": `no`, [EVE_SESSION_ID_HEADER]: u, [EVE_STREAM_FORMAT_HEADER]: EVE_MESSAGE_STREAM_FORMAT, [EVE_STREAM_VERSION_HEADER]: EVE_MESSAGE_STREAM_VERSION } }); } catch { return Response.json({ error: `Session not found.`, ok: !1 }, { status: 404 }); } }) ], events: e.events }); } function normalizeEveCors(e) { if (e === void 0 || e === !1) return !1; if (e === !0) return !0; let t = {}; return e.origin !== void 0 && (t.origin = normalizeEveCorsOrigin(e.origin)), e.methods !== void 0 && (t.methods = e.methods), e.allowedHeaders !== void 0 && (t.allowHeaders = e.allowedHeaders), e.exposedHeaders !== void 0 && (t.exposeHeaders = e.exposedHeaders), e.credentials !== void 0 && (t.credentials = e.credentials), e.maxAge !== void 0 && (t.maxAge = e.maxAge), e.preflightStatus !== void 0 && (t.preflight = { statusCode: e.preflightStatus }), t; } function normalizeEveCorsOrigin(e) { return e === `*` || e === `null` ? e : typeof e == `string` ? [e] : e; } async function resolveOnMessage(e) { let n = e.config.onMessage ?? defaultOnMessage, r; try { r = await n({ eve: e.sessionId === void 0 ? { caller: e.auth, request: e.request } : { caller: e.auth, request: e.request, sessionId: e.sessionId } }, e.message); } catch (n) { let r = logError(log$19, `onMessage handler failed`, n, { sessionId: e.sessionId }); return Response.json({ error: `onMessage handler failed.`, errorId: r, ok: !1 }, { status: 500 }); } return r == null ? { dispatch: !1 } : r.context === void 0 ? { auth: r.auth, dispatch: !0 } : { auth: r.auth, context: r.context, dispatch: !0 }; } function defaultOnMessage(e) { return { auth: defaultEveAuth(e) }; } function droppedMessageResponse() { return new Response(null, { headers: { "cache-control": `no-store` }, status: 204 }); } function parseCreateBody(e) { let t = parseMessageField(e.message); if (t instanceof Response) return t; let n = parseClientContextField(e.clientContext); if (n instanceof Response) return n; let r = parseCallbackField(e.callback); if (r instanceof Response) return r; let i = parseModeField(e.mode); if (i instanceof Response) return i; let a = parseOutputSchemaField(e.outputSchema); return a instanceof Response ? a : t === void 0 ? Response.json({ error: `Missing or empty 'message' field.`, ok: !1 }, { status: 400 }) : { callback: r, message: t, mode: i, context: n, outputSchema: a }; } function parseContinueBody(e) { let t = typeof e.continuationToken == `string` && e.continuationToken.length > 0 ? e.continuationToken : void 0; if (t === void 0) return Response.json({ error: `Missing or empty 'continuationToken' field.`, ok: !1 }, { status: 400 }); let n = parseMessageField(e.message); if (n instanceof Response) return n; let r = parseInputResponses(e.inputResponses); if (r instanceof Response) return r; let i = parseClientContextField(e.clientContext); if (i instanceof Response) return i; let a = parseOutputSchemaField(e.outputSchema); return a instanceof Response ? a : n === void 0 && r === void 0 ? Response.json({ error: `Expected a non-empty 'message', a non-empty 'inputResponses' array, or both.`, ok: !1 }, { status: 400 }) : { message: n, continuationToken: t, inputResponses: r, context: i, outputSchema: a }; } function createSendPayload(e, t = e.context) { if (t === void 0 && e.outputSchema === void 0) return e.message; let n = { message: e.message }; return t !== void 0 && (n.context = t), e.outputSchema !== void 0 && (n.outputSchema = e.outputSchema), n; } function parseOutputSchemaField(e) { if (e !== void 0) try { return parseJsonObject(e); } catch { return Response.json({ error: `Expected 'outputSchema' to be a JSON-serializable object.`, ok: !1 }, { status: 400 }); } } function parseCallbackField(e) { if (e === void 0) return; let t = parseSessionCallback(e); return t.ok ? t.callback : Response.json({ error: t.message, ok: !1 }, { status: 400 }); } function parseModeField(e) { if (e !== void 0) return e === `conversation` || e === `task` ? e : Response.json({ error: `Expected 'mode' to be either 'conversation' or 'task'.`, ok: !1 }, { status: 400 }); } function parseMessageField(e) { if (e === void 0) return; if (typeof e == `string`) return e.length > 0 ? e : void 0; if (!Array.isArray(e)) return Response.json({ error: `Expected 'message' to be a string or an array of text/file parts.`, ok: !1 }, { status: 400 }); if (e.length === 0) return; let t = []; for (let n of e) { let e = parseMessagePart(n); if (e instanceof Response) return e; t.push(e); } return t; } function parseMessagePart(e) { if (typeof e != `object` || !e) return Response.json({ error: `Expected each message part to be an object.`, ok: !1 }, { status: 400 }); let t = e; if (t.type === `text`) return typeof t.text != `string` || t.text.length === 0 ? Response.json({ error: `Text parts require a non-empty 'text' string.`, ok: !1 }, { status: 400 }) : { type: `text`, text: t.text }; if (t.type === `file`) { if (typeof t.mediaType != `string` || t.mediaType.length === 0) return Response.json({ error: `File parts require a non-empty 'mediaType' string.`, ok: !1 }, { status: 400 }); if (typeof t.data != `string`) return Response.json({ error: `File parts require a 'data' string (base64, data URL, or URL).`, ok: !1 }, { status: 400 }); if (hasInternalRefScheme(t.data)) return Response.json({ error: `File part 'data' must not use a framework-internal ref scheme.`, ok: !1 }, { status: 400 }); let e = { type: `file`, mediaType: t.mediaType, data: t.data }; return typeof t.filename == `string` && t.filename.length > 0 && (e.filename = t.filename), e; } return Response.json({ error: `Unsupported message part type "${String(t.type)}". Use 'text' or 'file'.`, ok: !1 }, { status: 400 }); } function checkUploadPolicy(e, t) { if (!e.message) return null; let n = collectUploadPolicyViolations(e.message, t); if (n.length === 0) return null; let [r] = n; if (!r) return null; let i = r.kind === `too-large` ? 413 : 415; return Response.json({ error: formatUploadPolicyViolation(r), ok: !1, violations: n.map((e) => e.kind === `too-large` ? { byteLength: e.byteLength, filename: e.filename, kind: e.kind, limit: e.limit, mediaType: e.mediaType } : { allowedMediaTypes: e.allowedMediaTypes, filename: e.filename, kind: e.kind, mediaType: e.mediaType }) }, { status: i }); } function parseInputResponses(e) { if (e === void 0) return; if (!Array.isArray(e) || e.length === 0) return Response.json({ error: `Expected 'inputResponses' to be a non-empty array.`, ok: !1 }, { status: 400 }); let t = e.filter(isInputResponse); return t.length === e.length ? t : Response.json({ error: `Expected every 'inputResponses' entry to match the HITL response schema.`, ok: !1 }, { status: 400 }); } function mergeContext(e, t) { return e === void 0 ? t : t === void 0 ? e : [...e, ...t]; } function parseClientContextField(e) { if (e !== void 0) { if (typeof e == `string`) return e.length > 0 ? [toClientContextMessage(e)] : void 0; if (Array.isArray(e)) return e.length === 0 ? void 0 : e.every((e) => typeof e == `string` && e.length > 0) ? e.map((e) => toClientContextMessage(e)) : Response.json({ error: `Expected 'clientContext' array entries to be non-empty strings.`, ok: !1 }, { status: 400 }); if (typeof e != `object` || !e) return Response.json({ error: `Expected 'clientContext' to be a string, string array, or JSON object.`, ok: !1 }, { status: 400 }); try { let t = parseJsonObject(e); return [toClientContextMessage(JSON.stringify(t))]; } catch { return Response.json({ error: `Expected 'clientContext' to be a JSON-serializable object.`, ok: !1 }, { status: 400 }); } } } function toClientContextMessage(e) { return `Client context: ${e}`; } function parseStartIndex(e) { let t = new URL(e.url).searchParams.get(`startIndex`); if (t === null) return; let n = Number.parseInt(t, 10); return !Number.isSafeInteger(n) || n < 0 ? Response.json({ error: `Expected startIndex to be a non-negative integer.`, ok: !1 }, { status: 400 }) : n; } function serializeAsNdjson(e) { let t = new TextEncoder(); return e.pipeThrough(new TransformStream({ transform(e, n) { n.enqueue(t.encode(`${JSON.stringify(e)}\n`)); } })); } //#endregion //#region node_modules/eve/dist/src/compiled/_chunks/workflow/dist-FLIfyJ4Y.js function n$11(e, t, n) { return n === 1 ? e : t; } function r$14(e, t) { if (typeof t != `string`) return null; let [n, r, ...i] = t.split(`//`); if (n !== e || !r || i.length === 0) return null; let a = i.join(`//`), o = a.split(`/`).at(-1) ?? ``, s = ``; return s = r.startsWith(`./`) ? r.split(`/`).at(-1) ?? `` : (r.split(`@`).slice(0, -1).join(`@`) || r.split(`@`)[0])?.split(`/`).at(-1) ?? ``, [`default`, `__default`].includes(o) && s && (o = s), { shortName: o, moduleSpecifier: r, functionName: a }; } function i$12(e) { return r$14(`workflow`, e); } function a$11(e) { return r$14(`step`, e); } function o$11(e) { return d$11(a$11(e), e); } function s$9(e) { return d$11(i$12(e), e); } function c$10(e) { return i$12(e)?.shortName ?? u$11(`workflow`, e) ?? e; } function l$9(e) { return a$11(e)?.shortName ?? u$11(`step`, e) ?? e; } function u$11(e, t) { if (!t.startsWith(`${e}--`)) return null; let n = t.split(`--`).filter(Boolean), r = n.at(-1)?.split(`-`).filter(Boolean).at(-1) ?? ``; if ([`default`, `__default`].includes(r)) { let t = n.at(-2)?.split(`-`).filter(Boolean).at(-1); t && t !== e && (r = t); } return r || null; } function d$11(e, t) { return e ? `${e.shortName} (${e.moduleSpecifier})` : t; } function f$9() { let e, t; return { promise: new Promise((n, r) => { e = n, t = r; }), resolve: e, reject: t }; } function p$12(e) { let t = { get value() { let n = e(); return Object.defineProperty(t, "value", { value: n }), n; } }; return t; } var m$8 = d$13(c$12(((e, t) => { var n = 1e3, r = n * 60, i = r * 60, a = i * 24, o = a * 7, s = a * 365.25; t.exports = function(e, t) { t ||= {}; var n = typeof e; if (n === `string` && e.length > 0) return c(e); if (n === `number` && isFinite(e)) return t.long ? u(e) : l(e); throw Error(`val is not a non-empty string or a valid number. val=` + JSON.stringify(e)); }; function c(e) { if (e = String(e), !(e.length > 100)) { var t = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e); if (t) { var c = parseFloat(t[1]); switch ((t[2] || `ms`).toLowerCase()) { case `years`: case `year`: case `yrs`: case `yr`: case `y`: return c * s; case `weeks`: case `week`: case `w`: return c * o; case `days`: case `day`: case `d`: return c * a; case `hours`: case `hour`: case `hrs`: case `hr`: case `h`: return c * i; case `minutes`: case `minute`: case `mins`: case `min`: case `m`: return c * r; case `seconds`: case `second`: case `secs`: case `sec`: case `s`: return c * n; case `milliseconds`: case `millisecond`: case `msecs`: case `msec`: case `ms`: return c; default: return; } } } } function l(e) { var t = Math.abs(e); return t >= a ? Math.round(e / a) + `d` : t >= i ? Math.round(e / i) + `h` : t >= r ? Math.round(e / r) + `m` : t >= n ? Math.round(e / n) + `s` : e + `ms`; } function u(e) { var t = Math.abs(e); return t >= a ? d(e, t, a, `day`) : t >= i ? d(e, t, i, `hour`) : t >= r ? d(e, t, r, `minute`) : t >= n ? d(e, t, n, `second`) : e + ` ms`; } function d(e, t, n, r) { var i = t >= n * 1.5; return Math.round(e / n) + ` ` + r + (i ? `s` : ``); } }))(), 1); function h$10(e) { if (typeof e == `string`) { let t = (0, m$8.default)(e); if (typeof t != `number` || t < 0) throw Error(`Invalid duration: "${e}". Expected a valid duration string like "1s", "1m", "1h", etc.`); return new Date(Date.now() + t); } else if (typeof e == `number`) { if (e < 0 || !Number.isFinite(e)) throw Error(`Invalid duration: ${e}. Expected a non-negative finite number of milliseconds.`); return new Date(Date.now() + e); } else if (e instanceof Date || e && typeof e == `object` && typeof e.getTime == `function`) return e instanceof Date ? e : new Date(e.getTime()); else throw Error(`Invalid duration parameter. Expected a duration string, number (milliseconds), or Date object.`); } function g$9(e = process.env) { return e.WORKFLOW_TARGET_WORLD || (e.VERCEL_DEPLOYMENT_ID ? `vercel` : `local`); } function _$8(e) { return e === `vercel` || e === `@workflow/world-vercel`; } //#endregion //#region node_modules/eve/dist/src/compiled/_chunks/workflow/dist-Dxrjttr2.js const t$9 = { USER_ERROR: `USER_ERROR`, RUNTIME_ERROR: `RUNTIME_ERROR`, CORRUPTED_EVENT_LOG: `CORRUPTED_EVENT_LOG`, REPLAY_DIVERGENCE: `REPLAY_DIVERGENCE`, MAX_DELIVERIES_EXCEEDED: `MAX_DELIVERIES_EXCEEDED`, REPLAY_TIMEOUT: `REPLAY_TIMEOUT`, WORLD_CONTRACT_ERROR: `WORLD_CONTRACT_ERROR` }; function n$10(e) { return typeof e == `object` && !!e && `name` in e && `message` in e; } function r$13(e, t) { if (t.length === 0) return e; let n = [e]; return t.forEach((e, r) => { let i = r === t.length - 1, a = i ? `╰▶ ` : `├▶ `, o = i ? ` ` : `│ `; `${e.label}: ${e.value}`.split(` `).forEach((e, t) => n.push(`${t === 0 ? a : o}${e}`)); }), n.join(` `); } function i$11(e, t) { let n = []; return e && n.push({ label: `hint`, value: e }), t && n.push({ label: `docs`, value: `https://workflow-sdk.dev/err/${t}` }), n; } const a$10 = { NODE_JS_MODULE_IN_WORKFLOW: `node-js-module-in-workflow`, START_INVALID_WORKFLOW_FUNCTION: `start-invalid-workflow-function`, SERIALIZATION_FAILED: `serialization-failed`, WEBHOOK_INVALID_RESPOND_WITH_VALUE: `webhook-invalid-respond-with-value`, WEBHOOK_RESPONSE_NOT_SENT: `webhook-response-not-sent`, FETCH_IN_WORKFLOW_FUNCTION: `fetch-in-workflow`, TIMEOUT_FUNCTIONS_IN_WORKFLOW: `timeout-in-workflow`, HOOK_CONFLICT: `hook-conflict`, CORRUPTED_EVENT_LOG: `corrupted-event-log`, REPLAY_DIVERGENCE: `replay-divergence`, STEP_NOT_REGISTERED: `step-not-registered`, WORKFLOW_NOT_REGISTERED: `workflow-not-registered`, RUNTIME_DECRYPTION_FAILED: `runtime-decryption-failed` }; var o$10 = class extends Error { cause; constructor(e, t) { let n = r$13(e, i$11(void 0, t?.slug)); super(n, { cause: t?.cause }), t?.cause !== void 0 && (this.cause = t.cause), t?.cause instanceof Error && (this.stack = `${this.stack}\nCaused by: ${t.cause.stack}`); } static is(e) { return n$10(e) && e.name === `WorkflowError`; } }; var s$8 = class extends o$10 { status; code; url; retryAfter; constructor(e, t) { super(e, { cause: t?.cause }), this.name = `WorkflowWorldError`, this.status = t?.status, this.code = t?.code, this.url = t?.url, this.retryAfter = t?.retryAfter; } static is(e) { return n$10(e) && e.name === `WorkflowWorldError`; } }; var c$9 = class extends o$10 { runId; errorCode; constructor(e, t, n = {}) { let r = t instanceof Error ? t.message : typeof t == `string` ? t : t && typeof t == `object` && `message` in t ? String(t.message) : `Unknown error`; super(`Workflow run "${e}" failed: ${r}`, { cause: t }), this.name = `WorkflowRunFailedError`, this.runId = e, n.errorCode !== void 0 && (this.errorCode = n.errorCode); } static is(e) { return n$10(e) && e.name === `WorkflowRunFailedError`; } }; var l$8 = class extends o$10 { runId; status; constructor(e, t) { super(`Workflow run "${e}" has not completed`, {}), this.name = `WorkflowRunNotCompletedError`, this.runId = e, this.status = t; } static is(e) { return n$10(e) && e.name === `WorkflowRunNotCompletedError`; } }; var u$10 = class extends o$10 { constructor(e, t) { super(e, { ...t }), this.name = `WorkflowRuntimeError`; } static is(e) { return n$10(e) && e.name === `WorkflowRuntimeError`; } }; var d$10 = class extends u$10 { constructor(e, t) { super(e, { ...t, slug: a$10.CORRUPTED_EVENT_LOG }), this.name = `CorruptedEventLogError`; } static is(e) { return n$10(e) && e.name === `CorruptedEventLogError`; } }; var f$8 = class extends u$10 { eventId; constructor(e, t) { super(e, { ...t, slug: a$10.REPLAY_DIVERGENCE }), this.name = `ReplayDivergenceError`, this.eventId = t.eventId; } static is(e) { return n$10(e) && e.name === `ReplayDivergenceError` && typeof e.eventId == `string`; } }; var p$11 = class extends u$10 { context; constructor(e, t) { super(e, { cause: t?.cause, slug: a$10.RUNTIME_DECRYPTION_FAILED }), this.name = `RuntimeDecryptionError`, t?.context !== void 0 && (this.context = t.context); } static is(e) { return n$10(e) && e.name === `RuntimeDecryptionError`; } }; var h$9 = class extends o$10 { hint; fatal = !0; constructor(e, t) { let n = r$13(e, i$11(t?.hint, void 0)); super(n, { cause: t?.cause }), this.name = `SerializationError`, this.hint = t?.hint; } static is(e) { return n$10(e) && e.name === `SerializationError`; } }; var g$8 = class extends u$10 { stepName; constructor(e) { super(`Step "${e}" is not registered in the current deployment. This usually indicates a build or bundling issue that caused the step to not be included in the deployment.`, { slug: a$10.STEP_NOT_REGISTERED }), this.name = `StepNotRegisteredError`, this.stepName = e; } static is(e) { return n$10(e) && e.name === `StepNotRegisteredError`; } }; var _$7 = class extends u$10 { workflowName; constructor(e) { super(`Workflow "${e}" is not registered in the current deployment. This usually means a run was started against a deployment that does not have this workflow, or there was a build/bundling issue.`, { slug: a$10.WORKFLOW_NOT_REGISTERED }), this.name = `WorkflowNotRegisteredError`, this.workflowName = e; } static is(e) { return n$10(e) && e.name === `WorkflowNotRegisteredError`; } }; var v$8 = class extends o$10 { runId; constructor(e) { super(`Workflow run "${e}" not found`, {}), this.name = `WorkflowRunNotFoundError`, this.runId = e; } static is(e) { return n$10(e) && e.name === `WorkflowRunNotFoundError`; } }; var y$6 = class extends o$10 { token; conflictingRunId; constructor(e, t) { super(`Hook token "${e}" is already in use by another workflow${t ? ` (run "${t}")` : ``}`, { slug: a$10.HOOK_CONFLICT }), this.name = `HookConflictError`, this.token = e, t !== void 0 && (this.conflictingRunId = t); } static is(e) { return n$10(e) && e.name === `HookConflictError`; } }; var b$9 = class extends o$10 { token; constructor(e) { super(`Hook not found`, {}), this.name = `HookNotFoundError`, this.token = e; } static is(e) { return n$10(e) && e.name === `HookNotFoundError`; } }; var x$9 = class extends s$8 { constructor(e) { super(e), this.name = `EntityConflictError`; } static is(e) { return n$10(e) && e.name === `EntityConflictError`; } }; var S$10 = class extends s$8 { constructor(e) { super(e), this.name = `RunExpiredError`; } static is(e) { return n$10(e) && e.name === `RunExpiredError`; } }; var C$11 = class extends s$8 { constructor(e, t) { super(e, { retryAfter: t?.retryAfter }), this.name = `TooEarlyError`; } static is(e) { return n$10(e) && e.name === `TooEarlyError`; } }; var w$11 = class extends s$8 { retryAfter; constructor(e, t) { super(e), this.name = `ThrottleError`, this.retryAfter = t?.retryAfter; } static is(e) { return n$10(e) && e.name === `ThrottleError`; } }; var T$11 = class extends o$10 { runId; constructor(e) { super(`Workflow run "${e}" cancelled`, {}), this.name = `WorkflowRunCancelledError`, this.runId = e; } static is(e) { return n$10(e) && e.name === `WorkflowRunCancelledError`; } }; var E$11 = class extends o$10 { runSpecVersion; worldSpecVersion; constructor(e, t) { super(`Run requires spec version ${e}, but world supports version ${t}. Please upgrade 'workflow' package.`), this.name = `RunNotSupportedError`, this.runSpecVersion = e, this.worldSpecVersion = t; } static is(e) { return n$10(e) && e.name === `RunNotSupportedError`; } }; var D$10 = class extends Error { fatal = !0; constructor(e) { super(e), this.name = `FatalError`; } static is(e) { return n$10(e) ? e.name === `FatalError` ? !0 : e.fatal === !0 : !1; } }; var O$8 = class extends Error { retryAfter; constructor(t, n = {}) { super(t), this.name = `RetryableError`, n.retryAfter === void 0 ? this.retryAfter = new Date(Date.now() + 1e3) : this.retryAfter = h$10(n.retryAfter); } static is(e) { return n$10(e) && e.name === `RetryableError`; } }; const A$9 = Symbol.for(`@workflow/errors//FatalError`); const j$8 = Symbol.for(`@workflow/errors//RetryableError`); const M$9 = Symbol.for(`@workflow/errors//HookConflictError`); const N$8 = Symbol.for(`@workflow/errors//RuntimeDecryptionError`); typeof globalThis < `u` && (Object.hasOwn(globalThis, A$9) || Object.defineProperty(globalThis, A$9, { value: D$10, writable: !1, enumerable: !1, configurable: !1 }), Object.hasOwn(globalThis, j$8) || Object.defineProperty(globalThis, j$8, { value: O$8, writable: !1, enumerable: !1, configurable: !1 }), Object.hasOwn(globalThis, M$9) || Object.defineProperty(globalThis, M$9, { value: y$6, writable: !1, enumerable: !1, configurable: !1 }), Object.hasOwn(globalThis, N$8) || Object.defineProperty(globalThis, N$8, { value: p$11, writable: !1, enumerable: !1, configurable: !1 })); //#endregion //#region node_modules/eve/dist/src/compiled/@workflow/core/private.js const t$8 = Symbol.for(`@workflow/core//registeredSteps`); const n$9 = globalThis; const r$12 = n$9[t$8] ??= /* @__PURE__ */ new Map(); const i$10 = /* @__PURE__ */ new Set([ `__builtin_response_array_buffer`, `__builtin_response_json`, `__builtin_response_text` ]); function a$9(e) { let t = e.split(`//`); if (t.length !== 3 || t[0] !== `step`) return []; let n = t[1], r = t[2], i = /* @__PURE__ */ new Set(), a = (e) => { e !== n && i.add(e); }; if (n.startsWith(`./workflows/`)) { let e = n.slice(2); a(`./example/${e}`), a(`./src/${e}`); } else if (n.startsWith(`./example/workflows/`)) { let e = n.slice(10); a(`./${e}`), a(`./src/${e}`); } else if (n.startsWith(`./src/workflows/`)) { let e = n.slice(6); a(`./${e}`), a(`./example/${e}`); } return Array.from(i, (e) => `step//${e}//${r}`); } function o$9(e) { if (i$10.has(e)) { for (let [t, n] of r$12.entries()) if (t.endsWith(`//${e}`)) return n; } } function s$7(e, t) { r$12.set(e, t), t.stepId = e; } function c$8(e) { let t = r$12.get(e); if (t) return t; for (let t of a$9(e)) { let e = r$12.get(t); if (e) return e; } let n = o$9(e); if (n) return n; } async function l$7(e, t, n) { if (t === void 0 || !e.pendingDeliveryBarriers || e.pendingDeliveryBarriers.size === 0) return; let r = []; for (let [i, a] of e.pendingDeliveryBarriers) i < t && n.includes(a.kind) && r.push(a.delivered); r.length > 0 && await Promise.all(r); } function u$9(t, n, r) { let i = t.pendingDeliveryBarriers; if (!i || n === void 0) return { markDelivered: () => {} }; let a = !1, { promise: o, resolve: s } = f$9(), c = { kind: r, delivered: o }; i.set(n, c); let l = () => { a || (a = !0, i.get(n) === c && i.delete(n), s()); }; return d$9(t, l), { markDelivered: l }; } function d$9(e, t) { let n = () => { e.pendingDeliveries > 0 ? e.promiseQueue.then(() => { setTimeout(n, 0); }) : t(); }; setTimeout(n, 0); } //#endregion //#region node_modules/eve/dist/src/compiled/_chunks/workflow/attribute-changes-DUxG-Gic.js var attribute_changes_DUxG_Gic_exports = /* @__PURE__ */ __exportAll({ $: () => sb, $n: () => Nf$1, $t: () => Wv, A: () => jx, An: () => xh$1, At: () => Qv, B: () => kb, Bn: () => oh$1, Bt: () => uy, C: () => Cx, Cn: () => Uh$1, Ct: () => Sy, D: () => Ix, Dn: () => Ih$1, Dt: () => by, E: () => Nx, En: () => Ah$1, Et: () => Oy, F: () => Hb, Fn: () => sh$1, Ft: () => sy, G: () => lb, Gn: () => Nm$1, Gt: () => Yv, H: () => fb, Hn: () => eh$1, Ht: () => py, I: () => Gb, In: () => ph$1, It: () => Kv, J: () => pb, Jn: () => jm$1, Jt: () => ty, K: () => ub, Kn: () => q$7, Kt: () => Xv, L: () => Ub, Ln: () => nh$1, Lt: () => qv, M: () => Yb, Mn: () => gh$1, Mt: () => iy, N: () => Kb, Nn: () => _h$1, Nt: () => ry, O: () => zx, On: () => Ch$1, Ot: () => yy, P: () => qb, Pn: () => mh$1, Pt: () => Zv, Q: () => Py, Qn: () => am$1, Qt: () => Gv, R: () => Vb, Rn: () => uh$1, Rt: () => $v, S: () => px, Sn: () => Wh$1, St: () => my, T: () => Rx, Tn: () => Vh$1, Tt: () => Dy, U: () => db, Un: () => $m$1, Ut: () => ly, V: () => jb, Vn: () => ih$1, Vt: () => dy, W: () => Sb, Wn: () => Pm$1, Wt: () => Jv, X: () => hb, Xn: () => wm$1, Xt: () => ny, Y: () => vb, Yn: () => Am$1, Yt: () => ey, Z: () => Eb, Zn: () => bm$1, Zt: () => cy, _: () => Mx, _n: () => T_$1, _r: () => Te$8, _t: () => wy, a: () => Yx, an: () => N_$1, ar: () => R$8, at: () => Hy, b: () => Ox, bn: () => y_$1, bt: () => hy, c: () => lS, cn: () => L_$1, cr: () => Oe$8, ct: () => Ay, d: () => fS, dn: () => M_$1, dr: () => je$8, dt: () => ky, en: () => Q$9, er: () => Uf$1, et: () => ob, f: () => dS, fn: () => k_$1, ft: () => qy, g: () => Lx, gn: () => E_$1, gr: () => Ce$8, gt: () => gy, h: () => cx, hn: () => D_$1, hr: () => we$8, ht: () => xy, i: () => pS, in: () => z_$1, ir: () => H$8, it: () => Fy, j: () => Xb, jn: () => yh$1, jt: () => ay, k: () => kx, kn: () => bh$1, kt: () => _y, l: () => mS, ln: () => B_$1, lt: () => jy, m: () => Kx, mn: () => O_$1, mt: () => Yy, n: () => gS, nr: () => B$9, nt: () => Ly, o: () => eS, on: () => P_$1, or: () => Yf$1, ot: () => Wy, p: () => qx, pn: () => j_$1, pr: () => Ee$8, pt: () => Jy, q: () => Tb, qn: () => Em$1, qt: () => oy, r: () => _S, rn: () => q_$1, rr: () => V$8, rt: () => Iy, s: () => rS, sn: () => R_$1, sr: () => ed$2, st: () => Uy, t: () => vS, tn: () => G_$1, tr: () => bf$1, tt: () => Gy, u: () => Qx, un: () => A_$1, ut: () => My, v: () => Fx, vn: () => g_$1, vt: () => Cy, w: () => tx, wn: () => Bh$1, wt: () => Ey, x: () => Ax, xn: () => p_$1, xt: () => vy, y: () => Px, yn: () => x_$1, yt: () => Ty, z: () => Ab, zn: () => ah$1, zt: () => fy }); function re$6(e, t) { let n = Error.captureStackTrace; n?.(e, t); } const ie$6 = (() => { let e = globalThis.process; return e?.env ? e.env.FORCE_COLOR && e.env.FORCE_COLOR !== `0` ? !0 : e.env.NO_COLOR ? !1 : !!e.stdout?.isTTY : !1; })(); const ae$7 = (e, t) => (n) => ie$6 ? `\x1b[${e}m${n}\x1b[${t}m` : n; const b$8 = { bold: ae$7(1, 22), dim: ae$7(2, 22), italic: ae$7(3, 23), red: ae$7(31, 39), blue: ae$7(34, 39), cyan: ae$7(36, 39), yellow: ae$7(33, 39), magenta: ae$7(35, 39) }; const oe$7 = { info: b$8.blue, help: b$8.cyan, warn: b$8.yellow, error: b$8.red }; function se$8(e) { let t = Array.isArray(e) ? e.join(` `) : e; return oe$7.info(`${b$8.bold(`hint:`)} ${t}`); } function ce$8(e) { return oe$7.info(`${b$8.bold(`docs:`)} ${e}`); } function le$8(e) { return b$8.italic(`${b$8.dim("`")}${e}${b$8.dim("`")}`); } function ue$8(e) { return b$8.dim(e); } function de$8(e) { return b$8.bold(e); } function fe$8(e) { return b$8.red(e); } function pe$8(e) { return b$8.magenta(e); } function me$8(e, t) { let n = [e]; return t.forEach((e, r) => { let i = e.split(` `), a = r === t.length - 1, o = a ? `╰▶ ` : `├▶ `, s = a ? ` ` : `│ `, c = i.map((e, t) => `${t === 0 ? o : s}${e}`); n.push(...c); }), n.join(` `); } const he$8 = Symbol.for(`nodejs.util.inspect.custom`); function ge$8(e) { return `code` in e ? `\`${e.code}\`` : `dim` in e ? e.dim : e.text; } function _e$8(e) { return `code` in e ? le$8(e.code) : `dim` in e ? ue$8(e.dim) : e.text; } function ve$8(e) { return e.type === `docs` ? `docs: ${e.url}` : e.segments.map(ge$8).join(``); } function ye$8(e) { return e.type === `docs` ? ce$8(e.url) : e.segments.map(_e$8).join(``); } function be$8(e) { let t = [e.title.map(ge$8).join(``)]; return e.details.forEach((n, r) => { let i = r === e.details.length - 1, a = i ? `╰▶ ` : `├▶ `, o = i ? ` ` : `│ `; ve$8(n).split(` `).forEach((e, n) => t.push(`${n === 0 ? a : o}${e}`)); }), t.join(` `); } function xe$8(e) { return me$8(e.title.map(_e$8).join(``), e.details.map(ye$8)); } var Se$8 = class extends Error { fatal = !0; #e; constructor(e) { super(be$8(e)), this.#e = e; } [he$8]() { let e = xe$8(this.#e), t = this.message.split(` `).length, n = (this.stack ?? ``).split(` `).slice(t).join(` `); return n ? `${this.name}: ${e}\n${n}` : `${this.name}: ${e}`; } toString() { return `${this.name}: ${xe$8(this.#e)}`; } }; var Ce$8 = class extends Se$8 { name = `NotInWorkflowContextError`; constructor(e, t) { super({ title: [{ code: e }, { text: ` can only be called inside a workflow function` }], details: [{ type: `docs`, url: t }] }); } }; var we$8 = class extends Se$8 { name = `NotInStepContextError`; constructor(e, t) { super({ title: [{ code: e }, { text: ` can only be called inside a step function` }], details: [{ type: `docs`, url: t }] }); } }; var Te$8 = class extends Se$8 { name = `NotInWorkflowOrStepContextError`; constructor(e, t) { super({ title: [{ code: e }, { text: ` can only be called inside a workflow or step function` }], details: [{ type: `docs`, url: t }] }); } }; const Ee$8 = Symbol.for(`WORKFLOW_CONTEXT`); var Oe$8 = class extends Se$8 { name = `UnavailableInWorkflowContextError`; constructor(e, t) { let n = globalThis[Ee$8]?.workflowName, r = (() => { if (!n) return null; let e = n.match(/^(workflow\/|step\/)(.*)$/); return e ? [{ dim: e[1] }, { text: e[2] }] : [{ text: n }]; })(), i = r ? { type: `plain`, segments: [ { text: `this call was made from the ` }, ...r, { text: ` workflow context.` } ] } : { type: `plain`, segments: [{ text: `this call was made from a workflow context.` }] }; super({ title: [{ code: e }, { text: ` cannot be called from a workflow context.` }], details: [ { type: `plain`, segments: [{ text: `calling this in a workflow context can cause determinism issues.` }] }, i, { type: `docs`, url: t } ] }); } }; function je$8(e, t, n) { let r = new Te$8(e, t); throw re$6(r, n), r; } const Ne$8 = Object.freeze({ status: `aborted` }); function x$8(e, t, n) { function r(n, r) { if (n._zod || Object.defineProperty(n, "_zod", { value: { def: r, constr: o, traits: /* @__PURE__ */ new Set() }, enumerable: !1 }), n._zod.traits.has(e)) return; n._zod.traits.add(e), t(n, r); let i = o.prototype, a = Object.keys(i); for (let e = 0; e < a.length; e++) { let t = a[e]; t in n || (n[t] = i[t].bind(n)); } } let i = n?.Parent ?? Object; class a extends i {} Object.defineProperty(a, "name", { value: e }); function o(e) { var t; let i = n?.Parent ? new a() : this; r(i, e), (t = i._zod).deferred ?? (t.deferred = []); for (let e of i._zod.deferred) e(); return i; } return Object.defineProperty(o, "init", { value: r }), Object.defineProperty(o, Symbol.hasInstance, { value: (t) => n?.Parent && t instanceof n.Parent ? !0 : t?._zod?.traits?.has(e) }), Object.defineProperty(o, "name", { value: e }), o; } const Pe$8 = Symbol(`zod_brand`); var Fe$8 = class extends Error { constructor() { super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`); } }; var Ie$8 = class extends Error { constructor(e) { super(`Encountered unidirectional transform during encode: ${e}`), this.name = `ZodEncodeError`; } }; const Le$8 = {}; function S$9(e) { return e && Object.assign(Le$8, e), Le$8; } var Re$8 = l$11({ BIGINT_FORMAT_RANGES: () => bt$7, Class: () => Ht$6, NUMBER_FORMAT_RANGES: () => yt$7, aborted: () => Ot$7, allowsEval: () => ct$7, assert: () => Ue$8, assertEqual: () => ze$8, assertIs: () => Ve$8, assertNever: () => He$8, assertNotEqual: () => Be$8, assignProp: () => Qe$8, base64ToUint8Array: () => It$5, base64urlToUint8Array: () => Rt$5, cached: () => Ke$8, captureStackTrace: () => ot$7, cleanEnum: () => Ft$6, cleanRegex: () => Je$8, clone: () => gt$7, cloneDef: () => et$8, createTransparentProxy: () => _t$7, defineLazy: () => w$10, esc: () => it$7, escapeRegex: () => ht$7, extend: () => Ct$7, finalizeIssue: () => jt$7, floatSafeRemainder: () => Ye$8, getElementAtPath: () => tt$8, getEnumValues: () => We$8, getLengthableOrigin: () => Nt$6, getParsedType: () => ft$7, getSizableOrigin: () => Mt$7, hexToUint8Array: () => Bt$5, isObject: () => st$7, isPlainObject: () => lt$7, issue: () => Pt$6, joinValues: () => C$10, jsonStringifyReplacer: () => Ge$8, merge: () => Tt$7, mergeDefs: () => $e$8, normalizeParams: () => T$10, nullish: () => qe$8, numKeys: () => dt$7, objectClone: () => Ze$8, omit: () => St$7, optionalKeys: () => vt$7, parsedType: () => D$9, partial: () => Et$7, pick: () => xt$7, prefixIssues: () => kt$7, primitiveTypes: () => mt$7, promiseAllObject: () => nt$8, propertyKeyTypes: () => pt$7, randomString: () => rt$7, required: () => Dt$7, safeExtend: () => wt$7, shallowClone: () => ut$7, slugify: () => at$7, stringifyPrimitive: () => E$10, uint8ArrayToBase64: () => Lt$6, uint8ArrayToBase64url: () => zt$6, uint8ArrayToHex: () => Vt$6, unwrapMessage: () => At$7 }); function ze$8(e) { return e; } function Be$8(e) { return e; } function Ve$8(e) {} function He$8(e) { throw Error(`Unexpected value in exhaustive check`); } function Ue$8(e) {} function We$8(e) { let t = Object.values(e).filter((e) => typeof e == `number`); return Object.entries(e).filter(([e, n]) => t.indexOf(+e) === -1).map(([e, t]) => t); } function C$10(e, t = `|`) { return e.map((e) => E$10(e)).join(t); } function Ge$8(e, t) { return typeof t == `bigint` ? t.toString() : t; } function Ke$8(e) { return { get value() { { let t = e(); return Object.defineProperty(this, "value", { value: t }), t; } } }; } function qe$8(e) { return e == null; } function Je$8(e) { let t = +!!e.startsWith(`^`), n = e.endsWith(`$`) ? e.length - 1 : e.length; return e.slice(t, n); } function Ye$8(e, t) { let n = (e.toString().split(`.`)[1] || ``).length, r = t.toString(), i = (r.split(`.`)[1] || ``).length; if (i === 0 && /\d?e-\d?/.test(r)) { let e = r.match(/\d?e-(\d?)/); e?.[1] && (i = Number.parseInt(e[1])); } let a = n > i ? n : i; return Number.parseInt(e.toFixed(a).replace(`.`, ``)) % Number.parseInt(t.toFixed(a).replace(`.`, ``)) / 10 ** a; } const Xe$8 = Symbol(`evaluating`); function w$10(e, t, n) { let r; Object.defineProperty(e, t, { get() { if (r !== Xe$8) return r === void 0 && (r = Xe$8, r = n()), r; }, set(n) { Object.defineProperty(e, t, { value: n }); }, configurable: !0 }); } function Ze$8(e) { return Object.create(Object.getPrototypeOf(e), Object.getOwnPropertyDescriptors(e)); } function Qe$8(e, t, n) { Object.defineProperty(e, t, { value: n, writable: !0, enumerable: !0, configurable: !0 }); } function $e$8(...e) { let t = {}; for (let n of e) Object.assign(t, Object.getOwnPropertyDescriptors(n)); return Object.defineProperties({}, t); } function et$8(e) { return $e$8(e._zod.def); } function tt$8(e, t) { return t ? t.reduce((e, t) => e?.[t], e) : e; } function nt$8(e) { let t = Object.keys(e), n = t.map((t) => e[t]); return Promise.all(n).then((e) => { let n = {}; for (let r = 0; r < t.length; r++) n[t[r]] = e[r]; return n; }); } function rt$7(e = 10) { let t = ``; for (let n = 0; n < e; n++) t += `abcdefghijklmnopqrstuvwxyz`[Math.floor(Math.random() * 26)]; return t; } function it$7(e) { return JSON.stringify(e); } function at$7(e) { return e.toLowerCase().trim().replace(/[^\w\s-]/g, ``).replace(/[\s_-]+/g, `-`).replace(/^-+|-+$/g, ``); } const ot$7 = `captureStackTrace` in Error ? Error.captureStackTrace : (...e) => {}; function st$7(e) { return typeof e == `object` && !!e && !Array.isArray(e); } const ct$7 = Ke$8(() => { if (typeof navigator < `u` && navigator?.userAgent?.includes(`Cloudflare`)) return !1; try { return Function(``), !0; } catch { return !1; } }); function lt$7(e) { if (st$7(e) === !1) return !1; let t = e.constructor; if (t === void 0 || typeof t != `function`) return !0; let n = t.prototype; return !(st$7(n) === !1 || Object.prototype.hasOwnProperty.call(n, `isPrototypeOf`) === !1); } function ut$7(e) { return lt$7(e) ? { ...e } : Array.isArray(e) ? [...e] : e; } function dt$7(e) { let t = 0; for (let n in e) Object.prototype.hasOwnProperty.call(e, n) && t++; return t; } const ft$7 = (e) => { let t = typeof e; switch (t) { case `undefined`: return `undefined`; case `string`: return `string`; case `number`: return Number.isNaN(e) ? `nan` : `number`; case `boolean`: return `boolean`; case `function`: return `function`; case `bigint`: return `bigint`; case `symbol`: return `symbol`; case `object`: return Array.isArray(e) ? `array` : e === null ? `null` : e.then && typeof e.then == `function` && e.catch && typeof e.catch == `function` ? `promise` : typeof Map < `u` && e instanceof Map ? `map` : typeof Set < `u` && e instanceof Set ? `set` : typeof Date < `u` && e instanceof Date ? `date` : typeof File < `u` && e instanceof File ? `file` : `object`; default: throw Error(`Unknown data type: ${t}`); } }; const pt$7 = /* @__PURE__ */ new Set([ `string`, `number`, `symbol` ]); const mt$7 = /* @__PURE__ */ new Set([ `string`, `number`, `bigint`, `boolean`, `symbol`, `undefined` ]); function ht$7(e) { return e.replace(/[.*+?^${}()|[\]\\]/g, `\\$&`); } function gt$7(e, t, n) { let r = new e._zod.constr(t ?? e._zod.def); return (!t || n?.parent) && (r._zod.parent = e), r; } function T$10(e) { let t = e; if (!t) return {}; if (typeof t == `string`) return { error: () => t }; if (t?.message !== void 0) { if (t?.error !== void 0) throw Error("Cannot specify both `message` and `error` params"); t.error = t.message; } return delete t.message, typeof t.error == `string` ? { ...t, error: () => t.error } : t; } function _t$7(e) { let t; return new Proxy({}, { get(n, r, i) { return t ??= e(), Reflect.get(t, r, i); }, set(n, r, i, a) { return t ??= e(), Reflect.set(t, r, i, a); }, has(n, r) { return t ??= e(), Reflect.has(t, r); }, deleteProperty(n, r) { return t ??= e(), Reflect.deleteProperty(t, r); }, ownKeys(n) { return t ??= e(), Reflect.ownKeys(t); }, getOwnPropertyDescriptor(n, r) { return t ??= e(), Reflect.getOwnPropertyDescriptor(t, r); }, defineProperty(n, r, i) { return t ??= e(), Reflect.defineProperty(t, r, i); } }); } function E$10(e) { return typeof e == `bigint` ? e.toString() + `n` : typeof e == `string` ? `"${e}"` : `${e}`; } function vt$7(e) { return Object.keys(e).filter((t) => e[t]._zod.optin === `optional` && e[t]._zod.optout === `optional`); } const yt$7 = { safeint: [-(2 ** 53 - 1), 2 ** 53 - 1], int32: [-2147483648, 2147483647], uint32: [0, 4294967295], float32: [-34028234663852886e22, 34028234663852886e22], float64: [-Number.MAX_VALUE, Number.MAX_VALUE] }; const bt$7 = { int64: [BigInt(`-9223372036854775808`), BigInt(`9223372036854775807`)], uint64: [BigInt(0), BigInt(`18446744073709551615`)] }; function xt$7(e, t) { let n = e._zod.def, r = n.checks; if (r && r.length > 0) throw Error(`.pick() cannot be used on object schemas containing refinements`); return gt$7(e, $e$8(e._zod.def, { get shape() { let e = {}; for (let r in t) { if (!(r in n.shape)) throw Error(`Unrecognized key: "${r}"`); t[r] && (e[r] = n.shape[r]); } return Qe$8(this, `shape`, e), e; }, checks: [] })); } function St$7(e, t) { let n = e._zod.def, r = n.checks; if (r && r.length > 0) throw Error(`.omit() cannot be used on object schemas containing refinements`); return gt$7(e, $e$8(e._zod.def, { get shape() { let r = { ...e._zod.def.shape }; for (let e in t) { if (!(e in n.shape)) throw Error(`Unrecognized key: "${e}"`); t[e] && delete r[e]; } return Qe$8(this, `shape`, r), r; }, checks: [] })); } function Ct$7(e, t) { if (!lt$7(t)) throw Error(`Invalid input to extend: expected a plain object`); let n = e._zod.def.checks; if (n && n.length > 0) { let n = e._zod.def.shape; for (let e in t) if (Object.getOwnPropertyDescriptor(n, e) !== void 0) throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead."); } return gt$7(e, $e$8(e._zod.def, { get shape() { let n = { ...e._zod.def.shape, ...t }; return Qe$8(this, `shape`, n), n; } })); } function wt$7(e, t) { if (!lt$7(t)) throw Error(`Invalid input to safeExtend: expected a plain object`); return gt$7(e, $e$8(e._zod.def, { get shape() { let n = { ...e._zod.def.shape, ...t }; return Qe$8(this, `shape`, n), n; } })); } function Tt$7(e, t) { return gt$7(e, $e$8(e._zod.def, { get shape() { let n = { ...e._zod.def.shape, ...t._zod.def.shape }; return Qe$8(this, `shape`, n), n; }, get catchall() { return t._zod.def.catchall; }, checks: [] })); } function Et$7(e, t, n) { let r = t._zod.def.checks; if (r && r.length > 0) throw Error(`.partial() cannot be used on object schemas containing refinements`); return gt$7(t, $e$8(t._zod.def, { get shape() { let r = t._zod.def.shape, i = { ...r }; if (n) for (let t in n) { if (!(t in r)) throw Error(`Unrecognized key: "${t}"`); n[t] && (i[t] = e ? new e({ type: `optional`, innerType: r[t] }) : r[t]); } else for (let t in r) i[t] = e ? new e({ type: `optional`, innerType: r[t] }) : r[t]; return Qe$8(this, `shape`, i), i; }, checks: [] })); } function Dt$7(e, t, n) { return gt$7(t, $e$8(t._zod.def, { get shape() { let r = t._zod.def.shape, i = { ...r }; if (n) for (let t in n) { if (!(t in i)) throw Error(`Unrecognized key: "${t}"`); n[t] && (i[t] = new e({ type: `nonoptional`, innerType: r[t] })); } else for (let t in r) i[t] = new e({ type: `nonoptional`, innerType: r[t] }); return Qe$8(this, `shape`, i), i; } })); } function Ot$7(e, t = 0) { if (e.aborted === !0) return !0; for (let n = t; n < e.issues.length; n++) if (e.issues[n]?.continue !== !0) return !0; return !1; } function kt$7(e, t) { return t.map((t) => { var n; return (n = t).path ?? (n.path = []), t.path.unshift(e), t; }); } function At$7(e) { return typeof e == `string` ? e : e?.message; } function jt$7(e, t, n) { let r = { ...e, path: e.path ?? [] }; return e.message || (r.message = At$7(e.inst?._zod.def?.error?.(e)) ?? At$7(t?.error?.(e)) ?? At$7(n.customError?.(e)) ?? At$7(n.localeError?.(e)) ?? `Invalid input`), delete r.inst, delete r.continue, t?.reportInput || delete r.input, r; } function Mt$7(e) { return e instanceof Set ? `set` : e instanceof Map ? `map` : e instanceof File ? `file` : `unknown`; } function Nt$6(e) { return Array.isArray(e) ? `array` : typeof e == `string` ? `string` : `unknown`; } function D$9(e) { let t = typeof e; switch (t) { case `number`: return Number.isNaN(e) ? `nan` : `number`; case `object`: { if (e === null) return `null`; if (Array.isArray(e)) return `array`; let t = e; if (t && Object.getPrototypeOf(t) !== Object.prototype && `constructor` in t && t.constructor) return t.constructor.name; } } return t; } function Pt$6(...e) { let [t, n, r] = e; return typeof t == `string` ? { message: t, code: `custom`, input: n, inst: r } : { ...t }; } function Ft$6(e) { return Object.entries(e).filter(([e, t]) => Number.isNaN(Number.parseInt(e, 10))).map((e) => e[1]); } function It$5(e) { let t = atob(e), n = new Uint8Array(t.length); for (let e = 0; e < t.length; e++) n[e] = t.charCodeAt(e); return n; } function Lt$6(e) { let t = ``; for (let n = 0; n < e.length; n++) t += String.fromCharCode(e[n]); return btoa(t); } function Rt$5(e) { let t = e.replace(/-/g, `+`).replace(/_/g, `/`); return It$5(t + `=`.repeat((4 - t.length % 4) % 4)); } function zt$6(e) { return Lt$6(e).replace(/\+/g, `-`).replace(/\//g, `_`).replace(/=/g, ``); } function Bt$5(e) { let t = e.replace(/^0x/, ``); if (t.length % 2 != 0) throw Error(`Invalid hex string length`); let n = new Uint8Array(t.length / 2); for (let e = 0; e < t.length; e += 2) n[e / 2] = Number.parseInt(t.slice(e, e + 2), 16); return n; } function Vt$6(e) { return Array.from(e).map((e) => e.toString(16).padStart(2, `0`)).join(``); } var Ht$6 = class { constructor(...e) {} }; const Ut$5 = (e, t) => { e.name = `$ZodError`, Object.defineProperty(e, "_zod", { value: e._zod, enumerable: !1 }), Object.defineProperty(e, "issues", { value: t, enumerable: !1 }), e.message = JSON.stringify(t, Ge$8, 2), Object.defineProperty(e, "toString", { value: () => e.message, enumerable: !1 }); }; const Wt$5 = x$8(`$ZodError`, Ut$5); const O$7 = x$8(`$ZodError`, Ut$5, { Parent: Error }); function Gt$5(e, t = (e) => e.message) { let n = {}, r = []; for (let i of e.issues) i.path.length > 0 ? (n[i.path[0]] = n[i.path[0]] || [], n[i.path[0]].push(t(i))) : r.push(t(i)); return { formErrors: r, fieldErrors: n }; } function Kt$6(e, t = (e) => e.message) { let n = { _errors: [] }, r = (e) => { for (let i of e.issues) if (i.code === `invalid_union` && i.errors.length) i.errors.map((e) => r({ issues: e })); else if (i.code === `invalid_key`) r({ issues: i.issues }); else if (i.code === `invalid_element`) r({ issues: i.issues }); else if (i.path.length === 0) n._errors.push(t(i)); else { let e = n, r = 0; for (; r < i.path.length;) { let n = i.path[r]; r === i.path.length - 1 ? (e[n] = e[n] || { _errors: [] }, e[n]._errors.push(t(i))) : e[n] = e[n] || { _errors: [] }, e = e[n], r++; } } }; return r(e), n; } function qt$6(e, t = (e) => e.message) { let n = { errors: [] }, r = (e, i = []) => { var a, o; for (let s of e.issues) if (s.code === `invalid_union` && s.errors.length) s.errors.map((e) => r({ issues: e }, s.path)); else if (s.code === `invalid_key`) r({ issues: s.issues }, s.path); else if (s.code === `invalid_element`) r({ issues: s.issues }, s.path); else { let e = [...i, ...s.path]; if (e.length === 0) { n.errors.push(t(s)); continue; } let r = n, c = 0; for (; c < e.length;) { let n = e[c], i = c === e.length - 1; typeof n == `string` ? (r.properties ??= {}, (a = r.properties)[n] ?? (a[n] = { errors: [] }), r = r.properties[n]) : (r.items ??= [], (o = r.items)[n] ?? (o[n] = { errors: [] }), r = r.items[n]), i && r.errors.push(t(s)), c++; } } }; return r(e), n; } function Jt$6(e) { let t = [], n = e.map((e) => typeof e == `object` ? e.key : e); for (let e of n) typeof e == `number` ? t.push(`[${e}]`) : typeof e == `symbol` ? t.push(`[${JSON.stringify(String(e))}]`) : /[^\w$]/.test(e) ? t.push(`[${JSON.stringify(e)}]`) : (t.length && t.push(`.`), t.push(e)); return t.join(``); } function Yt$5(e) { let t = [], n = [...e.issues].sort((e, t) => (e.path ?? []).length - (t.path ?? []).length); for (let e of n) t.push(`✖ ${e.message}`), e.path?.length && t.push(` → at ${Jt$6(e.path)}`); return t.join(` `); } const Xt$5 = (e) => (t, n, r, i) => { let a = r ? Object.assign(r, { async: !1 }) : { async: !1 }, o = t._zod.run({ value: n, issues: [] }, a); if (o instanceof Promise) throw new Fe$8(); if (o.issues.length) { let t = new ((i?.Err) ?? e)(o.issues.map((e) => jt$7(e, a, S$9()))); throw ot$7(t, i?.callee), t; } return o.value; }; const Zt$5 = Xt$5(O$7); const Qt$5 = (e) => async (t, n, r, i) => { let a = r ? Object.assign(r, { async: !0 }) : { async: !0 }, o = t._zod.run({ value: n, issues: [] }, a); if (o instanceof Promise && (o = await o), o.issues.length) { let t = new ((i?.Err) ?? e)(o.issues.map((e) => jt$7(e, a, S$9()))); throw ot$7(t, i?.callee), t; } return o.value; }; const $t$5 = Qt$5(O$7); const en$5 = (e) => (t, n, r) => { let i = r ? { ...r, async: !1 } : { async: !1 }, a = t._zod.run({ value: n, issues: [] }, i); if (a instanceof Promise) throw new Fe$8(); return a.issues.length ? { success: !1, error: new (e ?? Wt$5)(a.issues.map((e) => jt$7(e, i, S$9()))) } : { success: !0, data: a.value }; }; const tn$5 = en$5(O$7); const nn$5 = (e) => async (t, n, r) => { let i = r ? Object.assign(r, { async: !0 }) : { async: !0 }, a = t._zod.run({ value: n, issues: [] }, i); return a instanceof Promise && (a = await a), a.issues.length ? { success: !1, error: new e(a.issues.map((e) => jt$7(e, i, S$9()))) } : { success: !0, data: a.value }; }; const rn$5 = nn$5(O$7); const an$5 = (e) => (t, n, r) => { let i = r ? Object.assign(r, { direction: `backward` }) : { direction: `backward` }; return Xt$5(e)(t, n, i); }; const on$5 = an$5(O$7); const sn$5 = (e) => (t, n, r) => Xt$5(e)(t, n, r); const cn$5 = sn$5(O$7); const ln$5 = (e) => async (t, n, r) => { let i = r ? Object.assign(r, { direction: `backward` }) : { direction: `backward` }; return Qt$5(e)(t, n, i); }; const un$5 = ln$5(O$7); const dn$5 = (e) => async (t, n, r) => Qt$5(e)(t, n, r); const fn$5 = dn$5(O$7); const pn$5 = (e) => (t, n, r) => { let i = r ? Object.assign(r, { direction: `backward` }) : { direction: `backward` }; return en$5(e)(t, n, i); }; const mn$5 = pn$5(O$7); const hn$5 = (e) => (t, n, r) => en$5(e)(t, n, r); const gn$5 = hn$5(O$7); const _n$5 = (e) => async (t, n, r) => { let i = r ? Object.assign(r, { direction: `backward` }) : { direction: `backward` }; return nn$5(e)(t, n, i); }; const vn$5 = _n$5(O$7); const yn$5 = (e) => async (t, n, r) => nn$5(e)(t, n, r); const bn$5 = yn$5(O$7); var xn$4 = l$11({ base64: () => qn$3, base64url: () => Jn$3, bigint: () => ir$3, boolean: () => sr$3, browserEmail: () => Bn$3, cidrv4: () => Gn$3, cidrv6: () => Kn$3, cuid: () => Sn$4, cuid2: () => Cn$4, date: () => $n$3, datetime: () => nr$3, domain: () => Xn$4, duration: () => On$4, e164: () => Zn$3, email: () => Fn$3, emoji: () => Vn$3, extendedDuration: () => kn$4, guid: () => An$4, hex: () => fr$3, hostname: () => Yn$3, html5Email: () => In$3, idnEmail: () => zn$3, integer: () => ar$3, ipv4: () => Hn$3, ipv6: () => Un$3, ksuid: () => En$4, lowercase: () => ur$4, mac: () => Wn$3, md5_base64: () => gr$3, md5_base64url: () => _r$4, md5_hex: () => hr$3, nanoid: () => Dn$4, null: () => cr$3, number: () => or$3, rfc5322Email: () => Ln$3, sha1_base64: () => yr$4, sha1_base64url: () => br$4, sha1_hex: () => vr$4, sha256_base64: () => Sr$4, sha256_base64url: () => Cr$4, sha256_hex: () => xr$4, sha384_base64: () => Tr$4, sha384_base64url: () => Er$4, sha384_hex: () => wr$4, sha512_base64: () => Or$4, sha512_base64url: () => kr$4, sha512_hex: () => Dr$4, string: () => rr$3, time: () => tr$3, ulid: () => wn$4, undefined: () => lr$4, unicodeEmail: () => Rn$3, uppercase: () => dr$4, uuid: () => jn$4, uuid4: () => Mn$4, uuid6: () => Nn$4, uuid7: () => Pn$4, xid: () => Tn$4 }); const Sn$4 = /^[cC][^\s-]{8,}$/; const Cn$4 = /^[0-9a-z]+$/; const wn$4 = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/; const Tn$4 = /^[0-9a-vA-V]{20}$/; const En$4 = /^[A-Za-z0-9]{27}$/; const Dn$4 = /^[a-zA-Z0-9_-]{21}$/; const On$4 = /^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/; const kn$4 = /^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/; const An$4 = /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/; const jn$4 = (e) => e ? RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`) : /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/; const Mn$4 = jn$4(4); const Nn$4 = jn$4(6); const Pn$4 = jn$4(7); const Fn$3 = /^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/; const In$3 = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/; const Ln$3 = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/; const Rn$3 = /^[^\s@"]{1,64}@[^\s@]{1,255}$/u; const zn$3 = Rn$3; const Bn$3 = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/; function Vn$3() { return RegExp(`^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`, `u`); } const Hn$3 = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/; const Un$3 = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/; const Wn$3 = (e) => { let t = ht$7(e ?? `:`); return RegExp(`^(?:[0-9A-F]{2}${t}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${t}){5}[0-9a-f]{2}$`); }; const Gn$3 = /^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/; const Kn$3 = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/; const qn$3 = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/; const Jn$3 = /^[A-Za-z0-9_-]*$/; const Yn$3 = /^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/; const Xn$4 = /^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/; const Zn$3 = /^\+[1-9]\d{6,14}$/; const Qn$3 = `(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`; const $n$3 = RegExp(`^${Qn$3}$`); function er$3(e) { let t = `(?:[01]\\d|2[0-3]):[0-5]\\d`; return typeof e.precision == `number` ? e.precision === -1 ? `${t}` : e.precision === 0 ? `${t}:[0-5]\\d` : `${t}:[0-5]\\d\\.\\d{${e.precision}}` : `${t}(?::[0-5]\\d(?:\\.\\d+)?)?`; } function tr$3(e) { return RegExp(`^${er$3(e)}$`); } function nr$3(e) { let t = er$3({ precision: e.precision }), n = [`Z`]; e.local && n.push(``), e.offset && n.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`); let r = `${t}(?:${n.join(`|`)})`; return RegExp(`^${Qn$3}T(?:${r})$`); } const rr$3 = (e) => { let t = e ? `[\\s\\S]{${e?.minimum ?? 0},${e?.maximum ?? ``}}` : `[\\s\\S]*`; return RegExp(`^${t}$`); }; const ir$3 = /^-?\d+n?$/; const ar$3 = /^-?\d+$/; const or$3 = /^-?\d+(?:\.\d+)?$/; const sr$3 = /^(?:true|false)$/i; const cr$3 = /^null$/i; const lr$4 = /^undefined$/i; const ur$4 = /^[^A-Z]*$/; const dr$4 = /^[^a-z]*$/; const fr$3 = /^[0-9a-fA-F]*$/; function pr$4(e, t) { return RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`); } function mr$3(e) { return RegExp(`^[A-Za-z0-9_-]{${e}}$`); } const hr$3 = /^[0-9a-fA-F]{32}$/; const gr$3 = pr$4(22, `==`); const _r$4 = mr$3(22); const vr$4 = /^[0-9a-fA-F]{40}$/; const yr$4 = pr$4(27, `=`); const br$4 = mr$3(27); const xr$4 = /^[0-9a-fA-F]{64}$/; const Sr$4 = pr$4(43, `=`); const Cr$4 = mr$3(43); const wr$4 = /^[0-9a-fA-F]{96}$/; const Tr$4 = pr$4(64, ``); const Er$4 = mr$3(64); const Dr$4 = /^[0-9a-fA-F]{128}$/; const Or$4 = pr$4(86, `==`); const kr$4 = mr$3(86); const k$9 = x$8(`$ZodCheck`, (e, t) => { var n; e._zod ??= {}, e._zod.def = t, (n = e._zod).onattach ?? (n.onattach = []); }); const Ar$4 = { number: `number`, bigint: `bigint`, object: `date` }; const jr$4 = x$8(`$ZodCheckLessThan`, (e, t) => { k$9.init(e, t); let n = Ar$4[typeof t.value]; e._zod.onattach.push((e) => { let n = e._zod.bag, r = (t.inclusive ? n.maximum : n.exclusiveMaximum) ?? Infinity; t.value < r && (t.inclusive ? n.maximum = t.value : n.exclusiveMaximum = t.value); }), e._zod.check = (r) => { (t.inclusive ? r.value <= t.value : r.value < t.value) || r.issues.push({ origin: n, code: `too_big`, maximum: typeof t.value == `object` ? t.value.getTime() : t.value, input: r.value, inclusive: t.inclusive, inst: e, continue: !t.abort }); }; }); const Mr$4 = x$8(`$ZodCheckGreaterThan`, (e, t) => { k$9.init(e, t); let n = Ar$4[typeof t.value]; e._zod.onattach.push((e) => { let n = e._zod.bag, r = (t.inclusive ? n.minimum : n.exclusiveMinimum) ?? -Infinity; t.value > r && (t.inclusive ? n.minimum = t.value : n.exclusiveMinimum = t.value); }), e._zod.check = (r) => { (t.inclusive ? r.value >= t.value : r.value > t.value) || r.issues.push({ origin: n, code: `too_small`, minimum: typeof t.value == `object` ? t.value.getTime() : t.value, input: r.value, inclusive: t.inclusive, inst: e, continue: !t.abort }); }; }); const Nr$4 = x$8(`$ZodCheckMultipleOf`, (e, t) => { k$9.init(e, t), e._zod.onattach.push((e) => { var n; (n = e._zod.bag).multipleOf ?? (n.multipleOf = t.value); }), e._zod.check = (n) => { if (typeof n.value != typeof t.value) throw Error(`Cannot mix number and bigint in multiple_of check.`); (typeof n.value == `bigint` ? n.value % t.value === BigInt(0) : Ye$8(n.value, t.value) === 0) || n.issues.push({ origin: typeof n.value, code: `not_multiple_of`, divisor: t.value, input: n.value, inst: e, continue: !t.abort }); }; }); const Pr$4 = x$8(`$ZodCheckNumberFormat`, (e, t) => { k$9.init(e, t), t.format = t.format || `float64`; let n = t.format?.includes(`int`), r = n ? `int` : `number`, [i, a] = yt$7[t.format]; e._zod.onattach.push((e) => { let r = e._zod.bag; r.format = t.format, r.minimum = i, r.maximum = a, n && (r.pattern = ar$3); }), e._zod.check = (o) => { let s = o.value; if (n) { if (!Number.isInteger(s)) { o.issues.push({ expected: r, format: t.format, code: `invalid_type`, continue: !1, input: s, inst: e }); return; } if (!Number.isSafeInteger(s)) { s > 0 ? o.issues.push({ input: s, code: `too_big`, maximum: 2 ** 53 - 1, note: `Integers must be within the safe integer range.`, inst: e, origin: r, inclusive: !0, continue: !t.abort }) : o.issues.push({ input: s, code: `too_small`, minimum: -(2 ** 53 - 1), note: `Integers must be within the safe integer range.`, inst: e, origin: r, inclusive: !0, continue: !t.abort }); return; } } s < i && o.issues.push({ origin: `number`, input: s, code: `too_small`, minimum: i, inclusive: !0, inst: e, continue: !t.abort }), s > a && o.issues.push({ origin: `number`, input: s, code: `too_big`, maximum: a, inclusive: !0, inst: e, continue: !t.abort }); }; }); const Fr$4 = x$8(`$ZodCheckBigIntFormat`, (e, t) => { k$9.init(e, t); let [n, r] = bt$7[t.format]; e._zod.onattach.push((e) => { let i = e._zod.bag; i.format = t.format, i.minimum = n, i.maximum = r; }), e._zod.check = (i) => { let a = i.value; a < n && i.issues.push({ origin: `bigint`, input: a, code: `too_small`, minimum: n, inclusive: !0, inst: e, continue: !t.abort }), a > r && i.issues.push({ origin: `bigint`, input: a, code: `too_big`, maximum: r, inclusive: !0, inst: e, continue: !t.abort }); }; }); const Ir$4 = x$8(`$ZodCheckMaxSize`, (e, t) => { var n; k$9.init(e, t), (n = e._zod.def).when ?? (n.when = (e) => { let t = e.value; return !qe$8(t) && t.size !== void 0; }), e._zod.onattach.push((e) => { let n = e._zod.bag.maximum ?? Infinity; t.maximum < n && (e._zod.bag.maximum = t.maximum); }), e._zod.check = (n) => { let r = n.value; r.size <= t.maximum || n.issues.push({ origin: Mt$7(r), code: `too_big`, maximum: t.maximum, inclusive: !0, input: r, inst: e, continue: !t.abort }); }; }); const Lr$4 = x$8(`$ZodCheckMinSize`, (e, t) => { var n; k$9.init(e, t), (n = e._zod.def).when ?? (n.when = (e) => { let t = e.value; return !qe$8(t) && t.size !== void 0; }), e._zod.onattach.push((e) => { let n = e._zod.bag.minimum ?? -Infinity; t.minimum > n && (e._zod.bag.minimum = t.minimum); }), e._zod.check = (n) => { let r = n.value; r.size >= t.minimum || n.issues.push({ origin: Mt$7(r), code: `too_small`, minimum: t.minimum, inclusive: !0, input: r, inst: e, continue: !t.abort }); }; }); const Rr$4 = x$8(`$ZodCheckSizeEquals`, (e, t) => { var n; k$9.init(e, t), (n = e._zod.def).when ?? (n.when = (e) => { let t = e.value; return !qe$8(t) && t.size !== void 0; }), e._zod.onattach.push((e) => { let n = e._zod.bag; n.minimum = t.size, n.maximum = t.size, n.size = t.size; }), e._zod.check = (n) => { let r = n.value, i = r.size; if (i === t.size) return; let a = i > t.size; n.issues.push({ origin: Mt$7(r), ...a ? { code: `too_big`, maximum: t.size } : { code: `too_small`, minimum: t.size }, inclusive: !0, exact: !0, input: n.value, inst: e, continue: !t.abort }); }; }); const zr$4 = x$8(`$ZodCheckMaxLength`, (e, t) => { var n; k$9.init(e, t), (n = e._zod.def).when ?? (n.when = (e) => { let t = e.value; return !qe$8(t) && t.length !== void 0; }), e._zod.onattach.push((e) => { let n = e._zod.bag.maximum ?? Infinity; t.maximum < n && (e._zod.bag.maximum = t.maximum); }), e._zod.check = (n) => { let r = n.value; if (r.length <= t.maximum) return; let i = Nt$6(r); n.issues.push({ origin: i, code: `too_big`, maximum: t.maximum, inclusive: !0, input: r, inst: e, continue: !t.abort }); }; }); const Br$4 = x$8(`$ZodCheckMinLength`, (e, t) => { var n; k$9.init(e, t), (n = e._zod.def).when ?? (n.when = (e) => { let t = e.value; return !qe$8(t) && t.length !== void 0; }), e._zod.onattach.push((e) => { let n = e._zod.bag.minimum ?? -Infinity; t.minimum > n && (e._zod.bag.minimum = t.minimum); }), e._zod.check = (n) => { let r = n.value; if (r.length >= t.minimum) return; let i = Nt$6(r); n.issues.push({ origin: i, code: `too_small`, minimum: t.minimum, inclusive: !0, input: r, inst: e, continue: !t.abort }); }; }); const Vr$4 = x$8(`$ZodCheckLengthEquals`, (e, t) => { var n; k$9.init(e, t), (n = e._zod.def).when ?? (n.when = (e) => { let t = e.value; return !qe$8(t) && t.length !== void 0; }), e._zod.onattach.push((e) => { let n = e._zod.bag; n.minimum = t.length, n.maximum = t.length, n.length = t.length; }), e._zod.check = (n) => { let r = n.value, i = r.length; if (i === t.length) return; let a = Nt$6(r), o = i > t.length; n.issues.push({ origin: a, ...o ? { code: `too_big`, maximum: t.length } : { code: `too_small`, minimum: t.length }, inclusive: !0, exact: !0, input: n.value, inst: e, continue: !t.abort }); }; }); const Hr$4 = x$8(`$ZodCheckStringFormat`, (e, t) => { var n, r; k$9.init(e, t), e._zod.onattach.push((e) => { let n = e._zod.bag; n.format = t.format, t.pattern && (n.patterns ??= /* @__PURE__ */ new Set(), n.patterns.add(t.pattern)); }), t.pattern ? (n = e._zod).check ?? (n.check = (n) => { t.pattern.lastIndex = 0, !t.pattern.test(n.value) && n.issues.push({ origin: `string`, code: `invalid_format`, format: t.format, input: n.value, ...t.pattern ? { pattern: t.pattern.toString() } : {}, inst: e, continue: !t.abort }); }) : (r = e._zod).check ?? (r.check = () => {}); }); const Ur$4 = x$8(`$ZodCheckRegex`, (e, t) => { Hr$4.init(e, t), e._zod.check = (n) => { t.pattern.lastIndex = 0, !t.pattern.test(n.value) && n.issues.push({ origin: `string`, code: `invalid_format`, format: `regex`, input: n.value, pattern: t.pattern.toString(), inst: e, continue: !t.abort }); }; }); const Wr$4 = x$8(`$ZodCheckLowerCase`, (e, t) => { t.pattern ??= ur$4, Hr$4.init(e, t); }); const Gr$4 = x$8(`$ZodCheckUpperCase`, (e, t) => { t.pattern ??= dr$4, Hr$4.init(e, t); }); const Kr$4 = x$8(`$ZodCheckIncludes`, (e, t) => { k$9.init(e, t); let n = ht$7(t.includes), r = new RegExp(typeof t.position == `number` ? `^.{${t.position}}${n}` : n); t.pattern = r, e._zod.onattach.push((e) => { let t = e._zod.bag; t.patterns ??= /* @__PURE__ */ new Set(), t.patterns.add(r); }), e._zod.check = (n) => { n.value.includes(t.includes, t.position) || n.issues.push({ origin: `string`, code: `invalid_format`, format: `includes`, includes: t.includes, input: n.value, inst: e, continue: !t.abort }); }; }); const qr$4 = x$8(`$ZodCheckStartsWith`, (e, t) => { k$9.init(e, t); let n = RegExp(`^${ht$7(t.prefix)}.*`); t.pattern ??= n, e._zod.onattach.push((e) => { let t = e._zod.bag; t.patterns ??= /* @__PURE__ */ new Set(), t.patterns.add(n); }), e._zod.check = (n) => { n.value.startsWith(t.prefix) || n.issues.push({ origin: `string`, code: `invalid_format`, format: `starts_with`, prefix: t.prefix, input: n.value, inst: e, continue: !t.abort }); }; }); const Jr$4 = x$8(`$ZodCheckEndsWith`, (e, t) => { k$9.init(e, t); let n = RegExp(`.*${ht$7(t.suffix)}$`); t.pattern ??= n, e._zod.onattach.push((e) => { let t = e._zod.bag; t.patterns ??= /* @__PURE__ */ new Set(), t.patterns.add(n); }), e._zod.check = (n) => { n.value.endsWith(t.suffix) || n.issues.push({ origin: `string`, code: `invalid_format`, format: `ends_with`, suffix: t.suffix, input: n.value, inst: e, continue: !t.abort }); }; }); function Yr$4(e, t, n) { e.issues.length && t.issues.push(...kt$7(n, e.issues)); } const Xr$4 = x$8(`$ZodCheckProperty`, (e, t) => { k$9.init(e, t), e._zod.check = (e) => { let n = t.schema._zod.run({ value: e.value[t.property], issues: [] }, {}); if (n instanceof Promise) return n.then((n) => Yr$4(n, e, t.property)); Yr$4(n, e, t.property); }; }); const Zr$4 = x$8(`$ZodCheckMimeType`, (e, t) => { k$9.init(e, t); let n = new Set(t.mime); e._zod.onattach.push((e) => { e._zod.bag.mime = t.mime; }), e._zod.check = (r) => { n.has(r.value.type) || r.issues.push({ code: `invalid_value`, values: t.mime, input: r.value.type, inst: e, continue: !t.abort }); }; }); const Qr$4 = x$8(`$ZodCheckOverwrite`, (e, t) => { k$9.init(e, t), e._zod.check = (e) => { e.value = t.tx(e.value); }; }); var $r$4 = class { constructor(e = []) { this.content = [], this.indent = 0, this && (this.args = e); } indented(e) { this.indent += 1, e(this), --this.indent; } write(e) { if (typeof e == `function`) { e(this, { execution: `sync` }), e(this, { execution: `async` }); return; } let t = e.split(` `).filter((e) => e), n = Math.min(...t.map((e) => e.length - e.trimStart().length)), r = t.map((e) => e.slice(n)).map((e) => ` `.repeat(this.indent * 2) + e); for (let e of r) this.content.push(e); } compile() { let e = Function, t = this?.args, n = [...(this?.content ?? [``]).map((e) => ` ${e}`)]; return new e(...t, n.join(` `)); } }; const ei$4 = { major: 4, minor: 3, patch: 6 }; const A$8 = x$8(`$ZodType`, (e, t) => { var n; e ??= {}, e._zod.def = t, e._zod.bag = e._zod.bag || {}, e._zod.version = ei$4; let r = [...e._zod.def.checks ?? []]; e._zod.traits.has(`$ZodCheck`) && r.unshift(e); for (let t of r) for (let n of t._zod.onattach) n(e); if (r.length === 0) (n = e._zod).deferred ?? (n.deferred = []), e._zod.deferred?.push(() => { e._zod.run = e._zod.parse; }); else { let t = (e, t, n) => { let r = Ot$7(e), i; for (let a of t) { if (a._zod.def.when) { if (!a._zod.def.when(e)) continue; } else if (r) continue; let t = e.issues.length, o = a._zod.check(e); if (o instanceof Promise && n?.async === !1) throw new Fe$8(); if (i || o instanceof Promise) i = (i ?? Promise.resolve()).then(async () => { await o, e.issues.length !== t && (r ||= Ot$7(e, t)); }); else { if (e.issues.length === t) continue; r ||= Ot$7(e, t); } } return i ? i.then(() => e) : e; }, n = (n, i, a) => { if (Ot$7(n)) return n.aborted = !0, n; let o = t(i, r, a); if (o instanceof Promise) { if (a.async === !1) throw new Fe$8(); return o.then((t) => e._zod.parse(t, a)); } return e._zod.parse(o, a); }; e._zod.run = (i, a) => { if (a.skipChecks) return e._zod.parse(i, a); if (a.direction === `backward`) { let t = e._zod.parse({ value: i.value, issues: [] }, { ...a, skipChecks: !0 }); return t instanceof Promise ? t.then((e) => n(e, i, a)) : n(t, i, a); } let o = e._zod.parse(i, a); if (o instanceof Promise) { if (a.async === !1) throw new Fe$8(); return o.then((e) => t(e, r, a)); } return t(o, r, a); }; } w$10(e, `~standard`, () => ({ validate: (t) => { try { let n = tn$5(e, t); return n.success ? { value: n.data } : { issues: n.error?.issues }; } catch { return rn$5(e, t).then((e) => e.success ? { value: e.data } : { issues: e.error?.issues }); } }, vendor: `zod`, version: 1 })); }); const ti$4 = x$8(`$ZodString`, (e, t) => { A$8.init(e, t), e._zod.pattern = [...e?._zod.bag?.patterns ?? []].pop() ?? rr$3(e._zod.bag), e._zod.parse = (n, r) => { if (t.coerce) try { n.value = String(n.value); } catch {} return typeof n.value == `string` || n.issues.push({ expected: `string`, code: `invalid_type`, input: n.value, inst: e }), n; }; }); const j$7 = x$8(`$ZodStringFormat`, (e, t) => { Hr$4.init(e, t), ti$4.init(e, t); }); const ni$4 = x$8(`$ZodGUID`, (e, t) => { t.pattern ??= An$4, j$7.init(e, t); }); const ri$4 = x$8(`$ZodUUID`, (e, t) => { if (t.version) { let e = { v1: 1, v2: 2, v3: 3, v4: 4, v5: 5, v6: 6, v7: 7, v8: 8 }[t.version]; if (e === void 0) throw Error(`Invalid UUID version: "${t.version}"`); t.pattern ??= jn$4(e); } else t.pattern ??= jn$4(); j$7.init(e, t); }); const ii$4 = x$8(`$ZodEmail`, (e, t) => { t.pattern ??= Fn$3, j$7.init(e, t); }); const ai$4 = x$8(`$ZodURL`, (e, t) => { j$7.init(e, t), e._zod.check = (n) => { try { let r = n.value.trim(), i = new URL(r); t.hostname && (t.hostname.lastIndex = 0, t.hostname.test(i.hostname) || n.issues.push({ code: `invalid_format`, format: `url`, note: `Invalid hostname`, pattern: t.hostname.source, input: n.value, inst: e, continue: !t.abort })), t.protocol && (t.protocol.lastIndex = 0, t.protocol.test(i.protocol.endsWith(`:`) ? i.protocol.slice(0, -1) : i.protocol) || n.issues.push({ code: `invalid_format`, format: `url`, note: `Invalid protocol`, pattern: t.protocol.source, input: n.value, inst: e, continue: !t.abort })), t.normalize ? n.value = i.href : n.value = r; return; } catch { n.issues.push({ code: `invalid_format`, format: `url`, input: n.value, inst: e, continue: !t.abort }); } }; }); const oi$4 = x$8(`$ZodEmoji`, (e, t) => { t.pattern ??= Vn$3(), j$7.init(e, t); }); const si$4 = x$8(`$ZodNanoID`, (e, t) => { t.pattern ??= Dn$4, j$7.init(e, t); }); const ci$4 = x$8(`$ZodCUID`, (e, t) => { t.pattern ??= Sn$4, j$7.init(e, t); }); const li$4 = x$8(`$ZodCUID2`, (e, t) => { t.pattern ??= Cn$4, j$7.init(e, t); }); const ui$4 = x$8(`$ZodULID`, (e, t) => { t.pattern ??= wn$4, j$7.init(e, t); }); const di$4 = x$8(`$ZodXID`, (e, t) => { t.pattern ??= Tn$4, j$7.init(e, t); }); const fi$4 = x$8(`$ZodKSUID`, (e, t) => { t.pattern ??= En$4, j$7.init(e, t); }); const pi$4 = x$8(`$ZodISODateTime`, (e, t) => { t.pattern ??= nr$3(t), j$7.init(e, t); }); const mi$4 = x$8(`$ZodISODate`, (e, t) => { t.pattern ??= $n$3, j$7.init(e, t); }); const hi$4 = x$8(`$ZodISOTime`, (e, t) => { t.pattern ??= tr$3(t), j$7.init(e, t); }); const gi$4 = x$8(`$ZodISODuration`, (e, t) => { t.pattern ??= On$4, j$7.init(e, t); }); const _i$4 = x$8(`$ZodIPv4`, (e, t) => { t.pattern ??= Hn$3, j$7.init(e, t), e._zod.bag.format = `ipv4`; }); const vi$4 = x$8(`$ZodIPv6`, (e, t) => { t.pattern ??= Un$3, j$7.init(e, t), e._zod.bag.format = `ipv6`, e._zod.check = (n) => { try { new URL(`http://[${n.value}]`); } catch { n.issues.push({ code: `invalid_format`, format: `ipv6`, input: n.value, inst: e, continue: !t.abort }); } }; }); const yi$4 = x$8(`$ZodMAC`, (e, t) => { t.pattern ??= Wn$3(t.delimiter), j$7.init(e, t), e._zod.bag.format = `mac`; }); const bi$4 = x$8(`$ZodCIDRv4`, (e, t) => { t.pattern ??= Gn$3, j$7.init(e, t); }); const xi$4 = x$8(`$ZodCIDRv6`, (e, t) => { t.pattern ??= Kn$3, j$7.init(e, t), e._zod.check = (n) => { let r = n.value.split(`/`); try { if (r.length !== 2) throw Error(); let [e, t] = r; if (!t) throw Error(); let n = Number(t); if (`${n}` !== t || n < 0 || n > 128) throw Error(); new URL(`http://[${e}]`); } catch { n.issues.push({ code: `invalid_format`, format: `cidrv6`, input: n.value, inst: e, continue: !t.abort }); } }; }); function Si$4(e) { if (e === ``) return !0; if (e.length % 4 != 0) return !1; try { return atob(e), !0; } catch { return !1; } } const Ci$4 = x$8(`$ZodBase64`, (e, t) => { t.pattern ??= qn$3, j$7.init(e, t), e._zod.bag.contentEncoding = `base64`, e._zod.check = (n) => { Si$4(n.value) || n.issues.push({ code: `invalid_format`, format: `base64`, input: n.value, inst: e, continue: !t.abort }); }; }); function wi$4(e) { if (!Jn$3.test(e)) return !1; let t = e.replace(/[-_]/g, (e) => e === `-` ? `+` : `/`); return Si$4(t.padEnd(Math.ceil(t.length / 4) * 4, `=`)); } const Ti$4 = x$8(`$ZodBase64URL`, (e, t) => { t.pattern ??= Jn$3, j$7.init(e, t), e._zod.bag.contentEncoding = `base64url`, e._zod.check = (n) => { wi$4(n.value) || n.issues.push({ code: `invalid_format`, format: `base64url`, input: n.value, inst: e, continue: !t.abort }); }; }); const Ei$4 = x$8(`$ZodE164`, (e, t) => { t.pattern ??= Zn$3, j$7.init(e, t); }); function Di$4(e, t = null) { try { let n = e.split(`.`); if (n.length !== 3) return !1; let [r] = n; if (!r) return !1; let i = JSON.parse(atob(r)); return !(`typ` in i && i?.typ !== `JWT` || !i.alg || t && (!(`alg` in i) || i.alg !== t)); } catch { return !1; } } const Oi$4 = x$8(`$ZodJWT`, (e, t) => { j$7.init(e, t), e._zod.check = (n) => { Di$4(n.value, t.alg) || n.issues.push({ code: `invalid_format`, format: `jwt`, input: n.value, inst: e, continue: !t.abort }); }; }); const ki$4 = x$8(`$ZodCustomStringFormat`, (e, t) => { j$7.init(e, t), e._zod.check = (n) => { t.fn(n.value) || n.issues.push({ code: `invalid_format`, format: t.format, input: n.value, inst: e, continue: !t.abort }); }; }); const Ai$4 = x$8(`$ZodNumber`, (e, t) => { A$8.init(e, t), e._zod.pattern = e._zod.bag.pattern ?? or$3, e._zod.parse = (n, r) => { if (t.coerce) try { n.value = Number(n.value); } catch {} let i = n.value; if (typeof i == `number` && !Number.isNaN(i) && Number.isFinite(i)) return n; let a = typeof i == `number` ? Number.isNaN(i) ? `NaN` : Number.isFinite(i) ? void 0 : `Infinity` : void 0; return n.issues.push({ expected: `number`, code: `invalid_type`, input: i, inst: e, ...a ? { received: a } : {} }), n; }; }); const ji$4 = x$8(`$ZodNumberFormat`, (e, t) => { Pr$4.init(e, t), Ai$4.init(e, t); }); const Mi$4 = x$8(`$ZodBoolean`, (e, t) => { A$8.init(e, t), e._zod.pattern = sr$3, e._zod.parse = (n, r) => { if (t.coerce) try { n.value = !!n.value; } catch {} let i = n.value; return typeof i == `boolean` || n.issues.push({ expected: `boolean`, code: `invalid_type`, input: i, inst: e }), n; }; }); const Ni$4 = x$8(`$ZodBigInt`, (e, t) => { A$8.init(e, t), e._zod.pattern = ir$3, e._zod.parse = (n, r) => { if (t.coerce) try { n.value = BigInt(n.value); } catch {} return typeof n.value == `bigint` || n.issues.push({ expected: `bigint`, code: `invalid_type`, input: n.value, inst: e }), n; }; }); const Pi$4 = x$8(`$ZodBigIntFormat`, (e, t) => { Fr$4.init(e, t), Ni$4.init(e, t); }); const Fi$4 = x$8(`$ZodSymbol`, (e, t) => { A$8.init(e, t), e._zod.parse = (t, n) => { let r = t.value; return typeof r == `symbol` || t.issues.push({ expected: `symbol`, code: `invalid_type`, input: r, inst: e }), t; }; }); const Ii$4 = x$8(`$ZodUndefined`, (e, t) => { A$8.init(e, t), e._zod.pattern = lr$4, e._zod.values = /* @__PURE__ */ new Set([void 0]), e._zod.optin = `optional`, e._zod.optout = `optional`, e._zod.parse = (t, n) => { let r = t.value; return r === void 0 || t.issues.push({ expected: `undefined`, code: `invalid_type`, input: r, inst: e }), t; }; }); const Li$4 = x$8(`$ZodNull`, (e, t) => { A$8.init(e, t), e._zod.pattern = cr$3, e._zod.values = /* @__PURE__ */ new Set([null]), e._zod.parse = (t, n) => { let r = t.value; return r === null || t.issues.push({ expected: `null`, code: `invalid_type`, input: r, inst: e }), t; }; }); const Ri$4 = x$8(`$ZodAny`, (e, t) => { A$8.init(e, t), e._zod.parse = (e) => e; }); const zi$4 = x$8(`$ZodUnknown`, (e, t) => { A$8.init(e, t), e._zod.parse = (e) => e; }); const Bi$4 = x$8(`$ZodNever`, (e, t) => { A$8.init(e, t), e._zod.parse = (t, n) => (t.issues.push({ expected: `never`, code: `invalid_type`, input: t.value, inst: e }), t); }); const Vi$4 = x$8(`$ZodVoid`, (e, t) => { A$8.init(e, t), e._zod.parse = (t, n) => { let r = t.value; return r === void 0 || t.issues.push({ expected: `void`, code: `invalid_type`, input: r, inst: e }), t; }; }); const Hi$4 = x$8(`$ZodDate`, (e, t) => { A$8.init(e, t), e._zod.parse = (n, r) => { if (t.coerce) try { n.value = new Date(n.value); } catch {} let i = n.value, a = i instanceof Date; return a && !Number.isNaN(i.getTime()) || n.issues.push({ expected: `date`, code: `invalid_type`, input: i, ...a ? { received: `Invalid Date` } : {}, inst: e }), n; }; }); function Ui$4(e, t, n) { e.issues.length && t.issues.push(...kt$7(n, e.issues)), t.value[n] = e.value; } const Wi$4 = x$8(`$ZodArray`, (e, t) => { A$8.init(e, t), e._zod.parse = (n, r) => { let i = n.value; if (!Array.isArray(i)) return n.issues.push({ expected: `array`, code: `invalid_type`, input: i, inst: e }), n; n.value = Array(i.length); let a = []; for (let e = 0; e < i.length; e++) { let o = i[e], s = t.element._zod.run({ value: o, issues: [] }, r); s instanceof Promise ? a.push(s.then((t) => Ui$4(t, n, e))) : Ui$4(s, n, e); } return a.length ? Promise.all(a).then(() => n) : n; }; }); function Gi$4(e, t, n, r, i) { if (e.issues.length) { if (i && !(n in r)) return; t.issues.push(...kt$7(n, e.issues)); } e.value === void 0 ? n in r && (t.value[n] = void 0) : t.value[n] = e.value; } function Ki$4(e) { let t = Object.keys(e.shape); for (let n of t) if (!e.shape?.[n]?._zod?.traits?.has(`$ZodType`)) throw Error(`Invalid element at key "${n}": expected a Zod schema`); let n = vt$7(e.shape); return { ...e, keys: t, keySet: new Set(t), numKeys: t.length, optionalKeys: new Set(n) }; } function qi$4(e, t, n, r, i, a) { let o = [], s = i.keySet, c = i.catchall._zod, l = c.def.type, u = c.optout === `optional`; for (let i in t) { if (s.has(i)) continue; if (l === `never`) { o.push(i); continue; } let a = c.run({ value: t[i], issues: [] }, r); a instanceof Promise ? e.push(a.then((e) => Gi$4(e, n, i, t, u))) : Gi$4(a, n, i, t, u); } return o.length && n.issues.push({ code: `unrecognized_keys`, keys: o, input: t, inst: a }), e.length ? Promise.all(e).then(() => n) : n; } const Ji$4 = x$8(`$ZodObject`, (e, t) => { if (A$8.init(e, t), !Object.getOwnPropertyDescriptor(t, `shape`)?.get) { let e = t.shape; Object.defineProperty(t, "shape", { get: () => { let n = { ...e }; return Object.defineProperty(t, "shape", { value: n }), n; } }); } let n = Ke$8(() => Ki$4(t)); w$10(e._zod, `propValues`, () => { let e = t.shape, n = {}; for (let t in e) { let r = e[t]._zod; if (r.values) { n[t] ?? (n[t] = /* @__PURE__ */ new Set()); for (let e of r.values) n[t].add(e); } } return n; }); let r = st$7, i = t.catchall, a; e._zod.parse = (t, o) => { a ??= n.value; let s = t.value; if (!r(s)) return t.issues.push({ expected: `object`, code: `invalid_type`, input: s, inst: e }), t; t.value = {}; let c = [], l = a.shape; for (let e of a.keys) { let n = l[e], r = n._zod.optout === `optional`, i = n._zod.run({ value: s[e], issues: [] }, o); i instanceof Promise ? c.push(i.then((n) => Gi$4(n, t, e, s, r))) : Gi$4(i, t, e, s, r); } return i ? qi$4(c, s, t, o, n.value, e) : c.length ? Promise.all(c).then(() => t) : t; }; }); const Yi$4 = x$8(`$ZodObjectJIT`, (e, t) => { Ji$4.init(e, t); let n = e._zod.parse, r = Ke$8(() => Ki$4(t)), i = (e) => { let t = new $r$4([ `shape`, `payload`, `ctx` ]), n = r.value, i = (e) => { let t = it$7(e); return `shape[${t}]._zod.run({ value: input[${t}], issues: [] }, ctx)`; }; t.write(`const input = payload.value;`); let a = Object.create(null), o = 0; for (let e of n.keys) a[e] = `key_${o++}`; t.write(`const newResult = {};`); for (let r of n.keys) { let n = a[r], o = it$7(r), s = e[r]?._zod?.optout === `optional`; t.write(`const ${n} = ${i(r)};`), s ? t.write(` if (${n}.issues.length) { if (${o} in input) { payload.issues = payload.issues.concat(${n}.issues.map(iss => ({ ...iss, path: iss.path ? [${o}, ...iss.path] : [${o}] }))); } } if (${n}.value === undefined) { if (${o} in input) { newResult[${o}] = undefined; } } else { newResult[${o}] = ${n}.value; } `) : t.write(` if (${n}.issues.length) { payload.issues = payload.issues.concat(${n}.issues.map(iss => ({ ...iss, path: iss.path ? [${o}, ...iss.path] : [${o}] }))); } if (${n}.value === undefined) { if (${o} in input) { newResult[${o}] = undefined; } } else { newResult[${o}] = ${n}.value; } `); } t.write(`payload.value = newResult;`), t.write(`return payload;`); let s = t.compile(); return (t, n) => s(e, t, n); }, a, o = st$7, s = !Le$8.jitless, c = s && ct$7.value, l = t.catchall, u; e._zod.parse = (d, f) => { u ??= r.value; let p = d.value; return o(p) ? s && c && f?.async === !1 && f.jitless !== !0 ? (a ||= i(t.shape), d = a(d, f), l ? qi$4([], p, d, f, u, e) : d) : n(d, f) : (d.issues.push({ expected: `object`, code: `invalid_type`, input: p, inst: e }), d); }; }); function Xi$4(e, t, n, r) { for (let n of e) if (n.issues.length === 0) return t.value = n.value, t; let i = e.filter((e) => !Ot$7(e)); return i.length === 1 ? (t.value = i[0].value, i[0]) : (t.issues.push({ code: `invalid_union`, input: t.value, inst: n, errors: e.map((e) => e.issues.map((e) => jt$7(e, r, S$9()))) }), t); } const Zi$4 = x$8(`$ZodUnion`, (e, t) => { A$8.init(e, t), w$10(e._zod, `optin`, () => t.options.some((e) => e._zod.optin === `optional`) ? `optional` : void 0), w$10(e._zod, `optout`, () => t.options.some((e) => e._zod.optout === `optional`) ? `optional` : void 0), w$10(e._zod, `values`, () => { if (t.options.every((e) => e._zod.values)) return new Set(t.options.flatMap((e) => Array.from(e._zod.values))); }), w$10(e._zod, `pattern`, () => { if (t.options.every((e) => e._zod.pattern)) { let e = t.options.map((e) => e._zod.pattern); return RegExp(`^(${e.map((e) => Je$8(e.source)).join(`|`)})$`); } }); let n = t.options.length === 1, r = t.options[0]._zod.run; e._zod.parse = (i, a) => { if (n) return r(i, a); let o = !1, s = []; for (let e of t.options) { let t = e._zod.run({ value: i.value, issues: [] }, a); if (t instanceof Promise) s.push(t), o = !0; else { if (t.issues.length === 0) return t; s.push(t); } } return o ? Promise.all(s).then((t) => Xi$4(t, i, e, a)) : Xi$4(s, i, e, a); }; }); function Qi$4(e, t, n, r) { let i = e.filter((e) => e.issues.length === 0); return i.length === 1 ? (t.value = i[0].value, t) : (i.length === 0 ? t.issues.push({ code: `invalid_union`, input: t.value, inst: n, errors: e.map((e) => e.issues.map((e) => jt$7(e, r, S$9()))) }) : t.issues.push({ code: `invalid_union`, input: t.value, inst: n, errors: [], inclusive: !1 }), t); } const $i$4 = x$8(`$ZodXor`, (e, t) => { Zi$4.init(e, t), t.inclusive = !1; let n = t.options.length === 1, r = t.options[0]._zod.run; e._zod.parse = (i, a) => { if (n) return r(i, a); let o = !1, s = []; for (let e of t.options) { let t = e._zod.run({ value: i.value, issues: [] }, a); t instanceof Promise ? (s.push(t), o = !0) : s.push(t); } return o ? Promise.all(s).then((t) => Qi$4(t, i, e, a)) : Qi$4(s, i, e, a); }; }); const ea$4 = x$8(`$ZodDiscriminatedUnion`, (e, t) => { t.inclusive = !1, Zi$4.init(e, t); let n = e._zod.parse; w$10(e._zod, `propValues`, () => { let e = {}; for (let n of t.options) { let r = n._zod.propValues; if (!r || Object.keys(r).length === 0) throw Error(`Invalid discriminated union option at index "${t.options.indexOf(n)}"`); for (let [t, n] of Object.entries(r)) { e[t] || (e[t] = /* @__PURE__ */ new Set()); for (let r of n) e[t].add(r); } } return e; }); let r = Ke$8(() => { let e = t.options, n = /* @__PURE__ */ new Map(); for (let r of e) { let e = r._zod.propValues?.[t.discriminator]; if (!e || e.size === 0) throw Error(`Invalid discriminated union option at index "${t.options.indexOf(r)}"`); for (let t of e) { if (n.has(t)) throw Error(`Duplicate discriminator value "${String(t)}"`); n.set(t, r); } } return n; }); e._zod.parse = (i, a) => { let o = i.value; if (!st$7(o)) return i.issues.push({ code: `invalid_type`, expected: `object`, input: o, inst: e }), i; let s = r.value.get(o?.[t.discriminator]); return s ? s._zod.run(i, a) : t.unionFallback ? n(i, a) : (i.issues.push({ code: `invalid_union`, errors: [], note: `No matching discriminator`, discriminator: t.discriminator, input: o, path: [t.discriminator], inst: e }), i); }; }); const ta$4 = x$8(`$ZodIntersection`, (e, t) => { A$8.init(e, t), e._zod.parse = (e, n) => { let r = e.value, i = t.left._zod.run({ value: r, issues: [] }, n), a = t.right._zod.run({ value: r, issues: [] }, n); return i instanceof Promise || a instanceof Promise ? Promise.all([i, a]).then(([t, n]) => ra$4(e, t, n)) : ra$4(e, i, a); }; }); function na$4(e, t) { if (e === t || e instanceof Date && t instanceof Date && +e == +t) return { valid: !0, data: e }; if (lt$7(e) && lt$7(t)) { let n = Object.keys(t), r = Object.keys(e).filter((e) => n.indexOf(e) !== -1), i = { ...e, ...t }; for (let n of r) { let r = na$4(e[n], t[n]); if (!r.valid) return { valid: !1, mergeErrorPath: [n, ...r.mergeErrorPath] }; i[n] = r.data; } return { valid: !0, data: i }; } if (Array.isArray(e) && Array.isArray(t)) { if (e.length !== t.length) return { valid: !1, mergeErrorPath: [] }; let n = []; for (let r = 0; r < e.length; r++) { let i = e[r], a = t[r], o = na$4(i, a); if (!o.valid) return { valid: !1, mergeErrorPath: [r, ...o.mergeErrorPath] }; n.push(o.data); } return { valid: !0, data: n }; } return { valid: !1, mergeErrorPath: [] }; } function ra$4(e, t, n) { let r = /* @__PURE__ */ new Map(), i; for (let n of t.issues) if (n.code === `unrecognized_keys`) { i ??= n; for (let e of n.keys) r.has(e) || r.set(e, {}), r.get(e).l = !0; } else e.issues.push(n); for (let t of n.issues) if (t.code === `unrecognized_keys`) for (let e of t.keys) r.has(e) || r.set(e, {}), r.get(e).r = !0; else e.issues.push(t); let a = [...r].filter(([, e]) => e.l && e.r).map(([e]) => e); if (a.length && i && e.issues.push({ ...i, keys: a }), Ot$7(e)) return e; let o = na$4(t.value, n.value); if (!o.valid) throw Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`); return e.value = o.data, e; } const ia$4 = x$8(`$ZodTuple`, (e, t) => { A$8.init(e, t); let n = t.items; e._zod.parse = (r, i) => { let a = r.value; if (!Array.isArray(a)) return r.issues.push({ input: a, inst: e, expected: `tuple`, code: `invalid_type` }), r; r.value = []; let o = [], s = [...n].reverse().findIndex((e) => e._zod.optin !== `optional`), c = s === -1 ? 0 : n.length - s; if (!t.rest) { let t = a.length > n.length, i = a.length < c - 1; if (t || i) return r.issues.push({ ...t ? { code: `too_big`, maximum: n.length, inclusive: !0 } : { code: `too_small`, minimum: n.length }, input: a, inst: e, origin: `array` }), r; } let l = -1; for (let e of n) { if (l++, l >= a.length && l >= c) continue; let t = e._zod.run({ value: a[l], issues: [] }, i); t instanceof Promise ? o.push(t.then((e) => aa$4(e, r, l))) : aa$4(t, r, l); } if (t.rest) { let e = a.slice(n.length); for (let n of e) { l++; let e = t.rest._zod.run({ value: n, issues: [] }, i); e instanceof Promise ? o.push(e.then((e) => aa$4(e, r, l))) : aa$4(e, r, l); } } return o.length ? Promise.all(o).then(() => r) : r; }; }); function aa$4(e, t, n) { e.issues.length && t.issues.push(...kt$7(n, e.issues)), t.value[n] = e.value; } const oa$4 = x$8(`$ZodRecord`, (e, t) => { A$8.init(e, t), e._zod.parse = (n, r) => { let i = n.value; if (!lt$7(i)) return n.issues.push({ expected: `record`, code: `invalid_type`, input: i, inst: e }), n; let a = [], o = t.keyType._zod.values; if (o) { n.value = {}; let s = /* @__PURE__ */ new Set(); for (let e of o) if (typeof e == `string` || typeof e == `number` || typeof e == `symbol`) { s.add(typeof e == `number` ? e.toString() : e); let o = t.valueType._zod.run({ value: i[e], issues: [] }, r); o instanceof Promise ? a.push(o.then((t) => { t.issues.length && n.issues.push(...kt$7(e, t.issues)), n.value[e] = t.value; })) : (o.issues.length && n.issues.push(...kt$7(e, o.issues)), n.value[e] = o.value); } let c; for (let e in i) s.has(e) || (c ??= [], c.push(e)); c && c.length > 0 && n.issues.push({ code: `unrecognized_keys`, input: i, inst: e, keys: c }); } else { n.value = {}; for (let o of Reflect.ownKeys(i)) { if (o === `__proto__`) continue; let s = t.keyType._zod.run({ value: o, issues: [] }, r); if (s instanceof Promise) throw Error(`Async schemas not supported in object keys currently`); if (typeof o == `string` && or$3.test(o) && s.issues.length) { let e = t.keyType._zod.run({ value: Number(o), issues: [] }, r); if (e instanceof Promise) throw Error(`Async schemas not supported in object keys currently`); e.issues.length === 0 && (s = e); } if (s.issues.length) { t.mode === `loose` ? n.value[o] = i[o] : n.issues.push({ code: `invalid_key`, origin: `record`, issues: s.issues.map((e) => jt$7(e, r, S$9())), input: o, path: [o], inst: e }); continue; } let c = t.valueType._zod.run({ value: i[o], issues: [] }, r); c instanceof Promise ? a.push(c.then((e) => { e.issues.length && n.issues.push(...kt$7(o, e.issues)), n.value[s.value] = e.value; })) : (c.issues.length && n.issues.push(...kt$7(o, c.issues)), n.value[s.value] = c.value); } } return a.length ? Promise.all(a).then(() => n) : n; }; }); const sa$4 = x$8(`$ZodMap`, (e, t) => { A$8.init(e, t), e._zod.parse = (n, r) => { let i = n.value; if (!(i instanceof Map)) return n.issues.push({ expected: `map`, code: `invalid_type`, input: i, inst: e }), n; let a = []; n.value = /* @__PURE__ */ new Map(); for (let [o, s] of i) { let c = t.keyType._zod.run({ value: o, issues: [] }, r), l = t.valueType._zod.run({ value: s, issues: [] }, r); c instanceof Promise || l instanceof Promise ? a.push(Promise.all([c, l]).then(([t, a]) => { ca$4(t, a, n, o, i, e, r); })) : ca$4(c, l, n, o, i, e, r); } return a.length ? Promise.all(a).then(() => n) : n; }; }); function ca$4(e, t, n, r, i, a, o) { e.issues.length && (pt$7.has(typeof r) ? n.issues.push(...kt$7(r, e.issues)) : n.issues.push({ code: `invalid_key`, origin: `map`, input: i, inst: a, issues: e.issues.map((e) => jt$7(e, o, S$9())) })), t.issues.length && (pt$7.has(typeof r) ? n.issues.push(...kt$7(r, t.issues)) : n.issues.push({ origin: `map`, code: `invalid_element`, input: i, inst: a, key: r, issues: t.issues.map((e) => jt$7(e, o, S$9())) })), n.value.set(e.value, t.value); } const la$4 = x$8(`$ZodSet`, (e, t) => { A$8.init(e, t), e._zod.parse = (n, r) => { let i = n.value; if (!(i instanceof Set)) return n.issues.push({ input: i, inst: e, expected: `set`, code: `invalid_type` }), n; let a = []; n.value = /* @__PURE__ */ new Set(); for (let e of i) { let i = t.valueType._zod.run({ value: e, issues: [] }, r); i instanceof Promise ? a.push(i.then((e) => ua$4(e, n))) : ua$4(i, n); } return a.length ? Promise.all(a).then(() => n) : n; }; }); function ua$4(e, t) { e.issues.length && t.issues.push(...e.issues), t.value.add(e.value); } const da$4 = x$8(`$ZodEnum`, (e, t) => { A$8.init(e, t); let n = We$8(t.entries), r = new Set(n); e._zod.values = r, e._zod.pattern = RegExp(`^(${n.filter((e) => pt$7.has(typeof e)).map((e) => typeof e == `string` ? ht$7(e) : e.toString()).join(`|`)})$`), e._zod.parse = (t, i) => { let a = t.value; return r.has(a) || t.issues.push({ code: `invalid_value`, values: n, input: a, inst: e }), t; }; }); const fa$4 = x$8(`$ZodLiteral`, (e, t) => { if (A$8.init(e, t), t.values.length === 0) throw Error(`Cannot create literal schema with no valid values`); let n = new Set(t.values); e._zod.values = n, e._zod.pattern = RegExp(`^(${t.values.map((e) => typeof e == `string` ? ht$7(e) : e ? ht$7(e.toString()) : String(e)).join(`|`)})$`), e._zod.parse = (r, i) => { let a = r.value; return n.has(a) || r.issues.push({ code: `invalid_value`, values: t.values, input: a, inst: e }), r; }; }); const pa$4 = x$8(`$ZodFile`, (e, t) => { A$8.init(e, t), e._zod.parse = (t, n) => { let r = t.value; return r instanceof File || t.issues.push({ expected: `file`, code: `invalid_type`, input: r, inst: e }), t; }; }); const ma$4 = x$8(`$ZodTransform`, (e, t) => { A$8.init(e, t), e._zod.parse = (n, r) => { if (r.direction === `backward`) throw new Ie$8(e.constructor.name); let i = t.transform(n.value, n); if (r.async) return (i instanceof Promise ? i : Promise.resolve(i)).then((e) => (n.value = e, n)); if (i instanceof Promise) throw new Fe$8(); return n.value = i, n; }; }); function ha$4(e, t) { return e.issues.length && t === void 0 ? { issues: [], value: void 0 } : e; } const ga$4 = x$8(`$ZodOptional`, (e, t) => { A$8.init(e, t), e._zod.optin = `optional`, e._zod.optout = `optional`, w$10(e._zod, `values`, () => t.innerType._zod.values ? /* @__PURE__ */ new Set([...t.innerType._zod.values, void 0]) : void 0), w$10(e._zod, `pattern`, () => { let e = t.innerType._zod.pattern; return e ? RegExp(`^(${Je$8(e.source)})?$`) : void 0; }), e._zod.parse = (e, n) => { if (t.innerType._zod.optin === `optional`) { let r = t.innerType._zod.run(e, n); return r instanceof Promise ? r.then((t) => ha$4(t, e.value)) : ha$4(r, e.value); } return e.value === void 0 ? e : t.innerType._zod.run(e, n); }; }); const _a$4 = x$8(`$ZodExactOptional`, (e, t) => { ga$4.init(e, t), w$10(e._zod, `values`, () => t.innerType._zod.values), w$10(e._zod, `pattern`, () => t.innerType._zod.pattern), e._zod.parse = (e, n) => t.innerType._zod.run(e, n); }); const va$4 = x$8(`$ZodNullable`, (e, t) => { A$8.init(e, t), w$10(e._zod, `optin`, () => t.innerType._zod.optin), w$10(e._zod, `optout`, () => t.innerType._zod.optout), w$10(e._zod, `pattern`, () => { let e = t.innerType._zod.pattern; return e ? RegExp(`^(${Je$8(e.source)}|null)$`) : void 0; }), w$10(e._zod, `values`, () => t.innerType._zod.values ? /* @__PURE__ */ new Set([...t.innerType._zod.values, null]) : void 0), e._zod.parse = (e, n) => e.value === null ? e : t.innerType._zod.run(e, n); }); const ya$4 = x$8(`$ZodDefault`, (e, t) => { A$8.init(e, t), e._zod.optin = `optional`, w$10(e._zod, `values`, () => t.innerType._zod.values), e._zod.parse = (e, n) => { if (n.direction === `backward`) return t.innerType._zod.run(e, n); if (e.value === void 0) return e.value = t.defaultValue, e; let r = t.innerType._zod.run(e, n); return r instanceof Promise ? r.then((e) => ba$4(e, t)) : ba$4(r, t); }; }); function ba$4(e, t) { return e.value === void 0 && (e.value = t.defaultValue), e; } const xa$4 = x$8(`$ZodPrefault`, (e, t) => { A$8.init(e, t), e._zod.optin = `optional`, w$10(e._zod, `values`, () => t.innerType._zod.values), e._zod.parse = (e, n) => (n.direction === `backward` || e.value === void 0 && (e.value = t.defaultValue), t.innerType._zod.run(e, n)); }); const Sa$4 = x$8(`$ZodNonOptional`, (e, t) => { A$8.init(e, t), w$10(e._zod, `values`, () => { let e = t.innerType._zod.values; return e ? new Set([...e].filter((e) => e !== void 0)) : void 0; }), e._zod.parse = (n, r) => { let i = t.innerType._zod.run(n, r); return i instanceof Promise ? i.then((t) => Ca$4(t, e)) : Ca$4(i, e); }; }); function Ca$4(e, t) { return !e.issues.length && e.value === void 0 && e.issues.push({ code: `invalid_type`, expected: `nonoptional`, input: e.value, inst: t }), e; } const wa$4 = x$8(`$ZodSuccess`, (e, t) => { A$8.init(e, t), e._zod.parse = (e, n) => { if (n.direction === `backward`) throw new Ie$8(`ZodSuccess`); let r = t.innerType._zod.run(e, n); return r instanceof Promise ? r.then((t) => (e.value = t.issues.length === 0, e)) : (e.value = r.issues.length === 0, e); }; }); const Ta$4 = x$8(`$ZodCatch`, (e, t) => { A$8.init(e, t), w$10(e._zod, `optin`, () => t.innerType._zod.optin), w$10(e._zod, `optout`, () => t.innerType._zod.optout), w$10(e._zod, `values`, () => t.innerType._zod.values), e._zod.parse = (e, n) => { if (n.direction === `backward`) return t.innerType._zod.run(e, n); let r = t.innerType._zod.run(e, n); return r instanceof Promise ? r.then((r) => (e.value = r.value, r.issues.length && (e.value = t.catchValue({ ...e, error: { issues: r.issues.map((e) => jt$7(e, n, S$9())) }, input: e.value }), e.issues = []), e)) : (e.value = r.value, r.issues.length && (e.value = t.catchValue({ ...e, error: { issues: r.issues.map((e) => jt$7(e, n, S$9())) }, input: e.value }), e.issues = []), e); }; }); const Ea$4 = x$8(`$ZodNaN`, (e, t) => { A$8.init(e, t), e._zod.parse = (t, n) => ((typeof t.value != `number` || !Number.isNaN(t.value)) && t.issues.push({ input: t.value, inst: e, expected: `nan`, code: `invalid_type` }), t); }); const Da$4 = x$8(`$ZodPipe`, (e, t) => { A$8.init(e, t), w$10(e._zod, `values`, () => t.in._zod.values), w$10(e._zod, `optin`, () => t.in._zod.optin), w$10(e._zod, `optout`, () => t.out._zod.optout), w$10(e._zod, `propValues`, () => t.in._zod.propValues), e._zod.parse = (e, n) => { if (n.direction === `backward`) { let r = t.out._zod.run(e, n); return r instanceof Promise ? r.then((e) => Oa$4(e, t.in, n)) : Oa$4(r, t.in, n); } let r = t.in._zod.run(e, n); return r instanceof Promise ? r.then((e) => Oa$4(e, t.out, n)) : Oa$4(r, t.out, n); }; }); function Oa$4(e, t, n) { return e.issues.length ? (e.aborted = !0, e) : t._zod.run({ value: e.value, issues: e.issues }, n); } const ka$4 = x$8(`$ZodCodec`, (e, t) => { A$8.init(e, t), w$10(e._zod, `values`, () => t.in._zod.values), w$10(e._zod, `optin`, () => t.in._zod.optin), w$10(e._zod, `optout`, () => t.out._zod.optout), w$10(e._zod, `propValues`, () => t.in._zod.propValues), e._zod.parse = (e, n) => { if ((n.direction || `forward`) === `forward`) { let r = t.in._zod.run(e, n); return r instanceof Promise ? r.then((e) => Aa$4(e, t, n)) : Aa$4(r, t, n); } else { let r = t.out._zod.run(e, n); return r instanceof Promise ? r.then((e) => Aa$4(e, t, n)) : Aa$4(r, t, n); } }; }); function Aa$4(e, t, n) { if (e.issues.length) return e.aborted = !0, e; if ((n.direction || `forward`) === `forward`) { let r = t.transform(e.value, e); return r instanceof Promise ? r.then((r) => ja$4(e, r, t.out, n)) : ja$4(e, r, t.out, n); } else { let r = t.reverseTransform(e.value, e); return r instanceof Promise ? r.then((r) => ja$4(e, r, t.in, n)) : ja$4(e, r, t.in, n); } } function ja$4(e, t, n, r) { return e.issues.length ? (e.aborted = !0, e) : n._zod.run({ value: t, issues: e.issues }, r); } const Ma$4 = x$8(`$ZodReadonly`, (e, t) => { A$8.init(e, t), w$10(e._zod, `propValues`, () => t.innerType._zod.propValues), w$10(e._zod, `values`, () => t.innerType._zod.values), w$10(e._zod, `optin`, () => t.innerType?._zod?.optin), w$10(e._zod, `optout`, () => t.innerType?._zod?.optout), e._zod.parse = (e, n) => { if (n.direction === `backward`) return t.innerType._zod.run(e, n); let r = t.innerType._zod.run(e, n); return r instanceof Promise ? r.then(Na$4) : Na$4(r); }; }); function Na$4(e) { return e.value = Object.freeze(e.value), e; } const Pa$4 = x$8(`$ZodTemplateLiteral`, (e, t) => { A$8.init(e, t); let n = []; for (let e of t.parts) if (typeof e == `object` && e) { if (!e._zod.pattern) throw Error(`Invalid template literal part, no pattern found: ${[...e._zod.traits].shift()}`); let t = e._zod.pattern instanceof RegExp ? e._zod.pattern.source : e._zod.pattern; if (!t) throw Error(`Invalid template literal part: ${e._zod.traits}`); let r = +!!t.startsWith(`^`), i = t.endsWith(`$`) ? t.length - 1 : t.length; n.push(t.slice(r, i)); } else if (e === null || mt$7.has(typeof e)) n.push(ht$7(`${e}`)); else throw Error(`Invalid template literal part: ${e}`); e._zod.pattern = RegExp(`^${n.join(``)}$`), e._zod.parse = (n, r) => typeof n.value == `string` ? (e._zod.pattern.lastIndex = 0, e._zod.pattern.test(n.value) || n.issues.push({ input: n.value, inst: e, code: `invalid_format`, format: t.format ?? `template_literal`, pattern: e._zod.pattern.source }), n) : (n.issues.push({ input: n.value, inst: e, expected: `string`, code: `invalid_type` }), n); }); const Fa$4 = x$8(`$ZodFunction`, (e, t) => (A$8.init(e, t), e._def = t, e._zod.def = t, e.implement = (t) => { if (typeof t != `function`) throw Error(`implement() must be called with a function`); return function(...n) { let r = e._def.input ? Zt$5(e._def.input, n) : n, i = Reflect.apply(t, this, r); return e._def.output ? Zt$5(e._def.output, i) : i; }; }, e.implementAsync = (t) => { if (typeof t != `function`) throw Error(`implementAsync() must be called with a function`); return async function(...n) { let r = e._def.input ? await $t$5(e._def.input, n) : n, i = await Reflect.apply(t, this, r); return e._def.output ? await $t$5(e._def.output, i) : i; }; }, e._zod.parse = (t, n) => typeof t.value == `function` ? (e._def.output && e._def.output._zod.def.type === `promise` ? t.value = e.implementAsync(t.value) : t.value = e.implement(t.value), t) : (t.issues.push({ code: `invalid_type`, expected: `function`, input: t.value, inst: e }), t), e.input = (...t) => { let n = e.constructor; return Array.isArray(t[0]) ? new n({ type: `function`, input: new ia$4({ type: `tuple`, items: t[0], rest: t[1] }), output: e._def.output }) : new n({ type: `function`, input: t[0], output: e._def.output }); }, e.output = (t) => { let n = e.constructor; return new n({ type: `function`, input: e._def.input, output: t }); }, e)); const Ia$4 = x$8(`$ZodPromise`, (e, t) => { A$8.init(e, t), e._zod.parse = (e, n) => Promise.resolve(e.value).then((e) => t.innerType._zod.run({ value: e, issues: [] }, n)); }); const La$4 = x$8(`$ZodLazy`, (e, t) => { A$8.init(e, t), w$10(e._zod, `innerType`, () => t.getter()), w$10(e._zod, `pattern`, () => e._zod.innerType?._zod?.pattern), w$10(e._zod, `propValues`, () => e._zod.innerType?._zod?.propValues), w$10(e._zod, `optin`, () => e._zod.innerType?._zod?.optin ?? void 0), w$10(e._zod, `optout`, () => e._zod.innerType?._zod?.optout ?? void 0), e._zod.parse = (t, n) => e._zod.innerType._zod.run(t, n); }); const Ra$4 = x$8(`$ZodCustom`, (e, t) => { k$9.init(e, t), A$8.init(e, t), e._zod.parse = (e, t) => e, e._zod.check = (n) => { let r = n.value, i = t.fn(r); if (i instanceof Promise) return i.then((t) => za$4(t, n, r, e)); za$4(i, n, r, e); }; }); function za$4(e, t, n, r) { if (!e) { let e = { code: `custom`, input: n, inst: r, path: [...r._zod.def.path ?? []], continue: !r._zod.def.abort }; r._zod.def.params && (e.params = r._zod.def.params), t.issues.push(Pt$6(e)); } } const Ba$4 = () => { let e = { string: { unit: `حرف`, verb: `أن يحوي` }, file: { unit: `بايت`, verb: `أن يحوي` }, array: { unit: `عنصر`, verb: `أن يحوي` }, set: { unit: `عنصر`, verb: `أن يحوي` } }; function t(t) { return e[t] ?? null; } let n = { regex: `مدخل`, email: `بريد إلكتروني`, url: `رابط`, emoji: `إيموجي`, uuid: `UUID`, uuidv4: `UUIDv4`, uuidv6: `UUIDv6`, nanoid: `nanoid`, guid: `GUID`, cuid: `cuid`, cuid2: `cuid2`, ulid: `ULID`, xid: `XID`, ksuid: `KSUID`, datetime: `تاريخ ووقت بمعيار ISO`, date: `تاريخ بمعيار ISO`, time: `وقت بمعيار ISO`, duration: `مدة بمعيار ISO`, ipv4: `عنوان IPv4`, ipv6: `عنوان IPv6`, cidrv4: `مدى عناوين بصيغة IPv4`, cidrv6: `مدى عناوين بصيغة IPv6`, base64: `نَص بترميز base64-encoded`, base64url: `نَص بترميز base64url-encoded`, json_string: `نَص على هيئة JSON`, e164: `رقم هاتف بمعيار E.164`, jwt: `JWT`, template_literal: `مدخل` }, r = { nan: `NaN` }; return (e) => { switch (e.code) { case `invalid_type`: { let t = r[e.expected] ?? e.expected, n = D$9(e.input), i = r[n] ?? n; return /^[A-Z]/.test(e.expected) ? `مدخلات غير مقبولة: يفترض إدخال instanceof ${e.expected}، ولكن تم إدخال ${i}` : `مدخلات غير مقبولة: يفترض إدخال ${t}، ولكن تم إدخال ${i}`; } case `invalid_value`: return e.values.length === 1 ? `مدخلات غير مقبولة: يفترض إدخال ${E$10(e.values[0])}` : `اختيار غير مقبول: يتوقع انتقاء أحد هذه الخيارات: ${C$10(e.values, `|`)}`; case `too_big`: { let n = e.inclusive ? `<=` : `<`, r = t(e.origin); return r ? ` أكبر من اللازم: يفترض أن تكون ${e.origin ?? `القيمة`} ${n} ${e.maximum.toString()} ${r.unit ?? `عنصر`}` : `أكبر من اللازم: يفترض أن تكون ${e.origin ?? `القيمة`} ${n} ${e.maximum.toString()}`; } case `too_small`: { let n = e.inclusive ? `>=` : `>`, r = t(e.origin); return r ? `أصغر من اللازم: يفترض لـ ${e.origin} أن يكون ${n} ${e.minimum.toString()} ${r.unit}` : `أصغر من اللازم: يفترض لـ ${e.origin} أن يكون ${n} ${e.minimum.toString()}`; } case `invalid_format`: { let t = e; return t.format === `starts_with` ? `نَص غير مقبول: يجب أن يبدأ بـ "${e.prefix}"` : t.format === `ends_with` ? `نَص غير مقبول: يجب أن ينتهي بـ "${t.suffix}"` : t.format === `includes` ? `نَص غير مقبول: يجب أن يتضمَّن "${t.includes}"` : t.format === `regex` ? `نَص غير مقبول: يجب أن يطابق النمط ${t.pattern}` : `${n[t.format] ?? e.format} غير مقبول`; } case `not_multiple_of`: return `رقم غير مقبول: يجب أن يكون من مضاعفات ${e.divisor}`; case `unrecognized_keys`: return `معرف${e.keys.length > 1 ? `ات` : ``} غريب${e.keys.length > 1 ? `ة` : ``}: ${C$10(e.keys, `، `)}`; case `invalid_key`: return `معرف غير مقبول في ${e.origin}`; case `invalid_union`: return `مدخل غير مقبول`; case `invalid_element`: return `مدخل غير مقبول في ${e.origin}`; default: return `مدخل غير مقبول`; } }; }; function Va$4() { return { localeError: Ba$4() }; } const Ha$4 = () => { let e = { string: { unit: `simvol`, verb: `olmalıdır` }, file: { unit: `bayt`, verb: `olmalıdır` }, array: { unit: `element`, verb: `olmalıdır` }, set: { unit: `element`, verb: `olmalıdır` } }; function t(t) { return e[t] ?? null; } let n = { regex: `input`, email: `email address`, url: `URL`, emoji: `emoji`, uuid: `UUID`, uuidv4: `UUIDv4`, uuidv6: `UUIDv6`, nanoid: `nanoid`, guid: `GUID`, cuid: `cuid`, cuid2: `cuid2`, ulid: `ULID`, xid: `XID`, ksuid: `KSUID`, datetime: `ISO datetime`, date: `ISO date`, time: `ISO time`, duration: `ISO duration`, ipv4: `IPv4 address`, ipv6: `IPv6 address`, cidrv4: `IPv4 range`, cidrv6: `IPv6 range`, base64: `base64-encoded string`, base64url: `base64url-encoded string`, json_string: `JSON string`, e164: `E.164 number`, jwt: `JWT`, template_literal: `input` }, r = { nan: `NaN` }; return (e) => { switch (e.code) { case `invalid_type`: { let t = r[e.expected] ?? e.expected, n = D$9(e.input), i = r[n] ?? n; return /^[A-Z]/.test(e.expected) ? `Yanlış dəyər: gözlənilən instanceof ${e.expected}, daxil olan ${i}` : `Yanlış dəyər: gözlənilən ${t}, daxil olan ${i}`; } case `invalid_value`: return e.values.length === 1 ? `Yanlış dəyər: gözlənilən ${E$10(e.values[0])}` : `Yanlış seçim: aşağıdakılardan biri olmalıdır: ${C$10(e.values, `|`)}`; case `too_big`: { let n = e.inclusive ? `<=` : `<`, r = t(e.origin); return r ? `Çox böyük: gözlənilən ${e.origin ?? `dəyər`} ${n}${e.maximum.toString()} ${r.unit ?? `element`}` : `Çox böyük: gözlənilən ${e.origin ?? `dəyər`} ${n}${e.maximum.toString()}`; } case `too_small`: { let n = e.inclusive ? `>=` : `>`, r = t(e.origin); return r ? `Çox kiçik: gözlənilən ${e.origin} ${n}${e.minimum.toString()} ${r.unit}` : `Çox kiçik: gözlənilən ${e.origin} ${n}${e.minimum.toString()}`; } case `invalid_format`: { let t = e; return t.format === `starts_with` ? `Yanlış mətn: "${t.prefix}" ilə başlamalıdır` : t.format === `ends_with` ? `Yanlış mətn: "${t.suffix}" ilə bitməlidir` : t.format === `includes` ? `Yanlış mətn: "${t.includes}" daxil olmalıdır` : t.format === `regex` ? `Yanlış mətn: ${t.pattern} şablonuna uyğun olmalıdır` : `Yanlış ${n[t.format] ?? e.format}`; } case `not_multiple_of`: return `Yanlış ədəd: ${e.divisor} ilə bölünə bilən olmalıdır`; case `unrecognized_keys`: return `Tanınmayan açar${e.keys.length > 1 ? `lar` : ``}: ${C$10(e.keys, `, `)}`; case `invalid_key`: return `${e.origin} daxilində yanlış açar`; case `invalid_union`: return `Yanlış dəyər`; case `invalid_element`: return `${e.origin} daxilində yanlış dəyər`; default: return `Yanlış dəyər`; } }; }; function Ua$4() { return { localeError: Ha$4() }; } function Wa$4(e, t, n, r) { let i = Math.abs(e), a = i % 10, o = i % 100; return o >= 11 && o <= 19 ? r : a === 1 ? t : a >= 2 && a <= 4 ? n : r; } const Ga$4 = () => { let e = { string: { unit: { one: `сімвал`, few: `сімвалы`, many: `сімвалаў` }, verb: `мець` }, array: { unit: { one: `элемент`, few: `элементы`, many: `элементаў` }, verb: `мець` }, set: { unit: { one: `элемент`, few: `элементы`, many: `элементаў` }, verb: `мець` }, file: { unit: { one: `байт`, few: `байты`, many: `байтаў` }, verb: `мець` } }; function t(t) { return e[t] ?? null; } let n = { regex: `увод`, email: `email адрас`, url: `URL`, emoji: `эмодзі`, uuid: `UUID`, uuidv4: `UUIDv4`, uuidv6: `UUIDv6`, nanoid: `nanoid`, guid: `GUID`, cuid: `cuid`, cuid2: `cuid2`, ulid: `ULID`, xid: `XID`, ksuid: `KSUID`, datetime: `ISO дата і час`, date: `ISO дата`, time: `ISO час`, duration: `ISO працягласць`, ipv4: `IPv4 адрас`, ipv6: `IPv6 адрас`, cidrv4: `IPv4 дыяпазон`, cidrv6: `IPv6 дыяпазон`, base64: `радок у фармаце base64`, base64url: `радок у фармаце base64url`, json_string: `JSON радок`, e164: `нумар E.164`, jwt: `JWT`, template_literal: `увод` }, r = { nan: `NaN`, number: `лік`, array: `масіў` }; return (e) => { switch (e.code) { case `invalid_type`: { let t = r[e.expected] ?? e.expected, n = D$9(e.input), i = r[n] ?? n; return /^[A-Z]/.test(e.expected) ? `Няправільны ўвод: чакаўся instanceof ${e.expected}, атрымана ${i}` : `Няправільны ўвод: чакаўся ${t}, атрымана ${i}`; } case `invalid_value`: return e.values.length === 1 ? `Няправільны ўвод: чакалася ${E$10(e.values[0])}` : `Няправільны варыянт: чакаўся адзін з ${C$10(e.values, `|`)}`; case `too_big`: { let n = e.inclusive ? `<=` : `<`, r = t(e.origin); if (r) { let t = Wa$4(Number(e.maximum), r.unit.one, r.unit.few, r.unit.many); return `Занадта вялікі: чакалася, што ${e.origin ?? `значэнне`} павінна ${r.verb} ${n}${e.maximum.toString()} ${t}`; } return `Занадта вялікі: чакалася, што ${e.origin ?? `значэнне`} павінна быць ${n}${e.maximum.toString()}`; } case `too_small`: { let n = e.inclusive ? `>=` : `>`, r = t(e.origin); if (r) { let t = Wa$4(Number(e.minimum), r.unit.one, r.unit.few, r.unit.many); return `Занадта малы: чакалася, што ${e.origin} павінна ${r.verb} ${n}${e.minimum.toString()} ${t}`; } return `Занадта малы: чакалася, што ${e.origin} павінна быць ${n}${e.minimum.toString()}`; } case `invalid_format`: { let t = e; return t.format === `starts_with` ? `Няправільны радок: павінен пачынацца з "${t.prefix}"` : t.format === `ends_with` ? `Няправільны радок: павінен заканчвацца на "${t.suffix}"` : t.format === `includes` ? `Няправільны радок: павінен змяшчаць "${t.includes}"` : t.format === `regex` ? `Няправільны радок: павінен адпавядаць шаблону ${t.pattern}` : `Няправільны ${n[t.format] ?? e.format}`; } case `not_multiple_of`: return `Няправільны лік: павінен быць кратным ${e.divisor}`; case `unrecognized_keys`: return `Нераспазнаны ${e.keys.length > 1 ? `ключы` : `ключ`}: ${C$10(e.keys, `, `)}`; case `invalid_key`: return `Няправільны ключ у ${e.origin}`; case `invalid_union`: return `Няправільны ўвод`; case `invalid_element`: return `Няправільнае значэнне ў ${e.origin}`; default: return `Няправільны ўвод`; } }; }; function Ka$4() { return { localeError: Ga$4() }; } const qa$4 = () => { let e = { string: { unit: `символа`, verb: `да съдържа` }, file: { unit: `байта`, verb: `да съдържа` }, array: { unit: `елемента`, verb: `да съдържа` }, set: { unit: `елемента`, verb: `да съдържа` } }; function t(t) { return e[t] ?? null; } let n = { regex: `вход`, email: `имейл адрес`, url: `URL`, emoji: `емоджи`, uuid: `UUID`, uuidv4: `UUIDv4`, uuidv6: `UUIDv6`, nanoid: `nanoid`, guid: `GUID`, cuid: `cuid`, cuid2: `cuid2`, ulid: `ULID`, xid: `XID`, ksuid: `KSUID`, datetime: `ISO време`, date: `ISO дата`, time: `ISO време`, duration: `ISO продължителност`, ipv4: `IPv4 адрес`, ipv6: `IPv6 адрес`, cidrv4: `IPv4 диапазон`, cidrv6: `IPv6 диапазон`, base64: `base64-кодиран низ`, base64url: `base64url-кодиран низ`, json_string: `JSON низ`, e164: `E.164 номер`, jwt: `JWT`, template_literal: `вход` }, r = { nan: `NaN`, number: `число`, array: `масив` }; return (e) => { switch (e.code) { case `invalid_type`: { let t = r[e.expected] ?? e.expected, n = D$9(e.input), i = r[n] ?? n; return /^[A-Z]/.test(e.expected) ? `Невалиден вход: очакван instanceof ${e.expected}, получен ${i}` : `Невалиден вход: очакван ${t}, получен ${i}`; } case `invalid_value`: return e.values.length === 1 ? `Невалиден вход: очакван ${E$10(e.values[0])}` : `Невалидна опция: очаквано едно от ${C$10(e.values, `|`)}`; case `too_big`: { let n = e.inclusive ? `<=` : `<`, r = t(e.origin); return r ? `Твърде голямо: очаква се ${e.origin ?? `стойност`} да съдържа ${n}${e.maximum.toString()} ${r.unit ?? `елемента`}` : `Твърде голямо: очаква се ${e.origin ?? `стойност`} да бъде ${n}${e.maximum.toString()}`; } case `too_small`: { let n = e.inclusive ? `>=` : `>`, r = t(e.origin); return r ? `Твърде малко: очаква се ${e.origin} да съдържа ${n}${e.minimum.toString()} ${r.unit}` : `Твърде малко: очаква се ${e.origin} да бъде ${n}${e.minimum.toString()}`; } case `invalid_format`: { let t = e; if (t.format === `starts_with`) return `Невалиден низ: трябва да започва с "${t.prefix}"`; if (t.format === `ends_with`) return `Невалиден низ: трябва да завършва с "${t.suffix}"`; if (t.format === `includes`) return `Невалиден низ: трябва да включва "${t.includes}"`; if (t.format === `regex`) return `Невалиден низ: трябва да съвпада с ${t.pattern}`; let r = `Невалиден`; return t.format === `emoji` && (r = `Невалидно`), t.format === `datetime` && (r = `Невалидно`), t.format === `date` && (r = `Невалидна`), t.format === `time` && (r = `Невалидно`), t.format === `duration` && (r = `Невалидна`), `${r} ${n[t.format] ?? e.format}`; } case `not_multiple_of`: return `Невалидно число: трябва да бъде кратно на ${e.divisor}`; case `unrecognized_keys`: return `Неразпознат${e.keys.length > 1 ? `и` : ``} ключ${e.keys.length > 1 ? `ове` : ``}: ${C$10(e.keys, `, `)}`; case `invalid_key`: return `Невалиден ключ в ${e.origin}`; case `invalid_union`: return `Невалиден вход`; case `invalid_element`: return `Невалидна стойност в ${e.origin}`; default: return `Невалиден вход`; } }; }; function Ja$3() { return { localeError: qa$4() }; } const Ya$3 = () => { let e = { string: { unit: `caràcters`, verb: `contenir` }, file: { unit: `bytes`, verb: `contenir` }, array: { unit: `elements`, verb: `contenir` }, set: { unit: `elements`, verb: `contenir` } }; function t(t) { return e[t] ?? null; } let n = { regex: `entrada`, email: `adreça electrònica`, url: `URL`, emoji: `emoji`, uuid: `UUID`, uuidv4: `UUIDv4`, uuidv6: `UUIDv6`, nanoid: `nanoid`, guid: `GUID`, cuid: `cuid`, cuid2: `cuid2`, ulid: `ULID`, xid: `XID`, ksuid: `KSUID`, datetime: `data i hora ISO`, date: `data ISO`, time: `hora ISO`, duration: `durada ISO`, ipv4: `adreça IPv4`, ipv6: `adreça IPv6`, cidrv4: `rang IPv4`, cidrv6: `rang IPv6`, base64: `cadena codificada en base64`, base64url: `cadena codificada en base64url`, json_string: `cadena JSON`, e164: `número E.164`, jwt: `JWT`, template_literal: `entrada` }, r = { nan: `NaN` }; return (e) => { switch (e.code) { case `invalid_type`: { let t = r[e.expected] ?? e.expected, n = D$9(e.input), i = r[n] ?? n; return /^[A-Z]/.test(e.expected) ? `Tipus invàlid: s'esperava instanceof ${e.expected}, s'ha rebut ${i}` : `Tipus invàlid: s'esperava ${t}, s'ha rebut ${i}`; } case `invalid_value`: return e.values.length === 1 ? `Valor invàlid: s'esperava ${E$10(e.values[0])}` : `Opció invàlida: s'esperava una de ${C$10(e.values, ` o `)}`; case `too_big`: { let n = e.inclusive ? `com a màxim` : `menys de`, r = t(e.origin); return r ? `Massa gran: s'esperava que ${e.origin ?? `el valor`} contingués ${n} ${e.maximum.toString()} ${r.unit ?? `elements`}` : `Massa gran: s'esperava que ${e.origin ?? `el valor`} fos ${n} ${e.maximum.toString()}`; } case `too_small`: { let n = e.inclusive ? `com a mínim` : `més de`, r = t(e.origin); return r ? `Massa petit: s'esperava que ${e.origin} contingués ${n} ${e.minimum.toString()} ${r.unit}` : `Massa petit: s'esperava que ${e.origin} fos ${n} ${e.minimum.toString()}`; } case `invalid_format`: { let t = e; return t.format === `starts_with` ? `Format invàlid: ha de començar amb "${t.prefix}"` : t.format === `ends_with` ? `Format invàlid: ha d'acabar amb "${t.suffix}"` : t.format === `includes` ? `Format invàlid: ha d'incloure "${t.includes}"` : t.format === `regex` ? `Format invàlid: ha de coincidir amb el patró ${t.pattern}` : `Format invàlid per a ${n[t.format] ?? e.format}`; } case `not_multiple_of`: return `Número invàlid: ha de ser múltiple de ${e.divisor}`; case `unrecognized_keys`: return `Clau${e.keys.length > 1 ? `s` : ``} no reconeguda${e.keys.length > 1 ? `s` : ``}: ${C$10(e.keys, `, `)}`; case `invalid_key`: return `Clau invàlida a ${e.origin}`; case `invalid_union`: return `Entrada invàlida`; case `invalid_element`: return `Element invàlid a ${e.origin}`; default: return `Entrada invàlida`; } }; }; function Xa$3() { return { localeError: Ya$3() }; } const Za$3 = () => { let e = { string: { unit: `znaků`, verb: `mít` }, file: { unit: `bajtů`, verb: `mít` }, array: { unit: `prvků`, verb: `mít` }, set: { unit: `prvků`, verb: `mít` } }; function t(t) { return e[t] ?? null; } let n = { regex: `regulární výraz`, email: `e-mailová adresa`, url: `URL`, emoji: `emoji`, uuid: `UUID`, uuidv4: `UUIDv4`, uuidv6: `UUIDv6`, nanoid: `nanoid`, guid: `GUID`, cuid: `cuid`, cuid2: `cuid2`, ulid: `ULID`, xid: `XID`, ksuid: `KSUID`, datetime: `datum a čas ve formátu ISO`, date: `datum ve formátu ISO`, time: `čas ve formátu ISO`, duration: `doba trvání ISO`, ipv4: `IPv4 adresa`, ipv6: `IPv6 adresa`, cidrv4: `rozsah IPv4`, cidrv6: `rozsah IPv6`, base64: `řetězec zakódovaný ve formátu base64`, base64url: `řetězec zakódovaný ve formátu base64url`, json_string: `řetězec ve formátu JSON`, e164: `číslo E.164`, jwt: `JWT`, template_literal: `vstup` }, r = { nan: `NaN`, number: `číslo`, string: `řetězec`, function: `funkce`, array: `pole` }; return (e) => { switch (e.code) { case `invalid_type`: { let t = r[e.expected] ?? e.expected, n = D$9(e.input), i = r[n] ?? n; return /^[A-Z]/.test(e.expected) ? `Neplatný vstup: očekáváno instanceof ${e.expected}, obdrženo ${i}` : `Neplatný vstup: očekáváno ${t}, obdrženo ${i}`; } case `invalid_value`: return e.values.length === 1 ? `Neplatný vstup: očekáváno ${E$10(e.values[0])}` : `Neplatná možnost: očekávána jedna z hodnot ${C$10(e.values, `|`)}`; case `too_big`: { let n = e.inclusive ? `<=` : `<`, r = t(e.origin); return r ? `Hodnota je příliš velká: ${e.origin ?? `hodnota`} musí mít ${n}${e.maximum.toString()} ${r.unit ?? `prvků`}` : `Hodnota je příliš velká: ${e.origin ?? `hodnota`} musí být ${n}${e.maximum.toString()}`; } case `too_small`: { let n = e.inclusive ? `>=` : `>`, r = t(e.origin); return r ? `Hodnota je příliš malá: ${e.origin ?? `hodnota`} musí mít ${n}${e.minimum.toString()} ${r.unit ?? `prvků`}` : `Hodnota je příliš malá: ${e.origin ?? `hodnota`} musí být ${n}${e.minimum.toString()}`; } case `invalid_format`: { let t = e; return t.format === `starts_with` ? `Neplatný řetězec: musí začínat na "${t.prefix}"` : t.format === `ends_with` ? `Neplatný řetězec: musí končit na "${t.suffix}"` : t.format === `includes` ? `Neplatný řetězec: musí obsahovat "${t.includes}"` : t.format === `regex` ? `Neplatný řetězec: musí odpovídat vzoru ${t.pattern}` : `Neplatný formát ${n[t.format] ?? e.format}`; } case `not_multiple_of`: return `Neplatné číslo: musí být násobkem ${e.divisor}`; case `unrecognized_keys`: return `Neznámé klíče: ${C$10(e.keys, `, `)}`; case `invalid_key`: return `Neplatný klíč v ${e.origin}`; case `invalid_union`: return `Neplatný vstup`; case `invalid_element`: return `Neplatná hodnota v ${e.origin}`; default: return `Neplatný vstup`; } }; }; function Qa$3() { return { localeError: Za$3() }; } const $a$3 = () => { let e = { string: { unit: `tegn`, verb: `havde` }, file: { unit: `bytes`, verb: `havde` }, array: { unit: `elementer`, verb: `indeholdt` }, set: { unit: `elementer`, verb: `indeholdt` } }; function t(t) { return e[t] ?? null; } let n = { regex: `input`, email: `e-mailadresse`, url: `URL`, emoji: `emoji`, uuid: `UUID`, uuidv4: `UUIDv4`, uuidv6: `UUIDv6`, nanoid: `nanoid`, guid: `GUID`, cuid: `cuid`, cuid2: `cuid2`, ulid: `ULID`, xid: `XID`, ksuid: `KSUID`, datetime: `ISO dato- og klokkeslæt`, date: `ISO-dato`, time: `ISO-klokkeslæt`, duration: `ISO-varighed`, ipv4: `IPv4-område`, ipv6: `IPv6-område`, cidrv4: `IPv4-spektrum`, cidrv6: `IPv6-spektrum`, base64: `base64-kodet streng`, base64url: `base64url-kodet streng`, json_string: `JSON-streng`, e164: `E.164-nummer`, jwt: `JWT`, template_literal: `input` }, r = { nan: `NaN`, string: `streng`, number: `tal`, boolean: `boolean`, array: `liste`, object: `objekt`, set: `sæt`, file: `fil` }; return (e) => { switch (e.code) { case `invalid_type`: { let t = r[e.expected] ?? e.expected, n = D$9(e.input), i = r[n] ?? n; return /^[A-Z]/.test(e.expected) ? `Ugyldigt input: forventede instanceof ${e.expected}, fik ${i}` : `Ugyldigt input: forventede ${t}, fik ${i}`; } case `invalid_value`: return e.values.length === 1 ? `Ugyldig værdi: forventede ${E$10(e.values[0])}` : `Ugyldigt valg: forventede en af følgende ${C$10(e.values, `|`)}`; case `too_big`: { let n = e.inclusive ? `<=` : `<`, i = t(e.origin), a = r[e.origin] ?? e.origin; return i ? `For stor: forventede ${a ?? `value`} ${i.verb} ${n} ${e.maximum.toString()} ${i.unit ?? `elementer`}` : `For stor: forventede ${a ?? `value`} havde ${n} ${e.maximum.toString()}`; } case `too_small`: { let n = e.inclusive ? `>=` : `>`, i = t(e.origin), a = r[e.origin] ?? e.origin; return i ? `For lille: forventede ${a} ${i.verb} ${n} ${e.minimum.toString()} ${i.unit}` : `For lille: forventede ${a} havde ${n} ${e.minimum.toString()}`; } case `invalid_format`: { let t = e; return t.format === `starts_with` ? `Ugyldig streng: skal starte med "${t.prefix}"` : t.format === `ends_with` ? `Ugyldig streng: skal ende med "${t.suffix}"` : t.format === `includes` ? `Ugyldig streng: skal indeholde "${t.includes}"` : t.format === `regex` ? `Ugyldig streng: skal matche mønsteret ${t.pattern}` : `Ugyldig ${n[t.format] ?? e.format}`; } case `not_multiple_of`: return `Ugyldigt tal: skal være deleligt med ${e.divisor}`; case `unrecognized_keys`: return `${e.keys.length > 1 ? `Ukendte nøgler` : `Ukendt nøgle`}: ${C$10(e.keys, `, `)}`; case `invalid_key`: return `Ugyldig nøgle i ${e.origin}`; case `invalid_union`: return `Ugyldigt input: matcher ingen af de tilladte typer`; case `invalid_element`: return `Ugyldig værdi i ${e.origin}`; default: return `Ugyldigt input`; } }; }; function eo$3() { return { localeError: $a$3() }; } const to$3 = () => { let e = { string: { unit: `Zeichen`, verb: `zu haben` }, file: { unit: `Bytes`, verb: `zu haben` }, array: { unit: `Elemente`, verb: `zu haben` }, set: { unit: `Elemente`, verb: `zu haben` } }; function t(t) { return e[t] ?? null; } let n = { regex: `Eingabe`, email: `E-Mail-Adresse`, url: `URL`, emoji: `Emoji`, uuid: `UUID`, uuidv4: `UUIDv4`, uuidv6: `UUIDv6`, nanoid: `nanoid`, guid: `GUID`, cuid: `cuid`, cuid2: `cuid2`, ulid: `ULID`, xid: `XID`, ksuid: `KSUID`, datetime: `ISO-Datum und -Uhrzeit`, date: `ISO-Datum`, time: `ISO-Uhrzeit`, duration: `ISO-Dauer`, ipv4: `IPv4-Adresse`, ipv6: `IPv6-Adresse`, cidrv4: `IPv4-Bereich`, cidrv6: `IPv6-Bereich`, base64: `Base64-codierter String`, base64url: `Base64-URL-codierter String`, json_string: `JSON-String`, e164: `E.164-Nummer`, jwt: `JWT`, template_literal: `Eingabe` }, r = { nan: `NaN`, number: `Zahl`, array: `Array` }; return (e) => { switch (e.code) { case `invalid_type`: { let t = r[e.expected] ?? e.expected, n = D$9(e.input), i = r[n] ?? n; return /^[A-Z]/.test(e.expected) ? `Ungültige Eingabe: erwartet instanceof ${e.expected}, erhalten ${i}` : `Ungültige Eingabe: erwartet ${t}, erhalten ${i}`; } case `invalid_value`: return e.values.length === 1 ? `Ungültige Eingabe: erwartet ${E$10(e.values[0])}` : `Ungültige Option: erwartet eine von ${C$10(e.values, `|`)}`; case `too_big`: { let n = e.inclusive ? `<=` : `<`, r = t(e.origin); return r ? `Zu groß: erwartet, dass ${e.origin ?? `Wert`} ${n}${e.maximum.toString()} ${r.unit ?? `Elemente`} hat` : `Zu groß: erwartet, dass ${e.origin ?? `Wert`} ${n}${e.maximum.toString()} ist`; } case `too_small`: { let n = e.inclusive ? `>=` : `>`, r = t(e.origin); return r ? `Zu klein: erwartet, dass ${e.origin} ${n}${e.minimum.toString()} ${r.unit} hat` : `Zu klein: erwartet, dass ${e.origin} ${n}${e.minimum.toString()} ist`; } case `invalid_format`: { let t = e; return t.format === `starts_with` ? `Ungültiger String: muss mit "${t.prefix}" beginnen` : t.format === `ends_with` ? `Ungültiger String: muss mit "${t.suffix}" enden` : t.format === `includes` ? `Ungültiger String: muss "${t.includes}" enthalten` : t.format === `regex` ? `Ungültiger String: muss dem Muster ${t.pattern} entsprechen` : `Ungültig: ${n[t.format] ?? e.format}`; } case `not_multiple_of`: return `Ungültige Zahl: muss ein Vielfaches von ${e.divisor} sein`; case `unrecognized_keys`: return `${e.keys.length > 1 ? `Unbekannte Schlüssel` : `Unbekannter Schlüssel`}: ${C$10(e.keys, `, `)}`; case `invalid_key`: return `Ungültiger Schlüssel in ${e.origin}`; case `invalid_union`: return `Ungültige Eingabe`; case `invalid_element`: return `Ungültiger Wert in ${e.origin}`; default: return `Ungültige Eingabe`; } }; }; function no$2() { return { localeError: to$3() }; } const ro$2 = () => { let e = { string: { unit: `characters`, verb: `to have` }, file: { unit: `bytes`, verb: `to have` }, array: { unit: `items`, verb: `to have` }, set: { unit: `items`, verb: `to have` }, map: { unit: `entries`, verb: `to have` } }; function t(t) { return e[t] ?? null; } let n = { regex: `input`, email: `email address`, url: `URL`, emoji: `emoji`, uuid: `UUID`, uuidv4: `UUIDv4`, uuidv6: `UUIDv6`, nanoid: `nanoid`, guid: `GUID`, cuid: `cuid`, cuid2: `cuid2`, ulid: `ULID`, xid: `XID`, ksuid: `KSUID`, datetime: `ISO datetime`, date: `ISO date`, time: `ISO time`, duration: `ISO duration`, ipv4: `IPv4 address`, ipv6: `IPv6 address`, mac: `MAC address`, cidrv4: `IPv4 range`, cidrv6: `IPv6 range`, base64: `base64-encoded string`, base64url: `base64url-encoded string`, json_string: `JSON string`, e164: `E.164 number`, jwt: `JWT`, template_literal: `input` }, r = { nan: `NaN` }; return (e) => { switch (e.code) { case `invalid_type`: { let t = r[e.expected] ?? e.expected, n = D$9(e.input); return `Invalid input: expected ${t}, received ${r[n] ?? n}`; } case `invalid_value`: return e.values.length === 1 ? `Invalid input: expected ${E$10(e.values[0])}` : `Invalid option: expected one of ${C$10(e.values, `|`)}`; case `too_big`: { let n = e.inclusive ? `<=` : `<`, r = t(e.origin); return r ? `Too big: expected ${e.origin ?? `value`} to have ${n}${e.maximum.toString()} ${r.unit ?? `elements`}` : `Too big: expected ${e.origin ?? `value`} to be ${n}${e.maximum.toString()}`; } case `too_small`: { let n = e.inclusive ? `>=` : `>`, r = t(e.origin); return r ? `Too small: expected ${e.origin} to have ${n}${e.minimum.toString()} ${r.unit}` : `Too small: expected ${e.origin} to be ${n}${e.minimum.toString()}`; } case `invalid_format`: { let t = e; return t.format === `starts_with` ? `Invalid string: must start with "${t.prefix}"` : t.format === `ends_with` ? `Invalid string: must end with "${t.suffix}"` : t.format === `includes` ? `Invalid string: must include "${t.includes}"` : t.format === `regex` ? `Invalid string: must match pattern ${t.pattern}` : `Invalid ${n[t.format] ?? e.format}`; } case `not_multiple_of`: return `Invalid number: must be a multiple of ${e.divisor}`; case `unrecognized_keys`: return `Unrecognized key${e.keys.length > 1 ? `s` : ``}: ${C$10(e.keys, `, `)}`; case `invalid_key`: return `Invalid key in ${e.origin}`; case `invalid_union`: return `Invalid input`; case `invalid_element`: return `Invalid value in ${e.origin}`; default: return `Invalid input`; } }; }; function io$2() { return { localeError: ro$2() }; } const ao$2 = () => { let e = { string: { unit: `karaktrojn`, verb: `havi` }, file: { unit: `bajtojn`, verb: `havi` }, array: { unit: `elementojn`, verb: `havi` }, set: { unit: `elementojn`, verb: `havi` } }; function t(t) { return e[t] ?? null; } let n = { regex: `enigo`, email: `retadreso`, url: `URL`, emoji: `emoĝio`, uuid: `UUID`, uuidv4: `UUIDv4`, uuidv6: `UUIDv6`, nanoid: `nanoid`, guid: `GUID`, cuid: `cuid`, cuid2: `cuid2`, ulid: `ULID`, xid: `XID`, ksuid: `KSUID`, datetime: `ISO-datotempo`, date: `ISO-dato`, time: `ISO-tempo`, duration: `ISO-daŭro`, ipv4: `IPv4-adreso`, ipv6: `IPv6-adreso`, cidrv4: `IPv4-rango`, cidrv6: `IPv6-rango`, base64: `64-ume kodita karaktraro`, base64url: `URL-64-ume kodita karaktraro`, json_string: `JSON-karaktraro`, e164: `E.164-nombro`, jwt: `JWT`, template_literal: `enigo` }, r = { nan: `NaN`, number: `nombro`, array: `tabelo`, null: `senvalora` }; return (e) => { switch (e.code) { case `invalid_type`: { let t = r[e.expected] ?? e.expected, n = D$9(e.input), i = r[n] ?? n; return /^[A-Z]/.test(e.expected) ? `Nevalida enigo: atendiĝis instanceof ${e.expected}, riceviĝis ${i}` : `Nevalida enigo: atendiĝis ${t}, riceviĝis ${i}`; } case `invalid_value`: return e.values.length === 1 ? `Nevalida enigo: atendiĝis ${E$10(e.values[0])}` : `Nevalida opcio: atendiĝis unu el ${C$10(e.values, `|`)}`; case `too_big`: { let n = e.inclusive ? `<=` : `<`, r = t(e.origin); return r ? `Tro granda: atendiĝis ke ${e.origin ?? `valoro`} havu ${n}${e.maximum.toString()} ${r.unit ?? `elementojn`}` : `Tro granda: atendiĝis ke ${e.origin ?? `valoro`} havu ${n}${e.maximum.toString()}`; } case `too_small`: { let n = e.inclusive ? `>=` : `>`, r = t(e.origin); return r ? `Tro malgranda: atendiĝis ke ${e.origin} havu ${n}${e.minimum.toString()} ${r.unit}` : `Tro malgranda: atendiĝis ke ${e.origin} estu ${n}${e.minimum.toString()}`; } case `invalid_format`: { let t = e; return t.format === `starts_with` ? `Nevalida karaktraro: devas komenciĝi per "${t.prefix}"` : t.format === `ends_with` ? `Nevalida karaktraro: devas finiĝi per "${t.suffix}"` : t.format === `includes` ? `Nevalida karaktraro: devas inkluzivi "${t.includes}"` : t.format === `regex` ? `Nevalida karaktraro: devas kongrui kun la modelo ${t.pattern}` : `Nevalida ${n[t.format] ?? e.format}`; } case `not_multiple_of`: return `Nevalida nombro: devas esti oblo de ${e.divisor}`; case `unrecognized_keys`: return `Nekonata${e.keys.length > 1 ? `j` : ``} ŝlosilo${e.keys.length > 1 ? `j` : ``}: ${C$10(e.keys, `, `)}`; case `invalid_key`: return `Nevalida ŝlosilo en ${e.origin}`; case `invalid_union`: return `Nevalida enigo`; case `invalid_element`: return `Nevalida valoro en ${e.origin}`; default: return `Nevalida enigo`; } }; }; function oo$2() { return { localeError: ao$2() }; } const so$2 = () => { let e = { string: { unit: `caracteres`, verb: `tener` }, file: { unit: `bytes`, verb: `tener` }, array: { unit: `elementos`, verb: `tener` }, set: { unit: `elementos`, verb: `tener` } }; function t(t) { return e[t] ?? null; } let n = { regex: `entrada`, email: `dirección de correo electrónico`, url: `URL`, emoji: `emoji`, uuid: `UUID`, uuidv4: `UUIDv4`, uuidv6: `UUIDv6`, nanoid: `nanoid`, guid: `GUID`, cuid: `cuid`, cuid2: `cuid2`, ulid: `ULID`, xid: `XID`, ksuid: `KSUID`, datetime: `fecha y hora ISO`, date: `fecha ISO`, time: `hora ISO`, duration: `duración ISO`, ipv4: `dirección IPv4`, ipv6: `dirección IPv6`, cidrv4: `rango IPv4`, cidrv6: `rango IPv6`, base64: `cadena codificada en base64`, base64url: `URL codificada en base64`, json_string: `cadena JSON`, e164: `número E.164`, jwt: `JWT`, template_literal: `entrada` }, r = { nan: `NaN`, string: `texto`, number: `número`, boolean: `booleano`, array: `arreglo`, object: `objeto`, set: `conjunto`, file: `archivo`, date: `fecha`, bigint: `número grande`, symbol: `símbolo`, undefined: `indefinido`, null: `nulo`, function: `función`, map: `mapa`, record: `registro`, tuple: `tupla`, enum: `enumeración`, union: `unión`, literal: `literal`, promise: `promesa`, void: `vacío`, never: `nunca`, unknown: `desconocido`, any: `cualquiera` }; return (e) => { switch (e.code) { case `invalid_type`: { let t = r[e.expected] ?? e.expected, n = D$9(e.input), i = r[n] ?? n; return /^[A-Z]/.test(e.expected) ? `Entrada inválida: se esperaba instanceof ${e.expected}, recibido ${i}` : `Entrada inválida: se esperaba ${t}, recibido ${i}`; } case `invalid_value`: return e.values.length === 1 ? `Entrada inválida: se esperaba ${E$10(e.values[0])}` : `Opción inválida: se esperaba una de ${C$10(e.values, `|`)}`; case `too_big`: { let n = e.inclusive ? `<=` : `<`, i = t(e.origin), a = r[e.origin] ?? e.origin; return i ? `Demasiado grande: se esperaba que ${a ?? `valor`} tuviera ${n}${e.maximum.toString()} ${i.unit ?? `elementos`}` : `Demasiado grande: se esperaba que ${a ?? `valor`} fuera ${n}${e.maximum.toString()}`; } case `too_small`: { let n = e.inclusive ? `>=` : `>`, i = t(e.origin), a = r[e.origin] ?? e.origin; return i ? `Demasiado pequeño: se esperaba que ${a} tuviera ${n}${e.minimum.toString()} ${i.unit}` : `Demasiado pequeño: se esperaba que ${a} fuera ${n}${e.minimum.toString()}`; } case `invalid_format`: { let t = e; return t.format === `starts_with` ? `Cadena inválida: debe comenzar con "${t.prefix}"` : t.format === `ends_with` ? `Cadena inválida: debe terminar en "${t.suffix}"` : t.format === `includes` ? `Cadena inválida: debe incluir "${t.includes}"` : t.format === `regex` ? `Cadena inválida: debe coincidir con el patrón ${t.pattern}` : `Inválido ${n[t.format] ?? e.format}`; } case `not_multiple_of`: return `Número inválido: debe ser múltiplo de ${e.divisor}`; case `unrecognized_keys`: return `Llave${e.keys.length > 1 ? `s` : ``} desconocida${e.keys.length > 1 ? `s` : ``}: ${C$10(e.keys, `, `)}`; case `invalid_key`: return `Llave inválida en ${r[e.origin] ?? e.origin}`; case `invalid_union`: return `Entrada inválida`; case `invalid_element`: return `Valor inválido en ${r[e.origin] ?? e.origin}`; default: return `Entrada inválida`; } }; }; function co$2() { return { localeError: so$2() }; } const lo$2 = () => { let e = { string: { unit: `کاراکتر`, verb: `داشته باشد` }, file: { unit: `بایت`, verb: `داشته باشد` }, array: { unit: `آیتم`, verb: `داشته باشد` }, set: { unit: `آیتم`, verb: `داشته باشد` } }; function t(t) { return e[t] ?? null; } let n = { regex: `ورودی`, email: `آدرس ایمیل`, url: `URL`, emoji: `ایموجی`, uuid: `UUID`, uuidv4: `UUIDv4`, uuidv6: `UUIDv6`, nanoid: `nanoid`, guid: `GUID`, cuid: `cuid`, cuid2: `cuid2`, ulid: `ULID`, xid: `XID`, ksuid: `KSUID`, datetime: `تاریخ و زمان ایزو`, date: `تاریخ ایزو`, time: `زمان ایزو`, duration: `مدت زمان ایزو`, ipv4: `IPv4 آدرس`, ipv6: `IPv6 آدرس`, cidrv4: `IPv4 دامنه`, cidrv6: `IPv6 دامنه`, base64: `base64-encoded رشته`, base64url: `base64url-encoded رشته`, json_string: `JSON رشته`, e164: `E.164 عدد`, jwt: `JWT`, template_literal: `ورودی` }, r = { nan: `NaN`, number: `عدد`, array: `آرایه` }; return (e) => { switch (e.code) { case `invalid_type`: { let t = r[e.expected] ?? e.expected, n = D$9(e.input), i = r[n] ?? n; return /^[A-Z]/.test(e.expected) ? `ورودی نامعتبر: می‌بایست instanceof ${e.expected} می‌بود، ${i} دریافت شد` : `ورودی نامعتبر: می‌بایست ${t} می‌بود، ${i} دریافت شد`; } case `invalid_value`: return e.values.length === 1 ? `ورودی نامعتبر: می‌بایست ${E$10(e.values[0])} می‌بود` : `گزینه نامعتبر: می‌بایست یکی از ${C$10(e.values, `|`)} می‌بود`; case `too_big`: { let n = e.inclusive ? `<=` : `<`, r = t(e.origin); return r ? `خیلی بزرگ: ${e.origin ?? `مقدار`} باید ${n}${e.maximum.toString()} ${r.unit ?? `عنصر`} باشد` : `خیلی بزرگ: ${e.origin ?? `مقدار`} باید ${n}${e.maximum.toString()} باشد`; } case `too_small`: { let n = e.inclusive ? `>=` : `>`, r = t(e.origin); return r ? `خیلی کوچک: ${e.origin} باید ${n}${e.minimum.toString()} ${r.unit} باشد` : `خیلی کوچک: ${e.origin} باید ${n}${e.minimum.toString()} باشد`; } case `invalid_format`: { let t = e; return t.format === `starts_with` ? `رشته نامعتبر: باید با "${t.prefix}" شروع شود` : t.format === `ends_with` ? `رشته نامعتبر: باید با "${t.suffix}" تمام شود` : t.format === `includes` ? `رشته نامعتبر: باید شامل "${t.includes}" باشد` : t.format === `regex` ? `رشته نامعتبر: باید با الگوی ${t.pattern} مطابقت داشته باشد` : `${n[t.format] ?? e.format} نامعتبر`; } case `not_multiple_of`: return `عدد نامعتبر: باید مضرب ${e.divisor} باشد`; case `unrecognized_keys`: return `کلید${e.keys.length > 1 ? `های` : ``} ناشناس: ${C$10(e.keys, `, `)}`; case `invalid_key`: return `کلید ناشناس در ${e.origin}`; case `invalid_union`: return `ورودی نامعتبر`; case `invalid_element`: return `مقدار نامعتبر در ${e.origin}`; default: return `ورودی نامعتبر`; } }; }; function uo$2() { return { localeError: lo$2() }; } const fo$2 = () => { let e = { string: { unit: `merkkiä`, subject: `merkkijonon` }, file: { unit: `tavua`, subject: `tiedoston` }, array: { unit: `alkiota`, subject: `listan` }, set: { unit: `alkiota`, subject: `joukon` }, number: { unit: ``, subject: `luvun` }, bigint: { unit: ``, subject: `suuren kokonaisluvun` }, int: { unit: ``, subject: `kokonaisluvun` }, date: { unit: ``, subject: `päivämäärän` } }; function t(t) { return e[t] ?? null; } let n = { regex: `säännöllinen lauseke`, email: `sähköpostiosoite`, url: `URL-osoite`, emoji: `emoji`, uuid: `UUID`, uuidv4: `UUIDv4`, uuidv6: `UUIDv6`, nanoid: `nanoid`, guid: `GUID`, cuid: `cuid`, cuid2: `cuid2`, ulid: `ULID`, xid: `XID`, ksuid: `KSUID`, datetime: `ISO-aikaleima`, date: `ISO-päivämäärä`, time: `ISO-aika`, duration: `ISO-kesto`, ipv4: `IPv4-osoite`, ipv6: `IPv6-osoite`, cidrv4: `IPv4-alue`, cidrv6: `IPv6-alue`, base64: `base64-koodattu merkkijono`, base64url: `base64url-koodattu merkkijono`, json_string: `JSON-merkkijono`, e164: `E.164-luku`, jwt: `JWT`, template_literal: `templaattimerkkijono` }, r = { nan: `NaN` }; return (e) => { switch (e.code) { case `invalid_type`: { let t = r[e.expected] ?? e.expected, n = D$9(e.input), i = r[n] ?? n; return /^[A-Z]/.test(e.expected) ? `Virheellinen tyyppi: odotettiin instanceof ${e.expected}, oli ${i}` : `Virheellinen tyyppi: odotettiin ${t}, oli ${i}`; } case `invalid_value`: return e.values.length === 1 ? `Virheellinen syöte: täytyy olla ${E$10(e.values[0])}` : `Virheellinen valinta: täytyy olla yksi seuraavista: ${C$10(e.values, `|`)}`; case `too_big`: { let n = e.inclusive ? `<=` : `<`, r = t(e.origin); return r ? `Liian suuri: ${r.subject} täytyy olla ${n}${e.maximum.toString()} ${r.unit}`.trim() : `Liian suuri: arvon täytyy olla ${n}${e.maximum.toString()}`; } case `too_small`: { let n = e.inclusive ? `>=` : `>`, r = t(e.origin); return r ? `Liian pieni: ${r.subject} täytyy olla ${n}${e.minimum.toString()} ${r.unit}`.trim() : `Liian pieni: arvon täytyy olla ${n}${e.minimum.toString()}`; } case `invalid_format`: { let t = e; return t.format === `starts_with` ? `Virheellinen syöte: täytyy alkaa "${t.prefix}"` : t.format === `ends_with` ? `Virheellinen syöte: täytyy loppua "${t.suffix}"` : t.format === `includes` ? `Virheellinen syöte: täytyy sisältää "${t.includes}"` : t.format === `regex` ? `Virheellinen syöte: täytyy vastata säännöllistä lauseketta ${t.pattern}` : `Virheellinen ${n[t.format] ?? e.format}`; } case `not_multiple_of`: return `Virheellinen luku: täytyy olla luvun ${e.divisor} monikerta`; case `unrecognized_keys`: return `${e.keys.length > 1 ? `Tuntemattomat avaimet` : `Tuntematon avain`}: ${C$10(e.keys, `, `)}`; case `invalid_key`: return `Virheellinen avain tietueessa`; case `invalid_union`: return `Virheellinen unioni`; case `invalid_element`: return `Virheellinen arvo joukossa`; default: return `Virheellinen syöte`; } }; }; function po$2() { return { localeError: fo$2() }; } const mo$2 = () => { let e = { string: { unit: `caractères`, verb: `avoir` }, file: { unit: `octets`, verb: `avoir` }, array: { unit: `éléments`, verb: `avoir` }, set: { unit: `éléments`, verb: `avoir` } }; function t(t) { return e[t] ?? null; } let n = { regex: `entrée`, email: `adresse e-mail`, url: `URL`, emoji: `emoji`, uuid: `UUID`, uuidv4: `UUIDv4`, uuidv6: `UUIDv6`, nanoid: `nanoid`, guid: `GUID`, cuid: `cuid`, cuid2: `cuid2`, ulid: `ULID`, xid: `XID`, ksuid: `KSUID`, datetime: `date et heure ISO`, date: `date ISO`, time: `heure ISO`, duration: `durée ISO`, ipv4: `adresse IPv4`, ipv6: `adresse IPv6`, cidrv4: `plage IPv4`, cidrv6: `plage IPv6`, base64: `chaîne encodée en base64`, base64url: `chaîne encodée en base64url`, json_string: `chaîne JSON`, e164: `numéro E.164`, jwt: `JWT`, template_literal: `entrée` }, r = { nan: `NaN`, number: `nombre`, array: `tableau` }; return (e) => { switch (e.code) { case `invalid_type`: { let t = r[e.expected] ?? e.expected, n = D$9(e.input), i = r[n] ?? n; return /^[A-Z]/.test(e.expected) ? `Entrée invalide : instanceof ${e.expected} attendu, ${i} reçu` : `Entrée invalide : ${t} attendu, ${i} reçu`; } case `invalid_value`: return e.values.length === 1 ? `Entrée invalide : ${E$10(e.values[0])} attendu` : `Option invalide : une valeur parmi ${C$10(e.values, `|`)} attendue`; case `too_big`: { let n = e.inclusive ? `<=` : `<`, r = t(e.origin); return r ? `Trop grand : ${e.origin ?? `valeur`} doit ${r.verb} ${n}${e.maximum.toString()} ${r.unit ?? `élément(s)`}` : `Trop grand : ${e.origin ?? `valeur`} doit être ${n}${e.maximum.toString()}`; } case `too_small`: { let n = e.inclusive ? `>=` : `>`, r = t(e.origin); return r ? `Trop petit : ${e.origin} doit ${r.verb} ${n}${e.minimum.toString()} ${r.unit}` : `Trop petit : ${e.origin} doit être ${n}${e.minimum.toString()}`; } case `invalid_format`: { let t = e; return t.format === `starts_with` ? `Chaîne invalide : doit commencer par "${t.prefix}"` : t.format === `ends_with` ? `Chaîne invalide : doit se terminer par "${t.suffix}"` : t.format === `includes` ? `Chaîne invalide : doit inclure "${t.includes}"` : t.format === `regex` ? `Chaîne invalide : doit correspondre au modèle ${t.pattern}` : `${n[t.format] ?? e.format} invalide`; } case `not_multiple_of`: return `Nombre invalide : doit être un multiple de ${e.divisor}`; case `unrecognized_keys`: return `Clé${e.keys.length > 1 ? `s` : ``} non reconnue${e.keys.length > 1 ? `s` : ``} : ${C$10(e.keys, `, `)}`; case `invalid_key`: return `Clé invalide dans ${e.origin}`; case `invalid_union`: return `Entrée invalide`; case `invalid_element`: return `Valeur invalide dans ${e.origin}`; default: return `Entrée invalide`; } }; }; function ho$2() { return { localeError: mo$2() }; } const go$2 = () => { let e = { string: { unit: `caractères`, verb: `avoir` }, file: { unit: `octets`, verb: `avoir` }, array: { unit: `éléments`, verb: `avoir` }, set: { unit: `éléments`, verb: `avoir` } }; function t(t) { return e[t] ?? null; } let n = { regex: `entrée`, email: `adresse courriel`, url: `URL`, emoji: `emoji`, uuid: `UUID`, uuidv4: `UUIDv4`, uuidv6: `UUIDv6`, nanoid: `nanoid`, guid: `GUID`, cuid: `cuid`, cuid2: `cuid2`, ulid: `ULID`, xid: `XID`, ksuid: `KSUID`, datetime: `date-heure ISO`, date: `date ISO`, time: `heure ISO`, duration: `durée ISO`, ipv4: `adresse IPv4`, ipv6: `adresse IPv6`, cidrv4: `plage IPv4`, cidrv6: `plage IPv6`, base64: `chaîne encodée en base64`, base64url: `chaîne encodée en base64url`, json_string: `chaîne JSON`, e164: `numéro E.164`, jwt: `JWT`, template_literal: `entrée` }, r = { nan: `NaN` }; return (e) => { switch (e.code) { case `invalid_type`: { let t = r[e.expected] ?? e.expected, n = D$9(e.input), i = r[n] ?? n; return /^[A-Z]/.test(e.expected) ? `Entrée invalide : attendu instanceof ${e.expected}, reçu ${i}` : `Entrée invalide : attendu ${t}, reçu ${i}`; } case `invalid_value`: return e.values.length === 1 ? `Entrée invalide : attendu ${E$10(e.values[0])}` : `Option invalide : attendu l'une des valeurs suivantes ${C$10(e.values, `|`)}`; case `too_big`: { let n = e.inclusive ? `≤` : `<`, r = t(e.origin); return r ? `Trop grand : attendu que ${e.origin ?? `la valeur`} ait ${n}${e.maximum.toString()} ${r.unit}` : `Trop grand : attendu que ${e.origin ?? `la valeur`} soit ${n}${e.maximum.toString()}`; } case `too_small`: { let n = e.inclusive ? `≥` : `>`, r = t(e.origin); return r ? `Trop petit : attendu que ${e.origin} ait ${n}${e.minimum.toString()} ${r.unit}` : `Trop petit : attendu que ${e.origin} soit ${n}${e.minimum.toString()}`; } case `invalid_format`: { let t = e; return t.format === `starts_with` ? `Chaîne invalide : doit commencer par "${t.prefix}"` : t.format === `ends_with` ? `Chaîne invalide : doit se terminer par "${t.suffix}"` : t.format === `includes` ? `Chaîne invalide : doit inclure "${t.includes}"` : t.format === `regex` ? `Chaîne invalide : doit correspondre au motif ${t.pattern}` : `${n[t.format] ?? e.format} invalide`; } case `not_multiple_of`: return `Nombre invalide : doit être un multiple de ${e.divisor}`; case `unrecognized_keys`: return `Clé${e.keys.length > 1 ? `s` : ``} non reconnue${e.keys.length > 1 ? `s` : ``} : ${C$10(e.keys, `, `)}`; case `invalid_key`: return `Clé invalide dans ${e.origin}`; case `invalid_union`: return `Entrée invalide`; case `invalid_element`: return `Valeur invalide dans ${e.origin}`; default: return `Entrée invalide`; } }; }; function _o$2() { return { localeError: go$2() }; } const vo$2 = () => { let e = { string: { label: `מחרוזת`, gender: `f` }, number: { label: `מספר`, gender: `m` }, boolean: { label: `ערך בוליאני`, gender: `m` }, bigint: { label: `BigInt`, gender: `m` }, date: { label: `תאריך`, gender: `m` }, array: { label: `מערך`, gender: `m` }, object: { label: `אובייקט`, gender: `m` }, null: { label: `ערך ריק (null)`, gender: `m` }, undefined: { label: `ערך לא מוגדר (undefined)`, gender: `m` }, symbol: { label: `סימבול (Symbol)`, gender: `m` }, function: { label: `פונקציה`, gender: `f` }, map: { label: `מפה (Map)`, gender: `f` }, set: { label: `קבוצה (Set)`, gender: `f` }, file: { label: `קובץ`, gender: `m` }, promise: { label: `Promise`, gender: `m` }, NaN: { label: `NaN`, gender: `m` }, unknown: { label: `ערך לא ידוע`, gender: `m` }, value: { label: `ערך`, gender: `m` } }, t = { string: { unit: `תווים`, shortLabel: `קצר`, longLabel: `ארוך` }, file: { unit: `בייטים`, shortLabel: `קטן`, longLabel: `גדול` }, array: { unit: `פריטים`, shortLabel: `קטן`, longLabel: `גדול` }, set: { unit: `פריטים`, shortLabel: `קטן`, longLabel: `גדול` }, number: { unit: ``, shortLabel: `קטן`, longLabel: `גדול` } }, n = (t) => t ? e[t] : void 0, r = (t) => { let r = n(t); return r ? r.label : t ?? e.unknown.label; }, i = (e) => `ה${r(e)}`, a = (e) => (n(e)?.gender ?? `m`) === `f` ? `צריכה להיות` : `צריך להיות`, o = (e) => e ? t[e] ?? null : null, s = { regex: { label: `קלט`, gender: `m` }, email: { label: `כתובת אימייל`, gender: `f` }, url: { label: `כתובת רשת`, gender: `f` }, emoji: { label: `אימוג'י`, gender: `m` }, uuid: { label: `UUID`, gender: `m` }, nanoid: { label: `nanoid`, gender: `m` }, guid: { label: `GUID`, gender: `m` }, cuid: { label: `cuid`, gender: `m` }, cuid2: { label: `cuid2`, gender: `m` }, ulid: { label: `ULID`, gender: `m` }, xid: { label: `XID`, gender: `m` }, ksuid: { label: `KSUID`, gender: `m` }, datetime: { label: `תאריך וזמן ISO`, gender: `m` }, date: { label: `תאריך ISO`, gender: `m` }, time: { label: `זמן ISO`, gender: `m` }, duration: { label: `משך זמן ISO`, gender: `m` }, ipv4: { label: `כתובת IPv4`, gender: `f` }, ipv6: { label: `כתובת IPv6`, gender: `f` }, cidrv4: { label: `טווח IPv4`, gender: `m` }, cidrv6: { label: `טווח IPv6`, gender: `m` }, base64: { label: `מחרוזת בבסיס 64`, gender: `f` }, base64url: { label: `מחרוזת בבסיס 64 לכתובות רשת`, gender: `f` }, json_string: { label: `מחרוזת JSON`, gender: `f` }, e164: { label: `מספר E.164`, gender: `m` }, jwt: { label: `JWT`, gender: `m` }, ends_with: { label: `קלט`, gender: `m` }, includes: { label: `קלט`, gender: `m` }, lowercase: { label: `קלט`, gender: `m` }, starts_with: { label: `קלט`, gender: `m` }, uppercase: { label: `קלט`, gender: `m` } }, c = { nan: `NaN` }; return (t) => { switch (t.code) { case `invalid_type`: { let n = t.expected, i = c[n ?? ``] ?? r(n), a = D$9(t.input), o = c[a] ?? e[a]?.label ?? a; return /^[A-Z]/.test(t.expected) ? `קלט לא תקין: צריך להיות instanceof ${t.expected}, התקבל ${o}` : `קלט לא תקין: צריך להיות ${i}, התקבל ${o}`; } case `invalid_value`: { if (t.values.length === 1) return `ערך לא תקין: הערך חייב להיות ${E$10(t.values[0])}`; let e = t.values.map((e) => E$10(e)); if (t.values.length === 2) return `ערך לא תקין: האפשרויות המתאימות הן ${e[0]} או ${e[1]}`; let n = e[e.length - 1]; return `ערך לא תקין: האפשרויות המתאימות הן ${e.slice(0, -1).join(`, `)} או ${n}`; } case `too_big`: { let e = o(t.origin), n = i(t.origin ?? `value`); if (t.origin === `string`) return `${e?.longLabel ?? `ארוך`} מדי: ${n} צריכה להכיל ${t.maximum.toString()} ${e?.unit ?? ``} ${t.inclusive ? `או פחות` : `לכל היותר`}`.trim(); if (t.origin === `number`) return `גדול מדי: ${n} צריך להיות ${t.inclusive ? `קטן או שווה ל-${t.maximum}` : `קטן מ-${t.maximum}`}`; if (t.origin === `array` || t.origin === `set`) return `גדול מדי: ${n} ${t.origin === `set` ? `צריכה` : `צריך`} להכיל ${t.inclusive ? `${t.maximum} ${e?.unit ?? ``} או פחות` : `פחות מ-${t.maximum} ${e?.unit ?? ``}`}`.trim(); let r = t.inclusive ? `<=` : `<`, s = a(t.origin ?? `value`); return e?.unit ? `${e.longLabel} מדי: ${n} ${s} ${r}${t.maximum.toString()} ${e.unit}` : `${e?.longLabel ?? `גדול`} מדי: ${n} ${s} ${r}${t.maximum.toString()}`; } case `too_small`: { let e = o(t.origin), n = i(t.origin ?? `value`); if (t.origin === `string`) return `${e?.shortLabel ?? `קצר`} מדי: ${n} צריכה להכיל ${t.minimum.toString()} ${e?.unit ?? ``} ${t.inclusive ? `או יותר` : `לפחות`}`.trim(); if (t.origin === `number`) return `קטן מדי: ${n} צריך להיות ${t.inclusive ? `גדול או שווה ל-${t.minimum}` : `גדול מ-${t.minimum}`}`; if (t.origin === `array` || t.origin === `set`) { let r = t.origin === `set` ? `צריכה` : `צריך`; return t.minimum === 1 && t.inclusive ? `קטן מדי: ${n} ${r} להכיל ${t.origin, `לפחות פריט אחד`}` : `קטן מדי: ${n} ${r} להכיל ${t.inclusive ? `${t.minimum} ${e?.unit ?? ``} או יותר` : `יותר מ-${t.minimum} ${e?.unit ?? ``}`}`.trim(); } let r = t.inclusive ? `>=` : `>`, s = a(t.origin ?? `value`); return e?.unit ? `${e.shortLabel} מדי: ${n} ${s} ${r}${t.minimum.toString()} ${e.unit}` : `${e?.shortLabel ?? `קטן`} מדי: ${n} ${s} ${r}${t.minimum.toString()}`; } case `invalid_format`: { let e = t; if (e.format === `starts_with`) return `המחרוזת חייבת להתחיל ב "${e.prefix}"`; if (e.format === `ends_with`) return `המחרוזת חייבת להסתיים ב "${e.suffix}"`; if (e.format === `includes`) return `המחרוזת חייבת לכלול "${e.includes}"`; if (e.format === `regex`) return `המחרוזת חייבת להתאים לתבנית ${e.pattern}`; let n = s[e.format]; return `${n?.label ?? e.format} לא ${(n?.gender ?? `m`) === `f` ? `תקינה` : `תקין`}`; } case `not_multiple_of`: return `מספר לא תקין: חייב להיות מכפלה של ${t.divisor}`; case `unrecognized_keys`: return `מפתח${t.keys.length > 1 ? `ות` : ``} לא מזוה${t.keys.length > 1 ? `ים` : `ה`}: ${C$10(t.keys, `, `)}`; case `invalid_key`: return `שדה לא תקין באובייקט`; case `invalid_union`: return `קלט לא תקין`; case `invalid_element`: return `ערך לא תקין ב${i(t.origin ?? `array`)}`; default: return `קלט לא תקין`; } }; }; function yo$2() { return { localeError: vo$2() }; } const bo$2 = () => { let e = { string: { unit: `karakter`, verb: `legyen` }, file: { unit: `byte`, verb: `legyen` }, array: { unit: `elem`, verb: `legyen` }, set: { unit: `elem`, verb: `legyen` } }; function t(t) { return e[t] ?? null; } let n = { regex: `bemenet`, email: `email cím`, url: `URL`, emoji: `emoji`, uuid: `UUID`, uuidv4: `UUIDv4`, uuidv6: `UUIDv6`, nanoid: `nanoid`, guid: `GUID`, cuid: `cuid`, cuid2: `cuid2`, ulid: `ULID`, xid: `XID`, ksuid: `KSUID`, datetime: `ISO időbélyeg`, date: `ISO dátum`, time: `ISO idő`, duration: `ISO időintervallum`, ipv4: `IPv4 cím`, ipv6: `IPv6 cím`, cidrv4: `IPv4 tartomány`, cidrv6: `IPv6 tartomány`, base64: `base64-kódolt string`, base64url: `base64url-kódolt string`, json_string: `JSON string`, e164: `E.164 szám`, jwt: `JWT`, template_literal: `bemenet` }, r = { nan: `NaN`, number: `szám`, array: `tömb` }; return (e) => { switch (e.code) { case `invalid_type`: { let t = r[e.expected] ?? e.expected, n = D$9(e.input), i = r[n] ?? n; return /^[A-Z]/.test(e.expected) ? `Érvénytelen bemenet: a várt érték instanceof ${e.expected}, a kapott érték ${i}` : `Érvénytelen bemenet: a várt érték ${t}, a kapott érték ${i}`; } case `invalid_value`: return e.values.length === 1 ? `Érvénytelen bemenet: a várt érték ${E$10(e.values[0])}` : `Érvénytelen opció: valamelyik érték várt ${C$10(e.values, `|`)}`; case `too_big`: { let n = e.inclusive ? `<=` : `<`, r = t(e.origin); return r ? `Túl nagy: ${e.origin ?? `érték`} mérete túl nagy ${n}${e.maximum.toString()} ${r.unit ?? `elem`}` : `Túl nagy: a bemeneti érték ${e.origin ?? `érték`} túl nagy: ${n}${e.maximum.toString()}`; } case `too_small`: { let n = e.inclusive ? `>=` : `>`, r = t(e.origin); return r ? `Túl kicsi: a bemeneti érték ${e.origin} mérete túl kicsi ${n}${e.minimum.toString()} ${r.unit}` : `Túl kicsi: a bemeneti érték ${e.origin} túl kicsi ${n}${e.minimum.toString()}`; } case `invalid_format`: { let t = e; return t.format === `starts_with` ? `Érvénytelen string: "${t.prefix}" értékkel kell kezdődnie` : t.format === `ends_with` ? `Érvénytelen string: "${t.suffix}" értékkel kell végződnie` : t.format === `includes` ? `Érvénytelen string: "${t.includes}" értéket kell tartalmaznia` : t.format === `regex` ? `Érvénytelen string: ${t.pattern} mintának kell megfelelnie` : `Érvénytelen ${n[t.format] ?? e.format}`; } case `not_multiple_of`: return `Érvénytelen szám: ${e.divisor} többszörösének kell lennie`; case `unrecognized_keys`: return `Ismeretlen kulcs${e.keys.length > 1 ? `s` : ``}: ${C$10(e.keys, `, `)}`; case `invalid_key`: return `Érvénytelen kulcs ${e.origin}`; case `invalid_union`: return `Érvénytelen bemenet`; case `invalid_element`: return `Érvénytelen érték: ${e.origin}`; default: return `Érvénytelen bemenet`; } }; }; function xo$2() { return { localeError: bo$2() }; } function So$2(e, t, n) { return Math.abs(e) === 1 ? t : n; } function Co$2(e) { if (!e) return ``; let t = [ `ա`, `ե`, `ը`, `ի`, `ո`, `ու`, `օ` ], n = e[e.length - 1]; return e + (t.includes(n) ? `ն` : `ը`); } const wo$2 = () => { let e = { string: { unit: { one: `նշան`, many: `նշաններ` }, verb: `ունենալ` }, file: { unit: { one: `բայթ`, many: `բայթեր` }, verb: `ունենալ` }, array: { unit: { one: `տարր`, many: `տարրեր` }, verb: `ունենալ` }, set: { unit: { one: `տարր`, many: `տարրեր` }, verb: `ունենալ` } }; function t(t) { return e[t] ?? null; } let n = { regex: `մուտք`, email: `էլ. հասցե`, url: `URL`, emoji: `էմոջի`, uuid: `UUID`, uuidv4: `UUIDv4`, uuidv6: `UUIDv6`, nanoid: `nanoid`, guid: `GUID`, cuid: `cuid`, cuid2: `cuid2`, ulid: `ULID`, xid: `XID`, ksuid: `KSUID`, datetime: `ISO ամսաթիվ և ժամ`, date: `ISO ամսաթիվ`, time: `ISO ժամ`, duration: `ISO տևողություն`, ipv4: `IPv4 հասցե`, ipv6: `IPv6 հասցե`, cidrv4: `IPv4 միջակայք`, cidrv6: `IPv6 միջակայք`, base64: `base64 ձևաչափով տող`, base64url: `base64url ձևաչափով տող`, json_string: `JSON տող`, e164: `E.164 համար`, jwt: `JWT`, template_literal: `մուտք` }, r = { nan: `NaN`, number: `թիվ`, array: `զանգված` }; return (e) => { switch (e.code) { case `invalid_type`: { let t = r[e.expected] ?? e.expected, n = D$9(e.input), i = r[n] ?? n; return /^[A-Z]/.test(e.expected) ? `Սխալ մուտքագրում․ սպասվում էր instanceof ${e.expected}, ստացվել է ${i}` : `Սխալ մուտքագրում․ սպասվում էր ${t}, ստացվել է ${i}`; } case `invalid_value`: return e.values.length === 1 ? `Սխալ մուտքագրում․ սպասվում էր ${E$10(e.values[1])}` : `Սխալ տարբերակ․ սպասվում էր հետևյալներից մեկը՝ ${C$10(e.values, `|`)}`; case `too_big`: { let n = e.inclusive ? `<=` : `<`, r = t(e.origin); if (r) { let t = So$2(Number(e.maximum), r.unit.one, r.unit.many); return `Չափազանց մեծ արժեք․ սպասվում է, որ ${Co$2(e.origin ?? `արժեք`)} կունենա ${n}${e.maximum.toString()} ${t}`; } return `Չափազանց մեծ արժեք․ սպասվում է, որ ${Co$2(e.origin ?? `արժեք`)} լինի ${n}${e.maximum.toString()}`; } case `too_small`: { let n = e.inclusive ? `>=` : `>`, r = t(e.origin); if (r) { let t = So$2(Number(e.minimum), r.unit.one, r.unit.many); return `Չափազանց փոքր արժեք․ սպասվում է, որ ${Co$2(e.origin)} կունենա ${n}${e.minimum.toString()} ${t}`; } return `Չափազանց փոքր արժեք․ սպասվում է, որ ${Co$2(e.origin)} լինի ${n}${e.minimum.toString()}`; } case `invalid_format`: { let t = e; return t.format === `starts_with` ? `Սխալ տող․ պետք է սկսվի "${t.prefix}"-ով` : t.format === `ends_with` ? `Սխալ տող․ պետք է ավարտվի "${t.suffix}"-ով` : t.format === `includes` ? `Սխալ տող․ պետք է պարունակի "${t.includes}"` : t.format === `regex` ? `Սխալ տող․ պետք է համապատասխանի ${t.pattern} ձևաչափին` : `Սխալ ${n[t.format] ?? e.format}`; } case `not_multiple_of`: return `Սխալ թիվ․ պետք է բազմապատիկ լինի ${e.divisor}-ի`; case `unrecognized_keys`: return `Չճանաչված բանալի${e.keys.length > 1 ? `ներ` : ``}. ${C$10(e.keys, `, `)}`; case `invalid_key`: return `Սխալ բանալի ${Co$2(e.origin)}-ում`; case `invalid_union`: return `Սխալ մուտքագրում`; case `invalid_element`: return `Սխալ արժեք ${Co$2(e.origin)}-ում`; default: return `Սխալ մուտքագրում`; } }; }; function To$2() { return { localeError: wo$2() }; } const Eo$2 = () => { let e = { string: { unit: `karakter`, verb: `memiliki` }, file: { unit: `byte`, verb: `memiliki` }, array: { unit: `item`, verb: `memiliki` }, set: { unit: `item`, verb: `memiliki` } }; function t(t) { return e[t] ?? null; } let n = { regex: `input`, email: `alamat email`, url: `URL`, emoji: `emoji`, uuid: `UUID`, uuidv4: `UUIDv4`, uuidv6: `UUIDv6`, nanoid: `nanoid`, guid: `GUID`, cuid: `cuid`, cuid2: `cuid2`, ulid: `ULID`, xid: `XID`, ksuid: `KSUID`, datetime: `tanggal dan waktu format ISO`, date: `tanggal format ISO`, time: `jam format ISO`, duration: `durasi format ISO`, ipv4: `alamat IPv4`, ipv6: `alamat IPv6`, cidrv4: `rentang alamat IPv4`, cidrv6: `rentang alamat IPv6`, base64: `string dengan enkode base64`, base64url: `string dengan enkode base64url`, json_string: `string JSON`, e164: `angka E.164`, jwt: `JWT`, template_literal: `input` }, r = { nan: `NaN` }; return (e) => { switch (e.code) { case `invalid_type`: { let t = r[e.expected] ?? e.expected, n = D$9(e.input), i = r[n] ?? n; return /^[A-Z]/.test(e.expected) ? `Input tidak valid: diharapkan instanceof ${e.expected}, diterima ${i}` : `Input tidak valid: diharapkan ${t}, diterima ${i}`; } case `invalid_value`: return e.values.length === 1 ? `Input tidak valid: diharapkan ${E$10(e.values[0])}` : `Pilihan tidak valid: diharapkan salah satu dari ${C$10(e.values, `|`)}`; case `too_big`: { let n = e.inclusive ? `<=` : `<`, r = t(e.origin); return r ? `Terlalu besar: diharapkan ${e.origin ?? `value`} memiliki ${n}${e.maximum.toString()} ${r.unit ?? `elemen`}` : `Terlalu besar: diharapkan ${e.origin ?? `value`} menjadi ${n}${e.maximum.toString()}`; } case `too_small`: { let n = e.inclusive ? `>=` : `>`, r = t(e.origin); return r ? `Terlalu kecil: diharapkan ${e.origin} memiliki ${n}${e.minimum.toString()} ${r.unit}` : `Terlalu kecil: diharapkan ${e.origin} menjadi ${n}${e.minimum.toString()}`; } case `invalid_format`: { let t = e; return t.format === `starts_with` ? `String tidak valid: harus dimulai dengan "${t.prefix}"` : t.format === `ends_with` ? `String tidak valid: harus berakhir dengan "${t.suffix}"` : t.format === `includes` ? `String tidak valid: harus menyertakan "${t.includes}"` : t.format === `regex` ? `String tidak valid: harus sesuai pola ${t.pattern}` : `${n[t.format] ?? e.format} tidak valid`; } case `not_multiple_of`: return `Angka tidak valid: harus kelipatan dari ${e.divisor}`; case `unrecognized_keys`: return `Kunci tidak dikenali ${e.keys.length > 1 ? `s` : ``}: ${C$10(e.keys, `, `)}`; case `invalid_key`: return `Kunci tidak valid di ${e.origin}`; case `invalid_union`: return `Input tidak valid`; case `invalid_element`: return `Nilai tidak valid di ${e.origin}`; default: return `Input tidak valid`; } }; }; function Do$2() { return { localeError: Eo$2() }; } const Oo$2 = () => { let e = { string: { unit: `stafi`, verb: `að hafa` }, file: { unit: `bæti`, verb: `að hafa` }, array: { unit: `hluti`, verb: `að hafa` }, set: { unit: `hluti`, verb: `að hafa` } }; function t(t) { return e[t] ?? null; } let n = { regex: `gildi`, email: `netfang`, url: `vefslóð`, emoji: `emoji`, uuid: `UUID`, uuidv4: `UUIDv4`, uuidv6: `UUIDv6`, nanoid: `nanoid`, guid: `GUID`, cuid: `cuid`, cuid2: `cuid2`, ulid: `ULID`, xid: `XID`, ksuid: `KSUID`, datetime: `ISO dagsetning og tími`, date: `ISO dagsetning`, time: `ISO tími`, duration: `ISO tímalengd`, ipv4: `IPv4 address`, ipv6: `IPv6 address`, cidrv4: `IPv4 range`, cidrv6: `IPv6 range`, base64: `base64-encoded strengur`, base64url: `base64url-encoded strengur`, json_string: `JSON strengur`, e164: `E.164 tölugildi`, jwt: `JWT`, template_literal: `gildi` }, r = { nan: `NaN`, number: `númer`, array: `fylki` }; return (e) => { switch (e.code) { case `invalid_type`: { let t = r[e.expected] ?? e.expected, n = D$9(e.input), i = r[n] ?? n; return /^[A-Z]/.test(e.expected) ? `Rangt gildi: Þú slóst inn ${i} þar sem á að vera instanceof ${e.expected}` : `Rangt gildi: Þú slóst inn ${i} þar sem á að vera ${t}`; } case `invalid_value`: return e.values.length === 1 ? `Rangt gildi: gert ráð fyrir ${E$10(e.values[0])}` : `Ógilt val: má vera eitt af eftirfarandi ${C$10(e.values, `|`)}`; case `too_big`: { let n = e.inclusive ? `<=` : `<`, r = t(e.origin); return r ? `Of stórt: gert er ráð fyrir að ${e.origin ?? `gildi`} hafi ${n}${e.maximum.toString()} ${r.unit ?? `hluti`}` : `Of stórt: gert er ráð fyrir að ${e.origin ?? `gildi`} sé ${n}${e.maximum.toString()}`; } case `too_small`: { let n = e.inclusive ? `>=` : `>`, r = t(e.origin); return r ? `Of lítið: gert er ráð fyrir að ${e.origin} hafi ${n}${e.minimum.toString()} ${r.unit}` : `Of lítið: gert er ráð fyrir að ${e.origin} sé ${n}${e.minimum.toString()}`; } case `invalid_format`: { let t = e; return t.format === `starts_with` ? `Ógildur strengur: verður að byrja á "${t.prefix}"` : t.format === `ends_with` ? `Ógildur strengur: verður að enda á "${t.suffix}"` : t.format === `includes` ? `Ógildur strengur: verður að innihalda "${t.includes}"` : t.format === `regex` ? `Ógildur strengur: verður að fylgja mynstri ${t.pattern}` : `Rangt ${n[t.format] ?? e.format}`; } case `not_multiple_of`: return `Röng tala: verður að vera margfeldi af ${e.divisor}`; case `unrecognized_keys`: return `Óþekkt ${e.keys.length > 1 ? `ir lyklar` : `ur lykill`}: ${C$10(e.keys, `, `)}`; case `invalid_key`: return `Rangur lykill í ${e.origin}`; case `invalid_union`: return `Rangt gildi`; case `invalid_element`: return `Rangt gildi í ${e.origin}`; default: return `Rangt gildi`; } }; }; function ko$2() { return { localeError: Oo$2() }; } const Ao$2 = () => { let e = { string: { unit: `caratteri`, verb: `avere` }, file: { unit: `byte`, verb: `avere` }, array: { unit: `elementi`, verb: `avere` }, set: { unit: `elementi`, verb: `avere` } }; function t(t) { return e[t] ?? null; } let n = { regex: `input`, email: `indirizzo email`, url: `URL`, emoji: `emoji`, uuid: `UUID`, uuidv4: `UUIDv4`, uuidv6: `UUIDv6`, nanoid: `nanoid`, guid: `GUID`, cuid: `cuid`, cuid2: `cuid2`, ulid: `ULID`, xid: `XID`, ksuid: `KSUID`, datetime: `data e ora ISO`, date: `data ISO`, time: `ora ISO`, duration: `durata ISO`, ipv4: `indirizzo IPv4`, ipv6: `indirizzo IPv6`, cidrv4: `intervallo IPv4`, cidrv6: `intervallo IPv6`, base64: `stringa codificata in base64`, base64url: `URL codificata in base64`, json_string: `stringa JSON`, e164: `numero E.164`, jwt: `JWT`, template_literal: `input` }, r = { nan: `NaN`, number: `numero`, array: `vettore` }; return (e) => { switch (e.code) { case `invalid_type`: { let t = r[e.expected] ?? e.expected, n = D$9(e.input), i = r[n] ?? n; return /^[A-Z]/.test(e.expected) ? `Input non valido: atteso instanceof ${e.expected}, ricevuto ${i}` : `Input non valido: atteso ${t}, ricevuto ${i}`; } case `invalid_value`: return e.values.length === 1 ? `Input non valido: atteso ${E$10(e.values[0])}` : `Opzione non valida: atteso uno tra ${C$10(e.values, `|`)}`; case `too_big`: { let n = e.inclusive ? `<=` : `<`, r = t(e.origin); return r ? `Troppo grande: ${e.origin ?? `valore`} deve avere ${n}${e.maximum.toString()} ${r.unit ?? `elementi`}` : `Troppo grande: ${e.origin ?? `valore`} deve essere ${n}${e.maximum.toString()}`; } case `too_small`: { let n = e.inclusive ? `>=` : `>`, r = t(e.origin); return r ? `Troppo piccolo: ${e.origin} deve avere ${n}${e.minimum.toString()} ${r.unit}` : `Troppo piccolo: ${e.origin} deve essere ${n}${e.minimum.toString()}`; } case `invalid_format`: { let t = e; return t.format === `starts_with` ? `Stringa non valida: deve iniziare con "${t.prefix}"` : t.format === `ends_with` ? `Stringa non valida: deve terminare con "${t.suffix}"` : t.format === `includes` ? `Stringa non valida: deve includere "${t.includes}"` : t.format === `regex` ? `Stringa non valida: deve corrispondere al pattern ${t.pattern}` : `Invalid ${n[t.format] ?? e.format}`; } case `not_multiple_of`: return `Numero non valido: deve essere un multiplo di ${e.divisor}`; case `unrecognized_keys`: return `Chiav${e.keys.length > 1 ? `i` : `e`} non riconosciut${e.keys.length > 1 ? `e` : `a`}: ${C$10(e.keys, `, `)}`; case `invalid_key`: return `Chiave non valida in ${e.origin}`; case `invalid_union`: return `Input non valido`; case `invalid_element`: return `Valore non valido in ${e.origin}`; default: return `Input non valido`; } }; }; function jo$2() { return { localeError: Ao$2() }; } const Mo$2 = () => { let e = { string: { unit: `文字`, verb: `である` }, file: { unit: `バイト`, verb: `である` }, array: { unit: `要素`, verb: `である` }, set: { unit: `要素`, verb: `である` } }; function t(t) { return e[t] ?? null; } let n = { regex: `入力値`, email: `メールアドレス`, url: `URL`, emoji: `絵文字`, uuid: `UUID`, uuidv4: `UUIDv4`, uuidv6: `UUIDv6`, nanoid: `nanoid`, guid: `GUID`, cuid: `cuid`, cuid2: `cuid2`, ulid: `ULID`, xid: `XID`, ksuid: `KSUID`, datetime: `ISO日時`, date: `ISO日付`, time: `ISO時刻`, duration: `ISO期間`, ipv4: `IPv4アドレス`, ipv6: `IPv6アドレス`, cidrv4: `IPv4範囲`, cidrv6: `IPv6範囲`, base64: `base64エンコード文字列`, base64url: `base64urlエンコード文字列`, json_string: `JSON文字列`, e164: `E.164番号`, jwt: `JWT`, template_literal: `入力値` }, r = { nan: `NaN`, number: `数値`, array: `配列` }; return (e) => { switch (e.code) { case `invalid_type`: { let t = r[e.expected] ?? e.expected, n = D$9(e.input), i = r[n] ?? n; return /^[A-Z]/.test(e.expected) ? `無効な入力: instanceof ${e.expected}が期待されましたが、${i}が入力されました` : `無効な入力: ${t}が期待されましたが、${i}が入力されました`; } case `invalid_value`: return e.values.length === 1 ? `無効な入力: ${E$10(e.values[0])}が期待されました` : `無効な選択: ${C$10(e.values, `、`)}のいずれかである必要があります`; case `too_big`: { let n = e.inclusive ? `以下である` : `より小さい`, r = t(e.origin); return r ? `大きすぎる値: ${e.origin ?? `値`}は${e.maximum.toString()}${r.unit ?? `要素`}${n}必要があります` : `大きすぎる値: ${e.origin ?? `値`}は${e.maximum.toString()}${n}必要があります`; } case `too_small`: { let n = e.inclusive ? `以上である` : `より大きい`, r = t(e.origin); return r ? `小さすぎる値: ${e.origin}は${e.minimum.toString()}${r.unit}${n}必要があります` : `小さすぎる値: ${e.origin}は${e.minimum.toString()}${n}必要があります`; } case `invalid_format`: { let t = e; return t.format === `starts_with` ? `無効な文字列: "${t.prefix}"で始まる必要があります` : t.format === `ends_with` ? `無効な文字列: "${t.suffix}"で終わる必要があります` : t.format === `includes` ? `無効な文字列: "${t.includes}"を含む必要があります` : t.format === `regex` ? `無効な文字列: パターン${t.pattern}に一致する必要があります` : `無効な${n[t.format] ?? e.format}`; } case `not_multiple_of`: return `無効な数値: ${e.divisor}の倍数である必要があります`; case `unrecognized_keys`: return `認識されていないキー${e.keys.length > 1 ? `群` : ``}: ${C$10(e.keys, `、`)}`; case `invalid_key`: return `${e.origin}内の無効なキー`; case `invalid_union`: return `無効な入力`; case `invalid_element`: return `${e.origin}内の無効な値`; default: return `無効な入力`; } }; }; function No$2() { return { localeError: Mo$2() }; } const Po$2 = () => { let e = { string: { unit: `სიმბოლო`, verb: `უნდა შეიცავდეს` }, file: { unit: `ბაიტი`, verb: `უნდა შეიცავდეს` }, array: { unit: `ელემენტი`, verb: `უნდა შეიცავდეს` }, set: { unit: `ელემენტი`, verb: `უნდა შეიცავდეს` } }; function t(t) { return e[t] ?? null; } let n = { regex: `შეყვანა`, email: `ელ-ფოსტის მისამართი`, url: `URL`, emoji: `ემოჯი`, uuid: `UUID`, uuidv4: `UUIDv4`, uuidv6: `UUIDv6`, nanoid: `nanoid`, guid: `GUID`, cuid: `cuid`, cuid2: `cuid2`, ulid: `ULID`, xid: `XID`, ksuid: `KSUID`, datetime: `თარიღი-დრო`, date: `თარიღი`, time: `დრო`, duration: `ხანგრძლივობა`, ipv4: `IPv4 მისამართი`, ipv6: `IPv6 მისამართი`, cidrv4: `IPv4 დიაპაზონი`, cidrv6: `IPv6 დიაპაზონი`, base64: `base64-კოდირებული სტრინგი`, base64url: `base64url-კოდირებული სტრინგი`, json_string: `JSON სტრინგი`, e164: `E.164 ნომერი`, jwt: `JWT`, template_literal: `შეყვანა` }, r = { nan: `NaN`, number: `რიცხვი`, string: `სტრინგი`, boolean: `ბულეანი`, function: `ფუნქცია`, array: `მასივი` }; return (e) => { switch (e.code) { case `invalid_type`: { let t = r[e.expected] ?? e.expected, n = D$9(e.input), i = r[n] ?? n; return /^[A-Z]/.test(e.expected) ? `არასწორი შეყვანა: მოსალოდნელი instanceof ${e.expected}, მიღებული ${i}` : `არასწორი შეყვანა: მოსალოდნელი ${t}, მიღებული ${i}`; } case `invalid_value`: return e.values.length === 1 ? `არასწორი შეყვანა: მოსალოდნელი ${E$10(e.values[0])}` : `არასწორი ვარიანტი: მოსალოდნელია ერთ-ერთი ${C$10(e.values, `|`)}-დან`; case `too_big`: { let n = e.inclusive ? `<=` : `<`, r = t(e.origin); return r ? `ზედმეტად დიდი: მოსალოდნელი ${e.origin ?? `მნიშვნელობა`} ${r.verb} ${n}${e.maximum.toString()} ${r.unit}` : `ზედმეტად დიდი: მოსალოდნელი ${e.origin ?? `მნიშვნელობა`} იყოს ${n}${e.maximum.toString()}`; } case `too_small`: { let n = e.inclusive ? `>=` : `>`, r = t(e.origin); return r ? `ზედმეტად პატარა: მოსალოდნელი ${e.origin} ${r.verb} ${n}${e.minimum.toString()} ${r.unit}` : `ზედმეტად პატარა: მოსალოდნელი ${e.origin} იყოს ${n}${e.minimum.toString()}`; } case `invalid_format`: { let t = e; return t.format === `starts_with` ? `არასწორი სტრინგი: უნდა იწყებოდეს "${t.prefix}"-ით` : t.format === `ends_with` ? `არასწორი სტრინგი: უნდა მთავრდებოდეს "${t.suffix}"-ით` : t.format === `includes` ? `არასწორი სტრინგი: უნდა შეიცავდეს "${t.includes}"-ს` : t.format === `regex` ? `არასწორი სტრინგი: უნდა შეესაბამებოდეს შაბლონს ${t.pattern}` : `არასწორი ${n[t.format] ?? e.format}`; } case `not_multiple_of`: return `არასწორი რიცხვი: უნდა იყოს ${e.divisor}-ის ჯერადი`; case `unrecognized_keys`: return `უცნობი გასაღებ${e.keys.length > 1 ? `ები` : `ი`}: ${C$10(e.keys, `, `)}`; case `invalid_key`: return `არასწორი გასაღები ${e.origin}-ში`; case `invalid_union`: return `არასწორი შეყვანა`; case `invalid_element`: return `არასწორი მნიშვნელობა ${e.origin}-ში`; default: return `არასწორი შეყვანა`; } }; }; function Fo$2() { return { localeError: Po$2() }; } const Io$2 = () => { let e = { string: { unit: `តួអក្សរ`, verb: `គួរមាន` }, file: { unit: `បៃ`, verb: `គួរមាន` }, array: { unit: `ធាតុ`, verb: `គួរមាន` }, set: { unit: `ធាតុ`, verb: `គួរមាន` } }; function t(t) { return e[t] ?? null; } let n = { regex: `ទិន្នន័យបញ្ចូល`, email: `អាសយដ្ឋានអ៊ីមែល`, url: `URL`, emoji: `សញ្ញាអារម្មណ៍`, uuid: `UUID`, uuidv4: `UUIDv4`, uuidv6: `UUIDv6`, nanoid: `nanoid`, guid: `GUID`, cuid: `cuid`, cuid2: `cuid2`, ulid: `ULID`, xid: `XID`, ksuid: `KSUID`, datetime: `កាលបរិច្ឆេទ និងម៉ោង ISO`, date: `កាលបរិច្ឆេទ ISO`, time: `ម៉ោង ISO`, duration: `រយៈពេល ISO`, ipv4: `អាសយដ្ឋាន IPv4`, ipv6: `អាសយដ្ឋាន IPv6`, cidrv4: `ដែនអាសយដ្ឋាន IPv4`, cidrv6: `ដែនអាសយដ្ឋាន IPv6`, base64: `ខ្សែអក្សរអ៊ិកូដ base64`, base64url: `ខ្សែអក្សរអ៊ិកូដ base64url`, json_string: `ខ្សែអក្សរ JSON`, e164: `លេខ E.164`, jwt: `JWT`, template_literal: `ទិន្នន័យបញ្ចូល` }, r = { nan: `NaN`, number: `លេខ`, array: `អារេ (Array)`, null: `គ្មានតម្លៃ (null)` }; return (e) => { switch (e.code) { case `invalid_type`: { let t = r[e.expected] ?? e.expected, n = D$9(e.input), i = r[n] ?? n; return /^[A-Z]/.test(e.expected) ? `ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ instanceof ${e.expected} ប៉ុន្តែទទួលបាន ${i}` : `ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${t} ប៉ុន្តែទទួលបាន ${i}`; } case `invalid_value`: return e.values.length === 1 ? `ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${E$10(e.values[0])}` : `ជម្រើសមិនត្រឹមត្រូវ៖ ត្រូវជាមួយក្នុងចំណោម ${C$10(e.values, `|`)}`; case `too_big`: { let n = e.inclusive ? `<=` : `<`, r = t(e.origin); return r ? `ធំពេក៖ ត្រូវការ ${e.origin ?? `តម្លៃ`} ${n} ${e.maximum.toString()} ${r.unit ?? `ធាតុ`}` : `ធំពេក៖ ត្រូវការ ${e.origin ?? `តម្លៃ`} ${n} ${e.maximum.toString()}`; } case `too_small`: { let n = e.inclusive ? `>=` : `>`, r = t(e.origin); return r ? `តូចពេក៖ ត្រូវការ ${e.origin} ${n} ${e.minimum.toString()} ${r.unit}` : `តូចពេក៖ ត្រូវការ ${e.origin} ${n} ${e.minimum.toString()}`; } case `invalid_format`: { let t = e; return t.format === `starts_with` ? `ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវចាប់ផ្តើមដោយ "${t.prefix}"` : t.format === `ends_with` ? `ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវបញ្ចប់ដោយ "${t.suffix}"` : t.format === `includes` ? `ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវមាន "${t.includes}"` : t.format === `regex` ? `ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវតែផ្គូផ្គងនឹងទម្រង់ដែលបានកំណត់ ${t.pattern}` : `មិនត្រឹមត្រូវ៖ ${n[t.format] ?? e.format}`; } case `not_multiple_of`: return `លេខមិនត្រឹមត្រូវ៖ ត្រូវតែជាពហុគុណនៃ ${e.divisor}`; case `unrecognized_keys`: return `រកឃើញសោមិនស្គាល់៖ ${C$10(e.keys, `, `)}`; case `invalid_key`: return `សោមិនត្រឹមត្រូវនៅក្នុង ${e.origin}`; case `invalid_union`: return `ទិន្នន័យមិនត្រឹមត្រូវ`; case `invalid_element`: return `ទិន្នន័យមិនត្រឹមត្រូវនៅក្នុង ${e.origin}`; default: return `ទិន្នន័យមិនត្រឹមត្រូវ`; } }; }; function Lo$2() { return { localeError: Io$2() }; } function Ro$2() { return Lo$2(); } const zo$2 = () => { let e = { string: { unit: `문자`, verb: `to have` }, file: { unit: `바이트`, verb: `to have` }, array: { unit: `개`, verb: `to have` }, set: { unit: `개`, verb: `to have` } }; function t(t) { return e[t] ?? null; } let n = { regex: `입력`, email: `이메일 주소`, url: `URL`, emoji: `이모지`, uuid: `UUID`, uuidv4: `UUIDv4`, uuidv6: `UUIDv6`, nanoid: `nanoid`, guid: `GUID`, cuid: `cuid`, cuid2: `cuid2`, ulid: `ULID`, xid: `XID`, ksuid: `KSUID`, datetime: `ISO 날짜시간`, date: `ISO 날짜`, time: `ISO 시간`, duration: `ISO 기간`, ipv4: `IPv4 주소`, ipv6: `IPv6 주소`, cidrv4: `IPv4 범위`, cidrv6: `IPv6 범위`, base64: `base64 인코딩 문자열`, base64url: `base64url 인코딩 문자열`, json_string: `JSON 문자열`, e164: `E.164 번호`, jwt: `JWT`, template_literal: `입력` }, r = { nan: `NaN` }; return (e) => { switch (e.code) { case `invalid_type`: { let t = r[e.expected] ?? e.expected, n = D$9(e.input), i = r[n] ?? n; return /^[A-Z]/.test(e.expected) ? `잘못된 입력: 예상 타입은 instanceof ${e.expected}, 받은 타입은 ${i}입니다` : `잘못된 입력: 예상 타입은 ${t}, 받은 타입은 ${i}입니다`; } case `invalid_value`: return e.values.length === 1 ? `잘못된 입력: 값은 ${E$10(e.values[0])} 이어야 합니다` : `잘못된 옵션: ${C$10(e.values, `또는 `)} 중 하나여야 합니다`; case `too_big`: { let n = e.inclusive ? `이하` : `미만`, r = n === `미만` ? `이어야 합니다` : `여야 합니다`, i = t(e.origin), a = i?.unit ?? `요소`; return i ? `${e.origin ?? `값`}이 너무 큽니다: ${e.maximum.toString()}${a} ${n}${r}` : `${e.origin ?? `값`}이 너무 큽니다: ${e.maximum.toString()} ${n}${r}`; } case `too_small`: { let n = e.inclusive ? `이상` : `초과`, r = n === `이상` ? `이어야 합니다` : `여야 합니다`, i = t(e.origin), a = i?.unit ?? `요소`; return i ? `${e.origin ?? `값`}이 너무 작습니다: ${e.minimum.toString()}${a} ${n}${r}` : `${e.origin ?? `값`}이 너무 작습니다: ${e.minimum.toString()} ${n}${r}`; } case `invalid_format`: { let t = e; return t.format === `starts_with` ? `잘못된 문자열: "${t.prefix}"(으)로 시작해야 합니다` : t.format === `ends_with` ? `잘못된 문자열: "${t.suffix}"(으)로 끝나야 합니다` : t.format === `includes` ? `잘못된 문자열: "${t.includes}"을(를) 포함해야 합니다` : t.format === `regex` ? `잘못된 문자열: 정규식 ${t.pattern} 패턴과 일치해야 합니다` : `잘못된 ${n[t.format] ?? e.format}`; } case `not_multiple_of`: return `잘못된 숫자: ${e.divisor}의 배수여야 합니다`; case `unrecognized_keys`: return `인식할 수 없는 키: ${C$10(e.keys, `, `)}`; case `invalid_key`: return `잘못된 키: ${e.origin}`; case `invalid_union`: return `잘못된 입력`; case `invalid_element`: return `잘못된 값: ${e.origin}`; default: return `잘못된 입력`; } }; }; function Bo$2() { return { localeError: zo$2() }; } const Vo$2 = (e) => e.charAt(0).toUpperCase() + e.slice(1); function Ho$2(e) { let t = Math.abs(e), n = t % 10, r = t % 100; return r >= 11 && r <= 19 || n === 0 ? `many` : n === 1 ? `one` : `few`; } const Uo$2 = () => { let e = { string: { unit: { one: `simbolis`, few: `simboliai`, many: `simbolių` }, verb: { smaller: { inclusive: `turi būti ne ilgesnė kaip`, notInclusive: `turi būti trumpesnė kaip` }, bigger: { inclusive: `turi būti ne trumpesnė kaip`, notInclusive: `turi būti ilgesnė kaip` } } }, file: { unit: { one: `baitas`, few: `baitai`, many: `baitų` }, verb: { smaller: { inclusive: `turi būti ne didesnis kaip`, notInclusive: `turi būti mažesnis kaip` }, bigger: { inclusive: `turi būti ne mažesnis kaip`, notInclusive: `turi būti didesnis kaip` } } }, array: { unit: { one: `elementą`, few: `elementus`, many: `elementų` }, verb: { smaller: { inclusive: `turi turėti ne daugiau kaip`, notInclusive: `turi turėti mažiau kaip` }, bigger: { inclusive: `turi turėti ne mažiau kaip`, notInclusive: `turi turėti daugiau kaip` } } }, set: { unit: { one: `elementą`, few: `elementus`, many: `elementų` }, verb: { smaller: { inclusive: `turi turėti ne daugiau kaip`, notInclusive: `turi turėti mažiau kaip` }, bigger: { inclusive: `turi turėti ne mažiau kaip`, notInclusive: `turi turėti daugiau kaip` } } } }; function t(t, n, r, i) { let a = e[t] ?? null; return a === null ? a : { unit: a.unit[n], verb: a.verb[i][r ? `inclusive` : `notInclusive`] }; } let n = { regex: `įvestis`, email: `el. pašto adresas`, url: `URL`, emoji: `jaustukas`, uuid: `UUID`, uuidv4: `UUIDv4`, uuidv6: `UUIDv6`, nanoid: `nanoid`, guid: `GUID`, cuid: `cuid`, cuid2: `cuid2`, ulid: `ULID`, xid: `XID`, ksuid: `KSUID`, datetime: `ISO data ir laikas`, date: `ISO data`, time: `ISO laikas`, duration: `ISO trukmė`, ipv4: `IPv4 adresas`, ipv6: `IPv6 adresas`, cidrv4: `IPv4 tinklo prefiksas (CIDR)`, cidrv6: `IPv6 tinklo prefiksas (CIDR)`, base64: `base64 užkoduota eilutė`, base64url: `base64url užkoduota eilutė`, json_string: `JSON eilutė`, e164: `E.164 numeris`, jwt: `JWT`, template_literal: `įvestis` }, r = { nan: `NaN`, number: `skaičius`, bigint: `sveikasis skaičius`, string: `eilutė`, boolean: `loginė reikšmė`, undefined: `neapibrėžta reikšmė`, function: `funkcija`, symbol: `simbolis`, array: `masyvas`, object: `objektas`, null: `nulinė reikšmė` }; return (e) => { switch (e.code) { case `invalid_type`: { let t = r[e.expected] ?? e.expected, n = D$9(e.input), i = r[n] ?? n; return /^[A-Z]/.test(e.expected) ? `Gautas tipas ${i}, o tikėtasi - instanceof ${e.expected}` : `Gautas tipas ${i}, o tikėtasi - ${t}`; } case `invalid_value`: return e.values.length === 1 ? `Privalo būti ${E$10(e.values[0])}` : `Privalo būti vienas iš ${C$10(e.values, `|`)} pasirinkimų`; case `too_big`: { let n = r[e.origin] ?? e.origin, i = t(e.origin, Ho$2(Number(e.maximum)), e.inclusive ?? !1, `smaller`); if (i?.verb) return `${Vo$2(n ?? e.origin ?? `reikšmė`)} ${i.verb} ${e.maximum.toString()} ${i.unit ?? `elementų`}`; let a = e.inclusive ? `ne didesnis kaip` : `mažesnis kaip`; return `${Vo$2(n ?? e.origin ?? `reikšmė`)} turi būti ${a} ${e.maximum.toString()} ${i?.unit}`; } case `too_small`: { let n = r[e.origin] ?? e.origin, i = t(e.origin, Ho$2(Number(e.minimum)), e.inclusive ?? !1, `bigger`); if (i?.verb) return `${Vo$2(n ?? e.origin ?? `reikšmė`)} ${i.verb} ${e.minimum.toString()} ${i.unit ?? `elementų`}`; let a = e.inclusive ? `ne mažesnis kaip` : `didesnis kaip`; return `${Vo$2(n ?? e.origin ?? `reikšmė`)} turi būti ${a} ${e.minimum.toString()} ${i?.unit}`; } case `invalid_format`: { let t = e; return t.format === `starts_with` ? `Eilutė privalo prasidėti "${t.prefix}"` : t.format === `ends_with` ? `Eilutė privalo pasibaigti "${t.suffix}"` : t.format === `includes` ? `Eilutė privalo įtraukti "${t.includes}"` : t.format === `regex` ? `Eilutė privalo atitikti ${t.pattern}` : `Neteisingas ${n[t.format] ?? e.format}`; } case `not_multiple_of`: return `Skaičius privalo būti ${e.divisor} kartotinis.`; case `unrecognized_keys`: return `Neatpažint${e.keys.length > 1 ? `i` : `as`} rakt${e.keys.length > 1 ? `ai` : `as`}: ${C$10(e.keys, `, `)}`; case `invalid_key`: return `Rastas klaidingas raktas`; case `invalid_union`: return `Klaidinga įvestis`; case `invalid_element`: return `${Vo$2(r[e.origin] ?? e.origin ?? e.origin ?? `reikšmė`)} turi klaidingą įvestį`; default: return `Klaidinga įvestis`; } }; }; function Wo$2() { return { localeError: Uo$2() }; } const Go$2 = () => { let e = { string: { unit: `знаци`, verb: `да имаат` }, file: { unit: `бајти`, verb: `да имаат` }, array: { unit: `ставки`, verb: `да имаат` }, set: { unit: `ставки`, verb: `да имаат` } }; function t(t) { return e[t] ?? null; } let n = { regex: `внес`, email: `адреса на е-пошта`, url: `URL`, emoji: `емоџи`, uuid: `UUID`, uuidv4: `UUIDv4`, uuidv6: `UUIDv6`, nanoid: `nanoid`, guid: `GUID`, cuid: `cuid`, cuid2: `cuid2`, ulid: `ULID`, xid: `XID`, ksuid: `KSUID`, datetime: `ISO датум и време`, date: `ISO датум`, time: `ISO време`, duration: `ISO времетраење`, ipv4: `IPv4 адреса`, ipv6: `IPv6 адреса`, cidrv4: `IPv4 опсег`, cidrv6: `IPv6 опсег`, base64: `base64-енкодирана низа`, base64url: `base64url-енкодирана низа`, json_string: `JSON низа`, e164: `E.164 број`, jwt: `JWT`, template_literal: `внес` }, r = { nan: `NaN`, number: `број`, array: `низа` }; return (e) => { switch (e.code) { case `invalid_type`: { let t = r[e.expected] ?? e.expected, n = D$9(e.input), i = r[n] ?? n; return /^[A-Z]/.test(e.expected) ? `Грешен внес: се очекува instanceof ${e.expected}, примено ${i}` : `Грешен внес: се очекува ${t}, примено ${i}`; } case `invalid_value`: return e.values.length === 1 ? `Invalid input: expected ${E$10(e.values[0])}` : `Грешана опција: се очекува една ${C$10(e.values, `|`)}`; case `too_big`: { let n = e.inclusive ? `<=` : `<`, r = t(e.origin); return r ? `Премногу голем: се очекува ${e.origin ?? `вредноста`} да има ${n}${e.maximum.toString()} ${r.unit ?? `елементи`}` : `Премногу голем: се очекува ${e.origin ?? `вредноста`} да биде ${n}${e.maximum.toString()}`; } case `too_small`: { let n = e.inclusive ? `>=` : `>`, r = t(e.origin); return r ? `Премногу мал: се очекува ${e.origin} да има ${n}${e.minimum.toString()} ${r.unit}` : `Премногу мал: се очекува ${e.origin} да биде ${n}${e.minimum.toString()}`; } case `invalid_format`: { let t = e; return t.format === `starts_with` ? `Неважечка низа: мора да започнува со "${t.prefix}"` : t.format === `ends_with` ? `Неважечка низа: мора да завршува со "${t.suffix}"` : t.format === `includes` ? `Неважечка низа: мора да вклучува "${t.includes}"` : t.format === `regex` ? `Неважечка низа: мора да одгоара на патернот ${t.pattern}` : `Invalid ${n[t.format] ?? e.format}`; } case `not_multiple_of`: return `Грешен број: мора да биде делив со ${e.divisor}`; case `unrecognized_keys`: return `${e.keys.length > 1 ? `Непрепознаени клучеви` : `Непрепознаен клуч`}: ${C$10(e.keys, `, `)}`; case `invalid_key`: return `Грешен клуч во ${e.origin}`; case `invalid_union`: return `Грешен внес`; case `invalid_element`: return `Грешна вредност во ${e.origin}`; default: return `Грешен внес`; } }; }; function Ko$2() { return { localeError: Go$2() }; } const qo$2 = () => { let e = { string: { unit: `aksara`, verb: `mempunyai` }, file: { unit: `bait`, verb: `mempunyai` }, array: { unit: `elemen`, verb: `mempunyai` }, set: { unit: `elemen`, verb: `mempunyai` } }; function t(t) { return e[t] ?? null; } let n = { regex: `input`, email: `alamat e-mel`, url: `URL`, emoji: `emoji`, uuid: `UUID`, uuidv4: `UUIDv4`, uuidv6: `UUIDv6`, nanoid: `nanoid`, guid: `GUID`, cuid: `cuid`, cuid2: `cuid2`, ulid: `ULID`, xid: `XID`, ksuid: `KSUID`, datetime: `tarikh masa ISO`, date: `tarikh ISO`, time: `masa ISO`, duration: `tempoh ISO`, ipv4: `alamat IPv4`, ipv6: `alamat IPv6`, cidrv4: `julat IPv4`, cidrv6: `julat IPv6`, base64: `string dikodkan base64`, base64url: `string dikodkan base64url`, json_string: `string JSON`, e164: `nombor E.164`, jwt: `JWT`, template_literal: `input` }, r = { nan: `NaN`, number: `nombor` }; return (e) => { switch (e.code) { case `invalid_type`: { let t = r[e.expected] ?? e.expected, n = D$9(e.input), i = r[n] ?? n; return /^[A-Z]/.test(e.expected) ? `Input tidak sah: dijangka instanceof ${e.expected}, diterima ${i}` : `Input tidak sah: dijangka ${t}, diterima ${i}`; } case `invalid_value`: return e.values.length === 1 ? `Input tidak sah: dijangka ${E$10(e.values[0])}` : `Pilihan tidak sah: dijangka salah satu daripada ${C$10(e.values, `|`)}`; case `too_big`: { let n = e.inclusive ? `<=` : `<`, r = t(e.origin); return r ? `Terlalu besar: dijangka ${e.origin ?? `nilai`} ${r.verb} ${n}${e.maximum.toString()} ${r.unit ?? `elemen`}` : `Terlalu besar: dijangka ${e.origin ?? `nilai`} adalah ${n}${e.maximum.toString()}`; } case `too_small`: { let n = e.inclusive ? `>=` : `>`, r = t(e.origin); return r ? `Terlalu kecil: dijangka ${e.origin} ${r.verb} ${n}${e.minimum.toString()} ${r.unit}` : `Terlalu kecil: dijangka ${e.origin} adalah ${n}${e.minimum.toString()}`; } case `invalid_format`: { let t = e; return t.format === `starts_with` ? `String tidak sah: mesti bermula dengan "${t.prefix}"` : t.format === `ends_with` ? `String tidak sah: mesti berakhir dengan "${t.suffix}"` : t.format === `includes` ? `String tidak sah: mesti mengandungi "${t.includes}"` : t.format === `regex` ? `String tidak sah: mesti sepadan dengan corak ${t.pattern}` : `${n[t.format] ?? e.format} tidak sah`; } case `not_multiple_of`: return `Nombor tidak sah: perlu gandaan ${e.divisor}`; case `unrecognized_keys`: return `Kunci tidak dikenali: ${C$10(e.keys, `, `)}`; case `invalid_key`: return `Kunci tidak sah dalam ${e.origin}`; case `invalid_union`: return `Input tidak sah`; case `invalid_element`: return `Nilai tidak sah dalam ${e.origin}`; default: return `Input tidak sah`; } }; }; function Jo$2() { return { localeError: qo$2() }; } const Yo$2 = () => { let e = { string: { unit: `tekens`, verb: `heeft` }, file: { unit: `bytes`, verb: `heeft` }, array: { unit: `elementen`, verb: `heeft` }, set: { unit: `elementen`, verb: `heeft` } }; function t(t) { return e[t] ?? null; } let n = { regex: `invoer`, email: `emailadres`, url: `URL`, emoji: `emoji`, uuid: `UUID`, uuidv4: `UUIDv4`, uuidv6: `UUIDv6`, nanoid: `nanoid`, guid: `GUID`, cuid: `cuid`, cuid2: `cuid2`, ulid: `ULID`, xid: `XID`, ksuid: `KSUID`, datetime: `ISO datum en tijd`, date: `ISO datum`, time: `ISO tijd`, duration: `ISO duur`, ipv4: `IPv4-adres`, ipv6: `IPv6-adres`, cidrv4: `IPv4-bereik`, cidrv6: `IPv6-bereik`, base64: `base64-gecodeerde tekst`, base64url: `base64 URL-gecodeerde tekst`, json_string: `JSON string`, e164: `E.164-nummer`, jwt: `JWT`, template_literal: `invoer` }, r = { nan: `NaN`, number: `getal` }; return (e) => { switch (e.code) { case `invalid_type`: { let t = r[e.expected] ?? e.expected, n = D$9(e.input), i = r[n] ?? n; return /^[A-Z]/.test(e.expected) ? `Ongeldige invoer: verwacht instanceof ${e.expected}, ontving ${i}` : `Ongeldige invoer: verwacht ${t}, ontving ${i}`; } case `invalid_value`: return e.values.length === 1 ? `Ongeldige invoer: verwacht ${E$10(e.values[0])}` : `Ongeldige optie: verwacht één van ${C$10(e.values, `|`)}`; case `too_big`: { let n = e.inclusive ? `<=` : `<`, r = t(e.origin), i = e.origin === `date` ? `laat` : e.origin === `string` ? `lang` : `groot`; return r ? `Te ${i}: verwacht dat ${e.origin ?? `waarde`} ${n}${e.maximum.toString()} ${r.unit ?? `elementen`} ${r.verb}` : `Te ${i}: verwacht dat ${e.origin ?? `waarde`} ${n}${e.maximum.toString()} is`; } case `too_small`: { let n = e.inclusive ? `>=` : `>`, r = t(e.origin), i = e.origin === `date` ? `vroeg` : e.origin === `string` ? `kort` : `klein`; return r ? `Te ${i}: verwacht dat ${e.origin} ${n}${e.minimum.toString()} ${r.unit} ${r.verb}` : `Te ${i}: verwacht dat ${e.origin} ${n}${e.minimum.toString()} is`; } case `invalid_format`: { let t = e; return t.format === `starts_with` ? `Ongeldige tekst: moet met "${t.prefix}" beginnen` : t.format === `ends_with` ? `Ongeldige tekst: moet op "${t.suffix}" eindigen` : t.format === `includes` ? `Ongeldige tekst: moet "${t.includes}" bevatten` : t.format === `regex` ? `Ongeldige tekst: moet overeenkomen met patroon ${t.pattern}` : `Ongeldig: ${n[t.format] ?? e.format}`; } case `not_multiple_of`: return `Ongeldig getal: moet een veelvoud van ${e.divisor} zijn`; case `unrecognized_keys`: return `Onbekende key${e.keys.length > 1 ? `s` : ``}: ${C$10(e.keys, `, `)}`; case `invalid_key`: return `Ongeldige key in ${e.origin}`; case `invalid_union`: return `Ongeldige invoer`; case `invalid_element`: return `Ongeldige waarde in ${e.origin}`; default: return `Ongeldige invoer`; } }; }; function Xo$2() { return { localeError: Yo$2() }; } const Zo$2 = () => { let e = { string: { unit: `tegn`, verb: `å ha` }, file: { unit: `bytes`, verb: `å ha` }, array: { unit: `elementer`, verb: `å inneholde` }, set: { unit: `elementer`, verb: `å inneholde` } }; function t(t) { return e[t] ?? null; } let n = { regex: `input`, email: `e-postadresse`, url: `URL`, emoji: `emoji`, uuid: `UUID`, uuidv4: `UUIDv4`, uuidv6: `UUIDv6`, nanoid: `nanoid`, guid: `GUID`, cuid: `cuid`, cuid2: `cuid2`, ulid: `ULID`, xid: `XID`, ksuid: `KSUID`, datetime: `ISO dato- og klokkeslett`, date: `ISO-dato`, time: `ISO-klokkeslett`, duration: `ISO-varighet`, ipv4: `IPv4-område`, ipv6: `IPv6-område`, cidrv4: `IPv4-spekter`, cidrv6: `IPv6-spekter`, base64: `base64-enkodet streng`, base64url: `base64url-enkodet streng`, json_string: `JSON-streng`, e164: `E.164-nummer`, jwt: `JWT`, template_literal: `input` }, r = { nan: `NaN`, number: `tall`, array: `liste` }; return (e) => { switch (e.code) { case `invalid_type`: { let t = r[e.expected] ?? e.expected, n = D$9(e.input), i = r[n] ?? n; return /^[A-Z]/.test(e.expected) ? `Ugyldig input: forventet instanceof ${e.expected}, fikk ${i}` : `Ugyldig input: forventet ${t}, fikk ${i}`; } case `invalid_value`: return e.values.length === 1 ? `Ugyldig verdi: forventet ${E$10(e.values[0])}` : `Ugyldig valg: forventet en av ${C$10(e.values, `|`)}`; case `too_big`: { let n = e.inclusive ? `<=` : `<`, r = t(e.origin); return r ? `For stor(t): forventet ${e.origin ?? `value`} til å ha ${n}${e.maximum.toString()} ${r.unit ?? `elementer`}` : `For stor(t): forventet ${e.origin ?? `value`} til å ha ${n}${e.maximum.toString()}`; } case `too_small`: { let n = e.inclusive ? `>=` : `>`, r = t(e.origin); return r ? `For lite(n): forventet ${e.origin} til å ha ${n}${e.minimum.toString()} ${r.unit}` : `For lite(n): forventet ${e.origin} til å ha ${n}${e.minimum.toString()}`; } case `invalid_format`: { let t = e; return t.format === `starts_with` ? `Ugyldig streng: må starte med "${t.prefix}"` : t.format === `ends_with` ? `Ugyldig streng: må ende med "${t.suffix}"` : t.format === `includes` ? `Ugyldig streng: må inneholde "${t.includes}"` : t.format === `regex` ? `Ugyldig streng: må matche mønsteret ${t.pattern}` : `Ugyldig ${n[t.format] ?? e.format}`; } case `not_multiple_of`: return `Ugyldig tall: må være et multiplum av ${e.divisor}`; case `unrecognized_keys`: return `${e.keys.length > 1 ? `Ukjente nøkler` : `Ukjent nøkkel`}: ${C$10(e.keys, `, `)}`; case `invalid_key`: return `Ugyldig nøkkel i ${e.origin}`; case `invalid_union`: return `Ugyldig input`; case `invalid_element`: return `Ugyldig verdi i ${e.origin}`; default: return `Ugyldig input`; } }; }; function Qo$2() { return { localeError: Zo$2() }; } const $o$2 = () => { let e = { string: { unit: `harf`, verb: `olmalıdır` }, file: { unit: `bayt`, verb: `olmalıdır` }, array: { unit: `unsur`, verb: `olmalıdır` }, set: { unit: `unsur`, verb: `olmalıdır` } }; function t(t) { return e[t] ?? null; } let n = { regex: `giren`, email: `epostagâh`, url: `URL`, emoji: `emoji`, uuid: `UUID`, uuidv4: `UUIDv4`, uuidv6: `UUIDv6`, nanoid: `nanoid`, guid: `GUID`, cuid: `cuid`, cuid2: `cuid2`, ulid: `ULID`, xid: `XID`, ksuid: `KSUID`, datetime: `ISO hengâmı`, date: `ISO tarihi`, time: `ISO zamanı`, duration: `ISO müddeti`, ipv4: `IPv4 nişânı`, ipv6: `IPv6 nişânı`, cidrv4: `IPv4 menzili`, cidrv6: `IPv6 menzili`, base64: `base64-şifreli metin`, base64url: `base64url-şifreli metin`, json_string: `JSON metin`, e164: `E.164 sayısı`, jwt: `JWT`, template_literal: `giren` }, r = { nan: `NaN`, number: `numara`, array: `saf`, null: `gayb` }; return (e) => { switch (e.code) { case `invalid_type`: { let t = r[e.expected] ?? e.expected, n = D$9(e.input), i = r[n] ?? n; return /^[A-Z]/.test(e.expected) ? `Fâsit giren: umulan instanceof ${e.expected}, alınan ${i}` : `Fâsit giren: umulan ${t}, alınan ${i}`; } case `invalid_value`: return e.values.length === 1 ? `Fâsit giren: umulan ${E$10(e.values[0])}` : `Fâsit tercih: mûteberler ${C$10(e.values, `|`)}`; case `too_big`: { let n = e.inclusive ? `<=` : `<`, r = t(e.origin); return r ? `Fazla büyük: ${e.origin ?? `value`}, ${n}${e.maximum.toString()} ${r.unit ?? `elements`} sahip olmalıydı.` : `Fazla büyük: ${e.origin ?? `value`}, ${n}${e.maximum.toString()} olmalıydı.`; } case `too_small`: { let n = e.inclusive ? `>=` : `>`, r = t(e.origin); return r ? `Fazla küçük: ${e.origin}, ${n}${e.minimum.toString()} ${r.unit} sahip olmalıydı.` : `Fazla küçük: ${e.origin}, ${n}${e.minimum.toString()} olmalıydı.`; } case `invalid_format`: { let t = e; return t.format === `starts_with` ? `Fâsit metin: "${t.prefix}" ile başlamalı.` : t.format === `ends_with` ? `Fâsit metin: "${t.suffix}" ile bitmeli.` : t.format === `includes` ? `Fâsit metin: "${t.includes}" ihtivâ etmeli.` : t.format === `regex` ? `Fâsit metin: ${t.pattern} nakşına uymalı.` : `Fâsit ${n[t.format] ?? e.format}`; } case `not_multiple_of`: return `Fâsit sayı: ${e.divisor} katı olmalıydı.`; case `unrecognized_keys`: return `Tanınmayan anahtar ${e.keys.length > 1 ? `s` : ``}: ${C$10(e.keys, `, `)}`; case `invalid_key`: return `${e.origin} için tanınmayan anahtar var.`; case `invalid_union`: return `Giren tanınamadı.`; case `invalid_element`: return `${e.origin} için tanınmayan kıymet var.`; default: return `Kıymet tanınamadı.`; } }; }; function es$2() { return { localeError: $o$2() }; } const ts$2 = () => { let e = { string: { unit: `توکي`, verb: `ولري` }, file: { unit: `بایټس`, verb: `ولري` }, array: { unit: `توکي`, verb: `ولري` }, set: { unit: `توکي`, verb: `ولري` } }; function t(t) { return e[t] ?? null; } let n = { regex: `ورودي`, email: `بریښنالیک`, url: `یو آر ال`, emoji: `ایموجي`, uuid: `UUID`, uuidv4: `UUIDv4`, uuidv6: `UUIDv6`, nanoid: `nanoid`, guid: `GUID`, cuid: `cuid`, cuid2: `cuid2`, ulid: `ULID`, xid: `XID`, ksuid: `KSUID`, datetime: `نیټه او وخت`, date: `نېټه`, time: `وخت`, duration: `موده`, ipv4: `د IPv4 پته`, ipv6: `د IPv6 پته`, cidrv4: `د IPv4 ساحه`, cidrv6: `د IPv6 ساحه`, base64: `base64-encoded متن`, base64url: `base64url-encoded متن`, json_string: `JSON متن`, e164: `د E.164 شمېره`, jwt: `JWT`, template_literal: `ورودي` }, r = { nan: `NaN`, number: `عدد`, array: `ارې` }; return (e) => { switch (e.code) { case `invalid_type`: { let t = r[e.expected] ?? e.expected, n = D$9(e.input), i = r[n] ?? n; return /^[A-Z]/.test(e.expected) ? `ناسم ورودي: باید instanceof ${e.expected} وای, مګر ${i} ترلاسه شو` : `ناسم ورودي: باید ${t} وای, مګر ${i} ترلاسه شو`; } case `invalid_value`: return e.values.length === 1 ? `ناسم ورودي: باید ${E$10(e.values[0])} وای` : `ناسم انتخاب: باید یو له ${C$10(e.values, `|`)} څخه وای`; case `too_big`: { let n = e.inclusive ? `<=` : `<`, r = t(e.origin); return r ? `ډیر لوی: ${e.origin ?? `ارزښت`} باید ${n}${e.maximum.toString()} ${r.unit ?? `عنصرونه`} ولري` : `ډیر لوی: ${e.origin ?? `ارزښت`} باید ${n}${e.maximum.toString()} وي`; } case `too_small`: { let n = e.inclusive ? `>=` : `>`, r = t(e.origin); return r ? `ډیر کوچنی: ${e.origin} باید ${n}${e.minimum.toString()} ${r.unit} ولري` : `ډیر کوچنی: ${e.origin} باید ${n}${e.minimum.toString()} وي`; } case `invalid_format`: { let t = e; return t.format === `starts_with` ? `ناسم متن: باید د "${t.prefix}" سره پیل شي` : t.format === `ends_with` ? `ناسم متن: باید د "${t.suffix}" سره پای ته ورسيږي` : t.format === `includes` ? `ناسم متن: باید "${t.includes}" ولري` : t.format === `regex` ? `ناسم متن: باید د ${t.pattern} سره مطابقت ولري` : `${n[t.format] ?? e.format} ناسم دی`; } case `not_multiple_of`: return `ناسم عدد: باید د ${e.divisor} مضرب وي`; case `unrecognized_keys`: return `ناسم ${e.keys.length > 1 ? `کلیډونه` : `کلیډ`}: ${C$10(e.keys, `, `)}`; case `invalid_key`: return `ناسم کلیډ په ${e.origin} کې`; case `invalid_union`: return `ناسمه ورودي`; case `invalid_element`: return `ناسم عنصر په ${e.origin} کې`; default: return `ناسمه ورودي`; } }; }; function ns$2() { return { localeError: ts$2() }; } const rs$2 = () => { let e = { string: { unit: `znaków`, verb: `mieć` }, file: { unit: `bajtów`, verb: `mieć` }, array: { unit: `elementów`, verb: `mieć` }, set: { unit: `elementów`, verb: `mieć` } }; function t(t) { return e[t] ?? null; } let n = { regex: `wyrażenie`, email: `adres email`, url: `URL`, emoji: `emoji`, uuid: `UUID`, uuidv4: `UUIDv4`, uuidv6: `UUIDv6`, nanoid: `nanoid`, guid: `GUID`, cuid: `cuid`, cuid2: `cuid2`, ulid: `ULID`, xid: `XID`, ksuid: `KSUID`, datetime: `data i godzina w formacie ISO`, date: `data w formacie ISO`, time: `godzina w formacie ISO`, duration: `czas trwania ISO`, ipv4: `adres IPv4`, ipv6: `adres IPv6`, cidrv4: `zakres IPv4`, cidrv6: `zakres IPv6`, base64: `ciąg znaków zakodowany w formacie base64`, base64url: `ciąg znaków zakodowany w formacie base64url`, json_string: `ciąg znaków w formacie JSON`, e164: `liczba E.164`, jwt: `JWT`, template_literal: `wejście` }, r = { nan: `NaN`, number: `liczba`, array: `tablica` }; return (e) => { switch (e.code) { case `invalid_type`: { let t = r[e.expected] ?? e.expected, n = D$9(e.input), i = r[n] ?? n; return /^[A-Z]/.test(e.expected) ? `Nieprawidłowe dane wejściowe: oczekiwano instanceof ${e.expected}, otrzymano ${i}` : `Nieprawidłowe dane wejściowe: oczekiwano ${t}, otrzymano ${i}`; } case `invalid_value`: return e.values.length === 1 ? `Nieprawidłowe dane wejściowe: oczekiwano ${E$10(e.values[0])}` : `Nieprawidłowa opcja: oczekiwano jednej z wartości ${C$10(e.values, `|`)}`; case `too_big`: { let n = e.inclusive ? `<=` : `<`, r = t(e.origin); return r ? `Za duża wartość: oczekiwano, że ${e.origin ?? `wartość`} będzie mieć ${n}${e.maximum.toString()} ${r.unit ?? `elementów`}` : `Zbyt duż(y/a/e): oczekiwano, że ${e.origin ?? `wartość`} będzie wynosić ${n}${e.maximum.toString()}`; } case `too_small`: { let n = e.inclusive ? `>=` : `>`, r = t(e.origin); return r ? `Za mała wartość: oczekiwano, że ${e.origin ?? `wartość`} będzie mieć ${n}${e.minimum.toString()} ${r.unit ?? `elementów`}` : `Zbyt mał(y/a/e): oczekiwano, że ${e.origin ?? `wartość`} będzie wynosić ${n}${e.minimum.toString()}`; } case `invalid_format`: { let t = e; return t.format === `starts_with` ? `Nieprawidłowy ciąg znaków: musi zaczynać się od "${t.prefix}"` : t.format === `ends_with` ? `Nieprawidłowy ciąg znaków: musi kończyć się na "${t.suffix}"` : t.format === `includes` ? `Nieprawidłowy ciąg znaków: musi zawierać "${t.includes}"` : t.format === `regex` ? `Nieprawidłowy ciąg znaków: musi odpowiadać wzorcowi ${t.pattern}` : `Nieprawidłow(y/a/e) ${n[t.format] ?? e.format}`; } case `not_multiple_of`: return `Nieprawidłowa liczba: musi być wielokrotnością ${e.divisor}`; case `unrecognized_keys`: return `Nierozpoznane klucze${e.keys.length > 1 ? `s` : ``}: ${C$10(e.keys, `, `)}`; case `invalid_key`: return `Nieprawidłowy klucz w ${e.origin}`; case `invalid_union`: return `Nieprawidłowe dane wejściowe`; case `invalid_element`: return `Nieprawidłowa wartość w ${e.origin}`; default: return `Nieprawidłowe dane wejściowe`; } }; }; function is$2() { return { localeError: rs$2() }; } const as$2 = () => { let e = { string: { unit: `caracteres`, verb: `ter` }, file: { unit: `bytes`, verb: `ter` }, array: { unit: `itens`, verb: `ter` }, set: { unit: `itens`, verb: `ter` } }; function t(t) { return e[t] ?? null; } let n = { regex: `padrão`, email: `endereço de e-mail`, url: `URL`, emoji: `emoji`, uuid: `UUID`, uuidv4: `UUIDv4`, uuidv6: `UUIDv6`, nanoid: `nanoid`, guid: `GUID`, cuid: `cuid`, cuid2: `cuid2`, ulid: `ULID`, xid: `XID`, ksuid: `KSUID`, datetime: `data e hora ISO`, date: `data ISO`, time: `hora ISO`, duration: `duração ISO`, ipv4: `endereço IPv4`, ipv6: `endereço IPv6`, cidrv4: `faixa de IPv4`, cidrv6: `faixa de IPv6`, base64: `texto codificado em base64`, base64url: `URL codificada em base64`, json_string: `texto JSON`, e164: `número E.164`, jwt: `JWT`, template_literal: `entrada` }, r = { nan: `NaN`, number: `número`, null: `nulo` }; return (e) => { switch (e.code) { case `invalid_type`: { let t = r[e.expected] ?? e.expected, n = D$9(e.input), i = r[n] ?? n; return /^[A-Z]/.test(e.expected) ? `Tipo inválido: esperado instanceof ${e.expected}, recebido ${i}` : `Tipo inválido: esperado ${t}, recebido ${i}`; } case `invalid_value`: return e.values.length === 1 ? `Entrada inválida: esperado ${E$10(e.values[0])}` : `Opção inválida: esperada uma das ${C$10(e.values, `|`)}`; case `too_big`: { let n = e.inclusive ? `<=` : `<`, r = t(e.origin); return r ? `Muito grande: esperado que ${e.origin ?? `valor`} tivesse ${n}${e.maximum.toString()} ${r.unit ?? `elementos`}` : `Muito grande: esperado que ${e.origin ?? `valor`} fosse ${n}${e.maximum.toString()}`; } case `too_small`: { let n = e.inclusive ? `>=` : `>`, r = t(e.origin); return r ? `Muito pequeno: esperado que ${e.origin} tivesse ${n}${e.minimum.toString()} ${r.unit}` : `Muito pequeno: esperado que ${e.origin} fosse ${n}${e.minimum.toString()}`; } case `invalid_format`: { let t = e; return t.format === `starts_with` ? `Texto inválido: deve começar com "${t.prefix}"` : t.format === `ends_with` ? `Texto inválido: deve terminar com "${t.suffix}"` : t.format === `includes` ? `Texto inválido: deve incluir "${t.includes}"` : t.format === `regex` ? `Texto inválido: deve corresponder ao padrão ${t.pattern}` : `${n[t.format] ?? e.format} inválido`; } case `not_multiple_of`: return `Número inválido: deve ser múltiplo de ${e.divisor}`; case `unrecognized_keys`: return `Chave${e.keys.length > 1 ? `s` : ``} desconhecida${e.keys.length > 1 ? `s` : ``}: ${C$10(e.keys, `, `)}`; case `invalid_key`: return `Chave inválida em ${e.origin}`; case `invalid_union`: return `Entrada inválida`; case `invalid_element`: return `Valor inválido em ${e.origin}`; default: return `Campo inválido`; } }; }; function os$2() { return { localeError: as$2() }; } function ss$2(e, t, n, r) { let i = Math.abs(e), a = i % 10, o = i % 100; return o >= 11 && o <= 19 ? r : a === 1 ? t : a >= 2 && a <= 4 ? n : r; } const cs$2 = () => { let e = { string: { unit: { one: `символ`, few: `символа`, many: `символов` }, verb: `иметь` }, file: { unit: { one: `байт`, few: `байта`, many: `байт` }, verb: `иметь` }, array: { unit: { one: `элемент`, few: `элемента`, many: `элементов` }, verb: `иметь` }, set: { unit: { one: `элемент`, few: `элемента`, many: `элементов` }, verb: `иметь` } }; function t(t) { return e[t] ?? null; } let n = { regex: `ввод`, email: `email адрес`, url: `URL`, emoji: `эмодзи`, uuid: `UUID`, uuidv4: `UUIDv4`, uuidv6: `UUIDv6`, nanoid: `nanoid`, guid: `GUID`, cuid: `cuid`, cuid2: `cuid2`, ulid: `ULID`, xid: `XID`, ksuid: `KSUID`, datetime: `ISO дата и время`, date: `ISO дата`, time: `ISO время`, duration: `ISO длительность`, ipv4: `IPv4 адрес`, ipv6: `IPv6 адрес`, cidrv4: `IPv4 диапазон`, cidrv6: `IPv6 диапазон`, base64: `строка в формате base64`, base64url: `строка в формате base64url`, json_string: `JSON строка`, e164: `номер E.164`, jwt: `JWT`, template_literal: `ввод` }, r = { nan: `NaN`, number: `число`, array: `массив` }; return (e) => { switch (e.code) { case `invalid_type`: { let t = r[e.expected] ?? e.expected, n = D$9(e.input), i = r[n] ?? n; return /^[A-Z]/.test(e.expected) ? `Неверный ввод: ожидалось instanceof ${e.expected}, получено ${i}` : `Неверный ввод: ожидалось ${t}, получено ${i}`; } case `invalid_value`: return e.values.length === 1 ? `Неверный ввод: ожидалось ${E$10(e.values[0])}` : `Неверный вариант: ожидалось одно из ${C$10(e.values, `|`)}`; case `too_big`: { let n = e.inclusive ? `<=` : `<`, r = t(e.origin); if (r) { let t = ss$2(Number(e.maximum), r.unit.one, r.unit.few, r.unit.many); return `Слишком большое значение: ожидалось, что ${e.origin ?? `значение`} будет иметь ${n}${e.maximum.toString()} ${t}`; } return `Слишком большое значение: ожидалось, что ${e.origin ?? `значение`} будет ${n}${e.maximum.toString()}`; } case `too_small`: { let n = e.inclusive ? `>=` : `>`, r = t(e.origin); if (r) { let t = ss$2(Number(e.minimum), r.unit.one, r.unit.few, r.unit.many); return `Слишком маленькое значение: ожидалось, что ${e.origin} будет иметь ${n}${e.minimum.toString()} ${t}`; } return `Слишком маленькое значение: ожидалось, что ${e.origin} будет ${n}${e.minimum.toString()}`; } case `invalid_format`: { let t = e; return t.format === `starts_with` ? `Неверная строка: должна начинаться с "${t.prefix}"` : t.format === `ends_with` ? `Неверная строка: должна заканчиваться на "${t.suffix}"` : t.format === `includes` ? `Неверная строка: должна содержать "${t.includes}"` : t.format === `regex` ? `Неверная строка: должна соответствовать шаблону ${t.pattern}` : `Неверный ${n[t.format] ?? e.format}`; } case `not_multiple_of`: return `Неверное число: должно быть кратным ${e.divisor}`; case `unrecognized_keys`: return `Нераспознанн${e.keys.length > 1 ? `ые` : `ый`} ключ${e.keys.length > 1 ? `и` : ``}: ${C$10(e.keys, `, `)}`; case `invalid_key`: return `Неверный ключ в ${e.origin}`; case `invalid_union`: return `Неверные входные данные`; case `invalid_element`: return `Неверное значение в ${e.origin}`; default: return `Неверные входные данные`; } }; }; function ls$2() { return { localeError: cs$2() }; } const us$2 = () => { let e = { string: { unit: `znakov`, verb: `imeti` }, file: { unit: `bajtov`, verb: `imeti` }, array: { unit: `elementov`, verb: `imeti` }, set: { unit: `elementov`, verb: `imeti` } }; function t(t) { return e[t] ?? null; } let n = { regex: `vnos`, email: `e-poštni naslov`, url: `URL`, emoji: `emoji`, uuid: `UUID`, uuidv4: `UUIDv4`, uuidv6: `UUIDv6`, nanoid: `nanoid`, guid: `GUID`, cuid: `cuid`, cuid2: `cuid2`, ulid: `ULID`, xid: `XID`, ksuid: `KSUID`, datetime: `ISO datum in čas`, date: `ISO datum`, time: `ISO čas`, duration: `ISO trajanje`, ipv4: `IPv4 naslov`, ipv6: `IPv6 naslov`, cidrv4: `obseg IPv4`, cidrv6: `obseg IPv6`, base64: `base64 kodiran niz`, base64url: `base64url kodiran niz`, json_string: `JSON niz`, e164: `E.164 številka`, jwt: `JWT`, template_literal: `vnos` }, r = { nan: `NaN`, number: `število`, array: `tabela` }; return (e) => { switch (e.code) { case `invalid_type`: { let t = r[e.expected] ?? e.expected, n = D$9(e.input), i = r[n] ?? n; return /^[A-Z]/.test(e.expected) ? `Neveljaven vnos: pričakovano instanceof ${e.expected}, prejeto ${i}` : `Neveljaven vnos: pričakovano ${t}, prejeto ${i}`; } case `invalid_value`: return e.values.length === 1 ? `Neveljaven vnos: pričakovano ${E$10(e.values[0])}` : `Neveljavna možnost: pričakovano eno izmed ${C$10(e.values, `|`)}`; case `too_big`: { let n = e.inclusive ? `<=` : `<`, r = t(e.origin); return r ? `Preveliko: pričakovano, da bo ${e.origin ?? `vrednost`} imelo ${n}${e.maximum.toString()} ${r.unit ?? `elementov`}` : `Preveliko: pričakovano, da bo ${e.origin ?? `vrednost`} ${n}${e.maximum.toString()}`; } case `too_small`: { let n = e.inclusive ? `>=` : `>`, r = t(e.origin); return r ? `Premajhno: pričakovano, da bo ${e.origin} imelo ${n}${e.minimum.toString()} ${r.unit}` : `Premajhno: pričakovano, da bo ${e.origin} ${n}${e.minimum.toString()}`; } case `invalid_format`: { let t = e; return t.format === `starts_with` ? `Neveljaven niz: mora se začeti z "${t.prefix}"` : t.format === `ends_with` ? `Neveljaven niz: mora se končati z "${t.suffix}"` : t.format === `includes` ? `Neveljaven niz: mora vsebovati "${t.includes}"` : t.format === `regex` ? `Neveljaven niz: mora ustrezati vzorcu ${t.pattern}` : `Neveljaven ${n[t.format] ?? e.format}`; } case `not_multiple_of`: return `Neveljavno število: mora biti večkratnik ${e.divisor}`; case `unrecognized_keys`: return `Neprepoznan${e.keys.length > 1 ? `i ključi` : ` ključ`}: ${C$10(e.keys, `, `)}`; case `invalid_key`: return `Neveljaven ključ v ${e.origin}`; case `invalid_union`: return `Neveljaven vnos`; case `invalid_element`: return `Neveljavna vrednost v ${e.origin}`; default: return `Neveljaven vnos`; } }; }; function ds$2() { return { localeError: us$2() }; } const fs$2 = () => { let e = { string: { unit: `tecken`, verb: `att ha` }, file: { unit: `bytes`, verb: `att ha` }, array: { unit: `objekt`, verb: `att innehålla` }, set: { unit: `objekt`, verb: `att innehålla` } }; function t(t) { return e[t] ?? null; } let n = { regex: `reguljärt uttryck`, email: `e-postadress`, url: `URL`, emoji: `emoji`, uuid: `UUID`, uuidv4: `UUIDv4`, uuidv6: `UUIDv6`, nanoid: `nanoid`, guid: `GUID`, cuid: `cuid`, cuid2: `cuid2`, ulid: `ULID`, xid: `XID`, ksuid: `KSUID`, datetime: `ISO-datum och tid`, date: `ISO-datum`, time: `ISO-tid`, duration: `ISO-varaktighet`, ipv4: `IPv4-intervall`, ipv6: `IPv6-intervall`, cidrv4: `IPv4-spektrum`, cidrv6: `IPv6-spektrum`, base64: `base64-kodad sträng`, base64url: `base64url-kodad sträng`, json_string: `JSON-sträng`, e164: `E.164-nummer`, jwt: `JWT`, template_literal: `mall-literal` }, r = { nan: `NaN`, number: `antal`, array: `lista` }; return (e) => { switch (e.code) { case `invalid_type`: { let t = r[e.expected] ?? e.expected, n = D$9(e.input), i = r[n] ?? n; return /^[A-Z]/.test(e.expected) ? `Ogiltig inmatning: förväntat instanceof ${e.expected}, fick ${i}` : `Ogiltig inmatning: förväntat ${t}, fick ${i}`; } case `invalid_value`: return e.values.length === 1 ? `Ogiltig inmatning: förväntat ${E$10(e.values[0])}` : `Ogiltigt val: förväntade en av ${C$10(e.values, `|`)}`; case `too_big`: { let n = e.inclusive ? `<=` : `<`, r = t(e.origin); return r ? `För stor(t): förväntade ${e.origin ?? `värdet`} att ha ${n}${e.maximum.toString()} ${r.unit ?? `element`}` : `För stor(t): förväntat ${e.origin ?? `värdet`} att ha ${n}${e.maximum.toString()}`; } case `too_small`: { let n = e.inclusive ? `>=` : `>`, r = t(e.origin); return r ? `För lite(t): förväntade ${e.origin ?? `värdet`} att ha ${n}${e.minimum.toString()} ${r.unit}` : `För lite(t): förväntade ${e.origin ?? `värdet`} att ha ${n}${e.minimum.toString()}`; } case `invalid_format`: { let t = e; return t.format === `starts_with` ? `Ogiltig sträng: måste börja med "${t.prefix}"` : t.format === `ends_with` ? `Ogiltig sträng: måste sluta med "${t.suffix}"` : t.format === `includes` ? `Ogiltig sträng: måste innehålla "${t.includes}"` : t.format === `regex` ? `Ogiltig sträng: måste matcha mönstret "${t.pattern}"` : `Ogiltig(t) ${n[t.format] ?? e.format}`; } case `not_multiple_of`: return `Ogiltigt tal: måste vara en multipel av ${e.divisor}`; case `unrecognized_keys`: return `${e.keys.length > 1 ? `Okända nycklar` : `Okänd nyckel`}: ${C$10(e.keys, `, `)}`; case `invalid_key`: return `Ogiltig nyckel i ${e.origin ?? `värdet`}`; case `invalid_union`: return `Ogiltig input`; case `invalid_element`: return `Ogiltigt värde i ${e.origin ?? `värdet`}`; default: return `Ogiltig input`; } }; }; function ps$2() { return { localeError: fs$2() }; } const ms$2 = () => { let e = { string: { unit: `எழுத்துக்கள்`, verb: `கொண்டிருக்க வேண்டும்` }, file: { unit: `பைட்டுகள்`, verb: `கொண்டிருக்க வேண்டும்` }, array: { unit: `உறுப்புகள்`, verb: `கொண்டிருக்க வேண்டும்` }, set: { unit: `உறுப்புகள்`, verb: `கொண்டிருக்க வேண்டும்` } }; function t(t) { return e[t] ?? null; } let n = { regex: `உள்ளீடு`, email: `மின்னஞ்சல் முகவரி`, url: `URL`, emoji: `emoji`, uuid: `UUID`, uuidv4: `UUIDv4`, uuidv6: `UUIDv6`, nanoid: `nanoid`, guid: `GUID`, cuid: `cuid`, cuid2: `cuid2`, ulid: `ULID`, xid: `XID`, ksuid: `KSUID`, datetime: `ISO தேதி நேரம்`, date: `ISO தேதி`, time: `ISO நேரம்`, duration: `ISO கால அளவு`, ipv4: `IPv4 முகவரி`, ipv6: `IPv6 முகவரி`, cidrv4: `IPv4 வரம்பு`, cidrv6: `IPv6 வரம்பு`, base64: `base64-encoded சரம்`, base64url: `base64url-encoded சரம்`, json_string: `JSON சரம்`, e164: `E.164 எண்`, jwt: `JWT`, template_literal: `input` }, r = { nan: `NaN`, number: `எண்`, array: `அணி`, null: `வெறுமை` }; return (e) => { switch (e.code) { case `invalid_type`: { let t = r[e.expected] ?? e.expected, n = D$9(e.input), i = r[n] ?? n; return /^[A-Z]/.test(e.expected) ? `தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது instanceof ${e.expected}, பெறப்பட்டது ${i}` : `தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${t}, பெறப்பட்டது ${i}`; } case `invalid_value`: return e.values.length === 1 ? `தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${E$10(e.values[0])}` : `தவறான விருப்பம்: எதிர்பார்க்கப்பட்டது ${C$10(e.values, `|`)} இல் ஒன்று`; case `too_big`: { let n = e.inclusive ? `<=` : `<`, r = t(e.origin); return r ? `மிக பெரியது: எதிர்பார்க்கப்பட்டது ${e.origin ?? `மதிப்பு`} ${n}${e.maximum.toString()} ${r.unit ?? `உறுப்புகள்`} ஆக இருக்க வேண்டும்` : `மிக பெரியது: எதிர்பார்க்கப்பட்டது ${e.origin ?? `மதிப்பு`} ${n}${e.maximum.toString()} ஆக இருக்க வேண்டும்`; } case `too_small`: { let n = e.inclusive ? `>=` : `>`, r = t(e.origin); return r ? `மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${e.origin} ${n}${e.minimum.toString()} ${r.unit} ஆக இருக்க வேண்டும்` : `மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${e.origin} ${n}${e.minimum.toString()} ஆக இருக்க வேண்டும்`; } case `invalid_format`: { let t = e; return t.format === `starts_with` ? `தவறான சரம்: "${t.prefix}" இல் தொடங்க வேண்டும்` : t.format === `ends_with` ? `தவறான சரம்: "${t.suffix}" இல் முடிவடைய வேண்டும்` : t.format === `includes` ? `தவறான சரம்: "${t.includes}" ஐ உள்ளடக்க வேண்டும்` : t.format === `regex` ? `தவறான சரம்: ${t.pattern} முறைபாட்டுடன் பொருந்த வேண்டும்` : `தவறான ${n[t.format] ?? e.format}`; } case `not_multiple_of`: return `தவறான எண்: ${e.divisor} இன் பலமாக இருக்க வேண்டும்`; case `unrecognized_keys`: return `அடையாளம் தெரியாத விசை${e.keys.length > 1 ? `கள்` : ``}: ${C$10(e.keys, `, `)}`; case `invalid_key`: return `${e.origin} இல் தவறான விசை`; case `invalid_union`: return `தவறான உள்ளீடு`; case `invalid_element`: return `${e.origin} இல் தவறான மதிப்பு`; default: return `தவறான உள்ளீடு`; } }; }; function hs$2() { return { localeError: ms$2() }; } const gs$2 = () => { let e = { string: { unit: `ตัวอักษร`, verb: `ควรมี` }, file: { unit: `ไบต์`, verb: `ควรมี` }, array: { unit: `รายการ`, verb: `ควรมี` }, set: { unit: `รายการ`, verb: `ควรมี` } }; function t(t) { return e[t] ?? null; } let n = { regex: `ข้อมูลที่ป้อน`, email: `ที่อยู่อีเมล`, url: `URL`, emoji: `อิโมจิ`, uuid: `UUID`, uuidv4: `UUIDv4`, uuidv6: `UUIDv6`, nanoid: `nanoid`, guid: `GUID`, cuid: `cuid`, cuid2: `cuid2`, ulid: `ULID`, xid: `XID`, ksuid: `KSUID`, datetime: `วันที่เวลาแบบ ISO`, date: `วันที่แบบ ISO`, time: `เวลาแบบ ISO`, duration: `ช่วงเวลาแบบ ISO`, ipv4: `ที่อยู่ IPv4`, ipv6: `ที่อยู่ IPv6`, cidrv4: `ช่วง IP แบบ IPv4`, cidrv6: `ช่วง IP แบบ IPv6`, base64: `ข้อความแบบ Base64`, base64url: `ข้อความแบบ Base64 สำหรับ URL`, json_string: `ข้อความแบบ JSON`, e164: `เบอร์โทรศัพท์ระหว่างประเทศ (E.164)`, jwt: `โทเคน JWT`, template_literal: `ข้อมูลที่ป้อน` }, r = { nan: `NaN`, number: `ตัวเลข`, array: `อาร์เรย์ (Array)`, null: `ไม่มีค่า (null)` }; return (e) => { switch (e.code) { case `invalid_type`: { let t = r[e.expected] ?? e.expected, n = D$9(e.input), i = r[n] ?? n; return /^[A-Z]/.test(e.expected) ? `ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น instanceof ${e.expected} แต่ได้รับ ${i}` : `ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น ${t} แต่ได้รับ ${i}`; } case `invalid_value`: return e.values.length === 1 ? `ค่าไม่ถูกต้อง: ควรเป็น ${E$10(e.values[0])}` : `ตัวเลือกไม่ถูกต้อง: ควรเป็นหนึ่งใน ${C$10(e.values, `|`)}`; case `too_big`: { let n = e.inclusive ? `ไม่เกิน` : `น้อยกว่า`, r = t(e.origin); return r ? `เกินกำหนด: ${e.origin ?? `ค่า`} ควรมี${n} ${e.maximum.toString()} ${r.unit ?? `รายการ`}` : `เกินกำหนด: ${e.origin ?? `ค่า`} ควรมี${n} ${e.maximum.toString()}`; } case `too_small`: { let n = e.inclusive ? `อย่างน้อย` : `มากกว่า`, r = t(e.origin); return r ? `น้อยกว่ากำหนด: ${e.origin} ควรมี${n} ${e.minimum.toString()} ${r.unit}` : `น้อยกว่ากำหนด: ${e.origin} ควรมี${n} ${e.minimum.toString()}`; } case `invalid_format`: { let t = e; return t.format === `starts_with` ? `รูปแบบไม่ถูกต้อง: ข้อความต้องขึ้นต้นด้วย "${t.prefix}"` : t.format === `ends_with` ? `รูปแบบไม่ถูกต้อง: ข้อความต้องลงท้ายด้วย "${t.suffix}"` : t.format === `includes` ? `รูปแบบไม่ถูกต้อง: ข้อความต้องมี "${t.includes}" อยู่ในข้อความ` : t.format === `regex` ? `รูปแบบไม่ถูกต้อง: ต้องตรงกับรูปแบบที่กำหนด ${t.pattern}` : `รูปแบบไม่ถูกต้อง: ${n[t.format] ?? e.format}`; } case `not_multiple_of`: return `ตัวเลขไม่ถูกต้อง: ต้องเป็นจำนวนที่หารด้วย ${e.divisor} ได้ลงตัว`; case `unrecognized_keys`: return `พบคีย์ที่ไม่รู้จัก: ${C$10(e.keys, `, `)}`; case `invalid_key`: return `คีย์ไม่ถูกต้องใน ${e.origin}`; case `invalid_union`: return `ข้อมูลไม่ถูกต้อง: ไม่ตรงกับรูปแบบยูเนียนที่กำหนดไว้`; case `invalid_element`: return `ข้อมูลไม่ถูกต้องใน ${e.origin}`; default: return `ข้อมูลไม่ถูกต้อง`; } }; }; function _s$2() { return { localeError: gs$2() }; } const vs$2 = () => { let e = { string: { unit: `karakter`, verb: `olmalı` }, file: { unit: `bayt`, verb: `olmalı` }, array: { unit: `öğe`, verb: `olmalı` }, set: { unit: `öğe`, verb: `olmalı` } }; function t(t) { return e[t] ?? null; } let n = { regex: `girdi`, email: `e-posta adresi`, url: `URL`, emoji: `emoji`, uuid: `UUID`, uuidv4: `UUIDv4`, uuidv6: `UUIDv6`, nanoid: `nanoid`, guid: `GUID`, cuid: `cuid`, cuid2: `cuid2`, ulid: `ULID`, xid: `XID`, ksuid: `KSUID`, datetime: `ISO tarih ve saat`, date: `ISO tarih`, time: `ISO saat`, duration: `ISO süre`, ipv4: `IPv4 adresi`, ipv6: `IPv6 adresi`, cidrv4: `IPv4 aralığı`, cidrv6: `IPv6 aralığı`, base64: `base64 ile şifrelenmiş metin`, base64url: `base64url ile şifrelenmiş metin`, json_string: `JSON dizesi`, e164: `E.164 sayısı`, jwt: `JWT`, template_literal: `Şablon dizesi` }, r = { nan: `NaN` }; return (e) => { switch (e.code) { case `invalid_type`: { let t = r[e.expected] ?? e.expected, n = D$9(e.input), i = r[n] ?? n; return /^[A-Z]/.test(e.expected) ? `Geçersiz değer: beklenen instanceof ${e.expected}, alınan ${i}` : `Geçersiz değer: beklenen ${t}, alınan ${i}`; } case `invalid_value`: return e.values.length === 1 ? `Geçersiz değer: beklenen ${E$10(e.values[0])}` : `Geçersiz seçenek: aşağıdakilerden biri olmalı: ${C$10(e.values, `|`)}`; case `too_big`: { let n = e.inclusive ? `<=` : `<`, r = t(e.origin); return r ? `Çok büyük: beklenen ${e.origin ?? `değer`} ${n}${e.maximum.toString()} ${r.unit ?? `öğe`}` : `Çok büyük: beklenen ${e.origin ?? `değer`} ${n}${e.maximum.toString()}`; } case `too_small`: { let n = e.inclusive ? `>=` : `>`, r = t(e.origin); return r ? `Çok küçük: beklenen ${e.origin} ${n}${e.minimum.toString()} ${r.unit}` : `Çok küçük: beklenen ${e.origin} ${n}${e.minimum.toString()}`; } case `invalid_format`: { let t = e; return t.format === `starts_with` ? `Geçersiz metin: "${t.prefix}" ile başlamalı` : t.format === `ends_with` ? `Geçersiz metin: "${t.suffix}" ile bitmeli` : t.format === `includes` ? `Geçersiz metin: "${t.includes}" içermeli` : t.format === `regex` ? `Geçersiz metin: ${t.pattern} desenine uymalı` : `Geçersiz ${n[t.format] ?? e.format}`; } case `not_multiple_of`: return `Geçersiz sayı: ${e.divisor} ile tam bölünebilmeli`; case `unrecognized_keys`: return `Tanınmayan anahtar${e.keys.length > 1 ? `lar` : ``}: ${C$10(e.keys, `, `)}`; case `invalid_key`: return `${e.origin} içinde geçersiz anahtar`; case `invalid_union`: return `Geçersiz değer`; case `invalid_element`: return `${e.origin} içinde geçersiz değer`; default: return `Geçersiz değer`; } }; }; function ys$2() { return { localeError: vs$2() }; } const bs$2 = () => { let e = { string: { unit: `символів`, verb: `матиме` }, file: { unit: `байтів`, verb: `матиме` }, array: { unit: `елементів`, verb: `матиме` }, set: { unit: `елементів`, verb: `матиме` } }; function t(t) { return e[t] ?? null; } let n = { regex: `вхідні дані`, email: `адреса електронної пошти`, url: `URL`, emoji: `емодзі`, uuid: `UUID`, uuidv4: `UUIDv4`, uuidv6: `UUIDv6`, nanoid: `nanoid`, guid: `GUID`, cuid: `cuid`, cuid2: `cuid2`, ulid: `ULID`, xid: `XID`, ksuid: `KSUID`, datetime: `дата та час ISO`, date: `дата ISO`, time: `час ISO`, duration: `тривалість ISO`, ipv4: `адреса IPv4`, ipv6: `адреса IPv6`, cidrv4: `діапазон IPv4`, cidrv6: `діапазон IPv6`, base64: `рядок у кодуванні base64`, base64url: `рядок у кодуванні base64url`, json_string: `рядок JSON`, e164: `номер E.164`, jwt: `JWT`, template_literal: `вхідні дані` }, r = { nan: `NaN`, number: `число`, array: `масив` }; return (e) => { switch (e.code) { case `invalid_type`: { let t = r[e.expected] ?? e.expected, n = D$9(e.input), i = r[n] ?? n; return /^[A-Z]/.test(e.expected) ? `Неправильні вхідні дані: очікується instanceof ${e.expected}, отримано ${i}` : `Неправильні вхідні дані: очікується ${t}, отримано ${i}`; } case `invalid_value`: return e.values.length === 1 ? `Неправильні вхідні дані: очікується ${E$10(e.values[0])}` : `Неправильна опція: очікується одне з ${C$10(e.values, `|`)}`; case `too_big`: { let n = e.inclusive ? `<=` : `<`, r = t(e.origin); return r ? `Занадто велике: очікується, що ${e.origin ?? `значення`} ${r.verb} ${n}${e.maximum.toString()} ${r.unit ?? `елементів`}` : `Занадто велике: очікується, що ${e.origin ?? `значення`} буде ${n}${e.maximum.toString()}`; } case `too_small`: { let n = e.inclusive ? `>=` : `>`, r = t(e.origin); return r ? `Занадто мале: очікується, що ${e.origin} ${r.verb} ${n}${e.minimum.toString()} ${r.unit}` : `Занадто мале: очікується, що ${e.origin} буде ${n}${e.minimum.toString()}`; } case `invalid_format`: { let t = e; return t.format === `starts_with` ? `Неправильний рядок: повинен починатися з "${t.prefix}"` : t.format === `ends_with` ? `Неправильний рядок: повинен закінчуватися на "${t.suffix}"` : t.format === `includes` ? `Неправильний рядок: повинен містити "${t.includes}"` : t.format === `regex` ? `Неправильний рядок: повинен відповідати шаблону ${t.pattern}` : `Неправильний ${n[t.format] ?? e.format}`; } case `not_multiple_of`: return `Неправильне число: повинно бути кратним ${e.divisor}`; case `unrecognized_keys`: return `Нерозпізнаний ключ${e.keys.length > 1 ? `і` : ``}: ${C$10(e.keys, `, `)}`; case `invalid_key`: return `Неправильний ключ у ${e.origin}`; case `invalid_union`: return `Неправильні вхідні дані`; case `invalid_element`: return `Неправильне значення у ${e.origin}`; default: return `Неправильні вхідні дані`; } }; }; function xs$2() { return { localeError: bs$2() }; } function Ss$2() { return xs$2(); } const Cs$2 = () => { let e = { string: { unit: `حروف`, verb: `ہونا` }, file: { unit: `بائٹس`, verb: `ہونا` }, array: { unit: `آئٹمز`, verb: `ہونا` }, set: { unit: `آئٹمز`, verb: `ہونا` } }; function t(t) { return e[t] ?? null; } let n = { regex: `ان پٹ`, email: `ای میل ایڈریس`, url: `یو آر ایل`, emoji: `ایموجی`, uuid: `یو یو آئی ڈی`, uuidv4: `یو یو آئی ڈی وی 4`, uuidv6: `یو یو آئی ڈی وی 6`, nanoid: `نینو آئی ڈی`, guid: `جی یو آئی ڈی`, cuid: `سی یو آئی ڈی`, cuid2: `سی یو آئی ڈی 2`, ulid: `یو ایل آئی ڈی`, xid: `ایکس آئی ڈی`, ksuid: `کے ایس یو آئی ڈی`, datetime: `آئی ایس او ڈیٹ ٹائم`, date: `آئی ایس او تاریخ`, time: `آئی ایس او وقت`, duration: `آئی ایس او مدت`, ipv4: `آئی پی وی 4 ایڈریس`, ipv6: `آئی پی وی 6 ایڈریس`, cidrv4: `آئی پی وی 4 رینج`, cidrv6: `آئی پی وی 6 رینج`, base64: `بیس 64 ان کوڈڈ سٹرنگ`, base64url: `بیس 64 یو آر ایل ان کوڈڈ سٹرنگ`, json_string: `جے ایس او این سٹرنگ`, e164: `ای 164 نمبر`, jwt: `جے ڈبلیو ٹی`, template_literal: `ان پٹ` }, r = { nan: `NaN`, number: `نمبر`, array: `آرے`, null: `نل` }; return (e) => { switch (e.code) { case `invalid_type`: { let t = r[e.expected] ?? e.expected, n = D$9(e.input), i = r[n] ?? n; return /^[A-Z]/.test(e.expected) ? `غلط ان پٹ: instanceof ${e.expected} متوقع تھا، ${i} موصول ہوا` : `غلط ان پٹ: ${t} متوقع تھا، ${i} موصول ہوا`; } case `invalid_value`: return e.values.length === 1 ? `غلط ان پٹ: ${E$10(e.values[0])} متوقع تھا` : `غلط آپشن: ${C$10(e.values, `|`)} میں سے ایک متوقع تھا`; case `too_big`: { let n = e.inclusive ? `<=` : `<`, r = t(e.origin); return r ? `بہت بڑا: ${e.origin ?? `ویلیو`} کے ${n}${e.maximum.toString()} ${r.unit ?? `عناصر`} ہونے متوقع تھے` : `بہت بڑا: ${e.origin ?? `ویلیو`} کا ${n}${e.maximum.toString()} ہونا متوقع تھا`; } case `too_small`: { let n = e.inclusive ? `>=` : `>`, r = t(e.origin); return r ? `بہت چھوٹا: ${e.origin} کے ${n}${e.minimum.toString()} ${r.unit} ہونے متوقع تھے` : `بہت چھوٹا: ${e.origin} کا ${n}${e.minimum.toString()} ہونا متوقع تھا`; } case `invalid_format`: { let t = e; return t.format === `starts_with` ? `غلط سٹرنگ: "${t.prefix}" سے شروع ہونا چاہیے` : t.format === `ends_with` ? `غلط سٹرنگ: "${t.suffix}" پر ختم ہونا چاہیے` : t.format === `includes` ? `غلط سٹرنگ: "${t.includes}" شامل ہونا چاہیے` : t.format === `regex` ? `غلط سٹرنگ: پیٹرن ${t.pattern} سے میچ ہونا چاہیے` : `غلط ${n[t.format] ?? e.format}`; } case `not_multiple_of`: return `غلط نمبر: ${e.divisor} کا مضاعف ہونا چاہیے`; case `unrecognized_keys`: return `غیر تسلیم شدہ کی${e.keys.length > 1 ? `ز` : ``}: ${C$10(e.keys, `، `)}`; case `invalid_key`: return `${e.origin} میں غلط کی`; case `invalid_union`: return `غلط ان پٹ`; case `invalid_element`: return `${e.origin} میں غلط ویلیو`; default: return `غلط ان پٹ`; } }; }; function ws$2() { return { localeError: Cs$2() }; } const Ts$2 = () => { let e = { string: { unit: `belgi`, verb: `bo‘lishi kerak` }, file: { unit: `bayt`, verb: `bo‘lishi kerak` }, array: { unit: `element`, verb: `bo‘lishi kerak` }, set: { unit: `element`, verb: `bo‘lishi kerak` } }; function t(t) { return e[t] ?? null; } let n = { regex: `kirish`, email: `elektron pochta manzili`, url: `URL`, emoji: `emoji`, uuid: `UUID`, uuidv4: `UUIDv4`, uuidv6: `UUIDv6`, nanoid: `nanoid`, guid: `GUID`, cuid: `cuid`, cuid2: `cuid2`, ulid: `ULID`, xid: `XID`, ksuid: `KSUID`, datetime: `ISO sana va vaqti`, date: `ISO sana`, time: `ISO vaqt`, duration: `ISO davomiylik`, ipv4: `IPv4 manzil`, ipv6: `IPv6 manzil`, mac: `MAC manzil`, cidrv4: `IPv4 diapazon`, cidrv6: `IPv6 diapazon`, base64: `base64 kodlangan satr`, base64url: `base64url kodlangan satr`, json_string: `JSON satr`, e164: `E.164 raqam`, jwt: `JWT`, template_literal: `kirish` }, r = { nan: `NaN`, number: `raqam`, array: `massiv` }; return (e) => { switch (e.code) { case `invalid_type`: { let t = r[e.expected] ?? e.expected, n = D$9(e.input), i = r[n] ?? n; return /^[A-Z]/.test(e.expected) ? `Noto‘g‘ri kirish: kutilgan instanceof ${e.expected}, qabul qilingan ${i}` : `Noto‘g‘ri kirish: kutilgan ${t}, qabul qilingan ${i}`; } case `invalid_value`: return e.values.length === 1 ? `Noto‘g‘ri kirish: kutilgan ${E$10(e.values[0])}` : `Noto‘g‘ri variant: quyidagilardan biri kutilgan ${C$10(e.values, `|`)}`; case `too_big`: { let n = e.inclusive ? `<=` : `<`, r = t(e.origin); return r ? `Juda katta: kutilgan ${e.origin ?? `qiymat`} ${n}${e.maximum.toString()} ${r.unit} ${r.verb}` : `Juda katta: kutilgan ${e.origin ?? `qiymat`} ${n}${e.maximum.toString()}`; } case `too_small`: { let n = e.inclusive ? `>=` : `>`, r = t(e.origin); return r ? `Juda kichik: kutilgan ${e.origin} ${n}${e.minimum.toString()} ${r.unit} ${r.verb}` : `Juda kichik: kutilgan ${e.origin} ${n}${e.minimum.toString()}`; } case `invalid_format`: { let t = e; return t.format === `starts_with` ? `Noto‘g‘ri satr: "${t.prefix}" bilan boshlanishi kerak` : t.format === `ends_with` ? `Noto‘g‘ri satr: "${t.suffix}" bilan tugashi kerak` : t.format === `includes` ? `Noto‘g‘ri satr: "${t.includes}" ni o‘z ichiga olishi kerak` : t.format === `regex` ? `Noto‘g‘ri satr: ${t.pattern} shabloniga mos kelishi kerak` : `Noto‘g‘ri ${n[t.format] ?? e.format}`; } case `not_multiple_of`: return `Noto‘g‘ri raqam: ${e.divisor} ning karralisi bo‘lishi kerak`; case `unrecognized_keys`: return `Noma’lum kalit${e.keys.length > 1 ? `lar` : ``}: ${C$10(e.keys, `, `)}`; case `invalid_key`: return `${e.origin} dagi kalit noto‘g‘ri`; case `invalid_union`: return `Noto‘g‘ri kirish`; case `invalid_element`: return `${e.origin} da noto‘g‘ri qiymat`; default: return `Noto‘g‘ri kirish`; } }; }; function Es$2() { return { localeError: Ts$2() }; } const Ds$2 = () => { let e = { string: { unit: `ký tự`, verb: `có` }, file: { unit: `byte`, verb: `có` }, array: { unit: `phần tử`, verb: `có` }, set: { unit: `phần tử`, verb: `có` } }; function t(t) { return e[t] ?? null; } let n = { regex: `đầu vào`, email: `địa chỉ email`, url: `URL`, emoji: `emoji`, uuid: `UUID`, uuidv4: `UUIDv4`, uuidv6: `UUIDv6`, nanoid: `nanoid`, guid: `GUID`, cuid: `cuid`, cuid2: `cuid2`, ulid: `ULID`, xid: `XID`, ksuid: `KSUID`, datetime: `ngày giờ ISO`, date: `ngày ISO`, time: `giờ ISO`, duration: `khoảng thời gian ISO`, ipv4: `địa chỉ IPv4`, ipv6: `địa chỉ IPv6`, cidrv4: `dải IPv4`, cidrv6: `dải IPv6`, base64: `chuỗi mã hóa base64`, base64url: `chuỗi mã hóa base64url`, json_string: `chuỗi JSON`, e164: `số E.164`, jwt: `JWT`, template_literal: `đầu vào` }, r = { nan: `NaN`, number: `số`, array: `mảng` }; return (e) => { switch (e.code) { case `invalid_type`: { let t = r[e.expected] ?? e.expected, n = D$9(e.input), i = r[n] ?? n; return /^[A-Z]/.test(e.expected) ? `Đầu vào không hợp lệ: mong đợi instanceof ${e.expected}, nhận được ${i}` : `Đầu vào không hợp lệ: mong đợi ${t}, nhận được ${i}`; } case `invalid_value`: return e.values.length === 1 ? `Đầu vào không hợp lệ: mong đợi ${E$10(e.values[0])}` : `Tùy chọn không hợp lệ: mong đợi một trong các giá trị ${C$10(e.values, `|`)}`; case `too_big`: { let n = e.inclusive ? `<=` : `<`, r = t(e.origin); return r ? `Quá lớn: mong đợi ${e.origin ?? `giá trị`} ${r.verb} ${n}${e.maximum.toString()} ${r.unit ?? `phần tử`}` : `Quá lớn: mong đợi ${e.origin ?? `giá trị`} ${n}${e.maximum.toString()}`; } case `too_small`: { let n = e.inclusive ? `>=` : `>`, r = t(e.origin); return r ? `Quá nhỏ: mong đợi ${e.origin} ${r.verb} ${n}${e.minimum.toString()} ${r.unit}` : `Quá nhỏ: mong đợi ${e.origin} ${n}${e.minimum.toString()}`; } case `invalid_format`: { let t = e; return t.format === `starts_with` ? `Chuỗi không hợp lệ: phải bắt đầu bằng "${t.prefix}"` : t.format === `ends_with` ? `Chuỗi không hợp lệ: phải kết thúc bằng "${t.suffix}"` : t.format === `includes` ? `Chuỗi không hợp lệ: phải bao gồm "${t.includes}"` : t.format === `regex` ? `Chuỗi không hợp lệ: phải khớp với mẫu ${t.pattern}` : `${n[t.format] ?? e.format} không hợp lệ`; } case `not_multiple_of`: return `Số không hợp lệ: phải là bội số của ${e.divisor}`; case `unrecognized_keys`: return `Khóa không được nhận dạng: ${C$10(e.keys, `, `)}`; case `invalid_key`: return `Khóa không hợp lệ trong ${e.origin}`; case `invalid_union`: return `Đầu vào không hợp lệ`; case `invalid_element`: return `Giá trị không hợp lệ trong ${e.origin}`; default: return `Đầu vào không hợp lệ`; } }; }; function Os$2() { return { localeError: Ds$2() }; } const ks$2 = () => { let e = { string: { unit: `字符`, verb: `包含` }, file: { unit: `字节`, verb: `包含` }, array: { unit: `项`, verb: `包含` }, set: { unit: `项`, verb: `包含` } }; function t(t) { return e[t] ?? null; } let n = { regex: `输入`, email: `电子邮件`, url: `URL`, emoji: `表情符号`, uuid: `UUID`, uuidv4: `UUIDv4`, uuidv6: `UUIDv6`, nanoid: `nanoid`, guid: `GUID`, cuid: `cuid`, cuid2: `cuid2`, ulid: `ULID`, xid: `XID`, ksuid: `KSUID`, datetime: `ISO日期时间`, date: `ISO日期`, time: `ISO时间`, duration: `ISO时长`, ipv4: `IPv4地址`, ipv6: `IPv6地址`, cidrv4: `IPv4网段`, cidrv6: `IPv6网段`, base64: `base64编码字符串`, base64url: `base64url编码字符串`, json_string: `JSON字符串`, e164: `E.164号码`, jwt: `JWT`, template_literal: `输入` }, r = { nan: `NaN`, number: `数字`, array: `数组`, null: `空值(null)` }; return (e) => { switch (e.code) { case `invalid_type`: { let t = r[e.expected] ?? e.expected, n = D$9(e.input), i = r[n] ?? n; return /^[A-Z]/.test(e.expected) ? `无效输入:期望 instanceof ${e.expected},实际接收 ${i}` : `无效输入:期望 ${t},实际接收 ${i}`; } case `invalid_value`: return e.values.length === 1 ? `无效输入:期望 ${E$10(e.values[0])}` : `无效选项:期望以下之一 ${C$10(e.values, `|`)}`; case `too_big`: { let n = e.inclusive ? `<=` : `<`, r = t(e.origin); return r ? `数值过大:期望 ${e.origin ?? `值`} ${n}${e.maximum.toString()} ${r.unit ?? `个元素`}` : `数值过大:期望 ${e.origin ?? `值`} ${n}${e.maximum.toString()}`; } case `too_small`: { let n = e.inclusive ? `>=` : `>`, r = t(e.origin); return r ? `数值过小:期望 ${e.origin} ${n}${e.minimum.toString()} ${r.unit}` : `数值过小:期望 ${e.origin} ${n}${e.minimum.toString()}`; } case `invalid_format`: { let t = e; return t.format === `starts_with` ? `无效字符串:必须以 "${t.prefix}" 开头` : t.format === `ends_with` ? `无效字符串:必须以 "${t.suffix}" 结尾` : t.format === `includes` ? `无效字符串:必须包含 "${t.includes}"` : t.format === `regex` ? `无效字符串:必须满足正则表达式 ${t.pattern}` : `无效${n[t.format] ?? e.format}`; } case `not_multiple_of`: return `无效数字:必须是 ${e.divisor} 的倍数`; case `unrecognized_keys`: return `出现未知的键(key): ${C$10(e.keys, `, `)}`; case `invalid_key`: return `${e.origin} 中的键(key)无效`; case `invalid_union`: return `无效输入`; case `invalid_element`: return `${e.origin} 中包含无效值(value)`; default: return `无效输入`; } }; }; function As$2() { return { localeError: ks$2() }; } const js$2 = () => { let e = { string: { unit: `字元`, verb: `擁有` }, file: { unit: `位元組`, verb: `擁有` }, array: { unit: `項目`, verb: `擁有` }, set: { unit: `項目`, verb: `擁有` } }; function t(t) { return e[t] ?? null; } let n = { regex: `輸入`, email: `郵件地址`, url: `URL`, emoji: `emoji`, uuid: `UUID`, uuidv4: `UUIDv4`, uuidv6: `UUIDv6`, nanoid: `nanoid`, guid: `GUID`, cuid: `cuid`, cuid2: `cuid2`, ulid: `ULID`, xid: `XID`, ksuid: `KSUID`, datetime: `ISO 日期時間`, date: `ISO 日期`, time: `ISO 時間`, duration: `ISO 期間`, ipv4: `IPv4 位址`, ipv6: `IPv6 位址`, cidrv4: `IPv4 範圍`, cidrv6: `IPv6 範圍`, base64: `base64 編碼字串`, base64url: `base64url 編碼字串`, json_string: `JSON 字串`, e164: `E.164 數值`, jwt: `JWT`, template_literal: `輸入` }, r = { nan: `NaN` }; return (e) => { switch (e.code) { case `invalid_type`: { let t = r[e.expected] ?? e.expected, n = D$9(e.input), i = r[n] ?? n; return /^[A-Z]/.test(e.expected) ? `無效的輸入值:預期為 instanceof ${e.expected},但收到 ${i}` : `無效的輸入值:預期為 ${t},但收到 ${i}`; } case `invalid_value`: return e.values.length === 1 ? `無效的輸入值:預期為 ${E$10(e.values[0])}` : `無效的選項:預期為以下其中之一 ${C$10(e.values, `|`)}`; case `too_big`: { let n = e.inclusive ? `<=` : `<`, r = t(e.origin); return r ? `數值過大:預期 ${e.origin ?? `值`} 應為 ${n}${e.maximum.toString()} ${r.unit ?? `個元素`}` : `數值過大:預期 ${e.origin ?? `值`} 應為 ${n}${e.maximum.toString()}`; } case `too_small`: { let n = e.inclusive ? `>=` : `>`, r = t(e.origin); return r ? `數值過小:預期 ${e.origin} 應為 ${n}${e.minimum.toString()} ${r.unit}` : `數值過小:預期 ${e.origin} 應為 ${n}${e.minimum.toString()}`; } case `invalid_format`: { let t = e; return t.format === `starts_with` ? `無效的字串:必須以 "${t.prefix}" 開頭` : t.format === `ends_with` ? `無效的字串:必須以 "${t.suffix}" 結尾` : t.format === `includes` ? `無效的字串:必須包含 "${t.includes}"` : t.format === `regex` ? `無效的字串:必須符合格式 ${t.pattern}` : `無效的 ${n[t.format] ?? e.format}`; } case `not_multiple_of`: return `無效的數字:必須為 ${e.divisor} 的倍數`; case `unrecognized_keys`: return `無法識別的鍵值${e.keys.length > 1 ? `們` : ``}:${C$10(e.keys, `、`)}`; case `invalid_key`: return `${e.origin} 中有無效的鍵值`; case `invalid_union`: return `無效的輸入值`; case `invalid_element`: return `${e.origin} 中有無效的值`; default: return `無效的輸入值`; } }; }; function Ms$2() { return { localeError: js$2() }; } const Ns$2 = () => { let e = { string: { unit: `àmi`, verb: `ní` }, file: { unit: `bytes`, verb: `ní` }, array: { unit: `nkan`, verb: `ní` }, set: { unit: `nkan`, verb: `ní` } }; function t(t) { return e[t] ?? null; } let n = { regex: `ẹ̀rọ ìbáwọlé`, email: `àdírẹ́sì ìmẹ́lì`, url: `URL`, emoji: `emoji`, uuid: `UUID`, uuidv4: `UUIDv4`, uuidv6: `UUIDv6`, nanoid: `nanoid`, guid: `GUID`, cuid: `cuid`, cuid2: `cuid2`, ulid: `ULID`, xid: `XID`, ksuid: `KSUID`, datetime: `àkókò ISO`, date: `ọjọ́ ISO`, time: `àkókò ISO`, duration: `àkókò tó pé ISO`, ipv4: `àdírẹ́sì IPv4`, ipv6: `àdírẹ́sì IPv6`, cidrv4: `àgbègbè IPv4`, cidrv6: `àgbègbè IPv6`, base64: `ọ̀rọ̀ tí a kọ́ ní base64`, base64url: `ọ̀rọ̀ base64url`, json_string: `ọ̀rọ̀ JSON`, e164: `nọ́mbà E.164`, jwt: `JWT`, template_literal: `ẹ̀rọ ìbáwọlé` }, r = { nan: `NaN`, number: `nọ́mbà`, array: `akopọ` }; return (e) => { switch (e.code) { case `invalid_type`: { let t = r[e.expected] ?? e.expected, n = D$9(e.input), i = r[n] ?? n; return /^[A-Z]/.test(e.expected) ? `Ìbáwọlé aṣìṣe: a ní láti fi instanceof ${e.expected}, àmọ̀ a rí ${i}` : `Ìbáwọlé aṣìṣe: a ní láti fi ${t}, àmọ̀ a rí ${i}`; } case `invalid_value`: return e.values.length === 1 ? `Ìbáwọlé aṣìṣe: a ní láti fi ${E$10(e.values[0])}` : `Àṣàyàn aṣìṣe: yan ọ̀kan lára ${C$10(e.values, `|`)}`; case `too_big`: { let n = e.inclusive ? `<=` : `<`, r = t(e.origin); return r ? `Tó pọ̀ jù: a ní láti jẹ́ pé ${e.origin ?? `iye`} ${r.verb} ${n}${e.maximum} ${r.unit}` : `Tó pọ̀ jù: a ní láti jẹ́ ${n}${e.maximum}`; } case `too_small`: { let n = e.inclusive ? `>=` : `>`, r = t(e.origin); return r ? `Kéré ju: a ní láti jẹ́ pé ${e.origin} ${r.verb} ${n}${e.minimum} ${r.unit}` : `Kéré ju: a ní láti jẹ́ ${n}${e.minimum}`; } case `invalid_format`: { let t = e; return t.format === `starts_with` ? `Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ bẹ̀rẹ̀ pẹ̀lú "${t.prefix}"` : t.format === `ends_with` ? `Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ parí pẹ̀lú "${t.suffix}"` : t.format === `includes` ? `Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ ní "${t.includes}"` : t.format === `regex` ? `Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ bá àpẹẹrẹ mu ${t.pattern}` : `Aṣìṣe: ${n[t.format] ?? e.format}`; } case `not_multiple_of`: return `Nọ́mbà aṣìṣe: gbọ́dọ̀ jẹ́ èyà pípín ti ${e.divisor}`; case `unrecognized_keys`: return `Bọtìnì àìmọ̀: ${C$10(e.keys, `, `)}`; case `invalid_key`: return `Bọtìnì aṣìṣe nínú ${e.origin}`; case `invalid_union`: return `Ìbáwọlé aṣìṣe`; case `invalid_element`: return `Iye aṣìṣe nínú ${e.origin}`; default: return `Ìbáwọlé aṣìṣe`; } }; }; function Ps$2() { return { localeError: Ns$2() }; } var Fs$2 = l$11({ ar: () => Va$4, az: () => Ua$4, be: () => Ka$4, bg: () => Ja$3, ca: () => Xa$3, cs: () => Qa$3, da: () => eo$3, de: () => no$2, en: () => io$2, eo: () => oo$2, es: () => co$2, fa: () => uo$2, fi: () => po$2, fr: () => ho$2, frCA: () => _o$2, he: () => yo$2, hu: () => xo$2, hy: () => To$2, id: () => Do$2, is: () => ko$2, it: () => jo$2, ja: () => No$2, ka: () => Fo$2, kh: () => Ro$2, km: () => Lo$2, ko: () => Bo$2, lt: () => Wo$2, mk: () => Ko$2, ms: () => Jo$2, nl: () => Xo$2, no: () => Qo$2, ota: () => es$2, pl: () => is$2, ps: () => ns$2, pt: () => os$2, ru: () => ls$2, sl: () => ds$2, sv: () => ps$2, ta: () => hs$2, th: () => _s$2, tr: () => ys$2, ua: () => Ss$2, uk: () => xs$2, ur: () => ws$2, uz: () => Es$2, vi: () => Os$2, yo: () => Ps$2, zhCN: () => As$2, zhTW: () => Ms$2 }); var Is$2; const Ls$2 = Symbol(`ZodOutput`); const Rs$2 = Symbol(`ZodInput`); var zs$2 = class { constructor() { this._map = /* @__PURE__ */ new WeakMap(), this._idmap = /* @__PURE__ */ new Map(); } add(e, ...t) { let n = t[0]; return this._map.set(e, n), n && typeof n == `object` && `id` in n && this._idmap.set(n.id, e), this; } clear() { return this._map = /* @__PURE__ */ new WeakMap(), this._idmap = /* @__PURE__ */ new Map(), this; } remove(e) { let t = this._map.get(e); return t && typeof t == `object` && `id` in t && this._idmap.delete(t.id), this._map.delete(e), this; } get(e) { let t = e._zod.parent; if (t) { let n = { ...this.get(t) ?? {} }; delete n.id; let r = { ...n, ...this._map.get(e) }; return Object.keys(r).length ? r : void 0; } return this._map.get(e); } has(e) { return this._map.has(e); } }; function Bs$2() { return new zs$2(); } (Is$2 = globalThis).__zod_globalRegistry ?? (Is$2.__zod_globalRegistry = Bs$2()); const Vs$2 = globalThis.__zod_globalRegistry; function Hs$2(e, t) { return new e({ type: `string`, ...T$10(t) }); } function Us$2(e, t) { return new e({ type: `string`, coerce: !0, ...T$10(t) }); } function Ws$2(e, t) { return new e({ type: `string`, format: `email`, check: `string_format`, abort: !1, ...T$10(t) }); } function Gs$2(e, t) { return new e({ type: `string`, format: `guid`, check: `string_format`, abort: !1, ...T$10(t) }); } function Ks$2(e, t) { return new e({ type: `string`, format: `uuid`, check: `string_format`, abort: !1, ...T$10(t) }); } function qs$2(e, t) { return new e({ type: `string`, format: `uuid`, check: `string_format`, abort: !1, version: `v4`, ...T$10(t) }); } function Js$2(e, t) { return new e({ type: `string`, format: `uuid`, check: `string_format`, abort: !1, version: `v6`, ...T$10(t) }); } function Ys$2(e, t) { return new e({ type: `string`, format: `uuid`, check: `string_format`, abort: !1, version: `v7`, ...T$10(t) }); } function Xs$2(e, t) { return new e({ type: `string`, format: `url`, check: `string_format`, abort: !1, ...T$10(t) }); } function Zs$2(e, t) { return new e({ type: `string`, format: `emoji`, check: `string_format`, abort: !1, ...T$10(t) }); } function Qs$2(e, t) { return new e({ type: `string`, format: `nanoid`, check: `string_format`, abort: !1, ...T$10(t) }); } function $s$2(e, t) { return new e({ type: `string`, format: `cuid`, check: `string_format`, abort: !1, ...T$10(t) }); } function ec$2(e, t) { return new e({ type: `string`, format: `cuid2`, check: `string_format`, abort: !1, ...T$10(t) }); } function tc$2(e, t) { return new e({ type: `string`, format: `ulid`, check: `string_format`, abort: !1, ...T$10(t) }); } function nc$2(e, t) { return new e({ type: `string`, format: `xid`, check: `string_format`, abort: !1, ...T$10(t) }); } function rc$2(e, t) { return new e({ type: `string`, format: `ksuid`, check: `string_format`, abort: !1, ...T$10(t) }); } function ic$2(e, t) { return new e({ type: `string`, format: `ipv4`, check: `string_format`, abort: !1, ...T$10(t) }); } function ac$2(e, t) { return new e({ type: `string`, format: `ipv6`, check: `string_format`, abort: !1, ...T$10(t) }); } function oc$2(e, t) { return new e({ type: `string`, format: `mac`, check: `string_format`, abort: !1, ...T$10(t) }); } function sc$2(e, t) { return new e({ type: `string`, format: `cidrv4`, check: `string_format`, abort: !1, ...T$10(t) }); } function cc$2(e, t) { return new e({ type: `string`, format: `cidrv6`, check: `string_format`, abort: !1, ...T$10(t) }); } function lc$2(e, t) { return new e({ type: `string`, format: `base64`, check: `string_format`, abort: !1, ...T$10(t) }); } function uc$2(e, t) { return new e({ type: `string`, format: `base64url`, check: `string_format`, abort: !1, ...T$10(t) }); } function dc$2(e, t) { return new e({ type: `string`, format: `e164`, check: `string_format`, abort: !1, ...T$10(t) }); } function fc$2(e, t) { return new e({ type: `string`, format: `jwt`, check: `string_format`, abort: !1, ...T$10(t) }); } const pc$2 = { Any: null, Minute: -1, Second: 0, Millisecond: 3, Microsecond: 6 }; function mc$2(e, t) { return new e({ type: `string`, format: `datetime`, check: `string_format`, offset: !1, local: !1, precision: null, ...T$10(t) }); } function hc$2(e, t) { return new e({ type: `string`, format: `date`, check: `string_format`, ...T$10(t) }); } function gc$2(e, t) { return new e({ type: `string`, format: `time`, check: `string_format`, precision: null, ...T$10(t) }); } function _c$2(e, t) { return new e({ type: `string`, format: `duration`, check: `string_format`, ...T$10(t) }); } function vc$2(e, t) { return new e({ type: `number`, checks: [], ...T$10(t) }); } function yc$2(e, t) { return new e({ type: `number`, coerce: !0, checks: [], ...T$10(t) }); } function bc$2(e, t) { return new e({ type: `number`, check: `number_format`, abort: !1, format: `safeint`, ...T$10(t) }); } function xc$2(e, t) { return new e({ type: `number`, check: `number_format`, abort: !1, format: `float32`, ...T$10(t) }); } function Sc$2(e, t) { return new e({ type: `number`, check: `number_format`, abort: !1, format: `float64`, ...T$10(t) }); } function Cc$2(e, t) { return new e({ type: `number`, check: `number_format`, abort: !1, format: `int32`, ...T$10(t) }); } function wc$2(e, t) { return new e({ type: `number`, check: `number_format`, abort: !1, format: `uint32`, ...T$10(t) }); } function Tc$2(e, t) { return new e({ type: `boolean`, ...T$10(t) }); } function Ec$2(e, t) { return new e({ type: `boolean`, coerce: !0, ...T$10(t) }); } function Dc$2(e, t) { return new e({ type: `bigint`, ...T$10(t) }); } function Oc$2(e, t) { return new e({ type: `bigint`, coerce: !0, ...T$10(t) }); } function kc$2(e, t) { return new e({ type: `bigint`, check: `bigint_format`, abort: !1, format: `int64`, ...T$10(t) }); } function Ac$2(e, t) { return new e({ type: `bigint`, check: `bigint_format`, abort: !1, format: `uint64`, ...T$10(t) }); } function jc$2(e, t) { return new e({ type: `symbol`, ...T$10(t) }); } function Mc$2(e, t) { return new e({ type: `undefined`, ...T$10(t) }); } function Nc$2(e, t) { return new e({ type: `null`, ...T$10(t) }); } function Pc$2(e) { return new e({ type: `any` }); } function Fc$2(e) { return new e({ type: `unknown` }); } function Ic$2(e, t) { return new e({ type: `never`, ...T$10(t) }); } function Lc$2(e, t) { return new e({ type: `void`, ...T$10(t) }); } function Rc$2(e, t) { return new e({ type: `date`, ...T$10(t) }); } function zc$2(e, t) { return new e({ type: `date`, coerce: !0, ...T$10(t) }); } function Bc$2(e, t) { return new e({ type: `nan`, ...T$10(t) }); } function Vc$2(e, t) { return new jr$4({ check: `less_than`, ...T$10(t), value: e, inclusive: !1 }); } function M$8(e, t) { return new jr$4({ check: `less_than`, ...T$10(t), value: e, inclusive: !0 }); } function Hc$2(e, t) { return new Mr$4({ check: `greater_than`, ...T$10(t), value: e, inclusive: !1 }); } function N$7(e, t) { return new Mr$4({ check: `greater_than`, ...T$10(t), value: e, inclusive: !0 }); } function Uc$2(e) { return Hc$2(0, e); } function Wc$2(e) { return Vc$2(0, e); } function Gc$2(e) { return M$8(0, e); } function Kc$2(e) { return N$7(0, e); } function qc$2(e, t) { return new Nr$4({ check: `multiple_of`, ...T$10(t), value: e }); } function Jc$2(e, t) { return new Ir$4({ check: `max_size`, ...T$10(t), maximum: e }); } function Yc$2(e, t) { return new Lr$4({ check: `min_size`, ...T$10(t), minimum: e }); } function Xc$2(e, t) { return new Rr$4({ check: `size_equals`, ...T$10(t), size: e }); } function Zc$2(e, t) { return new zr$4({ check: `max_length`, ...T$10(t), maximum: e }); } function Qc$2(e, t) { return new Br$4({ check: `min_length`, ...T$10(t), minimum: e }); } function $c$2(e, t) { return new Vr$4({ check: `length_equals`, ...T$10(t), length: e }); } function el$2(e, t) { return new Ur$4({ check: `string_format`, format: `regex`, ...T$10(t), pattern: e }); } function tl$2(e) { return new Wr$4({ check: `string_format`, format: `lowercase`, ...T$10(e) }); } function nl$2(e) { return new Gr$4({ check: `string_format`, format: `uppercase`, ...T$10(e) }); } function rl$2(e, t) { return new Kr$4({ check: `string_format`, format: `includes`, ...T$10(t), includes: e }); } function il$2(e, t) { return new qr$4({ check: `string_format`, format: `starts_with`, ...T$10(t), prefix: e }); } function al$2(e, t) { return new Jr$4({ check: `string_format`, format: `ends_with`, ...T$10(t), suffix: e }); } function ol$2(e, t, n) { return new Xr$4({ check: `property`, property: e, schema: t, ...T$10(n) }); } function sl$2(e, t) { return new Zr$4({ check: `mime_type`, mime: e, ...T$10(t) }); } function cl$2(e) { return new Qr$4({ check: `overwrite`, tx: e }); } function ll$2(e) { return cl$2((t) => t.normalize(e)); } function ul$2() { return cl$2((e) => e.trim()); } function dl$2() { return cl$2((e) => e.toLowerCase()); } function fl$2() { return cl$2((e) => e.toUpperCase()); } function pl$2() { return cl$2((e) => at$7(e)); } function ml$2(e, t, n) { return new e({ type: `array`, element: t, ...T$10(n) }); } function hl$2(e, t, n) { return new e({ type: `union`, options: t, ...T$10(n) }); } function gl$2(e, t, n) { return new e({ type: `union`, options: t, inclusive: !1, ...T$10(n) }); } function _l$2(e, t, n, r) { return new e({ type: `union`, options: n, discriminator: t, ...T$10(r) }); } function vl$2(e, t, n) { return new e({ type: `intersection`, left: t, right: n }); } function yl$2(e, t, n, r) { let i = n instanceof A$8; return new e({ type: `tuple`, items: t, rest: i ? n : null, ...T$10(i ? r : n) }); } function bl$2(e, t, n, r) { return new e({ type: `record`, keyType: t, valueType: n, ...T$10(r) }); } function xl$2(e, t, n, r) { return new e({ type: `map`, keyType: t, valueType: n, ...T$10(r) }); } function Sl$2(e, t, n) { return new e({ type: `set`, valueType: t, ...T$10(n) }); } function Cl$2(e, t, n) { return new e({ type: `enum`, entries: Array.isArray(t) ? Object.fromEntries(t.map((e) => [e, e])) : t, ...T$10(n) }); } function wl$2(e, t, n) { return new e({ type: `enum`, entries: t, ...T$10(n) }); } function Tl$2(e, t, n) { return new e({ type: `literal`, values: Array.isArray(t) ? t : [t], ...T$10(n) }); } function El$2(e, t) { return new e({ type: `file`, ...T$10(t) }); } function Dl$2(e, t) { return new e({ type: `transform`, transform: t }); } function Ol$2(e, t) { return new e({ type: `optional`, innerType: t }); } function kl$2(e, t) { return new e({ type: `nullable`, innerType: t }); } function Al$2(e, t, n) { return new e({ type: `default`, innerType: t, get defaultValue() { return typeof n == `function` ? n() : ut$7(n); } }); } function jl$2(e, t, n) { return new e({ type: `nonoptional`, innerType: t, ...T$10(n) }); } function Ml$2(e, t) { return new e({ type: `success`, innerType: t }); } function Nl$2(e, t, n) { return new e({ type: `catch`, innerType: t, catchValue: typeof n == `function` ? n : () => n }); } function Pl$2(e, t, n) { return new e({ type: `pipe`, in: t, out: n }); } function Fl$2(e, t) { return new e({ type: `readonly`, innerType: t }); } function Il$2(e, t, n) { return new e({ type: `template_literal`, parts: t, ...T$10(n) }); } function Ll$2(e, t) { return new e({ type: `lazy`, getter: t }); } function Rl$2(e, t) { return new e({ type: `promise`, innerType: t }); } function zl$2(e, t, n) { let r = T$10(n); return r.abort ??= !0, new e({ type: `custom`, check: `custom`, fn: t, ...r }); } function Bl$2(e, t, n) { return new e({ type: `custom`, check: `custom`, fn: t, ...T$10(n) }); } function Vl$2(e) { let t = Hl$2((n) => (n.addIssue = (e) => { if (typeof e == `string`) n.issues.push(Pt$6(e, n.value, t._zod.def)); else { let r = e; r.fatal && (r.continue = !1), r.code ??= `custom`, r.input ??= n.value, r.inst ??= t, r.continue ??= !t._zod.def.abort, n.issues.push(Pt$6(r)); } }, e(n.value, n))); return t; } function Hl$2(e, t) { let n = new k$9({ check: `custom`, ...T$10(t) }); return n._zod.check = e, n; } function Ul$2(e) { let t = new k$9({ check: `describe` }); return t._zod.onattach = [(t) => { let n = Vs$2.get(t) ?? {}; Vs$2.add(t, { ...n, description: e }); }], t._zod.check = () => {}, t; } function Wl$2(e) { let t = new k$9({ check: `meta` }); return t._zod.onattach = [(t) => { let n = Vs$2.get(t) ?? {}; Vs$2.add(t, { ...n, ...e }); }], t._zod.check = () => {}, t; } function Gl$2(e, t) { let n = T$10(t), r = n.truthy ?? [ `true`, `1`, `yes`, `on`, `y`, `enabled` ], i = n.falsy ?? [ `false`, `0`, `no`, `off`, `n`, `disabled` ]; n.case !== `sensitive` && (r = r.map((e) => typeof e == `string` ? e.toLowerCase() : e), i = i.map((e) => typeof e == `string` ? e.toLowerCase() : e)); let a = new Set(r), o = new Set(i), s = e.Codec ?? ka$4, c = e.Boolean ?? Mi$4, l = new s({ type: `pipe`, in: new (e.String ?? ti$4)({ type: `string`, error: n.error }), out: new c({ type: `boolean`, error: n.error }), transform: ((e, t) => { let r = e; return n.case !== `sensitive` && (r = r.toLowerCase()), a.has(r) ? !0 : o.has(r) ? !1 : (t.issues.push({ code: `invalid_value`, expected: `stringbool`, values: [...a, ...o], input: t.value, inst: l, continue: !1 }), {}); }), reverseTransform: ((e, t) => e === !0 ? r[0] || `true` : i[0] || `false`), error: n.error }); return l; } function Kl$2(e, t, n, r = {}) { let i = T$10(r), a = { ...T$10(r), check: `string_format`, type: `string`, format: t, fn: typeof n == `function` ? n : (e) => n.test(e), ...i }; return n instanceof RegExp && (a.pattern = n), new e(a); } function ql$2(e) { let t = e?.target ?? `draft-2020-12`; return t === `draft-4` && (t = `draft-04`), t === `draft-7` && (t = `draft-07`), { processors: e.processors ?? {}, metadataRegistry: e?.metadata ?? Vs$2, target: t, unrepresentable: e?.unrepresentable ?? `throw`, override: e?.override ?? (() => {}), io: e?.io ?? `output`, counter: 0, seen: /* @__PURE__ */ new Map(), cycles: e?.cycles ?? `ref`, reused: e?.reused ?? `inline`, external: e?.external ?? void 0 }; } function P$7(e, t, n = { path: [], schemaPath: [] }) { var r; let i = e._zod.def, a = t.seen.get(e); if (a) return a.count++, n.schemaPath.includes(e) && (a.cycle = n.path), a.schema; let o = { schema: {}, count: 1, cycle: void 0, path: n.path }; t.seen.set(e, o); let s = e._zod.toJSONSchema?.(); if (s) o.schema = s; else { let r = { ...n, schemaPath: [...n.schemaPath, e], path: n.path }; if (e._zod.processJSONSchema) e._zod.processJSONSchema(t, o.schema, r); else { let n = o.schema, a = t.processors[i.type]; if (!a) throw Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`); a(e, t, n, r); } let a = e._zod.parent; a && (o.ref ||= a, P$7(a, t, r), t.seen.get(a).isParent = !0); } let c = t.metadataRegistry.get(e); return c && Object.assign(o.schema, c), t.io === `input` && F$7(e) && (delete o.schema.examples, delete o.schema.default), t.io === `input` && o.schema._prefault && ((r = o.schema).default ?? (r.default = o.schema._prefault)), delete o.schema._prefault, t.seen.get(e).schema; } function Jl$2(e, t) { let n = e.seen.get(t); if (!n) throw Error(`Unprocessed schema. This is a bug in Zod.`); let r = /* @__PURE__ */ new Map(); for (let t of e.seen.entries()) { let n = e.metadataRegistry.get(t[0])?.id; if (n) { let e = r.get(n); if (e && e !== t[0]) throw Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`); r.set(n, t[0]); } } let i = (t) => { let r = e.target === `draft-2020-12` ? `$defs` : `definitions`; if (e.external) { let n = e.external.registry.get(t[0])?.id, i = e.external.uri ?? ((e) => e); if (n) return { ref: i(n) }; let a = t[1].defId ?? t[1].schema.id ?? `schema${e.counter++}`; return t[1].defId = a, { defId: a, ref: `${i(`__shared`)}#/${r}/${a}` }; } if (t[1] === n) return { ref: `#` }; let i = `#/${r}/`, a = t[1].schema.id ?? `__schema${e.counter++}`; return { defId: a, ref: i + a }; }, a = (e) => { if (e[1].schema.$ref) return; let t = e[1], { ref: n, defId: r } = i(e); t.def = { ...t.schema }, r && (t.defId = r); let a = t.schema; for (let e in a) delete a[e]; a.$ref = n; }; if (e.cycles === `throw`) for (let t of e.seen.entries()) { let e = t[1]; if (e.cycle) throw Error(`Cycle detected: #/${e.cycle?.join(`/`)}/ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`); } for (let n of e.seen.entries()) { let r = n[1]; if (t === n[0]) { a(n); continue; } if (e.external) { let r = e.external.registry.get(n[0])?.id; if (t !== n[0] && r) { a(n); continue; } } if (e.metadataRegistry.get(n[0])?.id) { a(n); continue; } if (r.cycle) { a(n); continue; } if (r.count > 1 && e.reused === `ref`) { a(n); continue; } } } function Yl$2(e, t) { let n = e.seen.get(t); if (!n) throw Error(`Unprocessed schema. This is a bug in Zod.`); let r = (t) => { let n = e.seen.get(t); if (n.ref === null) return; let i = n.def ?? n.schema, a = { ...i }, o = n.ref; if (n.ref = null, o) { r(o); let n = e.seen.get(o), s = n.schema; if (s.$ref && (e.target === `draft-07` || e.target === `draft-04` || e.target === `openapi-3.0`) ? (i.allOf = i.allOf ?? [], i.allOf.push(s)) : Object.assign(i, s), Object.assign(i, a), t._zod.parent === o) for (let e in i) e === `$ref` || e === `allOf` || e in a || delete i[e]; if (s.$ref && n.def) for (let e in i) e === `$ref` || e === `allOf` || e in n.def && JSON.stringify(i[e]) === JSON.stringify(n.def[e]) && delete i[e]; } let s = t._zod.parent; if (s && s !== o) { r(s); let t = e.seen.get(s); if (t?.schema.$ref && (i.$ref = t.schema.$ref, t.def)) for (let e in i) e === `$ref` || e === `allOf` || e in t.def && JSON.stringify(i[e]) === JSON.stringify(t.def[e]) && delete i[e]; } e.override({ zodSchema: t, jsonSchema: i, path: n.path ?? [] }); }; for (let t of [...e.seen.entries()].reverse()) r(t[0]); let i = {}; if (e.target === `draft-2020-12` ? i.$schema = `https://json-schema.org/draft/2020-12/schema` : e.target === `draft-07` ? i.$schema = `http://json-schema.org/draft-07/schema#` : e.target === `draft-04` ? i.$schema = `http://json-schema.org/draft-04/schema#` : e.target, e.external?.uri) { let n = e.external.registry.get(t)?.id; if (!n) throw Error("Schema is missing an `id` property"); i.$id = e.external.uri(n); } Object.assign(i, n.def ?? n.schema); let a = e.external?.defs ?? {}; for (let t of e.seen.entries()) { let e = t[1]; e.def && e.defId && (a[e.defId] = e.def); } e.external || Object.keys(a).length > 0 && (e.target === `draft-2020-12` ? i.$defs = a : i.definitions = a); try { let n = JSON.parse(JSON.stringify(i)); return Object.defineProperty(n, "~standard", { value: { ...t[`~standard`], jsonSchema: { input: Zl$2(t, `input`, e.processors), output: Zl$2(t, `output`, e.processors) } }, enumerable: !1, writable: !1 }), n; } catch { throw Error(`Error converting schema to JSON.`); } } function F$7(e, t) { let n = t ?? { seen: /* @__PURE__ */ new Set() }; if (n.seen.has(e)) return !1; n.seen.add(e); let r = e._zod.def; if (r.type === `transform`) return !0; if (r.type === `array`) return F$7(r.element, n); if (r.type === `set`) return F$7(r.valueType, n); if (r.type === `lazy`) return F$7(r.getter(), n); if (r.type === `promise` || r.type === `optional` || r.type === `nonoptional` || r.type === `nullable` || r.type === `readonly` || r.type === "default" || r.type === `prefault`) return F$7(r.innerType, n); if (r.type === `intersection`) return F$7(r.left, n) || F$7(r.right, n); if (r.type === `record` || r.type === `map`) return F$7(r.keyType, n) || F$7(r.valueType, n); if (r.type === `pipe`) return F$7(r.in, n) || F$7(r.out, n); if (r.type === `object`) { for (let e in r.shape) if (F$7(r.shape[e], n)) return !0; return !1; } if (r.type === `union`) { for (let e of r.options) if (F$7(e, n)) return !0; return !1; } if (r.type === `tuple`) { for (let e of r.items) if (F$7(e, n)) return !0; return !!(r.rest && F$7(r.rest, n)); } return !1; } const Xl$2 = (e, t = {}) => (n) => { let r = ql$2({ ...n, processors: t }); return P$7(e, r), Jl$2(r, e), Yl$2(r, e); }; const Zl$2 = (e, t, n = {}) => (r) => { let { libraryOptions: i, target: a } = r ?? {}, o = ql$2({ ...i ?? {}, target: a, io: t, processors: n }); return P$7(e, o), Jl$2(o, e), Yl$2(o, e); }; const Ql$2 = { guid: `uuid`, url: `uri`, datetime: `date-time`, json_string: `json-string`, regex: `` }; const $l$2 = (e, t, n, r) => { let i = n; i.type = `string`; let { minimum: a, maximum: o, format: s, patterns: c, contentEncoding: l } = e._zod.bag; if (typeof a == `number` && (i.minLength = a), typeof o == `number` && (i.maxLength = o), s && (i.format = Ql$2[s] ?? s, i.format === `` && delete i.format, s === `time` && delete i.format), l && (i.contentEncoding = l), c && c.size > 0) { let e = [...c]; e.length === 1 ? i.pattern = e[0].source : e.length > 1 && (i.allOf = [...e.map((e) => ({ ...t.target === `draft-07` || t.target === `draft-04` || t.target === `openapi-3.0` ? { type: `string` } : {}, pattern: e.source }))]); } }; const eu$2 = (e, t, n, r) => { let i = n, { minimum: a, maximum: o, format: s, multipleOf: c, exclusiveMaximum: l, exclusiveMinimum: u } = e._zod.bag; typeof s == `string` && s.includes(`int`) ? i.type = `integer` : i.type = `number`, typeof u == `number` && (t.target === `draft-04` || t.target === `openapi-3.0` ? (i.minimum = u, i.exclusiveMinimum = !0) : i.exclusiveMinimum = u), typeof a == `number` && (i.minimum = a, typeof u == `number` && t.target !== `draft-04` && (u >= a ? delete i.minimum : delete i.exclusiveMinimum)), typeof l == `number` && (t.target === `draft-04` || t.target === `openapi-3.0` ? (i.maximum = l, i.exclusiveMaximum = !0) : i.exclusiveMaximum = l), typeof o == `number` && (i.maximum = o, typeof l == `number` && t.target !== `draft-04` && (l <= o ? delete i.maximum : delete i.exclusiveMaximum)), typeof c == `number` && (i.multipleOf = c); }; const tu$2 = (e, t, n, r) => { n.type = `boolean`; }; const nu$2 = (e, t, n, r) => { if (t.unrepresentable === `throw`) throw Error(`BigInt cannot be represented in JSON Schema`); }; const ru$2 = (e, t, n, r) => { if (t.unrepresentable === `throw`) throw Error(`Symbols cannot be represented in JSON Schema`); }; const iu$2 = (e, t, n, r) => { t.target === `openapi-3.0` ? (n.type = `string`, n.nullable = !0, n.enum = [null]) : n.type = `null`; }; const au$2 = (e, t, n, r) => { if (t.unrepresentable === `throw`) throw Error(`Undefined cannot be represented in JSON Schema`); }; const ou$2 = (e, t, n, r) => { if (t.unrepresentable === `throw`) throw Error(`Void cannot be represented in JSON Schema`); }; const su$2 = (e, t, n, r) => { n.not = {}; }; const cu$2 = (e, t, n, r) => {}; const lu$2 = (e, t, n, r) => {}; const uu$2 = (e, t, n, r) => { if (t.unrepresentable === `throw`) throw Error(`Date cannot be represented in JSON Schema`); }; const du$2 = (e, t, n, r) => { let i = e._zod.def, a = We$8(i.entries); a.every((e) => typeof e == `number`) && (n.type = `number`), a.every((e) => typeof e == `string`) && (n.type = `string`), n.enum = a; }; const fu$2 = (e, t, n, r) => { let i = e._zod.def, a = []; for (let e of i.values) if (e === void 0) { if (t.unrepresentable === `throw`) throw Error("Literal `undefined` cannot be represented in JSON Schema"); } else if (typeof e == `bigint`) { if (t.unrepresentable === `throw`) throw Error(`BigInt literals cannot be represented in JSON Schema`); a.push(Number(e)); } else a.push(e); if (a.length !== 0) if (a.length === 1) { let e = a[0]; n.type = e === null ? `null` : typeof e, t.target === `draft-04` || t.target === `openapi-3.0` ? n.enum = [e] : n.const = e; } else a.every((e) => typeof e == `number`) && (n.type = `number`), a.every((e) => typeof e == `string`) && (n.type = `string`), a.every((e) => typeof e == `boolean`) && (n.type = `boolean`), a.every((e) => e === null) && (n.type = `null`), n.enum = a; }; const pu$2 = (e, t, n, r) => { if (t.unrepresentable === `throw`) throw Error(`NaN cannot be represented in JSON Schema`); }; const mu$2 = (e, t, n, r) => { let i = n, a = e._zod.pattern; if (!a) throw Error(`Pattern not found in template literal`); i.type = `string`, i.pattern = a.source; }; const hu$2 = (e, t, n, r) => { let i = n, a = { type: `string`, format: `binary`, contentEncoding: `binary` }, { minimum: o, maximum: s, mime: c } = e._zod.bag; o !== void 0 && (a.minLength = o), s !== void 0 && (a.maxLength = s), c ? c.length === 1 ? (a.contentMediaType = c[0], Object.assign(i, a)) : (Object.assign(i, a), i.anyOf = c.map((e) => ({ contentMediaType: e }))) : Object.assign(i, a); }; const gu$2 = (e, t, n, r) => { n.type = `boolean`; }; const _u$2 = (e, t, n, r) => { if (t.unrepresentable === `throw`) throw Error(`Custom types cannot be represented in JSON Schema`); }; const vu$2 = (e, t, n, r) => { if (t.unrepresentable === `throw`) throw Error(`Function types cannot be represented in JSON Schema`); }; const yu$2 = (e, t, n, r) => { if (t.unrepresentable === `throw`) throw Error(`Transforms cannot be represented in JSON Schema`); }; const bu$2 = (e, t, n, r) => { if (t.unrepresentable === `throw`) throw Error(`Map cannot be represented in JSON Schema`); }; const xu$2 = (e, t, n, r) => { if (t.unrepresentable === `throw`) throw Error(`Set cannot be represented in JSON Schema`); }; const Su$2 = (e, t, n, r) => { let i = n, a = e._zod.def, { minimum: o, maximum: s } = e._zod.bag; typeof o == `number` && (i.minItems = o), typeof s == `number` && (i.maxItems = s), i.type = `array`, i.items = P$7(a.element, t, { ...r, path: [...r.path, `items`] }); }; const Cu$2 = (e, t, n, r) => { let i = n, a = e._zod.def; i.type = `object`, i.properties = {}; let o = a.shape; for (let e in o) i.properties[e] = P$7(o[e], t, { ...r, path: [ ...r.path, `properties`, e ] }); let s = new Set(Object.keys(o)), c = new Set([...s].filter((e) => { let n = a.shape[e]._zod; return t.io === `input` ? n.optin === void 0 : n.optout === void 0; })); c.size > 0 && (i.required = Array.from(c)), a.catchall?._zod.def.type === `never` ? i.additionalProperties = !1 : a.catchall ? a.catchall && (i.additionalProperties = P$7(a.catchall, t, { ...r, path: [...r.path, `additionalProperties`] })) : t.io === `output` && (i.additionalProperties = !1); }; const wu$2 = (e, t, n, r) => { let i = e._zod.def, a = i.inclusive === !1, o = i.options.map((e, n) => P$7(e, t, { ...r, path: [ ...r.path, a ? `oneOf` : `anyOf`, n ] })); a ? n.oneOf = o : n.anyOf = o; }; const Tu$2 = (e, t, n, r) => { let i = e._zod.def, a = P$7(i.left, t, { ...r, path: [ ...r.path, `allOf`, 0 ] }), o = P$7(i.right, t, { ...r, path: [ ...r.path, `allOf`, 1 ] }), s = (e) => `allOf` in e && Object.keys(e).length === 1; n.allOf = [...s(a) ? a.allOf : [a], ...s(o) ? o.allOf : [o]]; }; const Eu$2 = (e, t, n, r) => { let i = n, a = e._zod.def; i.type = `array`; let o = t.target === `draft-2020-12` ? `prefixItems` : `items`, s = t.target === `draft-2020-12` || t.target === `openapi-3.0` ? `items` : `additionalItems`, c = a.items.map((e, n) => P$7(e, t, { ...r, path: [ ...r.path, o, n ] })), l = a.rest ? P$7(a.rest, t, { ...r, path: [ ...r.path, s, ...t.target === `openapi-3.0` ? [a.items.length] : [] ] }) : null; t.target === `draft-2020-12` ? (i.prefixItems = c, l && (i.items = l)) : t.target === `openapi-3.0` ? (i.items = { anyOf: c }, l && i.items.anyOf.push(l), i.minItems = c.length, l || (i.maxItems = c.length)) : (i.items = c, l && (i.additionalItems = l)); let { minimum: u, maximum: d } = e._zod.bag; typeof u == `number` && (i.minItems = u), typeof d == `number` && (i.maxItems = d); }; const Du$2 = (e, t, n, r) => { let i = n, a = e._zod.def; i.type = `object`; let o = a.keyType, s = o._zod.bag?.patterns; if (a.mode === `loose` && s && s.size > 0) { let e = P$7(a.valueType, t, { ...r, path: [ ...r.path, `patternProperties`, `*` ] }); i.patternProperties = {}; for (let t of s) i.patternProperties[t.source] = e; } else (t.target === `draft-07` || t.target === `draft-2020-12`) && (i.propertyNames = P$7(a.keyType, t, { ...r, path: [...r.path, `propertyNames`] })), i.additionalProperties = P$7(a.valueType, t, { ...r, path: [...r.path, `additionalProperties`] }); let c = o._zod.values; if (c) { let e = [...c].filter((e) => typeof e == `string` || typeof e == `number`); e.length > 0 && (i.required = e); } }; const Ou$2 = (e, t, n, r) => { let i = e._zod.def, a = P$7(i.innerType, t, r), o = t.seen.get(e); t.target === `openapi-3.0` ? (o.ref = i.innerType, n.nullable = !0) : n.anyOf = [a, { type: `null` }]; }; const ku$2 = (e, t, n, r) => { let i = e._zod.def; P$7(i.innerType, t, r); let a = t.seen.get(e); a.ref = i.innerType; }; const Au$2 = (e, t, n, r) => { let i = e._zod.def; P$7(i.innerType, t, r); let a = t.seen.get(e); a.ref = i.innerType, n.default = JSON.parse(JSON.stringify(i.defaultValue)); }; const ju$2 = (e, t, n, r) => { let i = e._zod.def; P$7(i.innerType, t, r); let a = t.seen.get(e); a.ref = i.innerType, t.io === `input` && (n._prefault = JSON.parse(JSON.stringify(i.defaultValue))); }; const Mu$2 = (e, t, n, r) => { let i = e._zod.def; P$7(i.innerType, t, r); let a = t.seen.get(e); a.ref = i.innerType; let o; try { o = i.catchValue(void 0); } catch { throw Error(`Dynamic catch values are not supported in JSON Schema`); } n.default = o; }; const Nu$2 = (e, t, n, r) => { let i = e._zod.def, a = t.io === `input` ? i.in._zod.def.type === `transform` ? i.out : i.in : i.out; P$7(a, t, r); let o = t.seen.get(e); o.ref = a; }; const Pu$2 = (e, t, n, r) => { let i = e._zod.def; P$7(i.innerType, t, r); let a = t.seen.get(e); a.ref = i.innerType, n.readOnly = !0; }; const Fu$2 = (e, t, n, r) => { let i = e._zod.def; P$7(i.innerType, t, r); let a = t.seen.get(e); a.ref = i.innerType; }; const Iu$2 = (e, t, n, r) => { let i = e._zod.def; P$7(i.innerType, t, r); let a = t.seen.get(e); a.ref = i.innerType; }; const Lu$2 = (e, t, n, r) => { let i = e._zod.innerType; P$7(i, t, r); let a = t.seen.get(e); a.ref = i; }; const Ru$2 = { string: $l$2, number: eu$2, boolean: tu$2, bigint: nu$2, symbol: ru$2, null: iu$2, undefined: au$2, void: ou$2, never: su$2, any: cu$2, unknown: lu$2, date: uu$2, enum: du$2, literal: fu$2, nan: pu$2, template_literal: mu$2, file: hu$2, success: gu$2, custom: _u$2, function: vu$2, transform: yu$2, map: bu$2, set: xu$2, array: Su$2, object: Cu$2, union: wu$2, intersection: Tu$2, tuple: Eu$2, record: Du$2, nullable: Ou$2, nonoptional: ku$2, default: Au$2, prefault: ju$2, catch: Mu$2, pipe: Nu$2, readonly: Pu$2, promise: Fu$2, optional: Iu$2, lazy: Lu$2 }; function zu$2(e, t) { if (`_idmap` in e) { let n = e, r = ql$2({ ...t, processors: Ru$2 }), i = {}; for (let e of n._idmap.entries()) { let [t, n] = e; P$7(n, r); } let a = {}; r.external = { registry: n, uri: t?.uri, defs: i }; for (let e of n._idmap.entries()) { let [t, n] = e; Jl$2(r, n), a[t] = Yl$2(r, n); } return Object.keys(i).length > 0 && (a.__shared = { [r.target === `draft-2020-12` ? `$defs` : `definitions`]: i }), { schemas: a }; } let n = ql$2({ ...t, processors: Ru$2 }); return P$7(e, n), Jl$2(n, e), Yl$2(n, e); } var Bu$2 = class { get metadataRegistry() { return this.ctx.metadataRegistry; } get target() { return this.ctx.target; } get unrepresentable() { return this.ctx.unrepresentable; } get override() { return this.ctx.override; } get io() { return this.ctx.io; } get counter() { return this.ctx.counter; } set counter(e) { this.ctx.counter = e; } get seen() { return this.ctx.seen; } constructor(e) { let t = e?.target ?? `draft-2020-12`; t === `draft-4` && (t = `draft-04`), t === `draft-7` && (t = `draft-07`), this.ctx = ql$2({ processors: Ru$2, target: t, ...e?.metadata && { metadata: e.metadata }, ...e?.unrepresentable && { unrepresentable: e.unrepresentable }, ...e?.override && { override: e.override }, ...e?.io && { io: e.io } }); } process(e, t = { path: [], schemaPath: [] }) { return P$7(e, this.ctx, t); } emit(e, t) { t && (t.cycles && (this.ctx.cycles = t.cycles), t.reused && (this.ctx.reused = t.reused), t.external && (this.ctx.external = t.external)), Jl$2(this.ctx, e); let { "~standard": n, ...r } = Yl$2(this.ctx, e); return r; } }; var Vu$2 = l$11({}); var Hu$2 = l$11({ $ZodAny: () => Ri$4, $ZodArray: () => Wi$4, $ZodAsyncError: () => Fe$8, $ZodBase64: () => Ci$4, $ZodBase64URL: () => Ti$4, $ZodBigInt: () => Ni$4, $ZodBigIntFormat: () => Pi$4, $ZodBoolean: () => Mi$4, $ZodCIDRv4: () => bi$4, $ZodCIDRv6: () => xi$4, $ZodCUID: () => ci$4, $ZodCUID2: () => li$4, $ZodCatch: () => Ta$4, $ZodCheck: () => k$9, $ZodCheckBigIntFormat: () => Fr$4, $ZodCheckEndsWith: () => Jr$4, $ZodCheckGreaterThan: () => Mr$4, $ZodCheckIncludes: () => Kr$4, $ZodCheckLengthEquals: () => Vr$4, $ZodCheckLessThan: () => jr$4, $ZodCheckLowerCase: () => Wr$4, $ZodCheckMaxLength: () => zr$4, $ZodCheckMaxSize: () => Ir$4, $ZodCheckMimeType: () => Zr$4, $ZodCheckMinLength: () => Br$4, $ZodCheckMinSize: () => Lr$4, $ZodCheckMultipleOf: () => Nr$4, $ZodCheckNumberFormat: () => Pr$4, $ZodCheckOverwrite: () => Qr$4, $ZodCheckProperty: () => Xr$4, $ZodCheckRegex: () => Ur$4, $ZodCheckSizeEquals: () => Rr$4, $ZodCheckStartsWith: () => qr$4, $ZodCheckStringFormat: () => Hr$4, $ZodCheckUpperCase: () => Gr$4, $ZodCodec: () => ka$4, $ZodCustom: () => Ra$4, $ZodCustomStringFormat: () => ki$4, $ZodDate: () => Hi$4, $ZodDefault: () => ya$4, $ZodDiscriminatedUnion: () => ea$4, $ZodE164: () => Ei$4, $ZodEmail: () => ii$4, $ZodEmoji: () => oi$4, $ZodEncodeError: () => Ie$8, $ZodEnum: () => da$4, $ZodError: () => Wt$5, $ZodExactOptional: () => _a$4, $ZodFile: () => pa$4, $ZodFunction: () => Fa$4, $ZodGUID: () => ni$4, $ZodIPv4: () => _i$4, $ZodIPv6: () => vi$4, $ZodISODate: () => mi$4, $ZodISODateTime: () => pi$4, $ZodISODuration: () => gi$4, $ZodISOTime: () => hi$4, $ZodIntersection: () => ta$4, $ZodJWT: () => Oi$4, $ZodKSUID: () => fi$4, $ZodLazy: () => La$4, $ZodLiteral: () => fa$4, $ZodMAC: () => yi$4, $ZodMap: () => sa$4, $ZodNaN: () => Ea$4, $ZodNanoID: () => si$4, $ZodNever: () => Bi$4, $ZodNonOptional: () => Sa$4, $ZodNull: () => Li$4, $ZodNullable: () => va$4, $ZodNumber: () => Ai$4, $ZodNumberFormat: () => ji$4, $ZodObject: () => Ji$4, $ZodObjectJIT: () => Yi$4, $ZodOptional: () => ga$4, $ZodPipe: () => Da$4, $ZodPrefault: () => xa$4, $ZodPromise: () => Ia$4, $ZodReadonly: () => Ma$4, $ZodRealError: () => O$7, $ZodRecord: () => oa$4, $ZodRegistry: () => zs$2, $ZodSet: () => la$4, $ZodString: () => ti$4, $ZodStringFormat: () => j$7, $ZodSuccess: () => wa$4, $ZodSymbol: () => Fi$4, $ZodTemplateLiteral: () => Pa$4, $ZodTransform: () => ma$4, $ZodTuple: () => ia$4, $ZodType: () => A$8, $ZodULID: () => ui$4, $ZodURL: () => ai$4, $ZodUUID: () => ri$4, $ZodUndefined: () => Ii$4, $ZodUnion: () => Zi$4, $ZodUnknown: () => zi$4, $ZodVoid: () => Vi$4, $ZodXID: () => di$4, $ZodXor: () => $i$4, $brand: () => Pe$8, $constructor: () => x$8, $input: () => Rs$2, $output: () => Ls$2, Doc: () => $r$4, JSONSchema: () => Vu$2, JSONSchemaGenerator: () => Bu$2, NEVER: () => Ne$8, TimePrecision: () => pc$2, _any: () => Pc$2, _array: () => ml$2, _base64: () => lc$2, _base64url: () => uc$2, _bigint: () => Dc$2, _boolean: () => Tc$2, _catch: () => Nl$2, _check: () => Hl$2, _cidrv4: () => sc$2, _cidrv6: () => cc$2, _coercedBigint: () => Oc$2, _coercedBoolean: () => Ec$2, _coercedDate: () => zc$2, _coercedNumber: () => yc$2, _coercedString: () => Us$2, _cuid: () => $s$2, _cuid2: () => ec$2, _custom: () => zl$2, _date: () => Rc$2, _decode: () => sn$5, _decodeAsync: () => dn$5, _default: () => Al$2, _discriminatedUnion: () => _l$2, _e164: () => dc$2, _email: () => Ws$2, _emoji: () => Zs$2, _encode: () => an$5, _encodeAsync: () => ln$5, _endsWith: () => al$2, _enum: () => Cl$2, _file: () => El$2, _float32: () => xc$2, _float64: () => Sc$2, _gt: () => Hc$2, _gte: () => N$7, _guid: () => Gs$2, _includes: () => rl$2, _int: () => bc$2, _int32: () => Cc$2, _int64: () => kc$2, _intersection: () => vl$2, _ipv4: () => ic$2, _ipv6: () => ac$2, _isoDate: () => hc$2, _isoDateTime: () => mc$2, _isoDuration: () => _c$2, _isoTime: () => gc$2, _jwt: () => fc$2, _ksuid: () => rc$2, _lazy: () => Ll$2, _length: () => $c$2, _literal: () => Tl$2, _lowercase: () => tl$2, _lt: () => Vc$2, _lte: () => M$8, _mac: () => oc$2, _map: () => xl$2, _max: () => M$8, _maxLength: () => Zc$2, _maxSize: () => Jc$2, _mime: () => sl$2, _min: () => N$7, _minLength: () => Qc$2, _minSize: () => Yc$2, _multipleOf: () => qc$2, _nan: () => Bc$2, _nanoid: () => Qs$2, _nativeEnum: () => wl$2, _negative: () => Wc$2, _never: () => Ic$2, _nonnegative: () => Kc$2, _nonoptional: () => jl$2, _nonpositive: () => Gc$2, _normalize: () => ll$2, _null: () => Nc$2, _nullable: () => kl$2, _number: () => vc$2, _optional: () => Ol$2, _overwrite: () => cl$2, _parse: () => Xt$5, _parseAsync: () => Qt$5, _pipe: () => Pl$2, _positive: () => Uc$2, _promise: () => Rl$2, _property: () => ol$2, _readonly: () => Fl$2, _record: () => bl$2, _refine: () => Bl$2, _regex: () => el$2, _safeDecode: () => hn$5, _safeDecodeAsync: () => yn$5, _safeEncode: () => pn$5, _safeEncodeAsync: () => _n$5, _safeParse: () => en$5, _safeParseAsync: () => nn$5, _set: () => Sl$2, _size: () => Xc$2, _slugify: () => pl$2, _startsWith: () => il$2, _string: () => Hs$2, _stringFormat: () => Kl$2, _stringbool: () => Gl$2, _success: () => Ml$2, _superRefine: () => Vl$2, _symbol: () => jc$2, _templateLiteral: () => Il$2, _toLowerCase: () => dl$2, _toUpperCase: () => fl$2, _transform: () => Dl$2, _trim: () => ul$2, _tuple: () => yl$2, _uint32: () => wc$2, _uint64: () => Ac$2, _ulid: () => tc$2, _undefined: () => Mc$2, _union: () => hl$2, _unknown: () => Fc$2, _uppercase: () => nl$2, _url: () => Xs$2, _uuid: () => Ks$2, _uuidv4: () => qs$2, _uuidv6: () => Js$2, _uuidv7: () => Ys$2, _void: () => Lc$2, _xid: () => nc$2, _xor: () => gl$2, clone: () => gt$7, config: () => S$9, createStandardJSONSchemaMethod: () => Zl$2, createToJSONSchemaMethod: () => Xl$2, decode: () => cn$5, decodeAsync: () => fn$5, describe: () => Ul$2, encode: () => on$5, encodeAsync: () => un$5, extractDefs: () => Jl$2, finalize: () => Yl$2, flattenError: () => Gt$5, formatError: () => Kt$6, globalConfig: () => Le$8, globalRegistry: () => Vs$2, initializeContext: () => ql$2, isValidBase64: () => Si$4, isValidBase64URL: () => wi$4, isValidJWT: () => Di$4, locales: () => Fs$2, meta: () => Wl$2, parse: () => Zt$5, parseAsync: () => $t$5, prettifyError: () => Yt$5, process: () => P$7, regexes: () => xn$4, registry: () => Bs$2, safeDecode: () => gn$5, safeDecodeAsync: () => bn$5, safeEncode: () => mn$5, safeEncodeAsync: () => vn$5, safeParse: () => tn$5, safeParseAsync: () => rn$5, toDotPath: () => Jt$6, toJSONSchema: () => zu$2, treeifyError: () => qt$6, util: () => Re$8, version: () => ei$4 }); var Uu$2 = l$11({ endsWith: () => al$2, gt: () => Hc$2, gte: () => N$7, includes: () => rl$2, length: () => $c$2, lowercase: () => tl$2, lt: () => Vc$2, lte: () => M$8, maxLength: () => Zc$2, maxSize: () => Jc$2, mime: () => sl$2, minLength: () => Qc$2, minSize: () => Yc$2, multipleOf: () => qc$2, negative: () => Wc$2, nonnegative: () => Kc$2, nonpositive: () => Gc$2, normalize: () => ll$2, overwrite: () => cl$2, positive: () => Uc$2, property: () => ol$2, regex: () => el$2, size: () => Xc$2, slugify: () => pl$2, startsWith: () => il$2, toLowerCase: () => dl$2, toUpperCase: () => fl$2, trim: () => ul$2, uppercase: () => nl$2 }); var Wu$2 = l$11({ ZodISODate: () => qu$2, ZodISODateTime: () => Gu$2, ZodISODuration: () => Zu$2, ZodISOTime: () => Yu$2, date: () => Ju$2, datetime: () => Ku$2, duration: () => Qu$2, time: () => Xu$2 }); const Gu$2 = x$8(`ZodISODateTime`, (e, t) => { pi$4.init(e, t), z$8.init(e, t); }); function Ku$2(e) { return mc$2(Gu$2, e); } const qu$2 = x$8(`ZodISODate`, (e, t) => { mi$4.init(e, t), z$8.init(e, t); }); function Ju$2(e) { return hc$2(qu$2, e); } const Yu$2 = x$8(`ZodISOTime`, (e, t) => { hi$4.init(e, t), z$8.init(e, t); }); function Xu$2(e) { return gc$2(Yu$2, e); } const Zu$2 = x$8(`ZodISODuration`, (e, t) => { gi$4.init(e, t), z$8.init(e, t); }); function Qu$2(e) { return _c$2(Zu$2, e); } const $u$2 = (e, t) => { Wt$5.init(e, t), e.name = `ZodError`, Object.defineProperties(e, { format: { value: (t) => Kt$6(e, t) }, flatten: { value: (t) => Gt$5(e, t) }, addIssue: { value: (t) => { e.issues.push(t), e.message = JSON.stringify(e.issues, Ge$8, 2); } }, addIssues: { value: (t) => { e.issues.push(...t), e.message = JSON.stringify(e.issues, Ge$8, 2); } }, isEmpty: { get() { return e.issues.length === 0; } } }); }; const ed$2 = x$8(`ZodError`, $u$2); const I$7 = x$8(`ZodError`, $u$2, { Parent: Error }); const td$2 = Xt$5(I$7); const nd$2 = Qt$5(I$7); const rd$2 = en$5(I$7); const id$2 = nn$5(I$7); const ad$2 = an$5(I$7); const od$2 = sn$5(I$7); const sd$2 = ln$5(I$7); const cd$2 = dn$5(I$7); const ld$2 = pn$5(I$7); const ud$2 = hn$5(I$7); const dd$2 = _n$5(I$7); const fd$2 = yn$5(I$7); var pd$2 = l$11({ ZodAny: () => Mf$1, ZodArray: () => Hf$1, ZodBase64: () => Qd$1, ZodBase64URL: () => ef$1, ZodBigInt: () => xf$1, ZodBigIntFormat: () => Cf$1, ZodBoolean: () => yf$1, ZodCIDRv4: () => Jd$1, ZodCIDRv6: () => Xd$1, ZodCUID: () => Md$1, ZodCUID2: () => Pd$1, ZodCatch: () => Pp$1, ZodCodec: () => Bp$1, ZodCustom: () => Qp$1, ZodCustomStringFormat: () => sf$1, ZodDate: () => Bf$1, ZodDefault: () => Ep$1, ZodDiscriminatedUnion: () => Qf$1, ZodE164: () => nf$1, ZodEmail: () => gd$2, ZodEmoji: () => Od$1, ZodEnum: () => dp$1, ZodExactOptional: () => xp$1, ZodFile: () => hp$1, ZodFunction: () => Xp$1, ZodGUID: () => vd$2, ZodIPv4: () => Hd$1, ZodIPv6: () => Kd$1, ZodIntersection: () => ep$1, ZodJWT: () => af$1, ZodKSUID: () => Bd$1, ZodLazy: () => Kp$1, ZodLiteral: () => mp$1, ZodMAC: () => Wd$1, ZodMap: () => sp$1, ZodNaN: () => Ip$1, ZodNanoID: () => Ad$1, ZodNever: () => If$1, ZodNonOptional: () => Ap$1, ZodNull: () => Af$1, ZodNullable: () => Cp$1, ZodNumber: () => ff$1, ZodNumberFormat: () => pf$1, ZodObject: () => Gf$1, ZodOptional: () => yp$1, ZodPipe: () => Rp$1, ZodPrefault: () => Op$1, ZodPromise: () => Jp$1, ZodReadonly: () => Hp$1, ZodRecord: () => ip$1, ZodSet: () => lp$1, ZodString: () => hd$2, ZodStringFormat: () => z$8, ZodSuccess: () => Mp$1, ZodSymbol: () => Ef$1, ZodTemplateLiteral: () => Wp$1, ZodTransform: () => _p$1, ZodTuple: () => np$1, ZodType: () => L$7, ZodULID: () => Id$1, ZodURL: () => Td$2, ZodUUID: () => bd$2, ZodUndefined: () => Of$1, ZodUnion: () => Jf$1, ZodUnknown: () => Pf$1, ZodVoid: () => Rf$1, ZodXID: () => Rd$1, ZodXor: () => Xf$1, _ZodString: () => md$2, _default: () => Dp$1, _function: () => Zp$1, any: () => Nf$1, array: () => Uf$1, base64: () => $d$1, base64url: () => tf$1, bigint: () => Sf$1, boolean: () => bf$1, catch: () => Fp$1, check: () => $p$1, cidrv4: () => Yd$1, cidrv6: () => Zd$1, codec: () => Vp$1, cuid: () => Nd$1, cuid2: () => Fd$1, custom: () => em$1, date: () => Vf$1, describe: () => rm$2, discriminatedUnion: () => $f$1, e164: () => rf$1, email: () => _d$2, emoji: () => kd$1, enum: () => fp$1, exactOptional: () => Sp$1, file: () => gp$1, float32: () => hf$1, float64: () => gf$1, function: () => Zp$1, guid: () => yd$2, hash: () => df$1, hex: () => uf$1, hostname: () => lf$1, httpUrl: () => Dd$1, instanceof: () => am$1, int: () => mf$1, int32: () => _f$1, int64: () => wf$1, intersection: () => tp$1, ipv4: () => Ud$1, ipv6: () => qd$1, json: () => sm$1, jwt: () => of$1, keyof: () => Wf$1, ksuid: () => Vd$1, lazy: () => qp$1, literal: () => U$8, looseObject: () => qf$1, looseRecord: () => op$1, mac: () => Gd$1, map: () => cp$2, meta: () => im$1, nan: () => Lp$1, nanoid: () => jd$1, nativeEnum: () => pp$1, never: () => Lf$1, nonoptional: () => jp$1, null: () => jf$1, nullable: () => wp$1, nullish: () => Tp$1, number: () => B$9, object: () => V$8, optional: () => bp$1, partialRecord: () => ap$1, pipe: () => zp$1, prefault: () => kp$1, preprocess: () => cm$1, promise: () => Yp$1, readonly: () => Up$1, record: () => H$8, refine: () => tm$1, set: () => up$1, strictObject: () => Kf$1, string: () => R$8, stringFormat: () => cf$1, stringbool: () => om$1, success: () => Np$1, superRefine: () => nm$1, symbol: () => Df$1, templateLiteral: () => Gp$1, transform: () => vp$1, tuple: () => rp$1, uint32: () => vf$1, uint64: () => Tf$1, ulid: () => Ld$1, undefined: () => kf$1, union: () => Yf$1, unknown: () => Ff$1, url: () => Ed$2, uuid: () => xd$2, uuidv4: () => Sd$2, uuidv6: () => Cd$2, uuidv7: () => wd$2, void: () => zf$1, xid: () => zd$1, xor: () => Zf$1 }); const L$7 = x$8(`ZodType`, (e, t) => (A$8.init(e, t), Object.assign(e[`~standard`], { jsonSchema: { input: Zl$2(e, `input`), output: Zl$2(e, `output`) } }), e.toJSONSchema = Xl$2(e, {}), e.def = t, e.type = t.type, Object.defineProperty(e, "_def", { value: t }), e.check = (...n) => e.clone($e$8(t, { checks: [...t.checks ?? [], ...n.map((e) => typeof e == `function` ? { _zod: { check: e, def: { check: `custom` }, onattach: [] } } : e)] }), { parent: !0 }), e.with = e.check, e.clone = (t, n) => gt$7(e, t, n), e.brand = () => e, e.register = ((t, n) => (t.add(e, n), e)), e.parse = (t, n) => td$2(e, t, n, { callee: e.parse }), e.safeParse = (t, n) => rd$2(e, t, n), e.parseAsync = async (t, n) => nd$2(e, t, n, { callee: e.parseAsync }), e.safeParseAsync = async (t, n) => id$2(e, t, n), e.spa = e.safeParseAsync, e.encode = (t, n) => ad$2(e, t, n), e.decode = (t, n) => od$2(e, t, n), e.encodeAsync = async (t, n) => sd$2(e, t, n), e.decodeAsync = async (t, n) => cd$2(e, t, n), e.safeEncode = (t, n) => ld$2(e, t, n), e.safeDecode = (t, n) => ud$2(e, t, n), e.safeEncodeAsync = async (t, n) => dd$2(e, t, n), e.safeDecodeAsync = async (t, n) => fd$2(e, t, n), e.refine = (t, n) => e.check(tm$1(t, n)), e.superRefine = (t) => e.check(nm$1(t)), e.overwrite = (t) => e.check(cl$2(t)), e.optional = () => bp$1(e), e.exactOptional = () => Sp$1(e), e.nullable = () => wp$1(e), e.nullish = () => bp$1(wp$1(e)), e.nonoptional = (t) => jp$1(e, t), e.array = () => Uf$1(e), e.or = (t) => Yf$1([e, t]), e.and = (t) => tp$1(e, t), e.transform = (t) => zp$1(e, vp$1(t)), e.default = (t) => Dp$1(e, t), e.prefault = (t) => kp$1(e, t), e.catch = (t) => Fp$1(e, t), e.pipe = (t) => zp$1(e, t), e.readonly = () => Up$1(e), e.describe = (t) => { let n = e.clone(); return Vs$2.add(n, { description: t }), n; }, Object.defineProperty(e, "description", { get() { return Vs$2.get(e)?.description; }, configurable: !0 }), e.meta = (...t) => { if (t.length === 0) return Vs$2.get(e); let n = e.clone(); return Vs$2.add(n, t[0]), n; }, e.isOptional = () => e.safeParse(void 0).success, e.isNullable = () => e.safeParse(null).success, e.apply = (t) => t(e), e)); const md$2 = x$8(`_ZodString`, (e, t) => { ti$4.init(e, t), L$7.init(e, t), e._zod.processJSONSchema = (t, n, r) => $l$2(e, t, n, r); let n = e._zod.bag; e.format = n.format ?? null, e.minLength = n.minimum ?? null, e.maxLength = n.maximum ?? null, e.regex = (...t) => e.check(el$2(...t)), e.includes = (...t) => e.check(rl$2(...t)), e.startsWith = (...t) => e.check(il$2(...t)), e.endsWith = (...t) => e.check(al$2(...t)), e.min = (...t) => e.check(Qc$2(...t)), e.max = (...t) => e.check(Zc$2(...t)), e.length = (...t) => e.check($c$2(...t)), e.nonempty = (...t) => e.check(Qc$2(1, ...t)), e.lowercase = (t) => e.check(tl$2(t)), e.uppercase = (t) => e.check(nl$2(t)), e.trim = () => e.check(ul$2()), e.normalize = (...t) => e.check(ll$2(...t)), e.toLowerCase = () => e.check(dl$2()), e.toUpperCase = () => e.check(fl$2()), e.slugify = () => e.check(pl$2()); }); const hd$2 = x$8(`ZodString`, (e, t) => { ti$4.init(e, t), md$2.init(e, t), e.email = (t) => e.check(Ws$2(gd$2, t)), e.url = (t) => e.check(Xs$2(Td$2, t)), e.jwt = (t) => e.check(fc$2(af$1, t)), e.emoji = (t) => e.check(Zs$2(Od$1, t)), e.guid = (t) => e.check(Gs$2(vd$2, t)), e.uuid = (t) => e.check(Ks$2(bd$2, t)), e.uuidv4 = (t) => e.check(qs$2(bd$2, t)), e.uuidv6 = (t) => e.check(Js$2(bd$2, t)), e.uuidv7 = (t) => e.check(Ys$2(bd$2, t)), e.nanoid = (t) => e.check(Qs$2(Ad$1, t)), e.guid = (t) => e.check(Gs$2(vd$2, t)), e.cuid = (t) => e.check($s$2(Md$1, t)), e.cuid2 = (t) => e.check(ec$2(Pd$1, t)), e.ulid = (t) => e.check(tc$2(Id$1, t)), e.base64 = (t) => e.check(lc$2(Qd$1, t)), e.base64url = (t) => e.check(uc$2(ef$1, t)), e.xid = (t) => e.check(nc$2(Rd$1, t)), e.ksuid = (t) => e.check(rc$2(Bd$1, t)), e.ipv4 = (t) => e.check(ic$2(Hd$1, t)), e.ipv6 = (t) => e.check(ac$2(Kd$1, t)), e.cidrv4 = (t) => e.check(sc$2(Jd$1, t)), e.cidrv6 = (t) => e.check(cc$2(Xd$1, t)), e.e164 = (t) => e.check(dc$2(nf$1, t)), e.datetime = (t) => e.check(Ku$2(t)), e.date = (t) => e.check(Ju$2(t)), e.time = (t) => e.check(Xu$2(t)), e.duration = (t) => e.check(Qu$2(t)); }); function R$8(e) { return Hs$2(hd$2, e); } const z$8 = x$8(`ZodStringFormat`, (e, t) => { j$7.init(e, t), md$2.init(e, t); }); const gd$2 = x$8(`ZodEmail`, (e, t) => { ii$4.init(e, t), z$8.init(e, t); }); function _d$2(e) { return Ws$2(gd$2, e); } const vd$2 = x$8(`ZodGUID`, (e, t) => { ni$4.init(e, t), z$8.init(e, t); }); function yd$2(e) { return Gs$2(vd$2, e); } const bd$2 = x$8(`ZodUUID`, (e, t) => { ri$4.init(e, t), z$8.init(e, t); }); function xd$2(e) { return Ks$2(bd$2, e); } function Sd$2(e) { return qs$2(bd$2, e); } function Cd$2(e) { return Js$2(bd$2, e); } function wd$2(e) { return Ys$2(bd$2, e); } const Td$2 = x$8(`ZodURL`, (e, t) => { ai$4.init(e, t), z$8.init(e, t); }); function Ed$2(e) { return Xs$2(Td$2, e); } function Dd$1(e) { return Xs$2(Td$2, { protocol: /^https?$/, hostname: Xn$4, ...T$10(e) }); } const Od$1 = x$8(`ZodEmoji`, (e, t) => { oi$4.init(e, t), z$8.init(e, t); }); function kd$1(e) { return Zs$2(Od$1, e); } const Ad$1 = x$8(`ZodNanoID`, (e, t) => { si$4.init(e, t), z$8.init(e, t); }); function jd$1(e) { return Qs$2(Ad$1, e); } const Md$1 = x$8(`ZodCUID`, (e, t) => { ci$4.init(e, t), z$8.init(e, t); }); function Nd$1(e) { return $s$2(Md$1, e); } const Pd$1 = x$8(`ZodCUID2`, (e, t) => { li$4.init(e, t), z$8.init(e, t); }); function Fd$1(e) { return ec$2(Pd$1, e); } const Id$1 = x$8(`ZodULID`, (e, t) => { ui$4.init(e, t), z$8.init(e, t); }); function Ld$1(e) { return tc$2(Id$1, e); } const Rd$1 = x$8(`ZodXID`, (e, t) => { di$4.init(e, t), z$8.init(e, t); }); function zd$1(e) { return nc$2(Rd$1, e); } const Bd$1 = x$8(`ZodKSUID`, (e, t) => { fi$4.init(e, t), z$8.init(e, t); }); function Vd$1(e) { return rc$2(Bd$1, e); } const Hd$1 = x$8(`ZodIPv4`, (e, t) => { _i$4.init(e, t), z$8.init(e, t); }); function Ud$1(e) { return ic$2(Hd$1, e); } const Wd$1 = x$8(`ZodMAC`, (e, t) => { yi$4.init(e, t), z$8.init(e, t); }); function Gd$1(e) { return oc$2(Wd$1, e); } const Kd$1 = x$8(`ZodIPv6`, (e, t) => { vi$4.init(e, t), z$8.init(e, t); }); function qd$1(e) { return ac$2(Kd$1, e); } const Jd$1 = x$8(`ZodCIDRv4`, (e, t) => { bi$4.init(e, t), z$8.init(e, t); }); function Yd$1(e) { return sc$2(Jd$1, e); } const Xd$1 = x$8(`ZodCIDRv6`, (e, t) => { xi$4.init(e, t), z$8.init(e, t); }); function Zd$1(e) { return cc$2(Xd$1, e); } const Qd$1 = x$8(`ZodBase64`, (e, t) => { Ci$4.init(e, t), z$8.init(e, t); }); function $d$1(e) { return lc$2(Qd$1, e); } const ef$1 = x$8(`ZodBase64URL`, (e, t) => { Ti$4.init(e, t), z$8.init(e, t); }); function tf$1(e) { return uc$2(ef$1, e); } const nf$1 = x$8(`ZodE164`, (e, t) => { Ei$4.init(e, t), z$8.init(e, t); }); function rf$1(e) { return dc$2(nf$1, e); } const af$1 = x$8(`ZodJWT`, (e, t) => { Oi$4.init(e, t), z$8.init(e, t); }); function of$1(e) { return fc$2(af$1, e); } const sf$1 = x$8(`ZodCustomStringFormat`, (e, t) => { ki$4.init(e, t), z$8.init(e, t); }); function cf$1(e, t, n = {}) { return Kl$2(sf$1, e, t, n); } function lf$1(e) { return Kl$2(sf$1, `hostname`, Yn$3, e); } function uf$1(e) { return Kl$2(sf$1, `hex`, fr$3, e); } function df$1(e, t) { let n = `${e}_${t?.enc ?? `hex`}`, r = xn$4[n]; if (!r) throw Error(`Unrecognized hash format: ${n}`); return Kl$2(sf$1, n, r, t); } const ff$1 = x$8(`ZodNumber`, (e, t) => { Ai$4.init(e, t), L$7.init(e, t), e._zod.processJSONSchema = (t, n, r) => eu$2(e, t, n, r), e.gt = (t, n) => e.check(Hc$2(t, n)), e.gte = (t, n) => e.check(N$7(t, n)), e.min = (t, n) => e.check(N$7(t, n)), e.lt = (t, n) => e.check(Vc$2(t, n)), e.lte = (t, n) => e.check(M$8(t, n)), e.max = (t, n) => e.check(M$8(t, n)), e.int = (t) => e.check(mf$1(t)), e.safe = (t) => e.check(mf$1(t)), e.positive = (t) => e.check(Hc$2(0, t)), e.nonnegative = (t) => e.check(N$7(0, t)), e.negative = (t) => e.check(Vc$2(0, t)), e.nonpositive = (t) => e.check(M$8(0, t)), e.multipleOf = (t, n) => e.check(qc$2(t, n)), e.step = (t, n) => e.check(qc$2(t, n)), e.finite = () => e; let n = e._zod.bag; e.minValue = Math.max(n.minimum ?? -Infinity, n.exclusiveMinimum ?? -Infinity) ?? null, e.maxValue = Math.min(n.maximum ?? Infinity, n.exclusiveMaximum ?? Infinity) ?? null, e.isInt = (n.format ?? ``).includes(`int`) || Number.isSafeInteger(n.multipleOf ?? .5), e.isFinite = !0, e.format = n.format ?? null; }); function B$9(e) { return vc$2(ff$1, e); } const pf$1 = x$8(`ZodNumberFormat`, (e, t) => { ji$4.init(e, t), ff$1.init(e, t); }); function mf$1(e) { return bc$2(pf$1, e); } function hf$1(e) { return xc$2(pf$1, e); } function gf$1(e) { return Sc$2(pf$1, e); } function _f$1(e) { return Cc$2(pf$1, e); } function vf$1(e) { return wc$2(pf$1, e); } const yf$1 = x$8(`ZodBoolean`, (e, t) => { Mi$4.init(e, t), L$7.init(e, t), e._zod.processJSONSchema = (t, n, r) => tu$2(e, t, n, r); }); function bf$1(e) { return Tc$2(yf$1, e); } const xf$1 = x$8(`ZodBigInt`, (e, t) => { Ni$4.init(e, t), L$7.init(e, t), e._zod.processJSONSchema = (t, n, r) => nu$2(e, t, n, r), e.gte = (t, n) => e.check(N$7(t, n)), e.min = (t, n) => e.check(N$7(t, n)), e.gt = (t, n) => e.check(Hc$2(t, n)), e.gte = (t, n) => e.check(N$7(t, n)), e.min = (t, n) => e.check(N$7(t, n)), e.lt = (t, n) => e.check(Vc$2(t, n)), e.lte = (t, n) => e.check(M$8(t, n)), e.max = (t, n) => e.check(M$8(t, n)), e.positive = (t) => e.check(Hc$2(BigInt(0), t)), e.negative = (t) => e.check(Vc$2(BigInt(0), t)), e.nonpositive = (t) => e.check(M$8(BigInt(0), t)), e.nonnegative = (t) => e.check(N$7(BigInt(0), t)), e.multipleOf = (t, n) => e.check(qc$2(t, n)); let n = e._zod.bag; e.minValue = n.minimum ?? null, e.maxValue = n.maximum ?? null, e.format = n.format ?? null; }); function Sf$1(e) { return Dc$2(xf$1, e); } const Cf$1 = x$8(`ZodBigIntFormat`, (e, t) => { Pi$4.init(e, t), xf$1.init(e, t); }); function wf$1(e) { return kc$2(Cf$1, e); } function Tf$1(e) { return Ac$2(Cf$1, e); } const Ef$1 = x$8(`ZodSymbol`, (e, t) => { Fi$4.init(e, t), L$7.init(e, t), e._zod.processJSONSchema = (t, n, r) => ru$2(e, t, n, r); }); function Df$1(e) { return jc$2(Ef$1, e); } const Of$1 = x$8(`ZodUndefined`, (e, t) => { Ii$4.init(e, t), L$7.init(e, t), e._zod.processJSONSchema = (t, n, r) => au$2(e, t, n, r); }); function kf$1(e) { return Mc$2(Of$1, e); } const Af$1 = x$8(`ZodNull`, (e, t) => { Li$4.init(e, t), L$7.init(e, t), e._zod.processJSONSchema = (t, n, r) => iu$2(e, t, n, r); }); function jf$1(e) { return Nc$2(Af$1, e); } const Mf$1 = x$8(`ZodAny`, (e, t) => { Ri$4.init(e, t), L$7.init(e, t), e._zod.processJSONSchema = (e, t, n) => void 0; }); function Nf$1() { return Pc$2(Mf$1); } const Pf$1 = x$8(`ZodUnknown`, (e, t) => { zi$4.init(e, t), L$7.init(e, t), e._zod.processJSONSchema = (e, t, n) => void 0; }); function Ff$1() { return Fc$2(Pf$1); } const If$1 = x$8(`ZodNever`, (e, t) => { Bi$4.init(e, t), L$7.init(e, t), e._zod.processJSONSchema = (t, n, r) => su$2(e, t, n, r); }); function Lf$1(e) { return Ic$2(If$1, e); } const Rf$1 = x$8(`ZodVoid`, (e, t) => { Vi$4.init(e, t), L$7.init(e, t), e._zod.processJSONSchema = (t, n, r) => ou$2(e, t, n, r); }); function zf$1(e) { return Lc$2(Rf$1, e); } const Bf$1 = x$8(`ZodDate`, (e, t) => { Hi$4.init(e, t), L$7.init(e, t), e._zod.processJSONSchema = (t, n, r) => uu$2(e, t, n, r), e.min = (t, n) => e.check(N$7(t, n)), e.max = (t, n) => e.check(M$8(t, n)); let n = e._zod.bag; e.minDate = n.minimum ? new Date(n.minimum) : null, e.maxDate = n.maximum ? new Date(n.maximum) : null; }); function Vf$1(e) { return Rc$2(Bf$1, e); } const Hf$1 = x$8(`ZodArray`, (e, t) => { Wi$4.init(e, t), L$7.init(e, t), e._zod.processJSONSchema = (t, n, r) => Su$2(e, t, n, r), e.element = t.element, e.min = (t, n) => e.check(Qc$2(t, n)), e.nonempty = (t) => e.check(Qc$2(1, t)), e.max = (t, n) => e.check(Zc$2(t, n)), e.length = (t, n) => e.check($c$2(t, n)), e.unwrap = () => e.element; }); function Uf$1(e, t) { return ml$2(Hf$1, e, t); } function Wf$1(e) { let t = e._zod.def.shape; return fp$1(Object.keys(t)); } const Gf$1 = x$8(`ZodObject`, (e, t) => { Yi$4.init(e, t), L$7.init(e, t), e._zod.processJSONSchema = (t, n, r) => Cu$2(e, t, n, r), w$10(e, `shape`, () => t.shape), e.keyof = () => fp$1(Object.keys(e._zod.def.shape)), e.catchall = (t) => e.clone({ ...e._zod.def, catchall: t }), e.passthrough = () => e.clone({ ...e._zod.def, catchall: Ff$1() }), e.loose = () => e.clone({ ...e._zod.def, catchall: Ff$1() }), e.strict = () => e.clone({ ...e._zod.def, catchall: Lf$1() }), e.strip = () => e.clone({ ...e._zod.def, catchall: void 0 }), e.extend = (t) => Ct$7(e, t), e.safeExtend = (t) => wt$7(e, t), e.merge = (t) => Tt$7(e, t), e.pick = (t) => xt$7(e, t), e.omit = (t) => St$7(e, t), e.partial = (...t) => Et$7(yp$1, e, t[0]), e.required = (...t) => Dt$7(Ap$1, e, t[0]); }); function V$8(e, t) { return new Gf$1({ type: `object`, shape: e ?? {}, ...T$10(t) }); } function Kf$1(e, t) { return new Gf$1({ type: `object`, shape: e, catchall: Lf$1(), ...T$10(t) }); } function qf$1(e, t) { return new Gf$1({ type: `object`, shape: e, catchall: Ff$1(), ...T$10(t) }); } const Jf$1 = x$8(`ZodUnion`, (e, t) => { Zi$4.init(e, t), L$7.init(e, t), e._zod.processJSONSchema = (t, n, r) => wu$2(e, t, n, r), e.options = t.options; }); function Yf$1(e, t) { return new Jf$1({ type: `union`, options: e, ...T$10(t) }); } const Xf$1 = x$8(`ZodXor`, (e, t) => { Jf$1.init(e, t), $i$4.init(e, t), e._zod.processJSONSchema = (t, n, r) => wu$2(e, t, n, r), e.options = t.options; }); function Zf$1(e, t) { return new Xf$1({ type: `union`, options: e, inclusive: !1, ...T$10(t) }); } const Qf$1 = x$8(`ZodDiscriminatedUnion`, (e, t) => { Jf$1.init(e, t), ea$4.init(e, t); }); function $f$1(e, t, n) { return new Qf$1({ type: `union`, options: t, discriminator: e, ...T$10(n) }); } const ep$1 = x$8(`ZodIntersection`, (e, t) => { ta$4.init(e, t), L$7.init(e, t), e._zod.processJSONSchema = (t, n, r) => Tu$2(e, t, n, r); }); function tp$1(e, t) { return new ep$1({ type: `intersection`, left: e, right: t }); } const np$1 = x$8(`ZodTuple`, (e, t) => { ia$4.init(e, t), L$7.init(e, t), e._zod.processJSONSchema = (t, n, r) => Eu$2(e, t, n, r), e.rest = (t) => e.clone({ ...e._zod.def, rest: t }); }); function rp$1(e, t, n) { let r = t instanceof A$8; return new np$1({ type: `tuple`, items: e, rest: r ? t : null, ...T$10(r ? n : t) }); } const ip$1 = x$8(`ZodRecord`, (e, t) => { oa$4.init(e, t), L$7.init(e, t), e._zod.processJSONSchema = (t, n, r) => Du$2(e, t, n, r), e.keyType = t.keyType, e.valueType = t.valueType; }); function H$8(e, t, n) { return new ip$1({ type: `record`, keyType: e, valueType: t, ...T$10(n) }); } function ap$1(e, t, n) { let r = gt$7(e); return r._zod.values = void 0, new ip$1({ type: `record`, keyType: r, valueType: t, ...T$10(n) }); } function op$1(e, t, n) { return new ip$1({ type: `record`, keyType: e, valueType: t, mode: `loose`, ...T$10(n) }); } const sp$1 = x$8(`ZodMap`, (e, t) => { sa$4.init(e, t), L$7.init(e, t), e._zod.processJSONSchema = (t, n, r) => bu$2(e, t, n, r), e.keyType = t.keyType, e.valueType = t.valueType, e.min = (...t) => e.check(Yc$2(...t)), e.nonempty = (t) => e.check(Yc$2(1, t)), e.max = (...t) => e.check(Jc$2(...t)), e.size = (...t) => e.check(Xc$2(...t)); }); function cp$2(e, t, n) { return new sp$1({ type: `map`, keyType: e, valueType: t, ...T$10(n) }); } const lp$1 = x$8(`ZodSet`, (e, t) => { la$4.init(e, t), L$7.init(e, t), e._zod.processJSONSchema = (t, n, r) => xu$2(e, t, n, r), e.min = (...t) => e.check(Yc$2(...t)), e.nonempty = (t) => e.check(Yc$2(1, t)), e.max = (...t) => e.check(Jc$2(...t)), e.size = (...t) => e.check(Xc$2(...t)); }); function up$1(e, t) { return new lp$1({ type: `set`, valueType: e, ...T$10(t) }); } const dp$1 = x$8(`ZodEnum`, (e, t) => { da$4.init(e, t), L$7.init(e, t), e._zod.processJSONSchema = (t, n, r) => du$2(e, t, n, r), e.enum = t.entries, e.options = Object.values(t.entries); let n = new Set(Object.keys(t.entries)); e.extract = (e, r) => { let i = {}; for (let r of e) if (n.has(r)) i[r] = t.entries[r]; else throw Error(`Key ${r} not found in enum`); return new dp$1({ ...t, checks: [], ...T$10(r), entries: i }); }, e.exclude = (e, r) => { let i = { ...t.entries }; for (let t of e) if (n.has(t)) delete i[t]; else throw Error(`Key ${t} not found in enum`); return new dp$1({ ...t, checks: [], ...T$10(r), entries: i }); }; }); function fp$1(e, t) { return new dp$1({ type: `enum`, entries: Array.isArray(e) ? Object.fromEntries(e.map((e) => [e, e])) : e, ...T$10(t) }); } function pp$1(e, t) { return new dp$1({ type: `enum`, entries: e, ...T$10(t) }); } const mp$1 = x$8(`ZodLiteral`, (e, t) => { fa$4.init(e, t), L$7.init(e, t), e._zod.processJSONSchema = (t, n, r) => fu$2(e, t, n, r), e.values = new Set(t.values), Object.defineProperty(e, "value", { get() { if (t.values.length > 1) throw Error("This schema contains multiple valid literal values. Use `.values` instead."); return t.values[0]; } }); }); function U$8(e, t) { return new mp$1({ type: `literal`, values: Array.isArray(e) ? e : [e], ...T$10(t) }); } const hp$1 = x$8(`ZodFile`, (e, t) => { pa$4.init(e, t), L$7.init(e, t), e._zod.processJSONSchema = (t, n, r) => hu$2(e, t, n, r), e.min = (t, n) => e.check(Yc$2(t, n)), e.max = (t, n) => e.check(Jc$2(t, n)), e.mime = (t, n) => e.check(sl$2(Array.isArray(t) ? t : [t], n)); }); function gp$1(e) { return El$2(hp$1, e); } const _p$1 = x$8(`ZodTransform`, (e, t) => { ma$4.init(e, t), L$7.init(e, t), e._zod.processJSONSchema = (t, n, r) => yu$2(e, t, n, r), e._zod.parse = (n, r) => { if (r.direction === `backward`) throw new Ie$8(e.constructor.name); n.addIssue = (r) => { if (typeof r == `string`) n.issues.push(Pt$6(r, n.value, t)); else { let t = r; t.fatal && (t.continue = !1), t.code ??= `custom`, t.input ??= n.value, t.inst ??= e, n.issues.push(Pt$6(t)); } }; let i = t.transform(n.value, n); return i instanceof Promise ? i.then((e) => (n.value = e, n)) : (n.value = i, n); }; }); function vp$1(e) { return new _p$1({ type: `transform`, transform: e }); } const yp$1 = x$8(`ZodOptional`, (e, t) => { ga$4.init(e, t), L$7.init(e, t), e._zod.processJSONSchema = (t, n, r) => Iu$2(e, t, n, r), e.unwrap = () => e._zod.def.innerType; }); function bp$1(e) { return new yp$1({ type: `optional`, innerType: e }); } const xp$1 = x$8(`ZodExactOptional`, (e, t) => { _a$4.init(e, t), L$7.init(e, t), e._zod.processJSONSchema = (t, n, r) => Iu$2(e, t, n, r), e.unwrap = () => e._zod.def.innerType; }); function Sp$1(e) { return new xp$1({ type: `optional`, innerType: e }); } const Cp$1 = x$8(`ZodNullable`, (e, t) => { va$4.init(e, t), L$7.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ou$2(e, t, n, r), e.unwrap = () => e._zod.def.innerType; }); function wp$1(e) { return new Cp$1({ type: `nullable`, innerType: e }); } function Tp$1(e) { return bp$1(wp$1(e)); } const Ep$1 = x$8(`ZodDefault`, (e, t) => { ya$4.init(e, t), L$7.init(e, t), e._zod.processJSONSchema = (t, n, r) => Au$2(e, t, n, r), e.unwrap = () => e._zod.def.innerType, e.removeDefault = e.unwrap; }); function Dp$1(e, t) { return new Ep$1({ type: `default`, innerType: e, get defaultValue() { return typeof t == `function` ? t() : ut$7(t); } }); } const Op$1 = x$8(`ZodPrefault`, (e, t) => { xa$4.init(e, t), L$7.init(e, t), e._zod.processJSONSchema = (t, n, r) => ju$2(e, t, n, r), e.unwrap = () => e._zod.def.innerType; }); function kp$1(e, t) { return new Op$1({ type: `prefault`, innerType: e, get defaultValue() { return typeof t == `function` ? t() : ut$7(t); } }); } const Ap$1 = x$8(`ZodNonOptional`, (e, t) => { Sa$4.init(e, t), L$7.init(e, t), e._zod.processJSONSchema = (t, n, r) => ku$2(e, t, n, r), e.unwrap = () => e._zod.def.innerType; }); function jp$1(e, t) { return new Ap$1({ type: `nonoptional`, innerType: e, ...T$10(t) }); } const Mp$1 = x$8(`ZodSuccess`, (e, t) => { wa$4.init(e, t), L$7.init(e, t), e._zod.processJSONSchema = (t, n, r) => gu$2(e, t, n, r), e.unwrap = () => e._zod.def.innerType; }); function Np$1(e) { return new Mp$1({ type: `success`, innerType: e }); } const Pp$1 = x$8(`ZodCatch`, (e, t) => { Ta$4.init(e, t), L$7.init(e, t), e._zod.processJSONSchema = (t, n, r) => Mu$2(e, t, n, r), e.unwrap = () => e._zod.def.innerType, e.removeCatch = e.unwrap; }); function Fp$1(e, t) { return new Pp$1({ type: `catch`, innerType: e, catchValue: typeof t == `function` ? t : () => t }); } const Ip$1 = x$8(`ZodNaN`, (e, t) => { Ea$4.init(e, t), L$7.init(e, t), e._zod.processJSONSchema = (t, n, r) => pu$2(e, t, n, r); }); function Lp$1(e) { return Bc$2(Ip$1, e); } const Rp$1 = x$8(`ZodPipe`, (e, t) => { Da$4.init(e, t), L$7.init(e, t), e._zod.processJSONSchema = (t, n, r) => Nu$2(e, t, n, r), e.in = t.in, e.out = t.out; }); function zp$1(e, t) { return new Rp$1({ type: `pipe`, in: e, out: t }); } const Bp$1 = x$8(`ZodCodec`, (e, t) => { Rp$1.init(e, t), ka$4.init(e, t); }); function Vp$1(e, t, n) { return new Bp$1({ type: `pipe`, in: e, out: t, transform: n.decode, reverseTransform: n.encode }); } const Hp$1 = x$8(`ZodReadonly`, (e, t) => { Ma$4.init(e, t), L$7.init(e, t), e._zod.processJSONSchema = (t, n, r) => Pu$2(e, t, n, r), e.unwrap = () => e._zod.def.innerType; }); function Up$1(e) { return new Hp$1({ type: `readonly`, innerType: e }); } const Wp$1 = x$8(`ZodTemplateLiteral`, (e, t) => { Pa$4.init(e, t), L$7.init(e, t), e._zod.processJSONSchema = (t, n, r) => mu$2(e, t, n, r); }); function Gp$1(e, t) { return new Wp$1({ type: `template_literal`, parts: e, ...T$10(t) }); } const Kp$1 = x$8(`ZodLazy`, (e, t) => { La$4.init(e, t), L$7.init(e, t), e._zod.processJSONSchema = (t, n, r) => Lu$2(e, t, n, r), e.unwrap = () => e._zod.def.getter(); }); function qp$1(e) { return new Kp$1({ type: `lazy`, getter: e }); } const Jp$1 = x$8(`ZodPromise`, (e, t) => { Ia$4.init(e, t), L$7.init(e, t), e._zod.processJSONSchema = (t, n, r) => Fu$2(e, t, n, r), e.unwrap = () => e._zod.def.innerType; }); function Yp$1(e) { return new Jp$1({ type: `promise`, innerType: e }); } const Xp$1 = x$8(`ZodFunction`, (e, t) => { Fa$4.init(e, t), L$7.init(e, t), e._zod.processJSONSchema = (t, n, r) => vu$2(e, t, n, r); }); function Zp$1(e) { return new Xp$1({ type: `function`, input: Array.isArray(e?.input) ? rp$1(e?.input) : e?.input ?? Uf$1(Ff$1()), output: e?.output ?? Ff$1() }); } const Qp$1 = x$8(`ZodCustom`, (e, t) => { Ra$4.init(e, t), L$7.init(e, t), e._zod.processJSONSchema = (t, n, r) => _u$2(e, t, n, r); }); function $p$1(e) { let t = new k$9({ check: `custom` }); return t._zod.check = e, t; } function em$1(e, t) { return zl$2(Qp$1, e ?? (() => !0), t); } function tm$1(e, t = {}) { return Bl$2(Qp$1, e, t); } function nm$1(e) { return Vl$2(e); } const rm$2 = Ul$2; const im$1 = Wl$2; function am$1(e, t = {}) { let n = new Qp$1({ type: `custom`, check: `custom`, fn: (t) => t instanceof e, abort: !0, ...T$10(t) }); return n._zod.bag.Class = e, n._zod.check = (t) => { t.value instanceof e || t.issues.push({ code: `invalid_type`, expected: e.name, input: t.value, inst: n, path: [...n._zod.def.path ?? []] }); }, n; } const om$1 = (...e) => Gl$2({ Codec: Bp$1, Boolean: yf$1, String: hd$2 }, ...e); function sm$1(e) { let t = qp$1(() => Yf$1([ R$8(e), B$9(), bf$1(), jf$1(), Uf$1(t), H$8(R$8(), t) ])); return t; } function cm$1(e, t) { return zp$1(vp$1(e), t); } const lm$1 = { invalid_type: `invalid_type`, too_big: `too_big`, too_small: `too_small`, invalid_format: `invalid_format`, not_multiple_of: `not_multiple_of`, unrecognized_keys: `unrecognized_keys`, invalid_union: `invalid_union`, invalid_key: `invalid_key`, invalid_element: `invalid_element`, invalid_value: `invalid_value`, custom: `custom` }; function um$1(e) { S$9({ customError: e }); } function dm$1() { return S$9().customError; } var fm$1; fm$1 ||= {}; const W$7 = { ...pd$2, ...Uu$2, iso: Wu$2 }; const pm$1 = new Set(`$schema.$ref.$defs.definitions.$id.id.$comment.$anchor.$vocabulary.$dynamicRef.$dynamicAnchor.type.enum.const.anyOf.oneOf.allOf.not.properties.required.additionalProperties.patternProperties.propertyNames.minProperties.maxProperties.items.prefixItems.additionalItems.minItems.maxItems.uniqueItems.contains.minContains.maxContains.minLength.maxLength.pattern.format.minimum.maximum.exclusiveMinimum.exclusiveMaximum.multipleOf.description.default.contentEncoding.contentMediaType.contentSchema.unevaluatedItems.unevaluatedProperties.if.then.else.dependentSchemas.dependentRequired.nullable.readOnly`.split(`.`)); function mm$1(e, t) { let n = e.$schema; return n === `https://json-schema.org/draft/2020-12/schema` ? `draft-2020-12` : n === `http://json-schema.org/draft-07/schema#` ? `draft-7` : n === `http://json-schema.org/draft-04/schema#` ? `draft-4` : t ?? `draft-2020-12`; } function hm$1(e, t) { if (!e.startsWith(`#`)) throw Error(`External $ref is not supported, only local refs (#/...) are allowed`); let n = e.slice(1).split(`/`).filter(Boolean); if (n.length === 0) return t.rootSchema; let r = t.version === `draft-2020-12` ? `$defs` : `definitions`; if (n[0] === r) { let r = n[1]; if (!r || !t.defs[r]) throw Error(`Reference not found: ${e}`); return t.defs[r]; } throw Error(`Reference not found: ${e}`); } function gm$1(e, t) { if (e.not !== void 0) { if (typeof e.not == `object` && Object.keys(e.not).length === 0) return W$7.never(); throw Error(`not is not supported in Zod (except { not: {} } for never)`); } if (e.unevaluatedItems !== void 0) throw Error(`unevaluatedItems is not supported`); if (e.unevaluatedProperties !== void 0) throw Error(`unevaluatedProperties is not supported`); if (e.if !== void 0 || e.then !== void 0 || e.else !== void 0) throw Error(`Conditional schemas (if/then/else) are not supported`); if (e.dependentSchemas !== void 0 || e.dependentRequired !== void 0) throw Error(`dependentSchemas and dependentRequired are not supported`); if (e.$ref) { let n = e.$ref; if (t.refs.has(n)) return t.refs.get(n); if (t.processing.has(n)) return W$7.lazy(() => { if (!t.refs.has(n)) throw Error(`Circular reference not resolved: ${n}`); return t.refs.get(n); }); t.processing.add(n); let r = G$7(hm$1(n, t), t); return t.refs.set(n, r), t.processing.delete(n), r; } if (e.enum !== void 0) { let n = e.enum; if (t.version === `openapi-3.0` && e.nullable === !0 && n.length === 1 && n[0] === null) return W$7.null(); if (n.length === 0) return W$7.never(); if (n.length === 1) return W$7.literal(n[0]); if (n.every((e) => typeof e == `string`)) return W$7.enum(n); let r = n.map((e) => W$7.literal(e)); return r.length < 2 ? r[0] : W$7.union([ r[0], r[1], ...r.slice(2) ]); } if (e.const !== void 0) return W$7.literal(e.const); let n = e.type; if (Array.isArray(n)) { let r = n.map((n) => gm$1({ ...e, type: n }, t)); return r.length === 0 ? W$7.never() : r.length === 1 ? r[0] : W$7.union(r); } if (!n) return W$7.any(); let r; switch (n) { case `string`: { let t = W$7.string(); if (e.format) { let n = e.format; n === `email` ? t = t.check(W$7.email()) : n === `uri` || n === `uri-reference` ? t = t.check(W$7.url()) : n === `uuid` || n === `guid` ? t = t.check(W$7.uuid()) : n === `date-time` ? t = t.check(W$7.iso.datetime()) : n === `date` ? t = t.check(W$7.iso.date()) : n === `time` ? t = t.check(W$7.iso.time()) : n === `duration` ? t = t.check(W$7.iso.duration()) : n === `ipv4` ? t = t.check(W$7.ipv4()) : n === `ipv6` ? t = t.check(W$7.ipv6()) : n === `mac` ? t = t.check(W$7.mac()) : n === `cidr` ? t = t.check(W$7.cidrv4()) : n === `cidr-v6` ? t = t.check(W$7.cidrv6()) : n === `base64` ? t = t.check(W$7.base64()) : n === `base64url` ? t = t.check(W$7.base64url()) : n === `e164` ? t = t.check(W$7.e164()) : n === `jwt` ? t = t.check(W$7.jwt()) : n === `emoji` ? t = t.check(W$7.emoji()) : n === `nanoid` ? t = t.check(W$7.nanoid()) : n === `cuid` ? t = t.check(W$7.cuid()) : n === `cuid2` ? t = t.check(W$7.cuid2()) : n === `ulid` ? t = t.check(W$7.ulid()) : n === `xid` ? t = t.check(W$7.xid()) : n === `ksuid` && (t = t.check(W$7.ksuid())); } typeof e.minLength == `number` && (t = t.min(e.minLength)), typeof e.maxLength == `number` && (t = t.max(e.maxLength)), e.pattern && (t = t.regex(new RegExp(e.pattern))), r = t; break; } case `number`: case `integer`: { let t = n === `integer` ? W$7.number().int() : W$7.number(); typeof e.minimum == `number` && (t = t.min(e.minimum)), typeof e.maximum == `number` && (t = t.max(e.maximum)), typeof e.exclusiveMinimum == `number` ? t = t.gt(e.exclusiveMinimum) : e.exclusiveMinimum === !0 && typeof e.minimum == `number` && (t = t.gt(e.minimum)), typeof e.exclusiveMaximum == `number` ? t = t.lt(e.exclusiveMaximum) : e.exclusiveMaximum === !0 && typeof e.maximum == `number` && (t = t.lt(e.maximum)), typeof e.multipleOf == `number` && (t = t.multipleOf(e.multipleOf)), r = t; break; } case `boolean`: r = W$7.boolean(); break; case `null`: r = W$7.null(); break; case `object`: { let n = {}, i = e.properties || {}, a = new Set(e.required || []); for (let [e, r] of Object.entries(i)) { let i = G$7(r, t); n[e] = a.has(e) ? i : i.optional(); } if (e.propertyNames) { let i = G$7(e.propertyNames, t), a = e.additionalProperties && typeof e.additionalProperties == `object` ? G$7(e.additionalProperties, t) : W$7.any(); if (Object.keys(n).length === 0) { r = W$7.record(i, a); break; } let o = W$7.object(n).passthrough(), s = W$7.looseRecord(i, a); r = W$7.intersection(o, s); break; } if (e.patternProperties) { let i = e.patternProperties, a = Object.keys(i), o = []; for (let e of a) { let n = G$7(i[e], t), r = W$7.string().regex(new RegExp(e)); o.push(W$7.looseRecord(r, n)); } let s = []; if (Object.keys(n).length > 0 && s.push(W$7.object(n).passthrough()), s.push(...o), s.length === 0) r = W$7.object({}).passthrough(); else if (s.length === 1) r = s[0]; else { let e = W$7.intersection(s[0], s[1]); for (let t = 2; t < s.length; t++) e = W$7.intersection(e, s[t]); r = e; } break; } let o = W$7.object(n); r = e.additionalProperties === !1 ? o.strict() : typeof e.additionalProperties == `object` ? o.catchall(G$7(e.additionalProperties, t)) : o.passthrough(); break; } case `array`: { let n = e.prefixItems, i = e.items; if (n && Array.isArray(n)) { let a = n.map((e) => G$7(e, t)), o = i && typeof i == `object` && !Array.isArray(i) ? G$7(i, t) : void 0; r = o ? W$7.tuple(a).rest(o) : W$7.tuple(a), typeof e.minItems == `number` && (r = r.check(W$7.minLength(e.minItems))), typeof e.maxItems == `number` && (r = r.check(W$7.maxLength(e.maxItems))); } else if (Array.isArray(i)) { let n = i.map((e) => G$7(e, t)), a = e.additionalItems && typeof e.additionalItems == `object` ? G$7(e.additionalItems, t) : void 0; r = a ? W$7.tuple(n).rest(a) : W$7.tuple(n), typeof e.minItems == `number` && (r = r.check(W$7.minLength(e.minItems))), typeof e.maxItems == `number` && (r = r.check(W$7.maxLength(e.maxItems))); } else if (i !== void 0) { let n = G$7(i, t), a = W$7.array(n); typeof e.minItems == `number` && (a = a.min(e.minItems)), typeof e.maxItems == `number` && (a = a.max(e.maxItems)), r = a; } else r = W$7.array(W$7.any()); break; } default: throw Error(`Unsupported type: ${n}`); } return e.description && (r = r.describe(e.description)), e.default !== void 0 && (r = r.default(e.default)), r; } function G$7(e, t) { if (typeof e == `boolean`) return e ? W$7.any() : W$7.never(); let n = gm$1(e, t), r = e.type || e.enum !== void 0 || e.const !== void 0; if (e.anyOf && Array.isArray(e.anyOf)) { let i = e.anyOf.map((e) => G$7(e, t)), a = W$7.union(i); n = r ? W$7.intersection(n, a) : a; } if (e.oneOf && Array.isArray(e.oneOf)) { let i = e.oneOf.map((e) => G$7(e, t)), a = W$7.xor(i); n = r ? W$7.intersection(n, a) : a; } if (e.allOf && Array.isArray(e.allOf)) if (e.allOf.length === 0) n = r ? n : W$7.any(); else { let i = r ? n : G$7(e.allOf[0], t), a = +!r; for (let n = a; n < e.allOf.length; n++) i = W$7.intersection(i, G$7(e.allOf[n], t)); n = i; } e.nullable === !0 && t.version === `openapi-3.0` && (n = W$7.nullable(n)), e.readOnly === !0 && (n = W$7.readonly(n)); let i = {}; for (let t of [ `$id`, `id`, `$comment`, `$anchor`, `$vocabulary`, `$dynamicRef`, `$dynamicAnchor` ]) t in e && (i[t] = e[t]); for (let t of [ `contentEncoding`, `contentMediaType`, `contentSchema` ]) t in e && (i[t] = e[t]); for (let t of Object.keys(e)) pm$1.has(t) || (i[t] = e[t]); return Object.keys(i).length > 0 && t.registry.add(n, i), n; } function _m$1(e, t) { return typeof e == `boolean` ? e ? W$7.any() : W$7.never() : G$7(e, { version: mm$1(e, t?.defaultTarget), defs: e.$defs || e.definitions || {}, refs: /* @__PURE__ */ new Map(), processing: /* @__PURE__ */ new Set(), rootSchema: e, registry: t?.registry ?? Vs$2 }); } var vm$1 = l$11({ bigint: () => Sm$1, boolean: () => xm$1, date: () => K$8, number: () => bm$1, string: () => ym$1 }); function ym$1(e) { return Us$2(hd$2, e); } function bm$1(e) { return yc$2(ff$1, e); } function xm$1(e) { return Ec$2(yf$1, e); } function Sm$1(e) { return Oc$2(xf$1, e); } function K$8(e) { return zc$2(Bf$1, e); } var Cm$1 = l$11({ $brand: () => Pe$8, $input: () => Rs$2, $output: () => Ls$2, NEVER: () => Ne$8, TimePrecision: () => pc$2, ZodAny: () => Mf$1, ZodArray: () => Hf$1, ZodBase64: () => Qd$1, ZodBase64URL: () => ef$1, ZodBigInt: () => xf$1, ZodBigIntFormat: () => Cf$1, ZodBoolean: () => yf$1, ZodCIDRv4: () => Jd$1, ZodCIDRv6: () => Xd$1, ZodCUID: () => Md$1, ZodCUID2: () => Pd$1, ZodCatch: () => Pp$1, ZodCodec: () => Bp$1, ZodCustom: () => Qp$1, ZodCustomStringFormat: () => sf$1, ZodDate: () => Bf$1, ZodDefault: () => Ep$1, ZodDiscriminatedUnion: () => Qf$1, ZodE164: () => nf$1, ZodEmail: () => gd$2, ZodEmoji: () => Od$1, ZodEnum: () => dp$1, ZodError: () => ed$2, ZodExactOptional: () => xp$1, ZodFile: () => hp$1, ZodFirstPartyTypeKind: () => fm$1, ZodFunction: () => Xp$1, ZodGUID: () => vd$2, ZodIPv4: () => Hd$1, ZodIPv6: () => Kd$1, ZodISODate: () => qu$2, ZodISODateTime: () => Gu$2, ZodISODuration: () => Zu$2, ZodISOTime: () => Yu$2, ZodIntersection: () => ep$1, ZodIssueCode: () => lm$1, ZodJWT: () => af$1, ZodKSUID: () => Bd$1, ZodLazy: () => Kp$1, ZodLiteral: () => mp$1, ZodMAC: () => Wd$1, ZodMap: () => sp$1, ZodNaN: () => Ip$1, ZodNanoID: () => Ad$1, ZodNever: () => If$1, ZodNonOptional: () => Ap$1, ZodNull: () => Af$1, ZodNullable: () => Cp$1, ZodNumber: () => ff$1, ZodNumberFormat: () => pf$1, ZodObject: () => Gf$1, ZodOptional: () => yp$1, ZodPipe: () => Rp$1, ZodPrefault: () => Op$1, ZodPromise: () => Jp$1, ZodReadonly: () => Hp$1, ZodRealError: () => I$7, ZodRecord: () => ip$1, ZodSet: () => lp$1, ZodString: () => hd$2, ZodStringFormat: () => z$8, ZodSuccess: () => Mp$1, ZodSymbol: () => Ef$1, ZodTemplateLiteral: () => Wp$1, ZodTransform: () => _p$1, ZodTuple: () => np$1, ZodType: () => L$7, ZodULID: () => Id$1, ZodURL: () => Td$2, ZodUUID: () => bd$2, ZodUndefined: () => Of$1, ZodUnion: () => Jf$1, ZodUnknown: () => Pf$1, ZodVoid: () => Rf$1, ZodXID: () => Rd$1, ZodXor: () => Xf$1, _ZodString: () => md$2, _default: () => Dp$1, _function: () => Zp$1, any: () => Nf$1, array: () => Uf$1, base64: () => $d$1, base64url: () => tf$1, bigint: () => Sf$1, boolean: () => bf$1, catch: () => Fp$1, check: () => $p$1, cidrv4: () => Yd$1, cidrv6: () => Zd$1, clone: () => gt$7, codec: () => Vp$1, coerce: () => vm$1, config: () => S$9, core: () => Hu$2, cuid: () => Nd$1, cuid2: () => Fd$1, custom: () => em$1, date: () => Vf$1, decode: () => od$2, decodeAsync: () => cd$2, describe: () => rm$2, discriminatedUnion: () => $f$1, e164: () => rf$1, email: () => _d$2, emoji: () => kd$1, encode: () => ad$2, encodeAsync: () => sd$2, endsWith: () => al$2, enum: () => fp$1, exactOptional: () => Sp$1, file: () => gp$1, flattenError: () => Gt$5, float32: () => hf$1, float64: () => gf$1, formatError: () => Kt$6, fromJSONSchema: () => _m$1, function: () => Zp$1, getErrorMap: () => dm$1, globalRegistry: () => Vs$2, gt: () => Hc$2, gte: () => N$7, guid: () => yd$2, hash: () => df$1, hex: () => uf$1, hostname: () => lf$1, httpUrl: () => Dd$1, includes: () => rl$2, instanceof: () => am$1, int: () => mf$1, int32: () => _f$1, int64: () => wf$1, intersection: () => tp$1, ipv4: () => Ud$1, ipv6: () => qd$1, iso: () => Wu$2, json: () => sm$1, jwt: () => of$1, keyof: () => Wf$1, ksuid: () => Vd$1, lazy: () => qp$1, length: () => $c$2, literal: () => U$8, locales: () => Fs$2, looseObject: () => qf$1, looseRecord: () => op$1, lowercase: () => tl$2, lt: () => Vc$2, lte: () => M$8, mac: () => Gd$1, map: () => cp$2, maxLength: () => Zc$2, maxSize: () => Jc$2, meta: () => im$1, mime: () => sl$2, minLength: () => Qc$2, minSize: () => Yc$2, multipleOf: () => qc$2, nan: () => Lp$1, nanoid: () => jd$1, nativeEnum: () => pp$1, negative: () => Wc$2, never: () => Lf$1, nonnegative: () => Kc$2, nonoptional: () => jp$1, nonpositive: () => Gc$2, normalize: () => ll$2, null: () => jf$1, nullable: () => wp$1, nullish: () => Tp$1, number: () => B$9, object: () => V$8, optional: () => bp$1, overwrite: () => cl$2, parse: () => td$2, parseAsync: () => nd$2, partialRecord: () => ap$1, pipe: () => zp$1, positive: () => Uc$2, prefault: () => kp$1, preprocess: () => cm$1, prettifyError: () => Yt$5, promise: () => Yp$1, property: () => ol$2, readonly: () => Up$1, record: () => H$8, refine: () => tm$1, regex: () => el$2, regexes: () => xn$4, registry: () => Bs$2, safeDecode: () => ud$2, safeDecodeAsync: () => fd$2, safeEncode: () => ld$2, safeEncodeAsync: () => dd$2, safeParse: () => rd$2, safeParseAsync: () => id$2, set: () => up$1, setErrorMap: () => um$1, size: () => Xc$2, slugify: () => pl$2, startsWith: () => il$2, strictObject: () => Kf$1, string: () => R$8, stringFormat: () => cf$1, stringbool: () => om$1, success: () => Np$1, superRefine: () => nm$1, symbol: () => Df$1, templateLiteral: () => Gp$1, toJSONSchema: () => zu$2, toLowerCase: () => dl$2, toUpperCase: () => fl$2, transform: () => vp$1, treeifyError: () => qt$6, trim: () => ul$2, tuple: () => rp$1, uint32: () => vf$1, uint64: () => Tf$1, ulid: () => Ld$1, undefined: () => kf$1, union: () => Yf$1, unknown: () => Ff$1, uppercase: () => nl$2, url: () => Ed$2, util: () => Re$8, uuid: () => xd$2, uuidv4: () => Sd$2, uuidv6: () => Cd$2, uuidv7: () => wd$2, void: () => zf$1, xid: () => zd$1, xor: () => Zf$1 }); S$9(io$2()); var wm$1 = Cm$1; const Tm$1 = Uf$1(V$8({ key: R$8(), value: Yf$1([R$8(), jf$1()]) })); var Em$1 = class extends Error { constructor(e) { super(e), this.name = `AttributeValidationError`; } }; const Dm$1 = (e) => new TextEncoder().encode(e).length; function Om$1(e, t = {}) { return typeof e == `string` ? e.length === 0 ? new Em$1(`Attribute key must not be empty`) : e.length > 256 ? new Em$1(`Attribute key length ${e.length} exceeds limit 256: ${JSON.stringify(e.slice(0, 32))}…`) : !t.allowReservedAttributes && e.startsWith(`$`) ? new Em$1(`Attribute key ${JSON.stringify(e)} starts with reserved prefix "\$" — that namespace is reserved for framework/library code. Set { allowReservedAttributes: true } only if your caller is framework-level.`) : null : new Em$1(`Attribute key must be a string, got ${typeof e}`); } function km$1(e) { if (e === null) return null; if (typeof e != `string`) return new Em$1(`Attribute value must be a string or null, got ${typeof e}`); let t = Dm$1(e); return t > 256 ? new Em$1(`Attribute value byte length ${t} exceeds limit 256`) : null; } function Am$1(e, t = {}) { let n = /* @__PURE__ */ new Set(), r = t.existingKeys === void 0 ? void 0 : t.existingKeys instanceof Set ? t.existingKeys : new Set(t.existingKeys), i = 0, a = 0; for (let o of e) { let e = Om$1(o.key, { allowReservedAttributes: t.allowReservedAttributes }); if (e) throw e; let s = km$1(o.value); if (s) throw s; if (n.has(o.key)) throw new Em$1(`Attribute key ${JSON.stringify(o.key)} appears more than once in the same batch`); n.add(o.key), o.value === null ? (r === void 0 || r.has(o.key)) && (a += 1) : (r === void 0 || !r.has(o.key)) && (i += 1); } let o = (r === void 0 ? 0 : r.size) + i - a; if (o > 64) throw new Em$1(`Run attribute count would exceed limit 64 (post-merge ${o})`); } function jm$1(e, t) { let n = { ...e ?? {} }; for (let { key: e, value: r } of t) r === null ? delete n[e] : n[e] = r; return n; } const q$7 = Yf$1([am$1(Uint8Array), Nf$1()]); const Mm$1 = { run_created: [`input`], run_completed: [`output`], run_failed: [`error`], step_created: [`input`], step_completed: [`result`], step_failed: [`error`], step_retrying: [`error`], hook_created: [`metadata`], hook_received: [`payload`] }; function Nm$1(e, t) { if (t !== `none` || !(`eventData` in e)) return e; let n = e.eventData; if (!n || typeof n != `object`) { let { eventData: t, ...n } = e; return n; } let r = Mm$1[e.eventType]; if (!r || r.length === 0) return e; let i = { ...n }; for (let e of r) delete i[e]; let { eventData: a, ...o } = e; return { ...o, ...Object.keys(i).length > 0 ? { eventData: i } : {} }; } const Pm$1 = fp$1([ `run_created`, `run_started`, `run_completed`, `run_failed`, `run_cancelled`, `attr_set`, `step_created`, `step_completed`, `step_failed`, `step_retrying`, `step_started`, `hook_created`, `hook_received`, `hook_disposed`, `hook_conflict`, `wait_created`, `wait_completed` ]); const J$7 = V$8({ eventType: Pm$1, correlationId: R$8().optional(), specVersion: B$9().optional() }); const Fm$1 = J$7.extend({ eventType: U$8(`step_completed`), correlationId: R$8(), eventData: V$8({ stepName: R$8().optional(), workflowName: R$8().optional(), result: q$7 }) }); const Im$1 = J$7.extend({ eventType: U$8(`step_failed`), correlationId: R$8(), eventData: V$8({ stepName: R$8().optional(), error: q$7 }) }); const Lm$1 = J$7.extend({ eventType: U$8(`step_retrying`), correlationId: R$8(), eventData: V$8({ stepName: R$8().optional(), error: q$7, retryAfter: K$8().optional() }) }); const Rm$1 = J$7.extend({ eventType: U$8(`step_started`), correlationId: R$8(), eventData: V$8({ stepName: R$8().optional(), attempt: B$9().optional(), workflowName: R$8().optional(), input: q$7.optional() }).optional() }); const zm$1 = J$7.extend({ eventType: U$8(`step_created`), correlationId: R$8(), eventData: V$8({ stepName: R$8(), workflowName: R$8().optional(), input: q$7 }) }); const Bm$1 = J$7.extend({ eventType: U$8(`hook_created`), correlationId: R$8(), eventData: V$8({ token: R$8(), metadata: q$7.optional(), isWebhook: bf$1().optional(), isSystem: bf$1().optional() }) }); const Vm$1 = J$7.extend({ eventType: U$8(`hook_received`), correlationId: R$8(), eventData: V$8({ token: R$8().optional(), payload: q$7 }) }); const Hm$1 = J$7.extend({ eventType: U$8(`hook_disposed`), correlationId: R$8(), eventData: V$8({ token: R$8().optional() }).optional() }); const Um$1 = J$7.extend({ eventType: U$8(`hook_conflict`), correlationId: R$8(), eventData: V$8({ token: R$8(), conflictingRunId: R$8().optional() }) }); const Wm$1 = J$7.extend({ eventType: U$8(`wait_created`), correlationId: R$8(), eventData: V$8({ resumeAt: K$8() }) }); const Gm$1 = J$7.extend({ eventType: U$8(`wait_completed`), correlationId: R$8(), eventData: V$8({ resumeAt: K$8().optional() }).optional() }); const Km$1 = $f$1(`type`, [V$8({ type: U$8(`workflow`) }), V$8({ type: U$8(`step`), stepId: R$8(), attempt: B$9() })]); const qm$1 = J$7.extend({ eventType: U$8(`attr_set`), correlationId: R$8().optional(), eventData: V$8({ changes: Tm$1, writer: Km$1, allowReservedAttributes: U$8(!0).optional() }) }); const Jm$1 = J$7.extend({ eventType: U$8(`run_created`), eventData: V$8({ deploymentId: R$8(), workflowName: R$8(), input: q$7, executionContext: H$8(R$8(), Nf$1()).optional(), attributes: H$8(R$8(), R$8()).optional(), allowReservedAttributes: U$8(!0).optional() }) }); const Ym$1 = J$7.extend({ eventType: U$8(`run_started`), eventData: V$8({ input: q$7.optional(), deploymentId: R$8().optional(), workflowName: R$8().optional(), executionContext: H$8(R$8(), Nf$1()).optional(), attributes: H$8(R$8(), R$8()).optional(), allowReservedAttributes: U$8(!0).optional() }).optional() }); const Xm$1 = J$7.extend({ eventType: U$8(`run_completed`), eventData: V$8({ output: q$7.optional() }) }); const Zm$1 = J$7.extend({ eventType: U$8(`run_failed`), eventData: V$8({ error: q$7, errorCode: R$8().optional() }) }); const Qm$1 = J$7.extend({ eventType: U$8(`run_cancelled`) }); $f$1(`eventType`, [ Jm$1, Ym$1, Xm$1, Zm$1, Qm$1, qm$1, zm$1, Fm$1, Im$1, Lm$1, Rm$1, Bm$1, Vm$1, Hm$1, Wm$1, Gm$1 ]); const $m$1 = $f$1(`eventType`, [ Jm$1, Ym$1, Xm$1, Zm$1, Qm$1, qm$1, zm$1, Fm$1, Im$1, Lm$1, Rm$1, Bm$1, Vm$1, Hm$1, Um$1, Wm$1, Gm$1 ]).and(V$8({ runId: R$8(), eventId: R$8(), createdAt: K$8(), occurredAt: K$8().optional(), specVersion: B$9().optional() })); const eh$1 = V$8({ runId: R$8(), hookId: R$8(), token: R$8(), ownerId: R$8(), projectId: R$8(), environment: R$8(), metadata: q$7.optional(), createdAt: K$8(), specVersion: B$9().optional(), isWebhook: bf$1().optional(), isSystem: bf$1().optional() }); const th$1 = R$8().regex(/^__(?:[a-z][a-z0-9]*_)?wkf_(?:workflow|step)_$/, `Must match __wkf_{workflow|step}_ or __{namespace}_wkf_{workflow|step}_`); const nh$1 = R$8().regex(/^__(?:[a-z][a-z0-9]*_)?wkf_(?:workflow|step)_.+$/, `Must be a valid queue name with a recognized prefix`); const rh$1 = R$8().regex(/^[a-z][a-z0-9]*$/, `Must be lowercase alphanumeric, starting with a letter`); function ih$1(e) { return e ?? process.env.WORKFLOW_QUEUE_NAMESPACE ?? void 0; } function ah$1(e, t) { return t === void 0 ? `__wkf_${e}_` : (rh$1.parse(t), `__${t}_wkf_${e}_`); } function oh$1(e) { let t = e.match(/^(__(?:[a-z][a-z0-9]*_)?wkf_(workflow|step)_)(.+)$/); if (!t) throw Error(`Invalid queue name: ${e}`); return { prefix: th$1.parse(t[1]), kind: t[2], id: t[3] }; } const sh$1 = R$8().brand().describe(`A stored queue message ID`); const ch$1 = H$8(R$8(), R$8()); const lh$1 = V$8({ input: Ff$1(), deploymentId: R$8(), workflowName: R$8(), specVersion: B$9(), executionContext: H$8(R$8(), Nf$1()).optional(), attributes: H$8(R$8(), R$8()).optional(), allowReservedAttributes: U$8(!0).optional() }); const uh$1 = V$8({ runId: R$8(), traceCarrier: ch$1.optional(), requestedAt: K$8().optional(), replayDivergence: V$8({ eventId: R$8(), count: B$9().int().positive() }).optional(), serverErrorRetryCount: B$9().int().optional(), stepId: R$8().optional(), stepName: R$8().optional(), runInput: lh$1.optional() }); const dh$1 = V$8({ workflowName: R$8(), workflowRunId: R$8(), workflowStartedAt: B$9(), stepId: R$8(), traceCarrier: ch$1.optional(), requestedAt: K$8().optional() }); const fh$1 = V$8({ __healthCheck: U$8(!0), correlationId: R$8() }); const ph$1 = Yf$1([ uh$1, dh$1, fh$1 ]); async function mh$1(e, t, n) { let r = 0; for (let i of [`pending`, `running`]) { let a, o = !0; for (; o;) { let s = await e.list({ status: i, resolveData: `none`, pagination: { cursor: a } }); for (let e of s.data) try { await t(`__wkf_workflow_${e.workflowName}`, { runId: e.runId }), r++; } catch (t) { console.warn(`[${n}] Failed to re-enqueue run ${e.runId}: ${t}`); } o = s.hasMore, a = s.cursor ?? void 0; } } r > 0 && console.log(`[${n}] Re-enqueued ${r} active run(s) on startup`); } const hh$1 = fp$1([ `pending`, `running`, `completed`, `failed`, `cancelled` ]); const gh$1 = V$8({ runId: R$8(), status: hh$1, deploymentId: R$8(), workflowName: R$8(), specVersion: B$9().optional(), executionContext: H$8(R$8(), Nf$1()).optional(), input: q$7.optional(), output: q$7.optional(), error: q$7.optional(), errorCode: R$8().optional(), attributes: H$8(R$8(), R$8()).default({}), expiredAt: K$8().optional(), startedAt: K$8().optional(), completedAt: K$8().optional(), createdAt: K$8(), updatedAt: K$8() }); const _h$1 = $f$1(`status`, [ gh$1.extend({ status: fp$1([`pending`, `running`]), output: kf$1().optional(), error: kf$1().optional(), completedAt: kf$1().optional() }), gh$1.extend({ status: U$8(`cancelled`), output: kf$1().optional(), error: kf$1().optional(), completedAt: K$8() }), gh$1.extend({ status: U$8(`completed`), output: q$7, error: kf$1().optional(), completedAt: K$8() }), gh$1.extend({ status: U$8(`failed`), output: kf$1().optional(), error: q$7, completedAt: K$8() }) ]); const vh$1 = qp$1(() => Yf$1([ R$8(), B$9(), bf$1(), jf$1(), Uf$1(vh$1), H$8(R$8(), vh$1) ])); const yh$1 = (e) => V$8({ data: Uf$1(e), cursor: R$8().nullable(), hasMore: bf$1() }); V$8({ message: R$8(), stack: R$8().optional(), code: R$8().optional() }); function bh$1(e) { return e == null || e <= 1; } function xh$1(e) { return e == null ? !1 : e > 5; } const Sh$1 = fp$1([ `pending`, `running`, `completed`, `failed`, `cancelled` ]); const Ch$1 = V$8({ runId: R$8(), stepId: R$8(), stepName: R$8(), status: Sh$1, input: q$7.optional(), output: q$7.optional(), error: q$7.optional(), attempt: B$9(), startedAt: K$8().optional(), completedAt: K$8().optional(), createdAt: K$8(), updatedAt: K$8(), retryAfter: K$8().optional(), specVersion: B$9().optional() }); const wh$1 = `0123456789ABCDEFGHJKMNPQRSTVWXYZ`; var Th$1; (function(e) { e.Base32IncorrectEncoding = `B32_ENC_INVALID`, e.DecodeTimeInvalidCharacter = `DEC_TIME_CHAR`, e.DecodeTimeValueMalformed = `DEC_TIME_MALFORMED`, e.EncodeTimeNegative = `ENC_TIME_NEG`, e.EncodeTimeSizeExceeded = `ENC_TIME_SIZE_EXCEED`, e.EncodeTimeValueMalformed = `ENC_TIME_MALFORMED`, e.PRNGDetectFailure = `PRNG_DETECT`, e.ULIDInvalid = `ULID_INVALID`, e.Unexpected = `UNEXPECTED`, e.UUIDInvalid = `UUID_INVALID`; })(Th$1 ||= {}); var Eh$1 = class extends Error { constructor(e, t) { super(`${t} (${e})`), this.name = `ULIDError`, this.code = e; } }; function Dh$1(e) { let t = Math.floor(e() * 32) % 32; return wh$1.charAt(t); } function Oh$1(e, t, n) { return t > e.length - 1 ? e : e.substr(0, t) + n + e.substr(t + 1); } function kh$1(e) { let t, n = e.length, r, i, a = e; for (; !t && n-- >= 0;) { if (r = a[n], i = wh$1.indexOf(r), i === -1) throw new Eh$1(Th$1.Base32IncorrectEncoding, `Incorrectly encoded string`); if (i === 31) { a = Oh$1(a, n, wh$1[0]); continue; } t = Oh$1(a, n, wh$1[i + 1]); } if (typeof t == `string`) return t; throw new Eh$1(Th$1.Base32IncorrectEncoding, `Failed incrementing string`); } function Ah$1(e) { if (e.length !== 26) throw new Eh$1(Th$1.DecodeTimeValueMalformed, `Malformed ULID`); let t = e.substr(0, 10).toUpperCase().split(``).reverse().reduce((e, t, n) => { let r = wh$1.indexOf(t); if (r === -1) throw new Eh$1(Th$1.DecodeTimeInvalidCharacter, `Time decode error: Invalid character: ${t}`); return e += r * 32 ** n; }, 0); if (t > 0xffffffffffff) throw new Eh$1(Th$1.DecodeTimeValueMalformed, `Malformed ULID: timestamp too large: ${t}`); return t; } function jh$1(e) { let t = Mh$1(), n = t && (t.crypto || t.msCrypto) || (ee === void 0 ? null : ee); if (typeof n?.getRandomValues == `function`) return () => { let e = /* @__PURE__ */ new Uint8Array(1); return n.getRandomValues(e), e[0] / 256; }; if (typeof n?.randomBytes == `function`) return () => n.randomBytes(1).readUInt8() / 256; if (ee?.randomBytes) return () => ee.randomBytes(1).readUInt8() / 256; throw new Eh$1(Th$1.PRNGDetectFailure, `Failed to find a reliable PRNG`); } function Mh$1() { return Fh$1() ? self : typeof window < `u` ? window : typeof global < `u` ? global : typeof globalThis < `u` ? globalThis : null; } function Nh$1(e, t) { let n = ``; for (; e > 0; e--) n = Dh$1(t) + n; return n; } function Ph$1(e, t = 10) { if (isNaN(e)) throw new Eh$1(Th$1.EncodeTimeValueMalformed, `Time must be a number: ${e}`); if (e > 0xffffffffffff) throw new Eh$1(Th$1.EncodeTimeSizeExceeded, `Cannot encode a time larger than 281474976710655: ${e}`); if (e < 0) throw new Eh$1(Th$1.EncodeTimeNegative, `Time must be positive: ${e}`); if (Number.isInteger(e) === !1) throw new Eh$1(Th$1.EncodeTimeValueMalformed, `Time must be an integer: ${e}`); let n, r = ``; for (let i = t; i > 0; i--) n = e % 32, r = wh$1.charAt(n) + r, e = (e - n) / 32; return r; } function Fh$1() { return typeof WorkerGlobalScope < `u` && self instanceof WorkerGlobalScope; } function Ih$1(e) { let t = e || jh$1(), n = 0, r; return function(e) { let i = !e || isNaN(e) ? Date.now() : e; if (i <= n) { let e = r = kh$1(r); return Ph$1(n, 10) + e; } n = i; let a = r = Nh$1(16, t); return Ph$1(i, 10) + a; }; } const Lh$1 = R$8().ulid(); const Rh$1 = 1440 * 60 * 1e3; const zh$1 = 300 * 1e3; function Bh$1(e) { let t = Lh$1.safeParse(e); return t.success ? new Date(Ah$1(t.data)) : null; } function Vh$1(e, t, n = Rh$1, r = zh$1) { let i = Bh$1(e.startsWith(t) ? e.slice(t.length) : e); if (!i) return `Invalid runId: "${e}" is not a valid ULID`; let a = (/* @__PURE__ */ new Date()).getTime() - i.getTime(); return a > 0 && a <= n || a <= 0 && -a <= r ? null : `Invalid runId timestamp: embedded timestamp is ${Math.round(Math.abs(a) / 1e3)}s in the ${a > 0 ? `past` : `future`} (threshold: ${Math.round((a > 0 ? n : r) / 1e3)}s)`; } const Hh$1 = fp$1([`waiting`, `completed`]); const Uh$1 = V$8({ waitId: R$8(), runId: R$8(), status: Hh$1, resumeAt: K$8().optional(), completedAt: K$8().optional(), createdAt: K$8(), updatedAt: K$8(), specVersion: B$9().optional() }); var Wh$1 = l$11({ ATTRIBUTE_KEY_MAX_LENGTH: () => 256, ATTRIBUTE_MAX_PER_RUN: () => 64, ATTRIBUTE_VALUE_MAX_BYTES: () => 256, DEFAULT_TIMESTAMP_THRESHOLD_FUTURE_MS: () => zh$1, DEFAULT_TIMESTAMP_THRESHOLD_MS: () => DEFAULT_TIMESTAMP_THRESHOLD_MS, DEFAULT_TIMESTAMP_THRESHOLD_PAST_MS: () => Rh$1, HookSchema: () => eh$1, RESERVED_ATTRIBUTE_KEY_PREFIX: () => `$`, SPEC_VERSION_CURRENT: () => 5, SPEC_VERSION_LEGACY: () => 1, SPEC_VERSION_SUPPORTS_ATTRIBUTES: () => 4, SPEC_VERSION_SUPPORTS_CBOR_QUEUE_TRANSPORT: () => 3, SPEC_VERSION_SUPPORTS_COMPRESSION: () => 5, SPEC_VERSION_SUPPORTS_EVENT_SOURCING: () => 2 }); var Gh$1 = c$12(((e, t) => { t.exports = { MAX_LENGTH: 256, MAX_SAFE_COMPONENT_LENGTH: 16, MAX_SAFE_BUILD_LENGTH: 250, MAX_SAFE_INTEGER: 2 ** 53 - 1 || 9007199254740991, RELEASE_TYPES: [ `major`, `premajor`, `minor`, `preminor`, `patch`, `prepatch`, `prerelease` ], SEMVER_SPEC_VERSION: `2.0.0`, FLAG_INCLUDE_PRERELEASE: 1, FLAG_LOOSE: 2 }; })); var Kh$1 = c$12(((e, t) => { t.exports = typeof process == `object` && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG) ? (...e) => console.error(`SEMVER`, ...e) : () => {}; })); var qh$1 = c$12(((e, t) => { let { MAX_SAFE_COMPONENT_LENGTH: n, MAX_SAFE_BUILD_LENGTH: r, MAX_LENGTH: i } = Gh$1(), a = Kh$1(); e = t.exports = {}; let o = e.re = [], s = e.safeRe = [], c = e.src = [], l = e.safeSrc = [], u = e.t = {}, d = 0, f = `[a-zA-Z0-9-]`, p = [ [`\\s`, 1], [`\\d`, i], [f, r] ], m = (e) => { for (let [t, n] of p) e = e.split(`${t}*`).join(`${t}{0,${n}}`).split(`${t}+`).join(`${t}{1,${n}}`); return e; }, h = (e, t, n) => { let r = m(t), i = d++; a(e, i, t), u[e] = i, c[i] = t, l[i] = r, o[i] = new RegExp(t, n ? `g` : void 0), s[i] = new RegExp(r, n ? `g` : void 0); }; h(`NUMERICIDENTIFIER`, `0|[1-9]\\d*`), h(`NUMERICIDENTIFIERLOOSE`, `\\d+`), h(`NONNUMERICIDENTIFIER`, `\\d*[a-zA-Z-]${f}*`), h(`MAINVERSION`, `(${c[u.NUMERICIDENTIFIER]})\\.(${c[u.NUMERICIDENTIFIER]})\\.(${c[u.NUMERICIDENTIFIER]})`), h(`MAINVERSIONLOOSE`, `(${c[u.NUMERICIDENTIFIERLOOSE]})\\.(${c[u.NUMERICIDENTIFIERLOOSE]})\\.(${c[u.NUMERICIDENTIFIERLOOSE]})`), h(`PRERELEASEIDENTIFIER`, `(?:${c[u.NONNUMERICIDENTIFIER]}|${c[u.NUMERICIDENTIFIER]})`), h(`PRERELEASEIDENTIFIERLOOSE`, `(?:${c[u.NONNUMERICIDENTIFIER]}|${c[u.NUMERICIDENTIFIERLOOSE]})`), h(`PRERELEASE`, `(?:-(${c[u.PRERELEASEIDENTIFIER]}(?:\\.${c[u.PRERELEASEIDENTIFIER]})*))`), h(`PRERELEASELOOSE`, `(?:-?(${c[u.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${c[u.PRERELEASEIDENTIFIERLOOSE]})*))`), h(`BUILDIDENTIFIER`, `${f}+`), h(`BUILD`, `(?:\\+(${c[u.BUILDIDENTIFIER]}(?:\\.${c[u.BUILDIDENTIFIER]})*))`), h(`FULLPLAIN`, `v?${c[u.MAINVERSION]}${c[u.PRERELEASE]}?${c[u.BUILD]}?`), h(`FULL`, `^${c[u.FULLPLAIN]}$`), h(`LOOSEPLAIN`, `[v=\\s]*${c[u.MAINVERSIONLOOSE]}${c[u.PRERELEASELOOSE]}?${c[u.BUILD]}?`), h(`LOOSE`, `^${c[u.LOOSEPLAIN]}$`), h(`GTLT`, `((?:<|>)?=?)`), h(`XRANGEIDENTIFIERLOOSE`, `${c[u.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`), h(`XRANGEIDENTIFIER`, `${c[u.NUMERICIDENTIFIER]}|x|X|\\*`), h(`XRANGEPLAIN`, `[v=\\s]*(${c[u.XRANGEIDENTIFIER]})(?:\\.(${c[u.XRANGEIDENTIFIER]})(?:\\.(${c[u.XRANGEIDENTIFIER]})(?:${c[u.PRERELEASE]})?${c[u.BUILD]}?)?)?`), h(`XRANGEPLAINLOOSE`, `[v=\\s]*(${c[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[u.XRANGEIDENTIFIERLOOSE]})(?:${c[u.PRERELEASELOOSE]})?${c[u.BUILD]}?)?)?`), h(`XRANGE`, `^${c[u.GTLT]}\\s*${c[u.XRANGEPLAIN]}$`), h(`XRANGELOOSE`, `^${c[u.GTLT]}\\s*${c[u.XRANGEPLAINLOOSE]}$`), h(`COERCEPLAIN`, `(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?`), h(`COERCE`, `${c[u.COERCEPLAIN]}(?:$|[^\\d])`), h(`COERCEFULL`, c[u.COERCEPLAIN] + `(?:${c[u.PRERELEASE]})?(?:${c[u.BUILD]})?(?:$|[^\\d])`), h(`COERCERTL`, c[u.COERCE], !0), h(`COERCERTLFULL`, c[u.COERCEFULL], !0), h(`LONETILDE`, `(?:~>?)`), h(`TILDETRIM`, `(\\s*)${c[u.LONETILDE]}\\s+`, !0), e.tildeTrimReplace = `$1~`, h(`TILDE`, `^${c[u.LONETILDE]}${c[u.XRANGEPLAIN]}$`), h(`TILDELOOSE`, `^${c[u.LONETILDE]}${c[u.XRANGEPLAINLOOSE]}$`), h(`LONECARET`, `(?:\\^)`), h(`CARETTRIM`, `(\\s*)${c[u.LONECARET]}\\s+`, !0), e.caretTrimReplace = `$1^`, h(`CARET`, `^${c[u.LONECARET]}${c[u.XRANGEPLAIN]}$`), h(`CARETLOOSE`, `^${c[u.LONECARET]}${c[u.XRANGEPLAINLOOSE]}$`), h(`COMPARATORLOOSE`, `^${c[u.GTLT]}\\s*(${c[u.LOOSEPLAIN]})$|^$`), h(`COMPARATOR`, `^${c[u.GTLT]}\\s*(${c[u.FULLPLAIN]})$|^$`), h(`COMPARATORTRIM`, `(\\s*)${c[u.GTLT]}\\s*(${c[u.LOOSEPLAIN]}|${c[u.XRANGEPLAIN]})`, !0), e.comparatorTrimReplace = `$1$2$3`, h(`HYPHENRANGE`, `^\\s*(${c[u.XRANGEPLAIN]})\\s+-\\s+(${c[u.XRANGEPLAIN]})\\s*$`), h(`HYPHENRANGELOOSE`, `^\\s*(${c[u.XRANGEPLAINLOOSE]})\\s+-\\s+(${c[u.XRANGEPLAINLOOSE]})\\s*$`), h(`STAR`, `(<|>)?=?\\s*\\*`), h(`GTE0`, `^\\s*>=\\s*0\\.0\\.0\\s*$`), h(`GTE0PRE`, `^\\s*>=\\s*0\\.0\\.0-0\\s*$`); })); var Jh$1 = c$12(((e, t) => { let n = Object.freeze({ loose: !0 }), r = Object.freeze({}); t.exports = (e) => e ? typeof e == `object` ? e : n : r; })); var Yh$1 = c$12(((e, t) => { let n = /^[0-9]+$/, r = (e, t) => { if (typeof e == `number` && typeof t == `number`) return e === t ? 0 : e < t ? -1 : 1; let r = n.test(e), i = n.test(t); return r && i && (e = +e, t = +t), e === t ? 0 : r && !i ? -1 : i && !r ? 1 : e < t ? -1 : 1; }; t.exports = { compareIdentifiers: r, rcompareIdentifiers: (e, t) => r(t, e) }; })); var Y$10 = c$12(((e, t) => { let n = Kh$1(), { MAX_LENGTH: r, MAX_SAFE_INTEGER: i } = Gh$1(), { safeRe: a, t: o } = qh$1(), s = Jh$1(), { compareIdentifiers: c } = Yh$1(); t.exports = class e { constructor(t, c) { if (c = s(c), t instanceof e) { if (t.loose === !!c.loose && t.includePrerelease === !!c.includePrerelease) return t; t = t.version; } else if (typeof t != `string`) throw TypeError(`Invalid version. Must be a string. Got type "${typeof t}".`); if (t.length > r) throw TypeError(`version is longer than ${r} characters`); n(`SemVer`, t, c), this.options = c, this.loose = !!c.loose, this.includePrerelease = !!c.includePrerelease; let l = t.trim().match(c.loose ? a[o.LOOSE] : a[o.FULL]); if (!l) throw TypeError(`Invalid Version: ${t}`); if (this.raw = t, this.major = +l[1], this.minor = +l[2], this.patch = +l[3], this.major > i || this.major < 0) throw TypeError(`Invalid major version`); if (this.minor > i || this.minor < 0) throw TypeError(`Invalid minor version`); if (this.patch > i || this.patch < 0) throw TypeError(`Invalid patch version`); l[4] ? this.prerelease = l[4].split(`.`).map((e) => { if (/^[0-9]+$/.test(e)) { let t = +e; if (t >= 0 && t < i) return t; } return e; }) : this.prerelease = [], this.build = l[5] ? l[5].split(`.`) : [], this.format(); } format() { return this.version = `${this.major}.${this.minor}.${this.patch}`, this.prerelease.length && (this.version += `-${this.prerelease.join(`.`)}`), this.version; } toString() { return this.version; } compare(t) { if (n(`SemVer.compare`, this.version, this.options, t), !(t instanceof e)) { if (typeof t == `string` && t === this.version) return 0; t = new e(t, this.options); } return t.version === this.version ? 0 : this.compareMain(t) || this.comparePre(t); } compareMain(t) { return t instanceof e || (t = new e(t, this.options)), this.major < t.major ? -1 : this.major > t.major ? 1 : this.minor < t.minor ? -1 : this.minor > t.minor ? 1 : this.patch < t.patch ? -1 : +(this.patch > t.patch); } comparePre(t) { if (t instanceof e || (t = new e(t, this.options)), this.prerelease.length && !t.prerelease.length) return -1; if (!this.prerelease.length && t.prerelease.length) return 1; if (!this.prerelease.length && !t.prerelease.length) return 0; let r = 0; do { let e = this.prerelease[r], i = t.prerelease[r]; if (n(`prerelease compare`, r, e, i), e === void 0 && i === void 0) return 0; if (i === void 0) return 1; if (e === void 0) return -1; if (e === i) continue; return c(e, i); } while (++r); } compareBuild(t) { t instanceof e || (t = new e(t, this.options)); let r = 0; do { let e = this.build[r], i = t.build[r]; if (n(`build compare`, r, e, i), e === void 0 && i === void 0) return 0; if (i === void 0) return 1; if (e === void 0) return -1; if (e === i) continue; return c(e, i); } while (++r); } inc(e, t, n) { if (e.startsWith(`pre`)) { if (!t && n === !1) throw Error(`invalid increment argument: identifier is empty`); if (t) { let e = `-${t}`.match(this.options.loose ? a[o.PRERELEASELOOSE] : a[o.PRERELEASE]); if (!e || e[1] !== t) throw Error(`invalid identifier: ${t}`); } } switch (e) { case `premajor`: this.prerelease.length = 0, this.patch = 0, this.minor = 0, this.major++, this.inc(`pre`, t, n); break; case `preminor`: this.prerelease.length = 0, this.patch = 0, this.minor++, this.inc(`pre`, t, n); break; case `prepatch`: this.prerelease.length = 0, this.inc(`patch`, t, n), this.inc(`pre`, t, n); break; case `prerelease`: this.prerelease.length === 0 && this.inc(`patch`, t, n), this.inc(`pre`, t, n); break; case `release`: if (this.prerelease.length === 0) throw Error(`version ${this.raw} is not a prerelease`); this.prerelease.length = 0; break; case `major`: (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) && this.major++, this.minor = 0, this.patch = 0, this.prerelease = []; break; case `minor`: (this.patch !== 0 || this.prerelease.length === 0) && this.minor++, this.patch = 0, this.prerelease = []; break; case `patch`: this.prerelease.length === 0 && this.patch++, this.prerelease = []; break; case `pre`: { let e = +!!Number(n); if (this.prerelease.length === 0) this.prerelease = [e]; else { let r = this.prerelease.length; for (; --r >= 0;) typeof this.prerelease[r] == `number` && (this.prerelease[r]++, r = -2); if (r === -1) { if (t === this.prerelease.join(`.`) && n === !1) throw Error(`invalid increment argument: identifier already exists`); this.prerelease.push(e); } } if (t) { let r = [t, e]; n === !1 && (r = [t]), c(this.prerelease[0], t) === 0 ? isNaN(this.prerelease[1]) && (this.prerelease = r) : this.prerelease = r; } break; } default: throw Error(`invalid increment argument: ${e}`); } return this.raw = this.format(), this.build.length && (this.raw += `+${this.build.join(`.`)}`), this; } }; })); var Xh$1 = c$12(((e, t) => { let n = Y$10(); t.exports = (e, t, r = !1) => { if (e instanceof n) return e; try { return new n(e, t); } catch (e) { if (!r) return null; throw e; } }; })); var Zh$1 = c$12(((e, t) => { let n = Xh$1(); t.exports = (e, t) => { let r = n(e, t); return r ? r.version : null; }; })); var Qh$1 = c$12(((e, t) => { let n = Xh$1(); t.exports = (e, t) => { let r = n(e.trim().replace(/^[=v]+/, ``), t); return r ? r.version : null; }; })); var $h$1 = c$12(((e, t) => { let n = Y$10(); t.exports = (e, t, r, i, a) => { typeof r == `string` && (a = i, i = r, r = void 0); try { return new n(e instanceof n ? e.version : e, r).inc(t, i, a).version; } catch { return null; } }; })); var eg$1 = c$12(((e, t) => { let n = Xh$1(); t.exports = (e, t) => { let r = n(e, null, !0), i = n(t, null, !0), a = r.compare(i); if (a === 0) return null; let o = a > 0, s = o ? r : i, c = o ? i : r, l = !!s.prerelease.length; if (c.prerelease.length && !l) { if (!c.patch && !c.minor) return `major`; if (c.compareMain(s) === 0) return c.minor && !c.patch ? `minor` : `patch`; } let u = l ? `pre` : ``; return r.major === i.major ? r.minor === i.minor ? r.patch === i.patch ? `prerelease` : u + `patch` : u + `minor` : u + `major`; }; })); var tg$1 = c$12(((e, t) => { let n = Y$10(); t.exports = (e, t) => new n(e, t).major; })); var ng$1 = c$12(((e, t) => { let n = Y$10(); t.exports = (e, t) => new n(e, t).minor; })); var rg$1 = c$12(((e, t) => { let n = Y$10(); t.exports = (e, t) => new n(e, t).patch; })); var ig$1 = c$12(((e, t) => { let n = Xh$1(); t.exports = (e, t) => { let r = n(e, t); return r && r.prerelease.length ? r.prerelease : null; }; })); var ag$1 = c$12(((e, t) => { let n = Y$10(); t.exports = (e, t, r) => new n(e, r).compare(new n(t, r)); })); var og$1 = c$12(((e, t) => { let n = ag$1(); t.exports = (e, t, r) => n(t, e, r); })); var sg$1 = c$12(((e, t) => { let n = ag$1(); t.exports = (e, t) => n(e, t, !0); })); var cg$1 = c$12(((e, t) => { let n = Y$10(); t.exports = (e, t, r) => { let i = new n(e, r), a = new n(t, r); return i.compare(a) || i.compareBuild(a); }; })); var lg$1 = c$12(((e, t) => { let n = cg$1(); t.exports = (e, t) => e.sort((e, r) => n(e, r, t)); })); var ug$1 = c$12(((e, t) => { let n = cg$1(); t.exports = (e, t) => e.sort((e, r) => n(r, e, t)); })); var dg$1 = c$12(((e, t) => { let n = ag$1(); t.exports = (e, t, r) => n(e, t, r) > 0; })); var fg$1 = c$12(((e, t) => { let n = ag$1(); t.exports = (e, t, r) => n(e, t, r) < 0; })); var pg$1 = c$12(((e, t) => { let n = ag$1(); t.exports = (e, t, r) => n(e, t, r) === 0; })); var mg$1 = c$12(((e, t) => { let n = ag$1(); t.exports = (e, t, r) => n(e, t, r) !== 0; })); var hg = c$12(((e, t) => { let n = ag$1(); t.exports = (e, t, r) => n(e, t, r) >= 0; })); var gg$1 = c$12(((e, t) => { let n = ag$1(); t.exports = (e, t, r) => n(e, t, r) <= 0; })); var _g$1 = c$12(((e, t) => { let n = pg$1(), r = mg$1(), i = dg$1(), a = hg(), o = fg$1(), s = gg$1(); t.exports = (e, t, c, l) => { switch (t) { case `===`: return typeof e == `object` && (e = e.version), typeof c == `object` && (c = c.version), e === c; case `!==`: return typeof e == `object` && (e = e.version), typeof c == `object` && (c = c.version), e !== c; case ``: case `=`: case `==`: return n(e, c, l); case `!=`: return r(e, c, l); case `>`: return i(e, c, l); case `>=`: return a(e, c, l); case `<`: return o(e, c, l); case `<=`: return s(e, c, l); default: throw TypeError(`Invalid operator: ${t}`); } }; })); var vg$1 = c$12(((e, t) => { let n = Y$10(), r = Xh$1(), { safeRe: i, t: a } = qh$1(); t.exports = (e, t) => { if (e instanceof n) return e; if (typeof e == `number` && (e = String(e)), typeof e != `string`) return null; t ||= {}; let o = null; if (!t.rtl) o = e.match(t.includePrerelease ? i[a.COERCEFULL] : i[a.COERCE]); else { let n = t.includePrerelease ? i[a.COERCERTLFULL] : i[a.COERCERTL], r; for (; (r = n.exec(e)) && (!o || o.index + o[0].length !== e.length);) (!o || r.index + r[0].length !== o.index + o[0].length) && (o = r), n.lastIndex = r.index + r[1].length + r[2].length; n.lastIndex = -1; } if (o === null) return null; let s = o[2]; return r(`${s}.${o[3] || `0`}.${o[4] || `0`}${t.includePrerelease && o[5] ? `-${o[5]}` : ``}${t.includePrerelease && o[6] ? `+${o[6]}` : ``}`, t); }; })); var yg$1 = c$12(((e, t) => { t.exports = class { constructor() { this.max = 1e3, this.map = /* @__PURE__ */ new Map(); } get(e) { let t = this.map.get(e); if (t !== void 0) return this.map.delete(e), this.map.set(e, t), t; } delete(e) { return this.map.delete(e); } set(e, t) { if (!this.delete(e) && t !== void 0) { if (this.map.size >= this.max) { let e = this.map.keys().next().value; this.delete(e); } this.map.set(e, t); } return this; } }; })); var bg$1 = c$12(((e, t) => { let n = /\s+/g; t.exports = class e { constructor(t, r) { if (r = i(r), t instanceof e) return t.loose === !!r.loose && t.includePrerelease === !!r.includePrerelease ? t : new e(t.raw, r); if (t instanceof a) return this.raw = t.value, this.set = [[t]], this.formatted = void 0, this; if (this.options = r, this.loose = !!r.loose, this.includePrerelease = !!r.includePrerelease, this.raw = t.trim().replace(n, ` `), this.set = this.raw.split(`||`).map((e) => this.parseRange(e.trim())).filter((e) => e.length), !this.set.length) throw TypeError(`Invalid SemVer Range: ${this.raw}`); if (this.set.length > 1) { let e = this.set[0]; if (this.set = this.set.filter((e) => !h(e[0])), this.set.length === 0) this.set = [e]; else if (this.set.length > 1) { for (let e of this.set) if (e.length === 1 && g(e[0])) { this.set = [e]; break; } } } this.formatted = void 0; } get range() { if (this.formatted === void 0) { this.formatted = ``; for (let e = 0; e < this.set.length; e++) { e > 0 && (this.formatted += `||`); let t = this.set[e]; for (let e = 0; e < t.length; e++) e > 0 && (this.formatted += ` `), this.formatted += t[e].toString().trim(); } } return this.formatted; } format() { return this.range; } toString() { return this.range; } parseRange(e) { let t = ((this.options.includePrerelease && p) | (this.options.loose && m)) + `:` + e, n = r.get(t); if (n) return n; let i = this.options.loose, s = i ? c[l.HYPHENRANGELOOSE] : c[l.HYPHENRANGE]; e = e.replace(s, se(this.options.includePrerelease)), o(`hyphen replace`, e), e = e.replace(c[l.COMPARATORTRIM], u), o(`comparator trim`, e), e = e.replace(c[l.TILDETRIM], d), o(`tilde trim`, e), e = e.replace(c[l.CARETTRIM], f), o(`caret trim`, e); let g = e.split(` `).map((e) => v(e, this.options)).join(` `).split(/\s+/).map((e) => oe(e, this.options)); i && (g = g.filter((e) => (o(`loose invalid filter`, e, this.options), !!e.match(c[l.COMPARATORLOOSE])))), o(`range list`, g); let _ = /* @__PURE__ */ new Map(), y = g.map((e) => new a(e, this.options)); for (let e of y) { if (h(e)) return [e]; _.set(e.value, e); } _.size > 1 && _.has(``) && _.delete(``); let ee = [..._.values()]; return r.set(t, ee), ee; } intersects(t, n) { if (!(t instanceof e)) throw TypeError(`a Range is required`); return this.set.some((e) => _(e, n) && t.set.some((t) => _(t, n) && e.every((e) => t.every((t) => e.intersects(t, n))))); } test(e) { if (!e) return !1; if (typeof e == `string`) try { e = new s(e, this.options); } catch { return !1; } for (let t = 0; t < this.set.length; t++) if (ce(this.set[t], e, this.options)) return !0; return !1; } }; let r = new (yg$1())(), i = Jh$1(), a = xg$1(), o = Kh$1(), s = Y$10(), { safeRe: c, t: l, comparatorTrimReplace: u, tildeTrimReplace: d, caretTrimReplace: f } = qh$1(), { FLAG_INCLUDE_PRERELEASE: p, FLAG_LOOSE: m } = Gh$1(), h = (e) => e.value === `<0.0.0-0`, g = (e) => e.value === ``, _ = (e, t) => { let n = !0, r = e.slice(), i = r.pop(); for (; n && r.length;) n = r.every((e) => i.intersects(e, t)), i = r.pop(); return n; }, v = (e, t) => (e = e.replace(c[l.BUILD], ``), o(`comp`, e, t), e = ne(e, t), o(`caret`, e), e = ee(e, t), o(`tildes`, e), e = ie(e, t), o(`xrange`, e), e = b(e, t), o(`stars`, e), e), y = (e) => !e || e.toLowerCase() === `x` || e === `*`, ee = (e, t) => e.trim().split(/\s+/).map((e) => te(e, t)).join(` `), te = (e, t) => { let n = t.loose ? c[l.TILDELOOSE] : c[l.TILDE]; return e.replace(n, (t, n, r, i, a) => { o(`tilde`, e, t, n, r, i, a); let s; return y(n) ? s = `` : y(r) ? s = `>=${n}.0.0 <${+n + 1}.0.0-0` : y(i) ? s = `>=${n}.${r}.0 <${n}.${+r + 1}.0-0` : a ? (o(`replaceTilde pr`, a), s = `>=${n}.${r}.${i}-${a} <${n}.${+r + 1}.0-0`) : s = `>=${n}.${r}.${i} <${n}.${+r + 1}.0-0`, o(`tilde return`, s), s; }); }, ne = (e, t) => e.trim().split(/\s+/).map((e) => re(e, t)).join(` `), re = (e, t) => { o(`caret`, e, t); let n = t.loose ? c[l.CARETLOOSE] : c[l.CARET], r = t.includePrerelease ? `-0` : ``; return e.replace(n, (t, n, i, a, s) => { o(`caret`, e, t, n, i, a, s); let c; return y(n) ? c = `` : y(i) ? c = `>=${n}.0.0${r} <${+n + 1}.0.0-0` : y(a) ? c = n === `0` ? `>=${n}.${i}.0${r} <${n}.${+i + 1}.0-0` : `>=${n}.${i}.0${r} <${+n + 1}.0.0-0` : s ? (o(`replaceCaret pr`, s), c = n === `0` ? i === `0` ? `>=${n}.${i}.${a}-${s} <${n}.${i}.${+a + 1}-0` : `>=${n}.${i}.${a}-${s} <${n}.${+i + 1}.0-0` : `>=${n}.${i}.${a}-${s} <${+n + 1}.0.0-0`) : (o(`no pr`), c = n === `0` ? i === `0` ? `>=${n}.${i}.${a}${r} <${n}.${i}.${+a + 1}-0` : `>=${n}.${i}.${a}${r} <${n}.${+i + 1}.0-0` : `>=${n}.${i}.${a} <${+n + 1}.0.0-0`), o(`caret return`, c), c; }); }, ie = (e, t) => (o(`replaceXRanges`, e, t), e.split(/\s+/).map((e) => ae(e, t)).join(` `)), ae = (e, t) => { e = e.trim(); let n = t.loose ? c[l.XRANGELOOSE] : c[l.XRANGE]; return e.replace(n, (n, r, i, a, s, c) => { o(`xRange`, e, n, r, i, a, s, c); let l = y(i), u = l || y(a), d = u || y(s), f = d; return r === `=` && f && (r = ``), c = t.includePrerelease ? `-0` : ``, l ? n = r === `>` || r === `<` ? `<0.0.0-0` : `*` : r && f ? (u && (a = 0), s = 0, r === `>` ? (r = `>=`, u ? (i = +i + 1, a = 0, s = 0) : (a = +a + 1, s = 0)) : r === `<=` && (r = `<`, u ? i = +i + 1 : a = +a + 1), r === `<` && (c = `-0`), n = `${r + i}.${a}.${s}${c}`) : u ? n = `>=${i}.0.0${c} <${+i + 1}.0.0-0` : d && (n = `>=${i}.${a}.0${c} <${i}.${+a + 1}.0-0`), o(`xRange return`, n), n; }); }, b = (e, t) => (o(`replaceStars`, e, t), e.trim().replace(c[l.STAR], ``)), oe = (e, t) => (o(`replaceGTE0`, e, t), e.trim().replace(c[t.includePrerelease ? l.GTE0PRE : l.GTE0], ``)), se = (e) => (t, n, r, i, a, o, s, c, l, u, d, f) => (n = y(r) ? `` : y(i) ? `>=${r}.0.0${e ? `-0` : ``}` : y(a) ? `>=${r}.${i}.0${e ? `-0` : ``}` : o ? `>=${n}` : `>=${n}${e ? `-0` : ``}`, c = y(l) ? `` : y(u) ? `<${+l + 1}.0.0-0` : y(d) ? `<${l}.${+u + 1}.0-0` : f ? `<=${l}.${u}.${d}-${f}` : e ? `<${l}.${u}.${+d + 1}-0` : `<=${c}`, `${n} ${c}`.trim()), ce = (e, t, n) => { for (let n = 0; n < e.length; n++) if (!e[n].test(t)) return !1; if (t.prerelease.length && !n.includePrerelease) { for (let n = 0; n < e.length; n++) if (o(e[n].semver), e[n].semver !== a.ANY && e[n].semver.prerelease.length > 0) { let r = e[n].semver; if (r.major === t.major && r.minor === t.minor && r.patch === t.patch) return !0; } return !1; } return !0; }; })); var xg$1 = c$12(((e, t) => { let n = Symbol(`SemVer ANY`); t.exports = class e { static get ANY() { return n; } constructor(t, i) { if (i = r(i), t instanceof e) { if (t.loose === !!i.loose) return t; t = t.value; } t = t.trim().split(/\s+/).join(` `), s(`comparator`, t, i), this.options = i, this.loose = !!i.loose, this.parse(t), this.semver === n ? this.value = `` : this.value = this.operator + this.semver.version, s(`comp`, this); } parse(e) { let t = this.options.loose ? i[a.COMPARATORLOOSE] : i[a.COMPARATOR], r = e.match(t); if (!r) throw TypeError(`Invalid comparator: ${e}`); this.operator = r[1] === void 0 ? `` : r[1], this.operator === `=` && (this.operator = ``), r[2] ? this.semver = new c(r[2], this.options.loose) : this.semver = n; } toString() { return this.value; } test(e) { if (s(`Comparator.test`, e, this.options.loose), this.semver === n || e === n) return !0; if (typeof e == `string`) try { e = new c(e, this.options); } catch { return !1; } return o(e, this.operator, this.semver, this.options); } intersects(t, n) { if (!(t instanceof e)) throw TypeError(`a Comparator is required`); return this.operator === `` ? this.value === `` ? !0 : new l(t.value, n).test(this.value) : t.operator === `` ? t.value === `` ? !0 : new l(this.value, n).test(t.semver) : (n = r(n), n.includePrerelease && (this.value === `<0.0.0-0` || t.value === `<0.0.0-0`) || !n.includePrerelease && (this.value.startsWith(`<0.0.0`) || t.value.startsWith(`<0.0.0`)) ? !1 : !!(this.operator.startsWith(`>`) && t.operator.startsWith(`>`) || this.operator.startsWith(`<`) && t.operator.startsWith(`<`) || this.semver.version === t.semver.version && this.operator.includes(`=`) && t.operator.includes(`=`) || o(this.semver, `<`, t.semver, n) && this.operator.startsWith(`>`) && t.operator.startsWith(`<`) || o(this.semver, `>`, t.semver, n) && this.operator.startsWith(`<`) && t.operator.startsWith(`>`))); } }; let r = Jh$1(), { safeRe: i, t: a } = qh$1(), o = _g$1(), s = Kh$1(), c = Y$10(), l = bg$1(); })); var Sg$1 = c$12(((e, t) => { let n = bg$1(); t.exports = (e, t, r) => { try { t = new n(t, r); } catch { return !1; } return t.test(e); }; })); var Cg$1 = c$12(((e, t) => { let n = bg$1(); t.exports = (e, t) => new n(e, t).set.map((e) => e.map((e) => e.value).join(` `).trim().split(` `)); })); var wg$1 = c$12(((e, t) => { let n = Y$10(), r = bg$1(); t.exports = (e, t, i) => { let a = null, o = null, s = null; try { s = new r(t, i); } catch { return null; } return e.forEach((e) => { s.test(e) && (!a || o.compare(e) === -1) && (a = e, o = new n(a, i)); }), a; }; })); var Tg$1 = c$12(((e, t) => { let n = Y$10(), r = bg$1(); t.exports = (e, t, i) => { let a = null, o = null, s = null; try { s = new r(t, i); } catch { return null; } return e.forEach((e) => { s.test(e) && (!a || o.compare(e) === 1) && (a = e, o = new n(a, i)); }), a; }; })); var Eg$1 = c$12(((e, t) => { let n = Y$10(), r = bg$1(), i = dg$1(); t.exports = (e, t) => { e = new r(e, t); let a = new n(`0.0.0`); if (e.test(a) || (a = new n(`0.0.0-0`), e.test(a))) return a; a = null; for (let t = 0; t < e.set.length; ++t) { let r = e.set[t], o = null; r.forEach((e) => { let t = new n(e.semver.version); switch (e.operator) { case `>`: t.prerelease.length === 0 ? t.patch++ : t.prerelease.push(0), t.raw = t.format(); case ``: case `>=`: (!o || i(t, o)) && (o = t); break; case `<`: case `<=`: break; default: throw Error(`Unexpected operation: ${e.operator}`); } }), o && (!a || i(a, o)) && (a = o); } return a && e.test(a) ? a : null; }; })); var Dg$1 = c$12(((e, t) => { let n = bg$1(); t.exports = (e, t) => { try { return new n(e, t).range || `*`; } catch { return null; } }; })); var Og$1 = c$12(((e, t) => { let n = Y$10(), r = xg$1(), { ANY: i } = r, a = bg$1(), o = Sg$1(), s = dg$1(), c = fg$1(), l = gg$1(), u = hg(); t.exports = (e, t, d, f) => { e = new n(e, f), t = new a(t, f); let p, m, h, g, _; switch (d) { case `>`: p = s, m = l, h = c, g = `>`, _ = `>=`; break; case `<`: p = c, m = u, h = s, g = `<`, _ = `<=`; break; default: throw TypeError(`Must provide a hilo val of "<" or ">"`); } if (o(e, t, f)) return !1; for (let n = 0; n < t.set.length; ++n) { let a = t.set[n], o = null, s = null; if (a.forEach((e) => { e.semver === i && (e = new r(`>=0.0.0`)), o ||= e, s ||= e, p(e.semver, o.semver, f) ? o = e : h(e.semver, s.semver, f) && (s = e); }), o.operator === g || o.operator === _ || (!s.operator || s.operator === g) && m(e, s.semver) || s.operator === _ && h(e, s.semver)) return !1; } return !0; }; })); var kg$1 = c$12(((e, t) => { let n = Og$1(); t.exports = (e, t, r) => n(e, t, `>`, r); })); var Ag$1 = c$12(((e, t) => { let n = Og$1(); t.exports = (e, t, r) => n(e, t, `<`, r); })); var jg$1 = c$12(((e, t) => { let n = bg$1(); t.exports = (e, t, r) => (e = new n(e, r), t = new n(t, r), e.intersects(t, r)); })); var Mg$1 = c$12(((e, t) => { let n = Sg$1(), r = ag$1(); t.exports = (e, t, i) => { let a = [], o = null, s = null, c = e.sort((e, t) => r(e, t, i)); for (let e of c) n(e, t, i) ? (s = e, o ||= e) : (s && a.push([o, s]), s = null, o = null); o && a.push([o, null]); let l = []; for (let [e, t] of a) e === t ? l.push(e) : !t && e === c[0] ? l.push(`*`) : t ? e === c[0] ? l.push(`<=${t}`) : l.push(`${e} - ${t}`) : l.push(`>=${e}`); let u = l.join(` || `), d = typeof t.raw == `string` ? t.raw : String(t); return u.length < d.length ? u : t; }; })); var Ng$1 = c$12(((e, t) => { let n = bg$1(), r = xg$1(), { ANY: i } = r, a = Sg$1(), o = ag$1(), s = (e, t, r = {}) => { if (e === t) return !0; e = new n(e, r), t = new n(t, r); let i = !1; OUTER: for (let n of e.set) { for (let e of t.set) { let t = u(n, e, r); if (i ||= t !== null, t) continue OUTER; } if (i) return !1; } return !0; }, c = [new r(`>=0.0.0-0`)], l = [new r(`>=0.0.0`)], u = (e, t, n) => { if (e === t) return !0; if (e.length === 1 && e[0].semver === i) { if (t.length === 1 && t[0].semver === i) return !0; e = n.includePrerelease ? c : l; } if (t.length === 1 && t[0].semver === i) { if (n.includePrerelease) return !0; t = l; } let r = /* @__PURE__ */ new Set(), s, u; for (let t of e) t.operator === `>` || t.operator === `>=` ? s = d(s, t, n) : t.operator === `<` || t.operator === `<=` ? u = f(u, t, n) : r.add(t.semver); if (r.size > 1) return null; let p; if (s && u && (p = o(s.semver, u.semver, n), p > 0 || p === 0 && (s.operator !== `>=` || u.operator !== `<=`))) return null; for (let e of r) { if (s && !a(e, String(s), n) || u && !a(e, String(u), n)) return null; for (let r of t) if (!a(e, String(r), n)) return !1; return !0; } let m, h, g, _, v = u && !n.includePrerelease && u.semver.prerelease.length ? u.semver : !1, y = s && !n.includePrerelease && s.semver.prerelease.length ? s.semver : !1; v && v.prerelease.length === 1 && u.operator === `<` && v.prerelease[0] === 0 && (v = !1); for (let e of t) { if (_ = _ || e.operator === `>` || e.operator === `>=`, g = g || e.operator === `<` || e.operator === `<=`, s) { if (y && e.semver.prerelease && e.semver.prerelease.length && e.semver.major === y.major && e.semver.minor === y.minor && e.semver.patch === y.patch && (y = !1), e.operator === `>` || e.operator === `>=`) { if (m = d(s, e, n), m === e && m !== s) return !1; } else if (s.operator === `>=` && !a(s.semver, String(e), n)) return !1; } if (u) { if (v && e.semver.prerelease && e.semver.prerelease.length && e.semver.major === v.major && e.semver.minor === v.minor && e.semver.patch === v.patch && (v = !1), e.operator === `<` || e.operator === `<=`) { if (h = f(u, e, n), h === e && h !== u) return !1; } else if (u.operator === `<=` && !a(u.semver, String(e), n)) return !1; } if (!e.operator && (u || s) && p !== 0) return !1; } return !(s && g && !u && p !== 0 || u && _ && !s && p !== 0 || y || v); }, d = (e, t, n) => { if (!e) return t; let r = o(e.semver, t.semver, n); return r > 0 ? e : r < 0 || t.operator === `>` && e.operator === `>=` ? t : e; }, f = (e, t, n) => { if (!e) return t; let r = o(e.semver, t.semver, n); return r < 0 ? e : r > 0 || t.operator === `<` && e.operator === `<=` ? t : e; }; t.exports = s; })); var Pg$1 = c$12(((e, t) => { let n = qh$1(), r = Gh$1(), i = Y$10(), a = Yh$1(); t.exports = { parse: Xh$1(), valid: Zh$1(), clean: Qh$1(), inc: $h$1(), diff: eg$1(), major: tg$1(), minor: ng$1(), patch: rg$1(), prerelease: ig$1(), compare: ag$1(), rcompare: og$1(), compareLoose: sg$1(), compareBuild: cg$1(), sort: lg$1(), rsort: ug$1(), gt: dg$1(), lt: fg$1(), eq: pg$1(), neq: mg$1(), gte: hg(), lte: gg$1(), cmp: _g$1(), coerce: vg$1(), Comparator: xg$1(), Range: bg$1(), satisfies: Sg$1(), toComparators: Cg$1(), maxSatisfying: wg$1(), minSatisfying: Tg$1(), minVersion: Eg$1(), validRange: Dg$1(), outside: Og$1(), gtr: kg$1(), ltr: Ag$1(), intersects: jg$1(), simplifyRange: Mg$1(), subset: Ng$1(), SemVer: i, re: n.re, src: n.src, tokens: n.t, SEMVER_SPEC_VERSION: r.SEMVER_SPEC_VERSION, RELEASE_TYPES: r.RELEASE_TYPES, compareIdentifiers: a.compareIdentifiers, rcompareIdentifiers: a.rcompareIdentifiers }; })); function Fg$1(e) { return new Uint8Array(e).toBase64(); } function Ig$1(e) { return Uint8Array.fromBase64(e).buffer; } function Lg$1(e) { return Buffer.from(e).toString(`base64`); } function Rg$1(e) { return Uint8Array.from(Buffer.from(e, `base64`)).buffer; } function zg$1(e) { let t = new Uint8Array(e), n = ``, r = 32768; for (let e = 0; e < t.length; e += r) { let i = t.subarray(e, e + r); n += String.fromCharCode.apply(null, i); } return btoa(n); } function Bg$1(e) { let t = atob(e), n = t.length, r = new Uint8Array(n); for (let e = 0; e < n; e++) r[e] = t.charCodeAt(e); return r.buffer; } const Vg$1 = typeof Uint8Array.fromBase64 == `function`; const Hg$1 = typeof process == `object` && process.versions?.node !== void 0; const Ug$1 = Vg$1 ? Fg$1 : Hg$1 ? Lg$1 : zg$1; const Wg$1 = Vg$1 ? Ig$1 : Hg$1 ? Rg$1 : Bg$1; const Gg$1 = 2 ** 32 - 1; const Kg$1 = Gg$1 - 1; var qg$1 = class extends Error { constructor(e, t, n, r) { super(e), this.name = `DevalueError`, this.path = t.join(``), this.value = n, this.root = r; } }; function Jg$1(e) { return e === null || typeof e != `object` && typeof e != `function`; } const Yg$1 = Object.getOwnPropertyNames(Object.prototype).sort().join(`\0`); function Xg$1(e) { let t = Object.getPrototypeOf(e); return t === Object.prototype || t === null || Object.getPrototypeOf(t) === null || Object.getOwnPropertyNames(t).sort().join(`\0`) === Yg$1; } function Zg$1(e) { return Object.prototype.toString.call(e).slice(8, -1); } function Qg$1(e) { switch (e) { case `"`: return `\\"`; case `<`: return `\\u003C`; case `\\`: return `\\\\`; case ` `: return `\\n`; case `\r`: return `\\r`; case ` `: return `\\t`; case `\b`: return `\\b`; case `\f`: return `\\f`; case `\u2028`: return `\\u2028`; case `\u2029`: return `\\u2029`; default: return e < ` ` ? `\\u${e.charCodeAt(0).toString(16).padStart(4, `0`)}` : ``; } } function $g$1(e) { let t = ``, n = 0, r = e.length; for (let i = 0; i < r; i += 1) { let r = e[i], a = Qg$1(r); a && (t += e.slice(n, i) + a, n = i + 1); } return `"${n === 0 ? e : t + e.slice(n)}"`; } function e_$1(e) { return Object.getOwnPropertySymbols(e).filter((t) => Object.getOwnPropertyDescriptor(e, t).enumerable); } const t_$1 = /^[a-zA-Z_$][a-zA-Z_$0-9]*$/; function n_$1(e) { return t_$1.test(e) ? `.` + e : `[` + JSON.stringify(e) + `]`; } function r_$1(e) { return !(!Number.isInteger(e) || e < 0 || e > Kg$1); } function i_$1(e) { return !(!Number.isInteger(e) || e < 0 || e > Gg$1); } function a_$1(e) { if (e.length === 0 || e.length > 1 && e.charCodeAt(0) === 48) return !1; for (let t = 0; t < e.length; t++) { let n = e.charCodeAt(t); if (n < 48 || n > 57) return !1; } return r_$1(+e); } function o_$1(e) { let t = Object.keys(e); for (var n = t.length - 1; n >= 0 && !a_$1(t[n]); n--); return t.length = n + 1, t; } function s_$1(e, t) { return c_$1(JSON.parse(e), t); } function c_$1(e, t) { if (typeof e == `number`) return a(e, !0); if (!Array.isArray(e) || e.length === 0) throw Error(`Invalid input`); let n = e, r = Array(n.length), i = null; function a(e, o = !1) { if (e === -1) return; if (e === -3) return NaN; if (e === -4) return Infinity; if (e === -5) return -Infinity; if (e === -6) return -0; if (o || typeof e != `number`) throw Error(`Invalid input`); if (e in r) return r[e]; let s = n[e]; if (!s || typeof s != `object`) r[e] = s; else if (Array.isArray(s)) if (typeof s[0] == `string`) { let o = s[0], c = t && Object.hasOwn(t, o) ? t[o] : void 0; if (c) { let t = s[1]; if (typeof t != `number` && (t = n.push(s[1]) - 1), i ??= /* @__PURE__ */ new Set(), i.has(t)) throw Error(`Invalid circular reference`); return i.add(t), r[e] = c(a(t)), i.delete(t), r[e]; } switch (o) { case `Date`: r[e] = new Date(s[1]); break; case `Set`: let t = /* @__PURE__ */ new Set(); r[e] = t; for (let e = 1; e < s.length; e += 1) t.add(a(s[e])); break; case `Map`: let i = /* @__PURE__ */ new Map(); r[e] = i; for (let e = 1; e < s.length; e += 2) i.set(a(s[e]), a(s[e + 1])); break; case `RegExp`: r[e] = new RegExp(s[1], s[2]); break; case `Object`: { let t = s[1]; if (typeof n[t] == `object` && n[t][0] !== `BigInt`) throw Error(`Invalid input`); r[e] = Object(a(t)); break; } case `BigInt`: r[e] = BigInt(s[1]); break; case `null`: let c = Object.create(null); r[e] = c; for (let e = 1; e < s.length; e += 2) { if (s[e] === `__proto__`) throw Error("Cannot parse an object with a `__proto__` property"); c[s[e]] = a(s[e + 1]); } break; case `Int8Array`: case `Uint8Array`: case `Uint8ClampedArray`: case `Int16Array`: case `Uint16Array`: case `Float16Array`: case `Int32Array`: case `Uint32Array`: case `Float32Array`: case `Float64Array`: case `BigInt64Array`: case `BigUint64Array`: case `DataView`: { if (n[s[1]][0] !== `ArrayBuffer`) throw Error(`Invalid data`); let t = globalThis[o], i = a(s[1]); r[e] = s[2] === void 0 ? new t(i) : new t(i, s[2], s[3]); break; } case `ArrayBuffer`: { let t = s[1]; if (typeof t != `string`) throw Error(`Invalid ArrayBuffer encoding`); r[e] = Wg$1(t); break; } case `Temporal.Duration`: case `Temporal.Instant`: case `Temporal.PlainDate`: case `Temporal.PlainTime`: case `Temporal.PlainDateTime`: case `Temporal.PlainMonthDay`: case `Temporal.PlainYearMonth`: case `Temporal.ZonedDateTime`: { let t = o.slice(9); r[e] = Temporal[t].from(s[1]); break; } case `URL`: r[e] = new URL(s[1]); break; case `URLSearchParams`: r[e] = new URLSearchParams(s[1]); break; default: throw Error(`Unknown type ${o}`); } } else if (s[0] === -7) { let t = s[1]; if (!i_$1(t)) throw Error(`Invalid input`); let n = []; r[e] = n, n[Kg$1] = void 0, delete n[Kg$1]; for (let e = 2; e < s.length; e += 2) { let r = s[e]; if (!r_$1(r) || r >= t) throw Error(`Invalid input`); n[r] = a(s[e + 1]); } n.length = t; } else { let t = Array(s.length); r[e] = t; for (let e = 0; e < s.length; e += 1) { let n = s[e]; n !== -2 && (t[e] = a(n)); } } else { let t = {}; r[e] = t; for (let e of Object.keys(s)) { if (e === `__proto__`) throw Error("Cannot parse an object with a `__proto__` property"); let n = s[e]; t[e] = a(n); } } return r[e]; } return a(0); } function l_$1(e, t) { let n = u_$1(!1, e, t); return typeof n == `string` ? n : `[${n.join(`,`)}]`; } function u_$1(e, t, n) { let r = [], i = /* @__PURE__ */ new Map(), a = []; if (n) for (let e of Object.getOwnPropertyNames(n)) a.push({ key: e, fn: n[e] }); let o = [], s = 0; function c(n, l) { if (n === void 0) return -1; if (Number.isNaN(n)) return -3; if (n === Infinity) return -4; if (n === -Infinity) return -5; if (n === 0 && 1 / n < 0) return -6; if (i.has(n)) return i.get(n); l ??= s++, i.set(n, l); for (let { key: e, fn: t } of a) { let i = t(n); if (i) return r[l] = `["${e}",${c(i)}]`, l; } if (typeof n == `function`) throw new qg$1(`Cannot stringify a function`, o, n, t); if (typeof n == `symbol`) throw new qg$1(`Cannot stringify a Symbol primitive`, o, n, t); let u = ``; if (Jg$1(n)) u = d_$1(n); else if (typeof n.then == `function`) { if (!e) throw new qg$1(`Cannot stringify a Promise or thenable — use stringifyAsync instead`, o, n, t); u = Promise.resolve(n).then((e) => { let t = c(e, l); t < 0 && (r[l] = t); }); } else { let e = Zg$1(n); switch (e) { case `Number`: case `String`: case `Boolean`: case `BigInt`: u = `["Object",${c(n.valueOf())}]`; break; case `Date`: u = `["Date","${isNaN(n.getDate()) ? `` : n.toISOString()}"]`; break; case `URL`: u = `["URL",${$g$1(n.toString())}]`; break; case `URLSearchParams`: u = `["URLSearchParams",${$g$1(n.toString())}]`; break; case `RegExp`: let { source: r, flags: i } = n; u = i ? `["RegExp",${$g$1(r)},"${i}"]` : `["RegExp",${$g$1(r)}]`; break; case `Array`: { let e = !1; u = `[`; for (let t = 0; t < n.length; t += 1) if (t > 0 && (u += `,`), Object.hasOwn(n, t)) o.push(`[${t}]`), u += c(n[t]), o.pop(); else if (e) u += -2; else { let t = o_$1(n), r = t.length, i = String(n.length).length; if ((n.length - r) * 3 > 4 + i + r * (i + 1)) { u = `[-7,` + n.length; for (let e = 0; e < t.length; e++) { let r = t[e]; o.push(`[${r}]`), u += `,` + r + `,` + c(n[r]), o.pop(); } break; } else e = !0, u += -2; } u += `]`; break; } case `Set`: u = `["Set"`; for (let e of n) u += `,${c(e)}`; u += `]`; break; case `Map`: u = `["Map"`; for (let [e, t] of n) o.push(`.get(${Jg$1(e) ? d_$1(e) : `...`})`), u += `,${c(e)},${c(t)}`, o.pop(); u += `]`; break; case `Int8Array`: case `Uint8Array`: case `Uint8ClampedArray`: case `Int16Array`: case `Uint16Array`: case `Float16Array`: case `Int32Array`: case `Uint32Array`: case `Float32Array`: case `Float64Array`: case `BigInt64Array`: case `BigUint64Array`: case `DataView`: { let t = n; u = `["` + e + `",` + c(t.buffer), t.byteLength !== t.buffer.byteLength && (u += `,${t.byteOffset},${t.length}`), u += `]`; break; } case `ArrayBuffer`: u = `["ArrayBuffer","${Ug$1(n)}"]`; break; case `Temporal.Duration`: case `Temporal.Instant`: case `Temporal.PlainDate`: case `Temporal.PlainTime`: case `Temporal.PlainDateTime`: case `Temporal.PlainMonthDay`: case `Temporal.PlainYearMonth`: case `Temporal.ZonedDateTime`: u = `["${e}",${$g$1(n.toString())}]`; break; default: if (!Xg$1(n)) throw new qg$1(`Cannot stringify arbitrary non-POJOs`, o, n, t); if (e_$1(n).length > 0) throw new qg$1(`Cannot stringify POJOs with symbolic keys`, o, n, t); if (Object.getPrototypeOf(n) === null) { u = `["null"`; for (let e of Object.keys(n)) { if (e === `__proto__`) throw new qg$1(`Cannot stringify objects with __proto__ keys`, o, n, t); o.push(n_$1(e)), u += `,${$g$1(e)},${c(n[e])}`, o.pop(); } u += `]`; } else { u = `{`; let e = !1; for (let r of Object.keys(n)) { if (r === `__proto__`) throw new qg$1(`Cannot stringify objects with __proto__ keys`, o, n, t); e && (u += `,`), e = !0, o.push(n_$1(r)), u += `${$g$1(r)}:${c(n[r])}`, o.pop(); } u += `}`; } } } return r[l] = u, l; } let l = c(t); return l < 0 ? `${l}` : r; } function d_$1(e) { let t = typeof e; return t === `string` ? $g$1(e) : e === void 0 ? `-1` : e === 0 && 1 / e < 0 ? `-6` : t === `bigint` ? `["BigInt","${e}"]` : String(e); } var f_$1 = d$13(Pg$1(), 1); async function p_$1(e, t = [`encrypt`, `decrypt`]) { if (e.byteLength !== 32) throw new u$10(`Encryption key must be exactly 32 bytes, got ${e.byteLength}`); return globalThis.crypto.subtle.importKey(`raw`, e, `AES-GCM`, !1, t); } async function m_$1(e, t) { let n = globalThis.crypto.getRandomValues(/* @__PURE__ */ new Uint8Array(12)), r; try { r = await globalThis.crypto.subtle.encrypt({ name: `AES-GCM`, iv: n, tagLength: 128 }, e, t); } catch (e) { throw new p$11(`AES-256-GCM encryption failed: ${e instanceof Error ? e.message : String(e)}`, { cause: e, context: { operation: `encrypt`, byteLength: t.byteLength } }); } let i = new Uint8Array(12 + r.byteLength); return i.set(n, 0), i.set(new Uint8Array(r), 12), i; } async function h_$1(e, t) { if (t.byteLength < 28) throw new p$11(`Encrypted data too short: expected at least 28 bytes, got ${t.byteLength}`, { context: { operation: `decrypt`, byteLength: t.byteLength } }); let n = t.subarray(0, 12), r = t.subarray(12), i; try { i = await globalThis.crypto.subtle.decrypt({ name: `AES-GCM`, iv: n, tagLength: 128 }, e, r); } catch (e) { throw new p$11(`AES-256-GCM decryption failed: ${e instanceof Error ? e.message : String(e)}`, { cause: e, context: { operation: `decrypt`, byteLength: t.byteLength } }); } return new Uint8Array(i); } function g_$1() { let e = { ...f$9(), pendingOps: 0, doneResolved: !1, streamEnded: !1 }; return e.promise.catch(() => {}), e; } function __$1(e) { if (e.locked) return !1; let t; try { t = e.getWriter(); } catch { return !1; } try { t.releaseLock(); } catch { return !1; } return !0; } function v_$1(e) { if (e.locked) return !1; let t; try { t = e.getReader(); } catch { return !1; } try { t.releaseLock(); } catch { return !1; } return !0; } function y_$1(e, t) { if (t.writablePollingInterval !== void 0) return; let n = setInterval(() => { if (t.doneResolved || t.streamEnded) { clearInterval(n), t.writablePollingInterval = void 0; return; } __$1(e) && t.pendingOps === 0 && (t.doneResolved = !0, t.resolve(), clearInterval(n), t.writablePollingInterval = void 0); }, 10); t.writablePollingInterval = n; } function b_$1(e, t) { if (t.readablePollingInterval !== void 0) return; let n = setInterval(() => { if (t.doneResolved || t.streamEnded) { clearInterval(n), t.readablePollingInterval = void 0; return; } v_$1(e) && t.pendingOps === 0 && (t.doneResolved = !0, t.resolve(), clearInterval(n), t.readablePollingInterval = void 0); }, 10); t.readablePollingInterval = n; } async function x_$1(e, t, n) { let r = e.getReader(), i = t.getWriter(), a; try { for (;;) { if (n.streamEnded) return; let e = await Promise.race([r.read(), i.closed.then(() => { throw new u$10(`Writable stream closed prematurely`); })]); if (n.streamEnded) return; if (e.done) { n.streamEnded = !0, await i.close(), n.doneResolved || (n.doneResolved = !0, n.resolve()); return; } n.pendingOps++; try { await i.write(e.value); } finally { n.pendingOps--; } } } catch (e) { throw n.streamEnded = !0, a = e, n.doneResolved || (n.doneResolved = !0, n.reject(e)), e; } finally { r.cancel(a).catch(() => {}), r.releaseLock(), i.releaseLock(); } } const S_$1 = Symbol.for(`@workflow/world//cache`); const C_$1 = Symbol.for(`@workflow/world//cachePromise`); const w_$1 = Symbol.for(`@workflow/world//getWorldFn`); async function T_$1() { let e = globalThis; if (e[S_$1]) return e[S_$1]; if (e[C_$1]) return e[S_$1] = await e[C_$1], e[S_$1]; let t = e[w_$1]; if (t) return t(); let { getWorld: n } = await import([`./world`, `js`].join(`.`)); return n(); } const E_$1 = Symbol.for(`workflow-serialize`); const D_$1 = Symbol.for(`workflow-deserialize`); const O_$1 = Symbol.for(`WORKFLOW_USE_STEP`); const k_$1 = Symbol.for(`WORKFLOW_SET_ATTRIBUTES`); const A_$1 = Symbol.for(`WORKFLOW_CREATE_HOOK`); const j_$1 = Symbol.for(`WORKFLOW_SLEEP`); const M_$1 = Symbol.for(`WORKFLOW_GET_STREAM_ID`); const N_$1 = Symbol.for(`WORKFLOW_STABLE_ULID`); const P_$1 = Symbol.for(`WORKFLOW_STREAM_NAME`); const F_$1 = Symbol.for(`WORKFLOW_STREAM_TYPE`); const I_$1 = Symbol.for(`WORKFLOW_STREAM_FRAMING`); const L_$1 = Symbol.for(`WORKFLOW_STREAM_SERVER_RUN_ID`); const R_$1 = Symbol.for(`WORKFLOW_STREAM_SERVER_DEPLOYMENT_ID`); const z_$1 = Symbol.for(`BODY_INIT`); const B_$1 = Symbol.for(`WEBHOOK_RESPONSE_WRITABLE`); const V_$1 = Symbol.for(`workflow-class-registry`); const X$10 = Symbol.for(`WORKFLOW_ABORT_STREAM_NAME`); const Z$9 = Symbol.for(`WORKFLOW_ABORT_HOOK_TOKEN`); const H_$1 = Symbol.for(`WORKFLOW_ABORT_LISTENER_ATTACHED`); const U_$1 = Symbol.for(`WORKFLOW_ABORT_READER_CANCEL`); function W_$1(e = globalThis) { let t = e, n = t[V_$1]; return n || (n = /* @__PURE__ */ new Map(), t[V_$1] = n), n; } const G_$1 = `class//workflow//Run`; function q_$1(e, t) { return W_$1(t).get(e); } function J_$1() { return { Class: (e) => { if (typeof e != `function`) return !1; let t = e.classId; return typeof t == `string` ? { classId: t } : !1; }, Instance: (e) => { if (typeof e != `object` || !e) return !1; let t = e.constructor; if (!t || typeof t != `function`) return !1; let n = t[E_$1]; if (typeof n != `function`) return !1; let r = t.classId; if (typeof r != `string`) throw Error(`Class "${t.name}" with ${String(E_$1)} must have a static "classId" property.`); return { classId: r, data: n.call(t, e) }; } }; } function Y_$1(e = globalThis) { return { Class: (t) => { let n = t.classId, r = q_$1(n, e); if (!r) throw Error(`Class "${n}" not found. Make sure the class is registered with registerSerializationClass.`); return r; }, Instance: (t) => { let n = t.classId, r = t.data, i = q_$1(n, e); if (!i) throw Error(`Class "${n}" not found. Make sure the class is registered with registerSerializationClass.`); let a = i[D_$1]; if (typeof a != `function`) throw Error(`Class "${n}" does not have a static ${String(D_$1)} method.`); return a.call(i, r); } }; } function X_$1(e, t, n) { if (n === 0) return `.`; let r = new Uint8Array(e, t, n); return Buffer.from(r).toString(`base64`); } function Z_$1(e) { return X_$1(e.buffer, e.byteOffset, e.byteLength); } function Q_$1(e, t) { let n = e === `.` ? `` : e, r = Buffer.from(n, `base64`), i = new t.ArrayBuffer(r.length); return new t.Uint8Array(i).set(r), i; } function $_$1(e) { return JSON.parse(e); } function ev$1(e) { if (!types.isNativeError(e)) return !1; let t = { message: e.message, stack: e.stack }; return `cause` in e && (t.cause = e.cause), t; } function tv$1(e, t) { return !types.isNativeError(t) || t.name !== e ? !1 : ev$1(t); } function nv$1(e) { return (t) => tv$1(e, t) || !1; } function rv$1(e, t) { return (n) => { let r = n, i = `cause` in r ? { cause: r.cause } : void 0, a = e[t], o = new a(r.message, i); return r.stack !== void 0 && (o.stack = r.stack), o; }; } function iv$1(e = globalThis) { return { ArrayBuffer: (t) => t instanceof e.ArrayBuffer && X_$1(t, 0, t.byteLength), BigInt: (e) => typeof e == `bigint` && e.toString(), BigInt64Array: (t) => t instanceof e.BigInt64Array && Z_$1(t), BigUint64Array: (t) => t instanceof e.BigUint64Array && Z_$1(t), Date: (t) => t instanceof e.Date ? Number.isNaN(t.getDate()) ? `.` : t.toISOString() : !1, DOMException: (e) => { if (typeof e != `object` || !e || e.constructor?.name !== `DOMException`) return !1; let t = e, n = { message: t.message, name: t.name, stack: t.stack }; return `cause` in t && (n.cause = t.cause), n; }, EvalError: nv$1(`EvalError`), FatalError: nv$1(`FatalError`), HookConflictError: (e) => { let t = tv$1(`HookConflictError`, e); if (!t) return !1; let n = e, r = { ...t, token: n.token }; return n.conflictingRunId !== void 0 && (r.conflictingRunId = n.conflictingRunId), r; }, RangeError: nv$1(`RangeError`), ReferenceError: nv$1(`ReferenceError`), RetryableError: (e) => { let t = tv$1(`RetryableError`, e); if (!t) return !1; let n = e.retryAfter, r; if (n && typeof n == `object` && typeof n.getTime == `function`) { let e = n.getTime(); r = Number.isNaN(e) ? Date.now() + 1e3 : e; } else if (typeof n == `string` || typeof n == `number`) { let e = new Date(n).getTime(); r = Number.isNaN(e) ? Date.now() + 1e3 : e; } else r = Date.now() + 1e3; return { ...t, retryAfter: r }; }, RuntimeDecryptionError: (e) => { let t = tv$1(`RuntimeDecryptionError`, e); if (!t) return !1; let n = { ...t }, r = e.context; return r !== void 0 && (n.context = r), n; }, SyntaxError: nv$1(`SyntaxError`), TypeError: nv$1(`TypeError`), URIError: nv$1(`URIError`), AggregateError: (e) => { let t = tv$1(`AggregateError`, e); return t ? { ...t, errors: e.errors } : !1; }, Error: (e) => { if (!types.isNativeError(e)) return !1; let t = { name: e.name, message: e.message, stack: e.stack }; return `cause` in e && (t.cause = e.cause), t; }, Float32Array: (t) => t instanceof e.Float32Array && Z_$1(t), Float64Array: (t) => t instanceof e.Float64Array && Z_$1(t), Headers: (t) => t instanceof e.Headers && Array.from(t), Int8Array: (t) => t instanceof e.Int8Array && Z_$1(t), Int16Array: (t) => t instanceof e.Int16Array && Z_$1(t), Int32Array: (t) => t instanceof e.Int32Array && Z_$1(t), Map: (t) => t instanceof e.Map && Array.from(t), RegExp: (t) => t instanceof e.RegExp && { source: t.source, flags: t.flags }, Set: (t) => t instanceof e.Set && Array.from(t), URL: (t) => t instanceof e.URL && t.href, WorkflowFunction: (e) => { if (typeof e != `function`) return !1; let t = e.workflowId; return typeof t == `string` ? { workflowId: t } : !1; }, URLSearchParams: (t) => t instanceof e.URLSearchParams ? t.size === 0 ? `.` : String(t) : !1, Uint8Array: (t) => t instanceof e.Uint8Array && Z_$1(t), Uint8ClampedArray: (t) => t instanceof e.Uint8ClampedArray && Z_$1(t), Uint16Array: (t) => t instanceof e.Uint16Array && Z_$1(t), Uint32Array: (t) => t instanceof e.Uint32Array && Z_$1(t) }; } function av$1(e = globalThis) { return { ArrayBuffer: (t) => Q_$1(t, e), BigInt: (t) => e.BigInt(t), BigInt64Array: (t) => new e.BigInt64Array(Q_$1(t, e)), BigUint64Array: (t) => new e.BigUint64Array(Q_$1(t, e)), Date: (t) => new e.Date(t), DOMException: (t) => { let n = new e.DOMException(t.message, t.name); return t.stack !== void 0 && (n.stack = t.stack), `cause` in t && (n.cause = t.cause), n; }, EvalError: rv$1(e, `EvalError`), FatalError: (t) => { let n = new (e[Symbol.for(`@workflow/errors//FatalError`)] ?? D$10)(t.message); return t.stack !== void 0 && (n.stack = t.stack), `cause` in t && (n.cause = t.cause), n; }, HookConflictError: (t) => { let n = new (e[Symbol.for(`@workflow/errors//HookConflictError`)] ?? y$6)(t.token, t.conflictingRunId); return t.stack !== void 0 && (n.stack = t.stack), `cause` in t && (n.cause = t.cause), n; }, RangeError: rv$1(e, `RangeError`), ReferenceError: rv$1(e, `ReferenceError`), RetryableError: (t) => { let n = new (e[Symbol.for(`@workflow/errors//RetryableError`)] ?? O$8)(t.message, { retryAfter: new e.Date(t.retryAfter) }); return t.stack !== void 0 && (n.stack = t.stack), `cause` in t && (n.cause = t.cause), n; }, RuntimeDecryptionError: (t) => { let n = e[Symbol.for(`@workflow/errors//RuntimeDecryptionError`)] ?? p$11, r = {}; `cause` in t && (r.cause = t.cause), t.context !== void 0 && (r.context = t.context); let i = new n(t.message, r); return t.stack !== void 0 && (i.stack = t.stack), i; }, SyntaxError: rv$1(e, `SyntaxError`), TypeError: rv$1(e, `TypeError`), URIError: rv$1(e, `URIError`), AggregateError: (t) => { let n = `cause` in t ? { cause: t.cause } : void 0, r = new e.AggregateError(t.errors, t.message, n); return t.stack !== void 0 && (r.stack = t.stack), r; }, Error: (t) => { let n = `cause` in t ? { cause: t.cause } : void 0, r = new e.Error(t.message, n); return r.name = t.name, t.stack !== void 0 && (r.stack = t.stack), r; }, Float32Array: (t) => new e.Float32Array(Q_$1(t, e)), Float64Array: (t) => new e.Float64Array(Q_$1(t, e)), Headers: (t) => new e.Headers(t), Int8Array: (t) => new e.Int8Array(Q_$1(t, e)), Int16Array: (t) => new e.Int16Array(Q_$1(t, e)), Int32Array: (t) => new e.Int32Array(Q_$1(t, e)), Map: (t) => new e.Map(t), RegExp: (t) => new e.RegExp(t.source, t.flags), Set: (t) => new e.Set(t), URL: (t) => new e.URL(t), WorkflowFunction: (e) => Object.assign(() => { throw Error(`Workflow functions cannot be called directly. Use start() to invoke them.`); }, { workflowId: e.workflowId }), URLSearchParams: (t) => new e.URLSearchParams(t === `.` ? `` : t), Uint8Array: (t) => new e.Uint8Array(Q_$1(t, e)), Uint8ClampedArray: (t) => new e.Uint8ClampedArray(Q_$1(t, e)), Uint16Array: (t) => new e.Uint16Array(Q_$1(t, e)), Uint32Array: (t) => new e.Uint32Array(Q_$1(t, e)) }; } function ov$1() { return { StepFunction: (e) => { if (typeof e != `function`) return !1; let t = e.stepId; if (typeof t != `string`) return !1; let n = e.__closureVarsFn, r = n && typeof n == `function` ? n() : void 0, i = `__boundThis` in e, a = i ? e.__boundThis : void 0, o = e.__boundArgs, s = { stepId: t }; return r !== void 0 && (s.closureVars = r), i && (s.boundThis = a), Array.isArray(o) && o.length > 0 && (s.boundArgs = o), s; } }; } function sv$1(e = globalThis) { let t = e[Symbol.for(`WORKFLOW_USE_STEP`)]; return { StepFunction: (e) => { let n = e.stepId, r = e.closureVars; if (!t) throw Error(`WORKFLOW_USE_STEP not found on global object. Step functions cannot be deserialized outside workflow context.`); let i = r ? t(n, () => r) : t(n); if (`boundThis` in e) { let t = Array.isArray(e.boundArgs) ? e.boundArgs : []; return i.bind(e.boundThis, ...t); } return i; } }; } function cv$1(e) { return e.length === 4 && /^[a-z0-9]{4}$/.test(e); } const Q$9 = { DEVALUE_V1: `devl`, ENCRYPTED: `encr`, GZIP: `gzip`, ZSTD: `zstd` }; const lv$1 = new TextEncoder(); const uv$1 = new TextDecoder(); function dv$1(e, t = globalThis, n) { let r; switch (e) { case `workflow`: r = { ...J_$1(), ...ov$1(), ...iv$1(t) }; break; case `step`: r = { ...J_$1(), ...iv$1(t) }; break; case `client`: r = { ...J_$1(), ...iv$1(t) }; break; } return n ? { ...r, ...n } : r; } function fv$1(e, t = globalThis, n) { let r; switch (e) { case `workflow`: r = { ...Y_$1(t), ...sv$1(t), ...av$1(t) }; break; case `step`: r = { ...Y_$1(t), ...av$1(t) }; break; case `client`: r = { ...Y_$1(t), ...av$1(t), StepFunction: () => { throw Error(`Step functions cannot be deserialized in client context.`); } }; break; } return n ? { ...r, ...n } : r; } const pv$1 = { formatPrefix: Q$9.DEVALUE_V1, serialize(e, t, n) { let r = l_$1(e, dv$1(t, n?.global, n?.extraReducers)); return lv$1.encode(r); }, deserialize(e, t, n) { let r = fv$1(t, n?.global, n?.extraRevivers); return s_$1(uv$1.decode(e), r); }, deserializeLegacy(e, t, n) { return c_$1(e, fv$1(t, n?.global, n?.extraRevivers)); } }; const mv$1 = new TextEncoder(); const hv$1 = new TextDecoder(); function gv$1(e, t) { if (!(t instanceof Uint8Array)) return t; let n = mv$1.encode(e), r = new Uint8Array(4 + t.length); return r.set(n, 0), r.set(t, 4), r; } function _v$1(e) { if (!(e instanceof Uint8Array) || e.length < 4) return null; let t = e.subarray(0, 4), n = hv$1.decode(t); return cv$1(n) ? n : null; } function vv$1(e) { if (!(e instanceof Uint8Array)) return { format: Q$9.DEVALUE_V1, payload: new TextEncoder().encode(JSON.stringify(e)) }; if (e.length < 4) throw Error(`Data too short to contain format prefix: expected at least 4 bytes, got ${e.length}`); let t = e.subarray(0, 4), n = hv$1.decode(t); if (!cv$1(n)) throw Error(`Invalid format prefix: "${n}". Must be 4 characters of [a-z0-9].`); return { format: n, payload: e.subarray(4) }; } function yv$1() { try { return typeof process < `u` && process.env?.WORKFLOW_DISABLE_COMPRESSION === `1`; } catch { return !1; } } function bv$1() { try { let e = process.env?.WORKFLOW_COMPRESSION_CODEC; return e === `gzip` || e === `zstd` ? e : void 0; } catch { return; } } function xv$1() { try { return globalThis.process?.getBuiltinModule?.(`node:zlib`); } catch { return; } } function Sv$1() { let e = xv$1(); return typeof e?.zstdCompressSync == `function` && typeof e?.zstdDecompressSync == `function`; } function Cv$1() { return typeof CompressionStream == `function` && typeof DecompressionStream == `function`; } async function wv$1(e, t) { let n = t.writable.getWriter(), r = n.write(e).then(() => n.close()); r.catch(() => {}); let i = [], a = 0, o = t.readable.getReader(); for (;;) { let { done: e, value: t } = await o.read(); if (e) break; i.push(t), a += t.length; } await r; let s = new Uint8Array(a), c = 0; for (let e of i) s.set(e, c), c += e.length; return s; } async function Tv$1(e) { return wv$1(e, new CompressionStream(`gzip`)); } async function Ev$1(e) { return wv$1(e, new DecompressionStream(`gzip`)); } function Dv$1(e) { let t = xv$1(), n = t?.constants?.ZSTD_c_compressionLevel, r = n === void 0 ? void 0 : { params: { [n]: 3 } }; return new Uint8Array(t.zstdCompressSync(e, r)); } function Ov$1(e) { let t = xv$1(); if (!t?.zstdDecompressSync) throw Error(`Compressed (zstd) workflow data encountered but node:zlib zstd support is not available in this runtime (requires Node.js 22.15+). In the browser, register a zstd decoder via registerZstdDecoder (serialization-format.ts).`); return new Uint8Array(t.zstdDecompressSync(e)); } function kv(e, t, n, r) { e && (e.recorded = !0, e.compressed = t !== `none`, e.codec = t, e.uncompressedBytes = n, e.storedBytes = r); } function Av() { return bv$1() === `gzip` ? Cv$1() ? `gzip` : `none` : Sv$1() ? `zstd` : Cv$1() ? `gzip` : `none`; } async function jv(e, t, n) { if (!(e instanceof Uint8Array)) return e; if (!t || e.length < 1024 || yv$1()) return kv(n, `none`, e.length, e.length), e; let r = Av(); if (r === `none`) return kv(n, `none`, e.length, e.length), e; let i = r === `zstd` ? Dv$1(e) : await Tv$1(e), a = r === `zstd` ? Q$9.ZSTD : Q$9.GZIP, o = 4 + i.length; return o >= e.length * .95 ? (kv(n, `none`, e.length, e.length), e) : (kv(n, r, e.length, o), gv$1(a, i)); } async function Mv(e, t) { if (!(e instanceof Uint8Array)) return e; let n = _v$1(e); if (n === Q$9.ZSTD) { let { payload: n } = vv$1(e), r = Ov$1(n); return kv(t, `zstd`, r.length, e.length), r; } if (n === Q$9.GZIP) { if (!Cv$1()) throw Error(`Compressed (gzip) workflow data encountered but DecompressionStream is not available in this runtime. Node.js 18+, browsers, and edge runtimes all support it.`); let { payload: n } = vv$1(e), r = await Ev$1(n); return kv(t, `gzip`, r.length, e.length), r; } return kv(t, `none`, e.length, e.length), e; } async function Nv(e) { return typeof e == `function` ? e() : e; } async function Pv(e, t) { if (!t || !(e instanceof Uint8Array)) return e; let n = await m_$1(t, e); return gv$1(Q$9.ENCRYPTED, n); } async function Fv(e, t) { if (!(e instanceof Uint8Array)) return e; let n = _v$1(e); if (n === Q$9.ENCRYPTED && !t) throw new p$11(`Encrypted data encountered but no encryption key is available. Encryption is not configured or no key was provided for this run.`, { context: { operation: `decrypt`, byteLength: e.byteLength, formatPrefix: `encr` } }); if (n !== Q$9.ENCRYPTED) return e; let { payload: r } = vv$1(e); try { return await h_$1(t, r); } catch (e) { throw p$11.is(e) && e.context && (e.context.formatPrefix = n), e; } } function Iv(e, t, n) { let [r, ...i] = t.split(` `), a = i.join(` `), o = Lv(r ?? ``, n), s = Rv(a), c = [`${e} ${r ?? ``}`]; return o && c.push(o), s && c.push(s), c.join(` `); } function Lv(e, t) { if (!t || Object.keys(t).length === 0) return null; let n = /* @__PURE__ */ new Set(); n.add(`errorStack`), typeof t.errorMessage == `string` && e.includes(t.errorMessage) && n.add(`errorMessage`); let r = /* @__PURE__ */ new Set([ `workflowRunId`, `workflowName`, `stepId`, `stepName`, `errorAttribution`, `errorCode`, `errorName`, `errorMessage`, `errorStack`, `hint`, `attempt`, `retryCount` ]), i = [], a = Bv(t, `errorName`), o = Bv(t, `errorAttribution`); if (a || o) { let e = o ? o === `sdk` ? pe$8(`sdk error`) : fe$8(`user error`) : ``, t = a ? de$8(a) : ``, n = e && t ? ue$8(` · `) : ``; i.push(` ${e}${n}${t}`); } let s = Bv(t, `workflowRunId`), u = Bv(t, `workflowName`); s ? i.push(Hv(`run`, s, u, s$9)) : u && i.push(Hv(`run`, null, u, s$9)); let d = Bv(t, `stepId`), f = Bv(t, `stepName`); if ((d || f) && i.push(Hv(`step`, d, f, o$11)), t.attempt !== void 0 || t.retryCount !== void 0) { let e = t.attempt, n = t.retryCount; e !== void 0 && n !== void 0 ? i.push(` ${Vv(`retry`)} ${e} ${ue$8(`attempts ·`)} ${n} ${ue$8(`max retries`)}`) : e !== void 0 && i.push(` ${Vv(`retry`)} ${e} ${ue$8(`attempts`)}`); } let p = Bv(t, `errorCode`); p && p !== a && i.push(` ${Vv(`code`)} ${ue$8(p)}`); let m = Bv(t, `hint`); m && i.push(` ${se$8(m)}`); let h = Object.entries(t).filter(([e, t]) => !r.has(e) && !n.has(e) && t != null).sort(([e], [t]) => e.localeCompare(t)); for (let [e, t] of h) i.push(` ${Vv(e)} ${Uv(t)}`); return i.length ? i.join(` `) : null; } function Rv(e) { if (!e) return null; let t = e.split(` `), n = [], r = 0, i = 0, a = 0, o = () => { r > 0 && (n.push(ue$8(` … ${r} more ${r === 1 ? `frame` : `frames`} in framework internals`)), r = 0); }; for (let e of t) { let t = e.trimStart().startsWith(`at `); if (t && zv(e)) { r++; continue; } if (t && i >= 6) { a++; continue; } o(), n.push(e), t && i++; } return o(), a > 0 && n.push(ue$8(` … ${a} more ${a === 1 ? `frame` : `frames`} (run \`pnpm wf inspect run \` for the full stack)`)), n.join(` `); } function zv(e) { let t = e.trimStart(); return t.startsWith(`at `) ? !!(t.includes(`node:internal/`) || t.includes(`node_modules/.pnpm/`) || t.includes(`node_modules__pnpm_`) || t.includes(`_next_dist_`) || t.includes(`node_modules/next/`) || t.includes(`node_modules/@opentelemetry/`) || t.includes(`node_modules/vitest/`) || t.includes(`node_modules/@vitest/`)) : !1; } function Bv(e, t) { let n = e[t]; return typeof n == `string` && n.length > 0 ? n : null; } function Vv(e) { return ue$8(e.padEnd(6)); } function Hv(e, t, n, r) { let a = t || ue$8(`—`), o = n && (e === `run` ? i$12(n) : a$11(n)) ? `${ue$8(`·`)} ${r(n)}` : ``; return ` ${Vv(e)} ${a}${o ? ` ` + o : ``}`; } function Uv(e) { if (typeof e == `string`) return e.includes(` `) ? e.split(` `).map((e, t) => t === 0 ? e : ` ${e}`).join(` `) : e; if (typeof e == `number` || typeof e == `boolean`) return String(e); try { return JSON.stringify(e); } catch { return String(e); } } var Wv = class e extends Error { steps; globalThis; stepCount; hookCount; waitCount; attributeCount; hookDisposedCount; abortCount; constructor(e, t) { let n = [...e.values()], r = 0, i = 0, o = 0, s = 0, c = 0, l = 0; for (let e of n) e.type === `step` ? r++ : e.type === `hook` ? e.disposed ? c++ : e.abortRequested ? l++ : i++ : e.type === `wait` ? o++ : e.type === `attribute` && s++; let u = []; r > 0 && u.push(`${r} ${n$11(`step`, `steps`, r)}`), i > 0 && u.push(`${i} ${n$11(`hook`, `hooks`, i)}`), o > 0 && u.push(`${o} ${n$11(`wait`, `waits`, o)}`), s > 0 && u.push(`${s} ${n$11(`attribute write`, `attribute writes`, s)}`), c > 0 && u.push(`${c} hook ${n$11(`disposal`, `disposals`, c)}`); let d = n$11(`has`, `have`, r + i + o + s + c), f = +(r > 0) + +(i > 0) + +(o > 0) + +(s > 0) + +(c > 0), p; p = f > 1 ? `processed` : r > 0 ? `run` : i > 0 || o > 0 ? `created` : s > 0 ? `written` : c > 0 ? `processed` : `received`; let m = u.length > 0 ? `${u.join(` and `)} ${d} not been ${p} yet` : `0 steps have not been run yet`; super(m), this.name = `WorkflowSuspension`, this.steps = n, this.globalThis = t, this.stepCount = r, this.hookCount = i, this.waitCount = o, this.attributeCount = s, this.hookDisposedCount = c, this.abortCount = l; } static is(t) { return t instanceof e; } }; function Gv() { throw new u$10(`This API is not available inside a workflow function. Workflow functions run in a deterministic VM; move the call to a step function for full Node.js access.`); } function $$9(...e) { return (t) => Object.fromEntries(e.map((e) => [e, t])); } const Kv = $$9(`workflow.name`); const qv = $$9(`workflow.operation`); const Jv = $$9(`workflow.run.id`); const Yv = $$9(`workflow.run.status`); const Xv = $$9(`workflow.started_at`); const Zv = $$9(`workflow.events.count`); const Qv = $$9(`workflow.arguments.count`); const $v = $$9(`workflow.result.type`); const ey = $$9(`workflow.trace.propagated`); const ty = $$9(`workflow.trace.mode`); const ny = $$9(`workflow.turbo`); const ry = $$9(`workflow.error.name`); const iy = $$9(`workflow.error.message`); const ay = $$9(`workflow.error.code`); const oy = $$9(`workflow.steps.created`); const sy = $$9(`workflow.hooks.created`); const cy = $$9(`workflow.waits.created`); const ly = $$9(`workflow.route.type`); const uy = $$9(`workflow.route.handler_cached`); const dy = $$9(`workflow.route.invocation_count`); const fy = $$9(`workflow.route.entrypoint_age_ms`); const py = $$9(`workflow.route.module_body_init_ms`); const my = $$9(`step.name`); const hy = $$9(`step.id`); const gy = $$9(`step.attempt`); const _y = $$9(`step.status`); const vy = $$9(`step.max_retries`); const yy = $$9(`step.skipped`); const by = $$9(`step.skip_reason`); const xy = $$9(`step.arguments.count`); const Sy = $$9(`step.result.type`); const Cy = $$9(`step.error.name`); const wy = $$9(`step.error.message`); const Ty = $$9(`step.fatal_error`); const Ey = $$9(`step.retry.exhausted`); const Dy = $$9(`step.retry.timeout_seconds`); const Oy = $$9(`step.retry.will_retry`); const ky = $$9(`messaging.system`); const Ay = $$9(`messaging.destination.name`); const jy = $$9(`messaging.message.id`); const My = $$9(`messaging.operation.type`); const Ny = $$9(`workflow.queue.overhead_ms`); const Py = $$9(`deployment.id`); const Fy = $$9(`workflow.hook.token`); const Iy = $$9(`workflow.hook.id`); const Ly = $$9(`workflow.hook.found`); const Ry = $$9(`workflow.suspension.state`); const zy = $$9(`workflow.suspension.hook_count`); const By = $$9(`workflow.suspension.step_count`); const Vy = $$9(`workflow.suspension.wait_count`); const Hy = $$9(`http.request.method`); const Uy = $$9(`http.route`); const Wy = $$9(`http.response.status_code`); const Gy = $$9(`error.type`); const Ky = $$9(`workflow.events.pages_loaded`); const qy = $$9(`workflow.queue.deserialize_time_ms`); const Jy = $$9(`workflow.queue.execution_time_ms`); const Yy = $$9(`workflow.queue.serialize_time_ms`); const Xy = $$9(`workflow.serialization.operation`); const Zy = $$9(`workflow.serialization.compressed`); const Qy = $$9(`workflow.serialization.codec`); const $y = $$9(`workflow.serialization.uncompressed_bytes`); const eb = $$9(`workflow.serialization.stored_bytes`); const tb = $$9(`workflow.serialization.compression_ratio`); const nb = $$9(`peer.service`); const rb = $$9(`rpc.system`); const ib = $$9(`rpc.service`); const ab = $$9(`rpc.method`); const ob = $$9(`error.retryable`); const sb = $$9(`error.category`); const cb = /* @__PURE__ */ new Set(); function lb() { let e = process.env.WORKFLOW_TRACE_MODE; return e === `continuous` ? `continuous` : (e && e !== `linked` && !cb.has(e) && (cb.add(e), Ab.warn(`Unrecognized WORKFLOW_TRACE_MODE value "${e}"; expected "linked" or "continuous". Falling back to "linked".`)), `linked`); } function ub(e) { return e !== void 0 && Object.keys(e).length > 0; } function db(e, t) { return e === `linked` && ub(t) ? Promise.resolve(t) : pb(); } async function fb(e, t) { if (e !== `linked`) return wb(); let n = await Tb(ub(t) ? t : void 0); return n ? [n] : void 0; } async function pb() { let e = await gb.value; if (!e) return {}; let t = {}; return e.propagation.inject(e.context.active(), t), t; } async function mb(e) { let t = await gb.value; if (t) return t.propagation.extract(t.context.active(), e); } async function hb(e, t) { if (!e) return t(); let n = await gb.value; if (!n) return t(); let r = await mb(e); return r ? n.context.with(r, async () => await t()) : t(); } const gb = p$12(async () => { try { return await Promise.resolve().then(() => src_CQuMexnO_exports).then((t) => d$13(t.t(), 1)); } catch { return Ab.info(`OpenTelemetry not available, tracing will be disabled`), null; } }); const _b = p$12(async () => { let e = await gb.value; return e ? e.trace.getTracer(`workflow`) : null; }); async function vb(e, ...t) { let [n, r] = await Promise.all([_b.value, gb.value]), { fn: i, opts: a } = typeof t[0] == `function` ? { fn: t[0], opts: {} } : { fn: t[1], opts: t[0] }; if (!i) throw Error(`Function to trace must be provided`); return !n || !r ? await i() : n.startActiveSpan(e, a, async (e) => { try { let t = await i(e); return e.setStatus({ code: r.SpanStatusCode.OK }), t; } catch (t) { throw e.setStatus({ code: r.SpanStatusCode.ERROR, message: t.message }), yb(t, r, e), t; } finally { e.end(); } }); } function yb(e, t, n) { !e || !Wv.is(e) || (n.setStatus({ code: t.SpanStatusCode.OK }), n.setAttributes({ ...Ry(`suspended`), ...By(e.stepCount), ...zy(e.hookCount), ...Vy(e.waitCount) })); } async function bb(e) { let [t, n] = await Promise.all([mb(e), gb.value]); if (!(!t || !n)) return n.trace.getSpanContext(t); } async function xb() { return await Cb((e) => e.trace.getActiveSpan()); } async function Sb(e) { return Cb((t) => t.SpanKind[e]); } async function Cb(e) { let t = await gb.value; if (t) return await e(t); } function wb() { return Cb((e) => { let t = e.trace.getActiveSpan()?.spanContext(); if (t) return [{ context: t }]; }); } async function Tb(e) { if (!e) return; let [t, n] = await Promise.all([bb(e), gb.value]); if (!(!t || !n) && n.trace.isSpanContextValid(t)) return { context: t }; } async function Eb(e, t) { let n = await gb.value; if (!n) return t(); let r = n.propagation.createBaggage({ "workflow.run_id": { value: e.workflowRunId }, "workflow.name": { value: e.workflowName } }), i = n.propagation.setBaggage(n.context.active(), r); return n.context.with(i, () => t()); } function Db(e, t) { if (!t) return !1; let n = !1; for (let r of t.split(`,`)) { let t = r.trim(); if (!t) continue; let i = t.startsWith(`-`), a = i ? t.slice(1) : t; RegExp(`^${a.replace(/[|\\{}()[\]^$+?.]/g, `\\$&`).replace(/\*/g, `.*`)}$`).test(e) && (n = !i); } return n; } function Ob(e, t = {}) { let n = (r) => { let i = (n) => t.debugNamespace ?? `workflow:${e}:${n}`, a = (t) => { let n = i(t); return (i, a) => { let o = Object.keys(r).length > 0, s = a && Object.keys(a).length > 0, c = o || s ? { ...r, ...a ?? {} } : void 0; (t === `error` || t === `warn`) && (t === `error` ? console.error : console.warn)(Iv(`[workflow-sdk]`, i, c)), Db(n, process.env.DEBUG) && (console.debug(`[${n}] ${i}`, c ?? ``), xb().then((n) => { n?.addEvent(`${t}.${e}`, { message: i, ...c }); }).catch(() => {})); }; }; return { debug: a(`debug`), info: a(`info`), warn: a(`warn`), error: a(`error`), child: (e) => n({ ...r, ...e }), forRun: (e, t, i) => n({ ...r, workflowRunId: e, ...t === void 0 ? {} : { workflowName: t }, ...i ?? {} }) }; }; return n({}); } const kb = Ob(`step`); const Ab = Ob(`runtime`); const jb = Ob(`webhook`); const Mb = Ob(`events`); Ob(`adapter`), Ob(`build`, { debugNamespace: `workflow:build` }); function Nb(e) { if (p$11.is(e)) throw e; } function Pb(e, t) { let n = e.includes(`return value`) ? `returning` : `passing`, r = `Failed to serialize ${e}`; t instanceof qg$1 && t.path && (r += ` at path "${t.path}"`); let i = `Ensure you're ${n} workflow serializable types. Check the serialization docs to see what's serializable: https://workflow-sdk.dev/docs/foundations/serialization`; return t instanceof qg$1 && t.value !== void 0 && Ab.error(`Serialization failed`, { context: e, problematicValue: t.value }), { message: r, hint: i }; } async function Fb(e, t, n) { try { let r = pv$1.serialize(e, `client`, n); return Pv(await jv(gv$1(Q$9.DEVALUE_V1, r), n?.compression === !0, n?.compressionStats), t); } catch (e) { Nb(e); let { message: t, hint: n } = Pb(`client value`, e); throw new h$9(t, { hint: n, cause: e }); } } async function Ib(e, t, n) { let r = await Mv(await Fv(e, t), n?.compressionStats); if (!(r instanceof Uint8Array)) { if (pv$1.deserializeLegacy) return pv$1.deserializeLegacy(r, `client`, n); throw Error(`Cannot deserialize non-binary data without legacy support`); } let { format: i, payload: a } = vv$1(r); if (i === Q$9.DEVALUE_V1) return pv$1.deserialize(a, `client`, n); throw Error(`Unsupported serialization format: ${i}`); } async function Lb(e, t, n) { try { let r = pv$1.serialize(e, `step`, n); return Pv(await jv(gv$1(Q$9.DEVALUE_V1, r), n?.compression === !0, n?.compressionStats), t); } catch (e) { Nb(e); let { message: t, hint: n } = Pb(`step value`, e); throw new h$9(t, { hint: n, cause: e }); } } async function Rb(e, t, n) { let r = await Mv(await Fv(e, t), n?.compressionStats); if (!(r instanceof Uint8Array)) { if (pv$1.deserializeLegacy) return pv$1.deserializeLegacy(r, `step`, n); throw Error(`Cannot deserialize non-binary data without legacy support`); } let { format: i, payload: a } = vv$1(r); if (i === Q$9.DEVALUE_V1) return pv$1.deserialize(a, `step`, n); throw Error(`Unsupported serialization format: ${i}`); } function zb(e, t) { if (!(e instanceof Uint8Array)) { if (pv$1.deserializeLegacy) return pv$1.deserializeLegacy(e, `workflow`, t); throw Error(`Cannot deserialize non-binary data without legacy support`); } let { format: n, payload: r } = vv$1(e); if (n === Q$9.DEVALUE_V1) return pv$1.deserialize(r, `workflow`, t); throw Error(`Unsupported serialization format: ${n}`); } const Bb = Symbol.for(`WORKFLOW_STEP_CONTEXT_STORAGE`); const Vb = globalThis[Bb] ?? (globalThis[Bb] = new AsyncLocalStorage()); function Hb(e, t, n) { if (e === 0 && t === 0 && n === 0) return null; let r = []; e > 0 && r.push(`${e} ${n$11(`step`, `steps`, e)}`), t > 0 && r.push(`${t} ${n$11(`hook`, `hooks`, t)}`), n > 0 && r.push(`${n} ${n$11(`timer`, `timers`, n)}`); let i = []; e > 0 && i.push(`steps are completed`), t > 0 && i.push(`hooks are received`), n > 0 && i.push(`timers have elapsed`); let o = i.join(` and `); return `${r.join(` and `)} to be enqueued\n Workflow will suspend and resume when ${o}`; } function Ub(e, t) { let n = `${e.replace(`wrun_`, `strm_`)}_user`; return t ? `${n}_${Buffer.from(t, `utf-8`).toString(`base64url`)}` : n; } function Wb(e) { return `strm_${e}_system_abort`; } function Gb(e) { if (!e.startsWith(`abrt_`)) throw Error(`Invalid abort hook token format: expected "abrt_" prefix, got "${e}"`); return Wb(e.slice(5)); } var Kb; (function(e) { e[e.Consumed = 0] = `Consumed`, e[e.NotConsumed = 1] = `NotConsumed`, e[e.Finished = 2] = `Finished`; })(Kb ||= {}); var qb = class { eventIndex; events = []; callbacks = []; onConsumedEvent; onUnconsumedEvent; getPromiseQueue; pendingUnconsumedCheck = null; pendingUnconsumedTimeout = null; unconsumedCheckVersion = 0; constructor(e, t) { this.events = e, this.eventIndex = 0, this.onConsumedEvent = t.onConsumedEvent, this.onUnconsumedEvent = t.onUnconsumedEvent, this.getPromiseQueue = t.getPromiseQueue; } subscribe(e) { this.callbacks.push(e), this.pendingUnconsumedCheck !== null && (this.unconsumedCheckVersion++, this.pendingUnconsumedCheck = null, this.pendingUnconsumedTimeout !== null && (clearTimeout(this.pendingUnconsumedTimeout), this.pendingUnconsumedTimeout = null)), process.nextTick(this.consume); } notifyConsumedEvent(e) { if (this.onConsumedEvent) try { this.onConsumedEvent(e); } catch (e) { Mb.error(`onConsumedEvent callback threw an error`, { error: e }); } } consume = () => { for (;;) { let e = this.events[this.eventIndex] ?? null; if (!this.consumeOne(e)) { this.handleUnconsumed(e); return; } } }; consumeOne(e) { for (let t = 0; t < this.callbacks.length; t++) { let n = this.callbacks[t], r = Kb.NotConsumed; try { r = n(e); } catch (e) { Mb.error(`EventConsumer callback threw an error`, { error: e }); } if (!(r !== Kb.Consumed && r !== Kb.Finished)) return e !== null && this.notifyConsumedEvent(e), this.eventIndex++, r === Kb.Finished && this.callbacks.splice(t, 1), e !== null; } return !1; } handleUnconsumed(e) { if (e !== null) { let t = ++this.unconsumedCheckVersion; this.pendingUnconsumedCheck = this.getPromiseQueue().then(() => new Promise((e) => setTimeout(e, 0))).then(() => this.getPromiseQueue()).then(() => { this.pendingUnconsumedTimeout = setTimeout(() => { this.pendingUnconsumedTimeout = null, this.unconsumedCheckVersion === t && (this.pendingUnconsumedCheck = null, this.onUnconsumedEvent(e)); }, 100); }); } } }; var Jb = class { aborted = !1; reason = void 0; [X$10]; [Z$9]; #e = []; #t = null; get onabort() { return this.#t; } set onabort(e) { this.#t = e, e && this.aborted && e.call(this); } constructor(e, t) { this[X$10] = e, this[Z$9] = t; } _setAborted(e) { if (!this.aborted) { this.aborted = !0, this.reason = e, this.#t && this.#t.call(this); for (let e of this.#e) e(); this.#e = []; } } addEventListener(e, t) { if (e === `abort`) { if (this.aborted) { t(); return; } this.#e.push(t); } } removeEventListener(e, t) { e === `abort` && (this.#e = this.#e.filter((e) => e !== t)); } throwIfAborted() { if (this.aborted) throw this.reason ?? new DOMException(`The operation was aborted.`, `AbortError`); } }; function Yb(e) { return class { signal; [X$10]; [Z$9]; constructor() { let t = e.generateUlid(), n = Wb(t), r = `abrt_${t}`; this[X$10] = n, this[Z$9] = r, this.signal = new Jb(n, r); let i = `hook_${e.generateUlid()}`; e.invocationsQueue.set(i, { type: `hook`, correlationId: i, token: r, isWebhook: !1, isSystem: !0 }), e.eventsConsumer.subscribe((t) => { if (!t || t.correlationId !== i) return Kb.NotConsumed; let n = `eventData` in t && t.eventData && `token` in t.eventData ? t.eventData.token : void 0; if (typeof n == `string` && n !== this[Z$9]) return e.promiseQueue = e.promiseQueue.then(() => { e.onWorkflowError(new f$8(`Replay divergence: abort hook event ${t.eventType} for ${i} belongs to token "${n}", but the current abort hook expects "${this[Z$9]}"`, { eventId: t.eventId })); }), Kb.Finished; if (t.eventType === `hook_created`) { let t = e.invocationsQueue.get(i); return t && t.type === `hook` && (t.hasCreatedEvent = !0), Kb.Consumed; } if (t.eventType === `hook_received`) { let n = t.eventData?.payload; return e.pendingDeliveries++, e.promiseQueue = e.promiseQueue.then(async () => { let t; try { if (n !== void 0) try { let r = await zx(n, e.runId, e.encryptionKey, e.globalThis); r && typeof r == `object` && `reason` in r && (t = r.reason); } catch {} this.signal._setAborted(t); } finally { e.pendingDeliveries--; } }), e.invocationsQueue.delete(i), Kb.Consumed; } return t.eventType === `hook_disposed` ? (e.invocationsQueue.delete(i), Kb.Finished) : Kb.NotConsumed; }); } abort(t) { if (!this.signal.aborted) { this.signal._setAborted(t); for (let [, n] of e.invocationsQueue) if (n.type === `hook` && n.token === this[Z$9]) { n.abortRequested = !0, n.abortReason = t; break; } } } }; } function Xb() { return { abort(e) { let t = new Jb(``, ``); return t._setAborted(e ?? new DOMException(`The operation was aborted.`, `AbortError`)), t; }, any(e) { let t = new Jb(``, ``), n = Array.from(e); for (let e of n) if (e.aborted) return t._setAborted(e.reason), t; let r = [], i = () => { for (let { signal: e, listener: t } of r) e.removeEventListener && e.removeEventListener(`abort`, t); r.length = 0; }; for (let e of n) { if (!e.addEventListener) continue; let n = () => { t.aborted || (t._setAborted(e.reason), i()); }; r.push({ signal: e, listener: n }), e.addEventListener(`abort`, n); } return t; }, timeout() { throw Error(`AbortSignal.timeout() is not supported in workflow functions. Use sleep() with an AbortController instead. See: /docs/errors/abort-signal-timeout-in-workflow`); } }; } const Zb = Ih$1(); function Qb(e) { try { return e.getReader({ mode: `byob` }).releaseLock(), `bytes`; } catch {} } function $b(e) { return Nb(e), e instanceof h$9 && e.cause !== void 0 || e instanceof u$10 && e.cause !== void 0 ? e.cause : e; } async function ex(e, t) { if (e.recorded) try { let n = await xb(); if (!n) return; let r = e.uncompressedBytes ?? 0, i = e.storedBytes ?? 0; n.setAttributes({ ...Xy(t), ...Zy(e.compressed ?? !1), ...Qy(e.codec ?? `none`), ...$y(r), ...eb(i), ...e.compressed && r > 0 ? tb(1 - i / r) : {} }); } catch {} } function tx(e, t) { let n = new TextEncoder(), r = { resolved: !1, key: void 0 }; return new TransformStream({ async transform(i, a) { try { r.resolved ||= (r.key = await Nv(t), !0); let o = l_$1(i, e), s = n.encode(o), c = gv$1(Q$9.DEVALUE_V1, s); if (r.key) { let e = await m_$1(r.key, c); c = gv$1(Q$9.ENCRYPTED, e); } let l = new Uint8Array(4 + c.length); new DataView(l.buffer).setUint32(0, c.length, !1), l.set(c, 4), a.enqueue(l); } catch (e) { if (p$11.is(e)) { a.error(e); return; } let { message: t, hint: n } = Pb(`stream chunk`, e); a.error(new h$9(t, { hint: n, cause: e })); } } }); } function nx(e, t) { let n = new TextDecoder(), r = /* @__PURE__ */ new Uint8Array(), i = { resolved: !1, key: void 0 }; function a(e) { let t = new Uint8Array(r.length + e.length); t.set(r, 0), t.set(e, r.length), r = t; } async function o(a) { for (i.resolved ||= (i.key = await Nv(t), !0); r.length >= 4;) { let t = new DataView(r.buffer, r.byteOffset, r.byteLength).getUint32(0, !1); if (r.length < 4 + t) break; let o = r.slice(4, 4 + t); r = r.slice(4 + t); let { format: s, payload: c } = vv$1(o); if (s === Q$9.ENCRYPTED) { if (!i.key) { a.error(new p$11(`Encrypted stream data encountered but no encryption key is available. Encryption is not configured or no key was provided for this run.`, { context: { operation: `decrypt`, byteLength: c.byteLength, formatPrefix: `encr` } })); return; } let e; try { e = await h_$1(i.key, c); } catch (e) { throw p$11.is(e) && e.context && (e.context.formatPrefix = s), e; } ({format: s, payload: c} = vv$1(e)); } if (s === Q$9.DEVALUE_V1) { let t = n.decode(c); a.enqueue(s_$1(t, e)); } } } return new TransformStream({ async transform(t, i) { if (r.length === 0 && t.length >= 4) { let e = new DataView(t.buffer, t.byteOffset, t.byteLength).getUint32(0, !1); if (e > 0 && e < 1e8) { a(t), await o(i); return; } } else if (r.length > 0) { a(t), await o(i); return; } let s = n.decode(t).split(` `); for (let t of s) t.length > 0 && i.enqueue(s_$1(t, e)); }, async flush(e) { r.length > 0 && await o(e); } }); } const rx = 1e8; function ix() { return new TransformStream({ transform(e, t) { if (e.length === 0) return; if (e.length > rx) { t.error(new u$10(`Byte-stream chunk of ${e.length} bytes exceeds the maximum framed chunk size (${rx}). Split the data into smaller chunks before writing.`, { slug: `serialization-failed` })); return; } let n = new Uint8Array(4 + e.length); new DataView(n.buffer).setUint32(0, e.length, !1), n.set(e, 4), t.enqueue(n); } }); } function ax() { let e = /* @__PURE__ */ new Uint8Array(); function t(t) { let n = new Uint8Array(e.length + t.length); n.set(e, 0), n.set(t, e.length), e = n; } return new TransformStream({ transform(n, r) { for (n.length > 0 && t(n); e.length >= 4;) { let t = new DataView(e.buffer, e.byteOffset, e.byteLength).getUint32(0, !1); if (t > rx) { r.error(new u$10(`Byte-stream frame length ${t} exceeds maximum (${rx}). This usually means a non-framed byte stream is being read as framed.`, { slug: `serialization-failed` })); return; } let n = 4 + t; if (e.length < n) break; r.enqueue(e.slice(4, n)), e = e.slice(n); } }, flush(t) { e.length > 0 && t.error(new u$10(`Byte-stream ended with ${e.length} bytes of incomplete frame data. The stream was truncated mid-frame.`, { slug: `serialization-failed` })); } }); } var ox = class extends ReadableStream { #e; constructor(e, t, n) { if (typeof t != `string` || t.length === 0) throw new u$10(`"name" is required, got "${t}"`); super({ type: `bytes`, pull: async (r) => { let i = this.#e; if (!i) { let r = await (await T_$1()).streams.get(e, t, n); i = this.#e = r.getReader(); } if (!i) { r.error(Error(`Failed to get reader`)); return; } let a = await i.read(); a.done ? (this.#e = void 0, r.close()) : r.enqueue(a.value); }, cancel: async (e) => { this.#e &&= (await this.#e.cancel(e).catch(() => {}), void 0); } }); } }; function sx(e, t, n) { let r = n === void 0 || n >= 0, i = n ?? 0, a = 0, o = 0, s = 0, c, l = /* @__PURE__ */ new Uint8Array(); async function u() { let o = await T_$1(), s = r ? i + a : n; c = (await o.streams.get(e, t, s)).getReader(); } async function d() { for (c &&= (await c.cancel().catch(() => {}), void 0), i += a, a = 0, l = /* @__PURE__ */ new Uint8Array();;) { if (o++, s++, o > 50) throw Error(`Stream "${t}" exceeded maximum reconnection attempts (50)`); if (s > 1e3) throw Error(`Stream "${t}" exceeded maximum total reconnection attempts (1000)`); try { await u(); return; } catch {} } } return new ReadableStream({ pull: async (e) => { for (;;) { if (!c) try { await u(); } catch (t) { e.error(t); return; } let t; try { t = await c.read(); } catch (t) { if (!r) { e.error(t); return; } try { await d(); } catch (t) { e.error(t); return; } continue; } if (t.done || !t.value) { c = void 0, e.close(); return; } let n = t.value; if (n.length > 0) { let e = new Uint8Array(l.length + n.length); e.set(l, 0), e.set(n, l.length), l = e; } let i = !1; for (; l.length >= 4;) { let t = 4 + new DataView(l.buffer, l.byteOffset, l.byteLength).getUint32(0, !1); if (l.length < t) break; e.enqueue(l.slice(0, t)), l = l.slice(t), a++, i = !0; } if (i) { o = 0; return; } } }, cancel: async () => { c &&= (await c.cancel().catch((e) => { console.warn(`Error closing ReadableStream reader:`, e); }), void 0); } }); } var cx = class extends WritableStream { constructor(e, t) { if (typeof e != `string`) throw new u$10(`"runId" must be a string, got "${typeof e}"`); if (typeof t != `string` || t.length === 0) throw new u$10(`"name" is required, got "${t}"`); let n = T_$1(), r = [], i = null, a = null, o, s = async () => { if (i &&= (clearTimeout(i), null), r.length === 0) return; let a = r.slice(), s = await n; if (o === void 0 && (o = s.streamFlushIntervalMs ?? 10), typeof s.streams.writeMulti == `function` && a.length > 1) await s.streams.writeMulti(e, t, a); else for (let n of a) await s.streams.write(e, t, n); r = []; }, c = [], l = () => { i ||= setTimeout(() => { i = null; let e = c; c = [], a = s().then(() => { for (let t of e) t.resolve(); }, (t) => { for (let n of e) n.reject(t); }); }, o ?? 10); }; super({ async write(e) { a &&= (await a, null), r.push(e), l(), await new Promise((e, t) => { c.push({ resolve: e, reject: t }); }); }, async close() { a &&= (await a, null), await s(), await (await n).streams.close(e, t); }, abort(e) { i &&= (clearTimeout(i), null), r = []; let t = c; c = []; let n = e ?? Error(`Stream aborted`); for (let e of t) e.reject(n); } }); } }; function lx(e = globalThis) { return { ...J_$1(), ...ov$1(), ...iv$1(e), Request: (t) => { if (!(t instanceof e.Request)) return !1; let n = { method: t.method, url: t.url, headers: t.headers, body: t.body, duplex: t.duplex }, r = t[B_$1]; return r && (n.responseWritable = r), t.signal && (t.signal.aborted || t.signal[X$10]) && (n.signal = t.signal), n; }, Response: (t) => t instanceof e.Response ? { type: t.type, url: t.url, status: t.status, statusText: t.statusText, headers: t.headers, body: t.body, redirected: t.redirected } : !1 }; } function ux(e, t, n, r, i, a) { let o = t[X$10], s = t[Z$9]; if (!o) { let e = (n[N_$1] || Zb)(); o = Wb(e), s = `abrt_${e}`, t[X$10] = o, t[Z$9] = s, t.signal && (t.signal[X$10] = o, t.signal[Z$9] = s); } return fx(e, o, i, a, r), { streamName: o, hookToken: s, aborted: e.aborted, reason: e.aborted ? e.reason : void 0 }; } function dx(e, t) { let n = t[X$10] ?? t.signal?.[X$10], r = t[Z$9] ?? t.signal?.[Z$9]; if (!n) throw Error(`AbortController/AbortSignal stream name is not set`); return { streamName: n, hookToken: r, aborted: e.aborted, reason: e.aborted ? e.reason : void 0 }; } function fx(e, t, n, r, i) { e.aborted || e[H_$1] || (e[H_$1] = !0, e.addEventListener(`abort`, () => { i.push((async () => { try { let i = await Nv(r), a = await Mx({ aborted: !0, reason: e.reason }, n, i), o = new cx(n, t).getWriter(); await o.write(a), await o.close(); } catch {} })()); }, { once: !0 })); } function px(e = globalThis, t, n, r, i = !1) { return { ...lx(e), ReadableStream: (a) => { if (!(a instanceof e.ReadableStream)) return !1; if (a.locked) throw new h$9(`ReadableStream is locked and cannot be passed across a workflow boundary.`, { hint: `Pass the stream before calling .getReader() / .pipeThrough() / .pipeTo(), or tee it with .tee() and pass one of the branches.` }); let o = `strm_${(e[N_$1] || Zb)()}`, s = Qb(a), c = new cx(n, o); s === `bytes` ? i ? t.push(a.pipeThrough(ix()).pipeTo(c)) : t.push(a.pipeTo(c)) : t.push(a.pipeThrough(tx(px(e, t, n, r, i), r)).pipeTo(c)); let l = { name: o }; return s && (l.type = s), s === `bytes` && i && (l.framing = `framed-v1`), l; }, WritableStream: (r) => { if (!(r instanceof e.WritableStream)) return !1; let i = r[P_$1], a = r[L_$1]; if (typeof i == `string` && typeof a == `string`) { let e = { name: i, runId: a }, t = r[R_$1]; return typeof t == `string` && (e.deploymentId = t), e; } let o = `strm_${(e[N_$1] || Zb)()}`, s = new ox(n, o); return t.push(s.pipeTo(r)), { name: o }; }, AbortController: (i) => !e.AbortController || typeof e.AbortController != `function` || !(i instanceof e.AbortController) ? !1 : ux(i.signal, i, e, t, n, r), AbortSignal: (i) => !e.AbortSignal || typeof e.AbortSignal != `function` || !(i instanceof e.AbortSignal) ? !1 : ux(i, i, e, t, n, r) }; } function mx(e = globalThis) { return { ...lx(e), ReadableStream: (t) => { if (!(t instanceof e.ReadableStream)) return !1; let n = t[z_$1]; if (n !== void 0) return { bodyInit: n }; let r = t[P_$1]; if (!r) throw new u$10("ReadableStream `name` is not set"); let i = { name: r }, a = t[F_$1]; a && (i.type = a); let o = t[I_$1]; return o && (i.framing = o), i; }, WritableStream: (t) => { if (!(t instanceof e.WritableStream)) return !1; let n = t[P_$1]; if (!n) throw new u$10("WritableStream `name` is not set"); let r = { name: n }, i = t[L_$1]; typeof i == `string` && (r.runId = i); let a = t[R_$1]; return typeof a == `string` && (r.deploymentId = a), r; }, AbortController: (t) => { if (!t || !t.signal) return !1; let n = t, r = n[X$10] ?? n.signal?.[X$10], i = e.AbortController && typeof e.AbortController == `function` && t instanceof e.AbortController; return !r && !i ? !1 : dx(t.signal, n); }, AbortSignal: (t) => { let n = t?.[X$10], r = e.AbortSignal && typeof e.AbortSignal == `function` && t instanceof e.AbortSignal; return !n && !r ? !1 : dx(t, t); } }; } function hx(e = globalThis, t, n, r, i = !1) { return { ...lx(e), ReadableStream: (a) => { if (!(a instanceof e.ReadableStream)) return !1; if (a.locked) throw new h$9(`ReadableStream is locked and cannot be passed across a workflow boundary.`, { hint: `Pass the stream before calling .getReader() / .pipeThrough() / .pipeTo(), or tee it with .tee() and pass one of the branches.` }); let o = a[P_$1], s = a[F_$1], c = a[I_$1]; if (!o) { o = `strm_${(e[N_$1] || Zb)()}`, s = Qb(a), c = s === `bytes` && i ? `framed-v1` : c; let l = new cx(n, o); s === `bytes` ? c === `framed-v1` ? t.push(a.pipeThrough(ix()).pipeTo(l)) : t.push(a.pipeTo(l)) : t.push(a.pipeThrough(tx(hx(e, t, n, r, i), r)).pipeTo(l)); } let l = { name: o }; return s && (l.type = s), c && (l.framing = c), l; }, WritableStream: (i) => { if (!(i instanceof e.WritableStream)) return !1; let a = i[P_$1], o = i[L_$1]; a || (a = `strm_${(e[N_$1] || Zb)()}`, t.push(new ox(n, a).pipeThrough(nx(Tx(e, t, n, r), r)).pipeTo(i))); let s = { name: a }; typeof o == `string` && (s.runId = o); let c = i[R_$1]; return typeof c == `string` && (s.deploymentId = c), s; }, AbortController: (i) => !e.AbortController || typeof e.AbortController != `function` || !(i instanceof e.AbortController) ? !1 : ux(i.signal, i, e, t, n, r), AbortSignal: (i) => !e.AbortSignal || typeof e.AbortSignal != `function` || !(i instanceof e.AbortSignal) ? !1 : ux(i, i, e, t, n, r) }; } function gx(e, t, n, r) { let i = new AbortController(); return r.push((async () => { try { let r = new ox(t, n).getReader(), a = await Promise.race([r.read(), new Promise((e) => { if (i.signal.aborted) { e({ value: void 0, done: !0 }); return; } i.signal.addEventListener(`abort`, () => e({ value: void 0, done: !0 }), { once: !0 }); })]); if (r.releaseLock(), a.value && !a.done) try { let n = Vb.getStore(), r = await Nx(a.value, t, n?.encryptionKey); e.abort(r?.reason); } catch { e.abort(); } } catch {} })()), i; } function _x(e, t, n) { let r = e, i = e.signal; r[X$10] = t.streamName, r[Z$9] = t.hookToken, i[X$10] = t.streamName, i[Z$9] = t.hookToken, n && (r[U_$1] = n, i[U_$1] = n); } function vx(e, t) { let n = e, r = t; n[X$10] !== void 0 && (r[X$10] = n[X$10]), n[Z$9] !== void 0 && (r[Z$9] = n[Z$9]), n[U_$1] !== void 0 && (r[U_$1] = n[U_$1]); } function yx(e, t, n) { let r = new AbortController(); e.aborted ? (_x(r, e), r.abort(e.reason)) : e.streamName ? _x(r, e, gx(r, n, e.streamName, t)) : _x(r, e); let i = r.abort.bind(r); return r.abort = (t) => { if (r.signal.aborted) return; i(t); let n = Vb.getStore(); if (n && (n.ops.push((async () => { try { let r = await Mx({ aborted: !0, reason: t }, n.workflowMetadata.workflowRunId, n.encryptionKey), i = new cx(n.workflowMetadata.workflowRunId, e.streamName).getWriter(); await i.write(r), await i.close(); } catch {} })()), e.hookToken)) { let r = (async () => { try { let { resumeHook: n } = await Promise.resolve().then(() => resume_hook_CUCPW67D_exports).then((e) => e.i); await n(e.hookToken, { aborted: !0, reason: t }); } catch {} })(); n.preCompletionOps.push(r); } }, r; } function bx(e, t, n) { let r = new AbortController(); return e.aborted ? (_x(r, e), r.abort(e.reason)) : e.streamName ? _x(r, e, gx(r, n, e.streamName, t)) : _x(r, e), r.signal; } function xx(e = globalThis) { return { ...Y_$1(e), ...av$1(e) }; } async function Sx(e, t) { let n = await T_$1(); if (!n.getEncryptionKeyForRun) return; let r = t ? await n.getEncryptionKeyForRun(e, { deploymentId: t }) : await n.getEncryptionKeyForRun(await n.runs.get(e)); return r ? await p_$1(r, [`encrypt`]) : void 0; } function Cx(e = globalThis, t, n, r) { return { ...xx(e), StepFunction: () => { throw new h$9(`Step functions cannot be deserialized in client context. Step functions should not be returned from workflows.`, { hint: `A step function reference reached the client. Return a serializable value (e.g. the step result) instead of the step itself.` }); }, WorkflowFunction: (e) => Object.assign(() => { throw new h$9(`Workflow functions cannot be called directly. Use start() to invoke them.`, { hint: "Wrap the workflow with `start(workflowFn, { ... })` from `workflow` to begin a run instead of invoking it like a normal function." }); }, { workflowId: e.workflowId }), Request: (t) => { let n = { method: t.method, headers: new e.Headers(t.headers), body: t.body, duplex: t.duplex }; t.signal && (n.signal = t.signal); let r = new e.Request(t.url, n); return t.signal && vx(t.signal, r.signal), r; }, Response: (t) => new e.Response(t.body, { status: t.status, statusText: t.statusText, headers: new e.Headers(t.headers) }), ReadableStream: (i) => { if (`bodyInit` in i) { let t = i.bodyInit; return new e.Response(t).body; } if (i.type === `bytes`) { let r = new ox(n, i.name, i.startIndex), a = g_$1(); t.push(a.promise); let { readable: o, writable: s } = i.framing === `framed-v1` ? ax() : new e.TransformStream(); return x_$1(r, s, a).catch(() => {}), b_$1(o, a), o; } else { let a = sx(n, i.name, i.startIndex), o = nx(Cx(e, t, n, r), r), s = g_$1(); return t.push(s.promise), x_$1(a, o.writable, s).catch(() => {}), b_$1(o.readable, s), o.readable; } }, WritableStream: (i) => { let a = typeof i.runId == `string` ? i.runId : n, o = a === n ? r : Sx(a, i.deploymentId), s = tx(px(e, t, a, o), o), c = new cx(a, i.name), l = g_$1(); return t.push(l.promise), x_$1(s.readable, c, l).catch(() => {}), y_$1(s.writable, l), Object.defineProperty(s.writable, P_$1, { value: i.name, writable: !1 }), Object.defineProperty(s.writable, L_$1, { value: a, writable: !1 }), typeof i.deploymentId == `string` && Object.defineProperty(s.writable, R_$1, { value: i.deploymentId, writable: !1 }), s.writable; }, AbortController: (e) => yx(e, t, n), AbortSignal: (e) => bx(e, t, n) }; } function wx(e = globalThis) { return { ...xx(e), ...sv$1(e), Request: (t) => { Object.setPrototypeOf(t, e.Request.prototype); let n = t.responseWritable; return n && (t[B_$1] = n, delete t.responseWritable, t.respondWith = () => { throw new h$9("`respondWith()` must be called from within a step function.", { hint: "Move the `respondWith(...)` call inside a `\"use step\"` function — it cannot be invoked from a workflow context." }); }), t; }, WorkflowFunction: (e) => Object.assign(() => { throw new h$9(`Workflow functions cannot be called directly. Use start() to invoke them.`, { hint: "Wrap the workflow with `start(workflowFn, { ... })` from `workflow` to begin a run instead of invoking it like a normal function." }); }, { workflowId: e.workflowId }), Response: (t) => (Object.setPrototypeOf(t, e.Response.prototype), t), ReadableStream: (t) => `bodyInit` in t ? Object.create(e.ReadableStream.prototype, { [z_$1]: { value: t.bodyInit, writable: !1 } }) : Object.create(e.ReadableStream.prototype, { [P_$1]: { value: t.name, writable: !1 }, [F_$1]: { value: t.type, writable: !1 }, [I_$1]: { value: t.framing, writable: !1 } }), WritableStream: (t) => { let n = { [P_$1]: { value: t.name, writable: !1 } }; return typeof t.runId == `string` && (n[L_$1] = { value: t.runId, writable: !1 }), typeof t.deploymentId == `string` && (n[R_$1] = { value: t.deploymentId, writable: !1 }), Object.create(e.WritableStream.prototype, n); }, AbortController: (e) => { let t = new Jb(e.streamName, e.hookToken); return e.aborted && t._setAborted(e.reason), { [X$10]: e.streamName, [Z$9]: e.hookToken, signal: t, abort: () => {} }; }, AbortSignal: (e) => { let t = new Jb(e.streamName, e.hookToken); return e.aborted && t._setAborted(e.reason), t; } }; } function Tx(e = globalThis, t, n, r, i) { return { ...xx(e), StepFunction: (e) => { let t = e.stepId, n = e.closureVars, r = `boundThis` in e, i = r ? e.boundThis : void 0, a = Array.isArray(e.boundArgs) ? e.boundArgs : [], o = c$8(t); if (!o) throw new h$9(`Step function "${t}" not found. Make sure the step function is registered.`, { hint: `Make sure the step file is included in your build (i.e. it is listed in the workflow manifest), and that the SWC plugin is configured for the file.` }); if (!n && !r && a.length === 0) return o; let s = function(...e) { let t = r ? i : this, s = a.length > 0 ? [...a, ...e] : e; if (n) { let e = Vb.getStore(); if (!e) throw new u$10(`Cannot call step function with closure variables outside step context`); let r = { ...e, closureVars: n }; return Vb.run(r, () => o.apply(t, s)); } return o.apply(t, s); }; return Object.defineProperty(s, "name", { value: o.name }), Object.defineProperty(s, "stepId", { value: t, writable: !1, enumerable: !1, configurable: !1 }), o.maxRetries !== void 0 && (s.maxRetries = o.maxRetries), s; }, WorkflowFunction: (e) => Object.assign(() => { throw new h$9(`Workflow functions cannot be called directly. Use start() to invoke them.`, { hint: "Wrap the workflow with `start(workflowFn, { ... })` from `workflow` to begin a run instead of invoking it like a normal function." }); }, { workflowId: e.workflowId }), Request: (t) => { let n = t.responseWritable, r = { method: t.method, headers: new e.Headers(t.headers), body: t.body, duplex: t.duplex }; t.signal && (r.signal = t.signal); let i = new e.Request(t.url, r); return t.signal && vx(t.signal, i.signal), n && (i.respondWith = async (e) => { let t = n.getWriter(); await t.write(e), await t.close(); }), i; }, Response: (t) => new e.Response(t.body, { status: t.status, statusText: t.statusText, headers: new e.Headers(t.headers) }), ReadableStream: (a) => { if (`bodyInit` in a) { let t = a.bodyInit; return new e.Response(t).body; } let o = new ox(n, a.name); if (a.type === `bytes`) { let n = g_$1(); t.push(n.promise); let { readable: r, writable: i } = a.framing === `framed-v1` ? ax() : new e.TransformStream(); return x_$1(o, i, n).catch(() => {}), b_$1(r, n), r; } else { let a = nx(Tx(e, t, n, r, i), r), s = g_$1(); return t.push(s.promise), x_$1(o, a.writable, s).catch(() => {}), b_$1(a.readable, s), a.readable; } }, WritableStream: (a) => { let o = typeof a.runId == `string` ? a.runId : n, s = typeof a.deploymentId == `string` ? a.deploymentId : o === n ? i : void 0, c = o === n ? r : Sx(o, s), l = tx(hx(e, t, o, c), c), u = new cx(o, a.name), d = g_$1(); return t.push(d.promise), x_$1(l.readable, u, d).catch(() => {}), y_$1(l.writable, d), Object.defineProperty(l.writable, P_$1, { value: a.name, writable: !1 }), Object.defineProperty(l.writable, L_$1, { value: o, writable: !1 }), s && Object.defineProperty(l.writable, R_$1, { value: s, writable: !1 }), l.writable; }, AbortController: (e) => yx(e, t, n), AbortSignal: (e) => bx(e, t, n) }; } async function Ex(e, t) { return await Pv(e, t); } async function Dx(e, t) { return Fv(e, t); } async function Ox(e, t, n, r = [], i = globalThis, a = !1, o = !1, s = !1) { if (a) return $_$1(l_$1(e, px(i, r, t, n, o))); try { let a = {}, c = await Fb(e, n, { global: i, extraReducers: Vx(px(i, r, t, n, o)), compression: s, compressionStats: a }); return await ex(a, `serialize`), c; } catch (e) { let t = $b(e), { message: n, hint: r } = Pb(`workflow arguments`, t); throw new h$9(n, { hint: r, cause: t }); } } async function kx(e, t, n, r = globalThis, i = {}) { let a = {}, o = await Mv(await Dx(e, n), a); return await ex(a, `deserialize`), zb(o, { global: r, extraRevivers: { ...Hx(wx(r)), ...i } }); } async function Ax(e, t, n, r = globalThis, i = !1, a = !1) { if (i) return $_$1(l_$1(e, mx(r))); try { let t = {}, i = await Lb(e, n, { global: r, extraReducers: Vx(mx(r)), compression: a, compressionStats: t }); return await ex(t, `serialize`), i; } catch (e) { let t = $b(e), { message: n, hint: r } = Pb(`workflow return value`, t); throw new h$9(n, { hint: r, cause: t }); } } async function jx(e, t, n, r = [], i = globalThis, a = {}) { let o = {}, s = await Ib(e, n, { global: i, extraRevivers: { ...Hx(Cx(i, r, t, n)), ...a }, compressionStats: o }); return await ex(o, `deserialize`), s; } async function Mx(e, t, n, r = globalThis, i = !1, a = !1) { if (i) return $_$1(l_$1(e, mx(r))); try { let t = {}, i = await Lb(e, n, { global: r, extraReducers: Vx(mx(r)), compression: a, compressionStats: t }); return await ex(t, `serialize`), i; } catch (e) { let t = $b(e), { message: n, hint: r } = Pb(`step arguments`, t); throw new h$9(n, { hint: r, cause: t }); } } async function Nx(e, t, n, r = [], i = globalThis, a = {}, o) { let s = {}, c = await Rb(e, n, { global: i, extraRevivers: { ...Hx(Tx(i, r, t, n, o)), ...a }, compressionStats: s }); return await ex(s, `deserialize`), c; } async function Px(e, t, n, r = [], i = globalThis, a = !1, o = !1, s = !1) { if (a) return $_$1(l_$1(e, hx(i, r, t, n, o))); try { let a = {}, c = await Lb(e, n, { global: i, extraReducers: Vx(hx(i, r, t, n, o)), compression: s, compressionStats: a }); return await ex(a, `serialize`), c; } catch (e) { let t = $b(e), { message: n, hint: r } = Pb(`step return value`, t); throw new h$9(n, { hint: r, cause: t }); } } async function Fx(e, t, n, r = [], i = globalThis, a = !1) { try { let o = l_$1(e, hx(i, r, t, n)), s = new TextEncoder().encode(o), c = gv$1(Q$9.DEVALUE_V1, s), l = {}, u = await Ex(await jv(c, a, l), n); return await ex(l, `serialize`), u; } catch (e) { let t = $b(e), { message: n, hint: r } = Pb(`step error`, t); throw new h$9(n, { hint: r, cause: t }); } } async function Ix(e, t, n, r = globalThis, i = {}) { let a = {}, o = await Mv(await Dx(e, n), a); if (await ex(a, `deserialize`), !(o instanceof Uint8Array)) return c_$1(o, { ...wx(r), ...i }); let { format: s, payload: c } = vv$1(o); if (s === Q$9.DEVALUE_V1) return s_$1(new TextDecoder().decode(c), { ...wx(r), ...i }); throw Error(`Unsupported serialization format: ${s}`); } async function Lx(e, t, n, r = globalThis, i = !1) { try { let t = l_$1(e, mx(r)), a = new TextEncoder().encode(t), o = gv$1(Q$9.DEVALUE_V1, a), s = {}, c = await Ex(await jv(o, i, s), n); return await ex(s, `serialize`), c; } catch (e) { let t = $b(e), { message: n, hint: r } = Pb(`run error`, t); throw new h$9(n, { hint: r, cause: t }); } } async function Rx(e, t, n, r = [], i = globalThis, a = {}) { let o = {}, s = await Mv(await Dx(e, n), o); if (await ex(o, `deserialize`), !(s instanceof Uint8Array)) return c_$1(s, { ...Cx(i, r, t, n), ...a }); let { format: c, payload: l } = vv$1(s); if (c === Q$9.DEVALUE_V1) return s_$1(new TextDecoder().decode(l), { ...Cx(i, r, t, n), ...a }); throw Error(`Unsupported serialization format: ${c}`); } async function zx(e, t, n, r = globalThis, i = {}) { let a = {}, o = await Mv(await Dx(e, n), a); return await ex(a, `deserialize`), zb(o, { global: r, extraRevivers: { ...Hx(wx(r)), ...i } }); } const Bx = [ `ReadableStream`, `WritableStream`, `Request`, `Response`, `StepFunction`, `AbortController`, `AbortSignal` ]; function Vx(e) { let t = {}; for (let n of Bx) n in e && (t[n] = e[n]); return t; } function Hx(e) { let t = {}; for (let n of Bx) n in e && (t[n] = e[n]); return t; } const Ux = [ { format: Q$9.ENCRYPTED, minVersion: `4.2.0-beta.64` }, { format: Q$9.GZIP, minVersion: `5.0.0-beta.18` }, { format: Q$9.ZSTD, minVersion: `5.0.0-beta.18` } ]; const Wx = [{ capability: `framedByteStreams`, minVersion: `5.0.0-beta.15` }]; const Gx = /* @__PURE__ */ new Set([Q$9.DEVALUE_V1]); function Kx(e) { if (!e || !f_$1.default.valid(e)) return { supportedFormats: Gx, framedByteStreams: !1 }; let t = new Set(Gx); for (let { format: n, minVersion: r } of Ux) f_$1.default.gte(e, r) && t.add(n); let n = { supportedFormats: t, framedByteStreams: !1 }; for (let { capability: t, minVersion: r } of Wx) f_$1.default.gte(e, r) && (n[t] = !0); return n; } const qx = `5.0.0-beta.24`; const Jx = /^[a-zA-Z0-9_\-./@]+$/; function Yx(e, t) { if (!Jx.test(e)) throw Error(`Invalid workflow name "${e}": must only contain alphanumeric characters, underscores, hyphens, dots, forward slashes, or at signs`); return `${ah$1(`workflow`, ih$1(t))}${e}`; } const Xx = Ih$1(); function Zx(e) { return `__health_check__${e}`; } function Qx(e) { let t = fh$1.safeParse(e); if (t.success) return t.data; } function $x(e) { return `wrun_hc_${e}`; } async function eS(e, t, n) { let r = await T_$1(), i = Zx(e.correlationId), a = JSON.stringify({ healthy: !0, endpoint: t, correlationId: e.correlationId, specVersion: n ?? 5, workflowCoreVersion: qx, timestamp: Date.now() }), o = $x(e.correlationId); await r.streams.write(o, i, a), await r.streams.close(o, i); } async function tS(e, t) { let n = [], r = !1, i = !1; for (; !r && !i;) { let a = e.read(), o = new Promise((e) => setTimeout(() => { i = !0, e({ done: !0, value: void 0 }); }, t)), s = await Promise.race([a, o]); r = s.done, s.value && n.push(s.value); } return { chunks: n, timedOut: i }; } function nS(e) { if (e.length === 0) return null; let t = e.reduce((e, t) => e + t.length, 0), n = new Uint8Array(t), r = 0; for (let t of e) n.set(t, r), r += t.length; let i = new TextDecoder().decode(n), a; try { a = JSON.parse(i); } catch { return i.length > 0 ? { healthy: !0 } : null; } if (typeof a != `object` || !a || !(`healthy` in a) || typeof a.healthy != `boolean`) return null; let o = a, s = { healthy: o.healthy }; return typeof o.specVersion == `number` && (s.specVersion = o.specVersion), typeof o.workflowCoreVersion == `string` && (s.workflowCoreVersion = o.workflowCoreVersion), s; } async function rS(e, t, n) { let r = n?.timeout ?? 3e4, i = Xx(), a = Zx(i), o = `${ah$1(t, ih$1(n?.namespace))}health_check`, s = Date.now(); try { for (await e.queue(o, { __healthCheck: !0, correlationId: i }, { specVersion: 1, deploymentId: n?.deploymentId }); Date.now() - s < r;) try { let t = (await e.streams.get($x(i), a)).getReader(), { chunks: n, timedOut: r } = await tS(t, 500); if (r) { try { t.cancel(); } catch {} await new Promise((e) => setTimeout(e, 100)); continue; } let o = nS(n); if (o) return { ...o, latencyMs: Date.now() - s }; await new Promise((e) => setTimeout(e, 100)); } catch { await new Promise((e) => setTimeout(e, 100)); } return { healthy: !1, error: `Health check timed out after ${r}ms` }; } catch (e) { return { healthy: !1, error: e instanceof Error ? e.message : String(e) }; } } function iS(e, t) { return new s$8(`Event pagination ${t} for workflow run "${e}".`, { code: t$9.WORLD_CONTRACT_ERROR }); } function aS(e, t, n) { if (t) { if (n.has(t)) throw iS(e, `did not advance`); n.add(t); } } function oS(e, t, n) { for (let r of n) t.has(r.eventId) || (t.add(r.eventId), e.push(r)); } function sS(e, t, n, r) { if (t) { if (n === null) throw iS(e, `returned more pages without a cursor`); if (r.has(n)) throw iS(e, `repeated a cursor`); } } function cS(e, t, n) { return t !== null && !n && s$8.is(e) && e.status === 400; } async function lS(e, t) { let n = t !== void 0; return vb(n ? `workflow.loadNewEvents` : `workflow.loadEvents`, async (r) => { r?.setAttributes({ ...Jv(e) }); let i = [], a = /* @__PURE__ */ new Set(), o = /* @__PURE__ */ new Set(), s = t ?? null, c = !0, l = 0, u = !1, d = await T_$1(), f = Date.now(); for (; c;) { let t = Date.now(), r = s; aS(e, r, o); let f; try { f = await d.events.list({ runId: e, pagination: { sortOrder: `asc`, cursor: r ?? void 0 } }); } catch (t) { if (cS(t, r, u)) { Ab.warn(`Event cursor was rejected; retrying with a full event reload.`, { workflowRunId: e }), i.length = 0, a.clear(), o.clear(), s = null, u = !0; continue; } throw t; } oS(i, a, f.data), c = f.hasMore, sS(e, c, f.cursor, o), s = f.cursor ?? s, l++, Ab.debug(`Loaded event page`, { workflowRunId: e, incremental: n, page: l, pageEvents: f.data.length, totalEvents: i.length, hasMore: c, pageMs: Date.now() - t }); } return Ab.debug(`Event load complete`, { workflowRunId: e, incremental: n, totalEvents: i.length, pagesLoaded: l, totalMs: Date.now() - f }), r?.setAttributes({ ...Zv(i.length), ...Ky(l) }), { events: i, cursor: s }; }); } const uS = { "Access-Control-Allow-Origin": `*`, "Access-Control-Allow-Methods": `POST, OPTIONS, GET, HEAD`, "Access-Control-Allow-Headers": `Content-Type` }; function dS(e, t) { return async (n) => { let r = new URL(n.url); return r.searchParams.has(`__health`) ? n.method === `OPTIONS` ? new Response(null, { status: 204, headers: uS }) : new Response(JSON.stringify({ healthy: !0, endpoint: r.pathname, specVersion: t ?? 5, workflowCoreVersion: qx }), { status: 200, headers: { "Content-Type": `application/json`, ...uS } }) : await e(n); }; } async function fS(e, ...t) { let n = t[0]; await vb(`queue.publish`, { attributes: { ...ky(`vercel-queue`), ...Ay(n), ...My(`publish`), ...nb(`vercel-queue`), ...rb(`vercel-queue`), ...ib(`vqs`), ...ab(`publish`) }, kind: await Sb(`PRODUCER`) }, async (n) => { let { messageId: r } = await e.queue(...t); r && n?.setAttributes(jy(r)); }); } function pS(e) { if (e.requestedAt) try { return Ny(Date.now() - e.requestedAt.getTime()); } catch { return; } } function mS(e, t) { let n; return () => (n ||= (async () => { let n = await e.getEncryptionKeyForRun?.(t); return n ? await p_$1(n) : void 0; })(), n); } function hS(t) { Promise.resolve().then(() => functions_CnVBREsg_exports).then((t) => d$13(t.default, 1)).then(({ waitUntil: e }) => { e(t); }); } function gS(e, t) { hS(e.catch((e) => { if (!(e?.name === `AbortError` || e?.name === `ResponseAborted`)) try { t(e); } catch {} })); } async function _S(e) { let t = e(); return hS(t.catch(() => {})), t; } function vS(e, t = {}) { if (typeof e != `object` || !e || Array.isArray(e)) throw new D$10(`experimental_setAttributes requires a plain object, got ${e === null ? `null` : Array.isArray(e) ? `array` : typeof e}`); let n = Object.entries(e).map(([e, t]) => ({ key: e, value: t === void 0 ? null : t })); if (n.length === 0) return n; let r = t.allowReservedAttributes === !0; try { Am$1(n, { allowReservedAttributes: r }); } catch (e) { throw e instanceof Em$1 ? new D$10(e.message) : e; } return n; } //#endregion //#region node_modules/eve/dist/src/compiled/_chunks/workflow/resume-hook-CUCPW67D.js var resume_hook_CUCPW67D_exports = /* @__PURE__ */ __exportAll({ i: () => C$9, n: () => E$9, r: () => D$8, t: () => T$9 }); var C$9 = l$11({ getHookByToken: () => T$9, resumeHook: () => E$9, resumeWebhook: () => D$8 }); async function w$9(e) { let t = await T_$1(), n = await t.hooks.getByToken(e), r = await t.runs.get(n.runId), a = await t.getEncryptionKeyForRun?.(r), o = a ? await p_$1(a) : void 0; return n.metadata !== void 0 && (n.metadata = await Nx(n.metadata, n.runId, o)), { hook: n, run: r, encryptionKey: o }; } async function T$9(e) { let { hook: t } = await w$9(e); return t; } async function E$9(e, t, n) { return await _S(() => vb(`hook.resume`, async (r) => { let i = await T_$1(); try { let s, c, p; if (typeof e == `string`) { let t = await w$9(e); s = t.hook, c = t.run, p = n ?? t.encryptionKey; } else if (s = e, c = await i.runs.get(s.runId), n) p = n; else { let e = await i.getEncryptionKeyForRun?.(c); p = e ? await p_$1(e) : void 0; } r?.setAttributes({ ...Fy(s.token), ...Iy(s.hookId), ...Jv(s.runId) }); let g = c.executionContext?.workflowCoreVersion, v = Kx(typeof g == `string` ? g : void 0); v.supportedFormats.has(Q$9.ENCRYPTED) || (p = void 0); let C = (c.specVersion ?? 0) >= 5 && v.supportedFormats.has(Q$9.GZIP), T = [], E = bh$1(s.specVersion), D = await Px(t, s.runId, p, T, globalThis, E, v.framedByteStreams, C); gS(Promise.all(T), (e) => { e !== void 0 && Ab.warn(`Background flush of hook payload ops failed`, { workflowRunId: s.runId, hookId: s.hookId, error: e instanceof Error ? e.message : String(e) }); }), await i.events.create(s.runId, { eventType: `hook_received`, specVersion: 5, correlationId: s.hookId, eventData: { ...E ? {} : { token: s.token }, payload: D } }, { v1Compat: E }), r?.setAttributes({ ...Kv(c.workflowName) }); let O = await Tb(c.executionContext?.traceCarrier); return O && r?.addLink?.(O), await i.queue(Yx(c.workflowName), { runId: s.runId, traceCarrier: c.executionContext?.traceCarrier ?? void 0 }, { deploymentId: c.deploymentId, specVersion: c.specVersion ?? 1 }), s; } catch (t) { throw r?.setAttributes({ ...Fy(typeof e == `string` ? e : e.token), ...Ly(!1) }), t; } })); } async function D$8(e, i) { let { hook: a, encryptionKey: o } = await w$9(e); if (a.isWebhook === !1) throw new b$9(e); let s, c; if (a.metadata && typeof a.metadata == `object` && `respondWith` in a.metadata) if (a.metadata.respondWith === `manual`) { let { readable: e, writable: t } = new TransformStream(); c = e, i[B_$1] = t; } else if (a.metadata.respondWith instanceof Response) s = a.metadata.respondWith; else throw new u$10(`Invalid \`respondWith\` value: ${a.metadata.respondWith}`, { slug: a$10.WEBHOOK_INVALID_RESPOND_WITH_VALUE }); else s = new Response(null, { status: 202 }); if (await E$9(a, i, o), c) { let e = c.getReader(), t = await e.read(); t.value && (s = t.value), e.cancel(); } if (!s) throw new u$10(`Workflow run did not send a response`, { slug: a$10.WEBHOOK_RESPONSE_NOT_SENT }); return s; } //#endregion //#region node_modules/eve/dist/src/compiled/_chunks/workflow/run-CVlF84yI.js const R$7 = Ih$1(); let z$7 = !1; async function B$8(t, n, r) { "use step"; return await _S(() => { let i = t?.workflowId; if (!i) throw new u$10(`'start' received an invalid workflow function. Ensure the Workflow SDK is configured correctly and the function includes a 'use workflow' directive.`, { slug: `start-invalid-workflow-function` }); return vb(`workflow.start ${c$10(i)}`, async (e) => { e?.setAttributes({ ...Kv(i), ...qv(`start`) }); let t = [], a = r ?? {}; Array.isArray(n) ? t = n : typeof n == `object` && (a = n), e?.setAttributes({ ...Qv(t.length) }); let c = a?.world ?? await T_$1(), l = await c.getDeploymentId(), d = a.deploymentId ?? l; d === `latest` && (c.resolveLatestDeploymentId ? d = await c.resolveLatestDeploymentId() : (z$7 || (z$7 = !0, Ab.warn(`deploymentId: 'latest' has no effect in this world and was ignored. It is only supported by worlds with atomic deployments, such as Vercel. The run will target the current deployment.`, { currentDeploymentId: l })), d = l)); let f, g; if (d === l) f = !0, g = !0; else if (typeof c.streams?.get != `function`) f = !1, g = !1; else { let e = Kx((await rS(c, `workflow`, { deploymentId: d, timeout: 2e3 }).catch(() => void 0))?.workflowCoreVersion); f = e.framedByteStreams, g = e.supportedFormats.has(Q$9.GZIP); } let y = [], x = `wrun_${R$7()}`, E = await pb(), D = a.specVersion ?? c.specVersion ?? 2, O = bh$1(D), N = a.allowReservedAttributes === !0, B; if (a.attributes && Object.keys(a.attributes).length > 0) { if (D < 4) throw new u$10(`Initial workflow attributes require a World that supports spec version 4 or later.`); for (let [e, t] of Object.entries(a.attributes)) if (typeof t != `string`) throw new u$10(`Initial workflow attribute ${JSON.stringify(e)} must be a string value.`); let e = vS(a.attributes, { allowReservedAttributes: N }); B = Object.fromEntries(e.map(({ key: e, value: t }) => [e, t])); } let H = B ? { attributes: B, ...N ? { allowReservedAttributes: !0 } : {} } : {}, U = await c.getEncryptionKeyForRun?.(x, { ...a, deploymentId: d }), W = U ? await p_$1(U) : void 0, G = await Ox(t, x, W, y, globalThis, O, f, g && D >= 5), K = { traceCarrier: E, workflowCoreVersion: qx, features: { encryption: !!W } }, [q, J] = await Promise.allSettled([c.events.create(x, { eventType: `run_created`, specVersion: D, eventData: { deploymentId: d, workflowName: i, input: G, executionContext: K, ...H } }, { v1Compat: O }), c.queue(Yx(i), { runId: x, traceCarrier: E, ...D >= 3 ? { runInput: { input: G, deploymentId: d, workflowName: i, specVersion: D, executionContext: K, ...H } } : {} }, { deploymentId: d, specVersion: D })]); if (J.status === `rejected`) throw J.reason; let X = !1; if (q.status === `rejected`) { let e = q.reason; if (!x$9.is(e)) if (V$7(e)) X = !0, Ab.warn(`Run creation event failed, but the run was accepted via the queue. The run_created event will be re-tried async by the runtime.`, { workflowRunId: x, error: e.message }); else throw e; } else { let e = q.value; if (!e.run) throw new u$10(`Missing 'run' in server response for 'run_created' event`); if (!O && e.run.runId !== x) throw new u$10(`Server returned different runId than requested: expected ${x}, got ${e.run.runId}`); } return gS(Promise.all(y), (e) => { Ab.warn(`Background flush of workflow argument streams failed`, { workflowRunId: x, error: e instanceof Error ? e.message : String(e) }); }), e?.setAttributes({ ...Jv(x), ...Py(d), ...q.status === `fulfilled` && q.value.run ? Yv(q.value.run.status) : {} }), new Y$9(x, { resilientStart: X }); }); }); } function V$7(e) { return !!(w$11.is(e) || s$8.is(e) && e.status && e.status >= 500); } async function K$7(e, t, n) { try { let r = await e.runs.get(t, { resolveData: `none` }), i = bh$1(r.specVersion), a = [], s = null; do { let n = await e.events.list({ runId: t, pagination: { limit: 1e3, ...s ? { cursor: s } : {} }, resolveData: `none` }); a.push(...n.data), s = n.hasMore ? n.cursor : null; } while (s); let c = a.filter((e) => e.eventType === `wait_created`), l = new Set(a.filter((e) => e.eventType === `wait_completed`).map((e) => e.correlationId)), u = c.filter((e) => !l.has(e.correlationId)); if (n?.correlationIds && n.correlationIds.length > 0) { let e = new Set(n.correlationIds); u = u.filter((t) => t.correlationId && e.has(t.correlationId)); } let d = [], f = 0; for (let n of u) { if (!n.correlationId) continue; let a = i ? { eventType: `wait_completed`, correlationId: n.correlationId } : { eventType: `wait_completed`, correlationId: n.correlationId, specVersion: r.specVersion, eventData: { resumeAt: n.eventData.resumeAt } }; try { await e.events.create(t, a, { v1Compat: i }), f++; } catch (e) { x$9.is(e) ? f++ : d.push(e instanceof Error ? e : Error(String(e))); } } if (f > 0 && await e.queue(Yx(r.workflowName), { runId: t }, { deploymentId: r.deploymentId, specVersion: r.specVersion ?? 1 }), d.length > 0) throw AggregateError(d, `Failed to complete ${d.length}/${u.length} pending wait(s) for run ${t}`); return { stoppedCount: f }; } catch (e) { throw e instanceof AggregateError ? e : Error(`Failed to wake up run ${t}: ${e instanceof Error ? e.message : String(e)}`, { cause: e }); } } var Y$9 = class e { static [E_$1](e) { return { runId: e.runId, resilientStart: e.#r }; } static [D_$1](t) { return new e(t.runId, { resilientStart: t.resilientStart }); } runId; #e; get #t() { return this.#e ||= T_$1(), this.#e; } #n = null; #r = !1; constructor(e, t) { this.runId = e, this.#r = t?.resilientStart ?? !1; } #i() { return this.#n ||= (async () => { let e = await this.#t, t = await e.runs.get(this.runId), n = await e.getEncryptionKeyForRun?.(t); return n ? await p_$1(n) : void 0; })(), this.#n; } #a() { return () => this.#i(); } async wakeUp(e) { "use step"; return K$7(await this.#t, this.runId, e); } async cancel() { "use step"; await (await this.#t).events.create(this.runId, { eventType: `run_cancelled`, specVersion: 5 }); } get exists() { "use step"; return this.#t.then((e) => e.runs.get(this.runId, { resolveData: `none` }).then(() => !0).catch((e) => { if (v$8.is(e)) return !1; throw e; })); } get status() { "use step"; return this.#t.then((e) => e.runs.get(this.runId).then((e) => e.status)); } get returnValue() { "use step"; return this.#o(); } get workflowName() { "use step"; return this.#t.then((e) => e.runs.get(this.runId).then((e) => e.workflowName)); } get createdAt() { "use step"; return this.#t.then((e) => e.runs.get(this.runId).then((e) => e.createdAt)); } get startedAt() { "use step"; return this.#t.then((e) => e.runs.get(this.runId).then((e) => e.startedAt)); } get completedAt() { "use step"; return this.#t.then((e) => e.runs.get(this.runId).then((e) => e.completedAt)); } get readable() { return this.getReadable(); } getReadable(e = {}) { "use step"; let { ops: t = [], global: n = globalThis, startIndex: r, namespace: i } = e, a = Ub(this.runId, i), o = this.#a(), s = Cx(n, t, this.runId, o).ReadableStream({ name: a, startIndex: r }), c = this.#t, l = this.runId; return Object.assign(s, { getTailIndex: async () => (await (await c).streams.getInfo(l, a)).tailIndex }); } async #o() { let e = await this.#t, r = 0, a = this.#r ? 3 : 0, o = [ 1e3, 3e3, 6e3 ]; for (;;) try { let t = await e.runs.get(this.runId); if (t.status === `completed`) { let e = await this.#i(); return await jx(t.output, this.runId, e); } if (t.status === `cancelled`) throw new T$11(this.runId); if (t.status === `failed`) { let e = await this.#i(), n; try { n = await Rx(t.error, this.runId, e); } catch { n = Error(`Failed to hydrate workflow run error`); } throw new c$9(this.runId, n, { errorCode: t.errorCode }); } throw new l$8(this.runId, t.status); } catch (e) { if (l$8.is(e)) { await new Promise((e) => setTimeout(e, 1e3)); continue; } if (v$8.is(e) && r < a) { let e = o[r]; r++, await new Promise((t) => setTimeout(t, e)); continue; } throw e; } } }; function X$9(e) { return new Y$9(e); } //#endregion //#region node_modules/eve/dist/src/compiled/@workflow/core/runtime.js const _r$3 = /* @__PURE__ */ new Set([ `PARSE_ERROR`, `SCHEMA_VALIDATION`, t$9.WORLD_CONTRACT_ERROR ]); const vr$3 = [ u$10.is, g$8.is, _$7.is, p$11.is ]; function yr$3(e) { if (!s$8.is(e) || e.status !== void 0) return !1; let t = `cause` in e ? e.cause : void 0; return e.code !== void 0 && _r$3.has(e.code) || e.message.startsWith(`Failed to parse response body for `) || e.message.startsWith(`Schema validation failed for `) || typeof t == `object` && !!t && `name` in t && t.name === `ZodError`; } function br$3(e) { if (f$8.is(e)) return t$9.REPLAY_DIVERGENCE; if (d$10.is(e)) return t$9.CORRUPTED_EVENT_LOG; if (yr$3(e)) return t$9.WORLD_CONTRACT_ERROR; for (let t of vr$3) if (t(e)) return t$9.RUNTIME_ERROR; return t$9.USER_ERROR; } function xr$3(e) { return e instanceof Ce$8 || e instanceof we$8 || e instanceof Te$8 || e instanceof Oe$8; } const Sr$3 = `The workflow event log contains orphaned or mismatched events and cannot be replayed. This is an internal workflow SDK error; please report it with the runId.`; function Cr$3(e, t) { let n = t ?? br$3(e); return h$9.is(e) ? { attribution: `user`, errorCode: n, hint: `A value passed across a workflow/step boundary could not be serialized. See the error message for the offending path and the Learn More link for details.` } : xr$3(e) ? { attribution: `user`, errorCode: n, hint: `A workflow-only or step-only API was called from the wrong context. The error message includes the exact API and how to move the call.` } : d$10.is(e) ? { attribution: `sdk`, errorCode: n, hint: Sr$3 } : e instanceof u$10 ? { attribution: `sdk`, errorCode: n, hint: `This is an internal workflow SDK error, not a bug in your code. If it keeps happening, please report it with the stack trace and the runId.` } : n === t$9.REPLAY_TIMEOUT ? { attribution: `sdk`, errorCode: n, hint: "The workflow replay between step boundaries took too long. This bounds workflow-VM and event-log replay time only — step bodies (`\"use step\"` functions) are excluded. This usually means the event log is unusually large or the workflow function is doing heavy synchronous work in workflow code outside of step bodies. Override the default budget via the WORKFLOW_REPLAY_TIMEOUT_MS env var if needed." } : n === t$9.MAX_DELIVERIES_EXCEEDED ? { attribution: `sdk`, errorCode: n, hint: `The workflow queue exceeded its max-delivery budget. This usually indicates a persistent runtime failure — check the most recent stack traces for the underlying cause.` } : n === t$9.CORRUPTED_EVENT_LOG ? { attribution: `sdk`, errorCode: n, hint: Sr$3 } : n === t$9.WORLD_CONTRACT_ERROR ? { attribution: `sdk`, errorCode: n, hint: `The workflow backend returned data that violated the SDK contract. This is not retryable; please report it with the stack trace and runId.` } : { attribution: `user`, errorCode: n }; } const wr$3 = 24e4; const Tr$3 = 3e4; const Er$3 = 78e4; const Dr$3 = /* @__PURE__ */ new Set(); function Or$3(e, t, n) { Dr$3.has(e) || (Dr$3.add(e), Ab.warn(t, n)); } function kr$3() { let e = process.env.WORKFLOW_REPLAY_TIMEOUT_MS; if (!e) return wr$3; let t = Number(e); return !Number.isFinite(t) || t <= 0 ? (Or$3(e, `Ignoring WORKFLOW_REPLAY_TIMEOUT_MS: not a positive finite number; using default`, { raw: e, defaultMs: wr$3 }), wr$3) : t < 3e4 ? (Or$3(e, `WORKFLOW_REPLAY_TIMEOUT_MS below minimum; clamped`, { raw: e, clampedMs: Tr$3, minMs: Tr$3 }), Tr$3) : t > 78e4 ? (Or$3(e, `WORKFLOW_REPLAY_TIMEOUT_MS above maximum; clamped`, { raw: e, clampedMs: Er$3, maxMs: Er$3 }), Er$3) : t; } const Ar$3 = /* @__PURE__ */ new Set(); function jr$3() { let e = process.env.WORKFLOW_MAX_INLINE_STEPS; if (!e) return 3; let t = Number(e); return !Number.isInteger(t) || t <= 0 ? (Ar$3.has(e) || (Ar$3.add(e), Ab.warn(`Ignoring WORKFLOW_MAX_INLINE_STEPS: not a positive integer; using default`, { raw: e, defaultValue: 3 })), 3) : t < 1 ? 1 : t > 16 ? (Ar$3.has(e) || (Ar$3.add(e), Ab.warn(`WORKFLOW_MAX_INLINE_STEPS above maximum; clamped`, { raw: e, clampedValue: 16, maxValue: 16 })), 16) : t; } function Mr$3() { let e = process.env.WORKFLOW_OPTIMISTIC_INLINE_START; return e === void 0 || e === `` ? !1 : e === `1` || e.toLowerCase() === `true`; } function Nr$3() { let e = process.env.WORKFLOW_OPTIMISTIC_INLINE_START; return e === void 0 || e === `` ? !1 : e === `0` || e.toLowerCase() === `false`; } function Pr$3() { let e = process.env.WORKFLOW_TURBO; return e === void 0 || e === `` ? !0 : !(e === `0` || e.toLowerCase() === `false`); } const Fr$3 = promisify(execFile); function Ir$3(e, t = 10) { let n = parseInt(e, t); if (!Number.isNaN(n) && n >= 0 && n <= 65535) return n; } const Lr$3 = ((e, t) => e.join(t))([``, `proc`], `/`); async function Rr$3(e) { let t = [`${Lr$3}/net/tcp`, `${Lr$3}/net/tcp6`], n = [], r = /* @__PURE__ */ new Set(), i = `${Lr$3}/${e}/fd`; try { let e = (await readdir(i)).sort((e, t) => Number.parseInt(e, 10) - Number.parseInt(t, 10)), t = await Promise.allSettled(e.map(async (e) => (await readlink(`${i}/${e}`)).match(/^socket:\[(\d+)\]$/)?.[1] ?? null)); for (let e of t) e.status === `fulfilled` && e.value && (n.push(e.value), r.add(e.value)); } catch { return []; } if (n.length === 0) return []; let a = /* @__PURE__ */ new Map(); for (let e of t) try { let t = (await readFile(e, `utf8`)).split(` `).slice(1); for (let e of t) { if (!e.trim()) continue; let t = e.trim().split(/\s+/); if (t.length < 10) continue; let n = t[1], i = t[3], o = t[9]; if (!n || i !== `0A` || !o || !r.has(o)) continue; let s = n.indexOf(`:`); if (s === -1) continue; let c = n.slice(s + 1); if (!c) continue; let l = Ir$3(c, 16); l !== void 0 && a.set(o, l); } } catch {} let o = []; for (let e of n) { let t = a.get(e); t !== void 0 && o.push(t); } return o; } async function zr$3(e) { try { let { stdout: t } = await Fr$3(`lsof`, [ `-a`, `-i`, `-P`, `-n`, `-p`, e.toString() ]), n = [], r = t.split(` `); for (let e of r) if (e.includes(`LISTEN`)) { let t = e.trim().split(/\s+/)[8]; if (t) { let e = t.lastIndexOf(`:`); if (e !== -1) { let r = Ir$3(t.slice(e + 1)); r !== void 0 && n.push(r); } } } return n; } catch { return []; } } async function Br$3(e) { try { let { stdout: t } = await Fr$3(`cmd`, [`/c`, `netstat -ano | findstr ${e} | findstr LISTENING`]), n = [], r = t.trim(); if (r) { let e = r.split(` `); for (let t of e) { let e = t.trim().match(/^\s*TCP\s+(?:\[[\da-f:]+\]|[\d.]+):(\d+)\s+/i); if (e) { let t = Ir$3(e[1]); t !== void 0 && n.push(t); } } } return n; } catch { return []; } } async function Vr$3() { let { pid: e, platform: t } = process; try { switch (t) { case `linux`: return await Rr$3(e); case `darwin`: return await zr$3(e); case `win32`: return await Br$3(e); default: return []; } } catch (e) { return process.env.NODE_ENV === `development` && console.debug(`[getAllPorts] Detection failed:`, e), []; } } async function Hr$3(e, t = {}) { let { endpoint: n = `/.well-known/workflow/v1/flow?__health`, timeout: r = 500 } = t, i = new AbortController(), a = setTimeout(() => i.abort(), r); try { return (await fetch(`http://localhost:${e}${n}`, { method: `HEAD`, signal: i.signal })).status === 200; } catch { return !1; } finally { clearTimeout(a); } } async function Ur$3(e) { let t = await Vr$3(); if (t.length === 0) return; if (t.length === 1) return t[0]; let n = (await Promise.all(t.map(async (t) => ({ port: t, isWorkflow: await Hr$3(t, e) })))).find((e) => e.isWorkflow); return n ? n.port : (process.env.NODE_ENV === `development` && console.debug(`[getWorkflowPort] Probing failed, falling back to first port:`, t[0]), t[0]); } function Wr$3(e) { let t = { get value() { let n = e(); return Object.defineProperty(t, "value", { value: n }), n; } }; return t; } const Gr$3 = () => process.env.WORKFLOW_LOCAL_DATA_DIR || `.workflow-data`; const Kr$3 = () => process.env.WORKFLOW_LOCAL_BASE_URL; const qr$3 = Wr$3(() => ({ dataDir: Gr$3(), baseUrl: Kr$3() })); async function Jr$3(e) { if (e.baseUrl) return e.baseUrl; if (process.env.WORKFLOW_LOCAL_BASE_URL) return process.env.WORKFLOW_LOCAL_BASE_URL; if (typeof e.port == `number`) return `http://localhost:${e.port}`; if (process.env.PORT) return `http://localhost:${process.env.PORT}`; let t = await Ur$3(); if (t) return `http://localhost:${t}`; throw Error(`Unable to resolve base URL for workflow queue.`); } const Yr$3 = Ih$1(() => Math.random()); function Xr$3(e) { let t = typeof e == `string` ? e : String(e); return t.length > 48 ? `${t.slice(0, 48)}…` : t; } var Zr$3 = class extends s$8 { constructor(e, t) { super(`Unsafe ${e} "${Xr$3(t)}": must not be empty, contain ".", "/", "\\", or null bytes`), this.name = `UnsafeEntityIdError`; } static is(e) { return e instanceof Error && e.name === `UnsafeEntityIdError`; } }; function Qr$3(e, t) { if (t.length === 0 || t.startsWith(`.`) || t.includes(`/`) || t.includes(`\\`) || t.includes(`\0`) || t.includes(`.`)) throw new Zr$3(e, t); } function $r$3(e, ...t) { let n = G.resolve(e), r = G.resolve(e, ...t); if (r !== n && !r.startsWith(n + G.sep)) throw new Zr$3(`path`, t.join(`/`)); return r; } const ei$3 = process.platform === `win32`; async function ti$3(e, t = 5) { if (!ei$3) return e(); let n = [ `EPERM`, `EBUSY`, `EACCES` ]; for (let r = 0; r <= t; r++) try { return await e(); } catch (e) { if (!(r < t && n.includes(e.code))) throw e; let i = 10 * 2 ** r + Math.random() * 10; await new Promise((e) => setTimeout(e, i)); } throw Error(`Retry loop exited unexpectedly`); } const ni$3 = /* @__PURE__ */ new Set(); function ri$3() { ni$3.clear(); } const ii$3 = /\.[a-zA-Z][a-zA-Z0-9-]*$/; function ai$3(e) { return e.replace(ii$3, ``); } function oi$3(e, t) { return e.endsWith(`.${t}`); } function si$3(e, t, n, r) { return Qr$3(`fileId`, n), r !== void 0 && Qr$3(`tag`, r), $r$3(e, t, r ? `${n}.${r}.json` : `${n}.json`); } async function ci$3(e, t, n, r, i) { if (Qr$3(`fileId`, n), i !== void 0 && Qr$3(`tag`, i), i) { let a = await gi$3($r$3(e, t, `${n}.${i}.json`), r); if (a !== null) return a; } return gi$3($r$3(e, t, `${n}.json`), r); } async function li$3(e, t) { let n = `.${t}.json`; try { return (await promises.readdir(e)).filter((e) => e.endsWith(n)); } catch (e) { if (e.code === `ENOENT`) return []; throw e; } } async function ui$3(e, t, n) { let r = `.${t}${n}`; try { return (await promises.readdir(e)).filter((e) => e.endsWith(r)); } catch (e) { if (e.code === `ENOENT`) return []; throw e; } } async function di$3(e) { try { await promises.mkdir(e, { recursive: !0 }); } catch {} } function fi$3(e, t) { return t instanceof Uint8Array ? { __type: `Uint8Array`, data: Buffer.from(t).toString(`base64`) } : t; } function pi$3(e, t) { return typeof t == `object` && t && t.__type === `Uint8Array` && typeof t.data == `string` ? new Uint8Array(Buffer.from(t.data, `base64`)) : t; } async function mi$3(e, t, n) { return hi$3(e, JSON.stringify(t, fi$3, 2), n); } async function hi$3(e, t, n) { if (!n?.overwrite) { if (ni$3.has(e)) throw new x$9(`File ${e} already exists and 'overwrite' is false`); try { throw await promises.access(e), ni$3.add(e), new x$9(`File ${e} already exists and 'overwrite' is false`); } catch (e) { if (e.code !== `ENOENT`) throw e; } } let r = `${e}.tmp.${Yr$3()}`, i = !1; try { await di$3(G.dirname(e)), await promises.writeFile(r, t), i = !0, await ti$3(() => promises.rename(r, e)), ni$3.add(e); } catch (e) { throw i && await ti$3(() => promises.unlink(r), 3).catch(() => {}), e; } } async function gi$3(e, t) { try { let n = await promises.readFile(e, `utf-8`); return t.parse(JSON.parse(n, pi$3)); } catch (e) { if (e.code === `ENOENT`) return null; throw e; } } async function _i$3(e) { return await promises.readFile(e); } async function vi$3(e) { let t = await promises.open(e, `r`); try { let e = Buffer.allocUnsafe(1), { bytesRead: n } = await t.read(e, 0, 1, 0); return n === 0 ? void 0 : e[0]; } finally { await t.close(); } } async function yi$3(e) { try { await promises.unlink(e); } catch (e) { if (e.code !== `ENOENT`) throw e; } } async function bi$3(e, t) { await di$3(G.dirname(e)); let n = `${e}.tmp.${Yr$3()}`, r = !1; try { await promises.writeFile(n, t, { flag: `wx` }), r = !0; try { return await ti$3(() => promises.link(n, e)), !0; } catch (e) { if (e.code === `EEXIST`) return !1; throw e; } } finally { r && await ti$3(() => promises.unlink(n), 3).catch(() => {}); } } async function xi$3(e) { return Si$3(e, `.json`); } async function Si$3(e, t) { try { return (await promises.readdir(e)).filter((e) => e.endsWith(t)).map((e) => e.slice(0, -t.length)); } catch (e) { if (e.code === `ENOENT`) return []; throw e; } } function Ci$3(e) { if (!e) return null; let t = e.split(`|`); return { timestamp: new Date(t[0]), id: t[1] || null }; } function wi$3(e, t) { return t ? `${e.toISOString()}|${t}` : e.toISOString(); } async function Ti$3(e) { let { directory: t, schema: n, filePrefix: r, fileIdFilter: i, filter: a, sortOrder: o = `desc`, limit: s = 20, cursor: c, getCreatedAt: l, getId: u } = e; r !== void 0 && Qr$3(`filePrefix`, r); let d = await xi$3(t), f = r ? d.filter((e) => e.startsWith(r)) : d, p = i ? f.filter(i) : f, m = Ci$3(c), h = p; m && (h = p.filter((e) => { let t = l(`${e}.json`); if (t) { let e = m.timestamp.getTime(), n = t.getTime(); return m.id ? o === `desc` ? n <= e : n >= e : o === `desc` ? n < e : n > e; } return !0; })); let g = []; for (let e of h) { let r = G.join(t, `${e}.json`), i = null; try { i = await gi$3(r, n); } catch (t) { if (t instanceof ed$2) { console.warn(`Skipping item ${e} due to malformed JSON: ${t.message}`); continue; } throw t; } if (i) { if (a && !a(i)) continue; if (m) { let e = i.createdAt.getTime(), t = m.timestamp.getTime(); if (o === `desc`) { if (e > t || e === t && m.id && u && u(i) >= m.id) continue; } else if (e < t || e === t && m.id && u && u(i) <= m.id) continue; } g.push(i); } } g.sort((e, t) => { let n = e.createdAt.getTime(), r = t.createdAt.getTime(), i = o === `asc` ? n - r : r - n; if (i === 0 && u) { let n = u(e), r = u(t); return o === `asc` ? n.localeCompare(r) : r.localeCompare(n); } return i; }); let _ = g.length > s, v = _ ? g.slice(0, s) : g; return { data: v, cursor: v.length > 0 ? wi$3(v[v.length - 1].createdAt, u?.(v[v.length - 1])) : null, hasMore: _ }; } let Ei$3 = null; function Di$3() { return typeof import.meta.url == `string` && import.meta.url ? G.dirname(fileURLToPath(import.meta.url)) : null; } async function Oi$3() { if (Ei$3) return Ei$3; let e = Di$3(); if (e) try { let t = await readFile(G.join(e, `../package.json`), `utf-8`); return Ei$3 = JSON.parse(t), Ei$3; } catch {} return Ei$3 = { name: `@workflow/world-local`, version: `bundled` }, Ei$3; } const ki$3 = `version.txt`; var Ai$3 = class extends Error { dataDir; code; constructor(e, t, n) { super(e), this.name = `DataDirAccessError`, this.dataDir = t, this.code = n; } }; var ji$3 = class extends Error { oldVersion; newVersion; suggestedVersion; constructor(e, t, n, r) { super(e), this.name = `DataDirVersionError`, this.oldVersion = t, this.newVersion = n, this.suggestedVersion = r; } }; function Mi$3(e) { let t = e.match(/^(\d+)\.(\d+)\.(\d+)(?:-(.+))?$/); if (!t) throw Error(`Invalid version string: "${e}"`); return { major: parseInt(t[1], 10), minor: parseInt(t[2], 10), patch: parseInt(t[3], 10), prerelease: t[4], raw: e }; } function Ni$3(e) { let t = `${e.major}.${e.minor}.${e.patch}`; return e.prerelease ? `${t}-${e.prerelease}` : t; } function Pi$3(e) { let t = e.trim(), n = t.lastIndexOf(`@`); if (n <= 0) throw Error(`Invalid version file content: "${e}"`); return { packageName: t.substring(0, n), version: Mi$3(t.substring(n + 1)) }; } function Fi$3(e, t) { return `${e}@${Ni$3(t)}`; } function Ii$3(e, t) { console.log(`[world-local] Upgrading from version ${Ni$3(e)} to ${Ni$3(t)}`); } async function Li$3(e) { let t = G.resolve(e); try { await mkdir(t, { recursive: !0 }); } catch (e) { let n = e; if (n.code !== `EEXIST`) throw new Ai$3(`Failed to create data directory "${t}": ${n.message}`, t, n.code); } try { await access(t, constants.R_OK); } catch (e) { let n = e; throw new Ai$3(`Data directory "${t}" is not readable: ${n.message}`, t, n.code); } let n = G.join(t, `.workflow-write-test-${Date.now()}`); try { await writeFile(n, ``), await unlink(n).catch((e) => { if (e.code !== `ENOENT`) throw e; }); } catch (e) { let n = e; throw new Ai$3(`Data directory "${t}" is not writable: ${n.message}`, t, n.code); } } async function Ri$3(e) { let t = G.join(G.resolve(e), ki$3); try { return Pi$3(await readFile(t, `utf-8`)); } catch (e) { if (e.code === `ENOENT`) return null; throw e; } } async function zi$3(e, t) { await writeFile(G.join(G.resolve(e), ki$3), Fi$3((await Oi$3()).name, t)); } function Bi$3(e, t) { return t || Ni$3(e); } async function Vi$3(e) { await Li$3(e); let t = await Oi$3(), n = Mi$3(t.version), r = await Ri$3(e); if (r === null) { await zi$3(e, n); return; } let { version: i } = r; if (Ni$3(i) !== Ni$3(n)) try { Ii$3(i, n), await zi$3(e, n); } catch (e) { let r = Bi$3(i, e instanceof ji$3 ? e.suggestedVersion : void 0); throw console.error(`[world-local] Failed to upgrade data directory from version ${Ni$3(i)} to ${Ni$3(n)}:`, e instanceof Error ? e.message : e), console.error(`[world-local] Data is not compatible with the current version. Please downgrade to ${t.name}@${r}`), e; } } let Hi$3 = null; async function Ui$3() { return Hi$3 ||= Promise.resolve().then(() => src_CQuMexnO_exports).then((t) => d$13(t.t(), 1)).catch(() => null), Hi$3; } let Wi$3 = null; async function Gi$3() { return Wi$3 ||= Ui$3().then((e) => e ? e.trace.getTracer(`workflow`) : null), Wi$3; } async function Ki$3(e, ...t) { let [n, r] = await Promise.all([Gi$3(), Ui$3()]), { fn: i, opts: a } = typeof t[0] == `function` ? { fn: t[0], opts: {} } : { fn: t[1], opts: t[0] }; if (!i) throw Error(`Function to trace must be provided`); return !n || !r ? await i() : n.startActiveSpan(e, a, async (e) => { try { let t = await i(e); return e.setStatus({ code: r.SpanStatusCode.OK }), t; } catch (t) { throw e.setStatus({ code: r.SpanStatusCode.ERROR, message: t.message }), t; } finally { e.end(); } }); } async function qi$3(e) { let t = await Ui$3(); if (t) return t.SpanKind[e]; } function Ji$3(...e) { return (t) => Object.fromEntries(e.map((e) => [e, t])); } const Yi$3 = Ji$3(`peer.service`); const Xi$3 = Ji$3(`rpc.system`); const Zi$3 = Ji$3(`rpc.service`); const Qi$3 = Ji$3(`rpc.method`); const $i$3 = Ji$3(`workflow.run.id`); const ea$3 = Ji$3(`step.id`); const ta$3 = { peerService: `world-local`, rpcSystem: `local`, rpcService: `world-local` }; const na$3 = { "world.runs.get": 0, "world.runs.experimentalSetAttributes": 0, "world.steps.get": 0, "world.events.create": 0, "world.events.get": 0 }; const ra$3 = /* @__PURE__ */ new Set([ `world.steps.list`, `world.events.list`, `world.hooks.list` ]); function ia$3(e) { if (e.length >= 2 && typeof e[1] == `object` && e[1] !== null) { let t = e[1]; if (typeof t.eventType == `string`) return t.eventType; } } function aa$3(e, t) { return typeof e[t] == `string` ? e[t] : void 0; } function oa$3(e) { if (typeof e != `object` || !e) return; let t = e.runId; return typeof t == `string` ? t : void 0; } function sa$3(e) { if (typeof e != `object` || !e) return; let t = e; if (typeof t.runId == `string`) return t.runId; for (let e of [ `run`, `step`, `hook`, `wait` ]) { let n = t[e]; if (typeof n == `object` && n) { let e = n.runId; if (typeof e == `string`) return e; } } } function ca$3(e, t, n) { let r = `${e}.${t}`, i = {}, a = na$3[r], o = a === void 0 ? ra$3.has(r) ? oa$3(n[0]) : void 0 : aa$3(n, a); if (o && Object.assign(i, $i$3(o)), r === `world.steps.get`) { let e = aa$3(n, 1); e && Object.assign(i, ea$3(e)); } return i; } function la$3(e, t) { let n = {}; for (let r of Object.keys(t)) if (typeof t[r] != `function`) n[r] = t[r]; else { let i = t[r], a = String(r); n[r] = async (...t) => { let n = `${e}.${a}`; if (e === `world.events` && a === `create`) { let r = ia$3(t); r && (n = `${e}.${a} ${r}`); } return Ki$3(n, { kind: await qi$3(`INTERNAL`) }, async (r) => { r?.setAttributes({ ...Yi$3(ta$3.peerService), ...Xi$3(ta$3.rpcSystem), ...Zi$3(ta$3.rpcService), ...Qi$3(n), ...ca$3(e, a, t) }); let o = await i(...t), s = sa$3(o); return s && r?.setAttributes($i$3(s)), o; }); }; } return n; } var ua$3 = c$12(((e) => { var n = e && e.__importDefault || function(e) { return e && e.__esModule ? e : { default: e }; }; Object.defineProperty(e, "__esModule", { value: !0 }), e.RateLimit = e.Sema = void 0; let r = n(f$11(`events`)); function i(e, t, n, r, i) { for (let a = 0; a < i; ++a) n[a + r] = e[a + t], e[a + t] = void 0; } function a(e) { return e >>>= 0, --e, e |= e >> 1, e |= e >> 2, e |= e >> 4, e |= e >> 8, e |= e >> 16, e + 1; } function o(e) { return a(Math.min(Math.max(16, e), 1073741824)); } var s = class { constructor(e) { this._capacity = o(e), this._length = 0, this._front = 0, this.arr = []; } push(e) { let t = this._length; this.checkCapacity(t + 1); let n = this._front + t & this._capacity - 1; return this.arr[n] = e, this._length = t + 1, t + 1; } pop() { let e = this._length; if (e === 0) return; let t = this._front + e - 1 & this._capacity - 1, n = this.arr[t]; return this.arr[t] = void 0, this._length = e - 1, n; } shift() { let e = this._length; if (e === 0) return; let t = this._front, n = this.arr[t]; return this.arr[t] = void 0, this._front = t + 1 & this._capacity - 1, this._length = e - 1, n; } get length() { return this._length; } checkCapacity(e) { this._capacity < e && this.resizeTo(o(this._capacity * 1.5 + 16)); } resizeTo(e) { let t = this._capacity; this._capacity = e; let n = this._front, r = this._length; if (n + r > t) { let e = n + r & t - 1; i(this.arr, 0, this.arr, t, e); } } }, c = class extends r.default {}; function l(e) { return typeof e == `function`; } function u() { return `1`; } var d = class { constructor(e, { initFn: t = u, pauseFn: n, resumeFn: r, capacity: i = 10 } = {}) { if (l(n) !== l(r)) throw Error(`pauseFn and resumeFn must be both set for pausing`); this.nrTokens = e, this.free = new s(e), this.waiting = new s(i), this.releaseEmitter = new c(), this.noTokens = t === u, this.pauseFn = n, this.resumeFn = r, this.paused = !1, this.releaseEmitter.on(`release`, (e) => { let t = this.waiting.shift(); t ? t.resolve(e) : (this.resumeFn && this.paused && (this.paused = !1, this.resumeFn()), this.free.push(e)); }); for (let n = 0; n < e; n++) this.free.push(t()); } tryAcquire() { return this.free.pop(); } async acquire() { let e = this.tryAcquire(); return e === void 0 ? new Promise((e, t) => { this.pauseFn && !this.paused && (this.paused = !0, this.pauseFn()), this.waiting.push({ resolve: e, reject: t }); }) : e; } release(e) { this.releaseEmitter.emit(`release`, this.noTokens ? `1` : e); } drain() { let e = Array(this.nrTokens); for (let t = 0; t < this.nrTokens; t++) e[t] = this.acquire(); return Promise.all(e); } nrWaiting() { return this.waiting.length; } }; e.Sema = d; function f(e, { timeUnit: t = 1e3, uniformDistribution: n = !1 } = {}) { let r = new d(n ? 1 : e), i = n ? t / e : t; return async function() { await r.acquire(), setTimeout(() => r.release(), i); }; } e.RateLimit = f; })); var da$3 = c$12(((e, t) => { t.exports = { kClose: Symbol(`close`), kDestroy: Symbol(`destroy`), kDispatch: Symbol(`dispatch`), kUrl: Symbol(`url`), kWriting: Symbol(`writing`), kResuming: Symbol(`resuming`), kQueue: Symbol(`queue`), kConnect: Symbol(`connect`), kConnecting: Symbol(`connecting`), kKeepAliveDefaultTimeout: Symbol(`default keep alive timeout`), kKeepAliveMaxTimeout: Symbol(`max keep alive timeout`), kKeepAliveTimeoutThreshold: Symbol(`keep alive timeout threshold`), kKeepAliveTimeoutValue: Symbol(`keep alive timeout`), kKeepAlive: Symbol(`keep alive`), kHeadersTimeout: Symbol(`headers timeout`), kBodyTimeout: Symbol(`body timeout`), kServerName: Symbol(`server name`), kLocalAddress: Symbol(`local address`), kHost: Symbol(`host`), kNoRef: Symbol(`no ref`), kBodyUsed: Symbol(`used`), kBody: Symbol(`abstracted request body`), kRunning: Symbol(`running`), kBlocking: Symbol(`blocking`), kPending: Symbol(`pending`), kSize: Symbol(`size`), kBusy: Symbol(`busy`), kQueued: Symbol(`queued`), kFree: Symbol(`free`), kConnected: Symbol(`connected`), kClosed: Symbol(`closed`), kNeedDrain: Symbol(`need drain`), kReset: Symbol(`reset`), kDestroyed: Symbol.for(`nodejs.stream.destroyed`), kResume: Symbol(`resume`), kOnError: Symbol(`on error`), kMaxHeadersSize: Symbol(`max headers size`), kRunningIdx: Symbol(`running index`), kPendingIdx: Symbol(`pending index`), kError: Symbol(`error`), kClients: Symbol(`clients`), kClient: Symbol(`client`), kParser: Symbol(`parser`), kOnDestroyed: Symbol(`destroy callbacks`), kPipelining: Symbol(`pipelining`), kSocket: Symbol(`socket`), kHostHeader: Symbol(`host header`), kConnector: Symbol(`connector`), kStrictContentLength: Symbol(`strict content length`), kMaxRedirections: Symbol(`maxRedirections`), kMaxRequests: Symbol(`maxRequestsPerClient`), kProxy: Symbol(`proxy agent options`), kCounter: Symbol(`socket request counter`), kMaxResponseSize: Symbol(`max response size`), kHTTP2Session: Symbol(`http2Session`), kHTTP2SessionState: Symbol(`http2Session state`), kRetryHandlerDefaultRetry: Symbol(`retry agent default retry`), kConstruct: Symbol(`constructable`), kListeners: Symbol(`listeners`), kHTTPContext: Symbol(`http context`), kMaxConcurrentStreams: Symbol(`max concurrent streams`), kHTTP2InitialWindowSize: Symbol(`http2 initial window size`), kHTTP2ConnectionWindowSize: Symbol(`http2 connection window size`), kEnableConnectProtocol: Symbol(`http2session connect protocol`), kRemoteSettings: Symbol(`http2session remote settings`), kHTTP2Stream: Symbol(`http2session client stream`), kPingInterval: Symbol(`ping interval`), kNoProxyAgent: Symbol(`no proxy agent`), kHttpProxyAgent: Symbol(`http proxy agent`), kHttpsProxyAgent: Symbol(`https proxy agent`), kSocks5ProxyAgent: Symbol(`socks5 proxy agent`) }; })); var fa$3 = c$12(((e, t) => { let n = 0, r = 1e3, i, a = Symbol(`kFastTimer`), o = []; function s() { n += 499; let e = 0, t = o.length; for (; e < t;) { let r = o[e]; r._state === 0 ? (r._idleStart = n - 499, r._state = 1) : r._state === 1 && n >= r._idleStart + r._idleTimeout && (r._state = -1, r._idleStart = -1, r._onTimeout(r._timerArg)), r._state === -1 ? (r._state = -2, --t !== 0 && (o[e] = o[t])) : ++e; } o.length = t, o.length !== 0 && c(); } function c() { i?.refresh ? i.refresh() : (clearTimeout(i), i = setTimeout(s, 499), i?.unref()); } var l = class { [a] = !0; _state = -2; _idleTimeout = -1; _idleStart = -1; _onTimeout; _timerArg; constructor(e, t, n) { this._onTimeout = e, this._idleTimeout = t, this._timerArg = n, this.refresh(); } refresh() { this._state === -2 && o.push(this), (!i || o.length === 1) && c(), this._state = 0; } clear() { this._state = -1, this._idleStart = -1; } }; t.exports = { setTimeout(e, t, n) { return t <= r ? setTimeout(e, t, n) : new l(e, t, n); }, clearTimeout(e) { e[a] ? e.clear() : clearTimeout(e); }, setFastTimeout(e, t, n) { return new l(e, t, n); }, clearFastTimeout(e) { e.clear(); }, now() { return n; }, tick(e = 0) { n += e - r + 1, s(), s(); }, reset() { n = 0, o.length = 0, clearTimeout(i), i = null; }, kFastTimer: a }; })); var K$6 = c$12(((e, t) => { let n = Symbol.for(`undici.error.UND_ERR`); var r = class extends Error { constructor(e, t) { super(e, t), this.name = `UndiciError`, this.code = `UND_ERR`; } static [Symbol.hasInstance](e) { return e && e[n] === !0; } get [n]() { return !0; } }; let i = Symbol.for(`undici.error.UND_ERR_CONNECT_TIMEOUT`); var a = class extends r { constructor(e) { super(e), this.name = `ConnectTimeoutError`, this.message = e || `Connect Timeout Error`, this.code = `UND_ERR_CONNECT_TIMEOUT`; } static [Symbol.hasInstance](e) { return e && e[i] === !0; } get [i]() { return !0; } }; let o = Symbol.for(`undici.error.UND_ERR_HEADERS_TIMEOUT`); var s = class extends r { constructor(e) { super(e), this.name = `HeadersTimeoutError`, this.message = e || `Headers Timeout Error`, this.code = `UND_ERR_HEADERS_TIMEOUT`; } static [Symbol.hasInstance](e) { return e && e[o] === !0; } get [o]() { return !0; } }; let c = Symbol.for(`undici.error.UND_ERR_HEADERS_OVERFLOW`); var l = class extends r { constructor(e) { super(e), this.name = `HeadersOverflowError`, this.message = e || `Headers Overflow Error`, this.code = `UND_ERR_HEADERS_OVERFLOW`; } static [Symbol.hasInstance](e) { return e && e[c] === !0; } get [c]() { return !0; } }; let u = Symbol.for(`undici.error.UND_ERR_BODY_TIMEOUT`); var d = class extends r { constructor(e) { super(e), this.name = `BodyTimeoutError`, this.message = e || `Body Timeout Error`, this.code = `UND_ERR_BODY_TIMEOUT`; } static [Symbol.hasInstance](e) { return e && e[u] === !0; } get [u]() { return !0; } }; let f = Symbol.for(`undici.error.UND_ERR_INVALID_ARG`); var p = class extends r { constructor(e) { super(e), this.name = `InvalidArgumentError`, this.message = e || `Invalid Argument Error`, this.code = `UND_ERR_INVALID_ARG`; } static [Symbol.hasInstance](e) { return e && e[f] === !0; } get [f]() { return !0; } }; let m = Symbol.for(`undici.error.UND_ERR_INVALID_RETURN_VALUE`); var h = class extends r { constructor(e) { super(e), this.name = `InvalidReturnValueError`, this.message = e || `Invalid Return Value Error`, this.code = `UND_ERR_INVALID_RETURN_VALUE`; } static [Symbol.hasInstance](e) { return e && e[m] === !0; } get [m]() { return !0; } }; let g = Symbol.for(`undici.error.UND_ERR_ABORT`); var _ = class extends r { constructor(e) { super(e), this.name = `AbortError`, this.message = e || `The operation was aborted`, this.code = `UND_ERR_ABORT`; } static [Symbol.hasInstance](e) { return e && e[g] === !0; } get [g]() { return !0; } }; let v = Symbol.for(`undici.error.UND_ERR_ABORTED`); var y = class extends _ { constructor(e) { super(e), this.name = `AbortError`, this.message = e || `Request aborted`, this.code = `UND_ERR_ABORTED`; } static [Symbol.hasInstance](e) { return e && e[v] === !0; } get [v]() { return !0; } }; let b = Symbol.for(`undici.error.UND_ERR_INFO`); var x = class extends r { constructor(e) { super(e), this.name = `InformationalError`, this.message = e || `Request information`, this.code = `UND_ERR_INFO`; } static [Symbol.hasInstance](e) { return e && e[b] === !0; } get [b]() { return !0; } }; let S = Symbol.for(`undici.error.UND_ERR_REQ_CONTENT_LENGTH_MISMATCH`); var C = class extends r { constructor(e) { super(e), this.name = `RequestContentLengthMismatchError`, this.message = e || `Request body length does not match content-length header`, this.code = `UND_ERR_REQ_CONTENT_LENGTH_MISMATCH`; } static [Symbol.hasInstance](e) { return e && e[S] === !0; } get [S]() { return !0; } }; let w = Symbol.for(`undici.error.UND_ERR_RES_CONTENT_LENGTH_MISMATCH`); var T = class extends r { constructor(e) { super(e), this.name = `ResponseContentLengthMismatchError`, this.message = e || `Response body length does not match content-length header`, this.code = `UND_ERR_RES_CONTENT_LENGTH_MISMATCH`; } static [Symbol.hasInstance](e) { return e && e[w] === !0; } get [w]() { return !0; } }; let E = Symbol.for(`undici.error.UND_ERR_DESTROYED`); var D = class extends r { constructor(e) { super(e), this.name = `ClientDestroyedError`, this.message = e || `The client is destroyed`, this.code = `UND_ERR_DESTROYED`; } static [Symbol.hasInstance](e) { return e && e[E] === !0; } get [E]() { return !0; } }; let O = Symbol.for(`undici.error.UND_ERR_CLOSED`); var k = class extends r { constructor(e) { super(e), this.name = `ClientClosedError`, this.message = e || `The client is closed`, this.code = `UND_ERR_CLOSED`; } static [Symbol.hasInstance](e) { return e && e[O] === !0; } get [O]() { return !0; } }; let A = Symbol.for(`undici.error.UND_ERR_SOCKET`); var j = class extends r { constructor(e, t) { super(e), this.name = `SocketError`, this.message = e || `Socket error`, this.code = `UND_ERR_SOCKET`, this.socket = t; } static [Symbol.hasInstance](e) { return e && e[A] === !0; } get [A]() { return !0; } }; let M = Symbol.for(`undici.error.UND_ERR_NOT_SUPPORTED`); var N = class extends r { constructor(e) { super(e), this.name = `NotSupportedError`, this.message = e || `Not supported error`, this.code = `UND_ERR_NOT_SUPPORTED`; } static [Symbol.hasInstance](e) { return e && e[M] === !0; } get [M]() { return !0; } }; let P = Symbol.for(`undici.error.UND_ERR_BPL_MISSING_UPSTREAM`); var F = class extends r { constructor(e) { super(e), this.name = `MissingUpstreamError`, this.message = e || `No upstream has been added to the BalancedPool`, this.code = `UND_ERR_BPL_MISSING_UPSTREAM`; } static [Symbol.hasInstance](e) { return e && e[P] === !0; } get [P]() { return !0; } }; let I = Symbol.for(`undici.error.UND_ERR_HTTP_PARSER`); var ee = class extends Error { constructor(e, t, n) { super(e), this.name = `HTTPParserError`, this.code = t ? `HPE_${t}` : void 0, this.data = n ? n.toString() : void 0; } static [Symbol.hasInstance](e) { return e && e[I] === !0; } get [I]() { return !0; } }; let L = Symbol.for(`undici.error.UND_ERR_RES_EXCEEDED_MAX_SIZE`); var te = class extends r { constructor(e) { super(e), this.name = `ResponseExceededMaxSizeError`, this.message = e || `Response content exceeded max size`, this.code = `UND_ERR_RES_EXCEEDED_MAX_SIZE`; } static [Symbol.hasInstance](e) { return e && e[L] === !0; } get [L]() { return !0; } }; let R = Symbol.for(`undici.error.UND_ERR_REQ_RETRY`); var ne = class extends r { constructor(e, t, { headers: n, data: r }) { super(e), this.name = `RequestRetryError`, this.message = e || `Request retry error`, this.code = `UND_ERR_REQ_RETRY`, this.statusCode = t, this.data = r, this.headers = n; } static [Symbol.hasInstance](e) { return e && e[R] === !0; } get [R]() { return !0; } }; let re = Symbol.for(`undici.error.UND_ERR_RESPONSE`); var z = class extends r { constructor(e, t, { headers: n, body: r }) { super(e), this.name = `ResponseError`, this.message = e || `Response error`, this.code = `UND_ERR_RESPONSE`, this.statusCode = t, this.body = r, this.headers = n; } static [Symbol.hasInstance](e) { return e && e[re] === !0; } get [re]() { return !0; } }; let ie = Symbol.for(`undici.error.UND_ERR_PRX_TLS`); var ae = class extends r { constructor(e, t, n = {}) { super(t, { cause: e, ...n }), this.name = `SecureProxyConnectionError`, this.message = t || `Secure Proxy Connection failed`, this.code = `UND_ERR_PRX_TLS`, this.cause = e; } static [Symbol.hasInstance](e) { return e && e[ie] === !0; } get [ie]() { return !0; } }; let oe = Symbol.for(`undici.error.UND_ERR_MAX_ORIGINS_REACHED`); var se = class extends r { constructor(e) { super(e), this.name = `MaxOriginsReachedError`, this.message = e || `Maximum allowed origins reached`, this.code = `UND_ERR_MAX_ORIGINS_REACHED`; } static [Symbol.hasInstance](e) { return e && e[oe] === !0; } get [oe]() { return !0; } }, ce = class extends r { constructor(e, t) { super(e), this.name = `Socks5ProxyError`, this.message = e || `SOCKS5 proxy error`, this.code = t || `UND_ERR_SOCKS5`; } }; let le = Symbol.for(`undici.error.UND_ERR_WS_MESSAGE_SIZE_EXCEEDED`); t.exports = { AbortError: _, HTTPParserError: ee, UndiciError: r, HeadersTimeoutError: s, HeadersOverflowError: l, BodyTimeoutError: d, RequestContentLengthMismatchError: C, ConnectTimeoutError: a, InvalidArgumentError: p, InvalidReturnValueError: h, RequestAbortedError: y, ClientDestroyedError: D, ClientClosedError: k, InformationalError: x, SocketError: j, NotSupportedError: N, ResponseContentLengthMismatchError: T, BalancedPoolMissingUpstreamError: F, ResponseExceededMaxSizeError: te, RequestRetryError: ne, ResponseError: z, SecureProxyConnectionError: ae, MaxOriginsReachedError: se, Socks5ProxyError: ce, MessageSizeExceededError: class extends r { constructor(e) { super(e), this.name = `MessageSizeExceededError`, this.message = e || `Max decompressed message size exceeded`, this.code = `UND_ERR_WS_MESSAGE_SIZE_EXCEEDED`; } static [Symbol.hasInstance](e) { return e && e[le] === !0; } get [le]() { return !0; } } }; })); var pa$3 = c$12(((e, t) => { let n = `Accept.Accept-Encoding.Accept-Language.Accept-Ranges.Access-Control-Allow-Credentials.Access-Control-Allow-Headers.Access-Control-Allow-Methods.Access-Control-Allow-Origin.Access-Control-Expose-Headers.Access-Control-Max-Age.Access-Control-Request-Headers.Access-Control-Request-Method.Age.Allow.Alt-Svc.Alt-Used.Authorization.Cache-Control.Clear-Site-Data.Connection.Content-Disposition.Content-Encoding.Content-Language.Content-Length.Content-Location.Content-Range.Content-Security-Policy.Content-Security-Policy-Report-Only.Content-Type.Cookie.Cross-Origin-Embedder-Policy.Cross-Origin-Opener-Policy.Cross-Origin-Resource-Policy.Date.Device-Memory.Downlink.ECT.ETag.Expect.Expect-CT.Expires.Forwarded.From.Host.If-Match.If-Modified-Since.If-None-Match.If-Range.If-Unmodified-Since.Keep-Alive.Last-Modified.Link.Location.Max-Forwards.Origin.Permissions-Policy.Pragma.Proxy-Authenticate.Proxy-Authorization.RTT.Range.Referer.Referrer-Policy.Refresh.Retry-After.Sec-WebSocket-Accept.Sec-WebSocket-Extensions.Sec-WebSocket-Key.Sec-WebSocket-Protocol.Sec-WebSocket-Version.Server.Server-Timing.Service-Worker-Allowed.Service-Worker-Navigation-Preload.Set-Cookie.SourceMap.Strict-Transport-Security.Supports-Loading-Mode.TE.Timing-Allow-Origin.Trailer.Transfer-Encoding.Upgrade.Upgrade-Insecure-Requests.User-Agent.Vary.Via.WWW-Authenticate.X-Content-Type-Options.X-DNS-Prefetch-Control.X-Frame-Options.X-Permitted-Cross-Domain-Policies.X-Powered-By.X-Requested-With.X-XSS-Protection`.split(`.`), r = {}; Object.setPrototypeOf(r, null); let i = {}; Object.setPrototypeOf(i, null); function a(e) { let t = i[e]; return t === void 0 && (t = Buffer.from(e)), t; } for (let e = 0; e < n.length; ++e) { let t = n[e], i = t.toLowerCase(); r[t] = r[i] = i; } t.exports = { wellknownHeaderNames: n, headerNameLowerCasedRecord: r, getHeaderNameAsBuffer: a }; })); var ma$3 = c$12(((e, t) => { let { wellknownHeaderNames: n, headerNameLowerCasedRecord: r } = pa$3(); var i = class e { value = null; left = null; middle = null; right = null; code; constructor(t, n, r) { if (r === void 0 || r >= t.length) throw TypeError(`Unreachable`); if ((this.code = t.charCodeAt(r)) > 127) throw TypeError(`key must be ascii string`); t.length === ++r ? this.value = n : this.middle = new e(t, n, r); } add(t, n) { let r = t.length; if (r === 0) throw TypeError(`Unreachable`); let i = 0, a = this; for (;;) { let o = t.charCodeAt(i); if (o > 127) throw TypeError(`key must be ascii string`); if (a.code === o) if (r === ++i) { a.value = n; break; } else if (a.middle !== null) a = a.middle; else { a.middle = new e(t, n, i); break; } else if (a.code < o) if (a.left !== null) a = a.left; else { a.left = new e(t, n, i); break; } else if (a.right !== null) a = a.right; else { a.right = new e(t, n, i); break; } } } search(e) { let t = e.length, n = 0, r = this; for (; r !== null && n < t;) { let i = e[n]; for (i <= 90 && i >= 65 && (i |= 32); r !== null;) { if (i === r.code) { if (t === ++n) return r; r = r.middle; break; } r = r.code < i ? r.left : r.right; } } return null; } }, a = class { node = null; insert(e, t) { this.node === null ? this.node = new i(e, t, 0) : this.node.add(e, t); } lookup(e) { return this.node?.search(e)?.value ?? null; } }; let o = new a(); for (let e = 0; e < n.length; ++e) { let t = r[n[e]]; o.insert(t, t); } t.exports = { TernarySearchTree: a, tree: o }; })); var q$6 = c$12(((e, n) => { let r = f$11(`node:assert`), { kDestroyed: i, kBodyUsed: a, kListeners: o, kBody: s } = da$3(), { IncomingMessage: c } = f$11(`node:http`), l = f$11(`node:stream`), u = f$11(`node:net`), { stringify: d } = f$11(`node:querystring`), { EventEmitter: f } = f$11(`node:events`), p = fa$3(), { InvalidArgumentError: m, ConnectTimeoutError: h } = K$6(), { headerNameLowerCasedRecord: g } = pa$3(), { tree: _ } = ma$3(), [v, y] = process.versions.node.split(`.`, 2).map((e) => Number(e)); var b = class { constructor(e) { this[s] = e, this[a] = !1; } async *[Symbol.asyncIterator]() { r(!this[a], `disturbed`), this[a] = !0, yield* this[s]; } }; function x() {} function S(e) { return C(e) ? (ee(e) === 0 && e.on(`data`, function() { r(!1); }), typeof e.readableDidRead != `boolean` && (e[a] = !1, f.prototype.on.call(e, `data`, function() { this[a] = !0; })), e) : e && typeof e.pipeTo == `function` ? new b(e) : e && de(e) ? e : e && typeof e != `string` && !ArrayBuffer.isView(e) && F(e) ? new b(e) : e; } function C(e) { return e && typeof e == `object` && typeof e.pipe == `function` && typeof e.on == `function`; } function w(e) { if (e === null) return !1; if (e instanceof Blob) return !0; if (typeof e != `object`) return !1; { let t = e[Symbol.toStringTag]; return (t === `Blob` || t === `File`) && (`stream` in e && typeof e.stream == `function` || `arrayBuffer` in e && typeof e.arrayBuffer == `function`); } } function T(e) { return e.includes(`?`) || e.includes(`#`); } function E(e, t) { if (T(e)) throw Error(`Query params cannot be passed when url already contains "?" or "#".`); let n = d(t); return n && (e += `?` + n), e; } function D(e) { let t = parseInt(e, 10); return t === Number(e) && t >= 0 && t <= 65535; } function O(e) { return e != null && e[0] === `h` && e[1] === `t` && e[2] === `t` && e[3] === `p` && (e[4] === `:` || e[4] === `s` && e[5] === `:`); } function k(e) { if (typeof e == `string`) { if (e = new URL(e), !O(e.origin || e.protocol)) throw new m("Invalid URL protocol: the URL must start with `http:` or `https:`."); return e; } if (!e || typeof e != `object`) throw new m(`Invalid URL: The URL argument must be a non-null object.`); if (!(e instanceof URL)) { if (e.port != null && e.port !== `` && D(e.port) === !1) throw new m(`Invalid URL: port must be a valid integer or a string representation of an integer.`); if (e.path != null && typeof e.path != `string`) throw new m(`Invalid URL path: the path must be a string or null/undefined.`); if (e.pathname != null && typeof e.pathname != `string`) throw new m(`Invalid URL pathname: the pathname must be a string or null/undefined.`); if (e.hostname != null && typeof e.hostname != `string`) throw new m(`Invalid URL hostname: the hostname must be a string or null/undefined.`); if (e.origin != null && typeof e.origin != `string`) throw new m(`Invalid URL origin: the origin must be a string or null/undefined.`); if (!O(e.origin || e.protocol)) throw new m("Invalid URL protocol: the URL must start with `http:` or `https:`."); let t = e.port == null ? e.protocol === `https:` ? 443 : 80 : e.port, n = e.origin == null ? `${e.protocol || ``}//${e.hostname || ``}:${t}` : e.origin, r = e.path == null ? `${e.pathname || ``}${e.search || ``}` : e.path; return n[n.length - 1] === `/` && (n = n.slice(0, n.length - 1)), r && r[0] !== `/` && (r = `/${r}`), new URL(`${n}${r}`); } if (!O(e.origin || e.protocol)) throw new m("Invalid URL protocol: the URL must start with `http:` or `https:`."); return e; } function A(e) { if (e = k(e), e.pathname !== `/` || e.search || e.hash) throw new m(`invalid url`); return e; } function j(e) { if (e[0] === `[`) { let t = e.indexOf(`]`); return r(t !== -1), e.substring(1, t); } let t = e.indexOf(`:`); return t === -1 ? e : e.substring(0, t); } function M(e) { if (!e) return null; r(typeof e == `string`); let t = j(e); return u.isIP(t) ? `` : t; } function N(e) { return JSON.parse(JSON.stringify(e)); } function P(e) { return e != null && typeof e[Symbol.asyncIterator] == `function`; } function F(e) { return e != null && (typeof e[Symbol.iterator] == `function` || typeof e[Symbol.asyncIterator] == `function`); } function I(e) { let t = Object.getPrototypeOf(e); return Object.prototype.hasOwnProperty.call(e, Symbol.iterator) || t != null && t !== Object.prototype && typeof e[Symbol.iterator] == `function`; } function ee(e) { if (e == null) return 0; if (C(e)) { let t = e._readableState; return t && t.objectMode === !1 && t.ended === !0 && Number.isFinite(t.length) ? t.length : null; } else if (w(e)) return e.size == null ? null : e.size; else if (se(e)) return e.byteLength; return null; } function L(e) { return e && !!(e.destroyed || e[i] || l.isDestroyed?.(e)); } function te(e, t) { e == null || !C(e) || L(e) || (typeof e.destroy == `function` ? (Object.getPrototypeOf(e).constructor === c && (e.socket = null), e.destroy(t)) : t && queueMicrotask(() => { e.emit(`error`, t); }), e.destroyed !== !0 && (e[i] = !0)); } let R = /timeout=(\d+)/; function ne(e) { let t = e.match(R); return t ? parseInt(t[1], 10) * 1e3 : null; } function re(e) { return typeof e == `string` ? g[e] ?? e.toLowerCase() : _.lookup(e) ?? e.toString(`latin1`).toLowerCase(); } function z(e) { return _.lookup(e) ?? e.toString(`latin1`).toLowerCase(); } function ie(e, t) { t === void 0 && (t = {}); for (let n = 0; n < e.length; n += 2) { let r = re(e[n]), i = t[r]; if (i !== void 0) if (Object.hasOwn(t, r)) typeof i == `string` && (i = [i], t[r] = i), i.push(e[n + 1].toString(`latin1`)); else { let i = typeof e[n + 1] == `string` ? e[n + 1] : Array.isArray(e[n + 1]) ? e[n + 1].map((e) => e.toString(`latin1`)) : e[n + 1].toString(`latin1`); r === `__proto__` ? Object.defineProperty(t, r, { value: i, enumerable: !0, configurable: !0, writable: !0 }) : t[r] = i; } else { let i = typeof e[n + 1] == `string` ? e[n + 1] : Array.isArray(e[n + 1]) ? e[n + 1].map((e) => e.toString(`latin1`)) : e[n + 1].toString(`latin1`); t[r] = i; } } return t; } function ae(e) { let t = e.length, n = Array(t), r, i; for (let a = 0; a < t; a += 2) r = e[a], i = e[a + 1], typeof r != `string` && (r = r.toString()), typeof i != `string` && (i = i.toString(`latin1`)), n[a] = r, n[a + 1] = i; return n; } function oe(e) { if (!Array.isArray(e)) throw TypeError(`expected headers to be an array`); return e.map((e) => Buffer.from(e)); } function se(e) { return e instanceof Uint8Array || Buffer.isBuffer(e); } function ce(e, t, n) { if (!e || typeof e != `object`) throw new m(`handler must be an object`); if (typeof e.onRequestStart != `function`) { if (typeof e.onConnect != `function`) throw new m(`invalid onConnect method`); if (typeof e.onError != `function`) throw new m(`invalid onError method`); if (typeof e.onBodySent != `function` && e.onBodySent !== void 0) throw new m(`invalid onBodySent method`); if (n || t === `CONNECT`) { if (typeof e.onUpgrade != `function`) throw new m(`invalid onUpgrade method`); } else { if (typeof e.onHeaders != `function`) throw new m(`invalid onHeaders method`); if (typeof e.onData != `function`) throw new m(`invalid onData method`); if (typeof e.onComplete != `function`) throw new m(`invalid onComplete method`); } } } function le(e) { return !!(e && (l.isDisturbed(e) || e[a])); } function B(e) { return { localAddress: e.localAddress, localPort: e.localPort, remoteAddress: e.remoteAddress, remotePort: e.remotePort, remoteFamily: e.remoteFamily, timeout: e.timeout, bytesWritten: e.bytesWritten, bytesRead: e.bytesRead }; } function ue(e) { let t; return new ReadableStream({ start() { t = e[Symbol.asyncIterator](); }, pull(e) { return t.next().then(({ done: t, value: n }) => { if (t) return queueMicrotask(() => { e.close(), e.byobRequest?.respond(0); }); { let t = Buffer.isBuffer(n) ? n : Buffer.from(n); return t.byteLength ? e.enqueue(new Uint8Array(t)) : this.pull(e); } }); }, cancel() { return t.return(); }, type: `bytes` }); } function de(e) { return e && typeof e == `object` && typeof e.append == `function` && typeof e.delete == `function` && typeof e.get == `function` && typeof e.getAll == `function` && typeof e.has == `function` && typeof e.set == `function` && e[Symbol.toStringTag] === `FormData`; } function fe(e, t) { return `addEventListener` in e ? (e.addEventListener(`abort`, t, { once: !0 }), () => e.removeEventListener(`abort`, t)) : (e.once(`abort`, t), () => e.removeListener(`abort`, t)); } let V = new Uint8Array([ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]); function pe(e) { return V[e] === 1; } let me = /^[\^_`a-zA-Z\-0-9!#$%&'*+.|~]+$/; function he(e) { if (e.length >= 12) return me.test(e); if (e.length === 0) return !1; for (let t = 0; t < e.length; t++) if (V[e.charCodeAt(t)] !== 1) return !1; return !0; } let ge = /[^\t\x20-\x7e\x80-\xff]/; function H(e) { return !ge.test(e); } let _e = /^bytes (\d+)-(\d+)\/(\d+)?$/; function ve(e) { if (e == null || e === ``) return { start: 0, end: null, size: null }; let t = e ? e.match(_e) : null; return t ? { start: parseInt(t[1]), end: t[2] ? parseInt(t[2]) : null, size: t[3] ? parseInt(t[3]) : null } : null; } function ye(e, t, n) { return (e[o] ??= []).push([t, n]), e.on(t, n), e; } function be(e) { if (e[o] != null) { for (let [t, n] of e[o]) e.removeListener(t, n); e[o] = null; } return e; } function xe(e, t, n) { try { t.onError(n), r(t.aborted); } catch (t) { e.emit(`error`, t); } } let Se = process.platform === `win32` ? (e, t) => { if (!t.timeout) return x; let n = null, r = null, i = p.setFastTimeout(() => { n = setImmediate(() => { r = setImmediate(() => Ce(e.deref(), t)); }); }, t.timeout); return () => { p.clearFastTimeout(i), clearImmediate(n), clearImmediate(r); }; } : (e, t) => { if (!t.timeout) return x; let n = null, r = p.setFastTimeout(() => { n = setImmediate(() => { Ce(e.deref(), t); }); }, t.timeout); return () => { p.clearFastTimeout(r), clearImmediate(n); }; }; function Ce(e, t) { if (e == null) return; let n = `Connect Timeout Error`; Array.isArray(e.autoSelectFamilyAttemptedAddresses) ? n += ` (attempted addresses: ${e.autoSelectFamilyAttemptedAddresses.join(`, `)},` : n += ` (attempted address: ${t.hostname}:${t.port},`, n += ` timeout: ${t.timeout}ms)`, te(e, new h(n)); } function we(e) { if (e[0] === `h` && e[1] === `t` && e[2] === `t` && e[3] === `p`) switch (e[4]) { case `:`: return `http:`; case `s`: if (e[5] === `:`) return `https:`; } return e.slice(0, e.indexOf(`:`) + 1); } let Te = Object.create(null); Te.enumerable = !0; let Ee = { delete: `DELETE`, DELETE: `DELETE`, get: `GET`, GET: `GET`, head: `HEAD`, HEAD: `HEAD`, options: `OPTIONS`, OPTIONS: `OPTIONS`, post: `POST`, POST: `POST`, put: `PUT`, PUT: `PUT` }, U = { ...Ee, patch: `patch`, PATCH: `PATCH` }; Object.setPrototypeOf(Ee, null), Object.setPrototypeOf(U, null), n.exports = { kEnumerableProperty: Te, isDisturbed: le, isBlobLike: w, parseOrigin: A, parseURL: k, getServerName: M, isStream: C, isIterable: F, hasSafeIterator: I, isAsyncIterable: P, isDestroyed: L, headerNameToString: re, bufferToLowerCasedHeaderName: z, addListener: ye, removeAllListeners: be, errorRequest: xe, parseRawHeaders: ae, encodeRawHeaders: oe, parseHeaders: ie, parseKeepAliveTimeout: ne, destroy: te, bodyLength: ee, deepClone: N, ReadableStreamFrom: ue, isBuffer: se, assertRequestHandler: ce, getSocketInfo: B, isFormDataLike: de, pathHasQueryOrFragment: T, serializePathWithQuery: E, addAbortListener: fe, isValidHTTPToken: he, isValidHeaderValue: H, isTokenCharCode: pe, parseRangeHeader: ve, normalizedMethodRecordsBase: Ee, normalizedMethodRecords: U, isValidPort: D, isHttpOrHttpsPrefixed: O, nodeMajor: v, nodeMinor: y, safeHTTPMethods: Object.freeze([ `GET`, `HEAD`, `OPTIONS`, `TRACE` ]), wrapRequestBody: S, setupConnectTimeout: Se, getProtocolFromUrlString: we }; })); var ha$3 = c$12(((e, t) => { let { kConnected: n, kPending: r, kRunning: i, kSize: a, kFree: o, kQueued: s } = da$3(); t.exports = { ClientStats: class { constructor(e) { this.connected = e[n], this.pending = e[r], this.running = e[i], this.size = e[a]; } }, PoolStats: class { constructor(e) { this.connected = e[n], this.free = e[o], this.pending = e[r], this.queued = e[s], this.running = e[i], this.size = e[a]; } } }; })); var ga$3 = c$12(((e, n) => { let r = f$11(`node:diagnostics_channel`), i = f$11(`node:util`), a = i.debuglog(`undici`), o = i.debuglog(`fetch`), s = i.debuglog(`websocket`), c = { beforeConnect: r.channel(`undici:client:beforeConnect`), connected: r.channel(`undici:client:connected`), connectError: r.channel(`undici:client:connectError`), sendHeaders: r.channel(`undici:client:sendHeaders`), create: r.channel(`undici:request:create`), bodySent: r.channel(`undici:request:bodySent`), bodyChunkSent: r.channel(`undici:request:bodyChunkSent`), bodyChunkReceived: r.channel(`undici:request:bodyChunkReceived`), headers: r.channel(`undici:request:headers`), trailers: r.channel(`undici:request:trailers`), error: r.channel(`undici:request:error`), open: r.channel(`undici:websocket:open`), close: r.channel(`undici:websocket:close`), socketError: r.channel(`undici:websocket:socket_error`), ping: r.channel(`undici:websocket:ping`), pong: r.channel(`undici:websocket:pong`), proxyConnected: r.channel(`undici:proxy:connected`) }, l = !1; function u(e = a) { if (!l) { if (c.beforeConnect.hasSubscribers || c.connected.hasSubscribers || c.connectError.hasSubscribers || c.sendHeaders.hasSubscribers) { l = !0; return; } l = !0, r.subscribe(`undici:client:beforeConnect`, (t) => { let { connectParams: { version: n, protocol: r, port: i, host: a } } = t; e(`connecting to %s%s using %s%s`, a, i ? `:${i}` : ``, r, n); }), r.subscribe(`undici:client:connected`, (t) => { let { connectParams: { version: n, protocol: r, port: i, host: a } } = t; e(`connected to %s%s using %s%s`, a, i ? `:${i}` : ``, r, n); }), r.subscribe(`undici:client:connectError`, (t) => { let { connectParams: { version: n, protocol: r, port: i, host: a }, error: o } = t; e(`connection to %s%s using %s%s errored - %s`, a, i ? `:${i}` : ``, r, n, o.message); }), r.subscribe(`undici:client:sendHeaders`, (t) => { let { request: { method: n, path: r, origin: i } } = t; e(`sending request to %s %s%s`, n, i, r); }); } } let d = !1; function f(e = a) { if (!d) { if (c.headers.hasSubscribers || c.trailers.hasSubscribers || c.error.hasSubscribers) { d = !0; return; } d = !0, r.subscribe(`undici:request:headers`, (t) => { let { request: { method: n, path: r, origin: i }, response: { statusCode: a } } = t; e(`received response to %s %s%s - HTTP %d`, n, i, r, a); }), r.subscribe(`undici:request:trailers`, (t) => { let { request: { method: n, path: r, origin: i } } = t; e(`trailers received from %s %s%s`, n, i, r); }), r.subscribe(`undici:request:error`, (t) => { let { request: { method: n, path: r, origin: i }, error: a } = t; e(`request to %s %s%s errored - %s`, n, i, r, a.message); }); } } let p = !1; function m(e = s) { if (!p) { if (c.open.hasSubscribers || c.close.hasSubscribers || c.socketError.hasSubscribers || c.ping.hasSubscribers || c.pong.hasSubscribers) { p = !0; return; } p = !0, r.subscribe(`undici:websocket:open`, (t) => { if (t.address != null) { let { address: n, port: r } = t.address; e(`connection opened %s%s`, n, r ? `:${r}` : ``); } else e(`connection opened`); }), r.subscribe(`undici:websocket:close`, (t) => { let { websocket: n, code: r, reason: i } = t; e(`closed connection to %s - %s %s`, n.url, r, i); }), r.subscribe(`undici:websocket:socket_error`, (t) => { e(`connection errored - %s`, t.message); }), r.subscribe(`undici:websocket:ping`, (t) => { e(`ping received`); }), r.subscribe(`undici:websocket:pong`, (t) => { e(`pong received`); }); } } (a.enabled || o.enabled) && (u(o.enabled ? o : a), f(o.enabled ? o : a)), s.enabled && (u(a.enabled ? a : s), m(s)), n.exports = { channels: c }; })); var _a$3 = c$12(((e, n) => { let { InvalidArgumentError: r, NotSupportedError: i } = K$6(), a = f$11(`node:assert`), { isValidHTTPToken: o, isValidHeaderValue: s, isStream: c, destroy: l, isBuffer: u, isFormDataLike: d, isIterable: f, hasSafeIterator: p, isBlobLike: m, serializePathWithQuery: h, assertRequestHandler: g, getServerName: _, normalizedMethodRecords: v, getProtocolFromUrlString: y } = q$6(), { channels: b } = ga$3(), { headerNameLowerCasedRecord: x } = pa$3(), S = /[^\u0021-\u00ff]/; function C(e) { if (typeof e != `string` || e.length === 0) return !1; for (let t = 0; t < e.length; t++) { let n = e.charCodeAt(t); if (n < 48 || n > 57) return !1; } return !0; } let w = Symbol(`handler`); var T = class { constructor(e, { path: t, method: n, body: i, headers: a, query: x, idempotent: C, blocking: T, upgrade: D, headersTimeout: O, bodyTimeout: k, reset: A, expectContinue: j, servername: M, throwOnError: N, maxRedirections: P, typeOfService: F }, I) { if (typeof t != `string`) throw new r(`path must be a string`); if (t[0] !== `/` && !(t.startsWith(`http://`) || t.startsWith(`https://`)) && n !== `CONNECT`) throw new r(`path must be an absolute URL or start with a slash`); if (S.test(t)) throw new r(`invalid request path`); if (typeof n != `string`) throw new r(`method must be a string`); if (v[n] === void 0 && !o(n)) throw new r(`invalid request method`); if (D && typeof D != `string`) throw new r(`upgrade must be a string`); if (D && !s(D)) throw new r(`invalid upgrade header`); if (O != null && (!Number.isFinite(O) || O < 0)) throw new r(`invalid headersTimeout`); if (k != null && (!Number.isFinite(k) || k < 0)) throw new r(`invalid bodyTimeout`); if (A != null && typeof A != `boolean`) throw new r(`invalid reset`); if (j != null && typeof j != `boolean`) throw new r(`invalid expectContinue`); if (N != null) throw new r(`invalid throwOnError`); if (P != null && P !== 0) throw new r(`maxRedirections is not supported, use the redirect interceptor`); if (F != null && (!Number.isInteger(F) || F < 0 || F > 255)) throw new r(`typeOfService must be an integer between 0 and 255`); if (this.headersTimeout = O, this.bodyTimeout = k, this.method = n, this.typeOfService = F ?? 0, this.abort = null, i == null) this.body = null; else if (c(i)) { this.body = i; let e = this.body._readableState; (!e || !e.autoDestroy) && (this.endHandler = function() { l(this); }, this.body.on(`end`, this.endHandler)), this.errorHandler = (e) => { this.abort ? this.abort(e) : this.error = e; }, this.body.on(`error`, this.errorHandler); } else if (u(i)) this.body = i.byteLength ? i : null; else if (ArrayBuffer.isView(i)) this.body = i.buffer.byteLength ? Buffer.from(i.buffer, i.byteOffset, i.byteLength) : null; else if (i instanceof ArrayBuffer) this.body = i.byteLength ? Buffer.from(i) : null; else if (typeof i == `string`) this.body = i.length ? Buffer.from(i) : null; else if (d(i) || f(i) || m(i)) this.body = i; else throw new r(`body must be a string, a Buffer, a Readable stream, an iterable, or an async iterable`); if (this.completed = !1, this.aborted = !1, this.upgrade = D || null, this.path = x ? h(t, x) : t, this.origin = e, this.protocol = y(e), this.idempotent = C ?? (n === `HEAD` || n === `GET`), this.blocking = T ?? this.method !== `HEAD`, this.reset = A ?? null, this.host = null, this.contentLength = null, this.contentType = null, this.headers = [], this.expectContinue = j ?? !1, Array.isArray(a)) { if (a.length % 2 != 0) throw new r(`headers array must be even`); for (let e = 0; e < a.length; e += 2) E(this, a[e], a[e + 1]); } else if (a && typeof a == `object`) if (p(a)) for (let e of a) { if (!Array.isArray(e) || e.length !== 2) throw new r(`headers must be in key-value pair format`); E(this, e[0], e[1]); } else { let e = Object.keys(a); for (let t = 0; t < e.length; ++t) E(this, e[t], a[e[t]]); } else if (a != null) throw new r(`headers must be an object or an array`); g(I, n, D), this.servername = M || _(this.host) || null, this[w] = I, b.create.hasSubscribers && b.create.publish({ request: this }); } onBodySent(e) { if (b.bodyChunkSent.hasSubscribers && b.bodyChunkSent.publish({ request: this, chunk: e }), this[w].onBodySent) try { return this[w].onBodySent(e); } catch (e) { this.abort(e); } } onRequestSent() { if (b.bodySent.hasSubscribers && b.bodySent.publish({ request: this }), this[w].onRequestSent) try { return this[w].onRequestSent(); } catch (e) { this.abort(e); } } onConnect(e) { if (a(!this.aborted), a(!this.completed), this.error) e(this.error); else return this.abort = e, this[w].onConnect(e); } onResponseStarted() { return this[w].onResponseStarted?.(); } onHeaders(e, t, n, r) { a(!this.aborted), a(!this.completed), b.headers.hasSubscribers && b.headers.publish({ request: this, response: { statusCode: e, headers: t, statusText: r } }); try { return this[w].onHeaders(e, t, n, r); } catch (e) { this.abort(e); } } onData(e) { a(!this.aborted), a(!this.completed), b.bodyChunkReceived.hasSubscribers && b.bodyChunkReceived.publish({ request: this, chunk: e }); try { return this[w].onData(e); } catch (e) { return this.abort(e), !1; } } onUpgrade(e, t, n) { return a(!this.aborted), a(!this.completed), this[w].onUpgrade(e, t, n); } onComplete(e) { this.onFinally(), a(!this.aborted), a(!this.completed), this.completed = !0, b.trailers.hasSubscribers && b.trailers.publish({ request: this, trailers: e }); try { return this[w].onComplete(e); } catch (e) { this.onError(e); } } onError(e) { if (this.onFinally(), b.error.hasSubscribers && b.error.publish({ request: this, error: e }), !this.aborted) return this.aborted = !0, this[w].onError(e); } onFinally() { this.errorHandler &&= (this.body.off(`error`, this.errorHandler), null), this.endHandler &&= (this.body.off(`end`, this.endHandler), null); } addHeader(e, t) { return E(this, e, t), this; } }; function E(e, t, n) { if (n && typeof n == `object` && !Array.isArray(n)) throw new r(`invalid ${t} header`); if (n === void 0) return; let a = x[t]; if (a === void 0 && (a = t.toLowerCase(), x[a] === void 0 && !o(a))) throw new r(`invalid header key`); if (Array.isArray(n)) { let e = []; for (let i = 0; i < n.length; i++) if (typeof n[i] == `string`) { if (!s(n[i])) throw new r(`invalid ${t} header`); e.push(n[i]); } else if (n[i] === null) e.push(``); else if (typeof n[i] == `object`) throw new r(`invalid ${t} header`); else e.push(`${n[i]}`); n = e; } else if (typeof n == `string`) { if (!s(n)) throw new r(`invalid ${t} header`); } else n = n === null ? `` : `${n}`; if (a === `host`) { if (e.host !== null) throw new r(`duplicate host header`); if (typeof n != `string`) throw new r(`invalid host header`); e.host = n; } else if (a === `content-length`) { if (e.contentLength !== null) throw new r(`duplicate content-length header`); if (!C(n)) throw new r(`invalid content-length header`); e.contentLength = parseInt(n, 10); } else if (e.contentType === null && a === `content-type`) e.contentType = n, e.headers.push(t, n); else if (a === `transfer-encoding` || a === `keep-alive` || a === `upgrade`) throw new r(`invalid ${a} header`); else if (a === `connection`) { let t = typeof n == `string` ? n : null; if (t === null) throw new r(`invalid connection header`); for (let n of t.toLowerCase().split(`,`)) { let t = n.trim(); if (!o(t)) throw new r(`invalid connection header`); t === `close` && (e.reset = !0); } } else if (a === `expect`) throw new i(`expect header not supported`); else e.headers.push(t, n); } n.exports = T; })); var va$3 = c$12(((e, t) => { let { InvalidArgumentError: n } = K$6(); t.exports = class e { #e; constructor(e) { this.#e = e; } static wrap(t) { return t.onRequestStart ? t : new e(t); } onConnect(e, t) { return this.#e.onConnect?.(e, t); } onResponseStarted() { return this.#e.onResponseStarted?.(); } onHeaders(e, t, n, r) { return this.#e.onHeaders?.(e, t, n, r); } onUpgrade(e, t, n) { return this.#e.onUpgrade?.(e, t, n); } onData(e) { return this.#e.onData?.(e); } onComplete(e) { return this.#e.onComplete?.(e); } onError(e) { if (!this.#e.onError) throw e; return this.#e.onError?.(e); } onRequestStart(e, t) { this.#e.onConnect?.((t) => e.abort(t), t); } onRequestUpgrade(e, t, n, i) { let a = []; for (let [e, t] of Object.entries(n)) a.push(Buffer.from(e, `latin1`), r(t)); this.#e.onUpgrade?.(t, a, i); } onResponseStart(e, t, n, i) { let a = []; for (let [e, t] of Object.entries(n)) a.push(Buffer.from(e, `latin1`), r(t)); this.#e.onHeaders?.(t, a, () => e.resume(), i) === !1 && e.pause(); } onResponseData(e, t) { this.#e.onData?.(t) === !1 && e.pause(); } onResponseEnd(e, t) { let n = []; for (let [e, i] of Object.entries(t)) n.push(Buffer.from(e, `latin1`), r(i)); this.#e.onComplete?.(n); } onResponseError(e, t) { if (!this.#e.onError) throw new n(`invalid onError method`); this.#e.onError?.(t); } }; function r(e) { return Array.isArray(e) ? e.map((e) => Buffer.from(e, `latin1`)) : Buffer.from(e, `latin1`); } })); var ya$3 = c$12(((e, n) => { let r = f$11(`node:events`), i = va$3(), a = (e) => (t, n) => e(t, i.wrap(n)); n.exports = class extends r { dispatch() { throw Error(`not implemented`); } close() { throw Error(`not implemented`); } destroy() { throw Error(`not implemented`); } compose(...e) { let t = Array.isArray(e[0]) ? e[0] : e, n = this.dispatch.bind(this); for (let e of t) if (e != null) { if (typeof e != `function`) throw TypeError(`invalid interceptor, expected function received ${typeof e}`); if (n = e(n), n = a(n), n == null || typeof n != `function` || n.length !== 2) throw TypeError(`invalid interceptor`); } return new Proxy(this, { get: (e, t) => t === `dispatch` ? n : e[t] }); } }; })); var ba$3 = c$12(((e, t) => { let { parseHeaders: n } = q$6(), { InvalidArgumentError: r } = K$6(), i = Symbol(`resume`); var a = class { #e = !1; #t = null; #n = !1; #r; [i] = null; rawHeaders = null; rawTrailers = null; constructor(e) { this.#r = e; } pause() { this.#e = !0; } resume() { this.#e && (this.#e = !1, this[i]?.()); } abort(e) { this.#n || (this.#n = !0, this.#t = e, this.#r(e)); } get aborted() { return this.#n; } get reason() { return this.#t; } get paused() { return this.#e; } }; t.exports = class e { #e; #t; constructor(e) { this.#e = e; } static unwrap(t) { return t.onRequestStart ? new e(t) : t; } onConnect(e, t) { this.#t = new a(e), this.#e.onRequestStart?.(this.#t, t); } onResponseStarted() { return this.#e.onResponseStarted?.(); } onUpgrade(e, t, r) { this.#t.rawHeaders = t, this.#e.onRequestUpgrade?.(this.#t, e, n(t), r); } onHeaders(e, t, r, a) { return this.#t[i] = r, this.#t.rawHeaders = t, this.#e.onResponseStart?.(this.#t, e, n(t), a), !this.#t.paused; } onData(e) { return this.#e.onResponseData?.(this.#t, e), !this.#t.paused; } onComplete(e) { this.#t.rawTrailers = e, this.#e.onResponseEnd?.(this.#t, n(e)); } onError(e) { if (!this.#e.onResponseError) throw new r(`invalid onError method`); this.#e.onResponseError?.(this.#t, e); } }; })); var xa$3 = c$12(((e, t) => { let n = ya$3(), r = ba$3(), { ClientDestroyedError: i, ClientClosedError: a, InvalidArgumentError: o } = K$6(), { kDestroy: s, kClose: c, kClosed: l, kDestroyed: u, kDispatch: d } = da$3(), f = Symbol(`onDestroyed`), p = Symbol(`onClosed`), m = Symbol(`webSocketOptions`); t.exports = class extends n { [u] = !1; [f] = null; [l] = !1; [p] = null; constructor(e) { super(), this[m] = e?.webSocket ?? {}; } get webSocketOptions() { return { maxFragments: this[m].maxFragments ?? 131072, maxPayloadSize: this[m].maxPayloadSize ?? 128 * 1024 * 1024 }; } get destroyed() { return this[u]; } get closed() { return this[l]; } close(e) { if (e === void 0) return new Promise((e, t) => { this.close((n, r) => n ? t(n) : e(r)); }); if (typeof e != `function`) throw new o(`invalid callback`); if (this[u]) { let t = new i(); queueMicrotask(() => e(t, null)); return; } if (this[l]) { this[p] ? this[p].push(e) : queueMicrotask(() => e(null, null)); return; } this[l] = !0, this[p] ??= [], this[p].push(e); let t = () => { let e = this[p]; this[p] = null; for (let t = 0; t < e.length; t++) e[t](null, null); }; this[c]().then(() => this.destroy()).then(() => queueMicrotask(t)); } destroy(e, t) { if (typeof e == `function` && (t = e, e = null), t === void 0) return new Promise((t, n) => { this.destroy(e, (e, r) => e ? n(e) : t(r)); }); if (typeof t != `function`) throw new o(`invalid callback`); if (this[u]) { this[f] ? this[f].push(t) : queueMicrotask(() => t(null, null)); return; } e ||= new i(), this[u] = !0, this[f] ??= [], this[f].push(t); let n = () => { let e = this[f]; this[f] = null; for (let t = 0; t < e.length; t++) e[t](null, null); }; this[s](e).then(() => queueMicrotask(n)); } dispatch(e, t) { if (!t || typeof t != `object`) throw new o(`handler must be an object`); t = r.unwrap(t); try { if (!e || typeof e != `object`) throw new o(`opts must be an object.`); if (this[u] || this[f]) throw new i(); if (this[l]) throw new a(); return this[d](e, t); } catch (e) { if (typeof t.onError != `function`) throw e; return t.onError(e), !1; } } }; })); var Sa$3 = c$12(((e, n) => { let r = f$11(`node:net`), i = f$11(`node:assert`), a = q$6(), { InvalidArgumentError: o } = K$6(), s, c = class { constructor(e) { this._maxCachedSessions = e, this._sessionCache = /* @__PURE__ */ new Map(), this._sessionRegistry = new FinalizationRegistry((e) => { if (this._sessionCache.size < this._maxCachedSessions) return; let t = this._sessionCache.get(e); t !== void 0 && t.deref() === void 0 && this._sessionCache.delete(e); }); } get(e) { let t = this._sessionCache.get(e); return t ? t.deref() : null; } set(e, t) { if (this._maxCachedSessions !== 0) { if (this._sessionCache.has(e)) this._sessionCache.delete(e); else if (this._sessionCache.size >= this._maxCachedSessions) { for (let [e, t] of this._sessionCache) if (t.deref() === void 0) { this._sessionCache.delete(e); return; } let e = this._sessionCache.keys().next(); e.done || this._sessionCache.delete(e.value); } this._sessionCache.set(e, new WeakRef(t)), this._sessionRegistry.register(t, e); } } }; function l({ allowH2: e, useH2c: n, maxCachedSessions: l, socketPath: u, timeout: d, session: f, ...p }) { if (l != null && (!Number.isInteger(l) || l < 0)) throw new o(`maxCachedSessions must be a positive integer or zero`); let m = { path: u, ...p }, h = new c(l ?? 100); return d ??= 1e4, e ??= !1, function({ hostname: o, host: c, protocol: l, port: u, servername: p, localAddress: g, httpSocket: _ }, v) { let y; if (l === `https:`) { s ||= f$11(`node:tls`), p = p || m.servername || a.getServerName(c) || null; let n = p || o; i(n); let r = f || h.get(n) || null; u ||= 443, y = s.connect({ highWaterMark: 16384, ...m, servername: p, session: r, localAddress: g, ALPNProtocols: e ? [`http/1.1`, `h2`] : [`http/1.1`], socket: _, port: u, host: o }), y.on(`session`, function(e) { h.set(n, e); }); } else i(!_, `httpSocket can only be sent on TLS update`), u ||= 80, y = r.connect({ highWaterMark: 64 * 1024, ...m, localAddress: g, port: u, host: o }), n === !0 && (y.alpnProtocol = `h2`); if (m.keepAlive == null || m.keepAlive) { let e = m.keepAliveInitialDelay === void 0 ? 6e4 : m.keepAliveInitialDelay; y.setKeepAlive(!0, e); } let b = a.setupConnectTimeout(new WeakRef(y), { timeout: d, hostname: o, port: u }); return y.setNoDelay(!0).once(l === `https:` ? `secureConnect` : `connect`, function() { if (queueMicrotask(b), v) { let e = v; v = null, e(null, this); } }).on(`error`, function(e) { if (queueMicrotask(b), v) { let t = v; v = null, t(e); } }), y; }; } n.exports = l; })); var Ca$3 = c$12(((e) => { Object.defineProperty(e, "__esModule", { value: !0 }), e.enumToMap = t; function t(e, t = [], n = []) { let r = (t?.length ?? 0) === 0, i = (n?.length ?? 0) === 0; return Object.fromEntries(Object.entries(e).filter(([, e]) => typeof e == `number` && (r || t.includes(e)) && (i || !n.includes(e)))); } })); var wa$3 = c$12(((e) => { Object.defineProperty(e, "__esModule", { value: !0 }), e.SPECIAL_HEADERS = e.MINOR = e.MAJOR = e.HTAB_SP_VCHAR_OBS_TEXT = e.QUOTED_STRING = e.CONNECTION_TOKEN_CHARS = e.HEADER_CHARS = e.TOKEN = e.HEX = e.URL_CHAR = e.USERINFO_CHARS = e.MARK = e.ALPHANUM = e.NUM = e.HEX_MAP = e.NUM_MAP = e.ALPHA = e.STATUSES_HTTP = e.H_METHOD_MAP = e.METHOD_MAP = e.METHODS_RTSP = e.METHODS_ICE = e.METHODS_HTTP = e.HEADER_STATE = e.FINISH = e.STATUSES = e.METHODS = e.LENIENT_FLAGS = e.FLAGS = e.TYPE = e.ERROR = void 0; let t = Ca$3(); e.ERROR = { OK: 0, INTERNAL: 1, STRICT: 2, CR_EXPECTED: 25, LF_EXPECTED: 3, UNEXPECTED_CONTENT_LENGTH: 4, UNEXPECTED_SPACE: 30, CLOSED_CONNECTION: 5, INVALID_METHOD: 6, INVALID_URL: 7, INVALID_CONSTANT: 8, INVALID_VERSION: 9, INVALID_HEADER_TOKEN: 10, INVALID_CONTENT_LENGTH: 11, INVALID_CHUNK_SIZE: 12, INVALID_STATUS: 13, INVALID_EOF_STATE: 14, INVALID_TRANSFER_ENCODING: 15, CB_MESSAGE_BEGIN: 16, CB_HEADERS_COMPLETE: 17, CB_MESSAGE_COMPLETE: 18, CB_CHUNK_HEADER: 19, CB_CHUNK_COMPLETE: 20, PAUSED: 21, PAUSED_UPGRADE: 22, PAUSED_H2_UPGRADE: 23, USER: 24, CB_URL_COMPLETE: 26, CB_STATUS_COMPLETE: 27, CB_METHOD_COMPLETE: 32, CB_VERSION_COMPLETE: 33, CB_HEADER_FIELD_COMPLETE: 28, CB_HEADER_VALUE_COMPLETE: 29, CB_CHUNK_EXTENSION_NAME_COMPLETE: 34, CB_CHUNK_EXTENSION_VALUE_COMPLETE: 35, CB_RESET: 31, CB_PROTOCOL_COMPLETE: 38 }, e.TYPE = { BOTH: 0, REQUEST: 1, RESPONSE: 2 }, e.FLAGS = { CONNECTION_KEEP_ALIVE: 1, CONNECTION_CLOSE: 2, CONNECTION_UPGRADE: 4, CHUNKED: 8, UPGRADE: 16, CONTENT_LENGTH: 32, SKIPBODY: 64, TRAILING: 128, TRANSFER_ENCODING: 512 }, e.LENIENT_FLAGS = { HEADERS: 1, CHUNKED_LENGTH: 2, KEEP_ALIVE: 4, TRANSFER_ENCODING: 8, VERSION: 16, DATA_AFTER_CLOSE: 32, OPTIONAL_LF_AFTER_CR: 64, OPTIONAL_CRLF_AFTER_CHUNK: 128, OPTIONAL_CR_BEFORE_LF: 256, SPACES_AFTER_CHUNK_SIZE: 512 }, e.METHODS = { DELETE: 0, GET: 1, HEAD: 2, POST: 3, PUT: 4, CONNECT: 5, OPTIONS: 6, TRACE: 7, COPY: 8, LOCK: 9, MKCOL: 10, MOVE: 11, PROPFIND: 12, PROPPATCH: 13, SEARCH: 14, UNLOCK: 15, BIND: 16, REBIND: 17, UNBIND: 18, ACL: 19, REPORT: 20, MKACTIVITY: 21, CHECKOUT: 22, MERGE: 23, "M-SEARCH": 24, NOTIFY: 25, SUBSCRIBE: 26, UNSUBSCRIBE: 27, PATCH: 28, PURGE: 29, MKCALENDAR: 30, LINK: 31, UNLINK: 32, SOURCE: 33, PRI: 34, DESCRIBE: 35, ANNOUNCE: 36, SETUP: 37, PLAY: 38, PAUSE: 39, TEARDOWN: 40, GET_PARAMETER: 41, SET_PARAMETER: 42, REDIRECT: 43, RECORD: 44, FLUSH: 45, QUERY: 46 }, e.STATUSES = { CONTINUE: 100, SWITCHING_PROTOCOLS: 101, PROCESSING: 102, EARLY_HINTS: 103, RESPONSE_IS_STALE: 110, REVALIDATION_FAILED: 111, DISCONNECTED_OPERATION: 112, HEURISTIC_EXPIRATION: 113, MISCELLANEOUS_WARNING: 199, OK: 200, CREATED: 201, ACCEPTED: 202, NON_AUTHORITATIVE_INFORMATION: 203, NO_CONTENT: 204, RESET_CONTENT: 205, PARTIAL_CONTENT: 206, MULTI_STATUS: 207, ALREADY_REPORTED: 208, TRANSFORMATION_APPLIED: 214, IM_USED: 226, MISCELLANEOUS_PERSISTENT_WARNING: 299, MULTIPLE_CHOICES: 300, MOVED_PERMANENTLY: 301, FOUND: 302, SEE_OTHER: 303, NOT_MODIFIED: 304, USE_PROXY: 305, SWITCH_PROXY: 306, TEMPORARY_REDIRECT: 307, PERMANENT_REDIRECT: 308, BAD_REQUEST: 400, UNAUTHORIZED: 401, PAYMENT_REQUIRED: 402, FORBIDDEN: 403, NOT_FOUND: 404, METHOD_NOT_ALLOWED: 405, NOT_ACCEPTABLE: 406, PROXY_AUTHENTICATION_REQUIRED: 407, REQUEST_TIMEOUT: 408, CONFLICT: 409, GONE: 410, LENGTH_REQUIRED: 411, PRECONDITION_FAILED: 412, PAYLOAD_TOO_LARGE: 413, URI_TOO_LONG: 414, UNSUPPORTED_MEDIA_TYPE: 415, RANGE_NOT_SATISFIABLE: 416, EXPECTATION_FAILED: 417, IM_A_TEAPOT: 418, PAGE_EXPIRED: 419, ENHANCE_YOUR_CALM: 420, MISDIRECTED_REQUEST: 421, UNPROCESSABLE_ENTITY: 422, LOCKED: 423, FAILED_DEPENDENCY: 424, TOO_EARLY: 425, UPGRADE_REQUIRED: 426, PRECONDITION_REQUIRED: 428, TOO_MANY_REQUESTS: 429, REQUEST_HEADER_FIELDS_TOO_LARGE_UNOFFICIAL: 430, REQUEST_HEADER_FIELDS_TOO_LARGE: 431, LOGIN_TIMEOUT: 440, NO_RESPONSE: 444, RETRY_WITH: 449, BLOCKED_BY_PARENTAL_CONTROL: 450, UNAVAILABLE_FOR_LEGAL_REASONS: 451, CLIENT_CLOSED_LOAD_BALANCED_REQUEST: 460, INVALID_X_FORWARDED_FOR: 463, REQUEST_HEADER_TOO_LARGE: 494, SSL_CERTIFICATE_ERROR: 495, SSL_CERTIFICATE_REQUIRED: 496, HTTP_REQUEST_SENT_TO_HTTPS_PORT: 497, INVALID_TOKEN: 498, CLIENT_CLOSED_REQUEST: 499, INTERNAL_SERVER_ERROR: 500, NOT_IMPLEMENTED: 501, BAD_GATEWAY: 502, SERVICE_UNAVAILABLE: 503, GATEWAY_TIMEOUT: 504, HTTP_VERSION_NOT_SUPPORTED: 505, VARIANT_ALSO_NEGOTIATES: 506, INSUFFICIENT_STORAGE: 507, LOOP_DETECTED: 508, BANDWIDTH_LIMIT_EXCEEDED: 509, NOT_EXTENDED: 510, NETWORK_AUTHENTICATION_REQUIRED: 511, WEB_SERVER_UNKNOWN_ERROR: 520, WEB_SERVER_IS_DOWN: 521, CONNECTION_TIMEOUT: 522, ORIGIN_IS_UNREACHABLE: 523, TIMEOUT_OCCURED: 524, SSL_HANDSHAKE_FAILED: 525, INVALID_SSL_CERTIFICATE: 526, RAILGUN_ERROR: 527, SITE_IS_OVERLOADED: 529, SITE_IS_FROZEN: 530, IDENTITY_PROVIDER_AUTHENTICATION_ERROR: 561, NETWORK_READ_TIMEOUT: 598, NETWORK_CONNECT_TIMEOUT: 599 }, e.FINISH = { SAFE: 0, SAFE_WITH_CB: 1, UNSAFE: 2 }, e.HEADER_STATE = { GENERAL: 0, CONNECTION: 1, CONTENT_LENGTH: 2, TRANSFER_ENCODING: 3, UPGRADE: 4, CONNECTION_KEEP_ALIVE: 5, CONNECTION_CLOSE: 6, CONNECTION_UPGRADE: 7, TRANSFER_ENCODING_CHUNKED: 8 }, e.METHODS_HTTP = [ e.METHODS.DELETE, e.METHODS.GET, e.METHODS.HEAD, e.METHODS.POST, e.METHODS.PUT, e.METHODS.CONNECT, e.METHODS.OPTIONS, e.METHODS.TRACE, e.METHODS.COPY, e.METHODS.LOCK, e.METHODS.MKCOL, e.METHODS.MOVE, e.METHODS.PROPFIND, e.METHODS.PROPPATCH, e.METHODS.SEARCH, e.METHODS.UNLOCK, e.METHODS.BIND, e.METHODS.REBIND, e.METHODS.UNBIND, e.METHODS.ACL, e.METHODS.REPORT, e.METHODS.MKACTIVITY, e.METHODS.CHECKOUT, e.METHODS.MERGE, e.METHODS[`M-SEARCH`], e.METHODS.NOTIFY, e.METHODS.SUBSCRIBE, e.METHODS.UNSUBSCRIBE, e.METHODS.PATCH, e.METHODS.PURGE, e.METHODS.MKCALENDAR, e.METHODS.LINK, e.METHODS.UNLINK, e.METHODS.PRI, e.METHODS.SOURCE, e.METHODS.QUERY ], e.METHODS_ICE = [e.METHODS.SOURCE], e.METHODS_RTSP = [ e.METHODS.OPTIONS, e.METHODS.DESCRIBE, e.METHODS.ANNOUNCE, e.METHODS.SETUP, e.METHODS.PLAY, e.METHODS.PAUSE, e.METHODS.TEARDOWN, e.METHODS.GET_PARAMETER, e.METHODS.SET_PARAMETER, e.METHODS.REDIRECT, e.METHODS.RECORD, e.METHODS.FLUSH, e.METHODS.GET, e.METHODS.POST ], e.METHOD_MAP = (0, t.enumToMap)(e.METHODS), e.H_METHOD_MAP = Object.fromEntries(Object.entries(e.METHODS).filter(([e]) => e.startsWith(`H`))), e.STATUSES_HTTP = [ e.STATUSES.CONTINUE, e.STATUSES.SWITCHING_PROTOCOLS, e.STATUSES.PROCESSING, e.STATUSES.EARLY_HINTS, e.STATUSES.RESPONSE_IS_STALE, e.STATUSES.REVALIDATION_FAILED, e.STATUSES.DISCONNECTED_OPERATION, e.STATUSES.HEURISTIC_EXPIRATION, e.STATUSES.MISCELLANEOUS_WARNING, e.STATUSES.OK, e.STATUSES.CREATED, e.STATUSES.ACCEPTED, e.STATUSES.NON_AUTHORITATIVE_INFORMATION, e.STATUSES.NO_CONTENT, e.STATUSES.RESET_CONTENT, e.STATUSES.PARTIAL_CONTENT, e.STATUSES.MULTI_STATUS, e.STATUSES.ALREADY_REPORTED, e.STATUSES.TRANSFORMATION_APPLIED, e.STATUSES.IM_USED, e.STATUSES.MISCELLANEOUS_PERSISTENT_WARNING, e.STATUSES.MULTIPLE_CHOICES, e.STATUSES.MOVED_PERMANENTLY, e.STATUSES.FOUND, e.STATUSES.SEE_OTHER, e.STATUSES.NOT_MODIFIED, e.STATUSES.USE_PROXY, e.STATUSES.SWITCH_PROXY, e.STATUSES.TEMPORARY_REDIRECT, e.STATUSES.PERMANENT_REDIRECT, e.STATUSES.BAD_REQUEST, e.STATUSES.UNAUTHORIZED, e.STATUSES.PAYMENT_REQUIRED, e.STATUSES.FORBIDDEN, e.STATUSES.NOT_FOUND, e.STATUSES.METHOD_NOT_ALLOWED, e.STATUSES.NOT_ACCEPTABLE, e.STATUSES.PROXY_AUTHENTICATION_REQUIRED, e.STATUSES.REQUEST_TIMEOUT, e.STATUSES.CONFLICT, e.STATUSES.GONE, e.STATUSES.LENGTH_REQUIRED, e.STATUSES.PRECONDITION_FAILED, e.STATUSES.PAYLOAD_TOO_LARGE, e.STATUSES.URI_TOO_LONG, e.STATUSES.UNSUPPORTED_MEDIA_TYPE, e.STATUSES.RANGE_NOT_SATISFIABLE, e.STATUSES.EXPECTATION_FAILED, e.STATUSES.IM_A_TEAPOT, e.STATUSES.PAGE_EXPIRED, e.STATUSES.ENHANCE_YOUR_CALM, e.STATUSES.MISDIRECTED_REQUEST, e.STATUSES.UNPROCESSABLE_ENTITY, e.STATUSES.LOCKED, e.STATUSES.FAILED_DEPENDENCY, e.STATUSES.TOO_EARLY, e.STATUSES.UPGRADE_REQUIRED, e.STATUSES.PRECONDITION_REQUIRED, e.STATUSES.TOO_MANY_REQUESTS, e.STATUSES.REQUEST_HEADER_FIELDS_TOO_LARGE_UNOFFICIAL, e.STATUSES.REQUEST_HEADER_FIELDS_TOO_LARGE, e.STATUSES.LOGIN_TIMEOUT, e.STATUSES.NO_RESPONSE, e.STATUSES.RETRY_WITH, e.STATUSES.BLOCKED_BY_PARENTAL_CONTROL, e.STATUSES.UNAVAILABLE_FOR_LEGAL_REASONS, e.STATUSES.CLIENT_CLOSED_LOAD_BALANCED_REQUEST, e.STATUSES.INVALID_X_FORWARDED_FOR, e.STATUSES.REQUEST_HEADER_TOO_LARGE, e.STATUSES.SSL_CERTIFICATE_ERROR, e.STATUSES.SSL_CERTIFICATE_REQUIRED, e.STATUSES.HTTP_REQUEST_SENT_TO_HTTPS_PORT, e.STATUSES.INVALID_TOKEN, e.STATUSES.CLIENT_CLOSED_REQUEST, e.STATUSES.INTERNAL_SERVER_ERROR, e.STATUSES.NOT_IMPLEMENTED, e.STATUSES.BAD_GATEWAY, e.STATUSES.SERVICE_UNAVAILABLE, e.STATUSES.GATEWAY_TIMEOUT, e.STATUSES.HTTP_VERSION_NOT_SUPPORTED, e.STATUSES.VARIANT_ALSO_NEGOTIATES, e.STATUSES.INSUFFICIENT_STORAGE, e.STATUSES.LOOP_DETECTED, e.STATUSES.BANDWIDTH_LIMIT_EXCEEDED, e.STATUSES.NOT_EXTENDED, e.STATUSES.NETWORK_AUTHENTICATION_REQUIRED, e.STATUSES.WEB_SERVER_UNKNOWN_ERROR, e.STATUSES.WEB_SERVER_IS_DOWN, e.STATUSES.CONNECTION_TIMEOUT, e.STATUSES.ORIGIN_IS_UNREACHABLE, e.STATUSES.TIMEOUT_OCCURED, e.STATUSES.SSL_HANDSHAKE_FAILED, e.STATUSES.INVALID_SSL_CERTIFICATE, e.STATUSES.RAILGUN_ERROR, e.STATUSES.SITE_IS_OVERLOADED, e.STATUSES.SITE_IS_FROZEN, e.STATUSES.IDENTITY_PROVIDER_AUTHENTICATION_ERROR, e.STATUSES.NETWORK_READ_TIMEOUT, e.STATUSES.NETWORK_CONNECT_TIMEOUT ], e.ALPHA = []; for (let t = 65; t <= 90; t++) e.ALPHA.push(String.fromCharCode(t)), e.ALPHA.push(String.fromCharCode(t + 32)); e.NUM_MAP = { 0: 0, 1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7, 8: 8, 9: 9 }, e.HEX_MAP = { 0: 0, 1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7, 8: 8, 9: 9, A: 10, B: 11, C: 12, D: 13, E: 14, F: 15, a: 10, b: 11, c: 12, d: 13, e: 14, f: 15 }, e.NUM = [ `0`, `1`, `2`, `3`, `4`, `5`, `6`, `7`, `8`, `9` ], e.ALPHANUM = e.ALPHA.concat(e.NUM), e.MARK = [ `-`, `_`, `.`, `!`, `~`, `*`, `'`, `(`, `)` ], e.USERINFO_CHARS = e.ALPHANUM.concat(e.MARK).concat([ `%`, `;`, `:`, `&`, `=`, `+`, `$`, `,` ]), e.URL_CHAR = `!"$%&'()*+,-./:;<=>@[\\]^_\`{|}~`.split(``).concat(e.ALPHANUM), e.HEX = e.NUM.concat([ `a`, `b`, `c`, `d`, `e`, `f`, `A`, `B`, `C`, `D`, `E`, `F` ]), e.TOKEN = [ `!`, `#`, `$`, `%`, `&`, `'`, `*`, `+`, `-`, `.`, `^`, `_`, "`", `|`, `~` ].concat(e.ALPHANUM), e.HEADER_CHARS = [` `]; for (let t = 32; t <= 255; t++) t !== 127 && e.HEADER_CHARS.push(t); e.CONNECTION_TOKEN_CHARS = e.HEADER_CHARS.filter((e) => e !== 44), e.QUOTED_STRING = [` `, ` `]; for (let t = 33; t <= 255; t++) t !== 34 && t !== 92 && e.QUOTED_STRING.push(t); e.HTAB_SP_VCHAR_OBS_TEXT = [` `, ` `]; for (let t = 33; t <= 126; t++) e.HTAB_SP_VCHAR_OBS_TEXT.push(t); for (let t = 128; t <= 255; t++) e.HTAB_SP_VCHAR_OBS_TEXT.push(t); e.MAJOR = e.NUM_MAP, e.MINOR = e.MAJOR, e.SPECIAL_HEADERS = { connection: e.HEADER_STATE.CONNECTION, "content-length": e.HEADER_STATE.CONTENT_LENGTH, "proxy-connection": e.HEADER_STATE.CONNECTION, "transfer-encoding": e.HEADER_STATE.TRANSFER_ENCODING, upgrade: e.HEADER_STATE.UPGRADE }, e.default = { ERROR: e.ERROR, TYPE: e.TYPE, FLAGS: e.FLAGS, LENIENT_FLAGS: e.LENIENT_FLAGS, METHODS: e.METHODS, STATUSES: e.STATUSES, FINISH: e.FINISH, HEADER_STATE: e.HEADER_STATE, ALPHA: e.ALPHA, NUM_MAP: e.NUM_MAP, HEX_MAP: e.HEX_MAP, NUM: e.NUM, ALPHANUM: e.ALPHANUM, MARK: e.MARK, USERINFO_CHARS: e.USERINFO_CHARS, URL_CHAR: e.URL_CHAR, HEX: e.HEX, TOKEN: e.TOKEN, HEADER_CHARS: e.HEADER_CHARS, CONNECTION_TOKEN_CHARS: e.CONNECTION_TOKEN_CHARS, QUOTED_STRING: e.QUOTED_STRING, HTAB_SP_VCHAR_OBS_TEXT: e.HTAB_SP_VCHAR_OBS_TEXT, MAJOR: e.MAJOR, MINOR: e.MINOR, SPECIAL_HEADERS: e.SPECIAL_HEADERS, METHODS_HTTP: e.METHODS_HTTP, METHODS_ICE: e.METHODS_ICE, METHODS_RTSP: e.METHODS_RTSP, METHOD_MAP: e.METHOD_MAP, H_METHOD_MAP: e.H_METHOD_MAP, STATUSES_HTTP: e.STATUSES_HTTP }; })); var Ta$3 = c$12(((e, n) => { let { Buffer: r } = f$11(`node:buffer`), i; Object.defineProperty(n, "exports", { get: () => i ||= r.from(`AGFzbQEAAAABJwdgAX8Bf2ADf39/AX9gAn9/AGABfwBgBH9/f38Bf2AAAGADf39/AALLAQgDZW52GHdhc21fb25faGVhZGVyc19jb21wbGV0ZQAEA2VudhV3YXNtX29uX21lc3NhZ2VfYmVnaW4AAANlbnYLd2FzbV9vbl91cmwAAQNlbnYOd2FzbV9vbl9zdGF0dXMAAQNlbnYUd2FzbV9vbl9oZWFkZXJfZmllbGQAAQNlbnYUd2FzbV9vbl9oZWFkZXJfdmFsdWUAAQNlbnYMd2FzbV9vbl9ib2R5AAEDZW52GHdhc21fb25fbWVzc2FnZV9jb21wbGV0ZQAAAzU0BQYAAAMAAAAAAAADAQMAAwMDAAACAAAAAAICAgICAgICAgIBAQEBAQEBAQEBAwAAAwAAAAQFAXABExMFAwEAAgYIAX8BQcDZBAsHxQcoBm1lbW9yeQIAC19pbml0aWFsaXplAAgZX19pbmRpcmVjdF9mdW5jdGlvbl90YWJsZQEAC2xsaHR0cF9pbml0AAkYbGxodHRwX3Nob3VsZF9rZWVwX2FsaXZlADcMbGxodHRwX2FsbG9jAAsGbWFsbG9jADkLbGxodHRwX2ZyZWUADARmcmVlAAwPbGxodHRwX2dldF90eXBlAA0VbGxodHRwX2dldF9odHRwX21ham9yAA4VbGxodHRwX2dldF9odHRwX21pbm9yAA8RbGxodHRwX2dldF9tZXRob2QAEBZsbGh0dHBfZ2V0X3N0YXR1c19jb2RlABESbGxodHRwX2dldF91cGdyYWRlABIMbGxodHRwX3Jlc2V0ABMObGxodHRwX2V4ZWN1dGUAFBRsbGh0dHBfc2V0dGluZ3NfaW5pdAAVDWxsaHR0cF9maW5pc2gAFgxsbGh0dHBfcGF1c2UAFw1sbGh0dHBfcmVzdW1lABgbbGxodHRwX3Jlc3VtZV9hZnRlcl91cGdyYWRlABkQbGxodHRwX2dldF9lcnJubwAaF2xsaHR0cF9nZXRfZXJyb3JfcmV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UAQcjVACgCAEF+IAJ3cTYCAAwCCyAGQRBBFCAGKAIQIAVGG2ogADYCACAARQ0BCyAAIAY2AhggBSgCECICBEAgACACNgIQIAIgADYCGAsgBUEUaigCACICRQ0AIABBFGogAjYCACACIAA2AhgLIAEgBGogBDYCACABIARBAXI2AgQgAUHY1QAoAgBHDQBBzNUAIAQ2AgAMAQsgBEH/AU0EQCAEQXhxQezVAGohAAJ/QcTVACgCACICQQEgBEEDdnQiA3FFBEBBxNUAIAIgA3I2AgAgAAwBCyAAKAIICyICIAE2AgwgACABNgIIIAEgADYCDCABIAI2AggMAQtBHyECIARB////B00EQCAEQSYgBEEIdmciAGt2QQFxIABBAXRrQT5qIQILIAEgAjYCHCABQgA3AhAgAkECdEH01wBqIQACQEHI1QAoAgAiA0EBIAJ0IgdxRQRAIAAgATYCAEHI1QAgAyAHcjYCACABIAA2AhggASABNgIIIAEgATYCDAwBCyAEQRkgAkEBdmtBACACQR9HG3QhAiAAKAIAIQACQANAIAAiAygCBEF4cSAERg0BIAJBHXYhACACQQF0IQIgAyAAQQRxakEQaiIHKAIAIgANAAsgByABNgIAIAEgAzYCGCABIAE2AgwgASABNgIIDAELIAMoAggiACABNgIMIAMgATYCCCABQQA2AhggASADNgIMIAEgADYCCAtB5NUAQeTVACgCAEEBayIAQX8gABs2AgALCwcAIAAtACgLBwAgAC0AKgsHACAALQArCwcAIAAtACkLBwAgAC8BNAsHACAALQAwC0ABBH8gACgCGCEBIAAvAS4hAiAALQAoIQMgACgCOCEEIAAQOCAAIAQ2AjggACADOgAoIAAgAjsBLiAAIAE2AhgL5YUCAgd/A34gASACaiEEAkAgACIDKAIMIgANACADKAIEBEAgAyABNgIECyMAQRBrIgkkAAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAn8CQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAk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kACQAJAAkACQAJAAkACQAJAAn8CQAJAAkACQAJAAkACQAJ/AkACQAJAAn8CQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAIAMCfwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACfwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAgAg7jAQABAgMEBQYHCAkKCwwNDg8QERITFBUWFxgZGhscHR4fICEjJCUnKCmeA5sDmgORA4oDgwOAA/0C+wL4AvIC8QLvAu0C6ALnAuYC5QLkAtwC2wLaAtkC2ALXAtYC1QLPAs4CzALLAsoCyQLIAscCxgLEAsMCvgK8AroCuQK4ArcCtgK1ArQCswKyArECsAKuAq0CqQKoAqcCpgKlAqQCowKiAqECoAKfApgCkAKMAosCigKBAv4B/QH8AfsB+gH5AfgB9wH1AfMB8AHrAekB6AHnAeYB5QHkAeMB4gHhAeAB3wHeAd0B3AHaAdkB2AHXAdYB1QHUAdMB0gHRAdABzwHOAc0BzAHLA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ABIARGBEBByQAhAgzsAgsCQANAAkAgAS0AAEEJaw4YAAKiAqICqQKiAqICogKiAqICogKiAqICogKiAqICogKiAqICogKiAqICogIAogILIAQgAUEBaiIBRw0AC0HJACECDOwCCyABQQFqIQEgA0Evai0AAEEBcQ2lAiADQQA2AhwgAyABNgIUIANBlxA2AhAgA0EKNgIMQQAhAgzrAgsgASAERwRAA0AgAS0AAEEgRw0VIAQgAUEBaiIBRw0AC0H4ACECDOsCC0H4ACECDOoCCyADQQI6ACgMOAtBACECIANBADYCHCADQb8LNgIQIANBAjYCDCADIAFBAWo2AhQM6AILQQAhAgzOAgtBDSECDM0CC0ETIQIMzAILQRUhAgzLAgtBFiECDMoCC0EYIQIMyQILQRkhAgzIAgtBGiECDMcCC0EbIQIMxgILQRwhAgzFAgtBHSECDMQCC0EeIQIMwwILQR8hAgzCAgtBICECDMECC0EiIQIMwAILQSMhAgy/AgtBJSECDL4CC0HlACECDL0CCyADQT02AhwgAyABNgIUIAMgADYCDEEAIQIM1QILIANBGzYCHCADIAE2AhQgA0GkHDYCECADQRU2AgxBACECDNQCCyADQSA2AhwgAyABNgIUIANBmBo2AhAgA0EVNgIMQQAhAgzTAgsgA0ETNgIcIAMgATYCFCADQZgaNgIQIANBFTYCDEEAIQIM0gILIANBCzYCHCADIAE2AhQgA0GYGjYCECADQRU2AgxBACECDNECCyADQRA2AhwgAyABNgIUIANBmBo2AhAgA0EVNgIMQQAhAgzQAgsgA0EgNgIcIAMgATYCFCADQaQcNgIQIANBFTYCDEEAIQIMzwILIANBCzYCHCADIAE2AhQgA0GkHDYCECADQRU2AgxBACECDM4CCyADQQw2AhwgAyABNgIUIANBpBw2AhAgA0EVNgIMQQAhAgzNAgtBACECIANBADYCHCADIAE2AhQgA0HdDjYCECADQRI2AgwMzAILAkADQAJAIAEtAABBCmsOBAACAgACCyAEIAFBAWoiAUcNAAtB/QEhAgzMAgsCQAJAIAMtADZBAUcNAEEAIQACQCADKAI4IgJFDQAgAigCYCICRQ0AIAMgAhEAACEACyAARQ0AIABBFUcNASADQfwBNgIcIAMgATYCFCADQdwZNgIQIANBFTYCDEEAIQIMzQILQdwBIQIMswILIANBADYCHCADIAE2AhQgA0H5CzYCECADQR82AgxBACECDMsCCwJAAkAgAy0AKEEBaw4CBAEAC0HbASECDLICC0HUASECDLECCyADQQI6ADFBACEAAkAgAygCOCICRQ0AIAIoAgAiAkUNACADIAIRAAAhAAsgAEUEQEHdASECDLECCyAAQRVHBEAgA0EANgIcIAMgATYCFCADQbQMNgIQIANBEDYCDEEAIQIMygILIANB+wE2AhwgAyABNgIUIANBgRo2AhAgA0EVNgIMQQAhAgzJAgsgASAERgRAQfoBIQIMyQILIAEtAABByABGDQEgA0EBOgAoC0HAASECDK4CC0HaASECDK0CCyABIARHBEAgA0EMNgIIIAMgATYCBEHZASECDK0CC0H5ASECDMUCCyABIARGBEBB+AEhAgzFAgsgAS0AAEHIAEcNBCABQQFqIQFB2AEhAgyrAgsgASAERgRAQfcBIQIMxAILAkACQCABLQAAQcUAaw4QAAUFBQUFBQUFBQUFBQUFAQULIAFBAWohAUHWASECDKsCCyABQQFqIQFB1wEhAgyqAgtB9gEhAiABIARGDcICIAMoAgAiACAEIAFraiEFIAEgAGtBAmohBgJAA0AgAS0AACAAQbrVAGotAABHDQMgAEECRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADMMCCyADKAIEIQAgA0IANwMAIAMgACAGQQFqIgEQLiIARQRAQeMBIQIMqgILIANB9QE2AhwgAyABNgIUIAMgADYCDEEAIQIMwgILQfQBIQIgASAERg3BAiADKAIAIgAgBCABa2ohBSABIABrQQFqIQYCQANAIAEtAAAgAEG41QBqLQAARw0CIABBAUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAzCAgsgA0GBBDsBKCADKAIEIQAgA0IANwMAIAMgACAGQQFqIgEQLiIADQMMAgsgA0EANgIAC0EAIQIgA0EANgIcIAMgATYCFCADQeUfNgIQIANBCDYCDAy/AgtB1QEhAgylAgsgA0HzATYCHCADIAE2AhQgAyAANgIMQQAhAgy9AgtBACEAAkAgAygCOCICRQ0AIAIoAkAiAkUNACADIAIRAAAhAAsgAEUNbiAAQRVHBEAgA0EANgIcIAMgATYCFCADQYIPNgIQIANBIDYCDEEAIQIMvQILIANBjwE2AhwgAyABNgIUIANB7Bs2AhAgA0EVNgIMQQAhAgy8AgsgASAERwRAIANBDTYCCCADIAE2AgRB0wEhAgyjAgtB8gEhAgy7AgsgASAERgRAQfEBIQIMuwILAkACQAJAIAEtAABByABrDgsAAQgICAgICAgIAggLIAFBAWohAUHQASECDKMCCyABQQFqIQFB0QEhAgyiAgsgAUEBaiEBQdIBIQIMoQILQfABIQIgASAERg25AiADKAIAIgAgBCABa2ohBiABIABrQQJqIQUDQCABLQAAIABBtdUAai0AAEcNBCAAQQJGDQMgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAY2AgAMuQILQe8BIQIgASAERg24AiADKAIAIgAgBCABa2ohBiABIABrQQFqIQUDQCABLQAAIABBs9UAai0AAEcNAyAAQQFGDQIgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAY2AgAMuAILQe4BIQIgASAERg23AiADKAIAIgAgBCABa2ohBiABIABrQQJqIQUDQCABLQAAIABBsNUAai0AAEcNAiAAQQJGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAY2AgAMtwILIAMoAgQhACADQgA3AwAgAyAAIAVBAWoiARArIgBFDQIgA0HsATYCHCADIAE2AhQgAyAANgIMQQAhAgy2AgsgA0EANgIACyADKAIEIQAgA0EANgIEIAMgACABECsiAEUNnAIgA0HtATYCHCADIAE2AhQgAyAANgIMQQAhAgy0AgtBzwEhAgyaAgtBACEAAkAgAygCOCICRQ0AIAIoAjQiAkUNACADIAIRAAAhAAsCQCAABEAgAEEVRg0BIANBADYCHCADIAE2AhQgA0HqDTYCECADQSY2AgxBACECDLQCC0HOASECDJoCCyADQesBNgIcIAMgATYCFCADQYAbNgIQIANBFTYCDEEAIQIMsgILIAEgBEYEQEHrASECDLICCyABLQAAQS9GBEAgAUEBaiEBDAELIANBADYCHCADIAE2AhQgA0GyODYCECADQQg2AgxBACECDLECC0HNASECDJcCCyABIARHBEAgA0EONgIIIAMgATYCBEHMASECDJcCC0HqASECDK8CCyABIARGBEBB6QEhAgyvAgsgAS0AAEEwayIAQf8BcUEKSQRAIAMgADoAKiABQQFqIQFBywEhAgyWAgsgAygCBCEAIANBADYCBCADIAAgARAvIgBFDZcCIANB6AE2AhwgAyABNgIUIAMgADYCDEEAIQIMrgILIAEgBEYEQEHnASECDK4CCwJAIAEtAABBLkYEQCABQQFqIQEMAQsgAygCBCEAIANBADYCBCADIAAgARAvIgBFDZgCIANB5gE2AhwgAyABNgIUIAMgADYCDEEAIQIMrgILQcoBIQIMlAILIAEgBEYEQEHlASECDK0CC0EAIQBBASEFQQEhB0EAIQICQAJAAkACQAJAAn8CQAJAAkACQAJAAkACQCABLQAAQTBrDgoKCQABAgMEBQYICwtBAgwGC0EDDAULQQQMBAtBBQwDC0EGDAILQQcMAQtBCAshAkEAIQVBACEHDAILQQkhAkEBIQBBACEFQQAhBwwBC0EAIQVBASECCyADIAI6ACsgAUEBaiEBAkACQCADLQAuQRBxDQACQAJAAkAgAy0AKg4DAQACBAsgB0UNAwwCCyAADQEMAgsgBUUNAQsgAygCBCEAIANBADYCBCADIAAgARAvIgBFDQIgA0HiATYCHCADIAE2AhQgAyAANgIMQQAhAgyvAgsgAygCBCEAIANBADYCBCADIAAgARAvIgBFDZoCIANB4wE2AhwgAyABNgIUIAMgADYCDEEAIQIMrgILIAMoAgQhACADQQA2AgQgAyAAIAEQLyIARQ2YAiADQeQBNgIcIAMgATYCFCADIAA2AgwMrQILQckBIQIMkwILQQAhAAJAIAMoAjgiAkUNACACKAJEIgJFDQAgAyACEQAAIQALAkAgAARAIABBFUYNASADQQA2AhwgAyABNgIUIANBpA02AhAgA0EhNgIMQQAhAgytAgtByAEhAgyTAgsgA0HhATYCHCADIAE2AhQgA0HQG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ERwRAIANBDzYCCCADIAE2AgRBASECDI0CC0HcASECDKUCCwJAAkADQAJAIAEtAABBCmsOBAIAAAMACyAEIAFBAWoiAUcNAAtB2wEhAgymAgsgAygCBCEAIANBADYCBCADIAAgARAtIgBFBEAgAUEBaiEBDAQLIANB2gE2AhwgAyAANgIMIAMgAUEBajYCFEEAIQIMpQILIAMoAgQhACADQQA2AgQgAyAAIAEQLSIADQEgAUEBagshAUHBASECDIoCCyADQdkBNgIcIAMgADYCDCADIAFBAWo2AhRBACECDKICC0HCASECDIgCCyADQS9qLQAAQQFxDQEgA0EANgIcIAMgATYCFCADQeQcNgIQIANBGTYCDEEAIQIMoAILIAEgBEYEQEHZASECDKACCwJAAkACQCABLQAAQQprDgQBAgIAAgsgAUEBaiEBDAILIAFBAWohAQwBCyADLQAuQcAAcUUNAQtBACEAAkAgAygCOCICRQ0AIAIoAjwiAkUNACADIAIRAAAhAAsgAEUNoAEgAEEVRgRAIANB2QA2AhwgAyABNgIUIANBtxo2AhAgA0EVNgIMQQAhAgyfAgsgA0EANgIcIAMgATYCFCADQYANNgIQIANBGzYCDEEAIQIMngILIANBADYCHCADIAE2AhQgA0HcKDYCECADQQI2AgxBACECDJ0CCyABIARHBEAgA0EMNgIIIAMgATYCBEG/ASECDIQCC0HYASECDJwCCyABIARGBEBB1wEhAgycAgsCQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAIAEtAABBwQBrDhUAAQIDWgQFBlpaWgcICQoLDA0ODxBaCyABQQFqIQFB+wAhAgySAgsgAUEBaiEBQfwAIQIMkQILIAFBAWohAUGBASECDJACCyABQQFqIQFBhQEhAgyPAgsgAUEBaiEBQYYBIQIMjgILIAFBAWohAUGJASECDI0CCyABQQFqIQFBigEhAgyMAgsgAUEBaiEBQY0BIQIMiwILIAFBAWohAUGWASECDIoCCyABQQFqIQFBlwEhAgyJAgsgAUEBaiEBQZgBIQIMiAILIAFBAWohAUGlASECDIcCCyABQQFqIQFBpgEhAgyGAgsgA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IAFBAWohAUGMASECDNABC0GkASECIAEgBEYN6AEgAygCACIAIAQgAWtqIQUgASAAa0EBaiEGAkADQCABLQAAIABBptUAai0AAEcNFSAAQQFGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAM6QELIANBADYCACAGQQFqIQFBCQwVC0GjASECIAEgBEYN5wEgAygCACIAIAQgAWtqIQUgASAAa0EBaiEGAkADQCABLQAAIABBpNUAai0AAEcNFCAAQQFGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAM6AELIANBADYCACAGQQFqIQFBHwwUC0GiASECIAEgBEYN5gEgAygCACIAIAQgAWtqIQUgASAAa0ECaiEGAkADQCABLQAAIABBvtQAai0AAEcNEyAAQQJGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAM5wELIANBADYCACAGQQFqIQFBAgwTC0GhASECIAEgBEYN5QEgAygCACIAIAQgAWtqIQUgASAAa0EBaiEGA0AgAS0AACAAQbzUAGotAABHDREgAEEBRg0CIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADOUBCyABIARGBEBBoAEhAgzlAQtBASABLQAAQd8ARw0RGiABQQFqIQFBhwEhAgzLAQsgA0EANgIAIAZBAWohAUGIASECDMoBC0GfASECIAEgBEYN4gEgAygCACIAIAQgAWtqIQUgASAAa0EIaiEGAkADQCABLQAAIABBhNUAai0AAEcNDyAAQQhGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAM4wELIANBADYCACAGQQFqIQFBKQwPC0GeASECIAEgBEYN4QEgAygCACIAIAQgAWtqIQUgASAAa0EDaiEGAkADQCABLQAAIABBuNQAai0AAEcNDiAAQQNGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAM4gELIANBADYCACAGQQFqIQFBLQwOCyABIARGBEBBnQEhAgzhAQsgAS0AAEHFAEcNDiABQQFqIQFBhAEhAgzHAQsgASAERgRAQZwBIQIM4AELAkACQCABLQAAQcwAaw4IAA8PDw8PD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QYLIAFBAWohAUH5ACECDL4BCyABQQFqIQFB+gAhAgy9AQtBkgEhAiABIARGDdUBIAMoAgAiACAEIAFraiEFIAEgAGtBBWohBgJAA0AgAS0AACAAQaDUAGotAABHDQIgAEEFRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADNYBCyADQQA2AgAgBkEBaiEBQSQMAgsgA0EANgIADAILIAEgBEYEQEGRASECDNQBCyABLQAAQcwARw0BIAFBAWohAUETCzoAKSADKAIEIQAgA0EANgIEIAMgACABEC4iAA0CDAELQQAhAiADQQA2AhwgAyABNgIUIANB/h82AhAgA0EGNgIMDNEBC0H4ACECDLcBCyADQZABNgIcIAMgATYCFCADIAA2AgxBACECDM8BC0EAIQACQCADKAI4IgJFDQAgAigCQCICRQ0AIAMgAhEAACEACyAARQ0AIABBFUYNASADQQA2AhwgAyABNgIUIANBgg82AhAgA0EgNgIMQQAhAgzOAQtB9wAhAgy0AQsgA0GPATYCHCADIAE2AhQgA0HsGzYCECADQRU2AgxBACECDMwBCyABIARGBEBBjwEhAgzMAQsCQCABLQAAQSBGBEAgAUEBaiEBDAELIANBADYCHCADIAE2AhQgA0GbHzYCECADQQY2AgxBACECDMwBC0ECIQIMsgELA0AgAS0AAEEgRw0CIAQgAUEBaiIBRw0AC0GOASECDMoBCyABIARGBEBBjQEhAgzKAQsCQCABLQAAQQlrDgRKAABKAAtB9QAhAgywAQsgAy0AKUEFRgRAQfYAIQIMsAELQfQAIQIMrwELIAEgBEYEQEGMASECDMgBCyADQRA2AgggAyABNgIEDAoLIAEgBEYEQEGLASECDMcBCwJAIAEtAABBCWsOBEcAAEcAC0HzACECDK0BCyABIARHBEAgA0EQNgIIIAMgATYCBEHxACECDK0BC0GKASECDMUBCwJAIAEgBEcEQANAIAEtAABBoNAAai0AACIAQQNHBEACQCAAQQFrDgJJAAQLQfAAIQIMrwELIAQgAUEBaiIBRw0AC0GIASECDMYBC0GIASECDMUBCyADQQA2AhwgAyABNgIUIANB2yA2AhAgA0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Agy4AQsgAygCBCEAIANBADYCBCADIAAgARAsIgBFDRYgA0H6ADYCHCADIAE2AhQgAyAANgIMQQAhAgy3AQsgA0EANgIcIAMgATYCFCADQfkPNgIQIANBBzYCDEEAIQIMtgELQewAIQIMnAELIAEgBEYEQEGCASECDLUBCyABQQFqDAILIAEgBEYEQEGBASECDLQBCyABQQFqDAELIAEgBEYNASABQQFqCyEBQQQhAgyYAQtBgAEhAgywAQsDQCABLQAAQaDMAGotAAAiAEECRwRAIABBAUcEQEHpACECDJkBCwwxCyAEIAFBAWoiAUcNAAtB/wAhAgyvAQsgASAERgRAQf4AIQIMrwELAkAgAS0AAEEJaw43LwMGLwQGBgYGBgYGBgYGBgYGBgYGBgYFBgYCBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGAAYLIAFBAWoLIQFBBSECDJQBCyABQQFqDAYLIAMoAgQhACADQQA2AgQgAyAAIAEQLCIARQ0IIANB2wA2AhwgAyABNgIUIAMgADYCDEEAIQIMqwELIAMoAgQhACADQQA2AgQgAyAAIAEQLCIARQ0IIANB3QA2AhwgAyABNgIUIAMgADYCDEEAIQIMqgELIAMoAgQhACADQQA2AgQgAyAAIAEQLCIARQ0IIANB+gA2AhwgAyABNgIUIAMgADYCDEEAIQIMqQELIANBADYCHCADIAE2AhQgA0GNFDYCECADQQc2AgxBACECDKgBCwJAAkACQAJAA0AgAS0AAEGgygBqLQAAIgBBBUcEQAJAIABBAWsOBi4DBAUGAAYLQegAIQIMlAELIAQgAUEBaiIBRw0AC0H9ACECDKsBCyADKAIEIQAgA0EANgIEIAMgACABECwiAEUNByADQdsANgIcIAMgATYCFCADIAA2AgxBACECDKoBCyADKAIEIQAgA0EANgIEIAMgACABECwiAEUNByADQd0ANgIcIAMgATYCFCADIAA2AgxBACECDKkBCyADKAIEIQAgA0EANgIEIAMgACABECwiAEUNByADQfoANgIcIAMgATYCFCADIAA2AgxBACECDKgBCyADQQA2AhwgAyABNgIUIANB5Ag2AhAgA0EHNgIMQ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AhAgycAQtB4gAhAgyCAQtBACEAAkAgAygCOCICRQ0AIAIoAjQiAkUNACADIAIRAAAhAAsCQCAABEAgAEEVRg0BIANBADYCHCADIAE2AhQgA0HqDTYCECADQSY2AgxBACECDJwBC0HhACECDIIBCyADQfMANgIcIAMgATYCFCADQYAbNgIQIANBFTYCDEEAIQIMmgELIAMtACkiAEEja0ELSQ0JAkAgAEEGSw0AQQEgAHRBygBxRQ0ADAoLQQAhAiADQQA2AhwgAyABNgIUIANB7Qk2AhAgA0EINgIMDJkBC0HyACECIAEgBEYNmAEgAygCACIAIAQgAWtqIQUgASAAa0EBaiEGAkADQCABLQAAIABBs9UAai0AAEcNBSAAQQFGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAMmQELIAMoAgQhACADQgA3AwAgAyAAIAZBAWoiARArIgAEQCADQfEANgIcIAMgATYCFCADIAA2AgxBACECDJkBC0HfACECDH8LQQAhAAJAIAMoAjgiAkUNACACKAI0IgJFDQAgAyACEQAAIQALAkAgAARAIABBFUYNASADQQA2AhwgAyABNgIUIANB6g02AhAgA0EmNgIMQQAhAgyZAQtB3gAhAgx/CyADQfAANgIcIAMgATYCFCADQYAbNgIQIANBFTYCDEEAIQIMlwELIAMtAClBIUYNBiADQQA2AhwgAyABNgIUIANBkQo2AhAgA0EINgIMQQAhAgyWAQtB7wAhAiABIARGDZUBIAMoAgAiACAEIAFraiEFIAEgAGtBAmohBgJAA0AgAS0AACAAQbDVAGotAABHDQIgAEECRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADJYBCyADKAIEIQAgA0IANwMAIAMgACAGQQFqIgEQKyIARQ0CIANB7QA2AhwgAyABNgIUIAMgADYCDEEAIQIMlQELIANBADYCAAsgAygCBCEAIANBADYCBCADIAAgARArIgBFDYABIANB7gA2AhwgAyABNgIUIAMgADYCDEEAIQIMkwELQdwAIQIMeQtBACEAAkAgAygCOCICRQ0AIAIoAjQiAkUNACADIAIRAAAhAAsCQCAABEAgAEEVRg0BIANBADYCHCADIAE2AhQgA0HqDTYCECADQSY2AgxBACECDJMBC0HbACECDHkLIANB7AA2AhwgAyABNgIUIANBgBs2AhAgA0EVNgIMQQAhAgyRAQsgAy0AKSIAQSNJDQAgAEEuRg0AIANBADYCHCADIAE2AhQgA0HJCTYCECADQQg2AgxBACECDJABC0HaACECDHYLIAEgBEYEQEHrACECDI8BCwJAIAEtAABBL0YEQCABQQFqIQEMAQsgA0EANgIcIAMgATYCFCADQbI4NgIQIANBCDYCDEEAIQIMjwELQdkAIQIMdQsgASAERwRAIANBDjYCCCADIAE2AgRB2AAhAgx1C0HqACECDI0BCyABIARGBEBB6QAhAgyNAQsgAS0AAEEwayIAQf8BcUEKSQRAIAMgADoAKiABQQFqIQFB1wAhAgx0CyADKAIEIQAgA0EANgIEIAMgACABEC8iAEUNeiADQegANgIcIAMgATYCFCADIAA2AgxBACECDIwBCyABIARGBEBB5wAhAgyMAQsCQCABLQAAQS5GBEAgAUEBaiEBDAELIAMoAgQhACADQQA2AgQgAyAAIAEQLyIARQ17IANB5gA2AhwgAyABNgIUIAMgADYCDEEAIQIMjAELQdYAIQIMcgsgASAERgRAQeUAIQIMiwELQQAhAEEBIQVBASEHQQAhAgJAAkACQAJAAkACfwJAAkACQAJAAkACQAJAIAEtAABBMGsOCgoJAAECAwQFBggLC0ECDAYLQQMMBQtBBAwEC0EFDAMLQQYMAgtBBwwBC0EICyECQQAhBUEAIQcMAgtBCSECQQEhAEEAIQVBACEHDAELQQAhBUEBIQILIAMgAjoAKyABQQFqIQECQAJAIAMtAC5BEHENAAJAAkACQCADLQAqDgMBAAIECyAHRQ0DDAILIAANAQwCCyAFRQ0BCyADKAIEIQAgA0EANgIEIAMgACABEC8iAEUNAiADQeIANgIcIAMgATYCFCADIAA2AgxBACECDI0BCyADKAIEIQAgA0EANgIEIAMgACABEC8iAEUNfSADQeMANgIcIAMgATYCFCADIAA2AgxBACECDIwBCyADKAIEIQAgA0EANgIEIAMgACABEC8iAEUNeyADQeQANgIcIAMgATYCFCADIAA2AgwMiwELQdQAIQIMcQsgAy0AKUEiRg2GAUHTACECDHALQQAhAAJAIAMoAjgiAkUNACACKAJEIgJFDQAgAyACEQAAIQALIABFBEBB1QAhAgxwCyAAQRVHBEAgA0EANgIcIAMgATYCFCADQaQNNgIQIANBITYCDEEAIQIMiQELIANB4QA2AhwgAyABNgIUIANB0Bo2AhAgA0EVNgIMQQAhAgyIAQsgASAERgRAQeAAIQIMiAELAkACQAJAAkACQCABLQAAQQprDgQBBAQABAsgAUEBaiEBDAELIAFBAWohASADQS9qLQAAQQFxRQ0BC0HSACECDHALIANBADYCHCADIAE2AhQgA0G2ETYCECADQQk2AgxBACECDIgBCyADQQA2AhwgAyABNgIUIANBthE2AhAgA0EJNgIMQQAhAgyHAQsgASAERgRAQd8AIQIMhwELIAEtAABBCkYEQCABQQFqIQEMCQsgAy0ALkHAAHENCCADQQA2AhwgAyABNgIUIANBthE2AhAgA0ECNgIMQQAhAgyGAQsgASAERgRAQd0AIQIMhgELIAEtAAAiAkENRgRAIAFBAWohAUHQACECDG0LIAEhACACQQlrDgQFAQEFAQsgBCABIgBGBEBB3AAhAgyFAQsgAC0AAEEKRw0AIABBAWoMAgtBACECIANBADYCHCADIAA2AhQgA0HKLTYCECADQQc2AgwMgwELIAEgBEYEQEHbACECDIMBCwJAIAEtAABBCWsOBAMAAAMACyABQQFqCyEBQc4AIQIMaAsgASAERgRAQdoAIQIMgQELIAEtAABBCWsOBAABAQABC0EAIQIgA0EANgIcIANBmhI2AhAgA0EHNgIMIAMgAUEBajYCFAx/CyADQYASOwEqQQAhAAJAIAMoAjgiAkUNACACKAI4IgJFDQAgAyACEQAAIQALIABFDQAgAEEVRw0BIANB2QA2AhwgAyABNgIUIANB6ho2AhAgA0EVNgIMQQAhAgx+C0HNACECDGQLIANBADYCHCADIAE2AhQgA0HJDTYCECADQRo2AgxBACECDHwLIAEgBEYEQEHZACECDHwLIAEtAABBIEcNPSABQQFqIQEgAy0AL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gA0EAOgAsC0E9IQIMMgsgA0EANgIcIAMgATYCFCADQcIWNgIQIANBCjYCDEEAIQIMSgtBAiECDAELQQQhAgsgA0EBOgAsIAMgAy8BMiACcjsBMgwGCyABIARGBEBBMCECDEcLIAEtAABBCkYEQCABQQFqIQEMAQsgAy0ALkEBcQ0AIANBADYCHCADIAE2AhQgA0HcKDYCECADQQI2AgxBACECDEYLQTAhAgwsCyABQQFqIQFBMSECDCsLIAEgBEYEQEEvIQIMRAsgAS0AACIAQQlHIABBIEdxRQRAIAFBAWohASADLQAuQQFxDQEgA0EANgIcIAMgATYCFCADQZcQNgIQIANBCjYCDEEAIQIMRAtBASECAkACQAJAAkACQAJAIAMtACxBAmsOBwUEBAMBAgAECyADIAMvATJBCHI7ATIMAwtBAiECDAELQQQhAgsgA0EBOgAsIAMgAy8BMiACcjsBMgtBLyECDCsLIANBADYCHCADIAE2AhQgA0GEEzYCECADQQs2AgxBACECDEMLQeEBIQIMKQsgASAERgRAQS4hAgxCCyADQQA2AgQgA0ESNgIIIAMgASABEDEiAA0BC0EuIQIMJwsgA0EtNgIcIAMgATYCFCADIAA2AgxBACECDD8LQQAhAAJAIAMoAjgiAkUNACACKAJMIgJFDQAgAyACEQAAIQALIABFDQAgAEEVRw0BIANB2AA2AhwgAyABNgIUIANBsxs2AhAgA0EVNgIMQQAhAgw+C0HMACECDCQLIANBADYCHCADIAE2AhQgA0GzDjYCECADQR02AgxBACECDDwLIAEgBEYEQEHOACECDDwLIAEtAAAiAEEgRg0CIABBOkYNAQsgA0EAOgAsQQkhAgwhCyADKAIEIQAgA0EANgIEIAMgACABEDAiAA0BDAILIAMtAC5BAXEEQEHeASECDCALIAMoAgQhACADQQA2AgQgAyAAIAEQMCIARQ0CIANBKjYCHCADIAA2AgwgAyABQQFqNgIUQQAhAgw4CyADQcsANgIcIAMgADYCDCADIAFBAWo2AhRBACECDDcLIAFBAWohAUHAACECDB0LIAFBAWohAQwsCyABIARGBEBBKyECDDULAkAgAS0AAEEK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DAELQgEhCgsgAUEBaiEBIAMpAyAiC0L//////////w9YBEAgAyALQgSGIAqENwMgDAILIANBADYCHCADIAE2AhQgA0G1CTYCECADQQw2AgxBACECDB4LQSchAgwEC0EoIQIMAwsgAyABOgAsIANBADYCACAHQQFqIQFBDCECDAILIANBADYCACAGQQFqIQFBCiECDAELIAFBAWohAUEIIQIMAAsAC0EAIQIgA0EANgIcIAMgATYCFCADQbI4NgIQIANBCDYCDAwXC0EAIQIgA0EANgIcIAMgATYCFCADQYMRNgIQIANBCTYCDAwWC0EAIQIgA0EANgIcIAMgATYCFCADQd8KNgIQIANBCTYCDAwVC0EAIQIgA0EANgIcIAMgATYCFCADQe0QNgIQIANBCTYCDAwUC0EAIQIgA0EANgIcIAMgATYCFCADQdIRNgIQIANBCTYCDAwTC0EAIQIgA0EANgIcIAMgATYCFCADQbI4NgIQIANBCDYCDAwSC0EAIQIgA0EANgIcIAMgATYCFCADQYMRNgIQIANBCTYCDAwRC0EAIQIgA0EANgIcIAMgATYCFCADQd8KNgIQIANBCTYCDAwQC0EAIQIgA0EANgIcIAMgATYCFCADQe0QNgIQIANBCTYCDAwPC0EAIQIgA0EANgIcIAMgATYCFCADQdIRNgIQIANBCTYCDAwOC0EAIQIgA0EANgIcIAMgATYCFCADQbkXNgIQIANBDzYCDAwNC0EAIQIgA0EANgIcIAMgATYCFCADQbkXNgIQIANBDzYCDAwMC0EAIQIgA0EANgIcIAMgATYCFCADQZkTNgIQIANBCzYCDAwLC0EAIQIgA0EANgIcIAMgATYCFCADQZ0JNgIQIANBCzYCDAwKC0EAIQIgA0EANgIcIAMgATYCFCADQZcQNgIQIANBCjYCDAwJC0EAIQIgA0EANgIcIAMgATYCFCADQbEQNgIQIANBCjYCDAwIC0EAIQIgA0EANgIcIAMgATYCFCADQbsdNgIQIANBAjYCDAwHC0EAIQIgA0EANgIcIAMgATYCFCADQZYWNgIQIANBAjYCDAwGC0EAIQIgA0EANgIcIAMgATYCFCADQfkYNgIQIANBAjYCDA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1RJVklUWUxFTkRBUlZFT1RJRllQVElPTlNDSFNFQVlTVEFUQ0hHRVVFUllPUkRJUkVDVE9SVFJDSFBBUkFNRVRFUlVSQ0VCU0NSSUJFQVJET1dOQUNFSU5ETktDS1VCU0NSSUJFVFRQQ0VUU1BBRFRQLw==`, `base64`) }); })); var Ea$3 = c$12(((e, n) => { let { Buffer: r } = f$11(`node:buffer`), i; Object.defineProperty(n, "exports", { get: () => i ||= r.from(`AGFzbQEAAAABJwdgAX8Bf2ADf39/AX9gAn9/AGABfwBgBH9/f38Bf2AAAGADf39/AALLAQgDZW52GHdhc21fb25faGVhZGVyc19jb21wbGV0ZQAEA2VudhV3YXNtX29uX21lc3NhZ2VfYmVnaW4AAANlbnYLd2FzbV9vbl91cmwAAQNlbnYOd2FzbV9vbl9zdGF0dXMAAQNlbnYUd2FzbV9vbl9oZWFkZXJfZmllbGQAAQNlbnYUd2FzbV9vbl9oZWFkZXJfdmFsdWUAAQNlbnYMd2FzbV9vbl9ib2R5AAEDZW52GHdhc21fb25fbWVzc2FnZV9jb21wbGV0ZQAAAzU0BQYAAAMAAAAAAAADAQMAAwMDAAACAAAAAAICAgICAgICAgIBAQEBAQEBAQEBAwAAAwAAAAQFAXABExMFAwEAAgYIAX8BQcDZBAsHxQcoBm1lbW9yeQIAC19pbml0aWFsaXplAAgZX19pbmRpcmVjdF9mdW5jdGlvbl90YWJsZQEAC2xsaHR0cF9pbml0AAkYbGxodHRwX3Nob3VsZF9rZWVwX2FsaXZlADcMbGxodHRwX2FsbG9jAAsGbWFsbG9jADkLbGxodHRwX2ZyZWUADARmcmVlAAwPbGxodHRwX2dldF90eXBlAA0VbGxodHRwX2dldF9odHRwX21ham9yAA4VbGxodHRwX2dldF9odHRwX21pbm9yAA8RbGxodHRwX2dldF9tZXRob2QAEBZsbGh0dHBfZ2V0X3N0YXR1c19jb2RlABESbGxodHRwX2dldF91cGdyYWRlABIMbGxodHRwX3Jlc2V0ABMObGxodHRwX2V4ZWN1dGUAF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IgJFDQIgBUEQaiEDCwNAIAMhByACIgBBFGoiAygCACICDQAgAEEQaiEDIAAoAhAiAg0ACyAHQQA2AgAMAgsgBSAAQX5xNgIEIAEgBGogBDYCACABIARBAXI2AgQMAwtBACEACyAGRQ0AAkAgBSgCHCICQQJ0QfTXAGoiAygCACAFRgRAIAMgADYCACAADQFByNUAQcjVACgCAEF+IAJ3cTYCAAwCCyAGQRBBFCAGKAIQIAVGG2ogADYCACAARQ0BCyAAIAY2AhggBSgCECICBEAgACACNgIQIAIgADYCGAsgBUEUaigCACICRQ0AIABBFGogAjYCACACIAA2AhgLIAEgBGogBDYCACABIARBAXI2AgQgAUHY1QAoAgBHDQBBzNUAIAQ2AgAMAQsgBEH/AU0EQCAEQXhxQezVAGohAAJ/QcTVACgCACICQQEgBEEDdnQiA3FFBEBBxNUAIAIgA3I2AgAgAAwBCyAAKAIICyICIAE2AgwgACABNgIIIAEgADYCDCABIAI2AggMAQtBHyECIARB////B00EQCAEQSYgBEEIdmciAGt2QQFxIABBAXRrQT5qIQILIAEgAjYCHCABQgA3AhAgAkECdEH01wBqIQACQEHI1QAoAgAiA0EBIAJ0IgdxRQRAIAAgATYCAEHI1QAgAyAHcjYCACABIAA2AhggASABNgIIIAEgATYCDAwBCyAEQRkgAkEBdmtBACACQR9HG3QhAiAAKAIAIQACQANAIAAiAygCBEF4cSAERg0BIAJBHXYhACACQQF0IQIgAyAAQQRxakEQaiIHKAIAIgANAAsgByABNgIAIAEgAzYCGCABIAE2AgwgASABNgIIDAELIAMoAggiACABNgIMIAMgATYCCCABQQA2AhggASADNgIMIAEgADYCCAtB5NUAQeTVACgCAEEBayIAQX8gABs2AgALCwcAIAAtACgLBwAgAC0AKgsHACAALQArCwcAIAAtACkLBwAgAC8BNAsHACAALQAwC0ABBH8gACgCGCEBIAAvAS4hAiAALQAoIQMgACgCOCEEIAAQOCAAIAQ2AjggACADOgAoIAAgAjsBLiAAIAE2AhgLhocCAwd/A34BeyABIAJqIQQCQCAAIgM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JAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAIAMCfwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACfwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACfwJAAkACQAJAAkACQAJAAn8CQAJAAkACfwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAgAwJ/AkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJ/AkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQCACDuMBAAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwdHh8gISMkJScoKZ4DmwOaA5EDigODA4AD/QL7AvgC8gLxAu8C7QLoAucC5gLlAuQC3ALbAtoC2QLYAtcC1gLVAs8CzgLMAssCygLJAsgCxwLGAsQCwwK+ArwCugK5ArgCtwK2ArUCtAKzArICsQKwAq4Cr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ANgIMDPoCCyADKAIEIQBBACECIANBADYCBCADIAAgARA0IgBFBEAgAUEBaiEBDPUCCyADQRU2AhwgAyAANgIMIAMgAUEBajYCFAz5AgsgAygCBCEAQQAhAiADQQA2AgQgAyAAIAEQNCIARQRAIAFBAWohAQzzAgsgA0EXNgIcIAMgADYCDCADIAFBAWo2AhQM+AILIABBFUYNI0EAIQIgA0EANgIcIAMgATYCFCADQdYMNgIQIANBIzYCDAz3AgsgAygCBCEAQQAhAiADQQA2AgQgAyAAIAEQNCIARQRAIAFBAWohAQwdCyADQRk2AhwgAyAANgIMIAMgAUEBajYCFAz2AgsgAygCBCEAQQAhAiADQQA2AgQgAyAAIAEQNCIARQRAIAFBAWohAQzvAgsgA0EaNgIcIAMgADYCDCADIAFBAWo2AhQM9QILIABBFUYNH0EAIQIgA0EANgIcIAMgATYCFCADQdAPNgIQIANBIjYCDAz0AgsgAygCBCEAIANBADYCBCADIAAgARAzIgBFBEAgAUEBaiEBDBsLIANBHDYCHCADIAA2AgwgAyABQQFqNgIUQQAhAgzzAgsgAygCBCEAIANBADYCBCADIAAgARAzIgBFBEAgAUEBaiEBDOsCCyADQR02AhwgAyAANgIMIAMgAUEBajYCFEEAIQIM8gILIABBO0cNASABQQFqIQELQSYhAgzXAgtBACECIANBADYCHCADIAE2AhQgA0GfFTYCECADQQw2AgwM7wILIAEgBEcEQANAIAEtAABBIEcNhAIgBCABQQFqIgFHDQALQSwhAgzvAgtBLCECDO4CCyABIARGBEBBNCECDO4CCwJAAkADQAJAIAEtAABBCmsOBAIAAAMACyAEIAFBAWoiAUcNAAtBNCECDO8CCyADKAIEIQAgA0EANgIEIAMgACABEDEiAEUNnwIgA0EyNgIcIAMgATYCFCADIAA2AgxBACECDO4CCyADKAIEIQAgA0EANgIEIAMgACABEDEiAEUEQCABQQFqIQEMnwILIANBMjYCHCADIAA2AgwgAyABQQFqNgIUQQAhAgztAgsgASAERwRAAkADQCABLQAAQTBrIgBB/wFxQQpPBEBBOiECDNcCCyADKQMgIgtCmbPmzJmz5swZVg0BIAMgC0IKfiIKNwMgIAogAK1C/wGDIgtCf4VWDQEgAyAKIAt8NwMgIAQgAUEBaiIBRw0AC0HAACECDO4CCyADKAIEIQAgA0EANgIEIAMgACABQQFqIgEQMSIADRcM4gILQcAAIQIM7AILIAEgBEYEQEHJACECDOwCCwJAA0ACQCABLQAAQQlrDhgAAqICogKpAqICogKiAqICogKiAqICogKiAqICogKiAqICogKiAqICogKiAgCiAgsgBCABQQFqIgFHDQALQckAIQIM7AILIAFBAWohASADQS9qLQAAQQFxDaUCIANBADYCHCADIAE2AhQgA0GXEDYCECADQQo2AgxBACECDOsCCyABIARHBEADQCABLQAAQSBHDRUgBCABQQFqIgFHDQALQfgAIQIM6wILQfgAIQIM6gILIANBAjoAKAw4C0EAIQIgA0EANgIcIANBvws2AhAgA0ECNgIMIAMgAUEBajYCFAzoAgtBACECDM4CC0ENIQIMzQILQRMhAgzMAgtBFSECDMsCC0EWIQIMygILQRghAgzJAgtBGSECDMgCC0EaIQIMxwILQRshAgzGAgtBHCECDMUCC0EdIQIMxAILQR4hAgzDAgtBHyECDMICC0EgIQIMwQILQSIhAgzAAgtBIyECDL8CC0ElIQIMvgILQeUAIQIMvQILIANBPTYCHCADIAE2AhQgAyAANgIMQQAhAgzVAgsgA0EbNgIcIAMgATYCFCADQaQcNgIQIANBFTYCDEEAIQIM1AILIANBIDYCHCADIAE2AhQgA0GYGjYCECADQRU2AgxBACECDNMCCyADQRM2AhwgAyABNgIUIANBmBo2AhAgA0EVNgIMQQAhAgzSAgsgA0ELNgIcIAMgATYCFCADQZgaNgIQIANBFTYCDEEAIQIM0QILIANBEDYCHCADIAE2AhQgA0GYGjYCECADQRU2AgxBACECDNACCyADQSA2AhwgAyABNgIUIANBpBw2AhAgA0EVNgIMQQAhAgzPAgsgA0ELNgIcIAMgATYCFCADQaQcNgIQIANBFTYCDEEAIQIMzgILIANBDDYCHCADIAE2AhQgA0GkHDYCECADQRU2AgxBACECDM0C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jVAGotAABHDQIgAEEBRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADMICCyADQYEEOwEoIAMoAgQhACADQgA3AwAgAyAAIAZBAWoiARAuIgANAwwCCyADQQA2AgALQQAhAiADQQA2AhwgAyABNgIUIANB5R82AhAgA0EINgIMDL8CC0HVASECDKUCCyADQfMBNgIcIAMgATYCFCADIAA2AgxBACECDL0CC0EAIQACQCADKAI4IgJFDQAgAigCQCICRQ0AIAMgAhEAACEACyAARQ1uIABBFUcEQCADQQA2AhwgAyABNgIUIANBgg82AhAgA0EgNgIMQQAhAgy9AgsgA0GPATYCHCADIAE2AhQgA0HsGzYCECADQRU2AgxBACECDLwCCyABIARHBEAgA0ENNgIIIAMgATYCBEHTASECDKMCC0HyASECDLsCCyABIARGBEBB8QEhAgy7AgsCQAJAAkAgAS0AAEHIAGsOCwABCAgICAgICAgCCAsgAUEBaiEBQdABIQIMowILIAFBAWohAUHRASECDKICCyABQQFqIQFB0gEhAgyhAgtB8AEhAiABIARGDbkCIAMoAgAiACAEIAFraiEGIAEgAGtBAmohBQNAIAEtAAAgAEG11QBqLQAARw0EIABBAkYNAyAAQQFqIQAgBCABQQFqIgFHDQALIAMgBjYCAAy5AgtB7wEhAiABIARGDbgCIAMoAgAiACAEIAFraiEGIAEgAGtBAWohBQNAIAEtAAAgAEGz1QBqLQAARw0DIABBAUYNAiAAQQFqIQAgBCABQQFqIgFHDQALIAMgBjYCAAy4AgtB7gEhAiABIARGDbcCIAMoAgAiACAEIAFraiEGIAEgAGtBAmohBQNAIAEtAAAgAEGw1QBqLQAARw0CIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBjYCAAy3AgsgAygCBCEAIANCADcDACADIAAgBUEBaiIBECsiAEUNAiADQewBNgIcIAMgATYCFCADIAA2AgxBACECDLYCCyADQQA2AgALIAMoAgQhACADQQA2AgQgAyAAIAEQKyIARQ2cAiADQe0BNgIcIAMgATYCFCADIAA2AgxBACECDLQCC0HPASECDJoC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E2AhwgAyABNgIUIAMgADYCDAytAgtByQEhAgyTAgtBACEAAkAgAygCOCICRQ0AIAIoAkQiAkUNACADIAIRAAAhAAsCQCAABEAgAEEVRg0BIANBADYCHCADIAE2AhQgA0GkDTYCECADQSE2AgxBACECDK0CC0HIASECDJMCCyADQeEBNgIcIAMgATYCFCADQdAaNgIQIANBFTYCDEEAIQIMqwILIAEgBEYEQEHhASECDKsCCwJAIAEtAABBIEYEQCADQQA7ATQgAUEBaiEBDAELIANBADYCHCADIAE2AhQgA0GZETYCECADQQk2AgxBACECDKsCC0HHASECDJECCyABIARGBEBB4AEhAgyqAgsCQCABLQAAQTBrQf8BcSICQQpJBEAgAUEBaiEBAkAgAy8BNCIAQZkzSw0AIAMgAEEKbCIAOwE0IABB/v8DcSACQf//A3NLDQAgAyAAIAJqOwE0DAILQQAhAiADQQA2AhwgAyABNgIUIANBlR42AhAgA0ENNgIMDKsCCyADQQA2AhwgAyABNgIUIANBlR42AhAgA0ENNgIMQQAhAgyqAgtBxgEhAgyQAgsgASAERgRAQd8BIQIMqQILAkAgAS0AAEEwa0H/AXEiAkEKSQRAIAFBAWohAQJAIAMvATQiAEGZM0sNACADIABBCmwiADsBNCAAQf7/A3EgAkH//wNzSw0AIAMgACACajsBNAwCC0EAIQIgA0EANgIcIAMgATYCFCADQZUeNgIQIANBDTYCDAyqAgsgA0EANgIcIAMgATYCFCADQZUeNgIQIANBDTYCDEEAIQIMqQILQcUBIQIMjwILIAEgBEYEQEHeASECDKgCCwJAIAEtAABBMGtB/wFxIgJBCkkEQCABQQFqIQECQCADLwE0IgBBmTNLDQAgAyAAQQpsIgA7ATQgAEH+/wNxIAJB//8Dc0sNACADIAAgAmo7ATQMAgtBACECIANBADYCHCADIAE2AhQgA0GVHjYCECADQQ02AgwMqQILIANBADYCHCADIAE2AhQgA0GVHjYCECADQQ02AgxBACECDKgCC0HEASECDI4CCyABIARGBEBB3QEhAgynAgsCQAJAAkACQCABLQAAQQprDhcCAwMAAwMDAwMDAwMDAwMDAwMDAwMDAQMLIAFBAWoMBQsgAUEBaiEBQcMBIQIMjwILIAFBAWohASADQS9qLQAAQQFxDQggA0EANgIcIAMgATYCFCADQY0LNgIQIANBDTYCDEEAIQIMpwILIANBADYCHCADIAE2AhQgA0GNCzYCECADQQ02AgxBACECDKYCCyABIARHBEAgA0EPNgIIIAMgATYCBEEBIQIMjQILQdwBIQIMpQILAkACQANAAkAgAS0AAEEKaw4EAgAAAwALIAQgAUEBaiIBRw0AC0HbASECDKYCCyADKAIEIQAgA0EANgIEIAMgACABEC0iAEUEQCABQQFqIQEMBAsgA0HaATYCHCADIAA2AgwgAyABQQFqNgIUQQAhAgylAgsgAygCBCEAIANBADYCBCADIAAgARAtIgANASABQQFqCyEBQcEBIQIMigILIANB2QE2AhwgAyAANgIMIAMgAUEBajYCFEEAIQIMogILQcIBIQIMiAILIANBL2otAABBAXENASADQQA2AhwgAyABNgIUIANB5Bw2AhAgA0EZNgIMQQAhAgygAgsgASAERgRAQdkBIQIMoAILAkACQAJAIAEtAABBCmsOBAECAgACCyABQQFqIQEMAgsgAUEBaiEBDAELIAMtAC5BwABxRQ0BC0EAIQACQCADKAI4IgJFDQAgAigCPCICRQ0AIAMgAhEAACEACyAARQ2gASAAQRVGBEAgA0HZADYCHCADIAE2AhQgA0G3GjYCECADQRU2AgxBACECDJ8CCyADQQA2AhwgAyABNgIUIANBgA02AhAgA0EbNgIMQQAhAgyeAgsgA0EANgIcIAMgATYCFCADQdwoNgIQIANBAjYCDEEAIQIMnQILIAEgBEcEQCADQQw2AgggAyABNgIEQb8BIQIMhAILQdgBIQIMnAILIAEgBEYEQEHXASECDJwCCwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAgAS0AAEHBAGsOFQABAgNaBAUGWlpaBwgJCgsMDQ4PEFoLIAFBAWohAUH7ACECDJICCyABQQFqIQFB/AAhAgyRAgsgAUEBaiEBQYEBIQIMkAILIAFBAWohAUGFASECDI8CCyABQQFqIQFBh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iEBQa8BIQIM8wELQccBIQIgASAERg2LAiADKAIAIgAgBCABa2ohBSABIABrQQhqIQYCQANAIAEtAAAgAEGE1QBqLQAARw04IABBCEYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAyMAgsgA0EANgIAIAZBAWohAUEqDDgLIAEgBEYEQEHGASECDIsCCyABLQAAQdAARw04IAFBAWohAUElDDcLQcUBIQIgASAERg2JAiADKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEGB1QBqLQAARw02IABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAyKAgsgA0EANgIAIAZBAWohAUEODDYLIAEgBEYEQEHEASECDIkCCyABLQAAQcUARw02IAFBAWohAUGrASECDO8BCyABIARGBEBBwwEhAgyIAgsCQAJAAkACQCABLQAAQcIAaw4PAAECOTk5OTk5OTk5OTkDOQsgAUEBaiEBQacBIQIM8QELIAFBAWohAUGoASECDPABCyABQQFqIQFBqQEhAgzvAQsgAUEBaiEBQaoBIQIM7gELQcIBIQIgASAERg2GAiADKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEH+1ABqLQAARw0zIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAyHAgsgA0EANgIAIAZBAWohAUEUDDMLQcEBIQIgASAERg2FAiADKAIAIgAgBCABa2ohBSABIABrQQRqIQYCQANAIAEtAAAgAEH51ABqLQAARw0yIABBBEYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAyGAgsgA0EANgIAIAZBAWohAUErDDILQcABIQIgASAERg2EAiADKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEH21ABqLQAARw0xIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAyFAgsgA0EANgIAIAZBAWohAUEsDDELQb8BIQIgASAERg2DAiADKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEGh1QBqLQAARw0wIAB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gAgBkEBaiEBQRkMIAsgASAERgRAQa4BIQIM8wELAkACQAJAAkAgAS0AAEEtaw4jACQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkASQkJCQkAiQkJAMkCyABQQFqIQFBjgEhAgzcAQsgAUEBaiEBQY8BIQIM2wELIAFBAWohAUGUASECDNoBCyABQQFqIQFBlQEhAgzZAQtBrQEhAiABIARGDfEBIAMoAgAiACAEIAFraiEFIAEgAGtBAWohBgJAA0AgAS0AACAAQdfUAGotAABHDR4gAEEBRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADPIBCyADQQA2AgAgBkEBaiEBQQsMHgsgASAERgRAQawBIQIM8QELAkACQCABLQAAQcEAaw4DACABIAsgAUEBaiEBQZABIQIM2AELIAFBAWohAUGTASECDNcBCyABIARGBEBBqwEhAgzwAQsCQAJAIAEtAABBwQBrDg8AHx8fHx8fHx8fHx8fHwEfCyABQQFqIQFBkQEhAgzXAQsgAUEBaiEBQZIBIQIM1gELIAEgBEYEQEGqASECDO8BCyABLQAAQcwARw0cIAFBAWohAUEKDBsLQakBIQIgASAERg3tASADKAIAIgAgBCABa2ohBSABIABrQQVqIQYCQANAIAEtAAAgAEHR1ABqLQAARw0aIABBBUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAzuAQsgA0EANgIAIAZBAWohAUEeDBoLQagBIQIgASAERg3sASADKAIAIgAgBCABa2ohBSABIABrQQZqIQYCQANAIAEtAAAgAEHK1ABqLQAARw0ZIABBBkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAztAQsgA0EANgIAIAZBAWohAUEVDBkLQacBIQIgASAERg3rASADKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEHH1ABqLQAARw0YIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAzsAQsgA0EANgIAIAZBAWohAUEXDBgLQaYBIQIgASAERg3qASADKAIAIgAgBCABa2ohBSABIABrQQVqIQYCQANAIAEtAAAgAEHB1ABqLQAARw0XIABBBUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAzrAQsgA0EANgIAIAZBAWohAUEYDBcLIAEgBEYEQEGlASECDOoBCwJAAkAgAS0AAEHJAGsOBwAZGRkZGQEZCyABQQFqIQFBiwEhAgzRAQsgAUEBaiEBQYwBIQIM0AELQaQBIQIgASAERg3oASADKAIAIgAgBCABa2ohBSABIABrQQFqIQYCQANAIAEtAAAgAEGm1QBqLQAARw0VIABBAUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAzpAQsgA0EANgIAIAZBAWohAUEJDBULQaMBIQIgASAERg3nASADKAIAIgAgBCABa2ohBSABIABrQQFqIQYCQANAIAEtAAAgAEGk1QBqLQAARw0UIABBAUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAzoAQsgA0EANgIAIAZBAWohAUEfDBQLQaIBIQIgASAERg3mASADKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEG+1ABqLQAARw0TIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAznAQsgA0EANgIAIAZBAWohAUECDBMLQaEBIQIgASAERg3lASADKAIAIgAgBCABa2ohBSABIABrQQFqIQYDQCABLQAAIABBvNQAai0AAEcNESAAQQFGDQIgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAM5QELIAEgBEYEQEGgASECDOUBC0EBIAEtAABB3wBHDREaIAFBAWohAUGHASECDMsBCyADQQA2AgAgBkEBaiEBQYgBIQIMygELQZ8BIQIgASAERg3iASADKAIAIgAgBCABa2ohBSABIABrQQhqIQYCQANAIAEtAAAgAEGE1QBqLQAARw0PIABBCEYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAzjAQsgA0EANgIAIAZBAWohAUEpDA8LQZ4BIQIgASAERg3hASADKAIAIgAgBCABa2ohBSABIABrQQNqIQYCQANAIAEtAAAgAEG41ABqLQAARw0OIABBA0YNASAA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AGtBAmohBgJAA0AgAS0AACAAQaHVAGotAABHDQQgAEECRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADNgBCyADQQA2AgAgBkEBaiEBQRAMBAsgASAERgRAQZMBIQIM1wELAkACQCABLQAAQcMAaw4MAAYGBgYGBgYGBgYBBgsgAUEBaiEBQfkAIQIMvgELIAFBAWohAUH6ACECDL0BC0GSASECIAEgBEYN1QEgAygCACIAIAQgAWtqIQUgASAAa0EFaiEGAkADQCABLQAAIABBoNQAai0AAEcNAiAAQQVGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAM1gELIANBADYCACAGQQFqIQFBJAwCCyADQQA2AgAMAgsgASAERgRAQZEBIQIM1AELIAEtAABBzABHDQEgAUEBaiEBQRMLOgApIAMoAgQhACADQQA2AgQgAyAAIAEQLiIADQIMAQtBACECIANBADYCHCADIAE2AhQgA0H+HzYCECADQQY2AgwM0QELQfgAIQIMtwELIANBkAE2AhwgAyABNgIUIAMgADYCDEEAIQIMzwELQQAhAAJAIAMoAjgiAkUNACACKAJAIgJFDQAgAyACEQAAIQALIABFDQAgAEEVRg0BIANBADYCHCADIAE2AhQgA0GCDzYCECADQSA2AgxBACECDM4BC0H3ACECDLQBCyADQY8BNgIcIAMgATYCFCADQewbNgIQIANBFTYCDEEAIQIMzAELIAEgBEYEQEGPASECDMwBCwJAIAEtAABBIEYEQCABQQFqIQEMAQsgA0EANgIcIAMgATYCFCADQZsfNgIQIANBBjYCDEEAIQIMzAELQQIhAgyyAQsDQCABLQAAQSBHDQIgBCABQQFqIgFHDQALQY4BIQIMygELIAEgBEYEQEGNASECDMoBCwJAIAEtAABBCWsOBEoAAEoAC0H1ACECDLABCyADLQApQQVGBEBB9gAhAgywAQtB9AAhAgyvAQsgASAERgRAQYwBIQIMyAELIANBEDYCCCADIAE2AgQMCgsgASAERgRAQYsBIQIMxwELAkAgAS0AAEEJaw4ERwAARwALQfMAIQIMrQELIAEgBEcEQCADQRA2AgggAyABNgIEQfEAIQIMrQELQYoBIQIMxQELAkAgASAERwRAA0AgAS0AAEGg0ABqLQAAIgBBA0cEQAJAIABBAWsOAkkABAtB8AAhAgyvAQsgBCABQQFqIgFHDQALQYgBIQIMxgELQYgBIQIMxQELIANBADYCHCADIAE2AhQgA0HbIDYCECADQQc2AgxBACECDMQBCyABIARGBEBBiQEhAgzEAQsCQAJAAkAgAS0AAEGg0gBqLQAAQQFrDgNGAgABC0HyACECDKwBCyADQQA2AhwgAyABNgIUIANBtBI2AhAgA0EHNgIMQQAhAgzEAQtB6gAhAgyqAQsgASAERwRAIAFBAWohAUHvACECDKoBC0GHASECDMIBCyAEIAEiAEYEQEGGASECDMIBCyAALQAAIgFBL0YEQCAAQQFqIQFB7gAhAgypAQsgAUEJayICQRdLDQEgACEBQQEgAnRBm4CABHENQQwBCyAEIAEiAEYEQEGFASECDMEBCyAALQAAQS9HDQAgAEEBaiEBDAMLQQAhAiADQQA2AhwgAyAANgIUIANB2yA2AhAgA0EHNgIMDL8BCwJAAkACQAJAAkADQCABLQAAQaDOAGotAAAiAEEFRwRAAkACQCAAQQFrDghHBQYHCAAEAQgLQesAIQIMrQELIAFBAWohAUHtACECDKwBCyAEIAFBAWoiAUcNAAtBhAEhAgzDAQsgAUEBagwUCyADKAIEIQAgA0EANgIEIAMgACABECwiAEUNHiADQdsANgIcIAMgATYCFCADIAA2AgxBACECDMEBCyADKAIEIQAgA0EANgIEIAMgACABECwiAEUNHiADQd0ANgIcIAMgATYCFCADIAA2AgxBACECDMABCyADKAIEIQAgA0EANgIEIAMgACABECwiAEUNHiADQfoANgIcIAMgATYCFCADIAA2AgxBACECDL8BCyADQQA2AhwgAyABNgIUIANB+Q82AhAgA0EHNgIMQQAhAgy+AQsgASAERgRAQYMBIQIMvgELAkAgAS0AAEGgzgBqLQAAQQFrDgg+BAUGAAgCAwcLIAFBAWohAQtBAyECDKMBCyABQQFqDA0LQQAhAiADQQA2AhwgA0HREjYCECADQQc2AgwgAyABQQFqNgIUDLoBCyADKAIEIQAgA0EANgIEIAMgACABECwiAEUNFiADQdsANgIcIAMgATYCFCADIAA2AgxBACECDLkBCyADKAIEIQAgA0EANgIEIAMgACABECwiAEUNFiADQd0ANgIcIAMgATYCFCADIAA2AgxBACECDLgBCyADKAIEIQAgA0EANgIEIAMgACABECwiAEUNFiADQfoANgIcIAMgATYCFCADIAA2AgxBACECDLcBCyADQQA2AhwgAyABNgIUIANB+Q82AhAgA0EHNgIMQQAhAgy2AQtB7AAhAgycAQsgASAERgRAQYIBIQIMtQELIAFBAWoMAgsgASAERgRAQYEBIQIMtAELIAFBAWoMAQsgASAERg0BIAFBAWoLIQFBBCECDJgBC0GAASECDLABCwNAIAEtAABBoMwAai0AACIAQQJHBEAgAEEBRwRAQekAIQIMmQELDDELIAQgAUEBaiIBRw0AC0H/ACECDK8BCyABIARGBEBB/gAhAgyvAQsCQCABLQAAQQlrDjcvAwYvBAYGBgYGBgYGBgYGBgYGBgYGBgUGBgIGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYABgsgAUEBagshAUEFIQIMlAELIAFBAWoMBgsgAygCBCEAIANBADYCBCADIAAgARAsIgBFDQggA0HbADYCHCADIAE2AhQgAyAANgIMQQAhAgyrAQsgAygCBCEAIANBADYCBCADIAAgARAsIgBFDQggA0HdADYCHCADIAE2AhQgAyAANgIMQQAhAgyqAQsgAygCBCEAIANBADYCBCADIAAgARAsIgBFDQggA0H6ADYCHCADIAE2AhQgAyAANgIMQQAhAgypAQsgA0EANgIcIAMgATYCFCADQY0UNgIQIANBBzYCDEEAIQIMqAELAkACQAJAAkADQCABLQAAQaDKAGotAAAiAEEFRwRAAkAgAEEBaw4GLgMEBQYABgtB6AAhAgyUAQsgBCABQQFqIgFHDQALQf0AIQIMqwELIAMoAgQhACADQQA2AgQgAyAAIAEQLCIARQ0HIANB2wA2AhwgAyABNgIUIAMgADYCDEEAIQIMqgELIAMoAgQhACADQQA2AgQgAyAAIAEQLCIARQ0HIANB3QA2AhwgAyABNgIUIAMgADYCDEEAIQIMqQELIAMoAgQhACADQQA2AgQgAyAAIAEQLCIARQ0HIANB+gA2AhwgAyABNgIUIAMgADYCDEEAIQIMqAELIANBADYCHCADIAE2AhQgA0HkCDYCECADQQc2AgxBACECDKcBCyABIARGDQEgAUEBagshAUEGIQIMjAELQfwAIQIMpAELAkACQAJAAkADQCABLQAAQaDIAGotAAAiAEEFRwRAIABBAWsOBCkCAwQFCyAEIAFBAWoiAUcNAAtB+wAhAgynAQsgAygCBCEAIANBADYCBCADIAAgARAsIgBFDQMgA0HbADYCHCADIAE2AhQgAyAANgIMQQAhAgymAQsgAygCBCEAIANBADYCBCADIAAgARAsIgBFDQMgA0HdADYCHCADIAE2AhQgAyAANgIMQQAhAgylAQsgAygCBCEAIANBADYCBCADIAAgARAsIgBFDQMgA0H6ADYCHCADIAE2AhQgAyAANgIMQQAhAgykAQsgA0EANgIcIAMgATYCFCADQbwKNgIQIANBBzYCDEEAIQIMowELQc8AIQIMiQELQdEAIQIMiAELQecAIQIMhwELIAEgBEYEQEH6ACECDKABCwJAIAEtAABBCWsOBCAAACAACyABQQFqIQFB5gAhAgyGAQsgASAERgRAQfkAIQIMnwELAkAgAS0AAEEJaw4EHwAAHwALQQAhAAJAIAMoAjgiAkUNACACKAI4IgJFDQAgAyACEQAAIQALIABFBEBB4gEhAgyGAQsgAEEVRwRAIANBADYCHCADIAE2AhQgA0HJDTYCECADQRo2AgxBACECDJ8BCyADQfgANgIcIAMgATYCFCADQeoaNgIQIANBFTYCDEEAIQIMngELIAEgBEcEQCADQQ02AgggAyABNgIEQeQAIQIMhQELQfcAIQIMnQELIAEgBEYEQEH2ACECDJ0BCwJAAkACQCABLQAAQcgAaw4LAAELCwsLCwsLCwILCyABQQFqIQFB3QAhAgyFAQsgAUEBaiEBQeAAIQIMhAELIAFBAWohAUHjACECDIMBC0H1ACECIAEgBEYNmwEgAygCACIAIAQgAWtqIQUgASAAa0ECaiEGAkADQCABLQAAIABBtdUAai0AAEcNCCAAQQJGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAMnAELIAMoAgQhACADQgA3AwAgAyAAIAZBAWoiARArIgAEQCADQfQANgIcIAMgATYCFCADIAA2AgxBACECDJwBC0HiACECDIIBC0EAIQACQCADKAI4IgJFDQAgAigCNCICRQ0AIAMgAhEAACEACwJAIAAEQCAAQRVGDQEgA0EANgIcIAMgATYCFCADQeoNNgIQIANBJjYCDEEAIQIMnAELQeEAIQIMggELIANB8wA2AhwgAyABNgIUIANBgBs2AhAgA0EVNgIMQQAhAgyaAQsgAy0AKSIAQSNrQQtJDQkCQCAAQQZLDQBBASAAdEHKAHFFDQAMCgtBACECIANBADYCHCADIAE2AhQgA0HtCTYCECADQQg2AgwMmQELQfIAIQIgASAERg2YASADKAIAIgAgBCABa2ohBSABIABrQQFqIQYCQANAIAEtAAAgAEGz1QBqLQAARw0FIABBAUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAyZAQsgAygCBCEAIANCADcDACADIAAgBkEBaiIBECsiAARAIANB8QA2AhwgAyABNgIUIAMgADYCDEEAIQIMmQELQd8AIQIMfwtBACEAAkAgAygCOCICRQ0AIAIoAjQiAkUNACADIAIRAAAhAAsCQCAABEAgAEEVRg0BIANBADYCHCADIAE2AhQgA0HqDTYCECADQSY2AgxBACECDJkBC0HeACECDH8LIANB8AA2AhwgAyABNgIUIANBgBs2AhAgA0EVNgIMQQAhAgyXAQsgAy0AKUEhRg0GIANBADYCHCADIAE2AhQgA0GRCjYCECADQQg2AgxBACECDJYBC0HvACECIAEgBEYNlQEgAygCACIAIAQgAWtqIQUgASAAa0ECaiEGAkADQCABLQAAIABBsNUAai0AAEcNAiAAQQJGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAMlgELIAMoAgQhACADQgA3AwAgAyAAIAZBAWoiARArIgBFDQIgA0HtADYCHCADIAE2AhQgAyAANgIMQQAhAgyVAQsgA0EANgIACyADKAIEIQAgA0EANgIEI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AIEIgFFDQAgAyABIAQgAygCCBEBACIBRQ0AIAMgBDYCFCADIAE2AgwgASEACyAAC74CAQJ/IABBADoAACAAQeQAaiIBQQFrQQA6AAAgAEEAOgACIABBADoAASABQQNrQQA6AAAgAUECa0EAOgAAIABBADoAAyABQQRrQQA6AABBACAAa0EDcSIBIABqIgBBADYCAEHkACABa0F8cSICIABqIgFBBGtBADYCAAJAIAJBCUkNACAAQQA2AgggAEEANgIEIAFBCGtBADYCACABQQxrQQA2AgAgAkEZSQ0AIABBADYCGCAAQQA2AhQgAEEANgIQIABBADYCDCABQRBrQQA2AgAgAUEUa0EANgIAIAFBGGtBADYCACABQRxrQQA2AgAgAiAAQQRxQRhyIgJrIgFBIEkNACAAIAJqIQADQCAAQgA3AxggAEIANwMQIABCADcDCCAAQgA3AwAgAEEgaiEAIAFBIGsiAUEfSw0ACwsLVgEBfwJAIAAoAgwNAAJAAkACQAJAIAAtADEOAwEAAwILIAAoAjgiAUUNACABKAIwIgFFDQAgACABEQAAIgENAwtBAA8LAAsgAEHKGTYCEEEOIQELIAELGgAgACgCDEUEQCAAQd4fNgIQIABBFTYCDAsLFAAgACgCDEEVRgRAIABBADYCDAsLFAAgACgCDEEWRgRAIABBADYCDAsLBwAgACgCDAsHACAAKAIQCwkAIAAgATYCEAsHACAAKAIUCysAAkAgAEEnTw0AQv//////CSAArYhCAYNQDQAgAEECdEHQOGooAgAPCwALFwAgAEEvTwRAAAsgAEECdEHsOWooAgALvwkBAX9B9C0hAQJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAIABB5ABrDvQDY2IAAWFhYWFh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FBQYFBQUFBQUFBQUFBQUABQAHCAUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQAFAAUABQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUAAAAFAEGp0AALBQEBAAEBAEHA0AALAQEAQdrQAAtBAgAAAAAAAAMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAAAAAAAAAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMAQanSAAsFAQEAAQEAQcDSAAsBAQBBytIACwYCAAAAAAIAQeHSAAs6AwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMAAAAAAAADAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwBBoNQAC50BTk9VTkNFRUNLT1VUTkVDVEVURUNSSUJFTFVTSEVURUFEU0VBUkNIUkdFQ1RJVklUWUxFTkRBUlZFT1RJRllQVElPTlNDSFNFQVlTVEFUQ0hHRVVFUllPUkRJUkVDVE9SVFJDSFBBUkFNRVRFUlVSQ0VCU0NSSUJFQVJET1dOQUNFSU5ETktDS1VCU0NSSUJFVFRQQ0VUU1BBRFRQLw==`, `base64`) }); })); var Da$3 = c$12(((e, t) => { let n = [ `GET`, `HEAD`, `POST` ], r = new Set(n), i = [ 101, 204, 205, 304 ], a = [ 301, 302, 303, 307, 308 ], o = new Set(a), s = `1.7.9.11.13.15.17.19.20.21.22.23.25.37.42.43.53.69.77.79.87.95.101.102.103.104.109.110.111.113.115.117.119.123.135.137.139.143.161.179.389.427.465.512.513.514.515.526.530.531.532.540.548.554.556.563.587.601.636.989.990.993.995.1719.1720.1723.2049.3659.4045.4190.5060.5061.6000.6566.6665.6666.6667.6668.6669.6679.6697.10080`.split(`.`), c = new Set(s), l = [ `no-referrer`, `no-referrer-when-downgrade`, `same-origin`, `origin`, `strict-origin`, `origin-when-cross-origin`, `strict-origin-when-cross-origin`, `unsafe-url` ], u = [``, ...l], d = new Set(l), f = [ `follow`, `manual`, `error` ], p = [ `GET`, `HEAD`, `OPTIONS`, `TRACE` ], m = new Set(p), h = [ `navigate`, `same-origin`, `no-cors`, `cors` ], g = [ `omit`, `same-origin`, `include` ], _ = [ `default`, `no-store`, `reload`, `no-cache`, `force-cache`, `only-if-cached` ], v = [ `content-encoding`, `content-language`, `content-location`, `content-type`, `content-length` ], y = [`half`], b = [ `CONNECT`, `TRACE`, `TRACK` ], x = new Set(b), S = [ `audio`, `audioworklet`, `font`, `image`, `manifest`, `paintworklet`, `script`, `style`, `track`, `video`, `xslt`, `` ]; t.exports = { subresource: S, forbiddenMethods: b, requestBodyHeader: v, referrerPolicy: u, requestRedirect: f, requestMode: h, requestCredentials: g, requestCache: _, redirectStatus: a, corsSafeListedMethods: n, nullBodyStatus: i, safeMethods: p, badPorts: s, requestDuplex: y, subresourceSet: new Set(S), badPortsSet: c, redirectStatusSet: o, corsSafeListedMethodsSet: r, safeMethodsSet: m, forbiddenMethodsSet: x, referrerPolicyTokens: d }; })); var Oa$3 = c$12(((e, t) => { let n = Symbol.for(`undici.globalOrigin.1`); function r() { return globalThis[n]; } function i(e) { if (e === void 0) { Object.defineProperty(globalThis, n, { value: void 0, writable: !0, enumerable: !1, configurable: !1 }); return; } let t = new URL(e); if (t.protocol !== `http:` && t.protocol !== `https:`) throw TypeError(`Only http & https urls are allowed, received ${t.protocol}`); Object.defineProperty(globalThis, n, { value: t, writable: !0, enumerable: !1, configurable: !1 }); } t.exports = { getGlobalOrigin: r, setGlobalOrigin: i }; })); var ka$3 = c$12(((e, t) => { let n = new TextDecoder(); function r(e) { return e.length === 0 ? `` : (e[0] === 239 && e[1] === 187 && e[2] === 191 && (e = e.subarray(3)), n.decode(e)); } t.exports = { utf8DecodeBytes: r }; })); var Aa$3 = c$12(((e, n) => { let r = f$11(`node:assert`), { utf8DecodeBytes: i } = ka$3(); function a(e, t, n) { let r = ``; for (; n.position < t.length && e(t[n.position]);) r += t[n.position], n.position++; return r; } function o(e, t, n) { let r = t.indexOf(e, n.position), i = n.position; return r === -1 ? (n.position = t.length, t.slice(i)) : (n.position = r, t.slice(i, n.position)); } let s = /[\u0009\u000A\u000C\u000D\u0020]/g; function c(e) { e = e.replace(s, ``); let t = e.length; if (t % 4 == 0 && e.charCodeAt(t - 1) === 61 && (--t, e.charCodeAt(t - 1) === 61 && --t), t % 4 == 1 || /[^+/0-9A-Za-z]/.test(e.length === t ? e : e.substring(0, t))) return `failure`; let n = Buffer.from(e, `base64`); return new Uint8Array(n.buffer, n.byteOffset, n.byteLength); } function l(e) { return e === 9 || e === 10 || e === 12 || e === 13 || e === 32; } function u(e) { let t = e.length; if (65535 > t) return String.fromCharCode.apply(null, e); let n = ``, r = 0, i = 65535; for (; r < t;) r + i > t && (i = t - r), n += String.fromCharCode.apply(null, e.subarray(r, r += i)); return n; } let d = /[^\x00-\xFF]/; function f(e) { return r(!d.test(e)), e; } function p(e) { return JSON.parse(i(e)); } function m(e, t = !0, n = !0) { return h(e, t, n, l); } function h(e, t, n, r) { let i = 0, a = e.length - 1; if (t) for (; i < e.length && r(e.charCodeAt(i));) i++; if (n) for (; a > 0 && r(e.charCodeAt(a));) a--; return i === 0 && a === e.length - 1 ? e : e.slice(i, a + 1); } function g(e) { let t = JSON.stringify(e); if (t === void 0) throw TypeError(`Value is not JSON serializable`); return r(typeof t == `string`), t; } n.exports = { collectASequenceOfCodePoints: a, collectASequenceOfCodePointsFast: o, forgivingBase64: c, isASCIIWhitespace: l, isomorphicDecode: u, isomorphicEncode: f, parseJSONFromBytes: p, removeASCIIWhitespace: m, removeChars: h, serializeJavascriptValueToJSONString: g }; })); var ja$3 = c$12(((e, n) => { let r = f$11(`node:assert`), { forgivingBase64: i, collectASequenceOfCodePoints: a, collectASequenceOfCodePointsFast: o, isomorphicDecode: s, removeASCIIWhitespace: c, removeChars: l } = Aa$3(), u = new TextEncoder(), d = /^[-!#$%&'*+.^_|~A-Za-z0-9]+$/u, f = /[\u000A\u000D\u0009\u0020]/u, p = /^[\u0009\u0020-\u007E\u0080-\u00FF]+$/u; function m(e) { r(e.protocol === `data:`); let t = h(e, !0); t = t.slice(5); let n = { position: 0 }, a = o(`,`, t, n), l = a.length; if (a = c(a, !0, !0), n.position >= t.length) return `failure`; n.position++; let u = g(t.slice(l + 1)); if (/;(?:\u0020*)base64$/iu.test(a)) { if (u = i(s(u)), u === `failure`) return `failure`; a = a.slice(0, -6), a = a.replace(/(\u0020+)$/u, ``), a = a.slice(0, -1); } a.startsWith(`;`) && (a = `text/plain` + a); let d = b(a); return d === `failure` && (d = b(`text/plain;charset=US-ASCII`)), { mimeType: d, body: u }; } function h(e, t = !1) { if (!t) return e.href; let n = e.href, r = e.hash.length, i = r === 0 ? n : n.substring(0, n.length - r); return !r && n.endsWith(`#`) ? i.slice(0, -1) : i; } function g(e) { return y(u.encode(e)); } function _(e) { return e >= 48 && e <= 57 || e >= 65 && e <= 70 || e >= 97 && e <= 102; } function v(e) { return e >= 48 && e <= 57 ? e - 48 : (e & 223) - 55; } function y(e) { let t = e.length, n = new Uint8Array(t), r = 0, i = 0; for (; i < t;) { let t = e[i]; t === 37 ? t === 37 && !(_(e[i + 1]) && _(e[i + 2])) ? n[r++] = 37 : (n[r++] = v(e[i + 1]) << 4 | v(e[i + 2]), i += 2) : n[r++] = t, ++i; } return t === r ? n : n.subarray(0, r); } function b(e) { e = w(e, !0, !0); let t = { position: 0 }, n = o(`/`, e, t); if (n.length === 0 || !d.test(n) || t.position >= e.length) return `failure`; t.position++; let r = o(`;`, e, t); if (r = w(r, !1, !0), r.length === 0 || !d.test(r)) return `failure`; let i = n.toLowerCase(), s = r.toLowerCase(), c = { type: i, subtype: s, parameters: /* @__PURE__ */ new Map(), essence: `${i}/${s}` }; for (; t.position < e.length;) { t.position++, a((e) => f.test(e), e, t); let n = a((e) => e !== `;` && e !== `=`, e, t); if (n = n.toLowerCase(), t.position < e.length) { if (e[t.position] === `;`) continue; t.position++; } if (t.position >= e.length) break; let r = null; if (e[t.position] === `"`) r = x(e, t, !0), o(`;`, e, t); else if (r = o(`;`, e, t), r = w(r, !1, !0), r.length === 0) continue; n.length !== 0 && d.test(n) && (r.length === 0 || p.test(r)) && !c.parameters.has(n) && c.parameters.set(n, r); } return c; } function x(e, t, n = !1) { let i = t.position, o = ``; for (r(e[t.position] === `"`), t.position++; o += a((e) => e !== `"` && e !== `\\`, e, t), !(t.position >= e.length);) { let n = e[t.position]; if (t.position++, n === `\\`) { if (t.position >= e.length) { o += `\\`; break; } o += e[t.position], t.position++; } else { r(n === `"`); break; } } return n ? o : e.slice(i, t.position); } function S(e) { r(e !== `failure`); let { parameters: t, essence: n } = e, i = n; for (let [e, n] of t.entries()) i += `;`, i += e, i += `=`, d.test(n) || (n = n.replace(/[\\"]/gu, `\\$&`), n = `"` + n, n += `"`), i += n; return i; } function C(e) { return e === 13 || e === 10 || e === 9 || e === 32; } function w(e, t = !0, n = !0) { return l(e, t, n, C); } function T(e) { switch (e.essence) { case `application/ecmascript`: case `application/javascript`: case `application/x-ecmascript`: case `application/x-javascript`: case `text/ecmascript`: case `text/javascript`: case `text/javascript1.0`: case `text/javascript1.1`: case `text/javascript1.2`: case `text/javascript1.3`: case `text/javascript1.4`: case `text/javascript1.5`: case `text/jscript`: case `text/livescript`: case `text/x-ecmascript`: case `text/x-javascript`: return `text/javascript`; case `application/json`: case `text/json`: return `application/json`; case `image/svg+xml`: return `image/svg+xml`; case `text/xml`: case `application/xml`: return `application/xml`; } return e.subtype.endsWith(`+json`) ? `application/json` : e.subtype.endsWith(`+xml`) ? `application/xml` : ``; } n.exports = { dataURLProcessor: m, URLSerializer: h, stringPercentDecode: g, parseMIMEType: b, collectAnHTTPQuotedString: x, serializeAMimeType: S, removeHTTPWhitespace: w, minimizeSupportedMimeType: T, HTTP_TOKEN_CODEPOINTS: d }; })); var Ma$3 = c$12(((e, n) => { let r = { __proto__: null, "node:crypto": () => f$11(`node:crypto`), "node:sqlite": () => f$11(`node:sqlite`), "node:worker_threads": () => f$11(`node:worker_threads`), "node:zlib": () => f$11(`node:zlib`) }; function i(e) { try { return r[e](), !0; } catch (e) { if (e.code !== `ERR_UNKNOWN_BUILTIN_MODULE` && e.code !== `ERR_NO_CRYPTO`) throw e; return !1; } } function a(e, t) { return r[e]()[t] !== void 0; } let o = [`markAsUncloneable`, `zstd`], s = { markAsUncloneable: [`node:worker_threads`, `markAsUncloneable`], zstd: [`node:zlib`, `createZstdDecompress`] }, c = [`crypto`, `sqlite`], l = [...c, ...o]; function u(e) { if (c.includes(e)) return i(`node:${e}`); if (o.includes(e)) { let [t, n] = s[e]; return a(t, n); } throw TypeError(`unknown feature: ${e}`); } let d = new class { #e = /* @__PURE__ */ new Map(); clear() { this.#e.clear(); } has(e) { return this.#e.get(e) ?? this.#t(e); } set(e, t) { if (l.includes(e) === !1) throw TypeError(`unknown feature: ${e}`); this.#e.set(e, t); } #t(e) { let t = u(e); return this.#e.set(e, t), t; } }(); n.exports.runtimeFeatures = d, n.exports.default = d; })); var Na$3 = c$12(((e, n) => { let r = f$11(`node:assert`), { types: i, inspect: a } = f$11(`node:util`), { runtimeFeatures: o } = Ma$3(), s = Function.call.bind(Function.prototype[Symbol.hasInstance]), c = { converters: {}, util: {}, errors: {}, is: {} }; c.errors.exception = function(e) { return TypeError(`${e.header}: ${e.message}`); }, c.errors.conversionFailed = function(e) { let t = e.types.length === 1 ? `` : ` one of`, n = `${e.argument} could not be converted to${t}: ${e.types.join(`, `)}.`; return c.errors.exception({ header: e.prefix, message: n }); }, c.errors.invalidArgument = function(e) { return c.errors.exception({ header: e.prefix, message: `"${e.value}" is an invalid ${e.type}.` }); }, c.brandCheck = function(e, t) { if (!s(t, e)) { let e = TypeError(`Illegal invocation`); throw e.code = `ERR_INVALID_THIS`, e; } }, c.brandCheckMultiple = function(e) { let t = e.map((e) => c.util.MakeTypeAssertion(e)); return (e) => { if (t.every((t) => !t(e))) { let e = TypeError(`Illegal invocation`); throw e.code = `ERR_INVALID_THIS`, e; } }; }, c.argumentLengthCheck = function({ length: e }, t, n) { if (e < t) throw c.errors.exception({ message: `${t} argument${t === 1 ? `` : `s`} required, but${e ? ` only` : ``} ${e} found.`, header: n }); }, c.illegalConstructor = function() { throw c.errors.exception({ header: `TypeError`, message: `Illegal constructor` }); }, c.util.MakeTypeAssertion = function(e) { return (t) => s(e, t); }, c.util.Type = function(e) { switch (typeof e) { case `undefined`: return 1; case `boolean`: return 2; case `string`: return 3; case `symbol`: return 4; case `number`: return 5; case `bigint`: return 6; case `function`: case `object`: return e === null ? 7 : 8; } }, c.util.Types = { UNDEFINED: 1, BOOLEAN: 2, STRING: 3, SYMBOL: 4, NUMBER: 5, BIGINT: 6, NULL: 7, OBJECT: 8 }, c.util.TypeValueToString = function(e) { switch (c.util.Type(e)) { case 1: return `Undefined`; case 2: return `Boolean`; case 3: return `String`; case 4: return `Symbol`; case 5: return `Number`; case 6: return `BigInt`; case 7: return `Null`; case 8: return `Object`; } }, c.util.markAsUncloneable = o.has(`markAsUncloneable`) ? f$11(`node:worker_threads`).markAsUncloneable : () => {}, c.util.ConvertToInt = function(e, t, n, r) { let i, a; t === 64 ? (i = 2 ** 53 - 1, a = n === `unsigned` ? 0 : -9007199254740991) : n === `unsigned` ? (a = 0, i = 2 ** t - 1) : (a = -(2 ** (t - 1)), i = 2 ** (t - 1) - 1); let o = Number(e); if (o === 0 && (o = 0), c.util.HasFlag(r, c.attributes.EnforceRange)) { if (Number.isNaN(o) || o === Infinity || o === -Infinity) throw c.errors.exception({ header: `Integer conversion`, message: `Could not convert ${c.util.Stringify(e)} to an integer.` }); if (o = c.util.IntegerPart(o), o < a || o > i) throw c.errors.exception({ header: `Integer conversion`, message: `Value must be between ${a}-${i}, got ${o}.` }); return o; } return !Number.isNaN(o) && c.util.HasFlag(r, c.attributes.Clamp) ? (o = Math.min(Math.max(o, a), i), o = Math.floor(o) % 2 == 0 ? Math.floor(o) : Math.ceil(o), o) : Number.isNaN(o) || o === 0 && Object.is(0, o) || o === Infinity || o === -Infinity ? 0 : (o = c.util.IntegerPart(o), o %= 2 ** t, n === `signed` && o >= 2 ** (t - 1) ? o - 2 ** t : o); }, c.util.IntegerPart = function(e) { let t = Math.floor(Math.abs(e)); return e < 0 ? -1 * t : t; }, c.util.Stringify = function(e) { switch (c.util.Type(e)) { case 4: return `Symbol(${e.description})`; case 8: return a(e); case 3: return `"${e}"`; case 6: return `${e}n`; default: return `${e}`; } }, c.util.IsResizableArrayBuffer = function(e) { if (i.isArrayBuffer(e)) return e.resizable; if (i.isSharedArrayBuffer(e)) return e.growable; throw c.errors.exception({ header: `IsResizableArrayBuffer`, message: `"${c.util.Stringify(e)}" is not an array buffer.` }); }, c.util.HasFlag = function(e, t) { return typeof e == `number` && (e & t) === t; }, c.sequenceConverter = function(e) { return (t, n, r, i) => { if (c.util.Type(t) !== 8) throw c.errors.exception({ header: n, message: `${r} (${c.util.Stringify(t)}) is not iterable.` }); let a = typeof i == `function` ? i() : t?.[Symbol.iterator]?.(), o = [], s = 0; if (a === void 0 || typeof a.next != `function`) throw c.errors.exception({ header: n, message: `${r} is not iterable.` }); for (;;) { let { done: t, value: i } = a.next(); if (t) break; o.push(e(i, n, `${r}[${s++}]`)); } return o; }; }, c.recordConverter = function(e, t) { return (n, r, a) => { if (c.util.Type(n) !== 8) throw c.errors.exception({ header: r, message: `${a} ("${c.util.TypeValueToString(n)}") is not an Object.` }); let o = {}; if (!i.isProxy(n)) { let i = [...Object.getOwnPropertyNames(n), ...Object.getOwnPropertySymbols(n)]; for (let s of i) { let i = c.util.Stringify(s), l = e(s, r, `Key ${i} in ${a}`); o[l] = t(n[s], r, `${a}[${i}]`); } return o; } let s = Reflect.ownKeys(n); for (let i of s) if (Reflect.getOwnPropertyDescriptor(n, i)?.enumerable) { let s = e(i, r, a); o[s] = t(n[i], r, a); } return o; }; }, c.interfaceConverter = function(e, t) { return (n, r, i) => { if (!e(n)) throw c.errors.exception({ header: r, message: `Expected ${i} ("${c.util.Stringify(n)}") to be an instance of ${t}.` }); return n; }; }, c.dictionaryConverter = function(e) { return e.sort((e, t) => (e.key > t.key) - (e.key < t.key)), (t, n, r) => { let i = {}; if (t != null && c.util.Type(t) !== 8) throw c.errors.exception({ header: n, message: `Expected ${t} to be one of: Null, Undefined, Object.` }); for (let a of e) { let { key: e, defaultValue: o, required: s, converter: l } = a; if (s === !0 && (t == null || !Object.hasOwn(t, e))) throw c.errors.exception({ header: n, message: `Missing required key "${e}".` }); let u = t?.[e], d = o !== void 0; if (d && u === void 0 && (u = o()), s || d || u !== void 0) { if (u = l(u, n, `${r}.${e}`), a.allowedValues && !a.allowedValues.includes(u)) throw c.errors.exception({ header: n, message: `${u} is not an accepted type. Expected one of ${a.allowedValues.join(`, `)}.` }); i[e] = u; } } return i; }; }, c.nullableConverter = function(e) { return (t, n, r) => t === null ? t : e(t, n, r); }, c.is.USVString = function(e) { return typeof e == `string` && e.isWellFormed(); }, c.is.ReadableStream = c.util.MakeTypeAssertion(ReadableStream), c.is.Blob = c.util.MakeTypeAssertion(Blob), c.is.URLSearchParams = c.util.MakeTypeAssertion(URLSearchParams), c.is.File = c.util.MakeTypeAssertion(File), c.is.URL = c.util.MakeTypeAssertion(URL), c.is.AbortSignal = c.util.MakeTypeAssertion(AbortSignal), c.is.MessagePort = c.util.MakeTypeAssertion(MessagePort), c.is.BufferSource = function(e) { return i.isArrayBuffer(e) || ArrayBuffer.isView(e) && i.isArrayBuffer(e.buffer); }, c.util.getCopyOfBytesHeldByBufferSource = function(e) { let t = e, n = t, a = 0, o = 0; if (i.isTypedArray(t) || i.isDataView(t) ? (n = t.buffer, a = t.byteOffset, o = t.byteLength) : (r(i.isAnyArrayBuffer(t)), o = t.byteLength), n.detached) return /* @__PURE__ */ new Uint8Array(); let s = new Uint8Array(o), c = new Uint8Array(n, a, o); return s.set(c), s; }, c.converters.DOMString = function(e, t, n, r) { if (e === null && c.util.HasFlag(r, c.attributes.LegacyNullToEmptyString)) return ``; if (typeof e == `symbol`) throw c.errors.exception({ header: t, message: `${n} is a symbol, which cannot be converted to a DOMString.` }); return String(e); }, c.converters.ByteString = function(e, t, n) { if (typeof e == `symbol`) throw c.errors.exception({ header: t, message: `${n} is a symbol, which cannot be converted to a ByteString.` }); let r = String(e); for (let e = 0; e < r.length; e++) if (r.charCodeAt(e) > 255) throw TypeError(`Cannot convert argument to a ByteString because the character at index ${e} has a value of ${r.charCodeAt(e)} which is greater than 255.`); return r; }, c.converters.USVString = function(e) { return typeof e == `string` ? e.toWellFormed() : `${e}`.toWellFormed(); }, c.converters.boolean = function(e) { return !!e; }, c.converters.any = function(e) { return e; }, c.converters[`long long`] = function(e, t, n) { return c.util.ConvertToInt(e, 64, `signed`, 0, t, n); }, c.converters[`unsigned long long`] = function(e, t, n) { return c.util.ConvertToInt(e, 64, `unsigned`, 0, t, n); }, c.converters[`unsigned long`] = function(e, t, n) { return c.util.ConvertToInt(e, 32, `unsigned`, 0, t, n); }, c.converters[`unsigned short`] = function(e, t, n, r) { return c.util.ConvertToInt(e, 16, `unsigned`, r, t, n); }, c.converters.ArrayBuffer = function(e, t, n, r) { if (c.util.Type(e) !== 8 || !i.isArrayBuffer(e)) throw c.errors.conversionFailed({ prefix: t, argument: `${n} ("${c.util.Stringify(e)}")`, types: [`ArrayBuffer`] }); if (!c.util.HasFlag(r, c.attributes.AllowResizable) && c.util.IsResizableArrayBuffer(e)) throw c.errors.exception({ header: t, message: `${n} cannot be a resizable ArrayBuffer.` }); return e; }, c.converters.SharedArrayBuffer = function(e, t, n, r) { if (c.util.Type(e) !== 8 || !i.isSharedArrayBuffer(e)) throw c.errors.conversionFailed({ prefix: t, argument: `${n} ("${c.util.Stringify(e)}")`, types: [`SharedArrayBuffer`] }); if (!c.util.HasFlag(r, c.attributes.AllowResizable) && c.util.IsResizableArrayBuffer(e)) throw c.errors.exception({ header: t, message: `${n} cannot be a resizable SharedArrayBuffer.` }); return e; }, c.converters.TypedArray = function(e, t, n, r, a) { if (c.util.Type(e) !== 8 || !i.isTypedArray(e) || e.constructor.name !== t.name) throw c.errors.conversionFailed({ prefix: n, argument: `${r} ("${c.util.Stringify(e)}")`, types: [t.name] }); if (!c.util.HasFlag(a, c.attributes.AllowShared) && i.isSharedArrayBuffer(e.buffer)) throw c.errors.exception({ header: n, message: `${r} cannot be a view on a shared array buffer.` }); if (!c.util.HasFlag(a, c.attributes.AllowResizable) && c.util.IsResizableArrayBuffer(e.buffer)) throw c.errors.exception({ header: n, message: `${r} cannot be a view on a resizable array buffer.` }); return e; }, c.converters.DataView = function(e, t, n, r) { if (c.util.Type(e) !== 8 || !i.isDataView(e)) throw c.errors.conversionFailed({ prefix: t, argument: `${n} ("${c.util.Stringify(e)}")`, types: [`DataView`] }); if (!c.util.HasFlag(r, c.attributes.AllowShared) && i.isSharedArrayBuffer(e.buffer)) throw c.errors.exception({ header: t, message: `${n} cannot be a view on a shared array buffer.` }); if (!c.util.HasFlag(r, c.attributes.AllowResizable) && c.util.IsResizableArrayBuffer(e.buffer)) throw c.errors.exception({ header: t, message: `${n} cannot be a view on a resizable array buffer.` }); return e; }, c.converters.ArrayBufferView = function(e, t, n, r) { if (c.util.Type(e) !== 8 || !i.isArrayBufferView(e)) throw c.errors.conversionFailed({ prefix: t, argument: `${n} ("${c.util.Stringify(e)}")`, types: [`ArrayBufferView`] }); if (!c.util.HasFlag(r, c.attributes.AllowShared) && i.isSharedArrayBuffer(e.buffer)) throw c.errors.exception({ header: t, message: `${n} cannot be a view on a shared array buffer.` }); if (!c.util.HasFlag(r, c.attributes.AllowResizable) && c.util.IsResizableArrayBuffer(e.buffer)) throw c.errors.exception({ header: t, message: `${n} cannot be a view on a resizable array buffer.` }); return e; }, c.converters.BufferSource = function(e, t, n, r) { if (i.isArrayBuffer(e)) return c.converters.ArrayBuffer(e, t, n, r); if (i.isArrayBufferView(e)) return r &= ~c.attributes.AllowShared, c.converters.ArrayBufferView(e, t, n, r); throw i.isSharedArrayBuffer(e) ? c.errors.exception({ header: t, message: `${n} cannot be a SharedArrayBuffer.` }) : c.errors.conversionFailed({ prefix: t, argument: `${n} ("${c.util.Stringify(e)}")`, types: [`ArrayBuffer`, `ArrayBufferView`] }); }, c.converters.AllowSharedBufferSource = function(e, t, n, r) { if (i.isArrayBuffer(e)) return c.converters.ArrayBuffer(e, t, n, r); if (i.isSharedArrayBuffer(e)) return c.converters.SharedArrayBuffer(e, t, n, r); if (i.isArrayBufferView(e)) return r |= c.attributes.AllowShared, c.converters.ArrayBufferView(e, t, n, r); throw c.errors.conversionFailed({ prefix: t, argument: `${n} ("${c.util.Stringify(e)}")`, types: [ `ArrayBuffer`, `SharedArrayBuffer`, `ArrayBufferView` ] }); }, c.converters[`sequence`] = c.sequenceConverter(c.converters.ByteString), c.converters[`sequence>`] = c.sequenceConverter(c.converters[`sequence`]), c.converters[`record`] = c.recordConverter(c.converters.ByteString, c.converters.ByteString), c.converters.Blob = c.interfaceConverter(c.is.Blob, `Blob`), c.converters.AbortSignal = c.interfaceConverter(c.is.AbortSignal, `AbortSignal`), c.converters.EventHandlerNonNull = function(e) { return c.util.Type(e) === 8 ? typeof e == `function` ? e : () => {} : null; }, c.attributes = { Clamp: 1, EnforceRange: 2, AllowShared: 4, AllowResizable: 8, LegacyNullToEmptyString: 16 }, n.exports = { webidl: c }; })); var Pa$3 = c$12(((e, n) => { let { Transform: r } = f$11(`node:stream`), i = f$11(`node:zlib`), { redirectStatusSet: a, referrerPolicyTokens: o, badPortsSet: s } = Da$3(), { getGlobalOrigin: c } = Oa$3(), { collectAnHTTPQuotedString: l, parseMIMEType: u } = ja$3(), { performance: d } = f$11(`node:perf_hooks`), { ReadableStreamFrom: f, isValidHTTPToken: p, normalizedMethodRecordsBase: m } = q$6(), h = f$11(`node:assert`), { isUint8Array: g } = f$11(`node:util/types`), { webidl: _ } = Na$3(), { isomorphicEncode: v, collectASequenceOfCodePoints: y, removeChars: b } = Aa$3(); function x(e) { let t = e.urlList, n = t.length; return n === 0 ? null : t[n - 1].toString(); } function S(e, t) { if (!a.has(e.status)) return null; let n = e.headersList.get(`location`, !0); return n !== null && A(n) && (C(n) || (n = w(n)), n = new URL(n, x(e))), n && !n.hash && (n.hash = t), n; } function C(e) { for (let t = 0; t < e.length; ++t) { let n = e.charCodeAt(t); if (n > 126 || n < 32) return !1; } return !0; } function w(e) { return Buffer.from(e, `binary`).toString(`utf8`); } function T(e) { return e.urlList[e.urlList.length - 1]; } function E(e) { let t = T(e); return xe(t) && s.has(t.port) ? `blocked` : `allowed`; } function D(e) { return e instanceof Error || e?.constructor?.name === `Error` || e?.constructor?.name === `DOMException`; } function O(e) { for (let t = 0; t < e.length; ++t) { let n = e.charCodeAt(t); if (!(n === 9 || n >= 32 && n <= 126 || n >= 128 && n <= 255)) return !1; } return !0; } let k = p; function A(e) { return (e[0] === ` ` || e[0] === ` ` || e[e.length - 1] === ` ` || e[e.length - 1] === ` ` || e.includes(` `) || e.includes(`\r`) || e.includes(`\0`)) === !1; } function j(e) { let t = (e.headersList.get(`referrer-policy`, !0) ?? ``).split(`,`), n = ``; if (t.length) for (let e = t.length; e !== 0; e--) { let r = t[e - 1].trim(); if (o.has(r)) { n = r; break; } } return n; } function M(e, t) { let n = j(t); n !== `` && (e.referrerPolicy = n); } function N() { return `allowed`; } function P() { return `success`; } function F() { return `success`; } function I(e) { let t = null; t = e.mode, e.headersList.set(`sec-fetch-mode`, t, !0); } function ee(e) { let t = e.origin; if (!(t === `client` || t === void 0)) { if (e.responseTainting === `cors` || e.mode === `websocket`) e.headersList.append(`origin`, t, !0); else if (e.method !== `GET` && e.method !== `HEAD`) { switch (e.referrerPolicy) { case `no-referrer`: t = null; break; case `no-referrer-when-downgrade`: case `strict-origin`: case `strict-origin-when-cross-origin`: e.origin && be(e.origin) && !be(T(e)) && (t = null); break; case `same-origin`: de(e, T(e)) || (t = null); break; default: } e.headersList.append(`origin`, t, !0); } } } function L(e, t) { return e; } function te(e, t, n) { return !e?.startTime || e.startTime < t ? { domainLookupStartTime: t, domainLookupEndTime: t, connectionStartTime: t, connectionEndTime: t, secureConnectionStartTime: t, ALPNNegotiatedProtocol: e?.ALPNNegotiatedProtocol } : { domainLookupStartTime: L(e.domainLookupStartTime, n), domainLookupEndTime: L(e.domainLookupEndTime, n), connectionStartTime: L(e.connectionStartTime, n), connectionEndTime: L(e.connectionEndTime, n), secureConnectionStartTime: L(e.secureConnectionStartTime, n), ALPNNegotiatedProtocol: e.ALPNNegotiatedProtocol }; } function R(e) { return L(d.now(), e); } function ne(e) { return { startTime: e.startTime ?? 0, redirectStartTime: 0, redirectEndTime: 0, postRedirectStartTime: e.startTime ?? 0, finalServiceWorkerStartTime: 0, finalNetworkResponseStartTime: 0, finalNetworkRequestStartTime: 0, endTime: 0, encodedBodySize: 0, decodedBodySize: 0, finalConnectionTimingInfo: null }; } function re() { return { referrerPolicy: `strict-origin-when-cross-origin` }; } function z(e) { return { referrerPolicy: e.referrerPolicy }; } function ie(e) { let t = e.referrerPolicy; h(t); let n = null; if (e.referrer === `client`) { let e = c(); if (!e || e.origin === `null`) return `no-referrer`; n = new URL(e); } else _.is.URL(e.referrer) && (n = e.referrer); let r = ae(n), i = ae(n, !0); switch (r.toString().length > 4096 && (r = i), t) { case `no-referrer`: return `no-referrer`; case `origin`: return i ?? ae(n, !0); case `unsafe-url`: return r; case `strict-origin`: { let t = T(e); return B(r) && !B(t) ? `no-referrer` : i; } case `strict-origin-when-cross-origin`: { let t = T(e); return de(r, t) ? r : B(r) && !B(t) ? `no-referrer` : i; } case `same-origin`: return de(e, r) ? r : `no-referrer`; case `origin-when-cross-origin`: return de(e, r) ? r : i; case `no-referrer-when-downgrade`: { let t = T(e); return B(r) && !B(t) ? `no-referrer` : r; } } } function ae(e, t = !1) { return h(_.is.URL(e)), e = new URL(e), ye(e) ? `no-referrer` : (e.username = ``, e.password = ``, e.hash = ``, t === !0 && (e.pathname = ``, e.search = ``), e); } let oe = RegExp.prototype.test.bind(/^127\.(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)\.){2}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)$/), se = RegExp.prototype.test.bind(/^(?:(?:0{1,4}:){7}|(?:0{1,4}:){1,6}:|::)0{0,3}1$/); function ce(e) { return e.includes(`:`) ? (e[0] === `[` && e[e.length - 1] === `]` && (e = e.slice(1, -1)), se(e)) : oe(e); } function le(e) { return e == null || e === `null` ? !1 : (e = new URL(e), !!(e.protocol === `https:` || e.protocol === `wss:` || ce(e.hostname) || e.hostname === `localhost` || e.hostname === `localhost.` || e.hostname.endsWith(`.localhost`) || e.hostname.endsWith(`.localhost.`) || e.protocol === `file:`)); } function B(e) { return _.is.URL(e) ? e.href === `about:blank` || e.href === `about:srcdoc` || e.protocol === `data:` || e.protocol === `blob:` ? !0 : le(e.origin) : !1; } function ue(e) {} function de(e, t) { return e.origin === t.origin && e.origin === `null` || e.protocol === t.protocol && e.hostname === t.hostname && e.port === t.port; } function fe(e) { return e.controller.state === `aborted`; } function V(e) { return e.controller.state === `aborted` || e.controller.state === `terminated`; } function pe(e) { return m[e.toLowerCase()] ?? e; } let me = Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]())); function he(e, t, n = 0, r = 1) { class i { #e; #t; #n; constructor(e, t) { this.#e = e, this.#t = t, this.#n = 0; } next() { if (typeof this != `object` || this === null || !(#e in this)) throw TypeError(`'next' called on an object that does not implement interface ${e} Iterator.`); let i = this.#n, a = t(this.#e); if (i >= a.length) return { value: void 0, done: !0 }; let { [n]: o, [r]: s } = a[i]; this.#n = i + 1; let c; switch (this.#t) { case `key`: c = o; break; case `value`: c = s; break; case `key+value`: c = [o, s]; break; } return { value: c, done: !1 }; } } return delete i.prototype.constructor, Object.setPrototypeOf(i.prototype, me), Object.defineProperties(i.prototype, { [Symbol.toStringTag]: { writable: !1, enumerable: !1, configurable: !0, value: `${e} Iterator` }, next: { writable: !0, enumerable: !0, configurable: !0 } }), function(e, t) { return new i(e, t); }; } function ge(e, t, n, r = 0, i = 1) { let a = he(e, n, r, i), o = { keys: { writable: !0, enumerable: !0, configurable: !0, value: function() { return _.brandCheck(this, t), a(this, `key`); } }, values: { writable: !0, enumerable: !0, configurable: !0, value: function() { return _.brandCheck(this, t), a(this, `value`); } }, entries: { writable: !0, enumerable: !0, configurable: !0, value: function() { return _.brandCheck(this, t), a(this, `key+value`); } }, forEach: { writable: !0, enumerable: !0, configurable: !0, value: function(n, r = globalThis) { if (_.brandCheck(this, t), _.argumentLengthCheck(arguments, 1, `${e}.forEach`), typeof n != `function`) throw TypeError(`Failed to execute 'forEach' on '${e}': parameter 1 is not of type 'Function'.`); for (let { 0: e, 1: t } of a(this, `key+value`)) n.call(r, t, e, this); } } }; return Object.defineProperties(t.prototype, { ...o, [Symbol.iterator]: { writable: !0, enumerable: !1, configurable: !0, value: o.entries.value } }); } function H(e, t, n) { let r = t, i = n; try { ve(e.stream.getReader(), r, i); } catch (e) { i(e); } } function _e(e) { try { e.close(), e.byobRequest?.respond(0); } catch (e) { if (!e.message.includes(`Controller is already closed`) && !e.message.includes(`ReadableStream is already closed`)) throw e; } } async function ve(e, t, n) { try { let r = [], i = 0; do { let { done: a, value: o } = await e.read(); if (a) { t(Buffer.concat(r, i)); return; } if (!g(o)) { n(TypeError(`Received non-Uint8Array chunk`)); return; } r.push(o), i += o.length; } while (!0); } catch (e) { n(e); } } function ye(e) { h(`protocol` in e); let t = e.protocol; return t === `about:` || t === `blob:` || t === `data:`; } function be(e) { return typeof e == `string` && e[5] === `:` && e[0] === `h` && e[1] === `t` && e[2] === `t` && e[3] === `p` && e[4] === `s` || e.protocol === `https:`; } function xe(e) { h(`protocol` in e); let t = e.protocol; return t === `http:` || t === `https:`; } function Se(e, t) { let n = e; if (!n.startsWith(`bytes`)) return `failure`; let r = { position: 5 }; if (t && y((e) => e === ` ` || e === ` `, n, r), n.charCodeAt(r.position) !== 61) return `failure`; r.position++, t && y((e) => e === ` ` || e === ` `, n, r); let i = y((e) => { let t = e.charCodeAt(0); return t >= 48 && t <= 57; }, n, r), a = i.length ? Number(i) : null; if (t && y((e) => e === ` ` || e === ` `, n, r), n.charCodeAt(r.position) !== 45) return `failure`; r.position++, t && y((e) => e === ` ` || e === ` `, n, r); let o = y((e) => { let t = e.charCodeAt(0); return t >= 48 && t <= 57; }, n, r), s = o.length ? Number(o) : null; return r.position < n.length || s === null && a === null || a > s ? `failure` : { rangeStartValue: a, rangeEndValue: s }; } function Ce(e, t, n) { let r = `bytes `; return r += v(`${e}`), r += `-`, r += v(`${t}`), r += `/`, r += v(`${n}`), r; } var we = class extends r { #e; constructor(e) { super(), this.#e = e; } _transform(e, t, n) { if (!this._inflateStream) { if (e.length === 0) { n(); return; } this._inflateStream = (e[0] & 15) == 8 ? i.createInflate(this.#e) : i.createInflateRaw(this.#e), this._inflateStream.on(`data`, this.push.bind(this)), this._inflateStream.on(`end`, () => this.push(null)), this._inflateStream.on(`error`, (e) => this.destroy(e)); } this._inflateStream.write(e, t, n); } _final(e) { this._inflateStream &&= (this._inflateStream.end(), null), e(); } }; function Te(e) { return new we(e); } function Ee(e) { let t = null, n = null, r = null, i = De(`content-type`, e); if (i === null) return `failure`; for (let e of i) { let i = u(e); i === `failure` || i.essence === `*/*` || (r = i, r.essence === n ? !r.parameters.has(`charset`) && t !== null && r.parameters.set(`charset`, t) : (t = null, r.parameters.has(`charset`) && (t = r.parameters.get(`charset`)), n = r.essence)); } return r ?? `failure`; } function U(e) { let t = e, n = { position: 0 }, r = [], i = ``; for (; n.position < t.length;) { if (i += y((e) => e !== `"` && e !== `,`, t, n), n.position < t.length) if (t.charCodeAt(n.position) === 34) { if (i += l(t, n), n.position < t.length) continue; } else h(t.charCodeAt(n.position) === 44), n.position++; i = b(i, !0, !0, (e) => e === 9 || e === 32), r.push(i), i = ``; } return r; } function De(e, t) { let n = t.get(e, !0); return n === null ? null : U(n); } function Oe(e) { return !1; } function ke(e) { return !!(e.username || e.password); } function Ae(e) { return e != null && e !== `client` && e !== `no-traversable`; } var je = class { get baseUrl() { return c(); } get origin() { return this.baseUrl?.origin; } policyContainer = re(); }; n.exports = { isAborted: fe, isCancelled: V, isValidEncodedURL: C, ReadableStreamFrom: f, tryUpgradeRequestToAPotentiallyTrustworthyURL: ue, clampAndCoarsenConnectionTimingInfo: te, coarsenedSharedCurrentTime: R, determineRequestsReferrer: ie, makePolicyContainer: re, clonePolicyContainer: z, appendFetchMetadata: I, appendRequestOriginHeader: ee, TAOCheck: F, corsCheck: P, crossOriginResourcePolicyCheck: N, createOpaqueTimingInfo: ne, setRequestReferrerPolicyOnRedirect: M, isValidHTTPToken: p, requestBadPort: E, requestCurrentURL: T, responseURL: x, responseLocationURL: S, isURLPotentiallyTrustworthy: B, isValidReasonPhrase: O, sameOrigin: de, normalizeMethod: pe, iteratorMixin: ge, createIterator: he, isValidHeaderName: k, isValidHeaderValue: A, isErrorLike: D, fullyReadBody: H, readableStreamClose: _e, urlIsLocal: ye, urlHasHttpsScheme: be, urlIsHttpHttpsScheme: xe, readAllBytes: ve, simpleRangeHeaderValue: Se, buildContentRange: Ce, createInflate: Te, extractMimeType: Ee, getDecodeSplit: De, environmentSettingsObject: new class { settingsObject = new je(); }(), isOriginIPPotentiallyTrustworthy: ce, hasAuthenticationEntry: Oe, includesCredentials: ke, isTraversableNavigable: Ae }; })); var Fa$3 = c$12(((e, n) => { let { iteratorMixin: r } = Pa$3(), { kEnumerableProperty: i } = q$6(), { webidl: a } = Na$3(), o = f$11(`node:util`); var s = class e { #e = []; constructor(e = void 0) { if (a.util.markAsUncloneable(this), e !== void 0) throw a.errors.conversionFailed({ prefix: `FormData constructor`, argument: `Argument 1`, types: [`undefined`] }); } append(t, n, r = void 0) { a.brandCheck(this, e); let i = `FormData.append`; a.argumentLengthCheck(arguments, 2, i), t = a.converters.USVString(t), arguments.length === 3 || a.is.Blob(n) ? (n = a.converters.Blob(n, i, `value`), r !== void 0 && (r = a.converters.USVString(r))) : n = a.converters.USVString(n); let o = u(t, n, r); this.#e.push(o); } delete(t) { a.brandCheck(this, e), a.argumentLengthCheck(arguments, 1, `FormData.delete`), t = a.converters.USVString(t), this.#e = this.#e.filter((e) => e.name !== t); } get(t) { a.brandCheck(this, e), a.argumentLengthCheck(arguments, 1, `FormData.get`), t = a.converters.USVString(t); let n = this.#e.findIndex((e) => e.name === t); return n === -1 ? null : this.#e[n].value; } getAll(t) { return a.brandCheck(this, e), a.argumentLengthCheck(arguments, 1, `FormData.getAll`), t = a.converters.USVString(t), this.#e.filter((e) => e.name === t).map((e) => e.value); } has(t) { return a.brandCheck(this, e), a.argumentLengthCheck(arguments, 1, `FormData.has`), t = a.converters.USVString(t), this.#e.findIndex((e) => e.name === t) !== -1; } set(t, n, r = void 0) { a.brandCheck(this, e); let i = `FormData.set`; a.argumentLengthCheck(arguments, 2, i), t = a.converters.USVString(t), arguments.length === 3 || a.is.Blob(n) ? (n = a.converters.Blob(n, i, `value`), r !== void 0 && (r = a.converters.USVString(r))) : n = a.converters.USVString(n); let o = u(t, n, r), s = this.#e.findIndex((e) => e.name === t); s === -1 ? this.#e.push(o) : this.#e = [ ...this.#e.slice(0, s), o, ...this.#e.slice(s + 1).filter((e) => e.name !== t) ]; } [o.inspect.custom](e, t) { let n = this.#e.reduce((e, t) => (e[t.name] ? Array.isArray(e[t.name]) ? e[t.name].push(t.value) : e[t.name] = [e[t.name], t.value] : e[t.name] = t.value, e), { __proto__: null }); t.depth ??= e, t.colors ??= !0; let r = o.formatWithOptions(t, n); return `FormData ${r.slice(r.indexOf(`]`) + 2)}`; } static getFormDataState(e) { return e.#e; } static setFormDataState(e, t) { e.#e = t; } }; let { getFormDataState: c, setFormDataState: l } = s; Reflect.deleteProperty(s, `getFormDataState`), Reflect.deleteProperty(s, `setFormDataState`), r(`FormData`, s, c, `name`, `value`), Object.defineProperties(s.prototype, { append: i, delete: i, get: i, getAll: i, has: i, set: i, [Symbol.toStringTag]: { value: `FormData`, configurable: !0 } }); function u(e, t, n) { if (typeof t != `string` && (a.is.File(t) || (t = new File([t], `blob`, { type: t.type })), n !== void 0)) { let e = { type: t.type, lastModified: t.lastModified }; t = new File([t], n, e); } return { name: e, value: t }; } a.is.FormData = a.util.MakeTypeAssertion(s), n.exports = { FormData: s, makeEntry: u, setFormDataState: l }; })); var Ia$3 = c$12(((e, n) => { let { bufferToLowerCasedHeaderName: r } = q$6(), { HTTP_TOKEN_CODEPOINTS: i } = ja$3(), { makeEntry: a } = Fa$3(), { webidl: o } = Na$3(), s = f$11(`node:assert`), { isomorphicDecode: c } = Aa$3(), l = Buffer.from(`--`), u = new TextDecoder(), d = new TextDecoder(`utf-8`, { ignoreBOM: !0 }); function f(e) { for (let t = 0; t < e.length; ++t) if (e.charCodeAt(t) & -128) return !1; return !0; } function p(e) { let t = e.length; if (t < 27 || t > 70) return !1; for (let n = 0; n < t; ++n) { let t = e.charCodeAt(n); if (!(t >= 48 && t <= 57 || t >= 65 && t <= 90 || t >= 97 && t <= 122 || t === 39 || t === 45 || t === 95)) return !1; } return !0; } function m(e, t) { s(t !== `failure` && t.essence === `multipart/form-data`); let n = t.parameters.get(`boundary`); if (n === void 0) throw b(`missing boundary in content-type header`); let r = Buffer.from(`--${n}`, `utf8`), i = [], c = { position: 0 }, u = e.indexOf(r); if (u === -1) throw b(`no boundary found in multipart body`); for (c.position = u;;) { if (e.subarray(c.position, c.position + r.length).equals(r)) c.position += r.length; else throw b(`expected a value starting with -- and the boundary`); if (y(e, l, c)) return i; if (e[c.position] !== 13 || e[c.position + 1] !== 10) throw b(`expected CRLF`); c.position += 2; let { name: t, filename: n, contentType: u, encoding: p } = g(e, c); c.position += 2; let m; { let t = e.indexOf(r.subarray(2), c.position); if (t === -1) throw b(`expected boundary after body`); m = e.subarray(c.position, t - 4), c.position += m.length, p === `base64` && (m = Buffer.from(m.toString(), `base64`)); } if (e[c.position] !== 13 || e[c.position + 1] !== 10) throw b(`expected CRLF`); c.position += 2; let h; n === null ? h = d.decode(Buffer.from(m)) : (u ??= `text/plain`, f(u) || (u = ``), h = new File([m], n, { type: u })), s(o.is.USVString(t)), s(typeof h == `string` && o.is.USVString(h) || o.is.File(h)), i.push(a(t, h, n)); } } function h(e, t) { e[t.position] === 59 && t.position++, _((e) => e === 32 || e === 9, e, t); let n = _((e) => C(e) && e !== 61 && e !== 42, e, t); if (n.length === 0) return null; let r = n.toString(`ascii`).toLowerCase(), i = e[t.position] === 42; if (i && t.position++, e[t.position] !== 61) return null; t.position++, _((e) => e === 32 || e === 9, e, t); let a; if (i) { let n = _((e) => e !== 32 && e !== 13 && e !== 10 && e !== 59, e, t); if (n[0] !== 117 && n[0] !== 85 || n[1] !== 116 && n[1] !== 84 || n[2] !== 102 && n[2] !== 70 || n[3] !== 45 || n[4] !== 56) throw b(`unknown encoding, expected utf-8''`); a = decodeURIComponent(u.decode(n.subarray(7))); } else if (e[t.position] === 34) { t.position++; let n = _((e) => e !== 10 && e !== 13 && e !== 34, e, t); if (e[t.position] !== 34) throw b(`Closing quote not found`); t.position++, a = u.decode(n).replace(/%0A/gi, ` `).replace(/%0D/gi, `\r`).replace(/%22/g, `"`); } else { let n = _((e) => C(e) && e !== 59, e, t); a = u.decode(n); } return { name: r, value: a, extended: i }; } function g(e, t) { let n = null, a = null, o = null, s = null; for (;;) { if (e[t.position] === 13 && e[t.position + 1] === 10) { if (n === null) throw b(`header name is null`); return { name: n, filename: a, contentType: o, encoding: s }; } let l = _((e) => e !== 10 && e !== 13 && e !== 58, e, t); if (l = v(l, !0, !0, (e) => e === 9 || e === 32), !i.test(l.toString())) throw b(`header name does not match the field-name token production`); if (e[t.position] !== 58) throw b(`expected :`); switch (t.position++, _((e) => e === 32 || e === 9, e, t), r(l)) { case `content-disposition`: { n = a = null; let r = !1; if (_((e) => C(e), e, t).toString(`ascii`).toLowerCase() !== `form-data`) throw b(`expected form-data for content-disposition header`); for (; t.position < e.length && (e[t.position] !== 13 || e[t.position + 1] !== 10);) { let i = h(e, t); if (!i) break; i.name === `name` ? n = i.value : i.name === `filename` && (i.extended ? (a = i.value, r = !0) : r || (a = i.value)); } if (n === null) throw b(`name attribute is required in content-disposition header`); break; } case `content-type`: { let n = _((e) => e !== 10 && e !== 13, e, t); n = v(n, !1, !0, (e) => e === 9 || e === 32), o = c(n); break; } case `content-transfer-encoding`: { let n = _((e) => e !== 10 && e !== 13, e, t); n = v(n, !1, !0, (e) => e === 9 || e === 32), s = c(n); break; } default: _((e) => e !== 10 && e !== 13, e, t); } if (e[t.position] !== 13 || e[t.position + 1] !== 10) throw b(`expected CRLF`); t.position += 2; } } function _(e, t, n) { let r = n.position; for (; r < t.length && e(t[r]);) ++r; return t.subarray(n.position, n.position = r); } function v(e, t, n, r) { let i = 0, a = e.length - 1; if (t) for (; i < e.length && r(e[i]);) i++; if (n) for (; a > 0 && r(e[a]);) a--; return i === 0 && a === e.length - 1 ? e : e.subarray(i, a + 1); } function y(e, t, n) { if (e.length < t.length) return !1; for (let r = 0; r < t.length; r++) if (t[r] !== e[n.position + r]) return !1; return !0; } function b(e) { return TypeError(`Failed to parse body as FormData.`, { cause: TypeError(e) }); } function x(e) { return e <= 31 || e === 127; } function S(e) { return e === 40 || e === 41 || e === 60 || e === 62 || e === 64 || e === 44 || e === 59 || e === 58 || e === 92 || e === 34 || e === 47 || e === 91 || e === 93 || e === 63 || e === 61; } function C(e) { return e <= 127 && e !== 32 && e !== 9 && !x(e) && !S(e); } n.exports = { multipartFormDataParser: m, validateBoundary: p }; })); var La$3 = c$12(((e, t) => { function n() { let e, t; return { promise: new Promise((n, r) => { e = n, t = r; }), resolve: e, reject: t }; } t.exports = { createDeferredPromise: n }; })); var Ra$3 = c$12(((e, n) => { let r = q$6(), { ReadableStreamFrom: i, readableStreamClose: a, fullyReadBody: o, extractMimeType: s } = Pa$3(), { FormData: c, setFormDataState: l } = Fa$3(), { webidl: u } = Na$3(), d = f$11(`node:assert`), { isErrored: f, isDisturbed: p } = f$11(`node:stream`), { isUint8Array: m } = f$11(`node:util/types`), { serializeAMimeType: h } = ja$3(), { multipartFormDataParser: g } = Ia$3(), { createDeferredPromise: _ } = La$3(), { parseJSONFromBytes: v } = Aa$3(), { utf8DecodeBytes: y } = ka$3(), { runtimeFeatures: b } = Ma$3(), x = b.has(`crypto`) ? f$11(`node:crypto`).randomInt : (e) => Math.floor(Math.random() * e), S = new TextEncoder(); function C() {} let w = new FinalizationRegistry((e) => { let t = e.deref(); t && !t.locked && !p(t) && !f(t) && t.cancel(`Response object has been garbage collected`).catch(C); }); function T(e, t = !1) { let n = null, o = null; n = u.is.ReadableStream(e) ? e : u.is.Blob(e) ? e.stream() : new ReadableStream({ pull() {}, start(e) { o = e; }, cancel() {}, type: `bytes` }), d(u.is.ReadableStream(n)); let s = null, c = null, l = null, p = null; if (typeof e == `string`) c = e, p = `text/plain;charset=UTF-8`; else if (u.is.URLSearchParams(e)) c = e.toString(), p = `application/x-www-form-urlencoded;charset=UTF-8`; else if (u.is.BufferSource(e)) c = u.util.getCopyOfBytesHeldByBufferSource(e); else if (u.is.FormData(e)) { let t = `----formdata-undici-0${`${x(1e11)}`.padStart(11, `0`)}`, n = `--${t}\r\nContent-Disposition: form-data`, r = (e) => e.replace(/\n/g, `%0A`).replace(/\r/g, `%0D`).replace(/"/g, `%22`), i = (e) => e.replace(/\r?\n|\r/g, `\r `), a = [], o = new Uint8Array([13, 10]); l = 0; let u = !1; for (let [t, s] of e) if (typeof s == `string`) { let e = S.encode(n + `; name="${r(i(t))}"\r\n\r\n${i(s)}\r\n`); a.push(e), l += e.byteLength; } else { let e = S.encode(`${n}; name="${r(i(t))}"` + (s.name ? `; filename="${r(s.name)}"` : ``) + `\r Content-Type: ${s.type || `application/octet-stream`}\r\n\r\n`); a.push(e, s, o), typeof s.size == `number` ? l += e.byteLength + s.size + o.byteLength : u = !0; } let d = S.encode(`--${t}--\r\n`); a.push(d), l += d.byteLength, u && (l = null), c = e, s = async function* () { for (let e of a) e.stream ? yield* e.stream() : yield e; }, p = `multipart/form-data; boundary=${t}`; } else if (u.is.Blob(e)) c = e, l = e.size, e.type && (p = e.type); else if (typeof e[Symbol.asyncIterator] == `function`) { if (t) throw TypeError(`keepalive`); if (r.isDisturbed(e) || e.locked) throw TypeError(`Response body object should not be disturbed or locked`); n = u.is.ReadableStream(e) ? e : i(e); } return (typeof c == `string` || m(c)) && (s = () => (l = typeof c == `string` ? Buffer.byteLength(c) : c.length, c)), s != null && (async () => { let e = s(), t = e?.[Symbol.asyncIterator]?.(); if (t) for await (let e of t) { if (f(n)) break; e.length && o.enqueue(new Uint8Array(e)); } else e?.length && !f(n) && o.enqueue(typeof e == `string` ? S.encode(e) : new Uint8Array(e)); queueMicrotask(() => a(o)); })(), [{ stream: n, source: c, length: l }, p]; } function E(e, t = !1) { return u.is.ReadableStream(e) && (d(!r.isDisturbed(e), `The body has already been consumed.`), d(!e.locked, `The stream is locked.`)), T(e, t); } function D(e) { let { 0: t, 1: n } = e.stream.tee(); return e.stream = t, { stream: n, length: e.length, source: e.source }; } function O(e, t) { return { blob() { return A(this, (e) => { let n = M(t(this)); return n === null ? n = `` : n &&= h(n), new Blob([e], { type: n }); }, e, t); }, arrayBuffer() { return A(this, (e) => new Uint8Array(e).buffer, e, t); }, text() { return A(this, y, e, t); }, json() { return A(this, v, e, t); }, formData() { return A(this, (e) => { let n = M(t(this)); if (n !== null) switch (n.essence) { case `multipart/form-data`: { let t = g(e, n), r = new c(); return l(r, t), r; } case `application/x-www-form-urlencoded`: { let t = new URLSearchParams(e.toString()), n = new c(); for (let [e, r] of t) n.append(e, r); return n; } } throw TypeError(`Content-Type was not one of "multipart/form-data" or "application/x-www-form-urlencoded".`); }, e, t); }, bytes() { return A(this, (e) => new Uint8Array(e), e, t); } }; } function k(e, t) { Object.assign(e.prototype, O(e, t)); } function A(e, t, n, r) { try { u.brandCheck(e, n); } catch (e) { return Promise.reject(e); } if (e = r(e), j(e)) return Promise.reject(TypeError(`Body is unusable: Body has already been read`)); let i = _(), a = i.reject, s = (e) => { try { i.resolve(t(e)); } catch (e) { a(e); } }; return e.body == null ? (s(Buffer.allocUnsafe(0)), i.promise) : (o(e.body, s, a), i.promise); } function j(e) { let t = e.body; return t != null && (t.stream.locked || r.isDisturbed(t.stream)); } function M(e) { let t = e.headersList, n = s(t); return n === `failure` ? null : n; } n.exports = { extractBody: T, safelyExtractBody: E, cloneBody: D, mixinBody: k, streamRegistry: w, bodyUnusable: j }; })); var za$3 = c$12(((e, n) => { let r = f$11(`node:assert`), i = q$6(), { channels: a } = ga$3(), o = fa$3(), { RequestContentLengthMismatchError: s, ResponseContentLengthMismatchError: c, RequestAbortedError: l, HeadersTimeoutError: u, HeadersOverflowError: d, SocketError: f, InformationalError: p, BodyTimeoutError: m, HTTPParserError: h, ResponseExceededMaxSizeError: g } = K$6(), { kUrl: _, kReset: v, kClient: y, kParser: b, kBlocking: x, kRunning: S, kPending: C, kSize: w, kWriting: T, kQueue: E, kNoRef: D, kKeepAliveDefaultTimeout: O, kHostHeader: k, kPendingIdx: A, kRunningIdx: j, kError: M, kPipelining: N, kSocket: P, kKeepAliveTimeoutValue: F, kMaxHeadersSize: I, kKeepAliveMaxTimeout: ee, kKeepAliveTimeoutThreshold: L, kHeadersTimeout: te, kBodyTimeout: R, kStrictContentLength: ne, kMaxRequests: re, kCounter: z, kMaxResponseSize: ie, kOnError: ae, kResume: oe, kHTTPContext: se, kClosed: ce } = da$3(), le = wa$3(), B = Buffer.alloc(0), ue = Buffer[Symbol.species], de = i.removeAllListeners, fe = Symbol(`kIdleSocketValidation`), V = Symbol(`kIdleSocketValidationTimeout`), pe = Symbol(`kSocketUsed`), me; function he() { let e = process.env.JEST_WORKER_ID ? Ta$3() : void 0, t, n = process.arch !== `ppc64`; if (process.env.UNDICI_NO_WASM_SIMD === `1` ? n = !1 : process.env.UNDICI_NO_WASM_SIMD === `0` && (n = !0), n) try { t = new WebAssembly.Module(Ea$3()); } catch {} return t ||= new WebAssembly.Module(e || Ta$3()), new WebAssembly.Instance(t, { env: { wasm_on_url: (e, t, n) => 0, wasm_on_status: (e, t, n) => { r(H.ptr === e); let i = t - ye + _e.byteOffset; return H.onStatus(new ue(_e.buffer, i, n)); }, wasm_on_message_begin: (e) => (r(H.ptr === e), H.onMessageBegin()), wasm_on_header_field: (e, t, n) => { r(H.ptr === e); let i = t - ye + _e.byteOffset; return H.onHeaderField(new ue(_e.buffer, i, n)); }, wasm_on_header_value: (e, t, n) => { r(H.ptr === e); let i = t - ye + _e.byteOffset; return H.onHeaderValue(new ue(_e.buffer, i, n)); }, wasm_on_headers_complete: (e, t, n, i) => (r(H.ptr === e), H.onHeadersComplete(t, n === 1, i === 1)), wasm_on_body: (e, t, n) => { r(H.ptr === e); let i = t - ye + _e.byteOffset; return H.onBody(new ue(_e.buffer, i, n)); }, wasm_on_message_complete: (e) => (r(H.ptr === e), H.onMessageComplete()) } }); } let ge = null, H = null, _e = null, ve = 0, ye = null; var be = class { constructor(e, t, { exports: n }) { this.llhttp = n, this.ptr = this.llhttp.llhttp_alloc(le.TYPE.RESPONSE), this.client = e, this.socket = t, this.timeout = null, this.timeoutWeakRef = new WeakRef(this), this.timeoutValue = null, this.timeoutType = null, this.statusCode = 0, this.statusText = ``, this.upgrade = !1, this.headers = [], this.headersSize = 0, this.headersMaxSize = e[I], this.shouldKeepAlive = !1, this.paused = !1, this.resume = this.resume.bind(this), this.bytesRead = 0, this.keepAlive = ``, this.contentLength = ``, this.connection = ``, this.maxResponseSize = e[ie]; } setTimeout(e, t) { e !== this.timeoutValue || t & 1 ^ this.timeoutType & 1 ? (this.timeout &&= (o.clearTimeout(this.timeout), null), e && (t & 1 ? this.timeout = o.setFastTimeout(xe, e, this.timeoutWeakRef) : (this.timeout = setTimeout(xe, e, this.timeoutWeakRef), this.timeout?.unref())), this.timeoutValue = e) : this.timeout && this.timeout.refresh && this.timeout.refresh(), this.timeoutType = t; } resume() { this.socket.destroyed || !this.paused || (r(this.ptr != null), r(H === null), this.llhttp.llhttp_resume(this.ptr), r(this.timeoutType === 5), this.timeout && this.timeout.refresh && this.timeout.refresh(), this.paused = !1, this.execute(this.socket.read() || B), this.readMore()); } readMore() { for (; !this.paused && this.ptr;) { let e = this.socket.read(); if (e === null) break; this.execute(e); } } execute(e) { r(H === null), r(this.ptr != null), r(!this.paused); let { socket: t, llhttp: n } = this; e.length > ve && (ye && n.free(ye), ve = Math.ceil(e.length / 4096) * 4096, ye = n.malloc(ve)), new Uint8Array(n.memory.buffer, ye, ve).set(e); try { let r; try { _e = e, H = this, r = n.llhttp_execute(this.ptr, ye, e.length); } finally { H = null, _e = null; } if (r !== le.ERROR.OK) { let i = e.subarray(n.llhttp_get_error_pos(this.ptr) - ye); if (r === le.ERROR.PAUSED_UPGRADE) this.onUpgrade(i); else if (r === le.ERROR.PAUSED) this.paused = !0, t.unshift(i); else throw this.createError(r, i); } } catch (e) { i.destroy(t, e); } } finish() { r(H === null), r(this.ptr != null), r(!this.paused); let { llhttp: e } = this, t; try { H = this, t = e.llhttp_finish(this.ptr); } finally { H = null; } return t === le.ERROR.OK ? null : t === le.ERROR.PAUSED || t === le.ERROR.PAUSED_UPGRADE ? (this.paused = !0, null) : this.createError(t, B); } createError(e, t) { let { llhttp: n, contentLength: r, bytesRead: i } = this; if (r && i !== parseInt(r, 10)) return new c(); let a = n.llhttp_get_error_reason(this.ptr), o = ``; if (a) { let e = new Uint8Array(n.memory.buffer, a).indexOf(0); o = `Response does not match the HTTP/1.1 protocol (` + Buffer.from(n.memory.buffer, a, e).toString() + `)`; } return new h(o, le.ERROR[e], t); } destroy() { r(H === null), r(this.ptr != null), this.llhttp.llhttp_free(this.ptr), this.ptr = null, this.timeout && o.clearTimeout(this.timeout), this.timeout = null, this.timeoutValue = null, this.timeoutType = null, this.paused = !1; } onStatus(e) { return this.statusText = e.toString(), 0; } onMessageBegin() { let { socket: e, client: t } = this; if (e.destroyed) return -1; if (t[S] === 0) return i.destroy(e, new f(`bad response`, i.getSocketInfo(e))), -1; let n = t[E][t[j]]; return n ? (n.onResponseStarted(), 0) : -1; } onHeaderField(e) { let t = this.headers.length; return t & 1 ? this.headers[t - 1] = Buffer.concat([this.headers[t - 1], e]) : this.headers.push(e), this.trackHeader(e.length), 0; } onHeaderValue(e) { let t = this.headers.length; (t & 1) == 1 ? (this.headers.push(e), t += 1) : this.headers[t - 1] = Buffer.concat([this.headers[t - 1], e]); let n = this.headers[t - 2]; if (n.length === 10) { let t = i.bufferToLowerCasedHeaderName(n); t === `keep-alive` ? this.keepAlive += e.toString() : t === `connection` && (this.connection += e.toString()); } else n.length === 14 && i.bufferToLowerCasedHeaderName(n) === `content-length` && (this.contentLength += e.toString()); return this.trackHeader(e.length), 0; } trackHeader(e) { this.headersSize += e, this.headersSize >= this.headersMaxSize && i.destroy(this.socket, new d()); } onUpgrade(e) { let { upgrade: t, client: n, socket: a, headers: o, statusCode: s } = this; r(t), r(n[P] === a), r(!a.destroyed), r(!this.paused), r((o.length & 1) == 0); let c = n[E][n[j]]; r(c), r(c.upgrade || c.method === `CONNECT`), this.statusCode = 0, this.statusText = ``, this.shouldKeepAlive = !1, this.headers = [], this.headersSize = 0, a.unshift(e), a[b].destroy(), a[b] = null, a[y] = null, a[M] = null, de(a), n[P] = null, n[se] = null, n[E][n[j]++] = null, n.emit(`disconnect`, n[_], [n], new p(`upgrade`)); try { c.onUpgrade(s, o, a); } catch (e) { i.destroy(a, e); } n[oe](); } onHeadersComplete(e, t, n) { let { client: a, socket: o, headers: s, statusText: c } = this; if (o.destroyed) return -1; if (a[S] === 0) return i.destroy(o, new f(`bad response`, i.getSocketInfo(o))), -1; let l = a[E][a[j]]; if (!l) return -1; if (r(!this.upgrade), r(this.statusCode < 200), e === 100) return i.destroy(o, new f(`bad response`, i.getSocketInfo(o))), -1; if (t && !l.upgrade) return i.destroy(o, new f(`bad upgrade`, i.getSocketInfo(o))), -1; if (r(this.timeoutType === 3), this.statusCode = e, this.shouldKeepAlive = n || l.method === `HEAD` && !o[v] && this.connection.toLowerCase() === `keep-alive`, this.statusCode >= 200) { let e = l.bodyTimeout == null ? a[R] : l.bodyTimeout; this.setTimeout(e, 5); } else this.timeout && this.timeout.refresh && this.timeout.refresh(); if (l.method === `CONNECT` || t) return r(a[S] === 1), this.upgrade = !0, 2; if (r((this.headers.length & 1) == 0), this.headers = [], this.headersSize = 0, this.shouldKeepAlive && a[N]) { let e = this.keepAlive ? i.parseKeepAliveTimeout(this.keepAlive) : null; if (e != null) { let t = Math.min(e - a[L], a[ee]); t <= 0 ? o[v] = !0 : a[F] = t; } else a[F] = a[O]; } else o[v] = !0; let u = l.onHeaders(e, s, this.resume, c) === !1; return l.aborted ? -1 : l.method === `HEAD` || e < 200 ? 1 : (o[x] && (o[x] = !1, a[oe]()), u ? le.ERROR.PAUSED : 0); } onBody(e) { let { client: t, socket: n, statusCode: a, maxResponseSize: o } = this; if (n.destroyed) return -1; let s = t[E][t[j]]; return r(s), r(this.timeoutType === 5), this.timeout && this.timeout.refresh && this.timeout.refresh(), r(a >= 200), o > -1 && this.bytesRead + e.length > o ? (i.destroy(n, new g()), -1) : (this.bytesRead += e.length, s.onData(e) === !1 ? le.ERROR.PAUSED : 0); } onMessageComplete() { let { client: e, socket: t, statusCode: n, upgrade: a, headers: o, contentLength: s, bytesRead: l, shouldKeepAlive: u } = this; if (t.destroyed && (!n || u)) return -1; if (a) return 0; r(n >= 100), r((this.headers.length & 1) == 0); let d = e[E][e[j]]; return r(d), this.statusCode = 0, this.statusText = ``, this.bytesRead = 0, this.contentLength = ``, this.keepAlive = ``, this.connection = ``, this.headers = [], this.headersSize = 0, n < 200 ? 0 : d.method !== `HEAD` && s && l !== parseInt(s, 10) ? (i.destroy(t, new c()), -1) : (d.onComplete(o), e[E][e[j]++] = null, t[pe] = e[C] === 0, t[T] ? (r(e[S] === 0), i.destroy(t, new p(`reset`)), le.ERROR.PAUSED) : u ? t[v] && e[S] === 0 ? (i.destroy(t, new p(`reset`)), le.ERROR.PAUSED) : (e[N] == null || e[N] === 1 ? setImmediate(e[oe]) : e[oe](), 0) : (i.destroy(t, new p(`reset`)), le.ERROR.PAUSED)); } }; function xe(e) { let t = e.deref(); if (!t) return; let { socket: n, timeoutType: a, client: o, paused: s } = t; a === 3 ? (!n[T] || n.writableNeedDrain || o[S] > 1) && (r(!s, `cannot be paused while waiting for headers`), i.destroy(n, new u())) : a === 5 ? s || i.destroy(n, new m()) : a === 8 && (r(o[S] === 0 && o[F]), i.destroy(n, new p(`socket idle timeout`))); } function Se(e, t) { if (e[P] = t, ge ||= he(), t.errored) throw t.errored; if (t.destroyed) throw new f(`destroyed`); return t[D] = !1, t[T] = !1, t[v] = !1, t[x] = !1, t[fe] = 0, t[V] = null, t[pe] = !1, t[b] = new be(e, t, ge), i.addListener(t, `error`, Ce), i.addListener(t, `readable`, we), i.addListener(t, `end`, Te), i.addListener(t, `close`, Ee), t[ce] = !1, t.on(`close`, U), { version: `h1`, defaultPipelining: 1, write(t) { return je(e, t); }, resume() { ke(e); }, destroy(e, n) { t[ce] ? queueMicrotask(n) : (t.on(`close`, n), t.destroy(e)); }, get destroyed() { return t.destroyed; }, busy(n) { return !!(t[T] || t[v] || t[x] || t[fe] === 1 || n && (e[S] > 0 && !n.idempotent || e[S] > 0 && (n.upgrade || n.method === `CONNECT`) || e[S] > 0 && i.bodyLength(n.body) !== 0 && (i.isStream(n.body) || i.isAsyncIterable(n.body) || i.isFormDataLike(n.body)))); } }; } function Ce(e) { r(e.code !== `ERR_TLS_CERT_ALTNAME_INVALID`); let t = this[b]; if (e.code === `ECONNRESET` && t.statusCode && !t.shouldKeepAlive) { let e = t.finish(); e && (this[M] = e, this[y][ae](e)); return; } this[M] = e, this[y][ae](e); } function we() { this[b]?.readMore(); } function Te() { let e = this[b]; if (e.statusCode && !e.shouldKeepAlive) { let t = e.finish(); t && i.destroy(this, t); return; } i.destroy(this, new f(`other side closed`, i.getSocketInfo(this))); } function Ee() { let e = this[b]; De(this), e && (!this[M] && e.statusCode && !e.shouldKeepAlive && (this[M] = e.finish() || this[M]), this[b].destroy(), this[b] = null); let t = this[M] || new f(`closed`, i.getSocketInfo(this)), n = this[y]; if (n[P] = null, n[se] = null, n.destroyed) { r(n[C] === 0); let e = n[E].splice(n[j]); for (let r = 0; r < e.length; r++) { let a = e[r]; i.errorRequest(n, a, t); } } else if (n[S] > 0 && t.code !== `UND_ERR_INFO`) { let e = n[E][n[j]]; n[E][n[j]++] = null, i.errorRequest(n, e, t); } n[A] = n[j], r(n[S] === 0), n.emit(`disconnect`, n[_], [n], t), n[oe](); } function U() { this[ce] = !0; } function De(e) { e[V] && (clearTimeout(e[V]), e[V] = null), e[fe] = 0; } function Oe(e, t) { t[fe] = 1, t[V] = setTimeout(() => { t[V] = null, t[fe] = 2, e[P] === t && !t.destroyed && e[oe](); }, 0), t[V].unref?.(); } function ke(e) { let t = e[P]; if (t && !t.destroyed) { if (e[w] === 0 ? !t[D] && t.unref && (t.unref(), t[D] = !0) : t[D] && t.ref && (t.ref(), t[D] = !1), e[S] === 0 && e[C] > 0 && t[pe]) { if (t[fe] === 0) return Oe(e, t), t[b].readMore(), t.destroyed, void 0; if (t[fe] === 1) return t[b].readMore(), t.destroyed, void 0; } if (e[S] === 0 && (t[b].readMore(), t.destroyed)) return; if (e[w] === 0) t[b].timeoutType !== 8 && t[b].setTimeout(e[F], 8); else if (e[S] > 0 && t[b].statusCode < 200 && t[b].timeoutType !== 3) { let n = e[E][e[j]], r = n.headersTimeout == null ? e[te] : n.headersTimeout; t[b].setTimeout(r, 3); } } } function Ae(e) { return e !== `GET` && e !== `HEAD` && e !== `OPTIONS` && e !== `TRACE` && e !== `CONNECT`; } function je(e, t) { let { method: n, path: o, host: c, upgrade: u, blocking: d, reset: f } = t, { body: m, headers: h, contentLength: g } = t, _ = n === `PUT` || n === `POST` || n === `PATCH` || n === `QUERY` || n === `PROPFIND` || n === `PROPPATCH`; if (i.isFormDataLike(m)) { me ||= Ra$3().extractBody; let [e, n] = me(m); t.contentType ?? h.push(`content-type`, n), m = e.stream, g = e.length; } else i.isBlobLike(m) && t.contentType == null && m.type && h.push(`content-type`, m.type); m && typeof m.read == `function` && m.read(0); let y = i.bodyLength(m); if (g = y ?? g, g === null && (g = t.contentLength), g === 0 && !_ && (g = null), Ae(n) && g > 0 && t.contentLength !== null && t.contentLength !== g) { if (e[ne]) return i.errorRequest(e, t, new s()), !1; process.emitWarning(new s()); } let b = e[P]; De(b); let S = (n) => { t.aborted || t.completed || (i.errorRequest(e, t, n || new l()), i.destroy(m), i.destroy(b, new p(`aborted`))); }; try { t.onConnect(S); } catch (n) { i.errorRequest(e, t, n); } if (t.aborted) return !1; n === `HEAD` && (b[v] = !0), (u || n === `CONNECT`) && (b[v] = !0), f != null && (b[v] = f), e[re] && b[z]++ >= e[re] && (b[v] = !0), d && (b[x] = !0), b.setTypeOfService && b.setTypeOfService(t.typeOfService); let C = `${n} ${o} HTTP/1.1\r\n`; if (typeof c == `string` ? C += `host: ${c}\r\n` : C += e[k], u ? C += `connection: upgrade\r\nupgrade: ${u}\r\n` : e[N] && !b[v] ? C += `connection: keep-alive\r ` : C += `connection: close\r `, Array.isArray(h)) for (let e = 0; e < h.length; e += 2) { let t = h[e + 0], n = h[e + 1]; if (Array.isArray(n)) for (let e = 0; e < n.length; e++) C += `${t}: ${n[e]}\r\n`; else C += `${t}: ${n}\r\n`; } return a.sendHeaders.hasSubscribers && a.sendHeaders.publish({ request: t, headers: C, socket: b }), !m || y === 0 ? Ne(S, null, e, t, b, g, C, _) : i.isBuffer(m) ? Ne(S, m, e, t, b, g, C, _) : i.isBlobLike(m) ? typeof m.stream == `function` ? Fe(S, m.stream(), e, t, b, g, C, _) : Pe(S, m, e, t, b, g, C, _) : i.isStream(m) ? Me(S, m, e, t, b, g, C, _) : i.isIterable(m) ? Fe(S, m, e, t, b, g, C, _) : r(!1), !0; } function Me(e, t, n, a, o, s, c, u) { r(s !== 0 || n[S] === 0, `stream body cannot be pipelined`); let d = !1, f = new Ie({ abort: e, socket: o, request: a, contentLength: s, client: n, expectsPayload: u, header: c }), p = function(e) { if (!d) try { !f.write(e) && this.pause && this.pause(); } catch (e) { i.destroy(this, e); } }, m = function() { d || t.resume && t.resume(); }, h = function() { if (queueMicrotask(() => { t.removeListener(`error`, g); }), !d) { let e = new l(); queueMicrotask(() => g(e)); } }, g = function(e) { if (!d) { if (d = !0, r(o.destroyed || o[T] && n[S] <= 1), o.off(`drain`, m).off(`error`, g), t.removeListener(`data`, p).removeListener(`end`, g).removeListener(`close`, h), !e) try { f.end(); } catch (t) { e = t; } f.destroy(e), e && (e.code !== `UND_ERR_INFO` || e.message !== `reset`) ? i.destroy(t, e) : i.destroy(t); } }; t.on(`data`, p).on(`end`, g).on(`error`, g).on(`close`, h), t.resume && t.resume(), o.on(`drain`, m).on(`error`, g), t.errorEmitted ?? t.errored ? setImmediate(g, t.errored) : (t.endEmitted ?? t.readableEnded) && setImmediate(g, null), (t.closeEmitted ?? t.closed) && setImmediate(h); } function Ne(e, t, n, a, o, s, c, l) { try { t ? i.isBuffer(t) && (r(s === t.byteLength, `buffer body must have content length`), o.cork(), o.write(`${c}content-length: ${s}\r\n\r\n`, `latin1`), o.write(t), o.uncork(), a.onBodySent(t), !l && a.reset !== !1 && (o[v] = !0)) : s === 0 ? o.write(`${c}content-length: 0\r\n\r\n`, `latin1`) : (r(s === null, `no body must not have content length`), o.write(`${c}\r\n`, `latin1`)), a.onRequestSent(), n[oe](); } catch (t) { e(t); } } async function Pe(e, t, n, i, a, o, c, l) { r(o === t.size, `blob body must have content length`); try { if (o != null && o !== t.size) throw new s(); let e = Buffer.from(await t.arrayBuffer()); a.cork(), a.write(`${c}content-length: ${o}\r\n\r\n`, `latin1`), a.write(e), a.uncork(), i.onBodySent(e), i.onRequestSent(), !l && i.reset !== !1 && (a[v] = !0), n[oe](); } catch (t) { e(t); } } async function Fe(e, t, n, i, a, o, s, c) { r(o !== 0 || n[S] === 0, `iterator body cannot be pipelined`); let l = null; function u() { if (l) { let e = l; l = null, e(); } } let d = () => new Promise((e, t) => { r(l === null), a[M] ? t(a[M]) : l = e; }); a.on(`close`, u).on(`drain`, u); let f = new Ie({ abort: e, socket: a, request: i, contentLength: o, client: n, expectsPayload: c, header: s }); try { for await (let e of t) { if (a[M]) throw a[M]; f.write(e) || await d(); } f.end(); } catch (e) { f.destroy(e); } finally { a.off(`close`, u).off(`drain`, u); } } var Ie = class { constructor({ abort: e, socket: t, request: n, contentLength: r, client: i, expectsPayload: a, header: o }) { this.socket = t, this.request = n, this.contentLength = r, this.client = i, this.bytesWritten = 0, this.expectsPayload = a, this.header = o, this.abort = e, t[T] = !0; } write(e) { let { socket: t, request: n, contentLength: r, client: i, bytesWritten: a, expectsPayload: o, header: c } = this; if (t[M]) throw t[M]; if (t.destroyed) return !1; let l = Buffer.byteLength(e); if (!l) return !0; if (r !== null && a + l > r) { if (i[ne]) throw new s(); process.emitWarning(new s()); } t.cork(), a === 0 && (!o && n.reset !== !1 && (t[v] = !0), r === null ? t.write(`${c}transfer-encoding: chunked\r\n`, `latin1`) : t.write(`${c}content-length: ${r}\r\n\r\n`, `latin1`)), r === null && t.write(`\r\n${l.toString(16)}\r\n`, `latin1`), this.bytesWritten += l; let u = t.write(e); return t.uncork(), n.onBodySent(e), u || t[b].timeout && t[b].timeoutType === 3 && t[b].timeout.refresh && t[b].timeout.refresh(), u; } end() { let { socket: e, contentLength: t, client: n, bytesWritten: r, expectsPayload: i, header: a, request: o } = this; if (o.onRequestSent(), e[T] = !1, e[M]) throw e[M]; if (!e.destroyed) { if (r === 0 ? i ? e.write(`${a}content-length: 0\r\n\r\n`, `latin1`) : e.write(`${a}\r\n`, `latin1`) : t === null && e.write(`\r 0\r \r `, `latin1`), t !== null && r !== t) { if (n[ne]) throw new s(); process.emitWarning(new s()); } e[b].timeout && e[b].timeoutType === 3 && e[b].timeout.refresh && e[b].timeout.refresh(), n[oe](); } } destroy(e) { let { socket: t, client: n, abort: i } = this; t[T] = !1, e && (r(n[S] <= 1, `pipeline should only contain this request`), i(e)); } }; n.exports = Se; })); var Ba$3 = c$12(((e, n) => { let r = f$11(`node:assert`), { pipeline: i } = f$11(`node:stream`), a = q$6(), { RequestContentLengthMismatchError: o, RequestAbortedError: s, SocketError: c, InformationalError: l, InvalidArgumentError: u } = K$6(), { kUrl: d, kReset: f, kClient: p, kRunning: m, kPending: h, kQueue: g, kPendingIdx: _, kRunningIdx: v, kError: y, kSocket: b, kStrictContentLength: x, kOnError: S, kMaxConcurrentStreams: C, kPingInterval: w, kHTTP2Session: T, kHTTP2InitialWindowSize: E, kHTTP2ConnectionWindowSize: D, kResume: O, kSize: k, kHTTPContext: A, kClosed: j, kBodyTimeout: M, kEnableConnectProtocol: N, kRemoteSettings: P, kHTTP2Stream: F, kHTTP2SessionState: I } = da$3(), { channels: ee } = ga$3(), L = Symbol(`open streams`), te, R; try { R = f$11(`node:http2`); } catch { R = { constants: {} }; } let { constants: { HTTP2_HEADER_AUTHORITY: ne, HTTP2_HEADER_METHOD: re, HTTP2_HEADER_PATH: z, HTTP2_HEADER_SCHEME: ie, HTTP2_HEADER_CONTENT_LENGTH: ae, HTTP2_HEADER_EXPECT: oe, HTTP2_HEADER_STATUS: se, HTTP2_HEADER_PROTOCOL: ce, NGHTTP2_REFUSED_STREAM: le, NGHTTP2_CANCEL: B } } = R; function ue(e) { let t = []; for (let [n, r] of Object.entries(e)) if (Array.isArray(r)) for (let e of r) t.push(Buffer.from(n), Buffer.from(e)); else t.push(Buffer.from(n), Buffer.from(r)); return t; } function de(e, t) { e[b] = t; let n = e[E], r = e[D], i = R.connect(e[d], { createConnection: () => t, peerMaxConcurrentStreams: e[C], settings: { enablePush: !1, ...n == null ? null : { initialWindowSize: n } } }); return e[b] = t, i[L] = 0, i[p] = e, i[b] = t, i[I] = { ping: { interval: e[w] === 0 ? null : setInterval(me, e[w], i).unref() } }, i[N] = !1, i[P] = !1, r && a.addListener(i, `connect`, V.bind(i, r)), a.addListener(i, `error`, he), a.addListener(i, `frameError`, ge), a.addListener(i, `end`, H), a.addListener(i, `goaway`, _e), a.addListener(i, `close`, ve), a.addListener(i, `remoteSettings`, pe), i.unref(), e[T] = i, t[T] = i, a.addListener(t, `error`, be), a.addListener(t, `end`, xe), a.addListener(t, `close`, ye), t[j] = !1, t.on(`close`, Se), { version: `h2`, defaultPipelining: Infinity, write(t) { return we(e, t); }, resume() { fe(e); }, destroy(e, n) { t[j] ? queueMicrotask(n) : t.destroy(e).on(`close`, n); }, get destroyed() { return t.destroyed; }, busy(t) { if (t != null) if (e[m] > 0) { if (t.idempotent === !1 || (t.upgrade === `websocket` || t.method === `CONNECT`) && i[P] === !1 || a.bodyLength(t.body) !== 0 && (a.isStream(t.body) || a.isAsyncIterable(t.body) || a.isFormDataLike(t.body))) return !0; } else return (t.upgrade === `websocket` || t.method === `CONNECT`) && i[P] === !1; return !1; } }; } function fe(e) { let t = e[b]; t?.destroyed === !1 && (e[k] === 0 || e[C] === 0 ? (t.unref(), e[T].unref()) : (t.ref(), e[T].ref())); } function V(e) { try { typeof this.setLocalWindowSize == `function` && this.setLocalWindowSize(e); } catch {} } function pe(e) { if (this[p][C] = e.maxConcurrentStreams ?? this[p][C], this[P] === !0 && this[N] === !0 && e.enableConnectProtocol === !1) { let e = new l(`HTTP/2: Server disabled extended CONNECT protocol against RFC-8441`); this[b][y] = e, this[p][S](e); return; } this[N] = e.enableConnectProtocol ?? this[N], this[P] = !0, this[p][O](); } function me(e) { let t = e[I]; if ((e.closed || e.destroyed) && t.ping.interval != null) { clearInterval(t.ping.interval), t.ping.interval = null; return; } e.ping(n.bind(e)); function n(e, t) { let n = this[p], r = this[p]; if (e != null) { let t = new l(`HTTP/2: "PING" errored - type ${e.message}`); r[y] = t, n[S](t); } else n.emit(`ping`, t); } } function he(e) { r(e.code !== `ERR_TLS_CERT_ALTNAME_INVALID`), this[b][y] = e, this[p][S](e); } function ge(e, t, n) { if (n === 0) { let n = new l(`HTTP/2: "frameError" received - type ${e}, code ${t}`); this[b][y] = n, this[p][S](n); } } function H() { let e = new c(`other side closed`, a.getSocketInfo(this[b])); this.destroy(e), a.destroy(this[b], e); } function _e(e) { let t = this[y] || new c(`HTTP/2: "GOAWAY" frame received with code ${e}`, a.getSocketInfo(this[b])), n = this[p]; if (n[b] = null, n[A] = null, this.close(), this[T] = null, a.destroy(this[b], t), n[v] < n[g].length) { let e = n[g][n[v]]; n[g][n[v]++] = null, a.errorRequest(n, e, t), n[_] = n[v]; } r(n[m] === 0), n.emit(`disconnect`, n[d], [n], t), n.emit(`connectionError`, n[d], [n], t), n[O](); } function ve() { let { [p]: e, [I]: t } = this, { [b]: n } = e, i = this[b][y] || this[y] || new c(`closed`, a.getSocketInfo(n)); if (e[b] = null, e[A] = null, t.ping.interval != null && (clearInterval(t.ping.interval), t.ping.interval = null), e.destroyed) { r(e[h] === 0); let t = e[g].splice(e[v]); for (let n = 0; n < t.length; n++) { let r = t[n]; a.errorRequest(e, r, i); } } } function ye() { let e = this[y] || new c(`closed`, a.getSocketInfo(this)), t = this[T][p]; t[b] = null, t[A] = null, this[T] !== null && this[T].destroy(e), t[_] = t[v], r(t[m] === 0), t.emit(`disconnect`, t[d], [t], e), t[O](); } function be(e) { r(e.code !== `ERR_TLS_CERT_ALTNAME_INVALID`), this[y] = e, this[p][S](e); } function xe() { a.destroy(this, new c(`other side closed`, a.getSocketInfo(this))); } function Se() { this[j] = !0; } function Ce(e) { return e !== `GET` && e !== `HEAD` && e !== `OPTIONS` && e !== `TRACE` && e !== `CONNECT`; } function we(e, t) { let n = t.bodyTimeout ?? e[M], i = e[T], { method: c, path: f, host: p, upgrade: m, expectContinue: h, signal: y, protocol: C, headers: w } = t, { body: E } = t; if (m != null && m !== `websocket`) return a.errorRequest(e, t, new u(`Custom upgrade "${m}" not supported over HTTP/2`)), !1; let D = {}; for (let e = 0; e < w.length; e += 2) { let t = w[e + 0], n = w[e + 1]; if (t === `cookie`) { D[t] == null ? D[t] = n : D[t] = Array.isArray(D[t]) ? (D[t].push(n), D[t]) : [D[t], n]; continue; } if (Array.isArray(n)) for (let e = 0; e < n.length; e++) D[t] ? D[t] += `, ${n[e]}` : D[t] = n[e]; else D[t] ? D[t] += `, ${n}` : D[t] = n; } let k = null, { hostname: A, port: j } = e[d]; D[ne] = p || `${A}${j ? `:${j}` : ``}`, D[re] = c; let P = (n) => { t.aborted || t.completed || (n ||= new s(), a.errorRequest(e, t, n), k != null && (k.removeAllListeners(`data`), k.close(), e[S](n), e[O]()), a.destroy(E, n)); }; try { t.onConnect(P); } catch (n) { a.errorRequest(e, t, n); } if (t.aborted) return !1; if (m || c === `CONNECT`) return i.ref(), m === `websocket` ? i[N] === !1 ? (a.errorRequest(e, t, new l(`HTTP/2: Extended CONNECT protocol not supported by server`)), i.unref(), !1) : (D[re] = `CONNECT`, D[ce] = `websocket`, D[z] = f, C === `ws:` || C === `wss:` ? D[ie] = C === `ws:` ? `http` : `https` : D[ie] = C === `http:` ? `http` : `https`, k = i.request(D, { endStream: !1, signal: y }), k[F] = !0, k.once(`response`, (n, r) => { let { [se]: a, ...o } = n; t.onUpgrade(a, ue(o), k), ++i[L], e[g][e[v]++] = null; }), k.on(`error`, () => { (k.rstCode === le || k.rstCode === B) && P(new l(`HTTP/2: "stream error" received - code ${k.rstCode}`)); }), k.once(`close`, () => { --i[L], i[L] === 0 && i.unref(); }), k.setTimeout(n), !0) : (k = i.request(D, { endStream: !1, signal: y }), k[F] = !0, k.on(`response`, (n) => { let { [se]: r, ...a } = n; t.onUpgrade(r, ue(a), k), ++i[L], e[g][e[v]++] = null; }), k.once(`close`, () => { --i[L], i[L] === 0 && i.unref(); }), k.setTimeout(n), !0); D[z] = f, D[ie] = C === `http:` ? `http` : `https`; let I = c === `PUT` || c === `POST` || c === `PATCH`; E && typeof E.read == `function` && E.read(0); let R = a.bodyLength(E); if (a.isFormDataLike(E)) { te ??= Ra$3().extractBody; let [e, t] = te(E); D[`content-type`] = t, E = e.stream, R = e.length; } if (R ??= t.contentLength, I || (R = null), Ce(c) && R > 0 && t.contentLength != null && t.contentLength !== R) { if (e[x]) return a.errorRequest(e, t, new o()), !1; process.emitWarning(new o()); } if (R != null && (r(E || R === 0, `no body must not have content length`), D[ae] = `${R}`), i.ref(), ee.sendHeaders.hasSubscribers) { let e = ``; for (let t in D) e += `${t}: ${D[t]}\r\n`; ee.sendHeaders.publish({ request: t, headers: e, socket: i[b] }); } let de = c === `GET` || c === `HEAD` || E === null; h ? (D[oe] = `100-continue`, k = i.request(D, { endStream: de, signal: y }), k[F] = !0, k.once(`continue`, V)) : (k = i.request(D, { endStream: de, signal: y }), k[F] = !0, V()), ++i[L], k.setTimeout(n); let fe = !1; return k.once(`response`, (e) => { let { [se]: n, ...r } = e; if (t.onResponseStarted(), fe = !0, t.aborted) { k.removeAllListeners(`data`); return; } t.onHeaders(Number(n), ue(r), k.resume.bind(k), ``) === !1 && k.pause(), k.on(`data`, (e) => { t.aborted || t.completed || t.onData(e) === !1 && k.pause(); }); }), k.once(`end`, () => { k.removeAllListeners(`data`), fe ? (!t.aborted && !t.completed && t.onComplete({}), e[g][e[v]++] = null, e[O]()) : (P(new l(`HTTP/2: stream half-closed (remote)`)), e[g][e[v]++] = null, e[_] = e[v], e[O]()); }), k.once(`close`, () => { k.removeAllListeners(`data`), --i[L], i[L] === 0 && i.unref(); }), k.once(`error`, function(e) { k.removeAllListeners(`data`), P(e); }), k.once(`frameError`, (e, t) => { k.removeAllListeners(`data`), P(new l(`HTTP/2: "frameError" received - type ${e}, code ${t}`)); }), k.on(`aborted`, () => { k.removeAllListeners(`data`); }), k.on(`timeout`, () => { let e = new l(`HTTP/2: "stream timeout after ${n}"`); k.removeAllListeners(`data`), --i[L], i[L] === 0 && i.unref(), P(e); }), k.once(`trailers`, (e) => { t.aborted || t.completed || (k.removeAllListeners(`data`), t.onComplete(e)); }), !0; function V() { !E || R === 0 ? Te(P, k, null, e, t, e[b], R, I) : a.isBuffer(E) ? Te(P, k, E, e, t, e[b], R, I) : a.isBlobLike(E) ? typeof E.stream == `function` ? De(P, k, E.stream(), e, t, e[b], R, I) : U(P, k, E, e, t, e[b], R, I) : a.isStream(E) ? Ee(P, e[b], I, k, E, e, t, R) : a.isIterable(E) ? De(P, k, E, e, t, e[b], R, I) : r(!1); } } function Te(e, t, n, i, o, s, c, l) { try { n != null && a.isBuffer(n) && (r(c === n.byteLength, `buffer body must have content length`), t.cork(), t.write(n), t.uncork(), t.end(), o.onBodySent(n)), l || (s[f] = !0), o.onRequestSent(), i[O](); } catch (t) { e(t); } } function Ee(e, t, n, o, s, c, l, u) { r(u !== 0 || c[m] === 0, `stream body cannot be pipelined`); let d = i(s, o, (r) => { r ? (a.destroy(d, r), e(r)) : (a.removeAllListeners(d), l.onRequestSent(), n || (t[f] = !0), c[O]()); }); a.addListener(d, `data`, p); function p(e) { l.onBodySent(e); } } async function U(e, t, n, i, a, s, c, l) { r(c === n.size, `blob body must have content length`); try { if (c != null && c !== n.size) throw new o(); let e = Buffer.from(await n.arrayBuffer()); t.cork(), t.write(e), t.uncork(), t.end(), a.onBodySent(e), a.onRequestSent(), l || (s[f] = !0), i[O](); } catch (t) { e(t); } } async function De(e, t, n, i, a, o, s, c) { r(s !== 0 || i[m] === 0, `iterator body cannot be pipelined`); let l = null; function u() { if (l) { let e = l; l = null, e(); } } let d = () => new Promise((e, t) => { r(l === null), o[y] ? t(o[y]) : l = e; }); t.on(`close`, u).on(`drain`, u); try { for await (let e of n) { if (o[y]) throw o[y]; let n = t.write(e); a.onBodySent(e), n || await d(); } t.end(), a.onRequestSent(), c || (o[f] = !0), i[O](); } catch (t) { e(t); } finally { t.off(`close`, u).off(`drain`, u); } } n.exports = de; })); var Va$3 = c$12(((e, n) => { let r = f$11(`node:assert`), i = f$11(`node:net`), a = f$11(`node:http`), o = q$6(), { ClientStats: s } = ha$3(), { channels: c } = ga$3(), l = _a$3(), u = xa$3(), { InvalidArgumentError: d, InformationalError: f, ClientDestroyedError: p } = K$6(), m = Sa$3(), { kUrl: h, kServerName: g, kClient: _, kBusy: v, kConnect: y, kResuming: b, kRunning: x, kPending: S, kSize: C, kQueue: w, kConnected: T, kConnecting: E, kNeedDrain: D, kKeepAliveDefaultTimeout: O, kHostHeader: k, kPendingIdx: A, kRunningIdx: j, kError: M, kPipelining: N, kKeepAliveTimeoutValue: P, kMaxHeadersSize: F, kKeepAliveMaxTimeout: I, kKeepAliveTimeoutThreshold: ee, kHeadersTimeout: L, kBodyTimeout: te, kStrictContentLength: R, kConnector: ne, kMaxRequests: re, kCounter: z, kClose: ie, kDestroy: ae, kDispatch: oe, kLocalAddress: se, kMaxResponseSize: ce, kOnError: le, kHTTPContext: B, kMaxConcurrentStreams: ue, kHTTP2InitialWindowSize: de, kHTTP2ConnectionWindowSize: fe, kResume: V, kPingInterval: pe } = da$3(), me = za$3(), he = Ba$3(), ge = Symbol(`kClosedResolve`), H = a && a.maxHeaderSize && Number.isInteger(a.maxHeaderSize) && a.maxHeaderSize > 0 ? () => a.maxHeaderSize : () => { throw new d(`http module not available or http.maxHeaderSize invalid`); }, _e = () => {}; function ve(e) { return e[N] ?? e[B]?.defaultPipelining ?? 1; } var ye = class extends u { constructor(e, { maxHeaderSize: t, headersTimeout: n, socketTimeout: r, requestTimeout: a, connectTimeout: s, bodyTimeout: c, idleTimeout: l, keepAlive: u, keepAliveTimeout: f, maxKeepAliveTimeout: p, keepAliveMaxTimeout: _, keepAliveTimeoutThreshold: v, socketPath: y, pipelining: x, tls: S, strictContentLength: C, maxCachedSessions: T, connect: E, maxRequestsPerClient: M, localAddress: z, maxResponseSize: ie, autoSelectFamily: ae, autoSelectFamilyAttemptTimeout: oe, maxConcurrentStreams: me, allowH2: he, useH2c: _e, initialWindowSize: ve, connectionWindowSize: ye, pingInterval: xe, webSocket: Se } = {}) { if (u !== void 0) throw new d(`unsupported keepAlive, use pipelining=0 instead`); if (r !== void 0) throw new d(`unsupported socketTimeout, use headersTimeout & bodyTimeout instead`); if (a !== void 0) throw new d(`unsupported requestTimeout, use headersTimeout & bodyTimeout instead`); if (l !== void 0) throw new d(`unsupported idleTimeout, use keepAliveTimeout instead`); if (p !== void 0) throw new d(`unsupported maxKeepAliveTimeout, use keepAliveMaxTimeout instead`); if (t != null) { if (!Number.isInteger(t) || t < 1) throw new d(`invalid maxHeaderSize`); } else t = H(); if (y != null && typeof y != `string`) throw new d(`invalid socketPath`); if (s != null && (!Number.isFinite(s) || s < 0)) throw new d(`invalid connectTimeout`); if (f != null && (!Number.isFinite(f) || f <= 0)) throw new d(`invalid keepAliveTimeout`); if (_ != null && (!Number.isFinite(_) || _ <= 0)) throw new d(`invalid keepAliveMaxTimeout`); if (v != null && !Number.isFinite(v)) throw new d(`invalid keepAliveTimeoutThreshold`); if (n != null && (!Number.isInteger(n) || n < 0)) throw new d(`headersTimeout must be a positive integer or zero`); if (c != null && (!Number.isInteger(c) || c < 0)) throw new d(`bodyTimeout must be a positive integer or zero`); if (E != null && typeof E != `function` && typeof E != `object`) throw new d(`connect must be a function or an object`); if (M != null && (!Number.isInteger(M) || M < 0)) throw new d(`maxRequestsPerClient must be a positive number`); if (z != null && (typeof z != `string` || i.isIP(z) === 0)) throw new d(`localAddress must be valid string IP address`); if (ie != null && (!Number.isInteger(ie) || ie < -1)) throw new d(`maxResponseSize must be a positive number`); if (oe != null && (!Number.isInteger(oe) || oe < -1)) throw new d(`autoSelectFamilyAttemptTimeout must be a positive number`); if (he != null && typeof he != `boolean`) throw new d(`allowH2 must be a valid boolean value`); if (me != null && (typeof me != `number` || me < 1)) throw new d(`maxConcurrentStreams must be a positive integer, greater than 0`); if (_e != null && typeof _e != `boolean`) throw new d(`useH2c must be a valid boolean value`); if (ve != null && (!Number.isInteger(ve) || ve < 1)) throw new d(`initialWindowSize must be a positive integer, greater than 0`); if (ye != null && (!Number.isInteger(ye) || ye < 1)) throw new d(`connectionWindowSize must be a positive integer, greater than 0`); if (xe != null && (typeof xe != `number` || !Number.isInteger(xe) || xe < 0)) throw new d(`pingInterval must be a positive integer, greater or equal to 0`); if (super({ webSocket: Se }), typeof E != `function`) E = m({ ...S, maxCachedSessions: T, allowH2: he, useH2c: _e, socketPath: y, timeout: s, ...typeof ae == `boolean` ? { autoSelectFamily: ae, autoSelectFamilyAttemptTimeout: oe } : void 0, ...E }); else { let e = E; E = (t, n) => e({ ...t, ...y == null ? null : { socketPath: y }, ...he == null ? null : { allowH2: he } }, n); } this[h] = o.parseOrigin(e), this[ne] = E, this[N] = x ?? 1, this[F] = t, this[O] = f ?? 4e3, this[I] = _ ?? 6e5, this[ee] = v ?? 2e3, this[P] = this[O], this[g] = null, this[se] = z ?? null, this[b] = 0, this[D] = 0, this[k] = `host: ${this[h].hostname}${this[h].port ? `:${this[h].port}` : ``}\r\n`, this[te] = c ?? 3e5, this[L] = n ?? 3e5, this[R] = C ?? !0, this[re] = M, this[ge] = null, this[ce] = ie > -1 ? ie : -1, this[B] = null, this[ue] = me ?? 100, this[de] = ve ?? 262144, this[fe] = ye ?? 524288, this[pe] = xe ?? 6e4, this[w] = [], this[j] = 0, this[A] = 0, this[V] = (e) => we(this, e), this[le] = (e) => be(this, e); } get pipelining() { return this[N]; } set pipelining(e) { this[N] = e, this[V](!0); } get stats() { return new s(this); } get [S]() { return this[w].length - this[A]; } get [x]() { return this[A] - this[j]; } get [C]() { return this[w].length - this[j]; } get [T]() { return !!this[B] && !this[E] && !this[B].destroyed; } get [v]() { return !!(this[B]?.busy(null) || this[C] >= (ve(this) || 1) || this[S] > 0); } [y](e) { xe(this), this.once(`connect`, e); } [oe](e, t) { let n = new l(this[h].origin, e, t); return this[w].push(n), this[b] || (o.bodyLength(n.body) == null && o.isIterable(n.body) ? (this[b] = 1, queueMicrotask(() => we(this))) : this[V](!0)), this[b] && this[D] !== 2 && this[v] && (this[D] = 2), this[D] < 2; } [ie]() { return new Promise((e) => { this[C] ? this[ge] = e : e(null); }); } [ae](e) { return new Promise((t) => { let n = this[w].splice(this[A]); for (let t = 0; t < n.length; t++) { let r = n[t]; o.errorRequest(this, r, e); } let r = () => { this[ge] && (this[ge](), this[ge] = null), t(null); }; this[B] ? (this[B].destroy(e, r), this[B] = null) : queueMicrotask(r), this[V](); }); } }; function be(e, t) { if (e[x] === 0 && t.code !== `UND_ERR_INFO` && t.code !== `UND_ERR_SOCKET`) { r(e[A] === e[j]); let n = e[w].splice(e[j]); for (let r = 0; r < n.length; r++) { let i = n[r]; o.errorRequest(e, i, t); } r(e[C] === 0); } } function xe(e) { r(!e[E]), r(!e[B]); let { host: t, hostname: n, protocol: a, port: s } = e[h]; if (n[0] === `[`) { let e = n.indexOf(`]`); r(e !== -1); let t = n.substring(1, e); r(i.isIPv6(t)), n = t; } e[E] = !0, c.beforeConnect.hasSubscribers && c.beforeConnect.publish({ connectParams: { host: t, hostname: n, protocol: a, port: s, version: e[B]?.version, servername: e[g], localAddress: e[se] }, connector: e[ne] }); try { e[ne]({ host: t, hostname: n, protocol: a, port: s, servername: e[g], localAddress: e[se] }, (i, l) => { if (i) { Se(e, i, { host: t, hostname: n, protocol: a, port: s }), e[V](); return; } if (e.destroyed) { o.destroy(l.on(`error`, _e), new p()), e[V](); return; } r(l); try { e[B] = l.alpnProtocol === `h2` ? he(e, l) : me(e, l); } catch (r) { l.destroy().on(`error`, _e), Se(e, r, { host: t, hostname: n, protocol: a, port: s }), e[V](); return; } e[E] = !1, l[z] = 0, l[re] = e[re], l[_] = e, l[M] = null, c.connected.hasSubscribers && c.connected.publish({ connectParams: { host: t, hostname: n, protocol: a, port: s, version: e[B]?.version, servername: e[g], localAddress: e[se] }, connector: e[ne], socket: l }), e.emit(`connect`, e[h], [e]), e[V](); }); } catch (r) { Se(e, r, { host: t, hostname: n, protocol: a, port: s }), e[V](); } } function Se(e, t, { host: n, hostname: i, protocol: a, port: s }) { if (!e.destroyed) { if (e[E] = !1, c.connectError.hasSubscribers && c.connectError.publish({ connectParams: { host: n, hostname: i, protocol: a, port: s, version: e[B]?.version, servername: e[g], localAddress: e[se] }, connector: e[ne], error: t }), t.code === `ERR_TLS_CERT_ALTNAME_INVALID`) for (r(e[x] === 0); e[S] > 0 && e[w][e[A]].servername === e[g];) { let n = e[w][e[A]++]; o.errorRequest(e, n, t); } else be(e, t); e.emit(`connectionError`, e[h], [e], t); } } function Ce(e) { e[D] = 0, e.emit(`drain`, e[h], [e]); } function we(e, t) { e[b] !== 2 && (e[b] = 2, Te(e, t), e[b] = 0, e[j] > 256 && (e[w].splice(0, e[j]), e[A] -= e[j], e[j] = 0)); } function Te(e, t) { for (;;) { if (e.destroyed) { r(e[S] === 0); return; } if (e[ge] && !e[C]) { e[ge](), e[ge] = null; return; } if (e[B] && e[B].resume(), e[v]) e[D] = 2; else if (e[D] === 2) { t ? (e[D] = 1, queueMicrotask(() => Ce(e))) : Ce(e); continue; } if (e[S] === 0 || e[x] >= (ve(e) || 1)) return; let n = e[w][e[A]]; if (n === null) return; if (e[h].protocol === `https:` && e[g] !== n.servername) { if (e[x] > 0) return; e[g] = n.servername, e[B]?.destroy(new f(`servername changed`), () => { e[B] = null, we(e); }); } if (e[E]) return; if (!e[B]) { xe(e); return; } if (e[B].destroyed || e[B].busy(n)) return; !n.aborted && e[B].write(n) ? e[A]++ : e[w].splice(e[A], 1); } } n.exports = ye; })); var Ha$3 = c$12(((e, t) => { let n = 2048, r = n - 1; var i = class { bottom = 0; top = 0; list = Array(n).fill(void 0); next = null; isEmpty() { return this.top === this.bottom; } isFull() { return (this.top + 1 & r) === this.bottom; } push(e) { this.list[this.top] = e, this.top = this.top + 1 & r; } shift() { let e = this.list[this.bottom]; return e === void 0 ? null : (this.list[this.bottom] = void 0, this.bottom = this.bottom + 1 & r, e); } }; t.exports = class { constructor() { this.head = this.tail = new i(); } isEmpty() { return this.head.isEmpty(); } push(e) { this.head.isFull() && (this.head = this.head.next = new i()), this.head.push(e); } shift() { let e = this.tail, t = e.shift(); return e.isEmpty() && e.next !== null && (this.tail = e.next, e.next = null), t; } }; })); var Ua$3 = c$12(((e, t) => { let { PoolStats: n } = ha$3(), r = xa$3(), i = Ha$3(), { kConnected: a, kSize: o, kRunning: s, kPending: c, kQueued: l, kBusy: u, kFree: d, kUrl: f, kClose: p, kDestroy: m, kDispatch: h } = da$3(), g = Symbol(`clients`), _ = Symbol(`needDrain`), v = Symbol(`queue`), y = Symbol(`closed resolve`), b = Symbol(`onDrain`), x = Symbol(`onConnect`), S = Symbol(`onDisconnect`), C = Symbol(`onConnectionError`), w = Symbol(`get dispatcher`), T = Symbol(`add client`), E = Symbol(`remove client`); t.exports = { PoolBase: class extends r { [v] = new i(); [l] = 0; [g] = []; [_] = !1; [b](e, t, n) { let r = this[v], i = !1; for (; !i;) { let t = r.shift(); if (!t) break; this[l]--, i = !e.dispatch(t.opts, t.handler); } if (e[_] = i, !i && this[_] && (this[_] = !1, this.emit(`drain`, t, [this, ...n])), this[y] && r.isEmpty()) { let e = []; for (let t = 0; t < this[g].length; t++) { let n = this[g][t]; n.destroyed || e.push(n.close()); } return Promise.all(e).then(this[y]); } } [x] = (e, t) => { this.emit(`connect`, e, [this, ...t]); }; [S] = (e, t, n) => { this.emit(`disconnect`, e, [this, ...t], n); }; [C] = (e, t, n) => { this.emit(`connectionError`, e, [this, ...t], n); }; get [u]() { return this[_]; } get [a]() { let e = 0; for (let { [a]: t } of this[g]) e += t; return e; } get [d]() { let e = 0; for (let { [a]: t, [_]: n } of this[g]) e += t && !n; return e; } get [c]() { let e = this[l]; for (let { [c]: t } of this[g]) e += t; return e; } get [s]() { let e = 0; for (let { [s]: t } of this[g]) e += t; return e; } get [o]() { let e = this[l]; for (let { [o]: t } of this[g]) e += t; return e; } get stats() { return new n(this); } [p]() { if (this[v].isEmpty()) { let e = []; for (let t = 0; t < this[g].length; t++) { let n = this[g][t]; n.destroyed || e.push(n.close()); } return Promise.all(e); } else return new Promise((e) => { this[y] = e; }); } [m](e) { for (;;) { let t = this[v].shift(); if (!t) break; t.handler.onError(e); } let t = Array(this[g].length); for (let n = 0; n < this[g].length; n++) t[n] = this[g][n].destroy(e); return Promise.all(t); } [h](e, t) { let n = this[w](); return n ? n.dispatch(e, t) || (n[_] = !0, this[_] = !this[w]()) : (this[_] = !0, this[v].push({ opts: e, handler: t }), this[l]++), !this[_]; } [T](e) { return e.on(`drain`, this[b].bind(this, e)).on(`connect`, this[x]).on(`disconnect`, this[S]).on(`connectionError`, this[C]), this[g].push(e), this[_] && queueMicrotask(() => { this[_] && this[b](e, e[f], [e, this]); }), this; } [E](e) { e.close(() => { let t = this[g].indexOf(e); t !== -1 && this[g].splice(t, 1); }), this[_] = this[g].some((e) => !e[_] && e.closed !== !0 && e.destroyed !== !0); } }, kClients: g, kNeedDrain: _, kAddClient: T, kRemoveClient: E, kGetDispatcher: w }; })); var Wa$3 = c$12(((e, t) => { let { PoolBase: n, kClients: r, kNeedDrain: i, kAddClient: a, kGetDispatcher: o, kRemoveClient: s } = Ua$3(), c = Va$3(), { InvalidArgumentError: l } = K$6(), u = q$6(), { kUrl: d } = da$3(), f = Sa$3(), p = Symbol(`options`), m = Symbol(`connections`), h = Symbol(`factory`); function g(e, t) { return new c(e, t); } t.exports = class extends n { constructor(e, { connections: t, factory: n = g, connect: i, connectTimeout: a, tls: o, maxCachedSessions: s, socketPath: c, autoSelectFamily: _, autoSelectFamilyAttemptTimeout: v, allowH2: y, clientTtl: b, ...x } = {}) { if (t != null && (!Number.isFinite(t) || t < 0)) throw new l(`invalid connections`); if (typeof n != `function`) throw new l(`factory must be a function.`); if (i != null && typeof i != `function` && typeof i != `object`) throw new l(`connect must be a function or an object`); typeof i != `function` && (i = f({ ...o, maxCachedSessions: s, allowH2: y, socketPath: c, timeout: a, ...typeof _ == `boolean` ? { autoSelectFamily: _, autoSelectFamilyAttemptTimeout: v } : void 0, ...i })), super(x), this[m] = t || null, this[d] = u.parseOrigin(e), this[p] = { ...u.deepClone(x), connect: i, allowH2: y, clientTtl: b, socketPath: c }, this[p].interceptors = x.interceptors ? { ...x.interceptors } : void 0, this[h] = n, this.on(`connect`, (e, t) => { if (b != null && b > 0) for (let e of t) Object.assign(e, { ttl: Date.now() }); }), this.on(`connectionError`, (e, t, n) => { for (let e of t) { let t = this[r].indexOf(e); t !== -1 && this[r].splice(t, 1); } }); } [o]() { let e = this[p].clientTtl; for (let t of this[r]) if (e != null && e > 0 && t.ttl && Date.now() - t.ttl > e) this[s](t); else if (!t[i]) return t; if (!this[m] || this[r].length < this[m]) { let e = this[h](this[d], this[p]); return this[a](e), e; } } }; })); var Ga$3 = c$12(((e, t) => { let { BalancedPoolMissingUpstreamError: n, InvalidArgumentError: r } = K$6(), { PoolBase: i, kClients: a, kNeedDrain: o, kAddClient: s, kRemoveClient: c, kGetDispatcher: l } = Ua$3(), u = Wa$3(), { kUrl: d } = da$3(), f = q$6(), p = Symbol(`factory`), m = Symbol(`options`), h = Symbol(`kGreatestCommonDivisor`), g = Symbol(`kCurrentWeight`), _ = Symbol(`kIndex`), v = Symbol(`kWeight`), y = Symbol(`kMaxWeightPerServer`), b = Symbol(`kErrorPenalty`); function x(e, t) { if (e === 0) return t; for (; t !== 0;) { let n = t; t = e % t, e = n; } return e; } function S(e, t) { return new u(e, t); } t.exports = class extends i { constructor(e = [], { factory: t = S, ...n } = {}) { if (typeof t != `function`) throw new r(`factory must be a function.`); super(n), this[m] = { ...f.deepClone(n) }, this[m].interceptors = n.interceptors ? { ...n.interceptors } : void 0, this[_] = -1, this[g] = 0, this[y] = this[m].maxWeightPerServer || 100, this[b] = this[m].errorPenalty || 15, Array.isArray(e) || (e = [e]), this[p] = t; for (let t of e) this.addUpstream(t); this._updateBalancedPoolStats(); } addUpstream(e) { let t = f.parseOrigin(e).origin; if (this[a].find((e) => e[d].origin === t && e.closed !== !0 && e.destroyed !== !0)) return this; let n = this[p](t, this[m]); this[s](n), n.on(`connect`, () => { n[v] = Math.min(this[y], n[v] + this[b]); }), n.on(`connectionError`, () => { n[v] = Math.max(1, n[v] - this[b]), this._updateBalancedPoolStats(); }), n.on(`disconnect`, (...e) => { let t = e[2]; t && t.code === `UND_ERR_SOCKET` && (n[v] = Math.max(1, n[v] - this[b]), this._updateBalancedPoolStats()); }); for (let e of this[a]) e[v] = this[y]; return this._updateBalancedPoolStats(), this; } _updateBalancedPoolStats() { let e = 0; for (let t = 0; t < this[a].length; t++) e = x(this[a][t][v], e); this[h] = e; } removeUpstream(e) { let t = f.parseOrigin(e).origin, n = this[a].find((e) => e[d].origin === t && e.closed !== !0 && e.destroyed !== !0); return n && this[c](n), this; } getUpstream(e) { let t = f.parseOrigin(e).origin; return this[a].find((e) => e[d].origin === t && e.closed !== !0 && e.destroyed !== !0); } get upstreams() { return this[a].filter((e) => e.closed !== !0 && e.destroyed !== !0).map((e) => e[d].origin); } [l]() { if (this[a].length === 0) throw new n(); if (!this[a].find((e) => !e[o] && e.closed !== !0 && e.destroyed !== !0) || this[a].map((e) => e[o]).reduce((e, t) => e && t, !0)) return; let e = 0, t = this[a].findIndex((e) => !e[o]); for (; e++ < this[a].length;) { this[_] = (this[_] + 1) % this[a].length; let e = this[a][this[_]]; if (e[v] > this[a][t][v] && !e[o] && (t = this[_]), this[_] === 0 && (this[g] = this[g] - this[h], this[g] <= 0 && (this[g] = this[y])), e[v] >= this[g] && !e[o]) return e; } return this[g] = this[a][t][v], this[_] = t, this[a][t]; } }; })); var Ka$3 = c$12(((e, t) => { let { PoolBase: n, kClients: r, kNeedDrain: i, kAddClient: a, kGetDispatcher: o, kRemoveClient: s } = Ua$3(), c = Va$3(), { InvalidArgumentError: l } = K$6(), u = q$6(), { kUrl: d } = da$3(), f = Sa$3(), p = Symbol(`options`), m = Symbol(`connections`), h = Symbol(`factory`), g = Symbol(`index`); function _(e, t) { return new c(e, t); } t.exports = class extends n { constructor(e, { connections: t, factory: n = _, connect: i, connectTimeout: a, tls: o, maxCachedSessions: s, socketPath: c, autoSelectFamily: v, autoSelectFamilyAttemptTimeout: y, allowH2: b, clientTtl: x, ...S } = {}) { if (t != null && (!Number.isFinite(t) || t < 0)) throw new l(`invalid connections`); if (typeof n != `function`) throw new l(`factory must be a function.`); if (i != null && typeof i != `function` && typeof i != `object`) throw new l(`connect must be a function or an object`); typeof i != `function` && (i = f({ ...o, maxCachedSessions: s, allowH2: b, socketPath: c, timeout: a, ...typeof v == `boolean` ? { autoSelectFamily: v, autoSelectFamilyAttemptTimeout: y } : void 0, ...i })), super(), this[m] = t || null, this[d] = u.parseOrigin(e), this[p] = { ...u.deepClone(S), connect: i, allowH2: b, clientTtl: x, socketPath: c }, this[p].interceptors = S.interceptors ? { ...S.interceptors } : void 0, this[h] = n, this[g] = -1, this.on(`connect`, (e, t) => { if (x != null && x > 0) for (let e of t) Object.assign(e, { ttl: Date.now() }); }), this.on(`connectionError`, (e, t, n) => { for (let e of t) { let t = this[r].indexOf(e); t !== -1 && this[r].splice(t, 1); } }); } [o]() { let e = this[p].clientTtl, t = this[r].length; if (t === 0) { let e = this[h](this[d], this[p]); return this[a](e), e; } let n = 0; for (; n < t;) { this[g] = (this[g] + 1) % t; let a = this[r][this[g]]; if (e != null && e > 0 && a.ttl && Date.now() - a.ttl > e) { this[s](a), n++; continue; } if (!a[i]) return a; n++; } if (!this[m] || t < this[m]) { let e = this[h](this[d], this[p]); return this[a](e), e; } } }; })); var qa$3 = c$12(((e, t) => { let { InvalidArgumentError: n, MaxOriginsReachedError: r } = K$6(), { kClients: i, kRunning: a, kClose: o, kDestroy: s, kDispatch: c, kUrl: l } = da$3(), u = xa$3(), d = Wa$3(), f = Va$3(), p = q$6(), m = Symbol(`onConnect`), h = Symbol(`onDisconnect`), g = Symbol(`onConnectionError`), _ = Symbol(`onDrain`), v = Symbol(`factory`), y = Symbol(`options`), b = Symbol(`origins`); function x(e, t) { return t && t.connections === 1 ? new f(e, t) : new d(e, t); } t.exports = class extends u { constructor({ factory: e = x, maxOrigins: t = Infinity, connect: r, ...a } = {}) { if (typeof e != `function`) throw new n(`factory must be a function.`); if (r != null && typeof r != `function` && typeof r != `object`) throw new n(`connect must be a function or an object`); if (typeof t != `number` || Number.isNaN(t) || t <= 0) throw new n(`maxOrigins must be a number greater than 0`); super(a), r && typeof r != `function` && (r = { ...r }), this[y] = { ...p.deepClone(a), maxOrigins: t, connect: r }, this[v] = e, this[i] = /* @__PURE__ */ new Map(), this[b] = /* @__PURE__ */ new Set(), this[_] = (e, t) => { this.emit(`drain`, e, [this, ...t]); }, this[m] = (e, t) => { this.emit(`connect`, e, [this, ...t]); }, this[h] = (e, t, n) => { this.emit(`disconnect`, e, [this, ...t], n); }, this[g] = (e, t, n) => { this.emit(`connectionError`, e, [this, ...t], n); }; } get [a]() { let e = 0; for (let { dispatcher: t } of this[i].values()) e += t[a]; return e; } [c](e, t) { let a; if (e.origin && (typeof e.origin == `string` || e.origin instanceof URL)) a = String(e.origin); else throw new n(`opts.origin must be a non-empty string or URL.`); if (this[b].size >= this[y].maxOrigins && !this[b].has(a)) throw new r(); let o = this[i].get(a), s = o && o.dispatcher; if (!s) { let t = (e) => { let t = this[i].get(a); t && (e && --t.count, t.count <= 0 && (this[i].delete(a), t.dispatcher.destroyed || t.dispatcher.close()), this[b].delete(a)); }; s = this[v](e.origin, this[y]).on(`drain`, this[_]).on(`connect`, (e, t) => { let n = this[i].get(a); n && (n.count += 1), this[m](e, t); }).on(`disconnect`, (e, n, r) => { t(!0), this[h](e, n, r); }).on(`connectionError`, (e, n, r) => { t(!1), this[g](e, n, r); }), this[i].set(a, { count: 0, dispatcher: s }), this[b].add(a); } return s.dispatch(e, t); } [o]() { let e = []; for (let { dispatcher: t } of this[i].values()) e.push(t.close()); return this[i].clear(), Promise.all(e); } [s](e) { let t = []; for (let { dispatcher: n } of this[i].values()) t.push(n.destroy(e)); return this[i].clear(), Promise.all(t); } get stats() { let e = {}; for (let { dispatcher: t } of this[i].values()) t.stats && (e[t[l].origin] = t.stats); return e; } }; })); var Ja$2 = c$12(((e, n) => { let { Buffer: r } = f$11(`node:buffer`), i = f$11(`node:net`), { InvalidArgumentError: a } = K$6(); function o(e) { if (i.isIPv4(e)) { let t = e.split(`.`).map(Number); return { type: 1, buffer: r.from(t) }; } if (i.isIPv6(e)) return { type: 4, buffer: s(e) }; let t = r.from(e, `utf8`); if (t.length > 255) throw new a(`Domain name too long (max 255 bytes)`); return { type: 3, buffer: r.concat([r.from([t.length]), t]) }; } function s(e) { let t = r.alloc(16), n = e; if (e.includes(`.`)) { let t = e.lastIndexOf(`:`), r = e.slice(t + 1); if (i.isIPv4(r)) { let i = r.split(`.`).map(Number), a = (i[0] << 8 | i[1]).toString(16), o = (i[2] << 8 | i[3]).toString(16); n = `${e.slice(0, t)}:${a}:${o}`; } } let a = n.indexOf(`::`); if (a !== -1) { let e = n.slice(0, a), r = n.slice(a + 2), i = e === `` ? [] : e.split(`:`), o = r === `` ? [] : r.split(`:`), s = 0; for (let e of i) t.writeUInt16BE(parseInt(e, 16), s), s += 2; s = 16 - o.length * 2; for (let e of o) t.writeUInt16BE(parseInt(e, 16), s), s += 2; } else { let e = n.split(`:`); for (let n = 0; n < e.length; n++) t.writeUInt16BE(parseInt(e[n], 16), n * 2); } return t; } function c(e, t, n) { let i = r.allocUnsafe(2); return i.writeUInt16BE(n, 0), r.concat([ r.from([e]), t, i ]); } function l(e, t = 0) { if (e.length < t + 1) throw new a(`Buffer too small to contain address type`); let n = e[t], r, i = t + 1; switch (n) { case 1: if (e.length < i + 6) throw new a(`Buffer too small for IPv4 address`); r = Array.from(e.subarray(i, i + 4)).join(`.`), i += 4; break; case 3: { if (e.length < i + 1) throw new a(`Buffer too small for domain length`); let t = e[i]; if (i += 1, e.length < i + t + 2) throw new a(`Buffer too small for domain address`); r = e.subarray(i, i + t).toString(`utf8`), i += t; break; } case 4: { if (e.length < i + 18) throw new a(`Buffer too small for IPv6 address`); let t = []; for (let n = 0; n < 8; n++) { let r = e.readUInt16BE(i + n * 2); t.push(r.toString(16)); } r = t.join(`:`), i += 16; break; } default: throw new a(`Invalid address type: ${n}`); } if (e.length < i + 2) throw new a(`Buffer too small for port`); let o = e.readUInt16BE(i); return i += 2, { address: r, port: o, bytesRead: i - t }; } function u(e) { let t = { 1: `General SOCKS server failure`, 2: `Connection not allowed by ruleset`, 3: `Network unreachable`, 4: `Host unreachable`, 5: `Connection refused`, 6: `TTL expired`, 7: `Command not supported`, 8: `Address type not supported` }[e] || `Unknown SOCKS5 error code: ${e}`, n = Error(t); return n.code = `SOCKS5_${e}`, n; } n.exports = { parseAddress: o, parseIPv6: s, buildAddressBuffer: c, parseResponseAddress: l, createReplyError: u }; })); var Ya$2 = c$12(((e, n) => { let { EventEmitter: r } = f$11(`node:events`), { Buffer: i } = f$11(`node:buffer`), { InvalidArgumentError: a, Socks5ProxyError: o } = K$6(), { debuglog: s } = f$11(`node:util`), { parseAddress: c } = Ja$2(), l = s(`undici:socks5`), u = i.alloc(0), d = { NO_AUTH: 0, GSSAPI: 1, USERNAME_PASSWORD: 2, NO_ACCEPTABLE: 255 }, f = { CONNECT: 1, BIND: 2, UDP_ASSOCIATE: 3 }, p = { IPV4: 1, DOMAIN: 3, IPV6: 4 }, m = { SUCCEEDED: 0, GENERAL_FAILURE: 1, CONNECTION_NOT_ALLOWED: 2, NETWORK_UNREACHABLE: 3, HOST_UNREACHABLE: 4, CONNECTION_REFUSED: 5, TTL_EXPIRED: 6, COMMAND_NOT_SUPPORTED: 7, ADDRESS_TYPE_NOT_SUPPORTED: 8 }, h = { INITIAL: `initial`, HANDSHAKING: `handshaking`, AUTHENTICATING: `authenticating`, AUTHENTICATED: `authenticated`, CONNECTING: `connecting`, CONNECTED: `connected`, ERROR: `error`, CLOSED: `closed` }; n.exports = { Socks5Client: class extends r { constructor(e, t = {}) { if (super(), !e) throw new a(`socket is required`); this.socket = e, this.options = t, this.state = h.INITIAL, this.buffer = u, this.onSocketData = this.onData.bind(this), this.onSocketError = this.onError.bind(this), this.onSocketClose = this.onClose.bind(this), this.authMethods = [], t.username && t.password && this.authMethods.push(d.USERNAME_PASSWORD), this.authMethods.push(d.NO_AUTH), this.socket.on(`data`, this.onSocketData), this.socket.on(`error`, this.onSocketError), this.socket.on(`close`, this.onSocketClose); } onData(e) { l(`received data`, e.length, `bytes in state`, this.state), this.buffer = i.concat([this.buffer, e]); try { switch (this.state) { case h.HANDSHAKING: this.handleHandshakeResponse(); break; case h.AUTHENTICATING: this.handleAuthResponse(); break; case h.CONNECTING: this.handleConnectResponse(); break; } } catch (e) { this.onError(e); } } onError(e) { l(`socket error`, e), this.state = h.ERROR, this.emit(`error`, e), this.destroy(); } onClose() { l(`socket closed`), this.state = h.CLOSED, this.emit(`close`); } destroy() { this.socket && !this.socket.destroyed && this.socket.destroy(); } markAuthenticated() { this.state = h.AUTHENTICATED, this.emit(`authenticated`); } handshake() { if (this.state !== h.INITIAL) throw new a(`Handshake already started`); l(`starting handshake with`, this.authMethods.length, `auth methods`), this.state = h.HANDSHAKING; let e = i.alloc(2 + this.authMethods.length); e[0] = 5, e[1] = this.authMethods.length, this.authMethods.forEach((t, n) => { e[2 + n] = t; }), this.socket.write(e); } handleHandshakeResponse() { if (this.buffer.length < 2) return; let e = this.buffer[0], t = this.buffer[1]; if (e !== 5) throw new o(`Invalid SOCKS version: ${e}`, `UND_ERR_SOCKS5_VERSION`); if (t === d.NO_ACCEPTABLE) throw new o(`No acceptable authentication method`, `UND_ERR_SOCKS5_AUTH_REJECTED`); if (this.buffer = this.buffer.subarray(2), l(`server selected auth method`, t), t === d.NO_AUTH) this.markAuthenticated(); else if (t === d.USERNAME_PASSWORD) this.state = h.AUTHENTICATING, this.sendAuthRequest(); else throw new o(`Unsupported authentication method: ${t}`, `UND_ERR_SOCKS5_AUTH_METHOD`); } sendAuthRequest() { let { username: e, password: t } = this.options; if (!e || !t) throw new a(`Username and password required for authentication`); l(`sending username/password auth`); let n = i.from(e), r = i.from(t); if (n.length > 255 || r.length > 255) throw new a(`Username or password too long`); let o = i.alloc(3 + n.length + r.length); o[0] = 1, o[1] = n.length, n.copy(o, 2), o[2 + n.length] = r.length, r.copy(o, 3 + n.length), this.socket.write(o); } handleAuthResponse() { if (this.buffer.length < 2) return; let e = this.buffer[0], t = this.buffer[1]; if (e !== 1) throw new o(`Invalid auth sub-negotiation version: ${e}`, `UND_ERR_SOCKS5_AUTH_VERSION`); if (t !== 0) throw new o(`Authentication failed`, `UND_ERR_SOCKS5_AUTH_FAILED`); this.buffer = this.buffer.subarray(2), l(`authentication successful`), this.markAuthenticated(); } connect(e, t) { if (this.state === h.CONNECTING || this.state === h.CONNECTED) throw new a(`Connection already in progress`); if (this.state !== h.AUTHENTICATED) throw new a(`Client must be authenticated before CONNECT`); l(`connecting to`, e, t), this.state = h.CONNECTING; let n = this.buildConnectRequest(f.CONNECT, e, t); this.socket.write(n); } buildConnectRequest(e, t, n) { let { type: r, buffer: a } = c(t), o = i.alloc(4 + a.length + 2); return o[0] = 5, o[1] = e, o[2] = 0, o[3] = r, a.copy(o, 4), o.writeUInt16BE(n, 4 + a.length), o; } handleConnectResponse() { if (this.buffer.length < 4) return; let e = this.buffer[0], t = this.buffer[1], n = this.buffer[3]; if (e !== 5) throw new o(`Invalid SOCKS version in reply: ${e}`, `UND_ERR_SOCKS5_REPLY_VERSION`); let r = 4; if (n === p.IPV4) r += 6; else if (n === p.DOMAIN) { if (this.buffer.length < 5) return; r += 1 + this.buffer[4] + 2; } else if (n === p.IPV6) r += 18; else throw new o(`Invalid address type in reply: ${n}`, `UND_ERR_SOCKS5_ADDR_TYPE`); if (this.buffer.length < r) return; if (t !== m.SUCCEEDED) throw new o(`SOCKS5 connection failed: ${this.getReplyErrorMessage(t)}`, `UND_ERR_SOCKS5_REPLY_${t}`); let i, a = 4; if (n === p.IPV4) i = Array.from(this.buffer.subarray(a, a + 4)).join(`.`), a += 4; else if (n === p.DOMAIN) { let e = this.buffer[a]; a += 1, i = this.buffer.subarray(a, a + e).toString(), a += e; } else if (n === p.IPV6) { let e = []; for (let t = 0; t < 8; t++) { let n = this.buffer.readUInt16BE(a + t * 2); e.push(n.toString(16)); } i = e.join(`:`), a += 16; } let s = this.buffer.readUInt16BE(a); this.buffer = u, this.state = h.CONNECTED, this.socket.removeListener(`data`, this.onSocketData), l(`connected, bound address:`, i, `port:`, s), this.emit(`connected`, { address: i, port: s }); } getReplyErrorMessage(e) { switch (e) { case m.GENERAL_FAILURE: return `General SOCKS server failure`; case m.CONNECTION_NOT_ALLOWED: return `Connection not allowed by ruleset`; case m.NETWORK_UNREACHABLE: return `Network unreachable`; case m.HOST_UNREACHABLE: return `Host unreachable`; case m.CONNECTION_REFUSED: return `Connection refused`; case m.TTL_EXPIRED: return `TTL expired`; case m.COMMAND_NOT_SUPPORTED: return `Command not supported`; case m.ADDRESS_TYPE_NOT_SUPPORTED: return `Address type not supported`; default: return `Unknown error code: ${e}`; } } }, AUTH_METHODS: d, COMMANDS: f, ADDRESS_TYPES: p, REPLY_CODES: m, STATES: h }; })); var Xa$2 = c$12(((e, n) => { let { URL: r } = f$11(`node:url`), i, a = xa$3(), { InvalidArgumentError: o } = K$6(), { Socks5Client: s, STATES: c } = Ya$2(), { kDispatch: l, kClose: u, kDestroy: d } = da$3(), f = Wa$3(), p = Sa$3(), { debuglog: m } = f$11(`node:util`), h = m(`undici:socks5-proxy`), g = Symbol(`proxy url`), _ = Symbol(`proxy headers`), v = Symbol(`proxy auth`), y = Symbol(`proxy protocol`), b = Symbol(`pools`), x = Symbol(`connector`), S = Symbol(`request tls settings`), C = !1; n.exports = class extends a { constructor(e, t = {}) { if (super(), C ||= (process.emitWarning(`SOCKS5 proxy support is experimental and subject to change`, `ExperimentalWarning`), !0), !e) throw new o(`Proxy URL is mandatory`); let n = typeof e == `string` ? new r(e) : e; if (n.protocol !== `socks5:` && n.protocol !== `socks:`) throw new o(`Proxy URL must use socks5:// or socks:// protocol`); this[g] = n, this[_] = t.headers || {}, this[y] = t.proxyTls ? `https:` : `http:`, this[S] = t.requestTls, this[v] = { username: t.username || (n.username ? decodeURIComponent(n.username) : null), password: t.password || (n.password ? decodeURIComponent(n.password) : null) }, this[x] = t.connect || p({ ...t.proxyTls, servername: t.proxyTls?.servername || n.hostname }), this[b] = /* @__PURE__ */ new Map(); } async createSocks5Connection(e, t) { let n = this[g].hostname, r = parseInt(this[g].port) || 1080; h(`creating SOCKS5 connection to`, n, r); let i = await new Promise((e, t) => { this[x]({ hostname: n, host: n, port: r, protocol: this[y] }, (n, r) => { n ? t(n) : e(r); }); }), a = new s(i, this[v]); return a.on(`error`, (e) => { h(`SOCKS5 error:`, e), i.destroy(); }), await a.handshake(), await new Promise((e, t) => { let n = setTimeout(() => { t(Error(`SOCKS5 authentication timeout`)); }, 5e3), r = () => { clearTimeout(n), a.removeListener(`error`, i), e(); }, i = (e) => { clearTimeout(n), a.removeListener(`authenticated`, r), t(e); }; a.state === c.AUTHENTICATED ? (clearTimeout(n), e()) : (a.once(`authenticated`, r), a.once(`error`, i)); }), await a.connect(e, t), await new Promise((n, r) => { let i = setTimeout(() => { r(Error(`SOCKS5 connection timeout`)); }, 5e3), o = (r) => { h(`SOCKS5 tunnel established to`, e, t, `via`, r), clearTimeout(i), a.removeListener(`error`, s), n(); }, s = (e) => { clearTimeout(i), a.removeListener(`connected`, o), r(e); }; a.once(`connected`, o), a.once(`error`, s); }), i; } [l](e, n) { let { origin: a } = e; h(`dispatching request to`, a, `via SOCKS5`); try { let o = String(a), s = this[b].get(o); return (!s || s.destroyed || s.closed) && (s = new f(a, { pipelining: e.pipelining, connections: e.connections, connect: async (e, n) => { try { let e = new r(a), o = e.hostname, s = parseInt(e.port) || (e.protocol === `https:` ? 443 : 80); h(`establishing SOCKS5 connection to`, o, s); let c = await this.createSocks5Connection(o, s), l = c; e.protocol === `https:` && (i ||= f$11(`node:tls`), h(`upgrading to TLS`), l = i.connect({ ...this[S], socket: c, servername: this[S]?.servername || o }), await new Promise((e, t) => { l.once(`secureConnect`, e), l.once(`error`, t); })), n(null, l); } catch (e) { h(`SOCKS5 connection error:`, e), n(e); } } }), this[b].set(o, s)), s[l](e, n); } catch (e) { if (h(`dispatch error:`, e), typeof n.onResponseError == `function`) return n.onResponseError(null, e), !1; if (typeof n.onError == `function`) return n.onError(e), !1; throw e; } } async [u]() { let e = []; for (let t of this[b].values()) e.push(t.close()); this[b].clear(), await Promise.all(e); } async [d](e) { let t = []; for (let n of this[b].values()) t.push(n.destroy(e)); this[b].clear(), await Promise.all(t); } }; })); var Za$2 = c$12(((e, t) => { let { kProxy: n, kClose: r, kDestroy: i, kDispatch: a } = da$3(), o = qa$3(), s = Wa$3(), c = xa$3(), { InvalidArgumentError: l, RequestAbortedError: u, SecureProxyConnectionError: d } = K$6(), f = Sa$3(), p = Va$3(), { channels: m } = ga$3(), h = Xa$2(), g = Symbol(`proxy agent`), _ = Symbol(`proxy client`), v = Symbol(`proxy headers`), y = Symbol(`request tls settings`), b = Symbol(`proxy tls settings`), x = Symbol(`connect endpoint function`), S = Symbol(`tunnel proxy`); function C(e) { return e === `https:` ? 443 : 80; } function w(e, t) { return new s(e, t); } let T = () => {}; function E(e, t) { return t.connections === 1 ? new p(e, t) : new s(e, t); } var D = class extends c { #e; constructor(e, { headers: t = {}, connect: n, factory: r }) { if (!e) throw new l(`Proxy URL is mandatory`); super(), this[v] = t, r ? this.#e = r(e, { connect: n }) : this.#e = new p(e, { connect: n }); } [a](e, t) { let n = t.onHeaders; t.onHeaders = function(e, r, i) { if (e === 407) { typeof t.onError == `function` && t.onError(new l(`Proxy Authentication Required (407)`)); return; } n && n.call(this, e, r, i); }; let { origin: r, path: i = `/`, headers: o = {} } = e; if (e.path = r + i, !(`host` in o) && !(`Host` in o)) { let { host: e } = new URL(r); o.host = e; } return e.headers = { ...this[v], ...o }, this.#e[a](e, t); } [r]() { return this.#e.close(); } [i](e) { return this.#e.destroy(e); } }, O = class extends c { constructor(e) { if (!e || typeof e == `object` && !(e instanceof URL) && !e.uri) throw new l(`Proxy uri is mandatory`); let { clientFactory: t = w } = e; if (typeof t != `function`) throw new l(`Proxy opts.clientFactory must be a function.`); let { proxyTunnel: r = !0 } = e; super(); let i = this.#e(e), { href: a, origin: s, port: c, protocol: p, username: O, password: k, hostname: A } = i; if (this[n] = { uri: a, protocol: p }, this[y] = e.requestTls, this[b] = e.proxyTls, this[v] = e.headers || {}, this[S] = r, e.auth && e.token) throw new l(`opts.auth cannot be used in combination with opts.token`); e.auth ? this[v][`proxy-authorization`] = `Basic ${e.auth}` : e.token ? this[v][`proxy-authorization`] = e.token : O && k && (this[v][`proxy-authorization`] = `Basic ${Buffer.from(`${decodeURIComponent(O)}:${decodeURIComponent(k)}`).toString(`base64`)}`); let j = f({ ...e.proxyTls }); this[x] = f({ ...e.requestTls }); let M = e.factory || E, N = (t, r) => { let { protocol: i } = new URL(t); return this[n].protocol === `socks5:` || this[n].protocol === `socks:` ? new h(this[n].uri, { headers: this[v], connect: j, factory: M, username: e.username || O, password: e.password || k, proxyTls: e.proxyTls, requestTls: e.requestTls }) : !this[S] && i === `http:` && this[n].protocol === `http:` ? new D(this[n].uri, { headers: this[v], connect: j, factory: M }) : M(t, r); }; p === `socks5:` || p === `socks:` ? this[_] = null : this[_] = t(i, { connect: j }), this[g] = new o({ ...e, factory: N, connect: async (e, t) => { if (!this[_]) { t(new l(`Cannot establish tunnel connection without a proxy client`)); return; } let n = e.host; e.port || (n += `:${C(e.protocol)}`); try { let r = { origin: s, port: c, path: n, signal: e.signal, headers: { ...this[v], host: e.host, ...e.connections == null || e.connections > 0 ? { "proxy-connection": `keep-alive` } : {} }, servername: this[b]?.servername || A }, { socket: i, statusCode: a } = await this[_].connect(r); if (a !== 200) { i.on(`error`, T).destroy(), t(new u(`Proxy response (${a}) !== 200 when HTTP Tunneling`)); return; } if (m.proxyConnected.hasSubscribers && m.proxyConnected.publish({ socket: i, connectParams: r }), e.protocol !== `https:`) { t(null, i); return; } let o; o = this[y] ? this[y].servername : e.servername, this[x]({ ...e, servername: o, httpSocket: i }, t); } catch (e) { e.code === `ERR_TLS_CERT_ALTNAME_INVALID` ? t(new d(e)) : t(e); } } }); } dispatch(e, t) { let n = k(e.headers); if (A(n), n && !(`host` in n) && !(`Host` in n)) { let { host: t } = new URL(e.origin); n.host = t; } return this[g].dispatch({ ...e, headers: n }, t); } #e(e) { return typeof e == `string` ? new URL(e) : e instanceof URL ? e : new URL(e.uri); } [r]() { let e = [this[g].close()]; return this[_] && e.push(this[_].close()), Promise.all(e); } [i]() { let e = [this[g].destroy()]; return this[_] && e.push(this[_].destroy()), Promise.all(e); } }; function k(e) { if (Array.isArray(e)) { let t = {}; for (let n = 0; n < e.length; n += 2) t[e[n]] = e[n + 1]; return t; } return e; } function A(e) { if (e && Object.keys(e).find((e) => e.toLowerCase() === `proxy-authorization`)) throw new l(`Proxy-Authorization should be sent in ProxyAgent constructor`); } t.exports = O; })); var Qa$2 = c$12(((e, t) => { let n = xa$3(), { kClose: r, kDestroy: i, kClosed: a, kDestroyed: o, kDispatch: s, kNoProxyAgent: c, kHttpProxyAgent: l, kHttpsProxyAgent: u } = da$3(), d = Za$2(), f = qa$3(), p = { "http:": 80, "https:": 443 }; t.exports = class extends n { #e = null; #t = null; #n = null; constructor(e = {}) { super(), this.#n = e; let { httpProxy: t, httpsProxy: n, noProxy: r, ...i } = e; this[c] = new f(i); let a = t ?? process.env.http_proxy ?? process.env.HTTP_PROXY; a ? this[l] = new d({ ...i, uri: a }) : this[l] = this[c]; let o = n ?? process.env.https_proxy ?? process.env.HTTPS_PROXY; o ? this[u] = new d({ ...i, uri: o }) : this[u] = this[l], this.#a(); } [s](e, t) { let n = new URL(e.origin); return this.#r(n).dispatch(e, t); } [r]() { return Promise.all([ this[c].close(), !this[l][a] && this[l].close(), !this[u][a] && this[u].close() ]); } [i](e) { return Promise.all([ this[c].destroy(e), !this[l][o] && this[l].destroy(e), !this[u][o] && this[u].destroy(e) ]); } #r(e) { let { protocol: t, host: n, port: r } = e; return n = n.replace(/:\d*$/, ``).toLowerCase(), r = Number.parseInt(r, 10) || p[t] || 0, this.#i(n, r) ? t === `https:` ? this[u] : this[l] : this[c]; } #i(e, t) { if (this.#o && this.#a(), this.#t.length === 0) return !0; if (this.#e === `*`) return !1; for (let n = 0; n < this.#t.length; n++) { let r = this.#t[n]; if (!(r.port && r.port !== t) && (e === r.hostname || e.slice(-(r.hostname.length + 1)) === `.${r.hostname}`)) return !1; } return !0; } #a() { let e = this.#n.noProxy ?? this.#s, t = e.split(/[,\s]/), n = []; for (let e = 0; e < t.length; e++) { let r = t[e]; if (!r) continue; let i = r.match(/^(.+):(\d+)$/); n.push({ hostname: (i ? i[1] : r).replace(/^\*?\./, ``).toLowerCase(), port: i ? Number.parseInt(i[2], 10) : 0 }); } this.#e = e, this.#t = n; } get #o() { return this.#n.noProxy === void 0 ? this.#e !== this.#s : !1; } get #s() { return process.env.no_proxy ?? process.env.NO_PROXY ?? ``; } }; })); var $a$2 = c$12(((e, n) => { let r = f$11(`node:assert`), { kRetryHandlerDefaultRetry: i } = da$3(), { RequestRetryError: a } = K$6(), o = va$3(), { isDisturbed: s, parseRangeHeader: c, wrapRequestBody: l } = q$6(); function u(e) { let t = new Date(e).getTime(); return isNaN(t) ? 0 : t - Date.now(); } n.exports = class e { constructor(t, { dispatch: n, handler: r }) { let { retryOptions: a, ...s } = t, { retry: c, maxRetries: u, maxTimeout: d, minTimeout: f, timeoutFactor: p, methods: m, errorCodes: h, retryAfter: g, statusCodes: _, throwOnError: v } = a ?? {}; this.error = null, this.dispatch = n, this.handler = o.wrap(r), this.opts = { ...s, body: l(t.body) }, this.retryOpts = { throwOnError: v ?? !0, retry: c ?? e[i], retryAfter: g ?? !0, maxTimeout: d ?? 30 * 1e3, minTimeout: f ?? 500, timeoutFactor: p ?? 2, maxRetries: u ?? 5, methods: m ?? [ `GET`, `HEAD`, `OPTIONS`, `PUT`, `DELETE`, `TRACE` ], statusCodes: _ ?? [ 500, 502, 503, 504, 429 ], errorCodes: h ?? [ `ECONNRESET`, `ECONNREFUSED`, `ENOTFOUND`, `ENETDOWN`, `ENETUNREACH`, `EHOSTDOWN`, `EHOSTUNREACH`, `EPIPE`, `UND_ERR_SOCKET` ] }, this.retryCount = 0, this.retryCountCheckpoint = 0, this.headersSent = !1, this.start = 0, this.end = null, this.etag = null; } onResponseStartWithRetry(e, t, n, r, i) { if (this.retryOpts.throwOnError) { this.retryOpts.statusCodes.includes(t) === !1 ? (this.headersSent = !0, this.handler.onResponseStart?.(e, t, n, r)) : this.error = i; return; } if (s(this.opts.body)) { this.headersSent = !0, this.handler.onResponseStart?.(e, t, n, r); return; } function a(a) { if (a) { this.headersSent = !0, this.handler.onResponseStart?.(e, t, n, r), e.resume(); return; } this.error = i, e.resume(); } e.pause(), this.retryOpts.retry(i, { state: { counter: this.retryCount }, opts: { retryOptions: this.retryOpts, ...this.opts } }, a.bind(this)); } onRequestStart(e, t) { this.headersSent || this.handler.onRequestStart?.(e, t); } onRequestUpgrade(e, t, n, r) { this.handler.onRequestUpgrade?.(e, t, n, r); } static [i](e, { state: t, opts: n }, r) { let { statusCode: i, code: a, headers: o } = e, { method: s, retryOptions: c } = n, { maxRetries: l, minTimeout: d, maxTimeout: f, timeoutFactor: p, statusCodes: m, errorCodes: h, methods: g } = c, { counter: _ } = t; if (a && a !== `UND_ERR_REQ_RETRY` && !h.includes(a)) { r(e); return; } if (Array.isArray(g) && !g.includes(s)) { r(e); return; } if (i != null && Array.isArray(m) && !m.includes(i)) { r(e); return; } if (_ > l) { r(e); return; } let v = o?.[`retry-after`]; v &&= (v = Number(v), Number.isNaN(v) ? u(o[`retry-after`]) : v * 1e3); let y = Math.min(v > 0 ? v : d * p ** (_ - 1), f); setTimeout(() => r(null), y); } onResponseStart(e, t, n, i) { if (this.error = null, this.retryCount += 1, t >= 300) { let r = new a(`Request failed`, t, { headers: n, data: { count: this.retryCount } }); this.onResponseStartWithRetry(e, t, n, i, r); return; } if (this.headersSent) { if (t !== 206 && (this.start > 0 || t !== 200)) throw new a(`server does not support the range header and the payload was partially consumed`, t, { headers: n, data: { count: this.retryCount } }); let e = c(n[`content-range`]); if (!e) throw new a(`Content-Range mismatch`, t, { headers: n, data: { count: this.retryCount } }); if (this.etag != null && this.etag !== n.etag) throw new a(`ETag mismatch`, t, { headers: n, data: { count: this.retryCount } }); let { start: i, size: o, end: s = o ? o - 1 : null } = e; r(this.start === i, `content-range mismatch`), r(this.end == null || this.end === s, `content-range mismatch`); return; } if (this.end == null) { if (t === 206) { let a = c(n[`content-range`]); if (a == null) { this.headersSent = !0, this.handler.onResponseStart?.(e, t, n, i); return; } let { start: o, size: s, end: l = s ? s - 1 : null } = a; r(o != null && Number.isFinite(o), `content-range mismatch`), r(l != null && Number.isFinite(l), `invalid content-length`), this.start = o, this.end = l; } if (this.end == null) { let e = n[`content-length`]; this.end = e == null ? null : Number(e) - 1; } r(Number.isFinite(this.start)), r(this.end == null || Number.isFinite(this.end), `invalid content-length`), this.resume = !0, this.etag = n.etag == null ? null : n.etag, this.etag != null && this.etag[0] === `W` && this.etag[1] === `/` && (this.etag = null), this.headersSent = !0, this.handler.onResponseStart?.(e, t, n, i); } else throw new a(`Request failed`, t, { headers: n, data: { count: this.retryCount } }); } onResponseData(e, t) { this.error || (this.start += t.length, this.handler.onResponseData?.(e, t)); } onResponseEnd(e, t) { if (this.error && this.retryOpts.throwOnError) throw this.error; if (!this.error) return this.retryCount = 0, this.handler.onResponseEnd?.(e, t); this.retry(e); } retry(e) { if (this.start !== 0) { let e = { range: `bytes=${this.start}-${this.end ?? ``}` }; this.etag != null && (e[`if-match`] = this.etag), this.opts = { ...this.opts, headers: { ...this.opts.headers, ...e } }; } try { this.retryCountCheckpoint = this.retryCount, this.dispatch(this.opts, this); } catch (t) { this.handler.onResponseError?.(e, t); } } onResponseError(e, t) { if (e?.aborted || s(this.opts.body)) { this.handler.onResponseError?.(e, t); return; } function n(t) { if (!t) { this.retry(e); return; } this.handler?.onResponseError?.(e, t); } this.retryCount - this.retryCountCheckpoint > 0 ? this.retryCount = this.retryCountCheckpoint + (this.retryCount - this.retryCountCheckpoint) : this.retryCount += 1, this.retryOpts.retry(t, { state: { counter: this.retryCount }, opts: { retryOptions: this.retryOpts, ...this.opts } }, n.bind(this)); } }; })); var eo$2 = c$12(((e, t) => { let n = ya$3(), r = $a$2(); t.exports = class extends n { #e = null; #t = null; constructor(e, t = {}) { super(t), this.#e = e, this.#t = t; } dispatch(e, t) { let n = new r({ ...e, retryOptions: this.#t }, { dispatch: this.#e.dispatch.bind(this.#e), handler: t }); return this.#e.dispatch(e, n); } close() { return this.#e.close(); } destroy() { return this.#e.destroy(); } }; })); var to$2 = c$12(((e, t) => { let { InvalidArgumentError: n } = K$6(), r = Va$3(); t.exports = class extends r { constructor(e, t) { if (typeof e == `string` && (e = new URL(e)), e.protocol !== `http:`) throw new n(`h2c-client: Only h2c protocol is supported`); let { maxConcurrentStreams: r, pipelining: i, ...a } = t ?? {}, o = 100, s = 100; if (r != null && Number.isInteger(r) && r > 0 && (o = r), i != null && Number.isInteger(i) && i > 0 && (s = i), s > o) throw new n(`h2c-client: pipelining cannot be greater than maxConcurrentStreams`); super(e, { ...a, maxConcurrentStreams: o, pipelining: s, allowH2: !0, useH2c: !0 }); } }; })); var no$1 = c$12(((e, n) => { let r = f$11(`node:assert`), { Readable: i } = f$11(`node:stream`), { RequestAbortedError: a, NotSupportedError: o, InvalidArgumentError: s, AbortError: c } = K$6(), l = q$6(), { ReadableStreamFrom: u } = q$6(), d = Symbol(`kConsume`), f = Symbol(`kReading`), p = Symbol(`kBody`), m = Symbol(`kAbort`), h = Symbol(`kContentType`), g = Symbol(`kContentLength`), _ = Symbol(`kUsed`), v = Symbol(`kBytesRead`), y = () => {}; var b = class extends i { constructor({ resume: e, abort: t, contentType: n = ``, contentLength: r, highWaterMark: i = 64 * 1024 }) { super({ autoDestroy: !0, read: e, highWaterMark: i }), this._readableState.dataEmitted = !1, this[m] = t, this[d] = null, this[v] = 0, this[p] = null, this[_] = !1, this[h] = n, this[g] = Number.isFinite(r) ? r : null, this[f] = !1; } _destroy(e, t) { !e && !this._readableState.endEmitted && (e = new a()), e && this[m](), this[_] ? t(e) : setImmediate(t, e); } on(e, t) { return (e === `data` || e === `readable`) && (this[f] = !0, this[_] = !0), super.on(e, t); } addListener(e, t) { return this.on(e, t); } off(e, t) { let n = super.off(e, t); return (e === `data` || e === `readable`) && (this[f] = this.listenerCount(`data`) > 0 || this.listenerCount(`readable`) > 0), n; } removeListener(e, t) { return this.off(e, t); } push(e) { return e && (this[v] += e.length, this[d]) ? (O(this[d], e), this[f] ? super.push(e) : !0) : super.push(e); } text() { return C(this, `text`); } json() { return C(this, `json`); } blob() { return C(this, `blob`); } bytes() { return C(this, `bytes`); } arrayBuffer() { return C(this, `arrayBuffer`); } async formData() { throw new o(); } get bodyUsed() { return l.isDisturbed(this); } get body() { return this[p] || (this[p] = u(this), this[d] && (this[p].getReader(), r(this[p].locked))), this[p]; } dump(e) { let t = e?.signal; if (t != null && (typeof t != `object` || !(`aborted` in t))) return Promise.reject(new s(`signal must be an AbortSignal`)); let n = e?.limit && Number.isFinite(e.limit) ? e.limit : 128 * 1024; return t?.aborted ? Promise.reject(t.reason ?? new c()) : this._readableState.closeEmitted ? Promise.resolve(null) : new Promise((e, r) => { if ((this[g] && this[g] > n || this[v] > n) && this.destroy(new c()), t) { let n = () => { this.destroy(t.reason ?? new c()); }; t.addEventListener(`abort`, n), this.on(`close`, function() { t.removeEventListener(`abort`, n), t.aborted ? r(t.reason ?? new c()) : e(null); }); } else this.on(`close`, e); this.on(`error`, y).on(`data`, () => { this[v] > n && this.destroy(); }).resume(); }); } setEncoding(e) { return Buffer.isEncoding(e) && (this._readableState.encoding = e), this; } }; function x(e) { return e[p]?.locked === !0 || e[d] !== null; } function S(e) { return l.isDisturbed(e) || x(e); } function C(e, t) { return r(!e[d]), new Promise((n, r) => { if (S(e)) { let t = e._readableState; t.destroyed && t.closeEmitted === !1 ? e.on(`error`, r).on(`close`, () => { r(TypeError(`unusable`)); }) : r(t.errored ?? TypeError(`unusable`)); } else queueMicrotask(() => { e[d] = { type: t, stream: e, resolve: n, reject: r, length: 0, body: [] }, e.on(`error`, function(e) { k(this[d], e); }).on(`close`, function() { this[d].body !== null && k(this[d], new a()); }), w(e[d]); }); }); } function w(e) { if (e.body === null) return; let { _readableState: t } = e.stream; if (t.bufferIndex) { let n = t.bufferIndex, r = t.buffer.length; for (let i = n; i < r; i++) O(e, t.buffer[i]); } else for (let n of t.buffer) O(e, n); for (t.endEmitted ? D(this[d], this._readableState.encoding) : e.stream.on(`end`, function() { D(this[d], this._readableState.encoding); }), e.stream.resume(); e.stream.read() != null;); } function T(e, t, n) { if (e.length === 0 || t === 0) return ``; let r = e.length === 1 ? e[0] : Buffer.concat(e, t), i = r.length, a = i > 2 && r[0] === 239 && r[1] === 187 && r[2] === 191 ? 3 : 0; return !n || n === `utf8` || n === `utf-8` ? r.utf8Slice(a, i) : r.subarray(a, i).toString(n); } function E(e, t) { if (e.length === 0 || t === 0) return /* @__PURE__ */ new Uint8Array(); if (e.length === 1) return new Uint8Array(e[0]); let n = new Uint8Array(Buffer.allocUnsafeSlow(t).buffer), r = 0; for (let t = 0; t < e.length; ++t) { let i = e[t]; n.set(i, r), r += i.length; } return n; } function D(e, t) { let { type: n, body: r, resolve: i, stream: a, length: o } = e; try { n === `text` ? i(T(r, o, t)) : n === `json` ? i(JSON.parse(T(r, o, t))) : n === `arrayBuffer` ? i(E(r, o).buffer) : n === `blob` ? i(new Blob(r, { type: a[h] })) : n === `bytes` && i(E(r, o)), k(e); } catch (e) { a.destroy(e); } } function O(e, t) { e.length += t.length, e.body.push(t); } function k(e, t) { e.body !== null && (t ? e.reject(t) : e.resolve(), e.type = null, e.stream = null, e.resolve = null, e.reject = null, e.length = 0, e.body = null); } n.exports = { Readable: b, chunksDecode: T }; })); var ro$1 = c$12(((e, n) => { let r = f$11(`node:assert`), { AsyncResource: i } = f$11(`node:async_hooks`), { Readable: a } = no$1(), { InvalidArgumentError: o, RequestAbortedError: s } = K$6(), c = q$6(); function l() {} var u = class extends i { constructor(e, t) { if (!e || typeof e != `object`) throw new o(`invalid opts`); let { signal: n, method: r, opaque: i, body: a, onInfo: u, responseHeaders: d, highWaterMark: f } = e; try { if (typeof t != `function`) throw new o(`invalid callback`); if (f != null && (!Number.isFinite(f) || f < 0)) throw new o(`invalid highWaterMark`); if (n && typeof n.on != `function` && typeof n.addEventListener != `function`) throw new o(`signal must be an EventEmitter or EventTarget`); if (r === `CONNECT`) throw new o(`invalid method`); if (u && typeof u != `function`) throw new o(`invalid onInfo callback`); super(`UNDICI_REQUEST`); } catch (e) { throw c.isStream(a) && c.destroy(a.on(`error`, l), e), e; } this.method = r, this.responseHeaders = d || null, this.opaque = i || null, this.callback = t, this.res = null, this.abort = null, this.body = a, this.trailers = {}, this.context = null, this.onInfo = u || null, this.highWaterMark = f, this.reason = null, this.removeAbortListener = null, n?.aborted ? this.reason = n.reason ?? new s() : n && (this.removeAbortListener = c.addAbortListener(n, () => { this.reason = n.reason ?? new s(), this.res ? c.destroy(this.res.on(`error`, l), this.reason) : this.abort && this.abort(this.reason); })); } onConnect(e, t) { if (this.reason) { e(this.reason); return; } r(this.callback), this.abort = e, this.context = t; } onHeaders(e, t, n, r) { let { callback: i, opaque: o, abort: s, context: u, responseHeaders: d, highWaterMark: f } = this, p = d === `raw` ? c.parseRawHeaders(t) : c.parseHeaders(t); if (e < 200) { this.onInfo && this.onInfo({ statusCode: e, headers: p }); return; } let m = d === `raw` ? c.parseHeaders(t) : p, h = m[`content-type`], g = m[`content-length`], _ = new a({ resume: n, abort: s, contentType: h, contentLength: this.method !== `HEAD` && g ? Number(g) : null, highWaterMark: f }); if (this.removeAbortListener &&= (_.on(`close`, this.removeAbortListener), null), this.callback = null, this.res = _, i !== null) try { this.runInAsyncScope(i, null, null, { statusCode: e, statusText: r, headers: p, trailers: this.trailers, opaque: o, body: _, context: u }); } catch (e) { this.res = null, c.destroy(_.on(`error`, l), e), queueMicrotask(() => { throw e; }); } } onData(e) { return this.res.push(e); } onComplete(e) { c.parseHeaders(e, this.trailers), this.res.push(null); } onError(e) { let { res: t, callback: n, body: r, opaque: i } = this; n && (this.callback = null, queueMicrotask(() => { this.runInAsyncScope(n, null, e, { opaque: i }); })), t && (this.res = null, queueMicrotask(() => { c.destroy(t.on(`error`, l), e); })), r && (this.body = null, c.isStream(r) && (r.on(`error`, l), c.destroy(r, e))), this.removeAbortListener &&= (this.removeAbortListener(), null); } }; function d(e, t) { if (t === void 0) return new Promise((t, n) => { d.call(this, e, (e, r) => e ? n(e) : t(r)); }); try { let n = new u(e, t); this.dispatch(e, n); } catch (n) { if (typeof t != `function`) throw n; let r = e?.opaque; queueMicrotask(() => t(n, { opaque: r })); } } n.exports = d, n.exports.RequestHandler = u; })); var io$1 = c$12(((e, t) => { let { addAbortListener: n } = q$6(), { RequestAbortedError: r } = K$6(), i = Symbol(`kListener`), a = Symbol(`kSignal`); function o(e) { e.abort ? e.abort(e[a]?.reason) : e.reason = e[a]?.reason ?? new r(), c(e); } function s(e, t) { if (e.reason = null, e[a] = null, e[i] = null, t) { if (t.aborted) { o(e); return; } e[a] = t, e[i] = () => { o(e); }, n(e[a], e[i]); } } function c(e) { e[a] && (`removeEventListener` in e[a] ? e[a].removeEventListener(`abort`, e[i]) : e[a].removeListener(`abort`, e[i]), e[a] = null, e[i] = null); } t.exports = { addSignal: s, removeSignal: c }; })); var ao$1 = c$12(((e, n) => { let r = f$11(`node:assert`), { finished: i } = f$11(`node:stream`), { AsyncResource: a } = f$11(`node:async_hooks`), { InvalidArgumentError: o, InvalidReturnValueError: s } = K$6(), c = q$6(), { addSignal: l, removeSignal: u } = io$1(); function d() {} var f = class extends a { constructor(e, t, n) { if (!e || typeof e != `object`) throw new o(`invalid opts`); let { signal: r, method: i, opaque: a, body: s, onInfo: u, responseHeaders: f } = e; try { if (typeof n != `function`) throw new o(`invalid callback`); if (typeof t != `function`) throw new o(`invalid factory`); if (r && typeof r.on != `function` && typeof r.addEventListener != `function`) throw new o(`signal must be an EventEmitter or EventTarget`); if (i === `CONNECT`) throw new o(`invalid method`); if (u && typeof u != `function`) throw new o(`invalid onInfo callback`); super(`UNDICI_STREAM`); } catch (e) { throw c.isStream(s) && c.destroy(s.on(`error`, d), e), e; } this.responseHeaders = f || null, this.opaque = a || null, this.factory = t, this.callback = n, this.res = null, this.abort = null, this.context = null, this.trailers = null, this.body = s, this.onInfo = u || null, c.isStream(s) && s.on(`error`, (e) => { this.onError(e); }), l(this, r); } onConnect(e, t) { if (this.reason) { e(this.reason); return; } r(this.callback), this.abort = e, this.context = t; } onHeaders(e, t, n, r) { let { factory: a, opaque: o, context: l, responseHeaders: u } = this, d = u === `raw` ? c.parseRawHeaders(t) : c.parseHeaders(t); if (e < 200) { this.onInfo && this.onInfo({ statusCode: e, headers: d }); return; } if (this.factory = null, a === null) return; let f = this.runInAsyncScope(a, null, { statusCode: e, headers: d, opaque: o, context: l }); if (!f || typeof f.write != `function` || typeof f.end != `function` || typeof f.on != `function`) throw new s(`expected Writable`); return i(f, { readable: !1 }, (e) => { let { callback: t, res: n, opaque: r, trailers: i, abort: a } = this; this.res = null, (e || !n?.readable) && c.destroy(n, e), this.callback = null, this.runInAsyncScope(t, null, e || null, { opaque: r, trailers: i }), e && a(); }), f.on(`drain`, n), this.res = f, (f.writableNeedDrain === void 0 ? f._writableState?.needDrain : f.writableNeedDrain) !== !0; } onData(e) { let { res: t } = this; return t ? t.write(e) : !0; } onComplete(e) { let { res: t } = this; u(this), t && (this.trailers = c.parseHeaders(e), t.end()); } onError(e) { let { res: t, callback: n, opaque: r, body: i } = this; u(this), this.factory = null, t ? (this.res = null, c.destroy(t, e)) : n && (this.callback = null, queueMicrotask(() => { this.runInAsyncScope(n, null, e, { opaque: r }); })), i && (this.body = null, c.destroy(i, e)); } }; function p(e, t, n) { if (n === void 0) return new Promise((n, r) => { p.call(this, e, t, (e, t) => e ? r(e) : n(t)); }); try { let r = new f(e, t, n); this.dispatch(e, r); } catch (t) { if (typeof n != `function`) throw t; let r = e?.opaque; queueMicrotask(() => n(t, { opaque: r })); } } n.exports = p; })); var oo$1 = c$12(((e, n) => { let { Readable: r, Duplex: i, PassThrough: a } = f$11(`node:stream`), o = f$11(`node:assert`), { AsyncResource: s } = f$11(`node:async_hooks`), { InvalidArgumentError: c, InvalidReturnValueError: l, RequestAbortedError: u } = K$6(), d = q$6(), { addSignal: f, removeSignal: p } = io$1(); function m() {} let h = Symbol(`resume`); var g = class extends r { constructor() { super({ autoDestroy: !0 }), this[h] = null; } _read() { let { [h]: e } = this; e && (this[h] = null, e()); } _destroy(e, t) { this._read(), t(e); } }, _ = class extends r { constructor(e) { super({ autoDestroy: !0 }), this[h] = e; } _read() { this[h](); } _destroy(e, t) { !e && !this._readableState.endEmitted && (e = new u()), t(e); } }, v = class extends s { constructor(e, t) { if (!e || typeof e != `object`) throw new c(`invalid opts`); if (typeof t != `function`) throw new c(`invalid handler`); let { signal: n, method: r, opaque: a, onInfo: o, responseHeaders: s } = e; if (n && typeof n.on != `function` && typeof n.addEventListener != `function`) throw new c(`signal must be an EventEmitter or EventTarget`); if (r === `CONNECT`) throw new c(`invalid method`); if (o && typeof o != `function`) throw new c(`invalid onInfo callback`); super(`UNDICI_PIPELINE`), this.opaque = a || null, this.responseHeaders = s || null, this.handler = t, this.abort = null, this.context = null, this.onInfo = o || null, this.req = new g().on(`error`, m), this.ret = new i({ readableObjectMode: e.objectMode, autoDestroy: !0, read: () => { let { body: e } = this; e?.resume && e.resume(); }, write: (e, t, n) => { let { req: r } = this; r.push(e, t) || r._readableState.destroyed ? n() : r[h] = n; }, destroy: (e, t) => { let { body: n, req: r, res: i, ret: a, abort: o } = this; !e && !a._readableState.endEmitted && (e = new u()), o && e && o(), d.destroy(n, e), d.destroy(r, e), d.destroy(i, e), p(this), t(e); } }).on(`prefinish`, () => { let { req: e } = this; e.push(null); }), this.res = null, f(this, n); } onConnect(e, t) { let { res: n } = this; if (this.reason) { e(this.reason); return; } o(!n, `pipeline cannot be retried`), this.abort = e, this.context = t; } onHeaders(e, t, n) { let { opaque: r, handler: i, context: a } = this; if (e < 200) { if (this.onInfo) { let n = this.responseHeaders === `raw` ? d.parseRawHeaders(t) : d.parseHeaders(t); this.onInfo({ statusCode: e, headers: n }); } return; } this.res = new _(n); let o; try { this.handler = null; let n = this.responseHeaders === `raw` ? d.parseRawHeaders(t) : d.parseHeaders(t); o = this.runInAsyncScope(i, null, { statusCode: e, headers: n, opaque: r, body: this.res, context: a }); } catch (e) { throw this.res.on(`error`, m), e; } if (!o || typeof o.on != `function`) throw new l(`expected Readable`); o.on(`data`, (e) => { let { ret: t, body: n } = this; !t.push(e) && n.pause && n.pause(); }).on(`error`, (e) => { let { ret: t } = this; d.destroy(t, e); }).on(`end`, () => { let { ret: e } = this; e.push(null); }).on(`close`, () => { let { ret: e } = this; e._readableState.ended || d.destroy(e, new u()); }), this.body = o; } onData(e) { let { res: t } = this; return t.push(e); } onComplete(e) { let { res: t } = this; t.push(null); } onError(e) { let { ret: t } = this; this.handler = null, d.destroy(t, e); } }; function y(e, t) { try { let n = new v(e, t); return this.dispatch({ ...e, body: n.req }, n), n.ret; } catch (e) { return new a().destroy(e); } } n.exports = y; })); var so$1 = c$12(((e, n) => { let { InvalidArgumentError: r, SocketError: i } = K$6(), { AsyncResource: a } = f$11(`node:async_hooks`), o = f$11(`node:assert`), s = q$6(), { kHTTP2Stream: c } = da$3(), { addSignal: l, removeSignal: u } = io$1(); var d = class extends a { constructor(e, t) { if (!e || typeof e != `object`) throw new r(`invalid opts`); if (typeof t != `function`) throw new r(`invalid callback`); let { signal: n, opaque: i, responseHeaders: a } = e; if (n && typeof n.on != `function` && typeof n.addEventListener != `function`) throw new r(`signal must be an EventEmitter or EventTarget`); super(`UNDICI_UPGRADE`), this.responseHeaders = a || null, this.opaque = i || null, this.callback = t, this.abort = null, this.context = null, l(this, n); } onConnect(e, t) { if (this.reason) { e(this.reason); return; } o(this.callback), this.abort = e, this.context = null; } onHeaders() { throw new i(`bad upgrade`, null); } onUpgrade(e, t, n) { o(n[c] === !0 ? e === 200 : e === 101); let { callback: r, opaque: i, context: a } = this; u(this), this.callback = null; let l = this.responseHeaders === `raw` ? s.parseRawHeaders(t) : s.parseHeaders(t); this.runInAsyncScope(r, null, null, { headers: l, socket: n, opaque: i, context: a }); } onError(e) { let { callback: t, opaque: n } = this; u(this), t && (this.callback = null, queueMicrotask(() => { this.runInAsyncScope(t, null, e, { opaque: n }); })); } }; function f(e, t) { if (t === void 0) return new Promise((t, n) => { f.call(this, e, (e, r) => e ? n(e) : t(r)); }); try { let n = new d(e, t), r = { ...e, method: e.method || `GET`, upgrade: e.protocol || `Websocket` }; this.dispatch(r, n); } catch (n) { if (typeof t != `function`) throw n; let r = e?.opaque; queueMicrotask(() => t(n, { opaque: r })); } } n.exports = f; })); var co$1 = c$12(((e, n) => { let r = f$11(`node:assert`), { AsyncResource: i } = f$11(`node:async_hooks`), { InvalidArgumentError: a, SocketError: o } = K$6(), s = q$6(), { addSignal: c, removeSignal: l } = io$1(); var u = class extends i { constructor(e, t) { if (!e || typeof e != `object`) throw new a(`invalid opts`); if (typeof t != `function`) throw new a(`invalid callback`); let { signal: n, opaque: r, responseHeaders: i } = e; if (n && typeof n.on != `function` && typeof n.addEventListener != `function`) throw new a(`signal must be an EventEmitter or EventTarget`); super(`UNDICI_CONNECT`), this.opaque = r || null, this.responseHeaders = i || null, this.callback = t, this.abort = null, c(this, n); } onConnect(e, t) { if (this.reason) { e(this.reason); return; } r(this.callback), this.abort = e, this.context = t; } onHeaders() { throw new o(`bad connect`, null); } onUpgrade(e, t, n) { let { callback: r, opaque: i, context: a } = this; l(this), this.callback = null; let o = t; o != null && (o = this.responseHeaders === `raw` ? s.parseRawHeaders(t) : s.parseHeaders(t)), this.runInAsyncScope(r, null, null, { statusCode: e, headers: o, socket: n, opaque: i, context: a }); } onError(e) { let { callback: t, opaque: n } = this; l(this), t && (this.callback = null, queueMicrotask(() => { this.runInAsyncScope(t, null, e, { opaque: n }); })); } }; function d(e, t) { if (t === void 0) return new Promise((t, n) => { d.call(this, e, (e, r) => e ? n(e) : t(r)); }); try { let n = new u(e, t), r = { ...e, method: `CONNECT` }; this.dispatch(r, n); } catch (n) { if (typeof t != `function`) throw n; let r = e?.opaque; queueMicrotask(() => t(n, { opaque: r })); } } n.exports = d; })); var lo$1 = c$12(((e, t) => { t.exports.request = ro$1(), t.exports.stream = ao$1(), t.exports.pipeline = oo$1(), t.exports.upgrade = so$1(), t.exports.connect = co$1(); })); var uo$1 = c$12(((e, t) => { let { UndiciError: n } = K$6(), r = Symbol.for(`undici.error.UND_MOCK_ERR_MOCK_NOT_MATCHED`); t.exports = { MockNotMatchedError: class extends n { constructor(e) { super(e), this.name = `MockNotMatchedError`, this.message = e || `The request does not match any registered mock dispatches`, this.code = `UND_MOCK_ERR_MOCK_NOT_MATCHED`; } static [Symbol.hasInstance](e) { return e && e[r] === !0; } get [r]() { return !0; } } }; })); var fo$1 = c$12(((e, t) => { t.exports = { kAgent: Symbol(`agent`), kOptions: Symbol(`options`), kFactory: Symbol(`factory`), kDispatches: Symbol(`dispatches`), kDispatchKey: Symbol(`dispatch key`), kDefaultHeaders: Symbol(`default headers`), kDefaultTrailers: Symbol(`default trailers`), kContentLength: Symbol(`content length`), kMockAgent: Symbol(`mock agent`), kMockAgentSet: Symbol(`mock agent set`), kMockAgentGet: Symbol(`mock agent get`), kMockDispatch: Symbol(`mock dispatch`), kClose: Symbol(`close`), kOriginalClose: Symbol(`original agent close`), kOriginalDispatch: Symbol(`original dispatch`), kOrigin: Symbol(`origin`), kIsMockActive: Symbol(`is mock active`), kNetConnect: Symbol(`net connect`), kGetNetConnect: Symbol(`get net connect`), kConnected: Symbol(`connected`), kIgnoreTrailingSlash: Symbol(`ignore trailing slash`), kMockAgentMockCallHistoryInstance: Symbol(`mock agent mock call history name`), kMockAgentRegisterCallHistory: Symbol(`mock agent register mock call history`), kMockAgentAddCallHistoryLog: Symbol(`mock agent add call history log`), kMockAgentIsCallHistoryEnabled: Symbol(`mock agent is call history enabled`), kMockAgentAcceptsNonStandardSearchParameters: Symbol(`mock agent accepts non standard search parameters`), kMockCallHistoryAddLog: Symbol(`mock call history add log`), kTotalDispatchCount: Symbol(`total dispatch count`) }; })); var po$1 = c$12(((e, n) => { let { MockNotMatchedError: r } = uo$1(), { kDispatches: i, kMockAgent: a, kOriginalDispatch: o, kOrigin: s, kGetNetConnect: c, kTotalDispatchCount: l } = fo$1(), { serializePathWithQuery: u } = q$6(), { STATUS_CODES: d } = f$11(`node:http`), { types: { isPromise: f } } = f$11(`node:util`), { InvalidArgumentError: p } = K$6(); function m(e, t) { return typeof e == `string` ? e === t : e instanceof RegExp ? e.test(t) : typeof e == `function` ? e(t) === !0 : !1; } function h(e) { return Object.fromEntries(Object.entries(e).map(([e, t]) => [e.toLocaleLowerCase(), t])); } function g(e, t) { if (Array.isArray(e)) { for (let n = 0; n < e.length; n += 2) if (e[n].toLocaleLowerCase() === t.toLocaleLowerCase()) return e[n + 1]; return; } else if (typeof e.get == `function`) return e.get(t); else return h(e)[t.toLocaleLowerCase()]; } function _(e) { let t = e.slice(), n = []; for (let e = 0; e < t.length; e += 2) n.push([t[e], t[e + 1]]); return Object.fromEntries(n); } function v(e, t) { if (typeof e.headers == `function`) return Array.isArray(t) && (t = _(t)), e.headers(t ? h(t) : {}); if (e.headers === void 0) return !0; if (typeof t != `object` || typeof e.headers != `object`) return !1; for (let [n, r] of Object.entries(e.headers)) if (!m(r, g(t, n))) return !1; return !0; } function y(e) { if (typeof e != `string`) return e; let t = new URLSearchParams(e), n = new URLSearchParams(); for (let [e, r] of t.entries()) { if (e = e.replace(`[]`, ``), /^(['"]).*\1$/.test(r)) { n.append(e, r); continue; } if (r.includes(`,`)) { let t = r.split(`,`); for (let r of t) n.append(e, r); continue; } n.append(e, r); } return n; } function b(e) { if (typeof e != `string`) return e; let t = e.split(`?`, 3); if (t.length !== 2) return e; let n = new URLSearchParams(t.pop()); return n.sort(), [...t, n.toString()].join(`?`); } function x(e, { path: t, method: n, body: r, headers: i }) { let a = m(e.path, t), o = m(e.method, n), s = e.body === void 0 ? !0 : m(e.body, r), c = v(e, i); return a && o && s && c; } function S(e) { return Buffer.isBuffer(e) || e instanceof Uint8Array || e instanceof ArrayBuffer ? e : typeof e == `object` ? JSON.stringify(e) : e ? e.toString() : ``; } function C(e, t) { let n = t.query ? u(t.path, t.query) : t.path, i = typeof n == `string` ? b(n) : n, a = E(i), o = e.filter(({ consumed: e }) => !e).filter(({ path: e, ignoreTrailingSlash: t }) => t ? m(E(b(e)), a) : m(b(e), i)); if (o.length === 0) throw new r(`Mock dispatch not matched for path '${i}'`); if (o = o.filter(({ method: e }) => m(e, t.method)), o.length === 0) throw new r(`Mock dispatch not matched for method '${t.method}' on path '${i}'`); if (o = o.filter(({ body: e }) => e === void 0 ? !0 : m(e, t.body)), o.length === 0) throw new r(`Mock dispatch not matched for body '${t.body}' on path '${i}'`); if (o = o.filter((e) => v(e, t.headers)), o.length === 0) throw new r(`Mock dispatch not matched for headers '${typeof t.headers == `object` ? JSON.stringify(t.headers) : t.headers}' on path '${i}'`); return o[0]; } function w(e, t, n, r) { let i = { timesInvoked: 0, times: 1, persist: !1, consumed: !1, ...r }, a = typeof n == `function` ? { callback: n } : { ...n }, o = { ...i, ...t, pending: !0, data: { error: null, ...a } }; return e.push(o), e[l] = (e[l] || 0) + 1, o; } function T(e, t) { let n = e.findIndex((e) => e.consumed ? x(e, t) : !1); n !== -1 && e.splice(n, 1); } function E(e) { for (; e.endsWith(`/`);) e = e.slice(0, -1); return e.length === 0 && (e = `/`), e; } function D(e) { let { path: t, method: n, body: r, headers: i, query: a } = e; return { path: t, method: n, body: r, headers: i, query: a }; } function O(e) { let t = Object.keys(e), n = []; for (let r = 0; r < t.length; ++r) { let i = t[r], a = e[i], o = Buffer.from(`${i}`); if (Array.isArray(a)) for (let e = 0; e < a.length; ++e) n.push(o, Buffer.from(`${a[e]}`)); else n.push(o, Buffer.from(`${a}`)); } return n; } function k(e) { return d[e] || `unknown`; } async function A(e) { let t = []; for await (let n of e) t.push(n); return Buffer.concat(t).toString(`utf8`); } function j(e, t) { let n = D(e), r = C(this[i], n); r.timesInvoked++, r.data.callback && (r.data = { ...r.data, ...r.data.callback(e) }); let { data: { statusCode: a, data: o, headers: s, trailers: c, error: l }, delay: u, persist: d } = r, { timesInvoked: p, times: m } = r; if (r.consumed = !d && p >= m, r.pending = p < m, l !== null) return T(this[i], n), t.onError(l), !0; let h = !1, g = null; function v(e) { h || (h = !0, g !== null && (clearTimeout(g), g = null), t.onError(e)); } t.onConnect?.(v, null), typeof u == `number` && u > 0 ? g = setTimeout(() => { g = null, y(this[i]); }, u) : y(this[i]); function y(r, i = o) { if (h) return; let l = Array.isArray(e.headers) ? _(e.headers) : e.headers, u = typeof i == `function` ? i({ ...e, headers: l }) : i; if (f(u)) return u.then((e) => y(r, e)); if (h) return; let d = S(u), p = O(s), m = O(c); t.onHeaders?.(a, p, b, k(a)), t.onData?.(Buffer.from(d)), t.onComplete?.(m), T(r, n); } function b() {} return !0; } function M() { let e = this[a], t = this[s], n = this[o]; return function(a, o) { if (e.isMockActive) try { j.call(this, a, o); } catch (s) { if (s.code === `UND_MOCK_ERR_MOCK_NOT_MATCHED`) { let u = e[c](), d = this[i][l] || this[i].length, f = `, ${this[i].filter(({ consumed: e }) => !e).length} interceptor(s) remaining out of ${d} defined`; if (u === !1) throw new r(`${s.message}: subsequent request to origin ${t} was not allowed (net.connect disabled)${f}`); if (N(u, t)) n.call(this, a, o); else throw new r(`${s.message}: subsequent request to origin ${t} was not allowed (net.connect is not enabled for this origin)${f}`); } else throw s; } else n.call(this, a, o); }; } function N(e, t) { let n = new URL(t); return e === !0 ? !0 : !!(Array.isArray(e) && e.some((e) => m(e, n.host))); } function P(e) { return typeof e != `string` && !(e instanceof URL) ? e : e instanceof URL ? e.origin : e.toLowerCase(); } function F(e) { let { agent: t, ...n } = e; if (`enableCallHistory` in n && typeof n.enableCallHistory != `boolean`) throw new p(`options.enableCallHistory must to be a boolean`); if (`acceptNonStandardSearchParameters` in n && typeof n.acceptNonStandardSearchParameters != `boolean`) throw new p(`options.acceptNonStandardSearchParameters must to be a boolean`); if (`ignoreTrailingSlash` in n && typeof n.ignoreTrailingSlash != `boolean`) throw new p(`options.ignoreTrailingSlash must to be a boolean`); return n; } n.exports = { getResponseData: S, getMockDispatch: C, addMockDispatch: w, deleteMockDispatch: T, buildKey: D, generateKeyValues: O, matchValue: m, getResponse: A, getStatusText: k, mockDispatch: j, buildMockDispatch: M, checkNetConnect: N, buildAndValidateMockOptions: F, getHeaderByName: g, buildHeadersFromArray: _, normalizeSearchParams: y, normalizeOrigin: P }; })); var mo$1 = c$12(((e, t) => { let { getResponseData: n, buildKey: r, addMockDispatch: i } = po$1(), { kDispatches: a, kDispatchKey: o, kDefaultHeaders: s, kDefaultTrailers: c, kContentLength: l, kMockDispatch: u, kIgnoreTrailingSlash: d } = fo$1(), { InvalidArgumentError: f } = K$6(), { serializePathWithQuery: p } = q$6(); var m = class { constructor(e) { this[u] = e; } delay(e) { if (typeof e != `number` || !Number.isInteger(e) || e <= 0) throw new f(`waitInMs must be a valid integer > 0`); return this[u].delay = e, this; } persist() { return this[u].persist = !0, this; } times(e) { if (typeof e != `number` || !Number.isInteger(e) || e <= 0) throw new f(`repeatTimes must be a valid integer > 0`); return this[u].times = e, this; } }, h = class { constructor(e, t) { if (typeof e != `object`) throw new f(`opts must be an object`); if (e.path === void 0) throw new f(`opts.path must be defined`); if (e.method === void 0 && (e.method = `GET`), typeof e.path == `string`) if (e.query) e.path = p(e.path, e.query); else { let t = new URL(e.path, `data://`); e.path = t.pathname + t.search; } typeof e.method == `string` && (e.method = e.method.toUpperCase()), this[o] = r(e), this[a] = t, this[d] = e.ignoreTrailingSlash ?? !1, this[s] = {}, this[c] = {}, this[l] = !1; } createMockScopeDispatchData({ statusCode: e, data: t, responseOptions: r }) { let i = n(t), a = this[l] ? { "content-length": i.length } : {}; return { statusCode: e, data: t, headers: { ...this[s], ...a, ...r.headers }, trailers: { ...this[c], ...r.trailers } }; } validateReplyParameters(e) { if (e.statusCode === void 0) throw new f(`statusCode must be defined`); if (typeof e.responseOptions != `object` || e.responseOptions === null) throw new f(`responseOptions must be an object`); } reply(e) { if (typeof e == `function`) return new m(i(this[a], this[o], (t) => { let n = e(t); if (typeof n != `object` || !n) throw new f(`reply options callback must return an object`); let r = { data: ``, responseOptions: {}, ...n }; return this.validateReplyParameters(r), { ...this.createMockScopeDispatchData(r) }; }, { ignoreTrailingSlash: this[d] })); let t = { statusCode: e, data: arguments[1] === void 0 ? `` : arguments[1], responseOptions: arguments[2] === void 0 ? {} : arguments[2] }; this.validateReplyParameters(t); let n = this.createMockScopeDispatchData(t); return new m(i(this[a], this[o], n, { ignoreTrailingSlash: this[d] })); } replyWithError(e) { if (e === void 0) throw new f(`error must be defined`); return new m(i(this[a], this[o], { error: e }, { ignoreTrailingSlash: this[d] })); } defaultReplyHeaders(e) { if (e === void 0) throw new f(`headers must be defined`); return this[s] = e, this; } defaultReplyTrailers(e) { if (e === void 0) throw new f(`trailers must be defined`); return this[c] = e, this; } replyContentLength() { return this[l] = !0, this; } }; t.exports.MockInterceptor = h, t.exports.MockScope = m; })); var ho$1 = c$12(((e, n) => { let { promisify: r } = f$11(`node:util`), i = Va$3(), { buildMockDispatch: a } = po$1(), { kDispatches: o, kMockAgent: s, kClose: c, kOriginalClose: l, kOrigin: u, kOriginalDispatch: d, kConnected: f, kIgnoreTrailingSlash: p } = fo$1(), { MockInterceptor: m } = mo$1(), h = da$3(), { InvalidArgumentError: g } = K$6(); n.exports = class extends i { constructor(e, t) { if (!t || !t.agent || typeof t.agent.dispatch != `function`) throw new g(`Argument opts.agent must implement Agent`); super(e, t), this[s] = t.agent, this[u] = e, this[p] = t.ignoreTrailingSlash ?? !1, this[o] = [], this[f] = 1, this[d] = this.dispatch, this[l] = this.close.bind(this), this.dispatch = a.call(this), this.close = this[c]; } get [h.kConnected]() { return this[f]; } intercept(e) { return new m(e && { ignoreTrailingSlash: this[p], ...e }, this[o]); } cleanMocks() { this[o] = []; } async [c]() { await r(this[l])(), this[f] = 0, this[s][h.kClients].delete(this[u]); } }; })); var go$1 = c$12(((e, t) => { let { kMockCallHistoryAddLog: n } = fo$1(), { InvalidArgumentError: r } = K$6(); function i(e, t, n, i, a) { switch (t.operator) { case `OR`: return i.push(...n(e, a)), i; case `AND`: return n(e, i); default: throw new r(`options.operator must to be a case insensitive string equal to 'OR' or 'AND'`); } } function a(e = {}) { let t = {}; if (`operator` in e) { if (typeof e.operator != `string` || e.operator.toUpperCase() !== `OR` && e.operator.toUpperCase() !== `AND`) throw new r(`options.operator must to be a case insensitive string equal to 'OR' or 'AND'`); return { ...t, operator: e.operator.toUpperCase() }; } return t; } function o(e) { return (t, n) => { if (typeof t == `string` || t == null) return n.filter((n) => n[e] === t); if (t instanceof RegExp) return n.filter((n) => t.test(n[e])); throw new r(`${e} parameter should be one of string, regexp, undefined or null`); }; } function s(e) { try { let t = new URL(e.path, e.origin); return t.search.length === 0 && (t.search = new URLSearchParams(e.query).toString()), t; } catch (e) { throw new r(`An error occurred when computing MockCallHistoryLog.url`, { cause: e }); } } var c = class { constructor(e = {}) { this.body = e.body, this.headers = e.headers, this.method = e.method; let t = s(e); this.fullUrl = t.toString(), this.origin = t.origin, this.path = t.pathname, this.searchParams = Object.fromEntries(t.searchParams), this.protocol = t.protocol, this.host = t.host, this.port = t.port, this.hash = t.hash; } toMap() { return /* @__PURE__ */ new Map([ [`protocol`, this.protocol], [`host`, this.host], [`port`, this.port], [`origin`, this.origin], [`path`, this.path], [`hash`, this.hash], [`searchParams`, this.searchParams], [`fullUrl`, this.fullUrl], [`method`, this.method], [`body`, this.body], [`headers`, this.headers] ]); } toString() { let e = { betweenKeyValueSeparator: `->`, betweenPairSeparator: `|` }, t = ``; return this.toMap().forEach((n, r) => { (typeof n == `string` || n == null) && (t = `${t}${r}${e.betweenKeyValueSeparator}${n}${e.betweenPairSeparator}`), (typeof n == `object` && n || Array.isArray(n)) && (t = `${t}${r}${e.betweenKeyValueSeparator}${JSON.stringify(n)}${e.betweenPairSeparator}`); }), t.slice(0, -1); } }, l = class { logs = []; calls() { return this.logs; } firstCall() { return this.logs.at(0); } lastCall() { return this.logs.at(-1); } nthCall(e) { if (typeof e != `number`) throw new r(`nthCall must be called with a number`); if (!Number.isInteger(e)) throw new r(`nthCall must be called with an integer`); if (Math.sign(e) !== 1) throw new r(`nthCall must be called with a positive value. use firstCall or lastCall instead`); return this.logs.at(e - 1); } filterCalls(e, t) { if (this.logs.length === 0) return this.logs; if (typeof e == `function`) return this.logs.filter(e); if (e instanceof RegExp) return this.logs.filter((t) => e.test(t.toString())); if (typeof e == `object` && e) { if (Object.keys(e).length === 0) return this.logs; let n = { operator: `OR`, ...a(t) }, r = n.operator === `AND` ? this.logs : []; return `protocol` in e && (r = i(e.protocol, n, this.filterCallsByProtocol, r, this.logs)), `host` in e && (r = i(e.host, n, this.filterCallsByHost, r, this.logs)), `port` in e && (r = i(e.port, n, this.filterCallsByPort, r, this.logs)), `origin` in e && (r = i(e.origin, n, this.filterCallsByOrigin, r, this.logs)), `path` in e && (r = i(e.path, n, this.filterCallsByPath, r, this.logs)), `hash` in e && (r = i(e.hash, n, this.filterCallsByHash, r, this.logs)), `fullUrl` in e && (r = i(e.fullUrl, n, this.filterCallsByFullUrl, r, this.logs)), `method` in e && (r = i(e.method, n, this.filterCallsByMethod, r, this.logs)), [...new Set(r)]; } throw new r(`criteria parameter should be one of function, regexp, or object`); } filterCallsByProtocol = o.call(this, `protocol`); filterCallsByHost = o.call(this, `host`); filterCallsByPort = o.call(this, `port`); filterCallsByOrigin = o.call(this, `origin`); filterCallsByPath = o.call(this, `path`); filterCallsByHash = o.call(this, `hash`); filterCallsByFullUrl = o.call(this, `fullUrl`); filterCallsByMethod = o.call(this, `method`); clear() { this.logs = []; } [n](e) { let t = new c(e); return this.logs.push(t), t; } *[Symbol.iterator]() { for (let e of this.calls()) yield e; } }; t.exports.MockCallHistory = l, t.exports.MockCallHistoryLog = c; })); var _o$1 = c$12(((e, n) => { let { promisify: r } = f$11(`node:util`), i = Wa$3(), { buildMockDispatch: a } = po$1(), { kDispatches: o, kMockAgent: s, kClose: c, kOriginalClose: l, kOrigin: u, kOriginalDispatch: d, kConnected: f, kIgnoreTrailingSlash: p } = fo$1(), { MockInterceptor: m } = mo$1(), h = da$3(), { InvalidArgumentError: g } = K$6(); n.exports = class extends i { constructor(e, t) { if (!t || !t.agent || typeof t.agent.dispatch != `function`) throw new g(`Argument opts.agent must implement Agent`); super(e, t), this[s] = t.agent, this[u] = e, this[p] = t.ignoreTrailingSlash ?? !1, this[o] = [], this[f] = 1, this[d] = this.dispatch, this[l] = this.close.bind(this), this.dispatch = a.call(this), this.close = this[c]; } get [h.kConnected]() { return this[f]; } intercept(e) { return new m(e && { ignoreTrailingSlash: this[p], ...e }, this[o]); } cleanMocks() { this[o] = []; } async [c]() { await r(this[l])(), this[f] = 0, this[s][h.kClients].delete(this[u]); } }; })); var vo$1 = c$12(((e, n) => { let { Transform: r } = f$11(`node:stream`), { Console: i } = f$11(`node:console`), a = process.versions.icu ? `✅` : `Y `, o = process.versions.icu ? `❌` : `N `; n.exports = class { constructor({ disableColors: e } = {}) { this.transform = new r({ transform(e, t, n) { n(null, e); } }), this.logger = new i({ stdout: this.transform, inspectOptions: { colors: !e && !process.env.CI } }); } format(e) { let t = e.map(({ method: e, path: t, data: { statusCode: n }, persist: r, times: i, timesInvoked: s, origin: c }) => ({ Method: e, Origin: c, Path: t, "Status code": n, Persistent: r ? a : o, Invocations: s, Remaining: r ? Infinity : i - s })); return this.logger.table(t), this.transform.read().toString(); } }; })); var yo$1 = c$12(((e, t) => { let { kClients: n } = da$3(), r = qa$3(), { kAgent: i, kMockAgentSet: a, kMockAgentGet: o, kDispatches: s, kIsMockActive: c, kNetConnect: l, kGetNetConnect: u, kOptions: d, kFactory: f, kMockAgentRegisterCallHistory: p, kMockAgentIsCallHistoryEnabled: m, kMockAgentAddCallHistoryLog: h, kMockAgentMockCallHistoryInstance: g, kMockAgentAcceptsNonStandardSearchParameters: _, kMockCallHistoryAddLog: v, kIgnoreTrailingSlash: y } = fo$1(), b = ho$1(), x = _o$1(), { matchValue: S, normalizeSearchParams: C, buildAndValidateMockOptions: w, normalizeOrigin: T } = po$1(), { InvalidArgumentError: E, UndiciError: D } = K$6(), O = ya$3(), k = vo$1(), { MockCallHistory: A } = go$1(); t.exports = class extends O { constructor(e = {}) { super(e); let t = w(e); if (this[l] = !0, this[c] = !0, this[m] = t.enableCallHistory ?? !1, this[_] = t.acceptNonStandardSearchParameters ?? !1, this[y] = t.ignoreTrailingSlash ?? !1, e?.agent && typeof e.agent.dispatch != `function`) throw new E(`Argument opts.agent must implement Agent`); let a = e?.agent ? e.agent : new r(e); this[i] = a, this[n] = a[n], this[d] = t, this[m] && this[p](); } get(e) { let t = T(e), n = this[y] ? t.replace(/\/$/, ``) : t, r = this[o](n); return r || (r = this[f](n), this[a](n, r)), r; } dispatch(e, t) { e.origin = T(e.origin), this.get(e.origin), this[h](e); let n = this[_], r = { ...e }; if (n && r.path) { let [e, t] = r.path.split(`?`); r.path = `${e}?${C(t, n)}`; } return this[i].dispatch(r, t); } async close() { this.clearCallHistory(), await this[i].close(), this[n].clear(); } deactivate() { this[c] = !1; } activate() { this[c] = !0; } enableNetConnect(e) { if (typeof e == `string` || typeof e == `function` || e instanceof RegExp) Array.isArray(this[l]) ? this[l].push(e) : this[l] = [e]; else if (e === void 0) this[l] = !0; else throw new E(`Unsupported matcher. Must be one of String|Function|RegExp.`); } disableNetConnect() { this[l] = !1; } enableCallHistory() { return this[m] = !0, this; } disableCallHistory() { return this[m] = !1, this; } getCallHistory() { return this[g]; } clearCallHistory() { this[g] !== void 0 && this[g].clear(); } get isMockActive() { return this[c]; } [p]() { this[g] === void 0 && (this[g] = new A()); } [h](e) { this[m] && (this[p](), this[g][v](e)); } [a](e, t) { this[n].set(e, { count: 0, dispatcher: t }); } [f](e) { let t = Object.assign({ agent: this }, this[d]); return this[d] && this[d].connections === 1 ? new b(e, t) : new x(e, t); } [o](e) { let t = this[n].get(e); if (t?.dispatcher) return t.dispatcher; if (typeof e != `string`) { let t = this[f](`http://localhost:9999`); return this[a](e, t), t; } for (let [t, r] of Array.from(this[n])) if (r && typeof t != `string` && S(t, e)) { let t = this[f](e); return this[a](e, t), t[s] = r.dispatcher[s], t; } } [u]() { return this[l]; } pendingInterceptors() { let e = this[n]; return Array.from(e.entries()).flatMap(([e, t]) => t.dispatcher[s].map((t) => ({ ...t, origin: e }))).filter(({ pending: e }) => e); } assertNoPendingInterceptors({ pendingInterceptorsFormatter: e = new k() } = {}) { let t = this.pendingInterceptors(); if (t.length !== 0) throw new D(t.length === 1 ? `1 interceptor is pending:\n\n${e.format(t)}`.trim() : `${t.length} interceptors are pending:\n\n${e.format(t)}`.trim()); } }; })); var bo$1 = c$12(((e, n) => { let { InvalidArgumentError: r } = K$6(), { runtimeFeatures: i } = Ma$3(); function a(e = {}) { let { ignoreHeaders: t = [], excludeHeaders: n = [], matchHeaders: r = [], caseSensitive: i = !1 } = e; return { ignore: new Set(t.map((e) => i ? e : e.toLowerCase())), exclude: new Set(n.map((e) => i ? e : e.toLowerCase())), match: new Set(r.map((e) => i ? e : e.toLowerCase())) }; } let o = i.has(`crypto`) ? f$11(`node:crypto`) : null, s = o?.hash ? (e) => o.hash(`sha256`, e, `base64url`) : (e) => Buffer.from(e).toString(`base64url`); function c(e) { return Array.isArray(e) && (e.length & 1) == 0; } function l(e = []) { return e.length === 0 ? () => !1 : function(t) { let n; for (let r of e) if (typeof r == `string`) { if (n ||= t.toLowerCase(), n.includes(r.toLowerCase())) return !0; } else if (r instanceof RegExp && r.test(t)) return !0; return !1; }; } function u(e) { let t = {}; if (!e) return t; if (c(e)) { for (let n = 0; n < e.length; n += 2) { let r = e[n], i = e[n + 1]; if (r && i !== void 0) { let e = Buffer.isBuffer(r) ? r.toString() : r, n = Buffer.isBuffer(i) ? i.toString() : i; t[e.toLowerCase()] = n; } } return t; } if (e && typeof e == `object`) for (let [n, r] of Object.entries(e)) n && typeof n == `string` && (t[n.toLowerCase()] = Array.isArray(r) ? r.join(`, `) : String(r)); return t; } let d = [ `record`, `playback`, `update` ]; function f(e) { if (!d.includes(e)) throw new r(`Invalid snapshot mode: ${e}. Must be one of: ${d.join(`, `)}`); } n.exports = { createHeaderFilters: a, hashId: s, isUndiciHeaders: c, normalizeHeaders: u, isUrlExcludedFactory: l, validateSnapshotMode: f }; })); var xo$1 = c$12(((e, n) => { let { writeFile: r, readFile: i, mkdir: a } = f$11(`node:fs/promises`), { dirname: o, resolve: s } = f$11(`node:path`), { setTimeout: c, clearTimeout: l } = f$11(`node:timers`), { InvalidArgumentError: u, UndiciError: d } = K$6(), { hashId: f, isUrlExcludedFactory: p, normalizeHeaders: m, createHeaderFilters: h } = bo$1(); function g(e, t, n = {}) { let r = new URL(e.path, e.origin), i = e._normalizedHeaders || m(e.headers); return e._normalizedHeaders ||= i, { method: e.method || `GET`, url: n.matchQuery === !1 ? `${r.origin}${r.pathname}` : r.toString(), headers: _(i, t, n), body: n.matchBody !== !1 && e.body ? String(e.body) : `` }; } function _(e, t, n = {}) { if (!e || typeof e != `object`) return {}; let { caseSensitive: r = !1 } = n, i = {}, { ignore: a, exclude: o, match: s } = t; for (let [t, n] of Object.entries(e)) { let e = r ? t : t.toLowerCase(); o.has(e) || a.has(e) || s.size !== 0 && !s.has(e) || (i[e] = n); } return i; } function v(e, t, n = {}) { if (!e || typeof e != `object`) return {}; let { caseSensitive: r = !1 } = n, i = {}, { exclude: a } = t; for (let [t, n] of Object.entries(e)) { let e = r ? t : t.toLowerCase(); a.has(e) || (i[e] = n); } return i; } function y(e) { let t = [e.method, e.url]; if (e.headers && typeof e.headers == `object`) { let n = Object.keys(e.headers).sort(); for (let r of n) { let n = Array.isArray(e.headers[r]) ? e.headers[r] : [e.headers[r]]; t.push(r); for (let e of n.sort()) t.push(String(e)); } } return t.push(e.body), f(t.join(`|`)); } n.exports = { SnapshotRecorder: class { #e; #t; #n = /* @__PURE__ */ new Map(); #r; #i = Infinity; #a = !1; #o; constructor(e = {}) { this.#r = e.snapshotPath, this.#i = e.maxSnapshots || Infinity, this.#a = e.autoFlush || !1, this.flushInterval = e.flushInterval || 3e4, this._flushTimer = null, this.matchOptions = { matchHeaders: e.matchHeaders || [], ignoreHeaders: e.ignoreHeaders || [], excludeHeaders: e.excludeHeaders || [], matchBody: e.matchBody !== !1, matchQuery: e.matchQuery !== !1, caseSensitive: e.caseSensitive || !1 }, this.#o = h(this.matchOptions), this.shouldRecord = e.shouldRecord || (() => !0), this.shouldPlayback = e.shouldPlayback || (() => !0), this.#t = p(e.excludeUrls), this.#a && this.#r && this.#s(); } async record(e, t) { if (!this.shouldRecord(e) || this.isUrlExcluded(e)) return; let n = g(e, this.#o, this.matchOptions), r = y(n), i = m(t.headers), a = { statusCode: t.statusCode, headers: v(i, this.#o, this.matchOptions), body: Buffer.isBuffer(t.body) ? t.body.toString(`base64`) : Buffer.from(String(t.body || ``)).toString(`base64`), trailers: t.trailers }; if (this.#n.size >= this.#i && !this.#n.has(r)) { let e = this.#n.keys().next().value; this.#n.delete(e); } let o = this.#n.get(r); o && o.responses ? (o.responses.push(a), o.timestamp = (/* @__PURE__ */ new Date()).toISOString()) : this.#n.set(r, { request: n, responses: [a], callCount: 0, timestamp: (/* @__PURE__ */ new Date()).toISOString() }), this.#a && this.#r && this.#l(); } isUrlExcluded(e) { let t = new URL(e.path, e.origin).toString(); return this.#t(t); } findSnapshot(e) { if (!this.shouldPlayback(e) || this.isUrlExcluded(e)) return; let t = y(g(e, this.#o, this.matchOptions)), n = this.#n.get(t); if (!n) return; let r = n.callCount || 0, i = Math.min(r, n.responses.length - 1); return n.callCount = r + 1, { ...n, response: n.responses[i] }; } async loadSnapshots(e) { let t = e || this.#r; if (!t) throw new u(`Snapshot path is required`); try { let e = await i(s(t), `utf8`), n = JSON.parse(e); if (Array.isArray(n)) { this.#n.clear(); for (let { hash: e, snapshot: t } of n) this.#n.set(e, t); } else this.#n = new Map(Object.entries(n)); } catch (e) { if (e.code === `ENOENT`) this.#n.clear(); else throw new d(`Failed to load snapshots from ${t}`, { cause: e }); } } async saveSnapshots(e) { let t = e || this.#r; if (!t) throw new u(`Snapshot path is required`); let n = s(t); await a(o(n), { recursive: !0 }); let i = Array.from(this.#n.entries()).map(([e, t]) => ({ hash: e, snapshot: t })); await r(n, JSON.stringify(i, null, 2), { flush: !0 }); } clear() { this.#n.clear(); } getSnapshots() { return Array.from(this.#n.values()); } size() { return this.#n.size; } resetCallCounts() { for (let e of this.#n.values()) e.callCount = 0; } deleteSnapshot(e) { let t = y(g(e, this.#o, this.matchOptions)); return this.#n.delete(t); } getSnapshotInfo(e) { let t = y(g(e, this.#o, this.matchOptions)), n = this.#n.get(t); return n ? { hash: t, request: n.request, responseCount: n.responses ? n.responses.length : +!!n.response, callCount: n.callCount || 0, timestamp: n.timestamp } : null; } replaceSnapshots(e) { if (this.#n.clear(), Array.isArray(e)) for (let { hash: t, snapshot: n } of e) this.#n.set(t, n); else e && typeof e == `object` && (this.#n = new Map(Object.entries(e))); } #s() { return this.#l(); } #c() { this.#e &&= (l(this.#e), this.saveSnapshots().catch(() => {}), null); } #l() { this.#e = c(() => { this.saveSnapshots().catch(() => {}), this.#a ? this.#e?.refresh() : this.#e = null; }, 1e3); } destroy() { this.#c(), this.#e &&= (l(this.#e), null); } async close() { this.#r && this.#n.size !== 0 && await this.saveSnapshots(), this.destroy(); } }, formatRequestKey: g, createRequestHash: y, filterHeadersForMatching: _, filterHeadersForStorage: v, createHeaderFilters: h }; })); var So$1 = c$12(((e, t) => { let n = qa$3(), r = yo$1(), { SnapshotRecorder: i } = xo$1(), a = va$3(), { InvalidArgumentError: o, UndiciError: s } = K$6(), { validateSnapshotMode: c } = bo$1(), l = Symbol(`kSnapshotRecorder`), u = Symbol(`kSnapshotMode`), d = Symbol(`kSnapshotPath`), f = Symbol(`kSnapshotLoaded`), p = Symbol(`kRealAgent`), m = !1; t.exports = class extends r { constructor(e = {}) { m ||= (process.emitWarning(`SnapshotAgent is experimental and subject to change`, `ExperimentalWarning`), !0); let { mode: t = `record`, snapshotPath: r = null, ...a } = e; if (super(a), c(t), (t === `playback` || t === `update`) && !r) throw new o(`snapshotPath is required when mode is '${t}'`); this[u] = t, this[d] = r, this[l] = new i({ snapshotPath: this[d], mode: this[u], maxSnapshots: e.maxSnapshots, autoFlush: e.autoFlush, flushInterval: e.flushInterval, matchHeaders: e.matchHeaders, ignoreHeaders: e.ignoreHeaders, excludeHeaders: e.excludeHeaders, matchBody: e.matchBody, matchQuery: e.matchQuery, caseSensitive: e.caseSensitive, shouldRecord: e.shouldRecord, shouldPlayback: e.shouldPlayback, excludeUrls: e.excludeUrls }), this[f] = !1, (this[u] === `record` || this[u] === `update` || this[u] === `playback` && e.excludeUrls && e.excludeUrls.length > 0) && (this[p] = new n(e)), (this[u] === `playback` || this[u] === `update`) && this[d] && this.loadSnapshots().catch(() => {}); } dispatch(e, t) { t = a.wrap(t); let n = this[u]; if (this[l].isUrlExcluded(e)) return this[p].dispatch(e, t); if (n === `playback` || n === `update`) { if (!this[f]) return this.#e(e, t); let r = this[l].findSnapshot(e); if (r) return this.#n(r, t); if (n === `update`) return this.#t(e, t); { let n = new s(`No snapshot found for ${e.method || `GET`} ${e.path}`); if (t.onError) { t.onError(n); return; } throw n; } } else if (n === `record`) return this.#t(e, t); } async #e(e, t) { return await this.loadSnapshots(), this.dispatch(e, t); } #t(e, t) { let n = { statusCode: null, headers: {}, trailers: {}, body: [] }, r = this; return this[p].dispatch(e, { onRequestStart(e, n) { return t.onRequestStart(e, { ...n, history: this.history }); }, onRequestUpgrade(e, n, r, i) { return t.onRequestUpgrade(e, n, r, i); }, onResponseStart(e, r, i, a) { return n.statusCode = r, n.headers = i, t.onResponseStart(e, r, i, a); }, onResponseData(e, r) { return n.body.push(r), t.onResponseData(e, r); }, onResponseEnd(i, a) { n.trailers = a; let o = Buffer.concat(n.body); r[l].record(e, { statusCode: n.statusCode, headers: n.headers, body: o, trailers: n.trailers }).then(() => t.onResponseEnd(i, a)).catch((e) => t.onResponseError(i, e)); } }); } #n(e, t) { try { let { response: n } = e, r = { pause() {}, resume() {}, abort(e) { this.aborted = !0, this.reason = e; }, aborted: !1, paused: !1 }; t.onRequestStart(r), t.onResponseStart(r, n.statusCode, n.headers); let i = Buffer.from(n.body, `base64`); t.onResponseData(r, i), t.onResponseEnd(r, n.trailers); } catch (e) { t.onError?.(e); } } async loadSnapshots(e) { await this[l].loadSnapshots(e || this[d]), this[f] = !0, this[u] === `playback` && this.#r(); } async saveSnapshots(e) { return this[l].saveSnapshots(e || this[d]); } #r() { for (let e of this[l].getSnapshots()) { let { request: t, responses: n, response: r } = e, i = new URL(t.url), a = this.get(i.origin), o = n ? n[0] : r; o && a.intercept({ path: i.pathname + i.search, method: t.method, headers: t.headers, body: t.body }).reply(o.statusCode, o.body, { headers: o.headers, trailers: o.trailers }).persist(); } } getRecorder() { return this[l]; } getMode() { return this[u]; } clearSnapshots() { this[l].clear(); } resetCallCounts() { this[l].resetCallCounts(); } deleteSnapshot(e) { return this[l].deleteSnapshot(e); } getSnapshotInfo(e) { return this[l].getSnapshotInfo(e); } replaceSnapshots(e) { this[l].replaceSnapshots(e); } async close() { await this[l].close(), await this[p]?.close(), await super.close(); } }; })); var Co$1 = c$12(((e, t) => { let n = Symbol.for(`undici.globalDispatcher.2`), r = Symbol.for(`undici.globalDispatcher.1`), { InvalidArgumentError: i } = K$6(), a = qa$3(); s() === void 0 && o(new a()); function o(e) { if (!e || typeof e.dispatch != `function`) throw new i(`Argument agent must implement Agent`); Object.defineProperty(globalThis, n, { value: e, writable: !0, enumerable: !1, configurable: !1 }), Object.defineProperty(globalThis, r, { value: e, writable: !0, enumerable: !1, configurable: !1 }); } function s() { return globalThis[r]; } t.exports = { setGlobalDispatcher: o, getGlobalDispatcher: s, installedExports: [ `fetch`, `Headers`, `Response`, `Request`, `FormData`, `WebSocket`, `CloseEvent`, `ErrorEvent`, `MessageEvent`, `EventSource` ] }; })); var wo$1 = c$12(((e, n) => { let r = f$11(`node:assert`), i = va$3(); n.exports = class { #e; #t = !1; #n = !1; #r = !1; constructor(e) { if (typeof e != `object` || !e) throw TypeError(`handler must be an object`); this.#e = i.wrap(e); } onRequestStart(...e) { this.#e.onRequestStart?.(...e); } onRequestUpgrade(...e) { return r(!this.#t), r(!this.#n), this.#e.onRequestUpgrade?.(...e); } onResponseStart(...e) { return r(!this.#t), r(!this.#n), r(!this.#r), this.#r = !0, this.#e.onResponseStart?.(...e); } onResponseData(...e) { return r(!this.#t), r(!this.#n), this.#e.onResponseData?.(...e); } onResponseEnd(...e) { return r(!this.#t), r(!this.#n), this.#t = !0, this.#e.onResponseEnd?.(...e); } onResponseError(...e) { return this.#n = !0, this.#e.onResponseError?.(...e); } onBodySent() {} }; })); var To$1 = c$12(((e, n) => { let r = q$6(), { kBodyUsed: i } = da$3(), a = f$11(`node:assert`), { InvalidArgumentError: o } = K$6(), s = f$11(`node:events`), c = [ 300, 301, 302, 303, 307, 308 ], l = Symbol(`body`), u = () => {}; var d = class { constructor(e) { this[l] = e, this[i] = !1; } async *[Symbol.asyncIterator]() { a(!this[i], `disturbed`), this[i] = !0, yield* this[l]; } }, f = class e { static buildDispatch(t, n) { if (n != null && (!Number.isInteger(n) || n < 0)) throw new o(`maxRedirections must be a positive number`); let r = t.dispatch.bind(t); return (t, i) => r(t, new e(r, n, t, i)); } constructor(e, t, n, c) { if (t != null && (!Number.isInteger(t) || t < 0)) throw new o(`maxRedirections must be a positive number`); this.dispatch = e, this.location = null; let { maxRedirections: l, ...u } = n; this.opts = u, this.maxRedirections = t, this.handler = c, this.history = [], r.isStream(this.opts.body) ? (r.bodyLength(this.opts.body) === 0 && this.opts.body.on(`data`, function() { a(!1); }), typeof this.opts.body.readableDidRead != `boolean` && (this.opts.body[i] = !1, s.prototype.on.call(this.opts.body, `data`, function() { this[i] = !0; }))) : (this.opts.body && typeof this.opts.body.pipeTo == `function` || this.opts.body && typeof this.opts.body != `string` && !ArrayBuffer.isView(this.opts.body) && r.isIterable(this.opts.body) && !r.isFormDataLike(this.opts.body)) && (this.opts.body = new d(this.opts.body)); } onRequestStart(e, t) { this.handler.onRequestStart?.(e, { ...t, history: this.history }); } onRequestUpgrade(e, t, n, r) { this.handler.onRequestUpgrade?.(e, t, n, r); } onResponseStart(e, t, n, i) { if (this.opts.throwOnMaxRedirect && this.history.length >= this.maxRedirections) throw Error(`max redirects`); if ((t === 301 || t === 302) && this.opts.method === `POST` && (this.opts.method = `GET`, r.isStream(this.opts.body) && r.destroy(this.opts.body.on(`error`, u)), this.opts.body = null), t === 303 && this.opts.method !== `HEAD` && (this.opts.method = `GET`, r.isStream(this.opts.body) && r.destroy(this.opts.body.on(`error`, u)), this.opts.body = null), this.location = this.history.length >= this.maxRedirections || r.isDisturbed(this.opts.body) || c.indexOf(t) === -1 ? null : n.location, this.opts.origin && this.history.push(new URL(this.opts.path, this.opts.origin)), !this.location) { this.handler.onResponseStart?.(e, t, n, i); return; } let { origin: a, pathname: s, search: l } = r.parseURL(new URL(this.location, this.opts.origin && new URL(this.opts.path, this.opts.origin))), d = l ? `${s}${l}` : s, f = `${a}${d}`; for (let e of this.history) if (e.toString() === f) throw new o(`Redirect loop detected. Cannot redirect to ${a}. This typically happens when using a Client or Pool with cross-origin redirects. Use an Agent for cross-origin redirects.`); this.opts.headers = m(this.opts.headers, t === 303, this.opts.origin !== a), this.opts.path = d, this.opts.origin = a, this.opts.query = null; } onResponseData(e, t) { this.location || this.handler.onResponseData?.(e, t); } onResponseEnd(e, t) { this.location ? this.dispatch(this.opts, this) : this.handler.onResponseEnd(e, t); } onResponseError(e, t) { this.handler.onResponseError?.(e, t); } }; function p(e, t, n) { if (e.length === 4) return r.headerNameToString(e) === `host`; if (t && r.headerNameToString(e).startsWith(`content-`)) return !0; if (n && (e.length === 13 || e.length === 6 || e.length === 19)) { let t = r.headerNameToString(e); return t === `authorization` || t === `cookie` || t === `proxy-authorization`; } return !1; } function m(e, t, n) { let i = []; if (Array.isArray(e)) for (let r = 0; r < e.length; r += 2) p(e[r], t, n) || i.push(e[r], e[r + 1]); else if (e && typeof e == `object`) { let a = r.hasSafeIterator(e) ? e : Object.entries(e); for (let [e, r] of a) p(e, t, n) || i.push(e, r); } else a(e == null, `headers must be an object or an array`); return i; } n.exports = f; })); var Eo$1 = c$12(((e, t) => { let n = To$1(); function r({ maxRedirections: e } = {}) { return (t) => function(r, i) { let { maxRedirections: a = e, ...o } = r; if (a == null || a === 0) return t(r, i); let s = { ...o }; return t(s, new n(t, a, s, i)); }; } t.exports = r; })); var Do$1 = c$12(((e, t) => { let n = wo$1(), { ResponseError: r } = K$6(); var i = class extends n { #e; #t; #n; #r; #i; constructor(e, { handler: t }) { super(t); } #a(e) { return (this.#t ?? ``).indexOf(e) === 0; } onRequestStart(e, t) { return this.#e = 0, this.#t = null, this.#n = null, this.#r = null, this.#i = ``, super.onRequestStart(e, t); } onResponseStart(e, t, n, r) { if (this.#e = t, this.#r = n, this.#t = n[`content-type`], this.#e < 400) return super.onResponseStart(e, t, n, r); (this.#a(`application/json`) || this.#a(`text/plain`)) && (this.#n = new TextDecoder(`utf-8`)); } onResponseData(e, t) { if (this.#e < 400) return super.onResponseData(e, t); this.#i += this.#n?.decode(t, { stream: !0 }) ?? ``; } onResponseEnd(e, t) { if (this.#e >= 400) { if (this.#i += this.#n?.decode(void 0, { stream: !1 }) ?? ``, this.#a(`application/json`)) try { this.#i = JSON.parse(this.#i); } catch {} let t, n = Error.stackTraceLimit; Error.stackTraceLimit = 0; try { t = new r(`Response Error`, this.#e, { body: this.#i, headers: this.#r }); } finally { Error.stackTraceLimit = n; } super.onResponseError(e, t); } else super.onResponseEnd(e, t); } onResponseError(e, t) { super.onResponseError(e, t); } }; t.exports = () => (e) => function(t, n) { return e(t, new i(t, { handler: n })); }; })); var Oo$1 = c$12(((e, t) => { let n = $a$2(); t.exports = (e) => (t) => function(r, i) { return t(r, new n({ ...r, retryOptions: { ...e, ...r.retryOptions } }, { handler: i, dispatch: t })); }; })); var ko$1 = c$12(((e, t) => { let { InvalidArgumentError: n, RequestAbortedError: r } = K$6(), i = wo$1(); var a = class extends i { #e = 1024 * 1024; #t = !1; #n = 0; #r = null; aborted = !1; reason = !1; constructor({ maxSize: e, signal: t }, r) { if (e != null && (!Number.isFinite(e) || e < 1)) throw new n(`maxSize must be a number greater than 0`); super(r), this.#e = e ?? this.#e; } #i(e) { this.aborted = !0, this.reason = e; } onRequestStart(e, t) { return e.abort = this.#i.bind(this), this.#r = e, super.onRequestStart(e, t); } onResponseStart(e, t, n, i) { let a = n[`content-length`]; if (a != null && a > this.#e) throw new r(`Response size (${a}) larger than maxSize (${this.#e})`); return this.aborted === !0 ? !0 : super.onResponseStart(e, t, n, i); } onResponseError(e, t) { this.#t || (t = this.#r?.reason ?? t, super.onResponseError(e, t)); } onResponseData(e, t) { return this.#n += t.length, this.#n >= this.#e && (this.#t = !0, this.aborted === !0 ? super.onResponseError(e, this.reason) : super.onResponseEnd(e, {})), !0; } onResponseEnd(e, t) { if (!this.#t) { if (this.#r.aborted === !0) { super.onResponseError(e, this.reason); return; } super.onResponseEnd(e, t); } } }; function o({ maxSize: e } = { maxSize: 1024 * 1024 }) { return (t) => function(n, r) { let { dumpMaxSize: i = e } = n; return t(n, new a({ maxSize: i, signal: n.signal }, r)); }; } t.exports = o; })); var Ao$1 = c$12(((e, n) => { let { isIP: r } = f$11(`node:net`), { lookup: i } = f$11(`node:dns`), a = wo$1(), { InvalidArgumentError: o, InformationalError: s } = K$6(), c = 2 ** 31 - 1; function l(e) { let t = Object.getPrototypeOf(e); return Object.prototype.hasOwnProperty.call(e, Symbol.iterator) || t != null && t !== Object.prototype && typeof e[Symbol.iterator] == `function`; } function u(e) { return typeof e == `string` && e.toLowerCase() === `host`; } function d(e) { if (e == null) return null; if (Array.isArray(e)) { if (e.length === 0 || !Array.isArray(e[0])) return e; let t = []; for (let n of e) Array.isArray(n) && n.length === 2 ? t.push(n[0], n[1]) : t.push(n); return t; } if (typeof e == `object` && l(e)) { let t = []; for (let n of e) Array.isArray(n) && n.length === 2 ? t.push(n[0], n[1]) : t.push(n); return t; } return e; } function f(e) { if (e == null) return !1; if (Array.isArray(e)) { if (e.length === 0) return !1; for (let t = 0; t < e.length; t += 2) if (u(e[t])) return !0; return !1; } if (typeof e == `object`) { for (let t in e) if (u(t)) return !0; } return !1; } function p(e, t) { let n = d(t); return f(n) ? n : Array.isArray(n) ? [ `host`, e, ...n ] : n && typeof n == `object` ? { host: e, ...n } : { host: e }; } var m = class { #e = 0; #t = /* @__PURE__ */ new Map(); constructor(e) { this.#e = e.maxItems; } get size() { return this.#t.size; } get(e) { return this.#t.get(e) ?? null; } set(e, t) { this.#t.set(e, t); } delete(e) { this.#t.delete(e); } full() { return this.size >= this.#e; } }, h = class { #e = 0; #t = 0; dualStack = !0; affinity = null; lookup = null; pick = null; storage = null; constructor(e) { this.#e = e.maxTTL, this.#t = e.maxItems, this.dualStack = e.dualStack, this.affinity = e.affinity, this.lookup = e.lookup ?? this.#n, this.pick = e.pick ?? this.#r, this.storage = e.storage ?? new m(e); } runLookup(e, t, n) { let r = this.storage.get(e.hostname); if (r == null && this.storage.full()) { n(null, e); return; } let i = { affinity: this.affinity, dualStack: this.dualStack, lookup: this.lookup, pick: this.pick, ...t.dns, maxTTL: this.#e, maxItems: this.#t }; if (r == null) this.lookup(e, i, (t, r) => { if (t || r == null || r.length === 0) { n(t ?? new s(`No DNS entries found`)); return; } this.setRecords(e, r); let a = this.storage.get(e.hostname), o = this.pick(e, a, i.affinity), c; c = typeof o.port == `number` ? `:${o.port}` : e.port === `` ? `` : `:${e.port}`, n(null, new URL(`${e.protocol}//${o.family === 6 ? `[${o.address}]` : o.address}${c}`)); }); else { let a = this.pick(e, r, i.affinity); if (a == null) { this.storage.delete(e.hostname), this.runLookup(e, t, n); return; } let o; o = typeof a.port == `number` ? `:${a.port}` : e.port === `` ? `` : `:${e.port}`, n(null, new URL(`${e.protocol}//${a.family === 6 ? `[${a.address}]` : a.address}${o}`)); } } #n(e, t, n) { i(e.hostname, { all: !0, family: this.dualStack === !1 ? this.affinity : 0, order: `ipv4first` }, (e, t) => { if (e) return n(e); let r = /* @__PURE__ */ new Map(); for (let e of t) r.set(`${e.address}:${e.family}`, e); n(null, r.values()); }); } #r(e, t, n) { let r = null, { records: i, offset: a } = t, o; if (this.dualStack ? (n ?? (a == null || a === c ? (t.offset = 0, n = 4) : (t.offset++, n = (t.offset & 1) == 1 ? 6 : 4)), o = i[n] != null && i[n].ips.length > 0 ? i[n] : i[n === 4 ? 6 : 4]) : o = i[n], o == null || o.ips.length === 0) return r; o.offset == null || o.offset === c ? o.offset = 0 : o.offset++; let s = o.offset % o.ips.length; return r = o.ips[s] ?? null, r == null ? r : Date.now() - r.timestamp > r.ttl ? (o.ips.splice(s, 1), this.pick(e, t, n)) : r; } pickFamily(e, t) { let n = this.storage.get(e.hostname)?.records; if (!n) return null; let r = n[t]; if (!r) return null; r.offset == null || r.offset === c ? r.offset = 0 : r.offset++; let i = r.offset % r.ips.length, a = r.ips[i] ?? null; return a == null || Date.now() - a.timestamp > a.ttl && r.ips.splice(i, 1), a; } setRecords(e, t) { let n = Date.now(), r = { records: { 4: null, 6: null } }, i = this.#e; for (let e of t) { e.timestamp = n, typeof e.ttl == `number` ? (e.ttl = Math.min(e.ttl, this.#e), i = Math.min(i, e.ttl)) : e.ttl = this.#e; let t = r.records[e.family] ?? { ips: [] }; t.ips.push(e), r.records[e.family] = t; } this.storage.set(e.hostname, r, { ttl: i }); } deleteRecords(e) { this.storage.delete(e.hostname); } getHandler(e, t) { return new g(this, e, t); } }, g = class extends a { #e = null; #t = null; #n = null; #r = null; #i = null; #a = !0; constructor(e, { origin: t, handler: n, dispatch: r, newOrigin: i }, a) { super(n), this.#r = t, this.#i = i, this.#t = { ...a }, this.#e = e, this.#n = r; } onResponseError(e, t) { switch (t.code) { case `ETIMEDOUT`: case `ECONNREFUSED`: if (this.#e.dualStack) { if (!this.#a) { super.onResponseError(e, t); return; } this.#a = !1; let n = this.#i.hostname[0] === `[` ? 4 : 6, r = this.#e.pickFamily(this.#r, n); if (r == null) { super.onResponseError(e, t); return; } let i; i = typeof r.port == `number` ? `:${r.port}` : this.#r.port === `` ? `` : `:${this.#r.port}`; let a = { ...this.#t, origin: `${this.#r.protocol}//${r.family === 6 ? `[${r.address}]` : r.address}${i}`, headers: p(this.#r.host, this.#t.headers) }; this.#n(a, this); return; } super.onResponseError(e, t); break; case `ENOTFOUND`: this.#e.deleteRecords(this.#r), super.onResponseError(e, t); break; default: super.onResponseError(e, t); break; } } }; n.exports = (e) => { if (e?.maxTTL != null && (typeof e?.maxTTL != `number` || e?.maxTTL < 0)) throw new o(`Invalid maxTTL. Must be a positive number`); if (e?.maxItems != null && (typeof e?.maxItems != `number` || e?.maxItems < 1)) throw new o(`Invalid maxItems. Must be a positive number and greater than zero`); if (e?.affinity != null && e?.affinity !== 4 && e?.affinity !== 6) throw new o(`Invalid affinity. Must be either 4 or 6`); if (e?.dualStack != null && typeof e?.dualStack != `boolean`) throw new o(`Invalid dualStack. Must be a boolean`); if (e?.lookup != null && typeof e?.lookup != `function`) throw new o(`Invalid lookup. Must be a function`); if (e?.pick != null && typeof e?.pick != `function`) throw new o(`Invalid pick. Must be a function`); if (e?.storage != null && (typeof e?.storage?.get != `function` || typeof e?.storage?.set != `function` || typeof e?.storage?.full != `function` || typeof e?.storage?.delete != `function`)) throw new o(`Invalid storage. Must be a object with methods: { get, set, full, delete }`); let t = e?.dualStack ?? !0, n; n = t ? e?.affinity ?? null : e?.affinity ?? 4; let i = new h({ maxTTL: e?.maxTTL ?? 1e4, lookup: e?.lookup ?? null, pick: e?.pick ?? null, dualStack: t, affinity: n, maxItems: e?.maxItems ?? Infinity, storage: e?.storage }); return (e) => function(t, n) { let a = t.origin.constructor === URL ? t.origin : new URL(t.origin); return r(a.hostname) === 0 ? (i.runLookup(a, t, (r, o) => { if (r) return n.onResponseError(null, r); e({ ...t, servername: a.hostname, origin: o.origin, headers: p(a.host, t.headers) }, i.getHandler({ origin: a, dispatch: e, handler: n, newOrigin: o }, t)); }), !0) : e(t, n); }; }; })); var jo$1 = c$12(((e, t) => { let { safeHTTPMethods: n, pathHasQueryOrFragment: r, hasSafeIterator: i } = q$6(), { serializePathWithQuery: a } = q$6(); function o(e) { if (!e.origin) throw Error(`opts.origin is undefined`); let t = e.path || `/`; return e.query && !r(t) && (t = a(t, e.query)), { origin: e.origin.toString(), method: e.method, path: t, headers: e.headers }; } function s(e) { let t; if (e.headers == null) t = {}; else if (typeof e.headers == `object`) if (t = {}, i(e.headers)) for (let n of e.headers) { if (!Array.isArray(n)) throw Error(`opts.headers is not a valid header map`); let [e, r] = n; if (typeof e != `string` || typeof r != `string`) throw Error(`opts.headers is not a valid header map`); t[e.toLowerCase()] = r; } else for (let n of Object.keys(e.headers)) t[n.toLowerCase()] = e.headers[n]; else throw Error(`opts.headers is not an object`); return t; } function c(e) { if (typeof e != `object`) throw TypeError(`expected key to be object, got ${typeof e}`); for (let t of [ `origin`, `method`, `path` ]) if (typeof e[t] != `string`) throw TypeError(`expected key.${t} to be string, got ${typeof e[t]}`); if (e.headers !== void 0 && typeof e.headers != `object`) throw TypeError(`expected headers to be object, got ${typeof e}`); } function l(e) { if (typeof e != `object`) throw TypeError(`expected value to be object, got ${typeof e}`); for (let t of [ `statusCode`, `cachedAt`, `staleAt`, `deleteAt` ]) if (typeof e[t] != `number`) throw TypeError(`expected value.${t} to be number, got ${typeof e[t]}`); if (typeof e.statusMessage != `string`) throw TypeError(`expected value.statusMessage to be string, got ${typeof e.statusMessage}`); if (e.headers != null && typeof e.headers != `object`) throw TypeError(`expected value.rawHeaders to be object, got ${typeof e.headers}`); if (e.vary !== void 0 && typeof e.vary != `object`) throw TypeError(`expected value.vary to be object, got ${typeof e.vary}`); if (e.etag !== void 0 && typeof e.etag != `string`) throw TypeError(`expected value.etag to be string, got ${typeof e.etag}`); } function u(e) { let t = {}, n; if (Array.isArray(e)) { n = []; for (let t of e) n.push(...t.split(`,`)); } else n = e.split(`,`); for (let e = 0; e < n.length; e++) { let r = n[e].toLowerCase(), i = r.indexOf(`=`), a, o; switch (i === -1 ? a = r.trim() : (a = r.substring(0, i).trimStart(), o = r.substring(i + 1)), a) { case `min-fresh`: case `max-stale`: case `max-age`: case `s-maxage`: case `stale-while-revalidate`: case `stale-if-error`: { if (o === void 0 || o[0] === ` `) continue; o.length >= 2 && o[0] === `"` && o[o.length - 1] === `"` && (o = o.substring(1, o.length - 1)); let e = parseInt(o, 10); if (e !== e || a === `max-age` && a in t && t[a] >= e) continue; t[a] = e; break; } case `private`: case `no-cache`: if (o) { if (o[0] === `"`) { let r = [o.substring(1)], i = o[o.length - 1] === `"`; if (!i) for (let t = e + 1; t < n.length; t++) { let e = n[t], a = e.length; if (r.push(e.trim()), a !== 0 && e[a - 1] === `"`) { i = !0; break; } } if (i) { let e = r[r.length - 1]; e[e.length - 1] === `"` && (e = e.substring(0, e.length - 1), r[r.length - 1] = e); for (let e = 0; e < r.length; e++) r[e] = r[e].trim(); a in t ? t[a] = t[a].concat(r) : t[a] = r; } } else { let e = o.trim(); a in t ? t[a] = t[a].concat(e) : t[a] = [e]; } break; } case `public`: case `no-store`: case `must-revalidate`: case `proxy-revalidate`: case `immutable`: case `no-transform`: case `must-understand`: case `only-if-cached`: if (o) continue; t[a] = !0; break; default: continue; } } return t; } function d(e, t) { if (typeof e == `string` && e.includes(`*`)) return t; let n = {}, r = typeof e == `string` ? e.split(`,`) : e; for (let e of r) { let r = e.trim().toLowerCase(); n[r] = t[r] ?? null; } return n; } function f(e) { return e.length <= 2 ? !1 : e[0] === `"` && e[e.length - 1] === `"` ? !(e[1] === `"` || e.startsWith(`"W/`)) : e.startsWith(`W/"`) && e[e.length - 1] === `"` ? e.length !== 4 : !1; } function p(e, t = `CacheStore`) { if (typeof e != `object` || !e) throw TypeError(`expected type of ${t} to be a CacheStore, got ${e === null ? `null` : typeof e}`); for (let n of [ `get`, `createWriteStream`, `delete` ]) if (typeof e[n] != `function`) throw TypeError(`${t} needs to have a \`${n}()\` function`); } function m(e, t = `CacheMethods`) { if (!Array.isArray(e)) throw TypeError(`expected type of ${t} needs to be an array, got ${e === null ? `null` : typeof e}`); if (e.length === 0) throw TypeError(`${t} needs to have at least one method`); for (let r of e) if (!n.includes(r)) throw TypeError(`element of ${t}-array needs to be one of following values: ${n.join(`, `)}, got ${r}`); } function h(e, t) { let n = {}; if (e.headers) { let r = Object.keys(e.headers).sort(); for (let i of r) t?.has(i.toLowerCase()) || (n[i] = e.headers[i]); } return JSON.stringify([ e.origin, e.method, e.path, n ]); } t.exports = { makeCacheKey: o, normalizeHeaders: s, assertCacheKey: c, assertCacheValue: l, parseCacheControlHeader: u, parseVaryHeader: d, isEtagUsable: f, assertCacheMethods: m, assertCacheStore: p, makeDeduplicationKey: h }; })); var Mo$1 = c$12(((e, t) => { function n(e) { switch (e[3]) { case `,`: return r(e); case ` `: return i(e); default: return a(e); } } function r(e) { if (e.length !== 29 || e[4] !== ` ` || e[7] !== ` ` || e[11] !== ` ` || e[16] !== ` ` || e[19] !== `:` || e[22] !== `:` || e[25] !== ` ` || e[26] !== `G` || e[27] !== `M` || e[28] !== `T`) return; let t = -1; if (e[0] === `S` && e[1] === `u` && e[2] === `n`) t = 0; else if (e[0] === `M` && e[1] === `o` && e[2] === `n`) t = 1; else if (e[0] === `T` && e[1] === `u` && e[2] === `e`) t = 2; else if (e[0] === `W` && e[1] === `e` && e[2] === `d`) t = 3; else if (e[0] === `T` && e[1] === `h` && e[2] === `u`) t = 4; else if (e[0] === `F` && e[1] === `r` && e[2] === `i`) t = 5; else if (e[0] === `S` && e[1] === `a` && e[2] === `t`) t = 6; else return; let n = 0; if (e[5] === `0`) { let t = e.charCodeAt(6); if (t < 49 || t > 57) return; n = t - 48; } else { let t = e.charCodeAt(5); if (t < 49 || t > 51) return; let r = e.charCodeAt(6); if (r < 48 || r > 57) return; n = (t - 48) * 10 + (r - 48); } let r = -1; if (e[8] === `J` && e[9] === `a` && e[10] === `n`) r = 0; else if (e[8] === `F` && e[9] === `e` && e[10] === `b`) r = 1; else if (e[8] === `M` && e[9] === `a`) if (e[10] === `r`) r = 2; else if (e[10] === `y`) r = 4; else return; else if (e[8] === `J`) if (e[9] === `a` && e[10] === `n`) r = 0; else if (e[9] === `u`) if (e[10] === `n`) r = 5; else if (e[10] === `l`) r = 6; else return; else return; else if (e[8] === `A`) if (e[9] === `p` && e[10] === `r`) r = 3; else if (e[9] === `u` && e[10] === `g`) r = 7; else return; else if (e[8] === `S` && e[9] === `e` && e[10] === `p`) r = 8; else if (e[8] === `O` && e[9] === `c` && e[10] === `t`) r = 9; else if (e[8] === `N` && e[9] === `o` && e[10] === `v`) r = 10; else if (e[8] === `D` && e[9] === `e` && e[10] === `c`) r = 11; else return; let i = e.charCodeAt(12); if (i < 48 || i > 57) return; let a = e.charCodeAt(13); if (a < 48 || a > 57) return; let o = e.charCodeAt(14); if (o < 48 || o > 57) return; let s = e.charCodeAt(15); if (s < 48 || s > 57) return; let c = (i - 48) * 1e3 + (a - 48) * 100 + (o - 48) * 10 + (s - 48), l = 0; if (e[17] === `0`) { let t = e.charCodeAt(18); if (t < 48 || t > 57) return; l = t - 48; } else { let t = e.charCodeAt(17); if (t < 48 || t > 50) return; let n = e.charCodeAt(18); if (n < 48 || n > 57 || t === 50 && n > 51) return; l = (t - 48) * 10 + (n - 48); } let u = 0; if (e[20] === `0`) { let t = e.charCodeAt(21); if (t < 48 || t > 57) return; u = t - 48; } else { let t = e.charCodeAt(20); if (t < 48 || t > 53) return; let n = e.charCodeAt(21); if (n < 48 || n > 57) return; u = (t - 48) * 10 + (n - 48); } let d = 0; if (e[23] === `0`) { let t = e.charCodeAt(24); if (t < 48 || t > 57) return; d = t - 48; } else { let t = e.charCodeAt(23); if (t < 48 || t > 53) return; let n = e.charCodeAt(24); if (n < 48 || n > 57) return; d = (t - 48) * 10 + (n - 48); } let f = new Date(Date.UTC(c, r, n, l, u, d)); return f.getUTCDay() === t ? f : void 0; } function i(e) { if (e.length !== 24 || e[7] !== ` ` || e[10] !== ` ` || e[19] !== ` `) return; let t = -1; if (e[0] === `S` && e[1] === `u` && e[2] === `n`) t = 0; else if (e[0] === `M` && e[1] === `o` && e[2] === `n`) t = 1; else if (e[0] === `T` && e[1] === `u` && e[2] === `e`) t = 2; else if (e[0] === `W` && e[1] === `e` && e[2] === `d`) t = 3; else if (e[0] === `T` && e[1] === `h` && e[2] === `u`) t = 4; else if (e[0] === `F` && e[1] === `r` && e[2] === `i`) t = 5; else if (e[0] === `S` && e[1] === `a` && e[2] === `t`) t = 6; else return; let n = -1; if (e[4] === `J` && e[5] === `a` && e[6] === `n`) n = 0; else if (e[4] === `F` && e[5] === `e` && e[6] === `b`) n = 1; else if (e[4] === `M` && e[5] === `a`) if (e[6] === `r`) n = 2; else if (e[6] === `y`) n = 4; else return; else if (e[4] === `J`) if (e[5] === `a` && e[6] === `n`) n = 0; else if (e[5] === `u`) if (e[6] === `n`) n = 5; else if (e[6] === `l`) n = 6; else return; else return; else if (e[4] === `A`) if (e[5] === `p` && e[6] === `r`) n = 3; else if (e[5] === `u` && e[6] === `g`) n = 7; else return; else if (e[4] === `S` && e[5] === `e` && e[6] === `p`) n = 8; else if (e[4] === `O` && e[5] === `c` && e[6] === `t`) n = 9; else if (e[4] === `N` && e[5] === `o` && e[6] === `v`) n = 10; else if (e[4] === `D` && e[5] === `e` && e[6] === `c`) n = 11; else return; let r = 0; if (e[8] === ` `) { let t = e.charCodeAt(9); if (t < 49 || t > 57) return; r = t - 48; } else { let t = e.charCodeAt(8); if (t < 49 || t > 51) return; let n = e.charCodeAt(9); if (n < 48 || n > 57) return; r = (t - 48) * 10 + (n - 48); } let i = 0; if (e[11] === `0`) { let t = e.charCodeAt(12); if (t < 48 || t > 57) return; i = t - 48; } else { let t = e.charCodeAt(11); if (t < 48 || t > 50) return; let n = e.charCodeAt(12); if (n < 48 || n > 57 || t === 50 && n > 51) return; i = (t - 48) * 10 + (n - 48); } let a = 0; if (e[14] === `0`) { let t = e.charCodeAt(15); if (t < 48 || t > 57) return; a = t - 48; } else { let t = e.charCodeAt(14); if (t < 48 || t > 53) return; let n = e.charCodeAt(15); if (n < 48 || n > 57) return; a = (t - 48) * 10 + (n - 48); } let o = 0; if (e[17] === `0`) { let t = e.charCodeAt(18); if (t < 48 || t > 57) return; o = t - 48; } else { let t = e.charCodeAt(17); if (t < 48 || t > 53) return; let n = e.charCodeAt(18); if (n < 48 || n > 57) return; o = (t - 48) * 10 + (n - 48); } let s = e.charCodeAt(20); if (s < 48 || s > 57) return; let c = e.charCodeAt(21); if (c < 48 || c > 57) return; let l = e.charCodeAt(22); if (l < 48 || l > 57) return; let u = e.charCodeAt(23); if (u < 48 || u > 57) return; let d = (s - 48) * 1e3 + (c - 48) * 100 + (l - 48) * 10 + (u - 48), f = new Date(Date.UTC(d, n, r, i, a, o)); return f.getUTCDay() === t ? f : void 0; } function a(e) { let t = -1, n = -1; if (e[0] === `S`) e[1] === `u` && e[2] === `n` && e[3] === `d` && e[4] === `a` && e[5] === `y` ? (n = 0, t = 6) : e[1] === `a` && e[2] === `t` && e[3] === `u` && e[4] === `r` && e[5] === `d` && e[6] === `a` && e[7] === `y` && (n = 6, t = 8); else if (e[0] === `M` && e[1] === `o` && e[2] === `n` && e[3] === `d` && e[4] === `a` && e[5] === `y`) n = 1, t = 6; else if (e[0] === `T`) e[1] === `u` && e[2] === `e` && e[3] === `s` && e[4] === `d` && e[5] === `a` && e[6] === `y` ? (n = 2, t = 7) : e[1] === `h` && e[2] === `u` && e[3] === `r` && e[4] === `s` && e[5] === `d` && e[6] === `a` && e[7] === `y` && (n = 4, t = 8); else if (e[0] === `W` && e[1] === `e` && e[2] === `d` && e[3] === `n` && e[4] === `e` && e[5] === `s` && e[6] === `d` && e[7] === `a` && e[8] === `y`) n = 3, t = 9; else if (e[0] === `F` && e[1] === `r` && e[2] === `i` && e[3] === `d` && e[4] === `a` && e[5] === `y`) n = 5, t = 6; else return; if (e[t] !== `,` || e.length - t - 1 != 23 || e[t + 1] !== ` ` || e[t + 4] !== `-` || e[t + 8] !== `-` || e[t + 11] !== ` ` || e[t + 14] !== `:` || e[t + 17] !== `:` || e[t + 20] !== ` ` || e[t + 21] !== `G` || e[t + 22] !== `M` || e[t + 23] !== `T`) return; let r = 0; if (e[t + 2] === `0`) { let n = e.charCodeAt(t + 3); if (n < 49 || n > 57) return; r = n - 48; } else { let n = e.charCodeAt(t + 2); if (n < 49 || n > 51) return; let i = e.charCodeAt(t + 3); if (i < 48 || i > 57) return; r = (n - 48) * 10 + (i - 48); } let i = -1; if (e[t + 5] === `J` && e[t + 6] === `a` && e[t + 7] === `n`) i = 0; else if (e[t + 5] === `F` && e[t + 6] === `e` && e[t + 7] === `b`) i = 1; else if (e[t + 5] === `M` && e[t + 6] === `a` && e[t + 7] === `r`) i = 2; else if (e[t + 5] === `A` && e[t + 6] === `p` && e[t + 7] === `r`) i = 3; else if (e[t + 5] === `M` && e[t + 6] === `a` && e[t + 7] === `y`) i = 4; else if (e[t + 5] === `J` && e[t + 6] === `u` && e[t + 7] === `n`) i = 5; else if (e[t + 5] === `J` && e[t + 6] === `u` && e[t + 7] === `l`) i = 6; else if (e[t + 5] === `A` && e[t + 6] === `u` && e[t + 7] === `g`) i = 7; else if (e[t + 5] === `S` && e[t + 6] === `e` && e[t + 7] === `p`) i = 8; else if (e[t + 5] === `O` && e[t + 6] === `c` && e[t + 7] === `t`) i = 9; else if (e[t + 5] === `N` && e[t + 6] === `o` && e[t + 7] === `v`) i = 10; else if (e[t + 5] === `D` && e[t + 6] === `e` && e[t + 7] === `c`) i = 11; else return; let a = e.charCodeAt(t + 9); if (a < 48 || a > 57) return; let o = e.charCodeAt(t + 10); if (o < 48 || o > 57) return; let s = (a - 48) * 10 + (o - 48); s += s < 70 ? 2e3 : 1900; let c = 0; if (e[t + 12] === `0`) { let n = e.charCodeAt(t + 13); if (n < 48 || n > 57) return; c = n - 48; } else { let n = e.charCodeAt(t + 12); if (n < 48 || n > 50) return; let r = e.charCodeAt(t + 13); if (r < 48 || r > 57 || n === 50 && r > 51) return; c = (n - 48) * 10 + (r - 48); } let l = 0; if (e[t + 15] === `0`) { let n = e.charCodeAt(t + 16); if (n < 48 || n > 57) return; l = n - 48; } else { let n = e.charCodeAt(t + 15); if (n < 48 || n > 53) return; let r = e.charCodeAt(t + 16); if (r < 48 || r > 57) return; l = (n - 48) * 10 + (r - 48); } let u = 0; if (e[t + 18] === `0`) { let n = e.charCodeAt(t + 19); if (n < 48 || n > 57) return; u = n - 48; } else { let n = e.charCodeAt(t + 18); if (n < 48 || n > 53) return; let r = e.charCodeAt(t + 19); if (r < 48 || r > 57) return; u = (n - 48) * 10 + (r - 48); } let d = new Date(Date.UTC(s, i, r, c, l, u)); return d.getUTCDay() === n ? d : void 0; } t.exports = { parseHttpDate: n }; })); var No$1 = c$12(((e, t) => { let n = q$6(), { parseCacheControlHeader: r, parseVaryHeader: i, isEtagUsable: a } = jo$1(), { parseHttpDate: o } = Mo$1(); function s() {} let c = [ 200, 203, 204, 206, 300, 301, 308, 404, 405, 410, 414, 501 ], l = [206]; var u = class { #e; #t; #n; #r; #i; #a; constructor({ store: e, type: t, cacheByDefault: n }, r, i) { this.#r = e, this.#t = t, this.#n = n, this.#e = r, this.#i = i; } onRequestStart(e, t) { this.#a?.destroy(), this.#a = void 0, this.#i.onRequestStart?.(e, t); } onRequestUpgrade(e, t, n, r) { this.#i.onRequestUpgrade?.(e, t, n, r); } onResponseStart(e, t, l, u) { let g = () => this.#i.onResponseStart?.(e, t, l, u), _ = this; if (!n.safeHTTPMethods.includes(this.#e.method) && t >= 200 && t <= 399) { try { this.#r.delete(this.#e)?.catch?.(s); } catch {} return g(); } let v = l[`cache-control`], y = l[`last-modified`] && c.includes(t); if (!v && !l.expires && !y && !this.#n) return g(); let b = v ? r(v) : {}; if (!d(this.#t, t, l, b, this.#e.headers)) return g(); let x = Date.now(), S = l.age ? f(l.age) : void 0; if (S && S >= 2147483647e3) return g(); let C = typeof l.date == `string` ? o(l.date) : void 0, w = p(this.#t, x, S, l, C, b) ?? this.#n; if (w === void 0 || S && S > w) return g(); let T = C ? C.getTime() : x, E = w + T; if (x >= E) return g(); let D; if (this.#e.headers && l.vary && (D = i(l.vary, this.#e.headers), !D)) return g(); let O = m(T, b, E), k = h(l, b), A = { statusCode: t, statusMessage: u, headers: k, vary: D, cacheControlDirectives: b, cachedAt: S ? x - S : x, staleAt: E, deleteAt: O }; if (t === 304) { let t = (t) => { if (!t) return g(); if (A.statusCode = t.statusCode, A.statusMessage = t.statusMessage, A.etag = t.etag, A.headers = { ...t.headers, ...k }, g(), this.#a = this.#r.createWriteStream(this.#e, A), !(!this.#a || !t?.body)) if (typeof t.body.values == `function`) { let n = t.body.values(), r = () => { for (let t of n) { let n = this.#a.write(t) === !1; if (this.#i.onResponseData?.(e, t), n) break; } }; this.#a.on(`error`, function() { _.#a = void 0, _.#r.delete(_.#e); }).on(`drain`, () => { r(); }).on(`close`, function() { _.#a === this && (_.#a = void 0); }), r(); } else typeof t.body.on == `function` && (t.body.on(`data`, (t) => { this.#a.write(t), this.#i.onResponseData?.(e, t); }).on(`end`, () => { this.#a.end(); }).on(`error`, () => { this.#a = void 0, this.#r.delete(this.#e); }), this.#a.on(`error`, function() { _.#a = void 0, _.#r.delete(_.#e); }).on(`close`, function() { _.#a === this && (_.#a = void 0); })); }, n = this.#r.get(this.#e); n && typeof n.then == `function` ? n.then(t) : t(n); } else { if (typeof l.etag == `string` && a(l.etag) && (A.etag = l.etag), this.#a = this.#r.createWriteStream(this.#e, A), !this.#a) return g(); this.#a.on(`drain`, () => e.resume()).on(`error`, function() { _.#a = void 0, _.#r.delete(_.#e); }).on(`close`, function() { _.#a === this && (_.#a = void 0), e.resume(); }), g(); } } onResponseData(e, t) { this.#a?.write(t) === !1 && e.pause(), this.#i.onResponseData?.(e, t); } onResponseEnd(e, t) { this.#a?.end(), this.#i.onResponseEnd?.(e, t); } onResponseError(e, t) { this.#a?.destroy(t), this.#a = void 0, this.#i.onResponseError?.(e, t); } }; function d(e, t, n, r, i) { return !(t < 200 || l.includes(t) || !c.includes(t) && !n.expires && !r.public && r[`max-age`] === void 0 && !(r.private && e === `private`) && !(r[`s-maxage`] !== void 0 && e === `shared`) || r[`no-store`] || e === `shared` && r.private === !0 || n.vary?.includes(`*`) || i?.authorization && (!r.public && !r[`s-maxage`] && !r[`must-revalidate`] || typeof i.authorization != `string` || Array.isArray(r[`no-cache`]) && r[`no-cache`].includes(`authorization`) || Array.isArray(r.private) && r.private.includes(`authorization`))); } function f(e) { let t = parseInt(Array.isArray(e) ? e[0] : e); return isNaN(t) ? void 0 : t * 1e3; } function p(e, t, n, r, i, a) { if (e === `shared`) { let e = a[`s-maxage`]; if (e !== void 0) return e > 0 ? e * 1e3 : void 0; } let s = a[`max-age`]; if (s !== void 0) return s > 0 ? s * 1e3 : void 0; if (typeof r.expires == `string`) { let e = o(r.expires); if (e) return t >= e.getTime() || i && (i >= e || n !== void 0 && n > e - i) ? void 0 : e.getTime() - t; } if (typeof r[`last-modified`] == `string`) { let e = new Date(r[`last-modified`]); if (g(e)) return e.getTime() >= t ? void 0 : (t - e.getTime()) * .1; } if (a.immutable) return 31536e3; } function m(e, t, n) { let r = -Infinity, i = -Infinity, a = -Infinity; return t[`stale-while-revalidate`] && (r = n + t[`stale-while-revalidate`] * 1e3), t[`stale-if-error`] && (i = n + t[`stale-if-error`] * 1e3), t.immutable && r === -Infinity && i === -Infinity && (a = e + 31536e6), r === -Infinity && i === -Infinity && a === -Infinity ? n + (n - e) : Math.max(n, r, i, a); } function h(e, t) { let n = [ `connection`, `proxy-authenticate`, `proxy-authentication-info`, `proxy-authorization`, `proxy-connection`, `te`, `transfer-encoding`, `upgrade`, `age` ]; e.connection && (Array.isArray(e.connection) ? n.push(...e.connection.map((e) => e.trim())) : n.push(...e.connection.split(`,`).map((e) => e.trim()))), Array.isArray(t[`no-cache`]) && n.push(...t[`no-cache`]), Array.isArray(t.private) && n.push(...t.private); let r; for (let t of n) e[t] && (r ??= { ...e }, delete r[t]); return r ?? e; } function g(e) { return e instanceof Date && Number.isFinite(e.valueOf()); } t.exports = u; })); var Po$1 = c$12(((e, n) => { let { Writable: r } = f$11(`node:stream`), { EventEmitter: i } = f$11(`node:events`), { assertCacheKey: a, assertCacheValue: o } = jo$1(); var s = class extends i { #e = 1024; #t = 104857600; #n = 5242880; #r = 0; #i = 0; #a = /* @__PURE__ */ new Map(); #o = !1; constructor(e) { if (super(), e) { if (typeof e != `object`) throw TypeError(`MemoryCacheStore options must be an object`); if (e.maxCount !== void 0) { if (typeof e.maxCount != `number` || !Number.isInteger(e.maxCount) || e.maxCount < 0) throw TypeError(`MemoryCacheStore options.maxCount must be a non-negative integer`); this.#e = e.maxCount; } if (e.maxSize !== void 0) { if (typeof e.maxSize != `number` || !Number.isInteger(e.maxSize) || e.maxSize < 0) throw TypeError(`MemoryCacheStore options.maxSize must be a non-negative integer`); this.#t = e.maxSize; } if (e.maxEntrySize !== void 0) { if (typeof e.maxEntrySize != `number` || !Number.isInteger(e.maxEntrySize) || e.maxEntrySize < 0) throw TypeError(`MemoryCacheStore options.maxEntrySize must be a non-negative integer`); this.#n = e.maxEntrySize; } } } get size() { return this.#r; } isFull() { return this.#r >= this.#t || this.#i >= this.#e; } get(e) { a(e); let t = `${e.origin}:${e.path}`, n = Date.now(), r = this.#a.get(t), i = r ? c(e, r, n) : null; return i == null ? void 0 : { statusMessage: i.statusMessage, statusCode: i.statusCode, headers: i.headers, body: i.body, vary: i.vary ? i.vary : void 0, etag: i.etag, cacheControlDirectives: i.cacheControlDirectives, cachedAt: i.cachedAt, staleAt: i.staleAt, deleteAt: i.deleteAt }; } createWriteStream(e, t) { a(e), o(t); let n = `${e.origin}:${e.path}`, i = this, s = { ...e, ...t, body: [], size: 0 }; return new r({ write(e, t, n) { typeof e == `string` && (e = Buffer.from(e, t)), s.size += e.byteLength, s.size >= i.#n ? this.destroy() : s.body.push(e), n(null); }, final(t) { let r = i.#a.get(n); r || (r = [], i.#a.set(n, r)); let a = c(e, r, Date.now()); if (a) { let e = r.indexOf(a); r.splice(e, 1, s), i.#r -= a.size; } else r.push(s), i.#i += 1; if (i.#r += s.size, i.#r > i.#t || i.#i > i.#e) { i.#o ||= (i.emit(`maxSizeExceeded`, { size: i.#r, maxSize: i.#t, count: i.#i, maxCount: i.#e }), !0); for (let [e, t] of i.#a) { for (let e of t.splice(0, t.length / 2)) i.#r -= e.size, --i.#i; t.length === 0 && i.#a.delete(e); } i.#r < i.#t && i.#i < i.#e && (i.#o = !1); } t(null); } }); } delete(e) { if (typeof e != `object`) throw TypeError(`expected key to be object, got ${typeof e}`); let t = `${e.origin}:${e.path}`; for (let e of this.#a.get(t) ?? []) this.#r -= e.size, --this.#i; this.#a.delete(t); } }; function c(e, t, n) { return t.find((t) => t.deleteAt > n && t.method === e.method && (t.vary == null || Object.keys(t.vary).every((n) => t.vary[n] === null ? e.headers[n] === void 0 : t.vary[n] === e.headers[n]))); } n.exports = s; })); var Fo$1 = c$12(((e, n) => { let r = f$11(`node:assert`); n.exports = class { #e = !1; #t; #n; #r; #i; constructor(e, t, n) { if (typeof e != `function`) throw TypeError(`callback must be a function`); this.#t = e, this.#n = t, this.#i = n; } onRequestStart(e, t) { this.#e = !1, this.#r = t; } onRequestUpgrade(e, t, n, r) { this.#n.onRequestUpgrade?.(e, t, n, r); } onResponseStart(e, t, n, i) { if (r(this.#t != null), this.#e = t === 304 || this.#i && t >= 500 && t <= 504, this.#t(this.#e, this.#r), this.#t = null, this.#e) return !0; this.#n.onRequestStart?.(e, this.#r), this.#n.onResponseStart?.(e, t, n, i); } onResponseData(e, t) { if (!this.#e) return this.#n.onResponseData?.(e, t); } onResponseEnd(e, t) { this.#e || this.#n.onResponseEnd?.(e, t); } onResponseError(e, t) { if (!this.#e) if (this.#t &&= (this.#t(!1), null), typeof this.#n.onResponseError == `function`) this.#n.onResponseError(e, t); else throw t; } }; })); var Io$1 = c$12(((e, n) => { let r = f$11(`node:assert`), { Readable: i } = f$11(`node:stream`), a = q$6(), o = No$1(), s = Po$1(), c = Fo$1(), { assertCacheStore: l, assertCacheMethods: u, makeCacheKey: d, normalizeHeaders: f, parseCacheControlHeader: p } = jo$1(), { AbortError: m } = K$6(); function h(e, t) { if (e !== void 0) { if (!Array.isArray(e)) throw TypeError(`expected ${t} to be an array or undefined, got ${typeof e}`); for (let n = 0; n < e.length; n++) { let r = e[n]; if (typeof r != `string` && !(r instanceof RegExp)) throw TypeError(`expected ${t}[${n}] to be a string or RegExp, got ${typeof r}`); } } } let g = () => {}; function _(e, t, { headers: n = {} }) { return !!(t?.[`no-cache`] || e.cacheControlDirectives?.[`no-cache`] && !Array.isArray(e.cacheControlDirectives[`no-cache`]) || n[`if-modified-since`] || n[`if-none-match`]); } function v(e, t) { let n = Date.now(); return n > e.staleAt ? t?.[`max-stale`] ? n > e.staleAt + t[`max-stale`] * 1e3 : !0 : t?.[`min-fresh`] ? e.staleAt - n <= t[`min-fresh`] * 1e3 : !1; } function y(e) { let t = e.cacheControlDirectives?.[`stale-while-revalidate`]; return t ? Date.now() <= e.staleAt + t * 1e3 : !1; } function b(e, t, n, r, i, a) { if (a?.[`only-if-cached`]) { let e = !1; try { if (typeof r.onConnect == `function` && (r.onConnect(() => { e = !0; }), e) || typeof r.onHeaders == `function` && (r.onHeaders(504, [], g, `Gateway Timeout`), e)) return; typeof r.onComplete == `function` && r.onComplete([]); } catch (e) { typeof r.onError == `function` && r.onError(e); } return !0; } return e(i, new o(t, n, r)); } function x(e, t, n, o, s, c) { let l = a.isStream(n.body) ? n.body : i.from(n.body ?? []); r(!l.destroyed, `stream should not be destroyed`), r(!l.readableDidRead, `stream should not be readableDidRead`); let u = { resume() { l.resume(); }, pause() { l.pause(); }, get paused() { return l.isPaused(); }, get aborted() { return l.destroyed; }, get reason() { return l.errored; }, abort(e) { l.destroy(e ?? new m()); } }; if (l.on(`error`, function(t) { if (!this.readableEnded) if (typeof e.onResponseError == `function`) e.onResponseError(u, t); else throw t; }).on(`close`, function() { this.errored || e.onResponseEnd?.(u, {}); }), e.onRequestStart?.(u, s), l.destroyed) return; let d = { ...n.headers, age: String(o) }; c && (d.warning = `110 - "response is stale"`), e.onResponseStart?.(u, n.statusCode, d, n.statusMessage), t.method === `HEAD` ? l.destroy() : l.on(`data`, function(t) { e.onResponseData?.(u, t); }); } function S(e, t, n, r, i, s, l) { if (!l) return b(e, t, n, r, i, s); let u = Date.now(); if (u > l.deleteAt) return e(i, new o(t, n, r)); let d = Math.round((u - l.cachedAt) / 1e3); if (s?.[`max-age`] && d >= s[`max-age`]) return e(i, r); let f = v(l, s), p = _(l, s, i); if (f || p) { if (a.isStream(i.body) && a.bodyLength(i.body) !== 0) return e(i, new o(t, n, r)); if (!p && y(l)) return x(r, i, l, d, null, !0), queueMicrotask(() => { let r = { ...i.headers, "if-modified-since": new Date(l.cachedAt).toUTCString() }; if (l.etag && (r[`if-none-match`] = l.etag), l.vary) for (let e in l.vary) l.vary[e] != null && (r[e] = l.vary[e]); e({ ...i, headers: r }, new o(t, n, { onRequestStart() {}, onRequestUpgrade() {}, onResponseStart() {}, onResponseData() {}, onResponseEnd() {}, onResponseError() {} })); }), !0; let m = !1, h = l.cacheControlDirectives[`stale-if-error`] ?? s?.[`stale-if-error`]; h && (m = u < l.staleAt + h * 1e3); let _ = { ...i.headers, "if-modified-since": new Date(l.cachedAt).toUTCString() }; if (l.etag && (_[`if-none-match`] = l.etag), l.vary) for (let e in l.vary) l.vary[e] != null && (_[e] = l.vary[e]); return e({ ...i, headers: _ }, new c((e, t) => { e ? x(r, i, l, d, t, f) : a.isStream(l.body) && l.body.on(`error`, g).destroy(); }, new o(t, n, r), m)); } a.isStream(i.body) && i.body.on(`error`, g).destroy(), x(r, i, l, d, null, !1); } n.exports = (e = {}) => { let { store: t = new s(), methods: n = [`GET`], cacheByDefault: r = void 0, type: i = `shared`, origins: o = void 0 } = e; if (typeof e != `object` || !e) throw TypeError(`expected type of opts to be an Object, got ${e === null ? `null` : typeof e}`); if (l(t, `opts.store`), u(n, `opts.methods`), h(o, `opts.origins`), r !== void 0 && typeof r != `number`) throw TypeError(`expected opts.cacheByDefault to be number or undefined, got ${typeof r}`); if (i !== void 0 && i !== `shared` && i !== `private`) throw TypeError(`expected opts.type to be shared, private, or undefined, got ${typeof i}`); let c = { store: t, methods: n, cacheByDefault: r, type: i }, m = a.safeHTTPMethods.filter((e) => n.includes(e) === !1); return (e) => (n, r) => { if (!n.origin || m.includes(n.method)) return e(n, r); if (o !== void 0) { let t = n.origin.toString().toLowerCase(), i = !1; for (let e = 0; e < o.length; e++) { let n = o[e]; if (typeof n == `string`) { if (n.toLowerCase() === t) { i = !0; break; } } else if (n.test(t)) { i = !0; break; } } if (!i) return e(n, r); } n = { ...n, headers: f(n) }; let i = n.headers?.[`cache-control`] ? p(n.headers[`cache-control`]) : void 0; if (i?.[`no-store`]) return e(n, r); let a = d(n), s = t.get(a); return s && typeof s.then == `function` ? s.then((t) => S(e, c, a, r, n, i, t)) : S(e, c, a, r, n, i, s); }; }; })); var Lo$1 = c$12(((e, n) => { let { createInflate: r, createGunzip: i, createBrotliDecompress: a, createZstdDecompress: o } = f$11(`node:zlib`), { pipeline: s } = f$11(`node:stream`), c = wo$1(), { runtimeFeatures: l } = Ma$3(), u = { gzip: i, "x-gzip": i, br: a, deflate: r, compress: r, "x-compress": r, ...l.has(`zstd`) ? { zstd: o } : {} }, d = [204, 304], f = !1; var p = class extends c { #e = []; #t; #n; constructor(e, { skipStatusCodes: t = d, skipErrorResponses: n = !0 } = {}) { super(e), this.#t = t, this.#n = n; } #r(e, t) { return !!(!e || t < 200 || this.#t.includes(t) || this.#n && t >= 400); } #i(e) { let t = e.split(`,`); if (t.length > 5) throw Error(`too many content-encodings in response: ${t.length}, maximum allowed is 5`); let n = []; for (let e = t.length - 1; e >= 0; e--) { let r = t[e].trim(); if (r) { if (!u[r]) return n.length = 0, n; n.push(u[r]()); } } return n; } #a(e, t) { e.on(`readable`, () => { let n; for (; (n = e.read()) !== null && super.onResponseData(t, n) !== !1;); }), e.on(`error`, (e) => { super.onResponseError(t, e); }); } #o(e) { let t = this.#e[0]; this.#a(t, e), t.on(`end`, () => { super.onResponseEnd(e, {}); }); } #s(e) { let t = this.#e[this.#e.length - 1]; this.#a(t, e), s(this.#e, (t) => { if (t) { super.onResponseError(e, t); return; } super.onResponseEnd(e, {}); }); } #c() { this.#e.length = 0; } onResponseStart(e, t, n, r) { let i = n[`content-encoding`]; if (this.#r(i, t)) return super.onResponseStart(e, t, n, r); let a = this.#i(i.toLowerCase()); if (a.length === 0) return this.#c(), super.onResponseStart(e, t, n, r); this.#e = a; let { "content-encoding": o, "content-length": s, ...c } = n; return this.#e.length === 1 ? this.#o(e) : this.#s(e), super.onResponseStart(e, t, c, r); } onResponseData(e, t) { if (this.#e.length > 0) { this.#e[0].write(t); return; } super.onResponseData(e, t); } onResponseEnd(e, t) { if (this.#e.length > 0) { this.#e[0].end(), this.#c(); return; } super.onResponseEnd(e, t); } onResponseError(e, t) { if (this.#e.length > 0) { for (let e of this.#e) e.destroy(t); this.#c(); } super.onResponseError(e, t); } }; function m(e = {}) { return f ||= (process.emitWarning(`DecompressInterceptor is experimental and subject to change`, `ExperimentalWarning`), !0), (t) => (n, r) => t(n, new p(r, e)); } n.exports = m; })); var Ro$1 = c$12(((e, t) => { let { RequestAbortedError: n } = K$6(), r = 5 * 1024 * 1024; t.exports = class { #e; #t = []; #n = r; #r = 0; #i = {}; #a = ``; #o = !1; #s = !1; #c = !1; #l = !1; #u = null; #d = null; constructor(e, t, n = r) { this.#e = e, this.#d = t, this.#n = n; } addWaitingHandler(e) { if (this.#l || this.#c) return !1; let t = this.#f(e), n = t.controller; try { if (e.onRequestStart?.(n, null), n.aborted) return t.done = !0, !0; this.#s && e.onResponseStart?.(n, this.#r, this.#i, this.#a); } catch { return t.done = !0, !0; } return n.aborted || this.#t.push(t), !0; } onRequestStart(e, t) { this.#u = e, this.#e.onRequestStart?.(e, t); } onRequestUpgrade(e, t, n, r) { this.#e.onRequestUpgrade?.(e, t, n, r); } onResponseStart(e, t, n, r) { this.#s = !0, this.#r = t, this.#i = n, this.#a = r, this.#e.onResponseStart?.(e, t, n, r); for (let e of this.#t) { let { handler: i, controller: a } = e; if (e.done || a.aborted) { e.done = !0; continue; } try { i.onResponseStart?.(a, t, n, r); } catch {} a.aborted && (e.done = !0); } this.#g(); } onResponseData(e, t) { if (!(this.#o || this.#l)) { this.#c = !0, this.#e.onResponseData?.(e, t); for (let e of this.#t) { let { handler: n, controller: r } = e; if (e.done || r.aborted) { e.done = !0; continue; } if (r.paused) { this.#p(e, t); continue; } try { n.onResponseData?.(r, t); } catch {} r.aborted && (e.done = !0, e.bufferedChunks = [], e.bufferedBytes = 0); } this.#g(); } } onResponseEnd(e, t) { if (!(this.#o || this.#l)) { this.#l = !0, this.#e.onResponseEnd?.(e, t); for (let e of this.#t) { if (e.done || e.controller.aborted) { e.done = !0; continue; } if (this.#m(e), e.done || e.controller.aborted) { e.done = !0; continue; } if (e.controller.paused && e.bufferedChunks.length > 0) { e.pendingTrailers = t; continue; } try { e.handler.onResponseEnd?.(e.controller, t); } catch {} e.done = !0; } this.#g(), this.#d?.(); } } onResponseError(e, t) { if (!this.#l) { this.#o = !0, this.#l = !0, this.#e.onResponseError?.(e, t); for (let e of this.#t) this.#h(e, t); this.#t = [], this.#d?.(); } } #f(e) { let t = { handler: e, controller: null, bufferedChunks: [], bufferedBytes: 0, pendingTrailers: null, done: !1 }, n = { aborted: !1, paused: !1, reason: null }; return t.controller = { resume: () => { if (!n.aborted) { if (n.paused = !1, this.#m(t), this.#l && t.pendingTrailers && t.bufferedChunks.length === 0 && !n.paused && !n.aborted) { try { t.handler.onResponseEnd?.(t.controller, t.pendingTrailers); } catch {} t.pendingTrailers = null, t.done = !0; } this.#g(); } }, pause: () => { n.aborted || (n.paused = !0); }, get paused() { return n.paused; }, get aborted() { return n.aborted; }, get reason() { return n.reason; }, abort: (e) => { n.aborted = !0, n.reason = e ?? null, t.done = !0, t.pendingTrailers = null, t.bufferedChunks = [], t.bufferedBytes = 0; } }, t; } #p(e, t) { if (e.done || e.controller.aborted) { e.done = !0, e.bufferedChunks = [], e.bufferedBytes = 0; return; } let r = Buffer.from(t); if (e.bufferedChunks.push(r), e.bufferedBytes += r.length, e.bufferedBytes > this.#n) { let t = new n(`Deduplicated waiting handler exceeded maxBufferSize (${this.#n} bytes) while paused`); this.#h(e, t); } } #m(e) { let { handler: t, controller: n } = e; for (; !e.done && !n.aborted && !n.paused && e.bufferedChunks.length > 0;) { let r = e.bufferedChunks.shift(); e.bufferedBytes -= r.length; try { t.onResponseData?.(n, r); } catch {} if (n.aborted) { e.done = !0, e.pendingTrailers = null, e.bufferedChunks = [], e.bufferedBytes = 0; break; } } } #h(e, t) { if (!e.done) { e.done = !0, e.pendingTrailers = null, e.bufferedChunks = [], e.bufferedBytes = 0; try { e.controller.abort(t), e.handler.onResponseError?.(e.controller, t); } catch {} } } #g() { this.#t = this.#t.filter((e) => e.done === !1); } }; })); var zo$1 = c$12(((e, n) => { let r = f$11(`node:diagnostics_channel`), i = q$6(), a = Ro$1(), { normalizeHeaders: o, makeCacheKey: s, makeDeduplicationKey: c } = jo$1(), l = r.channel(`undici:request:pending-requests`); n.exports = (e = {}) => { let { methods: t = [`GET`], skipHeaderNames: n = [], excludeHeaderNames: r = [], maxBufferSize: u = 5 * 1024 * 1024 } = e; if (typeof e != `object` || !e) throw TypeError(`expected type of opts to be an Object, got ${e === null ? `null` : typeof e}`); if (!Array.isArray(t)) throw TypeError(`expected opts.methods to be an array, got ${typeof t}`); for (let e of t) if (!i.safeHTTPMethods.includes(e)) throw TypeError(`expected opts.methods to only contain safe HTTP methods, got ${e}`); if (!Array.isArray(n)) throw TypeError(`expected opts.skipHeaderNames to be an array, got ${typeof n}`); if (!Array.isArray(r)) throw TypeError(`expected opts.excludeHeaderNames to be an array, got ${typeof r}`); if (!Number.isFinite(u) || u <= 0) throw TypeError(`expected opts.maxBufferSize to be a positive finite number, got ${u}`); let d = new Set(n.map((e) => e.toLowerCase())), f = new Set(r.map((e) => e.toLowerCase())), p = /* @__PURE__ */ new Map(); return (e) => (n, r) => { if (!n.origin || t.includes(n.method) === !1) return e(n, r); if (n = { ...n, headers: o(n) }, d.size > 0) { for (let t of Object.keys(n.headers)) if (d.has(t.toLowerCase())) return e(n, r); } let i = c(s(n), f), m = p.get(i); if (m) return m.addWaitingHandler(r) ? !0 : e(n, r); let h = new a(r, () => { p.delete(i), l.hasSubscribers && l.publish({ size: p.size, key: i, type: `removed` }); }, u); return p.set(i, h), l.hasSubscribers && l.publish({ size: p.size, key: i, type: `added` }), e(n, h); }; }; })); var Bo$1 = c$12(((e, n) => { let { Writable: r } = f$11(`node:stream`), { assertCacheKey: i, assertCacheValue: a } = jo$1(), o, s = 2 * 1e3 * 1e3 * 1e3; n.exports = class { #e = s; #t = Infinity; #n; #r; #i; #a; #o; #s; #c; #l; constructor(e) { if (e) { if (typeof e != `object`) throw TypeError(`SqliteCacheStore options must be an object`); if (e.maxEntrySize !== void 0) { if (typeof e.maxEntrySize != `number` || !Number.isInteger(e.maxEntrySize) || e.maxEntrySize < 0) throw TypeError(`SqliteCacheStore options.maxEntrySize must be a non-negative integer`); if (e.maxEntrySize > s) throw TypeError(`SqliteCacheStore options.maxEntrySize must be less than 2gb`); this.#e = e.maxEntrySize; } if (e.maxCount !== void 0) { if (typeof e.maxCount != `number` || !Number.isInteger(e.maxCount) || e.maxCount < 0) throw TypeError(`SqliteCacheStore options.maxCount must be a non-negative integer`); this.#t = e.maxCount; } } o ||= f$11(`node:sqlite`).DatabaseSync, this.#n = new o(e?.location ?? `:memory:`), this.#n.exec(` PRAGMA journal_mode = WAL; PRAGMA synchronous = NORMAL; PRAGMA temp_store = memory; PRAGMA optimize; CREATE TABLE IF NOT EXISTS cacheInterceptorV3 ( -- Data specific to us id INTEGER PRIMARY KEY AUTOINCREMENT, url TEXT NOT NULL, method TEXT NOT NULL, -- Data returned to the interceptor body BUF NULL, deleteAt INTEGER NOT NULL, statusCode INTEGER NOT NULL, statusMessage TEXT NOT NULL, headers TEXT NULL, cacheControlDirectives TEXT NULL, etag TEXT NULL, vary TEXT NULL, cachedAt INTEGER NOT NULL, staleAt INTEGER NOT NULL ); CREATE INDEX IF NOT EXISTS idx_cacheInterceptorV3_getValuesQuery ON cacheInterceptorV3(url, method, deleteAt); CREATE INDEX IF NOT EXISTS idx_cacheInterceptorV3_deleteByUrlQuery ON cacheInterceptorV3(deleteAt); `), this.#r = this.#n.prepare(` SELECT id, body, deleteAt, statusCode, statusMessage, headers, etag, cacheControlDirectives, vary, cachedAt, staleAt FROM cacheInterceptorV3 WHERE url = ? AND method = ? ORDER BY deleteAt ASC `), this.#i = this.#n.prepare(` UPDATE cacheInterceptorV3 SET body = ?, deleteAt = ?, statusCode = ?, statusMessage = ?, headers = ?, etag = ?, cacheControlDirectives = ?, cachedAt = ?, staleAt = ? WHERE id = ? `), this.#a = this.#n.prepare(` INSERT INTO cacheInterceptorV3 ( url, method, body, deleteAt, statusCode, statusMessage, headers, etag, cacheControlDirectives, vary, cachedAt, staleAt ) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) `), this.#s = this.#n.prepare(`DELETE FROM cacheInterceptorV3 WHERE url = ?`), this.#c = this.#n.prepare(`SELECT COUNT(*) AS total FROM cacheInterceptorV3`), this.#o = this.#n.prepare(`DELETE FROM cacheInterceptorV3 WHERE deleteAt <= ?`), this.#l = this.#t === Infinity ? null : this.#n.prepare(` DELETE FROM cacheInterceptorV3 WHERE id IN ( SELECT id FROM cacheInterceptorV3 ORDER BY cachedAt ASC LIMIT ? ) `); } close() { this.#n.close(); } get(e) { i(e); let t = this.#f(e); return t ? { body: t.body ? Buffer.from(t.body.buffer, t.body.byteOffset, t.body.byteLength) : void 0, statusCode: t.statusCode, statusMessage: t.statusMessage, headers: t.headers ? JSON.parse(t.headers) : void 0, etag: t.etag ? t.etag : void 0, vary: t.vary ? JSON.parse(t.vary) : void 0, cacheControlDirectives: t.cacheControlDirectives ? JSON.parse(t.cacheControlDirectives) : void 0, cachedAt: t.cachedAt, staleAt: t.staleAt, deleteAt: t.deleteAt } : void 0; } set(e, t) { i(e); let n = this.#d(e), r = Array.isArray(t.body) ? Buffer.concat(t.body) : t.body, a = r?.byteLength; if (a && a > this.#e) return; let o = this.#f(e, !0); o ? this.#i.run(r, t.deleteAt, t.statusCode, t.statusMessage, t.headers ? JSON.stringify(t.headers) : null, t.etag ? t.etag : null, t.cacheControlDirectives ? JSON.stringify(t.cacheControlDirectives) : null, t.cachedAt, t.staleAt, o.id) : (this.#a.run(n, e.method, r, t.deleteAt, t.statusCode, t.statusMessage, t.headers ? JSON.stringify(t.headers) : null, t.etag ? t.etag : null, t.cacheControlDirectives ? JSON.stringify(t.cacheControlDirectives) : null, t.vary ? JSON.stringify(t.vary) : null, t.cachedAt, t.staleAt), this.#u()); } createWriteStream(e, t) { i(e), a(t); let n = 0, o = [], s = this; return new r({ decodeStrings: !0, write(e, t, r) { n += e.byteLength, n < s.#e ? o.push(e) : this.destroy(), r(); }, final(n) { s.set(e, { ...t, body: o }), n(); } }); } delete(e) { if (typeof e != `object`) throw TypeError(`expected key to be object, got ${typeof e}`); this.#s.run(this.#d(e)); } #u() { if (Number.isFinite(this.#t) && this.size <= this.#t) return 0; { let e = this.#o.run(Date.now()).changes; if (e) return e; } { let e = this.#l?.run(Math.max(Math.floor(this.#t * .1), 1)).changes; if (e) return e; } return 0; } get size() { let { total: e } = this.#c.get(); return e; } #d(e) { return `${e.origin}/${e.path}`; } #f(e, t = !1) { let n = this.#d(e), { headers: r, method: i } = e, a = this.#r.all(n, i); if (a.length === 0) return; let o = Date.now(); for (let e of a) { if (o >= e.deleteAt && !t) continue; let n = !0; if (e.vary) { let t = JSON.parse(e.vary); for (let e in t) if (!c(r[e], t[e])) { n = !1; break; } } if (n) return e; } } }; function c(e, t) { return e == null && t == null ? !0 : e == null && t != null || e != null && t == null ? !1 : Array.isArray(e) && Array.isArray(t) ? e.length === t.length ? e.every((e, n) => e === t[n]) : !1 : e === t; } })); var Vo$1 = c$12(((e, n) => { let { kConstruct: r } = da$3(), { kEnumerableProperty: i } = q$6(), { iteratorMixin: a, isValidHeaderName: o, isValidHeaderValue: s } = Pa$3(), { webidl: c } = Na$3(), l = f$11(`node:assert`), u = f$11(`node:util`); function d(e) { return e === 10 || e === 13 || e === 9 || e === 32; } function f(e) { let t = 0, n = e.length; for (; n > t && d(e.charCodeAt(n - 1));) --n; for (; n > t && d(e.charCodeAt(t));) ++t; return t === 0 && n === e.length ? e : e.substring(t, n); } function p(e, t) { if (Array.isArray(t)) for (let n = 0; n < t.length; ++n) { let r = t[n]; if (r.length !== 2) throw c.errors.exception({ header: `Headers constructor`, message: `expected name/value pair to be length 2, found ${r.length}.` }); m(e, r[0], r[1]); } else if (typeof t == `object` && t) { let n = Object.keys(t); for (let r = 0; r < n.length; ++r) m(e, n[r], t[n[r]]); } else throw c.errors.conversionFailed({ prefix: `Headers constructor`, argument: `Argument 1`, types: [`sequence>`, `record`] }); } function m(e, t, n) { if (n = f(n), !o(t)) throw c.errors.invalidArgument({ prefix: `Headers.append`, value: t, type: `header name` }); if (!s(n)) throw c.errors.invalidArgument({ prefix: `Headers.append`, value: n, type: `header value` }); if (y(e) === `immutable`) throw TypeError(`immutable`); return x(e).append(t, n, !1); } function h(e) { let t = x(e); if (!t) return []; if (t.sortedMap) return t.sortedMap; let n = [], r = t.toSortedArray(), i = t.cookies; if (i === null || i.length === 1) return t.sortedMap = r; for (let e = 0; e < r.length; ++e) { let { 0: t, 1: a } = r[e]; if (t === `set-cookie`) for (let e = 0; e < i.length; ++e) n.push([t, i[e]]); else n.push([t, a]); } return t.sortedMap = n; } function g(e, t) { return e[0] < t[0] ? -1 : 1; } var _ = class e { cookies = null; sortedMap; headersMap; constructor(t) { t instanceof e ? (this.headersMap = new Map(t.headersMap), this.sortedMap = t.sortedMap, this.cookies = t.cookies === null ? null : [...t.cookies]) : (this.headersMap = new Map(t), this.sortedMap = null); } contains(e, t) { return this.headersMap.has(t ? e : e.toLowerCase()); } clear() { this.headersMap.clear(), this.sortedMap = null, this.cookies = null; } append(e, t, n) { this.sortedMap = null; let r = n ? e : e.toLowerCase(), i = this.headersMap.get(r); if (i) { let e = r === `cookie` ? `; ` : `, `; this.headersMap.set(r, { name: i.name, value: `${i.value}${e}${t}` }); } else this.headersMap.set(r, { name: e, value: t }); r === `set-cookie` && (this.cookies ??= []).push(t); } set(e, t, n) { this.sortedMap = null; let r = n ? e : e.toLowerCase(); r === `set-cookie` && (this.cookies = [t]), this.headersMap.set(r, { name: e, value: t }); } delete(e, t) { this.sortedMap = null, t || (e = e.toLowerCase()), e === `set-cookie` && (this.cookies = null), this.headersMap.delete(e); } get(e, t) { return this.headersMap.get(t ? e : e.toLowerCase())?.value ?? null; } *[Symbol.iterator]() { for (let { 0: e, 1: { value: t } } of this.headersMap) yield [e, t]; } get entries() { let e = {}; if (this.headersMap.size !== 0) for (let { name: t, value: n } of this.headersMap.values()) e[t] = n; return e; } rawValues() { return this.headersMap.values(); } get entriesList() { let e = []; if (this.headersMap.size !== 0) for (let { 0: t, 1: { name: n, value: r } } of this.headersMap) if (t === `set-cookie`) for (let t of this.cookies) e.push([n, t]); else e.push([n, r]); return e; } toSortedArray() { let e = this.headersMap.size, t = Array(e); if (e <= 32) { if (e === 0) return t; let n = this.headersMap[Symbol.iterator](), r = n.next().value; t[0] = [r[0], r[1].value], l(r[1].value !== null); for (let r = 1, i = 0, a = 0, o = 0, s = 0, c, u; r < e; ++r) { for (u = n.next().value, c = t[r] = [u[0], u[1].value], l(c[1] !== null), o = 0, a = r; o < a;) s = o + (a - o >> 1), t[s][0] <= c[0] ? o = s + 1 : a = s; if (r !== s) { for (i = r; i > o;) t[i] = t[--i]; t[o] = c; } } if (!n.next().done) throw TypeError(`Unreachable`); return t; } else { let e = 0; for (let { 0: n, 1: { value: r } } of this.headersMap) t[e++] = [n, r], l(r !== null); return t.sort(g); } } }, v = class e { #e; #t; constructor(e = void 0) { c.util.markAsUncloneable(this), e !== r && (this.#t = new _(), this.#e = `none`, e !== void 0 && (e = c.converters.HeadersInit(e, `Headers constructor`, `init`), p(this, e))); } append(t, n) { c.brandCheck(this, e), c.argumentLengthCheck(arguments, 2, `Headers.append`); let r = `Headers.append`; return t = c.converters.ByteString(t, r, `name`), n = c.converters.ByteString(n, r, `value`), m(this, t, n); } delete(t) { if (c.brandCheck(this, e), c.argumentLengthCheck(arguments, 1, `Headers.delete`), t = c.converters.ByteString(t, `Headers.delete`, `name`), !o(t)) throw c.errors.invalidArgument({ prefix: `Headers.delete`, value: t, type: `header name` }); if (this.#e === `immutable`) throw TypeError(`immutable`); this.#t.contains(t, !1) && this.#t.delete(t, !1); } get(t) { c.brandCheck(this, e), c.argumentLengthCheck(arguments, 1, `Headers.get`); let n = `Headers.get`; if (t = c.converters.ByteString(t, n, `name`), !o(t)) throw c.errors.invalidArgument({ prefix: n, value: t, type: `header name` }); return this.#t.get(t, !1); } has(t) { c.brandCheck(this, e), c.argumentLengthCheck(arguments, 1, `Headers.has`); let n = `Headers.has`; if (t = c.converters.ByteString(t, n, `name`), !o(t)) throw c.errors.invalidArgument({ prefix: n, value: t, type: `header name` }); return this.#t.contains(t, !1); } set(t, n) { c.brandCheck(this, e), c.argumentLengthCheck(arguments, 2, `Headers.set`); let r = `Headers.set`; if (t = c.converters.ByteString(t, r, `name`), n = c.converters.ByteString(n, r, `value`), n = f(n), !o(t)) throw c.errors.invalidArgument({ prefix: r, value: t, type: `header name` }); if (!s(n)) throw c.errors.invalidArgument({ prefix: r, value: n, type: `header value` }); if (this.#e === `immutable`) throw TypeError(`immutable`); this.#t.set(t, n, !1); } getSetCookie() { c.brandCheck(this, e); let t = this.#t.cookies; return t ? [...t] : []; } [u.inspect.custom](e, t) { return t.depth ??= e, `Headers ${u.formatWithOptions(t, this.#t.entries)}`; } static getHeadersGuard(e) { return e.#e; } static setHeadersGuard(e, t) { e.#e = t; } static getHeadersList(e) { return e.#t; } static setHeadersList(e, t) { e.#t = t; } }; let { getHeadersGuard: y, setHeadersGuard: b, getHeadersList: x, setHeadersList: S } = v; Reflect.deleteProperty(v, `getHeadersGuard`), Reflect.deleteProperty(v, `setHeadersGuard`), Reflect.deleteProperty(v, `getHeadersList`), Reflect.deleteProperty(v, `setHeadersList`), a(`Headers`, v, h, 0, 1), Object.defineProperties(v.prototype, { append: i, delete: i, get: i, has: i, set: i, getSetCookie: i, [Symbol.toStringTag]: { value: `Headers`, configurable: !0 }, [u.inspect.custom]: { enumerable: !1 } }), c.converters.HeadersInit = function(e, t, n) { if (c.util.Type(e) === c.util.Types.OBJECT) { let r = Reflect.get(e, Symbol.iterator); if (!u.types.isProxy(e) && r === v.prototype.entries) try { return x(e).entriesList; } catch {} return typeof r == `function` ? c.converters[`sequence>`](e, t, n, r.bind(e)) : c.converters[`record`](e, t, n); } throw c.errors.conversionFailed({ prefix: `Headers constructor`, argument: `Argument 1`, types: [`sequence>`, `record`] }); }, n.exports = { fill: p, compareHeaderName: g, Headers: v, HeadersList: _, getHeadersGuard: y, setHeadersGuard: b, setHeadersList: S, getHeadersList: x }; })); var Ho$1 = c$12(((e, n) => { let { Headers: r, HeadersList: i, fill: a, getHeadersGuard: o, setHeadersGuard: s, setHeadersList: c } = Vo$1(), { extractBody: l, cloneBody: u, mixinBody: d, streamRegistry: f, bodyUnusable: p } = Ra$3(), m = q$6(), h = f$11(`node:util`), { kEnumerableProperty: g } = m, { isValidReasonPhrase: _, isCancelled: v, isAborted: y, isErrorLike: b, environmentSettingsObject: x } = Pa$3(), { redirectStatusSet: S, nullBodyStatus: C } = Da$3(), { webidl: w } = Na$3(), { URLSerializer: T } = ja$3(), { kConstruct: E } = da$3(), D = f$11(`node:assert`), { isomorphicEncode: O, serializeJavascriptValueToJSONString: k } = Aa$3(), A = new TextEncoder(`utf-8`); var j = class e { #e; #t; static error() { return ie(L(), `immutable`); } static json(e, t = void 0) { w.argumentLengthCheck(arguments, 1, `Response.json`), t !== null && (t = w.converters.ResponseInit(t)); let n = l(A.encode(k(e))), r = ie(ee({}), `response`); return z(r, t, { body: n[0], type: `application/json` }), r; } static redirect(e, t = 302) { w.argumentLengthCheck(arguments, 1, `Response.redirect`), e = w.converters.USVString(e), t = w.converters[`unsigned short`](t); let n; try { n = new URL(e, x.settingsObject.baseUrl); } catch (t) { throw TypeError(`Failed to parse URL from ${e}`, { cause: t }); } if (!S.has(t)) throw RangeError(`Invalid status code ${t}`); let r = ie(ee({}), `immutable`); r.#t.status = t; let i = O(T(n)); return r.#t.headersList.append(`location`, i, !0), r; } constructor(e = null, t = void 0) { if (w.util.markAsUncloneable(this), e === E) return; e !== null && (e = w.converters.BodyInit(e, `Response`, `body`)), t = w.converters.ResponseInit(t), this.#t = ee({}), this.#e = new r(E), s(this.#e, `response`), c(this.#e, this.#t.headersList); let n = null; if (e != null) { let [t, r] = l(e); n = { body: t, type: r }; } z(this, t, n); } get type() { return w.brandCheck(this, e), this.#t.type; } get url() { w.brandCheck(this, e); let t = this.#t.urlList, n = t[t.length - 1] ?? null; return n === null ? `` : T(n, !0); } get redirected() { return w.brandCheck(this, e), this.#t.urlList.length > 1; } get status() { return w.brandCheck(this, e), this.#t.status; } get ok() { return w.brandCheck(this, e), this.#t.status >= 200 && this.#t.status <= 299; } get statusText() { return w.brandCheck(this, e), this.#t.statusText; } get headers() { return w.brandCheck(this, e), this.#e; } get body() { return w.brandCheck(this, e), this.#t.body ? this.#t.body.stream : null; } get bodyUsed() { return w.brandCheck(this, e), !!this.#t.body && m.isDisturbed(this.#t.body.stream); } clone() { if (w.brandCheck(this, e), p(this.#t)) throw w.errors.exception({ header: `Response.clone`, message: `Body has already been consumed.` }); let t = I(this.#t); return this.#t.urlList.length !== 0 && this.#t.body?.stream && f.register(this, new WeakRef(this.#t.body.stream)), ie(t, o(this.#e)); } [h.inspect.custom](e, t) { t.depth === null && (t.depth = 2), t.colors ??= !0; let n = { status: this.status, statusText: this.statusText, headers: this.headers, body: this.body, bodyUsed: this.bodyUsed, ok: this.ok, redirected: this.redirected, type: this.type, url: this.url }; return `Response ${h.formatWithOptions(t, n)}`; } static getResponseHeaders(e) { return e.#e; } static setResponseHeaders(e, t) { e.#e = t; } static getResponseState(e) { return e.#t; } static setResponseState(e, t) { e.#t = t; } }; let { getResponseHeaders: M, setResponseHeaders: N, getResponseState: P, setResponseState: F } = j; Reflect.deleteProperty(j, `getResponseHeaders`), Reflect.deleteProperty(j, `setResponseHeaders`), Reflect.deleteProperty(j, `getResponseState`), Reflect.deleteProperty(j, `setResponseState`), d(j, P), Object.defineProperties(j.prototype, { type: g, url: g, status: g, ok: g, redirected: g, statusText: g, headers: g, clone: g, body: g, bodyUsed: g, [Symbol.toStringTag]: { value: `Response`, configurable: !0 } }), Object.defineProperties(j, { json: g, redirect: g, error: g }); function I(e) { if (e.internalResponse) return ne(I(e.internalResponse), e.type); let t = ee({ ...e, body: null }); return e.body != null && (t.body = u(e.body)), t; } function ee(e) { return { aborted: !1, rangeRequested: !1, timingAllowPassed: !1, requestIncludesCredentials: !1, type: `default`, status: 200, timingInfo: null, cacheState: ``, statusText: ``, ...e, headersList: e?.headersList ? new i(e?.headersList) : new i(), urlList: e?.urlList ? [...e.urlList] : [] }; } function L(e) { return ee({ type: `error`, status: 0, error: b(e) ? e : Error(e && String(e)), aborted: e && e.name === `AbortError` }); } function te(e) { return e.type === `error` && e.status === 0; } function R(e, t) { return t = { internalResponse: e, ...t }, new Proxy(e, { get(e, n) { return n in t ? t[n] : e[n]; }, set(e, n, r) { return D(!(n in t)), e[n] = r, !0; } }); } function ne(e, t) { if (t === `basic`) return R(e, { type: `basic`, headersList: e.headersList }); if (t === `cors`) return R(e, { type: `cors`, headersList: e.headersList }); if (t === `opaque`) return R(e, { type: `opaque`, urlList: [], status: 0, statusText: ``, body: null }); if (t === `opaqueredirect`) return R(e, { type: `opaqueredirect`, status: 0, statusText: ``, headersList: [], body: null }); D(!1); } function re(e, t = null) { return D(v(e)), y(e) ? L(Object.assign(new DOMException(`The operation was aborted.`, `AbortError`), { cause: t })) : L(Object.assign(new DOMException(`Request was cancelled.`), { cause: t })); } function z(e, t, n) { if (t.status !== null && (t.status < 200 || t.status > 599)) throw RangeError(`init["status"] must be in the range of 200 to 599, inclusive.`); if (`statusText` in t && t.statusText != null && !_(String(t.statusText))) throw TypeError(`Invalid statusText`); if (`status` in t && t.status != null && (P(e).status = t.status), `statusText` in t && t.statusText != null && (P(e).statusText = t.statusText), `headers` in t && t.headers != null && a(M(e), t.headers), n) { if (C.includes(e.status)) throw w.errors.exception({ header: `Response constructor`, message: `Invalid response status code ${e.status}` }); P(e).body = n.body, n.type != null && !P(e).headersList.contains(`content-type`, !0) && P(e).headersList.append(`content-type`, n.type, !0); } } function ie(e, t) { let n = new j(E); F(n, e); let i = new r(E); return N(n, i), c(i, e.headersList), s(i, t), e.urlList.length !== 0 && e.body?.stream && f.register(n, new WeakRef(e.body.stream)), n; } w.converters.XMLHttpRequestBodyInit = function(e, t, n) { return typeof e == `string` ? w.converters.USVString(e, t, n) : w.is.Blob(e) || w.is.BufferSource(e) || w.is.FormData(e) || w.is.URLSearchParams(e) ? e : w.converters.DOMString(e, t, n); }, w.converters.BodyInit = function(e, t, n) { return w.is.ReadableStream(e) || e?.[Symbol.asyncIterator] ? e : w.converters.XMLHttpRequestBodyInit(e, t, n); }, w.converters.ResponseInit = w.dictionaryConverter([ { key: `status`, converter: w.converters[`unsigned short`], defaultValue: () => 200 }, { key: `statusText`, converter: w.converters.ByteString, defaultValue: () => `` }, { key: `headers`, converter: w.converters.HeadersInit } ]), w.is.Response = w.util.MakeTypeAssertion(j), n.exports = { isNetworkError: te, makeNetworkError: L, makeResponse: ee, makeAppropriateNetworkError: re, filterResponse: ne, Response: j, cloneResponse: I, fromInnerResponse: ie, getResponseState: P }; })); var Uo$1 = c$12(((e, n) => { let { extractBody: r, mixinBody: i, cloneBody: a, bodyUnusable: o } = Ra$3(), { Headers: s, fill: c, HeadersList: l, setHeadersGuard: u, getHeadersGuard: d, setHeadersList: f, getHeadersList: p } = Vo$1(), m = q$6(), h = f$11(`node:util`), { isValidHTTPToken: g, sameOrigin: _, environmentSettingsObject: v } = Pa$3(), { forbiddenMethodsSet: y, corsSafeListedMethodsSet: b, referrerPolicy: x, requestRedirect: S, requestMode: C, requestCredentials: w, requestCache: T, requestDuplex: E } = Da$3(), { kEnumerableProperty: D, normalizedMethodRecordsBase: O, normalizedMethodRecords: k } = m, { webidl: A } = Na$3(), { URLSerializer: j } = ja$3(), { kConstruct: M } = da$3(), N = f$11(`node:assert`), { getMaxListeners: P, setMaxListeners: F, defaultMaxListeners: I } = f$11(`node:events`), ee = Symbol(`abortController`), L = new FinalizationRegistry(({ signal: e, abort: t }) => { e.removeEventListener(`abort`, t); }), te = /* @__PURE__ */ new WeakMap(), R; try { R = P(new AbortController().signal) > 0; } catch { R = !1; } function ne(e) { return t; function t() { let n = e.deref(); if (n !== void 0) { L.unregister(t), this.removeEventListener(`abort`, t), n.abort(this.reason); let e = te.get(n.signal); if (e !== void 0) { if (e.size !== 0) { for (let t of e) { let e = t.deref(); e !== void 0 && e.abort(this.reason); } e.clear(); } te.delete(n.signal); } } } } let re = !1; var z = class e { #e; #t; #n; #r; constructor(e, t = void 0) { if (A.util.markAsUncloneable(this), e === M) return; A.argumentLengthCheck(arguments, 1, `Request constructor`), e = A.converters.RequestInfo(e), t = A.converters.RequestInit(t); let n = null, i = null, a = v.settingsObject.baseUrl, d = null; if (typeof e == `string`) { this.#t = t.dispatcher; let r; try { r = new URL(e, a); } catch (t) { throw TypeError(`Failed to parse URL from ` + e, { cause: t }); } if (r.username || r.password) throw TypeError(`Request cannot be constructed from a URL that includes credentials: ` + e); n = B({ urlList: [r] }), i = `cors`; } else N(A.is.Request(e)), n = e.#r, d = e.#e, this.#t = t.dispatcher || e.#t; let h = v.settingsObject.origin, x = `client`; if (n.window?.constructor?.name === `EnvironmentSettingsObject` && _(n.window, h) && (x = n.window), t.window != null) throw TypeError(`'window' option '${x}' must be null`); `window` in t && (x = `no-window`), n = B({ method: n.method, headersList: n.headersList, unsafeRequest: n.unsafeRequest, client: v.settingsObject, window: x, priority: n.priority, origin: n.origin, referrer: n.referrer, referrerPolicy: n.referrerPolicy, mode: n.mode, credentials: n.credentials, cache: n.cache, redirect: n.redirect, integrity: n.integrity, keepalive: n.keepalive, reloadNavigation: n.reloadNavigation, historyNavigation: n.historyNavigation, urlList: [...n.urlList] }); let S = Object.keys(t).length !== 0; if (S && (n.mode === `navigate` && (n.mode = `same-origin`), n.reloadNavigation = !1, n.historyNavigation = !1, n.origin = `client`, n.referrer = `client`, n.referrerPolicy = ``, n.url = n.urlList[n.urlList.length - 1], n.urlList = [n.url]), t.referrer !== void 0) { let e = t.referrer; if (e === ``) n.referrer = `no-referrer`; else { let t; try { t = new URL(e, a); } catch (t) { throw TypeError(`Referrer "${e}" is not a valid URL.`, { cause: t }); } t.protocol === `about:` && t.hostname === `client` || h && !_(t, v.settingsObject.baseUrl) ? n.referrer = `client` : n.referrer = t; } } t.referrerPolicy !== void 0 && (n.referrerPolicy = t.referrerPolicy); let C; if (C = t.mode === void 0 ? i : t.mode, C === `navigate`) throw A.errors.exception({ header: `Request constructor`, message: `invalid request mode navigate.` }); if (C != null && (n.mode = C), t.credentials !== void 0 && (n.credentials = t.credentials), t.cache !== void 0 && (n.cache = t.cache), n.cache === `only-if-cached` && n.mode !== `same-origin`) throw TypeError(`'only-if-cached' can be set only with 'same-origin' mode`); if (t.redirect !== void 0 && (n.redirect = t.redirect), t.integrity != null && (n.integrity = String(t.integrity)), t.keepalive !== void 0 && (n.keepalive = !!t.keepalive), t.method !== void 0) { let e = t.method, r = k[e]; if (r !== void 0) n.method = r; else { if (!g(e)) throw TypeError(`'${e}' is not a valid HTTP method.`); let t = e.toUpperCase(); if (y.has(t)) throw TypeError(`'${e}' HTTP method is unsupported.`); e = O[t] ?? e, n.method = e; } !re && n.method === `patch` && (process.emitWarning("Using `patch` is highly likely to result in a `405 Method Not Allowed`. `PATCH` is much more likely to succeed.", { code: `UNDICI-FETCH-patch` }), re = !0); } t.signal !== void 0 && (d = t.signal), this.#r = n; let w = new AbortController(); if (this.#e = w.signal, d != null) if (d.aborted) w.abort(d.reason); else { this[ee] = w; let e = ne(new WeakRef(w)); R && P(d) === I && F(1500, d), m.addAbortListener(d, e), L.register(w, { signal: d, abort: e }, e); } if (this.#n = new s(M), f(this.#n, n.headersList), u(this.#n, `request`), C === `no-cors`) { if (!b.has(n.method)) throw TypeError(`'${n.method} is unsupported in no-cors mode.`); u(this.#n, `request-no-cors`); } if (S) { let e = p(this.#n), n = t.headers === void 0 ? new l(e) : t.headers; if (e.clear(), n instanceof l) { for (let { name: t, value: r } of n.rawValues()) e.append(t, r, !1); e.cookies = n.cookies; } else c(this.#n, n); } let T = A.is.Request(e) ? e.#r.body : null; if ((t.body != null || T != null) && (n.method === `GET` || n.method === `HEAD`)) throw TypeError(`Request with GET/HEAD method cannot have body.`); let E = null; if (t.body != null) { let [e, i] = r(t.body, n.keepalive); E = e, i && !p(this.#n).contains(`content-type`, !0) && this.#n.append(`content-type`, i, !0); } let D = E ?? T; if (D != null && D.source == null) { if (E != null && t.duplex == null) throw TypeError(`RequestInit: duplex option is required when sending a body.`); if (n.mode !== `same-origin` && n.mode !== `cors`) throw TypeError(`If request is made from ReadableStream, mode should be "same-origin" or "cors"`); n.useCORSPreflightFlag = !0; } let j = D; if (E == null && T != null) { if (o(e.#r)) throw TypeError(`Cannot construct a Request with a Request object that has already been used.`); let t = new TransformStream(); T.stream.pipeThrough(t), j = { source: T.source, length: T.length, stream: t.readable }; } this.#r.body = j; } get method() { return A.brandCheck(this, e), this.#r.method; } get url() { return A.brandCheck(this, e), j(this.#r.url); } get headers() { return A.brandCheck(this, e), this.#n; } get destination() { return A.brandCheck(this, e), this.#r.destination; } get referrer() { return A.brandCheck(this, e), this.#r.referrer === `no-referrer` ? `` : this.#r.referrer === `client` ? `about:client` : this.#r.referrer.toString(); } get referrerPolicy() { return A.brandCheck(this, e), this.#r.referrerPolicy; } get mode() { return A.brandCheck(this, e), this.#r.mode; } get credentials() { return A.brandCheck(this, e), this.#r.credentials; } get cache() { return A.brandCheck(this, e), this.#r.cache; } get redirect() { return A.brandCheck(this, e), this.#r.redirect; } get integrity() { return A.brandCheck(this, e), this.#r.integrity; } get keepalive() { return A.brandCheck(this, e), this.#r.keepalive; } get isReloadNavigation() { return A.brandCheck(this, e), this.#r.reloadNavigation; } get isHistoryNavigation() { return A.brandCheck(this, e), this.#r.historyNavigation; } get signal() { return A.brandCheck(this, e), this.#e; } get body() { return A.brandCheck(this, e), this.#r.body ? this.#r.body.stream : null; } get bodyUsed() { return A.brandCheck(this, e), !!this.#r.body && m.isDisturbed(this.#r.body.stream); } get duplex() { return A.brandCheck(this, e), `half`; } clone() { if (A.brandCheck(this, e), o(this.#r)) throw TypeError(`unusable`); let t = ue(this.#r), n = new AbortController(); if (this.signal.aborted) n.abort(this.signal.reason); else { let e = te.get(this.signal); e === void 0 && (e = /* @__PURE__ */ new Set(), te.set(this.signal, e)); let t = new WeakRef(n); e.add(t), m.addAbortListener(n.signal, ne(t)); } return de(t, this.#t, n.signal, d(this.#n)); } [h.inspect.custom](e, t) { t.depth === null && (t.depth = 2), t.colors ??= !0; let n = { method: this.method, url: this.url, headers: this.headers, destination: this.destination, referrer: this.referrer, referrerPolicy: this.referrerPolicy, mode: this.mode, credentials: this.credentials, cache: this.cache, redirect: this.redirect, integrity: this.integrity, keepalive: this.keepalive, isReloadNavigation: this.isReloadNavigation, isHistoryNavigation: this.isHistoryNavigation, signal: this.signal }; return `Request ${h.formatWithOptions(t, n)}`; } static setRequestSignal(e, t) { return e.#e = t, e; } static getRequestDispatcher(e) { return e.#t; } static setRequestDispatcher(e, t) { e.#t = t; } static setRequestHeaders(e, t) { e.#n = t; } static getRequestState(e) { return e.#r; } static setRequestState(e, t) { e.#r = t; } }; let { setRequestSignal: ie, getRequestDispatcher: ae, setRequestDispatcher: oe, setRequestHeaders: se, getRequestState: ce, setRequestState: le } = z; Reflect.deleteProperty(z, `setRequestSignal`), Reflect.deleteProperty(z, `getRequestDispatcher`), Reflect.deleteProperty(z, `setRequestDispatcher`), Reflect.deleteProperty(z, `setRequestHeaders`), Reflect.deleteProperty(z, `getRequestState`), Reflect.deleteProperty(z, `setRequestState`), i(z, ce); function B(e) { return { method: e.method ?? `GET`, localURLsOnly: e.localURLsOnly ?? !1, unsafeRequest: e.unsafeRequest ?? !1, body: e.body ?? null, client: e.client ?? null, reservedClient: e.reservedClient ?? null, replacesClientId: e.replacesClientId ?? ``, window: e.window ?? `client`, keepalive: e.keepalive ?? !1, serviceWorkers: e.serviceWorkers ?? `all`, initiator: e.initiator ?? ``, destination: e.destination ?? ``, priority: e.priority ?? null, origin: e.origin ?? `client`, policyContainer: e.policyContainer ?? `client`, referrer: e.referrer ?? `client`, referrerPolicy: e.referrerPolicy ?? ``, mode: e.mode ?? `no-cors`, useCORSPreflightFlag: e.useCORSPreflightFlag ?? !1, credentials: e.credentials ?? `same-origin`, useCredentials: e.useCredentials ?? !1, cache: e.cache ?? `default`, redirect: e.redirect ?? `follow`, integrity: e.integrity ?? ``, cryptoGraphicsNonceMetadata: e.cryptoGraphicsNonceMetadata ?? ``, parserMetadata: e.parserMetadata ?? ``, reloadNavigation: e.reloadNavigation ?? !1, historyNavigation: e.historyNavigation ?? !1, userActivation: e.userActivation ?? !1, taintedOrigin: e.taintedOrigin ?? !1, redirectCount: e.redirectCount ?? 0, responseTainting: e.responseTainting ?? `basic`, preventNoCacheCacheControlHeaderModification: e.preventNoCacheCacheControlHeaderModification ?? !1, done: e.done ?? !1, timingAllowFailed: e.timingAllowFailed ?? !1, useURLCredentials: e.useURLCredentials ?? void 0, traversableForUserPrompts: e.traversableForUserPrompts ?? `client`, urlList: e.urlList, url: e.urlList[0], headersList: e.headersList ? new l(e.headersList) : new l() }; } function ue(e) { let t = B({ ...e, body: null }); return e.body != null && (t.body = a(e.body)), t; } function de(e, t, n, r) { let i = new z(M); le(i, e), oe(i, t), ie(i, n); let a = new s(M); return se(i, a), f(a, e.headersList), u(a, r), i; } Object.defineProperties(z.prototype, { method: D, url: D, headers: D, redirect: D, clone: D, signal: D, duplex: D, destination: D, body: D, bodyUsed: D, isHistoryNavigation: D, isReloadNavigation: D, keepalive: D, integrity: D, cache: D, credentials: D, attribute: D, referrerPolicy: D, referrer: D, mode: D, [Symbol.toStringTag]: { value: `Request`, configurable: !0 } }), A.is.Request = A.util.MakeTypeAssertion(z), A.converters.RequestInfo = function(e) { return typeof e == `string` ? A.converters.USVString(e) : A.is.Request(e) ? e : A.converters.USVString(e); }, A.converters.RequestInit = A.dictionaryConverter([ { key: `method`, converter: A.converters.ByteString }, { key: `headers`, converter: A.converters.HeadersInit }, { key: `body`, converter: A.nullableConverter(A.converters.BodyInit) }, { key: `referrer`, converter: A.converters.USVString }, { key: `referrerPolicy`, converter: A.converters.DOMString, allowedValues: x }, { key: `mode`, converter: A.converters.DOMString, allowedValues: C }, { key: `credentials`, converter: A.converters.DOMString, allowedValues: w }, { key: `cache`, converter: A.converters.DOMString, allowedValues: T }, { key: `redirect`, converter: A.converters.DOMString, allowedValues: S }, { key: `integrity`, converter: A.converters.DOMString }, { key: `keepalive`, converter: A.converters.boolean }, { key: `signal`, converter: A.nullableConverter((e) => A.converters.AbortSignal(e, `RequestInit`, `signal`)) }, { key: `window`, converter: A.converters.any }, { key: `duplex`, converter: A.converters.DOMString, allowedValues: E }, { key: `dispatcher`, converter: A.converters.any }, { key: `priority`, converter: A.converters.DOMString, allowedValues: [ `high`, `low`, `auto` ], defaultValue: () => `auto` } ]), n.exports = { Request: z, makeRequest: B, fromInnerRequest: de, cloneRequest: ue, getRequestDispatcher: ae, getRequestState: ce }; })); var Wo$1 = c$12(((e, n) => { let r = f$11(`node:assert`), { runtimeFeatures: i } = Ma$3(), a = /* @__PURE__ */ new Map([ [`sha256`, 0], [`sha384`, 1], [`sha512`, 2] ]), o; if (i.has(`crypto`)) { o = f$11(`node:crypto`); let e = o.getHashes(); e.length === 0 && a.clear(); for (let t of a.keys()) e.includes(t) === !1 && a.delete(t); } else a.clear(); let s = Map.prototype.get.bind(a), c = Map.prototype.has.bind(a), l = i.has(`crypto`) === !1 || a.size === 0 ? () => !0 : (e, t) => { let n = d(t); if (n.length === 0) return !0; let r = u(n); for (let t of r) { let n = t.alg, r = t.val; if (p(f(n, e), r)) return !0; } return !1; }; function u(e) { let t = [], n = null; for (let i of e) { if (r(c(i.alg), `Invalid SRI hash algorithm token`), t.length === 0) { t.push(i), n = i; continue; } let e = n.alg, a = s(e), o = i.alg, l = s(o); l < a || (l > a ? (n = i, t[0] = i, t.length = 1) : t.push(i)); } return t; } function d(e) { let t = []; for (let n of e.split(` `)) { let e = n.split(`?`, 1)[0], r = ``, i = [e.slice(0, 6), e.slice(7)], a = i[0]; if (!c(a)) continue; i[1] && (r = i[1]); let o = { alg: a, val: r }; t.push(o); } return t; } let f = (e, t) => o.hash(e, t, `base64`); function p(e, t) { let n = e.length; n !== 0 && e[n - 1] === `=` && --n, n !== 0 && e[n - 1] === `=` && --n; let r = t.length; if (r !== 0 && t[r - 1] === `=` && --r, r !== 0 && t[r - 1] === `=` && --r, n !== r) return !1; for (let r = 0; r < n; ++r) if (!(e[r] === t[r] || e[r] === `+` && t[r] === `-` || e[r] === `/` && t[r] === `_`)) return !1; return !0; } n.exports = { applyAlgorithmToBytes: f, bytesMatch: l, caseSensitiveMatch: p, isValidSRIHashAlgorithm: c, getStrongestMetadata: u, parseMetadata: d }; })); var Go$1 = c$12(((e, n) => { let { makeNetworkError: r, makeAppropriateNetworkError: i, filterResponse: a, makeResponse: o, fromInnerResponse: s, getResponseState: c } = Ho$1(), { HeadersList: l } = Vo$1(), { Request: u, cloneRequest: d, getRequestDispatcher: f, getRequestState: p } = Uo$1(), m = f$11(`node:zlib`), { makePolicyContainer: h, clonePolicyContainer: g, requestBadPort: _, TAOCheck: v, appendRequestOriginHeader: y, responseLocationURL: b, requestCurrentURL: x, setRequestReferrerPolicyOnRedirect: S, tryUpgradeRequestToAPotentiallyTrustworthyURL: C, createOpaqueTimingInfo: w, appendFetchMetadata: T, corsCheck: E, crossOriginResourcePolicyCheck: D, determineRequestsReferrer: O, coarsenedSharedCurrentTime: k, sameOrigin: A, isCancelled: j, isAborted: M, isErrorLike: N, fullyReadBody: P, readableStreamClose: F, urlIsLocal: I, urlIsHttpHttpsScheme: ee, urlHasHttpsScheme: L, clampAndCoarsenConnectionTimingInfo: te, simpleRangeHeaderValue: R, buildContentRange: ne, createInflate: re, extractMimeType: z, hasAuthenticationEntry: ie, includesCredentials: ae, isTraversableNavigable: oe } = Pa$3(), se = f$11(`node:assert`), { safelyExtractBody: ce, extractBody: le } = Ra$3(), { redirectStatusSet: B, nullBodyStatus: ue, safeMethodsSet: de, requestBodyHeader: fe, subresourceSet: V } = Da$3(), pe = f$11(`node:events`), { Readable: me, pipeline: he, finished: ge, isErrored: H, isReadable: _e } = f$11(`node:stream`), { addAbortListener: ve, bufferToLowerCasedHeaderName: ye } = q$6(), { dataURLProcessor: be, serializeAMimeType: xe, minimizeSupportedMimeType: Se } = ja$3(), { getGlobalDispatcher: Ce } = Co$1(), { webidl: we } = Na$3(), { STATUS_CODES: Te } = f$11(`node:http`), { bytesMatch: Ee } = Wo$1(), { createDeferredPromise: U } = La$3(), { isomorphicEncode: De } = Aa$3(), { runtimeFeatures: Oe } = Ma$3(), ke = Oe.has(`zstd`), Ae = [`GET`, `HEAD`], je = typeof __UNDICI_IS_NODE__ < `u` || typeof esbuildDetection < `u` ? `node` : `undici`, Me; var Ne = class extends pe { constructor(e) { super(), this.dispatcher = e, this.connection = null, this.dump = !1, this.state = `ongoing`; } terminate(e) { this.state === `ongoing` && (this.state = `terminated`, this.connection?.destroy(e), this.emit(`terminated`, e)); } abort(e) { this.state === `ongoing` && (this.state = `aborted`, e ||= new DOMException(`The operation was aborted.`, `AbortError`), this.serializedAbortReason = e, this.connection?.destroy(e), this.emit(`terminated`, e)); } }; function Pe(e) { Ie(e, `fetch`); } function Fe(e, t = void 0) { we.argumentLengthCheck(arguments, 1, `globalThis.fetch`); let n = U(), r; try { r = new u(e, t); } catch (e) { return n.reject(e), n.promise; } let i = p(r); if (r.signal.aborted) return Re(n, i, null, r.signal.reason, null), n.promise; i.client.globalObject?.constructor?.name === `ServiceWorkerGlobalScope` && (i.serviceWorkers = `none`); let a = null, o = !1, c = null; return ve(r.signal, () => { o = !0, se(c != null), c.abort(r.signal.reason); let e = a?.deref(); Re(n, i, e, r.signal.reason, c.controller); }), c = ze({ request: i, processResponseEndOfBody: Pe, processResponse: (e) => { if (!o) { if (e.aborted) { Re(n, i, a, c.serializedAbortReason, c.controller); return; } if (e.type === `error`) { n.reject(TypeError(`fetch failed`, { cause: e.error })); return; } a = new WeakRef(s(e, `immutable`)), n.resolve(a.deref()), n = null; } }, dispatcher: f(r), requestObject: r }), n.promise; } function Ie(e, t = `other`) { if (e.type === `error` && e.aborted || !e.urlList?.length) return; let n = e.urlList[0], r = e.timingInfo, i = e.cacheState; ee(n) && r !== null && (e.timingAllowPassed || (r = w({ startTime: r.startTime }), i = ``), r.endTime = k(), e.timingInfo = r, Le(r, n.href, t, globalThis, i, ``, e.status)); } let Le = performance.markResourceTiming; function Re(e, t, n, r, i) { if (e && e.reject(r), t.body?.stream != null && _e(t.body.stream) && t.body.stream.cancel(r).catch((e) => { if (e.code !== `ERR_INVALID_STATE`) throw e; }), n == null) return; let a = c(n); a.body?.stream != null && _e(a.body.stream) && i.error(r); } function ze({ request: e, processRequestBodyChunkLength: t, processRequestEndOfBody: n, processResponse: r, processResponseEndOfBody: i, processResponseConsumeBody: a, useParallelQueue: o = !1, dispatcher: s = Ce(), requestObject: c = null }) { se(s); let l = null, u = !1; e.client != null && (l = e.client.globalObject, u = e.client.crossOriginIsolatedCapability); let d = w({ startTime: k(u) }), f = { controller: new Ne(s), request: e, timingInfo: d, processRequestBodyChunkLength: t, processRequestEndOfBody: n, processResponse: r, processResponseConsumeBody: a, processResponseEndOfBody: i, taskDestination: l, crossOriginIsolatedCapability: u, requestObject: c }; return se(!e.body || e.body.stream), e.window === `client` && (e.window = e.client?.globalObject?.constructor?.name === `Window` ? e.client : `no-window`), e.origin === `client` && (e.origin = e.client.origin), e.policyContainer === `client` && (e.client == null ? e.policyContainer = h() : e.policyContainer = g(e.client.policyContainer)), e.headersList.contains(`accept`, !0) || e.headersList.append(`accept`, `*/*`, !0), e.headersList.contains(`accept-language`, !0) || e.headersList.append(`accept-language`, `*`, !0), e.priority, V.has(e.destination), Be(f, !1), f.controller; } async function Be(e, t) { try { let n = e.request, i = null; if (n.localURLsOnly && !I(x(n)) && (i = r(`local URLs only`)), C(n), _(n) === `blocked` && (i = r(`bad port`)), n.referrerPolicy === `` && (n.referrerPolicy = n.policyContainer.referrerPolicy), n.referrer !== `no-referrer` && (n.referrer = O(n)), i === null) { let t = x(n); A(t, n.url) && n.responseTainting === `basic` || t.protocol === `data:` || n.mode === `navigate` || n.mode === `websocket` ? (n.responseTainting = `basic`, i = await Ve(e)) : n.mode === `same-origin` ? i = r(`request mode cannot be "same-origin"`) : n.mode === `no-cors` ? n.redirect === `follow` ? (n.responseTainting = `opaque`, i = await Ve(e)) : i = r(`redirect mode cannot be "follow" for "no-cors" request`) : ee(x(n)) ? (n.responseTainting = `cors`, i = await We(e)) : i = r(`URL scheme must be a HTTP(S) scheme`); } if (t) return i; i.status !== 0 && !i.internalResponse && (n.responseTainting, n.responseTainting === `basic` ? i = a(i, `basic`) : n.responseTainting === `cors` ? i = a(i, `cors`) : n.responseTainting === `opaque` ? i = a(i, `opaque`) : se(!1)); let o = i.status === 0 ? i : i.internalResponse; if (o.urlList.length === 0 && o.urlList.push(...n.urlList), n.timingAllowFailed || (i.timingAllowPassed = !0), i.type === `opaque` && o.status === 206 && o.rangeRequested && !n.headers.contains(`range`, !0) && (i = o = r()), i.status !== 0 && (n.method === `HEAD` || n.method === `CONNECT` || ue.includes(o.status)) && (o.body = null, e.controller.dump = !0), n.integrity) { let t = (t) => Ue(e, r(t)); if (n.responseTainting === `opaque` || i.body == null) { t(i.error); return; } P(i.body, (r) => { if (!Ee(r, n.integrity)) { t(`integrity mismatch`); return; } i.body = ce(r)[0], Ue(e, i); }, t); } else Ue(e, i); } catch (t) { e.controller.terminate(t); } } function Ve(e) { if (j(e) && e.request.redirectCount === 0) return Promise.resolve(i(e)); let { request: n } = e, { protocol: a } = x(n); switch (a) { case `about:`: return Promise.resolve(r(`about scheme is not supported`)); case `blob:`: { Me ||= f$11(`node:buffer`).resolveObjectURL; let e = x(n); if (e.search.length !== 0) return Promise.resolve(r(`NetworkError when attempting to fetch resource.`)); let i = Me(e.toString()); if (n.method !== `GET` || !we.is.Blob(i)) return Promise.resolve(r(`invalid method`)); let a = o(), s = i.size, c = De(`${s}`), l = i.type; if (n.headersList.contains(`range`, !0)) { a.rangeRequested = !0; let e = R(n.headersList.get(`range`, !0), !0); if (e === `failure`) return Promise.resolve(r(`failed to fetch the data URL`)); let { rangeStartValue: t, rangeEndValue: o } = e; if (t === null) t = s - o, o = t + o - 1; else { if (t >= s) return Promise.resolve(r(`Range start is greater than the blob's size.`)); (o === null || o >= s) && (o = s - 1); } let c = i.slice(t, o + 1, l); a.body = le(c)[0]; let u = De(`${c.size}`), d = ne(t, o, s); a.status = 206, a.statusText = `Partial Content`, a.headersList.set(`content-length`, u, !0), a.headersList.set(`content-type`, l, !0), a.headersList.set(`content-range`, d, !0); } else { let e = le(i); a.statusText = `OK`, a.body = e[0], a.headersList.set(`content-length`, c, !0), a.headersList.set(`content-type`, l, !0); } return Promise.resolve(a); } case `data:`: { let e = be(x(n)); if (e === `failure`) return Promise.resolve(r(`failed to fetch the data URL`)); let t = xe(e.mimeType); return Promise.resolve(o({ statusText: `OK`, headersList: [[`content-type`, { name: `Content-Type`, value: t }]], body: ce(e.body)[0] })); } case `file:`: return Promise.resolve(r(`not implemented... yet...`)); case `http:`: case `https:`: return We(e).catch((e) => r(e)); default: return Promise.resolve(r(`unknown scheme`)); } } function He(e, t) { e.request.done = !0, e.processResponseDone != null && queueMicrotask(() => e.processResponseDone(t)); } function Ue(e, t) { let n = e.timingInfo, r = () => { let r = Date.now(); e.request.destination === `document` && (e.controller.fullTimingInfo = n), e.controller.reportTimingSteps = () => { if (!ee(e.request.url)) return; n.endTime = r; let i = t.cacheState, a = t.bodyInfo; t.timingAllowPassed || (n = w(n), i = ``); let o = 0; if (e.request.mode !== `navigate` || !t.hasCrossOriginRedirects) { o = t.status; let e = z(t.headersList); e !== `failure` && (a.contentType = Se(e)); } e.request.initiatorType != null && Le(n, e.request.url.href, e.request.initiatorType, globalThis, i, a, o); }; let i = () => { e.request.done = !0, e.processResponseEndOfBody != null && queueMicrotask(() => e.processResponseEndOfBody(t)), e.request.initiatorType != null && e.controller.reportTimingSteps(); }; queueMicrotask(() => i()); }; e.processResponse != null && queueMicrotask(() => { e.processResponse(t), e.processResponse = null; }); let i = t.type === `error` ? t : t.internalResponse ?? t; i.body == null ? r() : ge(i.body.stream, () => { r(); }); } async function We(e) { let t = e.request, n = null, i = null, a = e.timingInfo; if (t.serviceWorkers, n === null) { if (t.redirect === `follow` && (t.serviceWorkers = `none`), i = n = await Ke(e), t.responseTainting === `cors` && E(t, n) === `failure`) return r(`cors failure`); v(t, n) === `failure` && (t.timingAllowFailed = !0); } return (t.responseTainting === `opaque` || n.type === `opaque`) && D(t.origin, t.client, t.destination, i) === `blocked` ? r(`blocked`) : (B.has(i.status) && (t.redirect !== `manual` && e.controller.connection.destroy(void 0, !1), t.redirect === `error` ? n = r(`unexpected redirect`) : t.redirect === `manual` ? n = i : t.redirect === `follow` ? n = await Ge(e, n) : se(!1)), n.timingInfo = a, n); } function Ge(e, t) { let n = e.request, i = t.internalResponse ? t.internalResponse : t, a; try { if (a = b(i, x(n).hash), a == null) return t; } catch (e) { return Promise.resolve(r(e)); } if (!ee(a)) return Promise.resolve(r(`URL scheme must be a HTTP(S) scheme`)); if (n.redirectCount === 20) return Promise.resolve(r(`redirect count exceeded`)); if (n.redirectCount += 1, n.mode === `cors` && (a.username || a.password) && !A(n, a)) return Promise.resolve(r(`cross origin not allowed for request mode "cors"`)); if (n.responseTainting === `cors` && (a.username || a.password)) return Promise.resolve(r(`URL cannot contain credentials for request mode "cors"`)); if (i.status !== 303 && n.body != null && n.body.source == null) return Promise.resolve(r()); if ([301, 302].includes(i.status) && n.method === `POST` || i.status === 303 && !Ae.includes(n.method)) { n.method = `GET`, n.body = null; for (let e of fe) n.headersList.delete(e); } A(x(n), a) || (n.headersList.delete(`authorization`, !0), n.headersList.delete(`proxy-authorization`, !0), n.headersList.delete(`cookie`, !0), n.headersList.delete(`host`, !0)), n.body != null && (se(n.body.source != null), n.body = ce(n.body.source)[0]); let o = e.timingInfo; return o.redirectEndTime = o.postRedirectStartTime = k(e.crossOriginIsolatedCapability), o.redirectStartTime === 0 && (o.redirectStartTime = o.startTime), n.urlList.push(a), S(n, i), Be(e, !0); } async function Ke(e, t = !1, n = !1) { let a = e.request, o = null, s = null, c = null; a.window === `no-window` && a.redirect === `error` ? (o = e, s = a) : (s = d(a), o = { ...e }, o.request = s); let l = a.credentials === `include` || a.credentials === `same-origin` && a.responseTainting === `basic`, u = s.body ? s.body.length : null, f = null; if (s.body == null && [`POST`, `PUT`].includes(s.method) && (f = `0`), u != null && (f = De(`${u}`)), f != null && !s.headersList.contains(`content-length`, !0) && s.headersList.append(`content-length`, f, !0), u != null && s.keepalive, we.is.URL(s.referrer) && s.headersList.append(`referer`, De(s.referrer.href), !0), y(s), T(s), s.headersList.contains(`user-agent`, !0) || s.headersList.append(`user-agent`, je, !0), s.cache === "default" && (s.headersList.contains(`if-modified-since`, !0) || s.headersList.contains(`if-none-match`, !0) || s.headersList.contains(`if-unmodified-since`, !0) || s.headersList.contains(`if-match`, !0) || s.headersList.contains(`if-range`, !0)) && (s.cache = `no-store`), s.cache === `no-cache` && !s.preventNoCacheCacheControlHeaderModification && !s.headersList.contains(`cache-control`, !0) && s.headersList.append(`cache-control`, `max-age=0`, !0), (s.cache === `no-store` || s.cache === `reload`) && (s.headersList.contains(`pragma`, !0) || s.headersList.append(`pragma`, `no-cache`, !0), s.headersList.contains(`cache-control`, !0) || s.headersList.append(`cache-control`, `no-cache`, !0)), s.headersList.contains(`range`, !0) && s.headersList.append(`accept-encoding`, `identity`, !0), s.headersList.contains(`accept-encoding`, !0) || (L(x(s)) ? s.headersList.append(`accept-encoding`, `br, gzip, deflate`, !0) : s.headersList.append(`accept-encoding`, `gzip, deflate`, !0)), s.headersList.delete(`host`, !0), l && !s.headersList.contains(`authorization`, !0)) { let e = null; if (!(ie(s) && (s.useURLCredentials === void 0 || !ae(x(s)))) && ae(x(s)) && t) { let { username: t, password: n } = x(s); e = `Basic ${Buffer.from(`${t}:${n}`).toString(`base64`)}`; } e !== null && s.headersList.append(`Authorization`, e, !1); } if (s.cache = `no-store`, s.cache !== `no-store` && s.cache, c == null) { if (s.cache === `only-if-cached`) return r(`only if cached`); let e = await qe(o, l, n); !de.has(s.method) && e.status >= 200 && e.status, c ??= e; } if (c.urlList = [...s.urlList], s.headersList.contains(`range`, !0) && (c.rangeRequested = !0), c.requestIncludesCredentials = l, c.status === 401 && s.responseTainting !== `cors` && l && (a.useURLCredentials !== void 0 || oe(a.traversableForUserPrompts))) { if (a.body != null) { if (a.body.source == null) return c; a.body = ce(a.body.source)[0]; } if (a.useURLCredentials === void 0 || t) return j(e) ? i(e) : c; e.controller.connection.destroy(), c = await Ke(e, !0); } if (c.status === 407) return a.window === `no-window` ? r() : j(e) ? i(e) : r(`proxy authentication required`); if (c.status === 421 && !n && (a.body == null || a.body.source != null)) { if (j(e)) return i(e); e.controller.connection.destroy(), c = await Ke(e, t, !0); } return c; } async function qe(e, t = !1, n = !1) { se(!e.controller.connection || e.controller.connection.destroyed), e.controller.connection = { abort: null, destroyed: !1, destroy(e, t = !0) { this.destroyed || (this.destroyed = !0, t && this.abort?.(e ?? new DOMException(`The operation was aborted.`, `AbortError`))); } }; let a = e.request, s = null, c = e.timingInfo; a.cache = `no-store`, a.mode; let u = null; if (a.body == null && e.processRequestEndOfBody) queueMicrotask(() => e.processRequestEndOfBody()); else if (a.body != null) { let t = async function* (t) { j(e) || (yield t, e.processRequestBodyChunkLength?.(t.byteLength)); }, n = () => { j(e) || e.processRequestEndOfBody && e.processRequestEndOfBody(); }, r = (t) => { j(e) || (t.name === `AbortError` ? e.controller.abort() : e.controller.terminate(t)); }; u = (async function* () { try { for await (let e of a.body.stream) yield* t(e); n(); } catch (e) { r(e); } })(); } try { let { body: t, status: n, statusText: r, headersList: i, socket: a } = await p({ body: u }); if (a) s = o({ status: n, statusText: r, headersList: i, socket: a }); else { let a = t[Symbol.asyncIterator](); e.controller.next = () => a.next(), s = o({ status: n, statusText: r, headersList: i }); } } catch (t) { return t.name === `AbortError` ? (e.controller.connection.destroy(), i(e, t)) : r(t); } let d = new ReadableStream({ start(t) { e.controller.controller = t; }, pull: () => e.controller.resume(), cancel: (t) => { j(e) || e.controller.abort(t); }, type: `bytes` }); s.body = { stream: d, source: null, length: null }, e.controller.resume || e.controller.on(`terminated`, f), e.controller.resume = async () => { for (;;) { let t, n; try { let { done: n, value: r } = await e.controller.next(); if (M(e)) break; t = n ? void 0 : r; } catch (r) { e.controller.ended && !c.encodedBodySize ? t = void 0 : (t = r, n = !0); } if (t === void 0) { F(e.controller.controller), He(e, s); return; } if (c.decodedBodySize += t?.byteLength ?? 0, n) { e.controller.terminate(t); return; } let r = new Uint8Array(t); if (r.byteLength && e.controller.controller.enqueue(r), H(d)) { e.controller.terminate(); return; } if (e.controller.controller.desiredSize <= 0) return; } }; function f(t) { M(e) ? (s.aborted = !0, _e(d) && e.controller.controller.error(e.controller.serializedAbortReason)) : _e(d) && e.controller.controller.error(TypeError(`terminated`, { cause: N(t) ? t : void 0 })), e.controller.connection.destroy(); } return s; function p({ body: t }) { let n = x(a), r = e.controller.dispatcher, i = n.pathname + n.search, o = n.search.length === 0 && n.href[n.href.length - n.hash.length - 1] === `?`; return new Promise((s, u) => r.dispatch({ path: o ? `${i}?` : i, origin: n.origin, method: a.method, body: r.isMockActive ? a.body && (a.body.source || a.body.stream) : t, headers: a.headersList.entries, maxRedirections: 0, upgrade: a.mode === `websocket` ? `websocket` : void 0 }, { body: null, abort: null, onConnect(t) { let { connection: n } = e.controller; c.finalConnectionTimingInfo = te(void 0, c.postRedirectStartTime, e.crossOriginIsolatedCapability), n.destroyed ? t(new DOMException(`The operation was aborted.`, `AbortError`)) : (e.controller.on(`terminated`, t), this.abort = n.abort = t), c.finalNetworkRequestStartTime = k(e.crossOriginIsolatedCapability); }, onResponseStarted() { c.finalNetworkResponseStartTime = k(e.crossOriginIsolatedCapability); }, onHeaders(e, t, n, r) { if (e < 200) return !1; let i = new l(); for (let e = 0; e < t.length; e += 2) { let n = ye(t[e]), r = t[e + 1]; if (Array.isArray(r) && !Buffer.isBuffer(t[e + 1])) for (let e of r) i.append(n, e.toString(`latin1`), !0); else i.append(n, r.toString(`latin1`), !0); } let o = i.get(`location`, !0); this.body = new me({ read: n }); let c = o && a.redirect === `follow` && B.has(e), d = []; if (a.method !== `HEAD` && a.method !== `CONNECT` && !ue.includes(e) && !c) { let e = i.get(`content-encoding`, !0), t = e ? e.toLowerCase().split(`,`) : []; if (t.length > 5) return u(Error(`too many content-encodings in response: ${t.length}, maximum allowed is 5`)), !0; for (let e = t.length - 1; e >= 0; --e) { let n = t[e].trim(); if (n === `x-gzip` || n === `gzip`) d.push(m.createGunzip({ flush: m.constants.Z_SYNC_FLUSH, finishFlush: m.constants.Z_SYNC_FLUSH })); else if (n === `deflate`) d.push(re({ flush: m.constants.Z_SYNC_FLUSH, finishFlush: m.constants.Z_SYNC_FLUSH })); else if (n === `br`) d.push(m.createBrotliDecompress({ flush: m.constants.BROTLI_OPERATION_FLUSH, finishFlush: m.constants.BROTLI_OPERATION_FLUSH })); else if (n === `zstd` && ke) d.push(m.createZstdDecompress({ flush: m.constants.ZSTD_e_continue, finishFlush: m.constants.ZSTD_e_end })); else { d.length = 0; break; } } } let f = this.onError.bind(this); return s({ status: e, statusText: r, headersList: i, body: d.length ? he(this.body, ...d, (e) => { e && this.onError(e); }).on(`error`, f) : this.body.on(`error`, f) }), !0; }, onData(t) { if (e.controller.dump) return; let n = t; return c.encodedBodySize += n.byteLength, this.body.push(n); }, onComplete() { this.abort && e.controller.off(`terminated`, this.abort), e.controller.ended = !0, this.body.push(null); }, onError(t) { this.abort && e.controller.off(`terminated`, this.abort), this.body?.destroy(t), e.controller.terminate(t), u(t); }, onRequestUpgrade(e, t, n, r) { if (r.session != null && t !== 200 || r.session == null && t !== 101) return !1; let i = new l(); for (let [e, t] of Object.entries(n)) { if (t == null) continue; let n = e.toLowerCase(); if (Array.isArray(t)) for (let e of t) i.append(n, String(e), !0); else i.append(n, String(t), !0); } return s({ status: t, statusText: Te[t], headersList: i, socket: r }), !0; }, onUpgrade(e, t, n) { if (n.session != null && e !== 200 || n.session == null && e !== 101) return !1; let r = new l(); for (let e = 0; e < t.length; e += 2) { let n = ye(t[e]), i = t[e + 1]; if (Array.isArray(i) && !Buffer.isBuffer(t[e + 1])) for (let e of i) r.append(n, e.toString(`latin1`), !0); else r.append(n, i.toString(`latin1`), !0); } return s({ status: e, statusText: Te[e], headersList: r, socket: n }), !0; } })); } } n.exports = { fetch: Fe, Fetch: Ne, fetching: ze, finalizeAndReportTiming: Ie }; })); var Ko$1 = c$12(((e, n) => { let r = f$11(`node:assert`), { URLSerializer: i } = ja$3(), { isValidHeaderName: a } = Pa$3(); function o(e, t, n = !1) { return i(e, n) === i(t, n); } function s(e) { r(e !== null); let t = []; for (let n of e.split(`,`)) n = n.trim(), a(n) && t.push(n); return t; } n.exports = { urlEquals: o, getFieldValues: s }; })); var qo$1 = c$12(((e, n) => { let r = f$11(`node:assert`), { kConstruct: i } = da$3(), { urlEquals: a, getFieldValues: o } = Ko$1(), { kEnumerableProperty: s, isDisturbed: c } = q$6(), { webidl: l } = Na$3(), { cloneResponse: u, fromInnerResponse: d, getResponseState: f } = Ho$1(), { Request: p, fromInnerRequest: m, getRequestState: h } = Uo$1(), { fetching: g } = Go$1(), { urlIsHttpHttpsScheme: _, readAllBytes: v } = Pa$3(), { createDeferredPromise: y } = La$3(); var b = class e { #e; constructor() { arguments[0] !== i && l.illegalConstructor(), l.util.markAsUncloneable(this), this.#e = arguments[1]; } async match(t, n = {}) { l.brandCheck(this, e); let r = `Cache.match`; l.argumentLengthCheck(arguments, 1, r), t = l.converters.RequestInfo(t), n = l.converters.CacheQueryOptions(n, r, `options`); let i = this.#i(t, n, 1); if (i.length !== 0) return i[0]; } async matchAll(t = void 0, n = {}) { return l.brandCheck(this, e), t !== void 0 && (t = l.converters.RequestInfo(t)), n = l.converters.CacheQueryOptions(n, `Cache.matchAll`, `options`), this.#i(t, n); } async add(t) { l.brandCheck(this, e), l.argumentLengthCheck(arguments, 1, `Cache.add`), t = l.converters.RequestInfo(t); let n = [t]; return await this.addAll(n); } async addAll(t) { l.brandCheck(this, e); let n = `Cache.addAll`; l.argumentLengthCheck(arguments, 1, n); let r = [], i = []; for (let e of t) { if (e === void 0) throw l.errors.conversionFailed({ prefix: n, argument: `Argument 1`, types: [`undefined is not allowed`] }); if (e = l.converters.RequestInfo(e), typeof e == `string`) continue; let t = h(e); if (!_(t.url) || t.method !== `GET`) throw l.errors.exception({ header: n, message: `Expected http/s scheme when method is not GET.` }); } let a = []; for (let e of t) { let t = h(new p(e)); if (!_(t.url)) throw l.errors.exception({ header: n, message: `Expected http/s scheme.` }); t.initiator = `fetch`, t.destination = `subresource`, i.push(t); let s = y(); a.push(g({ request: t, processResponse(e) { if (e.type === `error` || e.status === 206 || e.status < 200 || e.status > 299) s.reject(l.errors.exception({ header: `Cache.addAll`, message: `Received an invalid status code or the request failed.` })); else if (e.headersList.contains(`vary`)) { let t = o(e.headersList.get(`vary`)); for (let e of t) if (e === `*`) { s.reject(l.errors.exception({ header: `Cache.addAll`, message: `invalid vary field value` })); for (let e of a) e.abort(); return; } } }, processResponseEndOfBody(e) { if (e.aborted) { s.reject(new DOMException(`aborted`, `AbortError`)); return; } s.resolve(e); } })), r.push(s.promise); } let s = await Promise.all(r), c = [], u = 0; for (let e of s) { let t = { type: `put`, request: i[u], response: e }; c.push(t), u++; } let d = y(), f = null; try { this.#t(c); } catch (e) { f = e; } return queueMicrotask(() => { f === null ? d.resolve(void 0) : d.reject(f); }), d.promise; } async put(t, n) { l.brandCheck(this, e); let r = `Cache.put`; l.argumentLengthCheck(arguments, 2, r), t = l.converters.RequestInfo(t), n = l.converters.Response(n, r, `response`); let i = null; if (i = l.is.Request(t) ? h(t) : h(new p(t)), !_(i.url) || i.method !== `GET`) throw l.errors.exception({ header: r, message: `Expected an http/s scheme when method is not GET` }); let a = f(n); if (a.status === 206) throw l.errors.exception({ header: r, message: `Got 206 status` }); if (a.headersList.contains(`vary`)) { let e = o(a.headersList.get(`vary`)); for (let t of e) if (t === `*`) throw l.errors.exception({ header: r, message: `Got * vary field value` }); } if (a.body && (c(a.body.stream) || a.body.stream.locked)) throw l.errors.exception({ header: r, message: `Response body is locked or disturbed` }); let s = u(a), d = y(); a.body == null ? d.resolve(void 0) : v(a.body.stream.getReader(), d.resolve, d.reject); let m = [], g = { type: `put`, request: i, response: s }; m.push(g); let b = await d.promise; s.body != null && (s.body.source = b); let x = y(), S = null; try { this.#t(m); } catch (e) { S = e; } return queueMicrotask(() => { S === null ? x.resolve() : x.reject(S); }), x.promise; } async delete(t, n = {}) { l.brandCheck(this, e); let i = `Cache.delete`; l.argumentLengthCheck(arguments, 1, i), t = l.converters.RequestInfo(t), n = l.converters.CacheQueryOptions(n, i, `options`); let a = null; if (l.is.Request(t)) { if (a = h(t), a.method !== `GET` && !n.ignoreMethod) return !1; } else r(typeof t == `string`), a = h(new p(t)); let o = [], s = { type: `delete`, request: a, options: n }; o.push(s); let c = y(), u = null, d; try { d = this.#t(o); } catch (e) { u = e; } return queueMicrotask(() => { u === null ? c.resolve(!!d?.length) : c.reject(u); }), c.promise; } async keys(t = void 0, n = {}) { l.brandCheck(this, e), t !== void 0 && (t = l.converters.RequestInfo(t)), n = l.converters.CacheQueryOptions(n, `Cache.keys`, `options`); let r = null; if (t !== void 0) if (l.is.Request(t)) { if (r = h(t), r.method !== `GET` && !n.ignoreMethod) return []; } else typeof t == `string` && (r = h(new p(t))); let i = y(), a = []; if (t === void 0) for (let e of this.#e) a.push(e[0]); else { let e = this.#n(r, n); for (let t of e) a.push(t[0]); } return queueMicrotask(() => { let e = []; for (let t of a) { let n = m(t, void 0, new AbortController().signal, `immutable`); e.push(n); } i.resolve(Object.freeze(e)); }), i.promise; } #t(e) { let t = this.#e, n = [...t], i = [], a = []; try { for (let n of e) { if (n.type !== `delete` && n.type !== `put`) throw l.errors.exception({ header: `Cache.#batchCacheOperations`, message: `operation type does not match "delete" or "put"` }); if (n.type === `delete` && n.response != null) throw l.errors.exception({ header: `Cache.#batchCacheOperations`, message: `delete operation should not have an associated response` }); if (this.#n(n.request, n.options, i).length) throw new DOMException(`???`, `InvalidStateError`); let e; if (n.type === `delete`) { if (e = this.#n(n.request, n.options), e.length === 0) return []; for (let n of e) { let e = t.indexOf(n); r(e !== -1), t.splice(e, 1); } } else if (n.type === `put`) { if (n.response == null) throw l.errors.exception({ header: `Cache.#batchCacheOperations`, message: `put operation should have an associated response` }); let a = n.request; if (!_(a.url)) throw l.errors.exception({ header: `Cache.#batchCacheOperations`, message: `expected http or https scheme` }); if (a.method !== `GET`) throw l.errors.exception({ header: `Cache.#batchCacheOperations`, message: `not get method` }); if (n.options != null) throw l.errors.exception({ header: `Cache.#batchCacheOperations`, message: `options must not be defined` }); e = this.#n(n.request); for (let n of e) { let e = t.indexOf(n); r(e !== -1), t.splice(e, 1); } t.push([n.request, n.response]), i.push([n.request, n.response]); } a.push([n.request, n.response]); } return a; } catch (e) { throw this.#e.length = 0, this.#e = n, e; } } #n(e, t, n) { let r = [], i = n ?? this.#e; for (let n of i) { let [i, a] = n; this.#r(e, i, a, t) && r.push(n); } return r; } #r(e, t, n = null, r) { let i = new URL(e.url), s = new URL(t.url); if (r?.ignoreSearch && (s.search = ``, i.search = ``), !a(i, s, !0)) return !1; if (n == null || r?.ignoreVary || !n.headersList.contains(`vary`)) return !0; let c = o(n.headersList.get(`vary`)); for (let n of c) if (n === `*` || t.headersList.get(n) !== e.headersList.get(n)) return !1; return !0; } #i(e, t, n = Infinity) { let r = null; if (e !== void 0) if (l.is.Request(e)) { if (r = h(e), r.method !== `GET` && !t.ignoreMethod) return []; } else typeof e == `string` && (r = h(new p(e))); let i = []; if (e === void 0) for (let e of this.#e) i.push(e[1]); else { let e = this.#n(r, t); for (let t of e) i.push(t[1]); } let a = []; for (let e of i) { let t = d(u(e), `immutable`); if (a.push(t), a.length >= n) break; } return Object.freeze(a); } }; Object.defineProperties(b.prototype, { [Symbol.toStringTag]: { value: `Cache`, configurable: !0 }, match: s, matchAll: s, add: s, addAll: s, put: s, delete: s, keys: s }); let x = [ { key: `ignoreSearch`, converter: l.converters.boolean, defaultValue: () => !1 }, { key: `ignoreMethod`, converter: l.converters.boolean, defaultValue: () => !1 }, { key: `ignoreVary`, converter: l.converters.boolean, defaultValue: () => !1 } ]; l.converters.CacheQueryOptions = l.dictionaryConverter(x), l.converters.MultiCacheQueryOptions = l.dictionaryConverter([...x, { key: `cacheName`, converter: l.converters.DOMString }]), l.converters.Response = l.interfaceConverter(l.is.Response, `Response`), l.converters[`sequence`] = l.sequenceConverter(l.converters.RequestInfo), n.exports = { Cache: b }; })); var Jo$1 = c$12(((e, t) => { let { Cache: n } = qo$1(), { webidl: r } = Na$3(), { kEnumerableProperty: i } = q$6(), { kConstruct: a } = da$3(); var o = class e { #e = /* @__PURE__ */ new Map(); constructor() { arguments[0] !== a && r.illegalConstructor(), r.util.markAsUncloneable(this); } async match(t, i = {}) { if (r.brandCheck(this, e), r.argumentLengthCheck(arguments, 1, `CacheStorage.match`), t = r.converters.RequestInfo(t), i = r.converters.MultiCacheQueryOptions(i), i.cacheName != null) { if (this.#e.has(i.cacheName)) return await new n(a, this.#e.get(i.cacheName)).match(t, i); } else for (let e of this.#e.values()) { let r = await new n(a, e).match(t, i); if (r !== void 0) return r; } } async has(t) { r.brandCheck(this, e); let n = `CacheStorage.has`; return r.argumentLengthCheck(arguments, 1, n), t = r.converters.DOMString(t, n, `cacheName`), this.#e.has(t); } async open(t) { r.brandCheck(this, e); let i = `CacheStorage.open`; if (r.argumentLengthCheck(arguments, 1, i), t = r.converters.DOMString(t, i, `cacheName`), this.#e.has(t)) return new n(a, this.#e.get(t)); let o = []; return this.#e.set(t, o), new n(a, o); } async delete(t) { r.brandCheck(this, e); let n = `CacheStorage.delete`; return r.argumentLengthCheck(arguments, 1, n), t = r.converters.DOMString(t, n, `cacheName`), this.#e.delete(t); } async keys() { return r.brandCheck(this, e), [...this.#e.keys()]; } }; Object.defineProperties(o.prototype, { [Symbol.toStringTag]: { value: `CacheStorage`, configurable: !0 }, match: i, has: i, open: i, delete: i, keys: i }), t.exports = { CacheStorage: o }; })); var Yo$1 = c$12(((e, t) => { t.exports = { maxAttributeValueSize: 1024, maxNameValuePairSize: 4096 }; })); var Xo$1 = c$12(((e, t) => { function n(e) { for (let t = 0; t < e.length; ++t) { let n = e.charCodeAt(t); if (n >= 0 && n <= 8 || n >= 10 && n <= 31 || n === 127) return !0; } return !1; } function r(e) { for (let t = 0; t < e.length; ++t) { let n = e.charCodeAt(t); if (n < 33 || n > 126 || n === 34 || n === 40 || n === 41 || n === 60 || n === 62 || n === 64 || n === 44 || n === 59 || n === 58 || n === 92 || n === 47 || n === 91 || n === 93 || n === 63 || n === 61 || n === 123 || n === 125) throw Error(`Invalid cookie name`); } } function i(e) { let t = e.length, n = 0; if (e[0] === `"`) { if (t === 1 || e[t - 1] !== `"`) throw Error(`Invalid cookie value`); --t, ++n; } for (; n < t;) { let t = e.charCodeAt(n++); if (t < 33 || t > 126 || t === 34 || t === 44 || t === 59 || t === 92) throw Error(`Invalid cookie value`); } } function a(e) { for (let t = 0; t < e.length; ++t) { let n = e.charCodeAt(t); if (n < 32 || n === 127 || n === 59) throw Error(`Invalid cookie path`); } } function o(e) { if (e.startsWith(`-`) || e.endsWith(`.`) || e.endsWith(`-`)) throw Error(`Invalid cookie domain`); } let s = [ `Sun`, `Mon`, `Tue`, `Wed`, `Thu`, `Fri`, `Sat` ], c = [ `Jan`, `Feb`, `Mar`, `Apr`, `May`, `Jun`, `Jul`, `Aug`, `Sep`, `Oct`, `Nov`, `Dec` ], l = Array(61).fill(0).map((e, t) => t.toString().padStart(2, `0`)); function u(e) { return typeof e == `number` && (e = new Date(e)), `${s[e.getUTCDay()]}, ${l[e.getUTCDate()]} ${c[e.getUTCMonth()]} ${e.getUTCFullYear()} ${l[e.getUTCHours()]}:${l[e.getUTCMinutes()]}:${l[e.getUTCSeconds()]} GMT`; } function d(e) { if (e < 0) throw Error(`Invalid cookie max-age`); } function f(e) { if (e.name.length === 0) return null; r(e.name), i(e.value); let t = [`${e.name}=${e.value}`]; e.name.startsWith(`__Secure-`) && (e.secure = !0), e.name.startsWith(`__Host-`) && (e.secure = !0, e.domain = null, e.path = `/`), e.secure && t.push(`Secure`), e.httpOnly && t.push(`HttpOnly`), typeof e.maxAge == `number` && (d(e.maxAge), t.push(`Max-Age=${e.maxAge}`)), e.domain && (o(e.domain), t.push(`Domain=${e.domain}`)), e.path && (a(e.path), t.push(`Path=${e.path}`)), e.expires && e.expires.toString() !== `Invalid Date` && t.push(`Expires=${u(e.expires)}`), e.sameSite && t.push(`SameSite=${e.sameSite}`); for (let n of e.unparsed) { if (!n.includes(`=`)) throw Error(`Invalid unparsed`); let [e, ...r] = n.split(`=`); t.push(`${e.trim()}=${r.join(`=`)}`); } return t.join(`; `); } t.exports = { isCTLExcludingHtab: n, validateCookieName: r, validateCookiePath: a, validateCookieValue: i, toIMFDate: u, stringify: f }; })); var Zo$1 = c$12(((e, n) => { let { collectASequenceOfCodePointsFast: r } = Aa$3(), { maxNameValuePairSize: i, maxAttributeValueSize: a } = Yo$1(), { isCTLExcludingHtab: o } = Xo$1(), s = f$11(`node:assert`); function c(e) { if (o(e)) return null; let t = ``, n = ``, a = ``, s = ``; if (e.includes(`;`)) { let i = { position: 0 }; t = r(`;`, e, i), n = e.slice(i.position); } else t = e; if (!t.includes(`=`)) s = t; else { let e = { position: 0 }; a = r(`=`, t, e), s = t.slice(e.position + 1); } return a = a.trim(), s = s.trim(), a.length + s.length > i ? null : { name: a, value: s, ...l(n) }; } function l(e, t = {}) { if (e.length === 0) return t; s(e[0] === `;`), e = e.slice(1); let n = ``; e.includes(`;`) ? (n = r(`;`, e, { position: 0 }), e = e.slice(n.length)) : (n = e, e = ``); let i = ``, o = ``; if (n.includes(`=`)) { let e = { position: 0 }; i = r(`=`, n, e), o = n.slice(e.position + 1); } else i = n; if (i = i.trim(), o = o.trim(), o.length > a) return l(e, t); let c = i.toLowerCase(); if (c === `expires`) t.expires = new Date(o); else if (c === `max-age`) { let n = o.charCodeAt(0); if ((n < 48 || n > 57) && o[0] !== `-` || !/^\d+$/.test(o)) return l(e, t); t.maxAge = Number(o); } else if (c === `domain`) { let e = o; e[0] === `.` && (e = e.slice(1)), e = e.toLowerCase(), t.domain = e; } else if (c === `path`) { let e = ``; e = o.length === 0 || o[0] !== `/` ? `/` : o, t.path = e; } else if (c === `secure`) t.secure = !0; else if (c === `httponly`) t.httpOnly = !0; else if (c === `samesite`) { let e = o.toLowerCase(); e === `none` ? t.sameSite = `None` : e === `strict` ? t.sameSite = `Strict` : e === `lax` && (t.sameSite = `Lax`); } else t.unparsed ??= [], t.unparsed.push(`${i}=${o}`); return l(e, t); } n.exports = { parseSetCookie: c, parseUnparsedAttributes: l }; })); var Qo$1 = c$12(((e, t) => { let { parseSetCookie: n } = Zo$1(), { stringify: r } = Xo$1(), { webidl: i } = Na$3(), { Headers: a } = Vo$1(), o = i.brandCheckMultiple([a, globalThis.Headers].filter(Boolean)); function s(e) { i.argumentLengthCheck(arguments, 1, `getCookies`), o(e); let t = e.get(`cookie`), n = {}; if (!t) return n; for (let e of t.split(`;`)) { let [t, ...r] = e.split(`=`); n[t.trim()] = r.join(`=`); } return n; } function c(e, t, n) { o(e); let r = `deleteCookie`; i.argumentLengthCheck(arguments, 2, r), t = i.converters.DOMString(t, r, `name`), n = i.converters.DeleteCookieAttributes(n), d(e, { name: t, value: ``, expires: /* @__PURE__ */ new Date(0), ...n }); } function l(e) { i.argumentLengthCheck(arguments, 1, `getSetCookies`), o(e); let t = e.getSetCookie(); return t ? t.map((e) => n(e)) : []; } function u(e) { return e = i.converters.DOMString(e), n(e); } function d(e, t) { i.argumentLengthCheck(arguments, 2, `setCookie`), o(e), t = i.converters.Cookie(t); let n = r(t); n && e.append(`set-cookie`, n, !0); } i.converters.DeleteCookieAttributes = i.dictionaryConverter([{ converter: i.nullableConverter(i.converters.DOMString), key: `path`, defaultValue: () => null }, { converter: i.nullableConverter(i.converters.DOMString), key: `domain`, defaultValue: () => null }]), i.converters.Cookie = i.dictionaryConverter([ { converter: i.converters.DOMString, key: `name` }, { converter: i.converters.DOMString, key: `value` }, { converter: i.nullableConverter((e) => typeof e == `number` ? i.converters[`unsigned long long`](e) : new Date(e)), key: `expires`, defaultValue: () => null }, { converter: i.nullableConverter(i.converters[`long long`]), key: `maxAge`, defaultValue: () => null }, { converter: i.nullableConverter(i.converters.DOMString), key: `domain`, defaultValue: () => null }, { converter: i.nullableConverter(i.converters.DOMString), key: `path`, defaultValue: () => null }, { converter: i.nullableConverter(i.converters.boolean), key: `secure`, defaultValue: () => null }, { converter: i.nullableConverter(i.converters.boolean), key: `httpOnly`, defaultValue: () => null }, { converter: i.converters.USVString, key: `sameSite`, allowedValues: [ `Strict`, `Lax`, `None` ] }, { converter: i.sequenceConverter(i.converters.DOMString), key: `unparsed`, defaultValue: () => [] } ]), t.exports = { getCookies: s, deleteCookie: c, getSetCookies: l, setCookie: d, parseCookie: u }; })); var $o$1 = c$12(((e, t) => { let { webidl: n } = Na$3(), { kEnumerableProperty: r } = q$6(), { kConstruct: i } = da$3(); var a = class e extends Event { #e; constructor(e, t = {}) { if (e === i) { super(arguments[1], arguments[2]), n.util.markAsUncloneable(this); return; } let r = `MessageEvent constructor`; n.argumentLengthCheck(arguments, 1, r), e = n.converters.DOMString(e, r, `type`), t = n.converters.MessageEventInit(t, r, `eventInitDict`), super(e, t), this.#e = t, n.util.markAsUncloneable(this); } get data() { return n.brandCheck(this, e), this.#e.data; } get origin() { return n.brandCheck(this, e), this.#e.origin; } get lastEventId() { return n.brandCheck(this, e), this.#e.lastEventId; } get source() { return n.brandCheck(this, e), this.#e.source; } get ports() { return n.brandCheck(this, e), Object.isFrozen(this.#e.ports) || Object.freeze(this.#e.ports), this.#e.ports; } initMessageEvent(t, r = !1, i = !1, a = null, o = ``, s = ``, c = null, l = []) { return n.brandCheck(this, e), n.argumentLengthCheck(arguments, 1, `MessageEvent.initMessageEvent`), new e(t, { bubbles: r, cancelable: i, data: a, origin: o, lastEventId: s, source: c, ports: l }); } static createFastMessageEvent(t, n) { let r = new e(i, t, n); return r.#e = n, r.#e.data ??= null, r.#e.origin ??= ``, r.#e.lastEventId ??= ``, r.#e.source ??= null, r.#e.ports ??= [], r; } }; let { createFastMessageEvent: o } = a; delete a.createFastMessageEvent; var s = class e extends Event { #e; constructor(e, t = {}) { let r = `CloseEvent constructor`; n.argumentLengthCheck(arguments, 1, r), e = n.converters.DOMString(e, r, `type`), t = n.converters.CloseEventInit(t), super(e, t), this.#e = t, n.util.markAsUncloneable(this); } get wasClean() { return n.brandCheck(this, e), this.#e.wasClean; } get code() { return n.brandCheck(this, e), this.#e.code; } get reason() { return n.brandCheck(this, e), this.#e.reason; } }, c = class e extends Event { #e; constructor(e, t) { let r = `ErrorEvent constructor`; n.argumentLengthCheck(arguments, 1, r), super(e, t), n.util.markAsUncloneable(this), e = n.converters.DOMString(e, r, `type`), t = n.converters.ErrorEventInit(t ?? {}), this.#e = t; } get message() { return n.brandCheck(this, e), this.#e.message; } get filename() { return n.brandCheck(this, e), this.#e.filename; } get lineno() { return n.brandCheck(this, e), this.#e.lineno; } get colno() { return n.brandCheck(this, e), this.#e.colno; } get error() { return n.brandCheck(this, e), this.#e.error; } }; Object.defineProperties(a.prototype, { [Symbol.toStringTag]: { value: `MessageEvent`, configurable: !0 }, data: r, origin: r, lastEventId: r, source: r, ports: r, initMessageEvent: r }), Object.defineProperties(s.prototype, { [Symbol.toStringTag]: { value: `CloseEvent`, configurable: !0 }, reason: r, code: r, wasClean: r }), Object.defineProperties(c.prototype, { [Symbol.toStringTag]: { value: `ErrorEvent`, configurable: !0 }, message: r, filename: r, lineno: r, colno: r, error: r }), n.converters.MessagePort = n.interfaceConverter(n.is.MessagePort, `MessagePort`), n.converters[`sequence`] = n.sequenceConverter(n.converters.MessagePort); let l = [ { key: `bubbles`, converter: n.converters.boolean, defaultValue: () => !1 }, { key: `cancelable`, converter: n.converters.boolean, defaultValue: () => !1 }, { key: `composed`, converter: n.converters.boolean, defaultValue: () => !1 } ]; n.converters.MessageEventInit = n.dictionaryConverter([ ...l, { key: `data`, converter: n.converters.any, defaultValue: () => null }, { key: `origin`, converter: n.converters.USVString, defaultValue: () => `` }, { key: `lastEventId`, converter: n.converters.DOMString, defaultValue: () => `` }, { key: `source`, converter: n.nullableConverter(n.converters.MessagePort), defaultValue: () => null }, { key: `ports`, converter: n.converters[`sequence`], defaultValue: () => [] } ]), n.converters.CloseEventInit = n.dictionaryConverter([ ...l, { key: `wasClean`, converter: n.converters.boolean, defaultValue: () => !1 }, { key: `code`, converter: n.converters[`unsigned short`], defaultValue: () => 0 }, { key: `reason`, converter: n.converters.USVString, defaultValue: () => `` } ]), n.converters.ErrorEventInit = n.dictionaryConverter([ ...l, { key: `message`, converter: n.converters.DOMString, defaultValue: () => `` }, { key: `filename`, converter: n.converters.USVString, defaultValue: () => `` }, { key: `lineno`, converter: n.converters[`unsigned long`], defaultValue: () => 0 }, { key: `colno`, converter: n.converters[`unsigned long`], defaultValue: () => 0 }, { key: `error`, converter: n.converters.any } ]), t.exports = { MessageEvent: a, CloseEvent: s, ErrorEvent: c, createFastMessageEvent: o }; })); var es$1 = c$12(((e, t) => { t.exports = { uid: `258EAFA5-E914-47DA-95CA-C5AB0DC85B11`, sentCloseFrameState: { SENT: 1, RECEIVED: 2 }, staticPropertyDescriptors: { enumerable: !0, writable: !1, configurable: !1 }, states: { CONNECTING: 0, OPEN: 1, CLOSING: 2, CLOSED: 3 }, opcodes: { CONTINUATION: 0, TEXT: 1, BINARY: 2, CLOSE: 8, PING: 9, PONG: 10 }, maxUnsigned16Bit: 65535, parserStates: { INFO: 0, PAYLOADLENGTH_16: 2, PAYLOADLENGTH_64: 3, READ_DATA: 4 }, emptyBuffer: Buffer.allocUnsafe(0), sendHints: { text: 1, typedArray: 2, arrayBuffer: 3, blob: 4 } }; })); var ts$1 = c$12(((e, n) => { let { states: r, opcodes: i } = es$1(), { isUtf8: a } = f$11(`node:buffer`), { removeHTTPWhitespace: o } = ja$3(), { collectASequenceOfCodePointsFast: s } = Aa$3(); function c(e) { return e === r.CONNECTING; } function l(e) { return e === r.OPEN; } function u(e) { return e === r.CLOSING; } function d(e) { return e === r.CLOSED; } function f(e, t, n = (e, t) => new Event(e, t), r = {}) { let i = n(e, r); t.dispatchEvent(i); } function p(e, t, n) { e.onMessage(t, n); } function m(e) { return e.byteLength === e.buffer.byteLength ? e.buffer : new Uint8Array(e).buffer; } function h(e) { if (e.length === 0) return !1; for (let t = 0; t < e.length; ++t) { let n = e.charCodeAt(t); if (n < 33 || n > 126 || n === 34 || n === 40 || n === 41 || n === 44 || n === 47 || n === 58 || n === 59 || n === 60 || n === 61 || n === 62 || n === 63 || n === 64 || n === 91 || n === 92 || n === 93 || n === 123 || n === 125) return !1; } return !0; } function g(e) { return e >= 1e3 && e < 1015 ? e !== 1004 && e !== 1005 && e !== 1006 : e >= 3e3 && e <= 4999; } function _(e) { return e === i.CLOSE || e === i.PING || e === i.PONG; } function v(e) { return e === i.CONTINUATION; } function y(e) { return e === i.TEXT || e === i.BINARY; } function b(e) { return y(e) || v(e) || _(e); } function x(e) { let t = { position: 0 }, n = /* @__PURE__ */ new Map(); for (; t.position < e.length;) { let [r, i = ``] = s(`;`, e, t).split(`=`, 2); n.set(o(r, !0, !1), o(i, !1, !0)), t.position++; } return n; } function S(e) { if (e.length === 0) return !1; for (let t = 0; t < e.length; t++) { let n = e.charCodeAt(t); if (n < 48 || n > 57) return !1; } let t = Number.parseInt(e, 10); return t >= 8 && t <= 15; } function C(e, t) { let n; try { n = new URL(e, t); } catch (e) { throw new DOMException(e, `SyntaxError`); } if (n.protocol === `http:` ? n.protocol = `ws:` : n.protocol === `https:` && (n.protocol = `wss:`), n.protocol !== `ws:` && n.protocol !== `wss:`) throw new DOMException(`expected a ws: or wss: url`, `SyntaxError`); if (n.hash.length || n.href.endsWith(`#`)) throw new DOMException(`hash`, `SyntaxError`); return n; } function w(e, t) { if (e !== null && e !== 1e3 && (e < 3e3 || e > 4999)) throw new DOMException(`invalid code`, `InvalidAccessError`); if (t !== null) { let e = Buffer.byteLength(t); if (e > 123) throw new DOMException(`Reason must be less than 123 bytes; received ${e}`, `SyntaxError`); } } n.exports = { isConnecting: c, isEstablished: l, isClosing: u, isClosed: d, fireEvent: f, isValidSubprotocol: h, isValidStatusCode: g, websocketMessageReceived: p, utf8Decode: (() => { if (typeof process.versions.icu == `string`) { let e = new TextDecoder(`utf-8`, { fatal: !0 }); return e.decode.bind(e); } return function(e) { if (a(e)) return e.toString(`utf-8`); throw TypeError(`Invalid utf-8 received.`); }; })(), isControlFrame: _, isContinuationFrame: v, isTextBinaryFrame: y, isValidOpcode: b, parseExtensions: x, isValidClientWindowBits: S, toArrayBuffer: m, getURLRecord: C, validateCloseCodeAndReason: w }; })); var ns$1 = c$12(((e, n) => { let { runtimeFeatures: r } = Ma$3(), { maxUnsigned16Bit: i, opcodes: a } = es$1(), o = 8 * 1024, s = null, c = o, l = r.has(`crypto`) ? f$11(`node:crypto`).randomFillSync : function(e, t, n) { for (let t = 0; t < e.length; ++t) e[t] = Math.random() * 255 | 0; return e; }; function u() { return c === o && (c = 0, l(s ??= Buffer.allocUnsafeSlow(o), 0, o)), [ s[c++], s[c++], s[c++], s[c++] ]; } n.exports = { WebsocketFrameSend: class { constructor(e) { this.frameData = e; } createFrame(e) { let t = this.frameData, n = u(), r = t?.byteLength ?? 0, a = r, o = 6; r > i ? (o += 8, a = 127) : r > 125 && (o += 2, a = 126); let s = Buffer.allocUnsafe(r + o); s[0] = s[1] = 0, s[0] |= 128, s[0] = (s[0] & 240) + e, s[o - 4] = n[0], s[o - 3] = n[1], s[o - 2] = n[2], s[o - 1] = n[3], s[1] = a, a === 126 ? s.writeUInt16BE(r, 2) : a === 127 && (s[2] = s[3] = 0, s.writeUIntBE(r, 4, 6)), s[1] |= 128; for (let e = 0; e < r; ++e) s[o + e] = t[e] ^ n[e & 3]; return s; } static createFastTextFrame(e) { let t = u(), n = e.length; for (let r = 0; r < n; ++r) e[r] ^= t[r & 3]; let r = n, o = 6; n > i ? (o += 8, r = 127) : n > 125 && (o += 2, r = 126); let s = Buffer.allocUnsafeSlow(o); return s[0] = 128 | a.TEXT, s[1] = r | 128, s[o - 4] = t[0], s[o - 3] = t[1], s[o - 2] = t[2], s[o - 1] = t[3], r === 126 ? s.writeUInt16BE(n, 2) : r === 127 && (s[2] = s[3] = 0, s.writeUIntBE(n, 4, 6)), [s, e]; } }, generateMask: u }; })); var rs$1 = c$12(((e, n) => { let { uid: r, states: i, sentCloseFrameState: a, emptyBuffer: o, opcodes: s } = es$1(), { parseExtensions: c, isClosed: l, isClosing: u, isEstablished: d, isConnecting: f, validateCloseCodeAndReason: p } = ts$1(), { makeRequest: m } = Uo$1(), { fetching: h } = Go$1(), { Headers: g, getHeadersList: _ } = Vo$1(), { getDecodeSplit: v } = Pa$3(), { WebsocketFrameSend: y } = ns$1(), b = f$11(`node:assert`), { runtimeFeatures: x } = Ma$3(), S = x.has(`crypto`) ? f$11(`node:crypto`) : null, C = !1; function w(e, t, n, i, a) { let o = e; o.protocol = e.protocol === `ws:` ? `http:` : `https:`; let s = m({ urlList: [o], client: n, serviceWorkers: `none`, referrer: `no-referrer`, mode: `websocket`, credentials: `include`, cache: `no-store`, redirect: `error`, useURLCredentials: !0 }); a.headers && (s.headersList = _(new g(a.headers))); let l = S.randomBytes(16).toString(`base64`); s.headersList.append(`sec-websocket-key`, l, !0), s.headersList.append(`sec-websocket-version`, `13`, !0); for (let e of t) s.headersList.append(`sec-websocket-protocol`, e, !0); return s.headersList.append(`sec-websocket-extensions`, `permessage-deflate; client_max_window_bits`, !0), h({ request: s, useParallelQueue: !0, dispatcher: a.dispatcher, processResponse(e) { if (e.type === `error` || e.status !== 101) { if (e.socket?.session == null) { E(i, 1002, `Received network error or non-101 status code.`, e.error); return; } if (e.status !== 200) { E(i, 1002, `Received network error or non-200 status code.`, e.error); return; } } if (C === !1 && e.socket?.session != null && (process.emitWarning(`WebSocket over HTTP2 is experimental, and subject to change.`, `ExperimentalWarning`), C = !0), t.length !== 0 && !e.headersList.get(`Sec-WebSocket-Protocol`)) { E(i, 1002, `Server did not respond with sent protocols.`); return; } if (e.socket.session == null && e.headersList.get(`Upgrade`)?.toLowerCase() !== `websocket`) { E(i, 1002, `Server did not set Upgrade header to "websocket".`); return; } if (e.socket.session == null && e.headersList.get(`Connection`)?.toLowerCase() !== `upgrade`) { E(i, 1002, `Server did not set Connection header to "upgrade".`); return; } if (e.headersList.get(`Sec-WebSocket-Accept`) !== S.hash(`sha1`, l + r, `base64`)) { E(i, 1002, `Incorrect hash received in Sec-WebSocket-Accept header.`); return; } let n = e.headersList.get(`Sec-WebSocket-Extensions`), a; if (n !== null && (a = c(n), !a.has(`permessage-deflate`))) { E(i, 1002, `Sec-WebSocket-Extensions header does not match.`); return; } let o = e.headersList.get(`Sec-WebSocket-Protocol`); if (o !== null && !v(`sec-websocket-protocol`, s.headersList).includes(o)) { E(i, 1002, `Protocol was not set in the opening handshake.`); return; } e.socket.on(`data`, i.onSocketData), e.socket.on(`close`, i.onSocketClose), e.socket.on(`error`, i.onSocketError), i.wasEverConnected = !0, i.onConnectionEstablished(e, a); } }); } function T(e, t, n, r = !1) { if (t ??= null, n ??= ``, r && p(t, n), !(l(e.readyState) || u(e.readyState))) if (!d(e.readyState)) E(e), e.readyState = i.CLOSING; else if (!e.closeState.has(a.SENT) && !e.closeState.has(a.RECEIVED)) { let r = new y(); n.length !== 0 && t === null && (t = 1e3), b(t === null || Number.isInteger(t)), t === null && n.length === 0 ? r.frameData = o : t !== null && n === null ? (r.frameData = Buffer.allocUnsafe(2), r.frameData.writeUInt16BE(t, 0)) : t !== null && n !== null ? (r.frameData = Buffer.allocUnsafe(2 + Buffer.byteLength(n)), r.frameData.writeUInt16BE(t, 0), r.frameData.write(n, 2, `utf-8`)) : r.frameData = o, e.socket.write(r.createFrame(s.CLOSE)), e.closeState.add(a.SENT), e.readyState = i.CLOSING; } else e.readyState = i.CLOSING; } function E(e, t, n, r) { d(e.readyState) && T(e, t, n, !1), e.controller.abort(), f(e.readyState) ? e.onSocketClose() : e.socket?.destroyed === !1 && e.socket.destroy(); } n.exports = { establishWebSocketConnection: w, failWebsocketConnection: E, closeWebSocketConnection: T }; })); var is$1 = c$12(((e, n) => { let { createInflateRaw: r, Z_DEFAULT_WINDOWBITS: i } = f$11(`node:zlib`), { isValidClientWindowBits: a } = ts$1(), { MessageSizeExceededError: o } = K$6(), s = Buffer.from([ 0, 0, 255, 255 ]), c = Symbol(`kBuffer`), l = Symbol(`kLength`); n.exports = { PerMessageDeflate: class { #e; #t = {}; #n = 0; constructor(e, t) { this.#t.serverNoContextTakeover = e.has(`server_no_context_takeover`), this.#t.serverMaxWindowBits = e.get(`server_max_window_bits`), this.#n = t.maxPayloadSize; } decompress(e, t, n) { if (!this.#e) { let e = i; if (this.#t.serverMaxWindowBits) { if (!a(this.#t.serverMaxWindowBits)) { n(Error(`Invalid server_max_window_bits`)); return; } e = Number.parseInt(this.#t.serverMaxWindowBits); } try { this.#e = r({ windowBits: e }); } catch (e) { n(e); return; } this.#e[c] = [], this.#e[l] = 0, this.#e.on(`data`, (e) => { if (this.#e[l] += e.length, this.#n > 0 && this.#e[l] > this.#n) { n(new o()), this.#e.removeAllListeners(), this.#e = null; return; } this.#e[c].push(e); }), this.#e.on(`error`, (e) => { this.#e = null, n(e); }); } this.#e.write(e), t && this.#e.write(s), this.#e.flush(() => { if (!this.#e) return; let e = Buffer.concat(this.#e[c], this.#e[l]); this.#e[c].length = 0, this.#e[l] = 0, n(null, e); }); } } }; })); var as$1 = c$12(((e, n) => { let { Writable: r } = f$11(`node:stream`), i = f$11(`node:assert`), { parserStates: a, opcodes: o, states: s, emptyBuffer: c, sentCloseFrameState: l } = es$1(), { isValidStatusCode: u, isValidOpcode: d, websocketMessageReceived: f, utf8Decode: p, isControlFrame: m, isTextBinaryFrame: h, isContinuationFrame: g } = ts$1(), { failWebsocketConnection: _ } = rs$1(), { WebsocketFrameSend: v } = ns$1(), { PerMessageDeflate: y } = is$1(), { MessageSizeExceededError: b } = K$6(); n.exports = { ByteParser: class extends r { #e = []; #t = 0; #n = 0; #r = !1; #i = a.INFO; #a = {}; #o = []; #s; #c; #l; #u; constructor(e, t, n = {}) { super(), this.#c = e, this.#s = t ?? /* @__PURE__ */ new Map(), this.#l = n.maxFragments ?? 0, this.#u = n.maxPayloadSize ?? 0, this.#s.has(`permessage-deflate`) && this.#s.set(`permessage-deflate`, new y(t, n)); } _write(e, t, n) { this.#e.push(e), this.#n += e.length, this.#r = !0, this.run(n); } #d() { return this.#u > 0 && !m(this.#a.opcode) && this.#a.payloadLength + this.#t > this.#u ? (_(this.#c, 1009, `Payload size exceeds maximum allowed size`), !1) : !0; } run(e) { for (; this.#r;) if (this.#i === a.INFO) { if (this.#n < 2) return e(); let t = this.consume(2), n = (t[0] & 128) != 0, r = t[0] & 15, i = (t[1] & 128) == 128, s = !n && r !== o.CONTINUATION, c = t[1] & 127, l = t[0] & 64, u = t[0] & 32, f = t[0] & 16; if (!d(r)) return _(this.#c, 1002, `Invalid opcode received`), e(); if (i) return _(this.#c, 1002, `Frame cannot be masked`), e(); if (l !== 0 && !this.#s.has(`permessage-deflate`)) { _(this.#c, 1002, `Expected RSV1 to be clear.`); return; } if (u !== 0 || f !== 0) { _(this.#c, 1002, `RSV1, RSV2, RSV3 must be clear`); return; } if (s && !h(r)) { _(this.#c, 1002, `Invalid frame type was fragmented.`); return; } if (h(r) && this.#o.length > 0) { _(this.#c, 1002, `Expected continuation frame`); return; } if (this.#a.fragmented && s) { _(this.#c, 1002, `Fragmented frame exceeded 125 bytes.`); return; } if ((c > 125 || s) && m(r)) { _(this.#c, 1002, `Control frame either too large or fragmented`); return; } if (g(r) && this.#o.length === 0 && !this.#a.compressed) { _(this.#c, 1002, `Unexpected continuation frame`); return; } if (c <= 125) { if (this.#a.payloadLength = c, this.#i = a.READ_DATA, !this.#d()) return; } else c === 126 ? this.#i = a.PAYLOADLENGTH_16 : c === 127 && (this.#i = a.PAYLOADLENGTH_64); h(r) && (this.#a.binaryType = r, this.#a.compressed = l !== 0), this.#a.opcode = r, this.#a.masked = i, this.#a.fin = n, this.#a.fragmented = s; } else if (this.#i === a.PAYLOADLENGTH_16) { if (this.#n < 2) return e(); let t = this.consume(2); if (this.#a.payloadLength = t.readUInt16BE(0), this.#i = a.READ_DATA, !this.#d()) return; } else if (this.#i === a.PAYLOADLENGTH_64) { if (this.#n < 8) return e(); let t = this.consume(8), n = t.readUInt32BE(0), r = t.readUInt32BE(4); if (n !== 0 || r > 2 ** 31 - 1) { _(this.#c, 1009, `Received payload length > 2^31 bytes.`); return; } if (this.#a.payloadLength = r, this.#i = a.READ_DATA, !this.#d()) return; } else if (this.#i === a.READ_DATA) { if (this.#n < this.#a.payloadLength) return e(); let t = this.consume(this.#a.payloadLength); if (m(this.#a.opcode)) this.#r = this.parseControlFrame(t), this.#i = a.INFO; else if (this.#a.compressed) { this.#s.get(`permessage-deflate`).decompress(t, this.#a.fin, (t, n) => { if (t) { let e = t instanceof b ? 1009 : 1007; _(this.#c, e, t.message); return; } if (this.writeFragments(n)) { if (this.#u > 0 && this.#t > this.#u) { _(this.#c, 1009, new b().message); return; } if (!this.#a.fin) { this.#i = a.INFO, this.#r = !0, this.run(e); return; } f(this.#c, this.#a.binaryType, this.consumeFragments()), this.#r = !0, this.#i = a.INFO, this.run(e); } }, this.#t), this.#r = !1; break; } else { if (!this.writeFragments(t)) return; !this.#a.fragmented && this.#a.fin && f(this.#c, this.#a.binaryType, this.consumeFragments()), this.#i = a.INFO; } } } consume(e) { if (e > this.#n) throw Error(`Called consume() before buffers satiated.`); if (e === 0) return c; this.#n -= e; let t = this.#e[0]; if (t.length > e) return this.#e[0] = t.subarray(e, t.length), t.subarray(0, e); if (t.length === e) return this.#e.shift(); { let t = 0, n = Buffer.allocUnsafeSlow(e); for (; t !== e;) { let r = this.#e[0], i = r.length; if (i + t === e) { n.set(this.#e.shift(), t); break; } else if (i + t > e) { n.set(r.subarray(0, e - t), t), this.#e[0] = r.subarray(e - t); break; } else n.set(this.#e.shift(), t), t += i; } return n; } } writeFragments(e) { return this.#l > 0 && this.#o.length === this.#l ? (_(this.#c, 1008, `Too many message fragments`), !1) : (this.#t += e.length, this.#o.push(e), !0); } consumeFragments() { let e = this.#o; if (e.length === 1) return this.#t = 0, e.shift(); let t = 0, n = Buffer.allocUnsafeSlow(this.#t); for (let r = 0; r < e.length; ++r) { let i = e[r]; n.set(i, t), t += i.length; } return this.#o = [], this.#t = 0, n; } parseCloseBody(e) { i(e.length !== 1); let t; if (e.length >= 2 && (t = e.readUInt16BE(0)), t !== void 0 && !u(t)) return { code: 1002, reason: `Invalid status code`, error: !0 }; let n = e.subarray(2); n[0] === 239 && n[1] === 187 && n[2] === 191 && (n = n.subarray(3)); try { n = p(n); } catch { return { code: 1007, reason: `Invalid UTF-8`, error: !0 }; } return { code: t, reason: n, error: !1 }; } parseControlFrame(e) { let { opcode: t, payloadLength: n } = this.#a; if (t === o.CLOSE) { if (n === 1) return _(this.#c, 1002, `Received close frame with a 1-byte body.`), !1; if (this.#a.closeInfo = this.parseCloseBody(e), this.#a.closeInfo.error) { let { code: e, reason: t } = this.#a.closeInfo; return _(this.#c, e, t), !1; } if (!this.#c.closeState.has(l.SENT) && !this.#c.closeState.has(l.RECEIVED)) { let e = c; this.#a.closeInfo.code && (e = Buffer.allocUnsafe(2), e.writeUInt16BE(this.#a.closeInfo.code, 0)); let t = new v(e); this.#c.socket.write(t.createFrame(o.CLOSE)), this.#c.closeState.add(l.SENT); } return this.#c.readyState = s.CLOSING, this.#c.closeState.add(l.RECEIVED), !1; } else if (t === o.PING) { if (!this.#c.closeState.has(l.RECEIVED)) { let t = new v(e); this.#c.socket.write(t.createFrame(o.PONG)), this.#c.onPing(e); } } else t === o.PONG && this.#c.onPong(e); return !0; } get closingInfo() { return this.#a.closeInfo; } } }; })); var os$1 = c$12(((e, t) => { let { WebsocketFrameSend: n } = ns$1(), { opcodes: r, sendHints: i } = es$1(), a = Ha$3(); var o = class { #e = new a(); #t = !1; #n; constructor(e) { this.#n = e; } add(e, t, r) { if (r !== i.blob) { if (this.#t) { let n = { promise: null, callback: t, frame: s(e, r) }; this.#e.push(n); } else if (r === i.text) { let { 0: r, 1: i } = n.createFastTextFrame(e); this.#n.cork(), this.#n.write(r), this.#n.write(i, t), this.#n.uncork(); } else this.#n.write(s(e, r), t); return; } let a = { promise: e.arrayBuffer().then((e) => { a.promise = null, a.frame = s(e, r); }), callback: t, frame: null }; this.#e.push(a), this.#t || this.#r(); } async #r() { this.#t = !0; let e = this.#e; for (; !e.isEmpty();) { let t = e.shift(); t.promise !== null && await t.promise, this.#n.write(t.frame, t.callback), t.callback = t.frame = null; } this.#t = !1; } }; function s(e, t) { return new n(c(e, t)).createFrame(t === i.text ? r.TEXT : r.BINARY); } function c(e, t) { switch (t) { case i.text: case i.typedArray: return new Uint8Array(e.buffer, e.byteOffset, e.byteLength); case i.arrayBuffer: case i.blob: return new Uint8Array(e); } } t.exports = { SendQueue: o }; })); var ss$1 = c$12(((e, n) => { let { isArrayBuffer: r } = f$11(`node:util/types`), { webidl: i } = Na$3(), { URLSerializer: a } = ja$3(), { environmentSettingsObject: o } = Pa$3(), { staticPropertyDescriptors: s, states: c, sentCloseFrameState: l, sendHints: u, opcodes: d } = es$1(), { isConnecting: f, isEstablished: p, isClosing: m, isClosed: h, isValidSubprotocol: g, fireEvent: _, utf8Decode: v, toArrayBuffer: y, getURLRecord: b } = ts$1(), { establishWebSocketConnection: x, closeWebSocketConnection: S, failWebsocketConnection: C } = rs$1(), { ByteParser: w } = as$1(), { kEnumerableProperty: T } = q$6(), { getGlobalDispatcher: E } = Co$1(), { ErrorEvent: D, CloseEvent: O, createFastMessageEvent: k } = $o$1(), { SendQueue: A } = os$1(), { WebsocketFrameSend: j } = ns$1(), { channels: M } = ga$3(); function N(e) { return typeof e?.address == `function` ? e.address() : typeof e?.session?.socket?.address == `function` ? e.session.socket.address() : null; } var P = class e extends EventTarget { #e = { open: null, error: null, close: null, message: null }; #t = 0; #n = ``; #r = ``; #i; #a = { onConnectionEstablished: (e, t) => this.#l(e, t), onMessage: (e, t) => this.#u(e, t), onParserError: (e) => C(this.#a, null, e.message), onParserDrain: () => this.#d(), onSocketData: (e) => { this.#c.write(e) || this.#a.socket.pause(); }, onSocketError: (e) => { this.#a.readyState = c.CLOSING, M.socketError.hasSubscribers && M.socketError.publish(e), this.#a.socket.destroy(); }, onSocketClose: () => this.#f(), onPing: (e) => { M.ping.hasSubscribers && M.ping.publish({ payload: e, websocket: this }); }, onPong: (e) => { M.pong.hasSubscribers && M.pong.publish({ payload: e, websocket: this }); }, readyState: c.CONNECTING, socket: null, closeState: /* @__PURE__ */ new Set(), controller: null, wasEverConnected: !1 }; #o; #s; #c; constructor(t, n = []) { super(), i.util.markAsUncloneable(this); let r = `WebSocket constructor`; i.argumentLengthCheck(arguments, 1, r); let a = i.converters[`DOMString or sequence or WebSocketInit`](n, r, `options`); t = i.converters.USVString(t), n = a.protocols; let s = o.settingsObject.baseUrl, c = b(t, s); if (typeof n == `string` && (n = [n]), n.length !== new Set(n.map((e) => e.toLowerCase())).size || n.length > 0 && !n.every((e) => g(e))) throw new DOMException(`Invalid Sec-WebSocket-Protocol value`, `SyntaxError`); this.#o = new URL(c.href); let l = o.settingsObject; this.#a.controller = x(c, n, l, this.#a, a), this.#a.readyState = e.CONNECTING, this.#s = `blob`; } close(t = void 0, n = void 0) { i.brandCheck(this, e), t !== void 0 && (t = i.converters[`unsigned short`](t, `WebSocket.close`, `code`, i.attributes.Clamp)), n !== void 0 && (n = i.converters.USVString(n)), t ??= null, n ??= ``, S(this.#a, t, n, !0); } send(t) { i.brandCheck(this, e); let n = `WebSocket.send`; if (i.argumentLengthCheck(arguments, 1, n), t = i.converters.WebSocketSendData(t, n, `data`), f(this.#a.readyState)) throw new DOMException(`Sent before connected.`, `InvalidStateError`); if (!(!p(this.#a.readyState) || m(this.#a.readyState))) if (typeof t == `string`) { let e = Buffer.from(t); this.#t += e.byteLength, this.#i.add(e, () => { this.#t -= e.byteLength; }, u.text); } else r(t) ? (this.#t += t.byteLength, this.#i.add(t, () => { this.#t -= t.byteLength; }, u.arrayBuffer)) : ArrayBuffer.isView(t) ? (this.#t += t.byteLength, this.#i.add(t, () => { this.#t -= t.byteLength; }, u.typedArray)) : i.is.Blob(t) && (this.#t += t.size, this.#i.add(t, () => { this.#t -= t.size; }, u.blob)); } get readyState() { return i.brandCheck(this, e), this.#a.readyState; } get bufferedAmount() { return i.brandCheck(this, e), this.#t; } get url() { return i.brandCheck(this, e), a(this.#o); } get extensions() { return i.brandCheck(this, e), this.#r; } get protocol() { return i.brandCheck(this, e), this.#n; } get onopen() { return i.brandCheck(this, e), this.#e.open; } set onopen(t) { i.brandCheck(this, e), this.#e.open && this.removeEventListener(`open`, this.#e.open); let n = i.converters.EventHandlerNonNull(t); n === null ? this.#e.open = null : (this.addEventListener(`open`, n), this.#e.open = t); } get onerror() { return i.brandCheck(this, e), this.#e.error; } set onerror(t) { i.brandCheck(this, e), this.#e.error && this.removeEventListener(`error`, this.#e.error); let n = i.converters.EventHandlerNonNull(t); n === null ? this.#e.error = null : (this.addEventListener(`error`, n), this.#e.error = t); } get onclose() { return i.brandCheck(this, e), this.#e.close; } set onclose(t) { i.brandCheck(this, e), this.#e.close && this.removeEventListener(`close`, this.#e.close); let n = i.converters.EventHandlerNonNull(t); n === null ? this.#e.close = null : (this.addEventListener(`close`, n), this.#e.close = t); } get onmessage() { return i.brandCheck(this, e), this.#e.message; } set onmessage(t) { i.brandCheck(this, e), this.#e.message && this.removeEventListener(`message`, this.#e.message); let n = i.converters.EventHandlerNonNull(t); n === null ? this.#e.message = null : (this.addEventListener(`message`, n), this.#e.message = t); } get binaryType() { return i.brandCheck(this, e), this.#s; } set binaryType(t) { i.brandCheck(this, e), t !== `blob` && t !== `arraybuffer` ? this.#s = `blob` : this.#s = t; } #l(e, t) { this.#a.socket = e.socket; let n = this.#a.controller.dispatcher?.webSocketOptions, r = n?.maxFragments, i = n?.maxPayloadSize, a = new w(this.#a, t, { maxFragments: r, maxPayloadSize: i }); a.on(`drain`, () => this.#a.onParserDrain()), a.on(`error`, (e) => this.#a.onParserError(e)), this.#c = a, this.#i = new A(e.socket), this.#a.readyState = c.OPEN; let o = e.headersList.get(`sec-websocket-extensions`); o !== null && (this.#r = o); let s = e.headersList.get(`sec-websocket-protocol`); if (s !== null && (this.#n = s), _(`open`, this), M.open.hasSubscribers) { let t = e.headersList.entries; M.open.publish({ address: N(e.socket), protocol: this.#n, extensions: this.#r, websocket: this, handshakeResponse: { status: e.status, statusText: e.statusText, headers: t } }); } } #u(e, t) { if (this.#a.readyState !== c.OPEN) return; let n; if (e === d.TEXT) try { n = v(t); } catch { C(this.#a, 1007, `Received invalid UTF-8 in text frame.`); return; } else e === d.BINARY && (n = this.#s === `blob` ? new Blob([t]) : y(t)); _(`message`, this, k, { origin: this.#o.origin, data: n }); } #d() { this.#a.socket.resume(); } #f() { let e = this.#a.closeState.has(l.SENT) && this.#a.closeState.has(l.RECEIVED), t = 1005, n = ``, r = this.#c?.closingInfo; r && !r.error && (t = r.code ?? 1005, n = r.reason), this.#a.readyState = c.CLOSED, this.#a.closeState.has(l.RECEIVED) || (t = 1006, _(`error`, this, (e, t) => new D(e, t), { error: TypeError(n) })), _(`close`, this, (e, t) => new O(e, t), { wasClean: e, code: t, reason: n }), M.close.hasSubscribers && M.close.publish({ websocket: this, code: t, reason: n }); } static ping(e, t) { if (Buffer.isBuffer(t)) { if (t.length > 125) throw TypeError(`A PING frame cannot have a body larger than 125 bytes.`); } else if (t !== void 0) throw TypeError(`Expected buffer payload`); let n = e.#a.readyState; if (p(n) && !m(n) && !h(n)) { let n = new j(t); e.#a.socket.write(n.createFrame(d.PING)); } } }; let { ping: F } = P; Reflect.deleteProperty(P, `ping`), P.CONNECTING = P.prototype.CONNECTING = c.CONNECTING, P.OPEN = P.prototype.OPEN = c.OPEN, P.CLOSING = P.prototype.CLOSING = c.CLOSING, P.CLOSED = P.prototype.CLOSED = c.CLOSED, Object.defineProperties(P.prototype, { CONNECTING: s, OPEN: s, CLOSING: s, CLOSED: s, url: T, readyState: T, bufferedAmount: T, onopen: T, onerror: T, onclose: T, close: T, onmessage: T, binaryType: T, send: T, extensions: T, protocol: T, [Symbol.toStringTag]: { value: `WebSocket`, writable: !1, enumerable: !1, configurable: !0 } }), Object.defineProperties(P, { CONNECTING: s, OPEN: s, CLOSING: s, CLOSED: s }), i.converters[`sequence`] = i.sequenceConverter(i.converters.DOMString), i.converters[`DOMString or sequence`] = function(e, t, n) { return i.util.Type(e) === i.util.Types.OBJECT && Symbol.iterator in e ? i.converters[`sequence`](e) : i.converters.DOMString(e, t, n); }, i.converters.WebSocketInit = i.dictionaryConverter([ { key: `protocols`, converter: i.converters[`DOMString or sequence`], defaultValue: () => [] }, { key: `dispatcher`, converter: i.converters.any, defaultValue: () => E() }, { key: `headers`, converter: i.nullableConverter(i.converters.HeadersInit) } ]), i.converters[`DOMString or sequence or WebSocketInit`] = function(e) { return i.util.Type(e) === i.util.Types.OBJECT && !(Symbol.iterator in e) ? i.converters.WebSocketInit(e) : { protocols: i.converters[`DOMString or sequence`](e) }; }, i.converters.WebSocketSendData = function(e) { return i.util.Type(e) === i.util.Types.OBJECT && (i.is.Blob(e) || i.is.BufferSource(e)) ? e : i.converters.USVString(e); }, n.exports = { WebSocket: P, ping: F }; })); var cs$1 = c$12(((e, t) => { let { webidl: n } = Na$3(), { validateCloseCodeAndReason: r } = ts$1(), { kConstruct: i } = da$3(), { kEnumerableProperty: a } = q$6(); function o() { class e extends DOMException { get reason() { return ``; } } return new e().reason === void 0 ? new Proxy(DOMException, { construct(e, t, n) { let r = Reflect.construct(e, t, e); return Object.setPrototypeOf(r, n.prototype), r; } }) : DOMException; } var s = class e extends o() { #e; #t; constructor(e = ``, t = void 0) { if (e = n.converters.DOMString(e, `WebSocketError`, `message`), super(e, `WebSocketError`), t === i) return; t !== null && (t = n.converters.WebSocketCloseInfo(t)); let a = t.closeCode ?? null, o = t.reason ?? ``; r(a, o), o.length !== 0 && a === null && (a = 1e3), this.#e = a, this.#t = o; } get closeCode() { return this.#e; } get reason() { return this.#t; } static createUnvalidatedWebSocketError(t, n, r) { let a = new e(t, i); return a.#e = n, a.#t = r, a; } }; let { createUnvalidatedWebSocketError: c } = s; delete s.createUnvalidatedWebSocketError, Object.defineProperties(s.prototype, { closeCode: a, reason: a, [Symbol.toStringTag]: { value: `WebSocketError`, writable: !1, enumerable: !1, configurable: !0 } }), n.is.WebSocketError = n.util.MakeTypeAssertion(s), t.exports = { WebSocketError: s, createUnvalidatedWebSocketError: c }; })); var ls$1 = c$12(((e, t) => { let { createDeferredPromise: n } = La$3(), { environmentSettingsObject: r } = Pa$3(), { states: i, opcodes: a, sentCloseFrameState: o } = es$1(), { webidl: s } = Na$3(), { getURLRecord: c, isValidSubprotocol: l, isEstablished: u, utf8Decode: d } = ts$1(), { establishWebSocketConnection: f, failWebsocketConnection: p, closeWebSocketConnection: m } = rs$1(), { channels: h } = ga$3(), { WebsocketFrameSend: g } = ns$1(), { ByteParser: _ } = as$1(), { WebSocketError: v, createUnvalidatedWebSocketError: y } = cs$1(), { kEnumerableProperty: b } = q$6(), { utf8DecodeBytes: x } = ka$3(), S = !1; var C = class { #e; #t; #n; #r; #i; #a; #o = !1; #s = { onConnectionEstablished: (e, t) => this.#u(e, t), onMessage: (e, t) => this.#d(e, t), onParserError: (e) => p(this.#s, null, e.message), onParserDrain: () => this.#s.socket.resume(), onSocketData: (e) => { this.#c.write(e) || this.#s.socket.pause(); }, onSocketError: (e) => { this.#s.readyState = i.CLOSING, h.socketError.hasSubscribers && h.socketError.publish(e), this.#s.socket.destroy(); }, onSocketClose: () => this.#f(), onPing: () => {}, onPong: () => {}, readyState: i.CONNECTING, socket: null, closeState: /* @__PURE__ */ new Set(), controller: null, wasEverConnected: !1 }; #c; constructor(e, t = void 0) { S ||= (process.emitWarning(`WebSocketStream is experimental! Expect it to change at any time.`, { code: `UNDICI-WSS` }), !0), s.argumentLengthCheck(arguments, 1, `WebSocket`), e = s.converters.USVString(e), t !== null && (t = s.converters.WebSocketStreamOptions(t)); let a = r.settingsObject.baseUrl, o = c(e, a), d = t.protocols; if (d.length !== new Set(d.map((e) => e.toLowerCase())).size || d.length > 0 && !d.every((e) => l(e))) throw new DOMException(`Invalid Sec-WebSocket-Protocol value`, `SyntaxError`); if (this.#e = o.toString(), this.#t = n(), this.#n = n(), t.signal != null) { let e = t.signal; if (e.aborted) { this.#t.reject(e.reason), this.#n.reject(e.reason); return; } e.addEventListener(`abort`, () => { u(this.#s.readyState) || (p(this.#s), this.#s.readyState = i.CLOSING, this.#t.reject(e.reason), this.#n.reject(e.reason), this.#o = !0); }, { once: !0 }); } let m = r.settingsObject; this.#s.controller = f(o, d, m, this.#s, t); } get url() { return this.#e.toString(); } get opened() { return this.#t.promise; } get closed() { return this.#n.promise; } close(e = void 0) { e !== null && (e = s.converters.WebSocketCloseInfo(e)); let t = e.closeCode ?? null, n = e.reason; m(this.#s, t, n, !0); } #l(e) { e = s.converters.WebSocketStreamWrite(e); let t = n(), r = null, i = null; if (s.is.BufferSource(e)) r = new Uint8Array(ArrayBuffer.isView(e) ? new Uint8Array(e.buffer, e.byteOffset, e.byteLength) : e.slice()), i = a.BINARY; else { let n; try { n = s.converters.DOMString(e); } catch (e) { return t.reject(e), t.promise; } r = new TextEncoder().encode(n), i = a.TEXT; } if (!this.#s.closeState.has(o.SENT) && !this.#s.closeState.has(o.RECEIVED)) { let e = new g(r); this.#s.socket.write(e.createFrame(i), () => { t.resolve(void 0); }); } return t.promise; } #u(e, t) { this.#s.socket = e.socket; let n = this.#s.controller.dispatcher?.webSocketOptions?.maxFragments, r = this.#s.controller.dispatcher?.webSocketOptions?.maxPayloadSize, a = new _(this.#s, t, { maxFragments: n, maxPayloadSize: r }); a.on(`drain`, () => this.#s.onParserDrain()), a.on(`error`, (e) => this.#s.onParserError(e)), this.#c = a, this.#s.readyState = i.OPEN; let o = t ?? ``, s = e.headersList.get(`sec-websocket-protocol`) ?? ``, c = new ReadableStream({ start: (e) => { this.#i = e; }, cancel: (e) => this.#m(e) }), l = new WritableStream({ write: (e) => this.#l(e), close: () => m(this.#s, null, null), abort: (e) => this.#p(e) }); this.#r = c, this.#a = l, this.#t.resolve({ extensions: o, protocol: s, readable: c, writable: l }); } #d(e, t) { if (this.#s.readyState !== i.OPEN) return; let n; if (e === a.TEXT) try { n = d(t); } catch { p(this.#s, 1007, `Received invalid UTF-8 in text frame.`); return; } else e === a.BINARY && (n = new Uint8Array(t.buffer, t.byteOffset, t.byteLength)); this.#i.enqueue(n); } #f() { let e = this.#s.closeState.has(o.SENT) && this.#s.closeState.has(o.RECEIVED); if (this.#s.readyState = i.CLOSED, this.#o) return; this.#s.wasEverConnected || this.#t.reject(new v(`Socket never opened`)); let t = this.#c?.closingInfo, n = t?.code ?? 1005; !this.#s.closeState.has(o.SENT) && !this.#s.closeState.has(o.RECEIVED) && (n = 1006); let r = t?.reason == null ? `` : x(Buffer.from(t.reason)); if (e) this.#i.close(), this.#a.locked || this.#a.abort(new DOMException(`A closed WebSocketStream cannot be written to`, `InvalidStateError`)), this.#n.resolve({ closeCode: n, reason: r }); else { let e = y(`unclean close`, n, r); this.#i?.error(e), this.#a?.abort(e), this.#n.reject(e); } } #p(e) { let t = null, n = ``; s.is.WebSocketError(e) && (t = e.closeCode, n = e.reason), m(this.#s, t, n); } #m(e) { this.#p(e); } }; Object.defineProperties(C.prototype, { url: b, opened: b, closed: b, close: b, [Symbol.toStringTag]: { value: `WebSocketStream`, writable: !1, enumerable: !1, configurable: !0 } }), s.converters.WebSocketStreamOptions = s.dictionaryConverter([{ key: `protocols`, converter: s.sequenceConverter(s.converters.USVString), defaultValue: () => [] }, { key: `signal`, converter: s.nullableConverter(s.converters.AbortSignal), defaultValue: () => null }]), s.converters.WebSocketCloseInfo = s.dictionaryConverter([{ key: `closeCode`, converter: (e) => s.converters[`unsigned short`](e, s.attributes.EnforceRange) }, { key: `reason`, converter: s.converters.USVString, defaultValue: () => `` }]), s.converters.WebSocketStreamWrite = function(e) { return typeof e == `string` ? s.converters.USVString(e) : s.converters.BufferSource(e); }, t.exports = { WebSocketStream: C }; })); var us$1 = c$12(((e, t) => { function n(e) { return e.indexOf(`\0`) === -1; } function r(e) { if (e.length === 0) return !1; for (let t = 0; t < e.length; t++) if (e.charCodeAt(t) < 48 || e.charCodeAt(t) > 57) return !1; return !0; } t.exports = { isValidLastEventId: n, isASCIINumber: r }; })); var ds$1 = c$12(((e, n) => { let { Transform: r } = f$11(`node:stream`), { isASCIINumber: i, isValidLastEventId: a } = us$1(), o = [ 239, 187, 191 ]; n.exports = { EventSourceStream: class extends r { state; checkBOM = !0; crlfCheck = !1; eventEndCheck = !1; buffer = null; pos = 0; event = { data: void 0, event: void 0, id: void 0, retry: void 0 }; constructor(e = {}) { e.readableObjectMode = !0, super(e), this.state = e.eventSourceSettings || {}, e.push && (this.push = e.push); } _transform(e, t, n) { if (e.length === 0) { n(); return; } if (this.buffer ? this.buffer = Buffer.concat([this.buffer, e]) : this.buffer = e, this.checkBOM) switch (this.buffer.length) { case 1: if (this.buffer[0] === o[0]) { n(); return; } this.checkBOM = !1, n(); return; case 2: if (this.buffer[0] === o[0] && this.buffer[1] === o[1]) { n(); return; } this.checkBOM = !1; break; case 3: if (this.buffer[0] === o[0] && this.buffer[1] === o[1] && this.buffer[2] === o[2]) { this.buffer = Buffer.alloc(0), this.checkBOM = !1, n(); return; } this.checkBOM = !1; break; default: this.buffer[0] === o[0] && this.buffer[1] === o[1] && this.buffer[2] === o[2] && (this.buffer = this.buffer.subarray(3)), this.checkBOM = !1; break; } for (; this.pos < this.buffer.length;) { if (this.eventEndCheck) { if (this.crlfCheck) { if (this.buffer[this.pos] === 10) { this.buffer = this.buffer.subarray(this.pos + 1), this.pos = 0, this.crlfCheck = !1; continue; } this.crlfCheck = !1; } if (this.buffer[this.pos] === 10 || this.buffer[this.pos] === 13) { this.buffer[this.pos] === 13 && (this.crlfCheck = !0), this.buffer = this.buffer.subarray(this.pos + 1), this.pos = 0, (this.event.data !== void 0 || this.event.event || this.event.id !== void 0 || this.event.retry) && this.processEvent(this.event), this.clearEvent(); continue; } this.eventEndCheck = !1; continue; } if (this.buffer[this.pos] === 10 || this.buffer[this.pos] === 13) { this.buffer[this.pos] === 13 && (this.crlfCheck = !0), this.parseLine(this.buffer.subarray(0, this.pos), this.event), this.buffer = this.buffer.subarray(this.pos + 1), this.pos = 0, this.eventEndCheck = !0; continue; } this.pos++; } n(); } parseLine(e, t) { if (e.length === 0) return; let n = e.indexOf(58); if (n === 0) return; let r = ``, o = ``; if (n !== -1) { r = e.subarray(0, n).toString(`utf8`); let t = n + 1; e[t] === 32 && ++t, o = e.subarray(t).toString(`utf8`); } else r = e.toString(`utf8`), o = ``; switch (r) { case `data`: t[r] === void 0 ? t[r] = o : t[r] += `\n${o}`; break; case `retry`: i(o) && (t[r] = o); break; case `id`: a(o) && (t[r] = o); break; case `event`: o.length > 0 && (t[r] = o); break; } } processEvent(e) { e.retry && i(e.retry) && (this.state.reconnectionTime = parseInt(e.retry, 10)), e.id !== void 0 && a(e.id) && (this.state.lastEventId = e.id), e.data !== void 0 && this.push({ type: e.event || `message`, options: { data: e.data, lastEventId: this.state.lastEventId, origin: this.state.origin } }); } clearEvent() { this.event = { data: void 0, event: void 0, id: void 0, retry: void 0 }; } } }; })); var fs$1 = c$12(((e, n) => { let { pipeline: r } = f$11(`node:stream`), { fetching: i } = Go$1(), { makeRequest: a } = Uo$1(), { webidl: o } = Na$3(), { EventSourceStream: s } = ds$1(), { parseMIMEType: c } = ja$3(), { createFastMessageEvent: l } = $o$1(), { isNetworkError: u } = Ho$1(), { kEnumerableProperty: d } = q$6(), { environmentSettingsObject: f } = Pa$3(), p = !1, m = 3e3; var h = class e extends EventTarget { #e = { open: null, error: null, message: null }; #t; #n = !1; #r = 0; #i = null; #a = null; #o; #s; constructor(e, t = {}) { super(), o.util.markAsUncloneable(this); let n = `EventSource constructor`; o.argumentLengthCheck(arguments, 1, n), p || (p = !0, process.emitWarning(`EventSource is experimental, expect them to change at any time.`, { code: `UNDICI-ES` })), e = o.converters.USVString(e), t = o.converters.EventSourceInitDict(t, n, `eventSourceInitDict`), this.#o = t.node.dispatcher || t.dispatcher, this.#s = { lastEventId: ``, reconnectionTime: t.node.reconnectionTime }; let r = f, i; try { i = new URL(e, r.settingsObject.baseUrl), this.#s.origin = i.origin; } catch (e) { throw new DOMException(e, `SyntaxError`); } this.#t = i.href; let s = `anonymous`; t.withCredentials === !0 && (s = `use-credentials`, this.#n = !0); let c = { redirect: `follow`, keepalive: !0, mode: `cors`, credentials: s === `anonymous` ? `same-origin` : `omit`, referrer: `no-referrer` }; c.client = f.settingsObject, c.headersList = [[`accept`, { name: `accept`, value: `text/event-stream` }]], c.cache = `no-store`, c.initiator = `other`, c.urlList = [new URL(this.#t)], this.#i = a(c), this.#c(); } get readyState() { return this.#r; } get url() { return this.#t; } get withCredentials() { return this.#n; } #c() { if (this.#r === 2) return; this.#r = 0; let e = { request: this.#i, dispatcher: this.#o }; e.processResponseEndOfBody = (e) => { if (!u(e)) return this.#l(); }, e.processResponse = (e) => { if (u(e)) if (e.aborted) { this.close(), this.dispatchEvent(new Event(`error`)); return; } else { this.#l(); return; } let t = e.headersList.get(`content-type`, !0), n = t === null ? `failure` : c(t), i = n !== `failure` && n.essence === `text/event-stream`; if (e.status !== 200 || i === !1) { this.close(), this.dispatchEvent(new Event(`error`)); return; } this.#r = 1, this.dispatchEvent(new Event(`open`)), this.#s.origin = e.urlList[e.urlList.length - 1].origin; let a = new s({ eventSourceSettings: this.#s, push: (e) => { this.dispatchEvent(l(e.type, e.options)); } }); r(e.body.stream, a, (e) => { e?.aborted === !1 && (this.close(), this.dispatchEvent(new Event(`error`))); }); }, this.#a = i(e); } #l() { this.#r !== 2 && (this.#r = 0, this.dispatchEvent(new Event(`error`)), setTimeout(() => { this.#r === 0 && (this.#s.lastEventId.length && this.#i.headersList.set(`last-event-id`, this.#s.lastEventId, !0), this.#c()); }, this.#s.reconnectionTime)?.unref()); } close() { o.brandCheck(this, e), this.#r !== 2 && (this.#r = 2, this.#a.abort(), this.#i = null); } get onopen() { return this.#e.open; } set onopen(e) { this.#e.open && this.removeEventListener(`open`, this.#e.open); let t = o.converters.EventHandlerNonNull(e); t === null ? this.#e.open = null : (this.addEventListener(`open`, t), this.#e.open = e); } get onmessage() { return this.#e.message; } set onmessage(e) { this.#e.message && this.removeEventListener(`message`, this.#e.message); let t = o.converters.EventHandlerNonNull(e); t === null ? this.#e.message = null : (this.addEventListener(`message`, t), this.#e.message = e); } get onerror() { return this.#e.error; } set onerror(e) { this.#e.error && this.removeEventListener(`error`, this.#e.error); let t = o.converters.EventHandlerNonNull(e); t === null ? this.#e.error = null : (this.addEventListener(`error`, t), this.#e.error = e); } }; let g = { CONNECTING: { __proto__: null, configurable: !1, enumerable: !0, value: 0, writable: !1 }, OPEN: { __proto__: null, configurable: !1, enumerable: !0, value: 1, writable: !1 }, CLOSED: { __proto__: null, configurable: !1, enumerable: !0, value: 2, writable: !1 } }; Object.defineProperties(h, g), Object.defineProperties(h.prototype, g), Object.defineProperties(h.prototype, { close: d, onerror: d, onmessage: d, onopen: d, readyState: d, url: d, withCredentials: d }), o.converters.EventSourceInitDict = o.dictionaryConverter([ { key: `withCredentials`, converter: o.converters.boolean, defaultValue: () => !1 }, { key: `dispatcher`, converter: o.converters.any }, { key: `node`, converter: o.dictionaryConverter([{ key: `reconnectionTime`, converter: o.converters[`unsigned long`], defaultValue: () => m }, { key: `dispatcher`, converter: o.converters.any }]), defaultValue: () => ({}) } ]), n.exports = { EventSource: h, defaultReconnectionTime: m }; })); var ps$1 = c$12(((e, t) => { let n = Va$3(), r = ya$3(), i = Wa$3(), a = Ga$3(), o = Ka$3(), s = qa$3(), c = Za$2(), l = Xa$2(), u = Qa$2(), d = eo$2(), f = to$2(), p = K$6(), m = q$6(), { InvalidArgumentError: h } = p, g = lo$1(), _ = Sa$3(), v = ho$1(), { MockCallHistory: y, MockCallHistoryLog: b } = go$1(), x = yo$1(), S = _o$1(), C = So$1(), w = uo$1(), T = $a$2(), { getGlobalDispatcher: E, setGlobalDispatcher: D } = Co$1(), O = wo$1(), k = To$1(); Object.assign(r.prototype, g), t.exports.Dispatcher = r, t.exports.Client = n, t.exports.Pool = i, t.exports.BalancedPool = a, t.exports.RoundRobinPool = o, t.exports.Agent = s, t.exports.ProxyAgent = c, t.exports.Socks5ProxyAgent = l, t.exports.EnvHttpProxyAgent = u, t.exports.RetryAgent = d, t.exports.H2CClient = f, t.exports.RetryHandler = T, t.exports.DecoratorHandler = O, t.exports.RedirectHandler = k, t.exports.interceptors = { redirect: Eo$1(), responseError: Do$1(), retry: Oo$1(), dump: ko$1(), dns: Ao$1(), cache: Io$1(), decompress: Lo$1(), deduplicate: zo$1() }, t.exports.cacheStores = { MemoryCacheStore: Po$1() }; let A = Bo$1(); t.exports.cacheStores.SqliteCacheStore = A, t.exports.buildConnector = _, t.exports.errors = p, t.exports.util = { parseHeaders: m.parseHeaders, headerNameToString: m.headerNameToString }; function j(e) { return (t, n, r) => { if (typeof n == `function` && (r = n, n = null), !t || typeof t != `string` && typeof t != `object` && !(t instanceof URL)) throw new h(`invalid url`); if (n != null && typeof n != `object`) throw new h(`invalid opts`); if (n && n.path != null) { if (typeof n.path != `string`) throw new h(`invalid opts.path`); let e = n.path; n.path.startsWith(`/`) || (e = `/${e}`), t = new URL(m.parseOrigin(t).origin + e); } else n ||= typeof t == `object` ? t : {}, t = m.parseURL(t); let { agent: i, dispatcher: a = E() } = n; if (i) throw new h(`unsupported opts.agent. Did you mean opts.client?`); return e.call(a, { ...n, origin: t.origin, path: t.search ? `${t.pathname}${t.search}` : t.pathname, method: n.method || (n.body ? `PUT` : `GET`) }, r); }; } t.exports.setGlobalDispatcher = D, t.exports.getGlobalDispatcher = E; let M = Go$1().fetch, N = typeof __filename < `u` ? __filename : void 0; function P(e, t) { if (!e || typeof e != `object`) return; let n = typeof e.stack == `string` ? e.stack : ``, r = t.replace(/\\/g, `/`); if (n && (n.includes(t) || n.includes(r))) return; let i = {}; if (Error.captureStackTrace(i, P), !i.stack) return; let a = i.stack.split(` `).slice(1).join(` `); e.stack = n ? `${n}\n${a}` : i.stack; } t.exports.fetch = function(e, n = void 0) { return M(e, n).catch((e) => { throw N ? P(e, N) : e && typeof e == `object` && Error.captureStackTrace(e, t.exports.fetch), e; }); }, t.exports.Headers = Vo$1().Headers, t.exports.Response = Ho$1().Response, t.exports.Request = Uo$1().Request, t.exports.FormData = Fa$3().FormData; let { setGlobalOrigin: F, getGlobalOrigin: I } = Oa$3(); t.exports.setGlobalOrigin = F, t.exports.getGlobalOrigin = I; let { CacheStorage: ee } = Jo$1(), { kConstruct: L } = da$3(); t.exports.caches = new ee(L); let { deleteCookie: te, getCookies: R, getSetCookies: ne, setCookie: re, parseCookie: z } = Qo$1(); t.exports.deleteCookie = te, t.exports.getCookies = R, t.exports.getSetCookies = ne, t.exports.setCookie = re, t.exports.parseCookie = z; let { parseMIMEType: ie, serializeAMimeType: ae } = ja$3(); t.exports.parseMIMEType = ie, t.exports.serializeAMimeType = ae; let { CloseEvent: oe, ErrorEvent: se, MessageEvent: ce } = $o$1(), { WebSocket: le, ping: B } = ss$1(); t.exports.WebSocket = le, t.exports.CloseEvent = oe, t.exports.ErrorEvent = se, t.exports.MessageEvent = ce, t.exports.ping = B, t.exports.WebSocketStream = ls$1().WebSocketStream, t.exports.WebSocketError = cs$1().WebSocketError, t.exports.request = j(g.request), t.exports.stream = j(g.stream), t.exports.pipeline = j(g.pipeline), t.exports.connect = j(g.connect), t.exports.upgrade = j(g.upgrade), t.exports.MockClient = v, t.exports.MockCallHistory = y, t.exports.MockCallHistoryLog = b, t.exports.MockPool = S, t.exports.MockAgent = x, t.exports.SnapshotAgent = C, t.exports.mockErrors = w; let { EventSource: ue } = fs$1(); t.exports.EventSource = ue; function de() { globalThis.fetch = t.exports.fetch, globalThis.Headers = t.exports.Headers, globalThis.Response = t.exports.Response, globalThis.Request = t.exports.Request, globalThis.FormData = t.exports.FormData, globalThis.WebSocket = t.exports.WebSocket, globalThis.CloseEvent = t.exports.CloseEvent, globalThis.ErrorEvent = t.exports.ErrorEvent, globalThis.MessageEvent = t.exports.MessageEvent, globalThis.EventSource = t.exports.EventSource; } t.exports.install = de; })); var ms$1 = ua$3(); var hs$1 = ps$1(); var gs$1 = class { contentType = `application/json`; serialize(e) { return Buffer.from(JSON.stringify(e, fi$3)); } async deserialize(e) { let t = [], n = e.getReader(); for (;;) { let { done: e, value: r } = await n.read(); if (e) break; r && t.push(r); } let r = Buffer.concat(t).toString(); return JSON.parse(r, pi$3); } }; const _s$1 = parseInt(process.env.WORKFLOW_LOCAL_QUEUE_MAX_VISIBILITY ?? `0`, 10) || Infinity; const vs$1 = 2147483647; const ys$1 = parseInt(process.env.WORKFLOW_LOCAL_QUEUE_CONCURRENCY ?? `0`, 10) || 1e3; const bs$1 = `Cannot perform ArrayBuffer.prototype.slice on a detached ArrayBuffer`; function xs$1(e) { let t = e, n = /* @__PURE__ */ new Set(); for (; t && typeof t == `object` && !n.has(t);) { if (n.add(t), `message` in t && typeof t.message == `string` && t.message.includes(bs$1)) return !0; t = `cause` in t ? t.cause : void 0; } return !1; } function Ss$1(e) { let { kind: t, prefix: n } = oh$1(e); return { pathname: t === `workflow` ? `flow` : `step`, prefix: n }; } function Cs$1(e) { let t = new hs$1.Agent({ headersTimeout: 0, connections: 1e3, keepAliveTimeout: 3e4 }), n = new gs$1(), r = Ih$1(), i = new ms$1.Sema(ys$1), a = new AbortController(), o = a.signal, s = /* @__PURE__ */ new Map(), c = /* @__PURE__ */ new Map(), l = async (a, l, u) => { let d = []; if (u?.idempotencyKey) { let e = s.get(u.idempotencyKey); if (e) return { messageId: e }; } let f = n.serialize(l), { pathname: p, prefix: m } = Ss$1(a), h = sh$1.parse(`msg_${r()}`), g = l, _ = g.runId ?? g.workflowRunId ?? void 0, v = g.stepId ?? void 0; if (u?.idempotencyKey) { let e = u.idempotencyKey; s.set(e, h), d.push(() => { s.delete(e); }); } return (async () => { u?.delaySeconds && u.delaySeconds > 0 && await setTimeout$1(Math.min(u.delaySeconds * 1e3, vs$1), void 0, { signal: o }), i.tryAcquire() || (console.warn(`[world-local]: concurrency limit (${ys$1}) reached, waiting for queue to free up`), await i.acquire()); try { for (let n = 0; n < 256; n++) { let r = { ...u?.headers, "content-type": `application/json`, "x-vqs-queue-name": a, "x-vqs-message-id": h, "x-vqs-message-attempt": String(n + 1) }, i = c.get(m), s; if (i) s = await i(new Request(`http://localhost/.well-known/workflow/v1/${p}`, { method: `POST`, headers: r, body: f })); else { let n = await Jr$3(e); s = await fetch(`${n}/.well-known/workflow/v1/${p}`, { method: `POST`, duplex: `half`, dispatcher: t, headers: r, body: f }); } let l = await s.text(); if (s.ok) { try { let e = Number(JSON.parse(l).timeoutSeconds); if (Number.isFinite(e) && e >= 0) { e > 0 && await setTimeout$1(Math.min(e * 1e3, vs$1), void 0, { signal: o }); continue; } } catch {} return; } console.error(`[world-local] Queue message failed (attempt ${n + 1}, HTTP ${s.status})`, { queueName: a, messageId: h, ..._ && { runId: _ }, ...v && { stepId: v }, handlerError: l }), await setTimeout$1(5e3, void 0, { signal: o }); } console.error(`[world-local] Queue message exhausted safety limit (256 attempts)`, { queueName: a, messageId: h, ..._ && { runId: _ }, ...v && { stepId: v } }); } finally { i.release(); } })().catch((e) => { e?.name === `AbortError` || e?.name === `ResponseAborted` || (xs$1(e) ? console.error(`[local world] Queue operation failed: detected "${bs$1}". This usually means a Next.js proxy/middleware consumed Workflow's internal request before the executor could read it. Exclude \`/.well-known/workflow/*\` from your matcher. See https://workflow-sdk.dev/docs/getting-started/next#configure-proxy-handler`, { queueName: a, messageId: h, ..._ && { runId: _ }, ...v && { stepId: v }, originalError: e }) : console.error(`[local world] Queue operation failed:`, e)); }).finally(() => { for (let e of d) e(); }), { messageId: h }; }, u = V$8({ "x-vqs-queue-name": nh$1, "x-vqs-message-id": sh$1, "x-vqs-message-attempt": bm$1() }); return { queue: l, createQueueHandler: (e, t) => async (n) => { let r = u.safeParse(Object.fromEntries(n.headers)); if (!r.success || !n.body) return Response.json({ error: n.body ? `Missing required headers` : `Missing request body` }, { status: 400 }); let i = r.data[`x-vqs-queue-name`], a = r.data[`x-vqs-message-id`], o = r.data[`x-vqs-message-attempt`]; if (!i.startsWith(e)) return Response.json({ error: `Unhandled queue` }, { status: 400 }); let s = await new gs$1().deserialize(n.body); try { let e = await t(s, { attempt: o, queueName: i, messageId: a }), n = null; return typeof e?.timeoutSeconds == `number` && (n = Math.min(e.timeoutSeconds, _s$1)), n == null ? Response.json({ ok: !0 }) : Response.json({ timeoutSeconds: n }); } catch (e) { return Response.json(String(e), { status: 500 }); } }, getDeploymentId: async () => `dpl_local@${(await Oi$3()).version}`, registerHandler(e, t) { c.set(e, t); }, async close() { o.aborted || (a.abort(), await t.close()); } }; } function ws$1(e) { return createHash(`sha256`).update(e).digest(`hex`); } function Ts$1(e, t, n, r) { let i = createHash(`sha256`).update(`${t}\x00${n}\x00${r}`).digest(`hex`); return G.join(e, `hooks`, `tokens`, `${i}.recovery.json`); } const Es$1 = Ih$1(() => Math.random()); const Ds$1 = (e) => (t) => { let n = ai$3(t.replace(/\.json$/, ``)) + `.json`, r = RegExp(`^${e}_`, `g`), i = n.indexOf(`-`); return i === -1 ? Bh$1(n.replace(/\.json$/, ``).replace(r, ``)) : e === `step` ? null : Bh$1(n.substring(i + 1).replace(/\.json$/, ``).replace(r, ``)); }; function Os$1(e, t) { return t === `none` ? { ...e, input: void 0, output: void 0 } : e; } function ks$1(e, t) { return t === `none` ? { ...e, input: void 0, output: void 0 } : e; } function As$1(e, t) { if (t === `none`) { let { metadata: t, ...n } = e; return n; } return e; } function js$1(e, t) { async function n(t) { let n = G.join(e, `hooks`), r = await xi$3(n); for (let e of r) { let r = await gi$3(G.join(n, `${e}.json`), eh$1); if (r && r.token === t) return { ...r, isWebhook: r.isWebhook ?? !0 }; } return null; } async function r(n, r) { Qr$3(`hookId`, n); let i = await ci$3(e, `hooks`, n, eh$1, t); if (!i) throw new b$9(n); let a = r?.resolveData || `all`; return As$1({ ...i, isWebhook: i.isWebhook ?? !0 }, a); } async function i(e) { let t = await n(e); if (!t) throw new b$9(e); return t; } async function a(t) { let n = G.join(e, `hooks`), r = t.resolveData || `all`, i = await Ti$3({ directory: n, schema: eh$1, sortOrder: t.pagination?.sortOrder ?? `asc`, limit: t.pagination?.limit, cursor: t.pagination?.cursor, filePrefix: void 0, filter: (e) => !(t.runId && e.runId !== t.runId), getCreatedAt: () => null, getId: (e) => e.hookId }); return { ...i, data: i.data.map((e) => As$1(e, r)) }; } return { get: r, getByToken: i, list: a }; } async function Ms$1(e, t) { let n = G.join(e, `hooks`), r = await xi$3(n); for (let i of r) { let r = G.join(n, `${i}.json`), a = await gi$3(r, eh$1); a && a.runId === t && (await yi$3(G.join(n, `tokens`, `${ws$1(a.token)}.json`)), await yi$3(Ts$1(e, a.token, a.runId, a.hookId)), await yi$3(r)); } } async function Ns$1(e, t, n, r, i) { Qr$3(`runId`, t); let a = i?.resolveData ?? `all`; switch (n.eventType) { case `run_cancelled`: { let n = /* @__PURE__ */ new Date(), i = { runId: r.runId, deploymentId: r.deploymentId, workflowName: r.workflowName, specVersion: r.specVersion, executionContext: r.executionContext, input: r.input, createdAt: r.createdAt, expiredAt: r.expiredAt, startedAt: r.startedAt, status: `cancelled`, output: void 0, error: void 0, completedAt: n, updatedAt: n, attributes: r.attributes }; return await mi$3($r$3(e, `runs`, `${t}.json`), i, { overwrite: !0 }), await Ms$1(e, t), { event: void 0, run: Os$1(i, a) }; } case `wait_completed`: case `hook_received`: { let r = `evnt_${Es$1()}`, i = /* @__PURE__ */ new Date(), o = { ...n, runId: t, eventId: r, createdAt: i, specVersion: 5 }; return await mi$3($r$3(e, `events`, `${`${t}-${r}`}.json`), o), { event: Nm$1(o, a) }; } default: throw Error(`Event type '${n.eventType}' not supported for legacy runs (specVersion: ${r.specVersion || `undefined`}). Please upgrade 'workflow' package.`); } } const Ps$1 = /* @__PURE__ */ new Map(); function Fs$1(e, t) { let n = Ps$1.get(e), r = {}, i = (async () => { n && await n.catch(() => void 0); try { return await t(); } finally { Ps$1.get(e) === r.task && Ps$1.delete(e); } })(); return r.task = i, Ps$1.set(e, i), i; } function Is$1(e, t) { return { get: (async (n, r) => { Qr$3(`runId`, n); let i = await ci$3(e, `runs`, n, _h$1, t); if (!i) throw new v$8(n); return Os$1(i, r?.resolveData ?? `all`); }), list: (async (t) => { let n = t?.resolveData ?? `all`, r = await Ti$3({ directory: G.join(e, `runs`), schema: _h$1, fileIdFilter: t?.fileIdFilter, filter: (e) => !(t?.workflowName && e.workflowName !== t.workflowName || t?.status && e.status !== t.status), sortOrder: t?.pagination?.sortOrder ?? `desc`, limit: t?.pagination?.limit, cursor: t?.pagination?.cursor, getCreatedAt: Ds$1(`wrun`), getId: (e) => e.runId }); return n === `none` ? { ...r, data: r.data.map((e) => ({ ...e, input: void 0, output: void 0 })) } : r; }), experimentalSetAttributes: async (n, r, i) => (Qr$3(`runId`, n), Fs$1(n, async () => { let a = await ci$3(e, `runs`, n, _h$1, t); if (!a) throw new v$8(n); try { Am$1(r, { existingKeys: Object.keys(a.attributes ?? {}), allowReservedAttributes: i?.allowReservedAttributes }); } catch (e) { throw e instanceof Em$1, e; } let o = jm$1(a.attributes, r), s = { ...a, attributes: o, updatedAt: /* @__PURE__ */ new Date() }; return await mi$3(si$3(e, `runs`, n, t), s, { overwrite: !0 }), { attributes: o }; })) }; } const Ls$1 = V$8({ hookId: R$8().optional(), runId: R$8(), eventId: R$8().optional() }); const Rs$1 = V$8({ eventId: R$8() }); async function zs$1(e) { try { return await gi$3(e, Ls$1); } catch (e) { if (e instanceof SyntaxError || e instanceof ed$2) return null; throw e; } } async function Bs$1(e) { try { return await gi$3(e, Rs$1); } catch (e) { if (e instanceof SyntaxError || e instanceof ed$2) return null; throw e; } } async function Vs$1(e, t, n) { return (await Ti$3({ directory: G.join(e, `events`), schema: $m$1, filePrefix: `${t}-`, filter: (e) => e.eventType === `hook_created` && e.correlationId === n, limit: 1, getCreatedAt: Ds$1(`evnt`), getId: (e) => e.eventId })).data[0]?.eventId ?? null; } async function Hs$1(e, t, n, r, i) { let a = await ci$3(e, `events`, `${t}-${r}`, $m$1, i); if (!a || a.eventType !== `hook_created` || a.correlationId !== n || await ci$3(e, `hooks`, n, eh$1, i)) return; let o = a.eventData ?? {}; if (typeof o.token != `string`) return; let s = { runId: t, hookId: n, token: o.token, metadata: o.metadata, ownerId: `local-owner`, projectId: `local-project`, environment: `local`, createdAt: a.createdAt, specVersion: a.specVersion, isWebhook: o.isWebhook ?? !1, isSystem: o.isSystem ?? !1 }; await bi$3(si$3(e, `hooks`, n, i), JSON.stringify(s, fi$3, 2)); } async function Us$1(e, t, n, r, i) { let a = Ts$1(e, t, n, r); return await bi$3(a, JSON.stringify({ eventId: i })) ? i : (await Bs$1(a))?.eventId ?? null; } function Ws$1(e, t, n) { let r = e.get(t), i = {}, a = (async () => { r && await r.catch(() => void 0); try { return await n(); } finally { e.get(t) === i.task && e.delete(t); } })(); return i.task = a, e.set(t, a), a; } async function Gs$1(e, t) { let n = G.join(e, `waits`), r = await xi$3(n); for (let e of r) e.startsWith(`${t}-`) && await yi$3(G.join(n, `${e}.json`)); } async function Ks$1(e, t, n, r) { return Fs$1(t, async () => { let i = await gi$3(si$3(e, `runs`, t, n), _h$1), a = { ...r, attributes: i?.attributes ?? r.attributes }; return await mi$3(si$3(e, `runs`, t, n), a, { overwrite: !0 }), a; }); } function qs$1(e, t) { let n = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Map(); return { async create(i, a, o) { if (i != null && i !== `` && Qr$3(`runId`, i), `correlationId` in a && typeof a.correlationId == `string` && Qr$3(`correlationId`, a.correlationId), (a.eventType === `step_created` || a.eventType === `step_started` || a.eventType === `step_completed` || a.eventType === `step_failed` || a.eventType === `step_retrying`) && i && a.correlationId) return Ws$1(n, t ? `${i}-${a.correlationId}.${t}` : `${i}-${a.correlationId}`, () => s()); if (a.eventType === `hook_created` && i && a.correlationId) return Ws$1(r, t ? `${i}-${a.correlationId}.hook.${t}` : `${i}-${a.correlationId}.hook`, () => s()); return s(); async function s() { let n = `evnt_${Es$1()}`, r = /* @__PURE__ */ new Date(), s; if (a.eventType === `run_created` && (!i || i === ``)) s = `wrun_${Es$1()}`; else if (i) s = i; else throw Error(`runId is required for non-run_created events`); if (a.eventType === `run_created` && i && i !== ``) { let e = Vh$1(s, `wrun_`); if (e) throw new s$8(e); } let c = a.specVersion ?? 5, l = (e) => [ `completed`, `failed`, `cancelled` ].includes(e), u = (e) => [ `completed`, `failed`, `cancelled` ].includes(e), f = null; if (a.eventType !== `run_created` && ![`step_completed`, `step_retrying`].includes(a.eventType) && (f = await ci$3(e, `runs`, s, _h$1, t), a.eventType === `run_started` && !f && `eventData` in a && a.eventData)) { let n = a.eventData; if (n.deploymentId && n.workflowName && n.input !== void 0) { Am$1(Object.entries(n.attributes ?? {}).map(([e, t]) => ({ key: e, value: t })), { allowReservedAttributes: n.allowReservedAttributes === !0 }); let i = { runId: s, deploymentId: n.deploymentId, status: `pending`, workflowName: n.workflowName, specVersion: c, executionContext: n.executionContext, input: n.input, output: void 0, error: void 0, startedAt: void 0, completedAt: void 0, attributes: n.attributes ?? {}, createdAt: r, updatedAt: r }; if (await bi$3(si$3(e, `runs`, s, t), JSON.stringify(i, fi$3))) { let a = `evnt_${Es$1()}`, o = { eventType: `run_created`, runId: s, eventId: a, createdAt: r, specVersion: c, eventData: { deploymentId: n.deploymentId, workflowName: n.workflowName, input: n.input, executionContext: n.executionContext, attributes: n.attributes, allowReservedAttributes: n.allowReservedAttributes } }; await mi$3(si$3(e, `events`, `${s}-${a}`, t), o), f = i; } else f = await ci$3(e, `runs`, s, _h$1, t); } } if (a.eventType === `run_failed` && !f || a.eventType === `attr_set` && !f) throw new v$8(s); if (f) { if (xh$1(f.specVersion)) throw new E$11(f.specVersion, 5); if (bh$1(f.specVersion)) return Ns$1(e, s, a, f, o); } let m = a.eventType === `step_started` && `eventData` in a && !!a.eventData && typeof a.eventData.stepName == `string` && a.eventData.input !== void 0; if (f && l(f.status)) { let i = [ `run_started`, `run_completed`, `run_failed` ]; if (a.eventType === `run_cancelled` && f.status === `cancelled`) { let i = { ...a, runId: s, eventId: n, createdAt: r, specVersion: c }; return await mi$3(si$3(e, `events`, `${s}-${n}`, t), i), { event: Nm$1(i, o?.resolveData ?? `all`), run: f }; } if (a.eventType === `run_started`) throw new S$10(`Workflow run "${s}" is already in terminal state "${f.status}"`); if (i.includes(a.eventType) || a.eventType === `run_cancelled`) throw new x$9(`Cannot transition run from terminal state "${f.status}"`); if (a.eventType === `step_created` || a.eventType === `hook_created` || a.eventType === `wait_created` || m) throw new x$9(`Cannot create new entities on run in terminal state "${f.status}"`); if (a.eventType === `attr_set`) throw new x$9(`Cannot set attributes on run in terminal state "${f.status}"`); } let h = null; if ([ `step_started`, `step_completed`, `step_failed`, `step_retrying` ].includes(a.eventType) && a.correlationId) { if (h = await ci$3(e, `steps`, `${s}-${a.correlationId}`, Ch$1, t), !h && !m) throw new s$8(`Step "${a.correlationId}" not found`); if (m && h) throw new x$9(`Step "${a.correlationId}" already created`); if (h) { if (u(h.status)) throw new x$9(`Cannot modify step in terminal state "${h.status}"`); if (f && l(f.status) && h.status !== `running`) throw new S$10(`Cannot modify non-running step on run in terminal state "${f.status}"`); } } if ([`hook_disposed`, `hook_received`].includes(a.eventType) && a.correlationId && !await ci$3(e, `hooks`, a.correlationId, eh$1, t)) throw new b$9(a.correlationId); let g = { ...a, runId: s, eventId: n, createdAt: r, specVersion: c }; if (a.eventType === `run_started` && `eventData` in g && delete g.eventData, m && `eventData` in g && g.eventData) { let { input: e, ...t } = g.eventData; g.eventData = t; } let _, y, x, S, w = !1, E; if (a.eventType === `run_created` && `eventData` in a) { let n = a.eventData; if (Am$1(Object.entries(n.attributes ?? {}).map(([e, t]) => ({ key: e, value: t })), { allowReservedAttributes: n.allowReservedAttributes === !0 }), _ = { runId: s, deploymentId: n.deploymentId, status: `pending`, workflowName: n.workflowName, specVersion: c, executionContext: n.executionContext, input: n.input, output: void 0, error: void 0, startedAt: void 0, completedAt: void 0, attributes: n.attributes ?? {}, createdAt: r, updatedAt: r }, !await bi$3(si$3(e, `runs`, s, t), JSON.stringify(_, fi$3, 2))) throw new x$9(`Workflow run "${s}" already exists`); } else if (a.eventType === `run_started`) { if (f) { if (f.status === `running`) return { run: f }; _ = await Ks$1(e, s, t, { runId: f.runId, deploymentId: f.deploymentId, workflowName: f.workflowName, specVersion: f.specVersion, executionContext: f.executionContext, input: f.input, createdAt: f.createdAt, expiredAt: f.expiredAt, status: `running`, output: void 0, error: void 0, completedAt: void 0, startedAt: f.startedAt ?? r, updatedAt: r, attributes: f.attributes }); } } else if (a.eventType === `run_completed` && `eventData` in a) { let n = a.eventData; f && (_ = await Ks$1(e, s, t, { runId: f.runId, deploymentId: f.deploymentId, workflowName: f.workflowName, specVersion: f.specVersion, executionContext: f.executionContext, input: f.input, createdAt: f.createdAt, expiredAt: f.expiredAt, startedAt: f.startedAt, status: `completed`, output: n.output, error: void 0, completedAt: r, updatedAt: r, attributes: f.attributes }), await Promise.all([Ms$1(e, s), Gs$1(e, s)])); } else if (a.eventType === `run_failed` && `eventData` in a) { let n = a.eventData; f && (_ = await Ks$1(e, s, t, { runId: f.runId, deploymentId: f.deploymentId, workflowName: f.workflowName, specVersion: f.specVersion, executionContext: f.executionContext, input: f.input, createdAt: f.createdAt, expiredAt: f.expiredAt, startedAt: f.startedAt, status: `failed`, output: void 0, error: n.error, errorCode: n.errorCode, completedAt: r, updatedAt: r, attributes: f.attributes }), await Promise.all([Ms$1(e, s), Gs$1(e, s)])); } else if (a.eventType === `run_cancelled`) f && (_ = await Ks$1(e, s, t, { runId: f.runId, deploymentId: f.deploymentId, workflowName: f.workflowName, specVersion: f.specVersion, executionContext: f.executionContext, input: f.input, createdAt: f.createdAt, expiredAt: f.expiredAt, startedAt: f.startedAt, status: `cancelled`, output: void 0, error: void 0, completedAt: r, updatedAt: r, attributes: f.attributes }), await Promise.all([Ms$1(e, s), Gs$1(e, s)])); else if (a.eventType === `attr_set` && f) _ = await Fs$1(s, async () => { let n = await gi$3(si$3(e, `runs`, s, t), _h$1); if (!n) throw new v$8(s); if (Am$1(a.eventData.changes, { existingKeys: Object.keys(n.attributes), allowReservedAttributes: a.eventData.allowReservedAttributes === !0 }), a.correlationId && a.eventData.writer.type === `workflow` && !await bi$3($r$3(e, `.locks`, `attributes`, t ? `${s}-${a.correlationId}.created.${t}` : `${s}-${a.correlationId}.created`), ``)) throw new x$9(`Attribute event "${a.correlationId}" already exists`); let i = { ...n, attributes: jm$1(n.attributes, a.eventData.changes), updatedAt: r }; return await mi$3(si$3(e, `runs`, s, t), i, { overwrite: !0 }), i; }); else if (a.eventType === `step_created` && `eventData` in a) { if (!await bi$3($r$3(e, `.locks`, `steps`, t ? `${s}-${a.correlationId}.created.${t}` : `${s}-${a.correlationId}.created`), ``)) throw new x$9(`Step "${a.correlationId}" already created`); let n = a.eventData; y = { runId: s, stepId: a.correlationId, stepName: n.stepName, status: `pending`, input: n.input, output: void 0, error: void 0, attempt: 0, startedAt: void 0, completedAt: void 0, createdAt: r, updatedAt: r, specVersion: c }, await mi$3(si$3(e, `steps`, `${s}-${a.correlationId}`, t), y); } else if (a.eventType === `step_started`) { if (!h && m) { let n = a.eventData; if (await bi$3($r$3(e, `.locks`, `steps`, t ? `${s}-${a.correlationId}.created.${t}` : `${s}-${a.correlationId}.created`), ``)) { let i = { runId: s, stepId: a.correlationId, stepName: n.stepName, status: `pending`, input: n.input, output: void 0, error: void 0, attempt: 0, startedAt: void 0, completedAt: void 0, createdAt: r, updatedAt: r, specVersion: c }; await mi$3(si$3(e, `steps`, `${s}-${a.correlationId}`, t), i); let o = `evnt_${Es$1()}`, l = { eventType: `step_created`, runId: s, eventId: o, createdAt: r, specVersion: c, correlationId: a.correlationId, eventData: { stepName: n.stepName, input: n.input } }; await mi$3(si$3(e, `events`, `${s}-${o}`, t), l), h = i, w = !0; } else throw new x$9(`Step "${a.correlationId}" already created`); } if (h) { if (h.retryAfter && h.retryAfter.getTime() > Date.now()) throw new C$11(`Cannot start step "${a.correlationId}": retryAfter timestamp has not been reached yet`, { retryAfter: Math.ceil((h.retryAfter.getTime() - Date.now()) / 1e3) }); let n = `${s}-${a.correlationId}`, i = await ci$3(e, `steps`, n, Ch$1, t); if (i && u(i.status)) throw new x$9(`Cannot modify step in terminal state "${i.status}"`); y = { ...h, status: `running`, startedAt: h.startedAt ?? r, attempt: h.attempt + 1, retryAfter: void 0, updatedAt: r }, await mi$3(si$3(e, `steps`, n, t), y, { overwrite: !0 }); } } else if (a.eventType === `step_completed` && `eventData` in a) { let n = a.eventData; if (h) { let i = `${s}-${a.correlationId}`; if (!await bi$3($r$3(e, `.locks`, `steps`, t ? `${i}.terminal.${t}` : `${i}.terminal`), ``)) throw new x$9(`Cannot modify step in terminal state`); y = { ...h, status: `completed`, output: n.result, completedAt: r, updatedAt: r }, await mi$3(si$3(e, `steps`, i, t), y, { overwrite: !0 }); } } else if (a.eventType === `step_failed` && `eventData` in a) { let n = a.eventData; if (h) { let i = `${s}-${a.correlationId}`; if (!await bi$3($r$3(e, `.locks`, `steps`, t ? `${i}.terminal.${t}` : `${i}.terminal`), ``)) throw new x$9(`Cannot modify step in terminal state`); y = { ...h, status: `failed`, error: n.error, completedAt: r, updatedAt: r }, await mi$3(si$3(e, `steps`, i, t), y, { overwrite: !0 }); } } else if (a.eventType === `step_retrying` && `eventData` in a) { let n = a.eventData; if (h) { let i = `${s}-${a.correlationId}`; y = { ...h, status: `pending`, error: n.error, retryAfter: n.retryAfter, updatedAt: r }, await mi$3(si$3(e, `steps`, i, t), y, { overwrite: !0 }); } } else if (a.eventType === `hook_created` && `eventData` in a) { let i = a.eventData, l = G.join(e, `hooks`, `tokens`, `${ws$1(i.token)}.json`), u = await bi$3(l, JSON.stringify({ token: i.token, hookId: a.correlationId, runId: s, eventId: n })), d = !1; if (!u) { let u = await zs$1(l); if (u?.runId === s && u.hookId === a.correlationId) { let o; if (u.eventId) o = u.eventId; else { let r = await Vs$1(e, s, a.correlationId); if (r !== null) throw await Hs$1(e, s, a.correlationId, r, t), new x$9(`Hook "${a.correlationId}" already created`); let c = await Us$1(e, i.token, s, a.correlationId, n); if (c === null) throw new x$9(`Hook "${a.correlationId}" already created`); o = c; } n = o; let l = Bh$1(n.replace(/^evnt_/, ``)) ?? r; g = { ...a, runId: s, eventId: n, createdAt: l, specVersion: c }, d = !0; } else { let l = { eventType: `hook_conflict`, correlationId: a.correlationId, eventData: { token: i.token, ...u ? { conflictingRunId: u.runId } : {} }, runId: s, eventId: n, createdAt: r, specVersion: c }; return await mi$3(si$3(e, `events`, `${s}-${n}`, t), l), { event: Nm$1(l, o?.resolveData ?? `all`), run: _, step: y, hook: void 0 }; } } x = { runId: s, hookId: a.correlationId, token: i.token, metadata: i.metadata, ownerId: `local-owner`, projectId: `local-project`, environment: `local`, createdAt: g.createdAt, specVersion: c, isWebhook: i.isWebhook ?? !1, isSystem: i.isSystem ?? !1 }, E = d ? { overwrite: !0 } : void 0; } else if (a.eventType === `hook_disposed`) { if (!await bi$3($r$3(e, `.locks`, `hooks`, t ? `${a.correlationId}.disposed.${t}` : `${a.correlationId}.disposed`), ``)) throw new x$9(`Hook "${a.correlationId}" already disposed`); let n = si$3(e, `hooks`, a.correlationId, t), r = await ci$3(e, `hooks`, a.correlationId, eh$1, t); r && (await yi$3(G.join(e, `hooks`, `tokens`, `${ws$1(r.token)}.json`)), await yi$3(Ts$1(e, r.token, r.runId, r.hookId))), await yi$3(n); } else if (a.eventType === `wait_created` && `eventData` in a) { let n = `${s}-${a.correlationId}`; if (!await bi$3($r$3(e, `.locks`, `waits`, t ? `${n}.created.${t}` : `${n}.created`), ``)) throw new x$9(`Wait "${a.correlationId}" already exists`); let i = a.eventData; S = { waitId: n, runId: s, status: `waiting`, resumeAt: i.resumeAt, completedAt: void 0, createdAt: r, updatedAt: r, specVersion: c }, await mi$3(si$3(e, `waits`, n, t), S); } else if (a.eventType === `wait_completed`) { let n = `${s}-${a.correlationId}`, i = $r$3(e, `.locks`, `waits`, t ? `${n}.completed.${t}` : `${n}.completed`); if (!await bi$3(i, ``)) throw new x$9(`Wait "${a.correlationId}" already completed`); let o = await ci$3(e, `waits`, n, Uh$1, t); if (!o) throw await Xn.unlink(i).catch(() => {}), new s$8(`Wait "${a.correlationId}" not found`); S = { ...o, status: `completed`, completedAt: r, updatedAt: r }, await mi$3(si$3(e, `waits`, n, t), S, { overwrite: !0 }); } if (!await bi$3(si$3(e, `events`, `${s}-${n}`, t), JSON.stringify(g, fi$3, 2))) throw a.eventType === `hook_created` && a.correlationId && await Hs$1(e, s, a.correlationId, n, t), new x$9(`Event "${n}" already exists for run "${s}"`); x && a.eventType === `hook_created` && await mi$3(si$3(e, `hooks`, x.hookId, t), x, E); let D = o?.resolveData ?? `all`, k = Nm$1(g, D), A, j, M; if (a.eventType === `run_started` && _) { let t = await Ti$3({ directory: G.join(e, `events`), schema: $m$1, filePrefix: `${s}-`, sortOrder: `asc`, limit: 1e3, getCreatedAt: Ds$1(`evnt`), getId: (e) => e.eventId }); A = t.data, j = t.cursor, M = t.hasMore; } if ((a.eventType === `step_completed` || a.eventType === `step_failed`) && typeof o?.sinceCursor == `string`) { let t = await Ti$3({ directory: G.join(e, `events`), schema: $m$1, filePrefix: `${s}-`, sortOrder: `asc`, cursor: o.sinceCursor, getCreatedAt: Ds$1(`evnt`), getId: (e) => e.eventId }); A = D === `none` ? t.data.map((e) => Nm$1(e, D)) : t.data, j = t.cursor, M = t.hasMore; } return { event: k, run: _, step: y, hook: x, wait: S, events: A, cursor: j, hasMore: M, ...w ? { stepCreated: !0 } : {} }; } }, async get(n, r, i) { Qr$3(`runId`, n), Qr$3(`eventId`, r); let a = await ci$3(e, `events`, `${n}-${r}`, $m$1, t); if (!a) throw Error(`Event ${r} in run ${n} not found`); return Nm$1(a, i?.resolveData ?? `all`); }, async list(t) { let { runId: n } = t; Qr$3(`runId`, n); let r = t.resolveData ?? `all`, i = await Ti$3({ directory: G.join(e, `events`), schema: $m$1, filePrefix: `${n}-`, sortOrder: t.pagination?.sortOrder ?? `asc`, limit: t.pagination?.limit, cursor: t.pagination?.cursor, getCreatedAt: Ds$1(`evnt`), getId: (e) => e.eventId }); return r === `none` ? { ...i, data: i.data.map((e) => Nm$1(e, r)) } : i; }, async listByCorrelationId(t) { let n = t.correlationId; Qr$3(`correlationId`, n); let r = t.resolveData ?? `all`, i = await Ti$3({ directory: G.join(e, `events`), schema: $m$1, filter: (e) => e.correlationId === n, sortOrder: t.pagination?.sortOrder ?? `asc`, limit: t.pagination?.limit, cursor: t.pagination?.cursor, getCreatedAt: Ds$1(`evnt`), getId: (e) => e.eventId }); return r === `none` ? { ...i, data: i.data.map((e) => Nm$1(e, r)) } : i; } }; } function Js$1(e, t) { return { get: (async (n, r, i) => { Qr$3(`runId`, n), Qr$3(`stepId`, r); let a = await ci$3(e, `steps`, `${n}-${r}`, Ch$1, t); if (!a) throw Error(`Step ${r} in run ${n} not found`); return ks$1(a, i?.resolveData ?? `all`); }), list: (async (t) => { Qr$3(`runId`, t.runId); let n = t.resolveData ?? `all`, r = await Ti$3({ directory: G.join(e, `steps`), schema: Ch$1, filePrefix: `${t.runId}-`, sortOrder: t.pagination?.sortOrder ?? `desc`, limit: t.pagination?.limit, cursor: t.pagination?.cursor, getCreatedAt: Ds$1(`step`), getId: (e) => e.stepId }); return n === `none` ? { ...r, data: r.data.map((e) => ({ ...e, input: void 0, output: void 0 })) } : r; }) }; } function Ys$1(e, t) { let n = Is$1(e, t), r = Js$1(e, t), i = qs$1(e, t), a = js$1(e, t); return { runs: la$3(`world.runs`, n), steps: la$3(`world.steps`, r), events: la$3(`world.events`, i), hooks: la$3(`world.hooks`, a) }; } const Xs$1 = Ih$1(() => Math.random()); const Zs$1 = V$8({ streams: Uf$1(R$8()) }); function Qs$1(e) { return e === 1; } function $s$1(e) { let t = Buffer.from([+!!e.eof]); return Buffer.concat([t, e.chunk]); } function ec$1(e) { return Qs$1(e[0]); } function tc$1(e) { return { eof: ec$1(e), chunk: Buffer.from(e.subarray(1)) }; } async function nc$1(e) { try { return await Xn.readdir(e); } catch (e) { if (e.code === `ENOENT`) return []; throw e; } } function rc$1(e, t, n, r = n, i = () => !0) { for (let a of t) { if (!a.endsWith(n)) continue; let t = a.slice(0, -n.length); i(t) && e.set(t, r); } } async function ic$1(e, t, n) { Qr$3(`streamName`, t); let r = await nc$1(e), i = /* @__PURE__ */ new Map(); return rc$1(i, r, `.json`), rc$1(i, r, `.bin`, `.bin`, n ? (e) => !e.endsWith(`.${n}`) : void 0), n && rc$1(i, r, `.${n}.bin`), { files: [...i.keys()].filter((e) => e.startsWith(`${t}-`)).sort(), extMap: i }; } function ac$1(e, t) { let n = t ? `.${t}` : ``, r = new EventEmitter(), i = /* @__PURE__ */ new Set(); async function a(n, r) { Qr$3(`runId`, n), Qr$3(`streamName`, r); let a = `${n}:${r}`; if (i.has(a)) return; let o = si$3(e, `streams/runs`, n, t), s = (await ci$3(e, `streams/runs`, n, Zs$1, t))?.streams ?? []; s.includes(r) || (s.push(r), await mi$3(o, { streams: s }, { overwrite: !0 })), i.add(a); } function o(e) { return typeof e == `string` ? Buffer.from(new TextEncoder().encode(e)) : e instanceof Buffer ? e : Buffer.from(e); } return { streams: { async write(t, i, s) { let c = `chnk_${Xs$1()}`; await a(await t, i); let l = o(s), u = $s$1({ chunk: l, eof: !1 }); await hi$3(G.join(e, `streams`, `chunks`, `${i}-${c}${n}.bin`), u); let d = Uint8Array.from(l); r.emit(`chunk:${i}`, { streamName: i, chunkData: d, chunkId: c }); }, async writeMulti(t, i, s) { if (s.length === 0) return; let c = s.map(() => `chnk_${Xs$1()}`); await a(await t, i); let l = s.map((e) => o(e)).map(async (t, r) => { let a = c[r], o = $s$1({ chunk: t, eof: !1 }); return await hi$3(G.join(e, `streams`, `chunks`, `${i}-${a}${n}.bin`), o), { chunkId: a, chunkData: Uint8Array.from(t) }; }); for (let e of l) { let { chunkId: t, chunkData: n } = await e; r.emit(`chunk:${i}`, { streamName: i, chunkData: n, chunkId: t }); } }, async close(t, i) { let o = `chnk_${Xs$1()}`; await a(await t, i), await hi$3(G.join(e, `streams`, `chunks`, `${i}-${o}${n}.bin`), $s$1({ chunk: Buffer.from([]), eof: !0 })), r.emit(`close:${i}`, { streamName: i }); }, async list(n) { return Qr$3(`runId`, n), (await ci$3(e, `streams/runs`, n, Zs$1, t))?.streams ?? []; }, async getChunks(n, r, i) { let a = i?.limit ?? 100, o = G.join(e, `streams`, `chunks`), { files: s, extMap: c } = await ic$1(o, r, t), l = 0; if (i?.cursor) try { l = JSON.parse(Buffer.from(i.cursor, `base64`).toString(`utf-8`)).i; } catch { l = 0; } let u = !1, d = [], f = 0; for (let e of s) { let t = c.get(e) ?? `.bin`, n = G.join(o, `${e}${t}`); if (f < l) { if (Qs$1(await vi$3(n))) { u = !0; break; } f++; continue; } if (d.length >= a) { Qs$1(await vi$3(n)) ? u = !0 : f++; break; } let r = tc$1(await _i$3(n)); if (r.eof) { u = !0; break; } d.push({ index: f, data: Uint8Array.from(r.chunk) }), f++; } let p = !u && f > l + d.length, m = l + d.length; return { data: d, cursor: p ? Buffer.from(JSON.stringify({ i: m })).toString(`base64`) : null, hasMore: p, done: u }; }, async getInfo(n, r) { let i = G.join(e, `streams`, `chunks`), { files: a, extMap: o } = await ic$1(i, r, t), s = !1, c = 0; for (let e of a) { let t = o.get(e) ?? `.bin`; if (Qs$1(await vi$3(G.join(i, `${e}${t}`)))) { s = !0; break; } c++; } return { tailIndex: c - 1, done: s }; }, async get(n, i, a = 0) { let o = G.join(e, `streams`, `chunks`), s = () => {}, c = null; return new ReadableStream({ async start(e) { let n = /* @__PURE__ */ new Set(), l = [], u = !0, d = !1, f = !1, p = (t) => { if (t.chunkData.byteLength === 0) { n.add(t.chunkId); return; } u ? (n.add(t.chunkId), l.push({ chunkId: t.chunkId, chunkData: Uint8Array.from(t.chunkData) })) : n.has(t.chunkId) || (n.add(t.chunkId), e.enqueue(Uint8Array.from(t.chunkData))); }, m = () => { if (u) { d = !0; return; } f = !0, r.off(`chunk:${i}`, p), r.off(`close:${i}`, m), c &&= (clearInterval(c), null); try { e.close(); } catch {} }; s = m, r.on(`chunk:${i}`, p), r.on(`close:${i}`, m); let { files: h, extMap: g } = await ic$1(o, i, t), _ = h.length; if (typeof a == `number` && a < 0 && h.length > 0) { let e = h[h.length - 1], t = g.get(e) ?? `.bin`; Qs$1(await vi$3(G.join(o, `${e}${t}`))) && _--; } let v = typeof a == `number` && a < 0 ? Math.max(0, _ + a) : a, y = !1; for (let r = v; r < h.length; r++) { let a = h[r], s = a.substring(i.length + 1), c = t ? s.replace(`.${t}`, ``) : s; if (n.has(c)) continue; let l = g.get(a) ?? `.bin`, u = tc$1(await _i$3(G.join(o, `${a}${l}`))); if (u?.eof === !0) { y = !0; break; } n.add(c), u.chunk.byteLength && e.enqueue(Uint8Array.from(u.chunk)); } u = !1, l.sort((e, t) => e.chunkId.localeCompare(t.chunkId)); for (let t of l) e.enqueue(Uint8Array.from(t.chunkData)); if (y) { s(); try { e.close(); } catch {} return; } if (d) { r.off(`chunk:${i}`, p), r.off(`close:${i}`, m); try { e.close(); } catch {} return; } for (let e = 0; e < v && e < h.length; e++) { let r = h[e].substring(i.length + 1), a = t ? r.replace(`.${t}`, ``) : r; n.add(a); } let b = !1; c = setInterval(async () => { if (!b) { b = !0; try { let { files: a, extMap: s } = await ic$1(o, i, t); for (let l of a) { let a = l.substring(i.length + 1), u = t ? a.replace(`.${t}`, ``) : a; if (n.has(u)) continue; n.add(u); let d = s.get(l) ?? `.bin`, h = tc$1(await _i$3(G.join(o, `${l}${d}`))); if (h?.eof === !0) { f = !0, c &&= (clearInterval(c), null), r.off(`chunk:${i}`, p), r.off(`close:${i}`, m); try { e.close(); } catch {} return; } if (f) return; h.chunk.byteLength && e.enqueue(Uint8Array.from(h.chunk)); } } catch (e) { e instanceof Error && `code` in e || console.error(`[world-local] Unexpected polling error:`, e); } finally { b = !1; } } }, 100); }, cancel() { s(), c &&= (clearInterval(c), null); } }); } } }; } function oc$1(e) { let t = e ? Object.fromEntries(Object.entries(e).filter(([, e]) => e !== void 0)) : {}, n = { ...qr$3.value, ...t }, r = n.tag, i = Cs$1(n), a = Ys$1(n.dataDir, r), o = n.recoverActiveRuns ?? !0; return { specVersion: 5, ...i, ...a, ...la$3(`world.streams`, { ...ac$1(n.dataDir, r), ...n.streamFlushIntervalMs !== void 0 && { streamFlushIntervalMs: n.streamFlushIntervalMs } }), async start() { await Vi$3(n.dataDir), o && await mh$1(r ? { ...a.runs, list: ((e) => a.runs.list({ ...e, fileIdFilter: (e) => oi$3(e, r) })) } : a.runs, i.queue, `world-local`); }, async close() { await i.close(); }, async clear() { if (r) { let e = n.dataDir, t = G.join(e, `hooks`), i = await li$3(t, r), { HookSchema: a } = await Promise.resolve().then(() => attribute_changes_DUxG_Gic_exports).then((e) => e.Sn); await Promise.all(i.map(async (n) => { let r = await gi$3(G.join(t, n), a); r?.token && (await yi$3(G.join(t, `tokens`, `${ws$1(r.token)}.json`)), await yi$3(Ts$1(e, r.token, r.runId, r.hookId))); })), await Promise.all([ `runs`, `steps`, `events`, `hooks`, `waits`, `streams/runs` ].map(async (t) => { let n = G.join(e, t), i = await li$3(n, r); await Promise.all(i.map((e) => yi$3(G.join(n, e)))); })), await promises.rm(G.join(e, `.locks`), { recursive: !0, force: !0 }).catch(() => {}); let o = G.join(e, `streams`, `chunks`), s = await ui$3(o, r, `.bin`); await Promise.all(s.map((e) => promises.unlink(G.join(o, e)).catch(() => {}))), ri$3(); } else await rm(n.dataDir, { recursive: !0, force: !0 }), await Vi$3(n.dataDir); } }; } var sc$1 = c$12(((e, t) => { var n = Object.defineProperty, r = Object.getOwnPropertyDescriptor, i = Object.getOwnPropertyNames, a = Object.prototype.hasOwnProperty, o = (e, t) => { for (var r in t) n(e, r, { get: t[r], enumerable: !0 }); }, s = (e, t, o, s) => { if (t && typeof t == `object` || typeof t == `function`) for (let c of i(t)) !a.call(e, c) && c !== o && n(e, c, { get: () => t[c], enumerable: !(s = r(t, c)) || s.enumerable }); return e; }, c = (e) => s(n({}, `__esModule`, { value: !0 }), e), l = {}; o(l, { SYMBOL_FOR_REQ_CONTEXT: () => u, getContext: () => d }), t.exports = c(l); let u = Symbol.for(`@vercel/request-context`); function d() { return globalThis[u]?.get?.() ?? {}; } })); var cc$1 = c$12(((e, t) => { var n = Object.defineProperty, r = Object.getOwnPropertyDescriptor, i = Object.getOwnPropertyNames, a = Object.prototype.hasOwnProperty, o = (e, t) => { for (var r in t) n(e, r, { get: t[r], enumerable: !0 }); }, s = (e, t, o, s) => { if (t && typeof t == `object` || typeof t == `function`) for (let c of i(t)) !a.call(e, c) && c !== o && n(e, c, { get: () => t[c], enumerable: !(s = r(t, c)) || s.enumerable }); return e; }, c = (e) => s(n({}, `__esModule`, { value: !0 }), e), l = {}; o(l, { VercelOidcTokenError: () => u }), t.exports = c(l); var u = class extends Error { constructor(e, t) { super(e), this.name = `VercelOidcTokenError`, this.cause = t; } toString() { return this.cause ? `${this.name}: ${this.message}: ${this.cause}` : `${this.name}: ${this.message}`; } }; })); var lc$1 = c$12(((t, n) => { var r = Object.defineProperty, i = Object.getOwnPropertyDescriptor, a = Object.getOwnPropertyNames, o = Object.prototype.hasOwnProperty, s = (e, t) => { for (var n in t) r(e, n, { get: t[n], enumerable: !0 }); }, c = (e, t, n, s) => { if (t && typeof t == `object` || typeof t == `function`) for (let c of a(t)) !o.call(e, c) && c !== n && r(e, c, { get: () => t[c], enumerable: !(s = i(t, c)) || s.enumerable }); return e; }, l = (e) => c(r({}, `__esModule`, { value: !0 }), e), u = {}; s(u, { getVercelOidcToken: () => p, getVercelOidcTokenSync: () => m }), n.exports = l(u); var d = sc$1(), f = cc$1(); async function p(t) { let n = ``, r; try { n = m(); } catch (e) { r = e; } try { let [{ getTokenPayload: r, isExpired: i }, { refreshToken: a }] = await Promise.all([await Promise.resolve().then(() => d$13(mc$1())), await Promise.resolve().then(() => token_J7YP0s9a_exports).then((t) => d$13(t.default))]); (!n || i(r(n), t?.expirationBufferMs)) && (await a(t), n = m()); } catch (e) { let t = r instanceof Error ? r.message : ``; throw e instanceof Error && (t = `${t} ${e.message}`), t ? new f.VercelOidcTokenError(t) : e; } return n; } function m() { let e = (0, d.getContext)().headers?.[`x-vercel-oidc-token`] ?? process.env.VERCEL_OIDC_TOKEN; if (!e) throw Error(`The 'x-vercel-oidc-token' header is missing from the request. Do you have the OIDC option enabled in the Vercel project settings?`); return e; } })); var uc$1 = c$12(((e, t) => { var n = Object.defineProperty, r = Object.getOwnPropertyDescriptor, i = Object.getOwnPropertyNames, a = Object.prototype.hasOwnProperty, o = (e, t) => { for (var r in t) n(e, r, { get: t[r], enumerable: !0 }); }, s = (e, t, o, s) => { if (t && typeof t == `object` || typeof t == `function`) for (let c of i(t)) !a.call(e, c) && c !== o && n(e, c, { get: () => t[c], enumerable: !(s = r(t, c)) || s.enumerable }); return e; }, c = (e) => s(n({}, `__esModule`, { value: !0 }), e), l = {}; o(l, { AccessTokenMissingError: () => u, RefreshAccessTokenFailedError: () => d }), t.exports = c(l); var u = class extends Error { constructor() { super(`No authentication found. Please log in with the Vercel CLI (vercel login).`), this.name = `AccessTokenMissingError`; } }, d = class extends Error { constructor(e) { super(`Failed to refresh authentication token.`, { cause: e }), this.name = `RefreshAccessTokenFailedError`; } }; })); var dc$1 = c$12(((e, n) => { var r = Object.create, i = Object.defineProperty, a = Object.getOwnPropertyDescriptor, o = Object.getOwnPropertyNames, s = Object.getPrototypeOf, c = Object.prototype.hasOwnProperty, l = (e, t) => { for (var n in t) i(e, n, { get: t[n], enumerable: !0 }); }, u = (e, t, n, r) => { if (t && typeof t == `object` || typeof t == `function`) for (let s of o(t)) !c.call(e, s) && s !== n && i(e, s, { get: () => t[s], enumerable: !(r = a(t, s)) || r.enumerable }); return e; }, d = (e, t, n) => (n = e == null ? {} : r(s(e)), u(t || !e || !e.__esModule ? i(n, `default`, { value: e, enumerable: !0 }) : n, e)), f = (e) => u(i({}, `__esModule`, { value: !0 }), e), p = {}; l(p, { findRootDir: () => v, getUserDataDir: () => y }), n.exports = f(p); var m = d(f$11(`path`)), h = d(f$11(`fs`)), g = d(f$11(`os`)), _ = cc$1(); function v() { try { let e = process.cwd(); for (; e !== m.default.dirname(e);) { let t = m.default.join(e, `.vercel`); if (h.default.existsSync(t)) return e; e = m.default.dirname(e); } } catch { throw new _.VercelOidcTokenError(`Token refresh only supported in node server environments`); } return null; } function y() { if (process.env.XDG_DATA_HOME) return process.env.XDG_DATA_HOME; switch (g.default.platform()) { case `darwin`: return m.default.join(g.default.homedir(), `Library/Application Support`); case `linux`: return m.default.join(g.default.homedir(), `.local/share`); case `win32`: return process.env.LOCALAPPDATA ? process.env.LOCALAPPDATA : null; default: return null; } } })); var fc$1 = c$12(((e, n) => { var r = Object.create, i = Object.defineProperty, a = Object.getOwnPropertyDescriptor, o = Object.getOwnPropertyNames, s = Object.getPrototypeOf, c = Object.prototype.hasOwnProperty, l = (e, t) => { for (var n in t) i(e, n, { get: t[n], enumerable: !0 }); }, u = (e, t, n, r) => { if (t && typeof t == `object` || typeof t == `function`) for (let s of o(t)) !c.call(e, s) && s !== n && i(e, s, { get: () => t[s], enumerable: !(r = a(t, s)) || r.enumerable }); return e; }, d = (e, t, n) => (n = e == null ? {} : r(s(e)), u(t || !e || !e.__esModule ? i(n, `default`, { value: e, enumerable: !0 }) : n, e)), f = (e) => u(i({}, `__esModule`, { value: !0 }), e), p = {}; l(p, { isValidAccessToken: () => b, readAuthConfig: () => v, writeAuthConfig: () => y }), n.exports = f(p); var m = d(f$11(`fs`)), h = d(f$11(`path`)), g = mc$1(); function _() { let e = (0, g.getVercelDataDir)(); if (!e) throw Error(`Unable to find Vercel CLI data directory. Your platform: ${process.platform}. Supported: darwin, linux, win32.`); return h.join(e, `auth.json`); } function v() { try { let e = _(); if (!m.existsSync(e)) return null; let t = m.readFileSync(e, `utf8`); return t ? JSON.parse(t) : null; } catch { return null; } } function y(e) { let t = _(), n = h.dirname(t); m.existsSync(n) || m.mkdirSync(n, { mode: 504, recursive: !0 }), m.writeFileSync(t, JSON.stringify(e, null, 2), { mode: 384 }); } function b(e, t = 0) { if (!e.token) return !1; if (typeof e.expiresAt != `number`) return !0; let n = Math.floor(Date.now() / 1e3), r = t / 1e3; return e.expiresAt >= n + r; } })); var pc$1 = c$12(((e, n) => { var r = Object.defineProperty, i = Object.getOwnPropertyDescriptor, a = Object.getOwnPropertyNames, o = Object.prototype.hasOwnProperty, s = (e, t) => { for (var n in t) r(e, n, { get: t[n], enumerable: !0 }); }, c = (e, t, n, s) => { if (t && typeof t == `object` || typeof t == `function`) for (let c of a(t)) !o.call(e, c) && c !== n && r(e, c, { get: () => t[c], enumerable: !(s = i(t, c)) || s.enumerable }); return e; }, l = (e) => c(r({}, `__esModule`, { value: !0 }), e), u = {}; s(u, { processTokenResponse: () => g, refreshTokenRequest: () => h }), n.exports = l(u); var d = f$11(`os`); let f = `@vercel/oidc node-${process.version} ${(0, d.platform)()} (${(0, d.arch)()}) ${(0, d.hostname)()}`, p = null; async function m() { if (p) return p; let e = await fetch(`https://vercel.com/.well-known/openid-configuration`, { headers: { "user-agent": f } }); if (!e.ok) throw Error(`Failed to discover OAuth endpoints`); let t = await e.json(); if (!t || typeof t.token_endpoint != `string`) throw Error(`Invalid OAuth discovery response`); let n = t.token_endpoint; return p = n, n; } async function h(e) { let t = await m(); return await fetch(t, { method: `POST`, headers: { "Content-Type": `application/x-www-form-urlencoded`, "user-agent": f }, body: new URLSearchParams({ client_id: `cl_HYyOPBNtFMfHhaUn9L4QPfTZz6TP47bp`, grant_type: `refresh_token`, ...e }) }); } async function g(e) { let t = await e.json(); if (!e.ok) { let e = typeof t == `object` && t && `error` in t ? String(t.error) : `Token refresh failed`; return [Error(e)]; } return typeof t != `object` || !t ? [Error(`Invalid token response`)] : typeof t.access_token == `string` ? t.token_type === `Bearer` ? typeof t.expires_in == `number` ? [null, t] : [Error(`Missing expires_in in response`)] : [Error(`Invalid token_type in response`)] : [Error(`Missing access_token in response`)]; } })); var mc$1 = c$12(((e, n) => { var r = Object.create, i = Object.defineProperty, a = Object.getOwnPropertyDescriptor, o = Object.getOwnPropertyNames, s = Object.getPrototypeOf, c = Object.prototype.hasOwnProperty, l = (e, t) => { for (var n in t) i(e, n, { get: t[n], enumerable: !0 }); }, u = (e, t, n, r) => { if (t && typeof t == `object` || typeof t == `function`) for (let s of o(t)) !c.call(e, s) && s !== n && i(e, s, { get: () => t[s], enumerable: !(r = a(t, s)) || r.enumerable }); return e; }, d = (e, t, n) => (n = e == null ? {} : r(s(e)), u(t || !e || !e.__esModule ? i(n, `default`, { value: e, enumerable: !0 }) : n, e)), f = (e) => u(i({}, `__esModule`, { value: !0 }), e), p = {}; l(p, { assertVercelOidcTokenResponse: () => w, findProjectInfo: () => T, getTokenPayload: () => O, getVercelDataDir: () => x, getVercelOidcToken: () => C, getVercelToken: () => S, isExpired: () => k, loadToken: () => D, saveToken: () => E }), n.exports = f(p); var m = d(f$11(`path`)), h = d(f$11(`fs`)), g = cc$1(), _ = dc$1(), v = fc$1(), y = pc$1(), b = uc$1(); function x() { let e = (0, _.getUserDataDir)(); return e ? m.join(e, `com.vercel.cli`) : null; } async function S(e) { let t = (0, v.readAuthConfig)(); if (!t?.token) throw new b.AccessTokenMissingError(); if ((0, v.isValidAccessToken)(t, e?.expirationBufferMs)) return t.token; if (!t.refreshToken) throw (0, v.writeAuthConfig)({}), new b.RefreshAccessTokenFailedError(`No refresh token available`); try { let e = await (0, y.refreshTokenRequest)({ refresh_token: t.refreshToken }), [n, r] = await (0, y.processTokenResponse)(e); if (n || !r) throw (0, v.writeAuthConfig)({}), new b.RefreshAccessTokenFailedError(n); let i = { token: r.access_token, expiresAt: Math.floor(Date.now() / 1e3) + r.expires_in }; return r.refresh_token && (i.refreshToken = r.refresh_token), (0, v.writeAuthConfig)(i), i.token; } catch (e) { throw (0, v.writeAuthConfig)({}), e instanceof b.AccessTokenMissingError || e instanceof b.RefreshAccessTokenFailedError ? e : new b.RefreshAccessTokenFailedError(e); } } async function C(e, t, n) { let r = `https://api.vercel.com/v1/projects/${t}/token?source=vercel-oidc-refresh${n ? `&teamId=${n}` : ``}`, i = await fetch(r, { method: `POST`, headers: { Authorization: `Bearer ${e}` } }); if (!i.ok) throw new g.VercelOidcTokenError(`Failed to refresh OIDC token: ${i.statusText}`); let a = await i.json(); return w(a), a; } function w(e) { if (!e || typeof e != `object`) throw TypeError("Vercel OIDC token is malformed. Expected an object. Please run `vc env pull` and try again"); if (!(`token` in e) || typeof e.token != `string`) throw TypeError("Vercel OIDC token is malformed. Expected a string-valued token property. Please run `vc env pull` and try again"); } function T() { let e = (0, _.findRootDir)(); if (!e) throw new g.VercelOidcTokenError("Unable to find project root directory. Have you linked your project with `vc link?`"); let t = m.join(e, `.vercel`, `project.json`); if (!h.existsSync(t)) throw new g.VercelOidcTokenError("project.json not found, have you linked your project with `vc link?`"); let n = JSON.parse(h.readFileSync(t, `utf8`)); if (typeof n.projectId != `string` && typeof n.orgId != `string`) throw TypeError("Expected a string-valued projectId property. Try running `vc link` to re-link your project."); return { projectId: n.projectId, teamId: n.orgId }; } function E(e, t) { let n = (0, _.getUserDataDir)(); if (!n) throw new g.VercelOidcTokenError(`Unable to find user data directory. Please reach out to Vercel support.`); let r = m.join(n, `com.vercel.token`, `${t}.json`), i = JSON.stringify(e); h.mkdirSync(m.dirname(r), { mode: 504, recursive: !0 }), h.writeFileSync(r, i), h.chmodSync(r, 432); } function D(e) { let t = (0, _.getUserDataDir)(); if (!t) throw new g.VercelOidcTokenError(`Unable to find user data directory. Please reach out to Vercel support.`); let n = m.join(t, `com.vercel.token`, `${e}.json`); if (!h.existsSync(n)) return null; let r = JSON.parse(h.readFileSync(n, `utf8`)); return w(r), r; } function O(e) { let t = e.split(`.`); if (t.length !== 3) throw new g.VercelOidcTokenError("Invalid token. Please run `vc env pull` and try again"); let n = t[1].replace(/-/g, `+`).replace(/_/g, `/`), r = n.padEnd(n.length + (4 - n.length % 4) % 4, `=`); return JSON.parse(Buffer.from(r, `base64`).toString(`utf8`)); } function k(e, t = 0) { return e.exp * 1e3 < Date.now() + t; } })); var hc$1 = c$12(((e, t) => { var n = Object.defineProperty, r = Object.getOwnPropertyDescriptor, i = Object.getOwnPropertyNames, a = Object.prototype.hasOwnProperty, o = (e, t) => { for (var r in t) n(e, r, { get: t[r], enumerable: !0 }); }, s = (e, t, o, s) => { if (t && typeof t == `object` || typeof t == `function`) for (let c of i(t)) !a.call(e, c) && c !== o && n(e, c, { get: () => t[c], enumerable: !(s = r(t, c)) || s.enumerable }); return e; }, c = (e) => s(n({}, `__esModule`, { value: !0 }), e), l = {}; o(l, { AccessTokenMissingError: () => f.AccessTokenMissingError, RefreshAccessTokenFailedError: () => f.RefreshAccessTokenFailedError, getContext: () => d.getContext, getVercelOidcToken: () => u.getVercelOidcToken, getVercelOidcTokenSync: () => u.getVercelOidcTokenSync, getVercelToken: () => p.getVercelToken }), t.exports = c(l); var u = lc$1(), d = sc$1(), f = uc$1(), p = mc$1(); }))(); let gc$1; function _c$1(e) { return e?.dispatcher ?? vc$1(); } function vc$1() { return gc$1 ||= new hs$1.RetryAgent(new hs$1.Agent({ connections: 8, keepAliveTimeout: 1e4, allowH2: !1, pipelining: 1 }), { retryAfter: !0 }), gc$1; } async function yc$1(e, t, n) { if (e.length !== 32) throw Error(`Invalid deployment key length: expected 32 bytes for AES-256, got ${e.length} bytes`); if (!t || typeof t != `string`) throw Error(`projectId must be a non-empty string`); let r = await webcrypto.subtle.importKey(`raw`, e, `HKDF`, !1, [`deriveBits`]), i = new TextEncoder().encode(`${t}|${n}`), a = await webcrypto.subtle.deriveBits({ name: `HKDF`, hash: `SHA-256`, salt: /* @__PURE__ */ new Uint8Array(32), info: i }, r, 256); return new Uint8Array(a); } async function bc$1(e, t, n, r) { let i = r?.token ?? process.env.VERCEL_TOKEN ?? await (0, hc$1.getVercelOidcToken)().catch(() => null); if (!i) throw Error(`Cannot fetch run key: no OIDC token or VERCEL_TOKEN available`); let a = new URLSearchParams({ projectId: t, runId: n }); r?.teamId && a.set(`teamId`, r.teamId); let o = await fetch(`https://api.vercel.com/v1/workflow/run-key/${e}?${a}`, { method: `GET`, headers: { Authorization: `Bearer ${i}` }, dispatcher: _c$1({ dispatcher: r?.dispatcher }) }); if (!o.ok) { let t; try { t = await o.text(); } catch { t = ``; } throw Error(`Failed to fetch run key for ${n} (deployment ${e}): HTTP ${o.status} ${o.statusText}${t ? ` — ${t}` : ``}`); } let s = await o.json(), c = V$8({ key: R$8().nullable() }).safeParse(s); if (!c.success) throw Error(`Invalid response from Vercel API: expected { key: string | null }. Zod error: ${c.error.message}`); if (c.data.key !== null) return Buffer.from(c.data.key, `base64`); } function xc$1(e, t, n, r) { if (!e) return; let i = process.env.VERCEL === `1`, a; function o() { if (a) return a; let e = process.env.VERCEL_DEPLOYMENT_KEY; if (e) return a = Buffer.from(e, `base64`), a; } return async function(a, s) { let c = typeof a == `string` ? a : a.runId, l = typeof a == `string` ? s?.deploymentId : a.deploymentId; if (i && (!l || l === process.env.VERCEL_DEPLOYMENT_ID)) { let t = o(); return t ? yc$1(t, e, c) : void 0; } if (l) return bc$1(l, e, c, { token: n, teamId: t, dispatcher: r }); }; } let Sc$1 = null; async function Cc$1() { return Sc$1 ||= Promise.resolve().then(() => src_CQuMexnO_exports).then((t) => d$13(t.t(), 1)).catch(() => null), Sc$1; } let wc$1 = null; async function Tc$1() { return wc$1 ||= Cc$1().then((e) => e ? e.trace.getTracer(`workflow`) : null), wc$1; } async function Ec$1(e, ...t) { let [n, r] = await Promise.all([Tc$1(), Cc$1()]), { fn: i, opts: a } = typeof t[0] == `function` ? { fn: t[0], opts: {} } : { fn: t[1], opts: t[0] }; if (!i) throw Error(`Function to trace must be provided`); return !n || !r ? await i() : n.startActiveSpan(e, a, async (e) => { try { let t = await i(e); return e.setStatus({ code: r.SpanStatusCode.OK }), t; } catch (t) { throw e.setStatus({ code: r.SpanStatusCode.ERROR, message: t.message }), t; } finally { e.end(); } }); } async function Dc$1(e) { let t = await Cc$1(); if (t) return t.SpanKind[e]; } async function Oc$1(e) { let t = await Cc$1(); if (!t) return; let n = {}; t.propagation.inject(t.context.active(), n); for (let [t, r] of Object.entries(n)) e.set(t, r); } function kc$1(...e) { return (t) => Object.fromEntries(e.map((e) => [e, t])); } const Ac$1 = kc$1(`http.request.method`); const jc$1 = kc$1(`url.full`); const Mc$1 = kc$1(`server.address`); const Nc$1 = kc$1(`server.port`); const Pc$1 = kc$1(`http.response.status_code`); const Fc$1 = kc$1(`error.type`); const Ic$1 = kc$1(`workflow.world.parse.format`); const Lc$1 = kc$1(`peer.service`); const Rc$1 = kc$1(`rpc.system`); const zc$1 = kc$1(`rpc.service`); const Bc$1 = kc$1(`rpc.method`); const Vc$1 = kc$1(`workflow.run.id`); const Hc$1 = kc$1(`step.id`); const Uc$1 = { peerService: `workflow-server`, rpcSystem: `http`, rpcService: `workflow-server` }; const Wc$1 = { "world.runs.get": 0, "world.runs.experimentalSetAttributes": 0, "world.steps.get": 0, "world.events.create": 0, "world.events.get": 0 }; const Gc$1 = /* @__PURE__ */ new Set([ `world.steps.list`, `world.events.list`, `world.hooks.list` ]); function Kc$1(e) { if (e.length >= 2 && typeof e[1] == `object` && e[1] !== null) { let t = e[1]; if (typeof t.eventType == `string`) return t.eventType; } } function qc$1(e, t) { return typeof e[t] == `string` ? e[t] : void 0; } function Jc$1(e) { if (typeof e != `object` || !e) return; let t = e.runId; return typeof t == `string` ? t : void 0; } function Yc$1(e) { if (typeof e != `object` || !e) return; let t = e; if (typeof t.runId == `string`) return t.runId; for (let e of [ `run`, `step`, `hook`, `wait` ]) { let n = t[e]; if (typeof n == `object` && n) { let e = n.runId; if (typeof e == `string`) return e; } } } function Xc$1(e, t, n) { let r = `${e}.${t}`, i = {}, a = Wc$1[r], o = a === void 0 ? Gc$1.has(r) ? Jc$1(n[0]) : void 0 : qc$1(n, a); if (o && Object.assign(i, Vc$1(o)), r === `world.steps.get`) { let e = qc$1(n, 1); e && Object.assign(i, Hc$1(e)); } return i; } function Zc$1(e, t) { let n = {}; for (let r of Object.keys(t)) if (typeof t[r] != `function`) n[r] = t[r]; else { let i = t[r], a = String(r); n[r] = async (...t) => { let n = `${e}.${a}`; if (e === `world.events` && a === `create`) { let r = Kc$1(t); r && (n = `${e}.${a} ${r}`); } return Ec$1(n, { kind: await Dc$1(`CLIENT`) }, async (r) => { r?.setAttributes({ ...Lc$1(Uc$1.peerService), ...Rc$1(Uc$1.rpcSystem), ...zc$1(Uc$1.rpcService), ...Bc$1(n), ...Xc$1(e, a, t) }); let o = await i(...t), s = Yc$1(o); return s && r?.setAttributes(Vc$1(s)), o; }); }; } return n; } var Qc$1 = class extends Error { constructor(e) { super(e), this.name = `MultipartParseError`; } }; function $c$1(e) { let t = new TextEncoder().encode(e); return (e, n = 0) => Buffer.prototype.indexOf.call(e, t, n); } function el$1(e) { let t = new TextEncoder().encode(e), n = {}; for (let e = 0; e < t.length; ++e) { let r = t[e]; n[r] === void 0 && (n[r] = []), n[r].push(e); } return function(e) { let r = e.length - 1; if (e[r] in n) { let i = n[e[r]]; for (let n = i.length - 1; n >= 0; --n) for (let a = i[n], o = r; a >= 0 && e[o] === t[a]; --a, --o) if (a === 0) return o; } return -1; }; } function tl$1(e) { let t = new TextDecoder(`iso-8859-1`).decode(e).trim().split(/\r?\n/), n = []; for (let e of t) { let t = e.indexOf(`:`); if (t > 0) { let r = e.slice(0, t).trim(), i = e.slice(t + 1).trim(); n.push([r, i]); } } return new Headers(n); } function nl$1(e) { let t = e.match(/boundary=(?:"([^"]+)"|([^;]+))/i); if (!t) throw new Qc$1(`No boundary found in Content-Type header`); return t[1] ?? t[2]; } var rl$1 = class { queue = []; waiters = []; finished = !1; cancelled = !1; error = null; enqueue(e) { this.finished || this.cancelled || (this.waiters.length > 0 ? this.waiters.shift().resolve(e) : this.queue.push(e)); } finish(e) { if (!this.finished) for (this.finished = !0, this.error = e || null; this.waiters.length > 0;) { let t = this.waiters.shift(); e ? t.reject(e) : t.resolve(null); } } cancel() { if (!(this.cancelled || this.finished)) for (this.cancelled = !0; this.waiters.length > 0;) this.waiters.shift().resolve(null); } async dequeue() { if (this.queue.length > 0) return this.queue.shift(); if (this.finished || this.cancelled) { if (this.error) throw this.error; return null; } return new Promise((e, t) => { this.waiters.push({ resolve: e, reject: t }); }); } get isTerminal() { return this.finished || this.cancelled; } }; async function* il$1(e, t) { if (!e.body) throw new Qc$1(`Response body is null`); let n = e.headers.get(`content-type`); if (!n) throw new Qc$1(`Missing Content-Type header`); yield* new al$1(nl$1(n), t).parseStream(e.body); } var al$1 = class { boundary; findOpeningBoundary; openingBoundaryLength; findBoundary; findPartialTailBoundary; boundaryLength; findDoubleNewline; maxHeaderSize; maxBoundaryBuffer; state = 0; buffer = null; currentHeaders = new Headers(); currentPayloadController = null; constructor(e, t = {}) { this.boundary = e, this.findOpeningBoundary = $c$1(`--${e}`), this.openingBoundaryLength = 2 + e.length, this.findBoundary = $c$1(`\r --${e}`), this.findPartialTailBoundary = el$1(`\r --${e}`), this.boundaryLength = 4 + e.length, this.findDoubleNewline = $c$1(`\r \r `), this.maxHeaderSize = t.maxHeaderSize ?? 65536, this.maxBoundaryBuffer = t.maxBoundaryBuffer ?? 8192; } async *parseStream(e) { let t = e.getReader(), n = new rl$1(), r = this.startProducer(t, n); try { yield* this.consumeMessages(n); } finally { n.cancel(), this.closeCurrentPayload(); try { await t.cancel(); } catch {} await r; } } async startProducer(e, t) { try { for (; !t.isTerminal;) { let n; try { n = await e.read(); } catch (e) { if (e instanceof Error && (e.name === `AbortError` || e.constructor.name === `AbortError` || e.name === `TimeoutError` || e.constructor.name === `TimeoutError`)) break; throw e; } let { done: r, value: i } = n; if (r) { if (this.buffer !== null && this.buffer.length > 0) { let e = this.write(/* @__PURE__ */ new Uint8Array()); for (let n of e) { if (t.isTerminal) break; t.enqueue(n); } } if (this.state !== 4) throw this.state === 0 ? new Qc$1(`Invalid multipart stream: missing initial boundary`) : new Qc$1(`Unexpected end of stream`); break; } if (!(i instanceof Uint8Array)) throw new Qc$1(`Invalid chunk type: expected Uint8Array, got ${typeof i}`); let a = this.write(i); for (let e of a) { if (t.isTerminal) break; t.enqueue(e); } } t.isTerminal || t.finish(); } catch (e) { this.closeCurrentPayload(e), t.isTerminal || t.finish(e); } finally { try { e.releaseLock(); } catch {} } } async *consumeMessages(e) { for (;;) { let t = await e.dequeue(); if (t === null) break; yield t; } } write(e) { let t = []; if (this.state === 4) throw new Qc$1(`Unexpected data after end of stream`); let n = 0, r = e.length; if (this.buffer !== null) { let t = this.buffer.length, n = t + r; if (this.state === 2) { if (n > this.maxHeaderSize) throw new Qc$1(`Buffer size limit exceeded: ${n} bytes > ${this.maxHeaderSize} bytes. This may indicate malformed multipart data with oversized headers.`); } else if (t > this.maxBoundaryBuffer) throw new Qc$1(`Boundary buffer limit exceeded: ${t} bytes > ${this.maxBoundaryBuffer} bytes. This may indicate malformed multipart data with invalid boundaries.`); let i = new Uint8Array(n); i.set(this.buffer, 0), i.set(e, t), e = i, r = e.length, this.buffer = null; } if (r === 0 && this.state === 0) throw new Qc$1(`Invalid multipart stream: missing initial boundary`); for (;;) { if (this.state === 3) { if (r - n < this.boundaryLength) { let t = e.subarray(n); if (t.length > this.maxBoundaryBuffer) throw new Qc$1(`Boundary buffer limit exceeded: ${t.length} > ${this.maxBoundaryBuffer}`); this.buffer = t; break; } let t = this.findBoundary(e, n); if (t === -1) { let t = this.findPartialTailBoundary(e); if (t === -1) this.writeBody(n === 0 ? e : e.subarray(n)); else { this.writeBody(e.subarray(n, t)); let r = e.subarray(t); if (r.length > this.maxBoundaryBuffer) throw new Qc$1(`Partial boundary too large: ${r.length} > ${this.maxBoundaryBuffer}`); this.buffer = r; } break; } this.writeBody(e.subarray(n, t)), this.finishMessage(), n = t + this.boundaryLength, this.state = 1; } if (this.state === 1) { if (r - n < 2) { let t = e.subarray(n); if (t.length > this.maxBoundaryBuffer) throw new Qc$1(`After-boundary buffer limit exceeded: ${t.length} > ${this.maxBoundaryBuffer}`); this.buffer = t; break; } if (e[n] === 45 && e[n + 1] === 45) { this.state = 4; break; } if (e[n] === 13 && e[n + 1] === 10) n += 2; else if (e[n] === 10) n += 1; else throw new Qc$1(`Invalid character after boundary: expected CRLF or LF, got 0x${e[n].toString(16)}`); this.state = 2; } if (this.state === 2) { if (r - n < 4) { let t = e.subarray(n); if (t.length > this.maxHeaderSize) throw new Qc$1(`Header buffer limit exceeded: ${t.length} > ${this.maxHeaderSize}`); this.buffer = t; break; } let i = this.findDoubleNewline(e, n), a = 4; if (i === -1 && (i = $c$1(` `)(e, n), a = 2), i === -1) { let t = e.subarray(n); if (t.length > this.maxHeaderSize) throw new Qc$1(`Headers too large: ${t.length} > ${this.maxHeaderSize} bytes`); this.buffer = t; break; } let o = e.subarray(n, i); this.currentHeaders = tl$1(o); let s = this.createStreamingMessage(); t.push(s), n = i + a, this.state = 3; continue; } if (this.state === 0) { if (r < this.openingBoundaryLength) { if (e.length > this.maxBoundaryBuffer) throw new Qc$1(`Initial chunk too large for boundary detection: ${e.length} > ${this.maxBoundaryBuffer}`); this.buffer = e; break; } if (this.findOpeningBoundary(e) !== 0) throw new Qc$1(`Invalid multipart stream: missing initial boundary`); n = this.openingBoundaryLength, this.state = 1; } } return t; } createStreamingMessage() { let e = new Headers(this.currentHeaders), t = new ReadableStream({ start: (e) => { this.currentPayloadController = e; } }); return this.currentHeaders = new Headers(), { headers: e, payload: t }; } writeBody(e) { this.currentPayloadController && this.currentPayloadController.enqueue(e); } finishMessage() { this.currentPayloadController &&= (this.currentPayloadController.close(), null); } closeCurrentPayload(e) { if (this.currentPayloadController) { try { e ? this.currentPayloadController.error(e) : this.currentPayloadController.close(); } catch {} this.currentPayloadController = null; } } }; const ol$1 = (e, t, n) => { let r = e instanceof RegExp ? sl$1(e, n) : e, i = t instanceof RegExp ? sl$1(t, n) : t, a = r !== null && i != null && cl$1(r, i, n); return a && { start: a[0], end: a[1], pre: n.slice(0, a[0]), body: n.slice(a[0] + r.length, a[1]), post: n.slice(a[1] + i.length) }; }; const sl$1 = (e, t) => { let n = t.match(e); return n ? n[0] : null; }; const cl$1 = (e, t, n) => { let r, i, a, o, s, c = n.indexOf(e), l = n.indexOf(t, c + 1), u = c; if (c >= 0 && l > 0) { if (e === t) return [c, l]; for (r = [], a = n.length; u >= 0 && !s;) { if (u === c) r.push(u), c = n.indexOf(e, u + 1); else if (r.length === 1) { let e = r.pop(); e !== void 0 && (s = [e, l]); } else i = r.pop(), i !== void 0 && i < a && (a = i, o = l), l = n.indexOf(t, u + 1); u = c < l && c >= 0 ? c : l; } r.length && o !== void 0 && (s = [a, o]); } return s; }; const ll$1 = `\0SLASH` + Math.random() + `\0`; const ul$1 = `\0OPEN` + Math.random() + `\0`; const dl$1 = `\0CLOSE` + Math.random() + `\0`; const fl$1 = `\0COMMA` + Math.random() + `\0`; const pl$1 = `\0PERIOD` + Math.random() + `\0`; const ml$1 = new RegExp(ll$1, `g`); const hl$1 = new RegExp(ul$1, `g`); const gl$1 = new RegExp(dl$1, `g`); const _l$1 = new RegExp(fl$1, `g`); const vl$1 = new RegExp(pl$1, `g`); const yl$1 = /\\\\/g; const bl$1 = /\\{/g; const xl$1 = /\\}/g; const Sl$1 = /\\,/g; const Cl$1 = /\\\./g; function wl$1(e) { return isNaN(e) ? e.charCodeAt(0) : parseInt(e, 10); } function Tl$1(e) { return e.replace(yl$1, ll$1).replace(bl$1, ul$1).replace(xl$1, dl$1).replace(Sl$1, fl$1).replace(Cl$1, pl$1); } function El$1(e) { return e.replace(ml$1, `\\`).replace(hl$1, `{`).replace(gl$1, `}`).replace(_l$1, `,`).replace(vl$1, `.`); } function Dl$1(e) { if (!e) return [``]; let t = [], n = ol$1(`{`, `}`, e); if (!n) return e.split(`,`); let { pre: r, body: i, post: a } = n, o = r.split(`,`); o[o.length - 1] += `{` + i + `}`; let s = Dl$1(a); return a.length && (o[o.length - 1] += s.shift(), o.push.apply(o, s)), t.push.apply(t, o), t; } function Ol$1(e, t = {}) { if (!e) return []; let { max: n = 1e5 } = t; return e.slice(0, 2) === `{}` && (e = `\\{\\}` + e.slice(2)), Nl$1(Tl$1(e), n, !0).map(El$1); } function kl$1(e) { return `{` + e + `}`; } function Al$1(e) { return /^-?0\d/.test(e); } function jl$1(e, t) { return e <= t; } function Ml$1(e, t) { return e >= t; } function Nl$1(e, t, n) { let r = [], i = ol$1(`{`, `}`, e); if (!i) return [e]; let a = i.pre, o = i.post.length ? Nl$1(i.post, t, !1) : [``]; if (/\$$/.test(i.pre)) for (let e = 0; e < o.length && e < t; e++) { let t = a + `{` + i.body + `}` + o[e]; r.push(t); } else { let s = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(i.body), c = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(i.body), l = s || c, u = i.body.indexOf(`,`) >= 0; if (!l && !u) return i.post.match(/,(?!,).*\}/) ? (e = i.pre + `{` + i.body + dl$1 + i.post, Nl$1(e, t, !0)) : [e]; let d; if (l) d = i.body.split(/\.\./); else if (d = Dl$1(i.body), d.length === 1 && d[0] !== void 0 && (d = Nl$1(d[0], t, !1).map(kl$1), d.length === 1)) return o.map((e) => i.pre + d[0] + e); let f; if (l && d[0] !== void 0 && d[1] !== void 0) { let e = wl$1(d[0]), n = wl$1(d[1]), r = Math.max(d[0].length, d[1].length), i = d.length === 3 && d[2] !== void 0 ? Math.max(Math.abs(wl$1(d[2])), 1) : 1, a = jl$1; n < e && (i *= -1, a = Ml$1); let o = d.some(Al$1); f = []; for (let s = e; a(s, n) && f.length < t; s += i) { let e; if (c) e = String.fromCharCode(s), e === `\\` && (e = ``); else if (e = String(s), o) { let t = r - e.length; if (t > 0) { let n = Array(t + 1).join(`0`); e = s < 0 ? `-` + n + e.slice(1) : n + e; } } f.push(e); } } else { f = []; for (let e = 0; e < d.length; e++) f.push.apply(f, Nl$1(d[e], t, !1)); } for (let e = 0; e < f.length; e++) for (let i = 0; i < o.length && r.length < t; i++) { let t = a + f[e] + o[i]; (!n || l || t) && r.push(t); } } return r; } const Pl$1 = (e) => { if (typeof e != `string`) throw TypeError(`invalid pattern`); if (e.length > 65536) throw TypeError(`pattern is too long`); }; const Fl$1 = { "[:alnum:]": [`\\p{L}\\p{Nl}\\p{Nd}`, !0], "[:alpha:]": [`\\p{L}\\p{Nl}`, !0], "[:ascii:]": [`\\x00-\\x7f`, !1], "[:blank:]": [`\\p{Zs}\\t`, !0], "[:cntrl:]": [`\\p{Cc}`, !0], "[:digit:]": [`\\p{Nd}`, !0], "[:graph:]": [ `\\p{Z}\\p{C}`, !0, !0 ], "[:lower:]": [`\\p{Ll}`, !0], "[:print:]": [`\\p{C}`, !0], "[:punct:]": [`\\p{P}`, !0], "[:space:]": [`\\p{Z}\\t\\r\\n\\v\\f`, !0], "[:upper:]": [`\\p{Lu}`, !0], "[:word:]": [`\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}`, !0], "[:xdigit:]": [`A-Fa-f0-9`, !1] }; const Il$1 = (e) => e.replace(/[[\]\\-]/g, `\\$&`); const Ll$1 = (e) => e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, `\\$&`); const Rl$1 = (e) => e.join(``); const zl$1 = (e, t) => { let n = t; if (e.charAt(n) !== `[`) throw Error(`not in a brace expression`); let r = [], i = [], a = n + 1, o = !1, s = !1, c = !1, l = !1, u = n, d = ``; WHILE: for (; a < e.length;) { let t = e.charAt(a); if ((t === `!` || t === `^`) && a === n + 1) { l = !0, a++; continue; } if (t === `]` && o && !c) { u = a + 1; break; } if (o = !0, t === `\\` && !c) { c = !0, a++; continue; } if (t === `[` && !c) { for (let [t, [o, c, l]] of Object.entries(Fl$1)) if (e.startsWith(t, a)) { if (d) return [ `$.`, !1, e.length - n, !0 ]; a += t.length, l ? i.push(o) : r.push(o), s ||= c; continue WHILE; } } if (c = !1, d) { t > d ? r.push(Il$1(d) + `-` + Il$1(t)) : t === d && r.push(Il$1(t)), d = ``, a++; continue; } if (e.startsWith(`-]`, a + 1)) { r.push(Il$1(t + `-`)), a += 2; continue; } if (e.startsWith(`-`, a + 1)) { d = t, a += 2; continue; } r.push(Il$1(t)), a++; } if (u < a) return [ ``, !1, 0, !1 ]; if (!r.length && !i.length) return [ `$.`, !1, e.length - n, !0 ]; if (i.length === 0 && r.length === 1 && /^\\?.$/.test(r[0]) && !l) return [ Ll$1(r[0].length === 2 ? r[0].slice(-1) : r[0]), !1, u - n, !1 ]; let f = `[` + (l ? `^` : ``) + Rl$1(r) + `]`, p = `[` + (l ? `` : `^`) + Rl$1(i) + `]`; return [ r.length && i.length ? `(` + f + `|` + p + `)` : r.length ? f : p, s, u - n, !0 ]; }; const Bl$1 = (e, { windowsPathsNoEscape: t = !1, magicalBraces: n = !0 } = {}) => n ? t ? e.replace(/\[([^/\\])\]/g, `$1`) : e.replace(/((?!\\).|^)\[([^/\\])\]/g, `$1$2`).replace(/\\([^/])/g, `$1`) : t ? e.replace(/\[([^/\\{}])\]/g, `$1`) : e.replace(/((?!\\).|^)\[([^/\\{}])\]/g, `$1$2`).replace(/\\([^/{}])/g, `$1`); var Vl$1; const Hl$1 = /* @__PURE__ */ new Set([ `!`, `?`, `+`, `*`, `@` ]); const Ul$1 = (e) => Hl$1.has(e); const Wl$1 = (e) => Ul$1(e.type); const Gl$1 = /* @__PURE__ */ new Map([ [`!`, [`@`]], [`?`, [`?`, `@`]], [`@`, [`@`]], [`*`, [ `*`, `+`, `?`, `@` ]], [`+`, [`+`, `@`]] ]); const Kl$1 = /* @__PURE__ */ new Map([ [`!`, [`?`]], [`@`, [`?`]], [`+`, [`?`, `*`]] ]); const ql$1 = /* @__PURE__ */ new Map([ [`!`, [`?`, `@`]], [`?`, [`?`, `@`]], [`@`, [`?`, `@`]], [`*`, [ `*`, `+`, `?`, `@` ]], [`+`, [ `+`, `@`, `?`, `*` ]] ]); const Jl$1 = /* @__PURE__ */ new Map([ [`!`, /* @__PURE__ */ new Map([[`!`, `@`]])], [`?`, /* @__PURE__ */ new Map([[`*`, `*`], [`+`, `*`]])], [`@`, /* @__PURE__ */ new Map([ [`!`, `!`], [`?`, `?`], [`@`, `@`], [`*`, `*`], [`+`, `+`] ])], [`+`, /* @__PURE__ */ new Map([[`?`, `*`], [`*`, `*`]])] ]); const Yl$1 = `(?!\\.)`; const Xl$1 = /* @__PURE__ */ new Set([`[`, `.`]); const Zl$1 = /* @__PURE__ */ new Set([`..`, `.`]); const Ql$1 = /* @__PURE__ */ new Set(`().*{}+?[]^$\\!`); const $l$1 = (e) => e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, `\\$&`); const eu$1 = `[^/]+?`; let tu$1 = 0; var nu$1 = class { type; #e; #t; #n = !1; #r = []; #i; #a; #o; #s = !1; #c; #l; #u = !1; id = ++tu$1; get depth() { return (this.#i?.depth ?? -1) + 1; } [Symbol.for(`nodejs.util.inspect.custom`)]() { return { "@@type": `AST`, id: this.id, type: this.type, root: this.#e.id, parent: this.#i?.id, depth: this.depth, partsLength: this.#r.length, parts: this.#r }; } constructor(e, t, n = {}) { this.type = e, e && (this.#t = !0), this.#i = t, this.#e = this.#i ? this.#i.#e : this, this.#c = this.#e === this ? n : this.#e.#c, this.#o = this.#e === this ? [] : this.#e.#o, e === `!` && !this.#e.#s && this.#o.push(this), this.#a = this.#i ? this.#i.#r.length : 0; } get hasMagic() { if (this.#t !== void 0) return this.#t; for (let e of this.#r) if (typeof e != `string` && (e.type || e.hasMagic)) return this.#t = !0; return this.#t; } toString() { return this.#l === void 0 ? this.type ? this.#l = this.type + `(` + this.#r.map((e) => String(e)).join(`|`) + `)` : this.#l = this.#r.map((e) => String(e)).join(``) : this.#l; } #d() { if (this !== this.#e) throw Error(`should only call on root`); if (this.#s) return this; this.toString(), this.#s = !0; let e; for (; e = this.#o.pop();) { if (e.type !== `!`) continue; let t = e, n = t.#i; for (; n;) { for (let r = t.#a + 1; !n.type && r < n.#r.length; r++) for (let t of e.#r) { if (typeof t == `string`) throw Error(`string part in extglob AST??`); t.copyIn(n.#r[r]); } t = n, n = t.#i; } } return this; } push(...e) { for (let t of e) if (t !== ``) { if (typeof t != `string` && !(t instanceof Vl$1 && t.#i === this)) throw Error(`invalid part: ` + t); this.#r.push(t); } } toJSON() { let e = this.type === null ? this.#r.slice().map((e) => typeof e == `string` ? e : e.toJSON()) : [this.type, ...this.#r.map((e) => e.toJSON())]; return this.isStart() && !this.type && e.unshift([]), this.isEnd() && (this === this.#e || this.#e.#s && this.#i?.type === `!`) && e.push({}), e; } isStart() { if (this.#e === this) return !0; if (!this.#i?.isStart()) return !1; if (this.#a === 0) return !0; let e = this.#i; for (let t = 0; t < this.#a; t++) { let n = e.#r[t]; if (!(n instanceof Vl$1 && n.type === `!`)) return !1; } return !0; } isEnd() { if (this.#e === this || this.#i?.type === `!`) return !0; if (!this.#i?.isEnd()) return !1; if (!this.type) return this.#i?.isEnd(); let e = this.#i ? this.#i.#r.length : 0; return this.#a === e - 1; } copyIn(e) { typeof e == `string` ? this.push(e) : this.push(e.clone(this)); } clone(e) { let t = new Vl$1(this.type, e); for (let e of this.#r) t.copyIn(e); return t; } static #f(e, t, n, r, i) { let a = r.maxExtglobRecursion ?? 2, o = !1, s = !1, c = -1, l = !1; if (t.type === null) { let u = n, d = ``; for (; u < e.length;) { let n = e.charAt(u++); if (o || n === `\\`) { o = !o, d += n; continue; } if (s) { u === c + 1 ? (n === `^` || n === `!`) && (l = !0) : n === `]` && !(u === c + 2 && l) && (s = !1), d += n; continue; } else if (n === `[`) { s = !0, c = u, l = !1, d += n; continue; } if (!r.noext && Ul$1(n) && e.charAt(u) === `(` && i <= a) { t.push(d), d = ``; let a = new Vl$1(n, t); u = Vl$1.#f(e, a, u, r, i + 1), t.push(a); continue; } d += n; } return t.push(d), u; } let u = n + 1, d = new Vl$1(null, t), f = [], p = ``; for (; u < e.length;) { let n = e.charAt(u++); if (o || n === `\\`) { o = !o, p += n; continue; } if (s) { u === c + 1 ? (n === `^` || n === `!`) && (l = !0) : n === `]` && !(u === c + 2 && l) && (s = !1), p += n; continue; } else if (n === `[`) { s = !0, c = u, l = !1, p += n; continue; } if (!r.noext && Ul$1(n) && e.charAt(u) === `(` && (i <= a || t && t.#h(n))) { let a = t && t.#h(n) ? 0 : 1; d.push(p), p = ``; let o = new Vl$1(n, d); d.push(o), u = Vl$1.#f(e, o, u, r, i + a); continue; } if (n === `|`) { d.push(p), p = ``, f.push(d), d = new Vl$1(null, t); continue; } if (n === `)`) return p === `` && t.#r.length === 0 && (t.#u = !0), d.push(p), p = ``, t.push(...f, d), u; p += n; } return t.type = null, t.#t = void 0, t.#r = [e.substring(n - 1)], u; } #p(e) { return this.#m(e, Kl$1); } #m(e, t = Gl$1) { if (!e || typeof e != `object` || e.type !== null || e.#r.length !== 1 || this.type === null) return !1; let n = e.#r[0]; return !n || typeof n != `object` || n.type === null ? !1 : this.#h(n.type, t); } #h(e, t = ql$1) { return !!t.get(this.type)?.includes(e); } #g(e, t) { let n = e.#r[0], r = new Vl$1(null, n, this.options); r.#r.push(``), n.push(r), this.#_(e, t); } #_(e, t) { let n = e.#r[0]; this.#r.splice(t, 1, ...n.#r); for (let e of n.#r) typeof e == `object` && (e.#i = this); this.#l = void 0; } #v(e) { return !!Jl$1.get(this.type)?.has(e); } #y(e) { if (!e || typeof e != `object` || e.type !== null || e.#r.length !== 1 || this.type === null || this.#r.length !== 1) return !1; let t = e.#r[0]; return !t || typeof t != `object` || t.type === null ? !1 : this.#v(t.type); } #b(e) { let t = Jl$1.get(this.type), n = e.#r[0], r = t?.get(n.type); if (!r) return !1; this.#r = n.#r; for (let e of this.#r) typeof e == `object` && (e.#i = this); this.type = r, this.#l = void 0, this.#u = !1; } static fromGlob(e, t = {}) { let n = new Vl$1(null, void 0, t); return Vl$1.#f(e, n, 0, t, 0), n; } toMMPattern() { if (this !== this.#e) return this.#e.toMMPattern(); let e = this.toString(), [t, n, r, i] = this.toRegExpSource(); if (!(r || this.#t || this.#c.nocase && !this.#c.nocaseMagicOnly && e.toUpperCase() !== e.toLowerCase())) return n; let a = (this.#c.nocase ? `i` : ``) + (i ? `u` : ``); return Object.assign(RegExp(`^${t}$`, a), { _src: t, _glob: e }); } get options() { return this.#c; } toRegExpSource(e) { let t = e ?? !!this.#c.dot; if (this.#e === this && (this.#x(), this.#d()), !Wl$1(this)) { let n = this.isStart() && this.isEnd() && !this.#r.some((e) => typeof e != `string`), r = this.#r.map((t) => { let [r, i, a, o] = typeof t == `string` ? Vl$1.#C(t, this.#t, n) : t.toRegExpSource(e); return this.#t = this.#t || a, this.#n = this.#n || o, r; }).join(``), i = ``; if (this.isStart() && typeof this.#r[0] == `string` && !(this.#r.length === 1 && Zl$1.has(this.#r[0]))) { let n = Xl$1, a = t && n.has(r.charAt(0)) || r.startsWith(`\\.`) && n.has(r.charAt(2)) || r.startsWith(`\\.\\.`) && n.has(r.charAt(4)), o = !t && !e && n.has(r.charAt(0)); i = a ? `(?!(?:^|/)\\.\\.?(?:$|/))` : o ? Yl$1 : ``; } let a = ``; return this.isEnd() && this.#e.#s && this.#i?.type === `!` && (a = `(?:$|\\/)`), [ i + r + a, Bl$1(r), this.#t = !!this.#t, this.#n ]; } let n = this.type === `*` || this.type === `+`, r = this.type === `!` ? `(?:(?!(?:` : `(?:`, i = this.#S(t); if (this.isStart() && this.isEnd() && !i && this.type !== `!`) { let e = this.toString(), t = this; return t.#r = [e], t.type = null, t.#t = void 0, [ e, Bl$1(this.toString()), !1, !1 ]; } let a = !n || e || t ? `` : this.#S(!0); a === i && (a = ``), a && (i = `(?:${i})(?:${a})*?`); let o = ``; if (this.type === `!` && this.#u) o = (this.isStart() && !t ? Yl$1 : ``) + eu$1; else { let n = this.type === `!` ? `))` + (this.isStart() && !t && !e ? Yl$1 : ``) + `[^/]*?)` : this.type === `@` ? `)` : this.type === `?` ? `)?` : this.type === `+` && a ? `)` : this.type === `*` && a ? `)?` : `)${this.type}`; o = r + i + n; } return [ o, Bl$1(i), this.#t = !!this.#t, this.#n ]; } #x() { if (Wl$1(this)) { let e = 0, t = !1; do { t = !0; for (let e = 0; e < this.#r.length; e++) { let n = this.#r[e]; typeof n == `object` && (n.#x(), this.#m(n) ? (t = !1, this.#_(n, e)) : this.#p(n) ? (t = !1, this.#g(n, e)) : this.#y(n) && (t = !1, this.#b(n))); } } while (!t && ++e < 10); } else for (let e of this.#r) typeof e == `object` && e.#x(); this.#l = void 0; } #S(e) { return this.#r.map((t) => { if (typeof t == `string`) throw Error(`string type in extglob ast??`); let [n, r, i, a] = t.toRegExpSource(e); return this.#n = this.#n || a, n; }).filter((e) => !(this.isStart() && this.isEnd()) || !!e).join(`|`); } static #C(e, t, n = !1) { let r = !1, i = ``, a = !1, o = !1; for (let s = 0; s < e.length; s++) { let c = e.charAt(s); if (r) { r = !1, i += (Ql$1.has(c) ? `\\` : ``) + c; continue; } if (c === `*`) { if (o) continue; o = !0, i += n && /^[*]+$/.test(e) ? eu$1 : `[^/]*?`, t = !0; continue; } else o = !1; if (c === `\\`) { s === e.length - 1 ? i += `\\\\` : r = !0; continue; } if (c === `[`) { let [n, r, o, c] = zl$1(e, s); if (o) { i += n, a ||= r, s += o - 1, t ||= c; continue; } } if (c === `?`) { i += `[^/]`, t = !0; continue; } i += $l$1(c); } return [ i, Bl$1(e), !!t, a ]; } }; Vl$1 = nu$1; const ru$1 = (e, { windowsPathsNoEscape: t = !1, magicalBraces: n = !1 } = {}) => n ? t ? e.replace(/[?*()[\]{}]/g, `[$&]`) : e.replace(/[?*()[\]\\{}]/g, `\\$&`) : t ? e.replace(/[?*()[\]]/g, `[$&]`) : e.replace(/[?*()[\]\\]/g, `\\$&`); const iu$1 = (e, t, n = {}) => (Pl$1(t), !n.nocomment && t.charAt(0) === `#` ? !1 : new Mu$1(t, n).match(e)); const au$1 = /^\*+([^+@!?*[(]*)$/; const ou$1 = (e) => (t) => !t.startsWith(`.`) && t.endsWith(e); const su$1 = (e) => (t) => t.endsWith(e); const cu$1 = (e) => (e = e.toLowerCase(), (t) => !t.startsWith(`.`) && t.toLowerCase().endsWith(e)); const lu$1 = (e) => (e = e.toLowerCase(), (t) => t.toLowerCase().endsWith(e)); const uu$1 = /^\*+\.\*+$/; const du$1 = (e) => !e.startsWith(`.`) && e.includes(`.`); const fu$1 = (e) => e !== `.` && e !== `..` && e.includes(`.`); const pu$1 = /^\.\*+$/; const mu$1 = (e) => e !== `.` && e !== `..` && e.startsWith(`.`); const hu$1 = /^\*+$/; const gu$1 = (e) => e.length !== 0 && !e.startsWith(`.`); const _u$1 = (e) => e.length !== 0 && e !== `.` && e !== `..`; const vu$1 = /^\?+([^+@!?*[(]*)?$/; const yu$1 = ([e, t = ``]) => { let n = Cu$1([e]); return t ? (t = t.toLowerCase(), (e) => n(e) && e.toLowerCase().endsWith(t)) : n; }; const bu$1 = ([e, t = ``]) => { let n = wu$1([e]); return t ? (t = t.toLowerCase(), (e) => n(e) && e.toLowerCase().endsWith(t)) : n; }; const xu$1 = ([e, t = ``]) => { let n = wu$1([e]); return t ? (e) => n(e) && e.endsWith(t) : n; }; const Su$1 = ([e, t = ``]) => { let n = Cu$1([e]); return t ? (e) => n(e) && e.endsWith(t) : n; }; const Cu$1 = ([e]) => { let t = e.length; return (e) => e.length === t && !e.startsWith(`.`); }; const wu$1 = ([e]) => { let t = e.length; return (e) => e.length === t && e !== `.` && e !== `..`; }; const Tu$1 = typeof process == `object` && process ? typeof process.env == `object` && process.env && process.env.__MINIMATCH_TESTING_PLATFORM__ || process.platform : `posix`; const Eu$1 = { win32: { sep: `\\` }, posix: { sep: `/` } }; iu$1.sep = Tu$1 === `win32` ? Eu$1.win32.sep : Eu$1.posix.sep; const Du$1 = Symbol(`globstar **`); iu$1.GLOBSTAR = Du$1, iu$1.filter = (e, t = {}) => (n) => iu$1(n, e, t); const Ou$1 = (e, t = {}) => Object.assign({}, e, t); iu$1.defaults = (e) => { if (!e || typeof e != `object` || !Object.keys(e).length) return iu$1; let t = iu$1; return Object.assign((n, r, i = {}) => t(n, r, Ou$1(e, i)), { Minimatch: class extends t.Minimatch { constructor(t, n = {}) { super(t, Ou$1(e, n)); } static defaults(n) { return t.defaults(Ou$1(e, n)).Minimatch; } }, AST: class extends t.AST { constructor(t, n, r = {}) { super(t, n, Ou$1(e, r)); } static fromGlob(n, r = {}) { return t.AST.fromGlob(n, Ou$1(e, r)); } }, unescape: (n, r = {}) => t.unescape(n, Ou$1(e, r)), escape: (n, r = {}) => t.escape(n, Ou$1(e, r)), filter: (n, r = {}) => t.filter(n, Ou$1(e, r)), defaults: (n) => t.defaults(Ou$1(e, n)), makeRe: (n, r = {}) => t.makeRe(n, Ou$1(e, r)), braceExpand: (n, r = {}) => t.braceExpand(n, Ou$1(e, r)), match: (n, r, i = {}) => t.match(n, r, Ou$1(e, i)), sep: t.sep, GLOBSTAR: Du$1 }); }; const ku$1 = (e, t = {}) => (Pl$1(e), t.nobrace || !/\{(?:(?!\{).)*\}/.test(e) ? [e] : Ol$1(e, { max: t.braceExpandMax })); iu$1.braceExpand = ku$1, iu$1.makeRe = (e, t = {}) => new Mu$1(e, t).makeRe(), iu$1.match = (e, t, n = {}) => { let r = new Mu$1(t, n); return e = e.filter((e) => r.match(e)), r.options.nonull && !e.length && e.push(t), e; }; const Au$1 = /[?*]|[+@!]\(.*?\)|\[|\]/; const ju$1 = (e) => e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, `\\$&`); var Mu$1 = class { options; set; pattern; windowsPathsNoEscape; nonegate; negate; comment; empty; preserveMultipleSlashes; partial; globSet; globParts; nocase; isWindows; platform; windowsNoMagicRoot; maxGlobstarRecursion; regexp; constructor(e, t = {}) { Pl$1(e), t ||= {}, this.options = t, this.maxGlobstarRecursion = t.maxGlobstarRecursion ?? 200, this.pattern = e, this.platform = t.platform || Tu$1, this.isWindows = this.platform === `win32`, this.windowsPathsNoEscape = !!t.windowsPathsNoEscape || t.allowWindowsEscape === !1, this.windowsPathsNoEscape && (this.pattern = this.pattern.replace(/\\/g, `/`)), this.preserveMultipleSlashes = !!t.preserveMultipleSlashes, this.regexp = null, this.negate = !1, this.nonegate = !!t.nonegate, this.comment = !1, this.empty = !1, this.partial = !!t.partial, this.nocase = !!this.options.nocase, this.windowsNoMagicRoot = t.windowsNoMagicRoot === void 0 ? !!(this.isWindows && this.nocase) : t.windowsNoMagicRoot, this.globSet = [], this.globParts = [], this.set = [], this.make(); } hasMagic() { if (this.options.magicalBraces && this.set.length > 1) return !0; for (let e of this.set) for (let t of e) if (typeof t != `string`) return !0; return !1; } debug(...e) {} make() { let e = this.pattern, t = this.options; if (!t.nocomment && e.charAt(0) === `#`) { this.comment = !0; return; } if (!e) { this.empty = !0; return; } this.parseNegate(), this.globSet = [...new Set(this.braceExpand())], t.debug && (this.debug = (...e) => console.error(...e)), this.debug(this.pattern, this.globSet); let n = this.globSet.map((e) => this.slashSplit(e)); this.globParts = this.preprocess(n), this.debug(this.pattern, this.globParts); let r = this.globParts.map((e, t, n) => { if (this.isWindows && this.windowsNoMagicRoot) { let t = e[0] === `` && e[1] === `` && (e[2] === `?` || !Au$1.test(e[2])) && !Au$1.test(e[3]), n = /^[a-z]:/i.test(e[0]); if (t) return [...e.slice(0, 4), ...e.slice(4).map((e) => this.parse(e))]; if (n) return [e[0], ...e.slice(1).map((e) => this.parse(e))]; } return e.map((e) => this.parse(e)); }); if (this.debug(this.pattern, r), this.set = r.filter((e) => e.indexOf(!1) === -1), this.isWindows) for (let e = 0; e < this.set.length; e++) { let t = this.set[e]; t[0] === `` && t[1] === `` && this.globParts[e][2] === `?` && typeof t[3] == `string` && /^[a-z]:$/i.test(t[3]) && (t[2] = `?`); } this.debug(this.pattern, this.set); } preprocess(e) { if (this.options.noglobstar) for (let t of e) for (let e = 0; e < t.length; e++) t[e] === `**` && (t[e] = `*`); let { optimizationLevel: t = 1 } = this.options; return t >= 2 ? (e = this.firstPhasePreProcess(e), e = this.secondPhasePreProcess(e)) : e = t >= 1 ? this.levelOneOptimize(e) : this.adjascentGlobstarOptimize(e), e; } adjascentGlobstarOptimize(e) { return e.map((e) => { let t = -1; for (; (t = e.indexOf(`**`, t + 1)) !== -1;) { let n = t; for (; e[n + 1] === `**`;) n++; n !== t && e.splice(t, n - t); } return e; }); } levelOneOptimize(e) { return e.map((e) => (e = e.reduce((e, t) => { let n = e[e.length - 1]; return t === `**` && n === `**` ? e : t === `..` && n && n !== `..` && n !== `.` && n !== `**` ? (e.pop(), e) : (e.push(t), e); }, []), e.length === 0 ? [``] : e)); } levelTwoFileOptimize(e) { Array.isArray(e) || (e = this.slashSplit(e)); let t = !1; do { if (t = !1, !this.preserveMultipleSlashes) { for (let n = 1; n < e.length - 1; n++) { let r = e[n]; n === 1 && r === `` && e[0] === `` || (r === `.` || r === ``) && (t = !0, e.splice(n, 1), n--); } e[0] === `.` && e.length === 2 && (e[1] === `.` || e[1] === ``) && (t = !0, e.pop()); } let n = 0; for (; (n = e.indexOf(`..`, n + 1)) !== -1;) { let r = e[n - 1]; r && r !== `.` && r !== `..` && r !== `**` && !(this.isWindows && /^[a-z]:$/i.test(r)) && (t = !0, e.splice(n - 1, 2), n -= 2); } } while (t); return e.length === 0 ? [``] : e; } firstPhasePreProcess(e) { let t = !1; do { t = !1; for (let n of e) { let r = -1; for (; (r = n.indexOf(`**`, r + 1)) !== -1;) { let i = r; for (; n[i + 1] === `**`;) i++; i > r && n.splice(r + 1, i - r); let a = n[r + 1], o = n[r + 2], s = n[r + 3]; if (a !== `..` || !o || o === `.` || o === `..` || !s || s === `.` || s === `..`) continue; t = !0, n.splice(r, 1); let c = n.slice(0); c[r] = `**`, e.push(c), r--; } if (!this.preserveMultipleSlashes) { for (let e = 1; e < n.length - 1; e++) { let r = n[e]; e === 1 && r === `` && n[0] === `` || (r === `.` || r === ``) && (t = !0, n.splice(e, 1), e--); } n[0] === `.` && n.length === 2 && (n[1] === `.` || n[1] === ``) && (t = !0, n.pop()); } let i = 0; for (; (i = n.indexOf(`..`, i + 1)) !== -1;) { let e = n[i - 1]; if (e && e !== `.` && e !== `..` && e !== `**`) { t = !0; let e = i === 1 && n[i + 1] === `**` ? [`.`] : []; n.splice(i - 1, 2, ...e), n.length === 0 && n.push(``), i -= 2; } } } } while (t); return e; } secondPhasePreProcess(e) { for (let t = 0; t < e.length - 1; t++) for (let n = t + 1; n < e.length; n++) { let r = this.partsMatch(e[t], e[n], !this.preserveMultipleSlashes); if (r) { e[t] = [], e[n] = r; break; } } return e.filter((e) => e.length); } partsMatch(e, t, n = !1) { let r = 0, i = 0, a = [], o = ``; for (; r < e.length && i < t.length;) if (e[r] === t[i]) a.push(o === `b` ? t[i] : e[r]), r++, i++; else if (n && e[r] === `**` && t[i] === e[r + 1]) a.push(e[r]), r++; else if (n && t[i] === `**` && e[r] === t[i + 1]) a.push(t[i]), i++; else if (e[r] === `*` && t[i] && (this.options.dot || !t[i].startsWith(`.`)) && t[i] !== `**`) { if (o === `b`) return !1; o = `a`, a.push(e[r]), r++, i++; } else if (t[i] === `*` && e[r] && (this.options.dot || !e[r].startsWith(`.`)) && e[r] !== `**`) { if (o === `a`) return !1; o = `b`, a.push(t[i]), r++, i++; } else return !1; return e.length === t.length && a; } parseNegate() { if (this.nonegate) return; let e = this.pattern, t = !1, n = 0; for (let r = 0; r < e.length && e.charAt(r) === `!`; r++) t = !t, n++; n && (this.pattern = e.slice(n)), this.negate = t; } matchOne(e, t, n = !1) { let r = 0, i = 0; if (this.isWindows) { let n = typeof e[0] == `string` && /^[a-z]:$/i.test(e[0]), a = !n && e[0] === `` && e[1] === `` && e[2] === `?` && /^[a-z]:$/i.test(e[3]), o = typeof t[0] == `string` && /^[a-z]:$/i.test(t[0]), s = !o && t[0] === `` && t[1] === `` && t[2] === `?` && typeof t[3] == `string` && /^[a-z]:$/i.test(t[3]), c = a ? 3 : n ? 0 : void 0, l = s ? 3 : o ? 0 : void 0; if (typeof c == `number` && typeof l == `number`) { let [n, a] = [e[c], t[l]]; n.toLowerCase() === a.toLowerCase() && (t[l] = n, i = l, r = c); } } let { optimizationLevel: a = 1 } = this.options; return a >= 2 && (e = this.levelTwoFileOptimize(e)), t.includes(Du$1) ? this.#e(e, t, n, r, i) : this.#n(e, t, n, r, i); } #e(e, t, n, r, i) { let a = t.indexOf(Du$1, i), o = t.lastIndexOf(Du$1), [s, c, l] = n ? [ t.slice(i, a), t.slice(a + 1), [] ] : [ t.slice(i, a), t.slice(a + 1, o), t.slice(o + 1) ]; if (s.length) { let t = e.slice(r, r + s.length); if (!this.#n(t, s, n, 0, 0)) return !1; r += s.length, i += s.length; } let u = 0; if (l.length) { if (l.length + r > e.length) return !1; let t = e.length - l.length; if (this.#n(e, l, n, t, 0)) u = l.length; else { if (e[e.length - 1] !== `` || r + l.length === e.length || (t--, !this.#n(e, l, n, t, 0))) return !1; u = l.length + 1; } } if (!c.length) { let t = !!u; for (let n = r; n < e.length - u; n++) { let r = String(e[n]); if (t = !0, r === `.` || r === `..` || !this.options.dot && r.startsWith(`.`)) return !1; } return n || t; } let d = [[[], 0]], f = d[0], p = 0, m = [0]; for (let e of c) e === Du$1 ? (m.push(p), f = [[], 0], d.push(f)) : (f[0].push(e), p++); let h = d.length - 1, g = e.length - u; for (let e of d) e[1] = g - (m[h--] + e[0].length); return !!this.#t(e, d, r, 0, n, 0, !!u); } #t(e, t, n, r, i, a, o) { let s = t[r]; if (!s) { for (let t = n; t < e.length; t++) { o = !0; let n = e[t]; if (n === `.` || n === `..` || !this.options.dot && n.startsWith(`.`)) return !1; } return o; } let [c, l] = s; for (; n <= l;) { if (this.#n(e.slice(0, n + c.length), c, i, n, 0) && a < this.maxGlobstarRecursion) { let s = this.#t(e, t, n + c.length, r + 1, i, a + 1, o); if (s !== !1) return s; } let s = e[n]; if (s === `.` || s === `..` || !this.options.dot && s.startsWith(`.`)) return !1; n++; } return i || null; } #n(e, t, n, r, i) { let a, o, s, c; for (a = r, o = i, c = e.length, s = t.length; a < c && o < s; a++, o++) { this.debug(`matchOne loop`); let n = t[o], r = e[a]; if (this.debug(t, n, r), n === !1 || n === Du$1) return !1; let i; if (typeof n == `string` ? (i = r === n, this.debug(`string match`, n, r, i)) : (i = n.test(r), this.debug(`pattern match`, n, r, i)), !i) return !1; } if (a === c && o === s) return !0; if (a === c) return n; if (o === s) return a === c - 1 && e[a] === ``; throw Error(`wtf?`); } braceExpand() { return ku$1(this.pattern, this.options); } parse(e) { Pl$1(e); let t = this.options; if (e === `**`) return Du$1; if (e === ``) return ``; let n, r = null; (n = e.match(hu$1)) ? r = t.dot ? _u$1 : gu$1 : (n = e.match(au$1)) ? r = (t.nocase ? t.dot ? lu$1 : cu$1 : t.dot ? su$1 : ou$1)(n[1]) : (n = e.match(vu$1)) ? r = (t.nocase ? t.dot ? bu$1 : yu$1 : t.dot ? xu$1 : Su$1)(n) : (n = e.match(uu$1)) ? r = t.dot ? fu$1 : du$1 : (n = e.match(pu$1)) && (r = mu$1); let i = nu$1.fromGlob(e, this.options).toMMPattern(); return r && typeof i == `object` && Reflect.defineProperty(i, "test", { value: r }), i; } makeRe() { if (this.regexp || this.regexp === !1) return this.regexp; let e = this.set; if (!e.length) return this.regexp = !1, this.regexp; let t = this.options, n = t.noglobstar ? `[^/]*?` : t.dot ? `(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?` : `(?:(?!(?:\\/|^)\\.).)*?`, r = new Set(t.nocase ? [`i`] : []), i = e.map((e) => { let t = e.map((e) => { if (e instanceof RegExp) for (let t of e.flags.split(``)) r.add(t); return typeof e == `string` ? ju$1(e) : e === Du$1 ? Du$1 : e._src; }); t.forEach((e, r) => { let i = t[r + 1], a = t[r - 1]; e !== Du$1 || a === Du$1 || (a === void 0 ? i !== void 0 && i !== Du$1 ? t[r + 1] = `(?:\\/|` + n + `\\/)?` + i : t[r] = n : i === void 0 ? t[r - 1] = a + `(?:\\/|\\/` + n + `)?` : i !== Du$1 && (t[r - 1] = a + `(?:\\/|\\/` + n + `\\/)` + i, t[r + 1] = Du$1)); }); let i = t.filter((e) => e !== Du$1); if (this.partial && i.length >= 1) { let e = []; for (let t = 1; t <= i.length; t++) e.push(i.slice(0, t).join(`/`)); return `(?:` + e.join(`|`) + `)`; } return i.join(`/`); }).join(`|`), [a, o] = e.length > 1 ? [`(?:`, `)`] : [``, ``]; i = `^` + a + i + o + `$`, this.partial && (i = `^(?:\\/|` + a + i.slice(1, -1) + o + `)$`), this.negate && (i = `^(?!` + i + `).+$`); try { this.regexp = new RegExp(i, [...r].join(``)); } catch { this.regexp = !1; } return this.regexp; } slashSplit(e) { return this.preserveMultipleSlashes ? e.split(`/`) : this.isWindows && /^\/\/[^/]+/.test(e) ? [``, ...e.split(/\/+/)] : e.split(/\/+/); } match(e, t = this.partial) { if (this.debug(`match`, e, this.pattern), this.comment) return !1; if (this.empty) return e === ``; if (e === `/` && t) return !0; let n = this.options; this.isWindows && (e = e.split(`\\`).join(`/`)); let r = this.slashSplit(e); this.debug(this.pattern, `split`, r); let i = this.set; this.debug(this.pattern, `set`, i); let a = r[r.length - 1]; if (!a) for (let e = r.length - 2; !a && e >= 0; e--) a = r[e]; for (let e of i) { let i = r; if (n.matchBase && e.length === 1 && (i = [a]), this.matchOne(i, e, t)) return n.flipNegate ? !0 : !this.negate; } return n.flipNegate ? !1 : this.negate; } static defaults(e) { return iu$1.defaults(e).Minimatch; } }; iu$1.AST = nu$1, iu$1.Minimatch = Mu$1, iu$1.escape = ru$1, iu$1.unescape = Bl$1; var Nu$1 = c$12(((e, t) => { let n = process || {}, r = n.argv || [], i = n.env || {}, a = !(i.NO_COLOR || r.includes(`--no-color`)) && (!!i.FORCE_COLOR || r.includes(`--color`) || n.platform === `win32` || (n.stdout || {}).isTTY && i.TERM !== `dumb` || !!i.CI), o = (e, t, n = e) => (r) => { let i = `` + r, a = i.indexOf(t, e.length); return ~a ? e + s(i, t, n, a) + t : e + i + t; }, s = (e, t, n, r) => { let i = ``, a = 0; do i += e.substring(a, r) + n, a = r + t.length, r = e.indexOf(t, a); while (~r); return i + e.substring(a); }, c = (e = a) => { let t = e ? o : () => String; return { isColorSupported: e, reset: t(`\x1B[0m`, `\x1B[0m`), bold: t(`\x1B[1m`, `\x1B[22m`, `\x1B[22m\x1B[1m`), dim: t(`\x1B[2m`, `\x1B[22m`, `\x1B[22m\x1B[2m`), italic: t(`\x1B[3m`, `\x1B[23m`), underline: t(`\x1B[4m`, `\x1B[24m`), inverse: t(`\x1B[7m`, `\x1B[27m`), hidden: t(`\x1B[8m`, `\x1B[28m`), strikethrough: t(`\x1B[9m`, `\x1B[29m`), black: t(`\x1B[30m`, `\x1B[39m`), red: t(`\x1B[31m`, `\x1B[39m`), green: t(`\x1B[32m`, `\x1B[39m`), yellow: t(`\x1B[33m`, `\x1B[39m`), blue: t(`\x1B[34m`, `\x1B[39m`), magenta: t(`\x1B[35m`, `\x1B[39m`), cyan: t(`\x1B[36m`, `\x1B[39m`), white: t(`\x1B[37m`, `\x1B[39m`), gray: t(`\x1B[90m`, `\x1B[39m`), bgBlack: t(`\x1B[40m`, `\x1B[49m`), bgRed: t(`\x1B[41m`, `\x1B[49m`), bgGreen: t(`\x1B[42m`, `\x1B[49m`), bgYellow: t(`\x1B[43m`, `\x1B[49m`), bgBlue: t(`\x1B[44m`, `\x1B[49m`), bgMagenta: t(`\x1B[45m`, `\x1B[49m`), bgCyan: t(`\x1B[46m`, `\x1B[49m`), bgWhite: t(`\x1B[47m`, `\x1B[49m`), blackBright: t(`\x1B[90m`, `\x1B[39m`), redBright: t(`\x1B[91m`, `\x1B[39m`), greenBright: t(`\x1B[92m`, `\x1B[39m`), yellowBright: t(`\x1B[93m`, `\x1B[39m`), blueBright: t(`\x1B[94m`, `\x1B[39m`), magentaBright: t(`\x1B[95m`, `\x1B[39m`), cyanBright: t(`\x1B[96m`, `\x1B[39m`), whiteBright: t(`\x1B[97m`, `\x1B[39m`), bgBlackBright: t(`\x1B[100m`, `\x1B[49m`), bgRedBright: t(`\x1B[101m`, `\x1B[49m`), bgGreenBright: t(`\x1B[102m`, `\x1B[49m`), bgYellowBright: t(`\x1B[103m`, `\x1B[49m`), bgBlueBright: t(`\x1B[104m`, `\x1B[49m`), bgMagentaBright: t(`\x1B[105m`, `\x1B[49m`), bgCyanBright: t(`\x1B[106m`, `\x1B[49m`), bgWhiteBright: t(`\x1B[107m`, `\x1B[49m`) }; }; t.exports = c(), t.exports.createColors = c; })); var Pu$1 = c$12(((e, t) => { var n = Object.defineProperty, r = Object.getOwnPropertyDescriptor, i = Object.getOwnPropertyNames, a = Object.prototype.hasOwnProperty, o = (e, t) => { for (var r in t) n(e, r, { get: t[r], enumerable: !0 }); }, s = (e, t, o, s) => { if (t && typeof t == `object` || typeof t == `function`) for (let c of i(t)) !a.call(e, c) && c !== o && n(e, c, { get: () => t[c], enumerable: !(s = r(t, c)) || s.enumerable }); return e; }, c = (e) => s(n({}, `__esModule`, { value: !0 }), e), l = {}; o(l, { SYMBOL_FOR_REQ_CONTEXT: () => u, getContext: () => d }), t.exports = c(l); let u = Symbol.for(`@vercel/request-context`); function d() { return globalThis[u]?.get?.() ?? {}; } })); var Fu$1 = c$12(((e, t) => { var n = Object.defineProperty, r = Object.getOwnPropertyDescriptor, i = Object.getOwnPropertyNames, a = Object.prototype.hasOwnProperty, o = (e, t) => { for (var r in t) n(e, r, { get: t[r], enumerable: !0 }); }, s = (e, t, o, s) => { if (t && typeof t == `object` || typeof t == `function`) for (let c of i(t)) !a.call(e, c) && c !== o && n(e, c, { get: () => t[c], enumerable: !(s = r(t, c)) || s.enumerable }); return e; }, c = (e) => s(n({}, `__esModule`, { value: !0 }), e), l = {}; o(l, { getVercelOidcTokenSync: () => d }), t.exports = c(l); var u = Pu$1(); function d() { let e = (0, u.getContext)().headers?.[`x-vercel-oidc-token`] ?? process.env.VERCEL_OIDC_TOKEN; if (!e) throw Error(`The 'x-vercel-oidc-token' header is missing from the request.`); return e; } })); var Iu$1 = c$12(((e, t) => { var n = Object.defineProperty, r = Object.getOwnPropertyDescriptor, i = Object.getOwnPropertyNames, a = Object.prototype.hasOwnProperty, o = (e, t) => { for (var r in t) n(e, r, { get: t[r], enumerable: !0 }); }, s = (e, t, o, s) => { if (t && typeof t == `object` || typeof t == `function`) for (let c of i(t)) !a.call(e, c) && c !== o && n(e, c, { get: () => t[c], enumerable: !(s = r(t, c)) || s.enumerable }); return e; }, c = (e) => s(n({}, `__esModule`, { value: !0 }), e), l = {}; o(l, { VercelOidcTokenError: () => u }), t.exports = c(l); var u = class extends Error { constructor(e, t) { super(e), this.name = `VercelOidcTokenError`, this.cause = t; } toString() { return this.cause ? `${this.name}: ${this.message}: ${this.cause}` : `${this.name}: ${this.message}`; } }; })); var Lu$1 = c$12(((t, n) => { var r = Object.defineProperty, i = Object.getOwnPropertyDescriptor, a = Object.getOwnPropertyNames, o = Object.prototype.hasOwnProperty, s = (e, t) => { for (var n in t) r(e, n, { get: t[n], enumerable: !0 }); }, c = (e, t, n, s) => { if (t && typeof t == `object` || typeof t == `function`) for (let c of a(t)) !o.call(e, c) && c !== n && r(e, c, { get: () => t[c], enumerable: !(s = i(t, c)) || s.enumerable }); return e; }, l = (e) => c(r({}, `__esModule`, { value: !0 }), e), u = {}; s(u, { getVercelOidcToken: () => p }), n.exports = l(u); var d = Fu$1(), f = Iu$1(); async function p(t) { let n = ``, r; try { n = (0, d.getVercelOidcTokenSync)(); } catch (e) { r = e; } try { let [{ getTokenPayload: r, isExpired: i }, { refreshToken: a }] = await Promise.all([await Promise.resolve().then(() => d$13(Hu$1())), await Promise.resolve().then(() => token_Bm_WLAUB_exports).then((t) => d$13(t.default))]); (!n || i(r(n), t?.expirationBufferMs)) && (await a(t), n = (0, d.getVercelOidcTokenSync)()); } catch (e) { let t = r instanceof Error ? r.message : ``; throw e instanceof Error && (t = `${t} ${e.message}`), t ? new f.VercelOidcTokenError(t) : e; } return n; } })); var Ru$1 = c$12(((e, t) => { var n = Object.defineProperty, r = Object.getOwnPropertyDescriptor, i = Object.getOwnPropertyNames, a = Object.prototype.hasOwnProperty, o = (e, t) => { for (var r in t) n(e, r, { get: t[r], enumerable: !0 }); }, s = (e, t, o, s) => { if (t && typeof t == `object` || typeof t == `function`) for (let c of i(t)) !a.call(e, c) && c !== o && n(e, c, { get: () => t[c], enumerable: !(s = r(t, c)) || s.enumerable }); return e; }, c = (e) => s(n({}, `__esModule`, { value: !0 }), e), l = {}; o(l, { AccessTokenMissingError: () => u, RefreshAccessTokenFailedError: () => d }), t.exports = c(l); var u = class extends Error { constructor() { super(`No authentication found. Please log in with the Vercel CLI (vercel login).`), this.name = `AccessTokenMissingError`; } }, d = class extends Error { constructor(e) { super(`Failed to refresh authentication token.`, { cause: e }), this.name = `RefreshAccessTokenFailedError`; } }; })); var zu$1 = c$12(((e, n) => { var r = Object.create, i = Object.defineProperty, a = Object.getOwnPropertyDescriptor, o = Object.getOwnPropertyNames, s = Object.getPrototypeOf, c = Object.prototype.hasOwnProperty, l = (e, t) => { for (var n in t) i(e, n, { get: t[n], enumerable: !0 }); }, u = (e, t, n, r) => { if (t && typeof t == `object` || typeof t == `function`) for (let s of o(t)) !c.call(e, s) && s !== n && i(e, s, { get: () => t[s], enumerable: !(r = a(t, s)) || r.enumerable }); return e; }, d = (e, t, n) => (n = e == null ? {} : r(s(e)), u(t || !e || !e.__esModule ? i(n, `default`, { value: e, enumerable: !0 }) : n, e)), f = (e) => u(i({}, `__esModule`, { value: !0 }), e), p = {}; l(p, { findRootDir: () => v, getUserDataDir: () => y }), n.exports = f(p); var m = d(f$11(`path`)), h = d(f$11(`fs`)), g = d(f$11(`os`)), _ = Iu$1(); function v() { try { let e = process.cwd(); for (; e !== m.default.dirname(e);) { let t = m.default.join(e, `.vercel`); if (h.default.existsSync(t)) return e; e = m.default.dirname(e); } } catch { throw new _.VercelOidcTokenError(`Token refresh only supported in node server environments`); } return null; } function y() { if (process.env.XDG_DATA_HOME) return process.env.XDG_DATA_HOME; switch (g.default.platform()) { case `darwin`: return m.default.join(g.default.homedir(), `Library/Application Support`); case `linux`: return m.default.join(g.default.homedir(), `.local/share`); case `win32`: return process.env.LOCALAPPDATA ? process.env.LOCALAPPDATA : null; default: return null; } } })); var Bu$1 = c$12(((e, n) => { var r = Object.create, i = Object.defineProperty, a = Object.getOwnPropertyDescriptor, o = Object.getOwnPropertyNames, s = Object.getPrototypeOf, c = Object.prototype.hasOwnProperty, l = (e, t) => { for (var n in t) i(e, n, { get: t[n], enumerable: !0 }); }, u = (e, t, n, r) => { if (t && typeof t == `object` || typeof t == `function`) for (let s of o(t)) !c.call(e, s) && s !== n && i(e, s, { get: () => t[s], enumerable: !(r = a(t, s)) || r.enumerable }); return e; }, d = (e, t, n) => (n = e == null ? {} : r(s(e)), u(t || !e || !e.__esModule ? i(n, `default`, { value: e, enumerable: !0 }) : n, e)), f = (e) => u(i({}, `__esModule`, { value: !0 }), e), p = {}; l(p, { isValidAccessToken: () => b, readAuthConfig: () => v, writeAuthConfig: () => y }), n.exports = f(p); var m = d(f$11(`fs`)), h = d(f$11(`path`)), g = Hu$1(); function _() { let e = (0, g.getVercelDataDir)(); if (!e) throw Error(`Unable to find Vercel CLI data directory. Your platform: ${process.platform}. Supported: darwin, linux, win32.`); return h.join(e, `auth.json`); } function v() { try { let e = _(); if (!m.existsSync(e)) return null; let t = m.readFileSync(e, `utf8`); return t ? JSON.parse(t) : null; } catch { return null; } } function y(e) { let t = _(), n = h.dirname(t); m.existsSync(n) || m.mkdirSync(n, { mode: 504, recursive: !0 }), m.writeFileSync(t, JSON.stringify(e, null, 2), { mode: 384 }); } function b(e, t = 0) { if (!e.token) return !1; if (typeof e.expiresAt != `number`) return !0; let n = Math.floor(Date.now() / 1e3), r = t / 1e3; return e.expiresAt >= n + r; } })); var Vu$1 = c$12(((e, n) => { var r = Object.defineProperty, i = Object.getOwnPropertyDescriptor, a = Object.getOwnPropertyNames, o = Object.prototype.hasOwnProperty, s = (e, t) => { for (var n in t) r(e, n, { get: t[n], enumerable: !0 }); }, c = (e, t, n, s) => { if (t && typeof t == `object` || typeof t == `function`) for (let c of a(t)) !o.call(e, c) && c !== n && r(e, c, { get: () => t[c], enumerable: !(s = i(t, c)) || s.enumerable }); return e; }, l = (e) => c(r({}, `__esModule`, { value: !0 }), e), u = {}; s(u, { processTokenResponse: () => g, refreshTokenRequest: () => h }), n.exports = l(u); var d = f$11(`os`); let f = `@vercel/oidc node-${process.version} ${(0, d.platform)()} (${(0, d.arch)()}) ${(0, d.hostname)()}`, p = null; async function m() { if (p) return p; let e = await fetch(`https://vercel.com/.well-known/openid-configuration`, { headers: { "user-agent": f } }); if (!e.ok) throw Error(`Failed to discover OAuth endpoints`); let t = await e.json(); if (!t || typeof t.token_endpoint != `string`) throw Error(`Invalid OAuth discovery response`); let n = t.token_endpoint; return p = n, n; } async function h(e) { let t = await m(); return await fetch(t, { method: `POST`, headers: { "Content-Type": `application/x-www-form-urlencoded`, "user-agent": f }, body: new URLSearchParams({ client_id: `cl_HYyOPBNtFMfHhaUn9L4QPfTZz6TP47bp`, grant_type: `refresh_token`, ...e }) }); } async function g(e) { let t = await e.json(); if (!e.ok) { let e = typeof t == `object` && t && `error` in t ? String(t.error) : `Token refresh failed`; return [Error(e)]; } return typeof t != `object` || !t ? [Error(`Invalid token response`)] : typeof t.access_token == `string` ? t.token_type === `Bearer` ? typeof t.expires_in == `number` ? [null, t] : [Error(`Missing expires_in in response`)] : [Error(`Invalid token_type in response`)] : [Error(`Missing access_token in response`)]; } })); var Hu$1 = c$12(((e, n) => { var r = Object.create, i = Object.defineProperty, a = Object.getOwnPropertyDescriptor, o = Object.getOwnPropertyNames, s = Object.getPrototypeOf, c = Object.prototype.hasOwnProperty, l = (e, t) => { for (var n in t) i(e, n, { get: t[n], enumerable: !0 }); }, u = (e, t, n, r) => { if (t && typeof t == `object` || typeof t == `function`) for (let s of o(t)) !c.call(e, s) && s !== n && i(e, s, { get: () => t[s], enumerable: !(r = a(t, s)) || r.enumerable }); return e; }, d = (e, t, n) => (n = e == null ? {} : r(s(e)), u(t || !e || !e.__esModule ? i(n, `default`, { value: e, enumerable: !0 }) : n, e)), f = (e) => u(i({}, `__esModule`, { value: !0 }), e), p = {}; l(p, { assertVercelOidcTokenResponse: () => w, findProjectInfo: () => T, getTokenPayload: () => O, getVercelDataDir: () => x, getVercelOidcToken: () => C, getVercelToken: () => S, isExpired: () => k, loadToken: () => D, saveToken: () => E }), n.exports = f(p); var m = d(f$11(`path`)), h = d(f$11(`fs`)), g = Iu$1(), _ = zu$1(), v = Bu$1(), y = Vu$1(), b = Ru$1(); function x() { let e = (0, _.getUserDataDir)(); return e ? m.join(e, `com.vercel.cli`) : null; } async function S(e) { let t = (0, v.readAuthConfig)(); if (!t?.token) throw new b.AccessTokenMissingError(); if ((0, v.isValidAccessToken)(t, e?.expirationBufferMs)) return t.token; if (!t.refreshToken) throw (0, v.writeAuthConfig)({}), new b.RefreshAccessTokenFailedError(`No refresh token available`); try { let e = await (0, y.refreshTokenRequest)({ refresh_token: t.refreshToken }), [n, r] = await (0, y.processTokenResponse)(e); if (n || !r) throw (0, v.writeAuthConfig)({}), new b.RefreshAccessTokenFailedError(n); let i = { token: r.access_token, expiresAt: Math.floor(Date.now() / 1e3) + r.expires_in }; return r.refresh_token && (i.refreshToken = r.refresh_token), (0, v.writeAuthConfig)(i), i.token; } catch (e) { throw (0, v.writeAuthConfig)({}), e instanceof b.AccessTokenMissingError || e instanceof b.RefreshAccessTokenFailedError ? e : new b.RefreshAccessTokenFailedError(e); } } async function C(e, t, n) { let r = `https://api.vercel.com/v1/projects/${t}/token?source=vercel-oidc-refresh${n ? `&teamId=${n}` : ``}`, i = await fetch(r, { method: `POST`, headers: { Authorization: `Bearer ${e}` } }); if (!i.ok) throw new g.VercelOidcTokenError(`Failed to refresh OIDC token: ${i.statusText}`); let a = await i.json(); return w(a), a; } function w(e) { if (!e || typeof e != `object`) throw TypeError("Vercel OIDC token is malformed. Expected an object. Please run `vc env pull` and try again"); if (!(`token` in e) || typeof e.token != `string`) throw TypeError("Vercel OIDC token is malformed. Expected a string-valued token property. Please run `vc env pull` and try again"); } function T() { let e = (0, _.findRootDir)(); if (!e) throw new g.VercelOidcTokenError("Unable to find project root directory. Have you linked your project with `vc link?`"); let t = m.join(e, `.vercel`, `project.json`); if (!h.existsSync(t)) throw new g.VercelOidcTokenError("project.json not found, have you linked your project with `vc link?`"); let n = JSON.parse(h.readFileSync(t, `utf8`)); if (typeof n.projectId != `string` && typeof n.orgId != `string`) throw TypeError("Expected a string-valued projectId property. Try running `vc link` to re-link your project."); return { projectId: n.projectId, teamId: n.orgId }; } function E(e, t) { let n = (0, _.getUserDataDir)(); if (!n) throw new g.VercelOidcTokenError(`Unable to find user data directory. Please reach out to Vercel support.`); let r = m.join(n, `com.vercel.token`, `${t}.json`), i = JSON.stringify(e); h.mkdirSync(m.dirname(r), { mode: 504, recursive: !0 }), h.writeFileSync(r, i), h.chmodSync(r, 432); } function D(e) { let t = (0, _.getUserDataDir)(); if (!t) throw new g.VercelOidcTokenError(`Unable to find user data directory. Please reach out to Vercel support.`); let n = m.join(t, `com.vercel.token`, `${e}.json`); if (!h.existsSync(n)) return null; let r = JSON.parse(h.readFileSync(n, `utf8`)); return w(r), r; } function O(e) { let t = e.split(`.`); if (t.length !== 3) throw new g.VercelOidcTokenError("Invalid token. Please run `vc env pull` and try again"); let n = t[1].replace(/-/g, `+`).replace(/_/g, `/`), r = n.padEnd(n.length + (4 - n.length % 4) % 4, `=`); return JSON.parse(Buffer.from(r, `base64`).toString(`utf8`)); } function k(e, t = 0) { return e.exp * 1e3 < Date.now() + t; } })); var Uu$1 = c$12(((e, t) => { var n = Object.defineProperty, r = Object.getOwnPropertyDescriptor, i = Object.getOwnPropertyNames, a = Object.prototype.hasOwnProperty, o = (e, t) => { for (var r in t) n(e, r, { get: t[r], enumerable: !0 }); }, s = (e, t, o, s) => { if (t && typeof t == `object` || typeof t == `function`) for (let c of i(t)) !a.call(e, c) && c !== o && n(e, c, { get: () => t[c], enumerable: !(s = r(t, c)) || s.enumerable }); return e; }, c = (e) => s(n({}, `__esModule`, { value: !0 }), e), l = {}; o(l, { AccessTokenMissingError: () => p.AccessTokenMissingError, RefreshAccessTokenFailedError: () => p.RefreshAccessTokenFailedError, getContext: () => f.getContext, getVercelOidcToken: () => u.getVercelOidcToken, getVercelOidcTokenSync: () => d.getVercelOidcTokenSync, getVercelToken: () => m.getVercelToken }), t.exports = c(l); var u = Lu$1(), d = Fu$1(), f = Pu$1(), p = Ru$1(), m = Hu$1(); })); var Wu$1 = d$13(Nu$1(), 1); var Gu$1 = Uu$1(); async function Ku$1(e) { let t = 0, n = e.getReader(), r = []; try { for (;;) { let { done: e, value: i } = await n.read(); if (e) break; r.push(i), t += i.length; } } finally { n.releaseLock(); } return Buffer.concat(r, t); } var qu$1 = class { contentType = `application/json`; replacer; reviver; constructor(e = {}) { this.replacer = e.replacer, this.reviver = e.reviver; } serialize(e) { return Buffer.from(JSON.stringify(e, this.replacer), `utf8`); } async deserialize(e) { let t = await Ku$1(e); return JSON.parse(t.toString(`utf8`), this.reviver); } }; var Ju$1 = class extends Error { constructor(e) { super(`Message ${e} not found`), this.name = `MessageNotFoundError`; } }; var Yu$1 = class extends Error { constructor(e, t) { super(`Message ${e} not available for processing${t ? `: ${t}` : ``}`), this.name = `MessageNotAvailableError`; } }; var Xu$1 = class extends Error { constructor(e, t) { super(`Message ${e} is corrupted: ${t}`), this.name = `MessageCorruptedError`; } }; var Zu$1 = class extends Error { retryAfter; constructor(e = `Too many requests`, t) { super(e), this.name = `TooManyRequestsError`, this.retryAfter = t; } }; var Qu$1 = class extends Error { constructor(e = `Missing or invalid authentication token`) { super(e), this.name = `UnauthorizedError`; } }; var $u$1 = class extends Error { constructor(e = `Queue environment doesn't match token environment`) { super(e), this.name = `ForbiddenError`; } }; var ed$1 = class extends Error { constructor(e) { super(e), this.name = `BadRequestError`; } }; var td$1 = class extends Error { constructor(e = `Unexpected server error`) { super(e), this.name = `InternalServerError`; } }; var nd$1 = class extends Error { constructor(e, t = 1, n = 10) { super(`Invalid limit: ${e}. Limit must be between ${t} and ${n}.`), this.name = `InvalidLimitError`; } }; var rd$1 = class extends Error { constructor(e) { super(`Message ${e} has already been processed`), this.name = `MessageAlreadyProcessedError`; } }; var id$1 = class extends Error { idempotencyKey; constructor(e, t) { super(e), this.name = `DuplicateMessageError`, this.idempotencyKey = t; } }; var ad$1 = class extends Error { deploymentId; constructor(e, t) { super(e), this.name = `ConsumerDiscoveryError`, this.deploymentId = t; } }; var od$1 = class extends Error { constructor(e = `Consumer registry not configured`) { super(e), this.name = `ConsumerRegistryNotConfiguredError`; } }; var sd$1 = 300; var cd$1 = 30; var ld$1 = 60; var ud$1 = 10; var dd$1 = 3e3; var fd$1 = 3; var pd$1 = 250; function md$1(e) { return Math.min(ld$1, Math.max(ud$1, e / 5)); } var hd$1 = class { client; topicName; consumerGroupName; visibilityTimeout; constructor(e, t, n, r = {}) { this.client = e, this.topicName = t, this.consumerGroupName = n, this.visibilityTimeout = Math.max(cd$1, r.visibilityTimeoutSeconds ?? sd$1); } isClientError(e) { return e instanceof Yu$1 || e instanceof Ju$1 || e instanceof ed$1 || e instanceof Qu$1 || e instanceof $u$1; } isNetworkError(e) { return e instanceof TypeError; } async directiveCallWithRetries(e) { let t; for (let n = 1; n <= fd$1; n++) try { return await e(); } catch (e) { if (t = e, n === fd$1) throw e; if (e instanceof Zu$1) { if (e.retryAfter === void 0) throw e; await new Promise((t) => setTimeout(t, e.retryAfter * 1e3)); continue; } if (!this.isNetworkError(e)) throw e; let r = pd$1 * n, i = r / 2 + r / 2 * Math.random(); await new Promise((e) => setTimeout(e, i)); } throw t; } startVisibilityExtension(e, t) { let n = !0, r = !1, i, a = null, o = md$1(this.visibilityTimeout) * 1e3, s = o; if (t?.visibilityDeadline) { let e = t.visibilityDeadline.getTime() - Date.now(); s = e > 0 ? md$1(e / 1e3) * 1e3 : 0; } let c = new Promise((e) => { i = e; }), l = () => { r || (r = !0, i()); }, u = async () => { if (!n) { l(); return; } try { await this.client.changeVisibility({ queueName: this.topicName, consumerGroup: this.consumerGroupName, receiptHandle: e, visibilityTimeoutSeconds: this.visibilityTimeout }), n ? a = setTimeout(() => u(), o) : l(); } catch (t) { if (this.isClientError(t)) { console.error(`Visibility extension failed with client error for receipt handle ${e} (stopping retries):`, t), l(); return; } console.error(`Failed to extend visibility for receipt handle ${e} (will retry in ${dd$1 / 1e3}s):`, t), n ? a = setTimeout(() => u(), dd$1) : l(); } }; return a = setTimeout(() => u(), s), async (e = !1) => { n = !1, a &&= (clearTimeout(a), null), e ? await c : l(); }; } async finalizePayload(e) { let t = this.client.getTransport(); if (t.finalize && e != null) try { await t.finalize(e); } catch (e) { console.warn(`Failed to finalize message payload:`, e); } } async processMessage(e, t, n) { let r = this.startVisibilityExtension(e.receiptHandle, n), i = { messageId: e.messageId, deliveryCount: e.deliveryCount, createdAt: e.createdAt, expiresAt: e.expiresAt ?? new Date(e.createdAt.getTime() + 864e5), topicName: this.topicName, consumerGroup: this.consumerGroupName, region: this.client.getRegion() }; try { await t(e.payload, i), await r(), await this.client.acknowledgeMessage({ queueName: this.topicName, consumerGroup: this.consumerGroupName, receiptHandle: e.receiptHandle }); } catch (t) { if (await r(), n?.retry) { let r; try { r = n.retry(t, i); } catch (e) { console.warn(`retry handler threw:`, e); } if (r) { if (`acknowledge` in r && r.acknowledge) { try { await this.directiveCallWithRetries(() => this.client.acknowledgeMessage({ queueName: this.topicName, consumerGroup: this.consumerGroupName, receiptHandle: e.receiptHandle })); } catch (e) { console.warn(`Failed to acknowledge message:`, e); } await this.finalizePayload(e.payload); return; } if (`afterSeconds` in r && typeof r.afterSeconds == `number`) { try { await this.directiveCallWithRetries(() => this.client.changeVisibility({ queueName: this.topicName, consumerGroup: this.consumerGroupName, receiptHandle: e.receiptHandle, visibilityTimeoutSeconds: r.afterSeconds })); } catch (e) { console.warn(`Failed to reschedule message for retry:`, e); } await this.finalizePayload(e.payload); return; } } } throw await this.finalizePayload(e.payload), t; } } async consumeMessage(e, t, n) { await this.processMessage(t, e, n); } async consume(e, t) { let n = t?.retry; if (t && `messageId` in t) { let r = await this.client.receiveMessageById({ queueName: this.topicName, consumerGroup: this.consumerGroupName, messageId: t.messageId, visibilityTimeoutSeconds: this.visibilityTimeout }); return await this.processMessage(r.message, e, { retry: n }), 1; } else { let r = t && `limit` in t ? t.limit : 1, i = 0; for await (let t of this.client.receiveMessages({ queueName: this.topicName, consumerGroup: this.consumerGroupName, visibilityTimeoutSeconds: this.visibilityTimeout, limit: r })) i++, await this.processMessage(t, e, { retry: n }); return i; } } get name() { return this.consumerGroupName; } get topic() { return this.topicName; } }; var gd$1 = class { client; topicName; constructor(e, t) { this.client = e, this.topicName = t; } async publish(e, t) { let n = await this.client.sendMessage({ queueName: this.topicName, payload: e, idempotencyKey: t?.idempotencyKey, retentionSeconds: t?.retentionSeconds, delaySeconds: t?.delaySeconds, headers: t?.headers }); return n.messageId && jd() && vf(this.topicName, n.messageId, this.client.getRegion(), t?.delaySeconds, t?.retentionSeconds), { messageId: n.messageId }; } consumerGroup(e, t) { return new hd$1(this.client, this.topicName, e, t); } get name() { return this.topicName; } }; var _d$1 = `com.vercel.queue.v1beta`; var vd$1 = `com.vercel.queue.v2beta`; function yd$1(e, t) { let n = t.slice(0, -1); return e.startsWith(n); } function bd$1(e) { return typeof e == `object` && !!e; } function xd$1(e, t) { if (!t || !t.includes(`application/cloudevents+json`)) throw Error(`Invalid content type: expected 'application/cloudevents+json'`); if (!bd$1(e) || !e.type || !e.source || !e.id || !bd$1(e.data)) throw Error(`Invalid CloudEvent: missing required fields`); if (e.type !== `com.vercel.queue.v1beta`) throw Error(`Invalid CloudEvent type: expected '${_d$1}', got '${String(e.type)}'`); let { data: n } = e, r = []; if (`queueName` in n || r.push(`queueName`), `consumerGroup` in n || r.push(`consumerGroup`), `messageId` in n || r.push(`messageId`), r.length > 0) throw Error(`Missing required CloudEvent data fields: ${r.join(`, `)}`); return { queueName: String(n.queueName), consumerGroup: String(n.consumerGroup), messageId: String(n.messageId) }; } function Sd$1(e, t) { if (e instanceof Headers) return e.get(t); let n = e[t]; return Array.isArray(n) ? n[0] ?? null : n ?? null; } function Cd$1(e) { let t = Sd$1(e, `ce-type`); if (t !== `com.vercel.queue.v2beta`) throw Error(`Invalid CloudEvent type: expected '${vd$1}', got '${t}'`); let n = Sd$1(e, `ce-vqsqueuename`), r = Sd$1(e, `ce-vqsconsumergroup`), i = Sd$1(e, `ce-vqsmessageid`), a = []; if (n || a.push(`ce-vqsqueuename`), r || a.push(`ce-vqsconsumergroup`), i || a.push(`ce-vqsmessageid`), a.length > 0) throw Error(`Missing required CloudEvent headers: ${a.join(`, `)}`); let o = Sd$1(e, `ce-vqsregion`) ?? void 0; if (o !== void 0 && !/^[a-z]{2,5}[0-9]{1,2}$/.test(o)) throw Error(`Invalid ce-vqsregion header: ${JSON.stringify(o)}. Region must match /^[a-z]{2,5}[0-9]{1,2}$/ (e.g. "iad1", "lhr1").`); let s = { queueName: n, consumerGroup: r, messageId: i, region: o }, c = Sd$1(e, `ce-vqsreceipthandle`); if (!c) return s; let l = { ...s, receiptHandle: c }, u = Sd$1(e, `ce-vqsdeliverycount`); u && (l.deliveryCount = parseInt(u, 10)); let d = Sd$1(e, `ce-vqscreatedat`); d && (l.createdAt = d); let f = Sd$1(e, `ce-vqsexpiresat`); f && (l.expiresAt = f); let p = Sd$1(e, `content-type`); p && (l.contentType = p); let m = Sd$1(e, `ce-vqsvisibilitydeadline`); return m && (l.visibilityDeadline = m), l; } function wd$1(e, t) { if (Sd$1(t, `ce-type`) === `com.vercel.queue.v2beta`) { let n = Cd$1(t); return `receiptHandle` in n && (n.parsedPayload = e), n; } return xd$1(e, Sd$1(t, `content-type`)); } async function Td$1(e) { if (e.headers.get(`ce-type`) === `com.vercel.queue.v2beta`) { let t = Cd$1(e.headers); return `receiptHandle` in t && e.body && (t.rawBody = e.body), t; } let t; try { t = await e.json(); } catch { throw Error(`Failed to parse CloudEvent from request body`); } let n = {}; return e.headers.forEach((e, t) => { n[t] = e; }), wd$1(t, n); } async function Ed$1(e, t, n) { let { queueName: r, consumerGroup: i, messageId: a } = t; if (!n?.client) throw Error(`HandleCallbackOptions.client is required`); let o = If(n.client); t.region && (o = o.withRegion(t.region)); let s = new gd$1(o, r).consumerGroup(i, n?.visibilityTimeoutSeconds === void 0 ? void 0 : { visibilityTimeoutSeconds: n.visibilityTimeoutSeconds }); if (`receiptHandle` in t) { let r = o.getTransport(), i; if (t.rawBody) i = await r.deserialize(t.rawBody); else if (t.parsedPayload !== void 0) i = t.parsedPayload; else throw Error(`Binary mode callback with receipt handle is missing payload`); let c = { messageId: a, payload: i, deliveryCount: t.deliveryCount ?? 1, createdAt: t.createdAt ? new Date(t.createdAt) : /* @__PURE__ */ new Date(), expiresAt: t.expiresAt ? new Date(t.expiresAt) : void 0, contentType: t.contentType ?? r.contentType, receiptHandle: t.receiptHandle }, l = t.visibilityDeadline ? new Date(t.visibilityDeadline) : void 0; await s.consumeMessage(e, c, { visibilityDeadline: l, retry: n?.retry }); } else await s.consume(e, { messageId: a, retry: n?.retry }); } var Dd = Wu$1.default.cyan(`[queue]`); var Od = Wu$1.default.green(`✓`); var kd = Wu$1.default.red(`✗`); var Ad = Wu$1.default.yellow(`↻`); function jd() { return process.env.NODE_ENV === `development`; } var Md = Symbol.for(`@vercel/queue.devRouteMappings`); function Nd(e) { let t = ``; for (let n of e) n === `_` ? t += `__` : n === `/` ? t += `_S` : n === `.` ? t += `_D` : /[A-Za-z0-9-]/.test(n) ? t += n : t += `_` + n.charCodeAt(0).toString(16).toUpperCase().padStart(2, `0`); return t; } function Pd() { let e = globalThis; if (Md in e) return e[Md] ?? null; try { let t = lr$3.join(process.cwd(), `vercel.json`); if (!ur$3.existsSync(t)) return e[Md] = null, null; let n = JSON.parse(ur$3.readFileSync(t, `utf-8`)); if (!n.functions) return e[Md] = null, null; let r = []; for (let [e, t] of Object.entries(n.functions)) if (t.experimentalTriggers) { for (let n of t.experimentalTriggers) if (!(!n.type?.startsWith(`queue/`) || !n.topic)) { if (n.type !== `queue/v2beta`) { console.warn(`${Dd} Unsupported trigger type "${n.type}" for topic "${n.topic}" in ${e}. Use "queue/v2beta" instead.`); continue; } r.push({ filePath: e, topic: n.topic, consumer: Nd(e), retryAfterSeconds: n.retryAfterSeconds }); } } return e[Md] = r.length > 0 ? r : null, e[Md]; } catch (t) { return console.warn(`${Dd} Failed to read vercel.json:`, t), e[Md] = null, null; } } function Fd(e) { let t = Pd(); return t ? t.filter((t) => t.topic.includes(`*`) ? yd$1(e, t.topic) : t.topic === e) : []; } function Id(e, t) { return Fd(e).find((e) => e.consumer === t)?.retryAfterSeconds; } function Ld(e) { return /^src\/(app|pages|server)\//.test(e) ? e.slice(4) : null; } function Rd(e, t) { return e === t || iu$1(e, t); } function zd(e) { let t = Pd(); if (!t) return []; let n = process.cwd(), r; try { r = lr$3.relative(n, e); } catch { return []; } let i = r.replace(/\\/g, `/`), a = Ld(i); return t.filter((e) => Rd(i, e.filePath) || a !== null && Rd(a, e.filePath)); } function Bd(e) { let t = e.match(/\((.+?):\d+:\d+\)/); if (t ||= e.match(/at\s+(.+?):\d+:\d+/), !t) return null; let n = t[1].trim(); if (n === `native` || n.startsWith(`node:`) || n.startsWith(`internal`)) return null; if (n.startsWith(`file://`)) try { n = new URL(n).pathname; } catch { return null; } return /^[a-zA-Z][a-zA-Z0-9+.-]*:\/\//.test(n) ? null : (n.startsWith(`./`) && (n = n.slice(2)), n); } var Vd; function Hd() { if (Vd) return Vd; try { let e = typeof __dirname < `u` ? __dirname : lr$3.dirname(new URL(import.meta.url).pathname); Vd = lr$3.resolve(e, `..`); } catch { Vd = ``; } return Vd; } function Ud() { let e = Error().stack; if (!e) return null; let t = e.split(` `).slice(1), n = Hd(); for (let e of t) { let t = Bd(e); if (!t) continue; let r = lr$3.isAbsolute(t) ? t : lr$3.resolve(process.cwd(), t), i; try { i = ur$3.realpathSync(r); } catch { i = r; } if (!(n && i.startsWith(n))) return i; } return null; } var Wd = Symbol.for(`@vercel/queue.devHandlerRegistry`); function Gd() { let e = globalThis; return e[Wd] || (e[Wd] = /* @__PURE__ */ new Map()), e[Wd]; } function Kd(e, t, n, r) { let i = zd(lr$3.isAbsolute(e) ? e : lr$3.resolve(process.cwd(), e)); if (i.length === 0) return !1; let a = Gd(); for (let e of i) { let i = e.topic, o = a.get(i) ?? [], s = { consumerGroup: e.consumer, handler: t, client: n, options: r }, c = o.findIndex((t) => t.consumerGroup === e.consumer); c >= 0 ? o[c] = s : o.push(s), a.set(i, o); } return !0; } function qd(e, t, n, r) { let i = r ?? Ud(); if (!i) { console.warn(`${Dd} Could not determine caller file path for handler registration.`); return; } if (!Kd(i, e, t, n)) { let e = Pd(); if (e && e.length > 0) return; let t = process.cwd(), n; try { n = lr$3.relative(t, i).replace(/\\/g, `/`); } catch { n = i; } console.warn(`${Dd} handleCallback() in ${n} has no matching experimentalTriggers in vercel.json. This handler won't receive messages. Add a trigger to vercel.json: "${n}": { "experimentalTriggers": [{ "type": "queue/v2beta", "topic": "your-topic" }] }`); } } function Jd(e) { let t = Gd(), n = []; for (let [r, i] of t) (r.includes(`*`) ? yd$1(e, r) : r === e) && n.push(...i); return n; } var Yd = 50; var Xd = 5e3; var Zd = 2; var Qd = 250; var $d = [ `PORT`, `NEXT_PORT`, `NEXTJS_PORT`, `NUXT_PORT`, `NITRO_PORT`, `SVELTEKIT_PORT`, `VITE_PORT`, `DEV_PORT`, `npm_config_port` ]; var ef = [ `__NEXT_PRIVATE_ORIGIN`, `NUXT_PUBLIC_SITE_URL`, `URL` ]; function tf(e) { return e instanceof Error ? e.message : String(e); } function nf(e) { return e instanceof Ju$1 || e instanceof Error && e.name === `MessageNotFoundError`; } function rf(e) { if (!e) return null; let t = Number.parseInt(e, 10); return !Number.isFinite(t) || t < 1 || t > 65535 ? null : t; } function af(e) { if (!e) return null; try { let t = new URL(e).port; return rf(t); } catch { return null; } } function of() { let e = [], t = /* @__PURE__ */ new Set(), n = (n) => { n && !t.has(n) && (t.add(n), e.push(n)); }; for (let e of $d) n(rf(process.env[e])); for (let e of ef) n(af(process.env[e])); return e; } function sf(e) { return new Promise((t) => { let n = dr$3.connect({ host: `localhost`, port: e }), r = !1, i = (e) => { r || (r = !0, n.destroy(), t(e)); }; n.once(`connect`, () => i(!0)), n.once(`error`, () => i(!1)), n.setTimeout(Qd, () => i(!1)); }); } async function cf(e, t, n) { let r = 0, i = Yd; for (;;) try { await Ed$1(e, t, n); return; } catch (e) { if (nf(e) && r < Xd) { await new Promise((e) => setTimeout(e, i)), r += i, i = Math.min(i * Zd, Xd - r); continue; } throw e; } } function lf(e) { let t = e.replace(/^src\/app\//, `/`).replace(/^src\/pages\//, `/`).replace(/^src\/server\//, `/`).replace(/^src\/routes\//, `/`).replace(/^app\//, `/`).replace(/^pages\//, `/`).replace(/^server\//, `/`).replace(/\/route\.(ts|mts|js|mjs|tsx|jsx)$/, ``).replace(/\/\+server\.(ts|mts|js|mjs|tsx|jsx)$/, ``).replace(/\.(ts|mts|js|mjs|tsx|jsx)$/, ``); return t.startsWith(`/`) || (t = `/` + t), t; } async function uf(e, t = {}) { let n = { triedPorts: of(), listeningPorts: [], unavailablePorts: [], importFailures: [], primeFailures: [] }, r = Fd(e); if (r.length === 0) return n; let i = t.refreshRegistered === !0; for (let e of n.triedPorts) await sf(e) ? n.listeningPorts.push(e) : n.unavailablePorts.push(e); for (let t of r) { let r = ff(e, t.consumer); if (!(r && !i)) { if (!r) { let r = lr$3.resolve(process.cwd(), t.filePath); try { await import(r); } catch (e) { n.importFailures.push({ filePath: t.filePath, reason: tf(e) }); } if (ff(e, t.consumer)) continue; } for (let r of n.listeningPorts) { let i = `http://localhost:${r}${lf(t.filePath)}`; try { let r = await fetch(i, { method: `POST`, headers: { "x-vercel-queue-prime": `1`, "x-vercel-queue-prime-file": t.filePath } }); try { await r.text(); } catch {} if (ff(e, t.consumer)) break; n.primeFailures.push({ filePath: t.filePath, url: i, reason: `HTTP ${r.status}${r.statusText ? ` ${r.statusText}` : ``}`.trim() }); } catch (e) { n.primeFailures.push({ filePath: t.filePath, url: i, reason: tf(e) }); } } } } return n; } function df(e, t, n) { let r = t.map((e) => e.filePath), i = n.listeningPorts[0] ?? n.triedPorts[0], a = i ? t.map((e) => `http://localhost:${i}${lf(e.filePath)}`) : [], o; if (n.triedPorts.length === 0) o = `No local dev port detected from env. Set PORT (or NEXT_PORT/NUXT_PORT/VITE_PORT).`; else if (n.listeningPorts.length === 0) o = `Detected env ports: [${n.triedPorts.join(`, `)}], but none are listening.`; else { let e = n.unavailablePorts.length > 0 ? ` Not listening: [${n.unavailablePorts.join(`, `)}].` : ``; o = `Detected env ports: [${n.triedPorts.join(`, `)}]. Listening: [${n.listeningPorts.join(`, `)}].` + e; } let s = n.importFailures.length > 0 ? ` Import failures: ` + n.importFailures.slice(0, 2).map((e) => `${e.filePath} (${e.reason})`).join(`; `) : ``, c = n.primeFailures.length > 0 ? ` Prime failures: ` + n.primeFailures.slice(0, 3).map((e) => `${e.url} (${e.reason})`).join(`; `) : ``; return `${Dd} No registered handler for topic "${e}". vercel.json maps this topic to [${r.join(`, `)}] but auto-loading failed. ${o}${s}${c} Ensure your dev server is running, set PORT if needed, and confirm mapped route files call handleCallback()/handleNodeCallback() at module scope. ` + (a.length > 0 ? `Try opening: ${a.join(` or `)}` : `Set PORT (or NEXT_PORT/NUXT_PORT/VITE_PORT) and try sending again.`); } function ff(e, t) { return Jd(e).some((e) => e.consumerGroup === t); } var pf = 10; var mf = 2; var hf = 10; var gf = 86400; function _f(e, t) { let n = Math.min(Math.max(t, 0), pf); console.log(`${Dd} ${Ad} Scheduling re-delivery in ${n}s: topic="${e.topicName}" consumer="${e.consumerGroup}" messageId="${e.messageId}"`), setTimeout(async () => { let t = e.deliveryCount + 1, n = new Date(e.createdAt.getTime() + e.retentionSeconds * 1e3); if (Date.now() >= n.getTime()) { console.log(`${Dd} Message expired, stopping retries: topic="${e.topicName}" messageId="${e.messageId}"`); return; } if (t > hf) { console.log(`${Dd} Max re-deliveries (${hf}) reached: topic="${e.topicName}" messageId="${e.messageId}"`); return; } let r = { messageId: e.messageId, deliveryCount: t, createdAt: e.createdAt, expiresAt: n, topicName: e.topicName, consumerGroup: e.consumerGroup, region: e.region }; console.log(`${Dd} Re-delivering: topic="${e.topicName}" consumer="${e.consumerGroup}" messageId="${e.messageId}" deliveryCount=${t}`); let i = !0, a = null, o = !1; try { await e.handler(e.payload, r); } catch (t) { if (i = !1, e.retry) { let n; try { n = e.retry(t, r); } catch (e) { console.warn(`${Dd} retry handler threw:`, e); } n && `afterSeconds` in n ? a = n.afterSeconds : n && `acknowledge` in n && (o = !0); } o || console.error(`${Dd} ${kd} Handler error on re-delivery: topic="${e.topicName}" messageId="${e.messageId}"`, t); } if (i) console.log(`${Dd} ${Od} Message processed on re-delivery: topic="${e.topicName}" consumer="${e.consumerGroup}" messageId="${e.messageId}"`); else if (o) console.log(`${Dd} ${Od} Message acknowledged (will not retry): topic="${e.topicName}" consumer="${e.consumerGroup}" messageId="${e.messageId}"`); else { let n = a ?? e.defaultRetryDelayS; _f({ ...e, deliveryCount: t }, n); } }, n * 1e3); } function vf(e, t, n, r, i) { if (r && r > 0) { console.log(`${Dd} Message sent with delay: topic="${e}" messageId="${t}" delay=${r}s`), setTimeout(() => { vf(e, t, n, void 0, i); }, r * 1e3); return; } console.log(`${Dd} Message sent: topic="${e}" messageId="${t}"`), (async () => { let r = Jd(e), a = null; if (r.length > 0 ? (await uf(e, { refreshRegistered: !0 }), r = Jd(e)) : (a = await uf(e), r = Jd(e)), r.length === 0) { let t = Fd(e); if (t.length > 0) { let n = a ?? { triedPorts: of(), listeningPorts: [], unavailablePorts: [], importFailures: [], primeFailures: [] }; console.warn(df(e, t, n)); } else console.warn(`${Dd} No registered handler for topic "${e}". Ensure vercel.json has a matching experimentalTriggers entry and the route file calls handleCallback().`); return; } let o = r.map((e) => e.consumerGroup); console.log(`${Dd} Invoking handlers for topic="${e}" messageId="${t}" \u2192 consumers: [${o.join(`, `)}]`); let s = i ?? gf; for (let i of r) { let r, a = /* @__PURE__ */ new Date(), o = 1, c = !0, l = null, u = !1, d = async (e, t) => { r = e, a = t.createdAt, o = t.deliveryCount; try { await i.handler(e, t); } catch (e) { throw c = !1, e; } }, f = i.options?.retry ? (e, t) => { let n = i.options.retry(e, t); return n && `afterSeconds` in n ? l = n.afterSeconds : n && `acknowledge` in n && (u = !0), n; } : void 0, p = { queueName: e, consumerGroup: i.consumerGroup, messageId: t, region: n }, m = { client: i.client, visibilityTimeoutSeconds: i.options?.visibilityTimeoutSeconds, retry: f }, h = Math.min(Id(e, i.consumerGroup) ?? mf, pf), g = () => ({ handler: i.handler, retry: i.options?.retry, payload: r, topicName: e, consumerGroup: i.consumerGroup, messageId: t, region: n, createdAt: a, retentionSeconds: s, deliveryCount: o, defaultRetryDelayS: h }); try { if (await cf(d, p, m), c) console.log(`${Dd} ${Od} Message processed: topic="${e}" consumer="${i.consumerGroup}" messageId="${t}"`); else if (u) console.log(`${Dd} ${Od} Message acknowledged (will not retry): topic="${e}" consumer="${i.consumerGroup}" messageId="${t}"`); else if (l !== null) { let e = Math.min(l, pf); _f(g(), e); } } catch (n) { console.error(`${Dd} ${kd} Handler failed: topic="${e}" consumer="${i.consumerGroup}" messageId="${t}"`, n), c || _f(g(), h); } } })(); } function yf() { let e = globalThis; delete e[Md], delete e[Wd]; } (process.env.NODE_ENV === `test` || process.env.VITEST) && (globalThis.__clearDevState = yf, globalThis.__filePathToConsumerGroup = Nd, globalThis.__filePathToUrlPath = lf, globalThis.__matchesFunctionsPattern = Rd, globalThis.__stripSrcPrefix = Ld); function bf() { return process.env.VERCEL_QUEUE_DEBUG === `1` || process.env.VERCEL_QUEUE_DEBUG === `true`; } async function xf(e) { let t = e.getReader(); try { for (;;) { let { done: e } = await t.read(); if (e) break; } } finally { t.releaseLock(); } } function Sf(e) { if (!e) return; let t = Number(e); if (Number.isFinite(t) && t >= 0) return t; let n = Date.parse(e); if (!Number.isNaN(n)) return Math.max(0, (n - Date.now()) / 1e3); } function Cf(e, t, n, r, i = `Invalid parameters`, a) { throw e === 400 ? new ed$1(n || i) : e === 429 ? new Zu$1(n || `Too many requests: ${r}`, Sf(a)) : e === 401 ? new Qu$1(n || void 0) : e === 403 ? new $u$1(n || void 0) : e >= 500 ? new td$1(n || `Server error: ${e} ${t}`) : Error(`Failed to ${r}: ${e} ${t}`); } function wf(e) { let t = e.get(`Vqs-Message-Id`), n = e.get(`Vqs-Delivery-Count`) || `0`, r = e.get(`Vqs-Timestamp`), i = e.get(`Content-Type`) || `application/octet-stream`, a = e.get(`Vqs-Receipt-Handle`), o = e.get(`Vqs-Expires-At`); if (!t || !r || !a) return null; let s = parseInt(n, 10); return Number.isNaN(s) ? null : { messageId: t, deliveryCount: s, createdAt: new Date(r), expiresAt: o ? new Date(o) : void 0, contentType: i, receiptHandle: a }; } var Tf = /^[a-z]{2,5}[0-9]{1,2}$/; function Ef(e) { if (!Tf.test(e)) throw Error(`Invalid region code: ${JSON.stringify(e)}. Region must match the pattern /^[a-z]{2,5}[0-9]{1,2}$/ (e.g. "iad1", "lhr1").`); } var Df = (e) => new URL(`https://${e}.vercel-queue.com`); function Of(e, t) { return (t ?? Df)(e); } var kf = `/api/v3/topic`; var Af = class e { baseUrl; customHeaders; providedToken; resolvedDeploymentId; pinSends; explicitlyUnpinned; transport; region; baseUrlResolver; dispatcher; constructor(e) { Ef(e.region), this.region = e.region, this.baseUrlResolver = e.resolveBaseUrl, this.baseUrl = Of(this.region, this.baseUrlResolver), this.customHeaders = e.headers || {}, this.providedToken = e.token, this.transport = e.transport || new qu$1(), this.dispatcher = e.dispatcher, e.deploymentId === null ? (this.pinSends = !1, this.explicitlyUnpinned = !0) : (this.resolvedDeploymentId = e.deploymentId || process.env.VERCEL_DEPLOYMENT_ID, this.pinSends = !0, this.explicitlyUnpinned = !1); } withRegion(t) { return new e({ region: t, resolveBaseUrl: this.baseUrlResolver, token: this.providedToken, headers: { ...this.customHeaders }, deploymentId: this.explicitlyUnpinned ? null : this.resolvedDeploymentId, transport: this.transport, dispatcher: this.dispatcher }); } getRegion() { return this.region; } getTransport() { return this.transport; } requireDeploymentId() { if (!(jd() || this.explicitlyUnpinned || this.resolvedDeploymentId)) throw Error(`No deployment ID available. VERCEL_DEPLOYMENT_ID is not set. This usually means the code is running outside a Vercel deployment (e.g. during build or in a non-Vercel environment). To fix this, create a client with an explicit deploymentId: new QueueClient({ deploymentId: "dpl_xxx" }) Or explicitly opt out of deployment pinning: new QueueClient({ deploymentId: null })`); } getSendDeploymentId() { if (!jd()) return this.requireDeploymentId(), this.pinSends ? this.resolvedDeploymentId : void 0; } getConsumeDeploymentId() { if (!jd()) return this.requireDeploymentId(), this.resolvedDeploymentId; } async getToken() { if (this.providedToken) return this.providedToken; try { return await (0, Gu$1.getVercelOidcToken)(); } catch (e) { let t = e instanceof Error ? e.message : String(e); throw Error(jd() ? `Failed to get OIDC token for local development. To fix this, pull your environment variables with Vercel CLI: \`vercel env pull\` Cause: ${t}` : `Failed to get OIDC token. This usually means the function is running outside of a Vercel Function environment. To fix this, either: - Deploy to Vercel (OIDC tokens are provisioned automatically) - Provide a token explicitly: \`new QueueClient({ token: '...' })\` Cause: ${t}`); } } buildUrl(e, ...t) { let n = encodeURIComponent(e), r = t.map((e) => encodeURIComponent(e)), i = r.length > 0 ? `/` + r.join(`/`) : ``, a = this.baseUrl.pathname.replace(/\/+$/, ``); return `${this.baseUrl.origin}${a}${kf}/${n}${i}`; } async fetch(e, t) { let n = t.method || `GET`; if (bf()) { let r = { method: n, url: e, headers: t.headers }, i = t.body; i != null && (i instanceof ArrayBuffer || i instanceof Uint8Array ? r.bodySize = i.byteLength : typeof i == `string` ? r.bodySize = i.length : r.bodyType = typeof i), console.debug(`[VQS Debug] Request:`, JSON.stringify(r, null, 2)); } t.headers.set(`User-Agent`, `@vercel/queue/0.3.1`), t.headers.set(`Vqs-Client-Ts`, (/* @__PURE__ */ new Date()).toISOString()); let r = this.dispatcher ? { ...t, dispatcher: this.dispatcher } : t, i = await fetch(e, r); if (bf()) { let t = { method: n, url: e, status: i.status, statusText: i.statusText, headers: i.headers }; console.debug(`[VQS Debug] Response:`, JSON.stringify(t, null, 2)); } return i; } async sendMessage(e) { let t = this.transport, { queueName: n, payload: r, idempotencyKey: i, retentionSeconds: a, delaySeconds: o, headers: s } = e, c = new Headers(); if (this.customHeaders) for (let [e, t] of Object.entries(this.customHeaders)) c.append(e, t); if (s) { let e = /* @__PURE__ */ new Set([`authorization`, `content-type`]), t = (t) => { let n = t.toLowerCase(); return e.has(n) ? !0 : n.startsWith(`vqs-`); }; for (let [e, n] of Object.entries(s)) !t(e) && n !== void 0 && c.append(e, n); } c.set(`Authorization`, `Bearer ${await this.getToken()}`), c.set(`Content-Type`, t.contentType); let l = this.getSendDeploymentId(); l && c.set(`Vqs-Deployment-Id`, l), i && c.set(`Vqs-Idempotency-Key`, i), a !== void 0 && c.set(`Vqs-Retention-Seconds`, a.toString()), o !== void 0 && c.set(`Vqs-Delay-Seconds`, o.toString()); let u = t.serialize(r), d = Buffer.isBuffer(u) ? new Uint8Array(u) : u, f = await this.fetch(this.buildUrl(n), { method: `POST`, body: d, headers: c }); if (!f.ok) { let e = await f.text(); if (f.status === 409) throw new id$1(e || `Duplicate idempotency key detected`, i); if (f.status === 502) throw new ad$1(e || `Consumer discovery failed`, l); if (f.status === 503) throw new od$1(e || `Consumer registry not configured`); Cf(f.status, f.statusText, e, `send message`); } return f.status === 202 ? (await f.text(), { messageId: null }) : await f.json(); } async *receiveMessages(e) { let t = this.transport, { queueName: n, consumerGroup: r, visibilityTimeoutSeconds: i, limit: a } = e; if (a !== void 0 && (a < 1 || a > 10)) throw new nd$1(a); let o = new Headers({ Authorization: `Bearer ${await this.getToken()}`, Accept: `multipart/mixed`, ...this.customHeaders }); i !== void 0 && o.set(`Vqs-Visibility-Timeout-Seconds`, i.toString()), a !== void 0 && o.set(`Vqs-Max-Messages`, a.toString()); let s = this.getConsumeDeploymentId(); s && o.set(`Vqs-Deployment-Id`, s); let c = await this.fetch(this.buildUrl(n, `consumer`, r), { method: `POST`, headers: o }); if (c.status === 204) { await c.text(); return; } if (!c.ok) { let e = await c.text(); Cf(c.status, c.statusText, e, `receive messages`); } for await (let e of il$1(c)) try { let n = wf(e.headers); if (!n) { console.warn(`Missing required queue headers in multipart part`), await xf(e.payload); continue; } let r = await t.deserialize(e.payload); yield { ...n, payload: r }; } catch (t) { console.warn(`Failed to process multipart message:`, t), await xf(e.payload); } } async receiveMessageById(e) { let t = this.transport, { queueName: n, consumerGroup: r, messageId: i, visibilityTimeoutSeconds: a } = e, o = new Headers({ Authorization: `Bearer ${await this.getToken()}`, Accept: `multipart/mixed`, ...this.customHeaders }); a !== void 0 && o.set(`Vqs-Visibility-Timeout-Seconds`, a.toString()); let s = this.getConsumeDeploymentId(); s && o.set(`Vqs-Deployment-Id`, s); let c = await this.fetch(this.buildUrl(n, `consumer`, r, `id`, i), { method: `POST`, headers: o }); if (!c.ok) { let e = await c.text(); if (c.status === 404) throw new Ju$1(i); if (c.status === 409) { let t = {}; try { t = JSON.parse(e); } catch {} throw t.originalMessageId ? new Yu$1(i, `This message was a duplicate - use originalMessageId: ${t.originalMessageId}`) : new Yu$1(i); } if (c.status === 410) throw new rd$1(i); Cf(c.status, c.statusText, e, `receive message by ID`); } for await (let e of il$1(c)) { let n = wf(e.headers); if (!n) throw await xf(e.payload), new Xu$1(i, `Missing required queue headers in response`); let r = await t.deserialize(e.payload); return { message: { ...n, payload: r } }; } throw new Ju$1(i); } async acknowledgeMessage(e) { let { queueName: t, consumerGroup: n, receiptHandle: r } = e, i = new Headers({ Authorization: `Bearer ${await this.getToken()}`, ...this.customHeaders }), a = this.getConsumeDeploymentId(); a && i.set(`Vqs-Deployment-Id`, a); let o = await this.fetch(this.buildUrl(t, `consumer`, n, `lease`, r), { method: `DELETE`, headers: i }); if (!o.ok) { let e = await o.text(); if (o.status === 404) throw new Ju$1(r); if (o.status === 409) throw new Yu$1(r, e || `Invalid receipt handle, message not in correct state, or already processed`); Cf(o.status, o.statusText, e, `acknowledge message`, `Missing or invalid receipt handle`, o.headers?.get(`Retry-After`) ?? null); } return await o.text(), { acknowledged: !0 }; } async changeVisibility(e) { let { queueName: t, consumerGroup: n, receiptHandle: r, visibilityTimeoutSeconds: i } = e, a = new Headers({ Authorization: `Bearer ${await this.getToken()}`, "Content-Type": `application/json`, ...this.customHeaders }), o = this.getConsumeDeploymentId(); o && a.set(`Vqs-Deployment-Id`, o); let s = await this.fetch(this.buildUrl(t, `consumer`, n, `lease`, r), { method: `PATCH`, headers: a, body: JSON.stringify({ visibilityTimeoutSeconds: i }) }); if (!s.ok) { let e = await s.text(); if (s.status === 404) throw new Ju$1(r); if (s.status === 409) throw new Yu$1(r, e || `Invalid receipt handle, message not in correct state, or already processed`); Cf(s.status, s.statusText, e, `change visibility`, `Missing receipt handle or invalid visibility timeout`, s.headers?.get(`Retry-After`) ?? null); } return await s.text(), { success: !0 }; } }; var jf = /* @__PURE__ */ new WeakMap(); var Mf = Symbol.for(`@vercel/queue.apiClient`); function Nf(e, t) { jf.set(e, t), Object.defineProperty(e, Mf, { value: t, writable: !1, enumerable: !1, configurable: !1 }); } function Pf(e) { let t = jf.get(e); if (t) return t; let n = e[Mf]; if (typeof n == `object` && n) { let t = n; return jf.set(e, t), t; } throw Error(`QueueClient not initialized. This may happen when multiple bundled copies of @vercel/queue are loaded in local dev.`); } function Ff(e) { return `request` in e ? e.request : e; } function If(e) { return Pf(e); } var Lf = `iad1`; function Rf(e) { return e || process.env.VERCEL_REGION || (jd() || console.warn(`[QueueClient] Region not detected \u2014 defaulting to "${Lf}". On Vercel this is set automatically via VERCEL_REGION. To silence this warning, pass region explicitly: new QueueClient({ region: "iad1" })`), Lf); } var zf = class { constructor(e = {}) { let t = Rf(e.region); Nf(this, new Af({ ...e, region: t })); } send = async (e, t, n) => { let r = Pf(this), i = await r.sendMessage({ queueName: e, payload: t, idempotencyKey: n?.idempotencyKey, retentionSeconds: n?.retentionSeconds, delaySeconds: n?.delaySeconds, headers: n?.headers }); return i.messageId && jd() && vf(e, i.messageId, r.getRegion(), n?.delaySeconds, n?.retentionSeconds), { messageId: i.messageId }; }; handleCallback = (e, t) => (jd() && qd(e, this, t), async (n) => { let r = Ff(n); if (jd() && r.headers.get(`x-vercel-queue-prime`) === `1`) { let n = r.headers.get(`x-vercel-queue-prime-file`); return n && qd(e, this, t, n), Response.json({ status: `primed` }); } try { return await Ed$1(e, await Td$1(r), { client: this, visibilityTimeoutSeconds: t?.visibilityTimeoutSeconds, retry: t?.retry }), Response.json({ status: `success` }); } catch (e) { return console.error(`Queue callback error:`, e), e instanceof Error && (e.message.includes(`Invalid content type`) || e.message.includes(`Invalid CloudEvent`) || e.message.includes(`Missing required CloudEvent`) || e.message.includes(`Failed to parse CloudEvent`) || e.message.includes(`Binary mode callback`)) ? Response.json({ error: e.message }, { status: 400 }) : Response.json({ error: `Failed to process queue message` }, { status: 500 }); } }); handleNodeCallback = (e, t) => (jd() && qd(e, this, t), async (n, r) => { if (n.method !== `POST`) { r.status(200).end(); return; } let i = n.headers[`x-vercel-queue-prime`]; if (jd() && i === `1`) { let i = n.headers[`x-vercel-queue-prime-file`], a = Array.isArray(i) ? i[0] : i; a && qd(e, this, t, a), r.status(200).json({ status: `primed` }); return; } try { await Ed$1(e, wd$1(n.body, n.headers), { client: this, visibilityTimeoutSeconds: t?.visibilityTimeoutSeconds, retry: t?.retry }), r.status(200).json({ status: `success` }); } catch (e) { if (console.error(`Queue callback error:`, e), e instanceof Error && (e.message.includes(`Invalid content type`) || e.message.includes(`Invalid CloudEvent`) || e.message.includes(`Missing required CloudEvent`) || e.message.includes(`Failed to parse CloudEvent`) || e.message.includes(`Binary mode callback`))) { r.status(400).json({ error: e.message }); return; } r.status(500).json({ error: `Failed to process queue message` }); } }); }; let Bf; try { Bf = new TextDecoder(); } catch {} let J$6; let Vf; let Y$8 = 0; const Hf = []; const Uf = 57337; const Wf = {}; let Gf = 11281e4; let Kf = 1681e4; let qf = Hf; let Jf = 0; let X$8 = {}; let Yf; let Xf; let Zf = 0; let Qf = 0; let $f; let ep; let tp = []; let np = []; let rp; let ip; let ap; let op = { useRecords: !1, mapsAsObjects: !0 }; let sp = !1; let cp$1 = 2; try { Function(``); } catch { cp$1 = Infinity; } var lp = class e { constructor(e) { if (e && ((e.keyMap || e._keyMap) && !e.useRecords && (e.useRecords = !1, e.mapsAsObjects = !0), e.useRecords === !1 && e.mapsAsObjects === void 0 && (e.mapsAsObjects = !0), e.getStructures && (e.getShared = e.getStructures), e.getShared && !e.structures && ((e.structures = []).uninitialized = !0), e.keyMap)) { this.mapKey = /* @__PURE__ */ new Map(); for (let [t, n] of Object.entries(e.keyMap)) this.mapKey.set(n, t); } Object.assign(this, e); } decodeKey(e) { return this.keyMap && this.mapKey.get(e) || e; } encodeKey(e) { return this.keyMap && this.keyMap.hasOwnProperty(e) ? this.keyMap[e] : e; } encodeKeys(e) { if (!this._keyMap) return e; let t = /* @__PURE__ */ new Map(); for (let [n, r] of Object.entries(e)) t.set(this._keyMap.hasOwnProperty(n) ? this._keyMap[n] : n, r); return t; } decodeKeys(e) { if (!this._keyMap || e.constructor.name != `Map`) return e; if (!this._mapKey) { this._mapKey = /* @__PURE__ */ new Map(); for (let [e, t] of Object.entries(this._keyMap)) this._mapKey.set(t, e); } let t = {}; return e.forEach((e, n) => t[pp(this._mapKey.has(n) ? this._mapKey.get(n) : n)] = e), t; } mapDecode(e, t) { let n = this.decode(e); if (this._keyMap) switch (n.constructor.name) { case `Array`: return n.map((e) => this.decodeKeys(e)); } return n; } decode(t, n) { if (J$6) return Lp(() => (Rp(), this ? this.decode(t, n) : e.prototype.decode.call(op, t, n))); Vf = n > -1 ? n : t.length, Y$8 = 0, Jf = 0, Qf = 0, Xf = null, qf = Hf, $f = null, J$6 = t; try { ip = t.dataView ||= new DataView(t.buffer, t.byteOffset, t.byteLength); } catch (e) { throw J$6 = null, t instanceof Uint8Array ? e : Error(`Source must be a Uint8Array or Buffer but was a ` + (t && typeof t == `object` ? t.constructor.name : typeof t)); } if (this instanceof e) { if (X$8 = this, rp = this.sharedValues && (this.pack ? Array(this.maxPrivatePackedValues || 16).concat(this.sharedValues) : this.sharedValues), this.structures) return Yf = this.structures, up(); (!Yf || Yf.length > 0) && (Yf = []); } else X$8 = op, (!Yf || Yf.length > 0) && (Yf = []), rp = null; return up(); } decodeMultiple(e, t) { let n, r = 0; try { let i = e.length; sp = !0; let a = this ? this.decode(e, i) : Bp.decode(e, i); if (t) { if (t(a) === !1) return; for (; Y$8 < i;) if (r = Y$8, t(up()) === !1) return; } else { for (n = [a]; Y$8 < i;) r = Y$8, n.push(up()); return n; } } catch (e) { throw e.lastPosition = r, e.values = n, e; } finally { sp = !1, Rp(); } } }; function up() { try { let e = Z$8(); if ($f) { if (Y$8 >= $f.postBundlePosition) { let e = Error(`Unexpected bundle position`); throw e.incomplete = !0, e; } Y$8 = $f.postBundlePosition, $f = null; } if (Y$8 == Vf) Yf = null, J$6 = null, ep &&= null; else if (Y$8 > Vf) { let e = Error(`Unexpected end of CBOR data`); throw e.incomplete = !0, e; } else if (!sp) throw Error(`Data read, but end of buffer not reached`); return e; } catch (e) { throw Rp(), (e instanceof RangeError || e.message.startsWith(`Unexpected end of buffer`)) && (e.incomplete = !0), e; } } function Z$8() { let e = J$6[Y$8++], t = e >> 5; if (e &= 31, e > 23) switch (e) { case 24: e = J$6[Y$8++]; break; case 25: if (t == 7) return Cp(); e = ip.getUint16(Y$8), Y$8 += 2; break; case 26: if (t == 7) { let e = ip.getFloat32(Y$8); if (X$8.useFloat32 > 2) { let t = zp[(J$6[Y$8] & 127) << 1 | J$6[Y$8 + 1] >> 7]; return Y$8 += 4, (t * e + (e > 0 ? .5 : -.5) >> 0) / t; } return Y$8 += 4, e; } e = ip.getUint32(Y$8), Y$8 += 4; break; case 27: if (t == 7) { let e = ip.getFloat64(Y$8); return Y$8 += 8, e; } if (t > 1) { if (ip.getUint32(Y$8) > 0) throw Error(`JavaScript does not support arrays, maps, or strings with length over 4294967295`); e = ip.getUint32(Y$8 + 4); } else X$8.int64AsNumber ? (e = ip.getUint32(Y$8) * 4294967296, e += ip.getUint32(Y$8 + 4)) : e = ip.getBigUint64(Y$8); Y$8 += 8; break; case 31: switch (t) { case 2: case 3: throw Error(`Indefinite length not supported for byte or text strings`); case 4: let e = [], n, r = 0; for (; (n = Z$8()) != Wf;) { if (r >= Gf) throw Error(`Array length exceeds ${Gf}`); e[r++] = n; } return t == 4 ? e : t == 3 ? e.join(``) : Buffer.concat(e); case 5: let i; if (X$8.mapsAsObjects) { let e = {}, t = 0; if (X$8.keyMap) for (; (i = Z$8()) != Wf;) { if (t++ >= Kf) throw Error(`Property count exceeds ${Kf}`); e[pp(X$8.decodeKey(i))] = Z$8(); } else for (; (i = Z$8()) != Wf;) { if (t++ >= Kf) throw Error(`Property count exceeds ${Kf}`); e[pp(i)] = Z$8(); } return e; } else { ap &&= (X$8.mapsAsObjects = !0, !1); let e = /* @__PURE__ */ new Map(); if (X$8.keyMap) { let t = 0; for (; (i = Z$8()) != Wf;) { if (t++ >= Kf) throw Error(`Map size exceeds ${Kf}`); e.set(X$8.decodeKey(i), Z$8()); } } else { let t = 0; for (; (i = Z$8()) != Wf;) { if (t++ >= Kf) throw Error(`Map size exceeds ${Kf}`); e.set(i, Z$8()); } } return e; } case 7: return Wf; default: throw Error(`Invalid major type for indefinite length ` + t); } default: throw Error(`Unknown token ` + e); } switch (t) { case 0: return e; case 1: return ~e; case 2: return bp(e); case 3: if (Qf >= Y$8) return Xf.slice(Y$8 - Zf, (Y$8 += e) - Zf); if (Qf == 0 && Vf < 140 && e < 32) { let t = e < 16 ? yp(e) : vp(e); if (t != null) return t; } return mp(e); case 4: if (e >= Gf) throw Error(`Array length exceeds ${Gf}`); let t = Array(e); for (let n = 0; n < e; n++) t[n] = Z$8(); return t; case 5: if (e >= Kf) throw Error(`Map size exceeds ${Gf}`); if (X$8.mapsAsObjects) { let t = {}; if (X$8.keyMap) for (let n = 0; n < e; n++) t[pp(X$8.decodeKey(Z$8()))] = Z$8(); else for (let n = 0; n < e; n++) t[pp(Z$8())] = Z$8(); return t; } else { ap &&= (X$8.mapsAsObjects = !0, !1); let t = /* @__PURE__ */ new Map(); if (X$8.keyMap) for (let n = 0; n < e; n++) t.set(X$8.decodeKey(Z$8()), Z$8()); else for (let n = 0; n < e; n++) t.set(Z$8(), Z$8()); return t; } case 6: if (e >= Uf) { let t = Yf[e & 8191]; if (t) return t.read ||= fp(t), t.read(); if (e < 65536) { if (e == 57343) { let e = Fp(), t = Z$8(), n = Z$8(); Tp(t, n); let r = {}; if (X$8.keyMap) for (let t = 2; t < e; t++) { let e = X$8.decodeKey(n[t - 2]); r[pp(e)] = Z$8(); } else for (let t = 2; t < e; t++) { let e = n[t - 2]; r[pp(e)] = Z$8(); } return r; } else if (e == 57342) { let e = Fp(), t = Z$8(); for (let n = 2; n < e; n++) Tp(t++, Z$8()); return Z$8(); } else if (e == Uf) return Pp(); if (X$8.getShared && (Ip(), t = Yf[e & 8191], t)) return t.read ||= fp(t), t.read(); } } let n = tp[e]; if (n) return n.handlesRead ? n(Z$8) : n(Z$8()); { let t = Z$8(); for (let n = 0; n < np.length; n++) { let r = np[n](e, t); if (r !== void 0) return r; } return new wp(t, e); } case 7: switch (e) { case 20: return !1; case 21: return !0; case 22: return null; case 23: return; default: let t = (rp || kp())[e]; if (t !== void 0) return t; throw Error(`Unknown token ` + e); } default: if (isNaN(e)) { let e = Error(`Unexpected end of CBOR data`); throw e.incomplete = !0, e; } throw Error(`Unknown CBOR token ` + e); } } const dp = /^[a-zA-Z_$][a-zA-Z\d_$]*$/; function fp(e) { if (!e) throw Error(`Structure is required in record definition`); function t() { let e = J$6[Y$8++]; if (e &= 31, e > 23) switch (e) { case 24: e = J$6[Y$8++]; break; case 25: e = ip.getUint16(Y$8), Y$8 += 2; break; case 26: e = ip.getUint32(Y$8), Y$8 += 4; break; default: throw Error(`Expected array header, but got ` + J$6[Y$8 - 1]); } let t = this.compiledReader; for (; t;) { if (t.propertyCount === e) return t(Z$8); t = t.next; } if (this.slowReads++ >= cp$1) { let n = this.length == e ? this : this.slice(0, e); return t = X$8.keyMap ? Function(`r`, `return {` + n.map((e) => X$8.decodeKey(e)).map((e) => dp.test(e) ? pp(e) + `:r()` : `[` + JSON.stringify(e) + `]:r()`).join(`,`) + `}`) : Function(`r`, `return {` + n.map((e) => dp.test(e) ? pp(e) + `:r()` : `[` + JSON.stringify(e) + `]:r()`).join(`,`) + `}`), this.compiledReader && (t.next = this.compiledReader), t.propertyCount = e, this.compiledReader = t, t(Z$8); } let n = {}; if (X$8.keyMap) for (let t = 0; t < e; t++) n[pp(X$8.decodeKey(this[t]))] = Z$8(); else for (let t = 0; t < e; t++) n[pp(this[t])] = Z$8(); return n; } return e.slowReads = 0, t; } function pp(e) { if (typeof e == `string`) return e === `__proto__` ? `__proto_` : e; if (typeof e == `number` || typeof e == `boolean` || typeof e == `bigint`) return e.toString(); if (e == null) return e + ``; throw Error(`Invalid property name type ` + typeof e); } let mp = gp; function hp(e) { mp = t(1); function t(t) { return function(t) { let n = qf[Jf++]; if (n == null) { if ($f) return gp(t); let r = e(Y$8, Vf, t, J$6); if (typeof r == `string`) n = r, qf = Hf; else if (qf = r, Jf = 1, Qf = 1, n = qf[0], n === void 0) throw Error(`Unexpected end of buffer`); } let r = n.length; return r <= t ? (Y$8 += t, n) : (Xf = n, Zf = Y$8, Qf = Y$8 + r, Y$8 += t, n.slice(0, t)); }; } } function gp(e) { let t; if (e < 16 && (t = yp(e))) return t; if (e > 64 && Bf) return Bf.decode(J$6.subarray(Y$8, Y$8 += e)); let n = Y$8 + e, r = []; for (t = ``; Y$8 < n;) { let e = J$6[Y$8++]; if (!(e & 128)) r.push(e); else if ((e & 224) == 192) { let t = J$6[Y$8++] & 63; r.push((e & 31) << 6 | t); } else if ((e & 240) == 224) { let t = J$6[Y$8++] & 63, n = J$6[Y$8++] & 63; r.push((e & 31) << 12 | t << 6 | n); } else if ((e & 248) == 240) { let t = J$6[Y$8++] & 63, n = J$6[Y$8++] & 63, i = J$6[Y$8++] & 63, a = (e & 7) << 18 | t << 12 | n << 6 | i; a > 65535 && (a -= 65536, r.push(a >>> 10 & 1023 | 55296), a = 56320 | a & 1023), r.push(a); } else r.push(e); r.length >= 4096 && (t += _p.apply(String, r), r.length = 0); } return r.length > 0 && (t += _p.apply(String, r)), t; } let _p = String.fromCharCode; function vp(e) { let t = Y$8, n = Array(e); for (let r = 0; r < e; r++) { let e = J$6[Y$8++]; if ((e & 128) > 0) { Y$8 = t; return; } n[r] = e; } return _p.apply(String, n); } function yp(e) { if (e < 4) if (e < 2) { if (e === 0) return ``; { let e = J$6[Y$8++]; if ((e & 128) > 1) { --Y$8; return; } return _p(e); } } else { let t = J$6[Y$8++], n = J$6[Y$8++]; if ((t & 128) > 0 || (n & 128) > 0) { Y$8 -= 2; return; } if (e < 3) return _p(t, n); let r = J$6[Y$8++]; if ((r & 128) > 0) { Y$8 -= 3; return; } return _p(t, n, r); } else { let t = J$6[Y$8++], n = J$6[Y$8++], r = J$6[Y$8++], i = J$6[Y$8++]; if ((t & 128) > 0 || (n & 128) > 0 || (r & 128) > 0 || (i & 128) > 0) { Y$8 -= 4; return; } if (e < 6) { if (e === 4) return _p(t, n, r, i); { let e = J$6[Y$8++]; if ((e & 128) > 0) { Y$8 -= 5; return; } return _p(t, n, r, i, e); } } else if (e < 8) { let a = J$6[Y$8++], o = J$6[Y$8++]; if ((a & 128) > 0 || (o & 128) > 0) { Y$8 -= 6; return; } if (e < 7) return _p(t, n, r, i, a, o); let s = J$6[Y$8++]; if ((s & 128) > 0) { Y$8 -= 7; return; } return _p(t, n, r, i, a, o, s); } else { let a = J$6[Y$8++], o = J$6[Y$8++], s = J$6[Y$8++], c = J$6[Y$8++]; if ((a & 128) > 0 || (o & 128) > 0 || (s & 128) > 0 || (c & 128) > 0) { Y$8 -= 8; return; } if (e < 10) { if (e === 8) return _p(t, n, r, i, a, o, s, c); { let e = J$6[Y$8++]; if ((e & 128) > 0) { Y$8 -= 9; return; } return _p(t, n, r, i, a, o, s, c, e); } } else if (e < 12) { let l = J$6[Y$8++], u = J$6[Y$8++]; if ((l & 128) > 0 || (u & 128) > 0) { Y$8 -= 10; return; } if (e < 11) return _p(t, n, r, i, a, o, s, c, l, u); let d = J$6[Y$8++]; if ((d & 128) > 0) { Y$8 -= 11; return; } return _p(t, n, r, i, a, o, s, c, l, u, d); } else { let l = J$6[Y$8++], u = J$6[Y$8++], d = J$6[Y$8++], f = J$6[Y$8++]; if ((l & 128) > 0 || (u & 128) > 0 || (d & 128) > 0 || (f & 128) > 0) { Y$8 -= 12; return; } if (e < 14) { if (e === 12) return _p(t, n, r, i, a, o, s, c, l, u, d, f); { let e = J$6[Y$8++]; if ((e & 128) > 0) { Y$8 -= 13; return; } return _p(t, n, r, i, a, o, s, c, l, u, d, f, e); } } else { let p = J$6[Y$8++], m = J$6[Y$8++]; if ((p & 128) > 0 || (m & 128) > 0) { Y$8 -= 14; return; } if (e < 15) return _p(t, n, r, i, a, o, s, c, l, u, d, f, p, m); let h = J$6[Y$8++]; if ((h & 128) > 0) { Y$8 -= 15; return; } return _p(t, n, r, i, a, o, s, c, l, u, d, f, p, m, h); } } } } } function bp(e) { return X$8.copyBuffers ? Uint8Array.prototype.slice.call(J$6, Y$8, Y$8 += e) : J$6.subarray(Y$8, Y$8 += e); } let xp = /* @__PURE__ */ new Float32Array(1); let Sp = new Uint8Array(xp.buffer, 0, 4); function Cp() { let e = J$6[Y$8++], t = J$6[Y$8++], n = (e & 127) >> 2; if (n === 31) return t || e & 3 ? NaN : e & 128 ? -Infinity : Infinity; if (n === 0) { let n = ((e & 3) << 8 | t) / (1 << 24); return e & 128 ? -n : n; } return Sp[3] = e & 128 | (n >> 1) + 56, Sp[2] = (e & 7) << 5 | t >> 3, Sp[1] = t << 5, Sp[0] = 0, xp[0]; } Array(4096); var wp = class { constructor(e, t) { this.value = e, this.tag = t; } }; tp[0] = (e) => new Date(e), tp[1] = (e) => new Date(Math.round(e * 1e3)), tp[2] = (e) => { let t = BigInt(0); for (let n = 0, r = e.byteLength; n < r; n++) t = BigInt(e[n]) + (t << BigInt(8)); return t; }, tp[3] = (e) => BigInt(-1) - tp[2](e), tp[4] = (e) => +(e[1] + `e` + e[0]), tp[5] = (e) => e[1] * Math.exp(e[0] * Math.log(2)); const Tp = (e, t) => { e -= 57344; let n = Yf[e]; n && n.isShared && ((Yf.restoreStructures ||= [])[e] = n), Yf[e] = t, t.read = fp(t); }; tp[105] = (e) => { let t = e.length, n = e[1]; Tp(e[0], n); let r = {}; for (let i = 2; i < t; i++) { let t = n[i - 2]; r[pp(t)] = e[i]; } return r; }, tp[14] = (e) => $f ? $f[0].slice($f.position0, $f.position0 += e) : new wp(e, 14), tp[15] = (e) => $f ? $f[1].slice($f.position1, $f.position1 += e) : new wp(e, 15); let Ep = { Error, RegExp }; tp[27] = (e) => (Ep[e[0]] || Error)(e[1], e[2]); const Dp = (e) => { if (J$6[Y$8++] != 132) { let e = Error(`Packed values structure must be followed by a 4 element array`); throw J$6.length < Y$8 && (e.incomplete = !0), e; } let t = e(); if (!t || !t.length) { let e = Error(`Packed values structure must be followed by a 4 element array`); throw e.incomplete = !0, e; } return rp = rp ? t.concat(rp.slice(t.length)) : t, rp.prefixes = e(), rp.suffixes = e(), e(); }; Dp.handlesRead = !0, tp[51] = Dp, tp[6] = (e) => { if (!rp) if (X$8.getShared) Ip(); else return new wp(e, 6); if (typeof e == `number`) return rp[16 + (e >= 0 ? 2 * e : -2 * e - 1)]; let t = Error(`No support for non-integer packed references yet`); throw e === void 0 && (t.incomplete = !0), t; }, tp[28] = (e) => { ep || (ep = /* @__PURE__ */ new Map(), ep.id = 0); let t = ep.id++, n = Y$8, r = J$6[Y$8], i; i = r >> 5 == 4 ? [] : {}; let a = { target: i }; ep.set(t, a); let o = e(); return a.used ? (Object.getPrototypeOf(i) !== Object.getPrototypeOf(o) && (Y$8 = n, i = o, ep.set(t, { target: i }), o = e()), Object.assign(i, o)) : (a.target = o, o); }, tp[28].handlesRead = !0, tp[29] = (e) => { let t = ep.get(e); return t.used = !0, t.target; }, tp[258] = (e) => new Set(e), (tp[259] = (e) => (X$8.mapsAsObjects && (X$8.mapsAsObjects = !1, ap = !0), e())).handlesRead = !0; function Op(e, t) { return typeof e == `string` ? e + t : e instanceof Array ? e.concat(t) : Object.assign({}, e, t); } function kp() { if (!rp) if (X$8.getShared) Ip(); else throw Error(`No packed values available`); return rp; } np.push((e, t) => { if (e >= 225 && e <= 255) return Op(kp().prefixes[e - 224], t); if (e >= 28704 && e <= 32767) return Op(kp().prefixes[e - 28672], t); if (e >= 1879052288 && e <= 2147483647) return Op(kp().prefixes[e - 1879048192], t); if (e >= 216 && e <= 223) return Op(t, kp().suffixes[e - 216]); if (e >= 27647 && e <= 28671) return Op(t, kp().suffixes[e - 27639]); if (e >= 1811940352 && e <= 1879048191) return Op(t, kp().suffixes[e - 1811939328]); if (e == 1399353956) return { packedValues: rp, structures: Yf.slice(0), version: t }; if (e == 55799) return t; }); const Ap = new Uint8Array(new Uint16Array([1]).buffer)[0] == 1; const jp = [ Uint8Array, Uint8ClampedArray, Uint16Array, Uint32Array, typeof BigUint64Array > `u` ? { name: `BigUint64Array` } : BigUint64Array, Int8Array, Int16Array, Int32Array, typeof BigInt64Array > `u` ? { name: `BigInt64Array` } : BigInt64Array, Float32Array, Float64Array ]; const Mp = [ 64, 68, 69, 70, 71, 72, 77, 78, 79, 85, 86 ]; for (let e = 0; e < jp.length; e++) Np(jp[e], Mp[e]); function Np(e, t) { let n = `get` + e.name.slice(0, -5), r; typeof e == `function` ? r = e.BYTES_PER_ELEMENT : e = null; for (let i = 0; i < 2; i++) { if (!i && r == 1) continue; let a = r == 2 ? 1 : r == 4 ? 2 : r == 8 ? 3 : 0; tp[i ? t : t - 4] = r == 1 || i == Ap ? (n) => { if (!e) throw Error(`Could not find typed array for code ` + t); return !X$8.copyBuffers && (r === 1 || r === 2 && !(n.byteOffset & 1) || r === 4 && !(n.byteOffset & 3) || r === 8 && !(n.byteOffset & 7)) ? new e(n.buffer, n.byteOffset, n.byteLength >> a) : new e(Uint8Array.prototype.slice.call(n, 0).buffer); } : (r) => { if (!e) throw Error(`Could not find typed array for code ` + t); let o = new DataView(r.buffer, r.byteOffset, r.byteLength), s = r.length >> a, c = new e(s), l = o[n]; for (let e = 0; e < s; e++) c[e] = l.call(o, e << a, i); return c; }; } } function Pp() { let e = Fp(), t = Y$8 + Z$8(); for (let t = 2; t < e; t++) { let e = Fp(); Y$8 += e; } let n = Y$8; return Y$8 = t, $f = [gp(Fp()), gp(Fp())], $f.position0 = 0, $f.position1 = 0, $f.postBundlePosition = Y$8, Y$8 = n, Z$8(); } function Fp() { let e = J$6[Y$8++] & 31; if (e > 23) switch (e) { case 24: e = J$6[Y$8++]; break; case 25: e = ip.getUint16(Y$8), Y$8 += 2; break; case 26: e = ip.getUint32(Y$8), Y$8 += 4; break; } return e; } function Ip() { if (X$8.getShared) { let e = Lp(() => (J$6 = null, X$8.getShared())) || {}, t = e.structures || []; X$8.sharedVersion = e.version, rp = X$8.sharedValues = e.packedValues, Yf === !0 ? X$8.structures = Yf = t : Yf.splice.apply(Yf, [0, t.length].concat(t)); } } function Lp(e) { let t = Vf, n = Y$8, r = Jf, i = Zf, a = Qf, o = Xf, s = qf, c = ep, l = $f, u = new Uint8Array(J$6.slice(0, Vf)), d = Yf, f = X$8, p = sp, m = e(); return Vf = t, Y$8 = n, Jf = r, Zf = i, Qf = a, Xf = o, qf = s, ep = c, $f = l, J$6 = u, sp = p, Yf = d, X$8 = f, ip = new DataView(J$6.buffer, J$6.byteOffset, J$6.byteLength), m; } function Rp() { J$6 = null, ep = null, Yf = null; } const zp = Array(147); for (let e = 0; e < 256; e++) zp[e] = +(`1e` + Math.floor(45.15 - e * .30103)); let Bp = new lp({ useRecords: !1 }); const Vp = Bp.decode; Bp.decodeMultiple; const Hp = { NEVER: 0, ALWAYS: 1, DECIMAL_ROUND: 3, DECIMAL_FIT: 4 }; let Up; try { Up = new TextEncoder(); } catch {} let Wp; let Gp; const Kp = typeof globalThis == `object` && globalThis.Buffer; const qp = Kp !== void 0; const Jp = qp ? Kp.allocUnsafeSlow : Uint8Array; const Yp = qp ? Kp : Uint8Array; const Xp = qp ? 4294967296 : 2144337920; let Zp; let Q$8; let Qp; let $$8 = 0; let $p; let em = null; const tm = /[\u0080-\uFFFF]/; const nm = Symbol(`record-id`); var rm$1 = class extends lp { constructor(e) { super(e), this.offset = 0; let t, n, r, i, a; e ||= {}; let o = Yp.prototype.utf8Write ? function(e, t, n) { return Q$8.utf8Write(e, t, n); } : Up && Up.encodeInto ? function(e, t) { return Up.encodeInto(e, Q$8.subarray(t)).written; } : !1, s = this, c = e.structures || e.saveStructures, l = e.maxSharedStructures; if (l ??= c ? 128 : 0, l > 8190) throw Error(`Maximum maxSharedStructure is 8190`); let u = e.sequential; u && (l = 0), this.structures ||= [], this.saveStructures && (this.saveShared = this.saveStructures); let d, f, p = e.sharedValues, m; if (p) { m = Object.create(null); for (let e = 0, t = p.length; e < t; e++) m[p[e]] = e; } let h = [], g = 0, _ = 0; this.mapEncode = function(e, t) { if (this._keyMap && !this._mapped) switch (e.constructor.name) { case `Array`: e = e.map((e) => this.encodeKeys(e)); break; } return this.encode(e, t); }, this.encode = function(o, c) { if (Q$8 || (Q$8 = new Jp(8192), Qp = new DataView(Q$8.buffer, 0, 8192), $$8 = 0), $p = Q$8.length - 10, $p - $$8 < 2048 ? (Q$8 = new Jp(Q$8.length), Qp = new DataView(Q$8.buffer, 0, Q$8.length), $p = Q$8.length - 10, $$8 = 0) : c === 512 && ($$8 = $$8 + 7 & 2147483640), t = $$8, s.useSelfDescribedHeader && (Qp.setUint32($$8, 3654940416), $$8 += 3), a = s.structuredClone ? /* @__PURE__ */ new Map() : null, s.bundleStrings && typeof o != `string` ? (em = [], em.size = Infinity) : em = null, n = s.structures, n) { if (n.uninitialized) { let e = s.getShared() || {}; s.structures = n = e.structures || [], s.sharedVersion = e.version; let t = s.sharedValues = e.packedValues; if (t) { m = {}; for (let e = 0, n = t.length; e < n; e++) m[t[e]] = e; } } let e = n.length; if (e > l && !u && (e = l), !n.transitions) { n.transitions = Object.create(null); for (let t = 0; t < e; t++) { let e = n[t]; if (!e) continue; let r, i = n.transitions; for (let n = 0, a = e.length; n < a; n++) { i[nm] === void 0 && (i[nm] = t); let a = e[n]; r = i[a], r ||= i[a] = Object.create(null), i = r; } i[nm] = t | 1048576; } } u || (n.nextId = e); } if (r &&= !1, i = n || [], f = m, e.pack) { let t = /* @__PURE__ */ new Map(); if (t.values = [], t.encoder = s, t.maxValues = e.maxPrivatePackedValues || (m ? 16 : Infinity), t.objectMap = m || !1, t.samplingPackedValues = d, lm(o, t), t.values.length > 0) { Q$8[$$8++] = 216, Q$8[$$8++] = 51, om(4); let e = t.values; v(e), om(0), om(0), f = Object.create(m || null); for (let t = 0, n = e.length; t < n; t++) f[e[t]] = t; } } Zp = c & xm; try { if (Zp) return; if (v(o), em && mm(t, v), s.offset = $$8, a && a.idsToInsert) { $$8 += a.idsToInsert.length * 2, $$8 > $p && b($$8), s.offset = $$8; let e = pm(Q$8.subarray(t, $$8), a.idsToInsert); return a = null, e; } return c & 512 ? (Q$8.start = t, Q$8.end = $$8, Q$8) : Q$8.subarray(t, $$8); } finally { if (n) { if (_ < 10 && _++, n.length > l && (n.length = l), g > 1e4) n.transitions = null, _ = 0, g = 0, h.length > 0 && (h = []); else if (h.length > 0 && !u) { for (let e = 0, t = h.length; e < t; e++) h[e][nm] = void 0; h = []; } } if (r && s.saveShared) { s.structures.length > l && (s.structures = s.structures.slice(0, l)); let e = Q$8.subarray(t, $$8); return s.updateSharedData() === !1 ? s.encode(o) : e; } c & 1024 && ($$8 = t); } }, this.findCommonStringsToPack = () => (d = /* @__PURE__ */ new Map(), m ||= Object.create(null), (e) => { let t = e && e.threshold || 4, n = this.pack ? e.maxPrivatePackedValues || 16 : 0; p ||= this.sharedValues = []; for (let [e, i] of d) i.count > t && (m[e] = n++, p.push(e), r = !0); for (; this.saveShared && this.updateSharedData() === !1;); d = null; }); let v = (n) => { $$8 > $p && (Q$8 = b($$8)); var r = typeof n, i; if (r === `string`) { if (f) { let t = f[n]; if (t >= 0) { t < 16 ? Q$8[$$8++] = t + 224 : (Q$8[$$8++] = 198, t & 1 ? v(15 - t >> 1) : v(t - 16 >> 1)); return; } else if (d && !e.pack) { let e = d.get(n); e ? e.count++ : d.set(n, { count: 1 }); } } let r = n.length; if (em && r >= 4 && r < 1024) { if ((em.size += r) > 61440) { let e, n = (em[0] ? em[0].length * 3 + em[1].length : 0) + 10; $$8 + n > $p && (Q$8 = b($$8 + n)), Q$8[$$8++] = 217, Q$8[$$8++] = 223, Q$8[$$8++] = 249, Q$8[$$8++] = em.position ? 132 : 130, Q$8[$$8++] = 26, e = $$8 - t, $$8 += 4, em.position && mm(t, v), em = [``, ``], em.size = 0, em.position = e; } let e = tm.test(n); em[+!e] += n, Q$8[$$8++] = e ? 206 : 207, v(r); return; } let a; a = r < 32 ? 1 : r < 256 ? 2 : r < 65536 ? 3 : 5; let s = r * 3; if ($$8 + s > $p && (Q$8 = b($$8 + s)), r < 64 || !o) { let e, t, o, s = $$8 + a; for (e = 0; e < r; e++) t = n.charCodeAt(e), t < 128 ? Q$8[s++] = t : t < 2048 ? (Q$8[s++] = t >> 6 | 192, Q$8[s++] = t & 63 | 128) : (t & 64512) == 55296 && ((o = n.charCodeAt(e + 1)) & 64512) == 56320 ? (t = 65536 + ((t & 1023) << 10) + (o & 1023), e++, Q$8[s++] = t >> 18 | 240, Q$8[s++] = t >> 12 & 63 | 128, Q$8[s++] = t >> 6 & 63 | 128, Q$8[s++] = t & 63 | 128) : (Q$8[s++] = t >> 12 | 224, Q$8[s++] = t >> 6 & 63 | 128, Q$8[s++] = t & 63 | 128); i = s - $$8 - a; } else i = o(n, $$8 + a, s); i < 24 ? Q$8[$$8++] = 96 | i : i < 256 ? (a < 2 && Q$8.copyWithin($$8 + 2, $$8 + 1, $$8 + 1 + i), Q$8[$$8++] = 120, Q$8[$$8++] = i) : i < 65536 ? (a < 3 && Q$8.copyWithin($$8 + 3, $$8 + 2, $$8 + 2 + i), Q$8[$$8++] = 121, Q$8[$$8++] = i >> 8, Q$8[$$8++] = i & 255) : (a < 5 && Q$8.copyWithin($$8 + 5, $$8 + 3, $$8 + 3 + i), Q$8[$$8++] = 122, Qp.setUint32($$8, i), $$8 += 4), $$8 += i; } else if (r === `number`) if (!this.alwaysUseFloat && n >>> 0 === n) n < 24 ? Q$8[$$8++] = n : n < 256 ? (Q$8[$$8++] = 24, Q$8[$$8++] = n) : n < 65536 ? (Q$8[$$8++] = 25, Q$8[$$8++] = n >> 8, Q$8[$$8++] = n & 255) : (Q$8[$$8++] = 26, Qp.setUint32($$8, n), $$8 += 4); else if (!this.alwaysUseFloat && n >> 0 === n) n >= -24 ? Q$8[$$8++] = 31 - n : n >= -256 ? (Q$8[$$8++] = 56, Q$8[$$8++] = ~n) : n >= -65536 ? (Q$8[$$8++] = 57, Qp.setUint16($$8, ~n), $$8 += 2) : (Q$8[$$8++] = 58, Qp.setUint32($$8, ~n), $$8 += 4); else { let e; if ((e = this.useFloat32) > 0 && n < 4294967296 && n >= -2147483648) { Q$8[$$8++] = 250, Qp.setFloat32($$8, n); let t; if (e < 4 || (t = n * zp[(Q$8[$$8] & 127) << 1 | Q$8[$$8 + 1] >> 7]) >> 0 === t) { $$8 += 4; return; } else $$8--; } Q$8[$$8++] = 251, Qp.setFloat64($$8, n), $$8 += 8; } else if (r === `object`) if (!n) Q$8[$$8++] = 246; else { if (a) { let e = a.get(n); if (e) { if (Q$8[$$8++] = 216, Q$8[$$8++] = 29, Q$8[$$8++] = 25, !e.references) { let t = a.idsToInsert ||= []; e.references = [], t.push(e); } e.references.push($$8 - t), $$8 += 2; return; } else a.set(n, { offset: $$8 - t }); } let e = n.constructor; if (e === Object) y(n); else if (e === Array) { i = n.length, i < 24 ? Q$8[$$8++] = 128 | i : om(i); for (let e = 0; e < i; e++) v(n[e]); } else if (e === Map) if ((this.mapsAsObjects ? this.useTag259ForMaps !== !1 : this.useTag259ForMaps) && (Q$8[$$8++] = 217, Q$8[$$8++] = 1, Q$8[$$8++] = 3), i = n.size, i < 24 ? Q$8[$$8++] = 160 | i : i < 256 ? (Q$8[$$8++] = 184, Q$8[$$8++] = i) : i < 65536 ? (Q$8[$$8++] = 185, Q$8[$$8++] = i >> 8, Q$8[$$8++] = i & 255) : (Q$8[$$8++] = 186, Qp.setUint32($$8, i), $$8 += 4), s.keyMap) for (let [e, t] of n) v(s.encodeKey(e)), v(t); else for (let [e, t] of n) v(e), v(t); else { for (let e = 0, t = Wp.length; e < t; e++) { let t = Gp[e]; if (n instanceof t) { let t = Wp[e], r = t.tag; r ??= t.getTag && t.getTag.call(this, n), r < 24 ? Q$8[$$8++] = 192 | r : r < 256 ? (Q$8[$$8++] = 216, Q$8[$$8++] = r) : r < 65536 ? (Q$8[$$8++] = 217, Q$8[$$8++] = r >> 8, Q$8[$$8++] = r & 255) : r > -1 && (Q$8[$$8++] = 218, Qp.setUint32($$8, r), $$8 += 4), t.encode.call(this, n, v, b); return; } } if (n[Symbol.iterator]) { if (Zp) { let e = Error(`Iterable should be serialized as iterator`); throw e.iteratorNotHandled = !0, e; } Q$8[$$8++] = 159; for (let e of n) v(e); Q$8[$$8++] = 255; return; } if (n[Symbol.asyncIterator] || cm(n)) { let e = Error(`Iterable/blob should be serialized as iterator`); throw e.iteratorNotHandled = !0, e; } if (this.useToJSON && n.toJSON) { let e = n.toJSON(); if (e !== n) return v(e); } y(n); } } else if (r === `boolean`) Q$8[$$8++] = n ? 245 : 244; else if (r === `bigint`) { if (n < BigInt(1) << BigInt(64) && n >= 0) Q$8[$$8++] = 27, Qp.setBigUint64($$8, n); else if (n > -(BigInt(1) << BigInt(64)) && n < 0) Q$8[$$8++] = 59, Qp.setBigUint64($$8, -n - BigInt(1)); else if (this.largeBigIntToFloat) Q$8[$$8++] = 251, Qp.setFloat64($$8, Number(n)); else { n >= BigInt(0) ? Q$8[$$8++] = 194 : (Q$8[$$8++] = 195, n = BigInt(-1) - n); let e = []; for (; n;) e.push(Number(n & BigInt(255))), n >>= BigInt(8); fm(new Uint8Array(e.reverse()), b); return; } $$8 += 8; } else if (r === `undefined`) Q$8[$$8++] = 247; else throw Error(`Unknown type: ` + r); }, y = this.useRecords === !1 ? this.variableMapSize ? (e) => { let t = Object.keys(e), n = Object.values(e), r = t.length; if (r < 24 ? Q$8[$$8++] = 160 | r : r < 256 ? (Q$8[$$8++] = 184, Q$8[$$8++] = r) : r < 65536 ? (Q$8[$$8++] = 185, Q$8[$$8++] = r >> 8, Q$8[$$8++] = r & 255) : (Q$8[$$8++] = 186, Qp.setUint32($$8, r), $$8 += 4), s.keyMap) for (let e = 0; e < r; e++) v(s.encodeKey(t[e])), v(n[e]); else for (let e = 0; e < r; e++) v(t[e]), v(n[e]); } : (e) => { Q$8[$$8++] = 185; let n = $$8 - t; $$8 += 2; let r = 0; if (s.keyMap) for (let t in e) (typeof e.hasOwnProperty != `function` || e.hasOwnProperty(t)) && (v(s.encodeKey(t)), v(e[t]), r++); else for (let t in e) (typeof e.hasOwnProperty != `function` || e.hasOwnProperty(t)) && (v(t), v(e[t]), r++); Q$8[n++ + t] = r >> 8, Q$8[n + t] = r & 255; } : (e, t) => { let n, a = i.transitions ||= Object.create(null), o = 0, s = 0, c, u; if (this.keyMap) { u = Object.keys(e).map((e) => this.encodeKey(e)), s = u.length; for (let e = 0; e < s; e++) { let t = u[e]; n = a[t], n || (n = a[t] = Object.create(null), o++), a = n; } } else for (let t in e) (typeof e.hasOwnProperty != `function` || e.hasOwnProperty(t)) && (n = a[t], n || (a[nm] & 1048576 && (c = a[nm] & 65535), n = a[t] = Object.create(null), o++), a = n, s++); let d = a[nm]; if (d !== void 0) d &= 65535, Q$8[$$8++] = 217, Q$8[$$8++] = d >> 8 | 224, Q$8[$$8++] = d & 255; else if (u ||= a.__keys__ ||= Object.keys(e), c === void 0 ? (d = i.nextId++, d || (d = 0, i.nextId = 1), d >= 256 && (i.nextId = (d = l) + 1)) : d = c, i[d] = u, d < l) { Q$8[$$8++] = 217, Q$8[$$8++] = d >> 8 | 224, Q$8[$$8++] = d & 255, a = i.transitions; for (let e = 0; e < s; e++) (a[nm] === void 0 || a[nm] & 1048576) && (a[nm] = d), a = a[u[e]]; a[nm] = d | 1048576, r = !0; } else { if (a[nm] = d, Qp.setUint32($$8, 3655335680), $$8 += 3, o && (g += _ * o), h.length >= 256 - l && (h.shift()[nm] = void 0), h.push(a), om(s + 2), v(57344 + d), v(u), t) return; for (let t in e) (typeof e.hasOwnProperty != `function` || e.hasOwnProperty(t)) && v(e[t]); return; } if (s < 24 ? Q$8[$$8++] = 128 | s : om(s), !t) for (let t in e) (typeof e.hasOwnProperty != `function` || e.hasOwnProperty(t)) && v(e[t]); }, b = (e) => { let n; if (e > 16777216) { if (e - t > Xp) throw Error(`Encoded buffer would be larger than maximum buffer size`); n = Math.min(Xp, Math.round(Math.max((e - t) * (e > 67108864 ? 1.25 : 2), 4194304) / 4096) * 4096); } else n = (Math.max(e - t << 2, Q$8.length - 1) >> 12) + 1 << 12; let r = new Jp(n); return Qp = new DataView(r.buffer, 0, n), Q$8.copy ? Q$8.copy(r, 0, t, e) : r.set(Q$8.slice(t, e)), $$8 -= t, t = 0, $p = r.length - 10, Q$8 = r; }, x = 100, S = 1e3; this.encodeAsIterable = function(e, t) { return E(e, t, C); }, this.encodeAsAsyncIterable = function(e, t) { return E(e, t, D); }; function* C(e, n, r) { let i = e.constructor; if (i === Object) { let t = s.useRecords !== !1; t ? y(e, !0) : im(Object.keys(e).length, 160); for (let r in e) { let i = e[r]; t || v(r), i && typeof i == `object` ? n[r] ? yield* C(i, n[r]) : yield* w(i, n, r) : v(i); } } else if (i === Array) { let r = e.length; om(r); for (let i = 0; i < r; i++) { let r = e[i]; r && (typeof r == `object` || $$8 - t > x) ? n.element ? yield* C(r, n.element) : yield* w(r, n, `element`) : v(r); } } else if (e[Symbol.iterator] && !e.buffer) { Q$8[$$8++] = 159; for (let r of e) r && (typeof r == `object` || $$8 - t > x) ? n.element ? yield* C(r, n.element) : yield* w(r, n, `element`) : v(r); Q$8[$$8++] = 255; } else cm(e) ? (im(e.size, 64), yield Q$8.subarray(t, $$8), yield e, T()) : e[Symbol.asyncIterator] ? (Q$8[$$8++] = 159, yield Q$8.subarray(t, $$8), yield e, T(), Q$8[$$8++] = 255) : v(e); r && $$8 > t ? yield Q$8.subarray(t, $$8) : $$8 - t > x && (yield Q$8.subarray(t, $$8), T()); } function* w(e, n, r) { let i = $$8 - t; try { v(e), $$8 - t > x && (yield Q$8.subarray(t, $$8), T()); } catch (a) { if (a.iteratorNotHandled) n[r] = {}, $$8 = t + i, yield* C.call(this, e, n[r]); else throw a; } } function T() { x = S, s.encode(null, xm); } function E(e, t, n) { return x = t && t.chunkThreshold ? S = t.chunkThreshold : 100, e && typeof e == `object` ? (s.encode(null, xm), n(e, s.iterateProperties ||= {}, !0)) : [s.encode(e)]; } async function* D(e, t) { for (let n of C(e, t, !0)) { let e = n.constructor; if (e === Yp || e === Uint8Array) yield n; else if (cm(n)) { let e = n.stream().getReader(), t; for (; !(t = await e.read()).done;) yield t.value; } else if (n[Symbol.asyncIterator]) for await (let e of n) T(), e ? yield* D(e, t.async ||= {}) : yield s.encode(e); else yield n; } } } useBuffer(e) { Q$8 = e, Qp = new DataView(Q$8.buffer, Q$8.byteOffset, Q$8.byteLength), $$8 = 0; } clearSharedData() { this.structures &&= [], this.sharedValues &&= void 0; } updateSharedData() { let e = this.sharedVersion || 0; this.sharedVersion = e + 1; let t = this.structures.slice(0), n = new am(t, this.sharedValues, this.sharedVersion), r = this.saveShared(n, (t) => (t && t.version || 0) == e); return r === !1 ? (n = this.getShared() || {}, this.structures = n.structures || [], this.sharedValues = n.packedValues, this.sharedVersion = n.version, this.structures.nextId = this.structures.length) : t.forEach((e, t) => this.structures[t] = e), r; } }; function im(e, t) { e < 24 ? Q$8[$$8++] = t | e : e < 256 ? (Q$8[$$8++] = t | 24, Q$8[$$8++] = e) : e < 65536 ? (Q$8[$$8++] = t | 25, Q$8[$$8++] = e >> 8, Q$8[$$8++] = e & 255) : (Q$8[$$8++] = t | 26, Qp.setUint32($$8, e), $$8 += 4); } var am = class { constructor(e, t, n) { this.structures = e, this.packedValues = t, this.version = n; } }; function om(e) { e < 24 ? Q$8[$$8++] = 128 | e : e < 256 ? (Q$8[$$8++] = 152, Q$8[$$8++] = e) : e < 65536 ? (Q$8[$$8++] = 153, Q$8[$$8++] = e >> 8, Q$8[$$8++] = e & 255) : (Q$8[$$8++] = 154, Qp.setUint32($$8, e), $$8 += 4); } const sm = typeof Blob > `u` ? function() {} : Blob; function cm(e) { if (e instanceof sm) return !0; let t = e[Symbol.toStringTag]; return t === `Blob` || t === `File`; } function lm(e, t) { switch (typeof e) { case `string`: if (e.length > 3) { if (t.objectMap[e] > -1 || t.values.length >= t.maxValues) return; let n = t.get(e); if (n) ++n.count == 2 && t.values.push(e); else if (t.set(e, { count: 1 }), t.samplingPackedValues) { let n = t.samplingPackedValues.get(e); n ? n.count++ : t.samplingPackedValues.set(e, { count: 1 }); } } break; case `object`: if (e) if (e instanceof Array) for (let n = 0, r = e.length; n < r; n++) lm(e[n], t); else { let r = !t.encoder.useRecords; for (var n in e) e.hasOwnProperty(n) && (r && lm(n, t), lm(e[n], t)); } break; case `function`: console.log(e); } } const um = new Uint8Array(new Uint16Array([1]).buffer)[0] == 1; Gp = [ Date, Set, Error, RegExp, wp, ArrayBuffer, Uint8Array, Uint8ClampedArray, Uint16Array, Uint32Array, typeof BigUint64Array > `u` ? function() {} : BigUint64Array, Int8Array, Int16Array, Int32Array, typeof BigInt64Array > `u` ? function() {} : BigInt64Array, Float32Array, Float64Array, am ], Wp = [ { tag: 1, encode(e, t) { let n = e.getTime() / 1e3; (this.useTimestamp32 || e.getMilliseconds() === 0) && n >= 0 && n < 4294967296 ? (Q$8[$$8++] = 26, Qp.setUint32($$8, n), $$8 += 4) : (Q$8[$$8++] = 251, Qp.setFloat64($$8, n), $$8 += 8); } }, { tag: 258, encode(e, t) { t(Array.from(e)); } }, { tag: 27, encode(e, t) { t([e.name, e.message]); } }, { tag: 27, encode(e, t) { t([ `RegExp`, e.source, e.flags ]); } }, { getTag(e) { return e.tag; }, encode(e, t) { t(e.value); } }, { encode(e, t, n) { fm(e, n); } }, { getTag(e) { if (e.constructor === Uint8Array && (this.tagUint8Array || qp && this.tagUint8Array !== !1)) return 64; }, encode(e, t, n) { fm(e, n); } }, dm(68, 1), dm(69, 2), dm(70, 4), dm(71, 8), dm(72, 1), dm(77, 2), dm(78, 4), dm(79, 8), dm(85, 4), dm(86, 8), { encode(e, t) { let n = e.packedValues || [], r = e.structures || []; if (n.values.length > 0) { Q$8[$$8++] = 216, Q$8[$$8++] = 51, om(4); let e = n.values; t(e), om(0), om(0), packedObjectMap = Object.create(sharedPackedObjectMap || null); for (let t = 0, n = e.length; t < n; t++) packedObjectMap[e[t]] = t; } if (r) { Qp.setUint32($$8, 3655335424), $$8 += 3; let n = r.slice(0); n.unshift(57344), n.push(new wp(e.version, 1399353956)), t(n); } else t(new wp(e.version, 1399353956)); } } ]; function dm(e, t) { return !um && t > 1 && (e -= 4), { tag: e, encode: function(e, t) { let n = e.byteLength, r = e.byteOffset || 0, i = e.buffer || e; t(qp ? Kp.from(i, r, n) : new Uint8Array(i, r, n)); } }; } function fm(e, t) { let n = e.byteLength; n < 24 ? Q$8[$$8++] = 64 + n : n < 256 ? (Q$8[$$8++] = 88, Q$8[$$8++] = n) : n < 65536 ? (Q$8[$$8++] = 89, Q$8[$$8++] = n >> 8, Q$8[$$8++] = n & 255) : (Q$8[$$8++] = 90, Qp.setUint32($$8, n), $$8 += 4), $$8 + n >= Q$8.length && t($$8 + n), Q$8.set(e.buffer ? e : new Uint8Array(e), $$8), $$8 += n; } function pm(e, t) { let n, r = t.length * 2, i = e.length - r; t.sort((e, t) => e.offset > t.offset ? 1 : -1); for (let n = 0; n < t.length; n++) { let r = t[n]; r.id = n; for (let t of r.references) e[t++] = n >> 8, e[t] = n & 255; } for (; n = t.pop();) { let t = n.offset; e.copyWithin(t + r, t, i), r -= 2; let a = t + r; e[a++] = 216, e[a++] = 28, i = t; } return e; } function mm(e, t) { Qp.setUint32(em.position + e, $$8 - em.position - e + 1); let n = em; em = null, t(n[0]), t(n[1]); } let hm = new rm$1({ useRecords: !1 }); const gm = hm.encode; hm.encodeAsIterable, hm.encodeAsAsyncIterable; const { NEVER: _m, ALWAYS: vm, DECIMAL_ROUND: ym, DECIMAL_FIT: bm } = Hp, xm = 2048; var Sm = c$12(((e, t) => { let n = () => process.platform === `linux`, r = null; t.exports = { isLinux: n, getReport: () => { if (!r) if (n() && process.report) { let e = process.report.excludeNetwork; process.report.excludeNetwork = !0, r = process.report.getReport(), process.report.excludeNetwork = e; } else r = {}; return r; } }; })); var Cm = c$12(((e, n) => { let r = f$11(`fs`), i = 2048; n.exports = { LDD_PATH: `/usr/bin/ldd`, SELF_PATH: `/proc/self/exe`, readFileSync: (e) => { let t = r.openSync(e, `r`), n = Buffer.alloc(i), a = r.readSync(t, n, 0, i, 0); return r.close(t, () => {}), n.subarray(0, a); }, readFile: (e) => new Promise((t, n) => { r.open(e, `r`, (e, a) => { if (e) n(e); else { let e = Buffer.alloc(i); r.read(a, e, 0, i, 0, (n, i) => { t(e.subarray(0, i)), r.close(a, () => {}); }); } }); }) }; })); var wm = c$12(((e, t) => { t.exports = { interpreterPath: (e) => { if (e.length < 64 || e.readUInt32BE(0) !== 2135247942 || e.readUInt8(4) !== 2 || e.readUInt8(5) !== 1) return null; let t = e.readUInt32LE(32), n = e.readUInt16LE(54), r = e.readUInt16LE(56); for (let i = 0; i < r; i++) { let r = t + i * n; if (e.readUInt32LE(r) === 3) { let t = e.readUInt32LE(r + 8), n = e.readUInt32LE(r + 32); return e.subarray(t, t + n).toString().replace(/\0.*$/g, ``); } } return null; } }; })); var Tm = c$12(((e, n) => { let r = f$11(`child_process`), { isLinux: i, getReport: a } = Sm(), { LDD_PATH: o, SELF_PATH: s, readFile: c, readFileSync: l } = Cm(), { interpreterPath: u } = wm(), d, f, p, m = `getconf GNU_LIBC_VERSION 2>&1 || true; ldd --version 2>&1 || true`, h = ``, g = () => h || new Promise((e) => { r.exec(m, (t, n) => { h = t ? ` ` : n, e(h); }); }), _ = () => { if (!h) try { h = r.execSync(m, { encoding: `utf8` }); } catch { h = ` `; } return h; }, v = `glibc`, y = /LIBC[a-z0-9 \-).]*?(\d+\.\d+)/i, b = `musl`, x = (e) => e.includes(`libc.musl-`) || e.includes(`ld-musl-`), S = () => { let e = a(); return e.header && e.header.glibcVersionRuntime ? v : Array.isArray(e.sharedObjects) && e.sharedObjects.some(x) ? b : null; }, C = (e) => { let [t, n] = e.split(/[\r\n]+/); return t && t.includes(v) ? v : n && n.includes(b) ? b : null; }, w = (e) => { if (e) { if (e.includes(`/ld-musl-`)) return b; if (e.includes(`/ld-linux-`)) return v; } return null; }, T = (e) => (e = e.toString(), e.includes(`musl`) ? b : e.includes(`GNU C Library`) ? v : null), E = async () => { if (f !== void 0) return f; f = null; try { f = T(await c(o)); } catch {} return f; }, D = () => { if (f !== void 0) return f; f = null; try { f = T(l(o)); } catch {} return f; }, O = async () => { if (d !== void 0) return d; d = null; try { d = w(u(await c(s))); } catch {} return d; }, k = () => { if (d !== void 0) return d; d = null; try { d = w(u(l(s))); } catch {} return d; }, A = async () => { let e = null; return i() && (e = await O(), e || (e = await E(), e ||= S(), e ||= C(await g()))), e; }, j = () => { let e = null; return i() && (e = k(), e || (e = D(), e ||= S(), e ||= C(_()))), e; }, M = async () => i() && await A() !== v, N = () => i() && j() !== v, P = async () => { if (p !== void 0) return p; p = null; try { let e = (await c(o)).match(y); e && (p = e[1]); } catch {} return p; }, F = () => { if (p !== void 0) return p; p = null; try { let e = l(o).match(y); e && (p = e[1]); } catch {} return p; }, I = () => { let e = a(); return e.header && e.header.glibcVersionRuntime ? e.header.glibcVersionRuntime : null; }, ee = (e) => e.trim().split(/\s+/)[1], L = (e) => { let [t, n, r] = e.split(/[\r\n]+/); return t && t.includes(v) ? ee(t) : n && r && n.includes(b) ? ee(r) : null; }; n.exports = { GLIBC: v, MUSL: b, family: A, familySync: j, isNonGlibcLinux: M, isNonGlibcLinuxSync: N, version: async () => { let e = null; return i() && (e = await P(), e ||= I(), e ||= L(await g())), e; }, versionSync: () => { let e = null; return i() && (e = F(), e ||= I(), e ||= L(_())), e; } }; })); var Em = c$12(((e, n) => { var r = f$11(`fs`), i = f$11(`path`), a = f$11(`url`), o = process.config && process.config.variables || {}, s = !!process.env.PREBUILDS_ONLY, c = process.versions, l = c.modules; (c.deno || process.isBun) && (l = `unsupported`); var u = D() ? `electron` : `node`, d = process.arch, f = process.platform, p = process.env.LIBC || (O(f) ? `musl` : `glibc`), m = process.env.ARM_VERSION || (d === `arm64` ? `8` : o.arm_version) || ``, h = (c.uv || ``).split(`.`)[0]; n.exports = g; function g(e) { return typeof __webpack_require__ == `function` ? __non_webpack_require__(g.path(e)) : f$11(g.path(e)); } g.path = function(e) { e = i.resolve(e || `.`); var n = ``; try { n = typeof __webpack_require__ == `function` ? __non_webpack_require__(i.join(e, `package.json`)).name : f$11(i.join(e, `package.json`)).name; var r = n.toUpperCase().replace(/-/g, `_`) + `_PREBUILD`; process.env[r] && (e = process.env[r]); } catch {} if (!s) { var o = v(i.join(e, `build/Release`), y); if (o) return o; var c = v(i.join(e, `build/Debug`), y); if (c) return c; } var g = k(e); if (g) return g; var T = k(i.dirname(process.execPath)); if (T) return T; var D = (n[0] == `@` ? `` : `@` + n + `/`) + n + `-` + f + `-` + d; try { return A(i.dirname(f$11(`module`).createRequire(a.pathToFileURL(i.join(e, `package.json`))).resolve(D))); } catch {} var O = [ `platform=` + f, `arch=` + d, `runtime=` + u, `abi=` + l, `uv=` + h, m ? `armv=` + m : ``, `libc=` + p, `node=` + process.versions.node, process.versions.electron ? `electron=` + process.versions.electron : ``, typeof __webpack_require__ == `function` ? `webpack=true` : `` ].filter(Boolean).join(` `); throw Error(`No native build was found for ` + O + ` attempted loading from: ` + e + ` and package: ` + D + ` `); function k(e) { var t = _(i.join(e, `prebuilds`)).map(b).filter(x(f, d)).sort(S)[0]; if (t) return A(i.join(e, `prebuilds`, t.name)); } function A(e) { var t = _(e).map(C).filter(w(u, l)).sort(E(u))[0]; if (t) return i.join(e, t.file); } }; function _(e) { try { return r.readdirSync(e); } catch { return []; } } function v(e, t) { var n = _(e).filter(t); return n[0] && i.join(e, n[0]); } function y(e) { return /\.node$/.test(e); } function b(e) { var t = e.split(`-`); if (t.length === 2) { var n = t[0], r = t[1].split(`+`); if (n && r.length && r.every(Boolean)) return { name: e, platform: n, architectures: r }; } } function x(e, t) { return function(n) { return n == null || n.platform !== e ? !1 : n.architectures.includes(t); }; } function S(e, t) { return e.architectures.length - t.architectures.length; } function C(e) { var t = e.split(`.`), n = t.pop(), r = { file: e, specificity: 0 }; if (n === `node`) { for (var i = 0; i < t.length; i++) { var a = t[i]; if (a === `node` || a === `electron` || a === `node-webkit`) r.runtime = a; else if (a === `napi`) r.napi = !0; else if (a.slice(0, 3) === `abi`) r.abi = a.slice(3); else if (a.slice(0, 2) === `uv`) r.uv = a.slice(2); else if (a.slice(0, 4) === `armv`) r.armv = a.slice(4); else if (a === `glibc` || a === `musl`) r.libc = a; else continue; r.specificity++; } return r; } } function w(e, t) { return function(n) { return !(n == null || n.runtime !== e && !T(n) || n.abi !== t && !n.napi || n.uv && n.uv !== h || n.armv && n.armv !== m || n.libc && n.libc !== p); }; } function T(e) { return e.runtime === `node` && e.napi; } function E(e) { return function(t, n) { return t.runtime === n.runtime ? t.abi === n.abi ? t.specificity === n.specificity ? 0 : t.specificity > n.specificity ? -1 : 1 : t.abi ? -1 : 1 : t.runtime === e ? -1 : 1; }; } function D() { return process.versions && process.versions.electron || process.env.ELECTRON_RUN_AS_NODE ? !0 : typeof window < `u` && window.process && window.process.type === `renderer`; } function O(e) { if (e !== `linux`) return !1; let { familySync: t, MUSL: n } = Tm(); return t() === n; } g.parseTags = C, g.matchTags = w, g.compareTags = E, g.parseTuple = b, g.matchTuple = x, g.compareTuples = S; })); var Dm = c$12(((e, t) => { t.exports = Em()(__dirname); })); if (!(process.env.CBOR_NATIVE_ACCELERATION_DISABLED !== void 0 && process.env.CBOR_NATIVE_ACCELERATION_DISABLED.toLowerCase() === `true`)) { let e; try { e = typeof f$11 == `function` ? Dm() : createRequire$1(import.meta.url)(`cbor-extract`), e && hp(e.extractStrings); } catch {} } const Om = `5.0.0-beta.20`; const km = typeof process < `u` && typeof process.env.DEBUG == `string` && (process.env.DEBUG.includes(`workflow:`) || process.env.DEBUG === `*`); function Am(e, t, n, r) { if (km) { let i = jm(n), a = i.length > 0 ? `; ${i.join(`; `)}` : ``; console.debug(`[workflow:world-vercel:http] ${e} ${t} -> ${n.status} (${r}ms${a})`); } } function jm(e) { return [`x-vercel-id`, `x-vercel-error`].flatMap((t) => { let n = e.headers.get(t); return n ? [`${t}=${n}`] : []; }); } function Mm(e) { let t = jm(e); return t.length > 0 ? ` (${t.join(`; `)})` : ``; } const Nm = /* @__PURE__ */ new Set([`GET`, `HEAD`]); const Pm = () => process.env.VERCEL_WORKFLOW_SERVER_URL || ``; function Fm(e) { return e; } const Im = () => { let e = process.env.VERCEL_DEPLOYMENT_ID; return e ? `@workflow/world-vercel/${Om} node-${process.version} ${pr.platform()} (${pr.arch()}) ${e}` : `@workflow/world-vercel/${Om} node-${process.version} ${pr.platform()} (${pr.arch()})`; }; const Lm = (e) => { let t = e?.projectConfig, n = Pm() || `https://vercel-workflow.com`, r = process.env.WORKFLOW_VERCEL_BACKEND_URL, i = !!(t?.projectId && t?.teamId); return { baseUrl: i ? r || `https://api.vercel.com/v1/workflow` : `${n}/api`, usingProxy: i }; }; const Rm = (e, t) => { let n = e?.projectConfig, r = new Headers(e?.headers); r.set(`User-Agent`, Im()), n && (r.set(`x-vercel-environment`, n.environment || `production`), n.projectId && r.set(`x-vercel-project-id`, n.projectId), n.teamId && r.set(`x-vercel-team-id`, n.teamId)); let i = Pm(); return i && t.usingProxy && r.set(`x-vercel-workflow-api-url`, i), r; }; async function zm(e) { let { baseUrl: t, usingProxy: n } = Lm(e), r = Rm(e, { usingProxy: n }); if (n) { if (!e?.token) throw Error(`world-vercel: api-workflow proxy requested (${t}) but no Vercel auth token was provided. Pass one as \`config.token\` (the SDK reads it from \`WORKFLOW_VERCEL_AUTH_TOKEN\`).`); r.set(`Authorization`, `Bearer ${e.token}`); } else { let t; try { t = await (0, hc$1.getVercelOidcToken)(); } catch {} let n = e?.token ?? t; n && r.set(`Authorization`, `Bearer ${n}`), t && r.set(`x-vercel-trusted-oidc-idp-token`, t); } return { baseUrl: t, headers: r, usingProxy: n }; } async function Bm({ endpoint: e, options: t = {}, config: n = {}, schema: r, data: i, onResponse: a }) { let o = t.method || `GET`, { baseUrl: s, headers: c } = await zm(n), l = `${s}${e}`, u, d; try { let e = new URL(l); u = e.hostname, d = e.port ? parseInt(e.port, 10) : e.protocol === `https:` ? 443 : 80; } catch {} return Ec$1(`http ${o}`, { kind: await Dc$1(`CLIENT`) }, async (s) => { s?.setAttributes({ ...Ac$1(o), ...jc$1(l), ...u && Mc$1(u), ...d && Nc$1(d), ...Lc$1(`workflow-server`), ...Rc$1(`http`), ...zc$1(`workflow-server`) }), c.set(`Accept`, `application/cbor`), await Oc$1(c); let f; i !== void 0 && (c.set(`Content-Type`, `application/cbor`), f = gm(i)); let m = Nm.has(o.toUpperCase()), h, g = ``; for (let r = 0;; r++) { c.set(`X-Request-Time`, Date.now().toString()); let i = AbortSignal.timeout(6e4), u = t.signal ? AbortSignal.any([t.signal, i]) : i, d = new Request(l, { ...t, body: f, headers: c, signal: u }), _ = Date.now(), y; try { y = await fetch(d, { dispatcher: _c$1(n) }); } catch (t) { let n = Date.now() - _; if (t instanceof Error && (t.name === `TimeoutError` || t.name === `AbortError`)) { let r = new s$8(`${o} ${e} timed out after ${n}ms`, { url: l, cause: t }); throw s?.setAttributes({ ...Fc$1(`TIMEOUT`) }), s?.recordException?.(r), r; } throw t; } let S = Date.now() - _; if (g = Mm(y), Am(o, e, y, S), s?.setAttributes({ ...Pc$1(y.status) }), !y.ok) { let t = await Hm(y).then((e) => e.data).catch(() => ({})); if (process.env.DEBUG) { let e = Array.from(c.entries()).filter(([e]) => e.toLowerCase() !== `authorization`).map(([e, t]) => `-H "${e}: ${t}"`).join(` `); console.error(`Failed to fetch, reproduce with:\ncurl -X ${d.method} ${e} "${l}"`); } let n, r = y.headers.get(`Retry-After`); if (r) { let e = parseInt(r, 10); Number.isNaN(e) || (n = e); } let i = (t.message || `${d.method} ${e} -> HTTP ${y.status}: ${y.statusText}`) + g, a = (e) => { throw s?.setAttributes({ ...Fc$1(t.code || `HTTP ${y.status}`) }), s?.recordException?.(e), e; }; y.status === 409 && a(new x$9(i)), y.status === 410 && a(new S$10(i)), y.status === 425 && a(new C$11(i, { retryAfter: n })), y.status === 429 && a(new w$11(i, { retryAfter: n })), a(new s$8(i, { url: l, status: y.status, code: t.code, retryAfter: n })); } a?.(y); try { h = await Ec$1(`world.parse`, async (e) => { let t = await Hm(y), n = (y.headers.get(`Content-Type`) || ``).includes(`application/cbor`); return e?.setAttributes({ ...Ic$1(n ? `cbor` : `json`) }), t; }); break; } catch (t) { if (m && r < 2) { let n = 100 * 2 ** r; s?.setAttributes({ ...Fc$1(`PARSE_ERROR_RETRYING`) }), km && console.debug(`[workflow:world-vercel:http] ${o} ${e} body parse failed (attempt ${r + 1}/3); retrying in ${n}ms: ${t}`), await new Promise((e) => setTimeout(e, n)); continue; } let n = y.headers.get(`Content-Type`) || `unknown`; throw new s$8(`Failed to parse response body for ${o} ${e}${g} (Content-Type: ${n}):\n\n${t}`, { url: l, code: `PARSE_ERROR`, cause: t }); } } return await Ec$1(`world.validate`, async () => { let t = r.safeParse(h.data); if (!t.success) { let n = t.error.issues.map((e) => ` ${e.path.length > 0 ? e.path.join(`.`) : ``}: ${e.message}`).join(` `), r = process.env.DEBUG ? `\n\nResponse context: ${h.getDebugContext()}` : ``; throw new s$8(`Schema validation failed for ${o} ${e}${g}:\n${n}${r}`, { url: l, code: `SCHEMA_VALIDATION`, cause: t.error }); } return t.data; }); }); } function Vm(e) { let t = inspect(e, { depth: 3, maxArrayLength: 10, breakLength: 120 }); return t.length > 500 ? `${t.slice(0, 500)}...` : t; } async function Hm(e) { let t = e.headers.get(`Content-Type`) || ``; if (t.includes(`application/cbor`)) { let n = await e.arrayBuffer(), r = Vp(new Uint8Array(n)); return { data: r, getDebugContext: () => `Content-Type: ${t}, ${n.byteLength} bytes (CBOR), preview: ${Vm(r)}` }; } let n = await e.text(), r = JSON.parse(n); return { data: r, getDebugContext: () => `Content-Type: ${t}, ${n.length} bytes, preview: ${Vm(r)}` }; } var Um = class { contentType = `application/cbor`; serialize(e) { return Buffer.from(gm(e)); } async deserialize(e) { let t = [], n = e.getReader(); for (;;) { let { done: e, value: r } = await n.read(); if (e) break; r && t.push(r); } return Vp(Buffer.concat(t)); } }; var Wm = class { contentType = `application/json`; serialize(e) { return Buffer.from(JSON.stringify(e)); } async deserialize(e) { let t = [], n = e.getReader(); for (;;) { let { done: e, value: r } = await n.read(); if (e) break; r && t.push(r); } return JSON.parse(Buffer.concat(t).toString()); } }; var Gm = class { contentType = `application/cbor`; serialize(e) { return Buffer.from(gm(e)); } async deserialize(e) { let t = [], n = e.getReader(); for (;;) { let { done: e, value: r } = await n.read(); if (e) break; r && t.push(r); } let r = Buffer.concat(t); try { return Vp(r); } catch { return JSON.parse(r.toString()); } } }; const Km = new AsyncLocalStorage(); const qm = V$8({ payload: ph$1, queueName: nh$1, deploymentId: R$8().optional() }); const Jm = Number(process.env.VERCEL_QUEUE_MAX_DELAY_SECONDS || 82800); function Ym(e) { let t = Math.min(Math.max(1, 2 ** (e - 1)), 60), n = Math.floor(Math.random() * (Math.ceil(t * .25) + 1)); return Math.max(1, t - n); } function Xm(e) { let t = {}; return `runId` in e && typeof e.runId == `string` && (t[`x-vercel-workflow-run-id`] = e.runId), `workflowRunId` in e && typeof e.workflowRunId == `string` && (t[`x-vercel-workflow-run-id`] = e.workflowRunId), `stepId` in e && typeof e.stepId == `string` && (t[`x-vercel-workflow-step-id`] = e.stepId), Object.keys(t).length > 0 ? t : void 0; } function Zm(e) { let { baseUrl: t, usingProxy: n } = Lm(e), r = Rm(e, { usingProxy: n }), i = new Um(), a = new Wm(), o = new Gm(), s = { region: `iad1`, dispatcher: _c$1(e), transport: o, ...n && { resolveBaseUrl: () => new URL(`${t}/queues-proxy`), token: e?.token }, headers: Object.fromEntries(r.entries()) }, c = async (e, t, n) => { let r = n?.deploymentId ?? process.env.VERCEL_DEPLOYMENT_ID; if (!r) throw Error(`No deploymentId provided and VERCEL_DEPLOYMENT_ID environment variable is not set. Queue messages require a deployment ID to route correctly. Either set VERCEL_DEPLOYMENT_ID or provide deploymentId in options.`); let o = (n?.specVersion ?? 5) >= 3 ? i : a, c = new zf({ ...s, deploymentId: r, transport: o }), l = { payload: t, queueName: e, deploymentId: n?.deploymentId }, u = e.replace(/[^A-Za-z0-9-_]/g, `-`); try { let { messageId: e } = await c.send(u, l, { idempotencyKey: n?.idempotencyKey, delaySeconds: n?.delaySeconds, headers: { ...Xm(t), ...n?.headers } }); return { messageId: e ? sh$1.parse(e) : null }; } catch (e) { if (e instanceof id$1) return { messageId: sh$1.parse(`msg_duplicate_${e.idempotencyKey ?? n?.idempotencyKey ?? `unknown`}`) }; throw e; } }; return { queue: c, createQueueHandler: (e, t) => { let n = new zf(s).handleCallback(async (e, n) => { if (!e || !n) return; let r = Km.getStore(), { payload: i, queueName: a, deploymentId: o } = qm.parse(e), s = await t(i, { queueName: a, messageId: sh$1.parse(n.messageId), attempt: n.deliveryCount, requestId: r }); typeof s?.timeoutSeconds == `number` && await c(a, i, { deploymentId: o, delaySeconds: s.timeoutSeconds > 0 ? Math.min(s.timeoutSeconds, Jm) : void 0 }); }, { retry: (e, { deliveryCount: t }) => ({ afterSeconds: Ym(t) }) }); return async (e) => { let t = e.headers.get(`x-vercel-id`)?.trim() || void 0; return Km.run(t, () => n(e)); }; }, getDeploymentId: async () => { let e = process.env.VERCEL_DEPLOYMENT_ID; if (!e) throw Error(`VERCEL_DEPLOYMENT_ID environment variable is not set`); return e; } }; } const Qm = V$8({ id: R$8() }); function $m(e) { return async function() { let t = process.env.VERCEL_DEPLOYMENT_ID; if (!t) throw Error(`Cannot resolve latest deployment: VERCEL_DEPLOYMENT_ID environment variable is not set`); let n = e?.token ?? process.env.VERCEL_TOKEN ?? await (0, hc$1.getVercelOidcToken)().catch(() => null); if (!n) throw Error(`Cannot resolve latest deployment: no OIDC token or VERCEL_TOKEN available`); let r = `https://api.vercel.com/v1/workflow/resolve-latest-deployment/${encodeURIComponent(t)}`, i = await fetch(r, { method: `GET`, headers: { Authorization: `Bearer ${n}` }, dispatcher: _c$1(e) }); if (!i.ok) { let e; try { e = await i.text(); } catch { e = ``; } throw Error(`Failed to resolve latest deployment for ${t}: HTTP ${i.status} ${i.statusText}${e ? ` — ${e}` : ``}`); } let a = await i.json(), o = Qm.safeParse(a); if (!o.success) throw Error(`Invalid response from Vercel API: expected { id: string }. Zod error: ${o.error.message}`); return o.data.id; }; } const eh = `application/vnd.workflow.v4-frames`; function th(e, t) { let n = new Uint8Array(gm(e)), r = new Uint8Array(4 + n.byteLength + 4 + t.byteLength), i = new DataView(r.buffer); return i.setUint32(0, n.byteLength, !1), r.set(n, 4), i.setUint32(4 + n.byteLength, t.byteLength, !1), r.set(t, 4 + n.byteLength + 4), r; } async function* nh(e) { let t = Symbol.asyncIterator in e ? e[Symbol.asyncIterator]() : rh(e.getReader()), n = /* @__PURE__ */ new Uint8Array(), r = async (e) => { for (; n.byteLength < e;) { let { done: e, value: r } = await t.next(); if (e) return !1; if (!r || r.byteLength === 0) continue; let i = new Uint8Array(n.byteLength + r.byteLength); i.set(n, 0), i.set(r, n.byteLength), n = i; } return !0; }, i = (e) => { let t = n.subarray(0, e); return n = n.subarray(e), t; }; for (;;) { if (!await r(4)) return; let e = new DataView(n.buffer, n.byteOffset, 4).getUint32(0, !1); if (i(4), !await r(e)) throw Error(`decodeFrames: truncated meta block`); let t = Vp(i(e)); if (!await r(4)) throw Error(`decodeFrames: truncated body length`); let a = new DataView(n.buffer, n.byteOffset, 4).getUint32(0, !1); if (i(4), a > 0) { if (!await r(a)) throw Error(`decodeFrames: truncated body bytes`); yield { meta: t, body: n.slice(0, a) }, i(a); } else yield { meta: t, body: /* @__PURE__ */ new Uint8Array() }; if (t._end === 1) return; } } async function* rh(e) { for (;;) { let { done: t, value: n } = await e.read(); if (t) return; n && (yield n); } } async function ih(e, t, n) { return t.headers.set(`X-Request-Time`, Date.now().toString()), await Oc$1(t.headers), fetch(e, { method: t.method, headers: t.headers, body: t.body, dispatcher: _c$1(n) }); } function ah(e) { let t = {}; return e.forEach((e, n) => { t[n] = e; }), t; } const oh = { eventId: `x-wf-event-id`, runId: `x-wf-run-id`, createdAt: `x-wf-created-at` }; function sh(e) { let t = { eventType: e.eventType, specVersion: e.specVersion }; return e.correlationId !== void 0 && (t.correlationId = e.correlationId), e.vercelId !== void 0 && (t.vercelId = e.vercelId), e.occurredAt !== void 0 && (t.occurredAt = e.occurredAt), e.remoteRefBehavior !== void 0 && (t.remoteRefBehavior = e.remoteRefBehavior), e.deploymentId !== void 0 && (t.deploymentId = e.deploymentId), e.workflowName !== void 0 && (t.workflowName = e.workflowName), e.stepName !== void 0 && (t.stepName = e.stepName), e.attempt !== void 0 && (t.attempt = e.attempt), e.resumeAt !== void 0 && (t.resumeAt = e.resumeAt), e.retryAfter !== void 0 && (t.retryAfter = e.retryAfter), e.hookToken !== void 0 && (t.hookToken = e.hookToken), e.hookIsWebhook !== void 0 && (t.hookIsWebhook = e.hookIsWebhook), e.hookIsSystem !== void 0 && (t.hookIsSystem = e.hookIsSystem), e.errorCode !== void 0 && (t.errorCode = e.errorCode), e.executionContext !== void 0 && (t.executionContext = e.executionContext), e.attributes !== void 0 && (t.attributes = e.attributes), e.changes !== void 0 && (t.changes = e.changes), e.writer !== void 0 && (t.writer = e.writer), e.allowReservedAttributes !== void 0 && (t.allowReservedAttributes = e.allowReservedAttributes), e.sinceCursor !== void 0 && (t.sinceCursor = e.sinceCursor), e.skipPreload !== void 0 && (t.skipPreload = e.skipPreload), t; } function ch(e, t, n, r, i) { let a = `v4 ${r} failed: HTTP ${e}`, o; try { let e = JSON.parse(n); typeof e.message == `string` && (a = e.message), typeof e.code == `string` && (o = e.code); } catch { n && (a += ` ${n}`); } let s, c = uh(t, `retry-after`); if (c) { let e = parseInt(c, 10); Number.isNaN(e) || (s = e); } throw e === 409 ? new x$9(a) : e === 410 ? new S$10(a) : e === 425 ? new C$11(a, { retryAfter: s }) : e === 429 ? new w$11(a, { retryAfter: s }) : new s$8(a, { status: e, code: o, url: i, retryAfter: s }); } async function lh(e, t) { let { baseUrl: n, headers: r } = await zm(t), i = new Headers(r); i.set(`Content-Type`, `application/octet-stream`); let a = th(sh(e), e.payload ?? /* @__PURE__ */ new Uint8Array()), o = `${n}/v4/runs/${encodeURIComponent(e.runId)}/events/${encodeURIComponent(e.eventType)}`, s = await ih(o, { method: `POST`, headers: i, body: a }, t); if (!s.ok) { let e = await s.text(); ch(s.status, ah(s.headers), e, `createEvent`, o); } let c = s.headers.get(oh.eventId), l = s.headers.get(oh.runId), u = s.headers.get(oh.createdAt); if (typeof c != `string` || typeof l != `string` || typeof u != `string`) throw Error(`v4 createEvent: response missing required x-wf-* headers`); let d = new Uint8Array(await s.arrayBuffer()); return { eventId: c, runId: l, createdAt: u, body: d.byteLength > 0 ? Vp(d) : {} }; } function uh(e, t) { let n = e[t]; if (typeof n == `string`) return n; if (Array.isArray(n) && n.length > 0) return n[0]; } async function dh(e, t, n) { let { baseUrl: r, headers: i } = await zm(n), a = `${r}/v4/runs/${encodeURIComponent(e)}/events/${encodeURIComponent(t)}`, o = await ih(a, { method: `GET`, headers: i }, n); if (!o.ok) { let e = await o.text(); ch(o.status, ah(o.headers), e, `getEvent`, a); } let s = o.headers.get(`content-type`); if (!s?.startsWith(`application/vnd.workflow.v4-frames`)) throw Error(`v4 getEvent: expected ${eh}, got ${s ?? `(none)`}`); let c = o.body; for await (let e of nh(c)) return { event: e.meta, body: e.body }; throw Error(`v4 getEvent: empty frame stream for ${t}`); } async function fh(e, t, n, r) { let i = await ih(e, { method: `GET`, headers: t }, n); if (!i.ok) { let t = await i.text(); ch(i.status, ah(i.headers), t, r, e); } let a = i.headers.get(`content-type`); if (!a?.startsWith(`application/vnd.workflow.v4-frames`)) throw Error(`v4 ${r}: expected ${eh}, got ${a ?? `(none)`}`); let o = i.body, s = [], c, l, u = !1; for await (let e of nh(o)) { if (e.meta._end === 1) { typeof e.meta.next == `string` && (c = e.meta.next), typeof e.meta.hasMore == `boolean` && (l = e.meta.hasMore), u = !0; break; } s.push({ event: e.meta, body: e.body }); } if (!u) throw Error(`v4 ${r}: frame stream ended without the end-of-stream sentinel (${s.length} events read) — truncated response?`); return { events: s, ...c ? { next: c } : {}, ...l === void 0 ? {} : { hasMore: l } }; } function ph(e, t) { t.cursor && e.set(`cursor`, t.cursor), t.limit !== void 0 && e.set(`limit`, String(t.limit)), t.sortOrder && e.set(`sortOrder`, t.sortOrder), t.remoteRefBehavior && e.set(`remoteRefBehavior`, t.remoteRefBehavior); } function mh(e) { let t = new URLSearchParams(); ph(t, e); let n = t.toString(); return n ? `?${n}` : ``; } async function hh(e, t = {}, n) { let { baseUrl: r, headers: i } = await zm(n); return fh(`${r}/v4/runs/${encodeURIComponent(e)}/events` + mh(t), i, n, `listEvents`); } async function gh(e, t = {}, n) { let { baseUrl: r, headers: i } = await zm(n), a = new URLSearchParams(); return a.set(`correlationId`, e), ph(a, t), fh(`${r}/v4/events?${a.toString()}`, i, n, `listEventsByCorrelationId`); } const _h = gh$1.omit({ error: !0, errorCode: !0 }).extend({ error: Yf$1([q$7, Nf$1()]).optional(), errorCode: R$8().optional(), blobStorageBytes: B$9().optional(), streamStorageBytes: B$9().optional() }); const vh = _h; const yh = _h.omit({ input: !0, output: !0 }).extend({ inputRef: Nf$1().optional(), outputRef: Nf$1().optional(), input: Yf$1([am$1(Uint8Array), Nf$1()]).optional(), output: Yf$1([am$1(Uint8Array), Nf$1()]).optional() }); function bh(e, t) { if (t === `none`) { let { inputRef: t, outputRef: n, ...r } = e; return { ...Fm(r), input: void 0, output: void 0 }; } return Fm(e); } async function xh(e = {}, t) { let { workflowName: n, status: r, pagination: i, resolveData: a = `all` } = e, o = new URLSearchParams(); n && o.set(`workflowName`, n), r && o.set(`status`, r), i?.limit && o.set(`limit`, i.limit.toString()), i?.cursor && o.set(`cursor`, i.cursor), i?.sortOrder && o.set(`sortOrder`, i.sortOrder); let s = a === `none` ? `lazy` : `resolve`; o.set(`remoteRefBehavior`, s); let c = o.toString(), l = await Bm({ endpoint: `/v2/runs${c ? `?${c}` : ``}`, options: { method: `GET` }, config: t, schema: yh$1(s === `lazy` ? yh : vh) }); return { ...l, data: l.data.map((e) => bh(e, a)) }; } async function Sh(e, t) { return Fm(await Bm({ endpoint: `/v1/runs/create`, options: { method: `POST` }, data: e, config: t, schema: vh })); } async function Ch(e, t, n) { let r = t?.resolveData ?? `all`, i = r === `none` ? `lazy` : `resolve`, a = new URLSearchParams(); a.set(`remoteRefBehavior`, i); let o = a.toString(), s = `/v2/runs/${encodeURIComponent(e)}${o ? `?${o}` : ``}`; try { return bh(await Bm({ endpoint: s, options: { method: `GET` }, config: n, schema: i === `lazy` ? yh : vh }), r); } catch (t) { throw t instanceof s$8 && t.status === 404 ? new v$8(e) : t; } } async function wh(e, t, n) { let r = t?.resolveData ?? `all`, i = r === `none` ? `lazy` : `resolve`, a = new URLSearchParams(); a.set(`remoteRefBehavior`, i); let o = a.toString(), s = `/v1/runs/${encodeURIComponent(e)}/cancel${o ? `?${o}` : ``}`; try { return bh(await Bm({ endpoint: s, options: { method: `PUT` }, config: n, schema: i === `lazy` ? yh : vh }), r); } catch (t) { throw t instanceof s$8 && t.status === 404 ? new v$8(e) : t; } } const Th = V$8({ attributes: H$8(R$8(), R$8()) }); async function Eh(e, t, n, r) { try { return { attributes: (await Bm({ endpoint: `/v2/runs/${encodeURIComponent(e)}/attributes`, options: { method: `POST` }, data: n?.allowReservedAttributes ? { changes: t, allowReservedAttributes: !0 } : { changes: t }, config: r, schema: Th })).attributes }; } catch (t) { throw t instanceof s$8 && t.status === 404 ? new v$8(e) : t; } } const Dh = Ch$1.omit({ error: !0 }).extend({ error: Yf$1([q$7, Nf$1()]).optional(), errorRef: Nf$1().optional() }); const Oh = Dh.omit({ input: !0, output: !0 }).extend({ inputRef: Nf$1().optional(), outputRef: Nf$1().optional(), input: am$1(Uint8Array).optional(), output: am$1(Uint8Array).optional() }); function kh(e) { let { error: t, errorRef: n, ...r } = e, i = { ...r }, a = t ?? n; return a != null && (i.error = a), i; } function Ah(e, t) { if (t === `none`) { let { inputRef: t, outputRef: n, ...r } = e; return { ...kh(r), input: void 0, output: void 0 }; } return kh(e); } async function jh(e, t) { let { runId: n, pagination: r, resolveData: i = `all` } = e, a = new URLSearchParams(); r?.cursor && a.set(`cursor`, r.cursor), r?.limit && a.set(`limit`, r.limit.toString()), r?.sortOrder && a.set(`sortOrder`, r.sortOrder); let o = i === `none` ? `lazy` : `resolve`; a.set(`remoteRefBehavior`, o); let s = a.toString(), c = await Bm({ endpoint: `/v2/runs/${encodeURIComponent(n)}/steps${s ? `?${s}` : ``}`, options: { method: `GET` }, config: t, schema: yh$1(o === `lazy` ? Oh : Dh) }); return { ...c, data: c.data.map((e) => Ah(e, i)) }; } async function Mh(e, t, n, r) { let i = n?.resolveData ?? `all`, a = i === `none` ? `lazy` : `resolve`, o = new URLSearchParams(); o.set(`remoteRefBehavior`, a); let s = o.toString(); return Ah(await Bm({ endpoint: `/v2/runs/${encodeURIComponent(e)}/steps/${encodeURIComponent(t)}${s ? `?${s}` : ``}`, options: { method: `GET` }, config: r, schema: a === `lazy` ? Oh : Dh }), i); } const Nh = { run_created: `input`, run_started: `input`, run_completed: `output`, run_failed: `error`, step_created: `input`, step_started: `input`, step_completed: `result`, step_failed: `error`, step_retrying: `error`, hook_created: `metadata`, hook_received: `payload` }; function Ph(e) { return Nh[e]; } const Fh = /* @__PURE__ */ new Set([ `run_created`, `run_started`, `step_started` ]); const Ih = /* @__PURE__ */ new Set([`hook_disposed`, `hook_received`]); function Lh(e) { let t = e.eventData ?? {}, n = Ph(e.eventType), r = {}; if (typeof t.deploymentId == `string` && (r.deploymentId = t.deploymentId), typeof t.workflowName == `string` && (r.workflowName = t.workflowName), typeof t.stepName == `string` && (r.stepName = t.stepName), typeof t.attempt == `number` && (r.attempt = t.attempt), t.resumeAt instanceof Date) r.resumeAt = t.resumeAt; else if (typeof t.resumeAt == `string`) { let e = new Date(t.resumeAt); Number.isNaN(e.getTime()) || (r.resumeAt = e); } if (t.retryAfter instanceof Date) r.retryAfter = t.retryAfter; else if (typeof t.retryAfter == `string`) { let e = new Date(t.retryAfter); Number.isNaN(e.getTime()) || (r.retryAfter = e); } typeof t.token == `string` && (r.hookToken = t.token), typeof t.isWebhook == `boolean` && (r.hookIsWebhook = t.isWebhook), typeof t.isSystem == `boolean` && (r.hookIsSystem = t.isSystem), typeof t.errorCode == `string` && (r.errorCode = t.errorCode), t.executionContext !== void 0 && t.executionContext !== null && typeof t.executionContext == `object` && (r.executionContext = t.executionContext), t.attributes !== void 0 && t.attributes !== null && typeof t.attributes == `object` && (r.attributes = t.attributes), Array.isArray(t.changes) && (r.changes = t.changes), t.writer !== void 0 && t.writer !== null && typeof t.writer == `object` && (r.writer = t.writer), typeof t.allowReservedAttributes == `boolean` && (r.allowReservedAttributes = t.allowReservedAttributes); let i; if (n && n in t) { let r = t[n]; if (r !== void 0) { if (!(r instanceof Uint8Array)) throw TypeError(`world-vercel v4: eventData.${n} for ${e.eventType} must be a Uint8Array (the runtime's dehydrated wire form); got ${typeof r == `object` ? r === null ? `null` : r.constructor?.name ?? typeof r : typeof r}.`); i = r; } } return { payload: i, meta: r }; } function Rh(e) { let t = $m$1.safeParse(e); return t.success ? t.data : (Pm$1.safeParse(e.eventType).success && console.debug(`[workflow:world-vercel] v4 event ${e.eventId} failed EventSchema parse for known eventType '${e.eventType}'; passing through unparsed: ${t.error.message}`), e); } function zh(e, t, n) { let r = e.eventData ?? {}; if (t.byteLength > 0) { let n = Ph(e.eventType); n && (r[n] = t); } let i = Rh({ eventId: e.eventId, runId: e.runId, eventType: e.eventType, createdAt: e.createdAt instanceof Date ? e.createdAt : new Date(e.createdAt), ...e.occurredAt === void 0 ? {} : { occurredAt: e.occurredAt instanceof Date ? e.occurredAt : new Date(e.occurredAt) }, ...e.correlationId ? { correlationId: e.correlationId } : {}, eventData: r, ...e.specVersion === void 0 ? {} : { specVersion: e.specVersion } }); return n === `none` ? Nm$1(i, `none`) : i; } async function Bh(e, t, n, r) { let i = n?.resolveData ?? `all`, { event: a, body: o } = await dh(e, t, r); return zh(a, o, i); } async function Vh(e, t) { let { pagination: n, resolveData: r = `all` } = e, i = { cursor: n?.cursor ?? void 0, limit: n?.limit, sortOrder: n?.sortOrder, remoteRefBehavior: r === `none` ? `lazy` : `resolve` }, a = await (`correlationId` in e ? gh(e.correlationId, i, t) : hh(e.runId, i, t)); return { data: a.events.map((e) => zh(e.event, e.body, r)), cursor: a.next ?? null, hasMore: typeof a.hasMore == `boolean` ? a.hasMore : !!a.next }; } async function Hh(e, t, n, r) { try { return await Uh(e, t, n, r); } catch (e) { throw Ih.has(t.eventType) && s$8.is(e) && e.status === 404 && t.correlationId ? new b$9(t.correlationId) : e; } } async function Uh(e, t, n, r) { if (n?.v1Compat) { if (t.eventType === `run_cancelled` && e) return { run: await wh(e, n, r) }; if (t.eventType === `run_created`) return { run: await Sh(t.eventData, r) }; if (e === null) throw new s$8(`world-vercel: v1Compat=true requires a runId for ${t.eventType}`, { status: 400 }); return { event: await Bm({ endpoint: `/v1/runs/${encodeURIComponent(e)}/events`, options: { method: `POST` }, data: t, config: r, schema: $m$1 }) }; } if (e === null) throw new s$8(`world-vercel v4: createWorkflowRunEvent requires a client-generated runId for run_created (the runId is part of the payload storage ref key). Generate a wrun_ ULID before calling.`, { status: 400 }); if (t.eventType === `run_created`) { let t = Vh$1(e, `wrun_`); if (t) throw new s$8(t, { status: 400 }); } let i = Fh.has(t.eventType) ? `resolve` : `lazy`, { payload: a, meta: o } = Lh(t), s = await lh({ runId: e, eventType: t.eventType, specVersion: t.specVersion ?? 2, ...t.correlationId ? { correlationId: t.correlationId } : {}, ...n?.requestId ? { vercelId: n.requestId } : {}, occurredAt: n?.occurredAt ?? /* @__PURE__ */ new Date(), ...n?.sinceCursor ? { sinceCursor: n.sinceCursor } : {}, ...n?.skipPreload ? { skipPreload: !0 } : {}, remoteRefBehavior: i, payload: a, ...o }, r), c = n?.resolveData ?? `all`, l = s.body; return { event: l.event ? Nm$1(Rh(l.event), c) : void 0, run: l.run ? Fm(l.run) : void 0, step: l.step ? kh(l.step) : void 0, hook: l.hook, wait: l.wait, events: l.events ? l.events.map(Rh) : void 0, cursor: l.cursor ?? void 0, hasMore: l.hasMore, ...l.stepCreated ? { stepCreated: !0 } : {} }; } function Wh(e, t) { if (t === `none`) { let { metadataRef: t, ...n } = e; return n; } return e; } const Gh = eh$1.omit({ metadata: !0 }).extend({ metadataRef: wm$1.any().optional() }); async function Kh(e, t) { let { runId: n, pagination: r, resolveData: i = `all` } = e, a = new URLSearchParams(); r?.limit && a.set(`limit`, r.limit.toString()), r?.cursor && a.set(`cursor`, r.cursor), r?.sortOrder && a.set(`sortOrder`, r.sortOrder); let o = i === `none` ? `lazy` : `resolve`; a.set(`remoteRefBehavior`, o), n && a.set(`runId`, n); let s = a.toString(), c = await Bm({ endpoint: `/v2/hooks${s ? `?${s}` : ``}`, options: { method: `GET` }, config: t, schema: yh$1(o === `lazy` ? Gh : eh$1) }); return { ...c, data: c.data.map((e) => Wh(e, i)) }; } async function qh(e, t, n) { let r = t?.resolveData || `all`; return Wh(await Bm({ endpoint: `/v2/hooks/${encodeURIComponent(e)}`, options: { method: `GET` }, config: n, schema: eh$1 }), r); } async function Jh(e, t) { try { return await Bm({ endpoint: `/v2/hooks/by-token?token=${encodeURIComponent(e)}`, options: { method: `GET` }, config: t, schema: eh$1 }); } catch (t) { throw s$8.is(t) && t.status === 404 ? new b$9(e) : t; } } function Yh(e) { let t = { runs: { get: ((t, n) => Ch(t, n, e)), list: ((t) => xh(t, e)), experimentalSetAttributes: (t, n, r) => Eh(t, n, r, e) }, steps: { get: ((t, n, r) => Mh(t, n, r, e)), list: ((t) => jh(t, e)) }, events: { create: (t, n, r) => Hh(t, n, r, e), get: (t, n, r) => Bh(t, n, r, e), list: (t) => Vh(t, e), listByCorrelationId: (t) => Vh(t, e) }, hooks: { get: (t, n) => qh(t, n, e), getByToken: (t) => Jh(t, e), list: (t) => Kh(t, e) } }; return { runs: Zc$1(`world.runs`, t.runs), steps: Zc$1(`world.steps`, t.steps), events: Zc$1(`world.events`, t.events), hooks: Zc$1(`world.hooks`, t.hooks) }; } const Xh = 1e3; function Zh(e, t, n) { return new URL(`${n.baseUrl}/v2/runs/${encodeURIComponent(t)}/stream/${encodeURIComponent(e)}`); } function Qh(e, t, n) { return new URL(`${n.baseUrl}/v3/runs/${encodeURIComponent(t)}/stream/${encodeURIComponent(e)}`); } function $h(e, t, n, r) { let i = [`PUT ${t.origin}${t.pathname}`]; for (let e of [`x-vercel-id`, `x-vercel-error`]) { let t = n.headers.get(e); t && i.push(`${e}=${t}`); } return Error(`Stream ${e} failed: HTTP ${n.status} (${i.join(`; `)}): ${r}`); } function eg(e) { let t = new TextEncoder(), n = [], r = 0; for (let i of e) { let e = typeof i == `string` ? t.encode(i) : i; n.push(e), r += 4 + e.length; } let i = new Uint8Array(r), a = new DataView(i.buffer), o = 0; for (let e of n) a.setUint32(o, e.length, !1), o += 4, i.set(e, o), o += e.length; return i; } const tg = V$8({ tailIndex: B$9(), done: bf$1() }); const ng = V$8({ data: Uf$1(V$8({ index: B$9(), data: am$1(Uint8Array) })), cursor: R$8().nullable(), hasMore: bf$1(), done: bf$1() }); function rg(e) { return { streams: { async write(t, n, r) { let i = await t, a = await zm(e), o = Zh(n, i, a), s = await fetch(o, { method: `PUT`, body: r, headers: a.headers }), c = await s.text(); if (!s.ok) throw $h(`write`, o, s, c); }, async writeMulti(t, n, r) { if (r.length === 0) return; let i = await t, a = await zm(e); a.headers.set(`X-Stream-Multi`, `true`); for (let e = 0; e < r.length; e += Xh) { let t = eg(r.slice(e, e + Xh)), o = Zh(n, i, a), s = await fetch(o, { method: `PUT`, body: t, headers: a.headers }), c = await s.text(); if (!s.ok) throw $h(`write`, o, s, c); } }, async close(t, n) { let r = await t, i = await zm(e); i.headers.set(`X-Stream-Done`, `true`); let a = Zh(n, r, i), o = await fetch(a, { method: `PUT`, headers: i.headers }), s = await o.text(); if (!o.ok) throw $h(`close`, a, o, s); }, async get(t, n, r) { let i = await zm(e), a = Qh(n, t, i); typeof r == `number` && a.searchParams.set(`startIndex`, String(r)); let o = await fetch(a, { headers: i.headers }); if (!o.ok) throw Error(`Failed to fetch stream: ${o.status}`); if (!o.body) throw Error(`No response body for stream`); return o.body; }, async getChunks(t, n, r) { let i = new URLSearchParams(); r?.limit != null && i.set(`limit`, String(r.limit)), r?.cursor && i.set(`cursor`, r.cursor); let a = i.toString(); return Bm({ endpoint: `/v2/runs/${encodeURIComponent(t)}/streams/${encodeURIComponent(n)}/chunks${a ? `?${a}` : ``}`, config: e, schema: ng }); }, async getInfo(t, n) { return Bm({ endpoint: `/v2/runs/${encodeURIComponent(t)}/streams/${encodeURIComponent(n)}/info`, config: e, schema: tg }); }, async list(t) { let n = await zm(e), r = new URL(`${n.baseUrl}/v2/runs/${encodeURIComponent(t)}/streams`), i = await fetch(r, { headers: n.headers }); if (!i.ok) throw Error(`Failed to list streams: ${i.status}`); return await i.json(); } } }; } function ig(e) { let t = e?.projectConfig?.projectId || process.env.VERCEL_PROJECT_ID; return { specVersion: 5, processExitTriggersQueueRedelivery: !0, ...Zm(e), ...Yh(e), ...Zc$1(`world.streams`, rg(e)), getEncryptionKeyForRun: xc$1(t, e?.projectConfig?.teamId, e?.token, e?.dispatcher), resolveLatestDeploymentId: $m(e) }; } function ag() { try { return createRequire(pathToFileURL(process.cwd() + `/package.json`).href); } catch { return createRequire(import.meta.url); } } const og = Symbol.for(`@workflow/world//cache`); const sg = Symbol.for(`@workflow/world//stubbedCache`); const cg = Symbol.for(`@workflow/world//cachePromise`); const lg = Symbol.for(`@workflow/world//stubbedCachePromise`); const ug = globalThis; function dg(e) { if (e.startsWith(`file://`)) return e; if (e.startsWith(`/`)) return pathToFileURL(e).href; if (e.startsWith(`./`) || e.startsWith(`../`)) return pathToFileURL(process.cwd() + `/` + e).href; try { return pathToFileURL(ag().resolve(e)).href; } catch { return e; } } const fg = async () => { let e = g$9(); if (_$8(e)) { let e = [ `WORKFLOW_VERCEL_PROJECT`, `WORKFLOW_VERCEL_TEAM`, `WORKFLOW_VERCEL_AUTH_TOKEN`, `WORKFLOW_VERCEL_ENV` ].filter((e) => process.env[e]); return e.length > 0 && process.env.VERCEL === `1` && console.warn(`[workflow] Warning: ${e.join(`, `)} env var(s) are set but have no effect at runtime. These are only used by the Workflow CLI. Remove them from your Vercel project environment variables.`), ig(); } if (e === `local`) return oc$1({ dataDir: process.env.WORKFLOW_LOCAL_DATA_DIR }); let t; try { t = ag()(e); } catch { t = await import(dg(e)); } if (typeof t == `function`) return t(); if (typeof t.default == `function`) return t.default(); if (typeof t.createWorld == `function`) return t.createWorld(); throw Error(`Invalid target world module: ${e}, must export a default function or createWorld function that returns a World instance.`); }; const pg = async () => { if (ug[sg]) return ug[sg]; ug[lg] || (ug[lg] = fg().catch((e) => { throw ug[lg] = void 0, e; })); let e = await ug[lg]; return ug[sg] = e, { createQueueHandler: e.createQueueHandler, specVersion: e.specVersion }; }; const mg = async () => ug[og] ? ug[og] : (ug[cg] || (ug[cg] = fg().catch((e) => { throw ug[cg] = void 0, e; })), ug[og] = await ug[cg], ug[og]); const gg = Symbol.for(`@workflow/world//getWorldFn`); globalThis[gg] ??= mg; var _g = class { limitMs; elapsedMs = 0; intervalStart; constructor(e = kr$3()) { this.limitMs = e, this.intervalStart = Date.now(); } get configuredLimitMs() { return this.limitMs; } elapsed() { let e = this.intervalStart === null ? 0 : Date.now() - this.intervalStart; return this.elapsedMs + e; } pause() { this.intervalStart !== null && (this.elapsedMs += Date.now() - this.intervalStart, this.intervalStart = null); } resume() { this.intervalStart = Date.now(); } isExhausted() { return this.elapsed() >= this.limitMs; } }; async function vg(e) { let { runId: t, workflowName: n, requestId: r, attempt: i, limitMs: a } = e, o = Ab.forRun(t, n), s = await mg(); if (s.processExitTriggersQueueRedelivery !== !0) { o.warn(`Workflow replay exceeded timeout; current World does not support process exit for redelivery — failing the run and returning`, { timeoutMs: a, attempt: i }); try { let e = mS(s, t), n = new D$10(`Workflow replay exceeded maximum duration (${a / 1e3}s)`); await s.events.create(t, { eventType: `run_failed`, specVersion: 5, eventData: { error: await Lx(n, t, await e()), errorCode: t$9.REPLAY_TIMEOUT } }, { requestId: r }); } catch (e) { o.warn(`Unable to mark run as failed`, { attempt: i, errorName: e instanceof Error ? e.name : `UnknownError`, errorMessage: e instanceof Error ? e.message : String(e) }); } return; } i <= 3 && (o.warn(`Workflow replay exceeded timeout but will be re-attempted (attempt < maxRetries)`, { timeoutMs: a, attempt: i, maxRetries: 3 }), process.exit(1)); let c = Cr$3(void 0, t$9.REPLAY_TIMEOUT); o.error(`Workflow replay exceeded timeout and max retries exceeded. Failing the run`, { timeoutMs: a, attempt: i, maxRetries: 3, errorCode: c.errorCode, errorAttribution: c.attribution }); try { let e = mS(s, t), n = new D$10(`Workflow replay exceeded maximum duration (${a / 1e3}s) after ${i} attempts`); await s.events.create(t, { eventType: `run_failed`, specVersion: 5, eventData: { error: await Lx(n, t, await e()), errorCode: t$9.REPLAY_TIMEOUT } }, { requestId: r }); } catch (e) { o.warn(`Unable to mark run as failed. The queue will continue to retry`, { attempt: i, errorName: e instanceof Error ? e.name : `UnknownError`, errorMessage: e instanceof Error ? e.message : String(e), errorStack: e instanceof Error ? e.stack : void 0 }); } process.exit(1); } function yg(e) { return types.isNativeError(e) ? e.name : `Error`; } function bg(e) { return types.isNativeError(e) ? e.stack ?? `` : ``; } function xg(e) { return typeof e == `object` && !!e && `name` in e && e.name === `AbortError` && `message` in e && typeof e.message == `string` && (!(`stack` in e) || e.stack === void 0 || typeof e.stack == `string`); } function Sg(e) { if (!xg(e) || D$10.is(e)) return e; let t = new D$10(`Aborted: ${e.message}`); return e.stack && (t.stack = e.stack), t; } function Cg(e) { return typeof e == `object` && !!e && `then` in e && typeof e.then == `function`; } function wg(e) { if (types.isNativeError(e)) return { name: e.name, message: e.message, stack: e.stack ?? `` }; if (typeof e == `string`) return { name: `Error`, message: e, stack: `` }; try { return { name: `Error`, message: JSON.stringify(e), stack: `` }; } catch { return { name: `Error`, message: String(e), stack: `` }; } } async function Tg(e) { if (Cg(e)) try { let t = await Tg(await e); return { ...t, message: `Promise rejection: ${t.message}` }; } catch (e) { let t = await Tg(e); return { ...t, message: `Promise rejection: ${t.message}` }; } return wg(e); } let Eg; let Dg; let Og; async function kg() { if (Dg !== void 0) return Dg; if (Og) return Og; if (!Eg) try { let e = [`@workflow/utils`, `get-port`].join(`/`); Eg = createRequire(pathToFileURL(process.cwd() + `/package.json`).href)(e).getPort; } catch { Eg = async () => void 0; } return Og = (Eg ?? (async () => void 0))().then((e) => (typeof e == `number` && (Dg = e), e)).finally(() => { Og = void 0; }), Og; } function Ag(e, t) { if (t && !(!e.events || e.cursor === void 0)) return { events: e.events, cursor: e.cursor, hasMore: e.hasMore ?? !1 }; } async function jg(e) { let { world: t, workflowRunId: n, workflowName: r, workflowStartedAt: i, stepId: o, stepName: s } = e, c = process.env.VERCEL_URL !== void 0, l = (e.runSpecVersion ?? 0) >= 5; return vb(`step.execute ${l$9(s)}`, {}, async (u) => { u?.setAttributes({ ...my(s), ...Kv(r), ...Jv(n), ...hy(o) }); let d = mS(t, n), f = c$8(s); if (!f || typeof f != `function`) { let i = `Step "${s}" is not registered in the current deployment. This usually indicates a build or bundling issue that caused the step to not be included in the deployment.`; if (Ab.error(`Step function not registered, failing step`, { workflowRunId: n, stepName: s, stepId: o }), e.lazyStepInput !== void 0) try { e.runReadyBarrier && await e.runReadyBarrier.catch(() => {}), await t.events.create(n, { eventType: `step_started`, specVersion: 5, correlationId: o, eventData: { stepName: s, workflowName: r, input: e.lazyStepInput } }); } catch (e) { if (x$9.is(e)) return { type: `skipped` }; if (S$10.is(e)) return { type: `gone` }; throw e; } try { await t.events.create(n, { eventType: `step_failed`, specVersion: 5, correlationId: o, eventData: { stepName: s, error: await Fx(new D$10(i), n, await d(), [], globalThis, l) } }); } catch (e) { if (x$9.is(e)) return { type: `skipped` }; throw e; } return u?.setAttributes({ ..._y(`failed`), ...Ty(!0) }), { type: `failed` }; } let p = f.maxRetries ?? 3; u?.setAttributes({ ...vy(p) }); let m = (e) => { if (w$11.is(e)) { let t = Math.max(1, typeof e.retryAfter == `number` ? e.retryAfter : 1); return Ab.info(`Throttled on step_started, deferring`, { retryAfterSeconds: t }), { type: `throttled`, timeoutSeconds: t }; } if (S$10.is(e)) return Ab.info(`Workflow run "${n}" has already completed, skipping step "${o}": ${e.message}`), { type: `gone` }; if (x$9.is(e)) return Ab.debug(`Step in terminal state, skipping`, { stepName: s, stepId: o, workflowRunId: n, error: e instanceof Error ? e.message : String(e) }), u?.setAttributes({ ...yy(!0), ...by(`completed`) }), { type: `skipped` }; if (C$11.is(e)) { let t = Math.max(1, e.retryAfter ?? 1); return Ab.debug(`Step retryAfter timestamp not yet reached`, { stepName: s, stepId: o, timeoutSeconds: t }), { type: `retry`, timeoutSeconds: t }; } }, g = e.lazyStepInput !== void 0 && (Mr$3() || e.forceOptimisticStart === !0 && !Nr$3()), _, S, C = async () => { if (!S) return; let e = await S; if (e.ok) return; let t = m(e.err); if (!t) throw e.err; return t; }; if (g) { S = (e.runReadyBarrier ?? Promise.resolve()).then(() => t.events.create(n, { eventType: `step_started`, specVersion: 5, correlationId: o, eventData: { stepName: s, workflowName: r, input: e.lazyStepInput } })).then(() => ({ ok: !0 }), (e) => ({ ok: !1, err: e })); let i = /* @__PURE__ */ new Date(); _ = { runId: n, stepId: o, stepName: s, status: `running`, input: e.lazyStepInput, attempt: 1, startedAt: i, createdAt: i, updatedAt: i }; } else try { let i = await t.events.create(n, { eventType: `step_started`, specVersion: 5, correlationId: o, eventData: e.lazyStepInput === void 0 ? { stepName: s } : { stepName: s, workflowName: r, input: e.lazyStepInput } }); if (!i.step) throw new u$10(`step_started event for "${o}" did not return step entity`); _ = i.step; } catch (e) { let t = m(e); if (t) return t; throw e; } Ab.debug(`Step execution details`, { stepName: s, stepId: _.stepId, status: _.status, attempt: _.attempt }), u?.setAttributes({ ..._y(_.status) }); let w; if (_.attempt > p + 1 && _.error) { let e = _.attempt - 1, r = `Step "${s}" exceeded max retries (${e} ${n$11(`retry`, `retries`, e)})`; kb.error(`Step exceeded max retries`, { workflowRunId: n, stepName: s, retryCount: e }); let i = new D$10(r); if (_.error != null) try { i.cause = await Ix(_.error, n, await d()); } catch {} try { await t.events.create(n, { eventType: `step_failed`, specVersion: 5, correlationId: o, eventData: { stepName: s, error: await Fx(i, n, await d(), [], globalThis, l) } }); } catch (e) { if (x$9.is(e)) return Ab.info(`Tried failing step, but step has already finished.`, { workflowRunId: n, stepId: o, stepName: s, message: e.message }), { type: `skipped` }; throw e; } return u?.setAttributes({ ..._y(`failed`), ...Ey(!0) }), { type: `failed` }; } let E = []; try { let a = _.attempt; if (!_.startedAt) throw new u$10(`Step "${o}" has no "startedAt" timestamp`); let p = _.startedAt, m = [], h = e.encryptionKey ?? await d(), v = await vb(`step.hydrate`, {}, async (t) => { let r = Date.now(), i = await Nx(_.input, n, h, m, globalThis, {}, e.workflowDeploymentId), a = Date.now() - r; return t?.setAttributes({ ...xy(i.args.length), ...qy(a) }), i; }), y = v.args, b = v.thisVal ?? null, x = c ? void 0 : await kg(), S = Date.now(); w = await vb(`step.execute`, {}, async () => await Vb.run({ stepMetadata: { stepName: s, stepId: o, stepStartedAt: /* @__PURE__ */ new Date(+p), attempt: a }, workflowMetadata: { workflowName: r, workflowRunId: n, workflowStartedAt: /* @__PURE__ */ new Date(+i), url: c ? `https://${process.env.VERCEL_URL}` : `http://localhost:${x ?? 3e3}`, features: { encryption: !!h } }, workflowDeploymentId: e.workflowDeploymentId, ops: m, preCompletionOps: E, closureVars: v.closureVars, encryptionKey: h }, () => f.apply(b, y))); let D = Date.now() - S; u?.setAttributes({ ...Jy(D) }), w = await vb(`step.dehydrate`, {}, async (e) => { let t = Date.now(), r = await Px(w, n, h, m, globalThis, !1, !1, l), i = Date.now() - t; return e?.setAttributes({ ...Yy(i), ...Sy(typeof r) }), r; }); let O = !0; if (m.length > 0) { let e = Promise.all(m); gS(e, (e) => { Ab.warn(`Background flush of step stream ops failed`, { workflowRunId: n, stepId: o, error: e instanceof Error ? e.message : String(e) }); }), O = await Promise.race([e.then(() => !0, (e) => { if (e?.name === `AbortError` || e?.name === `ResponseAborted`) return !0; throw e; }), new Promise((e) => setTimeout(() => e(!1), 500))]); } if (g) { let e = await C(); if (e) return e; } E.length > 0 && await Promise.all(E).catch(() => {}); let A = !1, j = await t.events.create(n, { eventType: `step_completed`, specVersion: 5, correlationId: o, eventData: { stepName: s, workflowName: r, result: w } }, e.inlineDeltaSinceCursor === void 0 ? void 0 : { sinceCursor: e.inlineDeltaSinceCursor }).catch((e) => { if (x$9.is(e)) { Ab.info(`Tried completing step, but step has already finished.`, { workflowRunId: n, stepId: o, stepName: s, message: e.message }), A = !0; return; } throw e; }); if (A) return { type: `skipped` }; let M = j ? Ag(j, e.inlineDeltaSinceCursor !== void 0) : void 0; return u?.setAttributes({ ..._y(`completed`), ...Sy(typeof w) }), m.length > 0 && kb.debug(`Step has pending ops`, { workflowRunId: n, stepName: s, opsCount: m.length }), { type: `completed`, hasPendingOps: !O, inlineDelta: M }; } catch (e) { if (g) { let e = await C(); if (e) return e; } E.length > 0 && await Promise.all(E).catch(() => {}); let r = Sg(e), i = await Tg(r), c = i.stack || bg(r) || ``; r instanceof Error && u?.recordException?.(r); let f = D$10.is(r); if (u?.setAttributes({ ...Cy(yg(r)), ...wy(i.message), ...Gy(yg(r)), ...sb(f ? `fatal` : O$8.is(r) ? `retryable` : `transient`), ...ob(!f) }), S$10.is(e)) return kb.info(`Workflow run already completed, skipping step`, { workflowRunId: n, stepId: o, message: e.message }), { type: `gone` }; if (f) { kb.error(`Encountered FatalError while executing step, bubbling up to parent workflow`, { workflowRunId: n, stepName: s, errorStack: c }), types.isNativeError(r) && c && (r.stack = c); try { await t.events.create(n, { eventType: `step_failed`, specVersion: 5, correlationId: o, eventData: { stepName: s, error: await Fx(r, n, await d(), [], globalThis, l) } }); } catch (e) { if (x$9.is(e)) return Ab.info(`Tried failing step, but step has already finished.`, { workflowRunId: n, stepId: o, stepName: s, message: e.message }), { type: `skipped` }; throw e; } return u?.setAttributes({ ..._y(`failed`), ...Ty(!0) }), { type: `failed` }; } let m = _.attempt; if (u?.setAttributes({ ...gy(m), ...vy(p) }), m >= p + 1) { let r = _.attempt - 1; kb.error(`Max retries reached, bubbling error to parent workflow`, { workflowRunId: n, stepName: s, attempt: _.attempt, retryCount: r, errorStack: c }); let f = new D$10(`Step "${s}" failed after ${p} ${n$11(`retry`, `retries`, p)}: ${i.message}`); f.cause = e, c && (f.stack = c); try { await t.events.create(n, { eventType: `step_failed`, specVersion: 5, correlationId: o, eventData: { stepName: s, error: await Fx(f, n, await d(), [], globalThis, l) } }); } catch (e) { if (x$9.is(e)) return Ab.info(`Tried failing step, but step has already finished.`, { workflowRunId: n, stepId: o, stepName: s, message: e.message }), { type: `skipped` }; throw e; } return u?.setAttributes({ ..._y(`failed`), ...Ey(!0) }), { type: `failed` }; } O$8.is(e) ? kb.info(`Encountered RetryableError, step will be retried`, { workflowRunId: n, stepName: s, attempt: m, message: e.message }) : kb.info(`Encountered Error, step will be retried`, { workflowRunId: n, stepName: s, attempt: m, errorStack: c }), types.isNativeError(e) && c && (e.stack = c); try { await t.events.create(n, { eventType: `step_retrying`, specVersion: 5, correlationId: o, eventData: { stepName: s, error: await Fx(e, n, await d(), [], globalThis, l), ...O$8.is(e) && { retryAfter: e.retryAfter } } }); } catch (e) { if (x$9.is(e)) return Ab.info(`Tried retrying step, but step has already finished.`, { workflowRunId: n, stepId: o, stepName: s, message: e.message }), { type: `skipped` }; throw e; } let v = Math.max(1, O$8.is(e) ? Math.ceil((+e.retryAfter.getTime() - Date.now()) / 1e3) : 1); return u?.setAttributes({ ...Dy(v), ...Oy(!0) }), { type: `retry`, timeoutSeconds: v }; } }); } async function Mg({ world: e, runId: t, hookEvent: n, queueItem: r, requestId: i }) { try { return (await e.events.create(t, n, { requestId: i })).event?.eventType === `hook_conflict` ? { hasHookConflict: !0, hasAwaitedHookCreation: !1 } : { hasHookConflict: !1, hasAwaitedHookCreation: r.hasConflictAwaiter === !0 }; } catch (e) { if (x$9.is(e)) return Ab.info(`Hook already exists, continuing`, { workflowRunId: t, message: e.message }), { hasHookConflict: !1, hasAwaitedHookCreation: r.hasConflictAwaiter === !0 }; if (S$10.is(e)) return Ab.info(`Workflow run already completed, skipping hook`, { workflowRunId: t, message: e.message }), { hasHookConflict: !1, hasAwaitedHookCreation: !1 }; throw e; } } async function Ng({ suspension: e, world: t, run: n, span: r, requestId: i, runReadyBarrier: a }) { let o = n.runId, s = async () => { if (a) try { await a; } catch {} }, c = e.steps.filter((e) => e.type === `step`), l = e.steps.filter((e) => e.type === `hook`), u = e.steps.filter((e) => e.type === `wait`), d = e.steps.filter((e) => e.type === `attribute`), f = l.filter((e) => !e.hasCreatedEvent), p = l.filter((e) => e.disposed), m = await t.getEncryptionKeyForRun?.(n), h = m ? await p_$1(m) : void 0, g = (n.specVersion ?? 0) >= 5, _ = await Promise.all(f.map(async (t) => { let n = t.metadata === void 0 ? void 0 : await Mx(t.metadata, o, h, e.globalThis, !1, g); return { queueItem: t, hookEvent: { eventType: `hook_created`, specVersion: 5, correlationId: t.correlationId, eventData: { token: t.token, metadata: n, isWebhook: t.isWebhook ?? !1, ...t.isSystem && { isSystem: !0 } } } }; })), v = !1, x = !1; if (_.length > 0) { await s(); let e = await Promise.all(_.map(({ hookEvent: e, queueItem: n }) => Mg({ world: t, runId: o, hookEvent: e, queueItem: n, requestId: i }))); v = e.some((e) => e.hasHookConflict), x = e.some((e) => e.hasAwaitedHookCreation); } p.length > 0 && (await s(), await Promise.all(p.map(async (e) => { let n = { eventType: `hook_disposed`, specVersion: 5, correlationId: e.correlationId, eventData: { token: e.token } }; try { await t.events.create(o, n, { requestId: i }); } catch (t) { if (x$9.is(t)) Ab.info(`Hook already disposed, skipping duplicate disposal`, { workflowRunId: o, correlationId: e.correlationId, message: t.message }); else if (S$10.is(t)) Ab.info(`Workflow run already completed, skipping hook disposal`, { workflowRunId: o, correlationId: e.correlationId, message: t.message }); else if (b$9.is(t)) Ab.info(`Hook not found for disposal, continuing`, { workflowRunId: o, correlationId: e.correlationId, message: t.message }); else throw t; } }))); let S = l.filter((e) => e.abortRequested && !e.disposed); S.length > 0 && (await s(), await Promise.all(S.map(async (n) => { try { let r = await Mx({ aborted: !0, reason: n.abortReason }, o, h, e.globalThis, !1, g); await t.events.create(o, { eventType: `hook_received`, specVersion: 5, correlationId: n.correlationId, eventData: { token: n.token, payload: r } }); try { let e = Gb(n.token); await t.streams.write(o, e, r), await t.streams.close(o, e); } catch { Ab.debug(`Failed to write abort stream packet, hook event will provide fallback`, { workflowRunId: o, correlationId: n.correlationId }); } } catch (e) { if (x$9.is(e) || S$10.is(e)) Ab.info(`Workflow run already completed, skipping abort`, { workflowRunId: o, correlationId: n.correlationId, message: e.message }); else throw e; } }))); let w = new Set(c.filter((e) => !e.hasCreatedEvent).map((e) => e.correlationId)), E = /* @__PURE__ */ new Set(), D = new Set(x === !1 ? c.filter((e) => w.has(e.correlationId)).slice(0, jr$3()).map((e) => e.correlationId) : []), O = /* @__PURE__ */ new Map(), k = []; for (let r of c) w.has(r.correlationId) && k.push((async () => { let a = await Mx({ args: r.args, closureVars: r.closureVars, thisVal: r.thisVal }, o, h, e.globalThis, !1, g); if (D.has(r.correlationId)) { O.set(r.correlationId, { correlationId: r.correlationId, stepName: r.stepName, dehydratedInput: a }); return; } let c = { eventType: `step_created`, specVersion: 5, correlationId: r.correlationId, eventData: { stepName: r.stepName, workflowName: n.workflowName, input: a } }; try { await s(), await t.events.create(o, c, { requestId: i }), E.add(r.correlationId); } catch (e) { if (x$9.is(e)) Ab.info(`Step already exists, continuing`, { workflowRunId: o, correlationId: r.correlationId, message: e.message }); else throw e; } })()); for (let e of u) e.hasCreatedEvent || k.push((async () => { let n = { eventType: `wait_created`, specVersion: 5, correlationId: e.correlationId, eventData: { resumeAt: e.resumeAt } }; try { await s(), await t.events.create(o, n, { requestId: i }); } catch (t) { if (x$9.is(t)) Ab.info(`Wait already exists, continuing`, { workflowRunId: o, correlationId: e.correlationId, message: t.message }); else throw t; } })()); for (let e of d) k.push((async () => { try { await s(), await t.events.create(o, { eventType: `attr_set`, specVersion: 5, correlationId: e.correlationId, eventData: { changes: e.changes, writer: { type: `workflow` }, ...e.allowReservedAttributes ? { allowReservedAttributes: !0 } : {} } }, { requestId: i }); } catch (t) { if (x$9.is(t)) Ab.info(`Workflow attribute event already exists, continuing`, { workflowRunId: o, correlationId: e.correlationId, message: t.message }); else if (Pg(t)) { let e = new D$10(`experimental_setAttributes failed World validation: ${t instanceof Error ? t.message : String(t)}`); throw e.cause = t, e; } else throw t; } })()); await Promise.all(k); let A = []; for (let e of D) { let t = O.get(e); t && A.push(t); } let j = Date.now(), M; for (let e of u) { let t = e.resumeAt.getTime(), n = Math.max(1e3, t - j), r = Math.ceil(n / 1e3); (!M || r < M.seconds) && (M = { seconds: r, correlationId: e.correlationId }); } return r?.setAttributes({ ...Yv(`workflow_suspended`), ...oy(c.length), ...sy(f.length), ...cy(u.length) }), { pendingSteps: c, createdStepCorrelationIds: E, lazyInlineSteps: A, waitTimeout: v ? void 0 : M, hasHookConflict: v, hasAwaitedHookCreation: x, hasAttributeEvents: d.length > 0, hasHookEvents: _.length > 0 }; } function Pg(e) { return e instanceof Em$1 || e instanceof Error && e.name === `AttributeValidationError` ? !0 : s$8.is(e) && e.status === 400; } const Fg = 82800; function Ig(e, t, n = Date.now()) { if (e <= 2) return { delaySeconds: e, idempotencyKey: `${t}:${Math.floor(n / 1e3)}` }; let r = Math.ceil(e / Fg); return { delaySeconds: Math.min(e, Fg), idempotencyKey: r === 1 ? t : `${t}:hop-${r}` }; } var Lg = 44; var Rg = `ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`; var zg = /* @__PURE__ */ new Uint8Array(64); var Bg = /* @__PURE__ */ new Uint8Array(128); for (let e = 0; e < Rg.length; e++) { let t = Rg.charCodeAt(e); zg[e] = t, Bg[t] = e; } function Vg(e, t) { let n = 0, r = 0, i = 0; do i = Bg[e.next()], n |= (i & 31) << r, r += 5; while (i & 32); let a = n & 1; return n >>>= 1, a && (n = -2147483648 | -n), t + n; } function Hg(e, t) { return e.pos >= t ? !1 : e.peek() !== Lg; } var Ug = class { constructor(e) { this.pos = 0, this.buffer = e; } next() { return this.buffer.charCodeAt(this.pos++); } peek() { return this.buffer.charCodeAt(this.pos); } indexOf(e) { let { buffer: t, pos: n } = this, r = t.indexOf(e, n); return r === -1 ? t.length : r; } }; function Wg(e) { let { length: t } = e, n = new Ug(e), r = [], i = 0, a = 0, o = 0, s = 0, c = 0; do { let e = n.indexOf(`;`), t = [], l = !0, u = 0; for (i = 0; n.pos < e;) { let r; i = Vg(n, i), i < u && (l = !1), u = i, Hg(n, e) ? (a = Vg(n, a), o = Vg(n, o), s = Vg(n, s), Hg(n, e) ? (c = Vg(n, c), r = [ i, a, o, s, c ]) : r = [ i, a, o, s ]) : r = [i], t.push(r), n.pos++; } l || Gg(t), r.push(t), n.pos = e + 1; } while (n.pos <= t); return r; } function Gg(e) { e.sort(Kg); } function Kg(e, t) { return e[0] - t[0]; } const qg = /^[\w+.-]+:\/\//; const Jg = /^([\w+.-]+:)\/\/([^@/#?]*@)?([^:/#?]*)(:\d+)?(\/[^#?]*)?(\?[^#]*)?(#.*)?/; const Yg = /^file:(?:\/\/((?![a-z]:)[^/#?]*)?)?(\/?[^#?]*)(\?[^#]*)?(#.*)?/i; function Xg(e) { return qg.test(e); } function Zg(e) { return e.startsWith(`//`); } function Qg(e) { return e.startsWith(`/`); } function $g(e) { return e.startsWith(`file:`); } function e_(e) { return /^[.?#]/.test(e); } function t_(e) { let t = Jg.exec(e); return r_(t[1], t[2] || ``, t[3], t[4] || ``, t[5] || `/`, t[6] || ``, t[7] || ``); } function n_(e) { let t = Yg.exec(e), n = t[2]; return r_(`file:`, ``, t[1] || ``, ``, Qg(n) ? n : `/` + n, t[3] || ``, t[4] || ``); } function r_(e, t, n, r, i, a, o) { return { scheme: e, user: t, host: n, port: r, path: i, query: a, hash: o, type: 7 }; } function i_(e) { if (Zg(e)) { let t = t_(`http:` + e); return t.scheme = ``, t.type = 6, t; } if (Qg(e)) { let t = t_(`http://foo.com` + e); return t.scheme = ``, t.host = ``, t.type = 5, t; } if ($g(e)) return n_(e); if (Xg(e)) return t_(e); let t = t_(`http://foo.com/` + e); return t.scheme = ``, t.host = ``, t.type = e ? e.startsWith(`?`) ? 3 : e.startsWith(`#`) ? 2 : 4 : 1, t; } function a_(e) { if (e.endsWith(`/..`)) return e; let t = e.lastIndexOf(`/`); return e.slice(0, t + 1); } function o_(e, t) { s_(t, t.type), e.path === `/` ? e.path = t.path : e.path = a_(t.path) + e.path; } function s_(e, t) { let n = t <= 4, r = e.path.split(`/`), i = 1, a = 0, o = !1; for (let e = 1; e < r.length; e++) { let t = r[e]; if (!t) { o = !0; continue; } if (o = !1, t !== `.`) { if (t === `..`) { a ? (o = !0, a--, i--) : n && (r[i++] = t); continue; } r[i++] = t, a++; } } let s = ``; for (let e = 1; e < i; e++) s += `/` + r[e]; (!s || o && !s.endsWith(`/..`)) && (s += `/`), e.path = s; } function c_(e, t) { if (!e && !t) return ``; let n = i_(e), r = n.type; if (t && r !== 7) { let e = i_(t), i = e.type; switch (r) { case 1: n.hash = e.hash; case 2: n.query = e.query; case 3: case 4: o_(n, e); case 5: n.user = e.user, n.host = e.host, n.port = e.port; case 6: n.scheme = e.scheme; } i > r && (r = i); } s_(n, r); let i = n.query + n.hash; switch (r) { case 2: case 3: return i; case 4: { let r = n.path.slice(1); return r ? e_(t || e) && !e_(r) ? `./` + r + i : r + i : i || `.`; } case 5: return n.path + i; default: return n.scheme + `//` + n.user + n.host + n.port + n.path + i; } } function l_(e) { if (!e) return ``; let t = e.lastIndexOf(`/`); return e.slice(0, t + 1); } function u_(e, t) { let n = l_(e), r = t ? t + `/` : ``; return (e) => c_(r + (e || ``), n); } var d_ = 0; var f_ = 1; var p_ = 2; var m_ = 3; var h_ = 4; function g_(e, t) { let n = __(e, 0); if (n === e.length) return e; t || (e = e.slice()); for (let r = n; r < e.length; r = __(e, r + 1)) e[r] = y_(e[r], t); return e; } function __(e, t) { for (let n = t; n < e.length; n++) if (!v_(e[n])) return n; return e.length; } function v_(e) { for (let t = 1; t < e.length; t++) if (e[t][d_] < e[t - 1][d_]) return !1; return !0; } function y_(e, t) { return t || (e = e.slice()), e.sort(b_); } function b_(e, t) { return e[d_] - t[d_]; } var x_ = !1; function S_(e, t, n, r) { for (; n <= r;) { let i = n + (r - n >> 1), a = e[i][d_] - t; if (a === 0) return x_ = !0, i; a < 0 ? n = i + 1 : r = i - 1; } return x_ = !1, n - 1; } function C_(e, t, n) { for (let r = n + 1; r < e.length && e[r][d_] === t; n = r++); return n; } function w_(e, t, n) { for (let r = n - 1; r >= 0 && e[r][d_] === t; n = r--); return n; } function T_() { return { lastKey: -1, lastNeedle: -1, lastIndex: -1 }; } function E_(e, t, n, r) { let { lastKey: i, lastNeedle: a, lastIndex: o } = n, s = 0, c = e.length - 1; if (r === i) { if (t === a) return x_ = o !== -1 && e[o][d_] === t, o; t >= a ? s = o === -1 ? 0 : o : c = o; } return n.lastKey = r, n.lastNeedle = t, n.lastIndex = S_(e, t, s, c); } function D_(e) { return typeof e == `string` ? JSON.parse(e) : e; } var O_ = "`line` must be greater than 0 (lines start at line 1)"; var k_ = "`column` must be greater than or equal to 0 (columns start at column 0)"; var A_ = class { constructor(e, t) { let n = typeof e == `string`; if (!n && e._decodedMemo) return e; let r = D_(e), { version: i, file: a, names: o, sourceRoot: s, sources: c, sourcesContent: l } = r; this.version = i, this.file = a, this.names = o || [], this.sourceRoot = s, this.sources = c, this.sourcesContent = l, this.ignoreList = r.ignoreList || r.x_google_ignoreList || void 0; let u = u_(t, s); this.resolvedSources = c.map(u); let { mappings: d } = r; if (typeof d == `string`) this._encoded = d, this._decoded = void 0; else if (Array.isArray(d)) this._encoded = void 0, this._decoded = g_(d, n); else if (r.sections) throw Error(`TraceMap passed sectioned source map, please use FlattenMap export instead`); else throw Error(`invalid source map: ${JSON.stringify(r)}`); this._decodedMemo = T_(), this._bySources = void 0, this._bySourceMemos = void 0; } }; function j_(e) { return e; } function M_(e) { var t; return (t = j_(e))._decoded || (t._decoded = Wg(j_(e)._encoded)); } function N_(e, t) { let { line: n, column: r, bias: i } = t; if (n--, n < 0) throw Error(O_); if (r < 0) throw Error(k_); let a = M_(e); if (n >= a.length) return P_(null, null, null, null); let o = a[n], s = F_(o, j_(e)._decodedMemo, n, r, i || 1); if (s === -1) return P_(null, null, null, null); let c = o[s]; if (c.length === 1) return P_(null, null, null, null); let { names: l, resolvedSources: u } = e; return P_(u[c[f_]], c[p_] + 1, c[m_], c.length === 5 ? l[c[h_]] : null); } function P_(e, t, n, r) { return { source: e, line: t, column: n, name: r }; } function F_(e, t, n, r, i) { let a = E_(e, r, t, n); return x_ ? a = (i === -1 ? C_ : w_)(e, r, a) : i === -1 && a++, a === -1 || a === e.length ? -1 : a; } function I_(e) { return e >= 65 && e <= 90 || e >= 97 && e <= 122 || e >= 48 && e <= 57 || e === 43 || e === 47 || e === 61; } function L_(e) { let t = 0; for (; t < e.length;) { let n = e.indexOf(`//# sourceMappingURL=data:application/json`, t); if (n === -1) return; let r = e.indexOf(`;base64,`, n + 42); if (r === -1) { t = n + 42; continue; } let i = e.indexOf(`,`, n); if (i !== -1 && i < r) { t = r + 8; continue; } let a = r + 8, o = a; for (; o < e.length && I_(e.charCodeAt(o));) o++; if (o > a) return e.slice(a, o); t = o; } } const R_ = /* @__PURE__ */ new Map(); function z_(e) { let t = R_.get(e); if (t !== void 0) return R_.delete(e), R_.set(e, t), t; let n = null, r = L_(e); if (r) try { let e = Buffer.from(r, `base64`).toString(`utf-8`); n = new A_(JSON.parse(e)); } catch { n = null; } for (R_.set(e, n); R_.size > 8;) { let e = R_.keys().next().value; if (e === void 0) break; R_.delete(e); } return n; } function B_(e, t, n) { if (!e.includes(t)) return e; let r = z_(n); if (!r) return e; try { return e.split(` `).map((e) => { let n = e.match(/^\s*at\s+(?:(.+?)\s+\()?(.+?):(\d+):(\d+)\)?$/); if (!n) return e; let [, i, a, o, s] = n; if (!a.includes(t)) return e; let c = parseInt(o, 10), l = parseInt(s, 10), u = N_(r, { line: c, column: l }); if (u.source && u.line !== null) { let e = i || u.name || `anonymous`, t = u.column === null ? l : u.column; return ` at ${e} (${u.source}:${u.line}:${t})`; } return e; }).join(` `); } catch { return e; } } const V_ = 4096; function H_(e) { if (e === null) return !0; let t = typeof e; return t === `object` || t === `function` ? !1 : t === `string` ? e.length <= V_ : t === `bigint` ? e.toString().length <= V_ : !0; } function U_() { return /* @__PURE__ */ new Map(); } async function W_(e, t, n) { if (!e || t === void 0) return n(); if (e.has(t)) return e.get(t); let r = await n(); return H_(r) && e.set(t, r), r; } function G_(e, t, n) { let r = (2 << 31 - Math.clz32(e.length - 1 | 1)) - 1, i = Math.ceil(1.6 * r * t / e.length); return (a = t) => { if (!a) return ``; let o = ``; for (;;) { let t = n(i), s = i; for (; s--;) if (o += e[t[s] & r] || ``, o.length >= a) return o; } }; } function K_(e) { let t = e.startsWith(`wrun_`) ? e.slice(5) : e; try { return Ah$1(t); } catch { return; } } function q_(e) { return function(t, n) { let i = function(...i) { let { promise: a, resolve: o, reject: s } = f$9(), c = `step_${e.generateUlid()}`, l = { type: `step`, correlationId: c, stepName: t, args: i }; this !== void 0 && this !== null && this !== globalThis && (l.thisVal = this); let u = n?.(); return u && (l.closureVars = u), e.invocationsQueue.set(c, l), kb.debug(`Step consumer setup`, { correlationId: c, stepName: t, args: i }), e.eventsConsumer.subscribe((n) => { if (!n) return d$9(e, () => { e.onWorkflowError(new Wv(e.invocationsQueue, e.globalThis)); }), Kb.NotConsumed; if (kb.debug(`Step consumer event processing`, { correlationId: c, stepName: t, args: i.join(`, `), incomingCorrelationId: n.correlationId, isMatch: c === n.correlationId, eventType: n.eventType }), n.correlationId !== c) return Kb.NotConsumed; let r = `eventData` in n && n.eventData && `stepName` in n.eventData ? n.eventData.stepName : void 0; if (typeof r == `string` && r !== t) return e.promiseQueue = e.promiseQueue.then(() => { e.onWorkflowError(new f$8(`Replay divergence: step event ${n.eventType} for ${c} belongs to "${r}", but the current step consumer is "${t}"`, { eventId: n.eventId })); }), Kb.Finished; if (n.eventType === `step_created`) { let r = e.invocationsQueue.get(c); return !r || r.type !== `step` ? (e.promiseQueue = e.promiseQueue.then(() => { s(new f$8(`Replay divergence: step ${c} (${t}) created but not found in invocation queue`, { eventId: n.eventId })); }), Kb.Finished) : (r.hasCreatedEvent = !0, Kb.Consumed); } if (n.eventType === `step_started` || n.eventType === `step_retrying`) return Kb.Consumed; if (n.eventType === `step_failed`) return e.invocationsQueue.delete(n.correlationId), e.promiseQueue = e.promiseQueue.then(async () => { try { s(await Ix(n.eventData.error, e.runId, e.encryptionKey, e.globalThis)); } catch (e) { kb.error(`Failed to hydrate step_failed error`, { correlationId: n.correlationId, error: e instanceof Error ? e.message : String(e) }), s(new D$10(`Failed to hydrate step error: ${e instanceof Error ? e.message : String(e)}`)); } }), Kb.Finished; if (n.eventType === `step_completed`) { e.invocationsQueue.delete(n.correlationId); let t = n.eventId, r = n.eventData.result; return e.pendingDeliveries++, e.promiseQueue = e.promiseQueue.then(async () => { try { o(await W_(e.stepHydrationCache, t, () => zx(r, e.runId, e.encryptionKey, e.globalThis))); } catch (e) { s(e); } finally { e.pendingDeliveries--; } }), Kb.Finished; } return e.promiseQueue = e.promiseQueue.then(() => { e.onWorkflowError(new f$8(`Replay divergence: Unexpected event type for step ${c} (name: ${t}) "${n.eventType}"`, { eventId: n.eventId })); }), Kb.Finished; }), a; }, a = t.split(`//`).pop(); return Object.defineProperty(i, "name", { value: a }), Object.defineProperty(i, "stepId", { value: t, writable: !1, enumerable: !1, configurable: !1 }), n && Object.defineProperty(i, "__closureVarsFn", { value: n, writable: !1, enumerable: !1, configurable: !1 }), Object.defineProperty(i, "bind", { value: function(e, ...r) { let i = Function.prototype.bind.call(this, e, ...r); return Object.defineProperty(i, "stepId", { value: t, writable: !1, enumerable: !1, configurable: !1 }), n && Object.defineProperty(i, "__closureVarsFn", { value: n, writable: !1, enumerable: !1, configurable: !1 }), Object.defineProperty(i, "__boundThis", { value: e, writable: !1, enumerable: !1, configurable: !1 }), r.length > 0 && Object.defineProperty(i, "__boundArgs", { value: r, writable: !1, enumerable: !1, configurable: !1 }), i; }, writable: !1, enumerable: !1, configurable: !1 }), i; }; } var J_ = c$12(((e, t) => { (function(e, t, n) { function r(e) { var t = this, n = o(); t.next = function() { var e = 2091639 * t.s0 + t.c * 23283064365386963e-26; return t.s0 = t.s1, t.s1 = t.s2, t.s2 = e - (t.c = e | 0); }, t.c = 1, t.s0 = n(` `), t.s1 = n(` `), t.s2 = n(` `), t.s0 -= n(e), t.s0 < 0 && (t.s0 += 1), t.s1 -= n(e), t.s1 < 0 && (t.s1 += 1), t.s2 -= n(e), t.s2 < 0 && (t.s2 += 1), n = null; } function i(e, t) { return t.c = e.c, t.s0 = e.s0, t.s1 = e.s1, t.s2 = e.s2, t; } function a(e, t) { var n = new r(e), a = t && t.state, o = n.next; return o.int32 = function() { return n.next() * 4294967296 | 0; }, o.double = function() { return o() + (o() * 2097152 | 0) * 11102230246251565e-32; }, o.quick = o, a && (typeof a == `object` && i(a, n), o.state = function() { return i(n, {}); }), o; } function o() { var e = 4022871197; return function(t) { t = String(t); for (var n = 0; n < t.length; n++) { e += t.charCodeAt(n); var r = .02519603282416938 * e; e = r >>> 0, r -= e, r *= e, e = r >>> 0, r -= e, e += r * 4294967296; } return (e >>> 0) * 23283064365386963e-26; }; } t && t.exports ? t.exports = a : n && n.amd ? n(function() { return a; }) : this.alea = a; })(e, typeof t == `object` && t, typeof define == `function` && define); })); var Y_ = c$12(((e, t) => { (function(e, t, n) { function r(e) { var t = this, n = ``; t.x = 0, t.y = 0, t.z = 0, t.w = 0, t.next = function() { var e = t.x ^ t.x << 11; return t.x = t.y, t.y = t.z, t.z = t.w, t.w ^= t.w >>> 19 ^ e ^ e >>> 8; }, e === (e | 0) ? t.x = e : n += e; for (var r = 0; r < n.length + 64; r++) t.x ^= n.charCodeAt(r) | 0, t.next(); } function i(e, t) { return t.x = e.x, t.y = e.y, t.z = e.z, t.w = e.w, t; } function a(e, t) { var n = new r(e), a = t && t.state, o = function() { return (n.next() >>> 0) / 4294967296; }; return o.double = function() { do var e = ((n.next() >>> 11) + (n.next() >>> 0) / 4294967296) / (1 << 21); while (e === 0); return e; }, o.int32 = n.next, o.quick = o, a && (typeof a == `object` && i(a, n), o.state = function() { return i(n, {}); }), o; } t && t.exports ? t.exports = a : n && n.amd ? n(function() { return a; }) : this.xor128 = a; })(e, typeof t == `object` && t, typeof define == `function` && define); })); var X_ = c$12(((e, t) => { (function(e, t, n) { function r(e) { var t = this, n = ``; t.next = function() { var e = t.x ^ t.x >>> 2; return t.x = t.y, t.y = t.z, t.z = t.w, t.w = t.v, (t.d = t.d + 362437 | 0) + (t.v = t.v ^ t.v << 4 ^ (e ^ e << 1)) | 0; }, t.x = 0, t.y = 0, t.z = 0, t.w = 0, t.v = 0, e === (e | 0) ? t.x = e : n += e; for (var r = 0; r < n.length + 64; r++) t.x ^= n.charCodeAt(r) | 0, r == n.length && (t.d = t.x << 10 ^ t.x >>> 4), t.next(); } function i(e, t) { return t.x = e.x, t.y = e.y, t.z = e.z, t.w = e.w, t.v = e.v, t.d = e.d, t; } function a(e, t) { var n = new r(e), a = t && t.state, o = function() { return (n.next() >>> 0) / 4294967296; }; return o.double = function() { do var e = ((n.next() >>> 11) + (n.next() >>> 0) / 4294967296) / (1 << 21); while (e === 0); return e; }, o.int32 = n.next, o.quick = o, a && (typeof a == `object` && i(a, n), o.state = function() { return i(n, {}); }), o; } t && t.exports ? t.exports = a : n && n.amd ? n(function() { return a; }) : this.xorwow = a; })(e, typeof t == `object` && t, typeof define == `function` && define); })); var Z_ = c$12(((e, t) => { (function(e, t, n) { function r(e) { var t = this; t.next = function() { var e = t.x, n = t.i, r = e[n], i; return r ^= r >>> 7, i = r ^ r << 24, r = e[n + 1 & 7], i ^= r ^ r >>> 10, r = e[n + 3 & 7], i ^= r ^ r >>> 3, r = e[n + 4 & 7], i ^= r ^ r << 7, r = e[n + 7 & 7], r ^= r << 13, i ^= r ^ r << 9, e[n] = i, t.i = n + 1 & 7, i; }; function n(e, t) { var n, r = []; if (t === (t | 0)) r[0] = t; else for (t = `` + t, n = 0; n < t.length; ++n) r[n & 7] = r[n & 7] << 15 ^ t.charCodeAt(n) + r[n + 1 & 7] << 13; for (; r.length < 8;) r.push(0); for (n = 0; n < 8 && r[n] === 0; ++n); for (n == 8 ? r[7] = -1 : r[n], e.x = r, e.i = 0, n = 256; n > 0; --n) e.next(); } n(t, e); } function i(e, t) { return t.x = e.x.slice(), t.i = e.i, t; } function a(e, t) { e ??= +/* @__PURE__ */ new Date(); var n = new r(e), a = t && t.state, o = function() { return (n.next() >>> 0) / 4294967296; }; return o.double = function() { do var e = ((n.next() >>> 11) + (n.next() >>> 0) / 4294967296) / (1 << 21); while (e === 0); return e; }, o.int32 = n.next, o.quick = o, a && (a.x && i(a, n), o.state = function() { return i(n, {}); }), o; } t && t.exports ? t.exports = a : n && n.amd ? n(function() { return a; }) : this.xorshift7 = a; })(e, typeof t == `object` && t, typeof define == `function` && define); })); var Q_ = c$12(((e, t) => { (function(e, t, n) { function r(e) { var t = this; t.next = function() { var e = t.w, n = t.X, r = t.i, i, a; return t.w = e = e + 1640531527 | 0, a = n[r + 34 & 127], i = n[r = r + 1 & 127], a ^= a << 13, i ^= i << 17, a ^= a >>> 15, i ^= i >>> 12, a = n[r] = a ^ i, t.i = r, a + (e ^ e >>> 16) | 0; }; function n(e, t) { var n, r, i, a, o, s = [], c = 128; for (t === (t | 0) ? (r = t, t = null) : (t += `\0`, r = 0, c = Math.max(c, t.length)), i = 0, a = -32; a < c; ++a) t && (r ^= t.charCodeAt((a + 32) % t.length)), a === 0 && (o = r), r ^= r << 10, r ^= r >>> 15, r ^= r << 4, r ^= r >>> 13, a >= 0 && (o = o + 1640531527 | 0, n = s[a & 127] ^= r + o, i = n == 0 ? i + 1 : 0); for (i >= 128 && (s[(t && t.length || 0) & 127] = -1), i = 127, a = 512; a > 0; --a) r = s[i + 34 & 127], n = s[i = i + 1 & 127], r ^= r << 13, n ^= n << 17, r ^= r >>> 15, n ^= n >>> 12, s[i] = r ^ n; e.w = o, e.X = s, e.i = i; } n(t, e); } function i(e, t) { return t.i = e.i, t.w = e.w, t.X = e.X.slice(), t; } function a(e, t) { e ??= +/* @__PURE__ */ new Date(); var n = new r(e), a = t && t.state, o = function() { return (n.next() >>> 0) / 4294967296; }; return o.double = function() { do var e = ((n.next() >>> 11) + (n.next() >>> 0) / 4294967296) / (1 << 21); while (e === 0); return e; }, o.int32 = n.next, o.quick = o, a && (a.X && i(a, n), o.state = function() { return i(n, {}); }), o; } t && t.exports ? t.exports = a : n && n.amd ? n(function() { return a; }) : this.xor4096 = a; })(e, typeof t == `object` && t, typeof define == `function` && define); })); var $_ = c$12(((e, t) => { (function(e, t, n) { function r(e) { var t = this, n = ``; t.next = function() { var e = t.b, n = t.c, r = t.d, i = t.a; return e = e << 25 ^ e >>> 7 ^ n, n = n - r | 0, r = r << 24 ^ r >>> 8 ^ i, i = i - e | 0, t.b = e = e << 20 ^ e >>> 12 ^ n, t.c = n = n - r | 0, t.d = r << 16 ^ n >>> 16 ^ i, t.a = i - e | 0; }, t.a = 0, t.b = 0, t.c = -1640531527, t.d = 1367130551, e === Math.floor(e) ? (t.a = e / 4294967296 | 0, t.b = e | 0) : n += e; for (var r = 0; r < n.length + 20; r++) t.b ^= n.charCodeAt(r) | 0, t.next(); } function i(e, t) { return t.a = e.a, t.b = e.b, t.c = e.c, t.d = e.d, t; } function a(e, t) { var n = new r(e), a = t && t.state, o = function() { return (n.next() >>> 0) / 4294967296; }; return o.double = function() { do var e = ((n.next() >>> 11) + (n.next() >>> 0) / 4294967296) / (1 << 21); while (e === 0); return e; }, o.int32 = n.next, o.quick = o, a && (typeof a == `object` && i(a, n), o.state = function() { return i(n, {}); }), o; } t && t.exports ? t.exports = a : n && n.amd ? n(function() { return a; }) : this.tychei = a; })(e, typeof t == `object` && t, typeof define == `function` && define); })); var ev = c$12(((e, n) => { (function(e, r, i) { var a = 256, o = 6, s = 52, c = `random`, l = i.pow(a, o), u = i.pow(2, s), d = u * 2, f = a - 1, p; function m(e, t, n) { var s = []; t = t == 1 ? { entropy: !0 } : t || {}; var f = v(_(t.entropy ? [e, b(r)] : e ?? y(), 3), s), p = new h(s), m = function() { for (var e = p.g(o), t = l, n = 0; e < u;) e = (e + n) * a, t *= a, n = p.g(1); for (; e >= d;) e /= 2, t /= 2, n >>>= 1; return (e + n) / t; }; return m.int32 = function() { return p.g(4) | 0; }, m.quick = function() { return p.g(4) / 4294967296; }, m.double = m, v(b(p.S), r), (t.pass || n || function(e, t, n, r) { return r && (r.S && g(r, p), e.state = function() { return g(p, {}); }), n ? (i[c] = e, t) : e; })(m, f, `global` in t ? t.global : this == i, t.state); } function h(e) { var t, n = e.length, r = this, i = 0, o = r.i = r.j = 0, s = r.S = []; for (n || (e = [n++]); i < a;) s[i] = i++; for (i = 0; i < a; i++) s[i] = s[o = f & o + e[i % n] + (t = s[i])], s[o] = t; (r.g = function(e) { for (var t, n = 0, i = r.i, o = r.j, s = r.S; e--;) t = s[i = f & i + 1], n = n * a + s[f & (s[i] = s[o = f & o + t]) + (s[o] = t)]; return r.i = i, r.j = o, n; })(a); } function g(e, t) { return t.i = e.i, t.j = e.j, t.S = e.S.slice(), t; } function _(e, t) { var n = [], r = typeof e, i; if (t && r == `object`) for (i in e) try { n.push(_(e[i], t - 1)); } catch {} return n.length ? n : r == `string` ? e : e + `\0`; } function v(e, t) { for (var n = e + ``, r, i = 0; i < n.length;) t[f & i] = f & (r ^= t[f & i] * 19) + n.charCodeAt(i++); return b(t); } function y() { try { var t; return p && (t = p.randomBytes) ? t = t(a) : (t = new Uint8Array(a), (e.crypto || e.msCrypto).getRandomValues(t)), b(t); } catch { var n = e.navigator, i = n && n.plugins; return [ +/* @__PURE__ */ new Date(), e, i, e.screen, b(r) ]; } } function b(e) { return String.fromCharCode.apply(0, e); } if (v(i.random(), r), typeof n == `object` && n.exports) { n.exports = m; try { p = f$11(`crypto`); } catch {} } else typeof define == `function` && define.amd ? define(function() { return m; }) : i[`seed` + c] = m; })(typeof self < `u` ? self : e, [], Math); })); var tv = d$13(c$12(((e, t) => { var n = J_(), r = Y_(), i = X_(), a = Z_(), o = Q_(), s = $_(), c = ev(); c.alea = n, c.xor128 = r, c.xorwow = i, c.xorshift7 = a, c.xor4096 = o, c.tychei = s, t.exports = c; }))(), 1); const nv = `ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`; const rv = (/* @__PURE__ */ new Uint8Array(128)).fill(255); for (let e = 0; e < 64; e++) rv[nv.charCodeAt(e)] = e; function iv(e) { return e === 9 || e === 10 || e === 12 || e === 13 || e === 32; } function av(e, t) { for (; t < e.length && iv(e.charCodeAt(t));) t++; return t; } function ov(e, t) { let n = e.length, r = e; n === 2 ? r = e + `AA` : n === 3 && (r = e + `A`); let i = rv[r.charCodeAt(0)], a = rv[r.charCodeAt(1)], o = rv[r.charCodeAt(2)], s = rv[r.charCodeAt(3)], c = i << 2 | a >> 4, l = (a & 15) << 4 | o >> 2, u = (o & 3) << 6 | s; if (n === 2) { if (t && l !== 0) throw SyntaxError(`Extra bits in base64 chunk`); return [c]; } if (n === 3) { if (t && u !== 0) throw SyntaxError(`Extra bits in base64 chunk`); return [c, l]; } return [ c, l, u ]; } function sv(e, t, n, r) { if (r === void 0 && (r = 2 ** 53 - 1), r === 0) return { read: 0, bytes: [], error: null }; let i = 0, a = [], o = ``, s = 0, c = 0, l = e.length; for (;;) { if (c = av(e, c), c === l) { if (s > 0) { if (n === `stop-before-partial`) return { read: i, bytes: a, error: null }; if (n === `loose`) { if (s === 1) return { read: i, bytes: a, error: SyntaxError(`Invalid base64: lone character in final chunk`) }; a.push(...ov(o, !1)); } else return { read: i, bytes: a, error: SyntaxError(`Invalid base64: incomplete chunk in strict mode`) }; } return { read: l, bytes: a, error: null }; } let u = e[c]; if (c++, u === `=`) { if (s < 2) return { read: i, bytes: a, error: SyntaxError(`Invalid base64: padding in unexpected place`) }; if (c = av(e, c), s === 2) { if (c === l) return n === `stop-before-partial` ? { read: i, bytes: a, error: null } : { read: i, bytes: a, error: SyntaxError(`Invalid base64: missing second padding character`) }; u = e[c], u === `=` && (c = av(e, c + 1)); } if (c < l) return { read: i, bytes: a, error: SyntaxError(`Invalid base64: unexpected characters after padding`) }; let t = n === `strict`; try { a.push(...ov(o, t)); } catch (e) { return { read: i, bytes: a, error: e }; } return { read: l, bytes: a, error: null }; } if (t === `base64url`) { if (u === `+` || u === `/`) return { read: i, bytes: a, error: SyntaxError(`Invalid base64url: unexpected character '${u}'`) }; u === `-` ? u = `+` : u === `_` && (u = `/`); } let d = u.charCodeAt(0); if (d >= 128 || rv[d] === 255) return { read: i, bytes: a, error: SyntaxError(`Invalid base64: unexpected character '${e[c - 1]}'`) }; let f = r - a.length; if (f === 1 && s === 2 || f === 2 && s === 3 || (o += u, s = o.length, s === 4 && (a.push(...ov(o)), o = ``, s = 0, i = c, a.length === r))) return { read: i, bytes: a, error: null }; } } function cv(e, t) { t === void 0 && (t = 2 ** 53 - 1); let n = e.length, r = [], i = 0; if (n % 2 != 0) return { read: 0, bytes: [], error: SyntaxError(`Invalid hex: string length must be even`) }; for (; i < n && r.length < t;) { let t = e.substring(i, i + 2); if (!/^[0-9a-fA-F]{2}$/.test(t)) return { read: i, bytes: r, error: SyntaxError(`Invalid hex: unexpected character at position ${i}`) }; i += 2, r.push(Number.parseInt(t, 16)); } return { read: i, bytes: r, error: null }; } function lv(e, t) { let n = t?.alphabet ?? `base64`; if (n !== `base64` && n !== `base64url`) throw TypeError(`Invalid alphabet: expected "base64" or "base64url", got "${n}"`); let r = !!t?.omitPadding, i = ``, a = e.length; for (let t = 0; t < a; t += 3) { let n = e[t], o = t + 1 < a ? e[t + 1] : 0, s = t + 2 < a ? e[t + 2] : 0; i += nv[n >> 2 & 63], i += nv[(n & 3) << 4 | o >> 4 & 15], t + 1 < a ? i += nv[(o & 15) << 2 | s >> 6 & 3] : r || (i += `=`), t + 2 < a ? i += nv[s & 63] : r || (i += `=`); } return n === `base64url` && (i = i.replace(/\+/g, `-`).replace(/\//g, `_`)), i; } function uv(e) { let t = ``; for (let n = 0; n < e.length; n++) t += e[n].toString(16).padStart(2, `0`); return t; } function dv(e) { let t = e.prototype, n = e; t.toBase64 || Object.defineProperty(t, "toBase64", { value: function(t) { if (!(this instanceof e)) throw TypeError(`this is not a Uint8Array`); return lv(this, t); }, writable: !0, enumerable: !1, configurable: !0 }), t.toHex || Object.defineProperty(t, "toHex", { value: function() { if (!(this instanceof e)) throw TypeError(`this is not a Uint8Array`); return uv(this); }, writable: !0, enumerable: !1, configurable: !0 }), t.setFromBase64 || Object.defineProperty(t, "setFromBase64", { value: function(t, n) { if (!(this instanceof e)) throw TypeError(`this is not a Uint8Array`); if (typeof t != `string`) throw TypeError(`expected a string`); let r = n?.alphabet ?? `base64`; if (r !== `base64` && r !== `base64url`) throw TypeError(`Invalid alphabet: expected "base64" or "base64url", got "${r}"`); let i = n?.lastChunkHandling ?? `loose`; if (i !== `loose` && i !== `strict` && i !== `stop-before-partial`) throw TypeError(`Invalid lastChunkHandling: expected "loose", "strict", or "stop-before-partial", got "${i}"`); let a = sv(t, r, i, this.length), o = a.bytes, s = o.length; for (let e = 0; e < s; e++) this[e] = o[e]; if (a.error) throw a.error; return { read: a.read, written: s }; }, writable: !0, enumerable: !1, configurable: !0 }), t.setFromHex || Object.defineProperty(t, "setFromHex", { value: function(t) { if (!(this instanceof e)) throw TypeError(`this is not a Uint8Array`); if (typeof t != `string`) throw TypeError(`expected a string`); let n = cv(t, this.length), r = n.bytes, i = r.length; for (let e = 0; e < i; e++) this[e] = r[e]; if (n.error) throw n.error; return { read: n.read, written: i }; }, writable: !0, enumerable: !1, configurable: !0 }), n.fromBase64 || Object.defineProperty(e, "fromBase64", { value: function(t, n) { if (typeof t != `string`) throw TypeError(`expected a string`); let r = n?.alphabet ?? `base64`; if (r !== `base64` && r !== `base64url`) throw TypeError(`Invalid alphabet: expected "base64" or "base64url", got "${r}"`); let i = n?.lastChunkHandling ?? `loose`; if (i !== `loose` && i !== `strict` && i !== `stop-before-partial`) throw TypeError(`Invalid lastChunkHandling: expected "loose", "strict", or "stop-before-partial", got "${i}"`); let a = sv(t, r, i); if (a.error) throw a.error; return new e(a.bytes); }, writable: !0, enumerable: !1, configurable: !0 }), n.fromHex || Object.defineProperty(e, "fromHex", { value: function(t) { if (typeof t != `string`) throw TypeError(`expected a string`); let n = cv(t); if (n.error) throw n.error; return new e(n.bytes); }, writable: !0, enumerable: !1, configurable: !0 }); } function fv(e) { return function() { let t = `0123456789abcdef`, n = ``; for (let r = 0; r < 36; r++) r === 8 || r === 13 || r === 18 || r === 23 ? n += `-` : r === 14 ? n += `4` : r === 19 ? n += t[Math.floor(e() * 4) + 8] : n += t[Math.floor(e() * 16)]; return n; }; } function pv(e) { let { fixedTimestamp: t } = e, { seed: n } = e, r = (0, tv.default)(n), i = createContext(), a = runInContext(`globalThis`, i); a.Math.random = r; let o = a.Date; a.Date = function(...e) { return e.length === 0 ? new o(t) : new o(...e); }, a.Date.prototype = o.prototype, Object.setPrototypeOf(a.Date, o), a.Date.now = () => t; let s = globalThis.crypto, c = s.subtle; function l(e) { for (let t = 0; t < e.length; t++) e[t] = Math.floor(r() * 256); return e; } let u = fv(r), d = c.digest.bind(c); return a.crypto = new Proxy(s, { get(e, t) { return t === `getRandomValues` ? l : t === `randomUUID` ? u : t === `subtle` ? new Proxy(c, { get(e, t) { return t === `generateKey` ? () => { throw new u$10("`crypto.subtle.generateKey()` is not available inside a workflow function. Move key generation to a step function where full Node.js crypto is available."); } : t === `digest` ? d : e[t]; } }) : e[t]; } }), a.process = { env: Object.freeze({ ...process.env }) }, a.DOMException = globalThis.DOMException, a.Headers = globalThis.Headers, a.TextEncoder = globalThis.TextEncoder, a.TextDecoder = globalThis.TextDecoder, a.console = globalThis.console, a.URL = globalThis.URL, a.URLSearchParams = globalThis.URLSearchParams, a.structuredClone = globalThis.structuredClone, a.atob = globalThis.atob, a.btoa = globalThis.btoa, dv(a.Uint8Array), a.Symbol.dispose ??= Symbol.for(`Symbol.dispose`), a.Symbol.asyncDispose ??= Symbol.for(`Symbol.asyncDispose`), a.exports = {}, a.module = { exports: a.exports }, { context: i, globalThis: a, updateTimestamp: (e) => { t = e; } }; } const mv = /* @__PURE__ */ new Map(); function hv(e) { let t = mv.get(e); if (t !== void 0) return mv.delete(e), mv.set(e, t), t; } function gv(e, t) { let n = hv(e); if (n === void 0) for (n = /* @__PURE__ */ new Map(), mv.set(e, n); mv.size > 8;) { let e = mv.keys().next().value; if (e === void 0) break; mv.delete(e); } let r = n.get(t); return r === void 0 && (r = new Script(e, { filename: t }), n.set(t, r)), r; } function _v(e, t, n) { return gv(e, t).runInContext(n); } function vv(e) { return async function(t, n = {}) { let { promise: i, resolve: a } = f$9(), o = `attr_${e.generateUlid()}`, s = { type: `attribute`, correlationId: o, changes: t, ...n.allowReservedAttributes === !0 ? { allowReservedAttributes: !0 } : {} }; return e.invocationsQueue.set(o, s), e.eventsConsumer.subscribe((r) => r ? r.correlationId === o ? r.eventType !== `attr_set` || r.eventData.writer.type !== `workflow` || JSON.stringify(r.eventData.changes) !== JSON.stringify(t) || r.eventData.allowReservedAttributes === !0 != (n.allowReservedAttributes === !0) ? (e.promiseQueue = e.promiseQueue.then(() => { e.onWorkflowError(new f$8(`Replay divergence: Unexpected attribute event for ${o}`, { eventId: r.eventId })); }), Kb.Finished) : (e.invocationsQueue.delete(o), e.promiseQueue = e.promiseQueue.then(() => { a(); }), Kb.Finished) : Kb.NotConsumed : (d$9(e, () => { e.onWorkflowError(new Wv(e.invocationsQueue, e.globalThis)); }), Kb.NotConsumed)), i; }; } function yv(e, t) { if (typeof t != `string`) return null; let n = q_$1(G_$1, e.globalThis), r = n?.[D_$1]; return typeof r == `function` ? r.call(n, { runId: t }) : null; } function bv(e) { return function(t = {}) { if (t.token === ``) throw Error("`createHook()` was called with an empty string token. Pass a non-empty token, or omit the `token` option to use a randomly generated one."); let n = `hook_${e.generateUlid()}`, i = t.token ?? e.generateNanoid(), a = t.isWebhook ?? !1; e.invocationsQueue.set(n, { type: `hook`, correlationId: n, token: i, metadata: t.metadata, isWebhook: a }); let o = [], s = [], c = [], l = !1, u = !1, d = !1, f = !1, p = null, h = null; jb.debug(`Hook consumer setup`, { correlationId: n, token: i }), e.eventsConsumer.subscribe((t) => { if (!t) return l = !0, (s.length > 0 && o.length === 0 || c.length > 0 && !u && !f) && d$9(e, () => { e.onWorkflowError(new Wv(e.invocationsQueue, e.globalThis)); }), Kb.NotConsumed; if (t.correlationId !== n) return Kb.NotConsumed; let a = `eventData` in t && t.eventData && `token` in t.eventData ? t.eventData.token : void 0; if (typeof a == `string` && a !== i) return e.promiseQueue = e.promiseQueue.then(() => { e.onWorkflowError(new f$8(`Replay divergence: hook event ${t.eventType} for ${n} belongs to token "${a}", but the current hook consumer expects "${i}"`, { eventId: t.eventId })); }), Kb.Finished; if (t.eventType === `hook_created`) { let t = e.invocationsQueue.get(n); t && t.type === `hook` && (t.hasCreatedEvent = !0), u = !0; let r = c.slice(); return c.length = 0, e.promiseQueue = e.promiseQueue.then(() => { for (let e of r) e.resolve(null); }), Kb.Consumed; } if (t.eventType === `hook_conflict`) { e.invocationsQueue.delete(n); let r = t, i = new y$6(r.eventData.token, r.eventData.conflictingRunId); f = !0, p = i, h = yv(e, r.eventData.conflictingRunId); let a = s.slice(); s.length = 0; let o = c.slice(); return c.length = 0, e.promiseQueue = e.promiseQueue.then(() => { for (let e of a) e.reject(i); for (let e of o) h ? e.resolve(h) : e.reject(i); }), Kb.Consumed; } if (t.eventType === `hook_received`) { let n = e.eventsConsumer.eventIndex, i = u$9(e, n, `hook`); if (s.length > 0) { let r = s.shift(); if (r) { e.pendingDeliveries++; let a; e.promiseQueue = e.promiseQueue.then(async () => { try { a = { ok: !0, value: await zx(t.eventData.payload, e.runId, e.encryptionKey, e.globalThis) }; } catch (e) { a = { ok: !1, error: e }; } finally { e.pendingDeliveries--; } l$7(e, n, [`wait`]).then(() => { i.markDelivered(), a.ok ? r.resolve(a.value) : r.reject(a.error); }); }); } } else { let a, s = f$9(); e.pendingDeliveries++, e.promiseQueue = e.promiseQueue.then(async () => { try { a = { ok: !0, value: await zx(t.eventData.payload, e.runId, e.encryptionKey, e.globalThis) }; } catch (e) { a = { ok: !1, error: e }; } finally { e.pendingDeliveries--, s.resolve(); } }), o.push({ claim: () => s.promise.then(() => l$7(e, n, [`wait`])).then(() => { if (i.markDelivered(), a && !a.ok) throw a.error; return a.value; }) }); } return Kb.Consumed; } return t.eventType === `hook_disposed` ? (e.invocationsQueue.delete(n), d = !0, Kb.Finished) : (e.promiseQueue = e.promiseQueue.then(() => { e.onWorkflowError(new f$8(`Replay divergence: Unexpected event type for hook ${n} (token: ${i}) "${t.eventType}"`, { eventId: t.eventId })); }), Kb.Finished); }); let g = !1; function _() { let t = f$9(); if (f && p) return e.promiseQueue = e.promiseQueue.then(() => { t.reject(p); }), t.promise; if (o.length > 0) { let e = o.shift(); if (e) return e.claim(); } return l && d$9(e, () => { e.onWorkflowError(new Wv(e.invocationsQueue, e.globalThis)); }), s.push(t), t.promise; } function v() { let t = f$9(); if (u) return e.promiseQueue = e.promiseQueue.then(() => { t.resolve(null); }), t.promise; if (f) return e.promiseQueue = e.promiseQueue.then(() => { h ? t.resolve(h) : t.reject(p); }), t.promise; let i = e.invocationsQueue.get(n); return i && i.type === `hook` && (i.hasConflictAwaiter = !0), l && d$9(e, () => { e.onWorkflowError(new Wv(e.invocationsQueue, e.globalThis)); }), c.push(t), t.promise; } function y() { if (g || (g = !0, d)) return; let t = e.invocationsQueue.get(n); t && t.type === `hook` && (t.disposed = !0), s.length > 0 && (s.length = 0, d$9(e, () => { e.onWorkflowError(new Wv(e.invocationsQueue, e.globalThis)); })), jb.debug(`Hook disposed`, { correlationId: n, token: i }); } let b = { token: i, getConflict() { return v(); }, then(e, t) { return _().then(e, t); }, async *[Symbol.asyncIterator]() { for (; !g;) yield await this; }, dispose: y, [Symbol.dispose]: y }, x = e.globalThis.Symbol.dispose; return x && x !== Symbol.dispose && (b[x] = y), b; }; } function xv(e) { return async function(t) { let { promise: n, resolve: i } = f$9(), a = `wait_${e.generateUlid()}`, o = h$10(t), s = { type: `wait`, correlationId: a, resumeAt: o }; return e.invocationsQueue.set(a, s), e.eventsConsumer.subscribe((t) => { if (!t) return d$9(e, () => { e.onWorkflowError(new Wv(e.invocationsQueue, e.globalThis)); }), Kb.NotConsumed; if (t.correlationId !== a) return Kb.NotConsumed; if (t.eventType === `wait_created`) { let n = e.invocationsQueue.get(a); return n && n.type === `wait` && (n.hasCreatedEvent = !0, n.resumeAt = t.eventData.resumeAt), Kb.Consumed; } if (t.eventType === `wait_completed`) { let n = t.eventData?.resumeAt; if (n !== void 0) { let r = e.invocationsQueue.get(a), i = r && r.type === `wait` ? r.resumeAt : o, s = new Date(n), c = s.getTime(), l = i.getTime(), u = Number.isFinite(c) ? s.toISOString() : String(n); if (c !== l) return e.promiseQueue = e.promiseQueue.then(() => { e.onWorkflowError(new f$8(`Replay divergence: wait_completed event for ${a} has resumeAt "${u}", but the current wait consumer expects "${i.toISOString()}"`, { eventId: t.eventId })); }), Kb.Finished; } e.invocationsQueue.delete(a); let r = e.eventsConsumer.eventIndex, s = u$9(e, r, `wait`); return e.promiseQueue.then(() => l$7(e, r, [`hook`])).then(() => { s.markDelivered(), i(); }), Kb.Finished; } return e.promiseQueue = e.promiseQueue.then(() => { e.onWorkflowError(new f$8(`Replay divergence: Unexpected event type for wait ${a} "${t.eventType}"`, { eventId: t.eventId })); }), Kb.Finished; }), n; }; } async function Sv(e, t, n, r, i) { if (t.size !== 0) { for (let e of t.values()) e.type === `hook` && e.isSystem && !e.disposed && !e.abortRequested && (e.disposed = !0); try { let e = await mg(); await Ng({ suspension: new Wv(t, n), world: e, run: r }); } catch (t) { Ab.warn(`Failed to drain pending queue items for ${i} workflow run`, { workflowRunId: e, message: t instanceof Error ? t.message : String(t) }); } } } async function Cv(e, t, n, i, a) { return vb(`workflow.run ${t.workflowName}`, async (s) => { s?.setAttributes({ ...Kv(t.workflowName), ...Jv(t.runId), ...Yv(t.status), ...Zv(n.length) }); let c = t.startedAt; if (!c) throw new u$10(`Workflow run "${t.runId}" has no "startedAt" timestamp (should not happen)`); let l = K_(t.runId) ?? +t.createdAt, u = process.env.VERCEL_URL !== void 0, d = u ? void 0 : await kg(), { context: f, globalThis: p, updateTimestamp: m } = pv({ seed: `${t.runId}:${t.workflowName}:${t.deploymentId}`, fixedTimestamp: l }), h = f$9(), g = Ih$1(() => p.Math.random()), _ = G_(`useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict`, 21, (e) => new Uint8Array(e).map(() => 256 * p.Math.random())), v = { current: Promise.resolve() }, y = new qb(n, { onConsumedEvent: (e) => { m(+e.createdAt); }, onUnconsumedEvent: (e) => { h.reject(new f$8(`Replay could not consume event: eventType=${e.eventType}, correlationId=${e.correlationId}, eventId=${e.eventId}.`, { eventId: e.eventId })); }, getPromiseQueue: () => v.current }), b = { runId: t.runId, encryptionKey: i, globalThis: p, onWorkflowError: h.reject, eventsConsumer: y, generateUlid: () => g(l), generateNanoid: _, invocationsQueue: /* @__PURE__ */ new Map(), get promiseQueue() { return v.current; }, set promiseQueue(e) { v.current = e; }, pendingDeliveries: 0, pendingDeliveryBarriers: /* @__PURE__ */ new Map(), stepHydrationCache: a }; b.eventsConsumer.subscribe((e) => e && (e.eventType === `run_created` || e.eventType === `run_started` || e.eventType === `attr_set` && e.eventData.writer.type === `step`) ? Kb.Consumed : Kb.NotConsumed); let x = q_(b), C = bv(b), w = xv(b), T = vv(b); p[O_$1] = x, p[k_$1] = T, p[A_$1] = C, p[j_$1] = w, p[M_$1] = (e) => Ub(t.runId, e); let D = u ? `https://${process.env.VERCEL_URL}` : `http://localhost:${d ?? 3e3}`; p[Ee$8] = { workflowName: t.workflowName, workflowRunId: t.runId, workflowStartedAt: new p.Date(+c), url: D, features: { encryption: !!i } }, p[N_$1] = g, p.fetch = () => { throw new p.Error(`Global "fetch" is unavailable in workflow functions. Use the "fetch" step function from "workflow" to make HTTP requests.\n\nLearn more: https://workflow-sdk.dev/err/${a$10.FETCH_IN_WORKFLOW_FUNCTION}`); }; let O = `Timeout functions like "setTimeout" and "setInterval" are not supported in workflow functions. Use the "sleep" function from "workflow" for time-based delays.`; p.setTimeout = () => { throw new u$10(O, { slug: a$10.TIMEOUT_FUNCTIONS_IN_WORKFLOW }); }, p.setInterval = () => { throw new u$10(O, { slug: a$10.TIMEOUT_FUNCTIONS_IN_WORKFLOW }); }, p.clearTimeout = () => { throw new u$10(O, { slug: a$10.TIMEOUT_FUNCTIONS_IN_WORKFLOW }); }, p.clearInterval = () => { throw new u$10(O, { slug: a$10.TIMEOUT_FUNCTIONS_IN_WORKFLOW }); }, p.setImmediate = () => { throw new u$10(O, { slug: a$10.TIMEOUT_FUNCTIONS_IN_WORKFLOW }); }, p.clearImmediate = () => { throw new u$10(O, { slug: a$10.TIMEOUT_FUNCTIONS_IN_WORKFLOW }); }, p.AbortController = Yb(b); let j = Xb(); p.AbortSignal = { abort: j.abort, any: j.any, timeout: j.timeout }; class M { cache; credentials; destination; headers; integrity; method; mode; redirect; referrer; referrerPolicy; url; keepalive; signal; duplex; body; constructor(e, t) { if (typeof e == `string` || e instanceof p.URL) { let t = String(e); try { new p.URL(t), this.url = t; } catch (e) { throw TypeError(`Failed to parse URL from ${t}`, { cause: e }); } } else { if (this.url = e.url, !t) { this.method = e.method, this.headers = new p.Headers(e.headers), this.body = e.body, this.mode = e.mode, this.credentials = e.credentials, this.cache = e.cache, this.redirect = e.redirect, this.referrer = e.referrer, this.referrerPolicy = e.referrerPolicy, this.integrity = e.integrity, this.keepalive = e.keepalive, this.signal = e.signal, this.duplex = e.duplex, this.destination = e.destination; return; } this.method = e.method, this.headers = new p.Headers(e.headers), this.body = e.body, this.mode = e.mode, this.credentials = e.credentials, this.cache = e.cache, this.redirect = e.redirect, this.referrer = e.referrer, this.referrerPolicy = e.referrerPolicy, this.integrity = e.integrity, this.keepalive = e.keepalive, this.signal = e.signal, this.duplex = e.duplex, this.destination = e.destination; } t?.method ? this.method = t.method.toUpperCase() : typeof this.method != `string` && (this.method = `GET`), t?.headers ? this.headers = new p.Headers(t.headers) : (typeof e == `string` || e instanceof p.URL) && (this.headers = new p.Headers()), t?.mode === void 0 ? typeof this.mode != `string` && (this.mode = `cors`) : this.mode = t.mode, t?.credentials === void 0 ? typeof this.credentials != `string` && (this.credentials = `same-origin`) : this.credentials = t.credentials, t?.cache === void 0 ? typeof this.cache != `string` && (this.cache = `default`) : this.cache = t.cache, t?.redirect === void 0 ? typeof this.redirect != `string` && (this.redirect = `follow`) : this.redirect = t.redirect, t?.referrer === void 0 ? typeof this.referrer != `string` && (this.referrer = `about:client`) : this.referrer = t.referrer, t?.referrerPolicy === void 0 ? typeof this.referrerPolicy != `string` && (this.referrerPolicy = ``) : this.referrerPolicy = t.referrerPolicy, t?.integrity === void 0 ? typeof this.integrity != `string` && (this.integrity = ``) : this.integrity = t.integrity, t?.keepalive === void 0 ? typeof this.keepalive != `boolean` && (this.keepalive = !1) : this.keepalive = t.keepalive, t?.signal === void 0 ? this.signal ||= { aborted: !1 } : this.signal = t.signal, this.duplex ||= `half`, this.destination ||= `document`; let n = t?.body; if (n != null && (this.method === `GET` || this.method === `HEAD`)) throw TypeError(`Request with GET/HEAD method cannot have body.`); n == null ? this.body = null : this.body = Object.create(p.ReadableStream.prototype, { [z_$1]: { value: n, writable: !1 } }); } clone() { Gv(); } get bodyUsed() { return !1; } blob; formData; arrayBuffer; json; text; async bytes() { return new Uint8Array(await this.arrayBuffer()); } } p.Request = M, Object.defineProperties(M.prototype, { arrayBuffer: { value: x(`__builtin_response_array_buffer`), writable: !0, configurable: !0 }, json: { value: x(`__builtin_response_json`), writable: !0, configurable: !0 }, text: { value: x(`__builtin_response_text`), writable: !0, configurable: !0 } }); class P { type; url; status; statusText; body; headers; redirected; constructor(e, t) { if (this.status = t?.status ?? 200, this.statusText = t?.statusText ?? ``, this.headers = new p.Headers(t?.headers), this.type = `default`, this.url = ``, this.redirected = !1, e != null && (this.status === 204 || this.status === 205 || this.status === 304)) throw TypeError(`Response constructor: Invalid response status code ${this.status}`); e == null ? this.body = null : this.body = Object.create(p.ReadableStream.prototype, { [z_$1]: { value: e, writable: !1 } }); } clone; blob; formData; get ok() { return this.status >= 200 && this.status < 300; } get bodyUsed() { return !1; } arrayBuffer; json; text; async bytes() { return new Uint8Array(await this.arrayBuffer()); } static json(e, t) { let n = JSON.stringify(e), r = new p.Headers(t?.headers); return r.has(`content-type`) || r.set(`content-type`, `application/json`), new P(n, { ...t, headers: r }); } static error() { Gv(); } static redirect(e, t = 302) { if (![ 301, 302, 303, 307, 308 ].includes(t)) throw RangeError(`Invalid redirect status code: ${t}. Must be one of: 301, 302, 303, 307, 308`); let n = new p.Headers(); n.set(`Location`, String(e)); let r = Object.create(P.prototype); return r.status = t, r.statusText = ``, r.headers = n, r.body = null, r.type = `default`, r.url = ``, r.redirected = !1, r; } } p.Response = P, Object.defineProperties(P.prototype, { arrayBuffer: { value: x(`__builtin_response_array_buffer`), writable: !0, configurable: !0 }, json: { value: x(`__builtin_response_json`), writable: !0, configurable: !0 }, text: { value: x(`__builtin_response_text`), writable: !0, configurable: !0 } }); class I { constructor() { Gv(); } get locked() { return !1; } cancel() { Gv(); } getReader() { Gv(); } pipeThrough() { Gv(); } pipeTo() { Gv(); } tee() { Gv(); } values() { Gv(); } static from() { Gv(); } [Symbol.asyncIterator]() { Gv(); } } p.ReadableStream = I; class ee { constructor() { Gv(); } get locked() { return !1; } abort() { Gv(); } close() { Gv(); } getWriter() { Gv(); } } p.WritableStream = ee; class L { readable; writable; constructor() { Gv(); } } p.TransformStream = L, p.console = globalThis.console; let te = Symbol.for(`@vercel/request-context`); p[te] = globalThis[te]; let R = i$12(t.workflowName)?.moduleSpecifier || t.workflowName; _v(e, R, f); let ne = _v(`globalThis.__private_workflows?.get(${JSON.stringify(t.workflowName)})`, R, f); if (typeof ne != `function`) throw new _$7(t.workflowName); let z = []; b.promiseQueue = b.promiseQueue.then(async () => { z = await kx(t.input, t.runId, i, p); }), await b.promiseQueue, s?.setAttributes({ ...Qv(z.length) }); try { let e = await Promise.race([ne(...z), h.promise]), n = await Ax(e, t.runId, i, p, !1, (t.specVersion ?? 0) >= 5); return s?.setAttributes({ ...$v(typeof e) }), await Sv(t.runId, b.invocationsQueue, p, t, `completed`), n; } catch (e) { throw Wv.is(e) || f$8.is(e) || await Sv(t.runId, b.invocationsQueue, p, t, `failed`), e; } }); } function wv(e) { return u$10.is(e) ? t$9.RUNTIME_ERROR : yr$3(e) ? t$9.WORLD_CONTRACT_ERROR : null; } async function Tv({ world: e, workflowRun: t, runId: n, requestId: r, err: i, errorCode: a, logMessage: o }) { Ab.error(o, { workflowRunId: n, errorCode: a, error: i instanceof Error ? i.message : String(i) }); try { let o = mS(e, t ?? n); await e.events.create(n, { eventType: `run_failed`, specVersion: 5, eventData: { error: await Lx(i, n, await o(), globalThis, (t?.specVersion ?? 0) >= 5), errorCode: a } }, { requestId: r }); } catch (e) { if (x$9.is(e) || S$10.is(e)) return; if (yr$3(e)) { Ab.error(`Fatal world contract error while recording workflow failure`, { workflowRunId: n, errorCode: t$9.WORLD_CONTRACT_ERROR, error: e instanceof Error ? e.message : String(e) }); return; } throw e; } } function Ev(e, t) { let n = e.find((e) => e.runId === t && (e.eventType === `run_completed` || e.eventType === `run_failed` || e.eventType === `run_cancelled`)); return n ? (Ab.debug(`Run reached terminal event, exiting`, { workflowRunId: t, eventType: n.eventType, eventId: n.eventId }), !0) : !1; } function Dv(e) { let t = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set(); for (let r of e) r.eventType === `hook_disposed` ? t.add(r.correlationId) : r.eventType === `wait_completed` && n.add(r.correlationId); for (let r of e) if (r.eventType === `hook_created` && !t.has(r.correlationId) || r.eventType === `wait_created` && !n.has(r.correlationId)) return !0; return !1; } function Ov(e, t) { let n = Number(process.env.WORKFLOW_V2_TIMEOUT_MS) || 12e4, r = ih$1(t?.namespace), a = ah$1(`workflow`, r), s = (t) => t.createQueueHandler(a, async (s, c) => { let l = Qx(s); if (l) { await eS(l, `workflow`, t.specVersion); return; } let { runId: u, traceCarrier: d, requestedAt: p, stepId: m, stepName: h, replayDivergence: g, runInput: _ } = uh$1.parse(s), v = ub(d) ? d : void 0, { requestId: x } = c, S = c.queueName.slice(a.length), C = Ab.forRun(u, S); if (c.attempt > 48) { let e = Cr$3(void 0, t$9.MAX_DELIVERIES_EXCEEDED); C.error(`Workflow handler exceeded max deliveries (${c.attempt}/48)`, { attempt: c.attempt, errorCode: e.errorCode, errorAttribution: e.attribution }); try { let e = await mg(), t = mS(e, u), n = new D$10(`Workflow exceeded maximum queue deliveries (${c.attempt}/48)`); await e.events.create(u, { eventType: `run_failed`, specVersion: 5, eventData: { error: await Lx(n, u, await t()), errorCode: t$9.MAX_DELIVERIES_EXCEEDED } }, { requestId: x }); } catch (e) { if (x$9.is(e) || S$10.is(e)) return; C.error(`Failed to mark run as failed after ${c.attempt} delivery attempts. A persistent error is preventing the run from being terminated. The run will remain in its current state until manually resolved. This is most likely due to a persistent outage of the workflow backend or a bug in the workflow runtime and should be reported to the Workflow team.`, { attempt: c.attempt, errorName: e instanceof Error ? e.name : `UnknownError`, errorMessage: e instanceof Error ? e.message : String(e), errorStack: e instanceof Error ? e.stack : void 0 }); } return; } let w = lb(), O = () => db(w, v), A = await fb(w, v), j = new _g(), M = w === `continuous` ? v : void 0, P = await Sb(`CONSUMER`); return await hb(M, async () => await Eb({ workflowRunId: u, workflowName: S }, async () => { let t = await vb(`workflow.route.get_world`, async () => mg()); return vb(`workflow.execute ${c$10(S)}`, { kind: P, links: A }, async (i) => { i?.setAttributes({ ...Kv(S), ...qv(`execute_v2`), ...ky(`vercel-queue`), ...Ay(c.queueName), ...jy(c.messageId), ...My(`process`), ...pS({ requestedAt: p }), ...Jv(u), ...ey(!!v), ...ty(w) }); let a = Date.now(), s = 0, l = null, d = null, A = U_(), M = null, P, F = -1, I, ee, L = Pr$3() && _ !== void 0 && c.attempt === 1 && m === void 0 && !g; i?.setAttributes(ny(L)); let te, R = async () => { if (te) try { await te; } catch {} }, ne = async (e) => { if (!L) return { timeoutSeconds: e }; await fS(t, Yx(S, r), { runId: u, traceCarrier: await O(), requestedAt: /* @__PURE__ */ new Date() }, e > 0 ? { delaySeconds: e } : void 0); }; if (m && h) try { let e = await t.runs.get(u); if (e.status !== `running`) { Ab.debug(`Run already finished, skipping background step`, { workflowRunId: u, status: e.status }); return; } let n = e.startedAt ? +e.startedAt : Date.now(); j.pause(); let i; try { i = await jg({ world: t, workflowRunId: u, workflowDeploymentId: e.deploymentId, workflowName: S, workflowStartedAt: n, stepId: m, stepName: h, runSpecVersion: e.specVersion }); } finally { j.resume(); } if (i.type === `retry` || i.type === `throttled`) return { timeoutSeconds: i.timeoutSeconds }; if (i.type === `completed` && i.hasPendingOps) { await fS(t, Yx(S, r), { runId: u, traceCarrier: await O(), requestedAt: /* @__PURE__ */ new Date() }); return; } if (i.type === `completed` || i.type === `failed` || i.type === `skipped`) { let t = await lS(u); l = t.events, d = t.cursor; let r = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Set(); for (let e of l) e.eventType === `step_created` ? r.add(e.correlationId) : (e.eventType === `step_completed` || e.eventType === `step_failed`) && i.add(e.correlationId); let a = !1; for (let e of r) if (!i.has(e)) { a = !0; break; } if (a) { Ab.debug(`Background step done but other steps pending, returning`, { workflowRunId: u }); return; } Ab.debug(`All parallel steps done, replaying inline after background step`, { workflowRunId: u }), P = e, F = n; } else return; } catch (e) { let n = wv(e); if (!n) throw e; await Tv({ world: t, workflowRun: P, runId: u, requestId: x, err: e, errorCode: n, logMessage: `Fatal error while preparing background workflow step` }); return; } if (!P) { let e = { eventType: `run_started`, specVersion: _?.specVersion ?? 5, ..._ ? { eventData: { input: _.input, deploymentId: _.deploymentId, workflowName: _.workflowName, executionContext: _.executionContext, attributes: _.attributes, allowReservedAttributes: _.allowReservedAttributes } } : {} }, n = (e) => { i?.addEvent(`workflow.run_started.create.start`, { "workflow.run_started.skip_preload": e }); }; if (L && _) { n(!0); let r = t.events.create(u, e, { requestId: x, skipPreload: !0 }); te = r, r.catch(() => {}), I = []; let a = /* @__PURE__ */ new Date(); P = { runId: u, status: `running`, deploymentId: _.deploymentId, workflowName: _.workflowName, specVersion: _.specVersion, executionContext: _.executionContext, input: _.input, attributes: _.attributes ?? {}, startedAt: a, createdAt: a, updatedAt: a }, F = +a, i?.setAttributes({ ...Yv(`running`), ...Xv(F) }); } else { try { n(!1); let r = await t.events.create(u, e, { requestId: x }); if (!r.run) throw new u$10(`Event creation for 'run_started' did not return the run entity for run "${u}"`); if (P = r.run, r.events && r.events.length > 0 && r.hasMore !== !0 && (I = r.events, ee = r.cursor), !P.startedAt) throw new u$10(`Workflow run "${u}" has no "startedAt" timestamp`); } catch (e) { if (x$9.is(e) || S$10.is(e)) { Ab.info(`Run already finished during setup, skipping`, { workflowRunId: u, message: e.message }); return; } else { let n = wv(e); if (!n) throw e; await Tv({ world: t, workflowRun: P, runId: u, requestId: x, err: e, errorCode: n, logMessage: `Fatal runtime error during workflow setup` }); return; } } if (F = +P.startedAt, i?.setAttributes({ ...Yv(P.status), ...Xv(F) }), P.status !== `running`) { Ab.info(`Workflow already completed or failed, skipping`, { workflowRunId: u, status: P.status }); return; } } } let re = await mS(t, P)(); for (;;) { if (s++, j.isExhausted()) { await vg({ runId: u, workflowName: S, requestId: x, attempt: c.attempt, limitMs: j.configuredLimitMs }); return; } if (Date.now() - a >= n) { Ab.info(`V2 timeout reached, re-scheduling workflow`, { workflowRunId: u, loopIteration: s, elapsedMs: Date.now() - a }), await fS(t, Yx(S, r), { runId: u, traceCarrier: await O(), requestedAt: /* @__PURE__ */ new Date() }); return; } let p = 0, m = null; try { let n; if (M && l) { let e = M; if (M = null, e.events.length > 0) { let t = new Set(l.map((e) => e.eventId)); for (let n of e.events) t.has(n.eventId) || (t.add(n.eventId), l.push(n)); } d = e.cursor ?? d, n = l; } else if (l === null) if (I) n = I, d = ee ?? null; else { let e = await lS(u); n = e.events, d = e.cursor; } else if (d) { let e = await lS(u, d); if (e.events.length > 0) { let t = new Set(l.map((e) => e.eventId)); for (let n of e.events) t.has(n.eventId) || (t.add(n.eventId), l.push(n)); } d = e.cursor ?? d, n = l; } else if (I) { Ab.debug(`No cursor after preloaded-events first iteration; doing full reload to pick up cursor.`, { workflowRunId: u }); let e = await lS(u); l = e.events, d = e.cursor, n = l; } else { Ab.warn(`Event cursor missing after initial load — falling back to full reload. This indicates a bug in the World implementation.`, { workflowRunId: u }); let e = await lS(u); l = e.events, d = e.cursor, n = l; } if (Ev(n, u)) return; let r = Date.now(), a = new Set(n.filter((e) => e.eventType === `wait_completed`).map((e) => e.correlationId)), o = n.filter((e) => e.eventType === `wait_created` && e.correlationId !== void 0 && !a.has(e.correlationId) && r >= e.eventData.resumeAt.getTime()).map((e) => ({ eventType: `wait_completed`, specVersion: 5, correlationId: e.correlationId, eventData: { resumeAt: e.eventData.resumeAt } })); for (let e of o) try { await t.events.create(u, e, { requestId: x }); } catch (t) { if (x$9.is(t)) { Ab.info(`Wait already completed, skipping`, { workflowRunId: u, correlationId: e.correlationId }); continue; } throw t; } if (o.length > 0) if (d) { let e = await lS(u, d), t = new Set(e.events.filter((e) => e.eventType === `wait_completed`).map((e) => e.correlationId)); if (o.every((e) => t.has(e.correlationId))) { let t = new Set(n.map((e) => e.eventId)); for (let r of e.events) t.has(r.eventId) || (t.add(r.eventId), n.push(r)); d = e.cursor ?? d; } else { let e = await lS(u); n = e.events, d = e.cursor; } } else { let e = await lS(u); n = e.events, d = e.cursor; } if (Ev(n, u)) return; l = n, m = d, Ab.debug(`Starting workflow replay`, { workflowRunId: u, loopIteration: s, eventCount: n.length }), p = Date.now(); let c = await Cv(e, P, n, re, A); Ab.debug(`Workflow replay completed`, { workflowRunId: u, loopIteration: s, replayMs: Date.now() - p }); try { await R(), await t.events.create(u, { eventType: `run_completed`, specVersion: 5, eventData: { output: c } }, { requestId: x }); } catch (e) { if (x$9.is(e) || S$10.is(e)) { Ab.info(`Tried completing workflow run, but run has already finished.`, { workflowRunId: u, message: e.message }); return; } throw e; } i?.setAttributes({ ...Yv(`completed`) }); return; } catch (n) { if (Wv.is(n)) { Ab.debug(`Workflow suspended`, { workflowRunId: u, loopIteration: s, replayMs: Date.now() - p, steps: n.stepCount, hooks: n.hookCount, waits: n.waitCount }); let e = Hb(n.stepCount, n.hookCount, n.waitCount); e && Ab.debug(e); let a = Date.now(), o; try { o = await Ng({ suspension: n, world: t, run: P, span: i, requestId: x, runReadyBarrier: te }); } catch (e) { if (!D$10.is(e)) throw e; let n = br$3(e); Ab.error(`Non-retryable error while committing workflow suspension; failing run`, { workflowRunId: u, errorCode: n, errorName: e.name, errorMessage: e.message }); try { await R(), await t.events.create(u, { eventType: `run_failed`, specVersion: 5, eventData: { error: await Lx(e, u, re, globalThis, (P?.specVersion ?? 0) >= 5), errorCode: n } }, { requestId: x }); } catch (e) { if (x$9.is(e) || S$10.is(e)) { Ab.info(`Tried failing workflow run, but run has already finished.`, { workflowRunId: u, message: e.message }); return; } throw e; } i?.setAttributes({ ...Yv(`failed`), ...ay(n), ...ry(e.name), ...iy(e.message), ...Gy(e.name) }); return; } if (Ab.debug(`Suspension handled`, { workflowRunId: u, suspensionMs: Date.now() - a, pendingSteps: o.pendingSteps.length, timeoutSeconds: o.waitTimeout?.seconds, hasHookConflict: o.hasHookConflict, hasAwaitedHookCreation: o.hasAwaitedHookCreation, hasAttributeEvents: o.hasAttributeEvents }), o.hasHookConflict || o.hasAttributeEvents) return await ne(0); let c = o.pendingSteps, d = o.lazyInlineSteps, f = new Set(d.map((e) => e.correlationId)), h = await O(), g = []; for (let e of c) f.has(e.correlationId) || g.push(fS(t, Yx(S, r), { runId: u, stepId: e.correlationId, stepName: e.stepName, traceCarrier: h, requestedAt: /* @__PURE__ */ new Date() }, { idempotencyKey: e.correlationId })); if (o.waitTimeout && g.push(fS(t, Yx(S, r), { runId: u, traceCarrier: h, requestedAt: /* @__PURE__ */ new Date() }, Ig(o.waitTimeout.seconds, o.waitTimeout.correlationId))), await Promise.all(g), d.length === 0) return o.hasAwaitedHookCreation ? await ne(0) : void 0; let _ = typeof m == `string` && n.stepCount === 1 && n.hookCount === 0 && n.waitCount === 0 && c.length === 1 && d.length === 1 && !o.waitTimeout && !Dv(l ?? []), v = L && !o.waitTimeout && !o.hasHookEvents && !o.hasAttributeEvents && !o.hasAwaitedHookCreation && !Dv(l ?? []); j.pause(); let C; try { C = await Promise.all(d.map((e) => jg({ world: t, workflowRunId: u, workflowDeploymentId: P.deploymentId, workflowName: S, workflowStartedAt: F, stepId: e.correlationId, stepName: e.stepName, runSpecVersion: P.specVersion, lazyStepInput: e.dehydratedInput, forceOptimisticStart: v, runReadyBarrier: te, ..._ && m ? { inlineDeltaSinceCursor: m } : {} }))); } finally { j.resume(); } let w = [], E = !1, D; for (let e = 0; e < d.length; e++) { let t = C[e], n = d[e]; t.type === `retry` ? w.push({ step: n, delaySeconds: t.timeoutSeconds }) : t.type === `throttled` ? D = Math.max(D ?? 0, t.timeoutSeconds) : t.type === `completed` && t.hasPendingOps && (E = !0); } if (D !== void 0) return await ne(D); if (w.length > 0) { let e = await O(); await Promise.all(w.map(({ step: n, delaySeconds: i }) => fS(t, Yx(S, r), { runId: u, stepId: n.correlationId, stepName: n.stepName, traceCarrier: e, requestedAt: /* @__PURE__ */ new Date() }, { delaySeconds: i, idempotencyKey: n.correlationId }))); } if (E) { Ab.debug(`Breaking loop: inline step has pending ops`, { workflowRunId: u, loopIteration: s }), await fS(t, Yx(S, r), { runId: u, traceCarrier: await O(), requestedAt: /* @__PURE__ */ new Date() }); return; } if (w.length > 0) return; if (d.length === 1) { let e = C[0]; e.type === `completed` && e.inlineDelta && !e.inlineDelta.hasMore && (M = { events: e.inlineDelta.events, cursor: e.inlineDelta.cursor }); } } else { let a = n; if (f$8.is(n)) { let e = (g?.count ?? 0) + 1; if (e <= 3) { C.warn(`Workflow replay diverged; queueing a recovery replay before declaring the event log corrupted`, { errorCode: t$9.REPLAY_DIVERGENCE, divergenceEventId: n.eventId, priorDivergenceEventId: g?.eventId, divergenceCount: e, deliveryAttempt: c.attempt, maxRecoveryReplays: 3, errorMessage: n.message }), await fS(t, Yx(S, r), { runId: u, traceCarrier: await O(), requestedAt: /* @__PURE__ */ new Date(), replayDivergence: { eventId: n.eventId, count: e } }); return; } a = new d$10(`Workflow replay diverged ${e} times after 3 recovery replays; latest divergent event was ${n.eventId}. Last divergence: ${n.message}`, { cause: n }); } a instanceof Error && i?.recordException?.(a); let s = await Tg(a), l = s.name || yg(a), d = s.message, p = s.stack || bg(a); if (p) { let t = i$12(S)?.moduleSpecifier || S; p = B_(p, t, e); } let m = br$3(a); Ab.error(`Error while running workflow`, { workflowRunId: u, errorCode: m, errorName: l, errorStack: p }), types.isNativeError(a) && p && (a.stack = p); try { await R(), await t.events.create(u, { eventType: `run_failed`, specVersion: 5, eventData: { error: await Lx(a, u, re, globalThis, (P?.specVersion ?? 0) >= 5), errorCode: m } }, { requestId: x }); } catch (e) { if (x$9.is(e) || S$10.is(e)) { Ab.info(`Tried failing workflow run, but run has already finished.`, { workflowRunId: u, message: e.message }); return; } if (yr$3(e)) { Ab.error(`Fatal world contract error while recording workflow failure`, { workflowRunId: u, errorCode: t$9.WORLD_CONTRACT_ERROR, error: e instanceof Error ? e.message : String(e) }); return; } throw e; } i?.setAttributes({ ...Yv(`failed`), ...ay(m), ...ry(l), ...iy(d), ...Gy(l) }); return; } } } }); })); }), c, l = 0, u = Date.now(), d = typeof t?.routeModuleBodyStartedAt == `number` ? u - t.routeModuleBodyStartedAt : void 0; return dS(async (e) => { l += 1; let t = c !== void 0; return vb(`workflow.route.flow`, { kind: await Sb(`SERVER`), attributes: { ...ly(`flow`), ...uy(t), ...dy(l), ...fy(Date.now() - u), ...d === void 0 ? {} : py(d), ...Hy(e.method), ...Uy(`/.well-known/workflow/v1/flow`) } }, async (t) => { c ||= await vb(`workflow.route.init`, async () => s(await vb(`workflow.route.get_world_handlers`, async () => pg()))); let n = await c(e); return n instanceof Response && t?.setAttributes(Wy(n.status)), n; }); }); } //#endregion //#region node_modules/eve/dist/src/internal/workflow/runtime.js process.env.WORKFLOW_TURBO = `0`; //#endregion //#region node_modules/eve/dist/src/runtime/connections/authorization-complete-page.js function buildAuthorizationCompletePage() { return new Response(` Authorization complete

Authorization complete

You can close this tab and return to your app.

`, { headers: { "cache-control": `no-store`, "content-type": `text/html; charset=utf-8` }, status: 200 }); } //#endregion //#region node_modules/eve/dist/src/runtime/connections/callback-route.js const HTTP_CONNECTION_CALLBACK_CHANNEL_NAME_PREFIX = `eve/v1/connections/callback`; const HANDLED_METHODS$1 = [`GET`, `POST`]; function getConnectionCallbackChannelDefinitions() { return HANDLED_METHODS$1.map((e) => buildCallbackChannelDefinition$1(e)); } function getConnectionCallbackChannelNames() { return new Set(HANDLED_METHODS$1.map(channelNameForMethod$1)); } function buildCallbackChannelDefinition$1(t) { let n = channelNameForMethod$1(t); return { name: n, method: t, urlPath: EVE_CONNECTION_CALLBACK_ROUTE_PATTERN, fetch: handleConnectionCallbackRequest, logicalPath: `framework://channels/${n}`, sourceId: `eve:framework:connection-callback-${t.toLowerCase()}`, sourceKind: `module` }; } function channelNameForMethod$1(e) { return `${HTTP_CONNECTION_CALLBACK_CHANNEL_NAME_PREFIX}/${e.toLowerCase()}`; } async function handleConnectionCallbackRequest(e, r) { let i = r.params.name, a = r.params.token; if (typeof i != `string` || i.length === 0) return Response.json({ error: `Missing connection name.`, ok: !1 }, { status: 400 }); if (typeof a != `string` || a.length === 0) return Response.json({ error: `Missing callback token.`, ok: !1 }, { status: 400 }); let o = await projectAuthorizationCallback(e); try { await E$9(a, { kind: `deliver`, payloads: [{ authorizationCallback: { connectionName: i, callback: o } }] }); } catch { return Response.json({ error: `Connection callback not pending.`, ok: !1 }, { status: 404 }); } return buildAuthorizationCompletePage(); } async function projectAuthorizationCallback(e) { let t = {}; for (let [n, r] of new URL(e.url).searchParams) t[n] = r; let n; if (e.method !== `GET` && e.method !== `HEAD`) { try { n = await e.text(); } catch { n = void 0; } let r = e.headers.get(`content-type`) ?? ``; if (n && r.includes(`application/x-www-form-urlencoded`)) for (let [e, r] of new URLSearchParams(n)) t[e] = r; } return n === void 0 ? { params: t, method: e.method } : { params: t, method: e.method, body: n }; } //#endregion //#region node_modules/eve/dist/src/runtime/session-callback-route.js const HTTP_SESSION_CALLBACK_CHANNEL_NAME_PREFIX = `eve/v1/callback`; const HANDLED_METHODS = [`POST`]; function getSessionCallbackChannelDefinitions() { return HANDLED_METHODS.map((e) => buildCallbackChannelDefinition(e)); } function getSessionCallbackChannelNames() { return new Set(HANDLED_METHODS.map(channelNameForMethod)); } function buildCallbackChannelDefinition(t) { let n = channelNameForMethod(t); return { name: n, method: t, urlPath: EVE_CALLBACK_ROUTE_PATTERN, fetch: handleSessionCallbackRequest, logicalPath: `framework://channels/${n}`, sourceId: `eve:framework:session-callback-${t.toLowerCase()}`, sourceKind: `module` }; } function channelNameForMethod(e) { return `${HTTP_SESSION_CALLBACK_CHANNEL_NAME_PREFIX}/${e.toLowerCase()}`; } async function handleSessionCallbackRequest(e, n) { let r = n.params.token; if (typeof r != `string` || r.length === 0) return Response.json({ error: `Missing callback token.`, ok: !1 }, { status: 400 }); let i; try { i = await e.json(); } catch { return Response.json({ error: `Invalid JSON body.`, ok: !1 }, { status: 400 }); } let a = projectSessionCallbackResult(i); if (a instanceof Response) return a; try { await E$9(r, { kind: `runtime-action-result`, results: [a] }); } catch { return Response.json({ error: `Session callback not pending.`, ok: !1 }, { status: 404 }); } return Response.json({ ok: !0 }, { status: 202 }); } function projectSessionCallbackResult(e) { if (typeof e != `object` || !e) return Response.json({ error: `Expected a JSON object.`, ok: !1 }, { status: 400 }); let t = e; return typeof t.callId != `string` || t.callId.length === 0 ? Response.json({ error: `Missing callback callId.`, ok: !1 }, { status: 400 }) : typeof t.subagentName != `string` || t.subagentName.length === 0 ? Response.json({ error: `Missing callback subagentName.`, ok: !1 }, { status: 400 }) : t.kind === `session.completed` ? { callId: t.callId, kind: `subagent-result`, output: t.output ?? ``, subagentName: t.subagentName } : t.kind === `session.failed` ? { callId: t.callId, isError: !0, kind: `subagent-result`, output: t.error === void 0 ? { code: `REMOTE_AGENT_FAILED`, message: `Remote agent failed.` } : t.error, subagentName: t.subagentName } : Response.json({ error: `Unsupported callback kind.`, ok: !1 }, { status: 400 }); } //#endregion //#region node_modules/eve/dist/src/runtime/framework-channels/index.js function getFrameworkChannelDefinitions() { let r = eveChannel({ auth: [vercelOidc(), localDev()] }), i = []; for (let e of r.routes) isHttpRouteDefinition(e) && i.push({ name: `eve`, method: e.method.toUpperCase(), urlPath: e.path, cors: r.cors, fetch: async (t, n) => e.handler(t, n), handler: e.handler, adapter: r.adapter, logicalPath: `framework://channels/${e.path}`, sourceId: `eve:framework:${e.method.toLowerCase()}-${e.path}`, sourceKind: `module` }); return i.push(...getConnectionCallbackChannelDefinitions(), ...getSessionCallbackChannelDefinitions()), i; } function getAllFrameworkChannelNames() { return /* @__PURE__ */ new Set([ `eve`, ...getConnectionCallbackChannelNames(), ...getSessionCallbackChannelNames() ]); } //#endregion //#region node_modules/eve/dist/src/context/providers/connection-key.js const ConnectionRegistryKey = new ContextKey(`eve.connectionRegistry`); //#endregion //#region node_modules/eve/dist/src/runtime/framework-tools/file-state.js const ReadFileStateKey = new ContextKey(`eve.readFile`); function normalizeModelPath(t) { return posix.normalize(t); } function buildReadFileTargetKey(e) { return e; } function createReadFileStamp(e) { let n = createHash(`sha256`).update(e.content, `utf8`).digest(`hex`); return { byteLength: Buffer.byteLength(e.content, `utf8`), contentHash: n, filePath: e.filePath }; } function setReadFileStamp(e, t, n) { let r = e.ensure(ReadFileStateKey, () => ({ byTarget: {} })); e.set(ReadFileStateKey, { byTarget: { ...r.byTarget, [t]: n } }); } function clearReadFileState() { loadContext().set(ReadFileStateKey, { byTarget: {} }); } //#endregion //#region node_modules/eve/dist/src/runtime/framework-tools/todo.js const TodoStateKey = new ContextKey(`eve.todo`); function formatTodoSummary(e) { return e.items.length === 0 ? void 0 : `[Your task list was preserved across context compaction]\n${e.items.map((e) => `- [${e.status === `completed` ? `x` : e.status === `cancelled` ? `-` : ` `}] [${e.priority}] ${e.content}`).join(` `)}`; } function getTodoCompactionMessage() { let t = loadContext().get(TodoStateKey); if (t === void 0 || t.items.length === 0) return; let r = formatTodoSummary(t); if (r !== void 0) return { content: r, role: `user` }; } function formatTodoResult(e) { let { items: t } = e, n = { cancelled: 0, completed: 0, in_progress: 0, pending: 0, total: t.length }; for (let e of t) n[e.status]++; return { counts: n, todos: t }; } function executeTodoTool(t) { let r = loadContext(), { todos: i } = t ?? {}; if (i !== void 0) { let e = { items: [...i] }; return r.set(TodoStateKey, e), formatTodoResult(e); } return formatTodoResult(r.ensure(TodoStateKey, () => ({ items: [] }))); } const TODO_ITEM_SCHEMA = { additionalProperties: !1, properties: { content: { description: `Brief description of the task.`, type: `string` }, priority: { description: `Priority level of the task.`, enum: [ `high`, `medium`, `low` ], type: `string` }, status: { description: `Current status of the task.`, enum: [ `pending`, `in_progress`, `completed`, `cancelled` ], type: `string` } }, required: [ `content`, `status`, `priority` ], type: `object` }; const TODO_OUTPUT_SCHEMA = { additionalProperties: !1, properties: { counts: { additionalProperties: !1, properties: { cancelled: { minimum: 0, type: `integer` }, completed: { minimum: 0, type: `integer` }, in_progress: { minimum: 0, type: `integer` }, pending: { minimum: 0, type: `integer` }, total: { minimum: 0, type: `integer` } }, required: [ `cancelled`, `completed`, `in_progress`, `pending`, `total` ], type: `object` }, todos: { items: TODO_ITEM_SCHEMA, type: `array` } }, required: [`counts`, `todos`], type: `object` }; const TODO_TOOL_DEFINITION = { description: [ `Use this tool to create and manage a structured task list for the current session.`, `This helps you track progress, organize complex tasks, and demonstrate thoroughness.`, ``, `When to use:`, `- Complex multistep tasks requiring 3 or more distinct steps`, `- When the user provides multiple tasks or a numbered list`, `- After receiving new instructions, to capture requirements`, `- After completing a task, to mark it complete and add follow-ups`, ``, `When NOT to use:`, `- Single, straightforward tasks that need no tracking`, `- Purely conversational or informational requests`, ``, `Usage:`, "- Call with `todos` to replace the entire list (full replacement write)", "- Call without `todos` to read the current list", `- Both return the full current list with status counts`, `- Mark tasks in_progress when you start, completed when done`, `- Only have ONE task in_progress at a time` ].join(` `), execute: async (e) => executeTodoTool(e ?? {}), inputSchema: { additionalProperties: !1, properties: { todos: { description: `The updated todo list. Omit to read the current list without modifying it.`, items: TODO_ITEM_SCHEMA, type: `array` } }, type: `object` }, logicalPath: `eve:framework/todo`, name: `todo`, outputSchema: TODO_OUTPUT_SCHEMA, sourceId: `eve:todo-tool`, sourceKind: `module` }; //#endregion //#region node_modules/eve/dist/src/runtime/framework-tools/ask-question.js const ASK_QUESTION_TOOL_NAME = `ask_question`, askQuestionToolInputSchema = inputRequestSchema.omit({ action: !0, display: !0, requestId: !0 }), { $schema: _jsonSchemaVersion, ...askQuestionInputSchema } = Ls$3.toJSONSchema(askQuestionToolInputSchema), askQuestionToolOutputSchema = Ls$3.object({ optionId: Ls$3.string().optional(), status: Ls$3.enum([`answered`, `ignored`]), text: Ls$3.string().optional() }).strict(), { $schema: _outputJsonSchemaVersion, ...askQuestionOutputSchema } = Ls$3.toJSONSchema(askQuestionToolOutputSchema), ASK_QUESTION_INPUT_SCHEMA = askQuestionInputSchema, ASK_QUESTION_OUTPUT_SCHEMA = askQuestionOutputSchema, ASK_QUESTION_TOOL_DEFINITION = { description: `Ask the user a question and wait for their response before continuing. Use this when you need clarification or a choice from the user.`, inputSchema: ASK_QUESTION_INPUT_SCHEMA, logicalPath: `eve:framework/ask-question`, name: ASK_QUESTION_TOOL_NAME, outputSchema: ASK_QUESTION_OUTPUT_SCHEMA, sourceId: `eve:ask-question-tool`, sourceKind: `module` }; //#endregion //#region node_modules/eve/dist/src/runtime/framework-tools/web-search.js const WEB_SEARCH_OPENAI_OUTPUT_SCHEMA = { $schema: `http://json-schema.org/draft-07/schema#`, additionalProperties: !1, properties: { action: { oneOf: [ { additionalProperties: !1, properties: { queries: { items: { type: `string` }, type: `array` }, query: { type: `string` }, type: { const: `search`, type: `string` } }, required: [`type`], type: `object` }, { additionalProperties: !1, properties: { type: { const: `openPage`, type: `string` }, url: { anyOf: [{ type: `string` }, { type: `null` }] } }, required: [`type`], type: `object` }, { additionalProperties: !1, properties: { pattern: { anyOf: [{ type: `string` }, { type: `null` }] }, type: { const: `findInPage`, type: `string` }, url: { anyOf: [{ type: `string` }, { type: `null` }] } }, required: [`type`], type: `object` } ] }, sources: { items: { oneOf: [{ additionalProperties: !1, properties: { type: { const: `url`, type: `string` }, url: { type: `string` } }, required: [`type`, `url`], type: `object` }, { additionalProperties: !1, properties: { name: { type: `string` }, type: { const: `api`, type: `string` } }, required: [`type`, `name`], type: `object` }] }, type: `array` } }, type: `object` }; const WEB_SEARCH_ANTHROPIC_OUTPUT_SCHEMA = { $schema: `http://json-schema.org/draft-07/schema#`, items: { additionalProperties: !1, properties: { encryptedContent: { type: `string` }, pageAge: { anyOf: [{ type: `string` }, { type: `null` }] }, title: { anyOf: [{ type: `string` }, { type: `null` }] }, type: { const: `web_search_result`, type: `string` }, url: { type: `string` } }, required: [ `url`, `title`, `pageAge`, `encryptedContent`, `type` ], type: `object` }, type: `array` }; const WEB_SEARCH_GOOGLE_OUTPUT_SCHEMA = { $schema: `http://json-schema.org/draft-07/schema#`, additionalProperties: !1, properties: {}, type: `object` }; const WEB_SEARCH_PARALLEL_OUTPUT_SCHEMA = { $schema: `http://json-schema.org/draft-07/schema#`, anyOf: [{ additionalProperties: !1, properties: { results: { items: { additionalProperties: !1, properties: { excerpt: { type: `string` }, publishDate: { anyOf: [{ type: `string` }, { type: `null` }] }, relevanceScore: { type: `number` }, title: { type: `string` }, url: { type: `string` } }, required: [ `url`, `title`, `excerpt` ], type: `object` }, type: `array` }, searchId: { type: `string` } }, required: [`searchId`, `results`], type: `object` }, { additionalProperties: !1, properties: { error: { enum: [ `api_error`, `rate_limit`, `timeout`, `invalid_input`, `configuration_error`, `unknown` ], type: `string` }, message: { type: `string` }, statusCode: { type: `number` } }, required: [`error`, `message`], type: `object` }] }; const WEB_SEARCH_TOOL_DEFINITION = { description: `Search the web for real-time information. Use this to find up-to-date information about current events, recent developments, or topics that may have changed since the knowledge cutoff.`, inputSchema: null, logicalPath: `eve:framework/web-search`, name: `web_search`, sourceId: `eve:web-search-tool`, sourceKind: `module` }; //#endregion //#region node_modules/eve/dist/src/execution/sandbox/require-sandbox.js async function requireSandboxSession() { let t = loadContext().get(SandboxKey); if (t === void 0) throw Error(`This tool requires sandbox access on the runtime context. Ensure the step is running inside a managed runtime context with sandbox support.`); let n = await t.get(); if (n === null) throw Error(`The sandbox is not available in the current runtime context.`); return n; } function validateAbsoluteFilePath(e) { if (!e.startsWith(`/`)) throw Error(`filePath must be an absolute path. Received: "${e}". Use an absolute path such as /workspace/foo.ts.`); } //#endregion //#region node_modules/eve/dist/src/execution/sandbox/truncate-output.js const MAX_LINE_LENGTH = 2e3; const LINE_TRUNCATION_SUFFIX = ` [truncated]`; function truncateHead(e) { return truncateByDirection(e, `head`); } function truncateTail(e) { return truncateByDirection(e, `tail`); } function truncateByDirection(e, t) { let n = e.split(` `), r = countLogicalLines(n), i = t === `head`, a = [], o = 0, s = i ? 0 : n.length - 1, c = i ? 1 : -1; for (let e = s; e >= 0 && e < n.length && a.length < 2e3; e += c) { let t = capLineLength(n[e] ?? ``), r = Buffer.byteLength(t, `utf8`) + 1; if (o + r > 51200 && a.length > 0) break; a.push(t), o += r; } return i || a.reverse(), { output: a.join(` `), outputLines: a.length, totalLines: r, truncated: a.length < r }; } function capLineLength(e) { return e.length <= 2e3 ? e : e.slice(0, 2e3) + LINE_TRUNCATION_SUFFIX; } function countLogicalLines(e) { return e.length > 0 && e[e.length - 1] === `` ? e.length - 1 : e.length; } //#endregion //#region node_modules/eve/dist/src/internal/application/optional-package-install.js const EVE_DEV_ENV_FLAG = `EVE_DEV`; function isEveDevEnvironment() { return process.env[EVE_DEV_ENV_FLAG] === `1`; } function detectProjectPackageManager(r) { let i = r; for (;;) { if (existsSync(join(i, `pnpm-lock.yaml`)) || existsSync(join(i, `pnpm-workspace.yaml`))) return `pnpm`; if (existsSync(join(i, `yarn.lock`))) return `yarn`; if (existsSync(join(i, `bun.lock`)) || existsSync(join(i, `bun.lockb`))) return `bun`; if (existsSync(join(i, `package-lock.json`))) return `npm`; let r = dirname(i); if (r === i) return `npm`; i = r; } } const INSTALL_ARGUMENTS = { bun: [`add`, `--dev`], npm: [`install`, `--save-dev`], pnpm: [`add`, `-D`], yarn: [`add`, `-D`] }; const OPTIONAL_PACKAGE_LOCK_TIMEOUT_MS = 600 * 1e3; const pendingOptionalPackageInstalls = /* @__PURE__ */ new Map(); async function installPackageIntoProject(e) { let t = detectProjectPackageManager(e.appRoot), n = [...INSTALL_ARGUMENTS[t], e.packageName]; console.info(`[eve:dev] installing optional dependency "${e.packageName}" via \`${t} ${n.join(` `)}\`...`); let i = spawn(t, n, { cwd: e.appRoot, shell: shouldSpawnPackageManagerWithShell(), stdio: [ `ignore`, `pipe`, `pipe` ] }), a = []; i.stdout?.on(`data`, (e) => a.push(e)), i.stderr?.on(`data`, (e) => a.push(e)); let o = await new Promise((e, t) => { i.on(`error`, t), i.on(`close`, (t) => e(t ?? 1)); }); if (o !== 0) { let n = Buffer.concat(a).toString(`utf8`).trim(); throw Error(`Failed to install "${e.packageName}" with ${t} (exit ${o}).` + (n.length > 0 ? `\n${n.slice(-2e3)}` : ``)); } console.info(`[eve:dev] installed "${e.packageName}".`); } async function loadOptionalEnginePackage(e) { try { return await e.importModule(); } catch (t) { if (!e.autoInstall || !isEveDevEnvironment()) throw Error(e.missingMessage, { cause: t }); let n = e.importInstalledModule ?? (async () => await importInstalledEnginePackage({ appRoot: e.appRoot, packageName: e.packageName })), r = e.importInstalledModule === void 0 ? async () => await isInstalledEnginePackageLoadable(e) : async () => { try { return await n(), !0; } catch { return !1; } }; try { await withOptionalPackageInstallLock(e, async () => { await r() || await installPackageIntoProject({ appRoot: e.appRoot, packageName: e.packageName }); }); } catch (t) { throw Error(`${e.missingMessage} Automatic installation failed: ${toMessage(t)}`, { cause: t }); } try { return await n(); } catch (t) { throw Error(`${e.missingMessage} Automatic installation completed, but "${e.packageName}" still could not be loaded from "${e.appRoot}". This usually means the package manager installed into a different workspace, node_modules is unavailable, or the Node/package-manager environment changed while eve dev was running. Last load error: ${toMessage(t)}`, { cause: t }); } } } async function importInstalledEnginePackage(e) { return await import(await resolveInstalledEnginePackageEntrypointHref(e)); } async function isInstalledEnginePackageLoadable(e) { try { return await importEntrypointInWorker(await resolveInstalledEnginePackageEntrypointHref(e)), !0; } catch { return !1; } } async function resolveInstalledEnginePackageEntrypointHref(e) { let t = findInstalledPackageRoot(e), r = join(t, `package.json`), i = resolvePackageEntryPoint(JSON.parse(await readFile(r, `utf8`))); if (i.startsWith(`/`)) throw Error(`Invalid absolute entrypoint for optional package "${e.packageName}".`); return pathToFileURL(join(t, i)).href; } async function importEntrypointInWorker(e) { let t = new Worker(` const { parentPort, workerData } = require("node:worker_threads"); (async () => { try { await import(workerData.entrypointHref); parentPort.postMessage({ ok: true }); } catch (error) { parentPort.postMessage({ ok: false, message: error instanceof Error ? error.message : String(error), }); } })(); `, { eval: !0, workerData: { entrypointHref: e } }); await new Promise((e, n) => { let r = !1, settle = (e) => { r || (r = !0, t.off(`error`, handleError), t.off(`exit`, handleExit), t.off(`message`, handleMessage), t.terminate().catch(() => {}), e()); }, handleError = (e) => settle(() => n(e)), handleExit = (e) => { e !== 0 && settle(() => n(Error(`Optional dependency worker exited before loading module (code ${e}).`))); }, handleMessage = (t) => { let r = t; settle(() => { if (r.ok === !0) { e(); return; } n(Error(typeof r.message == `string` ? r.message : `Optional dependency worker failed to load module.`)); }); }; t.once(`error`, handleError), t.once(`exit`, handleExit), t.once(`message`, handleMessage); }); } function findInstalledPackageRoot(r) { let i = r.packageName.split(`/`), a = [], o = r.appRoot; for (;;) { let s = join(o, `node_modules`, ...i); if (a.push(s), existsSync(join(s, `package.json`))) return s; let c = dirname(o); if (c === o) throw Error(`Could not find installed optional dependency "${r.packageName}". Checked: ${a.join(`, `)}`); o = c; } } function resolvePackageEntryPoint(e) { let t = readDotExport(e.exports); return t === void 0 ? typeof e.module == `string` && e.module.length > 0 ? e.module : typeof e.main == `string` && e.main.length > 0 ? e.main : `index.js` : t; } function readDotExport(e) { if (typeof e == `string` && e.length > 0) return e; if (typeof e != `object` || !e) return; let t = `.` in e ? e[`.`] : e; if (typeof t == `string` && t.length > 0) return t; if (typeof t != `object` || !t) return; let n = t; if (typeof n.import == `string` && n.import.length > 0) return n.import; if (typeof n.default == `string` && n.default.length > 0) return n.default; } async function withOptionalPackageInstallLock(e, t) { let n = `${e.appRoot}:${e.packageName}`, r = pendingOptionalPackageInstalls.get(n); if (r !== void 0) { await r; return; } let i = withOptionalPackageInstallFileLock(e, t).finally(() => { pendingOptionalPackageInstalls.delete(n); }); pendingOptionalPackageInstalls.set(n, i), await i; } async function withOptionalPackageInstallFileLock(e, t) { let r = join(e.appRoot, `.eve`, `optional-package-locks`, `${sanitizeLockName(e.packageName)}.lock`); await acquireLock$1(r); try { await t(); } finally { await rm(r, { force: !0, recursive: !0 }).catch(() => {}); } } async function acquireLock$1(e) { let r = Date.now(); for (;;) { await mkdir(dirname(e), { recursive: !0 }); try { await mkdir(e), await writeFile(join(e, `owner.json`), `${JSON.stringify({ createdAt: (/* @__PURE__ */ new Date()).toISOString(), pid: process.pid })}\n`); return; } catch (t) { if (!isFileExistsError$1(t)) throw t; await waitForExistingLock$1(e, r); } } } async function waitForExistingLock$1(e, t) { let n = await stat(e).catch((e) => { if (isNotFoundError$1(e)) return null; throw e; }); if (n !== null) { if (Date.now() - n.mtimeMs > 18e5) { await rm(e, { force: !0, recursive: !0 }).catch(() => {}); return; } if (Date.now() - t > OPTIONAL_PACKAGE_LOCK_TIMEOUT_MS) throw Error(`Timed out waiting for optional package install lock "${e}" after ${OPTIONAL_PACKAGE_LOCK_TIMEOUT_MS}ms.`); await new Promise((e) => setTimeout(e, 250)); } } function sanitizeLockName(e) { return e.replaceAll(/[^a-zA-Z0-9._-]+/g, `-`); } function shouldSpawnPackageManagerWithShell(e = process.platform) { return e === `win32`; } function isFileExistsError$1(e) { return typeof e == `object` && !!e && `code` in e && e.code === `EEXIST`; } function isNotFoundError$1(e) { return typeof e == `object` && !!e && `code` in e && e.code === `ENOENT`; } function toMessage(e) { return e instanceof Error ? e.message : String(e); } //#endregion //#region node_modules/eve/dist/src/execution/sandbox/bash-tool.js async function executeBashOnSandbox(t, n) { let r = await runWithDevelopmentSandboxProgress(t, n.command), i = truncateTail(r.stdout), a = truncateTail(r.stderr), o = i.truncated || a.truncated, s = i.output; i.truncated && (s = `[stdout truncated: showing last ${i.outputLines} of ${i.totalLines} lines]\n` + s); let c = a.output; return a.truncated && (c = `[stderr truncated: showing last ${a.outputLines} of ${a.totalLines} lines]\n` + c), { exitCode: r.exitCode, stderr: c, stdout: s, truncated: o }; } async function runWithDevelopmentSandboxProgress(e, n) { if (logDevelopmentSandboxCommand(`eve: starting sandbox command: ${formatCommand$1(n)}`), !isEveDevEnvironment()) return await e.run({ command: n }); let r = Date.now(), i = setInterval(() => { logDevelopmentSandboxCommand(`eve: waiting for sandbox command (${Math.round((Date.now() - r) / 1e3)}s elapsed): ${formatCommand$1(n)}`); }, 5e3); i.unref?.(); try { let t = await e.run({ command: n }); return logDevelopmentSandboxCommand(`eve: sandbox command finished (exit ${t.exitCode}): ${formatCommand$1(n)}`), t; } catch (e) { throw logDevelopmentSandboxCommand(`eve: sandbox command failed: ${formatCommand$1(n)}`), e; } finally { clearInterval(i); } } function logDevelopmentSandboxCommand(e) { isEveDevEnvironment() && console.log(e); } function formatCommand$1(e) { let t = e.replaceAll(/\s+/g, ` `).trim(); return t.length <= 240 ? t : `${t.slice(0, 239)}…`; } //#endregion //#region node_modules/eve/dist/src/runtime/framework-tools/bash.js const BASH_INPUT_SCHEMA = { additionalProperties: !1, properties: { command: { description: `The shell command to execute.`, type: `string` } }, required: [`command`], type: `object` }; const BASH_OUTPUT_SCHEMA = { additionalProperties: !1, properties: { exitCode: { type: `number` }, stderr: { type: `string` }, stdout: { type: `string` }, truncated: { type: `boolean` } }, required: [ `exitCode`, `stderr`, `stdout`, `truncated` ], type: `object` }; async function executeBash(e) { return executeBashOnSandbox(await requireSandboxSession(), e); } const BASH_TOOL_DEFINITION = { description: `Execute a shell command in the shared workspace environment.`, execute: executeBash, inputSchema: BASH_INPUT_SCHEMA, logicalPath: `eve:framework/bash`, name: `bash`, outputSchema: BASH_OUTPUT_SCHEMA, sourceId: `eve:bash-tool`, sourceKind: `module` }; //#endregion //#region node_modules/eve/dist/src/execution/sandbox/shell-quote.js function shellQuote(e) { return `'${e.replace(/'/g, `'\\''`)}'`; } //#endregion //#region node_modules/eve/dist/src/execution/sandbox/ripgrep-probe.js const probes = /* @__PURE__ */ new Map(); async function ripgrepIsAvailable(t) { let n = probes.get(t.id); if (n !== void 0) return n; let r = runProbe(t); probes.set(t.id, r); try { return await r; } catch { return probes.delete(t.id), !1; } } async function runProbe(e) { return (await e.run({ command: `command -v rg >/dev/null 2>&1` })).exitCode === 0; } //#endregion //#region node_modules/eve/dist/src/execution/sandbox/glob-tool.js async function executeGlobOnSandbox(n, a) { let o = a.path ?? `/workspace`; validateAbsoluteFilePath(o); let s = normalizeModelPath(o), c = Math.min(Math.max(1, a.limit ?? 100), 1e3), l = await ripgrepIsAvailable(n) ? buildRipgrepCommand$1({ normalizedPath: s, pattern: a.pattern }) : buildPosixFindCommand({ normalizedPath: s, pattern: a.pattern }), u = await n.run({ command: l }); if (u.exitCode !== 0 && u.exitCode !== 1) throw buildGlobExecutionError(l, u.exitCode, u.stderr); let d = u.stdout.split(` `).filter((e) => e.length > 0), f = d.length > c, p = f ? d.slice(0, c) : d, m = [], h = 0, g = !1; for (let n of p) { let r = normalizeModelPath(n), i = Buffer.byteLength(r, `utf8`) + 1; if (h + i > 51200 && m.length > 0) { g = !0; break; } m.push(r), h += i; } if (m.length === 0) return { content: `No files found`, count: 0, path: s, truncated: !1 }; let _ = f || g, v = [...m]; return _ && (v.push(``), v.push(`(Results truncated: showing first ${m.length} results out of more. Use a more specific path or pattern to narrow results.)`)), { content: v.join(` `), count: m.length, path: s, truncated: _ }; } function buildRipgrepCommand$1(e) { return [ `rg --files --hidden`, `--glob '!.git/*'`, `--glob ${shellQuote(e.pattern)}`, `-- ${shellQuote(e.normalizedPath)}` ].join(` `); } function buildPosixFindCommand(e) { let t = translateGlobToFindPattern(e.pattern), r = t.includes(`/`) ? `-path ${shellQuote(`*/${t}`)}` : `-name ${shellQuote(t)}`; return [ `find ${shellQuote(e.normalizedPath)}`, `-type f`, `-not -path '*/.git/*'`, r ].join(` `); } function translateGlobToFindPattern(e) { let t = e.replaceAll(`**`, `*`); for (; t.startsWith(`*/`);) t = t.slice(2); return t; } function buildGlobExecutionError(e, t, n) { let r = n.trim(), i = r.length > 0 ? r : `no stderr output`; return Error(`glob failed (exit ${t}): ${i}\nCommand: ${e}`); } //#endregion //#region node_modules/eve/dist/src/runtime/framework-tools/glob.js const GLOB_INPUT_SCHEMA = { additionalProperties: !1, properties: { limit: { description: `Maximum number of results to return. Defaults to 100.`, maximum: 1e3, minimum: 1, type: `integer` }, path: { description: `The directory to search in. Defaults to /workspace. Must be an absolute path. Omit to use the default.`, type: `string` }, pattern: { description: `The glob pattern to match files against (e.g. "**/*.ts", "src/**/*.js").`, type: `string` } }, required: [`pattern`], type: `object` }; const GLOB_OUTPUT_SCHEMA = { additionalProperties: !1, properties: { content: { type: `string` }, count: { type: `integer` }, path: { type: `string` }, truncated: { type: `boolean` } }, required: [ `content`, `count`, `path`, `truncated` ], type: `object` }; async function executeGlob(e) { return executeGlobOnSandbox(await requireSandboxSession(), e); } const GLOB_TOOL_DEFINITION = { description: [ `Fast file pattern matching tool that works with any codebase size.`, ``, `Usage:`, `- Supports glob patterns like "**/*.js" or "src/**/*.ts".`, `- Returns matching file paths.`, `- Use this tool when you need to find files by name patterns.`, `- If you are unsure of the correct file path, use the glob tool to look up filenames by glob pattern.`, `- Use the grep tool instead if you need to search file contents.`, `- Call this tool in parallel when you know there are multiple patterns to search for.` ].join(` `), execute: executeGlob, inputSchema: GLOB_INPUT_SCHEMA, logicalPath: `eve:framework/glob`, name: `glob`, outputSchema: GLOB_OUTPUT_SCHEMA, sourceId: `eve:glob-tool`, sourceKind: `module` }; //#endregion //#region node_modules/eve/dist/src/execution/sandbox/grep-tool.js async function executeGrepOnSandbox(t, n) { let r = n.path ?? `/workspace`; validateAbsoluteFilePath(r); let o = normalizeModelPath(r), s = Math.min(Math.max(1, n.limit ?? 100), 1e3), c = n.context !== void 0 && n.context > 0 ? n.context : 0, l = await ripgrepIsAvailable(t) ? buildRipgrepCommand({ contextLines: c, effectiveLimit: s, glob: n.glob, ignoreCase: n.ignoreCase ?? !1, literal: n.literal ?? !1, normalizedPath: o, pattern: n.pattern }) : buildPosixGrepCommand({ contextLines: c, effectiveLimit: s, glob: n.glob, ignoreCase: n.ignoreCase ?? !1, literal: n.literal ?? !1, normalizedPath: o, pattern: n.pattern }), u = await t.run({ command: l }); if (u.exitCode !== 0 && u.exitCode !== 1) throw buildGrepExecutionError(l, u.exitCode, u.stderr); let d = u.stdout; return d.trim().length === 0 ? { content: `No matches found`, matchCount: 0, path: o, truncated: !1 } : processOutput({ effectiveLimit: s, normalizedPath: o, stdout: d }); } function buildRipgrepCommand(e) { let t = [ `rg`, `--line-number`, `--color=never`, `--hidden`, `--glob '!.git/*'` ]; return e.ignoreCase && t.push(`--ignore-case`), e.literal && t.push(`--fixed-strings`), e.glob !== void 0 && t.push(`--glob ${shellQuote(e.glob)}`), e.contextLines > 0 && t.push(`--context ${e.contextLines}`), t.push(`--max-count ${e.effectiveLimit}`), t.push(`--`), t.push(shellQuote(e.pattern)), t.push(shellQuote(e.normalizedPath)), t.join(` `); } function buildPosixGrepCommand(e) { let t = [ `grep`, `-r`, `-n`, `--color=never`, `--exclude-dir=.git` ]; return e.ignoreCase && t.push(`-i`), e.literal ? t.push(`-F`) : t.push(`-E`), e.glob !== void 0 && t.push(`--include=${shellQuote(e.glob)}`), e.contextLines > 0 && t.push(`-C ${e.contextLines}`), t.push(`-m ${e.effectiveLimit}`), t.push(`--`), t.push(shellQuote(e.pattern)), t.push(shellQuote(e.normalizedPath)), t.join(` `); } function processOutput(e) { let r = e.stdout.split(` `), i = [], a = 0, o = 0, s = !1; for (let e = 0; e < r.length; e += 1) { let c = r[e] ?? ``; if (c.length === 0 && e === r.length - 1) continue; c !== `--` && c.length > 0 && /^.+:\d+:/.test(c) && o++; let l = capLineLength(c), u = Buffer.byteLength(l, `utf8`) + 1; if (a + u > 51200 && i.length > 0) { s = !0; break; } i.push(l), a += u; } let c = s || o >= e.effectiveLimit, l = i.join(` `); if (c) { let t = []; o >= e.effectiveLimit && t.push(`Match limit reached (${e.effectiveLimit}). Use a larger limit or more specific pattern.`), s && t.push(`Output truncated due to size. Use a more specific path or pattern.`), l += `\n\n[${t.join(` `)}]`; } return { content: l, matchCount: o, path: e.normalizedPath, truncated: c }; } function buildGrepExecutionError(e, t, n) { let r = n.trim(), i = r.length > 0 ? r : `no stderr output`; return Error(`grep failed (exit ${t}): ${i}\nCommand: ${e}`); } //#endregion //#region node_modules/eve/dist/src/runtime/framework-tools/grep.js const GREP_INPUT_SCHEMA = { additionalProperties: !1, properties: { context: { description: `Number of surrounding context lines to include before and after each match. Defaults to 0.`, minimum: 0, type: `integer` }, glob: { description: `Filter files by glob pattern (e.g. "*.ts", "*.{ts,tsx}").`, type: `string` }, ignoreCase: { description: `Perform case-insensitive search. Defaults to false.`, type: `boolean` }, limit: { description: `Maximum number of matches to return per file. Defaults to 100.`, maximum: 1e3, minimum: 1, type: `integer` }, literal: { description: `Treat the pattern as a literal string instead of a regular expression. Defaults to false.`, type: `boolean` }, path: { description: `The directory or file to search in. Defaults to /workspace. Must be an absolute path. Omit to use the default.`, type: `string` }, pattern: { description: `The regex pattern to search for in file contents (e.g. "log.*Error", "function\\s+\\w+").`, type: `string` } }, required: [`pattern`], type: `object` }; const GREP_OUTPUT_SCHEMA = { additionalProperties: !1, properties: { content: { type: `string` }, matchCount: { type: `integer` }, path: { type: `string` }, truncated: { type: `boolean` } }, required: [ `content`, `matchCount`, `path`, `truncated` ], type: `object` }; async function executeGrep(e) { return executeGrepOnSandbox(await requireSandboxSession(), e); } const GREP_TOOL_DEFINITION = { description: [ `Fast content search tool that works with any codebase size.`, ``, `Usage:`, `- Searches file contents using regular expressions.`, `- Supports full regex syntax (e.g. "log.*Error", "function\\s+\\w+").`, `- Filter files by pattern with the glob parameter (e.g. "*.js", "*.{ts,tsx}").`, `- Returns matching lines with file paths and line numbers.`, `- Use this tool when you need to find files containing specific patterns.`, `- Use the glob tool instead if you only need to find files by name.`, `- Call this tool in parallel when you have multiple independent searches.`, `- Any line longer than 2000 characters is truncated.` ].join(` `), execute: executeGrep, inputSchema: GREP_INPUT_SCHEMA, logicalPath: `eve:framework/grep`, name: `grep`, outputSchema: GREP_OUTPUT_SCHEMA, sourceId: `eve:grep-tool`, sourceKind: `module` }; //#endregion //#region node_modules/eve/dist/src/execution/sandbox/read-file-tool.js async function executeReadFileOnSandbox(r, i) { let { filePath: a, offset: o, limit: s } = i; validateAbsoluteFilePath(a); let c = normalizeModelPath(a), l = o ?? 1, u = s ?? 2e3; if (l < 1) throw Error(`offset must be >= 1. Received: ${l}.`); let d = await r.readTextFile({ path: a }); if (d === null) throw Error(`File not found: ${a}. Verify the path exists and is accessible in the sandbox.`); if (d.includes(`\0`)) throw Error(`File "${a}" contains NUL bytes and appears to be a binary file. read_file only supports text files.`); let f = d.split(` `), p = f.length > 0 && f[f.length - 1] === `` ? f.length - 1 : f.length; if (p === 0) { if (l > 1) throw Error(`offset ${l} is past the end of the file (0 lines). Use the default offset to read an empty file.`); } else if (l > p) throw Error(`offset ${l} is past the end of the file (${p} lines).`); let m = createReadFileStamp({ content: d, filePath: c }), h = buildReadFileTargetKey(c); if (setReadFileStamp(loadContext(), h, m), p === 0) return { content: ``, path: c, totalLines: 0, truncated: !1 }; let g = l - 1, _ = Math.min(g + u, p), v = f.slice(g, _), y = [], b = 0, x = !1; for (let e = 0; e < v.length; e++) { let t = `${l + e}: ${capLineLength(v[e] ?? ``)}`, n = Buffer.byteLength(t, `utf8`) + 1; if (b + n > 51200 && y.length > 0) { x = !0; break; } y.push(t), b += n; } let S = y.join(` `), C = l + y.length - 1; return C < p || x ? { content: S, nextOffset: C + 1, path: c, totalLines: p, truncated: !0 } : { content: S, path: c, totalLines: p, truncated: !1 }; } //#endregion //#region node_modules/eve/dist/src/runtime/framework-tools/read-file.js const READ_FILE_INPUT_SCHEMA = { additionalProperties: !1, properties: { filePath: { description: `The absolute path to the file to read.`, type: `string` }, limit: { description: `Maximum number of lines to return. Defaults to 2000.`, minimum: 1, type: `integer` }, offset: { description: `1-based line number to start from. Defaults to 1.`, minimum: 1, type: `integer` } }, required: [`filePath`], type: `object` }; const READ_FILE_OUTPUT_SCHEMA = { additionalProperties: !1, properties: { content: { type: `string` }, nextOffset: { minimum: 1, type: `integer` }, path: { type: `string` }, totalLines: { minimum: 0, type: `integer` }, truncated: { type: `boolean` } }, required: [ `content`, `path`, `totalLines`, `truncated` ], type: `object` }; async function executeReadFile(e) { return executeReadFileOnSandbox(await requireSandboxSession(), e); } const READ_FILE_TOOL_DEFINITION = { description: [ `Read a file from the local filesystem. If the path does not exist, an error is returned.`, ``, `Usage:`, `- The filePath parameter should be an absolute path.`, `- By default, this tool returns up to 2000 lines from the start of the file.`, `- The offset parameter is the line number to start from (1-indexed).`, `- To read later sections, call this tool again with a larger offset.`, `- Use the grep tool to find specific content in large files or files with long lines.`, `- If you are unsure of the correct file path, use the glob tool to look up filenames by glob pattern.`, "- Contents are returned with each line prefixed by its line number as `: `. For example, if a file has contents \"foo\\n\", you will receive \"1: foo\\n\".", `- Any line longer than 2000 characters is truncated.`, `- Call this tool in parallel when you know there are multiple files you want to read.`, `- Avoid tiny repeated slices (30 line chunks). If you need more context, read a larger window.` ].join(` `), execute: executeReadFile, inputSchema: READ_FILE_INPUT_SCHEMA, logicalPath: `eve:framework/read-file`, name: `read_file`, outputSchema: READ_FILE_OUTPUT_SCHEMA, sourceId: `eve:read-file-tool`, sourceKind: `module` }; //#endregion //#region node_modules/eve/dist/src/runtime/framework-tools/skill.js async function executeLoadSkillTool(e) { let r = loadContext(), i = r.get(SandboxKey); if (i === void 0) throw Error(`The load_skill tool requires sandbox access on the runtime context. Ensure the step is running inside a managed runtime context with sandbox support.`); let { skill: a } = e, o = availableSkillNames(r); try { return await loadSkillFromSandbox(i, a, o); } catch (e) { let t = r.get(ConnectionRegistryKey)?.getConnectionNames().find((e) => e.toLowerCase() === a.toLowerCase()); if (t === void 0 || o.includes(a)) throw e; let n = e instanceof Error ? e.message : String(e); throw Error(`${n} "${t}" is an installed connection, not a skill. Use connection_search with connection "${t}" to find its tools.`, { cause: e }); } } function availableSkillNames(t) { let n = Object.values(t.get(DynamicSkillManifestKey) ?? {}).flat().map((e) => e.name); return [...new Set(n)].sort(); } const SKILL_OUTPUT_SCHEMA = { type: `string` }; const SKILL_TOOL_DEFINITION = { description: [ `Load the full instructions for one available skill by name or id.`, `Use this tool when the request clearly matches a listed skill description or when the user explicitly asks for that skill.`, `This is not for MCP connections; use connection_search to access an installed connection.`, `Loading adds the skill instructions to the current turn.`, `Choose the "skill" value from the Available skills block.` ].join(` `), execute: (e) => executeLoadSkillTool(e), inputSchema: { additionalProperties: !1, properties: { skill: { description: `Available skill name or id.`, type: `string` } }, required: [`skill`], type: `object` }, logicalPath: `eve:framework/load-skill`, name: `load_skill`, outputSchema: SKILL_OUTPUT_SCHEMA, sourceId: `eve:load-skill-tool`, sourceKind: `module` }; //#endregion //#region node_modules/eve/dist/src/compiled/turndown/index.js var e$2 = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t.exports); var t$7 = e$2(((e, t) => { t.exports = n, n.CAPTURING_PHASE = 1, n.AT_TARGET = 2, n.BUBBLING_PHASE = 3; function n(e, t) { if (this.type = ``, this.target = null, this.currentTarget = null, this.eventPhase = n.AT_TARGET, this.bubbles = !1, this.cancelable = !1, this.isTrusted = !1, this.defaultPrevented = !1, this.timeStamp = Date.now(), this._propagationStopped = !1, this._immediatePropagationStopped = !1, this._initialized = !0, this._dispatching = !1, e && (this.type = e), t) for (var r in t) this[r] = t[r]; } n.prototype = Object.create(Object.prototype, { constructor: { value: n }, stopPropagation: { value: function() { this._propagationStopped = !0; } }, stopImmediatePropagation: { value: function() { this._propagationStopped = !0, this._immediatePropagationStopped = !0; } }, preventDefault: { value: function() { this.cancelable && (this.defaultPrevented = !0); } }, initEvent: { value: function(e, t, n) { this._initialized = !0, !this._dispatching && (this._propagationStopped = !1, this._immediatePropagationStopped = !1, this.defaultPrevented = !1, this.isTrusted = !1, this.target = null, this.type = e, this.bubbles = t, this.cancelable = n); } } }); })); var n$8 = e$2(((e, n) => { var r = t$7(); n.exports = i; function i() { r.call(this), this.view = null, this.detail = 0; } i.prototype = Object.create(r.prototype, { constructor: { value: i }, initUIEvent: { value: function(e, t, n, r, i) { this.initEvent(e, t, n), this.view = r, this.detail = i; } } }); })); var r$11 = e$2(((e, t) => { var r = n$8(); t.exports = i; function i() { r.call(this), this.screenX = this.screenY = this.clientX = this.clientY = 0, this.ctrlKey = this.altKey = this.shiftKey = this.metaKey = !1, this.button = 0, this.buttons = 1, this.relatedTarget = null; } i.prototype = Object.create(r.prototype, { constructor: { value: i }, initMouseEvent: { value: function(e, t, n, r, i, a, o, s, c, l, u, d, f, p, m) { switch (this.initEvent(e, t, n, r, i), this.screenX = a, this.screenY = o, this.clientX = s, this.clientY = c, this.ctrlKey = l, this.altKey = u, this.shiftKey = d, this.metaKey = f, this.button = p, p) { case 0: this.buttons = 1; break; case 1: this.buttons = 4; break; case 2: this.buttons = 2; break; default: this.buttons = 0; break; } this.relatedTarget = m; } }, getModifierState: { value: function(e) { switch (e) { case `Alt`: return this.altKey; case `Control`: return this.ctrlKey; case `Shift`: return this.shiftKey; case `Meta`: return this.metaKey; default: return !1; } } } }); })); var i$9 = e$2(((e, t) => { t.exports = E; var n = 1, r = 3, i = 4, a = 5, o = 7, s = 8, c = 9, l = 11, u = 12, d = 13, f = 14, p = 15, m = 17, h = 18, g = 19, _ = 20, v = 21, y = 22, b = 23, x = 24, S = 25, C = [ null, `INDEX_SIZE_ERR`, null, `HIERARCHY_REQUEST_ERR`, `WRONG_DOCUMENT_ERR`, `INVALID_CHARACTER_ERR`, null, `NO_MODIFICATION_ALLOWED_ERR`, `NOT_FOUND_ERR`, `NOT_SUPPORTED_ERR`, `INUSE_ATTRIBUTE_ERR`, `INVALID_STATE_ERR`, `SYNTAX_ERR`, `INVALID_MODIFICATION_ERR`, `NAMESPACE_ERR`, `INVALID_ACCESS_ERR`, null, `TYPE_MISMATCH_ERR`, `SECURITY_ERR`, `NETWORK_ERR`, `ABORT_ERR`, `URL_MISMATCH_ERR`, `QUOTA_EXCEEDED_ERR`, `TIMEOUT_ERR`, `INVALID_NODE_TYPE_ERR`, `DATA_CLONE_ERR` ], w = [ null, `INDEX_SIZE_ERR (1): the index is not in the allowed range`, null, `HIERARCHY_REQUEST_ERR (3): the operation would yield an incorrect nodes model`, `WRONG_DOCUMENT_ERR (4): the object is in the wrong Document, a call to importNode is required`, `INVALID_CHARACTER_ERR (5): the string contains invalid characters`, null, `NO_MODIFICATION_ALLOWED_ERR (7): the object can not be modified`, `NOT_FOUND_ERR (8): the object can not be found here`, `NOT_SUPPORTED_ERR (9): this operation is not supported`, `INUSE_ATTRIBUTE_ERR (10): setAttributeNode called on owned Attribute`, `INVALID_STATE_ERR (11): the object is in an invalid state`, `SYNTAX_ERR (12): the string did not match the expected pattern`, `INVALID_MODIFICATION_ERR (13): the object can not be modified in this way`, `NAMESPACE_ERR (14): the operation is not allowed by Namespaces in XML`, `INVALID_ACCESS_ERR (15): the object does not support the operation or argument`, null, `TYPE_MISMATCH_ERR (17): the type of the object does not match the expected type`, `SECURITY_ERR (18): the operation is insecure`, `NETWORK_ERR (19): a network error occurred`, `ABORT_ERR (20): the user aborted an operation`, `URL_MISMATCH_ERR (21): the given URL does not match another URL`, `QUOTA_EXCEEDED_ERR (22): the quota has been exceeded`, `TIMEOUT_ERR (23): a timeout occurred`, `INVALID_NODE_TYPE_ERR (24): the supplied node is invalid or has an invalid ancestor for this operation`, `DATA_CLONE_ERR (25): the object can not be cloned.` ], T = { INDEX_SIZE_ERR: n, DOMSTRING_SIZE_ERR: 2, HIERARCHY_REQUEST_ERR: r, WRONG_DOCUMENT_ERR: i, INVALID_CHARACTER_ERR: a, NO_DATA_ALLOWED_ERR: 6, NO_MODIFICATION_ALLOWED_ERR: o, NOT_FOUND_ERR: s, NOT_SUPPORTED_ERR: c, INUSE_ATTRIBUTE_ERR: 10, INVALID_STATE_ERR: l, SYNTAX_ERR: u, INVALID_MODIFICATION_ERR: d, NAMESPACE_ERR: f, INVALID_ACCESS_ERR: p, VALIDATION_ERR: 16, TYPE_MISMATCH_ERR: m, SECURITY_ERR: h, NETWORK_ERR: g, ABORT_ERR: _, URL_MISMATCH_ERR: v, QUOTA_EXCEEDED_ERR: y, TIMEOUT_ERR: b, INVALID_NODE_TYPE_ERR: x, DATA_CLONE_ERR: S }; function E(e) { Error.call(this), Error.captureStackTrace(this, this.constructor), this.code = e, this.message = w[e], this.name = C[e]; } for (var D in E.prototype.__proto__ = Error.prototype, T) { var ee = { value: T[D] }; Object.defineProperty(E, D, ee), Object.defineProperty(E.prototype, D, ee); } })); var a$8 = e$2(((e) => { e.isApiWritable = !globalThis.__domino_frozen__; })); var o$8 = e$2(((e) => { var t = i$9(), n = t, r = a$8().isApiWritable; e.NAMESPACE = { HTML: `http://www.w3.org/1999/xhtml`, XML: `http://www.w3.org/XML/1998/namespace`, XMLNS: `http://www.w3.org/2000/xmlns/`, MATHML: `http://www.w3.org/1998/Math/MathML`, SVG: `http://www.w3.org/2000/svg`, XLINK: `http://www.w3.org/1999/xlink` }, e.IndexSizeError = function() { throw new t(n.INDEX_SIZE_ERR); }, e.HierarchyRequestError = function() { throw new t(n.HIERARCHY_REQUEST_ERR); }, e.WrongDocumentError = function() { throw new t(n.WRONG_DOCUMENT_ERR); }, e.InvalidCharacterError = function() { throw new t(n.INVALID_CHARACTER_ERR); }, e.NoModificationAllowedError = function() { throw new t(n.NO_MODIFICATION_ALLOWED_ERR); }, e.NotFoundError = function() { throw new t(n.NOT_FOUND_ERR); }, e.NotSupportedError = function() { throw new t(n.NOT_SUPPORTED_ERR); }, e.InvalidStateError = function() { throw new t(n.INVALID_STATE_ERR); }, e.SyntaxError = function() { throw new t(n.SYNTAX_ERR); }, e.InvalidModificationError = function() { throw new t(n.INVALID_MODIFICATION_ERR); }, e.NamespaceError = function() { throw new t(n.NAMESPACE_ERR); }, e.InvalidAccessError = function() { throw new t(n.INVALID_ACCESS_ERR); }, e.TypeMismatchError = function() { throw new t(n.TYPE_MISMATCH_ERR); }, e.SecurityError = function() { throw new t(n.SECURITY_ERR); }, e.NetworkError = function() { throw new t(n.NETWORK_ERR); }, e.AbortError = function() { throw new t(n.ABORT_ERR); }, e.UrlMismatchError = function() { throw new t(n.URL_MISMATCH_ERR); }, e.QuotaExceededError = function() { throw new t(n.QUOTA_EXCEEDED_ERR); }, e.TimeoutError = function() { throw new t(n.TIMEOUT_ERR); }, e.InvalidNodeTypeError = function() { throw new t(n.INVALID_NODE_TYPE_ERR); }, e.DataCloneError = function() { throw new t(n.DATA_CLONE_ERR); }, e.nyi = function() { throw Error(`NotYetImplemented`); }, e.shouldOverride = function() { throw Error(`Abstract function; should be overriding in subclass.`); }, e.assert = function(e, t) { if (!e) throw Error(`Assertion failed: ` + (t || ``) + ` ` + Error().stack); }, e.expose = function(e, t) { for (var n in e) Object.defineProperty(t.prototype, n, { value: e[n], writable: r }); }, e.merge = function(e, t) { for (var n in t) e[n] = t[n]; }, e.documentOrder = function(e, t) { return 3 - (e.compareDocumentPosition(t) & 6); }, e.toASCIILowerCase = function(e) { return e.replace(/[A-Z]+/g, function(e) { return e.toLowerCase(); }); }, e.toASCIIUpperCase = function(e) { return e.replace(/[a-z]+/g, function(e) { return e.toUpperCase(); }); }; })); var s$6 = e$2(((e, n) => { var i = t$7(), a = r$11(), s = o$8(); n.exports = c; function c() {} c.prototype = { addEventListener: function(e, t, n) { if (t) { n === void 0 && (n = !1), this._listeners ||= Object.create(null), this._listeners[e] || (this._listeners[e] = []); for (var r = this._listeners[e], i = 0, a = r.length; i < a; i++) { var o = r[i]; if (o.listener === t && o.capture === n) return; } var s = { listener: t, capture: n }; typeof t == `function` && (s.f = t), r.push(s); } }, removeEventListener: function(e, t, n) { if (n === void 0 && (n = !1), this._listeners) { var r = this._listeners[e]; if (r) for (var i = 0, a = r.length; i < a; i++) { var o = r[i]; if (o.listener === t && o.capture === n) { r.length === 1 ? this._listeners[e] = void 0 : r.splice(i, 1); return; } } } }, dispatchEvent: function(e) { return this._dispatchEvent(e, !1); }, _dispatchEvent: function(e, t) { typeof t != `boolean` && (t = !1); function n(e, t) { var n = t.type, r = t.eventPhase; if (t.currentTarget = e, r !== i.CAPTURING_PHASE && e._handlers && e._handlers[n]) { var a = e._handlers[n], o; if (typeof a == `function`) o = a.call(t.currentTarget, t); else { var s = a.handleEvent; if (typeof s != `function`) throw TypeError(`handleEvent property of event handler object isnot a function.`); o = s.call(a, t); } switch (t.type) { case `mouseover`: o === !0 && t.preventDefault(); break; default: o === !1 && t.preventDefault(); break; } } var c = e._listeners && e._listeners[n]; if (c) { c = c.slice(); for (var l = 0, u = c.length; l < u; l++) { if (t._immediatePropagationStopped) return; var d = c[l]; if (!(r === i.CAPTURING_PHASE && !d.capture || r === i.BUBBLING_PHASE && d.capture)) if (d.f) d.f.call(t.currentTarget, t); else { var f = d.listener.handleEvent; if (typeof f != `function`) throw TypeError(`handleEvent property of event listener object is not a function.`); f.call(d.listener, t); } } } } (!e._initialized || e._dispatching) && s.InvalidStateError(), e.isTrusted = t, e._dispatching = !0, e.target = this; for (var r = [], o = this.parentNode; o; o = o.parentNode) r.push(o); e.eventPhase = i.CAPTURING_PHASE; for (var c = r.length - 1; c >= 0 && (n(r[c], e), !e._propagationStopped); c--); if (e._propagationStopped || (e.eventPhase = i.AT_TARGET, n(this, e)), e.bubbles && !e._propagationStopped) { e.eventPhase = i.BUBBLING_PHASE; for (var l = 0, u = r.length; l < u && (n(r[l], e), !e._propagationStopped); l++); } if (e._dispatching = !1, e.eventPhase = i.AT_TARGET, e.currentTarget = null, t && !e.defaultPrevented && e instanceof a) switch (e.type) { case `mousedown`: this._armed = { x: e.clientX, y: e.clientY, t: e.timeStamp }; break; case `mouseout`: case `mouseover`: this._armed = null; break; case `mouseup`: this._isClick(e) && this._doClick(e), this._armed = null; break; } return !e.defaultPrevented; }, _isClick: function(e) { return this._armed !== null && e.type === `mouseup` && e.isTrusted && e.button === 0 && e.timeStamp - this._armed.t < 1e3 && Math.abs(e.clientX - this._armed.x) < 10 && Math.abs(e.clientY - this._armed.Y) < 10; }, _doClick: function(e) { if (!this._click_in_progress) { this._click_in_progress = !0; for (var t = this; t && !t._post_click_activation_steps;) t = t.parentNode; t && t._pre_click_activation_steps && t._pre_click_activation_steps(); var n = this.ownerDocument.createEvent(`MouseEvent`); n.initMouseEvent(`click`, !0, !0, this.ownerDocument.defaultView, 1, e.screenX, e.screenY, e.clientX, e.clientY, e.ctrlKey, e.altKey, e.shiftKey, e.metaKey, e.button, null); var r = this._dispatchEvent(n, !0); t && (r ? t._post_click_activation_steps && t._post_click_activation_steps(n) : t._cancelled_activation_steps && t._cancelled_activation_steps()); } }, _setEventHandler: function(e, t) { this._handlers ||= Object.create(null), this._handlers[e] = t; }, _getEventHandler: function(e) { return this._handlers && this._handlers[e] || null; } }; })); var c$7 = e$2(((e, t) => { var n = o$8(), r = t.exports = { valid: function(e) { return n.assert(e, `list falsy`), n.assert(e._previousSibling, `previous falsy`), n.assert(e._nextSibling, `next falsy`), !0; }, insertBefore: function(e, t) { n.assert(r.valid(e) && r.valid(t)); var i = e, a = e._previousSibling, o = t, s = t._previousSibling; i._previousSibling = s, a._nextSibling = o, s._nextSibling = i, o._previousSibling = a, n.assert(r.valid(e) && r.valid(t)); }, replace: function(e, t) { n.assert(r.valid(e) && (t === null || r.valid(t))), t !== null && r.insertBefore(t, e), r.remove(e), n.assert(r.valid(e) && (t === null || r.valid(t))); }, remove: function(e) { n.assert(r.valid(e)); var t = e._previousSibling; if (t !== e) { var i = e._nextSibling; t._nextSibling = i, i._previousSibling = t, e._previousSibling = e._nextSibling = e, n.assert(r.valid(e)); } } }; })); var l$6 = e$2(((e, t) => { t.exports = { serializeOne: _, ɵescapeMatchingClosingTag: p, ɵescapeClosingCommentTag: h, ɵescapeProcessingInstructionContent: g }; var n = o$8(), r = n.NAMESPACE, i = { STYLE: !0, SCRIPT: !0, XMP: !0, IFRAME: !0, NOEMBED: !0, NOFRAMES: !0, PLAINTEXT: !0 }, a = { area: !0, base: !0, basefont: !0, bgsound: !0, br: !0, col: !0, embed: !0, frame: !0, hr: !0, img: !0, input: !0, keygen: !0, link: !0, meta: !0, param: !0, source: !0, track: !0, wbr: !0 }, s = {}; let c = /[&<>\u00A0]/g, l = /[&"<>\u00A0]/g; function u(e) { return c.test(e) ? e.replace(c, (e) => { switch (e) { case `&`: return `&`; case `<`: return `<`; case `>`: return `>`; case `\xA0`: return ` `; } }) : e; } function d(e) { return l.test(e) ? e.replace(l, (e) => { switch (e) { case `<`: return `<`; case `>`: return `>`; case `&`: return `&`; case `"`: return `"`; case `\xA0`: return ` `; } }) : e; } function f(e) { var t = e.namespaceURI; return t ? t === r.XML ? `xml:` + e.localName : t === r.XLINK ? `xlink:` + e.localName : t === r.XMLNS ? e.localName === `xmlns` ? `xmlns` : `xmlns:` + e.localName : e.name : e.localName; } function p(e, t) { let n = `/; function h(e) { return m.test(e) ? e.replace(/(--\!?)>/g, `$1>`) : e; } function g(e) { return e.includes(`>`) ? e.replaceAll(`>`, `>`) : e; } function _(e, t) { var o = ``; switch (e.nodeType) { case 1: var c = e.namespaceURI, l = c === r.HTML, m = l || c === r.SVG || c === r.MATHML ? e.localName : e.tagName; o += `<` + m; for (var _ = 0, v = e._numattrs; _ < v; _++) { var y = e._attr(_); o += ` ` + f(y), y.value !== void 0 && (o += `="` + d(y.value) + `"`); } if (o += `>`, !(l && a[m])) { var b = e.serialize(); i[m.toUpperCase()] && (b = p(b, m)), l && s[m] && b.charAt(0) === ` ` && (o += ` `), o += b, o += ``; } break; case 3: case 4: var x = t.nodeType === 1 && t.namespaceURI === r.HTML ? t.tagName : ``; i[x] || x === `NOSCRIPT` && t.ownerDocument._scripting_enabled ? o += e.data : o += u(e.data); break; case 8: o += ``; break; case 7: let S = g(e.data); o += ``; break; case 10: o += ``; break; default: n.InvalidStateError(); } return o; } })); var u$8 = e$2(((e, t) => { t.exports = u; var n = s$6(), r = c$7(), i = l$6(), a = o$8(); function u() { n.call(this), this.parentNode = null, this._nextSibling = this._previousSibling = this, this._index = void 0; } var d = u.ELEMENT_NODE = 1, f = u.ATTRIBUTE_NODE = 2, p = u.TEXT_NODE = 3, m = u.CDATA_SECTION_NODE = 4, h = u.ENTITY_REFERENCE_NODE = 5, g = u.ENTITY_NODE = 6, _ = u.PROCESSING_INSTRUCTION_NODE = 7, v = u.COMMENT_NODE = 8, y = u.DOCUMENT_NODE = 9, b = u.DOCUMENT_TYPE_NODE = 10, x = u.DOCUMENT_FRAGMENT_NODE = 11, S = u.NOTATION_NODE = 12, C = u.DOCUMENT_POSITION_DISCONNECTED = 1, w = u.DOCUMENT_POSITION_PRECEDING = 2, T = u.DOCUMENT_POSITION_FOLLOWING = 4, E = u.DOCUMENT_POSITION_CONTAINS = 8, D = u.DOCUMENT_POSITION_CONTAINED_BY = 16, ee = u.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC = 32; u.prototype = Object.create(n.prototype, { baseURI: { get: a.nyi }, parentElement: { get: function() { return this.parentNode && this.parentNode.nodeType === d ? this.parentNode : null; } }, hasChildNodes: { value: a.shouldOverride }, firstChild: { get: a.shouldOverride }, lastChild: { get: a.shouldOverride }, isConnected: { get: function() { let e = this; for (; e != null;) { if (e.nodeType === u.DOCUMENT_NODE) return !0; e = e.parentNode, e != null && e.nodeType === u.DOCUMENT_FRAGMENT_NODE && (e = e.host); } return !1; } }, previousSibling: { get: function() { var e = this.parentNode; return !e || this === e.firstChild ? null : this._previousSibling; } }, nextSibling: { get: function() { var e = this.parentNode, t = this._nextSibling; return !e || t === e.firstChild ? null : t; } }, textContent: { get: function() { return null; }, set: function(e) {} }, innerText: { get: function() { return null; }, set: function(e) {} }, _countChildrenOfType: { value: function(e) { for (var t = 0, n = this.firstChild; n !== null; n = n.nextSibling) n.nodeType === e && t++; return t; } }, _ensureInsertValid: { value: function(e, t, n) { var r = this, i, o; if (!e.nodeType) throw TypeError(`not a node`); switch (r.nodeType) { case y: case x: case d: break; default: a.HierarchyRequestError(); } switch (e.isAncestor(r) && a.HierarchyRequestError(), (t !== null || !n) && t.parentNode !== r && a.NotFoundError(), e.nodeType) { case x: case b: case d: case p: case _: case v: break; default: a.HierarchyRequestError(); } if (r.nodeType === y) switch (e.nodeType) { case p: a.HierarchyRequestError(); break; case x: switch (e._countChildrenOfType(p) > 0 && a.HierarchyRequestError(), e._countChildrenOfType(d)) { case 0: break; case 1: if (t !== null) for (n && t.nodeType === b && a.HierarchyRequestError(), o = t.nextSibling; o !== null; o = o.nextSibling) o.nodeType === b && a.HierarchyRequestError(); i = r._countChildrenOfType(d), n ? i > 0 && a.HierarchyRequestError() : (i > 1 || i === 1 && t.nodeType !== d) && a.HierarchyRequestError(); break; default: a.HierarchyRequestError(); } break; case d: if (t !== null) for (n && t.nodeType === b && a.HierarchyRequestError(), o = t.nextSibling; o !== null; o = o.nextSibling) o.nodeType === b && a.HierarchyRequestError(); i = r._countChildrenOfType(d), n ? i > 0 && a.HierarchyRequestError() : (i > 1 || i === 1 && t.nodeType !== d) && a.HierarchyRequestError(); break; case b: if (t === null) r._countChildrenOfType(d) && a.HierarchyRequestError(); else for (o = r.firstChild; o !== null && o !== t; o = o.nextSibling) o.nodeType === d && a.HierarchyRequestError(); i = r._countChildrenOfType(b), n ? i > 0 && a.HierarchyRequestError() : (i > 1 || i === 1 && t.nodeType !== b) && a.HierarchyRequestError(); break; } else e.nodeType === b && a.HierarchyRequestError(); } }, insertBefore: { value: function(e, t) { var n = this; n._ensureInsertValid(e, t, !0); var r = t; return r === e && (r = e.nextSibling), n.doc.adoptNode(e), e._insertOrReplace(n, r, !1), e; } }, appendChild: { value: function(e) { return this.insertBefore(e, null); } }, _appendChild: { value: function(e) { e._insertOrReplace(this, null, !1); } }, removeChild: { value: function(e) { var t = this; if (!e.nodeType) throw TypeError(`not a node`); return e.parentNode !== t && a.NotFoundError(), e.remove(), e; } }, replaceChild: { value: function(e, t) { var n = this; return n._ensureInsertValid(e, t, !1), e.doc !== n.doc && n.doc.adoptNode(e), e._insertOrReplace(n, t, !0), t; } }, contains: { value: function(e) { return e === null ? !1 : this === e ? !0 : (this.compareDocumentPosition(e) & D) !== 0; } }, compareDocumentPosition: { value: function(e) { if (this === e) return 0; if (this.doc !== e.doc || this.rooted !== e.rooted) return C + ee; for (var t = [], n = [], r = this; r !== null; r = r.parentNode) t.push(r); for (r = e; r !== null; r = r.parentNode) n.push(r); if (t.reverse(), n.reverse(), t[0] !== n[0]) return C + ee; r = Math.min(t.length, n.length); for (var i = 1; i < r; i++) if (t[i] !== n[i]) return t[i].index < n[i].index ? T : w; return t.length < n.length ? T + D : w + E; } }, isSameNode: { value: function(e) { return this === e; } }, isEqualNode: { value: function(e) { if (!e || e.nodeType !== this.nodeType || !this.isEqual(e)) return !1; for (var t = this.firstChild, n = e.firstChild; t && n; t = t.nextSibling, n = n.nextSibling) if (!t.isEqualNode(n)) return !1; return t === null && n === null; } }, cloneNode: { value: function(e) { var t = this.clone(); if (e) for (var n = this.firstChild; n !== null; n = n.nextSibling) t._appendChild(n.cloneNode(!0)); return t; } }, lookupPrefix: { value: function(e) { var t; if (e === `` || e == null) return null; switch (this.nodeType) { case d: return this._lookupNamespacePrefix(e, this); case y: return t = this.documentElement, t ? t.lookupPrefix(e) : null; case g: case S: case x: case b: return null; case f: return t = this.ownerElement, t ? t.lookupPrefix(e) : null; default: return t = this.parentElement, t ? t.lookupPrefix(e) : null; } } }, lookupNamespaceURI: { value: function(e) { (e === `` || e === void 0) && (e = null); var t; switch (this.nodeType) { case d: return a.shouldOverride(); case y: return t = this.documentElement, t ? t.lookupNamespaceURI(e) : null; case g: case S: case b: case x: return null; case f: return t = this.ownerElement, t ? t.lookupNamespaceURI(e) : null; default: return t = this.parentElement, t ? t.lookupNamespaceURI(e) : null; } } }, isDefaultNamespace: { value: function(e) { return (e === `` || e === void 0) && (e = null), this.lookupNamespaceURI(null) === e; } }, index: { get: function() { var e = this.parentNode; if (this === e.firstChild) return 0; var t = e.childNodes; if (this._index === void 0 || t[this._index] !== this) { for (var n = 0; n < t.length; n++) t[n]._index = n; a.assert(t[this._index] === this); } return this._index; } }, isAncestor: { value: function(e) { if (this.doc !== e.doc || this.rooted !== e.rooted) return !1; for (var t = e; t; t = t.parentNode) if (t === this) return !0; return !1; } }, ensureSameDoc: { value: function(e) { e.ownerDocument === null ? e.ownerDocument = this.doc : e.ownerDocument !== this.doc && a.WrongDocumentError(); } }, removeChildren: { value: a.shouldOverride }, _insertOrReplace: { value: function(e, t, n) { var i = this, o, s; i.nodeType === x && i.rooted && a.HierarchyRequestError(), e._childNodes && (o = t === null ? e._childNodes.length : t.index, i.parentNode === e && i.index < o && o--), n && (t.rooted && t.doc.mutateRemove(t), t.parentNode = null); var c = t; c === null && (c = e.firstChild); var l = i.rooted && e.rooted; if (i.nodeType === x) { for (var u = [0, +!!n], d, f = i.firstChild; f !== null; f = d) d = f.nextSibling, u.push(f), f.parentNode = e; var p = u.length; if (n ? r.replace(c, p > 2 ? u[2] : null) : p > 2 && c !== null && r.insertBefore(u[2], c), e._childNodes) for (u[0] = t === null ? e._childNodes.length : t._index, e._childNodes.splice.apply(e._childNodes, u), s = 2; s < p; s++) u[s]._index = u[0] + (s - 2); else e._firstChild === t && (p > 2 ? e._firstChild = u[2] : n && (e._firstChild = null)); if (i._childNodes ? i._childNodes.length = 0 : i._firstChild = null, e.rooted) for (e.modify(), s = 2; s < p; s++) e.doc.mutateInsert(u[s]); } else { if (t === i) return; l ? i._remove() : i.parentNode && i.remove(), i.parentNode = e, n ? (r.replace(c, i), e._childNodes ? (i._index = o, e._childNodes[o] = i) : e._firstChild === t && (e._firstChild = i)) : (c !== null && r.insertBefore(i, c), e._childNodes ? (i._index = o, e._childNodes.splice(o, 0, i)) : e._firstChild === t && (e._firstChild = i)), l ? (e.modify(), e.doc.mutateMove(i)) : e.rooted && (e.modify(), e.doc.mutateInsert(i)); } } }, lastModTime: { get: function() { return this._lastModTime ||= this.doc.modclock, this._lastModTime; } }, modify: { value: function() { if (this.doc.modclock) for (var e = ++this.doc.modclock, t = this; t; t = t.parentElement) t._lastModTime &&= e; } }, doc: { get: function() { return this.ownerDocument || this; } }, rooted: { get: function() { return !!this._nid; } }, normalize: { value: function() { for (var e, t = this.firstChild; t !== null; t = e) if (e = t.nextSibling, t.normalize && t.normalize(), t.nodeType === u.TEXT_NODE) { if (t.nodeValue === ``) { this.removeChild(t); continue; } var n = t.previousSibling; n !== null && n.nodeType === u.TEXT_NODE && (n.appendData(t.nodeValue), this.removeChild(t)); } } }, serialize: { value: function() { if (this._innerHTML) return this._innerHTML; for (var e = ``, t = this.firstChild; t !== null; t = t.nextSibling) e += i.serializeOne(t, this); return e; } }, outerHTML: { get: function() { return i.serializeOne(this, { nodeType: 0 }); }, set: a.nyi }, ELEMENT_NODE: { value: d }, ATTRIBUTE_NODE: { value: f }, TEXT_NODE: { value: p }, CDATA_SECTION_NODE: { value: m }, ENTITY_REFERENCE_NODE: { value: h }, ENTITY_NODE: { value: g }, PROCESSING_INSTRUCTION_NODE: { value: _ }, COMMENT_NODE: { value: v }, DOCUMENT_NODE: { value: y }, DOCUMENT_TYPE_NODE: { value: b }, DOCUMENT_FRAGMENT_NODE: { value: x }, NOTATION_NODE: { value: S }, DOCUMENT_POSITION_DISCONNECTED: { value: C }, DOCUMENT_POSITION_PRECEDING: { value: w }, DOCUMENT_POSITION_FOLLOWING: { value: T }, DOCUMENT_POSITION_CONTAINS: { value: E }, DOCUMENT_POSITION_CONTAINED_BY: { value: D }, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: { value: ee } }); })); var d$8 = e$2(((e, t) => { t.exports = class extends Array { constructor(e) { if (super(e && e.length || 0), e) for (var t in e) this[t] = e[t]; } item(e) { return this[e] || null; } }; })); var f$7 = e$2(((e, t) => { function n(e) { return this[e] || null; } function r(e) { return e ||= [], e.item = n, e; } t.exports = r; })); var p$10 = e$2(((e, t) => { var n; try { n = d$8(); } catch { n = f$7(); } t.exports = n; })); var m$7 = e$2(((e, t) => { t.exports = i; var n = u$8(), r = p$10(); function i() { n.call(this), this._firstChild = this._childNodes = null; } i.prototype = Object.create(n.prototype, { hasChildNodes: { value: function() { return this._childNodes ? this._childNodes.length > 0 : this._firstChild !== null; } }, childNodes: { get: function() { return this._ensureChildNodes(), this._childNodes; } }, firstChild: { get: function() { return this._childNodes ? this._childNodes.length === 0 ? null : this._childNodes[0] : this._firstChild; } }, lastChild: { get: function() { var e = this._childNodes, t; return e ? e.length === 0 ? null : e[e.length - 1] : (t = this._firstChild, t === null ? null : t._previousSibling); } }, _ensureChildNodes: { value: function() { if (!this._childNodes) { var e = this._firstChild, t = e, n = this._childNodes = new r(); if (e) do n.push(t), t = t._nextSibling; while (t !== e); this._firstChild = null; } } }, removeChildren: { value: function() { for (var e = this.rooted ? this.ownerDocument : null, t = this.firstChild, n; t !== null;) n = t, t = n.nextSibling, e && e.mutateRemove(n), n.parentNode = null; this._childNodes ? this._childNodes.length = 0 : this._firstChild = null, this.modify(); } } }); })); var h$8 = e$2(((e) => { e.isValidName = h, e.isValidQName = g; var t = /^[_:A-Za-z][-.:\w]+$/, n = /^([_A-Za-z][-.\w]+|[_A-Za-z][-.\w]+:[_A-Za-z][-.\w]+)$/, r = `_A-Za-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-῿‌-‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�`, i = `-._A-Za-z0-9·À-ÖØ-öø-˿̀-ͽͿ-῿‌‍‿⁀⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�`, a = `[` + r + `][` + i + `]*`, o = r + `:`, s = i + `:`, c = RegExp(`^[` + o + `][` + s + `]*$`), l = RegExp(`^(` + a + `|` + a + `:` + a + `)$`), u = /[\uD800-\uDB7F\uDC00-\uDFFF]/, d = /[\uD800-\uDB7F\uDC00-\uDFFF]/g, f = /[\uD800-\uDB7F][\uDC00-\uDFFF]/g; r += `\ud800-󯰀-\udfff`, i += `\ud800-󯰀-\udfff`, a = `[` + r + `][` + i + `]*`, o = r + `:`, s = i + `:`; var p = RegExp(`^[` + o + `][` + s + `]*$`), m = RegExp(`^(` + a + `|` + a + `:` + a + `)$`); function h(e) { if (t.test(e) || c.test(e)) return !0; if (!u.test(e) || !p.test(e)) return !1; var n = e.match(d), r = e.match(f); return r !== null && 2 * r.length === n.length; } function g(e) { if (n.test(e) || l.test(e)) return !0; if (!u.test(e) || !m.test(e)) return !1; var t = e.match(d), r = e.match(f); return r !== null && 2 * r.length === t.length; } })); var g$7 = e$2(((e) => { var t = o$8(); e.property = function(e) { if (Array.isArray(e.type)) { var t = Object.create(null); e.type.forEach(function(e) { t[e.value || e] = e.alias || e; }); var r = e.missing; r === void 0 && (r = null); var i = e.invalid; return i === void 0 && (i = r), { get: function() { var n = this._getattr(e.name); return n === null ? r : (n = t[n.toLowerCase()], n === void 0 ? i === null ? n : i : n); }, set: function(t) { this._setattr(e.name, t); } }; } else if (e.type === Boolean) return { get: function() { return this.hasAttribute(e.name); }, set: function(t) { t ? this._setattr(e.name, ``) : this.removeAttribute(e.name); } }; else if (e.type === Number || e.type === `long` || e.type === `unsigned long` || e.type === `limited unsigned long with fallback`) return n(e); else if (!e.type || e.type === String) return { get: function() { return this._getattr(e.name) || ``; }, set: function(t) { e.treatNullAsEmptyString && t === null && (t = ``), this._setattr(e.name, t); } }; else if (typeof e.type == `function`) return e.type(e.name, e); throw Error(`Invalid attribute definition`); }; function n(e) { var n = typeof e.default == `function` ? e.default : typeof e.default == `number` ? function() { return e.default; } : function() { t.assert(!1, typeof e.default); }, r = e.type === `unsigned long`, i = e.type === `long`, a = e.type === `limited unsigned long with fallback`, o = e.min, s = e.max, c = e.setmin; return o === void 0 && (r && (o = 0), i && (o = -2147483648), a && (o = 1)), s === void 0 && (r || i || a) && (s = 2147483647), { get: function() { var t = this._getattr(e.name), c = e.float ? parseFloat(t) : parseInt(t, 10); if (t === null || !isFinite(c) || o !== void 0 && c < o || s !== void 0 && c > s) return n.call(this); if (r || i || a) { if (!/^[ \t\n\f\r]*[-+]?[0-9]/.test(t)) return n.call(this); c |= 0; } return c; }, set: function(o) { e.float || (o = Math.floor(o)), c !== void 0 && o < c && t.IndexSizeError(e.name + ` set to ` + o), r ? o = o < 0 || o > 2147483647 ? n.call(this) : o | 0 : a ? o = o < 1 || o > 2147483647 ? n.call(this) : o | 0 : i && (o = o < -2147483648 || o > 2147483647 ? n.call(this) : o | 0), this._setattr(e.name, String(o)); } }; } e.registerChangeHandler = function(e, t, n) { var r = e.prototype; Object.prototype.hasOwnProperty.call(r, `_attributeChangeHandlers`) || (r._attributeChangeHandlers = Object.create(r._attributeChangeHandlers || null)), r._attributeChangeHandlers[t] = n; }; })); var _$6 = e$2(((e, t) => { t.exports = r; var n = u$8(); function r(e, t) { this.root = e, this.filter = t, this.lastModTime = e.lastModTime, this.done = !1, this.cache = [], this.traverse(); } r.prototype = Object.create(Object.prototype, { length: { get: function() { return this.checkcache(), this.done || this.traverse(), this.cache.length; } }, item: { value: function(e) { return this.checkcache(), !this.done && e >= this.cache.length && this.traverse(), this.cache[e]; } }, checkcache: { value: function() { if (this.lastModTime !== this.root.lastModTime) { for (var e = this.cache.length - 1; e >= 0; e--) this[e] = void 0; this.cache.length = 0, this.done = !1, this.lastModTime = this.root.lastModTime; } } }, traverse: { value: function(e) { e !== void 0 && e++; for (var t; (t = this.next()) !== null;) if (this[this.cache.length] = t, this.cache.push(t), e && this.cache.length === e) return; this.done = !0; } }, next: { value: function() { for (var e = this.cache.length === 0 ? this.root : this.cache[this.cache.length - 1], t = e.nodeType === n.DOCUMENT_NODE ? e.documentElement : e.nextElement(this.root); t;) { if (this.filter(t)) return t; t = t.nextElement(this.root); } return null; } } }); })); var v$7 = e$2(((e, t) => { var n = o$8(); t.exports = r; function r(e, t) { this._getString = e, this._setString = t, this._length = 0, this._lastStringValue = ``, this._update(); } Object.defineProperties(r.prototype, { length: { get: function() { return this._length; } }, item: { value: function(e) { var t = c(this); return e < 0 || e >= t.length ? null : t[e]; } }, contains: { value: function(e) { return e = String(e), c(this).indexOf(e) > -1; } }, add: { value: function() { for (var e = c(this), t = 0, n = arguments.length; t < n; t++) { var r = a(arguments[t]); e.indexOf(r) < 0 && e.push(r); } this._update(e); } }, remove: { value: function() { for (var e = c(this), t = 0, n = arguments.length; t < n; t++) { var r = a(arguments[t]), i = e.indexOf(r); i > -1 && e.splice(i, 1); } this._update(e); } }, toggle: { value: function(e, t) { return e = a(e), this.contains(e) ? t === void 0 || t === !1 ? (this.remove(e), !1) : !0 : t === void 0 || t === !0 ? (this.add(e), !0) : !1; } }, replace: { value: function(e, t) { String(t) === `` && n.SyntaxError(), e = a(e), t = a(t); var r = c(this), i = r.indexOf(e); if (i < 0) return !1; var o = r.indexOf(t); return o < 0 ? r[i] = t : i < o ? (r[i] = t, r.splice(o, 1)) : r.splice(i, 1), this._update(r), !0; } }, toString: { value: function() { return this._getString(); } }, value: { get: function() { return this._getString(); }, set: function(e) { this._setString(e), this._update(); } }, _update: { value: function(e) { e ? (i(this, e), this._setString(e.join(` `).trim())) : i(this, c(this)), this._lastStringValue = this._getString(); } } }); function i(e, t) { var n = e._length, r; for (e._length = t.length, r = 0; r < t.length; r++) e[r] = t[r]; for (; r < n; r++) e[r] = void 0; } function a(e) { return e = String(e), e === `` && n.SyntaxError(), /[ \t\r\n\f]/.test(e) && n.InvalidCharacterError(), e; } function s(e) { for (var t = e._length, n = Array(t), r = 0; r < t; r++) n[r] = e[r]; return n; } function c(e) { var t = e._getString(); if (t === e._lastStringValue) return s(e); var n = t.replace(/(^[ \t\r\n\f]+)|([ \t\r\n\f]+$)/g, ``); if (n === ``) return []; var r = Object.create(null); return n.split(/[ \t\r\n\f]+/g).filter(function(e) { var t = `$` + e; return r[t] ? !1 : (r[t] = !0, !0); }); } })); var y$5 = e$2(((e, t) => { var n = Object.create(null, { location: { get: function() { throw Error(`window.location is not supported.`); } } }), r = function(e, t) { return e.compareDocumentPosition(t); }, i = function(e, t) { return r(e, t) & 2 ? 1 : -1; }, a = function(e) { for (; (e = e.nextSibling) && e.nodeType !== 1;); return e; }, o = function(e) { for (; (e = e.previousSibling) && e.nodeType !== 1;); return e; }, s = function(e) { if (e = e.firstChild) for (; e.nodeType !== 1 && (e = e.nextSibling);); return e; }, c = function(e) { if (e = e.lastChild) for (; e.nodeType !== 1 && (e = e.previousSibling);); return e; }, l = function(e) { if (!e.parentNode) return !1; var t = e.parentNode.nodeType; return t === 1 || t === 9; }, u = function(e) { if (!e) return e; var t = e[0]; return t === `"` || t === `'` ? (e = e[e.length - 1] === t ? e.slice(1, -1) : e.slice(1), e.replace(x.str_escape, function(e) { var t = /^\\(?:([0-9A-Fa-f]+)|([\r\n\f]+))/.exec(e); if (!t) return e.slice(1); if (t[2]) return ``; var n = parseInt(t[1], 16); return String.fromCodePoint ? String.fromCodePoint(n) : String.fromCharCode(n); })) : x.ident.test(e) ? d(e) : e; }, d = function(e) { return e.replace(x.escape, function(e) { var t = /^\\([0-9A-Fa-f]+)/.exec(e); if (!t) return e[1]; var n = parseInt(t[1], 16); return String.fromCodePoint ? String.fromCodePoint(n) : String.fromCharCode(n); }); }, f = (function() { return Array.prototype.indexOf ? Array.prototype.indexOf : function(e, t) { for (var n = this.length; n--;) if (this[n] === t) return n; return -1; }; })(), p = function(e, t) { var n = x.inside.source.replace(//g, t); return new RegExp(n); }, m = function(e, t, n) { return e = e.source, e = e.replace(t, n.source || n), new RegExp(e); }, h = function(e, t) { return e.replace(/^(?:\w+:\/\/|\/+)/, ``).replace(/(?:\/+|\/*#.*?)$/, ``).split(`/`, t).join(`/`); }, g = function(e, t) { var n = e.replace(/\s+/g, ``), r; return n === `even` ? n = `2n+0` : n === `odd` ? n = `2n+1` : n.indexOf(`n`) === -1 && (n = `0n` + n), r = /^([+-])?(\d+)?n([+-])?(\d+)?$/.exec(n), { group: r[1] === `-` ? -(r[2] || 1) : +(r[2] || 1), offset: r[4] ? r[3] === `-` ? -r[4] : +r[4] : 0 }; }, _ = function(e, t, n) { var r = g(e), i = r.group, u = r.offset, d = n ? c : s, f = n ? o : a; return function(e) { if (l(e)) for (var n = d(e.parentNode), r = 0; n;) { if (t(n, e) && r++, n === e) return r -= u, i && r ? r % i === 0 && r < 0 == i < 0 : !r; n = f(n); } }; }, v = { "*": (function() { return function() { return !0; }; })(), type: function(e) { return e = e.toLowerCase(), function(t) { return t.nodeName.toLowerCase() === e; }; }, attr: function(e, t, n, r) { return t = y[t], function(i) { var a; switch (e) { case `for`: a = i.htmlFor; break; case `class`: a = i.className, a === `` && i.getAttribute(`class`) == null && (a = null); break; case `href`: case `src`: a = i.getAttribute(e, 2); break; case `title`: a = i.getAttribute(`title`) || null; break; case `id`: case `lang`: case `dir`: case `accessKey`: case `hidden`: case `tabIndex`: case `style`: if (i.getAttribute) { a = i.getAttribute(e); break; } default: if (i.hasAttribute && !i.hasAttribute(e)) break; a = i[e] == null ? i.getAttribute && i.getAttribute(e) : i[e]; break; } if (a != null) return a += ``, r && (a = a.toLowerCase(), n = n.toLowerCase()), t(a, n); }; }, ":first-child": function(e) { return !o(e) && l(e); }, ":last-child": function(e) { return !a(e) && l(e); }, ":only-child": function(e) { return !o(e) && !a(e) && l(e); }, ":nth-child": function(e, t) { return _(e, function() { return !0; }, t); }, ":nth-last-child": function(e) { return v[`:nth-child`](e, !0); }, ":root": function(e) { return e.ownerDocument.documentElement === e; }, ":empty": function(e) { return !e.firstChild; }, ":not": function(e) { var t = D(e); return function(e) { return !t(e); }; }, ":first-of-type": function(e) { if (l(e)) { for (var t = e.nodeName; e = o(e);) if (e.nodeName === t) return; return !0; } }, ":last-of-type": function(e) { if (l(e)) { for (var t = e.nodeName; e = a(e);) if (e.nodeName === t) return; return !0; } }, ":only-of-type": function(e) { return v[`:first-of-type`](e) && v[`:last-of-type`](e); }, ":nth-of-type": function(e, t) { return _(e, function(e, t) { return e.nodeName === t.nodeName; }, t); }, ":nth-last-of-type": function(e) { return v[`:nth-of-type`](e, !0); }, ":checked": function(e) { return !!(e.checked || e.selected); }, ":indeterminate": function(e) { return !v[`:checked`](e); }, ":enabled": function(e) { return !e.disabled && e.type !== `hidden`; }, ":disabled": function(e) { return !!e.disabled; }, ":target": function(e) { return e.id === n.location.hash.substring(1); }, ":focus": function(e) { return e === e.ownerDocument.activeElement; }, ":is": function(e) { return D(e); }, ":matches": function(e) { return v[`:is`](e); }, ":nth-match": function(e, t) { var n = e.split(/\s*,\s*/); return _(n.shift(), D(n.join(`,`)), t); }, ":nth-last-match": function(e) { return v[`:nth-match`](e, !0); }, ":links-here": function(e) { return e + `` == n.location + ``; }, ":lang": function(e) { return function(t) { for (; t;) { if (t.lang) return t.lang.indexOf(e) === 0; t = t.parentNode; } }; }, ":dir": function(e) { return function(t) { for (; t;) { if (t.dir) return t.dir === e; t = t.parentNode; } }; }, ":scope": function(e, t) { var n = t || e.ownerDocument; return n.nodeType === 9 ? e === n.documentElement : e === n; }, ":any-link": function(e) { return typeof e.href == `string`; }, ":local-link": function(e) { if (e.nodeName) return e.href && e.host === n.location.host; var t = +e + 1; return function(e) { if (e.href) { var r = n.location + ``, i = e + ``; return h(r, t) === h(i, t); } }; }, ":default": function(e) { return !!e.defaultSelected; }, ":valid": function(e) { return e.willValidate || e.validity && e.validity.valid; }, ":invalid": function(e) { return !v[`:valid`](e); }, ":in-range": function(e) { return e.value > e.min && e.value <= e.max; }, ":out-of-range": function(e) { return !v[`:in-range`](e); }, ":required": function(e) { return !!e.required; }, ":optional": function(e) { return !e.required; }, ":read-only": function(e) { if (e.readOnly) return !0; var t = e.getAttribute(`contenteditable`), n = e.contentEditable, r = e.nodeName.toLowerCase(); return r = r !== `input` && r !== `textarea`, (r || e.disabled) && t == null && n !== `true`; }, ":read-write": function(e) { return !v[`:read-only`](e); }, ":hover": function() { throw Error(`:hover is not supported.`); }, ":active": function() { throw Error(`:active is not supported.`); }, ":link": function() { throw Error(`:link is not supported.`); }, ":visited": function() { throw Error(`:visited is not supported.`); }, ":column": function() { throw Error(`:column is not supported.`); }, ":nth-column": function() { throw Error(`:nth-column is not supported.`); }, ":nth-last-column": function() { throw Error(`:nth-last-column is not supported.`); }, ":current": function() { throw Error(`:current is not supported.`); }, ":past": function() { throw Error(`:past is not supported.`); }, ":future": function() { throw Error(`:future is not supported.`); }, ":contains": function(e) { return function(t) { return (t.innerText || t.textContent || t.value || ``).indexOf(e) !== -1; }; }, ":has": function(e) { return function(t) { return ee(e, t).length > 0; }; } }, y = { "-": function() { return !0; }, "=": function(e, t) { return e === t; }, "*=": function(e, t) { return e.indexOf(t) !== -1; }, "~=": function(e, t) { var n, r, i, a; for (r = 0;; r = n + 1) { if (n = e.indexOf(t, r), n === -1) return !1; if (i = e[n - 1], a = e[n + t.length], (!i || i === ` `) && (!a || a === ` `)) return !0; } }, "|=": function(e, t) { var n = e.indexOf(t), r; if (n === 0) return r = e[n + t.length], r === `-` || !r; }, "^=": function(e, t) { return e.indexOf(t) === 0; }, "$=": function(e, t) { var n = e.lastIndexOf(t); return n !== -1 && n + t.length === e.length; }, "!=": function(e, t) { return e !== t; } }, b = { " ": function(e) { return function(t) { for (; t = t.parentNode;) if (e(t)) return t; }; }, ">": function(e) { return function(t) { if (t = t.parentNode) return e(t) && t; }; }, "+": function(e) { return function(t) { if (t = o(t)) return e(t) && t; }; }, "~": function(e) { return function(t) { for (; t = o(t);) if (e(t)) return t; }; }, noop: function(e) { return function(t) { return e(t) && t; }; }, ref: function(e, t) { var n; function r(e) { for (var t = e.ownerDocument.getElementsByTagName(`*`), i = t.length; i--;) if (n = t[i], r.test(e)) return n = null, !0; n = null; } return r.combinator = function(r) { if (!(!n || !n.getAttribute)) { var i = n.getAttribute(t) || ``; if (i[0] === `#` && (i = i.substring(1)), i === r.id && e(n)) return n; } }, r; } }, x = { escape: /\\(?:[^0-9A-Fa-f\r\n]|[0-9A-Fa-f]{1,6}[\r\n\t ]?)/g, str_escape: /(escape)|\\(\n|\r\n?|\f)/g, nonascii: /[\u00A0-\uFFFF]/, cssid: /(?:(?!-?[0-9])(?:escape|nonascii|[-_a-zA-Z0-9])+)/, qname: /^ *(cssid|\*)/, simple: /^(?:([.#]cssid)|pseudo|attr)/, ref: /^ *\/(cssid)\/ */, combinator: /^(?: +([^ \w*.#\\]) +|( )+|([^ \w*.#\\]))(?! *$)/, attr: /^\[(cssid)(?:([^\w]?=)(inside))?\]/, pseudo: /^(:cssid)(?:\((inside)\))?/, inside: /(?:"(?:\\"|[^"])*"|'(?:\\'|[^'])*'|<[^"'>]*>|\\["'>]|[^"'>])*/, ident: /^(cssid)$/ }; x.cssid = m(x.cssid, `nonascii`, x.nonascii), x.cssid = m(x.cssid, `escape`, x.escape), x.qname = m(x.qname, `cssid`, x.cssid), x.simple = m(x.simple, `cssid`, x.cssid), x.ref = m(x.ref, `cssid`, x.cssid), x.attr = m(x.attr, `cssid`, x.cssid), x.pseudo = m(x.pseudo, `cssid`, x.cssid), x.inside = m(x.inside, `[^"'>]*`, x.inside), x.attr = m(x.attr, `inside`, p(`\\[`, `\\]`)), x.pseudo = m(x.pseudo, `inside`, p(`\\(`, `\\)`)), x.simple = m(x.simple, `pseudo`, x.pseudo), x.simple = m(x.simple, `attr`, x.attr), x.ident = m(x.ident, `cssid`, x.cssid), x.str_escape = m(x.str_escape, `escape`, x.escape); var S = function(e) { for (var t = e.replace(/^\s+|\s+$/g, ``), n, r = [], i = [], a, o, s, c, l; t;) { if (s = x.qname.exec(t)) t = t.substring(s[0].length), o = d(s[1]), i.push(C(o, !0)); else if (s = x.simple.exec(t)) t = t.substring(s[0].length), o = `*`, i.push(C(o, !0)), i.push(C(s)); else throw SyntaxError(`Invalid selector.`); for (; s = x.simple.exec(t);) t = t.substring(s[0].length), i.push(C(s)); if (t[0] === `!` && (t = t.substring(1), a = E(), a.qname = o, i.push(a.simple)), s = x.ref.exec(t)) { t = t.substring(s[0].length), l = b.ref(w(i), d(s[1])), r.push(l.combinator), i = []; continue; } if (s = x.combinator.exec(t)) { if (t = t.substring(s[0].length), c = s[1] || s[2] || s[3], c === `,`) { r.push(b.noop(w(i))); break; } } else c = `noop`; if (!b[c]) throw SyntaxError(`Bad combinator.`); r.push(b[c](w(i))), i = []; } return n = T(r), n.qname = o, n.sel = t, a && (a.lname = n.qname, a.test = n, a.qname = a.qname, a.sel = n.sel, n = a), l && (l.test = n, l.qname = n.qname, l.sel = n.sel, n = l), n; }, C = function(e, t) { if (t) return e === `*` ? v[`*`] : v.type(e); if (e[1]) return e[1][0] === `.` ? v.attr(`class`, `~=`, d(e[1].substring(1)), !1) : v.attr(`id`, `=`, d(e[1].substring(1)), !1); if (e[2]) return e[3] ? v[d(e[2])](u(e[3])) : v[d(e[2])]; if (e[4]) { var n = e[6], r = /["'\s]\s*I$/i.test(n); return r && (n = n.replace(/\s*I$/i, ``)), v.attr(d(e[4]), e[5] || `-`, u(n), r); } throw SyntaxError(`Unknown Selector.`); }, w = function(e) { var t = e.length, n; return t < 2 ? e[0] : function(r) { if (r) { for (n = 0; n < t; n++) if (!e[n](r)) return; return !0; } }; }, T = function(e) { return e.length < 2 ? function(t) { return !!e[0](t); } : function(t) { for (var n = e.length; n--;) if (!(t = e[n](t))) return; return !0; }; }, E = function() { var e; function t(n) { for (var r = n.ownerDocument.getElementsByTagName(t.lname), i = r.length; i--;) if (t.test(r[i]) && e === n) return e = null, !0; e = null; } return t.simple = function(t) { return e = t, !0; }, t; }, D = function(e) { for (var t = S(e), n = [t]; t.sel;) t = S(t.sel), n.push(t); return n.length < 2 ? t : function(e) { for (var t = n.length, r = 0; r < t; r++) if (n[r](e)) return !0; }; }, ee = function(e, t) { for (var n = [], r = S(e), a = t.getElementsByTagName(r.qname), o = 0, s; s = a[o++];) r(s) && n.push(s); if (r.sel) { for (; r.sel;) for (r = S(r.sel), a = t.getElementsByTagName(r.qname), o = 0; s = a[o++];) r(s) && f.call(n, s) === -1 && n.push(s); n.sort(i); } return n; }; t.exports = e = function(e, t) { var n, r; if (t.nodeType !== 11 && e.indexOf(` `) === -1) { if (e[0] === `#` && t.rooted && /^#[A-Z_][-A-Z0-9_]*$/i.test(e) && t.doc._hasMultipleElementsWithId && (n = e.substring(1), !t.doc._hasMultipleElementsWithId(n))) return r = t.doc.getElementById(n), r ? [r] : []; if (e[0] === `.` && /^\.\w+$/.test(e)) return t.getElementsByClassName(e.substring(1)); if (/^\w+$/.test(e)) return t.getElementsByTagName(e); } return ee(e, t); }, e.selectors = v, e.operators = y, e.combinators = b, e.matches = function(e, t) { var n = { sel: t }; do if (n = S(n.sel), n(e)) return !0; while (n.sel); return !1; }; })); var b$7 = e$2(((e, t) => { var n = u$8(), r = c$7(), i = function(e, t) { for (var r = e.createDocumentFragment(), i = 0; i < t.length; i++) { var a = t[i], o = a instanceof n; r.appendChild(o ? a : e.createTextNode(String(a))); } return r; }; t.exports = { after: { value: function() { var e = Array.prototype.slice.call(arguments), t = this.parentNode, n = this.nextSibling; if (t !== null) { for (; n && e.some(function(e) { return e === n; });) n = n.nextSibling; var r = i(this.doc, e); t.insertBefore(r, n); } } }, before: { value: function() { var e = Array.prototype.slice.call(arguments), t = this.parentNode, n = this.previousSibling; if (t !== null) { for (; n && e.some(function(e) { return e === n; });) n = n.previousSibling; var r = i(this.doc, e), a = n ? n.nextSibling : t.firstChild; t.insertBefore(r, a); } } }, remove: { value: function() { this.parentNode !== null && (this.doc && (this.doc._preremoveNodeIterators(this), this.rooted && this.doc.mutateRemove(this)), this._remove(), this.parentNode = null); } }, _remove: { value: function() { var e = this.parentNode; e !== null && (e._childNodes ? e._childNodes.splice(this.index, 1) : e._firstChild === this && (this._nextSibling === this ? e._firstChild = null : e._firstChild = this._nextSibling), r.remove(this), e.modify()); } }, replaceWith: { value: function() { var e = Array.prototype.slice.call(arguments), t = this.parentNode, n = this.nextSibling; if (t !== null) { for (; n && e.some(function(e) { return e === n; });) n = n.nextSibling; var r = i(this.doc, e); this.parentNode === t ? t.replaceChild(r, this) : t.insertBefore(r, n); } } } }; })); var x$7 = e$2(((e, t) => { var n = u$8(); t.exports = { nextElementSibling: { get: function() { if (this.parentNode) { for (var e = this.nextSibling; e !== null; e = e.nextSibling) if (e.nodeType === n.ELEMENT_NODE) return e; } return null; } }, previousElementSibling: { get: function() { if (this.parentNode) { for (var e = this.previousSibling; e !== null; e = e.previousSibling) if (e.nodeType === n.ELEMENT_NODE) return e; } return null; } } }; })); var S$8 = e$2(((e, t) => { t.exports = r; var n = o$8(); function r(e) { this.element = e; } Object.defineProperties(r.prototype, { length: { get: n.shouldOverride }, item: { value: n.shouldOverride }, getNamedItem: { value: function(e) { return this.element.getAttributeNode(e); } }, getNamedItemNS: { value: function(e, t) { return this.element.getAttributeNodeNS(e, t); } }, setNamedItem: { value: n.nyi }, setNamedItemNS: { value: n.nyi }, removeNamedItem: { value: function(e) { var t = this.element.getAttributeNode(e); if (t) return this.element.removeAttribute(e), t; n.NotFoundError(); } }, removeNamedItemNS: { value: function(e, t) { var r = this.element.getAttributeNodeNS(e, t); if (r) return this.element.removeAttributeNS(e, t), r; n.NotFoundError(); } } }); })); var C$8 = e$2(((e, t) => { t.exports = O; var n = h$8(), r = o$8(), a = r.NAMESPACE, s = g$7(), c = u$8(), d = p$10(), f = l$6(), C = _$6(), w = i$9(), T = v$7(), E = y$5(), D = m$7(), ee = b$7(), te = x$7(), ne = S$8(), re = Object.create(null); function O(e, t, n, r) { D.call(this), this.nodeType = c.ELEMENT_NODE, this.ownerDocument = e, this.localName = t, this.namespaceURI = n, this.prefix = r, this._tagName = void 0, this._attrsByQName = Object.create(null), this._attrsByLName = Object.create(null), this._attrKeys = []; } function ie(e, t) { if (e.nodeType === c.TEXT_NODE) t.push(e._data); else for (var n = 0, r = e.childNodes.length; n < r; n++) ie(e.childNodes[n], t); } O.prototype = Object.create(D.prototype, { isHTML: { get: function() { return this.namespaceURI === a.HTML && this.ownerDocument.isHTML; } }, tagName: { get: function() { if (this._tagName === void 0) { var e = this.prefix === null ? this.localName : this.prefix + `:` + this.localName; if (this.isHTML) { var t = re[e]; t || (re[e] = t = r.toASCIIUpperCase(e)), e = t; } this._tagName = e; } return this._tagName; } }, nodeName: { get: function() { return this.tagName; } }, nodeValue: { get: function() { return null; }, set: function() {} }, textContent: { get: function() { var e = []; return ie(this, e), e.join(``); }, set: function(e) { this.removeChildren(), e != null && e !== `` && this._appendChild(this.ownerDocument.createTextNode(e)); } }, innerText: { get: function() { var e = []; return ie(this, e), e.join(``).replace(/[ \t\n\f\r]+/g, ` `).trim(); }, set: function(e) { this.removeChildren(), e != null && e !== `` && this._appendChild(this.ownerDocument.createTextNode(e)); } }, innerHTML: { get: function() { return this.serialize(); }, set: r.nyi }, outerHTML: { get: function() { return f.serializeOne(this, { nodeType: 0 }); }, set: function(e) { var t = this.ownerDocument, n = this.parentNode; if (n !== null) { n.nodeType === c.DOCUMENT_NODE && r.NoModificationAllowedError(), n.nodeType === c.DOCUMENT_FRAGMENT_NODE && (n = n.ownerDocument.createElement(`body`)); var i = t.implementation.mozHTMLParser(t._address, n); i.parse(e === null ? `` : String(e), !0), this.replaceWith(i._asDocumentFragment()); } } }, _insertAdjacent: { value: function(e, t) { var n = !1; switch (e) { case `beforebegin`: n = !0; case `afterend`: var i = this.parentNode; return i === null ? null : i.insertBefore(t, n ? this : this.nextSibling); case `afterbegin`: n = !0; case `beforeend`: return this.insertBefore(t, n ? this.firstChild : null); default: return r.SyntaxError(); } } }, insertAdjacentElement: { value: function(e, t) { if (t.nodeType !== c.ELEMENT_NODE) throw TypeError(`not an element`); return e = r.toASCIILowerCase(String(e)), this._insertAdjacent(e, t); } }, insertAdjacentText: { value: function(e, t) { var n = this.ownerDocument.createTextNode(t); e = r.toASCIILowerCase(String(e)), this._insertAdjacent(e, n); } }, insertAdjacentHTML: { value: function(e, t) { e = r.toASCIILowerCase(String(e)), t = String(t); var n; switch (e) { case `beforebegin`: case `afterend`: n = this.parentNode, (n === null || n.nodeType === c.DOCUMENT_NODE) && r.NoModificationAllowedError(); break; case `afterbegin`: case `beforeend`: n = this; break; default: r.SyntaxError(); } (!(n instanceof O) || n.ownerDocument.isHTML && n.localName === `html` && n.namespaceURI === a.HTML) && (n = n.ownerDocument.createElementNS(a.HTML, `body`)); var i = this.ownerDocument.implementation.mozHTMLParser(this.ownerDocument._address, n); i.parse(t, !0), this._insertAdjacent(e, i._asDocumentFragment()); } }, children: { get: function() { return this._children ||= new se(this), this._children; } }, attributes: { get: function() { return this._attributes ||= new oe(this), this._attributes; } }, firstElementChild: { get: function() { for (var e = this.firstChild; e !== null; e = e.nextSibling) if (e.nodeType === c.ELEMENT_NODE) return e; return null; } }, lastElementChild: { get: function() { for (var e = this.lastChild; e !== null; e = e.previousSibling) if (e.nodeType === c.ELEMENT_NODE) return e; return null; } }, childElementCount: { get: function() { return this.children.length; } }, nextElement: { value: function(e) { e ||= this.ownerDocument.documentElement; var t = this.firstElementChild; if (!t) { if (this === e) return null; t = this.nextElementSibling; } if (t) return t; for (var n = this.parentElement; n && n !== e; n = n.parentElement) if (t = n.nextElementSibling, t) return t; return null; } }, getElementsByTagName: { value: function(e) { var t; return e ? (t = e === `*` ? function() { return !0; } : this.isHTML ? le(e) : ce(e), new C(this, t)) : new d(); } }, getElementsByTagNameNS: { value: function(e, t) { var n = e === `*` && t === `*` ? function() { return !0; } : e === `*` ? ce(t) : t === `*` ? k(e) : A(e, t); return new C(this, n); } }, getElementsByClassName: { value: function(e) { return e = String(e).trim(), e === `` ? new d() : (e = e.split(/[ \t\r\n\f]+/), new C(this, j(e))); } }, getElementsByName: { value: function(e) { return new C(this, M(String(e))); } }, clone: { value: function() { for (var e = this.namespaceURI !== a.HTML || this.prefix || !this.ownerDocument.isHTML ? this.ownerDocument.createElementNS(this.namespaceURI, this.prefix === null ? this.localName : this.prefix + `:` + this.localName) : this.ownerDocument.createElement(this.localName), t = 0, n = this._attrKeys.length; t < n; t++) { var r = this._attrKeys[t], i = this._attrsByLName[r].cloneNode(); i._setOwnerElement(e), e._attrsByLName[r] = i, e._addQName(i); } return e._attrKeys = this._attrKeys.concat(), e; } }, isEqual: { value: function(e) { if (this.localName !== e.localName || this.namespaceURI !== e.namespaceURI || this.prefix !== e.prefix || this._numattrs !== e._numattrs) return !1; for (var t = 0, n = this._numattrs; t < n; t++) { var r = this._attr(t); if (!e.hasAttributeNS(r.namespaceURI, r.localName) || e.getAttributeNS(r.namespaceURI, r.localName) !== r.value) return !1; } return !0; } }, _lookupNamespacePrefix: { value: function(e, t) { if (this.namespaceURI && this.namespaceURI === e && this.prefix !== null && t.lookupNamespaceURI(this.prefix) === e) return this.prefix; for (var n = 0, r = this._numattrs; n < r; n++) { var i = this._attr(n); if (i.prefix === `xmlns` && i.value === e && t.lookupNamespaceURI(i.localName) === e) return i.localName; } var a = this.parentElement; return a ? a._lookupNamespacePrefix(e, t) : null; } }, lookupNamespaceURI: { value: function(e) { if ((e === `` || e === void 0) && (e = null), this.namespaceURI !== null && this.prefix === e) return this.namespaceURI; for (var t = 0, n = this._numattrs; t < n; t++) { var r = this._attr(t); if (r.namespaceURI === a.XMLNS && (r.prefix === `xmlns` && r.localName === e || e === null && r.prefix === null && r.localName === `xmlns`)) return r.value || null; } var i = this.parentElement; return i ? i.lookupNamespaceURI(e) : null; } }, getAttribute: { value: function(e) { var t = this.getAttributeNode(e); return t ? t.value : null; } }, getAttributeNS: { value: function(e, t) { var n = this.getAttributeNodeNS(e, t); return n ? n.value : null; } }, getAttributeNode: { value: function(e) { e = String(e), /[A-Z]/.test(e) && this.isHTML && (e = r.toASCIILowerCase(e)); var t = this._attrsByQName[e]; return t ? (Array.isArray(t) && (t = t[0]), t) : null; } }, getAttributeNodeNS: { value: function(e, t) { return e = e == null ? `` : String(e), t = String(t), this._attrsByLName[e + `|` + t] || null; } }, hasAttribute: { value: function(e) { return e = String(e), /[A-Z]/.test(e) && this.isHTML && (e = r.toASCIILowerCase(e)), this._attrsByQName[e] !== void 0; } }, hasAttributeNS: { value: function(e, t) { e = e == null ? `` : String(e), t = String(t); var n = e + `|` + t; return this._attrsByLName[n] !== void 0; } }, hasAttributes: { value: function() { return this._numattrs > 0; } }, toggleAttribute: { value: function(e, t) { return e = String(e), n.isValidName(e) || r.InvalidCharacterError(), /[A-Z]/.test(e) && this.isHTML && (e = r.toASCIILowerCase(e)), this._attrsByQName[e] === void 0 ? t === void 0 || t === !0 ? (this._setAttribute(e, ``), !0) : !1 : t === void 0 || t === !1 ? (this.removeAttribute(e), !1) : !0; } }, _setAttribute: { value: function(e, t) { var n = this._attrsByQName[e], r; n ? Array.isArray(n) && (n = n[0]) : (n = this._newattr(e), r = !0), n.value = t, this._attributes && (this._attributes[e] = n), r && this._newattrhook && this._newattrhook(e, t); } }, setAttribute: { value: function(e, t) { e = String(e), n.isValidName(e) || r.InvalidCharacterError(), /[A-Z]/.test(e) && this.isHTML && (e = r.toASCIILowerCase(e)), this._setAttribute(e, String(t)); } }, _setAttributeNS: { value: function(e, t, n) { var r = t.indexOf(`:`), i, a; r < 0 ? (i = null, a = t) : (i = t.substring(0, r), a = t.substring(r + 1)), (e === `` || e === void 0) && (e = null); var o = (e === null ? `` : e) + `|` + a, s = this._attrsByLName[o], c; s || (s = new ae(this, a, i, e), c = !0, this._attrsByLName[o] = s, this._attributes && (this._attributes[this._attrKeys.length] = s), this._attrKeys.push(o), this._addQName(s)), s.value = n, c && this._newattrhook && this._newattrhook(t, n); } }, setAttributeNS: { value: function(e, t, i) { e = e == null || e === `` ? null : String(e), t = String(t), n.isValidQName(t) || r.InvalidCharacterError(); var o = t.indexOf(`:`), s = o < 0 ? null : t.substring(0, o); (s !== null && e === null || s === `xml` && e !== a.XML || (t === `xmlns` || s === `xmlns`) && e !== a.XMLNS || e === a.XMLNS && !(t === `xmlns` || s === `xmlns`)) && r.NamespaceError(), this._setAttributeNS(e, t, String(i)); } }, setAttributeNode: { value: function(e) { if (e.ownerElement !== null && e.ownerElement !== this) throw new w(w.INUSE_ATTRIBUTE_ERR); var t = null, n = this._attrsByQName[e.name]; if (n) { if (Array.isArray(n) || (n = [n]), n.some(function(t) { return t === e; })) return e; if (e.ownerElement !== null) throw new w(w.INUSE_ATTRIBUTE_ERR); n.forEach(function(e) { this.removeAttributeNode(e); }, this), t = n[0]; } return this.setAttributeNodeNS(e), t; } }, setAttributeNodeNS: { value: function(e) { if (e.ownerElement !== null) throw new w(w.INUSE_ATTRIBUTE_ERR); var t = e.namespaceURI, n = (t === null ? `` : t) + `|` + e.localName, r = this._attrsByLName[n]; return r && this.removeAttributeNode(r), e._setOwnerElement(this), this._attrsByLName[n] = e, this._attributes && (this._attributes[this._attrKeys.length] = e), this._attrKeys.push(n), this._addQName(e), this._newattrhook && this._newattrhook(e.name, e.value), r || null; } }, removeAttribute: { value: function(e) { e = String(e), /[A-Z]/.test(e) && this.isHTML && (e = r.toASCIILowerCase(e)); var t = this._attrsByQName[e]; if (t) { Array.isArray(t) ? t.length > 2 ? t = t.shift() : (this._attrsByQName[e] = t[1], t = t[0]) : this._attrsByQName[e] = void 0; var n = t.namespaceURI, i = (n === null ? `` : n) + `|` + t.localName; this._attrsByLName[i] = void 0; var a = this._attrKeys.indexOf(i); this._attributes && (Array.prototype.splice.call(this._attributes, a, 1), this._attributes[e] = void 0), this._attrKeys.splice(a, 1); var o = t.onchange; t._setOwnerElement(null), o && o.call(t, this, t.localName, t.value, null), this.rooted && this.ownerDocument.mutateRemoveAttr(t); } } }, removeAttributeNS: { value: function(e, t) { e = e == null ? `` : String(e), t = String(t); var n = e + `|` + t, r = this._attrsByLName[n]; if (r) { this._attrsByLName[n] = void 0; var i = this._attrKeys.indexOf(n); this._attributes && Array.prototype.splice.call(this._attributes, i, 1), this._attrKeys.splice(i, 1), this._removeQName(r); var a = r.onchange; r._setOwnerElement(null), a && a.call(r, this, r.localName, r.value, null), this.rooted && this.ownerDocument.mutateRemoveAttr(r); } } }, removeAttributeNode: { value: function(e) { var t = e.namespaceURI, n = (t === null ? `` : t) + `|` + e.localName; return this._attrsByLName[n] !== e && r.NotFoundError(), this.removeAttributeNS(t, e.localName), e; } }, getAttributeNames: { value: function() { var e = this; return this._attrKeys.map(function(t) { return e._attrsByLName[t].name; }); } }, _getattr: { value: function(e) { var t = this._attrsByQName[e]; return t ? t.value : null; } }, _setattr: { value: function(e, t) { var n = this._attrsByQName[e], r; n || (n = this._newattr(e), r = !0), n.value = String(t), this._attributes && (this._attributes[e] = n), r && this._newattrhook && this._newattrhook(e, t); } }, _newattr: { value: function(e) { var t = new ae(this, e, null, null), n = `|` + e; return this._attrsByQName[e] = t, this._attrsByLName[n] = t, this._attributes && (this._attributes[this._attrKeys.length] = t), this._attrKeys.push(n), t; } }, _addQName: { value: function(e) { var t = e.name, n = this._attrsByQName[t]; n ? Array.isArray(n) ? n.push(e) : this._attrsByQName[t] = [n, e] : this._attrsByQName[t] = e, this._attributes && (this._attributes[t] = e); } }, _removeQName: { value: function(e) { var t = e.name, n = this._attrsByQName[t]; if (Array.isArray(n)) { var i = n.indexOf(e); r.assert(i !== -1), n.length === 2 ? (this._attrsByQName[t] = n[1 - i], this._attributes && (this._attributes[t] = this._attrsByQName[t])) : (n.splice(i, 1), this._attributes && this._attributes[t] === e && (this._attributes[t] = n[0])); } else r.assert(n === e), this._attrsByQName[t] = void 0, this._attributes && (this._attributes[t] = void 0); } }, _numattrs: { get: function() { return this._attrKeys.length; } }, _attr: { value: function(e) { return this._attrsByLName[this._attrKeys[e]]; } }, id: s.property({ name: `id` }), className: s.property({ name: `class` }), classList: { get: function() { var e = this; if (this._classList) return this._classList; var t = new T(function() { return e.className || ``; }, function(t) { e.className = t; }); return this._classList = t, t; }, set: function(e) { this.className = e; } }, matches: { value: function(e) { return E.matches(this, e); } }, closest: { value: function(e) { var t = this; do { if (t.matches && t.matches(e)) return t; t = t.parentElement || t.parentNode; } while (t !== null && t.nodeType === c.ELEMENT_NODE); return null; } }, querySelector: { value: function(e) { return E(e, this)[0]; } }, querySelectorAll: { value: function(e) { var t = E(e, this); return t.item ? t : new d(t); } } }), Object.defineProperties(O.prototype, ee), Object.defineProperties(O.prototype, te), s.registerChangeHandler(O, `id`, function(e, t, n, r) { e.rooted && (n && e.ownerDocument.delId(n, e), r && e.ownerDocument.addId(r, e)); }), s.registerChangeHandler(O, `class`, function(e, t, n, r) { e._classList && e._classList._update(); }); function ae(e, t, n, r, i) { this.localName = t, this.prefix = n === null || n === `` ? null : `` + n, this.namespaceURI = r === null || r === `` ? null : `` + r, this.data = i, this._setOwnerElement(e); } ae.prototype = Object.create(Object.prototype, { ownerElement: { get: function() { return this._ownerElement; } }, _setOwnerElement: { value: function(e) { this._ownerElement = e, this.prefix === null && this.namespaceURI === null && e ? this.onchange = e._attributeChangeHandlers[this.localName] : this.onchange = null; } }, name: { get: function() { return this.prefix ? this.prefix + `:` + this.localName : this.localName; } }, specified: { get: function() { return !0; } }, value: { get: function() { return this.data; }, set: function(e) { var t = this.data; e = e === void 0 ? `` : e + ``, e !== t && (this.data = e, this.ownerElement && (this.onchange && this.onchange(this.ownerElement, this.localName, t, e), this.ownerElement.rooted && this.ownerElement.ownerDocument.mutateAttr(this, t))); } }, cloneNode: { value: function(e) { return new ae(null, this.localName, this.prefix, this.namespaceURI, this.data); } }, nodeType: { get: function() { return c.ATTRIBUTE_NODE; } }, nodeName: { get: function() { return this.name; } }, nodeValue: { get: function() { return this.value; }, set: function(e) { this.value = e; } }, textContent: { get: function() { return this.value; }, set: function(e) { e ??= ``, this.value = e; } }, innerText: { get: function() { return this.value; }, set: function(e) { e ??= ``, this.value = e; } } }), O._Attr = ae; function oe(e) { for (var t in ne.call(this, e), e._attrsByQName) this[t] = e._attrsByQName[t]; for (var n = 0; n < e._attrKeys.length; n++) this[n] = e._attrsByLName[e._attrKeys[n]]; } oe.prototype = Object.create(ne.prototype, { length: { get: function() { return this.element._attrKeys.length; }, set: function() {} }, item: { value: function(e) { return e >>>= 0, e >= this.length ? null : this.element._attrsByLName[this.element._attrKeys[e]]; } } }), globalThis.Symbol?.iterator && (oe.prototype[globalThis.Symbol.iterator] = function() { var e = 0, t = this.length, n = this; return { next: function() { return e < t ? { value: n.item(e++) } : { done: !0 }; } }; }); function se(e) { this.element = e, this.updateCache(); } se.prototype = Object.create(Object.prototype, { length: { get: function() { return this.updateCache(), this.childrenByNumber.length; } }, item: { value: function(e) { return this.updateCache(), this.childrenByNumber[e] || null; } }, namedItem: { value: function(e) { return this.updateCache(), this.childrenByName[e] || null; } }, namedItems: { get: function() { return this.updateCache(), this.childrenByName; } }, updateCache: { value: function() { var e = /^(a|applet|area|embed|form|frame|frameset|iframe|img|object)$/; if (this.lastModTime !== this.element.lastModTime) { this.lastModTime = this.element.lastModTime; for (var t = this.childrenByNumber && this.childrenByNumber.length || 0, n = 0; n < t; n++) this[n] = void 0; this.childrenByNumber = [], this.childrenByName = Object.create(null); for (var r = this.element.firstChild; r !== null; r = r.nextSibling) if (r.nodeType === c.ELEMENT_NODE) { this[this.childrenByNumber.length] = r, this.childrenByNumber.push(r); var i = r.getAttribute(`id`); i && !this.childrenByName[i] && (this.childrenByName[i] = r); var o = r.getAttribute(`name`); o && this.element.namespaceURI === a.HTML && e.test(this.element.localName) && !this.childrenByName[o] && (this.childrenByName[i] = r); } } } } }); function ce(e) { return function(t) { return t.localName === e; }; } function le(e) { var t = r.toASCIILowerCase(e); return t === e ? ce(e) : function(n) { return n.isHTML ? n.localName === t : n.localName === e; }; } function k(e) { return function(t) { return t.namespaceURI === e; }; } function A(e, t) { return function(n) { return n.namespaceURI === e && n.localName === t; }; } function j(e) { return function(t) { return e.every(function(e) { return t.classList.contains(e); }); }; } function M(e) { return function(t) { return t.namespaceURI === a.HTML ? t.getAttribute(`name`) === e : !1; }; } })); var w$8 = e$2(((e, t) => { t.exports = c; var n = u$8(), r = p$10(), i = o$8(), a = i.HierarchyRequestError, s = i.NotFoundError; function c() { n.call(this); } c.prototype = Object.create(n.prototype, { hasChildNodes: { value: function() { return !1; } }, firstChild: { value: null }, lastChild: { value: null }, insertBefore: { value: function(e, t) { if (!e.nodeType) throw TypeError(`not a node`); a(); } }, replaceChild: { value: function(e, t) { if (!e.nodeType) throw TypeError(`not a node`); a(); } }, removeChild: { value: function(e) { if (!e.nodeType) throw TypeError(`not a node`); s(); } }, removeChildren: { value: function() {} }, childNodes: { get: function() { return this._childNodes ||= new r(), this._childNodes; } } }); })); var T$8 = e$2(((e, t) => { t.exports = s; var n = w$8(), r = o$8(), i = b$7(), a = x$7(); function s() { n.call(this); } s.prototype = Object.create(n.prototype, { substringData: { value: function(e, t) { if (arguments.length < 2) throw TypeError(`Not enough arguments`); return e >>>= 0, t >>>= 0, (e > this.data.length || e < 0 || t < 0) && r.IndexSizeError(), this.data.substring(e, e + t); } }, appendData: { value: function(e) { if (arguments.length < 1) throw TypeError(`Not enough arguments`); this.data += String(e); } }, insertData: { value: function(e, t) { return this.replaceData(e, 0, t); } }, deleteData: { value: function(e, t) { return this.replaceData(e, t, ``); } }, replaceData: { value: function(e, t, n) { var i = this.data, a = i.length; e >>>= 0, t >>>= 0, n = String(n), (e > a || e < 0) && r.IndexSizeError(), e + t > a && (t = a - e); var o = i.substring(0, e), s = i.substring(e + t); this.data = o + n + s; } }, isEqual: { value: function(e) { return this._data === e._data; } }, length: { get: function() { return this.data.length; } } }), Object.defineProperties(s.prototype, i), Object.defineProperties(s.prototype, a); })); var E$8 = e$2(((e, t) => { t.exports = a; var n = o$8(), r = u$8(), i = T$8(); function a(e, t) { i.call(this), this.nodeType = r.TEXT_NODE, this.ownerDocument = e, this._data = t, this._index = void 0; } var s = { get: function() { return this._data; }, set: function(e) { e = e == null ? `` : String(e), e !== this._data && (this._data = e, this.rooted && this.ownerDocument.mutateValue(this), this.parentNode && this.parentNode._textchangehook && this.parentNode._textchangehook(this)); } }; a.prototype = Object.create(i.prototype, { nodeName: { value: `#text` }, nodeValue: s, textContent: s, innerText: s, data: { get: s.get, set: function(e) { s.set.call(this, e === null ? `` : String(e)); } }, splitText: { value: function(e) { (e > this._data.length || e < 0) && n.IndexSizeError(); var t = this._data.substring(e), r = this.ownerDocument.createTextNode(t); this.data = this.data.substring(0, e); var i = this.parentNode; return i !== null && i.insertBefore(r, this.nextSibling), r; } }, wholeText: { get: function() { for (var e = this.textContent, t = this.nextSibling; t && t.nodeType === r.TEXT_NODE; t = t.nextSibling) e += t.textContent; return e; } }, replaceWholeText: { value: n.nyi }, clone: { value: function() { return new a(this.ownerDocument, this._data); } } }); })); var D$7 = e$2(((e, t) => { t.exports = i; var n = u$8(), r = T$8(); function i(e, t) { r.call(this), this.nodeType = n.COMMENT_NODE, this.ownerDocument = e, this._data = t; } var a = { get: function() { return this._data; }, set: function(e) { e = e == null ? `` : String(e), this._data = e, this.rooted && this.ownerDocument.mutateValue(this); } }; i.prototype = Object.create(r.prototype, { nodeName: { value: `#comment` }, nodeValue: a, textContent: a, innerText: a, data: { get: a.get, set: function(e) { a.set.call(this, e === null ? `` : String(e)); } }, clone: { value: function() { return new i(this.ownerDocument, this._data); } } }); })); var ee$5 = e$2(((e, t) => { t.exports = l; var n = u$8(), r = p$10(), i = m$7(), a = C$8(), s = y$5(), c = o$8(); function l(e) { i.call(this), this.nodeType = n.DOCUMENT_FRAGMENT_NODE, this.ownerDocument = e; } l.prototype = Object.create(i.prototype, { nodeName: { value: `#document-fragment` }, nodeValue: { get: function() { return null; }, set: function() {} }, textContent: Object.getOwnPropertyDescriptor(a.prototype, `textContent`), innerText: Object.getOwnPropertyDescriptor(a.prototype, `innerText`), querySelector: { value: function(e) { var t = this.querySelectorAll(e); return t.length ? t[0] : null; } }, querySelectorAll: { value: function(e) { var t = Object.create(this); t.isHTML = !0, t.getElementsByTagName = a.prototype.getElementsByTagName, t.nextElement = Object.getOwnPropertyDescriptor(a.prototype, `firstElementChild`).get; var n = s(e, t); return n.item ? n : new r(n); } }, clone: { value: function() { return new l(this.ownerDocument); } }, isEqual: { value: function(e) { return !0; } }, innerHTML: { get: function() { return this.serialize(); }, set: c.nyi }, outerHTML: { get: function() { return this.serialize(); }, set: c.nyi } }); })); var te$5 = e$2(((e, t) => { t.exports = i; var n = u$8(), r = T$8(); function i(e, t, i) { r.call(this), this.nodeType = n.PROCESSING_INSTRUCTION_NODE, this.ownerDocument = e, this.target = t, this._data = i; } var a = { get: function() { return this._data; }, set: function(e) { e = e == null ? `` : String(e), this._data = e, this.rooted && this.ownerDocument.mutateValue(this); } }; i.prototype = Object.create(r.prototype, { nodeName: { get: function() { return this.target; } }, nodeValue: a, textContent: a, innerText: a, data: { get: a.get, set: function(e) { a.set.call(this, e === null ? `` : String(e)); } }, clone: { value: function() { return new i(this.ownerDocument, this.target, this._data); } }, isEqual: { value: function(e) { return this.target === e.target && this._data === e._data; } } }); })); var ne$5 = e$2(((e, t) => { var n = { FILTER_ACCEPT: 1, FILTER_REJECT: 2, FILTER_SKIP: 3, SHOW_ALL: 4294967295, SHOW_ELEMENT: 1, SHOW_ATTRIBUTE: 2, SHOW_TEXT: 4, SHOW_CDATA_SECTION: 8, SHOW_ENTITY_REFERENCE: 16, SHOW_ENTITY: 32, SHOW_PROCESSING_INSTRUCTION: 64, SHOW_COMMENT: 128, SHOW_DOCUMENT: 256, SHOW_DOCUMENT_TYPE: 512, SHOW_DOCUMENT_FRAGMENT: 1024, SHOW_NOTATION: 2048 }; t.exports = n.constructor = n.prototype = n; })); var re$5 = e$2(((e, t) => { t.exports = { nextSkippingChildren: n, nextAncestorSibling: r, next: i, previous: o, deepLastChild: a }; function n(e, t) { return e === t ? null : e.nextSibling === null ? r(e, t) : e.nextSibling; } function r(e, t) { for (e = e.parentNode; e !== null; e = e.parentNode) { if (e === t) return null; if (e.nextSibling !== null) return e.nextSibling; } return null; } function i(e, t) { var n = e.firstChild; return n === null ? e === t ? null : (n = e.nextSibling, n === null ? r(e, t) : n) : n; } function a(e) { for (; e.lastChild;) e = e.lastChild; return e; } function o(e, t) { var n = e.previousSibling; return n === null ? (n = e.parentNode, n === t ? null : n) : a(n); } })); var O$6 = e$2(((e, t) => { t.exports = f; var n = u$8(), r = ne$5(), i = re$5(), a = o$8(), s = { first: `firstChild`, last: `lastChild`, next: `firstChild`, previous: `lastChild` }, c = { first: `nextSibling`, last: `previousSibling`, next: `nextSibling`, previous: `previousSibling` }; function l(e, t) { for (var n, i = e._currentNode[s[t]], a, o, l; i !== null;) { if (o = e._internalFilter(i), o === r.FILTER_ACCEPT) return e._currentNode = i, i; if (o === r.FILTER_SKIP && (n = i[s[t]], n !== null)) { i = n; continue; } for (; i !== null;) { if (l = i[c[t]], l !== null) { i = l; break; } if (a = i.parentNode, a === null || a === e.root || a === e._currentNode) return null; i = a; } } return null; } function d(e, t) { var n = e._currentNode, i, a; if (n === e.root) return null; for (;;) { for (a = n[c[t]]; a !== null;) { if (n = a, i = e._internalFilter(n), i === r.FILTER_ACCEPT) return e._currentNode = n, n; a = n[s[t]], (i === r.FILTER_REJECT || a === null) && (a = n[c[t]]); } if (n = n.parentNode, n === null || n === e.root || e._internalFilter(n) === r.FILTER_ACCEPT) return null; } } function f(e, t, n) { (!e || !e.nodeType) && a.NotSupportedError(), this._root = e, this._whatToShow = Number(t) || 0, this._filter = n || null, this._active = !1, this._currentNode = e; } Object.defineProperties(f.prototype, { root: { get: function() { return this._root; } }, whatToShow: { get: function() { return this._whatToShow; } }, filter: { get: function() { return this._filter; } }, currentNode: { get: function() { return this._currentNode; }, set: function(e) { if (!(e instanceof n)) throw TypeError(`Not a Node`); this._currentNode = e; } }, _internalFilter: { value: function(e) { var t, n; if (this._active && a.InvalidStateError(), !(1 << e.nodeType - 1 & this._whatToShow)) return r.FILTER_SKIP; if (n = this._filter, n === null) t = r.FILTER_ACCEPT; else { this._active = !0; try { t = typeof n == `function` ? n(e) : n.acceptNode(e); } finally { this._active = !1; } } return +t; } }, parentNode: { value: function() { for (var e = this._currentNode; e !== this.root;) { if (e = e.parentNode, e === null) return null; if (this._internalFilter(e) === r.FILTER_ACCEPT) return this._currentNode = e, e; } return null; } }, firstChild: { value: function() { return l(this, `first`); } }, lastChild: { value: function() { return l(this, `last`); } }, previousSibling: { value: function() { return d(this, `previous`); } }, nextSibling: { value: function() { return d(this, `next`); } }, previousNode: { value: function() { for (var e = this._currentNode, t, n, i; e !== this._root;) { for (n = e.previousSibling; n; n = e.previousSibling) if (e = n, t = this._internalFilter(e), t !== r.FILTER_REJECT) { for (i = e.lastChild; i && (e = i, t = this._internalFilter(e), t !== r.FILTER_REJECT); i = e.lastChild); if (t === r.FILTER_ACCEPT) return this._currentNode = e, e; } if (e === this.root || e.parentNode === null) return null; if (e = e.parentNode, this._internalFilter(e) === r.FILTER_ACCEPT) return this._currentNode = e, e; } return null; } }, nextNode: { value: function() { var e = this._currentNode, t = r.FILTER_ACCEPT, n, a; CHILDREN: for (;;) { for (n = e.firstChild; n; n = e.firstChild) { if (e = n, t = this._internalFilter(e), t === r.FILTER_ACCEPT) return this._currentNode = e, e; if (t === r.FILTER_REJECT) break; } for (a = i.nextSkippingChildren(e, this.root); a; a = i.nextSkippingChildren(e, this.root)) { if (e = a, t = this._internalFilter(e), t === r.FILTER_ACCEPT) return this._currentNode = e, e; if (t === r.FILTER_SKIP) continue CHILDREN; } return null; } } }, toString: { value: function() { return `[object TreeWalker]`; } } }); })); var ie$5 = e$2(((e, t) => { t.exports = l; var n = ne$5(), r = re$5(), i = o$8(); function a(e, t, n) { return n ? r.next(e, t) : e === t ? null : r.previous(e, null); } function s(e, t) { for (; t; t = t.parentNode) if (e === t) return !0; return !1; } function c(e, t) { for (var r = e._referenceNode, i = e._pointerBeforeReferenceNode;;) { if (i === t) i = !i; else if (r = a(r, e._root, t), r === null) return null; if (e._internalFilter(r) === n.FILTER_ACCEPT) break; } return e._referenceNode = r, e._pointerBeforeReferenceNode = i, r; } function l(e, t, n) { (!e || !e.nodeType) && i.NotSupportedError(), this._root = e, this._referenceNode = e, this._pointerBeforeReferenceNode = !0, this._whatToShow = Number(t) || 0, this._filter = n || null, this._active = !1, e.doc._attachNodeIterator(this); } Object.defineProperties(l.prototype, { root: { get: function() { return this._root; } }, referenceNode: { get: function() { return this._referenceNode; } }, pointerBeforeReferenceNode: { get: function() { return this._pointerBeforeReferenceNode; } }, whatToShow: { get: function() { return this._whatToShow; } }, filter: { get: function() { return this._filter; } }, _internalFilter: { value: function(e) { var t, r; if (this._active && i.InvalidStateError(), !(1 << e.nodeType - 1 & this._whatToShow)) return n.FILTER_SKIP; if (r = this._filter, r === null) t = n.FILTER_ACCEPT; else { this._active = !0; try { t = typeof r == `function` ? r(e) : r.acceptNode(e); } finally { this._active = !1; } } return +t; } }, _preremove: { value: function(e) { if (!s(e, this._root) && s(e, this._referenceNode)) { if (this._pointerBeforeReferenceNode) { for (var t = e; t.lastChild;) t = t.lastChild; if (t = r.next(t, this.root), t) { this._referenceNode = t; return; } this._pointerBeforeReferenceNode = !1; } if (e.previousSibling === null) this._referenceNode = e.parentNode; else { this._referenceNode = e.previousSibling; var n; for (n = this._referenceNode.lastChild; n; n = this._referenceNode.lastChild) this._referenceNode = n; } } } }, nextNode: { value: function() { return c(this, !0); } }, previousNode: { value: function() { return c(this, !1); } }, detach: { value: function() {} }, toString: { value: function() { return `[object NodeIterator]`; } } }); })); var ae$6 = e$2(((e, t) => { t.exports = n; function n(e) { if (!e) return Object.create(n.prototype); this.url = e.replace(/^[ \t\n\r\f]+|[ \t\n\r\f]+$/g, ``); var t = n.pattern.exec(this.url); if (t) { if (t[2] && (this.scheme = t[2]), t[4]) { var r = t[4].match(n.userinfoPattern); if (r && (this.username = r[1], this.password = r[3], t[4] = t[4].substring(r[0].length)), t[4].match(n.portPattern)) { var i = t[4].lastIndexOf(`:`); this.host = t[4].substring(0, i), this.port = t[4].substring(i + 1); } else this.host = t[4]; } t[5] && (this.path = t[5]), t[6] && (this.query = t[7]), t[8] && (this.fragment = t[9]); } } n.pattern = /^(([^:\/?#]+):)?(\/\/([^\/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/, n.userinfoPattern = /^([^@:]*)(:([^@]*))?@/, n.portPattern = /:\d+$/, n.authorityPattern = /^[^:\/?#]+:\/\//, n.hierarchyPattern = /^[^:\/?#]+:\//, n.percentEncode = function(e) { var t = e.charCodeAt(0); if (t < 256) return `%` + t.toString(16); throw Error(`can't percent-encode codepoints > 255 yet`); }, n.prototype = { constructor: n, isAbsolute: function() { return !!this.scheme; }, isAuthorityBased: function() { return n.authorityPattern.test(this.url); }, isHierarchical: function() { return n.hierarchyPattern.test(this.url); }, toString: function() { var e = ``; return this.scheme !== void 0 && (e += this.scheme + `:`), this.isAbsolute() && (e += `//`, (this.username || this.password) && (e += this.username || ``, this.password && (e += `:` + this.password), e += `@`), this.host && (e += this.host)), this.port !== void 0 && (e += `:` + this.port), this.path !== void 0 && (e += this.path), this.query !== void 0 && (e += `?` + this.query), this.fragment !== void 0 && (e += `#` + this.fragment), e; }, resolve: function(e) { var t = this, r = new n(e), i = new n(); return r.scheme === void 0 ? (i.scheme = t.scheme, r.host === void 0 ? (i.username = t.username, i.password = t.password, i.host = t.host, i.port = t.port, r.path ? (r.path.charAt(0) === `/` ? i.path = o(r.path) : (i.path = a(t.path, r.path), i.path = o(i.path)), i.query = r.query) : (i.path = t.path, r.query === void 0 ? i.query = t.query : i.query = r.query)) : (i.username = r.username, i.password = r.password, i.host = r.host, i.port = r.port, i.path = o(r.path), i.query = r.query)) : (i.scheme = r.scheme, i.username = r.username, i.password = r.password, i.host = r.host, i.port = r.port, i.path = o(r.path), i.query = r.query), i.fragment = r.fragment, i.toString(); function a(e, n) { if (t.host !== void 0 && !t.path) return `/` + n; var r = e.lastIndexOf(`/`); return r === -1 ? n : e.substring(0, r + 1) + n; } function o(e) { if (!e) return e; for (var t = ``; e.length > 0;) { if (e === `.` || e === `..`) { e = ``; break; } var n = e.substring(0, 2), r = e.substring(0, 3), i = e.substring(0, 4); if (r === `../`) e = e.substring(3); else if (n === `./`) e = e.substring(2); else if (r === `/./`) e = `/` + e.substring(3); else if (n === `/.` && e.length === 2) e = `/`; else if (i === `/../` || r === `/..` && e.length === 3) e = `/` + e.substring(4), t = t.replace(/\/?[^\/]*$/, ``); else { var a = e.match(/(\/?([^\/]*))/)[0]; t += a, e = e.substring(a.length); } } return t; } } }; })); var oe$6 = e$2(((e, n) => { n.exports = i; var r = t$7(); function i(e, t) { r.call(this, e, t); } i.prototype = Object.create(r.prototype, { constructor: { value: i } }); })); var se$7 = e$2(((e, i) => { i.exports = { Event: t$7(), UIEvent: n$8(), MouseEvent: r$11(), CustomEvent: oe$6() }; })); var ce$7 = e$2(((e) => { Object.defineProperty(e, "__esModule", { value: !0 }), e.hyphenate = e.parse = void 0; function t(e) { let t = [], r = 0, i = 0, a = 0, o = 0, s = 0, c = null; for (; r < e.length;) switch (e.charCodeAt(r++)) { case 40: i++; break; case 41: i--; break; case 39: a === 0 ? a = 39 : a === 39 && e.charCodeAt(r - 1) !== 92 && (a = 0); break; case 34: a === 0 ? a = 34 : a === 34 && e.charCodeAt(r - 1) !== 92 && (a = 0); break; case 58: !c && i === 0 && a === 0 && (c = n(e.substring(s, r - 1).trim()), o = r); break; case 59: if (c && o > 0 && i === 0 && a === 0) { let n = e.substring(o, r - 1).trim(); t.push(c, n), s = r, o = 0, c = null; } break; } if (c && o) { let n = e.slice(o).trim(); t.push(c, n); } return t; } e.parse = t; function n(e) { return e.replace(/[a-z][A-Z]/g, (e) => e.charAt(0) + `-` + e.charAt(1)).toLowerCase(); } e.hyphenate = n; })); var le$7 = e$2(((e, t) => { let { parse: n } = ce$7(); t.exports = function(e) { let t = new i(e); return new Proxy(t, { get: function(e, t) { return t in e ? e[t] : e.getPropertyValue(r(t)); }, has: function(e, t) { return !0; }, set: function(e, t, n) { return t in e ? e[t] = n : e.setProperty(r(t), n ?? void 0), !0; } }); }; function r(e) { return e.replace(/([a-z])([A-Z])/g, `$1-$2`).toLowerCase(); } function i(e) { this._element = e; } function a(e) { let t = { property: {}, priority: {} }; if (!e) return t; let r = n(e); if (r.length < 2) return t; for (let e = 0; e < r.length; e += 2) { let n = r[e], i = r[e + 1]; i.endsWith(`!important`) && (t.priority[n] = `important`, i = i.slice(0, -10).trim()), t.property[n] = i; } return t; } var o = {}; i.prototype = Object.create(Object.prototype, { _parsed: { get: function() { if (!this._parsedStyles || this.cssText !== this._lastParsedText) { var e = this.cssText; this._parsedStyles = a(e), this._lastParsedText = e, delete this._names; } return this._parsedStyles; } }, _serialize: { value: function() { var e = this._parsed, t = ``; for (var n in e.property) t && (t += ` `), t += n + `: ` + e.property[n], e.priority[n] && (t += ` !` + e.priority[n]), t += `;`; this.cssText = t, this._lastParsedText = t, delete this._names; } }, cssText: { get: function() { return this._element.getAttribute(`style`); }, set: function(e) { this._element.setAttribute(`style`, e); } }, length: { get: function() { return this._names ||= Object.getOwnPropertyNames(this._parsed.property), this._names.length; } }, item: { value: function(e) { return this._names ||= Object.getOwnPropertyNames(this._parsed.property), this._names[e]; } }, getPropertyValue: { value: function(e) { return e = e.toLowerCase(), this._parsed.property[e] || ``; } }, getPropertyPriority: { value: function(e) { return e = e.toLowerCase(), this._parsed.priority[e] || ``; } }, setProperty: { value: function(e, t, n) { if (e = e.toLowerCase(), t ??= ``, n ??= ``, t !== o && (t = `` + t), t = t.trim(), t === ``) { this.removeProperty(e); return; } if (!(n !== `` && n !== o && !/^important$/i.test(n))) { var r = this._parsed; if (t === o) { if (!r.property[e]) return; n === `` ? delete r.priority[e] : r.priority[e] = `important`; } else { if (t.indexOf(`;`) !== -1) return; var i = a(e + `:` + t); if (Object.getOwnPropertyNames(i.property).length === 0 || Object.getOwnPropertyNames(i.priority).length !== 0) return; for (var s in i.property) r.property[s] = i.property[s], n !== o && (n === `` ? r.priority[s] && delete r.priority[s] : r.priority[s] = `important`); } this._serialize(); } } }, setPropertyValue: { value: function(e, t) { return this.setProperty(e, t, o); } }, setPropertyPriority: { value: function(e, t) { return this.setProperty(e, o, t); } }, removeProperty: { value: function(e) { e = e.toLowerCase(); var t = this._parsed; e in t.property && (delete t.property[e], delete t.priority[e], this._serialize()); } } }); })); var k$8 = e$2(((e, t) => { var n = ae$6(); t.exports = r; function r() {} r.prototype = Object.create(Object.prototype, { _url: { get: function() { return new n(this.href); } }, protocol: { get: function() { var e = this._url; return e && e.scheme ? e.scheme + `:` : `:`; }, set: function(e) { var t = this.href, r = new n(t); r.isAbsolute() && (e = e.replace(/:+$/, ``), e = e.replace(/[^-+\.a-zA-Z0-9]/g, n.percentEncode), e.length > 0 && (r.scheme = e, t = r.toString())), this.href = t; } }, host: { get: function() { var e = this._url; return e.isAbsolute() && e.isAuthorityBased() ? e.host + (e.port ? `:` + e.port : ``) : ``; }, set: function(e) { var t = this.href, r = new n(t); r.isAbsolute() && r.isAuthorityBased() && (e = e.replace(/[^-+\._~!$&'()*,;:=a-zA-Z0-9]/g, n.percentEncode), e.length > 0 && (r.host = e, delete r.port, t = r.toString())), this.href = t; } }, hostname: { get: function() { var e = this._url; return e.isAbsolute() && e.isAuthorityBased() ? e.host : ``; }, set: function(e) { var t = this.href, r = new n(t); r.isAbsolute() && r.isAuthorityBased() && (e = e.replace(/^\/+/, ``), e = e.replace(/[^-+\._~!$&'()*,;:=a-zA-Z0-9]/g, n.percentEncode), e.length > 0 && (r.host = e, t = r.toString())), this.href = t; } }, port: { get: function() { var e = this._url; return e.isAbsolute() && e.isAuthorityBased() && e.port !== void 0 ? e.port : ``; }, set: function(e) { var t = this.href, r = new n(t); r.isAbsolute() && r.isAuthorityBased() && (e = `` + e, e = e.replace(/[^0-9].*$/, ``), e = e.replace(/^0+/, ``), e.length === 0 && (e = `0`), parseInt(e, 10) <= 65535 && (r.port = e, t = r.toString())), this.href = t; } }, pathname: { get: function() { var e = this._url; return e.isAbsolute() && e.isHierarchical() ? e.path : ``; }, set: function(e) { var t = this.href, r = new n(t); r.isAbsolute() && r.isHierarchical() && (e.charAt(0) !== `/` && (e = `/` + e), e = e.replace(/[^-+\._~!$&'()*,;:=@\/a-zA-Z0-9]/g, n.percentEncode), r.path = e, t = r.toString()), this.href = t; } }, search: { get: function() { var e = this._url; return e.isAbsolute() && e.isHierarchical() && e.query !== void 0 ? `?` + e.query : ``; }, set: function(e) { var t = this.href, r = new n(t); r.isAbsolute() && r.isHierarchical() && (e.charAt(0) === `?` && (e = e.substring(1)), e = e.replace(/[^-+\._~!$&'()*,;:=@\/?a-zA-Z0-9]/g, n.percentEncode), r.query = e, t = r.toString()), this.href = t; } }, hash: { get: function() { var e = this._url; return e == null || e.fragment == null || e.fragment === `` ? `` : `#` + e.fragment; }, set: function(e) { var t = this.href, r = new n(t); e.charAt(0) === `#` && (e = e.substring(1)), e = e.replace(/[^-+\._~!$&'()*,;:=@\/?a-zA-Z0-9]/g, n.percentEncode), r.fragment = e, t = r.toString(), this.href = t; } }, username: { get: function() { return this._url.username || ``; }, set: function(e) { var t = this.href, r = new n(t); r.isAbsolute() && (e = e.replace(/[\x00-\x1F\x7F-\uFFFF "#<>?`\/@\\:]/g, n.percentEncode), r.username = e, t = r.toString()), this.href = t; } }, password: { get: function() { return this._url.password || ``; }, set: function(e) { var t = this.href, r = new n(t); r.isAbsolute() && (e === `` ? r.password = null : (e = e.replace(/[\x00-\x1F\x7F-\uFFFF "#<>?`\/@\\]/g, n.percentEncode), r.password = e), t = r.toString()), this.href = t; } }, origin: { get: function() { var e = this._url; if (e == null) return ``; var t = function(t) { var n = [ e.scheme, e.host, +e.port || t ]; return n[0] + `://` + n[1] + (n[2] === t ? `` : `:` + n[2]); }; switch (e.scheme) { case `ftp`: return t(21); case `gopher`: return t(70); case `http`: case `ws`: return t(80); case `https`: case `wss`: return t(443); default: return e.scheme + `://`; } } } }), r._inherit = function(e) { Object.getOwnPropertyNames(r.prototype).forEach(function(t) { if (!(t === `constructor` || t === `href`)) { var n = Object.getOwnPropertyDescriptor(r.prototype, t); Object.defineProperty(e, t, n); } }); }; })); var A$7 = e$2(((e, t) => { var n = g$7(), r = a$8().isApiWritable; t.exports = function(e, t, i, a) { var o = e.ctor; if (o) { var c = e.props || {}; if (e.attributes) for (var l in e.attributes) { var u = e.attributes[l]; (typeof u != `object` || Array.isArray(u)) && (u = { type: u }), u.name ||= l.toLowerCase(), c[l] = n.property(u); } c.constructor = { value: o, writable: r }, o.prototype = Object.create((e.superclass || t).prototype, c), e.events && s(o, e.events), i[e.name] = o; } else o = t; return (e.tags || e.tag && [e.tag] || []).forEach(function(e) { a[e] = o; }), o; }; function i(e, t, n, r) { this.body = e, this.document = t, this.form = n, this.element = r; } i.prototype.build = function() { return () => {}; }; function o(e, t, n, r) { e[t] = new i(r, e.ownerDocument || Object.create(null), e.form || Object.create(null), e).build(); } function s(e, t) { var r = e.prototype; t.forEach(function(t) { Object.defineProperty(r, `on` + t, { get: function() { return this._getEventHandler(t); }, set: function(e) { this._setEventHandler(t, e); } }), n.registerChangeHandler(e, `on` + t, o); }); } })); var j$6 = e$2(((e) => { var t = u$8(), n = C$8(), r = le$7(), i = o$8(), a = k$8(), s = A$7(), c = e.elements = {}, l = Object.create(null); e.createElement = function(e, t, n) { return new (l[t] || v)(e, t, n); }; function d(e) { return s(e, _, c, l); } function f(e) { return { get: function() { var t = this._getattr(e); if (t === null) return ``; var n = this.doc._resolve(t); return n === null ? t : n; }, set: function(t) { this._setattr(e, t); } }; } function p(e) { return { get: function() { var t = this._getattr(e); return t === null ? null : t.toLowerCase() === `use-credentials` ? `use-credentials` : `anonymous`; }, set: function(t) { t == null ? this.removeAttribute(e) : this._setattr(e, t); } }; } let m = { type: [ ``, `no-referrer`, `no-referrer-when-downgrade`, `same-origin`, `origin`, `strict-origin`, `origin-when-cross-origin`, `strict-origin-when-cross-origin`, `unsafe-url` ], missing: `` }; var h = { A: !0, LINK: !0, BUTTON: !0, INPUT: !0, SELECT: !0, TEXTAREA: !0, COMMAND: !0 }, g = function(e, t, n) { _.call(this, e, t, n), this._form = null; }, _ = e.HTMLElement = d({ superclass: n, name: `HTMLElement`, ctor: function(e, t, r) { n.call(this, e, t, i.NAMESPACE.HTML, r); }, props: { dangerouslySetInnerHTML: { set: function(e) { this._innerHTML = e; } }, innerHTML: { get: function() { return this.serialize(); }, set: function(e) { var t = this.ownerDocument.implementation.mozHTMLParser(this.ownerDocument._address, this); t.parse(e === null ? `` : String(e), !0); for (var n = this instanceof l.template ? this.content : this; n.hasChildNodes();) n.removeChild(n.firstChild); n.appendChild(t._asDocumentFragment()); } }, style: { get: function() { return this._style ||= new r(this), this._style; }, set: function(e) { e ??= ``, this._setattr(`style`, String(e)); } }, blur: { value: function() {} }, focus: { value: function() {} }, forceSpellCheck: { value: function() {} }, click: { value: function() { if (!this._click_in_progress) { this._click_in_progress = !0; try { this._pre_click_activation_steps && this._pre_click_activation_steps(); var e = this.ownerDocument.createEvent(`MouseEvent`); e.initMouseEvent(`click`, !0, !0, this.ownerDocument.defaultView, 1, 0, 0, 0, 0, !1, !1, !1, !1, 0, null), this.dispatchEvent(e) ? this._post_click_activation_steps && this._post_click_activation_steps(e) : this._cancelled_activation_steps && this._cancelled_activation_steps(); } finally { this._click_in_progress = !1; } } } }, submit: { value: i.nyi } }, attributes: { title: String, lang: String, dir: { type: [ `ltr`, `rtl`, `auto` ], missing: `` }, draggable: { type: [`true`, `false`], treatNullAsEmptyString: !0 }, spellcheck: { type: [`true`, `false`], missing: `` }, enterKeyHint: { type: [ `enter`, `done`, `go`, `next`, `previous`, `search`, `send` ], missing: `` }, autoCapitalize: { type: [ `off`, `on`, `none`, `sentences`, `words`, `characters` ], missing: `` }, autoFocus: Boolean, accessKey: String, nonce: String, hidden: Boolean, translate: { type: [`no`, `yes`], missing: `` }, tabIndex: { type: `long`, default: function() { return this.tagName in h || this.contentEditable ? 0 : -1; } } }, events: `abort.canplay.canplaythrough.change.click.contextmenu.cuechange.dblclick.drag.dragend.dragenter.dragleave.dragover.dragstart.drop.durationchange.emptied.ended.input.invalid.keydown.keypress.keyup.loadeddata.loadedmetadata.loadstart.mousedown.mousemove.mouseout.mouseover.mouseup.mousewheel.pause.play.playing.progress.ratechange.readystatechange.reset.seeked.seeking.select.show.stalled.submit.suspend.timeupdate.volumechange.waiting.blur.error.focus.load.scroll`.split(`.`) }), v = d({ name: `HTMLUnknownElement`, ctor: function(e, t, n) { _.call(this, e, t, n); } }), y = { form: { get: function() { return this._form; } } }; d({ tag: `a`, name: `HTMLAnchorElement`, ctor: function(e, t, n) { _.call(this, e, t, n); }, props: { _post_click_activation_steps: { value: function(e) { this.href && (this.ownerDocument.defaultView.location = this.href); } } }, attributes: { href: f, ping: String, download: String, target: String, rel: String, media: String, hreflang: String, type: String, referrerPolicy: m, coords: String, charset: String, name: String, rev: String, shape: String } }), a._inherit(l.a.prototype), d({ tag: `area`, name: `HTMLAreaElement`, ctor: function(e, t, n) { _.call(this, e, t, n); }, attributes: { alt: String, target: String, download: String, rel: String, media: String, href: f, hreflang: String, type: String, shape: String, coords: String, ping: String, referrerPolicy: m, noHref: Boolean } }), a._inherit(l.area.prototype), d({ tag: `br`, name: `HTMLBRElement`, ctor: function(e, t, n) { _.call(this, e, t, n); }, attributes: { clear: String } }), d({ tag: `base`, name: `HTMLBaseElement`, ctor: function(e, t, n) { _.call(this, e, t, n); }, attributes: { target: String } }), d({ tag: `body`, name: `HTMLBodyElement`, ctor: function(e, t, n) { _.call(this, e, t, n); }, events: [ `afterprint`, `beforeprint`, `beforeunload`, `blur`, `error`, `focus`, `hashchange`, `load`, `message`, `offline`, `online`, `pagehide`, `pageshow`, `popstate`, `resize`, `scroll`, `storage`, `unload` ], attributes: { text: { type: String, treatNullAsEmptyString: !0 }, link: { type: String, treatNullAsEmptyString: !0 }, vLink: { type: String, treatNullAsEmptyString: !0 }, aLink: { type: String, treatNullAsEmptyString: !0 }, bgColor: { type: String, treatNullAsEmptyString: !0 }, background: String } }), d({ tag: `button`, name: `HTMLButtonElement`, ctor: function(e, t, n) { g.call(this, e, t, n); }, props: y, attributes: { name: String, value: String, disabled: Boolean, autofocus: Boolean, type: { type: [ `submit`, `reset`, `button`, `menu` ], missing: `submit` }, formTarget: String, formAction: f, formNoValidate: Boolean, formMethod: { type: [ `get`, `post`, `dialog` ], invalid: `get`, missing: `` }, formEnctype: { type: [ `application/x-www-form-urlencoded`, `multipart/form-data`, `text/plain` ], invalid: `application/x-www-form-urlencoded`, missing: `` } } }), d({ tag: `dl`, name: `HTMLDListElement`, ctor: function(e, t, n) { _.call(this, e, t, n); }, attributes: { compact: Boolean } }), d({ tag: `data`, name: `HTMLDataElement`, ctor: function(e, t, n) { _.call(this, e, t, n); }, attributes: { value: String } }), d({ tag: `datalist`, name: `HTMLDataListElement`, ctor: function(e, t, n) { _.call(this, e, t, n); } }), d({ tag: `details`, name: `HTMLDetailsElement`, ctor: function(e, t, n) { _.call(this, e, t, n); }, attributes: { open: Boolean } }), d({ tag: `div`, name: `HTMLDivElement`, ctor: function(e, t, n) { _.call(this, e, t, n); }, attributes: { align: String } }), d({ tag: `embed`, name: `HTMLEmbedElement`, ctor: function(e, t, n) { _.call(this, e, t, n); }, attributes: { src: f, type: String, width: String, height: String, align: String, name: String } }), d({ tag: `fieldset`, name: `HTMLFieldSetElement`, ctor: function(e, t, n) { g.call(this, e, t, n); }, props: y, attributes: { disabled: Boolean, name: String } }), d({ tag: `form`, name: `HTMLFormElement`, ctor: function(e, t, n) { _.call(this, e, t, n); }, attributes: { action: String, autocomplete: { type: [`on`, `off`], missing: `on` }, name: String, acceptCharset: { name: `accept-charset` }, target: String, noValidate: Boolean, method: { type: [ `get`, `post`, `dialog` ], invalid: `get`, missing: `get` }, enctype: { type: [ `application/x-www-form-urlencoded`, `multipart/form-data`, `text/plain` ], invalid: `application/x-www-form-urlencoded`, missing: `application/x-www-form-urlencoded` }, encoding: { name: `enctype`, type: [ `application/x-www-form-urlencoded`, `multipart/form-data`, `text/plain` ], invalid: `application/x-www-form-urlencoded`, missing: `application/x-www-form-urlencoded` } } }), d({ tag: `hr`, name: `HTMLHRElement`, ctor: function(e, t, n) { _.call(this, e, t, n); }, attributes: { align: String, color: String, noShade: Boolean, size: String, width: String } }), d({ tag: `head`, name: `HTMLHeadElement`, ctor: function(e, t, n) { _.call(this, e, t, n); } }), d({ tags: [ `h1`, `h2`, `h3`, `h4`, `h5`, `h6` ], name: `HTMLHeadingElement`, ctor: function(e, t, n) { _.call(this, e, t, n); }, attributes: { align: String } }), d({ tag: `html`, name: `HTMLHtmlElement`, ctor: function(e, t, n) { _.call(this, e, t, n); }, attributes: { xmlns: f, version: String } }), d({ tag: `iframe`, name: `HTMLIFrameElement`, ctor: function(e, t, n) { _.call(this, e, t, n); }, attributes: { src: f, srcdoc: String, name: String, width: String, height: String, seamless: Boolean, allow: Boolean, allowFullscreen: Boolean, allowUserMedia: Boolean, allowPaymentRequest: Boolean, referrerPolicy: m, loading: { type: [`eager`, `lazy`], treatNullAsEmptyString: !0 }, align: String, scrolling: String, frameBorder: String, longDesc: f, marginHeight: { type: String, treatNullAsEmptyString: !0 }, marginWidth: { type: String, treatNullAsEmptyString: !0 } } }), d({ tag: `img`, name: `HTMLImageElement`, ctor: function(e, t, n) { _.call(this, e, t, n); }, attributes: { alt: String, src: f, srcset: String, crossOrigin: p, useMap: String, isMap: Boolean, sizes: String, height: { type: `unsigned long`, default: 0 }, width: { type: `unsigned long`, default: 0 }, referrerPolicy: m, loading: { type: [`eager`, `lazy`], missing: `` }, name: String, lowsrc: f, align: String, hspace: { type: `unsigned long`, default: 0 }, vspace: { type: `unsigned long`, default: 0 }, longDesc: f, border: { type: String, treatNullAsEmptyString: !0 } } }), d({ tag: `input`, name: `HTMLInputElement`, ctor: function(e, t, n) { g.call(this, e, t, n); }, props: { form: y.form, _post_click_activation_steps: { value: function(e) { if (this.type === `checkbox`) this.checked = !this.checked; else if (this.type === `radio`) for (var t = this.form.getElementsByName(this.name), n = t.length - 1; n >= 0; n--) { var r = t[n]; r.checked = r === this; } } } }, attributes: { name: String, disabled: Boolean, autofocus: Boolean, accept: String, alt: String, max: String, min: String, pattern: String, placeholder: String, step: String, dirName: String, defaultValue: { name: `value` }, multiple: Boolean, required: Boolean, readOnly: Boolean, checked: Boolean, value: String, src: f, defaultChecked: { name: `checked`, type: Boolean }, size: { type: `unsigned long`, default: 20, min: 1, setmin: 1 }, width: { type: `unsigned long`, min: 0, setmin: 0, default: 0 }, height: { type: `unsigned long`, min: 0, setmin: 0, default: 0 }, minLength: { type: `unsigned long`, min: 0, setmin: 0, default: -1 }, maxLength: { type: `unsigned long`, min: 0, setmin: 0, default: -1 }, autocomplete: String, type: { type: [ `text`, `hidden`, `search`, `tel`, `url`, `email`, `password`, `datetime`, `date`, `month`, `week`, `time`, `datetime-local`, `number`, `range`, `color`, `checkbox`, `radio`, `file`, `submit`, `image`, `reset`, `button` ], missing: `text` }, formTarget: String, formNoValidate: Boolean, formMethod: { type: [`get`, `post`], invalid: `get`, missing: `` }, formEnctype: { type: [ `application/x-www-form-urlencoded`, `multipart/form-data`, `text/plain` ], invalid: `application/x-www-form-urlencoded`, missing: `` }, inputMode: { type: [ `verbatim`, `latin`, `latin-name`, `latin-prose`, `full-width-latin`, `kana`, `kana-name`, `katakana`, `numeric`, `tel`, `email`, `url` ], missing: `` }, align: String, useMap: String } }), d({ tag: `keygen`, name: `HTMLKeygenElement`, ctor: function(e, t, n) { g.call(this, e, t, n); }, props: y, attributes: { name: String, disabled: Boolean, autofocus: Boolean, challenge: String, keytype: { type: [`rsa`], missing: `` } } }), d({ tag: `li`, name: `HTMLLIElement`, ctor: function(e, t, n) { _.call(this, e, t, n); }, attributes: { value: { type: `long`, default: 0 }, type: String } }), d({ tag: `label`, name: `HTMLLabelElement`, ctor: function(e, t, n) { g.call(this, e, t, n); }, props: y, attributes: { htmlFor: { name: `for`, type: String } } }), d({ tag: `legend`, name: `HTMLLegendElement`, ctor: function(e, t, n) { _.call(this, e, t, n); }, attributes: { align: String } }), d({ tag: `link`, name: `HTMLLinkElement`, ctor: function(e, t, n) { _.call(this, e, t, n); }, attributes: { href: f, rel: String, media: String, hreflang: String, type: String, crossOrigin: p, nonce: String, integrity: String, referrerPolicy: m, imageSizes: String, imageSrcset: String, charset: String, rev: String, target: String } }), d({ tag: `map`, name: `HTMLMapElement`, ctor: function(e, t, n) { _.call(this, e, t, n); }, attributes: { name: String } }), d({ tag: `menu`, name: `HTMLMenuElement`, ctor: function(e, t, n) { _.call(this, e, t, n); }, attributes: { type: { type: [ `context`, `popup`, `toolbar` ], missing: `toolbar` }, label: String, compact: Boolean } }), d({ tag: `meta`, name: `HTMLMetaElement`, ctor: function(e, t, n) { _.call(this, e, t, n); }, attributes: { name: String, content: String, httpEquiv: { name: `http-equiv`, type: String }, scheme: String } }), d({ tag: `meter`, name: `HTMLMeterElement`, ctor: function(e, t, n) { g.call(this, e, t, n); }, props: y }), d({ tags: [`ins`, `del`], name: `HTMLModElement`, ctor: function(e, t, n) { _.call(this, e, t, n); }, attributes: { cite: f, dateTime: String } }), d({ tag: `ol`, name: `HTMLOListElement`, ctor: function(e, t, n) { _.call(this, e, t, n); }, props: { _numitems: { get: function() { var e = 0; return this.childNodes.forEach(function(n) { n.nodeType === t.ELEMENT_NODE && n.tagName === `LI` && e++; }), e; } } }, attributes: { type: String, reversed: Boolean, start: { type: `long`, default: function() { return this.reversed ? this._numitems : 1; } }, compact: Boolean } }), d({ tag: `object`, name: `HTMLObjectElement`, ctor: function(e, t, n) { g.call(this, e, t, n); }, props: y, attributes: { data: f, type: String, name: String, useMap: String, typeMustMatch: Boolean, width: String, height: String, align: String, archive: String, code: String, declare: Boolean, hspace: { type: `unsigned long`, default: 0 }, standby: String, vspace: { type: `unsigned long`, default: 0 }, codeBase: f, codeType: String, border: { type: String, treatNullAsEmptyString: !0 } } }), d({ tag: `optgroup`, name: `HTMLOptGroupElement`, ctor: function(e, t, n) { _.call(this, e, t, n); }, attributes: { disabled: Boolean, label: String } }), d({ tag: `option`, name: `HTMLOptionElement`, ctor: function(e, t, n) { _.call(this, e, t, n); }, props: { form: { get: function() { for (var e = this.parentNode; e && e.nodeType === t.ELEMENT_NODE;) { if (e.localName === `select`) return e.form; e = e.parentNode; } } }, value: { get: function() { return this._getattr(`value`) || this.text; }, set: function(e) { this._setattr(`value`, e); } }, text: { get: function() { return this.textContent.replace(/[ \t\n\f\r]+/g, ` `).trim(); }, set: function(e) { this.textContent = e; } } }, attributes: { disabled: Boolean, defaultSelected: { name: `selected`, type: Boolean }, label: String } }), d({ tag: `output`, name: `HTMLOutputElement`, ctor: function(e, t, n) { g.call(this, e, t, n); }, props: y, attributes: { name: String } }), d({ tag: `p`, name: `HTMLParagraphElement`, ctor: function(e, t, n) { _.call(this, e, t, n); }, attributes: { align: String } }), d({ tag: `param`, name: `HTMLParamElement`, ctor: function(e, t, n) { _.call(this, e, t, n); }, attributes: { name: String, value: String, type: String, valueType: String } }), d({ tags: [ `pre`, `listing`, `xmp` ], name: `HTMLPreElement`, ctor: function(e, t, n) { _.call(this, e, t, n); }, attributes: { width: { type: `long`, default: 0 } } }), d({ tag: `progress`, name: `HTMLProgressElement`, ctor: function(e, t, n) { g.call(this, e, t, n); }, props: y, attributes: { max: { type: Number, float: !0, default: 1, min: 0 } } }), d({ tags: [`q`, `blockquote`], name: `HTMLQuoteElement`, ctor: function(e, t, n) { _.call(this, e, t, n); }, attributes: { cite: f } }), d({ tag: `script`, name: `HTMLScriptElement`, ctor: function(e, t, n) { _.call(this, e, t, n); }, props: { text: { get: function() { for (var e = ``, n = 0, r = this.childNodes.length; n < r; n++) { var i = this.childNodes[n]; i.nodeType === t.TEXT_NODE && (e += i._data); } return e; }, set: function(e) { this.removeChildren(), e !== null && e !== `` && this.appendChild(this.ownerDocument.createTextNode(e)); } } }, attributes: { src: f, type: String, charset: String, referrerPolicy: m, defer: Boolean, async: Boolean, nomodule: Boolean, crossOrigin: p, nonce: String, integrity: String } }), d({ tag: `select`, name: `HTMLSelectElement`, ctor: function(e, t, n) { g.call(this, e, t, n); }, props: { form: y.form, options: { get: function() { return this.getElementsByTagName(`option`); } } }, attributes: { autocomplete: String, name: String, disabled: Boolean, autofocus: Boolean, multiple: Boolean, required: Boolean, size: { type: `unsigned long`, default: 0 } } }), d({ tag: `span`, name: `HTMLSpanElement`, ctor: function(e, t, n) { _.call(this, e, t, n); } }), d({ tag: `style`, name: `HTMLStyleElement`, ctor: function(e, t, n) { _.call(this, e, t, n); }, attributes: { media: String, type: String, scoped: Boolean } }), d({ tag: `caption`, name: `HTMLTableCaptionElement`, ctor: function(e, t, n) { _.call(this, e, t, n); }, attributes: { align: String } }), d({ name: `HTMLTableCellElement`, ctor: function(e, t, n) { _.call(this, e, t, n); }, attributes: { colSpan: { type: `unsigned long`, default: 1 }, rowSpan: { type: `unsigned long`, default: 1 }, scope: { type: [ `row`, `col`, `rowgroup`, `colgroup` ], missing: `` }, abbr: String, align: String, axis: String, height: String, width: String, ch: { name: `char`, type: String }, chOff: { name: `charoff`, type: String }, noWrap: Boolean, vAlign: String, bgColor: { type: String, treatNullAsEmptyString: !0 } } }), d({ tags: [`col`, `colgroup`], name: `HTMLTableColElement`, ctor: function(e, t, n) { _.call(this, e, t, n); }, attributes: { span: { type: `limited unsigned long with fallback`, default: 1, min: 1 }, align: String, ch: { name: `char`, type: String }, chOff: { name: `charoff`, type: String }, vAlign: String, width: String } }), d({ tag: `table`, name: `HTMLTableElement`, ctor: function(e, t, n) { _.call(this, e, t, n); }, props: { rows: { get: function() { return this.getElementsByTagName(`tr`); } } }, attributes: { align: String, border: String, frame: String, rules: String, summary: String, width: String, bgColor: { type: String, treatNullAsEmptyString: !0 }, cellPadding: { type: String, treatNullAsEmptyString: !0 }, cellSpacing: { type: String, treatNullAsEmptyString: !0 } } }), d({ tag: `template`, name: `HTMLTemplateElement`, ctor: function(e, t, n) { _.call(this, e, t, n), this._contentFragment = e._templateDoc.createDocumentFragment(); }, props: { content: { get: function() { return this._contentFragment; } }, serialize: { value: function() { return this.content.serialize(); } } } }), d({ tag: `tr`, name: `HTMLTableRowElement`, ctor: function(e, t, n) { _.call(this, e, t, n); }, props: { cells: { get: function() { return this.querySelectorAll(`td,th`); } } }, attributes: { align: String, ch: { name: `char`, type: String }, chOff: { name: `charoff`, type: String }, vAlign: String, bgColor: { type: String, treatNullAsEmptyString: !0 } } }), d({ tags: [ `thead`, `tfoot`, `tbody` ], name: `HTMLTableSectionElement`, ctor: function(e, t, n) { _.call(this, e, t, n); }, props: { rows: { get: function() { return this.getElementsByTagName(`tr`); } } }, attributes: { align: String, ch: { name: `char`, type: String }, chOff: { name: `charoff`, type: String }, vAlign: String } }), d({ tag: `textarea`, name: `HTMLTextAreaElement`, ctor: function(e, t, n) { g.call(this, e, t, n); }, props: { form: y.form, type: { get: function() { return `textarea`; } }, defaultValue: { get: function() { return this.textContent; }, set: function(e) { this.textContent = e; } }, value: { get: function() { return this.defaultValue; }, set: function(e) { this.defaultValue = e; } }, textLength: { get: function() { return this.value.length; } } }, attributes: { autocomplete: String, name: String, disabled: Boolean, autofocus: Boolean, placeholder: String, wrap: String, dirName: String, required: Boolean, readOnly: Boolean, rows: { type: `limited unsigned long with fallback`, default: 2 }, cols: { type: `limited unsigned long with fallback`, default: 20 }, maxLength: { type: `unsigned long`, min: 0, setmin: 0, default: -1 }, minLength: { type: `unsigned long`, min: 0, setmin: 0, default: -1 }, inputMode: { type: [ `verbatim`, `latin`, `latin-name`, `latin-prose`, `full-width-latin`, `kana`, `kana-name`, `katakana`, `numeric`, `tel`, `email`, `url` ], missing: `` } } }), d({ tag: `time`, name: `HTMLTimeElement`, ctor: function(e, t, n) { _.call(this, e, t, n); }, attributes: { dateTime: String, pubDate: Boolean } }), d({ tag: `title`, name: `HTMLTitleElement`, ctor: function(e, t, n) { _.call(this, e, t, n); }, props: { text: { get: function() { return this.textContent; } } } }), d({ tag: `ul`, name: `HTMLUListElement`, ctor: function(e, t, n) { _.call(this, e, t, n); }, attributes: { type: String, compact: Boolean } }), d({ name: `HTMLMediaElement`, ctor: function(e, t, n) { _.call(this, e, t, n); }, attributes: { src: f, crossOrigin: p, preload: { type: [ `metadata`, `none`, `auto`, { value: ``, alias: `auto` } ], missing: `auto` }, loop: Boolean, autoplay: Boolean, mediaGroup: String, controls: Boolean, defaultMuted: { name: `muted`, type: Boolean } } }), d({ name: `HTMLAudioElement`, tag: `audio`, superclass: c.HTMLMediaElement, ctor: function(e, t, n) { c.HTMLMediaElement.call(this, e, t, n); } }), d({ name: `HTMLVideoElement`, tag: `video`, superclass: c.HTMLMediaElement, ctor: function(e, t, n) { c.HTMLMediaElement.call(this, e, t, n); }, attributes: { poster: f, width: { type: `unsigned long`, min: 0, default: 0 }, height: { type: `unsigned long`, min: 0, default: 0 } } }), d({ tag: `td`, name: `HTMLTableDataCellElement`, superclass: c.HTMLTableCellElement, ctor: function(e, t, n) { c.HTMLTableCellElement.call(this, e, t, n); } }), d({ tag: `th`, name: `HTMLTableHeaderCellElement`, superclass: c.HTMLTableCellElement, ctor: function(e, t, n) { c.HTMLTableCellElement.call(this, e, t, n); } }), d({ tag: `frameset`, name: `HTMLFrameSetElement`, ctor: function(e, t, n) { _.call(this, e, t, n); } }), d({ tag: `frame`, name: `HTMLFrameElement`, ctor: function(e, t, n) { _.call(this, e, t, n); } }), d({ tag: `canvas`, name: `HTMLCanvasElement`, ctor: function(e, t, n) { _.call(this, e, t, n); }, props: { getContext: { value: i.nyi }, probablySupportsContext: { value: i.nyi }, setContext: { value: i.nyi }, transferControlToProxy: { value: i.nyi }, toDataURL: { value: i.nyi }, toBlob: { value: i.nyi } }, attributes: { width: { type: `unsigned long`, default: 300 }, height: { type: `unsigned long`, default: 150 } } }), d({ tag: `dialog`, name: `HTMLDialogElement`, ctor: function(e, t, n) { _.call(this, e, t, n); }, props: { show: { value: i.nyi }, showModal: { value: i.nyi }, close: { value: i.nyi } }, attributes: { open: Boolean, returnValue: String } }), d({ tag: `menuitem`, name: `HTMLMenuItemElement`, ctor: function(e, t, n) { _.call(this, e, t, n); }, props: { _label: { get: function() { var e = this._getattr(`label`); return e !== null && e !== `` ? e : (e = this.textContent, e.replace(/[ \t\n\f\r]+/g, ` `).trim()); } }, label: { get: function() { var e = this._getattr(`label`); return e === null ? this._label : e; }, set: function(e) { this._setattr(`label`, e); } } }, attributes: { type: { type: [ `command`, `checkbox`, `radio` ], missing: `command` }, icon: f, disabled: Boolean, checked: Boolean, radiogroup: String, default: Boolean } }), d({ tag: `source`, name: `HTMLSourceElement`, ctor: function(e, t, n) { _.call(this, e, t, n); }, attributes: { srcset: String, sizes: String, media: String, src: f, type: String, width: String, height: String } }), d({ tag: `track`, name: `HTMLTrackElement`, ctor: function(e, t, n) { _.call(this, e, t, n); }, attributes: { src: f, srclang: String, label: String, default: Boolean, kind: { type: [ `subtitles`, `captions`, `descriptions`, `chapters`, `metadata` ], missing: `subtitles`, invalid: `metadata` } }, props: { NONE: { get: function() { return 0; } }, LOADING: { get: function() { return 1; } }, LOADED: { get: function() { return 2; } }, ERROR: { get: function() { return 3; } }, readyState: { get: i.nyi }, track: { get: i.nyi } } }), d({ tag: `font`, name: `HTMLFontElement`, ctor: function(e, t, n) { _.call(this, e, t, n); }, attributes: { color: { type: String, treatNullAsEmptyString: !0 }, face: { type: String }, size: { type: String } } }), d({ tag: `dir`, name: `HTMLDirectoryElement`, ctor: function(e, t, n) { _.call(this, e, t, n); }, attributes: { compact: Boolean } }), d({ tags: `abbr.address.article.aside.b.bdi.bdo.cite.content.code.dd.dfn.dt.em.figcaption.figure.footer.header.hgroup.i.kbd.main.mark.nav.noscript.rb.rp.rt.rtc.ruby.s.samp.section.small.strong.sub.summary.sup.u.var.wbr.acronym.basefont.big.center.nobr.noembed.noframes.plaintext.strike.tt`.split(`.`) }); })); var M$7 = e$2(((e) => { var t = C$8(), n = A$7(), r = o$8(), i = le$7(), a = e.elements = {}, s = Object.create(null); e.createElement = function(e, t, n) { return new (s[t] || l)(e, t, n); }; function c(e) { return n(e, l, a, s); } var l = c({ superclass: t, name: `SVGElement`, ctor: function(e, n, i) { t.call(this, e, n, r.NAMESPACE.SVG, i); }, props: { style: { get: function() { return this._style ||= new i(this), this._style; } } } }); c({ name: `SVGSVGElement`, ctor: function(e, t, n) { l.call(this, e, t, n); }, tag: `svg`, props: { createSVGRect: { value: function() { return e.createElement(this.ownerDocument, `rect`, null); } } } }), c({ tags: `a.altGlyph.altGlyphDef.altGlyphItem.animate.animateColor.animateMotion.animateTransform.circle.clipPath.color-profile.cursor.defs.desc.ellipse.feBlend.feColorMatrix.feComponentTransfer.feComposite.feConvolveMatrix.feDiffuseLighting.feDisplacementMap.feDistantLight.feFlood.feFuncA.feFuncB.feFuncG.feFuncR.feGaussianBlur.feImage.feMerge.feMergeNode.feMorphology.feOffset.fePointLight.feSpecularLighting.feSpotLight.feTile.feTurbulence.filter.font.font-face.font-face-format.font-face-name.font-face-src.font-face-uri.foreignObject.g.glyph.glyphRef.hkern.image.line.linearGradient.marker.mask.metadata.missing-glyph.mpath.path.pattern.polygon.polyline.radialGradient.rect.script.set.stop.style.switch.symbol.text.textPath.title.tref.tspan.use.view.vkern`.split(`.`) }); })); var ue$7 = e$2(((e, t) => { t.exports = { VALUE: 1, ATTR: 2, REMOVE_ATTR: 3, REMOVE: 4, MOVE: 5, INSERT: 6 }; })); var de$7 = e$2(((e, n) => { n.exports = fe; var r = u$8(), i = p$10(), s = m$7(), c = C$8(), l = E$8(), d = D$7(), f = t$7(), g = ee$5(), _ = te$5(), v = pe$7(), b = O$6(), x = ie$5(), S = ne$5(), w = ae$6(), T = y$5(), re = se$7(), oe = h$8(), ce = j$6(), le = M$7(), k = o$8(), A = ue$7(), de = k.NAMESPACE, N = a$8().isApiWritable; function fe(e, t) { s.call(this), this.nodeType = r.DOCUMENT_NODE, this.isHTML = e, this._address = t || `about:blank`, this.readyState = `loading`, this.implementation = new v(this), this.ownerDocument = null, this._contentType = e ? `text/html` : `application/xml`, this.doctype = null, this.documentElement = null, this._templateDocCache = null, this._nodeIterators = null, this._nid = 1, this._nextnid = 2, this._nodes = [null, this], this.byId = Object.create(null), this.modclock = 0; } var me = { event: `Event`, customevent: `CustomEvent`, uievent: `UIEvent`, mouseevent: `MouseEvent` }, he = { events: `event`, htmlevents: `event`, mouseevents: `mouseevent`, mutationevents: `mutationevent`, uievents: `uievent` }, ge = function(e, t, n) { return { get: function() { var r = e.call(this); return r ? r[t] : n; }, set: function(n) { var r = e.call(this); r && (r[t] = n); } }; }; function _e(e, t) { var n, r, i; return e === `` && (e = null), oe.isValidQName(t) || k.InvalidCharacterError(), n = null, r = t, i = t.indexOf(`:`), i >= 0 && (n = t.substring(0, i), r = t.substring(i + 1)), n !== null && e === null && k.NamespaceError(), n === `xml` && e !== de.XML && k.NamespaceError(), (n === `xmlns` || t === `xmlns`) && e !== de.XMLNS && k.NamespaceError(), e === de.XMLNS && !(n === `xmlns` || t === `xmlns`) && k.NamespaceError(), { namespace: e, prefix: n, localName: r }; } fe.prototype = Object.create(s.prototype, { _setMutationHandler: { value: function(e) { this.mutationHandler = e; } }, _dispatchRendererEvent: { value: function(e, t, n) { var r = this._nodes[e]; r && r._dispatchEvent(new f(t, n), !0); } }, nodeName: { value: `#document` }, nodeValue: { get: function() { return null; }, set: function() {} }, documentURI: { get: function() { return this._address; }, set: k.nyi }, compatMode: { get: function() { return this._quirks ? `BackCompat` : `CSS1Compat`; } }, createTextNode: { value: function(e) { return new l(this, String(e)); } }, createComment: { value: function(e) { return new d(this, e); } }, createDocumentFragment: { value: function() { return new g(this); } }, createProcessingInstruction: { value: function(e, t) { return (!oe.isValidName(e) || t.indexOf(`?>`) !== -1) && k.InvalidCharacterError(), new _(this, e, t); } }, createAttribute: { value: function(e) { return e = String(e), oe.isValidName(e) || k.InvalidCharacterError(), this.isHTML && (e = k.toASCIILowerCase(e)), new c._Attr(null, e, null, null, ``); } }, createAttributeNS: { value: function(e, t) { e = e == null || e === `` ? null : String(e), t = String(t); var n = _e(e, t); return new c._Attr(null, n.localName, n.prefix, n.namespace, ``); } }, createElement: { value: function(e) { return e = String(e), oe.isValidName(e) || k.InvalidCharacterError(), this.isHTML ? (/[A-Z]/.test(e) && (e = k.toASCIILowerCase(e)), ce.createElement(this, e, null)) : this.contentType === `application/xhtml+xml` ? ce.createElement(this, e, null) : new c(this, e, null, null); }, writable: N }, createElementNS: { value: function(e, t) { e = e == null || e === `` ? null : String(e), t = String(t); var n = _e(e, t); return this._createElementNS(n.localName, n.namespace, n.prefix); }, writable: N }, _createElementNS: { value: function(e, t, n) { return t === de.HTML ? ce.createElement(this, e, n) : t === de.SVG ? le.createElement(this, e, n) : new c(this, e, t, n); } }, createEvent: { value: function(e) { e = e.toLowerCase(); var t = re[me[he[e] || e]]; if (t) { var n = new t(); return n._initialized = !1, n; } else k.NotSupportedError(); } }, createTreeWalker: { value: function(e, t, n) { if (!e) throw TypeError(`root argument is required`); if (!(e instanceof r)) throw TypeError(`root not a node`); return t = t === void 0 ? S.SHOW_ALL : +t, n = n === void 0 ? null : n, new b(e, t, n); } }, createNodeIterator: { value: function(e, t, n) { if (!e) throw TypeError(`root argument is required`); if (!(e instanceof r)) throw TypeError(`root not a node`); return t = t === void 0 ? S.SHOW_ALL : +t, n = n === void 0 ? null : n, new x(e, t, n); } }, _attachNodeIterator: { value: function(e) { this._nodeIterators ||= [], this._nodeIterators.push(e); } }, _detachNodeIterator: { value: function(e) { var t = this._nodeIterators.indexOf(e); this._nodeIterators.splice(t, 1); } }, _preremoveNodeIterators: { value: function(e) { this._nodeIterators && this._nodeIterators.forEach(function(t) { t._preremove(e); }); } }, _updateDocTypeElement: { value: function() { this.doctype = this.documentElement = null; for (var e = this.firstChild; e !== null; e = e.nextSibling) e.nodeType === r.DOCUMENT_TYPE_NODE ? this.doctype = e : e.nodeType === r.ELEMENT_NODE && (this.documentElement = e); } }, insertBefore: { value: function(e, t) { return r.prototype.insertBefore.call(this, e, t), this._updateDocTypeElement(), e; } }, replaceChild: { value: function(e, t) { return r.prototype.replaceChild.call(this, e, t), this._updateDocTypeElement(), t; } }, removeChild: { value: function(e) { return r.prototype.removeChild.call(this, e), this._updateDocTypeElement(), e; } }, getElementById: { value: function(e) { var t = this.byId[e]; return t ? t instanceof we ? t.getFirst() : t : null; } }, _hasMultipleElementsWithId: { value: function(e) { return this.byId[e] instanceof we; } }, getElementsByName: { value: c.prototype.getElementsByName }, getElementsByTagName: { value: c.prototype.getElementsByTagName }, getElementsByTagNameNS: { value: c.prototype.getElementsByTagNameNS }, getElementsByClassName: { value: c.prototype.getElementsByClassName }, adoptNode: { value: function(e) { return e.nodeType === r.DOCUMENT_NODE && k.NotSupportedError(), e.nodeType === r.ATTRIBUTE_NODE ? e : (e.parentNode && e.parentNode.removeChild(e), e.ownerDocument !== this && Ce(e, this), e); } }, importNode: { value: function(e, t) { return this.adoptNode(e.cloneNode(t)); }, writable: N }, origin: { get: function() { return null; } }, characterSet: { get: function() { return `UTF-8`; } }, contentType: { get: function() { return this._contentType; } }, URL: { get: function() { return this._address; } }, domain: { get: k.nyi, set: k.nyi }, referrer: { get: k.nyi }, cookie: { get: k.nyi, set: k.nyi }, lastModified: { get: k.nyi }, location: { get: function() { return this.defaultView ? this.defaultView.location : null; }, set: k.nyi }, _titleElement: { get: function() { return this.getElementsByTagName(`title`).item(0) || null; } }, title: { get: function() { var e = this._titleElement; return (e ? e.textContent : ``).replace(/[ \t\n\r\f]+/g, ` `).replace(/(^ )|( $)/g, ``); }, set: function(e) { var t = this._titleElement, n = this.head; !t && !n || (t || (t = this.createElement(`title`), n.appendChild(t)), t.textContent = e); } }, dir: ge(function() { var e = this.documentElement; if (e && e.tagName === `HTML`) return e; }, `dir`, ``), fgColor: ge(function() { return this.body; }, `text`, ``), linkColor: ge(function() { return this.body; }, `link`, ``), vlinkColor: ge(function() { return this.body; }, `vLink`, ``), alinkColor: ge(function() { return this.body; }, `aLink`, ``), bgColor: ge(function() { return this.body; }, `bgColor`, ``), charset: { get: function() { return this.characterSet; } }, inputEncoding: { get: function() { return this.characterSet; } }, scrollingElement: { get: function() { return this._quirks ? this.body : this.documentElement; } }, body: { get: function() { return ve(this.documentElement, `body`); }, set: k.nyi }, head: { get: function() { return ve(this.documentElement, `head`); } }, images: { get: k.nyi }, embeds: { get: k.nyi }, plugins: { get: k.nyi }, links: { get: k.nyi }, forms: { get: k.nyi }, scripts: { get: k.nyi }, applets: { get: function() { return []; } }, activeElement: { get: function() { return null; } }, innerHTML: { get: function() { return this.serialize(); }, set: k.nyi }, outerHTML: { get: function() { return this.serialize(); }, set: k.nyi }, write: { value: function(e) { if (this.isHTML || k.InvalidStateError(), this._parser) { this._parser; var t = arguments.join(``); this._parser.parse(t); } } }, writeln: { value: function(e) { this.write(Array.prototype.join.call(arguments, ``) + ` `); } }, open: { value: function() { this.documentElement = null; } }, close: { value: function() { this.readyState = `interactive`, this._dispatchEvent(new f(`readystatechange`), !0), this._dispatchEvent(new f(`DOMContentLoaded`), !0), this.readyState = `complete`, this._dispatchEvent(new f(`readystatechange`), !0), this.defaultView && this.defaultView._dispatchEvent(new f(`load`), !0); } }, clone: { value: function() { var e = new fe(this.isHTML, this._address); return e._quirks = this._quirks, e._contentType = this._contentType, e; } }, cloneNode: { value: function(e) { var t = r.prototype.cloneNode.call(this, !1); if (e) for (var n = this.firstChild; n !== null; n = n.nextSibling) t._appendChild(t.importNode(n, !0)); return t._updateDocTypeElement(), t; } }, isEqual: { value: function(e) { return !0; } }, mutateValue: { value: function(e) { this.mutationHandler && this.mutationHandler({ type: A.VALUE, target: e, data: e.data }); } }, mutateAttr: { value: function(e, t) { this.mutationHandler && this.mutationHandler({ type: A.ATTR, target: e.ownerElement, attr: e }); } }, mutateRemoveAttr: { value: function(e) { this.mutationHandler && this.mutationHandler({ type: A.REMOVE_ATTR, target: e.ownerElement, attr: e }); } }, mutateRemove: { value: function(e) { this.mutationHandler && this.mutationHandler({ type: A.REMOVE, target: e.parentNode, node: e }), Se(e); } }, mutateInsert: { value: function(e) { xe(e), this.mutationHandler && this.mutationHandler({ type: A.INSERT, target: e.parentNode, node: e }); } }, mutateMove: { value: function(e) { this.mutationHandler && this.mutationHandler({ type: A.MOVE, target: e }); } }, addId: { value: function(e, t) { var n = this.byId[e]; n ? (n instanceof we || (n = new we(n), this.byId[e] = n), n.add(t)) : this.byId[e] = t; } }, delId: { value: function(e, t) { var n = this.byId[e]; k.assert(n), n instanceof we ? (n.del(t), n.length === 1 && (this.byId[e] = n.downgrade())) : this.byId[e] = void 0; } }, _resolve: { value: function(e) { return new w(this._documentBaseURL).resolve(e); } }, _documentBaseURL: { get: function() { var e = this._address; e === `about:blank` && (e = `/`); var t = this.querySelector(`base[href]`); return t ? new w(e).resolve(t.getAttribute(`href`)) : e; } }, _templateDoc: { get: function() { if (!this._templateDocCache) { var e = new fe(this.isHTML, this._address); this._templateDocCache = e._templateDocCache = e; } return this._templateDocCache; } }, querySelector: { value: function(e) { return T(e, this)[0]; } }, querySelectorAll: { value: function(e) { var t = T(e, this); return t.item ? t : new i(t); } } }), `abort.canplay.canplaythrough.change.click.contextmenu.cuechange.dblclick.drag.dragend.dragenter.dragleave.dragover.dragstart.drop.durationchange.emptied.ended.input.invalid.keydown.keypress.keyup.loadeddata.loadedmetadata.loadstart.mousedown.mousemove.mouseout.mouseover.mouseup.mousewheel.pause.play.playing.progress.ratechange.readystatechange.reset.seeked.seeking.select.show.stalled.submit.suspend.timeupdate.volumechange.waiting.blur.error.focus.load.scroll`.split(`.`).forEach(function(e) { Object.defineProperty(fe.prototype, `on` + e, { get: function() { return this._getEventHandler(e); }, set: function(t) { this._setEventHandler(e, t); } }); }); function ve(e, t) { if (e && e.isHTML) { for (var n = e.firstChild; n !== null; n = n.nextSibling) if (n.nodeType === r.ELEMENT_NODE && n.localName === t && n.namespaceURI === de.HTML) return n; } return null; } function ye(e) { if (e._nid = e.ownerDocument._nextnid++, e.ownerDocument._nodes[e._nid] = e, e.nodeType === r.ELEMENT_NODE) { var t = e.getAttribute(`id`); t && e.ownerDocument.addId(t, e), e._roothook && e._roothook(); } } function be(e) { if (e.nodeType === r.ELEMENT_NODE) { var t = e.getAttribute(`id`); t && e.ownerDocument.delId(t, e); } e.ownerDocument._nodes[e._nid] = void 0, e._nid = void 0; } function xe(e) { if (ye(e), e.nodeType === r.ELEMENT_NODE) for (var t = e.firstChild; t !== null; t = t.nextSibling) xe(t); } function Se(e) { be(e); for (var t = e.firstChild; t !== null; t = t.nextSibling) Se(t); } function Ce(e, t) { e.ownerDocument = t, e._lastModTime = void 0, Object.prototype.hasOwnProperty.call(e, `_tagName`) && (e._tagName = void 0); for (var n = e.firstChild; n !== null; n = n.nextSibling) Ce(n, t); } function we(e) { this.nodes = Object.create(null), this.nodes[e._nid] = e, this.length = 1, this.firstNode = void 0; } we.prototype.add = function(e) { this.nodes[e._nid] || (this.nodes[e._nid] = e, this.length++, this.firstNode = void 0); }, we.prototype.del = function(e) { this.nodes[e._nid] && (delete this.nodes[e._nid], this.length--, this.firstNode = void 0); }, we.prototype.getFirst = function() { if (!this.firstNode) for (var e in this.nodes) (this.firstNode === void 0 || this.firstNode.compareDocumentPosition(this.nodes[e]) & r.DOCUMENT_POSITION_PRECEDING) && (this.firstNode = this.nodes[e]); return this.firstNode; }, we.prototype.downgrade = function() { if (this.length === 1) for (var e in this.nodes) return this.nodes[e]; return this; }; })); var N$6 = e$2(((e, t) => { t.exports = a; var n = u$8(), r = w$8(), i = b$7(); function a(e, t, i, a) { r.call(this), this.nodeType = n.DOCUMENT_TYPE_NODE, this.ownerDocument = e || null, this.name = t, this.publicId = i || ``, this.systemId = a || ``; } a.prototype = Object.create(r.prototype, { nodeName: { get: function() { return this.name; } }, nodeValue: { get: function() { return null; }, set: function() {} }, clone: { value: function() { return new a(this.ownerDocument, this.name, this.publicId, this.systemId); } }, isEqual: { value: function(e) { return this.name === e.name && this.publicId === e.publicId && this.systemId === e.systemId; } } }), Object.defineProperties(a.prototype, i); })); var fe$7 = e$2(((e, t) => { t.exports = L; var n = de$7(), r = N$6(), i = u$8(), a = o$8().NAMESPACE, s = j$6(), c = s.elements, l = Function.prototype.apply.bind(Array.prototype.push), d = -1, f = 1, p = 2, m = 3, h = 4, g = 5, _ = [], v = /^HTML$|^-\/\/W3O\/\/DTD W3 HTML Strict 3\.0\/\/EN\/\/$|^-\/W3C\/DTD HTML 4\.0 Transitional\/EN$|^\+\/\/Silmaril\/\/dtd html Pro v0r11 19970101\/\/|^-\/\/AdvaSoft Ltd\/\/DTD HTML 3\.0 asWedit \+ extensions\/\/|^-\/\/AS\/\/DTD HTML 3\.0 asWedit \+ extensions\/\/|^-\/\/IETF\/\/DTD HTML 2\.0 Level 1\/\/|^-\/\/IETF\/\/DTD HTML 2\.0 Level 2\/\/|^-\/\/IETF\/\/DTD HTML 2\.0 Strict Level 1\/\/|^-\/\/IETF\/\/DTD HTML 2\.0 Strict Level 2\/\/|^-\/\/IETF\/\/DTD HTML 2\.0 Strict\/\/|^-\/\/IETF\/\/DTD HTML 2\.0\/\/|^-\/\/IETF\/\/DTD HTML 2\.1E\/\/|^-\/\/IETF\/\/DTD HTML 3\.0\/\/|^-\/\/IETF\/\/DTD HTML 3\.2 Final\/\/|^-\/\/IETF\/\/DTD HTML 3\.2\/\/|^-\/\/IETF\/\/DTD HTML 3\/\/|^-\/\/IETF\/\/DTD HTML Level 0\/\/|^-\/\/IETF\/\/DTD HTML Level 1\/\/|^-\/\/IETF\/\/DTD HTML Level 2\/\/|^-\/\/IETF\/\/DTD HTML Level 3\/\/|^-\/\/IETF\/\/DTD HTML Strict Level 0\/\/|^-\/\/IETF\/\/DTD HTML Strict Level 1\/\/|^-\/\/IETF\/\/DTD HTML Strict Level 2\/\/|^-\/\/IETF\/\/DTD HTML Strict Level 3\/\/|^-\/\/IETF\/\/DTD HTML Strict\/\/|^-\/\/IETF\/\/DTD HTML\/\/|^-\/\/Metrius\/\/DTD Metrius Presentational\/\/|^-\/\/Microsoft\/\/DTD Internet Explorer 2\.0 HTML Strict\/\/|^-\/\/Microsoft\/\/DTD Internet Explorer 2\.0 HTML\/\/|^-\/\/Microsoft\/\/DTD Internet Explorer 2\.0 Tables\/\/|^-\/\/Microsoft\/\/DTD Internet Explorer 3\.0 HTML Strict\/\/|^-\/\/Microsoft\/\/DTD Internet Explorer 3\.0 HTML\/\/|^-\/\/Microsoft\/\/DTD Internet Explorer 3\.0 Tables\/\/|^-\/\/Netscape Comm\. Corp\.\/\/DTD HTML\/\/|^-\/\/Netscape Comm\. Corp\.\/\/DTD Strict HTML\/\/|^-\/\/O'Reilly and Associates\/\/DTD HTML 2\.0\/\/|^-\/\/O'Reilly and Associates\/\/DTD HTML Extended 1\.0\/\/|^-\/\/O'Reilly and Associates\/\/DTD HTML Extended Relaxed 1\.0\/\/|^-\/\/SoftQuad Software\/\/DTD HoTMetaL PRO 6\.0::19990601::extensions to HTML 4\.0\/\/|^-\/\/SoftQuad\/\/DTD HoTMetaL PRO 4\.0::19971010::extensions to HTML 4\.0\/\/|^-\/\/Spyglass\/\/DTD HTML 2\.0 Extended\/\/|^-\/\/SQ\/\/DTD HTML 2\.0 HoTMetaL \+ extensions\/\/|^-\/\/Sun Microsystems Corp\.\/\/DTD HotJava HTML\/\/|^-\/\/Sun Microsystems Corp\.\/\/DTD HotJava Strict HTML\/\/|^-\/\/W3C\/\/DTD HTML 3 1995-03-24\/\/|^-\/\/W3C\/\/DTD HTML 3\.2 Draft\/\/|^-\/\/W3C\/\/DTD HTML 3\.2 Final\/\/|^-\/\/W3C\/\/DTD HTML 3\.2\/\/|^-\/\/W3C\/\/DTD HTML 3\.2S Draft\/\/|^-\/\/W3C\/\/DTD HTML 4\.0 Frameset\/\/|^-\/\/W3C\/\/DTD HTML 4\.0 Transitional\/\/|^-\/\/W3C\/\/DTD HTML Experimental 19960712\/\/|^-\/\/W3C\/\/DTD HTML Experimental 970421\/\/|^-\/\/W3C\/\/DTD W3 HTML\/\/|^-\/\/W3O\/\/DTD W3 HTML 3\.0\/\/|^-\/\/WebTechs\/\/DTD Mozilla HTML 2\.0\/\/|^-\/\/WebTechs\/\/DTD Mozilla HTML\/\//i, y = `http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd`, b = /^-\/\/W3C\/\/DTD HTML 4\.01 Frameset\/\/|^-\/\/W3C\/\/DTD HTML 4\.01 Transitional\/\//i, x = /^-\/\/W3C\/\/DTD XHTML 1\.0 Frameset\/\/|^-\/\/W3C\/\/DTD XHTML 1\.0 Transitional\/\//i, S = Object.create(null); S[a.HTML] = { __proto__: null, address: !0, applet: !0, area: !0, article: !0, aside: !0, base: !0, basefont: !0, bgsound: !0, blockquote: !0, body: !0, br: !0, button: !0, caption: !0, center: !0, col: !0, colgroup: !0, dd: !0, details: !0, dir: !0, div: !0, dl: !0, dt: !0, embed: !0, fieldset: !0, figcaption: !0, figure: !0, footer: !0, form: !0, frame: !0, frameset: !0, h1: !0, h2: !0, h3: !0, h4: !0, h5: !0, h6: !0, head: !0, header: !0, hgroup: !0, hr: !0, html: !0, iframe: !0, img: !0, input: !0, li: !0, link: !0, listing: !0, main: !0, marquee: !0, menu: !0, meta: !0, nav: !0, noembed: !0, noframes: !0, noscript: !0, object: !0, ol: !0, p: !0, param: !0, plaintext: !0, pre: !0, script: !0, section: !0, select: !0, source: !0, style: !0, summary: !0, table: !0, tbody: !0, td: !0, template: !0, textarea: !0, tfoot: !0, th: !0, thead: !0, title: !0, tr: !0, track: !0, ul: !0, wbr: !0, xmp: !0 }, S[a.SVG] = { __proto__: null, foreignObject: !0, desc: !0, title: !0 }, S[a.MATHML] = { __proto__: null, mi: !0, mo: !0, mn: !0, ms: !0, mtext: !0, "annotation-xml": !0 }; var C = Object.create(null); C[a.HTML] = { __proto__: null, address: !0, div: !0, p: !0 }; var w = Object.create(null); w[a.HTML] = { __proto__: null, dd: !0, dt: !0 }; var T = Object.create(null); T[a.HTML] = { __proto__: null, table: !0, thead: !0, tbody: !0, tfoot: !0, tr: !0 }; var E = Object.create(null); E[a.HTML] = { __proto__: null, dd: !0, dt: !0, li: !0, menuitem: !0, optgroup: !0, option: !0, p: !0, rb: !0, rp: !0, rt: !0, rtc: !0 }; var D = Object.create(null); D[a.HTML] = { __proto__: null, caption: !0, colgroup: !0, dd: !0, dt: !0, li: !0, optgroup: !0, option: !0, p: !0, rb: !0, rp: !0, rt: !0, rtc: !0, tbody: !0, td: !0, tfoot: !0, th: !0, thead: !0, tr: !0 }; var ee = Object.create(null); ee[a.HTML] = { __proto__: null, table: !0, template: !0, html: !0 }; var te = Object.create(null); te[a.HTML] = { __proto__: null, tbody: !0, tfoot: !0, thead: !0, template: !0, html: !0 }; var ne = Object.create(null); ne[a.HTML] = { __proto__: null, tr: !0, template: !0, html: !0 }; var re = Object.create(null); re[a.HTML] = { __proto__: null, button: !0, fieldset: !0, input: !0, keygen: !0, object: !0, output: !0, select: !0, textarea: !0, img: !0 }; var O = Object.create(null); O[a.HTML] = { __proto__: null, applet: !0, caption: !0, html: !0, table: !0, td: !0, th: !0, marquee: !0, object: !0, template: !0 }, O[a.MATHML] = { __proto__: null, mi: !0, mo: !0, mn: !0, ms: !0, mtext: !0, "annotation-xml": !0 }, O[a.SVG] = { __proto__: null, foreignObject: !0, desc: !0, title: !0 }; var ie = Object.create(O); ie[a.HTML] = Object.create(O[a.HTML]), ie[a.HTML].ol = !0, ie[a.HTML].ul = !0; var ae = Object.create(O); ae[a.HTML] = Object.create(O[a.HTML]), ae[a.HTML].button = !0; var oe = Object.create(null); oe[a.HTML] = { __proto__: null, html: !0, table: !0, template: !0 }; var se = Object.create(null); se[a.HTML] = { __proto__: null, optgroup: !0, option: !0 }; var ce = Object.create(null); ce[a.MATHML] = { __proto__: null, mi: !0, mo: !0, mn: !0, ms: !0, mtext: !0 }; var le = Object.create(null); le[a.SVG] = { __proto__: null, foreignObject: !0, desc: !0, title: !0 }; var k = { __proto__: null, "xlink:actuate": a.XLINK, "xlink:arcrole": a.XLINK, "xlink:href": a.XLINK, "xlink:role": a.XLINK, "xlink:show": a.XLINK, "xlink:title": a.XLINK, "xlink:type": a.XLINK, "xml:base": a.XML, "xml:lang": a.XML, "xml:space": a.XML, xmlns: a.XMLNS, "xmlns:xlink": a.XMLNS }, A = { __proto__: null, attributename: `attributeName`, attributetype: `attributeType`, basefrequency: `baseFrequency`, baseprofile: `baseProfile`, calcmode: `calcMode`, clippathunits: `clipPathUnits`, diffuseconstant: `diffuseConstant`, edgemode: `edgeMode`, filterunits: `filterUnits`, glyphref: `glyphRef`, gradienttransform: `gradientTransform`, gradientunits: `gradientUnits`, kernelmatrix: `kernelMatrix`, kernelunitlength: `kernelUnitLength`, keypoints: `keyPoints`, keysplines: `keySplines`, keytimes: `keyTimes`, lengthadjust: `lengthAdjust`, limitingconeangle: `limitingConeAngle`, markerheight: `markerHeight`, markerunits: `markerUnits`, markerwidth: `markerWidth`, maskcontentunits: `maskContentUnits`, maskunits: `maskUnits`, numoctaves: `numOctaves`, pathlength: `pathLength`, patterncontentunits: `patternContentUnits`, patterntransform: `patternTransform`, patternunits: `patternUnits`, pointsatx: `pointsAtX`, pointsaty: `pointsAtY`, pointsatz: `pointsAtZ`, preservealpha: `preserveAlpha`, preserveaspectratio: `preserveAspectRatio`, primitiveunits: `primitiveUnits`, refx: `refX`, refy: `refY`, repeatcount: `repeatCount`, repeatdur: `repeatDur`, requiredextensions: `requiredExtensions`, requiredfeatures: `requiredFeatures`, specularconstant: `specularConstant`, specularexponent: `specularExponent`, spreadmethod: `spreadMethod`, startoffset: `startOffset`, stddeviation: `stdDeviation`, stitchtiles: `stitchTiles`, surfacescale: `surfaceScale`, systemlanguage: `systemLanguage`, tablevalues: `tableValues`, targetx: `targetX`, targety: `targetY`, textlength: `textLength`, viewbox: `viewBox`, viewtarget: `viewTarget`, xchannelselector: `xChannelSelector`, ychannelselector: `yChannelSelector`, zoomandpan: `zoomAndPan` }, M = { __proto__: null, altglyph: `altGlyph`, altglyphdef: `altGlyphDef`, altglyphitem: `altGlyphItem`, animatecolor: `animateColor`, animatemotion: `animateMotion`, animatetransform: `animateTransform`, clippath: `clipPath`, feblend: `feBlend`, fecolormatrix: `feColorMatrix`, fecomponenttransfer: `feComponentTransfer`, fecomposite: `feComposite`, feconvolvematrix: `feConvolveMatrix`, fediffuselighting: `feDiffuseLighting`, fedisplacementmap: `feDisplacementMap`, fedistantlight: `feDistantLight`, feflood: `feFlood`, fefunca: `feFuncA`, fefuncb: `feFuncB`, fefuncg: `feFuncG`, fefuncr: `feFuncR`, fegaussianblur: `feGaussianBlur`, feimage: `feImage`, femerge: `feMerge`, femergenode: `feMergeNode`, femorphology: `feMorphology`, feoffset: `feOffset`, fepointlight: `fePointLight`, fespecularlighting: `feSpecularLighting`, fespotlight: `feSpotLight`, fetile: `feTile`, feturbulence: `feTurbulence`, foreignobject: `foreignObject`, glyphref: `glyphRef`, lineargradient: `linearGradient`, radialgradient: `radialGradient`, textpath: `textPath` }, ue = { __proto__: null, 0: 65533, 128: 8364, 130: 8218, 131: 402, 132: 8222, 133: 8230, 134: 8224, 135: 8225, 136: 710, 137: 8240, 138: 352, 139: 8249, 140: 338, 142: 381, 145: 8216, 146: 8217, 147: 8220, 148: 8221, 149: 8226, 150: 8211, 151: 8212, 152: 732, 153: 8482, 154: 353, 155: 8250, 156: 339, 158: 382, 159: 376 }, fe = { __proto__: null, AElig: 198, "AElig;": 198, AMP: 38, "AMP;": 38, Aacute: 193, "Aacute;": 193, "Abreve;": 258, Acirc: 194, "Acirc;": 194, "Acy;": 1040, "Afr;": [55349, 56580], Agrave: 192, "Agrave;": 192, "Alpha;": 913, "Amacr;": 256, "And;": 10835, "Aogon;": 260, "Aopf;": [55349, 56632], "ApplyFunction;": 8289, Aring: 197, "Aring;": 197, "Ascr;": [55349, 56476], "Assign;": 8788, Atilde: 195, "Atilde;": 195, Auml: 196, "Auml;": 196, "Backslash;": 8726, "Barv;": 10983, "Barwed;": 8966, "Bcy;": 1041, "Because;": 8757, "Bernoullis;": 8492, "Beta;": 914, "Bfr;": [55349, 56581], "Bopf;": [55349, 56633], "Breve;": 728, "Bscr;": 8492, "Bumpeq;": 8782, "CHcy;": 1063, COPY: 169, "COPY;": 169, "Cacute;": 262, "Cap;": 8914, "CapitalDifferentialD;": 8517, "Cayleys;": 8493, "Ccaron;": 268, Ccedil: 199, "Ccedil;": 199, "Ccirc;": 264, "Cconint;": 8752, "Cdot;": 266, "Cedilla;": 184, "CenterDot;": 183, "Cfr;": 8493, "Chi;": 935, "CircleDot;": 8857, "CircleMinus;": 8854, "CirclePlus;": 8853, "CircleTimes;": 8855, "ClockwiseContourIntegral;": 8754, "CloseCurlyDoubleQuote;": 8221, "CloseCurlyQuote;": 8217, "Colon;": 8759, "Colone;": 10868, "Congruent;": 8801, "Conint;": 8751, "ContourIntegral;": 8750, "Copf;": 8450, "Coproduct;": 8720, "CounterClockwiseContourIntegral;": 8755, "Cross;": 10799, "Cscr;": [55349, 56478], "Cup;": 8915, "CupCap;": 8781, "DD;": 8517, "DDotrahd;": 10513, "DJcy;": 1026, "DScy;": 1029, "DZcy;": 1039, "Dagger;": 8225, "Darr;": 8609, "Dashv;": 10980, "Dcaron;": 270, "Dcy;": 1044, "Del;": 8711, "Delta;": 916, "Dfr;": [55349, 56583], "DiacriticalAcute;": 180, "DiacriticalDot;": 729, "DiacriticalDoubleAcute;": 733, "DiacriticalGrave;": 96, "DiacriticalTilde;": 732, "Diamond;": 8900, "DifferentialD;": 8518, "Dopf;": [55349, 56635], "Dot;": 168, "DotDot;": 8412, "DotEqual;": 8784, "DoubleContourIntegral;": 8751, "DoubleDot;": 168, "DoubleDownArrow;": 8659, "DoubleLeftArrow;": 8656, "DoubleLeftRightArrow;": 8660, "DoubleLeftTee;": 10980, "DoubleLongLeftArrow;": 10232, "DoubleLongLeftRightArrow;": 10234, "DoubleLongRightArrow;": 10233, "DoubleRightArrow;": 8658, "DoubleRightTee;": 8872, "DoubleUpArrow;": 8657, "DoubleUpDownArrow;": 8661, "DoubleVerticalBar;": 8741, "DownArrow;": 8595, "DownArrowBar;": 10515, "DownArrowUpArrow;": 8693, "DownBreve;": 785, "DownLeftRightVector;": 10576, "DownLeftTeeVector;": 10590, "DownLeftVector;": 8637, "DownLeftVectorBar;": 10582, "DownRightTeeVector;": 10591, "DownRightVector;": 8641, "DownRightVectorBar;": 10583, "DownTee;": 8868, "DownTeeArrow;": 8615, "Downarrow;": 8659, "Dscr;": [55349, 56479], "Dstrok;": 272, "ENG;": 330, ETH: 208, "ETH;": 208, Eacute: 201, "Eacute;": 201, "Ecaron;": 282, Ecirc: 202, "Ecirc;": 202, "Ecy;": 1069, "Edot;": 278, "Efr;": [55349, 56584], Egrave: 200, "Egrave;": 200, "Element;": 8712, "Emacr;": 274, "EmptySmallSquare;": 9723, "EmptyVerySmallSquare;": 9643, "Eogon;": 280, "Eopf;": [55349, 56636], "Epsilon;": 917, "Equal;": 10869, "EqualTilde;": 8770, "Equilibrium;": 8652, "Escr;": 8496, "Esim;": 10867, "Eta;": 919, Euml: 203, "Euml;": 203, "Exists;": 8707, "ExponentialE;": 8519, "Fcy;": 1060, "Ffr;": [55349, 56585], "FilledSmallSquare;": 9724, "FilledVerySmallSquare;": 9642, "Fopf;": [55349, 56637], "ForAll;": 8704, "Fouriertrf;": 8497, "Fscr;": 8497, "GJcy;": 1027, GT: 62, "GT;": 62, "Gamma;": 915, "Gammad;": 988, "Gbreve;": 286, "Gcedil;": 290, "Gcirc;": 284, "Gcy;": 1043, "Gdot;": 288, "Gfr;": [55349, 56586], "Gg;": 8921, "Gopf;": [55349, 56638], "GreaterEqual;": 8805, "GreaterEqualLess;": 8923, "GreaterFullEqual;": 8807, "GreaterGreater;": 10914, "GreaterLess;": 8823, "GreaterSlantEqual;": 10878, "GreaterTilde;": 8819, "Gscr;": [55349, 56482], "Gt;": 8811, "HARDcy;": 1066, "Hacek;": 711, "Hat;": 94, "Hcirc;": 292, "Hfr;": 8460, "HilbertSpace;": 8459, "Hopf;": 8461, "HorizontalLine;": 9472, "Hscr;": 8459, "Hstrok;": 294, "HumpDownHump;": 8782, "HumpEqual;": 8783, "IEcy;": 1045, "IJlig;": 306, "IOcy;": 1025, Iacute: 205, "Iacute;": 205, Icirc: 206, "Icirc;": 206, "Icy;": 1048, "Idot;": 304, "Ifr;": 8465, Igrave: 204, "Igrave;": 204, "Im;": 8465, "Imacr;": 298, "ImaginaryI;": 8520, "Implies;": 8658, "Int;": 8748, "Integral;": 8747, "Intersection;": 8898, "InvisibleComma;": 8291, "InvisibleTimes;": 8290, "Iogon;": 302, "Iopf;": [55349, 56640], "Iota;": 921, "Iscr;": 8464, "Itilde;": 296, "Iukcy;": 1030, Iuml: 207, "Iuml;": 207, "Jcirc;": 308, "Jcy;": 1049, "Jfr;": [55349, 56589], "Jopf;": [55349, 56641], "Jscr;": [55349, 56485], "Jsercy;": 1032, "Jukcy;": 1028, "KHcy;": 1061, "KJcy;": 1036, "Kappa;": 922, "Kcedil;": 310, "Kcy;": 1050, "Kfr;": [55349, 56590], "Kopf;": [55349, 56642], "Kscr;": [55349, 56486], "LJcy;": 1033, LT: 60, "LT;": 60, "Lacute;": 313, "Lambda;": 923, "Lang;": 10218, "Laplacetrf;": 8466, "Larr;": 8606, "Lcaron;": 317, "Lcedil;": 315, "Lcy;": 1051, "LeftAngleBracket;": 10216, "LeftArrow;": 8592, "LeftArrowBar;": 8676, "LeftArrowRightArrow;": 8646, "LeftCeiling;": 8968, "LeftDoubleBracket;": 10214, "LeftDownTeeVector;": 10593, "LeftDownVector;": 8643, "LeftDownVectorBar;": 10585, "LeftFloor;": 8970, "LeftRightArrow;": 8596, "LeftRightVector;": 10574, "LeftTee;": 8867, "LeftTeeArrow;": 8612, "LeftTeeVector;": 10586, "LeftTriangle;": 8882, "LeftTriangleBar;": 10703, "LeftTriangleEqual;": 8884, "LeftUpDownVector;": 10577, "LeftUpTeeVector;": 10592, "LeftUpVector;": 8639, "LeftUpVectorBar;": 10584, "LeftVector;": 8636, "LeftVectorBar;": 10578, "Leftarrow;": 8656, "Leftrightarrow;": 8660, "LessEqualGreater;": 8922, "LessFullEqual;": 8806, "LessGreater;": 8822, "LessLess;": 10913, "LessSlantEqual;": 10877, "LessTilde;": 8818, "Lfr;": [55349, 56591], "Ll;": 8920, "Lleftarrow;": 8666, "Lmidot;": 319, "LongLeftArrow;": 10229, "LongLeftRightArrow;": 10231, "LongRightArrow;": 10230, "Longleftarrow;": 10232, "Longleftrightarrow;": 10234, "Longrightarrow;": 10233, "Lopf;": [55349, 56643], "LowerLeftArrow;": 8601, "LowerRightArrow;": 8600, "Lscr;": 8466, "Lsh;": 8624, "Lstrok;": 321, "Lt;": 8810, "Map;": 10501, "Mcy;": 1052, "MediumSpace;": 8287, "Mellintrf;": 8499, "Mfr;": [55349, 56592], "MinusPlus;": 8723, "Mopf;": [55349, 56644], "Mscr;": 8499, "Mu;": 924, "NJcy;": 1034, "Nacute;": 323, "Ncaron;": 327, "Ncedil;": 325, "Ncy;": 1053, "NegativeMediumSpace;": 8203, "NegativeThickSpace;": 8203, "NegativeThinSpace;": 8203, "NegativeVeryThinSpace;": 8203, "NestedGreaterGreater;": 8811, "NestedLessLess;": 8810, "NewLine;": 10, "Nfr;": [55349, 56593], "NoBreak;": 8288, "NonBreakingSpace;": 160, "Nopf;": 8469, "Not;": 10988, "NotCongruent;": 8802, "NotCupCap;": 8813, "NotDoubleVerticalBar;": 8742, "NotElement;": 8713, "NotEqual;": 8800, "NotEqualTilde;": [8770, 824], "NotExists;": 8708, "NotGreater;": 8815, "NotGreaterEqual;": 8817, "NotGreaterFullEqual;": [8807, 824], "NotGreaterGreater;": [8811, 824], "NotGreaterLess;": 8825, "NotGreaterSlantEqual;": [10878, 824], "NotGreaterTilde;": 8821, "NotHumpDownHump;": [8782, 824], "NotHumpEqual;": [8783, 824], "NotLeftTriangle;": 8938, "NotLeftTriangleBar;": [10703, 824], "NotLeftTriangleEqual;": 8940, "NotLess;": 8814, "NotLessEqual;": 8816, "NotLessGreater;": 8824, "NotLessLess;": [8810, 824], "NotLessSlantEqual;": [10877, 824], "NotLessTilde;": 8820, "NotNestedGreaterGreater;": [10914, 824], "NotNestedLessLess;": [10913, 824], "NotPrecedes;": 8832, "NotPrecedesEqual;": [10927, 824], "NotPrecedesSlantEqual;": 8928, "NotReverseElement;": 8716, "NotRightTriangle;": 8939, "NotRightTriangleBar;": [10704, 824], "NotRightTriangleEqual;": 8941, "NotSquareSubset;": [8847, 824], "NotSquareSubsetEqual;": 8930, "NotSquareSuperset;": [8848, 824], "NotSquareSupersetEqual;": 8931, "NotSubset;": [8834, 8402], "NotSubsetEqual;": 8840, "NotSucceeds;": 8833, "NotSucceedsEqual;": [10928, 824], "NotSucceedsSlantEqual;": 8929, "NotSucceedsTilde;": [8831, 824], "NotSuperset;": [8835, 8402], "NotSupersetEqual;": 8841, "NotTilde;": 8769, "NotTildeEqual;": 8772, "NotTildeFullEqual;": 8775, "NotTildeTilde;": 8777, "NotVerticalBar;": 8740, "Nscr;": [55349, 56489], Ntilde: 209, "Ntilde;": 209, "Nu;": 925, "OElig;": 338, Oacute: 211, "Oacute;": 211, Ocirc: 212, "Ocirc;": 212, "Ocy;": 1054, "Odblac;": 336, "Ofr;": [55349, 56594], Ograve: 210, "Ograve;": 210, "Omacr;": 332, "Omega;": 937, "Omicron;": 927, "Oopf;": [55349, 56646], "OpenCurlyDoubleQuote;": 8220, "OpenCurlyQuote;": 8216, "Or;": 10836, "Oscr;": [55349, 56490], Oslash: 216, "Oslash;": 216, Otilde: 213, "Otilde;": 213, "Otimes;": 10807, Ouml: 214, "Ouml;": 214, "OverBar;": 8254, "OverBrace;": 9182, "OverBracket;": 9140, "OverParenthesis;": 9180, "PartialD;": 8706, "Pcy;": 1055, "Pfr;": [55349, 56595], "Phi;": 934, "Pi;": 928, "PlusMinus;": 177, "Poincareplane;": 8460, "Popf;": 8473, "Pr;": 10939, "Precedes;": 8826, "PrecedesEqual;": 10927, "PrecedesSlantEqual;": 8828, "PrecedesTilde;": 8830, "Prime;": 8243, "Product;": 8719, "Proportion;": 8759, "Proportional;": 8733, "Pscr;": [55349, 56491], "Psi;": 936, QUOT: 34, "QUOT;": 34, "Qfr;": [55349, 56596], "Qopf;": 8474, "Qscr;": [55349, 56492], "RBarr;": 10512, REG: 174, "REG;": 174, "Racute;": 340, "Rang;": 10219, "Rarr;": 8608, "Rarrtl;": 10518, "Rcaron;": 344, "Rcedil;": 342, "Rcy;": 1056, "Re;": 8476, "ReverseElement;": 8715, "ReverseEquilibrium;": 8651, "ReverseUpEquilibrium;": 10607, "Rfr;": 8476, "Rho;": 929, "RightAngleBracket;": 10217, "RightArrow;": 8594, "RightArrowBar;": 8677, "RightArrowLeftArrow;": 8644, "RightCeiling;": 8969, "RightDoubleBracket;": 10215, "RightDownTeeVector;": 10589, "RightDownVector;": 8642, "RightDownVectorBar;": 10581, "RightFloor;": 8971, "RightTee;": 8866, "RightTeeArrow;": 8614, "RightTeeVector;": 10587, "RightTriangle;": 8883, "RightTriangleBar;": 10704, "RightTriangleEqual;": 8885, "RightUpDownVector;": 10575, "RightUpTeeVector;": 10588, "RightUpVector;": 8638, "RightUpVectorBar;": 10580, "RightVector;": 8640, "RightVectorBar;": 10579, "Rightarrow;": 8658, "Ropf;": 8477, "RoundImplies;": 10608, "Rrightarrow;": 8667, "Rscr;": 8475, "Rsh;": 8625, "RuleDelayed;": 10740, "SHCHcy;": 1065, "SHcy;": 1064, "SOFTcy;": 1068, "Sacute;": 346, "Sc;": 10940, "Scaron;": 352, "Scedil;": 350, "Scirc;": 348, "Scy;": 1057, "Sfr;": [55349, 56598], "ShortDownArrow;": 8595, "ShortLeftArrow;": 8592, "ShortRightArrow;": 8594, "ShortUpArrow;": 8593, "Sigma;": 931, "SmallCircle;": 8728, "Sopf;": [55349, 56650], "Sqrt;": 8730, "Square;": 9633, "SquareIntersection;": 8851, "SquareSubset;": 8847, "SquareSubsetEqual;": 8849, "SquareSuperset;": 8848, "SquareSupersetEqual;": 8850, "SquareUnion;": 8852, "Sscr;": [55349, 56494], "Star;": 8902, "Sub;": 8912, "Subset;": 8912, "SubsetEqual;": 8838, "Succeeds;": 8827, "SucceedsEqual;": 10928, "SucceedsSlantEqual;": 8829, "SucceedsTilde;": 8831, "SuchThat;": 8715, "Sum;": 8721, "Sup;": 8913, "Superset;": 8835, "SupersetEqual;": 8839, "Supset;": 8913, THORN: 222, "THORN;": 222, "TRADE;": 8482, "TSHcy;": 1035, "TScy;": 1062, "Tab;": 9, "Tau;": 932, "Tcaron;": 356, "Tcedil;": 354, "Tcy;": 1058, "Tfr;": [55349, 56599], "Therefore;": 8756, "Theta;": 920, "ThickSpace;": [8287, 8202], "ThinSpace;": 8201, "Tilde;": 8764, "TildeEqual;": 8771, "TildeFullEqual;": 8773, "TildeTilde;": 8776, "Topf;": [55349, 56651], "TripleDot;": 8411, "Tscr;": [55349, 56495], "Tstrok;": 358, Uacute: 218, "Uacute;": 218, "Uarr;": 8607, "Uarrocir;": 10569, "Ubrcy;": 1038, "Ubreve;": 364, Ucirc: 219, "Ucirc;": 219, "Ucy;": 1059, "Udblac;": 368, "Ufr;": [55349, 56600], Ugrave: 217, "Ugrave;": 217, "Umacr;": 362, "UnderBar;": 95, "UnderBrace;": 9183, "UnderBracket;": 9141, "UnderParenthesis;": 9181, "Union;": 8899, "UnionPlus;": 8846, "Uogon;": 370, "Uopf;": [55349, 56652], "UpArrow;": 8593, "UpArrowBar;": 10514, "UpArrowDownArrow;": 8645, "UpDownArrow;": 8597, "UpEquilibrium;": 10606, "UpTee;": 8869, "UpTeeArrow;": 8613, "Uparrow;": 8657, "Updownarrow;": 8661, "UpperLeftArrow;": 8598, "UpperRightArrow;": 8599, "Upsi;": 978, "Upsilon;": 933, "Uring;": 366, "Uscr;": [55349, 56496], "Utilde;": 360, Uuml: 220, "Uuml;": 220, "VDash;": 8875, "Vbar;": 10987, "Vcy;": 1042, "Vdash;": 8873, "Vdashl;": 10982, "Vee;": 8897, "Verbar;": 8214, "Vert;": 8214, "VerticalBar;": 8739, "VerticalLine;": 124, "VerticalSeparator;": 10072, "VerticalTilde;": 8768, "VeryThinSpace;": 8202, "Vfr;": [55349, 56601], "Vopf;": [55349, 56653], "Vscr;": [55349, 56497], "Vvdash;": 8874, "Wcirc;": 372, "Wedge;": 8896, "Wfr;": [55349, 56602], "Wopf;": [55349, 56654], "Wscr;": [55349, 56498], "Xfr;": [55349, 56603], "Xi;": 926, "Xopf;": [55349, 56655], "Xscr;": [55349, 56499], "YAcy;": 1071, "YIcy;": 1031, "YUcy;": 1070, Yacute: 221, "Yacute;": 221, "Ycirc;": 374, "Ycy;": 1067, "Yfr;": [55349, 56604], "Yopf;": [55349, 56656], "Yscr;": [55349, 56500], "Yuml;": 376, "ZHcy;": 1046, "Zacute;": 377, "Zcaron;": 381, "Zcy;": 1047, "Zdot;": 379, "ZeroWidthSpace;": 8203, "Zeta;": 918, "Zfr;": 8488, "Zopf;": 8484, "Zscr;": [55349, 56501], aacute: 225, "aacute;": 225, "abreve;": 259, "ac;": 8766, "acE;": [8766, 819], "acd;": 8767, acirc: 226, "acirc;": 226, acute: 180, "acute;": 180, "acy;": 1072, aelig: 230, "aelig;": 230, "af;": 8289, "afr;": [55349, 56606], agrave: 224, "agrave;": 224, "alefsym;": 8501, "aleph;": 8501, "alpha;": 945, "amacr;": 257, "amalg;": 10815, amp: 38, "amp;": 38, "and;": 8743, "andand;": 10837, "andd;": 10844, "andslope;": 10840, "andv;": 10842, "ang;": 8736, "ange;": 10660, "angle;": 8736, "angmsd;": 8737, "angmsdaa;": 10664, "angmsdab;": 10665, "angmsdac;": 10666, "angmsdad;": 10667, "angmsdae;": 10668, "angmsdaf;": 10669, "angmsdag;": 10670, "angmsdah;": 10671, "angrt;": 8735, "angrtvb;": 8894, "angrtvbd;": 10653, "angsph;": 8738, "angst;": 197, "angzarr;": 9084, "aogon;": 261, "aopf;": [55349, 56658], "ap;": 8776, "apE;": 10864, "apacir;": 10863, "ape;": 8778, "apid;": 8779, "apos;": 39, "approx;": 8776, "approxeq;": 8778, aring: 229, "aring;": 229, "ascr;": [55349, 56502], "ast;": 42, "asymp;": 8776, "asympeq;": 8781, atilde: 227, "atilde;": 227, auml: 228, "auml;": 228, "awconint;": 8755, "awint;": 10769, "bNot;": 10989, "backcong;": 8780, "backepsilon;": 1014, "backprime;": 8245, "backsim;": 8765, "backsimeq;": 8909, "barvee;": 8893, "barwed;": 8965, "barwedge;": 8965, "bbrk;": 9141, "bbrktbrk;": 9142, "bcong;": 8780, "bcy;": 1073, "bdquo;": 8222, "becaus;": 8757, "because;": 8757, "bemptyv;": 10672, "bepsi;": 1014, "bernou;": 8492, "beta;": 946, "beth;": 8502, "between;": 8812, "bfr;": [55349, 56607], "bigcap;": 8898, "bigcirc;": 9711, "bigcup;": 8899, "bigodot;": 10752, "bigoplus;": 10753, "bigotimes;": 10754, "bigsqcup;": 10758, "bigstar;": 9733, "bigtriangledown;": 9661, "bigtriangleup;": 9651, "biguplus;": 10756, "bigvee;": 8897, "bigwedge;": 8896, "bkarow;": 10509, "blacklozenge;": 10731, "blacksquare;": 9642, "blacktriangle;": 9652, "blacktriangledown;": 9662, "blacktriangleleft;": 9666, "blacktriangleright;": 9656, "blank;": 9251, "blk12;": 9618, "blk14;": 9617, "blk34;": 9619, "block;": 9608, "bne;": [61, 8421], "bnequiv;": [8801, 8421], "bnot;": 8976, "bopf;": [55349, 56659], "bot;": 8869, "bottom;": 8869, "bowtie;": 8904, "boxDL;": 9559, "boxDR;": 9556, "boxDl;": 9558, "boxDr;": 9555, "boxH;": 9552, "boxHD;": 9574, "boxHU;": 9577, "boxHd;": 9572, "boxHu;": 9575, "boxUL;": 9565, "boxUR;": 9562, "boxUl;": 9564, "boxUr;": 9561, "boxV;": 9553, "boxVH;": 9580, "boxVL;": 9571, "boxVR;": 9568, "boxVh;": 9579, "boxVl;": 9570, "boxVr;": 9567, "boxbox;": 10697, "boxdL;": 9557, "boxdR;": 9554, "boxdl;": 9488, "boxdr;": 9484, "boxh;": 9472, "boxhD;": 9573, "boxhU;": 9576, "boxhd;": 9516, "boxhu;": 9524, "boxminus;": 8863, "boxplus;": 8862, "boxtimes;": 8864, "boxuL;": 9563, "boxuR;": 9560, "boxul;": 9496, "boxur;": 9492, "boxv;": 9474, "boxvH;": 9578, "boxvL;": 9569, "boxvR;": 9566, "boxvh;": 9532, "boxvl;": 9508, "boxvr;": 9500, "bprime;": 8245, "breve;": 728, brvbar: 166, "brvbar;": 166, "bscr;": [55349, 56503], "bsemi;": 8271, "bsim;": 8765, "bsime;": 8909, "bsol;": 92, "bsolb;": 10693, "bsolhsub;": 10184, "bull;": 8226, "bullet;": 8226, "bump;": 8782, "bumpE;": 10926, "bumpe;": 8783, "bumpeq;": 8783, "cacute;": 263, "cap;": 8745, "capand;": 10820, "capbrcup;": 10825, "capcap;": 10827, "capcup;": 10823, "capdot;": 10816, "caps;": [8745, 65024], "caret;": 8257, "caron;": 711, "ccaps;": 10829, "ccaron;": 269, ccedil: 231, "ccedil;": 231, "ccirc;": 265, "ccups;": 10828, "ccupssm;": 10832, "cdot;": 267, cedil: 184, "cedil;": 184, "cemptyv;": 10674, cent: 162, "cent;": 162, "centerdot;": 183, "cfr;": [55349, 56608], "chcy;": 1095, "check;": 10003, "checkmark;": 10003, "chi;": 967, "cir;": 9675, "cirE;": 10691, "circ;": 710, "circeq;": 8791, "circlearrowleft;": 8634, "circlearrowright;": 8635, "circledR;": 174, "circledS;": 9416, "circledast;": 8859, "circledcirc;": 8858, "circleddash;": 8861, "cire;": 8791, "cirfnint;": 10768, "cirmid;": 10991, "cirscir;": 10690, "clubs;": 9827, "clubsuit;": 9827, "colon;": 58, "colone;": 8788, "coloneq;": 8788, "comma;": 44, "commat;": 64, "comp;": 8705, "compfn;": 8728, "complement;": 8705, "complexes;": 8450, "cong;": 8773, "congdot;": 10861, "conint;": 8750, "copf;": [55349, 56660], "coprod;": 8720, copy: 169, "copy;": 169, "copysr;": 8471, "crarr;": 8629, "cross;": 10007, "cscr;": [55349, 56504], "csub;": 10959, "csube;": 10961, "csup;": 10960, "csupe;": 10962, "ctdot;": 8943, "cudarrl;": 10552, "cudarrr;": 10549, "cuepr;": 8926, "cuesc;": 8927, "cularr;": 8630, "cularrp;": 10557, "cup;": 8746, "cupbrcap;": 10824, "cupcap;": 10822, "cupcup;": 10826, "cupdot;": 8845, "cupor;": 10821, "cups;": [8746, 65024], "curarr;": 8631, "curarrm;": 10556, "curlyeqprec;": 8926, "curlyeqsucc;": 8927, "curlyvee;": 8910, "curlywedge;": 8911, curren: 164, "curren;": 164, "curvearrowleft;": 8630, "curvearrowright;": 8631, "cuvee;": 8910, "cuwed;": 8911, "cwconint;": 8754, "cwint;": 8753, "cylcty;": 9005, "dArr;": 8659, "dHar;": 10597, "dagger;": 8224, "daleth;": 8504, "darr;": 8595, "dash;": 8208, "dashv;": 8867, "dbkarow;": 10511, "dblac;": 733, "dcaron;": 271, "dcy;": 1076, "dd;": 8518, "ddagger;": 8225, "ddarr;": 8650, "ddotseq;": 10871, deg: 176, "deg;": 176, "delta;": 948, "demptyv;": 10673, "dfisht;": 10623, "dfr;": [55349, 56609], "dharl;": 8643, "dharr;": 8642, "diam;": 8900, "diamond;": 8900, "diamondsuit;": 9830, "diams;": 9830, "die;": 168, "digamma;": 989, "disin;": 8946, "div;": 247, divide: 247, "divide;": 247, "divideontimes;": 8903, "divonx;": 8903, "djcy;": 1106, "dlcorn;": 8990, "dlcrop;": 8973, "dollar;": 36, "dopf;": [55349, 56661], "dot;": 729, "doteq;": 8784, "doteqdot;": 8785, "dotminus;": 8760, "dotplus;": 8724, "dotsquare;": 8865, "doublebarwedge;": 8966, "downarrow;": 8595, "downdownarrows;": 8650, "downharpoonleft;": 8643, "downharpoonright;": 8642, "drbkarow;": 10512, "drcorn;": 8991, "drcrop;": 8972, "dscr;": [55349, 56505], "dscy;": 1109, "dsol;": 10742, "dstrok;": 273, "dtdot;": 8945, "dtri;": 9663, "dtrif;": 9662, "duarr;": 8693, "duhar;": 10607, "dwangle;": 10662, "dzcy;": 1119, "dzigrarr;": 10239, "eDDot;": 10871, "eDot;": 8785, eacute: 233, "eacute;": 233, "easter;": 10862, "ecaron;": 283, "ecir;": 8790, ecirc: 234, "ecirc;": 234, "ecolon;": 8789, "ecy;": 1101, "edot;": 279, "ee;": 8519, "efDot;": 8786, "efr;": [55349, 56610], "eg;": 10906, egrave: 232, "egrave;": 232, "egs;": 10902, "egsdot;": 10904, "el;": 10905, "elinters;": 9191, "ell;": 8467, "els;": 10901, "elsdot;": 10903, "emacr;": 275, "empty;": 8709, "emptyset;": 8709, "emptyv;": 8709, "emsp13;": 8196, "emsp14;": 8197, "emsp;": 8195, "eng;": 331, "ensp;": 8194, "eogon;": 281, "eopf;": [55349, 56662], "epar;": 8917, "eparsl;": 10723, "eplus;": 10865, "epsi;": 949, "epsilon;": 949, "epsiv;": 1013, "eqcirc;": 8790, "eqcolon;": 8789, "eqsim;": 8770, "eqslantgtr;": 10902, "eqslantless;": 10901, "equals;": 61, "equest;": 8799, "equiv;": 8801, "equivDD;": 10872, "eqvparsl;": 10725, "erDot;": 8787, "erarr;": 10609, "escr;": 8495, "esdot;": 8784, "esim;": 8770, "eta;": 951, eth: 240, "eth;": 240, euml: 235, "euml;": 235, "euro;": 8364, "excl;": 33, "exist;": 8707, "expectation;": 8496, "exponentiale;": 8519, "fallingdotseq;": 8786, "fcy;": 1092, "female;": 9792, "ffilig;": 64259, "fflig;": 64256, "ffllig;": 64260, "ffr;": [55349, 56611], "filig;": 64257, "fjlig;": [102, 106], "flat;": 9837, "fllig;": 64258, "fltns;": 9649, "fnof;": 402, "fopf;": [55349, 56663], "forall;": 8704, "fork;": 8916, "forkv;": 10969, "fpartint;": 10765, frac12: 189, "frac12;": 189, "frac13;": 8531, frac14: 188, "frac14;": 188, "frac15;": 8533, "frac16;": 8537, "frac18;": 8539, "frac23;": 8532, "frac25;": 8534, frac34: 190, "frac34;": 190, "frac35;": 8535, "frac38;": 8540, "frac45;": 8536, "frac56;": 8538, "frac58;": 8541, "frac78;": 8542, "frasl;": 8260, "frown;": 8994, "fscr;": [55349, 56507], "gE;": 8807, "gEl;": 10892, "gacute;": 501, "gamma;": 947, "gammad;": 989, "gap;": 10886, "gbreve;": 287, "gcirc;": 285, "gcy;": 1075, "gdot;": 289, "ge;": 8805, "gel;": 8923, "geq;": 8805, "geqq;": 8807, "geqslant;": 10878, "ges;": 10878, "gescc;": 10921, "gesdot;": 10880, "gesdoto;": 10882, "gesdotol;": 10884, "gesl;": [8923, 65024], "gesles;": 10900, "gfr;": [55349, 56612], "gg;": 8811, "ggg;": 8921, "gimel;": 8503, "gjcy;": 1107, "gl;": 8823, "glE;": 10898, "gla;": 10917, "glj;": 10916, "gnE;": 8809, "gnap;": 10890, "gnapprox;": 10890, "gne;": 10888, "gneq;": 10888, "gneqq;": 8809, "gnsim;": 8935, "gopf;": [55349, 56664], "grave;": 96, "gscr;": 8458, "gsim;": 8819, "gsime;": 10894, "gsiml;": 10896, gt: 62, "gt;": 62, "gtcc;": 10919, "gtcir;": 10874, "gtdot;": 8919, "gtlPar;": 10645, "gtquest;": 10876, "gtrapprox;": 10886, "gtrarr;": 10616, "gtrdot;": 8919, "gtreqless;": 8923, "gtreqqless;": 10892, "gtrless;": 8823, "gtrsim;": 8819, "gvertneqq;": [8809, 65024], "gvnE;": [8809, 65024], "hArr;": 8660, "hairsp;": 8202, "half;": 189, "hamilt;": 8459, "hardcy;": 1098, "harr;": 8596, "harrcir;": 10568, "harrw;": 8621, "hbar;": 8463, "hcirc;": 293, "hearts;": 9829, "heartsuit;": 9829, "hellip;": 8230, "hercon;": 8889, "hfr;": [55349, 56613], "hksearow;": 10533, "hkswarow;": 10534, "hoarr;": 8703, "homtht;": 8763, "hookleftarrow;": 8617, "hookrightarrow;": 8618, "hopf;": [55349, 56665], "horbar;": 8213, "hscr;": [55349, 56509], "hslash;": 8463, "hstrok;": 295, "hybull;": 8259, "hyphen;": 8208, iacute: 237, "iacute;": 237, "ic;": 8291, icirc: 238, "icirc;": 238, "icy;": 1080, "iecy;": 1077, iexcl: 161, "iexcl;": 161, "iff;": 8660, "ifr;": [55349, 56614], igrave: 236, "igrave;": 236, "ii;": 8520, "iiiint;": 10764, "iiint;": 8749, "iinfin;": 10716, "iiota;": 8489, "ijlig;": 307, "imacr;": 299, "image;": 8465, "imagline;": 8464, "imagpart;": 8465, "imath;": 305, "imof;": 8887, "imped;": 437, "in;": 8712, "incare;": 8453, "infin;": 8734, "infintie;": 10717, "inodot;": 305, "int;": 8747, "intcal;": 8890, "integers;": 8484, "intercal;": 8890, "intlarhk;": 10775, "intprod;": 10812, "iocy;": 1105, "iogon;": 303, "iopf;": [55349, 56666], "iota;": 953, "iprod;": 10812, iquest: 191, "iquest;": 191, "iscr;": [55349, 56510], "isin;": 8712, "isinE;": 8953, "isindot;": 8949, "isins;": 8948, "isinsv;": 8947, "isinv;": 8712, "it;": 8290, "itilde;": 297, "iukcy;": 1110, iuml: 239, "iuml;": 239, "jcirc;": 309, "jcy;": 1081, "jfr;": [55349, 56615], "jmath;": 567, "jopf;": [55349, 56667], "jscr;": [55349, 56511], "jsercy;": 1112, "jukcy;": 1108, "kappa;": 954, "kappav;": 1008, "kcedil;": 311, "kcy;": 1082, "kfr;": [55349, 56616], "kgreen;": 312, "khcy;": 1093, "kjcy;": 1116, "kopf;": [55349, 56668], "kscr;": [55349, 56512], "lAarr;": 8666, "lArr;": 8656, "lAtail;": 10523, "lBarr;": 10510, "lE;": 8806, "lEg;": 10891, "lHar;": 10594, "lacute;": 314, "laemptyv;": 10676, "lagran;": 8466, "lambda;": 955, "lang;": 10216, "langd;": 10641, "langle;": 10216, "lap;": 10885, laquo: 171, "laquo;": 171, "larr;": 8592, "larrb;": 8676, "larrbfs;": 10527, "larrfs;": 10525, "larrhk;": 8617, "larrlp;": 8619, "larrpl;": 10553, "larrsim;": 10611, "larrtl;": 8610, "lat;": 10923, "latail;": 10521, "late;": 10925, "lates;": [10925, 65024], "lbarr;": 10508, "lbbrk;": 10098, "lbrace;": 123, "lbrack;": 91, "lbrke;": 10635, "lbrksld;": 10639, "lbrkslu;": 10637, "lcaron;": 318, "lcedil;": 316, "lceil;": 8968, "lcub;": 123, "lcy;": 1083, "ldca;": 10550, "ldquo;": 8220, "ldquor;": 8222, "ldrdhar;": 10599, "ldrushar;": 10571, "ldsh;": 8626, "le;": 8804, "leftarrow;": 8592, "leftarrowtail;": 8610, "leftharpoondown;": 8637, "leftharpoonup;": 8636, "leftleftarrows;": 8647, "leftrightarrow;": 8596, "leftrightarrows;": 8646, "leftrightharpoons;": 8651, "leftrightsquigarrow;": 8621, "leftthreetimes;": 8907, "leg;": 8922, "leq;": 8804, "leqq;": 8806, "leqslant;": 10877, "les;": 10877, "lescc;": 10920, "lesdot;": 10879, "lesdoto;": 10881, "lesdotor;": 10883, "lesg;": [8922, 65024], "lesges;": 10899, "lessapprox;": 10885, "lessdot;": 8918, "lesseqgtr;": 8922, "lesseqqgtr;": 10891, "lessgtr;": 8822, "lesssim;": 8818, "lfisht;": 10620, "lfloor;": 8970, "lfr;": [55349, 56617], "lg;": 8822, "lgE;": 10897, "lhard;": 8637, "lharu;": 8636, "lharul;": 10602, "lhblk;": 9604, "ljcy;": 1113, "ll;": 8810, "llarr;": 8647, "llcorner;": 8990, "llhard;": 10603, "lltri;": 9722, "lmidot;": 320, "lmoust;": 9136, "lmoustache;": 9136, "lnE;": 8808, "lnap;": 10889, "lnapprox;": 10889, "lne;": 10887, "lneq;": 10887, "lneqq;": 8808, "lnsim;": 8934, "loang;": 10220, "loarr;": 8701, "lobrk;": 10214, "longleftarrow;": 10229, "longleftrightarrow;": 10231, "longmapsto;": 10236, "longrightarrow;": 10230, "looparrowleft;": 8619, "looparrowright;": 8620, "lopar;": 10629, "lopf;": [55349, 56669], "loplus;": 10797, "lotimes;": 10804, "lowast;": 8727, "lowbar;": 95, "loz;": 9674, "lozenge;": 9674, "lozf;": 10731, "lpar;": 40, "lparlt;": 10643, "lrarr;": 8646, "lrcorner;": 8991, "lrhar;": 8651, "lrhard;": 10605, "lrm;": 8206, "lrtri;": 8895, "lsaquo;": 8249, "lscr;": [55349, 56513], "lsh;": 8624, "lsim;": 8818, "lsime;": 10893, "lsimg;": 10895, "lsqb;": 91, "lsquo;": 8216, "lsquor;": 8218, "lstrok;": 322, lt: 60, "lt;": 60, "ltcc;": 10918, "ltcir;": 10873, "ltdot;": 8918, "lthree;": 8907, "ltimes;": 8905, "ltlarr;": 10614, "ltquest;": 10875, "ltrPar;": 10646, "ltri;": 9667, "ltrie;": 8884, "ltrif;": 9666, "lurdshar;": 10570, "luruhar;": 10598, "lvertneqq;": [8808, 65024], "lvnE;": [8808, 65024], "mDDot;": 8762, macr: 175, "macr;": 175, "male;": 9794, "malt;": 10016, "maltese;": 10016, "map;": 8614, "mapsto;": 8614, "mapstodown;": 8615, "mapstoleft;": 8612, "mapstoup;": 8613, "marker;": 9646, "mcomma;": 10793, "mcy;": 1084, "mdash;": 8212, "measuredangle;": 8737, "mfr;": [55349, 56618], "mho;": 8487, micro: 181, "micro;": 181, "mid;": 8739, "midast;": 42, "midcir;": 10992, middot: 183, "middot;": 183, "minus;": 8722, "minusb;": 8863, "minusd;": 8760, "minusdu;": 10794, "mlcp;": 10971, "mldr;": 8230, "mnplus;": 8723, "models;": 8871, "mopf;": [55349, 56670], "mp;": 8723, "mscr;": [55349, 56514], "mstpos;": 8766, "mu;": 956, "multimap;": 8888, "mumap;": 8888, "nGg;": [8921, 824], "nGt;": [8811, 8402], "nGtv;": [8811, 824], "nLeftarrow;": 8653, "nLeftrightarrow;": 8654, "nLl;": [8920, 824], "nLt;": [8810, 8402], "nLtv;": [8810, 824], "nRightarrow;": 8655, "nVDash;": 8879, "nVdash;": 8878, "nabla;": 8711, "nacute;": 324, "nang;": [8736, 8402], "nap;": 8777, "napE;": [10864, 824], "napid;": [8779, 824], "napos;": 329, "napprox;": 8777, "natur;": 9838, "natural;": 9838, "naturals;": 8469, nbsp: 160, "nbsp;": 160, "nbump;": [8782, 824], "nbumpe;": [8783, 824], "ncap;": 10819, "ncaron;": 328, "ncedil;": 326, "ncong;": 8775, "ncongdot;": [10861, 824], "ncup;": 10818, "ncy;": 1085, "ndash;": 8211, "ne;": 8800, "neArr;": 8663, "nearhk;": 10532, "nearr;": 8599, "nearrow;": 8599, "nedot;": [8784, 824], "nequiv;": 8802, "nesear;": 10536, "nesim;": [8770, 824], "nexist;": 8708, "nexists;": 8708, "nfr;": [55349, 56619], "ngE;": [8807, 824], "nge;": 8817, "ngeq;": 8817, "ngeqq;": [8807, 824], "ngeqslant;": [10878, 824], "nges;": [10878, 824], "ngsim;": 8821, "ngt;": 8815, "ngtr;": 8815, "nhArr;": 8654, "nharr;": 8622, "nhpar;": 10994, "ni;": 8715, "nis;": 8956, "nisd;": 8954, "niv;": 8715, "njcy;": 1114, "nlArr;": 8653, "nlE;": [8806, 824], "nlarr;": 8602, "nldr;": 8229, "nle;": 8816, "nleftarrow;": 8602, "nleftrightarrow;": 8622, "nleq;": 8816, "nleqq;": [8806, 824], "nleqslant;": [10877, 824], "nles;": [10877, 824], "nless;": 8814, "nlsim;": 8820, "nlt;": 8814, "nltri;": 8938, "nltrie;": 8940, "nmid;": 8740, "nopf;": [55349, 56671], not: 172, "not;": 172, "notin;": 8713, "notinE;": [8953, 824], "notindot;": [8949, 824], "notinva;": 8713, "notinvb;": 8951, "notinvc;": 8950, "notni;": 8716, "notniva;": 8716, "notnivb;": 8958, "notnivc;": 8957, "npar;": 8742, "nparallel;": 8742, "nparsl;": [11005, 8421], "npart;": [8706, 824], "npolint;": 10772, "npr;": 8832, "nprcue;": 8928, "npre;": [10927, 824], "nprec;": 8832, "npreceq;": [10927, 824], "nrArr;": 8655, "nrarr;": 8603, "nrarrc;": [10547, 824], "nrarrw;": [8605, 824], "nrightarrow;": 8603, "nrtri;": 8939, "nrtrie;": 8941, "nsc;": 8833, "nsccue;": 8929, "nsce;": [10928, 824], "nscr;": [55349, 56515], "nshortmid;": 8740, "nshortparallel;": 8742, "nsim;": 8769, "nsime;": 8772, "nsimeq;": 8772, "nsmid;": 8740, "nspar;": 8742, "nsqsube;": 8930, "nsqsupe;": 8931, "nsub;": 8836, "nsubE;": [10949, 824], "nsube;": 8840, "nsubset;": [8834, 8402], "nsubseteq;": 8840, "nsubseteqq;": [10949, 824], "nsucc;": 8833, "nsucceq;": [10928, 824], "nsup;": 8837, "nsupE;": [10950, 824], "nsupe;": 8841, "nsupset;": [8835, 8402], "nsupseteq;": 8841, "nsupseteqq;": [10950, 824], "ntgl;": 8825, ntilde: 241, "ntilde;": 241, "ntlg;": 8824, "ntriangleleft;": 8938, "ntrianglelefteq;": 8940, "ntriangleright;": 8939, "ntrianglerighteq;": 8941, "nu;": 957, "num;": 35, "numero;": 8470, "numsp;": 8199, "nvDash;": 8877, "nvHarr;": 10500, "nvap;": [8781, 8402], "nvdash;": 8876, "nvge;": [8805, 8402], "nvgt;": [62, 8402], "nvinfin;": 10718, "nvlArr;": 10498, "nvle;": [8804, 8402], "nvlt;": [60, 8402], "nvltrie;": [8884, 8402], "nvrArr;": 10499, "nvrtrie;": [8885, 8402], "nvsim;": [8764, 8402], "nwArr;": 8662, "nwarhk;": 10531, "nwarr;": 8598, "nwarrow;": 8598, "nwnear;": 10535, "oS;": 9416, oacute: 243, "oacute;": 243, "oast;": 8859, "ocir;": 8858, ocirc: 244, "ocirc;": 244, "ocy;": 1086, "odash;": 8861, "odblac;": 337, "odiv;": 10808, "odot;": 8857, "odsold;": 10684, "oelig;": 339, "ofcir;": 10687, "ofr;": [55349, 56620], "ogon;": 731, ograve: 242, "ograve;": 242, "ogt;": 10689, "ohbar;": 10677, "ohm;": 937, "oint;": 8750, "olarr;": 8634, "olcir;": 10686, "olcross;": 10683, "oline;": 8254, "olt;": 10688, "omacr;": 333, "omega;": 969, "omicron;": 959, "omid;": 10678, "ominus;": 8854, "oopf;": [55349, 56672], "opar;": 10679, "operp;": 10681, "oplus;": 8853, "or;": 8744, "orarr;": 8635, "ord;": 10845, "order;": 8500, "orderof;": 8500, ordf: 170, "ordf;": 170, ordm: 186, "ordm;": 186, "origof;": 8886, "oror;": 10838, "orslope;": 10839, "orv;": 10843, "oscr;": 8500, oslash: 248, "oslash;": 248, "osol;": 8856, otilde: 245, "otilde;": 245, "otimes;": 8855, "otimesas;": 10806, ouml: 246, "ouml;": 246, "ovbar;": 9021, "par;": 8741, para: 182, "para;": 182, "parallel;": 8741, "parsim;": 10995, "parsl;": 11005, "part;": 8706, "pcy;": 1087, "percnt;": 37, "period;": 46, "permil;": 8240, "perp;": 8869, "pertenk;": 8241, "pfr;": [55349, 56621], "phi;": 966, "phiv;": 981, "phmmat;": 8499, "phone;": 9742, "pi;": 960, "pitchfork;": 8916, "piv;": 982, "planck;": 8463, "planckh;": 8462, "plankv;": 8463, "plus;": 43, "plusacir;": 10787, "plusb;": 8862, "pluscir;": 10786, "plusdo;": 8724, "plusdu;": 10789, "pluse;": 10866, plusmn: 177, "plusmn;": 177, "plussim;": 10790, "plustwo;": 10791, "pm;": 177, "pointint;": 10773, "popf;": [55349, 56673], pound: 163, "pound;": 163, "pr;": 8826, "prE;": 10931, "prap;": 10935, "prcue;": 8828, "pre;": 10927, "prec;": 8826, "precapprox;": 10935, "preccurlyeq;": 8828, "preceq;": 10927, "precnapprox;": 10937, "precneqq;": 10933, "precnsim;": 8936, "precsim;": 8830, "prime;": 8242, "primes;": 8473, "prnE;": 10933, "prnap;": 10937, "prnsim;": 8936, "prod;": 8719, "profalar;": 9006, "profline;": 8978, "profsurf;": 8979, "prop;": 8733, "propto;": 8733, "prsim;": 8830, "prurel;": 8880, "pscr;": [55349, 56517], "psi;": 968, "puncsp;": 8200, "qfr;": [55349, 56622], "qint;": 10764, "qopf;": [55349, 56674], "qprime;": 8279, "qscr;": [55349, 56518], "quaternions;": 8461, "quatint;": 10774, "quest;": 63, "questeq;": 8799, quot: 34, "quot;": 34, "rAarr;": 8667, "rArr;": 8658, "rAtail;": 10524, "rBarr;": 10511, "rHar;": 10596, "race;": [8765, 817], "racute;": 341, "radic;": 8730, "raemptyv;": 10675, "rang;": 10217, "rangd;": 10642, "range;": 10661, "rangle;": 10217, raquo: 187, "raquo;": 187, "rarr;": 8594, "rarrap;": 10613, "rarrb;": 8677, "rarrbfs;": 10528, "rarrc;": 10547, "rarrfs;": 10526, "rarrhk;": 8618, "rarrlp;": 8620, "rarrpl;": 10565, "rarrsim;": 10612, "rarrtl;": 8611, "rarrw;": 8605, "ratail;": 10522, "ratio;": 8758, "rationals;": 8474, "rbarr;": 10509, "rbbrk;": 10099, "rbrace;": 125, "rbrack;": 93, "rbrke;": 10636, "rbrksld;": 10638, "rbrkslu;": 10640, "rcaron;": 345, "rcedil;": 343, "rceil;": 8969, "rcub;": 125, "rcy;": 1088, "rdca;": 10551, "rdldhar;": 10601, "rdquo;": 8221, "rdquor;": 8221, "rdsh;": 8627, "real;": 8476, "realine;": 8475, "realpart;": 8476, "reals;": 8477, "rect;": 9645, reg: 174, "reg;": 174, "rfisht;": 10621, "rfloor;": 8971, "rfr;": [55349, 56623], "rhard;": 8641, "rharu;": 8640, "rharul;": 10604, "rho;": 961, "rhov;": 1009, "rightarrow;": 8594, "rightarrowtail;": 8611, "rightharpoondown;": 8641, "rightharpoonup;": 8640, "rightleftarrows;": 8644, "rightleftharpoons;": 8652, "rightrightarrows;": 8649, "rightsquigarrow;": 8605, "rightthreetimes;": 8908, "ring;": 730, "risingdotseq;": 8787, "rlarr;": 8644, "rlhar;": 8652, "rlm;": 8207, "rmoust;": 9137, "rmoustache;": 9137, "rnmid;": 10990, "roang;": 10221, "roarr;": 8702, "robrk;": 10215, "ropar;": 10630, "ropf;": [55349, 56675], "roplus;": 10798, "rotimes;": 10805, "rpar;": 41, "rpargt;": 10644, "rppolint;": 10770, "rrarr;": 8649, "rsaquo;": 8250, "rscr;": [55349, 56519], "rsh;": 8625, "rsqb;": 93, "rsquo;": 8217, "rsquor;": 8217, "rthree;": 8908, "rtimes;": 8906, "rtri;": 9657, "rtrie;": 8885, "rtrif;": 9656, "rtriltri;": 10702, "ruluhar;": 10600, "rx;": 8478, "sacute;": 347, "sbquo;": 8218, "sc;": 8827, "scE;": 10932, "scap;": 10936, "scaron;": 353, "sccue;": 8829, "sce;": 10928, "scedil;": 351, "scirc;": 349, "scnE;": 10934, "scnap;": 10938, "scnsim;": 8937, "scpolint;": 10771, "scsim;": 8831, "scy;": 1089, "sdot;": 8901, "sdotb;": 8865, "sdote;": 10854, "seArr;": 8664, "searhk;": 10533, "searr;": 8600, "searrow;": 8600, sect: 167, "sect;": 167, "semi;": 59, "seswar;": 10537, "setminus;": 8726, "setmn;": 8726, "sext;": 10038, "sfr;": [55349, 56624], "sfrown;": 8994, "sharp;": 9839, "shchcy;": 1097, "shcy;": 1096, "shortmid;": 8739, "shortparallel;": 8741, shy: 173, "shy;": 173, "sigma;": 963, "sigmaf;": 962, "sigmav;": 962, "sim;": 8764, "simdot;": 10858, "sime;": 8771, "simeq;": 8771, "simg;": 10910, "simgE;": 10912, "siml;": 10909, "simlE;": 10911, "simne;": 8774, "simplus;": 10788, "simrarr;": 10610, "slarr;": 8592, "smallsetminus;": 8726, "smashp;": 10803, "smeparsl;": 10724, "smid;": 8739, "smile;": 8995, "smt;": 10922, "smte;": 10924, "smtes;": [10924, 65024], "softcy;": 1100, "sol;": 47, "solb;": 10692, "solbar;": 9023, "sopf;": [55349, 56676], "spades;": 9824, "spadesuit;": 9824, "spar;": 8741, "sqcap;": 8851, "sqcaps;": [8851, 65024], "sqcup;": 8852, "sqcups;": [8852, 65024], "sqsub;": 8847, "sqsube;": 8849, "sqsubset;": 8847, "sqsubseteq;": 8849, "sqsup;": 8848, "sqsupe;": 8850, "sqsupset;": 8848, "sqsupseteq;": 8850, "squ;": 9633, "square;": 9633, "squarf;": 9642, "squf;": 9642, "srarr;": 8594, "sscr;": [55349, 56520], "ssetmn;": 8726, "ssmile;": 8995, "sstarf;": 8902, "star;": 9734, "starf;": 9733, "straightepsilon;": 1013, "straightphi;": 981, "strns;": 175, "sub;": 8834, "subE;": 10949, "subdot;": 10941, "sube;": 8838, "subedot;": 10947, "submult;": 10945, "subnE;": 10955, "subne;": 8842, "subplus;": 10943, "subrarr;": 10617, "subset;": 8834, "subseteq;": 8838, "subseteqq;": 10949, "subsetneq;": 8842, "subsetneqq;": 10955, "subsim;": 10951, "subsub;": 10965, "subsup;": 10963, "succ;": 8827, "succapprox;": 10936, "succcurlyeq;": 8829, "succeq;": 10928, "succnapprox;": 10938, "succneqq;": 10934, "succnsim;": 8937, "succsim;": 8831, "sum;": 8721, "sung;": 9834, sup1: 185, "sup1;": 185, sup2: 178, "sup2;": 178, sup3: 179, "sup3;": 179, "sup;": 8835, "supE;": 10950, "supdot;": 10942, "supdsub;": 10968, "supe;": 8839, "supedot;": 10948, "suphsol;": 10185, "suphsub;": 10967, "suplarr;": 10619, "supmult;": 10946, "supnE;": 10956, "supne;": 8843, "supplus;": 10944, "supset;": 8835, "supseteq;": 8839, "supseteqq;": 10950, "supsetneq;": 8843, "supsetneqq;": 10956, "supsim;": 10952, "supsub;": 10964, "supsup;": 10966, "swArr;": 8665, "swarhk;": 10534, "swarr;": 8601, "swarrow;": 8601, "swnwar;": 10538, szlig: 223, "szlig;": 223, "target;": 8982, "tau;": 964, "tbrk;": 9140, "tcaron;": 357, "tcedil;": 355, "tcy;": 1090, "tdot;": 8411, "telrec;": 8981, "tfr;": [55349, 56625], "there4;": 8756, "therefore;": 8756, "theta;": 952, "thetasym;": 977, "thetav;": 977, "thickapprox;": 8776, "thicksim;": 8764, "thinsp;": 8201, "thkap;": 8776, "thksim;": 8764, thorn: 254, "thorn;": 254, "tilde;": 732, times: 215, "times;": 215, "timesb;": 8864, "timesbar;": 10801, "timesd;": 10800, "tint;": 8749, "toea;": 10536, "top;": 8868, "topbot;": 9014, "topcir;": 10993, "topf;": [55349, 56677], "topfork;": 10970, "tosa;": 10537, "tprime;": 8244, "trade;": 8482, "triangle;": 9653, "triangledown;": 9663, "triangleleft;": 9667, "trianglelefteq;": 8884, "triangleq;": 8796, "triangleright;": 9657, "trianglerighteq;": 8885, "tridot;": 9708, "trie;": 8796, "triminus;": 10810, "triplus;": 10809, "trisb;": 10701, "tritime;": 10811, "trpezium;": 9186, "tscr;": [55349, 56521], "tscy;": 1094, "tshcy;": 1115, "tstrok;": 359, "twixt;": 8812, "twoheadleftarrow;": 8606, "twoheadrightarrow;": 8608, "uArr;": 8657, "uHar;": 10595, uacute: 250, "uacute;": 250, "uarr;": 8593, "ubrcy;": 1118, "ubreve;": 365, ucirc: 251, "ucirc;": 251, "ucy;": 1091, "udarr;": 8645, "udblac;": 369, "udhar;": 10606, "ufisht;": 10622, "ufr;": [55349, 56626], ugrave: 249, "ugrave;": 249, "uharl;": 8639, "uharr;": 8638, "uhblk;": 9600, "ulcorn;": 8988, "ulcorner;": 8988, "ulcrop;": 8975, "ultri;": 9720, "umacr;": 363, uml: 168, "uml;": 168, "uogon;": 371, "uopf;": [55349, 56678], "uparrow;": 8593, "updownarrow;": 8597, "upharpoonleft;": 8639, "upharpoonright;": 8638, "uplus;": 8846, "upsi;": 965, "upsih;": 978, "upsilon;": 965, "upuparrows;": 8648, "urcorn;": 8989, "urcorner;": 8989, "urcrop;": 8974, "uring;": 367, "urtri;": 9721, "uscr;": [55349, 56522], "utdot;": 8944, "utilde;": 361, "utri;": 9653, "utrif;": 9652, "uuarr;": 8648, uuml: 252, "uuml;": 252, "uwangle;": 10663, "vArr;": 8661, "vBar;": 10984, "vBarv;": 10985, "vDash;": 8872, "vangrt;": 10652, "varepsilon;": 1013, "varkappa;": 1008, "varnothing;": 8709, "varphi;": 981, "varpi;": 982, "varpropto;": 8733, "varr;": 8597, "varrho;": 1009, "varsigma;": 962, "varsubsetneq;": [8842, 65024], "varsubsetneqq;": [10955, 65024], "varsupsetneq;": [8843, 65024], "varsupsetneqq;": [10956, 65024], "vartheta;": 977, "vartriangleleft;": 8882, "vartriangleright;": 8883, "vcy;": 1074, "vdash;": 8866, "vee;": 8744, "veebar;": 8891, "veeeq;": 8794, "vellip;": 8942, "verbar;": 124, "vert;": 124, "vfr;": [55349, 56627], "vltri;": 8882, "vnsub;": [8834, 8402], "vnsup;": [8835, 8402], "vopf;": [55349, 56679], "vprop;": 8733, "vrtri;": 8883, "vscr;": [55349, 56523], "vsubnE;": [10955, 65024], "vsubne;": [8842, 65024], "vsupnE;": [10956, 65024], "vsupne;": [8843, 65024], "vzigzag;": 10650, "wcirc;": 373, "wedbar;": 10847, "wedge;": 8743, "wedgeq;": 8793, "weierp;": 8472, "wfr;": [55349, 56628], "wopf;": [55349, 56680], "wp;": 8472, "wr;": 8768, "wreath;": 8768, "wscr;": [55349, 56524], "xcap;": 8898, "xcirc;": 9711, "xcup;": 8899, "xdtri;": 9661, "xfr;": [55349, 56629], "xhArr;": 10234, "xharr;": 10231, "xi;": 958, "xlArr;": 10232, "xlarr;": 10229, "xmap;": 10236, "xnis;": 8955, "xodot;": 10752, "xopf;": [55349, 56681], "xoplus;": 10753, "xotime;": 10754, "xrArr;": 10233, "xrarr;": 10230, "xscr;": [55349, 56525], "xsqcup;": 10758, "xuplus;": 10756, "xutri;": 9651, "xvee;": 8897, "xwedge;": 8896, yacute: 253, "yacute;": 253, "yacy;": 1103, "ycirc;": 375, "ycy;": 1099, yen: 165, "yen;": 165, "yfr;": [55349, 56630], "yicy;": 1111, "yopf;": [55349, 56682], "yscr;": [55349, 56526], "yucy;": 1102, yuml: 255, "yuml;": 255, "zacute;": 378, "zcaron;": 382, "zcy;": 1079, "zdot;": 380, "zeetrf;": 8488, "zeta;": 950, "zfr;": [55349, 56631], "zhcy;": 1078, "zigrarr;": 8669, "zopf;": [55349, 56683], "zscr;": [55349, 56527], "zwj;": 8205, "zwnj;": 8204 }, pe = /(A(?:Elig;?|MP;?|acute;?|breve;|c(?:irc;?|y;)|fr;|grave;?|lpha;|macr;|nd;|o(?:gon;|pf;)|pplyFunction;|ring;?|s(?:cr;|sign;)|tilde;?|uml;?)|B(?:a(?:ckslash;|r(?:v;|wed;))|cy;|e(?:cause;|rnoullis;|ta;)|fr;|opf;|reve;|scr;|umpeq;)|C(?:Hcy;|OPY;?|a(?:cute;|p(?:;|italDifferentialD;)|yleys;)|c(?:aron;|edil;?|irc;|onint;)|dot;|e(?:dilla;|nterDot;)|fr;|hi;|ircle(?:Dot;|Minus;|Plus;|Times;)|lo(?:ckwiseContourIntegral;|seCurly(?:DoubleQuote;|Quote;))|o(?:lon(?:;|e;)|n(?:gruent;|int;|tourIntegral;)|p(?:f;|roduct;)|unterClockwiseContourIntegral;)|ross;|scr;|up(?:;|Cap;))|D(?:D(?:;|otrahd;)|Jcy;|Scy;|Zcy;|a(?:gger;|rr;|shv;)|c(?:aron;|y;)|el(?:;|ta;)|fr;|i(?:a(?:critical(?:Acute;|Do(?:t;|ubleAcute;)|Grave;|Tilde;)|mond;)|fferentialD;)|o(?:pf;|t(?:;|Dot;|Equal;)|uble(?:ContourIntegral;|Do(?:t;|wnArrow;)|L(?:eft(?:Arrow;|RightArrow;|Tee;)|ong(?:Left(?:Arrow;|RightArrow;)|RightArrow;))|Right(?:Arrow;|Tee;)|Up(?:Arrow;|DownArrow;)|VerticalBar;)|wn(?:Arrow(?:;|Bar;|UpArrow;)|Breve;|Left(?:RightVector;|TeeVector;|Vector(?:;|Bar;))|Right(?:TeeVector;|Vector(?:;|Bar;))|Tee(?:;|Arrow;)|arrow;))|s(?:cr;|trok;))|E(?:NG;|TH;?|acute;?|c(?:aron;|irc;?|y;)|dot;|fr;|grave;?|lement;|m(?:acr;|pty(?:SmallSquare;|VerySmallSquare;))|o(?:gon;|pf;)|psilon;|qu(?:al(?:;|Tilde;)|ilibrium;)|s(?:cr;|im;)|ta;|uml;?|x(?:ists;|ponentialE;))|F(?:cy;|fr;|illed(?:SmallSquare;|VerySmallSquare;)|o(?:pf;|rAll;|uriertrf;)|scr;)|G(?:Jcy;|T;?|amma(?:;|d;)|breve;|c(?:edil;|irc;|y;)|dot;|fr;|g;|opf;|reater(?:Equal(?:;|Less;)|FullEqual;|Greater;|Less;|SlantEqual;|Tilde;)|scr;|t;)|H(?:ARDcy;|a(?:cek;|t;)|circ;|fr;|ilbertSpace;|o(?:pf;|rizontalLine;)|s(?:cr;|trok;)|ump(?:DownHump;|Equal;))|I(?:Ecy;|Jlig;|Ocy;|acute;?|c(?:irc;?|y;)|dot;|fr;|grave;?|m(?:;|a(?:cr;|ginaryI;)|plies;)|n(?:t(?:;|e(?:gral;|rsection;))|visible(?:Comma;|Times;))|o(?:gon;|pf;|ta;)|scr;|tilde;|u(?:kcy;|ml;?))|J(?:c(?:irc;|y;)|fr;|opf;|s(?:cr;|ercy;)|ukcy;)|K(?:Hcy;|Jcy;|appa;|c(?:edil;|y;)|fr;|opf;|scr;)|L(?:Jcy;|T;?|a(?:cute;|mbda;|ng;|placetrf;|rr;)|c(?:aron;|edil;|y;)|e(?:ft(?:A(?:ngleBracket;|rrow(?:;|Bar;|RightArrow;))|Ceiling;|Do(?:ubleBracket;|wn(?:TeeVector;|Vector(?:;|Bar;)))|Floor;|Right(?:Arrow;|Vector;)|T(?:ee(?:;|Arrow;|Vector;)|riangle(?:;|Bar;|Equal;))|Up(?:DownVector;|TeeVector;|Vector(?:;|Bar;))|Vector(?:;|Bar;)|arrow;|rightarrow;)|ss(?:EqualGreater;|FullEqual;|Greater;|Less;|SlantEqual;|Tilde;))|fr;|l(?:;|eftarrow;)|midot;|o(?:ng(?:Left(?:Arrow;|RightArrow;)|RightArrow;|left(?:arrow;|rightarrow;)|rightarrow;)|pf;|wer(?:LeftArrow;|RightArrow;))|s(?:cr;|h;|trok;)|t;)|M(?:ap;|cy;|e(?:diumSpace;|llintrf;)|fr;|inusPlus;|opf;|scr;|u;)|N(?:Jcy;|acute;|c(?:aron;|edil;|y;)|e(?:gative(?:MediumSpace;|Thi(?:ckSpace;|nSpace;)|VeryThinSpace;)|sted(?:GreaterGreater;|LessLess;)|wLine;)|fr;|o(?:Break;|nBreakingSpace;|pf;|t(?:;|C(?:ongruent;|upCap;)|DoubleVerticalBar;|E(?:lement;|qual(?:;|Tilde;)|xists;)|Greater(?:;|Equal;|FullEqual;|Greater;|Less;|SlantEqual;|Tilde;)|Hump(?:DownHump;|Equal;)|Le(?:ftTriangle(?:;|Bar;|Equal;)|ss(?:;|Equal;|Greater;|Less;|SlantEqual;|Tilde;))|Nested(?:GreaterGreater;|LessLess;)|Precedes(?:;|Equal;|SlantEqual;)|R(?:everseElement;|ightTriangle(?:;|Bar;|Equal;))|S(?:quareSu(?:bset(?:;|Equal;)|perset(?:;|Equal;))|u(?:bset(?:;|Equal;)|cceeds(?:;|Equal;|SlantEqual;|Tilde;)|perset(?:;|Equal;)))|Tilde(?:;|Equal;|FullEqual;|Tilde;)|VerticalBar;))|scr;|tilde;?|u;)|O(?:Elig;|acute;?|c(?:irc;?|y;)|dblac;|fr;|grave;?|m(?:acr;|ega;|icron;)|opf;|penCurly(?:DoubleQuote;|Quote;)|r;|s(?:cr;|lash;?)|ti(?:lde;?|mes;)|uml;?|ver(?:B(?:ar;|rac(?:e;|ket;))|Parenthesis;))|P(?:artialD;|cy;|fr;|hi;|i;|lusMinus;|o(?:incareplane;|pf;)|r(?:;|ecedes(?:;|Equal;|SlantEqual;|Tilde;)|ime;|o(?:duct;|portion(?:;|al;)))|s(?:cr;|i;))|Q(?:UOT;?|fr;|opf;|scr;)|R(?:Barr;|EG;?|a(?:cute;|ng;|rr(?:;|tl;))|c(?:aron;|edil;|y;)|e(?:;|verse(?:E(?:lement;|quilibrium;)|UpEquilibrium;))|fr;|ho;|ight(?:A(?:ngleBracket;|rrow(?:;|Bar;|LeftArrow;))|Ceiling;|Do(?:ubleBracket;|wn(?:TeeVector;|Vector(?:;|Bar;)))|Floor;|T(?:ee(?:;|Arrow;|Vector;)|riangle(?:;|Bar;|Equal;))|Up(?:DownVector;|TeeVector;|Vector(?:;|Bar;))|Vector(?:;|Bar;)|arrow;)|o(?:pf;|undImplies;)|rightarrow;|s(?:cr;|h;)|uleDelayed;)|S(?:H(?:CHcy;|cy;)|OFTcy;|acute;|c(?:;|aron;|edil;|irc;|y;)|fr;|hort(?:DownArrow;|LeftArrow;|RightArrow;|UpArrow;)|igma;|mallCircle;|opf;|q(?:rt;|uare(?:;|Intersection;|Su(?:bset(?:;|Equal;)|perset(?:;|Equal;))|Union;))|scr;|tar;|u(?:b(?:;|set(?:;|Equal;))|c(?:ceeds(?:;|Equal;|SlantEqual;|Tilde;)|hThat;)|m;|p(?:;|erset(?:;|Equal;)|set;)))|T(?:HORN;?|RADE;|S(?:Hcy;|cy;)|a(?:b;|u;)|c(?:aron;|edil;|y;)|fr;|h(?:e(?:refore;|ta;)|i(?:ckSpace;|nSpace;))|ilde(?:;|Equal;|FullEqual;|Tilde;)|opf;|ripleDot;|s(?:cr;|trok;))|U(?:a(?:cute;?|rr(?:;|ocir;))|br(?:cy;|eve;)|c(?:irc;?|y;)|dblac;|fr;|grave;?|macr;|n(?:der(?:B(?:ar;|rac(?:e;|ket;))|Parenthesis;)|ion(?:;|Plus;))|o(?:gon;|pf;)|p(?:Arrow(?:;|Bar;|DownArrow;)|DownArrow;|Equilibrium;|Tee(?:;|Arrow;)|arrow;|downarrow;|per(?:LeftArrow;|RightArrow;)|si(?:;|lon;))|ring;|scr;|tilde;|uml;?)|V(?:Dash;|bar;|cy;|dash(?:;|l;)|e(?:e;|r(?:bar;|t(?:;|ical(?:Bar;|Line;|Separator;|Tilde;))|yThinSpace;))|fr;|opf;|scr;|vdash;)|W(?:circ;|edge;|fr;|opf;|scr;)|X(?:fr;|i;|opf;|scr;)|Y(?:Acy;|Icy;|Ucy;|acute;?|c(?:irc;|y;)|fr;|opf;|scr;|uml;)|Z(?:Hcy;|acute;|c(?:aron;|y;)|dot;|e(?:roWidthSpace;|ta;)|fr;|opf;|scr;)|a(?:acute;?|breve;|c(?:;|E;|d;|irc;?|ute;?|y;)|elig;?|f(?:;|r;)|grave;?|l(?:e(?:fsym;|ph;)|pha;)|m(?:a(?:cr;|lg;)|p;?)|n(?:d(?:;|and;|d;|slope;|v;)|g(?:;|e;|le;|msd(?:;|a(?:a;|b;|c;|d;|e;|f;|g;|h;))|rt(?:;|vb(?:;|d;))|s(?:ph;|t;)|zarr;))|o(?:gon;|pf;)|p(?:;|E;|acir;|e;|id;|os;|prox(?:;|eq;))|ring;?|s(?:cr;|t;|ymp(?:;|eq;))|tilde;?|uml;?|w(?:conint;|int;))|b(?:Not;|a(?:ck(?:cong;|epsilon;|prime;|sim(?:;|eq;))|r(?:vee;|wed(?:;|ge;)))|brk(?:;|tbrk;)|c(?:ong;|y;)|dquo;|e(?:caus(?:;|e;)|mptyv;|psi;|rnou;|t(?:a;|h;|ween;))|fr;|ig(?:c(?:ap;|irc;|up;)|o(?:dot;|plus;|times;)|s(?:qcup;|tar;)|triangle(?:down;|up;)|uplus;|vee;|wedge;)|karow;|l(?:a(?:ck(?:lozenge;|square;|triangle(?:;|down;|left;|right;))|nk;)|k(?:1(?:2;|4;)|34;)|ock;)|n(?:e(?:;|quiv;)|ot;)|o(?:pf;|t(?:;|tom;)|wtie;|x(?:D(?:L;|R;|l;|r;)|H(?:;|D;|U;|d;|u;)|U(?:L;|R;|l;|r;)|V(?:;|H;|L;|R;|h;|l;|r;)|box;|d(?:L;|R;|l;|r;)|h(?:;|D;|U;|d;|u;)|minus;|plus;|times;|u(?:L;|R;|l;|r;)|v(?:;|H;|L;|R;|h;|l;|r;)))|prime;|r(?:eve;|vbar;?)|s(?:cr;|emi;|im(?:;|e;)|ol(?:;|b;|hsub;))|u(?:ll(?:;|et;)|mp(?:;|E;|e(?:;|q;))))|c(?:a(?:cute;|p(?:;|and;|brcup;|c(?:ap;|up;)|dot;|s;)|r(?:et;|on;))|c(?:a(?:ps;|ron;)|edil;?|irc;|ups(?:;|sm;))|dot;|e(?:dil;?|mptyv;|nt(?:;|erdot;|))|fr;|h(?:cy;|eck(?:;|mark;)|i;)|ir(?:;|E;|c(?:;|eq;|le(?:arrow(?:left;|right;)|d(?:R;|S;|ast;|circ;|dash;)))|e;|fnint;|mid;|scir;)|lubs(?:;|uit;)|o(?:lon(?:;|e(?:;|q;))|m(?:ma(?:;|t;)|p(?:;|fn;|le(?:ment;|xes;)))|n(?:g(?:;|dot;)|int;)|p(?:f;|rod;|y(?:;|sr;|)))|r(?:arr;|oss;)|s(?:cr;|u(?:b(?:;|e;)|p(?:;|e;)))|tdot;|u(?:darr(?:l;|r;)|e(?:pr;|sc;)|larr(?:;|p;)|p(?:;|brcap;|c(?:ap;|up;)|dot;|or;|s;)|r(?:arr(?:;|m;)|ly(?:eq(?:prec;|succ;)|vee;|wedge;)|ren;?|vearrow(?:left;|right;))|vee;|wed;)|w(?:conint;|int;)|ylcty;)|d(?:Arr;|Har;|a(?:gger;|leth;|rr;|sh(?:;|v;))|b(?:karow;|lac;)|c(?:aron;|y;)|d(?:;|a(?:gger;|rr;)|otseq;)|e(?:g;?|lta;|mptyv;)|f(?:isht;|r;)|har(?:l;|r;)|i(?:am(?:;|ond(?:;|suit;)|s;)|e;|gamma;|sin;|v(?:;|ide(?:;|ontimes;|)|onx;))|jcy;|lc(?:orn;|rop;)|o(?:llar;|pf;|t(?:;|eq(?:;|dot;)|minus;|plus;|square;)|ublebarwedge;|wn(?:arrow;|downarrows;|harpoon(?:left;|right;)))|r(?:bkarow;|c(?:orn;|rop;))|s(?:c(?:r;|y;)|ol;|trok;)|t(?:dot;|ri(?:;|f;))|u(?:arr;|har;)|wangle;|z(?:cy;|igrarr;))|e(?:D(?:Dot;|ot;)|a(?:cute;?|ster;)|c(?:aron;|ir(?:;|c;?)|olon;|y;)|dot;|e;|f(?:Dot;|r;)|g(?:;|rave;?|s(?:;|dot;))|l(?:;|inters;|l;|s(?:;|dot;))|m(?:acr;|pty(?:;|set;|v;)|sp(?:1(?:3;|4;)|;))|n(?:g;|sp;)|o(?:gon;|pf;)|p(?:ar(?:;|sl;)|lus;|si(?:;|lon;|v;))|q(?:c(?:irc;|olon;)|s(?:im;|lant(?:gtr;|less;))|u(?:als;|est;|iv(?:;|DD;))|vparsl;)|r(?:Dot;|arr;)|s(?:cr;|dot;|im;)|t(?:a;|h;?)|u(?:ml;?|ro;)|x(?:cl;|ist;|p(?:ectation;|onentiale;)))|f(?:allingdotseq;|cy;|emale;|f(?:ilig;|l(?:ig;|lig;)|r;)|ilig;|jlig;|l(?:at;|lig;|tns;)|nof;|o(?:pf;|r(?:all;|k(?:;|v;)))|partint;|r(?:a(?:c(?:1(?:2;?|3;|4;?|5;|6;|8;)|2(?:3;|5;)|3(?:4;?|5;|8;)|45;|5(?:6;|8;)|78;)|sl;)|own;)|scr;)|g(?:E(?:;|l;)|a(?:cute;|mma(?:;|d;)|p;)|breve;|c(?:irc;|y;)|dot;|e(?:;|l;|q(?:;|q;|slant;)|s(?:;|cc;|dot(?:;|o(?:;|l;))|l(?:;|es;)))|fr;|g(?:;|g;)|imel;|jcy;|l(?:;|E;|a;|j;)|n(?:E;|ap(?:;|prox;)|e(?:;|q(?:;|q;))|sim;)|opf;|rave;|s(?:cr;|im(?:;|e;|l;))|t(?:;|c(?:c;|ir;)|dot;|lPar;|quest;|r(?:a(?:pprox;|rr;)|dot;|eq(?:less;|qless;)|less;|sim;)|)|v(?:ertneqq;|nE;))|h(?:Arr;|a(?:irsp;|lf;|milt;|r(?:dcy;|r(?:;|cir;|w;)))|bar;|circ;|e(?:arts(?:;|uit;)|llip;|rcon;)|fr;|ks(?:earow;|warow;)|o(?:arr;|mtht;|ok(?:leftarrow;|rightarrow;)|pf;|rbar;)|s(?:cr;|lash;|trok;)|y(?:bull;|phen;))|i(?:acute;?|c(?:;|irc;?|y;)|e(?:cy;|xcl;?)|f(?:f;|r;)|grave;?|i(?:;|i(?:int;|nt;)|nfin;|ota;)|jlig;|m(?:a(?:cr;|g(?:e;|line;|part;)|th;)|of;|ped;)|n(?:;|care;|fin(?:;|tie;)|odot;|t(?:;|cal;|e(?:gers;|rcal;)|larhk;|prod;))|o(?:cy;|gon;|pf;|ta;)|prod;|quest;?|s(?:cr;|in(?:;|E;|dot;|s(?:;|v;)|v;))|t(?:;|ilde;)|u(?:kcy;|ml;?))|j(?:c(?:irc;|y;)|fr;|math;|opf;|s(?:cr;|ercy;)|ukcy;)|k(?:appa(?:;|v;)|c(?:edil;|y;)|fr;|green;|hcy;|jcy;|opf;|scr;)|l(?:A(?:arr;|rr;|tail;)|Barr;|E(?:;|g;)|Har;|a(?:cute;|emptyv;|gran;|mbda;|ng(?:;|d;|le;)|p;|quo;?|rr(?:;|b(?:;|fs;)|fs;|hk;|lp;|pl;|sim;|tl;)|t(?:;|ail;|e(?:;|s;)))|b(?:arr;|brk;|r(?:ac(?:e;|k;)|k(?:e;|sl(?:d;|u;))))|c(?:aron;|e(?:dil;|il;)|ub;|y;)|d(?:ca;|quo(?:;|r;)|r(?:dhar;|ushar;)|sh;)|e(?:;|ft(?:arrow(?:;|tail;)|harpoon(?:down;|up;)|leftarrows;|right(?:arrow(?:;|s;)|harpoons;|squigarrow;)|threetimes;)|g;|q(?:;|q;|slant;)|s(?:;|cc;|dot(?:;|o(?:;|r;))|g(?:;|es;)|s(?:approx;|dot;|eq(?:gtr;|qgtr;)|gtr;|sim;)))|f(?:isht;|loor;|r;)|g(?:;|E;)|h(?:ar(?:d;|u(?:;|l;))|blk;)|jcy;|l(?:;|arr;|corner;|hard;|tri;)|m(?:idot;|oust(?:;|ache;))|n(?:E;|ap(?:;|prox;)|e(?:;|q(?:;|q;))|sim;)|o(?:a(?:ng;|rr;)|brk;|ng(?:left(?:arrow;|rightarrow;)|mapsto;|rightarrow;)|oparrow(?:left;|right;)|p(?:ar;|f;|lus;)|times;|w(?:ast;|bar;)|z(?:;|enge;|f;))|par(?:;|lt;)|r(?:arr;|corner;|har(?:;|d;)|m;|tri;)|s(?:aquo;|cr;|h;|im(?:;|e;|g;)|q(?:b;|uo(?:;|r;))|trok;)|t(?:;|c(?:c;|ir;)|dot;|hree;|imes;|larr;|quest;|r(?:Par;|i(?:;|e;|f;))|)|ur(?:dshar;|uhar;)|v(?:ertneqq;|nE;))|m(?:DDot;|a(?:cr;?|l(?:e;|t(?:;|ese;))|p(?:;|sto(?:;|down;|left;|up;))|rker;)|c(?:omma;|y;)|dash;|easuredangle;|fr;|ho;|i(?:cro;?|d(?:;|ast;|cir;|dot;?)|nus(?:;|b;|d(?:;|u;)))|l(?:cp;|dr;)|nplus;|o(?:dels;|pf;)|p;|s(?:cr;|tpos;)|u(?:;|ltimap;|map;))|n(?:G(?:g;|t(?:;|v;))|L(?:eft(?:arrow;|rightarrow;)|l;|t(?:;|v;))|Rightarrow;|V(?:Dash;|dash;)|a(?:bla;|cute;|ng;|p(?:;|E;|id;|os;|prox;)|tur(?:;|al(?:;|s;)))|b(?:sp;?|ump(?:;|e;))|c(?:a(?:p;|ron;)|edil;|ong(?:;|dot;)|up;|y;)|dash;|e(?:;|Arr;|ar(?:hk;|r(?:;|ow;))|dot;|quiv;|s(?:ear;|im;)|xist(?:;|s;))|fr;|g(?:E;|e(?:;|q(?:;|q;|slant;)|s;)|sim;|t(?:;|r;))|h(?:Arr;|arr;|par;)|i(?:;|s(?:;|d;)|v;)|jcy;|l(?:Arr;|E;|arr;|dr;|e(?:;|ft(?:arrow;|rightarrow;)|q(?:;|q;|slant;)|s(?:;|s;))|sim;|t(?:;|ri(?:;|e;)))|mid;|o(?:pf;|t(?:;|in(?:;|E;|dot;|v(?:a;|b;|c;))|ni(?:;|v(?:a;|b;|c;))|))|p(?:ar(?:;|allel;|sl;|t;)|olint;|r(?:;|cue;|e(?:;|c(?:;|eq;))))|r(?:Arr;|arr(?:;|c;|w;)|ightarrow;|tri(?:;|e;))|s(?:c(?:;|cue;|e;|r;)|hort(?:mid;|parallel;)|im(?:;|e(?:;|q;))|mid;|par;|qsu(?:be;|pe;)|u(?:b(?:;|E;|e;|set(?:;|eq(?:;|q;)))|cc(?:;|eq;)|p(?:;|E;|e;|set(?:;|eq(?:;|q;)))))|t(?:gl;|ilde;?|lg;|riangle(?:left(?:;|eq;)|right(?:;|eq;)))|u(?:;|m(?:;|ero;|sp;))|v(?:Dash;|Harr;|ap;|dash;|g(?:e;|t;)|infin;|l(?:Arr;|e;|t(?:;|rie;))|r(?:Arr;|trie;)|sim;)|w(?:Arr;|ar(?:hk;|r(?:;|ow;))|near;))|o(?:S;|a(?:cute;?|st;)|c(?:ir(?:;|c;?)|y;)|d(?:ash;|blac;|iv;|ot;|sold;)|elig;|f(?:cir;|r;)|g(?:on;|rave;?|t;)|h(?:bar;|m;)|int;|l(?:arr;|c(?:ir;|ross;)|ine;|t;)|m(?:acr;|ega;|i(?:cron;|d;|nus;))|opf;|p(?:ar;|erp;|lus;)|r(?:;|arr;|d(?:;|er(?:;|of;)|f;?|m;?)|igof;|or;|slope;|v;)|s(?:cr;|lash;?|ol;)|ti(?:lde;?|mes(?:;|as;))|uml;?|vbar;)|p(?:ar(?:;|a(?:;|llel;|)|s(?:im;|l;)|t;)|cy;|er(?:cnt;|iod;|mil;|p;|tenk;)|fr;|h(?:i(?:;|v;)|mmat;|one;)|i(?:;|tchfork;|v;)|l(?:an(?:ck(?:;|h;)|kv;)|us(?:;|acir;|b;|cir;|d(?:o;|u;)|e;|mn;?|sim;|two;))|m;|o(?:intint;|pf;|und;?)|r(?:;|E;|ap;|cue;|e(?:;|c(?:;|approx;|curlyeq;|eq;|n(?:approx;|eqq;|sim;)|sim;))|ime(?:;|s;)|n(?:E;|ap;|sim;)|o(?:d;|f(?:alar;|line;|surf;)|p(?:;|to;))|sim;|urel;)|s(?:cr;|i;)|uncsp;)|q(?:fr;|int;|opf;|prime;|scr;|u(?:at(?:ernions;|int;)|est(?:;|eq;)|ot;?))|r(?:A(?:arr;|rr;|tail;)|Barr;|Har;|a(?:c(?:e;|ute;)|dic;|emptyv;|ng(?:;|d;|e;|le;)|quo;?|rr(?:;|ap;|b(?:;|fs;)|c;|fs;|hk;|lp;|pl;|sim;|tl;|w;)|t(?:ail;|io(?:;|nals;)))|b(?:arr;|brk;|r(?:ac(?:e;|k;)|k(?:e;|sl(?:d;|u;))))|c(?:aron;|e(?:dil;|il;)|ub;|y;)|d(?:ca;|ldhar;|quo(?:;|r;)|sh;)|e(?:al(?:;|ine;|part;|s;)|ct;|g;?)|f(?:isht;|loor;|r;)|h(?:ar(?:d;|u(?:;|l;))|o(?:;|v;))|i(?:ght(?:arrow(?:;|tail;)|harpoon(?:down;|up;)|left(?:arrows;|harpoons;)|rightarrows;|squigarrow;|threetimes;)|ng;|singdotseq;)|l(?:arr;|har;|m;)|moust(?:;|ache;)|nmid;|o(?:a(?:ng;|rr;)|brk;|p(?:ar;|f;|lus;)|times;)|p(?:ar(?:;|gt;)|polint;)|rarr;|s(?:aquo;|cr;|h;|q(?:b;|uo(?:;|r;)))|t(?:hree;|imes;|ri(?:;|e;|f;|ltri;))|uluhar;|x;)|s(?:acute;|bquo;|c(?:;|E;|a(?:p;|ron;)|cue;|e(?:;|dil;)|irc;|n(?:E;|ap;|sim;)|polint;|sim;|y;)|dot(?:;|b;|e;)|e(?:Arr;|ar(?:hk;|r(?:;|ow;))|ct;?|mi;|swar;|tm(?:inus;|n;)|xt;)|fr(?:;|own;)|h(?:arp;|c(?:hcy;|y;)|ort(?:mid;|parallel;)|y;?)|i(?:gma(?:;|f;|v;)|m(?:;|dot;|e(?:;|q;)|g(?:;|E;)|l(?:;|E;)|ne;|plus;|rarr;))|larr;|m(?:a(?:llsetminus;|shp;)|eparsl;|i(?:d;|le;)|t(?:;|e(?:;|s;)))|o(?:ftcy;|l(?:;|b(?:;|ar;))|pf;)|pa(?:des(?:;|uit;)|r;)|q(?:c(?:ap(?:;|s;)|up(?:;|s;))|su(?:b(?:;|e;|set(?:;|eq;))|p(?:;|e;|set(?:;|eq;)))|u(?:;|ar(?:e;|f;)|f;))|rarr;|s(?:cr;|etmn;|mile;|tarf;)|t(?:ar(?:;|f;)|r(?:aight(?:epsilon;|phi;)|ns;))|u(?:b(?:;|E;|dot;|e(?:;|dot;)|mult;|n(?:E;|e;)|plus;|rarr;|s(?:et(?:;|eq(?:;|q;)|neq(?:;|q;))|im;|u(?:b;|p;)))|cc(?:;|approx;|curlyeq;|eq;|n(?:approx;|eqq;|sim;)|sim;)|m;|ng;|p(?:1;?|2;?|3;?|;|E;|d(?:ot;|sub;)|e(?:;|dot;)|hs(?:ol;|ub;)|larr;|mult;|n(?:E;|e;)|plus;|s(?:et(?:;|eq(?:;|q;)|neq(?:;|q;))|im;|u(?:b;|p;))))|w(?:Arr;|ar(?:hk;|r(?:;|ow;))|nwar;)|zlig;?)|t(?:a(?:rget;|u;)|brk;|c(?:aron;|edil;|y;)|dot;|elrec;|fr;|h(?:e(?:re(?:4;|fore;)|ta(?:;|sym;|v;))|i(?:ck(?:approx;|sim;)|nsp;)|k(?:ap;|sim;)|orn;?)|i(?:lde;|mes(?:;|b(?:;|ar;)|d;|)|nt;)|o(?:ea;|p(?:;|bot;|cir;|f(?:;|ork;))|sa;)|prime;|r(?:ade;|i(?:angle(?:;|down;|left(?:;|eq;)|q;|right(?:;|eq;))|dot;|e;|minus;|plus;|sb;|time;)|pezium;)|s(?:c(?:r;|y;)|hcy;|trok;)|w(?:ixt;|ohead(?:leftarrow;|rightarrow;)))|u(?:Arr;|Har;|a(?:cute;?|rr;)|br(?:cy;|eve;)|c(?:irc;?|y;)|d(?:arr;|blac;|har;)|f(?:isht;|r;)|grave;?|h(?:ar(?:l;|r;)|blk;)|l(?:c(?:orn(?:;|er;)|rop;)|tri;)|m(?:acr;|l;?)|o(?:gon;|pf;)|p(?:arrow;|downarrow;|harpoon(?:left;|right;)|lus;|si(?:;|h;|lon;)|uparrows;)|r(?:c(?:orn(?:;|er;)|rop;)|ing;|tri;)|scr;|t(?:dot;|ilde;|ri(?:;|f;))|u(?:arr;|ml;?)|wangle;)|v(?:Arr;|Bar(?:;|v;)|Dash;|a(?:ngrt;|r(?:epsilon;|kappa;|nothing;|p(?:hi;|i;|ropto;)|r(?:;|ho;)|s(?:igma;|u(?:bsetneq(?:;|q;)|psetneq(?:;|q;)))|t(?:heta;|riangle(?:left;|right;))))|cy;|dash;|e(?:e(?:;|bar;|eq;)|llip;|r(?:bar;|t;))|fr;|ltri;|nsu(?:b;|p;)|opf;|prop;|rtri;|s(?:cr;|u(?:bn(?:E;|e;)|pn(?:E;|e;)))|zigzag;)|w(?:circ;|e(?:d(?:bar;|ge(?:;|q;))|ierp;)|fr;|opf;|p;|r(?:;|eath;)|scr;)|x(?:c(?:ap;|irc;|up;)|dtri;|fr;|h(?:Arr;|arr;)|i;|l(?:Arr;|arr;)|map;|nis;|o(?:dot;|p(?:f;|lus;)|time;)|r(?:Arr;|arr;)|s(?:cr;|qcup;)|u(?:plus;|tri;)|vee;|wedge;)|y(?:ac(?:ute;?|y;)|c(?:irc;|y;)|en;?|fr;|icy;|opf;|scr;|u(?:cy;|ml;?))|z(?:acute;|c(?:aron;|y;)|dot;|e(?:etrf;|ta;)|fr;|hcy;|igrarr;|opf;|scr;|w(?:j;|nj;)))|[\s\S]/g, me = 32, he = /[^\r"&\u0000]+/g, ge = /[^\r'&\u0000]+/g, _e = /[^\r\t\n\f &>\u0000]+/g, ve = /[^\r\t\n\f \/>A-Z\u0000]+/g, ye = /[^\r\t\n\f \/=>A-Z\u0000]+/g, be = /[^\]\r\u0000\uffff]*/g, xe = /[^&<\r\u0000\uffff]*/g, Se = /[^<\r\u0000\uffff]*/g, Ce = /[^\r\u0000\uffff]*/g, we = /(?:(\/)?([a-z]+)>)|[\s\S]/g, Te = /(?:([-a-z]+)[ \t\n\f]*=[ \t\n\f]*('[^'&\r\u0000]*'|"[^"&\r\u0000]*"|[^\t\n\r\f "&'\u0000>][^&> \t\n\r\f\u0000]*[ \t\n\f]))|[\s\S]/g, Ee = /[^\x09\x0A\x0C\x0D\x20]/, De = /[^\x09\x0A\x0C\x0D\x20]/g, Oe = /[^\x00\x09\x0A\x0C\x0D\x20]/, ke = /^[\x09\x0A\x0C\x0D\x20]+/, Ae = /\x00/g; function P(e) { var t = 16384; if (e.length < t) return String.fromCharCode.apply(String, e); for (var n = ``, r = 0; r < e.length; r += t) n += String.fromCharCode.apply(String, e.slice(r, r + t)); return n; } function je(e) { for (var t = [], n = 0; n < e.length; n++) t[n] = e.charCodeAt(n); return t; } function F(e, t) { if (typeof t == `string`) return e.namespaceURI === a.HTML && e.localName === t; var n = t[e.namespaceURI]; return n && n[e.localName]; } function Me(e) { return F(e, ce); } function Ne(e) { if (F(e, le)) return !0; if (e.namespaceURI === a.MATHML && e.localName === `annotation-xml`) { var t = e.getAttribute(`encoding`); if (t &&= t.toLowerCase(), t === `text/html` || t === `application/xhtml+xml`) return !0; } return !1; } function Pe(e) { return e in M ? M[e] : e; } function I(e) { for (var t = 0, n = e.length; t < n; t++) e[t][0] in A && (e[t][0] = A[e[t][0]]); } function Fe(e) { for (var t = 0, n = e.length; t < n; t++) if (e[t][0] === `definitionurl`) { e[t][0] = `definitionURL`; break; } } function Ie(e) { for (var t = 0, n = e.length; t < n; t++) e[t][0] in k && e[t].push(k[e[t][0]]); } function Le(e, t) { for (var n = 0, r = e.length; n < r; n++) { var i = e[n][0], a = e[n][1]; t.hasAttribute(i) || t._setAttribute(i, a); } } L.ElementStack = function() { this.elements = [], this.top = null; }, L.ElementStack.prototype.push = function(e) { this.elements.push(e), this.top = e; }, L.ElementStack.prototype.pop = function(e) { this.elements.pop(), this.top = this.elements[this.elements.length - 1]; }, L.ElementStack.prototype.popTag = function(e) { for (var t = this.elements.length - 1; t > 0; t--) { var n = this.elements[t]; if (F(n, e)) break; } this.elements.length = t, this.top = this.elements[t - 1]; }, L.ElementStack.prototype.popElementType = function(e) { for (var t = this.elements.length - 1; t > 0 && !(this.elements[t] instanceof e); t--); this.elements.length = t, this.top = this.elements[t - 1]; }, L.ElementStack.prototype.popElement = function(e) { for (var t = this.elements.length - 1; t > 0 && this.elements[t] !== e; t--); this.elements.length = t, this.top = this.elements[t - 1]; }, L.ElementStack.prototype.removeElement = function(e) { if (this.top === e) this.pop(); else { var t = this.elements.lastIndexOf(e); t !== -1 && this.elements.splice(t, 1); } }, L.ElementStack.prototype.clearToContext = function(e) { for (var t = this.elements.length - 1; t > 0 && !F(this.elements[t], e); t--); this.elements.length = t + 1, this.top = this.elements[t]; }, L.ElementStack.prototype.contains = function(e) { return this.inSpecificScope(e, Object.create(null)); }, L.ElementStack.prototype.inSpecificScope = function(e, t) { for (var n = this.elements.length - 1; n >= 0; n--) { var r = this.elements[n]; if (F(r, e)) return !0; if (F(r, t)) return !1; } return !1; }, L.ElementStack.prototype.elementInSpecificScope = function(e, t) { for (var n = this.elements.length - 1; n >= 0; n--) { var r = this.elements[n]; if (r === e) return !0; if (F(r, t)) return !1; } return !1; }, L.ElementStack.prototype.elementTypeInSpecificScope = function(e, t) { for (var n = this.elements.length - 1; n >= 0; n--) { var r = this.elements[n]; if (r instanceof e) return !0; if (F(r, t)) return !1; } return !1; }, L.ElementStack.prototype.inScope = function(e) { return this.inSpecificScope(e, O); }, L.ElementStack.prototype.elementInScope = function(e) { return this.elementInSpecificScope(e, O); }, L.ElementStack.prototype.elementTypeInScope = function(e) { return this.elementTypeInSpecificScope(e, O); }, L.ElementStack.prototype.inButtonScope = function(e) { return this.inSpecificScope(e, ae); }, L.ElementStack.prototype.inListItemScope = function(e) { return this.inSpecificScope(e, ie); }, L.ElementStack.prototype.inTableScope = function(e) { return this.inSpecificScope(e, oe); }, L.ElementStack.prototype.inSelectScope = function(e) { for (var t = this.elements.length - 1; t >= 0; t--) { var n = this.elements[t]; if (n.namespaceURI !== a.HTML) return !1; var r = n.localName; if (r === e) return !0; if (r !== `optgroup` && r !== `option`) return !1; } return !1; }, L.ElementStack.prototype.generateImpliedEndTags = function(e, t) { for (var n = t ? D : E, r = this.elements.length - 1; r >= 0; r--) { var i = this.elements[r]; if (e && F(i, e) || !F(this.elements[r], n)) break; } this.elements.length = r + 1, this.top = this.elements[r]; }, L.ActiveFormattingElements = function() { this.list = [], this.attrs = []; }, L.ActiveFormattingElements.prototype.MARKER = { localName: `|` }, L.ActiveFormattingElements.prototype.insertMarker = function() { this.list.push(this.MARKER), this.attrs.push(this.MARKER); }, L.ActiveFormattingElements.prototype.push = function(e, t) { for (var n = 0, r = this.list.length - 1; r >= 0 && this.list[r] !== this.MARKER; r--) if (o(e, this.list[r], this.attrs[r]) && (n++, n === 3)) { this.list.splice(r, 1), this.attrs.splice(r, 1); break; } this.list.push(e); for (var i = [], a = 0; a < t.length; a++) i[a] = t[a]; this.attrs.push(i); function o(e, t, n) { if (e.localName !== t.localName || e._numattrs !== n.length) return !1; for (var r = 0, i = n.length; r < i; r++) { var a = n[r][0], o = n[r][1]; if (!e.hasAttribute(a) || e.getAttribute(a) !== o) return !1; } return !0; } }, L.ActiveFormattingElements.prototype.clearToMarker = function() { for (var e = this.list.length - 1; e >= 0 && this.list[e] !== this.MARKER; e--); e < 0 && (e = 0), this.list.length = e, this.attrs.length = e; }, L.ActiveFormattingElements.prototype.findElementByTag = function(e) { for (var t = this.list.length - 1; t >= 0; t--) { var n = this.list[t]; if (n === this.MARKER) break; if (n.localName === e) return n; } return null; }, L.ActiveFormattingElements.prototype.indexOf = function(e) { return this.list.lastIndexOf(e); }, L.ActiveFormattingElements.prototype.remove = function(e) { var t = this.list.lastIndexOf(e); t !== -1 && (this.list.splice(t, 1), this.attrs.splice(t, 1)); }, L.ActiveFormattingElements.prototype.replace = function(e, t, n) { var r = this.list.lastIndexOf(e); r !== -1 && (this.list[r] = t, this.attrs[r] = n); }, L.ActiveFormattingElements.prototype.insertAfter = function(e, t) { var n = this.list.lastIndexOf(e); n !== -1 && (this.list.splice(n, 0, t), this.attrs.splice(n, 0, t)); }; function L(e, t, o) { var u = null, E = 0, D = 0, O = !1, ie = !1, ae = 0, oe = [], se = ``, ce = !0, le = 0, k = Z, A, j, M = ``, de = ``, N = [], Re = ``, ze = ``, R = [], Be = [], Ve = [], He = [], Ue = [], We = !1, z = hr, Ge = null, Ke = [], B = new L.ElementStack(), V = new L.ActiveFormattingElements(), qe = t !== void 0, Je = null, Ye = null, Xe = !0; t && (Xe = t.ownerDocument._scripting_enabled), o && o.scripting_enabled === !1 && (Xe = !1); var H = !0, Ze = !1, Qe, $e, U = [], et = !1, tt = !1, nt = { document: function() { return W; }, _asDocumentFragment: function() { for (var e = W.createDocumentFragment(), t = W.firstChild; t.hasChildNodes();) e.appendChild(t.firstChild); return e; }, pause: function() { le++; }, resume: function() { le--, this.parse(``); }, parse: function(e, t, n) { var r; return le > 0 ? (se += e, !0) : (ae === 0 ? (se &&= (e = se + e, ``), t && (e += `￿`, O = !0), u = e, E = e.length, D = 0, ce && (ce = !1, u.charCodeAt(0) === 65279 && (D = 1)), ae++, r = at(n), se = u.substring(D, E), ae--) : (ae++, oe.push(u, E, D), u = e, E = e.length, D = 0, at(), r = !1, se = u.substring(D, E), D = oe.pop(), E = oe.pop(), u = oe.pop(), se &&= (u = se + u.substring(D), E = u.length, D = 0, ``), ae--), r); } }, W = new n(!0, e); if (W._parser = nt, W._scripting_enabled = Xe, t) { if (t.ownerDocument._quirks && (W._quirks = !0), t.ownerDocument._limitedQuirks && (W._limitedQuirks = !0), t.namespaceURI === a.HTML) switch (t.localName) { case `title`: case `textarea`: k = Ut; break; case `style`: case `xmp`: case `iframe`: case `noembed`: case `noframes`: case `script`: case `plaintext`: k = Kt; break; } var rt = W.createElement(`html`); W._appendChild(rt), B.push(rt), t instanceof c.HTMLTemplateElement && Ke.push(Ar), Pt(); for (var it = t; it !== null; it = it.parentElement) if (it instanceof c.HTMLFormElement) { Ye = it; break; } } function at(e) { for (var t, n, r, i; D < E;) { if (le > 0 || e && e()) return !0; switch (typeof k.lookahead) { case `undefined`: if (t = u.charCodeAt(D++), ie && (ie = !1, t === 10)) { D++; continue; } switch (t) { case 13: D < E ? u.charCodeAt(D) === 10 && D++ : ie = !0, k(10); break; case 65535: if (O && D === E) { k(d); break; } default: k(t); break; } break; case `number`: t = u.charCodeAt(D); var a = k.lookahead, o = !0; if (a < 0 && (o = !1, a = -a), a < E - D) n = o ? u.substring(D, D + a) : null, i = !1; else if (O) n = o ? u.substring(D, E) : null, i = !0, t === 65535 && D === E - 1 && (t = d); else return !0; k(t, n, i); break; case `string`: t = u.charCodeAt(D), r = k.lookahead; var s = u.indexOf(r, D); if (s !== -1) n = u.substring(D, s + r.length), i = !1; else { if (!O) return !0; n = u.substring(D, E), t === 65535 && D === E - 1 && (t = d), i = !0; } k(t, n, i); break; } } return !1; } function ot(e, t) { for (var n = 0; n < Ue.length; n++) if (Ue[n][0] === e) return; t === void 0 ? Ue.push([e]) : Ue.push([e, t]); } function st() { Te.lastIndex = D - 1; var e = Te.exec(u); if (!e) throw Error(`should never happen`); var t = e[1]; if (!t) return !1; var n = e[2], r = n.length; switch (n[0]) { case `"`: case `'`: n = n.substring(1, r - 1), D += e[0].length - 1, k = Dn; break; default: k = bn, D += e[0].length - 1, n = n.substring(0, r - 1); break; } for (var i = 0; i < Ue.length; i++) if (Ue[i][0] === t) return !0; return Ue.push([t, n]), !0; } function ct() { We = !1, M = ``, Ue.length = 0; } function lt() { We = !0, M = ``, Ue.length = 0; } function ut() { N.length = 0; } function dt() { Re = ``; } function ft() { ze = ``; } function pt() { R.length = 0; } function mt() { Be.length = 0, Ve = null, He = null; } function ht() { Ve = []; } function gt() { He = []; } function G() { Ze = !0; } function _t() { return B.top && B.top.namespaceURI !== `http://www.w3.org/1999/xhtml`; } function vt(e) { return de === e; } function yt() { if (U.length > 0) { var e = P(U); if (U.length = 0, tt && (tt = !1, e[0] === ` ` && (e = e.substring(1)), e.length === 0)) return; J(f, e), et = !1; } tt = !1; } function bt(e) { e.lastIndex = D - 1; var t = e.exec(u); if (t && t.index === D - 1) return t = t[0], D += t.length - 1, O && D === E && (t = t.slice(0, -1), D--), t; throw Error(`should never happen`); } function xt(e) { e.lastIndex = D - 1; var t = e.exec(u)[0]; return t ? (St(t), D += t.length - 1, !0) : !1; } function St(e) { U.length > 0 && yt(), !(tt && (tt = !1, e[0] === ` ` && (e = e.substring(1)), e.length === 0)) && J(f, e); } function Ct() { if (We) J(m, M); else { var e = M; M = ``, de = e, J(p, e, Ue); } } function wt() { if (D === E) return !1; we.lastIndex = D; var e = we.exec(u); if (!e) throw Error(`should never happen`); var t = e[2]; return t ? (e[1] ? (D += t.length + 2, J(m, t)) : (D += t.length + 1, de = t, J(p, t, _)), !0) : !1; } function Tt() { We ? J(m, M, null, !0) : J(p, M, Ue, !0); } function K() { J(g, P(Be), Ve ? P(Ve) : void 0, He ? P(He) : void 0); } function q() { yt(), z(d), W.modclock = 1; } var J = nt.insertToken = function(e, t, n, r) { yt(); var i = B.top; !i || i.namespaceURI === a.HTML ? z(e, t, n, r) : e !== p && e !== f ? Ir(e, t, n, r) : Me(i) && (e === f || e === p && t !== `mglyph` && t !== `malignmark`) || e === p && t === `svg` && i.namespaceURI === a.MATHML && i.localName === `annotation-xml` || Ne(i) ? ($e = !0, z(e, t, n, r), $e = !1) : Ir(e, t, n, r); }; function Et(e) { var t = B.top; kt && F(t, T) ? Nt(function(t) { return t.createComment(e); }) : (t instanceof c.HTMLTemplateElement && (t = t.content), t._appendChild(t.ownerDocument.createComment(e))); } function Dt(e) { var t = B.top; if (kt && F(t, T)) Nt(function(t) { return t.createTextNode(e); }); else { t instanceof c.HTMLTemplateElement && (t = t.content); var n = t.lastChild; n && n.nodeType === i.TEXT_NODE ? n.appendData(e) : t._appendChild(t.ownerDocument.createTextNode(e)); } } function Ot(e, t, n) { var r = s.createElement(e, t, null); if (n) for (var i = 0, a = n.length; i < a; i++) r._setAttribute(n[i][0], n[i][1]); return r; } var kt = !1; function Y(e, t) { var n = At(function(n) { return Ot(n, e, t); }); return F(n, re) && (n._form = Ye), n; } function At(e) { var t; return kt && F(B.top, T) ? t = Nt(e) : B.top instanceof c.HTMLTemplateElement ? (t = e(B.top.content.ownerDocument), B.top.content._appendChild(t)) : (t = e(B.top.ownerDocument), B.top._appendChild(t)), B.push(t), t; } function jt(e, t, n) { return At(function(r) { var i = r._createElementNS(e, n, null); if (t) for (var a = 0, o = t.length; a < o; a++) { var s = t[a]; s.length === 2 ? i._setAttribute(s[0], s[1]) : i._setAttributeNS(s[2], s[0], s[1]); } return i; }); } function Mt(e) { for (var t = B.elements.length - 1; t >= 0; t--) if (B.elements[t] instanceof e) return t; return -1; } function Nt(e) { var t, n, r = -1, a = -1, o; if (r = Mt(c.HTMLTableElement), a = Mt(c.HTMLTemplateElement), a >= 0 && (r < 0 || a > r) ? t = B.elements[a] : r >= 0 && (t = B.elements[r].parentNode, t ? n = B.elements[r] : t = B.elements[r - 1]), t ||= B.elements[0], t instanceof c.HTMLTemplateElement && (t = t.content), o = e(t.ownerDocument), o.nodeType === i.TEXT_NODE) { var s = n ? n.previousSibling : t.lastChild; if (s && s.nodeType === i.TEXT_NODE) return s.appendData(o.data), o; } return n ? t.insertBefore(o, n) : t._appendChild(o), o; } function Pt() { for (var e = !1, n = B.elements.length - 1; n >= 0; n--) { var r = B.elements[n]; if (n === 0 && (e = !0, qe && (r = t)), r.namespaceURI === a.HTML) { var i = r.localName; switch (i) { case `select`: for (var o = n; o > 0;) { var s = B.elements[--o]; if (s instanceof c.HTMLTemplateElement) break; if (s instanceof c.HTMLTableElement) { z = kr; return; } } z = Or; return; case `tr`: z = Er; return; case `tbody`: case `tfoot`: case `thead`: z = Tr; return; case `caption`: z = Cr; return; case `colgroup`: z = wr; return; case `table`: z = xr; return; case `template`: z = Ke[Ke.length - 1]; return; case `body`: z = $; return; case `frameset`: z = Mr; return; case `html`: z = Je === null ? _r : yr; return; default: if (!e) { if (i === `head`) { z = Q; return; } if (i === `td` || i === `th`) { z = Dr; return; } } } } if (e) { z = $; return; } } } function Ft(e, t) { Y(e, t), k = Wt, Ge = z, z = br; } function It(e, t) { Y(e, t), k = Ut, Ge = z, z = br; } function Lt(e, t) { return { elt: Ot(e, V.list[t].localName, V.attrs[t]), attrs: V.attrs[t] }; } function Rt() { if (V.list.length !== 0) { var e = V.list[V.list.length - 1]; if (e !== V.MARKER && B.elements.lastIndexOf(e) === -1) { for (var t = V.list.length - 2; t >= 0 && (e = V.list[t], !(e === V.MARKER || B.elements.lastIndexOf(e) !== -1)); t--); for (t += 1; t < V.list.length; t++) { var n = At(function(e) { return Lt(e, t).elt; }); V.list[t] = n; } } } } var zt = { localName: `BM` }; function Bt(e) { if (F(B.top, e) && V.indexOf(B.top) === -1) return B.pop(), !0; for (var t = 0; t < 8;) { t++; var n = V.findElementByTag(e); if (!n) return !1; var r = B.elements.lastIndexOf(n); if (r === -1) return V.remove(n), !0; if (!B.elementInScope(n)) return !0; for (var i = null, a, o = r + 1; o < B.elements.length; o++) if (F(B.elements[o], S)) { i = B.elements[o], a = o; break; } if (i) { var s = B.elements[r - 1]; V.insertAfter(n, zt); for (var l = i, u = i, d = a, f, p = 0; p++, l = B.elements[--d], l !== n;) { if (f = V.indexOf(l), p > 3 && f !== -1 && (V.remove(l), f = -1), f === -1) { B.removeElement(l); continue; } var m = Lt(s.ownerDocument, f); V.replace(l, m.elt, m.attrs), B.elements[d] = m.elt, l = m.elt, u === i && (V.remove(zt), V.insertAfter(m.elt, zt)), l._appendChild(u), u = l; } kt && F(s, T) ? Nt(function() { return u; }) : s instanceof c.HTMLTemplateElement ? s.content._appendChild(u) : s._appendChild(u); for (var h = Lt(i.ownerDocument, V.indexOf(n)); i.hasChildNodes();) h.elt._appendChild(i.firstChild); i._appendChild(h.elt), V.remove(n), V.replace(zt, h.elt, h.attrs), B.removeElement(n); var g = B.elements.lastIndexOf(i); B.elements.splice(g + 1, 0, h.elt); } else return B.popElement(n), V.remove(n), !0; } return !0; } function Vt() { B.pop(), z = Ge; } function Ht() { delete W._parser, B.elements.length = 0, W.defaultView && W.defaultView.dispatchEvent(new c.Event(`load`, {})); } function X(e, t) { k = t, D--; } function Z(e) { switch (e) { case 38: A = Z, k = or; break; case 60: if (wt()) break; k = qt; break; case 0: U.push(e), et = !0; break; case -1: q(); break; default: xt(xe) || U.push(e); break; } } function Ut(e) { switch (e) { case 38: A = Ut, k = or; break; case 60: k = Xt; break; case 0: U.push(65533), et = !0; break; case -1: q(); break; default: U.push(e); break; } } function Wt(e) { switch (e) { case 60: k = $t; break; case 0: U.push(65533); break; case -1: q(); break; default: xt(Se) || U.push(e); break; } } function Gt(e) { switch (e) { case 60: k = nn; break; case 0: U.push(65533); break; case -1: q(); break; default: xt(Se) || U.push(e); break; } } function Kt(e) { switch (e) { case 0: U.push(65533); break; case -1: q(); break; default: xt(Ce) || U.push(e); break; } } function qt(e) { switch (e) { case 33: k = An; break; case 47: k = Jt; break; case 65: case 66: case 67: case 68: case 69: case 70: case 71: case 72: case 73: case 74: case 75: case 76: case 77: case 78: case 79: case 80: case 81: case 82: case 83: case 84: case 85: case 86: case 87: case 88: case 89: case 90: case 97: case 98: case 99: case 100: case 101: case 102: case 103: case 104: case 105: case 106: case 107: case 108: case 109: case 110: case 111: case 112: case 113: case 114: case 115: case 116: case 117: case 118: case 119: case 120: case 121: case 122: ct(), X(e, Yt); break; case 63: X(e, kn); break; default: U.push(60), X(e, Z); break; } } function Jt(e) { switch (e) { case 65: case 66: case 67: case 68: case 69: case 70: case 71: case 72: case 73: case 74: case 75: case 76: case 77: case 78: case 79: case 80: case 81: case 82: case 83: case 84: case 85: case 86: case 87: case 88: case 89: case 90: case 97: case 98: case 99: case 100: case 101: case 102: case 103: case 104: case 105: case 106: case 107: case 108: case 109: case 110: case 111: case 112: case 113: case 114: case 115: case 116: case 117: case 118: case 119: case 120: case 121: case 122: lt(), X(e, Yt); break; case 62: k = Z; break; case -1: U.push(60), U.push(47), q(); break; default: X(e, kn); break; } } function Yt(e) { switch (e) { case 9: case 10: case 12: case 32: k = bn; break; case 47: k = On; break; case 62: k = Z, Ct(); break; case 65: case 66: case 67: case 68: case 69: case 70: case 71: case 72: case 73: case 74: case 75: case 76: case 77: case 78: case 79: case 80: case 81: case 82: case 83: case 84: case 85: case 86: case 87: case 88: case 89: case 90: M += String.fromCharCode(e + 32); break; case 0: M += `�`; break; case -1: q(); break; default: M += bt(ve); break; } } function Xt(e) { e === 47 ? (ut(), k = Zt) : (U.push(60), X(e, Ut)); } function Zt(e) { switch (e) { case 65: case 66: case 67: case 68: case 69: case 70: case 71: case 72: case 73: case 74: case 75: case 76: case 77: case 78: case 79: case 80: case 81: case 82: case 83: case 84: case 85: case 86: case 87: case 88: case 89: case 90: case 97: case 98: case 99: case 100: case 101: case 102: case 103: case 104: case 105: case 106: case 107: case 108: case 109: case 110: case 111: case 112: case 113: case 114: case 115: case 116: case 117: case 118: case 119: case 120: case 121: case 122: lt(), X(e, Qt); break; default: U.push(60), U.push(47), X(e, Ut); break; } } function Qt(e) { switch (e) { case 9: case 10: case 12: case 32: if (vt(M)) { k = bn; return; } break; case 47: if (vt(M)) { k = On; return; } break; case 62: if (vt(M)) { k = Z, Ct(); return; } break; case 65: case 66: case 67: case 68: case 69: case 70: case 71: case 72: case 73: case 74: case 75: case 76: case 77: case 78: case 79: case 80: case 81: case 82: case 83: case 84: case 85: case 86: case 87: case 88: case 89: case 90: M += String.fromCharCode(e + 32), N.push(e); return; case 97: case 98: case 99: case 100: case 101: case 102: case 103: case 104: case 105: case 106: case 107: case 108: case 109: case 110: case 111: case 112: case 113: case 114: case 115: case 116: case 117: case 118: case 119: case 120: case 121: case 122: M += String.fromCharCode(e), N.push(e); return; default: break; } U.push(60), U.push(47), l(U, N), X(e, Ut); } function $t(e) { e === 47 ? (ut(), k = en) : (U.push(60), X(e, Wt)); } function en(e) { switch (e) { case 65: case 66: case 67: case 68: case 69: case 70: case 71: case 72: case 73: case 74: case 75: case 76: case 77: case 78: case 79: case 80: case 81: case 82: case 83: case 84: case 85: case 86: case 87: case 88: case 89: case 90: case 97: case 98: case 99: case 100: case 101: case 102: case 103: case 104: case 105: case 106: case 107: case 108: case 109: case 110: case 111: case 112: case 113: case 114: case 115: case 116: case 117: case 118: case 119: case 120: case 121: case 122: lt(), X(e, tn); break; default: U.push(60), U.push(47), X(e, Wt); break; } } function tn(e) { switch (e) { case 9: case 10: case 12: case 32: if (vt(M)) { k = bn; return; } break; case 47: if (vt(M)) { k = On; return; } break; case 62: if (vt(M)) { k = Z, Ct(); return; } break; case 65: case 66: case 67: case 68: case 69: case 70: case 71: case 72: case 73: case 74: case 75: case 76: case 77: case 78: case 79: case 80: case 81: case 82: case 83: case 84: case 85: case 86: case 87: case 88: case 89: case 90: M += String.fromCharCode(e + 32), N.push(e); return; case 97: case 98: case 99: case 100: case 101: case 102: case 103: case 104: case 105: case 106: case 107: case 108: case 109: case 110: case 111: case 112: case 113: case 114: case 115: case 116: case 117: case 118: case 119: case 120: case 121: case 122: M += String.fromCharCode(e), N.push(e); return; default: break; } U.push(60), U.push(47), l(U, N), X(e, Wt); } function nn(e) { switch (e) { case 47: ut(), k = rn; break; case 33: k = on, U.push(60), U.push(33); break; default: U.push(60), X(e, Gt); break; } } function rn(e) { switch (e) { case 65: case 66: case 67: case 68: case 69: case 70: case 71: case 72: case 73: case 74: case 75: case 76: case 77: case 78: case 79: case 80: case 81: case 82: case 83: case 84: case 85: case 86: case 87: case 88: case 89: case 90: case 97: case 98: case 99: case 100: case 101: case 102: case 103: case 104: case 105: case 106: case 107: case 108: case 109: case 110: case 111: case 112: case 113: case 114: case 115: case 116: case 117: case 118: case 119: case 120: case 121: case 122: lt(), X(e, an); break; default: U.push(60), U.push(47), X(e, Gt); break; } } function an(e) { switch (e) { case 9: case 10: case 12: case 32: if (vt(M)) { k = bn; return; } break; case 47: if (vt(M)) { k = On; return; } break; case 62: if (vt(M)) { k = Z, Ct(); return; } break; case 65: case 66: case 67: case 68: case 69: case 70: case 71: case 72: case 73: case 74: case 75: case 76: case 77: case 78: case 79: case 80: case 81: case 82: case 83: case 84: case 85: case 86: case 87: case 88: case 89: case 90: M += String.fromCharCode(e + 32), N.push(e); return; case 97: case 98: case 99: case 100: case 101: case 102: case 103: case 104: case 105: case 106: case 107: case 108: case 109: case 110: case 111: case 112: case 113: case 114: case 115: case 116: case 117: case 118: case 119: case 120: case 121: case 122: M += String.fromCharCode(e), N.push(e); return; default: break; } U.push(60), U.push(47), l(U, N), X(e, Gt); } function on(e) { e === 45 ? (k = sn, U.push(45)) : X(e, Gt); } function sn(e) { e === 45 ? (k = un, U.push(45)) : X(e, Gt); } function cn(e) { switch (e) { case 45: k = ln, U.push(45); break; case 60: k = dn; break; case 0: U.push(65533); break; case -1: q(); break; default: U.push(e); break; } } function ln(e) { switch (e) { case 45: k = un, U.push(45); break; case 60: k = dn; break; case 0: k = cn, U.push(65533); break; case -1: q(); break; default: k = cn, U.push(e); break; } } function un(e) { switch (e) { case 45: U.push(45); break; case 60: k = dn; break; case 62: k = Gt, U.push(62); break; case 0: k = cn, U.push(65533); break; case -1: q(); break; default: k = cn, U.push(e); break; } } function dn(e) { switch (e) { case 47: ut(), k = fn; break; case 65: case 66: case 67: case 68: case 69: case 70: case 71: case 72: case 73: case 74: case 75: case 76: case 77: case 78: case 79: case 80: case 81: case 82: case 83: case 84: case 85: case 86: case 87: case 88: case 89: case 90: case 97: case 98: case 99: case 100: case 101: case 102: case 103: case 104: case 105: case 106: case 107: case 108: case 109: case 110: case 111: case 112: case 113: case 114: case 115: case 116: case 117: case 118: case 119: case 120: case 121: case 122: ut(), U.push(60), X(e, mn); break; default: U.push(60), X(e, cn); break; } } function fn(e) { switch (e) { case 65: case 66: case 67: case 68: case 69: case 70: case 71: case 72: case 73: case 74: case 75: case 76: case 77: case 78: case 79: case 80: case 81: case 82: case 83: case 84: case 85: case 86: case 87: case 88: case 89: case 90: case 97: case 98: case 99: case 100: case 101: case 102: case 103: case 104: case 105: case 106: case 107: case 108: case 109: case 110: case 111: case 112: case 113: case 114: case 115: case 116: case 117: case 118: case 119: case 120: case 121: case 122: lt(), X(e, pn); break; default: U.push(60), U.push(47), X(e, cn); break; } } function pn(e) { switch (e) { case 9: case 10: case 12: case 32: if (vt(M)) { k = bn; return; } break; case 47: if (vt(M)) { k = On; return; } break; case 62: if (vt(M)) { k = Z, Ct(); return; } break; case 65: case 66: case 67: case 68: case 69: case 70: case 71: case 72: case 73: case 74: case 75: case 76: case 77: case 78: case 79: case 80: case 81: case 82: case 83: case 84: case 85: case 86: case 87: case 88: case 89: case 90: M += String.fromCharCode(e + 32), N.push(e); return; case 97: case 98: case 99: case 100: case 101: case 102: case 103: case 104: case 105: case 106: case 107: case 108: case 109: case 110: case 111: case 112: case 113: case 114: case 115: case 116: case 117: case 118: case 119: case 120: case 121: case 122: M += String.fromCharCode(e), N.push(e); return; default: break; } U.push(60), U.push(47), l(U, N), X(e, cn); } function mn(e) { switch (e) { case 9: case 10: case 12: case 32: case 47: case 62: k = P(N) === `script` ? hn : cn, U.push(e); break; case 65: case 66: case 67: case 68: case 69: case 70: case 71: case 72: case 73: case 74: case 75: case 76: case 77: case 78: case 79: case 80: case 81: case 82: case 83: case 84: case 85: case 86: case 87: case 88: case 89: case 90: N.push(e + 32), U.push(e); break; case 97: case 98: case 99: case 100: case 101: case 102: case 103: case 104: case 105: case 106: case 107: case 108: case 109: case 110: case 111: case 112: case 113: case 114: case 115: case 116: case 117: case 118: case 119: case 120: case 121: case 122: N.push(e), U.push(e); break; default: X(e, cn); break; } } function hn(e) { switch (e) { case 45: k = gn, U.push(45); break; case 60: k = vn, U.push(60); break; case 0: U.push(65533); break; case -1: q(); break; default: U.push(e); break; } } function gn(e) { switch (e) { case 45: k = _n, U.push(45); break; case 60: k = vn, U.push(60); break; case 0: k = hn, U.push(65533); break; case -1: q(); break; default: k = hn, U.push(e); break; } } function _n(e) { switch (e) { case 45: U.push(45); break; case 60: k = vn, U.push(60); break; case 62: k = Gt, U.push(62); break; case 0: k = hn, U.push(65533); break; case -1: q(); break; default: k = hn, U.push(e); break; } } function vn(e) { e === 47 ? (ut(), k = yn, U.push(47)) : X(e, hn); } function yn(e) { switch (e) { case 9: case 10: case 12: case 32: case 47: case 62: k = P(N) === `script` ? cn : hn, U.push(e); break; case 65: case 66: case 67: case 68: case 69: case 70: case 71: case 72: case 73: case 74: case 75: case 76: case 77: case 78: case 79: case 80: case 81: case 82: case 83: case 84: case 85: case 86: case 87: case 88: case 89: case 90: N.push(e + 32), U.push(e); break; case 97: case 98: case 99: case 100: case 101: case 102: case 103: case 104: case 105: case 106: case 107: case 108: case 109: case 110: case 111: case 112: case 113: case 114: case 115: case 116: case 117: case 118: case 119: case 120: case 121: case 122: N.push(e), U.push(e); break; default: X(e, hn); break; } } function bn(e) { switch (e) { case 9: case 10: case 12: case 32: break; case 47: k = On; break; case 62: k = Z, Ct(); break; case -1: q(); break; case 61: dt(), Re += String.fromCharCode(e), k = xn; break; default: if (st()) break; dt(), X(e, xn); break; } } function xn(e) { switch (e) { case 9: case 10: case 12: case 32: case 47: case 62: case -1: X(e, Sn); break; case 61: k = Cn; break; case 65: case 66: case 67: case 68: case 69: case 70: case 71: case 72: case 73: case 74: case 75: case 76: case 77: case 78: case 79: case 80: case 81: case 82: case 83: case 84: case 85: case 86: case 87: case 88: case 89: case 90: Re += String.fromCharCode(e + 32); break; case 0: Re += `�`; break; default: Re += bt(ye); break; } } function Sn(e) { switch (e) { case 9: case 10: case 12: case 32: break; case 47: ot(Re), k = On; break; case 61: k = Cn; break; case 62: k = Z, ot(Re), Ct(); break; case -1: ot(Re), q(); break; default: ot(Re), dt(), X(e, xn); break; } } function Cn(e) { switch (e) { case 9: case 10: case 12: case 32: break; case 34: ft(), k = wn; break; case 39: ft(), k = Tn; break; default: ft(), X(e, En); break; } } function wn(e) { switch (e) { case 34: ot(Re, ze), k = Dn; break; case 38: A = wn, k = or; break; case 0: ze += `�`; break; case -1: q(); break; case 10: ze += String.fromCharCode(e); break; default: ze += bt(he); break; } } function Tn(e) { switch (e) { case 39: ot(Re, ze), k = Dn; break; case 38: A = Tn, k = or; break; case 0: ze += `�`; break; case -1: q(); break; case 10: ze += String.fromCharCode(e); break; default: ze += bt(ge); break; } } function En(e) { switch (e) { case 9: case 10: case 12: case 32: ot(Re, ze), k = bn; break; case 38: A = En, k = or; break; case 62: ot(Re, ze), k = Z, Ct(); break; case 0: ze += `�`; break; case -1: D--, k = Z; break; default: ze += bt(_e); break; } } function Dn(e) { switch (e) { case 9: case 10: case 12: case 32: k = bn; break; case 47: k = On; break; case 62: k = Z, Ct(); break; case -1: q(); break; default: X(e, bn); break; } } function On(e) { switch (e) { case 62: k = Z, Tt(!0); break; case -1: q(); break; default: X(e, bn); break; } } function kn(e, t, n) { var r = t.length; n ? D += r - 1 : D += r; var i = t.substring(0, r - 1); i = i.replace(/\u0000/g, `�`), i = i.replace(/\u000D\u000A/g, ` `), i = i.replace(/\u000D/g, ` `), J(h, i), k = Z; } kn.lookahead = `>`; function An(e, t, n) { if (t[0] === `-` && t[1] === `-`) { D += 2, pt(), k = jn; return; } t.toUpperCase() === `DOCTYPE` ? (D += 7, k = Vn) : t === `[CDATA[` && _t() ? (D += 7, k = rr) : k = kn; } An.lookahead = 7; function jn(e) { switch (pt(), e) { case 45: k = Mn; break; case 62: k = Z, J(h, P(R)); break; default: X(e, Nn); break; } } function Mn(e) { switch (e) { case 45: k = zn; break; case 62: k = Z, J(h, P(R)); break; case -1: J(h, P(R)), q(); break; default: R.push(45), X(e, Nn); break; } } function Nn(e) { switch (e) { case 60: R.push(e), k = Pn; break; case 45: k = Rn; break; case 0: R.push(65533); break; case -1: J(h, P(R)), q(); break; default: R.push(e); break; } } function Pn(e) { switch (e) { case 33: R.push(e), k = Fn; break; case 60: R.push(e); break; default: X(e, Nn); break; } } function Fn(e) { switch (e) { case 45: k = In; break; default: X(e, Nn); break; } } function In(e) { switch (e) { case 45: k = Ln; break; default: X(e, Rn); break; } } function Ln(e) { switch (e) { case 62: case -1: X(e, zn); break; default: X(e, zn); break; } } function Rn(e) { switch (e) { case 45: k = zn; break; case -1: J(h, P(R)), q(); break; default: R.push(45), X(e, Nn); break; } } function zn(e) { switch (e) { case 62: k = Z, J(h, P(R)); break; case 33: k = Bn; break; case 45: R.push(45); break; case -1: J(h, P(R)), q(); break; default: R.push(45), R.push(45), X(e, Nn); break; } } function Bn(e) { switch (e) { case 45: R.push(45), R.push(45), R.push(33), k = Rn; break; case 62: k = Z, J(h, P(R)); break; case -1: J(h, P(R)), q(); break; default: R.push(45), R.push(45), R.push(33), X(e, Nn); break; } } function Vn(e) { switch (e) { case 9: case 10: case 12: case 32: k = Hn; break; case -1: mt(), G(), K(), q(); break; default: X(e, Hn); break; } } function Hn(e) { switch (e) { case 9: case 10: case 12: case 32: break; case 65: case 66: case 67: case 68: case 69: case 70: case 71: case 72: case 73: case 74: case 75: case 76: case 77: case 78: case 79: case 80: case 81: case 82: case 83: case 84: case 85: case 86: case 87: case 88: case 89: case 90: mt(), Be.push(e + 32), k = Un; break; case 0: mt(), Be.push(65533), k = Un; break; case 62: mt(), G(), k = Z, K(); break; case -1: mt(), G(), K(), q(); break; default: mt(), Be.push(e), k = Un; break; } } function Un(e) { switch (e) { case 9: case 10: case 12: case 32: k = Wn; break; case 62: k = Z, K(); break; case 65: case 66: case 67: case 68: case 69: case 70: case 71: case 72: case 73: case 74: case 75: case 76: case 77: case 78: case 79: case 80: case 81: case 82: case 83: case 84: case 85: case 86: case 87: case 88: case 89: case 90: Be.push(e + 32); break; case 0: Be.push(65533); break; case -1: G(), K(), q(); break; default: Be.push(e); break; } } function Wn(e, t, n) { switch (e) { case 9: case 10: case 12: case 32: D += 1; break; case 62: k = Z, D += 1, K(); break; case -1: G(), K(), q(); break; default: t = t.toUpperCase(), t === `PUBLIC` ? (D += 6, k = Gn) : t === `SYSTEM` ? (D += 6, k = Zn) : (G(), k = nr); break; } } Wn.lookahead = 6; function Gn(e) { switch (e) { case 9: case 10: case 12: case 32: k = Kn; break; case 34: ht(), k = qn; break; case 39: ht(), k = Jn; break; case 62: G(), k = Z, K(); break; case -1: G(), K(), q(); break; default: G(), k = nr; break; } } function Kn(e) { switch (e) { case 9: case 10: case 12: case 32: break; case 34: ht(), k = qn; break; case 39: ht(), k = Jn; break; case 62: G(), k = Z, K(); break; case -1: G(), K(), q(); break; default: G(), k = nr; break; } } function qn(e) { switch (e) { case 34: k = Yn; break; case 0: Ve.push(65533); break; case 62: G(), k = Z, K(); break; case -1: G(), K(), q(); break; default: Ve.push(e); break; } } function Jn(e) { switch (e) { case 39: k = Yn; break; case 0: Ve.push(65533); break; case 62: G(), k = Z, K(); break; case -1: G(), K(), q(); break; default: Ve.push(e); break; } } function Yn(e) { switch (e) { case 9: case 10: case 12: case 32: k = Xn; break; case 62: k = Z, K(); break; case 34: gt(), k = $n; break; case 39: gt(), k = er; break; case -1: G(), K(), q(); break; default: G(), k = nr; break; } } function Xn(e) { switch (e) { case 9: case 10: case 12: case 32: break; case 62: k = Z, K(); break; case 34: gt(), k = $n; break; case 39: gt(), k = er; break; case -1: G(), K(), q(); break; default: G(), k = nr; break; } } function Zn(e) { switch (e) { case 9: case 10: case 12: case 32: k = Qn; break; case 34: gt(), k = $n; break; case 39: gt(), k = er; break; case 62: G(), k = Z, K(); break; case -1: G(), K(), q(); break; default: G(), k = nr; break; } } function Qn(e) { switch (e) { case 9: case 10: case 12: case 32: break; case 34: gt(), k = $n; break; case 39: gt(), k = er; break; case 62: G(), k = Z, K(); break; case -1: G(), K(), q(); break; default: G(), k = nr; break; } } function $n(e) { switch (e) { case 34: k = tr; break; case 0: He.push(65533); break; case 62: G(), k = Z, K(); break; case -1: G(), K(), q(); break; default: He.push(e); break; } } function er(e) { switch (e) { case 39: k = tr; break; case 0: He.push(65533); break; case 62: G(), k = Z, K(); break; case -1: G(), K(), q(); break; default: He.push(e); break; } } function tr(e) { switch (e) { case 9: case 10: case 12: case 32: break; case 62: k = Z, K(); break; case -1: G(), K(), q(); break; default: k = nr; break; } } function nr(e) { switch (e) { case 62: k = Z, K(); break; case -1: K(), q(); break; default: break; } } function rr(e) { switch (e) { case 93: k = ir; break; case -1: q(); break; case 0: et = !0; default: xt(be) || U.push(e); break; } } function ir(e) { switch (e) { case 93: k = ar; break; default: U.push(93), X(e, rr); break; } } function ar(e) { switch (e) { case 93: U.push(93); break; case 62: yt(), k = Z; break; default: U.push(93), U.push(93), X(e, rr); break; } } function or(e) { switch (ut(), N.push(38), e) { case 9: case 10: case 12: case 32: case 60: case 38: case -1: X(e, mr); break; case 35: N.push(e), k = cr; break; default: X(e, sr); break; } } function sr(e) { pe.lastIndex = D; var t = pe.exec(u); if (!t) throw Error(`should never happen`); var n = t[1]; if (!n) { k = mr; return; } switch (D += n.length, l(N, je(n)), A) { case wn: case Tn: case En: if (n[n.length - 1] !== `;` && /[=A-Za-z0-9]/.test(u[D])) { k = mr; return; } break; default: break; } ut(); var r = fe[n]; typeof r == `number` ? N.push(r) : l(N, r), k = mr; } sr.lookahead = -me; function cr(e) { switch (j = 0, e) { case 120: case 88: N.push(e), k = lr; break; default: X(e, ur); break; } } function lr(e) { switch (e) { case 48: case 49: case 50: case 51: case 52: case 53: case 54: case 55: case 56: case 57: case 65: case 66: case 67: case 68: case 69: case 70: case 97: case 98: case 99: case 100: case 101: case 102: X(e, dr); break; default: X(e, mr); break; } } function ur(e) { switch (e) { case 48: case 49: case 50: case 51: case 52: case 53: case 54: case 55: case 56: case 57: X(e, fr); break; default: X(e, mr); break; } } function dr(e) { switch (e) { case 65: case 66: case 67: case 68: case 69: case 70: j *= 16, j += e - 55; break; case 97: case 98: case 99: case 100: case 101: case 102: j *= 16, j += e - 87; break; case 48: case 49: case 50: case 51: case 52: case 53: case 54: case 55: case 56: case 57: j *= 16, j += e - 48; break; case 59: k = pr; break; default: X(e, pr); break; } } function fr(e) { switch (e) { case 48: case 49: case 50: case 51: case 52: case 53: case 54: case 55: case 56: case 57: j *= 10, j += e - 48; break; case 59: k = pr; break; default: X(e, pr); break; } } function pr(e) { j in ue ? j = ue[j] : (j > 1114111 || j >= 55296 && j < 57344) && (j = 65533), ut(), j <= 65535 ? N.push(j) : (j -= 65536, N.push(55296 + (j >> 10)), N.push(56320 + (j & 1023))), X(e, mr); } function mr(e) { switch (A) { case wn: case Tn: case En: ze += P(N); break; default: l(U, N); break; } X(e, A); } function hr(e, t, n, i) { switch (e) { case 1: if (t = t.replace(ke, ``), t.length === 0) return; break; case 4: W._appendChild(W.createComment(t)); return; case 5: var a = t, o = n, s = i; W.appendChild(new r(W, a, o, s)), Ze || a.toLowerCase() !== `html` || v.test(o) || s && s.toLowerCase() === y || s === void 0 && b.test(o) ? W._quirks = !0 : (x.test(o) || s !== void 0 && b.test(o)) && (W._limitedQuirks = !0), z = gr; return; } W._quirks = !0, z = gr, z(e, t, n, i); } function gr(e, t, n, r) { var i; switch (e) { case 1: if (t = t.replace(ke, ``), t.length === 0) return; break; case 5: return; case 4: W._appendChild(W.createComment(t)); return; case 2: if (t === `html`) { i = Ot(W, t, n), B.push(i), W.appendChild(i), z = _r; return; } break; case 3: switch (t) { case `html`: case `head`: case `body`: case `br`: break; default: return; } } i = Ot(W, `html`, null), B.push(i), W.appendChild(i), z = _r, z(e, t, n, r); } function _r(e, t, n, r) { switch (e) { case 1: if (t = t.replace(ke, ``), t.length === 0) return; break; case 5: return; case 4: Et(t); return; case 2: switch (t) { case `html`: $(e, t, n, r); return; case `head`: Je = Y(t, n), z = Q; return; } break; case 3: switch (t) { case `html`: case `head`: case `body`: case `br`: break; default: return; } } _r(p, `head`, null), z(e, t, n, r); } function Q(e, t, n, r) { switch (e) { case 1: var i = t.match(ke); if (i && (Dt(i[0]), t = t.substring(i[0].length)), t.length === 0) return; break; case 4: Et(t); return; case 5: return; case 2: switch (t) { case `html`: $(e, t, n, r); return; case `meta`: case `base`: case `basefont`: case `bgsound`: case `link`: Y(t, n), B.pop(); return; case `title`: It(t, n); return; case `noscript`: if (!Xe) { Y(t, n), z = vr; return; } case `noframes`: case `style`: Ft(t, n); return; case `script`: At(function(e) { var r = Ot(e, t, n); return r._parser_inserted = !0, r._force_async = !1, qe && (r._already_started = !0), yt(), r; }), k = Gt, Ge = z, z = br; return; case `template`: Y(t, n), V.insertMarker(), H = !1, z = Ar, Ke.push(z); return; case `head`: return; } break; case 3: switch (t) { case `head`: B.pop(), z = yr; return; case `body`: case `html`: case `br`: break; case `template`: if (!B.contains(`template`)) return; B.generateImpliedEndTags(null, `thorough`), B.popTag(`template`), V.clearToMarker(), Ke.pop(), Pt(); return; default: return; } break; } Q(m, `head`, null), z(e, t, n, r); } function vr(e, t, n, r) { switch (e) { case 5: return; case 4: Q(e, t); return; case 1: var i = t.match(ke); if (i && (Q(e, i[0]), t = t.substring(i[0].length)), t.length === 0) return; break; case 2: switch (t) { case `html`: $(e, t, n, r); return; case `basefont`: case `bgsound`: case `link`: case `meta`: case `noframes`: case `style`: Q(e, t, n); return; case `head`: case `noscript`: return; } break; case 3: switch (t) { case `noscript`: B.pop(), z = Q; return; case `br`: break; default: return; } break; } vr(m, `noscript`, null), z(e, t, n, r); } function yr(e, t, n, r) { switch (e) { case 1: var i = t.match(ke); if (i && (Dt(i[0]), t = t.substring(i[0].length)), t.length === 0) return; break; case 4: Et(t); return; case 5: return; case 2: switch (t) { case `html`: $(e, t, n, r); return; case `body`: Y(t, n), H = !1, z = $; return; case `frameset`: Y(t, n), z = Mr; return; case `base`: case `basefont`: case `bgsound`: case `link`: case `meta`: case `noframes`: case `script`: case `style`: case `template`: case `title`: B.push(Je), Q(p, t, n), B.removeElement(Je); return; case `head`: return; } break; case 3: switch (t) { case `template`: return Q(e, t, n, r); case `body`: case `html`: case `br`: break; default: return; } break; } yr(p, `body`, null), H = !0, z(e, t, n, r); } function $(e, t, n, r) { var i, o, s, l; switch (e) { case 1: if (et && (t = t.replace(Ae, ``), t.length === 0)) return; H && Ee.test(t) && (H = !1), Rt(), Dt(t); return; case 5: return; case 4: Et(t); return; case -1: if (Ke.length) return Ar(e); Ht(); return; case 2: switch (t) { case `html`: if (B.contains(`template`)) return; Le(n, B.elements[0]); return; case `base`: case `basefont`: case `bgsound`: case `link`: case `meta`: case `noframes`: case `script`: case `style`: case `template`: case `title`: Q(p, t, n); return; case `body`: if (i = B.elements[1], !i || !(i instanceof c.HTMLBodyElement) || B.contains(`template`)) return; H = !1, Le(n, i); return; case `frameset`: if (!H || (i = B.elements[1], !i || !(i instanceof c.HTMLBodyElement))) return; for (i.parentNode && i.parentNode.removeChild(i); !(B.top instanceof c.HTMLHtmlElement);) B.pop(); Y(t, n), z = Mr; return; case `address`: case `article`: case `aside`: case `blockquote`: case `center`: case `details`: case `dialog`: case `dir`: case `div`: case `dl`: case `fieldset`: case `figcaption`: case `figure`: case `footer`: case `header`: case `hgroup`: case `main`: case `nav`: case `ol`: case `p`: case `section`: case `summary`: case `ul`: B.inButtonScope(`p`) && $(m, `p`), Y(t, n); return; case `menu`: B.inButtonScope(`p`) && $(m, `p`), F(B.top, `menuitem`) && B.pop(), Y(t, n); return; case `h1`: case `h2`: case `h3`: case `h4`: case `h5`: case `h6`: B.inButtonScope(`p`) && $(m, `p`), B.top instanceof c.HTMLHeadingElement && B.pop(), Y(t, n); return; case `pre`: case `listing`: B.inButtonScope(`p`) && $(m, `p`), Y(t, n), tt = !0, H = !1; return; case `form`: if (Ye && !B.contains(`template`)) return; B.inButtonScope(`p`) && $(m, `p`), l = Y(t, n), B.contains(`template`) || (Ye = l); return; case `li`: for (H = !1, o = B.elements.length - 1; o >= 0; o--) { if (s = B.elements[o], s instanceof c.HTMLLIElement) { $(m, `li`); break; } if (F(s, S) && !F(s, C)) break; } B.inButtonScope(`p`) && $(m, `p`), Y(t, n); return; case `dd`: case `dt`: for (H = !1, o = B.elements.length - 1; o >= 0; o--) { if (s = B.elements[o], F(s, w)) { $(m, s.localName); break; } if (F(s, S) && !F(s, C)) break; } B.inButtonScope(`p`) && $(m, `p`), Y(t, n); return; case `plaintext`: B.inButtonScope(`p`) && $(m, `p`), Y(t, n), k = Kt; return; case `button`: B.inScope(`button`) ? ($(m, `button`), z(e, t, n, r)) : (Rt(), Y(t, n), H = !1); return; case `a`: var u = V.findElementByTag(`a`); u && ($(m, t), V.remove(u), B.removeElement(u)); case `b`: case `big`: case `code`: case `em`: case `font`: case `i`: case `s`: case `small`: case `strike`: case `strong`: case `tt`: case `u`: Rt(), V.push(Y(t, n), n); return; case `nobr`: Rt(), B.inScope(t) && ($(m, t), Rt()), V.push(Y(t, n), n); return; case `applet`: case `marquee`: case `object`: Rt(), Y(t, n), V.insertMarker(), H = !1; return; case `table`: !W._quirks && B.inButtonScope(`p`) && $(m, `p`), Y(t, n), H = !1, z = xr; return; case `area`: case `br`: case `embed`: case `img`: case `keygen`: case `wbr`: Rt(), Y(t, n), B.pop(), H = !1; return; case `input`: Rt(), l = Y(t, n), B.pop(); var d = l.getAttribute(`type`); (!d || d.toLowerCase() !== `hidden`) && (H = !1); return; case `param`: case `source`: case `track`: Y(t, n), B.pop(); return; case `hr`: B.inButtonScope(`p`) && $(m, `p`), F(B.top, `menuitem`) && B.pop(), Y(t, n), B.pop(), H = !1; return; case `image`: $(p, `img`, n, r); return; case `textarea`: Y(t, n), tt = !0, H = !1, k = Ut, Ge = z, z = br; return; case `xmp`: B.inButtonScope(`p`) && $(m, `p`), Rt(), H = !1, Ft(t, n); return; case `iframe`: H = !1, Ft(t, n); return; case `noembed`: Ft(t, n); return; case `select`: Rt(), Y(t, n), H = !1, z = z === xr || z === Cr || z === Tr || z === Er || z === Dr ? kr : Or; return; case `optgroup`: case `option`: B.top instanceof c.HTMLOptionElement && $(m, `option`), Rt(), Y(t, n); return; case `menuitem`: F(B.top, `menuitem`) && B.pop(), Rt(), Y(t, n); return; case `rb`: case `rtc`: B.inScope(`ruby`) && B.generateImpliedEndTags(), Y(t, n); return; case `rp`: case `rt`: B.inScope(`ruby`) && B.generateImpliedEndTags(`rtc`), Y(t, n); return; case `math`: Rt(), Fe(n), Ie(n), jt(t, n, a.MATHML), r && B.pop(); return; case `svg`: Rt(), I(n), Ie(n), jt(t, n, a.SVG), r && B.pop(); return; case `caption`: case `col`: case `colgroup`: case `frame`: case `head`: case `tbody`: case `td`: case `tfoot`: case `th`: case `thead`: case `tr`: return; } Rt(), Y(t, n); return; case 3: switch (t) { case `template`: Q(m, t, n); return; case `body`: if (!B.inScope(`body`)) return; z = jr; return; case `html`: if (!B.inScope(`body`)) return; z = jr, z(e, t, n); return; case `address`: case `article`: case `aside`: case `blockquote`: case `button`: case `center`: case `details`: case `dialog`: case `dir`: case `div`: case `dl`: case `fieldset`: case `figcaption`: case `figure`: case `footer`: case `header`: case `hgroup`: case `listing`: case `main`: case `menu`: case `nav`: case `ol`: case `pre`: case `section`: case `summary`: case `ul`: if (!B.inScope(t)) return; B.generateImpliedEndTags(), B.popTag(t); return; case `form`: if (B.contains(`template`)) { if (!B.inScope(`form`)) return; B.generateImpliedEndTags(), B.popTag(`form`); } else { var f = Ye; if (Ye = null, !f || !B.elementInScope(f)) return; B.generateImpliedEndTags(), B.removeElement(f); } return; case `p`: B.inButtonScope(t) ? (B.generateImpliedEndTags(t), B.popTag(t)) : ($(p, t, null), z(e, t, n, r)); return; case `li`: if (!B.inListItemScope(t)) return; B.generateImpliedEndTags(t), B.popTag(t); return; case `dd`: case `dt`: if (!B.inScope(t)) return; B.generateImpliedEndTags(t), B.popTag(t); return; case `h1`: case `h2`: case `h3`: case `h4`: case `h5`: case `h6`: if (!B.elementTypeInScope(c.HTMLHeadingElement)) return; B.generateImpliedEndTags(), B.popElementType(c.HTMLHeadingElement); return; case `sarcasm`: break; case `a`: case `b`: case `big`: case `code`: case `em`: case `font`: case `i`: case `nobr`: case `s`: case `small`: case `strike`: case `strong`: case `tt`: case `u`: if (Bt(t)) return; break; case `applet`: case `marquee`: case `object`: if (!B.inScope(t)) return; B.generateImpliedEndTags(), B.popTag(t), V.clearToMarker(); return; case `br`: $(p, t, null); return; } for (o = B.elements.length - 1; o >= 0; o--) if (s = B.elements[o], F(s, t)) { B.generateImpliedEndTags(t), B.popElement(s); break; } else if (F(s, S)) return; return; } } function br(e, t, n, r) { switch (e) { case 1: Dt(t); return; case -1: B.top instanceof c.HTMLScriptElement && (B.top._already_started = !0), B.pop(), z = Ge, z(e); return; case 3: t === `script` ? Vt() : (B.pop(), z = Ge); return; default: return; } } function xr(e, t, n, r) { function i(e) { for (var t = 0, n = e.length; t < n; t++) if (e[t][0] === `type`) return e[t][1].toLowerCase(); return null; } switch (e) { case 1: if ($e) { $(e, t, n, r); return; } else if (F(B.top, T)) { Qe = [], Ge = z, z = Sr, z(e, t, n, r); return; } break; case 4: Et(t); return; case 5: return; case 2: switch (t) { case `caption`: B.clearToContext(ee), V.insertMarker(), Y(t, n), z = Cr; return; case `colgroup`: B.clearToContext(ee), Y(t, n), z = wr; return; case `col`: xr(p, `colgroup`, null), z(e, t, n, r); return; case `tbody`: case `tfoot`: case `thead`: B.clearToContext(ee), Y(t, n), z = Tr; return; case `td`: case `th`: case `tr`: xr(p, `tbody`, null), z(e, t, n, r); return; case `table`: if (!B.inTableScope(t)) return; xr(m, t), z(e, t, n, r); return; case `style`: case `script`: case `template`: Q(e, t, n, r); return; case `input`: if (i(n) !== `hidden`) break; Y(t, n), B.pop(); return; case `form`: if (Ye || B.contains(`template`)) return; Ye = Y(t, n), B.popElement(Ye); return; } break; case 3: switch (t) { case `table`: if (!B.inTableScope(t)) return; B.popTag(t), Pt(); return; case `body`: case `caption`: case `col`: case `colgroup`: case `html`: case `tbody`: case `td`: case `tfoot`: case `th`: case `thead`: case `tr`: return; case `template`: Q(e, t, n, r); return; } break; case -1: $(e, t, n, r); return; } kt = !0, $(e, t, n, r), kt = !1; } function Sr(e, t, n, r) { if (e === f) { if (et && (t = t.replace(Ae, ``), t.length === 0)) return; Qe.push(t); } else { var i = Qe.join(``); Qe.length = 0, Ee.test(i) ? (kt = !0, $(f, i), kt = !1) : Dt(i), z = Ge, z(e, t, n, r); } } function Cr(e, t, n, r) { function i() { return B.inTableScope(`caption`) ? (B.generateImpliedEndTags(), B.popTag(`caption`), V.clearToMarker(), z = xr, !0) : !1; } switch (e) { case 2: switch (t) { case `caption`: case `col`: case `colgroup`: case `tbody`: case `td`: case `tfoot`: case `th`: case `thead`: case `tr`: i() && z(e, t, n, r); return; } break; case 3: switch (t) { case `caption`: i(); return; case `table`: i() && z(e, t, n, r); return; case `body`: case `col`: case `colgroup`: case `html`: case `tbody`: case `td`: case `tfoot`: case `th`: case `thead`: case `tr`: return; } break; } $(e, t, n, r); } function wr(e, t, n, r) { switch (e) { case 1: var i = t.match(ke); if (i && (Dt(i[0]), t = t.substring(i[0].length)), t.length === 0) return; break; case 4: Et(t); return; case 5: return; case 2: switch (t) { case `html`: $(e, t, n, r); return; case `col`: Y(t, n), B.pop(); return; case `template`: Q(e, t, n, r); return; } break; case 3: switch (t) { case `colgroup`: if (!F(B.top, `colgroup`)) return; B.pop(), z = xr; return; case `col`: return; case `template`: Q(e, t, n, r); return; } break; case -1: $(e, t, n, r); return; } F(B.top, `colgroup`) && (wr(m, `colgroup`), z(e, t, n, r)); } function Tr(e, t, n, r) { function i() { !B.inTableScope(`tbody`) && !B.inTableScope(`thead`) && !B.inTableScope(`tfoot`) || (B.clearToContext(te), Tr(m, B.top.localName, null), z(e, t, n, r)); } switch (e) { case 2: switch (t) { case `tr`: B.clearToContext(te), Y(t, n), z = Er; return; case `th`: case `td`: Tr(p, `tr`, null), z(e, t, n, r); return; case `caption`: case `col`: case `colgroup`: case `tbody`: case `tfoot`: case `thead`: i(); return; } break; case 3: switch (t) { case `table`: i(); return; case `tbody`: case `tfoot`: case `thead`: B.inTableScope(t) && (B.clearToContext(te), B.pop(), z = xr); return; case `body`: case `caption`: case `col`: case `colgroup`: case `html`: case `td`: case `th`: case `tr`: return; } break; } xr(e, t, n, r); } function Er(e, t, n, r) { function i() { return B.inTableScope(`tr`) ? (B.clearToContext(ne), B.pop(), z = Tr, !0) : !1; } switch (e) { case 2: switch (t) { case `th`: case `td`: B.clearToContext(ne), Y(t, n), z = Dr, V.insertMarker(); return; case `caption`: case `col`: case `colgroup`: case `tbody`: case `tfoot`: case `thead`: case `tr`: i() && z(e, t, n, r); return; } break; case 3: switch (t) { case `tr`: i(); return; case `table`: i() && z(e, t, n, r); return; case `tbody`: case `tfoot`: case `thead`: B.inTableScope(t) && i() && z(e, t, n, r); return; case `body`: case `caption`: case `col`: case `colgroup`: case `html`: case `td`: case `th`: return; } break; } xr(e, t, n, r); } function Dr(e, t, n, r) { switch (e) { case 2: switch (t) { case `caption`: case `col`: case `colgroup`: case `tbody`: case `td`: case `tfoot`: case `th`: case `thead`: case `tr`: B.inTableScope(`td`) ? (Dr(m, `td`), z(e, t, n, r)) : B.inTableScope(`th`) && (Dr(m, `th`), z(e, t, n, r)); return; } break; case 3: switch (t) { case `td`: case `th`: if (!B.inTableScope(t)) return; B.generateImpliedEndTags(), B.popTag(t), V.clearToMarker(), z = Er; return; case `body`: case `caption`: case `col`: case `colgroup`: case `html`: return; case `table`: case `tbody`: case `tfoot`: case `thead`: case `tr`: if (!B.inTableScope(t)) return; Dr(m, B.inTableScope(`td`) ? `td` : `th`), z(e, t, n, r); return; } break; } $(e, t, n, r); } function Or(e, t, n, r) { switch (e) { case 1: if (et && (t = t.replace(Ae, ``), t.length === 0)) return; Dt(t); return; case 4: Et(t); return; case 5: return; case -1: $(e, t, n, r); return; case 2: switch (t) { case `html`: $(e, t, n, r); return; case `option`: B.top instanceof c.HTMLOptionElement && Or(m, t), Y(t, n); return; case `optgroup`: B.top instanceof c.HTMLOptionElement && Or(m, `option`), B.top instanceof c.HTMLOptGroupElement && Or(m, t), Y(t, n); return; case `select`: Or(m, t); return; case `input`: case `keygen`: case `textarea`: if (!B.inSelectScope(`select`)) return; Or(m, `select`), z(e, t, n, r); return; case `script`: case `template`: Q(e, t, n, r); return; } break; case 3: switch (t) { case `optgroup`: B.top instanceof c.HTMLOptionElement && B.elements[B.elements.length - 2] instanceof c.HTMLOptGroupElement && Or(m, `option`), B.top instanceof c.HTMLOptGroupElement && B.pop(); return; case `option`: B.top instanceof c.HTMLOptionElement && B.pop(); return; case `select`: if (!B.inSelectScope(t)) return; B.popTag(t), Pt(); return; case `template`: Q(e, t, n, r); return; } break; } } function kr(e, t, n, r) { switch (t) { case `caption`: case `table`: case `tbody`: case `tfoot`: case `thead`: case `tr`: case `td`: case `th`: switch (e) { case 2: kr(m, `select`), z(e, t, n, r); return; case 3: B.inTableScope(t) && (kr(m, `select`), z(e, t, n, r)); return; } } Or(e, t, n, r); } function Ar(e, t, n, r) { function i(i) { z = i, Ke[Ke.length - 1] = z, z(e, t, n, r); } switch (e) { case 1: case 4: case 5: $(e, t, n, r); return; case -1: B.contains(`template`) ? (B.popTag(`template`), V.clearToMarker(), Ke.pop(), Pt(), z(e, t, n, r)) : Ht(); return; case 2: switch (t) { case `base`: case `basefont`: case `bgsound`: case `link`: case `meta`: case `noframes`: case `script`: case `style`: case `template`: case `title`: Q(e, t, n, r); return; case `caption`: case `colgroup`: case `tbody`: case `tfoot`: case `thead`: i(xr); return; case `col`: i(wr); return; case `tr`: i(Tr); return; case `td`: case `th`: i(Er); return; } i($); return; case 3: switch (t) { case `template`: Q(e, t, n, r); return; default: return; } } } function jr(e, t, n, r) { switch (e) { case 1: if (Ee.test(t)) break; $(e, t); return; case 4: B.elements[0]._appendChild(W.createComment(t)); return; case 5: return; case -1: Ht(); return; case 2: if (t === `html`) { $(e, t, n, r); return; } break; case 3: if (t === `html`) { if (qe) return; z = Pr; return; } break; } z = $, z(e, t, n, r); } function Mr(e, t, n, r) { switch (e) { case 1: t = t.replace(De, ``), t.length > 0 && Dt(t); return; case 4: Et(t); return; case 5: return; case -1: Ht(); return; case 2: switch (t) { case `html`: $(e, t, n, r); return; case `frameset`: Y(t, n); return; case `frame`: Y(t, n), B.pop(); return; case `noframes`: Q(e, t, n, r); return; } break; case 3: if (t === `frameset`) { if (qe && B.top instanceof c.HTMLHtmlElement) return; B.pop(), !qe && !(B.top instanceof c.HTMLFrameSetElement) && (z = Nr); return; } break; } } function Nr(e, t, n, r) { switch (e) { case 1: t = t.replace(De, ``), t.length > 0 && Dt(t); return; case 4: Et(t); return; case 5: return; case -1: Ht(); return; case 2: switch (t) { case `html`: $(e, t, n, r); return; case `noframes`: Q(e, t, n, r); return; } break; case 3: if (t === `html`) { z = Fr; return; } break; } } function Pr(e, t, n, r) { switch (e) { case 1: if (Ee.test(t)) break; $(e, t, n, r); return; case 4: W._appendChild(W.createComment(t)); return; case 5: $(e, t, n, r); return; case -1: Ht(); return; case 2: if (t === `html`) { $(e, t, n, r); return; } break; } z = $, z(e, t, n, r); } function Fr(e, t, n, r) { switch (e) { case 1: t = t.replace(De, ``), t.length > 0 && $(e, t, n, r); return; case 4: W._appendChild(W.createComment(t)); return; case 5: $(e, t, n, r); return; case -1: Ht(); return; case 2: switch (t) { case `html`: $(e, t, n, r); return; case `noframes`: Q(e, t, n, r); return; } break; } } function Ir(e, n, r, i) { function o(e) { for (var t = 0, n = e.length; t < n; t++) switch (e[t][0]) { case `color`: case `face`: case `size`: return !0; } return !1; } var s; switch (e) { case 1: H && Oe.test(n) && (H = !1), et && (n = n.replace(Ae, `�`)), Dt(n); return; case 4: Et(n); return; case 5: return; case 2: switch (n) { case `font`: if (!o(r)) break; case `b`: case `big`: case `blockquote`: case `body`: case `br`: case `center`: case `code`: case `dd`: case `div`: case `dl`: case `dt`: case `em`: case `embed`: case `h1`: case `h2`: case `h3`: case `h4`: case `h5`: case `h6`: case `head`: case `hr`: case `i`: case `img`: case `li`: case `listing`: case `menu`: case `meta`: case `nobr`: case `ol`: case `p`: case `pre`: case `ruby`: case `s`: case `small`: case `span`: case `strong`: case `strike`: case `sub`: case `sup`: case `table`: case `tt`: case `u`: case `ul`: case `var`: if (qe) break; do B.pop(), s = B.top; while (s.namespaceURI !== a.HTML && !Me(s) && !Ne(s)); J(e, n, r, i); return; } s = B.elements.length === 1 && qe ? t : B.top, s.namespaceURI === a.MATHML ? Fe(r) : s.namespaceURI === a.SVG && (n = Pe(n), I(r)), Ie(r), jt(n, r, s.namespaceURI), i && (n === `script` && (s.namespaceURI, a.SVG), B.pop()); return; case 3: if (s = B.top, n === `script` && s.namespaceURI === a.SVG && s.localName === `script`) B.pop(); else for (var c = B.elements.length - 1, l = B.elements[c];;) { if (l.localName.toLowerCase() === n) { B.popElement(l); break; } if (l = B.elements[--c], l.namespaceURI === a.HTML) { z(e, n, r, i); break; } } return; } } return nt.testTokenizer = function(e, t, n, r) { var i = []; switch (t) { case `PCDATA state`: k = Z; break; case `RCDATA state`: k = Ut; break; case `RAWTEXT state`: k = Wt; break; case `PLAINTEXT state`: k = Kt; break; } if (n && (de = n), J = function(e, t, n, r) { switch (yt(), e) { case 1: i.length > 0 && i[i.length - 1][0] === `Character` ? i[i.length - 1][1] += t : i.push([`Character`, t]); break; case 4: i.push([`Comment`, t]); break; case 5: i.push([ `DOCTYPE`, t, n === void 0 ? null : n, r === void 0 ? null : r, !Ze ]); break; case 2: for (var a = Object.create(null), o = 0; o < n.length; o++) { var s = n[o]; s.length === 1 ? a[s[0]] = `` : a[s[0]] = s[1]; } var c = [ `StartTag`, t, a ]; r && c.push(!0), i.push(c); break; case 3: i.push([`EndTag`, t]); break; case -1: break; } }, !r) this.parse(e, !0); else { for (var a = 0; a < e.length; a++) this.parse(e[a]); this.parse(``, !0); } return i; }, nt; } })); var pe$7 = e$2(((e, t) => { t.exports = c; var n = de$7(), r = N$6(), i = fe$7(), a = o$8(), s = h$8(); function c(e) { this.contextObject = e; } var l = { xml: { "": !0, "1.0": !0, "2.0": !0 }, core: { "": !0, "2.0": !0 }, html: { "": !0, "1.0": !0, "2.0": !0 }, xhtml: { "": !0, "1.0": !0, "2.0": !0 } }; c.prototype = { hasFeature: function(e, t) { var n = l[(e || ``).toLowerCase()]; return n && n[t || ``] || !1; }, createDocumentType: function(e, t, n) { return s.isValidQName(e) || a.InvalidCharacterError(), new r(this.contextObject, e, t, n); }, createDocument: function(e, t, r) { var i = new n(!1, null), o = t ? i.createElementNS(e, t) : null; return r && i.appendChild(r), o && i.appendChild(o), e === a.NAMESPACE.HTML ? i._contentType = `application/xhtml+xml` : e === a.NAMESPACE.SVG ? i._contentType = `image/svg+xml` : i._contentType = `application/xml`, i; }, createHTMLDocument: function(e) { var t = new n(!0, null); t.appendChild(new r(t, `html`)); var i = t.createElement(`html`); t.appendChild(i); var a = t.createElement(`head`); if (i.appendChild(a), e !== void 0) { var o = t.createElement(`title`); a.appendChild(o), o.appendChild(t.createTextNode(e)); } return i.appendChild(t.createElement(`body`)), t.modclock = 1, t; }, mozSetOutputMutationHandler: function(e, t) { e.mutationHandler = t; }, mozGetInputMutationHandler: function(e) { a.nyi(); }, mozHTMLParser: i }; })); var me$7 = e$2(((e, t) => { var n = ae$6(), r = k$8(); t.exports = i; function i(e, t) { this._window = e, this._href = t; } i.prototype = Object.create(r.prototype, { constructor: { value: i }, href: { get: function() { return this._href; }, set: function(e) { this.assign(e); } }, assign: { value: function(e) { var t = new n(this._href).resolve(e); this._href = t; } }, replace: { value: function(e) { this.assign(e); } }, reload: { value: function() { this.assign(this.href); } }, toString: { value: function() { return this.href; } } }); })); var he$7 = e$2(((e, t) => { t.exports = Object.create(null, { appCodeName: { value: `Mozilla` }, appName: { value: `Netscape` }, appVersion: { value: `4.0` }, platform: { value: `` }, product: { value: `Gecko` }, productSub: { value: `20100101` }, userAgent: { value: `` }, vendor: { value: `` }, vendorSub: { value: `` }, taintEnabled: { value: function() { return !1; } } }); })); var ge$7 = e$2(((e, t) => { t.exports = { setTimeout, clearTimeout, setInterval, clearInterval }; })); var _e$7 = e$2(((e, t) => { var n = o$8(); e = t.exports = { CSSStyleDeclaration: le$7(), CharacterData: T$8(), Comment: D$7(), DOMException: i$9(), DOMImplementation: pe$7(), DOMTokenList: v$7(), Document: de$7(), DocumentFragment: ee$5(), DocumentType: N$6(), Element: C$8(), HTMLParser: fe$7(), NamedNodeMap: S$8(), Node: u$8(), NodeList: p$10(), NodeFilter: ne$5(), ProcessingInstruction: te$5(), Text: E$8(), Window: ve$7() }, n.merge(e, se$7()), n.merge(e, j$6().elements), n.merge(e, M$7().elements); })); var ve$7 = e$2(((e, t) => { var n = pe$7(), r = s$6(), i = me$7(), a = o$8(); t.exports = c; function c(e) { this.document = e || new n(null).createHTMLDocument(``), this.document._scripting_enabled = !0, this.document.defaultView = this, this.location = new i(this, this.document._address || `about:blank`); } c.prototype = Object.create(r.prototype, { console: { value: console }, history: { value: { back: a.nyi, forward: a.nyi, go: a.nyi } }, navigator: { value: he$7() }, window: { get: function() { return this; } }, self: { get: function() { return this; } }, frames: { get: function() { return this; } }, parent: { get: function() { return this; } }, top: { get: function() { return this; } }, length: { value: 0 }, frameElement: { value: null }, opener: { value: null }, onload: { get: function() { return this._getEventHandler(`load`); }, set: function(e) { this._setEventHandler(`load`, e); } }, getComputedStyle: { value: function(e) { return e.style; } } }), a.expose(ge$7(), c), a.expose(_e$7(), c); })); var ye$7 = e$2(((e) => { var t = pe$7(), n = fe$7(); ve$7(); var r = _e$7(); e.createDOMImplementation = function() { return new t(null); }, e.createDocument = function(e, r) { if (e || r) { var i = new n(); return i.parse(e || ``, !0), i.document(); } return new t(null).createHTMLDocument(``); }, e.createIncrementalHTMLParser = function() { var e = new n(); return { write: function(t) { t.length > 0 && e.parse(t, !1, function() { return !0; }); }, end: function(t) { e.parse(t || ``, !0, function() { return !0; }); }, process: function(t) { return e.parse(``, !1, t); }, document: function() { return e.document(); } }; }, e.createWindow = function(t, n) { var i = e.createDocument(t); return n !== void 0 && (i._address = n), new r.Window(i); }, e.impl = r; })); function be$7(e) { for (var t = 1; t < arguments.length; t++) { var n = arguments[t]; for (var r in n) Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]); } return e; } function xe$7(e, t) { return Array(t + 1).join(e); } function Se$7(e) { return e.replace(/^\n*/, ``); } function Ce$7(e) { for (var t = e.length; t > 0 && e[t - 1] === ` `;) t--; return e.substring(0, t); } function we$7(e) { return Ce$7(Se$7(e)); } var Te$7 = `ADDRESS.ARTICLE.ASIDE.AUDIO.BLOCKQUOTE.BODY.CANVAS.CENTER.DD.DIR.DIV.DL.DT.FIELDSET.FIGCAPTION.FIGURE.FOOTER.FORM.FRAMESET.H1.H2.H3.H4.H5.H6.HEADER.HGROUP.HR.HTML.ISINDEX.LI.MAIN.MENU.NAV.NOFRAMES.NOSCRIPT.OL.OUTPUT.P.PRE.SECTION.TABLE.TBODY.TD.TFOOT.TH.THEAD.TR.UL`.split(`.`); function Ee$7(e) { return F$6(e, Te$7); } var De$7 = [ `AREA`, `BASE`, `BR`, `COL`, `COMMAND`, `EMBED`, `HR`, `IMG`, `INPUT`, `KEYGEN`, `LINK`, `META`, `PARAM`, `SOURCE`, `TRACK`, `WBR` ]; function Oe$7(e) { return F$6(e, De$7); } function ke$7(e) { return Me$7(e, De$7); } var Ae$7 = [ `A`, `TABLE`, `THEAD`, `TBODY`, `TFOOT`, `TH`, `TD`, `IFRAME`, `SCRIPT`, `AUDIO`, `VIDEO` ]; function P$6(e) { return F$6(e, Ae$7); } function je$7(e) { return Me$7(e, Ae$7); } function F$6(e, t) { return t.indexOf(e.nodeName) >= 0; } function Me$7(e, t) { return e.getElementsByTagName && t.some(function(t) { return e.getElementsByTagName(t).length; }); } var Ne$7 = [ [/\\/g, `\\\\`], [/\*/g, `\\*`], [/^-/g, `\\-`], [/^\+ /g, `\\+ `], [/^(=+)/g, `\\$1`], [/^(#{1,6}) /g, `\\$1 `], [/`/g, "\\`"], [/^~~~/g, `\\~~~`], [/\[/g, `\\[`], [/\]/g, `\\]`], [/^>/g, `\\>`], [/_/g, `\\_`], [/^(\d+)\. /g, `$1\\. `] ]; function Pe$7(e) { return Ne$7.reduce(function(e, t) { return e.replace(t[0], t[1]); }, e); } var I$6 = {}; I$6.paragraph = { filter: `p`, replacement: function(e) { return ` ` + e + ` `; } }, I$6.lineBreak = { filter: `br`, replacement: function(e, t, n) { return n.br + ` `; } }, I$6.heading = { filter: [ `h1`, `h2`, `h3`, `h4`, `h5`, `h6` ], replacement: function(e, t, n) { var r = Number(t.nodeName.charAt(1)); if (n.headingStyle === `setext` && r < 3) { var i = xe$7(r === 1 ? `=` : `-`, e.length); return ` ` + e + ` ` + i + ` `; } else return ` ` + xe$7(`#`, r) + ` ` + e + ` `; } }, I$6.blockquote = { filter: `blockquote`, replacement: function(e) { return e = we$7(e).replace(/^/gm, `> `), ` ` + e + ` `; } }, I$6.list = { filter: [`ul`, `ol`], replacement: function(e, t) { var n = t.parentNode; return n.nodeName === `LI` && n.lastElementChild === t ? ` ` + e : ` ` + e + ` `; } }, I$6.listItem = { filter: `li`, replacement: function(e, t, n) { var r = n.bulletListMarker + ` `, i = t.parentNode; if (i.nodeName === `OL`) { var a = i.getAttribute(`start`), o = Array.prototype.indexOf.call(i.children, t); r = (a ? Number(a) + o : o + 1) + `. `; } var s = /\n$/.test(e); return e = we$7(e) + (s ? ` ` : ``), e = e.replace(/\n/gm, ` ` + ` `.repeat(r.length)), r + e + (t.nextSibling ? ` ` : ``); } }, I$6.indentedCodeBlock = { filter: function(e, t) { return t.codeBlockStyle === `indented` && e.nodeName === `PRE` && e.firstChild && e.firstChild.nodeName === `CODE`; }, replacement: function(e, t, n) { return ` ` + t.firstChild.textContent.replace(/\n/g, ` `) + ` `; } }, I$6.fencedCodeBlock = { filter: function(e, t) { return t.codeBlockStyle === `fenced` && e.nodeName === `PRE` && e.firstChild && e.firstChild.nodeName === `CODE`; }, replacement: function(e, t, n) { for (var r = ((t.firstChild.getAttribute(`class`) || ``).match(/language-(\S+)/) || [null, ``])[1], i = t.firstChild.textContent, a = n.fence.charAt(0), o = 3, s = RegExp(`^` + a + `{3,}`, `gm`), c; c = s.exec(i);) c[0].length >= o && (o = c[0].length + 1); var l = xe$7(a, o); return ` ` + l + r + ` ` + i.replace(/\n$/, ``) + ` ` + l + ` `; } }, I$6.horizontalRule = { filter: `hr`, replacement: function(e, t, n) { return ` ` + n.hr + ` `; } }, I$6.inlineLink = { filter: function(e, t) { return t.linkStyle === `inlined` && e.nodeName === `A` && e.getAttribute(`href`); }, replacement: function(e, t) { var n = Ie$7(t.getAttribute(`href`)), r = Le$7(Fe$7(t.getAttribute(`title`))), i = r ? ` "` + r + `"` : ``; return `[` + e + `](` + n + i + `)`; } }, I$6.referenceLink = { filter: function(e, t) { return t.linkStyle === `referenced` && e.nodeName === `A` && e.getAttribute(`href`); }, replacement: function(e, t, n) { var r = Ie$7(t.getAttribute(`href`)), i = Fe$7(t.getAttribute(`title`)); i &&= ` "` + Le$7(i) + `"`; var a, o; switch (n.linkReferenceStyle) { case `collapsed`: a = `[` + e + `][]`, o = `[` + e + `]: ` + r + i; break; case `shortcut`: a = `[` + e + `]`, o = `[` + e + `]: ` + r + i; break; default: var s = this.references.length + 1; a = `[` + e + `][` + s + `]`, o = `[` + s + `]: ` + r + i; } return this.references.push(o), a; }, references: [], append: function(e) { var t = ``; return this.references.length && (t = ` ` + this.references.join(` `) + ` `, this.references = []), t; } }, I$6.emphasis = { filter: [`em`, `i`], replacement: function(e, t, n) { return e.trim() ? n.emDelimiter + e + n.emDelimiter : ``; } }, I$6.strong = { filter: [`strong`, `b`], replacement: function(e, t, n) { return e.trim() ? n.strongDelimiter + e + n.strongDelimiter : ``; } }, I$6.code = { filter: function(e) { var t = e.previousSibling || e.nextSibling, n = e.parentNode.nodeName === `PRE` && !t; return e.nodeName === `CODE` && !n; }, replacement: function(e) { if (!e) return ``; e = e.replace(/\r?\n|\r/g, ` `); for (var t = /^`|^ .*?[^ ].* $|`$/.test(e) ? ` ` : ``, n = "`", r = e.match(/`+/gm) || []; r.indexOf(n) !== -1;) n += "`"; return n + t + e + t + n; } }, I$6.image = { filter: `img`, replacement: function(e, t) { var n = Pe$7(Fe$7(t.getAttribute(`alt`))), r = Ie$7(t.getAttribute(`src`) || ``), i = Fe$7(t.getAttribute(`title`)), a = i ? ` "` + Le$7(i) + `"` : ``; return r ? `![` + n + `](` + r + a + `)` : ``; } }; function Fe$7(e) { return e ? e.replace(/(\n+\s*)+/g, ` `) : ``; } function Ie$7(e) { var t = e.replace(/([<>()])/g, `\\$1`); return t.indexOf(` `) >= 0 ? `<` + t + `>` : t; } function Le$7(e) { return e.replace(/"/g, `\\"`); } function L$6(e) { for (var t in this.options = e, this._keep = [], this._remove = [], this.blankRule = { replacement: e.blankReplacement }, this.keepReplacement = e.keepReplacement, this.defaultRule = { replacement: e.defaultReplacement }, this.array = [], e.rules) this.array.push(e.rules[t]); } L$6.prototype = { add: function(e, t) { this.array.unshift(t); }, keep: function(e) { this._keep.unshift({ filter: e, replacement: this.keepReplacement }); }, remove: function(e) { this._remove.unshift({ filter: e, replacement: function() { return ``; } }); }, forNode: function(e) { if (e.isBlank) return this.blankRule; var t; return (t = Re$7(this.array, e, this.options)) || (t = Re$7(this._keep, e, this.options)) || (t = Re$7(this._remove, e, this.options)) ? t : this.defaultRule; }, forEach: function(e) { for (var t = 0; t < this.array.length; t++) e(this.array[t], t); } }; function Re$7(e, t, n) { for (var r = 0; r < e.length; r++) { var i = e[r]; if (ze$7(i, t, n)) return i; } } function ze$7(e, t, n) { var r = e.filter; if (typeof r == `string`) { if (r === t.nodeName.toLowerCase()) return !0; } else if (Array.isArray(r)) { if (r.indexOf(t.nodeName.toLowerCase()) > -1) return !0; } else if (typeof r == `function`) { if (r.call(e, t, n)) return !0; } else throw TypeError("`filter` needs to be a string, array, or function"); } function R$6(e) { var t = e.element, n = e.isBlock, r = e.isVoid, i = e.isPre || function(e) { return e.nodeName === `PRE`; }; if (!(!t.firstChild || i(t))) { for (var a = null, o = !1, s = null, c = Ve$7(s, t, i); c !== t;) { if (c.nodeType === 3 || c.nodeType === 4) { var l = c.data.replace(/[ \r\n\t]+/g, ` `); if ((!a || / $/.test(a.data)) && !o && l[0] === ` ` && (l = l.substr(1)), !l) { c = Be$7(c); continue; } c.data = l, a = c; } else if (c.nodeType === 1) n(c) || c.nodeName === `BR` ? (a && (a.data = a.data.replace(/ $/, ``)), a = null, o = !1) : r(c) || i(c) ? (a = null, o = !0) : a && (o = !1); else { c = Be$7(c); continue; } var u = Ve$7(s, c, i); s = c, c = u; } a && (a.data = a.data.replace(/ $/, ``), a.data || Be$7(a)); } } function Be$7(e) { var t = e.nextSibling || e.parentNode; return e.parentNode.removeChild(e), t; } function Ve$7(e, t, n) { return e && e.parentNode === t || n(t) ? t.nextSibling || t.parentNode : t.firstChild || t.nextSibling || t.parentNode; } var He$7 = typeof window < `u` ? window : {}; function Ue$7() { var e = He$7.DOMParser, t = !1; try { new e().parseFromString(``, `text/html`) && (t = !0); } catch {} return t; } function We$7() { var e = function() {}, t = ye$7(); return e.prototype.parseFromString = function(e) { return t.createDocument(e); }, e; } var z$6 = Ue$7() ? He$7.DOMParser : We$7(); function Ge$7(e, t) { var n = typeof e == `string` ? B$7().parseFromString(`` + e + ``, `text/html`).getElementById(`turndown-root`) : e.cloneNode(!0); return R$6({ element: n, isBlock: Ee$7, isVoid: Oe$7, isPre: t.preformattedCode ? V$6 : null }), n; } var Ke$7; function B$7() { return Ke$7 ||= new z$6(), Ke$7; } function V$6(e) { return e.nodeName === `PRE` || e.nodeName === `CODE`; } function qe$7(e, t) { return e.isBlock = Ee$7(e), e.isCode = e.nodeName === `CODE` || e.parentNode.isCode, e.isBlank = Je$7(e), e.flankingWhitespace = Ye$7(e, t), e; } function Je$7(e) { return !Oe$7(e) && !P$6(e) && /^\s*$/i.test(e.textContent) && !ke$7(e) && !je$7(e); } function Ye$7(e, t) { if (e.isBlock || t.preformattedCode && e.isCode) return { leading: ``, trailing: `` }; var n = Xe$7(e.textContent); return n.leadingAscii && H$7(`left`, e, t) && (n.leading = n.leadingNonAscii), n.trailingAscii && H$7(`right`, e, t) && (n.trailing = n.trailingNonAscii), { leading: n.leading, trailing: n.trailing }; } function Xe$7(e) { var t = e.match(/^(([ \t\r\n]*)(\s*))(?:(?=\S)[\s\S]*\S)?((\s*?)([ \t\r\n]*))$/); return { leading: t[1], leadingAscii: t[2], leadingNonAscii: t[3], trailing: t[4], trailingNonAscii: t[5], trailingAscii: t[6] }; } function H$7(e, t, n) { var r, i, a; return e === `left` ? (r = t.previousSibling, i = / $/) : (r = t.nextSibling, i = /^ /), r && (r.nodeType === 3 ? a = i.test(r.nodeValue) : n.preformattedCode && r.nodeName === `CODE` ? a = !1 : r.nodeType === 1 && !Ee$7(r) && (a = i.test(r.textContent))), a; } var Ze$7 = Array.prototype.reduce; function Qe$7(e) { if (!(this instanceof Qe$7)) return new Qe$7(e); var t = { rules: I$6, headingStyle: `setext`, hr: `* * *`, bulletListMarker: `*`, codeBlockStyle: `indented`, fence: "```", emDelimiter: `_`, strongDelimiter: `**`, linkStyle: `inlined`, linkReferenceStyle: `full`, br: ` `, preformattedCode: !1, blankReplacement: function(e, t) { return t.isBlock ? ` ` : ``; }, keepReplacement: function(e, t) { return t.isBlock ? ` ` + t.outerHTML + ` ` : t.outerHTML; }, defaultReplacement: function(e, t) { return t.isBlock ? ` ` + e + ` ` : e; } }; this.options = be$7({}, t, e), this.rules = new L$6(this.options); } Qe$7.prototype = { turndown: function(e) { if (!nt$7(e)) throw TypeError(e + ` is not a string, or an element/document/fragment node.`); if (e === ``) return ``; var t = $e$7.call(this, new Ge$7(e, this.options)); return U$7.call(this, t); }, use: function(e) { if (Array.isArray(e)) for (var t = 0; t < e.length; t++) this.use(e[t]); else if (typeof e == `function`) e(this); else throw TypeError(`plugin must be a Function or an Array of Functions`); return this; }, addRule: function(e, t) { return this.rules.add(e, t), this; }, keep: function(e) { return this.rules.keep(e), this; }, remove: function(e) { return this.rules.remove(e), this; }, escape: function(e) { return Pe$7(e); } }; function $e$7(e) { var t = this; return Ze$7.call(e.childNodes, function(e, n) { n = new qe$7(n, t.options); var r = ``; return n.nodeType === 3 ? r = n.isCode ? n.nodeValue : t.escape(n.nodeValue) : n.nodeType === 1 && (r = et$7.call(t, n)), tt$7(e, r); }, ``); } function U$7(e) { var t = this; return this.rules.forEach(function(n) { typeof n.append == `function` && (e = tt$7(e, n.append(t.options))); }), e.replace(/^[\t\r\n]+/, ``).replace(/[\t\r\n\s]+$/, ``); } function et$7(e) { var t = this.rules.forNode(e), n = $e$7.call(this, e), r = e.flankingWhitespace; return (r.leading || r.trailing) && (n = n.trim()), r.leading + t.replacement(n, e, this.options) + r.trailing; } function tt$7(e, t) { var n = Ce$7(e), r = Se$7(t), i = Math.max(e.length - n.length, t.length - r.length); return n + ` `.substring(0, i) + r; } function nt$7(e) { return e != null && (typeof e == `string` || e.nodeType && (e.nodeType === 1 || e.nodeType === 9 || e.nodeType === 11)); } //#endregion //#region node_modules/eve/dist/src/execution/web-fetch/html.js function convertHtmlToMarkdown(t) { let n = new Qe$7({ bulletListMarker: `-`, codeBlockStyle: `fenced`, emDelimiter: `*`, headingStyle: `atx`, hr: `---` }); return n.remove([ `script`, `style`, `meta`, `link` ]), n.turndown(t); } function extractTextFromHtml(e) { let t = e; return t = t.replace(/<(script|style|noscript)\b[^>]*>[\s\S]*?<\/\1>/gi, ``), t = t.replace(/<\/(p|div|br|h[1-6]|li|tr|blockquote|pre|section|article|header|footer|nav|aside|main|figure|figcaption|details|summary)>/gi, ` `), t = t.replace(//gi, ` `), t = t.replace(/<[^>]+>/g, ``), t = decodeHtmlEntities(t), t = t.split(` `).map((e) => e.replace(/[ \t]+/g, ` `).trim()).join(` `).replace(/\n{3,}/g, ` `).trim(), t; } const ENTITY_MAP = { "&": `&`, ">": `>`, "<": `<`, " ": ` `, """: `"`, "'": `'`, "'": `'`, "/": `/` }; const ENTITY_PATTERN = new RegExp(Object.keys(ENTITY_MAP).join(`|`), `gi`); function decodeHtmlEntities(e) { return e.replace(ENTITY_PATTERN, (e) => ENTITY_MAP[e.toLowerCase()] ?? e); } //#endregion //#region node_modules/eve/dist/src/execution/web-fetch/tool.js const MAX_RESPONSE_SIZE = 5 * 1024 * 1024; async function executeWebFetchTool(n) { let { url: r, format: i = `markdown`, timeout: a } = n; if (!r.startsWith(`http://`) && !r.startsWith(`https://`)) throw Error(`URL must start with http:// or https://`); let o = Math.min(a === void 0 ? 3e4 : a * 1e3, 12e4), s = AbortSignal.timeout(o), c = buildHeaders(i), l = await fetch(r, { headers: c, signal: s }), u = l.status === 403 && l.headers.get(`cf-mitigated`) === `challenge` ? await fetch(r, { headers: { ...c, "User-Agent": EVE_PACKAGE_NAME }, signal: s }) : l; if (!u.ok) throw Error(`Request failed with status code: ${u.status}`); let d = u.headers.get(`content-length`); if (d !== null && parseInt(d, 10) > MAX_RESPONSE_SIZE) throw Error(`Response too large (exceeds 5 MB limit).`); let f = await u.arrayBuffer(); if (f.byteLength > MAX_RESPONSE_SIZE) throw Error(`Response too large (exceeds 5 MB limit).`); let p = u.headers.get(`content-type`) ?? ``, m = p.includes(`text/html`), h = new TextDecoder().decode(f), g; g = i === `markdown` && m ? convertHtmlToMarkdown(h) : i === `text` && m ? extractTextFromHtml(h) : h; let { output: _, truncated: v } = truncateHead(g); return { content: _, contentType: p, truncated: v, url: r }; } function buildHeaders(e) { let t; return t = e === `markdown` ? `text/markdown;q=1.0, text/x-markdown;q=0.9, text/plain;q=0.8, text/html;q=0.7, */*;q=0.1` : e === `text` ? `text/plain;q=1.0, text/markdown;q=0.9, text/html;q=0.8, */*;q=0.1` : `text/html;q=1.0, application/xhtml+xml;q=0.9, text/plain;q=0.8, text/markdown;q=0.7, */*;q=0.1`, { Accept: t, "Accept-Language": `en-US,en;q=0.9`, "User-Agent": `Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.0.0 Safari/537.36` }; } //#endregion //#region node_modules/eve/dist/src/runtime/framework-tools/web-fetch.js async function executeWebFetch(e) { return executeWebFetchTool(e); } const WEB_FETCH_INPUT_SCHEMA = { additionalProperties: !1, properties: { format: { description: `The format to return the content in (text, markdown, or html). HTML responses are automatically converted to the requested format. Defaults to "markdown".`, enum: [ `markdown`, `text`, `html` ], type: `string` }, timeout: { description: `Optional timeout in seconds. Defaults to 30, max 120.`, type: `number` }, url: { description: `The fully-formed URL to fetch content from. Must start with http:// or https://.`, type: `string` } }, required: [`url`], type: `object` }; const WEB_FETCH_OUTPUT_SCHEMA = { additionalProperties: !1, properties: { content: { type: `string` }, contentType: { type: `string` }, truncated: { type: `boolean` }, url: { type: `string` } }, required: [ `content`, `contentType`, `url`, `truncated` ], type: `object` }; const WEB_FETCH_TOOL_DEFINITION = { description: [ `Fetch a webpage and return its content in the requested format. Use this to retrieve and analyze content from URLs.`, ``, `Usage notes:`, `- The URL must be a fully-formed valid URL starting with http:// or https://`, `- HTML responses are automatically converted to markdown or plain text based on the requested format`, `- Format options: "markdown" (default), "text", or "html"`, `- Default timeout is 30 seconds (max 120 seconds)`, `- Maximum response size is 5 MB; content is further capped at the shared tool-output budget (50 KB / 2000 lines)`, `- This tool is read-only and does not modify any files` ].join(` `), execute: executeWebFetch, inputSchema: WEB_FETCH_INPUT_SCHEMA, logicalPath: `eve:framework/web-fetch`, name: `web_fetch`, outputSchema: WEB_FETCH_OUTPUT_SCHEMA, sourceId: `eve:web-fetch-tool`, sourceKind: `module` }; //#endregion //#region node_modules/eve/dist/src/execution/sandbox/write-file-tool.js async function executeWriteFileOnSandbox(e, t) { let { filePath: n, content: r } = t; validateAbsoluteFilePath(n); let i = loadContext(), a = normalizeModelPath(n), o = buildReadFileTargetKey(a), s = await e.readTextFile({ path: n }); if (s === null) return await e.writeTextFile({ content: r, path: n }), setReadFileStamp(i, o, createReadFileStamp({ content: r, filePath: a })), { existed: !1, path: a }; let c = i.ensure(ReadFileStateKey, () => ({ byTarget: {} })).byTarget[o]; if (c === void 0) throw Error(`You must read file ${n} before overwriting it. Use the read_file tool first.`); let l = createReadFileStamp({ content: s, filePath: a }); if (l.contentHash !== c.contentHash || l.byteLength !== c.byteLength) throw Error(`File ${n} has been modified since it was last read. Please read the file again before modifying it.`); return await e.writeTextFile({ content: r, path: n }), setReadFileStamp(i, o, createReadFileStamp({ content: r, filePath: a })), { existed: !0, path: a }; } //#endregion //#region node_modules/eve/dist/src/runtime/framework-tools/write-file.js const WRITE_FILE_INPUT_SCHEMA = { additionalProperties: !1, properties: { content: { description: `Complete replacement file contents.`, type: `string` }, filePath: { description: `The absolute path to the file to write (must be absolute, not relative).`, type: `string` } }, required: [`filePath`, `content`], type: `object` }; const WRITE_FILE_OUTPUT_SCHEMA = { additionalProperties: !1, properties: { existed: { type: `boolean` }, path: { type: `string` } }, required: [`existed`, `path`], type: `object` }; async function executeWriteFile(e) { return executeWriteFileOnSandbox(await requireSandboxSession(), e); } const WRITE_FILE_TOOL_DEFINITION = { description: [ `Writes a file to the local filesystem.`, ``, `Usage:`, `- This tool will overwrite the existing file if there is one at the provided path.`, `- If this is an existing file, you MUST use the read_file tool first to read the file's contents. This tool will fail if you did not read the file first.`, `- ALWAYS prefer editing existing files in the codebase. NEVER write new files unless explicitly required.`, `- NEVER proactively create documentation files (*.md) or README files. Only create documentation files if explicitly requested by the User.`, `- Only use emojis if the user explicitly requests it. Avoid writing emojis to files unless asked.` ].join(` `), execute: executeWriteFile, inputSchema: WRITE_FILE_INPUT_SCHEMA, logicalPath: `eve:framework/write-file`, name: `write_file`, outputSchema: WRITE_FILE_OUTPUT_SCHEMA, sourceId: `eve:write-file-tool`, sourceKind: `module` }; //#endregion //#region node_modules/eve/dist/src/runtime/framework-tools/index.js const ALL_FRAMEWORK_TOOLS = [ ASK_QUESTION_TOOL_DEFINITION, BASH_TOOL_DEFINITION, GLOB_TOOL_DEFINITION, GREP_TOOL_DEFINITION, READ_FILE_TOOL_DEFINITION, WRITE_FILE_TOOL_DEFINITION, TODO_TOOL_DEFINITION, WEB_FETCH_TOOL_DEFINITION, WEB_SEARCH_TOOL_DEFINITION, SKILL_TOOL_DEFINITION ]; function getFrameworkToolDefinitions(e) { return ALL_FRAMEWORK_TOOLS; } function getAllFrameworkToolNames() { return new Set(ALL_FRAMEWORK_TOOLS.map((e) => e.name)); } //#endregion //#region node_modules/eve/dist/src/public/connections/errors.js var ConnectionAuthorizationRequiredError = class extends Error { connectionName; constructor(e, t) { super(t?.message ?? `Connection "${e}" requires authorization.`), this.name = `ConnectionAuthorizationRequiredError`, this.connectionName = e; } }; var ConnectionAuthorizationFailedError = class extends Error { connectionName; reason; retryable; constructor(e, t) { super(t?.message ?? `Connection "${e}" authorization failed.`), this.name = `ConnectionAuthorizationFailedError`, this.connectionName = e, this.reason = t?.reason, this.retryable = t?.retryable ?? !0; } }; function isConnectionAuthorizationRequiredError(e) { return e instanceof Error && e.name === `ConnectionAuthorizationRequiredError`; } function isConnectionAuthorizationFailedError(e) { return e instanceof Error && e.name === `ConnectionAuthorizationFailedError`; } //#endregion //#region node_modules/eve/dist/src/harness/authorization.js const AUTHORIZATION_BRAND = `__eveAuthorization`; const AUTHORIZATION_PENDING_BRAND = `__eveAuthorizationPending`; function requestAuthorization(e) { return { [AUTHORIZATION_BRAND]: !0, challenges: e }; } function getAuthorizationResult(e) { let t = loadContext().get(PendingAuthorizationResultKey); if (!(!t || t.length === 0)) return e === void 0 ? t[0] : t.find((t) => t.name === e); } function getHookUrl(r) { let i = loadContext(), a = i.get(SessionIdKey), o = i.get(CallbackBaseUrlKey); return !a || !o ? void 0 : `${o}${createEveConnectionCallbackRoutePath(r, authHookToken(a))}`; } function isAuthorizationSignal(e) { return typeof e != `object` || !e ? !1 : e[AUTHORIZATION_BRAND] === !0; } function isAuthorizationPendingModelOutput(e) { return typeof e != `object` || !e ? !1 : e[AUTHORIZATION_PENDING_BRAND] === !0; } function authorizationPendingAsJsonObject(e) { return { [AUTHORIZATION_PENDING_BRAND]: !0, connections: [...e.connections] }; } function modelFacingAuthorizationOutput(e) { return authorizationPendingAsJsonObject({ connections: e.challenges.map((e) => e.name) }); } function authorizationPendingModelText(e) { return e.length === 0 ? `Authorization required. Waiting for the user to sign in.` : e.length === 1 ? `Authorization required for ${e[0]}. Waiting for the user to sign in.` : `Authorization required for ${e.join(`, `)}. Waiting for the user to sign in.`; } function isPendingAuthorizationToolOutput(e) { return isAuthorizationPendingModelOutput(e) || isAuthorizationSignal(e); } function authHookToken(e) { return `${e}:auth`; } const PendingAuthorizationResultKey = new ContextKey(`eve.pendingAuthorizationResult`); const CallbackBaseUrlKey = new ContextKey(`eve.callbackBaseUrl`); const PENDING_AUTHORIZATION_KEY = `eve.runtime.pendingAuthorization`; function setPendingAuthorization(e, t) { return { ...e, [PENDING_AUTHORIZATION_KEY]: t }; } function clearPendingAuthorization(e, t) { if (e === void 0 || e[PENDING_AUTHORIZATION_KEY] === void 0) return e; if (t !== void 0) { if (t.length === 0) return e; let n = getPendingAuthorization(e); if (n !== void 0) { let r = new Set(t), i = n.challenges.filter((e) => !r.has(e.name)); if (i.length > 0) return { ...e, [PENDING_AUTHORIZATION_KEY]: { challenges: i } }; } } let n = { ...e }; return delete n[PENDING_AUTHORIZATION_KEY], Object.keys(n).length > 0 ? n : void 0; } function getPendingAuthorization(e) { if (!e) return; let t = e[PENDING_AUTHORIZATION_KEY]; if (!(typeof t != `object` || !t)) return t; } //#endregion //#region node_modules/eve/dist/src/runtime/connections/types.js function supportsInteractiveAuthorization(e) { return e?.startAuthorization !== void 0; } //#endregion //#region node_modules/eve/dist/src/runtime/connections/authorization-tokens.js const ConnectionAuthorizationTokensKey = new ContextKey(`eve.connectionAuthorizationTokens`); function readCachedToken(e, t, n) { let r = e.get(ConnectionAuthorizationTokensKey)?.[t]?.[n]; if (r !== void 0 && !(r.expiresAt !== void 0 && r.expiresAt <= Date.now())) return r; } function writeCachedToken(e, t, n, r) { let i = e.get(ConnectionAuthorizationTokensKey) ?? {}, a = i[t] ?? {}; asContainer$1(e).setVirtualContext(ConnectionAuthorizationTokensKey, { ...i, [t]: { ...a, [n]: r } }); } function evictCachedToken(e, t, n) { let r = e.get(ConnectionAuthorizationTokensKey), i = r?.[t]; if (r === void 0 || i === void 0 || i[n] === void 0) return; let { [n]: a, ...o } = i; asContainer$1(e).setVirtualContext(ConnectionAuthorizationTokensKey, { ...r, [t]: o }); } function asContainer$1(e) { return e; } //#endregion //#region node_modules/eve/dist/src/runtime/connections/principal.js function principalKey(e) { return e.type === `app` ? `app` : e.issuer === void 0 ? `user:${e.id}` : `user:${e.issuer}:${e.id}`; } function resolveConnectionPrincipal(r, i, a = contextStorage.getStore()) { if (i.principalType === `app`) return { type: `app` }; let o = a?.get(AuthKey); if (o == null || o.principalType !== `user`) throw new ConnectionAuthorizationFailedError(r, { message: buildUserPrincipalRequiredMessage(r, i, a, o), reason: `principal_required`, retryable: !1 }); return i.vercelConnect !== void 0 && isVercelDevelopmentUser(o) ? { attributes: o.attributes, id: o.subject ?? o.principalId, type: `user` } : { attributes: o.attributes, id: o.principalId, issuer: o.issuer ?? o.authenticator, type: `user` }; } function isVercelDevelopmentUser(e) { return e.authenticator === `oidc` && e.issuer?.startsWith(`https://oidc.vercel.com/`) === !0 && e.attributes.environment === `development` && e.subject === e.attributes.user_id; } function buildUserPrincipalRequiredMessage(e, t, n, r) { let i; return i = n === void 0 ? `it was invoked outside an eve context, so no authenticated user can be resolved.` : r == null ? `the active session has no authenticated user.` : t.vercelConnect !== void 0 && r.authenticator === `local-dev` ? `the local request fell back to local development access instead of authenticating a Vercel user. Ensure this directory is linked and the Vercel CLI can mint a Vercel OIDC token, then retry.` : `the active session is scoped to "${r.principalType}", not an authenticated user.`, `Connection "${e}" is user-scoped, but ${i} User-scoped connections require route auth that resolves an authenticated user. If this connection should use credentials shared by the agent instead, configure it as an app-scoped connection.`; } //#endregion //#region node_modules/eve/dist/src/runtime/connections/scoped-authorization.js const LOCAL_HTTP_VERCEL_CONNECT_HOSTNAMES = /* @__PURE__ */ new Set([`127.0.0.1`, `[::1]`]); async function resolveScopedToken(t) { let { scope: n, authorization: r, connection: i } = t, a = contextStorage.getStore(), o = resolveConnectionPrincipal(n, r, a); if (a === void 0) return await r.getToken({ connection: i, principal: o }); let u = principalKey(o), d = readCachedToken(a, n, u); if (d !== void 0) return d; let f = await r.getToken({ connection: i, principal: o }); return writeCachedToken(a, n, u, f), f; } async function evictScopedToken(t) { let { scope: n, authorization: r, connection: i } = t, a = contextStorage.getStore(); if (a === void 0) return; let s; try { s = resolveConnectionPrincipal(n, r, a), evictCachedToken(a, n, principalKey(s)); } catch { return; } try { await r.evict?.({ connection: i, principal: s }); } catch {} } async function completeScopedAuthorization(e) { let { scope: r, authorization: i, connection: o } = e; if (!supportsInteractiveAuthorization(i)) return !1; let s = getAuthorizationResult(r); if (s === void 0) return !1; let u = i, d = loadContext(), f = resolveConnectionPrincipal(r, u, d), p = await u.completeAuthorization({ callbackUrl: s.hookUrl, connection: o, principal: f, resume: s.resume, callback: s.callback }); return writeCachedToken(d, r, principalKey(f), p), !0; } async function startScopedAuthorization(e) { let { scope: t, authorization: n, connection: o } = e; if (!supportsInteractiveAuthorization(n)) return; let s = getHookUrl(t); if (s === void 0) return; let c = n, l = resolveConnectionPrincipal(t, c), u = resolveAuthorizationCallbackUrl({ authorization: n, callbackUrl: s }), { challenge: d, resume: f } = await c.startAuthorization({ callbackUrl: u, connection: o, principal: l }); return requestAuthorization([{ challenge: stampChallengeDisplayName(d, n), hookUrl: u, name: t, resume: f }]); } function resolveAuthorizationCallbackUrl(e) { if (e.authorization.vercelConnect === void 0) return e.callbackUrl; let t; try { t = new URL(e.callbackUrl); } catch { return e.callbackUrl; } return t.protocol !== `http:` || !LOCAL_HTTP_VERCEL_CONNECT_HOSTNAMES.has(t.hostname) ? e.callbackUrl : (t.hostname = `localhost`, t.toString()); } function stampChallengeDisplayName(e, t) { let n = t.displayName ?? e.displayName; return n === e.displayName ? e : { ...e, displayName: n }; } //#endregion //#region node_modules/eve/dist/src/runtime/connections/validate-authorization.js function validateAuthorizationSpec(e, t = `auth`) { if (typeof e != `object` || !e) return `The "${t}" field must be an object with a "getToken" method.`; let n = e; if (typeof n.getToken != `function`) return `The "${t}.getToken" field must be a function returning Promise<{ token }>.`; let r = n.startAuthorization !== void 0, i = n.completeAuthorization !== void 0; if (!r && !i && n.principalType !== void 0 && n.principalType !== `app` && n.principalType !== `user`) return `The "${t}.principalType" field must be "app" or "user".`; if (r !== i) return `The "${t}" field must provide either both "startAuthorization" and "completeAuthorization" (interactive OAuth) or neither (getToken-only). Got only "${r ? `startAuthorization` : `completeAuthorization`}".`; if (r && typeof n.startAuthorization != `function`) return `The "${t}.startAuthorization" field must be a function when provided.`; if (i && typeof n.completeAuthorization != `function`) return `The "${t}.completeAuthorization" field must be a function when provided.`; if (r && n.principalType !== `user`) return `Interactive authorization (startAuthorization + completeAuthorization) is restricted to "principalType": "user" in v1. App-level credentials must use a getToken-only definition.`; if (n.displayName !== void 0 && (typeof n.displayName != `string` || n.displayName.length === 0)) return `The "${t}.displayName" field must be a non-empty string when provided.`; } function normalizeAuthorizationSpec(e, t, n = `auth`) { let r = validateAuthorizationSpec(e, n); if (r !== void 0) throw Error(`${t} ${r}`); let i = e, a = extractVercelConnectMarker(i.vercelConnect), o = i.displayName, s = typeof i.evict == `function` ? i.evict : void 0; if (i.startAuthorization !== void 0 && i.completeAuthorization !== void 0) { let e = { completeAuthorization: i.completeAuthorization, getToken: i.getToken, principalType: `user`, startAuthorization: i.startAuthorization }; return a !== void 0 && (e = { ...e, vercelConnect: a }), o !== void 0 && (e = { ...e, displayName: o }), s !== void 0 && (e = { ...e, evict: s }), e; } let c = { getToken: i.getToken, principalType: i.principalType ?? `app` }; return a !== void 0 && (c = { ...c, vercelConnect: a }), o !== void 0 && (c = { ...c, displayName: o }), s !== void 0 && (c = { ...c, evict: s }), c; } function extractVercelConnectMarker(e) { if (typeof e != `object` || !e) return; let t = e.connector; if (!(typeof t != `string` || t.length === 0)) return { connector: t }; } //#endregion //#region node_modules/eve/dist/src/runtime/connections/resolve-authorization.js const ConnectionAuthorizationResolversKey = new ContextKey(`eve.connectionAuthorizationResolvers`); async function resolveConnectionAuthorization(t, n) { let r = t.authorization; if (r === void 0 || typeof r != `function`) return r; let i = contextStorage.getStore(); if (i === void 0) return await resolveDynamicAuthorization(t, n); let a = getResolverCache(i), o = a.get(t); return o === void 0 && (o = resolveDynamicAuthorization(t, n), a.set(t, o)), await o; } async function resolveDynamicAuthorization(e, n) { let i = e.authorization; return typeof i == `function` ? normalizeAuthorizationSpec(await i(n ?? buildCallbackContext()), `Connection "${e.connectionName}" auth resolver:`) : i; } function getResolverCache(e) { let t = e.get(ConnectionAuthorizationResolversKey); if (t !== void 0) return t; let n = /* @__PURE__ */ new Map(); return e.setVirtualContext(ConnectionAuthorizationResolversKey, n), n; } //#endregion //#region node_modules/eve/dist/src/runtime/framework-tools/connection-search-dynamic.js const logger = createLogger(`framework.connection-search-dynamic`); const CONNECTION_SEARCH_OUTPUT_SCHEMA = { items: { additionalProperties: !1, properties: { connection: { type: `string` }, description: { type: `string` }, error: { type: `string` }, inputSchema: { type: `object` }, needsAuthorization: { type: `boolean` }, outputSchema: { type: `object` }, qualifiedName: { type: `string` }, tool: { type: `string` } }, required: [`connection`, `description`], type: `object` }, type: `array` }; const ConnectionSearchResultsKey = new ContextKey(`eve.connectionSearchResults`); function qualifiedConnectionToolName(e, t) { return `${e}__${t}`; } function tokenize(e) { return e.toLowerCase().split(/[\s_\-./]+/).filter((e) => e.length > 1); } function scoreMatch(e, t) { let n = tokenize(t.name), r = tokenize(t.description), i = 0; for (let t of e) { for (let e of n) (e.includes(t) || t.includes(e)) && (i += 3); for (let e of r) (e.includes(t) || t.includes(e)) && (i += 1); } return i; } async function resolveInteractiveAuth(e, t) { let n = e.getConnections().find((e) => e.connectionName === t); if (n === void 0) return; let r = await resolveConnectionAuthorization(n); if (supportsInteractiveAuthorization(r)) return r; } async function completePendingAuthorizations(e) { let n = loadContext(), r = /* @__PURE__ */ new Set(); for (let t of e.getConnections()) { let i = getAuthorizationResult(t.connectionName); if (!i) continue; let a = await resolveInteractiveAuth(e, t.connectionName); if (!a) continue; let o = resolveConnectionPrincipal(t.connectionName, a), c = await a.completeAuthorization({ callbackUrl: i.hookUrl, connection: { url: t.url ?? `` }, principal: o, resume: i.resume, callback: i.callback }); writeCachedToken(n, t.connectionName, principalKey(o), c), r.add(t.connectionName); } return r; } async function executeConnectionSearch(e) { let n = loadContext(), i = n.get(ConnectionRegistryKey); if (i === void 0) return []; let s = await completePendingAuthorizations(i), l = e.limit ?? 10, u = tokenize(e.keywords), d = [], f = [], m = e.connection !== void 0 && e.connection !== `` ? i.getConnections().filter((t) => t.connectionName === e.connection) : i.getConnections(), h = []; for (let e of m) { let t; try { t = await i.getClient(e.connectionName).getToolMetadata(); } catch (t) { if (isConnectionAuthorizationRequiredError(t)) { if (s.has(e.connectionName)) { logger.warn(`connection still unauthorized after authorization`, { connection: e.connectionName }), f.push({ connection: e.connectionName, description: e.description, error: `Authorization for "${e.connectionName}" did not take effect; the token was rejected after sign-in.` }); continue; } let t = await resolveInteractiveAuth(i, e.connectionName); if (t) { let n = getHookUrl(e.connectionName); if (n) { let r = resolveConnectionPrincipal(e.connectionName, t), i = resolveAuthorizationCallbackUrl({ authorization: t, callbackUrl: n }); try { let { challenge: n, resume: a } = await t.startAuthorization({ callbackUrl: i, connection: { url: e.url ?? `` }, principal: r }); h.push({ name: e.connectionName, challenge: stampChallengeDisplayName(n, t), hookUrl: i, resume: a }); } catch (t) { logger.warn(`startAuthorization failed`, { connection: e.connectionName, error: t instanceof Error ? t : Error(String(t)) }); } } } f.push({ connection: e.connectionName, description: e.description, needsAuthorization: !0 }); continue; } if (isConnectionAuthorizationFailedError(t)) { logger.warn(`connection authorization failed`, { connection: e.connectionName, reason: t.reason, retryable: t.retryable, error: t }), f.push({ connection: e.connectionName, description: e.description, error: `Authorization failed for ${e.connectionName}: ${t.message}` }); continue; } let n = t instanceof Error ? t.message : `unknown error`; logger.warn(`failed to load connection tools`, { connection: e.connectionName, error: t instanceof Error ? t : Error(n) }), f.push({ connection: e.connectionName, description: e.description, error: `Failed to load tools for "${e.connectionName}": ${n}` }); continue; } for (let n of t) { let t = scoreMatch(u, n); t > 0 && d.push({ item: { connection: e.connectionName, description: n.description, inputSchema: n.inputSchema, outputSchema: n.outputSchema, qualifiedName: qualifiedConnectionToolName(e.connectionName, n.name), tool: n.name }, score: t }); } } if (h.length > 0) return requestAuthorization(h); d.sort((e, t) => t.score - e.score); let g = d.slice(0, l).map((e) => e.item); if (g.length > 0) { let e = [...g, ...f], t = n.get(ConnectionSearchResultsKey) ?? [], r = new Map(t.map((e) => [e.qualifiedName, e])); for (let e of g) e.qualifiedName && r.set(e.qualifiedName, e); return n.set(ConnectionSearchResultsKey, [...r.values()]), e; } return m.map((e) => f.find((t) => t.connection === e.connectionName) || { connection: e.connectionName, description: e.description }); } function extractDiscoveredTools(e) { let t = /* @__PURE__ */ new Map(); for (let n of e) { if (n.role !== `tool`) continue; let e = n.content; for (let n of e) { if (n.type !== `tool-result` || n.toolName !== `connection_search`) continue; let e = n.output; if (e == null) continue; let r = typeof e == `object` && `type` in e && `value` in e ? e.value : e; if (Array.isArray(r)) for (let e of r) e.tool && e.qualifiedName && t.set(e.qualifiedName, e); } } return [...t.values()]; } function createConnectionSearchEvents() { return { "step.started": async (e, n) => { let a = loadContext().get(ConnectionRegistryKey); if (!a || a.getConnections().length === 0) return null; let l = a.getConnections().map((e) => e.connectionName), u = extractDiscoveredTools(n.messages), p = loadContext().get(ConnectionSearchResultsKey) ?? [], h = /* @__PURE__ */ new Map(); for (let e of p) e.qualifiedName && h.set(e.qualifiedName, e); for (let e of u) e.qualifiedName && h.set(e.qualifiedName, e); let g = [...h.values()], _ = {}; _.connection_search = { description: `Search for tools across your connections. Discovered tools become directly callable by their qualified name (e.g. \`linear__list_issues\`) in your next response. Available connections: ${l.join(`, `)}.`, inputSchema: { type: `object`, additionalProperties: !1, properties: { keywords: { description: `Search keywords and expanded aliases. Distill intent into keywords; avoid stop words like 'a', 'the', 'in'.`, type: `string` }, connection: { description: `Optional: limit search to a specific connection name.`, type: `string` }, limit: { description: `Max results to return. Default 10.`, type: `number` } }, required: [`keywords`] }, async execute(e) { return executeConnectionSearch(e); }, outputSchema: CONNECTION_SEARCH_OUTPUT_SCHEMA }; for (let e of g) { let n = e.connection, l = e.tool, u = a.getConnectionApproval(n); _[qualifiedConnectionToolName(n, l)] = { description: e.description, inputSchema: e.inputSchema ?? { type: `object` }, approval: u, outputSchema: e.outputSchema, async execute(e) { let a = loadContext().get(ConnectionRegistryKey), u = a.getConnections().find((e) => e.connectionName === n), p = await resolveInteractiveAuth(a, n), m = !1; if (p) { let e = getAuthorizationResult(n); if (e) { m = !0; let r = loadContext(), i = resolveConnectionPrincipal(n, p), a = await p.completeAuthorization({ callbackUrl: e.hookUrl, connection: { url: u?.url ?? `` }, principal: i, resume: e.resume, callback: e.callback }); writeCachedToken(r, n, principalKey(i), a); } } try { return await a.getClient(n).executeTool(l, e); } catch (e) { if (!isConnectionAuthorizationRequiredError(e) || !p) throw e; if (m) throw new ConnectionAuthorizationFailedError(n, { retryable: !1, reason: `token_rejected_after_authorization`, message: `Connection "${n}" rejected the token immediately after authorization.` }); let t = getHookUrl(n); if (!t) throw e; let r = resolveConnectionPrincipal(n, p), a = resolveAuthorizationCallbackUrl({ authorization: p, callbackUrl: t }), { challenge: s, resume: l } = await p.startAuthorization({ callbackUrl: a, connection: { url: u?.url ?? `` }, principal: r }); return requestAuthorization([{ name: n, challenge: stampChallengeDisplayName(s, p), hookUrl: a, resume: l }]); } } }; } return _; } }; } function createConnectionSearchResolver() { let e = createConnectionSearchEvents(); return { slug: `connection`, eventNames: Object.keys(e), events: e, sourceId: `eve:connection-search-dynamic`, sourceKind: `module`, logicalPath: `eve:framework/connection-search-dynamic` }; } //#endregion //#region node_modules/eve/dist/src/runtime/resolve-helpers.js var ResolveAgentError = class extends Error { logicalPath; sourceId; constructor(e, t = {}) { super(e), this.name = `ResolveAgentError`, t.logicalPath !== void 0 && (this.logicalPath = t.logicalPath), t.sourceId !== void 0 && (this.sourceId = t.sourceId); } }; function createResolvedModuleSourceRef(e) { return { exportName: e.exportName, logicalPath: e.logicalPath, sourceId: e.sourceId, sourceKind: `module` }; } async function loadResolvedModuleExport(n) { let r = n.nodeId ?? ROOT_COMPILED_AGENT_NODE_ID, i = n.moduleMap.nodes[r]?.modules[n.definition.sourceId]; if (i === void 0) throw new ResolveAgentError(`Missing compiled module namespace for ${n.kindLabel} source "${n.definition.sourceId}" in node "${r}".`, { logicalPath: n.definition.logicalPath, sourceId: n.definition.sourceId }); return await materializeAuthoredModuleExport(getAuthoredModuleExport(expectObjectRecord(i, `Missing compiled module namespace for ${n.kindLabel} source "${n.definition.sourceId}" in node "${r}".`), { exportName: n.definition.exportName, logicalPath: n.definition.logicalPath })); } //#endregion //#region node_modules/eve/dist/src/internal/authored-definition/channel.js function normalizeChannelDefinition(e, t) { if (!isCompiledChannel(e)) throw Error(`${t} Use \`defineChannel({ routes, ... })\` (or a wrapper like \`slackChannel\` / \`eveChannel\`) — bare \`{ fetch, receive? }\` channel objects are no longer supported.`); return e; } //#endregion //#region node_modules/eve/dist/src/runtime/resolve-channel.js async function resolveChannelDefinition(r, i, a) { try { let t = normalizeChannelDefinition(await loadResolvedModuleExport({ definition: r, kindLabel: `channel`, moduleMap: i, nodeId: a }), `Expected the channel export "${r.exportName ?? `default`}" from "${r.logicalPath}" to match the public eve shape.`), n = createResolvedModuleSourceRef({ exportName: r.exportName, logicalPath: r.logicalPath, sourceId: r.sourceId }), o = t.routes.find((e) => e.method.toUpperCase() === r.method.toUpperCase() && e.path === r.urlPath), s = `channel:${r.name}`; setChannelInstrumentationKind(t, s); let c = t.adapter; c && c.kind !== HTTP_ADAPTER_KIND && (c.kind = s); let l = resolveHttpRoute(r, o), u = resolveWebSocketRoute(r, o); return { name: r.name, method: r.method, urlPath: r.urlPath, cors: r.cors, fetch: async (e, t) => l ? l.handler(e, t) : Response.json({ error: `No matching route handler.`, ok: !1 }, { status: 404 }), handler: l?.handler, websocket: u?.handler, receive: t.receive, definition: t, adapter: c, ...n }; } catch (e) { throw e instanceof ResolveAgentError ? e : new ResolveAgentError(`Failed to attach the channel definition from "${r.logicalPath}": ${toErrorMessage(e)}`, { logicalPath: r.logicalPath, sourceId: r.sourceId }); } } function resolveHttpRoute(e, t) { if (!(t === void 0 || e.method === `WEBSOCKET` || !isHttpRouteDefinition(t))) return t; } function resolveWebSocketRoute(e, t) { if (!(t === void 0 || e.method !== `WEBSOCKET` || !isWebSocketRouteDefinition(t))) return t; } //#endregion //#region node_modules/eve/dist/src/public/tool-result-narrowing.js const DEFINITION_KEY = Symbol.for(`eve.definition-source-key`); const REGISTRY_SYMBOL = Symbol.for(`eve.definition-source-registry`); const registryContainer = globalThis; registryContainer[REGISTRY_SYMBOL] === void 0 && (registryContainer[REGISTRY_SYMBOL] = /* @__PURE__ */ new Map()); const definitionSourceRegistry = registryContainer[REGISTRY_SYMBOL]; function stampDefinitionKey(t, n) { Object.defineProperty(t, DEFINITION_KEY, { configurable: !0, value: n }); } function registerDefinitionSource(e, t) { let n = definitionSourceRegistry.get(e); if (n !== void 0 && !sameDefinitionSourceEntry(n, t)) { n.kind !== `ambiguous` && console.warn([ `eve could not assign a unique toolResultFrom identity for ${JSON.stringify(e)}.`, `Conflicting definitions: ${formatDefinitionSourceForWarning(n)} and ${formatDefinitionSourceForWarning(t)}.`, `Multiple authored definitions share that fallback identity, so toolResultFrom will not match through it.`, `Use the original definition object loaded by eve so source-derived identity can be used instead.` ].join(` `)), definitionSourceRegistry.set(e, { kind: `ambiguous` }); return; } definitionSourceRegistry.set(e, t); } function sameDefinitionSourceEntry(e, t) { return e.kind === t.kind ? e.name === t.name : !1; } function formatDefinitionSourceForWarning(e) { return e.logicalPath === void 0 ? `${e.kind} "${e.name}"` : `${e.kind} "${e.name}" from "${e.logicalPath}"`; } //#endregion //#region node_modules/eve/dist/src/runtime/resolve-connection.js async function resolveConnectionDefinition(t, n, r) { try { let i = expectObjectRecord(await loadResolvedModuleExport({ definition: t, kindLabel: `connection`, moduleMap: n, nodeId: r }), `Expected the connection export "${t.exportName ?? `default`}" from "${t.logicalPath}" to return an object.`), a = { kind: `connection`, logicalPath: t.logicalPath, name: t.connectionName }, o = `connection-source:${t.sourceId}`; stampDefinitionKey(i, o), registerDefinitionSource(o, a), registerDefinitionSource(`connection:${t.url}`, a); let s = i.auth !== void 0, c = i.headers !== void 0, l = t.protocol === `openapi` ? i.operations : i.tools, u = { connectionName: t.connectionName, description: t.description, exportName: t.exportName, logicalPath: t.logicalPath, protocol: t.protocol, sourceId: t.sourceId, sourceKind: `module`, url: t.url }; if (s) if (typeof i.auth == `function`) u.authorization = i.auth; else try { u.authorization = normalizeAuthorizationSpec(i.auth, `Connection "${t.connectionName}" at "${t.logicalPath}":`); } catch (e) { throw new ResolveAgentError(toErrorMessage(e), { logicalPath: t.logicalPath, sourceId: t.sourceId }); } return c && (u.headers = i.headers), l !== void 0 && (u.tools = l), t.protocol === `openapi` && i.spec !== void 0 && (u.spec = i.spec), typeof i.approval == `function` && (u.approval = i.approval), u; } catch (e) { throw e instanceof ResolveAgentError ? e : new ResolveAgentError(`Failed to resolve connection "${t.connectionName}" from "${t.logicalPath}": ${toErrorMessage(e)}`, { logicalPath: t.logicalPath, sourceId: t.sourceId }); } } //#endregion //#region node_modules/eve/dist/src/runtime/resolve-hook.js async function resolveHookDefinition(a, o, s) { try { let n = expectObjectRecord(await loadResolvedModuleExport({ definition: a, kindLabel: `hook`, moduleMap: o, nodeId: s }), describe$4(a, `to return an object`)), i = {}, c = n.events; if (c !== void 0) { let n = expectObjectRecord(c, describe$4(a, "to expose `events` as an object")); for (let [t, r] of Object.entries(n)) r !== void 0 && (i[t] = expectFunction(r, describe$4(a, `to provide a function for "events.${t}"`))); } return { events: i, exportName: a.exportName, logicalPath: a.logicalPath, slug: a.slug, sourceId: a.sourceId, sourceKind: `module` }; } catch (e) { throw e instanceof ResolveAgentError ? e : new ResolveAgentError(`Failed to attach hook handlers from "${a.logicalPath}": ${toErrorMessage(e)}`, { logicalPath: a.logicalPath, sourceId: a.sourceId }); } } function describe$4(e, t) { return `Expected the hook export "${e.exportName ?? `default`}" from "${e.logicalPath}" ${t}.`; } //#endregion //#region node_modules/eve/dist/src/execution/sandbox/lazy-backend.js function lazyBackend(e) { let t; function resolve() { return t === void 0 && (t = e()), t; } return { get name() { return resolve().name; }, create(e) { return resolve().create(e); }, prewarm(e) { return resolve().prewarm(e); } }; } //#endregion //#region node_modules/eve/dist/src/execution/sandbox/bindings/docker-cli.js var DockerUnavailableError = class extends Error { constructor(e) { super("The Docker sandbox backend requires Docker, but the `docker` CLI was not found. Install and start Docker Desktop, OrbStack, Colima, or another runtime exposing a Docker-compatible `docker` CLI (or point EVE_DOCKER_PATH at one, e.g. Podman). Alternatively use microsandbox(), the dependency-free justbash(), vercel(), or defaultSandbox() to pick by availability.", { cause: e }), this.name = `DockerUnavailableError`; } }; var DockerDaemonUnavailableError = class extends Error { constructor(e) { super(`The Docker sandbox backend requires a running Docker daemon, but it is not reachable. Start Docker Desktop (or your Docker-compatible runtime) and retry. Alternatively use microsandbox(), the dependency-free justbash() (installed automatically by \`eve dev\`, or \`pnpm add -D just-bash\`), vercel(), or defaultSandbox() to pick by availability. Docker reported: ${e}`), this.name = `DockerDaemonUnavailableError`; } }; async function assertDockerDaemonAvailable(e) { let t = await e.run([ `version`, `--format`, `{{.Server.Version}}` ]); if (t.exitCode !== 0) throw new DockerDaemonUnavailableError(firstLine(t.stderr) || `exit ${t.exitCode}`); } function resolveDockerExecutable() { let e = process.env.EVE_DOCKER_PATH?.trim(); return e !== void 0 && e.length > 0 ? e : `docker`; } let cachedDockerAvailability; function isDockerDaemonAvailableSync() { return cachedDockerAvailability ??= probeDockerDaemonSync(), cachedDockerAvailability; } function probeDockerDaemonSync() { try { return spawnSync(resolveDockerExecutable(), [ `version`, `--format`, `{{.Server.Version}}` ], { stdio: `ignore`, timeout: 5e3 }).status === 0; } catch { return !1; } } function createDockerCli() { return { async run(t, n = {}) { throwIfAborted(n.signal); let r = spawn(resolveDockerExecutable(), t, { signal: n.signal, stdio: [ n.stdin === void 0 ? `ignore` : `pipe`, `pipe`, `pipe` ] }), i = [], a = []; r.stdout?.on(`data`, (e) => i.push(e)), r.stderr?.on(`data`, (e) => a.push(e)), n.stdin !== void 0 && r.stdin?.end(n.stdin); let o = await new Promise((e, t) => { r.on(`error`, (e) => t(adaptSpawnError(e))), r.on(`close`, (t) => e(t ?? 1)); }), s = Buffer.concat(i); return { exitCode: o, stderr: Buffer.concat(a).toString(`utf8`), stdout: s.toString(`utf8`), stdoutBytes: s }; }, stream(t, r = {}) { throwIfAborted(r.signal); let i = spawn(resolveDockerExecutable(), t, { signal: r.signal, stdio: [ `ignore`, `pipe`, `pipe` ] }), a = new Promise((e, t) => { i.on(`error`, (e) => t(adaptSpawnError(e))), i.on(`close`, (t) => e(t ?? 1)); }); return a.catch(() => {}), { stdout: Readable.toWeb(i.stdout), stderr: Readable.toWeb(i.stderr), async wait() { return { exitCode: await a }; }, async kill() { i.kill(`SIGKILL`), await a.catch(() => {}); } }; } }; } function adaptSpawnError(e) { return e.code === `ENOENT` ? new DockerUnavailableError(e) : e.code === `ABORT_ERR` ? new DOMException(`The operation was aborted.`, `AbortError`) : e; } function throwIfAborted(e) { if (e?.aborted) throw new DOMException(`The operation was aborted.`, `AbortError`); } function firstLine(e) { return e.split(` `, 1)[0]?.trim() ?? ``; } //#endregion //#region node_modules/eve/dist/src/execution/sandbox/bindings/docker-utils.js function expectDockerSuccess(e, t) { if (e.exitCode !== 0) { let n = e.stderr.trim() || e.stdout.trim() || `exit code ${e.exitCode}`; throw Error(`Failed to ${t}: ${n}`); } } //#endregion //#region node_modules/eve/dist/src/execution/sandbox/development-run.js const EVE_DEVELOPMENT_SANDBOX_RUN_ID_ENV = `EVE_DEVELOPMENT_SANDBOX_RUN_ID`; const EVE_DEVELOPMENT_SANDBOX_METADATA_PATH_TAG = `eve.metadataPath`; const EVE_DEVELOPMENT_SANDBOX_RUN_ID_TAG = `devRunId`; const initializedBackendsByRunId = /* @__PURE__ */ new Map(); function getDevelopmentSandboxRunId() { let e = process.env[EVE_DEVELOPMENT_SANDBOX_RUN_ID_ENV]; return e === void 0 || e.trim() === `` ? void 0 : e; } function withDevelopmentSandboxTags(e) { let t = getDevelopmentSandboxRunId(); return t === void 0 ? e : { ...e, [EVE_DEVELOPMENT_SANDBOX_RUN_ID_TAG]: t }; } function withDevelopmentSandboxMetadataPathTag(e, t) { return getDevelopmentSandboxRunId() === void 0 ? e : { ...e, [EVE_DEVELOPMENT_SANDBOX_METADATA_PATH_TAG]: t }; } function markDevelopmentSandboxBackendInitialized(e) { let t = getDevelopmentSandboxRunId(); if (t === void 0) return; let n = initializedBackendsByRunId.get(t); n === void 0 && (n = /* @__PURE__ */ new Set(), initializedBackendsByRunId.set(t, n)), n.add(e); } //#endregion //#region node_modules/eve/dist/src/execution/sandbox/stream-utils.js async function streamToBuffer(e) { let t = []; for await (let n of e) t.push(n); return Buffer.concat(t); } function bufferToStream(e) { return new ReadableStream({ start(t) { t.enqueue(e), t.close(); } }); } //#endregion //#region node_modules/eve/dist/src/execution/sandbox/bindings/local-backend-utils.js function createFileBackedInternalSandboxSession(e) { return { id: e.id, resolvePath: resolveWorkspacePath, async spawn(t) { return await e.sandbox.spawn(t); }, async readFile(t) { let n = await e.sandbox.readFileBytes(t.path); return n === null ? null : bufferToStream(n); }, async removePath(t) { await e.sandbox.removePath(t); }, async writeFile(t) { let n = await streamToBuffer(t.content); await e.sandbox.writeFiles([{ content: n, path: t.path }]); } }; } function resolveWorkspacePath(e) { return e.startsWith(`/`) ? e : `${WORKSPACE_ROOT$1}/${e}`; } async function pathExists$1(e) { try { return await access(e), !0; } catch { return !1; } } async function copyDirectoryAtomically(t, n) { let i = `${n}.${randomUUID()}.tmp`; await rm(i, { force: !0, recursive: !0 }), await mkdir(dirname(n), { recursive: !0 }); try { await cp(t, i, { recursive: !0 }), await rename(i, n); } catch (e) { if (await rm(i, { force: !0, recursive: !0 }).catch(() => {}), await pathExists$1(n)) return; throw e; } } async function touchDirectory(e) { let t = /* @__PURE__ */ new Date(); await utimes(e, t, t); } function resolveLocalBackendTemplateRootPath(e, n, r) { return join(resolveLocalBackendTemplatesDirectory(e, n), r); } function resolveLocalBackendTemplatesDirectory(e, n) { return join(e, n, `templates`); } function resolveLocalBackendSessionRootPath(e, n, r) { return join(e, n, `sessions`, r); } async function writeSandboxSeedFiles(e, t) { for (let n of t) typeof n.content == `string` ? await e.writeTextFile({ content: n.content, path: n.path }) : await e.writeBinaryFile({ content: n.content, path: n.path }); } //#endregion //#region node_modules/eve/dist/src/execution/sandbox/bindings/docker-base-setup.js function buildDockerBaseSetupScript() { return [ `set -e`, `mkdir -p ${WORKSPACE_ROOT$1}`, `command -v bash >/dev/null 2>&1 || { echo "the sandbox image must provide bash" >&2; exit 70; }` ].join(` `); } //#endregion //#region node_modules/eve/dist/src/execution/sandbox/bindings/docker-container.js const DOCKER_SANDBOX_LABEL = `eve.sandbox`; const DOCKER_KEEPALIVE_ARGS = [`-c`, `sleep 2147483647`]; async function startDockerContainer(t) { let i = [ `run`, `-d`, `--name`, t.containerName, `--label`, `${DOCKER_SANDBOX_LABEL}=1`, `--label`, `${DOCKER_SANDBOX_LABEL}.role=${t.role}` ]; for (let [e, n] of Object.entries(withDevelopmentSandboxTags(t.tags) ?? {})) i.push(`--label`, `${DOCKER_SANDBOX_LABEL}.tag.${e}=${n}`); for (let [e, n] of Object.entries(t.options.env)) i.push(`-e`, `${e}=${n}`); t.initialNetworkPolicy === `deny-all` && i.push(`--network`, `none`), i.push(`--workdir`, WORKSPACE_ROOT$1, `--entrypoint`, `/bin/sh`, t.image, ...DOCKER_KEEPALIVE_ARGS), expectDockerSuccess(await t.cli.run(i), `start sandbox container "${t.containerName}" from "${t.image}"`); } async function runDockerBaseSetup(e, r) { expectDockerSuccess(await e.run([ `exec`, `--user`, `root`, r, `/bin/sh`, `-c`, buildDockerBaseSetupScript() ]), `prepare base runtime in sandbox container "${r}"`); } //#endregion //#region node_modules/eve/dist/src/execution/sandbox/bindings/docker-network.js async function setDockerNetworkPolicy(e, t, n) { if (n !== `allow-all` && n !== `deny-all`) throw Error(`The local Docker sandbox backend supports only the "allow-all" and "deny-all" network policies. Domain-level allow-lists and credential brokering require the Vercel backend (vercel()) or microsandbox().`); let r = await e.run([ `container`, `inspect`, `--format`, `{{json .NetworkSettings.Networks}}`, t ]); expectDockerSuccess(r, `inspect networks of sandbox container "${t}"`); let i = Object.keys(JSON.parse(r.stdout.trim() === `` ? `{}` : r.stdout)); if (n === `deny-all`) { for (let n of i) expectDockerSuccess(await e.run([ `network`, `disconnect`, `--force`, n, t ]), `disconnect sandbox container "${t}" from network "${n}"`); return; } i.includes(`bridge`) || (i.includes(`none`) && expectDockerSuccess(await e.run([ `network`, `disconnect`, `--force`, `none`, t ]), `detach sandbox container "${t}" from the none network`), expectDockerSuccess(await e.run([ `network`, `connect`, `bridge`, t ]), `connect sandbox container "${t}" to the bridge network`)); } //#endregion //#region node_modules/eve/dist/src/execution/sandbox/bindings/docker-options.js function resolveDockerSandboxOptions(e = {}) { return { env: e.env ?? {}, image: e.image ?? `ghcr.io/vercel/eve:latest`, networkPolicy: e.networkPolicy ?? `allow-all`, pullPolicy: e.pullPolicy ?? `if-not-present` }; } function createDockerSandboxOptionsHash(t) { return createHash(`sha256`).update(JSON.stringify(dockerOptionsForHash(t))).digest(`hex`).slice(0, 20); } function dockerOptionsForHash(e) { return { env: sortStringRecord(e.env), image: e.image, networkPolicy: e.networkPolicy, pullPolicy: e.pullPolicy }; } function sortStringRecord(e) { return Object.fromEntries(Object.entries(e).sort(([e], [t]) => e.localeCompare(t))); } //#endregion //#region node_modules/eve/dist/src/execution/sandbox/bindings/docker-session.js const DOCKER_KILL_TREE_SCRIPT = [ `pid_file="$1"`, `target="$(cat "$pid_file" 2>/dev/null)" || exit 0`, `[ -n "$target" ] || exit 0`, `kill_tree() {`, ` local parent="$1" dir child ppid line`, ` for dir in /proc/[0-9]*; do`, " child=\"${dir#/proc/}\"", ` ppid=""`, ` while IFS= read -r line; do`, ` case "$line" in`, " PPid:*) ppid=\"${line#PPid:}\"; ppid=\"${ppid//[^0-9]/}\"; break ;;", ` esac`, ` done < "$dir/status" 2>/dev/null`, ` [ "$ppid" = "$parent" ] && kill_tree "$child"`, ` done`, ` kill -9 "$parent" 2>/dev/null`, `}`, `kill_tree "$target"`, `rm -f "$pid_file"`, `exit 0` ].join(` `); function createDockerInternalSession(s) { let { cli: c, containerName: l } = s; async function killSpawnTree(e) { await c.run([ `exec`, l, `bash`, `-c`, DOCKER_KILL_TREE_SCRIPT, `eve-kill-tree`, e ]).catch(() => {}); } return { id: s.id, resolvePath: resolveWorkspacePath, async spawn(n) { let r = [ `exec`, `-w`, resolveWorkspacePath(n.workingDirectory ?? WORKSPACE_ROOT$1) ]; for (let [e, t] of Object.entries(n.env ?? {})) r.push(`-e`, `${e}=${t}`); let i = `/tmp/.eve-sbx-spawn-${randomUUID()}.pid`, a = `echo "$$" > ${shellQuote(i)}; bash -lc ${shellQuote(n.command)}; status=$?; rm -f ${shellQuote(i)}; exit $status`; r.push(l, `bash`, `-c`, a); let o = c.stream(r, { signal: n.abortSignal }); return n.abortSignal?.addEventListener(`abort`, () => void killSpawnTree(i), { once: !0 }), { stdout: o.stdout, stderr: o.stderr, async wait() { return await o.wait(); }, async kill() { await killSpawnTree(i), await o.kill(); } }; }, async readFile(e) { let t = shellQuote(e.path), r = await c.run([ `exec`, l, `bash`, `-lc`, `if [ -e ${t} ]; then exec cat ${t}; else exit 43; fi` ], { signal: e.abortSignal }); return r.exitCode === 43 ? null : (expectDockerSuccess(r, `read "${e.path}" from sandbox container`), bufferToStream(r.stdoutBytes)); }, async removePath(e) { let t = `${e.recursive === !0 ? `r` : ``}${e.force === !0 ? `f` : ``}`, r = [ `exec`, l, `rm`, ...t.length > 0 ? [`-${t}`] : [], `--`, e.path ]; expectDockerSuccess(await c.run(r, { signal: e.abortSignal }), `remove "${e.path}" from sandbox container`); }, async writeFile(e) { let t = await streamToBuffer(e.content); expectDockerSuccess(await c.run([ `exec`, `-i`, l, `bash`, `-lc`, `mkdir -p ${shellQuote(dirname$2(e.path))} && cat > ${shellQuote(e.path)}` ], { signal: e.abortSignal, stdin: t }), `write "${e.path}" into sandbox container`); } }; } //#endregion //#region node_modules/eve/dist/src/internal/application/paths.js function resolveSandboxCacheDirectory(e) { return join(e, `.eve`, `sandbox-cache`); } //#endregion //#region node_modules/eve/dist/src/execution/sandbox/bindings/docker-templates.js const DOCKER_TEMPLATE_IMAGE_REPOSITORY = `eve-sandbox-template`; function dockerTemplateImageReference(e) { return dockerTemplateImageReferenceFromTag(dockerTemplateImageTag(e)); } function dockerTemplateImageReferenceFromTag(e) { return `${DOCKER_TEMPLATE_IMAGE_REPOSITORY}:${e}`; } function dockerTemplateImageTag(e) { return `${e.templateKey.toLowerCase()}-${e.optionsHash}`; } function resolveDockerTemplateMarkerPath(e, n) { return join(resolveDockerTemplateMarkersDirectory(e), dockerTemplateImageTag(n)); } async function touchDockerTemplateMarker(t, r) { await mkdir(dirname(t), { recursive: !0 }); try { let e = /* @__PURE__ */ new Date(); await utimes(t, e, e); } catch { await writeFile(t, `${r}\n`); } } async function dockerImageExists(e, t) { return (await e.run([ `image`, `inspect`, `--format`, `{{.Id}}`, t ])).exitCode === 0; } async function ensureDockerBaseImage(e, t) { if (t.pullPolicy === `always`) { expectDockerSuccess(await e.run([`pull`, t.image]), `pull base image "${t.image}"`); return; } if (!await dockerImageExists(e, t.image)) { if (t.pullPolicy === `never`) throw Error(`The local sandbox base image "${t.image}" is not present locally and pullPolicy is "never". Pull the image manually or relax the pull policy.`); expectDockerSuccess(await e.run([`pull`, t.image]), `pull base image "${t.image}"`); } } function resolveDockerTemplateMarkersDirectory(e) { return join(resolveSandboxCacheDirectory(e), `docker`, `templates`); } //#endregion //#region node_modules/eve/dist/src/execution/sandbox/logging-session.js function createLoggingSandboxSession(e) { let { log: t, session: n } = e; return { ...n, async run(e) { t?.(`bootstrap run: ${formatCommand(e.command)}`); let r = await n.run(e); if (r.exitCode === 1) throw Error(formatBootstrapRunFailure(e.command, r)); return r; }, async spawn(e) { return t?.(`bootstrap spawn: ${formatCommand(e.command)}`), await n.spawn(e); }, async setNetworkPolicy(e) { return t?.(`bootstrap set network policy: ${formatNetworkPolicy(e)}`), await n.setNetworkPolicy(e); }, async writeFile(e) { return t?.(`bootstrap write file: ${e.path}`), await n.writeFile(e); }, async writeBinaryFile(e) { return t?.(`bootstrap write binary file: ${e.path} (${e.content.byteLength} bytes)`), await n.writeBinaryFile(e); }, async writeTextFile(e) { return t?.(`bootstrap write text file: ${e.path} (${e.content.length} chars)`), await n.writeTextFile(e); }, async removePath(e) { return t?.(`bootstrap remove path: ${e.path}`), await n.removePath(e); } }; } function formatBootstrapRunFailure(e, t) { return [ `Sandbox bootstrap failed because sandbox.run command exited with code 1:`, e, ``, `stdout:`, formatCapturedOutput(`stdout`, t.stdout), ``, `stderr:`, formatCapturedOutput(`stderr`, t.stderr) ].join(` `); } function formatCapturedOutput(t, n) { let r = truncateTail(n); return r.truncated ? `[${t} truncated: showing last ${r.outputLines} of ${r.totalLines} lines]\n${r.output}` : r.output; } function formatCommand(e) { return truncateOneLine(e); } function formatNetworkPolicy(e) { return truncateOneLine(typeof e == `string` ? e : JSON.stringify(e)); } function truncateOneLine(e) { let t = e.replaceAll(/\s+/g, ` `).trim(); return t.length <= 240 ? t : `${t.slice(0, 239)}…`; } //#endregion //#region node_modules/eve/dist/src/execution/sandbox/session.js function buildSandboxSession(n, r = async () => {}) { async function run(e) { let t = await n.spawn(e), [r, i, { exitCode: a }] = await Promise.all([ collectStreamToString(t.stdout), collectStreamToString(t.stderr), t.wait() ]); return { exitCode: a, stderr: i, stdout: r }; } return { id: n.id, resolvePath(e) { return n.resolvePath(e); }, run, async spawn(e) { return await n.spawn(e); }, async readFile(e) { return await n.readFile({ abortSignal: e.abortSignal, path: n.resolvePath(e.path) }); }, async readBinaryFile(e) { let r = await n.readFile({ abortSignal: e.abortSignal, path: n.resolvePath(e.path) }); return r === null ? null : await streamToBuffer(r); }, async readTextFile(e) { validateReadTextFileOptions(e); let r = await n.readFile({ abortSignal: e.abortSignal, path: n.resolvePath(e.path) }); return r === null ? null : applyLineRange(decodeBytes(await streamToBuffer(r), e.encoding ?? `utf-8`), e); }, async writeFile(e) { await n.writeFile({ abortSignal: e.abortSignal, content: e.content, path: n.resolvePath(e.path) }); }, async writeBinaryFile(t) { await n.writeFile({ abortSignal: t.abortSignal, content: bufferToStream(t.content), path: n.resolvePath(t.path) }); }, async writeTextFile(t) { let r = encodeString(t.content, t.encoding ?? `utf-8`); await n.writeFile({ abortSignal: t.abortSignal, content: bufferToStream(r), path: n.resolvePath(t.path) }); }, async removePath(e) { await n.removePath({ abortSignal: e.abortSignal, force: e.force, path: n.resolvePath(e.path), recursive: e.recursive }); }, setNetworkPolicy: r }; } async function collectStreamToString(e) { let n = await streamToBuffer(e); return new TextDecoder().decode(n); } function validateReadTextFileOptions(e) { let { startLine: t, endLine: n } = e; if (t !== void 0 && (!Number.isInteger(t) || t < 1)) throw Error(`startLine must be a positive integer (1-based).`); if (n !== void 0 && (!Number.isInteger(n) || n < 1)) throw Error(`endLine must be a positive integer (1-based).`); if (t !== void 0 && n !== void 0 && t > n) throw Error(`startLine must not be greater than endLine.`); } function splitLinesPreservingEndings(e) { let t = [], n = 0; for (let r = 0; r < e.length; r++) e[r] === `\r` ? r + 1 < e.length && e[r + 1] === ` ` ? (t.push(e.slice(n, r + 2)), n = r + 2, r++) : (t.push(e.slice(n, r + 1)), n = r + 1) : e[r] === ` ` && (t.push(e.slice(n, r + 1)), n = r + 1); return n < e.length && t.push(e.slice(n)), t; } function applyLineRange(e, t) { if (t.startLine === void 0 && t.endLine === void 0) return e; let n = splitLinesPreservingEndings(e), r = n.length, i = t.startLine ?? 1, a = Math.min(t.endLine ?? r, r); return i > r ? `` : n.slice(i - 1, a).join(``); } function decodeBytes(e, t) { return t === `utf-8` || t === `utf8` ? new TextDecoder(`utf-8`, { fatal: !0 }).decode(e) : Buffer.from(e.buffer, e.byteOffset, e.byteLength).toString(t); } function encodeString(e, t) { return t === `utf-8` || t === `utf8` ? new TextEncoder().encode(e) : Buffer.from(e, t); } //#endregion //#region node_modules/eve/dist/src/public/definitions/sandbox-backend.js var SandboxTemplateNotProvisionedError = class SandboxTemplateNotProvisionedError extends Error { backendName; templateKey; constructor(e) { super(`Sandbox template "${e.templateKey}" is not provisioned for backend "${e.backendName}". Run \`eve build\` or invoke \`prewarmAppSandboxes()\` before serving traffic.`), this.name = `SandboxTemplateNotProvisionedError`, this.backendName = e.backendName, this.templateKey = e.templateKey; } static is(e) { return e instanceof SandboxTemplateNotProvisionedError || typeof e == `object` && !!e && e.name === `SandboxTemplateNotProvisionedError` && typeof e.backendName == `string` && typeof e.templateKey == `string`; } }; //#endregion //#region node_modules/eve/dist/src/execution/sandbox/bindings/docker.js const DOCKER_BACKEND_NAME = `docker`; function createDockerSandboxBackend(c = {}) { let l = c.dockerCli ?? createDockerCli(), u = resolveDockerSandboxOptions(c.createOptions), d = createDockerSandboxOptionsHash(u), f; function ensureDaemon() { return f ??= assertDockerDaemonAvailable(l).catch((e) => { throw f = void 0, e; }), f; } return { name: DOCKER_BACKEND_NAME, async prewarm(n) { n.log?.(`checking Docker daemon`), await ensureDaemon(); let i = { optionsHash: d, templateKey: n.templateKey }, a = dockerTemplateImageReference(i), o = resolveDockerTemplateMarkerPath(n.runtimeContext.appRoot, i); if (n.log?.(`checking cached template image "${a}"`), await dockerImageExists(l, a)) return n.log?.(`reusing cached template image`), await touchDockerTemplateMarker(o, a), { reused: !0 }; n.log?.(`checking base image "${u.image}"`), await ensureDockerBaseImage(l, u); let s = `${n.templateKey}-build-${randomUUID().slice(0, 8)}`; n.log?.(`starting template build container`), await startDockerContainer({ cli: l, containerName: s, image: u.image, initialNetworkPolicy: `allow-all`, options: u, role: `template-build` }); try { n.log?.(`preparing base runtime inside container`), await runDockerBaseSetup(l, s), u.networkPolicy !== `allow-all` && (n.log?.(`applying network policy`), await setDockerNetworkPolicy(l, s, u.networkPolicy)); let e = buildSandboxSession(createDockerInternalSession({ cli: l, containerName: s, id: n.templateKey }), (e) => setDockerNetworkPolicy(l, s, e)); n.bootstrap !== void 0 && (n.log?.(`running sandbox bootstrap`), await n.bootstrap({ use: async () => createLoggingSandboxSession({ log: n.log, session: e }) })), n.seedFiles.length > 0 && n.log?.(`writing ${n.seedFiles.length} seed file(s)`), await writeSandboxSeedFiles(e, n.seedFiles), n.log?.(`stopping template build container`), expectDockerSuccess(await l.run([ `stop`, `-t`, `0`, s ]), `stop template build container "${s}"`), n.log?.(`committing template image "${a}"`), expectDockerSuccess(await l.run([ `commit`, `--change`, `LABEL ${DOCKER_SANDBOX_LABEL}=1`, `--change`, `LABEL ${DOCKER_SANDBOX_LABEL}.role=template`, `--change`, `LABEL ${DOCKER_SANDBOX_LABEL}.template-key=${n.templateKey}`, s, a ]), `commit sandbox template image "${a}"`), await touchDockerTemplateMarker(o, a); } finally { await l.run([ `rm`, `-f`, s ]).catch(() => {}); } return { reused: !1 }; }, async create(e) { await ensureDaemon(), markDevelopmentSandboxBackendInitialized(DOCKER_BACKEND_NAME); let r = getDockerContainerName(e.existingMetadata) ?? e.sessionKey, i = await l.run([ `container`, `inspect`, `--format`, `{{.State.Running}}`, r ]); if (i.exitCode === 0) i.stdout.trim() !== `true` && expectDockerSuccess(await l.run([`start`, r]), `restart sandbox session container "${r}"`); else { let t; if (e.templateKey === null) await ensureDockerBaseImage(l, u), t = u.image; else { let n = { optionsHash: d, templateKey: e.templateKey }; if (t = dockerTemplateImageReference(n), !await dockerImageExists(l, t)) throw new SandboxTemplateNotProvisionedError({ backendName: DOCKER_BACKEND_NAME, templateKey: e.templateKey }); await touchDockerTemplateMarker(resolveDockerTemplateMarkerPath(e.runtimeContext.appRoot, n), t); } try { await startDockerContainer({ cli: l, containerName: r, image: t, initialNetworkPolicy: e.templateKey === null ? `allow-all` : u.networkPolicy, options: u, role: `session`, tags: e.tags }); } catch (t) { throw e.templateKey === null ? t : new SandboxTemplateNotProvisionedError({ backendName: DOCKER_BACKEND_NAME, templateKey: e.templateKey }); } e.templateKey === null && (await runDockerBaseSetup(l, r), u.networkPolicy !== `allow-all` && await setDockerNetworkPolicy(l, r, u.networkPolicy)); } let a = buildSandboxSession(createDockerInternalSession({ cli: l, containerName: r, id: e.sessionKey }), (e) => setDockerNetworkPolicy(l, r, e)); return { session: a, useSessionFn: async () => a, async captureState() { return { backendName: DOCKER_BACKEND_NAME, metadata: { containerName: r }, sessionKey: e.sessionKey }; }, async dispose() {} }; } }; } function getDockerContainerName(e) { let t = e?.containerName; return typeof t == `string` ? t : void 0; } //#endregion //#region node_modules/eve/dist/src/execution/sandbox/multiplexed-command.js function createOutputChannel() { let e = !1, t; return { stream: new ReadableStream({ cancel() { e = !0; }, start(e) { t = e; } }), close() { e || t.close(); }, enqueue(n) { e || t.enqueue(n); }, error(n) { e || t.error(n); } }; } function adaptMultiplexedCommandToSandboxProcess(e) { let t = new TextEncoder(), n = createOutputChannel(), r = createOutputChannel(), i = { stderr: r, stdout: n }, a = (async () => { try { for await (let n of e.command.logs()) i[e.getOutput(n)].enqueue(t.encode(n.data)); n.close(), r.close(); } catch (e) { throw n.error(e), r.error(e), e; } })(); a.catch(() => void 0); let o, s; return { stderr: r.stream, stdout: n.stream, wait() { return o ??= Promise.resolve().then(async () => { let t = await e.command.wait(); return await a, { exitCode: t.exitCode }; }); }, kill() { return s ??= Promise.resolve().then(() => e.command.kill()); } }; } //#endregion //#region node_modules/eve/dist/src/execution/sandbox/bindings/just-bash-runtime.js let justBashModulePromise; async function loadJustBashModule(e) { return justBashModulePromise ??= loadOptionalEnginePackage({ appRoot: e.appRoot, autoInstall: e.autoInstall, importModule: async () => await import(`just-bash`), missingMessage: "The just-bash sandbox backend requires the `just-bash` package, which is not bundled with eve. Install it in your application (for example `pnpm add -D just-bash`), or use docker() / defaultSandbox() instead.", packageName: `just-bash` }).catch((e) => { throw justBashModulePromise = void 0, e; }), await justBashModulePromise; } async function createBashSandbox(n) { let { ReadWriteFs: r, Sandbox: i } = await loadJustBashModule({ appRoot: n.appRoot, autoInstall: n.autoInstall }), a = resolveLocalSandboxFilesystemRootPath(n.rootPath), o = resolveLocalSandboxMetadataPath(n.rootPath), s = await readLocalMetadata(o); await mkdir(a, { recursive: !0 }); let c = new r({ allowSymlinks: !0, maxFileReadSize: 2 ** 53 - 1, root: a }); await ensureLocalSandboxDirectories(c); let l = await i.create({ cwd: WORKSPACE_ROOT$1, env: s?.env, fs: c, network: { dangerouslyAllowFullInternetAccess: !0 } }); return { async captureState() { return await writeLocalMetadata(o, { env: { ...l.bashEnvInstance.getEnv() }, version: 1 }), { rootPath: n.rootPath }; }, async dispose() { await l.stop(); }, async readFileBytes(e) { let t; try { t = await c.readFileBuffer(e); } catch { return null; } return Buffer.from(t); }, async removePath(e) { await c.rm(e.path, { force: e.force, recursive: e.recursive }); }, rootPath: n.rootPath, sessionKey: n.sessionKey, async spawn(e) { if (e.abortSignal?.aborted) throw new DOMException(`The operation was aborted.`, `AbortError`); let t = e.workingDirectory === void 0 ? e.command : `( cd ${shellQuote(e.workingDirectory)} && ${e.command} )`; return adaptMultiplexedCommandToSandboxProcess({ command: await l.runCommand({ args: [t], cmd: `eval`, detached: !0, env: e.env, signal: e.abortSignal }), getOutput: (e) => e.type }); }, async writeFiles(t) { for (let n of t) { let t = dirname(n.path); await c.mkdir(t, { recursive: !0 }), await c.writeFile(n.path, n.content); } } }; } async function justBashSetNetworkPolicyUnsupported() { throw Error(`setNetworkPolicy() is not supported on the just-bash sandbox backend. just-bash applies its network policy only at sandbox creation (no run-time update) and does not run git or other binaries. Use docker() for coarse egress control or vercel() / microsandbox() for credential brokering.`); } function createJustBashHandle(e, t) { let n = buildSandboxSession(createFileBackedInternalSandboxSession({ id: e.sessionKey, sandbox: e }), justBashSetNetworkPolicyUnsupported); return { session: n, useSessionFn: async () => n, async captureState() { return { backendName: t, metadata: await e.captureState() ?? {}, sessionKey: e.sessionKey }; }, async dispose() { await e.dispose(); } }; } function resolveLocalSandboxFilesystemRootPath(e) { return `${e}/fs`; } function resolveLocalSandboxMetadataPath(e) { return `${e}/metadata.json`; } async function ensureLocalSandboxDirectories(e) { await e.mkdir(WORKSPACE_ROOT$1, { recursive: !0 }); } async function readLocalMetadata(e) { if (!await pathExists$1(e)) return null; let t = JSON.parse(await readFile(e, `utf8`)); return t.version !== 1 || !isStringRecord(t.env) ? null : { env: t.env, version: 1 }; } async function writeLocalMetadata(n, i) { await mkdir(dirname(n), { recursive: !0 }), await writeFile(n, `${JSON.stringify(i, null, 2)}\n`); } function isStringRecord(e) { return typeof e == `object` && !!e && !Array.isArray(e) && Object.values(e).every((e) => typeof e == `string`); } //#endregion //#region node_modules/eve/dist/src/execution/sandbox/bindings/just-bash.js const JUST_BASH_CACHE_DIRECTORY_NAME = `just-bash`; const JUST_BASH_BACKEND_NAME = `just-bash`; function createJustBashSandboxBackend(t = {}) { let r = t.createOptions?.autoInstall ?? !0; return { name: JUST_BASH_BACKEND_NAME, async prewarm(t) { let a = resolveTemplateRootPath(resolveSandboxCacheDirectory(t.runtimeContext.appRoot), t.templateKey); if (await pathExists$1(a)) return await touchDirectory(a), { reused: !0 }; let s = `${a}.${randomUUID()}.tmp`, u = !1, d = await createBashSandbox({ appRoot: t.runtimeContext.appRoot, autoInstall: r, rootPath: s, sessionKey: t.templateKey }), f = buildSandboxSession(createFileBackedInternalSandboxSession({ id: d.sessionKey, sandbox: d }), justBashSetNetworkPolicyUnsupported); try { if (t.bootstrap !== void 0 && (t.log?.(`running sandbox bootstrap`), await t.bootstrap({ use: async () => createLoggingSandboxSession({ log: t.log, session: f }) })), await writeSandboxSeedFiles(f, t.seedFiles), await d.captureState() === null) throw Error(`Failed to capture local sandbox template state for "${t.templateKey}".`); await mkdir(dirname(a), { recursive: !0 }); try { await rename(s, a), u = !0; } catch (e) { if (await pathExists$1(a)) return { reused: !0 }; throw e; } } finally { await d.dispose(), u || await rm(s, { force: !0, recursive: !0 }).catch(() => {}); } return { reused: !1 }; }, async create(e) { let t = resolveSandboxCacheDirectory(e.runtimeContext.appRoot), i = getLocalRootPath(e.existingMetadata) ?? resolveSessionRootPath(t, e.sessionKey); if (!await pathExists$1(i)) if (e.templateKey === null) await mkdir(i, { recursive: !0 }); else { let n = resolveTemplateRootPath(t, e.templateKey); if (!await pathExists$1(n)) throw new SandboxTemplateNotProvisionedError({ backendName: JUST_BASH_BACKEND_NAME, templateKey: e.templateKey }); await copyDirectoryAtomically(n, i); } return createJustBashHandle(await createBashSandbox({ appRoot: e.runtimeContext.appRoot, autoInstall: r, rootPath: i, sessionKey: e.sessionKey }), JUST_BASH_BACKEND_NAME); } }; } function resolveTemplateRootPath(e, t) { return resolveLocalBackendTemplateRootPath(e, JUST_BASH_CACHE_DIRECTORY_NAME, t); } function resolveSessionRootPath(e, t) { return resolveLocalBackendSessionRootPath(e, JUST_BASH_CACHE_DIRECTORY_NAME, t); } function getLocalRootPath(e) { let t = e?.rootPath; return typeof t == `string` ? t : void 0; } //#endregion //#region node_modules/eve/dist/src/execution/sandbox/bindings/microsandbox-options.js const MICROSANDBOX_USER = `vercel-sandbox`; function resolveMicrosandboxOptions(e) { return { cpus: e?.cpus ?? 1, env: e?.env ?? {}, image: e?.image ?? `ghcr.io/vercel/eve:latest`, memoryMiB: e?.memoryMiB ?? 1024, networkPolicy: e?.networkPolicy, pullPolicy: e?.pullPolicy ?? `if-missing`, setup: { autoInstall: e?.setup?.autoInstall ?? !0, skipVerify: e?.setup?.skipVerify ?? !1 } }; } function microsandboxOptionsForHash(e) { return { cpus: e.cpus, env: e.env, image: e.image, memoryMiB: e.memoryMiB, pullPolicy: e.pullPolicy }; } //#endregion //#region node_modules/eve/dist/src/execution/sandbox/bindings/microsandbox-platform.js function isMicrosandboxPlatformSupported() { return process.platform === `darwin` && process.arch === `arm64` ? !0 : process.platform === `linux` && (process.arch === `x64` || process.arch === `arm64`) && isGlibcLinux() ? process.env.MSB_PATH !== void 0 || existsSync(`/dev/kvm`) : !1; } function isGlibcLinux() { try { return typeof (process.report?.getReport())?.header?.glibcVersionRuntime == `string`; } catch { return !1; } } async function assertMicrosandboxPlatformCandidate() { if (!(process.platform === `darwin` && process.arch === `arm64`)) { if (process.platform === `linux` && (process.arch === `x64` || process.arch === `arm64`)) { if (!isGlibcLinux()) throw Error(`The microsandbox sandbox backend requires a glibc-based Linux distribution; musl hosts are not supported. Use docker() or vercel() instead.`); if (process.env.MSB_PATH !== void 0 || await doesPathExist$1(`/dev/kvm`)) return; throw Error("The microsandbox sandbox backend requires Linux with KVM enabled. `/dev/kvm` is not available on this host. Enable KVM, set MSB_PATH for a custom runtime, or use docker() / vercel()."); } throw Error(`The microsandbox sandbox backend supports Linux with KVM or macOS on Apple Silicon. Current host is ${process.platform}/${process.arch}. Use docker() or vercel() on this host.`); } } async function doesPathExist$1(e) { try { return await access(e), !0; } catch { return !1; } } async function ensureMicrosandboxBaseRuntime(e, t = {}) { let n = await collectMicrosandboxBaseRuntimeOutput(await e.execStreamWith(`bash`, (e) => e.args([`-lc`, MICROSANDBOX_BASE_SETUP_SCRIPT]).cwd(`/`).user(`root`)), t.log); if (n.exitCode !== 0) throw Error(`Failed to initialize the microsandbox base runtime. ${n.stderr || n.stdout}`.trim()); } async function collectMicrosandboxBaseRuntimeOutput(e, t) { let n = new TextDecoder(), r = new TextDecoder(), i = ``, a = ``, o = ``, s = ``, c; for await (let l of e) if (l.kind === `stdout`) { let e = n.decode(l.data, { stream: !0 }); i = appendOutput(i, e), o = emitMicrosandboxBaseRuntimeLogs(o + e, t); } else if (l.kind === `stderr`) { let e = r.decode(l.data, { stream: !0 }); a = appendOutput(a, e), s = emitMicrosandboxBaseRuntimeLogs(s + e, t); } else if (l.kind === `exited`) { c = l.code; break; } let l = n.decode(), u = r.decode(); if (l.length > 0 && (i = appendOutput(i, l), o = emitMicrosandboxBaseRuntimeLogs(o + l, t)), u.length > 0 && (a = appendOutput(a, u), s = emitMicrosandboxBaseRuntimeLogs(s + u, t)), emitMicrosandboxBaseRuntimeLogLine(o, t), emitMicrosandboxBaseRuntimeLogLine(s, t), c === void 0) throw Error(`Microsandbox base runtime setup ended without an exit event.`); return { exitCode: c, stderr: a, stdout: i }; } function emitMicrosandboxBaseRuntimeLogs(e, t) { let n = e.split(/\r?\n/u), r = n.pop() ?? ``; for (let e of n) emitMicrosandboxBaseRuntimeLogLine(e, t); return r; } function emitMicrosandboxBaseRuntimeLogLine(e, t) { let n = e.match(/^eve-base-runtime: ?(.*)$/u)?.[1]; n !== void 0 && n.length > 0 && t?.(n); } function appendOutput(e, t) { let n = e + t; return n.length > 2e4 ? n.slice(-2e4) : n; } const MICROSANDBOX_BASE_SETUP_SCRIPT = ` set -euo pipefail log_step() { printf 'eve-base-runtime: %s\\n' "$*" >&2 } log_step "checking bash" command -v bash >/dev/null 2>&1 log_step "checking sandbox user" if ! id -u ${MICROSANDBOX_USER} >/dev/null 2>&1; then command -v useradd >/dev/null 2>&1 log_step "create sandbox user: ${MICROSANDBOX_USER}" useradd -m -s /bin/bash ${MICROSANDBOX_USER} fi log_step "prepare workspace directory: ${WORKSPACE_ROOT$1}" mkdir -p ${WORKSPACE_ROOT$1} chown ${MICROSANDBOX_USER}:${MICROSANDBOX_USER} ${WORKSPACE_ROOT$1} `; //#endregion //#region node_modules/eve/dist/src/execution/sandbox/bindings/microsandbox-metadata.js const MICROSANDBOX_METADATA_FILE_NAME = `metadata.json`; function resolveMicrosandboxMetadataPath(e) { return join(e, MICROSANDBOX_METADATA_FILE_NAME); } async function readTemplateMetadata(e) { let t = await readJsonFile(e); return t?.version !== 2 || typeof t.optionsHash != `string` || typeof t.snapshotName != `string` ? null : { optionsHash: t.optionsHash, snapshotName: t.snapshotName, version: 2 }; } async function writeTemplateMetadata(e, t) { await writeJsonFileAtomically(e, t); } async function readSessionMetadata(e) { return readSessionMetadataRecord(await readJsonFile(e)); } function readSessionMetadataRecord(e) { return !isRecord$5(e) || e.version !== 2 || typeof e.optionsHash != `string` || typeof e.sandboxName != `string` ? null : { networkPolicy: e.networkPolicy, optionsHash: e.optionsHash, sandboxName: e.sandboxName, stateSnapshotName: typeof e.stateSnapshotName == `string` ? e.stateSnapshotName : void 0, version: 2 }; } async function writeSessionMetadata(e, t) { await writeJsonFileAtomically(e, t); } async function readJsonFile(e) { try { let t = JSON.parse(await readFile(e, `utf8`)); return isRecord$5(t) ? t : null; } catch (e) { if (e instanceof Error && `code` in e && e.code === `ENOENT`) return null; throw e; } } async function writeJsonFileAtomically(t, n) { let r = `${t}.${randomUUID()}.tmp`; await mkdir(dirname(t), { recursive: !0 }), await writeFile(r, `${JSON.stringify(n, null, 2)}\n`), await rename(r, t); } function isRecord$5(e) { return typeof e == `object` && !!e && !Array.isArray(e); } //#endregion //#region node_modules/eve/dist/src/execution/sandbox/bindings/microsandbox-create.js async function createMicrosandboxWithProgress(e) { let t = { phase: `resolving the image` }; try { let n = await e.builder.createWithPullProgress(), r = reportMicrosandboxCreateProgress(n, t, e.log); try { return await withHeartbeat(t, e.log, async () => await n.awaitSandbox()); } finally { await r.catch(() => {}); } } catch (n) { throw enrichMicrosandboxError({ context: `Failed to create microsandbox VM from ${e.source} while ${t.phase}`, error: n, errorType: e.errorType }); } } function enrichMicrosandboxError(t) { if (t.error instanceof MicrosandboxDiagnosticError) return t.error; let n = readMicrosandboxErrorCode(t.error, t.errorType), r = n === void 0 ? `` : ` [${n}]`, i = toErrorMessage(t.error), a = /[.!?]$/u.test(i) ? i : `${i}.`, o = microsandboxErrorHint(n), s = o === void 0 ? `` : ` ${o}`; return new MicrosandboxDiagnosticError(`${t.context}${r}: ${a}${s}`, { cause: t.error }); } var MicrosandboxDiagnosticError = class extends Error {}; async function reportMicrosandboxCreateProgress(e, t, n) { for await (let r of e) { let e = microsandboxCreatePhase(r, t.phase); e !== t.phase && (t.phase = e, n?.(e)); } } function microsandboxCreatePhase(e, t) { switch (e.kind) { case `resolving`: case `resolved`: return `resolving the image`; case `layerDownloadProgress`: case `layerDownloadComplete`: case `layerDownloadVerifying`: case `layerMaterializeStarted`: case `layerMaterializeProgress`: case `layerMaterializeWriting`: case `layerMaterializeComplete`: return `downloading and materializing image layers`; case `stitchMergingTrees`: case `stitchWritingFsmeta`: case `stitchWritingVmdk`: case `stitchComplete`: return `assembling the image filesystem`; case `complete`: return `image ready; booting microsandbox VM`; default: return t; } } async function withHeartbeat(e, t, n) { if (t?.(e.phase), t === void 0) return await n(); let r = Date.now(), i = setInterval(() => { let n = Math.round((Date.now() - r) / 1e3); t(`${e.phase} (${n}s elapsed)`); }, 1e4); i.unref?.(); try { return await n(); } finally { clearInterval(i); } } const MICROSANDBOX_ERROR_HINTS = { database: `Check that the microsandbox npm package and installed VM runtime use the same version. If versions changed, use a clean MSB_HOME or migrate the existing database.`, imageNotFound: `Check that the image exists and that the registry credentials can pull it.`, libkrunfwNotFound: "Run `npx microsandbox install` and verify that MSB_PATH points to the installed runtime." }; function readMicrosandboxErrorCode(e, n) { if (n !== void 0 && e instanceof n || e instanceof Error && `code` in e && typeof e.code == `string` && Object.hasOwn(MICROSANDBOX_ERROR_HINTS, e.code)) return e.code; } function microsandboxErrorHint(e) { return e === void 0 ? void 0 : MICROSANDBOX_ERROR_HINTS[e]; } //#endregion //#region node_modules/eve/dist/src/execution/sandbox/bindings/microsandbox-network.js function applyMicrosandboxNetwork(e, t) { let n = createMicrosandboxNetworkPlan(t); return n.disabled ? e.disableNetwork() : n.policy === null && n.transformHeaderRules.length === 0 ? e : e.network((e) => { let t = e.enabled(!0); if (n.policy !== null && (t = t.policyJson(serializeMicrosandboxNetworkPolicyJson(n.policy))), n.transformHeaderRules.length === 0) return t; t = t.trustHostCAs(!0); for (let e of n.transformHeaderRules) for (let [n, r] of Object.entries(e.headers)) { let i = e.placeholderHeaders[n]; if (i === void 0) continue; let a = createSecretEnvName(e.domain, n, r); t = t.secret((t) => { let n = t.env(a).value(r).placeholder(i).injectHeaders(!0).injectBasicAuth(!0).injectQuery(!1).injectBody(!1).requireTlsIdentity(!0); return n = e.domain === `*` ? n.allowAnyHostDangerous(!0) : e.domain.startsWith(`*.`) ? n.allowHostPattern(e.domain) : n.allowHost(e.domain), n; }); } return t; }); } function serializeMicrosandboxNetworkPolicyJson(e) { let t = { default_egress: e.defaultEgress, default_ingress: e.defaultIngress, rules: e.rules.map((e) => ({ action: e.action, destination: serializeMicrosandboxNetworkDestination(e.destination), direction: e.direction, ports: e.ports, protocols: e.protocols })) }; return JSON.stringify(t); } function createMicrosandboxNetworkPlan(e) { if (e === void 0 || e === `allow-all`) return { disabled: !1, policy: { defaultEgress: `allow`, defaultIngress: `deny`, rules: [] }, transformHeaderRules: [] }; if (e === `deny-all`) return { disabled: !0, policy: null, transformHeaderRules: [] }; let t = [], n = [], r = normalizeAllowEntries(e.allow), i = r.some((e) => e.domain === `*`), a = i ? `allow` : `deny`; for (let n of e.subnets?.deny ?? []) t.push({ action: `deny`, destination: { cidr: n, kind: `cidr` }, direction: `egress`, ports: [], protocols: [] }); for (let n of e.subnets?.allow ?? []) t.push({ action: `allow`, destination: { cidr: n, kind: `cidr` }, direction: `egress`, ports: [], protocols: [] }); i || t.push({ action: `allow`, destination: { kind: `any` }, direction: `egress`, ports: [{ start: 53, end: 53 }], protocols: [`udp`, `tcp`] }); for (let e of r) if (e.domain !== `*`) { t.push({ action: `allow`, destination: domainToDestination(e.domain), direction: `egress`, ports: [], protocols: [] }); for (let t of e.rules) for (let r of normalizeTransforms(t.transform)) Object.keys(r.headers).length !== 0 && n.push({ domain: e.domain, headers: r.headers, match: t.match, placeholderHeaders: createPlaceholderHeaders(e.domain, r.headers) }); } return { disabled: !1, policy: { defaultEgress: a, defaultIngress: `deny`, rules: t }, transformHeaderRules: n }; } function createTransformBrokerEnvironment(e) { if (e.transformHeaderRules.length === 0) return {}; let t = e.transformHeaderRules.flatMap((e) => Object.entries(e.placeholderHeaders).filter(([e]) => e.toLowerCase() === `authorization`).flatMap(([t, n]) => e.domain === `*` || e.domain.startsWith(`*.`) ? [] : [{ key: `http.https://${e.domain}/.extraheader`, value: `${t}: ${n}` }])), n = {}; return t.length > 0 && (n.GIT_CONFIG_COUNT = String(t.length), t.forEach((e, t) => { n[`GIT_CONFIG_KEY_${t}`] = e.key, n[`GIT_CONFIG_VALUE_${t}`] = e.value; })), { EVE_MICROSANDBOX_NETWORK_TRANSFORMS: Buffer.from(JSON.stringify(e.transformHeaderRules)).toString(`base64`), ...n }; } function normalizeAllowEntries(e) { return e === void 0 ? [] : Array.isArray(e) ? e.map((e) => ({ domain: e, rules: [] })) : Object.entries(e).map(([e, t]) => ({ domain: e, rules: Array.isArray(t) ? t : [] })); } function normalizeTransforms(e) { return e === void 0 ? [] : e.map((e) => ({ headers: e.headers ?? {} })); } function domainToDestination(e) { return e.startsWith(`*.`) ? { kind: `domainSuffix`, suffix: e.slice(2) } : { domain: e, kind: `domain` }; } function serializeMicrosandboxNetworkDestination(e) { switch (e.kind) { case `any`: return `any`; case `cidr`: return { cidr: e.cidr ?? `` }; case `domain`: return { domain: e.domain ?? `` }; case `domainSuffix`: return { domain_suffix: e.suffix ?? `` }; case `group`: return { group: e.group ?? `` }; default: throw Error(`Unsupported microsandbox network destination kind.`); } } function createPlaceholderHeaders(e, t) { let n = {}; for (let [r, i] of Object.entries(t)) n[r] = `__EVE_MSB_SECRET_${createStableHash$2(`${e}:${r}:${i}`).slice(0, 24)}__`; return n; } function createSecretEnvName(e, t, n) { return `EVE_MSB_SECRET_${createStableHash$2(`${e}:${t}:${n}`).slice(0, 24).toUpperCase()}`; } function createStableHash$2(t) { return createHash(`sha256`).update(t).digest(`hex`); } //#endregion //#region node_modules/eve/dist/src/execution/sandbox/bindings/microsandbox-process.js function adaptMicrosandboxExecToSandboxProcess(e) { let t, n, r, i, a, o = new Promise((e, t) => { i = e, a = t; }), s = new ReadableStream({ start(e) { t = e; } }), c = new ReadableStream({ start(e) { n = e; } }); return (async () => { let o = e[Symbol.asyncIterator](); try { for (;;) { let e = r === void 0 ? await o.next() : await nextWithTimeout(o, 100); if (e === `timeout` || e.done === !0) break; let i = e.value; i.kind === `stdout` ? t?.enqueue(i.data) : i.kind === `stderr` ? n?.enqueue(i.data) : i.kind === `exited` && (r = i.code); } } catch (e) { t?.error(e), n?.error(e), a?.(e); } finally { if (o.return?.().catch(() => {}), r === void 0) { let e = Error(`Microsandbox command ended without an exit event.`); t?.error(e), n?.error(e), a?.(e); } else t?.close(), n?.close(), i?.(); } })(), { stdout: s, stderr: c, async wait() { return await o, { exitCode: r ?? 0 }; }, async kill() { await e.kill(); } }; } async function nextWithTimeout(e, t) { let n; try { return await Promise.race([e.next(), new Promise((e) => { n = setTimeout(() => e(`timeout`), t); })]); } finally { n !== void 0 && clearTimeout(n); } } //#endregion //#region node_modules/eve/dist/src/execution/sandbox/bindings/microsandbox-runtime.js const MICROSANDBOX_STOP_TIMEOUT_MS = 1e4; var MicrosandboxVm = class { #e; #t; #n; #r; #i; #a; #o; constructor(e, t, n, r, i, a, o) { this.#e = e, this.#i = t, this.#a = n, this.#n = r, this.#t = i, this.#r = a, this.#o = o; } get id() { return this.#e.sessionKey; } async captureState(e) { if (this.#r = e, isEveDevEnvironment()) return this.#t !== void 0 && await this.writeMetadata(this.#t, e), { networkPolicy: this.#n, optionsHash: e, sandboxName: this.#a, stateSnapshotName: this.#o, version: 2 }; let t = this.#o, n = createProviderName(`eve-sbx-state`, `${this.#e.sessionKey}:${randomUUID()}`); return await this.stopAndSnapshot(n), this.#o = n, this.#t !== void 0 && await this.writeMetadata(this.#t, e), t !== void 0 && await removeSnapshotIfExists(this.#e.module, t), { networkPolicy: this.#n, optionsHash: e, sandboxName: this.#a, stateSnapshotName: n, version: 2 }; } async detach() { await this.#i.detach().catch(() => {}); } async readFileBytes(e) { try { let t = this.#i.fs(); return await t.exists(e) ? Buffer.from(await t.read(e)) : null; } catch { return null; } } async removePath(e) { let t = `${e.force === !0 ? `f` : ``}${e.recursive === !0 ? `r` : ``}`, n = `${t.length > 0 ? `rm -${t}` : `rm`} -- ${shellQuote(e.path)}`; await this.runInternalCommand({ abortSignal: e.abortSignal, command: n, user: MICROSANDBOX_USER }); } async removePersisted() { await removeSandboxIfExists(this.#e.module, this.#a), this.#o !== void 0 && await removeSnapshotIfExists(this.#e.module, this.#o); } async setNetworkPolicy(e) { let t = this.#o, n = createProviderName(`eve-sbx-state`, `${this.#e.sessionKey}:${randomUUID()}`), i = this.#a; await this.stopAndSnapshot(n), await removeSandboxIfExists(this.#e.module, i); let a = createProviderName(`eve-sbx-ses`, `${this.#e.sessionKey}:${randomUUID()}`); this.#i = await createMicrosandbox({ fromSnapshot: n, module: this.#e.module, name: a, networkPolicy: e, options: this.#e.options, tags: this.#e.tags, user: MICROSANDBOX_USER, workdir: WORKSPACE_ROOT$1 }), this.#a = a, this.#n = e, this.#o = void 0, this.#t !== void 0 && this.#r !== void 0 && await this.writeMetadata(this.#t, this.#r), await removeSnapshotIfExists(this.#e.module, n), t !== void 0 && await removeSnapshotIfExists(this.#e.module, t); } async spawn(e) { if (e.abortSignal?.aborted) throw new DOMException(`The operation was aborted.`, `AbortError`); let t = { ...this.#e.options.env, ...createTransformBrokerEnvironment(createMicrosandboxNetworkPlan(this.#n)), ...e.env }, n = await this.#i.execStreamWith(`bash`, (n) => n.args([`-lc`, e.command]).cwd(e.workingDirectory ?? WORKSPACE_ROOT$1).envs(t).user(MICROSANDBOX_USER)); return e.abortSignal !== void 0 && e.abortSignal.addEventListener(`abort`, () => { n.kill().catch(() => {}); }, { once: !0 }), adaptMicrosandboxExecToSandboxProcess(n); } async stopAndSnapshot(e) { await this.#i.stop().catch(() => {}), await stopAndSnapshotMicrosandboxSandbox(this.#e.module, this.#a, e); } async writeFiles(t) { let n = this.#i.fs(); for (let r of t) { let t = posix.dirname(r.path); await this.runInternalCommand({ command: `mkdir -p ${shellQuote(t)}`, user: MICROSANDBOX_USER }), await n.write(r.path, r.content), await this.runInternalCommand({ command: `chown ${MICROSANDBOX_USER}:${MICROSANDBOX_USER} ${shellQuote(r.path)}`, user: `root` }); } } async writeMetadata(e, t) { this.#t = e, this.#r = t, await writeSessionMetadata(e, { networkPolicy: this.#n, optionsHash: t, sandboxName: this.#a, stateSnapshotName: this.#o, version: 2 }); } async runInternalCommand(e) { if (e.abortSignal?.aborted) throw new DOMException(`The operation was aborted.`, `AbortError`); let t = await this.#i.execWith(`bash`, (t) => t.args([`-lc`, e.command]).cwd(WORKSPACE_ROOT$1).user(e.user)); if (t.code !== 0) { let n = e.failureMessage ?? `Microsandbox command failed.`; throw Error(`${n} ${t.stderr()}`.trim()); } } }; async function createPreparedMicrosandbox(e) { let t = e.setupBaseRuntime ? `allow-all` : e.networkPolicy, n = await createMicrosandbox({ fromSnapshot: e.fromSnapshot, log: e.log, module: e.module, name: e.name, networkPolicy: t, options: e.options, tags: e.tags, user: e.setupBaseRuntime ? void 0 : MICROSANDBOX_USER, workdir: e.setupBaseRuntime ? `/` : WORKSPACE_ROOT$1 }), r = new MicrosandboxVm({ module: e.module, options: e.options, sessionKey: e.sessionKey, tags: e.tags }, n, e.name, t); return e.setupBaseRuntime && (await withProgressHeartbeat$1(`preparing base runtime inside VM`, e.log, async () => { await ensureMicrosandboxBaseRuntime(n, { log: e.log }); }), e.networkPolicy !== void 0 && e.networkPolicy !== `allow-all` && (e.log?.(`applying network policy`), await r.setNetworkPolicy(e.networkPolicy))), r; } async function connectMicrosandbox(e) { let t; try { t = await e.module.Sandbox.get(e.metadata.sandboxName); } catch (t) { if (!isMicrosandboxNotFoundError(t)) throw t; return e.metadata.stateSnapshotName === void 0 ? null : await restoreMicrosandboxSessionSnapshot(e); } if (t.status !== `running` && t.status !== `draining` && e.metadata.stateSnapshotName !== void 0) return await restoreMicrosandboxSessionSnapshot(e); let n = t.status === `running` || t.status === `draining` ? await t.connectWithTimeout(1e4) : await t.startDetached(); return new MicrosandboxVm({ module: e.module, options: e.options, sessionKey: e.sessionKey, tags: e.tags }, n, e.metadata.sandboxName, e.metadata.networkPolicy, e.metadataPath, e.metadata.optionsHash, e.metadata.stateSnapshotName); } async function restoreMicrosandboxSessionSnapshot(e) { if (e.metadata.stateSnapshotName === void 0 || !await snapshotExists(e.module, e.metadata.stateSnapshotName)) return null; let t = createProviderName(`eve-sbx-ses`, `${e.sessionKey}:${randomUUID()}`), n = await createMicrosandbox({ fromSnapshot: e.metadata.stateSnapshotName, module: e.module, name: t, networkPolicy: e.metadata.networkPolicy, options: e.options, tags: e.tags, user: MICROSANDBOX_USER, workdir: WORKSPACE_ROOT$1 }); await removeSandboxIfExists(e.module, e.metadata.sandboxName); let i = new MicrosandboxVm({ module: e.module, options: e.options, sessionKey: e.sessionKey, tags: e.tags }, n, t, e.metadata.networkPolicy, e.metadataPath, e.metadata.optionsHash, e.metadata.stateSnapshotName); return await i.writeMetadata(e.metadataPath, e.metadata.optionsHash), i; } async function loadMicrosandboxModule(e) { e.log?.(`checking microsandbox platform support`), await assertMicrosandboxPlatformCandidate(); let t = await withProgressHeartbeat$1(`loading microsandbox npm package`, e.log, () => loadOptionalEnginePackage({ appRoot: e.appRoot, autoInstall: e.options.setup.autoInstall, importModule: async () => await import(`microsandbox`), missingMessage: "The microsandbox sandbox backend requires the `microsandbox` package, which is not bundled with eve. Install it in your application (for example `pnpm add -D microsandbox`), or use docker() / vercel() instead.", packageName: `microsandbox` })); if (e.log?.(`checking microsandbox VM runtime`), !t.isInstalled()) { if (!e.options.setup.autoInstall || !isEveDevEnvironment()) throw Error("The microsandbox VM runtime is not installed. Run `npx microsandbox install`, set MSB_PATH for a custom install, or let `eve dev` install it automatically with microsandbox({ setup: { autoInstall: true } })."); await withProgressHeartbeat$1(`installing microsandbox VM runtime`, e.log, async () => { await t.setup().skipVerify(e.options.setup.skipVerify).install(); }); } return e.log?.(`microsandbox runtime ready`), t; } async function withProgressHeartbeat$1(e, t, n) { if (t?.(e), t === void 0) return await n(); let r = Date.now(), i = setInterval(() => { t(`${e} (${Math.round((Date.now() - r) / 1e3)}s elapsed)`); }, 1e4); i.unref?.(); try { return await n(); } finally { clearInterval(i); } } async function stopAndSnapshotMicrosandboxSandbox(e, t, n) { for (let r = 0; r < 3; r += 1) { let i = await e.Sandbox.get(t); await i.stopWithTimeout(r === 0 ? MICROSANDBOX_STOP_TIMEOUT_MS : 0).catch(() => {}); try { await i.snapshot(n); return; } catch (e) { if (!isMicrosandboxSnapshotSourceRunningError(e) || r === 2) throw e; await i.kill().catch(() => {}), await new Promise((e) => setTimeout(e, 250)); } } } async function snapshotExists(e, t) { try { return await e.Snapshot.get(t), !0; } catch { return !1; } } async function sandboxExists(e, t) { try { return await e.Sandbox.get(t), !0; } catch (e) { if (isMicrosandboxNotFoundError(e)) return !1; throw e; } } async function removeSnapshotIfExists(e, t) { try { await e.Snapshot.remove(t, { force: !0 }); } catch (e) { if (!isMicrosandboxNotFoundError(e)) throw e; } } function createProviderName(e, t, n = ``) { return `${e}-${createStableHash$1(`${t}:${n}`).slice(0, 32)}`; } function createStableHash$1(e) { return createHash(`sha256`).update(e).digest(`hex`); } async function doesPathExist(e) { try { return await access(e), !0; } catch { return !1; } } async function createMicrosandbox(e) { let t = e.module.Sandbox.builder(e.name).cpus(e.options.cpus).detached(!0).envs(e.options.env).labels(resolveMicrosandboxLabels(e.tags)).memory(e.options.memoryMiB).pullPolicy(e.options.pullPolicy).replace().workdir(e.workdir); t = e.fromSnapshot === void 0 ? t.image(e.options.image) : t.fromSnapshot(e.fromSnapshot), e.user !== void 0 && (t = t.user(e.user)); let n = e.fromSnapshot === void 0 ? `image "${e.options.image}"` : `snapshot "${e.fromSnapshot}"`; return await createMicrosandboxWithProgress({ builder: applyMicrosandboxNetwork(t, e.networkPolicy), errorType: e.module.MicrosandboxError, log: e.log, source: n }); } async function removeSandboxIfExists(e, t) { for (let n = 0; n < 3; n += 1) try { let r = await e.Sandbox.get(t); await r.stopWithTimeout(n === 0 ? MICROSANDBOX_STOP_TIMEOUT_MS : 0).catch(() => {}), await r.remove(); return; } catch (r) { if (isMicrosandboxNotFoundError(r)) return; if (isMicrosandboxStillRunningError(r) && n < 2) { await (await e.Sandbox.get(t).catch(() => null))?.kill().catch(() => {}), await new Promise((e) => setTimeout(e, 250)); continue; } throw r; } } function isMicrosandboxNotFoundError(e) { return e instanceof Error ? /not found|not exist|no such/i.test(e.message) : !1; } function isMicrosandboxStillRunningError(e) { return e instanceof Error ? /still running/i.test(e.message) : !1; } function isMicrosandboxSnapshotSourceRunningError(e) { return e instanceof Error ? /snapshot source sandbox .*not stopped|SnapshotSandboxRunning/i.test(e.message) : !1; } function resolveMicrosandboxLabels(e) { return { "eve.backend": `microsandbox`, ...withDevelopmentSandboxTags(e) }; } //#endregion //#region node_modules/eve/dist/src/execution/sandbox/bindings/microsandbox-templates.js const MICROSANDBOX_CACHE_DIRECTORY_NAME = `microsandbox`; function resolveMicrosandboxTemplateRootPath(e, t) { return resolveLocalBackendTemplateRootPath(e, MICROSANDBOX_CACHE_DIRECTORY_NAME, t); } function resolveMicrosandboxSessionRootPath(e, t) { return resolveLocalBackendSessionRootPath(e, MICROSANDBOX_CACHE_DIRECTORY_NAME, t); } //#endregion //#region node_modules/eve/dist/src/execution/sandbox/bindings/microsandbox-lifecycle.js const activeMicrosandboxSessionHandles = /* @__PURE__ */ new Map(); async function prewarmMicrosandboxTemplate(i) { i.prewarmInput.log?.(`loading microsandbox runtime`); let a = await loadMicrosandboxModule({ appRoot: i.prewarmInput.runtimeContext.appRoot, log: i.prewarmInput.log, options: i.options }), u = resolveMicrosandboxTemplateRootPath(resolveSandboxCacheDirectory(i.prewarmInput.runtimeContext.appRoot), i.prewarmInput.templateKey), f = resolveMicrosandboxMetadataPath(u); i.prewarmInput.log?.(`checking cached snapshot`); let p = await readTemplateMetadata(f); if (p?.optionsHash === i.optionsHash && await snapshotExists(a, p.snapshotName)) return i.prewarmInput.log?.(`reusing cached snapshot`), await touchDirectory(u), { reused: !0 }; let h = createProviderName(`eve-sbx-tpl`, i.prewarmInput.templateKey, i.optionsHash), _ = `${u}.${randomUUID()}.tmp`, v = createProviderName(`eve-sbx-tpl-tmp`, `${i.prewarmInput.templateKey}:${randomUUID()}`); await removeSnapshotIfExists(a, h), await rm(_, { force: !0, recursive: !0 }), await mkdir(_, { recursive: !0 }), i.prewarmInput.log?.(`creating template VM from image "${i.options.image}"`); let y = await createPreparedMicrosandbox({ log: i.prewarmInput.log, module: a, name: v, networkPolicy: i.options.networkPolicy, options: i.options, sessionKey: i.prewarmInput.templateKey, setupBaseRuntime: !0, tags: void 0 }), b = buildSandboxSession(createMicrosandboxInternalSession(y), async (e) => { await y.setNetworkPolicy(e); }); try { i.prewarmInput.bootstrap !== void 0 && (i.prewarmInput.log?.(`running sandbox bootstrap`), await i.prewarmInput.bootstrap({ use: async (e) => (e?.networkPolicy !== void 0 && await y.setNetworkPolicy(e.networkPolicy), createLoggingSandboxSession({ log: i.prewarmInput.log, session: b })) })), i.prewarmInput.seedFiles.length > 0 && i.prewarmInput.log?.(`writing ${i.prewarmInput.seedFiles.length} seed file(s)`), await writeSandboxSeedFiles(b, i.prewarmInput.seedFiles), i.prewarmInput.log?.(`snapshotting template VM`), await y.stopAndSnapshot(h), await writeTemplateMetadata(resolveMicrosandboxMetadataPath(_), { optionsHash: i.optionsHash, snapshotName: h, version: 2 }), await mkdir(dirname(u), { recursive: !0 }), await rm(u, { force: !0, recursive: !0 }); try { await rename(_, u); } catch (e) { if (await doesPathExist(u)) return { reused: !0 }; throw e; } } finally { await y.removePersisted(), await rm(_, { force: !0, recursive: !0 }).catch(() => {}); } return { reused: !1 }; } async function createMicrosandboxHandle(e) { let t = await loadMicrosandboxModule({ appRoot: e.createInput.runtimeContext.appRoot, options: e.options }), n = resolveSandboxCacheDirectory(e.createInput.runtimeContext.appRoot), r = resolveMicrosandboxSessionRootPath(n, e.createInput.sessionKey), a = createActiveMicrosandboxSessionKey(r, e.optionsHash), o = activeMicrosandboxSessionHandles.get(a); if (o !== void 0) return o; let s = resolveMicrosandboxMetadataPath(r), c = readSessionMetadataRecord(e.createInput.existingMetadata) ?? await readSessionMetadata(s), l = withDevelopmentSandboxMetadataPathTag(e.createInput.tags, s); if (c?.optionsHash === e.optionsHash && (await sandboxExists(t, c.sandboxName) || c.stateSnapshotName !== void 0 && await snapshotExists(t, c.stateSnapshotName))) { let n = await connectMicrosandbox({ metadata: c, metadataPath: s, module: t, options: e.options, sessionKey: e.createInput.sessionKey, tags: l }); if (n !== null) return cacheHandle(a, createHandle$1(n, e.backendName, e.optionsHash, () => { activeMicrosandboxSessionHandles.delete(a); })); } let d = null; if (e.createInput.templateKey !== null) { let r = await readTemplateMetadata(resolveMicrosandboxMetadataPath(resolveMicrosandboxTemplateRootPath(n, e.createInput.templateKey))); if (r === null || r.optionsHash !== e.optionsHash || !await snapshotExists(t, r.snapshotName)) throw new SandboxTemplateNotProvisionedError({ backendName: e.backendName, templateKey: e.createInput.templateKey }); d = r.snapshotName; } let m = createProviderName(`eve-sbx-ses`, `${e.createInput.sessionKey}:${randomUUID()}`), g; try { g = await createPreparedMicrosandbox({ fromSnapshot: d ?? void 0, module: t, name: m, networkPolicy: e.options.networkPolicy, options: e.options, sessionKey: e.createInput.sessionKey, setupBaseRuntime: d === null, tags: l }); } catch (t) { throw d !== null && e.createInput.templateKey !== null && isMicrosandboxNotFoundError(t) ? new SandboxTemplateNotProvisionedError({ backendName: e.backendName, templateKey: e.createInput.templateKey }) : t; } return await g.writeMetadata(s, e.optionsHash), cacheHandle(a, createHandle$1(g, e.backendName, e.optionsHash, () => { activeMicrosandboxSessionHandles.delete(a); })); } function createHandle$1(e, t, n, r) { return { session: buildSandboxSession(createMicrosandboxInternalSession(e), async (t) => { await e.setNetworkPolicy(t); }), useSessionFn: async (t) => (t?.networkPolicy !== void 0 && await e.setNetworkPolicy(t.networkPolicy), buildSandboxSession(createMicrosandboxInternalSession(e), async (t) => { await e.setNetworkPolicy(t); })), async captureState() { return { backendName: t, metadata: { ...await e.captureState(n) }, sessionKey: e.id }; }, async dispose() { r?.(), await e.detach(); } }; } function createMicrosandboxInternalSession(e) { return createFileBackedInternalSandboxSession({ id: e.id, sandbox: e }); } function createActiveMicrosandboxSessionKey(e, t) { return `${e}\0${t}`; } function cacheHandle(e, t) { return activeMicrosandboxSessionHandles.set(e, t), t; } //#endregion //#region node_modules/eve/dist/src/execution/sandbox/bindings/microsandbox.js const MICROSANDBOX_BACKEND_NAME = `microsandbox`; function createMicrosandboxSandboxBackend(t = {}) { let n = resolveMicrosandboxOptions(t.createOptions), r = createStableHash$1(JSON.stringify(microsandboxOptionsForHash(n))).slice(0, 20); return { name: MICROSANDBOX_BACKEND_NAME, async prewarm(e) { try { return await prewarmMicrosandboxTemplate({ backendName: MICROSANDBOX_BACKEND_NAME, options: n, optionsHash: r, prewarmInput: e }); } catch (t) { throw enrichMicrosandboxError({ context: `Failed to prewarm microsandbox template "${e.templateKey}"`, error: t }); } }, async create(e) { return await createMicrosandboxHandle({ backendName: MICROSANDBOX_BACKEND_NAME, createInput: e, options: n, optionsHash: r }); } }; } //#endregion //#region node_modules/eve/dist/src/public/sandbox/backends/docker.js function docker(e) { return createDockerSandboxBackend({ createOptions: e }); } //#endregion //#region node_modules/eve/dist/src/public/sandbox/backends/just-bash.js function justbash(e) { return createJustBashSandboxBackend({ createOptions: e }); } //#endregion //#region node_modules/eve/dist/src/public/sandbox/backends/microsandbox.js function microsandbox(e) { return createMicrosandboxSandboxBackend({ createOptions: e }); } //#endregion //#region node_modules/eve/dist/src/execution/sandbox/bindings/vercel-base-runtime.js async function ensureVercelSandboxBaseRuntime(t) { await runSandboxBootstrapStep(t, { failureMessage: `Failed to initialize Vercel sandbox base runtime.`, script: buildDockerBaseSetupScript() }); } async function applyInitialVercelNetworkPolicy(e, t) { t !== void 0 && await e.update({ networkPolicy: t }); } async function runSandboxBootstrapStep(e, t) { let n = await runBootstrapCommand(e, t.script); if (n === null) return; let r = await runBootstrapCommandWithSudo(e, t.script); if (r === null) return; let i = [n, r].filter(Boolean).join(` `); throw Error(`${t.failureMessage}${i ? `\n${i}` : ``}`); } async function runBootstrapCommand(e, t) { return await readBootstrapFailure(await e.runCommand({ args: [`-lc`, t], cmd: `bash` })); } async function runBootstrapCommandWithSudo(e, t) { return await readBootstrapFailure(await e.runCommand({ args: [ `-n`, `bash`, `-lc`, t ], cmd: `sudo` })); } async function readBootstrapFailure(e) { if (e.exitCode === 0) return null; let t = await e.stdout(), n = await e.stderr(); return [t.trim(), n.trim()].filter(Boolean).join(` `); } //#endregion //#region node_modules/eve/dist/src/execution/sandbox/bindings/vercel-create-sdk.js async function createVercelEveImageSandbox(e) { let t = { ...e.createOptions, __image: VERCEL_EVE_SANDBOX_IMAGE }; return await e.sandboxModule.Sandbox.create(t); } const VERCEL_EVE_SANDBOX_IMAGE = `vercel/eve:latest`; //#endregion //#region node_modules/eve/dist/src/execution/sandbox/bindings/vercel-errors.js function isVercelSnapshotUnavailableError(e) { for (let t of walkErrorChain$1(e)) if ((t.response?.status ?? t.status ?? t.statusCode) === 410) return !0; return !1; } function isVercelSandboxMissingError(e) { for (let t of walkErrorChain$1(e)) if ((t.response?.status ?? t.status ?? t.statusCode) === 404) return !0; return !1; } function* walkErrorChain$1(e) { let t = e, n = /* @__PURE__ */ new Set(); for (; t != null && !n.has(t);) n.add(t), yield t, t = t.cause; } //#endregion //#region node_modules/eve/dist/src/compiled/@vercel/oidc/index.js var t$6 = Object.create; var n$7 = Object.defineProperty; var r$10 = Object.getOwnPropertyDescriptor; var i$8 = Object.getOwnPropertyNames; var a$7 = Object.getPrototypeOf; var o$7 = Object.prototype.hasOwnProperty; var s$5 = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t.exports); var c$6 = (e, t, a, s) => { if (t && typeof t == `object` || typeof t == `function`) for (var c = i$8(t), l = 0, u = c.length, d; l < u; l++) d = c[l], !o$7.call(e, d) && d !== a && n$7(e, d, { get: ((e) => t[e]).bind(null, d), enumerable: !(s = r$10(t, d)) || s.enumerable }); return e; }; var l$5 = (e, r, i) => (i = e == null ? {} : t$6(a$7(e)), c$6(r || !e || !e.__esModule ? n$7(i, `default`, { value: e, enumerable: !0 }) : i, e)); var u$7 = createRequire(import.meta.url); var d$7 = s$5(((e, t) => { var n = Object.defineProperty, r = Object.getOwnPropertyDescriptor, i = Object.getOwnPropertyNames, a = Object.prototype.hasOwnProperty, o = (e, t) => { for (var r in t) n(e, r, { get: t[r], enumerable: !0 }); }, s = (e, t, o, s) => { if (t && typeof t == `object` || typeof t == `function`) for (let c of i(t)) !a.call(e, c) && c !== o && n(e, c, { get: () => t[c], enumerable: !(s = r(t, c)) || s.enumerable }); return e; }, c = (e) => s(n({}, `__esModule`, { value: !0 }), e), l = {}; o(l, { SYMBOL_FOR_REQ_CONTEXT: () => u, getContext: () => d }), t.exports = c(l); let u = Symbol.for(`@vercel/request-context`); function d() { return globalThis[u]?.get?.() ?? {}; } })); var f$6 = s$5(((e, t) => { var n = Object.defineProperty, r = Object.getOwnPropertyDescriptor, i = Object.getOwnPropertyNames, a = Object.prototype.hasOwnProperty, o = (e, t) => { for (var r in t) n(e, r, { get: t[r], enumerable: !0 }); }, s = (e, t, o, s) => { if (t && typeof t == `object` || typeof t == `function`) for (let c of i(t)) !a.call(e, c) && c !== o && n(e, c, { get: () => t[c], enumerable: !(s = r(t, c)) || s.enumerable }); return e; }, c = (e) => s(n({}, `__esModule`, { value: !0 }), e), l = {}; o(l, { getVercelOidcTokenSync: () => f }), t.exports = c(l); var u = d$7(); function f() { let e = (0, u.getContext)().headers?.[`x-vercel-oidc-token`] ?? process.env.VERCEL_OIDC_TOKEN; if (!e) throw Error(`The 'x-vercel-oidc-token' header is missing from the request.`); return e; } })); var p$9 = s$5(((e, t) => { var n = Object.defineProperty, r = Object.getOwnPropertyDescriptor, i = Object.getOwnPropertyNames, a = Object.prototype.hasOwnProperty, o = (e, t) => { for (var r in t) n(e, r, { get: t[r], enumerable: !0 }); }, s = (e, t, o, s) => { if (t && typeof t == `object` || typeof t == `function`) for (let c of i(t)) !a.call(e, c) && c !== o && n(e, c, { get: () => t[c], enumerable: !(s = r(t, c)) || s.enumerable }); return e; }, c = (e) => s(n({}, `__esModule`, { value: !0 }), e), l = {}; o(l, { VercelOidcTokenError: () => u }), t.exports = c(l); var u = class extends Error { constructor(e, t) { super(e), this.name = `VercelOidcTokenError`, this.cause = t; } toString() { return this.cause ? `${this.name}: ${this.message}: ${this.cause}` : `${this.name}: ${this.message}`; } }; })); var m$6 = s$5(((e, t) => { var n = Object.create, r = Object.defineProperty, i = Object.getOwnPropertyDescriptor, a = Object.getOwnPropertyNames, o = Object.getPrototypeOf, s = Object.prototype.hasOwnProperty, c = (e, t) => { for (var n in t) r(e, n, { get: t[n], enumerable: !0 }); }, l = (e, t, n, o) => { if (t && typeof t == `object` || typeof t == `function`) for (let c of a(t)) !s.call(e, c) && c !== n && r(e, c, { get: () => t[c], enumerable: !(o = i(t, c)) || o.enumerable }); return e; }, d = (e, t, i) => (i = e == null ? {} : n(o(e)), l(t || !e || !e.__esModule ? r(i, `default`, { value: e, enumerable: !0 }) : i, e)), f = (e) => l(r({}, `__esModule`, { value: !0 }), e), m = {}; c(m, { findRootDir: () => y, getUserDataDir: () => b }), t.exports = f(m); var h = d(u$7(`path`)), g = d(u$7(`fs`)), _ = d(u$7(`os`)), v = p$9(); function y() { try { let e = process.cwd(); for (; e !== h.default.dirname(e);) { let t = h.default.join(e, `.vercel`); if (g.default.existsSync(t)) return e; e = h.default.dirname(e); } } catch { throw new v.VercelOidcTokenError(`Token refresh only supported in node server environments`); } return null; } function b() { if (process.env.XDG_DATA_HOME) return process.env.XDG_DATA_HOME; switch (_.default.platform()) { case `darwin`: return h.default.join(_.default.homedir(), `Library/Application Support`); case `linux`: return h.default.join(_.default.homedir(), `.local/share`); case `win32`: return process.env.LOCALAPPDATA ? process.env.LOCALAPPDATA : null; default: return null; } } })); var h$7 = s$5(((e, t) => { var n = Object.create, r = Object.defineProperty, i = Object.getOwnPropertyDescriptor, a = Object.getOwnPropertyNames, o = Object.getPrototypeOf, s = Object.prototype.hasOwnProperty, c = (e, t) => { for (var n in t) r(e, n, { get: t[n], enumerable: !0 }); }, l = (e, t, n, o) => { if (t && typeof t == `object` || typeof t == `function`) for (let c of a(t)) !s.call(e, c) && c !== n && r(e, c, { get: () => t[c], enumerable: !(o = i(t, c)) || o.enumerable }); return e; }, d = (e, t, i) => (i = e == null ? {} : n(o(e)), l(t || !e || !e.__esModule ? r(i, `default`, { value: e, enumerable: !0 }) : i, e)), f = (e) => l(r({}, `__esModule`, { value: !0 }), e), p = {}; c(p, { isValidAccessToken: () => x, readAuthConfig: () => y, writeAuthConfig: () => b }), t.exports = f(p); var m = d(u$7(`fs`)), h = d(u$7(`path`)), g = v$6(); function _() { let e = (0, g.getVercelDataDir)(); if (!e) throw Error(`Unable to find Vercel CLI data directory. Your platform: ${process.platform}. Supported: darwin, linux, win32.`); return h.join(e, `auth.json`); } function y() { try { let e = _(); if (!m.existsSync(e)) return null; let t = m.readFileSync(e, `utf8`); return t ? JSON.parse(t) : null; } catch { return null; } } function b(e) { let t = _(), n = h.dirname(t); m.existsSync(n) || m.mkdirSync(n, { mode: 504, recursive: !0 }), m.writeFileSync(t, JSON.stringify(e, null, 2), { mode: 384 }); } function x(e, t = 0) { if (!e.token) return !1; if (typeof e.expiresAt != `number`) return !0; let n = Math.floor(Date.now() / 1e3), r = t / 1e3; return e.expiresAt >= n + r; } })); var g$6 = s$5(((e, t) => { var n = Object.defineProperty, r = Object.getOwnPropertyDescriptor, i = Object.getOwnPropertyNames, a = Object.prototype.hasOwnProperty, o = (e, t) => { for (var r in t) n(e, r, { get: t[r], enumerable: !0 }); }, s = (e, t, o, s) => { if (t && typeof t == `object` || typeof t == `function`) for (let c of i(t)) !a.call(e, c) && c !== o && n(e, c, { get: () => t[c], enumerable: !(s = r(t, c)) || s.enumerable }); return e; }, c = (e) => s(n({}, `__esModule`, { value: !0 }), e), l = {}; o(l, { processTokenResponse: () => g, refreshTokenRequest: () => h }), t.exports = c(l); var d = u$7(`os`); let f = `@vercel/oidc node-${process.version} ${(0, d.platform)()} (${(0, d.arch)()}) ${(0, d.hostname)()}`, p = null; async function m() { if (p) return p; let e = await fetch(`https://vercel.com/.well-known/openid-configuration`, { headers: { "user-agent": f } }); if (!e.ok) throw Error(`Failed to discover OAuth endpoints`); let t = await e.json(); if (!t || typeof t.token_endpoint != `string`) throw Error(`Invalid OAuth discovery response`); let n = t.token_endpoint; return p = n, n; } async function h(e) { let t = await m(); return await fetch(t, { method: `POST`, headers: { "Content-Type": `application/x-www-form-urlencoded`, "user-agent": f }, body: new URLSearchParams({ client_id: `cl_HYyOPBNtFMfHhaUn9L4QPfTZz6TP47bp`, grant_type: `refresh_token`, ...e }) }); } async function g(e) { let t = await e.json(); if (!e.ok) { let e = typeof t == `object` && t && `error` in t ? String(t.error) : `Token refresh failed`; return [Error(e)]; } return typeof t != `object` || !t ? [Error(`Invalid token response`)] : typeof t.access_token == `string` ? t.token_type === `Bearer` ? typeof t.expires_in == `number` ? [null, t] : [Error(`Missing expires_in in response`)] : [Error(`Invalid token_type in response`)] : [Error(`Missing access_token in response`)]; } })); var _$5 = s$5(((e, t) => { var n = Object.defineProperty, r = Object.getOwnPropertyDescriptor, i = Object.getOwnPropertyNames, a = Object.prototype.hasOwnProperty, o = (e, t) => { for (var r in t) n(e, r, { get: t[r], enumerable: !0 }); }, s = (e, t, o, s) => { if (t && typeof t == `object` || typeof t == `function`) for (let c of i(t)) !a.call(e, c) && c !== o && n(e, c, { get: () => t[c], enumerable: !(s = r(t, c)) || s.enumerable }); return e; }, c = (e) => s(n({}, `__esModule`, { value: !0 }), e), l = {}; o(l, { AccessTokenMissingError: () => u, RefreshAccessTokenFailedError: () => d }), t.exports = c(l); var u = class extends Error { constructor() { super(`No authentication found. Please log in with the Vercel CLI (vercel login).`), this.name = `AccessTokenMissingError`; } }, d = class extends Error { constructor(e) { super(`Failed to refresh authentication token.`, { cause: e }), this.name = `RefreshAccessTokenFailedError`; } }; })); var v$6 = s$5(((e, t) => { var n = Object.create, r = Object.defineProperty, i = Object.getOwnPropertyDescriptor, a = Object.getOwnPropertyNames, o = Object.getPrototypeOf, s = Object.prototype.hasOwnProperty, c = (e, t) => { for (var n in t) r(e, n, { get: t[n], enumerable: !0 }); }, l = (e, t, n, o) => { if (t && typeof t == `object` || typeof t == `function`) for (let c of a(t)) !s.call(e, c) && c !== n && r(e, c, { get: () => t[c], enumerable: !(o = i(t, c)) || o.enumerable }); return e; }, d = (e, t, i) => (i = e == null ? {} : n(o(e)), l(t || !e || !e.__esModule ? r(i, `default`, { value: e, enumerable: !0 }) : i, e)), f = (e) => l(r({}, `__esModule`, { value: !0 }), e), v = {}; c(v, { assertVercelOidcTokenResponse: () => k, findProjectInfo: () => A, getTokenPayload: () => N, getVercelDataDir: () => E, getVercelOidcToken: () => O, getVercelToken: () => D, isExpired: () => P, loadToken: () => M, saveToken: () => j }), t.exports = f(v); var y = d(u$7(`path`)), b = d(u$7(`fs`)), x = p$9(), S = m$6(), C = h$7(), w = g$6(), T = _$5(); function E() { let e = (0, S.getUserDataDir)(); return e ? y.join(e, `com.vercel.cli`) : null; } async function D(e) { let t = (0, C.readAuthConfig)(); if (!t?.token) throw new T.AccessTokenMissingError(); if ((0, C.isValidAccessToken)(t, e?.expirationBufferMs)) return t.token; if (!t.refreshToken) throw (0, C.writeAuthConfig)({}), new T.RefreshAccessTokenFailedError(`No refresh token available`); try { let e = await (0, w.refreshTokenRequest)({ refresh_token: t.refreshToken }), [n, r] = await (0, w.processTokenResponse)(e); if (n || !r) throw (0, C.writeAuthConfig)({}), new T.RefreshAccessTokenFailedError(n); let i = { token: r.access_token, expiresAt: Math.floor(Date.now() / 1e3) + r.expires_in }; return r.refresh_token && (i.refreshToken = r.refresh_token), (0, C.writeAuthConfig)(i), i.token; } catch (e) { throw (0, C.writeAuthConfig)({}), e instanceof T.AccessTokenMissingError || e instanceof T.RefreshAccessTokenFailedError ? e : new T.RefreshAccessTokenFailedError(e); } } async function O(e, t, n) { let r = `https://api.vercel.com/v1/projects/${t}/token?source=vercel-oidc-refresh${n ? `&teamId=${n}` : ``}`, i = await fetch(r, { method: `POST`, headers: { Authorization: `Bearer ${e}` } }); if (!i.ok) throw new x.VercelOidcTokenError(`Failed to refresh OIDC token: ${i.statusText}`); let a = await i.json(); return k(a), a; } function k(e) { if (!e || typeof e != `object`) throw TypeError("Vercel OIDC token is malformed. Expected an object. Please run `vc env pull` and try again"); if (!(`token` in e) || typeof e.token != `string`) throw TypeError("Vercel OIDC token is malformed. Expected a string-valued token property. Please run `vc env pull` and try again"); } function A() { let e = (0, S.findRootDir)(); if (!e) throw new x.VercelOidcTokenError("Unable to find project root directory. Have you linked your project with `vc link?`"); let t = y.join(e, `.vercel`, `project.json`); if (!b.existsSync(t)) throw new x.VercelOidcTokenError("project.json not found, have you linked your project with `vc link?`"); let n = JSON.parse(b.readFileSync(t, `utf8`)); if (typeof n.projectId != `string` && typeof n.orgId != `string`) throw TypeError("Expected a string-valued projectId property. Try running `vc link` to re-link your project."); return { projectId: n.projectId, teamId: n.orgId }; } function j(e, t) { let n = (0, S.getUserDataDir)(); if (!n) throw new x.VercelOidcTokenError(`Unable to find user data directory. Please reach out to Vercel support.`); let r = y.join(n, `com.vercel.token`, `${t}.json`), i = JSON.stringify(e); b.mkdirSync(y.dirname(r), { mode: 504, recursive: !0 }), b.writeFileSync(r, i), b.chmodSync(r, 432); } function M(e) { let t = (0, S.getUserDataDir)(); if (!t) throw new x.VercelOidcTokenError(`Unable to find user data directory. Please reach out to Vercel support.`); let n = y.join(t, `com.vercel.token`, `${e}.json`); if (!b.existsSync(n)) return null; let r = JSON.parse(b.readFileSync(n, `utf8`)); return k(r), r; } function N(e) { let t = e.split(`.`); if (t.length !== 3) throw new x.VercelOidcTokenError("Invalid token. Please run `vc env pull` and try again"); let n = t[1].replace(/-/g, `+`).replace(/_/g, `/`), r = n.padEnd(n.length + (4 - n.length % 4) % 4, `=`); return JSON.parse(Buffer.from(r, `base64`).toString(`utf8`)); } function P(e, t = 0) { return e.exp * 1e3 < Date.now() + t; } })); var y$4 = s$5(((e, t) => { var n = Object.defineProperty, r = Object.getOwnPropertyDescriptor, i = Object.getOwnPropertyNames, a = Object.prototype.hasOwnProperty, o = (e, t) => { for (var r in t) n(e, r, { get: t[r], enumerable: !0 }); }, s = (e, t, o, s) => { if (t && typeof t == `object` || typeof t == `function`) for (let c of i(t)) !a.call(e, c) && c !== o && n(e, c, { get: () => t[c], enumerable: !(s = r(t, c)) || s.enumerable }); return e; }, c = (e) => s(n({}, `__esModule`, { value: !0 }), e), l = {}; o(l, { refreshToken: () => f }), t.exports = c(l); var u = p$9(), d = v$6(); async function f(e) { let t = e?.project, n = e?.team; if (!t && !n) { let e = (0, d.findProjectInfo)(); t = e.projectId, n = e.teamId; } else if (!t || !n) { let e = (0, d.findProjectInfo)(); t ??= e.projectId, n ??= e.teamId; } if (!t) throw new u.VercelOidcTokenError("Failed to refresh OIDC token: No project specified. Try re-linking your project with `vc link`"); let r = (0, d.loadToken)(t); if (!r || (0, d.isExpired)((0, d.getTokenPayload)(r.token), e?.expirationBufferMs)) { let i = await (0, d.getVercelToken)({ expirationBufferMs: e?.expirationBufferMs }); if (r = await (0, d.getVercelOidcToken)(i, t, n), !r) throw new u.VercelOidcTokenError(`Failed to refresh OIDC token`); (0, d.saveToken)(r, t); } process.env.VERCEL_OIDC_TOKEN = r.token; } })); var b$6 = s$5(((e, t) => { var n = Object.defineProperty, r = Object.getOwnPropertyDescriptor, i = Object.getOwnPropertyNames, a = Object.prototype.hasOwnProperty, o = (e, t) => { for (var r in t) n(e, r, { get: t[r], enumerable: !0 }); }, s = (e, t, o, s) => { if (t && typeof t == `object` || typeof t == `function`) for (let c of i(t)) !a.call(e, c) && c !== o && n(e, c, { get: () => t[c], enumerable: !(s = r(t, c)) || s.enumerable }); return e; }, c = (e) => s(n({}, `__esModule`, { value: !0 }), e), u = {}; o(u, { getVercelOidcToken: () => h }), t.exports = c(u); var d = f$6(), m = p$9(); async function h(e) { let t = ``, n; try { t = (0, d.getVercelOidcTokenSync)(); } catch (e) { n = e; } try { let [{ getTokenPayload: n, isExpired: r }, { refreshToken: i }] = await Promise.all([await Promise.resolve().then(() => l$5(v$6())), await Promise.resolve().then(() => l$5(y$4()))]); (!t || r(n(t), e?.expirationBufferMs)) && (await i(e), t = (0, d.getVercelOidcTokenSync)()); } catch (e) { let t = n instanceof Error ? n.message : ``; throw e instanceof Error && (t = `${t} ${e.message}`), t ? new m.VercelOidcTokenError(t) : e; } return t; } })); var x$6 = s$5(((e, t) => { var n = Object.defineProperty, r = Object.getOwnPropertyDescriptor, i = Object.getOwnPropertyNames, a = Object.prototype.hasOwnProperty, o = (e, t) => { for (var r in t) n(e, r, { get: t[r], enumerable: !0 }); }, s = (e, t, o, s) => { if (t && typeof t == `object` || typeof t == `function`) for (let c of i(t)) !a.call(e, c) && c !== o && n(e, c, { get: () => t[c], enumerable: !(s = r(t, c)) || s.enumerable }); return e; }, c = (e) => s(n({}, `__esModule`, { value: !0 }), e), l = {}; o(l, { AccessTokenMissingError: () => h.AccessTokenMissingError, RefreshAccessTokenFailedError: () => h.RefreshAccessTokenFailedError, getContext: () => m.getContext, getVercelOidcToken: () => u.getVercelOidcToken, getVercelOidcTokenSync: () => p.getVercelOidcTokenSync, getVercelToken: () => g.getVercelToken }), t.exports = c(l); var u = b$6(), p = f$6(), m = d$7(), h = _$5(), g = v$6(); }))(); var S$7 = x$6.AccessTokenMissingError; var C$7 = x$6.RefreshAccessTokenFailedError; var w$7 = x$6.getContext; var T$7 = x$6.getVercelOidcToken; var E$7 = x$6.getVercelOidcTokenSync; var D$6 = x$6.getVercelToken; //#endregion //#region node_modules/eve/dist/src/execution/sandbox/bindings/vercel-credentials.js function getVercelSandboxFetch(e) { return e.fetch ?? globalThis.fetch; } async function getVercelSandboxCredentials(t) { let n = readNonEmptyString(t, `teamId`) ?? readNonEmptyEnvironmentVariable(`VERCEL_TEAM_ID`) ?? readNonEmptyEnvironmentVariable(`VERCEL_ORG_ID`), r = readNonEmptyString(t, `projectId`) ?? readNonEmptyEnvironmentVariable(`VERCEL_PROJECT_ID`), i = readNonEmptyString(t, `token`) ?? readNonEmptyEnvironmentVariable(`VERCEL_OIDC_TOKEN`) ?? readNonEmptyEnvironmentVariable(`VERCEL_TOKEN`); return i && n && r ? { projectId: r, teamId: n, token: i } : getVercelSandboxCredentialsFromOidcToken(await T$7({ project: r, team: n })); } function readNonEmptyString(e, t) { let n = e[t]; return typeof n == `string` && n.trim().length > 0 ? n.trim() : void 0; } function readNonEmptyEnvironmentVariable(e) { let t = process.env[e]; return typeof t == `string` && t.trim().length > 0 ? t.trim() : void 0; } function getVercelSandboxCredentialsFromOidcToken(e) { let t = e.split(`.`)[1]; if (t === void 0) throw Error(`Invalid Vercel OIDC token: missing payload.`); let n = JSON.parse(Buffer.from(base64UrlToBase64(t), `base64`).toString(`utf8`)), r = typeof n.owner_id == `string` ? n.owner_id : void 0, i = typeof n.project_id == `string` ? n.project_id : void 0; if (r === void 0 || i === void 0) throw Error(`Invalid Vercel OIDC token: missing owner_id or project_id.`); return { projectId: i, teamId: r, token: e }; } function base64UrlToBase64(e) { let t = e.replace(/-/g, `+`).replace(/_/g, `/`); return t.padEnd(Math.ceil(t.length / 4) * 4, `=`); } //#endregion //#region node_modules/eve/dist/src/execution/sandbox/bindings/vercel-lookup.js async function getNamedVercelSandbox(e) { try { return await e.sandboxModule.Sandbox.get(await getVercelSandboxGetOptions(e)); } catch (t) { if (isSandboxMissingError(t)) return null; throw Error(`Failed to look up Vercel sandbox "${e.sandboxName}": ${errorMessage$1(t)}`, { cause: t }); } } async function getVercelSandboxGetOptions(n) { let r = { name: n.sandboxName, resume: !1 }; try { let i = await getVercelSandboxCredentials(n.createOptions); return { ...r, ...i, fetch: getVercelSandboxFetch(n.createOptions), signal: n.createOptions.signal }; } catch { return r; } } function isSandboxMissingError(e) { return e instanceof Error ? (e.response?.status ?? e.cause?.response?.status) === 404 : !1; } function errorMessage$1(e) { if (e instanceof Error) { let t = e.json, n = e.text, r = typeof n == `string` && n.length > 0 ? n : t === void 0 ? void 0 : JSON.stringify(t); return r === void 0 ? e.message : `${e.message}: ${r}`; } return String(e); } //#endregion //#region node_modules/eve/dist/src/execution/sandbox/bindings/vercel-read-stream.js function normalizeVercelReadStream(t) { if (t === null || isWebReadableStream(t)) return t; if (t instanceof Readable) return Readable.toWeb(t); throw TypeError(`Vercel Sandbox returned an unsupported file stream.`); } function isWebReadableStream(e) { return `getReader` in e && typeof e.getReader == `function`; } //#endregion //#region node_modules/eve/dist/src/execution/sandbox/bindings/vercel.js function createVercelSandbox(e = {}) { let t = e.loadSandboxModule ?? (async () => await Promise.resolve().then(() => sandbox_exports)), n = { timeout: DEFAULT_SANDBOX_TIMEOUT_MS, ...e.createOptions }, r = e.createSandbox ?? createVercelEveImageSandbox, a = /* @__PURE__ */ new Map(); return { name: `vercel`, async create(e) { let o = resolveVercelSandboxTags(n.tags, e.tags), l = e.templateKey === null ? null : await readTemplateForCreate({ createOptions: n, loadSandboxModule: t, prewarmedTemplates: a, templateKey: e.templateKey }), u = await t(), d; try { d = await ensureSession({ createOptions: n, createSandbox: r, existingMetadata: e.existingMetadata, sandboxModule: u, sessionKey: e.sessionKey, snapshotId: l?.snapshotId, tags: o }); } catch (t) { throw l !== null && (isVercelSnapshotUnavailableError(t) || isVercelSandboxMissingError(t)) ? (a.delete(l.templateKey), await (await getNamedVercelSandbox({ createOptions: n, sandboxModule: u, sandboxName: l.sandboxName }))?.delete(), new SandboxTemplateNotProvisionedError({ backendName: `vercel`, templateKey: l.templateKey })) : Error(`Failed to create sandbox session "${e.sessionKey}": ${errorMessage(t)}`, { cause: t }); } return l === null && d.created && (await ensureVercelSandboxBaseRuntime(d.sandbox), await applyInitialVercelNetworkPolicy(d.sandbox, n.networkPolicy)), createHandle(d.sandbox, e.sessionKey); }, async prewarm(e) { let i; try { i = await ensureTemplateWithUnavailableRetry({ bootstrap: e.bootstrap, createOptions: n, createSandbox: r, loadSandboxModule: t, log: e.log, seedFiles: e.seedFiles, templateKey: e.templateKey }); } catch (t) { throw Error(`Failed to prewarm Vercel sandbox template "${e.templateKey}": ${errorMessage(t)}`, { cause: t }); } return a.set(e.templateKey, i.template), { reused: i.reused }; } }; } async function ensureTemplateWithUnavailableRetry(e) { try { return await ensureTemplate(e); } catch (t) { if (!isVercelSnapshotUnavailableError(t) && !isVercelSandboxMissingError(t)) throw t; return e.log?.(`cached template disappeared; rebuilding sandbox template`), await ensureTemplate(e); } } async function readTemplate(e) { let t = e.prewarmedTemplates.get(e.templateKey); if (t !== void 0) return t; let n = await e.loadSandboxModule(), r = await getNamedVercelSandbox({ createOptions: e.createOptions, sandboxModule: n, sandboxName: e.templateKey }); if (r === null || typeof r.currentSnapshotId != `string`) throw new SandboxTemplateNotProvisionedError({ backendName: `vercel`, templateKey: e.templateKey }); return { sandboxName: r.name, snapshotId: r.currentSnapshotId, templateKey: e.templateKey }; } async function readTemplateForCreate(e) { try { return await readTemplate(e); } catch (t) { throw SandboxTemplateNotProvisionedError.is(t) ? t : Error(`Failed to read sandbox template "${e.templateKey}": ${errorMessage(t)}`, { cause: t }); } } async function ensureTemplate(e) { let t = await e.loadSandboxModule(), i = await getNamedVercelSandbox({ createOptions: e.createOptions, sandboxModule: t, sandboxName: e.templateKey }), a = resolveVercelSandboxTags(e.createOptions.tags, e.tags), o = extractAuthorSnapshotId(e.createOptions); if (i !== null && isUnprovisionedTerminalTemplateSandbox(i, o) && (await i.delete(), i = null), i === null ? i = await e.createSandbox({ sandboxModule: t, createOptions: withBaseSetupNetworkPolicy({ ...e.createOptions, name: e.templateKey, persistent: !1, tags: a }) }) : await ensureVercelSandboxTags(i, a), typeof i.currentSnapshotId == `string` && i.currentSnapshotId.length > 0 && i.currentSnapshotId !== o) return { reused: !0, template: { sandboxName: i.name, snapshotId: i.currentSnapshotId, templateKey: e.templateKey } }; e.log?.(`preparing base runtime inside sandbox`), await ensureVercelSandboxBaseRuntime(i), await applyInitialVercelNetworkPolicy(i, e.createOptions.networkPolicy); let s = buildSandboxSession(createVercelInternalSandboxSession(i, e.templateKey), createVercelNetworkPolicySetter(i)); e.bootstrap !== void 0 && (e.log?.(`running sandbox bootstrap`), await e.bootstrap({ use: async (t) => (t !== void 0 && await i.update(t), createLoggingSandboxSession({ log: e.log, session: s })) })); for (let t of e.seedFiles) typeof t.content == `string` ? await s.writeTextFile({ content: t.content, path: t.path }) : await s.writeBinaryFile({ content: t.content, path: t.path }); let c = await i.snapshot(); return { reused: !1, template: { sandboxName: i.name, snapshotId: c.snapshotId, templateKey: e.templateKey } }; } async function ensureSession(e) { let t = getVercelSandboxName(e.existingMetadata) ?? e.sessionKey, n = await getNamedVercelSandbox({ createOptions: e.createOptions, sandboxModule: e.sandboxModule, sandboxName: t }); if (n !== null) return await ensureVercelSandboxTags(n, e.tags), { created: !1, sandbox: n }; let r = createSessionCreateParams(e, t); return e.tags !== void 0 && (r.tags = e.tags), { created: !0, sandbox: await e.createSandbox({ createOptions: r, sandboxModule: e.sandboxModule }) }; } function createSessionCreateParams(e, t) { if (e.snapshotId === void 0) return withBaseSetupNetworkPolicy({ ...e.createOptions, name: t, persistent: !0 }); let { runtime: n, source: r, ...i } = e.createOptions; return { ...i, name: t, persistent: !0, source: { snapshotId: e.snapshotId, type: `snapshot` } }; } function withBaseSetupNetworkPolicy(e) { return { ...e, networkPolicy: `allow-all` }; } function createHandle(e, t) { return { session: buildSandboxSession(createVercelInternalSandboxSession(e, t), createVercelNetworkPolicySetter(e)), useSessionFn: async (n) => (n !== void 0 && await e.update(n), buildSandboxSession(createVercelInternalSandboxSession(e, t), createVercelNetworkPolicySetter(e))), async captureState() { return { backendName: `vercel`, metadata: { sandboxName: e.name }, sessionKey: t }; }, async dispose() {} }; } function createVercelNetworkPolicySetter(e) { return async (t) => { await e.update({ networkPolicy: t }); }; } function createVercelInternalSandboxSession(n, r) { return { id: r, resolvePath: resolveVercelSandboxPath, async spawn(t) { return adaptMultiplexedCommandToSandboxProcess({ command: await n.runCommand({ args: [`-lc`, t.command], cmd: `bash`, cwd: t.workingDirectory ?? WORKSPACE_ROOT$1, detached: !0, env: t.env, signal: t.abortSignal }), getOutput: (e) => e.stream }); }, async readFile(e) { return normalizeVercelReadStream(await n.readFile({ path: e.path })); }, async writeFile(e) { let r = await streamToBuffer(e.content); await n.writeFiles([{ content: r, path: e.path }]); }, async removePath(e) { await n.fs.rm(e.path, { force: e.force, recursive: e.recursive, signal: e.abortSignal }); } }; } function resolveVercelSandboxPath(t) { return t.startsWith(`/`) ? t : `${WORKSPACE_ROOT$1}/${t}`; } function isUnprovisionedTerminalTemplateSandbox(e, t) { let n = e.currentSnapshotId; return typeof n == `string` && n.length > 0 && n !== t ? !1 : e.status === `aborted` || e.status === `failed` || e.status === `stopped`; } function extractAuthorSnapshotId(e) { let t = e.source; if (t?.type === `snapshot` && typeof t.snapshotId == `string`) return t.snapshotId; } function getVercelSandboxName(e) { let t = e?.sandboxName; return typeof t == `string` ? t : void 0; } function resolveVercelSandboxTags(e, t) { let n = {}; if (e !== void 0) for (let [t, r] of Object.entries(e)) n[t] = r; if (t !== void 0) for (let [e, r] of Object.entries(t)) n[e] = r; let r = Object.keys(n).length; if (r !== 0) { if (r > VERCEL_SANDBOX_TAG_LIMIT) throw Error(`Vercel Sandbox supports at most ${VERCEL_SANDBOX_TAG_LIMIT} tags. eve reserves "agent", "channel", and "sessionId"; remove or consolidate custom tags passed to vercel().`); return n; } } async function ensureVercelSandboxTags(e, t) { t === void 0 || areVercelSandboxTagsEqual(e.tags, t) || await e.update({ tags: t }); } function areVercelSandboxTagsEqual(e, t) { let n = e ?? {}, r = Object.entries(n), i = Object.entries(t); return r.length === i.length ? i.every(([e, t]) => n[e] === t) : !1; } function errorMessage(e) { if (e instanceof Error) { let t = e.json, n = e.text, r = typeof n == `string` && n.length > 0 ? n : t === void 0 ? void 0 : JSON.stringify(t); return r === void 0 ? e.message : `${e.message}: ${r}`; } return String(e); } const DEFAULT_SANDBOX_TIMEOUT_MS = 1800 * 1e3; const VERCEL_SANDBOX_TAG_LIMIT = 5; //#endregion //#region node_modules/eve/dist/src/public/sandbox/backends/vercel.js function vercel(e) { return createVercelSandbox({ createOptions: e }); } //#endregion //#region node_modules/eve/dist/src/public/sandbox/backends/default.js const PRODUCTION_PROBES = { isDeployedOnVercel: () => !!process.env.VERCEL, isDockerAvailable: () => isDockerDaemonAvailableSync(), isMicrosandboxSupported: () => isMicrosandboxPlatformSupported() }; function defaultSandbox(t) { return lazyBackend(() => selectDefaultSandbox(t, PRODUCTION_PROBES)); } function selectDefaultSandbox(e, t) { return t.isDeployedOnVercel() ? vercel(e?.vercel) : t.isDockerAvailable() ? docker(e?.docker) : t.isMicrosandboxSupported() ? microsandbox(e?.microsandbox) : justbash(e?.justBash); } //#endregion //#region node_modules/eve/dist/src/runtime/resolve-sandbox.js async function resolveSandboxDefinition(n, i, a) { try { let t = expectObjectRecord(await loadResolvedModuleExport({ definition: n, kindLabel: `sandbox`, moduleMap: i, nodeId: a }), `Expected the sandbox export "${n.exportName ?? `default`}" from "${n.logicalPath}" to return an object.`); return { backend: resolveBackend(t.backend, n.logicalPath), bootstrap: t.bootstrap, description: n.description, exportName: n.exportName, logicalPath: n.logicalPath, onSession: t.onSession, revalidationKey: n.revalidationKey, sourceHash: n.sourceHash, sourceId: n.sourceId, sourceKind: `module` }; } catch (e) { throw e instanceof ResolveAgentError ? e : new ResolveAgentError(`Failed to attach the sandbox lifecycle handlers from "${n.logicalPath}": ${toErrorMessage(e)}`, { logicalPath: n.logicalPath, sourceId: n.sourceId }); } } function resolveBackend(e, t) { if (e === void 0) return defaultSandbox(); if (typeof e == `function`) return lazyBackend(e); if (typeof e != `object` || !e) throw new ResolveAgentError(`Sandbox "${t}" exposed a non-object "backend" field. Use docker(), vercel(), another factory that returns a SandboxBackend value, or a zero-arg callback returning one.`, { logicalPath: t }); let r = e; if (typeof r.name != `string` || r.name.length === 0) throw new ResolveAgentError(`Sandbox "${t}" backend is missing a non-empty string "name" identifier.`, { logicalPath: t }); if (typeof r.create != `function`) throw new ResolveAgentError(`Sandbox "${t}" backend is missing a "create" function.`, { logicalPath: t }); return r; } //#endregion //#region node_modules/eve/dist/src/runtime/resolve-dynamic-instructions.js async function resolveDynamicInstructionsDefinition(i, a, o) { try { let n = expectObjectRecord(expectObjectRecord(await loadResolvedModuleExport({ definition: i, kindLabel: `dynamic-instructions`, moduleMap: a, nodeId: o }), describe$3(i, `to return an object`)).events, describe$3(i, `to provide an events object`)), r = {}; for (let t of i.eventNames) r[t] = expectFunction(n[t], describe$3(i, `to provide a handler for event "${t}"`)); return { eventNames: [...i.eventNames], events: r, exportName: i.exportName, logicalPath: i.logicalPath, slug: i.slug, sourceId: i.sourceId, sourceKind: `module` }; } catch (e) { throw e instanceof ResolveAgentError ? e : new ResolveAgentError(`Failed to resolve dynamic instructions from "${i.logicalPath}": ${toErrorMessage(e)}`, { logicalPath: i.logicalPath, sourceId: i.sourceId }); } } function describe$3(e, t) { return `Expected the dynamic instructions export "${e.exportName ?? `default`}" from "${e.logicalPath}" ${t}.`; } //#endregion //#region node_modules/eve/dist/src/runtime/resolve-dynamic-skill.js async function resolveDynamicSkillDefinition(i, a, o) { try { let n = expectObjectRecord(expectObjectRecord(await loadResolvedModuleExport({ definition: i, kindLabel: `dynamic-skill`, moduleMap: a, nodeId: o }), describe$2(i, `to return an object`)).events, describe$2(i, `to provide an events object`)), r = {}; for (let t of i.eventNames) r[t] = expectFunction(n[t], describe$2(i, `to provide a handler for event "${t}"`)); return { eventNames: [...i.eventNames], events: r, exportName: i.exportName, logicalPath: i.logicalPath, slug: i.slug, sourceId: i.sourceId, sourceKind: `module` }; } catch (e) { throw e instanceof ResolveAgentError ? e : new ResolveAgentError(`Failed to resolve dynamic skill from "${i.logicalPath}": ${toErrorMessage(e)}`, { logicalPath: i.logicalPath, sourceId: i.sourceId }); } } function describe$2(e, t) { return `Expected the dynamic skill export "${e.exportName ?? `default`}" from "${e.logicalPath}" ${t}.`; } //#endregion //#region node_modules/eve/dist/src/runtime/resolve-dynamic-tool.js async function resolveDynamicToolDefinition(i, a, o) { try { let n = expectObjectRecord(await loadResolvedModuleExport({ definition: i, kindLabel: `dynamic-tool`, moduleMap: a, nodeId: o }), describe$1(i, `to return an object`)), r = expectObjectRecord(n.events, describe$1(i, `to provide an events object`)), s = {}; for (let t of i.eventNames) s[t] = expectFunction(r[t], describe$1(i, `to provide a handler for event "${t}"`)); let c = `dynamic-tool-source:${i.sourceId}`; return stampDefinitionKey(n, c), registerDefinitionSource(c, { kind: `tool`, logicalPath: i.logicalPath, name: i.slug }), { eventNames: [...i.eventNames], events: s, exportName: i.exportName, logicalPath: i.logicalPath, slug: i.slug, sourceId: i.sourceId, sourceKind: `module` }; } catch (e) { throw e instanceof ResolveAgentError ? e : new ResolveAgentError(`Failed to resolve dynamic tool from "${i.logicalPath}": ${toErrorMessage(e)}`, { logicalPath: i.logicalPath, sourceId: i.sourceId }); } } function describe$1(e, t) { return `Expected the dynamic tool export "${e.exportName ?? `default`}" from "${e.logicalPath}" ${t}.`; } //#endregion //#region node_modules/eve/dist/src/runtime/resolve-tool.js async function resolveToolDefinition(i, a, o) { try { let n = expectObjectRecord(await loadResolvedModuleExport({ definition: i, kindLabel: `tool`, moduleMap: a, nodeId: o }), describe(i, `to return an object`)), r = { kind: `tool`, logicalPath: i.logicalPath, name: i.name }, s = `tool-source:${i.sourceId}`; stampDefinitionKey(n, s), registerDefinitionSource(s, r), registerDefinitionSource(`tool:${n.description}`, r); let c = expectFunction(n.execute, describe(i, `to provide an execute function`)); return { description: i.description, execute: c, exportName: i.exportName, inputSchema: i.inputSchema, logicalPath: i.logicalPath, name: i.name, outputSchema: i.outputSchema, sourceId: i.sourceId, sourceKind: `module`, ...extractOptionalHooks(n, i) }; } catch (e) { throw e instanceof ResolveAgentError ? e : new ResolveAgentError(`Failed to attach the tool execute function from "${i.logicalPath}": ${toErrorMessage(e)}`, { logicalPath: i.logicalPath, sourceId: i.sourceId }); } } function extractOptionalHooks(t, n) { let r = {}; return t.approval !== void 0 && (r.approval = expectFunction(t.approval, describe(n, `to provide an approval function`))), t.toModelOutput !== void 0 && (r.toModelOutput = expectFunction(t.toModelOutput, describe(n, `to provide a toModelOutput function`))), t.inputSchema !== void 0 && isFlexibleSchema(t.inputSchema) && (r.inputStandardSchema = t.inputSchema), t.outputSchema !== void 0 && isFlexibleSchema(t.outputSchema) && (r.outputStandardSchema = t.outputSchema), r; } function describe(e, t) { return `Expected the tool export "${e.exportName ?? `default`}" from "${e.logicalPath}" ${t}.`; } function isFlexibleSchema(e) { return typeof e == `object` && !!e && `~standard` in e && typeof e[`~standard`] == `object`; } //#endregion //#region node_modules/eve/dist/src/runtime/resolve-agent.js async function resolveAgent(e) { let t = e.manifest.skills.map((e) => ({ ...e, metadata: e.metadata === void 0 ? void 0 : { ...e.metadata } })), r = [], i = []; for (let t of e.manifest.channels) { if (t.kind === `disabled`) { i.push(t.name); continue; } r.push(await resolveChannelDefinition(t, e.moduleMap, e.nodeId)); } let a = await Promise.all(e.manifest.tools.map((t) => resolveToolDefinition(t, e.moduleMap, e.nodeId))), o = await Promise.all((e.manifest.dynamicInstructions ?? []).map((t) => resolveDynamicInstructionsDefinition(t, e.moduleMap, e.nodeId))), s = await Promise.all((e.manifest.dynamicSkills ?? []).map((t) => resolveDynamicSkillDefinition(t, e.moduleMap, e.nodeId))), c = await Promise.all(e.manifest.dynamicTools.map((t) => resolveDynamicToolDefinition(t, e.moduleMap, e.nodeId))), l = await Promise.all(e.manifest.hooks.map((t) => resolveHookDefinition(t, e.moduleMap, e.nodeId))), u = await Promise.all(e.manifest.connections.map((t) => resolveConnectionDefinition(t, e.moduleMap, e.nodeId))), d = e.manifest.sandbox === null ? null : await resolveSandboxDefinition(e.manifest.sandbox, e.moduleMap, e.nodeId), f = createResolvedInstructions(e.manifest.instructions), p = e.manifest.workspaceResourceRoot, m = { channels: r, config: createResolvedAgentConfig(e.manifest), connections: u, disabledFrameworkChannels: i, disabledFrameworkTools: [...e.manifest.disabledFrameworkTools], workflowEnabled: e.manifest.workflowEnabled, dynamicInstructionsResolvers: o, dynamicSkillResolvers: s, dynamicToolResolvers: c, hooks: l, metadata: { agentRoot: e.manifest.agentRoot, appRoot: e.manifest.appRoot, diagnosticsSummary: e.manifest.diagnosticsSummary }, sandbox: d, workspaceResourceRoot: p, skills: t, tools: a, workspaceSpec: { rootEntries: [...p.rootEntries] } }; return f === void 0 ? m : { ...m, instructions: f }; } function createResolvedInstructions(e) { if (e !== void 0) return { name: e.name, logicalPath: e.logicalPath, markdown: e.markdown, sourceId: e.sourceId, sourceKind: e.sourceKind }; } function createResolvedAgentConfig(e) { let n = { model: e.config.model.source === void 0 ? { id: e.config.model.id, contextWindowTokens: e.config.model.contextWindowTokens, providerOptions: e.config.model.providerOptions } : { contextWindowTokens: e.config.model.contextWindowTokens, id: e.config.model.id, providerOptions: e.config.model.providerOptions, source: { exportName: e.config.model.source.exportName, sourceKind: `module`, logicalPath: e.config.model.source.logicalPath, sourceId: e.config.model.source.sourceId } }, name: e.config.name }; if (e.config.compaction !== void 0) { let t = {}; e.config.compaction.model !== void 0 && (t.model = e.config.compaction.model.source === void 0 ? { contextWindowTokens: e.config.compaction.model.contextWindowTokens, id: e.config.compaction.model.id, providerOptions: e.config.compaction.model.providerOptions } : { contextWindowTokens: e.config.compaction.model.contextWindowTokens, id: e.config.compaction.model.id, providerOptions: e.config.compaction.model.providerOptions, source: { exportName: e.config.compaction.model.source.exportName, sourceKind: `module`, logicalPath: e.config.compaction.model.source.logicalPath, sourceId: e.config.compaction.model.source.sourceId } }), e.config.compaction.thresholdPercent !== void 0 && (t.thresholdPercent = e.config.compaction.thresholdPercent), n.compaction = t; } return e.config.experimental !== void 0 && (n.experimental = { workflow: e.config.experimental.workflow === void 0 ? void 0 : { world: e.config.experimental.workflow.world } }), e.config.outputSchema !== void 0 && (n.outputSchema = e.config.outputSchema), e.config.reasoning !== void 0 && (n.reasoning = e.config.reasoning), e.config.source !== void 0 && (n.source = createResolvedModuleSourceRef(e.config.source)), n; } //#endregion //#region node_modules/eve/dist/src/execution/skills/instructions.js function formatAvailableSkillsSection(e) { return e.length === 0 ? null : [ `Available skills`, `Listed skills are available in this run. Do not claim a listed skill is inaccessible unless activation or workspace inspection actually fails.`, `If the user names a skill or the request clearly matches one of the descriptions below, call load_skill before proceeding.`, `If multiple skills match, activate the minimal set that covers the task. After activation, follow the returned instructions instead of improvising around them.`, `If activation fails, say so briefly and continue with the best fallback. Packaged sibling files under a skill path can be inspected with bash or read_file when needed.`, ...e.map((e) => formatAvailableSkillLine(e)) ].join(` `); } function formatAvailableSkillLine(t) { return `- ${t.name}: ${t.description} (path: ${WORKSPACE_ROOT$1}/skills/${t.name}/SKILL.md)`; } //#endregion //#region node_modules/eve/dist/src/runtime/workspace/spec.js function createWorkspacePromptSection(t) { return t.rootEntries.length === 0 ? void 0 : [ `Workspace`, `- You have access to authored files mounted at the workspace root for this run.`, `- The live workspace root visible to \`bash\` in this run is \`${WORKSPACE_ROOT$1}\`.`, `- Root entries under ${WORKSPACE_ROOT$1}/:`, ...t.rootEntries.map((e) => ` - ${e}`), `- Treat \`${WORKSPACE_ROOT$1}\` as the workspace root for this run unless a \`bash\` call shows otherwise.`, "- For questions about workspace paths or file availability, verify with `bash` first using commands like `pwd`, `ls`, and `find`.", "- If the required `bash` verification fails, report that failure directly instead of answering from this overview.", "- Use the `bash` tool with `ls`, `find`, and `rg` to inspect deeper contents when needed.", `- Do not claim these files are unavailable unless a workspace or tool call actually fails.` ].join(` `); } //#endregion //#region node_modules/eve/dist/src/runtime/prompt/connections.js function formatConnectionsSection(e) { return [ `## Connections`, ``, `You have direct access to the following external services through connected MCP servers and OpenAPI HTTP APIs.`, `When the user's request relates to any of these services, use them instead of web search or general knowledge.`, ``, `Available connections:`, ...e.map((e) => `- ${e.connectionName}: ${e.description}`), ``, `Use connection_search to discover specific tools within a connection. Discovered tools become directly callable by their qualified name (e.g. linear__list_issues) in your next response.` ].join(` `); } //#endregion //#region node_modules/eve/dist/src/runtime/prompt/compose.js function composeRuntimeBasePrompt(e) { return [ ...createInstructionsPromptBlocks(e.instructions), ...createWorkspacePromptBlocks(e.workspaceSpec), ...e.toolsAvailable ? [`Tool execution A single tool or subagent call runs as one serial action. If you call multiple independent tools or subagents in one response, eve treats that batch as parallel work. Only batch work that is independent and does not rely on another call in the same response.`] : [], ...createConnectionsPromptBlocks(e.connections), ...createSkillsPromptBlocks(e.skills) ]; } function createInstructionsPromptBlocks(e) { if (e === void 0) return []; let t = e.markdown.trim(); return t.length === 0 ? [] : [`Instructions (${e.name})\n${t}`]; } function createWorkspacePromptBlocks(e) { if (e === void 0) return []; let n = createWorkspacePromptSection(e); return n === void 0 ? [] : [n]; } function createConnectionsPromptBlocks(e) { return !e || e.length === 0 ? [] : [formatConnectionsSection(e)]; } function createSkillsPromptBlocks(t) { if (!t || t.length === 0) return []; let n = formatAvailableSkillsSection(t); return n === null ? [] : [n]; } //#endregion //#region node_modules/eve/dist/src/runtime/agent/bootstrap.js const BOOTSTRAP_RUNTIME_MODEL_ID = `eve-bootstrap-model`; const BOOTSTRAP_RUNTIME_SYSTEM_PROMPT = `You are the eve bootstrap agent. Be concise, stay grounded in the current conversation, and do not assume tools are available unless the runtime provides them.`; function createResolvedRuntimeTurnAgent(e) { let t = e.agent; return { id: t.config.name, instructions: composeRuntimeBasePrompt({ connections: t.connections, instructions: t.instructions, skills: t.skills, toolsAvailable: e.tools.length > 0, workspaceSpec: t.workspaceSpec }), compactionModel: t.config.compaction?.model, model: t.config.model, nodeId: e.nodeId, outputSchema: t.config.outputSchema, reasoning: t.config.reasoning, tools: [...e.tools], workspaceSpec: t.workspaceSpec }; } //#endregion //#region node_modules/eve/dist/src/runtime/hooks/registry.js function createRuntimeHookRegistry(e) { let t = /* @__PURE__ */ new Map(), n = []; for (let r of e) for (let [e, i] of Object.entries(r.events)) { let a = { slug: r.slug, handler: i, eventType: e }; if (e === `*`) n.push(a); else { let n = t.get(e) ?? []; n.push(a), t.set(e, n); } } return { streamEventsByType: t, streamEventsWildcard: n }; } //#endregion //#region node_modules/eve/dist/src/runtime/sandbox/registry.js const DEFAULT_SANDBOX_SOURCE_ID = `eve:default-sandbox`; function createRuntimeSandboxRegistry(e) { return { sandbox: { definition: e.authoredSandbox ?? createFrameworkSandboxDefinition(), workspaceResourceRoot: e.workspaceResourceRoot } }; } function createFrameworkSandboxDefinition() { return { backend: defaultSandbox(), logicalPath: `eve:framework/default-sandbox`, sourceId: DEFAULT_SANDBOX_SOURCE_ID, sourceKind: `module` }; } //#endregion //#region node_modules/eve/dist/src/runtime/resolve-agent-graph.js var ResolveRuntimeAgentGraphError = class extends Error { logicalPath; nodeId; sourceId; constructor(e, t = {}) { super(e), this.name = `ResolveRuntimeAgentGraphError`, t.logicalPath !== void 0 && (this.logicalPath = t.logicalPath), t.nodeId !== void 0 && (this.nodeId = t.nodeId), t.sourceId !== void 0 && (this.sourceId = t.sourceId); } }; async function resolveRuntimeAgentGraph(e) { let n = /* @__PURE__ */ new Map(), r = createChildNodeIdsByParentNodeId(e.manifest), i = new Map(e.manifest.subagents.map((e) => [e.nodeId, e])); return { nodesByNodeId: n, root: await resolveRuntimeAgentNode({ childNodeIdsByParentNodeId: r, manifest: e.manifest, moduleMap: e.moduleMap, nodeId: ROOT_COMPILED_AGENT_NODE_ID, nodesByNodeId: n, subagentNodesById: i }) }; } async function resolveRuntimeAgentNode(e) { let t = toRuntimeNodeId(e.nodeId); if (e.nodesByNodeId.has(t)) throw new ResolveRuntimeAgentGraphError(`Found multiple runtime agent nodes for node id "${t}".`, { nodeId: t, sourceId: e.sourceId }); let a = await resolveAgent({ manifest: e.manifest, moduleMap: e.moduleMap, nodeId: e.nodeId }), o = a.connections.length > 0, s = getFrameworkToolDefinitions({ hasConnections: o }), c = new Set(s.map((e) => e.name)), l = getAllFrameworkToolNames(), u = new Set(a.tools.map((e) => e.name)); for (let n of a.disabledFrameworkTools) if (!l.has(n)) throw new ResolveRuntimeAgentGraphError(`agent/tools/${n}.ts exports disableTool() but "${n}" is not a framework tool. Rename the file to one of: ${[...l].sort().join(`, `)}.`, { nodeId: t, sourceId: e.sourceId }); let d = new Set(a.disabledFrameworkTools), f = await createRuntimeToolRegistry({ tools: [...s.filter((e) => !u.has(e.name) && !d.has(e.name)), ...a.tools] }, { reservedToolNames: [WORKFLOW_TOOL_NAME, ...c.has(LOAD_SKILL_TOOL_NAME) || u.has(LOAD_SKILL_TOOL_NAME) ? [] : [LOAD_SKILL_TOOL_NAME]] }), p = new Set(a.channels.map((e) => e.name)), m = getAllFrameworkChannelNames(); for (let n of a.disabledFrameworkChannels) if (!m.has(n)) throw new ResolveRuntimeAgentGraphError(`agent/channels/${n}.ts exports disableRoute() but "${n}" is not a framework channel. Rename the file to one of: ${[...m].sort().join(`, `)}.`, { nodeId: t, sourceId: e.sourceId }); let h = new Set(a.disabledFrameworkChannels), g = [...getFrameworkChannelDefinitions().filter((e) => !p.has(e.name) && !h.has(e.name)), ...a.channels], _ = createRuntimeSandboxRegistry({ authoredSandbox: a.sandbox, workspaceResourceRoot: a.workspaceResourceRoot }), v = createRuntimeSubagentRegistry({ reservedToolNames: [LOAD_SKILL_TOOL_NAME, ...f.preparedTools.map((e) => e.name)], subagents: await resolveRuntimeSubagents({ childNodeIdsByParentNodeId: e.childNodeIdsByParentNodeId, manifest: e.manifest, moduleMap: e.moduleMap, nodesByNodeId: e.nodesByNodeId, parentNodeId: e.nodeId, subagentNodesById: e.subagentNodesById }) }), y = o ? { ...a, dynamicToolResolvers: [...a.dynamicToolResolvers, createConnectionSearchResolver()] } : a, b = { agent: y, channels: g, hookRegistry: createRuntimeHookRegistry(y.hooks), nodeId: t, sandboxRegistry: _, sourceId: e.sourceId, subagentRegistry: v, toolRegistry: f, turnAgent: createResolvedRuntimeTurnAgent({ agent: y, nodeId: t, tools: [...f.preparedTools, ...v.preparedTools] }) }; return e.nodesByNodeId.set(t, b), b; } async function resolveRuntimeSubagents(e) { let t = [], n = e.childNodeIdsByParentNodeId.get(e.parentNodeId) ?? []; for (let r of n) { let n = e.subagentNodesById.get(r); if (n === void 0) throw new ResolveRuntimeAgentGraphError(`Missing compiled subagent node "${r}" while resolving runtime subagents.`, { nodeId: toRuntimeNodeId(e.parentNodeId), sourceId: r }); t.push(await resolveRuntimeSubagent({ childNodeIdsByParentNodeId: e.childNodeIdsByParentNodeId, moduleMap: e.moduleMap, nodesByNodeId: e.nodesByNodeId, sourceRef: n, subagentNodesById: e.subagentNodesById })); } for (let n of e.manifest.remoteAgents) t.push(await resolveRuntimeRemoteAgent({ moduleMap: e.moduleMap, nodeScopeId: e.parentNodeId, sourceRef: n })); return t; } async function resolveRuntimeSubagent(e) { let t = { description: e.sourceRef.description, kind: `subagent`, logicalPath: e.sourceRef.logicalPath, name: e.sourceRef.name, nodeId: toRuntimeNodeId(e.sourceRef.nodeId), sourceId: e.sourceRef.sourceId, sourceKind: `module` }; return await resolveRuntimeAgentNode({ childNodeIdsByParentNodeId: e.childNodeIdsByParentNodeId, manifest: e.sourceRef.agent, moduleMap: e.moduleMap, nodeId: e.sourceRef.nodeId, nodesByNodeId: e.nodesByNodeId, sourceId: e.sourceRef.sourceId, subagentNodesById: e.subagentNodesById }), t; } async function resolveRuntimeRemoteAgent(t) { let n = expectObjectRecord(await loadResolvedModuleExport({ definition: t.sourceRef, kindLabel: `remote agent`, moduleMap: t.moduleMap, nodeId: t.nodeScopeId }), `Expected remote agent source "${t.sourceRef.logicalPath}" to export an object.`), r = { description: t.sourceRef.description, kind: `remote`, logicalPath: t.sourceRef.logicalPath, name: t.sourceRef.name, nodeId: toRuntimeNodeId(t.sourceRef.nodeId), outputSchema: t.sourceRef.outputSchema, path: t.sourceRef.path, sourceId: t.sourceRef.sourceId, sourceKind: `module`, url: t.sourceRef.url }; typeof n.auth == `function` && (r.auth = n.auth); let i = resolveRemoteAgentHeaders(n.headers); return i !== void 0 && (r.headers = i), r; } function resolveRemoteAgentHeaders(e) { if (e === void 0) return; if (typeof e == `function`) return e; if (typeof e != `object` || !e || Array.isArray(e)) return; let t = {}; for (let [n, r] of Object.entries(e)) typeof r == `string` && (t[n] = r); return t; } function createChildNodeIdsByParentNodeId(e) { let t = /* @__PURE__ */ new Map(); for (let n of e.subagentEdges) { let e = t.get(n.parentNodeId); if (e === void 0) { t.set(n.parentNodeId, [n.childNodeId]); continue; } e.push(n.childNodeId); } return t; } function toRuntimeNodeId(e) { return e === ROOT_COMPILED_AGENT_NODE_ID ? ROOT_RUNTIME_AGENT_NODE_ID : e; } //#endregion //#region node_modules/eve/dist/src/compiler/module-map.js const compiledModuleNodeScopeSchema = Ls$3.object({ modules: Ls$3.record(Ls$3.string(), Ls$3.object({}).passthrough()) }).strict(); const compiledModuleMapSchema = Ls$3.object({ nodes: Ls$3.record(Ls$3.string(), compiledModuleNodeScopeSchema) }).strict(); function collectModuleRefsForManifest(e) { let t = /* @__PURE__ */ new Map(); e.config.source !== void 0 && t.set(e.config.source.sourceId, e.config.source), e.config.model.source !== void 0 && t.set(e.config.model.source.sourceId, e.config.model.source); for (let n of e.channels) n.kind !== `disabled` && t.set(n.sourceId, { exportName: n.exportName, sourceKind: `module`, logicalPath: n.logicalPath, sourceId: n.sourceId }); for (let n of e.connections) t.set(n.sourceId, { exportName: n.exportName, sourceKind: `module`, logicalPath: n.logicalPath, sourceId: n.sourceId }); for (let n of e.tools) t.set(n.sourceId, { exportName: n.exportName, sourceKind: `module`, logicalPath: n.logicalPath, sourceId: n.sourceId }); for (let n of e.dynamicInstructions) t.set(n.sourceId, { exportName: n.exportName, sourceKind: `module`, logicalPath: n.logicalPath, sourceId: n.sourceId }); for (let n of e.dynamicSkills) t.set(n.sourceId, { exportName: n.exportName, sourceKind: `module`, logicalPath: n.logicalPath, sourceId: n.sourceId }); for (let n of e.dynamicTools) t.set(n.sourceId, { exportName: n.exportName, sourceKind: `module`, logicalPath: n.logicalPath, sourceId: n.sourceId }); for (let n of e.remoteAgents) t.set(n.sourceId, { exportName: n.exportName, sourceKind: `module`, logicalPath: n.logicalPath, sourceId: n.sourceId }); for (let n of e.hooks) t.set(n.sourceId, { exportName: n.exportName, sourceKind: `module`, logicalPath: n.logicalPath, sourceId: n.sourceId }); for (let n of e.schedules) n.sourceKind !== `module` || !n.hasRun || t.set(n.sourceId, { sourceKind: `module`, logicalPath: n.logicalPath, sourceId: n.sourceId }); return e.sandbox !== null && t.set(e.sandbox.sourceId, { exportName: e.sandbox.exportName, sourceKind: `module`, logicalPath: e.sandbox.logicalPath, sourceId: e.sandbox.sourceId }), [...t.values()]; } //#endregion //#region node_modules/eve/dist/src/runtime/loaders/module-map.js const BUNDLED_MODULE_MAP_SOURCE = `bundled compiled module map`; var LoadCompiledModuleMapError = class extends Error { moduleMapPath; constructor(e, t) { super(e), this.name = `LoadCompiledModuleMapError`, t !== void 0 && (this.moduleMapPath = t); } }; async function loadCompiledModuleMap(e) { let r = e.compiledArtifactsSource.kind === `disk` ? resolveRuntimeCompilerArtifactPaths(e.compiledArtifactsSource.appRoot).moduleMapPath : void 0; if (r !== void 0) { let e = createFileImportSpecifier$1(r); try { let t = await import(e); return parseCompiledModuleMap(t.moduleMap ?? t.default, r); } catch (e) { throw new LoadCompiledModuleMapError(formatLoadErrorMessage$1(e), r); } } let a = readBundledCompiledArtifacts(); if (a !== null) return parseCompiledModuleMap(a.moduleMap, BUNDLED_MODULE_MAP_SOURCE); throw new LoadCompiledModuleMapError(`Compiled module map is unavailable without an app root or bundled compiled artifacts.`, BUNDLED_MODULE_MAP_SOURCE); } function parseCompiledModuleMap(t, n) { let i = compiledModuleMapSchema.safeParse(t); if (!i.success) throw new LoadCompiledModuleMapError(`Expected "${n}" to export a valid compiled eve module map. ${formatValidationError(i.error)}`, n); return i.data; } function formatLoadErrorMessage$1(e) { return e instanceof Error ? e.message : `Unknown module-map load failure.`; } function createFileImportSpecifier$1(e) { let t = e.replaceAll(`\\`, `/`); return /^[A-Za-z]:\//.test(t) ? `file:///${encodeURI(t)}` : t.startsWith(`/`) ? `file://${encodeURI(t)}` : t; } //#endregion //#region node_modules/eve/dist/src/discover/filesystem.js const PROJECT_MARKER_FILE_NAMES = [`package.json`, `vercel.json`]; const PROJECT_MARKER_FILE_NAME_SET = new Set(PROJECT_MARKER_FILE_NAMES); //#endregion //#region node_modules/eve/dist/src/internal/authored-asset-import-plugin.js const AUTHORED_ASSET_CODE_EXTENSIONS = [ `.ts`, `.tsx`, `.mts`, `.cts`, `.js`, `.jsx`, `.mjs`, `.cjs`, `.json` ]; function createAuthoredAssetImportPlugin() { return { name: `eve-authored-asset-import`, resolveId(t, i) { if (!isPotentialAuthoredAssetImport(t) || i === void 0) return; let { path: a, suffix: o } = splitImportSuffix(t); return `${isAbsolute(a) ? a : resolve(dirname(i), a)}${o}`; }, async load(e) { let { path: t, suffix: n } = splitImportSuffix(e); if (!isPotentialAuthoredAssetImport(t)) return; if (n === `?raw`) { let e = await readAssetText(t); return e === void 0 ? void 0 : { code: `export default ${JSON.stringify(e)};`, moduleType: `js` }; } let r = await readAssetDataUrl(t); if (r !== void 0) return { code: `export default ${JSON.stringify(r)};`, moduleType: `js` }; } }; } async function readAssetText(e) { try { return await readFile(e, `utf8`); } catch (e) { if (isPathNotFoundError$1(e)) return; throw e; } } function isPotentialAuthoredAssetImport(e) { if (e.startsWith(`\0`) || e.startsWith(`node:`) || e.startsWith(`data:`) || e.startsWith(`file:`)) return !1; let { path: n } = splitImportSuffix(e); if (!n.startsWith(`.`) && !n.startsWith(`/`) && !/^[A-Za-z]:[\\/]/.test(n)) return !1; let r = extname(n); return r.length > 0 && r !== `.node` && !AUTHORED_ASSET_CODE_EXTENSIONS.includes(r); } function splitImportSuffix(e) { let t = e.indexOf(`?`), n = e.indexOf(`#`), r = t === -1 ? n : n === -1 ? t : Math.min(t, n); return r === -1 ? { path: e, suffix: `` } : { path: e.slice(0, r), suffix: e.slice(r) }; } async function readAssetDataUrl(e) { try { let t = await readFile(e); return `data:${getAssetMimeType(e)};base64,${t.toString(`base64`)}`; } catch (e) { if (isPathNotFoundError$1(e)) return; throw e; } } function isPathNotFoundError$1(e) { return typeof e == `object` && !!e && `code` in e && (e.code === `ENOENT` || e.code === `ENOTDIR`); } function getAssetMimeType(e) { switch (extname(e).toLowerCase()) { case `.css`: return `text/css`; case `.csv`: return `text/csv`; case `.gif`: return `image/gif`; case `.html`: return `text/html`; case `.jpg`: case `.jpeg`: return `image/jpeg`; case `.png`: return `image/png`; case `.svg`: return `image/svg+xml`; case `.txt`: return `text/plain`; case `.wasm`: return `application/wasm`; case `.webp`: return `image/webp`; default: return `application/octet-stream`; } } //#endregion //#region node_modules/eve/dist/src/internal/authored-module-bundle.js function createAuthoredModuleBundleError(e, t) { let n = t instanceof Error ? t.message : String(t), r = []; return (/\.node(?:\b|["'?])/i.test(n) || /native addon|native module|invalid utf-?8|Could not load .*\.node/i.test(n)) && r.push(`If this comes from a native Node package, keep that package external with agent build.externalDependencies so Vercel/Nitro traces it instead of bundling it.`), /Unexpected character|No loader is configured|Could not load|Unknown file extension/i.test(n) && r.push(`If this comes from an asset import, eve only supports assets that Rolldown can emit for a Node ESM bundle; otherwise load the file through fs/import.meta.url or externalize the package.`), Error([ `Failed to bundle authored module "${e}".`, n, ...r.map((e) => `Hint: ${e}`) ].join(` `)); } //#endregion //#region node_modules/eve/dist/src/compiled/jsonc-parser/index.js function e$1(e, i = !1) { let a = e.length, o = 0, s = ``, c = 0, l = 16, u = 0, d = 0, f = 0, p = 0, m = 0; function h(t, n) { let r = 0, i = 0; for (; r < t || !n;) { let t = e.charCodeAt(o); if (t >= 48 && t <= 57) i = i * 16 + t - 48; else if (t >= 65 && t <= 70) i = i * 16 + t - 65 + 10; else if (t >= 97 && t <= 102) i = i * 16 + t - 97 + 10; else break; o++, r++; } return r < t && (i = -1), i; } function g(e) { o = e, s = ``, c = 0, l = 16, m = 0; } function _() { let t = o; if (e.charCodeAt(o) === 48) o++; else for (o++; o < e.length && r$9(e.charCodeAt(o));) o++; if (o < e.length && e.charCodeAt(o) === 46) if (o++, o < e.length && r$9(e.charCodeAt(o))) for (o++; o < e.length && r$9(e.charCodeAt(o));) o++; else return m = 3, e.substring(t, o); let n = o; if (o < e.length && (e.charCodeAt(o) === 69 || e.charCodeAt(o) === 101)) if (o++, (o < e.length && e.charCodeAt(o) === 43 || e.charCodeAt(o) === 45) && o++, o < e.length && r$9(e.charCodeAt(o))) { for (o++; o < e.length && r$9(e.charCodeAt(o));) o++; n = o; } else m = 3; return e.substring(t, n); } function v() { let t = ``, r = o; for (;;) { if (o >= a) { t += e.substring(r, o), m = 2; break; } let i = e.charCodeAt(o); if (i === 34) { t += e.substring(r, o), o++; break; } if (i === 92) { if (t += e.substring(r, o), o++, o >= a) { m = 2; break; } switch (e.charCodeAt(o++)) { case 34: t += `"`; break; case 92: t += `\\`; break; case 47: t += `/`; break; case 98: t += `\b`; break; case 102: t += `\f`; break; case 110: t += ` `; break; case 114: t += `\r`; break; case 116: t += ` `; break; case 117: let e = h(4, !0); e >= 0 ? t += String.fromCharCode(e) : m = 4; break; default: m = 5; } r = o; continue; } if (i >= 0 && i <= 31) if (n$6(i)) { t += e.substring(r, o), m = 2; break; } else m = 6; o++; } return t; } function y() { if (s = ``, m = 0, c = o, d = u, p = f, o >= a) return c = a, l = 17; let i = e.charCodeAt(o); if (t$5(i)) { do o++, s += String.fromCharCode(i), i = e.charCodeAt(o); while (t$5(i)); return l = 15; } if (n$6(i)) return o++, s += String.fromCharCode(i), i === 13 && e.charCodeAt(o) === 10 && (o++, s += ` `), u++, f = o, l = 14; switch (i) { case 123: return o++, l = 1; case 125: return o++, l = 2; case 91: return o++, l = 3; case 93: return o++, l = 4; case 58: return o++, l = 6; case 44: return o++, l = 5; case 34: return o++, s = v(), l = 10; case 47: let t = o - 1; if (e.charCodeAt(o + 1) === 47) { for (o += 2; o < a && !n$6(e.charCodeAt(o));) o++; return s = e.substring(t, o), l = 12; } if (e.charCodeAt(o + 1) === 42) { o += 2; let r = a - 1, i = !1; for (; o < r;) { let t = e.charCodeAt(o); if (t === 42 && e.charCodeAt(o + 1) === 47) { o += 2, i = !0; break; } o++, n$6(t) && (t === 13 && e.charCodeAt(o) === 10 && o++, u++, f = o); } return i || (o++, m = 1), s = e.substring(t, o), l = 13; } return s += String.fromCharCode(i), o++, l = 16; case 45: if (s += String.fromCharCode(i), o++, o === a || !r$9(e.charCodeAt(o))) return l = 16; case 48: case 49: case 50: case 51: case 52: case 53: case 54: case 55: case 56: case 57: return s += _(), l = 11; default: for (; o < a && b(i);) o++, i = e.charCodeAt(o); if (c !== o) { switch (s = e.substring(c, o), s) { case `true`: return l = 8; case `false`: return l = 9; case `null`: return l = 7; } return l = 16; } return s += String.fromCharCode(i), o++, l = 16; } } function b(e) { if (t$5(e) || n$6(e)) return !1; switch (e) { case 125: case 93: case 123: case 91: case 34: case 58: case 44: case 47: return !1; } return !0; } function x() { let e; do e = y(); while (e >= 12 && e <= 15); return e; } return { setPosition: g, getPosition: () => o, scan: i ? x : y, getToken: () => l, getTokenValue: () => s, getTokenOffset: () => c, getTokenLength: () => o - c, getTokenStartLine: () => d, getTokenStartCharacter: () => c - p, getTokenError: () => m }; } function t$5(e) { return e === 32 || e === 9; } function n$6(e) { return e === 10 || e === 13; } function r$9(e) { return e >= 48 && e <= 57; } var i$7; (function(e) { e[e.lineFeed = 10] = `lineFeed`, e[e.carriageReturn = 13] = `carriageReturn`, e[e.space = 32] = `space`, e[e._0 = 48] = `_0`, e[e._1 = 49] = `_1`, e[e._2 = 50] = `_2`, e[e._3 = 51] = `_3`, e[e._4 = 52] = `_4`, e[e._5 = 53] = `_5`, e[e._6 = 54] = `_6`, e[e._7 = 55] = `_7`, e[e._8 = 56] = `_8`, e[e._9 = 57] = `_9`, e[e.a = 97] = `a`, e[e.b = 98] = `b`, e[e.c = 99] = `c`, e[e.d = 100] = `d`, e[e.e = 101] = `e`, e[e.f = 102] = `f`, e[e.g = 103] = `g`, e[e.h = 104] = `h`, e[e.i = 105] = `i`, e[e.j = 106] = `j`, e[e.k = 107] = `k`, e[e.l = 108] = `l`, e[e.m = 109] = `m`, e[e.n = 110] = `n`, e[e.o = 111] = `o`, e[e.p = 112] = `p`, e[e.q = 113] = `q`, e[e.r = 114] = `r`, e[e.s = 115] = `s`, e[e.t = 116] = `t`, e[e.u = 117] = `u`, e[e.v = 118] = `v`, e[e.w = 119] = `w`, e[e.x = 120] = `x`, e[e.y = 121] = `y`, e[e.z = 122] = `z`, e[e.A = 65] = `A`, e[e.B = 66] = `B`, e[e.C = 67] = `C`, e[e.D = 68] = `D`, e[e.E = 69] = `E`, e[e.F = 70] = `F`, e[e.G = 71] = `G`, e[e.H = 72] = `H`, e[e.I = 73] = `I`, e[e.J = 74] = `J`, e[e.K = 75] = `K`, e[e.L = 76] = `L`, e[e.M = 77] = `M`, e[e.N = 78] = `N`, e[e.O = 79] = `O`, e[e.P = 80] = `P`, e[e.Q = 81] = `Q`, e[e.R = 82] = `R`, e[e.S = 83] = `S`, e[e.T = 84] = `T`, e[e.U = 85] = `U`, e[e.V = 86] = `V`, e[e.W = 87] = `W`, e[e.X = 88] = `X`, e[e.Y = 89] = `Y`, e[e.Z = 90] = `Z`, e[e.asterisk = 42] = `asterisk`, e[e.backslash = 92] = `backslash`, e[e.closeBrace = 125] = `closeBrace`, e[e.closeBracket = 93] = `closeBracket`, e[e.colon = 58] = `colon`, e[e.comma = 44] = `comma`, e[e.dot = 46] = `dot`, e[e.doubleQuote = 34] = `doubleQuote`, e[e.minus = 45] = `minus`, e[e.openBrace = 123] = `openBrace`, e[e.openBracket = 91] = `openBracket`, e[e.plus = 43] = `plus`, e[e.slash = 47] = `slash`, e[e.formFeed = 12] = `formFeed`, e[e.tab = 9] = `tab`; })(i$7 ||= {}); const a$6 = Array(20).fill(0).map((e, t) => ` `.repeat(t)); const o$6 = { " ": { "\n": Array(200).fill(0).map((e, t) => ` ` + ` `.repeat(t)), "\r": Array(200).fill(0).map((e, t) => `\r` + ` `.repeat(t)), "\r\n": Array(200).fill(0).map((e, t) => `\r ` + ` `.repeat(t)) }, " ": { "\n": Array(200).fill(0).map((e, t) => ` ` + ` `.repeat(t)), "\r": Array(200).fill(0).map((e, t) => `\r` + ` `.repeat(t)), "\r\n": Array(200).fill(0).map((e, t) => `\r ` + ` `.repeat(t)) } }; var p$8; (function(e) { e.DEFAULT = { allowTrailingComma: !1 }; })(p$8 ||= {}); function h$6(e, t = [], n = p$8.DEFAULT) { let r = null, i = [], a = []; function o(e) { Array.isArray(i) ? i.push(e) : r !== null && (i[r] = e); } return S$6(e, { onObjectBegin: () => { let e = {}; o(e), a.push(i), i = e, r = null; }, onObjectProperty: (e) => { r = e; }, onObjectEnd: () => { i = a.pop(); }, onArrayBegin: () => { let e = []; o(e), a.push(i), i = e, r = null; }, onArrayEnd: () => { i = a.pop(); }, onLiteralValue: o, onError: (e, n, r) => { t.push({ error: e, offset: n, length: r }); } }, n), i[0]; } function S$6(t, n, r = p$8.DEFAULT) { let i = e$1(t, !1), a = [], o = 0; function s(e) { return e ? () => o === 0 && e(i.getTokenOffset(), i.getTokenLength(), i.getTokenStartLine(), i.getTokenStartCharacter()) : () => !0; } function c(e) { return e ? (t) => o === 0 && e(t, i.getTokenOffset(), i.getTokenLength(), i.getTokenStartLine(), i.getTokenStartCharacter()) : () => !0; } function l(e) { return e ? (t) => o === 0 && e(t, i.getTokenOffset(), i.getTokenLength(), i.getTokenStartLine(), i.getTokenStartCharacter(), () => a.slice()) : () => !0; } function u(e) { return e ? () => { o > 0 ? o++ : e(i.getTokenOffset(), i.getTokenLength(), i.getTokenStartLine(), i.getTokenStartCharacter(), () => a.slice()) === !1 && (o = 1); } : () => !0; } function d(e) { return e ? () => { o > 0 && o--, o === 0 && e(i.getTokenOffset(), i.getTokenLength(), i.getTokenStartLine(), i.getTokenStartCharacter()); } : () => !0; } let f = u(n.onObjectBegin), m = l(n.onObjectProperty), h = d(n.onObjectEnd), g = u(n.onArrayBegin), _ = d(n.onArrayEnd), v = l(n.onLiteralValue), y = c(n.onSeparator), b = s(n.onComment), x = c(n.onError), S = r && r.disallowComments, C = r && r.allowTrailingComma; function w() { for (;;) { let e = i.scan(); switch (i.getTokenError()) { case 4: T(14); break; case 5: T(15); break; case 3: T(13); break; case 1: S || T(11); break; case 2: T(12); break; case 6: T(16); break; } switch (e) { case 12: case 13: S ? T(10) : b(); break; case 16: T(1); break; case 15: case 14: break; default: return e; } } } function T(e, t = [], n = []) { if (x(e), t.length + n.length > 0) { let e = i.getToken(); for (; e !== 17;) { if (t.indexOf(e) !== -1) { w(); break; } else if (n.indexOf(e) !== -1) break; e = w(); } } } function E(e) { let t = i.getTokenValue(); return e ? v(t) : (m(t), a.push(t)), w(), !0; } function D() { switch (i.getToken()) { case 11: let e = i.getTokenValue(), t = Number(e); isNaN(t) && (T(2), t = 0), v(t); break; case 7: v(null); break; case 8: v(!0); break; case 9: v(!1); break; default: return !1; } return w(), !0; } function O() { return i.getToken() === 10 ? (E(!1), i.getToken() === 6 ? (y(`:`), w(), j() || T(4, [], [2, 5])) : T(5, [], [2, 5]), a.pop(), !0) : (T(3, [], [2, 5]), !1); } function k() { f(), w(); let e = !1; for (; i.getToken() !== 2 && i.getToken() !== 17;) { if (i.getToken() === 5) { if (e || T(4, [], []), y(`,`), w(), i.getToken() === 2 && C) break; } else e && T(6, [], []); O() || T(4, [], [2, 5]), e = !0; } return h(), i.getToken() === 2 ? w() : T(7, [2], []), !0; } function A() { g(), w(); let e = !0, t = !1; for (; i.getToken() !== 4 && i.getToken() !== 17;) { if (i.getToken() === 5) { if (t || T(4, [], []), y(`,`), w(), i.getToken() === 4 && C) break; } else t && T(6, [], []); e ? (a.push(0), e = !1) : a[a.length - 1]++, j() || T(4, [], [4, 5]), t = !0; } return _(), e || a.pop(), i.getToken() === 4 ? w() : T(8, [4], []), !0; } function j() { switch (i.getToken()) { case 3: return A(); case 1: return k(); case 10: return E(!0); default: return D(); } } return w(), i.getToken() === 17 ? r.allowEmptyContent ? !0 : (T(4, [], []), !1) : j() ? (i.getToken() !== 17 && T(9, [], []), !0) : (T(4, [], []), !1); } var k$7; (function(e) { e[e.None = 0] = `None`, e[e.UnexpectedEndOfComment = 1] = `UnexpectedEndOfComment`, e[e.UnexpectedEndOfString = 2] = `UnexpectedEndOfString`, e[e.UnexpectedEndOfNumber = 3] = `UnexpectedEndOfNumber`, e[e.InvalidUnicode = 4] = `InvalidUnicode`, e[e.InvalidEscapeCharacter = 5] = `InvalidEscapeCharacter`, e[e.InvalidCharacter = 6] = `InvalidCharacter`; })(k$7 ||= {}); var A$6; (function(e) { e[e.OpenBraceToken = 1] = `OpenBraceToken`, e[e.CloseBraceToken = 2] = `CloseBraceToken`, e[e.OpenBracketToken = 3] = `OpenBracketToken`, e[e.CloseBracketToken = 4] = `CloseBracketToken`, e[e.CommaToken = 5] = `CommaToken`, e[e.ColonToken = 6] = `ColonToken`, e[e.NullKeyword = 7] = `NullKeyword`, e[e.TrueKeyword = 8] = `TrueKeyword`, e[e.FalseKeyword = 9] = `FalseKeyword`, e[e.StringLiteral = 10] = `StringLiteral`, e[e.NumericLiteral = 11] = `NumericLiteral`, e[e.LineCommentTrivia = 12] = `LineCommentTrivia`, e[e.BlockCommentTrivia = 13] = `BlockCommentTrivia`, e[e.LineBreakTrivia = 14] = `LineBreakTrivia`, e[e.Trivia = 15] = `Trivia`, e[e.Unknown = 16] = `Unknown`, e[e.EOF = 17] = `EOF`; })(A$6 ||= {}); const M$6 = h$6; var B$6; (function(e) { e[e.InvalidSymbol = 1] = `InvalidSymbol`, e[e.InvalidNumberFormat = 2] = `InvalidNumberFormat`, e[e.PropertyNameExpected = 3] = `PropertyNameExpected`, e[e.ValueExpected = 4] = `ValueExpected`, e[e.ColonExpected = 5] = `ColonExpected`, e[e.CommaExpected = 6] = `CommaExpected`, e[e.CloseBraceExpected = 7] = `CloseBraceExpected`, e[e.CloseBracketExpected = 8] = `CloseBracketExpected`, e[e.EndOfFileExpected = 9] = `EndOfFileExpected`, e[e.InvalidCommentToken = 10] = `InvalidCommentToken`, e[e.UnexpectedEndOfComment = 11] = `UnexpectedEndOfComment`, e[e.UnexpectedEndOfString = 12] = `UnexpectedEndOfString`, e[e.UnexpectedEndOfNumber = 13] = `UnexpectedEndOfNumber`, e[e.InvalidUnicode = 14] = `InvalidUnicode`, e[e.InvalidEscapeCharacter = 15] = `InvalidEscapeCharacter`, e[e.InvalidCharacter = 16] = `InvalidCharacter`; })(B$6 ||= {}); //#endregion //#region node_modules/eve/dist/src/internal/authored-package-tsconfig-paths.js const packageTsConfigPathsCache = /* @__PURE__ */ new Map(); const nearestPackageRootCache = /* @__PURE__ */ new Map(); function createAuthoredPackageTsConfigPathsPlugin(e) { return { name: `eve-package-tsconfig-paths`, async resolveId(t, r, i) { if (r === void 0 || !isPackageImport$1(t)) return; let a = resolve(r); if (isPathInsideOrEqual$1(a, e.appPackageRoot)) return; let o = await resolveNearestPackageRoot(a); if (o === void 0 || isPathInsideOrEqual$1(o, e.appPackageRoot)) return; let s = await loadPackageTsConfigPaths(o); if (s !== void 0) for (let n of createTsConfigPathCandidates(t, s)) { let t = await this.resolve(n, r, { kind: i.kind, skipSelf: !0 }); if (t !== null) return t; let a = await resolveExistingPath(n, e.extensions); if (a !== void 0) return { id: a }; } } }; } function loadPackageTsConfigPaths(e) { let t = packageTsConfigPathsCache.get(e); if (t !== void 0) return t; let n = readPackageTsConfigPaths(e); return packageTsConfigPathsCache.set(e, n), n; } async function readPackageTsConfigPaths(t) { let r = await readPackageConfig(t); if (r === void 0) return; let i = [], a = M$6(r.source, i, { allowTrailingComma: !0 }); if (i.length > 0 || !isObjectRecord(a)) return; let s = a.compilerOptions; if (!isObjectRecord(s) || !isObjectRecord(s.paths)) return; let c = dirname(r.path), l = typeof s.baseUrl == `string` ? resolve(c, s.baseUrl) : c, u = Object.entries(s.paths).flatMap(([e, t]) => !Array.isArray(t) || !t.every((e) => typeof e == `string`) ? [] : [{ pattern: e, targets: t }]).sort((e, t) => t.pattern.length - e.pattern.length); if (u.length !== 0) return { baseDirectory: l, entries: u }; } async function readPackageConfig(e) { for (let n of [`tsconfig.json`, `jsconfig.json`]) { let r = join(e, n); try { return { path: r, source: await readFile(r, `utf8`) }; } catch (e) { if (!isPathNotFoundError(e)) throw e; } } } function createTsConfigPathCandidates(e, t) { let r = []; for (let i of t.entries) { let a = matchTsConfigPathPattern(e, i.pattern); if (a !== void 0) for (let e of i.targets) { let i = e.includes(`*`) ? e.replaceAll(`*`, a) : e; r.push(resolve(t.baseDirectory, i)); } } return r; } function matchTsConfigPathPattern(e, t) { let n = t.indexOf(`*`); if (n === -1) return e === t ? `` : void 0; let r = t.slice(0, n), i = t.slice(n + 1); if (!(!e.startsWith(r) || !e.endsWith(i))) return e.slice(r.length, e.length - i.length); } async function resolveExistingPath(e, n) { if (await existsAsFile(e)) return e; for (let t of n) { let n = `${e}${t}`; if (await existsAsFile(n)) return n; } for (let r of n) { let n = join(e, `index${r}`); if (await existsAsFile(n)) return n; } } async function existsAsFile(e) { try { return (await stat(e)).isFile(); } catch { return !1; } } function resolveNearestPackageRoot(t) { let n = dirname(t), r = nearestPackageRootCache.get(n); if (r !== void 0) return r; let i = findNearestPackageRoot(n); return nearestPackageRootCache.set(n, i), i; } async function findNearestPackageRoot(n) { let r = n; for (;;) { if (await pathExists(join(r, `package.json`))) return r; let n = dirname(r); if (n === r) return; r = n; } } async function pathExists(e) { try { return await stat(e), !0; } catch { return !1; } } function isPathNotFoundError(e) { return typeof e == `object` && !!e && `code` in e && (e.code === `ENOENT` || e.code === `ENOTDIR`); } function isPackageImport$1(e) { return e.startsWith(`.`) || e.startsWith(`/`) || /^[A-Za-z]:[\\/]/.test(e) ? !1 : !/^(?:node|data|file):/.test(e); } function isObjectRecord(e) { return typeof e == `object` && !!e && !Array.isArray(e); } function isPathInsideOrEqual$1(e, t) { let i = resolve(e), a = resolve(t); return i === a || i.startsWith(`${a}${sep}`); } //#endregion //#region node_modules/eve/dist/src/internal/bundler/nitro-rolldown.js let rolldownPromise; function loadNitroRolldown() { return rolldownPromise ??= (async () => await import(pathToFileURL(createRequire(createRequire(import.meta.url).resolve(`nitro/package.json`)).resolve(`rolldown`)).href))(), rolldownPromise; } async function buildWithNitroRolldown(e) { let { build: t } = await loadNitroRolldown(); return await t(e); } function getSingleRolldownChunk(e, t) { let n = e.output.filter((e) => e.type === `chunk`), r = n[0]; if (r === void 0 || n.length !== 1) throw Error(`Expected one bundled ${t}.`); return r; } //#endregion //#region node_modules/eve/dist/src/internal/nitro/host/server-external-packages.js const SERVER_EXTERNAL_PACKAGES = `@alinea/generated.@appsignal/nodejs.@aws-sdk/client-kms.@aws-sdk/client-s3.@aws-sdk/client-sso.@aws-sdk/s3-presigned-post.@blockfrost/blockfrost-js.@datadog/flagging-core.@highlight-run/node.@huggingface/transformers.@jpg-store/lucid-cardano.@libsql/client.@mikro-orm/core.@mikro-orm/knex.@node-rs/argon2.@node-rs/bcrypt.@prisma/client.@react-pdf/renderer.@sentry/profiling-node.@smithy/util-stream.@sparticuz/chromium.@sparticuz/chromium-min.@statsig/statsig-node-core.@swc/core.@xenova/transformers.@zenstackhq/runtime.argon2.autoprefixer.aws-crt.bcrypt.better-sqlite3.canvas.chromadb-default-embed.config.cpu-features.cypress.dd-trace.eslint.express.firebase-admin.htmlrewriter.import-in-the-middle.isolated-vm.jest.jsdom.keyv.libsql.mdx-bundler.mongodb.mongoose.newrelic.next-mdx-remote.next-seo.node-cron.node-pty.node-web-audio-api.onnxruntime-node.oslo.pg.pino.pino-pretty.pino-roll.playwright.playwright-core.postcss.prettier.prisma.puppeteer.puppeteer-core.ravendb.require-in-the-middle.rimraf.sharp.shiki.sqlite3.thread-stream.ts-morph.ts-node.typescript.vscode-oniguruma.webpack.websocket.zeromq`.split(`.`); //#endregion //#region node_modules/eve/dist/src/internal/node-esm-compat-banner.js const BANNER_LINES = [{ importLine: `import { fileURLToPath as __eveFileURLToPath } from "node:url";`, declarationLine: `const __filename = __eveFileURLToPath(import.meta.url);`, bindingPattern: /^(?:const|let|var)\s+__filename\b/m }, { importLine: `import { dirname as __eveDirname } from "node:path";`, declarationLine: `const __dirname = __eveDirname(__filename);`, bindingPattern: /^(?:const|let|var)\s+__dirname\b/m }]; const REQUIRE_LINE = { importLine: `import { createRequire as __eveCreateRequire } from "node:module";`, declarationLine: `const require = __eveCreateRequire(import.meta.url);`, bindingPattern: /^(?:const|let|var)\s+require\b/m }; function buildNodeEsmCompatBanner(n, r = {}) { let i = [...BANNER_LINES]; r.includeRequire === !0 && i.push(REQUIRE_LINE); let a = [], o = []; for (let e of i) e.bindingPattern.test(n) || (a.push(e.importLine), o.push(e.declarationLine)); return o.length === 0 ? `` : [...a, ...o].join(` `); } function createNodeEsmCompatBannerPlugin(e = {}) { return { name: `eve-node-esm-compat-banner`, renderChunk(t, n) { let r = buildNodeEsmCompatBanner(t, e); return r === `` ? null : { code: `${r}\n${t}`, map: createPrependedLineSourceMap({ insertedLineCount: r.split(` `).length, source: n?.fileName ?? `eve-node-esm-compat-banner-input`, sourceContent: t }) }; } }; } function createPrependedLineSourceMap({ insertedLineCount: e, source: t, sourceContent: n }) { let r = n.split(` `).length, i = Array.from({ length: r }, (e, t) => encodeVlqFields(t === 0 ? [ 0, 0, 0, 0 ] : [ 0, 0, 1, 0 ])); return { version: 3, sources: [t], sourcesContent: [n], names: [], mappings: `${`;`.repeat(e)}${i.join(`;`)}` }; } function encodeVlqFields(e) { return e.map((e) => encodeVlqInteger(e)).join(``); } function encodeVlqInteger(e) { let t = e < 0 ? (-e << 1) + 1 : e << 1, n = ``; do { let e = t & 31; t >>>= 5, t > 0 && (e |= 32), n += `ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`[e]; } while (t > 0); return n; } //#endregion //#region node_modules/eve/dist/src/internal/authored-module-loader.js const AUTHORED_BUNDLED_MODULE_EXTENSION = /\.[cm]?[jt]sx?$/; const AUTHORED_MODULE_BUNDLE_DIRECTORY_PATH = join(`node_modules`, `.cache`, `eve`, `authored-modules`); const RESOLVE_EXTENSIONS = [ `.ts`, `.tsx`, `.mts`, `.cts`, `.js`, `.jsx`, `.mjs`, `.cjs`, `.json` ]; const CHANNEL_MODULE_CACHE_KEY = `__eveChannelModuleCache__`; const CACHED_CHANNEL_PREFIX = `eve-cached-channel:`; function getChannelModuleCache() { return globalThis[CHANNEL_MODULE_CACHE_KEY]; } const inFlightModuleLoads = /* @__PURE__ */ new Map(); function loadAuthoredModuleNamespace(e, t = {}) { let n = createInFlightModuleLoadKey(resolve(e), t), r = inFlightModuleLoads.get(n); if (r !== void 0) return r; let i = (async () => { try { return await doLoadAuthoredModuleNamespace(e, t); } finally { inFlightModuleLoads.delete(n); } })(); return inFlightModuleLoads.set(n, i), i; } async function doLoadAuthoredModuleNamespace(e, n) { return expectObjectRecord(AUTHORED_BUNDLED_MODULE_EXTENSION.test(e) ? await loadBundledAuthoredModule(e, n) : await import(createFileImportSpecifier(e)), `Expected "${e}" to export a module namespace object.`); } function createFileImportSpecifier(e) { let t = e.replaceAll(`\\`, `/`); return /^[A-Za-z]:\//.test(t) ? `file:///${encodeURI(t)}` : t.startsWith(`/`) ? `file://${encodeURI(t)}` : t; } async function loadBundledAuthoredModule(e, t) { let i = getChannelModuleCache(), a = resolveAuthoredPackageRoot(e), s = resolveAuthoredTsConfigPath(a), c = normalizeExternalDependencies(t.externalDependencies), l = [ i && i.size > 0 ? { name: `eve-channel-identity`, async resolveId(e, t, n) { if (!/channels[/\\]/.test(e) || n.kind !== `import-statement`) return; let r = await this.resolve(e, t, { kind: n.kind, skipSelf: !0 }); if (r === null || typeof r.id != `string`) return; let a = resolve(r.id); if (i.has(a)) return { id: `${CACHED_CHANNEL_PREFIX}${a}` }; }, load(e) { if (!e.startsWith(CACHED_CHANNEL_PREFIX)) return; let t = e.slice(19); return { code: [`const cache = globalThis["${CHANNEL_MODULE_CACHE_KEY}"];`, `export default cache.get(${JSON.stringify(t)});`].join(` `), moduleType: `js` }; } } : null, createAuthoredRelativeExtensionResolverPlugin({ extensions: RESOLVE_EXTENSIONS }), createAuthoredAssetImportPlugin(), createAuthoredPackageTsConfigPathsPlugin({ appPackageRoot: a, extensions: RESOLVE_EXTENSIONS }), createNodeEsmCompatBannerPlugin({ includeRequire: !0 }), createPackageBoundaryPlugin(a, c) ].filter((e) => e !== null), u; try { u = getSingleRolldownChunk(await buildWithNitroRolldown({ cwd: a, input: e, platform: `node`, plugins: l, resolve: { extensions: [...RESOLVE_EXTENSIONS] }, tsconfig: s, write: !1, output: { comments: !1, format: `esm`, sourcemap: `inline` } }), `authored module for "${e}"`); } catch (t) { throw createAuthoredModuleBundleError(e, t); } let d = createHash(`sha1`).update(e).update(`\0`).update(c.join(`\0`)).update(`\0`).update(u.code).digest(`hex`), f = join(a, AUTHORED_MODULE_BUNDLE_DIRECTORY_PATH), p = join(f, `${d}.mjs`); return existsSync(p) || (mkdirSync(f, { recursive: !0 }), writeFileSync(p, u.code)), await import(`${createFileImportSpecifier(p)}?v=${d}`); } function createAuthoredRelativeExtensionResolverPlugin(e) { return { name: `eve-authored-relative-extension-resolver`, resolveId(t, n) { if (n === void 0 || n.startsWith(`\0`) || n.startsWith(CACHED_CHANNEL_PREFIX) || !isPathImport(t)) return; let r = resolveExistingImportPath(isAbsolute(t) ? t : resolve(dirname(n), t), e.extensions); if (r !== void 0) return { id: r }; } }; } function createPackageBoundaryPlugin(e, t) { let n = toCanonicalPath(e); return { name: `eve-package-boundary`, async resolveId(r, i, a) { if (!isPackageImport(r)) return; if (isEveFrameworkImport(r)) return { external: !0, id: r }; let o = resolveConfiguredExternalDependency(r, t); if (o !== void 0) { if (r !== o) { let t = await this.resolve(r, i, { kind: a.kind, skipSelf: !0 }); if (t !== null && typeof t.id == `string`) return { external: !0, id: resolveExternalFilePath({ importer: i, packageRoot: e, resolvedId: t.id, source: r }) }; let n = resolveExternalFilePath({ importer: i, packageRoot: e, source: r }); if (n !== void 0) return { external: !0, id: n }; } return { external: !0, id: r }; } let s = i === void 0 || i.startsWith(`\0`) || i.startsWith(CACHED_CHANNEL_PREFIX) ? void 0 : resolve(i); if (s !== void 0 && isPathInsideOrEqual(toCanonicalPath(s), n)) { let e = await this.resolve(r, i, { kind: a.kind, skipSelf: !0 }); if (e === null || typeof e.id != `string`) throw Error(`Cannot resolve package "${r}" imported from "${s}". Install it with your package manager (e.g. \`pnpm install\`); a running \`eve dev\` retries on the next rebuild.`); if (isNodeModulesPath(e.id)) return { external: !0, id: r }; } } }; } function createInFlightModuleLoadKey(e, t) { return `${e}\0${normalizeExternalDependencies(t.externalDependencies).join(`\0`)}`; } function normalizeExternalDependencies(e = []) { return [.../* @__PURE__ */ new Set([...SERVER_EXTERNAL_PACKAGES, ...e])].sort(); } function resolveConfiguredExternalDependency(e, t) { return t.find((t) => e === t || e.startsWith(`${t}/`)); } function resolveExternalFilePath(t) { if (t.resolvedId !== void 0) { let e = resolveExistingExternalFilePath(t.resolvedId); if (e !== void 0) return e; } let n = normalizeImporterPath(t.importer); if (n !== void 0) try { return createRequire(n).resolve(t.source); } catch {} try { return createRequire(join(t.packageRoot, `package.json`)).resolve(t.source); } catch { return t.resolvedId; } } function resolveExistingExternalFilePath(e) { if (existsSync(e)) return e; for (let t of RESOLVE_EXTENSIONS) { let r = `${e}${t}`; if (existsSync(r)) return r; } } function resolveExistingImportPath(e, t) { if (isFile(e)) return e; for (let n of t) { let t = `${e}${n}`; if (isFile(t)) return t; } for (let n of t) { let t = join(e, `index${n}`); if (isFile(t)) return t; } } function isFile(e) { try { return statSync(e).isFile(); } catch { return !1; } } function normalizeImporterPath(e) { if (!(e === void 0 || e.startsWith(`\0`) || e.startsWith(CACHED_CHANNEL_PREFIX))) return resolve(e); } function isPackageImport(e) { return isPathImport(e) || /^(?:node|data|file):/.test(e) || e.startsWith(`@/`) ? !1 : !e.startsWith(CACHED_CHANNEL_PREFIX); } function isPathImport(e) { return e.startsWith(`.`) || e.startsWith(`/`) || /^[A-Za-z]:[\\/]/.test(e); } function isEveFrameworkImport(e) { return e === `eve` || e.startsWith(`eve/`); } function isNodeModulesPath(e) { return e.replaceAll(`\\`, `/`).includes(`/node_modules/`); } function toCanonicalPath(e) { try { return realpathSync(e); } catch { return resolve(e); } } function isPathInsideOrEqual(e, t) { let n = resolve(e), r = resolve(t); return n === r || n.startsWith(`${r}${sep}`); } function resolveAuthoredTsConfigPath(e) { for (let t of [`tsconfig.json`, `jsconfig.json`]) { let r = join(e, t); if (existsSync(r)) return r; } return !1; } function resolveAuthoredPackageRoot(e) { let t = dirname(e); for (;;) { if (existsSync(join(t, `package.json`))) return t; let r = dirname(t); if (r === t) throw Error(`Failed to resolve the authored package root for "${e}".`); t = r; } } //#endregion //#region node_modules/eve/dist/src/compiler/model-catalog.js const COMPILED_RUNTIME_MODEL_CATALOG_CACHE_KIND = `eve-model-catalog-cache`; const catalogModelProviderSchema = Ls$3.object({ provider: Ls$3.string().min(1), providerModelId: Ls$3.string().min(1), contextWindowTokens: Ls$3.number().int().nonnegative().optional(), maxOutputTokens: Ls$3.number().int().nonnegative().optional() }).passthrough(); const catalogModelSchema = Ls$3.object({ slug: Ls$3.string().min(1), providers: Ls$3.array(catalogModelProviderSchema).min(1) }).passthrough(); const modelCatalogResponseSchema = Ls$3.object({ models: Ls$3.array(catalogModelSchema), providerAliases: Ls$3.record(Ls$3.string(), Ls$3.string()) }).passthrough(); Ls$3.object({ contextWindowTokens: Ls$3.number().int().positive(), maxOutputTokens: Ls$3.number().int().positive().optional() }).strict(); const compiledRuntimeModelCatalogCacheSchema = Ls$3.object({ fetchedAt: Ls$3.string(), kind: Ls$3.literal(COMPILED_RUNTIME_MODEL_CATALOG_CACHE_KIND), models: Ls$3.array(catalogModelSchema), providerAliases: Ls$3.record(Ls$3.string(), Ls$3.string()), version: Ls$3.literal(2) }).strict(); //#endregion //#region node_modules/eve/dist/src/shared/json-schema.js function normalizeJsonSchemaDefinition(t, n = `input`) { return isStandardSchema(t) ? parseJsonObject(t[`~standard`].jsonSchema[n]({ target: `draft-07` })) : parseJsonObject(t); } function isStandardSchema(e) { return typeof e == `object` && !!e && `~standard` in e; } //#endregion //#region node_modules/eve/dist/src/internal/authored-definition/core.js function normalizeAgentDefinition(e, r) { let a = expectObjectRecord(e, r); if (expectOnlyKnownKeys(a, [ `build`, `compaction`, `description`, `experimental`, `model`, `modelContextWindowTokens`, `modelOptions`, `outputSchema`, `reasoning` ], r), a.model === void 0) throw Error(`${r} The "model" field is required.`); let o = { model: a.model }; return a.description !== void 0 && (o.description = expectString(a.description, r)), a.compaction !== void 0 && (o.compaction = normalizeAgentCompactionDefinition(a.compaction, r)), a.build !== void 0 && (o.build = normalizeAgentBuildDefinition(a.build, r)), a.experimental !== void 0 && (o.experimental = normalizeAgentExperimentalDefinition(a.experimental, r)), a.modelOptions !== void 0 && (o.modelOptions = normalizeAgentModelOptions(a.modelOptions, r)), a.modelContextWindowTokens !== void 0 && (o.modelContextWindowTokens = expectPositiveInteger(a.modelContextWindowTokens, r)), a.outputSchema !== void 0 && (o.outputSchema = a.outputSchema), a.reasoning !== void 0 && (o.reasoning = normalizeAgentReasoningDefinition(a.reasoning, r)), o; } function normalizeAgentReasoningDefinition(e, t) { let n = expectString(e, t); switch (n) { case `provider-default`: case `none`: case `minimal`: case `low`: case `medium`: case `high`: case `xhigh`: return n; default: throw Error(t); } } function expectPositiveInteger(e, t) { if (typeof e != `number` || !Number.isInteger(e) || e <= 0) throw Error(t); return e; } function normalizeAgentBuildDefinition(e, r) { let a = expectObjectRecord(e, r); expectOnlyKnownKeys(a, [`externalDependencies`], r); let o = {}; if (a.externalDependencies !== void 0) { if (!Array.isArray(a.externalDependencies)) throw Error(r); o.externalDependencies = Object.freeze(a.externalDependencies.map((e) => expectString(e, r))); } return o; } function normalizeAgentWorkflowDefinition(e, r) { let i = expectObjectRecord(e, r); expectOnlyKnownKeys(i, [`world`], r); let a = {}; return i.world !== void 0 && (a.world = normalizeAgentWorkflowWorldDefinition(i.world, r)), a; } function normalizeAgentWorkflowWorldDefinition(e, t) { let n = expectString(e, t); if (n.trim() === ``) throw Error(`${t} "experimental.workflow.world" must be a non-empty package name.`); return n; } function normalizeAgentExperimentalDefinition(e, r) { let i = expectObjectRecord(e, r); expectOnlyKnownKeys(i, [`workflow`], r); let a = {}; return i.workflow !== void 0 && (a.workflow = normalizeAgentWorkflowDefinition(i.workflow, r)), a; } function normalizeAgentModelOptions(e, i) { let a = expectObjectRecord(e, i); expectOnlyKnownKeys(a, [`providerOptions`], i); let o = a.providerOptions; return o === void 0 ? {} : { providerOptions: expectProviderOptions(o, i) }; } function normalizeAgentCompactionDefinition(e, r) { let i = expectObjectRecord(e, r); expectOnlyKnownKeys(i, [ `model`, `modelContextWindowTokens`, `thresholdPercent` ], r); let a = {}; if (i.model !== void 0 && (a.model = i.model), i.modelContextWindowTokens !== void 0 && (a.modelContextWindowTokens = expectPositiveInteger(i.modelContextWindowTokens, r)), i.thresholdPercent !== void 0) { let e = i.thresholdPercent; if (typeof e != `number` || !Number.isFinite(e) || e < 0 || e > 1) throw Error(r); a.thresholdPercent = e; } return a; } //#endregion //#region node_modules/eve/dist/src/internal/runtime-model.js function formatLanguageModelGatewayId(e) { return typeof e == `string` ? e : `${e.provider.split(`.`)[0]}/${e.modelId.replace(/^(claude-[a-z]+-\d+)-(\d+)$/, `$1.$2`)}`; } //#endregion //#region node_modules/eve/dist/src/public/definitions/connections/protocol.js const PROTOCOL_KEY = Symbol.for(`eve.connection-protocol`); function stampConnectionProtocol(e, t) { Object.defineProperty(e, PROTOCOL_KEY, { configurable: !0, value: t }); } //#endregion //#region node_modules/eve/dist/src/shared/dynamic-tool-definition.js const ALLOWED_DYNAMIC_TOOL_EVENTS = /* @__PURE__ */ new Set([ `session.started`, `turn.started`, `step.started` ]); const ALLOWED_DYNAMIC_INSTRUCTION_EVENTS = /* @__PURE__ */ new Set([`session.started`, `turn.started`]); const ALLOWED_DYNAMIC_SKILL_EVENTS = /* @__PURE__ */ new Set([`session.started`, `turn.started`]); const TOOL_BRAND = Symbol.for(`eve:tool-brand`); function isBrandedToolEntry(e) { return typeof e == `object` && !!e && e[TOOL_BRAND] === !0; } const INSTRUCTIONS_BRAND = Symbol.for(`eve:instructions-brand`); function isBrandedInstructionsEntry(e) { return typeof e == `object` && !!e && e[INSTRUCTIONS_BRAND] === !0; } const SKILL_BRAND = Symbol.for(`eve:skill-brand`); function isBrandedSkillEntry(e) { return typeof e == `object` && !!e && e[SKILL_BRAND] === !0; } //#endregion //#region node_modules/eve/dist/src/public/definitions/tool.js function defineTool(e) { if (e.auth !== void 0) throw Error(`defineTool: The "auth" field is no longer supported. Pass auth providers inline to ctx.getToken(provider) or ctx.requireAuth(provider).`); return Object.assign(e, { [TOOL_BRAND]: !0 }), stampDefinitionKey(e, `tool:${e.description}`), e; } const ENABLE_WORKFLOW_TOOL_SENTINEL_KIND = `eve:enable-workflow-tool`; const ExperimentalWorkflow = Object.freeze({ kind: ENABLE_WORKFLOW_TOOL_SENTINEL_KIND }); //#endregion //#region node_modules/eve/dist/src/shared/skill-package.js const WORKSPACE_ROOT = `/workspace`; function normalizeSkillPackage(e) { assertSafeSkillPackageName(e.name); let t = [{ content: Buffer$1.from(e.markdown, `utf8`), relativePath: `SKILL.md` }]; for (let [n, r] of Object.entries(e.files ?? {})) assertSafeSkillPackageFilePath(n), t.push({ content: contentToBuffer(r), relativePath: n }); return t.sort((e, t) => comparePaths(e.relativePath, t.relativePath)), { description: e.description, files: t, license: e.license, markdown: e.markdown, metadata: e.metadata === void 0 ? void 0 : { ...e.metadata }, name: e.name }; } async function writeSkillPackageToSandbox(e) { for (let t of e.skill.files) await e.sandbox.writeBinaryFile({ content: t.content, path: `${WORKSPACE_ROOT}/skills/${e.skill.name}/${t.relativePath}` }); } function assertSafeSkillPackageName(e) { if (e.length === 0 || e.startsWith(`.`) || e.includes(`/`) || e.includes(`\\`) || e.includes(`..`) || !/^[A-Za-z0-9][A-Za-z0-9._-]*$/.test(e) || /^[A-Za-z]:/.test(e)) throw Error(`Expected skill name to be a non-empty shell-safe path segment starting with an alphanumeric character and containing only alphanumerics, ".", "_", or "-".`); } function assertSafeSkillPackageFilePath(e) { if (e === `SKILL.md`) throw Error(`Skill package files must not include "SKILL.md"; eve generates it.`); if (e.length === 0 || e.startsWith(`/`) || e.includes(`\\`) || /^[A-Za-z]:/.test(e) || e.split(`/`).some((e) => e.length === 0 || e === `.` || e === `..`)) throw Error(`Expected skill package file paths to be relative POSIX paths.`); } function contentToBuffer(e) { return typeof e == `string` ? Buffer$1.from(e, `utf8`) : Buffer$1.from(e); } function comparePaths(e, t) { return e < t ? -1 : +(e > t); } //#endregion //#region node_modules/eve/dist/src/compiler/artifacts.js const COMPILE_METADATA_KIND = `eve-compile-metadata`; //#endregion //#region node_modules/eve/dist/src/runtime/loaders/compile-metadata.js const compileArtifactDigestSchema = Ls$3.object({ path: Ls$3.string(), sha256: Ls$3.string() }).strict(); const compileMetadataSchema = Ls$3.object({ compile: Ls$3.object({ moduleMap: compileArtifactDigestSchema }).strict(), discovery: Ls$3.object({ diagnostics: compileArtifactDigestSchema, manifest: compileArtifactDigestSchema, sourceGraphHash: Ls$3.string(), summary: Ls$3.object({ errors: Ls$3.number().finite(), warnings: Ls$3.number().finite() }).strict() }).strict(), generator: Ls$3.object({ name: Ls$3.string(), version: Ls$3.string() }).strict(), kind: Ls$3.literal(COMPILE_METADATA_KIND), status: Ls$3.union([Ls$3.literal(`failed`), Ls$3.literal(`ready`)]), version: Ls$3.literal(5) }).strict(); var LoadCompileMetadataError = class extends Error { metadataPath; constructor(e, t) { super(e), this.name = `LoadCompileMetadataError`, t !== void 0 && (this.metadataPath = t); } }; async function loadCompileMetadata(e) { let t = e.compiledArtifactsSource.kind === `disk` ? resolveRuntimeCompilerArtifactPaths(e.compiledArtifactsSource.appRoot).compileMetadataPath : void 0; if (t !== void 0) { let { readFile: e } = await import(`node:fs/promises`), n; try { n = JSON.parse(await e(t, `utf8`)); } catch (e) { throw new LoadCompileMetadataError(formatLoadErrorMessage(e), t); } return parseCompileMetadata(n, t); } let n = readBundledCompiledArtifacts()?.metadata; return n === void 0 ? null : parseCompileMetadata(n, `bundled compile metadata`); } function parseCompileMetadata(e, t) { let n = compileMetadataSchema.safeParse(e); if (!n.success) throw new LoadCompileMetadataError(`Expected "${t}" to contain valid eve compile metadata. ${formatValidationError(n.error)}`, t); return n.data; } function formatLoadErrorMessage(e) { return e instanceof Error ? e.message : `Unknown compile metadata load failure.`; } //#endregion //#region node_modules/eve/dist/src/runtime/cache-key.js async function resolveRuntimeCompiledArtifactsVersionedCacheKey(n) { let r = getRuntimeCompiledArtifactsCacheKey(n), i = await resolveCompileMetadataMtimeMs(n); try { let e = (await loadCompileMetadata({ compiledArtifactsSource: n }))?.discovery.sourceGraphHash; return e === void 0 || e.length === 0 ? i === void 0 ? r : `${r}:mtime-${formatMtimeMsForCacheKey(i)}` : i === void 0 ? `${r}:${e}` : `${r}:${e}:mtime-${formatMtimeMsForCacheKey(i)}`; } catch { return i === void 0 ? r : `${r}:mtime-${formatMtimeMsForCacheKey(i)}`; } } async function resolveCompileMetadataMtimeMs(e) { if (e.kind !== `disk`) return; let { stat: t } = await import(`node:fs/promises`), { compileMetadataPath: r } = resolveRuntimeCompilerArtifactPaths(e.appRoot); try { return (await t(r)).mtimeMs; } catch { return; } } function formatMtimeMsForCacheKey(e) { return Math.floor(e).toString(36); } //#endregion //#region node_modules/eve/dist/src/execution/subagent-adapter.js const log$18 = createLogger(`execution.subagent-adapter`); const SUBAGENT_ADAPTER_KIND$1 = `subagent`; function isSubagentAdapterState$1(e) { if (typeof e != `object` || !e) return !1; let t = e; return typeof t.callId == `string` && t.callId.length > 0 && typeof t.parentContinuationToken == `string` && t.parentContinuationToken.length > 0 && typeof t.parentSessionId == `string` && typeof t.subagentName == `string` && t.subagentName.length > 0; } const SUBAGENT_ADAPTER$1 = { kind: SUBAGENT_ADAPTER_KIND$1, async "input.requested"(e, t) { let i = t.state; isSubagentAdapterState$1(i) && await forwardSubagentInputRequestStep$1({ hookPayload: { callId: i.callId, childContinuationToken: t.ctx.require(ContinuationTokenKey), childSessionId: t.ctx.require(SessionIdKey), event: { requests: e.requests, sequence: e.sequence, stepIndex: e.stepIndex, turnId: e.turnId }, kind: `subagent-input-request`, subagentName: i.subagentName }, parentContinuationToken: i.parentContinuationToken }); } }; async function forwardSubagentInputRequestStep$1(t) { try { await E$9(t.parentContinuationToken, t.hookPayload); } catch (n) { let r = createErrorId(); throw log$18.warn(`failed to forward proxied HITL batch to parent`, { callId: t.hookPayload.callId, childContinuationToken: t.hookPayload.childContinuationToken, childSessionId: t.hookPayload.childSessionId, errorId: r, parentContinuationToken: t.parentContinuationToken, subagentName: t.hookPayload.subagentName, error: n }), n; } } s$7("step//eve@0.16.2//forwardSubagentInputRequestStep", forwardSubagentInputRequestStep$1); //#endregion //#region node_modules/eve/dist/src/channel/session.js function createSession$1(e, t, n) { return { id: e, continuationToken: t, async getEventStream(t) { return n.getEventStream(e, t); } }; } function createGetSessionFn(e) { return (t) => createSession$1(t, ``, e); } function buildSessionHandle(i) { return { get id() { return i.get(SessionIdKey) ?? ``; }, get continuationToken() { return i.get(ContinuationTokenKey) ?? ``; }, get auth() { return { current: i.get(AuthKey) ?? null, initiator: i.get(InitiatorAuthKey) ?? null }; }, setContinuationToken(e) { let n = i.get(ContinuationTokenKey) ?? ``, r = namespaceContinuationToken(n, e); n !== r && i.set(ContinuationTokenKey, r); } }; } function namespaceContinuationToken(e, t) { let n = e.indexOf(`:`); if (n <= 0) throw Error(`Cannot set session continuation token without an existing namespaced continuation token. Start the session with a placeholder continuationToken.`); return `${e.slice(0, n + 1)}${t}`; } //#endregion //#region node_modules/eve/dist/src/channel/schedule-auth.js const SCHEDULE_APP_AUTH = { attributes: {}, authenticator: `app`, principalId: `eve:app`, principalType: `runtime` }; function isScheduleAppAuth(e) { return e?.authenticator === SCHEDULE_APP_AUTH.authenticator && e.principalId === SCHEDULE_APP_AUTH.principalId && e.principalType === SCHEDULE_APP_AUTH.principalType; } //#endregion //#region node_modules/eve/dist/src/channel/send.js const log$17 = createLogger(`channel.send`); function createSendFn(t, r, i, a = {}) { return async (o, s) => { let c = s.auth, l = s.callback, u = s.mode ?? `conversation`, d = s.state, f = s.title, p = s.continuationToken, m = `${i}:${p}`, { message: h, inputResponses: g, context: _, outputSchema: v } = normalizeSendInput(o), y = serializeUrlFilePartsInMessage(h); try { let n = { auth: c, continuationToken: m, requestId: a.requestId, payload: { inputResponses: g, message: y, context: _, outputSchema: v } }, { sessionId: r } = await t.deliver(n); return createSession$1(r, p, t); } catch (e) { isRuntimeNoActiveSessionError(e) || log$17.warn(`deliver failed, falling back to starting a new session`, { continuationToken: m }); } if (g && g.length > 0) throw Error(`Cannot deliver inputResponses — the target session was not found via continuation token.`); let b = { adapter: d ? { ...r, state: { ...r.state, ...d } } : r, auth: c, capabilities: u === `conversation` ? { requestInput: !0 } : void 0, channelName: i, callback: l, continuationToken: m, input: { message: y ?? ``, context: _, outputSchema: v }, mode: u, requestId: a.requestId, title: f }; return createSession$1((await t.run(b)).sessionId, p, t); }; } function serializeUrlFilePartsInMessage(e) { if (e === void 0 || typeof e == `string`) return e; let t = !1, n = e.map((e) => e.type === `file` && e.data instanceof URL && e.data.protocol !== `data:` ? (t = !0, { ...e, data: serializeUrlFilePart(e.data) }) : e); return t ? n : e; } function normalizeSendInput(e) { return typeof e == `string` || Array.isArray(e) ? { message: e } : e; } //#endregion //#region node_modules/eve/dist/src/channel/cross-channel-receive.js function toCrossChannelTargets(e) { return e.flatMap((e) => e.definition === void 0 ? [] : [{ name: e.name, definition: e.definition, receive: e.receive, adapter: e.adapter }]); } function createCrossChannelReceiveFn(e, t) { return async (n, r) => { let i = resolveTargetByReference(n, t); return await invokeChannelReceive({ runtime: e, target: i, input: { message: r.message, target: r.target, auth: r.auth }, describeMissingReceive: () => `args.receive(): channel "${i.name}" does not implement receive(). Declare a receive hook on the channel to accept cross-channel sessions.`, describeMissingAdapter: () => `args.receive(): channel "${i.name}" has no adapter — cannot build send().` }); }; } async function invokeChannelReceive(e) { if (!e.target.receive) throw Error(e.describeMissingReceive()); if (!e.target.adapter) throw Error(e.describeMissingAdapter()); let n = createSendFn(e.runtime, e.target.adapter, e.target.name); return await e.target.receive(e.input, { send: n }); } function resolveTargetByReference(e, t) { for (let n of t) if (n.definition === e) return n; let n = resolveTargetByRouteFingerprint(e, t); if (n !== null) return n; throw Error(`args.receive(): the channel passed as the first argument is not registered in this agent's channels/. Import the channel module's default export from agent/channels/.ts and pass that value.`); } function resolveTargetByRouteFingerprint(t, n) { if (!isCompiledChannel(t)) return null; let r = createRouteFingerprint(t); if (r === null) return null; let i = /* @__PURE__ */ new Map(); for (let e of n) createRouteFingerprint(e.definition) === r && i.set(e.name, e); if (i.size === 1) return [...i.values()][0]; if (i.size > 1) throw Error(`args.receive(): the channel passed as the first argument matches multiple registered channels by route shape. Import a channel with a unique route set from agent/channels/.ts before passing it to args.receive().`); return null; } function createRouteFingerprint(e) { return e.routes.length === 0 ? null : e.routes.map((e) => `${e.method.toUpperCase()} ${e.path}`).sort().join(` `); } //#endregion //#region node_modules/eve/dist/src/channel/schedule.js const SCHEDULE_ADAPTER_KIND = `schedule`; const SCHEDULE_ADAPTER = { kind: SCHEDULE_ADAPTER_KIND }; var ScheduleDispatcher = class { runtime; channels; constructor(e) { this.runtime = e.runtime, this.channels = e.channels; } async trigger(e) { let t = [], i = [], a = createCrossChannelReceiveFn(this.runtime, toCrossChannelTargets(this.channels)), o = { appAuth: SCHEDULE_APP_AUTH, receive: async (e, n) => { let r = await a(e, n); return t.push(r), r; }, waitUntil(e) { i.push(e); } }; if (e.run) await e.run(o); else if (e.markdown !== void 0) { let n = await this.runMarkdown(e.markdown); t.push(n); } else throw Error(`Schedule "${e.scheduleId}" has neither "run" nor "markdown" — at least one must be set.`); return { sessions: t, waitUntilTasks: i }; } async runMarkdown(t) { let r = await this.runtime.run({ adapter: SCHEDULE_ADAPTER, auth: SCHEDULE_APP_AUTH, input: { message: t }, mode: `task` }); return createSession$1(r.sessionId, r.continuationToken, this.runtime); } }; function expectScheduleRun(e, t, n) { let r = e; if (typeof r != `object` || !r) throw Error(`Schedule export "${n ?? `default`}" from "${t}" must be an object.`); return expectFunction(r.run, `Expected the schedule export "${n ?? `default`}" from "${t}" to export a \`run\` handler function.`); } //#endregion //#region node_modules/eve/dist/src/runtime/channels/registry.js const FRAMEWORK_ADAPTERS = [ HTTP_ADAPTER, SUBAGENT_ADAPTER$1, SCHEDULE_ADAPTER ]; const ADAPTER_NON_EVENT_FIELDS = /* @__PURE__ */ new Set([ `kind`, `state`, `deliver`, `createAdapterContext`, `fetchFile`, `instrumentation` ]); function createRuntimeAdapterRegistry(e) { let t = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Set(); for (let e of FRAMEWORK_ADAPTERS) { let r = requireAdapterKind(e); n.add(r), t.set(r, e); } for (let r of e.channels) { if (r.adapter === void 0) continue; let e = { logicalPath: r.logicalPath, sourceId: r.sourceId }, i = r.adapter, a = requireAdapterKind(i, e); if (n.has(a)) { if (carriesAdapterBehavior(i)) throw new RuntimeRegistryError(`adapter`, `Channel adapter kind "${a}" is reserved by the framework. A route-declared adapter may share a framework kind only as a pass-through with no \`deliver\` hook, event handlers, \`attachments\` resolver, or \`createAdapterContext\` factory. Use a custom \`kind\` to add channel-specific behavior.`, { ...e, entryName: a }); continue; } t.set(a, i); } return { adaptersByKind: t }; } function deserializeRuntimeAdapter(e, t) { let n = t, r = e.adaptersByKind.get(n.kind); if (r === void 0) throw Error(`Unknown adapter kind: "${n.kind}". Declare the adapter on the route that starts this session so the runtime can rehydrate it.`); return { ...r, state: n.state }; } function requireAdapterKind(t, n) { let r = getAdapterKind(t); if (typeof r != `string` || r.length === 0) throw new RuntimeRegistryError(`adapter`, "Adapters must declare a non-empty `kind` field.", { entryName: `unknown`, logicalPath: n?.logicalPath, sourceId: n?.sourceId }); return r; } function carriesAdapterBehavior(e) { if (e.deliver !== void 0 || e.fetchFile !== void 0 || e.createAdapterContext !== void 0) return !0; for (let [t, n] of Object.entries(e)) if (!ADAPTER_NON_EVENT_FIELDS.has(t) && typeof n == `function`) return !0; return !1; } //#endregion //#region node_modules/eve/dist/src/runtime/sessions/compiled-agent-cache.js const isCacheDisabled = process.env.EVE_DISABLE_AGENT_CACHE === `1`; function isDevelopmentRuntimeSnapshotRoot(e) { return e.replaceAll(`\\`, `/`).includes(`/.eve/dev-runtime/snapshots/`); } function normalizeCompiledArtifactsSource(t) { return t.kind !== `disk` || t.moduleMapLoaderPath !== void 0 || !isDevelopmentRuntimeSnapshotRoot(t.appRoot) ? t : { ...t, moduleMapLoaderPath: resolvePackageSourceFilePath(`src/internal/authored-module-map-loader.ts`) }; } async function loadFullBundle(e) { let t = normalizeCompiledArtifactsSource(e), [n, a] = await Promise.all([loadCompiledManifest({ compiledArtifactsSource: t }), loadRuntimeCompiledModuleMap(t)]), o = await resolveRuntimeAgentGraph({ manifest: n, moduleMap: a }), s = o.root; return { adapterRegistry: createRuntimeAdapterRegistry({ channels: collectResolvedChannels(o) }), compiledArtifactsSource: t, graph: o, hookRegistry: s.hookRegistry, moduleMap: a, resolvedAgent: s.agent, subagentRegistry: s.subagentRegistry, toolRegistry: s.toolRegistry, turnAgent: s.turnAgent }; } async function loadRuntimeCompiledModuleMap(e) { return e.kind === `disk` && e.moduleMapLoaderPath !== void 0 ? await loadAuthoredSourceCompiledModuleMap(e) : await loadCompiledModuleMap({ compiledArtifactsSource: e }); } async function loadAuthoredSourceCompiledModuleMap(e) { if (e.moduleMapLoaderPath === void 0) throw Error(`Authored-source module map loading requires "moduleMapLoaderPath" in the compiled artifacts source.`); return await (await import(pathToFileURL(e.moduleMapLoaderPath).href)).loadCompiledModuleMapFromAuthoredSource({ compiledArtifactsSource: e }); } async function getOrLoadFullBundle(e) { let n = normalizeCompiledArtifactsSource(e); if (isCacheDisabled) return loadFullBundle(n); let r = getActiveRuntimeSession(), i = getRuntimeCompiledArtifactsCacheKey(n), a = await resolveRuntimeCompiledArtifactsVersionedCacheKey(n), o = r.bundleCacheKeyBySourceKey.get(i); o !== void 0 && o !== a && r.bundleCache.delete(o), r.bundleCacheKeyBySourceKey.set(i, a); let c = r.bundleCache.get(a); if (c !== void 0) return c; let l = loadFullBundle(n).catch((e) => { throw r.bundleCache.delete(a), r.bundleCacheKeyBySourceKey.get(i) === a && r.bundleCacheKeyBySourceKey.delete(i), e; }); return r.bundleCache.set(a, l), l; } async function getCompiledRuntimeAgentBundle(e) { let t = await getOrLoadFullBundle(e.compiledArtifactsSource); if (e.nodeId === void 0) return t; let r = getResolvedRuntimeAgentNode(t.graph, e.nodeId); return { adapterRegistry: t.adapterRegistry, compiledArtifactsSource: t.compiledArtifactsSource, graph: { nodesByNodeId: t.graph.nodesByNodeId, root: r }, hookRegistry: r.hookRegistry, moduleMap: t.moduleMap, nodeId: e.nodeId, resolvedAgent: r.agent, subagentRegistry: r.subagentRegistry, toolRegistry: r.toolRegistry, turnAgent: r.turnAgent }; } function collectResolvedChannels(e) { let t = /* @__PURE__ */ new Map(); for (let n of e.nodesByNodeId.values()) for (let e of n.channels) t.set(`${e.sourceId}:${e.name}`, e); return [...t.values()]; } //#endregion //#region node_modules/eve/dist/src/runtime/sessions/runtime-context-keys.js const ChannelKey = new ContextKey(`eve.channel`, { codec: { serialize(t) { return { kind: getAdapterKind(t), state: t.state ? { ...t.state } : {} }; }, deserialize(e, t) { let n = t.get(BundleKey); if (n === void 0) throw Error(`Cannot deserialize "eve.channel" before "eve.bundle". The runtime bundle must be present in context.`); return deserializeRuntimeAdapter(n.adapterRegistry, e); } } }); const BundleKey = new ContextKey(`eve.bundle`, { codec: { serialize: (e) => ({ nodeId: e.nodeId, source: e.compiledArtifactsSource }), deserialize: (e) => { let { source: t, nodeId: r } = e; return getCompiledRuntimeAgentBundle({ compiledArtifactsSource: t, nodeId: r }); } } }); //#endregion //#region node_modules/eve/dist/src/context/serialize.js const log$16 = createLogger(`context.serialize`); function serializeContext(e) { let t = {}; for (let [n, r] of e.entries()) try { t[n.name] = n.codec ? n.codec.serialize(r) : r; } catch (e) { throw logError(log$16, `failed to serialize context key`, e, { key: n.name }), e; } return t; } async function deserializeContext(e) { let i = new ContextContainer(), a = e[BundleKey.name]; if (a !== void 0) { let e = BundleKey.codec; if (e === void 0) throw Error(`Context key "eve.bundle" is missing a codec.`); i.set(BundleKey, await e.deserialize(a, i)); } for (let [t, a] of Object.entries(e)) { if (a === void 0 || t === BundleKey.name) continue; let e = resolveKey(t); if (e === void 0) { log$16.warn(`dropping unknown context key during deserialization`, { key: t }); continue; } try { i.set(e, e.codec ? await e.codec.deserialize(a, i) : a); } catch (e) { throw logError(log$16, `failed to deserialize context key`, e, { key: t }), e; } } return i; } //#endregion //#region node_modules/eve/dist/src/execution/eve-workflow-attributes.js function readChannelKind(e) { let n = e[`eve.channel`]?.kind; return isNonEmptyString(n) ? n : void 0; } function readParentLineage(e) { let n = e[`eve.parentSession`], r = n?.callId, i = n?.rootSessionId, a = n?.sessionId, o = n?.turn?.id; return { callId: isNonEmptyString(r) ? r : void 0, rootSessionId: isNonEmptyString(i) ? i : void 0, sessionId: isNonEmptyString(a) ? a : void 0, turnId: isNonEmptyString(o) ? o : void 0 }; } function readRootSessionId(e) { return readParentLineage(e).rootSessionId; } function readChannelRequestId(n) { let r = n[ChannelRequestIdKey.name]; return isNonEmptyString(r) ? r : void 0; } function deriveSessionTitle(e) { let t = collectMessageText(e); if (t === void 0 || t.length === 0) return; let n = t.replace(/\s+/gu, ` `).trim(); if (n.length === 0) return; let r = Array.from(n); return r.length <= 125 ? n : `${r.slice(0, 124).join(``)}…`; } function collectMessageText(e) { if (typeof e == `string`) return e; if (!Array.isArray(e)) return; let t = []; for (let n of e) n && typeof n == `object` && n.type === `text` && typeof n.text == `string` && t.push(n.text); return t.length > 0 ? t.join(` `) : void 0; } function buildSessionAttributes(e) { return { "$eve.channel_request_id": readChannelRequestId(e.serializedContext), "$eve.type": `session`, "$eve.trigger": readChannelKind(e.serializedContext), "$eve.title": deriveSessionTitle(e.inputMessage) }; } function buildSubagentRootAttributes(e) { return { "$eve.channel_request_id": readChannelRequestId(e.serializedContext), "$eve.type": `subagent`, "$eve.parent": e.parentSessionId, "$eve.parent_call": e.parentCallId, "$eve.parent_turn": e.parentTurnId, "$eve.root": e.rootSessionId, "$eve.subagent": e.identity.nodeId, "$eve.trigger": readChannelKind(e.serializedContext) }; } function buildTurnAttributes(e) { return { "$eve.channel_request_id": e.requestId, "$eve.type": `turn`, "$eve.parent": e.parentSessionId, "$eve.root": e.rootSessionId }; } //#endregion //#region node_modules/eve/dist/src/runtime/attributes/normalize.js function truncateForTag(e, t = 256) { if (t <= 0) return ``; let n = new TextEncoder(); if (n.encode(e).length <= t) return e; let r = e.length; for (; r > 0;) { let i = e.charCodeAt(r - 1); if (i >= 55296 && i <= 56319) { --r; continue; } let a = e.slice(0, r); if (n.encode(a).length <= t) return a; --r; } return ``; } function normalizeEveAttributes(e) { let t = {}; for (let [n, r] of Object.entries(e)) r !== void 0 && (t[n] = truncateForTag(typeof r == `number` ? String(r) : r)); return t; } //#endregion //#region node_modules/eve/dist/src/internal/instrumentation.js const FRAMEWORK_CHANNEL_KINDS = /* @__PURE__ */ new Set([ `http`, `schedule`, `subagent` ]); function isInstrumentationChannelKind(e) { return e.startsWith(`channel:`) || FRAMEWORK_CHANNEL_KINDS.has(e); } function normalizeInstrumentationChannelKind(e) { return e !== void 0 && isInstrumentationChannelKind(e) ? e : `unknown`; } function resolveInstrumentationProjection(n) { let { invoke: r, log: i, source: a } = n, o; try { o = r(); } catch (t) { i.warn(`ignoring instrumentation projection after projector failure`, { error: formatError(t), source: a }); return; } if (isThenable(o)) { i.warn(`ignoring instrumentation projection because it returned a Promise`, { source: a }), Promise.resolve(o).catch((t) => { i.warn(`ignored instrumentation projection Promise rejected`, { error: formatError(t), source: a }); }); return; } if (o !== void 0) { if (!isPlainRecord(o)) { i.warn(`ignoring instrumentation projection because it is not a record`, { source: a }); return; } try { return parseJsonObject(o); } catch (t) { i.warn(`ignoring instrumentation projection because it is outside the JSON contract`, { error: formatError(t), source: a }); return; } } } //#endregion //#region node_modules/eve/dist/src/channel/instrumentation.js const log$15 = createLogger(`channel.instrumentation`); function buildChannelInstrumentationProjection(e) { let { adapter: t, channelName: n, existingKind: r } = e; return { kind: resolveKind({ adapter: t, channelName: n, existingKind: r }), metadata: resolveMetadata(t) }; } function resolveKind(e) { let { adapter: r, channelName: i, existingKind: a } = e; if (a !== void 0) return a; if (i !== void 0 && i.length > 0) return `channel:${i}`; let o = getAdapterKind(r); return isInstrumentationChannelKind(o) ? o : `channel:${o}`; } function resolveMetadata(e) { let n = e.instrumentation?.metadata; return n === void 0 ? {} : resolveInstrumentationProjection({ invoke: () => n(e.state), log: log$15, source: getAdapterKind(e) }) ?? {}; } //#endregion //#region node_modules/eve/dist/src/execution/channel-context.js function setChannelContext(e, t, n = {}) { e.set(ChannelKey, t), e.set(ChannelInstrumentationKey, buildChannelInstrumentationProjection({ adapter: t, channelName: n.channelName, existingKind: e.get(ChannelInstrumentationKey)?.kind })); } //#endregion //#region node_modules/eve/dist/src/execution/runtime-context.js function buildRunContext(t) { let { bundle: n, run: r } = t, i = new ContextContainer(), a = r.auth; if (i.set(BundleKey, n), setChannelContext(i, r.adapter, { channelName: r.channelName }), r.channelMetadata !== void 0) { let e = i.get(ChannelInstrumentationKey); i.set(ChannelInstrumentationKey, { kind: e?.kind ?? r.channelMetadata.kind, metadata: r.channelMetadata.metadata }); } return i.set(ContinuationTokenKey, r.continuationToken ?? ``), i.set(ModeKey, r.mode), i.set(AuthKey, a), i.set(InitiatorAuthKey, r.initiatorAuth ?? a), r.capabilities !== void 0 && i.set(CapabilitiesKey, r.capabilities), r.requestId !== void 0 && i.set(ChannelRequestIdKey, r.requestId), r.callback !== void 0 && i.set(SessionCallbackKey, r.callback), r.parent !== void 0 && i.set(ParentSessionKey, r.parent), i; } //#endregion //#region node_modules/eve/dist/src/execution/ndjson-stream.js function parseNdjsonStream(e) { let t = new TextDecoder(), n = ``, r, i = !1; return new ReadableStream({ async start(a) { r = e().getReader(); try { for (;;) { let { value: e, done: i } = await r.read(); if (i) break; n += t.decode(e, { stream: !0 }); for (let e = n.indexOf(` `); e !== -1; e = n.indexOf(` `)) { let t = n.slice(0, e).trim(); n = n.slice(e + 1), t.length > 0 && a.enqueue(JSON.parse(t)); } } if (i) return; n += t.decode(); let e = n.trim(); e.length > 0 && a.enqueue(JSON.parse(e)), a.close(); } catch (e) { i || a.error(e); } finally { r.releaseLock(); } }, async cancel(e) { i = !0, await r?.cancel(e); } }); } //#endregion //#region node_modules/eve/dist/src/execution/workflow-runtime.js const WORKFLOW_ENTRY_NAME = `workflowEntry`; const TURN_WORKFLOW_NAME = `turnWorkflow`; const EVE_PACKAGE_INFO = resolveInstalledPackageInfo(); const STABLE_ID_BASE = EVE_PACKAGE_INFO.name; const log$14 = createLogger(`execution.workflow-runtime`); const workflowEntryReference = { workflowId: `workflow//${STABLE_ID_BASE}//${WORKFLOW_ENTRY_NAME}` }; const turnWorkflowReference = { workflowId: `workflow//${STABLE_ID_BASE}//${TURN_WORKFLOW_NAME}` }; function createWorkflowRuntime(e) { return { async run(n) { let r = await getCompiledRuntimeAgentBundle({ compiledArtifactsSource: e.compiledArtifactsSource, nodeId: e.nodeId }), i = serializeContext(buildRunContext({ bundle: r, run: n })), a = readParentLineage(i), o = a.sessionId === void 0 ? buildSessionAttributes({ inputMessage: n.title ?? n.input.message, serializedContext: i }) : buildSubagentRootAttributes({ identity: { nodeId: r.nodeId ?? ROOT_RUNTIME_AGENT_NODE_ID }, parentCallId: a.callId, parentSessionId: a.sessionId, parentTurnId: a.turnId, rootSessionId: a.rootSessionId ?? a.sessionId, serializedContext: i }), s; try { s = await startWorkflowPreferLatest(workflowEntryReference, [{ input: n.input, serializedContext: i }], { allowReservedAttributes: !0, attributes: normalizeEveAttributes(o) }); } catch (e) { throw logError(log$14, `failed to start workflow run`, e, { continuationToken: n.continuationToken }), e; } let c, getEvents = () => (c ??= parseNdjsonStream(() => X$9(s.runId).getReadable()), c); return { continuationToken: n.continuationToken ?? s.runId, get events() { return getEvents(); }, sessionId: s.runId }; }, async deliver(e) { let r = { auth: e.auth, kind: `deliver`, payloads: [e.payload], requestId: e.requestId }; try { return { sessionId: normalizeWorkflowHook(await E$9(e.continuationToken, r)).runId }; } catch (r) { throw b$9.is(r) ? new RuntimeNoActiveSessionError(e.continuationToken) : (logError(log$14, `failed to deliver to active session`, r, { continuationToken: e.continuationToken }), r); } }, async getEventStream(e, t) { return parseNdjsonStream(() => X$9(e).getReadable({ startIndex: t?.startIndex })); } }; } async function startWorkflowPreferLatest(e, t, n) { if (!shouldRouteToLatestDeployment()) return n === void 0 ? await B$8(e, t) : await B$8(e, t, n); try { return await B$8(e, t, { ...n, deploymentId: `latest` }); } catch (r) { if (!isLatestDeploymentUnsupportedError(r)) throw r; return n === void 0 ? await B$8(e, t) : await B$8(e, t, n); } } function shouldRouteToLatestDeployment() { return process.env.VERCEL_ENV === `production`; } function isLatestDeploymentUnsupportedError(e) { return e instanceof Error && e.message.includes(`deploymentId 'latest' requires a World that implements resolveLatestDeploymentId()`); } function normalizeWorkflowHook(e) { if (typeof e != `object` || !e || !(`runId` in e)) throw Error(`Workflow hook did not include a run id.`); let t = e.runId; if (typeof t != `string` || t.length === 0) throw Error(`Workflow hook did not include a run id.`); return { runId: t }; } //#endregion //#region node_modules/eve/dist/src/internal/nitro/routes/health.js var health_default = async (e) => Response.json({ ok: !0, status: `ready`, workflowId: workflowEntryReference.workflowId }); //#endregion //#region node_modules/eve/dist/src/internal/nitro/routes/agent-info/build-agent-info-response.js function renderChannel(e, t) { return { ...toSource(e), adapterKind: e.adapter?.kind, method: e.method, name: e.name, origin: t.origin, urlPath: e.urlPath }; } function renderTool(e, t) { return { ...toSource(e), description: e.description, hasAuth: !1, hasExecute: e.execute !== void 0, hasModelOutputProjection: e.toModelOutput !== void 0, hasOutputSchema: e.outputSchema !== void 0 && e.outputSchema !== null, inputSchema: e.inputSchema, name: e.name, origin: t.origin, outputSchema: e.outputSchema, replacesFrameworkTool: t.replacesFrameworkTool, requiresApproval: e.approval !== void 0 }; } function renderSchedule(e) { return { ...toSource(e), cron: e.cron, hasRun: e.hasRun, markdown: e.markdown, name: e.name }; } function renderSubagent(e) { return { ...toSource(e), description: e.description, entryPath: e.entryPath, name: e.name, nodeId: e.nodeId, rootPath: e.rootPath, summary: { channels: e.agent.channels.length, connections: e.agent.connections.length, hooks: e.agent.hooks.length, instructions: e.agent.instructions !== void 0, schedules: e.agent.schedules.length, skills: e.agent.skills.length, tools: e.agent.tools.length } }; } function renderDynamicResolver(e, t) { return { ...toSource(e), eventNames: [...e.eventNames], origin: t.origin, slug: e.slug }; } function toSource(e) { return { exportName: e.exportName, logicalPath: e.logicalPath, sourceId: e.sourceId, sourceKind: e.sourceKind }; } //#endregion //#region node_modules/eve/dist/src/internal/resolve-model-endpoint-status.js function resolveModelEndpointStatus(e, t) { return e.kind === `external` ? { kind: `external`, provider: e.provider } : t.apiKey ? { kind: `gateway`, connected: !0, credential: `api-key` } : t.oidc ? { kind: `gateway`, connected: !0, credential: `oidc` } : { kind: `gateway`, connected: !1 }; } //#endregion //#region node_modules/eve/dist/src/internal/nitro/routes/agent-info/build-agent-info-response-from-manifest.js function buildAgentInfoResponseFromManifest(i, a) { let o = i.manifest, s = o.channels.filter((e) => e.kind === `channel`), c = o.channels.filter((e) => e.kind === `disabled`).map((e) => e.name), l = new Set(o.tools.map((e) => e.name)), u = new Set(o.disabledFrameworkTools), d = getAllFrameworkToolNames(), f = getAllFrameworkChannelNames(), p = getFrameworkToolDefinitions({ hasConnections: o.connections.length > 0 }), m = getFrameworkChannelDefinitions(), h = p.filter((e) => !l.has(e.name) && !u.has(e.name)), g = o.tools.map((e) => ({ ...toSource(e), description: e.description, hasAuth: !1, hasCompactionHook: !1, hasExecute: !0, hasModelOutputProjection: !1, hasOutputSchema: e.outputSchema !== void 0 && e.outputSchema !== null, inputSchema: e.inputSchema, name: e.name, origin: `authored`, outputSchema: e.outputSchema ?? null, replacesFrameworkTool: d.has(e.name), requiresApproval: !1 })), _ = new Set(s.map((e) => e.name)), v = new Set(c), y = m.filter((e) => !_.has(e.name) && !v.has(e.name)), b = s.map((e) => ({ ...toSource(e), adapterKind: e.adapterKind, method: e.method, name: e.name, origin: `authored`, urlPath: e.urlPath })); return { agent: { agentRoot: o.agentRoot, appRoot: o.appRoot, configSource: o.config.source ? toSource(o.config.source) : void 0, description: o.config.description, model: { contextWindowTokens: o.config.model.contextWindowTokens, id: o.config.model.id, providerOptions: o.config.model.providerOptions, source: o.config.model.source ? toSource(o.config.model.source) : void 0, routing: o.config.model.routing, endpoint: resolveModelEndpointStatus(o.config.model.routing, a.gatewayCredentials) }, name: o.config.name, outputSchema: o.config.outputSchema }, capabilities: { devRoutes: a.mode === `development` }, channels: { authored: b, available: [...y.map((e) => renderChannel(e, { origin: `framework` })), ...b], disabledFramework: c, framework: m.filter((e) => f.has(e.name)).map((e) => { let t = _.has(e.name), n = v.has(e.name), r = n ? `disabled` : t ? `replaced` : `active`; return { ...renderChannel(e, { origin: `framework` }), disabledByAuthor: n, replacedByAuthoredChannel: t, status: r }; }) }, connections: o.connections.map((e) => ({ ...toSource(e), connectionName: e.connectionName, description: e.description, hasApproval: !1, hasAuthorization: e.vercelConnect !== void 0, hasHeaders: !1, protocol: e.protocol, url: e.url })), diagnostics: { discoveryErrors: o.diagnosticsSummary.errors, discoveryWarnings: o.diagnosticsSummary.warnings }, hooks: o.hooks.map((e) => ({ ...toSource(e), eventNames: [], slug: e.slug })), instructions: { dynamic: o.dynamicInstructions.map((e) => renderDynamicResolver(e, { origin: `authored` })), static: o.instructions === void 0 ? null : { ...toSource(o.instructions), markdown: o.instructions.markdown, name: o.instructions.name } }, kind: `eve-agent-info`, mode: a.mode, sandbox: o.sandbox === null ? null : { ...toSource(o.sandbox), description: o.sandbox.description, hasBootstrap: !1, hasOnSession: !1, revalidationKey: o.sandbox.revalidationKey, sourceHash: o.sandbox.sourceHash }, schedules: i.schedules.map(renderSchedule), skills: { static: o.skills.map((e) => ({ ...toSource(e), description: e.description, license: e.license, markdown: e.markdown, metadata: e.metadata, name: e.name })), dynamic: o.dynamicSkills.map((e) => renderDynamicResolver(e, { origin: `authored` })) }, subagents: { local: o.subagents.map(renderSubagent), total: o.subagents.length }, tools: { available: [...h.map((e) => renderTool(e, { origin: `framework`, replacesFrameworkTool: !1 })), ...g], authored: g, disabledFramework: [...o.disabledFrameworkTools], dynamic: [...o.connections.length > 0 ? [renderDynamicResolver(createConnectionSearchResolver(), { origin: `framework` })] : [], ...o.dynamicTools.map((e) => renderDynamicResolver(e, { origin: `authored` }))], framework: p.map((e) => { let t = l.has(e.name), n = u.has(e.name), r = n ? `disabled` : t ? `replaced` : `active`; return { ...renderTool(e, { origin: `framework`, replacesFrameworkTool: !1 }), disabledByAuthor: n, replacedByAuthoredTool: t, status: r }; }), reserved: [WORKFLOW_TOOL_NAME, LOAD_SKILL_TOOL_NAME] }, version: 1, workflow: { enabled: o.workflowEnabled, toolName: WORKFLOW_TOOL_NAME }, workspace: { resourceRoot: o.workspaceResourceRoot, rootEntries: [...o.workspaceResourceRoot.rootEntries] } }; } //#endregion //#region node_modules/eve/dist/src/internal/nitro/dev-runtime-artifacts.js function readDevelopmentRuntimeArtifactsSnapshotRoot(e) { let t = readDevelopmentRuntimeArtifactsPointer(e); if (t !== void 0) return t.version === 1 ? t.appRoot : t.runtimeAppRoot; } function readDevelopmentRuntimeArtifactsPointer(n) { if (!(n === void 0 || !existsSync(n))) try { let e = JSON.parse(readFileSync(n, `utf8`)); return e.kind !== `eve-dev-runtime-artifacts-pointer` || typeof e.version != `number` ? void 0 : e.version === 1 && typeof e.appRoot == `string` && e.appRoot.length > 0 ? { appRoot: e.appRoot, kind: `eve-dev-runtime-artifacts-pointer`, version: 1 } : e.version === 2 && typeof e.appRoot == `string` && typeof e.runtimeAppRoot == `string` && e.runtimeAppRoot.length > 0 && typeof e.snapshotRoot == `string` && e.snapshotRoot.length > 0 ? { appRoot: e.appRoot, kind: `eve-dev-runtime-artifacts-pointer`, runtimeAppRoot: e.runtimeAppRoot, snapshotRoot: e.snapshotRoot, version: 2 } : void 0; } catch { return; } } //#endregion //#region node_modules/eve/dist/src/runtime/schedules/register.js const EVE_SCHEDULE_TASK_NAME_PREFIX = `eve.schedule.`; var ScheduleRegistrationError = class extends Error { scheduleId; sourceId; taskName; constructor(e, t = {}) { super(e), this.name = `ScheduleRegistrationError`, t.scheduleId !== void 0 && (this.scheduleId = t.scheduleId), t.sourceId !== void 0 && (this.sourceId = t.sourceId), t.taskName !== void 0 && (this.taskName = t.taskName); } }; function createScheduleRegistrations(e) { let t = e.map((e) => ({ cron: e.cron, description: `Run eve schedule "${e.name}" from "${e.logicalPath}".`, logicalPath: e.logicalPath, scheduleId: e.name, sourceId: e.sourceId, taskName: createScheduleTaskName(e.sourceId) })).sort((e, t) => e.sourceId.localeCompare(t.sourceId)); return assertUniqueScheduleIds(t), t; } function assertUniqueScheduleIds(e) { let t = /* @__PURE__ */ new Map(); for (let n of e) { let e = t.get(n.scheduleId); if (e === void 0) { t.set(n.scheduleId, n); continue; } throw new ScheduleRegistrationError(`Duplicate authored schedule id "${n.scheduleId}" found in "${e.logicalPath}" and "${n.logicalPath}".`, { scheduleId: n.scheduleId, sourceId: n.sourceId, taskName: n.taskName }); } } function createScheduleTaskName(t) { return `${EVE_SCHEDULE_TASK_NAME_PREFIX}${Buffer.from(t, `utf8`).toString(`base64url`)}`; } //#endregion //#region node_modules/eve/dist/src/runtime/schedules/resolve-schedule.js var ResolveScheduleError = class extends Error { taskName; constructor(e, t = {}) { super(e), this.name = `ResolveScheduleError`, t.taskName !== void 0 && (this.taskName = t.taskName); } }; async function resolveSchedules(e) { return [...e.manifest.schedules].map((e) => { let t = { cron: e.cron, hasRun: e.hasRun, logicalPath: e.logicalPath, name: e.name, sourceId: e.sourceId, sourceKind: e.sourceKind }; return e.markdown === void 0 ? t : { ...t, markdown: e.markdown }; }); } async function loadResolvedCompiledSchedules(t) { return await resolveSchedules({ manifest: await loadCompiledManifest({ compiledArtifactsSource: t.compiledArtifactsSource }) }); } async function loadResolvedCompiledScheduleByTaskName(e, n) { let r = await loadResolvedCompiledSchedules(n), i = new Map(r.map((e) => [e.sourceId, e])); for (let n of createScheduleRegistrations(r)) if (n.taskName === e) { let e = i.get(n.sourceId); if (e !== void 0) return e; } throw new ResolveScheduleError(`No compiled authored schedule is registered for Nitro task "${e}".`, { taskName: e }); } //#endregion //#region node_modules/eve/dist/src/internal/nitro/routes/agent-info/load-agent-info-data.js async function loadAgentInfoManifestData(e) { let t = await loadCompiledManifest({ compiledArtifactsSource: e.compiledArtifactsSource }); return { manifest: t, schedules: await resolveSchedules({ manifest: t }) }; } function resolveAgentInfoCompiledArtifactsSource(r = {}) { if (r.dev === !0 && r.appRoot !== void 0) return createDiskRuntimeCompiledArtifactsSource(readDevelopmentRuntimeArtifactsSnapshotRoot(r.devRuntimeArtifactsPointerPath) ?? r.appRoot); if (readBundledCompiledArtifacts() !== null) return createBundledRuntimeCompiledArtifactsSource(); if (r.appRoot !== void 0) return createDiskRuntimeCompiledArtifactsSource(r.appRoot); throw Error(`eve agent info runtime data requires bundled artifacts or an app root.`); } //#endregion //#region node_modules/eve/dist/src/internal/nitro/routes/info.js async function createAgentInfoPayload(e) { let r = await loadAgentInfoManifestData({ compiledArtifactsSource: resolveAgentInfoCompiledArtifactsSource(e) }); return buildAgentInfoResponseFromManifest(r, { mode: e.mode ?? `development`, gatewayCredentials: await resolveGatewayCredentialPresence(r.manifest.config.model.routing) }); } function hasEnvValue(e) { return e !== void 0 && e.trim() !== ``; } async function resolveGatewayCredentialPresence(t) { let n = hasEnvValue(process.env.AI_GATEWAY_API_KEY); if (t.kind === `external` || n) return { apiKey: n, oidc: !1 }; try { return await T$7(), { apiKey: !1, oidc: !0 }; } catch { return { apiKey: !1, oidc: !1 }; } } async function handleAgentInfoRequest(e, t) { let n = await routeAuth(t, [vercelOidc(), localDev()]); return n instanceof Response ? n : new Response(JSON.stringify(await createAgentInfoPayload(e)), { headers: { "cache-control": `no-store`, "content-type": `application/json; charset=utf-8` } }); } //#endregion //#region node_modules/eve/dist/src/internal/vercel/project-link.js const VercelProjectLinkSchema = Ls$3.object({ projectId: Ls$3.string().min(1), orgId: Ls$3.string().min(1), projectName: Ls$3.string().min(1).optional() }); async function readVercelProjectLink(e) { try { let t = await readFile(join(e, `.vercel`, `project.json`), `utf8`), n = VercelProjectLinkSchema.safeParse(JSON.parse(t)); return n.success ? n.data : void 0; } catch { return; } } //#endregion //#region node_modules/eve/dist/src/internal/nitro/routes/runtime-artifacts.js function resolveNitroCompiledArtifactsSource(e) { let { appRoot: t, dev: n } = e; if (n && t !== void 0) { if (e.moduleMapLoaderPath === void 0) throw Error(`eve Nitro development routes require "moduleMapLoaderPath" in the artifacts config.`); return createDiskRuntimeCompiledArtifactsSource(readDevelopmentRuntimeArtifactsSnapshotRoot(e.devRuntimeArtifactsPointerPath) ?? t, { moduleMapLoaderPath: e.moduleMapLoaderPath, sandboxAppRoot: t }); } if (readBundledCompiledArtifacts() !== null) return createBundledRuntimeCompiledArtifactsSource(); if (t !== void 0) return createDiskRuntimeCompiledArtifactsSource(t); throw Error(`eve Nitro route requires bundled artifacts or an eve Nitro runtime configuration app root.`); } //#endregion //#region node_modules/eve/dist/src/internal/nitro/routes/runtime-stack.js async function resolveNitroChannelRuntimeBundle(e) { let t = resolveNitroCompiledArtifactsSource(e), n = await getCompiledRuntimeAgentBundle({ compiledArtifactsSource: t }), r = createWorkflowRuntime({ compiledArtifactsSource: t }); return { channels: n.graph.root.channels, runtime: r }; } //#endregion //#region node_modules/eve/dist/src/internal/nitro/routes/channel-dispatch.js const log$13 = createLogger(`channel.dispatch`); async function dispatchChannelRequest(e, t, r) { let i = await resolveNitroChannelRuntimeBundle(r), a = i.channels.find((e) => `${e.method.toUpperCase()} ${e.urlPath}` === t); if (a === void 0) return Response.json({ error: `No matching channel for this request.`, ok: !1 }, { status: 404 }); let o = buildRouteArgs(e, i, a.name), c; try { c = await withDevelopmentVercelOidcContext(r, e.req, async () => { if (a.handler) return await a.handler(e.req, o.args); let t = { agent: o.agent, waitUntil: o.args.waitUntil, params: o.args.params, requestIp: o.args.requestIp }; return await a.fetch(e.req, t); }); } catch (r) { let i = logError(log$13, `channel handler threw`, r, { routeKey: t, channel: a.name }); return flushBackgroundTasks(e, o.backgroundTasks, t, a.name), Response.json({ error: `Channel handler failed.`, errorId: i, ok: !1 }, { status: 500 }); } return flushBackgroundTasks(e, o.backgroundTasks, t, a.name), c; } async function withDevelopmentVercelOidcContext(e, t, n) { let r = e.appRoot; return e.dev !== !0 || r === void 0 ? await n() : await withVercelOidcProjectResolver({ request: t, resolveCurrentProject: async () => { let e = await readVercelProjectLink(r); return e === void 0 ? void 0 : { environment: `development`, projectId: e.projectId }; } }, n); } function buildRouteArgs(t, n, o) { let s = readVercelRequestId(t.req.headers), c = extractSocketIp(t), l = [], u = t.context.params ?? {}, d = {}; for (let [e, t] of Object.entries(u)) d[e] = decodeURIComponent(t); let waitUntil = (e) => { l.push(e); }, f = n.channels.find((e) => e.name === o)?.adapter ?? { kind: `channel` }; return { agent: createRouteAgent(n.runtime, s), args: { send: createSendFn(n.runtime, f, o, { requestId: s }), getSession: createGetSessionFn(n.runtime), receive: createCrossChannelReceiveFn(n.runtime, toCrossChannelTargets(n.channels)), params: d, waitUntil, requestIp: c }, backgroundTasks: l }; } function createRouteAgent(e, t) { return { async deliver(n) { let r = { ...n, requestId: t }; return await e.deliver(r); }, async getEventStream(t, n) { return await e.getEventStream(t, n); }, async run(n) { let r = { ...n, requestId: t }; return await e.run(r); } }; } function readVercelRequestId(e) { let t = e.get(`x-vercel-id`)?.trim(); return t === `` ? void 0 : t; } function flushBackgroundTasks(e, t, r, i) { t.length !== 0 && e.waitUntil(Promise.allSettled(t).then((e) => { for (let t of e) t.status === `rejected` && logError(log$13, `channel background task failed`, t.reason, { routeKey: r, channel: i }); })); } function extractSocketIp(e) { let t = e.req.ip; return typeof t == `string` && t.length > 0 ? t : null; } //#endregion //#region node_modules/eve/dist/src/internal/workflow/builtins.js async function __builtin_response_array_buffer$1() { return await this.arrayBuffer(); } async function __builtin_response_json$1() { return await this.json(); } async function __builtin_response_text$1() { return await this.text(); } const EVE_UNSUPPORTED_WORLD_WARNED$1 = Symbol.for(`@workflow/setAttributes//unsupportedWorldWarned`); function formatUnknownError$1(e) { return e instanceof Error ? e.stack ?? `${e.name}: ${e.message}` : String(e); } async function __builtin_set_attributes$1(t, n) { if (t.length === 0) return; let r = globalThis, i = r[Symbol.for(`WORKFLOW_STEP_CONTEXT_STORAGE`)]?.getStore?.(), a = typeof i?.stepMetadata?.attempt == `number` ? i.stepMetadata.attempt : 3, o = r[Symbol.for(`@workflow/world//cache`)]; if (typeof o?.runs?.experimentalSetAttributes != `function`) { if (r[EVE_UNSUPPORTED_WORLD_WARNED$1] !== !0) { r[EVE_UNSUPPORTED_WORLD_WARNED$1] = !0; let t = o?.name === void 0 ? `` : ` (${o.name})`; console.warn(`[eve] setAttributes: the current world implementation${t} does not implement experimentalSetAttributes; this call (and any subsequent setAttributes calls in this process) is a no-op. Attributes will become available once the world adapter adds support.`); } return; } try { let e = i?.workflowMetadata?.workflowRunId; if (e === void 0) throw Error(`__builtin_set_attributes: no workflow run id available in step context`); await o.runs.experimentalSetAttributes(e, t, n); } catch (e) { if (a < 3) throw e; console.error(`[eve] setAttributes: failed to post tags after 3 attempts; dropping the internal attribute write. ${formatUnknownError$1(e)}`); } } __builtin_set_attributes$1.maxRetries = 2; s$7("__builtin_response_array_buffer", __builtin_response_array_buffer$1); s$7("__builtin_response_json", __builtin_response_json$1); s$7("__builtin_response_text", __builtin_response_text$1); s$7("__builtin_set_attributes", __builtin_set_attributes$1); //#endregion //#region node_modules/eve/dist/src/internal/workflow/queue-namespace.js const WORKFLOW_QUEUE_NAMESPACE_ENV = `WORKFLOW_QUEUE_NAMESPACE`; function deriveEveWorkflowQueueNamespace(e) { return `eve${Array.from(new TextEncoder().encode(e), (e) => e.toString(16).padStart(2, `0`)).join(``)}`; } function installEveWorkflowQueueNamespace(t) { let n = deriveEveWorkflowQueueNamespace(t); return process.env[WORKFLOW_QUEUE_NAMESPACE_ENV] = n, n; } //#endregion //#region node_modules/eve/dist/src/public/definitions/connections/mcp.js function defineMcpClientConnection(e) { return e.auth !== void 0 && typeof e.auth != `function` && (e.auth = normalizeAuthorizationSpec(e.auth, `defineMcpClientConnection:`)), stampDefinitionKey(e, `connection:${e.url}`), stampConnectionProtocol(e, `mcp`), e; } //#endregion //#region agent/connections/dataforseo.ts var dataforseo_exports = /* @__PURE__ */ __exportAll({ default: () => dataforseo_default }); var dataforseo_default = defineMcpClientConnection({ url: "https://mcp.dataforseo.com/mcp", description: "DataForSEO rankings data: live SERP results by keyword/location, the domain's ranked keywords with position and search volume, keyword gaps against competitors, and search volume lookups.", headers: { Authorization: `Basic ${Buffer.from(`${process.env.DATAFORSEO_LOGIN ?? ""}:${process.env.DATAFORSEO_PASSWORD ?? ""}`).toString("base64")}` }, tools: { allow: [ "serp_organic_live_advanced", "dataforseo_labs_google_ranked_keywords", "dataforseo_labs_google_domain_intersection", "keywords_data_google_ads_search_volume" ] } }); //#endregion //#region node_modules/eve/dist/src/public/definitions/sandbox.js function defineSandbox(e) { return e; } //#endregion //#region agent/sandbox/sandbox.ts var sandbox_exports$1 = /* @__PURE__ */ __exportAll({ default: () => sandbox_default }); var sandbox_default = defineSandbox({ backend: defaultSandbox({ vercel: { networkPolicy: "allow-all" }, docker: { networkPolicy: "allow-all" } }), revalidationKey: () => "seo-improver-agent-browser-gh-v1", async bootstrap({ use }) { const sandbox = await use(); await sandbox.run({ command: "bash setup-agent-browser.sh" }); await sandbox.run({ command: "bash setup-gh.sh seo-improver" }); } }); //#endregion //#region agent/lib/search-console.ts const TOKEN_URL = "https://oauth2.googleapis.com/token"; const SCOPE = "https://www.googleapis.com/auth/webmasters.readonly"; const API_BASE = "https://searchconsole.googleapis.com/webmasters/v3"; async function serviceAccountToken() { const raw = process.env.GSC_CREDENTIALS_JSON; if (!raw) throw new Error("GSC_CREDENTIALS_JSON is not set"); const { client_email, private_key } = JSON.parse(raw); const now = Math.floor(Date.now() / 1e3); const signingInput = `${Buffer.from(JSON.stringify({ alg: "RS256", typ: "JWT" })).toString("base64url")}.${Buffer.from(JSON.stringify({ iss: client_email, scope: SCOPE, aud: TOKEN_URL, iat: now, exp: now + 3600 })).toString("base64url")}`; const assertion = `${signingInput}.${createSign("RSA-SHA256").update(signingInput).sign(private_key, "base64url")}`; const res = await fetch(TOKEN_URL, { method: "POST", headers: { "Content-Type": "application/x-www-form-urlencoded" }, body: new URLSearchParams({ grant_type: "urn:ietf:params:oauth:grant-type:jwt-bearer", assertion }) }); if (!res.ok) throw new Error(`Search Console token exchange failed: ${res.status} ${await res.text()}`); const data = await res.json(); if (!data.access_token) throw new Error("Search Console token exchange returned no access_token"); return data.access_token; } async function apiRequest(path, init) { const token = await serviceAccountToken(); const res = await fetch(`${API_BASE}${path}`, { ...init, headers: { authorization: `Bearer ${token}`, "content-type": "application/json", ...init?.headers } }); if (!res.ok) throw new Error(`Search Console request failed: ${res.status} ${await res.text()}`); return res.json(); } const searchAnalyticsQueryInputSchema = { type: "object", additionalProperties: false, required: [ "siteUrl", "startDate", "endDate" ], properties: { siteUrl: { type: "string", description: "The property, e.g. `sc-domain:example.com` or `https://www.example.com/`." }, startDate: { type: "string", description: "YYYY-MM-DD (inclusive)." }, endDate: { type: "string", description: "YYYY-MM-DD (inclusive)." }, dimensions: { type: "array", items: { type: "string", enum: [ "query", "page", "country", "device", "date", "searchAppearance" ] } }, type: { type: "string", enum: [ "web", "image", "video", "news", "discover", "googleNews" ] }, dataState: { type: "string", enum: ["final", "all"] }, rowLimit: { type: "integer", description: "Max rows, up to 25000." }, startRow: { type: "integer", description: "Zero-based row offset for paging." }, dimensionFilterGroups: { type: "array", items: { type: "object", additionalProperties: true } } } }; async function querySearchAnalytics(input) { const { siteUrl, ...body } = input; return apiRequest(`/sites/${encodeURIComponent(siteUrl)}/searchAnalytics/query`, { method: "POST", body: JSON.stringify(body) }); } async function listSites() { return apiRequest("/sites"); } //#endregion //#region agent/tools/list_search_console_sites.ts var list_search_console_sites_exports = /* @__PURE__ */ __exportAll({ default: () => list_search_console_sites_default }); var list_search_console_sites_default = defineTool({ description: "List the Search Console properties the configured service account can access. Useful to confirm access and the exact property name before querying.", inputSchema: { type: "object", additionalProperties: false, properties: {} }, async execute() { return listSites(); } }); //#endregion //#region agent/tools/query_search_analytics.ts var query_search_analytics_exports = /* @__PURE__ */ __exportAll({ default: () => query_search_analytics_default }); var query_search_analytics_default = defineTool({ description: "Query Google Search Console Search Analytics for the property: the site's own real clicks, impressions, CTR, and average position by query, page, country, device, and date. First-party ground truth for striking-distance, low-CTR, cannibalization, and decay analysis.", inputSchema: searchAnalyticsQueryInputSchema, async execute(input) { return querySearchAnalytics(input); } }); //#endregion //#region .eve/compile/compiled-artifacts-bootstrap.mjs installEveWorkflowQueueNamespace("qr-master"); const moduleMap = Object.freeze({ "nodes": Object.freeze({ "__root__": Object.freeze({ "modules": Object.freeze({ "connections/dataforseo.ts": dataforseo_exports, "sandbox/sandbox.ts": sandbox_exports$1, "tools/list_search_console_sites.ts": list_search_console_sites_exports, "tools/query_search_analytics.ts": query_search_analytics_exports }) }) }) }); const metadata = { "compile": { "moduleMap": { "path": ".eve/compile/module-map.mjs", "sha256": "c76cab7c1a37dca6eb591740264f371cca3e74760abc1f9fc4652f959f1e0353" } }, "discovery": { "diagnostics": { "path": ".eve/discovery/diagnostics.json", "sha256": "b26fc8e66ee943f962b1bab4a790f6a611ce7e6738aa29f83ea53b73cc362c63" }, "manifest": { "path": ".eve/discovery/agent-discovery-manifest.json", "sha256": "305c68e3493f0a1ba53702641dbf8675e60374b68a24b73f13b69ac6246dbcaa" }, "sourceGraphHash": "3370c163e654fd12b5b4097da0747ee823445d615e0713c04b38ac808c739532", "summary": { "errors": 0, "warnings": 0 } }, "generator": { "name": "eve", "version": "0.16.2" }, "kind": "eve-compile-metadata", "status": "ready", "version": 5 }; const manifest = { "agentRoot": "C:\\Users\\timo\\Documents\\qrmaster\\QR-master\\agent", "appRoot": "C:\\Users\\timo\\Documents\\qrmaster\\QR-master", "channels": [], "connections": [{ "connectionName": "dataforseo", "logicalPath": "connections/dataforseo.ts", "sourceId": "connections/dataforseo.ts", "sourceKind": "module", "description": "DataForSEO rankings data: live SERP results by keyword/location, the domain's ranked keywords with position and search volume, keyword gaps against competitors, and search volume lookups.", "protocol": "mcp", "url": "https://mcp.dataforseo.com/mcp" }], "config": { "compaction": {}, "model": { "id": "anthropic/claude-sonnet-4.6", "routing": { "kind": "gateway", "target": "anthropic" }, "contextWindowTokens": 1e6 }, "name": "qr-master" }, "diagnosticsSummary": { "errors": 0, "warnings": 0 }, "disabledFrameworkTools": [], "workflowEnabled": false, "dynamicInstructions": [], "dynamicSkills": [], "dynamicTools": [], "hooks": [], "remoteAgents": [], "sandbox": { "backendName": "just-bash", "logicalPath": "sandbox/sandbox.ts", "revalidationKey": "seo-improver-agent-browser-gh-v1", "sourceHash": "838127a7092961bbfd47e3b91a0e14b19afb7d655167d4d079c474abd40f570e", "sourceId": "sandbox/sandbox.ts", "sourceKind": "module" }, "sandboxWorkspaces": [{ "logicalPath": "sandbox/workspace", "rootEntries": ["setup-agent-browser.sh", "setup-gh.sh"], "sourceId": "sandbox/workspace", "sourcePath": "C:\\Users\\timo\\Documents\\qrmaster\\QR-master\\agent\\sandbox\\workspace" }], "schedules": [{ "cron": "0 9 * * 1", "hasRun": false, "logicalPath": "schedules/weekly.ts", "name": "weekly", "sourceId": "schedules/weekly.ts", "sourceKind": "module", "markdown": "Run the weekly SEO improver loop for the configured property and tracked keywords." }], "skills": [], "tools": [{ "description": "List the Search Console properties the configured service account can access. Useful to confirm access and the exact property name before querying.", "inputSchema": { "type": "object", "additionalProperties": false, "properties": {} }, "logicalPath": "tools/list_search_console_sites.ts", "name": "list_search_console_sites", "sourceId": "tools/list_search_console_sites.ts", "sourceKind": "module" }, { "description": "Query Google Search Console Search Analytics for the property: the site's own real clicks, impressions, CTR, and average position by query, page, country, device, and date. First-party ground truth for striking-distance, low-CTR, cannibalization, and decay analysis.", "inputSchema": { "type": "object", "additionalProperties": false, "required": [ "siteUrl", "startDate", "endDate" ], "properties": { "siteUrl": { "type": "string", "description": "The property, e.g. `sc-domain:example.com` or `https://www.example.com/`." }, "startDate": { "type": "string", "description": "YYYY-MM-DD (inclusive)." }, "endDate": { "type": "string", "description": "YYYY-MM-DD (inclusive)." }, "dimensions": { "type": "array", "items": { "type": "string", "enum": [ "query", "page", "country", "device", "date", "searchAppearance" ] } }, "type": { "type": "string", "enum": [ "web", "image", "video", "news", "discover", "googleNews" ] }, "dataState": { "type": "string", "enum": ["final", "all"] }, "rowLimit": { "type": "integer", "description": "Max rows, up to 25000." }, "startRow": { "type": "integer", "description": "Zero-based row offset for paging." }, "dimensionFilterGroups": { "type": "array", "items": { "type": "object", "additionalProperties": true } } } }, "logicalPath": "tools/query_search_analytics.ts", "name": "query_search_analytics", "sourceId": "tools/query_search_analytics.ts", "sourceKind": "module" }], "workspaceResourceRoot": { "contentHash": "9f97e6abb4302039c6c4e2b3d4de3cf5c149de805a90c3e20c3f21da697afb92", "logicalPath": "workspace-resources/__root__", "rootEntries": ["setup-agent-browser.sh", "setup-gh.sh"] }, "instructions": { "name": "instructions", "logicalPath": "instructions.md", "markdown": "\r\nSearch Console property: https://www.qrmaster.net/\r\nProject domain: qrmaster.net\r\nTracked keywords: not set (derive from the domain's own ranked keywords)\r\nBlog repo and content path: not set (report-only)\r\n\r\n\r\nYou are an SEO improver agent. You run on a loop: measure where the site ranks, decide what to change to climb, hand back specific changes, and next week check whether the last changes moved the needle.\r\n\r\nYou do three things every run: **track rankings**, **prioritize a small set of high-leverage improvements**, and **report movement since the previous run**. You do not guess at rankings; you read them from data. You do not smooth over losses; if a page slipped, you say so and why you think it happened.\r\n\r\nYour project configuration is the `project-config` block at the top of this file. Do not assume values from examples. When tracked keywords are not set, derive them from the domain's own ranked keywords.\r\n\r\n## Data sources\r\n\r\nYou use two sources, and each answers a different question. **Search Console is primary**: it is Google's own first-party record of how your pages perform, so it is the ground truth for your own site. **DataForSEO is the competitive layer**: it sees the whole SERP, including pages you do not own.\r\n\r\nUse the `query_search_analytics` tool for your site's real performance: clicks, impressions, CTR, and average position by query and page, for the configured property. Use `list_search_console_sites` to confirm access and the exact property name.\r\n\r\nUse the `dataforseo` connection for what Search Console cannot see: the live SERP for a keyword, who ranks above you and what their pages do, search volume, and keyword gaps you do not yet rank for. It exposes only the tools for those four jobs. This is how you answer \"who is beating me and why\" and size the opportunity.\r\n\r\nIf either source is unauthorized or errors, stop and report that blocker instead of fabricating data. Do not silently fall back to a single source.\r\n\r\nUse native sandbox command execution for lightweight checks such as `curl`, `node`, CSV/JSON writing, HTTP status, titles, and parsing. Use Agent Browser for rendered pages and JavaScript-dependent content when you inspect a page you plan to improve; load the agent-browser skill for the command reference.\r\n\r\nKeep the run read-only against the target site. Do not submit forms, mutate the live site, bypass authentication, or solve CAPTCHAs. Respect robots and obvious rate limits. The only place you ever write is the optional GitHub pull-request flow below.\r\n\r\n## State and the loop\r\n\r\nPersist each run under `reports/seo-improver//`. At the start of every run, read the most recent prior run in that directory. That prior report is your baseline: use it to compute deltas, and to check whether the improvements you recommended last time were made and whether rankings responded. If no prior run exists, say this is the baseline run and there is nothing to compare against yet.\r\n\r\n## Each run\r\n\r\n1. Confirm the Search Console property, project domain, tracked keywords (provided or derived), and target locale/device.\r\n2. Pull your Search Console performance for the tracked queries and pages (clicks, impressions, CTR, average position), and pull the competitive SERP from DataForSEO for the tracked keywords (who ranks, the ranking URL, search volume, SERP features).\r\n3. Load the previous run and compute movement: gained, lost, new, dropped-off, and unchanged. Flag anything that fell out of the top 100.\r\n4. Identify the highest-leverage opportunities, ranked by realistic upside, not just raw volume:\r\n - **Striking distance**: queries at ~4-20 where a focused improvement can win a page-1 or top-3 slot; confirm the competition against the live SERP.\r\n - **High impressions, low CTR**: pages that earn impressions but lose the click; rewrite title/meta to win it without new rankings.\r\n - **Cannibalization**: several of your pages competing for one query; recommend which to consolidate.\r\n - **Decay**: pages whose clicks or position fell since a prior run; diagnose likely cause (content staleness, lost links, SERP change, intent shift) and check DataForSEO for what moved above you.\r\n5. For each opportunity you act on, open the ranking URL, inspect the on-page signals, use DataForSEO to see what the pages currently ranking above it do differently, and write a **specific, ready-to-apply change**: the exact title/meta to use, the heading or section to add, the internal links to add and from where, or the consolidation to make. Tie every recommendation to the ranking evidence that motivates it.\r\n6. Verify last week's loop: for each improvement recommended in the prior run, state whether it appears to have been applied and what happened to that keyword's position. Keep what worked, drop or revise what did not.\r\n\r\n## Output\r\n\r\nWrite two artifacts under `reports/seo-improver//`:\r\n\r\n- `rankings.csv` — the tracked-keyword snapshot for week-over-week diffing.\r\n\r\n ```csv\r\n keyword,location,device,position,previous_position,delta,ranking_url,search_volume,serp_features,status\r\n ```\r\n\r\n `status` is one of `gained`, `lost`, `new`, `dropped`, or `flat`. `delta` is positive when position improved (moved toward #1). Leave `previous_position` blank on the baseline run.\r\n\r\n- `report.md` — a concise Markdown report:\r\n 1. Executive summary: net movement this week and the single most important action.\r\n 2. Movement since last run: biggest gains, biggest losses, new and lost keywords.\r\n 3. Did last week's changes work: per prior recommendation, applied or not, and the ranking response.\r\n 4. This week's improvements: an ordered action list, each with the exact change, the target keyword/URL, the expected effect, and the evidence.\r\n 5. Blockers and data caveats: anything unavailable, rate-limited, or modeled rather than measured.\r\n\r\nUse stable IDs such as `SEO-STRIKE-001`, `SEO-CTR-002`, `SEO-DECAY-003` so recommendations are easy to reference across runs and you can report next week on the same ID.\r\n\r\nKeep the action list short and high-conviction. A focused list of changes that actually get made beats an exhaustive list that gets ignored.\r\n\r\n## Applying changes to a GitHub blog (optional)\r\n\r\nBy default you only report. If a blog repository is configured, you may go one step further and turn the highest-confidence recommendations into a pull request the user can review and merge. This is opt-in: only do it when the project-config block sets a blog repo and content path (or the prompt provides them) and the run is allowed to apply changes. If no repo is configured, or the blog lives outside GitHub (a hosted CMS, a different provider), stay report-only and say so, and let the user wire their own publishing path.\r\n\r\nUse the sandbox `bash` tool to run the GitHub CLI (`gh`), targeting the configured repo with `-R owner/repo`. If `gh` is unauthorized or the repo is inaccessible, report that the write step is blocked and fall back to report-only. Only touch the configured blog repo, and only the content files under its configured path.\r\n\r\nWhen you apply changes:\r\n\r\n1. Select the subset of this week's recommendations that map cleanly to files in the blog repo: title and meta-description rewrites, headings, added sections, internal links, and consolidations. Skip anything you cannot ground in a specific source file.\r\n2. Clone or fetch the repo, create a new branch named like `seo-improver/-`, and edit the source files (Markdown, MDX, or frontmatter). Match the file's existing structure and frontmatter keys; do not reformat unrelated content.\r\n3. Open a pull request with `gh pr create`. Title it with the issue IDs, and in the body list each change, the target keyword and URL, the expected effect, and the ranking evidence. Never push to the default branch, never merge, never force-push.\r\n4. Record every PR URL in `report.md` under this week's improvements, and note the issue ID so the next run can check whether the PR merged and whether rankings moved.\r\n\r\nOne branch and pull request per run unless the user asks otherwise. Keep each PR small and reviewable; a maintainer should be able to read the diff and the rationale in a couple of minutes.\r\n", "sourceId": "instructions.md", "sourceKind": "markdown" }, "kind": "eve-agent-compiled-manifest", "subagentEdges": [], "subagents": [], "version": 31 }; function installCompiledArtifactsBootstrap() { installBundledCompiledArtifacts({ manifest, metadata, moduleMap }); } installCompiledArtifactsBootstrap(); function installCompiledArtifactsPlugin() {} async function __eveInstallCompiledArtifactsStep() { return null; } s$7("step//./.eve/compile/compiled-artifacts-bootstrap//__eveInstallCompiledArtifactsStep", __eveInstallCompiledArtifactsStep); //#endregion //#region node_modules/eve/dist/src/harness/proxy-input-requests.js const PROXY_INPUT_REQUESTS_KEY = `eve.runtime.proxyInputRequests`; function getProxyInputRequests(e) { return new Map(Object.entries(readMap(e))); } function hasProxyInputRequests(e) { for (let t of Object.keys(readMap(e))) return !0; return !1; } function upsertProxyInputRequests(e) { let t = {}; for (let [n, r] of Object.entries(readMap(e.session.state))) r !== e.forChildContinuationToken && (t[n] = r); for (let [n, r] of e.entries) t[n] = r; return writeMap(e.session, t); } function clearProxyInputRequestsForChild(e, t) { let n = readMap(e.state), r = {}, i = !1; for (let [e, a] of Object.entries(n)) { if (a === t) { i = !0; continue; } r[e] = a; } return i ? writeMap(e, r) : e; } function toProxyInputRequestEntries(e) { return e.event.requests.map((t) => [t.requestId, e.childContinuationToken]); } function readMap(t) { let n = t?.[PROXY_INPUT_REQUESTS_KEY]; if (typeof n != `object` || !n || Array.isArray(n)) return {}; let r = {}; for (let [e, t] of Object.entries(n)) typeof t == `string` && (r[e] = t); return r; } function writeMap(t, n) { let r = { ...t.state }; return Object.keys(n).length === 0 ? (delete r[PROXY_INPUT_REQUESTS_KEY], { ...t, state: Object.keys(r).length > 0 ? r : void 0 }) : (r[PROXY_INPUT_REQUESTS_KEY] = n, { ...t, state: r }); } //#endregion //#region node_modules/eve/dist/src/runtime/actions/keys.js function getRuntimeActionRequestKey(e) { switch (e.kind) { case `load-skill`: return `runtime-action:${e.kind}:${e.callId}`; case `remote-agent-call`: return `subagent-call:${e.remoteAgentName}:${e.callId}`; case `subagent-call`: return `subagent-call:${e.subagentName}:${e.callId}`; case `tool-call`: return `tool-call:${e.toolName}:${e.callId}`; } } function getRuntimeActionResultKey(e) { switch (e.kind) { case `load-skill-result`: return `runtime-action:load-skill:${e.callId}`; case `subagent-result`: return `subagent-call:${e.subagentName}:${e.callId}`; case `tool-result`: return `tool-call:${e.toolName}:${e.callId}`; } } //#endregion //#region node_modules/eve/dist/src/harness/runtime-actions.js const PENDING_RUNTIME_ACTION_BATCH_KEY = `eve.runtime.pendingActionBatch`; function getPendingRuntimeActionBatch(e) { let t = e?.[PENDING_RUNTIME_ACTION_BATCH_KEY]; if (typeof t != `object` || !t) return; let n = t; if (!(!Array.isArray(n.actions) || !Array.isArray(n.responseMessages) || typeof n.event != `object` || n.event === null)) return n; } function setPendingRuntimeActionBatch(e) { let t = { ...e.session.state }; return t[PENDING_RUNTIME_ACTION_BATCH_KEY] = { actions: [...e.actions], event: e.event, responseMessages: [...e.responseMessages] }, { ...e.session, state: t }; } function recordPendingSubagentChildToken(e) { let t = getPendingRuntimeActionBatch(e.session.state); if (t === void 0) return e.session; let n = { ...e.session.state }; return n[PENDING_RUNTIME_ACTION_BATCH_KEY] = { ...t, childContinuationTokens: { ...t.childContinuationTokens, [e.callId]: e.childContinuationToken } }, { ...e.session, state: n }; } function resolveReadyRuntimeActionResults(e) { let t = getPendingRuntimeActionBatch(e.session.state); if (t !== void 0) return resolveRuntimeActionResultsForBatch({ batch: t, results: e.results }); } function resolveRuntimeActionResultsForBatch(e) { return resolveRuntimeActionResultsForKeys({ pendingKeys: e.batch.actions.map((e) => getRuntimeActionRequestKey(e)), results: e.results }); } function resolveRuntimeActionResultsForKeys(e) { let t = new Set(e.pendingKeys), n = /* @__PURE__ */ new Map(); for (let r of e.results) { let e = getRuntimeActionResultKey(r); t.has(e) && n.set(e, r); } let r = []; for (let t of e.pendingKeys) { let e = n.get(t); if (e === void 0) return; r.push(e); } return r; } async function resolvePendingRuntimeActions(t) { let r = getPendingRuntimeActionBatch(t.session.state); if (r === void 0) return { messages: [...t.session.history], outcome: `continue`, session: t.session }; let i = resolveReadyRuntimeActionResults({ results: t.stepInput?.runtimeActionResults ?? [], session: t.session }); if (i === void 0) return { messages: [...t.session.history], outcome: `unresolved`, session: t.session }; if (t.emit !== void 0) for (let n of i) n.kind === `subagent-result` && n.isError !== !0 && await t.emit({ data: { callId: n.callId, output: typeof n.output == `string` ? n.output : JSON.stringify(n.output), subagentName: n.subagentName }, type: `subagent.completed` }), await t.emit(createActionResultEvent({ result: n, sequence: r.event.sequence, stepIndex: r.event.stepIndex, turnId: r.event.turnId })); let a = { ...t.session.state }; delete a[PENDING_RUNTIME_ACTION_BATCH_KEY]; let o = { ...t.session, state: Object.keys(a).length > 0 ? a : void 0 }, s = r.childContinuationTokens; if (s !== void 0) for (let e of i) { if (e.kind !== `subagent-result`) continue; let t = s[e.callId]; t !== void 0 && (o = clearProxyInputRequestsForChild(o, t)); } let c = i.map((e) => { switch (e.kind) { case `load-skill-result`: return { output: toToolResultOutput(e), toolCallId: e.callId, toolName: `load_skill`, type: `tool-result` }; case `subagent-result`: return { output: toToolResultOutput(e), toolCallId: e.callId, toolName: e.subagentName, type: `tool-result` }; case `tool-result`: return { output: toToolResultOutput(e), toolCallId: e.callId, toolName: e.toolName, type: `tool-result` }; } throw Error(`Unsupported runtime action result kind "${String(e)}".`); }), l = [...o.history, ...r.responseMessages]; return c.length > 0 && l.push({ content: c, role: `tool` }), { messages: l, outcome: `resolved`, session: o }; } function createRuntimeActionRequestFromToolCall(e) { let t = e.tools.get(e.toolCall.toolName); return t?.runtimeAction?.kind === `subagent-call` ? { callId: e.toolCall.toolCallId, description: t.description, input: resolveToolCallInputObject$1(e.toolCall.input, { callId: e.toolCall.toolCallId, toolName: e.toolCall.toolName }), kind: `subagent-call`, name: t.name, nodeId: t.runtimeAction.nodeId, subagentName: t.runtimeAction.subagentName } : t?.runtimeAction?.kind === `remote-agent-call` ? { callId: e.toolCall.toolCallId, description: t.description, input: resolveToolCallInputObject$1(e.toolCall.input, { callId: e.toolCall.toolCallId, toolName: e.toolCall.toolName }), kind: `remote-agent-call`, name: t.name, nodeId: t.runtimeAction.nodeId, remoteAgentName: t.runtimeAction.remoteAgentName ?? t.name } : { callId: e.toolCall.toolCallId, input: resolveToolCallInputObject$1(e.toolCall.input, { callId: e.toolCall.toolCallId, toolName: e.toolCall.toolName }), kind: `tool-call`, toolName: e.toolCall.toolName }; } function resolveToolCallInputObject$1(e, n) { if (e == null) return {}; try { return parseJsonObject(e); } catch (e) { let t = e instanceof Error ? e.message : String(e); throw TypeError(`Failed to parse tool-call arguments for "${n.toolName}" (${n.callId}): ${t}`, { cause: e }); } } function toToolResultOutput(e) { return typeof e.output == `string` ? e.isError === !0 ? { type: `error-text`, value: e.output } : { type: `text`, value: e.output } : e.isError === !0 ? { type: `error-json`, value: toMutableJsonValue(e.output) } : { type: `json`, value: toMutableJsonValue(e.output) }; } function toMutableJsonValue(e) { if (e === null || typeof e == `string` || typeof e == `number` || typeof e == `boolean`) return e; if (Array.isArray(e)) return e.map((e) => toMutableJsonValue(e)); let t = {}; for (let [n, r] of Object.entries(e)) t[n] = toMutableJsonValue(r); return t; } //#endregion //#region node_modules/eve/dist/src/shared/empty-delivery.js const EMPTY_DELIVERY_SENTINEL = ``; const CONDITIONAL_DELIVERY_INSTRUCTION = `Conditional delivery\nOnly when the current task explicitly makes delivery conditional and there is nothing to report, reply with exactly ${EMPTY_DELIVERY_SENTINEL} and no other text. Do not use this marker for ordinary conversations, after input or approval responses, or merely because you have no additional commentary. Never return an empty response; use the marker to intentionally deliver nothing.`; function hasEmptyDeliverySentinel(e) { return e?.includes(``) ?? !1; } //#endregion //#region node_modules/eve/dist/src/harness/tool-output-serialization.js var ToolOutputSerializationError = class extends TypeError { toolCallId; toolName; constructor(e) { super(formatToolOutputSerializationMessage(e)), this.name = `ToolOutputSerializationError`, this.toolCallId = e.toolCallId, this.toolName = e.toolName, e.cause !== void 0 && (this.cause = e.cause); } }; function formatToolOutputSerializationMessage(e) { return `${e.toolCallId === void 0 ? `Tool "${e.toolName}"` : `Tool "${e.toolName}" call "${e.toolCallId}"`} ${e.boundary === `execute` ? `returned a non-JSON-serializable result` : e.boundary === `toModelOutput` ? `returned a non-JSON-serializable model output` : `produced a non-JSON-serializable action result`}.${e.cause instanceof Error && e.cause.message.length > 0 ? ` ${e.cause.message}` : ``}`; } function withToolOutputSerializationError(e, t) { try { return t(); } catch (t) { throw t instanceof ToolOutputSerializationError ? t : new ToolOutputSerializationError({ boundary: e.boundary, cause: t, toolCallId: e.toolCallId, toolName: e.toolName }); } } //#endregion //#region node_modules/eve/dist/src/harness/action-result-helpers.js function toJsonValue(n) { return isAuthorizationSignal(n) ? parseJsonValue(authorizationPendingAsJsonObject({ connections: n.challenges.map((e) => e.name) })) : isAuthorizationPendingModelOutput(n) ? parseJsonValue(authorizationPendingAsJsonObject(n)) : parseJsonValue(n === void 0 ? null : n); } function createRuntimeToolResultFromValue(e) { let t = { callId: e.callId, kind: `tool-result`, output: toolResultOutputToJsonValue({ output: { type: e.isError === !0 ? `error-json` : `json`, value: e.isError === !0 && e.output instanceof Error ? e.output.message : e.output }, toolCallId: e.callId, toolName: e.toolName }), toolName: e.toolName }; return e.isError === !0 ? { ...t, isError: !0 } : t; } function createRuntimeToolResultFromStepResult(e) { return createRuntimeToolResultFromValue({ callId: e.toolCallId, output: e.output, toolName: e.toolName }); } function createRuntimeToolResultFromMessagePart(e) { return createRuntimeToolResultFromValue({ callId: e.toolCallId, output: toolResultOutputToJsonValue({ output: e.output, toolCallId: e.toolCallId, toolName: e.toolName }), toolName: e.toolName, isError: isToolResultError(e.output) }); } function toolResultOutputToJsonValue(e) { return withToolOutputSerializationError({ boundary: `action.result`, toolCallId: e.toolCallId, toolName: e.toolName }, () => { switch (e.output.type) { case `text`: case `error-text`: return e.output.value; case `json`: case `error-json`: return toJsonValue(e.output.value); case `execution-denied`: return { code: `TOOL_EXECUTION_DENIED`, message: e.output.reason ?? `Tool execution was denied.` }; case `content`: return toJsonValue(e.output.value); } }); } function isToolResultError(e) { return e.type === `error-json` || e.type === `error-text` || e.type === `execution-denied`; } //#endregion //#region node_modules/eve/dist/src/harness/tool-interrupts.js const PendingToolInterruptsKey = new ContextKey(`eve.pendingToolInterrupts`); function stashToolInterrupt(e, t, n) { let r = e.get(PendingToolInterruptsKey) ?? {}; asContainer(e).setVirtualContext(PendingToolInterruptsKey, { ...r, [t]: n }); } function readToolInterrupt(e, t) { return e.get(PendingToolInterruptsKey)?.[t]; } function asContainer(e) { return e; } //#endregion //#region node_modules/eve/dist/src/harness/stream-actions.js function createProviderStreamActionBatch(t) { let n = /* @__PURE__ */ new Map(), r = Promise.resolve(), i, a, o, emitPendingActions = async () => { if (n.size === 0) return; let r = [...n.values()]; n.clear(), await t.emitFn(createActionsRequestedEvent({ actions: r, sequence: t.state.sequence, stepIndex: t.state.stepIndex, turnId: t.state.turnId })); }, scheduleFlush = () => { if (a !== void 0) return; let e, t = new Promise((t) => { e = t; }); o = e, a = setTimeout(() => { a = void 0, o = void 0, e?.(); }, 0), r = r.then(() => t).then(emitPendingActions).catch((e) => { i ??= e; }); }; return { observe(e) { n.set(e.callId, e), scheduleFlush(); }, async flush() { if (a !== void 0) { clearTimeout(a), a = void 0; let e = o; o = void 0, e?.(); } if (await r, i !== void 0) throw i; await emitPendingActions(); } }; } //#endregion //#region node_modules/eve/dist/src/harness/emission.js const HARNESS_EMISSION_STATE_KEY = `eve.harness.emission`; const DEFAULT_EMISSION_STATE = { sessionStarted: !1, sequence: 0, stepIndex: 0, turnId: `` }; function getHarnessEmissionState(e) { return e?.[HARNESS_EMISSION_STATE_KEY] ?? DEFAULT_EMISSION_STATE; } function setHarnessEmissionState(e, t) { return { ...e, state: { ...e.state, [HARNESS_EMISSION_STATE_KEY]: t } }; } async function emitTurnPreamble(e, t, n, r) { let i = `turn_${n.sequence}`; return n.sessionStarted || await e(createSessionStartedEvent({ runtime: r })), await e(createTurnStartedEvent({ sequence: n.sequence, turnId: i })), t.message !== void 0 && await e(createMessageReceivedEvent({ message: t.message, sequence: n.sequence, turnId: i })), { sessionStarted: !0, sequence: n.sequence, stepIndex: 0, turnId: i }; } async function emitStepStarted(e, t, n) { await e(createStepStartedEvent({ sequence: t.sequence, stepIndex: t.stepIndex, turnId: t.turnId }), n); } async function emitStepAndTurnFailed(e, t, n) { await e(createStepFailedEvent({ ...n, sequence: t.sequence, stepIndex: t.stepIndex, turnId: t.turnId })), await e(createTurnFailedEvent({ ...n, sequence: t.sequence, turnId: t.turnId })); } async function emitFailedStep(e, t, n) { await emitStepAndTurnFailed(e, t, n), await e(createSessionFailedEvent(n)); } async function emitRecoverableFailedTurn(e, t, n) { return await emitStepAndTurnFailed(e, t, n), await e(createSessionWaitingEvent()), { sessionStarted: t.sessionStarted, sequence: t.sequence + 1, stepIndex: 0, turnId: `` }; } function advanceStep(e) { return { ...e, stepIndex: e.stepIndex + 1 }; } async function emitTurnEpilogue(e, t, n) { return await e(createTurnCompletedEvent({ sequence: t.sequence, turnId: t.turnId })), n === `conversation` ? await e(createSessionWaitingEvent()) : await e(createSessionCompletedEvent()), { sessionStarted: t.sessionStarted, sequence: t.sequence + 1, stepIndex: 0, turnId: `` }; } function normalizeAssistantStepFinishReason(e) { switch (e) { case `content-filter`: case `error`: case `length`: case `stop`: case `tool-calls`: return e; default: return `other`; } } async function emitStreamContent(a, o, s, c) { let l = ``, u = ``, d = `stop`, f, p = /* @__PURE__ */ new Set(), m = /* @__PURE__ */ new Set(), h = /* @__PURE__ */ new Set(), g = /* @__PURE__ */ new Set(), _ = createProviderStreamActionBatch({ emitFn: a, state: o }), v = /* @__PURE__ */ new Set(), y = [], b = [], flushCurrentMessage = async () => { u.length !== 0 && (await a(createMessageCompletedEvent({ finishReason: `tool-calls`, message: u, sequence: o.sequence, stepIndex: o.stepIndex, turnId: o.turnId })), u = ``); }, emitActionRequest = async (e) => { m.has(e.callId) || (u.trim().length > 0 && await flushCurrentMessage(), m.add(e.callId), await a(createActionsRequestedEvent({ actions: [e], sequence: o.sequence, stepIndex: o.stepIndex, turnId: o.turnId }))); }, collectProviderToolCall = async (e) => { g.has(e.toolCallId) || (g.add(e.toolCallId), !m.has(e.toolCallId) && (m.add(e.toolCallId), u.trim().length > 0 && await flushCurrentMessage(), _.observe({ callId: e.toolCallId, input: resolveToolCallInputObject$1(e.input, { callId: e.toolCallId, toolName: e.toolName }), kind: `tool-call`, toolName: e.toolName }))); }, emitActionResult = async (e) => { h.has(e.callId) || (h.add(e.callId), await a(createActionResultEvent({ result: e, sequence: o.sequence, stepIndex: o.stepIndex, turnId: o.turnId }))); }, emitToolCall = async (e) => { if (!(c === void 0 || e.invalid === !0 || c.excludedActionToolNames.has(e.toolName))) try { await emitActionRequest(createRuntimeActionRequestFromToolCall({ toolCall: e, tools: c.tools })); } catch (e) { if (e instanceof TypeError) return; throw e; } }; for await (let t of s) if (f === void 0) switch (t.type) { case `reasoning-delta`: await _.flush(), l += t.text, await a(createReasoningAppendedEvent({ reasoningDelta: t.text, reasoningSoFar: l, sequence: o.sequence, stepIndex: o.stepIndex, turnId: o.turnId })); break; case `text-delta`: await _.flush(), l.trim().length > 0 && (await a(createReasoningCompletedEvent({ reasoning: l, sequence: o.sequence, stepIndex: o.stepIndex, turnId: o.turnId })), l = ``), u += t.text, await a(createMessageAppendedEvent({ messageDelta: t.text, messageSoFar: u, sequence: o.sequence, stepIndex: o.stepIndex, turnId: o.turnId })); break; case `tool-call`: { let e = t; p.add(e.toolCallId), e.providerExecuted === !0 ? await collectProviderToolCall(e) : (await _.flush(), await emitToolCall(e)); break; } case `tool-result`: { let e = t; if (e.preliminary === !0) break; if (e.providerExecuted === !0) { await collectProviderToolCall({ input: `input` in e ? e.input : void 0, toolCallId: e.toolCallId, toolName: e.toolName }), await _.flush(), await emitActionResult(createRuntimeToolResultFromStepResult(e)); break; } if (p.has(t.toolCallId)) { if (isInlineAuthorizationToolResult(e)) break; m.has(t.toolCallId) && (await emitActionResult(createRuntimeToolResultFromStepResult(e)), v.add(t.toolCallId)); break; } if (await _.flush(), await flushCurrentMessage(), isInlineAuthorizationToolResult(e)) { v.add(t.toolCallId), y.push(e); break; } await emitActionResult(createRuntimeToolResultFromStepResult(e)), v.add(t.toolCallId); let n = e.output; b.push({ type: `tool-result`, toolCallId: e.toolCallId, toolName: e.toolName, output: typeof n == `string` ? { type: `text`, value: n } : { type: `json`, value: n ?? null } }); break; } case `tool-error`: { let n = t; n.providerExecuted === !0 ? (await collectProviderToolCall(n), await _.flush(), await emitActionResult(createRuntimeToolResultFromValue({ callId: n.toolCallId, isError: !0, output: toError(n.error), toolName: n.toolName }))) : m.has(n.toolCallId) && (await emitActionResult(createRuntimeToolResultFromValue({ callId: n.toolCallId, isError: !0, output: toError(n.error), toolName: n.toolName })), v.add(n.toolCallId)); break; } case `finish-step`: d = normalizeAssistantStepFinishReason(t.finishReason), await _.flush(); break; case `error`: f = toError(t.error); break; default: break; } if (await _.flush(), f !== void 0) throw f; return l.trim().length > 0 && await a(createReasoningCompletedEvent({ reasoning: l, sequence: o.sequence, stepIndex: o.stepIndex, turnId: o.turnId })), d !== `tool-calls` && hasEmptyDeliverySentinel(u) ? await a(createMessageCompletedEvent({ finishReason: d, message: null, sequence: o.sequence, stepIndex: o.stepIndex, turnId: o.turnId })) : u.trim().length > 0 && await a(createMessageCompletedEvent({ finishReason: d, message: u, sequence: o.sequence, stepIndex: o.stepIndex, turnId: o.turnId })), { emittedActionCallIds: m, handledInlineToolResultCallIds: v, inlineAuthorizationResults: y, inlineToolResultParts: b }; } function isInlineAuthorizationToolResult(e) { if (isPendingAuthorizationToolOutput(e.output)) return !0; let t = contextStorage.getStore(); if (t === void 0) return !1; let n = readToolInterrupt(t, e.toolCallId); return n !== void 0 && isAuthorizationSignal(n); } //#endregion //#region node_modules/eve/dist/src/execution/session.js function createCompactionConfig(e = {}) { let t = e.thresholdPercent ?? .9, n = { recentWindowSize: 10, threshold: e.contextWindowTokens === void 0 ? 1e5 : Math.max(1, Math.floor(e.contextWindowTokens * t)) }; return e.lastKnownInputTokens === void 0 ? n : { ...n, lastKnownInputTokens: e.lastKnownInputTokens, lastKnownPromptMessageCount: e.lastKnownPromptMessageCount }; } function createSession(e) { let { turnAgent: t } = e, n = createSessionToolDefinitions(t), r = { agent: { compactionModelReference: t.compactionModel, modelReference: t.model, reasoning: t.reasoning, system: t.instructions.join(` `), tools: n }, compaction: createCompactionConfig({ contextWindowTokens: t.model.contextWindowTokens, thresholdPercent: e.compactionOverrides?.thresholdPercent }), continuationToken: e.continuationToken, history: [], sessionId: e.sessionId }; return e.rootSessionId !== void 0 && (r.rootSessionId = e.rootSessionId), e.outputSchema !== void 0 && (r.outputSchema = e.outputSchema), r; } function refreshSessionFromTurnAgent(e) { return { ...e.session, agent: { compactionModelReference: e.turnAgent.compactionModel, modelReference: e.turnAgent.model, reasoning: e.turnAgent.reasoning, system: e.turnAgent.instructions.join(` `), tools: createSessionToolDefinitions(e.turnAgent) }, compaction: createCompactionConfig({ contextWindowTokens: e.turnAgent.model.contextWindowTokens, lastKnownInputTokens: e.session.compaction.lastKnownInputTokens, lastKnownPromptMessageCount: e.session.compaction.lastKnownPromptMessageCount, thresholdPercent: e.compactionOverrides?.thresholdPercent }) }; } function mintSubagentContinuationToken(e) { return `subagent:${e ?? crypto.randomUUID()}`; } function projectToDurableSession(e) { let t = { agent: { system: e.agent.system }, continuationToken: e.continuationToken, history: e.history, sessionId: e.sessionId }; return (e.compaction.lastKnownInputTokens !== void 0 || e.compaction.lastKnownPromptMessageCount !== void 0) && (t.compaction = { lastKnownInputTokens: e.compaction.lastKnownInputTokens, lastKnownPromptMessageCount: e.compaction.lastKnownPromptMessageCount }), e.rootSessionId !== void 0 && (t.rootSessionId = e.rootSessionId), e.outputSchema !== void 0 && (t.outputSchema = e.outputSchema), e.sandboxState !== void 0 && (t.sandboxState = e.sandboxState), e.state !== void 0 && (t.state = e.state), t; } function hydrateDurableSession(e) { let { durable: t, turnAgent: n } = e, r = createSessionToolDefinitions(n), i = { agent: { compactionModelReference: n.compactionModel, modelReference: n.model, reasoning: n.reasoning, system: t.agent.system, tools: r }, compaction: createCompactionConfig({ contextWindowTokens: n.model.contextWindowTokens, lastKnownInputTokens: t.compaction?.lastKnownInputTokens, lastKnownPromptMessageCount: t.compaction?.lastKnownPromptMessageCount, thresholdPercent: e.compactionOverrides?.thresholdPercent }), continuationToken: t.continuationToken, history: t.history, sessionId: t.sessionId }; return t.rootSessionId !== void 0 && (i.rootSessionId = t.rootSessionId), t.outputSchema !== void 0 && (i.outputSchema = t.outputSchema), t.sandboxState !== void 0 && (i.sandboxState = t.sandboxState), t.state !== void 0 && (i.state = t.state), i; } function createSessionToolDefinitions(e) { return e.tools.map((e) => ({ description: e.description ?? ``, inputSchema: e.inputSchema, name: e.name, outputSchema: e.outputSchema })); } //#endregion //#region node_modules/eve/dist/src/execution/durable-session-migrations/chain.js function runMigrationChain(e) { if (typeof e.value != `object` || e.value === null) throw Error(`${e.label}: value has no numeric "version" field.`); let t = e.value.version, n; if (typeof t == `number`) n = e.value; else if (!(`version` in e.value) && e.initialVersion !== void 0) n = { ...e.value, version: e.initialVersion }; else throw Error(`${e.label}: value has no numeric "version" field.`); let r = e.initialVersion ?? 1; if (!Number.isInteger(n.version) || n.version < r) throw Error(`${e.label}: version ${n.version} is not a positive integer.`); if (n.version > e.targetVersion) throw Error(`${e.label}: encountered version ${n.version}, which is newer than the supported version ${e.targetVersion}. This usually indicates the wire was written by a newer eve deployment than the one reading it.`); for (; n.version < e.targetVersion;) { let t = e.migrations.find((e) => e.from === n.version); if (!t) throw Error(`${e.label}: no migration registered for version ${n.version} → ${n.version + 1}.`); if (t.to !== t.from + 1) throw Error(`${e.label}: migration ${t.from} → ${t.to} must step exactly one version at a time.`); let r = t.migrate(n); if (r.version !== t.to) throw Error(`${e.label}: migration ${t.from} → ${t.to} produced a value with version ${r.version}.`); n = r; } return n; } //#endregion //#region node_modules/eve/dist/src/execution/durable-session-migrations/snapshot.js const snapshotMigrations = []; function migrateDurableSessionSnapshot(e) { return runMigrationChain({ label: `durable session snapshot`, migrations: snapshotMigrations, targetVersion: 1, value: e }); } //#endregion //#region node_modules/eve/dist/src/execution/durable-session-store.js const EVE_SESSION_STREAM_NAMESPACE = `eve.session`; const DURABLE_SESSION_READ_TIMEOUT_MS = 1e4; function projectSessionState(t) { return { continuationToken: t.session.continuationToken, emissionState: getHarnessEmissionState(t.session.state), hasProxyInputRequests: hasProxyInputRequests(t.session.state), sessionId: t.session.sessionId, version: 1 }; } async function readDurableSession(e) { if (e.snapshot !== void 0) return migrateDurableSessionSnapshot(e.snapshot).session; let t = X$9(e.sessionId).getReadable({ namespace: EVE_SESSION_STREAM_NAMESPACE, startIndex: -1 }).getReader(), r = `eve durable session tail read failed`, i; try { let n = await Promise.race([t.read().then((e) => ({ kind: `read`, read: e })), new Promise((e) => { i = setTimeout(() => e({ kind: `timeout` }), DURABLE_SESSION_READ_TIMEOUT_MS); })]); if (n.kind === `timeout`) throw r = `eve durable session tail read timed out after ${DURABLE_SESSION_READ_TIMEOUT_MS}ms`, new DurableSessionReadTimeoutError(e); if (n.read.done || n.read.value === void 0) throw r = `eve durable session tail read returned no snapshot`, Error(`No durable session snapshot found in stream "${EVE_SESSION_STREAM_NAMESPACE}" for run ${e.sessionId}.`); return r = `eve durable session tail read complete`, migrateDurableSessionSnapshot(n.read.value).session; } finally { i !== void 0 && clearTimeout(i), await t.cancel(r).catch(() => {}), t.releaseLock(); } } var DurableSessionReadTimeoutError = class extends Error { constructor(e) { super(`Timed out reading durable session snapshot from stream "${EVE_SESSION_STREAM_NAMESPACE}" for run ${e.sessionId} after ${DURABLE_SESSION_READ_TIMEOUT_MS}ms.`), this.name = `DurableSessionReadTimeoutError`; } }; function createDurableSessionState(e) { let n = { session: projectToDurableSession(e.session), version: 1 }; return { ...projectSessionState({ session: e.session }), snapshot: n }; } //#endregion //#region node_modules/eve/dist/src/execution/create-session-step.js async function createSessionStep(e) { let t = await getCompiledRuntimeAgentBundle({ compiledArtifactsSource: e.compiledArtifactsSource, nodeId: e.nodeId }); return { state: createDurableSessionState({ session: createSession({ compactionOverrides: { thresholdPercent: t.resolvedAgent.config.compaction?.thresholdPercent }, continuationToken: e.continuationToken, outputSchema: e.outputSchema, rootSessionId: e.rootSessionId, sessionId: e.sessionId, turnAgent: t.turnAgent }) }) }; } s$7("step//eve@0.16.2//createSessionStep", createSessionStep); //#endregion //#region node_modules/eve/dist/src/execution/delegated-parent-notification.js async function notifyDelegatedParentStep(e) { if (e.result === void 0) return; let t = (await deserializeContext(e.serializedContext)).get(ChannelKey); if (t?.kind !== SUBAGENT_ADAPTER_KIND$1) return; let n = String(t.state?.parentContinuationToken ?? ``); n !== `` && await E$9(n, { kind: `runtime-action-result`, results: [e.result] }); } s$7("step//eve@0.16.2//notifyDelegatedParentStep", notifyDelegatedParentStep); //#endregion //#region node_modules/eve/dist/src/channel/adapter-context.js function buildAdapterContext(e, t) { let n = { ctx: t, state: e.state ?? {}, session: buildSessionHandle(t) }; return e.createAdapterContext ? e.createAdapterContext(n) : n; } //#endregion //#region node_modules/eve/dist/src/execution/workflow-callback-url.js function resolveVercelProductionCallbackBaseUrl() { return process.env.VERCEL_ENV === `production` && process.env.VERCEL_PROJECT_PRODUCTION_URL ? `https://${process.env.VERCEL_PROJECT_PRODUCTION_URL}` : null; } function resolveWorkflowCallbackBaseUrl(e) { let t = process.env.WORKFLOW_LOCAL_BASE_URL?.trim() || void 0; return (resolveVercelProductionCallbackBaseUrl() ?? t ?? e).replace(/\/$/, ``); } function createWorkflowCallbackUrl(e, t) { let n = new URL(t, e), r = process.env.VERCEL_AUTOMATION_BYPASS_SECRET?.trim(); return r && n.searchParams.set(`x-vercel-protection-bypass`, r), n.toString(); } //#endregion //#region node_modules/eve/dist/src/execution/subagent-invocation.js function formatSubagentInvocation(e) { return { message: [ `You are the subagent "${e.name}".`, `Description: ${e.description}`, ``, `The caller delegated the following task to you. Complete it and return the final result directly.`, ``, `Caller message:`, e.message ].join(` `) }; } //#endregion //#region node_modules/eve/dist/src/execution/remote-agent-dispatch.js async function startRemoteAgentSession(n) { let r = n.callbackToken ?? n.session.continuationToken; if (!r) throw Error(`Cannot dispatch remote agent without a parent continuation token.`); if (!n.callbackBaseUrl) throw Error(`Cannot dispatch remote agent without a callback base URL.`); let i = await resolveRemoteAgentRequestHeaders(n.remote), a = await fetch(createRemoteAgentSessionUrl(n.remote), { body: JSON.stringify({ callback: { callId: n.action.callId, subagentName: n.action.remoteAgentName, token: r, url: createWorkflowCallbackUrl(n.callbackBaseUrl, createEveCallbackRoutePath(r)) }, message: formatRemoteAgentCallInputMessage(n.action), mode: `task`, outputSchema: n.action.input.outputSchema ?? n.remote.outputSchema }), headers: { "content-type": `application/json`, ...i }, method: `POST` }); if (!a.ok) throw Error(`Remote agent "${n.action.remoteAgentName}" create-session request failed with HTTP ${a.status}.`); let o = a.headers.get(EVE_SESSION_ID_HEADER); if (o !== null && o.length > 0) return o; try { let e = await a.json(); if (typeof e.sessionId == `string` && e.sessionId.length > 0) return e.sessionId; } catch {} throw Error(`Remote agent "${n.action.remoteAgentName}" create-session response did not include a session id.`); } function resolveRemoteAgentForAction(e) { let t = e.registry.get(e.nodeId)?.definition; if (t?.kind !== `remote`) throw Error(`Missing remote agent "${e.remoteAgentName}" in runtime registry.`); return t; } function createRemoteAgentSessionUrl(e) { return new URL(e.path, `${trimTrailingSlash(e.url)}/`).toString(); } async function resolveRemoteAgentRequestHeaders(e) { let t = {}; return e.headers !== void 0 && Object.assign(t, typeof e.headers == `function` ? await e.headers() : e.headers), e.auth !== void 0 && Object.assign(t, (await e.auth()).headers), t; } function formatRemoteAgentCallInputMessage(e) { let t = typeof e.input.message == `string` ? e.input.message : ``; return formatSubagentInvocation({ description: e.description, message: t, name: e.remoteAgentName }).message; } function trimTrailingSlash(e) { return e.endsWith(`/`) ? e.slice(0, -1) : e; } //#endregion //#region node_modules/eve/dist/src/execution/subagent-tool.js function buildSubagentRunInput(n) { let { action: r, auth: i, batchEvent: a, capabilities: o, channelMetadata: s, initiatorAuth: c, session: l } = n, u = mintSubagentContinuationToken(`${l.sessionId}:${r.callId}`), d = l.rootSessionId ?? l.sessionId; return { childContinuationToken: u, runInput: { adapter: { kind: SUBAGENT_ADAPTER_KIND$1, state: { callId: r.callId, parentContinuationToken: n.parentContinuationToken ?? l.continuationToken, parentSessionId: l.sessionId, subagentName: r.subagentName, ...r.subagentName === `agent` && l.sandboxState ? { parentSandboxState: l.sandboxState, sandboxSessionId: l.sessionId } : {} } }, auth: i, capabilities: o, channelMetadata: s, continuationToken: u, initiatorAuth: c, input: { message: formatSubagentCallInputMessage(r), outputSchema: r.input.outputSchema }, mode: `task`, parent: { callId: r.callId, rootSessionId: d, sessionId: l.sessionId, turn: { id: a.turnId, sequence: a.sequence } } } }; } function formatSubagentCallInputMessage(e) { let { message: t } = e.input; return formatSubagentInvocation({ description: e.description, message: t, name: e.subagentName }).message; } //#endregion //#region node_modules/eve/dist/src/execution/dispatch-runtime-actions-step.js const log$12 = createLogger(`execution.dispatch-runtime-actions`); async function dispatchRuntimeActionsStep$1(e) { let s = await readDurableSession(e.sessionState), u = getPendingRuntimeActionBatch(s.state); if (u === void 0 || u.actions.length === 0) return { results: [], sessionState: e.sessionState }; let d = await deserializeContext(e.serializedContext), f = d.require(BundleKey), p = hydrateDurableSession({ compactionOverrides: { thresholdPercent: f.resolvedAgent.config.compaction?.thresholdPercent }, durable: s, turnAgent: f.turnAgent }), m = d.require(ChannelKey), h = d.get(AuthKey) ?? null, g = d.get(CapabilitiesKey), _ = d.get(ChannelInstrumentationKey), v = d.get(InitiatorAuthKey) ?? null, y = e.parentWritable.getWriter(), b = buildAdapterContext(m, d), x = p, S = []; try { for (let r of u.actions) { let i, a, o, s; switch (r.kind) { case `subagent-call`: { let t = createWorkflowRuntime({ compiledArtifactsSource: f.compiledArtifactsSource, nodeId: r.nodeId }), { childContinuationToken: n, runInput: o } = buildSubagentRunInput({ action: r, auth: h, batchEvent: u.event, capabilities: g, channelMetadata: _, initiatorAuth: v, parentContinuationToken: e.parentContinuationToken, session: p }), c = await t.run(o); x = recordPendingSubagentChildToken({ callId: r.callId, childContinuationToken: n, session: x }), i = c.sessionId, a = r.name, s = r.subagentName; break; } case `remote-agent-call`: { let n; try { n = resolveRemoteAgentForAction({ nodeId: r.nodeId, remoteAgentName: r.remoteAgentName, registry: f.subagentRegistry.subagentsByNodeId }), i = await startRemoteAgentSession({ action: r, callbackBaseUrl: e.callbackBaseUrl, callbackToken: e.parentContinuationToken, remote: n, session: p }); } catch (e) { logError(log$12, `remote agent start failed`, e, { remoteAgentName: r.remoteAgentName, nodeId: r.nodeId, callId: r.callId }), S.push(createRemoteAgentStartFailureResult$1({ action: r, error: e })); continue; } a = r.name, o = { url: n.url }, s = r.remoteAgentName; break; } default: throw Error(`Unsupported runtime action kind "${r.kind}" in workflow runtime.`); } let l = await callAdapterEventHandler(m, createSubagentCalledEvent({ callId: r.callId, childSessionId: i, name: a, remote: o, sequence: u.event.sequence, sessionId: p.sessionId, toolName: s, turnId: u.event.turnId, workflowId: workflowEntryReference.workflowId }), b); await y.write(encodeMessageStreamEvent(timestampHandleMessageStreamEvent(l))); } } finally { y.releaseLock(); } return { results: S, sessionState: x === p ? e.sessionState : createDurableSessionState({ session: x }) }; } function createRemoteAgentStartFailureResult$1(e) { return { callId: e.action.callId, isError: !0, kind: `subagent-result`, output: { code: `REMOTE_AGENT_START_FAILED`, message: toErrorMessage(e.error) }, subagentName: e.action.remoteAgentName }; } s$7("step//eve@0.16.2//dispatchRuntimeActionsStep", dispatchRuntimeActionsStep$1); //#endregion //#region node_modules/eve/dist/src/execution/dispatch-runtime-actions-step.js const log$11 = createLogger(`execution.dispatch-runtime-actions`); async function dispatchRuntimeActionsStep(e) { let s = await readDurableSession(e.sessionState), u = getPendingRuntimeActionBatch(s.state); if (u === void 0 || u.actions.length === 0) return { results: [], sessionState: e.sessionState }; let d = await deserializeContext(e.serializedContext), f = d.require(BundleKey), p = hydrateDurableSession({ compactionOverrides: { thresholdPercent: f.resolvedAgent.config.compaction?.thresholdPercent }, durable: s, turnAgent: f.turnAgent }), m = d.require(ChannelKey), h = d.get(AuthKey) ?? null, g = d.get(CapabilitiesKey), _ = d.get(ChannelInstrumentationKey), v = d.get(InitiatorAuthKey) ?? null, y = e.parentWritable.getWriter(), b = buildAdapterContext(m, d), x = p, S = []; try { for (let r of u.actions) { let i, a, o, s; switch (r.kind) { case `subagent-call`: { let t = createWorkflowRuntime({ compiledArtifactsSource: f.compiledArtifactsSource, nodeId: r.nodeId }), { childContinuationToken: n, runInput: o } = buildSubagentRunInput({ action: r, auth: h, batchEvent: u.event, capabilities: g, channelMetadata: _, initiatorAuth: v, parentContinuationToken: e.parentContinuationToken, session: p }), c = await t.run(o); x = recordPendingSubagentChildToken({ callId: r.callId, childContinuationToken: n, session: x }), i = c.sessionId, a = r.name, s = r.subagentName; break; } case `remote-agent-call`: { let n; try { n = resolveRemoteAgentForAction({ nodeId: r.nodeId, remoteAgentName: r.remoteAgentName, registry: f.subagentRegistry.subagentsByNodeId }), i = await startRemoteAgentSession({ action: r, callbackBaseUrl: e.callbackBaseUrl, callbackToken: e.parentContinuationToken, remote: n, session: p }); } catch (e) { logError(log$11, `remote agent start failed`, e, { remoteAgentName: r.remoteAgentName, nodeId: r.nodeId, callId: r.callId }), S.push(createRemoteAgentStartFailureResult({ action: r, error: e })); continue; } a = r.name, o = { url: n.url }, s = r.remoteAgentName; break; } default: throw Error(`Unsupported runtime action kind "${r.kind}" in workflow runtime.`); } let l = await callAdapterEventHandler(m, createSubagentCalledEvent({ callId: r.callId, childSessionId: i, name: a, remote: o, sequence: u.event.sequence, sessionId: p.sessionId, toolName: s, turnId: u.event.turnId, workflowId: workflowEntryReference.workflowId }), b); await y.write(encodeMessageStreamEvent(timestampHandleMessageStreamEvent(l))); } } finally { y.releaseLock(); } return { results: S, sessionState: x === p ? e.sessionState : createDurableSessionState({ session: x }) }; } function createRemoteAgentStartFailureResult(e) { return { callId: e.action.callId, isError: !0, kind: `subagent-result`, output: { code: `REMOTE_AGENT_START_FAILED`, message: toErrorMessage(e.error) }, subagentName: e.action.remoteAgentName }; } s$7("step//eve@0.16.2//dispatchRuntimeActionsStep", dispatchRuntimeActionsStep); //#endregion //#region node_modules/eve/dist/src/harness/workflow-runtime-action-state.js const WORKFLOW_RUNTIME_ACTION_INTERRUPT_KIND = `eve.workflow-runtime-action`; function isWorkflowRuntimeActionInterrupt(e) { return isRecord$4(e) && isRecord$4(e.payload) && e.payload.kind === `eve.workflow-runtime-action`; } function buildRuntimeActionFromWorkflowInterrupt(e) { let t = e.payload, n = t.runtimeAction, r = t.toolInput, i = t.toolName, a = sanitizeCallId(`${i}_${`interruptId` in e ? String(e.interruptId) : ``}`); return n.kind === `remote-agent-call` ? { callId: a, description: ``, input: r, kind: `remote-agent-call`, name: i, nodeId: n.nodeId, remoteAgentName: n.remoteAgentName ?? i } : { callId: a, description: ``, input: r, kind: `subagent-call`, name: i, nodeId: n.nodeId, subagentName: n.subagentName }; } function getWorkflowRuntimeActionInterrupts(e) { return e.continuation.ledger.flatMap((t) => t.kind !== `tool` || t.status !== `interrupted` || t.interruptPayload.kind !== `eve.workflow-runtime-action` ? [] : [{ continuation: e.continuation, input: t.inputJson === `` ? void 0 : JSON.parse(t.inputJson), interruptId: t.interruptId, outerToolCallId: e.continuation.outerToolCallId, payload: t.interruptPayload, toolCallId: t.toolCallId, toolName: t.name, type: `code-mode-interrupt` }]); } function buildRuntimeActionsFromWorkflowInterrupt(e) { return getWorkflowRuntimeActionInterrupts(e).map((e) => buildRuntimeActionFromWorkflowInterrupt(e)); } function getRuntimeActionKeysFromWorkflowInterrupt(t) { return buildRuntimeActionsFromWorkflowInterrupt(t).map(getRuntimeActionRequestKey); } function sanitizeCallId(e) { return e.replace(/[^a-zA-Z0-9_-]/g, `_`); } function isRecord$4(e) { return typeof e == `object` && !!e && !Array.isArray(e); } //#endregion //#region node_modules/eve/dist/src/harness/workflow-interrupt-state.js const PENDING_KEY = `eve.harness.pendingWorkflowInterrupt`; function getPendingWorkflowInterrupt(e) { let n = e?.[PENDING_KEY]; if (isRecord$3(n) && !(!isWorkflowInterruptShape(n.interrupt) || !Array.isArray(n.responseMessages))) return { interrupt: n.interrupt, responseMessages: n.responseMessages }; } function setPendingWorkflowInterrupt(e) { return { ...e.session, state: { ...e.session.state, [PENDING_KEY]: { interrupt: e.interrupt, responseMessages: e.responseMessages } } }; } function clearPendingWorkflowInterrupt(e) { if (e.state?.[PENDING_KEY] === void 0) return e; let n = { ...e.state }; return delete n[PENDING_KEY], { ...e, state: Object.keys(n).length > 0 ? n : void 0 }; } function isWorkflowInterruptShape(t) { return isRecord$3(t) && t.type === `code-mode-interrupt` && typeof t.interruptId == `string` && typeof t.outerToolCallId == `string` && isRecord$3(t.payload) && t.payload.kind === WORKFLOW_RUNTIME_ACTION_INTERRUPT_KIND && isRecord$3(t.continuation) && typeof t.continuation.outerToolCallId == `string`; } function isRecord$3(e) { return typeof e == `object` && !!e && !Array.isArray(e); } //#endregion //#region node_modules/eve/dist/src/execution/dispatch-workflow-runtime-actions-step.js async function dispatchWorkflowRuntimeActionsStep(e) { let t = await readDurableSession(e.sessionState), n = getPendingWorkflowInterrupt(t.state); if (n === void 0) return { results: [], sessionState: e.sessionState }; let r = buildRuntimeActionsFromWorkflowInterrupt(n.interrupt); if (r.length === 0) return { results: [], sessionState: e.sessionState }; let i = (await deserializeContext(e.serializedContext)).require(BundleKey), a = setPendingRuntimeActionBatch({ actions: r, event: { sequence: 0, stepIndex: 0, turnId: `workflow-dispatch` }, responseMessages: [], session: hydrateDurableSession({ compactionOverrides: { thresholdPercent: i.resolvedAgent.config.compaction?.thresholdPercent }, durable: t, turnAgent: i.turnAgent }) }); return dispatchRuntimeActionsStep({ callbackBaseUrl: e.callbackBaseUrl, parentContinuationToken: e.parentContinuationToken, parentWritable: e.parentWritable, serializedContext: e.serializedContext, sessionState: createDurableSessionState({ session: a }) }); } s$7("step//eve@0.16.2//dispatchWorkflowRuntimeActionsStep", dispatchWorkflowRuntimeActionsStep); //#endregion //#region node_modules/eve/dist/src/execution/forward-turn-delivery-step.js async function forwardTurnDeliveryStep(e) { await E$9(e.inboxToken, e.payload); } s$7("step//eve@0.16.2//forwardTurnDeliveryStep", forwardTurnDeliveryStep); //#endregion //#region node_modules/eve/dist/src/execution/session-callback-step.js const log$10 = createLogger(`execution.session-callback`); async function fireSessionCallbackStep(e) { let n = e.serializedContext[`eve.sessionId`] ?? ``, i = e.serializedContext[SessionCallbackKey.name]; if (i !== void 0) try { let t = parseSerializedSessionCallback(i), r = e.status === `completed` ? { callId: t.callId, kind: `session.completed`, output: e.output ?? ``, sessionId: n, subagentName: t.subagentName } : { callId: t.callId, error: { code: `SESSION_FAILED`, message: toErrorMessage(e.error) }, kind: `session.failed`, sessionId: n, subagentName: t.subagentName }, a = await fetch(t.url, { body: JSON.stringify(r), headers: { "content-type": `application/json` }, method: `POST`, redirect: `error`, signal: AbortSignal.timeout(3e4) }); if (!a.ok) throw Error(`Session callback failed with HTTP ${a.status}.`); } catch (e) { throw log$10.error(`failed to post session callback`, { error: e, sessionId: n }), e; } } function parseSerializedSessionCallback(e) { let t = parseSessionCallback(e); if (!t.ok) throw Error(`Serialized session callback is invalid.`, { cause: t.cause }); return t.callback; } s$7("step//eve@0.16.2//fireSessionCallbackStep", fireSessionCallbackStep); //#endregion //#region node_modules/eve/dist/src/execution/subagent-adapter.js const log$9 = createLogger(`execution.subagent-adapter`); const SUBAGENT_ADAPTER_KIND = `subagent`; function isSubagentAdapterState(e) { if (typeof e != `object` || !e) return !1; let t = e; return typeof t.callId == `string` && t.callId.length > 0 && typeof t.parentContinuationToken == `string` && t.parentContinuationToken.length > 0 && typeof t.parentSessionId == `string` && typeof t.subagentName == `string` && t.subagentName.length > 0; } const SUBAGENT_ADAPTER = { kind: SUBAGENT_ADAPTER_KIND, async "input.requested"(e, t) { let i = t.state; isSubagentAdapterState(i) && await forwardSubagentInputRequestStep({ hookPayload: { callId: i.callId, childContinuationToken: t.ctx.require(ContinuationTokenKey), childSessionId: t.ctx.require(SessionIdKey), event: { requests: e.requests, sequence: e.sequence, stepIndex: e.stepIndex, turnId: e.turnId }, kind: `subagent-input-request`, subagentName: i.subagentName }, parentContinuationToken: i.parentContinuationToken }); } }; async function forwardSubagentInputRequestStep(t) { try { await E$9(t.parentContinuationToken, t.hookPayload); } catch (n) { let r = createErrorId(); throw log$9.warn(`failed to forward proxied HITL batch to parent`, { callId: t.hookPayload.callId, childContinuationToken: t.hookPayload.childContinuationToken, childSessionId: t.hookPayload.childSessionId, errorId: r, parentContinuationToken: t.parentContinuationToken, subagentName: t.hookPayload.subagentName, error: n }), n; } } s$7("step//eve@0.16.2//forwardSubagentInputRequestStep", forwardSubagentInputRequestStep); //#endregion //#region node_modules/eve/dist/src/execution/turn-control-protocol.js async function sendTurnControlStep(e) { await E$9(e.controlToken, e.payload); } s$7("step//eve@0.16.2//sendTurnControlStep", sendTurnControlStep); //#endregion //#region node_modules/eve/dist/src/execution/durable-session-migrations/turn-workflow.js function createTurnWorkflowInput(e) { return { capabilities: e.capabilities, completionToken: e.completionToken, driverCapabilities: { turnInbox: !0 }, mode: e.mode, stepInput: { input: e.delivery, parentWritable: e.parentWritable, serializedContext: e.serializedContext, sessionState: e.sessionState }, version: 1 }; } //#endregion //#region node_modules/eve/dist/src/harness/messages.js function coalesceTurnInputs(e, t) { let n = coalesceInputResponses({ a: e.inputResponses, b: t.inputResponses }), r = coalesceMessage({ a: e.message, b: t.message }), i = coalesceContext({ a: e.context, b: t.context }), a = t.outputSchema ?? e.outputSchema, o = {}; return n !== void 0 && (o.inputResponses = n), r !== void 0 && (o.message = r), i !== void 0 && (o.context = i), a !== void 0 && (o.outputSchema = a), o; } function resolveAssistantStepText(e, t) { for (let t = e.length - 1; t >= 0; --t) { let n = e[t]; if (n?.role !== `assistant`) continue; let r = extractMessageText(n); if (r.trim().length > 0) return r; } return t !== void 0 && t.trim().length > 0 ? t : null; } function extractMessageText(e) { return typeof e.content == `string` ? e.content : Array.isArray(e.content) ? e.content.flatMap((e) => typeof e == `string` ? [e] : `type` in e && e.type === `text` && typeof e.text == `string` ? [e.text] : []).join(``) : ``; } function coalesceInputResponses(e) { let t = e.a ?? [], n = e.b ?? []; if (!(t.length === 0 && n.length === 0)) return [...t, ...n]; } function coalesceContext(e) { let t = e.a ?? [], n = e.b ?? []; if (!(t.length === 0 && n.length === 0)) return [...t, ...n]; } function coalesceMessage(e) { return e.a === void 0 ? e.b : e.b === void 0 ? e.a : typeof e.a == `string` && typeof e.b == `string` ? `${e.a}\n\n${e.b}` : [...toUserContentArray(e.a), ...toUserContentArray(e.b)]; } function toUserContentArray(e) { return typeof e == `string` ? e.length > 0 ? [{ type: `text`, text: e }] : [] : Array.isArray(e) ? [...e] : []; } //#endregion //#region node_modules/eve/dist/src/context/hook-lifecycle.js async function dispatchStreamEventHooks(e) { let t = e.registry.streamEventsByType.get(e.event.type) ?? [], n = e.registry.streamEventsWildcard; if (t.length === 0 && n.length === 0) return; let r = buildHookContext(e.ctx); for (let n of t) await n.handler(e.event, r); for (let t of n) await t.handler(e.event, r); } function buildHookContext(i) { let a = i.require(BundleKey), o = i.get(ChannelKey), s = i.get(ContinuationTokenKey), c = o === void 0 ? void 0 : getAdapterKind(o); return { ...buildCallbackContext(), agent: { name: a.resolvedAgent.config.name ?? `agent`, nodeId: a.nodeId }, channel: { kind: c, continuationToken: s } }; } //#endregion //#region node_modules/eve/dist/src/context/dynamic-resolve-context.js function buildResolveContext(e, t) { let n = e.get(SessionIdKey) ?? ``, r = e.get(AuthKey) ?? null, i = e.get(InitiatorAuthKey) ?? null, a = e.get(ChannelKey), o = e.get(ContinuationTokenKey), s = e.get(ChannelInstrumentationKey); return { session: { id: n, auth: { current: r, initiator: i } }, channel: { kind: a === void 0 ? void 0 : getAdapterKind(a), continuationToken: o, metadata: s?.metadata }, messages: t }; } //#endregion //#region node_modules/eve/dist/src/context/dynamic-instruction-lifecycle.js const log$8 = createLogger(`dynamic-instructions`); function lowerToSystemMessage(e) { let t = e.markdown.trim(); if (t.length !== 0) return { role: `system`, content: t }; } function durableKeyForEvent$1(e) { switch (e) { case `session.started`: return SessionDynamicInstructionsKey; case `turn.started`: return TurnDynamicInstructionsKey; default: return; } } function buildDynamicInstructionMessages(e) { let r = e.get(SessionDynamicInstructionsKey) ?? {}, i = e.get(TurnDynamicInstructionsKey) ?? {}; return [...Object.values(r).flat(), ...Object.values(i).flat()]; } async function dispatchDynamicInstructionEvent(e) { let { ctx: t, resolvers: n, event: a, messages: o } = e; if (!ALLOWED_DYNAMIC_INSTRUCTION_EVENTS.has(a.type)) return; let s = n.filter((e) => e.eventNames.includes(a.type)); if (s.length === 0) return; let c = durableKeyForEvent$1(a.type); if (c === void 0) return; let l = buildResolveContext(t, o), u = await Promise.allSettled(s.map(async (e) => { let t = e.events[a.type]; if (t === void 0) return null; let n = await t(a, l); return n == null ? { resolver: e, message: void 0 } : isBrandedInstructionsEntry(n) ? { resolver: e, message: lowerToSystemMessage(n) } : (log$8.error(`Dynamic instructions resolver "${e.slug}" returned an unbranded value — wrap with defineInstructions().`), null); })), d = { ...t.get(c) }; for (let e of u) { if (e.status === `rejected`) { log$8.error(`Dynamic instructions resolver (${a.type}) threw — skipping.`, { error: toErrorMessage(e.reason) }); continue; } if (e.value === null) continue; let { resolver: t, message: n } = e.value; n === void 0 ? delete d[t.slug] : d[t.slug] = [n]; } t.set(c, d); } //#endregion //#region node_modules/eve/dist/src/context/dynamic-skill-lifecycle.js const log$7 = createLogger(`dynamic-skills`); function qualifyDynamicSkillNames(e, t, n) { let r = Object.keys(n), i = []; if (r.length === 0) return i; if (t) return i.push({ name: e, entryKey: r[0], entry: n[r[0]] }), i; for (let e of r) i.push({ name: e, entryKey: e, entry: n[e] }); return i; } function formatDynamicSkillAnnouncement(e) { return formatAvailableSkillsSection(Object.values(e).flat()) ?? ``; } const PendingSkillAnnouncementKey = new ContextKey(`eve.pendingSkillAnnouncement`); async function dispatchDynamicSkillEvent(e) { let { ctx: a, resolvers: o, event: s, messages: c } = e; if (a.get(PendingSkillAnnouncementKey) === void 0) { let e = a.get(DynamicSkillManifestKey); e !== void 0 && Object.keys(e).length > 0 && a.setVirtualContext(PendingSkillAnnouncementKey, formatDynamicSkillAnnouncement(e)); } if (!ALLOWED_DYNAMIC_SKILL_EVENTS.has(s.type)) return; let l = o.filter((e) => e.eventNames.includes(s.type)); if (l.length === 0) return; let u = buildResolveContext(a, c), d = a.get(DynamicSkillManifestKey) ?? {}, f = [], p = await Promise.allSettled(l.map(async (e) => { let t = e.events[s.type]; if (t === void 0) return null; let n = await t(s, u); if (n == null) return { resolver: e, named: [] }; let r, i; return isBrandedSkillEntry(n) ? (r = { _single: n }, i = !0) : (r = n, i = !1), { resolver: e, named: qualifyDynamicSkillNames(e.slug, i, r) }; })); for (let e of p) { if (e.status === `rejected`) { log$7.error(`Dynamic skill resolver (${s.type}) threw — skipping.`, { error: toErrorMessage(e.reason) }); continue; } e.value !== null && f.push({ resolver: e.value.resolver, skills: e.value.named.map(({ name: e, entry: t }) => normalizeSkillPackage({ ...t, name: e })) }); } if (f.length === 0) return; let m = { ...d }; for (let { resolver: e, skills: t } of f) t.length === 0 ? delete m[e.slug] : m[e.slug] = t.map((e) => ({ description: e.description, name: e.name })); let h = /* @__PURE__ */ new Map(); for (let [e, t] of Object.entries(m)) for (let { name: n } of t) { let t = h.get(n); if (t !== void 0) throw Error(`Dynamic skill "${n}" from resolver "${e}" collides with dynamic resolver "${t}". Namespace the map key manually, e.g. "${e}__${n}".`); h.set(n, e); } let g = await a.require(SandboxKey).get(); if (g !== null) for (let { skills: e } of f) for (let t of e) await writeSkillPackageToSandbox({ sandbox: g, skill: t }); a.set(DynamicSkillManifestKey, m), a.setVirtualContext(PendingSkillAnnouncementKey, formatDynamicSkillAnnouncement(m)); } //#endregion //#region node_modules/eve/dist/src/context/dynamic-tool-lifecycle.js const log$6 = createLogger(`dynamic-tools`); function toHarnessToolDefinition(e, t) { return { description: t.description, execute: (e) => t.execute(e, buildCallbackContext()), inputSchema: convertInputSchema(t.inputSchema), name: e, approval: t.approval, outputSchema: convertOptionalOutputSchema(t.outputSchema), ...t.toModelOutput === void 0 ? {} : { toModelOutput: t.toModelOutput } }; } function convertInputSchema(e) { return typeof e == `object` && e && `~standard` in e ? zodSchema(e) : jsonSchema(e); } function convertOptionalOutputSchema(e) { if (e !== void 0) return typeof e == `object` && e && `~standard` in e ? zodSchema(e) : jsonSchema(e); } function qualifyDynamicToolNames(e, t, n) { let r = Object.keys(n), i = []; if (r.length === 0) return i; if (t) return i.push({ name: e, entryKey: r[0], entry: n[r[0]] }), i; for (let e of r) i.push({ name: e, entryKey: e, entry: n[e] }); return i; } function getStepRegistry() { let e = Symbol.for(`@workflow/core//registeredSteps`), t = globalThis, n = t[e]; return n === void 0 && (n = /* @__PURE__ */ new Map(), t[e] = n), n; } function registerStepFunction(e, t) { getStepRegistry().set(e, t); } function safeSerialize(e) { try { return JSON.parse(JSON.stringify(e)); } catch { return {}; } } function durableKeyForEvent(e) { switch (e) { case `session.started`: return SessionDynamicToolMetadataKey; case `turn.started`: return TurnDynamicToolMetadataKey; default: return; } } async function resolveToolsFromEvent(e, t, n, r) { let a = await Promise.allSettled(t.map(async (t) => { let i = t.events[n.type]; if (i === void 0) return null; let a = await i(n, buildResolveContext(e, r)); if (a == null) return null; let s, c; return isBrandedToolEntry(a) ? (s = { _single: a }, c = !0) : (s = a, c = !1), { resolver: t, entries: s, isSingle: c }; })), s = [], c = [], l = /* @__PURE__ */ new Map(); for (let e of a) { if (e.status === `rejected`) { log$6.error(`Dynamic tool resolver (${n.type}) threw — skipping.`, { error: toErrorMessage(e.reason) }); continue; } if (e.value === null) continue; let { resolver: t, entries: r, isSingle: a } = e.value, o = qualifyDynamicToolNames(t.slug, a, r); for (let { name: e, entryKey: r, entry: i } of o) { let a = l.get(e); if (a !== void 0 && a !== t.slug) throw Error(`Dynamic tool "${e}" from resolver "${t.slug}" collides with dynamic resolver "${a}". Namespace the map key manually, e.g. "${t.slug}__${e}".`); if (l.set(e, t.slug), c.push(toHarnessToolDefinition(e, i)), n.type === `step.started`) continue; let o = `__executeStepFn` in i ? i.__executeStepFn : void 0, u = `__closureVars` in i ? i.__closureVars : void 0, f = o?.stepId, p = u === void 0 ? void 0 : safeSerialize(u); if (f === void 0) { let e = `eve:framework-dynamic:${t.slug}:${r}`, n = i.execute.bind(i); registerStepFunction(e, (e, t, r) => n(t, r)), f = e, p = {}; } let m; if (i.approval !== void 0) { m = `eve:dynamic-tool-approval:${t.slug}:${r}`; let e = i.approval.bind(i); registerStepFunction(m, (t, n) => e(n)); } s.push({ name: e, description: i.description, inputSchema: normalizeJsonSchemaDefinition(i.inputSchema), outputSchema: i.outputSchema === void 0 ? void 0 : normalizeJsonSchemaDefinition(i.outputSchema, `output`), resolverSlug: t.slug, entryKey: r, executeStepFnName: f, approvalStepFnName: m, closureVars: p }); } } return { metadata: s, liveTools: c }; } async function dispatchDynamicToolEvent(e) { let { ctx: n, resolvers: r, event: i, messages: o } = e; if (!ALLOWED_DYNAMIC_TOOL_EVENTS.has(i.type)) return; let s = r.filter((e) => e.eventNames.includes(i.type)); if (s.length === 0) return; let { metadata: c, liveTools: l } = await resolveToolsFromEvent(n, s, i, o); if (i.type === `step.started`) { n.setVirtualContext(LiveStepToolsKey, l); return; } let u = durableKeyForEvent(i.type); if (u === void 0) return; let d = new Set(s.map((e) => e.slug)), f = (n.get(u) ?? []).filter((e) => !d.has(e.resolverSlug)); n.set(u, [...f, ...c]); } //#endregion //#region node_modules/eve/dist/src/compiled/_chunks/workflow/dist-D7CzPkf8.js var u$6; const d$6 = Object.freeze({ status: `aborted` }); function f$5(e, t, n) { function r(n, r) { if (n._zod || Object.defineProperty(n, "_zod", { value: { def: r, constr: o, traits: /* @__PURE__ */ new Set() }, enumerable: !1 }), n._zod.traits.has(e)) return; n._zod.traits.add(e), t(n, r); let i = o.prototype, a = Object.keys(i); for (let e = 0; e < a.length; e++) { let t = a[e]; t in n || (n[t] = i[t].bind(n)); } } let i = n?.Parent ?? Object; class a extends i {} Object.defineProperty(a, "name", { value: e }); function o(e) { var t; let i = n?.Parent ? new a() : this; r(i, e), (t = i._zod).deferred ?? (t.deferred = []); for (let e of i._zod.deferred) e(); return i; } return Object.defineProperty(o, "init", { value: r }), Object.defineProperty(o, Symbol.hasInstance, { value: (t) => n?.Parent && t instanceof n.Parent ? !0 : t?._zod?.traits?.has(e) }), Object.defineProperty(o, "name", { value: e }), o; } var p$7 = class extends Error { constructor() { super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`); } }; var ee$4 = class extends Error { constructor(e) { super(`Encountered unidirectional transform during encode: ${e}`), this.name = `ZodEncodeError`; } }; (u$6 = globalThis).__zod_globalConfig ?? (u$6.__zod_globalConfig = {}); const te$4 = globalThis.__zod_globalConfig; function m$5(e) { return e && Object.assign(te$4, e), te$4; } function ne$4(e) { let t = Object.values(e).filter((e) => typeof e == `number`); return Object.entries(e).filter(([e, n]) => t.indexOf(+e) === -1).map(([e, t]) => t); } function re$4(e, t) { return typeof t == `bigint` ? t.toString() : t; } function ie$4(e) { return { get value() { { let t = e(); return Object.defineProperty(this, "value", { value: t }), t; } } }; } function ae$5(e) { return e == null; } function oe$5(e) { let t = +!!e.startsWith(`^`), n = e.endsWith(`$`) ? e.length - 1 : e.length; return e.slice(t, n); } function se$6(e, t) { let n = e / t, r = Math.round(n), i = 2 ** -52 * Math.max(Math.abs(n), 1); return Math.abs(n - r) < i ? 0 : n - r; } const ce$6 = Symbol(`evaluating`); function h$5(e, t, n) { let r; Object.defineProperty(e, t, { get() { if (r !== ce$6) return r === void 0 && (r = ce$6, r = n()), r; }, set(n) { Object.defineProperty(e, t, { value: n }); }, configurable: !0 }); } function le$6(e, t, n) { Object.defineProperty(e, t, { value: n, writable: !0, enumerable: !0, configurable: !0 }); } function g$5(...e) { let t = {}; for (let n of e) Object.assign(t, Object.getOwnPropertyDescriptors(n)); return Object.defineProperties({}, t); } function ue$6(e) { return JSON.stringify(e); } function de$6(e) { return e.toLowerCase().trim().replace(/[^\w\s-]/g, ``).replace(/[\s_-]+/g, `-`).replace(/^-+|-+$/g, ``); } const fe$6 = `captureStackTrace` in Error ? Error.captureStackTrace : (...e) => {}; function pe$6(e) { return typeof e == `object` && !!e && !Array.isArray(e); } const me$6 = ie$4(() => { if (te$4.jitless || typeof navigator < `u` && navigator?.userAgent?.includes(`Cloudflare`)) return !1; try { return Function(``), !0; } catch { return !1; } }); function he$6(e) { if (pe$6(e) === !1) return !1; let t = e.constructor; if (t === void 0 || typeof t != `function`) return !0; let n = t.prototype; return !(pe$6(n) === !1 || Object.prototype.hasOwnProperty.call(n, `isPrototypeOf`) === !1); } function ge$6(e) { return he$6(e) ? { ...e } : Array.isArray(e) ? [...e] : e instanceof Map ? new Map(e) : e instanceof Set ? new Set(e) : e; } const _e$6 = /* @__PURE__ */ new Set([ `string`, `number`, `symbol` ]); function ve$6(e) { return e.replace(/[.*+?^${}()|[\]\\]/g, `\\$&`); } function _$4(e, t, n) { let r = new e._zod.constr(t ?? e._zod.def); return (!t || n?.parent) && (r._zod.parent = e), r; } function v$5(e) { let t = e; if (!t) return {}; if (typeof t == `string`) return { error: () => t }; if (t?.message !== void 0) { if (t?.error !== void 0) throw Error("Cannot specify both `message` and `error` params"); t.error = t.message; } return delete t.message, typeof t.error == `string` ? { ...t, error: () => t.error } : t; } function ye$6(e) { return Object.keys(e).filter((t) => e[t]._zod.optin === `optional` && e[t]._zod.optout === `optional`); } const be$6 = { safeint: [-(2 ** 53 - 1), 2 ** 53 - 1], int32: [-2147483648, 2147483647], uint32: [0, 4294967295], float32: [-34028234663852886e22, 34028234663852886e22], float64: [-Number.MAX_VALUE, Number.MAX_VALUE] }; function xe$6(e, t) { let n = e._zod.def, r = n.checks; if (r && r.length > 0) throw Error(`.pick() cannot be used on object schemas containing refinements`); return _$4(e, g$5(e._zod.def, { get shape() { let e = {}; for (let r in t) { if (!(r in n.shape)) throw Error(`Unrecognized key: "${r}"`); t[r] && (e[r] = n.shape[r]); } return le$6(this, `shape`, e), e; }, checks: [] })); } function Se$6(e, t) { let n = e._zod.def, r = n.checks; if (r && r.length > 0) throw Error(`.omit() cannot be used on object schemas containing refinements`); return _$4(e, g$5(e._zod.def, { get shape() { let r = { ...e._zod.def.shape }; for (let e in t) { if (!(e in n.shape)) throw Error(`Unrecognized key: "${e}"`); t[e] && delete r[e]; } return le$6(this, `shape`, r), r; }, checks: [] })); } function Ce$6(e, t) { if (!he$6(t)) throw Error(`Invalid input to extend: expected a plain object`); let n = e._zod.def.checks; if (n && n.length > 0) { let n = e._zod.def.shape; for (let e in t) if (Object.getOwnPropertyDescriptor(n, e) !== void 0) throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead."); } return _$4(e, g$5(e._zod.def, { get shape() { let n = { ...e._zod.def.shape, ...t }; return le$6(this, `shape`, n), n; } })); } function we$6(e, t) { if (!he$6(t)) throw Error(`Invalid input to safeExtend: expected a plain object`); return _$4(e, g$5(e._zod.def, { get shape() { let n = { ...e._zod.def.shape, ...t }; return le$6(this, `shape`, n), n; } })); } function Te$6(e, t) { if (e._zod.def.checks?.length) throw Error(`.merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.`); return _$4(e, g$5(e._zod.def, { get shape() { let n = { ...e._zod.def.shape, ...t._zod.def.shape }; return le$6(this, `shape`, n), n; }, get catchall() { return t._zod.def.catchall; }, checks: t._zod.def.checks ?? [] })); } function Ee$6(e, t, n) { let r = t._zod.def.checks; if (r && r.length > 0) throw Error(`.partial() cannot be used on object schemas containing refinements`); return _$4(t, g$5(t._zod.def, { get shape() { let r = t._zod.def.shape, i = { ...r }; if (n) for (let t in n) { if (!(t in r)) throw Error(`Unrecognized key: "${t}"`); n[t] && (i[t] = e ? new e({ type: `optional`, innerType: r[t] }) : r[t]); } else for (let t in r) i[t] = e ? new e({ type: `optional`, innerType: r[t] }) : r[t]; return le$6(this, `shape`, i), i; }, checks: [] })); } function De$6(e, t, n) { return _$4(t, g$5(t._zod.def, { get shape() { let r = t._zod.def.shape, i = { ...r }; if (n) for (let t in n) { if (!(t in i)) throw Error(`Unrecognized key: "${t}"`); n[t] && (i[t] = new e({ type: `nonoptional`, innerType: r[t] })); } else for (let t in r) i[t] = new e({ type: `nonoptional`, innerType: r[t] }); return le$6(this, `shape`, i), i; } })); } function Oe$6(e, t = 0) { if (e.aborted === !0) return !0; for (let n = t; n < e.issues.length; n++) if (e.issues[n]?.continue !== !0) return !0; return !1; } function ke$6(e, t = 0) { if (e.aborted === !0) return !0; for (let n = t; n < e.issues.length; n++) if (e.issues[n]?.continue === !1) return !0; return !1; } function y$3(e, t) { return t.map((t) => { var n; return (n = t).path ?? (n.path = []), t.path.unshift(e), t; }); } function Ae$6(e) { return typeof e == `string` ? e : e?.message; } function b$5(e, t, n) { let r = e.message ? e.message : Ae$6(e.inst?._zod.def?.error?.(e)) ?? Ae$6(t?.error?.(e)) ?? Ae$6(n.customError?.(e)) ?? Ae$6(n.localeError?.(e)) ?? `Invalid input`, { inst: i, continue: a, input: o, ...s } = e; return s.path ??= [], s.message = r, t?.reportInput && (s.input = o), s; } function je$6(e) { return Array.isArray(e) ? `array` : typeof e == `string` ? `string` : `unknown`; } function Me$6(...e) { let [t, n, r] = e; return typeof t == `string` ? { message: t, code: `custom`, input: n, inst: r } : { ...t }; } const Ne$6 = (e, t) => { e.name = `$ZodError`, Object.defineProperty(e, "_zod", { value: e._zod, enumerable: !1 }), Object.defineProperty(e, "issues", { value: t, enumerable: !1 }), e.message = JSON.stringify(t, re$4, 2), Object.defineProperty(e, "toString", { value: () => e.message, enumerable: !1 }); }; const Pe$6 = f$5(`$ZodError`, Ne$6); const Fe$6 = f$5(`$ZodError`, Ne$6, { Parent: Error }); function Ie$6(e, t = (e) => e.message) { let n = {}, r = []; for (let i of e.issues) i.path.length > 0 ? (n[i.path[0]] = n[i.path[0]] || [], n[i.path[0]].push(t(i))) : r.push(t(i)); return { formErrors: r, fieldErrors: n }; } function Le$6(e, t = (e) => e.message) { let n = { _errors: [] }, r = (e, i = []) => { for (let a of e.issues) if (a.code === `invalid_union` && a.errors.length) a.errors.map((e) => r({ issues: e }, [...i, ...a.path])); else if (a.code === `invalid_key`) r({ issues: a.issues }, [...i, ...a.path]); else if (a.code === `invalid_element`) r({ issues: a.issues }, [...i, ...a.path]); else { let e = [...i, ...a.path]; if (e.length === 0) n._errors.push(t(a)); else { let r = n, i = 0; for (; i < e.length;) { let n = e[i]; i === e.length - 1 ? (r[n] = r[n] || { _errors: [] }, r[n]._errors.push(t(a))) : r[n] = r[n] || { _errors: [] }, r = r[n], i++; } } } }; return r(e), n; } const Re$6 = (e) => (t, n, r, i) => { let a = r ? { ...r, async: !1 } : { async: !1 }, o = t._zod.run({ value: n, issues: [] }, a); if (o instanceof Promise) throw new p$7(); if (o.issues.length) { let t = new ((i?.Err) ?? e)(o.issues.map((e) => b$5(e, a, m$5()))); throw fe$6(t, i?.callee), t; } return o.value; }; const ze$6 = (e) => async (t, n, r, i) => { let a = r ? { ...r, async: !0 } : { async: !0 }, o = t._zod.run({ value: n, issues: [] }, a); if (o instanceof Promise && (o = await o), o.issues.length) { let t = new ((i?.Err) ?? e)(o.issues.map((e) => b$5(e, a, m$5()))); throw fe$6(t, i?.callee), t; } return o.value; }; const Be$6 = (e) => (t, n, r) => { let i = r ? { ...r, async: !1 } : { async: !1 }, a = t._zod.run({ value: n, issues: [] }, i); if (a instanceof Promise) throw new p$7(); return a.issues.length ? { success: !1, error: new (e ?? Pe$6)(a.issues.map((e) => b$5(e, i, m$5()))) } : { success: !0, data: a.value }; }; const Ve$6 = Be$6(Fe$6); const He$6 = (e) => async (t, n, r) => { let i = r ? { ...r, async: !0 } : { async: !0 }, a = t._zod.run({ value: n, issues: [] }, i); return a instanceof Promise && (a = await a), a.issues.length ? { success: !1, error: new e(a.issues.map((e) => b$5(e, i, m$5()))) } : { success: !0, data: a.value }; }; const Ue$6 = He$6(Fe$6); const We$6 = (e) => (t, n, r) => { let i = r ? { ...r, direction: `backward` } : { direction: `backward` }; return Re$6(e)(t, n, i); }; const Ge$6 = (e) => (t, n, r) => Re$6(e)(t, n, r); const Ke$6 = (e) => async (t, n, r) => { let i = r ? { ...r, direction: `backward` } : { direction: `backward` }; return ze$6(e)(t, n, i); }; const qe$6 = (e) => async (t, n, r) => ze$6(e)(t, n, r); const Je$6 = (e) => (t, n, r) => { let i = r ? { ...r, direction: `backward` } : { direction: `backward` }; return Be$6(e)(t, n, i); }; const Ye$6 = (e) => (t, n, r) => Be$6(e)(t, n, r); const Xe$6 = (e) => async (t, n, r) => { let i = r ? { ...r, direction: `backward` } : { direction: `backward` }; return He$6(e)(t, n, i); }; const Ze$6 = (e) => async (t, n, r) => He$6(e)(t, n, r); const Qe$6 = /^[cC][0-9a-z]{6,}$/; const $e$6 = /^[0-9a-z]+$/; const et$6 = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/; const tt$6 = /^[0-9a-vA-V]{20}$/; const nt$6 = /^[A-Za-z0-9]{27}$/; const rt$6 = /^[a-zA-Z0-9_-]{21}$/; const it$6 = /^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/; const at$6 = /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/; const ot$6 = (e) => e ? RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`) : /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/; const st$6 = /^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/; function ct$6() { return RegExp(`^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`, `u`); } const lt$6 = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/; const ut$6 = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/; const dt$6 = /^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/; const ft$6 = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/; const pt$6 = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/; const mt$6 = /^[A-Za-z0-9_-]*$/; const ht$6 = /^https?$/; const gt$6 = /^\+[1-9]\d{6,14}$/; const _t$6 = `(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`; const vt$6 = RegExp(`^${_t$6}$`); function yt$6(e) { let t = `(?:[01]\\d|2[0-3]):[0-5]\\d`; return typeof e.precision == `number` ? e.precision === -1 ? `${t}` : e.precision === 0 ? `${t}:[0-5]\\d` : `${t}:[0-5]\\d\\.\\d{${e.precision}}` : `${t}(?::[0-5]\\d(?:\\.\\d+)?)?`; } function bt$6(e) { return RegExp(`^${yt$6(e)}$`); } function xt$6(e) { let t = yt$6({ precision: e.precision }), n = [`Z`]; e.local && n.push(``), e.offset && n.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`); let r = `${t}(?:${n.join(`|`)})`; return RegExp(`^${_t$6}T(?:${r})$`); } const St$6 = (e) => { let t = e ? `[\\s\\S]{${e?.minimum ?? 0},${e?.maximum ?? ``}}` : `[\\s\\S]*`; return RegExp(`^${t}$`); }; const Ct$6 = /^-?\d+$/; const wt$6 = /^-?\d+(?:\.\d+)?$/; const Tt$6 = /^(?:true|false)$/i; const Et$6 = /^null$/i; const Dt$6 = /^[^A-Z]*$/; const Ot$6 = /^[^a-z]*$/; const x$5 = f$5(`$ZodCheck`, (e, t) => { var n; e._zod ??= {}, e._zod.def = t, (n = e._zod).onattach ?? (n.onattach = []); }); const kt$6 = { number: `number`, bigint: `bigint`, object: `date` }; const At$6 = f$5(`$ZodCheckLessThan`, (e, t) => { x$5.init(e, t); let n = kt$6[typeof t.value]; e._zod.onattach.push((e) => { let n = e._zod.bag, r = (t.inclusive ? n.maximum : n.exclusiveMaximum) ?? Infinity; t.value < r && (t.inclusive ? n.maximum = t.value : n.exclusiveMaximum = t.value); }), e._zod.check = (r) => { (t.inclusive ? r.value <= t.value : r.value < t.value) || r.issues.push({ origin: n, code: `too_big`, maximum: typeof t.value == `object` ? t.value.getTime() : t.value, input: r.value, inclusive: t.inclusive, inst: e, continue: !t.abort }); }; }); const jt$6 = f$5(`$ZodCheckGreaterThan`, (e, t) => { x$5.init(e, t); let n = kt$6[typeof t.value]; e._zod.onattach.push((e) => { let n = e._zod.bag, r = (t.inclusive ? n.minimum : n.exclusiveMinimum) ?? -Infinity; t.value > r && (t.inclusive ? n.minimum = t.value : n.exclusiveMinimum = t.value); }), e._zod.check = (r) => { (t.inclusive ? r.value >= t.value : r.value > t.value) || r.issues.push({ origin: n, code: `too_small`, minimum: typeof t.value == `object` ? t.value.getTime() : t.value, input: r.value, inclusive: t.inclusive, inst: e, continue: !t.abort }); }; }); const Mt$6 = f$5(`$ZodCheckMultipleOf`, (e, t) => { x$5.init(e, t), e._zod.onattach.push((e) => { var n; (n = e._zod.bag).multipleOf ?? (n.multipleOf = t.value); }), e._zod.check = (n) => { if (typeof n.value != typeof t.value) throw Error(`Cannot mix number and bigint in multiple_of check.`); (typeof n.value == `bigint` ? n.value % t.value === BigInt(0) : se$6(n.value, t.value) === 0) || n.issues.push({ origin: typeof n.value, code: `not_multiple_of`, divisor: t.value, input: n.value, inst: e, continue: !t.abort }); }; }); const Nt$5 = f$5(`$ZodCheckNumberFormat`, (e, t) => { x$5.init(e, t), t.format = t.format || `float64`; let n = t.format?.includes(`int`), r = n ? `int` : `number`, [i, a] = be$6[t.format]; e._zod.onattach.push((e) => { let r = e._zod.bag; r.format = t.format, r.minimum = i, r.maximum = a, n && (r.pattern = Ct$6); }), e._zod.check = (o) => { let s = o.value; if (n) { if (!Number.isInteger(s)) { o.issues.push({ expected: r, format: t.format, code: `invalid_type`, continue: !1, input: s, inst: e }); return; } if (!Number.isSafeInteger(s)) { s > 0 ? o.issues.push({ input: s, code: `too_big`, maximum: 2 ** 53 - 1, note: `Integers must be within the safe integer range.`, inst: e, origin: r, inclusive: !0, continue: !t.abort }) : o.issues.push({ input: s, code: `too_small`, minimum: -(2 ** 53 - 1), note: `Integers must be within the safe integer range.`, inst: e, origin: r, inclusive: !0, continue: !t.abort }); return; } } s < i && o.issues.push({ origin: `number`, input: s, code: `too_small`, minimum: i, inclusive: !0, inst: e, continue: !t.abort }), s > a && o.issues.push({ origin: `number`, input: s, code: `too_big`, maximum: a, inclusive: !0, inst: e, continue: !t.abort }); }; }); const Pt$5 = f$5(`$ZodCheckMaxLength`, (e, t) => { var n; x$5.init(e, t), (n = e._zod.def).when ?? (n.when = (e) => { let t = e.value; return !ae$5(t) && t.length !== void 0; }), e._zod.onattach.push((e) => { let n = e._zod.bag.maximum ?? Infinity; t.maximum < n && (e._zod.bag.maximum = t.maximum); }), e._zod.check = (n) => { let r = n.value; if (r.length <= t.maximum) return; let i = je$6(r); n.issues.push({ origin: i, code: `too_big`, maximum: t.maximum, inclusive: !0, input: r, inst: e, continue: !t.abort }); }; }); const Ft$5 = f$5(`$ZodCheckMinLength`, (e, t) => { var n; x$5.init(e, t), (n = e._zod.def).when ?? (n.when = (e) => { let t = e.value; return !ae$5(t) && t.length !== void 0; }), e._zod.onattach.push((e) => { let n = e._zod.bag.minimum ?? -Infinity; t.minimum > n && (e._zod.bag.minimum = t.minimum); }), e._zod.check = (n) => { let r = n.value; if (r.length >= t.minimum) return; let i = je$6(r); n.issues.push({ origin: i, code: `too_small`, minimum: t.minimum, inclusive: !0, input: r, inst: e, continue: !t.abort }); }; }); const It$4 = f$5(`$ZodCheckLengthEquals`, (e, t) => { var n; x$5.init(e, t), (n = e._zod.def).when ?? (n.when = (e) => { let t = e.value; return !ae$5(t) && t.length !== void 0; }), e._zod.onattach.push((e) => { let n = e._zod.bag; n.minimum = t.length, n.maximum = t.length, n.length = t.length; }), e._zod.check = (n) => { let r = n.value, i = r.length; if (i === t.length) return; let a = je$6(r), o = i > t.length; n.issues.push({ origin: a, ...o ? { code: `too_big`, maximum: t.length } : { code: `too_small`, minimum: t.length }, inclusive: !0, exact: !0, input: n.value, inst: e, continue: !t.abort }); }; }); const Lt$5 = f$5(`$ZodCheckStringFormat`, (e, t) => { var n, r; x$5.init(e, t), e._zod.onattach.push((e) => { let n = e._zod.bag; n.format = t.format, t.pattern && (n.patterns ??= /* @__PURE__ */ new Set(), n.patterns.add(t.pattern)); }), t.pattern ? (n = e._zod).check ?? (n.check = (n) => { t.pattern.lastIndex = 0, !t.pattern.test(n.value) && n.issues.push({ origin: `string`, code: `invalid_format`, format: t.format, input: n.value, ...t.pattern ? { pattern: t.pattern.toString() } : {}, inst: e, continue: !t.abort }); }) : (r = e._zod).check ?? (r.check = () => {}); }); const Rt$4 = f$5(`$ZodCheckRegex`, (e, t) => { Lt$5.init(e, t), e._zod.check = (n) => { t.pattern.lastIndex = 0, !t.pattern.test(n.value) && n.issues.push({ origin: `string`, code: `invalid_format`, format: `regex`, input: n.value, pattern: t.pattern.toString(), inst: e, continue: !t.abort }); }; }); const zt$5 = f$5(`$ZodCheckLowerCase`, (e, t) => { t.pattern ??= Dt$6, Lt$5.init(e, t); }); const Bt$4 = f$5(`$ZodCheckUpperCase`, (e, t) => { t.pattern ??= Ot$6, Lt$5.init(e, t); }); const Vt$5 = f$5(`$ZodCheckIncludes`, (e, t) => { x$5.init(e, t); let n = ve$6(t.includes), r = new RegExp(typeof t.position == `number` ? `^.{${t.position}}${n}` : n); t.pattern = r, e._zod.onattach.push((e) => { let t = e._zod.bag; t.patterns ??= /* @__PURE__ */ new Set(), t.patterns.add(r); }), e._zod.check = (n) => { n.value.includes(t.includes, t.position) || n.issues.push({ origin: `string`, code: `invalid_format`, format: `includes`, includes: t.includes, input: n.value, inst: e, continue: !t.abort }); }; }); const Ht$5 = f$5(`$ZodCheckStartsWith`, (e, t) => { x$5.init(e, t); let n = RegExp(`^${ve$6(t.prefix)}.*`); t.pattern ??= n, e._zod.onattach.push((e) => { let t = e._zod.bag; t.patterns ??= /* @__PURE__ */ new Set(), t.patterns.add(n); }), e._zod.check = (n) => { n.value.startsWith(t.prefix) || n.issues.push({ origin: `string`, code: `invalid_format`, format: `starts_with`, prefix: t.prefix, input: n.value, inst: e, continue: !t.abort }); }; }); const Ut$4 = f$5(`$ZodCheckEndsWith`, (e, t) => { x$5.init(e, t); let n = RegExp(`.*${ve$6(t.suffix)}$`); t.pattern ??= n, e._zod.onattach.push((e) => { let t = e._zod.bag; t.patterns ??= /* @__PURE__ */ new Set(), t.patterns.add(n); }), e._zod.check = (n) => { n.value.endsWith(t.suffix) || n.issues.push({ origin: `string`, code: `invalid_format`, format: `ends_with`, suffix: t.suffix, input: n.value, inst: e, continue: !t.abort }); }; }); const Wt$4 = f$5(`$ZodCheckOverwrite`, (e, t) => { x$5.init(e, t), e._zod.check = (e) => { e.value = t.tx(e.value); }; }); var Gt$4 = class { constructor(e = []) { this.content = [], this.indent = 0, this && (this.args = e); } indented(e) { this.indent += 1, e(this), --this.indent; } write(e) { if (typeof e == `function`) { e(this, { execution: `sync` }), e(this, { execution: `async` }); return; } let t = e.split(` `).filter((e) => e), n = Math.min(...t.map((e) => e.length - e.trimStart().length)), r = t.map((e) => e.slice(n)).map((e) => ` `.repeat(this.indent * 2) + e); for (let e of r) this.content.push(e); } compile() { let e = Function, t = this?.args, n = [...(this?.content ?? [``]).map((e) => ` ${e}`)]; return new e(...t, n.join(` `)); } }; const Kt$5 = { major: 4, minor: 4, patch: 3 }; const S$5 = f$5(`$ZodType`, (e, t) => { var n; e ??= {}, e._zod.def = t, e._zod.bag = e._zod.bag || {}, e._zod.version = Kt$5; let r = [...e._zod.def.checks ?? []]; e._zod.traits.has(`$ZodCheck`) && r.unshift(e); for (let t of r) for (let n of t._zod.onattach) n(e); if (r.length === 0) (n = e._zod).deferred ?? (n.deferred = []), e._zod.deferred?.push(() => { e._zod.run = e._zod.parse; }); else { let t = (e, t, n) => { let r = Oe$6(e), i; for (let a of t) { if (a._zod.def.when) { if (ke$6(e) || !a._zod.def.when(e)) continue; } else if (r) continue; let t = e.issues.length, o = a._zod.check(e); if (o instanceof Promise && n?.async === !1) throw new p$7(); if (i || o instanceof Promise) i = (i ?? Promise.resolve()).then(async () => { await o, e.issues.length !== t && (r ||= Oe$6(e, t)); }); else { if (e.issues.length === t) continue; r ||= Oe$6(e, t); } } return i ? i.then(() => e) : e; }, n = (n, i, a) => { if (Oe$6(n)) return n.aborted = !0, n; let o = t(i, r, a); if (o instanceof Promise) { if (a.async === !1) throw new p$7(); return o.then((t) => e._zod.parse(t, a)); } return e._zod.parse(o, a); }; e._zod.run = (i, a) => { if (a.skipChecks) return e._zod.parse(i, a); if (a.direction === `backward`) { let t = e._zod.parse({ value: i.value, issues: [] }, { ...a, skipChecks: !0 }); return t instanceof Promise ? t.then((e) => n(e, i, a)) : n(t, i, a); } let o = e._zod.parse(i, a); if (o instanceof Promise) { if (a.async === !1) throw new p$7(); return o.then((e) => t(e, r, a)); } return t(o, r, a); }; } h$5(e, `~standard`, () => ({ validate: (t) => { try { let n = Ve$6(e, t); return n.success ? { value: n.data } : { issues: n.error?.issues }; } catch { return Ue$6(e, t).then((e) => e.success ? { value: e.data } : { issues: e.error?.issues }); } }, vendor: `zod`, version: 1 })); }); const qt$5 = f$5(`$ZodString`, (e, t) => { S$5.init(e, t), e._zod.pattern = [...e?._zod.bag?.patterns ?? []].pop() ?? St$6(e._zod.bag), e._zod.parse = (n, r) => { if (t.coerce) try { n.value = String(n.value); } catch {} return typeof n.value == `string` || n.issues.push({ expected: `string`, code: `invalid_type`, input: n.value, inst: e }), n; }; }); const C$6 = f$5(`$ZodStringFormat`, (e, t) => { Lt$5.init(e, t), qt$5.init(e, t); }); const Jt$5 = f$5(`$ZodGUID`, (e, t) => { t.pattern ??= at$6, C$6.init(e, t); }); const Yt$4 = f$5(`$ZodUUID`, (e, t) => { if (t.version) { let e = { v1: 1, v2: 2, v3: 3, v4: 4, v5: 5, v6: 6, v7: 7, v8: 8 }[t.version]; if (e === void 0) throw Error(`Invalid UUID version: "${t.version}"`); t.pattern ??= ot$6(e); } else t.pattern ??= ot$6(); C$6.init(e, t); }); const Xt$4 = f$5(`$ZodEmail`, (e, t) => { t.pattern ??= st$6, C$6.init(e, t); }); const Zt$4 = f$5(`$ZodURL`, (e, t) => { C$6.init(e, t), e._zod.check = (n) => { try { let r = n.value.trim(); if (!t.normalize && t.protocol?.source === ht$6.source && !/^https?:\/\//i.test(r)) { n.issues.push({ code: `invalid_format`, format: `url`, note: `Invalid URL format`, input: n.value, inst: e, continue: !t.abort }); return; } let i = new URL(r); t.hostname && (t.hostname.lastIndex = 0, t.hostname.test(i.hostname) || n.issues.push({ code: `invalid_format`, format: `url`, note: `Invalid hostname`, pattern: t.hostname.source, input: n.value, inst: e, continue: !t.abort })), t.protocol && (t.protocol.lastIndex = 0, t.protocol.test(i.protocol.endsWith(`:`) ? i.protocol.slice(0, -1) : i.protocol) || n.issues.push({ code: `invalid_format`, format: `url`, note: `Invalid protocol`, pattern: t.protocol.source, input: n.value, inst: e, continue: !t.abort })), t.normalize ? n.value = i.href : n.value = r; return; } catch { n.issues.push({ code: `invalid_format`, format: `url`, input: n.value, inst: e, continue: !t.abort }); } }; }); const Qt$4 = f$5(`$ZodEmoji`, (e, t) => { t.pattern ??= ct$6(), C$6.init(e, t); }); const $t$4 = f$5(`$ZodNanoID`, (e, t) => { t.pattern ??= rt$6, C$6.init(e, t); }); const en$4 = f$5(`$ZodCUID`, (e, t) => { t.pattern ??= Qe$6, C$6.init(e, t); }); const tn$4 = f$5(`$ZodCUID2`, (e, t) => { t.pattern ??= $e$6, C$6.init(e, t); }); const nn$4 = f$5(`$ZodULID`, (e, t) => { t.pattern ??= et$6, C$6.init(e, t); }); const rn$4 = f$5(`$ZodXID`, (e, t) => { t.pattern ??= tt$6, C$6.init(e, t); }); const an$4 = f$5(`$ZodKSUID`, (e, t) => { t.pattern ??= nt$6, C$6.init(e, t); }); const on$4 = f$5(`$ZodISODateTime`, (e, t) => { t.pattern ??= xt$6(t), C$6.init(e, t); }); const sn$4 = f$5(`$ZodISODate`, (e, t) => { t.pattern ??= vt$6, C$6.init(e, t); }); const cn$4 = f$5(`$ZodISOTime`, (e, t) => { t.pattern ??= bt$6(t), C$6.init(e, t); }); const ln$4 = f$5(`$ZodISODuration`, (e, t) => { t.pattern ??= it$6, C$6.init(e, t); }); const un$4 = f$5(`$ZodIPv4`, (e, t) => { t.pattern ??= lt$6, C$6.init(e, t), e._zod.bag.format = `ipv4`; }); const dn$4 = f$5(`$ZodIPv6`, (e, t) => { t.pattern ??= ut$6, C$6.init(e, t), e._zod.bag.format = `ipv6`, e._zod.check = (n) => { try { new URL(`http://[${n.value}]`); } catch { n.issues.push({ code: `invalid_format`, format: `ipv6`, input: n.value, inst: e, continue: !t.abort }); } }; }); const fn$4 = f$5(`$ZodCIDRv4`, (e, t) => { t.pattern ??= dt$6, C$6.init(e, t); }); const pn$4 = f$5(`$ZodCIDRv6`, (e, t) => { t.pattern ??= ft$6, C$6.init(e, t), e._zod.check = (n) => { let r = n.value.split(`/`); try { if (r.length !== 2) throw Error(); let [e, t] = r; if (!t) throw Error(); let n = Number(t); if (`${n}` !== t || n < 0 || n > 128) throw Error(); new URL(`http://[${e}]`); } catch { n.issues.push({ code: `invalid_format`, format: `cidrv6`, input: n.value, inst: e, continue: !t.abort }); } }; }); function mn$4(e) { if (e === ``) return !0; if (/\s/.test(e) || e.length % 4 != 0) return !1; try { return atob(e), !0; } catch { return !1; } } const hn$4 = f$5(`$ZodBase64`, (e, t) => { t.pattern ??= pt$6, C$6.init(e, t), e._zod.bag.contentEncoding = `base64`, e._zod.check = (n) => { mn$4(n.value) || n.issues.push({ code: `invalid_format`, format: `base64`, input: n.value, inst: e, continue: !t.abort }); }; }); function gn$4(e) { if (!mt$6.test(e)) return !1; let t = e.replace(/[-_]/g, (e) => e === `-` ? `+` : `/`); return mn$4(t.padEnd(Math.ceil(t.length / 4) * 4, `=`)); } const _n$4 = f$5(`$ZodBase64URL`, (e, t) => { t.pattern ??= mt$6, C$6.init(e, t), e._zod.bag.contentEncoding = `base64url`, e._zod.check = (n) => { gn$4(n.value) || n.issues.push({ code: `invalid_format`, format: `base64url`, input: n.value, inst: e, continue: !t.abort }); }; }); const vn$4 = f$5(`$ZodE164`, (e, t) => { t.pattern ??= gt$6, C$6.init(e, t); }); function yn$4(e, t = null) { try { let n = e.split(`.`); if (n.length !== 3) return !1; let [r] = n; if (!r) return !1; let i = JSON.parse(atob(r)); return !(`typ` in i && i?.typ !== `JWT` || !i.alg || t && (!(`alg` in i) || i.alg !== t)); } catch { return !1; } } const bn$4 = f$5(`$ZodJWT`, (e, t) => { C$6.init(e, t), e._zod.check = (n) => { yn$4(n.value, t.alg) || n.issues.push({ code: `invalid_format`, format: `jwt`, input: n.value, inst: e, continue: !t.abort }); }; }); const xn$3 = f$5(`$ZodNumber`, (e, t) => { S$5.init(e, t), e._zod.pattern = e._zod.bag.pattern ?? wt$6, e._zod.parse = (n, r) => { if (t.coerce) try { n.value = Number(n.value); } catch {} let i = n.value; if (typeof i == `number` && !Number.isNaN(i) && Number.isFinite(i)) return n; let a = typeof i == `number` ? Number.isNaN(i) ? `NaN` : Number.isFinite(i) ? void 0 : `Infinity` : void 0; return n.issues.push({ expected: `number`, code: `invalid_type`, input: i, inst: e, ...a ? { received: a } : {} }), n; }; }); const Sn$3 = f$5(`$ZodNumberFormat`, (e, t) => { Nt$5.init(e, t), xn$3.init(e, t); }); const Cn$3 = f$5(`$ZodBoolean`, (e, t) => { S$5.init(e, t), e._zod.pattern = Tt$6, e._zod.parse = (n, r) => { if (t.coerce) try { n.value = !!n.value; } catch {} let i = n.value; return typeof i == `boolean` || n.issues.push({ expected: `boolean`, code: `invalid_type`, input: i, inst: e }), n; }; }); const wn$3 = f$5(`$ZodNull`, (e, t) => { S$5.init(e, t), e._zod.pattern = Et$6, e._zod.values = /* @__PURE__ */ new Set([null]), e._zod.parse = (t, n) => { let r = t.value; return r === null || t.issues.push({ expected: `null`, code: `invalid_type`, input: r, inst: e }), t; }; }); const Tn$3 = f$5(`$ZodAny`, (e, t) => { S$5.init(e, t), e._zod.parse = (e) => e; }); const En$3 = f$5(`$ZodUnknown`, (e, t) => { S$5.init(e, t), e._zod.parse = (e) => e; }); const Dn$3 = f$5(`$ZodNever`, (e, t) => { S$5.init(e, t), e._zod.parse = (t, n) => (t.issues.push({ expected: `never`, code: `invalid_type`, input: t.value, inst: e }), t); }); function On$3(e, t, n) { e.issues.length && t.issues.push(...y$3(n, e.issues)), t.value[n] = e.value; } const kn$3 = f$5(`$ZodArray`, (e, t) => { S$5.init(e, t), e._zod.parse = (n, r) => { let i = n.value; if (!Array.isArray(i)) return n.issues.push({ expected: `array`, code: `invalid_type`, input: i, inst: e }), n; n.value = Array(i.length); let a = []; for (let e = 0; e < i.length; e++) { let o = i[e], s = t.element._zod.run({ value: o, issues: [] }, r); s instanceof Promise ? a.push(s.then((t) => On$3(t, n, e))) : On$3(s, n, e); } return a.length ? Promise.all(a).then(() => n) : n; }; }); function An$3(e, t, n, r, i, a) { let o = n in r; if (e.issues.length) { if (i && a && !o) return; t.issues.push(...y$3(n, e.issues)); } if (!o && !i) { e.issues.length || t.issues.push({ code: `invalid_type`, expected: `nonoptional`, input: void 0, path: [n] }); return; } e.value === void 0 ? o && (t.value[n] = void 0) : t.value[n] = e.value; } function jn$3(e) { let t = Object.keys(e.shape); for (let n of t) if (!e.shape?.[n]?._zod?.traits?.has(`$ZodType`)) throw Error(`Invalid element at key "${n}": expected a Zod schema`); let n = ye$6(e.shape); return { ...e, keys: t, keySet: new Set(t), numKeys: t.length, optionalKeys: new Set(n) }; } function Mn$3(e, t, n, r, i, a) { let o = [], s = i.keySet, c = i.catchall._zod, l = c.def.type, u = c.optin === `optional`, d = c.optout === `optional`; for (let i in t) { if (i === `__proto__` || s.has(i)) continue; if (l === `never`) { o.push(i); continue; } let a = c.run({ value: t[i], issues: [] }, r); a instanceof Promise ? e.push(a.then((e) => An$3(e, n, i, t, u, d))) : An$3(a, n, i, t, u, d); } return o.length && n.issues.push({ code: `unrecognized_keys`, keys: o, input: t, inst: a }), e.length ? Promise.all(e).then(() => n) : n; } const Nn$3 = f$5(`$ZodObject`, (e, t) => { if (S$5.init(e, t), !Object.getOwnPropertyDescriptor(t, `shape`)?.get) { let e = t.shape; Object.defineProperty(t, "shape", { get: () => { let n = { ...e }; return Object.defineProperty(t, "shape", { value: n }), n; } }); } let n = ie$4(() => jn$3(t)); h$5(e._zod, `propValues`, () => { let e = t.shape, n = {}; for (let t in e) { let r = e[t]._zod; if (r.values) { n[t] ?? (n[t] = /* @__PURE__ */ new Set()); for (let e of r.values) n[t].add(e); } } return n; }); let r = pe$6, i = t.catchall, a; e._zod.parse = (t, o) => { a ??= n.value; let s = t.value; if (!r(s)) return t.issues.push({ expected: `object`, code: `invalid_type`, input: s, inst: e }), t; t.value = {}; let c = [], l = a.shape; for (let e of a.keys) { let n = l[e], r = n._zod.optin === `optional`, i = n._zod.optout === `optional`, a = n._zod.run({ value: s[e], issues: [] }, o); a instanceof Promise ? c.push(a.then((n) => An$3(n, t, e, s, r, i))) : An$3(a, t, e, s, r, i); } return i ? Mn$3(c, s, t, o, n.value, e) : c.length ? Promise.all(c).then(() => t) : t; }; }); const Pn$3 = f$5(`$ZodObjectJIT`, (e, t) => { Nn$3.init(e, t); let n = e._zod.parse, r = ie$4(() => jn$3(t)), i = (e) => { let t = new Gt$4([ `shape`, `payload`, `ctx` ]), n = r.value, i = (e) => { let t = ue$6(e); return `shape[${t}]._zod.run({ value: input[${t}], issues: [] }, ctx)`; }; t.write(`const input = payload.value;`); let a = Object.create(null), o = 0; for (let e of n.keys) a[e] = `key_${o++}`; t.write(`const newResult = {};`); for (let r of n.keys) { let n = a[r], o = ue$6(r), s = e[r], c = s?._zod?.optin === `optional`, l = s?._zod?.optout === `optional`; t.write(`const ${n} = ${i(r)};`), c && l ? t.write(` if (${n}.issues.length) { if (${o} in input) { payload.issues = payload.issues.concat(${n}.issues.map(iss => ({ ...iss, path: iss.path ? [${o}, ...iss.path] : [${o}] }))); } } if (${n}.value === undefined) { if (${o} in input) { newResult[${o}] = undefined; } } else { newResult[${o}] = ${n}.value; } `) : c ? t.write(` if (${n}.issues.length) { payload.issues = payload.issues.concat(${n}.issues.map(iss => ({ ...iss, path: iss.path ? [${o}, ...iss.path] : [${o}] }))); } if (${n}.value === undefined) { if (${o} in input) { newResult[${o}] = undefined; } } else { newResult[${o}] = ${n}.value; } `) : t.write(` const ${n}_present = ${o} in input; if (${n}.issues.length) { payload.issues = payload.issues.concat(${n}.issues.map(iss => ({ ...iss, path: iss.path ? [${o}, ...iss.path] : [${o}] }))); } if (!${n}_present && !${n}.issues.length) { payload.issues.push({ code: "invalid_type", expected: "nonoptional", input: undefined, path: [${o}] }); } if (${n}_present) { if (${n}.value === undefined) { newResult[${o}] = undefined; } else { newResult[${o}] = ${n}.value; } } `); } t.write(`payload.value = newResult;`), t.write(`return payload;`); let s = t.compile(); return (t, n) => s(e, t, n); }, a, o = pe$6, s = !te$4.jitless, c = s && me$6.value, l = t.catchall, u; e._zod.parse = (d, f) => { u ??= r.value; let p = d.value; return o(p) ? s && c && f?.async === !1 && f.jitless !== !0 ? (a ||= i(t.shape), d = a(d, f), l ? Mn$3([], p, d, f, u, e) : d) : n(d, f) : (d.issues.push({ expected: `object`, code: `invalid_type`, input: p, inst: e }), d); }; }); function Fn$2(e, t, n, r) { for (let n of e) if (n.issues.length === 0) return t.value = n.value, t; let i = e.filter((e) => !Oe$6(e)); return i.length === 1 ? (t.value = i[0].value, i[0]) : (t.issues.push({ code: `invalid_union`, input: t.value, inst: n, errors: e.map((e) => e.issues.map((e) => b$5(e, r, m$5()))) }), t); } const In$2 = f$5(`$ZodUnion`, (e, t) => { S$5.init(e, t), h$5(e._zod, `optin`, () => t.options.some((e) => e._zod.optin === `optional`) ? `optional` : void 0), h$5(e._zod, `optout`, () => t.options.some((e) => e._zod.optout === `optional`) ? `optional` : void 0), h$5(e._zod, `values`, () => { if (t.options.every((e) => e._zod.values)) return new Set(t.options.flatMap((e) => Array.from(e._zod.values))); }), h$5(e._zod, `pattern`, () => { if (t.options.every((e) => e._zod.pattern)) { let e = t.options.map((e) => e._zod.pattern); return RegExp(`^(${e.map((e) => oe$5(e.source)).join(`|`)})$`); } }); let n = t.options.length === 1 ? t.options[0]._zod.run : null; e._zod.parse = (r, i) => { if (n) return n(r, i); let a = !1, o = []; for (let e of t.options) { let t = e._zod.run({ value: r.value, issues: [] }, i); if (t instanceof Promise) o.push(t), a = !0; else { if (t.issues.length === 0) return t; o.push(t); } } return a ? Promise.all(o).then((t) => Fn$2(t, r, e, i)) : Fn$2(o, r, e, i); }; }); const Ln$2 = f$5(`$ZodDiscriminatedUnion`, (e, t) => { t.inclusive = !1, In$2.init(e, t); let n = e._zod.parse; h$5(e._zod, `propValues`, () => { let e = {}; for (let n of t.options) { let r = n._zod.propValues; if (!r || Object.keys(r).length === 0) throw Error(`Invalid discriminated union option at index "${t.options.indexOf(n)}"`); for (let [t, n] of Object.entries(r)) { e[t] || (e[t] = /* @__PURE__ */ new Set()); for (let r of n) e[t].add(r); } } return e; }); let r = ie$4(() => { let e = t.options, n = /* @__PURE__ */ new Map(); for (let r of e) { let e = r._zod.propValues?.[t.discriminator]; if (!e || e.size === 0) throw Error(`Invalid discriminated union option at index "${t.options.indexOf(r)}"`); for (let t of e) { if (n.has(t)) throw Error(`Duplicate discriminator value "${String(t)}"`); n.set(t, r); } } return n; }); e._zod.parse = (i, a) => { let o = i.value; if (!pe$6(o)) return i.issues.push({ code: `invalid_type`, expected: `object`, input: o, inst: e }), i; let s = r.value.get(o?.[t.discriminator]); return s ? s._zod.run(i, a) : t.unionFallback || a.direction === `backward` ? n(i, a) : (i.issues.push({ code: `invalid_union`, errors: [], note: `No matching discriminator`, discriminator: t.discriminator, options: Array.from(r.value.keys()), input: o, path: [t.discriminator], inst: e }), i); }; }); const Rn$2 = f$5(`$ZodIntersection`, (e, t) => { S$5.init(e, t), e._zod.parse = (e, n) => { let r = e.value, i = t.left._zod.run({ value: r, issues: [] }, n), a = t.right._zod.run({ value: r, issues: [] }, n); return i instanceof Promise || a instanceof Promise ? Promise.all([i, a]).then(([t, n]) => Bn$2(e, t, n)) : Bn$2(e, i, a); }; }); function zn$2(e, t) { if (e === t || e instanceof Date && t instanceof Date && +e == +t) return { valid: !0, data: e }; if (he$6(e) && he$6(t)) { let n = Object.keys(t), r = Object.keys(e).filter((e) => n.indexOf(e) !== -1), i = { ...e, ...t }; for (let n of r) { let r = zn$2(e[n], t[n]); if (!r.valid) return { valid: !1, mergeErrorPath: [n, ...r.mergeErrorPath] }; i[n] = r.data; } return { valid: !0, data: i }; } if (Array.isArray(e) && Array.isArray(t)) { if (e.length !== t.length) return { valid: !1, mergeErrorPath: [] }; let n = []; for (let r = 0; r < e.length; r++) { let i = e[r], a = t[r], o = zn$2(i, a); if (!o.valid) return { valid: !1, mergeErrorPath: [r, ...o.mergeErrorPath] }; n.push(o.data); } return { valid: !0, data: n }; } return { valid: !1, mergeErrorPath: [] }; } function Bn$2(e, t, n) { let r = /* @__PURE__ */ new Map(), i; for (let n of t.issues) if (n.code === `unrecognized_keys`) { i ??= n; for (let e of n.keys) r.has(e) || r.set(e, {}), r.get(e).l = !0; } else e.issues.push(n); for (let t of n.issues) if (t.code === `unrecognized_keys`) for (let e of t.keys) r.has(e) || r.set(e, {}), r.get(e).r = !0; else e.issues.push(t); let a = [...r].filter(([, e]) => e.l && e.r).map(([e]) => e); if (a.length && i && e.issues.push({ ...i, keys: a }), Oe$6(e)) return e; let o = zn$2(t.value, n.value); if (!o.valid) throw Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`); return e.value = o.data, e; } const Vn$2 = f$5(`$ZodTuple`, (e, t) => { S$5.init(e, t); let n = t.items; e._zod.parse = (r, i) => { let a = r.value; if (!Array.isArray(a)) return r.issues.push({ input: a, inst: e, expected: `tuple`, code: `invalid_type` }), r; r.value = []; let o = [], s = Hn$2(n, `optin`), c = Hn$2(n, `optout`); if (!t.rest) { if (a.length < s) return r.issues.push({ code: `too_small`, minimum: s, inclusive: !0, input: a, inst: e, origin: `array` }), r; a.length > n.length && r.issues.push({ code: `too_big`, maximum: n.length, inclusive: !0, input: a, inst: e, origin: `array` }); } let l = Array(n.length); for (let e = 0; e < n.length; e++) { let t = n[e]._zod.run({ value: a[e], issues: [] }, i); t instanceof Promise ? o.push(t.then((t) => { l[e] = t; })) : l[e] = t; } if (t.rest) { let e = n.length - 1, s = a.slice(n.length); for (let n of s) { e++; let a = t.rest._zod.run({ value: n, issues: [] }, i); a instanceof Promise ? o.push(a.then((t) => Un$2(t, r, e))) : Un$2(a, r, e); } } return o.length ? Promise.all(o).then(() => Wn$2(l, r, n, a, c)) : Wn$2(l, r, n, a, c); }; }); function Hn$2(e, t) { for (let n = e.length - 1; n >= 0; n--) if (e[n]._zod[t] !== `optional`) return n + 1; return 0; } function Un$2(e, t, n) { e.issues.length && t.issues.push(...y$3(n, e.issues)), t.value[n] = e.value; } function Wn$2(e, t, n, r, i) { for (let a = 0; a < n.length; a++) { let n = e[a], o = a < r.length; if (n.issues.length) { if (!o && a >= i) { t.value.length = a; break; } t.issues.push(...y$3(a, n.issues)); } t.value[a] = n.value; } for (let e = t.value.length - 1; e >= r.length && n[e]._zod.optout === `optional` && t.value[e] === void 0; e--) t.value.length = e; return t; } const Gn$2 = f$5(`$ZodRecord`, (e, t) => { S$5.init(e, t), e._zod.parse = (n, r) => { let i = n.value; if (!he$6(i)) return n.issues.push({ expected: `record`, code: `invalid_type`, input: i, inst: e }), n; let a = [], o = t.keyType._zod.values; if (o) { n.value = {}; let s = /* @__PURE__ */ new Set(); for (let c of o) if (typeof c == `string` || typeof c == `number` || typeof c == `symbol`) { s.add(typeof c == `number` ? c.toString() : c); let o = t.keyType._zod.run({ value: c, issues: [] }, r); if (o instanceof Promise) throw Error(`Async schemas not supported in object keys currently`); if (o.issues.length) { n.issues.push({ code: `invalid_key`, origin: `record`, issues: o.issues.map((e) => b$5(e, r, m$5())), input: c, path: [c], inst: e }); continue; } let l = o.value, u = t.valueType._zod.run({ value: i[c], issues: [] }, r); u instanceof Promise ? a.push(u.then((e) => { e.issues.length && n.issues.push(...y$3(c, e.issues)), n.value[l] = e.value; })) : (u.issues.length && n.issues.push(...y$3(c, u.issues)), n.value[l] = u.value); } let c; for (let e in i) s.has(e) || (c ??= [], c.push(e)); c && c.length > 0 && n.issues.push({ code: `unrecognized_keys`, input: i, inst: e, keys: c }); } else { n.value = {}; for (let o of Reflect.ownKeys(i)) { if (o === `__proto__` || !Object.prototype.propertyIsEnumerable.call(i, o)) continue; let s = t.keyType._zod.run({ value: o, issues: [] }, r); if (s instanceof Promise) throw Error(`Async schemas not supported in object keys currently`); if (typeof o == `string` && wt$6.test(o) && s.issues.length) { let e = t.keyType._zod.run({ value: Number(o), issues: [] }, r); if (e instanceof Promise) throw Error(`Async schemas not supported in object keys currently`); e.issues.length === 0 && (s = e); } if (s.issues.length) { t.mode === `loose` ? n.value[o] = i[o] : n.issues.push({ code: `invalid_key`, origin: `record`, issues: s.issues.map((e) => b$5(e, r, m$5())), input: o, path: [o], inst: e }); continue; } let c = t.valueType._zod.run({ value: i[o], issues: [] }, r); c instanceof Promise ? a.push(c.then((e) => { e.issues.length && n.issues.push(...y$3(o, e.issues)), n.value[s.value] = e.value; })) : (c.issues.length && n.issues.push(...y$3(o, c.issues)), n.value[s.value] = c.value); } } return a.length ? Promise.all(a).then(() => n) : n; }; }); const Kn$2 = f$5(`$ZodEnum`, (e, t) => { S$5.init(e, t); let n = ne$4(t.entries), r = new Set(n); e._zod.values = r, e._zod.pattern = RegExp(`^(${n.filter((e) => _e$6.has(typeof e)).map((e) => typeof e == `string` ? ve$6(e) : e.toString()).join(`|`)})$`), e._zod.parse = (t, i) => { let a = t.value; return r.has(a) || t.issues.push({ code: `invalid_value`, values: n, input: a, inst: e }), t; }; }); const qn$2 = f$5(`$ZodLiteral`, (e, t) => { if (S$5.init(e, t), t.values.length === 0) throw Error(`Cannot create literal schema with no valid values`); let n = new Set(t.values); e._zod.values = n, e._zod.pattern = RegExp(`^(${t.values.map((e) => typeof e == `string` ? ve$6(e) : e ? ve$6(e.toString()) : String(e)).join(`|`)})$`), e._zod.parse = (r, i) => { let a = r.value; return n.has(a) || r.issues.push({ code: `invalid_value`, values: t.values, input: a, inst: e }), r; }; }); const Jn$2 = f$5(`$ZodTransform`, (e, t) => { S$5.init(e, t), e._zod.optin = `optional`, e._zod.parse = (n, r) => { if (r.direction === `backward`) throw new ee$4(e.constructor.name); let i = t.transform(n.value, n); if (r.async) return (i instanceof Promise ? i : Promise.resolve(i)).then((e) => (n.value = e, n.fallback = !0, n)); if (i instanceof Promise) throw new p$7(); return n.value = i, n.fallback = !0, n; }; }); function Yn$2(e, t) { return t === void 0 && (e.issues.length || e.fallback) ? { issues: [], value: void 0 } : e; } const Xn$3 = f$5(`$ZodOptional`, (e, t) => { S$5.init(e, t), e._zod.optin = `optional`, e._zod.optout = `optional`, h$5(e._zod, `values`, () => t.innerType._zod.values ? /* @__PURE__ */ new Set([...t.innerType._zod.values, void 0]) : void 0), h$5(e._zod, `pattern`, () => { let e = t.innerType._zod.pattern; return e ? RegExp(`^(${oe$5(e.source)})?$`) : void 0; }), e._zod.parse = (e, n) => { if (t.innerType._zod.optin === `optional`) { let r = e.value, i = t.innerType._zod.run(e, n); return i instanceof Promise ? i.then((e) => Yn$2(e, r)) : Yn$2(i, r); } return e.value === void 0 ? e : t.innerType._zod.run(e, n); }; }); const Zn$2 = f$5(`$ZodExactOptional`, (e, t) => { Xn$3.init(e, t), h$5(e._zod, `values`, () => t.innerType._zod.values), h$5(e._zod, `pattern`, () => t.innerType._zod.pattern), e._zod.parse = (e, n) => t.innerType._zod.run(e, n); }); const Qn$2 = f$5(`$ZodNullable`, (e, t) => { S$5.init(e, t), h$5(e._zod, `optin`, () => t.innerType._zod.optin), h$5(e._zod, `optout`, () => t.innerType._zod.optout), h$5(e._zod, `pattern`, () => { let e = t.innerType._zod.pattern; return e ? RegExp(`^(${oe$5(e.source)}|null)$`) : void 0; }), h$5(e._zod, `values`, () => t.innerType._zod.values ? /* @__PURE__ */ new Set([...t.innerType._zod.values, null]) : void 0), e._zod.parse = (e, n) => e.value === null ? e : t.innerType._zod.run(e, n); }); const $n$2 = f$5(`$ZodDefault`, (e, t) => { S$5.init(e, t), e._zod.optin = `optional`, h$5(e._zod, `values`, () => t.innerType._zod.values), e._zod.parse = (e, n) => { if (n.direction === `backward`) return t.innerType._zod.run(e, n); if (e.value === void 0) return e.value = t.defaultValue, e; let r = t.innerType._zod.run(e, n); return r instanceof Promise ? r.then((e) => er$2(e, t)) : er$2(r, t); }; }); function er$2(e, t) { return e.value === void 0 && (e.value = t.defaultValue), e; } const tr$2 = f$5(`$ZodPrefault`, (e, t) => { S$5.init(e, t), e._zod.optin = `optional`, h$5(e._zod, `values`, () => t.innerType._zod.values), e._zod.parse = (e, n) => (n.direction === `backward` || e.value === void 0 && (e.value = t.defaultValue), t.innerType._zod.run(e, n)); }); const nr$2 = f$5(`$ZodNonOptional`, (e, t) => { S$5.init(e, t), h$5(e._zod, `values`, () => { let e = t.innerType._zod.values; return e ? new Set([...e].filter((e) => e !== void 0)) : void 0; }), e._zod.parse = (n, r) => { let i = t.innerType._zod.run(n, r); return i instanceof Promise ? i.then((t) => rr$2(t, e)) : rr$2(i, e); }; }); function rr$2(e, t) { return !e.issues.length && e.value === void 0 && e.issues.push({ code: `invalid_type`, expected: `nonoptional`, input: e.value, inst: t }), e; } const ir$2 = f$5(`$ZodCatch`, (e, t) => { S$5.init(e, t), e._zod.optin = `optional`, h$5(e._zod, `optout`, () => t.innerType._zod.optout), h$5(e._zod, `values`, () => t.innerType._zod.values), e._zod.parse = (e, n) => { if (n.direction === `backward`) return t.innerType._zod.run(e, n); let r = t.innerType._zod.run(e, n); return r instanceof Promise ? r.then((r) => (e.value = r.value, r.issues.length && (e.value = t.catchValue({ ...e, error: { issues: r.issues.map((e) => b$5(e, n, m$5())) }, input: e.value }), e.issues = [], e.fallback = !0), e)) : (e.value = r.value, r.issues.length && (e.value = t.catchValue({ ...e, error: { issues: r.issues.map((e) => b$5(e, n, m$5())) }, input: e.value }), e.issues = [], e.fallback = !0), e); }; }); const ar$2 = f$5(`$ZodPipe`, (e, t) => { S$5.init(e, t), h$5(e._zod, `values`, () => t.in._zod.values), h$5(e._zod, `optin`, () => t.in._zod.optin), h$5(e._zod, `optout`, () => t.out._zod.optout), h$5(e._zod, `propValues`, () => t.in._zod.propValues), e._zod.parse = (e, n) => { if (n.direction === `backward`) { let r = t.out._zod.run(e, n); return r instanceof Promise ? r.then((e) => or$2(e, t.in, n)) : or$2(r, t.in, n); } let r = t.in._zod.run(e, n); return r instanceof Promise ? r.then((e) => or$2(e, t.out, n)) : or$2(r, t.out, n); }; }); function or$2(e, t, n) { return e.issues.length ? (e.aborted = !0, e) : t._zod.run({ value: e.value, issues: e.issues, fallback: e.fallback }, n); } const sr$2 = f$5(`$ZodReadonly`, (e, t) => { S$5.init(e, t), h$5(e._zod, `propValues`, () => t.innerType._zod.propValues), h$5(e._zod, `values`, () => t.innerType._zod.values), h$5(e._zod, `optin`, () => t.innerType?._zod?.optin), h$5(e._zod, `optout`, () => t.innerType?._zod?.optout), e._zod.parse = (e, n) => { if (n.direction === `backward`) return t.innerType._zod.run(e, n); let r = t.innerType._zod.run(e, n); return r instanceof Promise ? r.then(cr$2) : cr$2(r); }; }); function cr$2(e) { return e.value = Object.freeze(e.value), e; } const lr$2 = f$5(`$ZodLazy`, (e, t) => { S$5.init(e, t), h$5(e._zod, `innerType`, () => { let e = t; return e._cachedInner ||= t.getter(), e._cachedInner; }), h$5(e._zod, `pattern`, () => e._zod.innerType?._zod?.pattern), h$5(e._zod, `propValues`, () => e._zod.innerType?._zod?.propValues), h$5(e._zod, `optin`, () => e._zod.innerType?._zod?.optin ?? void 0), h$5(e._zod, `optout`, () => e._zod.innerType?._zod?.optout ?? void 0), e._zod.parse = (t, n) => e._zod.innerType._zod.run(t, n); }); const ur$2 = f$5(`$ZodCustom`, (e, t) => { x$5.init(e, t), S$5.init(e, t), e._zod.parse = (e, t) => e, e._zod.check = (n) => { let r = n.value, i = t.fn(r); if (i instanceof Promise) return i.then((t) => dr$2(t, n, r, e)); dr$2(i, n, r, e); }; }); function dr$2(e, t, n, r) { if (!e) { let e = { code: `custom`, input: n, inst: r, path: [...r._zod.def.path ?? []], continue: !r._zod.def.abort }; r._zod.def.params && (e.params = r._zod.def.params), t.issues.push(Me$6(e)); } } var fr$2; var pr$3 = class { constructor() { this._map = /* @__PURE__ */ new WeakMap(), this._idmap = /* @__PURE__ */ new Map(); } add(e, ...t) { let n = t[0]; return this._map.set(e, n), n && typeof n == `object` && `id` in n && this._idmap.set(n.id, e), this; } clear() { return this._map = /* @__PURE__ */ new WeakMap(), this._idmap = /* @__PURE__ */ new Map(), this; } remove(e) { let t = this._map.get(e); return t && typeof t == `object` && `id` in t && this._idmap.delete(t.id), this._map.delete(e), this; } get(e) { let t = e._zod.parent; if (t) { let n = { ...this.get(t) ?? {} }; delete n.id; let r = { ...n, ...this._map.get(e) }; return Object.keys(r).length ? r : void 0; } return this._map.get(e); } has(e) { return this._map.has(e); } }; function mr$2() { return new pr$3(); } (fr$2 = globalThis).__zod_globalRegistry ?? (fr$2.__zod_globalRegistry = mr$2()); const hr$2 = globalThis.__zod_globalRegistry; function gr$2(e, t) { return new e({ type: `string`, ...v$5(t) }); } function _r$2(e, t) { return new e({ type: `string`, format: `email`, check: `string_format`, abort: !1, ...v$5(t) }); } function vr$2(e, t) { return new e({ type: `string`, format: `guid`, check: `string_format`, abort: !1, ...v$5(t) }); } function yr$2(e, t) { return new e({ type: `string`, format: `uuid`, check: `string_format`, abort: !1, ...v$5(t) }); } function br$2(e, t) { return new e({ type: `string`, format: `uuid`, check: `string_format`, abort: !1, version: `v4`, ...v$5(t) }); } function xr$2(e, t) { return new e({ type: `string`, format: `uuid`, check: `string_format`, abort: !1, version: `v6`, ...v$5(t) }); } function Sr$2(e, t) { return new e({ type: `string`, format: `uuid`, check: `string_format`, abort: !1, version: `v7`, ...v$5(t) }); } function Cr$2(e, t) { return new e({ type: `string`, format: `url`, check: `string_format`, abort: !1, ...v$5(t) }); } function wr$2(e, t) { return new e({ type: `string`, format: `emoji`, check: `string_format`, abort: !1, ...v$5(t) }); } function Tr$2(e, t) { return new e({ type: `string`, format: `nanoid`, check: `string_format`, abort: !1, ...v$5(t) }); } function Er$2(e, t) { return new e({ type: `string`, format: `cuid`, check: `string_format`, abort: !1, ...v$5(t) }); } function Dr$2(e, t) { return new e({ type: `string`, format: `cuid2`, check: `string_format`, abort: !1, ...v$5(t) }); } function Or$2(e, t) { return new e({ type: `string`, format: `ulid`, check: `string_format`, abort: !1, ...v$5(t) }); } function kr$2(e, t) { return new e({ type: `string`, format: `xid`, check: `string_format`, abort: !1, ...v$5(t) }); } function Ar$2(e, t) { return new e({ type: `string`, format: `ksuid`, check: `string_format`, abort: !1, ...v$5(t) }); } function jr$2(e, t) { return new e({ type: `string`, format: `ipv4`, check: `string_format`, abort: !1, ...v$5(t) }); } function Mr$2(e, t) { return new e({ type: `string`, format: `ipv6`, check: `string_format`, abort: !1, ...v$5(t) }); } function Nr$2(e, t) { return new e({ type: `string`, format: `cidrv4`, check: `string_format`, abort: !1, ...v$5(t) }); } function Pr$2(e, t) { return new e({ type: `string`, format: `cidrv6`, check: `string_format`, abort: !1, ...v$5(t) }); } function Fr$2(e, t) { return new e({ type: `string`, format: `base64`, check: `string_format`, abort: !1, ...v$5(t) }); } function Ir$2(e, t) { return new e({ type: `string`, format: `base64url`, check: `string_format`, abort: !1, ...v$5(t) }); } function Lr$2(e, t) { return new e({ type: `string`, format: `e164`, check: `string_format`, abort: !1, ...v$5(t) }); } function Rr$2(e, t) { return new e({ type: `string`, format: `jwt`, check: `string_format`, abort: !1, ...v$5(t) }); } function zr$2(e, t) { return new e({ type: `string`, format: `datetime`, check: `string_format`, offset: !1, local: !1, precision: null, ...v$5(t) }); } function Br$2(e, t) { return new e({ type: `string`, format: `date`, check: `string_format`, ...v$5(t) }); } function Vr$2(e, t) { return new e({ type: `string`, format: `time`, check: `string_format`, precision: null, ...v$5(t) }); } function Hr$2(e, t) { return new e({ type: `string`, format: `duration`, check: `string_format`, ...v$5(t) }); } function Ur$2(e, t) { return new e({ type: `number`, checks: [], ...v$5(t) }); } function Wr$2(e, t) { return new e({ type: `number`, coerce: !0, checks: [], ...v$5(t) }); } function Gr$2(e, t) { return new e({ type: `number`, check: `number_format`, abort: !1, format: `safeint`, ...v$5(t) }); } function Kr$2(e, t) { return new e({ type: `boolean`, ...v$5(t) }); } function qr$2(e, t) { return new e({ type: `null`, ...v$5(t) }); } function Jr$2(e) { return new e({ type: `any` }); } function Yr$2(e) { return new e({ type: `unknown` }); } function Xr$2(e, t) { return new e({ type: `never`, ...v$5(t) }); } function Zr$2(e, t) { return new At$6({ check: `less_than`, ...v$5(t), value: e, inclusive: !1 }); } function Qr$2(e, t) { return new At$6({ check: `less_than`, ...v$5(t), value: e, inclusive: !0 }); } function $r$2(e, t) { return new jt$6({ check: `greater_than`, ...v$5(t), value: e, inclusive: !1 }); } function ei$2(e, t) { return new jt$6({ check: `greater_than`, ...v$5(t), value: e, inclusive: !0 }); } function ti$2(e, t) { return new Mt$6({ check: `multiple_of`, ...v$5(t), value: e }); } function ni$2(e, t) { return new Pt$5({ check: `max_length`, ...v$5(t), maximum: e }); } function ri$2(e, t) { return new Ft$5({ check: `min_length`, ...v$5(t), minimum: e }); } function ii$2(e, t) { return new It$4({ check: `length_equals`, ...v$5(t), length: e }); } function ai$2(e, t) { return new Rt$4({ check: `string_format`, format: `regex`, ...v$5(t), pattern: e }); } function oi$2(e) { return new zt$5({ check: `string_format`, format: `lowercase`, ...v$5(e) }); } function si$2(e) { return new Bt$4({ check: `string_format`, format: `uppercase`, ...v$5(e) }); } function ci$2(e, t) { return new Vt$5({ check: `string_format`, format: `includes`, ...v$5(t), includes: e }); } function li$2(e, t) { return new Ht$5({ check: `string_format`, format: `starts_with`, ...v$5(t), prefix: e }); } function ui$2(e, t) { return new Ut$4({ check: `string_format`, format: `ends_with`, ...v$5(t), suffix: e }); } function di$2(e) { return new Wt$4({ check: `overwrite`, tx: e }); } function fi$2(e) { return di$2((t) => t.normalize(e)); } function pi$2() { return di$2((e) => e.trim()); } function mi$2() { return di$2((e) => e.toLowerCase()); } function hi$2() { return di$2((e) => e.toUpperCase()); } function gi$2() { return di$2((e) => de$6(e)); } function _i$2(e, t, n) { return new e({ type: `array`, element: t, ...v$5(n) }); } function vi$2(e, t, n) { return new e({ type: `custom`, check: `custom`, fn: t, ...v$5(n) }); } function yi$2(e, t) { let n = bi$2((t) => (t.addIssue = (e) => { if (typeof e == `string`) t.issues.push(Me$6(e, t.value, n._zod.def)); else { let r = e; r.fatal && (r.continue = !1), r.code ??= `custom`, r.input ??= t.value, r.inst ??= n, r.continue ??= !n._zod.def.abort, t.issues.push(Me$6(r)); } }, e(t.value, t)), t); return n; } function bi$2(e, t) { let n = new x$5({ check: `custom`, ...v$5(t) }); return n._zod.check = e, n; } function xi$2(e) { let t = e?.target ?? `draft-2020-12`; return t === `draft-4` && (t = `draft-04`), t === `draft-7` && (t = `draft-07`), { processors: e.processors ?? {}, metadataRegistry: e?.metadata ?? hr$2, target: t, unrepresentable: e?.unrepresentable ?? `throw`, override: e?.override ?? (() => {}), io: e?.io ?? `output`, counter: 0, seen: /* @__PURE__ */ new Map(), cycles: e?.cycles ?? `ref`, reused: e?.reused ?? `inline`, external: e?.external ?? void 0 }; } function w$6(e, t, n = { path: [], schemaPath: [] }) { var r; let i = e._zod.def, a = t.seen.get(e); if (a) return a.count++, n.schemaPath.includes(e) && (a.cycle = n.path), a.schema; let o = { schema: {}, count: 1, cycle: void 0, path: n.path }; t.seen.set(e, o); let s = e._zod.toJSONSchema?.(); if (s) o.schema = s; else { let r = { ...n, schemaPath: [...n.schemaPath, e], path: n.path }; if (e._zod.processJSONSchema) e._zod.processJSONSchema(t, o.schema, r); else { let n = o.schema, a = t.processors[i.type]; if (!a) throw Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`); a(e, t, n, r); } let a = e._zod.parent; a && (o.ref ||= a, w$6(a, t, r), t.seen.get(a).isParent = !0); } let c = t.metadataRegistry.get(e); return c && Object.assign(o.schema, c), t.io === `input` && T$6(e) && (delete o.schema.examples, delete o.schema.default), t.io === `input` && `_prefault` in o.schema && ((r = o.schema).default ?? (r.default = o.schema._prefault)), delete o.schema._prefault, t.seen.get(e).schema; } function Si$2(e, t) { let n = e.seen.get(t); if (!n) throw Error(`Unprocessed schema. This is a bug in Zod.`); let r = /* @__PURE__ */ new Map(); for (let t of e.seen.entries()) { let n = e.metadataRegistry.get(t[0])?.id; if (n) { let e = r.get(n); if (e && e !== t[0]) throw Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`); r.set(n, t[0]); } } let i = (t) => { let r = e.target === `draft-2020-12` ? `$defs` : `definitions`; if (e.external) { let n = e.external.registry.get(t[0])?.id, i = e.external.uri ?? ((e) => e); if (n) return { ref: i(n) }; let a = t[1].defId ?? t[1].schema.id ?? `schema${e.counter++}`; return t[1].defId = a, { defId: a, ref: `${i(`__shared`)}#/${r}/${a}` }; } if (t[1] === n) return { ref: `#` }; let i = `#/${r}/`, a = t[1].schema.id ?? `__schema${e.counter++}`; return { defId: a, ref: i + a }; }, a = (e) => { if (e[1].schema.$ref) return; let t = e[1], { ref: n, defId: r } = i(e); t.def = { ...t.schema }, r && (t.defId = r); let a = t.schema; for (let e in a) delete a[e]; a.$ref = n; }; if (e.cycles === `throw`) for (let t of e.seen.entries()) { let e = t[1]; if (e.cycle) throw Error(`Cycle detected: #/${e.cycle?.join(`/`)}/ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`); } for (let n of e.seen.entries()) { let r = n[1]; if (t === n[0]) { a(n); continue; } if (e.external) { let r = e.external.registry.get(n[0])?.id; if (t !== n[0] && r) { a(n); continue; } } if (e.metadataRegistry.get(n[0])?.id) { a(n); continue; } if (r.cycle) { a(n); continue; } if (r.count > 1 && e.reused === `ref`) { a(n); continue; } } } function Ci$2(e, t) { let n = e.seen.get(t); if (!n) throw Error(`Unprocessed schema. This is a bug in Zod.`); let r = (t) => { let n = e.seen.get(t); if (n.ref === null) return; let i = n.def ?? n.schema, a = { ...i }, o = n.ref; if (n.ref = null, o) { r(o); let n = e.seen.get(o), s = n.schema; if (s.$ref && (e.target === `draft-07` || e.target === `draft-04` || e.target === `openapi-3.0`) ? (i.allOf = i.allOf ?? [], i.allOf.push(s)) : Object.assign(i, s), Object.assign(i, a), t._zod.parent === o) for (let e in i) e === `$ref` || e === `allOf` || e in a || delete i[e]; if (s.$ref && n.def) for (let e in i) e === `$ref` || e === `allOf` || e in n.def && JSON.stringify(i[e]) === JSON.stringify(n.def[e]) && delete i[e]; } let s = t._zod.parent; if (s && s !== o) { r(s); let t = e.seen.get(s); if (t?.schema.$ref && (i.$ref = t.schema.$ref, t.def)) for (let e in i) e === `$ref` || e === `allOf` || e in t.def && JSON.stringify(i[e]) === JSON.stringify(t.def[e]) && delete i[e]; } e.override({ zodSchema: t, jsonSchema: i, path: n.path ?? [] }); }; for (let t of [...e.seen.entries()].reverse()) r(t[0]); let i = {}; if (e.target === `draft-2020-12` ? i.$schema = `https://json-schema.org/draft/2020-12/schema` : e.target === `draft-07` ? i.$schema = `http://json-schema.org/draft-07/schema#` : e.target === `draft-04` ? i.$schema = `http://json-schema.org/draft-04/schema#` : e.target, e.external?.uri) { let n = e.external.registry.get(t)?.id; if (!n) throw Error("Schema is missing an `id` property"); i.$id = e.external.uri(n); } Object.assign(i, n.def ?? n.schema); let a = e.metadataRegistry.get(t)?.id; a !== void 0 && i.id === a && delete i.id; let o = e.external?.defs ?? {}; for (let t of e.seen.entries()) { let e = t[1]; e.def && e.defId && (e.def.id === e.defId && delete e.def.id, o[e.defId] = e.def); } e.external || Object.keys(o).length > 0 && (e.target === `draft-2020-12` ? i.$defs = o : i.definitions = o); try { let n = JSON.parse(JSON.stringify(i)); return Object.defineProperty(n, "~standard", { value: { ...t[`~standard`], jsonSchema: { input: Ti$2(t, `input`, e.processors), output: Ti$2(t, `output`, e.processors) } }, enumerable: !1, writable: !1 }), n; } catch { throw Error(`Error converting schema to JSON.`); } } function T$6(e, t) { let n = t ?? { seen: /* @__PURE__ */ new Set() }; if (n.seen.has(e)) return !1; n.seen.add(e); let r = e._zod.def; if (r.type === `transform`) return !0; if (r.type === `array`) return T$6(r.element, n); if (r.type === `set`) return T$6(r.valueType, n); if (r.type === `lazy`) return T$6(r.getter(), n); if (r.type === `promise` || r.type === `optional` || r.type === `nonoptional` || r.type === `nullable` || r.type === `readonly` || r.type === "default" || r.type === `prefault`) return T$6(r.innerType, n); if (r.type === `intersection`) return T$6(r.left, n) || T$6(r.right, n); if (r.type === `record` || r.type === `map`) return T$6(r.keyType, n) || T$6(r.valueType, n); if (r.type === `pipe`) return e._zod.traits.has(`$ZodCodec`) ? !0 : T$6(r.in, n) || T$6(r.out, n); if (r.type === `object`) { for (let e in r.shape) if (T$6(r.shape[e], n)) return !0; return !1; } if (r.type === `union`) { for (let e of r.options) if (T$6(e, n)) return !0; return !1; } if (r.type === `tuple`) { for (let e of r.items) if (T$6(e, n)) return !0; return !!(r.rest && T$6(r.rest, n)); } return !1; } const wi$2 = (e, t = {}) => (n) => { let r = xi$2({ ...n, processors: t }); return w$6(e, r), Si$2(r, e), Ci$2(r, e); }; const Ti$2 = (e, t, n = {}) => (r) => { let { libraryOptions: i, target: a } = r ?? {}, o = xi$2({ ...i ?? {}, target: a, io: t, processors: n }); return w$6(e, o), Si$2(o, e), Ci$2(o, e); }; const Ei$2 = { guid: `uuid`, url: `uri`, datetime: `date-time`, json_string: `json-string`, regex: `` }; const Di$2 = (e, t, n, r) => { let i = n; i.type = `string`; let { minimum: a, maximum: o, format: s, patterns: c, contentEncoding: l } = e._zod.bag; if (typeof a == `number` && (i.minLength = a), typeof o == `number` && (i.maxLength = o), s && (i.format = Ei$2[s] ?? s, i.format === `` && delete i.format, s === `time` && delete i.format), l && (i.contentEncoding = l), c && c.size > 0) { let e = [...c]; e.length === 1 ? i.pattern = e[0].source : e.length > 1 && (i.allOf = [...e.map((e) => ({ ...t.target === `draft-07` || t.target === `draft-04` || t.target === `openapi-3.0` ? { type: `string` } : {}, pattern: e.source }))]); } }; const Oi$2 = (e, t, n, r) => { let i = n, { minimum: a, maximum: o, format: s, multipleOf: c, exclusiveMaximum: l, exclusiveMinimum: u } = e._zod.bag; typeof s == `string` && s.includes(`int`) ? i.type = `integer` : i.type = `number`; let d = typeof u == `number` && u >= (a ?? -Infinity), f = typeof l == `number` && l <= (o ?? Infinity), p = t.target === `draft-04` || t.target === `openapi-3.0`; d ? p ? (i.minimum = u, i.exclusiveMinimum = !0) : i.exclusiveMinimum = u : typeof a == `number` && (i.minimum = a), f ? p ? (i.maximum = l, i.exclusiveMaximum = !0) : i.exclusiveMaximum = l : typeof o == `number` && (i.maximum = o), typeof c == `number` && (i.multipleOf = c); }; const ki$2 = (e, t, n, r) => { n.type = `boolean`; }; const Ai$2 = (e, t, n, r) => { if (t.unrepresentable === `throw`) throw Error(`BigInt cannot be represented in JSON Schema`); }; const ji$2 = (e, t, n, r) => { if (t.unrepresentable === `throw`) throw Error(`Symbols cannot be represented in JSON Schema`); }; const Mi$2 = (e, t, n, r) => { t.target === `openapi-3.0` ? (n.type = `string`, n.nullable = !0, n.enum = [null]) : n.type = `null`; }; const Ni$2 = (e, t, n, r) => { if (t.unrepresentable === `throw`) throw Error(`Undefined cannot be represented in JSON Schema`); }; const Pi$2 = (e, t, n, r) => { if (t.unrepresentable === `throw`) throw Error(`Void cannot be represented in JSON Schema`); }; const Fi$2 = (e, t, n, r) => { n.not = {}; }; const Ii$2 = (e, t, n, r) => {}; const Li$2 = (e, t, n, r) => {}; const Ri$2 = (e, t, n, r) => { if (t.unrepresentable === `throw`) throw Error(`Date cannot be represented in JSON Schema`); }; const zi$2 = (e, t, n, r) => { let i = e._zod.def, a = ne$4(i.entries); a.every((e) => typeof e == `number`) && (n.type = `number`), a.every((e) => typeof e == `string`) && (n.type = `string`), n.enum = a; }; const Bi$2 = (e, t, n, r) => { let i = e._zod.def, a = []; for (let e of i.values) if (e === void 0) { if (t.unrepresentable === `throw`) throw Error("Literal `undefined` cannot be represented in JSON Schema"); } else if (typeof e == `bigint`) { if (t.unrepresentable === `throw`) throw Error(`BigInt literals cannot be represented in JSON Schema`); a.push(Number(e)); } else a.push(e); if (a.length !== 0) if (a.length === 1) { let e = a[0]; n.type = e === null ? `null` : typeof e, t.target === `draft-04` || t.target === `openapi-3.0` ? n.enum = [e] : n.const = e; } else a.every((e) => typeof e == `number`) && (n.type = `number`), a.every((e) => typeof e == `string`) && (n.type = `string`), a.every((e) => typeof e == `boolean`) && (n.type = `boolean`), a.every((e) => e === null) && (n.type = `null`), n.enum = a; }; const Vi$2 = (e, t, n, r) => { if (t.unrepresentable === `throw`) throw Error(`NaN cannot be represented in JSON Schema`); }; const Hi$2 = (e, t, n, r) => { let i = n, a = e._zod.pattern; if (!a) throw Error(`Pattern not found in template literal`); i.type = `string`, i.pattern = a.source; }; const Ui$2 = (e, t, n, r) => { let i = n, a = { type: `string`, format: `binary`, contentEncoding: `binary` }, { minimum: o, maximum: s, mime: c } = e._zod.bag; o !== void 0 && (a.minLength = o), s !== void 0 && (a.maxLength = s), c ? c.length === 1 ? (a.contentMediaType = c[0], Object.assign(i, a)) : (Object.assign(i, a), i.anyOf = c.map((e) => ({ contentMediaType: e }))) : Object.assign(i, a); }; const Wi$2 = (e, t, n, r) => { n.type = `boolean`; }; const Gi$2 = (e, t, n, r) => { if (t.unrepresentable === `throw`) throw Error(`Custom types cannot be represented in JSON Schema`); }; const Ki$2 = (e, t, n, r) => { if (t.unrepresentable === `throw`) throw Error(`Function types cannot be represented in JSON Schema`); }; const qi$2 = (e, t, n, r) => { if (t.unrepresentable === `throw`) throw Error(`Transforms cannot be represented in JSON Schema`); }; const Ji$2 = (e, t, n, r) => { if (t.unrepresentable === `throw`) throw Error(`Map cannot be represented in JSON Schema`); }; const Yi$2 = (e, t, n, r) => { if (t.unrepresentable === `throw`) throw Error(`Set cannot be represented in JSON Schema`); }; const Xi$2 = (e, t, n, r) => { let i = n, a = e._zod.def, { minimum: o, maximum: s } = e._zod.bag; typeof o == `number` && (i.minItems = o), typeof s == `number` && (i.maxItems = s), i.type = `array`, i.items = w$6(a.element, t, { ...r, path: [...r.path, `items`] }); }; const Zi$2 = (e, t, n, r) => { let i = n, a = e._zod.def; i.type = `object`, i.properties = {}; let o = a.shape; for (let e in o) i.properties[e] = w$6(o[e], t, { ...r, path: [ ...r.path, `properties`, e ] }); let s = new Set(Object.keys(o)), c = new Set([...s].filter((e) => { let n = a.shape[e]._zod; return t.io === `input` ? n.optin === void 0 : n.optout === void 0; })); c.size > 0 && (i.required = Array.from(c)), a.catchall?._zod.def.type === `never` ? i.additionalProperties = !1 : a.catchall ? a.catchall && (i.additionalProperties = w$6(a.catchall, t, { ...r, path: [...r.path, `additionalProperties`] })) : t.io === `output` && (i.additionalProperties = !1); }; const Qi$2 = (e, t, n, r) => { let i = e._zod.def, a = i.inclusive === !1, o = i.options.map((e, n) => w$6(e, t, { ...r, path: [ ...r.path, a ? `oneOf` : `anyOf`, n ] })); a ? n.oneOf = o : n.anyOf = o; }; const $i$2 = (e, t, n, r) => { let i = e._zod.def, a = w$6(i.left, t, { ...r, path: [ ...r.path, `allOf`, 0 ] }), o = w$6(i.right, t, { ...r, path: [ ...r.path, `allOf`, 1 ] }), s = (e) => `allOf` in e && Object.keys(e).length === 1; n.allOf = [...s(a) ? a.allOf : [a], ...s(o) ? o.allOf : [o]]; }; const ea$2 = (e, t, n, r) => { let i = n, a = e._zod.def; i.type = `array`; let o = t.target === `draft-2020-12` ? `prefixItems` : `items`, s = t.target === `draft-2020-12` || t.target === `openapi-3.0` ? `items` : `additionalItems`, c = a.items.map((e, n) => w$6(e, t, { ...r, path: [ ...r.path, o, n ] })), l = a.rest ? w$6(a.rest, t, { ...r, path: [ ...r.path, s, ...t.target === `openapi-3.0` ? [a.items.length] : [] ] }) : null; t.target === `draft-2020-12` ? (i.prefixItems = c, l && (i.items = l)) : t.target === `openapi-3.0` ? (i.items = { anyOf: c }, l && i.items.anyOf.push(l), i.minItems = c.length, l || (i.maxItems = c.length)) : (i.items = c, l && (i.additionalItems = l)); let { minimum: u, maximum: d } = e._zod.bag; typeof u == `number` && (i.minItems = u), typeof d == `number` && (i.maxItems = d); }; const ta$2 = (e, t, n, r) => { let i = n, a = e._zod.def; i.type = `object`; let o = a.keyType, s = o._zod.bag?.patterns; if (a.mode === `loose` && s && s.size > 0) { let e = w$6(a.valueType, t, { ...r, path: [ ...r.path, `patternProperties`, `*` ] }); i.patternProperties = {}; for (let t of s) i.patternProperties[t.source] = e; } else (t.target === `draft-07` || t.target === `draft-2020-12`) && (i.propertyNames = w$6(a.keyType, t, { ...r, path: [...r.path, `propertyNames`] })), i.additionalProperties = w$6(a.valueType, t, { ...r, path: [...r.path, `additionalProperties`] }); let c = o._zod.values; if (c) { let e = [...c].filter((e) => typeof e == `string` || typeof e == `number`); e.length > 0 && (i.required = e); } }; const na$2 = (e, t, n, r) => { let i = e._zod.def, a = w$6(i.innerType, t, r), o = t.seen.get(e); t.target === `openapi-3.0` ? (o.ref = i.innerType, n.nullable = !0) : n.anyOf = [a, { type: `null` }]; }; const ra$2 = (e, t, n, r) => { let i = e._zod.def; w$6(i.innerType, t, r); let a = t.seen.get(e); a.ref = i.innerType; }; const ia$2 = (e, t, n, r) => { let i = e._zod.def; w$6(i.innerType, t, r); let a = t.seen.get(e); a.ref = i.innerType, n.default = JSON.parse(JSON.stringify(i.defaultValue)); }; const aa$2 = (e, t, n, r) => { let i = e._zod.def; w$6(i.innerType, t, r); let a = t.seen.get(e); a.ref = i.innerType, t.io === `input` && (n._prefault = JSON.parse(JSON.stringify(i.defaultValue))); }; const oa$2 = (e, t, n, r) => { let i = e._zod.def; w$6(i.innerType, t, r); let a = t.seen.get(e); a.ref = i.innerType; let o; try { o = i.catchValue(void 0); } catch { throw Error(`Dynamic catch values are not supported in JSON Schema`); } n.default = o; }; const sa$2 = (e, t, n, r) => { let i = e._zod.def, a = i.in._zod.traits.has(`$ZodTransform`), o = t.io === `input` ? a ? i.out : i.in : i.out; w$6(o, t, r); let s = t.seen.get(e); s.ref = o; }; const ca$2 = (e, t, n, r) => { let i = e._zod.def; w$6(i.innerType, t, r); let a = t.seen.get(e); a.ref = i.innerType, n.readOnly = !0; }; const la$2 = (e, t, n, r) => { let i = e._zod.def; w$6(i.innerType, t, r); let a = t.seen.get(e); a.ref = i.innerType; }; const ua$2 = (e, t, n, r) => { let i = e._zod.def; w$6(i.innerType, t, r); let a = t.seen.get(e); a.ref = i.innerType; }; const da$2 = (e, t, n, r) => { let i = e._zod.innerType; w$6(i, t, r); let a = t.seen.get(e); a.ref = i; }; const fa$2 = { string: Di$2, number: Oi$2, boolean: ki$2, bigint: Ai$2, symbol: ji$2, null: Mi$2, undefined: Ni$2, void: Pi$2, never: Fi$2, any: Ii$2, unknown: Li$2, date: Ri$2, enum: zi$2, literal: Bi$2, nan: Vi$2, template_literal: Hi$2, file: Ui$2, success: Wi$2, custom: Gi$2, function: Ki$2, transform: qi$2, map: Ji$2, set: Yi$2, array: Xi$2, object: Zi$2, union: Qi$2, intersection: $i$2, tuple: ea$2, record: ta$2, nullable: na$2, nonoptional: ra$2, default: ia$2, prefault: aa$2, catch: oa$2, pipe: sa$2, readonly: ca$2, promise: la$2, optional: ua$2, lazy: da$2 }; function pa$2(e, t) { if (`_idmap` in e) { let n = e, r = xi$2({ ...t, processors: fa$2 }), i = {}; for (let e of n._idmap.entries()) { let [t, n] = e; w$6(n, r); } let a = {}; r.external = { registry: n, uri: t?.uri, defs: i }; for (let e of n._idmap.entries()) { let [t, n] = e; Si$2(r, n), a[t] = Ci$2(r, n); } return Object.keys(i).length > 0 && (a.__shared = { [r.target === `draft-2020-12` ? `$defs` : `definitions`]: i }), { schemas: a }; } let n = xi$2({ ...t, processors: fa$2 }); return w$6(e, n), Si$2(n, e), Ci$2(n, e); } const ma$2 = f$5(`ZodISODateTime`, (e, t) => { on$4.init(e, t), O$5.init(e, t); }); function ha$2(e) { return zr$2(ma$2, e); } const ga$2 = f$5(`ZodISODate`, (e, t) => { sn$4.init(e, t), O$5.init(e, t); }); function _a$2(e) { return Br$2(ga$2, e); } const va$2 = f$5(`ZodISOTime`, (e, t) => { cn$4.init(e, t), O$5.init(e, t); }); function ya$2(e) { return Vr$2(va$2, e); } const ba$2 = f$5(`ZodISODuration`, (e, t) => { ln$4.init(e, t), O$5.init(e, t); }); function xa$2(e) { return Hr$2(ba$2, e); } const E$6 = f$5(`ZodError`, (e, t) => { Pe$6.init(e, t), e.name = `ZodError`, Object.defineProperties(e, { format: { value: (t) => Le$6(e, t) }, flatten: { value: (t) => Ie$6(e, t) }, addIssue: { value: (t) => { e.issues.push(t), e.message = JSON.stringify(e.issues, re$4, 2); } }, addIssues: { value: (t) => { e.issues.push(...t), e.message = JSON.stringify(e.issues, re$4, 2); } }, isEmpty: { get() { return e.issues.length === 0; } } }); }, { Parent: Error }); const Sa$2 = Re$6(E$6); const Ca$2 = ze$6(E$6); const wa$2 = Be$6(E$6); const Ta$2 = He$6(E$6); const Ea$2 = We$6(E$6); const Da$2 = Ge$6(E$6); const Oa$2 = Ke$6(E$6); const ka$2 = qe$6(E$6); const Aa$2 = Je$6(E$6); const ja$2 = Ye$6(E$6); const Ma$2 = Xe$6(E$6); const Na$2 = Ze$6(E$6); const Pa$2 = /* @__PURE__ */ new WeakMap(); function Fa$2(e, t, n) { let r = Object.getPrototypeOf(e), i = Pa$2.get(r); if (i || (i = /* @__PURE__ */ new Set(), Pa$2.set(r, i)), !i.has(t)) { i.add(t); for (let e in n) { let t = n[e]; Object.defineProperty(r, e, { configurable: !0, enumerable: !1, get() { let n = t.bind(this); return Object.defineProperty(this, e, { configurable: !0, writable: !0, enumerable: !0, value: n }), n; }, set(t) { Object.defineProperty(this, e, { configurable: !0, writable: !0, enumerable: !0, value: t }); } }); } } } const D$5 = f$5(`ZodType`, (e, t) => (S$5.init(e, t), Object.assign(e[`~standard`], { jsonSchema: { input: Ti$2(e, `input`), output: Ti$2(e, `output`) } }), e.toJSONSchema = wi$2(e, {}), e.def = t, e.type = t.type, Object.defineProperty(e, "_def", { value: t }), e.parse = (t, n) => Sa$2(e, t, n, { callee: e.parse }), e.safeParse = (t, n) => wa$2(e, t, n), e.parseAsync = async (t, n) => Ca$2(e, t, n, { callee: e.parseAsync }), e.safeParseAsync = async (t, n) => Ta$2(e, t, n), e.spa = e.safeParseAsync, e.encode = (t, n) => Ea$2(e, t, n), e.decode = (t, n) => Da$2(e, t, n), e.encodeAsync = async (t, n) => Oa$2(e, t, n), e.decodeAsync = async (t, n) => ka$2(e, t, n), e.safeEncode = (t, n) => Aa$2(e, t, n), e.safeDecode = (t, n) => ja$2(e, t, n), e.safeEncodeAsync = async (t, n) => Ma$2(e, t, n), e.safeDecodeAsync = async (t, n) => Na$2(e, t, n), Fa$2(e, `ZodType`, { check(...e) { let t = this.def; return this.clone(g$5(t, { checks: [...t.checks ?? [], ...e.map((e) => typeof e == `function` ? { _zod: { check: e, def: { check: `custom` }, onattach: [] } } : e)] }), { parent: !0 }); }, with(...e) { return this.check(...e); }, clone(e, t) { return _$4(this, e, t); }, brand() { return this; }, register(e, t) { return e.add(this, t), this; }, refine(e, t) { return this.check(cs(e, t)); }, superRefine(e, t) { return this.check(ls(e, t)); }, overwrite(e) { return this.check(di$2(e)); }, optional() { return Ho(this); }, exactOptional() { return Wo(this); }, nullable() { return Ko(this); }, nullish() { return Ho(Ko(this)); }, nonoptional(e) { return Qo(this, e); }, array() { return xo(this); }, or(e) { return Eo([this, e]); }, and(e) { return Ao(this, e); }, transform(e) { return ns(this, Bo(e)); }, default(e) { return Jo(this, e); }, prefault(e) { return Xo(this, e); }, catch(e) { return es(this, e); }, pipe(e) { return ns(this, e); }, readonly() { return is(this); }, describe(e) { let t = this.clone(); return hr$2.add(t, { description: e }), t; }, meta(...e) { if (e.length === 0) return hr$2.get(this); let t = this.clone(); return hr$2.add(t, e[0]), t; }, isOptional() { return this.safeParse(void 0).success; }, isNullable() { return this.safeParse(null).success; }, apply(e) { return e(this); } }), Object.defineProperty(e, "description", { get() { return hr$2.get(e)?.description; }, configurable: !0 }), e)); const Ia$2 = f$5(`_ZodString`, (e, t) => { qt$5.init(e, t), D$5.init(e, t), e._zod.processJSONSchema = (t, n, r) => Di$2(e, t, n, r); let n = e._zod.bag; e.format = n.format ?? null, e.minLength = n.minimum ?? null, e.maxLength = n.maximum ?? null, Fa$2(e, `_ZodString`, { regex(...e) { return this.check(ai$2(...e)); }, includes(...e) { return this.check(ci$2(...e)); }, startsWith(...e) { return this.check(li$2(...e)); }, endsWith(...e) { return this.check(ui$2(...e)); }, min(...e) { return this.check(ri$2(...e)); }, max(...e) { return this.check(ni$2(...e)); }, length(...e) { return this.check(ii$2(...e)); }, nonempty(...e) { return this.check(ri$2(1, ...e)); }, lowercase(e) { return this.check(oi$2(e)); }, uppercase(e) { return this.check(si$2(e)); }, trim() { return this.check(pi$2()); }, normalize(...e) { return this.check(fi$2(...e)); }, toLowerCase() { return this.check(mi$2()); }, toUpperCase() { return this.check(hi$2()); }, slugify() { return this.check(gi$2()); } }); }); const La$2 = f$5(`ZodString`, (e, t) => { qt$5.init(e, t), Ia$2.init(e, t), e.email = (t) => e.check(_r$2(za$2, t)), e.url = (t) => e.check(Cr$2(Ha$2, t)), e.jwt = (t) => e.check(Rr$2(io, t)), e.emoji = (t) => e.check(wr$2(Ua$2, t)), e.guid = (t) => e.check(vr$2(Ba$2, t)), e.uuid = (t) => e.check(yr$2(Va$2, t)), e.uuidv4 = (t) => e.check(br$2(Va$2, t)), e.uuidv6 = (t) => e.check(xr$2(Va$2, t)), e.uuidv7 = (t) => e.check(Sr$2(Va$2, t)), e.nanoid = (t) => e.check(Tr$2(Wa$2, t)), e.guid = (t) => e.check(vr$2(Ba$2, t)), e.cuid = (t) => e.check(Er$2(Ga$2, t)), e.cuid2 = (t) => e.check(Dr$2(Ka$2, t)), e.ulid = (t) => e.check(Or$2(qa$2, t)), e.base64 = (t) => e.check(Fr$2(eo$1, t)), e.base64url = (t) => e.check(Ir$2(no, t)), e.xid = (t) => e.check(kr$2(Ja$1, t)), e.ksuid = (t) => e.check(Ar$2(Ya$1, t)), e.ipv4 = (t) => e.check(jr$2(Xa$1, t)), e.ipv6 = (t) => e.check(Mr$2(Za$1, t)), e.cidrv4 = (t) => e.check(Nr$2(Qa$1, t)), e.cidrv6 = (t) => e.check(Pr$2($a$1, t)), e.e164 = (t) => e.check(Lr$2(ro, t)), e.datetime = (t) => e.check(ha$2(t)), e.date = (t) => e.check(_a$2(t)), e.time = (t) => e.check(ya$2(t)), e.duration = (t) => e.check(xa$2(t)); }); function Ra$2(e) { return gr$2(La$2, e); } const O$5 = f$5(`ZodStringFormat`, (e, t) => { C$6.init(e, t), Ia$2.init(e, t); }); const za$2 = f$5(`ZodEmail`, (e, t) => { Xt$4.init(e, t), O$5.init(e, t); }); const Ba$2 = f$5(`ZodGUID`, (e, t) => { Jt$5.init(e, t), O$5.init(e, t); }); const Va$2 = f$5(`ZodUUID`, (e, t) => { Yt$4.init(e, t), O$5.init(e, t); }); const Ha$2 = f$5(`ZodURL`, (e, t) => { Zt$4.init(e, t), O$5.init(e, t); }); const Ua$2 = f$5(`ZodEmoji`, (e, t) => { Qt$4.init(e, t), O$5.init(e, t); }); const Wa$2 = f$5(`ZodNanoID`, (e, t) => { $t$4.init(e, t), O$5.init(e, t); }); const Ga$2 = f$5(`ZodCUID`, (e, t) => { en$4.init(e, t), O$5.init(e, t); }); const Ka$2 = f$5(`ZodCUID2`, (e, t) => { tn$4.init(e, t), O$5.init(e, t); }); const qa$2 = f$5(`ZodULID`, (e, t) => { nn$4.init(e, t), O$5.init(e, t); }); const Ja$1 = f$5(`ZodXID`, (e, t) => { rn$4.init(e, t), O$5.init(e, t); }); const Ya$1 = f$5(`ZodKSUID`, (e, t) => { an$4.init(e, t), O$5.init(e, t); }); const Xa$1 = f$5(`ZodIPv4`, (e, t) => { un$4.init(e, t), O$5.init(e, t); }); const Za$1 = f$5(`ZodIPv6`, (e, t) => { dn$4.init(e, t), O$5.init(e, t); }); const Qa$1 = f$5(`ZodCIDRv4`, (e, t) => { fn$4.init(e, t), O$5.init(e, t); }); const $a$1 = f$5(`ZodCIDRv6`, (e, t) => { pn$4.init(e, t), O$5.init(e, t); }); const eo$1 = f$5(`ZodBase64`, (e, t) => { hn$4.init(e, t), O$5.init(e, t); }); function to$1(e) { return Fr$2(eo$1, e); } const no = f$5(`ZodBase64URL`, (e, t) => { _n$4.init(e, t), O$5.init(e, t); }); const ro = f$5(`ZodE164`, (e, t) => { vn$4.init(e, t), O$5.init(e, t); }); const io = f$5(`ZodJWT`, (e, t) => { bn$4.init(e, t), O$5.init(e, t); }); const ao = f$5(`ZodNumber`, (e, t) => { xn$3.init(e, t), D$5.init(e, t), e._zod.processJSONSchema = (t, n, r) => Oi$2(e, t, n, r), Fa$2(e, `ZodNumber`, { gt(e, t) { return this.check($r$2(e, t)); }, gte(e, t) { return this.check(ei$2(e, t)); }, min(e, t) { return this.check(ei$2(e, t)); }, lt(e, t) { return this.check(Zr$2(e, t)); }, lte(e, t) { return this.check(Qr$2(e, t)); }, max(e, t) { return this.check(Qr$2(e, t)); }, int(e) { return this.check(co(e)); }, safe(e) { return this.check(co(e)); }, positive(e) { return this.check($r$2(0, e)); }, nonnegative(e) { return this.check(ei$2(0, e)); }, negative(e) { return this.check(Zr$2(0, e)); }, nonpositive(e) { return this.check(Qr$2(0, e)); }, multipleOf(e, t) { return this.check(ti$2(e, t)); }, step(e, t) { return this.check(ti$2(e, t)); }, finite() { return this; } }); let n = e._zod.bag; e.minValue = Math.max(n.minimum ?? -Infinity, n.exclusiveMinimum ?? -Infinity) ?? null, e.maxValue = Math.min(n.maximum ?? Infinity, n.exclusiveMaximum ?? Infinity) ?? null, e.isInt = (n.format ?? ``).includes(`int`) || Number.isSafeInteger(n.multipleOf ?? .5), e.isFinite = !0, e.format = n.format ?? null; }); function oo(e) { return Ur$2(ao, e); } const so = f$5(`ZodNumberFormat`, (e, t) => { Sn$3.init(e, t), ao.init(e, t); }); function co(e) { return Gr$2(so, e); } const lo = f$5(`ZodBoolean`, (e, t) => { Cn$3.init(e, t), D$5.init(e, t), e._zod.processJSONSchema = (t, n, r) => ki$2(e, t, n, r); }); function uo(e) { return Kr$2(lo, e); } const fo = f$5(`ZodNull`, (e, t) => { wn$3.init(e, t), D$5.init(e, t), e._zod.processJSONSchema = (t, n, r) => Mi$2(e, t, n, r); }); function po(e) { return qr$2(fo, e); } const mo = f$5(`ZodAny`, (e, t) => { Tn$3.init(e, t), D$5.init(e, t), e._zod.processJSONSchema = (e, t, n) => void 0; }); function ho() { return Jr$2(mo); } const go = f$5(`ZodUnknown`, (e, t) => { En$3.init(e, t), D$5.init(e, t), e._zod.processJSONSchema = (e, t, n) => void 0; }); function _o() { return Yr$2(go); } const vo = f$5(`ZodNever`, (e, t) => { Dn$3.init(e, t), D$5.init(e, t), e._zod.processJSONSchema = (t, n, r) => Fi$2(e, t, n, r); }); function yo(e) { return Xr$2(vo, e); } const bo = f$5(`ZodArray`, (e, t) => { kn$3.init(e, t), D$5.init(e, t), e._zod.processJSONSchema = (t, n, r) => Xi$2(e, t, n, r), e.element = t.element, Fa$2(e, `ZodArray`, { min(e, t) { return this.check(ri$2(e, t)); }, nonempty(e) { return this.check(ri$2(1, e)); }, max(e, t) { return this.check(ni$2(e, t)); }, length(e, t) { return this.check(ii$2(e, t)); }, unwrap() { return this.element; } }); }); function xo(e, t) { return _i$2(bo, e, t); } const So = f$5(`ZodObject`, (e, t) => { Pn$3.init(e, t), D$5.init(e, t), e._zod.processJSONSchema = (t, n, r) => Zi$2(e, t, n, r), h$5(e, `shape`, () => t.shape), Fa$2(e, `ZodObject`, { keyof() { return Io(Object.keys(this._zod.def.shape)); }, catchall(e) { return this.clone({ ...this._zod.def, catchall: e }); }, passthrough() { return this.clone({ ...this._zod.def, catchall: _o() }); }, loose() { return this.clone({ ...this._zod.def, catchall: _o() }); }, strict() { return this.clone({ ...this._zod.def, catchall: yo() }); }, strip() { return this.clone({ ...this._zod.def, catchall: void 0 }); }, extend(e) { return Ce$6(this, e); }, safeExtend(e) { return we$6(this, e); }, merge(e) { return Te$6(this, e); }, pick(e) { return xe$6(this, e); }, omit(e) { return Se$6(this, e); }, partial(...e) { return Ee$6(Vo, this, e[0]); }, required(...e) { return De$6(Zo, this, e[0]); } }); }); function Co(e, t) { return new So({ type: `object`, shape: e ?? {}, ...v$5(t) }); } function wo(e, t) { return new So({ type: `object`, shape: e, catchall: _o(), ...v$5(t) }); } const To = f$5(`ZodUnion`, (e, t) => { In$2.init(e, t), D$5.init(e, t), e._zod.processJSONSchema = (t, n, r) => Qi$2(e, t, n, r), e.options = t.options; }); function Eo(e, t) { return new To({ type: `union`, options: e, ...v$5(t) }); } const Do = f$5(`ZodDiscriminatedUnion`, (e, t) => { To.init(e, t), Ln$2.init(e, t); }); function Oo(e, t, n) { return new Do({ type: `union`, options: t, discriminator: e, ...v$5(n) }); } const ko = f$5(`ZodIntersection`, (e, t) => { Rn$2.init(e, t), D$5.init(e, t), e._zod.processJSONSchema = (t, n, r) => $i$2(e, t, n, r); }); function Ao(e, t) { return new ko({ type: `intersection`, left: e, right: t }); } const jo = f$5(`ZodTuple`, (e, t) => { Vn$2.init(e, t), D$5.init(e, t), e._zod.processJSONSchema = (t, n, r) => ea$2(e, t, n, r), e.rest = (t) => e.clone({ ...e._zod.def, rest: t }); }); function Mo(e, t, n) { let r = t instanceof S$5; return new jo({ type: `tuple`, items: e, rest: r ? t : null, ...v$5(r ? n : t) }); } const No = f$5(`ZodRecord`, (e, t) => { Gn$2.init(e, t), D$5.init(e, t), e._zod.processJSONSchema = (t, n, r) => ta$2(e, t, n, r), e.keyType = t.keyType, e.valueType = t.valueType; }); function Po(e, t, n) { return !t || !t._zod ? new No({ type: `record`, keyType: Ra$2(), valueType: e, ...v$5(t) }) : new No({ type: `record`, keyType: e, valueType: t, ...v$5(n) }); } const Fo = f$5(`ZodEnum`, (e, t) => { Kn$2.init(e, t), D$5.init(e, t), e._zod.processJSONSchema = (t, n, r) => zi$2(e, t, n, r), e.enum = t.entries, e.options = Object.values(t.entries); let n = new Set(Object.keys(t.entries)); e.extract = (e, r) => { let i = {}; for (let r of e) if (n.has(r)) i[r] = t.entries[r]; else throw Error(`Key ${r} not found in enum`); return new Fo({ ...t, checks: [], ...v$5(r), entries: i }); }, e.exclude = (e, r) => { let i = { ...t.entries }; for (let t of e) if (n.has(t)) delete i[t]; else throw Error(`Key ${t} not found in enum`); return new Fo({ ...t, checks: [], ...v$5(r), entries: i }); }; }); function Io(e, t) { return new Fo({ type: `enum`, entries: Array.isArray(e) ? Object.fromEntries(e.map((e) => [e, e])) : e, ...v$5(t) }); } const Lo = f$5(`ZodLiteral`, (e, t) => { qn$2.init(e, t), D$5.init(e, t), e._zod.processJSONSchema = (t, n, r) => Bi$2(e, t, n, r), e.values = new Set(t.values), Object.defineProperty(e, "value", { get() { if (t.values.length > 1) throw Error("This schema contains multiple valid literal values. Use `.values` instead."); return t.values[0]; } }); }); function Ro(e, t) { return new Lo({ type: `literal`, values: Array.isArray(e) ? e : [e], ...v$5(t) }); } const zo = f$5(`ZodTransform`, (e, t) => { Jn$2.init(e, t), D$5.init(e, t), e._zod.processJSONSchema = (t, n, r) => qi$2(e, t, n, r), e._zod.parse = (n, r) => { if (r.direction === `backward`) throw new ee$4(e.constructor.name); n.addIssue = (r) => { if (typeof r == `string`) n.issues.push(Me$6(r, n.value, t)); else { let t = r; t.fatal && (t.continue = !1), t.code ??= `custom`, t.input ??= n.value, t.inst ??= e, n.issues.push(Me$6(t)); } }; let i = t.transform(n.value, n); return i instanceof Promise ? i.then((e) => (n.value = e, n.fallback = !0, n)) : (n.value = i, n.fallback = !0, n); }; }); function Bo(e) { return new zo({ type: `transform`, transform: e }); } const Vo = f$5(`ZodOptional`, (e, t) => { Xn$3.init(e, t), D$5.init(e, t), e._zod.processJSONSchema = (t, n, r) => ua$2(e, t, n, r), e.unwrap = () => e._zod.def.innerType; }); function Ho(e) { return new Vo({ type: `optional`, innerType: e }); } const Uo = f$5(`ZodExactOptional`, (e, t) => { Zn$2.init(e, t), D$5.init(e, t), e._zod.processJSONSchema = (t, n, r) => ua$2(e, t, n, r), e.unwrap = () => e._zod.def.innerType; }); function Wo(e) { return new Uo({ type: `optional`, innerType: e }); } const Go = f$5(`ZodNullable`, (e, t) => { Qn$2.init(e, t), D$5.init(e, t), e._zod.processJSONSchema = (t, n, r) => na$2(e, t, n, r), e.unwrap = () => e._zod.def.innerType; }); function Ko(e) { return new Go({ type: `nullable`, innerType: e }); } const qo = f$5(`ZodDefault`, (e, t) => { $n$2.init(e, t), D$5.init(e, t), e._zod.processJSONSchema = (t, n, r) => ia$2(e, t, n, r), e.unwrap = () => e._zod.def.innerType, e.removeDefault = e.unwrap; }); function Jo(e, t) { return new qo({ type: `default`, innerType: e, get defaultValue() { return typeof t == `function` ? t() : ge$6(t); } }); } const Yo = f$5(`ZodPrefault`, (e, t) => { tr$2.init(e, t), D$5.init(e, t), e._zod.processJSONSchema = (t, n, r) => aa$2(e, t, n, r), e.unwrap = () => e._zod.def.innerType; }); function Xo(e, t) { return new Yo({ type: `prefault`, innerType: e, get defaultValue() { return typeof t == `function` ? t() : ge$6(t); } }); } const Zo = f$5(`ZodNonOptional`, (e, t) => { nr$2.init(e, t), D$5.init(e, t), e._zod.processJSONSchema = (t, n, r) => ra$2(e, t, n, r), e.unwrap = () => e._zod.def.innerType; }); function Qo(e, t) { return new Zo({ type: `nonoptional`, innerType: e, ...v$5(t) }); } const $o = f$5(`ZodCatch`, (e, t) => { ir$2.init(e, t), D$5.init(e, t), e._zod.processJSONSchema = (t, n, r) => oa$2(e, t, n, r), e.unwrap = () => e._zod.def.innerType, e.removeCatch = e.unwrap; }); function es(e, t) { return new $o({ type: `catch`, innerType: e, catchValue: typeof t == `function` ? t : () => t }); } const ts = f$5(`ZodPipe`, (e, t) => { ar$2.init(e, t), D$5.init(e, t), e._zod.processJSONSchema = (t, n, r) => sa$2(e, t, n, r), e.in = t.in, e.out = t.out; }); function ns(e, t) { return new ts({ type: `pipe`, in: e, out: t }); } const rs = f$5(`ZodReadonly`, (e, t) => { sr$2.init(e, t), D$5.init(e, t), e._zod.processJSONSchema = (t, n, r) => ca$2(e, t, n, r), e.unwrap = () => e._zod.def.innerType; }); function is(e) { return new rs({ type: `readonly`, innerType: e }); } const as = f$5(`ZodLazy`, (e, t) => { lr$2.init(e, t), D$5.init(e, t), e._zod.processJSONSchema = (t, n, r) => da$2(e, t, n, r), e.unwrap = () => e._zod.def.getter(); }); function os(e) { return new as({ type: `lazy`, getter: e }); } const ss = f$5(`ZodCustom`, (e, t) => { ur$2.init(e, t), D$5.init(e, t), e._zod.processJSONSchema = (t, n, r) => Gi$2(e, t, n, r); }); function cs(e, t = {}) { return vi$2(ss, e, t); } function ls(e, t) { return yi$2(e, t); } var k$6; (function(e) { e.assertEqual = (e) => {}; function t(e) {} e.assertIs = t; function n(e) { throw Error(); } e.assertNever = n, e.arrayToEnum = (e) => { let t = {}; for (let n of e) t[n] = n; return t; }, e.getValidEnumValues = (t) => { let n = e.objectKeys(t).filter((e) => typeof t[t[e]] != `number`), r = {}; for (let e of n) r[e] = t[e]; return e.objectValues(r); }, e.objectValues = (t) => e.objectKeys(t).map(function(e) { return t[e]; }), e.objectKeys = typeof Object.keys == `function` ? (e) => Object.keys(e) : (e) => { let t = []; for (let n in e) Object.prototype.hasOwnProperty.call(e, n) && t.push(n); return t; }, e.find = (e, t) => { for (let n of e) if (t(n)) return n; }, e.isInteger = typeof Number.isInteger == `function` ? (e) => Number.isInteger(e) : (e) => typeof e == `number` && Number.isFinite(e) && Math.floor(e) === e; function r(e, t = ` | `) { return e.map((e) => typeof e == `string` ? `'${e}'` : e).join(t); } e.joinValues = r, e.jsonStringifyReplacer = (e, t) => typeof t == `bigint` ? t.toString() : t; })(k$6 ||= {}); var us; (function(e) { e.mergeShapes = (e, t) => ({ ...e, ...t }); })(us ||= {}); const A$5 = k$6.arrayToEnum([ `string`, `nan`, `number`, `integer`, `float`, `boolean`, `date`, `bigint`, `symbol`, `function`, `undefined`, `null`, `array`, `object`, `unknown`, `promise`, `void`, `never`, `map`, `set` ]); const j$5 = (e) => { switch (typeof e) { case `undefined`: return A$5.undefined; case `string`: return A$5.string; case `number`: return Number.isNaN(e) ? A$5.nan : A$5.number; case `boolean`: return A$5.boolean; case `function`: return A$5.function; case `bigint`: return A$5.bigint; case `symbol`: return A$5.symbol; case `object`: return Array.isArray(e) ? A$5.array : e === null ? A$5.null : e.then && typeof e.then == `function` && e.catch && typeof e.catch == `function` ? A$5.promise : typeof Map < `u` && e instanceof Map ? A$5.map : typeof Set < `u` && e instanceof Set ? A$5.set : typeof Date < `u` && e instanceof Date ? A$5.date : A$5.object; default: return A$5.unknown; } }; const M$5 = k$6.arrayToEnum([ `invalid_type`, `invalid_literal`, `custom`, `invalid_union`, `invalid_union_discriminator`, `invalid_enum_value`, `unrecognized_keys`, `invalid_arguments`, `invalid_return_type`, `invalid_date`, `invalid_string`, `too_small`, `too_big`, `invalid_intersection_types`, `not_multiple_of`, `not_finite` ]); var N$5 = class e extends Error { get errors() { return this.issues; } constructor(e) { super(), this.issues = [], this.addIssue = (e) => { this.issues = [...this.issues, e]; }, this.addIssues = (e = []) => { this.issues = [...this.issues, ...e]; }; let t = new.target.prototype; Object.setPrototypeOf ? Object.setPrototypeOf(this, t) : this.__proto__ = t, this.name = `ZodError`, this.issues = e; } format(e) { let t = e || function(e) { return e.message; }, n = { _errors: [] }, r = (e) => { for (let i of e.issues) if (i.code === `invalid_union`) i.unionErrors.map(r); else if (i.code === `invalid_return_type`) r(i.returnTypeError); else if (i.code === `invalid_arguments`) r(i.argumentsError); else if (i.path.length === 0) n._errors.push(t(i)); else { let e = n, r = 0; for (; r < i.path.length;) { let n = i.path[r]; r === i.path.length - 1 ? (e[n] = e[n] || { _errors: [] }, e[n]._errors.push(t(i))) : e[n] = e[n] || { _errors: [] }, e = e[n], r++; } } }; return r(this), n; } static assert(t) { if (!(t instanceof e)) throw Error(`Not a ZodError: ${t}`); } toString() { return this.message; } get message() { return JSON.stringify(this.issues, k$6.jsonStringifyReplacer, 2); } get isEmpty() { return this.issues.length === 0; } flatten(e = (e) => e.message) { let t = Object.create(null), n = []; for (let r of this.issues) if (r.path.length > 0) { let n = r.path[0]; t[n] = t[n] || [], t[n].push(e(r)); } else n.push(e(r)); return { formErrors: n, fieldErrors: t }; } get formErrors() { return this.flatten(); } }; N$5.create = (e) => new N$5(e); const ds = (e, t) => { let n; switch (e.code) { case M$5.invalid_type: n = e.received === A$5.undefined ? `Required` : `Expected ${e.expected}, received ${e.received}`; break; case M$5.invalid_literal: n = `Invalid literal value, expected ${JSON.stringify(e.expected, k$6.jsonStringifyReplacer)}`; break; case M$5.unrecognized_keys: n = `Unrecognized key(s) in object: ${k$6.joinValues(e.keys, `, `)}`; break; case M$5.invalid_union: n = `Invalid input`; break; case M$5.invalid_union_discriminator: n = `Invalid discriminator value. Expected ${k$6.joinValues(e.options)}`; break; case M$5.invalid_enum_value: n = `Invalid enum value. Expected ${k$6.joinValues(e.options)}, received '${e.received}'`; break; case M$5.invalid_arguments: n = `Invalid function arguments`; break; case M$5.invalid_return_type: n = `Invalid function return type`; break; case M$5.invalid_date: n = `Invalid date`; break; case M$5.invalid_string: typeof e.validation == `object` ? `includes` in e.validation ? (n = `Invalid input: must include "${e.validation.includes}"`, typeof e.validation.position == `number` && (n = `${n} at one or more positions greater than or equal to ${e.validation.position}`)) : `startsWith` in e.validation ? n = `Invalid input: must start with "${e.validation.startsWith}"` : `endsWith` in e.validation ? n = `Invalid input: must end with "${e.validation.endsWith}"` : k$6.assertNever(e.validation) : n = e.validation === `regex` ? `Invalid` : `Invalid ${e.validation}`; break; case M$5.too_small: n = e.type === `array` ? `Array must contain ${e.exact ? `exactly` : e.inclusive ? `at least` : `more than`} ${e.minimum} element(s)` : e.type === `string` ? `String must contain ${e.exact ? `exactly` : e.inclusive ? `at least` : `over`} ${e.minimum} character(s)` : e.type === `number` || e.type === `bigint` ? `Number must be ${e.exact ? `exactly equal to ` : e.inclusive ? `greater than or equal to ` : `greater than `}${e.minimum}` : e.type === `date` ? `Date must be ${e.exact ? `exactly equal to ` : e.inclusive ? `greater than or equal to ` : `greater than `}${new Date(Number(e.minimum))}` : `Invalid input`; break; case M$5.too_big: n = e.type === `array` ? `Array must contain ${e.exact ? `exactly` : e.inclusive ? `at most` : `less than`} ${e.maximum} element(s)` : e.type === `string` ? `String must contain ${e.exact ? `exactly` : e.inclusive ? `at most` : `under`} ${e.maximum} character(s)` : e.type === `number` ? `Number must be ${e.exact ? `exactly` : e.inclusive ? `less than or equal to` : `less than`} ${e.maximum}` : e.type === `bigint` ? `BigInt must be ${e.exact ? `exactly` : e.inclusive ? `less than or equal to` : `less than`} ${e.maximum}` : e.type === `date` ? `Date must be ${e.exact ? `exactly` : e.inclusive ? `smaller than or equal to` : `smaller than`} ${new Date(Number(e.maximum))}` : `Invalid input`; break; case M$5.custom: n = `Invalid input`; break; case M$5.invalid_intersection_types: n = `Intersection results could not be merged`; break; case M$5.not_multiple_of: n = `Number must be a multiple of ${e.multipleOf}`; break; case M$5.not_finite: n = `Number must be finite`; break; default: n = t.defaultError, k$6.assertNever(e); } return { message: n }; }; let fs = ds; function ps() { return fs; } const ms = (e) => { let { data: t, path: n, errorMaps: r, issueData: i } = e, a = [...n, ...i.path || []], o = { ...i, path: a }; if (i.message !== void 0) return { ...i, path: a, message: i.message }; let s = ``, c = r.filter((e) => !!e).slice().reverse(); for (let e of c) s = e(o, { data: t, defaultError: s }).message; return { ...i, path: a, message: s }; }; function P$5(e, t) { let n = ps(), r = ms({ issueData: t, data: e.data, path: e.path, errorMaps: [ e.common.contextualErrorMap, e.schemaErrorMap, n, n === ds ? void 0 : ds ].filter((e) => !!e) }); e.common.issues.push(r); } var F$5 = class e { constructor() { this.value = `valid`; } dirty() { this.value === `valid` && (this.value = `dirty`); } abort() { this.value !== `aborted` && (this.value = `aborted`); } static mergeArray(e, t) { let n = []; for (let r of t) { if (r.status === `aborted`) return I$5; r.status === `dirty` && e.dirty(), n.push(r.value); } return { status: e.value, value: n }; } static async mergeObjectAsync(t, n) { let r = []; for (let e of n) { let t = await e.key, n = await e.value; r.push({ key: t, value: n }); } return e.mergeObjectSync(t, r); } static mergeObjectSync(e, t) { let n = {}; for (let r of t) { let { key: t, value: i } = r; if (t.status === `aborted` || i.status === `aborted`) return I$5; t.status === `dirty` && e.dirty(), i.status === `dirty` && e.dirty(), t.value !== `__proto__` && (i.value !== void 0 || r.alwaysSet) && (n[t.value] = i.value); } return { status: e.value, value: n }; } }; const I$5 = Object.freeze({ status: `aborted` }); const hs = (e) => ({ status: `dirty`, value: e }); const L$5 = (e) => ({ status: `valid`, value: e }); const gs = (e) => e.status === `aborted`; const _s = (e) => e.status === `dirty`; const vs = (e) => e.status === `valid`; const ys = (e) => typeof Promise < `u` && e instanceof Promise; var R$5; (function(e) { e.errToObj = (e) => typeof e == `string` ? { message: e } : e || {}, e.toString = (e) => typeof e == `string` ? e : e?.message; })(R$5 ||= {}); var z$5 = class { constructor(e, t, n, r) { this._cachedPath = [], this.parent = e, this.data = t, this._path = n, this._key = r; } get path() { return this._cachedPath.length || (Array.isArray(this._key) ? this._cachedPath.push(...this._path, ...this._key) : this._cachedPath.push(...this._path, this._key)), this._cachedPath; } }; const bs = (e, t) => { if (vs(t)) return { success: !0, data: t.value }; if (!e.common.issues.length) throw Error(`Validation failed but no issues detected.`); return { success: !1, get error() { if (this._error) return this._error; let t = new N$5(e.common.issues); return this._error = t, this._error; } }; }; function B$5(e) { if (!e) return {}; let { errorMap: t, invalid_type_error: n, required_error: r, description: i } = e; if (t && (n || r)) throw Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`); return t ? { errorMap: t, description: i } : { errorMap: (t, i) => { let { message: a } = e; return t.code === `invalid_enum_value` ? { message: a ?? i.defaultError } : i.data === void 0 ? { message: a ?? r ?? i.defaultError } : t.code === `invalid_type` ? { message: a ?? n ?? i.defaultError } : { message: i.defaultError }; }, description: i }; } var V$5 = class { get description() { return this._def.description; } _getType(e) { return j$5(e.data); } _getOrReturnCtx(e, t) { return t || { common: e.parent.common, data: e.data, parsedType: j$5(e.data), schemaErrorMap: this._def.errorMap, path: e.path, parent: e.parent }; } _processInputParams(e) { return { status: new F$5(), ctx: { common: e.parent.common, data: e.data, parsedType: j$5(e.data), schemaErrorMap: this._def.errorMap, path: e.path, parent: e.parent } }; } _parseSync(e) { let t = this._parse(e); if (ys(t)) throw Error(`Synchronous parse encountered promise.`); return t; } _parseAsync(e) { let t = this._parse(e); return Promise.resolve(t); } parse(e, t) { let n = this.safeParse(e, t); if (n.success) return n.data; throw n.error; } safeParse(e, t) { let n = { common: { issues: [], async: t?.async ?? !1, contextualErrorMap: t?.errorMap }, path: t?.path || [], schemaErrorMap: this._def.errorMap, parent: null, data: e, parsedType: j$5(e) }; return bs(n, this._parseSync({ data: e, path: n.path, parent: n })); } "~validate"(e) { let t = { common: { issues: [], async: !!this[`~standard`].async }, path: [], schemaErrorMap: this._def.errorMap, parent: null, data: e, parsedType: j$5(e) }; if (!this[`~standard`].async) try { let n = this._parseSync({ data: e, path: [], parent: t }); return vs(n) ? { value: n.value } : { issues: t.common.issues }; } catch (e) { e?.message?.toLowerCase()?.includes(`encountered`) && (this[`~standard`].async = !0), t.common = { issues: [], async: !0 }; } return this._parseAsync({ data: e, path: [], parent: t }).then((e) => vs(e) ? { value: e.value } : { issues: t.common.issues }); } async parseAsync(e, t) { let n = await this.safeParseAsync(e, t); if (n.success) return n.data; throw n.error; } async safeParseAsync(e, t) { let n = { common: { issues: [], contextualErrorMap: t?.errorMap, async: !0 }, path: t?.path || [], schemaErrorMap: this._def.errorMap, parent: null, data: e, parsedType: j$5(e) }, r = this._parse({ data: e, path: n.path, parent: n }); return bs(n, await (ys(r) ? r : Promise.resolve(r))); } refine(e, t) { let n = (e) => typeof t == `string` || t === void 0 ? { message: t } : typeof t == `function` ? t(e) : t; return this._refinement((t, r) => { let i = e(t), a = () => r.addIssue({ code: M$5.custom, ...n(t) }); return typeof Promise < `u` && i instanceof Promise ? i.then((e) => e ? !0 : (a(), !1)) : i ? !0 : (a(), !1); }); } refinement(e, t) { return this._refinement((n, r) => e(n) ? !0 : (r.addIssue(typeof t == `function` ? t(n, r) : t), !1)); } _refinement(e) { return new G$6({ schema: this, typeName: q$5.ZodEffects, effect: { type: `refinement`, refinement: e } }); } superRefine(e) { return this._refinement(e); } constructor(e) { this.spa = this.safeParseAsync, this._def = e, this.parse = this.parse.bind(this), this.safeParse = this.safeParse.bind(this), this.parseAsync = this.parseAsync.bind(this), this.safeParseAsync = this.safeParseAsync.bind(this), this.spa = this.spa.bind(this), this.refine = this.refine.bind(this), this.refinement = this.refinement.bind(this), this.superRefine = this.superRefine.bind(this), this.optional = this.optional.bind(this), this.nullable = this.nullable.bind(this), this.nullish = this.nullish.bind(this), this.array = this.array.bind(this), this.promise = this.promise.bind(this), this.or = this.or.bind(this), this.and = this.and.bind(this), this.transform = this.transform.bind(this), this.brand = this.brand.bind(this), this.default = this.default.bind(this), this.catch = this.catch.bind(this), this.describe = this.describe.bind(this), this.pipe = this.pipe.bind(this), this.readonly = this.readonly.bind(this), this.isNullable = this.isNullable.bind(this), this.isOptional = this.isOptional.bind(this), this[`~standard`] = { version: 1, vendor: `zod`, validate: (e) => this[`~validate`](e) }; } optional() { return K$5.create(this, this._def); } nullable() { return yc.create(this, this._def); } nullish() { return this.nullable().optional(); } array() { return nc.create(this); } promise() { return vc.create(this, this._def); } or(e) { return ic.create([this, e], this._def); } and(e) { return sc.create(this, e, this._def); } transform(e) { return new G$6({ ...B$5(this._def), schema: this, typeName: q$5.ZodEffects, effect: { type: `transform`, transform: e } }); } default(e) { let t = typeof e == `function` ? e : () => e; return new bc({ ...B$5(this._def), innerType: this, defaultValue: t, typeName: q$5.ZodDefault }); } brand() { return new Cc({ typeName: q$5.ZodBranded, type: this, ...B$5(this._def) }); } catch(e) { let t = typeof e == `function` ? e : () => e; return new xc({ ...B$5(this._def), innerType: this, catchValue: t, typeName: q$5.ZodCatch }); } describe(e) { let t = this.constructor; return new t({ ...this._def, description: e }); } pipe(e) { return wc.create(this, e); } readonly() { return Tc.create(this); } isOptional() { return this.safeParse(void 0).success; } isNullable() { return this.safeParse(null).success; } }; const xs = /^c[^\s-]{8,}$/i; const Ss = /^[0-9a-z]+$/; const Cs = /^[0-9A-HJKMNP-TV-Z]{26}$/i; const ws = /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i; const Ts = /^[a-z0-9_-]{21}$/i; const Es = /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/; const Ds = /^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/; const Os = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i; let ks; const As = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/; const js = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0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fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/; const Ps = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/; const Fs = /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/; const Is = `((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))`; const Ls = RegExp(`^${Is}$`); function Rs(e) { let t = `[0-5]\\d`; e.precision ? t = `${t}\\.\\d{${e.precision}}` : e.precision ?? (t = `${t}(\\.\\d+)?`); let n = e.precision ? `+` : `?`; return `([01]\\d|2[0-3]):[0-5]\\d(:${t})${n}`; } function zs(e) { return RegExp(`^${Rs(e)}$`); } function Bs(e) { let t = `${Is}T${Rs(e)}`, n = []; return n.push(e.local ? `Z?` : `Z`), e.offset && n.push(`([+-]\\d{2}:?\\d{2})`), t = `${t}(${n.join(`|`)})`, RegExp(`^${t}$`); } function Vs(e, t) { return !!((t === `v4` || !t) && As.test(e) || (t === `v6` || !t) && Ms.test(e)); } function Hs(e, t) { if (!Es.test(e)) return !1; try { let [n] = e.split(`.`); if (!n) return !1; let r = n.replace(/-/g, `+`).replace(/_/g, `/`).padEnd(n.length + (4 - n.length % 4) % 4, `=`), i = JSON.parse(atob(r)); return !(typeof i != `object` || !i || `typ` in i && i?.typ !== `JWT` || !i.alg || t && i.alg !== t); } catch { return !1; } } function Us(e, t) { return !!((t === `v4` || !t) && js.test(e) || (t === `v6` || !t) && Ns.test(e)); } var Ws = class e extends V$5 { _parse(e) { if (this._def.coerce && (e.data = String(e.data)), this._getType(e) !== A$5.string) { let t = this._getOrReturnCtx(e); return P$5(t, { code: M$5.invalid_type, expected: A$5.string, received: t.parsedType }), I$5; } let t = new F$5(), n; for (let r of this._def.checks) if (r.kind === `min`) e.data.length < r.value && (n = this._getOrReturnCtx(e, n), P$5(n, { code: M$5.too_small, minimum: r.value, type: `string`, inclusive: !0, exact: !1, message: r.message }), t.dirty()); else if (r.kind === `max`) e.data.length > r.value && (n = this._getOrReturnCtx(e, n), P$5(n, { code: M$5.too_big, maximum: r.value, type: `string`, inclusive: !0, exact: !1, message: r.message }), t.dirty()); else if (r.kind === `length`) { let i = e.data.length > r.value, a = e.data.length < r.value; (i || a) && (n = this._getOrReturnCtx(e, n), i ? P$5(n, { code: M$5.too_big, maximum: r.value, type: `string`, inclusive: !0, exact: !0, message: r.message }) : a && P$5(n, { code: M$5.too_small, minimum: r.value, type: `string`, inclusive: !0, exact: !0, message: r.message }), t.dirty()); } else if (r.kind === `email`) Os.test(e.data) || (n = this._getOrReturnCtx(e, n), P$5(n, { validation: `email`, code: M$5.invalid_string, message: r.message }), t.dirty()); else if (r.kind === `emoji`) ks ||= RegExp(`^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`, `u`), ks.test(e.data) || (n = this._getOrReturnCtx(e, n), P$5(n, { validation: `emoji`, code: M$5.invalid_string, message: r.message }), t.dirty()); else if (r.kind === `uuid`) ws.test(e.data) || (n = this._getOrReturnCtx(e, n), P$5(n, { validation: `uuid`, code: M$5.invalid_string, message: r.message }), t.dirty()); else if (r.kind === `nanoid`) Ts.test(e.data) || (n = this._getOrReturnCtx(e, n), P$5(n, { validation: `nanoid`, code: M$5.invalid_string, message: r.message }), t.dirty()); else if (r.kind === `cuid`) xs.test(e.data) || (n = this._getOrReturnCtx(e, n), P$5(n, { validation: `cuid`, code: M$5.invalid_string, message: r.message }), t.dirty()); else if (r.kind === `cuid2`) Ss.test(e.data) || (n = this._getOrReturnCtx(e, n), P$5(n, { validation: `cuid2`, code: M$5.invalid_string, message: r.message }), t.dirty()); else if (r.kind === `ulid`) Cs.test(e.data) || (n = this._getOrReturnCtx(e, n), P$5(n, { validation: `ulid`, code: M$5.invalid_string, message: r.message }), t.dirty()); else if (r.kind === `url`) try { new URL(e.data); } catch { n = this._getOrReturnCtx(e, n), P$5(n, { validation: `url`, code: M$5.invalid_string, message: r.message }), t.dirty(); } else r.kind === `regex` ? (r.regex.lastIndex = 0, r.regex.test(e.data) || (n = this._getOrReturnCtx(e, n), P$5(n, { validation: `regex`, code: M$5.invalid_string, message: r.message }), t.dirty())) : r.kind === `trim` ? e.data = e.data.trim() : r.kind === `includes` ? e.data.includes(r.value, r.position) || (n = this._getOrReturnCtx(e, n), P$5(n, { code: M$5.invalid_string, validation: { includes: r.value, position: r.position }, message: r.message }), t.dirty()) : r.kind === `toLowerCase` ? e.data = e.data.toLowerCase() : r.kind === `toUpperCase` ? e.data = e.data.toUpperCase() : r.kind === `startsWith` ? e.data.startsWith(r.value) || (n = this._getOrReturnCtx(e, n), P$5(n, { code: M$5.invalid_string, validation: { startsWith: r.value }, message: r.message }), t.dirty()) : r.kind === `endsWith` ? e.data.endsWith(r.value) || (n = this._getOrReturnCtx(e, n), P$5(n, { code: M$5.invalid_string, validation: { endsWith: r.value }, message: r.message }), t.dirty()) : r.kind === `datetime` ? Bs(r).test(e.data) || (n = this._getOrReturnCtx(e, n), P$5(n, { code: M$5.invalid_string, validation: `datetime`, message: r.message }), t.dirty()) : r.kind === `date` ? Ls.test(e.data) || (n = this._getOrReturnCtx(e, n), P$5(n, { code: M$5.invalid_string, validation: `date`, message: r.message }), t.dirty()) : r.kind === `time` ? zs(r).test(e.data) || (n = this._getOrReturnCtx(e, n), P$5(n, { code: M$5.invalid_string, validation: `time`, message: r.message }), t.dirty()) : r.kind === `duration` ? Ds.test(e.data) || (n = this._getOrReturnCtx(e, n), P$5(n, { validation: `duration`, code: M$5.invalid_string, message: r.message }), t.dirty()) : r.kind === `ip` ? Vs(e.data, r.version) || (n = this._getOrReturnCtx(e, n), P$5(n, { validation: `ip`, code: M$5.invalid_string, message: r.message }), t.dirty()) : r.kind === `jwt` ? Hs(e.data, r.alg) || (n = this._getOrReturnCtx(e, n), P$5(n, { validation: `jwt`, code: M$5.invalid_string, message: r.message }), t.dirty()) : r.kind === `cidr` ? Us(e.data, r.version) || (n = this._getOrReturnCtx(e, n), P$5(n, { validation: `cidr`, code: M$5.invalid_string, message: r.message }), t.dirty()) : r.kind === `base64` ? Ps.test(e.data) || (n = this._getOrReturnCtx(e, n), P$5(n, { validation: `base64`, code: M$5.invalid_string, message: r.message }), t.dirty()) : r.kind === `base64url` ? Fs.test(e.data) || (n = this._getOrReturnCtx(e, n), P$5(n, { validation: `base64url`, code: M$5.invalid_string, message: r.message }), t.dirty()) : k$6.assertNever(r); return { status: t.value, value: e.data }; } _regex(e, t, n) { return this.refinement((t) => e.test(t), { validation: t, code: M$5.invalid_string, ...R$5.errToObj(n) }); } _addCheck(t) { return new e({ ...this._def, checks: [...this._def.checks, t] }); } email(e) { return this._addCheck({ kind: `email`, ...R$5.errToObj(e) }); } url(e) { return this._addCheck({ kind: `url`, ...R$5.errToObj(e) }); } emoji(e) { return this._addCheck({ kind: `emoji`, ...R$5.errToObj(e) }); } uuid(e) { return this._addCheck({ kind: `uuid`, ...R$5.errToObj(e) }); } nanoid(e) { return this._addCheck({ kind: `nanoid`, ...R$5.errToObj(e) }); } cuid(e) { return this._addCheck({ kind: `cuid`, ...R$5.errToObj(e) }); } cuid2(e) { return this._addCheck({ kind: `cuid2`, ...R$5.errToObj(e) }); } ulid(e) { return this._addCheck({ kind: `ulid`, ...R$5.errToObj(e) }); } base64(e) { return this._addCheck({ kind: `base64`, ...R$5.errToObj(e) }); } base64url(e) { return this._addCheck({ kind: `base64url`, ...R$5.errToObj(e) }); } jwt(e) { return this._addCheck({ kind: `jwt`, ...R$5.errToObj(e) }); } ip(e) { return this._addCheck({ kind: `ip`, ...R$5.errToObj(e) }); } cidr(e) { return this._addCheck({ kind: `cidr`, ...R$5.errToObj(e) }); } datetime(e) { return typeof e == `string` ? this._addCheck({ kind: `datetime`, precision: null, offset: !1, local: !1, message: e }) : this._addCheck({ kind: `datetime`, precision: e?.precision === void 0 ? null : e?.precision, offset: e?.offset ?? !1, local: e?.local ?? !1, ...R$5.errToObj(e?.message) }); } date(e) { return this._addCheck({ kind: `date`, message: e }); } time(e) { return typeof e == `string` ? this._addCheck({ kind: `time`, precision: null, message: e }) : this._addCheck({ kind: `time`, precision: e?.precision === void 0 ? null : e?.precision, ...R$5.errToObj(e?.message) }); } duration(e) { return this._addCheck({ kind: `duration`, ...R$5.errToObj(e) }); } regex(e, t) { return this._addCheck({ kind: `regex`, regex: e, ...R$5.errToObj(t) }); } includes(e, t) { return this._addCheck({ kind: `includes`, value: e, position: t?.position, ...R$5.errToObj(t?.message) }); } startsWith(e, t) { return this._addCheck({ kind: `startsWith`, value: e, ...R$5.errToObj(t) }); } endsWith(e, t) { return this._addCheck({ kind: `endsWith`, value: e, ...R$5.errToObj(t) }); } min(e, t) { return this._addCheck({ kind: `min`, value: e, ...R$5.errToObj(t) }); } max(e, t) { return this._addCheck({ kind: `max`, value: e, ...R$5.errToObj(t) }); } length(e, t) { return this._addCheck({ kind: `length`, value: e, ...R$5.errToObj(t) }); } nonempty(e) { return this.min(1, R$5.errToObj(e)); } trim() { return new e({ ...this._def, checks: [...this._def.checks, { kind: `trim` }] }); } toLowerCase() { return new e({ ...this._def, checks: [...this._def.checks, { kind: `toLowerCase` }] }); } toUpperCase() { return new e({ ...this._def, checks: [...this._def.checks, { kind: `toUpperCase` }] }); } get isDatetime() { return !!this._def.checks.find((e) => e.kind === `datetime`); } get isDate() { return !!this._def.checks.find((e) => e.kind === `date`); } get isTime() { return !!this._def.checks.find((e) => e.kind === `time`); } get isDuration() { return !!this._def.checks.find((e) => e.kind === `duration`); } get isEmail() { return !!this._def.checks.find((e) => e.kind === `email`); } get isURL() { return !!this._def.checks.find((e) => e.kind === `url`); } get isEmoji() { return !!this._def.checks.find((e) => e.kind === `emoji`); } get isUUID() { return !!this._def.checks.find((e) => e.kind === `uuid`); } get isNANOID() { return !!this._def.checks.find((e) => e.kind === `nanoid`); } get isCUID() { return !!this._def.checks.find((e) => e.kind === `cuid`); } get isCUID2() { return !!this._def.checks.find((e) => e.kind === `cuid2`); } get isULID() { return !!this._def.checks.find((e) => e.kind === `ulid`); } get isIP() { return !!this._def.checks.find((e) => e.kind === `ip`); } get isCIDR() { return !!this._def.checks.find((e) => e.kind === `cidr`); } get isBase64() { return !!this._def.checks.find((e) => e.kind === `base64`); } get isBase64url() { return !!this._def.checks.find((e) => e.kind === `base64url`); } get minLength() { let e = null; for (let t of this._def.checks) t.kind === `min` && (e === null || t.value > e) && (e = t.value); return e; } get maxLength() { let e = null; for (let t of this._def.checks) t.kind === `max` && (e === null || t.value < e) && (e = t.value); return e; } }; Ws.create = (e) => new Ws({ checks: [], typeName: q$5.ZodString, coerce: e?.coerce ?? !1, ...B$5(e) }); function Gs(e, t) { let n = (e.toString().split(`.`)[1] || ``).length, r = (t.toString().split(`.`)[1] || ``).length, i = n > r ? n : r; return Number.parseInt(e.toFixed(i).replace(`.`, ``)) % Number.parseInt(t.toFixed(i).replace(`.`, ``)) / 10 ** i; } var Ks = class e extends V$5 { constructor() { super(...arguments), this.min = this.gte, this.max = this.lte, this.step = this.multipleOf; } _parse(e) { if (this._def.coerce && (e.data = Number(e.data)), this._getType(e) !== A$5.number) { let t = this._getOrReturnCtx(e); return P$5(t, { code: M$5.invalid_type, expected: A$5.number, received: t.parsedType }), I$5; } let t, n = new F$5(); for (let r of this._def.checks) r.kind === `int` ? k$6.isInteger(e.data) || (t = this._getOrReturnCtx(e, t), P$5(t, { code: M$5.invalid_type, expected: `integer`, received: `float`, message: r.message }), n.dirty()) : r.kind === `min` ? (r.inclusive ? e.data < r.value : e.data <= r.value) && (t = this._getOrReturnCtx(e, t), P$5(t, { code: M$5.too_small, minimum: r.value, type: `number`, inclusive: r.inclusive, exact: !1, message: r.message }), n.dirty()) : r.kind === `max` ? (r.inclusive ? e.data > r.value : e.data >= r.value) && (t = this._getOrReturnCtx(e, t), P$5(t, { code: M$5.too_big, maximum: r.value, type: `number`, inclusive: r.inclusive, exact: !1, message: r.message }), n.dirty()) : r.kind === `multipleOf` ? Gs(e.data, r.value) !== 0 && (t = this._getOrReturnCtx(e, t), P$5(t, { code: M$5.not_multiple_of, multipleOf: r.value, message: r.message }), n.dirty()) : r.kind === `finite` ? Number.isFinite(e.data) || (t = this._getOrReturnCtx(e, t), P$5(t, { code: M$5.not_finite, message: r.message }), n.dirty()) : k$6.assertNever(r); return { status: n.value, value: e.data }; } gte(e, t) { return this.setLimit(`min`, e, !0, R$5.toString(t)); } gt(e, t) { return this.setLimit(`min`, e, !1, R$5.toString(t)); } lte(e, t) { return this.setLimit(`max`, e, !0, R$5.toString(t)); } lt(e, t) { return this.setLimit(`max`, e, !1, R$5.toString(t)); } setLimit(t, n, r, i) { return new e({ ...this._def, checks: [...this._def.checks, { kind: t, value: n, inclusive: r, message: R$5.toString(i) }] }); } _addCheck(t) { return new e({ ...this._def, checks: [...this._def.checks, t] }); } int(e) { return this._addCheck({ kind: `int`, message: R$5.toString(e) }); } positive(e) { return this._addCheck({ kind: `min`, value: 0, inclusive: !1, message: R$5.toString(e) }); } negative(e) { return this._addCheck({ kind: `max`, value: 0, inclusive: !1, message: R$5.toString(e) }); } nonpositive(e) { return this._addCheck({ kind: `max`, value: 0, inclusive: !0, message: R$5.toString(e) }); } nonnegative(e) { return this._addCheck({ kind: `min`, value: 0, inclusive: !0, message: R$5.toString(e) }); } multipleOf(e, t) { return this._addCheck({ kind: `multipleOf`, value: e, message: R$5.toString(t) }); } finite(e) { return this._addCheck({ kind: `finite`, message: R$5.toString(e) }); } safe(e) { return this._addCheck({ kind: `min`, inclusive: !0, value: -(2 ** 53 - 1), message: R$5.toString(e) })._addCheck({ kind: `max`, inclusive: !0, value: 2 ** 53 - 1, message: R$5.toString(e) }); } get minValue() { let e = null; for (let t of this._def.checks) t.kind === `min` && (e === null || t.value > e) && (e = t.value); return e; } get maxValue() { let e = null; for (let t of this._def.checks) t.kind === `max` && (e === null || t.value < e) && (e = t.value); return e; } get isInt() { return !!this._def.checks.find((e) => e.kind === `int` || e.kind === `multipleOf` && k$6.isInteger(e.value)); } get isFinite() { let e = null, t = null; for (let n of this._def.checks) if (n.kind === `finite` || n.kind === `int` || n.kind === `multipleOf`) return !0; else n.kind === `min` ? (t === null || n.value > t) && (t = n.value) : n.kind === `max` && (e === null || n.value < e) && (e = n.value); return Number.isFinite(t) && Number.isFinite(e); } }; Ks.create = (e) => new Ks({ checks: [], typeName: q$5.ZodNumber, coerce: e?.coerce || !1, ...B$5(e) }); var qs = class e extends V$5 { constructor() { super(...arguments), this.min = this.gte, this.max = this.lte; } _parse(e) { if (this._def.coerce) try { e.data = BigInt(e.data); } catch { return this._getInvalidInput(e); } if (this._getType(e) !== A$5.bigint) return this._getInvalidInput(e); let t, n = new F$5(); for (let r of this._def.checks) r.kind === `min` ? (r.inclusive ? e.data < r.value : e.data <= r.value) && (t = this._getOrReturnCtx(e, t), P$5(t, { code: M$5.too_small, type: `bigint`, minimum: r.value, inclusive: r.inclusive, message: r.message }), n.dirty()) : r.kind === `max` ? (r.inclusive ? e.data > r.value : e.data >= r.value) && (t = this._getOrReturnCtx(e, t), P$5(t, { code: M$5.too_big, type: `bigint`, maximum: r.value, inclusive: r.inclusive, message: r.message }), n.dirty()) : r.kind === `multipleOf` ? e.data % r.value !== BigInt(0) && (t = this._getOrReturnCtx(e, t), P$5(t, { code: M$5.not_multiple_of, multipleOf: r.value, message: r.message }), n.dirty()) : k$6.assertNever(r); return { status: n.value, value: e.data }; } _getInvalidInput(e) { let t = this._getOrReturnCtx(e); return P$5(t, { code: M$5.invalid_type, expected: A$5.bigint, received: t.parsedType }), I$5; } gte(e, t) { return this.setLimit(`min`, e, !0, R$5.toString(t)); } gt(e, t) { return this.setLimit(`min`, e, !1, R$5.toString(t)); } lte(e, t) { return this.setLimit(`max`, e, !0, R$5.toString(t)); } lt(e, t) { return this.setLimit(`max`, e, !1, R$5.toString(t)); } setLimit(t, n, r, i) { return new e({ ...this._def, checks: [...this._def.checks, { kind: t, value: n, inclusive: r, message: R$5.toString(i) }] }); } _addCheck(t) { return new e({ ...this._def, checks: [...this._def.checks, t] }); } positive(e) { return this._addCheck({ kind: `min`, value: BigInt(0), inclusive: !1, message: R$5.toString(e) }); } negative(e) { return this._addCheck({ kind: `max`, value: BigInt(0), inclusive: !1, message: R$5.toString(e) }); } nonpositive(e) { return this._addCheck({ kind: `max`, value: BigInt(0), inclusive: !0, message: R$5.toString(e) }); } nonnegative(e) { return this._addCheck({ kind: `min`, value: BigInt(0), inclusive: !0, message: R$5.toString(e) }); } multipleOf(e, t) { return this._addCheck({ kind: `multipleOf`, value: e, message: R$5.toString(t) }); } get minValue() { let e = null; for (let t of this._def.checks) t.kind === `min` && (e === null || t.value > e) && (e = t.value); return e; } get maxValue() { let e = null; for (let t of this._def.checks) t.kind === `max` && (e === null || t.value < e) && (e = t.value); return e; } }; qs.create = (e) => new qs({ checks: [], typeName: q$5.ZodBigInt, coerce: e?.coerce ?? !1, ...B$5(e) }); var Js = class extends V$5 { _parse(e) { if (this._def.coerce && (e.data = !!e.data), this._getType(e) !== A$5.boolean) { let t = this._getOrReturnCtx(e); return P$5(t, { code: M$5.invalid_type, expected: A$5.boolean, received: t.parsedType }), I$5; } return L$5(e.data); } }; Js.create = (e) => new Js({ typeName: q$5.ZodBoolean, coerce: e?.coerce || !1, ...B$5(e) }); var Ys = class e extends V$5 { _parse(e) { if (this._def.coerce && (e.data = new Date(e.data)), this._getType(e) !== A$5.date) { let t = this._getOrReturnCtx(e); return P$5(t, { code: M$5.invalid_type, expected: A$5.date, received: t.parsedType }), I$5; } if (Number.isNaN(e.data.getTime())) return P$5(this._getOrReturnCtx(e), { code: M$5.invalid_date }), I$5; let t = new F$5(), n; for (let r of this._def.checks) r.kind === `min` ? e.data.getTime() < r.value && (n = this._getOrReturnCtx(e, n), P$5(n, { code: M$5.too_small, message: r.message, inclusive: !0, exact: !1, minimum: r.value, type: `date` }), t.dirty()) : r.kind === `max` ? e.data.getTime() > r.value && (n = this._getOrReturnCtx(e, n), P$5(n, { code: M$5.too_big, message: r.message, inclusive: !0, exact: !1, maximum: r.value, type: `date` }), t.dirty()) : k$6.assertNever(r); return { status: t.value, value: new Date(e.data.getTime()) }; } _addCheck(t) { return new e({ ...this._def, checks: [...this._def.checks, t] }); } min(e, t) { return this._addCheck({ kind: `min`, value: e.getTime(), message: R$5.toString(t) }); } max(e, t) { return this._addCheck({ kind: `max`, value: e.getTime(), message: R$5.toString(t) }); } get minDate() { let e = null; for (let t of this._def.checks) t.kind === `min` && (e === null || t.value > e) && (e = t.value); return e == null ? null : new Date(e); } get maxDate() { let e = null; for (let t of this._def.checks) t.kind === `max` && (e === null || t.value < e) && (e = t.value); return e == null ? null : new Date(e); } }; Ys.create = (e) => new Ys({ checks: [], coerce: e?.coerce || !1, typeName: q$5.ZodDate, ...B$5(e) }); var Xs = class extends V$5 { _parse(e) { if (this._getType(e) !== A$5.symbol) { let t = this._getOrReturnCtx(e); return P$5(t, { code: M$5.invalid_type, expected: A$5.symbol, received: t.parsedType }), I$5; } return L$5(e.data); } }; Xs.create = (e) => new Xs({ typeName: q$5.ZodSymbol, ...B$5(e) }); var Zs = class extends V$5 { _parse(e) { if (this._getType(e) !== A$5.undefined) { let t = this._getOrReturnCtx(e); return P$5(t, { code: M$5.invalid_type, expected: A$5.undefined, received: t.parsedType }), I$5; } return L$5(e.data); } }; Zs.create = (e) => new Zs({ typeName: q$5.ZodUndefined, ...B$5(e) }); var Qs = class extends V$5 { _parse(e) { if (this._getType(e) !== A$5.null) { let t = this._getOrReturnCtx(e); return P$5(t, { code: M$5.invalid_type, expected: A$5.null, received: t.parsedType }), I$5; } return L$5(e.data); } }; Qs.create = (e) => new Qs({ typeName: q$5.ZodNull, ...B$5(e) }); var $s = class extends V$5 { constructor() { super(...arguments), this._any = !0; } _parse(e) { return L$5(e.data); } }; $s.create = (e) => new $s({ typeName: q$5.ZodAny, ...B$5(e) }); var ec = class extends V$5 { constructor() { super(...arguments), this._unknown = !0; } _parse(e) { return L$5(e.data); } }; ec.create = (e) => new ec({ typeName: q$5.ZodUnknown, ...B$5(e) }); var H$6 = class extends V$5 { _parse(e) { let t = this._getOrReturnCtx(e); return P$5(t, { code: M$5.invalid_type, expected: A$5.never, received: t.parsedType }), I$5; } }; H$6.create = (e) => new H$6({ typeName: q$5.ZodNever, ...B$5(e) }); var tc = class extends V$5 { _parse(e) { if (this._getType(e) !== A$5.undefined) { let t = this._getOrReturnCtx(e); return P$5(t, { code: M$5.invalid_type, expected: A$5.void, received: t.parsedType }), I$5; } return L$5(e.data); } }; tc.create = (e) => new tc({ typeName: q$5.ZodVoid, ...B$5(e) }); var nc = class e extends V$5 { _parse(e) { let { ctx: t, status: n } = this._processInputParams(e), r = this._def; if (t.parsedType !== A$5.array) return P$5(t, { code: M$5.invalid_type, expected: A$5.array, received: t.parsedType }), I$5; if (r.exactLength !== null) { let e = t.data.length > r.exactLength.value, i = t.data.length < r.exactLength.value; (e || i) && (P$5(t, { code: e ? M$5.too_big : M$5.too_small, minimum: i ? r.exactLength.value : void 0, maximum: e ? r.exactLength.value : void 0, type: `array`, inclusive: !0, exact: !0, message: r.exactLength.message }), n.dirty()); } if (r.minLength !== null && t.data.length < r.minLength.value && (P$5(t, { code: M$5.too_small, minimum: r.minLength.value, type: `array`, inclusive: !0, exact: !1, message: r.minLength.message }), n.dirty()), r.maxLength !== null && t.data.length > r.maxLength.value && (P$5(t, { code: M$5.too_big, maximum: r.maxLength.value, type: `array`, inclusive: !0, exact: !1, message: r.maxLength.message }), n.dirty()), t.common.async) return Promise.all([...t.data].map((e, n) => r.type._parseAsync(new z$5(t, e, t.path, n)))).then((e) => F$5.mergeArray(n, e)); let i = [...t.data].map((e, n) => r.type._parseSync(new z$5(t, e, t.path, n))); return F$5.mergeArray(n, i); } get element() { return this._def.type; } min(t, n) { return new e({ ...this._def, minLength: { value: t, message: R$5.toString(n) } }); } max(t, n) { return new e({ ...this._def, maxLength: { value: t, message: R$5.toString(n) } }); } length(t, n) { return new e({ ...this._def, exactLength: { value: t, message: R$5.toString(n) } }); } nonempty(e) { return this.min(1, e); } }; nc.create = (e, t) => new nc({ type: e, minLength: null, maxLength: null, exactLength: null, typeName: q$5.ZodArray, ...B$5(t) }); function rc(e) { if (e instanceof U$6) { let t = {}; for (let n in e.shape) { let r = e.shape[n]; t[n] = K$5.create(rc(r)); } return new U$6({ ...e._def, shape: () => t }); } else if (e instanceof nc) return new nc({ ...e._def, type: rc(e.element) }); else if (e instanceof K$5) return K$5.create(rc(e.unwrap())); else if (e instanceof yc) return yc.create(rc(e.unwrap())); else if (e instanceof cc) return cc.create(e.items.map((e) => rc(e))); else return e; } var U$6 = class e extends V$5 { constructor() { super(...arguments), this._cached = null, this.nonstrict = this.passthrough, this.augment = this.extend; } _getCached() { if (this._cached !== null) return this._cached; let e = this._def.shape(), t = k$6.objectKeys(e); return this._cached = { shape: e, keys: t }, this._cached; } _parse(e) { if (this._getType(e) !== A$5.object) { let t = this._getOrReturnCtx(e); return P$5(t, { code: M$5.invalid_type, expected: A$5.object, received: t.parsedType }), I$5; } let { status: t, ctx: n } = this._processInputParams(e), { shape: r, keys: i } = this._getCached(), a = []; if (!(this._def.catchall instanceof H$6 && this._def.unknownKeys === `strip`)) for (let e in n.data) i.includes(e) || a.push(e); let o = []; for (let e of i) { let t = r[e], i = n.data[e]; o.push({ key: { status: `valid`, value: e }, value: t._parse(new z$5(n, i, n.path, e)), alwaysSet: e in n.data }); } if (this._def.catchall instanceof H$6) { let e = this._def.unknownKeys; if (e === `passthrough`) for (let e of a) o.push({ key: { status: `valid`, value: e }, value: { status: `valid`, value: n.data[e] } }); else if (e === `strict`) a.length > 0 && (P$5(n, { code: M$5.unrecognized_keys, keys: a }), t.dirty()); else if (e !== `strip`) throw Error(`Internal ZodObject error: invalid unknownKeys value.`); } else { let e = this._def.catchall; for (let t of a) { let r = n.data[t]; o.push({ key: { status: `valid`, value: t }, value: e._parse(new z$5(n, r, n.path, t)), alwaysSet: t in n.data }); } } return n.common.async ? Promise.resolve().then(async () => { let e = []; for (let t of o) { let n = await t.key, r = await t.value; e.push({ key: n, value: r, alwaysSet: t.alwaysSet }); } return e; }).then((e) => F$5.mergeObjectSync(t, e)) : F$5.mergeObjectSync(t, o); } get shape() { return this._def.shape(); } strict(t) { return R$5.errToObj, new e({ ...this._def, unknownKeys: `strict`, ...t === void 0 ? {} : { errorMap: (e, n) => { let r = this._def.errorMap?.(e, n).message ?? n.defaultError; return e.code === `unrecognized_keys` ? { message: R$5.errToObj(t).message ?? r } : { message: r }; } } }); } strip() { return new e({ ...this._def, unknownKeys: `strip` }); } passthrough() { return new e({ ...this._def, unknownKeys: `passthrough` }); } extend(t) { return new e({ ...this._def, shape: () => ({ ...this._def.shape(), ...t }) }); } merge(t) { return new e({ unknownKeys: t._def.unknownKeys, catchall: t._def.catchall, shape: () => ({ ...this._def.shape(), ...t._def.shape() }), typeName: q$5.ZodObject }); } setKey(e, t) { return this.augment({ [e]: t }); } catchall(t) { return new e({ ...this._def, catchall: t }); } pick(t) { let n = {}; for (let e of k$6.objectKeys(t)) t[e] && this.shape[e] && (n[e] = this.shape[e]); return new e({ ...this._def, shape: () => n }); } omit(t) { let n = {}; for (let e of k$6.objectKeys(this.shape)) t[e] || (n[e] = this.shape[e]); return new e({ ...this._def, shape: () => n }); } deepPartial() { return rc(this); } partial(t) { let n = {}; for (let e of k$6.objectKeys(this.shape)) { let r = this.shape[e]; t && !t[e] ? n[e] = r : n[e] = r.optional(); } return new e({ ...this._def, shape: () => n }); } required(t) { let n = {}; for (let e of k$6.objectKeys(this.shape)) if (t && !t[e]) n[e] = this.shape[e]; else { let t = this.shape[e]; for (; t instanceof K$5;) t = t._def.innerType; n[e] = t; } return new e({ ...this._def, shape: () => n }); } keyof() { return hc(k$6.objectKeys(this.shape)); } }; U$6.create = (e, t) => new U$6({ shape: () => e, unknownKeys: `strip`, catchall: H$6.create(), typeName: q$5.ZodObject, ...B$5(t) }), U$6.strictCreate = (e, t) => new U$6({ shape: () => e, unknownKeys: `strict`, catchall: H$6.create(), typeName: q$5.ZodObject, ...B$5(t) }), U$6.lazycreate = (e, t) => new U$6({ shape: e, unknownKeys: `strip`, catchall: H$6.create(), typeName: q$5.ZodObject, ...B$5(t) }); var ic = class extends V$5 { _parse(e) { let { ctx: t } = this._processInputParams(e), n = this._def.options; function r(e) { for (let t of e) if (t.result.status === `valid`) return t.result; for (let n of e) if (n.result.status === `dirty`) return t.common.issues.push(...n.ctx.common.issues), n.result; let n = e.map((e) => new N$5(e.ctx.common.issues)); return P$5(t, { code: M$5.invalid_union, unionErrors: n }), I$5; } if (t.common.async) return Promise.all(n.map(async (e) => { let n = { ...t, common: { ...t.common, issues: [] }, parent: null }; return { result: await e._parseAsync({ data: t.data, path: t.path, parent: n }), ctx: n }; })).then(r); { let e, r = []; for (let i of n) { let n = { ...t, common: { ...t.common, issues: [] }, parent: null }, a = i._parseSync({ data: t.data, path: t.path, parent: n }); if (a.status === `valid`) return a; a.status === `dirty` && !e && (e = { result: a, ctx: n }), n.common.issues.length && r.push(n.common.issues); } if (e) return t.common.issues.push(...e.ctx.common.issues), e.result; let i = r.map((e) => new N$5(e)); return P$5(t, { code: M$5.invalid_union, unionErrors: i }), I$5; } } get options() { return this._def.options; } }; ic.create = (e, t) => new ic({ options: e, typeName: q$5.ZodUnion, ...B$5(t) }); const W$6 = (e) => e instanceof pc ? W$6(e.schema) : e instanceof G$6 ? W$6(e.innerType()) : e instanceof mc ? [e.value] : e instanceof gc ? e.options : e instanceof _c ? k$6.objectValues(e.enum) : e instanceof bc ? W$6(e._def.innerType) : e instanceof Zs ? [void 0] : e instanceof Qs ? [null] : e instanceof K$5 ? [void 0, ...W$6(e.unwrap())] : e instanceof yc ? [null, ...W$6(e.unwrap())] : e instanceof Cc || e instanceof Tc ? W$6(e.unwrap()) : e instanceof xc ? W$6(e._def.innerType) : []; var ac = class e extends V$5 { _parse(e) { let { ctx: t } = this._processInputParams(e); if (t.parsedType !== A$5.object) return P$5(t, { code: M$5.invalid_type, expected: A$5.object, received: t.parsedType }), I$5; let n = this.discriminator, r = t.data[n], i = this.optionsMap.get(r); return i ? t.common.async ? i._parseAsync({ data: t.data, path: t.path, parent: t }) : i._parseSync({ data: t.data, path: t.path, parent: t }) : (P$5(t, { code: M$5.invalid_union_discriminator, options: Array.from(this.optionsMap.keys()), path: [n] }), I$5); } get discriminator() { return this._def.discriminator; } get options() { return this._def.options; } get optionsMap() { return this._def.optionsMap; } static create(t, n, r) { let i = /* @__PURE__ */ new Map(); for (let e of n) { let n = W$6(e.shape[t]); if (!n.length) throw Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`); for (let r of n) { if (i.has(r)) throw Error(`Discriminator property ${String(t)} has duplicate value ${String(r)}`); i.set(r, e); } } return new e({ typeName: q$5.ZodDiscriminatedUnion, discriminator: t, options: n, optionsMap: i, ...B$5(r) }); } }; function oc(e, t) { let n = j$5(e), r = j$5(t); if (e === t) return { valid: !0, data: e }; if (n === A$5.object && r === A$5.object) { let n = k$6.objectKeys(t), r = k$6.objectKeys(e).filter((e) => n.indexOf(e) !== -1), i = { ...e, ...t }; for (let n of r) { let r = oc(e[n], t[n]); if (!r.valid) return { valid: !1 }; i[n] = r.data; } return { valid: !0, data: i }; } else if (n === A$5.array && r === A$5.array) { if (e.length !== t.length) return { valid: !1 }; let n = []; for (let r = 0; r < e.length; r++) { let i = e[r], a = t[r], o = oc(i, a); if (!o.valid) return { valid: !1 }; n.push(o.data); } return { valid: !0, data: n }; } else if (n === A$5.date && r === A$5.date && +e == +t) return { valid: !0, data: e }; else return { valid: !1 }; } var sc = class extends V$5 { _parse(e) { let { status: t, ctx: n } = this._processInputParams(e), r = (e, r) => { if (gs(e) || gs(r)) return I$5; let i = oc(e.value, r.value); return i.valid ? ((_s(e) || _s(r)) && t.dirty(), { status: t.value, value: i.data }) : (P$5(n, { code: M$5.invalid_intersection_types }), I$5); }; return n.common.async ? Promise.all([this._def.left._parseAsync({ data: n.data, path: n.path, parent: n }), this._def.right._parseAsync({ data: n.data, path: n.path, parent: n })]).then(([e, t]) => r(e, t)) : r(this._def.left._parseSync({ data: n.data, path: n.path, parent: n }), this._def.right._parseSync({ data: n.data, path: n.path, parent: n })); } }; sc.create = (e, t, n) => new sc({ left: e, right: t, typeName: q$5.ZodIntersection, ...B$5(n) }); var cc = class e extends V$5 { _parse(e) { let { status: t, ctx: n } = this._processInputParams(e); if (n.parsedType !== A$5.array) return P$5(n, { code: M$5.invalid_type, expected: A$5.array, received: n.parsedType }), I$5; if (n.data.length < this._def.items.length) return P$5(n, { code: M$5.too_small, minimum: this._def.items.length, inclusive: !0, exact: !1, type: `array` }), I$5; !this._def.rest && n.data.length > this._def.items.length && (P$5(n, { code: M$5.too_big, maximum: this._def.items.length, inclusive: !0, exact: !1, type: `array` }), t.dirty()); let r = [...n.data].map((e, t) => { let r = this._def.items[t] || this._def.rest; return r ? r._parse(new z$5(n, e, n.path, t)) : null; }).filter((e) => !!e); return n.common.async ? Promise.all(r).then((e) => F$5.mergeArray(t, e)) : F$5.mergeArray(t, r); } get items() { return this._def.items; } rest(t) { return new e({ ...this._def, rest: t }); } }; cc.create = (e, t) => { if (!Array.isArray(e)) throw Error(`You must pass an array of schemas to z.tuple([ ... ])`); return new cc({ items: e, typeName: q$5.ZodTuple, rest: null, ...B$5(t) }); }; var lc = class e extends V$5 { get keySchema() { return this._def.keyType; } get valueSchema() { return this._def.valueType; } _parse(e) { let { status: t, ctx: n } = this._processInputParams(e); if (n.parsedType !== A$5.object) return P$5(n, { code: M$5.invalid_type, expected: A$5.object, received: n.parsedType }), I$5; let r = [], i = this._def.keyType, a = this._def.valueType; for (let e in n.data) r.push({ key: i._parse(new z$5(n, e, n.path, e)), value: a._parse(new z$5(n, n.data[e], n.path, e)), alwaysSet: e in n.data }); return n.common.async ? F$5.mergeObjectAsync(t, r) : F$5.mergeObjectSync(t, r); } get element() { return this._def.valueType; } static create(t, n, r) { return n instanceof V$5 ? new e({ keyType: t, valueType: n, typeName: q$5.ZodRecord, ...B$5(r) }) : new e({ keyType: Ws.create(), valueType: t, typeName: q$5.ZodRecord, ...B$5(n) }); } }; var uc = class extends V$5 { get keySchema() { return this._def.keyType; } get valueSchema() { return this._def.valueType; } _parse(e) { let { status: t, ctx: n } = this._processInputParams(e); if (n.parsedType !== A$5.map) return P$5(n, { code: M$5.invalid_type, expected: A$5.map, received: n.parsedType }), I$5; let r = this._def.keyType, i = this._def.valueType, a = [...n.data.entries()].map(([e, t], a) => ({ key: r._parse(new z$5(n, e, n.path, [a, `key`])), value: i._parse(new z$5(n, t, n.path, [a, `value`])) })); if (n.common.async) { let e = /* @__PURE__ */ new Map(); return Promise.resolve().then(async () => { for (let n of a) { let r = await n.key, i = await n.value; if (r.status === `aborted` || i.status === `aborted`) return I$5; (r.status === `dirty` || i.status === `dirty`) && t.dirty(), e.set(r.value, i.value); } return { status: t.value, value: e }; }); } else { let e = /* @__PURE__ */ new Map(); for (let n of a) { let r = n.key, i = n.value; if (r.status === `aborted` || i.status === `aborted`) return I$5; (r.status === `dirty` || i.status === `dirty`) && t.dirty(), e.set(r.value, i.value); } return { status: t.value, value: e }; } } }; uc.create = (e, t, n) => new uc({ valueType: t, keyType: e, typeName: q$5.ZodMap, ...B$5(n) }); var dc = class e extends V$5 { _parse(e) { let { status: t, ctx: n } = this._processInputParams(e); if (n.parsedType !== A$5.set) return P$5(n, { code: M$5.invalid_type, expected: A$5.set, received: n.parsedType }), I$5; let r = this._def; r.minSize !== null && n.data.size < r.minSize.value && (P$5(n, { code: M$5.too_small, minimum: r.minSize.value, type: `set`, inclusive: !0, exact: !1, message: r.minSize.message }), t.dirty()), r.maxSize !== null && n.data.size > r.maxSize.value && (P$5(n, { code: M$5.too_big, maximum: r.maxSize.value, type: `set`, inclusive: !0, exact: !1, message: r.maxSize.message }), t.dirty()); let i = this._def.valueType; function a(e) { let n = /* @__PURE__ */ new Set(); for (let r of e) { if (r.status === `aborted`) return I$5; r.status === `dirty` && t.dirty(), n.add(r.value); } return { status: t.value, value: n }; } let o = [...n.data.values()].map((e, t) => i._parse(new z$5(n, e, n.path, t))); return n.common.async ? Promise.all(o).then((e) => a(e)) : a(o); } min(t, n) { return new e({ ...this._def, minSize: { value: t, message: R$5.toString(n) } }); } max(t, n) { return new e({ ...this._def, maxSize: { value: t, message: R$5.toString(n) } }); } size(e, t) { return this.min(e, t).max(e, t); } nonempty(e) { return this.min(1, e); } }; dc.create = (e, t) => new dc({ valueType: e, minSize: null, maxSize: null, typeName: q$5.ZodSet, ...B$5(t) }); var fc = class e extends V$5 { constructor() { super(...arguments), this.validate = this.implement; } _parse(e) { let { ctx: t } = this._processInputParams(e); if (t.parsedType !== A$5.function) return P$5(t, { code: M$5.invalid_type, expected: A$5.function, received: t.parsedType }), I$5; function n(e, n) { return ms({ data: e, path: t.path, errorMaps: [ t.common.contextualErrorMap, t.schemaErrorMap, ps(), ds ].filter((e) => !!e), issueData: { code: M$5.invalid_arguments, argumentsError: n } }); } function r(e, n) { return ms({ data: e, path: t.path, errorMaps: [ t.common.contextualErrorMap, t.schemaErrorMap, ps(), ds ].filter((e) => !!e), issueData: { code: M$5.invalid_return_type, returnTypeError: n } }); } let i = { errorMap: t.common.contextualErrorMap }, a = t.data; if (this._def.returns instanceof vc) { let e = this; return L$5(async function(...t) { let o = new N$5([]), s = await e._def.args.parseAsync(t, i).catch((e) => { throw o.addIssue(n(t, e)), o; }), c = await Reflect.apply(a, this, s); return await e._def.returns._def.type.parseAsync(c, i).catch((e) => { throw o.addIssue(r(c, e)), o; }); }); } else { let e = this; return L$5(function(...t) { let o = e._def.args.safeParse(t, i); if (!o.success) throw new N$5([n(t, o.error)]); let s = Reflect.apply(a, this, o.data), c = e._def.returns.safeParse(s, i); if (!c.success) throw new N$5([r(s, c.error)]); return c.data; }); } } parameters() { return this._def.args; } returnType() { return this._def.returns; } args(...t) { return new e({ ...this._def, args: cc.create(t).rest(ec.create()) }); } returns(t) { return new e({ ...this._def, returns: t }); } implement(e) { return this.parse(e); } strictImplement(e) { return this.parse(e); } static create(t, n, r) { return new e({ args: t || cc.create([]).rest(ec.create()), returns: n || ec.create(), typeName: q$5.ZodFunction, ...B$5(r) }); } }; var pc = class extends V$5 { get schema() { return this._def.getter(); } _parse(e) { let { ctx: t } = this._processInputParams(e); return this._def.getter()._parse({ data: t.data, path: t.path, parent: t }); } }; pc.create = (e, t) => new pc({ getter: e, typeName: q$5.ZodLazy, ...B$5(t) }); var mc = class extends V$5 { _parse(e) { if (e.data !== this._def.value) { let t = this._getOrReturnCtx(e); return P$5(t, { received: t.data, code: M$5.invalid_literal, expected: this._def.value }), I$5; } return { status: `valid`, value: e.data }; } get value() { return this._def.value; } }; mc.create = (e, t) => new mc({ value: e, typeName: q$5.ZodLiteral, ...B$5(t) }); function hc(e, t) { return new gc({ values: e, typeName: q$5.ZodEnum, ...B$5(t) }); } var gc = class e extends V$5 { _parse(e) { if (typeof e.data != `string`) { let t = this._getOrReturnCtx(e), n = this._def.values; return P$5(t, { expected: k$6.joinValues(n), received: t.parsedType, code: M$5.invalid_type }), I$5; } if (this._cache ||= new Set(this._def.values), !this._cache.has(e.data)) { let t = this._getOrReturnCtx(e), n = this._def.values; return P$5(t, { received: t.data, code: M$5.invalid_enum_value, options: n }), I$5; } return L$5(e.data); } get options() { return this._def.values; } get enum() { let e = {}; for (let t of this._def.values) e[t] = t; return e; } get Values() { let e = {}; for (let t of this._def.values) e[t] = t; return e; } get Enum() { let e = {}; for (let t of this._def.values) e[t] = t; return e; } extract(t, n = this._def) { return e.create(t, { ...this._def, ...n }); } exclude(t, n = this._def) { return e.create(this.options.filter((e) => !t.includes(e)), { ...this._def, ...n }); } }; gc.create = hc; var _c = class extends V$5 { _parse(e) { let t = k$6.getValidEnumValues(this._def.values), n = this._getOrReturnCtx(e); if (n.parsedType !== A$5.string && n.parsedType !== A$5.number) { let e = k$6.objectValues(t); return P$5(n, { expected: k$6.joinValues(e), received: n.parsedType, code: M$5.invalid_type }), I$5; } if (this._cache ||= new Set(k$6.getValidEnumValues(this._def.values)), !this._cache.has(e.data)) { let e = k$6.objectValues(t); return P$5(n, { received: n.data, code: M$5.invalid_enum_value, options: e }), I$5; } return L$5(e.data); } get enum() { return this._def.values; } }; _c.create = (e, t) => new _c({ values: e, typeName: q$5.ZodNativeEnum, ...B$5(t) }); var vc = class extends V$5 { unwrap() { return this._def.type; } _parse(e) { let { ctx: t } = this._processInputParams(e); return t.parsedType !== A$5.promise && t.common.async === !1 ? (P$5(t, { code: M$5.invalid_type, expected: A$5.promise, received: t.parsedType }), I$5) : L$5((t.parsedType === A$5.promise ? t.data : Promise.resolve(t.data)).then((e) => this._def.type.parseAsync(e, { path: t.path, errorMap: t.common.contextualErrorMap }))); } }; vc.create = (e, t) => new vc({ type: e, typeName: q$5.ZodPromise, ...B$5(t) }); var G$6 = class extends V$5 { innerType() { return this._def.schema; } sourceType() { return this._def.schema._def.typeName === q$5.ZodEffects ? this._def.schema.sourceType() : this._def.schema; } _parse(e) { let { status: t, ctx: n } = this._processInputParams(e), r = this._def.effect || null, i = { addIssue: (e) => { P$5(n, e), e.fatal ? t.abort() : t.dirty(); }, get path() { return n.path; } }; if (i.addIssue = i.addIssue.bind(i), r.type === `preprocess`) { let e = r.transform(n.data, i); if (n.common.async) return Promise.resolve(e).then(async (e) => { if (t.value === `aborted`) return I$5; let r = await this._def.schema._parseAsync({ data: e, path: n.path, parent: n }); return r.status === `aborted` ? I$5 : r.status === `dirty` || t.value === `dirty` ? hs(r.value) : r; }); { if (t.value === `aborted`) return I$5; let r = this._def.schema._parseSync({ data: e, path: n.path, parent: n }); return r.status === `aborted` ? I$5 : r.status === `dirty` || t.value === `dirty` ? hs(r.value) : r; } } if (r.type === `refinement`) { let e = (e) => { let t = r.refinement(e, i); if (n.common.async) return Promise.resolve(t); if (t instanceof Promise) throw Error(`Async refinement encountered during synchronous parse operation. Use .parseAsync instead.`); return e; }; if (n.common.async === !1) { let r = this._def.schema._parseSync({ data: n.data, path: n.path, parent: n }); return r.status === `aborted` ? I$5 : (r.status === `dirty` && t.dirty(), e(r.value), { status: t.value, value: r.value }); } else return this._def.schema._parseAsync({ data: n.data, path: n.path, parent: n }).then((n) => n.status === `aborted` ? I$5 : (n.status === `dirty` && t.dirty(), e(n.value).then(() => ({ status: t.value, value: n.value })))); } if (r.type === `transform`) if (n.common.async === !1) { let e = this._def.schema._parseSync({ data: n.data, path: n.path, parent: n }); if (!vs(e)) return I$5; let a = r.transform(e.value, i); if (a instanceof Promise) throw Error(`Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.`); return { status: t.value, value: a }; } else return this._def.schema._parseAsync({ data: n.data, path: n.path, parent: n }).then((e) => vs(e) ? Promise.resolve(r.transform(e.value, i)).then((e) => ({ status: t.value, value: e })) : I$5); k$6.assertNever(r); } }; G$6.create = (e, t, n) => new G$6({ schema: e, typeName: q$5.ZodEffects, effect: t, ...B$5(n) }), G$6.createWithPreprocess = (e, t, n) => new G$6({ schema: t, effect: { type: `preprocess`, transform: e }, typeName: q$5.ZodEffects, ...B$5(n) }); var K$5 = class extends V$5 { _parse(e) { return this._getType(e) === A$5.undefined ? L$5(void 0) : this._def.innerType._parse(e); } unwrap() { return this._def.innerType; } }; K$5.create = (e, t) => new K$5({ innerType: e, typeName: q$5.ZodOptional, ...B$5(t) }); var yc = class extends V$5 { _parse(e) { return this._getType(e) === A$5.null ? L$5(null) : this._def.innerType._parse(e); } unwrap() { return this._def.innerType; } }; yc.create = (e, t) => new yc({ innerType: e, typeName: q$5.ZodNullable, ...B$5(t) }); var bc = class extends V$5 { _parse(e) { let { ctx: t } = this._processInputParams(e), n = t.data; return t.parsedType === A$5.undefined && (n = this._def.defaultValue()), this._def.innerType._parse({ data: n, path: t.path, parent: t }); } removeDefault() { return this._def.innerType; } }; bc.create = (e, t) => new bc({ innerType: e, typeName: q$5.ZodDefault, defaultValue: typeof t.default == `function` ? t.default : () => t.default, ...B$5(t) }); var xc = class extends V$5 { _parse(e) { let { ctx: t } = this._processInputParams(e), n = { ...t, common: { ...t.common, issues: [] } }, r = this._def.innerType._parse({ data: n.data, path: n.path, parent: { ...n } }); return ys(r) ? r.then((e) => ({ status: `valid`, value: e.status === `valid` ? e.value : this._def.catchValue({ get error() { return new N$5(n.common.issues); }, input: n.data }) })) : { status: `valid`, value: r.status === `valid` ? r.value : this._def.catchValue({ get error() { return new N$5(n.common.issues); }, input: n.data }) }; } removeCatch() { return this._def.innerType; } }; xc.create = (e, t) => new xc({ innerType: e, typeName: q$5.ZodCatch, catchValue: typeof t.catch == `function` ? t.catch : () => t.catch, ...B$5(t) }); var Sc = class extends V$5 { _parse(e) { if (this._getType(e) !== A$5.nan) { let t = this._getOrReturnCtx(e); return P$5(t, { code: M$5.invalid_type, expected: A$5.nan, received: t.parsedType }), I$5; } return { status: `valid`, value: e.data }; } }; Sc.create = (e) => new Sc({ typeName: q$5.ZodNaN, ...B$5(e) }); var Cc = class extends V$5 { _parse(e) { let { ctx: t } = this._processInputParams(e), n = t.data; return this._def.type._parse({ data: n, path: t.path, parent: t }); } unwrap() { return this._def.type; } }; var wc = class e extends V$5 { _parse(e) { let { status: t, ctx: n } = this._processInputParams(e); if (n.common.async) return (async () => { let e = await this._def.in._parseAsync({ data: n.data, path: n.path, parent: n }); return e.status === `aborted` ? I$5 : e.status === `dirty` ? (t.dirty(), hs(e.value)) : this._def.out._parseAsync({ data: e.value, path: n.path, parent: n }); })(); { let e = this._def.in._parseSync({ data: n.data, path: n.path, parent: n }); return e.status === `aborted` ? I$5 : e.status === `dirty` ? (t.dirty(), { status: `dirty`, value: e.value }) : this._def.out._parseSync({ data: e.value, path: n.path, parent: n }); } } static create(t, n) { return new e({ in: t, out: n, typeName: q$5.ZodPipeline }); } }; var Tc = class extends V$5 { _parse(e) { let t = this._def.innerType._parse(e), n = (e) => (vs(e) && (e.value = Object.freeze(e.value)), e); return ys(t) ? t.then((e) => n(e)) : n(t); } unwrap() { return this._def.innerType; } }; Tc.create = (e, t) => new Tc({ innerType: e, typeName: q$5.ZodReadonly, ...B$5(t) }), U$6.lazycreate; var q$5; (function(e) { e.ZodString = `ZodString`, e.ZodNumber = `ZodNumber`, e.ZodNaN = `ZodNaN`, e.ZodBigInt = `ZodBigInt`, e.ZodBoolean = `ZodBoolean`, e.ZodDate = `ZodDate`, e.ZodSymbol = `ZodSymbol`, e.ZodUndefined = `ZodUndefined`, e.ZodNull = `ZodNull`, e.ZodAny = `ZodAny`, e.ZodUnknown = `ZodUnknown`, e.ZodNever = `ZodNever`, e.ZodVoid = `ZodVoid`, e.ZodArray = `ZodArray`, e.ZodObject = `ZodObject`, e.ZodUnion = `ZodUnion`, e.ZodDiscriminatedUnion = `ZodDiscriminatedUnion`, e.ZodIntersection = `ZodIntersection`, e.ZodTuple = `ZodTuple`, e.ZodRecord = `ZodRecord`, e.ZodMap = `ZodMap`, e.ZodSet = `ZodSet`, e.ZodFunction = `ZodFunction`, e.ZodLazy = `ZodLazy`, e.ZodLiteral = `ZodLiteral`, e.ZodEnum = `ZodEnum`, e.ZodEffects = `ZodEffects`, e.ZodNativeEnum = `ZodNativeEnum`, e.ZodOptional = `ZodOptional`, e.ZodNullable = `ZodNullable`, e.ZodDefault = `ZodDefault`, e.ZodCatch = `ZodCatch`, e.ZodPromise = `ZodPromise`, e.ZodBranded = `ZodBranded`, e.ZodPipeline = `ZodPipeline`, e.ZodReadonly = `ZodReadonly`; })(q$5 ||= {}), Ws.create, Ks.create, Sc.create, qs.create, Js.create, Ys.create, Xs.create, Zs.create, Qs.create, $s.create, ec.create, H$6.create, tc.create, nc.create, U$6.create, U$6.strictCreate, ic.create, ac.create, sc.create, cc.create, lc.create, uc.create, dc.create, fc.create, pc.create, mc.create, gc.create, _c.create, vc.create, G$6.create, K$5.create, yc.create, G$6.createWithPreprocess, wc.create; var Ec = class extends Error { constructor(e, t) { super(e), this.name = `ParseError`, this.type = t.type, this.field = t.field, this.value = t.value, this.line = t.line; } }; function Dc(e) {} function Oc(e) { if (typeof e == `function`) throw TypeError("`callbacks` must be an object, got a function instead. Did you mean `{onEvent: fn}`?"); let { onEvent: t = Dc, onError: n = Dc, onRetry: r = Dc, onComment: i } = e, a = [], o = !0, s, c = ``, l = 0, u; function d(e) { if (o && (o = !1, e.charCodeAt(0) === 239 && e.charCodeAt(1) === 187 && e.charCodeAt(2) === 191 && (e = e.slice(3))), a.length === 0) { let t = f(e); t !== `` && a.push(t); return; } if (e.indexOf(` `) === -1 && e.indexOf(`\r`) === -1) { a.push(e); return; } a.push(e); let t = a.join(``); a.length = 0; let n = f(t); n !== `` && a.push(n); } function f(e) { let n = 0; if (e.indexOf(`\r`) === -1) { let r = e.indexOf(` `, n); for (; r !== -1;) { if (n === r) { l > 0 && t({ id: s, event: u, data: c }), s = void 0, c = ``, l = 0, u = void 0, n = r + 1, r = e.indexOf(` `, n); continue; } let i = e.charCodeAt(n); if (kc(e, n, i)) { let i = e.charCodeAt(n + 5) === 32 ? n + 6 : n + 5, a = e.slice(i, r); if (l === 0 && e.charCodeAt(r + 1) === 10) { t({ id: s, event: u, data: a }), s = void 0, c = ``, u = void 0, n = r + 2, r = e.indexOf(` `, n); continue; } c = l === 0 ? a : `${c} ${a}`, l++; } else Ac(e, n, i) ? u = e.slice(e.charCodeAt(n + 6) === 32 ? n + 7 : n + 6, r) || void 0 : p(e, n, r); n = r + 1, r = e.indexOf(` `, n); } return e.slice(n); } for (; n < e.length;) { let t = e.indexOf(`\r`, n), r = e.indexOf(` `, n), i = -1; if (t !== -1 && r !== -1 ? i = t < r ? t : r : t === -1 ? r !== -1 && (i = r) : i = t === e.length - 1 ? -1 : t, i === -1) break; p(e, n, i), n = i + 1, e.charCodeAt(n - 1) === 13 && e.charCodeAt(n) === 10 && n++; } return e.slice(n); } function p(e, t, n) { if (t === n) { te(); return; } let r = e.charCodeAt(t); if (kc(e, t, r)) { let r = e.charCodeAt(t + 5) === 32 ? t + 6 : t + 5, i = e.slice(r, n); c = l === 0 ? i : `${c} ${i}`, l++; return; } if (Ac(e, t, r)) { u = e.slice(e.charCodeAt(t + 6) === 32 ? t + 7 : t + 6, n) || void 0; return; } if (r === 105 && e.charCodeAt(t + 1) === 100 && e.charCodeAt(t + 2) === 58) { let r = e.slice(e.charCodeAt(t + 3) === 32 ? t + 4 : t + 3, n); s = r.includes(`\0`) ? void 0 : r; return; } if (r === 58) { i && i(e.slice(t, n).slice(e.charCodeAt(t + 1) === 32 ? 2 : 1)); return; } let a = e.slice(t, n), o = a.indexOf(`:`); if (o === -1) { ee(a, ``, a); return; } let d = a.slice(0, o), f = a.charCodeAt(o + 1) === 32 ? 2 : 1; ee(d, a.slice(o + f), a); } function ee(e, t, i) { switch (e) { case `event`: u = t || void 0; break; case `data`: c = l === 0 ? t : `${c} ${t}`, l++; break; case `id`: s = t.includes(`\0`) ? void 0 : t; break; case `retry`: /^\d+$/.test(t) ? r(parseInt(t, 10)) : n(new Ec(`Invalid \`retry\` value: "${t}"`, { type: `invalid-retry`, value: t, line: i })); break; default: n(new Ec(`Unknown field "${e.length > 20 ? `${e.slice(0, 20)}\u2026` : e}"`, { type: `unknown-field`, field: e, value: t, line: i })); break; } } function te() { l > 0 && t({ id: s, event: u, data: c }), s = void 0, c = ``, l = 0, u = void 0; } function m(e = {}) { if (e.consume && a.length > 0) { let e = a.join(``); p(e, 0, e.length); } o = !0, s = void 0, c = ``, l = 0, u = void 0, a.length = 0; } return { feed: d, reset: m }; } function kc(e, t, n) { return n === 100 && e.charCodeAt(t + 1) === 97 && e.charCodeAt(t + 2) === 116 && e.charCodeAt(t + 3) === 97 && e.charCodeAt(t + 4) === 58; } function Ac(e, t, n) { return n === 101 && e.charCodeAt(t + 1) === 118 && e.charCodeAt(t + 2) === 101 && e.charCodeAt(t + 3) === 110 && e.charCodeAt(t + 4) === 116 && e.charCodeAt(t + 5) === 58; } var jc = class extends TransformStream { constructor({ onError: e, onRetry: t, onComment: n } = {}) { let r; super({ start(i) { r = Oc({ onEvent: (e) => { i.enqueue(e); }, onError(t) { e === `terminate` ? i.error(t) : typeof e == `function` && e(t); }, onRetry: t, onComment: n }); }, transform(e) { r.feed(e); } }); } }; const Mc = Symbol.for(`workflow-serialize`); const Nc = Symbol.for(`workflow-deserialize`); function Pc(...e) { return e.reduce((e, t) => ({ ...e, ...t ?? {} }), {}); } var { btoa: Fc, atob: Ic } = globalThis; function Lc(e) { let t = Ic(e.replace(/-/g, `+`).replace(/_/g, `/`)); return Uint8Array.from(t, (e) => e.codePointAt(0)); } function Rc(e) { let t = ``; for (let n = 0; n < e.length; n++) t += String.fromCodePoint(e[n]); return Fc(t); } function zc(e) { return e instanceof Uint8Array ? Rc(e) : e; } function Bc(e) { return e.type === `text` ? new TextEncoder().encode(e.text) : e.data instanceof Uint8Array ? e.data : e.data instanceof ArrayBuffer ? new Uint8Array(e.data) : Lc(e.data); } function Vc(e, t = {}) { let { useArrayBrackets: n = !0 } = t, r = new FormData(); for (let [t, i] of Object.entries(e)) if (i != null) { if (Array.isArray(i)) { if (i.length === 1) { r.append(t, i[0]); continue; } let e = n ? `${t}[]` : t; for (let t of i) r.append(e, t); continue; } r.append(t, i); } return r; } function Hc({ tools: e = [], providerToolNames: t }) { let n = {}, r = {}; for (let i of e) if (i.type === `provider` && i.id in t) { let e = t[i.id]; n[i.name] = e, r[e] = i.name; } return { toProviderToolName: (e) => n[e] ?? e, toCustomToolName: (e) => r[e] ?? e }; } async function Uc(e, t) { if (e == null) return Promise.resolve(); let n = t?.abortSignal; return new Promise((t, r) => { if (n?.aborted) { r(Wc()); return; } let i = setTimeout(() => { a(), t(); }, e), a = () => { clearTimeout(i), n?.removeEventListener(`abort`, o); }, o = () => { a(), r(Wc()); }; n?.addEventListener(`abort`, o); }); } function Wc() { return new DOMException(`Delay was aborted`, `AbortError`); } var Gc = [ { mediaType: `image/gif`, bytesPrefix: [ 71, 73, 70 ] }, { mediaType: `image/png`, bytesPrefix: [ 137, 80, 78, 71 ] }, { mediaType: `image/jpeg`, bytesPrefix: [255, 216] }, { mediaType: `image/webp`, bytesPrefix: [ 82, 73, 70, 70, null, null, null, null, 87, 69, 66, 80 ] }, { mediaType: `image/bmp`, bytesPrefix: [66, 77] }, { mediaType: `image/tiff`, bytesPrefix: [ 73, 73, 42, 0 ] }, { mediaType: `image/tiff`, bytesPrefix: [ 77, 77, 0, 42 ] }, { mediaType: `image/avif`, bytesPrefix: [ 0, 0, 0, 32, 102, 116, 121, 112, 97, 118, 105, 102 ] }, { mediaType: `image/heic`, bytesPrefix: [ 0, 0, 0, 32, 102, 116, 121, 112, 104, 101, 105, 99 ] } ]; var Kc = [{ mediaType: `application/pdf`, bytesPrefix: [ 37, 80, 68, 70 ] }]; var qc = [ { mediaType: `audio/mpeg`, bytesPrefix: [255, 251] }, { mediaType: `audio/mpeg`, bytesPrefix: [255, 250] }, { mediaType: `audio/mpeg`, bytesPrefix: [255, 243] }, { mediaType: `audio/mpeg`, bytesPrefix: [255, 242] }, { mediaType: `audio/mpeg`, bytesPrefix: [255, 227] }, { mediaType: `audio/mpeg`, bytesPrefix: [255, 226] }, { mediaType: `audio/wav`, bytesPrefix: [ 82, 73, 70, 70, null, null, null, null, 87, 65, 86, 69 ] }, { mediaType: `audio/ogg`, bytesPrefix: [ 79, 103, 103, 83 ] }, { mediaType: `audio/flac`, bytesPrefix: [ 102, 76, 97, 67 ] }, { mediaType: `audio/aac`, bytesPrefix: [ 64, 21, 0, 0 ] }, { mediaType: `audio/mp4`, bytesPrefix: [ 102, 116, 121, 112 ] }, { mediaType: `audio/webm`, bytesPrefix: [ 26, 69, 223, 163 ] } ]; var Jc = [ { mediaType: `video/mp4`, bytesPrefix: [ 0, 0, 0, null, 102, 116, 121, 112 ] }, { mediaType: `video/webm`, bytesPrefix: [ 26, 69, 223, 163 ] }, { mediaType: `video/quicktime`, bytesPrefix: [ 0, 0, 0, 20, 102, 116, 121, 112, 113, 116 ] }, { mediaType: `video/x-msvideo`, bytesPrefix: [ 82, 73, 70, 70 ] } ]; var Yc = (e) => { let t = typeof e == `string` ? Lc(e) : e, n = (t[6] & 127) << 21 | (t[7] & 127) << 14 | (t[8] & 127) << 7 | t[9] & 127; return t.slice(n + 10); }; function Xc(e) { return typeof e == `string` && e.startsWith(`SUQz`) || typeof e != `string` && e.length > 10 && e[0] === 73 && e[1] === 68 && e[2] === 51 ? Yc(e) : e; } function Zc({ data: e, signatures: t }) { let n = Xc(e), r = typeof n == `string` ? Lc(n.substring(0, Math.min(n.length, 24))) : n; for (let e of t) if (r.length >= e.bytesPrefix.length && e.bytesPrefix.every((e, t) => e === null || r[t] === e)) return e.mediaType; } var Qc = { image: Gc, audio: qc, video: Jc, application: Kc }; function $c({ data: e, topLevelType: t }) { if (t === void 0) return Zc({ data: e, signatures: [ ...Gc, ...Kc, ...qc, ...Jc ] }); let n = Qc[t]; if (n !== void 0) return Zc({ data: e, signatures: n }); } function el(e) { let t = e.indexOf(`/`); return t === -1 ? e : e.substring(0, t); } function tl(e) { let t = e.indexOf(`/`); if (t === -1) return !1; let n = e.substring(t + 1); return n.length > 0 && n !== `*`; } async function nl(e) { try { await e.body?.cancel(); } catch {} } var rl = `AI_DownloadError`; var il = `vercel.ai.error.${rl}`; var al = Symbol.for(il); var ol; var sl; var J$5 = class extends (sl = i$17, ol = al, sl) { constructor({ url: e, statusCode: t, statusText: n, cause: r, message: i = r == null ? `Failed to download ${e}: ${t} ${n}` : `Failed to download ${e}: ${r}` }) { super({ name: rl, message: i, cause: r }), this[ol] = !0, this.url = e, this.statusCode = t, this.statusText = n; } static isInstance(t) { return i$17.hasMarker(t, il); } }; function cl(e = globalThis) { return e.window != null; } function ll(e) { let t; try { t = new URL(e); } catch { throw new J$5({ url: e, message: `Invalid URL: ${e}` }); } if (t.protocol === `data:`) return; if (t.protocol !== `http:` && t.protocol !== `https:`) throw new J$5({ url: e, message: `URL scheme must be http, https, or data, got ${t.protocol}` }); let n = t.hostname.toLowerCase().replace(/\.+$/, ``); if (!n) throw new J$5({ url: e, message: `URL must have a hostname` }); if (n === `localhost` || n.endsWith(`.local`) || n.endsWith(`.localhost`)) throw new J$5({ url: e, message: `URL with hostname ${n} is not allowed` }); if (n.startsWith(`[`) && n.endsWith(`]`)) { if (pl(n.slice(1, -1))) throw new J$5({ url: e, message: `URL with IPv6 address ${n} is not allowed` }); return; } if (ul(n)) { if (dl(n)) throw new J$5({ url: e, message: `URL with IP address ${n} is not allowed` }); return; } } function ul(e) { let t = e.split(`.`); return t.length === 4 ? t.every((e) => { let t = Number(e); return Number.isInteger(t) && t >= 0 && t <= 255 && String(t) === e; }) : !1; } function dl(e) { let [t, n, r] = e.split(`.`).map(Number); return t === 0 || t === 10 || t === 100 && n >= 64 && n <= 127 || t === 127 || t === 169 && n === 254 || t === 172 && n >= 16 && n <= 31 || t === 192 && n === 0 && r === 0 || t === 192 && n === 168 || t === 198 && (n === 18 || n === 19) || t >= 240; } function fl(e) { let t = e.toLowerCase(), n = t.indexOf(`%`); n !== -1 && (t = t.slice(0, n)); let r = t.split(`::`); if (r.length > 2) return null; let i = (e) => { if (e === ``) return []; let t = [], n = e.split(`:`); for (let e = 0; e < n.length; e++) { let r = n[e]; if (r.includes(`.`)) { if (e !== n.length - 1 || !ul(r)) return null; let [i, a, o, s] = r.split(`.`).map(Number); t.push(i << 8 | a, o << 8 | s); continue; } if (!/^[0-9a-f]{1,4}$/.test(r)) return null; t.push(parseInt(r, 16)); } return t; }, a = i(r[0]); if (a === null) return null; if (r.length === 2) { let e = i(r[1]); if (e === null) return null; let t = 8 - a.length - e.length; return t < 0 ? null : [ ...a, ...Array(t).fill(0), ...e ]; } return a.length === 8 ? a : null; } function pl(e) { let t = fl(e); if (t === null) return !0; let n = (e) => t.slice(0, e).every((e) => e === 0); return n(7) && (t[7] === 0 || t[7] === 1) || (t[0] & 65024) == 64512 || (t[0] & 65472) == 65152 || (t[0] & 65472) == 65216 || (t[0] & 65280) == 65280 ? !0 : n(6) || n(5) && t[5] === 65535 || n(4) && t[4] === 65535 && t[5] === 0 || t[0] === 100 && t[1] === 65435 && t[2] === 0 && t[3] === 0 && t[4] === 0 && t[5] === 0 || t[0] === 100 && t[1] === 65435 && t[2] === 1 ? dl(`${t[6] >> 8 & 255}.${t[6] & 255}.${t[7] >> 8 & 255}.${t[7] & 255}`) : !1; } var ml = 10; async function hl({ url: e, headers: t, abortSignal: n, maxRedirects: r = ml }) { let i = { signal: n }; t !== void 0 && (i.headers = t); let a = e; for (let t = 0; t <= r; t++) { ll(a); let t = await fetch(a, { ...i, redirect: `manual` }); if (t.type === `opaqueredirect`) { if (!cl()) throw new J$5({ url: e, message: `Redirect from ${a} could not be validated and was blocked` }); return await fetch(a, { ...i, redirect: `follow` }); } let n = t.headers.get(`location`); if (t.status >= 300 && t.status < 400 && n) { await nl(t), a = new URL(n, a).toString(); continue; } return t; } throw new J$5({ url: e, message: `Too many redirects (max ${r})` }); } var gl = 2 * 1024 * 1024 * 1024; async function _l({ response: e, url: t, maxBytes: n = gl }) { let r = e.headers.get(`content-length`); if (r != null) { let i = parseInt(r, 10); if (!isNaN(i) && i > n) throw await nl(e), new J$5({ url: t, message: `Download of ${t} exceeded maximum size of ${n} bytes (Content-Length: ${i}).` }); } let i = e.body; if (i == null) return /* @__PURE__ */ new Uint8Array(); let a = i.getReader(), o = [], s = 0; try { for (;;) { let { done: e, value: r } = await a.read(); if (e) break; if (s += r.length, s > n) throw new J$5({ url: t, message: `Download of ${t} exceeded maximum size of ${n} bytes.` }); o.push(r); } } finally { try { await a.cancel(); } finally { a.releaseLock(); } } let c = new Uint8Array(s), l = 0; for (let e of o) c.set(e, l), l += e.length; return c; } async function vl(e, t) { try { let n = await hl({ url: e, abortSignal: t?.abortSignal }); if (!n.ok) throw await nl(n), new J$5({ url: e, statusCode: n.status, statusText: n.statusText }); let r = await _l({ response: n, url: e, maxBytes: t?.maxBytes ?? gl }), i = n.headers.get(`content-type`) ?? void 0; return new Blob([r], i ? { type: i } : void 0); } catch (t) { throw J$5.isInstance(t) ? t : new J$5({ url: e, cause: t }); } } function yl(e) { return Object.fromEntries([...e.headers]); } var bl = (({ prefix: e, size: t = 16, alphabet: n = `0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz`, separator: i = `-` } = {}) => { let a = () => { let e = n.length, r = Array(t); for (let i = 0; i < t; i++) r[i] = n[Math.random() * e | 0]; return r.join(``); }; if (e == null) return a; if (n.includes(i)) throw new ae$10({ argument: `separator`, message: `The separator "${i}" must not be part of the alphabet "${n}".` }); return () => `${e}${i}${a()}`; })(); function xl(e) { return (e instanceof Error || e instanceof DOMException) && (e.name === `AbortError` || e.name === `ResponseAborted` || e.name === `TimeoutError`); } var Sl = [`fetch failed`, `failed to fetch`]; var Cl = [ `ConnectionRefused`, `ConnectionClosed`, `FailedToOpenSocket`, `ECONNRESET`, `ECONNREFUSED`, `ETIMEDOUT`, `EPIPE` ]; function wl(e) { if (!(e instanceof Error)) return !1; let t = e.code; return !!(typeof t == `string` && Cl.includes(t)); } function Tl({ error: e, url: n, requestBodyValues: r }) { if (xl(e)) return e; if (e instanceof TypeError && Sl.includes(e.message.toLowerCase())) { let i = e.cause; if (i != null) return new c$14({ message: `Cannot connect to API: ${i.message}`, cause: i, url: n, requestBodyValues: r, isRetryable: !0 }); } return wl(e) ? new c$14({ message: `Cannot connect to API: ${e.message}`, cause: e, url: n, requestBodyValues: r, isRetryable: !0 }) : e; } function El(e = globalThis) { return e.window ? `runtime/browser` : e.navigator?.userAgent ? `runtime/${e.navigator.userAgent.toLowerCase()}` : e.process?.versions?.node ? `runtime/node.js/${e.process.version.substring(0)}` : e.EdgeRuntime ? `runtime/vercel-edge` : `runtime/unknown`; } function Dl(e) { if (e == null) return {}; let t = {}; if (e instanceof Headers) e.forEach((e, n) => { t[n.toLowerCase()] = e; }); else { Array.isArray(e) || (e = Object.entries(e)); for (let [n, r] of e) r != null && (t[n.toLowerCase()] = r); } return t; } function Ol(e, ...t) { let n = new Headers(Dl(e)), r = n.get(`user-agent`) || ``; return n.set(`user-agent`, [r, ...t].filter(Boolean).join(` `)), Object.fromEntries(n.entries()); } var kl = `5.0.0`; var Al = () => globalThis.fetch; var jl = async ({ url: e, headers: n = {}, successfulResponseHandler: r, failedResponseHandler: i, abortSignal: a, fetch: o = Al() }) => { try { let s = await o(e, { method: `GET`, headers: Ol(n, `ai-sdk/provider-utils/${kl}`, El()), signal: a }), c = yl(s); if (!s.ok) { let n; try { n = await i({ response: s, url: e, requestBodyValues: {} }); } catch (n) { throw xl(n) || c$14.isInstance(n) ? n : new c$14({ message: `Failed to process error response`, cause: n, statusCode: s.status, url: e, responseHeaders: c, requestBodyValues: {} }); } throw n.value; } try { return await r({ response: s, url: e, requestBodyValues: {} }); } catch (n) { throw n instanceof Error && (xl(n) || c$14.isInstance(n)) ? n : new c$14({ message: `Failed to process successful response`, cause: n, statusCode: s.status, url: e, responseHeaders: c, requestBodyValues: {} }); } } catch (t) { throw Tl({ error: t, url: e, requestBodyValues: {} }); } }; function Ml(e, t) { try { return new URL(e).origin === new URL(t).origin; } catch { return !1; } } function Nl(e) { return e != null; } function Pl({ apiKey: e, environmentVariableName: t, apiKeyParameterName: n = `apiKey`, description: r }) { if (typeof e == `string`) return e; if (e != null) throw new pe$10({ message: `${r} API key must be a string.` }); if (typeof process > `u`) throw new pe$10({ message: `${r} API key is missing. Pass it using the '${n}' parameter. Environment variables are not supported in this environment.` }); if (e = process.env[t], e == null) throw new pe$10({ message: `${r} API key is missing. Pass it using the '${n}' parameter or the ${t} environment variable.` }); if (typeof e != `string`) throw new pe$10({ message: `${r} API key must be a string. The value of the ${t} environment variable is not a string.` }); return e; } function Fl({ settingValue: e, environmentVariableName: t }) { if (typeof e == `string` || !(e != null || typeof process > `u`) && (e = process.env[t], !(e == null || typeof e != `string`))) return e; } function Il(e) { return e !== void 0 && e !== `provider-default`; } function Ll({ reasoning: e, effortMap: t, warnings: n }) { let r = t[e]; if (r == null) { n.push({ type: `unsupported`, feature: `reasoning`, details: `reasoning "${e}" is not supported by this model.` }); return; } return r !== e && n.push({ type: `compatibility`, feature: `reasoning`, details: `reasoning "${e}" is not directly supported by this model. mapped to effort "${r}".` }), r; } var Rl = { minimal: .02, low: .1, medium: .3, high: .6, xhigh: .9 }; function zl({ reasoning: e, maxOutputTokens: t, maxReasoningBudget: n, minReasoningBudget: r = 1024, budgetPercentages: i = Rl, warnings: a }) { let o = i[e]; if (o == null) { a.push({ type: `unsupported`, feature: `reasoning`, details: `reasoning "${e}" is not supported by this model.` }); return; } return Math.min(n, Math.max(r, Math.round(t * o))); } function Bl(e) { let [t, n = ``] = e.toLowerCase().split(`/`); return { mpeg: `mp3`, "x-wav": `wav`, opus: `ogg`, mp4: `m4a`, "x-m4a": `m4a` }[n] ?? n; } var Vl = /"(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])"\s*:/; var Hl = /"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/; function Ul(e) { let t = JSON.parse(e); return typeof t != `object` || !t || Vl.test(e) === !1 && Hl.test(e) === !1 ? t : Wl(t); } function Wl(e) { let t = [e]; for (; t.length;) { let e = t; t = []; for (let n of e) { if (Object.prototype.hasOwnProperty.call(n, `__proto__`) || Object.prototype.hasOwnProperty.call(n, `constructor`) && n.constructor !== null && typeof n.constructor == `object` && Object.prototype.hasOwnProperty.call(n.constructor, `prototype`)) throw SyntaxError(`Object contains forbidden prototype property`); for (let e in n) { let r = n[e]; r && typeof r == `object` && t.push(r); } } } return e; } function Gl(e) { let { stackTraceLimit: t } = Error; try { Error.stackTraceLimit = 0; } catch { return Ul(e); } try { return Ul(e); } finally { Error.stackTraceLimit = t; } } function Kl(e) { if (e.type === `object` || Array.isArray(e.type) && e.type.includes(`object`)) { e.additionalProperties = !1; let { properties: t } = e; if (t != null) for (let e of Object.keys(t)) t[e] = ql(t[e]); } e.items != null && (e.items = Array.isArray(e.items) ? e.items.map(ql) : ql(e.items)), e.anyOf != null && (e.anyOf = e.anyOf.map(ql)), e.allOf != null && (e.allOf = e.allOf.map(ql)), e.oneOf != null && (e.oneOf = e.oneOf.map(ql)); let { definitions: t } = e; if (t != null) for (let e of Object.keys(t)) t[e] = ql(t[e]); return e; } function ql(e) { return typeof e == `boolean` ? e : Kl(e); } var Jl = Symbol(`Let zodToJsonSchema decide on which parser to use`); var Yl = { name: void 0, $refStrategy: `root`, basePath: [`#`], effectStrategy: `input`, pipeStrategy: `all`, dateStrategy: `format:date-time`, mapStrategy: `entries`, removeAdditionalStrategy: `passthrough`, allowedAdditionalProperties: !0, rejectedAdditionalProperties: !1, definitionPath: `definitions`, strictUnions: !1, definitions: {}, errorMessages: !1, patternStrategy: `escape`, applyRegexFlags: !1, emailStrategy: `format:email`, base64Strategy: `contentEncoding:base64`, nameStrategy: `ref` }; var Xl = (e) => typeof e == `string` ? { ...Yl, name: e } : { ...Yl, ...e }; function Y$7() { return {}; } function Zl(e, t) { let n = { type: `array` }; return e.type?._def && e.type?._def?.typeName !== q$5.ZodAny && (n.items = $$7(e.type._def, { ...t, currentPath: [...t.currentPath, `items`] })), e.minLength && (n.minItems = e.minLength.value), e.maxLength && (n.maxItems = e.maxLength.value), e.exactLength && (n.minItems = e.exactLength.value, n.maxItems = e.exactLength.value), n; } function Ql(e) { let t = { type: `integer`, format: `int64` }; if (!e.checks) return t; for (let n of e.checks) switch (n.kind) { case `min`: n.inclusive ? t.minimum = n.value : t.exclusiveMinimum = n.value; break; case `max`: n.inclusive ? t.maximum = n.value : t.exclusiveMaximum = n.value; break; case `multipleOf`: t.multipleOf = n.value; break; } return t; } function $l() { return { type: `boolean` }; } function eu(e, t) { return $$7(e.type._def, t); } var tu = (e, t) => $$7(e.innerType._def, t); function nu(e, t, n) { let r = n ?? t.dateStrategy; if (Array.isArray(r)) return { anyOf: r.map((n) => nu(e, t, n)) }; switch (r) { case `string`: case `format:date-time`: return { type: `string`, format: `date-time` }; case `format:date`: return { type: `string`, format: `date` }; case `integer`: return ru(e); } } var ru = (e) => { let t = { type: `integer`, format: `unix-time` }; for (let n of e.checks) switch (n.kind) { case `min`: t.minimum = n.value; break; case `max`: t.maximum = n.value; break; } return t; }; function iu(e, t) { return { ...$$7(e.innerType._def, t), default: e.defaultValue() }; } function au(e, t) { return t.effectStrategy === `input` ? $$7(e.schema._def, t) : Y$7(); } function ou(e) { return { type: `string`, enum: Array.from(e.values) }; } var su = (e) => `type` in e && e.type === `string` ? !1 : `allOf` in e; function cu(e, t) { let n = [$$7(e.left._def, { ...t, currentPath: [ ...t.currentPath, `allOf`, `0` ] }), $$7(e.right._def, { ...t, currentPath: [ ...t.currentPath, `allOf`, `1` ] })].filter((e) => !!e), r = []; return n.forEach((e) => { if (su(e)) r.push(...e.allOf); else { let t = e; if (`additionalProperties` in e && e.additionalProperties === !1) { let { additionalProperties: n, ...r } = e; t = r; } r.push(t); } }), r.length ? { allOf: r } : void 0; } function lu(e) { let t = typeof e.value; return t !== `bigint` && t !== `number` && t !== `boolean` && t !== `string` ? { type: Array.isArray(e.value) ? `array` : `object` } : { type: t === `bigint` ? `integer` : t, const: e.value }; } var uu = void 0; var X$7 = { cuid: /^[cC][^\s-]{8,}$/, cuid2: /^[0-9a-z]+$/, ulid: /^[0-9A-HJKMNP-TV-Z]{26}$/, email: /^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/, emoji: () => (uu === void 0 && (uu = RegExp(`^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`, `u`)), uu), uuid: /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/, ipv4: /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/, ipv4Cidr: /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/, ipv6: /^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/, ipv6Cidr: /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/, base64: /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/, base64url: /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/, nanoid: /^[a-zA-Z0-9_-]{21}$/, jwt: /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/ }; function du(e, t) { let n = { type: `string` }; if (e.checks) for (let r of e.checks) switch (r.kind) { case `min`: n.minLength = typeof n.minLength == `number` ? Math.max(n.minLength, r.value) : r.value; break; case `max`: n.maxLength = typeof n.maxLength == `number` ? Math.min(n.maxLength, r.value) : r.value; break; case `email`: switch (t.emailStrategy) { case `format:email`: Z$7(n, `email`, r.message, t); break; case `format:idn-email`: Z$7(n, `idn-email`, r.message, t); break; case `pattern:zod`: Q$7(n, X$7.email, r.message, t); break; } break; case `url`: Z$7(n, `uri`, r.message, t); break; case `uuid`: Z$7(n, `uuid`, r.message, t); break; case `regex`: Q$7(n, r.regex, r.message, t); break; case `cuid`: Q$7(n, X$7.cuid, r.message, t); break; case `cuid2`: Q$7(n, X$7.cuid2, r.message, t); break; case `startsWith`: Q$7(n, RegExp(`^${fu(r.value, t)}`), r.message, t); break; case `endsWith`: Q$7(n, RegExp(`${fu(r.value, t)}$`), r.message, t); break; case `datetime`: Z$7(n, `date-time`, r.message, t); break; case `date`: Z$7(n, `date`, r.message, t); break; case `time`: Z$7(n, `time`, r.message, t); break; case `duration`: Z$7(n, `duration`, r.message, t); break; case `length`: n.minLength = typeof n.minLength == `number` ? Math.max(n.minLength, r.value) : r.value, n.maxLength = typeof n.maxLength == `number` ? Math.min(n.maxLength, r.value) : r.value; break; case `includes`: Q$7(n, RegExp(fu(r.value, t)), r.message, t); break; case `ip`: r.version !== `v6` && Z$7(n, `ipv4`, r.message, t), r.version !== `v4` && Z$7(n, `ipv6`, r.message, t); break; case `base64url`: Q$7(n, X$7.base64url, r.message, t); break; case `jwt`: Q$7(n, X$7.jwt, r.message, t); break; case `cidr`: r.version !== `v6` && Q$7(n, X$7.ipv4Cidr, r.message, t), r.version !== `v4` && Q$7(n, X$7.ipv6Cidr, r.message, t); break; case `emoji`: Q$7(n, X$7.emoji(), r.message, t); break; case `ulid`: Q$7(n, X$7.ulid, r.message, t); break; case `base64`: switch (t.base64Strategy) { case `format:binary`: Z$7(n, `binary`, r.message, t); break; case `contentEncoding:base64`: n.contentEncoding = `base64`; break; case `pattern:zod`: Q$7(n, X$7.base64, r.message, t); break; } break; case `nanoid`: Q$7(n, X$7.nanoid, r.message, t); case `toLowerCase`: case `toUpperCase`: case `trim`: break; default: } return n; } function fu(e, t) { return t.patternStrategy === `escape` ? mu(e) : e; } var pu = /* @__PURE__ */ new Set(`ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789`); function mu(e) { let t = ``; for (let n = 0; n < e.length; n++) pu.has(e[n]) || (t += `\\`), t += e[n]; return t; } function Z$7(e, t, n, r) { e.format || e.anyOf?.some((e) => e.format) ? (e.anyOf ||= [], e.format && (e.anyOf.push({ format: e.format }), delete e.format), e.anyOf.push({ format: t, ...n && r.errorMessages && { errorMessage: { format: n } } })) : e.format = t; } function Q$7(e, t, n, r) { e.pattern || e.allOf?.some((e) => e.pattern) ? (e.allOf ||= [], e.pattern && (e.allOf.push({ pattern: e.pattern }), delete e.pattern), e.allOf.push({ pattern: hu(t, r), ...n && r.errorMessages && { errorMessage: { pattern: n } } })) : e.pattern = hu(t, r); } function hu(e, t) { if (!t.applyRegexFlags || !e.flags) return e.source; let n = { i: e.flags.includes(`i`), m: e.flags.includes(`m`), s: e.flags.includes(`s`) }, r = n.i ? e.source.toLowerCase() : e.source, i = ``, a = !1, o = !1, s = !1; for (let e = 0; e < r.length; e++) { if (a) { i += r[e], a = !1; continue; } if (n.i) { if (o) { if (r[e].match(/[a-z]/)) { s ? (i += r[e], i += `${r[e - 2]}-${r[e]}`.toUpperCase(), s = !1) : r[e + 1] === `-` && r[e + 2]?.match(/[a-z]/) ? (i += r[e], s = !0) : i += `${r[e]}${r[e].toUpperCase()}`; continue; } } else if (r[e].match(/[a-z]/)) { i += `[${r[e]}${r[e].toUpperCase()}]`; continue; } } if (n.m) { if (r[e] === `^`) { i += `(^|(?<=[\r ]))`; continue; } else if (r[e] === `$`) { i += `($|(?=[\r ]))`; continue; } } if (n.s && r[e] === `.`) { i += o ? `${r[e]}\r ` : `[${r[e]}\r ]`; continue; } i += r[e], r[e] === `\\` ? a = !0 : o && r[e] === `]` ? o = !1 : !o && r[e] === `[` && (o = !0); } try { new RegExp(i); } catch { return console.warn(`Could not convert regex pattern at ${t.currentPath.join(`/`)} to a flag-independent form! Falling back to the flag-ignorant source`), e.source; } return i; } function gu(e, t) { let n = { type: `object`, additionalProperties: $$7(e.valueType._def, { ...t, currentPath: [...t.currentPath, `additionalProperties`] }) ?? t.allowedAdditionalProperties }; if (e.keyType?._def.typeName === q$5.ZodString && e.keyType._def.checks?.length) { let { type: r, ...i } = du(e.keyType._def, t); return { ...n, propertyNames: i }; } else if (e.keyType?._def.typeName === q$5.ZodEnum) return { ...n, propertyNames: { enum: e.keyType._def.values } }; else if (e.keyType?._def.typeName === q$5.ZodBranded && e.keyType._def.type._def.typeName === q$5.ZodString && e.keyType._def.type._def.checks?.length) { let { type: r, ...i } = eu(e.keyType._def, t); return { ...n, propertyNames: i }; } return n; } function _u(e, t) { return t.mapStrategy === `record` ? gu(e, t) : { type: `array`, maxItems: 125, items: { type: `array`, items: [$$7(e.keyType._def, { ...t, currentPath: [ ...t.currentPath, `items`, `items`, `0` ] }) || Y$7(), $$7(e.valueType._def, { ...t, currentPath: [ ...t.currentPath, `items`, `items`, `1` ] }) || Y$7()], minItems: 2, maxItems: 2 } }; } function vu(e) { let t = e.values, n = Object.keys(e.values).filter((e) => typeof t[t[e]] != `number`).map((e) => t[e]), r = Array.from(new Set(n.map((e) => typeof e))); return { type: r.length === 1 ? r[0] === `string` ? `string` : `number` : [`string`, `number`], enum: n }; } function yu() { return { not: Y$7() }; } function bu() { return { type: `null` }; } var xu = { ZodString: `string`, ZodNumber: `number`, ZodBigInt: `integer`, ZodBoolean: `boolean`, ZodNull: `null` }; function Su(e, t) { let n = e.options instanceof Map ? Array.from(e.options.values()) : e.options; if (n.every((e) => e._def.typeName in xu && (!e._def.checks || !e._def.checks.length))) { let e = n.reduce((e, t) => { let n = xu[t._def.typeName]; return n && !e.includes(n) ? [...e, n] : e; }, []); return { type: e.length > 1 ? e : e[0] }; } else if (n.every((e) => e._def.typeName === `ZodLiteral` && !e.description)) { let e = n.reduce((e, t) => { let n = typeof t._def.value; switch (n) { case `string`: case `number`: case `boolean`: return [...e, n]; case `bigint`: return [...e, `integer`]; case `object`: if (t._def.value === null) return [...e, `null`]; default: return e; } }, []); if (e.length === n.length) { let t = e.filter((e, t, n) => n.indexOf(e) === t); return { type: t.length > 1 ? t : t[0], enum: n.reduce((e, t) => e.includes(t._def.value) ? e : [...e, t._def.value], []) }; } } else if (n.every((e) => e._def.typeName === `ZodEnum`)) return { type: `string`, enum: n.reduce((e, t) => [...e, ...t._def.values.filter((t) => !e.includes(t))], []) }; return Cu(e, t); } var Cu = (e, t) => { let n = (e.options instanceof Map ? Array.from(e.options.values()) : e.options).map((e, n) => $$7(e._def, { ...t, currentPath: [ ...t.currentPath, `anyOf`, `${n}` ] })).filter((e) => !!e && (!t.strictUnions || typeof e == `object` && Object.keys(e).length > 0)); return n.length ? { anyOf: n } : void 0; }; function wu(e, t) { if ([ `ZodString`, `ZodNumber`, `ZodBigInt`, `ZodBoolean`, `ZodNull` ].includes(e.innerType._def.typeName) && (!e.innerType._def.checks || !e.innerType._def.checks.length)) return { type: [xu[e.innerType._def.typeName], `null`] }; let n = $$7(e.innerType._def, { ...t, currentPath: [ ...t.currentPath, `anyOf`, `0` ] }); return n && { anyOf: [n, { type: `null` }] }; } function Tu(e) { let t = { type: `number` }; if (!e.checks) return t; for (let n of e.checks) switch (n.kind) { case `int`: t.type = `integer`; break; case `min`: n.inclusive ? t.minimum = n.value : t.exclusiveMinimum = n.value; break; case `max`: n.inclusive ? t.maximum = n.value : t.exclusiveMaximum = n.value; break; case `multipleOf`: t.multipleOf = n.value; break; } return t; } function Eu(e, t) { let n = { type: `object`, properties: {} }, r = [], i = e.shape(); for (let e in i) { let a = i[e]; if (a === void 0 || a._def === void 0) continue; let o = Ou(a), s = $$7(a._def, { ...t, currentPath: [ ...t.currentPath, `properties`, e ], propertyPath: [ ...t.currentPath, `properties`, e ] }); s !== void 0 && (n.properties[e] = s, o || r.push(e)); } r.length && (n.required = r); let a = Du(e, t); return a !== void 0 && (n.additionalProperties = a), n; } function Du(e, t) { if (e.catchall._def.typeName !== `ZodNever`) return $$7(e.catchall._def, { ...t, currentPath: [...t.currentPath, `additionalProperties`] }); switch (e.unknownKeys) { case `passthrough`: return t.allowedAdditionalProperties; case `strict`: return t.rejectedAdditionalProperties; case `strip`: return t.removeAdditionalStrategy === `strict` ? t.allowedAdditionalProperties : t.rejectedAdditionalProperties; } } function Ou(e) { try { return e.isOptional(); } catch { return !0; } } var ku = (e, t) => { if (t.currentPath.toString() === t.propertyPath?.toString()) return $$7(e.innerType._def, t); let n = $$7(e.innerType._def, { ...t, currentPath: [ ...t.currentPath, `anyOf`, `1` ] }); return n ? { anyOf: [{ not: Y$7() }, n] } : Y$7(); }; var Au = (e, t) => { if (t.pipeStrategy === `input`) return $$7(e.in._def, t); if (t.pipeStrategy === `output`) return $$7(e.out._def, t); let n = $$7(e.in._def, { ...t, currentPath: [ ...t.currentPath, `allOf`, `0` ] }); return { allOf: [n, $$7(e.out._def, { ...t, currentPath: [ ...t.currentPath, `allOf`, n ? `1` : `0` ] })].filter((e) => e !== void 0) }; }; function ju(e, t) { return $$7(e.type._def, t); } function Mu(e, t) { let n = { type: `array`, uniqueItems: !0, items: $$7(e.valueType._def, { ...t, currentPath: [...t.currentPath, `items`] }) }; return e.minSize && (n.minItems = e.minSize.value), e.maxSize && (n.maxItems = e.maxSize.value), n; } function Nu(e, t) { return e.rest ? { type: `array`, minItems: e.items.length, items: e.items.map((e, n) => $$7(e._def, { ...t, currentPath: [ ...t.currentPath, `items`, `${n}` ] })).reduce((e, t) => t === void 0 ? e : [...e, t], []), additionalItems: $$7(e.rest._def, { ...t, currentPath: [...t.currentPath, `additionalItems`] }) } : { type: `array`, minItems: e.items.length, maxItems: e.items.length, items: e.items.map((e, n) => $$7(e._def, { ...t, currentPath: [ ...t.currentPath, `items`, `${n}` ] })).reduce((e, t) => t === void 0 ? e : [...e, t], []) }; } function Pu() { return { not: Y$7() }; } function Fu() { return Y$7(); } var Iu = (e, t) => $$7(e.innerType._def, t); var Lu = (e, t, n) => { switch (t) { case q$5.ZodString: return du(e, n); case q$5.ZodNumber: return Tu(e); case q$5.ZodObject: return Eu(e, n); case q$5.ZodBigInt: return Ql(e); case q$5.ZodBoolean: return $l(); case q$5.ZodDate: return nu(e, n); case q$5.ZodUndefined: return Pu(); case q$5.ZodNull: return bu(); case q$5.ZodArray: return Zl(e, n); case q$5.ZodUnion: case q$5.ZodDiscriminatedUnion: return Su(e, n); case q$5.ZodIntersection: return cu(e, n); case q$5.ZodTuple: return Nu(e, n); case q$5.ZodRecord: return gu(e, n); case q$5.ZodLiteral: return lu(e); case q$5.ZodEnum: return ou(e); case q$5.ZodNativeEnum: return vu(e); case q$5.ZodNullable: return wu(e, n); case q$5.ZodOptional: return ku(e, n); case q$5.ZodMap: return _u(e, n); case q$5.ZodSet: return Mu(e, n); case q$5.ZodLazy: return () => e.getter()._def; case q$5.ZodPromise: return ju(e, n); case q$5.ZodNaN: case q$5.ZodNever: return yu(); case q$5.ZodEffects: return au(e, n); case q$5.ZodAny: return Y$7(); case q$5.ZodUnknown: return Fu(); case q$5.ZodDefault: return iu(e, n); case q$5.ZodBranded: return eu(e, n); case q$5.ZodReadonly: return Iu(e, n); case q$5.ZodCatch: return tu(e, n); case q$5.ZodPipeline: return Au(e, n); case q$5.ZodFunction: case q$5.ZodVoid: case q$5.ZodSymbol: return; default: return ((e) => void 0)(t); } }; var Ru = (e, t) => { let n = 0; for (; n < e.length && n < t.length && e[n] === t[n]; n++); return [(e.length - n).toString(), ...t.slice(n)].join(`/`); }; function $$7(e, t, n = !1) { let r = t.seen.get(e); if (t.override) { let i = t.override?.call(t, e, t, r, n); if (i !== Jl) return i; } if (r && !n) { let e = zu(r, t); if (e !== void 0) return e; } let i = { def: e, path: t.currentPath, jsonSchema: void 0 }; t.seen.set(e, i); let a = Lu(e, e.typeName, t), o = typeof a == `function` ? $$7(a(), t) : a; if (o && Bu(e, t, o), t.postProcess) { let n = t.postProcess(o, e, t); return i.jsonSchema = o, n; } return i.jsonSchema = o, o; } var zu = (e, t) => { switch (t.$refStrategy) { case `root`: return { $ref: e.path.join(`/`) }; case `relative`: return { $ref: Ru(t.currentPath, e.path) }; case `none`: case `seen`: return e.path.length < t.currentPath.length && e.path.every((e, n) => t.currentPath[n] === e) ? (console.warn(`Recursive reference detected at ${t.currentPath.join(`/`)}! Defaulting to any`), Y$7()) : t.$refStrategy === `seen` ? Y$7() : void 0; } }; var Bu = (e, t, n) => (e.description && (n.description = e.description), n); var Vu = (e) => { let t = Xl(e), n = t.name === void 0 ? t.basePath : [ ...t.basePath, t.definitionPath, t.name ]; return { ...t, currentPath: n, propertyPath: void 0, seen: new Map(Object.entries(t.definitions).map(([e, n]) => [n._def, { def: n._def, path: [ ...t.basePath, t.definitionPath, e ], jsonSchema: void 0 }])) }; }; var Hu = (e, t) => { let n = Vu(t), r = typeof t == `object` && t.definitions ? Object.entries(t.definitions).reduce((e, [t, r]) => ({ ...e, [t]: $$7(r._def, { ...n, currentPath: [ ...n.basePath, n.definitionPath, t ] }, !0) ?? Y$7() }), {}) : void 0, i = typeof t == `string` ? t : t?.nameStrategy === `title` ? void 0 : t?.name, a = $$7(e._def, i === void 0 ? n : { ...n, currentPath: [ ...n.basePath, n.definitionPath, i ] }, !1) ?? Y$7(), o = typeof t == `object` && t.name !== void 0 && t.nameStrategy === `title` ? t.name : void 0; o !== void 0 && (a.title = o); let s = i === void 0 ? r ? { ...a, [n.definitionPath]: r } : a : { $ref: [ ...n.$refStrategy === `relative` ? [] : n.basePath, n.definitionPath, i ].join(`/`), [n.definitionPath]: { ...r, [i]: a } }; return s.$schema = `http://json-schema.org/draft-07/schema#`, s; }; var Uu = Symbol.for(`vercel.ai.schema`); function Wu(e) { let t; return () => (t ??= e(), t); } function Gu(e, { validate: t } = {}) { return { [Uu]: !0, _type: void 0, get jsonSchema() { return typeof e == `function` && (e = e()), e; }, validate: t }; } function Ku(e) { return typeof e == `object` && !!e && Uu in e && e[Uu] === !0 && `jsonSchema` in e && `validate` in e; } function qu(e) { return e == null ? Gu({ type: `object`, properties: {}, additionalProperties: !1 }) : Ku(e) ? e : `~standard` in e ? e[`~standard`].vendor === `zod` ? Qu(e) : Ju(e) : e(); } function Ju(e) { return Gu(() => Kl(e[`~standard`].jsonSchema.input({ target: `draft-07` })), { validate: async (t) => { let n = await e[`~standard`].validate(t); return `value` in n ? { success: !0, value: n.value } : { success: !1, error: new Ae$10({ value: t, cause: n.issues }) }; } }); } function Yu(e, t) { let n = t?.useReferences ?? !1; return Gu(() => Hu(e, { $refStrategy: n ? `root` : `none` }), { validate: async (t) => { let n = await e.safeParseAsync(t); return n.success ? { success: !0, value: n.data } : { success: !1, error: n.error }; } }); } function Xu(e, t) { let n = t?.useReferences ?? !1; return Gu(() => Kl(pa$2(e, { target: `draft-7`, io: `input`, reused: n ? `ref` : `inline` })), { validate: async (t) => { let n = await Ta$2(e, t); return n.success ? { success: !0, value: n.data } : { success: !1, error: n.error }; } }); } function Zu(e) { return `_zod` in e; } function Qu(e, t) { return Zu(e) ? Xu(e, t) : Yu(e, t); } async function $u({ value: e, schema: t, context: n }) { let r = await ed({ value: e, schema: t, context: n }); if (!r.success) throw Ae$10.wrap({ value: e, cause: r.error, context: n }); return r.value; } async function ed({ value: e, schema: t, context: n }) { let r = qu(t); try { if (r.validate == null) return { success: !0, value: e, rawValue: e }; let t = await r.validate(e); return t.success ? { success: !0, value: t.value, rawValue: e } : { success: !1, error: Ae$10.wrap({ value: e, cause: t.error, context: n }), rawValue: e }; } catch (t) { return { success: !1, error: Ae$10.wrap({ value: e, cause: t, context: n }), rawValue: e }; } } async function td({ text: e, schema: t }) { try { let n = Gl(e); return t == null ? n : await $u({ value: n, schema: t }); } catch (t) { throw de$11.isInstance(t) || Ae$10.isInstance(t) ? t : new de$11({ text: e, cause: t }); } } async function nd({ text: e, schema: t }) { try { let n = Gl(e); return t == null ? { success: !0, value: n, rawValue: n } : await ed({ value: n, schema: t }); } catch (t) { return { success: !1, error: de$11.isInstance(t) ? t : new de$11({ text: e, cause: t }), rawValue: void 0 }; } } function rd(e) { try { return Gl(e), !0; } catch { return !1; } } function id({ stream: e, schema: t }) { return e.pipeThrough(new TextDecoderStream()).pipeThrough(new jc()).pipeThrough(new TransformStream({ async transform({ data: e }, n) { e !== `[DONE]` && n.enqueue(await nd({ text: e, schema: t })); } })); } async function ad({ provider: e, providerOptions: t, schema: n }) { if (t?.[e] == null) return; let i = await ed({ value: t[e], schema: n }); if (!i.success) throw new ae$10({ argument: `providerOptions`, message: `invalid ${e} provider options`, cause: i.error }); return i.value; } var od = () => globalThis.fetch; var sd = async ({ url: e, headers: t, body: n, failedResponseHandler: r, successfulResponseHandler: i, abortSignal: a, fetch: o }) => await ld({ url: e, headers: { "Content-Type": `application/json`, ...t }, body: { content: JSON.stringify(n), values: n }, failedResponseHandler: r, successfulResponseHandler: i, abortSignal: a, fetch: o }); var cd = async ({ url: e, headers: t, formData: n, failedResponseHandler: r, successfulResponseHandler: i, abortSignal: a, fetch: o }) => await ld({ url: e, headers: t, body: { content: n, values: Object.fromEntries(n.entries()) }, failedResponseHandler: r, successfulResponseHandler: i, abortSignal: a, fetch: o }); var ld = async ({ url: e, headers: n = {}, body: r, successfulResponseHandler: i, failedResponseHandler: a, abortSignal: o, fetch: s = od() }) => { try { let c = await s(e, { method: `POST`, headers: Ol(n, `ai-sdk/provider-utils/${kl}`, El()), body: r.content, signal: o }), l = yl(c); if (!c.ok) { let n; try { n = await a({ response: c, url: e, requestBodyValues: r.values }); } catch (n) { throw xl(n) || c$14.isInstance(n) ? n : new c$14({ message: `Failed to process error response`, cause: n, statusCode: c.status, url: e, responseHeaders: l, requestBodyValues: r.values }); } throw n.value; } try { return await i({ response: c, url: e, requestBodyValues: r.values }); } catch (n) { throw n instanceof Error && (xl(n) || c$14.isInstance(n)) ? n : new c$14({ message: `Failed to process successful response`, cause: n, statusCode: c.status, url: e, responseHeaders: l, requestBodyValues: r.values }); } } catch (t) { throw Tl({ error: t, url: e, requestBodyValues: r.values }); } }; function ud(e) { return e; } function dd(e) { return { ...e, type: `dynamic` }; } function fd({ id: e, inputSchema: t }) { return ({ execute: n, outputSchema: r, needsApproval: i, toModelOutput: a, onInputStart: o, onInputDelta: s, onInputAvailable: c, ...l }) => ud({ type: `provider`, isProviderExecuted: !1, id: e, args: l, inputSchema: t, outputSchema: r, execute: n, needsApproval: i, toModelOutput: a, onInputStart: o, onInputDelta: s, onInputAvailable: c }); } function pd({ id: e, inputSchema: t, outputSchema: n }) { return ({ execute: r, needsApproval: i, toModelOutput: a, onInputStart: o, onInputDelta: s, onInputAvailable: c, ...l }) => ud({ type: `provider`, isProviderExecuted: !1, id: e, args: l, inputSchema: t, outputSchema: n, execute: r, needsApproval: i, toModelOutput: a, onInputStart: o, onInputDelta: s, onInputAvailable: c }); } function md({ id: e, inputSchema: t, outputSchema: n, supportsDeferredResults: r }) { return ({ onInputStart: i, onInputDelta: a, onInputAvailable: o, ...s }) => ud({ type: `provider`, isProviderExecuted: !0, id: e, args: s, inputSchema: t, outputSchema: n, onInputStart: i, onInputDelta: a, onInputAvailable: o, supportsDeferredResults: r }); } async function hd(e) { return typeof e == `function` && (e = e()), Promise.resolve(e); } function gd({ part: e }) { if (tl(e.mediaType)) return e.mediaType; if (e.data.type === `data`) { let t = $c({ data: e.data.data, topLevelType: el(e.mediaType) }); if (t) return t; throw new Ie$10({ functionality: `file of media type "${e.mediaType}" must specify subtype since it could not be auto-detected` }); } throw new Ie$10({ functionality: `file of media type "${e.mediaType}" must specify subtype since it is not passed as inline bytes` }); } function _d({ reference: e, provider: t }) { let n = e[t]; if (n != null) return n; throw new Se$10({ provider: t, reference: e }); } var vd = ({ errorSchema: e, errorToMessage: n, isRetryable: r }) => async ({ response: i, url: a, requestBodyValues: o }) => { let s = await i.text(), c = yl(i); if (s.trim() === ``) return { responseHeaders: c, value: new c$14({ message: i.statusText, url: a, requestBodyValues: o, statusCode: i.status, responseHeaders: c, responseBody: s, isRetryable: r?.(i) }) }; try { let l = await td({ text: s, schema: e }); return { responseHeaders: c, value: new c$14({ message: n(l), url: a, requestBodyValues: o, statusCode: i.status, responseHeaders: c, responseBody: s, data: l, isRetryable: r?.(i, l) }) }; } catch { return { responseHeaders: c, value: new c$14({ message: i.statusText, url: a, requestBodyValues: o, statusCode: i.status, responseHeaders: c, responseBody: s, isRetryable: r?.(i) }) }; } }; var yd = (e) => async ({ response: t }) => { let r = yl(t); if (t.body == null) throw new re$9({}); return { responseHeaders: r, value: id({ stream: t.body, schema: e }) }; }; var bd = (e) => async ({ response: n, url: r, requestBodyValues: i }) => { let a = await n.text(), o = await nd({ text: a, schema: e }), s = yl(n); if (!o.success) throw new c$14({ message: `Invalid JSON response`, cause: o.error, statusCode: n.status, responseHeaders: s, responseBody: a, url: r, requestBodyValues: i }); return { responseHeaders: s, value: o.value, rawValue: o.rawValue }; }; var xd = () => async ({ response: e, url: n, requestBodyValues: r }) => { let i = yl(e); if (!e.body) throw new c$14({ message: `Response body is empty`, url: n, requestBodyValues: r, statusCode: e.status, responseHeaders: i, responseBody: void 0 }); try { let t = await e.arrayBuffer(); return { responseHeaders: i, value: new Uint8Array(t) }; } catch (a) { throw new c$14({ message: `Failed to read response as array buffer`, url: n, requestBodyValues: r, statusCode: e.status, responseHeaders: i, responseBody: void 0, cause: a }); } }; function Sd(e) { if (e == null) return !0; let t = typeof e; return t === `string` || t === `number` || t === `boolean` ? !0 : t === `function` || t === `symbol` || t === `bigint` ? !1 : Array.isArray(e) ? e.every(Sd) : Object.getPrototypeOf(e) === Object.prototype ? Object.values(e).every(Sd) : !1; } function Cd(e) { let t = {}; for (let [n, r] of Object.entries(e.config)) if (n === `headers`) { let e = wd(r); Sd(e) && (t[n] = e); } else Sd(r) && (t[n] = r); return { modelId: e.modelId, config: t }; } function wd(e) { let t = e; if (typeof e == `function` && (t = e()), t instanceof Promise) throw Error(`Promise returned from resolveSync`); return t; } var Td = class { constructor(e, t = {}) { this.toolCalls = [], this.controller = e, this._generateId = t.generateId ?? bl, this.typeValidation = t.typeValidation ?? `none`, this.extractMetadata = t.extractMetadata, this.buildToolCallProviderMetadata = t.buildToolCallProviderMetadata; } processDelta(e) { let t = e.index ?? this.toolCalls.length; this.toolCalls[t] == null ? this.processNewToolCall(t, e) : this.processExistingToolCall(t, e); } flush() { for (let e of this.toolCalls) e.hasFinished || this.finishToolCall(e); } processNewToolCall(e, t) { if (this.typeValidation === `required`) { if (t.type !== `function`) throw new le$11({ data: t, message: `Expected 'function' type.` }); } else if (this.typeValidation === `if-present` && t.type != null && t.type !== `function`) throw new le$11({ data: t, message: `Expected 'function' type.` }); if (t.id == null) throw new le$11({ data: t, message: `Expected 'id' to be a string.` }); if (t.function?.name == null) throw new le$11({ data: t, message: `Expected 'function.name' to be a string.` }); this.controller.enqueue({ type: `tool-input-start`, id: t.id, toolName: t.function.name }); let n = this.extractMetadata?.call(this, t); this.toolCalls[e] = { id: t.id, type: `function`, function: { name: t.function.name, arguments: t.function.arguments ?? `` }, hasFinished: !1, metadata: n }; let r = this.toolCalls[e]; r.function.arguments.length > 0 && this.controller.enqueue({ type: `tool-input-delta`, id: r.id, delta: r.function.arguments }), rd(r.function.arguments) && this.finishToolCall(r); } processExistingToolCall(e, t) { let n = this.toolCalls[e]; n.hasFinished || (t.function?.arguments != null && (n.function.arguments += t.function.arguments, this.controller.enqueue({ type: `tool-input-delta`, id: n.id, delta: t.function.arguments })), rd(n.function.arguments) && this.finishToolCall(n)); } finishToolCall(e) { this.controller.enqueue({ type: `tool-input-end`, id: e.id }); let t = this.buildToolCallProviderMetadata?.call(this, e.metadata); this.controller.enqueue({ type: `tool-call`, toolCallId: e.id ?? this._generateId(), toolName: e.function.name, input: e.function.arguments, ...t ? { providerMetadata: t } : {} }), e.hasFinished = !0; } }; function Ed(e) { return e?.replace(/\/$/, ``); } //#endregion //#region node_modules/eve/dist/src/compiled/@ai-sdk/mcp/index.js const oe$4 = { invalid_type: `invalid_type`, too_big: `too_big`, too_small: `too_small`, invalid_format: `invalid_format`, not_multiple_of: `not_multiple_of`, unrecognized_keys: `unrecognized_keys`, invalid_union: `invalid_union`, invalid_key: `invalid_key`, invalid_element: `invalid_element`, invalid_value: `invalid_value`, custom: `custom` }; var se$5; se$5 ||= {}; let x$4; x$4 = globalThis.crypto?.webcrypto ?? globalThis.crypto ?? import(`node:crypto`).then((e) => e.webcrypto); async function ce$5(e) { return (await x$4).getRandomValues(new Uint8Array(e)); } async function le$5(e) { let t = ``; for (; t.length < e;) { let n = await ce$5(e - t.length); for (let e of n) e < 198 && (t += `abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-._~`[e % 66]); } return t; } async function ue$5(e) { return await le$5(e); } async function de$5(e) { let t = await (await x$4).subtle.digest(`SHA-256`, new TextEncoder().encode(e)); return btoa(String.fromCharCode(...new Uint8Array(t))).replace(/\//g, `_`).replace(/\+/g, `-`).replace(/=/g, ``); } async function fe$5(e) { if (e ||= 43, e < 43 || e > 128) throw `Expected a length between 43 and 128. Received ${e}.`; let t = await ue$5(e); return { code_verifier: t, code_challenge: await de$5(t) }; } var pe$5 = `vercel.ai.error.AI_MCPClientError`; var me$5 = Symbol.for(pe$5); var he$5; var ge$5; var S$4 = class extends (ge$5 = i$17, he$5 = me$5, ge$5) { constructor({ name: e = `MCPClientError`, message: t, cause: n, data: r, code: i, statusCode: a, url: o, responseBody: s }) { super({ name: e, message: t, cause: n }), this[he$5] = !0, this.data = r, this.code = i, this.statusCode = a, this.url = o, this.responseBody = s; } static isInstance(t) { return i$17.hasMarker(t, pe$5); } }; var C$5 = `2025-11-25`; var _e$5 = [ C$5, `2025-06-18`, `2025-03-26`, `2024-11-05` ]; var ve$5 = Ho(Po(Ra$2(), _o())); var ye$5 = wo({ name: Ra$2(), version: Ra$2(), title: Ho(Ra$2()) }); var w$5 = wo({ _meta: Ho(Co({}).loose()) }); var T$5 = w$5; var be$5 = Co({ method: Ra$2(), params: Ho(w$5) }); var xe$5 = Co({ applyDefaults: Ho(uo()) }).loose(); var Se$5 = wo({ experimental: Ho(Co({}).loose()), logging: Ho(Co({}).loose()), prompts: Ho(wo({ listChanged: Ho(uo()) })), resources: Ho(wo({ subscribe: Ho(uo()), listChanged: Ho(uo()) })), tools: Ho(wo({ listChanged: Ho(uo()) })), elicitation: Ho(xe$5) }); Co({ elicitation: Ho(xe$5) }).loose(); var E$5 = T$5.extend({ protocolVersion: Ra$2(), capabilities: Se$5, serverInfo: ye$5, instructions: Ho(Ra$2()) }); var D$4 = T$5.extend({ nextCursor: Ho(Ra$2()) }); var Ce$5 = Co({ name: Ra$2(), title: Ho(Ra$2()), description: Ho(Ra$2()), inputSchema: Co({ type: Ro(`object`), properties: Ho(Co({}).loose()) }).loose(), outputSchema: Ho(Co({}).loose()), annotations: Ho(Co({ title: Ho(Ra$2()) }).loose()), _meta: ve$5 }).loose(); var we$5 = D$4.extend({ tools: xo(Ce$5) }); var O$4 = Co({ type: Ro(`text`), text: Ra$2() }).loose(); var k$5 = Co({ type: Ro(`image`), data: to$1(), mimeType: Ra$2() }).loose(); var Te$5 = Co({ uri: Ra$2(), name: Ra$2(), title: Ho(Ra$2()), description: Ho(Ra$2()), mimeType: Ho(Ra$2()), size: Ho(oo()) }).loose(); var Ee$5 = D$4.extend({ resources: xo(Te$5) }); var A$4 = Co({ uri: Ra$2(), name: Ho(Ra$2()), title: Ho(Ra$2()), mimeType: Ho(Ra$2()) }).loose(); var j$4 = A$4.extend({ text: Ra$2() }); var M$4 = A$4.extend({ blob: to$1() }); var De$5 = Co({ type: Ro(`resource`), resource: Eo([j$4, M$4]) }).loose(); var Oe$5 = Co({ type: Ro(`resource_link`), uri: Ra$2(), name: Ra$2(), description: Ho(Ra$2()), mimeType: Ho(Ra$2()) }).loose(); var ke$5 = T$5.extend({ content: xo(Eo([ O$4, k$5, De$5, Oe$5 ])), structuredContent: Ho(_o()), isError: uo().default(!1).optional() }).or(T$5.extend({ toolResult: _o() })); var Ae$5 = Co({ uriTemplate: Ra$2(), name: Ra$2(), title: Ho(Ra$2()), description: Ho(Ra$2()), mimeType: Ho(Ra$2()) }).loose(); var je$5 = T$5.extend({ resourceTemplates: xo(Ae$5) }); var Me$5 = T$5.extend({ contents: xo(Eo([j$4, M$4])) }); var Ne$5 = Co({ name: Ra$2(), description: Ho(Ra$2()), required: Ho(uo()) }).loose(); var Pe$5 = Co({ name: Ra$2(), title: Ho(Ra$2()), description: Ho(Ra$2()), arguments: Ho(xo(Ne$5)) }).loose(); var Fe$5 = D$4.extend({ prompts: xo(Pe$5) }); var Ie$5 = Co({ role: Eo([Ro(`user`), Ro(`assistant`)]), content: Eo([ O$4, k$5, De$5, Oe$5 ]) }).loose(); var Le$5 = T$5.extend({ description: Ho(Ra$2()), messages: xo(Ie$5) }); var Re$5 = w$5.extend({ message: Ra$2(), requestedSchema: _o() }); var N$4 = be$5.extend({ method: Ro(`elicitation/create`), params: Re$5 }); var ze$5 = T$5.extend({ action: Eo([ Ro(`accept`), Ro(`decline`), Ro(`cancel`) ]), content: Ho(Po(Ra$2(), _o())) }); var P$4 = `2.0`; var Be$5 = Co({ jsonrpc: Ro(P$4), id: Eo([Ra$2(), oo().int()]) }).merge(be$5).strict(); var Ve$5 = Co({ jsonrpc: Ro(P$4), id: Eo([Ra$2(), oo().int()]), result: T$5 }).strict(); var He$5 = Co({ jsonrpc: Ro(P$4), id: Eo([Ra$2(), oo().int()]), error: Co({ code: oo().int(), message: Ra$2(), data: Ho(_o()) }) }).strict(); var F$4 = Eo([ Be$5, Co({ jsonrpc: Ro(P$4) }).merge(Co({ method: Ra$2(), params: Ho(w$5) })).strict(), Ve$5, He$5 ]); async function I$4(e) { return F$4.parse(await td({ text: e })); } var Ue$5 = typeof __PACKAGE_VERSION__ < `u` ? __PACKAGE_VERSION__ : `0.0.0-test`; var L$4 = Ra$2().url().superRefine((e, t) => { if (!URL.canParse(e)) return t.addIssue({ code: oe$4.custom, message: `URL must be parseable`, fatal: !0 }), d$6; }).refine((e) => { let t = new URL(e); return t.protocol !== `javascript:` && t.protocol !== `data:` && t.protocol !== `vbscript:`; }, { message: `URL cannot use javascript:, data:, or vbscript: scheme` }); var We$5 = Co({ access_token: Ra$2(), id_token: Ra$2().optional(), token_type: Ra$2(), expires_in: oo().optional(), scope: Ra$2().optional(), refresh_token: Ra$2().optional(), authorization_server: L$4.optional(), token_endpoint: L$4.optional() }).strip(); var Ge$5 = Co({ resource: Ra$2().url(), authorization_servers: xo(L$4).optional(), jwks_uri: Ra$2().url().optional(), scopes_supported: xo(Ra$2()).optional(), bearer_methods_supported: xo(Ra$2()).optional(), resource_signing_alg_values_supported: xo(Ra$2()).optional(), resource_name: Ra$2().optional(), resource_documentation: Ra$2().optional(), resource_policy_uri: Ra$2().url().optional(), resource_tos_uri: Ra$2().url().optional(), tls_client_certificate_bound_access_tokens: uo().optional(), authorization_details_types_supported: xo(Ra$2()).optional(), dpop_signing_alg_values_supported: xo(Ra$2()).optional(), dpop_bound_access_tokens_required: uo().optional() }).passthrough(); var R$4 = Co({ issuer: Ra$2(), authorization_endpoint: L$4, token_endpoint: L$4, registration_endpoint: L$4.optional(), scopes_supported: xo(Ra$2()).optional(), response_types_supported: xo(Ra$2()), grant_types_supported: xo(Ra$2()).optional(), code_challenge_methods_supported: xo(Ra$2()), token_endpoint_auth_methods_supported: xo(Ra$2()).optional(), token_endpoint_auth_signing_alg_values_supported: xo(Ra$2()).optional() }).passthrough(); var Ke$5 = Co({ issuer: Ra$2(), authorization_endpoint: L$4, token_endpoint: L$4, userinfo_endpoint: L$4.optional(), jwks_uri: L$4, registration_endpoint: L$4.optional(), scopes_supported: xo(Ra$2()).optional(), response_types_supported: xo(Ra$2()), grant_types_supported: xo(Ra$2()).optional(), subject_types_supported: xo(Ra$2()), id_token_signing_alg_values_supported: xo(Ra$2()), claims_supported: xo(Ra$2()).optional(), token_endpoint_auth_methods_supported: xo(Ra$2()).optional() }).passthrough().merge(R$4.pick({ code_challenge_methods_supported: !0 })); var qe$5 = Co({ client_id: Ra$2(), client_secret: Ra$2().optional(), client_id_issued_at: oo().optional(), client_secret_expires_at: oo().optional(), authorization_server: L$4.optional(), token_endpoint: L$4.optional() }).strip(); var Je$5 = Co({ redirect_uris: xo(L$4), token_endpoint_auth_method: Ra$2().optional(), grant_types: xo(Ra$2()).optional(), response_types: xo(Ra$2()).optional(), client_name: Ra$2().optional(), client_uri: L$4.optional(), logo_uri: L$4.optional(), scope: Ra$2().optional(), contacts: xo(Ra$2()).optional(), tos_uri: L$4.optional(), policy_uri: Ra$2().optional(), jwks_uri: L$4.optional(), jwks: ho().optional(), software_id: Ra$2().optional(), software_version: Ra$2().optional(), software_statement: Ra$2().optional() }).strip(); var Ye$5 = Co({ error: Ra$2(), error_description: Ra$2().optional(), error_uri: Ra$2().optional() }); var Xe$5 = Je$5.merge(qe$5); var Ze$5 = `vercel.ai.error.AI_MCPClientOAuthError`; var Qe$5 = Symbol.for(Ze$5); var $e$5; var et$5; var z$4 = class extends (et$5 = i$17, $e$5 = Qe$5, et$5) { constructor({ name: e = `MCPClientOAuthError`, message: t, cause: n }) { super({ name: e, message: t, cause: n }), this[$e$5] = !0; } static isInstance(t) { return i$17.hasMarker(t, Ze$5); } }; var B$4 = class extends z$4 {}; B$4.errorCode = `server_error`; var V$4 = class extends z$4 {}; V$4.errorCode = `invalid_client`; var H$5 = class extends z$4 {}; H$5.errorCode = `invalid_grant`; var U$5 = class extends z$4 {}; U$5.errorCode = `unauthorized_client`; var tt$5 = { [B$4.errorCode]: B$4, [V$4.errorCode]: V$4, [H$5.errorCode]: H$5, [U$5.errorCode]: U$5 }; function nt$5(e) { let t = typeof e == `string` ? new URL(e) : new URL(e.href); return t.hash = ``, t; } function W$5(e) { let t = e.href; return e.pathname === `/` && t.endsWith(`/`) ? t.slice(0, -1) : t; } function rt$5({ requestedResource: e, configuredResource: t }) { let n = typeof e == `string` ? new URL(e) : new URL(e.href), r = typeof t == `string` ? new URL(t) : new URL(t.href); if (n.origin !== r.origin || n.pathname.length < r.pathname.length) return !1; let i = n.pathname.endsWith(`/`) ? n.pathname : n.pathname + `/`, a = r.pathname.endsWith(`/`) ? r.pathname : r.pathname + `/`; return i.startsWith(a); } var G$5 = class extends Error { constructor(e = `Unauthorized`) { super(e), this.name = `UnauthorizedError`; } }; function K$4(e) { return new URL(e).href; } function it$5(e, t) { return { authorizationServerUrl: K$4(e), tokenEndpoint: K$4(t?.token_endpoint ? new URL(t.token_endpoint) : new URL(`/token`, e)) }; } function at$5(e, t) { return { ...e, authorization_server: t.authorizationServerUrl, token_endpoint: t.tokenEndpoint }; } function ot$5(e, t) { return { ...e, authorization_server: t.authorizationServerUrl, token_endpoint: t.tokenEndpoint }; } function st$5(e) { if (!(!e?.authorization_server || !e.token_endpoint)) return { authorizationServerUrl: K$4(e.authorization_server), tokenEndpoint: K$4(e.token_endpoint) }; } async function ct$5({ provider: e, clientInformation: t, tokens: n }) { let r = st$5(n); if (r) return r; let i = await e.authorizationServerInformation?.call(e); return i ? { authorizationServerUrl: K$4(i.authorizationServerUrl), tokenEndpoint: K$4(i.tokenEndpoint) } : st$5(t); } async function lt$5({ provider: e, clientInformation: t, authorizationServerInformation: n }) { return e.saveAuthorizationServerInformation ? (await e.saveAuthorizationServerInformation(n), !0) : e.saveClientInformation ? (await e.saveClientInformation(ot$5(t, n)), !0) : !1; } function ut$5(e, t) { if (!t) return; let n = new URL(e).origin; if (t.origin !== n) throw new z$4({ message: `OAuth protected resource metadata URL ${t.href} must have the same origin as the MCP server URL ${n}` }); } function dt$5({ storedAuthorizationServerInformation: e, currentAuthorizationServerInformation: t }) { if (e.authorizationServerUrl !== t.authorizationServerUrl || e.tokenEndpoint !== t.tokenEndpoint) throw new z$4({ message: `OAuth authorization server metadata does not match the metadata that issued the stored credentials` }); } function q$4(e) { let t = e.headers.get(`www-authenticate`) ?? e.headers.get(`WWW-Authenticate`); if (!t) return; let [n, r] = t.split(` `); if (n.toLowerCase() !== `bearer` || !r) return; let i = t.match(/resource_metadata="([^"]*)"/); if (i) try { return new URL(i[1]); } catch { return; } } function ft$5(e, t = ``, n = {}) { return t.endsWith(`/`) && (t = t.slice(0, -1)), n.prependPathname ? `${t}/.well-known/${e}` : `/.well-known/${e}${t}`; } async function J$4(e, t, n = fetch) { try { return await n(e, { headers: t }); } catch (r) { if (r instanceof TypeError) return t ? J$4(e, void 0, n) : void 0; throw r; } } async function pt$5(e, t, n = fetch) { return await J$4(e, { "MCP-Protocol-Version": t }, n); } function mt$5(e, t) { return !e || e.status >= 400 && e.status < 500 && t !== `/`; } async function ht$5(e, t, n, r) { let i = new URL(e), a = r?.protocolVersion ?? C$5, o; if (r?.metadataUrl) o = new URL(r.metadataUrl); else { let e = ft$5(t, i.pathname); o = new URL(e, r?.metadataServerUrl ?? i), o.search = i.search; } let s = await pt$5(o, a, n); return !r?.metadataUrl && mt$5(s, i.pathname) && (s = await pt$5(new URL(`/.well-known/${t}`, i), a, n)), s; } async function gt$5(e, t, n = fetch) { let r = await ht$5(e, `oauth-protected-resource`, n, { protocolVersion: t?.protocolVersion, metadataUrl: t?.resourceMetadataUrl }); if (!r || r.status === 404) throw Error(`Resource server does not implement OAuth 2.0 Protected Resource Metadata.`); if (!r.ok) throw Error(`HTTP ${r.status} trying to load well-known OAuth protected resource metadata.`); return Ge$5.parse(await r.json()); } function _t$5(e) { let t = typeof e == `string` ? new URL(e) : e, n = t.pathname !== `/`, r = t.origin, i = []; if (!n) return i.push({ url: new URL(`/.well-known/oauth-authorization-server`, t.origin), type: `oauth`, expectedIssuer: r }), i.push({ url: new URL(`/.well-known/openid-configuration`, t.origin), type: `oidc`, expectedIssuer: r }), i; let a = t.pathname; a.endsWith(`/`) && (a = a.slice(0, -1)); let o = `${t.origin}${a}`; return i.push({ url: new URL(`/.well-known/oauth-authorization-server${a}`, t.origin), type: `oauth`, expectedIssuer: o }), i.push({ url: new URL(`/.well-known/oauth-authorization-server`, t.origin), type: `oauth`, expectedIssuer: r }), i.push({ url: new URL(`/.well-known/openid-configuration${a}`, t.origin), type: `oidc`, expectedIssuer: o }), i.push({ url: new URL(`${a}/.well-known/openid-configuration`, t.origin), type: `oidc`, expectedIssuer: o }), i; } function vt$5(e, t) { if (e.issuer !== t) throw new z$4({ message: `OAuth authorization server metadata issuer ${e.issuer} does not match expected issuer ${t}` }); } async function yt$5(e, { fetchFn: t = fetch, protocolVersion: n = C$5 } = {}) { let r = { "MCP-Protocol-Version": n }, i = _t$5(e); for (let { url: e, type: n, expectedIssuer: a } of i) { let i = await J$4(e, r, t); if (i) { if (!i.ok) { if (i.status >= 400 && i.status < 500) continue; throw Error(`HTTP ${i.status} trying to load ${n === `oauth` ? `OAuth` : `OpenID provider`} metadata from ${e}`); } if (n === `oauth`) { let e = R$4.parse(await i.json()); return vt$5(e, a), e; } else { let t = Ke$5.parse(await i.json()); if (vt$5(t, a), !t.code_challenge_methods_supported?.includes(`S256`)) throw Error(`Incompatible OIDC provider at ${e}: does not support S256 code challenge method required by MCP specification`); return t; } } } } async function bt$5(e, { metadata: t, clientInformation: n, redirectUrl: r, scope: i, state: a, resource: o }) { let s = `code`, c = `S256`, l; if (t) { if (l = new URL(t.authorization_endpoint), !t.response_types_supported.includes(s)) throw Error(`Incompatible auth server: does not support response type ${s}`); if (!t.code_challenge_methods_supported || !t.code_challenge_methods_supported.includes(c)) throw Error(`Incompatible auth server: does not support code challenge method ${c}`); } else l = new URL(`/authorize`, e); let u = await fe$5(), d = u.code_verifier, f = u.code_challenge; return l.searchParams.set(`response_type`, s), l.searchParams.set(`client_id`, n.client_id), l.searchParams.set(`code_challenge`, f), l.searchParams.set(`code_challenge_method`, c), l.searchParams.set(`redirect_uri`, String(r)), a && l.searchParams.set(`state`, a), i && l.searchParams.set(`scope`, i), i?.includes(`offline_access`) && l.searchParams.append(`prompt`, `consent`), o && l.searchParams.set(`resource`, W$5(o)), { authorizationUrl: l, codeVerifier: d }; } function xt$5(e, t) { let n = e.client_secret !== void 0; return t.length === 0 ? n ? `client_secret_post` : `none` : n && t.includes(`client_secret_basic`) ? `client_secret_basic` : n && t.includes(`client_secret_post`) ? `client_secret_post` : t.includes(`none`) ? `none` : n ? `client_secret_post` : `none`; } function St$5(e, t, n, r) { let { client_id: i, client_secret: a } = t; switch (e) { case `client_secret_basic`: Ct$5(i, a, n); return; case `client_secret_post`: wt$5(i, a, r); return; case `none`: Tt$5(i, r); return; default: throw Error(`Unsupported client authentication method: ${e}`); } } function Ct$5(e, t, n) { if (!t) throw Error(`client_secret_basic authentication requires a client_secret`); let r = btoa(`${e}:${t}`); n.set(`Authorization`, `Basic ${r}`); } function wt$5(e, t, n) { n.set(`client_id`, e), t && n.set(`client_secret`, t); } function Tt$5(e, t) { t.set(`client_id`, e); } async function Y$6(e) { let t = e instanceof Response ? e.status : void 0, n = e instanceof Response ? await e.text() : e; try { let { error: e, error_description: t, error_uri: i } = Ye$5.parse(await td({ text: n })); return new (tt$5[e] || B$4)({ message: t || ``, cause: i }); } catch (e) { return new B$4({ message: `${t ? `HTTP ${t}: ` : ``}Invalid OAuth error response: ${e}. Raw body: ${n}` }); } } async function Et$5(e, { metadata: t, clientInformation: n, authorizationCode: r, codeVerifier: i, redirectUri: a, resource: o, addClientAuthentication: s, fetchFn: c }) { let l = `authorization_code`, u = t?.token_endpoint ? new URL(t.token_endpoint) : new URL(`/token`, e); if (t?.grant_types_supported && !t.grant_types_supported.includes(l)) throw Error(`Incompatible auth server: does not support grant type ${l}`); let d = new Headers({ "Content-Type": `application/x-www-form-urlencoded`, Accept: `application/json` }), f = new URLSearchParams({ grant_type: l, code: r, code_verifier: i, redirect_uri: String(a) }); s ? await s(d, f, e, t) : St$5(xt$5(n, t?.token_endpoint_auth_methods_supported ?? []), n, d, f), o && f.set(`resource`, W$5(o)); let p = await (c ?? fetch)(u, { method: `POST`, headers: d, body: f }); if (!p.ok) throw await Y$6(p); return We$5.parse(await p.json()); } async function Dt$5(e, { metadata: t, clientInformation: n, refreshToken: r, resource: i, addClientAuthentication: a, fetchFn: o }) { let s = `refresh_token`, c; if (t) { if (c = new URL(t.token_endpoint), t.grant_types_supported && !t.grant_types_supported.includes(s)) throw Error(`Incompatible auth server: does not support grant type ${s}`); } else c = new URL(`/token`, e); let l = new Headers({ "Content-Type": `application/x-www-form-urlencoded`, Accept: `application/json` }), u = new URLSearchParams({ grant_type: s, refresh_token: r }); a ? await a(l, u, e, t) : St$5(xt$5(n, t?.token_endpoint_auth_methods_supported ?? []), n, l, u), i && u.set(`resource`, W$5(i)); let d = await (o ?? fetch)(c, { method: `POST`, headers: l, body: u }); if (!d.ok) throw await Y$6(d); return We$5.parse({ refresh_token: r, ...await d.json() }); } async function Ot$5(e, { metadata: t, clientMetadata: n, fetchFn: r }) { let i; if (t) { if (!t.registration_endpoint) throw Error(`Incompatible auth server: does not support dynamic client registration`); i = new URL(t.registration_endpoint); } else i = new URL(`/register`, e); let a = await (r ?? fetch)(i, { method: `POST`, headers: { "Content-Type": `application/json` }, body: JSON.stringify(n) }); if (!a.ok) throw await Y$6(a); return Xe$5.parse(await a.json()); } async function X$6(e, t) { try { return await Z$6(e, t); } catch (n) { if (n instanceof V$4 || n instanceof U$5) return await e.invalidateCredentials?.call(e, `all`), await Z$6(e, t); if (n instanceof H$5) return await e.invalidateCredentials?.call(e, `tokens`), await Z$6(e, t); throw n; } } async function kt$5(e, t, n) { let r = nt$5(e); if (t.validateResourceURL) return await t.validateResourceURL(r, n?.resource); if (n) { if (!rt$5({ requestedResource: r, configuredResource: n.resource })) throw Error(`Protected resource ${n.resource} does not match expected ${r} (or origin)`); return new URL(n.resource); } } async function Z$6(e, { serverUrl: t, authorizationCode: n, callbackState: r, scope: i, resourceMetadataUrl: a, fetchFn: o }) { let s, c; ut$5(t, a); try { s = await gt$5(t, { resourceMetadataUrl: a }, o), s.authorization_servers && s.authorization_servers.length > 0 && (c = s.authorization_servers[0]); } catch {} c ||= t; let l = await kt$5(t, e, s); await e.validateAuthorizationServerURL?.call(e, t, c); let u = await yt$5(c, { fetchFn: o }), d = it$5(c, u), f = await Promise.resolve(e.clientInformation()); if (!f) { if (n !== void 0) throw Error(`Existing OAuth client information is required when exchanging an authorization code`); if (!e.saveClientInformation) throw Error(`OAuth client information must be saveable for dynamic registration`); f = ot$5(await Ot$5(c, { metadata: u, clientMetadata: e.clientMetadata, fetchFn: o }), d), await e.saveClientInformation(f); } if (n !== void 0) { if (e.storedState) { let t = await e.storedState(); if (t !== void 0 && t !== r) throw Error(`OAuth state parameter mismatch - possible CSRF attack`); } let t = await ct$5({ provider: e, clientInformation: f }); if (!t) throw new z$4({ message: `Stored OAuth authorization server metadata is required when exchanging an authorization code` }); dt$5({ storedAuthorizationServerInformation: t, currentAuthorizationServerInformation: d }); let i = await e.codeVerifier(), a = await Et$5(c, { metadata: u, clientInformation: f, authorizationCode: n, codeVerifier: i, redirectUri: e.redirectUrl, resource: l, addClientAuthentication: e.addClientAuthentication, fetchFn: o }); return await e.saveTokens(at$5(a, d)), `AUTHORIZED`; } let p = await e.tokens(); if (p?.refresh_token) { let t = await ct$5({ provider: e, clientInformation: f, tokens: p }); t ? dt$5({ storedAuthorizationServerInformation: t, currentAuthorizationServerInformation: d }) : await e.invalidateCredentials?.call(e, `tokens`); try { if (t) { let t = await Dt$5(c, { metadata: u, clientInformation: f, refreshToken: p.refresh_token, resource: l, addClientAuthentication: e.addClientAuthentication, fetchFn: o }); return await e.saveTokens(at$5(t, d)), `AUTHORIZED`; } } catch (e) { if (!(!(e instanceof z$4) || e instanceof B$4)) throw e; } } let m = e.state ? await e.state() : void 0; m && e.saveState && await e.saveState(m); let { authorizationUrl: ee, codeVerifier: h } = await bt$5(c, { metadata: u, clientInformation: f, state: m, redirectUrl: e.redirectUrl, scope: i || e.clientMetadata.scope, resource: l }); if (!await lt$5({ provider: e, clientInformation: f, authorizationServerInformation: d })) throw new z$4({ message: `OAuth authorization server metadata must be saveable before starting authorization` }); return await e.saveCodeVerifier(h), await e.redirectToAuthorization(ee), `REDIRECT`; } function At$5(e) { return e === void 0 || e === `message`; } var jt$5 = class { constructor({ url: e, headers: t, authProvider: n, redirect: r = `error`, fetch: i }) { this.connected = !1, this.url = new URL(e), this.headers = t, this.authProvider = n, this.redirectMode = r, this.fetchFn = i ?? globalThis.fetch; } setProtocolVersion(e) { this.protocolVersion = e; } async commonHeaders(e) { let t = { ...this.headers, ...e, "mcp-protocol-version": this.protocolVersion ?? C$5 }; if (this.authProvider) { let e = await this.authProvider.tokens(); e?.access_token && (t.Authorization = `Bearer ${e.access_token}`); } return Ol(t, `ai-sdk/${Ue$5}`, El()); } async start() { return new Promise((e, t) => { if (this.connected) return e(); this.abortController = new AbortController(); let r = async (i = !1) => { var a, o, s, c; try { let c = await this.commonHeaders({ Accept: `text/event-stream` }), l = await this.fetchFn(this.url.href, { headers: c, signal: this.abortController?.signal, redirect: this.redirectMode }); if (l.status === 401 && this.authProvider && !i) { this.resourceMetadataUrl = q$4(l); try { if (await X$6(this.authProvider, { serverUrl: this.url, resourceMetadataUrl: this.resourceMetadataUrl, fetchFn: this.fetchFn }) !== `AUTHORIZED`) { let e = new G$5(); return (a = this.onerror) == null || a.call(this, e), t(e); } } catch (e) { return (o = this.onerror) == null || o.call(this, e), t(e); } return r(!0); } if (!l.ok || !l.body) { let e = `MCP SSE Transport Error: ${l.status} ${l.statusText}`; l.status === 405 && (e += ". This server does not support SSE transport. Try using `http` transport instead"); let n = new S$4({ message: e }); return (s = this.onerror) == null || s.call(this, n), t(n); } let u = l.body.pipeThrough(new TextDecoderStream()).pipeThrough(new jc()).getReader(), d = async () => { var n, r, i, a, o; try { for (;;) { let { done: t, value: o } = await u.read(); if (t) { if (this.connected) throw this.connected = !1, new S$4({ message: `MCP SSE Transport Error: Connection closed unexpectedly` }); return; } let { event: s, data: c } = o; if (s === `endpoint`) { if (this.endpoint) continue; let t = new URL(c, this.url); if (t.origin !== this.url.origin) throw this.connected = !1, this.endpoint = void 0, (n = this.sseConnection) == null || n.close(), (r = this.abortController) == null || r.abort(), new S$4({ message: `MCP SSE Transport Error: Endpoint origin does not match connection origin: ${t.origin}` }); this.endpoint = t, this.connected = !0, e(); } else if (At$5(s)) try { let e = await I$4(c); (i = this.onmessage) == null || i.call(this, e); } catch (e) { let t = new S$4({ message: `MCP SSE Transport Error: Failed to parse message`, cause: e }); (a = this.onerror) == null || a.call(this, t); } } } catch (e) { if (e instanceof Error && e.name === `AbortError`) return; (o = this.onerror) == null || o.call(this, e), t(e); } }; this.sseConnection = { close: () => u.cancel() }, d(); } catch (e) { if (e instanceof Error && e.name === `AbortError`) return; (c = this.onerror) == null || c.call(this, e), t(e); } }; r(); }); } async close() { var e, t, n; this.connected = !1, this.endpoint = void 0, (e = this.sseConnection) == null || e.close(), (t = this.abortController) == null || t.abort(), (n = this.onclose) == null || n.call(this); } async send(e) { if (!this.endpoint || !this.connected) throw new S$4({ message: `MCP SSE Transport Error: Not connected` }); let t = this.endpoint, n = async (r = !1) => { var i, a, o, s; try { let s = { method: `POST`, headers: await this.commonHeaders({ "Content-Type": `application/json` }), body: JSON.stringify(e), signal: this.abortController?.signal, redirect: this.redirectMode }, c = await this.fetchFn(t.href, s); if (c.status === 401 && this.authProvider && !r) { this.resourceMetadataUrl = q$4(c); try { if (await X$6(this.authProvider, { serverUrl: this.url, resourceMetadataUrl: this.resourceMetadataUrl, fetchFn: this.fetchFn }) !== `AUTHORIZED`) { let e = new G$5(); (i = this.onerror) == null || i.call(this, e); return; } } catch (e) { (a = this.onerror) == null || a.call(this, e); return; } return n(!0); } if (!c.ok) { let e = await c.text().catch(() => null), t = new S$4({ message: `MCP SSE Transport Error: POSTing to endpoint (HTTP ${c.status}): ${e}` }); (o = this.onerror) == null || o.call(this, t); return; } } catch (e) { (s = this.onerror) == null || s.call(this, e); return; } }; await n(); } }; function Mt$5(e) { return e === void 0 || e === `message`; } var Nt$4 = class { constructor({ url: e, headers: t, authProvider: n, redirect: r = `error`, initialSessionId: i, initialProtocolVersion: a, onSessionIdChange: o, onSessionExpired: s, terminateSessionOnClose: c = !0, fetch: l }) { this.inboundReconnectAttempts = 0, this.reconnectionOptions = { initialReconnectionDelay: 1e3, maxReconnectionDelay: 3e4, reconnectionDelayGrowFactor: 1.5, maxRetries: 2 }, this.url = new URL(e), this.headers = t, this.authProvider = n, this.redirectMode = r, this.sessionId = i, this.protocolVersion = a, this.onSessionIdChange = o, this.onSessionExpired = s, this.terminateSessionOnClose = c, this.fetchFn = l ?? globalThis.fetch; } setProtocolVersion(e) { this.protocolVersion = e; } async commonHeaders({ base: e, includeSessionId: t = !0 }) { let n = { ...this.headers, ...e, "mcp-protocol-version": this.protocolVersion ?? C$5 }; if (t && this.sessionId && (n[`mcp-session-id`] = this.sessionId), this.authProvider) { let e = await this.authProvider.tokens(); e?.access_token && (n.Authorization = `Bearer ${e.access_token}`); } return Ol(n, `ai-sdk/${Ue$5}`, El()); } setSessionId(e) { var t; this.sessionId !== e && (this.sessionId = e, (t = this.onSessionIdChange) == null || t.call(this, e)); } applySessionIdFromResponse(e) { let t = e.headers.get(`mcp-session-id`); t && this.setSessionId(t); } expireSessionId(e) { var t; this.sessionId === e && this.setSessionId(void 0), (t = this.onSessionExpired) == null || t.call(this, e); } authorizeOnce(e) { return this.authProvider ? (this.authPromise ||= X$6(this.authProvider, { serverUrl: this.url, resourceMetadataUrl: e, fetchFn: this.fetchFn }).finally(() => { this.authPromise = void 0; }), this.authPromise) : Promise.resolve(`REDIRECT`); } async start() { if (this.abortController) throw new S$4({ message: `MCP HTTP Transport Error: Transport already started. Note: client.connect() calls start() automatically.` }); this.abortController = new AbortController(), this.openInboundSse(); } async close() { var e, t, n; (e = this.inboundSseConnection) == null || e.close(); try { if (this.sessionId && this.terminateSessionOnClose && this.abortController && !this.abortController.signal.aborted) { let e = await this.commonHeaders({ base: {} }); await this.fetchFn(this.url.href, { method: `DELETE`, headers: e, signal: this.abortController.signal, redirect: this.redirectMode }).catch(() => void 0); } } catch {} (t = this.abortController) == null || t.abort(), (n = this.onclose) == null || n.call(this); } async send(e) { let t = async (r = !1) => { var i, a, o, s, c, l; try { let l = `method` in e && e.method === `initialize`, u = l ? void 0 : this.sessionId, d = { method: `POST`, headers: await this.commonHeaders({ base: { "Content-Type": `application/json`, Accept: `application/json, text/event-stream` }, includeSessionId: !l }), body: JSON.stringify(e), signal: this.abortController?.signal, redirect: this.redirectMode }, f = await this.fetchFn(this.url.href, d); if (this.applySessionIdFromResponse(f), f.status === 401 && this.authProvider && !r) { this.resourceMetadataUrl = q$4(f); try { if (await this.authorizeOnce(this.resourceMetadataUrl) !== `AUTHORIZED`) throw new G$5(); } catch (e) { throw (i = this.onerror) == null || i.call(this, e), e; } return t(!0); } if (f.status === 202) { this.inboundSseConnection || this.openInboundSse(); return; } if (!f.ok) { let e = await f.text().catch(() => null), t = `MCP HTTP Transport Error: POSTing to endpoint (HTTP ${f.status}): ${e}`; f.status === 404 && (u ? (this.expireSessionId(u), t += ". The MCP session expired. Create a new client without `initialSessionId` to start a fresh session") : t += ". This server does not support HTTP transport. Try using `sse` transport instead"); let n = new S$4({ message: t, statusCode: f.status, url: this.url.href, responseBody: e ?? void 0 }); throw (a = this.onerror) == null || a.call(this, n), n; } if (!(`id` in e)) return; let p = f.headers.get(`content-type`) || ``; if (p.includes(`application/json`)) { let e = await f.json(), t = Array.isArray(e) ? e.map((e) => F$4.parse(e)) : [F$4.parse(e)]; for (let e of t) (o = this.onmessage) == null || o.call(this, e); return; } if (p.includes(`text/event-stream`)) { if (!f.body) { let e = new S$4({ message: `MCP HTTP Transport Error: text/event-stream response without body`, statusCode: f.status, url: this.url.href }); throw (s = this.onerror) == null || s.call(this, e), e; } let e = f.body.pipeThrough(new TextDecoderStream()).pipeThrough(new jc()).getReader(); (async () => { var t, n, r; try { for (;;) { let { done: r, value: i } = await e.read(); if (r) return; let { event: a, data: o } = i; if (Mt$5(a)) try { let e = await I$4(o); (t = this.onmessage) == null || t.call(this, e); } catch (e) { let t = new S$4({ message: `MCP HTTP Transport Error: Failed to parse message`, cause: e }); (n = this.onerror) == null || n.call(this, t); } } } catch (e) { if (e instanceof Error && e.name === `AbortError`) return; (r = this.onerror) == null || r.call(this, e); } })(); return; } let m = new S$4({ message: `MCP HTTP Transport Error: Unexpected content type: ${p}`, statusCode: f.status, url: this.url.href }); throw (c = this.onerror) == null || c.call(this, m), m; } catch (e) { throw (l = this.onerror) == null || l.call(this, e), e; } }; await t(); } getNextReconnectionDelay(e) { let { initialReconnectionDelay: t, reconnectionDelayGrowFactor: n, maxReconnectionDelay: r } = this.reconnectionOptions; return Math.min(t * n ** +e, r); } scheduleInboundSseReconnection() { var e; let { maxRetries: t } = this.reconnectionOptions; if (t > 0 && this.inboundReconnectAttempts >= t) { (e = this.onerror) == null || e.call(this, new S$4({ message: `MCP HTTP Transport Error: Maximum reconnection attempts (${t}) exceeded.` })); return; } let n = this.getNextReconnectionDelay(this.inboundReconnectAttempts); this.inboundReconnectAttempts += 1, setTimeout(async () => { this.abortController?.signal.aborted || await this.openInboundSse(!1, this.lastInboundEventId); }, n); } async openInboundSse(e = !1, t) { var r, i, a, o; try { let o = this.sessionId, s = await this.commonHeaders({ base: { Accept: `text/event-stream` } }); t && (s[`last-event-id`] = t); let c = await this.fetchFn(this.url.href, { method: `GET`, headers: s, signal: this.abortController?.signal, redirect: this.redirectMode }); if (this.applySessionIdFromResponse(c), c.status === 401 && this.authProvider && !e) { this.resourceMetadataUrl = q$4(c); try { if (await this.authorizeOnce(this.resourceMetadataUrl) !== `AUTHORIZED`) { let e = new G$5(); (r = this.onerror) == null || r.call(this, e); return; } } catch (e) { (i = this.onerror) == null || i.call(this, e); return; } return this.openInboundSse(!0, t); } if (c.status === 405) return; if (!c.ok || !c.body) { c.status === 404 && o && this.expireSessionId(o); let e = new S$4({ message: `MCP HTTP Transport Error: GET SSE failed: ${c.status} ${c.statusText}`, statusCode: c.status, url: this.url.href }); (a = this.onerror) == null || a.call(this, e); return; } let l = c.body.pipeThrough(new TextDecoderStream()).pipeThrough(new jc()).getReader(), u = async () => { var e, t, n; try { for (;;) { let { done: n, value: r } = await l.read(); if (n) return; let { event: i, data: a, id: o } = r; if (o && (this.lastInboundEventId = o), Mt$5(i)) try { let t = await I$4(a); (e = this.onmessage) == null || e.call(this, t); } catch (e) { let n = new S$4({ message: `MCP HTTP Transport Error: Failed to parse message`, cause: e }); (t = this.onerror) == null || t.call(this, n); } } } catch (e) { if (e instanceof Error && e.name === `AbortError`) return; (n = this.onerror) == null || n.call(this, e), this.abortController?.signal.aborted || this.scheduleInboundSseReconnection(); } }; this.inboundSseConnection = { close: () => l.cancel() }, this.inboundReconnectAttempts = 0, u(); } catch (e) { if (e instanceof Error && e.name === `AbortError`) return; (o = this.onerror) == null || o.call(this, e), this.abortController?.signal.aborted || this.scheduleInboundSseReconnection(); } } }; function Pt$4(e) { switch (e.type) { case `sse`: return new jt$5(e); case `http`: return new Nt$4(e); default: throw new S$4({ message: `Unsupported or invalid transport configuration. If you are using a custom transport, make sure it implements the MCPTransport interface.` }); } } function Ft$4(e) { return `start` in e && typeof e.start == `function` && `send` in e && typeof e.send == `function` && `close` in e && typeof e.close == `function`; } var Q$6 = `text/html;profile=mcp-app`; var Lt$4 = `ui/resourceUri`; function zt$4(e) { let n = e?.ui; return Re$10(n) ? n : void 0; } function Vt$4(e) { return Array.isArray(e) ? e.filter((e) => e === `model` || e === `app`) : void 0; } function Ht$4(e) { let t = zt$4(e._meta), n = t?.resourceUri ?? e._meta?.[Lt$4], r = Vt$4(t?.visibility); if (n !== void 0) { if (typeof n != `string` || !n.startsWith(`ui://`)) throw Error(`Invalid MCP App resource URI: ${JSON.stringify(n)}`); } else if (t == null) return; return { ...t, ...n == null ? {} : { resourceUri: n }, ...r == null ? {} : { visibility: r } }; } var Kt$4 = `1.0.0`; function qt$4({ output: e }) { let t = e; return !(`content` in t) || !Array.isArray(t.content) ? { type: `json`, value: t } : { type: `content`, value: t.content.map((e) => e.type === `text` && `text` in e ? { type: `text`, text: e.text } : e.type === `image` && `data` in e && `mimeType` in e ? { type: `file`, mediaType: e.mimeType, data: { type: `data`, data: e.data } } : { type: `text`, text: JSON.stringify(e) }) }; } async function $$6(e) { let t = new Jt$4(e); return await t.init(), t; } var Jt$4 = class { constructor({ transport: e, name: t, clientName: n = t ?? `ai-sdk-mcp-client`, version: r = Kt$4, onUncaughtError: i, capabilities: a, initialInitializeResult: o }) { this.requestMessageId = 0, this.responseHandlers = /* @__PURE__ */ new Map(), this.serverCapabilities = {}, this._serverInfo = { name: ``, version: `` }, this._initializeResult = { protocolVersion: C$5, capabilities: {}, serverInfo: this._serverInfo }, this.isClosed = !0, this.onUncaughtError = i, this.clientCapabilities = a ?? {}, this.initialInitializeResult = o, Ft$4(e) ? this.transport = e : this.transport = Pt$4(e), this.transport.onclose = () => this.onClose(), this.transport.onerror = (e) => this.onError(e), this.transport.onmessage = (e) => { if (`method` in e) { `id` in e ? this.onRequestMessage(e) : this.onError(new S$4({ message: `Unsupported message type` })); return; } this.onResponse(e); }, this.clientInfo = { name: n, version: r }; } get serverInfo() { return this._serverInfo; } get initializeResult() { return this._initializeResult; } get instructions() { return this._serverInstructions; } async init() { try { if (await this.transport.start(), this.isClosed = !1, this.initialInitializeResult) { let e = E$5.parse(this.initialInitializeResult); return this.applyInitializeResult(e), this; } let e = await this.request({ request: { method: `initialize`, params: { protocolVersion: C$5, capabilities: this.clientCapabilities, clientInfo: this.clientInfo } }, resultSchema: E$5 }); if (e === void 0) throw new S$4({ message: `Server sent invalid initialize result` }); return this.applyInitializeResult(e), await this.notification({ method: `notifications/initialized` }), this; } catch (e) { throw await this.close(), e; } } applyInitializeResult(e) { if (!_e$5.includes(e.protocolVersion)) throw new S$4({ message: `Server's protocol version is not supported: ${e.protocolVersion}` }); this.serverCapabilities = e.capabilities, this._serverInfo = e.serverInfo, this._initializeResult = e, this.transport.setProtocolVersion ? this.transport.setProtocolVersion(e.protocolVersion) : this.transport.protocolVersion = e.protocolVersion, this._serverInstructions = e.instructions; } async close() { this.isClosed || (await this.transport?.close(), this.onClose()); } assertCapability(e) { switch (e) { case `initialize`: break; case `tools/list`: case `tools/call`: if (!this.serverCapabilities.tools) throw new S$4({ message: `Server does not support tools` }); break; case `resources/list`: case `resources/read`: case `resources/templates/list`: if (!this.serverCapabilities.resources) throw new S$4({ message: `Server does not support resources` }); break; case `prompts/list`: case `prompts/get`: if (!this.serverCapabilities.prompts) throw new S$4({ message: `Server does not support prompts` }); break; default: throw new S$4({ message: `Unsupported method: ${e}` }); } } async request({ request: e, resultSchema: t, options: n }) { return new Promise((r, i) => { if (this.isClosed) return i(new S$4({ message: `Attempted to send a request from a closed client` })); this.assertCapability(e.method); let a = n?.signal; a?.throwIfAborted(); let o = this.requestMessageId++, s = { ...e, jsonrpc: `2.0`, id: o }, c = () => { this.responseHandlers.delete(o); }; this.responseHandlers.set(o, (e) => { if (a?.aborted) return i(new S$4({ message: `Request was aborted`, cause: a.reason })); if (e instanceof Error) return i(e); try { r(t.parse(e.result)); } catch (e) { i(new S$4({ message: `Failed to parse server response`, cause: e })); } }), this.transport.send(s).catch((e) => { c(), i(e); }); }); } async listTools({ params: e, options: t } = {}) { return this.request({ request: { method: `tools/list`, params: e }, resultSchema: we$5, options: t }); } async callTool({ name: e, arguments: t = {}, options: n }) { try { return this.request({ request: { method: `tools/call`, params: { name: e, arguments: t } }, resultSchema: ke$5, options: n }); } catch (e) { throw e; } } async listResourcesInternal({ params: e, options: t } = {}) { try { return this.request({ request: { method: `resources/list`, params: e }, resultSchema: Ee$5, options: t }); } catch (e) { throw e; } } async readResourceInternal({ uri: e, options: t }) { try { return this.request({ request: { method: `resources/read`, params: { uri: e } }, resultSchema: Me$5, options: t }); } catch (e) { throw e; } } async listResourceTemplatesInternal({ options: e } = {}) { try { return this.request({ request: { method: `resources/templates/list` }, resultSchema: je$5, options: e }); } catch (e) { throw e; } } async listPromptsInternal({ params: e, options: t } = {}) { try { return this.request({ request: { method: `prompts/list`, params: e }, resultSchema: Fe$5, options: t }); } catch (e) { throw e; } } async getPromptInternal({ name: e, args: t, options: n }) { try { return this.request({ request: { method: `prompts/get`, params: { name: e, arguments: t } }, resultSchema: Le$5, options: n }); } catch (e) { throw e; } } async notification(e) { let t = { ...e, jsonrpc: `2.0` }; await this.transport.send(t); } async tools({ schemas: e = `automatic` } = {}) { let t = await this.listTools(); return this.toolsFromDefinitions(t, { schemas: e }); } toolsFromDefinitions(e, { schemas: t = `automatic` } = {}) { let n = {}; for (let { name: r, title: i, description: o, inputSchema: s, annotations: c, _meta: l } of e.tools) { let e = i ?? c?.title; if (t !== `automatic` && !Object.prototype.hasOwnProperty.call(t, r)) continue; let u = this, d = t === `automatic` ? void 0 : t[r]?.outputSchema, f = Ht$4({ _meta: l }), p = { clientName: this.clientInfo.name, toolName: r, ...e == null ? {} : { title: e }, ...f?.resourceUri == null ? {} : { app: { ...f, mimeType: Q$6 } } }, m = async (e, t) => { var n; (n = t?.abortSignal) == null || n.throwIfAborted(); let i = await u.callTool({ name: r, arguments: e, options: { signal: t?.abortSignal } }); return i.isError || d == null ? i : u.extractStructuredContent(i, d, r); }; n[r] = { ...t === `automatic` ? dd({ description: o, title: e, metadata: p, inputSchema: Gu({ ...s, properties: s.properties ?? {}, additionalProperties: !1 }), execute: m, toModelOutput: qt$4 }) : ud({ description: o, title: e, metadata: p, inputSchema: t[r].inputSchema, ...d == null ? {} : { outputSchema: d }, execute: m, toModelOutput: qt$4 }), _meta: l }; } return n; } async extractStructuredContent(e, t, n) { if (`structuredContent` in e && e.structuredContent != null) { let r = await ed({ value: e.structuredContent, schema: qu(t) }); if (!r.success) throw new S$4({ message: `Tool "${n}" returned structuredContent that does not match the expected outputSchema`, cause: r.error }); return r.value; } if (`content` in e && Array.isArray(e.content)) { let r = e.content.find((e) => e.type === `text`); if (r && `text` in r) { let e = await nd({ text: r.text, schema: t }); if (!e.success) throw new S$4({ message: `Tool "${n}" returned content that does not match the expected outputSchema`, cause: e.error }); return e.value; } } throw new S$4({ message: `Tool "${n}" did not return structuredContent or parseable text content` }); } listResources({ params: e, options: t } = {}) { return this.listResourcesInternal({ params: e, options: t }); } readResource({ uri: e, options: t }) { return this.readResourceInternal({ uri: e, options: t }); } listResourceTemplates({ options: e } = {}) { return this.listResourceTemplatesInternal({ options: e }); } experimental_listPrompts({ params: e, options: t } = {}) { return this.listPromptsInternal({ params: e, options: t }); } experimental_getPrompt({ name: e, arguments: t, options: n }) { return this.getPromptInternal({ name: e, args: t, options: n }); } onElicitationRequest(e, t) { if (e !== N$4) throw new S$4({ message: `Unsupported request schema. Only ElicitationRequestSchema is supported.` }); this.elicitationRequestHandler = t; } async onRequestMessage(e) { try { if (e.method === `ping`) { await this.transport.send({ jsonrpc: `2.0`, id: e.id, result: {} }); return; } if (e.method !== `elicitation/create`) { await this.transport.send({ jsonrpc: `2.0`, id: e.id, error: { code: -32601, message: `Unsupported request method: ${e.method}` } }); return; } if (!this.elicitationRequestHandler) { await this.transport.send({ jsonrpc: `2.0`, id: e.id, error: { code: -32601, message: `No elicitation handler registered on client` } }); return; } let t = N$4.safeParse({ method: e.method, params: e.params }); if (!t.success) { await this.transport.send({ jsonrpc: `2.0`, id: e.id, error: { code: -32602, message: `Invalid elicitation request: ${t.error.message}`, data: t.error.issues } }); return; } try { let n = await this.elicitationRequestHandler(t.data), r = ze$5.parse(n); await this.transport.send({ jsonrpc: `2.0`, id: e.id, result: r }); } catch (t) { await this.transport.send({ jsonrpc: `2.0`, id: e.id, error: { code: -32603, message: t instanceof Error ? t.message : `Failed to handle elicitation request` } }), this.onError(t); } } catch (e) { this.onError(e); } } onClose() { if (this.isClosed) return; this.isClosed = !0; let e = new S$4({ message: `Connection closed` }); for (let t of this.responseHandlers.values()) t(e); this.responseHandlers.clear(); } onError(e) { this.onUncaughtError && this.onUncaughtError(e); } onResponse(e) { let t = Number(e.id), n = this.responseHandlers.get(t); if (n === void 0) throw new S$4({ message: `Protocol error: Received a response for an unknown message ID: ${JSON.stringify(e)}` }); this.responseHandlers.delete(t), n(`result` in e ? e : new S$4({ message: e.error.message, code: e.error.code, data: e.error.data, cause: e.error })); } }; //#endregion //#region node_modules/eve/dist/src/runtime/connections/mcp-client.js var McpConnectionClient = class { #e; #t; #n; #r; #i; constructor(e) { this.#i = e; } async connect() { if (this.#t !== void 0) return this.#t; if (this.#e !== void 0) return this.#e; this.#e = this.#a(); try { return this.#t = await this.#e, this.#t; } catch (e) { throw this.#e = void 0, e; } } async #a() { let e = await resolveHeaders(this.#i), t = this.#i.url; try { return await $$6({ transport: { type: `http`, url: t, headers: e } }); } catch (n) { if (!isMcpHttpFallbackRetryableError(n)) throw n; return await $$6({ transport: { type: `sse`, url: t, headers: e } }); } } async getToolMetadata() { return (await this.#o()).metadata; } async getTools() { return (await this.#o()).tools; } async executeTool(e, t) { try { let { tools: n } = await this.#o(), r = n[e]; if (r?.execute === void 0) throw Error(`Tool "${e}" not found in connection "${this.#i.connectionName}".`); return await r.execute(t, {}); } catch (e) { return await this.#l(e); } } async #o() { if (this.#r !== void 0) return this.#r; if (this.#n !== void 0) return this.#n; this.#n = this.#s(); try { return this.#r = await this.#n, this.#r; } catch (e) { throw this.#n = void 0, e; } } async #s() { try { return await this.#c(); } catch (e) { return await this.#l(e); } } async #c() { let e = await this.connect(), t = await e.listTools(), n = this.#i.tools, r = n === void 0 ? t.tools : t.tools.filter((e) => passesToolFilter(e.name, n)), i = e.toolsFromDefinitions({ tools: r }); return { metadata: r.map((e) => ({ annotations: e.annotations, description: e.description ?? ``, inputSchema: e.inputSchema ?? {}, name: e.name, outputSchema: `outputSchema` in e && e.outputSchema !== void 0 ? e.outputSchema : void 0 })), tools: i }; } async close() { this.#t !== void 0 && (await this.#t.close(), this.#t = void 0), this.#e = void 0, this.#n = void 0, this.#r = void 0; } async #l(e) { throw isMcpAuthRequiredError(e) ? (await this.#u(), await this.close(), new ConnectionAuthorizationRequiredError(this.#i.connectionName, { message: `Connection "${this.#i.connectionName}" requires authorization (the server rejected the token).` })) : e; } async #u() { let e = await resolveConnectionAuthorization(this.#i); e !== void 0 && await evictScopedToken({ authorization: e, connection: { url: this.#i.url }, scope: this.#i.connectionName }); } }; function isMcpAuthRequiredError(e) { return readHttpStatus(e) === 401; } function isMcpHttpFallbackRetryableError(e) { let t = readHttpStatus(e); return t === 400 || t === 404 || t === 405; } function readHttpStatus(t) { for (let n of walkErrorChain(t)) { if (!isObject(n)) continue; let t = readStatusField(n); if (t !== void 0) return t; let r = n.response; if (isObject(r)) { let e = readStatusField(r); if (e !== void 0) return e; } if (typeof n.message == `string`) { let e = /\bHTTP\s+(\d{3})\b/u.exec(n.message); if (e?.[1] !== void 0) return Number(e[1]); } } } function readStatusField(e) { if (typeof e.status == `number`) return e.status; if (typeof e.statusCode == `number`) return e.statusCode; } function* walkErrorChain(t) { let n = t, r = /* @__PURE__ */ new Set(); for (; n != null && !r.has(n);) { if (r.add(n), yield n, !isObject(n) || !(`cause` in n)) return; n = n.cause; } } function passesToolFilter(e, t) { return t === void 0 ? !0 : `allow` in t ? t.allow.includes(e) : !t.block.includes(e); } async function resolveHeaders(e) { let n = {}, r, getCallbackContext = () => r ??= buildCallbackContext(), i = await resolveConnectionAuthorization(e, typeof e.authorization == `function` ? getCallbackContext() : void 0); if (i !== void 0 && (n.Authorization = `Bearer ${(await resolveToken(e, i)).token}`), e.headers !== void 0) { let t = await resolveHeadersDefinition(e.headers, getCallbackContext); for (let [r, a] of Object.entries(t)) { if (i !== void 0 && r.toLowerCase() === `authorization`) throw Error(`Connection "${e.connectionName}" headers must not include an "Authorization" key when "authorization" is also provided.`); n[r] = a; } } return n; } async function resolveToken(e, t) { return await resolveScopedToken({ authorization: t, connection: { url: e.url }, scope: e.connectionName }); } async function resolveHeadersDefinition(e, t) { if (typeof e == `function`) return { ...await e(t()) }; let n = {}, r = Object.entries(e); for (let [e, i] of r) n[e] = await resolveHeaderValue(i, t); return n; } async function resolveHeaderValue(e, t) { return typeof e == `function` ? await e(t()) : await e; } //#endregion //#region node_modules/eve/dist/src/runtime/connections/openapi-operations.js const HTTP_METHODS = [ `get`, `put`, `post`, `delete`, `patch`, `head`, `options` ]; function operationName(e, t, n) { if (typeof e.operationId == `string` && e.operationId.length > 0) { let t = sanitizeToolName(e.operationId); if (t.length > 0) return t; } return sanitizeToolName(`${t}_${n.replace(/[{}]/g, ``).replace(/[^a-zA-Z0-9]+/g, `_`).replace(/^_+|_+$/g, ``)}`); } function sanitizeToolName(e) { return e.replace(/[^a-zA-Z0-9_-]+/g, `_`).replace(/^[_-]+|[_-]+$/g, ``).slice(0, 64); } function uniqueName(e, t) { let n = e, r = 2; for (; t.has(n);) n = `${e}_${r}`, r += 1; return t.add(n), n; } function operationDescription(e) { return typeof e.summary == `string` && e.summary.length > 0 ? e.summary : typeof e.description == `string` ? e.description : ``; } //#endregion //#region node_modules/eve/dist/src/runtime/connections/openapi-schema.js function buildInputSchema(e, t) { let n = {}, r = []; for (let t of e) n[t.name] = t.description === void 0 ? t.schema : { ...t.schema, description: t.description }, t.required && r.push(t.name); t !== void 0 && (n.body = t.schema, t.required && r.push(`body`)); let i = { type: `object`, properties: n }; return r.length > 0 && (i.required = r), i; } function deref(e, t) { return typeof t.$ref == `string` ? resolveRef(e, t.$ref) ?? {} : t; } function derefSchema(t, n, r = 0, i = /* @__PURE__ */ new Set()) { if (isArray(n)) return n.map((e) => derefSchema(t, e, r + 1, i)); if (!isObject(n)) return n; if (r > 12) return {}; if (typeof n.$ref == `string`) { if (i.has(n.$ref)) return {}; let e = resolveRef(t, n.$ref); return e === void 0 ? {} : derefSchema(t, e, r + 1, /* @__PURE__ */ new Set([...i, n.$ref])); } let a = {}; for (let [e, o] of Object.entries(n)) a[e] = derefSchema(t, o, r + 1, i); return normalizeSchemaType(a), normalizeNullable(a), a; } const VALID_JSON_SCHEMA_TYPES = /* @__PURE__ */ new Set([ `string`, `number`, `integer`, `boolean`, `object`, `array`, `null` ]); function normalizeSchemaType(e) { let n = e.type; if (typeof n == `string` && !VALID_JSON_SCHEMA_TYPES.has(n)) delete e.type; else if (isArray(n)) { let r = n.filter((e) => typeof e == `string` && VALID_JSON_SCHEMA_TYPES.has(e)); r.length === 0 ? delete e.type : e.type = r; } } function normalizeNullable(e) { if (!(`nullable` in e)) return; let t = e.nullable === !0; if (delete e.nullable, !t) return; let n = e.type; typeof n == `string` ? n !== `null` && (e.type = [n, `null`]) : isArray(n) ? n.includes(`null`) || (e.type = [...n, `null`]) : isArray(e.enum) && !e.enum.includes(null) && (e.enum = [...e.enum, null]); } function resolveRef(t, n) { if (!n.startsWith(`#/`)) return; let r = n.slice(2).split(`/`).map((e) => e.replace(/~1/g, `/`).replace(/~0/g, `~`)), i = t; for (let t of r) { if (!isObject(i)) return; i = i[t]; } return i; } function isArray(e) { return Array.isArray(e); } //#endregion //#region node_modules/eve/dist/src/runtime/connections/openapi-security.js function resolveSecurity(r, i) { let a = isArray(i.security) ? i.security : isArray(r.security) ? r.security : void 0; if (a === void 0 || a.length === 0) return; let o = getSecuritySchemes(r); if (o !== void 0) for (let n of a) { if (!isObject(n)) continue; let i = Object.keys(n)[0]; if (i === void 0) continue; let a = o[i], s = isObject(a) ? deref(r, a) : void 0; if (!isObject(s)) continue; let c = mapSecurityScheme(s); if (c !== void 0) return c; } } function getSecuritySchemes(t) { let n = isObject(t.components) ? t.components : void 0; return n !== void 0 && isObject(n.securitySchemes) ? n.securitySchemes : isObject(t.securityDefinitions) ? t.securityDefinitions : void 0; } function mapSecurityScheme(e) { if (e.type === `apiKey`) { let t = e.in; return (t === `header` || t === `query` || t === `cookie`) && typeof e.name == `string` && e.name.length > 0 ? { kind: `apiKey`, in: t, name: e.name } : void 0; } if (e.type === `http`) return (typeof e.scheme == `string` ? e.scheme.toLowerCase() : ``) === `basic` ? { kind: `basic` } : { kind: `bearer` }; if (e.type === `basic`) return { kind: `basic` }; if (e.type === `oauth2` || e.type === `openIdConnect`) return { kind: `bearer` }; } function applySecurity(e, t, n, r, i) { if (e === void 0 || t.authorization === void 0) return; let a = extractBearerToken(n); if (a !== void 0 && e.kind !== `bearer`) { if (e.kind === `basic`) { n.Authorization = `Basic ${a}`; return; } delete n.Authorization, e.in === `header` ? n[e.name] = a : e.in === `query` ? r.set(e.name, a) : i.push(`${e.name}=${a}`); } } function extractBearerToken(e) { let t = e.Authorization ?? e.authorization; return typeof t == `string` ? /^Bearer\s+(.+)$/i.exec(t)?.[1] : void 0; } //#endregion //#region node_modules/eve/dist/src/compiled/gray-matter/index.js var __commonJSMin = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t.exports); var __require = createRequire(import.meta.url); var require_kind_of = __commonJSMin(((e, t) => { var n = Object.prototype.toString; t.exports = function(e) { if (e === void 0) return `undefined`; if (e === null) return `null`; var t = typeof e; if (t === `boolean`) return `boolean`; if (t === `string`) return `string`; if (t === `number`) return `number`; if (t === `symbol`) return `symbol`; if (t === `function`) return c(e) ? `generatorfunction` : `function`; if (i(e)) return `array`; if (d(e)) return `buffer`; if (u(e)) return `arguments`; if (o(e)) return `date`; if (a(e)) return `error`; if (s(e)) return `regexp`; switch (r(e)) { case `Symbol`: return `symbol`; case `Promise`: return `promise`; case `WeakMap`: return `weakmap`; case `WeakSet`: return `weakset`; case `Map`: return `map`; case `Set`: return `set`; case `Int8Array`: return `int8array`; case `Uint8Array`: return `uint8array`; case `Uint8ClampedArray`: return `uint8clampedarray`; case `Int16Array`: return `int16array`; case `Uint16Array`: return `uint16array`; case `Int32Array`: return `int32array`; case `Uint32Array`: return `uint32array`; case `Float32Array`: return `float32array`; case `Float64Array`: return `float64array`; } if (l(e)) return `generator`; switch (t = n.call(e), t) { case `[object Object]`: return `object`; case `[object Map Iterator]`: return `mapiterator`; case `[object Set Iterator]`: return `setiterator`; case `[object String Iterator]`: return `stringiterator`; case `[object Array Iterator]`: return `arrayiterator`; } return t.slice(8, -1).toLowerCase().replace(/\s/g, ``); }; function r(e) { return typeof e.constructor == `function` ? e.constructor.name : null; } function i(e) { return Array.isArray ? Array.isArray(e) : e instanceof Array; } function a(e) { return e instanceof Error || typeof e.message == `string` && e.constructor && typeof e.constructor.stackTraceLimit == `number`; } function o(e) { return e instanceof Date ? !0 : typeof e.toDateString == `function` && typeof e.getDate == `function` && typeof e.setDate == `function`; } function s(e) { return e instanceof RegExp ? !0 : typeof e.flags == `string` && typeof e.ignoreCase == `boolean` && typeof e.multiline == `boolean` && typeof e.global == `boolean`; } function c(e, t) { return r(e) === `GeneratorFunction`; } function l(e) { return typeof e.throw == `function` && typeof e.return == `function` && typeof e.next == `function`; } function u(e) { try { if (typeof e.length == `number` && typeof e.callee == `function`) return !0; } catch (e) { if (e.message.indexOf(`callee`) !== -1) return !0; } return !1; } function d(e) { return e.constructor && typeof e.constructor.isBuffer == `function` ? e.constructor.isBuffer(e) : !1; } })); var require_is_extendable = __commonJSMin(((e, t) => { t.exports = function(e) { return e != null && (typeof e == `object` || typeof e == `function`); }; })); var require_extend_shallow = __commonJSMin(((e, t) => { var n = require_is_extendable(); t.exports = function(e) { n(e) || (e = {}); for (var t = arguments.length, i = 1; i < t; i++) { var a = arguments[i]; n(a) && r(e, a); } return e; }; function r(e, t) { for (var n in t) i(t, n) && (e[n] = t[n]); } function i(e, t) { return Object.prototype.hasOwnProperty.call(e, t); } })); var require_section_matter = __commonJSMin(((e, t) => { var n = require_kind_of(), r = require_extend_shallow(); t.exports = function(e, t) { typeof t == `function` && (t = { parse: t }); var n = a(e), l = r({}, { section_delimiter: `---`, parse: c }, t), u = l.section_delimiter, d = n.content.split(/\r?\n/), f = null, p = s(), m = [], h = []; function g(e) { n.content = e, f = [], m = []; } function _(e) { h.length && (p.key = o(h[0], u), p.content = e, l.parse(p, f), f.push(p), p = s(), m = [], h = []); } for (var v = 0; v < d.length; v++) { var y = d[v], b = h.length, x = y.trim(); if (i(x, u)) { if (x.length === 3 && v !== 0) { if (b === 0 || b === 2) { m.push(y); continue; } h.push(x), p.data = m.join(` `), m = []; continue; } f === null && g(m.join(` `)), b === 2 && _(m.join(` `)), h.push(x); continue; } m.push(y); } return f === null ? g(m.join(` `)) : _(m.join(` `)), n.sections = f, n; }; function i(e, t) { return !(e.slice(0, t.length) !== t || e.charAt(t.length + 1) === t.slice(-1)); } function a(e) { if (n(e) !== `object` && (e = { content: e }), typeof e.content != `string` && !l(e.content)) throw TypeError(`expected a buffer or string`); return e.content = e.content.toString(), e.sections = [], e; } function o(e, t) { return e ? e.slice(t.length).trim() : ``; } function s() { return { key: ``, data: ``, content: `` }; } function c(e) { return e; } function l(e) { return e && e.constructor && typeof e.constructor.isBuffer == `function` ? e.constructor.isBuffer(e) : !1; } })); var require_common = __commonJSMin(((e, t) => { function n(e) { return e == null; } function r(e) { return typeof e == `object` && !!e; } function i(e) { return Array.isArray(e) ? e : n(e) ? [] : [e]; } function a(e, t) { var n, r, i, a; if (t) for (a = Object.keys(t), n = 0, r = a.length; n < r; n += 1) i = a[n], e[i] = t[i]; return e; } function o(e, t) { var n = ``, r; for (r = 0; r < t; r += 1) n += e; return n; } function s(e) { return e === 0 && 1 / e == -Infinity; } t.exports.isNothing = n, t.exports.isObject = r, t.exports.toArray = i, t.exports.repeat = o, t.exports.isNegativeZero = s, t.exports.extend = a; })); var require_exception = __commonJSMin(((e, t) => { function n(e, t) { Error.call(this), this.name = `YAMLException`, this.reason = e, this.mark = t, this.message = (this.reason || `(unknown reason)`) + (this.mark ? ` ` + this.mark.toString() : ``), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = Error().stack || ``; } n.prototype = Object.create(Error.prototype), n.prototype.constructor = n, n.prototype.toString = function(e) { var t = this.name + `: `; return t += this.reason || `(unknown reason)`, !e && this.mark && (t += ` ` + this.mark.toString()), t; }, t.exports = n; })); var require_mark = __commonJSMin(((e, t) => { var n = require_common(); function r(e, t, n, r, i) { this.name = e, this.buffer = t, this.position = n, this.line = r, this.column = i; } r.prototype.getSnippet = function(e, t) { var r, i, a, o, s; if (!this.buffer) return null; for (e ||= 4, t ||= 75, r = ``, i = this.position; i > 0 && `\0\r …\u2028\u2029`.indexOf(this.buffer.charAt(i - 1)) === -1;) if (--i, this.position - i > t / 2 - 1) { r = ` ... `, i += 5; break; } for (a = ``, o = this.position; o < this.buffer.length && `\0\r …\u2028\u2029`.indexOf(this.buffer.charAt(o)) === -1;) if (o += 1, o - this.position > t / 2 - 1) { a = ` ... `, o -= 5; break; } return s = this.buffer.slice(i, o), n.repeat(` `, e) + r + s + a + ` ` + n.repeat(` `, e + this.position - i + r.length) + `^`; }, r.prototype.toString = function(e) { var t, n = ``; return this.name && (n += `in "` + this.name + `" `), n += `at line ` + (this.line + 1) + `, column ` + (this.column + 1), e || (t = this.getSnippet(), t && (n += `: ` + t)), n; }, t.exports = r; })); var require_type = __commonJSMin(((e, t) => { var n = require_exception(), r = [ `kind`, `resolve`, `construct`, `instanceOf`, `predicate`, `represent`, `defaultStyle`, `styleAliases` ], i = [ `scalar`, `sequence`, `mapping` ]; function a(e) { var t = {}; return e !== null && Object.keys(e).forEach(function(n) { e[n].forEach(function(e) { t[String(e)] = n; }); }), t; } function o(e, t) { if (t ||= {}, Object.keys(t).forEach(function(t) { if (r.indexOf(t) === -1) throw new n(`Unknown option "` + t + `" is met in definition of "` + e + `" YAML type.`); }), this.tag = e, this.kind = t.kind || null, this.resolve = t.resolve || function() { return !0; }, this.construct = t.construct || function(e) { return e; }, this.instanceOf = t.instanceOf || null, this.predicate = t.predicate || null, this.represent = t.represent || null, this.defaultStyle = t.defaultStyle || null, this.styleAliases = a(t.styleAliases || null), i.indexOf(this.kind) === -1) throw new n(`Unknown kind "` + this.kind + `" is specified for "` + e + `" YAML type.`); } t.exports = o; })); var require_schema = __commonJSMin(((e, t) => { var n = require_common(), r = require_exception(), i = require_type(); function a(e, t, n) { var r = []; return e.include.forEach(function(e) { n = a(e, t, n); }), e[t].forEach(function(e) { n.forEach(function(t, n) { t.tag === e.tag && t.kind === e.kind && r.push(n); }), n.push(e); }), n.filter(function(e, t) { return r.indexOf(t) === -1; }); } function o() { var e = { scalar: {}, sequence: {}, mapping: {}, fallback: {} }, t, n; function r(t) { e[t.kind][t.tag] = e.fallback[t.tag] = t; } for (t = 0, n = arguments.length; t < n; t += 1) arguments[t].forEach(r); return e; } function s(e) { this.include = e.include || [], this.implicit = e.implicit || [], this.explicit = e.explicit || [], this.implicit.forEach(function(e) { if (e.loadKind && e.loadKind !== `scalar`) throw new r(`There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.`); }), this.compiledImplicit = a(this, `implicit`, []), this.compiledExplicit = a(this, `explicit`, []), this.compiledTypeMap = o(this.compiledImplicit, this.compiledExplicit); } s.DEFAULT = null, s.create = function() { var e, t; switch (arguments.length) { case 1: e = s.DEFAULT, t = arguments[0]; break; case 2: e = arguments[0], t = arguments[1]; break; default: throw new r(`Wrong number of arguments for Schema.create function`); } if (e = n.toArray(e), t = n.toArray(t), !e.every(function(e) { return e instanceof s; })) throw new r(`Specified list of super schemas (or a single Schema object) contains a non-Schema object.`); if (!t.every(function(e) { return e instanceof i; })) throw new r(`Specified list of YAML types (or a single Type object) contains a non-Type object.`); return new s({ include: e, explicit: t }); }, t.exports = s; })); var require_str = __commonJSMin(((e, t) => { t.exports = new (require_type())(`tag:yaml.org,2002:str`, { kind: `scalar`, construct: function(e) { return e === null ? `` : e; } }); })); var require_seq = __commonJSMin(((e, t) => { t.exports = new (require_type())(`tag:yaml.org,2002:seq`, { kind: `sequence`, construct: function(e) { return e === null ? [] : e; } }); })); var require_map = __commonJSMin(((e, t) => { t.exports = new (require_type())(`tag:yaml.org,2002:map`, { kind: `mapping`, construct: function(e) { return e === null ? {} : e; } }); })); var require_failsafe = __commonJSMin(((e, t) => { t.exports = new (require_schema())({ explicit: [ require_str(), require_seq(), require_map() ] }); })); var require_null = __commonJSMin(((e, t) => { var n = require_type(); function r(e) { if (e === null) return !0; var t = e.length; return t === 1 && e === `~` || t === 4 && (e === `null` || e === `Null` || e === `NULL`); } function i() { return null; } function a(e) { return e === null; } t.exports = new n(`tag:yaml.org,2002:null`, { kind: `scalar`, resolve: r, construct: i, predicate: a, represent: { canonical: function() { return `~`; }, lowercase: function() { return `null`; }, uppercase: function() { return `NULL`; }, camelcase: function() { return `Null`; } }, defaultStyle: `lowercase` }); })); var require_bool = __commonJSMin(((e, t) => { var n = require_type(); function r(e) { if (e === null) return !1; var t = e.length; return t === 4 && (e === `true` || e === `True` || e === `TRUE`) || t === 5 && (e === `false` || e === `False` || e === `FALSE`); } function i(e) { return e === `true` || e === `True` || e === `TRUE`; } function a(e) { return Object.prototype.toString.call(e) === `[object Boolean]`; } t.exports = new n(`tag:yaml.org,2002:bool`, { kind: `scalar`, resolve: r, construct: i, predicate: a, represent: { lowercase: function(e) { return e ? `true` : `false`; }, uppercase: function(e) { return e ? `TRUE` : `FALSE`; }, camelcase: function(e) { return e ? `True` : `False`; } }, defaultStyle: `lowercase` }); })); var require_int = __commonJSMin(((e, t) => { var n = require_common(), r = require_type(); function i(e) { return 48 <= e && e <= 57 || 65 <= e && e <= 70 || 97 <= e && e <= 102; } function a(e) { return 48 <= e && e <= 55; } function o(e) { return 48 <= e && e <= 57; } function s(e) { if (e === null) return !1; var t = e.length, n = 0, r = !1, s; if (!t) return !1; if (s = e[n], (s === `-` || s === `+`) && (s = e[++n]), s === `0`) { if (n + 1 === t) return !0; if (s = e[++n], s === `b`) { for (n++; n < t; n++) if (s = e[n], s !== `_`) { if (s !== `0` && s !== `1`) return !1; r = !0; } return r && s !== `_`; } if (s === `x`) { for (n++; n < t; n++) if (s = e[n], s !== `_`) { if (!i(e.charCodeAt(n))) return !1; r = !0; } return r && s !== `_`; } for (; n < t; n++) if (s = e[n], s !== `_`) { if (!a(e.charCodeAt(n))) return !1; r = !0; } return r && s !== `_`; } if (s === `_`) return !1; for (; n < t; n++) if (s = e[n], s !== `_`) { if (s === `:`) break; if (!o(e.charCodeAt(n))) return !1; r = !0; } return !r || s === `_` ? !1 : s === `:` ? /^(:[0-5]?[0-9])+$/.test(e.slice(n)) : !0; } function c(e) { var t = e, n = 1, r, i, a = []; return t.indexOf(`_`) !== -1 && (t = t.replace(/_/g, ``)), r = t[0], (r === `-` || r === `+`) && (r === `-` && (n = -1), t = t.slice(1), r = t[0]), t === `0` ? 0 : r === `0` ? t[1] === `b` ? n * parseInt(t.slice(2), 2) : t[1] === `x` ? n * parseInt(t, 16) : n * parseInt(t, 8) : t.indexOf(`:`) === -1 ? n * parseInt(t, 10) : (t.split(`:`).forEach(function(e) { a.unshift(parseInt(e, 10)); }), t = 0, i = 1, a.forEach(function(e) { t += e * i, i *= 60; }), n * t); } function l(e) { return Object.prototype.toString.call(e) === `[object Number]` && e % 1 == 0 && !n.isNegativeZero(e); } t.exports = new r(`tag:yaml.org,2002:int`, { kind: `scalar`, resolve: s, construct: c, predicate: l, represent: { binary: function(e) { return e >= 0 ? `0b` + e.toString(2) : `-0b` + e.toString(2).slice(1); }, octal: function(e) { return e >= 0 ? `0` + e.toString(8) : `-0` + e.toString(8).slice(1); }, decimal: function(e) { return e.toString(10); }, hexadecimal: function(e) { return e >= 0 ? `0x` + e.toString(16).toUpperCase() : `-0x` + e.toString(16).toUpperCase().slice(1); } }, defaultStyle: `decimal`, styleAliases: { binary: [2, `bin`], octal: [8, `oct`], decimal: [10, `dec`], hexadecimal: [16, `hex`] } }); })); var require_float = __commonJSMin(((e, t) => { var n = require_common(), r = require_type(), i = RegExp(`^(?:[-+]?(?:0|[1-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$`); function a(e) { return !(e === null || !i.test(e) || e[e.length - 1] === `_`); } function o(e) { var t = e.replace(/_/g, ``).toLowerCase(), n = t[0] === `-` ? -1 : 1, r, i = []; return `+-`.indexOf(t[0]) >= 0 && (t = t.slice(1)), t === `.inf` ? n === 1 ? Infinity : -Infinity : t === `.nan` ? NaN : t.indexOf(`:`) >= 0 ? (t.split(`:`).forEach(function(e) { i.unshift(parseFloat(e, 10)); }), t = 0, r = 1, i.forEach(function(e) { t += e * r, r *= 60; }), n * t) : n * parseFloat(t, 10); } var s = /^[-+]?[0-9]+e/; function c(e, t) { var r; if (isNaN(e)) switch (t) { case `lowercase`: return `.nan`; case `uppercase`: return `.NAN`; case `camelcase`: return `.NaN`; } else if (e === Infinity) switch (t) { case `lowercase`: return `.inf`; case `uppercase`: return `.INF`; case `camelcase`: return `.Inf`; } else if (e === -Infinity) switch (t) { case `lowercase`: return `-.inf`; case `uppercase`: return `-.INF`; case `camelcase`: return `-.Inf`; } else if (n.isNegativeZero(e)) return `-0.0`; return r = e.toString(10), s.test(r) ? r.replace(`e`, `.e`) : r; } function l(e) { return Object.prototype.toString.call(e) === `[object Number]` && (e % 1 != 0 || n.isNegativeZero(e)); } t.exports = new r(`tag:yaml.org,2002:float`, { kind: `scalar`, resolve: a, construct: o, predicate: l, represent: c, defaultStyle: `lowercase` }); })); var require_json = __commonJSMin(((e, t) => { t.exports = new (require_schema())({ include: [require_failsafe()], implicit: [ require_null(), require_bool(), require_int(), require_float() ] }); })); var require_core = __commonJSMin(((e, t) => { t.exports = new (require_schema())({ include: [require_json()] }); })); var require_timestamp = __commonJSMin(((e, t) => { var n = require_type(), r = RegExp(`^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$`), i = RegExp(`^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$`); function a(e) { return e === null ? !1 : r.exec(e) !== null || i.exec(e) !== null; } function o(e) { var t, n, a, o, s, c, l, u = 0, d = null, f, p, m; if (t = r.exec(e), t === null && (t = i.exec(e)), t === null) throw Error(`Date resolve error`); if (n = +t[1], a = t[2] - 1, o = +t[3], !t[4]) return new Date(Date.UTC(n, a, o)); if (s = +t[4], c = +t[5], l = +t[6], t[7]) { for (u = t[7].slice(0, 3); u.length < 3;) u += `0`; u = +u; } return t[9] && (f = +t[10], p = +(t[11] || 0), d = (f * 60 + p) * 6e4, t[9] === `-` && (d = -d)), m = new Date(Date.UTC(n, a, o, s, c, l, u)), d && m.setTime(m.getTime() - d), m; } function s(e) { return e.toISOString(); } t.exports = new n(`tag:yaml.org,2002:timestamp`, { kind: `scalar`, resolve: a, construct: o, instanceOf: Date, represent: s }); })); var require_merge = __commonJSMin(((e, t) => { var n = require_type(); function r(e) { return e === `<<` || e === null; } t.exports = new n(`tag:yaml.org,2002:merge`, { kind: `scalar`, resolve: r }); })); var require_binary = __commonJSMin(((e, t) => { var n; try { n = __require(`buffer`).Buffer; } catch {} var r = require_type(), i = `ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/= \r`; function a(e) { if (e === null) return !1; var t, n, r = 0, a = e.length, o = i; for (n = 0; n < a; n++) if (t = o.indexOf(e.charAt(n)), !(t > 64)) { if (t < 0) return !1; r += 6; } return r % 8 == 0; } function o(e) { var t, r, a = e.replace(/[\r\n=]/g, ``), o = a.length, s = i, c = 0, l = []; for (t = 0; t < o; t++) t % 4 == 0 && t && (l.push(c >> 16 & 255), l.push(c >> 8 & 255), l.push(c & 255)), c = c << 6 | s.indexOf(a.charAt(t)); return r = o % 4 * 6, r === 0 ? (l.push(c >> 16 & 255), l.push(c >> 8 & 255), l.push(c & 255)) : r === 18 ? (l.push(c >> 10 & 255), l.push(c >> 2 & 255)) : r === 12 && l.push(c >> 4 & 255), n ? n.from ? n.from(l) : new n(l) : l; } function s(e) { var t = ``, n = 0, r, a, o = e.length, s = i; for (r = 0; r < o; r++) r % 3 == 0 && r && (t += s[n >> 18 & 63], t += s[n >> 12 & 63], t += s[n >> 6 & 63], t += s[n & 63]), n = (n << 8) + e[r]; return a = o % 3, a === 0 ? (t += s[n >> 18 & 63], t += s[n >> 12 & 63], t += s[n >> 6 & 63], t += s[n & 63]) : a === 2 ? (t += s[n >> 10 & 63], t += s[n >> 4 & 63], t += s[n << 2 & 63], t += s[64]) : a === 1 && (t += s[n >> 2 & 63], t += s[n << 4 & 63], t += s[64], t += s[64]), t; } function c(e) { return n && n.isBuffer(e); } t.exports = new r(`tag:yaml.org,2002:binary`, { kind: `scalar`, resolve: a, construct: o, predicate: c, represent: s }); })); var require_omap = __commonJSMin(((e, t) => { var n = require_type(), r = Object.prototype.hasOwnProperty, i = Object.prototype.toString; function a(e) { if (e === null) return !0; var t = [], n, a, o, s, c, l = e; for (n = 0, a = l.length; n < a; n += 1) { if (o = l[n], c = !1, i.call(o) !== `[object Object]`) return !1; for (s in o) if (r.call(o, s)) if (!c) c = !0; else return !1; if (!c) return !1; if (t.indexOf(s) === -1) t.push(s); else return !1; } return !0; } function o(e) { return e === null ? [] : e; } t.exports = new n(`tag:yaml.org,2002:omap`, { kind: `sequence`, resolve: a, construct: o }); })); var require_pairs = __commonJSMin(((e, t) => { var n = require_type(), r = Object.prototype.toString; function i(e) { if (e === null) return !0; var t, n, i, a, o, s = e; for (o = Array(s.length), t = 0, n = s.length; t < n; t += 1) { if (i = s[t], r.call(i) !== `[object Object]` || (a = Object.keys(i), a.length !== 1)) return !1; o[t] = [a[0], i[a[0]]]; } return !0; } function a(e) { if (e === null) return []; var t, n, r, i, a, o = e; for (a = Array(o.length), t = 0, n = o.length; t < n; t += 1) r = o[t], i = Object.keys(r), a[t] = [i[0], r[i[0]]]; return a; } t.exports = new n(`tag:yaml.org,2002:pairs`, { kind: `sequence`, resolve: i, construct: a }); })); var require_set = __commonJSMin(((e, t) => { var n = require_type(), r = Object.prototype.hasOwnProperty; function i(e) { if (e === null) return !0; var t, n = e; for (t in n) if (r.call(n, t) && n[t] !== null) return !1; return !0; } function a(e) { return e === null ? {} : e; } t.exports = new n(`tag:yaml.org,2002:set`, { kind: `mapping`, resolve: i, construct: a }); })); var require_default_safe = __commonJSMin(((e, t) => { t.exports = new (require_schema())({ include: [require_core()], implicit: [require_timestamp(), require_merge()], explicit: [ require_binary(), require_omap(), require_pairs(), require_set() ] }); })); var require_undefined = __commonJSMin(((e, t) => { var n = require_type(); function r() { return !0; } function i() {} function a() { return ``; } function o(e) { return e === void 0; } t.exports = new n(`tag:yaml.org,2002:js/undefined`, { kind: `scalar`, resolve: r, construct: i, predicate: o, represent: a }); })); var require_regexp = __commonJSMin(((e, t) => { var n = require_type(); function r(e) { if (e === null || e.length === 0) return !1; var t = e, n = /\/([gim]*)$/.exec(e), r = ``; return !(t[0] === `/` && (n && (r = n[1]), r.length > 3 || t[t.length - r.length - 1] !== `/`)); } function i(e) { var t = e, n = /\/([gim]*)$/.exec(e), r = ``; return t[0] === `/` && (n && (r = n[1]), t = t.slice(1, t.length - r.length - 1)), new RegExp(t, r); } function a(e) { var t = `/` + e.source + `/`; return e.global && (t += `g`), e.multiline && (t += `m`), e.ignoreCase && (t += `i`), t; } function o(e) { return Object.prototype.toString.call(e) === `[object RegExp]`; } t.exports = new n(`tag:yaml.org,2002:js/regexp`, { kind: `scalar`, resolve: r, construct: i, predicate: o, represent: a }); })); var require_esprima = __commonJSMin(((e, t) => { (function(n, r) { typeof e == `object` && typeof t == `object` ? t.exports = r() : typeof define == `function` && define.amd ? define([], r) : typeof e == `object` ? e.esprima = r() : n.esprima = r(); })(e, function() { return (function(e) { var t = {}; function n(r) { if (t[r]) return t[r].exports; var i = t[r] = { exports: {}, id: r, loaded: !1 }; return e[r].call(i.exports, i, i.exports, n), i.loaded = !0, i.exports; } return n.m = e, n.c = t, n.p = ``, n(0); })([ function(e, t, n) { Object.defineProperty(t, "__esModule", { value: !0 }); var r = n(1), i = n(3), a = n(8), o = n(15); function s(e, t, n) { var o = null, s = function(e, t) { n && n(e, t), o && o.visit(e, t); }, c = typeof n == `function` ? s : null, l = !1; if (t) { l = typeof t.comment == `boolean` && t.comment; var u = typeof t.attachComment == `boolean` && t.attachComment; (l || u) && (o = new r.CommentHandler(), o.attach = u, t.comment = !0, c = s); } var d = !1; t && typeof t.sourceType == `string` && (d = t.sourceType === `module`); var f = t && typeof t.jsx == `boolean` && t.jsx ? new i.JSXParser(e, t, c) : new a.Parser(e, t, c), p = d ? f.parseModule() : f.parseScript(); return l && o && (p.comments = o.comments), f.config.tokens && (p.tokens = f.tokens), f.config.tolerant && (p.errors = f.errorHandler.errors), p; } t.parse = s; function c(e, t, n) { var r = t || {}; return r.sourceType = `module`, s(e, r, n); } t.parseModule = c; function l(e, t, n) { var r = t || {}; return r.sourceType = `script`, s(e, r, n); } t.parseScript = l; function u(e, t, n) { var r = new o.Tokenizer(e, t), i = []; try { for (;;) { var a = r.getNextToken(); if (!a) break; n && (a = n(a)), i.push(a); } } catch (e) { r.errorHandler.tolerate(e); } return r.errorHandler.tolerant && (i.errors = r.errors()), i; } t.tokenize = u, t.Syntax = n(2).Syntax, t.version = `4.0.1`; }, function(e, t, n) { Object.defineProperty(t, "__esModule", { value: !0 }); var r = n(2); t.CommentHandler = function() { function e() { this.attach = !1, this.comments = [], this.stack = [], this.leading = [], this.trailing = []; } return e.prototype.insertInnerComments = function(e, t) { if (e.type === r.Syntax.BlockStatement && e.body.length === 0) { for (var n = [], i = this.leading.length - 1; i >= 0; --i) { var a = this.leading[i]; t.end.offset >= a.start && (n.unshift(a.comment), this.leading.splice(i, 1), this.trailing.splice(i, 1)); } n.length && (e.innerComments = n); } }, e.prototype.findTrailingComments = function(e) { var t = []; if (this.trailing.length > 0) { for (var n = this.trailing.length - 1; n >= 0; --n) { var r = this.trailing[n]; r.start >= e.end.offset && t.unshift(r.comment); } return this.trailing.length = 0, t; } var i = this.stack[this.stack.length - 1]; if (i && i.node.trailingComments) { var a = i.node.trailingComments[0]; a && a.range[0] >= e.end.offset && (t = i.node.trailingComments, delete i.node.trailingComments); } return t; }, e.prototype.findLeadingComments = function(e) { for (var t = [], n; this.stack.length > 0;) { var r = this.stack[this.stack.length - 1]; if (r && r.start >= e.start.offset) n = r.node, this.stack.pop(); else break; } if (n) { for (var i = (n.leadingComments ? n.leadingComments.length : 0) - 1; i >= 0; --i) { var a = n.leadingComments[i]; a.range[1] <= e.start.offset && (t.unshift(a), n.leadingComments.splice(i, 1)); } return n.leadingComments && n.leadingComments.length === 0 && delete n.leadingComments, t; } for (var i = this.leading.length - 1; i >= 0; --i) { var r = this.leading[i]; r.start <= e.start.offset && (t.unshift(r.comment), this.leading.splice(i, 1)); } return t; }, e.prototype.visitNode = function(e, t) { if (!(e.type === r.Syntax.Program && e.body.length > 0)) { this.insertInnerComments(e, t); var n = this.findTrailingComments(t), i = this.findLeadingComments(t); i.length > 0 && (e.leadingComments = i), n.length > 0 && (e.trailingComments = n), this.stack.push({ node: e, start: t.start.offset }); } }, e.prototype.visitComment = function(e, t) { var n = e.type[0] === `L` ? `Line` : `Block`, r = { type: n, value: e.value }; if (e.range && (r.range = e.range), e.loc && (r.loc = e.loc), this.comments.push(r), this.attach) { var i = { comment: { type: n, value: e.value, range: [t.start.offset, t.end.offset] }, start: t.start.offset }; e.loc && (i.comment.loc = e.loc), e.type = n, this.leading.push(i), this.trailing.push(i); } }, e.prototype.visit = function(e, t) { e.type === `LineComment` || e.type === `BlockComment` ? this.visitComment(e, t) : this.attach && this.visitNode(e, t); }, e; }(); }, function(e, t) { Object.defineProperty(t, "__esModule", { value: !0 }), t.Syntax = { AssignmentExpression: `AssignmentExpression`, AssignmentPattern: `AssignmentPattern`, ArrayExpression: `ArrayExpression`, ArrayPattern: `ArrayPattern`, ArrowFunctionExpression: `ArrowFunctionExpression`, AwaitExpression: `AwaitExpression`, BlockStatement: `BlockStatement`, BinaryExpression: `BinaryExpression`, BreakStatement: `BreakStatement`, CallExpression: `CallExpression`, CatchClause: `CatchClause`, ClassBody: `ClassBody`, ClassDeclaration: `ClassDeclaration`, ClassExpression: `ClassExpression`, ConditionalExpression: `ConditionalExpression`, ContinueStatement: `ContinueStatement`, DoWhileStatement: `DoWhileStatement`, DebuggerStatement: `DebuggerStatement`, EmptyStatement: `EmptyStatement`, ExportAllDeclaration: `ExportAllDeclaration`, ExportDefaultDeclaration: `ExportDefaultDeclaration`, ExportNamedDeclaration: `ExportNamedDeclaration`, ExportSpecifier: `ExportSpecifier`, ExpressionStatement: `ExpressionStatement`, ForStatement: `ForStatement`, ForOfStatement: `ForOfStatement`, ForInStatement: `ForInStatement`, FunctionDeclaration: `FunctionDeclaration`, FunctionExpression: `FunctionExpression`, Identifier: `Identifier`, IfStatement: `IfStatement`, ImportDeclaration: `ImportDeclaration`, ImportDefaultSpecifier: `ImportDefaultSpecifier`, ImportNamespaceSpecifier: `ImportNamespaceSpecifier`, ImportSpecifier: `ImportSpecifier`, Literal: `Literal`, LabeledStatement: `LabeledStatement`, LogicalExpression: `LogicalExpression`, MemberExpression: `MemberExpression`, MetaProperty: `MetaProperty`, MethodDefinition: `MethodDefinition`, NewExpression: `NewExpression`, ObjectExpression: `ObjectExpression`, ObjectPattern: `ObjectPattern`, Program: `Program`, Property: `Property`, RestElement: `RestElement`, ReturnStatement: `ReturnStatement`, SequenceExpression: `SequenceExpression`, SpreadElement: `SpreadElement`, Super: `Super`, SwitchCase: `SwitchCase`, SwitchStatement: `SwitchStatement`, TaggedTemplateExpression: `TaggedTemplateExpression`, TemplateElement: `TemplateElement`, TemplateLiteral: `TemplateLiteral`, ThisExpression: `ThisExpression`, ThrowStatement: `ThrowStatement`, TryStatement: `TryStatement`, UnaryExpression: `UnaryExpression`, UpdateExpression: `UpdateExpression`, VariableDeclaration: `VariableDeclaration`, VariableDeclarator: `VariableDeclarator`, WhileStatement: `WhileStatement`, WithStatement: `WithStatement`, YieldExpression: `YieldExpression` }; }, function(e, t, n) { var r = this && this.__extends || (function() { var e = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(e, t) { e.__proto__ = t; } || function(e, t) { for (var n in t) t.hasOwnProperty(n) && (e[n] = t[n]); }; return function(t, n) { e(t, n); function r() { this.constructor = t; } t.prototype = n === null ? Object.create(n) : (r.prototype = n.prototype, new r()); }; })(); Object.defineProperty(t, "__esModule", { value: !0 }); var i = n(4), a = n(5), o = n(6), s = n(7), c = n(8), l = n(13), u = n(14); l.TokenName[100] = `JSXIdentifier`, l.TokenName[101] = `JSXText`; function d(e) { var t; switch (e.type) { case o.JSXSyntax.JSXIdentifier: t = e.name; break; case o.JSXSyntax.JSXNamespacedName: var n = e; t = d(n.namespace) + `:` + d(n.name); break; case o.JSXSyntax.JSXMemberExpression: var r = e; t = d(r.object) + `.` + d(r.property); break; default: break; } return t; } t.JSXParser = function(e) { r(t, e); function t(t, n, r) { return e.call(this, t, n, r) || this; } return t.prototype.parsePrimaryExpression = function() { return this.match(`<`) ? this.parseJSXRoot() : e.prototype.parsePrimaryExpression.call(this); }, t.prototype.startJSX = function() { this.scanner.index = this.startMarker.index, this.scanner.lineNumber = this.startMarker.line, this.scanner.lineStart = this.startMarker.index - this.startMarker.column; }, t.prototype.finishJSX = function() { this.nextToken(); }, t.prototype.reenterJSX = function() { this.startJSX(), this.expectJSX(`}`), this.config.tokens && this.tokens.pop(); }, t.prototype.createJSXNode = function() { return this.collectComments(), { index: this.scanner.index, line: this.scanner.lineNumber, column: this.scanner.index - this.scanner.lineStart }; }, t.prototype.createJSXChildNode = function() { return { index: this.scanner.index, line: this.scanner.lineNumber, column: this.scanner.index - this.scanner.lineStart }; }, t.prototype.scanXHTMLEntity = function(e) { for (var t = `&`, n = !0, r = !1, a = !1, o = !1; !this.scanner.eof() && n && !r;) { var s = this.scanner.source[this.scanner.index]; if (s === e) break; if (r = s === `;`, t += s, ++this.scanner.index, !r) switch (t.length) { case 2: a = s === `#`; break; case 3: a && (o = s === `x`, n = o || i.Character.isDecimalDigit(s.charCodeAt(0)), a &&= !o); break; default: n &&= !(a && !i.Character.isDecimalDigit(s.charCodeAt(0))), n &&= !(o && !i.Character.isHexDigit(s.charCodeAt(0))); break; } } if (n && r && t.length > 2) { var c = t.substr(1, t.length - 2); a && c.length > 1 ? t = String.fromCharCode(parseInt(c.substr(1), 10)) : o && c.length > 2 ? t = String.fromCharCode(parseInt(`0` + c.substr(1), 16)) : !a && !o && u.XHTMLEntities[c] && (t = u.XHTMLEntities[c]); } return t; }, t.prototype.lexJSX = function() { var e = this.scanner.source.charCodeAt(this.scanner.index); if (e === 60 || e === 62 || e === 47 || e === 58 || e === 61 || e === 123 || e === 125) { var t = this.scanner.source[this.scanner.index++]; return { type: 7, value: t, lineNumber: this.scanner.lineNumber, lineStart: this.scanner.lineStart, start: this.scanner.index - 1, end: this.scanner.index }; } if (e === 34 || e === 39) { for (var n = this.scanner.index, r = this.scanner.source[this.scanner.index++], a = ``; !this.scanner.eof();) { var o = this.scanner.source[this.scanner.index++]; if (o === r) break; o === `&` ? a += this.scanXHTMLEntity(r) : a += o; } return { type: 8, value: a, lineNumber: this.scanner.lineNumber, lineStart: this.scanner.lineStart, start: n, end: this.scanner.index }; } if (e === 46) { var s = this.scanner.source.charCodeAt(this.scanner.index + 1), c = this.scanner.source.charCodeAt(this.scanner.index + 2), t = s === 46 && c === 46 ? `...` : `.`, n = this.scanner.index; return this.scanner.index += t.length, { type: 7, value: t, lineNumber: this.scanner.lineNumber, lineStart: this.scanner.lineStart, start: n, end: this.scanner.index }; } if (e === 96) return { type: 10, value: ``, lineNumber: this.scanner.lineNumber, lineStart: this.scanner.lineStart, start: this.scanner.index, end: this.scanner.index }; if (i.Character.isIdentifierStart(e) && e !== 92) { var n = this.scanner.index; for (++this.scanner.index; !this.scanner.eof();) { var o = this.scanner.source.charCodeAt(this.scanner.index); if (i.Character.isIdentifierPart(o) && o !== 92) ++this.scanner.index; else if (o === 45) ++this.scanner.index; else break; } return { type: 100, value: this.scanner.source.slice(n, this.scanner.index), lineNumber: this.scanner.lineNumber, lineStart: this.scanner.lineStart, start: n, end: this.scanner.index }; } return this.scanner.lex(); }, t.prototype.nextJSXToken = function() { this.collectComments(), this.startMarker.index = this.scanner.index, this.startMarker.line = this.scanner.lineNumber, this.startMarker.column = this.scanner.index - this.scanner.lineStart; var e = this.lexJSX(); return this.lastMarker.index = this.scanner.index, this.lastMarker.line = this.scanner.lineNumber, this.lastMarker.column = this.scanner.index - this.scanner.lineStart, this.config.tokens && this.tokens.push(this.convertToken(e)), e; }, t.prototype.nextJSXText = function() { this.startMarker.index = this.scanner.index, this.startMarker.line = this.scanner.lineNumber, this.startMarker.column = this.scanner.index - this.scanner.lineStart; for (var e = this.scanner.index, t = ``; !this.scanner.eof();) { var n = this.scanner.source[this.scanner.index]; if (n === `{` || n === `<`) break; ++this.scanner.index, t += n, i.Character.isLineTerminator(n.charCodeAt(0)) && (++this.scanner.lineNumber, n === `\r` && this.scanner.source[this.scanner.index] === ` ` && ++this.scanner.index, this.scanner.lineStart = this.scanner.index); } this.lastMarker.index = this.scanner.index, this.lastMarker.line = this.scanner.lineNumber, this.lastMarker.column = this.scanner.index - this.scanner.lineStart; var r = { type: 101, value: t, lineNumber: this.scanner.lineNumber, lineStart: this.scanner.lineStart, start: e, end: this.scanner.index }; return t.length > 0 && this.config.tokens && this.tokens.push(this.convertToken(r)), r; }, t.prototype.peekJSXToken = function() { var e = this.scanner.saveState(); this.scanner.scanComments(); var t = this.lexJSX(); return this.scanner.restoreState(e), t; }, t.prototype.expectJSX = function(e) { var t = this.nextJSXToken(); (t.type !== 7 || t.value !== e) && this.throwUnexpectedToken(t); }, t.prototype.matchJSX = function(e) { var t = this.peekJSXToken(); return t.type === 7 && t.value === e; }, t.prototype.parseJSXIdentifier = function() { var e = this.createJSXNode(), t = this.nextJSXToken(); return t.type !== 100 && this.throwUnexpectedToken(t), this.finalize(e, new a.JSXIdentifier(t.value)); }, t.prototype.parseJSXElementName = function() { var e = this.createJSXNode(), t = this.parseJSXIdentifier(); if (this.matchJSX(`:`)) { var n = t; this.expectJSX(`:`); var r = this.parseJSXIdentifier(); t = this.finalize(e, new a.JSXNamespacedName(n, r)); } else if (this.matchJSX(`.`)) for (; this.matchJSX(`.`);) { var i = t; this.expectJSX(`.`); var o = this.parseJSXIdentifier(); t = this.finalize(e, new a.JSXMemberExpression(i, o)); } return t; }, t.prototype.parseJSXAttributeName = function() { var e = this.createJSXNode(), t, n = this.parseJSXIdentifier(); if (this.matchJSX(`:`)) { var r = n; this.expectJSX(`:`); var i = this.parseJSXIdentifier(); t = this.finalize(e, new a.JSXNamespacedName(r, i)); } else t = n; return t; }, t.prototype.parseJSXStringLiteralAttribute = function() { var e = this.createJSXNode(), t = this.nextJSXToken(); t.type !== 8 && this.throwUnexpectedToken(t); var n = this.getTokenRaw(t); return this.finalize(e, new s.Literal(t.value, n)); }, t.prototype.parseJSXExpressionAttribute = function() { var e = this.createJSXNode(); this.expectJSX(`{`), this.finishJSX(), this.match(`}`) && this.tolerateError(`JSX attributes must only be assigned a non-empty expression`); var t = this.parseAssignmentExpression(); return this.reenterJSX(), this.finalize(e, new a.JSXExpressionContainer(t)); }, t.prototype.parseJSXAttributeValue = function() { return this.matchJSX(`{`) ? this.parseJSXExpressionAttribute() : this.matchJSX(`<`) ? this.parseJSXElement() : this.parseJSXStringLiteralAttribute(); }, t.prototype.parseJSXNameValueAttribute = function() { var e = this.createJSXNode(), t = this.parseJSXAttributeName(), n = null; return this.matchJSX(`=`) && (this.expectJSX(`=`), n = this.parseJSXAttributeValue()), this.finalize(e, new a.JSXAttribute(t, n)); }, t.prototype.parseJSXSpreadAttribute = function() { var e = this.createJSXNode(); this.expectJSX(`{`), this.expectJSX(`...`), this.finishJSX(); var t = this.parseAssignmentExpression(); return this.reenterJSX(), this.finalize(e, new a.JSXSpreadAttribute(t)); }, t.prototype.parseJSXAttributes = function() { for (var e = []; !this.matchJSX(`/`) && !this.matchJSX(`>`);) { var t = this.matchJSX(`{`) ? this.parseJSXSpreadAttribute() : this.parseJSXNameValueAttribute(); e.push(t); } return e; }, t.prototype.parseJSXOpeningElement = function() { var e = this.createJSXNode(); this.expectJSX(`<`); var t = this.parseJSXElementName(), n = this.parseJSXAttributes(), r = this.matchJSX(`/`); return r && this.expectJSX(`/`), this.expectJSX(`>`), this.finalize(e, new a.JSXOpeningElement(t, r, n)); }, t.prototype.parseJSXBoundaryElement = function() { var e = this.createJSXNode(); if (this.expectJSX(`<`), this.matchJSX(`/`)) { this.expectJSX(`/`); var t = this.parseJSXElementName(); return this.expectJSX(`>`), this.finalize(e, new a.JSXClosingElement(t)); } var n = this.parseJSXElementName(), r = this.parseJSXAttributes(), i = this.matchJSX(`/`); return i && this.expectJSX(`/`), this.expectJSX(`>`), this.finalize(e, new a.JSXOpeningElement(n, i, r)); }, t.prototype.parseJSXEmptyExpression = function() { var e = this.createJSXChildNode(); return this.collectComments(), this.lastMarker.index = this.scanner.index, this.lastMarker.line = this.scanner.lineNumber, this.lastMarker.column = this.scanner.index - this.scanner.lineStart, this.finalize(e, new a.JSXEmptyExpression()); }, t.prototype.parseJSXExpressionContainer = function() { var e = this.createJSXNode(); this.expectJSX(`{`); var t; return this.matchJSX(`}`) ? (t = this.parseJSXEmptyExpression(), this.expectJSX(`}`)) : (this.finishJSX(), t = this.parseAssignmentExpression(), this.reenterJSX()), this.finalize(e, new a.JSXExpressionContainer(t)); }, t.prototype.parseJSXChildren = function() { for (var e = []; !this.scanner.eof();) { var t = this.createJSXChildNode(), n = this.nextJSXText(); if (n.start < n.end) { var r = this.getTokenRaw(n), i = this.finalize(t, new a.JSXText(n.value, r)); e.push(i); } if (this.scanner.source[this.scanner.index] === `{`) { var o = this.parseJSXExpressionContainer(); e.push(o); } else break; } return e; }, t.prototype.parseComplexJSXElement = function(e) { for (var t = []; !this.scanner.eof();) { e.children = e.children.concat(this.parseJSXChildren()); var n = this.createJSXChildNode(), r = this.parseJSXBoundaryElement(); if (r.type === o.JSXSyntax.JSXOpeningElement) { var i = r; if (i.selfClosing) { var s = this.finalize(n, new a.JSXElement(i, [], null)); e.children.push(s); } else t.push(e), e = { node: n, opening: i, closing: null, children: [] }; } if (r.type === o.JSXSyntax.JSXClosingElement) { e.closing = r; var c = d(e.opening.name); if (c !== d(e.closing.name) && this.tolerateError(`Expected corresponding JSX closing tag for %0`, c), t.length > 0) { var s = this.finalize(e.node, new a.JSXElement(e.opening, e.children, e.closing)); e = t[t.length - 1], e.children.push(s), t.pop(); } else break; } } return e; }, t.prototype.parseJSXElement = function() { var e = this.createJSXNode(), t = this.parseJSXOpeningElement(), n = [], r = null; if (!t.selfClosing) { var i = this.parseComplexJSXElement({ node: e, opening: t, closing: r, children: n }); n = i.children, r = i.closing; } return this.finalize(e, new a.JSXElement(t, n, r)); }, t.prototype.parseJSXRoot = function() { this.config.tokens && this.tokens.pop(), this.startJSX(); var e = this.parseJSXElement(); return this.finishJSX(), e; }, t.prototype.isStartOfExpression = function() { return e.prototype.isStartOfExpression.call(this) || this.match(`<`); }, t; }(c.Parser); }, function(e, t) { Object.defineProperty(t, "__esModule", { value: !0 }); var n = { NonAsciiIdentifierStart: /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]/, NonAsciiIdentifierPart: /[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8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-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE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9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/ }; t.Character = { fromCodePoint: function(e) { return e < 65536 ? String.fromCharCode(e) : String.fromCharCode(55296 + (e - 65536 >> 10)) + String.fromCharCode(56320 + (e - 65536 & 1023)); }, isWhiteSpace: function(e) { return e === 32 || e === 9 || e === 11 || e === 12 || e === 160 || e >= 5760 && [ 5760, 8192, 8193, 8194, 8195, 8196, 8197, 8198, 8199, 8200, 8201, 8202, 8239, 8287, 12288, 65279 ].indexOf(e) >= 0; }, isLineTerminator: function(e) { return e === 10 || e === 13 || e === 8232 || e === 8233; }, isIdentifierStart: function(e) { return e === 36 || e === 95 || e >= 65 && e <= 90 || e >= 97 && e <= 122 || e === 92 || e >= 128 && n.NonAsciiIdentifierStart.test(t.Character.fromCodePoint(e)); }, isIdentifierPart: function(e) { return e === 36 || e === 95 || e >= 65 && e <= 90 || e >= 97 && e <= 122 || e >= 48 && e <= 57 || e === 92 || e >= 128 && n.NonAsciiIdentifierPart.test(t.Character.fromCodePoint(e)); }, isDecimalDigit: function(e) { return e >= 48 && e <= 57; }, isHexDigit: function(e) { return e >= 48 && e <= 57 || e >= 65 && e <= 70 || e >= 97 && e <= 102; }, isOctalDigit: function(e) { return e >= 48 && e <= 55; } }; }, function(e, t, n) { Object.defineProperty(t, "__esModule", { value: !0 }); var r = n(6); t.JSXClosingElement = function() { function e(e) { this.type = r.JSXSyntax.JSXClosingElement, this.name = e; } return e; }(), t.JSXElement = function() { function e(e, t, n) { this.type = r.JSXSyntax.JSXElement, this.openingElement = e, this.children = t, this.closingElement = n; } return e; }(), t.JSXEmptyExpression = function() { function e() { this.type = r.JSXSyntax.JSXEmptyExpression; } return e; }(), t.JSXExpressionContainer = function() { function e(e) { this.type = r.JSXSyntax.JSXExpressionContainer, this.expression = e; } return e; }(), t.JSXIdentifier = function() { function e(e) { this.type = r.JSXSyntax.JSXIdentifier, this.name = e; } return e; }(), t.JSXMemberExpression = function() { function e(e, t) { this.type = r.JSXSyntax.JSXMemberExpression, this.object = e, this.property = t; } return e; }(), t.JSXAttribute = function() { function e(e, t) { this.type = r.JSXSyntax.JSXAttribute, this.name = e, this.value = t; } return e; }(), t.JSXNamespacedName = function() { function e(e, t) { this.type = r.JSXSyntax.JSXNamespacedName, this.namespace = e, this.name = t; } return e; }(), t.JSXOpeningElement = function() { function e(e, t, n) { this.type = r.JSXSyntax.JSXOpeningElement, this.name = e, this.selfClosing = t, this.attributes = n; } return e; }(), t.JSXSpreadAttribute = function() { function e(e) { this.type = r.JSXSyntax.JSXSpreadAttribute, this.argument = e; } return e; }(), t.JSXText = function() { function e(e, t) { this.type = r.JSXSyntax.JSXText, this.value = e, this.raw = t; } return e; }(); }, function(e, t) { Object.defineProperty(t, "__esModule", { value: !0 }), t.JSXSyntax = { JSXAttribute: `JSXAttribute`, JSXClosingElement: `JSXClosingElement`, JSXElement: `JSXElement`, JSXEmptyExpression: `JSXEmptyExpression`, JSXExpressionContainer: `JSXExpressionContainer`, JSXIdentifier: `JSXIdentifier`, JSXMemberExpression: `JSXMemberExpression`, JSXNamespacedName: `JSXNamespacedName`, JSXOpeningElement: `JSXOpeningElement`, JSXSpreadAttribute: `JSXSpreadAttribute`, JSXText: `JSXText` }; }, function(e, t, n) { Object.defineProperty(t, "__esModule", { value: !0 }); var r = n(2); t.ArrayExpression = function() { function e(e) { this.type = r.Syntax.ArrayExpression, this.elements = e; } return e; }(), t.ArrayPattern = function() { function e(e) { this.type = r.Syntax.ArrayPattern, this.elements = e; } return e; }(), t.ArrowFunctionExpression = function() { function e(e, t, n) { this.type = r.Syntax.ArrowFunctionExpression, this.id = null, this.params = e, this.body = t, this.generator = !1, this.expression = n, this.async = !1; } return e; }(), t.AssignmentExpression = function() { function e(e, t, n) { this.type = r.Syntax.AssignmentExpression, this.operator = e, this.left = t, this.right = n; } return e; }(), t.AssignmentPattern = function() { function e(e, t) { this.type = r.Syntax.AssignmentPattern, this.left = e, this.right = t; } return e; }(), t.AsyncArrowFunctionExpression = function() { function e(e, t, n) { this.type = r.Syntax.ArrowFunctionExpression, this.id = null, this.params = e, this.body = t, this.generator = !1, this.expression = n, this.async = !0; } return e; }(), t.AsyncFunctionDeclaration = function() { function e(e, t, n) { this.type = r.Syntax.FunctionDeclaration, this.id = e, this.params = t, this.body = n, this.generator = !1, this.expression = !1, this.async = !0; } return e; }(), t.AsyncFunctionExpression = function() { function e(e, t, n) { this.type = r.Syntax.FunctionExpression, this.id = e, this.params = t, this.body = n, this.generator = !1, this.expression = !1, this.async = !0; } return e; }(), t.AwaitExpression = function() { function e(e) { this.type = r.Syntax.AwaitExpression, this.argument = e; } return e; }(), t.BinaryExpression = function() { function e(e, t, n) { var i = e === `||` || e === `&&`; this.type = i ? r.Syntax.LogicalExpression : r.Syntax.BinaryExpression, this.operator = e, this.left = t, this.right = n; } return e; }(), t.BlockStatement = function() { function e(e) { this.type = r.Syntax.BlockStatement, this.body = e; } return e; }(), t.BreakStatement = function() { function e(e) { this.type = r.Syntax.BreakStatement, this.label = e; } return e; }(), t.CallExpression = function() { function e(e, t) { this.type = r.Syntax.CallExpression, this.callee = e, this.arguments = t; } return e; }(), t.CatchClause = function() { function e(e, t) { this.type = r.Syntax.CatchClause, this.param = e, this.body = t; } return e; }(), t.ClassBody = function() { function e(e) { this.type = r.Syntax.ClassBody, this.body = e; } return e; }(), t.ClassDeclaration = function() { function e(e, t, n) { this.type = r.Syntax.ClassDeclaration, this.id = e, this.superClass = t, this.body = n; } return e; }(), t.ClassExpression = function() { function e(e, t, n) { this.type = r.Syntax.ClassExpression, this.id = e, this.superClass = t, this.body = n; } return e; }(), t.ComputedMemberExpression = function() { function e(e, t) { this.type = r.Syntax.MemberExpression, this.computed = !0, this.object = e, this.property = t; } return e; }(), t.ConditionalExpression = function() { function e(e, t, n) { this.type = r.Syntax.ConditionalExpression, this.test = e, this.consequent = t, this.alternate = n; } return e; }(), t.ContinueStatement = function() { function e(e) { this.type = r.Syntax.ContinueStatement, this.label = e; } return e; }(), t.DebuggerStatement = function() { function e() { this.type = r.Syntax.DebuggerStatement; } return e; }(), t.Directive = function() { function e(e, t) { this.type = r.Syntax.ExpressionStatement, this.expression = e, this.directive = t; } return e; }(), t.DoWhileStatement = function() { function e(e, t) { this.type = r.Syntax.DoWhileStatement, this.body = e, this.test = t; } return e; }(), t.EmptyStatement = function() { function e() { this.type = r.Syntax.EmptyStatement; } return e; }(), t.ExportAllDeclaration = function() { function e(e) { this.type = r.Syntax.ExportAllDeclaration, this.source = e; } return e; }(), t.ExportDefaultDeclaration = function() { function e(e) { this.type = r.Syntax.ExportDefaultDeclaration, this.declaration = e; } return e; }(), t.ExportNamedDeclaration = function() { function e(e, t, n) { this.type = r.Syntax.ExportNamedDeclaration, this.declaration = e, this.specifiers = t, this.source = n; } return e; }(), t.ExportSpecifier = function() { function e(e, t) { this.type = r.Syntax.ExportSpecifier, this.exported = t, this.local = e; } return e; }(), t.ExpressionStatement = function() { function e(e) { this.type = r.Syntax.ExpressionStatement, this.expression = e; } return e; }(), t.ForInStatement = function() { function e(e, t, n) { this.type = r.Syntax.ForInStatement, this.left = e, this.right = t, this.body = n, this.each = !1; } return e; }(), t.ForOfStatement = function() { function e(e, t, n) { this.type = r.Syntax.ForOfStatement, this.left = e, this.right = t, this.body = n; } return e; }(), t.ForStatement = function() { function e(e, t, n, i) { this.type = r.Syntax.ForStatement, this.init = e, this.test = t, this.update = n, this.body = i; } return e; }(), t.FunctionDeclaration = function() { function e(e, t, n, i) { this.type = r.Syntax.FunctionDeclaration, this.id = e, this.params = t, this.body = n, this.generator = i, this.expression = !1, this.async = !1; } return e; }(), t.FunctionExpression = function() { function e(e, t, n, i) { this.type = r.Syntax.FunctionExpression, this.id = e, this.params = t, this.body = n, this.generator = i, this.expression = !1, this.async = !1; } return e; }(), t.Identifier = function() { function e(e) { this.type = r.Syntax.Identifier, this.name = e; } return e; }(), t.IfStatement = function() { function e(e, t, n) { this.type = r.Syntax.IfStatement, this.test = e, this.consequent = t, this.alternate = n; } return e; }(), t.ImportDeclaration = function() { function e(e, t) { this.type = r.Syntax.ImportDeclaration, this.specifiers = e, this.source = t; } return e; }(), t.ImportDefaultSpecifier = function() { function e(e) { this.type = r.Syntax.ImportDefaultSpecifier, this.local = e; } return e; }(), t.ImportNamespaceSpecifier = function() { function e(e) { this.type = r.Syntax.ImportNamespaceSpecifier, this.local = e; } return e; }(), t.ImportSpecifier = function() { function e(e, t) { this.type = r.Syntax.ImportSpecifier, this.local = e, this.imported = t; } return e; }(), t.LabeledStatement = function() { function e(e, t) { this.type = r.Syntax.LabeledStatement, this.label = e, this.body = t; } return e; }(), t.Literal = function() { function e(e, t) { this.type = r.Syntax.Literal, this.value = e, this.raw = t; } return e; }(), t.MetaProperty = function() { function e(e, t) { this.type = r.Syntax.MetaProperty, this.meta = e, this.property = t; } return e; }(), t.MethodDefinition = function() { function e(e, t, n, i, a) { this.type = r.Syntax.MethodDefinition, this.key = e, this.computed = t, this.value = n, this.kind = i, this.static = a; } return e; }(), t.Module = function() { function e(e) { this.type = r.Syntax.Program, this.body = e, this.sourceType = `module`; } return e; }(), t.NewExpression = function() { function e(e, t) { this.type = r.Syntax.NewExpression, this.callee = e, this.arguments = t; } return e; }(), t.ObjectExpression = function() { function e(e) { this.type = r.Syntax.ObjectExpression, this.properties = e; } return e; }(), t.ObjectPattern = function() { function e(e) { this.type = r.Syntax.ObjectPattern, this.properties = e; } return e; }(), t.Property = function() { function e(e, t, n, i, a, o) { this.type = r.Syntax.Property, this.key = t, this.computed = n, this.value = i, this.kind = e, this.method = a, this.shorthand = o; } return e; }(), t.RegexLiteral = function() { function e(e, t, n, i) { this.type = r.Syntax.Literal, this.value = e, this.raw = t, this.regex = { pattern: n, flags: i }; } return e; }(), t.RestElement = function() { function e(e) { this.type = r.Syntax.RestElement, this.argument = e; } return e; }(), t.ReturnStatement = function() { function e(e) { this.type = r.Syntax.ReturnStatement, this.argument = e; } return e; }(), t.Script = function() { function e(e) { this.type = r.Syntax.Program, this.body = e, this.sourceType = `script`; } return e; }(), t.SequenceExpression = function() { function e(e) { this.type = r.Syntax.SequenceExpression, this.expressions = e; } return e; }(), t.SpreadElement = function() { function e(e) { this.type = r.Syntax.SpreadElement, this.argument = e; } return e; }(), t.StaticMemberExpression = function() { function e(e, t) { this.type = r.Syntax.MemberExpression, this.computed = !1, this.object = e, this.property = t; } return e; }(), t.Super = function() { function e() { this.type = r.Syntax.Super; } return e; }(), t.SwitchCase = function() { function e(e, t) { this.type = r.Syntax.SwitchCase, this.test = e, this.consequent = t; } return e; }(), t.SwitchStatement = function() { function e(e, t) { this.type = r.Syntax.SwitchStatement, this.discriminant = e, this.cases = t; } return e; }(), t.TaggedTemplateExpression = function() { function e(e, t) { this.type = r.Syntax.TaggedTemplateExpression, this.tag = e, this.quasi = t; } return e; }(), t.TemplateElement = function() { function e(e, t) { this.type = r.Syntax.TemplateElement, this.value = e, this.tail = t; } return e; }(), t.TemplateLiteral = function() { function e(e, t) { this.type = r.Syntax.TemplateLiteral, this.quasis = e, this.expressions = t; } return e; }(), t.ThisExpression = function() { function e() { this.type = r.Syntax.ThisExpression; } return e; }(), t.ThrowStatement = function() { function e(e) { this.type = r.Syntax.ThrowStatement, this.argument = e; } return e; }(), t.TryStatement = function() { function e(e, t, n) { this.type = r.Syntax.TryStatement, this.block = e, this.handler = t, this.finalizer = n; } return e; }(), t.UnaryExpression = function() { function e(e, t) { this.type = r.Syntax.UnaryExpression, this.operator = e, this.argument = t, this.prefix = !0; } return e; }(), t.UpdateExpression = function() { function e(e, t, n) { this.type = r.Syntax.UpdateExpression, this.operator = e, this.argument = t, this.prefix = n; } return e; }(), t.VariableDeclaration = function() { function e(e, t) { this.type = r.Syntax.VariableDeclaration, this.declarations = e, this.kind = t; } return e; }(), t.VariableDeclarator = function() { function e(e, t) { this.type = r.Syntax.VariableDeclarator, this.id = e, this.init = t; } return e; }(), t.WhileStatement = function() { function e(e, t) { this.type = r.Syntax.WhileStatement, this.test = e, this.body = t; } return e; }(), t.WithStatement = function() { function e(e, t) { this.type = r.Syntax.WithStatement, this.object = e, this.body = t; } return e; }(), t.YieldExpression = function() { function e(e, t) { this.type = r.Syntax.YieldExpression, this.argument = e, this.delegate = t; } return e; }(); }, function(e, t, n) { Object.defineProperty(t, "__esModule", { value: !0 }); var r = n(9), i = n(10), a = n(11), o = n(7), s = n(12), c = n(2), l = n(13), u = `ArrowParameterPlaceHolder`; t.Parser = function() { function e(e, t, n) { t === void 0 && (t = {}), this.config = { range: typeof t.range == `boolean` && t.range, loc: typeof t.loc == `boolean` && t.loc, source: null, tokens: typeof t.tokens == `boolean` && t.tokens, comment: typeof t.comment == `boolean` && t.comment, tolerant: typeof t.tolerant == `boolean` && t.tolerant }, this.config.loc && t.source && t.source !== null && (this.config.source = String(t.source)), this.delegate = n, this.errorHandler = new i.ErrorHandler(), this.errorHandler.tolerant = this.config.tolerant, this.scanner = new s.Scanner(e, this.errorHandler), this.scanner.trackComment = this.config.comment, this.operatorPrecedence = { ")": 0, ";": 0, ",": 0, "=": 0, "]": 0, "||": 1, "&&": 2, "|": 3, "^": 4, "&": 5, "==": 6, "!=": 6, "===": 6, "!==": 6, "<": 7, ">": 7, "<=": 7, ">=": 7, "<<": 8, ">>": 8, ">>>": 8, "+": 9, "-": 9, "*": 11, "/": 11, "%": 11 }, this.lookahead = { type: 2, value: ``, lineNumber: this.scanner.lineNumber, lineStart: 0, start: 0, end: 0 }, this.hasLineTerminator = !1, this.context = { isModule: !1, await: !1, allowIn: !0, allowStrictDirective: !0, allowYield: !0, firstCoverInitializedNameError: null, isAssignmentTarget: !1, isBindingElement: !1, inFunctionBody: !1, inIteration: !1, inSwitch: !1, labelSet: {}, strict: !1 }, this.tokens = [], this.startMarker = { index: 0, line: this.scanner.lineNumber, column: 0 }, this.lastMarker = { index: 0, line: this.scanner.lineNumber, column: 0 }, this.nextToken(), this.lastMarker = { index: this.scanner.index, line: this.scanner.lineNumber, column: this.scanner.index - this.scanner.lineStart }; } return e.prototype.throwError = function(e) { var t = Array.prototype.slice.call(arguments, 1), n = e.replace(/%(\d)/g, function(e, n) { return r.assert(n < t.length, `Message reference must be in range`), t[n]; }), i = this.lastMarker.index, a = this.lastMarker.line, o = this.lastMarker.column + 1; throw this.errorHandler.createError(i, a, o, n); }, e.prototype.tolerateError = function(e) { var t = Array.prototype.slice.call(arguments, 1), n = e.replace(/%(\d)/g, function(e, n) { return r.assert(n < t.length, `Message reference must be in range`), t[n]; }), i = this.lastMarker.index, a = this.scanner.lineNumber, o = this.lastMarker.column + 1; this.errorHandler.tolerateError(i, a, o, n); }, e.prototype.unexpectedTokenError = function(e, t) { var n = t || a.Messages.UnexpectedToken, r; if (e ? (t || (n = e.type === 2 ? a.Messages.UnexpectedEOS : e.type === 3 ? a.Messages.UnexpectedIdentifier : e.type === 6 ? a.Messages.UnexpectedNumber : e.type === 8 ? a.Messages.UnexpectedString : e.type === 10 ? a.Messages.UnexpectedTemplate : a.Messages.UnexpectedToken, e.type === 4 && (this.scanner.isFutureReservedWord(e.value) ? n = a.Messages.UnexpectedReserved : this.context.strict && this.scanner.isStrictModeReservedWord(e.value) && (n = a.Messages.StrictReservedWord))), r = e.value) : r = `ILLEGAL`, n = n.replace(`%0`, r), e && typeof e.lineNumber == `number`) { var i = e.start, o = e.lineNumber, s = this.lastMarker.index - this.lastMarker.column, c = e.start - s + 1; return this.errorHandler.createError(i, o, c, n); } else { var i = this.lastMarker.index, o = this.lastMarker.line, c = this.lastMarker.column + 1; return this.errorHandler.createError(i, o, c, n); } }, e.prototype.throwUnexpectedToken = function(e, t) { throw this.unexpectedTokenError(e, t); }, e.prototype.tolerateUnexpectedToken = function(e, t) { this.errorHandler.tolerate(this.unexpectedTokenError(e, t)); }, e.prototype.collectComments = function() { if (!this.config.comment) this.scanner.scanComments(); else { var e = this.scanner.scanComments(); if (e.length > 0 && this.delegate) for (var t = 0; t < e.length; ++t) { var n = e[t], r = void 0; r = { type: n.multiLine ? `BlockComment` : `LineComment`, value: this.scanner.source.slice(n.slice[0], n.slice[1]) }, this.config.range && (r.range = n.range), this.config.loc && (r.loc = n.loc); var i = { start: { line: n.loc.start.line, column: n.loc.start.column, offset: n.range[0] }, end: { line: n.loc.end.line, column: n.loc.end.column, offset: n.range[1] } }; this.delegate(r, i); } } }, e.prototype.getTokenRaw = function(e) { return this.scanner.source.slice(e.start, e.end); }, e.prototype.convertToken = function(e) { var t = { type: l.TokenName[e.type], value: this.getTokenRaw(e) }; return this.config.range && (t.range = [e.start, e.end]), this.config.loc && (t.loc = { start: { line: this.startMarker.line, column: this.startMarker.column }, end: { line: this.scanner.lineNumber, column: this.scanner.index - this.scanner.lineStart } }), e.type === 9 && (t.regex = { pattern: e.pattern, flags: e.flags }), t; }, e.prototype.nextToken = function() { var e = this.lookahead; this.lastMarker.index = this.scanner.index, this.lastMarker.line = this.scanner.lineNumber, this.lastMarker.column = this.scanner.index - this.scanner.lineStart, this.collectComments(), this.scanner.index !== this.startMarker.index && (this.startMarker.index = this.scanner.index, this.startMarker.line = this.scanner.lineNumber, this.startMarker.column = this.scanner.index - this.scanner.lineStart); var t = this.scanner.lex(); return this.hasLineTerminator = e.lineNumber !== t.lineNumber, t && this.context.strict && t.type === 3 && this.scanner.isStrictModeReservedWord(t.value) && (t.type = 4), this.lookahead = t, this.config.tokens && t.type !== 2 && this.tokens.push(this.convertToken(t)), e; }, e.prototype.nextRegexToken = function() { this.collectComments(); var e = this.scanner.scanRegExp(); return this.config.tokens && (this.tokens.pop(), this.tokens.push(this.convertToken(e))), this.lookahead = e, this.nextToken(), e; }, e.prototype.createNode = function() { return { index: this.startMarker.index, line: this.startMarker.line, column: this.startMarker.column }; }, e.prototype.startNode = function(e, t) { t === void 0 && (t = 0); var n = e.start - e.lineStart, r = e.lineNumber; return n < 0 && (n += t, r--), { index: e.start, line: r, column: n }; }, e.prototype.finalize = function(e, t) { if (this.config.range && (t.range = [e.index, this.lastMarker.index]), this.config.loc && (t.loc = { start: { line: e.line, column: e.column }, end: { line: this.lastMarker.line, column: this.lastMarker.column } }, this.config.source && (t.loc.source = this.config.source)), this.delegate) { var n = { start: { line: e.line, column: e.column, offset: e.index }, end: { line: this.lastMarker.line, column: this.lastMarker.column, offset: this.lastMarker.index } }; this.delegate(t, n); } return t; }, e.prototype.expect = function(e) { var t = this.nextToken(); (t.type !== 7 || t.value !== e) && this.throwUnexpectedToken(t); }, e.prototype.expectCommaSeparator = function() { if (this.config.tolerant) { var e = this.lookahead; e.type === 7 && e.value === `,` ? this.nextToken() : e.type === 7 && e.value === `;` ? (this.nextToken(), this.tolerateUnexpectedToken(e)) : this.tolerateUnexpectedToken(e, a.Messages.UnexpectedToken); } else this.expect(`,`); }, e.prototype.expectKeyword = function(e) { var t = this.nextToken(); (t.type !== 4 || t.value !== e) && this.throwUnexpectedToken(t); }, e.prototype.match = function(e) { return this.lookahead.type === 7 && this.lookahead.value === e; }, e.prototype.matchKeyword = function(e) { return this.lookahead.type === 4 && this.lookahead.value === e; }, e.prototype.matchContextualKeyword = function(e) { return this.lookahead.type === 3 && this.lookahead.value === e; }, e.prototype.matchAssign = function() { if (this.lookahead.type !== 7) return !1; var e = this.lookahead.value; return e === `=` || e === `*=` || e === `**=` || e === `/=` || e === `%=` || e === `+=` || e === `-=` || e === `<<=` || e === `>>=` || e === `>>>=` || e === `&=` || e === `^=` || e === `|=`; }, e.prototype.isolateCoverGrammar = function(e) { var t = this.context.isBindingElement, n = this.context.isAssignmentTarget, r = this.context.firstCoverInitializedNameError; this.context.isBindingElement = !0, this.context.isAssignmentTarget = !0, this.context.firstCoverInitializedNameError = null; var i = e.call(this); return this.context.firstCoverInitializedNameError !== null && this.throwUnexpectedToken(this.context.firstCoverInitializedNameError), this.context.isBindingElement = t, this.context.isAssignmentTarget = n, this.context.firstCoverInitializedNameError = r, i; }, e.prototype.inheritCoverGrammar = function(e) { var t = this.context.isBindingElement, n = this.context.isAssignmentTarget, r = this.context.firstCoverInitializedNameError; this.context.isBindingElement = !0, this.context.isAssignmentTarget = !0, this.context.firstCoverInitializedNameError = null; var i = e.call(this); return this.context.isBindingElement = this.context.isBindingElement && t, this.context.isAssignmentTarget = this.context.isAssignmentTarget && n, this.context.firstCoverInitializedNameError = r || this.context.firstCoverInitializedNameError, i; }, e.prototype.consumeSemicolon = function() { this.match(`;`) ? this.nextToken() : this.hasLineTerminator || (this.lookahead.type !== 2 && !this.match(`}`) && this.throwUnexpectedToken(this.lookahead), this.lastMarker.index = this.startMarker.index, this.lastMarker.line = this.startMarker.line, this.lastMarker.column = this.startMarker.column); }, e.prototype.parsePrimaryExpression = function() { var e = this.createNode(), t, n, r; switch (this.lookahead.type) { case 3: (this.context.isModule || this.context.await) && this.lookahead.value === `await` && this.tolerateUnexpectedToken(this.lookahead), t = this.matchAsyncFunction() ? this.parseFunctionExpression() : this.finalize(e, new o.Identifier(this.nextToken().value)); break; case 6: case 8: this.context.strict && this.lookahead.octal && this.tolerateUnexpectedToken(this.lookahead, a.Messages.StrictOctalLiteral), this.context.isAssignmentTarget = !1, this.context.isBindingElement = !1, n = this.nextToken(), r = this.getTokenRaw(n), t = this.finalize(e, new o.Literal(n.value, r)); break; case 1: this.context.isAssignmentTarget = !1, this.context.isBindingElement = !1, n = this.nextToken(), r = this.getTokenRaw(n), t = this.finalize(e, new o.Literal(n.value === `true`, r)); break; case 5: this.context.isAssignmentTarget = !1, this.context.isBindingElement = !1, n = this.nextToken(), r = this.getTokenRaw(n), t = this.finalize(e, new o.Literal(null, r)); break; case 10: t = this.parseTemplateLiteral(); break; case 7: switch (this.lookahead.value) { case `(`: this.context.isBindingElement = !1, t = this.inheritCoverGrammar(this.parseGroupExpression); break; case `[`: t = this.inheritCoverGrammar(this.parseArrayInitializer); break; case `{`: t = this.inheritCoverGrammar(this.parseObjectInitializer); break; case `/`: case `/=`: this.context.isAssignmentTarget = !1, this.context.isBindingElement = !1, this.scanner.index = this.startMarker.index, n = this.nextRegexToken(), r = this.getTokenRaw(n), t = this.finalize(e, new o.RegexLiteral(n.regex, r, n.pattern, n.flags)); break; default: t = this.throwUnexpectedToken(this.nextToken()); } break; case 4: !this.context.strict && this.context.allowYield && this.matchKeyword(`yield`) ? t = this.parseIdentifierName() : !this.context.strict && this.matchKeyword(`let`) ? t = this.finalize(e, new o.Identifier(this.nextToken().value)) : (this.context.isAssignmentTarget = !1, this.context.isBindingElement = !1, this.matchKeyword(`function`) ? t = this.parseFunctionExpression() : this.matchKeyword(`this`) ? (this.nextToken(), t = this.finalize(e, new o.ThisExpression())) : t = this.matchKeyword(`class`) ? this.parseClassExpression() : this.throwUnexpectedToken(this.nextToken())); break; default: t = this.throwUnexpectedToken(this.nextToken()); } return t; }, e.prototype.parseSpreadElement = function() { var e = this.createNode(); this.expect(`...`); var t = this.inheritCoverGrammar(this.parseAssignmentExpression); return this.finalize(e, new o.SpreadElement(t)); }, e.prototype.parseArrayInitializer = function() { var e = this.createNode(), t = []; for (this.expect(`[`); !this.match(`]`);) if (this.match(`,`)) this.nextToken(), t.push(null); else if (this.match(`...`)) { var n = this.parseSpreadElement(); this.match(`]`) || (this.context.isAssignmentTarget = !1, this.context.isBindingElement = !1, this.expect(`,`)), t.push(n); } else t.push(this.inheritCoverGrammar(this.parseAssignmentExpression)), this.match(`]`) || this.expect(`,`); return this.expect(`]`), this.finalize(e, new o.ArrayExpression(t)); }, e.prototype.parsePropertyMethod = function(e) { this.context.isAssignmentTarget = !1, this.context.isBindingElement = !1; var t = this.context.strict, n = this.context.allowStrictDirective; this.context.allowStrictDirective = e.simple; var r = this.isolateCoverGrammar(this.parseFunctionSourceElements); return this.context.strict && e.firstRestricted && this.tolerateUnexpectedToken(e.firstRestricted, e.message), this.context.strict && e.stricted && this.tolerateUnexpectedToken(e.stricted, e.message), this.context.strict = t, this.context.allowStrictDirective = n, r; }, e.prototype.parsePropertyMethodFunction = function() { var e = !1, t = this.createNode(), n = this.context.allowYield; this.context.allowYield = !0; var r = this.parseFormalParameters(), i = this.parsePropertyMethod(r); return this.context.allowYield = n, this.finalize(t, new o.FunctionExpression(null, r.params, i, e)); }, e.prototype.parsePropertyMethodAsyncFunction = function() { var e = this.createNode(), t = this.context.allowYield, n = this.context.await; this.context.allowYield = !1, this.context.await = !0; var r = this.parseFormalParameters(), i = this.parsePropertyMethod(r); return this.context.allowYield = t, this.context.await = n, this.finalize(e, new o.AsyncFunctionExpression(null, r.params, i)); }, e.prototype.parseObjectPropertyKey = function() { var e = this.createNode(), t = this.nextToken(), n; switch (t.type) { case 8: case 6: this.context.strict && t.octal && this.tolerateUnexpectedToken(t, a.Messages.StrictOctalLiteral); var r = this.getTokenRaw(t); n = this.finalize(e, new o.Literal(t.value, r)); break; case 3: case 1: case 5: case 4: n = this.finalize(e, new o.Identifier(t.value)); break; case 7: t.value === `[` ? (n = this.isolateCoverGrammar(this.parseAssignmentExpression), this.expect(`]`)) : n = this.throwUnexpectedToken(t); break; default: n = this.throwUnexpectedToken(t); } return n; }, e.prototype.isPropertyKey = function(e, t) { return e.type === c.Syntax.Identifier && e.name === t || e.type === c.Syntax.Literal && e.value === t; }, e.prototype.parseObjectProperty = function(e) { var t = this.createNode(), n = this.lookahead, r, i = null, s = null, c = !1, l = !1, u = !1, d = !1; if (n.type === 3) { var f = n.value; this.nextToken(), c = this.match(`[`), d = !this.hasLineTerminator && f === `async` && !this.match(`:`) && !this.match(`(`) && !this.match(`*`) && !this.match(`,`), i = d ? this.parseObjectPropertyKey() : this.finalize(t, new o.Identifier(f)); } else this.match(`*`) ? this.nextToken() : (c = this.match(`[`), i = this.parseObjectPropertyKey()); var p = this.qualifiedPropertyName(this.lookahead); if (n.type === 3 && !d && n.value === `get` && p) r = `get`, c = this.match(`[`), i = this.parseObjectPropertyKey(), this.context.allowYield = !1, s = this.parseGetterMethod(); else if (n.type === 3 && !d && n.value === `set` && p) r = `set`, c = this.match(`[`), i = this.parseObjectPropertyKey(), s = this.parseSetterMethod(); else if (n.type === 7 && n.value === `*` && p) r = `init`, c = this.match(`[`), i = this.parseObjectPropertyKey(), s = this.parseGeneratorMethod(), l = !0; else if (i || this.throwUnexpectedToken(this.lookahead), r = `init`, this.match(`:`) && !d) !c && this.isPropertyKey(i, `__proto__`) && (e.value && this.tolerateError(a.Messages.DuplicateProtoProperty), e.value = !0), this.nextToken(), s = this.inheritCoverGrammar(this.parseAssignmentExpression); else if (this.match(`(`)) s = d ? this.parsePropertyMethodAsyncFunction() : this.parsePropertyMethodFunction(), l = !0; else if (n.type === 3) { var f = this.finalize(t, new o.Identifier(n.value)); if (this.match(`=`)) { this.context.firstCoverInitializedNameError = this.lookahead, this.nextToken(), u = !0; var m = this.isolateCoverGrammar(this.parseAssignmentExpression); s = this.finalize(t, new o.AssignmentPattern(f, m)); } else u = !0, s = f; } else this.throwUnexpectedToken(this.nextToken()); return this.finalize(t, new o.Property(r, i, c, s, l, u)); }, e.prototype.parseObjectInitializer = function() { var e = this.createNode(); this.expect(`{`); for (var t = [], n = { value: !1 }; !this.match(`}`);) t.push(this.parseObjectProperty(n)), this.match(`}`) || this.expectCommaSeparator(); return this.expect(`}`), this.finalize(e, new o.ObjectExpression(t)); }, e.prototype.parseTemplateHead = function() { r.assert(this.lookahead.head, `Template literal must start with a template head`); var e = this.createNode(), t = this.nextToken(), n = t.value, i = t.cooked; return this.finalize(e, new o.TemplateElement({ raw: n, cooked: i }, t.tail)); }, e.prototype.parseTemplateElement = function() { this.lookahead.type !== 10 && this.throwUnexpectedToken(); var e = this.createNode(), t = this.nextToken(), n = t.value, r = t.cooked; return this.finalize(e, new o.TemplateElement({ raw: n, cooked: r }, t.tail)); }, e.prototype.parseTemplateLiteral = function() { var e = this.createNode(), t = [], n = [], r = this.parseTemplateHead(); for (n.push(r); !r.tail;) t.push(this.parseExpression()), r = this.parseTemplateElement(), n.push(r); return this.finalize(e, new o.TemplateLiteral(n, t)); }, e.prototype.reinterpretExpressionAsPattern = function(e) { switch (e.type) { case c.Syntax.Identifier: case c.Syntax.MemberExpression: case c.Syntax.RestElement: case c.Syntax.AssignmentPattern: break; case c.Syntax.SpreadElement: e.type = c.Syntax.RestElement, this.reinterpretExpressionAsPattern(e.argument); break; case c.Syntax.ArrayExpression: e.type = c.Syntax.ArrayPattern; for (var t = 0; t < e.elements.length; t++) e.elements[t] !== null && this.reinterpretExpressionAsPattern(e.elements[t]); break; case c.Syntax.ObjectExpression: e.type = c.Syntax.ObjectPattern; for (var t = 0; t < e.properties.length; t++) this.reinterpretExpressionAsPattern(e.properties[t].value); break; case c.Syntax.AssignmentExpression: e.type = c.Syntax.AssignmentPattern, delete e.operator, this.reinterpretExpressionAsPattern(e.left); break; default: break; } }, e.prototype.parseGroupExpression = function() { var e; if (this.expect(`(`), this.match(`)`)) this.nextToken(), this.match(`=>`) || this.expect(`=>`), e = { type: u, params: [], async: !1 }; else { var t = this.lookahead, n = []; if (this.match(`...`)) e = this.parseRestElement(n), this.expect(`)`), this.match(`=>`) || this.expect(`=>`), e = { type: u, params: [e], async: !1 }; else { var r = !1; if (this.context.isBindingElement = !0, e = this.inheritCoverGrammar(this.parseAssignmentExpression), this.match(`,`)) { var i = []; for (this.context.isAssignmentTarget = !1, i.push(e); this.lookahead.type !== 2 && this.match(`,`);) { if (this.nextToken(), this.match(`)`)) { this.nextToken(); for (var a = 0; a < i.length; a++) this.reinterpretExpressionAsPattern(i[a]); r = !0, e = { type: u, params: i, async: !1 }; } else if (this.match(`...`)) { this.context.isBindingElement || this.throwUnexpectedToken(this.lookahead), i.push(this.parseRestElement(n)), this.expect(`)`), this.match(`=>`) || this.expect(`=>`), this.context.isBindingElement = !1; for (var a = 0; a < i.length; a++) this.reinterpretExpressionAsPattern(i[a]); r = !0, e = { type: u, params: i, async: !1 }; } else i.push(this.inheritCoverGrammar(this.parseAssignmentExpression)); if (r) break; } r || (e = this.finalize(this.startNode(t), new o.SequenceExpression(i))); } if (!r) { if (this.expect(`)`), this.match(`=>`) && (e.type === c.Syntax.Identifier && e.name === `yield` && (r = !0, e = { type: u, params: [e], async: !1 }), !r)) { if (this.context.isBindingElement || this.throwUnexpectedToken(this.lookahead), e.type === c.Syntax.SequenceExpression) for (var a = 0; a < e.expressions.length; a++) this.reinterpretExpressionAsPattern(e.expressions[a]); else this.reinterpretExpressionAsPattern(e); e = { type: u, params: e.type === c.Syntax.SequenceExpression ? e.expressions : [e], async: !1 }; } this.context.isBindingElement = !1; } } } return e; }, e.prototype.parseArguments = function() { this.expect(`(`); var e = []; if (!this.match(`)`)) for (;;) { var t = this.match(`...`) ? this.parseSpreadElement() : this.isolateCoverGrammar(this.parseAssignmentExpression); if (e.push(t), this.match(`)`) || (this.expectCommaSeparator(), this.match(`)`))) break; } return this.expect(`)`), e; }, e.prototype.isIdentifierName = function(e) { return e.type === 3 || e.type === 4 || e.type === 1 || e.type === 5; }, e.prototype.parseIdentifierName = function() { var e = this.createNode(), t = this.nextToken(); return this.isIdentifierName(t) || this.throwUnexpectedToken(t), this.finalize(e, new o.Identifier(t.value)); }, e.prototype.parseNewExpression = function() { var e = this.createNode(), t = this.parseIdentifierName(); r.assert(t.name === `new`, "New expression must start with `new`"); var n; if (this.match(`.`)) if (this.nextToken(), this.lookahead.type === 3 && this.context.inFunctionBody && this.lookahead.value === `target`) { var i = this.parseIdentifierName(); n = new o.MetaProperty(t, i); } else this.throwUnexpectedToken(this.lookahead); else { var a = this.isolateCoverGrammar(this.parseLeftHandSideExpression), s = this.match(`(`) ? this.parseArguments() : []; n = new o.NewExpression(a, s), this.context.isAssignmentTarget = !1, this.context.isBindingElement = !1; } return this.finalize(e, n); }, e.prototype.parseAsyncArgument = function() { var e = this.parseAssignmentExpression(); return this.context.firstCoverInitializedNameError = null, e; }, e.prototype.parseAsyncArguments = function() { this.expect(`(`); var e = []; if (!this.match(`)`)) for (;;) { var t = this.match(`...`) ? this.parseSpreadElement() : this.isolateCoverGrammar(this.parseAsyncArgument); if (e.push(t), this.match(`)`) || (this.expectCommaSeparator(), this.match(`)`))) break; } return this.expect(`)`), e; }, e.prototype.parseLeftHandSideExpressionAllowCall = function() { var e = this.lookahead, t = this.matchContextualKeyword(`async`), n = this.context.allowIn; this.context.allowIn = !0; var r; for (this.matchKeyword(`super`) && this.context.inFunctionBody ? (r = this.createNode(), this.nextToken(), r = this.finalize(r, new o.Super()), !this.match(`(`) && !this.match(`.`) && !this.match(`[`) && this.throwUnexpectedToken(this.lookahead)) : r = this.inheritCoverGrammar(this.matchKeyword(`new`) ? this.parseNewExpression : this.parsePrimaryExpression);;) if (this.match(`.`)) { this.context.isBindingElement = !1, this.context.isAssignmentTarget = !0, this.expect(`.`); var i = this.parseIdentifierName(); r = this.finalize(this.startNode(e), new o.StaticMemberExpression(r, i)); } else if (this.match(`(`)) { var a = t && e.lineNumber === this.lookahead.lineNumber; this.context.isBindingElement = !1, this.context.isAssignmentTarget = !1; var s = a ? this.parseAsyncArguments() : this.parseArguments(); if (r = this.finalize(this.startNode(e), new o.CallExpression(r, s)), a && this.match(`=>`)) { for (var c = 0; c < s.length; ++c) this.reinterpretExpressionAsPattern(s[c]); r = { type: u, params: s, async: !0 }; } } else if (this.match(`[`)) { this.context.isBindingElement = !1, this.context.isAssignmentTarget = !0, this.expect(`[`); var i = this.isolateCoverGrammar(this.parseExpression); this.expect(`]`), r = this.finalize(this.startNode(e), new o.ComputedMemberExpression(r, i)); } else if (this.lookahead.type === 10 && this.lookahead.head) { var l = this.parseTemplateLiteral(); r = this.finalize(this.startNode(e), new o.TaggedTemplateExpression(r, l)); } else break; return this.context.allowIn = n, r; }, e.prototype.parseSuper = function() { var e = this.createNode(); return this.expectKeyword(`super`), !this.match(`[`) && !this.match(`.`) && this.throwUnexpectedToken(this.lookahead), this.finalize(e, new o.Super()); }, e.prototype.parseLeftHandSideExpression = function() { r.assert(this.context.allowIn, `callee of new expression always allow in keyword.`); for (var e = this.startNode(this.lookahead), t = this.matchKeyword(`super`) && this.context.inFunctionBody ? this.parseSuper() : this.inheritCoverGrammar(this.matchKeyword(`new`) ? this.parseNewExpression : this.parsePrimaryExpression);;) if (this.match(`[`)) { this.context.isBindingElement = !1, this.context.isAssignmentTarget = !0, this.expect(`[`); var n = this.isolateCoverGrammar(this.parseExpression); this.expect(`]`), t = this.finalize(e, new o.ComputedMemberExpression(t, n)); } else if (this.match(`.`)) { this.context.isBindingElement = !1, this.context.isAssignmentTarget = !0, this.expect(`.`); var n = this.parseIdentifierName(); t = this.finalize(e, new o.StaticMemberExpression(t, n)); } else if (this.lookahead.type === 10 && this.lookahead.head) { var i = this.parseTemplateLiteral(); t = this.finalize(e, new o.TaggedTemplateExpression(t, i)); } else break; return t; }, e.prototype.parseUpdateExpression = function() { var e, t = this.lookahead; if (this.match(`++`) || this.match(`--`)) { var n = this.startNode(t), r = this.nextToken(); e = this.inheritCoverGrammar(this.parseUnaryExpression), this.context.strict && e.type === c.Syntax.Identifier && this.scanner.isRestrictedWord(e.name) && this.tolerateError(a.Messages.StrictLHSPrefix), this.context.isAssignmentTarget || this.tolerateError(a.Messages.InvalidLHSInAssignment); var i = !0; e = this.finalize(n, new o.UpdateExpression(r.value, e, i)), this.context.isAssignmentTarget = !1, this.context.isBindingElement = !1; } else if (e = this.inheritCoverGrammar(this.parseLeftHandSideExpressionAllowCall), !this.hasLineTerminator && this.lookahead.type === 7 && (this.match(`++`) || this.match(`--`))) { this.context.strict && e.type === c.Syntax.Identifier && this.scanner.isRestrictedWord(e.name) && this.tolerateError(a.Messages.StrictLHSPostfix), this.context.isAssignmentTarget || this.tolerateError(a.Messages.InvalidLHSInAssignment), this.context.isAssignmentTarget = !1, this.context.isBindingElement = !1; var s = this.nextToken().value, i = !1; e = this.finalize(this.startNode(t), new o.UpdateExpression(s, e, i)); } return e; }, e.prototype.parseAwaitExpression = function() { var e = this.createNode(); this.nextToken(); var t = this.parseUnaryExpression(); return this.finalize(e, new o.AwaitExpression(t)); }, e.prototype.parseUnaryExpression = function() { var e; if (this.match(`+`) || this.match(`-`) || this.match(`~`) || this.match(`!`) || this.matchKeyword(`delete`) || this.matchKeyword(`void`) || this.matchKeyword(`typeof`)) { var t = this.startNode(this.lookahead), n = this.nextToken(); e = this.inheritCoverGrammar(this.parseUnaryExpression), e = this.finalize(t, new o.UnaryExpression(n.value, e)), this.context.strict && e.operator === `delete` && e.argument.type === c.Syntax.Identifier && this.tolerateError(a.Messages.StrictDelete), this.context.isAssignmentTarget = !1, this.context.isBindingElement = !1; } else e = this.context.await && this.matchContextualKeyword(`await`) ? this.parseAwaitExpression() : this.parseUpdateExpression(); return e; }, e.prototype.parseExponentiationExpression = function() { var e = this.lookahead, t = this.inheritCoverGrammar(this.parseUnaryExpression); if (t.type !== c.Syntax.UnaryExpression && this.match(`**`)) { this.nextToken(), this.context.isAssignmentTarget = !1, this.context.isBindingElement = !1; var n = t, r = this.isolateCoverGrammar(this.parseExponentiationExpression); t = this.finalize(this.startNode(e), new o.BinaryExpression(`**`, n, r)); } return t; }, e.prototype.binaryPrecedence = function(e) { var t = e.value; return e.type === 7 ? this.operatorPrecedence[t] || 0 : e.type === 4 && (t === `instanceof` || this.context.allowIn && t === `in`) ? 7 : 0; }, e.prototype.parseBinaryExpression = function() { var e = this.lookahead, t = this.inheritCoverGrammar(this.parseExponentiationExpression), n = this.lookahead, r = this.binaryPrecedence(n); if (r > 0) { this.nextToken(), this.context.isAssignmentTarget = !1, this.context.isBindingElement = !1; for (var i = [e, this.lookahead], a = t, s = this.isolateCoverGrammar(this.parseExponentiationExpression), c = [ a, n.value, s ], l = [r]; r = this.binaryPrecedence(this.lookahead), !(r <= 0);) { for (; c.length > 2 && r <= l[l.length - 1];) { s = c.pop(); var u = c.pop(); l.pop(), a = c.pop(), i.pop(); var d = this.startNode(i[i.length - 1]); c.push(this.finalize(d, new o.BinaryExpression(u, a, s))); } c.push(this.nextToken().value), l.push(r), i.push(this.lookahead), c.push(this.isolateCoverGrammar(this.parseExponentiationExpression)); } var f = c.length - 1; t = c[f]; for (var p = i.pop(); f > 1;) { var m = i.pop(), h = p && p.lineStart, d = this.startNode(m, h), u = c[f - 1]; t = this.finalize(d, new o.BinaryExpression(u, c[f - 2], t)), f -= 2, p = m; } } return t; }, e.prototype.parseConditionalExpression = function() { var e = this.lookahead, t = this.inheritCoverGrammar(this.parseBinaryExpression); if (this.match(`?`)) { this.nextToken(); var n = this.context.allowIn; this.context.allowIn = !0; var r = this.isolateCoverGrammar(this.parseAssignmentExpression); this.context.allowIn = n, this.expect(`:`); var i = this.isolateCoverGrammar(this.parseAssignmentExpression); t = this.finalize(this.startNode(e), new o.ConditionalExpression(t, r, i)), this.context.isAssignmentTarget = !1, this.context.isBindingElement = !1; } return t; }, e.prototype.checkPatternParam = function(e, t) { switch (t.type) { case c.Syntax.Identifier: this.validateParam(e, t, t.name); break; case c.Syntax.RestElement: this.checkPatternParam(e, t.argument); break; case c.Syntax.AssignmentPattern: this.checkPatternParam(e, t.left); break; case c.Syntax.ArrayPattern: for (var n = 0; n < t.elements.length; n++) t.elements[n] !== null && this.checkPatternParam(e, t.elements[n]); break; case c.Syntax.ObjectPattern: for (var n = 0; n < t.properties.length; n++) this.checkPatternParam(e, t.properties[n].value); break; default: break; } e.simple = e.simple && t instanceof o.Identifier; }, e.prototype.reinterpretAsCoverFormalsList = function(e) { var t = [e], n, r = !1; switch (e.type) { case c.Syntax.Identifier: break; case u: t = e.params, r = e.async; break; default: return null; } n = { simple: !0, paramSet: {} }; for (var i = 0; i < t.length; ++i) { var o = t[i]; o.type === c.Syntax.AssignmentPattern ? o.right.type === c.Syntax.YieldExpression && (o.right.argument && this.throwUnexpectedToken(this.lookahead), o.right.type = c.Syntax.Identifier, o.right.name = `yield`, delete o.right.argument, delete o.right.delegate) : r && o.type === c.Syntax.Identifier && o.name === `await` && this.throwUnexpectedToken(this.lookahead), this.checkPatternParam(n, o), t[i] = o; } if (this.context.strict || !this.context.allowYield) for (var i = 0; i < t.length; ++i) { var o = t[i]; o.type === c.Syntax.YieldExpression && this.throwUnexpectedToken(this.lookahead); } if (n.message === a.Messages.StrictParamDupe) { var s = this.context.strict ? n.stricted : n.firstRestricted; this.throwUnexpectedToken(s, n.message); } return { simple: n.simple, params: t, stricted: n.stricted, firstRestricted: n.firstRestricted, message: n.message }; }, e.prototype.parseAssignmentExpression = function() { var e; if (!this.context.allowYield && this.matchKeyword(`yield`)) e = this.parseYieldExpression(); else { var t = this.lookahead, n = t; if (e = this.parseConditionalExpression(), n.type === 3 && n.lineNumber === this.lookahead.lineNumber && n.value === `async` && (this.lookahead.type === 3 || this.matchKeyword(`yield`))) { var r = this.parsePrimaryExpression(); this.reinterpretExpressionAsPattern(r), e = { type: u, params: [r], async: !0 }; } if (e.type === u || this.match(`=>`)) { this.context.isAssignmentTarget = !1, this.context.isBindingElement = !1; var i = e.async, s = this.reinterpretAsCoverFormalsList(e); if (s) { this.hasLineTerminator && this.tolerateUnexpectedToken(this.lookahead), this.context.firstCoverInitializedNameError = null; var l = this.context.strict, d = this.context.allowStrictDirective; this.context.allowStrictDirective = s.simple; var f = this.context.allowYield, p = this.context.await; this.context.allowYield = !0, this.context.await = i; var m = this.startNode(t); this.expect(`=>`); var h = void 0; if (this.match(`{`)) { var g = this.context.allowIn; this.context.allowIn = !0, h = this.parseFunctionSourceElements(), this.context.allowIn = g; } else h = this.isolateCoverGrammar(this.parseAssignmentExpression); var _ = h.type !== c.Syntax.BlockStatement; this.context.strict && s.firstRestricted && this.throwUnexpectedToken(s.firstRestricted, s.message), this.context.strict && s.stricted && this.tolerateUnexpectedToken(s.stricted, s.message), e = i ? this.finalize(m, new o.AsyncArrowFunctionExpression(s.params, h, _)) : this.finalize(m, new o.ArrowFunctionExpression(s.params, h, _)), this.context.strict = l, this.context.allowStrictDirective = d, this.context.allowYield = f, this.context.await = p; } } else if (this.matchAssign()) { if (this.context.isAssignmentTarget || this.tolerateError(a.Messages.InvalidLHSInAssignment), this.context.strict && e.type === c.Syntax.Identifier) { var v = e; this.scanner.isRestrictedWord(v.name) && this.tolerateUnexpectedToken(n, a.Messages.StrictLHSAssignment), this.scanner.isStrictModeReservedWord(v.name) && this.tolerateUnexpectedToken(n, a.Messages.StrictReservedWord); } this.match(`=`) ? this.reinterpretExpressionAsPattern(e) : (this.context.isAssignmentTarget = !1, this.context.isBindingElement = !1), n = this.nextToken(); var y = n.value, b = this.isolateCoverGrammar(this.parseAssignmentExpression); e = this.finalize(this.startNode(t), new o.AssignmentExpression(y, e, b)), this.context.firstCoverInitializedNameError = null; } } return e; }, e.prototype.parseExpression = function() { var e = this.lookahead, t = this.isolateCoverGrammar(this.parseAssignmentExpression); if (this.match(`,`)) { var n = []; for (n.push(t); this.lookahead.type !== 2 && this.match(`,`);) this.nextToken(), n.push(this.isolateCoverGrammar(this.parseAssignmentExpression)); t = this.finalize(this.startNode(e), new o.SequenceExpression(n)); } return t; }, e.prototype.parseStatementListItem = function() { var e; if (this.context.isAssignmentTarget = !0, this.context.isBindingElement = !0, this.lookahead.type === 4) switch (this.lookahead.value) { case `export`: this.context.isModule || this.tolerateUnexpectedToken(this.lookahead, a.Messages.IllegalExportDeclaration), e = this.parseExportDeclaration(); break; case `import`: this.context.isModule || this.tolerateUnexpectedToken(this.lookahead, a.Messages.IllegalImportDeclaration), e = this.parseImportDeclaration(); break; case `const`: e = this.parseLexicalDeclaration({ inFor: !1 }); break; case `function`: e = this.parseFunctionDeclaration(); break; case `class`: e = this.parseClassDeclaration(); break; case `let`: e = this.isLexicalDeclaration() ? this.parseLexicalDeclaration({ inFor: !1 }) : this.parseStatement(); break; default: e = this.parseStatement(); break; } else e = this.parseStatement(); return e; }, e.prototype.parseBlock = function() { var e = this.createNode(); this.expect(`{`); for (var t = []; !this.match(`}`);) t.push(this.parseStatementListItem()); return this.expect(`}`), this.finalize(e, new o.BlockStatement(t)); }, e.prototype.parseLexicalBinding = function(e, t) { var n = this.createNode(), r = this.parsePattern([], e); this.context.strict && r.type === c.Syntax.Identifier && this.scanner.isRestrictedWord(r.name) && this.tolerateError(a.Messages.StrictVarName); var i = null; return e === `const` ? !this.matchKeyword(`in`) && !this.matchContextualKeyword(`of`) && (this.match(`=`) ? (this.nextToken(), i = this.isolateCoverGrammar(this.parseAssignmentExpression)) : this.throwError(a.Messages.DeclarationMissingInitializer, `const`)) : (!t.inFor && r.type !== c.Syntax.Identifier || this.match(`=`)) && (this.expect(`=`), i = this.isolateCoverGrammar(this.parseAssignmentExpression)), this.finalize(n, new o.VariableDeclarator(r, i)); }, e.prototype.parseBindingList = function(e, t) { for (var n = [this.parseLexicalBinding(e, t)]; this.match(`,`);) this.nextToken(), n.push(this.parseLexicalBinding(e, t)); return n; }, e.prototype.isLexicalDeclaration = function() { var e = this.scanner.saveState(); this.scanner.scanComments(); var t = this.scanner.lex(); return this.scanner.restoreState(e), t.type === 3 || t.type === 7 && t.value === `[` || t.type === 7 && t.value === `{` || t.type === 4 && t.value === `let` || t.type === 4 && t.value === `yield`; }, e.prototype.parseLexicalDeclaration = function(e) { var t = this.createNode(), n = this.nextToken().value; r.assert(n === `let` || n === `const`, `Lexical declaration must be either let or const`); var i = this.parseBindingList(n, e); return this.consumeSemicolon(), this.finalize(t, new o.VariableDeclaration(i, n)); }, e.prototype.parseBindingRestElement = function(e, t) { var n = this.createNode(); this.expect(`...`); var r = this.parsePattern(e, t); return this.finalize(n, new o.RestElement(r)); }, e.prototype.parseArrayPattern = function(e, t) { var n = this.createNode(); this.expect(`[`); for (var r = []; !this.match(`]`);) if (this.match(`,`)) this.nextToken(), r.push(null); else { if (this.match(`...`)) { r.push(this.parseBindingRestElement(e, t)); break; } else r.push(this.parsePatternWithDefault(e, t)); this.match(`]`) || this.expect(`,`); } return this.expect(`]`), this.finalize(n, new o.ArrayPattern(r)); }, e.prototype.parsePropertyPattern = function(e, t) { var n = this.createNode(), r = !1, i = !1, a = !1, s, c; if (this.lookahead.type === 3) { var l = this.lookahead; s = this.parseVariableIdentifier(); var u = this.finalize(n, new o.Identifier(l.value)); if (this.match(`=`)) { e.push(l), i = !0, this.nextToken(); var d = this.parseAssignmentExpression(); c = this.finalize(this.startNode(l), new o.AssignmentPattern(u, d)); } else this.match(`:`) ? (this.expect(`:`), c = this.parsePatternWithDefault(e, t)) : (e.push(l), i = !0, c = u); } else r = this.match(`[`), s = this.parseObjectPropertyKey(), this.expect(`:`), c = this.parsePatternWithDefault(e, t); return this.finalize(n, new o.Property(`init`, s, r, c, a, i)); }, e.prototype.parseObjectPattern = function(e, t) { var n = this.createNode(), r = []; for (this.expect(`{`); !this.match(`}`);) r.push(this.parsePropertyPattern(e, t)), this.match(`}`) || this.expect(`,`); return this.expect(`}`), this.finalize(n, new o.ObjectPattern(r)); }, e.prototype.parsePattern = function(e, t) { var n; return this.match(`[`) ? n = this.parseArrayPattern(e, t) : this.match(`{`) ? n = this.parseObjectPattern(e, t) : (this.matchKeyword(`let`) && (t === `const` || t === `let`) && this.tolerateUnexpectedToken(this.lookahead, a.Messages.LetInLexicalBinding), e.push(this.lookahead), n = this.parseVariableIdentifier(t)), n; }, e.prototype.parsePatternWithDefault = function(e, t) { var n = this.lookahead, r = this.parsePattern(e, t); if (this.match(`=`)) { this.nextToken(); var i = this.context.allowYield; this.context.allowYield = !0; var a = this.isolateCoverGrammar(this.parseAssignmentExpression); this.context.allowYield = i, r = this.finalize(this.startNode(n), new o.AssignmentPattern(r, a)); } return r; }, e.prototype.parseVariableIdentifier = function(e) { var t = this.createNode(), n = this.nextToken(); return n.type === 4 && n.value === `yield` ? this.context.strict ? this.tolerateUnexpectedToken(n, a.Messages.StrictReservedWord) : this.context.allowYield || this.throwUnexpectedToken(n) : n.type === 3 ? (this.context.isModule || this.context.await) && n.type === 3 && n.value === `await` && this.tolerateUnexpectedToken(n) : this.context.strict && n.type === 4 && this.scanner.isStrictModeReservedWord(n.value) ? this.tolerateUnexpectedToken(n, a.Messages.StrictReservedWord) : (this.context.strict || n.value !== `let` || e !== `var`) && this.throwUnexpectedToken(n), this.finalize(t, new o.Identifier(n.value)); }, e.prototype.parseVariableDeclaration = function(e) { var t = this.createNode(), n = this.parsePattern([], `var`); this.context.strict && n.type === c.Syntax.Identifier && this.scanner.isRestrictedWord(n.name) && this.tolerateError(a.Messages.StrictVarName); var r = null; return this.match(`=`) ? (this.nextToken(), r = this.isolateCoverGrammar(this.parseAssignmentExpression)) : n.type !== c.Syntax.Identifier && !e.inFor && this.expect(`=`), this.finalize(t, new o.VariableDeclarator(n, r)); }, e.prototype.parseVariableDeclarationList = function(e) { var t = { inFor: e.inFor }, n = []; for (n.push(this.parseVariableDeclaration(t)); this.match(`,`);) this.nextToken(), n.push(this.parseVariableDeclaration(t)); return n; }, e.prototype.parseVariableStatement = function() { var e = this.createNode(); this.expectKeyword(`var`); var t = this.parseVariableDeclarationList({ inFor: !1 }); return this.consumeSemicolon(), this.finalize(e, new o.VariableDeclaration(t, `var`)); }, e.prototype.parseEmptyStatement = function() { var e = this.createNode(); return this.expect(`;`), this.finalize(e, new o.EmptyStatement()); }, e.prototype.parseExpressionStatement = function() { var e = this.createNode(), t = this.parseExpression(); return this.consumeSemicolon(), this.finalize(e, new o.ExpressionStatement(t)); }, e.prototype.parseIfClause = function() { return this.context.strict && this.matchKeyword(`function`) && this.tolerateError(a.Messages.StrictFunction), this.parseStatement(); }, e.prototype.parseIfStatement = function() { var e = this.createNode(), t, n = null; this.expectKeyword(`if`), this.expect(`(`); var r = this.parseExpression(); return !this.match(`)`) && this.config.tolerant ? (this.tolerateUnexpectedToken(this.nextToken()), t = this.finalize(this.createNode(), new o.EmptyStatement())) : (this.expect(`)`), t = this.parseIfClause(), this.matchKeyword(`else`) && (this.nextToken(), n = this.parseIfClause())), this.finalize(e, new o.IfStatement(r, t, n)); }, e.prototype.parseDoWhileStatement = function() { var e = this.createNode(); this.expectKeyword(`do`); var t = this.context.inIteration; this.context.inIteration = !0; var n = this.parseStatement(); this.context.inIteration = t, this.expectKeyword(`while`), this.expect(`(`); var r = this.parseExpression(); return !this.match(`)`) && this.config.tolerant ? this.tolerateUnexpectedToken(this.nextToken()) : (this.expect(`)`), this.match(`;`) && this.nextToken()), this.finalize(e, new o.DoWhileStatement(n, r)); }, e.prototype.parseWhileStatement = function() { var e = this.createNode(), t; this.expectKeyword(`while`), this.expect(`(`); var n = this.parseExpression(); if (!this.match(`)`) && this.config.tolerant) this.tolerateUnexpectedToken(this.nextToken()), t = this.finalize(this.createNode(), new o.EmptyStatement()); else { this.expect(`)`); var r = this.context.inIteration; this.context.inIteration = !0, t = this.parseStatement(), this.context.inIteration = r; } return this.finalize(e, new o.WhileStatement(n, t)); }, e.prototype.parseForStatement = function() { var e = null, t = null, n = null, r = !0, i, s, l = this.createNode(); if (this.expectKeyword(`for`), this.expect(`(`), this.match(`;`)) this.nextToken(); else if (this.matchKeyword(`var`)) { e = this.createNode(), this.nextToken(); var u = this.context.allowIn; this.context.allowIn = !1; var d = this.parseVariableDeclarationList({ inFor: !0 }); if (this.context.allowIn = u, d.length === 1 && this.matchKeyword(`in`)) { var f = d[0]; f.init && (f.id.type === c.Syntax.ArrayPattern || f.id.type === c.Syntax.ObjectPattern || this.context.strict) && this.tolerateError(a.Messages.ForInOfLoopInitializer, `for-in`), e = this.finalize(e, new o.VariableDeclaration(d, `var`)), this.nextToken(), i = e, s = this.parseExpression(), e = null; } else d.length === 1 && d[0].init === null && this.matchContextualKeyword(`of`) ? (e = this.finalize(e, new o.VariableDeclaration(d, `var`)), this.nextToken(), i = e, s = this.parseAssignmentExpression(), e = null, r = !1) : (e = this.finalize(e, new o.VariableDeclaration(d, `var`)), this.expect(`;`)); } else if (this.matchKeyword(`const`) || this.matchKeyword(`let`)) { e = this.createNode(); var p = this.nextToken().value; if (!this.context.strict && this.lookahead.value === `in`) e = this.finalize(e, new o.Identifier(p)), this.nextToken(), i = e, s = this.parseExpression(), e = null; else { var u = this.context.allowIn; this.context.allowIn = !1; var d = this.parseBindingList(p, { inFor: !0 }); this.context.allowIn = u, d.length === 1 && d[0].init === null && this.matchKeyword(`in`) ? (e = this.finalize(e, new o.VariableDeclaration(d, p)), this.nextToken(), i = e, s = this.parseExpression(), e = null) : d.length === 1 && d[0].init === null && this.matchContextualKeyword(`of`) ? (e = this.finalize(e, new o.VariableDeclaration(d, p)), this.nextToken(), i = e, s = this.parseAssignmentExpression(), e = null, r = !1) : (this.consumeSemicolon(), e = this.finalize(e, new o.VariableDeclaration(d, p))); } } else { var m = this.lookahead, u = this.context.allowIn; if (this.context.allowIn = !1, e = this.inheritCoverGrammar(this.parseAssignmentExpression), this.context.allowIn = u, this.matchKeyword(`in`)) (!this.context.isAssignmentTarget || e.type === c.Syntax.AssignmentExpression) && this.tolerateError(a.Messages.InvalidLHSInForIn), this.nextToken(), this.reinterpretExpressionAsPattern(e), i = e, s = this.parseExpression(), e = null; else if (this.matchContextualKeyword(`of`)) (!this.context.isAssignmentTarget || e.type === c.Syntax.AssignmentExpression) && this.tolerateError(a.Messages.InvalidLHSInForLoop), this.nextToken(), this.reinterpretExpressionAsPattern(e), i = e, s = this.parseAssignmentExpression(), e = null, r = !1; else { if (this.match(`,`)) { for (var h = [e]; this.match(`,`);) this.nextToken(), h.push(this.isolateCoverGrammar(this.parseAssignmentExpression)); e = this.finalize(this.startNode(m), new o.SequenceExpression(h)); } this.expect(`;`); } } i === void 0 && (this.match(`;`) || (t = this.parseExpression()), this.expect(`;`), this.match(`)`) || (n = this.parseExpression())); var g; if (!this.match(`)`) && this.config.tolerant) this.tolerateUnexpectedToken(this.nextToken()), g = this.finalize(this.createNode(), new o.EmptyStatement()); else { this.expect(`)`); var _ = this.context.inIteration; this.context.inIteration = !0, g = this.isolateCoverGrammar(this.parseStatement), this.context.inIteration = _; } return i === void 0 ? this.finalize(l, new o.ForStatement(e, t, n, g)) : r ? this.finalize(l, new o.ForInStatement(i, s, g)) : this.finalize(l, new o.ForOfStatement(i, s, g)); }, e.prototype.parseContinueStatement = function() { var e = this.createNode(); this.expectKeyword(`continue`); var t = null; if (this.lookahead.type === 3 && !this.hasLineTerminator) { var n = this.parseVariableIdentifier(); t = n; var r = `$` + n.name; Object.prototype.hasOwnProperty.call(this.context.labelSet, r) || this.throwError(a.Messages.UnknownLabel, n.name); } return this.consumeSemicolon(), t === null && !this.context.inIteration && this.throwError(a.Messages.IllegalContinue), this.finalize(e, new o.ContinueStatement(t)); }, e.prototype.parseBreakStatement = function() { var e = this.createNode(); this.expectKeyword(`break`); var t = null; if (this.lookahead.type === 3 && !this.hasLineTerminator) { var n = this.parseVariableIdentifier(), r = `$` + n.name; Object.prototype.hasOwnProperty.call(this.context.labelSet, r) || this.throwError(a.Messages.UnknownLabel, n.name), t = n; } return this.consumeSemicolon(), t === null && !this.context.inIteration && !this.context.inSwitch && this.throwError(a.Messages.IllegalBreak), this.finalize(e, new o.BreakStatement(t)); }, e.prototype.parseReturnStatement = function() { this.context.inFunctionBody || this.tolerateError(a.Messages.IllegalReturn); var e = this.createNode(); this.expectKeyword(`return`); var t = !this.match(`;`) && !this.match(`}`) && !this.hasLineTerminator && this.lookahead.type !== 2 || this.lookahead.type === 8 || this.lookahead.type === 10 ? this.parseExpression() : null; return this.consumeSemicolon(), this.finalize(e, new o.ReturnStatement(t)); }, e.prototype.parseWithStatement = function() { this.context.strict && this.tolerateError(a.Messages.StrictModeWith); var e = this.createNode(), t; this.expectKeyword(`with`), this.expect(`(`); var n = this.parseExpression(); return !this.match(`)`) && this.config.tolerant ? (this.tolerateUnexpectedToken(this.nextToken()), t = this.finalize(this.createNode(), new o.EmptyStatement())) : (this.expect(`)`), t = this.parseStatement()), this.finalize(e, new o.WithStatement(n, t)); }, e.prototype.parseSwitchCase = function() { var e = this.createNode(), t; this.matchKeyword(`default`) ? (this.nextToken(), t = null) : (this.expectKeyword(`case`), t = this.parseExpression()), this.expect(`:`); for (var n = []; !(this.match(`}`) || this.matchKeyword(`default`) || this.matchKeyword(`case`));) n.push(this.parseStatementListItem()); return this.finalize(e, new o.SwitchCase(t, n)); }, e.prototype.parseSwitchStatement = function() { var e = this.createNode(); this.expectKeyword(`switch`), this.expect(`(`); var t = this.parseExpression(); this.expect(`)`); var n = this.context.inSwitch; this.context.inSwitch = !0; var r = [], i = !1; for (this.expect(`{`); !this.match(`}`);) { var s = this.parseSwitchCase(); s.test === null && (i && this.throwError(a.Messages.MultipleDefaultsInSwitch), i = !0), r.push(s); } return this.expect(`}`), this.context.inSwitch = n, this.finalize(e, new o.SwitchStatement(t, r)); }, e.prototype.parseLabelledStatement = function() { var e = this.createNode(), t = this.parseExpression(), n; if (t.type === c.Syntax.Identifier && this.match(`:`)) { this.nextToken(); var r = t, i = `$` + r.name; Object.prototype.hasOwnProperty.call(this.context.labelSet, i) && this.throwError(a.Messages.Redeclaration, `Label`, r.name), this.context.labelSet[i] = !0; var s = void 0; if (this.matchKeyword(`class`)) this.tolerateUnexpectedToken(this.lookahead), s = this.parseClassDeclaration(); else if (this.matchKeyword(`function`)) { var l = this.lookahead, u = this.parseFunctionDeclaration(); this.context.strict ? this.tolerateUnexpectedToken(l, a.Messages.StrictFunction) : u.generator && this.tolerateUnexpectedToken(l, a.Messages.GeneratorInLegacyContext), s = u; } else s = this.parseStatement(); delete this.context.labelSet[i], n = new o.LabeledStatement(r, s); } else this.consumeSemicolon(), n = new o.ExpressionStatement(t); return this.finalize(e, n); }, e.prototype.parseThrowStatement = function() { var e = this.createNode(); this.expectKeyword(`throw`), this.hasLineTerminator && this.throwError(a.Messages.NewlineAfterThrow); var t = this.parseExpression(); return this.consumeSemicolon(), this.finalize(e, new o.ThrowStatement(t)); }, e.prototype.parseCatchClause = function() { var e = this.createNode(); this.expectKeyword(`catch`), this.expect(`(`), this.match(`)`) && this.throwUnexpectedToken(this.lookahead); for (var t = [], n = this.parsePattern(t), r = {}, i = 0; i < t.length; i++) { var s = `$` + t[i].value; Object.prototype.hasOwnProperty.call(r, s) && this.tolerateError(a.Messages.DuplicateBinding, t[i].value), r[s] = !0; } this.context.strict && n.type === c.Syntax.Identifier && this.scanner.isRestrictedWord(n.name) && this.tolerateError(a.Messages.StrictCatchVariable), this.expect(`)`); var l = this.parseBlock(); return this.finalize(e, new o.CatchClause(n, l)); }, e.prototype.parseFinallyClause = function() { return this.expectKeyword(`finally`), this.parseBlock(); }, e.prototype.parseTryStatement = function() { var e = this.createNode(); this.expectKeyword(`try`); var t = this.parseBlock(), n = this.matchKeyword(`catch`) ? this.parseCatchClause() : null, r = this.matchKeyword(`finally`) ? this.parseFinallyClause() : null; return !n && !r && this.throwError(a.Messages.NoCatchOrFinally), this.finalize(e, new o.TryStatement(t, n, r)); }, e.prototype.parseDebuggerStatement = function() { var e = this.createNode(); return this.expectKeyword(`debugger`), this.consumeSemicolon(), this.finalize(e, new o.DebuggerStatement()); }, e.prototype.parseStatement = function() { var e; switch (this.lookahead.type) { case 1: case 5: case 6: case 8: case 10: case 9: e = this.parseExpressionStatement(); break; case 7: var t = this.lookahead.value; e = t === `{` ? this.parseBlock() : t === `(` ? this.parseExpressionStatement() : t === `;` ? this.parseEmptyStatement() : this.parseExpressionStatement(); break; case 3: e = this.matchAsyncFunction() ? this.parseFunctionDeclaration() : this.parseLabelledStatement(); break; case 4: switch (this.lookahead.value) { case `break`: e = this.parseBreakStatement(); break; case `continue`: e = this.parseContinueStatement(); break; case `debugger`: e = this.parseDebuggerStatement(); break; case `do`: e = this.parseDoWhileStatement(); break; case `for`: e = this.parseForStatement(); break; case `function`: e = this.parseFunctionDeclaration(); break; case `if`: e = this.parseIfStatement(); break; case `return`: e = this.parseReturnStatement(); break; case `switch`: e = this.parseSwitchStatement(); break; case `throw`: e = this.parseThrowStatement(); break; case `try`: e = this.parseTryStatement(); break; case `var`: e = this.parseVariableStatement(); break; case `while`: e = this.parseWhileStatement(); break; case `with`: e = this.parseWithStatement(); break; default: e = this.parseExpressionStatement(); break; } break; default: e = this.throwUnexpectedToken(this.lookahead); } return e; }, e.prototype.parseFunctionSourceElements = function() { var e = this.createNode(); this.expect(`{`); var t = this.parseDirectivePrologues(), n = this.context.labelSet, r = this.context.inIteration, i = this.context.inSwitch, a = this.context.inFunctionBody; for (this.context.labelSet = {}, this.context.inIteration = !1, this.context.inSwitch = !1, this.context.inFunctionBody = !0; this.lookahead.type !== 2 && !this.match(`}`);) t.push(this.parseStatementListItem()); return this.expect(`}`), this.context.labelSet = n, this.context.inIteration = r, this.context.inSwitch = i, this.context.inFunctionBody = a, this.finalize(e, new o.BlockStatement(t)); }, e.prototype.validateParam = function(e, t, n) { var r = `$` + n; this.context.strict ? (this.scanner.isRestrictedWord(n) && (e.stricted = t, e.message = a.Messages.StrictParamName), Object.prototype.hasOwnProperty.call(e.paramSet, r) && (e.stricted = t, e.message = a.Messages.StrictParamDupe)) : e.firstRestricted || (this.scanner.isRestrictedWord(n) ? (e.firstRestricted = t, e.message = a.Messages.StrictParamName) : this.scanner.isStrictModeReservedWord(n) ? (e.firstRestricted = t, e.message = a.Messages.StrictReservedWord) : Object.prototype.hasOwnProperty.call(e.paramSet, r) && (e.stricted = t, e.message = a.Messages.StrictParamDupe)), typeof Object.defineProperty == `function` ? Object.defineProperty(e.paramSet, r, { value: !0, enumerable: !0, writable: !0, configurable: !0 }) : e.paramSet[r] = !0; }, e.prototype.parseRestElement = function(e) { var t = this.createNode(); this.expect(`...`); var n = this.parsePattern(e); return this.match(`=`) && this.throwError(a.Messages.DefaultRestParameter), this.match(`)`) || this.throwError(a.Messages.ParameterAfterRestParameter), this.finalize(t, new o.RestElement(n)); }, e.prototype.parseFormalParameter = function(e) { for (var t = [], n = this.match(`...`) ? this.parseRestElement(t) : this.parsePatternWithDefault(t), r = 0; r < t.length; r++) this.validateParam(e, t[r], t[r].value); e.simple = e.simple && n instanceof o.Identifier, e.params.push(n); }, e.prototype.parseFormalParameters = function(e) { var t = { simple: !0, params: [], firstRestricted: e }; if (this.expect(`(`), !this.match(`)`)) for (t.paramSet = {}; this.lookahead.type !== 2 && (this.parseFormalParameter(t), !(this.match(`)`) || (this.expect(`,`), this.match(`)`))));); return this.expect(`)`), { simple: t.simple, params: t.params, stricted: t.stricted, firstRestricted: t.firstRestricted, message: t.message }; }, e.prototype.matchAsyncFunction = function() { var e = this.matchContextualKeyword(`async`); if (e) { var t = this.scanner.saveState(); this.scanner.scanComments(); var n = this.scanner.lex(); this.scanner.restoreState(t), e = t.lineNumber === n.lineNumber && n.type === 4 && n.value === `function`; } return e; }, e.prototype.parseFunctionDeclaration = function(e) { var t = this.createNode(), n = this.matchContextualKeyword(`async`); n && this.nextToken(), this.expectKeyword(`function`); var r = n ? !1 : this.match(`*`); r && this.nextToken(); var i, s = null, c = null; if (!e || !this.match(`(`)) { var l = this.lookahead; s = this.parseVariableIdentifier(), this.context.strict ? this.scanner.isRestrictedWord(l.value) && this.tolerateUnexpectedToken(l, a.Messages.StrictFunctionName) : this.scanner.isRestrictedWord(l.value) ? (c = l, i = a.Messages.StrictFunctionName) : this.scanner.isStrictModeReservedWord(l.value) && (c = l, i = a.Messages.StrictReservedWord); } var u = this.context.await, d = this.context.allowYield; this.context.await = n, this.context.allowYield = !r; var f = this.parseFormalParameters(c), p = f.params, m = f.stricted; c = f.firstRestricted, f.message && (i = f.message); var h = this.context.strict, g = this.context.allowStrictDirective; this.context.allowStrictDirective = f.simple; var _ = this.parseFunctionSourceElements(); return this.context.strict && c && this.throwUnexpectedToken(c, i), this.context.strict && m && this.tolerateUnexpectedToken(m, i), this.context.strict = h, this.context.allowStrictDirective = g, this.context.await = u, this.context.allowYield = d, n ? this.finalize(t, new o.AsyncFunctionDeclaration(s, p, _)) : this.finalize(t, new o.FunctionDeclaration(s, p, _, r)); }, e.prototype.parseFunctionExpression = function() { var e = this.createNode(), t = this.matchContextualKeyword(`async`); t && this.nextToken(), this.expectKeyword(`function`); var n = t ? !1 : this.match(`*`); n && this.nextToken(); var r, i = null, s, c = this.context.await, l = this.context.allowYield; if (this.context.await = t, this.context.allowYield = !n, !this.match(`(`)) { var u = this.lookahead; i = !this.context.strict && !n && this.matchKeyword(`yield`) ? this.parseIdentifierName() : this.parseVariableIdentifier(), this.context.strict ? this.scanner.isRestrictedWord(u.value) && this.tolerateUnexpectedToken(u, a.Messages.StrictFunctionName) : this.scanner.isRestrictedWord(u.value) ? (s = u, r = a.Messages.StrictFunctionName) : this.scanner.isStrictModeReservedWord(u.value) && (s = u, r = a.Messages.StrictReservedWord); } var d = this.parseFormalParameters(s), f = d.params, p = d.stricted; s = d.firstRestricted, d.message && (r = d.message); var m = this.context.strict, h = this.context.allowStrictDirective; this.context.allowStrictDirective = d.simple; var g = this.parseFunctionSourceElements(); return this.context.strict && s && this.throwUnexpectedToken(s, r), this.context.strict && p && this.tolerateUnexpectedToken(p, r), this.context.strict = m, this.context.allowStrictDirective = h, this.context.await = c, this.context.allowYield = l, t ? this.finalize(e, new o.AsyncFunctionExpression(i, f, g)) : this.finalize(e, new o.FunctionExpression(i, f, g, n)); }, e.prototype.parseDirective = function() { var e = this.lookahead, t = this.createNode(), n = this.parseExpression(), r = n.type === c.Syntax.Literal ? this.getTokenRaw(e).slice(1, -1) : null; return this.consumeSemicolon(), this.finalize(t, r ? new o.Directive(n, r) : new o.ExpressionStatement(n)); }, e.prototype.parseDirectivePrologues = function() { for (var e = null, t = [];;) { var n = this.lookahead; if (n.type !== 8) break; var r = this.parseDirective(); t.push(r); var i = r.directive; if (typeof i != `string`) break; i === `use strict` ? (this.context.strict = !0, e && this.tolerateUnexpectedToken(e, a.Messages.StrictOctalLiteral), this.context.allowStrictDirective || this.tolerateUnexpectedToken(n, a.Messages.IllegalLanguageModeDirective)) : !e && n.octal && (e = n); } return t; }, e.prototype.qualifiedPropertyName = function(e) { switch (e.type) { case 3: case 8: case 1: case 5: case 6: case 4: return !0; case 7: return e.value === `[`; default: break; } return !1; }, e.prototype.parseGetterMethod = function() { var e = this.createNode(), t = !1, n = this.context.allowYield; this.context.allowYield = !t; var r = this.parseFormalParameters(); r.params.length > 0 && this.tolerateError(a.Messages.BadGetterArity); var i = this.parsePropertyMethod(r); return this.context.allowYield = n, this.finalize(e, new o.FunctionExpression(null, r.params, i, t)); }, e.prototype.parseSetterMethod = function() { var e = this.createNode(), t = !1, n = this.context.allowYield; this.context.allowYield = !t; var r = this.parseFormalParameters(); r.params.length === 1 ? r.params[0] instanceof o.RestElement && this.tolerateError(a.Messages.BadSetterRestParameter) : this.tolerateError(a.Messages.BadSetterArity); var i = this.parsePropertyMethod(r); return this.context.allowYield = n, this.finalize(e, new o.FunctionExpression(null, r.params, i, t)); }, e.prototype.parseGeneratorMethod = function() { var e = this.createNode(), t = !0, n = this.context.allowYield; this.context.allowYield = !0; var r = this.parseFormalParameters(); this.context.allowYield = !1; var i = this.parsePropertyMethod(r); return this.context.allowYield = n, this.finalize(e, new o.FunctionExpression(null, r.params, i, t)); }, e.prototype.isStartOfExpression = function() { var e = !0, t = this.lookahead.value; switch (this.lookahead.type) { case 7: e = t === `[` || t === `(` || t === `{` || t === `+` || t === `-` || t === `!` || t === `~` || t === `++` || t === `--` || t === `/` || t === `/=`; break; case 4: e = t === `class` || t === `delete` || t === `function` || t === `let` || t === `new` || t === `super` || t === `this` || t === `typeof` || t === `void` || t === `yield`; break; default: break; } return e; }, e.prototype.parseYieldExpression = function() { var e = this.createNode(); this.expectKeyword(`yield`); var t = null, n = !1; if (!this.hasLineTerminator) { var r = this.context.allowYield; this.context.allowYield = !1, n = this.match(`*`), n ? (this.nextToken(), t = this.parseAssignmentExpression()) : this.isStartOfExpression() && (t = this.parseAssignmentExpression()), this.context.allowYield = r; } return this.finalize(e, new o.YieldExpression(t, n)); }, e.prototype.parseClassElement = function(e) { var t = this.lookahead, n = this.createNode(), r = ``, i = null, s = null, c = !1, l = !1, u = !1, d = !1; if (this.match(`*`)) this.nextToken(); else if (c = this.match(`[`), i = this.parseObjectPropertyKey(), i.name === `static` && (this.qualifiedPropertyName(this.lookahead) || this.match(`*`)) && (t = this.lookahead, u = !0, c = this.match(`[`), this.match(`*`) ? this.nextToken() : i = this.parseObjectPropertyKey()), t.type === 3 && !this.hasLineTerminator && t.value === `async`) { var f = this.lookahead.value; f !== `:` && f !== `(` && f !== `*` && (d = !0, t = this.lookahead, i = this.parseObjectPropertyKey(), t.type === 3 && t.value === `constructor` && this.tolerateUnexpectedToken(t, a.Messages.ConstructorIsAsync)); } var p = this.qualifiedPropertyName(this.lookahead); return t.type === 3 ? t.value === `get` && p ? (r = `get`, c = this.match(`[`), i = this.parseObjectPropertyKey(), this.context.allowYield = !1, s = this.parseGetterMethod()) : t.value === `set` && p && (r = `set`, c = this.match(`[`), i = this.parseObjectPropertyKey(), s = this.parseSetterMethod()) : t.type === 7 && t.value === `*` && p && (r = `init`, c = this.match(`[`), i = this.parseObjectPropertyKey(), s = this.parseGeneratorMethod(), l = !0), !r && i && this.match(`(`) && (r = `init`, s = d ? this.parsePropertyMethodAsyncFunction() : this.parsePropertyMethodFunction(), l = !0), r || this.throwUnexpectedToken(this.lookahead), r === `init` && (r = `method`), c || (u && this.isPropertyKey(i, `prototype`) && this.throwUnexpectedToken(t, a.Messages.StaticPrototype), !u && this.isPropertyKey(i, `constructor`) && ((r !== `method` || !l || s && s.generator) && this.throwUnexpectedToken(t, a.Messages.ConstructorSpecialMethod), e.value ? this.throwUnexpectedToken(t, a.Messages.DuplicateConstructor) : e.value = !0, r = `constructor`)), this.finalize(n, new o.MethodDefinition(i, c, s, r, u)); }, e.prototype.parseClassElementList = function() { var e = [], t = { value: !1 }; for (this.expect(`{`); !this.match(`}`);) this.match(`;`) ? this.nextToken() : e.push(this.parseClassElement(t)); return this.expect(`}`), e; }, e.prototype.parseClassBody = function() { var e = this.createNode(), t = this.parseClassElementList(); return this.finalize(e, new o.ClassBody(t)); }, e.prototype.parseClassDeclaration = function(e) { var t = this.createNode(), n = this.context.strict; this.context.strict = !0, this.expectKeyword(`class`); var r = e && this.lookahead.type !== 3 ? null : this.parseVariableIdentifier(), i = null; this.matchKeyword(`extends`) && (this.nextToken(), i = this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall)); var a = this.parseClassBody(); return this.context.strict = n, this.finalize(t, new o.ClassDeclaration(r, i, a)); }, e.prototype.parseClassExpression = function() { var e = this.createNode(), t = this.context.strict; this.context.strict = !0, this.expectKeyword(`class`); var n = this.lookahead.type === 3 ? this.parseVariableIdentifier() : null, r = null; this.matchKeyword(`extends`) && (this.nextToken(), r = this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall)); var i = this.parseClassBody(); return this.context.strict = t, this.finalize(e, new o.ClassExpression(n, r, i)); }, e.prototype.parseModule = function() { this.context.strict = !0, this.context.isModule = !0, this.scanner.isModule = !0; for (var e = this.createNode(), t = this.parseDirectivePrologues(); this.lookahead.type !== 2;) t.push(this.parseStatementListItem()); return this.finalize(e, new o.Module(t)); }, e.prototype.parseScript = function() { for (var e = this.createNode(), t = this.parseDirectivePrologues(); this.lookahead.type !== 2;) t.push(this.parseStatementListItem()); return this.finalize(e, new o.Script(t)); }, e.prototype.parseModuleSpecifier = function() { var e = this.createNode(); this.lookahead.type !== 8 && this.throwError(a.Messages.InvalidModuleSpecifier); var t = this.nextToken(), n = this.getTokenRaw(t); return this.finalize(e, new o.Literal(t.value, n)); }, e.prototype.parseImportSpecifier = function() { var e = this.createNode(), t, n; return this.lookahead.type === 3 ? (t = this.parseVariableIdentifier(), n = t, this.matchContextualKeyword(`as`) && (this.nextToken(), n = this.parseVariableIdentifier())) : (t = this.parseIdentifierName(), n = t, this.matchContextualKeyword(`as`) ? (this.nextToken(), n = this.parseVariableIdentifier()) : this.throwUnexpectedToken(this.nextToken())), this.finalize(e, new o.ImportSpecifier(n, t)); }, e.prototype.parseNamedImports = function() { this.expect(`{`); for (var e = []; !this.match(`}`);) e.push(this.parseImportSpecifier()), this.match(`}`) || this.expect(`,`); return this.expect(`}`), e; }, e.prototype.parseImportDefaultSpecifier = function() { var e = this.createNode(), t = this.parseIdentifierName(); return this.finalize(e, new o.ImportDefaultSpecifier(t)); }, e.prototype.parseImportNamespaceSpecifier = function() { var e = this.createNode(); this.expect(`*`), this.matchContextualKeyword(`as`) || this.throwError(a.Messages.NoAsAfterImportNamespace), this.nextToken(); var t = this.parseIdentifierName(); return this.finalize(e, new o.ImportNamespaceSpecifier(t)); }, e.prototype.parseImportDeclaration = function() { this.context.inFunctionBody && this.throwError(a.Messages.IllegalImportDeclaration); var e = this.createNode(); this.expectKeyword(`import`); var t, n = []; if (this.lookahead.type === 8) t = this.parseModuleSpecifier(); else { if (this.match(`{`) ? n = n.concat(this.parseNamedImports()) : this.match(`*`) ? n.push(this.parseImportNamespaceSpecifier()) : this.isIdentifierName(this.lookahead) && !this.matchKeyword(`default`) ? (n.push(this.parseImportDefaultSpecifier()), this.match(`,`) && (this.nextToken(), this.match(`*`) ? n.push(this.parseImportNamespaceSpecifier()) : this.match(`{`) ? n = n.concat(this.parseNamedImports()) : this.throwUnexpectedToken(this.lookahead))) : this.throwUnexpectedToken(this.nextToken()), !this.matchContextualKeyword(`from`)) { var r = this.lookahead.value ? a.Messages.UnexpectedToken : a.Messages.MissingFromClause; this.throwError(r, this.lookahead.value); } this.nextToken(), t = this.parseModuleSpecifier(); } return this.consumeSemicolon(), this.finalize(e, new o.ImportDeclaration(n, t)); }, e.prototype.parseExportSpecifier = function() { var e = this.createNode(), t = this.parseIdentifierName(), n = t; return this.matchContextualKeyword(`as`) && (this.nextToken(), n = this.parseIdentifierName()), this.finalize(e, new o.ExportSpecifier(t, n)); }, e.prototype.parseExportDeclaration = function() { this.context.inFunctionBody && this.throwError(a.Messages.IllegalExportDeclaration); var e = this.createNode(); this.expectKeyword(`export`); var t; if (this.matchKeyword(`default`)) if (this.nextToken(), this.matchKeyword(`function`)) { var n = this.parseFunctionDeclaration(!0); t = this.finalize(e, new o.ExportDefaultDeclaration(n)); } else if (this.matchKeyword(`class`)) { var n = this.parseClassDeclaration(!0); t = this.finalize(e, new o.ExportDefaultDeclaration(n)); } else if (this.matchContextualKeyword(`async`)) { var n = this.matchAsyncFunction() ? this.parseFunctionDeclaration(!0) : this.parseAssignmentExpression(); t = this.finalize(e, new o.ExportDefaultDeclaration(n)); } else { this.matchContextualKeyword(`from`) && this.throwError(a.Messages.UnexpectedToken, this.lookahead.value); var n = this.match(`{`) ? this.parseObjectInitializer() : this.match(`[`) ? this.parseArrayInitializer() : this.parseAssignmentExpression(); this.consumeSemicolon(), t = this.finalize(e, new o.ExportDefaultDeclaration(n)); } else if (this.match(`*`)) { if (this.nextToken(), !this.matchContextualKeyword(`from`)) { var r = this.lookahead.value ? a.Messages.UnexpectedToken : a.Messages.MissingFromClause; this.throwError(r, this.lookahead.value); } this.nextToken(); var i = this.parseModuleSpecifier(); this.consumeSemicolon(), t = this.finalize(e, new o.ExportAllDeclaration(i)); } else if (this.lookahead.type === 4) { var n = void 0; switch (this.lookahead.value) { case `let`: case `const`: n = this.parseLexicalDeclaration({ inFor: !1 }); break; case `var`: case `class`: case `function`: n = this.parseStatementListItem(); break; default: this.throwUnexpectedToken(this.lookahead); } t = this.finalize(e, new o.ExportNamedDeclaration(n, [], null)); } else if (this.matchAsyncFunction()) { var n = this.parseFunctionDeclaration(); t = this.finalize(e, new o.ExportNamedDeclaration(n, [], null)); } else { var s = [], c = null, l = !1; for (this.expect(`{`); !this.match(`}`);) l ||= this.matchKeyword(`default`), s.push(this.parseExportSpecifier()), this.match(`}`) || this.expect(`,`); if (this.expect(`}`), this.matchContextualKeyword(`from`)) this.nextToken(), c = this.parseModuleSpecifier(), this.consumeSemicolon(); else if (l) { var r = this.lookahead.value ? a.Messages.UnexpectedToken : a.Messages.MissingFromClause; this.throwError(r, this.lookahead.value); } else this.consumeSemicolon(); t = this.finalize(e, new o.ExportNamedDeclaration(null, s, c)); } return t; }, e; }(); }, function(e, t) { Object.defineProperty(t, "__esModule", { value: !0 }); function n(e, t) { if (!e) throw Error(`ASSERT: ` + t); } t.assert = n; }, function(e, t) { Object.defineProperty(t, "__esModule", { value: !0 }), t.ErrorHandler = function() { function e() { this.errors = [], this.tolerant = !1; } return e.prototype.recordError = function(e) { this.errors.push(e); }, e.prototype.tolerate = function(e) { if (this.tolerant) this.recordError(e); else throw e; }, e.prototype.constructError = function(e, t) { var n = Error(e); try { throw n; } catch (e) { Object.create && Object.defineProperty && (n = Object.create(e), Object.defineProperty(n, "column", { value: t })); } return n; }, e.prototype.createError = function(e, t, n, r) { var i = `Line ` + t + `: ` + r, a = this.constructError(i, n); return a.index = e, a.lineNumber = t, a.description = r, a; }, e.prototype.throwError = function(e, t, n, r) { throw this.createError(e, t, n, r); }, e.prototype.tolerateError = function(e, t, n, r) { var i = this.createError(e, t, n, r); if (this.tolerant) this.recordError(i); else throw i; }, e; }(); }, function(e, t) { Object.defineProperty(t, "__esModule", { value: !0 }), t.Messages = { BadGetterArity: `Getter must not have any formal parameters`, BadSetterArity: `Setter must have exactly one formal parameter`, BadSetterRestParameter: `Setter function argument must not be a rest parameter`, ConstructorIsAsync: `Class constructor may not be an async method`, ConstructorSpecialMethod: `Class constructor may not be an accessor`, DeclarationMissingInitializer: `Missing initializer in %0 declaration`, DefaultRestParameter: `Unexpected token =`, DuplicateBinding: `Duplicate binding %0`, DuplicateConstructor: `A class may only have one constructor`, DuplicateProtoProperty: `Duplicate __proto__ fields are not allowed in object literals`, ForInOfLoopInitializer: `%0 loop variable declaration may not have an initializer`, GeneratorInLegacyContext: `Generator declarations are not allowed in legacy contexts`, IllegalBreak: `Illegal break statement`, IllegalContinue: `Illegal continue statement`, IllegalExportDeclaration: `Unexpected token`, IllegalImportDeclaration: `Unexpected token`, IllegalLanguageModeDirective: `Illegal 'use strict' directive in function with non-simple parameter list`, IllegalReturn: `Illegal return statement`, InvalidEscapedReservedWord: `Keyword must not contain escaped characters`, InvalidHexEscapeSequence: `Invalid hexadecimal escape sequence`, InvalidLHSInAssignment: `Invalid left-hand side in assignment`, InvalidLHSInForIn: `Invalid left-hand side in for-in`, InvalidLHSInForLoop: `Invalid left-hand side in for-loop`, InvalidModuleSpecifier: `Unexpected token`, InvalidRegExp: `Invalid regular expression`, LetInLexicalBinding: `let is disallowed as a lexically bound name`, MissingFromClause: `Unexpected token`, MultipleDefaultsInSwitch: `More than one default clause in switch statement`, NewlineAfterThrow: `Illegal newline after throw`, NoAsAfterImportNamespace: `Unexpected token`, NoCatchOrFinally: `Missing catch or finally after try`, ParameterAfterRestParameter: `Rest parameter must be last formal parameter`, Redeclaration: `%0 '%1' has already been declared`, StaticPrototype: `Classes may not have static property named prototype`, StrictCatchVariable: `Catch variable may not be eval or arguments in strict mode`, StrictDelete: `Delete of an unqualified identifier in strict mode.`, StrictFunction: `In strict mode code, functions can only be declared at top level or inside a block`, StrictFunctionName: `Function name may not be eval or arguments in strict mode`, StrictLHSAssignment: `Assignment to eval or arguments is not allowed in strict mode`, StrictLHSPostfix: `Postfix increment/decrement may not have eval or arguments operand in strict mode`, StrictLHSPrefix: `Prefix increment/decrement may not have eval or arguments operand in strict mode`, StrictModeWith: `Strict mode code may not include a with statement`, StrictOctalLiteral: `Octal literals are not allowed in strict mode.`, StrictParamDupe: `Strict mode function may not have duplicate parameter names`, StrictParamName: `Parameter name eval or arguments is not allowed in strict mode`, StrictReservedWord: `Use of future reserved word in strict mode`, StrictVarName: `Variable name may not be eval or arguments in strict mode`, TemplateOctalLiteral: `Octal literals are not allowed in template strings.`, UnexpectedEOS: `Unexpected end of input`, UnexpectedIdentifier: `Unexpected identifier`, UnexpectedNumber: `Unexpected number`, UnexpectedReserved: `Unexpected reserved word`, UnexpectedString: `Unexpected string`, UnexpectedTemplate: `Unexpected quasi %0`, UnexpectedToken: `Unexpected token %0`, UnexpectedTokenIllegal: `Unexpected token ILLEGAL`, UnknownLabel: `Undefined label '%0'`, UnterminatedRegExp: `Invalid regular expression: missing /` }; }, function(e, t, n) { Object.defineProperty(t, "__esModule", { value: !0 }); var r = n(9), i = n(4), a = n(11); function o(e) { return `0123456789abcdef`.indexOf(e.toLowerCase()); } function s(e) { return `01234567`.indexOf(e); } t.Scanner = function() { function e(e, t) { this.source = e, this.errorHandler = t, this.trackComment = !1, this.isModule = !1, this.length = e.length, this.index = 0, this.lineNumber = +(e.length > 0), this.lineStart = 0, this.curlyStack = []; } return e.prototype.saveState = function() { return { index: this.index, lineNumber: this.lineNumber, lineStart: this.lineStart }; }, e.prototype.restoreState = function(e) { this.index = e.index, this.lineNumber = e.lineNumber, this.lineStart = e.lineStart; }, e.prototype.eof = function() { return this.index >= this.length; }, e.prototype.throwUnexpectedToken = function(e) { return e === void 0 && (e = a.Messages.UnexpectedTokenIllegal), this.errorHandler.throwError(this.index, this.lineNumber, this.index - this.lineStart + 1, e); }, e.prototype.tolerateUnexpectedToken = function(e) { e === void 0 && (e = a.Messages.UnexpectedTokenIllegal), this.errorHandler.tolerateError(this.index, this.lineNumber, this.index - this.lineStart + 1, e); }, e.prototype.skipSingleLineComment = function(e) { var t = [], n, r; for (this.trackComment && (t = [], n = this.index - e, r = { start: { line: this.lineNumber, column: this.index - this.lineStart - e }, end: {} }); !this.eof();) { var a = this.source.charCodeAt(this.index); if (++this.index, i.Character.isLineTerminator(a)) { if (this.trackComment) { r.end = { line: this.lineNumber, column: this.index - this.lineStart - 1 }; var o = { multiLine: !1, slice: [n + e, this.index - 1], range: [n, this.index - 1], loc: r }; t.push(o); } return a === 13 && this.source.charCodeAt(this.index) === 10 && ++this.index, ++this.lineNumber, this.lineStart = this.index, t; } } if (this.trackComment) { r.end = { line: this.lineNumber, column: this.index - this.lineStart }; var o = { multiLine: !1, slice: [n + e, this.index], range: [n, this.index], loc: r }; t.push(o); } return t; }, e.prototype.skipMultiLineComment = function() { var e = [], t, n; for (this.trackComment && (e = [], t = this.index - 2, n = { start: { line: this.lineNumber, column: this.index - this.lineStart - 2 }, end: {} }); !this.eof();) { var r = this.source.charCodeAt(this.index); if (i.Character.isLineTerminator(r)) r === 13 && this.source.charCodeAt(this.index + 1) === 10 && ++this.index, ++this.lineNumber, ++this.index, this.lineStart = this.index; else if (r === 42) { if (this.source.charCodeAt(this.index + 1) === 47) { if (this.index += 2, this.trackComment) { n.end = { line: this.lineNumber, column: this.index - this.lineStart }; var a = { multiLine: !0, slice: [t + 2, this.index - 2], range: [t, this.index], loc: n }; e.push(a); } return e; } ++this.index; } else ++this.index; } if (this.trackComment) { n.end = { line: this.lineNumber, column: this.index - this.lineStart }; var a = { multiLine: !0, slice: [t + 2, this.index], range: [t, this.index], loc: n }; e.push(a); } return this.tolerateUnexpectedToken(), e; }, e.prototype.scanComments = function() { var e; this.trackComment && (e = []); for (var t = this.index === 0; !this.eof();) { var n = this.source.charCodeAt(this.index); if (i.Character.isWhiteSpace(n)) ++this.index; else if (i.Character.isLineTerminator(n)) ++this.index, n === 13 && this.source.charCodeAt(this.index) === 10 && ++this.index, ++this.lineNumber, this.lineStart = this.index, t = !0; else if (n === 47) if (n = this.source.charCodeAt(this.index + 1), n === 47) { this.index += 2; var r = this.skipSingleLineComment(2); this.trackComment && (e = e.concat(r)), t = !0; } else if (n === 42) { this.index += 2; var r = this.skipMultiLineComment(); this.trackComment && (e = e.concat(r)); } else break; else if (t && n === 45) if (this.source.charCodeAt(this.index + 1) === 45 && this.source.charCodeAt(this.index + 2) === 62) { this.index += 3; var r = this.skipSingleLineComment(3); this.trackComment && (e = e.concat(r)); } else break; else if (n === 60 && !this.isModule) if (this.source.slice(this.index + 1, this.index + 4) === `!--`) { this.index += 4; var r = this.skipSingleLineComment(4); this.trackComment && (e = e.concat(r)); } else break; else break; } return e; }, e.prototype.isFutureReservedWord = function(e) { switch (e) { case `enum`: case `export`: case `import`: case `super`: return !0; default: return !1; } }, e.prototype.isStrictModeReservedWord = function(e) { switch (e) { case `implements`: case `interface`: case `package`: case `private`: case `protected`: case `public`: case `static`: case `yield`: case `let`: return !0; default: return !1; } }, e.prototype.isRestrictedWord = function(e) { return e === `eval` || e === `arguments`; }, e.prototype.isKeyword = function(e) { switch (e.length) { case 2: return e === `if` || e === `in` || e === `do`; case 3: return e === `var` || e === `for` || e === `new` || e === `try` || e === `let`; case 4: return e === `this` || e === `else` || e === `case` || e === `void` || e === `with` || e === `enum`; case 5: return e === `while` || e === `break` || e === `catch` || e === `throw` || e === `const` || e === `yield` || e === `class` || e === `super`; case 6: return e === `return` || e === `typeof` || e === `delete` || e === `switch` || e === `export` || e === `import`; case 7: return e === "default" || e === `finally` || e === `extends`; case 8: return e === `function` || e === `continue` || e === `debugger`; case 10: return e === `instanceof`; default: return !1; } }, e.prototype.codePointAt = function(e) { var t = this.source.charCodeAt(e); if (t >= 55296 && t <= 56319) { var n = this.source.charCodeAt(e + 1); n >= 56320 && n <= 57343 && (t = (t - 55296) * 1024 + n - 56320 + 65536); } return t; }, e.prototype.scanHexEscape = function(e) { for (var t = e === `u` ? 4 : 2, n = 0, r = 0; r < t; ++r) if (!this.eof() && i.Character.isHexDigit(this.source.charCodeAt(this.index))) n = n * 16 + o(this.source[this.index++]); else return null; return String.fromCharCode(n); }, e.prototype.scanUnicodeCodePointEscape = function() { var e = this.source[this.index], t = 0; for (e === `}` && this.throwUnexpectedToken(); !this.eof() && (e = this.source[this.index++], i.Character.isHexDigit(e.charCodeAt(0)));) t = t * 16 + o(e); return (t > 1114111 || e !== `}`) && this.throwUnexpectedToken(), i.Character.fromCodePoint(t); }, e.prototype.getIdentifier = function() { for (var e = this.index++; !this.eof();) { var t = this.source.charCodeAt(this.index); if (t === 92 || t >= 55296 && t < 57343) return this.index = e, this.getComplexIdentifier(); if (i.Character.isIdentifierPart(t)) ++this.index; else break; } return this.source.slice(e, this.index); }, e.prototype.getComplexIdentifier = function() { var e = this.codePointAt(this.index), t = i.Character.fromCodePoint(e); this.index += t.length; var n; for (e === 92 && (this.source.charCodeAt(this.index) !== 117 && this.throwUnexpectedToken(), ++this.index, this.source[this.index] === `{` ? (++this.index, n = this.scanUnicodeCodePointEscape()) : (n = this.scanHexEscape(`u`), (n === null || n === `\\` || !i.Character.isIdentifierStart(n.charCodeAt(0))) && this.throwUnexpectedToken()), t = n); !this.eof() && (e = this.codePointAt(this.index), i.Character.isIdentifierPart(e));) n = i.Character.fromCodePoint(e), t += n, this.index += n.length, e === 92 && (t = t.substr(0, t.length - 1), this.source.charCodeAt(this.index) !== 117 && this.throwUnexpectedToken(), ++this.index, this.source[this.index] === `{` ? (++this.index, n = this.scanUnicodeCodePointEscape()) : (n = this.scanHexEscape(`u`), (n === null || n === `\\` || !i.Character.isIdentifierPart(n.charCodeAt(0))) && this.throwUnexpectedToken()), t += n); return t; }, e.prototype.octalToDecimal = function(e) { var t = e !== `0`, n = s(e); return !this.eof() && i.Character.isOctalDigit(this.source.charCodeAt(this.index)) && (t = !0, n = n * 8 + s(this.source[this.index++]), `0123`.indexOf(e) >= 0 && !this.eof() && i.Character.isOctalDigit(this.source.charCodeAt(this.index)) && (n = n * 8 + s(this.source[this.index++]))), { code: n, octal: t }; }, e.prototype.scanIdentifier = function() { var e, t = this.index, n = this.source.charCodeAt(t) === 92 ? this.getComplexIdentifier() : this.getIdentifier(); if (e = n.length === 1 ? 3 : this.isKeyword(n) ? 4 : n === `null` ? 5 : n === `true` || n === `false` ? 1 : 3, e !== 3 && t + n.length !== this.index) { var r = this.index; this.index = t, this.tolerateUnexpectedToken(a.Messages.InvalidEscapedReservedWord), this.index = r; } return { type: e, value: n, lineNumber: this.lineNumber, lineStart: this.lineStart, start: t, end: this.index }; }, e.prototype.scanPunctuator = function() { var e = this.index, t = this.source[this.index]; switch (t) { case `(`: case `{`: t === `{` && this.curlyStack.push(`{`), ++this.index; break; case `.`: ++this.index, this.source[this.index] === `.` && this.source[this.index + 1] === `.` && (this.index += 2, t = `...`); break; case `}`: ++this.index, this.curlyStack.pop(); break; case `)`: case `;`: case `,`: case `[`: case `]`: case `:`: case `?`: case `~`: ++this.index; break; default: t = this.source.substr(this.index, 4), t === `>>>=` ? this.index += 4 : (t = t.substr(0, 3), t === `===` || t === `!==` || t === `>>>` || t === `<<=` || t === `>>=` || t === `**=` ? this.index += 3 : (t = t.substr(0, 2), t === `&&` || t === `||` || t === `==` || t === `!=` || t === `+=` || t === `-=` || t === `*=` || t === `/=` || t === `++` || t === `--` || t === `<<` || t === `>>` || t === `&=` || t === `|=` || t === `^=` || t === `%=` || t === `<=` || t === `>=` || t === `=>` || t === `**` ? this.index += 2 : (t = this.source[this.index], `<>=!+-*%&|^/`.indexOf(t) >= 0 && ++this.index))); } return this.index === e && this.throwUnexpectedToken(), { type: 7, value: t, lineNumber: this.lineNumber, lineStart: this.lineStart, start: e, end: this.index }; }, e.prototype.scanHexLiteral = function(e) { for (var t = ``; !this.eof() && i.Character.isHexDigit(this.source.charCodeAt(this.index));) t += this.source[this.index++]; return t.length === 0 && this.throwUnexpectedToken(), i.Character.isIdentifierStart(this.source.charCodeAt(this.index)) && this.throwUnexpectedToken(), { type: 6, value: parseInt(`0x` + t, 16), lineNumber: this.lineNumber, lineStart: this.lineStart, start: e, end: this.index }; }, e.prototype.scanBinaryLiteral = function(e) { for (var t = ``, n; !this.eof() && (n = this.source[this.index], !(n !== `0` && n !== `1`));) t += this.source[this.index++]; return t.length === 0 && this.throwUnexpectedToken(), this.eof() || (n = this.source.charCodeAt(this.index), (i.Character.isIdentifierStart(n) || i.Character.isDecimalDigit(n)) && this.throwUnexpectedToken()), { type: 6, value: parseInt(t, 2), lineNumber: this.lineNumber, lineStart: this.lineStart, start: e, end: this.index }; }, e.prototype.scanOctalLiteral = function(e, t) { var n = ``, r = !1; for (i.Character.isOctalDigit(e.charCodeAt(0)) ? (r = !0, n = `0` + this.source[this.index++]) : ++this.index; !this.eof() && i.Character.isOctalDigit(this.source.charCodeAt(this.index));) n += this.source[this.index++]; return !r && n.length === 0 && this.throwUnexpectedToken(), (i.Character.isIdentifierStart(this.source.charCodeAt(this.index)) || i.Character.isDecimalDigit(this.source.charCodeAt(this.index))) && this.throwUnexpectedToken(), { type: 6, value: parseInt(n, 8), octal: r, lineNumber: this.lineNumber, lineStart: this.lineStart, start: t, end: this.index }; }, e.prototype.isImplicitOctalLiteral = function() { for (var e = this.index + 1; e < this.length; ++e) { var t = this.source[e]; if (t === `8` || t === `9`) return !1; if (!i.Character.isOctalDigit(t.charCodeAt(0))) return !0; } return !0; }, e.prototype.scanNumericLiteral = function() { var e = this.index, t = this.source[e]; r.assert(i.Character.isDecimalDigit(t.charCodeAt(0)) || t === `.`, `Numeric literal must start with a decimal digit or a decimal point`); var n = ``; if (t !== `.`) { if (n = this.source[this.index++], t = this.source[this.index], n === `0`) { if (t === `x` || t === `X`) return ++this.index, this.scanHexLiteral(e); if (t === `b` || t === `B`) return ++this.index, this.scanBinaryLiteral(e); if (t === `o` || t === `O` || t && i.Character.isOctalDigit(t.charCodeAt(0)) && this.isImplicitOctalLiteral()) return this.scanOctalLiteral(t, e); } for (; i.Character.isDecimalDigit(this.source.charCodeAt(this.index));) n += this.source[this.index++]; t = this.source[this.index]; } if (t === `.`) { for (n += this.source[this.index++]; i.Character.isDecimalDigit(this.source.charCodeAt(this.index));) n += this.source[this.index++]; t = this.source[this.index]; } if (t === `e` || t === `E`) if (n += this.source[this.index++], t = this.source[this.index], (t === `+` || t === `-`) && (n += this.source[this.index++]), i.Character.isDecimalDigit(this.source.charCodeAt(this.index))) for (; i.Character.isDecimalDigit(this.source.charCodeAt(this.index));) n += this.source[this.index++]; else this.throwUnexpectedToken(); return i.Character.isIdentifierStart(this.source.charCodeAt(this.index)) && this.throwUnexpectedToken(), { type: 6, value: parseFloat(n), lineNumber: this.lineNumber, lineStart: this.lineStart, start: e, end: this.index }; }, e.prototype.scanStringLiteral = function() { var e = this.index, t = this.source[e]; r.assert(t === `'` || t === `"`, `String literal must starts with a quote`), ++this.index; for (var n = !1, o = ``; !this.eof();) { var s = this.source[this.index++]; if (s === t) { t = ``; break; } else if (s === `\\`) if (s = this.source[this.index++], !s || !i.Character.isLineTerminator(s.charCodeAt(0))) switch (s) { case `u`: if (this.source[this.index] === `{`) ++this.index, o += this.scanUnicodeCodePointEscape(); else { var c = this.scanHexEscape(s); c === null && this.throwUnexpectedToken(), o += c; } break; case `x`: var l = this.scanHexEscape(s); l === null && this.throwUnexpectedToken(a.Messages.InvalidHexEscapeSequence), o += l; break; case `n`: o += ` `; break; case `r`: o += `\r`; break; case `t`: o += ` `; break; case `b`: o += `\b`; break; case `f`: o += `\f`; break; case `v`: o += `\v`; break; case `8`: case `9`: o += s, this.tolerateUnexpectedToken(); break; default: if (s && i.Character.isOctalDigit(s.charCodeAt(0))) { var u = this.octalToDecimal(s); n = u.octal || n, o += String.fromCharCode(u.code); } else o += s; break; } else ++this.lineNumber, s === `\r` && this.source[this.index] === ` ` && ++this.index, this.lineStart = this.index; else if (i.Character.isLineTerminator(s.charCodeAt(0))) break; else o += s; } return t !== `` && (this.index = e, this.throwUnexpectedToken()), { type: 8, value: o, octal: n, lineNumber: this.lineNumber, lineStart: this.lineStart, start: e, end: this.index }; }, e.prototype.scanTemplate = function() { var e = ``, t = !1, n = this.index, r = this.source[n] === "`", o = !1, s = 2; for (++this.index; !this.eof();) { var c = this.source[this.index++]; if (c === "`") { s = 1, o = !0, t = !0; break; } else if (c === `$`) { if (this.source[this.index] === `{`) { this.curlyStack.push("${"), ++this.index, t = !0; break; } e += c; } else if (c === `\\`) if (c = this.source[this.index++], i.Character.isLineTerminator(c.charCodeAt(0))) ++this.lineNumber, c === `\r` && this.source[this.index] === ` ` && ++this.index, this.lineStart = this.index; else switch (c) { case `n`: e += ` `; break; case `r`: e += `\r`; break; case `t`: e += ` `; break; case `u`: if (this.source[this.index] === `{`) ++this.index, e += this.scanUnicodeCodePointEscape(); else { var l = this.index, u = this.scanHexEscape(c); u === null ? (this.index = l, e += c) : e += u; } break; case `x`: var d = this.scanHexEscape(c); d === null && this.throwUnexpectedToken(a.Messages.InvalidHexEscapeSequence), e += d; break; case `b`: e += `\b`; break; case `f`: e += `\f`; break; case `v`: e += `\v`; break; default: c === `0` ? (i.Character.isDecimalDigit(this.source.charCodeAt(this.index)) && this.throwUnexpectedToken(a.Messages.TemplateOctalLiteral), e += `\0`) : i.Character.isOctalDigit(c.charCodeAt(0)) ? this.throwUnexpectedToken(a.Messages.TemplateOctalLiteral) : e += c; break; } else i.Character.isLineTerminator(c.charCodeAt(0)) ? (++this.lineNumber, c === `\r` && this.source[this.index] === ` ` && ++this.index, this.lineStart = this.index, e += ` `) : e += c; } return t || this.throwUnexpectedToken(), r || this.curlyStack.pop(), { type: 10, value: this.source.slice(n + 1, this.index - s), cooked: e, head: r, tail: o, lineNumber: this.lineNumber, lineStart: this.lineStart, start: n, end: this.index }; }, e.prototype.testRegExp = function(e, t) { var n = `￿`, r = e, i = this; t.indexOf(`u`) >= 0 && (r = r.replace(/\\u\{([0-9a-fA-F]+)\}|\\u([a-fA-F0-9]{4})/g, function(e, t, r) { var o = parseInt(t || r, 16); return o > 1114111 && i.throwUnexpectedToken(a.Messages.InvalidRegExp), o <= 65535 ? String.fromCharCode(o) : n; }).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g, n)); try { RegExp(r); } catch { this.throwUnexpectedToken(a.Messages.InvalidRegExp); } try { return new RegExp(e, t); } catch { return null; } }, e.prototype.scanRegExpBody = function() { var e = this.source[this.index]; r.assert(e === `/`, `Regular expression literal must start with a slash`); for (var t = this.source[this.index++], n = !1, o = !1; !this.eof();) if (e = this.source[this.index++], t += e, e === `\\`) e = this.source[this.index++], i.Character.isLineTerminator(e.charCodeAt(0)) && this.throwUnexpectedToken(a.Messages.UnterminatedRegExp), t += e; else if (i.Character.isLineTerminator(e.charCodeAt(0))) this.throwUnexpectedToken(a.Messages.UnterminatedRegExp); else if (n) e === `]` && (n = !1); else if (e === `/`) { o = !0; break; } else e === `[` && (n = !0); return o || this.throwUnexpectedToken(a.Messages.UnterminatedRegExp), t.substr(1, t.length - 2); }, e.prototype.scanRegExpFlags = function() { for (var e = ``, t = ``; !this.eof();) { var n = this.source[this.index]; if (!i.Character.isIdentifierPart(n.charCodeAt(0))) break; if (++this.index, n === `\\` && !this.eof()) if (n = this.source[this.index], n === `u`) { ++this.index; var r = this.index, a = this.scanHexEscape(`u`); if (a !== null) for (t += a, e += `\\u`; r < this.index; ++r) e += this.source[r]; else this.index = r, t += `u`, e += `\\u`; this.tolerateUnexpectedToken(); } else e += `\\`, this.tolerateUnexpectedToken(); else t += n, e += n; } return t; }, e.prototype.scanRegExp = function() { var e = this.index, t = this.scanRegExpBody(), n = this.scanRegExpFlags(); return { type: 9, value: ``, pattern: t, flags: n, regex: this.testRegExp(t, n), lineNumber: this.lineNumber, lineStart: this.lineStart, start: e, end: this.index }; }, e.prototype.lex = function() { if (this.eof()) return { type: 2, value: ``, lineNumber: this.lineNumber, lineStart: this.lineStart, start: this.index, end: this.index }; var e = this.source.charCodeAt(this.index); return i.Character.isIdentifierStart(e) ? this.scanIdentifier() : e === 40 || e === 41 || e === 59 ? this.scanPunctuator() : e === 39 || e === 34 ? this.scanStringLiteral() : e === 46 ? i.Character.isDecimalDigit(this.source.charCodeAt(this.index + 1)) ? this.scanNumericLiteral() : this.scanPunctuator() : i.Character.isDecimalDigit(e) ? this.scanNumericLiteral() : e === 96 || e === 125 && this.curlyStack[this.curlyStack.length - 1] === "${" ? this.scanTemplate() : e >= 55296 && e < 57343 && i.Character.isIdentifierStart(this.codePointAt(this.index)) ? this.scanIdentifier() : this.scanPunctuator(); }, e; }(); }, function(e, t) { Object.defineProperty(t, "__esModule", { value: !0 }), t.TokenName = {}, t.TokenName[1] = `Boolean`, t.TokenName[2] = ``, t.TokenName[3] = `Identifier`, t.TokenName[4] = `Keyword`, t.TokenName[5] = `Null`, t.TokenName[6] = `Numeric`, t.TokenName[7] = `Punctuator`, t.TokenName[8] = `String`, t.TokenName[9] = `RegularExpression`, t.TokenName[10] = `Template`; }, function(e, t) { Object.defineProperty(t, "__esModule", { value: !0 }), t.XHTMLEntities = { quot: `"`, amp: `&`, apos: `'`, gt: `>`, nbsp: `\xA0`, iexcl: `¡`, cent: `¢`, pound: `£`, curren: `¤`, yen: `¥`, brvbar: `¦`, sect: `§`, uml: `¨`, copy: `©`, ordf: `ª`, laquo: `«`, not: `¬`, shy: `­`, reg: `®`, macr: `¯`, deg: `°`, plusmn: `±`, sup2: `²`, sup3: `³`, acute: `´`, micro: `µ`, para: `¶`, middot: `·`, cedil: `¸`, sup1: `¹`, ordm: `º`, raquo: `»`, frac14: `¼`, frac12: `½`, frac34: `¾`, iquest: `¿`, Agrave: `À`, Aacute: `Á`, Acirc: `Â`, Atilde: `Ã`, Auml: `Ä`, Aring: `Å`, AElig: `Æ`, Ccedil: `Ç`, Egrave: `È`, Eacute: `É`, Ecirc: `Ê`, Euml: `Ë`, Igrave: `Ì`, Iacute: `Í`, Icirc: `Î`, Iuml: `Ï`, ETH: `Ð`, Ntilde: `Ñ`, Ograve: `Ò`, Oacute: `Ó`, Ocirc: `Ô`, Otilde: `Õ`, Ouml: `Ö`, times: `×`, Oslash: `Ø`, Ugrave: `Ù`, Uacute: `Ú`, Ucirc: `Û`, Uuml: `Ü`, Yacute: `Ý`, THORN: `Þ`, szlig: `ß`, agrave: `à`, aacute: `á`, acirc: `â`, atilde: `ã`, auml: `ä`, aring: `å`, aelig: `æ`, ccedil: `ç`, egrave: `è`, eacute: `é`, ecirc: `ê`, euml: `ë`, igrave: `ì`, iacute: `í`, icirc: `î`, iuml: `ï`, eth: `ð`, ntilde: `ñ`, ograve: `ò`, oacute: `ó`, ocirc: `ô`, otilde: `õ`, ouml: `ö`, divide: `÷`, oslash: `ø`, ugrave: `ù`, uacute: `ú`, ucirc: `û`, uuml: `ü`, yacute: `ý`, thorn: `þ`, yuml: `ÿ`, OElig: `Œ`, oelig: `œ`, Scaron: `Š`, scaron: `š`, Yuml: `Ÿ`, fnof: `ƒ`, circ: `ˆ`, tilde: `˜`, Alpha: `Α`, Beta: `Β`, Gamma: `Γ`, Delta: `Δ`, Epsilon: `Ε`, Zeta: `Ζ`, Eta: `Η`, Theta: `Θ`, Iota: `Ι`, Kappa: `Κ`, Lambda: `Λ`, Mu: `Μ`, Nu: `Ν`, Xi: `Ξ`, Omicron: `Ο`, Pi: `Π`, Rho: `Ρ`, Sigma: `Σ`, Tau: `Τ`, Upsilon: `Υ`, Phi: `Φ`, Chi: `Χ`, Psi: `Ψ`, Omega: `Ω`, alpha: `α`, beta: `β`, gamma: `γ`, delta: `δ`, epsilon: `ε`, zeta: `ζ`, eta: `η`, theta: `θ`, iota: `ι`, kappa: `κ`, lambda: `λ`, mu: `μ`, nu: `ν`, xi: `ξ`, omicron: `ο`, pi: `π`, rho: `ρ`, sigmaf: `ς`, sigma: `σ`, tau: `τ`, upsilon: `υ`, phi: `φ`, chi: `χ`, psi: `ψ`, omega: `ω`, thetasym: `ϑ`, upsih: `ϒ`, piv: `ϖ`, ensp: ` `, emsp: ` `, thinsp: ` `, zwnj: `‌`, zwj: `‍`, lrm: `‎`, rlm: `‏`, ndash: `–`, mdash: `—`, lsquo: `‘`, rsquo: `’`, sbquo: `‚`, ldquo: `“`, rdquo: `”`, bdquo: `„`, dagger: `†`, Dagger: `‡`, bull: `•`, hellip: `…`, permil: `‰`, prime: `′`, Prime: `″`, lsaquo: `‹`, rsaquo: `›`, oline: `‾`, frasl: `⁄`, euro: `€`, image: `ℑ`, weierp: `℘`, real: `ℜ`, trade: `™`, alefsym: `ℵ`, larr: `←`, uarr: `↑`, rarr: `→`, darr: `↓`, harr: `↔`, crarr: `↵`, lArr: `⇐`, uArr: `⇑`, rArr: `⇒`, dArr: `⇓`, hArr: `⇔`, forall: `∀`, part: `∂`, exist: `∃`, empty: `∅`, nabla: `∇`, isin: `∈`, notin: `∉`, ni: `∋`, prod: `∏`, sum: `∑`, minus: `−`, lowast: `∗`, radic: `√`, prop: `∝`, infin: `∞`, ang: `∠`, and: `∧`, or: `∨`, cap: `∩`, cup: `∪`, int: `∫`, there4: `∴`, sim: `∼`, cong: `≅`, asymp: `≈`, ne: `≠`, equiv: `≡`, le: `≤`, ge: `≥`, sub: `⊂`, sup: `⊃`, nsub: `⊄`, sube: `⊆`, supe: `⊇`, oplus: `⊕`, otimes: `⊗`, perp: `⊥`, sdot: `⋅`, lceil: `⌈`, rceil: `⌉`, lfloor: `⌊`, rfloor: `⌋`, loz: `◊`, spades: `♠`, clubs: `♣`, hearts: `♥`, diams: `♦`, lang: `⟨`, rang: `⟩` }; }, function(e, t, n) { Object.defineProperty(t, "__esModule", { value: !0 }); var r = n(10), i = n(12), a = n(13), o = function() { function e() { this.values = [], this.curly = this.paren = -1; } return e.prototype.beforeFunctionExpression = function(e) { return `(.{.[.in.typeof.instanceof.new.return.case.delete.throw.void.=.+=.-=.*=.**=./=.%=.<<=.>>=.>>>=.&=.|=.^=.,.+.-.*.**./.%.++.--.<<.>>.>>>.&.|.^.!.~.&&.||.?.:.===.==.>=.<=.<.>.!=.!==`.split(`.`).indexOf(e) >= 0; }, e.prototype.isRegexStart = function() { var e = this.values[this.values.length - 1], t = e !== null; switch (e) { case `this`: case `]`: t = !1; break; case `)`: var n = this.values[this.paren - 1]; t = n === `if` || n === `while` || n === `for` || n === `with`; break; case `}`: if (t = !1, this.values[this.curly - 3] === `function`) { var r = this.values[this.curly - 4]; t = r ? !this.beforeFunctionExpression(r) : !1; } else if (this.values[this.curly - 4] === `function`) { var r = this.values[this.curly - 5]; t = r ? !this.beforeFunctionExpression(r) : !0; } break; default: break; } return t; }, e.prototype.push = function(e) { e.type === 7 || e.type === 4 ? (e.value === `{` ? this.curly = this.values.length : e.value === `(` && (this.paren = this.values.length), this.values.push(e.value)) : this.values.push(null); }, e; }(); t.Tokenizer = function() { function e(e, t) { this.errorHandler = new r.ErrorHandler(), this.errorHandler.tolerant = t ? typeof t.tolerant == `boolean` && t.tolerant : !1, this.scanner = new i.Scanner(e, this.errorHandler), this.scanner.trackComment = t ? typeof t.comment == `boolean` && t.comment : !1, this.trackRange = t ? typeof t.range == `boolean` && t.range : !1, this.trackLoc = t ? typeof t.loc == `boolean` && t.loc : !1, this.buffer = [], this.reader = new o(); } return e.prototype.errors = function() { return this.errorHandler.errors; }, e.prototype.getNextToken = function() { if (this.buffer.length === 0) { var e = this.scanner.scanComments(); if (this.scanner.trackComment) for (var t = 0; t < e.length; ++t) { var n = e[t], r = this.scanner.source.slice(n.slice[0], n.slice[1]), i = { type: n.multiLine ? `BlockComment` : `LineComment`, value: r }; this.trackRange && (i.range = n.range), this.trackLoc && (i.loc = n.loc), this.buffer.push(i); } if (!this.scanner.eof()) { var o = void 0; this.trackLoc && (o = { start: { line: this.scanner.lineNumber, column: this.scanner.index - this.scanner.lineStart }, end: {} }); var s = this.scanner.source[this.scanner.index] === `/` && this.reader.isRegexStart() ? this.scanner.scanRegExp() : this.scanner.lex(); this.reader.push(s); var c = { type: a.TokenName[s.type], value: this.scanner.source.slice(s.start, s.end) }; this.trackRange && (c.range = [s.start, s.end]), this.trackLoc && (o.end = { line: this.scanner.lineNumber, column: this.scanner.index - this.scanner.lineStart }, c.loc = o), s.type === 9 && (c.regex = { pattern: s.pattern, flags: s.flags }), this.buffer.push(c); } } return this.buffer.shift(); }, e; }(); } ]); }); })); var require_function = __commonJSMin(((e, t) => { var n; try { n = require_esprima(); } catch { typeof window < `u` && (n = window.esprima); } var r = require_type(); function i(e) { if (e === null) return !1; try { var t = `(` + e + `)`, r = n.parse(t, { range: !0 }); return !(r.type !== `Program` || r.body.length !== 1 || r.body[0].type !== `ExpressionStatement` || r.body[0].expression.type !== `ArrowFunctionExpression` && r.body[0].expression.type !== `FunctionExpression`); } catch { return !1; } } function a(e) { var t = `(` + e + `)`, r = n.parse(t, { range: !0 }), i = [], a; if (r.type !== `Program` || r.body.length !== 1 || r.body[0].type !== `ExpressionStatement` || r.body[0].expression.type !== `ArrowFunctionExpression` && r.body[0].expression.type !== `FunctionExpression`) throw Error(`Failed to resolve function`); return r.body[0].expression.params.forEach(function(e) { i.push(e.name); }), a = r.body[0].expression.body.range, r.body[0].expression.body.type === `BlockStatement` ? Function(i, t.slice(a[0] + 1, a[1] - 1)) : Function(i, `return ` + t.slice(a[0], a[1])); } function o(e) { return e.toString(); } function s(e) { return Object.prototype.toString.call(e) === `[object Function]`; } t.exports = new r(`tag:yaml.org,2002:js/function`, { kind: `scalar`, resolve: i, construct: a, predicate: s, represent: o }); })); var require_default_full = __commonJSMin(((e, t) => { var n = require_schema(); t.exports = n.DEFAULT = new n({ include: [require_default_safe()], explicit: [ require_undefined(), require_regexp(), require_function() ] }); })); var require_loader = __commonJSMin(((e, t) => { var n = require_common(), r = require_exception(), i = require_mark(), a = require_default_safe(), o = require_default_full(), s = Object.prototype.hasOwnProperty, c = 1, l = 2, u = 3, d = 4, f = 1, p = 2, m = 3, h = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/, g = /[\x85\u2028\u2029]/, _ = /[,\[\]\{\}]/, v = /^(?:!|!!|![a-z\-]+!)$/i, y = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i; function b(e) { return Object.prototype.toString.call(e); } function x(e) { return e === 10 || e === 13; } function S(e) { return e === 9 || e === 32; } function C(e) { return e === 9 || e === 32 || e === 10 || e === 13; } function w(e) { return e === 44 || e === 91 || e === 93 || e === 123 || e === 125; } function ee(e) { var t; return 48 <= e && e <= 57 ? e - 48 : (t = e | 32, 97 <= t && t <= 102 ? t - 97 + 10 : -1); } function T(e) { return e === 120 ? 2 : e === 117 ? 4 : e === 85 ? 8 : 0; } function E(e) { return 48 <= e && e <= 57 ? e - 48 : -1; } function D(e) { return e === 48 ? `\0` : e === 97 ? `\x07` : e === 98 ? `\b` : e === 116 || e === 9 ? ` ` : e === 110 ? ` ` : e === 118 ? `\v` : e === 102 ? `\f` : e === 114 ? `\r` : e === 101 ? `\x1B` : e === 32 ? ` ` : e === 34 ? `"` : e === 47 ? `/` : e === 92 ? `\\` : e === 78 ? `…` : e === 95 ? `\xA0` : e === 76 ? `\u2028` : e === 80 ? `\u2029` : ``; } function O(e) { return e <= 65535 ? String.fromCharCode(e) : String.fromCharCode((e - 65536 >> 10) + 55296, (e - 65536 & 1023) + 56320); } function te(e, t, n) { t === `__proto__` ? Object.defineProperty(e, t, { configurable: !0, enumerable: !0, writable: !0, value: n }) : e[t] = n; } for (var k = Array(256), A = Array(256), j = 0; j < 256; j++) k[j] = +!!D(j), A[j] = D(j); function ne(e, t) { this.input = e, this.filename = t.filename || null, this.schema = t.schema || o, this.onWarning = t.onWarning || null, this.legacy = t.legacy || !1, this.json = t.json || !1, this.listener = t.listener || null, this.implicitTypes = this.schema.compiledImplicit, this.typeMap = this.schema.compiledTypeMap, this.length = e.length, this.position = 0, this.line = 0, this.lineStart = 0, this.lineIndent = 0, this.documents = []; } function M(e, t) { return new r(t, new i(e.filename, e.input, e.position, e.line, e.position - e.lineStart)); } function N(e, t) { throw M(e, t); } function P(e, t) { e.onWarning && e.onWarning.call(null, M(e, t)); } var F = { YAML: function(e, t, n) { var r, i, a; e.version !== null && N(e, `duplication of %YAML directive`), n.length !== 1 && N(e, `YAML directive accepts exactly one argument`), r = /^([0-9]+)\.([0-9]+)$/.exec(n[0]), r === null && N(e, `ill-formed argument of the YAML directive`), i = parseInt(r[1], 10), a = parseInt(r[2], 10), i !== 1 && N(e, `unacceptable YAML version of the document`), e.version = n[0], e.checkLineBreaks = a < 2, a !== 1 && a !== 2 && P(e, `unsupported YAML version of the document`); }, TAG: function(e, t, n) { var r, i; n.length !== 2 && N(e, `TAG directive accepts exactly two arguments`), r = n[0], i = n[1], v.test(r) || N(e, `ill-formed tag handle (first argument) of the TAG directive`), s.call(e.tagMap, r) && N(e, `there is a previously declared suffix for "` + r + `" tag handle`), y.test(i) || N(e, `ill-formed tag prefix (second argument) of the TAG directive`), e.tagMap[r] = i; } }; function I(e, t, n, r) { var i, a, o, s; if (t < n) { if (s = e.input.slice(t, n), r) for (i = 0, a = s.length; i < a; i += 1) o = s.charCodeAt(i), o === 9 || 32 <= o && o <= 1114111 || N(e, `expected valid JSON character`); else h.test(s) && N(e, `the stream contains non-printable characters`); e.result += s; } } function L(e, t, r, i) { var a, o, c, l; for (n.isObject(r) || N(e, `cannot merge mappings; the provided source object is unacceptable`), a = Object.keys(r), c = 0, l = a.length; c < l; c += 1) o = a[c], s.call(t, o) || (te(t, o, r[o]), i[o] = !0); } function R(e, t, n, r, i, a, o, c) { var l, u; if (Array.isArray(i)) for (i = Array.prototype.slice.call(i), l = 0, u = i.length; l < u; l += 1) Array.isArray(i[l]) && N(e, `nested arrays are not supported inside keys`), typeof i == `object` && b(i[l]) === `[object Object]` && (i[l] = `[object Object]`); if (typeof i == `object` && b(i) === `[object Object]` && (i = `[object Object]`), i = String(i), t === null && (t = {}), r === `tag:yaml.org,2002:merge`) if (Array.isArray(a)) for (l = 0, u = a.length; l < u; l += 1) L(e, t, a[l], n); else L(e, t, a, n); else !e.json && !s.call(n, i) && s.call(t, i) && (e.line = o || e.line, e.position = c || e.position, N(e, `duplicated mapping key`)), te(t, i, a), delete n[i]; return t; } function z(e) { var t = e.input.charCodeAt(e.position); t === 10 ? e.position++ : t === 13 ? (e.position++, e.input.charCodeAt(e.position) === 10 && e.position++) : N(e, `a line break is expected`), e.line += 1, e.lineStart = e.position; } function B(e, t, n) { for (var r = 0, i = e.input.charCodeAt(e.position); i !== 0;) { for (; S(i);) i = e.input.charCodeAt(++e.position); if (t && i === 35) do i = e.input.charCodeAt(++e.position); while (i !== 10 && i !== 13 && i !== 0); if (x(i)) for (z(e), i = e.input.charCodeAt(e.position), r++, e.lineIndent = 0; i === 32;) e.lineIndent++, i = e.input.charCodeAt(++e.position); else break; } return n !== -1 && r !== 0 && e.lineIndent < n && P(e, `deficient indentation`), r; } function V(e) { var t = e.position, n = e.input.charCodeAt(t); return !!((n === 45 || n === 46) && n === e.input.charCodeAt(t + 1) && n === e.input.charCodeAt(t + 2) && (t += 3, n = e.input.charCodeAt(t), n === 0 || C(n))); } function H(e, t) { t === 1 ? e.result += ` ` : t > 1 && (e.result += n.repeat(` `, t - 1)); } function U(e, t, n) { var r, i, a, o, s, c, l, u, d = e.kind, f = e.result, p = e.input.charCodeAt(e.position); if (C(p) || w(p) || p === 35 || p === 38 || p === 42 || p === 33 || p === 124 || p === 62 || p === 39 || p === 34 || p === 37 || p === 64 || p === 96 || (p === 63 || p === 45) && (i = e.input.charCodeAt(e.position + 1), C(i) || n && w(i))) return !1; for (e.kind = `scalar`, e.result = ``, a = o = e.position, s = !1; p !== 0;) { if (p === 58) { if (i = e.input.charCodeAt(e.position + 1), C(i) || n && w(i)) break; } else if (p === 35) { if (r = e.input.charCodeAt(e.position - 1), C(r)) break; } else if (e.position === e.lineStart && V(e) || n && w(p)) break; else if (x(p)) if (c = e.line, l = e.lineStart, u = e.lineIndent, B(e, !1, -1), e.lineIndent >= t) { s = !0, p = e.input.charCodeAt(e.position); continue; } else { e.position = o, e.line = c, e.lineStart = l, e.lineIndent = u; break; } s &&= (I(e, a, o, !1), H(e, e.line - c), a = o = e.position, !1), S(p) || (o = e.position + 1), p = e.input.charCodeAt(++e.position); } return I(e, a, o, !1), e.result ? !0 : (e.kind = d, e.result = f, !1); } function W(e, t) { var n = e.input.charCodeAt(e.position), r, i; if (n !== 39) return !1; for (e.kind = `scalar`, e.result = ``, e.position++, r = i = e.position; (n = e.input.charCodeAt(e.position)) !== 0;) if (n === 39) if (I(e, r, e.position, !0), n = e.input.charCodeAt(++e.position), n === 39) r = e.position, e.position++, i = e.position; else return !0; else x(n) ? (I(e, r, i, !0), H(e, B(e, !1, t)), r = i = e.position) : e.position === e.lineStart && V(e) ? N(e, `unexpected end of the document within a single quoted scalar`) : (e.position++, i = e.position); N(e, `unexpected end of the stream within a single quoted scalar`); } function G(e, t) { var n, r, i, a, o, s = e.input.charCodeAt(e.position); if (s !== 34) return !1; for (e.kind = `scalar`, e.result = ``, e.position++, n = r = e.position; (s = e.input.charCodeAt(e.position)) !== 0;) if (s === 34) return I(e, n, e.position, !0), e.position++, !0; else if (s === 92) { if (I(e, n, e.position, !0), s = e.input.charCodeAt(++e.position), x(s)) B(e, !1, t); else if (s < 256 && k[s]) e.result += A[s], e.position++; else if ((o = T(s)) > 0) { for (i = o, a = 0; i > 0; i--) s = e.input.charCodeAt(++e.position), (o = ee(s)) >= 0 ? a = (a << 4) + o : N(e, `expected hexadecimal character`); e.result += O(a), e.position++; } else N(e, `unknown escape sequence`); n = r = e.position; } else x(s) ? (I(e, n, r, !0), H(e, B(e, !1, t)), n = r = e.position) : e.position === e.lineStart && V(e) ? N(e, `unexpected end of the document within a double quoted scalar`) : (e.position++, r = e.position); N(e, `unexpected end of the stream within a double quoted scalar`); } function K(e, t) { var n = !0, r, i = e.tag, a, o = e.anchor, s, l, u, d, f, p = {}, m, h, g, _ = e.input.charCodeAt(e.position); if (_ === 91) l = 93, f = !1, a = []; else if (_ === 123) l = 125, f = !0, a = {}; else return !1; for (e.anchor !== null && (e.anchorMap[e.anchor] = a), _ = e.input.charCodeAt(++e.position); _ !== 0;) { if (B(e, !0, t), _ = e.input.charCodeAt(e.position), _ === l) return e.position++, e.tag = i, e.anchor = o, e.kind = f ? `mapping` : `sequence`, e.result = a, !0; n || N(e, `missed comma between flow collection entries`), h = m = g = null, u = d = !1, _ === 63 && (s = e.input.charCodeAt(e.position + 1), C(s) && (u = d = !0, e.position++, B(e, !0, t))), r = e.line, Z(e, t, c, !1, !0), h = e.tag, m = e.result, B(e, !0, t), _ = e.input.charCodeAt(e.position), (d || e.line === r) && _ === 58 && (u = !0, _ = e.input.charCodeAt(++e.position), B(e, !0, t), Z(e, t, c, !1, !0), g = e.result), f ? R(e, a, p, h, m, g) : u ? a.push(R(e, null, p, h, m, g)) : a.push(m), B(e, !0, t), _ = e.input.charCodeAt(e.position), _ === 44 ? (n = !0, _ = e.input.charCodeAt(++e.position)) : n = !1; } N(e, `unexpected end of the stream within a flow collection`); } function q(e, t) { var r, i, a = f, o = !1, s = !1, c = t, l = 0, u = !1, d, h = e.input.charCodeAt(e.position); if (h === 124) i = !1; else if (h === 62) i = !0; else return !1; for (e.kind = `scalar`, e.result = ``; h !== 0;) if (h = e.input.charCodeAt(++e.position), h === 43 || h === 45) f === a ? a = h === 43 ? m : p : N(e, `repeat of a chomping mode identifier`); else if ((d = E(h)) >= 0) d === 0 ? N(e, `bad explicit indentation width of a block scalar; it cannot be less than one`) : s ? N(e, `repeat of an indentation width identifier`) : (c = t + d - 1, s = !0); else break; if (S(h)) { do h = e.input.charCodeAt(++e.position); while (S(h)); if (h === 35) do h = e.input.charCodeAt(++e.position); while (!x(h) && h !== 0); } for (; h !== 0;) { for (z(e), e.lineIndent = 0, h = e.input.charCodeAt(e.position); (!s || e.lineIndent < c) && h === 32;) e.lineIndent++, h = e.input.charCodeAt(++e.position); if (!s && e.lineIndent > c && (c = e.lineIndent), x(h)) { l++; continue; } if (e.lineIndent < c) { a === m ? e.result += n.repeat(` `, o ? 1 + l : l) : a === f && o && (e.result += ` `); break; } for (i ? S(h) ? (u = !0, e.result += n.repeat(` `, o ? 1 + l : l)) : u ? (u = !1, e.result += n.repeat(` `, l + 1)) : l === 0 ? o && (e.result += ` `) : e.result += n.repeat(` `, l) : e.result += n.repeat(` `, o ? 1 + l : l), o = !0, s = !0, l = 0, r = e.position; !x(h) && h !== 0;) h = e.input.charCodeAt(++e.position); I(e, r, e.position, !1); } return !0; } function J(e, t) { var n, r = e.tag, i = e.anchor, a = [], o, s = !1, c; for (e.anchor !== null && (e.anchorMap[e.anchor] = a), c = e.input.charCodeAt(e.position); c !== 0 && !(c !== 45 || (o = e.input.charCodeAt(e.position + 1), !C(o)));) { if (s = !0, e.position++, B(e, !0, -1) && e.lineIndent <= t) { a.push(null), c = e.input.charCodeAt(e.position); continue; } if (n = e.line, Z(e, t, u, !1, !0), a.push(e.result), B(e, !0, -1), c = e.input.charCodeAt(e.position), (e.line === n || e.lineIndent > t) && c !== 0) N(e, `bad indentation of a sequence entry`); else if (e.lineIndent < t) break; } return s ? (e.tag = r, e.anchor = i, e.kind = `sequence`, e.result = a, !0) : !1; } function re(e, t, n) { var r, i, a, o, s = e.tag, c = e.anchor, u = {}, f = {}, p = null, m = null, h = null, g = !1, _ = !1, v; for (e.anchor !== null && (e.anchorMap[e.anchor] = u), v = e.input.charCodeAt(e.position); v !== 0;) { if (r = e.input.charCodeAt(e.position + 1), a = e.line, o = e.position, (v === 63 || v === 58) && C(r)) v === 63 ? (g && (R(e, u, f, p, m, null), p = m = h = null), _ = !0, g = !0, i = !0) : g ? (g = !1, i = !0) : N(e, `incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line`), e.position += 1, v = r; else if (Z(e, n, l, !1, !0)) if (e.line === a) { for (v = e.input.charCodeAt(e.position); S(v);) v = e.input.charCodeAt(++e.position); if (v === 58) v = e.input.charCodeAt(++e.position), C(v) || N(e, `a whitespace character is expected after the key-value separator within a block mapping`), g && (R(e, u, f, p, m, null), p = m = h = null), _ = !0, g = !1, i = !1, p = e.tag, m = e.result; else if (_) N(e, `can not read an implicit mapping pair; a colon is missed`); else return e.tag = s, e.anchor = c, !0; } else if (_) N(e, `can not read a block mapping entry; a multiline key may not be an implicit key`); else return e.tag = s, e.anchor = c, !0; else break; if ((e.line === a || e.lineIndent > t) && (Z(e, t, d, !0, i) && (g ? m = e.result : h = e.result), g || (R(e, u, f, p, m, h, a, o), p = m = h = null), B(e, !0, -1), v = e.input.charCodeAt(e.position)), e.lineIndent > t && v !== 0) N(e, `bad indentation of a mapping entry`); else if (e.lineIndent < t) break; } return g && R(e, u, f, p, m, null), _ && (e.tag = s, e.anchor = c, e.kind = `mapping`, e.result = u), _; } function Y(e) { var t, n = !1, r = !1, i, a, o = e.input.charCodeAt(e.position); if (o !== 33) return !1; if (e.tag !== null && N(e, `duplication of a tag property`), o = e.input.charCodeAt(++e.position), o === 60 ? (n = !0, o = e.input.charCodeAt(++e.position)) : o === 33 ? (r = !0, i = `!!`, o = e.input.charCodeAt(++e.position)) : i = `!`, t = e.position, n) { do o = e.input.charCodeAt(++e.position); while (o !== 0 && o !== 62); e.position < e.length ? (a = e.input.slice(t, e.position), o = e.input.charCodeAt(++e.position)) : N(e, `unexpected end of the stream within a verbatim tag`); } else { for (; o !== 0 && !C(o);) o === 33 && (r ? N(e, `tag suffix cannot contain exclamation marks`) : (i = e.input.slice(t - 1, e.position + 1), v.test(i) || N(e, `named tag handle cannot contain such characters`), r = !0, t = e.position + 1)), o = e.input.charCodeAt(++e.position); a = e.input.slice(t, e.position), _.test(a) && N(e, `tag suffix cannot contain flow indicator characters`); } return a && !y.test(a) && N(e, `tag name cannot contain such characters: ` + a), n ? e.tag = a : s.call(e.tagMap, i) ? e.tag = e.tagMap[i] + a : i === `!` ? e.tag = `!` + a : i === `!!` ? e.tag = `tag:yaml.org,2002:` + a : N(e, `undeclared tag handle "` + i + `"`), !0; } function X(e) { var t, n = e.input.charCodeAt(e.position); if (n !== 38) return !1; for (e.anchor !== null && N(e, `duplication of an anchor property`), n = e.input.charCodeAt(++e.position), t = e.position; n !== 0 && !C(n) && !w(n);) n = e.input.charCodeAt(++e.position); return e.position === t && N(e, `name of an anchor node must contain at least one character`), e.anchor = e.input.slice(t, e.position), !0; } function ie(e) { var t, n, r = e.input.charCodeAt(e.position); if (r !== 42) return !1; for (r = e.input.charCodeAt(++e.position), t = e.position; r !== 0 && !C(r) && !w(r);) r = e.input.charCodeAt(++e.position); return e.position === t && N(e, `name of an alias node must contain at least one character`), n = e.input.slice(t, e.position), s.call(e.anchorMap, n) || N(e, `unidentified alias "` + n + `"`), e.result = e.anchorMap[n], B(e, !0, -1), !0; } function Z(e, t, n, r, i) { var a, o, f, p = 1, m = !1, h = !1, g, _, v, y, b; if (e.listener !== null && e.listener(`open`, e), e.tag = null, e.anchor = null, e.kind = null, e.result = null, a = o = f = d === n || u === n, r && B(e, !0, -1) && (m = !0, e.lineIndent > t ? p = 1 : e.lineIndent === t ? p = 0 : e.lineIndent < t && (p = -1)), p === 1) for (; Y(e) || X(e);) B(e, !0, -1) ? (m = !0, f = a, e.lineIndent > t ? p = 1 : e.lineIndent === t ? p = 0 : e.lineIndent < t && (p = -1)) : f = !1; if (f &&= m || i, (p === 1 || d === n) && (y = c === n || l === n ? t : t + 1, b = e.position - e.lineStart, p === 1 ? f && (J(e, b) || re(e, b, y)) || K(e, y) ? h = !0 : (o && q(e, y) || W(e, y) || G(e, y) ? h = !0 : ie(e) ? (h = !0, (e.tag !== null || e.anchor !== null) && N(e, `alias node should not have any properties`)) : U(e, y, c === n) && (h = !0, e.tag === null && (e.tag = `?`)), e.anchor !== null && (e.anchorMap[e.anchor] = e.result)) : p === 0 && (h = f && J(e, b))), e.tag !== null && e.tag !== `!`) if (e.tag === `?`) { for (e.result !== null && e.kind !== `scalar` && N(e, `unacceptable node kind for ! tag; it should be "scalar", not "` + e.kind + `"`), g = 0, _ = e.implicitTypes.length; g < _; g += 1) if (v = e.implicitTypes[g], v.resolve(e.result)) { e.result = v.construct(e.result), e.tag = v.tag, e.anchor !== null && (e.anchorMap[e.anchor] = e.result); break; } } else s.call(e.typeMap[e.kind || `fallback`], e.tag) ? (v = e.typeMap[e.kind || `fallback`][e.tag], e.result !== null && v.kind !== e.kind && N(e, `unacceptable node kind for !<` + e.tag + `> tag; it should be "` + v.kind + `", not "` + e.kind + `"`), v.resolve(e.result) ? (e.result = v.construct(e.result), e.anchor !== null && (e.anchorMap[e.anchor] = e.result)) : N(e, `cannot resolve a node with !<` + e.tag + `> explicit tag`)) : N(e, `unknown tag !<` + e.tag + `>`); return e.listener !== null && e.listener(`close`, e), e.tag !== null || e.anchor !== null || h; } function ae(e) { var t = e.position, n, r, i, a = !1, o; for (e.version = null, e.checkLineBreaks = e.legacy, e.tagMap = {}, e.anchorMap = {}; (o = e.input.charCodeAt(e.position)) !== 0 && (B(e, !0, -1), o = e.input.charCodeAt(e.position), !(e.lineIndent > 0 || o !== 37));) { for (a = !0, o = e.input.charCodeAt(++e.position), n = e.position; o !== 0 && !C(o);) o = e.input.charCodeAt(++e.position); for (r = e.input.slice(n, e.position), i = [], r.length < 1 && N(e, `directive name must not be less than one character in length`); o !== 0;) { for (; S(o);) o = e.input.charCodeAt(++e.position); if (o === 35) { do o = e.input.charCodeAt(++e.position); while (o !== 0 && !x(o)); break; } if (x(o)) break; for (n = e.position; o !== 0 && !C(o);) o = e.input.charCodeAt(++e.position); i.push(e.input.slice(n, e.position)); } o !== 0 && z(e), s.call(F, r) ? F[r](e, r, i) : P(e, `unknown document directive "` + r + `"`); } if (B(e, !0, -1), e.lineIndent === 0 && e.input.charCodeAt(e.position) === 45 && e.input.charCodeAt(e.position + 1) === 45 && e.input.charCodeAt(e.position + 2) === 45 ? (e.position += 3, B(e, !0, -1)) : a && N(e, `directives end mark is expected`), Z(e, e.lineIndent - 1, d, !1, !0), B(e, !0, -1), e.checkLineBreaks && g.test(e.input.slice(t, e.position)) && P(e, `non-ASCII line breaks are interpreted as content`), e.documents.push(e.result), e.position === e.lineStart && V(e)) { e.input.charCodeAt(e.position) === 46 && (e.position += 3, B(e, !0, -1)); return; } if (e.position < e.length - 1) N(e, `end of the stream or a document separator is expected`); else return; } function Q(e, t) { e = String(e), t ||= {}, e.length !== 0 && (e.charCodeAt(e.length - 1) !== 10 && e.charCodeAt(e.length - 1) !== 13 && (e += ` `), e.charCodeAt(0) === 65279 && (e = e.slice(1))); var n = new ne(e, t), r = e.indexOf(`\0`); for (r !== -1 && (n.position = r, N(n, `null byte is not allowed in input`)), n.input += `\0`; n.input.charCodeAt(n.position) === 32;) n.lineIndent += 1, n.position += 1; for (; n.position < n.length - 1;) ae(n); return n.documents; } function oe(e, t, n) { typeof t == `object` && t && n === void 0 && (n = t, t = null); var r = Q(e, n); if (typeof t != `function`) return r; for (var i = 0, a = r.length; i < a; i += 1) t(r[i]); } function se(e, t) { var n = Q(e, t); if (n.length !== 0) { if (n.length === 1) return n[0]; throw new r(`expected a single document in the stream, but found more`); } } function ce(e, t, r) { return typeof t == `object` && t && r === void 0 && (r = t, t = null), oe(e, t, n.extend({ schema: a }, r)); } function le(e, t) { return se(e, n.extend({ schema: a }, t)); } t.exports.loadAll = oe, t.exports.load = se, t.exports.safeLoadAll = ce, t.exports.safeLoad = le; })); var require_dumper = __commonJSMin(((e, t) => { var n = require_common(), r = require_exception(), i = require_default_full(), a = require_default_safe(), o = Object.prototype.toString, s = Object.prototype.hasOwnProperty, c = 9, l = 10, u = 13, d = 32, f = 33, p = 34, m = 35, h = 37, g = 38, _ = 39, v = 42, y = 44, b = 45, x = 58, S = 61, C = 62, w = 63, ee = 64, T = 91, E = 93, D = 96, O = 123, te = 124, k = 125, A = {}; A[0] = `\\0`, A[7] = `\\a`, A[8] = `\\b`, A[9] = `\\t`, A[10] = `\\n`, A[11] = `\\v`, A[12] = `\\f`, A[13] = `\\r`, A[27] = `\\e`, A[34] = `\\"`, A[92] = `\\\\`, A[133] = `\\N`, A[160] = `\\_`, A[8232] = `\\L`, A[8233] = `\\P`; var j = [ `y`, `Y`, `yes`, `Yes`, `YES`, `on`, `On`, `ON`, `n`, `N`, `no`, `No`, `NO`, `off`, `Off`, `OFF` ]; function ne(e, t) { var n, r, i, a, o, c, l; if (t === null) return {}; for (n = {}, r = Object.keys(t), i = 0, a = r.length; i < a; i += 1) o = r[i], c = String(t[o]), o.slice(0, 2) === `!!` && (o = `tag:yaml.org,2002:` + o.slice(2)), l = e.compiledTypeMap.fallback[o], l && s.call(l.styleAliases, c) && (c = l.styleAliases[c]), n[o] = c; return n; } function M(e) { var t = e.toString(16).toUpperCase(), i, a; if (e <= 255) i = `x`, a = 2; else if (e <= 65535) i = `u`, a = 4; else if (e <= 4294967295) i = `U`, a = 8; else throw new r(`code point within a string may not be greater than 0xFFFFFFFF`); return `\\` + i + n.repeat(`0`, a - t.length) + t; } function N(e) { this.schema = e.schema || i, this.indent = Math.max(1, e.indent || 2), this.noArrayIndent = e.noArrayIndent || !1, this.skipInvalid = e.skipInvalid || !1, this.flowLevel = n.isNothing(e.flowLevel) ? -1 : e.flowLevel, this.styleMap = ne(this.schema, e.styles || null), this.sortKeys = e.sortKeys || !1, this.lineWidth = e.lineWidth || 80, this.noRefs = e.noRefs || !1, this.noCompatMode = e.noCompatMode || !1, this.condenseFlow = e.condenseFlow || !1, this.implicitTypes = this.schema.compiledImplicit, this.explicitTypes = this.schema.compiledExplicit, this.tag = null, this.result = ``, this.duplicates = [], this.usedDuplicates = null; } function P(e, t) { for (var r = n.repeat(` `, t), i = 0, a = -1, o = ``, s, c = e.length; i < c;) a = e.indexOf(` `, i), a === -1 ? (s = e.slice(i), i = c) : (s = e.slice(i, a + 1), i = a + 1), s.length && s !== ` ` && (o += r), o += s; return o; } function F(e, t) { return ` ` + n.repeat(` `, e.indent * t); } function I(e, t) { var n, r, i; for (n = 0, r = e.implicitTypes.length; n < r; n += 1) if (i = e.implicitTypes[n], i.resolve(t)) return !0; return !1; } function L(e) { return e === d || e === c; } function R(e) { return 32 <= e && e <= 126 || 161 <= e && e <= 55295 && e !== 8232 && e !== 8233 || 57344 <= e && e <= 65533 && e !== 65279 || 65536 <= e && e <= 1114111; } function z(e) { return R(e) && !L(e) && e !== 65279 && e !== u && e !== l; } function B(e, t) { return R(e) && e !== 65279 && e !== y && e !== T && e !== E && e !== O && e !== k && e !== x && (e !== m || t && z(t)); } function V(e) { return R(e) && e !== 65279 && !L(e) && e !== b && e !== w && e !== x && e !== y && e !== T && e !== E && e !== O && e !== k && e !== m && e !== g && e !== v && e !== f && e !== te && e !== S && e !== C && e !== _ && e !== p && e !== h && e !== ee && e !== D; } function H(e) { return /^\n* /.test(e); } var U = 1, W = 2, G = 3, K = 4, q = 5; function J(e, t, n, r, i) { var a, o, s, c = !1, u = !1, d = r !== -1, f = -1, p = V(e.charCodeAt(0)) && !L(e.charCodeAt(e.length - 1)); if (t) for (a = 0; a < e.length; a++) { if (o = e.charCodeAt(a), !R(o)) return q; s = a > 0 ? e.charCodeAt(a - 1) : null, p &&= B(o, s); } else { for (a = 0; a < e.length; a++) { if (o = e.charCodeAt(a), o === l) c = !0, d && (u ||= a - f - 1 > r && e[f + 1] !== ` `, f = a); else if (!R(o)) return q; s = a > 0 ? e.charCodeAt(a - 1) : null, p &&= B(o, s); } u ||= d && a - f - 1 > r && e[f + 1] !== ` `; } return !c && !u ? p && !i(e) ? U : W : n > 9 && H(e) ? q : u ? K : G; } function re(e, t, n, i) { e.dump = function() { if (t.length === 0) return `''`; if (!e.noCompatMode && j.indexOf(t) !== -1) return `'` + t + `'`; var a = e.indent * Math.max(1, n), o = e.lineWidth === -1 ? -1 : Math.max(Math.min(e.lineWidth, 40), e.lineWidth - a), s = i || e.flowLevel > -1 && n >= e.flowLevel; function c(t) { return I(e, t); } switch (J(t, s, e.indent, o, c)) { case U: return t; case W: return `'` + t.replace(/'/g, `''`) + `'`; case G: return `|` + Y(t, e.indent) + X(P(t, a)); case K: return `>` + Y(t, e.indent) + X(P(ie(t, o), a)); case q: return `"` + ae(t, o) + `"`; default: throw new r(`impossible error: invalid scalar style`); } }(); } function Y(e, t) { var n = H(e) ? String(t) : ``, r = e[e.length - 1] === ` `; return n + (r && (e[e.length - 2] === ` ` || e === ` `) ? `+` : r ? `` : `-`) + ` `; } function X(e) { return e[e.length - 1] === ` ` ? e.slice(0, -1) : e; } function ie(e, t) { for (var n = /(\n+)([^\n]*)/g, r = function() { var r = e.indexOf(` `); return r = r === -1 ? e.length : r, n.lastIndex = r, Z(e.slice(0, r), t); }(), i = e[0] === ` ` || e[0] === ` `, a, o; o = n.exec(e);) { var s = o[1], c = o[2]; a = c[0] === ` `, r += s + (!i && !a && c !== `` ? ` ` : ``) + Z(c, t), i = a; } return r; } function Z(e, t) { if (e === `` || e[0] === ` `) return e; for (var n = / [^ ]/g, r, i = 0, a, o = 0, s = 0, c = ``; r = n.exec(e);) s = r.index, s - i > t && (a = o > i ? o : s, c += ` ` + e.slice(i, a), i = a + 1), o = s; return c += ` `, e.length - i > t && o > i ? c += e.slice(i, o) + ` ` + e.slice(o + 1) : c += e.slice(i), c.slice(1); } function ae(e) { for (var t = ``, n, r, i, a = 0; a < e.length; a++) { if (n = e.charCodeAt(a), n >= 55296 && n <= 56319 && (r = e.charCodeAt(a + 1), r >= 56320 && r <= 57343)) { t += M((n - 55296) * 1024 + r - 56320 + 65536), a++; continue; } i = A[n], t += !i && R(n) ? e[a] : i || M(n); } return t; } function Q(e, t, n) { var r = ``, i = e.tag, a, o; for (a = 0, o = n.length; a < o; a += 1) $(e, t, n[a], !1, !1) && (a !== 0 && (r += `,` + (e.condenseFlow ? `` : ` `)), r += e.dump); e.tag = i, e.dump = `[` + r + `]`; } function oe(e, t, n, r) { var i = ``, a = e.tag, o, s; for (o = 0, s = n.length; o < s; o += 1) $(e, t + 1, n[o], !0, !0) && ((!r || o !== 0) && (i += F(e, t)), e.dump && l === e.dump.charCodeAt(0) ? i += `-` : i += `- `, i += e.dump); e.tag = a, e.dump = i || `[]`; } function se(e, t, n) { var r = ``, i = e.tag, a = Object.keys(n), o, s, c, l, u; for (o = 0, s = a.length; o < s; o += 1) u = ``, o !== 0 && (u += `, `), e.condenseFlow && (u += `"`), c = a[o], l = n[c], $(e, t, c, !1, !1) && (e.dump.length > 1024 && (u += `? `), u += e.dump + (e.condenseFlow ? `"` : ``) + `:` + (e.condenseFlow ? `` : ` `), $(e, t, l, !1, !1) && (u += e.dump, r += u)); e.tag = i, e.dump = `{` + r + `}`; } function ce(e, t, n, i) { var a = ``, o = e.tag, s = Object.keys(n), c, u, d, f, p, m; if (e.sortKeys === !0) s.sort(); else if (typeof e.sortKeys == `function`) s.sort(e.sortKeys); else if (e.sortKeys) throw new r(`sortKeys must be a boolean or a function`); for (c = 0, u = s.length; c < u; c += 1) m = ``, (!i || c !== 0) && (m += F(e, t)), d = s[c], f = n[d], $(e, t + 1, d, !0, !0, !0) && (p = e.tag !== null && e.tag !== `?` || e.dump && e.dump.length > 1024, p && (e.dump && l === e.dump.charCodeAt(0) ? m += `?` : m += `? `), m += e.dump, p && (m += F(e, t)), $(e, t + 1, f, !0, p) && (e.dump && l === e.dump.charCodeAt(0) ? m += `:` : m += `: `, m += e.dump, a += m)); e.tag = o, e.dump = a || `{}`; } function le(e, t, n) { var i, a = n ? e.explicitTypes : e.implicitTypes, c, l, u, d; for (c = 0, l = a.length; c < l; c += 1) if (u = a[c], (u.instanceOf || u.predicate) && (!u.instanceOf || typeof t == `object` && t instanceof u.instanceOf) && (!u.predicate || u.predicate(t))) { if (e.tag = n ? u.tag : `?`, u.represent) { if (d = e.styleMap[u.tag] || u.defaultStyle, o.call(u.represent) === `[object Function]`) i = u.represent(t, d); else if (s.call(u.represent, d)) i = u.represent[d](t, d); else throw new r(`!<` + u.tag + `> tag resolver accepts not "` + d + `" style`); e.dump = i; } return !0; } return !1; } function $(e, t, n, i, a, s) { e.tag = null, e.dump = n, le(e, n, !1) || le(e, n, !0); var c = o.call(e.dump); i &&= e.flowLevel < 0 || e.flowLevel > t; var l = c === `[object Object]` || c === `[object Array]`, u, d; if (l && (u = e.duplicates.indexOf(n), d = u !== -1), (e.tag !== null && e.tag !== `?` || d || e.indent !== 2 && t > 0) && (a = !1), d && e.usedDuplicates[u]) e.dump = `*ref_` + u; else { if (l && d && !e.usedDuplicates[u] && (e.usedDuplicates[u] = !0), c === `[object Object]`) i && Object.keys(e.dump).length !== 0 ? (ce(e, t, e.dump, a), d && (e.dump = `&ref_` + u + e.dump)) : (se(e, t, e.dump), d && (e.dump = `&ref_` + u + ` ` + e.dump)); else if (c === `[object Array]`) { var f = e.noArrayIndent && t > 0 ? t - 1 : t; i && e.dump.length !== 0 ? (oe(e, f, e.dump, a), d && (e.dump = `&ref_` + u + e.dump)) : (Q(e, f, e.dump), d && (e.dump = `&ref_` + u + ` ` + e.dump)); } else if (c === `[object String]`) e.tag !== `?` && re(e, e.dump, t, s); else { if (e.skipInvalid) return !1; throw new r(`unacceptable kind of an object to dump ` + c); } e.tag !== null && e.tag !== `?` && (e.dump = `!<` + e.tag + `> ` + e.dump); } return !0; } function ue(e, t) { var n = [], r = [], i, a; for (de(e, n, r), i = 0, a = r.length; i < a; i += 1) t.duplicates.push(n[r[i]]); t.usedDuplicates = Array(a); } function de(e, t, n) { var r, i, a; if (typeof e == `object` && e) if (i = t.indexOf(e), i !== -1) n.indexOf(i) === -1 && n.push(i); else if (t.push(e), Array.isArray(e)) for (i = 0, a = e.length; i < a; i += 1) de(e[i], t, n); else for (r = Object.keys(e), i = 0, a = r.length; i < a; i += 1) de(e[r[i]], t, n); } function fe(e, t) { t ||= {}; var n = new N(t); return n.noRefs || ue(e, n), $(n, 0, e, !0, !0) ? n.dump + ` ` : ``; } function pe(e, t) { return fe(e, n.extend({ schema: a }, t)); } t.exports.dump = fe, t.exports.safeDump = pe; })); var require_js_yaml$1 = __commonJSMin(((e, t) => { var n = require_loader(), r = require_dumper(); function i(e) { return function() { throw Error(`Function ` + e + ` is deprecated and cannot be used.`); }; } t.exports.Type = require_type(), t.exports.Schema = require_schema(), t.exports.FAILSAFE_SCHEMA = require_failsafe(), t.exports.JSON_SCHEMA = require_json(), t.exports.CORE_SCHEMA = require_core(), t.exports.DEFAULT_SAFE_SCHEMA = require_default_safe(), t.exports.DEFAULT_FULL_SCHEMA = require_default_full(), t.exports.load = n.load, t.exports.loadAll = n.loadAll, t.exports.safeLoad = n.safeLoad, t.exports.safeLoadAll = n.safeLoadAll, t.exports.dump = r.dump, t.exports.safeDump = r.safeDump, t.exports.YAMLException = require_exception(), t.exports.MINIMAL_SCHEMA = require_failsafe(), t.exports.SAFE_SCHEMA = require_default_safe(), t.exports.DEFAULT_SCHEMA = require_default_full(), t.exports.scan = i(`scan`), t.exports.parse = i(`parse`), t.exports.compose = i(`compose`), t.exports.addConstructor = i(`addConstructor`); })); var require_js_yaml = __commonJSMin(((e, t) => { t.exports = require_js_yaml$1(); })); var require_engines = __commonJSMin(((exports, module) => { const yaml = require_js_yaml(), engines = exports = module.exports; engines.yaml = { parse: yaml.safeLoad.bind(yaml), stringify: yaml.safeDump.bind(yaml) }, engines.json = { parse: JSON.parse.bind(JSON), stringify: function(e, t) { let n = Object.assign({ replacer: null, space: 2 }, t); return JSON.stringify(e, n.replacer, n.space); } }, engines.javascript = { parse: function parse(str, options, wrap) { try { return wrap !== !1 && (str = `(function() { return ` + str.trim() + `; }());`), eval(str) || {}; } catch (e) { if (wrap !== !1 && /(unexpected|identifier)/i.test(e.message)) return parse(str, options, !1); throw SyntaxError(e); } }, stringify: function() { throw Error(`stringifying JavaScript is not supported`); } }; })); var require_strip_bom_string = __commonJSMin(((e, t) => { t.exports = function(e) { return typeof e == `string` && e.charAt(0) === `` ? e.slice(1) : e; }; })); var require_utils = __commonJSMin(((e) => { let t = require_strip_bom_string(), n = require_kind_of(); e.define = function(e, t, n) { Reflect.defineProperty(e, t, { enumerable: !1, configurable: !0, writable: !0, value: n }); }, e.isBuffer = function(e) { return n(e) === `buffer`; }, e.isObject = function(e) { return n(e) === `object`; }, e.toBuffer = function(e) { return typeof e == `string` ? Buffer.from(e) : e; }, e.toString = function(n) { if (e.isBuffer(n)) return t(String(n)); if (typeof n != `string`) throw TypeError(`expected input to be a string or buffer`); return t(n); }, e.arrayify = function(e) { return e ? Array.isArray(e) ? e : [e] : []; }, e.startsWith = function(e, t, n) { return typeof n != `number` && (n = t.length), e.slice(0, n) === t; }; })); var require_defaults = __commonJSMin(((e, t) => { let n = require_engines(), r = require_utils(); t.exports = function(e) { let t = Object.assign({}, e); return t.delimiters = r.arrayify(t.delims || t.delimiters || `---`), t.delimiters.length === 1 && t.delimiters.push(t.delimiters[0]), t.language = (t.language || t.lang || `yaml`).toLowerCase(), t.engines = Object.assign({}, n, t.parsers, t.engines), t; }; })); var require_engine = __commonJSMin(((e, t) => { t.exports = function(e, t) { let r = t.engines[e] || t.engines[n(e)]; if (r === void 0) throw Error(`gray-matter engine "` + e + `" is not registered`); return typeof r == `function` && (r = { parse: r }), r; }; function n(e) { switch (e.toLowerCase()) { case `js`: case `javascript`: return `javascript`; case `coffee`: case `coffeescript`: case `cson`: return `coffee`; case `yaml`: case `yml`: return `yaml`; default: return e; } } })); var require_stringify = __commonJSMin(((e, t) => { let n = require_kind_of(), r = require_engine(), i = require_defaults(); t.exports = function(e, t, o) { if (t == null && o == null) switch (n(e)) { case `object`: t = e.data, o = {}; break; case `string`: return e; default: throw TypeError(`expected file to be a string or object`); } let s = e.content, c = i(o); if (t == null) { if (!c.data) return e; t = c.data; } let l = e.language || c.language, u = r(l, c); if (typeof u.stringify != `function`) throw TypeError(`expected "` + l + `.stringify" to be a function`); t = Object.assign({}, e.data, t); let d = c.delimiters[0], f = c.delimiters[1], p = u.stringify(t, o).trim(), m = ``; return p !== `{}` && (m = a(d) + a(p) + a(f)), typeof e.excerpt == `string` && e.excerpt !== `` && s.indexOf(e.excerpt.trim()) === -1 && (m += a(e.excerpt) + a(f)), m + a(s); }; function a(e) { return e.slice(-1) === ` ` ? e : e + ` `; } })); var require_excerpt = __commonJSMin(((e, t) => { let n = require_defaults(); t.exports = function(e, t) { let r = n(t); if (e.data ??= {}, typeof r.excerpt == `function`) return r.excerpt(e, r); let i = e.data.excerpt_separator || r.excerpt_separator; if (i == null && (r.excerpt === !1 || r.excerpt == null)) return e; let a = typeof r.excerpt == `string` ? r.excerpt : i || r.delimiters[0], o = e.content.indexOf(a); return o !== -1 && (e.excerpt = e.content.slice(0, o)), e; }; })); var require_to_file = __commonJSMin(((e, t) => { let n = require_kind_of(), r = require_stringify(), i = require_utils(); t.exports = function(e) { return n(e) !== `object` && (e = { content: e }), n(e.data) !== `object` && (e.data = {}), e.contents && e.content == null && (e.content = e.contents), i.define(e, `orig`, i.toBuffer(e.content)), i.define(e, `language`, e.language || ``), i.define(e, `matter`, e.matter || ``), i.define(e, `stringify`, function(t, n) { return n && n.language && (e.language = n.language), r(e, t, n); }), e.content = i.toString(e.content), e.isEmpty = !1, e.excerpt = ``, e; }; })); var require_parse = __commonJSMin(((e, t) => { let n = require_engine(), r = require_defaults(); t.exports = function(e, t, i) { let a = r(i), o = n(e, a); if (typeof o.parse != `function`) throw TypeError(`expected "` + e + `.parse" to be a function`); return o.parse(t, a); }; })); var require_gray_matter = __commonJSMin(((e, t) => { let n = __require(`fs`), r = require_section_matter(), i = require_defaults(), a = require_stringify(), o = require_excerpt(), s = require_engines(), c = require_to_file(), l = require_parse(), u = require_utils(); function d(e, t) { if (e === ``) return { data: {}, content: e, excerpt: ``, orig: e }; let n = c(e), r = d.cache[n.content]; if (!t) { if (r) return n = Object.assign({}, r), n.orig = r.orig, n; d.cache[n.content] = n; } return f(n, t); } function f(e, t) { let n = i(t), a = n.delimiters[0], s = ` ` + n.delimiters[1], c = e.content; n.language && (e.language = n.language); let f = a.length; if (!u.startsWith(c, a, f)) return o(e, n), e; if (c.charAt(f) === a.slice(-1)) return e; c = c.slice(f); let p = c.length, m = d.language(c, n); m.name && (e.language = m.name, c = c.slice(m.raw.length)); let h = c.indexOf(s); return h === -1 && (h = p), e.matter = c.slice(0, h), e.matter.replace(/^\s*#[^\n]+/gm, ``).trim() === `` ? (e.isEmpty = !0, e.empty = e.content, e.data = {}) : e.data = l(e.language, e.matter, n), h === p ? e.content = `` : (e.content = c.slice(h + s.length), e.content[0] === `\r` && (e.content = e.content.slice(1)), e.content[0] === ` ` && (e.content = e.content.slice(1))), o(e, n), (n.sections === !0 || typeof n.section == `function`) && r(e, n.section), e; } d.engines = s, d.stringify = function(e, t, n) { return typeof e == `string` && (e = d(e, n)), a(e, t, n); }, d.read = function(e, t) { let r = d(n.readFileSync(e, `utf8`), t); return r.path = e, r; }, d.test = function(e, t) { return u.startsWith(e, i(t).delimiters[0]); }, d.language = function(e, t) { let n = i(t).delimiters[0]; d.test(e) && (e = e.slice(n.length)); let r = e.slice(0, e.search(/\r?\n/)); return { raw: r, name: r ? r.trim() : `` }; }, d.cache = {}, d.clearCache = function() { d.cache = {}; }, t.exports = d; })); var gray_matter_default = require_gray_matter(); //#endregion //#region node_modules/eve/dist/src/runtime/connections/openapi-spec.js function parseSpecDocument(e) { try { return JSON.parse(e); } catch {} let n = e.replace(/^\uFEFF/, ``); return gray_matter_default(n.trimStart().startsWith(`---`) ? n : `---\n${n}\n---`).data ?? {}; } function extractServerUrl(e, t) { let n = extractOpenApiServerUrl(e, t); return n === void 0 ? extractSwaggerBaseUrl(e, t) : n; } function extractOpenApiServerUrl(t, r) { let i = t.servers; if (isArray(i)) for (let t of i) { if (!isObject(t) || typeof t.url != `string` || t.url.length === 0) continue; let n = isObject(t.variables) ? substituteServerVariables(t.url, t.variables) : t.url; if (n.startsWith(`http://`) || n.startsWith(`https://`)) return n; if (typeof r == `string` && URL.canParse(r)) try { return new URL(n, r).toString(); } catch {} } } function extractSwaggerBaseUrl(e, t) { let n = typeof e.basePath == `string` ? e.basePath : ``, r = typeof e.host == `string` && e.host.length > 0 ? e.host : ``, i = typeof t == `string` && URL.canParse(t) ? new URL(t) : void 0, a = extractSwaggerScheme(e) ?? i?.protocol.replace(/:$/, ``) ?? `https`; if (r.length > 0) return `${a}://${r}${normalizeBasePath(n)}`; if (i !== void 0) { let e = new URL(normalizeBasePath(n) || `/`, i.origin).toString(); return e.endsWith(`/`) && normalizeBasePath(n).length === 0 ? e.slice(0, -1) : e; } } function extractSwaggerScheme(e) { let t = e.schemes; if (isArray(t)) { for (let e of t) if (e === `https` || e === `http`) return e; } } function normalizeBasePath(e) { let t = e.trim(); return t.length === 0 || t === `/` ? `` : t.startsWith(`/`) ? t : `/${t}`; } function substituteServerVariables(t, n) { return t.replace(/\{([^}]+)\}/g, (t, r) => { let i = n[r]; return isObject(i) && typeof i.default == `string` ? i.default : t; }); } //#endregion //#region node_modules/eve/dist/src/runtime/connections/openapi-client.js const SWAGGER_PARAMETER_SCHEMA_KEYS = [ `default`, `enum`, `exclusiveMaximum`, `exclusiveMinimum`, `format`, `items`, `maximum`, `maxItems`, `maxLength`, `minimum`, `minItems`, `minLength`, `multipleOf`, `pattern`, `type`, `uniqueItems` ]; var OpenApiConnectionClient = class { #e; #t; #n; constructor(e) { this.#n = e; } async connect() { return this.#r(); } async getToolMetadata() { return (await this.#r()).metadata; } async getTools() { return (await this.#r()).tools; } async executeTool(t, n) { let r = await this.#r(), i = r.operations.get(t); if (i === void 0) throw Error(`Tool "${t}" not found in connection "${this.#n.connectionName}".`); return this.#f(i, r.baseUrl, isObject(n) ? n : {}); } async close() { this.#e = void 0, this.#t = void 0; } async #r() { if (this.#t !== void 0) return this.#t; if (this.#e !== void 0) return this.#e; this.#e = this.#i(); try { return this.#t = await this.#e, this.#t; } catch (e) { throw this.#e = void 0, e; } } async #i() { let i = await this.#o(), a = this.#a(i), o = this.#s(i), s = this.#n.tools, c = s === void 0 ? o : o.filter((e) => passesToolFilter(e.toolName, s)), l = [], u = /* @__PURE__ */ new Map(), d = {}; for (let r of c) u.set(r.toolName, r), l.push({ description: r.description, inputSchema: r.inputSchema, name: r.toolName }), d[r.toolName] = tool({ description: r.description, inputSchema: jsonSchema(r.inputSchema), execute: async (t) => this.#f(r, a, isObject(t) ? t : {}) }); return { metadata: l, operations: u, tools: d, baseUrl: a }; } #a(e) { let t = this.#n.url; if (typeof t == `string` && t.trim().length > 0) return t; let n = extractServerUrl(e, this.#n.spec); if (n !== void 0) return n; throw Error(`OpenAPI connection "${this.#n.connectionName}" has no base URL: set "baseUrl" or ensure the document declares an absolute "servers" entry or Swagger "host".`); } async #o() { let t = this.#n.spec; if (t === void 0) throw Error(`OpenAPI connection "${this.#n.connectionName}" is missing its "spec" source.`); if (typeof t != `string`) return t; let n; try { n = await fetch(t, { headers: { accept: `application/json, application/yaml, text/yaml, */*` } }); } catch (e) { throw Error(`OpenAPI connection "${this.#n.connectionName}" failed to fetch its spec from "${t}": ${String(e)}`); } if (!n.ok) throw Error(`OpenAPI connection "${this.#n.connectionName}" failed to fetch its spec from "${t}": HTTP ${n.status}.`); let r = await n.text(), i; try { i = parseSpecDocument(r); } catch (e) { throw Error(`OpenAPI connection "${this.#n.connectionName}" spec at "${t}" could not be parsed as JSON or YAML: ${String(e)}`); } if (!isObject(i)) throw Error(`OpenAPI connection "${this.#n.connectionName}" spec at "${t}" is not an OpenAPI document object.`); return i; } #s(t) { let n = t.paths; if (!isObject(n)) return []; let r = [], i = /* @__PURE__ */ new Set(); for (let [u, d] of Object.entries(n)) { if (!isObject(d)) continue; let n = isArray(d.parameters) ? d.parameters : []; for (let f of HTTP_METHODS) { let a = d[f]; if (!isObject(a)) continue; let p = uniqueName(operationName(a, f, u), i), m = isArray(a.parameters) ? a.parameters : [], h = [...n, ...m], g = this.#c(t, h), _ = this.#l(t, a.requestBody, h); r.push({ toolName: p, method: f, pathTemplate: u, description: operationDescription(a), parameters: g, requestBody: _, inputSchema: buildInputSchema(g, _), security: resolveSecurity(t, a) }); } } return r; } #c(t, n) { let r = []; for (let i of n) { let n = isObject(i) ? deref(t, i) : i; if (!isObject(n)) continue; let a = n.in; if (a !== `path` && a !== `query` && a !== `header` && a !== `cookie` || typeof n.name != `string`) continue; let o = this.#u(t, n); r.push({ name: n.name, location: a, required: n.required === !0 || a === `path`, schema: o, description: typeof n.description == `string` ? n.description : void 0 }); } return r; } #l(t, n, r = []) { if (isObject(n)) { let r = deref(t, n); if (isObject(r) && isObject(r.content)) { let n = r.content, i = `application/json` in n ? `application/json` : Object.keys(n)[0]; if (i !== void 0) { let a = n[i], o = isObject(a) && isObject(a.schema) ? derefSchema(t, a.schema) : {}; return { required: r.required === !0, contentType: i, schema: o }; } } } return this.#d(t, r); } #u(t, n) { if (isObject(n.schema)) return derefSchema(t, n.schema); let r = {}; for (let e of SWAGGER_PARAMETER_SCHEMA_KEYS) n[e] !== void 0 && (r[e] = n[e]); return derefSchema(t, r); } #d(t, n) { for (let r of n) { let n = isObject(r) ? deref(t, r) : r; if (!isObject(n) || n.in !== `body`) continue; let i = isObject(n.schema) ? derefSchema(t, n.schema) : {}; return { required: n.required === !0, contentType: `application/json`, schema: i }; } } async #f(e, t, n) { let r = await resolveHeaders(this.#n), a = e.pathTemplate, o = new URLSearchParams(), s = []; for (let t of e.parameters) { let e = n[t.name]; e != null && (t.location === `path` ? a = a.replace(`{${t.name}}`, encodeURIComponent(String(e))) : t.location === `query` ? appendQuery(o, t.name, e) : t.location === `cookie` ? s.push(`${t.name}=${encodeURIComponent(String(e))}`) : r[t.name] = String(e)); } if (applySecurity(e.security, this.#n, r, o, s), s.length > 0) { let e = r.cookie ?? r.Cookie; delete r.Cookie, r.cookie = [e, ...s].filter((e) => !!e).join(`; `); } let c = new URL(joinPath(t, a)); c.search = o.toString(); let l; e.requestBody !== void 0 && n.body !== void 0 && (l = JSON.stringify(n.body), r[`content-type`] = e.requestBody.contentType); let u = await fetch(c, { method: e.method.toUpperCase(), headers: r, body: l }); return { status: u.status, statusText: u.statusText, body: await readResponseBody(u) }; } }; function appendQuery(e, t, n) { if (isArray(n)) { for (let r of n) e.append(t, String(r)); return; } e.append(t, String(n)); } function joinPath(e, t) { return `${e.endsWith(`/`) ? e.slice(0, -1) : e}${t.startsWith(`/`) ? t : `/${t}`}`; } async function readResponseBody(e) { let t = await e.text(); if (t.length === 0) return null; if ((e.headers.get(`content-type`) ?? ``).includes(`application/json`)) try { return JSON.parse(t); } catch { return t; } return t; } //#endregion //#region node_modules/eve/dist/src/runtime/connections/registry.js var ConnectionRegistryImpl = class { #e = /* @__PURE__ */ new Map(); #t; constructor(e) { this.#t = e; } getClient(n) { let r = this.#e.get(n); if (r !== void 0) return r; let i = this.#t.find((e) => e.connectionName === n); if (i === void 0) throw Error(`Connection "${n}" is not registered.`); let a = i.protocol === `openapi` ? new OpenApiConnectionClient(i) : new McpConnectionClient(i); return this.#e.set(n, a), a; } getConnectionApproval(e) { return this.#t.find((t) => t.connectionName === e)?.approval; } getConnectionNames() { return this.#t.map((e) => e.connectionName); } getConnections() { return this.#t; } async dispose() { let e = [...this.#e.values()].map((e) => e.close()); await Promise.allSettled(e), this.#e.clear(); } }; //#endregion //#region node_modules/eve/dist/src/context/node.js function getActiveRuntimeNode(e) { return e.require(BundleKey).graph.root; } //#endregion //#region node_modules/eve/dist/src/context/providers/connection.js const connectionProvider = { key: ConnectionRegistryKey, create(e, t) { if (e.get(BundleKey) === void 0) return; let n = getActiveRuntimeNode(e).agent?.connections; if (!(!n || n.length === 0)) return { value: new ConnectionRegistryImpl(n) }; } }; //#endregion //#region node_modules/eve/dist/src/execution/sandbox/template-prewarm-lock.js const LOCK_TIMEOUT_MS = 900 * 1e3; async function waitForSandboxTemplatePrewarmLock(e) { await waitForLockRelease(resolveSandboxTemplatePrewarmLockPath(e), e.log); } async function withSandboxTemplatePrewarmLock(e, t) { let n = resolveSandboxTemplatePrewarmLockPath(e); await acquireLock(n); try { return await t(); } finally { await rm(n, { force: !0, recursive: !0 }).catch(() => {}); } } function resolveSandboxTemplatePrewarmLockPath(e) { return join(resolveSandboxCacheDirectory(e.appRoot), `template-locks`, e.backendName, `${e.templateKey}.lock`); } async function acquireLock(r) { let i = Date.now(); for (;;) { await mkdir(dirname(r), { recursive: !0 }); try { await mkdir(r), await writeFile(join(r, `owner.json`), `${JSON.stringify({ createdAt: (/* @__PURE__ */ new Date()).toISOString(), pid: process.pid })}\n`); return; } catch (e) { if (!isFileExistsError(e)) throw e; await waitForExistingLock(r, i, void 0); } } } async function waitForLockRelease(e, t) { let n = Date.now(), r = n + 1e4; for (;;) { try { await stat(e); } catch (e) { if (isNotFoundError(e)) return; throw e; } let a = Date.now(); if (t !== void 0 && a >= r) { let e = Math.round((a - n) / 1e3); t(e === 0 ? `waiting for sandbox template prewarm to finish` : `waiting for sandbox template prewarm to finish (${e}s elapsed)`), r = a + 1e4; } await waitForExistingLock(e, n, t); } } async function waitForExistingLock(e, t, n) { let a = await stat(e).catch((e) => { if (isNotFoundError(e)) return null; throw e; }); if (a !== null) { if (Date.now() - a.mtimeMs > 18e5) { n?.(`removing stale sandbox template prewarm lock`), await rm(e, { force: !0, recursive: !0 }).catch(() => {}); return; } if (Date.now() - t > LOCK_TIMEOUT_MS) throw Error(`Timed out waiting for sandbox template prewarm lock "${e}" after ${LOCK_TIMEOUT_MS}ms.`); await new Promise((e) => setTimeout(e, 250)); } } function isFileExistsError(e) { return typeof e == `object` && !!e && `code` in e && e.code === `EEXIST`; } function isNotFoundError(e) { return typeof e == `object` && !!e && `code` in e && e.code === `ENOENT`; } //#endregion //#region node_modules/eve/dist/src/internal/authored-module-map-loader.js async function loadCompiledModuleMapFromAuthoredSource(e) { return await hydrateCompiledModuleMapFromManifest(await loadCompiledManifest({ compiledArtifactsSource: e.compiledArtifactsSource })); } async function hydrateCompiledModuleMapFromManifest(e) { let t = {}, r = [{ agentRoot: e.agentRoot, manifest: e, nodeId: ROOT_COMPILED_AGENT_NODE_ID }, ...[...e.subagents].sort((e, t) => e.nodeId.localeCompare(t.nodeId)).map((e) => ({ agentRoot: e.agent.agentRoot, manifest: e.agent, nodeId: e.nodeId }))]; for (let e of r) t[e.nodeId] = { modules: await hydrateCompiledNodeScope({ agentRoot: e.agentRoot, manifest: e.manifest }) }; return { nodes: t }; } async function hydrateCompiledNodeScope(n) { let i = collectModuleRefsForManifest(n.manifest).sort((e, t) => e.sourceId.localeCompare(t.sourceId)), a = n.manifest.config.build?.externalDependencies ?? [], o = {}; for (let t of i) { let i = join(n.agentRoot, t.logicalPath); o[t.sourceId] = await loadAuthoredModuleNamespace(i, { externalDependencies: a }); } return o; } //#endregion //#region node_modules/eve/dist/src/internal/application/runtime-compiled-artifacts-source.js function createAuthoredSourceRuntimeCompiledArtifactsSource(e) { return createDiskRuntimeCompiledArtifactsSource(e, { moduleMapLoaderPath: resolvePackageSourceFilePath(`src/internal/authored-module-map-loader.ts`) }); } //#endregion //#region node_modules/eve/dist/src/runtime/sandbox/keys.js async function createRuntimeSandboxKeys(e) { return { sessionKey: await createRuntimeSandboxSessionKey(e), templateKey: await createRuntimeSandboxTemplateKey(e) }; } async function createRuntimeSandboxTemplateKey(e) { if (e.templatePlan.kind === `none`) return null; let t = await loadCompileMetadataForKeys(e.compiledArtifactsSource), n = await resolveRuntimeSandboxScope({ backendName: e.backendName, compiledArtifactsSource: e.compiledArtifactsSource, scopeKind: e.templatePlan.kind === `source-graph` ? `deployment` : `stable` }), r = resolveRuntimeSandboxVersionHash({ compiledArtifactsSource: e.compiledArtifactsSource, metadata: t, nodeId: e.nodeId, sourceId: e.sourceId, templatePlan: e.templatePlan }), i = createStableHash(`${resolvePackageVersionForTemplateKey(t)}:6:${r}`).slice(0, 20); return sanitizeRuntimeSandboxKey(`eve-sbx-tpl-${e.backendName}-${n}-${i}`); } function resolvePackageVersionForTemplateKey(t) { return t?.generator.version ?? resolveInstalledPackageInfo().version; } async function loadCompileMetadataForKeys(e) { try { return await loadCompileMetadata({ compiledArtifactsSource: e }); } catch { return null; } } async function createRuntimeSandboxSessionKey(e) { let t = await resolveRuntimeSandboxScope({ backendName: e.backendName, compiledArtifactsSource: e.compiledArtifactsSource, scopeKind: `deployment` }), n = sanitizeRuntimeSandboxKey(e.nodeId); return sanitizeRuntimeSandboxKey(`eve-sbx-ses-${e.backendName}-${t}-${e.sessionId}-${n}`); } async function resolveRuntimeSandboxScope(e) { if (e.backendName === `vercel`) { if (e.scopeKind === `stable`) { let e = resolveVercelProjectScope(); if (e !== void 0) return createStableHash(e).slice(0, 16); } let t = process.env.VERCEL_DEPLOYMENT_ID?.trim(); if (t !== void 0 && t.length > 0) return createStableHash(t).slice(0, 16); } let n = getRuntimeCompiledArtifactsSandboxAppRoot(e.compiledArtifactsSource); return n === void 0 ? createStableHash(getRuntimeCompiledArtifactsCacheKey(e.compiledArtifactsSource)).slice(0, 16) : createStableHash(await realpath(n)).slice(0, 16); } function resolveRuntimeSandboxVersionHash(e) { if (e.templatePlan.kind === `bootstrap`) { let t = e.templatePlan.contentHash ?? resolveSourceGraphHash(e.metadata, e.compiledArtifactsSource); return createStableHash(`bootstrap:${e.templatePlan.revalidationKey ?? ``}:${e.templatePlan.sourceHash}:${t}:${e.nodeId}:${e.sourceId}`); } return e.templatePlan.kind === `workspace-content` ? createStableHash(`workspace-content:${e.templatePlan.contentHash ?? resolveSourceGraphHash(e.metadata, e.compiledArtifactsSource)}:${e.nodeId}:${e.sourceId}`) : createStableHash(`source-graph:${resolveSourceGraphHash(e.metadata, e.compiledArtifactsSource)}:${e.nodeId}:${e.sourceId}`); } function resolveSourceGraphHash(e, t) { return e?.discovery.sourceGraphHash ?? getRuntimeCompiledArtifactsCacheKey(t); } function resolveVercelProjectScope() { let e = process.env.VERCEL_PROJECT_ID?.trim(); if (!(e === void 0 || e.length === 0)) return `vercel-project:${e}`; } function createStableHash(e) { return createHash(`sha256`).update(e).digest(`hex`); } function sanitizeRuntimeSandboxKey(e) { return e.replaceAll(/[^a-zA-Z0-9._-]+/g, `-`).slice(0, 120); } //#endregion //#region node_modules/eve/dist/src/runtime/sandbox/template-plan.js function createRuntimeSandboxTemplatePlan(e) { if (e.definition.bootstrap !== void 0) { if (e.definition.sourceHash === void 0) throw Error(`Sandbox "${e.definition.logicalPath}" defines bootstrap() but has no compiled sourceHash.`); return { contentHash: e.workspaceResourceRoot.contentHash, kind: `bootstrap`, revalidationKey: e.definition.revalidationKey, sourceHash: e.definition.sourceHash }; } return e.workspaceResourceRoot.rootEntries.length === 0 ? { kind: `none` } : { contentHash: e.workspaceResourceRoot.contentHash, kind: `workspace-content` }; } //#endregion //#region node_modules/eve/dist/src/runtime/workspace/seed-files.js async function materializeWorkspaceDirectory(e) { let t = []; return await addMaterializedDirectoryFiles({ files: t, logicalDirectoryPath: `.`, sourceDirectoryPath: e }), t.sort((e, t) => e.path.localeCompare(t.path)), t; } async function addMaterializedDirectoryFiles(r) { let i = await readdir(r.sourceDirectoryPath, { withFileTypes: !0 }); for (let n of i) { if (!n.isDirectory() && !n.isFile()) continue; let i = join(r.sourceDirectoryPath, n.name), a = posix.join(r.logicalDirectoryPath, n.name); if (n.isDirectory()) { await addMaterializedDirectoryFiles({ files: r.files, logicalDirectoryPath: a, sourceDirectoryPath: i }); continue; } r.files.push({ content: await readFile(i), path: posix.join(WORKSPACE_ROOT$1, a) }); } } //#endregion //#region node_modules/eve/dist/src/execution/sandbox/prewarm.js async function prewarmSandboxes(n) { let r = await collectPrewarmTargets(n); if (r.length === 0) return; let i = createPrewarmSignature(r); if (n.shouldPrewarmSignature?.(i) === !1) return; let a = n.dispatch ?? (async ({ backend: e, input: t }) => await e.prewarm(t)); n.log?.(`eve: initializing ${formatSandboxTemplateCount(r.length)}...`); let o = (await Promise.all(r.map(async ({ backend: r, label: i, input: o }) => { let logBackendProgress = (e) => { shouldLogSandboxPrewarmProgress(e) && n.log?.(`eve: sandbox template "${i}" (${r.name}): ${e}`); }, s; try { s = await withSandboxTemplatePrewarmLock({ appRoot: o.runtimeContext.appRoot, backendName: r.name, templateKey: o.templateKey }, async () => await a({ backend: r, input: { ...o, log: n.log === void 0 ? void 0 : logBackendProgress } })); } catch (e) { let a = formatPrewarmFailureForEnvironment({ backendName: r.name, error: e }); throw n.log?.(`eve: failed to initialize sandbox template "${i}" on backend "${r.name}": ${toErrorMessage(a)}`), a; } return s; }))).filter((e) => e.reused).length; n.log?.(`eve: initialized ${formatSandboxTemplateCount(r.length)} (${o} reused, ${r.length - o} built).`), n.onPrewarmSignature?.(i); } async function prewarmAppSandboxes(e) { let t = e.compiledArtifactsSource ?? createAuthoredSourceRuntimeCompiledArtifactsSource(e.appRoot); if (t.kind !== `disk`) throw Error(`prewarmAppSandboxes requires disk-backed compiled artifacts.`); let n = await (e.loadAgentGraph ?? loadGraphFromArtifacts)({ compiledArtifactsSource: t }); await prewarmSandboxes({ appRoot: getRuntimeCompiledArtifactsSandboxAppRoot(t) ?? e.appRoot, compiledArtifactsSource: t, dispatch: e.dispatch, graph: n, log: e.log, onPrewarmSignature: e.onPrewarmSignature, shouldPrewarmSignature: e.shouldPrewarmSignature }); } async function collectPrewarmTargets(e) { let t = resolveRuntimeCompilerArtifactPaths(e.appRoot).compileDirectoryPath, n = { appRoot: e.appRoot }, r = []; return await Promise.all(collectNodeSandboxes(e.graph).map(async ({ definition: i, nodeId: a, workspaceResourceRoot: o }) => { let s = createRuntimeSandboxTemplatePlan({ definition: i, workspaceResourceRoot: o }), c = await createRuntimeSandboxTemplateKey({ backendName: i.backend.name, compiledArtifactsSource: e.compiledArtifactsSource, nodeId: a, sourceId: i.sourceId, templatePlan: s }); c !== null && r.push({ backend: i.backend, label: formatLabel(a), input: { bootstrap: i.bootstrap, seedFiles: await loadResourceRootSeedFiles({ compileDirectoryPath: t, workspaceResourceRoot: o }), runtimeContext: n, templateKey: c }, signature: `${i.backend.name}:${a}:${c}` }); })), r.sort((e, t) => e.label.localeCompare(t.label)); } async function loadResourceRootSeedFiles(e) { return e.workspaceResourceRoot.rootEntries.length === 0 ? [] : (await materializeWorkspaceDirectory(`${e.compileDirectoryPath}/${e.workspaceResourceRoot.logicalPath}`)).map((e) => ({ content: e.content, path: e.path })); } async function loadGraphFromArtifacts(e) { let [t, n] = await Promise.all([loadCompiledManifest({ compiledArtifactsSource: e.compiledArtifactsSource }), loadCompiledModuleMapFromAuthoredSource({ compiledArtifactsSource: e.compiledArtifactsSource })]); return await resolveRuntimeAgentGraph({ manifest: t, moduleMap: n }); } function collectNodeSandboxes(e) { return [...e.nodesByNodeId.entries()].flatMap(([e, t]) => { let n = t.sandboxRegistry.sandbox; return n === null ? [] : [{ ...n, nodeId: e }]; }); } function formatLabel(e) { return e === ROOT_RUNTIME_AGENT_NODE_ID ? `root` : e; } function createPrewarmSignature(e) { return e.map((e) => e.signature).sort().join(` `); } function formatSandboxTemplateCount(e) { return `${e} sandbox ${e === 1 ? `template` : `templates`}`; } function shouldLogSandboxPrewarmProgress(e) { return !e.startsWith(`checking `) && !e.startsWith(`reusing `) && e !== `loading microsandbox runtime` && e !== `microsandbox runtime ready`; } function formatPrewarmFailureForEnvironment(e) { return !isVercelEnvironment() || !isLocalSandboxBackend(e.backendName) ? e.error : Error(`The ${e.backendName} sandbox backend is not available when deploying on Vercel. Vercel build containers cannot run local Docker containers or microsandbox VMs. Use defaultBackend() so eve selects Vercel Sandbox on Vercel, or configure a Vercel-compatible backend explicitly, such as vercel(). Original ${e.backendName} error: ${toErrorMessage(e.error)}`, { cause: e.error }); } function isVercelEnvironment() { return !!process.env.VERCEL?.trim(); } function isLocalSandboxBackend(e) { return e === `docker` || e === `microsandbox`; } //#endregion //#region node_modules/eve/dist/src/execution/sandbox/development-prewarm.js const pendingDevelopmentPrewarms = /* @__PURE__ */ new Map(); async function waitForDevelopmentSandboxPrewarm(e) { let t = findPendingPrewarm(resolvePrewarmKeys(e)); if (t === void 0) return; let unsubscribe; if (e.log !== void 0) { for (let n of t.logs) e.log(n); let subscriber = (t) => e.log?.(t); t.subscribers.add(subscriber), unsubscribe = () => t.subscribers.delete(subscriber); } try { await withProgressHeartbeat(`waiting for background sandbox template prewarm`, e.log, () => t.promise); } finally { unsubscribe?.(); } } function resolvePrewarmKeys(e) { let t = /* @__PURE__ */ new Set([e.appRoot]), i = getRuntimeCompiledArtifactsAppRoot(e.compiledArtifactsSource); i !== void 0 && t.add(i); let a = getRuntimeCompiledArtifactsSandboxAppRoot(e.compiledArtifactsSource); return a !== void 0 && t.add(a), [...t]; } function findPendingPrewarm(e) { for (let t of e) { let e = pendingDevelopmentPrewarms.get(t); if (e !== void 0) return e; } } async function withProgressHeartbeat(e, t, n) { if (t === void 0) return await n(); let r = Date.now(), i = setInterval(() => { t(`${e} (${Math.round((Date.now() - r) / 1e3)}s elapsed)`); }, 1e4); i.unref?.(); try { return await n(); } finally { clearInterval(i); } } //#endregion //#region node_modules/eve/dist/src/execution/sandbox/ensure.js async function ensureSandboxAccess(n) { let i = n.state?.initialized ?? !1, o = n.state?.session ?? null, s = getRuntimeCompiledArtifactsSandboxAppRoot(n.compiledArtifactsSource) ?? process.cwd(), c = n.registry.sandbox, l; function getHandle() { return l === void 0 && (l = createHandle().catch((e) => { throw l = void 0, e; })), l; } async function createHandle() { if (c === null) return null; let a = c.definition, l = a.backend, u = createRuntimeSandboxTemplatePlan({ definition: a, workspaceResourceRoot: c.workspaceResourceRoot }), d = await createRuntimeSandboxKeys({ backendName: l.name, compiledArtifactsSource: n.compiledArtifactsSource, nodeId: n.nodeId, sessionId: n.sessionId, sourceId: a.sourceId, templatePlan: u }); d.templateKey !== null && (await waitForDevelopmentSandboxPrewarm({ appRoot: s, compiledArtifactsSource: n.compiledArtifactsSource, log: (e) => logDevelopmentSandbox(`eve: sandbox template "${formatNodeLabel(n.nodeId)}" (${l.name}): ${e}`) }), await waitForSandboxTemplatePrewarmLock({ appRoot: s, backendName: l.name, log: (e) => logDevelopmentSandbox(`eve: sandbox template "${formatNodeLabel(n.nodeId)}" (${l.name}): ${e}`), templateKey: d.templateKey })); let f = { existingMetadata: o?.backendName === l.name && o.sessionKey === d.sessionKey ? o.metadata : void 0, runtimeContext: { appRoot: s }, sessionKey: d.sessionKey, tags: n.tags, templateKey: d.templateKey }, p = await withDevelopmentSandboxProgress(`eve: opening sandbox session "${formatNodeLabel(n.nodeId)}" on backend "${l.name}"...`, `eve: opening sandbox session "${formatNodeLabel(n.nodeId)}" on backend "${l.name}"`, async () => await createBackendHandleWithPrewarmRetry({ appRoot: s, backend: l, compiledArtifactsSource: n.compiledArtifactsSource, createInput: f })); return markDevelopmentSandboxBackendInitialized(l.name), i ||= (await runOnSession(async () => { await a.onSession?.({ ctx: buildCallbackContext(), use: p.useSessionFn }); }), !0), p; } async function runOnSession(e) { if (n.runOnSession !== void 0) { await n.runOnSession(e); return; } await e(); } return { async captureState() { if (l !== void 0) { let e = await l; e !== null && (o = await e.captureState()); } return { initialized: i, session: o }; }, async dispose() { l !== void 0 && await (await l)?.dispose(); }, async get() { return (await getHandle())?.session ?? null; } }; } async function createBackendHandleWithPrewarmRetry(e) { try { return await e.backend.create(e.createInput); } catch (t) { if (e.createInput.templateKey === null || e.compiledArtifactsSource.kind !== `disk` || !SandboxTemplateNotProvisionedError.is(t)) throw t; return await prewarmAppSandboxes({ appRoot: e.appRoot, compiledArtifactsSource: e.compiledArtifactsSource, log: (e) => logDevelopmentSandbox(e) }), await waitForSandboxTemplatePrewarmLock({ appRoot: e.appRoot, backendName: e.backend.name, log: (e) => logDevelopmentSandbox(`eve: ${e}`), templateKey: e.createInput.templateKey }), logDevelopmentSandbox(`eve: sandbox template is ready; retrying sandbox creation...`), await e.backend.create(e.createInput); } } function logDevelopmentSandbox(e) { isEveDevEnvironment() && console.log(e); } async function withDevelopmentSandboxProgress(e, t, r) { if (logDevelopmentSandbox(e), !isEveDevEnvironment()) return await r(); let i = Date.now(), a = setInterval(() => { logDevelopmentSandbox(`${t} (${Math.round((Date.now() - i) / 1e3)}s elapsed)...`); }, 5e3); a.unref?.(); try { return await r(); } finally { clearInterval(a); } } function formatNodeLabel(e) { return e === `__root__` ? `root` : e; } //#endregion //#region node_modules/eve/dist/src/context/providers/sandbox.js const sandboxProvider = { key: SandboxKey, async create(e, t) { let r = e.get(BundleKey); if (r === void 0) return; let i = getActiveRuntimeNode(e), a = i.sandboxRegistry, o = e.require(SessionIdKey), s = e.get(ChannelKey), c = s?.state, l = c?.sandboxSessionId ?? o, u = c?.parentSandboxState; return { value: await ensureSandboxAccess({ compiledArtifactsSource: r.compiledArtifactsSource, nodeId: i.nodeId, registry: a, runOnSession: async (t) => await contextStorage.run(e, t), sessionId: l, state: t.sandboxState ?? u ?? null, tags: { agent: resolveTagAgentName({ bundle: r, node: i }), channel: resolveTagChannelKind(s), sessionId: o } }) }; }, async commit(e, t) { let n = await e.captureState(); return { ...t, sandboxState: n }; } }; function resolveTagAgentName(e) { let t = e.node, n = e.bundle; return t.agent?.config?.name ?? n.resolvedAgent?.config?.name ?? t.nodeId ?? `unknown`; } function resolveTagChannelKind(t) { return t === void 0 ? `unknown` : getAdapterKind(t); } //#endregion //#region node_modules/eve/dist/src/context/providers/session.js const sessionProvider = { key: SessionKey, create(e, t) { let n = e.require(AuthKey), r = getHarnessEmissionState(t.state), i = r.turnId.length > 0 ? r.turnId : `turn_${r.sequence}`; return { value: Object.freeze({ auth: { current: n, initiator: e.get(InitiatorAuthKey) ?? n }, parent: e.get(ParentSessionKey), sessionId: e.require(SessionIdKey), turn: { id: i, sequence: r.sequence } }) }; } }; //#endregion //#region node_modules/eve/dist/src/context/run-step.js const frameworkProviders = [ sessionProvider, connectionProvider, sandboxProvider ]; async function withContextScope(t, n, r) { let a = n; t.clearVirtualContext(); for (let e of frameworkProviders) { let n = await e.create(t, a); n !== void 0 && (t.setVirtualContext(e.key, n.value), n.session !== void 0 && (a = n.session)); } let o = await contextStorage.run(t, () => r(a)), s = o.session; for (let e of frameworkProviders) e.commit && t.has(e.key) && (s = await e.commit(t.require(e.key), s)); return s === o.session ? o : { result: o.result, session: s }; } async function runStep(e, t, n) { let { result: r, session: i } = await withContextScope(e, t, async (e) => { let t = await n(e); return { result: t.next, session: t.session }; }); return { next: r, session: i }; } //#endregion //#region node_modules/eve/dist/src/channel/resolve-text.js function resolveTextToResponse(e, t) { let n = e.trim(); if (n.length === 0) return; let r = n.toLowerCase(); if (t.options !== void 0 && t.options.length > 0) { let e = matchOption(r, t.options); if (e !== void 0) return { requestId: t.requestId, optionId: e.id }; } if ((t.allowFreeform === !0 || t.options === void 0 || t.options.length === 0) && n.length > 0) return { requestId: t.requestId, text: n }; } function resolveTextToResponses(e, t) { let n = []; for (let r of t) { let t = resolveTextToResponse(e, r); t !== void 0 && n.push(t); } return n; } function matchOption(e, t) { let n = t.find((t) => t.id.toLowerCase() === e); if (n !== void 0) return n; let r = t.find((t) => t.label.toLowerCase() === e); if (r !== void 0) return r; let i = Number(e); if (Number.isInteger(i) && i > 0 && i <= t.length) return t[i - 1]; } //#endregion //#region node_modules/eve/dist/src/harness/input-requests.js const PENDING_INPUT_BATCH_KEY = `eve.runtime.pendingInputBatch`; const APPROVED_TOOLS_KEY = `eve.runtime.hitl.approvedTools`; const DEFERRED_STEP_INPUT_KEY = `eve.runtime.deferredStepInput`; const TOOL_EXECUTION_DENIED_MESSAGE = `Tool execution was denied.`; function hasStepInput(e) { return e === void 0 ? !1 : e.message !== void 0 || (e.inputResponses?.length ?? 0) > 0; } function consumeDeferredStepInput(e) { let t = getDeferredStepInput(e.session); if (t === void 0) return e; let r = clearDeferredStepInput(e.session); return e.input === void 0 ? { input: t, session: r } : { input: coalesceTurnInputs(t, e.input), session: r }; } function hasDeferredStepInput(e) { return getDeferredStepInput(e) !== void 0; } function resolvePendingInput(e) { let { stepInput: t } = e, n = e.session, r = [...e.history ?? n.history], i = getPendingInputBatch(n.state); if (i === void 0) return { outcome: `continue`, messages: r, session: n }; let a = resolveTextMessageInput(i, t), o = a?.inputResponses ?? []; if (o.length === 0 && a?.message === void 0) return { outcome: `unresolved`, messages: r, session: n }; if (i.requests.some((e) => isApprovalRequest(e)) && hasUnansweredApproval({ pendingBatch: i, responses: o })) return n = queueDeferredStepInput(n, compactStepInput(a)), { deferredMessage: !0, outcome: `unresolved`, messages: r, session: n }; if (o.length === 0 && a?.message !== void 0) { let e = buildToolResponseParts(i, []), t = [...r, ...i.responseMessages]; e.length > 0 && t.push({ content: e, role: `tool` }); let o = buildRejectedActionBatch(i, []); return n = clearPendingInputBatch(n), { consumedMessage: a?.messageConsumed, outcome: `resolved`, messages: t, rejectedActions: o, session: n }; } n = recordApprovedTools({ pendingBatch: i, resolveApprovalKey: e.resolveApprovalKey, responses: o, session: n }); let s = buildToolResponseParts(i, o), c = [...r, ...i.responseMessages]; s.length > 0 && c.push({ content: s, role: `tool` }); let l = buildRejectedActionBatch(i, o); return n = clearPendingInputBatch(n), a?.message !== void 0 && i.requests.some((e) => isApprovalRequest(e)) ? (n = queueDeferredStepInput(n, { message: a.message }), { consumedMessage: a?.messageConsumed, deferredMessage: !0, outcome: `resolved`, messages: c, rejectedActions: l, session: n }) : { consumedMessage: a?.messageConsumed, outcome: `resolved`, messages: c, rejectedActions: l, session: n }; } function resolveTextMessageInput(t, n) { if (typeof n?.message != `string` || (n.inputResponses?.length ?? 0) > 0) return n; let r = resolveTextToResponses(n.message, t.requests); return r.length === 0 ? n : compactStepInput({ ...n, inputResponses: r, messageConsumed: !0, message: void 0 }); } function compactStepInput(e) { if (e === void 0) return {}; let t = {}; return (e.context?.length ?? 0) > 0 && (t.context = e.context), (e.inputResponses?.length ?? 0) > 0 && (t.inputResponses = e.inputResponses), e.message !== void 0 && (t.message = e.message), e.messageConsumed === !0 && (t.messageConsumed = !0), e.outputSchema !== void 0 && (t.outputSchema = e.outputSchema), t; } function hasUnansweredApproval(e) { let t = new Set(e.responses.map((e) => e.requestId)); return e.pendingBatch.requests.some((e) => isApprovalRequest(e) && !t.has(e.requestId)); } function hasPendingInputBatch(e) { return getPendingInputBatch(e) !== void 0; } function getPendingInputBatch(e) { let t = e?.[PENDING_INPUT_BATCH_KEY]; if (typeof t != `object` || !t) return; let n = t; if (!(!Array.isArray(n.requests) || !Array.isArray(n.responseMessages))) return n; } function setPendingInputBatch(e) { let t = { ...e.session.state }; return t[PENDING_INPUT_BATCH_KEY] = { event: e.event, requests: [...e.requests], responseMessages: [...e.responseMessages] }, { ...e.session, state: t }; } function clearPendingInputBatch(e) { if (e.state?.[PENDING_INPUT_BATCH_KEY] === void 0) return e; let t = { ...e.state }; return delete t[PENDING_INPUT_BATCH_KEY], { ...e, state: Object.keys(t).length > 0 ? t : void 0 }; } function getDeferredStepInput(e) { return e.state?.[DEFERRED_STEP_INPUT_KEY]; } function queueDeferredStepInput(e, t) { let r = getDeferredStepInput(e), i = r === void 0 ? t : coalesceTurnInputs(r, t), o = { ...e.state }; return o[DEFERRED_STEP_INPUT_KEY] = i, { ...e, state: o }; } function clearDeferredStepInput(e) { if (e.state?.[DEFERRED_STEP_INPUT_KEY] === void 0) return e; let t = { ...e.state }; return delete t[DEFERRED_STEP_INPUT_KEY], { ...e, state: Object.keys(t).length > 0 ? t : void 0 }; } function getApprovedTools(e) { let t = e.state?.[APPROVED_TOOLS_KEY]; return Array.isArray(t) ? new Set(t) : /* @__PURE__ */ new Set(); } function recordApprovedTools(e) { let t = new Set(e.responses.filter((e) => e.optionId === `approve`).map((e) => e.requestId)), n = e.pendingBatch.requests.filter((e) => t.has(e.requestId)).map((t) => e.resolveApprovalKey?.(t) ?? t.action.toolName); if (n.length === 0) return e.session; let r = getApprovedTools(e.session), a = [.../* @__PURE__ */ new Set([...r, ...n])], o = { ...e.session.state }; return o[APPROVED_TOOLS_KEY] = a, { ...e.session, state: o }; } function resolveApprovalOutcome(e) { return e === void 0 ? { approved: !1, reason: `Ignored because the user continued without responding.`, status: `ignored` } : e.optionId === `approve` ? { approved: !0, reason: void 0, status: `approved` } : e.optionId === `deny` ? { approved: !1, reason: TOOL_EXECUTION_DENIED_MESSAGE, status: `denied` } : { approved: !1, reason: `Invalid approval response.`, status: `invalid` }; } function buildRejectedActionBatch(e, t) { if (e.event === void 0) return; let n = new Map(t.map((e) => [e.requestId, e])), r = []; for (let t of e.requests) { if (!isApprovalRequest(t)) continue; let { approved: e, reason: i, status: a } = resolveApprovalOutcome(n.get(t.requestId)); e || r.push({ callId: t.action.callId, isError: !0, kind: `tool-result`, output: { approval: { requestId: t.requestId, status: a }, code: `TOOL_EXECUTION_DENIED`, message: i ?? TOOL_EXECUTION_DENIED_MESSAGE, tool: { result: `not_run` } }, toolName: t.action.toolName }); } return r.length > 0 ? { event: e.event, results: r } : void 0; } function buildToolResponseParts(e, t) { let n = new Map(t.map((e) => [e.requestId, e])), r = []; for (let t of e.requests) r.push(...buildToolResponsePartsForRequest(t, n.get(t.requestId))); return r; } function buildToolResponsePartsForRequest(e, t) { if (isApprovalRequest(e)) { let { approved: n, reason: r } = resolveApprovalOutcome(t), i = [{ approvalId: e.requestId, approved: n, reason: r, type: `tool-approval-response` }]; return n || i.push({ output: { type: `execution-denied`, reason: r }, toolCallId: e.action.callId, toolName: e.action.toolName, type: `tool-result` }), i; } return [{ output: { type: `json`, value: t === void 0 ? { status: `ignored` } : { optionId: t.optionId, text: t.text, status: `answered` } }, toolCallId: e.action.callId, toolName: e.action.toolName, type: `tool-result` }]; } function isApprovalRequest(e) { return e.options?.length === 2 && e.options[0]?.id === `approve` && e.options[1]?.id === `deny`; } function createRuntimeToolCallActionFromToolCall(e) { return { callId: e.toolCall.toolCallId, input: resolveToolCallInputObject(e.toolCall.input), kind: `tool-call`, toolName: e.toolCall.toolName }; } function resolveToolCallInputObject(e) { return e == null ? {} : parseJsonObject(e); } //#endregion //#region node_modules/eve/dist/src/harness/model-call-error.js const GATEWAY_AUTH_FAILURE_SUMMARY_NAME = `AI Gateway authentication failed`; const UNSUPPORTED_TOOL_TYPE_REGEX = /tool type ['"]([\w.-]+)['"] is not supported/i; function summarizeKnownModelCallConfigError(e) { let t = readErrorName(e), r = readErrorMessage(e); return t === `GatewayAuthenticationError` || /AI Gateway authentication/i.test(r) ? /Invalid API key/i.test(r) ? { name: GATEWAY_AUTH_FAILURE_SUMMARY_NAME, message: "AI Gateway rejected the provided API key. Update or unset `AI_GATEWAY_API_KEY` (check your shell profile if you did not set it for this project) — manage keys at https://vercel.com/dashboard/ai/api-keys. Unsetting it falls back to OIDC via `eve link`." } : /Invalid OIDC token/i.test(r) ? { name: GATEWAY_AUTH_FAILURE_SUMMARY_NAME, message: "AI Gateway rejected the OIDC token. Run `eve link` to refresh `VERCEL_OIDC_TOKEN` in `.env.local`, or set `AI_GATEWAY_API_KEY` — create a key at https://vercel.com/dashboard/ai/api-keys." } : { name: GATEWAY_AUTH_FAILURE_SUMMARY_NAME, message: "AI Gateway received no credentials. Run `eve link` to populate `VERCEL_OIDC_TOKEN`, or set `AI_GATEWAY_API_KEY` — create a key at https://vercel.com/dashboard/ai/api-keys." } : t === `LoadAPIKeyError` || /API key is missing/i.test(r) ? { name: `Model provider API key missing`, message: "The model provider could not load an API key. Export the provider's API key environment variable (for example `AI_GATEWAY_API_KEY` or `OPENAI_API_KEY`) and try again." } : null; } function summarizeKnownModelCallRequestError(e) { if (e instanceof EmptyModelResponseError) return { name: `Empty model response`, message: e.message }; let t = readModelCallErrorSignals(e); return t.statusCode === 400 && isGatewayErrorSignal(t) ? { name: `AI Gateway model request rejected`, message: `AI Gateway rejected the model request before the agent produced a response.` } : null; } function extractUnsupportedProviderToolTypes(e) { let t = /* @__PURE__ */ new Set(); for (let n of walkCauseChain(e)) { collectUnsupportedToolTypesFromValue(readObjectField(n, `data`), t); let e = readStringField(n, `responseBody`); if (e !== void 0) try { collectUnsupportedToolTypesFromValue(JSON.parse(e), t); } catch { let n = UNSUPPORTED_TOOL_TYPE_REGEX.exec(e); n?.[1] !== void 0 && t.add(n[1]); } } return [...t]; } function collectUnsupportedToolTypesFromValue(t, n) { if (t != null) { if (typeof t == `string`) { let e = UNSUPPORTED_TOOL_TYPE_REGEX.exec(t); e?.[1] !== void 0 && n.add(e[1]); return; } if (Array.isArray(t)) { for (let e of t) collectUnsupportedToolTypesFromValue(e, n); return; } if (isObject(t)) for (let e of Object.values(t)) collectUnsupportedToolTypesFromValue(e, n); } } function extractModelCallErrorDetails(e) { let t = readModelCallErrorSignals(e), n = {}; return appendJsonField(n, `gatewayName`, t.gatewayName), appendJsonField(n, `gatewayType`, t.gatewayType), appendJsonField(n, `statusCode`, t.statusCode), appendJsonField(n, `generationId`, t.generationId), appendJsonField(n, `upstreamStatusCode`, t.upstreamStatusCode), appendJsonField(n, `upstreamType`, t.upstreamType), appendJsonField(n, `upstreamMessage`, t.upstreamMessage), appendJsonField(n, `responseBodySnippet`, t.responseBodySnippet), n; } function readErrorName(t) { if (t instanceof Error || isObject(t) && typeof t.name == `string`) return t.name; } function readErrorMessage(t) { return t instanceof Error || isObject(t) && typeof t.message == `string` ? t.message : ``; } var EmptyModelResponseError = class extends Error { constructor(e) { super(`The model did not return a response. Please try again.`, e), this.name = `EmptyModelResponseError`; } }; function isNoOutputGeneratedError(e) { for (let t of walkCauseChain(e)) if (readErrorName(t) === `AI_NoOutputGeneratedError`) return !0; return !1; } function classifyModelCallError(e) { if (e instanceof EmptyModelResponseError) return `recoverable`; if (hasRetryableFlag(e)) return `retry`; if (summarizeKnownModelCallConfigError(e) !== null) return `terminal`; let t = readModelCallErrorSignals(e); if (isRetryableGatewayType(t.gatewayType) || isRetryableGatewayType(t.upstreamType)) return `retry`; if (isTerminalGatewayType(t.gatewayType) || isTerminalGatewayType(t.upstreamType) || t.gatewayName === `GatewayInvalidRequestError`) return `terminal`; let n = t.statusCode; if (n !== void 0) { if (n === 408 || n === 409 || n === 429 || n >= 500) return `retry`; if (isAmbiguousGatewayInternalBadRequest(t)) return `recoverable`; if (n >= 400 && n < 500) return `terminal`; } return isLikelyNetworkError(e) ? `retry` : `recoverable`; } function hasRetryableFlag(t) { for (let n of walkCauseChain(t)) if (isObject(n) && n.isRetryable === !0) return !0; return !1; } function isLikelyNetworkError(e) { if (!(e instanceof Error)) return !1; let t = e.message.toLowerCase(); return t.includes(`econnreset`) || t.includes(`etimedout`) || t.includes(`eai_again`) || t.includes(`socket hang up`) || t.includes(`network`) || t.includes(`fetch failed`) ? !0 : e.cause !== void 0 && e.cause !== e ? isLikelyNetworkError(e.cause) : !1; } function readModelCallErrorSignals(e) { let t = findGatewayError(e), n = findUpstreamApiCallError(e), r = readStringField(n, `responseBody`), i = readGatewayErrorBody(n); return { gatewayName: readErrorName(t), gatewayType: readStringField(t, `type`), generationId: readStringField(t, `generationId`) ?? i?.generationId, responseBodySnippet: r === void 0 ? void 0 : truncateSnippet(r, 1e3), statusCode: readStatusCode(t) ?? readStatusCode(n) ?? findStatusCode(e), upstreamMessage: i?.message, upstreamStatusCode: readStatusCode(n), upstreamType: i?.type }; } function findGatewayError(e) { for (let t of walkCauseChain(e)) { let e = readErrorName(t), n = readStringField(t, `type`); if (e?.startsWith(`Gateway`) || n?.endsWith(`_error`) || n === `rate_limit_exceeded`) return t; } } function findUpstreamApiCallError(e) { for (let t of walkCauseChain(e)) if (readErrorName(t) === `AI_APICallError` || readStringField(t, `responseBody`) !== void 0 || readObjectField(t, `data`) !== void 0 || readObjectField(t, `requestBodyValues`) !== void 0) return t; } function readGatewayErrorBody(e) { let t = readGatewayErrorBodyFromValue(readObjectField(e, `data`)); if (t !== void 0) return t; let n = readStringField(e, `responseBody`); if (n !== void 0) try { return readGatewayErrorBodyFromValue(JSON.parse(n)); } catch { return; } } function readGatewayErrorBodyFromValue(t) { if (!isObject(t)) return; let n = readObjectField(t, `error`); if (n === void 0) return; let r = readStringField(t, `generationId`), i = readStringField(n, `message`), a = readStringField(n, `type`); return i === void 0 && a === void 0 && r === void 0 ? void 0 : { generationId: r, message: i, type: a }; } function readStatusCode(t) { if (isObject(t)) return typeof t.statusCode == `number` ? t.statusCode : void 0; } function findStatusCode(e) { for (let t of walkCauseChain(e)) { let e = readStatusCode(t); if (e !== void 0) return e; } } function readStringField(t, n) { if (!isObject(t)) return; let r = t[n]; return typeof r == `string` && r.length > 0 ? r : void 0; } function readObjectField(t, n) { if (!isObject(t)) return; let r = t[n]; return isObject(r) ? r : void 0; } function isRetryableGatewayType(e) { return e === `rate_limit_exceeded` || e === `timeout_error`; } function isTerminalGatewayType(e) { return e === `authentication_error` || e === `invalid_request_error` || e === `model_not_found`; } function isGatewayErrorSignal(e) { return e.gatewayName !== void 0 || e.gatewayType !== void 0; } function isAmbiguousGatewayInternalBadRequest(e) { return e.statusCode === 400 && (e.gatewayName === `GatewayInternalServerError` || e.gatewayType === `internal_server_error`) && (e.upstreamType === void 0 || e.upstreamType === `internal_server_error`); } function* walkCauseChain(t) { let n = /* @__PURE__ */ new Set(), r = t; for (; isObject(r) && !n.has(r);) n.add(r), yield r, r = r.cause; } function appendJsonField(e, t, n) { if (typeof n == `string` && n.length > 0) { e[t] = n; return; } typeof n == `number` && Number.isFinite(n) && (e[t] = n); } function truncateSnippet(e, t) { return e.length <= t ? e : `${e.slice(0, t)}...`; } //#endregion //#region node_modules/eve/dist/src/harness/input-extraction.js function extractQuestionInputRequests(n) { let r = []; for (let i of n.toolCalls) { if (i.toolName !== ASK_QUESTION_TOOL_NAME || n.excludedCallIds.has(i.toolCallId)) continue; let a = createRuntimeToolCallActionFromToolCall({ toolCall: i }), o = a.input, s = { action: a, display: `text`, prompt: String(o.prompt), requestId: a.callId }; o.allowFreeform !== void 0 && (s.allowFreeform = o.allowFreeform), o.options !== void 0 && (s.options = o.options, s.display = `select`), r.push(s); } return r; } function extractToolApprovalInputRequests(t) { let n = [], r = /* @__PURE__ */ new Map(); for (let e of t.content) e.type === `tool-call` && r.set(e.toolCallId, e); for (let i of t.content) { if (i.type !== `tool-approval-request`) continue; let t = i; if (t.isAutomatic === !0) continue; let a = t.toolCall ?? (t.toolCallId === void 0 ? void 0 : r.get(t.toolCallId)); if (a === void 0) continue; let o = createRuntimeToolCallActionFromToolCall({ toolCall: a }); n.push({ action: o, allowFreeform: !1, display: `confirmation`, options: [{ id: `approve`, label: `Yes` }, { id: `deny`, label: `No` }], prompt: `Approve tool call: ${a.toolName}`, requestId: t.approvalId }); } return n; } //#endregion //#region node_modules/eve/dist/src/harness/prompt-cache.js const ANTHROPIC_CACHE_MARKER = Object.freeze({ anthropic: Object.freeze({ cacheControl: Object.freeze({ type: `ephemeral` }) }) }); function detectPromptCachePath(e) { return typeof e == `string` ? { kind: `gateway-auto` } : (typeof e.provider == `string` ? e.provider.toLowerCase() : ``).includes(`anthropic`) ? { kind: `anthropic-direct` } : { kind: `none` }; } function getAnthropicCacheMarker() { return ANTHROPIC_CACHE_MARKER; } function mergeGatewayAutoCaching(e) { let t = e?.gateway !== void 0 && typeof e.gateway == `object` && e.gateway !== null ? e.gateway : void 0, n = { ...t, caching: t?.caching ?? `auto` }; return { ...e, gateway: n }; } function applyLastToolCacheBreakpoint(e, t) { let n = Object.entries(e); if (n.length === 0) return e; let r = {}; for (let e = 0; e < n.length; e++) { let [i, a] = n[e]; if (e === n.length - 1) { let e = a.providerOptions !== void 0 && typeof a.providerOptions == `object` ? a.providerOptions : void 0; r[i] = { ...a, providerOptions: { ...e, ...t } }; } else r[i] = a; } return r; } function applySystemCacheBreakpoint(e, t) { if (e.length === 0) return [...e]; let n = [...e], r = n[n.length - 1]; return n[n.length - 1] = { ...r, providerOptions: { ...r.providerOptions, ...t } }, n; } function applyConversationCacheControl(e, t) { if (e.length === 0) return [...e]; let n = [...e], r = !1, i = !1; for (let e = n.length - 1; e >= 0 && (!r || !i); e--) { let a = n[e]; a !== void 0 && (!r && a.role === `assistant` ? (n[e] = { ...a, providerOptions: { ...a.providerOptions, ...t } }, r = !0) : !i && a.role === `user` && (n[e] = { ...a, providerOptions: { ...a.providerOptions, ...t } }, i = !0)); } return n; } //#endregion //#region node_modules/eve/dist/src/context/build-dynamic-tools.js const log$5 = createLogger(`dynamic-tools`); function lookupStepFunction(e) { try { let t = globalThis[Symbol.for(`@workflow/core//registeredSteps`)]; return t === void 0 ? null : t.get(e) || null; } catch { return null; } } function replayTools(e) { let t = []; for (let n of e) { if (!n.executeStepFnName || !n.closureVars) { log$5.warn(`Dynamic tool "${n.name}" has no registered step function — skipping on this step. The bundler transform may not have processed this tool file.`); continue; } let e = lookupStepFunction(n.executeStepFnName); if (!e) { log$5.warn(`Dynamic tool "${n.name}" references step function "${n.executeStepFnName}" which is not registered — skipping on this step.`); continue; } t.push({ description: n.description, execute: (t) => e(n.closureVars, t, buildCallbackContext()), inputSchema: jsonSchema(n.inputSchema), name: n.name, approval: buildReplayedApproval(n), outputSchema: n.outputSchema === void 0 ? void 0 : jsonSchema(n.outputSchema) }); } return t; } function buildReplayedApproval(e) { if (e.approvalStepFnName === void 0) return; let t = lookupStepFunction(e.approvalStepFnName); return t === null ? (log$5.warn(`Dynamic tool "${e.name}" references approval function "${e.approvalStepFnName}" which is not registered — requiring approval by default.`), () => `user-approval`) : async (n) => await t(e.closureVars ?? {}, n); } function buildDynamicTools(e) { let r = e.get(LiveStepToolsKey) ?? [], i = replayTools(e.get(TurnDynamicToolMetadataKey) ?? []), a = replayTools(e.get(SessionDynamicToolMetadataKey) ?? []); return [ ...r, ...i, ...a ]; } //#endregion //#region node_modules/eve/dist/src/internal/attachments/errors.js var EveAttachmentError = class extends Error { kind; adapterKind; cause; constructor(e) { super(e.message), this.name = `EveAttachmentError`, this.kind = e.kind, e.adapterKind !== void 0 && (this.adapterKind = e.adapterKind), e.cause !== void 0 && (this.cause = e.cause); } }; //#endregion //#region node_modules/eve/dist/src/harness/attachment-staging.js const ATTACHMENTS_ROOT = `/workspace/attachments`; const UNSAFE_FILENAME_CHARS = /[^\w.-]+/g; async function stageAttachmentsForAdapter(e, t, n) { if (typeof e == `string`) return e; let r = reconstitueFilePartUrls(e); return Promise.all(r.map(async (e) => e.type === `file` ? stageFilePart(e, t, n) : e)); } async function stageAttachmentsToSandbox(t) { if (typeof t == `string` || !Array.isArray(t) || !hasFileParts(t)) return t; let n = loadContext(), r = n.get(SandboxKey); if (r === void 0) return t; let a = await r.get(); if (a === null) return t; let o = n.get(ChannelKey); return stageAttachmentsForAdapter(t, a, o ? buildAdapterContext(o, n) : { ctx: n, state: {}, session: buildSessionHandle(n) }); } async function hydrateSandboxAttachments(e) { if (!messagesContainSandboxRef(e)) return e; let t = loadContext().get(SandboxKey); if (t === void 0) throw Error(`Cannot hydrate sandbox-ref FilePart: no SandboxKey is bound on the active eve context. Hydration must run inside a step scope with the framework sandbox provider installed.`); let n = await t.get(); if (n === null) throw Error(`Cannot hydrate sandbox-ref FilePart: SandboxKey is bound but no active sandbox session is available.`); return Promise.all(e.map(async (e) => { if (!messageContainsSandboxRef(e)) return e; let t = await hydrateMessageContent(e.content, n); return { ...e, content: t }; })); } function hasFileParts(e) { for (let t of e) if (t.type === `file`) return !0; return !1; } function messagesContainSandboxRef(e) { for (let t of e) if (messageContainsSandboxRef(t)) return !0; return !1; } function messageContainsSandboxRef(e) { let t = e.content; if (!Array.isArray(t)) return !1; for (let e of t) if (isSandboxRefFilePart(e)) return !0; return !1; } function isSandboxRefFilePart(e) { return typeof e == `object` && !!e && e.type === `file` && isSandboxRefUrl(e.data); } async function hydrateMessageContent(e, t) { return Array.isArray(e) ? Promise.all(e.map(async (e) => { if (!isSandboxRefFilePart(e)) return e; let n = e, r = decodeSandboxRef(n.data); if (!shouldInlineSandboxRefAsBytes(r)) return renderSandboxRefAsTextPart(r); let i = await t.readBinaryFile({ path: r.path }); if (i === null) throw Error(`Sandbox-ref FilePart references missing file: "${r.path}". The staging pipeline invariant (every eve-sandbox: ref has bytes on disk) was violated.`); return { ...n, data: i, mediaType: r.mediaType }; })) : e; } function shouldInlineSandboxRefAsBytes(e) { return e.mediaType.startsWith(`image/`) ? e.size <= 3145728 : e.mediaType === `application/pdf` ? e.size <= 20971520 : !1; } function renderSandboxRefAsTextPart(e) { return { text: `Attached file ${e.path} (${e.mediaType})`, type: `text` }; } async function stageFilePart(e, t, n) { if (isSandboxRefUrl(e.data)) return e; if (e.data instanceof URL && e.data.protocol !== `data:`) { let r = await tryFetchFile(e.data.href, n); return r === null ? e : stageResolvedBytes(e, r, t); } let r = await fileDataToBytes(e.data); return r === null ? e : stageResolvedBytes(e, { bytes: r }, t); } async function stageResolvedBytes(e, t, n) { let r = t.bytes, i = sha256Prefix(r), a = t.mediaType ?? e.mediaType ?? `application/octet-stream`, o = `${ATTACHMENTS_ROOT}/${i}/${safeFilename(t.filename ?? e.filename, i)}`; await n.writeBinaryFile({ content: r, path: o }); let s = n.resolvePath(o); return { ...e, data: encodeSandboxRef({ mediaType: a, path: s, size: r.byteLength }), filename: s, mediaType: a }; } async function tryFetchFile(e, n) { let r = n.ctx.get(ChannelKey); if (r?.fetchFile === void 0) return null; let i = getAdapterKind(r); try { let t = await r.fetchFile(e); return t === null ? null : Buffer.isBuffer(t) ? { bytes: t } : t; } catch (e) { throw e instanceof EveAttachmentError ? e : new EveAttachmentError({ adapterKind: i, cause: e, kind: `resolver-threw`, message: `fetchFile for adapter kind="${i}" threw: ${toErrorMessage(e)}` }); } } function reconstitueFilePartUrls(e) { let t = !1, i = e.map((e) => e.type === `file` && isSerializedUrlFilePart(e.data) ? (t = !0, { ...e, data: deserializeUrlFilePart(e.data) }) : e); return t ? i : e; } function sha256Prefix(e) { return createHash(`sha256`).update(e).digest(`hex`).slice(0, 16); } function safeFilename(e, t) { if (e === void 0) return `file-${t}`; let n = basename(e).replace(UNSAFE_FILENAME_CHARS, `_`); return n.length > 0 ? n : `file-${t}`; } //#endregion //#region node_modules/eve/dist/src/harness/workflow-tool-description.js function workflowToolDescription(e) { let t = e.length > 0 ? e : [`agent`], n = t.map((e) => `\`${e}\``).join(`, `), r = t.filter((e) => e !== `agent`); return `Use \`Workflow\` when a task needs JavaScript to coordinate multiple child-agent calls as one durable step. It is an orchestration tool, not a general-purpose tool runner. Use \`Workflow\` for: - fan-out or map-reduce over a list, especially when the number of calls comes from runtime data; - dependent pipelines where one agent's result becomes another agent's input; - conditional branches or follow-up calls chosen from earlier results; - deterministic filtering, sorting, or aggregation of several agent results before returning one value. Do not use \`Workflow\` when: - one delegation, or a small fixed set of unrelated delegations, can be called directly; - no child-agent call is needed; - the task needs files, network, shell, connections, skills, or ordinary tools — none are available inside Workflow; - JavaScript would only wrap work the parent agent can express more clearly with direct calls. Workflow earns its overhead when code materially controls call count, concurrency, ordering, data flow, or aggregation. Put the complete orchestration in one JavaScript program and return the final JSON-serializable value. The only callable operations are these agents — no filesystem, network, shell, or other tools: ${n}. Call them only through the \`tools\` object, using the exact member syntax in the API reference below. Each call is async and resolves to the child's result, or a typed object when you pass an \`outputSchema\`. Sequence with \`await\`, run agents concurrently with \`Promise.all([...])\`, and use \`map\`/\`filter\`/\`flatMap\` to build calls and combine results. The program's return value becomes the tool result. Example — fan out across areas with \`agent\`, then pipe the results into a synthesis step: \`\`\`js const areas = ["correctness", "security", "performance"]; const reviews = await Promise.all( areas.map((area) => tools.agent({ message: \`Review the change for \${area}.\`, outputSchema: { type: "object", properties: { findings: { type: "array", items: { type: "string" } } } }, }), ), ); const verdict = await tools.agent({ message: \`Summarize these findings into a verdict: \${JSON.stringify(reviews)}\`, outputSchema: { type: "object", properties: { verdict: { type: "string" }, blocking: { type: "boolean" } } }, }); return verdict; \`\`\`${r.length > 0 ? `\n\nDeclared subagents use the same API — e.g. \`const note = await ${agentAccess(r[0])}({ message: "..." });\`.` : ``}`; } function agentAccess(e) { return /^[A-Za-z_$][A-Za-z0-9_$]*$/u.test(e) ? `tools.${e}` : `tools[${JSON.stringify(e)}]`; } //#endregion //#region node_modules/eve/dist/src/harness/workflow-sandbox.js async function applyWorkflowTool(t) { let i = createWorkflowHostTools(t.harnessTools, Object.keys(t.tools)); if (Object.keys(i).length === 0) return { hostTools: i, modelTools: t.tools }; let a = await createWorkflowSandboxTool({ continuationSecurity: t.continuationSecurity, hostTools: i, lifecycle: t.lifecycle }), s = typeof a.description == `string` ? a.description : ``, c = workflowToolDescription(Object.keys(i)), l = workflowApiReference(s), u = { ...t.tools }; return u[WORKFLOW_TOOL_NAME] = { ...a, description: l.length > 0 ? `${c}\n\n${l}` : c, inputSchema: jsonSchema({ type: `object`, properties: { js: { type: `string`, description: `Complete JavaScript orchestration program. Call only the agents listed in the Workflow description and return one JSON-serializable result.` } }, required: [`js`], additionalProperties: !1 }) }, { hostTools: i, modelTools: u }; } function workflowApiReference(e) { let t = e.indexOf(`Tools: `); return t < 0 ? e : `Available agent API:\n${e.slice(t + 7)}`; } function buildWorkflowHostTools(e) { return createWorkflowHostTools(e.tools, e.tools.keys()); } function createWorkflowHostTools(e, t) { let n = {}; for (let r of t) { let t = e.get(r); t?.runtimeAction !== void 0 && (n[r] = createWorkflowRuntimeActionHostTool(t)); } return n; } function createWorkflowRuntimeActionHostTool(e) { return { description: e.description, inputSchema: e.inputSchema, execute: async (n, r) => { let o = readWorkflowSandboxResolution(r); return o === void 0 ? requestWorkflowSandboxInterrupt({ kind: WORKFLOW_RUNTIME_ACTION_INTERRUPT_KIND, runtimeAction: e.runtimeAction, toolInput: n, toolName: e.name }) : o; } }; } //#endregion //#region node_modules/eve/dist/src/harness/workflow-continuation-security.js const WORKFLOW_CONTINUATION_SECURITY_KEY = `eve.harness.workflowContinuationSecurity`; function ensureWorkflowContinuationSecurity(t) { return t.state?.[WORKFLOW_CONTINUATION_SECURITY_KEY] === void 0 ? { ...t, state: { ...t.state, [WORKFLOW_CONTINUATION_SECURITY_KEY]: { signingKey: randomBytes(32).toString(`base64url`), version: 1 } } } : (getWorkflowContinuationSecurity(t), t); } function getWorkflowContinuationSecurity(e) { let t = e.state?.[WORKFLOW_CONTINUATION_SECURITY_KEY]; if (typeof t != `object` || !t || t.version !== 1 || typeof t.signingKey != `string` || !/^[A-Za-z0-9_-]{43}$/.test(t.signingKey)) throw Error(`Workflow continuation security state is missing or invalid.`); return { signingKey: t.signingKey, maxAgeMs: 31536e6 }; } //#endregion //#region node_modules/eve/dist/src/harness/workflow-lifecycle.js const log$4 = createLogger(`harness.workflow-lifecycle`); function createWorkflowLifecycle(e) { return { onHookError(e, t) { log$4.warn(`workflow lifecycle hook failed`, { error: e, hook: t.hook }); }, async onNestedToolCall(t) { if (e.skipReplayed === !0 && t.replayed) return; let n = { input: t.input, toolCallId: t.toolCallId, toolName: t.toolName, type: `tool-call` }; await e.emit(createActionsRequestedEvent({ actions: [createRuntimeActionRequestFromToolCall({ toolCall: n, tools: e.tools })], sequence: e.emissionState.sequence, stepIndex: e.emissionState.stepIndex, turnId: e.emissionState.turnId })); }, async onNestedToolResult(r) { if (e.skipReplayed === !0 && r.replayed || r.status === `interrupted`) return; let i = createRuntimeToolResultFromValue({ callId: r.toolCallId, output: r.status === `rejected` ? toErrorMessage(r.error) : r.output, toolName: r.toolName, isError: r.status === `rejected` }); await e.emit(createActionResultEvent({ result: i, sequence: e.emissionState.sequence, stepIndex: e.emissionState.stepIndex, turnId: e.emissionState.turnId })); } }; } //#endregion //#region node_modules/eve/dist/src/harness/compaction.js const COMPACTION_SYSTEM_PROMPT = [ `You are a conversation summarizer.`, `Write a concise but useful summary for continuing the work.`, `Preserve the goal, important instructions, technical decisions, discoveries, open work, and relevant tool results.`, `Use the same language as the conversation.`, `Prefer short labeled sections such as Goal, Instructions, Discoveries, Accomplished, and Next steps when helpful.`, `Do not answer questions or invent facts.` ].join(` `); function estimateTokens(e) { return JSON.stringify(e).length / 4; } function getInputTokenCount(e, t) { let n = t.lastKnownInputTokens, r = t.lastKnownPromptMessageCount; return n === void 0 || r === void 0 || !Number.isInteger(r) || r < 0 || r > e.length ? estimateTokens(e) : n + estimateTokens(e.slice(r)); } function shouldCompact(e, t) { return getInputTokenCount(e, t) > t.threshold; } async function resolveCompactionModel(e) { let t = e.compactionModelReference ?? e.modelReference; return { model: t === e.modelReference ? e.model : await e.resolveModel(t), providerOptions: t.providerOptions }; } async function compactMessages(n, r, i, a, o, s) { let c = selectRecentWindowSize(n, i); for (;;) { let { older: l, recent: u } = splitMessagesForCompaction(n, c); if (l.length === 0) return keepNonToolResultMessages(u); let d = await generateText({ headers: s, model: r, prompt: formatCompactionPrompt(l.map((e) => ({ content: summarizeCompactionMessageContent(e), role: e.role }))), providerOptions: a, system: COMPACTION_SYSTEM_PROMPT, telemetry: o ? { ...o, functionId: `eve.compaction` } : void 0, temperature: 0 }), f = keepNonToolResultMessages(u), p = f.at(-1)?.role, m = p === void 0 || p === `assistant` ? [{ role: `user`, content: `Continue.` }] : [], h = [ { content: `Summary of our conversation so far:`, role: `user` }, { content: d.text, role: `assistant` }, ...f, ...m ]; if (estimateTokens(h) <= i.threshold || c === 0) return h; --c; } } function keepNonToolResultMessages(e) { let t = []; for (let n of e) if (n.role !== `tool`) { if (n.role === `assistant`) { let e = assistantMessageText(n); e.length > 0 && t.push({ content: e, role: `assistant` }); continue; } t.push(n); } return t; } function assistantMessageText(e) { return typeof e.content == `string` ? e.content.trim() : e.content.filter((e) => e.type === `text`).map((e) => e.text).join(``).trim(); } function selectRecentWindowSize(e, t) { let n = Math.min(t.recentWindowSize, Math.max(e.length - 1, 0)), r = resolveCompactionSummaryReserve(t), i = 0, a = 0; for (let o = e.length - 1; o >= 0 && i < n; --o) { let n = e[o]; if (n === void 0) continue; let s = estimateTokens([n]); if (a + s + r > t.threshold) break; a += s, i += 1; } return i; } function resolveCompactionSummaryReserve(e) { return Math.min(2048, Math.max(64, Math.floor(e.threshold / 4))); } function splitMessagesForCompaction(e, t) { return t <= 0 ? { older: [...e], recent: [] } : { older: e.slice(0, -t), recent: e.slice(-t) }; } function formatCompactionPrompt(e) { let t = e.filter((e) => e.content.trim().length > 0).map((e) => `### ${e.role}\n${e.content.trim()}`); return t.length === 0 ? `Summarize the conversation so far.` : [`Conversation transcript:`, ...t].join(` `); } function summarizeCompactionMessageContent(e) { return typeof e.content == `string` ? summarizeText(e.content) : e.content.map((e) => summarizeCompactionContentPart(e)).filter((e) => e.length > 0).join(` `).trim(); } function summarizeCompactionContentPart(e) { switch (e.type) { case `text`: return summarizeText(e.text); case `reasoning`: return ``; case `file`: return e.filename ? `Attached file ${e.filename} (${e.mediaType})` : `Attached file attachment (${e.mediaType})`; case `tool-call`: return summarizeToolCallPart(e); case `tool-result`: return summarizeToolResultPart(e); default: return ``; } } function summarizeToolCallPart(e) { let t = e.input === void 0 ? `` : summarizeCompactValue(e.input); return t ? `Called ${e.toolName} with ${t}` : `Called ${e.toolName}`; } function summarizeToolResultPart(e) { let t = e.output === void 0 ? `` : summarizeCompactValue(e.output), n = e.isError ? `errored` : `returned`; return t ? `Tool ${e.toolName} ${n} ${t}` : `Tool ${e.toolName} ${n}`; } function summarizeCompactValue(e, t = 0) { if (e === null) return `null`; if (e === void 0) return ``; if (typeof e == `string`) return summarizeText(e); if (typeof e == `number` || typeof e == `boolean` || typeof e == `bigint`) return String(e); if (Array.isArray(e)) { if (e.length === 0) return `array(0)`; if (t >= 2) return `array(${e.length})`; let n = e.slice(0, 3).map((e) => summarizeCompactValue(e, t + 1)), r = e.length > 3 ? `, …` : ``; return `array(${e.length}: ${n.join(`, `)}${r})`; } if (typeof e == `object`) { let n = Object.entries(e); if (n.length === 0) return `object(0)`; if (t >= 2) return `object(${n.length} keys)`; let r = n.slice(0, 3).map(([e, n]) => `${e}=${summarizeCompactValue(n, t + 1)}`), i = n.length > 3 ? `, …` : ``; return `object(${r.join(`, `)}${i})`; } return ``; } function summarizeText(e) { let t = e.replace(/\s+/g, ` `).trim(); return t.length <= 280 ? t : `${t.slice(0, 280).trimEnd()}…`; } //#endregion //#region node_modules/eve/dist/src/harness/turn-tag-state.js const HARNESS_TURN_USAGE_STATE_KEY = `eve.harness.turnUsage`; const ZERO_USAGE = { cacheReadTokens: 0, cacheWriteTokens: 0, inputTokens: 0, outputTokens: 0 }; function getTurnUsageState(t) { return t?.[HARNESS_TURN_USAGE_STATE_KEY]; } function setTurnUsageState(t, n) { return { ...t, state: { ...t.state, [HARNESS_TURN_USAGE_STATE_KEY]: n } }; } function accumulateTurnUsage(e) { let n = e.previous !== void 0 && e.previous.turnId === e.turnId ? e.previous : { ...ZERO_USAGE, turnId: e.turnId }; return { turnId: e.turnId, cacheReadTokens: n.cacheReadTokens + (e.usage.cachedInputTokens ?? 0), cacheWriteTokens: n.cacheWriteTokens + (e.usage.inputTokenDetails?.cacheWriteTokens ?? 0), inputTokens: n.inputTokens + (e.usage.inputTokens ?? 0), outputTokens: n.outputTokens + (e.usage.outputTokens ?? 0) }; } //#endregion //#region node_modules/eve/dist/src/internal/workflow/builtins.js async function __builtin_response_array_buffer() { return await this.arrayBuffer(); } async function __builtin_response_json() { return await this.json(); } async function __builtin_response_text() { return await this.text(); } const EVE_UNSUPPORTED_WORLD_WARNED = Symbol.for(`@workflow/setAttributes//unsupportedWorldWarned`); function formatUnknownError(e) { return e instanceof Error ? e.stack ?? `${e.name}: ${e.message}` : String(e); } async function __builtin_set_attributes(t, n) { if (t.length === 0) return; let r = globalThis, i = r[Symbol.for(`WORKFLOW_STEP_CONTEXT_STORAGE`)]?.getStore?.(), a = typeof i?.stepMetadata?.attempt == `number` ? i.stepMetadata.attempt : 3, o = r[Symbol.for(`@workflow/world//cache`)]; if (typeof o?.runs?.experimentalSetAttributes != `function`) { if (r[EVE_UNSUPPORTED_WORLD_WARNED] !== !0) { r[EVE_UNSUPPORTED_WORLD_WARNED] = !0; let t = o?.name === void 0 ? `` : ` (${o.name})`; console.warn(`[eve] setAttributes: the current world implementation${t} does not implement experimentalSetAttributes; this call (and any subsequent setAttributes calls in this process) is a no-op. Attributes will become available once the world adapter adds support.`); } return; } try { let e = i?.workflowMetadata?.workflowRunId; if (e === void 0) throw Error(`__builtin_set_attributes: no workflow run id available in step context`); await o.runs.experimentalSetAttributes(e, t, n); } catch (e) { if (a < 3) throw e; console.error(`[eve] setAttributes: failed to post tags after 3 attempts; dropping the internal attribute write. ${formatUnknownError(e)}`); } } __builtin_set_attributes.maxRetries = 2; s$7("__builtin_response_array_buffer", __builtin_response_array_buffer); s$7("__builtin_response_json", __builtin_response_json); s$7("__builtin_response_text", __builtin_response_text); s$7("__builtin_set_attributes", __builtin_set_attributes); //#endregion //#region node_modules/eve/dist/src/runtime/attributes/emit.js let WARNED_ABOUT_TAG_FAILURE = !1; async function setEveAttributes(e) { let t = normalizeEveAttributes(e); if (Object.keys(t).length !== 0) try { let { experimental_setAttributes: e } = await Promise.resolve().then(() => core_exports); await e(t, { allowReservedAttributes: !0 }); } catch (e) { WARNED_ABOUT_TAG_FAILURE || (WARNED_ABOUT_TAG_FAILURE = !0, console.warn(`[eve] setEveAttributes failed; suppressing further warnings this process.`, { keys: Object.keys(t), error: e.message })); } } //#endregion //#region node_modules/eve/dist/src/harness/instrumentation-runtime-context.js const log$3 = createLogger(`harness.instrumentation-runtime-context`); function buildTelemetryRuntimeContext(e) { if (e.authored === void 0) return; let t = resolveStepStartedRuntimeContext(e), r = contextStorage.getStore()?.get(ChannelInstrumentationKey); return { ...t, "eve.channel.kind": normalizeInstrumentationChannelKind(r?.kind), "eve.environment": e.environment, "eve.session.id": e.session.sessionId, "eve.step.index": String(e.emissionState.stepIndex), "eve.turn.id": e.emissionState.turnId, "eve.turn.sequence": String(e.emissionState.sequence), "eve.version": e.eveVersion }; } function buildInstrumentationStepStartedInput(e) { let t = contextStorage.getStore(), r = t?.get(ChannelInstrumentationKey); return { channel: { kind: normalizeInstrumentationChannelKind(r?.kind), metadata: snapshotForInstrumentation(r?.metadata, `channel.metadata`) ?? {} }, modelInput: snapshotForInstrumentation(e.modelInput, `modelInput`) ?? { instructions: void 0, messages: [] }, session: { auth: projectSessionAuth(t), id: e.session.sessionId, parent: snapshotForInstrumentation(t?.get(ParentSessionKey), `session.parent`) }, step: { index: e.emissionState.stepIndex }, turn: { id: e.emissionState.turnId, sequence: e.emissionState.sequence } }; } function filterAuthoredRuntimeContext(e, t) { let n = {}; for (let [r, i] of Object.entries(e)) { if (r.startsWith(`eve.`)) { log$3.warn(`ignoring reserved instrumentation runtime context key`, { key: r, source: t }); continue; } n[r] = i; } return Object.keys(n).length > 0 ? n : void 0; } function resolveStepStartedRuntimeContext(e) { let n = e.authored?.events?.[`step.started`]; if (n === void 0) return; let i = `events["step.started"]`, a = resolveInstrumentationProjection({ invoke: () => n(buildInstrumentationStepStartedInput(e)), log: log$3, source: i }); if (a === void 0) return; if (!(`runtimeContext` in a)) { log$3.warn(`ignoring instrumentation event result because runtimeContext is missing`, { source: i }); return; } let o; try { o = parseJsonObject(a.runtimeContext); } catch (e) { log$3.warn(`ignoring instrumentation event result because runtimeContext is invalid`, { error: formatError(e), source: i }); return; } return filterAuthoredRuntimeContext(o, i); } function projectSessionAuth(e) { let t = e?.get(AuthKey) ?? null, n = e?.get(InitiatorAuthKey) ?? t; return { current: snapshotForInstrumentation(t, `session.auth.current`) ?? null, initiator: snapshotForInstrumentation(n, `session.auth.initiator`) ?? null }; } function snapshotForInstrumentation(e, n) { if (e !== void 0) try { return parseJsonValue(e); } catch (e) { log$3.warn(`dropping non-serializable instrumentation snapshot`, { error: formatError(e), source: n }); return; } } //#endregion //#region node_modules/eve/dist/src/harness/instrumentation-config.js const INSTRUMENTATION_CONFIG_GLOBAL_KEY = Symbol.for(`eve.harness-instrumentation-config`); const globalContainer = globalThis; function getInstrumentationConfig() { return globalContainer[INSTRUMENTATION_CONFIG_GLOBAL_KEY]; } //#endregion //#region node_modules/eve/dist/src/harness/provider-tool-history.js function normalizeProviderToolHistory(e) { let t = findUnmarkedProviderToolCalls(e); if (e.providerExecutedOutcomeIds.size === 0) return { messages: [...e.messages], outcomeEndsResponse: !1 }; let n = [], r = -1, i = -1, a = 0; for (let o of e.messages) { if (o.role !== `assistant` || !Array.isArray(o.content)) { n.push(o), o.role === `assistant` && typeof o.content == `string` && o.content.trim().length > 0 && (i = a), a += 1; continue; } let s = [], c = [], flushAssistant = () => { s.length !== 0 && (n.push({ ...o, content: s }), s = []); }, flushTool = () => { c.length !== 0 && (n.push({ role: `tool`, content: c }), c = []); }; for (let n of o.content) n.type === `tool-result` && t.has(n.toolCallId) ? (flushAssistant(), c.push(n)) : (flushTool(), s.push(n.type === `tool-call` && t.has(n.toolCallId) ? { ...n, providerExecuted: !1 } : n)), n.type === `tool-result` && e.providerExecutedOutcomeIds.has(n.toolCallId) ? r = a : n.type === `text` && n.text.trim().length > 0 && (i = a), a += 1; flushAssistant(), flushTool(); } return { messages: n, outcomeEndsResponse: r >= 0 && r > i }; } function findUnmarkedProviderToolCalls(e) { let t = /* @__PURE__ */ new Set(); for (let n of e.messages) if (!(n.role !== `assistant` || !Array.isArray(n.content))) for (let r of n.content) r.type === `tool-call` && r.providerExecuted !== !0 && e.providerExecutedOutcomeIds.has(r.toolCallId) && t.add(r.toolCallId); return t; } //#endregion //#region node_modules/eve/dist/src/harness/workflow-stream-error.js const WORKFLOW_STREAM_WRITE_ERROR_PATTERN = /^Stream (write|close) failed: HTTP (\d+)(?: \(([^)]*)\))?/; function extractWorkflowStreamWriteErrorDetails(e) { for (let t of causeChainMessages(e)) { let e = parseStreamErrorMessage(t); if (e !== null) return e; } return null; } function parseStreamErrorMessage(e) { let n = WORKFLOW_STREAM_WRITE_ERROR_PATTERN.exec(e); if (n === null) return null; let r = Number(n[2]), i = { operation: n[1] ?? `` }; Number.isFinite(r) && (i.statusCode = r); for (let e of (n[3] ?? ``).split(`; `)) e.startsWith(`PUT `) ? i.url = e.slice(4) : e.startsWith(`x-vercel-id=`) ? i.vercelId = e.slice(12) : e.startsWith(`x-vercel-error=`) && (i.vercelError = e.slice(15)); return i; } function* causeChainMessages(t) { let n = /* @__PURE__ */ new Set(), r = t; for (; r != null && !n.has(r);) { if (n.add(r), r instanceof Error) { yield r.message, r = r.cause; continue; } if (isObject(r) && typeof r.message == `string`) { yield r.message, r = r.cause; continue; } return; } } //#endregion //#region node_modules/eve/dist/src/compiled/_chunks/workflow/src-CQuMexnO.js var src_CQuMexnO_exports = /* @__PURE__ */ __exportAll({ t: () => W$4 }); var t$4 = c$12(((e) => { Object.defineProperty(e, "__esModule", { value: !0 }), e.VERSION = void 0, e.VERSION = `1.9.1`; })); var n$5 = c$12(((e) => { Object.defineProperty(e, "__esModule", { value: !0 }), e.isCompatible = e._makeCompatibilityCheck = void 0; let n = t$4(), r = /^(\d+)\.(\d+)\.(\d+)(-(.+))?$/; function i(e) { let t = /* @__PURE__ */ new Set([e]), n = /* @__PURE__ */ new Set(), i = e.match(r); if (!i) return () => !1; let a = { major: +i[1], minor: +i[2], patch: +i[3], prerelease: i[4] }; if (a.prerelease != null) return function(t) { return t === e; }; function o(e) { return n.add(e), !1; } function s(e) { return t.add(e), !0; } return function(e) { if (t.has(e)) return !0; if (n.has(e)) return !1; let i = e.match(r); if (!i) return o(e); let c = { major: +i[1], minor: +i[2], patch: +i[3], prerelease: i[4] }; return c.prerelease != null || a.major !== c.major ? o(e) : a.major === 0 ? a.minor === c.minor && a.patch <= c.patch ? s(e) : o(e) : a.minor <= c.minor ? s(e) : o(e); }; } e._makeCompatibilityCheck = i, e.isCompatible = i(n.VERSION); })); var r$8 = c$12(((e) => { Object.defineProperty(e, "__esModule", { value: !0 }), e.unregisterGlobal = e.getGlobal = e.registerGlobal = void 0; let r = t$4(), i = n$5(), a = r.VERSION.split(`.`)[0], o = Symbol.for(`opentelemetry.js.api.${a}`), s = typeof globalThis == `object` ? globalThis : typeof self == `object` ? self : typeof window == `object` ? window : typeof global == `object` ? global : {}; function c(e, t, n, i = !1) { let a = s[o] = s[o] ?? { version: r.VERSION }; if (!i && a[e]) { let t = Error(`@opentelemetry/api: Attempted duplicate registration of API: ${e}`); return n.error(t.stack || t.message), !1; } if (a.version !== r.VERSION) { let t = Error(`@opentelemetry/api: Registration of version v${a.version} for ${e} does not match previously registered API v${r.VERSION}`); return n.error(t.stack || t.message), !1; } return a[e] = t, n.debug(`@opentelemetry/api: Registered a global for ${e} v${r.VERSION}.`), !0; } e.registerGlobal = c; function l(e) { let t = s[o]?.version; if (!(!t || !(0, i.isCompatible)(t))) return s[o]?.[e]; } e.getGlobal = l; function u(e, t) { t.debug(`@opentelemetry/api: Unregistering a global for ${e} v${r.VERSION}.`); let n = s[o]; n && delete n[e]; } e.unregisterGlobal = u; })); var i$6 = c$12(((e) => { Object.defineProperty(e, "__esModule", { value: !0 }), e.DiagComponentLogger = void 0; let t = r$8(); e.DiagComponentLogger = class { constructor(e) { this._namespace = e.namespace || `DiagComponentLogger`; } debug(...e) { return n(`debug`, this._namespace, e); } error(...e) { return n(`error`, this._namespace, e); } info(...e) { return n(`info`, this._namespace, e); } warn(...e) { return n(`warn`, this._namespace, e); } verbose(...e) { return n(`verbose`, this._namespace, e); } }; function n(e, n, r) { let i = (0, t.getGlobal)(`diag`); if (i) return i[e](n, ...r); } })); var a$5 = c$12(((e) => { Object.defineProperty(e, "__esModule", { value: !0 }), e.DiagLogLevel = void 0, (function(e) { e[e.NONE = 0] = `NONE`, e[e.ERROR = 30] = `ERROR`, e[e.WARN = 50] = `WARN`, e[e.INFO = 60] = `INFO`, e[e.DEBUG = 70] = `DEBUG`, e[e.VERBOSE = 80] = `VERBOSE`, e[e.ALL = 9999] = `ALL`; })(e.DiagLogLevel ||= {}); })); var o$5 = c$12(((e) => { Object.defineProperty(e, "__esModule", { value: !0 }), e.createLogLevelDiagLogger = void 0; let t = a$5(); function n(e, n) { e < t.DiagLogLevel.NONE ? e = t.DiagLogLevel.NONE : e > t.DiagLogLevel.ALL && (e = t.DiagLogLevel.ALL), n ||= {}; function r(t, r) { let i = n[t]; return typeof i == `function` && e >= r ? i.bind(n) : function() {}; } return { error: r(`error`, t.DiagLogLevel.ERROR), warn: r(`warn`, t.DiagLogLevel.WARN), info: r(`info`, t.DiagLogLevel.INFO), debug: r(`debug`, t.DiagLogLevel.DEBUG), verbose: r(`verbose`, t.DiagLogLevel.VERBOSE) }; } e.createLogLevelDiagLogger = n; })); var s$4 = c$12(((e) => { Object.defineProperty(e, "__esModule", { value: !0 }), e.DiagAPI = void 0; let t = i$6(), n = o$5(), s = a$5(), c = r$8(); e.DiagAPI = class e { static instance() { return this._instance ||= new e(), this._instance; } constructor() { function e(e) { return function(...t) { let n = (0, c.getGlobal)(`diag`); if (n) return n[e](...t); }; } let r = this; r.setLogger = (e, t = { logLevel: s.DiagLogLevel.INFO }) => { if (e === r) { let e = Error(`Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation`); return r.error(e.stack ?? e.message), !1; } typeof t == `number` && (t = { logLevel: t }); let i = (0, c.getGlobal)(`diag`), a = (0, n.createLogLevelDiagLogger)(t.logLevel ?? s.DiagLogLevel.INFO, e); if (i && !t.suppressOverrideMessage) { let e = Error().stack ?? ``; i.warn(`Current logger will be overwritten from ${e}`), a.warn(`Current logger will overwrite one already registered from ${e}`); } return (0, c.registerGlobal)(`diag`, a, r, !0); }, r.disable = () => { (0, c.unregisterGlobal)(`diag`, r); }, r.createComponentLogger = (e) => new t.DiagComponentLogger(e), r.verbose = e(`verbose`), r.debug = e(`debug`), r.info = e(`info`), r.warn = e(`warn`), r.error = e(`error`); } }; })); var c$5 = c$12(((e) => { Object.defineProperty(e, "__esModule", { value: !0 }), e.BaggageImpl = void 0, e.BaggageImpl = class e { constructor(e) { this._entries = e ? new Map(e) : /* @__PURE__ */ new Map(); } getEntry(e) { let t = this._entries.get(e); if (t) return Object.assign({}, t); } getAllEntries() { return Array.from(this._entries.entries()); } setEntry(t, n) { let r = new e(this._entries); return r._entries.set(t, n), r; } removeEntry(t) { let n = new e(this._entries); return n._entries.delete(t), n; } removeEntries(...t) { let n = new e(this._entries); for (let e of t) n._entries.delete(e); return n; } clear() { return new e(); } }; })); var l$4 = c$12(((e) => { Object.defineProperty(e, "__esModule", { value: !0 }), e.baggageEntryMetadataSymbol = void 0, e.baggageEntryMetadataSymbol = Symbol(`BaggageEntryMetadata`); })); var u$5 = c$12(((e) => { Object.defineProperty(e, "__esModule", { value: !0 }), e.baggageEntryMetadataFromString = e.createBaggage = void 0; let t = s$4(), n = c$5(), r = l$4(), i = t.DiagAPI.instance(); function a(e = {}) { return new n.BaggageImpl(new Map(Object.entries(e))); } e.createBaggage = a; function o(e) { return typeof e != `string` && (i.error(`Cannot create baggage metadata from unknown type: ${typeof e}`), e = ``), { __TYPE__: r.baggageEntryMetadataSymbol, toString() { return e; } }; } e.baggageEntryMetadataFromString = o; })); var d$5 = c$12(((e) => { Object.defineProperty(e, "__esModule", { value: !0 }), e.ROOT_CONTEXT = e.createContextKey = void 0; function t(e) { return Symbol.for(e); } e.createContextKey = t, e.ROOT_CONTEXT = new class e { constructor(t) { let n = this; n._currentContext = t ? new Map(t) : /* @__PURE__ */ new Map(), n.getValue = (e) => n._currentContext.get(e), n.setValue = (t, r) => { let i = new e(n._currentContext); return i._currentContext.set(t, r), i; }, n.deleteValue = (t) => { let r = new e(n._currentContext); return r._currentContext.delete(t), r; }; } }(); })); var f$4 = c$12(((e) => { Object.defineProperty(e, "__esModule", { value: !0 }), e.DiagConsoleLogger = e._originalConsoleMethods = void 0; let t = [ { n: `error`, c: `error` }, { n: `warn`, c: `warn` }, { n: `info`, c: `info` }, { n: `debug`, c: `debug` }, { n: `verbose`, c: `trace` } ]; if (e._originalConsoleMethods = {}, typeof console < `u`) for (let t of [ `error`, `warn`, `info`, `debug`, `trace`, `log` ]) typeof console[t] == `function` && (e._originalConsoleMethods[t] = console[t]); e.DiagConsoleLogger = class { constructor() { function n(t) { return function(...n) { let r = e._originalConsoleMethods[t]; if (typeof r != `function` && (r = e._originalConsoleMethods.log), typeof r != `function` && console && (r = console[t], typeof r != `function` && (r = console.log)), typeof r == `function`) return r.apply(console, n); }; } for (let e = 0; e < t.length; e++) this[t[e].n] = n(t[e].c); } }; })); var p$6 = c$12(((e) => { Object.defineProperty(e, "__esModule", { value: !0 }), e.createNoopMeter = e.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC = e.NOOP_OBSERVABLE_GAUGE_METRIC = e.NOOP_OBSERVABLE_COUNTER_METRIC = e.NOOP_UP_DOWN_COUNTER_METRIC = e.NOOP_HISTOGRAM_METRIC = e.NOOP_GAUGE_METRIC = e.NOOP_COUNTER_METRIC = e.NOOP_METER = e.NoopObservableUpDownCounterMetric = e.NoopObservableGaugeMetric = e.NoopObservableCounterMetric = e.NoopObservableMetric = e.NoopHistogramMetric = e.NoopGaugeMetric = e.NoopUpDownCounterMetric = e.NoopCounterMetric = e.NoopMetric = e.NoopMeter = void 0; var t = class { constructor() {} createGauge(t, n) { return e.NOOP_GAUGE_METRIC; } createHistogram(t, n) { return e.NOOP_HISTOGRAM_METRIC; } createCounter(t, n) { return e.NOOP_COUNTER_METRIC; } createUpDownCounter(t, n) { return e.NOOP_UP_DOWN_COUNTER_METRIC; } createObservableGauge(t, n) { return e.NOOP_OBSERVABLE_GAUGE_METRIC; } createObservableCounter(t, n) { return e.NOOP_OBSERVABLE_COUNTER_METRIC; } createObservableUpDownCounter(t, n) { return e.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC; } addBatchObservableCallback(e, t) {} removeBatchObservableCallback(e) {} }; e.NoopMeter = t; var n = class {}; e.NoopMetric = n; var r = class extends n { add(e, t) {} }; e.NoopCounterMetric = r; var i = class extends n { add(e, t) {} }; e.NoopUpDownCounterMetric = i; var a = class extends n { record(e, t) {} }; e.NoopGaugeMetric = a; var o = class extends n { record(e, t) {} }; e.NoopHistogramMetric = o; var s = class { addCallback(e) {} removeCallback(e) {} }; e.NoopObservableMetric = s; var c = class extends s {}; e.NoopObservableCounterMetric = c; var l = class extends s {}; e.NoopObservableGaugeMetric = l; var u = class extends s {}; e.NoopObservableUpDownCounterMetric = u, e.NOOP_METER = new t(), e.NOOP_COUNTER_METRIC = new r(), e.NOOP_GAUGE_METRIC = new a(), e.NOOP_HISTOGRAM_METRIC = new o(), e.NOOP_UP_DOWN_COUNTER_METRIC = new i(), e.NOOP_OBSERVABLE_COUNTER_METRIC = new c(), e.NOOP_OBSERVABLE_GAUGE_METRIC = new l(), e.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC = new u(); function d() { return e.NOOP_METER; } e.createNoopMeter = d; })); var m$4 = c$12(((e) => { Object.defineProperty(e, "__esModule", { value: !0 }), e.ValueType = void 0, (function(e) { e[e.INT = 0] = `INT`, e[e.DOUBLE = 1] = `DOUBLE`; })(e.ValueType ||= {}); })); var h$4 = c$12(((e) => { Object.defineProperty(e, "__esModule", { value: !0 }), e.defaultTextMapSetter = e.defaultTextMapGetter = void 0, e.defaultTextMapGetter = { get(e, t) { if (e != null) return e[t]; }, keys(e) { return e == null ? [] : Object.keys(e); } }, e.defaultTextMapSetter = { set(e, t, n) { e != null && (e[t] = n); } }; })); var g$4 = c$12(((e) => { Object.defineProperty(e, "__esModule", { value: !0 }), e.NoopContextManager = void 0; let t = d$5(); e.NoopContextManager = class { active() { return t.ROOT_CONTEXT; } with(e, t, n, ...r) { return t.call(n, ...r); } bind(e, t) { return t; } enable() { return this; } disable() { return this; } }; })); var _$3 = c$12(((e) => { Object.defineProperty(e, "__esModule", { value: !0 }), e.ContextAPI = void 0; let t = g$4(), n = r$8(), i = s$4(), a = `context`, o = new t.NoopContextManager(); e.ContextAPI = class e { constructor() {} static getInstance() { return this._instance ||= new e(), this._instance; } setGlobalContextManager(e) { return (0, n.registerGlobal)(a, e, i.DiagAPI.instance()); } active() { return this._getContextManager().active(); } with(e, t, n, ...r) { return this._getContextManager().with(e, t, n, ...r); } bind(e, t) { return this._getContextManager().bind(e, t); } _getContextManager() { return (0, n.getGlobal)(a) || o; } disable() { this._getContextManager().disable(), (0, n.unregisterGlobal)(a, i.DiagAPI.instance()); } }; })); var v$4 = c$12(((e) => { Object.defineProperty(e, "__esModule", { value: !0 }), e.TraceFlags = void 0, (function(e) { e[e.NONE = 0] = `NONE`, e[e.SAMPLED = 1] = `SAMPLED`; })(e.TraceFlags ||= {}); })); var y$2 = c$12(((e) => { Object.defineProperty(e, "__esModule", { value: !0 }), e.INVALID_SPAN_CONTEXT = e.INVALID_TRACEID = e.INVALID_SPANID = void 0; let t = v$4(); e.INVALID_SPANID = `0000000000000000`, e.INVALID_TRACEID = `00000000000000000000000000000000`, e.INVALID_SPAN_CONTEXT = { traceId: e.INVALID_TRACEID, spanId: e.INVALID_SPANID, traceFlags: t.TraceFlags.NONE }; })); var b$4 = c$12(((e) => { Object.defineProperty(e, "__esModule", { value: !0 }), e.NonRecordingSpan = void 0; let t = y$2(); e.NonRecordingSpan = class { constructor(e = t.INVALID_SPAN_CONTEXT) { this._spanContext = e; } spanContext() { return this._spanContext; } setAttribute(e, t) { return this; } setAttributes(e) { return this; } addEvent(e, t) { return this; } addLink(e) { return this; } addLinks(e) { return this; } setStatus(e) { return this; } updateName(e) { return this; } end(e) {} isRecording() { return !1; } recordException(e, t) {} }; })); var x$3 = c$12(((e) => { Object.defineProperty(e, "__esModule", { value: !0 }), e.getSpanContext = e.setSpanContext = e.deleteSpan = e.setSpan = e.getActiveSpan = e.getSpan = void 0; let t = d$5(), n = b$4(), r = _$3(), i = (0, t.createContextKey)(`OpenTelemetry Context Key SPAN`); function a(e) { return e.getValue(i) || void 0; } e.getSpan = a; function o() { return a(r.ContextAPI.getInstance().active()); } e.getActiveSpan = o; function s(e, t) { return e.setValue(i, t); } e.setSpan = s; function c(e) { return e.deleteValue(i); } e.deleteSpan = c; function l(e, t) { return s(e, new n.NonRecordingSpan(t)); } e.setSpanContext = l; function u(e) { return a(e)?.spanContext(); } e.getSpanContext = u; })); var S$3 = c$12(((e) => { Object.defineProperty(e, "__esModule", { value: !0 }), e.wrapSpanContext = e.isSpanContextValid = e.isValidSpanId = e.isValidTraceId = void 0; let t = y$2(), n = b$4(), r = new Uint8Array([ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1 ]); function i(e, t) { if (typeof e != `string` || e.length !== t) return !1; let n = 0; for (let t = 0; t < e.length; t += 4) n += (r[e.charCodeAt(t)] | 0) + (r[e.charCodeAt(t + 1)] | 0) + (r[e.charCodeAt(t + 2)] | 0) + (r[e.charCodeAt(t + 3)] | 0); return n === t; } function a(e) { return i(e, 32) && e !== t.INVALID_TRACEID; } e.isValidTraceId = a; function o(e) { return i(e, 16) && e !== t.INVALID_SPANID; } e.isValidSpanId = o; function s(e) { return a(e.traceId) && o(e.spanId); } e.isSpanContextValid = s; function c(e) { return new n.NonRecordingSpan(e); } e.wrapSpanContext = c; })); var C$4 = c$12(((e) => { Object.defineProperty(e, "__esModule", { value: !0 }), e.NoopTracer = void 0; let t = _$3(), n = x$3(), r = b$4(), i = S$3(), a = t.ContextAPI.getInstance(); e.NoopTracer = class { startSpan(e, t, s = a.active()) { if (t?.root) return new r.NonRecordingSpan(); let c = s && (0, n.getSpanContext)(s); return o(c) && (0, i.isSpanContextValid)(c) ? new r.NonRecordingSpan(c) : new r.NonRecordingSpan(); } startActiveSpan(e, t, r, i) { let o, s, c; if (arguments.length < 2) return; arguments.length === 2 ? c = t : arguments.length === 3 ? (o = t, c = r) : (o = t, s = r, c = i); let l = s ?? a.active(), u = this.startSpan(e, o, l), d = (0, n.setSpan)(l, u); return a.with(d, c, void 0, u); } }; function o(e) { return typeof e == `object` && !!e && `spanId` in e && typeof e.spanId == `string` && `traceId` in e && typeof e.traceId == `string` && `traceFlags` in e && typeof e.traceFlags == `number`; } })); var w$4 = c$12(((e) => { Object.defineProperty(e, "__esModule", { value: !0 }), e.ProxyTracer = void 0; let t = new (C$4()).NoopTracer(); e.ProxyTracer = class { constructor(e, t, n, r) { this._provider = e, this.name = t, this.version = n, this.options = r; } startSpan(e, t, n) { return this._getTracer().startSpan(e, t, n); } startActiveSpan(e, t, n, r) { let i = this._getTracer(); return Reflect.apply(i.startActiveSpan, i, arguments); } _getTracer() { if (this._delegate) return this._delegate; let e = this._provider.getDelegateTracer(this.name, this.version, this.options); return e ? (this._delegate = e, this._delegate) : t; } }; })); var T$4 = c$12(((e) => { Object.defineProperty(e, "__esModule", { value: !0 }), e.NoopTracerProvider = void 0; let t = C$4(); e.NoopTracerProvider = class { getTracer(e, n, r) { return new t.NoopTracer(); } }; })); var E$4 = c$12(((e) => { Object.defineProperty(e, "__esModule", { value: !0 }), e.ProxyTracerProvider = void 0; let t = w$4(), n = new (T$4()).NoopTracerProvider(); e.ProxyTracerProvider = class { getTracer(e, n, r) { return this.getDelegateTracer(e, n, r) ?? new t.ProxyTracer(this, e, n, r); } getDelegate() { return this._delegate ?? n; } setDelegate(e) { this._delegate = e; } getDelegateTracer(e, t, n) { return this._delegate?.getTracer(e, t, n); } }; })); var D$3 = c$12(((e) => { Object.defineProperty(e, "__esModule", { value: !0 }), e.SamplingDecision = void 0, (function(e) { e[e.NOT_RECORD = 0] = `NOT_RECORD`, e[e.RECORD = 1] = `RECORD`, e[e.RECORD_AND_SAMPLED = 2] = `RECORD_AND_SAMPLED`; })(e.SamplingDecision ||= {}); })); var O$3 = c$12(((e) => { Object.defineProperty(e, "__esModule", { value: !0 }), e.SpanKind = void 0, (function(e) { e[e.INTERNAL = 0] = `INTERNAL`, e[e.SERVER = 1] = `SERVER`, e[e.CLIENT = 2] = `CLIENT`, e[e.PRODUCER = 3] = `PRODUCER`, e[e.CONSUMER = 4] = `CONSUMER`; })(e.SpanKind ||= {}); })); var k$4 = c$12(((e) => { Object.defineProperty(e, "__esModule", { value: !0 }), e.SpanStatusCode = void 0, (function(e) { e[e.UNSET = 0] = `UNSET`, e[e.OK = 1] = `OK`, e[e.ERROR = 2] = `ERROR`; })(e.SpanStatusCode ||= {}); })); var A$3 = c$12(((e) => { Object.defineProperty(e, "__esModule", { value: !0 }), e.validateValue = e.validateKey = void 0; let t = `[_0-9a-z-*/]`, n = RegExp(`^(?:${`[a-z]${t}{0,255}`}|${`[a-z0-9]${t}{0,240}@[a-z]${t}{0,13}`})$`), r = /^[ -~]{0,255}[!-~]$/, i = /,|=/; function a(e) { return n.test(e); } e.validateKey = a; function o(e) { return r.test(e) && !i.test(e); } e.validateValue = o; })); var j$3 = c$12(((e) => { Object.defineProperty(e, "__esModule", { value: !0 }), e.TraceStateImpl = void 0; let t = A$3(); e.TraceStateImpl = class e { constructor(e) { this._internalState = /* @__PURE__ */ new Map(), e && this._parse(e); } set(e, t) { let n = this._clone(); return n._internalState.has(e) && n._internalState.delete(e), n._internalState.set(e, t), n; } unset(e) { let t = this._clone(); return t._internalState.delete(e), t; } get(e) { return this._internalState.get(e); } serialize() { return Array.from(this._internalState.keys()).reduceRight((e, t) => (e.push(t + `=` + this.get(t)), e), []).join(`,`); } _parse(e) { e.length > 512 || (this._internalState = e.split(`,`).reduceRight((e, n) => { let r = n.trim(), i = r.indexOf(`=`); if (i !== -1) { let a = r.slice(0, i), o = r.slice(i + 1, n.length); (0, t.validateKey)(a) && (0, t.validateValue)(o) && e.set(a, o); } return e; }, /* @__PURE__ */ new Map()), this._internalState.size > 32 && (this._internalState = new Map(Array.from(this._internalState.entries()).reverse().slice(0, 32)))); } _keys() { return Array.from(this._internalState.keys()).reverse(); } _clone() { let t = new e(); return t._internalState = new Map(this._internalState), t; } }; })); var M$3 = c$12(((e) => { Object.defineProperty(e, "__esModule", { value: !0 }), e.createTraceState = void 0; let t = j$3(); function n(e) { return new t.TraceStateImpl(e); } e.createTraceState = n; })); var N$3 = c$12(((e) => { Object.defineProperty(e, "__esModule", { value: !0 }), e.context = void 0, e.context = _$3().ContextAPI.getInstance(); })); var P$3 = c$12(((e) => { Object.defineProperty(e, "__esModule", { value: !0 }), e.diag = void 0, e.diag = s$4().DiagAPI.instance(); })); var F$3 = c$12(((e) => { Object.defineProperty(e, "__esModule", { value: !0 }), e.NOOP_METER_PROVIDER = e.NoopMeterProvider = void 0; let t = p$6(); var n = class { getMeter(e, n, r) { return t.NOOP_METER; } }; e.NoopMeterProvider = n, e.NOOP_METER_PROVIDER = new n(); })); var I$3 = c$12(((e) => { Object.defineProperty(e, "__esModule", { value: !0 }), e.MetricsAPI = void 0; let t = F$3(), n = r$8(), i = s$4(), a = `metrics`; e.MetricsAPI = class e { constructor() {} static getInstance() { return this._instance ||= new e(), this._instance; } setGlobalMeterProvider(e) { return (0, n.registerGlobal)(a, e, i.DiagAPI.instance()); } getMeterProvider() { return (0, n.getGlobal)(a) || t.NOOP_METER_PROVIDER; } getMeter(e, t, n) { return this.getMeterProvider().getMeter(e, t, n); } disable() { (0, n.unregisterGlobal)(a, i.DiagAPI.instance()); } }; })); var L$3 = c$12(((e) => { Object.defineProperty(e, "__esModule", { value: !0 }), e.metrics = void 0, e.metrics = I$3().MetricsAPI.getInstance(); })); var R$3 = c$12(((e) => { Object.defineProperty(e, "__esModule", { value: !0 }), e.NoopTextMapPropagator = void 0, e.NoopTextMapPropagator = class { inject(e, t) {} extract(e, t) { return e; } fields() { return []; } }; })); var z$3 = c$12(((e) => { Object.defineProperty(e, "__esModule", { value: !0 }), e.deleteBaggage = e.setBaggage = e.getActiveBaggage = e.getBaggage = void 0; let t = _$3(), n = (0, d$5().createContextKey)(`OpenTelemetry Baggage Key`); function r(e) { return e.getValue(n) || void 0; } e.getBaggage = r; function i() { return r(t.ContextAPI.getInstance().active()); } e.getActiveBaggage = i; function a(e, t) { return e.setValue(n, t); } e.setBaggage = a; function o(e) { return e.deleteValue(n); } e.deleteBaggage = o; })); var B$3 = c$12(((e) => { Object.defineProperty(e, "__esModule", { value: !0 }), e.PropagationAPI = void 0; let t = r$8(), n = R$3(), i = h$4(), a = z$3(), o = u$5(), c = s$4(), l = `propagation`, d = new n.NoopTextMapPropagator(); e.PropagationAPI = class e { constructor() { this.createBaggage = o.createBaggage, this.getBaggage = a.getBaggage, this.getActiveBaggage = a.getActiveBaggage, this.setBaggage = a.setBaggage, this.deleteBaggage = a.deleteBaggage; } static getInstance() { return this._instance ||= new e(), this._instance; } setGlobalPropagator(e) { return (0, t.registerGlobal)(l, e, c.DiagAPI.instance()); } inject(e, t, n = i.defaultTextMapSetter) { return this._getGlobalPropagator().inject(e, t, n); } extract(e, t, n = i.defaultTextMapGetter) { return this._getGlobalPropagator().extract(e, t, n); } fields() { return this._getGlobalPropagator().fields(); } disable() { (0, t.unregisterGlobal)(l, c.DiagAPI.instance()); } _getGlobalPropagator() { return (0, t.getGlobal)(l) || d; } }; })); var V$3 = c$12(((e) => { Object.defineProperty(e, "__esModule", { value: !0 }), e.propagation = void 0, e.propagation = B$3().PropagationAPI.getInstance(); })); var H$4 = c$12(((e) => { Object.defineProperty(e, "__esModule", { value: !0 }), e.TraceAPI = void 0; let t = r$8(), n = E$4(), i = S$3(), a = x$3(), o = s$4(), c = `trace`; e.TraceAPI = class e { constructor() { this._proxyTracerProvider = new n.ProxyTracerProvider(), this.wrapSpanContext = i.wrapSpanContext, this.isSpanContextValid = i.isSpanContextValid, this.deleteSpan = a.deleteSpan, this.getSpan = a.getSpan, this.getActiveSpan = a.getActiveSpan, this.getSpanContext = a.getSpanContext, this.setSpan = a.setSpan, this.setSpanContext = a.setSpanContext; } static getInstance() { return this._instance ||= new e(), this._instance; } setGlobalTracerProvider(e) { let n = (0, t.registerGlobal)(c, this._proxyTracerProvider, o.DiagAPI.instance()); return n && this._proxyTracerProvider.setDelegate(e), n; } getTracerProvider() { return (0, t.getGlobal)(c) || this._proxyTracerProvider; } getTracer(e, t) { return this.getTracerProvider().getTracer(e, t); } disable() { (0, t.unregisterGlobal)(c, o.DiagAPI.instance()), this._proxyTracerProvider = new n.ProxyTracerProvider(); } }; })); var U$4 = c$12(((e) => { Object.defineProperty(e, "__esModule", { value: !0 }), e.trace = void 0, e.trace = H$4().TraceAPI.getInstance(); })); var W$4 = c$12(((e) => { Object.defineProperty(e, "__esModule", { value: !0 }), e.trace = e.propagation = e.metrics = e.diag = e.context = e.INVALID_SPAN_CONTEXT = e.INVALID_TRACEID = e.INVALID_SPANID = e.isValidSpanId = e.isValidTraceId = e.isSpanContextValid = e.createTraceState = e.TraceFlags = e.SpanStatusCode = e.SpanKind = e.SamplingDecision = e.ProxyTracerProvider = e.ProxyTracer = e.defaultTextMapSetter = e.defaultTextMapGetter = e.ValueType = e.createNoopMeter = e.DiagLogLevel = e.DiagConsoleLogger = e.ROOT_CONTEXT = e.createContextKey = e.baggageEntryMetadataFromString = void 0; var t = u$5(); Object.defineProperty(e, "baggageEntryMetadataFromString", { enumerable: !0, get: function() { return t.baggageEntryMetadataFromString; } }); var n = d$5(); Object.defineProperty(e, "createContextKey", { enumerable: !0, get: function() { return n.createContextKey; } }), Object.defineProperty(e, "ROOT_CONTEXT", { enumerable: !0, get: function() { return n.ROOT_CONTEXT; } }); var r = f$4(); Object.defineProperty(e, "DiagConsoleLogger", { enumerable: !0, get: function() { return r.DiagConsoleLogger; } }); var i = a$5(); Object.defineProperty(e, "DiagLogLevel", { enumerable: !0, get: function() { return i.DiagLogLevel; } }); var o = p$6(); Object.defineProperty(e, "createNoopMeter", { enumerable: !0, get: function() { return o.createNoopMeter; } }); var s = m$4(); Object.defineProperty(e, "ValueType", { enumerable: !0, get: function() { return s.ValueType; } }); var c = h$4(); Object.defineProperty(e, "defaultTextMapGetter", { enumerable: !0, get: function() { return c.defaultTextMapGetter; } }), Object.defineProperty(e, "defaultTextMapSetter", { enumerable: !0, get: function() { return c.defaultTextMapSetter; } }); var l = w$4(); Object.defineProperty(e, "ProxyTracer", { enumerable: !0, get: function() { return l.ProxyTracer; } }); var g = E$4(); Object.defineProperty(e, "ProxyTracerProvider", { enumerable: !0, get: function() { return g.ProxyTracerProvider; } }); var _ = D$3(); Object.defineProperty(e, "SamplingDecision", { enumerable: !0, get: function() { return _.SamplingDecision; } }); var b = O$3(); Object.defineProperty(e, "SpanKind", { enumerable: !0, get: function() { return b.SpanKind; } }); var x = k$4(); Object.defineProperty(e, "SpanStatusCode", { enumerable: !0, get: function() { return x.SpanStatusCode; } }); var C = v$4(); Object.defineProperty(e, "TraceFlags", { enumerable: !0, get: function() { return C.TraceFlags; } }); var T = M$3(); Object.defineProperty(e, "createTraceState", { enumerable: !0, get: function() { return T.createTraceState; } }); var A = S$3(); Object.defineProperty(e, "isSpanContextValid", { enumerable: !0, get: function() { return A.isSpanContextValid; } }), Object.defineProperty(e, "isValidTraceId", { enumerable: !0, get: function() { return A.isValidTraceId; } }), Object.defineProperty(e, "isValidSpanId", { enumerable: !0, get: function() { return A.isValidSpanId; } }); var j = y$2(); Object.defineProperty(e, "INVALID_SPANID", { enumerable: !0, get: function() { return j.INVALID_SPANID; } }), Object.defineProperty(e, "INVALID_TRACEID", { enumerable: !0, get: function() { return j.INVALID_TRACEID; } }), Object.defineProperty(e, "INVALID_SPAN_CONTEXT", { enumerable: !0, get: function() { return j.INVALID_SPAN_CONTEXT; } }); let F = N$3(); Object.defineProperty(e, "context", { enumerable: !0, get: function() { return F.context; } }); let I = P$3(); Object.defineProperty(e, "diag", { enumerable: !0, get: function() { return I.diag; } }); let R = L$3(); Object.defineProperty(e, "metrics", { enumerable: !0, get: function() { return R.metrics; } }); let z = V$3(); Object.defineProperty(e, "propagation", { enumerable: !0, get: function() { return z.propagation; } }); let B = U$4(); Object.defineProperty(e, "trace", { enumerable: !0, get: function() { return B.trace; } }), e.default = { context: F.context, diag: I.diag, metrics: R.metrics, propagation: z.propagation, trace: B.trace }; })); //#endregion //#region node_modules/eve/dist/src/compiled/@ai-sdk/otel/index.js var n$4 = W$4(); function r$7(e) { let t = e.toLowerCase(); for (let [e, n] of [ [`google.vertex`, `gcp.vertex_ai`], [`google.generative-ai`, `gcp.gemini`], [`google-vertex`, `gcp.vertex_ai`], [`amazon-bedrock`, `aws.bedrock`], [`azure-openai`, `azure.ai.openai`], [`anthropic`, `anthropic`], [`openai`, `openai`], [`azure`, `azure.ai.inference`], [`google`, `gcp.gemini`], [`mistral`, `mistral_ai`], [`cohere`, `cohere`], [`bedrock`, `aws.bedrock`], [`groq`, `groq`], [`deepseek`, `deepseek`], [`perplexity`, `perplexity`], [`xai`, `x_ai`] ]) if (t === e || t.startsWith(e + `.`) || t.startsWith(e + `-`)) return n; return e; } function i$5(e) { return { "ai.generateText": `invoke_agent`, "ai.streamText": `invoke_agent`, "ai.generateObject": `invoke_agent`, "ai.streamObject": `invoke_agent`, "ai.embed": `embeddings`, "ai.embedMany": `embeddings`, "ai.rerank": `rerank` }[e] ?? e; } function a$4(e) { return typeof e == `string` ? [{ type: `text`, content: e }] : Array.isArray(e) ? e.map((e) => ({ type: `text`, content: e.content })) : [{ type: `text`, content: e.content }]; } function o$4(e) { switch (e.type) { case `text`: return { type: `text`, content: e.text }; case `reasoning`: return { type: `reasoning`, content: e.text }; case `tool-call`: return { type: `tool_call`, id: e.toolCallId ?? null, name: e.toolName, arguments: e.input }; case `tool-result`: { let t = e.output, n; return t && (n = t.type === `text` || t.type === `error-text` || t.type === `json` || t.type === `error-json` ? t.value : t.type === `execution-denied` ? { denied: !0, reason: t.reason } : t), { type: `tool_call_response`, id: e.toolCallId ?? null, response: n }; } case `file`: { let n = e.data, r = (() => { if (typeof n == `object` && n && !(n instanceof URL) && !(n instanceof Uint8Array) && !(n instanceof ArrayBuffer) && `type` in n) switch (n.type) { case `data`: return n.data; case `url`: return n.url; case `text`: return n.text; default: return ``; } return n; })(), i; if (r instanceof Uint8Array) i = convertDataContentToBase64String(r); else if (typeof r == `string`) { if (r.startsWith(`http://`) || r.startsWith(`https://`)) return { type: `uri`, modality: s$3(e.mediaType), mime_type: e.mediaType ?? null, uri: r }; i = r; } else if (r instanceof URL) return { type: `uri`, modality: s$3(e.mediaType), mime_type: e.mediaType ?? null, uri: r.toString() }; else i = String(r); return { type: `blob`, modality: s$3(e.mediaType), mime_type: e.mediaType ?? null, content: i }; } case `tool-approval-response`: return { type: `tool_approval_response`, approval_id: e.approvalId, approved: e.approved, reason: e.reason }; case `custom`: return { type: `custom`, kind: e.kind }; case `reasoning-file`: return { type: String(e.type) }; default: return { type: String(e.type) }; } } function s$3(e) { return !e || e.startsWith(`image/`) ? `image` : e.startsWith(`video/`) ? `video` : e.startsWith(`audio/`) ? `audio` : `image`; } function c$4(e) { return e.filter((e) => e.role !== `system`).map((e) => { if (e.role === `system`) return { role: `system`, parts: [{ type: `text`, content: e.content }] }; let t = e.content.map(o$4); return { role: e.role, parts: t }; }); } function l$3({ prompt: e, messages: t }) { let n = []; if (typeof e == `string`) n.push({ role: `user`, parts: [{ type: `text`, content: e }] }); else if (Array.isArray(e)) for (let t of e) { let e = u$4(t); e && n.push(e); } if (t) for (let e of t) { let t = u$4(e); t && n.push(t); } return n; } function u$4(e) { if (e.role !== `system`) { if (e.role === `user`) return typeof e.content == `string` ? { role: `user`, parts: [{ type: `text`, content: e.content }] } : { role: `user`, parts: e.content.map((e) => { switch (e.type) { case `text`: return { type: `text`, content: e.text }; case `image`: { let n = e.image; return n instanceof URL ? { type: `uri`, modality: `image`, mime_type: e.mediaType ?? null, uri: n.toString() } : typeof n == `string` ? n.startsWith(`http://`) || n.startsWith(`https://`) ? { type: `uri`, modality: `image`, mime_type: e.mediaType ?? null, uri: n } : { type: `blob`, modality: `image`, mime_type: e.mediaType ?? null, content: n } : { type: `blob`, modality: `image`, mime_type: e.mediaType ?? null, content: convertDataContentToBase64String(n) }; } case `file`: { let n = e.data, r = (() => { if (typeof n == `object` && n && !(n instanceof URL) && !(n instanceof Uint8Array) && !(n instanceof ArrayBuffer) && `type` in n) switch (n.type) { case `data`: return n.data; case `url`: return n.url; case `text`: return n.text; default: return ``; } return n; })(); return r instanceof URL ? { type: `uri`, modality: s$3(e.mediaType), mime_type: e.mediaType ?? null, uri: r.toString() } : typeof r == `string` ? r.startsWith(`http://`) || r.startsWith(`https://`) ? { type: `uri`, modality: s$3(e.mediaType), mime_type: e.mediaType ?? null, uri: r } : { type: `blob`, modality: s$3(e.mediaType), mime_type: e.mediaType ?? null, content: r } : { type: `blob`, modality: s$3(e.mediaType), mime_type: e.mediaType ?? null, content: convertDataContentToBase64String(r) }; } default: return { type: String(e.type) }; } }) }; if (e.role === `assistant`) return typeof e.content == `string` ? { role: `assistant`, parts: [{ type: `text`, content: e.content }] } : { role: `assistant`, parts: e.content.map((e) => { switch (e.type) { case `text`: return { type: `text`, content: e.text }; case `reasoning`: return { type: `reasoning`, content: e.text }; case `tool-call`: return { type: `tool_call`, id: e.toolCallId ?? null, name: e.toolName, arguments: e.input }; case `tool-result`: { let t = e.output, n; return t && (n = t.type === `text` || t.type === `error-text` || t.type === `json` || t.type === `error-json` ? t.value : t.type === `execution-denied` ? { denied: !0, reason: t.reason } : t), { type: `tool_call_response`, id: e.toolCallId ?? null, response: n }; } default: return { type: String(e.type) }; } }) }; if (e.role === `tool`) return { role: `tool`, parts: e.content.map((e) => { if (e.type === `tool-result`) { let t = e.output, n; return t && (n = t.type === `text` || t.type === `error-text` || t.type === `json` || t.type === `error-json` ? t.value : t.type === `execution-denied` ? { denied: !0, reason: t.reason } : t), { type: `tool_call_response`, id: e.toolCallId ?? null, response: n }; } return { type: String(e.type) }; }) }; } } function d$4({ text: e, reasoning: t, toolCalls: n, files: r, finishReason: i }) { let a = []; if (t) for (let e of t) `text` in e && e.text && a.push({ type: `reasoning`, content: e.text }); if (e != null && e.length > 0 && a.push({ type: `text`, content: e }), n) for (let e of n) a.push({ type: `tool_call`, id: e.toolCallId, name: e.toolName, arguments: e.input }); if (r) for (let e of r) a.push({ type: `blob`, modality: s$3(e.mediaType), mime_type: e.mediaType, content: e.base64 }); return [{ role: `assistant`, parts: a, finish_reason: p$5(i) }]; } function f$3({ objectText: e, finishReason: t }) { return [{ role: `assistant`, parts: [{ type: `text`, content: e }], finish_reason: p$5(t) }]; } function p$5(e) { return { stop: `stop`, length: `length`, "content-filter": `content_filter`, "tool-calls": `tool_call`, error: `error`, other: `stop`, unknown: `stop` }[e] ?? e; } function m$3(e, t) { t instanceof Error ? (e.recordException({ name: t.name, message: t.message, stack: t.stack }), e.setStatus({ code: n$4.SpanStatusCode.ERROR, message: t.message })) : e.setStatus({ code: n$4.SpanStatusCode.ERROR }); } function h$3(e) { return typeof e == `string` || typeof e == `number` || typeof e == `boolean`; } function g$3(e) { if (!Array.isArray(e)) return e; let t = new Set(e.filter(h$3).map((e) => typeof e)); if (t.size !== 1) return; let [n] = t; return n === `string` ? e.filter((e) => typeof e == `string`) : n === `number` ? e.filter((e) => typeof e == `number`) : e.filter((e) => typeof e == `boolean`); } function _$2(e) { let t = {}; for (let [n, r] of Object.entries(e ?? {})) { if (r == null) continue; let e = g$3(r); e != null && (t[n] = e); } return t; } function v$3(e) { return e?.isEnabled !== !1; } function y$1(e, t) { if (!v$3(e)) return {}; let n = {}; for (let [r, i] of Object.entries(t)) { if (i == null) continue; if (typeof i == `object` && `input` in i && typeof i.input == `function`) { if (e?.recordInputs === !1) continue; let t = i.input(); if (t != null) { let e = g$3(t); e != null && (n[r] = e); } continue; } if (typeof i == `object` && `output` in i && typeof i.output == `function`) { if (e?.recordOutputs === !1) continue; let t = i.output(); if (t != null) { let e = g$3(t); e != null && (n[r] = e); } continue; } let t = g$3(i); t != null && (n[r] = t); } return n; } var b$3 = { usage: !1, providerMetadata: !1, embedding: !1, reranking: !1, runtimeContext: !1, headers: !1, toolChoice: !1, schema: !1 }; function x$2(e) { return { ...b$3, usage: e.usage ?? !1, providerMetadata: e.providerMetadata ?? !1, embedding: e.embedding ?? !1, reranking: e.reranking ?? !1, runtimeContext: e.runtimeContext ?? !1, headers: e.headers ?? !1, toolChoice: e.toolChoice ?? !1, schema: e.schema ?? !1 }; } function S$2(e) { let t = {}; for (let [n, r] of Object.entries(e ?? {})) C$3(t, `ai.settings.context.${n}`, r); return t; } function C$3(e, t, n) { if (n != null) { if (Array.isArray(n) || typeof n != `object`) { e[t] = n; return; } for (let [r, i] of Object.entries(n)) C$3(e, `${t}.${r}`, i); } } function w$3(e) { return Object.fromEntries(Object.entries(e ?? {}).filter(([, e]) => e != null).map(([e, t]) => [`ai.request.headers.${e}`, t])); } function T$3(e) { return { "ai.usage.inputTokenDetails.noCacheTokens": e.inputTokenDetails?.noCacheTokens, "ai.usage.outputTokenDetails.textTokens": e.outputTokenDetails?.textTokens, "ai.usage.outputTokenDetails.reasoningTokens": e.outputTokenDetails?.reasoningTokens }; } function E$3(e, t, n) { let r = {}; for (let [i, a] of Object.entries(n)) !t[i] || a == null || Object.assign(r, y$1(e, a)); return r; } function D$2(e) { return e == null ? void 0 : e / 1e3; } function O$2(e) { return { "gen_ai.client.operation.duration": D$2(e.responseTimeMs), "gen_ai.client.operation.time_to_first_chunk": D$2(e.timeToFirstOutputMs), "gen_ai.client.operation.time_per_output_chunk": D$2(e.timeBetweenOutputChunksMs?.avg) }; } var k$3 = class { constructor(e = {}) { this.callStates = /* @__PURE__ */ new Map(), this.tracer = e.tracer ?? n$4.trace.getTracer(`gen_ai`), this.supplementalAttributes = x$2(e), this.enrichSpan = e.enrichSpan; } getCallState(e) { return this.callStates.get(e); } cleanupCallState(e) { this.callStates.delete(e); } getSpanAttributes({ attributes: e, spanType: t, operationId: n, callId: r, runtimeContext: i }) { let a; try { a = this.enrichSpan?.call(this, { spanType: t, operationId: n, callId: r, runtimeContext: i }); } catch { a = void 0; } return { ..._$2(a), ...e }; } executeTool({ callId: e, toolCallId: t, execute: r }) { let i = this.getCallState(e)?.toolSpans.get(t); return i == null ? r() : n$4.context.with(i.context, r); } executeLanguageModelCall({ callId: e, execute: t }) { let r = this.getCallState(e), i = r?.inferenceContext ?? r?.stepContext; return i == null ? t() : n$4.context.with(i, t); } onStart(e) { if (e.operationId === `ai.embed` || e.operationId === `ai.embedMany`) { this.onEmbedOperationStart(e); return; } if (e.operationId === `ai.rerank`) { this.onRerankOperationStart(e); return; } if (e.operationId === `ai.generateObject` || e.operationId === `ai.streamObject`) { this.onObjectOperationStart(e); return; } this.onGenerateStart(e); } onGenerateStart(e) { let t = { recordInputs: e.recordInputs, recordOutputs: e.recordOutputs, functionId: e.functionId }, o = { maxOutputTokens: e.maxOutputTokens, temperature: e.temperature, topP: e.topP, topK: e.topK, presencePenalty: e.presencePenalty, frequencyPenalty: e.frequencyPenalty, stopSequences: e.stopSequences, seed: e.seed, maxRetries: e.maxRetries }, s = r$7(e.provider), c = i$5(e.operationId), u = e.runtimeContext, d = E$3(t, this.supplementalAttributes, { runtimeContext: S$2(u), headers: w$3(e.headers) }), f = y$1(t, { "gen_ai.operation.name": c, "gen_ai.provider.name": s, "gen_ai.request.model": e.modelId, "gen_ai.agent.name": t.functionId, "gen_ai.request.frequency_penalty": e.frequencyPenalty, "gen_ai.request.max_tokens": e.maxOutputTokens, "gen_ai.request.presence_penalty": e.presencePenalty, "gen_ai.request.temperature": e.temperature ?? void 0, "gen_ai.request.top_k": e.topK, "gen_ai.request.top_p": e.topP, "gen_ai.request.stop_sequences": e.stopSequences, "gen_ai.request.seed": e.seed, "gen_ai.system_instructions": e.instructions ? { input: () => JSON.stringify(a$4(e.instructions)) } : void 0, "gen_ai.input.messages": { input: () => JSON.stringify(l$3({ prompt: void 0, messages: e.messages })) }, ...d }), p = `${c} ${e.modelId}`, m = this.tracer.startSpan(p, { attributes: this.getSpanAttributes({ attributes: f, spanType: `operation`, operationId: e.operationId, callId: e.callId, runtimeContext: u }), kind: n$4.SpanKind.INTERNAL }), h = n$4.trace.setSpan(n$4.context.active(), m); this.callStates.set(e.callId, { operationId: e.operationId, telemetry: t, rootSpan: m, rootContext: h, stepSpan: void 0, stepContext: void 0, inferenceSpan: void 0, inferenceContext: void 0, embedSpans: /* @__PURE__ */ new Map(), rerankSpan: void 0, toolSpans: /* @__PURE__ */ new Map(), settings: o, provider: e.provider, modelId: e.modelId, runtimeContext: u, baseSupplementalAttributes: d }); } onObjectOperationStart(e) { let t = { recordInputs: e.recordInputs, recordOutputs: e.recordOutputs, functionId: e.functionId }, o = { maxOutputTokens: e.maxOutputTokens, temperature: e.temperature, topP: e.topP, topK: e.topK, presencePenalty: e.presencePenalty, frequencyPenalty: e.frequencyPenalty, seed: e.seed, maxRetries: e.maxRetries }, s = r$7(e.provider), c = i$5(e.operationId), u = E$3(t, this.supplementalAttributes, { headers: w$3(e.headers) }), d = y$1(t, { "gen_ai.operation.name": c, "gen_ai.provider.name": s, "gen_ai.request.model": e.modelId, "gen_ai.agent.name": t.functionId, "gen_ai.output.type": `json`, "gen_ai.request.frequency_penalty": e.frequencyPenalty, "gen_ai.request.max_tokens": e.maxOutputTokens, "gen_ai.request.presence_penalty": e.presencePenalty, "gen_ai.request.temperature": e.temperature ?? void 0, "gen_ai.request.top_k": e.topK, "gen_ai.request.top_p": e.topP, "gen_ai.request.seed": e.seed, "gen_ai.system_instructions": e.system ? { input: () => JSON.stringify(a$4(e.system)) } : void 0, "gen_ai.input.messages": { input: () => JSON.stringify(l$3({ prompt: e.prompt, messages: e.messages })) }, ...u, ...E$3(t, this.supplementalAttributes, { schema: { "ai.schema": e.schema ? { input: () => JSON.stringify(e.schema) } : void 0, "ai.schema.name": e.schemaName, "ai.schema.description": e.schemaDescription, "ai.settings.output": e.output } }) }), f = `${c} ${e.modelId}`, p = this.tracer.startSpan(f, { attributes: this.getSpanAttributes({ attributes: d, spanType: `operation`, operationId: e.operationId, callId: e.callId, runtimeContext: void 0 }), kind: n$4.SpanKind.INTERNAL }), m = n$4.trace.setSpan(n$4.context.active(), p); this.callStates.set(e.callId, { operationId: e.operationId, telemetry: t, rootSpan: p, rootContext: m, stepSpan: void 0, stepContext: void 0, inferenceSpan: void 0, inferenceContext: void 0, embedSpans: /* @__PURE__ */ new Map(), rerankSpan: void 0, toolSpans: /* @__PURE__ */ new Map(), settings: o, provider: e.provider, modelId: e.modelId, runtimeContext: void 0, baseSupplementalAttributes: u }); } onObjectStepStart(e) { let t = this.getCallState(e.callId); if (!t?.rootSpan || !t.rootContext) return; let { telemetry: i } = t, a = y$1(i, { "gen_ai.operation.name": `chat`, "gen_ai.provider.name": r$7(e.provider), "gen_ai.request.model": e.modelId, "gen_ai.output.type": `json`, "gen_ai.request.frequency_penalty": t.settings.frequencyPenalty, "gen_ai.request.max_tokens": t.settings.maxOutputTokens, "gen_ai.request.presence_penalty": t.settings.presencePenalty, "gen_ai.request.temperature": t.settings.temperature ?? void 0, "gen_ai.request.top_k": t.settings.topK, "gen_ai.request.top_p": t.settings.topP, "gen_ai.input.messages": { input: () => e.promptMessages ? JSON.stringify(c$4(e.promptMessages)) : void 0 }, ...t.baseSupplementalAttributes }), o = `chat ${e.modelId}`; t.inferenceSpan = this.tracer.startSpan(o, { attributes: this.getSpanAttributes({ attributes: a, spanType: `languageModel`, operationId: t.operationId, callId: e.callId, runtimeContext: t.runtimeContext }), kind: n$4.SpanKind.CLIENT }, t.rootContext), t.inferenceContext = n$4.trace.setSpan(t.rootContext, t.inferenceSpan); } onObjectStepEnd(e) { let t = this.getCallState(e.callId); if (!t?.inferenceSpan) return; let { telemetry: n } = t; t.inferenceSpan.setAttributes(y$1(n, { "gen_ai.response.finish_reasons": [e.finishReason], "gen_ai.response.id": e.response.id, "gen_ai.response.model": e.response.modelId, "gen_ai.usage.input_tokens": e.usage.inputTokens, "gen_ai.usage.output_tokens": e.usage.outputTokens, "gen_ai.usage.cache_read.input_tokens": e.usage.inputTokenDetails?.cacheReadTokens, "gen_ai.output.messages": { output: () => { try { return JSON.stringify(f$3({ objectText: e.objectText, finishReason: e.finishReason })); } catch { return e.objectText; } } }, ...E$3(n, this.supplementalAttributes, { providerMetadata: { "ai.response.providerMetadata": e.providerMetadata ? JSON.stringify(e.providerMetadata) : void 0 }, usage: T$3(e.usage) }) })), t.inferenceSpan.end(), t.inferenceSpan = void 0, t.inferenceContext = void 0; } onEmbedOperationStart(e) { let t = { recordInputs: e.recordInputs, recordOutputs: e.recordOutputs, functionId: e.functionId }, i = r$7(e.provider), a = E$3(t, this.supplementalAttributes, { headers: w$3(e.headers) }), o = e.value, s = e.operationId === `ai.embedMany`, c = y$1(t, { "gen_ai.operation.name": `embeddings`, "gen_ai.provider.name": i, "gen_ai.request.model": e.modelId, ...a, ...E$3(t, this.supplementalAttributes, { embedding: s ? { "ai.values": { input: () => o.map((e) => JSON.stringify(e)) } } : { "ai.value": { input: () => JSON.stringify(o) } } }) }), l = `embeddings ${e.modelId}`, u = this.tracer.startSpan(l, { attributes: this.getSpanAttributes({ attributes: c, spanType: `operation`, operationId: e.operationId, callId: e.callId, runtimeContext: void 0 }), kind: n$4.SpanKind.CLIENT }), d = n$4.trace.setSpan(n$4.context.active(), u); this.callStates.set(e.callId, { operationId: e.operationId, telemetry: t, rootSpan: u, rootContext: d, stepSpan: void 0, stepContext: void 0, inferenceSpan: void 0, inferenceContext: void 0, embedSpans: /* @__PURE__ */ new Map(), rerankSpan: void 0, toolSpans: /* @__PURE__ */ new Map(), settings: { maxRetries: e.maxRetries }, provider: e.provider, modelId: e.modelId, runtimeContext: void 0, baseSupplementalAttributes: a }); } onStepStart(e) { let t = this.getCallState(e.callId); if (!t?.rootSpan || !t.rootContext) return; let { telemetry: r } = t; t.runtimeContext = e.runtimeContext; let i = y$1(r, { "gen_ai.operation.name": `agent_step`, ...t.baseSupplementalAttributes, ...E$3(r, this.supplementalAttributes, { toolChoice: { "ai.prompt.toolChoice": { input: () => e.stepToolChoice == null ? void 0 : JSON.stringify(e.stepToolChoice) } } }) }); t.stepSpan = this.tracer.startSpan(`step ${e.steps.length + 1}`, { attributes: this.getSpanAttributes({ attributes: i, spanType: `step`, operationId: t.operationId, callId: e.callId, runtimeContext: t.runtimeContext }), kind: n$4.SpanKind.INTERNAL }, t.rootContext), t.stepContext = n$4.trace.setSpan(t.rootContext, t.stepSpan); } onLanguageModelCallStart(e) { let t = this.getCallState(e.callId); if (!t?.stepContext) return; let { telemetry: i } = t, a = y$1(i, { "gen_ai.operation.name": `chat`, "gen_ai.provider.name": r$7(e.provider), "gen_ai.request.model": e.modelId, "gen_ai.request.frequency_penalty": t.settings.frequencyPenalty, "gen_ai.request.max_tokens": t.settings.maxOutputTokens, "gen_ai.request.presence_penalty": t.settings.presencePenalty, "gen_ai.request.stop_sequences": t.settings.stopSequences, "gen_ai.request.temperature": t.settings.temperature ?? void 0, "gen_ai.request.top_k": t.settings.topK, "gen_ai.request.top_p": t.settings.topP, "gen_ai.input.messages": { input: () => { let t = l$3({ prompt: void 0, messages: e.messages }); return t.length > 0 ? JSON.stringify(t) : void 0; } }, "gen_ai.tool.definitions": { input: () => e.tools ? JSON.stringify(e.tools) : void 0 } }); t.inferenceSpan = this.tracer.startSpan(`chat ${e.modelId}`, { attributes: this.getSpanAttributes({ attributes: a, spanType: `languageModel`, operationId: t.operationId, callId: e.callId, runtimeContext: t.runtimeContext }), kind: n$4.SpanKind.CLIENT }, t.stepContext), t.inferenceContext = n$4.trace.setSpan(t.stepContext, t.inferenceSpan); } onLanguageModelCallEnd(e) { let t = this.getCallState(e.callId); if (!t?.inferenceSpan) return; let { telemetry: n } = t; t.inferenceSpan.setAttributes(y$1(n, { ...O$2(e.performance), "gen_ai.response.finish_reasons": [e.finishReason], "gen_ai.response.id": e.responseId, "gen_ai.usage.input_tokens": e.usage.inputTokens, "gen_ai.usage.output_tokens": e.usage.outputTokens, "gen_ai.usage.cache_read.input_tokens": e.usage.inputTokenDetails?.cacheReadTokens, "gen_ai.usage.cache_creation.input_tokens": e.usage.inputTokenDetails?.cacheWriteTokens, "gen_ai.output.messages": { output: () => JSON.stringify(d$4({ text: e.content.filter((e) => e.type === `text`).map((e) => e.text).join(``) || void 0, reasoning: e.content.filter((e) => e.type === `reasoning`), toolCalls: e.content.filter((e) => e.type === `tool-call`), files: e.content.filter((e) => e.type === `file`).map((e) => e.file), finishReason: e.finishReason })) }, ...E$3(n, this.supplementalAttributes, { usage: T$3(e.usage) }) })), t.inferenceSpan.end(), t.inferenceSpan = void 0, t.inferenceContext = void 0; } onToolExecutionStart(e) { let t = this.getCallState(e.callId); if (!t?.stepContext) return; let { telemetry: r } = t, { toolCall: i } = e, a = y$1(r, { "gen_ai.operation.name": `execute_tool`, "gen_ai.tool.name": i.toolName, "gen_ai.tool.call.id": i.toolCallId, "gen_ai.tool.type": `function`, "gen_ai.tool.call.arguments": { input: () => JSON.stringify(i.input) } }), o = `execute_tool ${i.toolName}`, s = this.tracer.startSpan(o, { attributes: this.getSpanAttributes({ attributes: a, spanType: `tool`, operationId: t.operationId, callId: e.callId, runtimeContext: t.runtimeContext }), kind: n$4.SpanKind.INTERNAL }, t.stepContext), c = n$4.trace.setSpan(t.stepContext, s); t.toolSpans.set(i.toolCallId, { span: s, context: c }); } onToolExecutionEnd(e) { let t = this.getCallState(e.callId); if (!t) return; let n = t.toolSpans.get(e.toolCall.toolCallId); if (!n) return; let { span: r } = n, { telemetry: i } = t, { toolOutput: a } = e; if (r.setAttributes(y$1(i, { "gen_ai.execute_tool.duration": D$2(e.toolExecutionMs) })), a.type === `tool-result`) try { r.setAttributes(y$1(i, { "gen_ai.tool.call.result": { output: () => JSON.stringify(a.output) } })); } catch {} else m$3(r, a.error); r.end(), t.toolSpans.delete(e.toolCall.toolCallId); } onStepEnd(e) { let t = this.getCallState(e.callId); if (!t?.stepSpan) return; let { telemetry: n } = t; t.stepSpan.setAttributes(E$3(n, this.supplementalAttributes, { providerMetadata: { "ai.response.providerMetadata": e.providerMetadata ? JSON.stringify(e.providerMetadata) : void 0 }, usage: T$3(e.usage) })), t.stepSpan.end(), t.stepSpan = void 0, t.stepContext = void 0; } onStepFinish(e) { this.onStepEnd(e); } onEnd(e) { let t = this.getCallState(e.callId); if (t?.rootSpan) { if (t.operationId === `ai.embed` || t.operationId === `ai.embedMany`) { this.onEmbedOperationEnd(e); return; } if (t.operationId === `ai.rerank`) { this.onRerankOperationEnd(e); return; } if (t.operationId === `ai.generateObject` || t.operationId === `ai.streamObject`) { this.onObjectOperationEnd(e); return; } this.onGenerateEnd(e); } } onGenerateEnd(e) { let t = this.getCallState(e.callId); if (!t?.rootSpan) return; let { telemetry: n } = t; t.rootSpan.setAttributes(y$1(n, { "gen_ai.response.finish_reasons": [e.finishReason], "gen_ai.usage.input_tokens": e.usage.inputTokens, "gen_ai.usage.output_tokens": e.usage.outputTokens, "gen_ai.usage.cache_read.input_tokens": e.usage.inputTokenDetails?.cacheReadTokens, "gen_ai.usage.cache_creation.input_tokens": e.usage.inputTokenDetails?.cacheWriteTokens, "gen_ai.output.messages": { output: () => JSON.stringify(d$4({ text: e.text ?? void 0, reasoning: e.finalStep.reasoning, toolCalls: e.toolCalls, files: e.files, finishReason: e.finishReason })) }, ...E$3(n, this.supplementalAttributes, { providerMetadata: { "ai.response.providerMetadata": e.finalStep.providerMetadata ? JSON.stringify(e.finalStep.providerMetadata) : void 0 }, usage: T$3(e.usage) }) })), t.rootSpan.end(), this.cleanupCallState(e.callId); } onObjectOperationEnd(e) { let t = this.getCallState(e.callId); if (!t?.rootSpan) return; let { telemetry: n } = t; t.rootSpan.setAttributes(y$1(n, { "gen_ai.response.finish_reasons": [e.finishReason], "gen_ai.usage.input_tokens": e.usage.inputTokens, "gen_ai.usage.output_tokens": e.usage.outputTokens, "gen_ai.usage.cache_read.input_tokens": e.usage.inputTokenDetails?.cacheReadTokens, "gen_ai.output.messages": { output: () => e.object == null ? void 0 : JSON.stringify(f$3({ objectText: JSON.stringify(e.object), finishReason: e.finishReason })) }, ...E$3(n, this.supplementalAttributes, { providerMetadata: { "ai.response.providerMetadata": e.providerMetadata ? JSON.stringify(e.providerMetadata) : void 0 }, usage: T$3(e.usage) }) })), t.rootSpan.end(), this.cleanupCallState(e.callId); } onEmbedOperationEnd(e) { let t = this.getCallState(e.callId); if (!t?.rootSpan) return; let { telemetry: n } = t, r = t.operationId === `ai.embedMany`; t.rootSpan.setAttributes(y$1(n, { "gen_ai.usage.input_tokens": e.usage.tokens, ...E$3(n, this.supplementalAttributes, { embedding: r ? { "ai.embeddings": { output: () => e.embedding.map((e) => JSON.stringify(e)) } } : { "ai.embedding": { output: () => JSON.stringify(e.embedding) } } }) })), t.rootSpan.end(), this.cleanupCallState(e.callId); } onEmbedStart(e) { let t = this.getCallState(e.callId); if (!t?.rootSpan || !t.rootContext) return; let { telemetry: i } = t, a = y$1(i, { "gen_ai.operation.name": `embeddings`, "gen_ai.provider.name": r$7(t.provider), "gen_ai.request.model": t.modelId, ...t.baseSupplementalAttributes, ...E$3(i, this.supplementalAttributes, { embedding: { "ai.values": { input: () => e.values.map((e) => JSON.stringify(e)) } } }) }), o = `embeddings ${t.modelId}`, s = this.tracer.startSpan(o, { attributes: this.getSpanAttributes({ attributes: a, spanType: `embedding`, operationId: t.operationId, callId: e.callId, runtimeContext: t.runtimeContext }), kind: n$4.SpanKind.CLIENT }, t.rootContext), c = n$4.trace.setSpan(t.rootContext, s); t.embedSpans.set(e.embedCallId, { span: s, context: c }); } onEmbedEnd(e) { let t = this.getCallState(e.callId); if (!t) return; let n = t.embedSpans.get(e.embedCallId); if (!n) return; let { span: r } = n, { telemetry: i } = t; r.setAttributes(y$1(i, { "gen_ai.usage.input_tokens": e.usage.tokens, ...E$3(i, this.supplementalAttributes, { embedding: { "ai.embeddings": { output: () => e.embeddings.map((e) => JSON.stringify(e)) } } }) })), r.end(), t.embedSpans.delete(e.embedCallId); } onRerankOperationStart(e) { let t = { recordInputs: e.recordInputs, recordOutputs: e.recordOutputs, functionId: e.functionId }, i = r$7(e.provider), a = E$3(t, this.supplementalAttributes, { headers: w$3(e.headers) }), o = y$1(t, { "gen_ai.operation.name": `rerank`, "gen_ai.provider.name": i, "gen_ai.request.model": e.modelId, ...a, ...E$3(t, this.supplementalAttributes, { reranking: { "ai.documents": { input: () => e.documents.map((e) => JSON.stringify(e)) } } }) }), s = `rerank ${e.modelId}`, c = this.tracer.startSpan(s, { attributes: this.getSpanAttributes({ attributes: o, spanType: `operation`, operationId: e.operationId, callId: e.callId, runtimeContext: void 0 }), kind: n$4.SpanKind.CLIENT }), l = n$4.trace.setSpan(n$4.context.active(), c); this.callStates.set(e.callId, { operationId: e.operationId, telemetry: t, rootSpan: c, rootContext: l, stepSpan: void 0, stepContext: void 0, inferenceSpan: void 0, inferenceContext: void 0, embedSpans: /* @__PURE__ */ new Map(), rerankSpan: void 0, toolSpans: /* @__PURE__ */ new Map(), settings: { maxRetries: e.maxRetries }, provider: e.provider, modelId: e.modelId, runtimeContext: void 0, baseSupplementalAttributes: a }); } onRerankOperationEnd(e) { let t = this.getCallState(e.callId); t?.rootSpan && (t.rootSpan.end(), this.cleanupCallState(e.callId)); } onRerankStart(e) { let t = this.getCallState(e.callId); if (!t?.rootSpan || !t.rootContext) return; let { telemetry: i } = t, a = y$1(i, { "gen_ai.operation.name": `rerank`, "gen_ai.provider.name": r$7(t.provider), "gen_ai.request.model": t.modelId, ...t.baseSupplementalAttributes, ...E$3(i, this.supplementalAttributes, { reranking: { "ai.documents": { input: () => e.documents.map((e) => JSON.stringify(e)) } } }) }), o = `rerank ${t.modelId}`, s = this.tracer.startSpan(o, { attributes: this.getSpanAttributes({ attributes: a, spanType: `reranking`, operationId: t.operationId, callId: e.callId, runtimeContext: t.runtimeContext }), kind: n$4.SpanKind.CLIENT }, t.rootContext); t.rerankSpan = { span: s, context: n$4.trace.setSpan(t.rootContext, s) }; } onRerankEnd(e) { let t = this.getCallState(e.callId); if (!t?.rerankSpan) return; let { span: n } = t.rerankSpan, { telemetry: r } = t; n.setAttributes(E$3(r, this.supplementalAttributes, { reranking: { "ai.ranking.type": e.documentsType, "ai.ranking": { output: () => e.ranking.map((e) => JSON.stringify(e)) } } })), n.end(), t.rerankSpan = void 0; } onAbort(e) { let t = this.getCallState(e.callId); if (t?.rootSpan) { for (let { span: e } of t.toolSpans.values()) e.end(); t.toolSpans.clear(), t.inferenceSpan && (t.inferenceSpan.end(), t.inferenceSpan = void 0, t.inferenceContext = void 0), t.stepSpan && (t.stepSpan.end(), t.stepSpan = void 0, t.stepContext = void 0); for (let { span: e } of t.embedSpans.values()) e.end(); t.embedSpans.clear(), t.rerankSpan &&= (t.rerankSpan.span.end(), void 0), t.rootSpan.end(), this.cleanupCallState(e.callId); } } onError(e) { let t = e; if (!t?.callId) return; let n = this.getCallState(t.callId); if (!n?.rootSpan) return; let r = t.error ?? e; for (let { span: e } of n.toolSpans.values()) m$3(e, r), e.end(); n.toolSpans.clear(), n.inferenceSpan && (m$3(n.inferenceSpan, r), n.inferenceSpan.end(), n.inferenceSpan = void 0, n.inferenceContext = void 0), n.stepSpan && (m$3(n.stepSpan, r), n.stepSpan.end(), n.stepSpan = void 0, n.stepContext = void 0); for (let { span: e } of n.embedSpans.values()) m$3(e, r), e.end(); n.embedSpans.clear(), n.rerankSpan &&= (m$3(n.rerankSpan.span, r), n.rerankSpan.span.end(), void 0), m$3(n.rootSpan, r), n.rootSpan.end(), this.cleanupCallState(t.callId); } }; //#endregion //#region node_modules/eve/dist/src/harness/otel-integration.js let registered = !1; function ensureOtelIntegration() { registered || (registered = !0, registerTelemetry(new k$3({ runtimeContext: !0 }))); } //#endregion //#region node_modules/eve/dist/src/harness/provider-tools.js const UPSTREAM_TOOL_TYPE_TO_FRAMEWORK_NAME = { web_search_20250305: WEB_SEARCH_TOOL_DEFINITION.name }; function resolveFrameworkToolFromUpstreamType(e) { return UPSTREAM_TOOL_TYPE_TO_FRAMEWORK_NAME[e] ?? null; } function resolveWebSearchOutputSchema(e) { switch (e) { case `anthropic`: return WEB_SEARCH_ANTHROPIC_OUTPUT_SCHEMA; case `google`: return WEB_SEARCH_GOOGLE_OUTPUT_SCHEMA; case `openai`: return WEB_SEARCH_OPENAI_OUTPUT_SCHEMA; case `parallel`: return WEB_SEARCH_PARALLEL_OUTPUT_SCHEMA; } } function resolveWebSearchBackend(e) { if (e.source === void 0) return `parallel`; let t = e.id.split(`/`)[0] ?? ``; return t === `openai` || t.startsWith(`openai.`) ? `openai` : t === `anthropic` || t.startsWith(`anthropic.`) ? `anthropic` : t.startsWith(`google.`) ? `google` : null; } async function resolveWebSearchProviderTool(e) { switch (e) { case `openai`: { let { openai: t } = await Promise.resolve().then(() => openai_exports); return attachWebSearchOutputSchema(t.tools.webSearch({}), e); } case `anthropic`: { let { anthropic: t } = await Promise.resolve().then(() => anthropic_exports); return attachWebSearchOutputSchema(t.tools.webSearch_20250305(), e); } case `google`: { let { google: t } = await Promise.resolve().then(() => google_exports); return attachWebSearchOutputSchema(t.tools.googleSearch({}), e); } case `parallel`: { let { gateway: t } = await import("./ai.mjs").then((n) => n.i); return attachWebSearchOutputSchema(t.tools.parallelSearch(), e); } } } function attachWebSearchOutputSchema(t, n) { return { ...t, outputSchema: jsonSchema(resolveWebSearchOutputSchema(n)) }; } //#endregion //#region node_modules/eve/dist/src/harness/step-hooks.js function buildStepHooks(e) { let t = e.session, n = e.emit, r; return { onStepFinish: async (e) => { r(e); }, prepareStep: async ({ messages: r }) => { let a = r; n && e.emitStepStarted !== !1 && await emitStepStarted(n, e.emissionState, r), e.cachePath.kind === `anthropic-direct` && e.marker && (a = applyConversationCacheControl([...r], e.marker)); let o = { messages: a }; return e.cachePath.kind === `gateway-auto` && (o.providerOptions = mergeGatewayAutoCaching(t.agent.modelReference.providerOptions)), o; }, stepResult: new Promise((e) => { r = e; }) }; } async function emitStepActions(r, i, s, c) { let l = new Set(s.toolCalls.filter(isProviderExecutedToolCall).map((e) => e.toolCallId)), u = /* @__PURE__ */ new Set([ ...l, ...extractToolApprovalInputRequests({ content: s.content ?? [] }).map((e) => e.action.callId), ...s.toolCalls.filter(isInvalidToolCall).map((e) => e.toolCallId) ]), isExcluded = (e, t) => u.has(e) || c.excludedActionToolNames.has(t), d = s.toolCalls.filter((e) => !isExcluded(e.toolCallId, e.toolName) && !c.emittedActionCallIds?.has(e.toolCallId)).map((e) => createRuntimeActionRequestFromToolCall({ toolCall: e, tools: c.tools })); d.length > 0 && await r(createActionsRequestedEvent({ actions: d, sequence: i.sequence, stepIndex: i.stepIndex, turnId: i.turnId })); let f = c.handledInlineToolResultCallIds, p = new Map(s.toolResults.map((e) => [e.toolCallId, e.output])); for (let t of reconcileToolResults(s)) { if (isExcluded(t.callId, t.toolName) || f?.has(t.callId)) continue; let n = p.get(t.callId); shouldSkipAuthorizationActionResult(t.callId, n) || await r(createActionResultEvent({ result: t, sequence: i.sequence, stepIndex: i.stepIndex, turnId: i.turnId })); } await r(createStepCompletedEvent({ finishReason: normalizeAssistantStepFinishReason(s.finishReason), sequence: i.sequence, stepIndex: i.stepIndex, turnId: i.turnId, usage: extractStepUsage(s.usage) })); } function isInvalidToolCall(e) { return e.invalid === !0; } function isProviderExecutedToolCall(e) { return e.providerExecuted === !0; } function reconcileToolResults(e) { let t = /* @__PURE__ */ new Map(); for (let n of e.toolResults) n.providerExecuted !== !0 && t.set(n.toolCallId, createRuntimeToolResultFromStepResult(n)); for (let n of extractToolResultParts(e.response.messages)) n.providerExecuted !== !0 && (t.has(n.toolCallId) || t.set(n.toolCallId, createRuntimeToolResultFromMessagePart(n))); return [...t.values()]; } function shouldSkipAuthorizationActionResult(e, t) { if (t !== void 0 && isPendingAuthorizationToolOutput(t)) return !0; let n = contextStorage.getStore(); if (n === void 0) return !1; let i = readToolInterrupt(n, e); return i !== void 0 && isAuthorizationSignal(i); } function extractToolResultParts(e) { let t = []; for (let n of e) if (!(n.role !== `tool` || !Array.isArray(n.content))) for (let e of n.content) e.type === `tool-result` && t.push(e); return t; } function extractStepUsage(e) { if (e === void 0) return; let t = {}; return e.inputTokens !== void 0 && (t.inputTokens = e.inputTokens), e.outputTokens !== void 0 && (t.outputTokens = e.outputTokens), e.inputTokenDetails?.cacheReadTokens !== void 0 && (t.cacheReadTokens = e.inputTokenDetails.cacheReadTokens), e.inputTokenDetails?.cacheWriteTokens !== void 0 && (t.cacheWriteTokens = e.inputTokenDetails.cacheWriteTokens), Object.keys(t).length > 0 ? t : void 0; } //#endregion //#region node_modules/eve/dist/src/harness/tools.js const toolApprovals = /* @__PURE__ */ new WeakMap(); function buildToolSet(e) { let t = {}, n = e.capabilities?.requestInput === !0, i = e.disabledProviderTools; for (let s of e.tools.values()) { if (s.name === ASK_QUESTION_TOOL_NAME && !n || i?.has(s.name)) continue; let c = s.toModelOutput, l = buildApprovalFn(s, e), u = tool({ description: s.description, execute: wrapToolExecute(s), inputSchema: s.inputSchema, outputSchema: s.outputSchema, ...s.execute === void 0 ? c === void 0 ? {} : { toModelOutput: async ({ output: e, toolCallId: t }) => normalizeToolModelOutput({ output: await c(e), toolCallId: t, toolName: s.name }) } : { toModelOutput: async ({ output: e, toolCallId: t }) => isAuthorizationPendingModelOutput(e) ? { type: `text`, value: authorizationPendingModelText(e.connections) } : c === void 0 ? typeof e == `string` ? { type: `text`, value: e } : normalizeToolModelOutput({ output: { type: `json`, value: e ?? null }, toolCallId: t, toolName: s.name }) : normalizeToolModelOutput({ output: await c(e), toolCallId: t, toolName: s.name }) } }); t[s.name] = u, s.approval !== void 0 && toolApprovals.set(u, l); } return t; } function buildToolSetFromDefinitions(e) { let t = /* @__PURE__ */ new Map(); for (let n of e.tools) t.has(n.name) || t.set(n.name, n); return buildToolSet({ approvedTools: e.approvedTools, capabilities: e.capabilities, disabledProviderTools: e.disabledProviderTools, tools: t }); } function wrapToolExecute(e) { let t = e.execute; if (t !== void 0) return async (r, i) => { let a = await t(r); return isAuthorizationSignal(a) ? (stashToolInterrupt(loadContext(), i.toolCallId, a), modelFacingAuthorizationOutput(a)) : normalizeToolJsonOutput({ boundary: `execute`, output: a, toolCallId: i.toolCallId, toolName: e.name }); }; } function normalizeToolJsonOutput(e) { let n = e.output === void 0 ? null : e.output; return withToolOutputSerializationError(e, () => (parseJsonValue(n), n)); } function normalizeToolModelOutput(e) { return withToolOutputSerializationError({ boundary: `toModelOutput`, toolCallId: e.toolCallId, toolName: e.toolName }, () => { if (e.output === null || typeof e.output != `object`) throw TypeError(`Expected a tool model output object.`); let t = e.output; if (t.type === `text`) { if (typeof t.value != `string`) throw TypeError(`Expected text model output to include a string "value".`); return { type: `text`, value: t.value }; } if (t.type === `json`) return { type: `json`, value: normalizeToolJsonOutput({ boundary: `toModelOutput`, output: t.value, toolCallId: e.toolCallId, toolName: e.toolName }) }; throw TypeError(`Expected tool model output type to be "text" or "json".`); }); } async function buildToolSetWithProviderTools(e) { let t = e.disabledProviderTools, n = { ...buildToolSet({ approvedTools: e.approvedTools, capabilities: e.capabilities, disabledProviderTools: t, tools: e.tools }) }; if (!t?.has(WEB_SEARCH_TOOL_DEFINITION.name)) { let t = e.tools.get(WEB_SEARCH_TOOL_DEFINITION.name); if (t !== void 0 && t.execute === void 0) { let t = resolveWebSearchBackend(e.modelReference); t === null ? delete n[WEB_SEARCH_TOOL_DEFINITION.name] : n[WEB_SEARCH_TOOL_DEFINITION.name] = await resolveWebSearchProviderTool(t); } } return n; } function buildApprovalFn(t, n) { return async (r) => { if (t.approval === void 0) return; let a = isObject(r) ? r : void 0, o = await t.approval({ ...buildCallbackContext(), approvedTools: n.approvedTools ?? /* @__PURE__ */ new Set(), toolInput: a, toolName: t.name }); return typeof o == `boolean` ? o ? `user-approval` : `not-applicable` : o; }; } function buildToolApproval(e) { return async ({ toolCall: t }) => { let n = e[t.toolName]; return n === void 0 ? void 0 : await toolApprovals.get(n)?.(t.input); }; } //#endregion //#region node_modules/eve/dist/src/runtime/framework-tools/final-output.js const FINAL_OUTPUT_TOOL_NAME = `final_output`; function buildFinalOutputTool(e) { return { description: `Deliver your final answer in the required structure by calling this tool. Call it exactly once, when you are done; do not answer in prose.`, inputSchema: jsonSchema(e), outputSchema: jsonSchema(e) }; } //#endregion //#region node_modules/eve/dist/src/harness/tool-loop.js const environment = process.env.NODE_ENV ?? `unknown`; const eveVersion = resolveInstalledPackageInfo().version; const log$2 = createLogger(`harness.tool-loop`); function logToolExecutionError(e) { e.toolOutput.type === `tool-error` && logError(log$2, `tool execution failed`, e.toolOutput.error, { toolName: e.toolCall.toolName, toolCallId: e.toolCall.toolCallId }); } function enrichTelemetry(e, t, n) { if (e === void 0) return; let r = {}; for (let e of Object.keys(n ?? {})) r[e] = !0; return { functionId: e.functionId ?? t, includeRuntimeContext: r, isEnabled: !0, recordInputs: e.recordInputs ?? !0, recordOutputs: e.recordOutputs ?? !0 }; } function buildGatewayAttributionHeaders(e, t) { if (typeof e != `string`) return; let n = t?.agentName ?? t?.agentId, r = process.env.VERCEL_PROJECT_PRODUCTION_URL || process.env.VERCEL_URL, i = r ? `https://${r}` : void 0; if (!n && !i) return; let a = {}; return n && (a[`x-title`] = n), i && (a[`http-referer`] = i), a; } const TURN_TRACE_STATE_KEY = `eve.harness.turnTrace`; function getTurnTraceState(e) { return e.state?.[TURN_TRACE_STATE_KEY]; } function setTurnTraceState(e, t) { let n = { traceId: t.traceId, spanId: t.spanId, traceFlags: t.traceFlags }; return { ...e, state: { ...e.state, [TURN_TRACE_STATE_KEY]: n } }; } function resolveStepOtelContext(e, t, n) { if (t) return $$13.setSpan(G$11.active(), t); if (e) { let e = getTurnTraceState(n); if (e) { let t = $$13.wrapSpanContext({ traceId: e.traceId, spanId: e.spanId, traceFlags: e.traceFlags }); return $$13.setSpan(G$11.active(), t); } } } function createToolLoopHarness(t) { let n = t.handleEvent, c = getInstrumentationConfig(); c !== void 0 && ensureOtelIntegration(); let f = c === void 0 ? void 0 : $$13.getTracer(`eve`), p = t.runtimeIdentity?.agentName; async function runStep(e, t) { let n; if (f && hasStepInput(t)) { let t = c?.functionId ?? p, r = { "eve.version": eveVersion, "eve.environment": environment, "eve.session.id": e.sessionId }; t && (r[`ai.telemetry.functionId`] = t), n = f.startSpan(`ai.eve.turn`, { attributes: r }); } let r = resolveStepOtelContext(f, n, e), executeStep = () => executeStepBody(e, t, n); try { return r ? await G$11.with(r, executeStep) : await executeStep(); } finally { n?.end(); } } async function executeStepBody(f, v, y) { let b = f; y && (b = setTurnTraceState(b, y.spanContext())); let x = getHarnessEmissionState(b.state), S = consumeDeferredStepInput({ input: v, session: b }); b = S.session; let D = await resolvePendingRuntimeActions({ emit: n, session: b, stepInput: S.input }); if (D.outcome === `unresolved`) return { next: null, session: D.session }; b = D.session; let O = resolvePendingInput({ history: D.messages, resolveApprovalKey: resolveApprovalKeyFromTools(t.tools), session: b, stepInput: S.input }); if (O.outcome === `unresolved`) return n && O.deferredMessage === !0 && hasStepInput(v) ? (x = await emitTurnPreamble(n, v ?? {}, x, t.runtimeIdentity), x = await emitTurnEpilogue(n, x, t.mode), { next: null, session: setHarnessEmissionState(O.session, x) }) : { next: null, session: O.session }; if (n && O.rejectedActions) for (let e of O.rejectedActions.results) await n(createActionResultEvent({ rejected: !0, result: e, sequence: O.rejectedActions.event.sequence, stepIndex: O.rejectedActions.event.stepIndex, turnId: O.rejectedActions.event.turnId })); n && hasStepInput(v) && (x = await emitTurnPreamble(n, v ?? {}, x, t.runtimeIdentity), b = setHarnessEmissionState(b, x), y && y.setAttribute(`eve.turn.id`, x.turnId)), b = O.session, t.workflow === !0 && (b = ensureWorkflowContinuationSecurity(b)); let k = O.messages; if (S.input?.context !== void 0) for (let e of S.input.context) k.push({ content: e, role: `user` }); if (S.input?.message !== void 0 && !O.deferredMessage && !O.consumedMessage) { let e = await stageAttachmentsToSandbox(S.input.message); k.push({ content: e, role: `user` }); } let A = await t.resolveModel(b.agent.modelReference), j = detectPromptCachePath(A), M = j.kind === `anthropic-direct` ? getAnthropicCacheMarker() : void 0, N = buildGatewayAttributionHeaders(A, t.runtimeIdentity); ({messages: k, session: b} = await maybeCompact({ emit: n, emissionState: x, headers: N, messages: k, model: A, onCompaction: t.onCompaction, resolveModel: t.resolveModel, session: b, telemetry: enrichTelemetry(c, p) ?? void 0 })); let P = getApprovedTools(b), F = contextStorage.getStore(), I = b.outputSchema === void 0 && F !== void 0 && isScheduleAppAuth(F.get(AuthKey)) && F.get(ParentSessionKey) === void 0, L = await hydrateSandboxAttachments(k), R = [], z = []; for (let e of L) e.role === `system` ? R.push(e) : z.push(e); if (F !== void 0) { R.push(...buildDynamicInstructionMessages(F)); let e = F.get(PendingSkillAnnouncementKey); e !== void 0 && e.length > 0 && R.push({ role: `system`, content: e }); } I && R.push({ role: `system`, content: CONDITIONAL_DELIVERY_INSTRUCTION }); let B = z, prepareModelCallInput = (e) => { let t = e ? [{ role: `system`, content: e }] : [], n = b.agent.system ? [{ role: `system`, content: b.agent.system }] : [], r = R.length > 0 || t.length > 0 ? [ ...t, ...n, ...R ] : void 0, i = r !== void 0 && M ? applySystemCacheBreakpoint(r, M) : r ?? b.agent.system ?? void 0; return { instructions: i, telemetryRuntimeContext: buildTelemetryRuntimeContext({ eveVersion, authored: c, emissionState: x, environment, modelInput: { instructions: i, messages: B }, session: b }) }; }, runOneModelCall = async (e) => { let { instructions: i, telemetryRuntimeContext: a = {} } = e.preparedInput ?? prepareModelCallInput(e.extraSystemNote); e.retryReason && (a[`eve.retry.reason`] = e.retryReason); let o = e.trailingUserNote ? [...B, { role: `user`, content: e.trailingUserNote }] : B, s = await buildToolSetWithProviderTools({ approvedTools: P, capabilities: t.capabilities, disabledProviderTools: e.disabledProviderTools, modelReference: b.agent.modelReference, tools: t.tools }); if (F !== void 0) { let n = buildDynamicTools(F), r = buildToolSetFromDefinitions({ approvedTools: P, capabilities: t.capabilities, disabledProviderTools: e.disabledProviderTools, tools: n }); for (let [e, t] of Object.entries(r)) s[e] = t; } b.outputSchema !== void 0 && (s[FINAL_OUTPUT_TOOL_NAME] = buildFinalOutputTool(b.outputSchema)); let u = t.workflow === !0 ? (await applyWorkflowTool({ continuationSecurity: getWorkflowContinuationSecurity(b), harnessTools: t.tools, lifecycle: n === void 0 ? void 0 : createWorkflowLifecycle({ emit: n, emissionState: x, tools: t.tools }), tools: s })).modelTools : s, d = M ? applyLastToolCacheBreakpoint(u, M) : u, f = buildStepHooks({ cachePath: j, emit: n, emissionState: x, emitStepStarted: e.suppressStepStartedEmission !== !0, marker: M, session: b }), h = new ToolLoopAgent({ headers: N, instructions: i, model: A, onToolExecutionEnd: logToolExecutionError, onError(e) { summarizeKnownModelCallConfigError(e.error) === null && logError(log$2, `tool-loop stream error`, e.error); }, onStepFinish: f.onStepFinish, prepareStep: f.prepareStep, reasoning: b.agent.reasoning, runtimeContext: a, stopWhen: isStepCount(1), telemetry: enrichTelemetry(c, p, a), toolApproval: buildToolApproval(u), tools: d }), executeModelCall = async () => { if (n) { let e = /* @__PURE__ */ new Set([ASK_QUESTION_TOOL_NAME, FINAL_OUTPUT_TOOL_NAME]), r = await h.stream({ messages: o }), { emittedActionCallIds: i, handledInlineToolResultCallIds: a, inlineAuthorizationResults: s, inlineToolResultParts: c } = await emitStreamContent(n, x, r.fullStream, { excludedActionToolNames: e, tools: t.tools }), u = await f.stepResult; if (isEmptyModelResponse(u) && c.length === 0 && s.length === 0) throw new EmptyModelResponseError(); if (await emitStepActions(n, x, u, { emittedActionCallIds: i, excludedActionToolNames: e, handledInlineToolResultCallIds: a, tools: t.tools }), c.length > 0 || s.length > 0) { let e = u.toolResults, t = new Map(e.map((e) => [e.toolCallId, e])); for (let e of s) t.set(e.toolCallId, e); return { content: u.content, finishReason: u.finishReason, response: { ...u.response, ...c.length > 0 ? { messages: [{ role: `tool`, content: [...c] }, ...u.response.messages] } : {} }, text: u.text, toolCalls: u.toolCalls, toolResults: [...t.values()], usage: u.usage }; } return u; } await h.generate({ messages: o }); let e = await f.stepResult; if (isEmptyModelResponse(e)) throw new EmptyModelResponseError(); return e; }; return runModelCallWithRetries(() => executeModelCall().catch(rethrowNoOutputAsEmptyResponse), { sessionId: b.sessionId, turnId: x.turnId }); }, V = prepareModelCallInput(); n && await emitStepStarted(n, x, k); let H = await continuePendingWorkflowInterrupt({ childResults: S.input?.runtimeActionResults, config: t, emit: n, emissionState: x, runStep, session: b }); if (H !== null) return H; let U; try { U = await runOneModelCall({ preparedInput: V, suppressStepStartedEmission: !0 }); } catch (r) { let a = await runModelCallRecoveryPipeline({ error: r, stages: [(e) => attemptUnsupportedProviderToolRecovery({ error: e.error, runOneModelCall, sessionId: b.sessionId, turnId: x.turnId }), (e) => attemptEmptyResponseRecovery({ emptyDeliveryEnabled: I, error: e.error, retryCallOptions: e.retryCallOptions, runOneModelCall, sessionId: b.sessionId, turnId: x.turnId })] }); if (a.outcome === `recovered`) U = a.result; else { let r = a.error; if (y && recordErrorOnSpan(y, r), !n) throw r; let o = extractWorkflowStreamWriteErrorDetails(r); if (o !== null) { let t = createErrorId(); return log$2.error(`workflow stream write failed — parking session for retry by the user`, { ...o, errorId: t, error: r, sessionId: b.sessionId, turnId: x.turnId }), x = await emitRecoverableFailedTurn(n, x, { code: `WORKFLOW_STREAM_WRITE_FAILED`, details: { ...o, errorId: t }, message: toErrorMessage(r) }), { next: null, session: setHarnessEmissionState(b, x) }; } let s = classifyModelCallError(r), c = createErrorId(), l = s === `terminal` ? summarizeKnownModelCallConfigError(r) : null, f = l === null ? summarizeKnownModelCallRequestError(r) : null, p = l?.message ?? f?.message ?? toErrorMessage(r), _ = extractModelCallErrorDetails(r), v = buildModelCallFailureDetails({ configSummary: l, error: r, errorId: c, modelCallDetails: _, requestSummary: f }), S = buildModelCallFailureLogFields({ error: r, errorId: c, modelCallDetails: _, requestSummary: f, sessionId: b.sessionId, turnId: x.turnId }); return s === `terminal` ? (l === null ? log$2.error(f?.message ?? `model call failed terminally`, S) : log$2.error(`${l.name}: ${l.message}`, { errorId: c, sessionId: b.sessionId, turnId: x.turnId }), await emitFailedStep(n, x, { code: `MODEL_CALL_FAILED`, details: v, message: p, sessionId: b.sessionId }), { next: { done: !0, output: `` }, session: b }) : t.mode === `task` ? (log$2.error(f?.message ?? `model call failed; failing the task run`, S), await emitFailedStep(n, x, { code: `MODEL_CALL_FAILED`, details: v, message: p, sessionId: b.sessionId }), { next: { done: !0, isError: !0, output: p }, session: b }) : (log$2.error(f?.message ?? `model call failed — parking session for retry by the user`, S), x = await emitRecoverableFailedTurn(n, x, { code: `MODEL_CALL_FAILED`, details: v, message: p }), { next: null, session: setHarnessEmissionState(b, x) }); } } let W = accumulateTurnUsage({ previous: getTurnUsageState(b.state), turnId: x.turnId, usage: U.usage ?? {} }); b = setTurnUsageState(b, W); let G; try { G = formatLanguageModelGatewayId(A); } catch { G = void 0; } return await setEveAttributes({ "$eve.model": G, "$eve.input_tokens": W.inputTokens, "$eve.output_tokens": W.outputTokens, "$eve.cache_read_tokens": W.cacheReadTokens, "$eve.cache_write_tokens": W.cacheWriteTokens, "$eve.tool_count": t.tools.size }), handleStepResult({ config: t, emit: n, emissionState: x, promptMessages: k, result: U, runStep, session: b }); } return runStep; } function buildModelCallFailureDetails(e) { let { configSummary: t, error: r, errorId: i, modelCallDetails: a, requestSummary: o } = e; return t === null ? o === null ? { ...formatError(r, i), ...a } : { errorId: i, message: toErrorMessage(r), name: o.name, ...a } : { errorId: i, message: t.message, name: t.name, ...a }; } function buildModelCallFailureLogFields(e) { let t = { errorId: e.errorId, sessionId: e.sessionId, turnId: e.turnId }; return e.requestSummary === null ? { ...t, error: e.error } : { ...t, details: e.modelCallDetails }; } async function runModelCallRecoveryPipeline(e) { let t = e.error, n; for (let r of e.stages) { let e = await r({ error: t, retryCallOptions: n }); if (e.outcome === `recovered`) return e; e.outcome === `failed` && (t = e.error, n = e.retryCallOptions); } return { outcome: `failed`, error: t }; } async function attemptUnsupportedProviderToolRecovery(e) { let t = extractUnsupportedProviderToolTypes(e.error); if (t.length === 0) return { outcome: `skipped` }; let n = []; for (let e of t) { let t = resolveFrameworkToolFromUpstreamType(e); t !== null && !n.includes(t) && n.push(t); } if (n.length === 0) return { outcome: `skipped` }; log$2.warn(`disabling unsupported provider tool(s); retrying step once`, { disabled: n, sessionId: e.sessionId, turnId: e.turnId, upstreamTypes: t }); let r = { disabledProviderTools: new Set(n), extraSystemNote: buildDisabledToolNote(n) }; try { return { outcome: `recovered`, result: await e.runOneModelCall({ ...r, suppressStepStartedEmission: !0 }) }; } catch (e) { return { outcome: `failed`, error: e, retryCallOptions: r }; } } function buildDisabledToolNote(e) { let t = e.join(`, `); return `The following ${e.length === 1 ? `tool is` : `tools are`} not available with the current model and has been removed: ${t}. Proceed using the remaining tools or your training knowledge.`; } function isEmptyModelResponse(e) { return e.toolCalls.length === 0 && e.toolResults.length === 0 && resolveAssistantStepText(e.response.messages, e.text) === null; } function rethrowNoOutputAsEmptyResponse(e) { throw isNoOutputGeneratedError(e) ? new EmptyModelResponseError({ cause: e }) : e; } const EMPTY_RESPONSE_NUDGE = `Your previous reply was empty and was not delivered. Answer now from the tool results above; do not re-run tools or mention this notice.`; function buildEmptyResponseNudge(e) { return e ? `${EMPTY_RESPONSE_NUDGE} If the current task explicitly requires conditional delivery and there is nothing to report, reply with exactly ${EMPTY_DELIVERY_SENTINEL}.` : EMPTY_RESPONSE_NUDGE; } async function attemptEmptyResponseRecovery(e) { if (!(e.error instanceof EmptyModelResponseError)) return { outcome: `skipped` }; log$2.warn(`empty model response; reissuing the model call once`, { sessionId: e.sessionId, turnId: e.turnId }); try { return { outcome: `recovered`, result: await e.runOneModelCall({ ...e.retryCallOptions, retryReason: `empty-response`, suppressStepStartedEmission: !0, trailingUserNote: buildEmptyResponseNudge(e.emptyDeliveryEnabled) }) }; } catch (t) { return { outcome: `failed`, error: t, retryCallOptions: e.retryCallOptions }; } } async function handleStepResult(e) { let { config: t, emit: n, promptMessages: r, result: i, runStep: a } = e, { emissionState: o, session: s } = e, c = resolveAssistantStepText(i.response.messages, i.text), l = i.finishReason !== `tool-calls` && i.toolCalls.length === 0 && hasEmptyDeliverySentinel(c), u = l ? [] : i.response.messages, d = l ? null : c, f = /* @__PURE__ */ new Set(); for (let e of [...i.content ?? [], ...i.toolResults ?? []]) (e.type === `tool-result` || e.type === `tool-error`) && e.providerExecuted === !0 && f.add(e.toolCallId); let p = normalizeProviderToolHistory({ messages: u, providerExecutedOutcomeIds: f }), m = p.messages, h = { ...s, compaction: createNextCompactionConfig(s.compaction, r, i) }; if (t.workflow === !0) { let e = await getWorkflowSandboxInterrupt(i, getWorkflowContinuationSecurity(h)); if (e !== void 0) { if (!isWorkflowRuntimeActionInterrupt(e)) throw Error(`Unsupported Workflow interrupt kind "${e.payload.kind}".`); return parkOnWorkflowInterrupt({ baseSession: h, emissionState: o, interrupt: e, promptMessages: r, responseMessages: m }); } } let g = extractToolApprovalInputRequests({ content: i.content ?? [] }), _ = new Set(g.map((e) => e.action.callId)), y = extractQuestionInputRequests({ toolCalls: i.toolCalls, excludedCallIds: _ }), b = [...g, ...y], S = (i.toolCalls ?? []).filter((e) => !isInvalidToolCall(e)).filter((e) => t.tools.get(e.toolName)?.runtimeAction !== void 0).map((e) => createRuntimeActionRequestFromToolCall({ toolCall: e, tools: t.tools })); if (S.length > 0) return { next: null, session: setHarnessEmissionState(setPendingRuntimeActionBatch({ actions: S, event: { sequence: o.sequence, stepIndex: o.stepIndex, turnId: o.turnId }, responseMessages: m, session: { ...h, history: [...r] } }), o) }; if (b.length > 0) { let e = setPendingInputBatch({ event: { sequence: o.sequence, stepIndex: o.stepIndex, turnId: o.turnId }, requests: b, responseMessages: m, session: { ...h, history: [...r] } }); return n && (await n(createInputRequestedEvent({ requests: b, sequence: o.sequence, stepIndex: o.stepIndex, turnId: o.turnId })), t.mode === `conversation` && (o = await emitTurnEpilogue(n, o, t.mode), e = setHarnessEmissionState(e, o))), { next: null, session: e }; } let C = findAuthorizationSignalFromToolResults(i.toolResults); if (C) { let { challenges: e } = C; if (n) for (let t of e) await n(createAuthorizationRequiredEvent({ authorization: t.challenge, name: t.name, description: t.challenge.instructions ?? `Authorization required for ${t.name}`, webhookUrl: t.hookUrl, sequence: o.sequence, stepIndex: o.stepIndex, turnId: o.turnId })); return { next: null, session: setHarnessEmissionState({ ...h, history: [...r], state: setPendingAuthorization(h.state, { challenges: e }) }, o) }; } let w = m, T = [...r, ...w], E = { ...h, history: T }; return !(E.outputSchema !== void 0 && extractFinalOutput(i) !== void 0) && (w.at(-1)?.role === `tool` || p.outcomeEndsResponse || hasDeferredStepInput(E)) ? (n && (o = advanceStep(o), E = setHarnessEmissionState(E, o)), { next: a, session: E }) : t.mode === `task` ? finishTaskTurn({ emissionState: o, emit: n, history: r, result: i, schema: E.outputSchema, session: E, stepOutput: d }) : finishConversationTurn({ emissionState: o, emit: n, history: r, result: i, schema: E.outputSchema, session: E }); } const OUTPUT_SCHEMA_NOT_FULFILLED = { code: `OUTPUT_SCHEMA_NOT_FULFILLED`, message: `The agent could not produce a result matching the requested schema.` }; function extractFinalOutput(e) { return (e.toolCalls ?? []).find((e) => e.toolName === FINAL_OUTPUT_TOOL_NAME)?.input; } function persistStructuredAssistantTurn(e, t, n) { return { ...e, history: [...t, { content: JSON.stringify(n), role: `assistant` }], outputSchema: void 0 }; } async function emitStructuredResult(e, t, n, r) { return await e(createResultCompletedEvent({ result: n, sequence: t.sequence, stepIndex: t.stepIndex, turnId: t.turnId })), emitTurnEpilogue(e, t, r); } async function finishTaskTurn(e) { let { emit: t, history: n, result: r, schema: i, stepOutput: a } = e, { emissionState: o, session: s } = e; if (i === void 0) return t && (o = await emitTurnEpilogue(t, o, `task`), s = setHarnessEmissionState(s, o)), { next: { done: !0, output: a ?? `` }, session: s }; let c = extractFinalOutput(r); return c === void 0 ? (t && await emitFailedStep(t, o, { ...OUTPUT_SCHEMA_NOT_FULFILLED, sessionId: s.sessionId }), { next: { done: !0, isError: !0, output: OUTPUT_SCHEMA_NOT_FULFILLED.message }, session: s }) : (s = persistStructuredAssistantTurn(s, n, c), t && (o = await emitStructuredResult(t, o, c, `task`), s = setHarnessEmissionState(s, o)), { next: { done: !0, output: c }, session: s }); } async function finishConversationTurn(e) { let { emit: t, history: n, result: r, schema: i } = e, { emissionState: a, session: o } = e; if (i === void 0) return t && (a = await emitTurnEpilogue(t, a, `conversation`), o = setHarnessEmissionState(o, a)), { next: null, session: o }; let s = extractFinalOutput(r); return s === void 0 ? (t && (a = await emitRecoverableFailedTurn(t, a, OUTPUT_SCHEMA_NOT_FULFILLED), o = setHarnessEmissionState(o, a)), { next: null, session: o }) : (o = persistStructuredAssistantTurn(o, n, s), t && (a = await emitStructuredResult(t, a, s, `conversation`), o = setHarnessEmissionState(o, a)), { next: null, session: o }); } async function continuePendingWorkflowInterrupt(e) { let t = getPendingWorkflowInterrupt(e.session.state); if (t === void 0) return null; let n = t.interrupt; if (!isWorkflowRuntimeActionInterrupt(n)) throw Error(`Unsupported Workflow interrupt kind "${n.payload.kind}".`); let i = e.emit === void 0 ? void 0 : createWorkflowLifecycle({ emit: e.emit, emissionState: e.emissionState, skipReplayed: !0, tools: e.config.tools }), a = getWorkflowContinuationSecurity(e.session), o; try { let t = buildWorkflowHostTools({ tools: e.config.tools }), r = e.childResults ?? [], s = n, c = 0; for (;;) { o = await continueWorkflowSandboxInterrupt({ continuationSecurity: a, interrupt: s, lifecycle: i, resolution: r[c]?.output, tools: t }); let e = await unwrapWorkflowSandboxResult(o, a); if (e.status !== `interrupted` || !isWorkflowRuntimeActionInterrupt(e.interrupt) || c + 1 >= r.length) break; let n = getWorkflowRuntimeActionInterrupts(e.interrupt)[0]; if (n === void 0) throw Error(`Workflow continuation contains no pending runtime-action interrupt.`); c++, s = n; } } catch (e) { logError(log$2, `Workflow interrupt continuation failed`, e), o = { error: `workflow_continuation_failed`, message: toErrorMessage(e), retryable: !1 }; } let s = await unwrapWorkflowSandboxResult(o, a), c = s.status === `interrupted` ? s.interrupt : s.output, l = replaceWorkflowToolResult([...e.session.history, ...t.responseMessages], n.outerToolCallId, c), u = clearPendingWorkflowInterrupt({ ...e.session, history: l }); if (s.status === `interrupted`) { if (!isWorkflowRuntimeActionInterrupt(s.interrupt)) throw Error(`Unsupported Workflow interrupt kind "${s.interrupt.payload.kind}".`); let t = e.session.history.length, n = l.slice(0, t), r = l.slice(t); return u = { ...u, history: n }, parkOnWorkflowInterrupt({ baseSession: u, emissionState: e.emissionState, interrupt: s.interrupt, promptMessages: n, responseMessages: r }); } return { next: e.runStep, session: u }; } function replaceWorkflowToolResult(e, t, n) { if (t === void 0) return [...e]; let r = typeof n == `string` ? { type: `text`, value: n } : { type: `json`, value: n }; return e.map((e) => { if (e.role !== `tool`) return e; let n = e.content.map((e) => e.type !== `tool-result` || e.toolCallId !== t ? e : { ...e, output: r }); return { ...e, content: n }; }); } function parkOnWorkflowInterrupt(e) { let t = getWorkflowRuntimeActionInterrupts(e.interrupt)[0]; if (t === void 0) throw Error(`Workflow continuation contains no pending runtime-action interrupt.`); let n = { ...e.baseSession, history: [...e.promptMessages] }; return { next: null, session: setHarnessEmissionState(setPendingWorkflowInterrupt({ interrupt: t, responseMessages: e.responseMessages, session: n }), e.emissionState) }; } function createNextCompactionConfig(e, t, n) { let r = { recentWindowSize: e.recentWindowSize, threshold: e.threshold }; return n.usage?.inputTokens !== void 0 && (r.lastKnownInputTokens = n.usage.inputTokens, r.lastKnownPromptMessageCount = t.length), r; } async function maybeCompact(e) { let { emit: t, emissionState: n } = e, r = e.messages, i = e.session; if (!shouldCompact(r, i.compaction)) return { messages: r, session: i }; let a = await resolveCompactionModel({ compactionModelReference: i.agent.compactionModelReference, model: e.model, modelReference: i.agent.modelReference, resolveModel: e.resolveModel }); if (t && await t(createCompactionRequestedEvent({ modelId: formatLanguageModelGatewayId(a.model), sequence: n.sequence, sessionId: i.sessionId, turnId: n.turnId, usageInputTokens: getInputTokenCount(r, i.compaction) })), r = await compactMessages(r, a.model, i.compaction, a.providerOptions, e.telemetry, e.headers), e.onCompaction) for (let t of e.onCompaction()) r.push(t); return t && await t(createCompactionCompletedEvent({ modelId: formatLanguageModelGatewayId(a.model), sequence: n.sequence, sessionId: i.sessionId, turnId: n.turnId })), { messages: r, session: i }; } function resolveApprovalKeyFromTools(e) { return (t) => { let n = e.get(t.action.toolName); if (n?.approvalKey !== void 0) return n.approvalKey(t.action.input); }; } async function runModelCallWithRetries(e, t) { for (let n = 1;; n++) try { return await e(); } catch (e) { if (n === 3 || classifyModelCallError(e) !== `retry`) throw e; let r = 500 * 2 ** (n - 1) + Math.floor(Math.random() * 250); log$2.warn(`model call failed transiently — retrying`, { attempt: n, delayMs: r, sessionId: t.sessionId, turnId: t.turnId, error: e }), await new Promise((e) => setTimeout(e, r)); } } function findAuthorizationSignalFromToolResults(e) { let t = contextStorage.getStore(); if (t !== void 0) for (let n of e ?? []) { let e = readToolInterrupt(t, n.toolCallId); if (e !== void 0 && isAuthorizationSignal(e)) return e; } for (let t of e ?? []) if (isAuthorizationSignal(t.output)) return t.output; } //#endregion //#region node_modules/eve/dist/src/runtime/agent/bootstrap-model-utils.js const BOOTSTRAP_RESPONSE_TIMESTAMP = /* @__PURE__ */ new Date(`2026-03-16T00:00:00.000Z`); function createBootstrapGenerateResult(t) { return { content: [{ text: t.text, type: `text` }], finishReason: { raw: void 0, unified: `stop` }, response: { id: `bootstrap-response`, modelId: t.modelId, timestamp: BOOTSTRAP_RESPONSE_TIMESTAMP }, usage: { inputTokens: { cacheRead: 0, cacheWrite: 0, noCache: t.inputTokens, total: t.inputTokens }, outputTokens: { reasoning: 0, text: t.outputTokens, total: t.outputTokens } }, warnings: [] }; } function createBootstrapStreamResult(e) { let t = [{ type: `stream-start`, warnings: e.warnings }]; e.response !== void 0 && t.push({ ...e.response, type: `response-metadata` }); let n = 0; for (let r of e.content) switch (r.type) { case `text`: { let e = `text_${n}`; n += 1, t.push({ id: e, type: `text-start` }), r.text.length > 0 && t.push({ delta: r.text, id: e, type: `text-delta` }), t.push({ id: e, type: `text-end` }); break; } case `tool-call`: t.push(r); break; default: break; } return t.push({ finishReason: e.finishReason, type: `finish`, usage: e.usage }), { stream: new ReadableStream({ start(e) { for (let n of t) e.enqueue(n); e.close(); } }) }; } function estimateTokenCount(e) { return Math.max(1, Math.ceil(e.trim().length / 4)); } function getPromptContentText(e) { return typeof e == `string` ? e : e.flatMap((e) => { if (typeof e == `string`) return [e]; switch (e.type) { case `text`: return [e.text]; default: return []; } }).join(``); } function getLastUserPromptText(e) { for (let t of [...e].reverse()) { if (t.role !== `user`) continue; let e = getPromptContentText(t.content).trim(); if (e.length > 0) return e; } return null; } function getPromptText(e) { return e.map((e) => getPromptContentText(e.content)).join(` `); } //#endregion //#region node_modules/eve/dist/src/runtime/agent/bootstrap-model.js const bootstrapRuntimeModels = /* @__PURE__ */ new Map(); function resolveBootstrapRuntimeModel(n) { if (n.id !== BOOTSTRAP_RUNTIME_MODEL_ID) return null; let i = bootstrapRuntimeModels.get(n.id); if (i !== void 0) return i; let a = new MockLanguageModelV3({ doGenerate: async (e) => createBootstrapModelResult(e.prompt, n.id), doStream: async (e) => createBootstrapStreamResult(createBootstrapModelResult(e.prompt, n.id)), modelId: n.id, provider: `eve-bootstrap` }); return bootstrapRuntimeModels.set(n.id, a), a; } function createBootstrapModelResult(e, t) { let r = `Bootstrap reply: ${getLastUserPromptText(e) ?? `Hello from eve`}`; return createBootstrapGenerateResult({ inputTokens: estimateTokenCount(getPromptText(e)), modelId: t, outputTokens: estimateTokenCount(r), text: r }); } //#endregion //#region node_modules/eve/dist/src/runtime/agent/mock-model-fixtures.js function createMockAuthoredToolInput(e, t, n) { let r = getToolInputPropertyNames(e.inputSchema); if (e.name === `ask_question` || hasProperties(r, [`prompt`, `options`])) return createAskQuestionInput(t); if (r.includes(`command`)) return { command: resolveShellCommand(t) }; if (r.includes(`topic`) || /\btopic\b/u.test(normalizeText$2(t))) return { topic: resolveLookupTopic(t) }; let i = extractAnchoredInputs(r, t); return Object.keys(i).length > 0 ? i : r.length === 1 && r[0] === `message` ? { message: t } : { city: n }; } function extractAnchoredInputs(e, t) { let n = {}; for (let r of e) { let e = RegExp(`\\b${escapeRegExp(r)}\\b\\s*(?:to|=|:)?\\s*(?:\`([^\`]+)\`|"([^"]+)"|'([^']+)')`, `iu`).exec(t), i = e?.[1] ?? e?.[2] ?? e?.[3]; i !== void 0 && (n[r] = i.trim()); } return n; } function escapeRegExp(e) { return e.replace(/[$()*+.?[\\\]^{|}]/gu, String.raw`\$&`); } function resolveMockFixtureToken(e) { let n = e.filter((e) => e.role === `system`).map((e) => getPromptContentText(e.content)).join(` `), r = [ ...getLoadedSkillResultTexts(e), n, getTrailingUserText(e) ]; for (let e of r) { let t = resolveExactFixtureReply(e); if (t !== null) return t; } return null; } function resolveWeatherCity(e) { let t = /"city"\s*:\s*"([^"]+)"/u.exec(e); return t?.[1] ? t[1].trim() : (/\b(?:in|for)\s+([A-Za-z][A-Za-z\s.-]*?)(?:[?.!,]|$)/u.exec(e) ?? /\b([A-Z][a-z]+(?:\s+[A-Z][a-z]+)*)\b/u.exec(e))?.[1]?.trim() || `Brooklyn`; } function formatToolOutput(e) { if (typeof e == `string`) return e; try { return JSON.stringify(e); } catch { return String(e); } } function getTrailingUserText(e) { let n = []; for (let r of [...e].reverse()) if (r.role !== `system`) { if (r.role !== `user`) break; n.unshift(getPromptContentText(r.content)); } return n.join(` `); } function getLoadedSkillResultTexts(t) { return t.flatMap((t) => t.role !== `tool` && t.role !== `assistant` ? [] : (typeof t.content == `string` ? [t.content] : t.content).flatMap((t) => typeof t == `string` || t.type !== `tool-result` || t.toolName !== LOAD_SKILL_TOOL_NAME || t.output.type === `execution-denied` ? [] : [formatToolOutput(t.output.value)])); } function resolveExactFixtureReply(e) { let t = matchExactValue(/\breply\s+with\s+the\s+exact\s+string\s+(`([^`]+)`|"([^"]+)"|'([^']+)'|([^\s.]+))\s+and\s+nothing\s+else\b/iu, e); if (t !== null) return t; let n = e.split(/\r?\n/u); for (let e = 0; e < n.length; e += 1) { let t = n[e]?.trim() ?? ``, r = /\breply\s+with\s+exactly(?:\s+the\s+following\s+text\s+and\s+nothing\s+else)?:\s*(.+)$/iu.exec(t); if (r?.[1]) return cleanExactValue(r[1]); if (/\breply\s+with\s+exactly\s+the\s+following\s+text\s+and\s+nothing\s+else:\s*$/iu.test(t) || /\breply\s+with\s+exactly:\s*$/iu.test(t)) { let t = n.slice(e + 1).map((e) => e.trim()).find((e) => e.length > 0); if (t !== void 0) return cleanExactValue(t); } } return matchExactValue(/\binclude\s+the\s+exact\s+token\s+(`([^`]+)`|"([^"]+)"|'([^']+)'|([^\s.]+))\s+verbatim\b/iu, e); } function matchExactValue(e, t) { let n = e.exec(t); return n === null ? null : cleanExactValue(n[2] ?? n[3] ?? n[4] ?? n[5] ?? n[1] ?? ``); } function cleanExactValue(e) { return e.trim(); } function getToolInputPropertyNames(e) { return !isRecord$2(e) || !isRecord$2(e.properties) ? [] : Object.keys(e.properties); } function hasProperties(e, t) { return t.every((t) => e.includes(t)); } function createAskQuestionInput(e) { let t = parseInputOptions(e), n = { prompt: resolveQuestionPrompt(e) }; return t.length > 0 && (n.options = t), /\ballow\s*freeform\s+(?:to\s+)?true\b|\ballowfreeform\s+(?:to\s+)?true\b/iu.test(e) && (n.allowFreeform = !0), n; } function parseInputOptions(e) { return [...e.matchAll(/\bid\b\s*:?\s*"([^"]+)"\s*,\s*label\b\s*:?\s*"([^"]+)"/giu)].map((e) => ({ id: e[1] ?? ``, label: e[2] ?? `` })); } function resolveQuestionPrompt(e) { let t = /\b(?:set\s+)?prompt\s+to:\s*'([^']+)'/iu.exec(e) ?? /\b(?:set\s+)?prompt\s+to:\s*"([^"]+)"/iu.exec(e); return t?.[1] ? t[1].trim() : /\bask(?:\s+me)?\s+(?:to\s+)?(.+?)(?:\.|$)/iu.exec(e)?.[1]?.trim() || `Please choose an option.`; } function resolveShellCommand(e) { let t = /`([^`]+)`/u.exec(e); return t?.[1] ? t[1].trim() : (/\b(?:run|command)\s+["']([^"']+)["']/iu.exec(e) ?? /\bcommand\s+(.+?)(?:\.|$)/iu.exec(e))?.[1]?.trim() || `pwd`; } function resolveLookupTopic(e) { return /\btopic\s+['"]?([A-Za-z0-9_.-]+)['"]?/u.exec(e)?.[1] ?? `demo`; } function normalizeText$2(e) { return e.toLowerCase().replace(/[^a-z0-9]+/gu, ` `).trim(); } function isRecord$2(e) { return typeof e == `object` && !!e && !Array.isArray(e); } //#endregion //#region node_modules/eve/dist/src/runtime/agent/mock-model-skill-selection.js function getAvailableSkills(t) { let n = /* @__PURE__ */ new Map(); for (let r of t) { if (r.role !== `system`) continue; let t = getPromptContentText(r.content).split(` `), i = t.findIndex((e) => e.trim() === `Available skills`); if (!(i < 0)) for (let e of t.slice(i + 1)) { if (e.trim().length === 0) break; let t = parseAvailableSkill(e); t !== null && n.set(t.name, t); } } return [...n.values()]; } function findRelevantSkill(e, t) { let n = normalizeText$1(t); for (let t of e) if (n.includes(normalizeText$1(t.name))) return t; return /\b(forecast|temperature|weather|wind|rain|snow)\b/u.test(n) ? e.find((e) => /\b(forecast|temperature|weather|wind|rain|snow)\b/u.test(normalizeText$1(`${e.name} ${e.description}`))) ?? null : null; } function getActivatedSkillIds(t) { return [...t.filter((e) => e.role === `system`).flatMap((t) => getPromptContentText(t.content).split(` `).map((e) => e.trim()).flatMap((e) => { let t = /^Skill \((.+)\)$/.exec(e); return t?.[1] === void 0 ? [] : [t[1]]; })), ...getLoadedSkillIdsFromHistory(t)]; } function getLoadedSkillIdsFromHistory(e) { let t = []; for (let n of e) if (!(n.role !== `assistant` || typeof n.content == `string`)) for (let e of n.content) { if (typeof e == `string` || e.type !== `tool-call` || e.toolName !== `load_skill`) continue; let n = readSkillFromToolInput(e.input); n !== void 0 && t.push(n); } return t; } function readSkillFromToolInput(e) { let t = typeof e == `string` ? safeJsonParse(e) : e; if (typeof t == `object` && t && `skill` in t && typeof t.skill == `string`) return t.skill; } function safeJsonParse(e) { try { return JSON.parse(e); } catch { return; } } function parseAvailableSkill(e) { let t = /^- (.+?): (.+?)(?: \(path: (.+)\))?$/.exec(e.trim()); return t?.[1] && t[2] ? { description: t[2], name: t[1] } : null; } function normalizeText$1(e) { return e.toLowerCase().replace(/[^a-z0-9]+/gu, ` `).trim(); } //#endregion //#region node_modules/eve/dist/src/runtime/agent/mock-structured-output.js function createJsonSchemaSample(e) { if (!isRecord$1(e)) return {}; if (`const` in e) return e.const; if (Array.isArray(e.enum) && e.enum.length > 0) return e.enum[0]; let t = getFirstSchema(e.oneOf) ?? getFirstSchema(e.anyOf); if (t !== void 0) return createJsonSchemaSample(t); switch (getJsonSchemaType(e)) { case `array`: return [createJsonSchemaSample(getFirstSchema(e.items) ?? e.items)]; case `boolean`: return !0; case `integer`: case `number`: return 1; case `null`: return null; case `object`: return createJsonSchemaObjectSample(e); case `string`: return createJsonSchemaStringSample(e); default: return isRecord$1(e.properties) ? createJsonSchemaObjectSample(e) : e.items === void 0 ? {} : [createJsonSchemaSample(getFirstSchema(e.items) ?? e.items)]; } } function createJsonSchemaObjectSample(e) { let t = isRecord$1(e.properties) ? e.properties : {}, n = Array.isArray(e.required) ? e.required.filter((e) => typeof e == `string`) : [], r = /* @__PURE__ */ new Set([...n, ...Object.keys(t)]), i = {}; for (let e of r) i[e] = createJsonSchemaSample(t[e]); return i; } function createJsonSchemaStringSample(e) { switch (e.format) { case `date`: return `2026-01-01`; case `date-time`: return `2026-01-01T00:00:00.000Z`; case `email`: return `eve@example.com`; case `uri`: return `https://example.com`; default: return `structured-output`; } } function getJsonSchemaType(e) { if (typeof e.type == `string`) return e.type; if (Array.isArray(e.type)) return e.type.find((e) => typeof e == `string` && e !== `null`); } function getFirstSchema(e) { return Array.isArray(e) ? e[0] : e; } function isRecord$1(e) { return typeof e == `object` && !!e && !Array.isArray(e); } //#endregion //#region node_modules/eve/dist/src/runtime/agent/mock-model-adapter.js const authoredRuntimeModelMocks = /* @__PURE__ */ new Map(); const bootstrapWeatherPayloadSchema = Ls$3.object({ city: Ls$3.string(), condition: Ls$3.string(), summary: Ls$3.string(), temperatureF: Ls$3.number().finite() }).strict(); function shouldMockAuthoredRuntimeModels() { return process.env.NODE_ENV === `test` || process.env.EVE_MOCK_AUTHORED_MODELS === `1`; } function createMockAuthoredRuntimeModel(e) { let t = authoredRuntimeModelMocks.get(e.id); if (t !== void 0) return t; let r = new MockLanguageModelV3({ modelId: e.id, provider: `eve-runtime-mock`, doGenerate: async (t) => createMockModelResult(t, e.id), doStream: async (t) => createBootstrapStreamResult(createMockModelResult(t, e.id)) }); return authoredRuntimeModelMocks.set(e.id, r), r; } function createMockModelResult(e, t) { let n = getLastAuthoredToolResult(e.prompt); if (n !== null) { let r = createFollowUpToolCallResult({ modelId: t, options: e, result: n }); if (r !== null) return r; } else { let n = createSkillLoadResult(e.prompt, t) ?? createAuthoredToolCallResult(e, t); if (n !== null) return n; } let r = createFinalOutputResult(e, t); if (r !== null) return r; let i = n === null ? createAssistantMessage(e.prompt) : formatToolResultReply(n, e.prompt); return createBootstrapGenerateResult({ inputTokens: estimateTokenCount(getPromptText(e.prompt)), modelId: t, outputTokens: estimateTokenCount(i), text: i }); } function createFinalOutputResult(e, t) { let n = getAvailableTools(e).find((e) => e.name === FINAL_OUTPUT_TOOL_NAME); if (n === void 0) return null; let i = createJsonSchemaSample(n.inputSchema); return createToolCallGenerateResult({ input: i, inputTokens: estimateTokenCount(getPromptText(e.prompt)), modelId: t, outputTokens: estimateTokenCount(JSON.stringify(i)), toolCallId: createToolCallId(FINAL_OUTPUT_TOOL_NAME), toolName: FINAL_OUTPUT_TOOL_NAME }); } function resolveMockAuthoredRuntimeModel(e) { return !shouldMockAuthoredRuntimeModels() || e.id === BOOTSTRAP_RUNTIME_MODEL_ID ? null : createMockAuthoredRuntimeModel(e); } function createSkillLoadResult(e, n) { let r = getLastUserPromptText(e); if (r === null || getActivatedSkillIds(e).length > 0) return null; let i = findRelevantSkill(getAvailableSkills(e), r); return i === null ? null : createToolCallGenerateResult({ input: { skill: i.name }, inputTokens: estimateTokenCount(getPromptText(e)), modelId: n, outputTokens: estimateTokenCount(i.name), toolCallId: `call_load_skill`, toolName: LOAD_SKILL_TOOL_NAME }); } function createAuthoredToolCallResult(e, t) { let n = getLastUserPromptText(e.prompt); if (n === null) return null; let r = findRelevantTool(getAvailableTools(e), n); if (r === null) return null; let i = createMockAuthoredToolInput(r, n, resolveWeatherCity(n)); return createToolCallGenerateResult({ input: i, inputTokens: estimateTokenCount(getPromptText(e.prompt)), modelId: t, outputTokens: estimateTokenCount(Object.values(i).join(` `)), toolCallId: createToolCallId(r.name), toolName: r.name }); } function createFollowUpToolCallResult(e) { let t = findNextExplicitToolAfterResult({ previousToolName: e.result.toolName, prompt: e.options.prompt, tools: getAvailableTools(e.options) }); if (t === null) return null; let n = createFollowUpToolInput(e.result.output); return n === null ? null : createToolCallGenerateResult({ input: n, inputTokens: estimateTokenCount(getPromptText(e.options.prompt)), modelId: e.modelId, outputTokens: estimateTokenCount(Object.values(n).join(` `)), toolCallId: createToolCallId(t.name), toolName: t.name }); } function createAssistantMessage(e) { let t = getLastUserPromptText(e) ?? `Hello from eve`, n = getSystemPromptLabels(e), r = resolveSystemProbe(e), i = resolveMockFixtureToken(e); return i === null ? n.length > 0 ? r === null ? `Bootstrap reply [${n.join(`, `)}]: ${t}` : `Bootstrap reply [${n.join(`, `)}; probe=${r}]: ${t}` : r === null ? `Bootstrap reply: ${t}` : `Bootstrap reply [probe=${r}]: ${t}` : i; } function formatToolResultReply(e, t) { if (e.isError) return `Local weather tool failed: ${formatToolOutput(e.output)}`; if (isWeatherPayload(e.output)) return `Used local weather tool for ${e.output.city}: ${e.output.condition}, ${e.output.temperatureF}F. ${e.output.summary}`; let n = getLastUserPromptText(t) ?? `Hello from eve`; return `Used ${e.toolName} for "${n}": ${formatToolOutput(e.output)}`; } function createToolCallGenerateResult(e) { return { content: [{ input: JSON.stringify(e.input), toolCallId: e.toolCallId, toolName: e.toolName, type: `tool-call` }], finishReason: { raw: void 0, unified: `tool-calls` }, response: { id: `bootstrap-response`, modelId: e.modelId, timestamp: /* @__PURE__ */ new Date(`2026-03-16T00:00:00.000Z`) }, usage: { inputTokens: { cacheRead: 0, cacheWrite: 0, noCache: e.inputTokens, total: e.inputTokens }, outputTokens: { reasoning: 0, text: e.outputTokens, total: e.outputTokens } }, warnings: [] }; } function getAvailableTools(e) { return (e.tools ?? []).flatMap((e) => e.type === `function` ? [{ description: e.description, inputSchema: `inputSchema` in e ? e.inputSchema : void 0, name: e.name, outputSchema: `outputSchema` in e ? e.outputSchema : void 0 }] : []); } function getLastAuthoredToolResult(e) { for (let n of [...e].reverse()) { if (n.role === `user`) return null; if (!(n.role !== `tool` && n.role !== `assistant`)) { for (let e of [...n.content].reverse()) if (!(typeof e == `string` || e.type !== `tool-result`) && e.toolName !== LOAD_SKILL_TOOL_NAME) return { isError: e.output.type === `error-json` || e.output.type === `error-text` || e.output.type === `execution-denied`, output: e.output.type === `execution-denied` ? { reason: e.output.reason ?? null, type: e.output.type } : e.output.value, toolCallId: e.toolCallId, toolName: e.toolName }; } } return null; } function findNextExplicitToolAfterResult(e) { let t = getLastUserPromptText(e.prompt); if (t === null) return null; let n = normalizeText(t), r = n.indexOf(normalizeText(e.previousToolName)); return r < 0 ? null : e.tools.filter((t) => t.name !== e.previousToolName).flatMap((e) => { let t = n.indexOf(normalizeText(e.name), r + 1); return t < 0 ? [] : [{ index: t, tool: e }]; }).sort((e, t) => e.index - t.index)[0]?.tool ?? null; } function createFollowUpToolInput(e) { return isRecord(e) && typeof e.stepKey == `string` ? { stepKey: e.stepKey } : null; } function getSystemPromptLabels(e) { let t = e.filter((e) => e.role === `system`); if (t.length === 0) return []; let n = t.flatMap((e) => { let t = getPromptContentText(e.content); if (t.startsWith(`Available skills `)) return []; let n = t.split(` `).map((e) => e.trim()).filter((e) => e.length > 0), r = []; for (let e of n) { if (e === BOOTSTRAP_RUNTIME_SYSTEM_PROMPT || e === `Available skills`) continue; let t = /^System \((.+)\)$/.exec(e); if (t?.[1]) { r.push(t[1]); continue; } let n = /^Skill \((.+)\)$/.exec(e); n?.[1] && r.push(n[1]); } if (r.length > 0) return r; let i = n.find((e) => e !== BOOTSTRAP_RUNTIME_SYSTEM_PROMPT && e !== `Available skills`); return i === void 0 ? [] : [i]; }); return [...new Set(n)]; } function findRelevantTool(e, n) { let r = normalizeText(n), i = e.find((e) => e.name !== `agent` && e.name !== LOAD_SKILL_TOOL_NAME && r.includes(normalizeText(e.name))); return i === void 0 ? /\b(forecast|temperature|weather|wind|rain|snow)\b/u.test(r) ? e.find((e) => /\b(forecast|temperature|weather|wind|rain|snow)\b/u.test(normalizeText(`${e.name} ${e.description ?? ``}`))) ?? null : null : i; } function normalizeText(e) { return e.toLowerCase().replace(/[^a-z0-9]+/gu, ` `).trim(); } function createToolCallId(e) { return `call_${e.toLowerCase().replace(/[^a-z0-9]+/gu, `_`).replace(/^_+|_+$/gu, ``) || `tool`}`; } function resolveSystemProbe(e) { let t = e.filter((e) => e.role === `system`).map((e) => getPromptContentText(e.content)).join(` `); return /hmr-probe:\s*([^\n]+)/iu.exec(t)?.[1]?.trim() || null; } function isWeatherPayload(e) { return bootstrapWeatherPayloadSchema.safeParse(e).success; } function isRecord(e) { return typeof e == `object` && !!e && !Array.isArray(e); } //#endregion //#region node_modules/eve/dist/src/runtime/agent/resolve-model.js async function resolveRuntimeModelReference(e, t) { let i = resolveBootstrapRuntimeModel(e); if (i !== null) return i; let a = resolveMockAuthoredRuntimeModel(e); return a === null ? isSourceBackedRuntimeModelReference(e) ? await loadSourceBackedRuntimeModelReference(e, t) : e.id : a; } async function loadSourceBackedRuntimeModelReference(n, r) { if (r === void 0) throw Error(`Expected a compiled module-map scope to resolve the authored runtime model "${n.id}".`); let i = normalizeAgentDefinition(await loadResolvedModuleExport({ definition: n.source, kindLabel: `runtime model "${n.id}"`, moduleMap: r.moduleMap, nodeId: r.nodeId }), `Expected the authored agent config export "${n.source.exportName ?? `default`}" from "${n.source.logicalPath}" to match the public eve shape.`).model; if (i === void 0) throw Error(`Expected the authored agent config export "${n.source.exportName ?? `default`}" from "${n.source.logicalPath}" to provide a runtime model.`); return i; } function isSourceBackedRuntimeModelReference(e) { return e.source !== void 0; } //#endregion //#region node_modules/eve/dist/src/execution/compaction.js function preserveFrameworkStateOnCompaction() { clearReadFileState(); let e = getTodoCompactionMessage(); return e === void 0 ? [] : [e]; } //#endregion //#region node_modules/eve/dist/src/execution/tool-auth.js function createToolExecuteWithAuth(e) { let { scope: t, execute: n } = e; return async (e) => { let r = /* @__PURE__ */ new Set(); try { return await n(e, buildToolContext({ inlineAuthState: {}, justAuthorizedScopes: r, scope: t })); } catch (e) { if (isToolAuthorizationRequiredError(e)) return await handleAuthorizationRequests(e.requests); throw e; } }; } function buildToolContext(t) { let { scope: n, justAuthorizedScopes: r, inlineAuthState: i } = t; return { ...buildCallbackContext(), async getToken(e, t) { if (e === void 0) throw missingProviderError(`ctx.getToken`); return await resolveInlineToken({ inlineAuthState: i, justAuthorizedScopes: r, options: t, provider: e, toolScope: n }); }, requireAuth(e, t) { if (e === void 0) throw missingProviderError(`ctx.requireAuth`); let a = buildInlineScopedAuthorization({ inlineAuthState: i, options: t, provider: e, toolScope: n }); throw new ToolAuthorizationRequiredError([{ justAuthorized: r.has(a.scope), scoped: a }]); } }; } async function resolveInlineToken(e) { let { justAuthorizedScopes: t } = e, n = buildInlineScopedAuthorization(e); !t.has(n.scope) && await completeScopedAuthorization(n) && t.add(n.scope); try { return await resolveScopedToken(n); } catch (e) { throw isConnectionAuthorizationRequiredError(e) ? new ToolAuthorizationRequiredError([{ cause: e, justAuthorized: t.has(n.scope), scoped: n }]) : e; } } async function handleAuthorizationRequests(e) { let r = [], o; for (let i of e) { let { scoped: e } = i; if (i.justAuthorized) throw new ConnectionAuthorizationFailedError(e.scope, { message: `Tool "${e.scope}" rejected the token immediately after authorization.`, reason: `token_rejected_after_authorization`, retryable: !1 }); await evictScopedToken(e); let s = await startScopedAuthorization(e); if (s !== void 0) { r.push(...s.challenges); continue; } if (supportsInteractiveAuthorization(e.authorization)) throw new ConnectionAuthorizationFailedError(e.scope, { message: `Tool "${e.scope}" requires sign-in, but no authorization callback URL could be minted for this run (missing session context).`, reason: `authorization_callback_unavailable`, retryable: !1 }); o ??= i.cause instanceof Error ? i.cause : new ConnectionAuthorizationRequiredError(e.scope); } if (r.length > 0) return requestAuthorization(r); throw o ?? Error(`Tool authorization is required.`); } function buildInlineScopedAuthorization(e) { let t = normalizeInlineProvider(e.provider, e.options); return { authorization: t, connection: e.options?.connection ?? { url: `` }, scope: e.options?.authKey === void 0 ? deriveInlineScope({ authorization: t, inlineAuthState: e.inlineAuthState, provider: e.provider, toolScope: e.toolScope }) : validateInlineAuthKey(e.options.authKey) }; } function normalizeInlineProvider(e, t) { let n = normalizeAuthorizationSpec(e, `ctx.getToken:`, `provider`); if (t?.displayName === void 0) return n; if (t.displayName.length === 0) throw Error(`ctx.getToken: The "options.displayName" field must be a non-empty string.`); return { ...n, displayName: t.displayName }; } function deriveInlineScope(e) { let t = e.authorization.vercelConnect?.connector; if (t !== void 0) return `${e.toolScope}__${sanitizeScopeSegment(t)}`; if (e.inlineAuthState.anonymousProvider === void 0) e.inlineAuthState.anonymousProvider = e.provider; else if (e.inlineAuthState.anonymousProvider !== e.provider) throw Error(`ctx.getToken: Multiple inline auth providers without provider metadata need explicit auth keys. Pass options.authKey for each provider, for example ctx.getToken(auth, { authKey: "github" }).`); return `${e.toolScope}__inline_auth`; } function validateInlineAuthKey(e) { if (!/^[A-Za-z0-9_.:-]+$/u.test(e)) throw Error(`ctx.getToken: The "options.authKey" field must contain only letters, digits, "_", "-", ".", or ":".`); return e; } function sanitizeScopeSegment(e) { let t = e.replace(/[^A-Za-z0-9_.:-]+/gu, `_`).replace(/^_+|_+$/gu, ``); return t.length > 0 ? t : `provider`; } var ToolAuthorizationRequiredError = class extends Error { requests; constructor(e) { super(`Tool authorization required.`), this.name = `ToolAuthorizationRequiredError`, this.requests = e; } }; function isToolAuthorizationRequiredError(e) { return e instanceof Error && e.name === `ToolAuthorizationRequiredError`; } function missingProviderError(e) { return Error(`${e}: Pass an auth provider, for example ${e}(connect("github/myagent")).`); } //#endregion //#region node_modules/eve/dist/src/execution/node-step.js const log$1 = createLogger(`execution.node-step`); const BUILT_IN_AGENT_TOOL_DESCRIPTION = [ `Delegate a focused subtask to a fresh copy of yourself.`, `Use it to isolate complex work or split a large task into independent pieces.`, "Issue multiple `agent` calls in one response to run a small fixed set in parallel.", "Each child has fresh history and state but shares your tools and sandbox, so include essential context in `message` and give parallel writers non-overlapping scopes." ].join(` `); function createExecutionNodeStep(e) { let t = createRuntimeModelResolver(e.modelResolutionScope), n = createNodeHarnessTools({ node: e.node }); return createToolLoopHarness({ capabilities: e.capabilities, workflow: e.node.agent.workflowEnabled === !0, handleEvent: e.handleEvent, mode: e.mode, onCompaction: preserveFrameworkStateOnCompaction, resolveModel: t, runtimeIdentity: buildRuntimeIdentity(e.node), tools: n }); } function buildRuntimeIdentity(e) { let n = resolveInstalledPackageInfo(), r = { agentId: e.turnAgent.id, agentName: e.agent.config?.name, eveVersion: n.version, modelId: e.turnAgent.model.id }, i = process.env.VERCEL_GIT_COMMIT_SHA?.trim(), a = process.env.VERCEL_GIT_COMMIT_REF?.trim(), o = process.env.VERCEL_DEPLOYMENT_CREATED_AT?.trim(); return i || a || o ? { ...r, build: { deployedAt: o || void 0, gitBranch: a || void 0, gitSha: i || void 0 } } : r; } function createRuntimeModelResolver(e) { return (t) => resolveRuntimeModelReference(t, e); } function createNodeHarnessTools(e) { let t = /* @__PURE__ */ new Map(); for (let n of e.node.turnAgent.tools) { let r = resolveHarnessToolDefinition({ node: e.node, tool: n }); r !== null && t.set(n.name, r); } return t.has(`agent`) || t.set(`agent`, { description: BUILT_IN_AGENT_TOOL_DESCRIPTION, inputSchema: jsonSchema(SUBAGENT_TOOL_INPUT_SCHEMA), name: `agent`, runtimeAction: { kind: `subagent-call`, nodeId: e.node.nodeId, subagentName: `agent` } }), t; } function resolveHarnessToolDefinition(e) { if (e.tool.kind === `subagent`) return { description: e.tool.description ?? ``, inputSchema: jsonSchema(e.tool.inputSchema ?? {}), name: e.tool.name, outputSchema: e.tool.outputSchema === void 0 ? void 0 : jsonSchema(e.tool.outputSchema), runtimeAction: { kind: `subagent-call`, nodeId: e.tool.nodeId, subagentName: e.tool.name } }; if (e.tool.kind === `remote`) return { description: e.tool.description ?? ``, inputSchema: jsonSchema(e.tool.inputSchema ?? {}), name: e.tool.name, outputSchema: e.tool.outputSchema === void 0 ? void 0 : jsonSchema(e.tool.outputSchema), runtimeAction: { kind: `remote-agent-call`, nodeId: e.tool.nodeId, remoteAgentName: e.tool.name, subagentName: e.tool.name } }; let t = findRegisteredRuntimeTool(e.node.toolRegistry, e.tool.name); if (t === null) return log$1.warn(`declared tool is not registered — omitting from toolset`, { toolName: e.tool.name, nodeId: e.node.nodeId }), null; let r = t.definition, i = r.sourceId.startsWith(`eve:`), o = r.execute; return { approvalKey: r.approvalKey, description: r.description, execute: resolveAuthoredExecute({ isFrameworkTool: i, rawExecute: o, scope: r.name }), inputSchema: r.inputStandardSchema ?? jsonSchema(r.inputSchema ?? {}), name: r.name, approval: r.approval, outputSchema: r.outputStandardSchema ?? maybeJsonSchema(r.outputSchema), toModelOutput: r.toModelOutput }; } function resolveAuthoredExecute(e) { let { isFrameworkTool: t, rawExecute: n, scope: r } = e; return n === void 0 ? void 0 : t ? n : createToolExecuteWithAuth({ execute: n, scope: r }); } function maybeJsonSchema(e) { return e === void 0 ? void 0 : jsonSchema(e); } //#endregion //#region node_modules/eve/dist/src/execution/subagent-hitl-proxy.js async function emitProxiedInputRequest(i) { await i.emit(createInputRequestedEvent({ requests: i.hookPayload.event.requests, sequence: i.hookPayload.event.sequence, stepIndex: i.hookPayload.event.stepIndex, turnId: i.hookPayload.event.turnId })); let o = i.session; if (i.mode === `conversation`) { let e = getHarnessEmissionState(i.session.state), a = await emitTurnEpilogue(i.emit, e, i.mode); o = setHarnessEmissionState(i.session, a); } return { entries: toProxyInputRequestEntries(i.hookPayload), session: o }; } function routeDeliverPayload(e) { let t = getProxyInputRequests(e.state), n = e.payload.inputResponses ?? [], r = /* @__PURE__ */ new Map(), a = []; for (let e of n) { let n = t.get(e.requestId); if (n === void 0) { a.push(e); continue; } let i = r.get(n); i === void 0 ? r.set(n, [e]) : i.push(e); } let o = [...r.entries()].map(([e, t]) => ({ childContinuationToken: e, payload: { inputResponses: t } })), s = {}; for (let [t, n] of Object.entries(e.payload)) t === `inputResponses` || n === void 0 || (s[t] = n); return a.length > 0 && (s.inputResponses = a), { forChildren: o, forSelf: Object.keys(s).length > 0 ? s : void 0 }; } //#endregion //#region node_modules/eve/dist/src/execution/workflow-steps.js async function turnStep(e) { let t = e, o = await readDurableSession(t.sessionState), l = await deserializeContext(t.serializedContext), f = l.require(ChannelKey), p = l.require(BundleKey); try { let { getWorkflowMetadata: e } = await Promise.resolve().then(() => core_exports), t = e(); typeof t.url == `string` && l.set(CallbackBaseUrlKey, resolveWorkflowCallbackBaseUrl(t.url)); } catch {} let m = getPendingAuthorization(o.state), h; if (m && t.input?.kind === `deliver`) { let e = [], n = [], r = []; for (let i of t.input.payloads) { let t = i.authorizationCallback; if (t) { let r = m.challenges.find((e) => e.name === t.connectionName); r && (e.push({ name: r.name, resume: r.resume, callback: t.callback, hookUrl: r.hookUrl }), n.push({ name: r.name, authorization: r.challenge })); } else r.push(i); } e.length > 0 && (l.set(PendingAuthorizationResultKey, e), o = { ...o, state: clearPendingAuthorization(o.state, e.map((e) => e.name)) }, h = n, t = r.length > 0 ? { ...t, input: { ...t.input, payloads: r } } : { ...t, input: void 0 }); } t.input?.kind === `deliver` && t.input.auth !== void 0 && l.set(AuthKey, t.input.auth ?? null); let g = hydrateDurableSession({ compactionOverrides: { thresholdPercent: p.resolvedAgent.config.compaction?.thresholdPercent }, durable: o, turnAgent: p.turnAgent }), _ = buildAdapterContext(f, l), v; if (t.input?.kind === `deliver`) { let e = []; for (let n of t.input.payloads) { let t = f.deliver ? await f.deliver(n, _) : defaultDeliverResult(n); t != null && e.push(t); } v = e.length === 0 ? void 0 : e.reduce(coalesceTurnInputs); } else t.input?.kind === `runtime-action-result` && (v = { runtimeActionResults: t.input.results }); if (t.input?.kind === `deliver` && setChannelContext(l, { ...f, state: { ..._.state } }), t.input?.kind === `deliver` && v === void 0) { let e = reconcileSessionContinuationToken(l, g), n = serializeContext(l), r = e === g ? t.sessionState : createDurableSessionState({ session: e }); return { action: `park`, ...derivePendingState(e), serializedContext: n, sessionState: r }; } let y = t.parentWritable.getWriter(), b = p.hookRegistry, x = p.resolvedAgent.dynamicInstructionsResolvers ?? [], S = p.resolvedAgent.dynamicSkillResolvers ?? [], C = p.resolvedAgent.dynamicToolResolvers ?? [], emit = async (e) => { let t = await callAdapterEventHandler(f, e, _); return setChannelContext(l, { ...f, state: { ..._.state } }), await y.write(encodeMessageStreamEvent(timestampHandleMessageStreamEvent(t))), t; }, handleEvent = async (e, t) => { let n = await emit(e); await dispatchStreamEventHooks({ ctx: l, registry: b, event: n }), await dispatchDynamicToolEvent({ ctx: l, resolvers: C, event: n, messages: t ?? [] }), await dispatchDynamicSkillEvent({ ctx: l, resolvers: S, event: n, messages: t ?? [] }), await dispatchDynamicInstructionEvent({ ctx: l, resolvers: x, event: n, messages: t ?? [] }); }, w = l.require(ModeKey), T = await runStep(l, g, async (e) => { let t = resolveEffectiveOutputSchema({ agentOutputSchema: p.turnAgent.outputSchema, input: v, mode: w, session: e }); if (h) { let e = getHarnessEmissionState(t.state); for (let { name: t, authorization: n } of h) await handleEvent(createAuthorizationCompletedEvent({ authorization: n, name: t, outcome: `authorized`, sequence: e.sequence, stepIndex: e.stepIndex, turnId: e.turnId })); } let n = l.get(CapabilitiesKey); return (async (e, t) => { let r = refreshSessionFromTurnAgent({ compactionOverrides: { thresholdPercent: p.resolvedAgent.config.compaction?.thresholdPercent }, session: e, turnAgent: p.turnAgent }); return createExecutionNodeStep({ capabilities: n, createRuntime: createWorkflowRuntime, handleEvent, mode: w, modelResolutionScope: { moduleMap: p.moduleMap, nodeId: p.nodeId }, node: p.graph.root })(r, t); })(t, v); }), E = reconcileSessionContinuationToken(l, T.session), D = serializeContext(l); T = { ...T, session: E }; let O = createDurableSessionState({ session: T.session }); if (T.next !== null && typeof T.next == `object` && `done` in T.next) return await y.close(), { action: `done`, output: T.next.output, isError: T.next.isError, serializedContext: D, sessionState: O }; if (T.next === null) { y.releaseLock(); let e = getPendingWorkflowInterrupt(T.session.state); return e !== void 0 && isWorkflowRuntimeActionInterrupt(e.interrupt) ? { action: `dispatch-workflow-runtime-actions`, pendingRuntimeActionKeys: getRuntimeActionKeysFromWorkflowInterrupt(e.interrupt), serializedContext: D, sessionState: O } : { action: `park`, ...derivePendingState(T.session), serializedContext: D, sessionState: O }; } return y.releaseLock(), { action: `continue`, serializedContext: D, sessionState: O }; } function derivePendingState(e) { let t = getPendingRuntimeActionBatch(e.state), n = getPendingAuthorization(e.state), r = { authorizationNames: n?.challenges.map((e) => e.name), hasPendingAuthorization: n !== void 0, hasPendingInputBatch: hasPendingInputBatch(e.state) }; return t === void 0 ? r : { ...r, pendingRuntimeActionKeys: t.actions.map((e) => getRuntimeActionRequestKey(e)) }; } function reconcileSessionContinuationToken(e, t) { let n = e.get(ContinuationTokenKey); return n === void 0 || n === t.continuationToken ? t : { ...t, continuationToken: n }; } function resolveEffectiveOutputSchema(e) { let { agentOutputSchema: t, input: n, mode: r, session: i } = e; return n?.outputSchema === void 0 ? r === `task` && i.outputSchema === void 0 && t !== void 0 ? { ...i, outputSchema: t } : i : { ...i, outputSchema: n.outputSchema }; } const log = createLogger(`execution.workflow-entry`); async function emitTerminalSessionFailureStep(e) { let r = formatError(e.error), i = typeof r.name == `string` ? r.name : `WORKFLOW_EXECUTION_FAILED`, a = typeof r.message == `string` ? r.message : String(e.error), o = e.serializedContext[`eve.sessionId`] ?? ``; log.error(`workflow loop threw — emitting terminal session.failed`, { sessionId: o, errorId: typeof r.errorId == `string` ? r.errorId : void 0, code: i, message: a, detail: typeof r.detail == `string` ? r.detail : void 0 }); let s = createSessionFailedEvent({ code: i, details: r, message: a, sessionId: o }); try { let t = await deserializeContext(e.serializedContext), r = t.get(ChannelKey); r !== void 0 && await callAdapterEventHandler(r, s, buildAdapterContext(r, t)); } catch (e) { log.error(`adapter failed to handle terminal session.failed event`, { errorId: typeof r.errorId == `string` ? r.errorId : void 0, sessionId: o, error: e }); } try { let t = e.parentWritable.getWriter(); try { await t.write(encodeMessageStreamEvent(timestampHandleMessageStreamEvent(s))); } finally { t.releaseLock(); } } catch (e) { log.error(`failed to write terminal session.failed event to durable stream`, { errorId: typeof r.errorId == `string` ? r.errorId : void 0, sessionId: o, error: e }); } } async function runProxyInputRequestStep(e) { let t = await readDurableSession(e.sessionState), r = await deserializeContext(e.serializedContext), i = r.require(ChannelKey), a = buildAdapterContext(i, r), o = r.require(ModeKey), c = r.require(BundleKey), l = hydrateDurableSession({ compactionOverrides: { thresholdPercent: c.resolvedAgent.config.compaction?.thresholdPercent }, durable: t, turnAgent: c.turnAgent }), u = e.parentWritable.getWriter(), d; try { let emit = async (e) => { let t = await callAdapterEventHandler(i, e, a); await u.write(encodeMessageStreamEvent(timestampHandleMessageStreamEvent(t))); }; d = await withContextScope(r, l, async (t) => { let n = await emitProxiedInputRequest({ emit, hookPayload: e.hookPayload, mode: o, session: t }); return { result: n.entries, session: n.session }; }); } finally { u.releaseLock(); } return setChannelContext(r, { ...i, state: { ...a.state } }), { serializedContext: serializeContext(r), sessionState: createDurableSessionState({ session: reconcileSessionContinuationToken(r, upsertProxyInputRequests({ entries: d.result, forChildContinuationToken: e.hookPayload.childContinuationToken, session: d.session })) }) }; } async function routeProxiedDeliverStep(e) { let t = await readDurableSession(e.sessionState), n = routeDeliverPayload({ payload: e.payload, state: t.state }); for (let t of n.forChildren) await E$9(t.childContinuationToken, { auth: e.auth, kind: `deliver`, payloads: [t.payload] }); return { remainder: n.forSelf }; } async function dispatchTurnStep(e) { return { runId: (await startWorkflowPreferLatest(turnWorkflowReference, [createTurnWorkflowInput(e)], { allowReservedAttributes: !0, attributes: normalizeEveAttributes(buildTurnAttributes({ parentSessionId: e.sessionState.sessionId, requestId: e.delivery.kind === `deliver` ? e.delivery.requestId : void 0, rootSessionId: readRootSessionId(e.serializedContext) ?? e.sessionState.sessionId })) })).runId }; } s$7("step//eve@0.16.2//turnStep", turnStep); s$7("step//eve@0.16.2//emitTerminalSessionFailureStep", emitTerminalSessionFailureStep); s$7("step//eve@0.16.2//runProxyInputRequestStep", runProxyInputRequestStep); s$7("step//eve@0.16.2//routeProxiedDeliverStep", routeProxiedDeliverStep); s$7("step//eve@0.16.2//dispatchTurnStep", dispatchTurnStep); //#endregion //#region node_modules/eve/.eve/workflow-cache/97d43a998b3c/steps.mjs const __steps_registered = true; //#endregion //#region node_modules/eve/.eve/workflow-cache/97d43a998b3c/workflows.mjs const workflowCode = Buffer.from([ "Z2xvYmFsVGhpcy5fX3ByaXZhdGVfd29ya2Zsb3dzID0gbmV3IE1hcCgpOwpuZXcgVGV4dEVuY29kZXIoKTsKLy8jZW5kcmVnaW9uCi8vI3JlZ2lvbiBkaXN0L3NyYy9ydW50aW1lL2FjdGlvbnMva2V5cy5qcwpmdW5jdGlvbiBnZXRSdW50aW1lQWN0aW9uUmVzdWx0S2V5KGUpIHsKCXN3aXRjaCAoZS5raW5kKSB7CgkJY2FzZSBgbG9hZC1za2lsbC1yZXN1bHRgOiByZXR1cm4gYHJ1bnRpbWUtYWN0aW9uOmxvYWQtc2tpbGw6JHtlLmNhbGxJZH1gOwoJCWNhc2UgYHN1YmFnZW50LXJlc3VsdGA6IHJldHVybiBgc3ViYWdlbnQtY2FsbDoke2Uuc3ViYWdlbnROYW1lfToke2UuY2FsbElkfWA7CgkJY2FzZSBgdG9vbC1yZXN1bHRgOiByZXR1cm4gYHRvb2wtY2FsbDoke2UudG9vbE5hbWV9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ZRPT0K" ].join(""), "base64").toString("utf8"); const POST = Ov(workflowCode, { namespace: "eve71722d6d6173746572" }); //#endregion //#region node_modules/eve/dist/src/internal/nitro/routes/schedule-task.js async function dispatchScheduleTask(r, i) { let a = resolveNitroCompiledArtifactsSource(i), o = await loadResolvedCompiledScheduleByTaskName(r, { compiledArtifactsSource: a }), s = await getCompiledRuntimeAgentBundle({ compiledArtifactsSource: a }), c = new ScheduleDispatcher({ runtime: createWorkflowRuntime({ compiledArtifactsSource: a }), channels: s.graph.root.channels }), l = { scheduleId: o.name }; o.hasRun && (l.run = await loadScheduleRun(o, s.moduleMap)), o.markdown !== void 0 && (l.markdown = o.markdown); let u = await c.trigger(l); return u.waitUntilTasks.length > 0 && await Promise.allSettled(u.waitUntilTasks), { scheduleId: o.name, sessionIds: u.sessions.map((e) => e.id) }; } async function loadScheduleRun(e, t) { if (e.sourceKind !== `module`) throw Error(`Schedule "${e.name}" claims hasRun but is not a module-backed schedule.`); let n = e; return expectScheduleRun(await loadResolvedModuleExport({ definition: { exportName: n.exportName, logicalPath: n.logicalPath, sourceId: n.sourceId }, kindLabel: `schedule`, moduleMap: t, nodeId: void 0 }), n.logicalPath, n.exportName); } //#endregion //#region node_modules/eve/dist/src/compiled/@ai-sdk/anthropic/index.js var anthropic_exports = /* @__PURE__ */ __exportAll({ VERSION: () => At$4, anthropic: () => Mt$4, createAnthropic: () => jt$4 }); var Y$5 = vd({ errorSchema: Wu(() => Qu(Co({ type: Ro(`error`), error: Co({ type: Ra$2(), message: Ra$2() }) }))), errorToMessage: (e) => e.error.message }); var te$3 = Wu(() => Qu(Co({ id: Ra$2(), type: Ro(`file`), filename: Ra$2(), mime_type: Ra$2(), size_bytes: oo(), created_at: Ra$2(), downloadable: uo().nullish() }))); var ne$3 = class { constructor(e) { this.config = e, this.specificationVersion = `v4`; } get provider() { return this.config.provider; } async uploadFile({ data: e, mediaType: t, filename: n }) { let r = Bc(e), i = new Blob([r], { type: t }), a = new FormData(); n == null ? a.append(`file`, i) : a.append(`file`, i, n); let { value: o } = await cd({ url: `${this.config.baseURL}/files`, headers: Pc(this.config.headers(), { "anthropic-beta": `files-api-2025-04-14` }), formData: a, failedResponseHandler: Y$5, successfulResponseHandler: bd(te$3), fetch: this.config.fetch }); return { warnings: [], providerReference: { anthropic: o.id }, mediaType: o.mime_type ?? t, filename: o.filename ?? n, providerMetadata: { anthropic: { filename: o.filename, mimeType: o.mime_type, sizeBytes: o.size_bytes, createdAt: o.created_at, ...o.downloadable == null ? {} : { downloadable: o.downloadable } } } }; } }; var X$5 = Co({ type: Ra$2(), category: Ra$2().nullish(), explanation: Ra$2().nullish(), recommended_model: Ra$2().nullish() }); var re$3 = Wu(() => Qu(Co({ type: Ro(`message`), id: Ra$2().nullish(), model: Ra$2().nullish(), content: xo(Oo(`type`, [ Co({ type: Ro(`text`), text: Ra$2(), citations: xo(Oo(`type`, [ Co({ type: Ro(`web_search_result_location`), cited_text: Ra$2(), url: Ra$2(), title: Ra$2(), encrypted_index: Ra$2() }), Co({ type: Ro(`page_location`), cited_text: Ra$2(), document_index: oo(), document_title: Ra$2().nullable(), start_page_number: oo(), end_page_number: oo() }), Co({ type: Ro(`char_location`), cited_text: Ra$2(), document_index: oo(), document_title: Ra$2().nullable(), start_char_index: oo(), end_char_index: oo() }) ])).optional() }), Co({ type: Ro(`thinking`), thinking: Ra$2(), signature: Ra$2() }), Co({ type: Ro(`redacted_thinking`), data: Ra$2() }), Co({ type: Ro(`compaction`), content: Ra$2() }), Co({ type: Ro(`tool_use`), id: Ra$2(), name: Ra$2(), input: _o(), caller: Eo([ Co({ type: Ro(`code_execution_20250825`), tool_id: Ra$2() }), Co({ type: Ro(`code_execution_20260120`), tool_id: Ra$2() }), Co({ type: Ro(`direct`) }) ]).optional() }), Co({ type: Ro(`server_tool_use`), id: Ra$2(), name: Ra$2(), input: Po(Ra$2(), _o()).nullish(), caller: Eo([Co({ type: Ro(`code_execution_20260120`), tool_id: Ra$2() }), Co({ type: Ro(`direct`) })]).optional() }), Co({ type: Ro(`mcp_tool_use`), id: Ra$2(), name: Ra$2(), input: _o(), server_name: Ra$2() }), Co({ type: Ro(`mcp_tool_result`), tool_use_id: Ra$2(), is_error: uo(), content: xo(Eo([Ra$2(), Co({ type: Ro(`text`), text: Ra$2() })])) }), Co({ type: Ro(`web_fetch_tool_result`), tool_use_id: Ra$2(), content: Eo([Co({ type: Ro(`web_fetch_result`), url: Ra$2(), retrieved_at: Ra$2(), content: Co({ type: Ro(`document`), title: Ra$2().nullable(), citations: Co({ enabled: uo() }).optional(), source: Eo([Co({ type: Ro(`base64`), media_type: Ro(`application/pdf`), data: Ra$2() }), Co({ type: Ro(`text`), media_type: Ro(`text/plain`), data: Ra$2() })]) }) }), Co({ type: Ro(`web_fetch_tool_result_error`), error_code: Ra$2() })]) }), Co({ type: Ro(`web_search_tool_result`), tool_use_id: Ra$2(), content: Eo([xo(Co({ type: Ro(`web_search_result`), url: Ra$2(), title: Ra$2(), encrypted_content: Ra$2(), page_age: Ra$2().nullish() })), Co({ type: Ro(`web_search_tool_result_error`), error_code: Ra$2() })]) }), Co({ type: Ro(`code_execution_tool_result`), tool_use_id: Ra$2(), content: Eo([ Co({ type: Ro(`code_execution_result`), stdout: Ra$2(), stderr: Ra$2(), return_code: oo(), content: xo(Co({ type: Ro(`code_execution_output`), file_id: Ra$2() })).optional().default([]) }), Co({ type: Ro(`encrypted_code_execution_result`), encrypted_stdout: Ra$2(), stderr: Ra$2(), return_code: oo(), content: xo(Co({ type: Ro(`code_execution_output`), file_id: Ra$2() })).optional().default([]) }), Co({ type: Ro(`code_execution_tool_result_error`), error_code: Ra$2() }) ]) }), Co({ type: Ro(`bash_code_execution_tool_result`), tool_use_id: Ra$2(), content: Oo(`type`, [Co({ type: Ro(`bash_code_execution_result`), content: xo(Co({ type: Ro(`bash_code_execution_output`), file_id: Ra$2() })), stdout: Ra$2(), stderr: Ra$2(), return_code: oo() }), Co({ type: Ro(`bash_code_execution_tool_result_error`), error_code: Ra$2() })]) }), Co({ type: Ro(`text_editor_code_execution_tool_result`), tool_use_id: Ra$2(), content: Oo(`type`, [ Co({ type: Ro(`text_editor_code_execution_tool_result_error`), error_code: Ra$2() }), Co({ type: Ro(`text_editor_code_execution_view_result`), content: Ra$2(), file_type: Ra$2(), num_lines: oo().nullable(), start_line: oo().nullable(), total_lines: oo().nullable() }), Co({ type: Ro(`text_editor_code_execution_create_result`), is_file_update: uo() }), Co({ type: Ro(`text_editor_code_execution_str_replace_result`), lines: xo(Ra$2()).nullable(), new_lines: oo().nullable(), new_start: oo().nullable(), old_lines: oo().nullable(), old_start: oo().nullable() }) ]) }), Co({ type: Ro(`tool_search_tool_result`), tool_use_id: Ra$2(), content: Eo([Co({ type: Ro(`tool_search_tool_search_result`), tool_references: xo(Co({ type: Ro(`tool_reference`), tool_name: Ra$2() })) }), Co({ type: Ro(`tool_search_tool_result_error`), error_code: Ra$2() })]) }), Co({ type: Ro(`advisor_tool_result`), tool_use_id: Ra$2(), content: Oo(`type`, [ Co({ type: Ro(`advisor_result`), text: Ra$2() }), Co({ type: Ro(`advisor_redacted_result`), encrypted_content: Ra$2() }), Co({ type: Ro(`advisor_tool_result_error`), error_code: Ra$2() }) ]) }), Co({ type: Ro(`fallback`) }) ])), stop_reason: Ra$2().nullish(), stop_sequence: Ra$2().nullish(), stop_details: X$5.nullish(), usage: wo({ input_tokens: oo(), output_tokens: oo(), cache_creation_input_tokens: oo().nullish(), cache_read_input_tokens: oo().nullish(), iterations: xo(Co({ type: Eo([ Ro(`compaction`), Ro(`message`), Ro(`advisor_message`), Ro(`fallback_message`) ]), model: Ra$2().nullish(), input_tokens: oo(), output_tokens: oo(), cache_creation_input_tokens: oo().nullish(), cache_read_input_tokens: oo().nullish() })).nullish() }), container: Co({ expires_at: Ra$2(), id: Ra$2(), skills: xo(Co({ type: Eo([Ro(`anthropic`), Ro(`custom`)]), skill_id: Ra$2(), version: Ra$2() })).nullish() }).nullish(), context_management: Co({ applied_edits: xo(Eo([ Co({ type: Ro(`clear_tool_uses_20250919`), cleared_tool_uses: oo(), cleared_input_tokens: oo() }), Co({ type: Ro(`clear_thinking_20251015`), cleared_thinking_turns: oo(), cleared_input_tokens: oo() }), Co({ type: Ro(`compact_20260112`) }) ])) }).nullish() }))); var ie$3 = Wu(() => Qu(Oo(`type`, [ Co({ type: Ro(`message_start`), message: Co({ id: Ra$2().nullish(), model: Ra$2().nullish(), role: Ra$2().nullish(), usage: wo({ input_tokens: oo(), cache_creation_input_tokens: oo().nullish(), cache_read_input_tokens: oo().nullish() }), content: xo(Oo(`type`, [Co({ type: Ro(`tool_use`), id: Ra$2(), name: Ra$2(), input: _o(), caller: Eo([ Co({ type: Ro(`code_execution_20250825`), tool_id: Ra$2() }), Co({ type: Ro(`code_execution_20260120`), tool_id: Ra$2() }), Co({ type: Ro(`direct`) }) ]).optional() })])).nullish(), stop_reason: Ra$2().nullish(), container: Co({ expires_at: Ra$2(), id: Ra$2() }).nullish() }) }), Co({ type: Ro(`content_block_start`), index: oo(), content_block: Oo(`type`, [ Co({ type: Ro(`text`), text: Ra$2() }), Co({ type: Ro(`thinking`), thinking: Ra$2() }), Co({ type: Ro(`tool_use`), id: Ra$2(), name: Ra$2(), input: Po(Ra$2(), _o()).optional(), caller: Eo([ Co({ type: Ro(`code_execution_20250825`), tool_id: Ra$2() }), Co({ type: Ro(`code_execution_20260120`), tool_id: Ra$2() }), Co({ type: Ro(`direct`) }) ]).optional() }), Co({ type: Ro(`redacted_thinking`), data: Ra$2() }), Co({ type: Ro(`compaction`), content: Ra$2().nullish() }), Co({ type: Ro(`server_tool_use`), id: Ra$2(), name: Ra$2(), input: Po(Ra$2(), _o()).nullish(), caller: Eo([Co({ type: Ro(`code_execution_20260120`), tool_id: Ra$2() }), Co({ type: Ro(`direct`) })]).optional() }), Co({ type: Ro(`mcp_tool_use`), id: Ra$2(), name: Ra$2(), input: _o(), server_name: Ra$2() }), Co({ type: Ro(`mcp_tool_result`), tool_use_id: Ra$2(), is_error: uo(), content: xo(Eo([Ra$2(), Co({ type: Ro(`text`), text: Ra$2() })])) }), Co({ type: Ro(`web_fetch_tool_result`), tool_use_id: Ra$2(), content: Eo([Co({ type: Ro(`web_fetch_result`), url: Ra$2(), retrieved_at: Ra$2(), content: Co({ type: Ro(`document`), title: Ra$2().nullable(), citations: Co({ enabled: uo() }).optional(), source: Eo([Co({ type: Ro(`base64`), media_type: Ro(`application/pdf`), data: Ra$2() }), Co({ type: Ro(`text`), media_type: Ro(`text/plain`), data: Ra$2() })]) }) }), Co({ type: Ro(`web_fetch_tool_result_error`), error_code: Ra$2() })]) }), Co({ type: Ro(`web_search_tool_result`), tool_use_id: Ra$2(), content: Eo([xo(Co({ type: Ro(`web_search_result`), url: Ra$2(), title: Ra$2(), encrypted_content: Ra$2(), page_age: Ra$2().nullish() })), Co({ type: Ro(`web_search_tool_result_error`), error_code: Ra$2() })]) }), Co({ type: Ro(`code_execution_tool_result`), tool_use_id: Ra$2(), content: Eo([ Co({ type: Ro(`code_execution_result`), stdout: Ra$2(), stderr: Ra$2(), return_code: oo(), content: xo(Co({ type: Ro(`code_execution_output`), file_id: Ra$2() })).optional().default([]) }), Co({ type: Ro(`encrypted_code_execution_result`), encrypted_stdout: Ra$2(), stderr: Ra$2(), return_code: oo(), content: xo(Co({ type: Ro(`code_execution_output`), file_id: Ra$2() })).optional().default([]) }), Co({ type: Ro(`code_execution_tool_result_error`), error_code: Ra$2() }) ]) }), Co({ type: Ro(`bash_code_execution_tool_result`), tool_use_id: Ra$2(), content: Oo(`type`, [Co({ type: Ro(`bash_code_execution_result`), content: xo(Co({ type: Ro(`bash_code_execution_output`), file_id: Ra$2() })), stdout: Ra$2(), stderr: Ra$2(), return_code: oo() }), Co({ type: Ro(`bash_code_execution_tool_result_error`), error_code: Ra$2() })]) }), Co({ type: Ro(`text_editor_code_execution_tool_result`), tool_use_id: Ra$2(), content: Oo(`type`, [ Co({ type: Ro(`text_editor_code_execution_tool_result_error`), error_code: Ra$2() }), Co({ type: Ro(`text_editor_code_execution_view_result`), content: Ra$2(), file_type: Ra$2(), num_lines: oo().nullable(), start_line: oo().nullable(), total_lines: oo().nullable() }), Co({ type: Ro(`text_editor_code_execution_create_result`), is_file_update: uo() }), Co({ type: Ro(`text_editor_code_execution_str_replace_result`), lines: xo(Ra$2()).nullable(), new_lines: oo().nullable(), new_start: oo().nullable(), old_lines: oo().nullable(), old_start: oo().nullable() }) ]) }), Co({ type: Ro(`tool_search_tool_result`), tool_use_id: Ra$2(), content: Eo([Co({ type: Ro(`tool_search_tool_search_result`), tool_references: xo(Co({ type: Ro(`tool_reference`), tool_name: Ra$2() })) }), Co({ type: Ro(`tool_search_tool_result_error`), error_code: Ra$2() })]) }), Co({ type: Ro(`advisor_tool_result`), tool_use_id: Ra$2(), content: Oo(`type`, [ Co({ type: Ro(`advisor_result`), text: Ra$2() }), Co({ type: Ro(`advisor_redacted_result`), encrypted_content: Ra$2() }), Co({ type: Ro(`advisor_tool_result_error`), error_code: Ra$2() }) ]) }), Co({ type: Ro(`fallback`) }) ]) }), Co({ type: Ro(`content_block_delta`), index: oo(), delta: Oo(`type`, [ Co({ type: Ro(`input_json_delta`), partial_json: Ra$2() }), Co({ type: Ro(`text_delta`), text: Ra$2() }), Co({ type: Ro(`thinking_delta`), thinking: Ra$2() }), Co({ type: Ro(`signature_delta`), signature: Ra$2() }), Co({ type: Ro(`compaction_delta`), content: Ra$2().nullish() }), Co({ type: Ro(`citations_delta`), citation: Oo(`type`, [ Co({ type: Ro(`web_search_result_location`), cited_text: Ra$2(), url: Ra$2(), title: Ra$2(), encrypted_index: Ra$2() }), Co({ type: Ro(`page_location`), cited_text: Ra$2(), document_index: oo(), document_title: Ra$2().nullable(), start_page_number: oo(), end_page_number: oo() }), Co({ type: Ro(`char_location`), cited_text: Ra$2(), document_index: oo(), document_title: Ra$2().nullable(), start_char_index: oo(), end_char_index: oo() }) ]) }) ]) }), Co({ type: Ro(`content_block_stop`), index: oo() }), Co({ type: Ro(`error`), error: Co({ type: Ra$2(), message: Ra$2() }) }), Co({ type: Ro(`message_delta`), delta: Co({ stop_reason: Ra$2().nullish(), stop_sequence: Ra$2().nullish(), stop_details: X$5.nullish(), container: Co({ expires_at: Ra$2(), id: Ra$2(), skills: xo(Co({ type: Eo([Ro(`anthropic`), Ro(`custom`)]), skill_id: Ra$2(), version: Ra$2() })).nullish() }).nullish() }), usage: wo({ input_tokens: oo().nullish(), output_tokens: oo(), cache_creation_input_tokens: oo().nullish(), cache_read_input_tokens: oo().nullish(), iterations: xo(Co({ type: Eo([ Ro(`compaction`), Ro(`message`), Ro(`advisor_message`), Ro(`fallback_message`) ]), model: Ra$2().nullish(), input_tokens: oo(), output_tokens: oo(), cache_creation_input_tokens: oo().nullish(), cache_read_input_tokens: oo().nullish() })).nullish() }), context_management: Co({ applied_edits: xo(Eo([ Co({ type: Ro(`clear_tool_uses_20250919`), cleared_tool_uses: oo(), cleared_input_tokens: oo() }), Co({ type: Ro(`clear_thinking_20251015`), cleared_thinking_turns: oo(), cleared_input_tokens: oo() }), Co({ type: Ro(`compact_20260112`) }) ])) }).nullish() }), Co({ type: Ro(`message_stop`) }), Co({ type: Ro(`ping`) }) ]))); var ae$4 = Wu(() => Qu(Co({ signature: Ra$2().optional(), redactedData: Ra$2().optional() }))); var Z$5 = Co({ containerUpload: uo().optional(), citations: Co({ enabled: uo() }).optional(), title: Ra$2().optional(), context: Ra$2().optional() }); var oe$3 = Co({ sendReasoning: uo().optional(), structuredOutputMode: Io([ `outputFormat`, `jsonTool`, `auto` ]).optional(), thinking: Oo(`type`, [ Co({ type: Ro(`adaptive`), display: Io([`omitted`, `summarized`]).optional() }), Co({ type: Ro(`enabled`), budgetTokens: oo().optional() }), Co({ type: Ro(`disabled`) }) ]).optional(), disableParallelToolUse: uo().optional(), cacheControl: Co({ type: Ro(`ephemeral`), ttl: Eo([Ro(`5m`), Ro(`1h`)]).optional() }).optional(), metadata: Co({ userId: Ra$2().optional() }).optional(), mcpServers: xo(Co({ type: Ro(`url`), name: Ra$2(), url: Ra$2(), authorizationToken: Ra$2().nullish(), toolConfiguration: Co({ enabled: uo().nullish(), allowedTools: xo(Ra$2()).nullish() }).nullish() })).optional(), container: Co({ id: Ra$2().optional(), skills: xo(Oo(`type`, [Co({ type: Ro(`anthropic`), skillId: Ra$2(), version: Ra$2().optional() }), Co({ type: Ro(`custom`), providerReference: Po(Ra$2(), Ra$2()), version: Ra$2().optional() })])).optional() }).optional(), toolStreaming: uo().optional(), effort: Io([ `low`, `medium`, `high`, `xhigh`, `max` ]).optional(), taskBudget: Co({ type: Ro(`tokens`), total: oo().int().min(2e4), remaining: oo().int().min(0).optional() }).optional(), speed: Io([`fast`, `standard`]).optional(), inferenceGeo: Io([`us`, `global`]).optional(), fallbacks: xo(Co({ model: Ra$2(), max_tokens: oo().int().optional(), thinking: Po(Ra$2(), _o()).optional(), output_config: Po(Ra$2(), _o()).optional(), speed: Io([`fast`, `standard`]).optional() })).optional(), anthropicBeta: xo(Ra$2()).optional(), contextManagement: Co({ edits: xo(Oo(`type`, [ Co({ type: Ro(`clear_tool_uses_20250919`), trigger: Oo(`type`, [Co({ type: Ro(`input_tokens`), value: oo() }), Co({ type: Ro(`tool_uses`), value: oo() })]).optional(), keep: Co({ type: Ro(`tool_uses`), value: oo() }).optional(), clearAtLeast: Co({ type: Ro(`input_tokens`), value: oo() }).optional(), clearToolInputs: uo().optional(), excludeTools: xo(Ra$2()).optional() }), Co({ type: Ro(`clear_thinking_20251015`), keep: Eo([Ro(`all`), Co({ type: Ro(`thinking_turns`), value: oo() })]).optional() }), Co({ type: Ro(`compact_20260112`), trigger: Co({ type: Ro(`input_tokens`), value: oo() }).optional(), pauseAfterCompaction: uo().optional(), instructions: Ra$2().optional() }) ])) }).optional() }); var se$4 = 4; function ce$4(e) { let t = e?.anthropic; return t?.cacheControl ?? t?.cache_control; } var Q$5 = class { constructor() { this.breakpointCount = 0, this.warnings = []; } getCacheControl(e, t) { let n = ce$4(e); if (n) { if (!t.canCache) { this.warnings.push({ type: `unsupported`, feature: `cache_control on non-cacheable context`, details: `cache_control cannot be set on ${t.type}. It will be ignored.` }); return; } if (this.breakpointCount++, this.breakpointCount > se$4) { this.warnings.push({ type: `unsupported`, feature: `cacheControl breakpoint limit`, details: `Maximum ${se$4} cache breakpoints exceeded (found ${this.breakpointCount}). This breakpoint will be ignored.` }); return; } return n; } } getWarnings() { return this.warnings; } }; var le$4 = Wu(() => Qu(Co({ model: Ra$2(), maxUses: oo().optional(), caching: Co({ type: Ro(`ephemeral`), ttl: Eo([Ro(`5m`), Ro(`1h`)]) }).optional() }))); var ue$4 = Wu(() => Qu(Oo(`type`, [ Co({ type: Ro(`advisor_result`), text: Ra$2() }), Co({ type: Ro(`advisor_redacted_result`), encryptedContent: Ra$2() }), Co({ type: Ro(`advisor_tool_result_error`), errorCode: Ra$2() }) ]))); var de$4 = md({ id: `anthropic.advisor_20260301`, inputSchema: Wu(() => Qu(Co({}).strict())), outputSchema: ue$4, supportsDeferredResults: !0 }); var fe$4 = (e) => de$4(e); var pe$4 = Wu(() => Qu(Co({ maxCharacters: oo().optional() }))); var me$4 = fd({ id: `anthropic.text_editor_20250728`, inputSchema: Wu(() => Qu(Co({ command: Io([ `view`, `create`, `str_replace`, `insert` ]), path: Ra$2(), file_text: Ra$2().optional(), insert_line: oo().int().optional(), new_str: Ra$2().optional(), insert_text: Ra$2().optional(), old_str: Ra$2().optional(), view_range: xo(oo().int()).optional() }))) }); var he$4 = (e = {}) => me$4(e); var ge$4 = Wu(() => Qu(Co({ maxUses: oo().optional(), allowedDomains: xo(Ra$2()).optional(), blockedDomains: xo(Ra$2()).optional(), userLocation: Co({ type: Ro(`approximate`), city: Ra$2().optional(), region: Ra$2().optional(), country: Ra$2().optional(), timezone: Ra$2().optional() }).optional() }))); var _e$4 = Wu(() => Qu(xo(Co({ url: Ra$2(), title: Ra$2().nullable(), pageAge: Ra$2().nullable(), encryptedContent: Ra$2(), type: Ro(`web_search_result`) })))); var ve$4 = md({ id: `anthropic.web_search_20260209`, inputSchema: Wu(() => Qu(Co({ query: Ra$2() }))), outputSchema: _e$4, supportsDeferredResults: !0 }); var ye$4 = (e = {}) => ve$4(e); var be$4 = Wu(() => Qu(Co({ maxUses: oo().optional(), allowedDomains: xo(Ra$2()).optional(), blockedDomains: xo(Ra$2()).optional(), userLocation: Co({ type: Ro(`approximate`), city: Ra$2().optional(), region: Ra$2().optional(), country: Ra$2().optional(), timezone: Ra$2().optional() }).optional() }))); var xe$4 = Wu(() => Qu(xo(Co({ url: Ra$2(), title: Ra$2().nullable(), pageAge: Ra$2().nullable(), encryptedContent: Ra$2(), type: Ro(`web_search_result`) })))); var Se$4 = md({ id: `anthropic.web_search_20250305`, inputSchema: Wu(() => Qu(Co({ query: Ra$2() }))), outputSchema: xe$4, supportsDeferredResults: !0 }); var Ce$4 = (e = {}) => Se$4(e); var we$4 = Wu(() => Qu(Co({ maxUses: oo().optional(), allowedDomains: xo(Ra$2()).optional(), blockedDomains: xo(Ra$2()).optional(), citations: Co({ enabled: uo() }).optional(), maxContentTokens: oo().optional() }))); var Te$4 = Wu(() => Qu(Co({ type: Ro(`web_fetch_result`), url: Ra$2(), content: Co({ type: Ro(`document`), title: Ra$2().nullable(), citations: Co({ enabled: uo() }).optional(), source: Eo([Co({ type: Ro(`base64`), mediaType: Ro(`application/pdf`), data: Ra$2() }), Co({ type: Ro(`text`), mediaType: Ro(`text/plain`), data: Ra$2() })]) }), retrievedAt: Ra$2().nullable() }))); var Ee$4 = md({ id: `anthropic.web_fetch_20260209`, inputSchema: Wu(() => Qu(Co({ url: Ra$2() }))), outputSchema: Te$4, supportsDeferredResults: !0 }); var De$4 = (e = {}) => Ee$4(e); var Oe$4 = Wu(() => Qu(Co({ maxUses: oo().optional(), allowedDomains: xo(Ra$2()).optional(), blockedDomains: xo(Ra$2()).optional(), citations: Co({ enabled: uo() }).optional(), maxContentTokens: oo().optional() }))); var ke$4 = Wu(() => Qu(Co({ type: Ro(`web_fetch_result`), url: Ra$2(), content: Co({ type: Ro(`document`), title: Ra$2().nullable(), citations: Co({ enabled: uo() }).optional(), source: Eo([Co({ type: Ro(`base64`), mediaType: Ro(`application/pdf`), data: Ra$2() }), Co({ type: Ro(`text`), mediaType: Ro(`text/plain`), data: Ra$2() })]) }), retrievedAt: Ra$2().nullable() }))); var Ae$4 = md({ id: `anthropic.web_fetch_20250910`, inputSchema: Wu(() => Qu(Co({ url: Ra$2() }))), outputSchema: ke$4, supportsDeferredResults: !0 }); var je$4 = (e = {}) => Ae$4(e); async function Me$4({ tools: e, toolChoice: t, disableParallelToolUse: n, cacheControlValidator: i, supportsStructuredOutput: a, supportsStrictTools: o, defaultEagerInputStreaming: s = !1 }) { e = e?.length ? e : void 0; let c = [], l = /* @__PURE__ */ new Set(), u = i || new Q$5(); if (e == null) return { tools: void 0, toolChoice: void 0, toolWarnings: c, betas: l }; let d = []; for (let t of e) switch (t.type) { case `function`: { let e = u.getCacheControl(t.providerOptions, { type: `tool definition`, canCache: !0 }), n = t.providerOptions?.anthropic, r = n?.eagerInputStreaming ?? s, i = n?.deferLoading, f = n?.allowedCallers; !o && t.strict != null && c.push({ type: `unsupported`, feature: `strict`, details: `Tool '${t.name}' has strict: ${t.strict}, but strict mode is not supported by this provider. The strict property will be ignored.` }), d.push({ name: t.name, description: t.description, input_schema: t.inputSchema, cache_control: e, ...r ? { eager_input_streaming: !0 } : {}, ...o === !0 && t.strict != null ? { strict: t.strict } : {}, ...i == null ? {} : { defer_loading: i }, ...f == null ? {} : { allowed_callers: f }, ...t.inputExamples == null ? {} : { input_examples: t.inputExamples.map((e) => e.input) } }), a === !0 && l.add(`structured-outputs-2025-11-13`), (t.inputExamples != null || f != null) && l.add(`advanced-tool-use-2025-11-20`); break; } case `provider`: switch (t.id) { case `anthropic.code_execution_20250522`: l.add(`code-execution-2025-05-22`), d.push({ type: `code_execution_20250522`, name: `code_execution`, cache_control: void 0 }); break; case `anthropic.code_execution_20250825`: l.add(`code-execution-2025-08-25`), d.push({ type: `code_execution_20250825`, name: `code_execution` }); break; case `anthropic.code_execution_20260120`: d.push({ type: `code_execution_20260120`, name: `code_execution` }); break; case `anthropic.computer_20250124`: l.add(`computer-use-2025-01-24`), d.push({ name: `computer`, type: `computer_20250124`, display_width_px: t.args.displayWidthPx, display_height_px: t.args.displayHeightPx, display_number: t.args.displayNumber, cache_control: void 0 }); break; case `anthropic.computer_20251124`: l.add(`computer-use-2025-11-24`), d.push({ name: `computer`, type: `computer_20251124`, display_width_px: t.args.displayWidthPx, display_height_px: t.args.displayHeightPx, display_number: t.args.displayNumber, enable_zoom: t.args.enableZoom, cache_control: void 0 }); break; case `anthropic.computer_20241022`: l.add(`computer-use-2024-10-22`), d.push({ name: `computer`, type: `computer_20241022`, display_width_px: t.args.displayWidthPx, display_height_px: t.args.displayHeightPx, display_number: t.args.displayNumber, cache_control: void 0 }); break; case `anthropic.text_editor_20250124`: l.add(`computer-use-2025-01-24`), d.push({ name: `str_replace_editor`, type: `text_editor_20250124`, cache_control: void 0 }); break; case `anthropic.text_editor_20241022`: l.add(`computer-use-2024-10-22`), d.push({ name: `str_replace_editor`, type: `text_editor_20241022`, cache_control: void 0 }); break; case `anthropic.text_editor_20250429`: l.add(`computer-use-2025-01-24`), d.push({ name: `str_replace_based_edit_tool`, type: `text_editor_20250429`, cache_control: void 0 }); break; case `anthropic.text_editor_20250728`: { let e = await $u({ value: t.args, schema: pe$4 }); d.push({ name: `str_replace_based_edit_tool`, type: `text_editor_20250728`, max_characters: e.maxCharacters, cache_control: void 0 }); break; } case `anthropic.bash_20250124`: l.add(`computer-use-2025-01-24`), d.push({ name: `bash`, type: `bash_20250124`, cache_control: void 0 }); break; case `anthropic.bash_20241022`: l.add(`computer-use-2024-10-22`), d.push({ name: `bash`, type: `bash_20241022`, cache_control: void 0 }); break; case `anthropic.memory_20250818`: l.add(`context-management-2025-06-27`), d.push({ name: `memory`, type: `memory_20250818` }); break; case `anthropic.web_fetch_20250910`: { l.add(`web-fetch-2025-09-10`); let e = await $u({ value: t.args, schema: Oe$4 }); d.push({ type: `web_fetch_20250910`, name: `web_fetch`, max_uses: e.maxUses, allowed_domains: e.allowedDomains, blocked_domains: e.blockedDomains, citations: e.citations, max_content_tokens: e.maxContentTokens, cache_control: void 0 }); break; } case `anthropic.web_fetch_20260209`: { l.add(`code-execution-web-tools-2026-02-09`); let e = await $u({ value: t.args, schema: we$4 }); d.push({ type: `web_fetch_20260209`, name: `web_fetch`, max_uses: e.maxUses, allowed_domains: e.allowedDomains, blocked_domains: e.blockedDomains, citations: e.citations, max_content_tokens: e.maxContentTokens, cache_control: void 0 }); break; } case `anthropic.web_search_20250305`: { let e = await $u({ value: t.args, schema: be$4 }); d.push({ type: `web_search_20250305`, name: `web_search`, max_uses: e.maxUses, allowed_domains: e.allowedDomains, blocked_domains: e.blockedDomains, user_location: e.userLocation, cache_control: void 0 }); break; } case `anthropic.web_search_20260209`: { l.add(`code-execution-web-tools-2026-02-09`); let e = await $u({ value: t.args, schema: ge$4 }); d.push({ type: `web_search_20260209`, name: `web_search`, max_uses: e.maxUses, allowed_domains: e.allowedDomains, blocked_domains: e.blockedDomains, user_location: e.userLocation, cache_control: void 0 }); break; } case `anthropic.tool_search_regex_20251119`: d.push({ type: `tool_search_tool_regex_20251119`, name: `tool_search_tool_regex` }); break; case `anthropic.tool_search_bm25_20251119`: d.push({ type: `tool_search_tool_bm25_20251119`, name: `tool_search_tool_bm25` }); break; case `anthropic.advisor_20260301`: { l.add(`advisor-tool-2026-03-01`); let e = await $u({ value: t.args, schema: le$4 }); d.push({ type: `advisor_20260301`, name: `advisor`, model: e.model, ...e.maxUses !== void 0 && { max_uses: e.maxUses }, ...e.caching !== void 0 && { caching: e.caching } }); break; } default: c.push({ type: `unsupported`, feature: `provider-defined tool ${t.id}` }); break; } break; default: c.push({ type: `unsupported`, feature: `tool ${t}` }); break; } if (t == null) return { tools: d, toolChoice: n ? { type: `auto`, disable_parallel_tool_use: n } : void 0, toolWarnings: c, betas: l }; let f = t.type; switch (f) { case `auto`: return { tools: d, toolChoice: { type: `auto`, disable_parallel_tool_use: n }, toolWarnings: c, betas: l }; case `required`: return { tools: d, toolChoice: { type: `any`, disable_parallel_tool_use: n }, toolWarnings: c, betas: l }; case `none`: return { tools: void 0, toolChoice: void 0, toolWarnings: c, betas: l }; case `tool`: return { tools: d, toolChoice: { type: `tool`, name: t.toolName, disable_parallel_tool_use: n }, toolWarnings: c, betas: l }; default: throw new Ie$10({ functionality: `tool choice type: ${f}` }); } } function Ne$4({ usage: e, rawUsage: t }) { let n = e.cache_creation_input_tokens ?? 0, r = e.cache_read_input_tokens ?? 0, i, a, o = e.iterations?.some((e) => e.type === `fallback_message`); if (e.iterations && e.iterations.length > 0 && !o) { let t = e.iterations.filter((e) => e.type === `compaction` || e.type === `message`); if (t.length > 0) { let e = t.reduce((e, t) => ({ input: e.input + t.input_tokens, output: e.output + t.output_tokens }), { input: 0, output: 0 }); i = e.input, a = e.output; } else i = e.input_tokens, a = e.output_tokens; } else i = e.input_tokens, a = e.output_tokens; return { inputTokens: { total: i + n + r, noCache: i, cacheRead: r, cacheWrite: n }, outputTokens: { total: a, text: void 0, reasoning: void 0 }, raw: t ?? e }; } var Pe$4 = Wu(() => Qu(Co({ type: Ro(`code_execution_result`), stdout: Ra$2(), stderr: Ra$2(), return_code: oo(), content: xo(Co({ type: Ro(`code_execution_output`), file_id: Ra$2() })).optional().default([]) }))); var Fe$4 = md({ id: `anthropic.code_execution_20250522`, inputSchema: Wu(() => Qu(Co({ code: Ra$2() }))), outputSchema: Pe$4 }); var Ie$4 = (e = {}) => Fe$4(e); var Le$4 = Wu(() => Qu(Oo(`type`, [ Co({ type: Ro(`code_execution_result`), stdout: Ra$2(), stderr: Ra$2(), return_code: oo(), content: xo(Co({ type: Ro(`code_execution_output`), file_id: Ra$2() })).optional().default([]) }), Co({ type: Ro(`bash_code_execution_result`), content: xo(Co({ type: Ro(`bash_code_execution_output`), file_id: Ra$2() })), stdout: Ra$2(), stderr: Ra$2(), return_code: oo() }), Co({ type: Ro(`bash_code_execution_tool_result_error`), error_code: Ra$2() }), Co({ type: Ro(`text_editor_code_execution_tool_result_error`), error_code: Ra$2() }), Co({ type: Ro(`text_editor_code_execution_view_result`), content: Ra$2(), file_type: Ra$2(), num_lines: oo().nullable(), start_line: oo().nullable(), total_lines: oo().nullable() }), Co({ type: Ro(`text_editor_code_execution_create_result`), is_file_update: uo() }), Co({ type: Ro(`text_editor_code_execution_str_replace_result`), lines: xo(Ra$2()).nullable(), new_lines: oo().nullable(), new_start: oo().nullable(), old_lines: oo().nullable(), old_start: oo().nullable() }) ]))); var Re$4 = md({ id: `anthropic.code_execution_20250825`, inputSchema: Wu(() => Qu(Oo(`type`, [ Co({ type: Ro(`programmatic-tool-call`), code: Ra$2() }), Co({ type: Ro(`bash_code_execution`), command: Ra$2() }), Oo(`command`, [ Co({ type: Ro(`text_editor_code_execution`), command: Ro(`view`), path: Ra$2() }), Co({ type: Ro(`text_editor_code_execution`), command: Ro(`create`), path: Ra$2(), file_text: Ra$2().nullish() }), Co({ type: Ro(`text_editor_code_execution`), command: Ro(`str_replace`), path: Ra$2(), old_str: Ra$2(), new_str: Ra$2() }) ]) ]))), outputSchema: Le$4, supportsDeferredResults: !0 }); var ze$4 = (e = {}) => Re$4(e); var Be$4 = Wu(() => Qu(Oo(`type`, [ Co({ type: Ro(`code_execution_result`), stdout: Ra$2(), stderr: Ra$2(), return_code: oo(), content: xo(Co({ type: Ro(`code_execution_output`), file_id: Ra$2() })).optional().default([]) }), Co({ type: Ro(`encrypted_code_execution_result`), encrypted_stdout: Ra$2(), stderr: Ra$2(), return_code: oo(), content: xo(Co({ type: Ro(`code_execution_output`), file_id: Ra$2() })).optional().default([]) }), Co({ type: Ro(`bash_code_execution_result`), content: xo(Co({ type: Ro(`bash_code_execution_output`), file_id: Ra$2() })), stdout: Ra$2(), stderr: Ra$2(), return_code: oo() }), Co({ type: Ro(`bash_code_execution_tool_result_error`), error_code: Ra$2() }), Co({ type: Ro(`text_editor_code_execution_tool_result_error`), error_code: Ra$2() }), Co({ type: Ro(`text_editor_code_execution_view_result`), content: Ra$2(), file_type: Ra$2(), num_lines: oo().nullable(), start_line: oo().nullable(), total_lines: oo().nullable() }), Co({ type: Ro(`text_editor_code_execution_create_result`), is_file_update: uo() }), Co({ type: Ro(`text_editor_code_execution_str_replace_result`), lines: xo(Ra$2()).nullable(), new_lines: oo().nullable(), new_start: oo().nullable(), old_lines: oo().nullable(), old_start: oo().nullable() }) ]))); var Ve$4 = md({ id: `anthropic.code_execution_20260120`, inputSchema: Wu(() => Qu(Oo(`type`, [ Co({ type: Ro(`programmatic-tool-call`), code: Ra$2() }), Co({ type: Ro(`bash_code_execution`), command: Ra$2() }), Oo(`command`, [ Co({ type: Ro(`text_editor_code_execution`), command: Ro(`view`), path: Ra$2() }), Co({ type: Ro(`text_editor_code_execution`), command: Ro(`create`), path: Ra$2(), file_text: Ra$2().nullish() }), Co({ type: Ro(`text_editor_code_execution`), command: Ro(`str_replace`), path: Ra$2(), old_str: Ra$2(), new_str: Ra$2() }) ]) ]))), outputSchema: Be$4, supportsDeferredResults: !0 }); var He$4 = (e = {}) => Ve$4(e); var Ue$4 = Wu(() => Qu(xo(Co({ type: Ro(`tool_reference`), toolName: Ra$2() })))); var We$4 = md({ id: `anthropic.tool_search_regex_20251119`, inputSchema: Wu(() => Qu(Co({ pattern: Ra$2(), limit: oo().optional() }))), outputSchema: Ue$4, supportsDeferredResults: !0 }); var Ge$4 = (e = {}) => We$4(e); function Ke$4(e) { return typeof e == `string` ? new TextDecoder().decode(Lc(e)) : new TextDecoder().decode(e); } function qe$4(e) { try { if (typeof e == `string`) return JSON.parse(e); if (typeof e == `object` && e) return e; } catch { let t = e?.errorCode; return { errorCode: typeof t == `string` ? t : `unavailable` }; } return {}; } async function Je$4({ prompt: e, sendReasoning: t, warnings: n, cacheControlValidator: i, toolNameMapping: a }) { let c = /* @__PURE__ */ new Set(), u = Ye$4(e), f = i || new Q$5(), p, m = []; async function h(e) { return (await ad({ provider: `anthropic`, providerOptions: e, schema: Z$5 }))?.citations?.enabled ?? !1; } async function g(e) { return (await ad({ provider: `anthropic`, providerOptions: e, schema: Z$5 }))?.containerUpload ?? !1; } async function _(e) { let t = await ad({ provider: `anthropic`, providerOptions: e, schema: Z$5 }); return { title: t?.title, context: t?.context }; } for (let e = 0; e < u.length; e++) { let i = u[e], y = e === u.length - 1, b = i.type; switch (b) { case `system`: { let e = i.messages.map(({ content: e, providerOptions: t }) => ({ type: `text`, text: e, cache_control: f.getCacheControl(t, { type: `system message`, canCache: !0 }) })); p == null ? p = e : (m.push({ role: `system`, content: e }), c.add(`mid-conversation-system-2026-04-07`)); break; } case `user`: { let e = []; for (let t of i.messages) { let { role: i, content: a } = t; switch (i) { case `user`: for (let n = 0; n < a.length; n++) { let i = a[n], s = n === a.length - 1, u = f.getCacheControl(i.providerOptions, { type: `user message part`, canCache: !0 }) ?? (s ? f.getCacheControl(t.providerOptions, { type: `user message`, canCache: !0 }) : void 0); switch (i.type) { case `text`: e.push({ type: `text`, text: i.text, cache_control: u }); break; case `file`: switch (i.data.type) { case `reference`: { let t = _d({ reference: i.data.reference, provider: `anthropic` }); c.add(`files-api-2025-04-14`), await g(i.providerOptions) ? e.push({ type: `container_upload`, file_id: t }) : el(i.mediaType) === `image` ? e.push({ type: `image`, source: { type: `file`, file_id: t }, cache_control: u }) : e.push({ type: `document`, source: { type: `file`, file_id: t }, cache_control: u }); break; } case `text`: { let t = await h(i.providerOptions), n = await _(i.providerOptions); e.push({ type: `document`, source: { type: `text`, media_type: `text/plain`, data: i.data.text }, title: n.title ?? i.filename, ...n.context && { context: n.context }, ...t && { citations: { enabled: !0 } }, cache_control: u }); break; } case `url`: case `data`: { let t = el(i.mediaType); if (t === `image`) e.push({ type: `image`, source: i.data.type === `url` ? { type: `url`, url: i.data.url.toString() } : { type: `base64`, media_type: gd({ part: i }), data: zc(i.data.data) }, cache_control: u }); else if (t === `application` && (i.data.type === `url` ? i.mediaType === `application/pdf` : gd({ part: i }) === `application/pdf`)) { c.add(`pdfs-2024-09-25`); let t = await h(i.providerOptions), n = await _(i.providerOptions); e.push({ type: `document`, source: i.data.type === `url` ? { type: `url`, url: i.data.url.toString() } : { type: `base64`, media_type: `application/pdf`, data: zc(i.data.data) }, title: n.title ?? i.filename, ...n.context && { context: n.context }, ...t && { citations: { enabled: !0 } }, cache_control: u }); } else if (i.mediaType === `text/plain`) { let t = await h(i.providerOptions), n = await _(i.providerOptions); e.push({ type: `document`, source: i.data.type === `url` ? { type: `url`, url: i.data.url.toString() } : { type: `text`, media_type: `text/plain`, data: Ke$4(i.data.data) }, title: n.title ?? i.filename, ...n.context && { context: n.context }, ...t && { citations: { enabled: !0 } }, cache_control: u }); } else throw new Ie$10({ functionality: `media type: ${i.mediaType}` }); break; } } break; } } break; case `tool`: for (let r = 0; r < a.length; r++) { let i = a[r]; if (i.type === `tool-approval-response`) continue; let l = i.output, u = `providerOptions` in l ? l.providerOptions : l.type === `content` ? l.value.find((e) => e.providerOptions != null)?.providerOptions : void 0, d = r === a.length - 1, p = f.getCacheControl(i.providerOptions, { type: `tool result part`, canCache: !0 }) ?? f.getCacheControl(u, { type: `tool result output`, canCache: !0 }) ?? (d ? f.getCacheControl(t.providerOptions, { type: `tool result message`, canCache: !0 }) : void 0), m; switch (l.type) { case `content`: m = l.value.map((e) => { switch (e.type) { case `text`: return { type: `text`, text: e.text }; case `file`: { let t = el(e.mediaType); if (e.data.type === `url`) return t === `image` ? { type: `image`, source: { type: `url`, url: e.data.url.toString() } } : { type: `document`, source: { type: `url`, url: e.data.url.toString() } }; if (e.data.type === `data`) { if (t === `image`) return { type: `image`, source: { type: `base64`, media_type: gd({ part: e }), data: zc(e.data.data) } }; if (gd({ part: e }) === `application/pdf`) return c.add(`pdfs-2024-09-25`), { type: `document`, source: { type: `base64`, media_type: `application/pdf`, data: zc(e.data.data) } }; n.push({ type: `other`, message: `unsupported tool content part type: ${e.type} with media type: ${e.mediaType}` }); return; } n.push({ type: `other`, message: `unsupported tool content part type: ${e.type} with data type: ${e.data.type}` }); return; } case `custom`: { let t = e.providerOptions?.anthropic; if (t?.type === `tool-reference`) return { type: `tool_reference`, tool_name: t.toolName }; n.push({ type: `other`, message: `unsupported custom tool content part` }); return; } default: n.push({ type: `other`, message: `unsupported tool content part type: ${e.type}` }); return; } }).filter(Nl); break; case `text`: case `error-text`: m = l.value; break; case `execution-denied`: m = l.reason ?? `Tool call execution denied.`; break; default: m = JSON.stringify(l.value); break; } e.push({ type: `tool_result`, tool_use_id: i.toolCallId, content: m, is_error: l.type === `error-text` || l.type === `error-json` ? !0 : void 0, cache_control: p }); } break; default: throw Error(`Unsupported role: ${i}`); } } m.push({ role: `user`, content: e }); break; } case `assistant`: { let e = [], r = /* @__PURE__ */ new Set(); for (let o = 0; o < i.messages.length; o++) { let s = i.messages[o], c = o === i.messages.length - 1, { content: l } = s; for (let i = 0; i < l.length; i++) { let o = l[i], u = i === l.length - 1, p = f.getCacheControl(o.providerOptions, { type: `assistant message part`, canCache: !0 }) ?? (u ? f.getCacheControl(s.providerOptions, { type: `assistant message`, canCache: !0 }) : void 0); switch (o.type) { case `text`: o.providerOptions?.anthropic?.type === `compaction` ? e.push({ type: `compaction`, content: o.text, cache_control: p }) : e.push({ type: `text`, text: y && c && u ? o.text.trim() : o.text, cache_control: p }); break; case `reasoning`: if (t) { let t = await ad({ provider: `anthropic`, providerOptions: o.providerOptions, schema: ae$4 }); t == null ? n.push({ type: `other`, message: `unsupported reasoning metadata` }) : t.signature == null ? t.redactedData == null ? n.push({ type: `other`, message: `unsupported reasoning metadata` }) : (f.getCacheControl(o.providerOptions, { type: `redacted thinking block`, canCache: !1 }), e.push({ type: `redacted_thinking`, data: t.redactedData })) : (f.getCacheControl(o.providerOptions, { type: `thinking block`, canCache: !1 }), e.push({ type: `thinking`, thinking: o.text, signature: t.signature })); } else n.push({ type: `other`, message: `sending reasoning content is disabled for this model` }); break; case `tool-call`: { if (o.providerExecuted) { let t = a.toProviderToolName(o.toolName); if (o.providerOptions?.anthropic?.type === `mcp-tool-use`) { r.add(o.toolCallId); let t = o.providerOptions?.anthropic?.serverName; if (t == null || typeof t != `string`) { n.push({ type: `other`, message: `mcp tool use server name is required and must be a string` }); break; } e.push({ type: `mcp_tool_use`, id: o.toolCallId, name: o.toolName, input: o.input, server_name: t, cache_control: p }); } else if (t === `code_execution` && o.input != null && typeof o.input == `object` && `type` in o.input && typeof o.input.type == `string` && (o.input.type === `bash_code_execution` || o.input.type === `text_editor_code_execution`)) e.push({ type: `server_tool_use`, id: o.toolCallId, name: o.input.type, input: o.input, cache_control: p }); else if (t === `code_execution` && o.input != null && typeof o.input == `object` && `type` in o.input && o.input.type === `programmatic-tool-call`) { let { type: t, ...n } = o.input; e.push({ type: `server_tool_use`, id: o.toolCallId, name: `code_execution`, input: n, cache_control: p }); } else t === `code_execution` || t === `web_fetch` || t === `web_search` || t === `tool_search_tool_regex` || t === `tool_search_tool_bm25` ? e.push({ type: `server_tool_use`, id: o.toolCallId, name: t, input: o.input, cache_control: p }) : t === `advisor` ? e.push({ type: `server_tool_use`, id: o.toolCallId, name: `advisor`, input: {}, cache_control: p }) : n.push({ type: `other`, message: `provider executed tool call for tool ${o.toolName} is not supported` }); break; } let t = o.providerOptions?.anthropic, i = t?.caller ? (t.caller.type === `code_execution_20250825` || t.caller.type === `code_execution_20260120`) && t.caller.toolId ? { type: t.caller.type, tool_id: t.caller.toolId } : t.caller.type === `direct` ? { type: `direct` } : void 0 : void 0; e.push({ type: `tool_use`, id: o.toolCallId, name: o.toolName, input: o.input, ...i && { caller: i }, cache_control: p }); break; } case `tool-result`: { let t = a.toProviderToolName(o.toolName); if (r.has(o.toolCallId)) { let t = o.output; if (t.type !== `json` && t.type !== `error-json`) { n.push({ type: `other`, message: `provider executed tool result output type ${t.type} for tool ${o.toolName} is not supported` }); break; } e.push({ type: `mcp_tool_result`, tool_use_id: o.toolCallId, is_error: t.type === `error-json`, content: t.value, cache_control: p }); } else if (t === `code_execution`) { let t = o.output; if (t.type === `error-text` || t.type === `error-json`) { let n = {}; try { typeof t.value == `string` ? n = JSON.parse(t.value) : typeof t.value == `object` && t.value !== null && (n = t.value); } catch {} n.type === `code_execution_tool_result_error` ? e.push({ type: `code_execution_tool_result`, tool_use_id: o.toolCallId, content: { type: `code_execution_tool_result_error`, error_code: n.errorCode ?? `unknown` }, cache_control: p }) : e.push({ type: `bash_code_execution_tool_result`, tool_use_id: o.toolCallId, cache_control: p, content: { type: `bash_code_execution_tool_result_error`, error_code: n.errorCode ?? `unknown` } }); break; } if (t.type !== `json`) { n.push({ type: `other`, message: `provider executed tool result output type ${t.type} for tool ${o.toolName} is not supported` }); break; } if (t.value == null || typeof t.value != `object` || !(`type` in t.value) || typeof t.value.type != `string`) { n.push({ type: `other`, message: `provider executed tool result output value is not a valid code execution result for tool ${o.toolName}` }); break; } if (t.value.type === `code_execution_result`) { let n = await $u({ value: t.value, schema: Pe$4 }); e.push({ type: `code_execution_tool_result`, tool_use_id: o.toolCallId, content: { type: n.type, stdout: n.stdout, stderr: n.stderr, return_code: n.return_code, content: n.content ?? [] }, cache_control: p }); } else if (t.value.type === `encrypted_code_execution_result`) { let n = await $u({ value: t.value, schema: Be$4 }); n.type === `encrypted_code_execution_result` && e.push({ type: `code_execution_tool_result`, tool_use_id: o.toolCallId, content: { type: n.type, encrypted_stdout: n.encrypted_stdout, stderr: n.stderr, return_code: n.return_code, content: n.content ?? [] }, cache_control: p }); } else { let n = await $u({ value: t.value, schema: Le$4 }); n.type === `code_execution_result` ? e.push({ type: `code_execution_tool_result`, tool_use_id: o.toolCallId, content: { type: n.type, stdout: n.stdout, stderr: n.stderr, return_code: n.return_code, content: n.content ?? [] }, cache_control: p }) : n.type === `bash_code_execution_result` || n.type === `bash_code_execution_tool_result_error` ? e.push({ type: `bash_code_execution_tool_result`, tool_use_id: o.toolCallId, cache_control: p, content: n }) : e.push({ type: `text_editor_code_execution_tool_result`, tool_use_id: o.toolCallId, cache_control: p, content: n }); } break; } if (t === `web_fetch`) { let t = o.output; if (t.type === `error-json`) { e.push({ type: `web_fetch_tool_result`, tool_use_id: o.toolCallId, content: { type: `web_fetch_tool_result_error`, error_code: qe$4(t.value).errorCode ?? `unavailable` }, cache_control: p }); break; } if (t.type !== `json`) { n.push({ type: `other`, message: `provider executed tool result output type ${t.type} for tool ${o.toolName} is not supported` }); break; } let r = await $u({ value: t.value, schema: ke$4 }); e.push({ type: `web_fetch_tool_result`, tool_use_id: o.toolCallId, content: { type: `web_fetch_result`, url: r.url, retrieved_at: r.retrievedAt, content: { type: `document`, title: r.content.title, citations: r.content.citations, source: { type: r.content.source.type, media_type: r.content.source.mediaType, data: r.content.source.data } } }, cache_control: p }); break; } if (t === `web_search`) { let t = o.output; if (t.type === `error-json`) { e.push({ type: `web_search_tool_result`, tool_use_id: o.toolCallId, content: { type: `web_search_tool_result_error`, error_code: qe$4(t.value).errorCode ?? `unavailable` }, cache_control: p }); break; } if (t.type !== `json`) { n.push({ type: `other`, message: `provider executed tool result output type ${t.type} for tool ${o.toolName} is not supported` }); break; } let r = await $u({ value: t.value, schema: xe$4 }); e.push({ type: `web_search_tool_result`, tool_use_id: o.toolCallId, content: r.map((e) => ({ url: e.url, title: e.title, page_age: e.pageAge, encrypted_content: e.encryptedContent, type: e.type })), cache_control: p }); break; } if (t === `tool_search_tool_regex` || t === `tool_search_tool_bm25`) { let t = o.output; if (t.type !== `json`) { n.push({ type: `other`, message: `provider executed tool result output type ${t.type} for tool ${o.toolName} is not supported` }); break; } let r = (await $u({ value: t.value, schema: Ue$4 })).map((e) => ({ type: `tool_reference`, tool_name: e.toolName })); e.push({ type: `tool_search_tool_result`, tool_use_id: o.toolCallId, content: { type: `tool_search_tool_search_result`, tool_references: r }, cache_control: p }); break; } if (t === `advisor`) { let t = o.output; if (t.type !== `json` && t.type !== `error-json`) { n.push({ type: `other`, message: `provider executed tool result output type ${t.type} for tool ${o.toolName} is not supported` }); break; } let r = await $u({ value: t.value, schema: ue$4 }); r.type === `advisor_result` ? e.push({ type: `advisor_tool_result`, tool_use_id: o.toolCallId, content: { type: `advisor_result`, text: r.text }, cache_control: p }) : r.type === `advisor_redacted_result` ? e.push({ type: `advisor_tool_result`, tool_use_id: o.toolCallId, content: { type: `advisor_redacted_result`, encrypted_content: r.encryptedContent }, cache_control: p }) : e.push({ type: `advisor_tool_result`, tool_use_id: o.toolCallId, content: { type: `advisor_tool_result_error`, error_code: r.errorCode }, cache_control: p }); break; } n.push({ type: `other`, message: `provider executed tool result for tool ${o.toolName} is not supported` }); break; } } } } m.push({ role: `assistant`, content: Xe$4(e) }); break; } default: throw Error(`content type: ${b}`); } } return { prompt: { system: p, messages: m }, betas: c }; } function Ye$4(e) { let t = [], n; for (let r of e) { let { role: e } = r; switch (e) { case `system`: n?.type !== `system` && (n = { type: `system`, messages: [] }, t.push(n)), n.messages.push(r); break; case `assistant`: n?.type !== `assistant` && (n = { type: `assistant`, messages: [] }, t.push(n)), n.messages.push(r); break; case `user`: n?.type !== `user` && (n = { type: `user`, messages: [] }, t.push(n)), n.messages.push(r); break; case `tool`: n?.type !== `user` && (n = { type: `user`, messages: [] }, t.push(n)), n.messages.push(r); break; default: throw Error(`Unsupported role: ${e}`); } } return t; } function Xe$4(e) { let t = [], n = []; function r() { t.push(...n.filter((e) => e.type !== `tool_use`), ...n.filter((e) => e.type === `tool_use`)), n = []; } for (let i of e) i.type === `thinking` || i.type === `redacted_thinking` ? (r(), t.push(i)) : n.push(i); return r(), t; } function Ze$4({ finishReason: e, isJsonResponseFromTool: t }) { switch (e) { case `pause_turn`: case `end_turn`: case `stop_sequence`: return `stop`; case `refusal`: return `content-filter`; case `tool_use`: return t ? `stop` : `tool-calls`; case `max_tokens`: case `model_context_window_exceeded`: return `length`; case `compaction`: return `other`; default: return `other`; } } var Qe$4 = /* @__PURE__ */ new Set([ `date-time`, `time`, `date`, `duration`, `email`, `hostname`, `uri`, `ipv4`, `ipv6`, `uuid` ]); var $e$4 = [ `minimum`, `maximum`, `exclusiveMinimum`, `exclusiveMaximum`, `multipleOf`, `minLength`, `maxLength`, `pattern`, `minItems`, `maxItems`, `uniqueItems`, `minProperties`, `maxProperties`, `not` ]; function et$4(e) { return tt$4(e); } function $$5(e) { return typeof e == `boolean` || !at$4(e) ? e : tt$4(e); } function tt$4(e) { let t = {}, n = e; if (e.$ref != null) return { $ref: e.$ref }; if (e.$schema != null && (t.$schema = e.$schema), e.$id != null && (t.$id = e.$id), e.title != null && (t.title = e.title), e.description != null && (t.description = e.description), e.default !== void 0 && (t.default = e.default), e.const !== void 0 && (t.const = e.const), e.enum != null && (t.enum = e.enum), e.type != null && (t.type = e.type), e.anyOf == null ? e.oneOf != null && (t.anyOf = e.oneOf.map($$5)) : t.anyOf = e.anyOf.map($$5), e.allOf != null && (t.allOf = e.allOf.map($$5)), e.definitions != null && (t.definitions = Object.fromEntries(Object.entries(e.definitions).map(([e, t]) => [e, $$5(t)]))), n.$defs != null) { let e = t; e.$defs = Object.fromEntries(Object.entries(n.$defs).map(([e, t]) => [e, $$5(t)])); } (e.type === `object` || e.properties != null) && (e.properties != null && (t.properties = Object.fromEntries(Object.entries(e.properties).map(([e, t]) => [e, $$5(t)]))), t.additionalProperties = !1, e.required != null && (t.required = e.required)), e.items != null && (t.items = Array.isArray(e.items) ? e.items.map($$5) : $$5(e.items)), typeof e.format == `string` && Qe$4.has(e.format) && (t.format = e.format); let r = nt$4(e); return r != null && (t.description = t.description == null ? r : `${t.description} ${r}`), t; } function nt$4(e) { let t = $e$4.flatMap((t) => { let n = e[t]; return n == null || n === !1 ? [] : `${rt$4(t)}: ${it$4(n)}`; }); return typeof e.format == `string` && !Qe$4.has(e.format) && t.push(`format: ${e.format}`), t.length === 0 ? void 0 : `${t.join(`; `)}.`; } function rt$4(e) { return e.replace(/[A-Z]/g, (e) => ` ${e.toLowerCase()}`); } function it$4(e) { return typeof e == `string` ? e : JSON.stringify(e); } function at$4(e) { return typeof e == `object` && !!e && !Array.isArray(e); } function ot$4(e, t, n) { if (e.type === `web_search_result_location`) return { type: `source`, sourceType: `url`, id: n(), url: e.url, title: e.title, providerMetadata: { anthropic: { citedText: e.cited_text, encryptedIndex: e.encrypted_index } } }; if (e.type !== `page_location` && e.type !== `char_location`) return; let r = t[e.document_index]; if (r) return { type: `source`, sourceType: `document`, id: n(), mediaType: r.mediaType, title: e.document_title ?? r.title, filename: r.filename, providerMetadata: { anthropic: e.type === `page_location` ? { citedText: e.cited_text, startPageNumber: e.start_page_number, endPageNumber: e.end_page_number } : { citedText: e.cited_text, startCharIndex: e.start_char_index, endCharIndex: e.end_char_index } } }; } var st$4 = class t { constructor(e, t) { this.specificationVersion = `v4`, this.modelId = e, this.config = t, this.generateId = t.generateId ?? bl; } static [Mc](e) { return Cd({ modelId: e.modelId, config: e.config }); } static [Nc](e) { return new t(e.modelId, e.config); } supportsUrl(e) { return e.protocol === `https:`; } get provider() { return this.config.provider; } get providerOptionsName() { let e = this.config.provider, t = e.indexOf(`.`); return t === -1 ? e : e.substring(0, t); } get supportedUrls() { var e; return (e = this.config).supportedUrls?.call(e) ?? {}; } async getArgs({ userSuppliedBetas: e, prompt: t, maxOutputTokens: n, temperature: r, topP: i, topK: a, frequencyPenalty: o, presencePenalty: s, stopSequences: c, responseFormat: u, seed: f, tools: p, toolChoice: m, reasoning: h, providerOptions: g, stream: v }) { let y = []; o != null && y.push({ type: `unsupported`, feature: `frequencyPenalty` }), s != null && y.push({ type: `unsupported`, feature: `presencePenalty` }), f != null && y.push({ type: `unsupported`, feature: `seed` }), r != null && r > 1 ? (y.push({ type: `unsupported`, feature: `temperature`, details: `${r} exceeds anthropic maximum of 1.0. clamped to 1.0` }), r = 1) : r != null && r < 0 && (y.push({ type: `unsupported`, feature: `temperature`, details: `${r} is below anthropic minimum of 0. clamped to 0` }), r = 0), u?.type === `json` && (u.schema ?? y.push({ type: `unsupported`, feature: `responseFormat`, details: `JSON response format requires a schema. The response format is ignored.` })); let b = this.providerOptionsName, x = await ad({ provider: `anthropic`, providerOptions: g, schema: oe$3 }), S = b === `anthropic` ? null : await ad({ provider: b, providerOptions: g, schema: oe$3 }), C = S != null, w = Object.assign({}, x ?? {}, S ?? {}), { maxOutputTokens: T, supportsStructuredOutput: E, supportsAdaptiveThinking: D, rejectsSamplingParameters: O, supportsXhighEffort: A, isKnownModel: j } = ct$4(this.modelId); O && (r != null && (y.push({ type: `unsupported`, feature: `temperature`, details: `temperature is not supported by ${this.modelId} and will be ignored` }), r = void 0), a != null && (y.push({ type: `unsupported`, feature: `topK`, details: `topK is not supported by ${this.modelId} and will be ignored` }), a = void 0), i != null && (y.push({ type: `unsupported`, feature: `topP`, details: `topP is not supported by ${this.modelId} and will be ignored` }), i = void 0)); let M = j || this.modelId.startsWith(`claude-`), ee = (this.config.supportsNativeStructuredOutput ?? !0) && E, N = (this.config.supportsStrictTools ?? !0) && E, P = w?.structuredOutputMode ?? `auto`, F = P === `outputFormat` || P === `auto` && ee, I = u?.type === `json` && u.schema != null && !F ? { type: `function`, name: `json`, description: `Respond with a JSON object.`, inputSchema: u.schema } : void 0, L = w?.contextManagement, R = new Q$5(), z = Hc({ tools: p, providerToolNames: { "anthropic.code_execution_20250522": `code_execution`, "anthropic.code_execution_20250825": `code_execution`, "anthropic.code_execution_20260120": `code_execution`, "anthropic.computer_20241022": `computer`, "anthropic.computer_20250124": `computer`, "anthropic.text_editor_20241022": `str_replace_editor`, "anthropic.text_editor_20250124": `str_replace_editor`, "anthropic.text_editor_20250429": `str_replace_based_edit_tool`, "anthropic.text_editor_20250728": `str_replace_based_edit_tool`, "anthropic.bash_20241022": `bash`, "anthropic.bash_20250124": `bash`, "anthropic.memory_20250818": `memory`, "anthropic.web_search_20250305": `web_search`, "anthropic.web_search_20260209": `web_search`, "anthropic.web_fetch_20250910": `web_fetch`, "anthropic.web_fetch_20260209": `web_fetch`, "anthropic.tool_search_regex_20251119": `tool_search_tool_regex`, "anthropic.tool_search_bm25_20251119": `tool_search_tool_bm25`, "anthropic.advisor_20260301": `advisor` } }), { prompt: B, betas: V } = await Je$4({ prompt: t, sendReasoning: w?.sendReasoning ?? !0, warnings: y, cacheControlValidator: R, toolNameMapping: z }); if (Il(h) && w?.effort == null) { let e = ut$4({ reasoning: h, supportsAdaptiveThinking: D, supportsXhighEffort: A, maxOutputTokensForModel: T, warnings: y }); e != null && (w.thinking ??= e.thinking, e.effort != null && w.thinking?.type !== `disabled` && (w.effort = e.effort)); } let H = w?.thinking?.type, U = H === `enabled` || H === `adaptive`, W = H === `enabled` ? w?.thinking?.budgetTokens : void 0, G = H === `adaptive` ? w?.thinking?.display : void 0, K = n ?? T, q = { model: this.modelId, max_tokens: K, temperature: r, top_k: a, top_p: i, stop_sequences: c, ...U && { thinking: { type: H, ...W != null && { budget_tokens: W }, ...G != null && { display: G } } }, ...(w?.effort || w?.taskBudget || F && u?.type === `json` && u.schema != null) && { output_config: { ...w?.effort && { effort: w.effort }, ...w?.taskBudget && { task_budget: { type: w.taskBudget.type, total: w.taskBudget.total, ...w.taskBudget.remaining != null && { remaining: w.taskBudget.remaining } } }, ...F && u?.type === `json` && u.schema != null && { format: { type: `json_schema`, schema: et$4(u.schema) } } } }, ...w?.speed && { speed: w.speed }, ...w?.inferenceGeo && { inference_geo: w.inferenceGeo }, ...w?.fallbacks && w.fallbacks.length > 0 && { fallbacks: w.fallbacks }, ...w?.cacheControl && { cache_control: w.cacheControl }, ...w?.metadata?.userId != null && { metadata: { user_id: w.metadata.userId } }, ...w?.mcpServers && w.mcpServers.length > 0 && { mcp_servers: w.mcpServers.map((e) => ({ type: e.type, name: e.name, url: e.url, authorization_token: e.authorizationToken, tool_configuration: e.toolConfiguration ? { allowed_tools: e.toolConfiguration.allowedTools, enabled: e.toolConfiguration.enabled } : void 0 })) }, ...w?.container && { container: w.container.skills && w.container.skills.length > 0 ? { id: w.container.id, skills: w.container.skills.map((e) => ({ type: e.type, skill_id: e.type === `custom` ? _d({ reference: e.providerReference, provider: `anthropic` }) : e.skillId, version: e.version })) } : w.container.id }, system: B.system, messages: B.messages, ...L && { context_management: { edits: L.edits.map((e) => { let t = e.type; switch (t) { case `clear_tool_uses_20250919`: return { type: e.type, ...e.trigger !== void 0 && { trigger: e.trigger }, ...e.keep !== void 0 && { keep: e.keep }, ...e.clearAtLeast !== void 0 && { clear_at_least: e.clearAtLeast }, ...e.clearToolInputs !== void 0 && { clear_tool_inputs: e.clearToolInputs }, ...e.excludeTools !== void 0 && { exclude_tools: e.excludeTools } }; case `clear_thinking_20251015`: return { type: e.type, ...e.keep !== void 0 && { keep: e.keep } }; case `compact_20260112`: return { type: e.type, ...e.trigger !== void 0 && { trigger: e.trigger }, ...e.pauseAfterCompaction !== void 0 && { pause_after_compaction: e.pauseAfterCompaction }, ...e.instructions !== void 0 && { instructions: e.instructions } }; default: y.push({ type: `other`, message: `Unknown context management strategy: ${t}` }); return; } }).filter((e) => e !== void 0) } } }; U ? (H === `enabled` && W == null && (y.push({ type: `compatibility`, feature: `extended thinking`, details: `thinking budget is required when thinking is enabled. using default budget of 1024 tokens.` }), q.thinking = { type: `enabled`, budget_tokens: 1024 }, W = 1024), q.temperature != null && (q.temperature = void 0, y.push({ type: `unsupported`, feature: `temperature`, details: `temperature is not supported when thinking is enabled` })), a != null && (q.top_k = void 0, y.push({ type: `unsupported`, feature: `topK`, details: `topK is not supported when thinking is enabled` })), i != null && (q.top_p = void 0, y.push({ type: `unsupported`, feature: `topP`, details: `topP is not supported when thinking is enabled` })), q.max_tokens = K + (W ?? 0)) : M && i != null && r != null && (y.push({ type: `unsupported`, feature: `topP`, details: `topP is not supported when temperature is set. topP is ignored.` }), q.top_p = void 0), j && q.max_tokens > T && (n != null && y.push({ type: `unsupported`, feature: `maxOutputTokens`, details: `${q.max_tokens} (maxOutputTokens + thinkingBudget) is greater than ${this.modelId} ${T} max output tokens. The max output tokens have been limited to ${T}.` }), q.max_tokens = T), w?.mcpServers && w.mcpServers.length > 0 && V.add(`mcp-client-2025-04-04`), L && (V.add(`context-management-2025-06-27`), L.edits.some((e) => e.type === `compact_20260112`) && V.add(`compact-2026-01-12`)), w?.container && w.container.skills && w.container.skills.length > 0 && (V.add(`code-execution-2025-08-25`), V.add(`skills-2025-10-02`), V.add(`files-api-2025-04-14`), p?.some((e) => e.type === `provider` && (e.id === `anthropic.code_execution_20250825` || e.id === `anthropic.code_execution_20260120`)) || y.push({ type: `other`, message: `code execution tool is required when using skills` })), w?.taskBudget && V.add(`task-budgets-2026-03-13`), w?.speed === `fast` && V.add(`fast-mode-2026-02-01`), w?.fallbacks && w.fallbacks.length > 0 && V.add(`server-side-fallback-2026-06-01`); let J = v && (w?.toolStreaming ?? !0), { tools: Y, toolChoice: te, toolWarnings: ne, betas: X } = await Me$4(I == null ? { tools: p ?? [], toolChoice: m, disableParallelToolUse: w?.disableParallelToolUse, cacheControlValidator: R, supportsStructuredOutput: ee, supportsStrictTools: N, defaultEagerInputStreaming: J } : { tools: [...p ?? [], I], toolChoice: { type: `required` }, disableParallelToolUse: !0, cacheControlValidator: R, supportsStructuredOutput: !1, supportsStrictTools: N, defaultEagerInputStreaming: J }), re = R.getWarnings(); return { args: { ...q, tools: Y, tool_choice: te, stream: v === !0 ? !0 : void 0 }, warnings: [ ...y, ...ne, ...re ], betas: /* @__PURE__ */ new Set([ ...V, ...X, ...e, ...w?.anthropicBeta ?? [] ]), usesJsonResponseTool: I != null, toolNameMapping: z, providerOptionsName: b, usedCustomProviderKey: C }; } async getHeaders({ betas: e, headers: t }) { return Pc(this.config.headers ? await hd(this.config.headers) : void 0, t, e.size > 0 ? { "anthropic-beta": Array.from(e).join(`,`) } : {}); } async getBetasFromHeaders(e) { let t = (this.config.headers ? await hd(this.config.headers) : void 0)?.[`anthropic-beta`] ?? ``, n = e?.[`anthropic-beta`] ?? ``; return new Set([...t.toLowerCase().split(`,`), ...n.toLowerCase().split(`,`)].map((e) => e.trim()).filter((e) => e !== ``)); } buildRequestUrl(e) { var t; return (t = this.config).buildRequestUrl?.call(t, this.config.baseURL, e) ?? `${this.config.baseURL}/messages`; } transformRequestBody(e, t) { var n; return (n = this.config).transformRequestBody?.call(n, e, t) ?? e; } extractCitationDocuments(e) { return e.filter((e) => e.role === `user`).flatMap((e) => e.content).filter((e) => e.type !== `file` || e.mediaType !== `application/pdf` && e.mediaType !== `text/plain` ? !1 : e.providerOptions?.anthropic?.citations?.enabled ?? !1).map((e) => { let t = e; return { title: t.filename ?? `Untitled Document`, filename: t.filename, mediaType: t.mediaType }; }); } async doGenerate(e) { let { args: t, warnings: n, betas: r, usesJsonResponseTool: i, toolNameMapping: a, providerOptionsName: o, usedCustomProviderKey: s } = await this.getArgs({ ...e, stream: !1, userSuppliedBetas: await this.getBetasFromHeaders(e.headers) }), c = [...this.extractCitationDocuments(e.prompt)], l = lt$4(t.tools), { responseHeaders: u, value: d, rawValue: f } = await sd({ url: this.buildRequestUrl(!1), headers: await this.getHeaders({ betas: r, headers: e.headers }), body: this.transformRequestBody(t, r), failedResponseHandler: Y$5, successfulResponseHandler: bd(re$3), abortSignal: e.abortSignal, fetch: this.config.fetch }), p = [], m = {}, h = {}, g = !1; for (let e of d.content) switch (e.type) { case `text`: if (!i && (p.push({ type: `text`, text: e.text }), e.citations)) for (let t of e.citations) { let e = ot$4(t, c, this.generateId); e && p.push(e); } break; case `thinking`: p.push({ type: `reasoning`, text: e.thinking, providerMetadata: { anthropic: { signature: e.signature } } }); break; case `redacted_thinking`: p.push({ type: `reasoning`, text: ``, providerMetadata: { anthropic: { redactedData: e.data } } }); break; case `compaction`: p.push({ type: `text`, text: e.content, providerMetadata: { anthropic: { type: `compaction` } } }); break; case `tool_use`: if (i && e.name === `json`) g = !0, p.push({ type: `text`, text: JSON.stringify(e.input) }); else { let t = e.caller, n = t ? { type: t.type, toolId: `tool_id` in t ? t.tool_id : void 0 } : void 0; p.push({ type: `tool-call`, toolCallId: e.id, toolName: e.name, input: JSON.stringify(e.input), ...n && { providerMetadata: { anthropic: { caller: n } } } }); } break; case `server_tool_use`: if (e.name === `text_editor_code_execution` || e.name === `bash_code_execution`) p.push({ type: `tool-call`, toolCallId: e.id, toolName: a.toCustomToolName(`code_execution`), input: JSON.stringify({ type: e.name, ...e.input }), providerExecuted: !0, ...l ? { dynamic: !0 } : {} }); else if (e.name === `web_search` || e.name === `code_execution` || e.name === `web_fetch`) { let t = e.name === `code_execution` && e.input != null && typeof e.input == `object` && `code` in e.input && !(`type` in e.input) ? { type: `programmatic-tool-call`, ...e.input } : e.input; p.push({ type: `tool-call`, toolCallId: e.id, toolName: a.toCustomToolName(e.name), input: JSON.stringify(t), providerExecuted: !0, ...l && e.name === `code_execution` ? { dynamic: !0 } : {} }); } else e.name === `tool_search_tool_regex` || e.name === `tool_search_tool_bm25` ? (h[e.id] = e.name, p.push({ type: `tool-call`, toolCallId: e.id, toolName: a.toCustomToolName(e.name), input: JSON.stringify(e.input), providerExecuted: !0 })) : e.name === `advisor` && p.push({ type: `tool-call`, toolCallId: e.id, toolName: a.toCustomToolName(`advisor`), input: JSON.stringify(e.input), providerExecuted: !0 }); break; case `mcp_tool_use`: m[e.id] = { type: `tool-call`, toolCallId: e.id, toolName: e.name, input: JSON.stringify(e.input), providerExecuted: !0, dynamic: !0, providerMetadata: { anthropic: { type: `mcp-tool-use`, serverName: e.server_name } } }, p.push(m[e.id]); break; case `mcp_tool_result`: p.push({ type: `tool-result`, toolCallId: e.tool_use_id, toolName: m[e.tool_use_id].toolName, isError: e.is_error, result: e.content, dynamic: !0, providerMetadata: m[e.tool_use_id].providerMetadata }); break; case `web_fetch_tool_result`: e.content.type === `web_fetch_result` ? (c.push({ title: e.content.content.title ?? e.content.url, mediaType: e.content.content.source.media_type }), p.push({ type: `tool-result`, toolCallId: e.tool_use_id, toolName: a.toCustomToolName(`web_fetch`), result: { type: `web_fetch_result`, url: e.content.url, retrievedAt: e.content.retrieved_at, content: { type: e.content.content.type, title: e.content.content.title, citations: e.content.content.citations, source: { type: e.content.content.source.type, mediaType: e.content.content.source.media_type, data: e.content.content.source.data } } } })) : e.content.type === `web_fetch_tool_result_error` && p.push({ type: `tool-result`, toolCallId: e.tool_use_id, toolName: a.toCustomToolName(`web_fetch`), isError: !0, result: { type: `web_fetch_tool_result_error`, errorCode: e.content.error_code } }); break; case `web_search_tool_result`: if (Array.isArray(e.content)) { p.push({ type: `tool-result`, toolCallId: e.tool_use_id, toolName: a.toCustomToolName(`web_search`), result: e.content.map((e) => ({ url: e.url, title: e.title, pageAge: e.page_age ?? null, encryptedContent: e.encrypted_content, type: e.type })) }); for (let t of e.content) p.push({ type: `source`, sourceType: `url`, id: this.generateId(), url: t.url, title: t.title, providerMetadata: { anthropic: { pageAge: t.page_age ?? null } } }); } else p.push({ type: `tool-result`, toolCallId: e.tool_use_id, toolName: a.toCustomToolName(`web_search`), isError: !0, result: { type: `web_search_tool_result_error`, errorCode: e.content.error_code } }); break; case `code_execution_tool_result`: e.content.type === `code_execution_result` ? p.push({ type: `tool-result`, toolCallId: e.tool_use_id, toolName: a.toCustomToolName(`code_execution`), result: { type: e.content.type, stdout: e.content.stdout, stderr: e.content.stderr, return_code: e.content.return_code, content: e.content.content ?? [] } }) : e.content.type === `encrypted_code_execution_result` ? p.push({ type: `tool-result`, toolCallId: e.tool_use_id, toolName: a.toCustomToolName(`code_execution`), result: { type: e.content.type, encrypted_stdout: e.content.encrypted_stdout, stderr: e.content.stderr, return_code: e.content.return_code, content: e.content.content ?? [] } }) : e.content.type === `code_execution_tool_result_error` && p.push({ type: `tool-result`, toolCallId: e.tool_use_id, toolName: a.toCustomToolName(`code_execution`), isError: !0, result: { type: `code_execution_tool_result_error`, errorCode: e.content.error_code } }); break; case `bash_code_execution_tool_result`: case `text_editor_code_execution_tool_result`: p.push({ type: `tool-result`, toolCallId: e.tool_use_id, toolName: a.toCustomToolName(`code_execution`), result: e.content }); break; case `tool_search_tool_result`: { let t = h[e.tool_use_id]; if (t == null) { let e = a.toCustomToolName(`tool_search_tool_bm25`); a.toCustomToolName(`tool_search_tool_regex`), t = e === `tool_search_tool_bm25` ? `tool_search_tool_regex` : `tool_search_tool_bm25`; } e.content.type === `tool_search_tool_search_result` ? p.push({ type: `tool-result`, toolCallId: e.tool_use_id, toolName: a.toCustomToolName(t), result: e.content.tool_references.map((e) => ({ type: e.type, toolName: e.tool_name })) }) : p.push({ type: `tool-result`, toolCallId: e.tool_use_id, toolName: a.toCustomToolName(t), isError: !0, result: { type: `tool_search_tool_result_error`, errorCode: e.content.error_code } }); break; } case `advisor_tool_result`: { let t = a.toCustomToolName(`advisor`); e.content.type === `advisor_result` ? p.push({ type: `tool-result`, toolCallId: e.tool_use_id, toolName: t, result: { type: `advisor_result`, text: e.content.text } }) : e.content.type === `advisor_redacted_result` ? p.push({ type: `tool-result`, toolCallId: e.tool_use_id, toolName: t, result: { type: `advisor_redacted_result`, encryptedContent: e.content.encrypted_content } }) : p.push({ type: `tool-result`, toolCallId: e.tool_use_id, toolName: t, isError: !0, result: { type: `advisor_tool_result_error`, errorCode: e.content.error_code } }); break; } case `fallback`: break; } return { content: p, finishReason: { unified: Ze$4({ finishReason: d.stop_reason, isJsonResponseFromTool: g }), raw: d.stop_reason ?? void 0 }, usage: Ne$4({ usage: d.usage }), request: { body: t }, response: { id: d.id ?? void 0, modelId: d.model ?? void 0, headers: u, body: f }, warnings: n, providerMetadata: (() => { let e = ft$4(d.stop_details), t = { usage: d.usage, stopSequence: d.stop_sequence ?? null, ...e == null ? {} : { stopDetails: e }, iterations: d.usage.iterations ? d.usage.iterations.map((e) => ({ type: e.type, ...e.model == null ? {} : { model: e.model }, inputTokens: e.input_tokens, outputTokens: e.output_tokens, ...e.cache_creation_input_tokens ? { cacheCreationInputTokens: e.cache_creation_input_tokens } : {}, ...e.cache_read_input_tokens ? { cacheReadInputTokens: e.cache_read_input_tokens } : {} })) : null, container: d.container ? { expiresAt: d.container.expires_at, id: d.container.id, skills: d.container.skills?.map((e) => ({ type: e.type, skillId: e.skill_id, version: e.version })) ?? null } : null, contextManagement: dt$4(d.context_management) ?? null }, n = { anthropic: t }; return s && o !== `anthropic` && (n[o] = t), n; })() }; } async doStream(t) { "use step"; let { args: n, warnings: r, betas: i, usesJsonResponseTool: a, toolNameMapping: o, providerOptionsName: s, usedCustomProviderKey: c } = await this.getArgs({ ...t, stream: !0, userSuppliedBetas: await this.getBetasFromHeaders(t.headers) }), l = [...this.extractCitationDocuments(t.prompt)], u = lt$4(n.tools), d = this.buildRequestUrl(!0), { responseHeaders: f, value: p } = await sd({ url: d, headers: await this.getHeaders({ betas: i, headers: t.headers }), body: this.transformRequestBody(n, i), failedResponseHandler: Y$5, successfulResponseHandler: yd(ie$3), abortSignal: t.abortSignal, fetch: this.config.fetch }), m = { unified: `other`, raw: void 0 }, h = { input_tokens: 0, output_tokens: 0, cache_creation_input_tokens: 0, cache_read_input_tokens: 0, iterations: null }, g = {}, _ = {}, v = {}, y = null, b, x = null, S, C = null, w = !1, T, E = this.generateId, [D, O] = p.pipeThrough(new TransformStream({ start(e) { e.enqueue({ type: `stream-start`, warnings: r }); }, transform(e, n) { if (t.includeRawChunks && n.enqueue({ type: `raw`, rawValue: e.rawValue }), !e.success) { n.enqueue({ type: `error`, error: e.error }); return; } let r = e.value; switch (r.type) { case `ping`: return; case `content_block_start`: { let e = r.content_block, t = e.type; if (t === `fallback`) return; switch (T = t, t) { case `text`: if (a) return; g[r.index] = { type: `text` }, n.enqueue({ type: `text-start`, id: String(r.index) }); return; case `thinking`: g[r.index] = { type: `reasoning` }, n.enqueue({ type: `reasoning-start`, id: String(r.index) }); return; case `redacted_thinking`: g[r.index] = { type: `reasoning` }, n.enqueue({ type: `reasoning-start`, id: String(r.index), providerMetadata: { anthropic: { redactedData: e.data } } }); return; case `compaction`: g[r.index] = { type: `text` }, n.enqueue({ type: `text-start`, id: String(r.index), providerMetadata: { anthropic: { type: `compaction` } } }); return; case `tool_use`: if (a && e.name === `json`) w = !0, g[r.index] = { type: `text` }, n.enqueue({ type: `text-start`, id: String(r.index) }); else { let t = e.caller, i = t ? { type: t.type, toolId: `tool_id` in t ? t.tool_id : void 0 } : void 0, a = e.input && Object.keys(e.input).length > 0 ? JSON.stringify(e.input) : ``; g[r.index] = { type: `tool-call`, toolCallId: e.id, toolName: e.name, input: a, firstDelta: a.length === 0, ...i && { caller: i } }, n.enqueue({ type: `tool-input-start`, id: e.id, toolName: e.name }); } return; case `server_tool_use`: if ([ `web_fetch`, `web_search`, `code_execution`, `text_editor_code_execution`, `bash_code_execution` ].includes(e.name)) { let t = e.name === `text_editor_code_execution` || e.name === `bash_code_execution` ? `code_execution` : e.name, i = o.toCustomToolName(t), a = e.input != null && typeof e.input == `object` && Object.keys(e.input).length > 0 ? JSON.stringify(e.input) : ``; g[r.index] = { type: `tool-call`, toolCallId: e.id, toolName: i, input: a, providerExecuted: !0, ...u && t === `code_execution` ? { dynamic: !0 } : {}, firstDelta: !0, providerToolName: t }, n.enqueue({ type: `tool-input-start`, id: e.id, toolName: i, providerExecuted: !0, ...u && t === `code_execution` ? { dynamic: !0 } : {} }); } else if (e.name === `tool_search_tool_regex` || e.name === `tool_search_tool_bm25`) { v[e.id] = e.name; let t = o.toCustomToolName(e.name); g[r.index] = { type: `tool-call`, toolCallId: e.id, toolName: t, input: ``, providerExecuted: !0, firstDelta: !0, providerToolName: e.name }, n.enqueue({ type: `tool-input-start`, id: e.id, toolName: t, providerExecuted: !0 }); } else if (e.name === `advisor`) { let t = o.toCustomToolName(`advisor`); g[r.index] = { type: `tool-call`, toolCallId: e.id, toolName: t, input: `{}`, providerExecuted: !0, firstDelta: !0, providerToolName: e.name }, n.enqueue({ type: `tool-input-start`, id: e.id, toolName: t, providerExecuted: !0 }); } return; case `web_fetch_tool_result`: e.content.type === `web_fetch_result` ? (l.push({ title: e.content.content.title ?? e.content.url, mediaType: e.content.content.source.media_type }), n.enqueue({ type: `tool-result`, toolCallId: e.tool_use_id, toolName: o.toCustomToolName(`web_fetch`), result: { type: `web_fetch_result`, url: e.content.url, retrievedAt: e.content.retrieved_at, content: { type: e.content.content.type, title: e.content.content.title, citations: e.content.content.citations, source: { type: e.content.content.source.type, mediaType: e.content.content.source.media_type, data: e.content.content.source.data } } } })) : e.content.type === `web_fetch_tool_result_error` && n.enqueue({ type: `tool-result`, toolCallId: e.tool_use_id, toolName: o.toCustomToolName(`web_fetch`), isError: !0, result: { type: `web_fetch_tool_result_error`, errorCode: e.content.error_code } }); return; case `web_search_tool_result`: if (Array.isArray(e.content)) { n.enqueue({ type: `tool-result`, toolCallId: e.tool_use_id, toolName: o.toCustomToolName(`web_search`), result: e.content.map((e) => ({ url: e.url, title: e.title, pageAge: e.page_age ?? null, encryptedContent: e.encrypted_content, type: e.type })) }); for (let t of e.content) n.enqueue({ type: `source`, sourceType: `url`, id: E(), url: t.url, title: t.title, providerMetadata: { anthropic: { pageAge: t.page_age ?? null } } }); } else n.enqueue({ type: `tool-result`, toolCallId: e.tool_use_id, toolName: o.toCustomToolName(`web_search`), isError: !0, result: { type: `web_search_tool_result_error`, errorCode: e.content.error_code } }); return; case `code_execution_tool_result`: e.content.type === `code_execution_result` ? n.enqueue({ type: `tool-result`, toolCallId: e.tool_use_id, toolName: o.toCustomToolName(`code_execution`), result: { type: e.content.type, stdout: e.content.stdout, stderr: e.content.stderr, return_code: e.content.return_code, content: e.content.content ?? [] } }) : e.content.type === `encrypted_code_execution_result` ? n.enqueue({ type: `tool-result`, toolCallId: e.tool_use_id, toolName: o.toCustomToolName(`code_execution`), result: { type: e.content.type, encrypted_stdout: e.content.encrypted_stdout, stderr: e.content.stderr, return_code: e.content.return_code, content: e.content.content ?? [] } }) : e.content.type === `code_execution_tool_result_error` && n.enqueue({ type: `tool-result`, toolCallId: e.tool_use_id, toolName: o.toCustomToolName(`code_execution`), isError: !0, result: { type: `code_execution_tool_result_error`, errorCode: e.content.error_code } }); return; case `bash_code_execution_tool_result`: case `text_editor_code_execution_tool_result`: n.enqueue({ type: `tool-result`, toolCallId: e.tool_use_id, toolName: o.toCustomToolName(`code_execution`), result: e.content }); return; case `tool_search_tool_result`: { let t = v[e.tool_use_id]; if (t == null) { let e = o.toCustomToolName(`tool_search_tool_bm25`); o.toCustomToolName(`tool_search_tool_regex`), t = e === `tool_search_tool_bm25` ? `tool_search_tool_regex` : `tool_search_tool_bm25`; } e.content.type === `tool_search_tool_search_result` ? n.enqueue({ type: `tool-result`, toolCallId: e.tool_use_id, toolName: o.toCustomToolName(t), result: e.content.tool_references.map((e) => ({ type: e.type, toolName: e.tool_name })) }) : n.enqueue({ type: `tool-result`, toolCallId: e.tool_use_id, toolName: o.toCustomToolName(t), isError: !0, result: { type: `tool_search_tool_result_error`, errorCode: e.content.error_code } }); return; } case `advisor_tool_result`: { let t = o.toCustomToolName(`advisor`); e.content.type === `advisor_result` ? n.enqueue({ type: `tool-result`, toolCallId: e.tool_use_id, toolName: t, result: { type: `advisor_result`, text: e.content.text } }) : e.content.type === `advisor_redacted_result` ? n.enqueue({ type: `tool-result`, toolCallId: e.tool_use_id, toolName: t, result: { type: `advisor_redacted_result`, encryptedContent: e.content.encrypted_content } }) : n.enqueue({ type: `tool-result`, toolCallId: e.tool_use_id, toolName: t, isError: !0, result: { type: `advisor_tool_result_error`, errorCode: e.content.error_code } }); return; } case `mcp_tool_use`: _[e.id] = { type: `tool-call`, toolCallId: e.id, toolName: e.name, input: JSON.stringify(e.input), providerExecuted: !0, dynamic: !0, providerMetadata: { anthropic: { type: `mcp-tool-use`, serverName: e.server_name } } }, n.enqueue(_[e.id]); return; case `mcp_tool_result`: n.enqueue({ type: `tool-result`, toolCallId: e.tool_use_id, toolName: _[e.tool_use_id].toolName, isError: e.is_error, result: e.content, dynamic: !0, providerMetadata: _[e.tool_use_id].providerMetadata }); return; default: throw Error(`Unsupported content block type: ${t}`); } } case `content_block_stop`: if (g[r.index] != null) { let e = g[r.index]; switch (e.type) { case `text`: n.enqueue({ type: `text-end`, id: String(r.index) }); break; case `reasoning`: n.enqueue({ type: `reasoning-end`, id: String(r.index) }); break; case `tool-call`: if (!(a && e.toolName === `json`)) { n.enqueue({ type: `tool-input-end`, id: e.toolCallId }); let t = e.input === `` ? `{}` : e.input; if (e.providerToolName === `code_execution`) try { let e = JSON.parse(t); typeof e == `object` && e && `code` in e && !(`type` in e) && (t = JSON.stringify({ type: `programmatic-tool-call`, ...e })); } catch {} n.enqueue({ type: `tool-call`, toolCallId: e.toolCallId, toolName: e.toolName, input: t, providerExecuted: e.providerExecuted, ...u && e.providerToolName === `code_execution` ? { dynamic: !0 } : {}, ...e.caller && { providerMetadata: { anthropic: { caller: e.caller } } } }); } break; } delete g[r.index]; } T = void 0; return; case `content_block_delta`: { let e = r.delta.type; switch (e) { case `text_delta`: if (a) return; n.enqueue({ type: `text-delta`, id: String(r.index), delta: r.delta.text }); return; case `thinking_delta`: n.enqueue({ type: `reasoning-delta`, id: String(r.index), delta: r.delta.thinking }); return; case `signature_delta`: T === `thinking` && n.enqueue({ type: `reasoning-delta`, id: String(r.index), delta: ``, providerMetadata: { anthropic: { signature: r.delta.signature } } }); return; case `compaction_delta`: r.delta.content != null && n.enqueue({ type: `text-delta`, id: String(r.index), delta: r.delta.content }); return; case `input_json_delta`: { let e = g[r.index], t = r.delta.partial_json; if (t.length === 0) return; if (w) { if (e?.type !== `text`) return; n.enqueue({ type: `text-delta`, id: String(r.index), delta: t }); } else { if (e?.type !== `tool-call`) return; e.firstDelta && e.providerToolName === `code_execution` && (t = `{"type": "programmatic-tool-call",${t.substring(1)}`), n.enqueue({ type: `tool-input-delta`, id: e.toolCallId, delta: t }), e.input += t, e.firstDelta = !1; } return; } case `citations_delta`: { let e = r.delta.citation, t = ot$4(e, l, E); t && n.enqueue(t); return; } default: throw Error(`Unsupported delta type: ${e}`); } } case `message_start`: if (h.input_tokens = r.message.usage.input_tokens, h.cache_read_input_tokens = r.message.usage.cache_read_input_tokens ?? 0, h.cache_creation_input_tokens = r.message.usage.cache_creation_input_tokens ?? 0, b = { ...r.message.usage }, r.message.container != null && (C = { expiresAt: r.message.container.expires_at, id: r.message.container.id, skills: null }), r.message.stop_reason != null && (m = { unified: Ze$4({ finishReason: r.message.stop_reason, isJsonResponseFromTool: w }), raw: r.message.stop_reason }), n.enqueue({ type: `response-metadata`, id: r.message.id ?? void 0, modelId: r.message.model ?? void 0 }), r.message.content != null) for (let e = 0; e < r.message.content.length; e++) { let t = r.message.content[e]; if (t.type === `tool_use`) { let e = t.caller, r = e ? { type: e.type, toolId: `tool_id` in e ? e.tool_id : void 0 } : void 0; n.enqueue({ type: `tool-input-start`, id: t.id, toolName: t.name }); let i = JSON.stringify(t.input ?? {}); n.enqueue({ type: `tool-input-delta`, id: t.id, delta: i }), n.enqueue({ type: `tool-input-end`, id: t.id }), n.enqueue({ type: `tool-call`, toolCallId: t.id, toolName: t.name, input: i, ...r && { providerMetadata: { anthropic: { caller: r } } } }); } } return; case `message_delta`: r.usage.input_tokens != null && h.input_tokens !== r.usage.input_tokens && (h.input_tokens = r.usage.input_tokens), h.output_tokens = r.usage.output_tokens, r.usage.cache_read_input_tokens != null && (h.cache_read_input_tokens = r.usage.cache_read_input_tokens), r.usage.cache_creation_input_tokens != null && (h.cache_creation_input_tokens = r.usage.cache_creation_input_tokens), r.usage.iterations != null && (h.iterations = r.usage.iterations), m = { unified: Ze$4({ finishReason: r.delta.stop_reason, isJsonResponseFromTool: w }), raw: r.delta.stop_reason ?? void 0 }, x = r.delta.stop_sequence ?? null, S = ft$4(r.delta.stop_details), C = r.delta.container == null ? null : { expiresAt: r.delta.container.expires_at, id: r.delta.container.id, skills: r.delta.container.skills?.map((e) => ({ type: e.type, skillId: e.skill_id, version: e.version })) ?? null }, r.context_management && (y = dt$4(r.context_management)), b = { ...b, ...r.usage }; return; case `message_stop`: { let e = { usage: b ?? null, stopSequence: x, ...S == null ? {} : { stopDetails: S }, iterations: h.iterations ? h.iterations.map((e) => ({ type: e.type, ...e.model == null ? {} : { model: e.model }, inputTokens: e.input_tokens, outputTokens: e.output_tokens, ...e.cache_creation_input_tokens ? { cacheCreationInputTokens: e.cache_creation_input_tokens } : {}, ...e.cache_read_input_tokens ? { cacheReadInputTokens: e.cache_read_input_tokens } : {} })) : null, container: C, contextManagement: y }, t = { anthropic: e }; c && s !== `anthropic` && (t[s] = e), n.enqueue({ type: `finish`, finishReason: m, usage: Ne$4({ usage: h, rawUsage: b }), providerMetadata: t }); return; } case `error`: n.enqueue({ type: `error`, error: r.error }); return; default: throw Error(`Unsupported chunk type: ${r}`); } } })).tee(), k = D.getReader(); try { await k.read(); let t = await k.read(); if (t.value?.type === `raw` && (t = await k.read()), t.value?.type === `error`) { let r = t.value.error; throw new c$14({ message: r.message, url: d, requestBodyValues: n, statusCode: r.type === `overloaded_error` ? 529 : 500, responseHeaders: f, responseBody: JSON.stringify(r), isRetryable: r.type === `overloaded_error` }); } } finally { k.cancel().catch(() => {}), k.releaseLock(); } return { stream: O, request: { body: n }, response: { headers: f } }; } }; function ct$4(e) { return e.includes(`claude-opus-4-8`) || e.includes(`claude-opus-4-7`) || e.includes(`claude-fable-5`) ? { maxOutputTokens: 128e3, supportsStructuredOutput: !0, supportsAdaptiveThinking: !0, rejectsSamplingParameters: !0, supportsXhighEffort: !0, isKnownModel: !0 } : e.includes(`claude-sonnet-4-6`) || e.includes(`claude-opus-4-6`) ? { maxOutputTokens: 128e3, supportsStructuredOutput: !0, supportsAdaptiveThinking: !0, rejectsSamplingParameters: !1, supportsXhighEffort: !1, isKnownModel: !0 } : e.includes(`claude-sonnet-4-5`) || e.includes(`claude-opus-4-5`) || e.includes(`claude-haiku-4-5`) ? { maxOutputTokens: 64e3, supportsStructuredOutput: !0, supportsAdaptiveThinking: !1, rejectsSamplingParameters: !1, supportsXhighEffort: !1, isKnownModel: !0 } : e.includes(`claude-opus-4-1`) ? { maxOutputTokens: 32e3, supportsStructuredOutput: !0, supportsAdaptiveThinking: !1, rejectsSamplingParameters: !1, supportsXhighEffort: !1, isKnownModel: !0 } : e.includes(`claude-sonnet-4-`) ? { maxOutputTokens: 64e3, supportsStructuredOutput: !1, supportsAdaptiveThinking: !1, rejectsSamplingParameters: !1, supportsXhighEffort: !1, isKnownModel: !0 } : e.includes(`claude-opus-4-`) ? { maxOutputTokens: 32e3, supportsStructuredOutput: !1, supportsAdaptiveThinking: !1, rejectsSamplingParameters: !1, supportsXhighEffort: !1, isKnownModel: !0 } : e.includes(`claude-3-haiku`) ? { maxOutputTokens: 4096, supportsStructuredOutput: !1, supportsAdaptiveThinking: !1, rejectsSamplingParameters: !1, supportsXhighEffort: !1, isKnownModel: !0 } : { maxOutputTokens: 4096, supportsStructuredOutput: !1, supportsAdaptiveThinking: !1, rejectsSamplingParameters: !1, supportsXhighEffort: !1, isKnownModel: !1 }; } function lt$4(e) { if (!e) return !1; let t = !1, n = !1; for (let r of e) { if (`type` in r && (r.type === `web_fetch_20260209` || r.type === `web_search_20260209`)) { t = !0; continue; } if (r.name === `code_execution`) { n = !0; break; } } return t && !n; } function ut$4({ reasoning: e, supportsAdaptiveThinking: t, supportsXhighEffort: n, maxOutputTokensForModel: r, warnings: i }) { if (!Il(e)) return; if (e === `none`) return { thinking: { type: `disabled` } }; if (t) return { thinking: { type: `adaptive` }, effort: Ll({ reasoning: e, effortMap: { minimal: `low`, low: `low`, medium: `medium`, high: `high`, xhigh: n ? `xhigh` : `max` }, warnings: i }) }; let a = zl({ reasoning: e, maxOutputTokens: r, maxReasoningBudget: r, warnings: i }); if (a != null) return { thinking: { type: `enabled`, budgetTokens: a } }; } function dt$4(e) { return e ? { appliedEdits: e.applied_edits.map((e) => { switch (e.type) { case `clear_tool_uses_20250919`: return { type: e.type, clearedToolUses: e.cleared_tool_uses, clearedInputTokens: e.cleared_input_tokens }; case `clear_thinking_20251015`: return { type: e.type, clearedThinkingTurns: e.cleared_thinking_turns, clearedInputTokens: e.cleared_input_tokens }; case `compact_20260112`: return { type: e.type }; } }).filter((e) => e !== void 0) } : null; } function ft$4(e) { if (e != null) return { type: e.type, ...e.category == null ? {} : { category: e.category }, ...e.explanation == null ? {} : { explanation: e.explanation }, ...e.recommended_model == null ? {} : { recommendedModel: e.recommended_model } }; } var pt$4 = fd({ id: `anthropic.bash_20241022`, inputSchema: Wu(() => Qu(Co({ command: Ra$2(), restart: uo().optional() }))) }); function mt$4(e = {}) { let { execute: t, ...n } = e; return pt$4(t === void 0 ? { ...n, execute: async ({ command: e }, { abortSignal: t, experimental_sandbox: n }) => { if (!n) throw Error(`Sandbox session is not available`); return await n.run({ command: e, abortSignal: t }); } } : { ...n, ...t === null ? {} : { execute: t } }); } var ht$4 = fd({ id: `anthropic.bash_20250124`, inputSchema: Wu(() => Qu(Co({ command: Ra$2(), restart: uo().optional() }))) }); function gt$4(e = {}) { let { execute: t, ...n } = e; return ht$4(t === void 0 ? { ...n, execute: async ({ command: e }, { abortSignal: t, experimental_sandbox: n }) => { if (!n) throw Error(`Sandbox session is not available`); return await n.run({ command: e, abortSignal: t }); } } : { ...n, ...t === null ? {} : { execute: t } }); } var _t$4 = fd({ id: `anthropic.computer_20241022`, inputSchema: Wu(() => Qu(Co({ action: Io([ `key`, `type`, `mouse_move`, `left_click`, `left_click_drag`, `right_click`, `middle_click`, `double_click`, `screenshot`, `cursor_position` ]), coordinate: xo(oo().int()).optional(), text: Ra$2().optional() }))) }); var vt$4 = fd({ id: `anthropic.computer_20250124`, inputSchema: Wu(() => Qu(Co({ action: Io([ `key`, `hold_key`, `type`, `cursor_position`, `mouse_move`, `left_mouse_down`, `left_mouse_up`, `left_click`, `left_click_drag`, `right_click`, `middle_click`, `double_click`, `triple_click`, `scroll`, `wait`, `screenshot` ]), coordinate: Mo([oo().int(), oo().int()]).optional(), duration: oo().optional(), scroll_amount: oo().optional(), scroll_direction: Io([ `up`, `down`, `left`, `right` ]).optional(), start_coordinate: Mo([oo().int(), oo().int()]).optional(), text: Ra$2().optional() }))) }); var yt$4 = fd({ id: `anthropic.computer_20251124`, inputSchema: Wu(() => Qu(Co({ action: Io([ `key`, `hold_key`, `type`, `cursor_position`, `mouse_move`, `left_mouse_down`, `left_mouse_up`, `left_click`, `left_click_drag`, `right_click`, `middle_click`, `double_click`, `triple_click`, `scroll`, `wait`, `screenshot`, `zoom` ]), coordinate: Mo([oo().int(), oo().int()]).optional(), duration: oo().optional(), region: Mo([ oo().int(), oo().int(), oo().int(), oo().int() ]).optional(), scroll_amount: oo().optional(), scroll_direction: Io([ `up`, `down`, `left`, `right` ]).optional(), start_coordinate: Mo([oo().int(), oo().int()]).optional(), text: Ra$2().optional() }))) }); var bt$4 = fd({ id: `anthropic.memory_20250818`, inputSchema: Wu(() => Qu(Oo(`command`, [ Co({ command: Ro(`view`), path: Ra$2(), view_range: Mo([oo(), oo()]).optional() }), Co({ command: Ro(`create`), path: Ra$2(), file_text: Ra$2() }), Co({ command: Ro(`str_replace`), path: Ra$2(), old_str: Ra$2(), new_str: Ra$2() }), Co({ command: Ro(`insert`), path: Ra$2(), insert_line: oo(), insert_text: Ra$2() }), Co({ command: Ro(`delete`), path: Ra$2() }), Co({ command: Ro(`rename`), old_path: Ra$2(), new_path: Ra$2() }) ]))) }); var xt$4 = fd({ id: `anthropic.text_editor_20241022`, inputSchema: Wu(() => Qu(Co({ command: Io([ `view`, `create`, `str_replace`, `insert`, `undo_edit` ]), path: Ra$2(), file_text: Ra$2().optional(), insert_line: oo().int().optional(), new_str: Ra$2().optional(), insert_text: Ra$2().optional(), old_str: Ra$2().optional(), view_range: xo(oo().int()).optional() }))) }); var St$4 = fd({ id: `anthropic.text_editor_20250124`, inputSchema: Wu(() => Qu(Co({ command: Io([ `view`, `create`, `str_replace`, `insert`, `undo_edit` ]), path: Ra$2(), file_text: Ra$2().optional(), insert_line: oo().int().optional(), new_str: Ra$2().optional(), insert_text: Ra$2().optional(), old_str: Ra$2().optional(), view_range: xo(oo().int()).optional() }))) }); var Ct$4 = fd({ id: `anthropic.text_editor_20250429`, inputSchema: Wu(() => Qu(Co({ command: Io([ `view`, `create`, `str_replace`, `insert` ]), path: Ra$2(), file_text: Ra$2().optional(), insert_line: oo().int().optional(), new_str: Ra$2().optional(), insert_text: Ra$2().optional(), old_str: Ra$2().optional(), view_range: xo(oo().int()).optional() }))) }); var wt$4 = Wu(() => Qu(xo(Co({ type: Ro(`tool_reference`), toolName: Ra$2() })))); var Tt$4 = md({ id: `anthropic.tool_search_bm25_20251119`, inputSchema: Wu(() => Qu(Co({ query: Ra$2(), limit: oo().optional() }))), outputSchema: wt$4, supportsDeferredResults: !0 }); var Et$4 = { advisor_20260301: fe$4, bash_20241022: mt$4, bash_20250124: gt$4, codeExecution_20250522: Ie$4, codeExecution_20250825: ze$4, codeExecution_20260120: He$4, computer_20241022: _t$4, computer_20250124: vt$4, computer_20251124: yt$4, memory_20250818: bt$4, textEditor_20241022: xt$4, textEditor_20250124: St$4, textEditor_20250429: Ct$4, textEditor_20250728: he$4, webFetch_20250910: je$4, webFetch_20260209: De$4, webSearch_20250305: Ce$4, webSearch_20260209: ye$4, toolSearchRegex_20251119: Ge$4, toolSearchBm25_20251119: (e = {}) => Tt$4(e) }; var Dt$4 = Wu(() => Qu(Co({ id: Ra$2(), display_title: Ra$2().nullish(), name: Ra$2().nullish(), description: Ra$2().nullish(), latest_version: Ra$2().nullish(), source: Ra$2(), created_at: Ra$2(), updated_at: Ra$2() }))); var Ot$4 = Wu(() => Qu(Co({ type: Ra$2(), skill_id: Ra$2(), name: Ra$2().nullish(), description: Ra$2().nullish() }))); var kt$4 = class { constructor(e) { this.config = e, this.specificationVersion = `v4`; } get provider() { return this.config.provider; } async getHeaders() { return Pc(await hd(this.config.headers), { "anthropic-beta": `skills-2025-10-02` }); } async fetchVersionMetadata({ skillId: e, version: t, headers: n }) { let { value: r } = await jl({ url: `${this.config.baseURL}/skills/${e}/versions/${t}`, headers: n, failedResponseHandler: Y$5, successfulResponseHandler: bd(Ot$4), fetch: this.config.fetch }); return { ...r.name == null ? {} : { name: r.name }, ...r.description == null ? {} : { description: r.description } }; } async uploadSkill(e) { let t = [], n = new FormData(); e.displayTitle != null && n.append(`display_title`, e.displayTitle); for (let t of e.files) { let e = Bc(t.data); n.append(`files[]`, new Blob([e]), t.path); } let r = await this.getHeaders(), { value: i } = await cd({ url: `${this.config.baseURL}/skills`, headers: r, formData: n, failedResponseHandler: Y$5, successfulResponseHandler: bd(Dt$4), fetch: this.config.fetch }), a = i.latest_version == null ? {} : await this.fetchVersionMetadata({ skillId: i.id, version: i.latest_version, headers: r }), o = a.name ?? i.name, s = a.description ?? i.description; return { providerReference: { anthropic: i.id }, ...i.display_title == null ? {} : { displayTitle: i.display_title }, ...o == null ? {} : { name: o }, ...s == null ? {} : { description: s }, ...i.latest_version == null ? {} : { latestVersion: i.latest_version }, providerMetadata: { anthropic: { ...i.source == null ? {} : { source: i.source }, ...i.created_at == null ? {} : { createdAt: i.created_at }, ...i.updated_at == null ? {} : { updatedAt: i.updated_at } } }, warnings: t }; } }; var At$4 = `4.0.0`; function jt$4(e = {}) { let r = Ed(Fl({ settingValue: e.baseURL, environmentVariableName: `ANTHROPIC_BASE_URL` })) ?? `https://api.anthropic.com/v1`, i = e.name ?? `anthropic.messages`; if (e.apiKey && e.authToken) throw new ae$10({ argument: `apiKey/authToken`, message: `Both apiKey and authToken were provided. Please use only one authentication method.` }); let a = () => Ol({ "anthropic-version": `2023-06-01`, ...e.authToken ? { Authorization: `Bearer ${e.authToken}` } : { "x-api-key": Pl({ apiKey: e.apiKey, environmentVariableName: `ANTHROPIC_API_KEY`, description: `Anthropic` }) }, ...e.headers }, `ai-sdk/anthropic/${At$4}`), o = (t) => new st$4(t, { provider: i, baseURL: r, headers: a, fetch: e.fetch, generateId: e.generateId ?? bl, supportedUrls: () => ({ "image/*": [/^https?:\/\/.*$/], "application/pdf": [/^https?:\/\/.*$/] }) }), s = () => new kt$4({ provider: `${i.replace(`.messages`, ``)}.skills`, baseURL: r, headers: a, fetch: e.fetch }), c = function(e) { if (new.target) throw Error(`The Anthropic model function cannot be called with the new keyword.`); return o(e); }; return c.specificationVersion = `v4`, c.languageModel = o, c.chat = o, c.messages = o, c.embeddingModel = (e) => { throw new be$10({ modelId: e, modelType: `embeddingModel` }); }, c.textEmbeddingModel = c.embeddingModel, c.imageModel = (e) => { throw new be$10({ modelId: e, modelType: `imageModel` }); }, c.files = () => new ne$3({ provider: i, baseURL: r, headers: a, fetch: e.fetch }), c.skills = s, c.tools = Et$4, c; } var Mt$4 = jt$4(); //#endregion //#region node_modules/eve/dist/src/compiled/@ai-sdk/google/index.js var google_exports = /* @__PURE__ */ __exportAll({ Experimental_GoogleRealtimeModel: () => yn$3, VERSION: () => ae$3, createGoogle: () => $$4, createGoogleGenerativeAI: () => $$4, google: () => bn$3 }); var ae$3 = `4.0.0`; var H$3 = vd({ errorSchema: Wu(() => Qu(Co({ error: Co({ code: oo().nullable(), message: Ra$2(), status: Ra$2() }) }))), errorToMessage: (e) => e.error.message }); var oe$2 = Eo([ Co({ text: Ra$2() }), Co({ inlineData: Co({ mimeType: Ra$2(), data: Ra$2() }) }), Co({ fileData: Co({ fileUri: Ra$2(), mimeType: Ra$2() }) }) ]); var se$3 = Wu(() => Qu(Co({ outputDimensionality: oo().optional(), taskType: Io([ `SEMANTIC_SIMILARITY`, `CLASSIFICATION`, `CLUSTERING`, `RETRIEVAL_DOCUMENT`, `RETRIEVAL_QUERY`, `QUESTION_ANSWERING`, `FACT_VERIFICATION`, `CODE_RETRIEVAL_QUERY` ]).optional(), content: xo(xo(oe$2).min(1).nullable()).optional() }))); var ce$3 = class e { constructor(e, t) { this.specificationVersion = `v4`, this.maxEmbeddingsPerCall = 2048, this.supportsParallelCalls = !0, this.modelId = e, this.config = t; } static [Mc](e) { return Cd({ modelId: e.modelId, config: e.config }); } static [Nc](t) { return new e(t.modelId, t.config); } get provider() { return this.config.provider; } async doEmbed({ values: e, headers: n, abortSignal: r, providerOptions: a }) { let o = await ad({ provider: `google`, providerOptions: a, schema: se$3 }); if (e.length > this.maxEmbeddingsPerCall) throw new Te$10({ provider: this.provider, modelId: this.modelId, maxEmbeddingsPerCall: this.maxEmbeddingsPerCall, values: e }); let s = Pc(this.config.headers ? await hd(this.config.headers) : void 0, n), c = o?.content; if (c != null && c.length !== e.length) throw Error(`The number of multimodal content entries (${c.length}) must match the number of values (${e.length}).`); if (e.length === 1) { let t = c?.[0], n = e[0] ? [{ text: e[0] }] : [], i = t == null ? [{ text: e[0] }] : [...n, ...t], { responseHeaders: a, value: l, rawValue: u } = await sd({ url: `${this.config.baseURL}/models/${this.modelId}:embedContent`, headers: s, body: { model: `models/${this.modelId}`, content: { parts: i }, outputDimensionality: o?.outputDimensionality, taskType: o?.taskType }, failedResponseHandler: H$3, successfulResponseHandler: bd(ue$3), abortSignal: r, fetch: this.config.fetch }); return { warnings: [], embeddings: [l.embedding.values], usage: void 0, response: { headers: a, body: u } }; } let { responseHeaders: l, value: d, rawValue: f } = await sd({ url: `${this.config.baseURL}/models/${this.modelId}:batchEmbedContents`, headers: s, body: { requests: e.map((e, t) => { let n = c?.[t], r = e ? [{ text: e }] : []; return { model: `models/${this.modelId}`, content: { role: `user`, parts: n == null ? [{ text: e }] : [...r, ...n] }, outputDimensionality: o?.outputDimensionality, taskType: o?.taskType }; }) }, failedResponseHandler: H$3, successfulResponseHandler: bd(le$3), abortSignal: r, fetch: this.config.fetch }); return { warnings: [], embeddings: d.embeddings.map((e) => e.values), usage: void 0, response: { headers: l, body: f } }; } }; var le$3 = Wu(() => Qu(Co({ embeddings: xo(Co({ values: xo(oo()) })) }))); var ue$3 = Wu(() => Qu(Co({ embedding: Co({ values: xo(oo()) }) }))); function de$3(e) { if (e == null) return { inputTokens: { total: void 0, noCache: void 0, cacheRead: void 0, cacheWrite: void 0 }, outputTokens: { total: void 0, text: void 0, reasoning: void 0 }, raw: void 0 }; let t = e.promptTokenCount ?? 0, n = e.candidatesTokenCount ?? 0, r = e.cachedContentTokenCount ?? 0, i = e.thoughtsTokenCount ?? 0; return { inputTokens: { total: t, noCache: t - r, cacheRead: r, cacheWrite: void 0 }, outputTokens: { total: n + i, text: n, reasoning: i }, raw: e }; } function U$3(e, t = !0) { if (e == null) return; if (fe$3(e)) return t ? void 0 : typeof e == `object` && e.description ? { type: `object`, description: e.description } : { type: `object` }; if (typeof e == `boolean`) return { type: `boolean`, properties: {} }; let { type: n, description: r, required: i, properties: a, items: o, allOf: s, anyOf: c, oneOf: l, format: u, const: d, minLength: f, enum: p } = e, m = {}; if (r && (m.description = r), i && (m.required = i), u && (m.format = u), d !== void 0 && (m.enum = [d]), n) if (Array.isArray(n)) { let e = n.includes(`null`), t = n.filter((e) => e !== `null`); t.length === 0 ? m.type = `null` : (m.anyOf = t.map((e) => ({ type: e })), e && (m.nullable = !0)); } else m.type = n; if (p !== void 0 && (m.enum = p), a != null && (m.properties = Object.entries(a).reduce((e, [t, n]) => (e[t] = U$3(n, !1), e), {})), o && (m.items = Array.isArray(o) ? o.map((e) => U$3(e, !1)) : U$3(o, !1)), s && (m.allOf = s.map((e) => U$3(e, !1))), c) if (c.some((e) => typeof e == `object` && e?.type === `null`)) { let e = c.filter((e) => !(typeof e == `object` && e?.type === `null`)); if (e.length === 1) { let t = U$3(e[0], !1); typeof t == `object` && (m.nullable = !0, Object.assign(m, t)); } else m.anyOf = e.map((e) => U$3(e, !1)), m.nullable = !0; } else m.anyOf = c.map((e) => U$3(e, !1)); return l && (m.oneOf = l.map((e) => U$3(e, !1))), f !== void 0 && (m.minLength = f), m; } function fe$3(e) { return typeof e == `object` && !!e && e.type === `object` && (e.properties == null || Object.keys(e.properties).length === 0) && !e.additionalProperties; } var pe$3 = `skip_thought_signature_validator`; var me$3 = /^data:([^;,]+);base64,(.+)$/s; function he$3(e) { let t = me$3.exec(e); if (t != null) return { mediaType: t[1], data: t[2] }; } function ge$3(e) { let t = he$3(e); if (t != null) return { inlineData: { mimeType: t.mediaType, data: t.data } }; } function _e$3(e, t, n, r) { let i = [], a = []; for (let e of n) switch (e.type) { case `text`: a.push(e.text); break; case `file`: if (e.data.type === `data`) i.push({ inlineData: { mimeType: gd({ part: e }), data: zc(e.data.data) } }); else if (e.data.type === `url`) { let t = ge$3(e.data.url.toString()); t == null ? a.push(JSON.stringify(e)) : i.push(t); } else a.push(JSON.stringify(e)); break; default: a.push(JSON.stringify(e)); break; } e.push({ functionResponse: { ...r == null ? {} : { id: r }, name: t, response: { name: t, content: a.length > 0 ? a.join(` `) : `Tool executed successfully.` }, ...i.length > 0 ? { parts: i } : {} } }); } function ve$3(e, t, n, r) { for (let i of n) switch (i.type) { case `text`: e.push({ functionResponse: { ...r == null ? {} : { id: r }, name: t, response: { name: t, content: i.text } } }); break; case `file`: i.data.type === `data` && el(i.mediaType) === `image` ? e.push({ inlineData: { mimeType: gd({ part: i }), data: zc(i.data.data) } }, { text: `Tool executed successfully and returned this image as a response` }) : e.push({ text: JSON.stringify(i) }); break; default: e.push({ text: JSON.stringify(i) }); break; } } function ye$3(e, t) { let r = [], i = [], a = !0, s = t?.isGemmaModel ?? !1, l = t?.isGemini3Model ?? !1, u = t?.onWarning, d = t?.providerOptionsNames ?? [`google`], f = !d.includes(`google`), p = t?.supportsFunctionResponseParts ?? !0, m = !1, h = [], g = (e) => (h.push(e), m = !0, pe$3), _ = (e) => { for (let t of d) { let n = e.providerOptions?.[t]; if (n != null) return n; } return f ? e.providerOptions?.google : e.providerOptions?.googleVertex ?? e.providerOptions?.vertex; }; for (let { role: t, content: s } of e) switch (t) { case `system`: if (!a) throw new Ie$10({ functionality: `system messages are only supported at the beginning of the conversation` }); r.push({ text: s }); break; case `user`: { a = !1; let e = []; for (let t of s) switch (t.type) { case `text`: e.push({ text: t.text }); break; case `file`: switch (t.data.type) { case `url`: e.push({ fileData: { mimeType: gd({ part: t }), fileUri: t.data.url.toString() } }); break; case `reference`: if (f) throw new Ie$10({ functionality: `file parts with provider references` }); e.push({ fileData: { mimeType: gd({ part: t }), fileUri: _d({ reference: t.data.reference, provider: `google` }) } }); break; case `text`: e.push({ inlineData: { mimeType: tl(t.mediaType) ? t.mediaType : `text/plain`, data: zc(new TextEncoder().encode(t.data.text)) } }); break; case `data`: e.push({ inlineData: { mimeType: gd({ part: t }), data: zc(t.data.data) } }); break; } break; } i.push({ role: `user`, parts: e }); break; } case `assistant`: a = !1, i.push({ role: `model`, parts: s.map((e) => { let t = _(e), r = t?.thoughtSignature == null ? void 0 : String(t.thoughtSignature); switch (e.type) { case `text`: return e.text.length === 0 ? void 0 : { text: e.text, thoughtSignature: r }; case `reasoning`: return e.text.length === 0 ? void 0 : { text: e.text, thought: !0, thoughtSignature: r }; case `reasoning-file`: switch (e.data.type) { case `url`: throw new Ie$10({ functionality: `File data URLs in assistant messages are not supported` }); case `data`: return { inlineData: { mimeType: e.mediaType, data: zc(e.data.data) }, thought: !0, thoughtSignature: r }; } break; case `file`: switch (e.data.type) { case `url`: throw new Ie$10({ functionality: `File data URLs in assistant messages are not supported` }); case `reference`: if (f) throw new Ie$10({ functionality: `file parts with provider references` }); return { fileData: { mimeType: e.mediaType, fileUri: _d({ reference: e.data.reference, provider: `google` }) }, ...t?.thought === !0 ? { thought: !0 } : {}, thoughtSignature: r }; case `text`: return { inlineData: { mimeType: tl(e.mediaType) ? e.mediaType : `text/plain`, data: zc(new TextEncoder().encode(e.data.text)) }, ...t?.thought === !0 ? { thought: !0 } : {}, thoughtSignature: r }; case `data`: return { inlineData: { mimeType: e.mediaType, data: zc(e.data.data) }, ...t?.thought === !0 ? { thought: !0 } : {}, thoughtSignature: r }; } break; case `tool-call`: { let n = t?.serverToolCallId == null ? void 0 : String(t.serverToolCallId), i = t?.serverToolType == null ? void 0 : String(t.serverToolType), a = r ?? (l ? g(e.toolName) : void 0); return n && i ? { toolCall: { toolType: i, args: typeof e.input == `string` ? JSON.parse(e.input) : e.input, id: n }, thoughtSignature: a } : { functionCall: { ...e.toolCallId == null ? {} : { id: e.toolCallId }, name: e.toolName, args: e.input }, thoughtSignature: a }; } case `tool-result`: { let n = t?.serverToolCallId == null ? void 0 : String(t.serverToolCallId), i = t?.serverToolType == null ? void 0 : String(t.serverToolType); return n && i ? { toolResponse: { toolType: i, response: e.output.type === `json` ? e.output.value : {}, id: n }, thoughtSignature: r } : void 0; } } }).filter((e) => e !== void 0) }); break; case `tool`: { a = !1; let e = []; for (let t of s) { if (t.type === `tool-approval-response`) continue; let n = _(t), r = n?.serverToolCallId == null ? void 0 : String(n.serverToolCallId), a = n?.serverToolType == null ? void 0 : String(n.serverToolType); if (r && a) { let e = n?.thoughtSignature == null ? void 0 : String(n.thoughtSignature); if (i.length > 0) { let n = i[i.length - 1]; if (n.role === `model`) { n.parts.push({ toolResponse: { toolType: a, response: t.output.type === `json` ? t.output.value : {}, id: r }, thoughtSignature: e }); continue; } } } let o = t.output; o.type === `content` ? p ? _e$3(e, t.toolName, o.value, t.toolCallId) : ve$3(e, t.toolName, o.value, t.toolCallId) : e.push({ functionResponse: { ...t.toolCallId == null ? {} : { id: t.toolCallId }, name: t.toolName, response: { name: t.toolName, content: o.type === `execution-denied` ? o.reason ?? `Tool call execution denied.` : o.value } } }); } i.push({ role: `user`, parts: e }); break; } } if (s && r.length > 0 && i.length > 0 && i[0].role === `user`) { let e = r.map((e) => e.text).join(` `); i[0].parts.unshift({ text: e + ` ` }); } if (m && u != null) { let e = Array.from(new Set(h)); u({ type: `other`, message: `Replayed ${h.length} \`functionCall\` part(s) for a Gemini 3 model without a \`thoughtSignature\` (tools: ${e.map((e) => `\`${e}\``).join(`, `)}). Injected the documented \`skip_thought_signature_validator\` sentinel to keep the request from failing with HTTP 400. The likely cause is application code that drops \`providerOptions.google.thoughtSignature\` when persisting or serializing assistant tool-call messages. See https://ai.google.dev/gemini-api/docs/thought-signatures.` }); } return { systemInstruction: r.length > 0 && !s ? { parts: r } : void 0, contents: i }; } function be$3(e) { return e.includes(`/`) ? e : `models/${e}`; } var xe$3 = Wu(() => Qu(Co({ responseModalities: xo(Io([`TEXT`, `IMAGE`])).optional(), thinkingConfig: Co({ thinkingBudget: oo().optional(), includeThoughts: uo().optional(), thinkingLevel: Io([ `minimal`, `low`, `medium`, `high` ]).optional() }).optional(), cachedContent: Ra$2().optional(), structuredOutputs: uo().optional(), safetySettings: xo(Co({ category: Io([ `HARM_CATEGORY_UNSPECIFIED`, `HARM_CATEGORY_HATE_SPEECH`, `HARM_CATEGORY_DANGEROUS_CONTENT`, `HARM_CATEGORY_HARASSMENT`, `HARM_CATEGORY_SEXUALLY_EXPLICIT`, `HARM_CATEGORY_CIVIC_INTEGRITY` ]), threshold: Io([ `HARM_BLOCK_THRESHOLD_UNSPECIFIED`, `BLOCK_LOW_AND_ABOVE`, `BLOCK_MEDIUM_AND_ABOVE`, `BLOCK_ONLY_HIGH`, `BLOCK_NONE`, `OFF` ]) })).optional(), threshold: Io([ `HARM_BLOCK_THRESHOLD_UNSPECIFIED`, `BLOCK_LOW_AND_ABOVE`, `BLOCK_MEDIUM_AND_ABOVE`, `BLOCK_ONLY_HIGH`, `BLOCK_NONE`, `OFF` ]).optional(), audioTimestamp: uo().optional(), labels: Po(Ra$2(), Ra$2()).optional(), mediaResolution: Io([ `MEDIA_RESOLUTION_UNSPECIFIED`, `MEDIA_RESOLUTION_LOW`, `MEDIA_RESOLUTION_MEDIUM`, `MEDIA_RESOLUTION_HIGH` ]).optional(), imageConfig: Co({ aspectRatio: Io([ `1:1`, `2:3`, `3:2`, `3:4`, `4:3`, `4:5`, `5:4`, `9:16`, `16:9`, `21:9`, `1:8`, `8:1`, `1:4`, `4:1` ]).optional(), imageSize: Io([ `1K`, `2K`, `4K`, `512` ]).optional() }).optional(), retrievalConfig: Co({ latLng: Co({ latitude: oo(), longitude: oo() }).optional() }).optional(), streamFunctionCallArguments: uo().optional(), serviceTier: Io([ `standard`, `flex`, `priority` ]).optional(), sharedRequestType: Io([ `priority`, `flex`, `standard` ]).optional(), requestType: Io([`shared`]).optional() }))); function Se$3({ tools: e, toolChoice: t, modelId: r, isVertexProvider: i = !1 }) { e = e?.length ? e : void 0; let a = [], o = [ `gemini-flash-latest`, `gemini-flash-lite-latest`, `gemini-pro-latest` ].some((e) => e === r), s = r.includes(`gemini-2`) || r.includes(`gemini-3`) || r.includes(`nano-banana`) || o, c = r.includes(`gemini-3`), l = r.includes(`gemini-2.5`) || r.includes(`gemini-3`); if (e == null) return { tools: void 0, toolConfig: void 0, toolWarnings: a }; let u = e.some((e) => e.type === `function`), d = e.some((e) => e.type === `provider`); if (u && d && !c && a.push({ type: `unsupported`, feature: `combination of function and provider-defined tools` }), d) { let n = []; if (e.filter((e) => e.type === `provider`).forEach((e) => { switch (e.id) { case `google.google_search`: s ? n.push({ googleSearch: { ...e.args } }) : a.push({ type: `unsupported`, feature: `provider-defined tool ${e.id}`, details: `Google Search requires Gemini 2.0 or newer.` }); break; case `google.enterprise_web_search`: s ? n.push({ enterpriseWebSearch: {} }) : a.push({ type: `unsupported`, feature: `provider-defined tool ${e.id}`, details: `Enterprise Web Search requires Gemini 2.0 or newer.` }); break; case `google.url_context`: s ? n.push({ urlContext: {} }) : a.push({ type: `unsupported`, feature: `provider-defined tool ${e.id}`, details: `The URL context tool is not supported with other Gemini models than Gemini 2.` }); break; case `google.code_execution`: s ? n.push({ codeExecution: {} }) : a.push({ type: `unsupported`, feature: `provider-defined tool ${e.id}`, details: `The code execution tool is not supported with other Gemini models than Gemini 2.` }); break; case `google.file_search`: l ? n.push({ fileSearch: { ...e.args } }) : a.push({ type: `unsupported`, feature: `provider-defined tool ${e.id}`, details: `The file search tool is only supported with Gemini 2.5 models and Gemini 3 models.` }); break; case `google.vertex_rag_store`: s ? n.push({ retrieval: { vertex_rag_store: { rag_resources: { rag_corpus: e.args.ragCorpus }, similarity_top_k: e.args.topK } } }) : a.push({ type: `unsupported`, feature: `provider-defined tool ${e.id}`, details: `The RAG store tool is not supported with other Gemini models than Gemini 2.` }); break; case `google.google_maps`: s ? n.push({ googleMaps: {} }) : a.push({ type: `unsupported`, feature: `provider-defined tool ${e.id}`, details: `The Google Maps grounding tool is not supported with Gemini models other than Gemini 2 or newer.` }); break; default: a.push({ type: `unsupported`, feature: `provider-defined tool ${e.id}` }); break; } }), u && c && n.length > 0) { let r = []; for (let t of e) t.type === `function` && r.push({ name: t.name, description: t.description ?? ``, parameters: U$3(t.inputSchema) }); let o = { functionCallingConfig: { mode: `VALIDATED` }, ...!i && { includeServerSideToolInvocations: !0 } }; if (t != null) switch (t.type) { case `auto`: break; case `none`: o.functionCallingConfig = { mode: `NONE` }; break; case `required`: o.functionCallingConfig = { mode: `ANY` }; break; case `tool`: o.functionCallingConfig = { mode: `ANY`, allowedFunctionNames: [t.toolName] }; break; } return { tools: [...n, { functionDeclarations: r }], toolConfig: o, toolWarnings: a }; } return { tools: n.length > 0 ? n : void 0, toolConfig: void 0, toolWarnings: a }; } let f = [], p = !1; for (let t of e) switch (t.type) { case `function`: f.push({ name: t.name, description: t.description ?? ``, parameters: U$3(t.inputSchema) }), t.strict === !0 && (p = !0); break; default: a.push({ type: `unsupported`, feature: `function tool ${t.name}` }); break; } if (t == null) return { tools: [{ functionDeclarations: f }], toolConfig: p ? { functionCallingConfig: { mode: `VALIDATED` } } : void 0, toolWarnings: a }; let m = t.type; switch (m) { case `auto`: return { tools: [{ functionDeclarations: f }], toolConfig: { functionCallingConfig: { mode: p ? `VALIDATED` : `AUTO` } }, toolWarnings: a }; case `none`: return { tools: [{ functionDeclarations: f }], toolConfig: { functionCallingConfig: { mode: `NONE` } }, toolWarnings: a }; case `required`: return { tools: [{ functionDeclarations: f }], toolConfig: { functionCallingConfig: { mode: p ? `VALIDATED` : `ANY` } }, toolWarnings: a }; case `tool`: return { tools: [{ functionDeclarations: f }], toolConfig: { functionCallingConfig: { mode: p ? `VALIDATED` : `ANY`, allowedFunctionNames: [t.toolName] } }, toolWarnings: a }; default: throw new Ie$10({ functionality: `tool choice type: ${m}` }); } } var Ce$3 = class { constructor() { this.accumulatedArgs = {}, this.jsonText = ``, this.pathStack = [], this.stringOpen = !1; } processPartialArgs(e) { let t = ``; for (let n of e) { let e = n.jsonPath.replace(/^\$\./, ``); if (!e) continue; let r = we$3(e), i = Oe$3(this.accumulatedArgs, r); if (n.stringValue != null && i !== void 0) { let e = JSON.stringify(n.stringValue).slice(1, -1); ke$3(this.accumulatedArgs, r, i + n.stringValue), t += e; continue; } let a = Ae$3(n); a != null && (ke$3(this.accumulatedArgs, r, a.value), t += this.emitNavigationTo(r, n, a.json)); } return this.jsonText += t, { currentJSON: this.accumulatedArgs, textDelta: t }; } finalize() { let e = JSON.stringify(this.accumulatedArgs); return { finalJSON: e, closingDelta: e.slice(this.jsonText.length) }; } ensureRoot() { return this.pathStack.length === 0 ? (this.pathStack.push({ segment: ``, isArray: !1, childCount: 0 }), `{`) : ``; } emitNavigationTo(e, t, n) { let r = ``; this.stringOpen &&= (r += `"`, !1), r += this.ensureRoot(); let i = e.slice(0, -1), a = e[e.length - 1], o = this.findCommonStackDepth(i); return r += this.closeDownTo(o), r += this.openDownTo(i, a), r += this.emitLeaf(a, t, n), r; } findCommonStackDepth(e) { let t = Math.min(this.pathStack.length - 1, e.length), n = 0; for (let r = 0; r < t && this.pathStack[r + 1].segment === e[r]; r++) n++; return n + 1; } closeDownTo(e) { let t = ``; for (; this.pathStack.length > e;) { let e = this.pathStack.pop(); t += e.isArray ? `]` : `}`; } return t; } openDownTo(e, t) { let n = ``, r = this.pathStack.length - 1; for (let i = r; i < e.length; i++) { let r = e[i], a = this.pathStack[this.pathStack.length - 1]; a.childCount > 0 && (n += `,`), a.childCount++, typeof r == `string` && (n += `${JSON.stringify(r)}:`); let o = typeof (i + 1 < e.length ? e[i + 1] : t) == `number`; n += o ? `[` : `{`, this.pathStack.push({ segment: r, isArray: o, childCount: 0 }); } return n; } emitLeaf(e, t, n) { let r = ``, i = this.pathStack[this.pathStack.length - 1]; return i.childCount > 0 && (r += `,`), i.childCount++, typeof e == `string` && (r += `${JSON.stringify(e)}:`), t.stringValue != null && t.willContinue ? (r += n.slice(0, -1), this.stringOpen = !0) : r += n, r; } }; function we$3(e) { let t = []; for (let n of e.split(`.`)) { let e = n.indexOf(`[`); if (e === -1) t.push(n); else { e > 0 && t.push(n.slice(0, e)); for (let e of n.matchAll(/\[(\d+)\]/g)) t.push(parseInt(e[1], 10)); } } return t; } var Te$3 = Object.prototype.hasOwnProperty; function Ee$3(e, t) { return Te$3.call(e, t); } function De$3(e, t, n) { Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }); } function Oe$3(e, t) { let n = e; for (let e of t) { if (typeof n != `object` || !n) return; let t = n; if (!Ee$3(t, e)) return; n = t[e]; } return n; } function ke$3(e, t, n) { let r = e; for (let e = 0; e < t.length - 1; e++) { let n = t[e], i = t[e + 1]; (!Ee$3(r, n) || r[n] == null) && De$3(r, n, typeof i == `number` ? [] : {}), r = r[n]; } De$3(r, t[t.length - 1], n); } function Ae$3(e) { let t = e.stringValue ?? e.numberValue ?? e.boolValue; if (t != null) return { value: t, json: JSON.stringify(t) }; if (`nullValue` in e) return { value: null, json: `null` }; } function je$3({ finishReason: e, hasToolCalls: t }) { switch (e) { case `STOP`: return t ? `tool-calls` : `stop`; case `MAX_TOKENS`: return `length`; case `IMAGE_SAFETY`: case `RECITATION`: case `SAFETY`: case `BLOCKLIST`: case `PROHIBITED_CONTENT`: case `SPII`: return `content-filter`; case `MALFORMED_FUNCTION_CALL`: return `error`; default: return `other`; } } var Me$3 = class e { constructor(e, t) { this.specificationVersion = `v4`, this.modelId = e, this.config = t, this.generateId = t.generateId ?? bl; } static [Mc](e) { return Cd({ modelId: e.modelId, config: e.config }); } static [Nc](t) { return new e(t.modelId, t.config); } get provider() { return this.config.provider; } get supportedUrls() { var e; return (e = this.config).supportedUrls?.call(e) ?? {}; } async getArgs({ prompt: e, maxOutputTokens: t, temperature: n, topP: r, topK: i, frequencyPenalty: a, presencePenalty: o, stopSequences: s, responseFormat: c, seed: l, tools: d, toolChoice: f, reasoning: p, providerOptions: m }, { isStreaming: h = !1 } = {}) { let g = [], _ = this.config.provider.includes(`vertex`) ? [`googleVertex`, `vertex`] : [`google`], v; for (let e of _) if (v = await ad({ provider: e, providerOptions: m, schema: xe$3 }), v != null) break; v == null && !_.includes(`google`) && (v = await ad({ provider: `google`, providerOptions: m, schema: xe$3 })); let y = this.config.provider.startsWith(`google.vertex.`); d?.some((e) => e.type === `provider` && e.id === `google.vertex_rag_store`) && !y && g.push({ type: `other`, message: `The 'vertex_rag_store' tool is only supported with the Google Vertex provider and might not be supported or could behave unexpectedly with the current Google provider (${this.config.provider}).` }), v?.streamFunctionCallArguments && !y && g.push({ type: `other`, message: `'streamFunctionCallArguments' is only supported on the Vertex AI API and will be ignored with the current Google provider (${this.config.provider}). See https://docs.cloud.google.com/vertex-ai/generative-ai/docs/multimodal/function-calling#streaming-fc` }), v?.serviceTier && y && g.push({ type: `other`, message: `'serviceTier' is a Gemini API option and is not supported on Vertex AI. Use 'sharedRequestType' (and optionally 'requestType') instead. See https://docs.cloud.google.com/vertex-ai/generative-ai/docs/priority-paygo` }), (v?.sharedRequestType || v?.requestType) && !y && g.push({ type: `other`, message: `'sharedRequestType' and 'requestType' are Vertex AI options and are ignored with the current Google provider (${this.config.provider}).` }); let b = y && (v?.sharedRequestType || v?.requestType) ? { ...v.sharedRequestType && { "X-Vertex-AI-LLM-Shared-Request-Type": v.sharedRequestType }, ...v.requestType && { "X-Vertex-AI-LLM-Request-Type": v.requestType } } : void 0, x = y ? void 0 : v?.serviceTier, S = this.modelId.toLowerCase().startsWith(`gemma-`), C = /^gemini-3[.-]/.test(this.modelId), { contents: w, systemInstruction: T } = ye$3(e, { isGemmaModel: S, isGemini3Model: C, onWarning: (e) => g.push(e), providerOptionsNames: _, supportsFunctionResponseParts: C }), { tools: ee, toolConfig: E, toolWarnings: D } = Se$3({ tools: d, toolChoice: f, modelId: this.modelId, isVertexProvider: y }), O = Ie$3({ reasoning: p, modelId: this.modelId, warnings: g }), k = v?.thinkingConfig || O ? { ...O, ...v?.thinkingConfig } : void 0, A = h && y ? v?.streamFunctionCallArguments ?? !1 : void 0, j = E || A || v?.retrievalConfig ? { ...E, ...A && { functionCallingConfig: { ...E?.functionCallingConfig, streamFunctionCallArguments: !0 } }, ...v?.retrievalConfig && { retrievalConfig: v.retrievalConfig } } : void 0; return { args: { generationConfig: { maxOutputTokens: t, temperature: n, topK: i, topP: r, frequencyPenalty: a, presencePenalty: o, stopSequences: s, seed: l, responseMimeType: c?.type === `json` ? `application/json` : void 0, responseSchema: c?.type === `json` && c.schema != null && (v?.structuredOutputs ?? !0) ? U$3(c.schema) : void 0, ...v?.audioTimestamp && { audioTimestamp: v.audioTimestamp }, responseModalities: v?.responseModalities, thinkingConfig: k, ...v?.mediaResolution && { mediaResolution: v.mediaResolution }, ...v?.imageConfig && { imageConfig: v.imageConfig } }, contents: w, systemInstruction: S ? void 0 : T, safetySettings: v?.safetySettings, tools: ee, toolConfig: j, cachedContent: v?.cachedContent, labels: v?.labels, serviceTier: x }, warnings: [...g, ...D], providerOptionsNames: _, extraHeaders: b }; } async doGenerate(e) { let { args: t, warnings: n, providerOptionsNames: r, extraHeaders: a } = await this.getArgs(e), o = (e) => Object.fromEntries(r.map((t) => [t, e])), s = Pc(this.config.headers ? await hd(this.config.headers) : void 0, e.headers, a), { responseHeaders: c, value: l, rawValue: u } = await sd({ url: `${this.config.baseURL}/${be$3(this.modelId)}:generateContent`, headers: s, body: t, failedResponseHandler: H$3, successfulResponseHandler: bd(Ke$3), abortSignal: e.abortSignal, fetch: this.config.fetch }), d = l.candidates[0], f = [], p = d.content?.parts ?? [], m = l.usageMetadata, h, g; for (let e of p) if (`executableCode` in e && e.executableCode?.code) { let t = this.config.generateId(); h = t, f.push({ type: `tool-call`, toolCallId: t, toolName: `code_execution`, input: JSON.stringify(e.executableCode), providerExecuted: !0 }); } else if (`codeExecutionResult` in e && e.codeExecutionResult) f.push({ type: `tool-result`, toolCallId: h, toolName: `code_execution`, result: { outcome: e.codeExecutionResult.outcome, output: e.codeExecutionResult.output ?? `` } }), h = void 0; else if (`text` in e && e.text != null) { let t = e.thoughtSignature ? o({ thoughtSignature: e.thoughtSignature }) : void 0; if (e.text.length === 0) { if (t != null && f.length > 0) { let e = f[f.length - 1]; e.providerMetadata = t; } } else f.push({ type: e.thought === !0 ? `reasoning` : `text`, text: e.text, providerMetadata: t }); } else if (`functionCall` in e && e.functionCall.name != null) f.push({ type: `tool-call`, toolCallId: e.functionCall.id ?? this.config.generateId(), toolName: e.functionCall.name, input: JSON.stringify(e.functionCall.args ?? {}), providerMetadata: e.thoughtSignature ? o({ thoughtSignature: e.thoughtSignature }) : void 0 }); else if (`inlineData` in e) { let t = e.thought === !0, n = !!e.thoughtSignature; f.push({ type: t ? `reasoning-file` : `file`, data: { type: `data`, data: e.inlineData.data }, mediaType: e.inlineData.mimeType, providerMetadata: n ? o({ thoughtSignature: e.thoughtSignature }) : void 0 }); } else if (`toolCall` in e && e.toolCall) { let t = e.toolCall.id ?? this.config.generateId(); g = t, f.push({ type: `tool-call`, toolCallId: t, toolName: `server:${e.toolCall.toolType}`, input: JSON.stringify(e.toolCall.args ?? {}), providerExecuted: !0, dynamic: !0, providerMetadata: e.thoughtSignature ? o({ thoughtSignature: e.thoughtSignature, serverToolCallId: t, serverToolType: e.toolCall.toolType }) : o({ serverToolCallId: t, serverToolType: e.toolCall.toolType }) }); } else if (`toolResponse` in e && e.toolResponse) { let t = g ?? e.toolResponse.id ?? this.config.generateId(); f.push({ type: `tool-result`, toolCallId: t, toolName: `server:${e.toolResponse.toolType}`, result: e.toolResponse.response ?? {}, providerMetadata: e.thoughtSignature ? o({ thoughtSignature: e.thoughtSignature, serverToolCallId: t, serverToolType: e.toolResponse.toolType }) : o({ serverToolCallId: t, serverToolType: e.toolResponse.toolType }) }), g = void 0; } let _ = ze$3({ groundingMetadata: d.groundingMetadata, generateId: this.config.generateId }) ?? []; for (let e of _) f.push(e); return { content: f, finishReason: { unified: je$3({ finishReason: d.finishReason, hasToolCalls: f.some((e) => e.type === `tool-call` && !e.providerExecuted) }), raw: d.finishReason ?? void 0 }, usage: de$3(m), warnings: n, providerMetadata: o({ promptFeedback: l.promptFeedback ?? null, groundingMetadata: d.groundingMetadata ?? null, urlContextMetadata: d.urlContextMetadata ?? null, safetyRatings: d.safetyRatings ?? null, usageMetadata: m ?? null, finishMessage: d.finishMessage ?? null, serviceTier: m?.serviceTier ?? null }), request: { body: t }, response: { headers: c, body: u } }; } async doStream(e) { let { args: t, warnings: n, providerOptionsNames: r, extraHeaders: a } = await this.getArgs(e, { isStreaming: !0 }), o = (e) => Object.fromEntries(r.map((t) => [t, e])), s = Pc(this.config.headers ? await hd(this.config.headers) : void 0, e.headers, a), { responseHeaders: c, value: l } = await sd({ url: `${this.config.baseURL}/${be$3(this.modelId)}:streamGenerateContent?alt=sse`, headers: s, body: t, failedResponseHandler: H$3, successfulResponseHandler: yd(qe$3), abortSignal: e.abortSignal, fetch: this.config.fetch }), u = { unified: `other`, raw: void 0 }, d, f, p = null, m = null, h = this.config.generateId, g = !1, _ = null, v = null, y = 0, b = /* @__PURE__ */ new Set(), x, S, C = [], w = (e) => { let t = C.pop(); if (t == null) return; let { finalJSON: n, closingDelta: r } = t.accumulator.finalize(); r.length > 0 && e.enqueue({ type: `tool-input-delta`, id: t.toolCallId, delta: r, providerMetadata: t.providerMetadata }), e.enqueue({ type: `tool-input-end`, id: t.toolCallId, providerMetadata: t.providerMetadata }), e.enqueue({ type: `tool-call`, toolCallId: t.toolCallId, toolName: t.toolName, input: n, providerMetadata: t.providerMetadata }), g = !0; }; return { stream: l.pipeThrough(new TransformStream({ start(e) { e.enqueue({ type: `stream-start`, warnings: n }); }, transform(t, n) { if (e.includeRawChunks && n.enqueue({ type: `raw`, rawValue: t.rawValue }), !t.success) { n.enqueue({ type: `error`, error: t.error }); return; } let r = t.value, i = r.usageMetadata; i != null && (d = i); let a = r.candidates?.[0]; if (a == null) return; let s = a.content; a.groundingMetadata != null && (p = a.groundingMetadata), a.urlContextMetadata != null && (m = a.urlContextMetadata); let c = ze$3({ groundingMetadata: a.groundingMetadata, generateId: h }); if (c != null) for (let e of c) e.sourceType === `url` && !b.has(e.url) && (b.add(e.url), n.enqueue(e)); if (s != null) { let e = s.parts ?? []; for (let t of e) if (`executableCode` in t && t.executableCode?.code) { let e = h(); x = e, n.enqueue({ type: `tool-call`, toolCallId: e, toolName: `code_execution`, input: JSON.stringify(t.executableCode), providerExecuted: !0 }); } else if (`codeExecutionResult` in t && t.codeExecutionResult) { let e = x; e && (n.enqueue({ type: `tool-result`, toolCallId: e, toolName: `code_execution`, result: { outcome: t.codeExecutionResult.outcome, output: t.codeExecutionResult.output ?? `` } }), x = void 0); } else if (`text` in t && t.text != null) { let e = t.thoughtSignature ? o({ thoughtSignature: t.thoughtSignature }) : void 0; t.text.length === 0 ? e != null && _ !== null && n.enqueue({ type: `text-delta`, id: _, delta: ``, providerMetadata: e }) : t.thought === !0 ? (_ !== null && (n.enqueue({ type: `text-end`, id: _ }), _ = null), v === null && (v = String(y++), n.enqueue({ type: `reasoning-start`, id: v, providerMetadata: e })), n.enqueue({ type: `reasoning-delta`, id: v, delta: t.text, providerMetadata: e })) : (v !== null && (n.enqueue({ type: `reasoning-end`, id: v }), v = null), _ === null && (_ = String(y++), n.enqueue({ type: `text-start`, id: _, providerMetadata: e })), n.enqueue({ type: `text-delta`, id: _, delta: t.text, providerMetadata: e })); } else if (`inlineData` in t) { _ !== null && (n.enqueue({ type: `text-end`, id: _ }), _ = null), v !== null && (n.enqueue({ type: `reasoning-end`, id: v }), v = null); let e = t.thought === !0, r = t.thoughtSignature ? o({ thoughtSignature: t.thoughtSignature }) : void 0; n.enqueue({ type: e ? `reasoning-file` : `file`, mediaType: t.inlineData.mimeType, data: { type: `data`, data: t.inlineData.data }, providerMetadata: r }); } else if (`toolCall` in t && t.toolCall) { let e = t.toolCall.id ?? h(); S = e; let r = o({ ...t.thoughtSignature ? { thoughtSignature: t.thoughtSignature } : {}, serverToolCallId: e, serverToolType: t.toolCall.toolType }); n.enqueue({ type: `tool-call`, toolCallId: e, toolName: `server:${t.toolCall.toolType}`, input: JSON.stringify(t.toolCall.args ?? {}), providerExecuted: !0, dynamic: !0, providerMetadata: r }); } else if (`toolResponse` in t && t.toolResponse) { let e = S ?? t.toolResponse.id ?? h(), r = o({ ...t.thoughtSignature ? { thoughtSignature: t.thoughtSignature } : {}, serverToolCallId: e, serverToolType: t.toolResponse.toolType }); n.enqueue({ type: `tool-result`, toolCallId: e, toolName: `server:${t.toolResponse.toolType}`, result: t.toolResponse.response ?? {}, providerMetadata: r }), S = void 0; } for (let t of e) { if (!(`functionCall` in t)) continue; let e = t.thoughtSignature ? o({ thoughtSignature: t.thoughtSignature }) : void 0, r = t.functionCall.partialArgs != null || t.functionCall.name != null && t.functionCall.willContinue === !0, i = t.functionCall.name == null && t.functionCall.args == null && t.functionCall.partialArgs == null && t.functionCall.willContinue == null, a = t.functionCall.name != null && t.functionCall.args != null && t.functionCall.partialArgs == null, s = t.functionCall.name != null && t.functionCall.args == null && t.functionCall.partialArgs == null && t.functionCall.willContinue !== !0; if (r) { if (t.functionCall.name != null) { let r = t.functionCall.id ?? h(), i = new Ce$3(); if (C.push({ toolCallId: r, toolName: t.functionCall.name, accumulator: i, providerMetadata: e }), n.enqueue({ type: `tool-input-start`, id: r, toolName: t.functionCall.name, providerMetadata: e }), t.functionCall.partialArgs != null) { let a = t.functionCall.partialArgs, { textDelta: o } = i.processPartialArgs(a); o.length > 0 && n.enqueue({ type: `tool-input-delta`, id: r, delta: o, providerMetadata: e }), t.functionCall.willContinue !== !0 && a.every((e) => e.willContinue !== !0) && w(n); } } else if (t.functionCall.partialArgs != null && C.length > 0) { let r = C[C.length - 1], i = t.functionCall.partialArgs, { textDelta: a } = r.accumulator.processPartialArgs(i); a.length > 0 && n.enqueue({ type: `tool-input-delta`, id: r.toolCallId, delta: a, providerMetadata: e }), t.functionCall.willContinue !== !0 && i.every((e) => e.willContinue !== !0) && w(n); } } else if (i && C.length > 0) w(n); else if (a) { let r = t.functionCall.id ?? h(), i = t.functionCall.name, a = typeof t.functionCall.args == `string` ? t.functionCall.args : JSON.stringify(t.functionCall.args ?? {}); n.enqueue({ type: `tool-input-start`, id: r, toolName: i, providerMetadata: e }), n.enqueue({ type: `tool-input-delta`, id: r, delta: a, providerMetadata: e }), n.enqueue({ type: `tool-input-end`, id: r, providerMetadata: e }), n.enqueue({ type: `tool-call`, toolCallId: r, toolName: i, input: a, providerMetadata: e }), g = !0; } else if (s) { let r = t.functionCall.id ?? h(), i = t.functionCall.name; n.enqueue({ type: `tool-input-start`, id: r, toolName: i, providerMetadata: e }), n.enqueue({ type: `tool-input-end`, id: r, providerMetadata: e }), n.enqueue({ type: `tool-call`, toolCallId: r, toolName: i, input: `{}`, providerMetadata: e }), g = !0; } } } a.finishReason != null && (u = { unified: je$3({ finishReason: a.finishReason, hasToolCalls: g }), raw: a.finishReason }, f = o({ promptFeedback: r.promptFeedback ?? null, groundingMetadata: p, urlContextMetadata: m, safetyRatings: a.safetyRatings ?? null, usageMetadata: i ?? null, finishMessage: a.finishMessage ?? null, serviceTier: d?.serviceTier ?? null })); }, flush(e) { _ !== null && e.enqueue({ type: `text-end`, id: _ }), v !== null && e.enqueue({ type: `reasoning-end`, id: v }), e.enqueue({ type: `finish`, finishReason: u, usage: de$3(d), providerMetadata: f }); } })), response: { headers: c }, request: { body: t } }; } }; function Ne$3(e) { return /gemini-3[\.\-]/i.test(e) || /gemini-3$/i.test(e); } function Pe$3() { return 65536; } function Fe$3(e) { let t = e.toLowerCase(); return t.includes(`2.5-pro`) || t.includes(`gemini-3-pro-image`) ? 32768 : 24576; } function Ie$3({ reasoning: e, modelId: t, warnings: n }) { if (Il(e)) return Ne$3(t) && !t.includes(`gemini-3-pro-image`) ? Le$3({ reasoning: e, warnings: n }) : Re$3({ reasoning: e, modelId: t, warnings: n }); } function Le$3({ reasoning: e, warnings: t }) { if (e === `none`) return { thinkingLevel: `minimal` }; let n = Ll({ reasoning: e, effortMap: { minimal: `minimal`, low: `low`, medium: `medium`, high: `high`, xhigh: `high` }, warnings: t }); if (n != null) return { thinkingLevel: n }; } function Re$3({ reasoning: e, modelId: t, warnings: n }) { if (e === `none`) return { thinkingBudget: 0 }; let r = zl({ reasoning: e, maxOutputTokens: Pe$3(), maxReasoningBudget: Fe$3(t), minReasoningBudget: 0, warnings: n }); if (r != null) return { thinkingBudget: r }; } function ze$3({ groundingMetadata: e, generateId: t }) { if (!e?.groundingChunks) return; let n = []; for (let r of e.groundingChunks) if (r.web != null) n.push({ type: `source`, sourceType: `url`, id: t(), url: r.web.uri, title: r.web.title ?? void 0 }); else if (r.image != null) n.push({ type: `source`, sourceType: `url`, id: t(), url: r.image.sourceUri, title: r.image.title ?? void 0 }); else if (r.retrievedContext != null) { let e = r.retrievedContext.uri, i = r.retrievedContext.fileSearchStore; if (e && (e.startsWith(`http://`) || e.startsWith(`https://`))) n.push({ type: `source`, sourceType: `url`, id: t(), url: e, title: r.retrievedContext.title ?? void 0 }); else if (e) { let i = r.retrievedContext.title ?? `Unknown Document`, a = `application/octet-stream`, o; e.endsWith(`.pdf`) ? (a = `application/pdf`, o = e.split(`/`).pop()) : e.endsWith(`.txt`) ? (a = `text/plain`, o = e.split(`/`).pop()) : e.endsWith(`.docx`) ? (a = `application/vnd.openxmlformats-officedocument.wordprocessingml.document`, o = e.split(`/`).pop()) : e.endsWith(`.doc`) ? (a = `application/msword`, o = e.split(`/`).pop()) : (e.match(/\.(md|markdown)$/) && (a = `text/markdown`), o = e.split(`/`).pop()), n.push({ type: `source`, sourceType: `document`, id: t(), mediaType: a, title: i, filename: o }); } else if (i) { let e = r.retrievedContext.title ?? `Unknown Document`; n.push({ type: `source`, sourceType: `document`, id: t(), mediaType: `application/octet-stream`, title: e, filename: i.split(`/`).pop() }); } } else r.maps != null && r.maps.uri && n.push({ type: `source`, sourceType: `url`, id: t(), url: r.maps.uri, title: r.maps.title ?? void 0 }); return n.length > 0 ? n : void 0; } var Be$3 = () => Co({ webSearchQueries: xo(Ra$2()).nullish(), imageSearchQueries: xo(Ra$2()).nullish(), retrievalQueries: xo(Ra$2()).nullish(), searchEntryPoint: Co({ renderedContent: Ra$2() }).nullish(), groundingChunks: xo(Co({ web: Co({ uri: Ra$2(), title: Ra$2().nullish() }).nullish(), image: Co({ sourceUri: Ra$2(), imageUri: Ra$2(), title: Ra$2().nullish(), domain: Ra$2().nullish() }).nullish(), retrievedContext: Co({ uri: Ra$2().nullish(), title: Ra$2().nullish(), text: Ra$2().nullish(), fileSearchStore: Ra$2().nullish() }).nullish(), maps: Co({ uri: Ra$2().nullish(), title: Ra$2().nullish(), text: Ra$2().nullish(), placeId: Ra$2().nullish() }).nullish() })).nullish(), groundingSupports: xo(Co({ segment: Co({ startIndex: oo().nullish(), endIndex: oo().nullish(), text: Ra$2().nullish() }).nullish(), segment_text: Ra$2().nullish(), groundingChunkIndices: xo(oo()).nullish(), supportChunkIndices: xo(oo()).nullish(), confidenceScores: xo(oo()).nullish(), confidenceScore: xo(oo()).nullish() })).nullish(), retrievalMetadata: Eo([Co({ webDynamicRetrievalScore: oo() }), Co({})]).nullish() }); var Ve$3 = Co({ jsonPath: Ra$2(), stringValue: Ra$2().nullish(), numberValue: oo().nullish(), boolValue: uo().nullish(), nullValue: _o().nullish(), willContinue: uo().nullish() }); var He$3 = () => Co({ parts: xo(Eo([ Co({ functionCall: Co({ id: Ra$2().nullish(), name: Ra$2().nullish(), args: _o().nullish(), partialArgs: xo(Ve$3).nullish(), willContinue: uo().nullish() }), thoughtSignature: Ra$2().nullish() }), Co({ inlineData: Co({ mimeType: Ra$2(), data: Ra$2() }), thought: uo().nullish(), thoughtSignature: Ra$2().nullish() }), Co({ toolCall: Co({ toolType: Ra$2(), args: _o().nullish(), id: Ra$2() }), thoughtSignature: Ra$2().nullish() }), Co({ toolResponse: Co({ toolType: Ra$2(), response: _o().nullish(), id: Ra$2() }), thoughtSignature: Ra$2().nullish() }), Co({ executableCode: Co({ language: Ra$2(), code: Ra$2() }).nullish(), codeExecutionResult: Co({ outcome: Ra$2(), output: Ra$2().nullish() }).nullish(), text: Ra$2().nullish(), thought: uo().nullish(), thoughtSignature: Ra$2().nullish() }) ])).nullish() }); var W$3 = () => Co({ category: Ra$2().nullish(), probability: Ra$2().nullish(), probabilityScore: oo().nullish(), severity: Ra$2().nullish(), severityScore: oo().nullish(), blocked: uo().nullish() }); var Ue$3 = xo(Co({ modality: Ra$2(), tokenCount: oo() })).nullish(); var We$3 = Co({ cachedContentTokenCount: oo().nullish(), thoughtsTokenCount: oo().nullish(), promptTokenCount: oo().nullish(), candidatesTokenCount: oo().nullish(), totalTokenCount: oo().nullish(), trafficType: Ra$2().nullish(), serviceTier: Ra$2().nullish(), promptTokensDetails: Ue$3, candidatesTokensDetails: Ue$3 }); var Ge$3 = () => Co({ urlMetadata: xo(Co({ retrievedUrl: Ra$2(), urlRetrievalStatus: Ra$2() })).nullish() }); var Ke$3 = Wu(() => Qu(Co({ candidates: xo(Co({ content: He$3().nullish().or(Co({}).strict()), finishReason: Ra$2().nullish(), finishMessage: Ra$2().nullish(), safetyRatings: xo(W$3()).nullish(), groundingMetadata: Be$3().nullish(), urlContextMetadata: Ge$3().nullish() })), usageMetadata: We$3.nullish(), promptFeedback: Co({ blockReason: Ra$2().nullish(), safetyRatings: xo(W$3()).nullish() }).nullish() }))); var qe$3 = Wu(() => Qu(Co({ candidates: xo(Co({ content: He$3().nullish(), finishReason: Ra$2().nullish(), finishMessage: Ra$2().nullish(), safetyRatings: xo(W$3()).nullish(), groundingMetadata: Be$3().nullish(), urlContextMetadata: Ge$3().nullish() })).nullish(), usageMetadata: We$3.nullish(), promptFeedback: Co({ blockReason: Ra$2().nullish(), safetyRatings: xo(W$3()).nullish() }).nullish() }))); var Je$3 = md({ id: `google.code_execution`, inputSchema: Co({ language: Ra$2().describe(`The programming language of the code.`), code: Ra$2().describe(`The code to be executed.`) }), outputSchema: Co({ outcome: Ra$2().describe(`The outcome of the execution (e.g., "OUTCOME_OK").`), output: Ra$2().describe(`The output from the code execution.`) }) }); var Ye$3 = md({ id: `google.enterprise_web_search`, inputSchema: Wu(() => Qu(Co({}))), outputSchema: Wu(() => Qu(Co({}))) }); Co({ fileSearchStoreNames: xo(Ra$2()).describe("The names of the file_search_stores to retrieve from. Example: `fileSearchStores/my-file-search-store-123`"), topK: oo().int().positive().describe(`The number of file search retrieval chunks to retrieve.`).optional(), metadataFilter: Ra$2().describe(`Metadata filter to apply to the file search retrieval documents. See https://google.aip.dev/160 for the syntax of the filter expression.`).optional() }).passthrough(); var Xe$3 = md({ id: `google.file_search`, inputSchema: Wu(() => Qu(Co({}))), outputSchema: Wu(() => Qu(Co({}))) }); var Ze$3 = md({ id: `google.google_maps`, inputSchema: Wu(() => Qu(Co({}))), outputSchema: Wu(() => Qu(Co({}))) }); var Qe$3 = Co({ searchTypes: Co({ webSearch: Co({}).optional(), imageSearch: Co({}).optional() }).optional(), timeRangeFilter: Co({ startTime: Ra$2(), endTime: Ra$2() }).optional() }).passthrough(); var $e$3 = { googleSearch: md({ id: `google.google_search`, inputSchema: Wu(() => Qu(Co({}))), outputSchema: Wu(() => Qu(Co({}))) }), enterpriseWebSearch: Ye$3, googleMaps: Ze$3, urlContext: md({ id: `google.url_context`, inputSchema: Wu(() => Qu(Co({}))), outputSchema: Wu(() => Qu(Co({}))) }), fileSearch: Xe$3, codeExecution: Je$3, vertexRagStore: md({ id: `google.vertex_rag_store`, inputSchema: Wu(() => Qu(Co({}))), outputSchema: Wu(() => Qu(Co({}))) }) }; var et$3 = Wu(() => Qu(Co({ personGeneration: Io([ `dont_allow`, `allow_adult`, `allow_all` ]).nullish(), aspectRatio: Io([ `1:1`, `3:4`, `4:3`, `9:16`, `16:9` ]).nullish(), googleSearch: Qe$3.optional() }))); var tt$3 = class e { constructor(e, t, n) { this.modelId = e, this.settings = t, this.config = n, this.specificationVersion = `v4`; } static [Mc](e) { return Cd({ modelId: e.modelId, config: e.config }); } static [Nc](t) { return new e(t.modelId, {}, t.config); } get maxImagesPerCall() { return this.settings.maxImagesPerCall == null ? nt$3(this.modelId) ? 10 : 4 : this.settings.maxImagesPerCall; } get provider() { return this.config.provider; } async doGenerate(e) { return nt$3(this.modelId) ? this.doGenerateGemini(e) : this.doGenerateImagen(e); } async doGenerateImagen(e) { var t; let { prompt: n, n: r = 1, size: a, aspectRatio: o = `1:1`, seed: s, providerOptions: c, headers: l, abortSignal: d, files: f, mask: p } = e, m = []; if (f != null && f.length > 0) throw Error(`Google Gemini API does not support image editing with Imagen models. Use Google Vertex AI (@ai-sdk/google-vertex) for image editing capabilities.`); if (p != null) throw Error(`Google Gemini API does not support image editing with masks. Use Google Vertex AI (@ai-sdk/google-vertex) for image editing capabilities.`); a != null && m.push({ type: `unsupported`, feature: `size`, details: "This model does not support the `size` option. Use `aspectRatio` instead." }), s != null && m.push({ type: `unsupported`, feature: `seed`, details: "This model does not support the `seed` option through this provider." }); let h = await ad({ provider: `google`, providerOptions: c, schema: et$3 }), g = ((t = this.config._internal)?.currentDate)?.call(t) ?? /* @__PURE__ */ new Date(), _ = { sampleCount: r }; if (o != null && (_.aspectRatio = o), h) { let { googleSearch: e, ...t } = h; e != null && m.push({ type: `unsupported`, feature: `googleSearch`, details: `Google Search grounding is only supported on Gemini image models.` }), Object.assign(_, t); } let v = { instances: [{ prompt: n }], parameters: _ }, { responseHeaders: y, value: b } = await sd({ url: `${this.config.baseURL}/models/${this.modelId}:predict`, headers: Pc(this.config.headers ? await hd(this.config.headers) : void 0, l), body: v, failedResponseHandler: H$3, successfulResponseHandler: bd(rt$3), abortSignal: d, fetch: this.config.fetch }); return { images: b.predictions.map((e) => e.bytesBase64Encoded), warnings: m, providerMetadata: { google: { images: b.predictions.map(() => ({})) } }, response: { timestamp: g, modelId: this.modelId, headers: y } }; } async doGenerateGemini(e) { var t; let { prompt: n, n: r, size: i, aspectRatio: a, seed: o, providerOptions: s, headers: c, abortSignal: l, files: d, mask: f } = e, p = []; if (f != null) throw Error(`Gemini image models do not support mask-based image editing.`); if (r != null && r > 1) throw Error(`Gemini image models do not support generating a set number of images per call. Use n=1 or omit the n parameter.`); i != null && p.push({ type: `unsupported`, feature: `size`, details: "This model does not support the `size` option. Use `aspectRatio` instead." }); let m = []; if (n != null && m.push({ type: `text`, text: n }), d != null && d.length > 0) for (let e of d) e.type === `url` ? m.push({ type: `file`, data: { type: `url`, url: new URL(e.url) }, mediaType: `image/*` }) : m.push({ type: `file`, data: { type: `data`, data: typeof e.data == `string` ? e.data : new Uint8Array(e.data) }, mediaType: e.mediaType }); let h = [{ role: `user`, content: m }], g = await ad({ provider: `google`, providerOptions: s, schema: et$3 }), { googleSearch: _, ...v } = s?.google ?? {}, y = await new Me$3(this.modelId, { provider: this.config.provider, baseURL: this.config.baseURL, headers: this.config.headers ?? {}, fetch: this.config.fetch, generateId: this.config.generateId ?? bl }).doGenerate({ prompt: h, seed: o, providerOptions: { google: { responseModalities: [`IMAGE`], imageConfig: a ? { aspectRatio: a } : void 0, ...v } }, tools: g?.googleSearch == null ? void 0 : [{ type: `provider`, id: `google.google_search`, name: `google_search`, args: g.googleSearch }], headers: c, abortSignal: l }), b = ((t = this.config._internal)?.currentDate)?.call(t) ?? /* @__PURE__ */ new Date(), x = []; for (let e of y.content) e.type === `file` && e.mediaType.startsWith(`image/`) && e.data.type === `data` && x.push(zc(e.data.data)); return { images: x, warnings: p, providerMetadata: { google: { ...y.providerMetadata?.google ?? {}, images: x.map(() => ({})) } }, response: { timestamp: b, modelId: this.modelId, headers: y.response?.headers }, usage: y.usage ? { inputTokens: y.usage.inputTokens.total, outputTokens: y.usage.outputTokens.total, totalTokens: (y.usage.inputTokens.total ?? 0) + (y.usage.outputTokens.total ?? 0) } : void 0 }; } }; function nt$3(e) { return e.startsWith(`gemini-`); } var rt$3 = Wu(() => Qu(Co({ predictions: xo(Co({ bytesBase64Encoded: Ra$2() })).default([]) }))); var it$3 = class { constructor(e) { this.config = e, this.specificationVersion = `v4`; } get provider() { return this.config.provider; } async uploadFile(t) { let n = await ad({ provider: `google`, providerOptions: t.providerOptions, schema: ot$3 }), r = this.config.headers(), i = this.config.fetch ?? globalThis.fetch, a = []; t.filename != null && a.push({ type: `unsupported`, feature: `filename` }); let o = Bc(t.data), s = t.mediaType, c = n?.displayName, l = await i(`${this.config.baseURL.replace(/\/v1beta$/, ``)}/upload/v1beta/files`, { method: `POST`, headers: { ...r, "X-Goog-Upload-Protocol": `resumable`, "X-Goog-Upload-Command": `start`, "X-Goog-Upload-Header-Content-Length": String(o.length), "X-Goog-Upload-Header-Content-Type": s, "Content-Type": `application/json` }, body: JSON.stringify({ file: { ...c == null ? {} : { display_name: c } } }) }); if (!l.ok) { let t = await l.text(); throw new i$17({ name: `GOOGLE_FILES_UPLOAD_ERROR`, message: `Failed to initiate resumable upload: ${l.status} ${t}` }); } let d = l.headers.get(`x-goog-upload-url`); if (!d) throw new i$17({ name: `GOOGLE_FILES_UPLOAD_ERROR`, message: `No upload URL returned from initiation request` }); let f = await i(d, { method: `POST`, headers: { "Content-Length": String(o.length), "X-Goog-Upload-Offset": `0`, "X-Goog-Upload-Command": `upload, finalize` }, body: o }); if (!f.ok) { let t = await f.text(); throw new i$17({ name: `GOOGLE_FILES_UPLOAD_ERROR`, message: `Failed to upload file data: ${f.status} ${t}` }); } let p = (await f.json()).file, m = n?.pollIntervalMs ?? 2e3, h = n?.pollTimeoutMs ?? 3e5, g = Date.now(); for (; p.state === `PROCESSING`;) { if (Date.now() - g > h) throw new i$17({ name: `GOOGLE_FILES_UPLOAD_TIMEOUT`, message: `File processing timed out after ${h}ms` }); await Uc(m); let { value: t } = await jl({ url: `${this.config.baseURL}/${p.name}`, headers: Pc(r), successfulResponseHandler: bd(at$3), failedResponseHandler: H$3, fetch: this.config.fetch }); p = t; } if (p.state === `FAILED`) throw new i$17({ name: `GOOGLE_FILES_UPLOAD_FAILED`, message: `File processing failed for ${p.name}` }); return { warnings: a, providerReference: { google: p.uri }, mediaType: p.mimeType ?? t.mediaType, providerMetadata: { google: { name: p.name, displayName: p.displayName, mimeType: p.mimeType, sizeBytes: p.sizeBytes, state: p.state, uri: p.uri, ...p.createTime == null ? {} : { createTime: p.createTime }, ...p.updateTime == null ? {} : { updateTime: p.updateTime }, ...p.expirationTime == null ? {} : { expirationTime: p.expirationTime }, ...p.sha256Hash == null ? {} : { sha256Hash: p.sha256Hash } } } }; } }; var at$3 = Wu(() => Qu(Co({ name: Ra$2(), displayName: Ra$2().nullish(), mimeType: Ra$2(), sizeBytes: Ra$2().nullish(), createTime: Ra$2().nullish(), updateTime: Ra$2().nullish(), expirationTime: Ra$2().nullish(), sha256Hash: Ra$2().nullish(), uri: Ra$2(), state: Ra$2() }))); var ot$3 = Wu(() => Qu(Co({ displayName: Ra$2().nullish(), pollIntervalMs: oo().positive().nullish(), pollTimeoutMs: oo().positive().nullish() }).passthrough())); var st$3 = Wu(() => Qu(Co({ pollIntervalMs: oo().positive().nullish(), pollTimeoutMs: oo().positive().nullish(), personGeneration: Io([ `dont_allow`, `allow_adult`, `allow_all` ]).nullish(), negativePrompt: Ra$2().nullish(), referenceImages: xo(Co({ bytesBase64Encoded: Ra$2().nullish(), gcsUri: Ra$2().nullish() })).nullish() }).passthrough())); var ct$3 = class { constructor(e, t) { this.modelId = e, this.config = t, this.specificationVersion = `v4`; } get provider() { return this.config.provider; } get maxVideosPerCall() { return 4; } async doGenerate(t) { var n; let r = ((n = this.config._internal)?.currentDate)?.call(n) ?? /* @__PURE__ */ new Date(), a = [], o = await ad({ provider: `google`, providerOptions: t.providerOptions, schema: st$3 }), s = [{}], c = s[0]; if (t.prompt != null && (c.prompt = t.prompt), t.image != null) if (t.image.type === `url`) a.push({ type: `unsupported`, feature: `URL-based image input`, details: `Google Generative AI video models require base64-encoded images. URL will be ignored.` }); else { let e = typeof t.image.data == `string` ? t.image.data : Rc(t.image.data); c.image = { inlineData: { mimeType: t.image.mediaType || `image/png`, data: e } }; } o?.referenceImages != null && (c.referenceImages = o.referenceImages.map((e) => e.bytesBase64Encoded ? { inlineData: { mimeType: `image/png`, data: e.bytesBase64Encoded } } : e.gcsUri ? { gcsUri: e.gcsUri } : e)); let l = { sampleCount: t.n }; if (t.aspectRatio && (l.aspectRatio = t.aspectRatio), t.resolution && (l.resolution = { "1280x720": `720p`, "1920x1080": `1080p`, "3840x2160": `4k` }[t.resolution] || t.resolution), t.duration && (l.durationSeconds = t.duration), t.seed && (l.seed = t.seed), o != null) { let e = o; e.personGeneration !== void 0 && e.personGeneration !== null && (l.personGeneration = e.personGeneration), e.negativePrompt !== void 0 && e.negativePrompt !== null && (l.negativePrompt = e.negativePrompt); for (let [t, n] of Object.entries(e)) [ `pollIntervalMs`, `pollTimeoutMs`, `personGeneration`, `negativePrompt`, `referenceImages` ].includes(t) || (l[t] = n); } let { value: d } = await sd({ url: `${this.config.baseURL}/models/${this.modelId}:predictLongRunning`, headers: Pc(await hd(this.config.headers), t.headers), body: { instances: s, parameters: l }, successfulResponseHandler: bd(lt$3), failedResponseHandler: H$3, abortSignal: t.abortSignal, fetch: this.config.fetch }), p = d.name; if (!p) throw new i$17({ name: `GOOGLE_VIDEO_GENERATION_ERROR`, message: `No operation name returned from API` }); let m = o?.pollIntervalMs ?? 1e4, h = o?.pollTimeoutMs ?? 6e5, g = Date.now(), _ = d, v; for (; !_.done;) { if (Date.now() - g > h) throw new i$17({ name: `GOOGLE_VIDEO_GENERATION_TIMEOUT`, message: `Video generation timed out after ${h}ms` }); if (await Uc(m), t.abortSignal?.aborted) throw new i$17({ name: `GOOGLE_VIDEO_GENERATION_ABORTED`, message: `Video generation request was aborted` }); let { value: n, responseHeaders: r } = await jl({ url: `${this.config.baseURL}/${p}`, headers: Pc(await hd(this.config.headers), t.headers), successfulResponseHandler: bd(lt$3), failedResponseHandler: H$3, abortSignal: t.abortSignal, fetch: this.config.fetch }); _ = n, v = r; } if (_.error) throw new i$17({ name: `GOOGLE_VIDEO_GENERATION_FAILED`, message: `Video generation failed: ${_.error.message}` }); let y = _.response; if (!y?.generateVideoResponse?.generatedSamples || y.generateVideoResponse.generatedSamples.length === 0) throw new i$17({ name: `GOOGLE_VIDEO_GENERATION_ERROR`, message: `No videos in response. Response: ${JSON.stringify(_)}` }); let b = [], x = [], C = (await hd(this.config.headers))?.[`x-goog-api-key`]; for (let e of y.generateVideoResponse.generatedSamples) if (e.video?.uri) { let t = C && Ml(e.video.uri, this.config.baseURL) ? `${e.video.uri}${e.video.uri.includes(`?`) ? `&` : `?`}key=${C}` : e.video.uri; b.push({ type: `url`, url: t, mediaType: `video/mp4` }), x.push({ uri: e.video.uri }); } if (b.length === 0) throw new i$17({ name: `GOOGLE_VIDEO_GENERATION_ERROR`, message: `No valid videos in response` }); return { videos: b, warnings: a, response: { timestamp: r, modelId: this.modelId, headers: v }, providerMetadata: { google: { videos: x } } }; } }; var lt$3 = Co({ name: Ra$2().nullish(), done: uo().nullish(), error: Co({ code: oo().nullish(), message: Ra$2(), status: Ra$2().nullish() }).nullish(), response: Co({ generateVideoResponse: Co({ generatedSamples: xo(Co({ video: Co({ uri: Ra$2().nullish() }).nullish() })).nullish() }).nullish() }).nullish() }); var ut$3 = Wu(() => Qu(Co({ candidates: xo(Co({ content: Co({ parts: xo(Co({ inlineData: Co({ mimeType: Ra$2().nullish(), data: Ra$2().nullish() }).nullish() })).nullish() }).nullish() })).nullish() }))); var dt$3 = Co({ prebuiltVoiceConfig: Co({ voiceName: Ra$2() }) }); var ft$3 = Wu(() => Qu(Co({ multiSpeakerVoiceConfig: Co({ speakerVoiceConfigs: xo(Co({ speaker: Ra$2(), voiceConfig: dt$3 })) }).optional() }))); var pt$3 = `Kore`; var mt$3 = 24e3; var ht$3 = class e { constructor(e, t) { this.modelId = e, this.config = t, this.specificationVersion = `v4`; } static [Mc](e) { return Cd({ modelId: e.modelId, config: e.config }); } static [Nc](t) { return new e(t.modelId, t.config); } get provider() { return this.config.provider; } async getArgs({ text: e, voice: t = pt$3, outputFormat: n, instructions: r, speed: i, language: a, providerOptions: o }) { let s = [], c = this.config.provider.includes(`vertex`) ? [`googleVertex`, `vertex`] : [`google`], l; for (let e of c) if (l = await ad({ provider: e, providerOptions: o, schema: ft$3 }), l != null) break; l == null && !c.includes(`google`) && (l = await ad({ provider: `google`, providerOptions: o, schema: ft$3 })); let d = l?.multiSpeakerVoiceConfig, f = d ? { multiSpeakerVoiceConfig: d } : { voiceConfig: { prebuiltVoiceConfig: { voiceName: t } } }, p = e; r != null && (d ? s.push({ type: `unsupported`, feature: `instructions`, details: "Google Gemini TTS ignores `instructions` when `multiSpeakerVoiceConfig` is set, because prepending them would break multi-speaker transcript parsing." }) : p = `${r}: ${e}`), i != null && s.push({ type: `unsupported`, feature: `speed`, details: "Google Gemini TTS models do not support the `speed` option. It was ignored." }), a != null && s.push({ type: `unsupported`, feature: `language`, details: "Google Gemini TTS models do not support the `language` option. Language is detected automatically from the input text." }); let m = `wav`; return n === `pcm` ? m = `pcm` : n != null && n !== `wav` && s.push({ type: `unsupported`, feature: `outputFormat`, details: `Unsupported output format: ${n}. Using wav instead.` }), { requestBody: { contents: [{ role: `user`, parts: [{ text: p }] }], generationConfig: { responseModalities: [`AUDIO`], speechConfig: f } }, warnings: s, outputFormat: m }; } async doGenerate(e) { var t; let n = ((t = this.config._internal)?.currentDate)?.call(t) ?? /* @__PURE__ */ new Date(), { requestBody: r, warnings: a, outputFormat: o } = await this.getArgs(e), { value: s, responseHeaders: c, rawValue: l } = await sd({ url: `${this.config.baseURL}/models/${this.modelId}:generateContent`, headers: Pc(this.config.headers ? await hd(this.config.headers) : void 0, e.headers), body: r, failedResponseHandler: H$3, successfulResponseHandler: bd(ut$3), abortSignal: e.abortSignal, fetch: this.config.fetch }), u, d; for (let e of s.candidates ?? []) { for (let t of e.content?.parts ?? []) if (t.inlineData?.data) { u = t.inlineData.data, d = t.inlineData.mimeType ?? void 0; break; } if (u != null) break; } let f = gt$3(d) ?? mt$3, p = u == null ? /* @__PURE__ */ new Uint8Array() : Lc(u), m = o === `pcm` || p.length === 0 ? p : _t$3(p, f); return o === `pcm` && p.length > 0 && a.push({ type: `unsupported`, feature: `outputFormat`, details: `Returning raw PCM audio (signed 16-bit little-endian, mono, ${f} Hz). These bytes have no container header and are not directly playable; see providerMetadata.google for the sample rate and mime type.` }), { audio: m, warnings: a, request: { body: JSON.stringify(r) }, response: { timestamp: n, modelId: this.modelId, headers: c, body: l }, providerMetadata: { google: { sampleRate: f, mimeType: d ?? null } } }; } }; function gt$3(e) { if (e == null) return; let t = /rate=(\d+)/.exec(e); return t ? Number.parseInt(t[1], 10) : void 0; } function _t$3(e, t) { let n = t * 2, r = e.length, i = new ArrayBuffer(44 + r), a = new DataView(i); G$4(a, 0, `RIFF`), a.setUint32(4, 36 + r, !0), G$4(a, 8, `WAVE`), G$4(a, 12, `fmt `), a.setUint32(16, 16, !0), a.setUint16(20, 1, !0), a.setUint16(22, 1, !0), a.setUint32(24, t, !0), a.setUint32(28, n, !0), a.setUint16(32, 2, !0), a.setUint16(34, 16, !0), G$4(a, 36, `data`), a.setUint32(40, r, !0); let o = new Uint8Array(i); return o.set(e, 44), o; } function G$4(e, t, n) { for (let r = 0; r < n.length; r++) e.setUint8(t + r, n.charCodeAt(r)); } function K$3(e) { if (e == null) return { inputTokens: { total: void 0, noCache: void 0, cacheRead: void 0, cacheWrite: void 0 }, outputTokens: { total: void 0, text: void 0, reasoning: void 0 }, raw: void 0 }; let t = e.total_input_tokens ?? 0, n = e.total_output_tokens ?? 0, r = e.total_thought_tokens ?? 0, i = e.total_cached_tokens ?? 0; return { inputTokens: { total: e.total_input_tokens ?? void 0, noCache: e.total_input_tokens == null ? void 0 : t - i, cacheRead: e.total_cached_tokens ?? void 0, cacheWrite: void 0 }, outputTokens: { total: e.total_output_tokens == null && e.total_thought_tokens == null ? void 0 : n + r, text: e.total_output_tokens ?? void 0, reasoning: e.total_thought_tokens ?? void 0 }, raw: e }; } var vt$3 = { pdf: `application/pdf`, txt: `text/plain`, md: `text/markdown`, markdown: `text/markdown`, doc: `application/msword`, docx: `application/vnd.openxmlformats-officedocument.wordprocessingml.document` }; function yt$3(e) { let t = e.toLowerCase(); for (let [e, n] of Object.entries(vt$3)) if (t.endsWith(`.${e}`)) return n; return `application/octet-stream`; } function bt$3(e) { let t = e.split(`/`), n = t[t.length - 1]; return n && n.length > 0 ? n : void 0; } function xt$3({ annotation: e, generateId: t }) { switch (e.type) { case `url_citation`: { let n = e; return n.url == null || n.url.length === 0 ? void 0 : { type: `source`, sourceType: `url`, id: t(), url: n.url, ...n.title == null ? {} : { title: n.title } }; } case `file_citation`: { let n = e, r = n.url ?? n.document_uri ?? n.file_name; if (r == null || r.length === 0) return; if (r.startsWith(`http://`) || r.startsWith(`https://`)) return { type: `source`, sourceType: `url`, id: t(), url: r, ...n.file_name == null ? {} : { title: n.file_name } }; let i = n.file_name ?? bt$3(r), a = yt$3(r); return { type: `source`, sourceType: `document`, id: t(), mediaType: a, title: n.file_name ?? i ?? r, ...i == null ? {} : { filename: i } }; } case `place_citation`: { let n = e; return n.url == null || n.url.length === 0 ? void 0 : { type: `source`, sourceType: `url`, id: t(), url: n.url, ...n.name == null ? {} : { title: n.name } }; } default: return; } } function St$3({ block: e, generateId: t }) { let n = []; switch (e.type) { case `url_context_result`: { let r = e.result ?? []; for (let e of r) e?.url == null || e.url.length === 0 || e.status != null && e.status !== `success` || n.push({ type: `source`, sourceType: `url`, id: t(), url: e.url }); break; } case `google_search_result`: { let r = e.result ?? []; for (let e of r) { let r = e?.url; r == null || r.length === 0 || n.push({ type: `source`, sourceType: `url`, id: t(), url: r, ...e.title == null ? {} : { title: e.title } }); } break; } case `google_maps_result`: { let r = e.result ?? []; for (let e of r) for (let r of e.places ?? []) r.url == null || r.url.length === 0 || n.push({ type: `source`, sourceType: `url`, id: t(), url: r.url, ...r.name == null ? {} : { title: r.name } }); break; } case `file_search_result`: { let r = e.result ?? []; for (let e of r) { if (typeof e != `object` || !e) continue; let r = e, i = r.url ?? r.document_uri ?? r.file_name; if (i == null || i.length === 0) continue; if (i.startsWith(`http://`) || i.startsWith(`https://`)) { n.push({ type: `source`, sourceType: `url`, id: t(), url: i, ...r.title == null ? {} : { title: r.title } }); continue; } let a = r.file_name ?? bt$3(i), o = yt$3(i); n.push({ type: `source`, sourceType: `document`, id: t(), mediaType: o, title: r.title ?? r.file_name ?? a ?? i, ...a == null ? {} : { filename: a } }); } break; } default: break; } return n; } function q$3({ annotations: e, generateId: t }) { if (e == null) return []; let n = /* @__PURE__ */ new Set(), r = []; for (let i of e) { let e = xt$3({ annotation: i, generateId: t }); if (e == null) continue; let a = e.sourceType === `url` ? `url:${e.url}` : `doc:${e.filename ?? e.title}`; n.has(a) || (n.add(a), r.push(e)); } return r; } function J$3({ status: e, hasFunctionCall: t }) { switch (e) { case `completed`: return t ? `tool-calls` : `stop`; case `requires_action`: return `tool-calls`; case `failed`: return `error`; case `incomplete`: return `length`; case `cancelled`: return `other`; default: return `other`; } } var Ct$3 = /* @__PURE__ */ new Set([ `google_search_call`, `code_execution_call`, `url_context_call`, `file_search_call`, `google_maps_call`, `mcp_server_tool_call` ]); var wt$3 = /* @__PURE__ */ new Set([ `google_search_result`, `code_execution_result`, `url_context_result`, `file_search_result`, `google_maps_result`, `mcp_server_tool_result` ]); function Tt$3(e) { return e.replace(/_call$/, ``); } function Et$3(e) { return e.replace(/_result$/, ``); } function Dt$3({ warnings: e, generateId: t, includeRawChunks: n, serviceTier: r }) { let i, a, o = r, s, c = !1, l = /* @__PURE__ */ new Map(), u = /* @__PURE__ */ new Set(); function d(e) { return e.sourceType === `url` ? `url:${e.url}` : `doc:${e.filename ?? e.title}`; } return new TransformStream({ start(t) { t.enqueue({ type: `stream-start`, warnings: e }); }, transform(e, r) { if (n && r.enqueue({ type: `raw`, rawValue: e.rawValue }), !e.success) { s = `failed`, r.enqueue({ type: `error`, error: e.error }); return; } let f = e.value, p = f.event_type; switch (p) { case `interaction.created`: { let e = f.interaction; i = e?.id != null && e.id.length > 0 ? e.id : void 0; let t = e?.created, n; if (typeof t == `string`) { let e = new Date(t); Number.isNaN(e.getTime()) || (n = e); } r.enqueue({ type: `response-metadata`, ...i == null ? {} : { id: i }, modelId: e?.model, ...n ? { timestamp: n } : {} }); break; } case `step.start`: { let e = f, n = e.step, a = e.index, o = `${i ?? `interaction`}:${a}`, s = n?.type; if (s === `model_output`) { let e = n?.content?.[0]; if (e?.type === `text`) { l.set(a, { kind: `text`, id: o, emittedSourceKeys: /* @__PURE__ */ new Set() }), r.enqueue({ type: `text-start`, id: o }); let n = q$3({ annotations: e.annotations, generateId: t }); for (let e of n) { let t = d(e); u.has(t) || (u.add(t), r.enqueue(e)); } } else e?.type === `image` ? l.set(a, { kind: `image`, id: o, ...e.data == null ? {} : { data: e.data }, ...e.mime_type == null ? {} : { mimeType: e.mime_type }, ...e.uri == null ? {} : { uri: e.uri } }) : l.set(a, { kind: `pending_model_output`, id: o }); } else if (s === `thought`) { let e = n?.signature; if (l.set(a, { kind: `reasoning`, id: o, ...e == null ? {} : { signature: e } }), r.enqueue({ type: `reasoning-start`, id: o }), Array.isArray(n?.summary)) for (let e of n.summary) e?.type === `text` && typeof e.text == `string` && r.enqueue({ type: `reasoning-delta`, id: o, delta: e.text }); } else if (s === `function_call`) { let e = n?.id ?? o, t = n?.name ?? `unknown`; c = !0; let i = { kind: `function_call`, id: o, toolCallId: e, toolName: t, argumentsAccum: ``, ...n?.signature == null ? {} : { signature: n.signature } }; l.set(a, i), r.enqueue({ type: `tool-input-start`, id: e, toolName: t }); } else if (s != null && Ct$3.has(s)) { let e = s === `mcp_server_tool_call` ? n?.name ?? `mcp_server_tool` : Tt$3(s), t = { kind: `builtin_tool_call`, id: o, blockType: s, toolCallId: n?.id ?? o, toolName: e, arguments: n?.arguments ?? {}, callEmitted: !1 }; l.set(a, t); } else if (s != null && wt$3.has(s)) { let e = s === `mcp_server_tool_result` ? n?.name ?? `mcp_server_tool` : Et$3(s), t = { kind: `builtin_tool_result`, id: o, blockType: s, callId: n?.call_id ?? o, toolName: e, result: n?.result ?? null, ...n?.is_error == null ? {} : { isError: n.is_error }, resultEmitted: !1 }; l.set(a, t); } else l.set(a, { kind: `unknown`, id: o }); break; } case `step.delta`: { let e = f, n = l.get(e.index); if (n == null) break; let a = e.delta?.type; if (n.kind === `pending_model_output` && (a === `text` || a === `text_annotation` || a === `text_annotation_delta`)) { let t = { kind: `text`, id: n.id, emittedSourceKeys: /* @__PURE__ */ new Set() }; l.set(e.index, t), n = t, r.enqueue({ type: `text-start`, id: t.id }); } if (a === `image` && (n.kind === `pending_model_output` || n.kind === `text` || n.kind === `image`)) { let t = e.delta, a = {}; i != null && (a.interactionId = i); let o = Object.keys(a).length > 0 ? { google: a } : void 0; t?.data != null && t.data.length > 0 ? r.enqueue({ type: `file`, mediaType: t.mime_type ?? `image/png`, data: { type: `data`, data: t.data }, ...o ? { providerMetadata: o } : {} }) : t?.uri != null && t.uri.length > 0 && r.enqueue({ type: `file`, mediaType: t.mime_type ?? `image/png`, data: { type: `url`, url: new URL(t.uri) }, ...o ? { providerMetadata: o } : {} }), n.kind === `image` && (n.data = void 0, n.uri = void 0); break; } let o = e.delta; if (n.kind === `text` && o?.type === `text`) { let e = o.text ?? ``; e.length > 0 && r.enqueue({ type: `text-delta`, id: n.id, delta: e }); } else if (n.kind === `text` && (o?.type === `text_annotation` || o?.type === `text_annotation_delta`)) { let e = q$3({ annotations: o.annotations, generateId: t }); for (let t of e) { let e = d(t); u.has(e) || (u.add(e), n.emittedSourceKeys.add(e), r.enqueue(t)); } } else if (n.kind === `image` && o?.type === `image`) o.data != null && (n.data = o.data), o.mime_type != null && (n.mimeType = o.mime_type), o.uri != null && (n.uri = o.uri); else if (n.kind === `reasoning`) { if (o?.type === `thought_summary`) { let e = o.content; e?.type === `text` && typeof e.text == `string` && r.enqueue({ type: `reasoning-delta`, id: n.id, delta: e.text }); } else if (o?.type === `thought_signature`) { let e = o.signature; e != null && (n.signature = e); } } else if (n.kind === `function_call` && o?.type === `arguments_delta`) { let e = typeof o.arguments == `string` ? o.arguments : ``; e.length > 0 && (n.argumentsAccum += e, r.enqueue({ type: `tool-input-delta`, id: n.toolCallId, delta: e })), o.id != null && (n.toolCallId = o.id), o.signature != null && (n.signature = o.signature), c = !0; } else n.kind === `builtin_tool_call` && o?.type === n.blockType ? (o.id != null && (n.toolCallId = o.id), o.arguments != null && typeof o.arguments == `object` && (n.arguments = o.arguments), o.name != null && n.blockType === `mcp_server_tool_call` && (n.toolName = o.name)) : n.kind === `builtin_tool_result` && o?.type === n.blockType && (o.call_id != null && (n.callId = o.call_id), o.result !== void 0 && (n.result = o.result), o.is_error != null && (n.isError = o.is_error), o.name != null && n.blockType === `mcp_server_tool_result` && (n.toolName = o.name)); break; } case `step.stop`: { let e = f, n = l.get(e.index); if (n == null) break; if (n.kind === `text`) { let e = i == null ? void 0 : { google: { interactionId: i } }; r.enqueue({ type: `text-end`, id: n.id, ...e ? { providerMetadata: e } : {} }); } else if (n.kind === `reasoning`) { let e = {}; n.signature != null && (e.signature = n.signature), i != null && (e.interactionId = i); let t = Object.keys(e).length > 0 ? { google: e } : void 0; r.enqueue({ type: `reasoning-end`, id: n.id, ...t ? { providerMetadata: t } : {} }); } else if (n.kind === `image`) { let e = {}; i != null && (e.interactionId = i); let t = Object.keys(e).length > 0 ? { google: e } : void 0; n.data != null && n.data.length > 0 ? r.enqueue({ type: `file`, mediaType: n.mimeType ?? `image/png`, data: { type: `data`, data: n.data }, ...t ? { providerMetadata: t } : {} }) : n.uri != null && n.uri.length > 0 && r.enqueue({ type: `file`, mediaType: n.mimeType ?? `image/png`, data: { type: `url`, url: new URL(n.uri) }, ...t ? { providerMetadata: t } : {} }); } else if (n.kind === `function_call`) { let e = n.argumentsAccum.length > 0 ? n.argumentsAccum : `{}`; r.enqueue({ type: `tool-input-end`, id: n.toolCallId }); let t = {}; n.signature != null && (t.signature = n.signature), i != null && (t.interactionId = i); let a = Object.keys(t).length > 0 ? { google: t } : void 0; r.enqueue({ type: `tool-call`, toolCallId: n.toolCallId, toolName: n.toolName, input: e, ...a ? { providerMetadata: a } : {} }); } else if (n.kind === `builtin_tool_call` && !n.callEmitted) r.enqueue({ type: `tool-call`, toolCallId: n.toolCallId, toolName: n.toolName, input: JSON.stringify(n.arguments ?? {}), providerExecuted: !0 }), n.callEmitted = !0; else if (n.kind === `builtin_tool_result` && !n.resultEmitted) { r.enqueue({ type: `tool-result`, toolCallId: n.callId, toolName: n.toolName, result: n.result ?? null }), n.resultEmitted = !0; let e = St$3({ block: { type: n.blockType, call_id: n.callId, result: n.result }, generateId: t }); for (let t of e) { let e = d(t); u.has(e) || (u.add(e), r.enqueue(t)); } } l.delete(e.index); break; } case `interaction.status_update`: case `interaction.in_progress`: case `interaction.requires_action`: { let e = f; s = e.status == null ? p === `interaction.requires_action` ? `requires_action` : `in_progress` : e.status; break; } case `interaction.completed`: { let e = f.interaction; e?.id != null && e.id.length > 0 && (i = e.id), e?.status != null && (s = e.status), e?.usage != null && (a = e.usage), e?.service_tier != null && (o = e.service_tier); break; } case `error`: { let e = f; s = `failed`; let t = e.error ?? { message: `Unknown interaction error` }; r.enqueue({ type: `error`, error: t }); break; } default: break; } }, flush(e) { let t = { unified: J$3({ status: s, hasFunctionCall: c }), raw: s }, n = { google: { ...i == null ? {} : { interactionId: i }, ...o == null ? {} : { serviceTier: o } } }; e.enqueue({ type: `finish`, finishReason: t, usage: K$3(a), providerMetadata: n }); } }); } function Ot$3({ prompt: e, previousInteractionId: t, store: n, mediaResolution: r }) { let i = [], a = t != null && n === !1, o = t != null && n !== !1; a && i.push({ type: `other`, message: `google.interactions: providerOptions.google.previousInteractionId was set together with store: false. These are incoherent (the prior interaction cannot be referenced when nothing was stored on the server); the full history will be sent and previous_interaction_id will still be emitted.` }); let s = o ? At$3({ prompt: e, previousInteractionId: t }) : e, c = [], l = []; for (let e of s) switch (e.role) { case `system`: c.push(e.content); break; case `user`: { let t = []; for (let n of e.content) if (n.type === `text`) t.push({ type: `text`, text: n.text }); else if (n.type === `file`) { let e = kt$3({ part: n, warnings: i, mediaResolution: r }); e != null && t.push(e); } let n = Pt$3(t); n.length > 0 && l.push({ type: `user_input`, content: n }); break; } case `assistant`: { let t = [], n = () => { t.length > 0 && (l.push({ type: `model_output`, content: t }), t = []); }; for (let a of e.content) if (a.type === `text`) t.push({ type: `text`, text: a.text }); else if (a.type === `reasoning`) { n(); let e = a.providerOptions?.google?.signature; l.push({ type: `thought`, ...e == null ? {} : { signature: e }, summary: a.text.length > 0 ? [{ type: `text`, text: a.text }] : void 0 }); } else if (a.type === `file`) { let e = kt$3({ part: a, warnings: i, mediaResolution: r }); e != null && t.push(e); } else if (a.type === `tool-call`) { n(); let e = a.providerOptions?.google?.signature, t = typeof a.input == `string` ? jt$3(a.input) : a.input ?? {}; l.push({ type: `function_call`, id: a.toolCallId, name: a.toolName, arguments: t, ...e == null ? {} : { signature: e } }); } else i.push({ type: `other`, message: `google.interactions: unsupported assistant content part type "${a.type}"; part dropped.` }); n(); break; } case `tool`: { let t = []; for (let n of e.content) { if (n.type !== `tool-result`) { i.push({ type: `other`, message: `google.interactions: unsupported tool message part type "${n.type}"; part dropped.` }); continue; } let e = Mt$3({ toolCallId: n.toolCallId, toolName: n.toolName, output: n.output, signature: n.providerOptions?.google?.signature, warnings: i }); t.push(e); } t.length > 0 && l.push({ type: `user_input`, content: t }); break; } } return { input: l, systemInstruction: c.length > 0 ? c.join(` `) : void 0, warnings: i }; } function kt$3({ part: e, warnings: t, mediaResolution: n }) { if (e.data.type === `text`) return { type: `text`, text: e.data.text }; let r = el(e.mediaType), i; switch (r) { case `image`: i = `image`; break; case `audio`: i = `audio`; break; case `video`: i = `video`; break; case `application`: i = `document`; break; default: i = void 0; } if (i == null) { t.push({ type: `other`, message: `google.interactions: unsupported file media type "${e.mediaType}"; part dropped.` }); return; } let s = n != null && (i === `image` || i === `video`) ? { resolution: n } : {}; switch (e.data.type) { case `data`: { let t = gd({ part: e }); return { type: i, data: zc(e.data.data), mime_type: t, ...s }; } case `url`: return { type: i, uri: e.data.url.toString(), ...tl(e.mediaType) ? { mime_type: e.mediaType } : {}, ...s }; case `reference`: { let t = _d({ reference: e.data.reference, provider: `google` }); return { type: i, uri: t, ...tl(e.mediaType) ? { mime_type: e.mediaType } : {}, ...s }; } } } function At$3({ prompt: e, previousInteractionId: t }) { let n = [], r = /* @__PURE__ */ new Set(); for (let i of e) { if (i.role === `assistant`) { if (i.content.some((e) => e.providerOptions?.google?.interactionId === t)) { for (let e of i.content) e.type === `tool-call` && r.add(e.toolCallId); continue; } n.push(i); continue; } if (i.role === `tool`) { let e = i.content.filter((e) => e.type === `tool-result` ? !r.has(e.toolCallId) : !0); if (e.length === 0) continue; n.push({ ...i, content: e }); continue; } n.push(i); } return n; } function jt$3(e) { try { let t = JSON.parse(e); return typeof t == `object` && t && !Array.isArray(t) ? t : { value: t }; } catch { return { value: e }; } } function Mt$3({ toolCallId: e, toolName: t, output: n, signature: r, warnings: i }) { let o = { type: `function_result`, call_id: e, name: t, ...r == null ? {} : { signature: r } }; switch (n.type) { case `text`: return { ...o, result: n.value }; case `json`: return { ...o, result: JSON.stringify(n.value) }; case `error-text`: return { ...o, is_error: !0, result: n.value }; case `error-json`: return { ...o, is_error: !0, result: JSON.stringify(n.value) }; case `execution-denied`: return { ...o, is_error: !0, result: n.reason ?? `Tool execution denied by user.` }; case `content`: { let e = []; for (let t of n.value) if (t.type === `text`) e.push({ type: `text`, text: t.text }); else if (t.type === `file`) { if (el(t.mediaType) !== `image`) { i.push({ type: `other`, message: `google.interactions: tool-result file with mediaType "${t.mediaType}" is not supported (Interactions \`function_result.result\` accepts only text and image content); part dropped.` }); continue; } let n = Nt$3({ part: t, warnings: i }); n != null && e.push(n); } else i.push({ type: `other`, message: `google.interactions: tool-result content part type "${t.type}" is not supported; part dropped.` }); return { ...o, result: e }; } } } function Nt$3({ part: e, warnings: t }) { switch (e.data.type) { case `data`: { let t = tl(e.mediaType) ? e.mediaType : gd({ part: { type: `file`, mediaType: e.mediaType, data: e.data } }); return { type: `image`, data: zc(e.data.data), mime_type: t }; } case `url`: return { type: `image`, uri: e.data.url.toString(), ...tl(e.mediaType) ? { mime_type: e.mediaType } : {} }; case `reference`: return { type: `image`, uri: _d({ reference: e.data.reference, provider: `google` }), ...tl(e.mediaType) ? { mime_type: e.mediaType } : {} }; case `text`: t.push({ type: `other`, message: "google.interactions: tool-result image part with `data.type === \"text\"` is not representable as an image; part dropped." }); return; } } function Pt$3(e) { if (e.length < 2) return e; let t = []; for (let n of e) { let e = t[t.length - 1]; if (n.type === `text` && e != null && e.type === `text` && e.annotations == null && n.annotations == null) { let r = { type: `text`, text: `${e.text} ${n.text}` }; t[t.length - 1] = r; continue; } t.push(n); } return t; } var Y$4 = () => Co({ modality: Ra$2().nullish(), tokens: oo().nullish() }).loose(); var Ft$3 = () => Co({ total_input_tokens: oo().nullish(), total_output_tokens: oo().nullish(), total_thought_tokens: oo().nullish(), total_cached_tokens: oo().nullish(), total_tool_use_tokens: oo().nullish(), total_tokens: oo().nullish(), input_tokens_by_modality: xo(Y$4()).nullish(), output_tokens_by_modality: xo(Y$4()).nullish(), cached_tokens_by_modality: xo(Y$4()).nullish(), tool_use_tokens_by_modality: xo(Y$4()).nullish(), grounding_tool_count: xo(Co({ type: Ra$2().nullish(), count: oo().nullish() }).loose()).nullish() }).loose(); var It$3 = () => Io([ `in_progress`, `requires_action`, `completed`, `failed`, `cancelled`, `incomplete` ]); var Lt$3 = () => Eo([ Co({ type: Ro(`url_citation`), url: Ra$2().nullish(), title: Ra$2().nullish(), start_index: oo().nullish(), end_index: oo().nullish() }).loose(), Co({ type: Ro(`file_citation`), file_name: Ra$2().nullish(), document_uri: Ra$2().nullish(), url: Ra$2().nullish(), page_number: oo().nullish(), media_id: Ra$2().nullish(), start_index: oo().nullish(), end_index: oo().nullish(), custom_metadata: Po(Ra$2(), _o()).nullish() }).loose(), Co({ type: Ro(`place_citation`), name: Ra$2().nullish(), url: Ra$2().nullish(), place_id: Ra$2().nullish(), start_index: oo().nullish(), end_index: oo().nullish() }).loose(), Co({ type: Ra$2() }).loose() ]); var Rt$3 = () => Co({ type: Ra$2(), text: Ra$2().nullish(), data: Ra$2().nullish(), mime_type: Ra$2().nullish() }).loose(); var zt$3 = () => Eo([ Co({ type: Ro(`text`), text: Ra$2(), annotations: xo(Lt$3()).nullish() }).loose(), Co({ type: Ro(`image`), data: Ra$2().nullish(), mime_type: Ra$2().nullish(), resolution: Io([ `low`, `medium`, `high`, `ultra_high` ]).nullish(), uri: Ra$2().nullish() }).loose(), Co({ type: Ra$2() }).loose() ]); var Bt$3 = [ `google_search_call`, `code_execution_call`, `url_context_call`, `file_search_call`, `google_maps_call`, `mcp_server_tool_call` ]; var Vt$3 = [ `google_search_result`, `code_execution_result`, `url_context_result`, `file_search_result`, `google_maps_result`, `mcp_server_tool_result` ]; var Ht$3 = () => Eo([ Co({ type: Ro(`user_input`), content: xo(zt$3()).nullish() }).loose(), Co({ type: Ro(`model_output`), content: xo(zt$3()).nullish() }).loose(), Co({ type: Ro(`function_call`), id: Ra$2(), name: Ra$2(), arguments: Po(Ra$2(), _o()).nullish(), signature: Ra$2().nullish() }).loose(), Co({ type: Ro(`thought`), signature: Ra$2().nullish(), summary: xo(Rt$3()).nullish() }).loose(), Co({ type: Io(Bt$3), id: Ra$2(), arguments: Po(Ra$2(), _o()).nullish(), name: Ra$2().nullish(), server_name: Ra$2().nullish(), search_type: Ra$2().nullish(), signature: Ra$2().nullish() }).loose(), Co({ type: Io(Vt$3), call_id: Ra$2(), result: _o().nullish(), is_error: uo().nullish(), name: Ra$2().nullish(), server_name: Ra$2().nullish(), signature: Ra$2().nullish() }).loose(), Co({ type: Ra$2() }).loose() ]); var X$4 = Wu(() => Qu(Co({ id: Ra$2().nullish(), created: Ra$2().nullish(), updated: Ra$2().nullish(), status: It$3(), model: Ra$2().nullish(), agent: Ra$2().nullish(), steps: xo(Ht$3()).nullish(), usage: Ft$3().nullish(), service_tier: Ra$2().nullish(), previous_interaction_id: Ra$2().nullish(), response_modalities: xo(Ra$2()).nullish() }).loose())); var Ut$3 = Wu(() => Qu((() => { let e = It$3(), t = Lt$3(), n = Rt$3(), r = Co({ event_type: Ro(`interaction.created`), event_id: Ra$2().nullish(), interaction: Co({ id: Ra$2().nullish(), created: Ra$2().nullish(), model: Ra$2().nullish(), agent: Ra$2().nullish(), status: e.nullish() }).loose() }).loose(), i = Co({ event_type: Ro(`step.start`), event_id: Ra$2().nullish(), index: oo(), step: Ht$3() }).loose(), a = Co({ type: Ro(`text`), text: Ra$2() }).loose(), o = Co({ type: Ro(`thought_summary`), content: n.nullish() }).loose(), s = Co({ type: Ro(`thought_signature`), signature: Ra$2().nullish() }).loose(), c = Co({ type: Ro(`arguments_delta`), arguments: Ra$2().nullish(), id: Ra$2().nullish(), signature: Ra$2().nullish() }).loose(), l = Co({ type: Io([`text_annotation_delta`, `text_annotation`]), annotations: xo(t).nullish() }).loose(), u = Eo([ a, Co({ type: Ro(`image`), data: Ra$2().nullish(), mime_type: Ra$2().nullish(), resolution: Io([ `low`, `medium`, `high`, `ultra_high` ]).nullish(), uri: Ra$2().nullish() }).loose(), o, s, c, l, Co({ type: Io(Bt$3), id: Ra$2().nullish(), arguments: Po(Ra$2(), _o()).nullish(), name: Ra$2().nullish(), server_name: Ra$2().nullish(), search_type: Ra$2().nullish(), signature: Ra$2().nullish() }).loose(), Co({ type: Io(Vt$3), call_id: Ra$2().nullish(), result: _o().nullish(), is_error: uo().nullish(), name: Ra$2().nullish(), server_name: Ra$2().nullish(), signature: Ra$2().nullish() }).loose(), Co({ type: Ra$2() }).loose() ]); return Eo([ r, i, Co({ event_type: Ro(`step.delta`), event_id: Ra$2().nullish(), index: oo(), delta: u }).loose(), Co({ event_type: Ro(`step.stop`), event_id: Ra$2().nullish(), index: oo() }).loose(), Co({ event_type: Ro(`interaction.status_update`), event_id: Ra$2().nullish(), interaction_id: Ra$2().nullish(), status: e.nullish() }).loose(), Co({ event_type: Ro(`interaction.in_progress`), event_id: Ra$2().nullish(), interaction_id: Ra$2().nullish(), status: e.nullish() }).loose(), Co({ event_type: Ro(`interaction.requires_action`), event_id: Ra$2().nullish(), interaction_id: Ra$2().nullish(), status: e.nullish() }).loose(), Co({ event_type: Ro(`interaction.completed`), event_id: Ra$2().nullish(), interaction: Co({ id: Ra$2().nullish(), status: e.nullish(), usage: Ft$3().nullish(), service_tier: Ra$2().nullish() }).loose() }).loose(), Co({ event_type: Ro(`error`), event_id: Ra$2().nullish(), error: Co({ code: Ra$2().nullish(), message: Ra$2().nullish() }).loose().nullish() }).loose(), Co({ event_type: Ra$2() }).loose() ]); })())); var Wt$3 = Wu(() => Qu(Co({ previousInteractionId: Ra$2().nullish(), store: uo().nullish(), agent: Ra$2().nullish(), agentConfig: Eo([Co({ type: Ro(`dynamic`) }).loose(), Co({ type: Ro(`deep-research`), thinkingSummaries: Io([`auto`, `none`]).nullish(), visualization: Io([`off`, `auto`]).nullish(), collaborativePlanning: uo().nullish() })]).nullish(), thinkingLevel: Io([ `minimal`, `low`, `medium`, `high` ]).nullish(), thinkingSummaries: Io([`auto`, `none`]).nullish(), responseFormat: xo(Eo([ Co({ type: Ro(`text`), mimeType: Ra$2().nullish(), schema: _o().nullish() }).loose(), Co({ type: Ro(`image`), mimeType: Ra$2().nullish(), aspectRatio: Io([ `1:1`, `2:3`, `3:2`, `3:4`, `4:3`, `4:5`, `5:4`, `9:16`, `16:9`, `21:9`, `1:8`, `8:1`, `1:4`, `4:1` ]).nullish(), imageSize: Io([ `1K`, `2K`, `4K`, `512` ]).nullish() }).loose(), Co({ type: Ro(`audio`), mimeType: Ra$2().nullish() }).loose() ])).nullish(), imageConfig: Co({ aspectRatio: Io([ `1:1`, `2:3`, `3:2`, `3:4`, `4:3`, `4:5`, `5:4`, `9:16`, `16:9`, `21:9`, `1:8`, `8:1`, `1:4`, `4:1` ]).nullish(), imageSize: Io([ `1K`, `2K`, `4K`, `512` ]).nullish() }).nullish(), mediaResolution: Io([ `low`, `medium`, `high`, `ultra_high` ]).nullish(), responseModalities: xo(Io([ `text`, `image`, `audio`, `video`, `document` ])).nullish(), serviceTier: Io([ `flex`, `standard`, `priority` ]).nullish(), systemInstruction: Ra$2().nullish(), signature: Ra$2().nullish(), interactionId: Ra$2().nullish(), pollingTimeoutMs: oo().int().positive().nullish(), background: uo().nullish(), environment: Eo([Ra$2(), Co({ type: Ro(`remote`), sources: xo(Eo([ Co({ type: Ro(`gcs`), source: Ra$2(), target: Ra$2().nullish() }), Co({ type: Ro(`repository`), source: Ra$2(), target: Ra$2().nullish() }), Co({ type: Ro(`inline`), content: Ra$2(), target: Ra$2() }) ])).nullish(), network: Eo([Ro(`disabled`), Co({ allowlist: xo(Co({ domain: Ra$2(), transform: xo(Po(Ra$2(), Ra$2())).nullish() })) })]).nullish() })]).nullish() }))); function Z$4({ signature: e, interactionId: t }) { let n = {}; return e != null && (n.signature = e), t != null && (n.interactionId = t), Object.keys(n).length > 0 ? { providerMetadata: { google: n } } : {}; } var Gt$3 = /* @__PURE__ */ new Set([ `google_search_call`, `code_execution_call`, `url_context_call`, `file_search_call`, `google_maps_call`, `mcp_server_tool_call` ]); var Kt$3 = /* @__PURE__ */ new Set([ `google_search_result`, `code_execution_result`, `url_context_result`, `file_search_result`, `google_maps_result`, `mcp_server_tool_result` ]); function qt$3(e) { return e.replace(/_call$/, ``); } function Jt$3(e) { return e.replace(/_result$/, ``); } function Yt$3({ steps: e, generateId: t, interactionId: n }) { let r = [], i = !1; if (e == null) return { content: r, hasFunctionCall: i }; for (let a of e) { if (typeof a != `object` || !a) continue; let e = a.type; if (typeof e == `string`) switch (e) { case `user_input`: break; case `model_output`: { let e = a.content ?? []; for (let i of e) { if (typeof i != `object` || !i) continue; let e = i.type; if (e === `text`) { let e = i.text ?? ``, a = i.annotations; r.push({ type: `text`, text: e, ...Z$4({ interactionId: n }) }); let o = q$3({ annotations: a, generateId: t }); for (let e of o) r.push(e); } else if (e === `image`) { let e = i; e.data != null && e.data.length > 0 ? r.push({ type: `file`, mediaType: e.mime_type ?? `image/png`, data: { type: `data`, data: e.data }, ...Z$4({ interactionId: n }) }) : e.uri != null && e.uri.length > 0 && r.push({ type: `file`, mediaType: e.mime_type ?? `image/png`, data: { type: `url`, url: new URL(e.uri) }, ...Z$4({ interactionId: n }) }); } } break; } case `thought`: { let e = a, t = (Array.isArray(e.summary) ? e.summary : []).filter((e) => e?.type === `text` && typeof e.text == `string`).map((e) => e.text).join(` `); r.push({ type: `reasoning`, text: t, ...Z$4({ signature: e.signature, interactionId: n }) }); break; } case `function_call`: { i = !0; let e = a; r.push({ type: `tool-call`, toolCallId: e.id, toolName: e.name, input: JSON.stringify(e.arguments ?? {}), ...Z$4({ signature: e.signature, interactionId: n }) }); break; } default: if (Gt$3.has(e)) { let n = a, i = e === `mcp_server_tool_call` ? n.name ?? `mcp_server_tool` : qt$3(e), o = JSON.stringify(n.arguments ?? {}); r.push({ type: `tool-call`, toolCallId: n.id ?? t(), toolName: i, input: o, providerExecuted: !0 }); } else if (Kt$3.has(e)) { let n = a, i = e === `mcp_server_tool_result` ? n.name ?? `mcp_server_tool` : Jt$3(e); r.push({ type: `tool-result`, toolCallId: n.call_id ?? t(), toolName: i, result: n.result ?? null }); let o = St$3({ block: a, generateId: t }); for (let e of o) r.push(e); } break; } } return { content: r, hasFunctionCall: i }; } var Xt$3 = () => globalThis.fetch; async function Zt$3({ baseURL: e, interactionId: t, headers: n, fetch: r = Xt$3() }) { if (t == null || t.length === 0) return; let i = `${e}/interactions/${encodeURIComponent(t)}/cancel`; try { let e = await r(i, { method: `POST`, headers: Ol(Pc({ "Content-Type": `application/json` }, n), El()), body: `{}` }); try { await e.text(); } catch {} } catch {} } var Qt$3 = /* @__PURE__ */ new Set([ `completed`, `failed`, `cancelled`, `incomplete` ]); function $t$3(e) { return e != null && Qt$3.has(e); } var en$3 = 1e3; var tn$3 = 1e4; var nn$3 = 1800 * 1e3; async function rn$3({ baseURL: e, interactionId: t, headers: n, fetch: r, abortSignal: i, initialDelayMs: a = en$3, maxDelayMs: o = tn$3, timeoutMs: s = nn$3 }) { if (t == null || t.length === 0) throw Error(`google.interactions: cannot poll a background interaction without an id. The POST response did not include an interaction id.`); let c = Date.now(), l = a, u = `${e}/interactions/${encodeURIComponent(t)}`, d = () => Zt$3({ baseURL: e, interactionId: t, headers: n, fetch: r }); try { for (;;) { if (i?.aborted) throw await d(), new DOMException(`Polling was aborted`, `AbortError`); if (Date.now() - c > s) throw Error(`google.interactions: timed out polling interaction ${t} after ${s}ms.`); await Uc(l, { abortSignal: i }); let { value: e, rawValue: a, responseHeaders: f } = await jl({ url: u, headers: n, failedResponseHandler: H$3, successfulResponseHandler: bd(X$4), abortSignal: i, fetch: r }); if ($t$3(e.status)) return { response: e, rawResponse: a, responseHeaders: f }; l = Math.min(l * 2, o); } } catch (e) { throw xl(e) && await d(), e; } } function an$3({ tools: e, toolChoice: t }) { let n = [], r = e?.length ? e : void 0; if (r == null) return { tools: void 0, toolChoice: void 0, toolWarnings: n }; let i = []; for (let e of r) { if (e.type === `function`) { i.push({ type: `function`, name: e.name, description: e.description ?? ``, parameters: e.inputSchema }); continue; } if (e.type === `provider`) { let t = e.args ?? {}; switch (e.id) { case `google.google_search`: { let e = t.searchTypes, n; if (typeof e == `object` && e) { let t = []; e.webSearch != null && t.push(`web_search`), e.imageSearch != null && t.push(`image_search`), t.length > 0 && (n = t); } i.push({ type: `google_search`, ...n == null ? {} : { search_types: n } }); break; } case `google.code_execution`: i.push({ type: `code_execution` }); break; case `google.url_context`: i.push({ type: `url_context` }); break; case `google.file_search`: i.push({ type: `file_search`, ...t.fileSearchStoreNames == null ? {} : { file_search_store_names: t.fileSearchStoreNames }, ...t.topK == null ? {} : { top_k: t.topK }, ...t.metadataFilter == null ? {} : { metadata_filter: t.metadataFilter } }); break; case `google.google_maps`: i.push({ type: `google_maps`, ...t.latitude == null ? {} : { latitude: t.latitude }, ...t.longitude == null ? {} : { longitude: t.longitude }, ...t.enableWidget == null ? {} : { enable_widget: t.enableWidget } }); break; case `google.computer_use`: i.push({ type: `computer_use`, environment: t.environment ?? `browser`, ...t.excludedPredefinedFunctions == null ? {} : { excludedPredefinedFunctions: t.excludedPredefinedFunctions } }); break; case `google.mcp_server`: i.push({ type: `mcp_server`, ...t.name == null ? {} : { name: t.name }, ...t.url == null ? {} : { url: t.url }, ...t.headers == null ? {} : { headers: t.headers }, ...t.allowedTools == null ? {} : { allowed_tools: t.allowedTools } }); break; case `google.retrieval`: { let e = t.vertexAiSearchConfig ?? void 0; i.push({ type: `retrieval`, ...t.retrievalTypes == null ? { retrieval_types: [`vertex_ai_search`] } : { retrieval_types: t.retrievalTypes }, ...e == null ? {} : { vertex_ai_search_config: e } }); break; } default: n.push({ type: `unsupported`, feature: `provider-defined tool ${e.id}`, details: `provider-defined tool ${e.id} is not supported by google.interactions; tool dropped.` }); break; } continue; } n.push({ type: `unsupported`, feature: `tool of type ${e.type}`, details: `Only function tools and google.* provider-defined tools are supported by google.interactions; tool dropped.` }); } let a = i.some((e) => e.type === `function`), o; if (t != null && a) switch (t.type) { case `auto`: o = `auto`; break; case `required`: o = `any`; break; case `none`: o = `none`; break; case `tool`: o = { allowed_tools: { mode: `validated`, tools: [t.toolName] } }; break; } return { tools: i.length > 0 ? i : void 0, toolChoice: o, toolWarnings: n }; } var on$3 = 3; var sn$3 = 500; function cn$3({ baseURL: e, interactionId: t, headers: n, fetch: r, abortSignal: i, maxRetries: a = on$3, retryDelayMs: o = sn$3 }) { if (t.length === 0) throw Error(`google.interactions: cannot stream a background interaction without an id.`); let s = { ...n, accept: `text/event-stream` }, c, l = !1, u = 0, d = !1, f, p = new AbortController(), m = () => p.abort(); i != null && (i.aborted ? p.abort() : i.addEventListener(`abort`, m, { once: !0 })); let h = p.signal; function g() { let n = `${e}/interactions/${encodeURIComponent(t)}`, r = new URLSearchParams({ stream: `true` }); return c != null && r.set(`last_event_id`, c), `${n}?${r.toString()}`; } async function _() { let { value: e } = await jl({ url: g(), headers: s, failedResponseHandler: H$3, successfulResponseHandler: yd(Ut$3), abortSignal: h, fetch: r }); return e.getReader(); } return new ReadableStream({ async start(s) { try { for (; !l && !h.aborted;) { if (f == null) try { f = await _(), d = !1; } catch (e) { if (xl(e) || h.aborted) { s.error(e); return; } if (u++, u >= a) { s.error(e); return; } await Uc(o * u, { abortSignal: h }); continue; } try { let { done: e, value: t } = await f.read(); if (e) { if (f = void 0, l) break; if (d) u = 0; else { if (u++, u >= a) { s.error(Error(`google.interactions: SSE stream closed without producing any events.`)); return; } await Uc(o * u, { abortSignal: h }); } continue; } if (d = !0, t.success) { let e = t.value; typeof e.event_id == `string` && e.event_id.length > 0 && (c = e.event_id), (e.event_type === `interaction.completed` || e.event_type === `error`) && (l = !0); } s.enqueue(t); } catch (e) { if (xl(e) || h.aborted) { s.error(e); return; } if (f = void 0, u++, u >= a) { s.error(e); return; } await Uc(o * u, { abortSignal: h }); } } s.close(); } catch (e) { s.error(e); } finally { i?.removeEventListener(`abort`, m), f?.cancel().catch(() => {}), f = void 0, h.aborted && !l && await Zt$3({ baseURL: e, interactionId: t, headers: n, fetch: r }); } }, cancel() { p.abort(), f?.cancel().catch(() => {}), f = void 0; } }); } function ln$3({ response: e, warnings: t, generateId: n, includeRawChunks: r, headerServiceTier: i }) { return new ReadableStream({ start(a) { a.enqueue({ type: `stream-start`, warnings: t }); let o = typeof e.id == `string` && e.id.length > 0 ? e.id : void 0, s, c = e.created; if (typeof c == `string`) { let e = new Date(c); Number.isNaN(e.getTime()) || (s = e); } a.enqueue({ type: `response-metadata`, ...o == null ? {} : { id: o }, modelId: e.model ?? void 0, ...s ? { timestamp: s } : {} }), r && a.enqueue({ type: `raw`, rawValue: e }); let { content: l, hasFunctionCall: u } = Yt$3({ steps: e.steps ?? null, generateId: n, interactionId: o }), d = 0, f = () => `${o ?? `agent`}:${d++}`; for (let e of l) switch (e.type) { case `text`: { let t = f(), n = e.providerMetadata; a.enqueue({ type: `text-start`, id: t }), e.text.length > 0 && a.enqueue({ type: `text-delta`, id: t, delta: e.text }), a.enqueue({ type: `text-end`, id: t, ...n ? { providerMetadata: n } : {} }); break; } case `reasoning`: { let t = f(), n = e.providerMetadata; a.enqueue({ type: `reasoning-start`, id: t }), e.text.length > 0 && a.enqueue({ type: `reasoning-delta`, id: t, delta: e.text }), a.enqueue({ type: `reasoning-end`, id: t, ...n ? { providerMetadata: n } : {} }); break; } case `tool-call`: { let t = e.providerMetadata; a.enqueue({ type: `tool-input-start`, id: e.toolCallId, toolName: e.toolName, ...e.providerExecuted ? { providerExecuted: e.providerExecuted } : {} }), a.enqueue({ type: `tool-input-delta`, id: e.toolCallId, delta: e.input }), a.enqueue({ type: `tool-input-end`, id: e.toolCallId }), a.enqueue({ type: `tool-call`, toolCallId: e.toolCallId, toolName: e.toolName, input: e.input, ...e.providerExecuted ? { providerExecuted: e.providerExecuted } : {}, ...t ? { providerMetadata: t } : {} }); break; } case `tool-result`: a.enqueue({ type: `tool-result`, toolCallId: e.toolCallId, toolName: e.toolName, result: e.result }); break; case `source`: case `file`: a.enqueue(e); break; default: break; } let p = e.service_tier ?? i, m = { unified: J$3({ status: e.status, hasFunctionCall: u }), raw: e.status }, h = { google: { ...o == null ? {} : { interactionId: o }, ...p == null ? {} : { serviceTier: p } } }; a.enqueue({ type: `finish`, finishReason: m, usage: K$3(e.usage), providerMetadata: h }), a.close(); } }); } var un$3 = class e { constructor(e, t) { this.specificationVersion = `v4`, typeof e == `string` ? (this.modelId = e, this.agent = void 0) : `managedAgent` in e ? (this.modelId = e.managedAgent, this.agent = e.managedAgent) : (this.modelId = e.agent, this.agent = e.agent), this.config = t; } static [Mc](e) { return { ...Cd({ modelId: e.modelId, config: e.config }), agent: e.agent }; } static [Nc](t) { return new e(t.agent == null ? t.modelId : { agent: t.agent }, t.config); } get provider() { return this.config.provider; } get supportedUrls() { return this.config.supportedUrls ? this.config.supportedUrls() : { "image/*": [/^https?:\/\/.+/], "application/pdf": [/^https?:\/\/.+/], "audio/*": [/^https?:\/\/.+/], "video/*": [ /^https?:\/\/(www\.)?youtube\.com\/watch\?v=.+/, /^https?:\/\/youtu\.be\/.+/, /^gs:\/\/.+/ ] }; } async getArgs(e) { let t = [], n = await ad({ provider: `google`, providerOptions: e.providerOptions, schema: Wt$3 }), r = this.agent != null, i = e.tools != null && e.tools.length > 0, a, o; if (i && r) t.push({ type: `other`, message: `google.interactions: tools are not supported when an agent is set; tools will be omitted from the request body.` }); else if (i) { let n = an$3({ tools: e.tools, toolChoice: e.toolChoice }); a = n.tools, o = n.toolChoice, t.push(...n.toolWarnings); } let s = []; if (e.responseFormat?.type === `json`) if (r) t.push({ type: `other`, message: `google.interactions: structured output (responseFormat) is not supported when an agent is set; responseFormat will be ignored.` }); else { let t = { type: `text`, mime_type: `application/json`, ...e.responseFormat.schema == null ? {} : { schema: e.responseFormat.schema } }; s.push(t); } if (n?.responseFormat != null) for (let e of n.responseFormat) e.type === `text` ? s.push(Q$4({ type: `text`, mime_type: e.mimeType ?? void 0, schema: e.schema ?? void 0 })) : e.type === `image` ? s.push(Q$4({ type: `image`, mime_type: e.mimeType ?? void 0, aspect_ratio: e.aspectRatio ?? void 0, image_size: e.imageSize ?? void 0 })) : e.type === `audio` && s.push(Q$4({ type: `audio`, mime_type: e.mimeType ?? void 0 })); let { input: c, systemInstruction: l, warnings: d } = Ot$3({ prompt: e.prompt, previousInteractionId: n?.previousInteractionId ?? void 0, store: n?.store ?? void 0, mediaResolution: n?.mediaResolution ?? void 0 }); t.push(...d); let f = l, p = n?.systemInstruction ?? void 0; f != null && p != null ? t.push({ type: `other`, message: `google.interactions: both AI SDK system message and providerOptions.google.systemInstruction were set; using the AI SDK system message.` }) : f == null && p != null && (f = p); let m; if (r) { let r = []; e.temperature != null && r.push(`temperature`), e.topP != null && r.push(`topP`), e.seed != null && r.push(`seed`), e.stopSequences != null && e.stopSequences.length > 0 && r.push(`stopSequences`), e.maxOutputTokens != null && r.push(`maxOutputTokens`), n?.thinkingLevel != null && r.push(`thinkingLevel`), n?.thinkingSummaries != null && r.push(`thinkingSummaries`), n?.imageConfig != null && r.push(`imageConfig`), r.length > 0 && t.push({ type: `other`, message: `google.interactions: ${r.join(`, `)} ${r.length === 1 ? `is` : `are`} not supported when an agent is set; use providerOptions.google.agentConfig instead. Dropped from the request body.` }), m = void 0; } else if (m = Q$4({ temperature: e.temperature ?? void 0, top_p: e.topP ?? void 0, seed: e.seed ?? void 0, stop_sequences: e.stopSequences != null && e.stopSequences.length > 0 ? e.stopSequences : void 0, max_output_tokens: e.maxOutputTokens ?? void 0, thinking_level: n?.thinkingLevel ?? void 0, thinking_summaries: n?.thinkingSummaries ?? void 0, tool_choice: o }), n?.imageConfig != null) { let e = s.some((e) => e.type === `image`); t.push({ type: `other`, message: e ? `google.interactions: providerOptions.google.imageConfig is deprecated and was ignored because providerOptions.google.responseFormat already supplies an image entry. Use responseFormat exclusively.` : `google.interactions: providerOptions.google.imageConfig is deprecated. Use providerOptions.google.responseFormat with a { type: "image", ... } entry instead.` }), e || s.push({ type: `image`, mime_type: `image/png`, ...n.imageConfig.aspectRatio == null ? {} : { aspect_ratio: n.imageConfig.aspectRatio }, ...n.imageConfig.imageSize == null ? {} : { image_size: n.imageConfig.imageSize } }); } let h; if (r && n?.agentConfig != null) { let e = n.agentConfig; e.type === `deep-research` ? h = Q$4({ type: `deep-research`, thinking_summaries: e.thinkingSummaries ?? void 0, visualization: e.visualization ?? void 0, collaborative_planning: e.collaborativePlanning ?? void 0 }) : e.type === `dynamic` && (h = { type: `dynamic` }); } let g; if (n?.environment != null) if (!r) t.push({ type: `other`, message: `google.interactions: environment is only supported when an agent is set; environment will be omitted from the request body.` }); else if (typeof n.environment == `string`) g = n.environment; else { let e = n.environment, t = e.sources?.map((e) => e.type === `inline` ? { type: `inline`, content: e.content, target: e.target } : Q$4({ type: e.type, source: e.source, target: e.target ?? void 0 })), r; e.network === `disabled` ? r = `disabled` : e.network != null && (r = { allowlist: e.network.allowlist.map((e) => Q$4({ domain: e.domain, transform: e.transform ?? void 0 })) }), g = Q$4({ type: `remote`, sources: t != null && t.length > 0 ? t : void 0, network: r }); } return { args: Q$4({ ...r ? { agent: this.agent } : { model: this.modelId }, input: c, system_instruction: f, tools: a, response_format: s.length > 0 ? s : void 0, response_modalities: n?.responseModalities == null ? void 0 : n.responseModalities, previous_interaction_id: n?.previousInteractionId ?? void 0, service_tier: n?.serviceTier ?? void 0, store: n?.store ?? void 0, generation_config: m != null && Object.keys(m).length > 0 ? m : void 0, agent_config: h, environment: g, background: n?.background ?? void 0 }), warnings: t, isAgent: r, isBackground: n?.background === !0, pollingTimeoutMs: n?.pollingTimeoutMs ?? void 0 }; } async doGenerate(e) { let { args: t, warnings: n, isAgent: r, pollingTimeoutMs: a } = await this.getArgs(e), o = `${this.config.baseURL}/interactions`, s = Pc(this.config.headers ? await hd(this.config.headers) : void 0, e.headers), { responseHeaders: c, value: l, rawValue: u } = await sd({ url: o, headers: s, body: t, failedResponseHandler: H$3, successfulResponseHandler: bd(X$4), abortSignal: e.abortSignal, fetch: this.config.fetch }); if (r && !$t$3(l.status)) { let t = await rn$3({ baseURL: this.config.baseURL, interactionId: l.id, headers: s, fetch: this.config.fetch, abortSignal: e.abortSignal, timeoutMs: a }); l = t.response, u = t.rawResponse, c = t.responseHeaders ?? c; } let d = typeof l.id == `string` && l.id.length > 0 ? l.id : void 0, { content: f, hasFunctionCall: p } = Yt$3({ steps: l.steps ?? null, generateId: this.config.generateId ?? bl, interactionId: d }), m = { unified: J$3({ status: l.status, hasFunctionCall: p }), raw: l.status }, h = l.service_tier ?? c?.[`x-gemini-service-tier`] ?? void 0, g = { google: { ...d == null ? {} : { interactionId: d }, ...h == null ? {} : { serviceTier: h } } }, _; if (typeof l.created == `string`) { let e = new Date(l.created); Number.isNaN(e.getTime()) || (_ = e); } return { content: f, finishReason: m, usage: K$3(l.usage), warnings: n, providerMetadata: g, request: { body: t }, response: { headers: c, body: u, ...d == null ? {} : { id: d }, ..._ ? { timestamp: _ } : {}, modelId: l.model ?? void 0 } }; } async doStream(e) { let { args: t, warnings: n, isBackground: r, pollingTimeoutMs: a } = await this.getArgs(e), o = `${this.config.baseURL}/interactions`, s = Pc(this.config.headers ? await hd(this.config.headers) : void 0, e.headers); if (r) return this.doStreamBackground({ args: t, warnings: n, url: o, mergedHeaders: s, options: e, pollingTimeoutMs: a }); let c = { ...t, stream: !0 }, { responseHeaders: l, value: u } = await sd({ url: o, headers: s, body: c, failedResponseHandler: H$3, successfulResponseHandler: yd(Ut$3), abortSignal: e.abortSignal, fetch: this.config.fetch }), d = l?.[`x-gemini-service-tier`], f = Dt$3({ warnings: n, generateId: this.config.generateId ?? bl, includeRawChunks: e.includeRawChunks, serviceTier: d }); return { stream: u.pipeThrough(f), request: { body: c }, response: { headers: l } }; } async doStreamBackground({ args: e, warnings: t, url: n, mergedHeaders: r, options: i, pollingTimeoutMs: a }) { let { responseHeaders: o, value: s } = await sd({ url: n, headers: r, body: e, failedResponseHandler: H$3, successfulResponseHandler: bd(X$4), abortSignal: i.abortSignal, fetch: this.config.fetch }), c = s.id; if (c == null || c.length === 0) throw Error(`google.interactions: background POST response did not include an interaction id; cannot stream the result.`); let l = o?.[`x-gemini-service-tier`]; if ($t$3(s.status)) return { stream: ln$3({ response: s, warnings: t, generateId: this.config.generateId ?? bl, includeRawChunks: i.includeRawChunks, headerServiceTier: l }), request: { body: e }, response: { headers: o } }; let u = cn$3({ baseURL: this.config.baseURL, interactionId: c, headers: r, fetch: this.config.fetch, abortSignal: i.abortSignal }), d = Dt$3({ warnings: t, generateId: this.config.generateId ?? bl, includeRawChunks: i.includeRawChunks, serviceTier: l }); return { stream: u.pipeThrough(d), request: { body: e }, response: { headers: o } }; } }; function Q$4(e) { let t = {}; for (let [n, r] of Object.entries(e)) r !== void 0 && (t[n] = r); return t; } function dn$3(e) { return typeof e == `object` && !!e && !Array.isArray(e); } var fn$3 = class { constructor() { this.turnCounter = 0, this.hasAudio = !1, this.hasText = !1, this.hasTranscript = !1, this.turnClosed = !1, this.inputAudioRate = 16e3; } get responseId() { return `google-resp-${this.turnCounter}`; } get itemId() { return `google-item-${this.turnCounter}`; } beginTurnIfClosed() { this.turnClosed &&= (this.turnCounter++, this.hasAudio = !1, this.hasText = !1, this.hasTranscript = !1, !1); } parseServerEvent(e) { let t = e; return t.setupComplete == null ? t.toolCall == null ? t.toolCallCancellation == null ? t.serverContent == null ? t.inputTranscription?.text == null ? { type: `custom`, rawType: String(Object.keys(t)[0]), raw: e } : { type: `input-transcription-completed`, itemId: `google-input-${this.turnCounter}`, transcript: t.inputTranscription.text, raw: e } : this.parseServerContent(t.serverContent, e) : { type: `custom`, rawType: `toolCallCancellation`, raw: e } : (this.beginTurnIfClosed(), (t.toolCall.functionCalls ?? []).flatMap((t) => { let n = JSON.stringify(t.args ?? {}); return [{ type: `function-call-arguments-delta`, responseId: this.responseId, itemId: this.itemId, callId: t.id, delta: n, raw: e }, { type: `function-call-arguments-done`, responseId: this.responseId, itemId: this.itemId, callId: t.id, name: t.name, arguments: n, raw: e }]; })) : { type: `session-created`, raw: e }; } parseServerContent(e, t) { let n = []; if (e.interrupted && n.push({ type: `speech-started`, raw: t }), e.modelTurn?.parts) { this.beginTurnIfClosed(); for (let r of e.modelTurn.parts) r.inlineData?.data && (this.hasAudio = !0, n.push({ type: `audio-delta`, responseId: this.responseId, itemId: this.itemId, delta: r.inlineData.data, raw: t })), r.text && (this.hasText = !0, n.push({ type: `text-delta`, responseId: this.responseId, itemId: this.itemId, delta: r.text, raw: t })); } return e.outputTranscription?.text && (this.hasTranscript = !0, n.push({ type: `audio-transcript-delta`, responseId: this.responseId, itemId: this.itemId, delta: e.outputTranscription.text, raw: t })), e.inputTranscription?.text && n.push({ type: `input-transcription-completed`, itemId: `google-input-${this.turnCounter}`, transcript: e.inputTranscription.text, raw: t }), e.turnComplete && (this.hasAudio && n.push({ type: `audio-done`, responseId: this.responseId, itemId: this.itemId, raw: t }), this.hasText && n.push({ type: `text-done`, responseId: this.responseId, itemId: this.itemId, raw: t }), this.hasTranscript && n.push({ type: `audio-transcript-done`, responseId: this.responseId, itemId: this.itemId, raw: t }), n.push({ type: `response-done`, responseId: this.responseId, status: `completed`, raw: t }), this.turnClosed = !0), n.length === 0 ? { type: `custom`, rawType: `serverContent`, raw: t } : n.length === 1 ? n[0] : n; } serializeClientEvent(e, t) { switch (e.type) { case `session-update`: return e.config.inputAudioFormat?.rate != null && (this.inputAudioRate = e.config.inputAudioFormat.rate), { setup: mn$3(e.config, t) }; case `input-audio-append`: return { realtimeInput: { audio: { data: e.audio, mimeType: `audio/pcm;rate=${this.inputAudioRate}` } } }; case `input-audio-commit`: return { realtimeInput: { audioStreamEnd: !0 } }; case `input-audio-clear`: case `response-create`: case `response-cancel`: case `conversation-item-truncate`: return null; case `conversation-item-create`: { let t = e.item; switch (t.type) { case `text-message`: return { realtimeInput: { text: t.text } }; case `function-call-output`: return pn$3(t); case `audio-message`: return null; } break; } } return null; } }; async function pn$3(e) { let t = await nd({ text: e.output }), n = t.success ? t.value : {}; return { toolResponse: { functionResponses: [{ id: e.callId, name: e.name, response: n }] } }; } function mn$3(e, t) { let n = { model: be$3(t) }, r = {}; if (e?.outputModalities == null ? r.responseModalities = [`AUDIO`] : r.responseModalities = e.outputModalities.map((e) => e.toUpperCase()), e?.voice != null && (r.speechConfig = { voiceConfig: { prebuiltVoiceConfig: { voiceName: e.voice } } }), n.generationConfig = r, e?.instructions != null && (n.systemInstruction = { parts: [{ text: e.instructions }] }), e?.tools != null && e.tools.length > 0 && (n.tools = [{ functionDeclarations: e.tools.map((e) => ({ name: e.name, description: e.description, parameters: U$3(e.parameters) })) }]), e?.inputAudioTranscription != null && (n.inputAudioTranscription = {}), e?.outputAudioTranscription != null && (n.outputAudioTranscription = {}), e?.providerOptions == null) return n; let { google: i, ...a } = e.providerOptions; Object.assign(n, a); let o = dn$3(i) ? i : void 0; return o?.translationConfig != null && (n.generationConfig = { ...dn$3(n.generationConfig) ? n.generationConfig : r, translationConfig: o.translationConfig }), n; } var hn$3 = `google.ai.generativelanguage.v1alpha.GenerativeService.BidiGenerateContentConstrained`; function gn$3(e) { let t = new URL(e), n = t.pathname.split(`/`), r = n.at(-1); return (r === `v1beta` || r === `v1alpha`) && (n.pop(), t.pathname = n.join(`/`) || `/`), t; } function _n$3(e) { let t = gn$3(e); return t.pathname = `${t.pathname.replace(/\/$/, ``)}/v1alpha/auth_tokens`, t.toString(); } function vn$3(e) { let t = gn$3(e); return t.protocol = t.protocol === `https:` ? `wss:` : `ws:`, t.pathname = `${t.pathname.replace(/\/$/, ``)}/ws/${hn$3}`, t.toString(); } var yn$3 = class { constructor(e, t) { this.specificationVersion = `v4`, this.mapper = new fn$3(), this.modelId = e, this.provider = t.provider, this.config = t; } async doCreateClientSecret(e) { let t = this.config.fetch ?? fetch, n = this.config.headers()[`x-goog-api-key`]; if (!n) throw Error(`Google Generative AI API key is required for realtime token creation.`); let r = Date.now(), i = (e.expiresAfterSeconds ?? 60) * 1e3, a = new Date(r + i).toISOString(), o = new Date(r + i + 1800 * 1e3).toISOString(), s = mn$3(e.sessionConfig, this.modelId), c = await t(`${_n$3(this.config.baseURL)}?key=${encodeURIComponent(n)}`, { method: `POST`, headers: { "Content-Type": `application/json` }, body: JSON.stringify({ uses: 0, expireTime: o, newSessionExpireTime: a, bidiGenerateContentSetup: s }) }); if (!c.ok) { let e = await c.text(); throw Error(`Google realtime auth token request failed: ${c.status} ${e}`); } let l = await c.json(); return { token: l.name, url: vn$3(this.config.baseURL), expiresAt: l.expireTime ? Math.floor(new Date(l.expireTime).getTime() / 1e3) : void 0 }; } getWebSocketConfig(e) { return { url: `${e.url}?access_token=${encodeURIComponent(e.token)}` }; } parseServerEvent(e) { return this.mapper.parseServerEvent(e); } serializeClientEvent(e) { return this.mapper.serializeClientEvent(e, this.modelId); } buildSessionConfig(e) { return mn$3(e, this.modelId); } }; function $$4(e = {}) { let t = Ed(e.baseURL) ?? `https://generativelanguage.googleapis.com/v1beta`, n = e.name ?? `google.generative-ai`, r = () => Ol({ "x-goog-api-key": Pl({ apiKey: e.apiKey, environmentVariableName: `GOOGLE_GENERATIVE_AI_API_KEY`, description: `Google Generative AI` }), ...e.headers }, `ai-sdk/google/${ae$3}`), i = (i) => new Me$3(i, { provider: n, baseURL: t, headers: r, generateId: e.generateId ?? bl, supportedUrls: () => ({ "*": [ RegExp(`^${t}/files/.*$`), RegExp(`^https://(?:www\\.)?youtube\\.com/watch\\?v=[\\w-]+(?:&[\\w=&.-]*)?$`), RegExp(`^https://youtu\\.be/[\\w-]+(?:\\?[\\w=&.-]*)?$`) ] }), fetch: e.fetch }), a = (i) => new ce$3(i, { provider: n, baseURL: t, headers: r, fetch: e.fetch }), o = (i, a = {}) => new tt$3(i, a, { provider: n, baseURL: t, headers: r, fetch: e.fetch }), s = () => new it$3({ provider: n, baseURL: t, headers: r, fetch: e.fetch }), c = (i) => new ct$3(i, { provider: n, baseURL: t, headers: r, fetch: e.fetch, generateId: e.generateId ?? bl }), u = (i) => new yn$3(i, { provider: `${n}.realtime`, baseURL: t, headers: r, fetch: e.fetch }), d = (i) => new ht$3(i, { provider: `${n}.speech`, baseURL: t, headers: r, fetch: e.fetch }), f = Object.assign((e) => u(e), { getToken: async (e) => { let t = await u(e.model).doCreateClientSecret({ sessionConfig: e.sessionConfig, expiresAfterSeconds: e.expiresAfterSeconds }); return { token: t.token, url: t.url, expiresAt: t.expiresAt }; } }), p = (i) => new un$3(i, { provider: `${n}.interactions`, baseURL: t, headers: r, generateId: e.generateId ?? bl, fetch: e.fetch }), m = function(e) { if (new.target) throw Error(`The Google Generative AI model function cannot be called with the new keyword.`); return i(e); }; return m.specificationVersion = `v4`, m.languageModel = i, m.chat = i, m.generativeAI = i, m.embedding = a, m.embeddingModel = a, m.textEmbedding = a, m.textEmbeddingModel = a, m.image = o, m.imageModel = o, m.video = c, m.videoModel = c, m.experimental_realtime = f, m.files = s, m.speech = d, m.speechModel = d, m.interactions = p, m.tools = $e$3, m; } var bn$3 = $$4(); //#endregion //#region node_modules/eve/dist/src/compiled/@ai-sdk/openai/index.js var openai_exports = /* @__PURE__ */ __exportAll({ Experimental_OpenAIRealtimeModel: () => Vt$2, VERSION: () => Mn$2, createOpenAI: () => Nn$2, openai: () => Pn$2 }); function se$2(e) { return Wr$2(ao, e); } var Y$3 = Co({ error: Co({ message: Ra$2(), type: Ra$2().nullish(), param: ho().nullish(), code: Eo([Ra$2(), oo()]).nullish() }) }); var X$3 = vd({ errorSchema: Y$3, errorToMessage: (e) => e.error.message }); function ce$2(e) { let t = e.startsWith(`o3`) || e.startsWith(`o4-mini`) || e.startsWith(`gpt-5`) && !e.startsWith(`gpt-5-chat`), n = e.startsWith(`gpt-4`) || e.startsWith(`gpt-5`) && !e.startsWith(`gpt-5-nano`) && !e.startsWith(`gpt-5-chat`) && !e.startsWith(`gpt-5.4-nano`) || e.startsWith(`o3`) || e.startsWith(`o4-mini`), r = e.startsWith(`o1`) || e.startsWith(`o3`) || e.startsWith(`o4-mini`) || e.startsWith(`gpt-5`) && !e.startsWith(`gpt-5-chat`), i = e.startsWith(`gpt-5.1`) || e.startsWith(`gpt-5.2`) || e.startsWith(`gpt-5.3`) || e.startsWith(`gpt-5.4`) || e.startsWith(`gpt-5.5`); return { supportsFlexProcessing: t, supportsPriorityProcessing: n, isReasoningModel: r, systemMessageMode: r ? `developer` : `system`, supportsNonReasoningParameters: i }; } async function le$2({ stream: e, getError: t, isOutputChunk: n, url: r, requestBodyValues: i, responseHeaders: a }) { let [o, s] = e.tee(), c = o.getReader(); try { for (;;) { let e = await c.read(); if (e.done) return s; let o = e.value; if (!o.success) return s; let l = t(o.value); if (l != null) throw s.cancel().catch(() => {}), ue$2({ frame: l, url: r, requestBodyValues: i, responseHeaders: a }); if (n(o.value)) return s; } } finally { c.cancel().catch(() => {}), c.releaseLock(); } } function ue$2({ frame: t, url: n, requestBodyValues: r, responseHeaders: i }) { let a = de$2(t); return new c$14({ message: a?.message ?? `OpenAI stream failed before any output was generated`, url: n, requestBodyValues: r, statusCode: a == null ? 500 : fe$2(a), responseHeaders: i, responseBody: JSON.stringify(t), data: t }); } function de$2(e) { let t = Z$3(e); if (t == null) return; if (t.type === `response.failed`) { let n = Z$3(Z$3(t.response)?.error); return typeof n?.message == `string` ? { message: n.message, code: pe$2(n.code), type: `response.failed`, frame: e } : void 0; } let n = Z$3(t.error) ?? t; return typeof n.message == `string` && (Z$3(t.error) != null || typeof n.type == `string` || `code` in n || `param` in n) ? { message: n.message, code: pe$2(n.code), type: typeof n.type == `string` ? n.type : void 0, frame: e } : void 0; } function fe$2(e) { if (typeof e.code == `number` && me$2(e.code)) return e.code; if (typeof e.code == `string` && /^\d{3}$/.test(e.code)) { let t = Number(e.code); if (me$2(t)) return t; } let t = [e.code, e.type].filter((e) => typeof e == `string` || typeof e == `number`).join(` `).toLowerCase(); return [`insufficient_quota`, `rate_limit`].some((e) => t.includes(e)) ? 429 : t.includes(`authentication`) ? 401 : t.includes(`permission`) ? 403 : t.includes(`not_found`) ? 404 : [ `invalid`, `bad_request`, `context_length` ].some((e) => t.includes(e)) ? 400 : t.includes(`overload`) ? 503 : t.includes(`timeout`) ? 504 : 500; } function Z$3(e) { return typeof e == `object` && e ? e : void 0; } function pe$2(e) { return typeof e == `string` || typeof e == `number` ? e : void 0; } function me$2(e) { return Number.isInteger(e) && e >= 400 && e <= 599; } function he$2(e) { if (e == null) return { inputTokens: { total: void 0, noCache: void 0, cacheRead: void 0, cacheWrite: void 0 }, outputTokens: { total: void 0, text: void 0, reasoning: void 0 }, raw: void 0 }; let t = e.prompt_tokens ?? 0, n = e.completion_tokens ?? 0, r = e.prompt_tokens_details?.cached_tokens ?? 0, i = e.completion_tokens_details?.reasoning_tokens ?? 0; return { inputTokens: { total: t, noCache: t - r, cacheRead: r, cacheWrite: void 0 }, outputTokens: { total: n, text: n - i, reasoning: i }, raw: e }; } function ge$2(e) { return JSON.stringify(e === void 0 ? {} : e); } function _e$2({ prompt: e, systemMessageMode: t = `system` }) { let n = [], i = []; for (let { role: o, content: s } of e) switch (o) { case `system`: switch (t) { case `system`: n.push({ role: `system`, content: s }); break; case `developer`: n.push({ role: `developer`, content: s }); break; case `remove`: i.push({ type: `other`, message: `system messages are removed for this model` }); break; default: throw Error(`Unsupported system message mode: ${t}`); } break; case `user`: if (s.length === 1 && s[0].type === `text`) { n.push({ role: `user`, content: s[0].text }); break; } n.push({ role: `user`, content: s.map((e, t) => { switch (e.type) { case `text`: return { type: `text`, text: e.text }; case `file`: switch (e.data.type) { case `reference`: return { type: `file`, file: { file_id: _d({ reference: e.data.reference, provider: `openai` }) } }; case `text`: throw new Ie$10({ functionality: `text file parts` }); case `url`: case `data`: { let n = el(e.mediaType); if (n === `image`) return { type: `image_url`, image_url: { url: e.data.type === `url` ? e.data.url.toString() : zc(e.data.data), detail: e.providerOptions?.openai?.imageDetail } }; if (n === `audio`) { if (e.data.type === `url`) throw new Ie$10({ functionality: `audio file parts with URLs` }); let t = gd({ part: e }); switch (t) { case `audio/wav`: return { type: `input_audio`, input_audio: { data: zc(e.data.data), format: `wav` } }; case `audio/mp3`: case `audio/mpeg`: return { type: `input_audio`, input_audio: { data: zc(e.data.data), format: `mp3` } }; default: throw new Ie$10({ functionality: `audio content parts with media type ${t}` }); } } { let n = gd({ part: e }); if (n !== `application/pdf`) throw new Ie$10({ functionality: `file part media type ${n}` }); if (e.data.type === `url`) throw new Ie$10({ functionality: `PDF file parts with URLs` }); return { type: `file`, file: { filename: e.filename ?? `part-${t}.pdf`, file_data: `data:application/pdf;base64,${zc(e.data.data)}` } }; } } } } }) }); break; case `assistant`: { let e = ``, t = []; for (let n of s) switch (n.type) { case `text`: e += n.text; break; case `tool-call`: t.push({ id: n.toolCallId, type: `function`, function: { name: n.toolName, arguments: ge$2(n.input) } }); break; } n.push({ role: `assistant`, content: t.length > 0 ? e || null : e, tool_calls: t.length > 0 ? t : void 0 }); break; } case `tool`: for (let e of s) { if (e.type === `tool-approval-response`) continue; let t = e.output, r; switch (t.type) { case `text`: case `error-text`: r = t.value; break; case `execution-denied`: r = t.reason ?? `Tool call execution denied.`; break; case `content`: case `json`: case `error-json`: r = JSON.stringify(t.value); break; } n.push({ role: `tool`, tool_call_id: e.toolCallId, content: r }); } break; default: throw Error(`Unsupported role: ${o}`); } return { messages: n, warnings: i }; } function ve$2({ id: e, model: t, created: n }) { return { id: e ?? void 0, modelId: t ?? void 0, timestamp: n ? /* @__PURE__ */ new Date(n * 1e3) : void 0 }; } function ye$2(e) { switch (e) { case `stop`: return `stop`; case `length`: return `length`; case `content_filter`: return `content-filter`; case `function_call`: case `tool_calls`: return `tool-calls`; default: return `other`; } } var be$2 = Wu(() => Qu(Co({ id: Ra$2().nullish(), created: oo().nullish(), model: Ra$2().nullish(), choices: xo(Co({ message: Co({ role: Ro(`assistant`).nullish(), content: Ra$2().nullish(), tool_calls: xo(Co({ id: Ra$2().nullish(), type: Ro(`function`), function: Co({ name: Ra$2(), arguments: Ra$2() }) })).nullish(), annotations: xo(Co({ type: Ro(`url_citation`), url_citation: Co({ start_index: oo(), end_index: oo(), url: Ra$2(), title: Ra$2() }) })).nullish() }), index: oo(), logprobs: Co({ content: xo(Co({ token: Ra$2(), logprob: oo(), top_logprobs: xo(Co({ token: Ra$2(), logprob: oo() })) })).nullish() }).nullish(), finish_reason: Ra$2().nullish() })), usage: Co({ prompt_tokens: oo().nullish(), completion_tokens: oo().nullish(), total_tokens: oo().nullish(), prompt_tokens_details: Co({ cached_tokens: oo().nullish() }).nullish(), completion_tokens_details: Co({ reasoning_tokens: oo().nullish(), accepted_prediction_tokens: oo().nullish(), rejected_prediction_tokens: oo().nullish() }).nullish() }).nullish() }))); var xe$2 = Wu(() => Qu(Eo([Co({ id: Ra$2().nullish(), created: oo().nullish(), model: Ra$2().nullish(), choices: xo(Co({ delta: Co({ role: Io([`assistant`]).nullish(), content: Ra$2().nullish(), tool_calls: xo(Co({ index: oo(), id: Ra$2().nullish(), type: Ro(`function`).nullish(), function: Co({ name: Ra$2().nullish(), arguments: Ra$2().nullish() }) })).nullish(), annotations: xo(Co({ type: Ro(`url_citation`), url_citation: Co({ start_index: oo(), end_index: oo(), url: Ra$2(), title: Ra$2() }) })).nullish() }).nullish(), logprobs: Co({ content: xo(Co({ token: Ra$2(), logprob: oo(), top_logprobs: xo(Co({ token: Ra$2(), logprob: oo() })) })).nullish() }).nullish(), finish_reason: Ra$2().nullish(), index: oo() })), usage: Co({ prompt_tokens: oo().nullish(), completion_tokens: oo().nullish(), total_tokens: oo().nullish(), prompt_tokens_details: Co({ cached_tokens: oo().nullish() }).nullish(), completion_tokens_details: Co({ reasoning_tokens: oo().nullish(), accepted_prediction_tokens: oo().nullish(), rejected_prediction_tokens: oo().nullish() }).nullish() }).nullish() }), Y$3]))); var Se$2 = Wu(() => Qu(Co({ logitBias: Po(se$2(), oo()).optional(), logprobs: Eo([uo(), oo()]).optional(), parallelToolCalls: uo().optional(), user: Ra$2().optional(), reasoningEffort: Io([ `none`, `minimal`, `low`, `medium`, `high`, `xhigh` ]).optional(), maxCompletionTokens: oo().optional(), store: uo().optional(), metadata: Po(Ra$2().max(64), Ra$2().max(512)).optional(), prediction: Po(Ra$2(), ho()).optional(), serviceTier: Io([ `auto`, `flex`, `priority`, `default` ]).optional(), strictJsonSchema: uo().optional(), textVerbosity: Io([ `low`, `medium`, `high` ]).optional(), promptCacheKey: Ra$2().optional(), promptCacheRetention: Io([`in_memory`, `24h`]).optional(), safetyIdentifier: Ra$2().optional(), systemMessageMode: Io([ `system`, `developer`, `remove` ]).optional(), forceReasoning: uo().optional() }))); function Ce$2({ tools: e, toolChoice: t }) { e = e?.length ? e : void 0; let n = []; if (e == null) return { tools: void 0, toolChoice: void 0, toolWarnings: n }; let i = []; for (let t of e) switch (t.type) { case `function`: i.push({ type: `function`, function: { name: t.name, description: t.description, parameters: t.inputSchema, ...t.strict == null ? {} : { strict: t.strict } } }); break; default: n.push({ type: `unsupported`, feature: `tool type: ${t.type}` }); break; } if (t == null) return { tools: i, toolChoice: void 0, toolWarnings: n }; let a = t.type; switch (a) { case `auto`: case `none`: case `required`: return { tools: i, toolChoice: a, toolWarnings: n }; case `tool`: return { tools: i, toolChoice: { type: `function`, function: { name: t.toolName } }, toolWarnings: n }; default: throw new Ie$10({ functionality: `tool choice type: ${a}` }); } } var we$2 = class e { constructor(e, t) { this.specificationVersion = `v4`, this.supportedUrls = { "image/*": [/^https?:\/\/.*$/] }, this.modelId = e, this.config = t; } static [Mc](e) { return Cd({ modelId: e.modelId, config: e.config }); } static [Nc](t) { return new e(t.modelId, t.config); } get provider() { return this.config.provider; } async getArgs({ prompt: e, maxOutputTokens: t, temperature: n, topP: r, topK: i, frequencyPenalty: a, presencePenalty: o, stopSequences: s, responseFormat: c, seed: l, tools: u, toolChoice: d, reasoning: p, providerOptions: m }) { let h = [], _ = await ad({ provider: `openai`, providerOptions: m, schema: Se$2 }) ?? {}, v = ce$2(this.modelId), y = _.reasoningEffort ?? (Il(p) ? p : void 0), b = _.forceReasoning ?? v.isReasoningModel; i != null && h.push({ type: `unsupported`, feature: `topK` }); let { messages: x, warnings: S } = _e$2({ prompt: e, systemMessageMode: _.systemMessageMode ?? (b ? `developer` : v.systemMessageMode) }); h.push(...S); let C = _.strictJsonSchema ?? !0, w = { model: this.modelId, logit_bias: _.logitBias, logprobs: _.logprobs === !0 || typeof _.logprobs == `number` ? !0 : void 0, top_logprobs: typeof _.logprobs == `number` ? _.logprobs : typeof _.logprobs == `boolean` && _.logprobs ? 0 : void 0, user: _.user, parallel_tool_calls: _.parallelToolCalls, max_tokens: t, temperature: n, top_p: r, frequency_penalty: a, presence_penalty: o, response_format: c?.type === `json` ? c.schema == null ? { type: `json_object` } : { type: `json_schema`, json_schema: { schema: c.schema, strict: C, name: c.name ?? `response`, description: c.description } } : void 0, stop: s, seed: l, verbosity: _.textVerbosity, max_completion_tokens: _.maxCompletionTokens, store: _.store, metadata: _.metadata, prediction: _.prediction, reasoning_effort: y, service_tier: _.serviceTier, prompt_cache_key: _.promptCacheKey, prompt_cache_retention: _.promptCacheRetention, safety_identifier: _.safetyIdentifier, messages: x }; b ? ((y !== `none` || !v.supportsNonReasoningParameters) && (w.temperature != null && (w.temperature = void 0, h.push({ type: `unsupported`, feature: `temperature`, details: `temperature is not supported for reasoning models` })), w.top_p != null && (w.top_p = void 0, h.push({ type: `unsupported`, feature: `topP`, details: `topP is not supported for reasoning models` })), w.logprobs != null && (w.logprobs = void 0, h.push({ type: `other`, message: `logprobs is not supported for reasoning models` }))), w.frequency_penalty != null && (w.frequency_penalty = void 0, h.push({ type: `unsupported`, feature: `frequencyPenalty`, details: `frequencyPenalty is not supported for reasoning models` })), w.presence_penalty != null && (w.presence_penalty = void 0, h.push({ type: `unsupported`, feature: `presencePenalty`, details: `presencePenalty is not supported for reasoning models` })), w.logit_bias != null && (w.logit_bias = void 0, h.push({ type: `other`, message: `logitBias is not supported for reasoning models` })), w.top_logprobs != null && (w.top_logprobs = void 0, h.push({ type: `other`, message: `topLogprobs is not supported for reasoning models` })), w.max_tokens != null && (w.max_completion_tokens ??= w.max_tokens, w.max_tokens = void 0)) : (this.modelId.startsWith(`gpt-4o-search-preview`) || this.modelId.startsWith(`gpt-4o-mini-search-preview`)) && w.temperature != null && (w.temperature = void 0, h.push({ type: `unsupported`, feature: `temperature`, details: `temperature is not supported for the search preview models and has been removed.` })), _.serviceTier === `flex` && !v.supportsFlexProcessing && (h.push({ type: `unsupported`, feature: `serviceTier`, details: `flex processing is only available for o3, o4-mini, and gpt-5 models` }), w.service_tier = void 0), _.serviceTier === `priority` && !v.supportsPriorityProcessing && (h.push({ type: `unsupported`, feature: `serviceTier`, details: `priority processing is only available for supported models (gpt-4, gpt-5, gpt-5-mini, o3, o4-mini) and requires Enterprise access. gpt-5-nano is not supported` }), w.service_tier = void 0); let { tools: T, toolChoice: E, toolWarnings: D } = Ce$2({ tools: u, toolChoice: d }); return { args: { ...w, tools: T, tool_choice: E }, warnings: [...h, ...D] }; } async doGenerate(e) { var t; let { args: n, warnings: r } = await this.getArgs(e), { responseHeaders: i, value: a, rawValue: o } = await sd({ url: this.config.url({ path: `/chat/completions`, modelId: this.modelId }), headers: Pc((t = this.config).headers?.call(t), e.headers), body: n, failedResponseHandler: X$3, successfulResponseHandler: bd(be$2), abortSignal: e.abortSignal, fetch: this.config.fetch }), s = a.choices[0], c = [], l = s.message.content; l != null && l.length > 0 && c.push({ type: `text`, text: l }); for (let e of s.message.tool_calls ?? []) c.push({ type: `tool-call`, toolCallId: e.id ?? bl(), toolName: e.function.name, input: e.function.arguments }); for (let e of s.message.annotations ?? []) c.push({ type: `source`, sourceType: `url`, id: bl(), url: e.url_citation.url, title: e.url_citation.title }); let u = a.usage?.completion_tokens_details, d = { openai: {} }; return u?.accepted_prediction_tokens != null && (d.openai.acceptedPredictionTokens = u?.accepted_prediction_tokens), u?.rejected_prediction_tokens != null && (d.openai.rejectedPredictionTokens = u?.rejected_prediction_tokens), s.logprobs?.content != null && (d.openai.logprobs = s.logprobs.content), { content: c, finishReason: { unified: ye$2(s.finish_reason), raw: s.finish_reason ?? void 0 }, usage: he$2(a.usage), request: { body: n }, response: { ...ve$2(a), headers: i, body: o }, warnings: r, providerMetadata: d }; } async doStream(e) { var t; let { args: n, warnings: r } = await this.getArgs(e), i = { ...n, stream: !0, stream_options: { include_usage: !0 } }, a = this.config.url({ path: `/chat/completions`, modelId: this.modelId }), { responseHeaders: o, value: s } = await sd({ url: a, headers: Pc((t = this.config).headers?.call(t), e.headers), body: i, failedResponseHandler: X$3, successfulResponseHandler: yd(xe$2), abortSignal: e.abortSignal, fetch: this.config.fetch }), c = await le$2({ stream: s, getError: (e) => `error` in e ? e.error : void 0, isOutputChunk: Te$2, url: a, requestBodyValues: i, responseHeaders: o }), l, u = { unified: `other`, raw: void 0 }, d, f = !1, p = !1, m = { openai: {} }; return { stream: c.pipeThrough(new TransformStream({ start(e) { l = new Td(e, { generateId: bl, typeValidation: `if-present` }), e.enqueue({ type: `stream-start`, warnings: r }); }, transform(t, n) { if (e.includeRawChunks && n.enqueue({ type: `raw`, rawValue: t.rawValue }), !t.success) { u = { unified: `error`, raw: void 0 }, n.enqueue({ type: `error`, error: t.error }); return; } let r = t.value; if (`error` in r) { u = { unified: `error`, raw: void 0 }, n.enqueue({ type: `error`, error: r.error }); return; } if (!f) { let e = ve$2(r); Object.values(e).some(Boolean) && (f = !0, n.enqueue({ type: `response-metadata`, ...ve$2(r) })); } r.usage != null && (d = r.usage, r.usage.completion_tokens_details?.accepted_prediction_tokens != null && (m.openai.acceptedPredictionTokens = r.usage.completion_tokens_details?.accepted_prediction_tokens), r.usage.completion_tokens_details?.rejected_prediction_tokens != null && (m.openai.rejectedPredictionTokens = r.usage.completion_tokens_details?.rejected_prediction_tokens)); let i = r.choices[0]; if (i?.finish_reason != null && (u = { unified: ye$2(i.finish_reason), raw: i.finish_reason }), i?.logprobs?.content != null && (m.openai.logprobs = i.logprobs.content), i?.delta == null) return; let a = i.delta; if (a.content != null && (p ||= (n.enqueue({ type: `text-start`, id: `0` }), !0), n.enqueue({ type: `text-delta`, id: `0`, delta: a.content })), a.tool_calls != null) for (let e of a.tool_calls) l.processDelta(e); if (a.annotations != null) for (let e of a.annotations) n.enqueue({ type: `source`, sourceType: `url`, id: bl(), url: e.url_citation.url, title: e.url_citation.title }); }, flush(e) { p && e.enqueue({ type: `text-end`, id: `0` }), l.flush(), e.enqueue({ type: `finish`, finishReason: u, usage: he$2(d), ...m == null ? {} : { providerMetadata: m } }); } })), request: { body: i }, response: { headers: o } }; } }; function Te$2(e) { return `error` in e ? !1 : e.choices.some((e) => { let t = e.delta; return t?.content != null && t.content.length > 0 || t?.tool_calls != null && t.tool_calls.length > 0 || t?.annotations != null && t.annotations.length > 0; }); } function Ee$2(e) { if (e == null) return { inputTokens: { total: void 0, noCache: void 0, cacheRead: void 0, cacheWrite: void 0 }, outputTokens: { total: void 0, text: void 0, reasoning: void 0 }, raw: void 0 }; let t = e.prompt_tokens ?? 0, n = e.completion_tokens ?? 0; return { inputTokens: { total: e.prompt_tokens ?? void 0, noCache: t, cacheRead: void 0, cacheWrite: void 0 }, outputTokens: { total: e.completion_tokens ?? void 0, text: n, reasoning: void 0 }, raw: e }; } function De$2({ prompt: e, user: n = `user`, assistant: i = `assistant` }) { let a = ``; e[0].role === `system` && (a += `${e[0].content} `, e = e.slice(1)); for (let { role: o, content: s } of e) switch (o) { case `system`: throw new se$11({ message: "Unexpected system message in prompt: ${content}", prompt: e }); case `user`: { let e = s.map((e) => { switch (e.type) { case `text`: return e.text; } }).filter(Boolean).join(``); a += `${n}: ${e} `; break; } case `assistant`: { let e = s.map((e) => { switch (e.type) { case `text`: return e.text; case `tool-call`: throw new Ie$10({ functionality: `tool-call messages` }); } }).join(``); a += `${i}: ${e} `; break; } case `tool`: throw new Ie$10({ functionality: `tool messages` }); default: throw Error(`Unsupported role: ${o}`); } return a += `${i}: `, { prompt: a, stopSequences: [` ${n}:`] }; } function Oe$2({ id: e, model: t, created: n }) { return { id: e ?? void 0, modelId: t ?? void 0, timestamp: n == null ? void 0 : /* @__PURE__ */ new Date(n * 1e3) }; } function ke$2(e) { switch (e) { case `stop`: return `stop`; case `length`: return `length`; case `content_filter`: return `content-filter`; case `function_call`: case `tool_calls`: return `tool-calls`; default: return `other`; } } var Ae$2 = Wu(() => Qu(Co({ id: Ra$2().nullish(), created: oo().nullish(), model: Ra$2().nullish(), choices: xo(Co({ text: Ra$2(), finish_reason: Ra$2(), logprobs: Co({ tokens: xo(Ra$2()), token_logprobs: xo(oo()), top_logprobs: xo(Po(Ra$2(), oo())).nullish() }).nullish() })), usage: Co({ prompt_tokens: oo(), completion_tokens: oo(), total_tokens: oo() }).nullish() }))); var je$2 = Wu(() => Qu(Eo([Co({ id: Ra$2().nullish(), created: oo().nullish(), model: Ra$2().nullish(), choices: xo(Co({ text: Ra$2(), finish_reason: Ra$2().nullish(), index: oo(), logprobs: Co({ tokens: xo(Ra$2()), token_logprobs: xo(oo()), top_logprobs: xo(Po(Ra$2(), oo())).nullish() }).nullish() })), usage: Co({ prompt_tokens: oo(), completion_tokens: oo(), total_tokens: oo() }).nullish() }), Y$3]))); var Me$2 = Wu(() => Qu(Co({ echo: uo().optional(), logitBias: Po(Ra$2(), oo()).optional(), suffix: Ra$2().optional(), user: Ra$2().optional(), logprobs: Eo([uo(), oo()]).optional() }))); var Ne$2 = class e { constructor(e, t) { this.specificationVersion = `v4`, this.supportedUrls = {}, this.modelId = e, this.config = t; } get providerOptionsName() { return this.config.provider.split(`.`)[0].trim(); } static [Mc](e) { return Cd({ modelId: e.modelId, config: e.config }); } static [Nc](t) { return new e(t.modelId, t.config); } get provider() { return this.config.provider; } async getArgs({ prompt: e, maxOutputTokens: t, temperature: n, topP: r, topK: i, frequencyPenalty: a, presencePenalty: o, stopSequences: s, responseFormat: c, tools: l, toolChoice: u, seed: d, providerOptions: p }) { let m = [], h = { ...await ad({ provider: `openai`, providerOptions: p, schema: Me$2 }), ...await ad({ provider: this.providerOptionsName, providerOptions: p, schema: Me$2 }) }; i != null && m.push({ type: `unsupported`, feature: `topK` }), l?.length && m.push({ type: `unsupported`, feature: `tools` }), u != null && m.push({ type: `unsupported`, feature: `toolChoice` }), c != null && c.type !== `text` && m.push({ type: `unsupported`, feature: `responseFormat`, details: `JSON response format is not supported.` }); let { prompt: g, stopSequences: _ } = De$2({ prompt: e }), v = [..._ ?? [], ...s ?? []]; return { args: { model: this.modelId, echo: h.echo, logit_bias: h.logitBias, logprobs: h?.logprobs === !0 ? 0 : h?.logprobs === !1 ? void 0 : h?.logprobs, suffix: h.suffix, user: h.user, max_tokens: t, temperature: n, top_p: r, frequency_penalty: a, presence_penalty: o, seed: d, prompt: g, stop: v.length > 0 ? v : void 0 }, warnings: m }; } async doGenerate(e) { var t; let { args: n, warnings: r } = await this.getArgs(e), { responseHeaders: i, value: a, rawValue: o } = await sd({ url: this.config.url({ path: `/completions`, modelId: this.modelId }), headers: Pc((t = this.config).headers?.call(t), e.headers), body: n, failedResponseHandler: X$3, successfulResponseHandler: bd(Ae$2), abortSignal: e.abortSignal, fetch: this.config.fetch }), s = a.choices[0], c = { openai: {} }; return s.logprobs != null && (c.openai.logprobs = s.logprobs), { content: [{ type: `text`, text: s.text }], usage: Ee$2(a.usage), finishReason: { unified: ke$2(s.finish_reason), raw: s.finish_reason ?? void 0 }, request: { body: n }, response: { ...Oe$2(a), headers: i, body: o }, providerMetadata: c, warnings: r }; } async doStream(e) { var t; let { args: n, warnings: r } = await this.getArgs(e), i = { ...n, stream: !0, stream_options: { include_usage: !0 } }, a = this.config.url({ path: `/completions`, modelId: this.modelId }), { responseHeaders: o, value: s } = await sd({ url: a, headers: Pc((t = this.config).headers?.call(t), e.headers), body: i, failedResponseHandler: X$3, successfulResponseHandler: yd(je$2), abortSignal: e.abortSignal, fetch: this.config.fetch }), c = await le$2({ stream: s, getError: (e) => `error` in e ? e.error : void 0, isOutputChunk: Pe$2, url: a, requestBodyValues: i, responseHeaders: o }), l = { unified: `other`, raw: void 0 }, u = { openai: {} }, d, f = !0; return { stream: c.pipeThrough(new TransformStream({ start(e) { e.enqueue({ type: `stream-start`, warnings: r }); }, transform(t, n) { if (e.includeRawChunks && n.enqueue({ type: `raw`, rawValue: t.rawValue }), !t.success) { l = { unified: `error`, raw: void 0 }, n.enqueue({ type: `error`, error: t.error }); return; } let r = t.value; if (`error` in r) { l = { unified: `error`, raw: void 0 }, n.enqueue({ type: `error`, error: r.error }); return; } f && (f = !1, n.enqueue({ type: `response-metadata`, ...Oe$2(r) }), n.enqueue({ type: `text-start`, id: `0` })), r.usage != null && (d = r.usage); let i = r.choices[0]; i?.finish_reason != null && (l = { unified: ke$2(i.finish_reason), raw: i.finish_reason }), i?.logprobs != null && (u.openai.logprobs = i.logprobs), i?.text != null && i.text.length > 0 && n.enqueue({ type: `text-delta`, id: `0`, delta: i.text }); }, flush(e) { f || e.enqueue({ type: `text-end`, id: `0` }), e.enqueue({ type: `finish`, finishReason: l, providerMetadata: u, usage: Ee$2(d) }); } })), request: { body: i }, response: { headers: o } }; } }; function Pe$2(e) { return !(`error` in e) && e.choices.some((e) => e.text.length > 0); } var Fe$2 = Wu(() => Qu(Co({ dimensions: oo().optional(), user: Ra$2().optional() }))); var Ie$2 = Wu(() => Qu(Co({ data: xo(Co({ embedding: xo(oo()) })), usage: Co({ prompt_tokens: oo() }).nullish() }))); var Le$2 = class e { constructor(e, t) { this.specificationVersion = `v4`, this.maxEmbeddingsPerCall = 2048, this.supportsParallelCalls = !0, this.modelId = e, this.config = t; } static [Mc](e) { return Cd({ modelId: e.modelId, config: e.config }); } static [Nc](t) { return new e(t.modelId, t.config); } get provider() { return this.config.provider; } async doEmbed({ values: e, headers: t, abortSignal: r, providerOptions: i }) { var a; if (e.length > this.maxEmbeddingsPerCall) throw new Te$10({ provider: this.provider, modelId: this.modelId, maxEmbeddingsPerCall: this.maxEmbeddingsPerCall, values: e }); let o = await ad({ provider: `openai`, providerOptions: i, schema: Fe$2 }) ?? {}, { responseHeaders: s, value: c, rawValue: l } = await sd({ url: this.config.url({ path: `/embeddings`, modelId: this.modelId }), headers: Pc((a = this.config).headers?.call(a), t), body: { model: this.modelId, input: e, encoding_format: `float`, dimensions: o.dimensions, user: o.user }, failedResponseHandler: X$3, successfulResponseHandler: bd(Ie$2), abortSignal: r, fetch: this.config.fetch }); return { warnings: [], embeddings: c.data.map((e) => e.embedding), usage: c.usage ? { tokens: c.usage.prompt_tokens } : void 0, response: { headers: s, body: l } }; } }; var Re$2 = Wu(() => Qu(Co({ id: Ra$2(), object: Ra$2().nullish(), bytes: oo().nullish(), created_at: oo().nullish(), filename: Ra$2().nullish(), purpose: Ra$2().nullish(), status: Ra$2().nullish(), expires_at: oo().nullish() }))); var ze$2 = Wu(() => Qu(Co({ purpose: Ra$2().optional(), expiresAfter: oo().optional() }))); var Be$2 = class { constructor(e) { this.config = e, this.specificationVersion = `v4`; } get provider() { return this.config.provider; } async uploadFile({ data: e, mediaType: t, filename: n, providerOptions: r }) { let i = await ad({ provider: `openai`, providerOptions: r, schema: ze$2 }), a = Bc(e), o = new Blob([a], { type: t }), s = new FormData(); n == null ? s.append(`file`, o) : s.append(`file`, o, n), s.append(`purpose`, i?.purpose ?? `assistants`), i?.expiresAfter != null && s.append(`expires_after`, String(i.expiresAfter)); let { value: c } = await cd({ url: `${this.config.baseURL}/files`, headers: Pc(this.config.headers()), formData: s, failedResponseHandler: X$3, successfulResponseHandler: bd(Re$2), fetch: this.config.fetch }); return { warnings: [], providerReference: { openai: c.id }, ...c.filename ?? n ? { filename: c.filename ?? n } : {}, ...t == null ? {} : { mediaType: t }, providerMetadata: { openai: { ...c.filename == null ? {} : { filename: c.filename }, ...c.purpose == null ? {} : { purpose: c.purpose }, ...c.bytes == null ? {} : { bytes: c.bytes }, ...c.created_at == null ? {} : { createdAt: c.created_at }, ...c.status == null ? {} : { status: c.status }, ...c.expires_at == null ? {} : { expiresAt: c.expires_at } } } }; } }; var Ve$2 = Wu(() => Qu(Co({ created: oo().nullish(), data: xo(Co({ b64_json: Ra$2(), revised_prompt: Ra$2().nullish() })), background: Ra$2().nullish(), output_format: Ra$2().nullish(), size: Ra$2().nullish(), quality: Ra$2().nullish(), usage: Co({ input_tokens: oo().nullish(), output_tokens: oo().nullish(), total_tokens: oo().nullish(), input_tokens_details: Co({ image_tokens: oo().nullish(), text_tokens: oo().nullish() }).nullish() }).nullish() }))); var He$2 = { "dall-e-3": 1, "dall-e-2": 10, "gpt-image-1": 10, "gpt-image-1-mini": 10, "gpt-image-1.5": 10, "gpt-image-2": 10, "chatgpt-image-latest": 10 }; var Ue$2 = [ `chatgpt-image-`, `gpt-image-1-mini`, `gpt-image-1.5`, `gpt-image-1`, `gpt-image-2` ]; function We$2(e) { return Ue$2.some((t) => e.startsWith(t)); } var Ge$2 = Co({ quality: Io([ `standard`, `hd`, `low`, `medium`, `high`, `auto` ]).optional(), background: Io([ `transparent`, `opaque`, `auto` ]).optional(), outputFormat: Io([ `png`, `jpeg`, `webp` ]).optional(), outputCompression: oo().int().min(0).max(100).optional(), user: Ra$2().optional() }); var Ke$2 = Wu(() => Qu(Ge$2.extend({ style: Io([`vivid`, `natural`]).optional(), moderation: Io([`auto`, `low`]).optional() }))); var qe$2 = Wu(() => Qu(Ge$2.extend({ inputFidelity: Io([`high`, `low`]).optional() }))); var Je$2 = class e { constructor(e, t) { this.modelId = e, this.config = t, this.specificationVersion = `v4`; } static [Mc](e) { return Cd({ modelId: e.modelId, config: e.config }); } static [Nc](t) { return new e(t.modelId, t.config); } get maxImagesPerCall() { return He$2[this.modelId] ?? 1; } get provider() { return this.config.provider; } async doGenerate({ prompt: e, files: t, mask: n, n: r, size: i, aspectRatio: a, seed: o, providerOptions: s, headers: c, abortSignal: l }) { var u, d, p; let m = []; a != null && m.push({ type: `unsupported`, feature: `aspectRatio`, details: "This model does not support aspect ratio. Use `size` instead." }), o != null && m.push({ type: `unsupported`, feature: `seed` }); let g = ((u = this.config._internal)?.currentDate)?.call(u) ?? /* @__PURE__ */ new Date(); if (t != null) { let a = await ad({ provider: `openai`, providerOptions: s, schema: qe$2 }) ?? {}, { value: o, responseHeaders: u } = await cd({ url: this.config.url({ path: `/images/edits`, modelId: this.modelId }), headers: Pc((d = this.config).headers?.call(d), c), formData: Vc({ model: this.modelId, prompt: e, image: await Promise.all(t.map((e) => e.type === `file` ? new Blob([e.data instanceof Uint8Array ? new Blob([e.data], { type: e.mediaType }) : new Blob([Lc(e.data)], { type: e.mediaType })], { type: e.mediaType }) : vl(e.url))), mask: n == null ? void 0 : await Xe$2(n), n: r, size: i, quality: a.quality, background: a.background, output_format: a.outputFormat, output_compression: a.outputCompression, input_fidelity: a.inputFidelity, user: a.user }), failedResponseHandler: X$3, successfulResponseHandler: bd(Ve$2), abortSignal: l, fetch: this.config.fetch }); return { images: o.data.map((e) => e.b64_json), warnings: m, usage: o.usage == null ? void 0 : { inputTokens: o.usage.input_tokens ?? void 0, outputTokens: o.usage.output_tokens ?? void 0, totalTokens: o.usage.total_tokens ?? void 0 }, response: { timestamp: g, modelId: this.modelId, headers: u }, providerMetadata: { openai: { images: o.data.map((e, t) => ({ ...e.revised_prompt ? { revisedPrompt: e.revised_prompt } : {}, created: o.created ?? void 0, size: o.size ?? void 0, quality: o.quality ?? void 0, background: o.background ?? void 0, outputFormat: o.output_format ?? void 0, ...Ye$2(o.usage?.input_tokens_details, t, o.data.length) })) } } }; } let _ = await ad({ provider: `openai`, providerOptions: s, schema: Ke$2 }) ?? {}, { value: v, responseHeaders: y } = await sd({ url: this.config.url({ path: `/images/generations`, modelId: this.modelId }), headers: Pc((p = this.config).headers?.call(p), c), body: { model: this.modelId, prompt: e, n: r, size: i, quality: _.quality, style: _.style, background: _.background, moderation: _.moderation, output_format: _.outputFormat, output_compression: _.outputCompression, user: _.user, ...We$2(this.modelId) ? {} : { response_format: `b64_json` } }, failedResponseHandler: X$3, successfulResponseHandler: bd(Ve$2), abortSignal: l, fetch: this.config.fetch }); return { images: v.data.map((e) => e.b64_json), warnings: m, usage: v.usage == null ? void 0 : { inputTokens: v.usage.input_tokens ?? void 0, outputTokens: v.usage.output_tokens ?? void 0, totalTokens: v.usage.total_tokens ?? void 0 }, response: { timestamp: g, modelId: this.modelId, headers: y }, providerMetadata: { openai: { images: v.data.map((e, t) => ({ ...e.revised_prompt ? { revisedPrompt: e.revised_prompt } : {}, created: v.created ?? void 0, size: v.size ?? void 0, quality: v.quality ?? void 0, background: v.background ?? void 0, outputFormat: v.output_format ?? void 0, ...Ye$2(v.usage?.input_tokens_details, t, v.data.length) })) } } }; } }; function Ye$2(e, t, n) { if (e == null) return {}; let r = {}; if (e.image_tokens != null) { let i = Math.floor(e.image_tokens / n), a = e.image_tokens - i * (n - 1); r.imageTokens = t === n - 1 ? a : i; } if (e.text_tokens != null) { let i = Math.floor(e.text_tokens / n), a = e.text_tokens - i * (n - 1); r.textTokens = t === n - 1 ? a : i; } return r; } async function Xe$2(e) { if (!e) return; if (e.type === `url`) return vl(e.url); let t = e.data instanceof Uint8Array ? e.data : Lc(e.data); return new Blob([t], { type: e.mediaType }); } var Ze$2 = Wu(() => Qu(Co({ callId: Ra$2(), operation: Oo(`type`, [ Co({ type: Ro(`create_file`), path: Ra$2(), diff: Ra$2() }), Co({ type: Ro(`delete_file`), path: Ra$2() }), Co({ type: Ro(`update_file`), path: Ra$2(), diff: Ra$2() }) ]) }))); var Qe$2 = Wu(() => Qu(Co({ status: Io([`completed`, `failed`]), output: Ra$2().optional() }))); var $e$2 = pd({ id: `openai.apply_patch`, inputSchema: Ze$2, outputSchema: Qe$2 }); var et$2 = Wu(() => Qu(Co({ code: Ra$2().nullish(), containerId: Ra$2() }))); var tt$2 = Wu(() => Qu(Co({ outputs: xo(Oo(`type`, [Co({ type: Ro(`logs`), logs: Ra$2() }), Co({ type: Ro(`image`), url: Ra$2() })])).nullish() }))); var nt$2 = Wu(() => Qu(Co({ container: Eo([Ra$2(), Co({ fileIds: xo(Ra$2()).optional() })]).optional() }))); var rt$2 = md({ id: `openai.code_interpreter`, inputSchema: et$2, outputSchema: tt$2 }); var it$2 = (e = {}) => rt$2(e); var at$2 = Wu(() => Qu(Co({ description: Ra$2().optional(), format: Eo([Co({ type: Ro(`grammar`), syntax: Io([`regex`, `lark`]), definition: Ra$2() }), Co({ type: Ro(`text`) })]).optional() }))); var ot$2 = fd({ id: `openai.custom`, inputSchema: Wu(() => Qu(Ra$2())) }); var st$2 = (e) => ot$2(e); var ct$2 = Co({ key: Ra$2(), type: Io([ `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin` ]), value: Eo([ Ra$2(), oo(), uo(), xo(Ra$2()) ]) }); var lt$2 = Co({ type: Io([`and`, `or`]), filters: xo(Eo([ct$2, os(() => lt$2)])) }); var ut$2 = Wu(() => Qu(Co({ vectorStoreIds: xo(Ra$2()), maxNumResults: oo().optional(), ranking: Co({ ranker: Ra$2().optional(), scoreThreshold: oo().optional() }).optional(), filters: Eo([ct$2, lt$2]).optional() }))); var dt$2 = Wu(() => Qu(Co({ queries: xo(Ra$2()), results: xo(Co({ attributes: Po(Ra$2(), _o()), fileId: Ra$2(), filename: Ra$2(), score: oo(), text: Ra$2() })).nullable() }))); var ft$2 = md({ id: `openai.file_search`, inputSchema: Co({}), outputSchema: dt$2 }); var pt$2 = Wu(() => Qu(Co({ background: Io([ `auto`, `opaque`, `transparent` ]).optional(), inputFidelity: Io([`low`, `high`]).optional(), inputImageMask: Co({ fileId: Ra$2().optional(), imageUrl: Ra$2().optional() }).optional(), model: Ra$2().optional(), moderation: Io([`auto`]).optional(), outputCompression: oo().int().min(0).max(100).optional(), outputFormat: Io([ `png`, `jpeg`, `webp` ]).optional(), partialImages: oo().int().min(0).max(3).optional(), quality: Io([ `auto`, `low`, `medium`, `high` ]).optional(), size: Io([ `1024x1024`, `1024x1536`, `1536x1024`, `auto` ]).optional() }).strict())); var mt$2 = md({ id: `openai.image_generation`, inputSchema: Wu(() => Qu(Co({}))), outputSchema: Wu(() => Qu(Co({ result: Ra$2() }))) }); var ht$2 = (e = {}) => mt$2(e); var gt$2 = Wu(() => Qu(Co({ action: Co({ type: Ro(`exec`), command: xo(Ra$2()), timeoutMs: oo().optional(), user: Ra$2().optional(), workingDirectory: Ra$2().optional(), env: Po(Ra$2(), Ra$2()).optional() }) }))); var _t$2 = Wu(() => Qu(Co({ output: Ra$2() }))); var vt$2 = pd({ id: `openai.local_shell`, inputSchema: gt$2, outputSchema: _t$2 }); var yt$2 = Wu(() => Qu(Co({ action: Co({ commands: xo(Ra$2()), timeoutMs: oo().optional(), maxOutputLength: oo().optional() }) }))); var bt$2 = Wu(() => Qu(Co({ output: xo(Co({ stdout: Ra$2(), stderr: Ra$2(), outcome: Oo(`type`, [Co({ type: Ro(`timeout`) }), Co({ type: Ro(`exit`), exitCode: oo() })]) })) }))); var xt$2 = xo(Oo(`type`, [Co({ type: Ro(`skillReference`), providerReference: Po(Ra$2(), Ra$2()), version: Ra$2().optional() }), Co({ type: Ro(`inline`), name: Ra$2(), description: Ra$2(), source: Co({ type: Ro(`base64`), mediaType: Ro(`application/zip`), data: Ra$2() }) })])).optional(); var St$2 = Wu(() => Qu(Co({ environment: Eo([ Co({ type: Ro(`containerAuto`), fileIds: xo(Ra$2()).optional(), memoryLimit: Io([ `1g`, `4g`, `16g`, `64g` ]).optional(), networkPolicy: Oo(`type`, [Co({ type: Ro(`disabled`) }), Co({ type: Ro(`allowlist`), allowedDomains: xo(Ra$2()), domainSecrets: xo(Co({ domain: Ra$2(), name: Ra$2(), value: Ra$2() })).optional() })]).optional(), skills: xt$2 }), Co({ type: Ro(`containerReference`), containerId: Ra$2() }), Co({ type: Ro(`local`).optional(), skills: xo(Co({ name: Ra$2(), description: Ra$2(), path: Ra$2() })).optional() }) ]).optional() }))); var Ct$2 = pd({ id: `openai.shell`, inputSchema: yt$2, outputSchema: bt$2 }); var wt$2 = Wu(() => Qu(Co({ execution: Io([`server`, `client`]).optional(), description: Ra$2().optional(), parameters: Po(Ra$2(), _o()).optional() }))); var Tt$2 = Wu(() => Qu(Co({ arguments: _o().optional(), call_id: Ra$2().nullish() }))); var Et$2 = Wu(() => Qu(Co({ tools: xo(Po(Ra$2(), _o())) }))); var Dt$2 = pd({ id: `openai.tool_search`, inputSchema: Tt$2, outputSchema: Et$2 }); var Ot$2 = (e = {}) => Dt$2(e); var kt$2 = Wu(() => Qu(Co({ externalWebAccess: uo().optional(), filters: Co({ allowedDomains: xo(Ra$2()).optional() }).optional(), searchContextSize: Io([ `low`, `medium`, `high` ]).optional(), userLocation: Co({ type: Ro(`approximate`), country: Ra$2().optional(), city: Ra$2().optional(), region: Ra$2().optional(), timezone: Ra$2().optional() }).optional() }))); var At$2 = md({ id: `openai.web_search`, inputSchema: Wu(() => Qu(Co({}))), outputSchema: Wu(() => Qu(Co({ action: Oo(`type`, [ Co({ type: Ro(`search`), query: Ra$2().optional(), queries: xo(Ra$2()).optional() }), Co({ type: Ro(`openPage`), url: Ra$2().nullish() }), Co({ type: Ro(`findInPage`), url: Ra$2().nullish(), pattern: Ra$2().nullish() }) ]).optional(), sources: xo(Oo(`type`, [Co({ type: Ro(`url`), url: Ra$2() }), Co({ type: Ro(`api`), name: Ra$2() })])).optional() }))) }); var jt$2 = (e = {}) => At$2(e); var Mt$2 = Wu(() => Qu(Co({ searchContextSize: Io([ `low`, `medium`, `high` ]).optional(), userLocation: Co({ type: Ro(`approximate`), country: Ra$2().optional(), city: Ra$2().optional(), region: Ra$2().optional(), timezone: Ra$2().optional() }).optional() }))); var Nt$2 = md({ id: `openai.web_search_preview`, inputSchema: Wu(() => Qu(Co({}))), outputSchema: Wu(() => Qu(Co({ action: Oo(`type`, [ Co({ type: Ro(`search`), query: Ra$2().optional() }), Co({ type: Ro(`openPage`), url: Ra$2().nullish() }), Co({ type: Ro(`findInPage`), url: Ra$2().nullish(), pattern: Ra$2().nullish() }) ]).optional() }))) }); var Pt$2 = os(() => Eo([ Ra$2(), oo(), uo(), po(), xo(Pt$2), Po(Ra$2(), Pt$2) ])); var Ft$2 = Wu(() => Qu(Co({ serverLabel: Ra$2(), allowedTools: Eo([xo(Ra$2()), Co({ readOnly: uo().optional(), toolNames: xo(Ra$2()).optional() })]).optional(), authorization: Ra$2().optional(), connectorId: Ra$2().optional(), headers: Po(Ra$2(), Ra$2()).optional(), requireApproval: Eo([Io([`always`, `never`]), Co({ never: Co({ toolNames: xo(Ra$2()).optional() }).optional() })]).optional(), serverDescription: Ra$2().optional(), serverUrl: Ra$2().optional() }).refine((e) => e.serverUrl != null || e.connectorId != null, `One of serverUrl or connectorId must be provided.`))); var It$2 = md({ id: `openai.mcp`, inputSchema: Wu(() => Qu(Co({}))), outputSchema: Wu(() => Qu(Co({ type: Ro(`call`), serverLabel: Ra$2(), name: Ra$2(), arguments: Ra$2(), output: Ra$2().nullish(), error: Eo([Ra$2(), Pt$2]).optional() }))) }); var Lt$2 = { applyPatch: $e$2, customTool: st$2, codeInterpreter: it$2, fileSearch: ft$2, imageGeneration: ht$2, localShell: vt$2, shell: Ct$2, webSearchPreview: Nt$2, webSearch: jt$2, mcp: (e) => It$2(e), toolSearch: Ot$2 }; function Rt$2(e) { let t = e, n = t.type; switch (n) { case `session.created`: return { type: `session-created`, sessionId: t.session?.id, raw: e }; case `session.updated`: return { type: `session-updated`, raw: e }; case `input_audio_buffer.speech_started`: return { type: `speech-started`, itemId: t.item_id, raw: e }; case `input_audio_buffer.speech_stopped`: return { type: `speech-stopped`, itemId: t.item_id, raw: e }; case `input_audio_buffer.committed`: return { type: `audio-committed`, itemId: t.item_id, previousItemId: t.previous_item_id, raw: e }; case `conversation.item.added`: return { type: `conversation-item-added`, itemId: t.item?.id ?? t.item_id, item: t.item, raw: e }; case `conversation.item.input_audio_transcription.completed`: return { type: `input-transcription-completed`, itemId: t.item_id, transcript: t.transcript ?? ``, raw: e }; case `response.created`: return { type: `response-created`, responseId: t.response?.id ?? t.response_id, raw: e }; case `response.done`: return { type: `response-done`, responseId: t.response?.id ?? t.response_id, status: t.response?.status ?? `completed`, raw: e }; case `response.output_item.added`: return { type: `output-item-added`, responseId: t.response_id, itemId: t.item?.id ?? t.item_id, raw: e }; case `response.output_item.done`: return { type: `output-item-done`, responseId: t.response_id, itemId: t.item?.id ?? t.item_id, raw: e }; case `response.content_part.added`: return { type: `content-part-added`, responseId: t.response_id, itemId: t.item_id, raw: e }; case `response.content_part.done`: return { type: `content-part-done`, responseId: t.response_id, itemId: t.item_id, raw: e }; case `response.output_audio.delta`: return { type: `audio-delta`, responseId: t.response_id, itemId: t.item_id, delta: t.delta, raw: e }; case `response.output_audio.done`: return { type: `audio-done`, responseId: t.response_id, itemId: t.item_id, raw: e }; case `response.output_audio_transcript.delta`: return { type: `audio-transcript-delta`, responseId: t.response_id, itemId: t.item_id, delta: t.delta, raw: e }; case `response.output_audio_transcript.done`: return { type: `audio-transcript-done`, responseId: t.response_id, itemId: t.item_id, transcript: t.transcript, raw: e }; case `response.output_text.delta`: return { type: `text-delta`, responseId: t.response_id, itemId: t.item_id, delta: t.delta, raw: e }; case `response.output_text.done`: return { type: `text-done`, responseId: t.response_id, itemId: t.item_id, text: t.text, raw: e }; case `response.function_call_arguments.delta`: return { type: `function-call-arguments-delta`, responseId: t.response_id, itemId: t.item_id, callId: t.call_id, delta: t.delta, raw: e }; case `response.function_call_arguments.done`: return { type: `function-call-arguments-done`, responseId: t.response_id, itemId: t.item_id, callId: t.call_id, name: t.name, arguments: t.arguments, raw: e }; case `error`: return { type: `error`, message: t.error?.message ?? t.message ?? `Unknown error`, code: t.error?.code ?? t.code, raw: e }; default: return { type: `custom`, rawType: n, raw: e }; } } function zt$2(e, t) { switch (e.type) { case `session-update`: return { type: `session.update`, session: Bt$2(e.config, t) }; case `input-audio-append`: return { type: `input_audio_buffer.append`, audio: e.audio }; case `input-audio-commit`: return { type: `input_audio_buffer.commit` }; case `input-audio-clear`: return { type: `input_audio_buffer.clear` }; case `conversation-item-create`: { let t = e.item; switch (t.type) { case `text-message`: return { type: `conversation.item.create`, item: { type: `message`, role: t.role, content: [{ type: `input_text`, text: t.text }] } }; case `audio-message`: return { type: `conversation.item.create`, item: { type: `message`, role: t.role, content: [{ type: `input_audio`, audio: t.audio }] } }; case `function-call-output`: return { type: `conversation.item.create`, item: { type: `function_call_output`, call_id: t.callId, output: t.output } }; } break; } case `conversation-item-truncate`: return { type: `conversation.item.truncate`, item_id: e.itemId, content_index: e.contentIndex, audio_end_ms: e.audioEndMs }; case `response-create`: return { type: `response.create`, ...e.options == null ? {} : { response: { ...e.options.modalities == null ? {} : { output_modalities: e.options.modalities }, ...e.options.instructions == null ? {} : { instructions: e.options.instructions }, ...e.options.metadata == null ? {} : { metadata: e.options.metadata } } } }; case `response-cancel`: return { type: `response.cancel` }; } } function Bt$2(e, t) { let n = { type: `realtime`, model: t }; e.instructions != null && (n.instructions = e.instructions), e.outputModalities != null && (n.output_modalities = e.outputModalities); let r = {}; if (e.inputAudioFormat != null || e.inputAudioTranscription != null || e.turnDetection != null) { let t = {}; if (e.inputAudioFormat != null && (t.format = { type: e.inputAudioFormat.type, ...e.inputAudioFormat.rate == null ? {} : { rate: e.inputAudioFormat.rate } }), e.turnDetection != null) if (e.turnDetection.type === `disabled`) t.turn_detection = null; else { let n = { type: e.turnDetection.type === `server-vad` ? `server_vad` : `semantic_vad` }; e.turnDetection.threshold != null && (n.threshold = e.turnDetection.threshold), e.turnDetection.silenceDurationMs != null && (n.silence_duration_ms = e.turnDetection.silenceDurationMs), e.turnDetection.prefixPaddingMs != null && (n.prefix_padding_ms = e.turnDetection.prefixPaddingMs), t.turn_detection = n; } e.inputAudioTranscription != null && (t.transcription = { model: e.inputAudioTranscription.model ?? `gpt-realtime-whisper`, ...e.inputAudioTranscription.language == null ? {} : { language: e.inputAudioTranscription.language }, ...e.inputAudioTranscription.prompt == null ? {} : { prompt: e.inputAudioTranscription.prompt } }), r.input = t; } if (e.outputAudioFormat != null || e.voice != null) { let t = {}; e.outputAudioFormat != null && (t.format = { type: e.outputAudioFormat.type, ...e.outputAudioFormat.rate == null ? {} : { rate: e.outputAudioFormat.rate } }), e.voice != null && (t.voice = e.voice), r.output = t; } return Object.keys(r).length > 0 && (n.audio = r), e.tools != null && e.tools.length > 0 && (n.tools = e.tools.map((e) => ({ type: e.type, name: e.name, description: e.description, parameters: e.parameters })), n.tool_choice = `auto`), e.providerOptions != null && Object.assign(n, e.providerOptions), n; } var Vt$2 = class { constructor(e, t) { this.specificationVersion = `v4`, this.modelId = e, this.provider = t.provider, this.config = t; } async doCreateClientSecret(e) { let t = this.config.fetch ?? fetch, n = `${this.config.baseURL}/realtime/client_secrets`, r = e.sessionConfig == null ? { type: `realtime`, model: this.modelId } : Bt$2(e.sessionConfig, this.modelId), i = await t(n, { method: `POST`, headers: { ...this.config.headers(), "Content-Type": `application/json` }, body: JSON.stringify({ session: r, ...e.expiresAfterSeconds == null ? {} : { expires_after: { anchor: `created_at`, seconds: e.expiresAfterSeconds } } }) }); if (!i.ok) { let e = await i.text(); throw Error(`OpenAI realtime client secret request failed: ${i.status} ${e}`); } let a = await i.json(); return { token: a.value, url: `wss://${new URL(this.config.baseURL).host}/v1/realtime?model=${encodeURIComponent(this.modelId)}`, expiresAt: a.expires_at }; } getWebSocketConfig(e) { return { url: e.url, protocols: [`realtime`, `openai-insecure-api-key.${e.token}`] }; } parseServerEvent(e) { return Rt$2(e); } serializeClientEvent(e) { return zt$2(e, this.modelId); } buildSessionConfig(e) { return Bt$2(e, this.modelId); } }; function Ht$2(e) { if (e == null) return { inputTokens: { total: void 0, noCache: void 0, cacheRead: void 0, cacheWrite: void 0 }, outputTokens: { total: void 0, text: void 0, reasoning: void 0 }, raw: void 0 }; let t = e.input_tokens, n = e.output_tokens, r = e.input_tokens_details?.cached_tokens ?? 0, i = e.output_tokens_details?.reasoning_tokens ?? 0; return { inputTokens: { total: t, noCache: t - r, cacheRead: r, cacheWrite: void 0 }, outputTokens: { total: n, text: n - i, reasoning: i }, raw: e }; } function Ut$2(e) { return JSON.stringify(e === void 0 ? {} : e); } function Wt$2(e, t) { return t ? t.some((t) => e.startsWith(t)) : !1; } async function Gt$2({ prompt: e, toolNameMapping: t, systemMessageMode: n, providerOptionsName: i, fileIdPrefixes: s, passThroughUnsupportedFiles: c = !1, store: d, hasConversation: p = !1, hasPreviousResponseId: m = !1, hasLocalShellTool: h = !1, hasShellTool: g = !1, hasApplyPatchTool: v = !1, customProviderToolNames: y }) { let b = [], x = [], S = /* @__PURE__ */ new Set(); for (let { role: C, content: w } of e) switch (C) { case `system`: switch (n) { case `system`: b.push({ role: `system`, content: w }); break; case `developer`: b.push({ role: `developer`, content: w }); break; case `remove`: x.push({ type: `other`, message: `system messages are removed for this model` }); break; default: throw Error(`Unsupported system message mode: ${n}`); } break; case `user`: b.push({ role: `user`, content: w.map((e, t) => { switch (e.type) { case `text`: return { type: `input_text`, text: e.text }; case `file`: switch (e.data.type) { case `reference`: { let t = _d({ reference: e.data.reference, provider: i }); return el(e.mediaType) === `image` ? { type: `input_image`, file_id: t, detail: e.providerOptions?.[i]?.imageDetail } : { type: `input_file`, file_id: t }; } case `text`: throw new Ie$10({ functionality: `text file parts` }); case `url`: case `data`: if (el(e.mediaType) === `image`) return { type: `input_image`, ...e.data.type === `url` ? { image_url: e.data.url.toString() } : typeof e.data.data == `string` && Wt$2(e.data.data, s) ? { file_id: e.data.data } : { image_url: `data:${gd({ part: e })};base64,${zc(e.data.data)}` }, detail: e.providerOptions?.[i]?.imageDetail }; { if (e.data.type === `url`) return { type: `input_file`, file_url: e.data.url.toString() }; let n = gd({ part: e }); if (n !== `application/pdf` && !c) throw new Ie$10({ functionality: `file part media type ${n}` }); return { type: `input_file`, ...typeof e.data.data == `string` && Wt$2(e.data.data, s) ? { file_id: e.data.data } : { filename: e.filename ?? (n === `application/pdf` ? `part-${t}.pdf` : `part-${t}`), file_data: `data:${n};base64,${zc(e.data.data)}` } }; } } } }) }); break; case `assistant`: { let e = {}; for (let n of w) switch (n.type) { case `text`: { let e = n.providerOptions?.[i], t = e?.itemId, r = e?.phase; if (p && t != null) break; if (d && t != null) { b.push({ type: `item_reference`, id: t }); break; } b.push({ role: `assistant`, content: [{ type: `output_text`, text: n.text }], id: t, ...r != null && { phase: r } }); break; } case `tool-call`: { let e = n.providerOptions?.[i]?.itemId ?? n.providerMetadata?.[i]?.itemId, r = n.providerOptions?.[i]?.namespace ?? n.providerMetadata?.[i]?.namespace; if (p && e != null) break; let a = t.toProviderToolName(n.toolName); if (a === `tool_search`) { if (d && e != null) { b.push({ type: `item_reference`, id: e }); break; } let t = typeof n.input == `string` ? await td({ text: n.input, schema: Tt$2 }) : await $u({ value: n.input, schema: Tt$2 }), r = t.call_id == null ? `server` : `client`; b.push({ type: `tool_search_call`, id: e ?? n.toolCallId, execution: r, call_id: t.call_id ?? null, status: `completed`, arguments: t.arguments }); break; } if (n.providerExecuted) { d && e != null && b.push({ type: `item_reference`, id: e }); break; } if (m && d && e != null) break; let o = h && a === `local_shell` || g && a === `shell` || v && a === `apply_patch` || (y?.has(a) ?? !1); if (d && e != null && o) { b.push({ type: `item_reference`, id: e }); break; } if (h && a === `local_shell`) { let t = await $u({ value: n.input, schema: gt$2 }); b.push({ type: `local_shell_call`, call_id: n.toolCallId, id: e, action: { type: `exec`, command: t.action.command, timeout_ms: t.action.timeoutMs, user: t.action.user, working_directory: t.action.workingDirectory, env: t.action.env } }); break; } if (g && a === `shell`) { let t = await $u({ value: n.input, schema: yt$2 }); b.push({ type: `shell_call`, call_id: n.toolCallId, id: e, status: `completed`, action: { commands: t.action.commands, timeout_ms: t.action.timeoutMs, max_output_length: t.action.maxOutputLength } }); break; } if (v && a === `apply_patch`) { let t = await $u({ value: n.input, schema: Ze$2 }); b.push({ type: `apply_patch_call`, call_id: t.callId, id: e, status: `completed`, operation: t.operation }); break; } if (y?.has(a)) { b.push({ type: `custom_tool_call`, call_id: n.toolCallId, name: a, input: typeof n.input == `string` ? n.input : JSON.stringify(n.input), id: e }); break; } b.push({ type: `function_call`, call_id: n.toolCallId, name: a, arguments: Ut$2(n.input), ...r != null && { namespace: r } }); break; } case `tool-result`: { if (n.output.type === `execution-denied` || n.output.type === `json` && typeof n.output.value == `object` && n.output.value != null && `type` in n.output.value && n.output.value.type === `execution-denied` || p) break; let e = t.toProviderToolName(n.toolName); if (e === `tool_search`) { let e = n.providerOptions?.[i]?.itemId ?? n.toolCallId; if (d) b.push({ type: `item_reference`, id: e }); else if (n.output.type === `json`) { let t = await $u({ value: n.output.value, schema: Et$2 }); b.push({ type: `tool_search_output`, id: e, execution: `server`, call_id: null, status: `completed`, tools: t.tools }); } break; } if (g && e === `shell`) { if (n.output.type === `json`) { let e = await $u({ value: n.output.value, schema: bt$2 }); b.push({ type: `shell_call_output`, call_id: n.toolCallId, output: e.output.map((e) => ({ stdout: e.stdout, stderr: e.stderr, outcome: e.outcome.type === `timeout` ? { type: `timeout` } : { type: `exit`, exit_code: e.outcome.exitCode } })) }); } break; } if (d) { let e = n.providerOptions?.[i]?.itemId ?? n.toolCallId; b.push({ type: `item_reference`, id: e }); } else x.push({ type: `other`, message: `Results for OpenAI tool ${n.toolName} are not sent to the API when store is false` }); break; } case `reasoning`: { let t = await ad({ provider: i, providerOptions: n.providerOptions, schema: Kt$2 }), r = t?.itemId; if ((p || m) && r != null) break; if (r != null) { let i = e[r]; if (d) i === void 0 && (b.push({ type: `item_reference`, id: r }), e[r] = { type: `reasoning`, id: r, summary: [] }); else { let a = []; n.text.length > 0 ? a.push({ type: `summary_text`, text: n.text }) : i !== void 0 && x.push({ type: `other`, message: `Cannot append empty reasoning part to existing reasoning sequence. Skipping reasoning part: ${JSON.stringify(n)}.` }), i === void 0 ? (e[r] = { type: `reasoning`, id: r, encrypted_content: t?.reasoningEncryptedContent, summary: a }, b.push(e[r])) : (i.summary.push(...a), t?.reasoningEncryptedContent != null && (i.encrypted_content = t.reasoningEncryptedContent)); } } else { let e = t?.reasoningEncryptedContent; if (e != null) { let t = []; n.text.length > 0 && t.push({ type: `summary_text`, text: n.text }), b.push({ type: `reasoning`, encrypted_content: e, summary: t }); } else x.push({ type: `other`, message: `Non-OpenAI reasoning parts are not supported. Skipping reasoning part: ${JSON.stringify(n)}.` }); } break; } case `custom`: if (n.kind === `openai.compaction`) { let e = n.providerOptions?.[i], t = e?.itemId; if (p && t != null) break; if (d && t != null) { b.push({ type: `item_reference`, id: t }); break; } let r = e?.encryptedContent; t != null && b.push({ type: `compaction`, id: t, encrypted_content: r }); } break; } break; } case `tool`: for (let e of w) { if (e.type === `tool-approval-response`) { let t = e; if (S.has(t.approvalId)) continue; S.add(t.approvalId), d && b.push({ type: `item_reference`, id: t.approvalId }), b.push({ type: `mcp_approval_response`, approval_request_id: t.approvalId, approve: t.approved }); continue; } let n = e.output; if (n.type === `execution-denied` && n.providerOptions?.openai?.approvalId) continue; let r = t.toProviderToolName(e.toolName); if (r === `tool_search` && n.type === `json`) { let t = await $u({ value: n.value, schema: Et$2 }); b.push({ type: `tool_search_output`, execution: `client`, call_id: e.toolCallId, status: `completed`, tools: t.tools }); continue; } if (h && r === `local_shell` && n.type === `json`) { let t = await $u({ value: n.value, schema: _t$2 }); b.push({ type: `local_shell_call_output`, call_id: e.toolCallId, output: t.output }); continue; } if (g && r === `shell` && n.type === `json`) { let t = await $u({ value: n.value, schema: bt$2 }); b.push({ type: `shell_call_output`, call_id: e.toolCallId, output: t.output.map((e) => ({ stdout: e.stdout, stderr: e.stderr, outcome: e.outcome.type === `timeout` ? { type: `timeout` } : { type: `exit`, exit_code: e.outcome.exitCode } })) }); continue; } if (v && e.toolName === `apply_patch` && n.type === `json`) { let t = await $u({ value: n.value, schema: Qe$2 }); b.push({ type: `apply_patch_call_output`, call_id: e.toolCallId, status: t.status, output: t.output }); continue; } if (y?.has(r)) { let t; switch (n.type) { case `text`: case `error-text`: t = n.value; break; case `execution-denied`: t = n.reason ?? `Tool call execution denied.`; break; case `json`: case `error-json`: t = JSON.stringify(n.value); break; case `content`: t = n.value.map((e) => { switch (e.type) { case `text`: return { type: `input_text`, text: e.text }; case `file`: { let t = el(e.mediaType), n = e.providerOptions?.[i]?.imageDetail; if (e.data.type === `data`) { let r = gd({ part: e }); return t === `image` ? { type: `input_image`, image_url: `data:${r};base64,${zc(e.data.data)}`, detail: n } : { type: `input_file`, filename: e.filename ?? `data`, file_data: `data:${r};base64,${zc(e.data.data)}` }; } if (e.data.type === `url`) return t === `image` ? { type: `input_image`, image_url: e.data.url.toString(), detail: n } : { type: `input_file`, file_url: e.data.url.toString() }; x.push({ type: `other`, message: `unsupported custom tool content part type: ${e.type} with data type: ${e.data.type}` }); return; } default: x.push({ type: `other`, message: `unsupported custom tool content part type: ${e.type}` }); return; } }).filter(Nl); break; default: t = ``; } b.push({ type: `custom_tool_call_output`, call_id: e.toolCallId, output: t }); continue; } let s; switch (n.type) { case `text`: case `error-text`: s = n.value; break; case `execution-denied`: s = n.reason ?? `Tool call execution denied.`; break; case `json`: case `error-json`: s = JSON.stringify(n.value); break; case `content`: s = n.value.map((e) => { switch (e.type) { case `text`: return { type: `input_text`, text: e.text }; case `file`: { let t = el(e.mediaType), n = e.providerOptions?.[i]?.imageDetail; if (e.data.type === `data`) { let r = gd({ part: e }); return t === `image` ? { type: `input_image`, image_url: `data:${r};base64,${zc(e.data.data)}`, detail: n } : { type: `input_file`, filename: e.filename ?? `data`, file_data: `data:${r};base64,${zc(e.data.data)}` }; } if (e.data.type === `url`) return t === `image` ? { type: `input_image`, image_url: e.data.url.toString(), detail: n } : { type: `input_file`, file_url: e.data.url.toString() }; x.push({ type: `other`, message: `unsupported tool content part type: ${e.type} with data type: ${e.data.type}` }); return; } default: x.push({ type: `other`, message: `unsupported tool content part type: ${e.type}` }); return; } }).filter(Nl); break; } b.push({ type: `function_call_output`, call_id: e.toolCallId, output: s }); } break; default: throw Error(`Unsupported role: ${C}`); } return !d && b.some((e) => `type` in e && e.type === `reasoning` && e.encrypted_content == null) && (x.push({ type: `other`, message: `Reasoning parts without encrypted content are not supported when store is false. Skipping reasoning parts.` }), b = b.filter((e) => !(`type` in e) || e.type !== `reasoning` || e.encrypted_content != null)), { input: b, warnings: x }; } var Kt$2 = Co({ itemId: Ra$2().nullish(), reasoningEncryptedContent: Ra$2().nullish() }); function qt$2({ finishReason: e, hasFunctionCall: t }) { switch (e) { case void 0: case null: return t ? `tool-calls` : `stop`; case `max_output_tokens`: return `length`; case `content_filter`: return `content-filter`; default: return t ? `tool-calls` : `other`; } } var Q$3 = os(() => Eo([ Ra$2(), oo(), uo(), po(), xo(Q$3), Po(Ra$2(), Q$3.optional()) ])); var Jt$2 = Co({ type: Ro(`error`), sequence_number: oo(), error: Co({ type: Ra$2(), code: Ra$2(), message: Ra$2(), param: Ra$2().nullish() }) }); var Yt$2 = Co({ type: Ro(`error`), sequence_number: oo(), code: Ra$2().nullish(), message: Ra$2(), param: Ra$2().nullish() }); var Xt$2 = Wu(() => Qu(Eo([ Co({ type: Ro(`response.output_text.delta`), item_id: Ra$2(), delta: Ra$2(), logprobs: xo(Co({ token: Ra$2(), logprob: oo(), top_logprobs: xo(Co({ token: Ra$2(), logprob: oo() })) })).nullish() }), Co({ type: Io([`response.completed`, `response.incomplete`]), response: Co({ incomplete_details: Co({ reason: Ra$2() }).nullish(), usage: Co({ input_tokens: oo(), input_tokens_details: Co({ cached_tokens: oo().nullish(), orchestration_input_tokens: oo().nullish(), orchestration_input_cached_tokens: oo().nullish() }).nullish(), output_tokens: oo(), output_tokens_details: Co({ reasoning_tokens: oo().nullish(), orchestration_output_tokens: oo().nullish() }).nullish() }), service_tier: Ra$2().nullish() }) }), Co({ type: Ro(`response.failed`), sequence_number: oo(), response: Co({ error: Co({ code: Ra$2().nullish(), message: Ra$2() }).nullish(), incomplete_details: Co({ reason: Ra$2() }).nullish(), usage: Co({ input_tokens: oo(), input_tokens_details: Co({ cached_tokens: oo().nullish(), orchestration_input_tokens: oo().nullish(), orchestration_input_cached_tokens: oo().nullish() }).nullish(), output_tokens: oo(), output_tokens_details: Co({ reasoning_tokens: oo().nullish(), orchestration_output_tokens: oo().nullish() }).nullish() }).nullish(), service_tier: Ra$2().nullish() }) }), Co({ type: Ro(`response.created`), response: Co({ id: Ra$2(), created_at: oo(), model: Ra$2(), service_tier: Ra$2().nullish() }) }), Co({ type: Ro(`response.output_item.added`), output_index: oo(), item: Oo(`type`, [ Co({ type: Ro(`message`), id: Ra$2(), phase: Io([`commentary`, `final_answer`]).nullish() }), Co({ type: Ro(`reasoning`), id: Ra$2(), encrypted_content: Ra$2().nullish() }), Co({ type: Ro(`function_call`), id: Ra$2(), call_id: Ra$2(), name: Ra$2(), arguments: Ra$2(), namespace: Ra$2().nullish() }), Co({ type: Ro(`web_search_call`), id: Ra$2(), status: Ra$2() }), Co({ type: Ro(`computer_call`), id: Ra$2(), status: Ra$2() }), Co({ type: Ro(`file_search_call`), id: Ra$2() }), Co({ type: Ro(`image_generation_call`), id: Ra$2() }), Co({ type: Ro(`code_interpreter_call`), id: Ra$2(), container_id: Ra$2(), code: Ra$2().nullable(), outputs: xo(Oo(`type`, [Co({ type: Ro(`logs`), logs: Ra$2() }), Co({ type: Ro(`image`), url: Ra$2() })])).nullable(), status: Ra$2() }), Co({ type: Ro(`mcp_call`), id: Ra$2(), status: Ra$2(), approval_request_id: Ra$2().nullish() }), Co({ type: Ro(`mcp_list_tools`), id: Ra$2() }), Co({ type: Ro(`mcp_approval_request`), id: Ra$2() }), Co({ type: Ro(`apply_patch_call`), id: Ra$2(), call_id: Ra$2(), status: Io([`in_progress`, `completed`]), operation: Oo(`type`, [ Co({ type: Ro(`create_file`), path: Ra$2(), diff: Ra$2() }), Co({ type: Ro(`delete_file`), path: Ra$2() }), Co({ type: Ro(`update_file`), path: Ra$2(), diff: Ra$2() }) ]) }), Co({ type: Ro(`custom_tool_call`), id: Ra$2(), call_id: Ra$2(), name: Ra$2(), input: Ra$2() }), Co({ type: Ro(`shell_call`), id: Ra$2(), call_id: Ra$2(), status: Io([ `in_progress`, `completed`, `incomplete` ]), action: Co({ commands: xo(Ra$2()) }) }), Co({ type: Ro(`compaction`), id: Ra$2(), encrypted_content: Ra$2().nullish() }), Co({ type: Ro(`shell_call_output`), id: Ra$2(), call_id: Ra$2(), status: Io([ `in_progress`, `completed`, `incomplete` ]), output: xo(Co({ stdout: Ra$2(), stderr: Ra$2(), outcome: Oo(`type`, [Co({ type: Ro(`timeout`) }), Co({ type: Ro(`exit`), exit_code: oo() })]) })) }), Co({ type: Ro(`tool_search_call`), id: Ra$2(), execution: Io([`server`, `client`]), call_id: Ra$2().nullable(), status: Io([ `in_progress`, `completed`, `incomplete` ]), arguments: _o() }), Co({ type: Ro(`tool_search_output`), id: Ra$2(), execution: Io([`server`, `client`]), call_id: Ra$2().nullable(), status: Io([ `in_progress`, `completed`, `incomplete` ]), tools: xo(Po(Ra$2(), Q$3.optional())) }) ]) }), Co({ type: Ro(`response.output_item.done`), output_index: oo(), item: Oo(`type`, [ Co({ type: Ro(`message`), id: Ra$2(), phase: Io([`commentary`, `final_answer`]).nullish() }), Co({ type: Ro(`reasoning`), id: Ra$2(), encrypted_content: Ra$2().nullish() }), Co({ type: Ro(`function_call`), id: Ra$2(), call_id: Ra$2(), name: Ra$2(), arguments: Ra$2(), status: Ro(`completed`), namespace: Ra$2().nullish() }), Co({ type: Ro(`custom_tool_call`), id: Ra$2(), call_id: Ra$2(), name: Ra$2(), input: Ra$2(), status: Ro(`completed`) }), Co({ type: Ro(`code_interpreter_call`), id: Ra$2(), code: Ra$2().nullable(), container_id: Ra$2(), outputs: xo(Oo(`type`, [Co({ type: Ro(`logs`), logs: Ra$2() }), Co({ type: Ro(`image`), url: Ra$2() })])).nullable() }), Co({ type: Ro(`image_generation_call`), id: Ra$2(), result: Ra$2() }), Co({ type: Ro(`web_search_call`), id: Ra$2(), status: Ra$2(), action: Oo(`type`, [ Co({ type: Ro(`search`), query: Ra$2().nullish(), queries: xo(Ra$2()).nullish(), sources: xo(Oo(`type`, [Co({ type: Ro(`url`), url: Ra$2() }), Co({ type: Ro(`api`), name: Ra$2() })])).nullish() }), Co({ type: Ro(`open_page`), url: Ra$2().nullish() }), Co({ type: Ro(`find_in_page`), url: Ra$2().nullish(), pattern: Ra$2().nullish() }) ]).nullish() }), Co({ type: Ro(`file_search_call`), id: Ra$2(), queries: xo(Ra$2()), results: xo(Co({ attributes: Po(Ra$2(), Eo([ Ra$2(), oo(), uo() ])), file_id: Ra$2(), filename: Ra$2(), score: oo(), text: Ra$2() })).nullish() }), Co({ type: Ro(`local_shell_call`), id: Ra$2(), call_id: Ra$2(), action: Co({ type: Ro(`exec`), command: xo(Ra$2()), timeout_ms: oo().optional(), user: Ra$2().optional(), working_directory: Ra$2().optional(), env: Po(Ra$2(), Ra$2()).optional() }) }), Co({ type: Ro(`computer_call`), id: Ra$2(), status: Ro(`completed`) }), Co({ type: Ro(`mcp_call`), id: Ra$2(), status: Ra$2(), arguments: Ra$2(), name: Ra$2(), server_label: Ra$2(), output: Ra$2().nullish(), error: Eo([Ra$2(), Co({ type: Ra$2().optional(), code: Eo([oo(), Ra$2()]).optional(), message: Ra$2().optional() }).loose()]).nullish(), approval_request_id: Ra$2().nullish() }), Co({ type: Ro(`mcp_list_tools`), id: Ra$2(), server_label: Ra$2(), tools: xo(Co({ name: Ra$2(), description: Ra$2().optional(), input_schema: ho(), annotations: Po(Ra$2(), _o()).optional() })), error: Eo([Ra$2(), Co({ type: Ra$2().optional(), code: Eo([oo(), Ra$2()]).optional(), message: Ra$2().optional() }).loose()]).optional() }), Co({ type: Ro(`mcp_approval_request`), id: Ra$2(), server_label: Ra$2(), name: Ra$2(), arguments: Ra$2(), approval_request_id: Ra$2().optional() }), Co({ type: Ro(`apply_patch_call`), id: Ra$2(), call_id: Ra$2(), status: Io([`in_progress`, `completed`]), operation: Oo(`type`, [ Co({ type: Ro(`create_file`), path: Ra$2(), diff: Ra$2() }), Co({ type: Ro(`delete_file`), path: Ra$2() }), Co({ type: Ro(`update_file`), path: Ra$2(), diff: Ra$2() }) ]) }), Co({ type: Ro(`shell_call`), id: Ra$2(), call_id: Ra$2(), status: Io([ `in_progress`, `completed`, `incomplete` ]), action: Co({ commands: xo(Ra$2()) }) }), Co({ type: Ro(`compaction`), id: Ra$2(), encrypted_content: Ra$2() }), Co({ type: Ro(`shell_call_output`), id: Ra$2(), call_id: Ra$2(), status: Io([ `in_progress`, `completed`, `incomplete` ]), output: xo(Co({ stdout: Ra$2(), stderr: Ra$2(), outcome: Oo(`type`, [Co({ type: Ro(`timeout`) }), Co({ type: Ro(`exit`), exit_code: oo() })]) })) }), Co({ type: Ro(`tool_search_call`), id: Ra$2(), execution: Io([`server`, `client`]), call_id: Ra$2().nullable(), status: Io([ `in_progress`, `completed`, `incomplete` ]), arguments: _o() }), Co({ type: Ro(`tool_search_output`), id: Ra$2(), execution: Io([`server`, `client`]), call_id: Ra$2().nullable(), status: Io([ `in_progress`, `completed`, `incomplete` ]), tools: xo(Po(Ra$2(), Q$3.optional())) }) ]) }), Co({ type: Ro(`response.function_call_arguments.delta`), item_id: Ra$2(), output_index: oo(), delta: Ra$2() }), Co({ type: Ro(`response.custom_tool_call_input.delta`), item_id: Ra$2(), output_index: oo(), delta: Ra$2() }), Co({ type: Ro(`response.image_generation_call.partial_image`), item_id: Ra$2(), output_index: oo(), partial_image_b64: Ra$2() }), Co({ type: Ro(`response.code_interpreter_call_code.delta`), item_id: Ra$2(), output_index: oo(), delta: Ra$2() }), Co({ type: Ro(`response.code_interpreter_call_code.done`), item_id: Ra$2(), output_index: oo(), code: Ra$2() }), Co({ type: Ro(`response.output_text.annotation.added`), annotation: Oo(`type`, [ Co({ type: Ro(`url_citation`), start_index: oo(), end_index: oo(), url: Ra$2(), title: Ra$2() }), Co({ type: Ro(`file_citation`), file_id: Ra$2(), filename: Ra$2(), index: oo() }), Co({ type: Ro(`container_file_citation`), container_id: Ra$2(), file_id: Ra$2(), filename: Ra$2(), start_index: oo(), end_index: oo() }), Co({ type: Ro(`file_path`), file_id: Ra$2(), index: oo() }) ]) }), Co({ type: Ro(`response.reasoning_summary_part.added`), item_id: Ra$2(), summary_index: oo() }), Co({ type: Ro(`response.reasoning_summary_text.delta`), item_id: Ra$2(), summary_index: oo(), delta: Ra$2() }), Co({ type: Ro(`response.reasoning_summary_part.done`), item_id: Ra$2(), summary_index: oo() }), Co({ type: Ro(`response.apply_patch_call_operation_diff.delta`), item_id: Ra$2(), output_index: oo(), delta: Ra$2(), obfuscation: Ra$2().nullish() }), Co({ type: Ro(`response.apply_patch_call_operation_diff.done`), item_id: Ra$2(), output_index: oo(), diff: Ra$2() }), Jt$2, Yt$2, Co({ type: Ra$2() }).loose().transform((e) => ({ type: `unknown_chunk`, message: e.type })) ]))); var Zt$2 = Wu(() => Qu(Co({ id: Ra$2().optional(), created_at: oo().optional(), error: Co({ message: Ra$2(), type: Ra$2(), param: Ra$2().nullish(), code: Ra$2() }).nullish(), model: Ra$2().optional(), output: xo(Oo(`type`, [ Co({ type: Ro(`message`), role: Ro(`assistant`), id: Ra$2(), phase: Io([`commentary`, `final_answer`]).nullish(), content: xo(Co({ type: Ro(`output_text`), text: Ra$2(), logprobs: xo(Co({ token: Ra$2(), logprob: oo(), top_logprobs: xo(Co({ token: Ra$2(), logprob: oo() })) })).nullish(), annotations: xo(Oo(`type`, [ Co({ type: Ro(`url_citation`), start_index: oo(), end_index: oo(), url: Ra$2(), title: Ra$2() }), Co({ type: Ro(`file_citation`), file_id: Ra$2(), filename: Ra$2(), index: oo() }), Co({ type: Ro(`container_file_citation`), container_id: Ra$2(), file_id: Ra$2(), filename: Ra$2(), start_index: oo(), end_index: oo() }), Co({ type: Ro(`file_path`), file_id: Ra$2(), index: oo() }) ])) })) }), Co({ type: Ro(`web_search_call`), id: Ra$2(), status: Ra$2(), action: Oo(`type`, [ Co({ type: Ro(`search`), query: Ra$2().nullish(), queries: xo(Ra$2()).nullish(), sources: xo(Oo(`type`, [Co({ type: Ro(`url`), url: Ra$2() }), Co({ type: Ro(`api`), name: Ra$2() })])).nullish() }), Co({ type: Ro(`open_page`), url: Ra$2().nullish() }), Co({ type: Ro(`find_in_page`), url: Ra$2().nullish(), pattern: Ra$2().nullish() }) ]).nullish() }), Co({ type: Ro(`file_search_call`), id: Ra$2(), queries: xo(Ra$2()), results: xo(Co({ attributes: Po(Ra$2(), Eo([ Ra$2(), oo(), uo() ])), file_id: Ra$2(), filename: Ra$2(), score: oo(), text: Ra$2() })).nullish() }), Co({ type: Ro(`code_interpreter_call`), id: Ra$2(), code: Ra$2().nullable(), container_id: Ra$2(), outputs: xo(Oo(`type`, [Co({ type: Ro(`logs`), logs: Ra$2() }), Co({ type: Ro(`image`), url: Ra$2() })])).nullable() }), Co({ type: Ro(`image_generation_call`), id: Ra$2(), result: Ra$2() }), Co({ type: Ro(`local_shell_call`), id: Ra$2(), call_id: Ra$2(), action: Co({ type: Ro(`exec`), command: xo(Ra$2()), timeout_ms: oo().optional(), user: Ra$2().optional(), working_directory: Ra$2().optional(), env: Po(Ra$2(), Ra$2()).optional() }) }), Co({ type: Ro(`function_call`), call_id: Ra$2(), name: Ra$2(), arguments: Ra$2(), id: Ra$2(), namespace: Ra$2().nullish() }), Co({ type: Ro(`custom_tool_call`), call_id: Ra$2(), name: Ra$2(), input: Ra$2(), id: Ra$2() }), Co({ type: Ro(`computer_call`), id: Ra$2(), status: Ra$2().optional() }), Co({ type: Ro(`reasoning`), id: Ra$2(), encrypted_content: Ra$2().nullish(), summary: xo(Co({ type: Ro(`summary_text`), text: Ra$2() })) }), Co({ type: Ro(`mcp_call`), id: Ra$2(), status: Ra$2(), arguments: Ra$2(), name: Ra$2(), server_label: Ra$2(), output: Ra$2().nullish(), error: Eo([Ra$2(), Co({ type: Ra$2().optional(), code: Eo([oo(), Ra$2()]).optional(), message: Ra$2().optional() }).loose()]).nullish(), approval_request_id: Ra$2().nullish() }), Co({ type: Ro(`mcp_list_tools`), id: Ra$2(), server_label: Ra$2(), tools: xo(Co({ name: Ra$2(), description: Ra$2().optional(), input_schema: ho(), annotations: Po(Ra$2(), _o()).optional() })), error: Eo([Ra$2(), Co({ type: Ra$2().optional(), code: Eo([oo(), Ra$2()]).optional(), message: Ra$2().optional() }).loose()]).optional() }), Co({ type: Ro(`mcp_approval_request`), id: Ra$2(), server_label: Ra$2(), name: Ra$2(), arguments: Ra$2(), approval_request_id: Ra$2().optional() }), Co({ type: Ro(`apply_patch_call`), id: Ra$2(), call_id: Ra$2(), status: Io([`in_progress`, `completed`]), operation: Oo(`type`, [ Co({ type: Ro(`create_file`), path: Ra$2(), diff: Ra$2() }), Co({ type: Ro(`delete_file`), path: Ra$2() }), Co({ type: Ro(`update_file`), path: Ra$2(), diff: Ra$2() }) ]) }), Co({ type: Ro(`shell_call`), id: Ra$2(), call_id: Ra$2(), status: Io([ `in_progress`, `completed`, `incomplete` ]), action: Co({ commands: xo(Ra$2()) }) }), Co({ type: Ro(`compaction`), id: Ra$2(), encrypted_content: Ra$2() }), Co({ type: Ro(`shell_call_output`), id: Ra$2(), call_id: Ra$2(), status: Io([ `in_progress`, `completed`, `incomplete` ]), output: xo(Co({ stdout: Ra$2(), stderr: Ra$2(), outcome: Oo(`type`, [Co({ type: Ro(`timeout`) }), Co({ type: Ro(`exit`), exit_code: oo() })]) })) }), Co({ type: Ro(`tool_search_call`), id: Ra$2(), execution: Io([`server`, `client`]), call_id: Ra$2().nullable(), status: Io([ `in_progress`, `completed`, `incomplete` ]), arguments: _o() }), Co({ type: Ro(`tool_search_output`), id: Ra$2(), execution: Io([`server`, `client`]), call_id: Ra$2().nullable(), status: Io([ `in_progress`, `completed`, `incomplete` ]), tools: xo(Po(Ra$2(), Q$3.optional())) }) ])).optional(), service_tier: Ra$2().nullish(), incomplete_details: Co({ reason: Ra$2() }).nullish(), usage: Co({ input_tokens: oo(), input_tokens_details: Co({ cached_tokens: oo().nullish(), orchestration_input_tokens: oo().nullish(), orchestration_input_cached_tokens: oo().nullish() }).nullish(), output_tokens: oo(), output_tokens_details: Co({ reasoning_tokens: oo().nullish(), orchestration_output_tokens: oo().nullish() }).nullish() }).optional() }))); var Qt$2 = 20; var $t$2 = Wu(() => Qu(Co({ conversation: Ra$2().nullish(), include: xo(Io([ `reasoning.encrypted_content`, `file_search_call.results`, `message.output_text.logprobs` ])).nullish(), instructions: Ra$2().nullish(), logprobs: Eo([uo(), oo().min(1).max(Qt$2)]).optional(), maxToolCalls: oo().nullish(), metadata: ho().nullish(), parallelToolCalls: uo().nullish(), previousResponseId: Ra$2().nullish(), promptCacheKey: Ra$2().nullish(), promptCacheRetention: Io([`in_memory`, `24h`]).nullish(), reasoningEffort: Ra$2().nullish(), reasoningSummary: Ra$2().nullish(), safetyIdentifier: Ra$2().nullish(), serviceTier: Io([ `auto`, `flex`, `priority`, `default` ]).nullish(), store: uo().nullish(), passThroughUnsupportedFiles: uo().optional(), strictJsonSchema: uo().nullish(), textVerbosity: Io([ `low`, `medium`, `high` ]).nullish(), truncation: Io([`auto`, `disabled`]).nullish(), user: Ra$2().nullish(), systemMessageMode: Io([ `system`, `developer`, `remove` ]).optional(), forceReasoning: uo().optional(), contextManagement: xo(Co({ type: Ro(`compaction`), compactThreshold: oo() })).nullish(), allowedTools: Co({ toolNames: xo(Ra$2()).min(1), mode: Io([`auto`, `required`]).optional() }).optional() }))); async function en$2({ tools: e, toolChoice: t, allowedTools: n, toolNameMapping: i, customProviderToolNames: a }) { e = e?.length ? e : void 0; let o = []; if (e == null) return { tools: void 0, toolChoice: void 0, toolWarnings: o }; let s = [], c = /* @__PURE__ */ new Map(), l = a ?? /* @__PURE__ */ new Set(); for (let t of e) switch (t.type) { case `function`: { let e = t.providerOptions?.openai, n = tn$2({ tool: t, options: e }), i = e?.namespace; if (i == null) s.push(n); else { let e = c.get(i.name); if (e == null) e = { type: `namespace`, name: i.name, description: i.description, tools: [] }, c.set(i.name, e), s.push(e); else if (e.description !== i.description) throw new Ie$10({ functionality: `conflicting descriptions for OpenAI tool namespace "${i.name}"` }); e.tools.push(n); } break; } case `provider`: switch (t.id) { case `openai.file_search`: { let e = await $u({ value: t.args, schema: ut$2 }); s.push({ type: `file_search`, vector_store_ids: e.vectorStoreIds, max_num_results: e.maxNumResults, ranking_options: e.ranking ? { ranker: e.ranking.ranker, score_threshold: e.ranking.scoreThreshold } : void 0, filters: e.filters }); break; } case `openai.local_shell`: s.push({ type: `local_shell` }); break; case `openai.shell`: { let e = await $u({ value: t.args, schema: St$2 }); s.push({ type: `shell`, ...e.environment && { environment: nn$2(e.environment) } }); break; } case `openai.apply_patch`: s.push({ type: `apply_patch` }); break; case `openai.web_search_preview`: { let e = await $u({ value: t.args, schema: Mt$2 }); s.push({ type: `web_search_preview`, search_context_size: e.searchContextSize, user_location: e.userLocation }); break; } case `openai.web_search`: { let e = await $u({ value: t.args, schema: kt$2 }); s.push({ type: `web_search`, filters: e.filters == null ? void 0 : { allowed_domains: e.filters.allowedDomains }, external_web_access: e.externalWebAccess, search_context_size: e.searchContextSize, user_location: e.userLocation }); break; } case `openai.code_interpreter`: { let e = await $u({ value: t.args, schema: nt$2 }); s.push({ type: `code_interpreter`, container: e.container == null ? { type: `auto`, file_ids: void 0 } : typeof e.container == `string` ? e.container : { type: `auto`, file_ids: e.container.fileIds } }); break; } case `openai.image_generation`: { let e = await $u({ value: t.args, schema: pt$2 }); s.push({ type: `image_generation`, background: e.background, input_fidelity: e.inputFidelity, input_image_mask: e.inputImageMask ? { file_id: e.inputImageMask.fileId, image_url: e.inputImageMask.imageUrl } : void 0, model: e.model, moderation: e.moderation, partial_images: e.partialImages, quality: e.quality, output_compression: e.outputCompression, output_format: e.outputFormat, size: e.size }); break; } case `openai.mcp`: { let e = await $u({ value: t.args, schema: Ft$2 }), n = (e) => ({ tool_names: e.toolNames }), r = e.requireApproval, i = r == null ? void 0 : typeof r == `string` ? r : r.never == null ? void 0 : { never: n(r.never) }; s.push({ type: `mcp`, server_label: e.serverLabel, allowed_tools: Array.isArray(e.allowedTools) ? e.allowedTools : e.allowedTools ? { read_only: e.allowedTools.readOnly, tool_names: e.allowedTools.toolNames } : void 0, authorization: e.authorization, connector_id: e.connectorId, headers: e.headers, require_approval: i ?? `never`, server_description: e.serverDescription, server_url: e.serverUrl }); break; } case `openai.custom`: { let e = await $u({ value: t.args, schema: at$2 }); s.push({ type: `custom`, name: t.name, description: e.description, format: e.format }), l.add(t.name); break; } case `openai.tool_search`: { let e = await $u({ value: t.args, schema: wt$2 }); s.push({ type: `tool_search`, ...e.execution == null ? {} : { execution: e.execution }, ...e.description == null ? {} : { description: e.description }, ...e.parameters == null ? {} : { parameters: e.parameters } }); break; } } break; default: o.push({ type: `unsupported`, feature: `function tool ${t}` }); break; } if (n != null) return { tools: s, toolChoice: { type: `allowed_tools`, mode: n.mode ?? `auto`, tools: n.toolNames.map((e) => ({ type: `function`, name: i?.toProviderToolName(e) ?? e })) }, toolWarnings: o }; if (t == null) return { tools: s, toolChoice: void 0, toolWarnings: o }; let u = t.type; switch (u) { case `auto`: case `none`: case `required`: return { tools: s, toolChoice: u, toolWarnings: o }; case `tool`: { let e = i?.toProviderToolName(t.toolName) ?? t.toolName; return { tools: s, toolChoice: e === `code_interpreter` || e === `file_search` || e === `image_generation` || e === `web_search_preview` || e === `web_search` || e === `mcp` || e === `apply_patch` ? { type: e } : l.has(e) ? { type: `custom`, name: e } : { type: `function`, name: e }, toolWarnings: o }; } default: throw new Ie$10({ functionality: `tool choice type: ${u}` }); } } function tn$2({ tool: e, options: t }) { let n = t?.deferLoading; return { type: `function`, name: e.name, description: e.description, parameters: e.inputSchema, ...e.strict == null ? {} : { strict: e.strict }, ...n == null ? {} : { defer_loading: n } }; } function nn$2(e) { if (e.type === `containerReference`) return { type: `container_reference`, container_id: e.containerId }; if (e.type === `containerAuto`) { let t = e; return { type: `container_auto`, file_ids: t.fileIds, memory_limit: t.memoryLimit, network_policy: t.networkPolicy == null ? void 0 : t.networkPolicy.type === `disabled` ? { type: `disabled` } : { type: `allowlist`, allowed_domains: t.networkPolicy.allowedDomains, domain_secrets: t.networkPolicy.domainSecrets }, skills: rn$2(t.skills) }; } return { type: `local`, skills: e.skills }; } function rn$2(e) { return e?.map((e) => e.type === `skillReference` ? { type: `skill_reference`, skill_id: _d({ reference: e.providerReference ?? {}, provider: `openai` }), version: e.version ?? `latest` } : { type: `inline`, name: e.name, description: e.description, source: { type: `base64`, media_type: e.source.mediaType, data: e.source.data } }); } function an$2(e) { let t = {}; for (let n of e) if (n.role === `assistant`) for (let e of n.content) { if (e.type !== `tool-call`) continue; let n = e.providerOptions?.openai?.approvalRequestId; n != null && (t[n] = e.toolCallId); } return t; } var on$2 = class t { constructor(e, t) { this.specificationVersion = `v4`, this.supportedUrls = { "image/*": [/^https?:\/\/.*$/], "application/pdf": [/^https?:\/\/.*$/] }, this.modelId = e, this.config = t; } static [Mc](e) { return Cd({ modelId: e.modelId, config: e.config }); } static [Nc](e) { return new t(e.modelId, e.config); } get provider() { return this.config.provider; } async getArgs({ maxOutputTokens: e, temperature: t, stopSequences: n, topP: r, topK: i, presencePenalty: a, frequencyPenalty: o, seed: s, prompt: c, reasoning: l, providerOptions: u, tools: d, toolChoice: p, responseFormat: m }) { let h = [], _ = ce$2(this.modelId); i != null && h.push({ type: `unsupported`, feature: `topK` }), s != null && h.push({ type: `unsupported`, feature: `seed` }), a != null && h.push({ type: `unsupported`, feature: `presencePenalty` }), o != null && h.push({ type: `unsupported`, feature: `frequencyPenalty` }), n != null && h.push({ type: `unsupported`, feature: `stopSequences` }); let v = this.config.provider.includes(`azure`) ? `azure` : `openai`, y = await ad({ provider: v, providerOptions: u, schema: $t$2 }); y == null && v !== `openai` && (y = await ad({ provider: `openai`, providerOptions: u, schema: $t$2 })); let b = y?.reasoningEffort ?? (Il(l) ? l : void 0), x = y?.reasoningSummary === void 0 ? b != null && b !== `none` ? `detailed` : void 0 : y.reasoningSummary, S = y?.forceReasoning ?? _.isReasoningModel; y?.conversation && y?.previousResponseId && h.push({ type: `unsupported`, feature: `conversation`, details: `conversation and previousResponseId cannot be used together` }); let C = Hc({ tools: d, providerToolNames: { "openai.code_interpreter": `code_interpreter`, "openai.file_search": `file_search`, "openai.image_generation": `image_generation`, "openai.local_shell": `local_shell`, "openai.shell": `shell`, "openai.web_search": `web_search`, "openai.web_search_preview": `web_search_preview`, "openai.mcp": `mcp`, "openai.apply_patch": `apply_patch`, "openai.tool_search": `tool_search` } }), w = /* @__PURE__ */ new Set(), { tools: T, toolChoice: E, toolWarnings: D } = await en$2({ tools: d, toolChoice: p, allowedTools: y?.allowedTools ?? void 0, toolNameMapping: C, customProviderToolNames: w }), { input: O, warnings: k } = await Gt$2({ prompt: c, toolNameMapping: C, systemMessageMode: y?.systemMessageMode ?? (S ? `developer` : _.systemMessageMode), providerOptionsName: v, fileIdPrefixes: this.config.fileIdPrefixes, passThroughUnsupportedFiles: y?.passThroughUnsupportedFiles ?? !1, store: y?.store ?? !0, hasConversation: y?.conversation != null, hasPreviousResponseId: y?.previousResponseId != null, hasLocalShellTool: N(`openai.local_shell`), hasShellTool: N(`openai.shell`), hasApplyPatchTool: N(`openai.apply_patch`), customProviderToolNames: w.size > 0 ? w : void 0 }); h.push(...k); let A = y?.strictJsonSchema ?? !0, j = y?.include; function M(e) { j == null ? j = [e] : j.includes(e) || (j = [...j, e]); } function N(e) { return d?.find((t) => t.type === `provider` && t.id === e) != null; } let P = typeof y?.logprobs == `number` ? y?.logprobs : y?.logprobs === !0 ? Qt$2 : void 0; P && M(`message.output_text.logprobs`); let te = d?.find((e) => e.type === `provider` && (e.id === `openai.web_search` || e.id === `openai.web_search_preview`))?.name; te && M(`web_search_call.action.sources`), N(`openai.code_interpreter`) && M(`code_interpreter_call.outputs`); let F = y?.store; F === !1 && S && M(`reasoning.encrypted_content`); let I = { model: this.modelId, input: O, temperature: t, top_p: r, max_output_tokens: e, ...(m?.type === `json` || y?.textVerbosity) && { text: { ...m?.type === `json` && { format: m.schema == null ? { type: `json_object` } : { type: `json_schema`, strict: A, name: m.name ?? `response`, description: m.description, schema: m.schema } }, ...y?.textVerbosity && { verbosity: y.textVerbosity } } }, conversation: y?.conversation, max_tool_calls: y?.maxToolCalls, metadata: y?.metadata, parallel_tool_calls: y?.parallelToolCalls, previous_response_id: y?.previousResponseId, store: F, user: y?.user, instructions: y?.instructions, service_tier: y?.serviceTier, include: j, prompt_cache_key: y?.promptCacheKey, prompt_cache_retention: y?.promptCacheRetention, safety_identifier: y?.safetyIdentifier, top_logprobs: P, truncation: y?.truncation, ...y?.contextManagement && { context_management: y.contextManagement.map((e) => ({ type: e.type, compact_threshold: e.compactThreshold })) }, ...S && (b != null || x != null) && { reasoning: { ...b != null && { effort: b }, ...x != null && { summary: x } } } }; S ? b === `none` && _.supportsNonReasoningParameters || (I.temperature != null && (I.temperature = void 0, h.push({ type: `unsupported`, feature: `temperature`, details: `temperature is not supported for reasoning models` })), I.top_p != null && (I.top_p = void 0, h.push({ type: `unsupported`, feature: `topP`, details: `topP is not supported for reasoning models` }))) : (y?.reasoningEffort != null && h.push({ type: `unsupported`, feature: `reasoningEffort`, details: `reasoningEffort is not supported for non-reasoning models` }), y?.reasoningSummary != null && h.push({ type: `unsupported`, feature: `reasoningSummary`, details: `reasoningSummary is not supported for non-reasoning models` })), y?.serviceTier === `flex` && !_.supportsFlexProcessing && (h.push({ type: `unsupported`, feature: `serviceTier`, details: `flex processing is only available for o3, o4-mini, and gpt-5 models` }), delete I.service_tier), y?.serviceTier === `priority` && !_.supportsPriorityProcessing && (h.push({ type: `unsupported`, feature: `serviceTier`, details: `priority processing is only available for supported models (gpt-4, gpt-5, gpt-5-mini, o3, o4-mini) and requires Enterprise access. gpt-5-nano is not supported` }), delete I.service_tier); let L = d?.find((e) => e.type === `provider` && e.id === `openai.shell`)?.args?.environment?.type, R = L === `containerAuto` || L === `containerReference`; return { webSearchToolName: te, args: { ...I, tools: T, tool_choice: E }, warnings: [...h, ...D], store: F, toolNameMapping: C, providerOptionsName: v, isShellProviderExecuted: R }; } async doGenerate(t) { var n, r, i, a, o, s; let { args: c, warnings: l, webSearchToolName: u, toolNameMapping: d, providerOptionsName: f, isShellProviderExecuted: p } = await this.getArgs(t), m = this.config.url({ path: `/responses`, modelId: this.modelId }), h = an$2(t.prompt), { responseHeaders: g, value: _, rawValue: v } = await sd({ url: m, headers: Pc((n = this.config).headers?.call(n), t.headers), body: c, failedResponseHandler: X$3, successfulResponseHandler: bd(Zt$2), abortSignal: t.abortSignal, fetch: this.config.fetch }); if (_.error) throw new c$14({ message: _.error.message, url: m, requestBodyValues: c, statusCode: 400, responseHeaders: g, responseBody: v, isRetryable: !1 }); let y = [], b = [], x = !1, S = []; for (let e of _.output) switch (e.type) { case `reasoning`: e.summary.length === 0 && e.summary.push({ type: `summary_text`, text: `` }); for (let t of e.summary) y.push({ type: `reasoning`, text: t.text, providerMetadata: { [f]: { itemId: e.id, reasoningEncryptedContent: e.encrypted_content ?? null } } }); break; case `image_generation_call`: y.push({ type: `tool-call`, toolCallId: e.id, toolName: d.toCustomToolName(`image_generation`), input: `{}`, providerExecuted: !0 }), y.push({ type: `tool-result`, toolCallId: e.id, toolName: d.toCustomToolName(`image_generation`), result: { result: e.result } }); break; case `tool_search_call`: { let t = e.call_id ?? e.id, n = e.execution === `server`; n && S.push(t), y.push({ type: `tool-call`, toolCallId: t, toolName: d.toCustomToolName(`tool_search`), input: JSON.stringify({ arguments: e.arguments, call_id: e.call_id }), ...n ? { providerExecuted: !0 } : {}, providerMetadata: { [f]: { itemId: e.id } } }); break; } case `tool_search_output`: { let t = e.call_id ?? S.shift() ?? e.id; y.push({ type: `tool-result`, toolCallId: t, toolName: d.toCustomToolName(`tool_search`), result: { tools: e.tools }, providerMetadata: { [f]: { itemId: e.id } } }); break; } case `local_shell_call`: y.push({ type: `tool-call`, toolCallId: e.call_id, toolName: d.toCustomToolName(`local_shell`), input: JSON.stringify({ action: e.action }), providerMetadata: { [f]: { itemId: e.id } } }); break; case `shell_call`: y.push({ type: `tool-call`, toolCallId: e.call_id, toolName: d.toCustomToolName(`shell`), input: JSON.stringify({ action: { commands: e.action.commands } }), ...p && { providerExecuted: !0 }, providerMetadata: { [f]: { itemId: e.id } } }); break; case `shell_call_output`: y.push({ type: `tool-result`, toolCallId: e.call_id, toolName: d.toCustomToolName(`shell`), result: { output: e.output.map((e) => ({ stdout: e.stdout, stderr: e.stderr, outcome: e.outcome.type === `exit` ? { type: `exit`, exitCode: e.outcome.exit_code } : { type: `timeout` } })) } }); break; case `message`: for (let n of e.content) { t.providerOptions?.[f]?.logprobs && n.logprobs && b.push(n.logprobs); let s = { itemId: e.id, ...e.phase != null && { phase: e.phase }, ...n.annotations.length > 0 && { annotations: n.annotations } }; y.push({ type: `text`, text: n.text, providerMetadata: { [f]: s } }); for (let e of n.annotations) e.type === `url_citation` ? y.push({ type: `source`, sourceType: `url`, id: (r = this.config).generateId?.call(r) ?? bl(), url: e.url, title: e.title }) : e.type === `file_citation` ? y.push({ type: `source`, sourceType: `document`, id: (i = this.config).generateId?.call(i) ?? bl(), mediaType: `text/plain`, title: e.filename, filename: e.filename, providerMetadata: { [f]: { type: e.type, fileId: e.file_id, index: e.index } } }) : e.type === `container_file_citation` ? y.push({ type: `source`, sourceType: `document`, id: (a = this.config).generateId?.call(a) ?? bl(), mediaType: `text/plain`, title: e.filename, filename: e.filename, providerMetadata: { [f]: { type: e.type, fileId: e.file_id, containerId: e.container_id } } }) : e.type === `file_path` && y.push({ type: `source`, sourceType: `document`, id: (o = this.config).generateId?.call(o) ?? bl(), mediaType: `application/octet-stream`, title: e.file_id, filename: e.file_id, providerMetadata: { [f]: { type: e.type, fileId: e.file_id, index: e.index } } }); } break; case `function_call`: x = !0, y.push({ type: `tool-call`, toolCallId: e.call_id, toolName: e.name, input: e.arguments, providerMetadata: { [f]: { itemId: e.id, ...e.namespace != null && { namespace: e.namespace } } } }); break; case `custom_tool_call`: { x = !0; let t = d.toCustomToolName(e.name); y.push({ type: `tool-call`, toolCallId: e.call_id, toolName: t, input: JSON.stringify(e.input), providerMetadata: { [f]: { itemId: e.id } } }); break; } case `web_search_call`: y.push({ type: `tool-call`, toolCallId: e.id, toolName: d.toCustomToolName(u ?? `web_search`), input: JSON.stringify({}), providerExecuted: !0 }), y.push({ type: `tool-result`, toolCallId: e.id, toolName: d.toCustomToolName(u ?? `web_search`), result: Cn$2(e.action) }); break; case `mcp_call`: { let t = e.approval_request_id == null ? e.id : h[e.approval_request_id] ?? e.id, n = `mcp.${e.name}`; y.push({ type: `tool-call`, toolCallId: t, toolName: n, input: e.arguments, providerExecuted: !0, dynamic: !0 }), y.push({ type: `tool-result`, toolCallId: t, toolName: n, result: { type: `call`, serverLabel: e.server_label, name: e.name, arguments: e.arguments, ...e.output == null ? {} : { output: e.output }, ...e.error == null ? {} : { error: e.error } }, providerMetadata: { [f]: { itemId: e.id } } }); break; } case `mcp_list_tools`: break; case `mcp_approval_request`: { let t = e.approval_request_id ?? e.id, n = (s = this.config).generateId?.call(s) ?? bl(), r = `mcp.${e.name}`; y.push({ type: `tool-call`, toolCallId: n, toolName: r, input: e.arguments, providerExecuted: !0, dynamic: !0 }), y.push({ type: `tool-approval-request`, approvalId: t, toolCallId: n }); break; } case `computer_call`: y.push({ type: `tool-call`, toolCallId: e.id, toolName: d.toCustomToolName(`computer_use`), input: ``, providerExecuted: !0 }), y.push({ type: `tool-result`, toolCallId: e.id, toolName: d.toCustomToolName(`computer_use`), result: { type: `computer_use_tool_result`, status: e.status || `completed` } }); break; case `file_search_call`: y.push({ type: `tool-call`, toolCallId: e.id, toolName: d.toCustomToolName(`file_search`), input: `{}`, providerExecuted: !0 }), y.push({ type: `tool-result`, toolCallId: e.id, toolName: d.toCustomToolName(`file_search`), result: { queries: e.queries, results: e.results?.map((e) => ({ attributes: e.attributes, fileId: e.file_id, filename: e.filename, score: e.score, text: e.text })) ?? null } }); break; case `code_interpreter_call`: y.push({ type: `tool-call`, toolCallId: e.id, toolName: d.toCustomToolName(`code_interpreter`), input: JSON.stringify({ code: e.code, containerId: e.container_id }), providerExecuted: !0 }), y.push({ type: `tool-result`, toolCallId: e.id, toolName: d.toCustomToolName(`code_interpreter`), result: { outputs: e.outputs } }); break; case `apply_patch_call`: y.push({ type: `tool-call`, toolCallId: e.call_id, toolName: d.toCustomToolName(`apply_patch`), input: JSON.stringify({ callId: e.call_id, operation: e.operation }), providerMetadata: { [f]: { itemId: e.id } } }); break; case `compaction`: y.push({ type: `custom`, kind: `openai.compaction`, providerMetadata: { [f]: { type: `compaction`, itemId: e.id, encryptedContent: e.encrypted_content } } }); break; } let w = { [f]: { responseId: _.id, ...b.length > 0 ? { logprobs: b } : {}, ...typeof _.service_tier == `string` ? { serviceTier: _.service_tier } : {} } }, T = _.usage; return { content: y, finishReason: { unified: qt$2({ finishReason: _.incomplete_details?.reason, hasFunctionCall: x }), raw: _.incomplete_details?.reason ?? void 0 }, usage: Ht$2(T), request: { body: c }, response: { id: _.id, timestamp: /* @__PURE__ */ new Date(_.created_at * 1e3), modelId: _.model, headers: g, body: v }, providerMetadata: w, warnings: l }; } async doStream(e) { var t; let { args: n, warnings: r, webSearchToolName: i, toolNameMapping: a, store: o, providerOptionsName: s, isShellProviderExecuted: c } = await this.getArgs(e), l = this.config.url({ path: `/responses`, modelId: this.modelId }), { responseHeaders: u, value: d } = await sd({ url: l, headers: Pc((t = this.config).headers?.call(t), e.headers), body: { ...n, stream: !0 }, failedResponseHandler: X$3, successfulResponseHandler: yd(Xt$2), abortSignal: e.abortSignal, fetch: this.config.fetch }), f = await le$2({ stream: d, getError: (e) => xn$2(e) || un$2(e) && e.response.error != null ? e : void 0, isOutputChunk: Sn$2, url: l, requestBodyValues: n, responseHeaders: u }), p = this, m = an$2(e.prompt), h = /* @__PURE__ */ new Map(), g = { unified: `other`, raw: void 0 }, _, v = [], y = null, b = {}, x = [], S, w = !1, T = {}, E, D = [], O = !1; return { stream: f.pipeThrough(new TransformStream({ start(e) { e.enqueue({ type: `stream-start`, warnings: r }); }, transform(t, n) { var r, l, u, d, f; if (e.includeRawChunks && n.enqueue({ type: `raw`, rawValue: t.rawValue }), !t.success) { g = { unified: `error`, raw: void 0 }, n.enqueue({ type: `error`, error: t.error }); return; } let k = t.value; if (yn$2(k)) { if (k.item.type === `function_call`) b[k.output_index] = { toolName: k.item.name, toolCallId: k.item.call_id }, n.enqueue({ type: `tool-input-start`, id: k.item.call_id, toolName: k.item.name }); else if (k.item.type === `custom_tool_call`) { let e = a.toCustomToolName(k.item.name); b[k.output_index] = { toolName: e, toolCallId: k.item.call_id }, n.enqueue({ type: `tool-input-start`, id: k.item.call_id, toolName: e }); } else if (k.item.type === `web_search_call`) b[k.output_index] = { toolName: a.toCustomToolName(i ?? `web_search`), toolCallId: k.item.id }, n.enqueue({ type: `tool-input-start`, id: k.item.id, toolName: a.toCustomToolName(i ?? `web_search`), providerExecuted: !0 }), n.enqueue({ type: `tool-input-end`, id: k.item.id }), n.enqueue({ type: `tool-call`, toolCallId: k.item.id, toolName: a.toCustomToolName(i ?? `web_search`), input: JSON.stringify({}), providerExecuted: !0 }); else if (k.item.type === `computer_call`) b[k.output_index] = { toolName: a.toCustomToolName(`computer_use`), toolCallId: k.item.id }, n.enqueue({ type: `tool-input-start`, id: k.item.id, toolName: a.toCustomToolName(`computer_use`), providerExecuted: !0 }); else if (k.item.type === `code_interpreter_call`) b[k.output_index] = { toolName: a.toCustomToolName(`code_interpreter`), toolCallId: k.item.id, codeInterpreter: { containerId: k.item.container_id } }, n.enqueue({ type: `tool-input-start`, id: k.item.id, toolName: a.toCustomToolName(`code_interpreter`), providerExecuted: !0 }), n.enqueue({ type: `tool-input-delta`, id: k.item.id, delta: `{"containerId":"${k.item.container_id}","code":"` }); else if (k.item.type === `file_search_call`) n.enqueue({ type: `tool-call`, toolCallId: k.item.id, toolName: a.toCustomToolName(`file_search`), input: `{}`, providerExecuted: !0 }); else if (k.item.type === `image_generation_call`) n.enqueue({ type: `tool-call`, toolCallId: k.item.id, toolName: a.toCustomToolName(`image_generation`), input: `{}`, providerExecuted: !0 }); else if (k.item.type === `tool_search_call`) { let e = k.item.id, t = a.toCustomToolName(`tool_search`), r = k.item.execution === `server`; b[k.output_index] = { toolName: t, toolCallId: e, toolSearchExecution: k.item.execution ?? `server` }, r && n.enqueue({ type: `tool-input-start`, id: e, toolName: t, providerExecuted: !0 }); } else if (k.item.type !== `tool_search_output` && !(k.item.type === `mcp_call` || k.item.type === `mcp_list_tools` || k.item.type === `mcp_approval_request`)) if (k.item.type === `apply_patch_call`) { let { call_id: e, operation: t } = k.item; if (b[k.output_index] = { toolName: a.toCustomToolName(`apply_patch`), toolCallId: e, applyPatch: { hasDiff: t.type === `delete_file`, endEmitted: t.type === `delete_file` } }, n.enqueue({ type: `tool-input-start`, id: e, toolName: a.toCustomToolName(`apply_patch`) }), t.type === `delete_file`) { let r = JSON.stringify({ callId: e, operation: t }); n.enqueue({ type: `tool-input-delta`, id: e, delta: r }), n.enqueue({ type: `tool-input-end`, id: e }); } else n.enqueue({ type: `tool-input-delta`, id: e, delta: `{"callId":"${$$3(e)}","operation":{"type":"${$$3(t.type)}","path":"${$$3(t.path)}","diff":"` }); } else k.item.type === `shell_call` ? b[k.output_index] = { toolName: a.toCustomToolName(`shell`), toolCallId: k.item.call_id } : k.item.type === `shell_call_output` || (k.item.type === `message` ? (x.splice(0, x.length), S = k.item.phase ?? void 0, n.enqueue({ type: `text-start`, id: k.item.id, providerMetadata: { [s]: { itemId: k.item.id, ...k.item.phase != null && { phase: k.item.phase } } } })) : yn$2(k) && k.item.type === `reasoning` && (T[k.item.id] = { encryptedContent: k.item.encrypted_content, summaryParts: { 0: `active` } }, n.enqueue({ type: `reasoning-start`, id: `${k.item.id}:0`, providerMetadata: { [s]: { itemId: k.item.id, reasoningEncryptedContent: k.item.encrypted_content ?? null } } }))); } else if (cn$2(k)) if (k.item.type === `message`) { let e = k.item.phase ?? S; S = void 0, n.enqueue({ type: `text-end`, id: k.item.id, providerMetadata: { [s]: { itemId: k.item.id, ...e != null && { phase: e }, ...x.length > 0 && { annotations: x } } } }); } else if (k.item.type === `function_call`) b[k.output_index] = void 0, w = !0, n.enqueue({ type: `tool-input-end`, id: k.item.call_id, ...k.item.namespace != null && { providerMetadata: { [s]: { namespace: k.item.namespace } } } }), n.enqueue({ type: `tool-call`, toolCallId: k.item.call_id, toolName: k.item.name, input: k.item.arguments, providerMetadata: { [s]: { itemId: k.item.id, ...k.item.namespace != null && { namespace: k.item.namespace } } } }); else if (k.item.type === `custom_tool_call`) { b[k.output_index] = void 0, w = !0; let e = a.toCustomToolName(k.item.name); n.enqueue({ type: `tool-input-end`, id: k.item.call_id }), n.enqueue({ type: `tool-call`, toolCallId: k.item.call_id, toolName: e, input: JSON.stringify(k.item.input), providerMetadata: { [s]: { itemId: k.item.id } } }); } else if (k.item.type === `web_search_call`) b[k.output_index] = void 0, n.enqueue({ type: `tool-result`, toolCallId: k.item.id, toolName: a.toCustomToolName(i ?? `web_search`), result: Cn$2(k.item.action) }); else if (k.item.type === `computer_call`) b[k.output_index] = void 0, n.enqueue({ type: `tool-input-end`, id: k.item.id }), n.enqueue({ type: `tool-call`, toolCallId: k.item.id, toolName: a.toCustomToolName(`computer_use`), input: ``, providerExecuted: !0 }), n.enqueue({ type: `tool-result`, toolCallId: k.item.id, toolName: a.toCustomToolName(`computer_use`), result: { type: `computer_use_tool_result`, status: k.item.status || `completed` } }); else if (k.item.type === `file_search_call`) b[k.output_index] = void 0, n.enqueue({ type: `tool-result`, toolCallId: k.item.id, toolName: a.toCustomToolName(`file_search`), result: { queries: k.item.queries, results: k.item.results?.map((e) => ({ attributes: e.attributes, fileId: e.file_id, filename: e.filename, score: e.score, text: e.text })) ?? null } }); else if (k.item.type === `code_interpreter_call`) b[k.output_index] = void 0, n.enqueue({ type: `tool-result`, toolCallId: k.item.id, toolName: a.toCustomToolName(`code_interpreter`), result: { outputs: k.item.outputs } }); else if (k.item.type === `image_generation_call`) n.enqueue({ type: `tool-result`, toolCallId: k.item.id, toolName: a.toCustomToolName(`image_generation`), result: { result: k.item.result } }); else if (k.item.type === `tool_search_call`) { let e = b[k.output_index], t = k.item.execution === `server`; if (e != null) { let r = t ? e.toolCallId : k.item.call_id ?? k.item.id; t ? D.push(r) : n.enqueue({ type: `tool-input-start`, id: r, toolName: e.toolName }), n.enqueue({ type: `tool-input-end`, id: r }), n.enqueue({ type: `tool-call`, toolCallId: r, toolName: e.toolName, input: JSON.stringify({ arguments: k.item.arguments, call_id: t ? null : r }), ...t ? { providerExecuted: !0 } : {}, providerMetadata: { [s]: { itemId: k.item.id } } }); } b[k.output_index] = void 0; } else if (k.item.type === `tool_search_output`) { let e = k.item.call_id ?? D.shift() ?? k.item.id; n.enqueue({ type: `tool-result`, toolCallId: e, toolName: a.toCustomToolName(`tool_search`), result: { tools: k.item.tools }, providerMetadata: { [s]: { itemId: k.item.id } } }); } else if (k.item.type === `mcp_call`) { b[k.output_index] = void 0; let e = k.item.approval_request_id ?? void 0, t = e == null ? k.item.id : h.get(e) ?? m[e] ?? k.item.id, r = `mcp.${k.item.name}`; n.enqueue({ type: `tool-call`, toolCallId: t, toolName: r, input: k.item.arguments, providerExecuted: !0, dynamic: !0 }), n.enqueue({ type: `tool-result`, toolCallId: t, toolName: r, result: { type: `call`, serverLabel: k.item.server_label, name: k.item.name, arguments: k.item.arguments, ...k.item.output == null ? {} : { output: k.item.output }, ...k.item.error == null ? {} : { error: k.item.error } }, providerMetadata: { [s]: { itemId: k.item.id } } }); } else if (k.item.type === `mcp_list_tools`) b[k.output_index] = void 0; else if (k.item.type === `apply_patch_call`) { let e = b[k.output_index]; e?.applyPatch && !e.applyPatch.endEmitted && k.item.operation.type !== `delete_file` && (e.applyPatch.hasDiff || n.enqueue({ type: `tool-input-delta`, id: e.toolCallId, delta: $$3(k.item.operation.diff) }), n.enqueue({ type: `tool-input-delta`, id: e.toolCallId, delta: `"}}` }), n.enqueue({ type: `tool-input-end`, id: e.toolCallId }), e.applyPatch.endEmitted = !0), e && k.item.status === `completed` && n.enqueue({ type: `tool-call`, toolCallId: e.toolCallId, toolName: a.toCustomToolName(`apply_patch`), input: JSON.stringify({ callId: k.item.call_id, operation: k.item.operation }), providerMetadata: { [s]: { itemId: k.item.id } } }), b[k.output_index] = void 0; } else if (k.item.type === `mcp_approval_request`) { b[k.output_index] = void 0; let e = (r = p.config).generateId?.call(r) ?? bl(), t = k.item.approval_request_id ?? k.item.id; h.set(t, e); let i = `mcp.${k.item.name}`; n.enqueue({ type: `tool-call`, toolCallId: e, toolName: i, input: k.item.arguments, providerExecuted: !0, dynamic: !0 }), n.enqueue({ type: `tool-approval-request`, approvalId: t, toolCallId: e }); } else if (k.item.type === `local_shell_call`) b[k.output_index] = void 0, n.enqueue({ type: `tool-call`, toolCallId: k.item.call_id, toolName: a.toCustomToolName(`local_shell`), input: JSON.stringify({ action: { type: `exec`, command: k.item.action.command, timeoutMs: k.item.action.timeout_ms, user: k.item.action.user, workingDirectory: k.item.action.working_directory, env: k.item.action.env } }), providerMetadata: { [s]: { itemId: k.item.id } } }); else if (k.item.type === `shell_call`) b[k.output_index] = void 0, n.enqueue({ type: `tool-call`, toolCallId: k.item.call_id, toolName: a.toCustomToolName(`shell`), input: JSON.stringify({ action: { commands: k.item.action.commands } }), ...c && { providerExecuted: !0 }, providerMetadata: { [s]: { itemId: k.item.id } } }); else if (k.item.type === `shell_call_output`) n.enqueue({ type: `tool-result`, toolCallId: k.item.call_id, toolName: a.toCustomToolName(`shell`), result: { output: k.item.output.map((e) => ({ stdout: e.stdout, stderr: e.stderr, outcome: e.outcome.type === `exit` ? { type: `exit`, exitCode: e.outcome.exit_code } : { type: `timeout` } })) } }); else if (k.item.type === `reasoning`) { let e = T[k.item.id], t = Object.entries(e.summaryParts).filter(([e, t]) => t === `active` || t === `can-conclude`).map(([e]) => e); for (let e of t) n.enqueue({ type: `reasoning-end`, id: `${k.item.id}:${e}`, providerMetadata: { [s]: { itemId: k.item.id, reasoningEncryptedContent: k.item.encrypted_content ?? null } } }); delete T[k.item.id]; } else k.item.type === `compaction` && n.enqueue({ type: `custom`, kind: `openai.compaction`, providerMetadata: { [s]: { type: `compaction`, itemId: k.item.id, encryptedContent: k.item.encrypted_content } } }); else if (fn$2(k)) { let e = b[k.output_index]; e != null && n.enqueue({ type: `tool-input-delta`, id: e.toolCallId, delta: k.delta }); } else if (pn$2(k)) { let e = b[k.output_index]; e != null && n.enqueue({ type: `tool-input-delta`, id: e.toolCallId, delta: k.delta }); } else if (_n$2(k)) { let e = b[k.output_index]; e?.applyPatch && (n.enqueue({ type: `tool-input-delta`, id: e.toolCallId, delta: $$3(k.delta) }), e.applyPatch.hasDiff = !0); } else if (vn$2(k)) { let e = b[k.output_index]; e?.applyPatch && !e.applyPatch.endEmitted && (e.applyPatch.hasDiff || (n.enqueue({ type: `tool-input-delta`, id: e.toolCallId, delta: $$3(k.diff) }), e.applyPatch.hasDiff = !0), n.enqueue({ type: `tool-input-delta`, id: e.toolCallId, delta: `"}}` }), n.enqueue({ type: `tool-input-end`, id: e.toolCallId }), e.applyPatch.endEmitted = !0); } else if (mn$2(k)) n.enqueue({ type: `tool-result`, toolCallId: k.item_id, toolName: a.toCustomToolName(`image_generation`), result: { result: k.partial_image_b64 }, preliminary: !0 }); else if (hn$2(k)) { let e = b[k.output_index]; e != null && n.enqueue({ type: `tool-input-delta`, id: e.toolCallId, delta: $$3(k.delta) }); } else if (gn$2(k)) { let e = b[k.output_index]; e != null && (n.enqueue({ type: `tool-input-delta`, id: e.toolCallId, delta: `"}` }), n.enqueue({ type: `tool-input-end`, id: e.toolCallId }), n.enqueue({ type: `tool-call`, toolCallId: e.toolCallId, toolName: a.toCustomToolName(`code_interpreter`), input: JSON.stringify({ code: k.code, containerId: e.codeInterpreter.containerId }), providerExecuted: !0 })); } else if (dn$2(k)) y = k.response.id, n.enqueue({ type: `response-metadata`, id: k.response.id, timestamp: /* @__PURE__ */ new Date(k.response.created_at * 1e3), modelId: k.response.model }); else if (sn$2(k)) n.enqueue({ type: `text-delta`, id: k.item_id, delta: k.delta }), e.providerOptions?.[s]?.logprobs && k.logprobs && v.push(k.logprobs); else if (k.type === `response.reasoning_summary_part.added`) { if (k.summary_index > 0) { let e = T[k.item_id]; e.summaryParts[k.summary_index] = `active`; for (let t of Object.keys(e.summaryParts)) e.summaryParts[t] === `can-conclude` && (n.enqueue({ type: `reasoning-end`, id: `${k.item_id}:${t}`, providerMetadata: { [s]: { itemId: k.item_id } } }), e.summaryParts[t] = `concluded`); n.enqueue({ type: `reasoning-start`, id: `${k.item_id}:${k.summary_index}`, providerMetadata: { [s]: { itemId: k.item_id, reasoningEncryptedContent: T[k.item_id]?.encryptedContent ?? null } } }); } } else if (k.type === `response.reasoning_summary_text.delta`) n.enqueue({ type: `reasoning-delta`, id: `${k.item_id}:${k.summary_index}`, delta: k.delta, providerMetadata: { [s]: { itemId: k.item_id } } }); else if (k.type === `response.reasoning_summary_part.done`) o ? (n.enqueue({ type: `reasoning-end`, id: `${k.item_id}:${k.summary_index}`, providerMetadata: { [s]: { itemId: k.item_id } } }), T[k.item_id].summaryParts[k.summary_index] = `concluded`) : T[k.item_id].summaryParts[k.summary_index] = `can-conclude`; else if (ln$2(k)) g = { unified: qt$2({ finishReason: k.response.incomplete_details?.reason, hasFunctionCall: w }), raw: k.response.incomplete_details?.reason ?? void 0 }, _ = k.response.usage, typeof k.response.service_tier == `string` && (E = k.response.service_tier); else if (un$2(k)) { let e = k.response.incomplete_details?.reason; g = { unified: e ? qt$2({ finishReason: e, hasFunctionCall: w }) : `error`, raw: e ?? `error` }, _ = k.response.usage ?? void 0, !O && k.response.error != null && (O = !0, n.enqueue({ type: `error`, error: { type: `response.failed`, sequence_number: k.sequence_number, response: { error: k.response.error, incomplete_details: k.response.incomplete_details, service_tier: k.response.service_tier } } })); } else bn$2(k) ? (x.push(k.annotation), k.annotation.type === `url_citation` ? n.enqueue({ type: `source`, sourceType: `url`, id: (l = p.config).generateId?.call(l) ?? bl(), url: k.annotation.url, title: k.annotation.title }) : k.annotation.type === `file_citation` ? n.enqueue({ type: `source`, sourceType: `document`, id: (u = p.config).generateId?.call(u) ?? bl(), mediaType: `text/plain`, title: k.annotation.filename, filename: k.annotation.filename, providerMetadata: { [s]: { type: k.annotation.type, fileId: k.annotation.file_id, index: k.annotation.index } } }) : k.annotation.type === `container_file_citation` ? n.enqueue({ type: `source`, sourceType: `document`, id: (d = p.config).generateId?.call(d) ?? bl(), mediaType: `text/plain`, title: k.annotation.filename, filename: k.annotation.filename, providerMetadata: { [s]: { type: k.annotation.type, fileId: k.annotation.file_id, containerId: k.annotation.container_id } } }) : k.annotation.type === `file_path` && n.enqueue({ type: `source`, sourceType: `document`, id: (f = p.config).generateId?.call(f) ?? bl(), mediaType: `application/octet-stream`, title: k.annotation.file_id, filename: k.annotation.file_id, providerMetadata: { [s]: { type: k.annotation.type, fileId: k.annotation.file_id, index: k.annotation.index } } })) : xn$2(k) && (O = !0, g = { unified: `error`, raw: `error` }, n.enqueue({ type: `error`, error: k })); }, flush(e) { let t = { [s]: { responseId: y, ...v.length > 0 ? { logprobs: v } : {}, ...E === void 0 ? {} : { serviceTier: E } } }; e.enqueue({ type: `finish`, finishReason: g, usage: Ht$2(_), providerMetadata: t }); } })), request: { body: n }, response: { headers: u } }; } }; function sn$2(e) { return e.type === `response.output_text.delta`; } function cn$2(e) { return e.type === `response.output_item.done`; } function ln$2(e) { return e.type === `response.completed` || e.type === `response.incomplete`; } function un$2(e) { return e.type === `response.failed`; } function dn$2(e) { return e.type === `response.created`; } function fn$2(e) { return e.type === `response.function_call_arguments.delta`; } function pn$2(e) { return e.type === `response.custom_tool_call_input.delta`; } function mn$2(e) { return e.type === `response.image_generation_call.partial_image`; } function hn$2(e) { return e.type === `response.code_interpreter_call_code.delta`; } function gn$2(e) { return e.type === `response.code_interpreter_call_code.done`; } function _n$2(e) { return e.type === `response.apply_patch_call_operation_diff.delta`; } function vn$2(e) { return e.type === `response.apply_patch_call_operation_diff.done`; } function yn$2(e) { return e.type === `response.output_item.added`; } function bn$2(e) { return e.type === `response.output_text.annotation.added`; } function xn$2(e) { return e.type === `error`; } function Sn$2(e) { return !(e.type === `response.created` || e.type === `response.failed` || e.type === `error` || e.type === `unknown_chunk`); } function Cn$2(e) { if (e == null) return {}; switch (e.type) { case `search`: return { action: { type: `search`, query: e.query ?? void 0, ...e.queries != null && { queries: e.queries } }, ...e.sources != null && { sources: e.sources } }; case `open_page`: return { action: { type: `openPage`, url: e.url } }; case `find_in_page`: return { action: { type: `findInPage`, url: e.url, pattern: e.pattern } }; } } function $$3(e) { return JSON.stringify(e).slice(1, -1); } var wn$2 = Wu(() => Qu(Co({ instructions: Ra$2().nullish(), speed: oo().min(.25).max(4).default(1).nullish() }))); var Tn$2 = class e { constructor(e, t) { this.modelId = e, this.config = t, this.specificationVersion = `v4`; } static [Mc](e) { return Cd({ modelId: e.modelId, config: e.config }); } static [Nc](t) { return new e(t.modelId, t.config); } get provider() { return this.config.provider; } async getArgs({ text: e, voice: t = `alloy`, outputFormat: n = `mp3`, speed: r, instructions: i, language: a, providerOptions: o }) { let s = [], c = await ad({ provider: `openai`, providerOptions: o, schema: wn$2 }), l = { model: this.modelId, input: e, voice: t, response_format: `mp3`, speed: r, instructions: i }; if (n && ([ `mp3`, `opus`, `aac`, `flac`, `wav`, `pcm` ].includes(n) ? l.response_format = n : s.push({ type: `unsupported`, feature: `outputFormat`, details: `Unsupported output format: ${n}. Using mp3 instead.` })), c) { let e = {}; for (let t in e) { let n = e[t]; n !== void 0 && (l[t] = n); } } return a && s.push({ type: `unsupported`, feature: `language`, details: `OpenAI speech models do not support language selection. Language parameter "${a}" was ignored.` }), { requestBody: l, warnings: s }; } async doGenerate(e) { var t, n; let r = ((t = this.config._internal)?.currentDate)?.call(t) ?? /* @__PURE__ */ new Date(), { requestBody: i, warnings: a } = await this.getArgs(e), { value: o, responseHeaders: s, rawValue: c } = await sd({ url: this.config.url({ path: `/audio/speech`, modelId: this.modelId }), headers: Pc((n = this.config).headers?.call(n), e.headers), body: i, failedResponseHandler: X$3, successfulResponseHandler: xd(), abortSignal: e.abortSignal, fetch: this.config.fetch }); return { audio: o, warnings: a, request: { body: JSON.stringify(i) }, response: { timestamp: r, modelId: this.modelId, headers: s, body: c } }; } }; var En$2 = Wu(() => Qu(Co({ text: Ra$2(), language: Ra$2().nullish(), duration: oo().nullish(), words: xo(Co({ word: Ra$2(), start: oo(), end: oo() })).nullish(), segments: xo(Co({ id: oo(), seek: oo(), start: oo(), end: oo(), text: Ra$2(), tokens: xo(oo()), temperature: oo(), avg_logprob: oo(), compression_ratio: oo(), no_speech_prob: oo() })).nullish() }))); var Dn$2 = Wu(() => Qu(Co({ include: xo(Ra$2()).optional(), language: Ra$2().optional(), prompt: Ra$2().optional(), temperature: oo().min(0).max(1).default(0).optional(), timestampGranularities: xo(Io([`word`, `segment`])).default([`segment`]).optional() }))); var On$2 = { afrikaans: `af`, arabic: `ar`, armenian: `hy`, azerbaijani: `az`, belarusian: `be`, bosnian: `bs`, bulgarian: `bg`, catalan: `ca`, chinese: `zh`, croatian: `hr`, czech: `cs`, danish: `da`, dutch: `nl`, english: `en`, estonian: `et`, finnish: `fi`, french: `fr`, galician: `gl`, german: `de`, greek: `el`, hebrew: `he`, hindi: `hi`, hungarian: `hu`, icelandic: `is`, indonesian: `id`, italian: `it`, japanese: `ja`, kannada: `kn`, kazakh: `kk`, korean: `ko`, latvian: `lv`, lithuanian: `lt`, macedonian: `mk`, malay: `ms`, marathi: `mr`, maori: `mi`, nepali: `ne`, norwegian: `no`, persian: `fa`, polish: `pl`, portuguese: `pt`, romanian: `ro`, russian: `ru`, serbian: `sr`, slovak: `sk`, slovenian: `sl`, spanish: `es`, swahili: `sw`, swedish: `sv`, tagalog: `tl`, tamil: `ta`, thai: `th`, turkish: `tr`, ukrainian: `uk`, urdu: `ur`, vietnamese: `vi`, welsh: `cy` }; var kn$2 = class e { constructor(e, t) { this.modelId = e, this.config = t, this.specificationVersion = `v4`; } static [Mc](e) { return Cd({ modelId: e.modelId, config: e.config }); } static [Nc](t) { return new e(t.modelId, t.config); } get provider() { return this.config.provider; } async getArgs({ audio: e, mediaType: t, providerOptions: n }) { let r = [], i = await ad({ provider: `openai`, providerOptions: n, schema: Dn$2 }), a = new FormData(), o = e instanceof Uint8Array ? new Blob([e]) : new Blob([Lc(e)]); a.append(`model`, this.modelId); let c = Bl(t); if (a.append(`file`, new File([o], `audio`, { type: t }), `audio.${c}`), this.modelId === `whisper-1` && a.append(`response_format`, `verbose_json`), i) { let e = [`gpt-4o-transcribe`, `gpt-4o-mini-transcribe`].includes(this.modelId), t = { include: i.include, language: i.language, prompt: i.prompt, ...this.modelId !== `whisper-1` && { response_format: e ? `json` : `verbose_json` }, temperature: i.temperature, timestamp_granularities: i.timestampGranularities }; for (let [e, n] of Object.entries(t)) if (n != null) if (Array.isArray(n)) for (let t of n) a.append(`${e}[]`, String(t)); else a.append(e, String(n)); } return { formData: a, warnings: r }; } async doGenerate(e) { var t, n; let r = ((t = this.config._internal)?.currentDate)?.call(t) ?? /* @__PURE__ */ new Date(), { formData: i, warnings: a } = await this.getArgs(e), { value: o, responseHeaders: s, rawValue: c } = await cd({ url: this.config.url({ path: `/audio/transcriptions`, modelId: this.modelId }), headers: Pc((n = this.config).headers?.call(n), e.headers), formData: i, failedResponseHandler: X$3, successfulResponseHandler: bd(En$2), abortSignal: e.abortSignal, fetch: this.config.fetch }), l = o.language != null && o.language in On$2 ? On$2[o.language] : void 0; return { text: o.text, segments: o.segments?.map((e) => ({ text: e.text, startSecond: e.start, endSecond: e.end })) ?? o.words?.map((e) => ({ text: e.word, startSecond: e.start, endSecond: e.end })) ?? [], language: l, durationInSeconds: o.duration ?? void 0, warnings: a, response: { timestamp: r, modelId: this.modelId, headers: s, body: c } }; } }; var An$2 = Wu(() => Qu(Co({ id: Ra$2(), name: Ra$2().nullish(), description: Ra$2().nullish(), default_version: Ra$2().nullish(), latest_version: Ra$2().nullish(), created_at: oo(), updated_at: oo().nullish() }))); var jn$2 = class { constructor(e) { this.config = e, this.specificationVersion = `v4`; } get provider() { return this.config.provider; } async uploadSkill(e) { let t = []; e.displayTitle != null && t.push({ type: `unsupported`, feature: `displayTitle` }); let n = new FormData(); for (let t of e.files) { let e = Bc(t.data); n.append(`files[]`, new Blob([e]), t.path); } let { value: r } = await cd({ url: this.config.url({ path: `/skills` }), headers: Pc(this.config.headers()), formData: n, failedResponseHandler: X$3, successfulResponseHandler: bd(An$2), fetch: this.config.fetch }); return { providerReference: { openai: r.id }, ...r.name == null ? {} : { name: r.name }, ...r.description == null ? {} : { description: r.description }, ...r.latest_version == null ? {} : { latestVersion: r.latest_version }, providerMetadata: { openai: { ...r.default_version == null ? {} : { defaultVersion: r.default_version }, ...r.created_at == null ? {} : { createdAt: r.created_at }, ...r.updated_at == null ? {} : { updatedAt: r.updated_at } } }, warnings: t }; } }; var Mn$2 = `4.0.0`; function Nn$2(e = {}) { let t = Ed(Fl({ settingValue: e.baseURL, environmentVariableName: `OPENAI_BASE_URL` })) ?? `https://api.openai.com/v1`, n = e.name ?? `openai`, r = () => Ol({ Authorization: `Bearer ${Pl({ apiKey: e.apiKey, environmentVariableName: `OPENAI_API_KEY`, description: `OpenAI` })}`, "OpenAI-Organization": e.organization, "OpenAI-Project": e.project, ...e.headers }, `ai-sdk/openai/${Mn$2}`), i = (i) => new we$2(i, { provider: `${n}.chat`, url: ({ path: e }) => `${t}${e}`, headers: r, fetch: e.fetch }), a = (i) => new Ne$2(i, { provider: `${n}.completion`, url: ({ path: e }) => `${t}${e}`, headers: r, fetch: e.fetch }), o = (i) => new Le$2(i, { provider: `${n}.embedding`, url: ({ path: e }) => `${t}${e}`, headers: r, fetch: e.fetch }), s = (i) => new Je$2(i, { provider: `${n}.image`, url: ({ path: e }) => `${t}${e}`, headers: r, fetch: e.fetch }), c = (i) => new kn$2(i, { provider: `${n}.transcription`, url: ({ path: e }) => `${t}${e}`, headers: r, fetch: e.fetch }), l = (i) => new Tn$2(i, { provider: `${n}.speech`, url: ({ path: e }) => `${t}${e}`, headers: r, fetch: e.fetch }), u = () => new Be$2({ provider: `${n}.files`, baseURL: t, headers: r, fetch: e.fetch }), f = () => new jn$2({ provider: `${n}.skills`, url: ({ path: e }) => `${t}${e}`, headers: r, fetch: e.fetch }), m = (e) => { if (new.target) throw Error(`The OpenAI model function cannot be called with the new keyword.`); return h(e); }, h = (i) => new on$2(i, { provider: `${n}.responses`, url: ({ path: e }) => `${t}${e}`, headers: r, fetch: e.fetch, fileIdPrefixes: [`file-`] }), g = (i) => new Vt$2(i, { provider: `${n}.realtime`, baseURL: t, headers: r, fetch: e.fetch }), _ = Object.assign((e) => g(e), { getToken: async (e) => { let t = await g(e.model).doCreateClientSecret({ sessionConfig: e.sessionConfig, expiresAfterSeconds: e.expiresAfterSeconds }); return { token: t.token, url: t.url, expiresAt: t.expiresAt }; } }), v = function(e) { return m(e); }; return v.specificationVersion = `v4`, v.languageModel = m, v.chat = i, v.completion = a, v.responses = h, v.embedding = o, v.embeddingModel = o, v.textEmbedding = o, v.textEmbeddingModel = o, v.image = s, v.imageModel = s, v.transcription = c, v.transcriptionModel = c, v.speech = l, v.speechModel = l, v.files = u, v.skills = f, v.experimental_realtime = _, v.tools = Lt$2, v; } var Pn$2 = Nn$2(); //#endregion //#region node_modules/eve/dist/src/compiled/_chunks/node/dist-BdTs18CF.js var t$3 = Object.create; var n$3 = Object.defineProperty; var r$6 = Object.getOwnPropertyDescriptor; var i$4 = Object.getOwnPropertyNames; var a$3 = Object.getPrototypeOf; var o$3 = Object.prototype.hasOwnProperty; var c$3 = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t.exports); var u$3 = (e, t, a, s) => { if (t && typeof t == `object` || typeof t == `function`) for (var c = i$4(t), l = 0, u = c.length, d; l < u; l++) d = c[l], !o$3.call(e, d) && d !== a && n$3(e, d, { get: ((e) => t[e]).bind(null, d), enumerable: !(s = r$6(t, d)) || s.enumerable }); return e; }; var d$3 = (e, r, i) => (i = e == null ? {} : t$3(a$3(e)), u$3(r || !e || !e.__esModule ? n$3(i, `default`, { value: e, enumerable: !0 }) : i, e)); var p$4 = createRequire(import.meta.url); const m$2 = Symbol.for(`workflow-serialize`); const h$2 = Symbol.for(`workflow-deserialize`); //#endregion //#region node_modules/eve/dist/src/compiled/_chunks/node/retry-DkR2H1Y0.js var t$2 = c$3(((e, t) => { var n = 1e3, r = n * 60, i = r * 60, a = i * 24, o = a * 7, s = a * 365.25; t.exports = function(e, t) { t ||= {}; var n = typeof e; if (n === `string` && e.length > 0) return c(e); if (n === `number` && isFinite(e)) return t.long ? u(e) : l(e); throw Error(`val is not a non-empty string or a valid number. val=` + JSON.stringify(e)); }; function c(e) { if (e = String(e), !(e.length > 100)) { var t = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e); if (t) { var c = parseFloat(t[1]); switch ((t[2] || `ms`).toLowerCase()) { case `years`: case `year`: case `yrs`: case `yr`: case `y`: return c * s; case `weeks`: case `week`: case `w`: return c * o; case `days`: case `day`: case `d`: return c * a; case `hours`: case `hour`: case `hrs`: case `hr`: case `h`: return c * i; case `minutes`: case `minute`: case `mins`: case `min`: case `m`: return c * r; case `seconds`: case `second`: case `secs`: case `sec`: case `s`: return c * n; case `milliseconds`: case `millisecond`: case `msecs`: case `msec`: case `ms`: return c; default: return; } } } } function l(e) { var t = Math.abs(e); return t >= a ? Math.round(e / a) + `d` : t >= i ? Math.round(e / i) + `h` : t >= r ? Math.round(e / r) + `m` : t >= n ? Math.round(e / n) + `s` : e + `ms`; } function u(e) { var t = Math.abs(e); return t >= a ? d(e, t, a, `day`) : t >= i ? d(e, t, i, `hour`) : t >= r ? d(e, t, r, `minute`) : t >= n ? d(e, t, n, `second`) : e + ` ms`; } function d(e, t, n, r) { var i = t >= n * 1.5; return Math.round(e / n) + ` ` + r + (i ? `s` : ``); } })); var n$2 = c$3(((e, t) => { function n(e, t) { typeof t == `boolean` && (t = { forever: t }), this._originalTimeouts = JSON.parse(JSON.stringify(e)), this._timeouts = e, this._options = t || {}, this._maxRetryTime = t && t.maxRetryTime || Infinity, this._fn = null, this._errors = [], this._attempts = 1, this._operationTimeout = null, this._operationTimeoutCb = null, this._timeout = null, this._operationStart = null, this._timer = null, this._options.forever && (this._cachedTimeouts = this._timeouts.slice(0)); } t.exports = n, n.prototype.reset = function() { this._attempts = 1, this._timeouts = this._originalTimeouts.slice(0); }, n.prototype.stop = function() { this._timeout && clearTimeout(this._timeout), this._timer && clearTimeout(this._timer), this._timeouts = [], this._cachedTimeouts = null; }, n.prototype.retry = function(e) { if (this._timeout && clearTimeout(this._timeout), !e) return !1; var t = (/* @__PURE__ */ new Date()).getTime(); if (e && t - this._operationStart >= this._maxRetryTime) return this._errors.push(e), this._errors.unshift(Error(`RetryOperation timeout occurred`)), !1; this._errors.push(e); var n = this._timeouts.shift(); if (n === void 0) if (this._cachedTimeouts) this._errors.splice(0, this._errors.length - 1), n = this._cachedTimeouts.slice(-1); else return !1; var r = this; return this._timer = setTimeout(function() { r._attempts++, r._operationTimeoutCb && (r._timeout = setTimeout(function() { r._operationTimeoutCb(r._attempts); }, r._operationTimeout), r._options.unref && r._timeout.unref()), r._fn(r._attempts); }, n), this._options.unref && this._timer.unref(), !0; }, n.prototype.attempt = function(e, t) { this._fn = e, t && (t.timeout && (this._operationTimeout = t.timeout), t.cb && (this._operationTimeoutCb = t.cb)); var n = this; this._operationTimeoutCb && (this._timeout = setTimeout(function() { n._operationTimeoutCb(); }, n._operationTimeout)), this._operationStart = (/* @__PURE__ */ new Date()).getTime(), this._fn(this._attempts); }, n.prototype.try = function(e) { console.log(`Using RetryOperation.try() is deprecated`), this.attempt(e); }, n.prototype.start = function(e) { console.log(`Using RetryOperation.start() is deprecated`), this.attempt(e); }, n.prototype.start = n.prototype.try, n.prototype.errors = function() { return this._errors; }, n.prototype.attempts = function() { return this._attempts; }, n.prototype.mainError = function() { if (this._errors.length === 0) return null; for (var e = {}, t = null, n = 0, r = 0; r < this._errors.length; r++) { var i = this._errors[r], a = i.message, o = (e[a] || 0) + 1; e[a] = o, o >= n && (t = i, n = o); } return t; }; })); var r$5 = c$3(((e) => { var t = n$2(); e.operation = function(n) { return new t(e.timeouts(n), { forever: n && (n.forever || n.retries === Infinity), unref: n && n.unref, maxRetryTime: n && n.maxRetryTime }); }, e.timeouts = function(e) { if (e instanceof Array) return [].concat(e); var t = { retries: 10, factor: 2, minTimeout: 1 * 1e3, maxTimeout: Infinity, randomize: !1 }; for (var n in e) t[n] = e[n]; if (t.minTimeout > t.maxTimeout) throw Error(`minTimeout is greater than maxTimeout`); for (var r = [], i = 0; i < t.retries; i++) r.push(this.createTimeout(i, t)); return e && e.forever && !r.length && r.push(this.createTimeout(i, t)), r.sort(function(e, t) { return e - t; }), r; }, e.createTimeout = function(e, t) { var n = t.randomize ? Math.random() + 1 : 1, r = Math.round(n * Math.max(t.minTimeout, 1) * t.factor ** +e); return r = Math.min(r, t.maxTimeout), r; }, e.wrap = function(t, n, r) { if (n instanceof Array && (r = n, n = null), !r) for (var i in r = [], t) typeof t[i] == `function` && r.push(i); for (var a = 0; a < r.length; a++) { var o = r[a], s = t[o]; t[o] = function(r) { var i = e.operation(n), a = Array.prototype.slice.call(arguments, 1), o = a.pop(); a.push(function(e) { i.retry(e) || (e && (arguments[0] = i.mainError()), o.apply(this, arguments)); }), i.attempt(function() { r.apply(t, a); }); }.bind(t, s), t[o].options = n; } }; })); var i$3 = c$3(((e, t) => { t.exports = r$5(); })); //#endregion //#region node_modules/eve/dist/src/compiled/_chunks/node/version-TugPKZua.js var e; const t$1 = Object.freeze({ status: `aborted` }); function n$1(e, t, n) { function r(n, r) { if (n._zod || Object.defineProperty(n, "_zod", { value: { def: r, constr: o, traits: /* @__PURE__ */ new Set() }, enumerable: !1 }), n._zod.traits.has(e)) return; n._zod.traits.add(e), t(n, r); let i = o.prototype, a = Object.keys(i); for (let e = 0; e < a.length; e++) { let t = a[e]; t in n || (n[t] = i[t].bind(n)); } } let i = n?.Parent ?? Object; class a extends i {} Object.defineProperty(a, "name", { value: e }); function o(e) { var t; let i = n?.Parent ? new a() : this; r(i, e), (t = i._zod).deferred ?? (t.deferred = []); for (let e of i._zod.deferred) e(); return i; } return Object.defineProperty(o, "init", { value: r }), Object.defineProperty(o, Symbol.hasInstance, { value: (t) => n?.Parent && t instanceof n.Parent ? !0 : t?._zod?.traits?.has(e) }), Object.defineProperty(o, "name", { value: e }), o; } var r$4 = class extends Error { constructor() { super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`); } }; var i$2 = class extends Error { constructor(e) { super(`Encountered unidirectional transform during encode: ${e}`), this.name = `ZodEncodeError`; } }; (e = globalThis).__zod_globalConfig ?? (e.__zod_globalConfig = {}); const a$2 = globalThis.__zod_globalConfig; function o$2(e) { return e && Object.assign(a$2, e), a$2; } function s$2(e) { let t = Object.values(e).filter((e) => typeof e == `number`); return Object.entries(e).filter(([e, n]) => t.indexOf(+e) === -1).map(([e, t]) => t); } function c$2(e, t) { return typeof t == `bigint` ? t.toString() : t; } function l$2(e) { return { get value() { { let t = e(); return Object.defineProperty(this, "value", { value: t }), t; } } }; } function u$2(e) { return e == null; } function d$2(e) { let t = +!!e.startsWith(`^`), n = e.endsWith(`$`) ? e.length - 1 : e.length; return e.slice(t, n); } function f$2(e, t) { let n = e / t, r = Math.round(n), i = 2 ** -52 * Math.max(Math.abs(n), 1); return Math.abs(n - r) < i ? 0 : n - r; } const p$3 = Symbol(`evaluating`); function m$1(e, t, n) { let r; Object.defineProperty(e, t, { get() { if (r !== p$3) return r === void 0 && (r = p$3, r = n()), r; }, set(n) { Object.defineProperty(e, t, { value: n }); }, configurable: !0 }); } function h$1(e, t, n) { Object.defineProperty(e, t, { value: n, writable: !0, enumerable: !0, configurable: !0 }); } function g$2(...e) { let t = {}; for (let n of e) Object.assign(t, Object.getOwnPropertyDescriptors(n)); return Object.defineProperties({}, t); } function ee$3(e) { return JSON.stringify(e); } function te$2(e) { return e.toLowerCase().trim().replace(/[^\w\s-]/g, ``).replace(/[\s_-]+/g, `-`).replace(/^-+|-+$/g, ``); } const ne$2 = `captureStackTrace` in Error ? Error.captureStackTrace : (...e) => {}; function _$1(e) { return typeof e == `object` && !!e && !Array.isArray(e); } const re$2 = l$2(() => { if (a$2.jitless || typeof navigator < `u` && navigator?.userAgent?.includes(`Cloudflare`)) return !1; try { return Function(``), !0; } catch { return !1; } }); function v$2(e) { if (_$1(e) === !1) return !1; let t = e.constructor; if (t === void 0 || typeof t != `function`) return !0; let n = t.prototype; return !(_$1(n) === !1 || Object.prototype.hasOwnProperty.call(n, `isPrototypeOf`) === !1); } function ie$2(e) { return v$2(e) ? { ...e } : Array.isArray(e) ? [...e] : e instanceof Map ? new Map(e) : e instanceof Set ? new Set(e) : e; } const ae$2 = /* @__PURE__ */ new Set([ `string`, `number`, `symbol` ]); function y(e) { return e.replace(/[.*+?^${}()|[\]\\]/g, `\\$&`); } function b$2(e, t, n) { let r = new e._zod.constr(t ?? e._zod.def); return (!t || n?.parent) && (r._zod.parent = e), r; } function x$1(e) { let t = e; if (!t) return {}; if (typeof t == `string`) return { error: () => t }; if (t?.message !== void 0) { if (t?.error !== void 0) throw Error("Cannot specify both `message` and `error` params"); t.error = t.message; } return delete t.message, typeof t.error == `string` ? { ...t, error: () => t.error } : t; } function oe$1(e) { return Object.keys(e).filter((t) => e[t]._zod.optin === `optional` && e[t]._zod.optout === `optional`); } const se$1 = { safeint: [-(2 ** 53 - 1), 2 ** 53 - 1], int32: [-2147483648, 2147483647], uint32: [0, 4294967295], float32: [-34028234663852886e22, 34028234663852886e22], float64: [-Number.MAX_VALUE, Number.MAX_VALUE] }; function ce$1(e, t) { let n = e._zod.def, r = n.checks; if (r && r.length > 0) throw Error(`.pick() cannot be used on object schemas containing refinements`); return b$2(e, g$2(e._zod.def, { get shape() { let e = {}; for (let r in t) { if (!(r in n.shape)) throw Error(`Unrecognized key: "${r}"`); t[r] && (e[r] = n.shape[r]); } return h$1(this, `shape`, e), e; }, checks: [] })); } function le$1(e, t) { let n = e._zod.def, r = n.checks; if (r && r.length > 0) throw Error(`.omit() cannot be used on object schemas containing refinements`); return b$2(e, g$2(e._zod.def, { get shape() { let r = { ...e._zod.def.shape }; for (let e in t) { if (!(e in n.shape)) throw Error(`Unrecognized key: "${e}"`); t[e] && delete r[e]; } return h$1(this, `shape`, r), r; }, checks: [] })); } function ue$1(e, t) { if (!v$2(t)) throw Error(`Invalid input to extend: expected a plain object`); let n = e._zod.def.checks; if (n && n.length > 0) { let n = e._zod.def.shape; for (let e in t) if (Object.getOwnPropertyDescriptor(n, e) !== void 0) throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead."); } return b$2(e, g$2(e._zod.def, { get shape() { let n = { ...e._zod.def.shape, ...t }; return h$1(this, `shape`, n), n; } })); } function de$1(e, t) { if (!v$2(t)) throw Error(`Invalid input to safeExtend: expected a plain object`); return b$2(e, g$2(e._zod.def, { get shape() { let n = { ...e._zod.def.shape, ...t }; return h$1(this, `shape`, n), n; } })); } function fe$1(e, t) { if (e._zod.def.checks?.length) throw Error(`.merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.`); return b$2(e, g$2(e._zod.def, { get shape() { let n = { ...e._zod.def.shape, ...t._zod.def.shape }; return h$1(this, `shape`, n), n; }, get catchall() { return t._zod.def.catchall; }, checks: t._zod.def.checks ?? [] })); } function pe$1(e, t, n) { let r = t._zod.def.checks; if (r && r.length > 0) throw Error(`.partial() cannot be used on object schemas containing refinements`); return b$2(t, g$2(t._zod.def, { get shape() { let r = t._zod.def.shape, i = { ...r }; if (n) for (let t in n) { if (!(t in r)) throw Error(`Unrecognized key: "${t}"`); n[t] && (i[t] = e ? new e({ type: `optional`, innerType: r[t] }) : r[t]); } else for (let t in r) i[t] = e ? new e({ type: `optional`, innerType: r[t] }) : r[t]; return h$1(this, `shape`, i), i; }, checks: [] })); } function me$1(e, t, n) { return b$2(t, g$2(t._zod.def, { get shape() { let r = t._zod.def.shape, i = { ...r }; if (n) for (let t in n) { if (!(t in i)) throw Error(`Unrecognized key: "${t}"`); n[t] && (i[t] = new e({ type: `nonoptional`, innerType: r[t] })); } else for (let t in r) i[t] = new e({ type: `nonoptional`, innerType: r[t] }); return h$1(this, `shape`, i), i; } })); } function S$1(e, t = 0) { if (e.aborted === !0) return !0; for (let n = t; n < e.issues.length; n++) if (e.issues[n]?.continue !== !0) return !0; return !1; } function he$1(e, t = 0) { if (e.aborted === !0) return !0; for (let n = t; n < e.issues.length; n++) if (e.issues[n]?.continue === !1) return !0; return !1; } function C$2(e, t) { return t.map((t) => { var n; return (n = t).path ?? (n.path = []), t.path.unshift(e), t; }); } function w$2(e) { return typeof e == `string` ? e : e?.message; } function T$2(e, t, n) { let r = e.message ? e.message : w$2(e.inst?._zod.def?.error?.(e)) ?? w$2(t?.error?.(e)) ?? w$2(n.customError?.(e)) ?? w$2(n.localeError?.(e)) ?? `Invalid input`, { inst: i, continue: a, input: o, ...s } = e; return s.path ??= [], s.message = r, t?.reportInput && (s.input = o), s; } function E$2(e) { return Array.isArray(e) ? `array` : typeof e == `string` ? `string` : `unknown`; } function D$1(...e) { let [t, n, r] = e; return typeof t == `string` ? { message: t, code: `custom`, input: n, inst: r } : { ...t }; } const ge$1 = (e, t) => { e.name = `$ZodError`, Object.defineProperty(e, "_zod", { value: e._zod, enumerable: !1 }), Object.defineProperty(e, "issues", { value: t, enumerable: !1 }), e.message = JSON.stringify(t, c$2, 2), Object.defineProperty(e, "toString", { value: () => e.message, enumerable: !1 }); }; const _e$1 = n$1(`$ZodError`, ge$1); const ve$1 = n$1(`$ZodError`, ge$1, { Parent: Error }); function ye$1(e, t = (e) => e.message) { let n = {}, r = []; for (let i of e.issues) i.path.length > 0 ? (n[i.path[0]] = n[i.path[0]] || [], n[i.path[0]].push(t(i))) : r.push(t(i)); return { formErrors: r, fieldErrors: n }; } function be$1(e, t = (e) => e.message) { let n = { _errors: [] }, r = (e, i = []) => { for (let a of e.issues) if (a.code === `invalid_union` && a.errors.length) a.errors.map((e) => r({ issues: e }, [...i, ...a.path])); else if (a.code === `invalid_key`) r({ issues: a.issues }, [...i, ...a.path]); else if (a.code === `invalid_element`) r({ issues: a.issues }, [...i, ...a.path]); else { let e = [...i, ...a.path]; if (e.length === 0) n._errors.push(t(a)); else { let r = n, i = 0; for (; i < e.length;) { let n = e[i]; i === e.length - 1 ? (r[n] = r[n] || { _errors: [] }, r[n]._errors.push(t(a))) : r[n] = r[n] || { _errors: [] }, r = r[n], i++; } } } }; return r(e), n; } const O$1 = (e) => (t, n, i, a) => { let s = i ? { ...i, async: !1 } : { async: !1 }, c = t._zod.run({ value: n, issues: [] }, s); if (c instanceof Promise) throw new r$4(); if (c.issues.length) { let t = new ((a?.Err) ?? e)(c.issues.map((e) => T$2(e, s, o$2()))); throw ne$2(t, a?.callee), t; } return c.value; }; const k$2 = (e) => async (t, n, r, i) => { let a = r ? { ...r, async: !0 } : { async: !0 }, s = t._zod.run({ value: n, issues: [] }, a); if (s instanceof Promise && (s = await s), s.issues.length) { let t = new ((i?.Err) ?? e)(s.issues.map((e) => T$2(e, a, o$2()))); throw ne$2(t, i?.callee), t; } return s.value; }; const A$2 = (e) => (t, n, i) => { let a = i ? { ...i, async: !1 } : { async: !1 }, s = t._zod.run({ value: n, issues: [] }, a); if (s instanceof Promise) throw new r$4(); return s.issues.length ? { success: !1, error: new (e ?? _e$1)(s.issues.map((e) => T$2(e, a, o$2()))) } : { success: !0, data: s.value }; }; const xe$1 = A$2(ve$1); const j$2 = (e) => async (t, n, r) => { let i = r ? { ...r, async: !0 } : { async: !0 }, a = t._zod.run({ value: n, issues: [] }, i); return a instanceof Promise && (a = await a), a.issues.length ? { success: !1, error: new e(a.issues.map((e) => T$2(e, i, o$2()))) } : { success: !0, data: a.value }; }; const Se$1 = j$2(ve$1); const Ce$1 = (e) => (t, n, r) => { let i = r ? { ...r, direction: `backward` } : { direction: `backward` }; return O$1(e)(t, n, i); }; const we$1 = (e) => (t, n, r) => O$1(e)(t, n, r); const Te$1 = (e) => async (t, n, r) => { let i = r ? { ...r, direction: `backward` } : { direction: `backward` }; return k$2(e)(t, n, i); }; const Ee$1 = (e) => async (t, n, r) => k$2(e)(t, n, r); const De$1 = (e) => (t, n, r) => { let i = r ? { ...r, direction: `backward` } : { direction: `backward` }; return A$2(e)(t, n, i); }; const Oe$1 = (e) => (t, n, r) => A$2(e)(t, n, r); const ke$1 = (e) => async (t, n, r) => { let i = r ? { ...r, direction: `backward` } : { direction: `backward` }; return j$2(e)(t, n, i); }; const Ae$1 = (e) => async (t, n, r) => j$2(e)(t, n, r); const je$1 = /^[cC][0-9a-z]{6,}$/; const Me$1 = /^[0-9a-z]+$/; const Ne$1 = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/; const Pe$1 = /^[0-9a-vA-V]{20}$/; const Fe$1 = /^[A-Za-z0-9]{27}$/; const Ie$1 = /^[a-zA-Z0-9_-]{21}$/; const Le$1 = /^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/; const Re$1 = /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/; const ze$1 = (e) => e ? RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`) : /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/; const Be$1 = /^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/; function Ve$1() { return RegExp(`^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`, `u`); } const He$1 = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/; const Ue$1 = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/; const We$1 = /^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/; const Ge$1 = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/; const Ke$1 = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/; const qe$1 = /^[A-Za-z0-9_-]*$/; const Je$1 = /^https?$/; const Ye$1 = /^\+[1-9]\d{6,14}$/; const Xe$1 = `(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`; const Ze$1 = RegExp(`^${Xe$1}$`); function Qe$1(e) { let t = `(?:[01]\\d|2[0-3]):[0-5]\\d`; return typeof e.precision == `number` ? e.precision === -1 ? `${t}` : e.precision === 0 ? `${t}:[0-5]\\d` : `${t}:[0-5]\\d\\.\\d{${e.precision}}` : `${t}(?::[0-5]\\d(?:\\.\\d+)?)?`; } function $e$1(e) { return RegExp(`^${Qe$1(e)}$`); } function et$1(e) { let t = Qe$1({ precision: e.precision }), n = [`Z`]; e.local && n.push(``), e.offset && n.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`); let r = `${t}(?:${n.join(`|`)})`; return RegExp(`^${Xe$1}T(?:${r})$`); } const tt$1 = (e) => { let t = e ? `[\\s\\S]{${e?.minimum ?? 0},${e?.maximum ?? ``}}` : `[\\s\\S]*`; return RegExp(`^${t}$`); }; const nt$1 = /^-?\d+$/; const rt$1 = /^-?\d+(?:\.\d+)?$/; const it$1 = /^(?:true|false)$/i; const at$1 = /^[^A-Z]*$/; const ot$1 = /^[^a-z]*$/; const M$2 = n$1(`$ZodCheck`, (e, t) => { var n; e._zod ??= {}, e._zod.def = t, (n = e._zod).onattach ?? (n.onattach = []); }); const st$1 = { number: `number`, bigint: `bigint`, object: `date` }; const ct$1 = n$1(`$ZodCheckLessThan`, (e, t) => { M$2.init(e, t); let n = st$1[typeof t.value]; e._zod.onattach.push((e) => { let n = e._zod.bag, r = (t.inclusive ? n.maximum : n.exclusiveMaximum) ?? Infinity; t.value < r && (t.inclusive ? n.maximum = t.value : n.exclusiveMaximum = t.value); }), e._zod.check = (r) => { (t.inclusive ? r.value <= t.value : r.value < t.value) || r.issues.push({ origin: n, code: `too_big`, maximum: typeof t.value == `object` ? t.value.getTime() : t.value, input: r.value, inclusive: t.inclusive, inst: e, continue: !t.abort }); }; }); const lt$1 = n$1(`$ZodCheckGreaterThan`, (e, t) => { M$2.init(e, t); let n = st$1[typeof t.value]; e._zod.onattach.push((e) => { let n = e._zod.bag, r = (t.inclusive ? n.minimum : n.exclusiveMinimum) ?? -Infinity; t.value > r && (t.inclusive ? n.minimum = t.value : n.exclusiveMinimum = t.value); }), e._zod.check = (r) => { (t.inclusive ? r.value >= t.value : r.value > t.value) || r.issues.push({ origin: n, code: `too_small`, minimum: typeof t.value == `object` ? t.value.getTime() : t.value, input: r.value, inclusive: t.inclusive, inst: e, continue: !t.abort }); }; }); const ut$1 = n$1(`$ZodCheckMultipleOf`, (e, t) => { M$2.init(e, t), e._zod.onattach.push((e) => { var n; (n = e._zod.bag).multipleOf ?? (n.multipleOf = t.value); }), e._zod.check = (n) => { if (typeof n.value != typeof t.value) throw Error(`Cannot mix number and bigint in multiple_of check.`); (typeof n.value == `bigint` ? n.value % t.value === BigInt(0) : f$2(n.value, t.value) === 0) || n.issues.push({ origin: typeof n.value, code: `not_multiple_of`, divisor: t.value, input: n.value, inst: e, continue: !t.abort }); }; }); const dt$1 = n$1(`$ZodCheckNumberFormat`, (e, t) => { M$2.init(e, t), t.format = t.format || `float64`; let n = t.format?.includes(`int`), r = n ? `int` : `number`, [i, a] = se$1[t.format]; e._zod.onattach.push((e) => { let r = e._zod.bag; r.format = t.format, r.minimum = i, r.maximum = a, n && (r.pattern = nt$1); }), e._zod.check = (o) => { let s = o.value; if (n) { if (!Number.isInteger(s)) { o.issues.push({ expected: r, format: t.format, code: `invalid_type`, continue: !1, input: s, inst: e }); return; } if (!Number.isSafeInteger(s)) { s > 0 ? o.issues.push({ input: s, code: `too_big`, maximum: 2 ** 53 - 1, note: `Integers must be within the safe integer range.`, inst: e, origin: r, inclusive: !0, continue: !t.abort }) : o.issues.push({ input: s, code: `too_small`, minimum: -(2 ** 53 - 1), note: `Integers must be within the safe integer range.`, inst: e, origin: r, inclusive: !0, continue: !t.abort }); return; } } s < i && o.issues.push({ origin: `number`, input: s, code: `too_small`, minimum: i, inclusive: !0, inst: e, continue: !t.abort }), s > a && o.issues.push({ origin: `number`, input: s, code: `too_big`, maximum: a, inclusive: !0, inst: e, continue: !t.abort }); }; }); const ft$1 = n$1(`$ZodCheckMaxLength`, (e, t) => { var n; M$2.init(e, t), (n = e._zod.def).when ?? (n.when = (e) => { let t = e.value; return !u$2(t) && t.length !== void 0; }), e._zod.onattach.push((e) => { let n = e._zod.bag.maximum ?? Infinity; t.maximum < n && (e._zod.bag.maximum = t.maximum); }), e._zod.check = (n) => { let r = n.value; if (r.length <= t.maximum) return; let i = E$2(r); n.issues.push({ origin: i, code: `too_big`, maximum: t.maximum, inclusive: !0, input: r, inst: e, continue: !t.abort }); }; }); const pt$1 = n$1(`$ZodCheckMinLength`, (e, t) => { var n; M$2.init(e, t), (n = e._zod.def).when ?? (n.when = (e) => { let t = e.value; return !u$2(t) && t.length !== void 0; }), e._zod.onattach.push((e) => { let n = e._zod.bag.minimum ?? -Infinity; t.minimum > n && (e._zod.bag.minimum = t.minimum); }), e._zod.check = (n) => { let r = n.value; if (r.length >= t.minimum) return; let i = E$2(r); n.issues.push({ origin: i, code: `too_small`, minimum: t.minimum, inclusive: !0, input: r, inst: e, continue: !t.abort }); }; }); const mt$1 = n$1(`$ZodCheckLengthEquals`, (e, t) => { var n; M$2.init(e, t), (n = e._zod.def).when ?? (n.when = (e) => { let t = e.value; return !u$2(t) && t.length !== void 0; }), e._zod.onattach.push((e) => { let n = e._zod.bag; n.minimum = t.length, n.maximum = t.length, n.length = t.length; }), e._zod.check = (n) => { let r = n.value, i = r.length; if (i === t.length) return; let a = E$2(r), o = i > t.length; n.issues.push({ origin: a, ...o ? { code: `too_big`, maximum: t.length } : { code: `too_small`, minimum: t.length }, inclusive: !0, exact: !0, input: n.value, inst: e, continue: !t.abort }); }; }); const N$2 = n$1(`$ZodCheckStringFormat`, (e, t) => { var n, r; M$2.init(e, t), e._zod.onattach.push((e) => { let n = e._zod.bag; n.format = t.format, t.pattern && (n.patterns ??= /* @__PURE__ */ new Set(), n.patterns.add(t.pattern)); }), t.pattern ? (n = e._zod).check ?? (n.check = (n) => { t.pattern.lastIndex = 0, !t.pattern.test(n.value) && n.issues.push({ origin: `string`, code: `invalid_format`, format: t.format, input: n.value, ...t.pattern ? { pattern: t.pattern.toString() } : {}, inst: e, continue: !t.abort }); }) : (r = e._zod).check ?? (r.check = () => {}); }); const ht$1 = n$1(`$ZodCheckRegex`, (e, t) => { N$2.init(e, t), e._zod.check = (n) => { t.pattern.lastIndex = 0, !t.pattern.test(n.value) && n.issues.push({ origin: `string`, code: `invalid_format`, format: `regex`, input: n.value, pattern: t.pattern.toString(), inst: e, continue: !t.abort }); }; }); const gt$1 = n$1(`$ZodCheckLowerCase`, (e, t) => { t.pattern ??= at$1, N$2.init(e, t); }); const _t$1 = n$1(`$ZodCheckUpperCase`, (e, t) => { t.pattern ??= ot$1, N$2.init(e, t); }); const vt$1 = n$1(`$ZodCheckIncludes`, (e, t) => { M$2.init(e, t); let n = y(t.includes), r = new RegExp(typeof t.position == `number` ? `^.{${t.position}}${n}` : n); t.pattern = r, e._zod.onattach.push((e) => { let t = e._zod.bag; t.patterns ??= /* @__PURE__ */ new Set(), t.patterns.add(r); }), e._zod.check = (n) => { n.value.includes(t.includes, t.position) || n.issues.push({ origin: `string`, code: `invalid_format`, format: `includes`, includes: t.includes, input: n.value, inst: e, continue: !t.abort }); }; }); const yt$1 = n$1(`$ZodCheckStartsWith`, (e, t) => { M$2.init(e, t); let n = RegExp(`^${y(t.prefix)}.*`); t.pattern ??= n, e._zod.onattach.push((e) => { let t = e._zod.bag; t.patterns ??= /* @__PURE__ */ new Set(), t.patterns.add(n); }), e._zod.check = (n) => { n.value.startsWith(t.prefix) || n.issues.push({ origin: `string`, code: `invalid_format`, format: `starts_with`, prefix: t.prefix, input: n.value, inst: e, continue: !t.abort }); }; }); const bt$1 = n$1(`$ZodCheckEndsWith`, (e, t) => { M$2.init(e, t); let n = RegExp(`.*${y(t.suffix)}$`); t.pattern ??= n, e._zod.onattach.push((e) => { let t = e._zod.bag; t.patterns ??= /* @__PURE__ */ new Set(), t.patterns.add(n); }), e._zod.check = (n) => { n.value.endsWith(t.suffix) || n.issues.push({ origin: `string`, code: `invalid_format`, format: `ends_with`, suffix: t.suffix, input: n.value, inst: e, continue: !t.abort }); }; }); const xt$1 = n$1(`$ZodCheckOverwrite`, (e, t) => { M$2.init(e, t), e._zod.check = (e) => { e.value = t.tx(e.value); }; }); var St$1 = class { constructor(e = []) { this.content = [], this.indent = 0, this && (this.args = e); } indented(e) { this.indent += 1, e(this), --this.indent; } write(e) { if (typeof e == `function`) { e(this, { execution: `sync` }), e(this, { execution: `async` }); return; } let t = e.split(` `).filter((e) => e), n = Math.min(...t.map((e) => e.length - e.trimStart().length)), r = t.map((e) => e.slice(n)).map((e) => ` `.repeat(this.indent * 2) + e); for (let e of r) this.content.push(e); } compile() { let e = Function, t = this?.args, n = [...(this?.content ?? [``]).map((e) => ` ${e}`)]; return new e(...t, n.join(` `)); } }; const Ct$1 = { major: 4, minor: 4, patch: 3 }; const P$2 = n$1(`$ZodType`, (e, t) => { var n; e ??= {}, e._zod.def = t, e._zod.bag = e._zod.bag || {}, e._zod.version = Ct$1; let i = [...e._zod.def.checks ?? []]; e._zod.traits.has(`$ZodCheck`) && i.unshift(e); for (let t of i) for (let n of t._zod.onattach) n(e); if (i.length === 0) (n = e._zod).deferred ?? (n.deferred = []), e._zod.deferred?.push(() => { e._zod.run = e._zod.parse; }); else { let t = (e, t, n) => { let i = S$1(e), a; for (let o of t) { if (o._zod.def.when) { if (he$1(e) || !o._zod.def.when(e)) continue; } else if (i) continue; let t = e.issues.length, s = o._zod.check(e); if (s instanceof Promise && n?.async === !1) throw new r$4(); if (a || s instanceof Promise) a = (a ?? Promise.resolve()).then(async () => { await s, e.issues.length !== t && (i ||= S$1(e, t)); }); else { if (e.issues.length === t) continue; i ||= S$1(e, t); } } return a ? a.then(() => e) : e; }, n = (n, a, o) => { if (S$1(n)) return n.aborted = !0, n; let s = t(a, i, o); if (s instanceof Promise) { if (o.async === !1) throw new r$4(); return s.then((t) => e._zod.parse(t, o)); } return e._zod.parse(s, o); }; e._zod.run = (a, o) => { if (o.skipChecks) return e._zod.parse(a, o); if (o.direction === `backward`) { let t = e._zod.parse({ value: a.value, issues: [] }, { ...o, skipChecks: !0 }); return t instanceof Promise ? t.then((e) => n(e, a, o)) : n(t, a, o); } let s = e._zod.parse(a, o); if (s instanceof Promise) { if (o.async === !1) throw new r$4(); return s.then((e) => t(e, i, o)); } return t(s, i, o); }; } m$1(e, `~standard`, () => ({ validate: (t) => { try { let n = xe$1(e, t); return n.success ? { value: n.data } : { issues: n.error?.issues }; } catch { return Se$1(e, t).then((e) => e.success ? { value: e.data } : { issues: e.error?.issues }); } }, vendor: `zod`, version: 1 })); }); const F$2 = n$1(`$ZodString`, (e, t) => { P$2.init(e, t), e._zod.pattern = [...e?._zod.bag?.patterns ?? []].pop() ?? tt$1(e._zod.bag), e._zod.parse = (n, r) => { if (t.coerce) try { n.value = String(n.value); } catch {} return typeof n.value == `string` || n.issues.push({ expected: `string`, code: `invalid_type`, input: n.value, inst: e }), n; }; }); const I$2 = n$1(`$ZodStringFormat`, (e, t) => { N$2.init(e, t), F$2.init(e, t); }); const wt$1 = n$1(`$ZodGUID`, (e, t) => { t.pattern ??= Re$1, I$2.init(e, t); }); const Tt$1 = n$1(`$ZodUUID`, (e, t) => { if (t.version) { let e = { v1: 1, v2: 2, v3: 3, v4: 4, v5: 5, v6: 6, v7: 7, v8: 8 }[t.version]; if (e === void 0) throw Error(`Invalid UUID version: "${t.version}"`); t.pattern ??= ze$1(e); } else t.pattern ??= ze$1(); I$2.init(e, t); }); const Et$1 = n$1(`$ZodEmail`, (e, t) => { t.pattern ??= Be$1, I$2.init(e, t); }); const Dt$1 = n$1(`$ZodURL`, (e, t) => { I$2.init(e, t), e._zod.check = (n) => { try { let r = n.value.trim(); if (!t.normalize && t.protocol?.source === Je$1.source && !/^https?:\/\//i.test(r)) { n.issues.push({ code: `invalid_format`, format: `url`, note: `Invalid URL format`, input: n.value, inst: e, continue: !t.abort }); return; } let i = new URL(r); t.hostname && (t.hostname.lastIndex = 0, t.hostname.test(i.hostname) || n.issues.push({ code: `invalid_format`, format: `url`, note: `Invalid hostname`, pattern: t.hostname.source, input: n.value, inst: e, continue: !t.abort })), t.protocol && (t.protocol.lastIndex = 0, t.protocol.test(i.protocol.endsWith(`:`) ? i.protocol.slice(0, -1) : i.protocol) || n.issues.push({ code: `invalid_format`, format: `url`, note: `Invalid protocol`, pattern: t.protocol.source, input: n.value, inst: e, continue: !t.abort })), t.normalize ? n.value = i.href : n.value = r; return; } catch { n.issues.push({ code: `invalid_format`, format: `url`, input: n.value, inst: e, continue: !t.abort }); } }; }); const Ot$1 = n$1(`$ZodEmoji`, (e, t) => { t.pattern ??= Ve$1(), I$2.init(e, t); }); const kt$1 = n$1(`$ZodNanoID`, (e, t) => { t.pattern ??= Ie$1, I$2.init(e, t); }); const At$1 = n$1(`$ZodCUID`, (e, t) => { t.pattern ??= je$1, I$2.init(e, t); }); const jt$1 = n$1(`$ZodCUID2`, (e, t) => { t.pattern ??= Me$1, I$2.init(e, t); }); const Mt$1 = n$1(`$ZodULID`, (e, t) => { t.pattern ??= Ne$1, I$2.init(e, t); }); const Nt$1 = n$1(`$ZodXID`, (e, t) => { t.pattern ??= Pe$1, I$2.init(e, t); }); const Pt$1 = n$1(`$ZodKSUID`, (e, t) => { t.pattern ??= Fe$1, I$2.init(e, t); }); const Ft$1 = n$1(`$ZodISODateTime`, (e, t) => { t.pattern ??= et$1(t), I$2.init(e, t); }); const It$1 = n$1(`$ZodISODate`, (e, t) => { t.pattern ??= Ze$1, I$2.init(e, t); }); const Lt$1 = n$1(`$ZodISOTime`, (e, t) => { t.pattern ??= $e$1(t), I$2.init(e, t); }); const Rt$1 = n$1(`$ZodISODuration`, (e, t) => { t.pattern ??= Le$1, I$2.init(e, t); }); const zt$1 = n$1(`$ZodIPv4`, (e, t) => { t.pattern ??= He$1, I$2.init(e, t), e._zod.bag.format = `ipv4`; }); const Bt$1 = n$1(`$ZodIPv6`, (e, t) => { t.pattern ??= Ue$1, I$2.init(e, t), e._zod.bag.format = `ipv6`, e._zod.check = (n) => { try { new URL(`http://[${n.value}]`); } catch { n.issues.push({ code: `invalid_format`, format: `ipv6`, input: n.value, inst: e, continue: !t.abort }); } }; }); const Vt$1 = n$1(`$ZodCIDRv4`, (e, t) => { t.pattern ??= We$1, I$2.init(e, t); }); const Ht$1 = n$1(`$ZodCIDRv6`, (e, t) => { t.pattern ??= Ge$1, I$2.init(e, t), e._zod.check = (n) => { let r = n.value.split(`/`); try { if (r.length !== 2) throw Error(); let [e, t] = r; if (!t) throw Error(); let n = Number(t); if (`${n}` !== t || n < 0 || n > 128) throw Error(); new URL(`http://[${e}]`); } catch { n.issues.push({ code: `invalid_format`, format: `cidrv6`, input: n.value, inst: e, continue: !t.abort }); } }; }); function Ut$1(e) { if (e === ``) return !0; if (/\s/.test(e) || e.length % 4 != 0) return !1; try { return atob(e), !0; } catch { return !1; } } const Wt$1 = n$1(`$ZodBase64`, (e, t) => { t.pattern ??= Ke$1, I$2.init(e, t), e._zod.bag.contentEncoding = `base64`, e._zod.check = (n) => { Ut$1(n.value) || n.issues.push({ code: `invalid_format`, format: `base64`, input: n.value, inst: e, continue: !t.abort }); }; }); function Gt$1(e) { if (!qe$1.test(e)) return !1; let t = e.replace(/[-_]/g, (e) => e === `-` ? `+` : `/`); return Ut$1(t.padEnd(Math.ceil(t.length / 4) * 4, `=`)); } const Kt$1 = n$1(`$ZodBase64URL`, (e, t) => { t.pattern ??= qe$1, I$2.init(e, t), e._zod.bag.contentEncoding = `base64url`, e._zod.check = (n) => { Gt$1(n.value) || n.issues.push({ code: `invalid_format`, format: `base64url`, input: n.value, inst: e, continue: !t.abort }); }; }); const qt$1 = n$1(`$ZodE164`, (e, t) => { t.pattern ??= Ye$1, I$2.init(e, t); }); function Jt$1(e, t = null) { try { let n = e.split(`.`); if (n.length !== 3) return !1; let [r] = n; if (!r) return !1; let i = JSON.parse(atob(r)); return !(`typ` in i && i?.typ !== `JWT` || !i.alg || t && (!(`alg` in i) || i.alg !== t)); } catch { return !1; } } const Yt$1 = n$1(`$ZodJWT`, (e, t) => { I$2.init(e, t), e._zod.check = (n) => { Jt$1(n.value, t.alg) || n.issues.push({ code: `invalid_format`, format: `jwt`, input: n.value, inst: e, continue: !t.abort }); }; }); const Xt$1 = n$1(`$ZodNumber`, (e, t) => { P$2.init(e, t), e._zod.pattern = e._zod.bag.pattern ?? rt$1, e._zod.parse = (n, r) => { if (t.coerce) try { n.value = Number(n.value); } catch {} let i = n.value; if (typeof i == `number` && !Number.isNaN(i) && Number.isFinite(i)) return n; let a = typeof i == `number` ? Number.isNaN(i) ? `NaN` : Number.isFinite(i) ? void 0 : `Infinity` : void 0; return n.issues.push({ expected: `number`, code: `invalid_type`, input: i, inst: e, ...a ? { received: a } : {} }), n; }; }); const Zt$1 = n$1(`$ZodNumberFormat`, (e, t) => { dt$1.init(e, t), Xt$1.init(e, t); }); const Qt$1 = n$1(`$ZodBoolean`, (e, t) => { P$2.init(e, t), e._zod.pattern = it$1, e._zod.parse = (n, r) => { if (t.coerce) try { n.value = !!n.value; } catch {} let i = n.value; return typeof i == `boolean` || n.issues.push({ expected: `boolean`, code: `invalid_type`, input: i, inst: e }), n; }; }); const $t$1 = n$1(`$ZodAny`, (e, t) => { P$2.init(e, t), e._zod.parse = (e) => e; }); const en$1 = n$1(`$ZodUnknown`, (e, t) => { P$2.init(e, t), e._zod.parse = (e) => e; }); const tn$1 = n$1(`$ZodNever`, (e, t) => { P$2.init(e, t), e._zod.parse = (t, n) => (t.issues.push({ expected: `never`, code: `invalid_type`, input: t.value, inst: e }), t); }); function nn$1(e, t, n) { e.issues.length && t.issues.push(...C$2(n, e.issues)), t.value[n] = e.value; } const rn$1 = n$1(`$ZodArray`, (e, t) => { P$2.init(e, t), e._zod.parse = (n, r) => { let i = n.value; if (!Array.isArray(i)) return n.issues.push({ expected: `array`, code: `invalid_type`, input: i, inst: e }), n; n.value = Array(i.length); let a = []; for (let e = 0; e < i.length; e++) { let o = i[e], s = t.element._zod.run({ value: o, issues: [] }, r); s instanceof Promise ? a.push(s.then((t) => nn$1(t, n, e))) : nn$1(s, n, e); } return a.length ? Promise.all(a).then(() => n) : n; }; }); function L$2(e, t, n, r, i, a) { let o = n in r; if (e.issues.length) { if (i && a && !o) return; t.issues.push(...C$2(n, e.issues)); } if (!o && !i) { e.issues.length || t.issues.push({ code: `invalid_type`, expected: `nonoptional`, input: void 0, path: [n] }); return; } e.value === void 0 ? o && (t.value[n] = void 0) : t.value[n] = e.value; } function an$1(e) { let t = Object.keys(e.shape); for (let n of t) if (!e.shape?.[n]?._zod?.traits?.has(`$ZodType`)) throw Error(`Invalid element at key "${n}": expected a Zod schema`); let n = oe$1(e.shape); return { ...e, keys: t, keySet: new Set(t), numKeys: t.length, optionalKeys: new Set(n) }; } function on$1(e, t, n, r, i, a) { let o = [], s = i.keySet, c = i.catchall._zod, l = c.def.type, u = c.optin === `optional`, d = c.optout === `optional`; for (let i in t) { if (i === `__proto__` || s.has(i)) continue; if (l === `never`) { o.push(i); continue; } let a = c.run({ value: t[i], issues: [] }, r); a instanceof Promise ? e.push(a.then((e) => L$2(e, n, i, t, u, d))) : L$2(a, n, i, t, u, d); } return o.length && n.issues.push({ code: `unrecognized_keys`, keys: o, input: t, inst: a }), e.length ? Promise.all(e).then(() => n) : n; } const sn$1 = n$1(`$ZodObject`, (e, t) => { if (P$2.init(e, t), !Object.getOwnPropertyDescriptor(t, `shape`)?.get) { let e = t.shape; Object.defineProperty(t, "shape", { get: () => { let n = { ...e }; return Object.defineProperty(t, "shape", { value: n }), n; } }); } let n = l$2(() => an$1(t)); m$1(e._zod, `propValues`, () => { let e = t.shape, n = {}; for (let t in e) { let r = e[t]._zod; if (r.values) { n[t] ?? (n[t] = /* @__PURE__ */ new Set()); for (let e of r.values) n[t].add(e); } } return n; }); let r = _$1, i = t.catchall, a; e._zod.parse = (t, o) => { a ??= n.value; let s = t.value; if (!r(s)) return t.issues.push({ expected: `object`, code: `invalid_type`, input: s, inst: e }), t; t.value = {}; let c = [], l = a.shape; for (let e of a.keys) { let n = l[e], r = n._zod.optin === `optional`, i = n._zod.optout === `optional`, a = n._zod.run({ value: s[e], issues: [] }, o); a instanceof Promise ? c.push(a.then((n) => L$2(n, t, e, s, r, i))) : L$2(a, t, e, s, r, i); } return i ? on$1(c, s, t, o, n.value, e) : c.length ? Promise.all(c).then(() => t) : t; }; }); const cn$1 = n$1(`$ZodObjectJIT`, (e, t) => { sn$1.init(e, t); let n = e._zod.parse, r = l$2(() => an$1(t)), i = (e) => { let t = new St$1([ `shape`, `payload`, `ctx` ]), n = r.value, i = (e) => { let t = ee$3(e); return `shape[${t}]._zod.run({ value: input[${t}], issues: [] }, ctx)`; }; t.write(`const input = payload.value;`); let a = Object.create(null), o = 0; for (let e of n.keys) a[e] = `key_${o++}`; t.write(`const newResult = {};`); for (let r of n.keys) { let n = a[r], o = ee$3(r), s = e[r], c = s?._zod?.optin === `optional`, l = s?._zod?.optout === `optional`; t.write(`const ${n} = ${i(r)};`), c && l ? t.write(` if (${n}.issues.length) { if (${o} in input) { payload.issues = payload.issues.concat(${n}.issues.map(iss => ({ ...iss, path: iss.path ? [${o}, ...iss.path] : [${o}] }))); } } if (${n}.value === undefined) { if (${o} in input) { newResult[${o}] = undefined; } } else { newResult[${o}] = ${n}.value; } `) : c ? t.write(` if (${n}.issues.length) { payload.issues = payload.issues.concat(${n}.issues.map(iss => ({ ...iss, path: iss.path ? [${o}, ...iss.path] : [${o}] }))); } if (${n}.value === undefined) { if (${o} in input) { newResult[${o}] = undefined; } } else { newResult[${o}] = ${n}.value; } `) : t.write(` const ${n}_present = ${o} in input; if (${n}.issues.length) { payload.issues = payload.issues.concat(${n}.issues.map(iss => ({ ...iss, path: iss.path ? [${o}, ...iss.path] : [${o}] }))); } if (!${n}_present && !${n}.issues.length) { payload.issues.push({ code: "invalid_type", expected: "nonoptional", input: undefined, path: [${o}] }); } if (${n}_present) { if (${n}.value === undefined) { newResult[${o}] = undefined; } else { newResult[${o}] = ${n}.value; } } `); } t.write(`payload.value = newResult;`), t.write(`return payload;`); let s = t.compile(); return (t, n) => s(e, t, n); }, o, s = _$1, c = !a$2.jitless, u = c && re$2.value, d = t.catchall, f; e._zod.parse = (a, l) => { f ??= r.value; let p = a.value; return s(p) ? c && u && l?.async === !1 && l.jitless !== !0 ? (o ||= i(t.shape), a = o(a, l), d ? on$1([], p, a, l, f, e) : a) : n(a, l) : (a.issues.push({ expected: `object`, code: `invalid_type`, input: p, inst: e }), a); }; }); function ln$1(e, t, n, r) { for (let n of e) if (n.issues.length === 0) return t.value = n.value, t; let i = e.filter((e) => !S$1(e)); return i.length === 1 ? (t.value = i[0].value, i[0]) : (t.issues.push({ code: `invalid_union`, input: t.value, inst: n, errors: e.map((e) => e.issues.map((e) => T$2(e, r, o$2()))) }), t); } const un$1 = n$1(`$ZodUnion`, (e, t) => { P$2.init(e, t), m$1(e._zod, `optin`, () => t.options.some((e) => e._zod.optin === `optional`) ? `optional` : void 0), m$1(e._zod, `optout`, () => t.options.some((e) => e._zod.optout === `optional`) ? `optional` : void 0), m$1(e._zod, `values`, () => { if (t.options.every((e) => e._zod.values)) return new Set(t.options.flatMap((e) => Array.from(e._zod.values))); }), m$1(e._zod, `pattern`, () => { if (t.options.every((e) => e._zod.pattern)) { let e = t.options.map((e) => e._zod.pattern); return RegExp(`^(${e.map((e) => d$2(e.source)).join(`|`)})$`); } }); let n = t.options.length === 1 ? t.options[0]._zod.run : null; e._zod.parse = (r, i) => { if (n) return n(r, i); let a = !1, o = []; for (let e of t.options) { let t = e._zod.run({ value: r.value, issues: [] }, i); if (t instanceof Promise) o.push(t), a = !0; else { if (t.issues.length === 0) return t; o.push(t); } } return a ? Promise.all(o).then((t) => ln$1(t, r, e, i)) : ln$1(o, r, e, i); }; }); const dn$1 = n$1(`$ZodDiscriminatedUnion`, (e, t) => { t.inclusive = !1, un$1.init(e, t); let n = e._zod.parse; m$1(e._zod, `propValues`, () => { let e = {}; for (let n of t.options) { let r = n._zod.propValues; if (!r || Object.keys(r).length === 0) throw Error(`Invalid discriminated union option at index "${t.options.indexOf(n)}"`); for (let [t, n] of Object.entries(r)) { e[t] || (e[t] = /* @__PURE__ */ new Set()); for (let r of n) e[t].add(r); } } return e; }); let r = l$2(() => { let e = t.options, n = /* @__PURE__ */ new Map(); for (let r of e) { let e = r._zod.propValues?.[t.discriminator]; if (!e || e.size === 0) throw Error(`Invalid discriminated union option at index "${t.options.indexOf(r)}"`); for (let t of e) { if (n.has(t)) throw Error(`Duplicate discriminator value "${String(t)}"`); n.set(t, r); } } return n; }); e._zod.parse = (i, a) => { let o = i.value; if (!_$1(o)) return i.issues.push({ code: `invalid_type`, expected: `object`, input: o, inst: e }), i; let s = r.value.get(o?.[t.discriminator]); return s ? s._zod.run(i, a) : t.unionFallback || a.direction === `backward` ? n(i, a) : (i.issues.push({ code: `invalid_union`, errors: [], note: `No matching discriminator`, discriminator: t.discriminator, options: Array.from(r.value.keys()), input: o, path: [t.discriminator], inst: e }), i); }; }); const fn$1 = n$1(`$ZodIntersection`, (e, t) => { P$2.init(e, t), e._zod.parse = (e, n) => { let r = e.value, i = t.left._zod.run({ value: r, issues: [] }, n), a = t.right._zod.run({ value: r, issues: [] }, n); return i instanceof Promise || a instanceof Promise ? Promise.all([i, a]).then(([t, n]) => pn$1(e, t, n)) : pn$1(e, i, a); }; }); function R$2(e, t) { if (e === t || e instanceof Date && t instanceof Date && +e == +t) return { valid: !0, data: e }; if (v$2(e) && v$2(t)) { let n = Object.keys(t), r = Object.keys(e).filter((e) => n.indexOf(e) !== -1), i = { ...e, ...t }; for (let n of r) { let r = R$2(e[n], t[n]); if (!r.valid) return { valid: !1, mergeErrorPath: [n, ...r.mergeErrorPath] }; i[n] = r.data; } return { valid: !0, data: i }; } if (Array.isArray(e) && Array.isArray(t)) { if (e.length !== t.length) return { valid: !1, mergeErrorPath: [] }; let n = []; for (let r = 0; r < e.length; r++) { let i = e[r], a = t[r], o = R$2(i, a); if (!o.valid) return { valid: !1, mergeErrorPath: [r, ...o.mergeErrorPath] }; n.push(o.data); } return { valid: !0, data: n }; } return { valid: !1, mergeErrorPath: [] }; } function pn$1(e, t, n) { let r = /* @__PURE__ */ new Map(), i; for (let n of t.issues) if (n.code === `unrecognized_keys`) { i ??= n; for (let e of n.keys) r.has(e) || r.set(e, {}), r.get(e).l = !0; } else e.issues.push(n); for (let t of n.issues) if (t.code === `unrecognized_keys`) for (let e of t.keys) r.has(e) || r.set(e, {}), r.get(e).r = !0; else e.issues.push(t); let a = [...r].filter(([, e]) => e.l && e.r).map(([e]) => e); if (a.length && i && e.issues.push({ ...i, keys: a }), S$1(e)) return e; let o = R$2(t.value, n.value); if (!o.valid) throw Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`); return e.value = o.data, e; } const mn$1 = n$1(`$ZodRecord`, (e, t) => { P$2.init(e, t), e._zod.parse = (n, r) => { let i = n.value; if (!v$2(i)) return n.issues.push({ expected: `record`, code: `invalid_type`, input: i, inst: e }), n; let a = [], s = t.keyType._zod.values; if (s) { n.value = {}; let c = /* @__PURE__ */ new Set(); for (let l of s) if (typeof l == `string` || typeof l == `number` || typeof l == `symbol`) { c.add(typeof l == `number` ? l.toString() : l); let s = t.keyType._zod.run({ value: l, issues: [] }, r); if (s instanceof Promise) throw Error(`Async schemas not supported in object keys currently`); if (s.issues.length) { n.issues.push({ code: `invalid_key`, origin: `record`, issues: s.issues.map((e) => T$2(e, r, o$2())), input: l, path: [l], inst: e }); continue; } let u = s.value, d = t.valueType._zod.run({ value: i[l], issues: [] }, r); d instanceof Promise ? a.push(d.then((e) => { e.issues.length && n.issues.push(...C$2(l, e.issues)), n.value[u] = e.value; })) : (d.issues.length && n.issues.push(...C$2(l, d.issues)), n.value[u] = d.value); } let l; for (let e in i) c.has(e) || (l ??= [], l.push(e)); l && l.length > 0 && n.issues.push({ code: `unrecognized_keys`, input: i, inst: e, keys: l }); } else { n.value = {}; for (let s of Reflect.ownKeys(i)) { if (s === `__proto__` || !Object.prototype.propertyIsEnumerable.call(i, s)) continue; let c = t.keyType._zod.run({ value: s, issues: [] }, r); if (c instanceof Promise) throw Error(`Async schemas not supported in object keys currently`); if (typeof s == `string` && rt$1.test(s) && c.issues.length) { let e = t.keyType._zod.run({ value: Number(s), issues: [] }, r); if (e instanceof Promise) throw Error(`Async schemas not supported in object keys currently`); e.issues.length === 0 && (c = e); } if (c.issues.length) { t.mode === `loose` ? n.value[s] = i[s] : n.issues.push({ code: `invalid_key`, origin: `record`, issues: c.issues.map((e) => T$2(e, r, o$2())), input: s, path: [s], inst: e }); continue; } let l = t.valueType._zod.run({ value: i[s], issues: [] }, r); l instanceof Promise ? a.push(l.then((e) => { e.issues.length && n.issues.push(...C$2(s, e.issues)), n.value[c.value] = e.value; })) : (l.issues.length && n.issues.push(...C$2(s, l.issues)), n.value[c.value] = l.value); } } return a.length ? Promise.all(a).then(() => n) : n; }; }); const hn$1 = n$1(`$ZodEnum`, (e, t) => { P$2.init(e, t); let n = s$2(t.entries), r = new Set(n); e._zod.values = r, e._zod.pattern = RegExp(`^(${n.filter((e) => ae$2.has(typeof e)).map((e) => typeof e == `string` ? y(e) : e.toString()).join(`|`)})$`), e._zod.parse = (t, i) => { let a = t.value; return r.has(a) || t.issues.push({ code: `invalid_value`, values: n, input: a, inst: e }), t; }; }); const gn$1 = n$1(`$ZodLiteral`, (e, t) => { if (P$2.init(e, t), t.values.length === 0) throw Error(`Cannot create literal schema with no valid values`); let n = new Set(t.values); e._zod.values = n, e._zod.pattern = RegExp(`^(${t.values.map((e) => typeof e == `string` ? y(e) : e ? y(e.toString()) : String(e)).join(`|`)})$`), e._zod.parse = (r, i) => { let a = r.value; return n.has(a) || r.issues.push({ code: `invalid_value`, values: t.values, input: a, inst: e }), r; }; }); const _n$1 = n$1(`$ZodTransform`, (e, t) => { P$2.init(e, t), e._zod.optin = `optional`, e._zod.parse = (n, a) => { if (a.direction === `backward`) throw new i$2(e.constructor.name); let o = t.transform(n.value, n); if (a.async) return (o instanceof Promise ? o : Promise.resolve(o)).then((e) => (n.value = e, n.fallback = !0, n)); if (o instanceof Promise) throw new r$4(); return n.value = o, n.fallback = !0, n; }; }); function vn$1(e, t) { return t === void 0 && (e.issues.length || e.fallback) ? { issues: [], value: void 0 } : e; } const yn$1 = n$1(`$ZodOptional`, (e, t) => { P$2.init(e, t), e._zod.optin = `optional`, e._zod.optout = `optional`, m$1(e._zod, `values`, () => t.innerType._zod.values ? /* @__PURE__ */ new Set([...t.innerType._zod.values, void 0]) : void 0), m$1(e._zod, `pattern`, () => { let e = t.innerType._zod.pattern; return e ? RegExp(`^(${d$2(e.source)})?$`) : void 0; }), e._zod.parse = (e, n) => { if (t.innerType._zod.optin === `optional`) { let r = e.value, i = t.innerType._zod.run(e, n); return i instanceof Promise ? i.then((e) => vn$1(e, r)) : vn$1(i, r); } return e.value === void 0 ? e : t.innerType._zod.run(e, n); }; }); const bn$1 = n$1(`$ZodExactOptional`, (e, t) => { yn$1.init(e, t), m$1(e._zod, `values`, () => t.innerType._zod.values), m$1(e._zod, `pattern`, () => t.innerType._zod.pattern), e._zod.parse = (e, n) => t.innerType._zod.run(e, n); }); const xn$1 = n$1(`$ZodNullable`, (e, t) => { P$2.init(e, t), m$1(e._zod, `optin`, () => t.innerType._zod.optin), m$1(e._zod, `optout`, () => t.innerType._zod.optout), m$1(e._zod, `pattern`, () => { let e = t.innerType._zod.pattern; return e ? RegExp(`^(${d$2(e.source)}|null)$`) : void 0; }), m$1(e._zod, `values`, () => t.innerType._zod.values ? /* @__PURE__ */ new Set([...t.innerType._zod.values, null]) : void 0), e._zod.parse = (e, n) => e.value === null ? e : t.innerType._zod.run(e, n); }); const Sn$1 = n$1(`$ZodDefault`, (e, t) => { P$2.init(e, t), e._zod.optin = `optional`, m$1(e._zod, `values`, () => t.innerType._zod.values), e._zod.parse = (e, n) => { if (n.direction === `backward`) return t.innerType._zod.run(e, n); if (e.value === void 0) return e.value = t.defaultValue, e; let r = t.innerType._zod.run(e, n); return r instanceof Promise ? r.then((e) => Cn$1(e, t)) : Cn$1(r, t); }; }); function Cn$1(e, t) { return e.value === void 0 && (e.value = t.defaultValue), e; } const wn$1 = n$1(`$ZodPrefault`, (e, t) => { P$2.init(e, t), e._zod.optin = `optional`, m$1(e._zod, `values`, () => t.innerType._zod.values), e._zod.parse = (e, n) => (n.direction === `backward` || e.value === void 0 && (e.value = t.defaultValue), t.innerType._zod.run(e, n)); }); const Tn$1 = n$1(`$ZodNonOptional`, (e, t) => { P$2.init(e, t), m$1(e._zod, `values`, () => { let e = t.innerType._zod.values; return e ? new Set([...e].filter((e) => e !== void 0)) : void 0; }), e._zod.parse = (n, r) => { let i = t.innerType._zod.run(n, r); return i instanceof Promise ? i.then((t) => En$1(t, e)) : En$1(i, e); }; }); function En$1(e, t) { return !e.issues.length && e.value === void 0 && e.issues.push({ code: `invalid_type`, expected: `nonoptional`, input: e.value, inst: t }), e; } const Dn$1 = n$1(`$ZodCatch`, (e, t) => { P$2.init(e, t), e._zod.optin = `optional`, m$1(e._zod, `optout`, () => t.innerType._zod.optout), m$1(e._zod, `values`, () => t.innerType._zod.values), e._zod.parse = (e, n) => { if (n.direction === `backward`) return t.innerType._zod.run(e, n); let r = t.innerType._zod.run(e, n); return r instanceof Promise ? r.then((r) => (e.value = r.value, r.issues.length && (e.value = t.catchValue({ ...e, error: { issues: r.issues.map((e) => T$2(e, n, o$2())) }, input: e.value }), e.issues = [], e.fallback = !0), e)) : (e.value = r.value, r.issues.length && (e.value = t.catchValue({ ...e, error: { issues: r.issues.map((e) => T$2(e, n, o$2())) }, input: e.value }), e.issues = [], e.fallback = !0), e); }; }); const On$1 = n$1(`$ZodPipe`, (e, t) => { P$2.init(e, t), m$1(e._zod, `values`, () => t.in._zod.values), m$1(e._zod, `optin`, () => t.in._zod.optin), m$1(e._zod, `optout`, () => t.out._zod.optout), m$1(e._zod, `propValues`, () => t.in._zod.propValues), e._zod.parse = (e, n) => { if (n.direction === `backward`) { let r = t.out._zod.run(e, n); return r instanceof Promise ? r.then((e) => z$2(e, t.in, n)) : z$2(r, t.in, n); } let r = t.in._zod.run(e, n); return r instanceof Promise ? r.then((e) => z$2(e, t.out, n)) : z$2(r, t.out, n); }; }); function z$2(e, t, n) { return e.issues.length ? (e.aborted = !0, e) : t._zod.run({ value: e.value, issues: e.issues, fallback: e.fallback }, n); } const kn$1 = n$1(`$ZodReadonly`, (e, t) => { P$2.init(e, t), m$1(e._zod, `propValues`, () => t.innerType._zod.propValues), m$1(e._zod, `values`, () => t.innerType._zod.values), m$1(e._zod, `optin`, () => t.innerType?._zod?.optin), m$1(e._zod, `optout`, () => t.innerType?._zod?.optout), e._zod.parse = (e, n) => { if (n.direction === `backward`) return t.innerType._zod.run(e, n); let r = t.innerType._zod.run(e, n); return r instanceof Promise ? r.then(An$1) : An$1(r); }; }); function An$1(e) { return e.value = Object.freeze(e.value), e; } const jn$1 = n$1(`$ZodCustom`, (e, t) => { M$2.init(e, t), P$2.init(e, t), e._zod.parse = (e, t) => e, e._zod.check = (n) => { let r = n.value, i = t.fn(r); if (i instanceof Promise) return i.then((t) => Mn$1(t, n, r, e)); Mn$1(i, n, r, e); }; }); function Mn$1(e, t, n, r) { if (!e) { let e = { code: `custom`, input: n, inst: r, path: [...r._zod.def.path ?? []], continue: !r._zod.def.abort }; r._zod.def.params && (e.params = r._zod.def.params), t.issues.push(D$1(e)); } } var Nn$1; var Pn$1 = class { constructor() { this._map = /* @__PURE__ */ new WeakMap(), this._idmap = /* @__PURE__ */ new Map(); } add(e, ...t) { let n = t[0]; return this._map.set(e, n), n && typeof n == `object` && `id` in n && this._idmap.set(n.id, e), this; } clear() { return this._map = /* @__PURE__ */ new WeakMap(), this._idmap = /* @__PURE__ */ new Map(), this; } remove(e) { let t = this._map.get(e); return t && typeof t == `object` && `id` in t && this._idmap.delete(t.id), this._map.delete(e), this; } get(e) { let t = e._zod.parent; if (t) { let n = { ...this.get(t) ?? {} }; delete n.id; let r = { ...n, ...this._map.get(e) }; return Object.keys(r).length ? r : void 0; } return this._map.get(e); } has(e) { return this._map.has(e); } }; function Fn$1() { return new Pn$1(); } (Nn$1 = globalThis).__zod_globalRegistry ?? (Nn$1.__zod_globalRegistry = Fn$1()); const B$2 = globalThis.__zod_globalRegistry; function In$1(e, t) { return new e({ type: `string`, ...x$1(t) }); } function Ln$1(e, t) { return new e({ type: `string`, format: `email`, check: `string_format`, abort: !1, ...x$1(t) }); } function Rn$1(e, t) { return new e({ type: `string`, format: `guid`, check: `string_format`, abort: !1, ...x$1(t) }); } function zn$1(e, t) { return new e({ type: `string`, format: `uuid`, check: `string_format`, abort: !1, ...x$1(t) }); } function Bn$1(e, t) { return new e({ type: `string`, format: `uuid`, check: `string_format`, abort: !1, version: `v4`, ...x$1(t) }); } function Vn$1(e, t) { return new e({ type: `string`, format: `uuid`, check: `string_format`, abort: !1, version: `v6`, ...x$1(t) }); } function Hn$1(e, t) { return new e({ type: `string`, format: `uuid`, check: `string_format`, abort: !1, version: `v7`, ...x$1(t) }); } function Un$1(e, t) { return new e({ type: `string`, format: `url`, check: `string_format`, abort: !1, ...x$1(t) }); } function Wn$1(e, t) { return new e({ type: `string`, format: `emoji`, check: `string_format`, abort: !1, ...x$1(t) }); } function Gn$1(e, t) { return new e({ type: `string`, format: `nanoid`, check: `string_format`, abort: !1, ...x$1(t) }); } function Kn$1(e, t) { return new e({ type: `string`, format: `cuid`, check: `string_format`, abort: !1, ...x$1(t) }); } function qn$1(e, t) { return new e({ type: `string`, format: `cuid2`, check: `string_format`, abort: !1, ...x$1(t) }); } function Jn$1(e, t) { return new e({ type: `string`, format: `ulid`, check: `string_format`, abort: !1, ...x$1(t) }); } function Yn$1(e, t) { return new e({ type: `string`, format: `xid`, check: `string_format`, abort: !1, ...x$1(t) }); } function Xn$2(e, t) { return new e({ type: `string`, format: `ksuid`, check: `string_format`, abort: !1, ...x$1(t) }); } function Zn$1(e, t) { return new e({ type: `string`, format: `ipv4`, check: `string_format`, abort: !1, ...x$1(t) }); } function Qn$1(e, t) { return new e({ type: `string`, format: `ipv6`, check: `string_format`, abort: !1, ...x$1(t) }); } function $n$1(e, t) { return new e({ type: `string`, format: `cidrv4`, check: `string_format`, abort: !1, ...x$1(t) }); } function er$1(e, t) { return new e({ type: `string`, format: `cidrv6`, check: `string_format`, abort: !1, ...x$1(t) }); } function tr$1(e, t) { return new e({ type: `string`, format: `base64`, check: `string_format`, abort: !1, ...x$1(t) }); } function nr$1(e, t) { return new e({ type: `string`, format: `base64url`, check: `string_format`, abort: !1, ...x$1(t) }); } function rr$1(e, t) { return new e({ type: `string`, format: `e164`, check: `string_format`, abort: !1, ...x$1(t) }); } function ir$1(e, t) { return new e({ type: `string`, format: `jwt`, check: `string_format`, abort: !1, ...x$1(t) }); } function ar$1(e, t) { return new e({ type: `string`, format: `datetime`, check: `string_format`, offset: !1, local: !1, precision: null, ...x$1(t) }); } function or$1(e, t) { return new e({ type: `string`, format: `date`, check: `string_format`, ...x$1(t) }); } function sr$1(e, t) { return new e({ type: `string`, format: `time`, check: `string_format`, precision: null, ...x$1(t) }); } function cr$1(e, t) { return new e({ type: `string`, format: `duration`, check: `string_format`, ...x$1(t) }); } function lr$1(e, t) { return new e({ type: `number`, checks: [], ...x$1(t) }); } function ur$1(e, t) { return new e({ type: `number`, check: `number_format`, abort: !1, format: `safeint`, ...x$1(t) }); } function dr$1(e, t) { return new e({ type: `boolean`, ...x$1(t) }); } function fr$1(e) { return new e({ type: `any` }); } function pr$2(e) { return new e({ type: `unknown` }); } function mr$1(e, t) { return new e({ type: `never`, ...x$1(t) }); } function hr$1(e, t) { return new ct$1({ check: `less_than`, ...x$1(t), value: e, inclusive: !1 }); } function V$2(e, t) { return new ct$1({ check: `less_than`, ...x$1(t), value: e, inclusive: !0 }); } function gr$1(e, t) { return new lt$1({ check: `greater_than`, ...x$1(t), value: e, inclusive: !1 }); } function H$2(e, t) { return new lt$1({ check: `greater_than`, ...x$1(t), value: e, inclusive: !0 }); } function _r$1(e, t) { return new ut$1({ check: `multiple_of`, ...x$1(t), value: e }); } function vr$1(e, t) { return new ft$1({ check: `max_length`, ...x$1(t), maximum: e }); } function U$2(e, t) { return new pt$1({ check: `min_length`, ...x$1(t), minimum: e }); } function yr$1(e, t) { return new mt$1({ check: `length_equals`, ...x$1(t), length: e }); } function br$1(e, t) { return new ht$1({ check: `string_format`, format: `regex`, ...x$1(t), pattern: e }); } function xr$1(e) { return new gt$1({ check: `string_format`, format: `lowercase`, ...x$1(e) }); } function Sr$1(e) { return new _t$1({ check: `string_format`, format: `uppercase`, ...x$1(e) }); } function Cr$1(e, t) { return new vt$1({ check: `string_format`, format: `includes`, ...x$1(t), includes: e }); } function wr$1(e, t) { return new yt$1({ check: `string_format`, format: `starts_with`, ...x$1(t), prefix: e }); } function Tr$1(e, t) { return new bt$1({ check: `string_format`, format: `ends_with`, ...x$1(t), suffix: e }); } function W$2(e) { return new xt$1({ check: `overwrite`, tx: e }); } function Er$1(e) { return W$2((t) => t.normalize(e)); } function Dr$1() { return W$2((e) => e.trim()); } function Or$1() { return W$2((e) => e.toLowerCase()); } function kr$1() { return W$2((e) => e.toUpperCase()); } function Ar$1() { return W$2((e) => te$2(e)); } function jr$1(e, t, n) { return new e({ type: `array`, element: t, ...x$1(n) }); } function Mr$1(e, t, n) { return new e({ type: `custom`, check: `custom`, fn: t, ...x$1(n) }); } function Nr$1(e, t) { let n = Pr$1((t) => (t.addIssue = (e) => { if (typeof e == `string`) t.issues.push(D$1(e, t.value, n._zod.def)); else { let r = e; r.fatal && (r.continue = !1), r.code ??= `custom`, r.input ??= t.value, r.inst ??= n, r.continue ??= !n._zod.def.abort, t.issues.push(D$1(r)); } }, e(t.value, t)), t); return n; } function Pr$1(e, t) { let n = new M$2({ check: `custom`, ...x$1(t) }); return n._zod.check = e, n; } function Fr$1(e) { let t = e?.target ?? `draft-2020-12`; return t === `draft-4` && (t = `draft-04`), t === `draft-7` && (t = `draft-07`), { processors: e.processors ?? {}, metadataRegistry: e?.metadata ?? B$2, target: t, unrepresentable: e?.unrepresentable ?? `throw`, override: e?.override ?? (() => {}), io: e?.io ?? `output`, counter: 0, seen: /* @__PURE__ */ new Map(), cycles: e?.cycles ?? `ref`, reused: e?.reused ?? `inline`, external: e?.external ?? void 0 }; } function G$3(e, t, n = { path: [], schemaPath: [] }) { var r; let i = e._zod.def, a = t.seen.get(e); if (a) return a.count++, n.schemaPath.includes(e) && (a.cycle = n.path), a.schema; let o = { schema: {}, count: 1, cycle: void 0, path: n.path }; t.seen.set(e, o); let s = e._zod.toJSONSchema?.(); if (s) o.schema = s; else { let r = { ...n, schemaPath: [...n.schemaPath, e], path: n.path }; if (e._zod.processJSONSchema) e._zod.processJSONSchema(t, o.schema, r); else { let n = o.schema, a = t.processors[i.type]; if (!a) throw Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`); a(e, t, n, r); } let a = e._zod.parent; a && (o.ref ||= a, G$3(a, t, r), t.seen.get(a).isParent = !0); } let c = t.metadataRegistry.get(e); return c && Object.assign(o.schema, c), t.io === `input` && K$2(e) && (delete o.schema.examples, delete o.schema.default), t.io === `input` && `_prefault` in o.schema && ((r = o.schema).default ?? (r.default = o.schema._prefault)), delete o.schema._prefault, t.seen.get(e).schema; } function Ir$1(e, t) { let n = e.seen.get(t); if (!n) throw Error(`Unprocessed schema. This is a bug in Zod.`); let r = /* @__PURE__ */ new Map(); for (let t of e.seen.entries()) { let n = e.metadataRegistry.get(t[0])?.id; if (n) { let e = r.get(n); if (e && e !== t[0]) throw Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`); r.set(n, t[0]); } } let i = (t) => { let r = e.target === `draft-2020-12` ? `$defs` : `definitions`; if (e.external) { let n = e.external.registry.get(t[0])?.id, i = e.external.uri ?? ((e) => e); if (n) return { ref: i(n) }; let a = t[1].defId ?? t[1].schema.id ?? `schema${e.counter++}`; return t[1].defId = a, { defId: a, ref: `${i(`__shared`)}#/${r}/${a}` }; } if (t[1] === n) return { ref: `#` }; let i = `#/${r}/`, a = t[1].schema.id ?? `__schema${e.counter++}`; return { defId: a, ref: i + a }; }, a = (e) => { if (e[1].schema.$ref) return; let t = e[1], { ref: n, defId: r } = i(e); t.def = { ...t.schema }, r && (t.defId = r); let a = t.schema; for (let e in a) delete a[e]; a.$ref = n; }; if (e.cycles === `throw`) for (let t of e.seen.entries()) { let e = t[1]; if (e.cycle) throw Error(`Cycle detected: #/${e.cycle?.join(`/`)}/ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`); } for (let n of e.seen.entries()) { let r = n[1]; if (t === n[0]) { a(n); continue; } if (e.external) { let r = e.external.registry.get(n[0])?.id; if (t !== n[0] && r) { a(n); continue; } } if (e.metadataRegistry.get(n[0])?.id) { a(n); continue; } if (r.cycle) { a(n); continue; } if (r.count > 1 && e.reused === `ref`) { a(n); continue; } } } function Lr$1(e, t) { let n = e.seen.get(t); if (!n) throw Error(`Unprocessed schema. This is a bug in Zod.`); let r = (t) => { let n = e.seen.get(t); if (n.ref === null) return; let i = n.def ?? n.schema, a = { ...i }, o = n.ref; if (n.ref = null, o) { r(o); let n = e.seen.get(o), s = n.schema; if (s.$ref && (e.target === `draft-07` || e.target === `draft-04` || e.target === `openapi-3.0`) ? (i.allOf = i.allOf ?? [], i.allOf.push(s)) : Object.assign(i, s), Object.assign(i, a), t._zod.parent === o) for (let e in i) e === `$ref` || e === `allOf` || e in a || delete i[e]; if (s.$ref && n.def) for (let e in i) e === `$ref` || e === `allOf` || e in n.def && JSON.stringify(i[e]) === JSON.stringify(n.def[e]) && delete i[e]; } let s = t._zod.parent; if (s && s !== o) { r(s); let t = e.seen.get(s); if (t?.schema.$ref && (i.$ref = t.schema.$ref, t.def)) for (let e in i) e === `$ref` || e === `allOf` || e in t.def && JSON.stringify(i[e]) === JSON.stringify(t.def[e]) && delete i[e]; } e.override({ zodSchema: t, jsonSchema: i, path: n.path ?? [] }); }; for (let t of [...e.seen.entries()].reverse()) r(t[0]); let i = {}; if (e.target === `draft-2020-12` ? i.$schema = `https://json-schema.org/draft/2020-12/schema` : e.target === `draft-07` ? i.$schema = `http://json-schema.org/draft-07/schema#` : e.target === `draft-04` ? i.$schema = `http://json-schema.org/draft-04/schema#` : e.target, e.external?.uri) { let n = e.external.registry.get(t)?.id; if (!n) throw Error("Schema is missing an `id` property"); i.$id = e.external.uri(n); } Object.assign(i, n.def ?? n.schema); let a = e.metadataRegistry.get(t)?.id; a !== void 0 && i.id === a && delete i.id; let o = e.external?.defs ?? {}; for (let t of e.seen.entries()) { let e = t[1]; e.def && e.defId && (e.def.id === e.defId && delete e.def.id, o[e.defId] = e.def); } e.external || Object.keys(o).length > 0 && (e.target === `draft-2020-12` ? i.$defs = o : i.definitions = o); try { let n = JSON.parse(JSON.stringify(i)); return Object.defineProperty(n, "~standard", { value: { ...t[`~standard`], jsonSchema: { input: q$2(t, `input`, e.processors), output: q$2(t, `output`, e.processors) } }, enumerable: !1, writable: !1 }), n; } catch { throw Error(`Error converting schema to JSON.`); } } function K$2(e, t) { let n = t ?? { seen: /* @__PURE__ */ new Set() }; if (n.seen.has(e)) return !1; n.seen.add(e); let r = e._zod.def; if (r.type === `transform`) return !0; if (r.type === `array`) return K$2(r.element, n); if (r.type === `set`) return K$2(r.valueType, n); if (r.type === `lazy`) return K$2(r.getter(), n); if (r.type === `promise` || r.type === `optional` || r.type === `nonoptional` || r.type === `nullable` || r.type === `readonly` || r.type === "default" || r.type === `prefault`) return K$2(r.innerType, n); if (r.type === `intersection`) return K$2(r.left, n) || K$2(r.right, n); if (r.type === `record` || r.type === `map`) return K$2(r.keyType, n) || K$2(r.valueType, n); if (r.type === `pipe`) return e._zod.traits.has(`$ZodCodec`) ? !0 : K$2(r.in, n) || K$2(r.out, n); if (r.type === `object`) { for (let e in r.shape) if (K$2(r.shape[e], n)) return !0; return !1; } if (r.type === `union`) { for (let e of r.options) if (K$2(e, n)) return !0; return !1; } if (r.type === `tuple`) { for (let e of r.items) if (K$2(e, n)) return !0; return !!(r.rest && K$2(r.rest, n)); } return !1; } const Rr$1 = (e, t = {}) => (n) => { let r = Fr$1({ ...n, processors: t }); return G$3(e, r), Ir$1(r, e), Lr$1(r, e); }; const q$2 = (e, t, n = {}) => (r) => { let { libraryOptions: i, target: a } = r ?? {}, o = Fr$1({ ...i ?? {}, target: a, io: t, processors: n }); return G$3(e, o), Ir$1(o, e), Lr$1(o, e); }; const zr$1 = { guid: `uuid`, url: `uri`, datetime: `date-time`, json_string: `json-string`, regex: `` }; const Br$1 = (e, t, n, r) => { let i = n; i.type = `string`; let { minimum: a, maximum: o, format: s, patterns: c, contentEncoding: l } = e._zod.bag; if (typeof a == `number` && (i.minLength = a), typeof o == `number` && (i.maxLength = o), s && (i.format = zr$1[s] ?? s, i.format === `` && delete i.format, s === `time` && delete i.format), l && (i.contentEncoding = l), c && c.size > 0) { let e = [...c]; e.length === 1 ? i.pattern = e[0].source : e.length > 1 && (i.allOf = [...e.map((e) => ({ ...t.target === `draft-07` || t.target === `draft-04` || t.target === `openapi-3.0` ? { type: `string` } : {}, pattern: e.source }))]); } }; const Vr$1 = (e, t, n, r) => { let i = n, { minimum: a, maximum: o, format: s, multipleOf: c, exclusiveMaximum: l, exclusiveMinimum: u } = e._zod.bag; typeof s == `string` && s.includes(`int`) ? i.type = `integer` : i.type = `number`; let d = typeof u == `number` && u >= (a ?? -Infinity), f = typeof l == `number` && l <= (o ?? Infinity), p = t.target === `draft-04` || t.target === `openapi-3.0`; d ? p ? (i.minimum = u, i.exclusiveMinimum = !0) : i.exclusiveMinimum = u : typeof a == `number` && (i.minimum = a), f ? p ? (i.maximum = l, i.exclusiveMaximum = !0) : i.exclusiveMaximum = l : typeof o == `number` && (i.maximum = o), typeof c == `number` && (i.multipleOf = c); }; const Hr$1 = (e, t, n, r) => { n.type = `boolean`; }; const Ur$1 = (e, t, n, r) => { n.not = {}; }; const Wr$1 = (e, t, n, r) => { let i = e._zod.def, a = s$2(i.entries); a.every((e) => typeof e == `number`) && (n.type = `number`), a.every((e) => typeof e == `string`) && (n.type = `string`), n.enum = a; }; const Gr$1 = (e, t, n, r) => { let i = e._zod.def, a = []; for (let e of i.values) if (e === void 0) { if (t.unrepresentable === `throw`) throw Error("Literal `undefined` cannot be represented in JSON Schema"); } else if (typeof e == `bigint`) { if (t.unrepresentable === `throw`) throw Error(`BigInt literals cannot be represented in JSON Schema`); a.push(Number(e)); } else a.push(e); if (a.length !== 0) if (a.length === 1) { let e = a[0]; n.type = e === null ? `null` : typeof e, t.target === `draft-04` || t.target === `openapi-3.0` ? n.enum = [e] : n.const = e; } else a.every((e) => typeof e == `number`) && (n.type = `number`), a.every((e) => typeof e == `string`) && (n.type = `string`), a.every((e) => typeof e == `boolean`) && (n.type = `boolean`), a.every((e) => e === null) && (n.type = `null`), n.enum = a; }; const Kr$1 = (e, t, n, r) => { if (t.unrepresentable === `throw`) throw Error(`Custom types cannot be represented in JSON Schema`); }; const qr$1 = (e, t, n, r) => { if (t.unrepresentable === `throw`) throw Error(`Transforms cannot be represented in JSON Schema`); }; const Jr$1 = (e, t, n, r) => { let i = n, a = e._zod.def, { minimum: o, maximum: s } = e._zod.bag; typeof o == `number` && (i.minItems = o), typeof s == `number` && (i.maxItems = s), i.type = `array`, i.items = G$3(a.element, t, { ...r, path: [...r.path, `items`] }); }; const Yr$1 = (e, t, n, r) => { let i = n, a = e._zod.def; i.type = `object`, i.properties = {}; let o = a.shape; for (let e in o) i.properties[e] = G$3(o[e], t, { ...r, path: [ ...r.path, `properties`, e ] }); let s = new Set(Object.keys(o)), c = new Set([...s].filter((e) => { let n = a.shape[e]._zod; return t.io === `input` ? n.optin === void 0 : n.optout === void 0; })); c.size > 0 && (i.required = Array.from(c)), a.catchall?._zod.def.type === `never` ? i.additionalProperties = !1 : a.catchall ? a.catchall && (i.additionalProperties = G$3(a.catchall, t, { ...r, path: [...r.path, `additionalProperties`] })) : t.io === `output` && (i.additionalProperties = !1); }; const Xr$1 = (e, t, n, r) => { let i = e._zod.def, a = i.inclusive === !1, o = i.options.map((e, n) => G$3(e, t, { ...r, path: [ ...r.path, a ? `oneOf` : `anyOf`, n ] })); a ? n.oneOf = o : n.anyOf = o; }; const Zr$1 = (e, t, n, r) => { let i = e._zod.def, a = G$3(i.left, t, { ...r, path: [ ...r.path, `allOf`, 0 ] }), o = G$3(i.right, t, { ...r, path: [ ...r.path, `allOf`, 1 ] }), s = (e) => `allOf` in e && Object.keys(e).length === 1; n.allOf = [...s(a) ? a.allOf : [a], ...s(o) ? o.allOf : [o]]; }; const Qr$1 = (e, t, n, r) => { let i = n, a = e._zod.def; i.type = `object`; let o = a.keyType, s = o._zod.bag?.patterns; if (a.mode === `loose` && s && s.size > 0) { let e = G$3(a.valueType, t, { ...r, path: [ ...r.path, `patternProperties`, `*` ] }); i.patternProperties = {}; for (let t of s) i.patternProperties[t.source] = e; } else (t.target === `draft-07` || t.target === `draft-2020-12`) && (i.propertyNames = G$3(a.keyType, t, { ...r, path: [...r.path, `propertyNames`] })), i.additionalProperties = G$3(a.valueType, t, { ...r, path: [...r.path, `additionalProperties`] }); let c = o._zod.values; if (c) { let e = [...c].filter((e) => typeof e == `string` || typeof e == `number`); e.length > 0 && (i.required = e); } }; const $r$1 = (e, t, n, r) => { let i = e._zod.def, a = G$3(i.innerType, t, r), o = t.seen.get(e); t.target === `openapi-3.0` ? (o.ref = i.innerType, n.nullable = !0) : n.anyOf = [a, { type: `null` }]; }; const ei$1 = (e, t, n, r) => { let i = e._zod.def; G$3(i.innerType, t, r); let a = t.seen.get(e); a.ref = i.innerType; }; const ti$1 = (e, t, n, r) => { let i = e._zod.def; G$3(i.innerType, t, r); let a = t.seen.get(e); a.ref = i.innerType, n.default = JSON.parse(JSON.stringify(i.defaultValue)); }; const ni$1 = (e, t, n, r) => { let i = e._zod.def; G$3(i.innerType, t, r); let a = t.seen.get(e); a.ref = i.innerType, t.io === `input` && (n._prefault = JSON.parse(JSON.stringify(i.defaultValue))); }; const ri$1 = (e, t, n, r) => { let i = e._zod.def; G$3(i.innerType, t, r); let a = t.seen.get(e); a.ref = i.innerType; let o; try { o = i.catchValue(void 0); } catch { throw Error(`Dynamic catch values are not supported in JSON Schema`); } n.default = o; }; const ii$1 = (e, t, n, r) => { let i = e._zod.def, a = i.in._zod.traits.has(`$ZodTransform`), o = t.io === `input` ? a ? i.out : i.in : i.out; G$3(o, t, r); let s = t.seen.get(e); s.ref = o; }; const ai$1 = (e, t, n, r) => { let i = e._zod.def; G$3(i.innerType, t, r); let a = t.seen.get(e); a.ref = i.innerType, n.readOnly = !0; }; const oi$1 = (e, t, n, r) => { let i = e._zod.def; G$3(i.innerType, t, r); let a = t.seen.get(e); a.ref = i.innerType; }; const si$1 = n$1(`ZodISODateTime`, (e, t) => { Ft$1.init(e, t), Z$2.init(e, t); }); function ci$1(e) { return ar$1(si$1, e); } const li$1 = n$1(`ZodISODate`, (e, t) => { It$1.init(e, t), Z$2.init(e, t); }); function ui$1(e) { return or$1(li$1, e); } const di$1 = n$1(`ZodISOTime`, (e, t) => { Lt$1.init(e, t), Z$2.init(e, t); }); function fi$1(e) { return sr$1(di$1, e); } const pi$1 = n$1(`ZodISODuration`, (e, t) => { Rt$1.init(e, t), Z$2.init(e, t); }); function mi$1(e) { return cr$1(pi$1, e); } const hi$1 = (e, t) => { _e$1.init(e, t), e.name = `ZodError`, Object.defineProperties(e, { format: { value: (t) => be$1(e, t) }, flatten: { value: (t) => ye$1(e, t) }, addIssue: { value: (t) => { e.issues.push(t), e.message = JSON.stringify(e.issues, c$2, 2); } }, addIssues: { value: (t) => { e.issues.push(...t), e.message = JSON.stringify(e.issues, c$2, 2); } }, isEmpty: { get() { return e.issues.length === 0; } } }); }; const gi$1 = n$1(`ZodError`, hi$1); const J$2 = n$1(`ZodError`, hi$1, { Parent: Error }); const _i$1 = O$1(J$2); const vi$1 = k$2(J$2); const yi$1 = A$2(J$2); const bi$1 = j$2(J$2); const xi$1 = Ce$1(J$2); const Si$1 = we$1(J$2); const Ci$1 = Te$1(J$2); const wi$1 = Ee$1(J$2); const Ti$1 = De$1(J$2); const Ei$1 = Oe$1(J$2); const Di$1 = ke$1(J$2); const Oi$1 = Ae$1(J$2); const ki$1 = /* @__PURE__ */ new WeakMap(); function Y$2(e, t, n) { let r = Object.getPrototypeOf(e), i = ki$1.get(r); if (i || (i = /* @__PURE__ */ new Set(), ki$1.set(r, i)), !i.has(t)) { i.add(t); for (let e in n) { let t = n[e]; Object.defineProperty(r, e, { configurable: !0, enumerable: !1, get() { let n = t.bind(this); return Object.defineProperty(this, e, { configurable: !0, writable: !0, enumerable: !0, value: n }), n; }, set(t) { Object.defineProperty(this, e, { configurable: !0, writable: !0, enumerable: !0, value: t }); } }); } } } const X$2 = n$1(`ZodType`, (e, t) => (P$2.init(e, t), Object.assign(e[`~standard`], { jsonSchema: { input: q$2(e, `input`), output: q$2(e, `output`) } }), e.toJSONSchema = Rr$1(e, {}), e.def = t, e.type = t.type, Object.defineProperty(e, "_def", { value: t }), e.parse = (t, n) => _i$1(e, t, n, { callee: e.parse }), e.safeParse = (t, n) => yi$1(e, t, n), e.parseAsync = async (t, n) => vi$1(e, t, n, { callee: e.parseAsync }), e.safeParseAsync = async (t, n) => bi$1(e, t, n), e.spa = e.safeParseAsync, e.encode = (t, n) => xi$1(e, t, n), e.decode = (t, n) => Si$1(e, t, n), e.encodeAsync = async (t, n) => Ci$1(e, t, n), e.decodeAsync = async (t, n) => wi$1(e, t, n), e.safeEncode = (t, n) => Ti$1(e, t, n), e.safeDecode = (t, n) => Ei$1(e, t, n), e.safeEncodeAsync = async (t, n) => Di$1(e, t, n), e.safeDecodeAsync = async (t, n) => Oi$1(e, t, n), Y$2(e, `ZodType`, { check(...e) { let t = this.def; return this.clone(g$2(t, { checks: [...t.checks ?? [], ...e.map((e) => typeof e == `function` ? { _zod: { check: e, def: { check: `custom` }, onattach: [] } } : e)] }), { parent: !0 }); }, with(...e) { return this.check(...e); }, clone(e, t) { return b$2(this, e, t); }, brand() { return this; }, register(e, t) { return e.add(this, t), this; }, refine(e, t) { return this.check(Ga$1(e, t)); }, superRefine(e, t) { return this.check(Ka$1(e, t)); }, overwrite(e) { return this.check(W$2(e)); }, optional() { return Da$1(this); }, exactOptional() { return ka$1(this); }, nullable() { return ja$1(this); }, nullish() { return Da$1(ja$1(this)); }, nonoptional(e) { return La$1(this, e); }, array() { return la$1(this); }, or(e) { return pa$1([this, e]); }, and(e) { return _a$1(this, e); }, transform(e) { return Va$1(this, Ta$1(e)); }, default(e) { return Na$1(this, e); }, prefault(e) { return Fa$1(this, e); }, catch(e) { return za$1(this, e); }, pipe(e) { return Va$1(this, e); }, readonly() { return Ua$1(this); }, describe(e) { let t = this.clone(); return B$2.add(t, { description: e }), t; }, meta(...e) { if (e.length === 0) return B$2.get(this); let t = this.clone(); return B$2.add(t, e[0]), t; }, isOptional() { return this.safeParse(void 0).success; }, isNullable() { return this.safeParse(null).success; }, apply(e) { return e(this); } }), Object.defineProperty(e, "description", { get() { return B$2.get(e)?.description; }, configurable: !0 }), e)); const Ai$1 = n$1(`_ZodString`, (e, t) => { F$2.init(e, t), X$2.init(e, t), e._zod.processJSONSchema = (t, n, r) => Br$1(e, t, n, r); let n = e._zod.bag; e.format = n.format ?? null, e.minLength = n.minimum ?? null, e.maxLength = n.maximum ?? null, Y$2(e, `_ZodString`, { regex(...e) { return this.check(br$1(...e)); }, includes(...e) { return this.check(Cr$1(...e)); }, startsWith(...e) { return this.check(wr$1(...e)); }, endsWith(...e) { return this.check(Tr$1(...e)); }, min(...e) { return this.check(U$2(...e)); }, max(...e) { return this.check(vr$1(...e)); }, length(...e) { return this.check(yr$1(...e)); }, nonempty(...e) { return this.check(U$2(1, ...e)); }, lowercase(e) { return this.check(xr$1(e)); }, uppercase(e) { return this.check(Sr$1(e)); }, trim() { return this.check(Dr$1()); }, normalize(...e) { return this.check(Er$1(...e)); }, toLowerCase() { return this.check(Or$1()); }, toUpperCase() { return this.check(kr$1()); }, slugify() { return this.check(Ar$1()); } }); }); const ji$1 = n$1(`ZodString`, (e, t) => { F$2.init(e, t), Ai$1.init(e, t), e.email = (t) => e.check(Ln$1(Ni$1, t)), e.url = (t) => e.check(Un$1(Fi$1, t)), e.jwt = (t) => e.check(ir$1(Xi$1, t)), e.emoji = (t) => e.check(Wn$1(Ii$1, t)), e.guid = (t) => e.check(Rn$1(Pi$1, t)), e.uuid = (t) => e.check(zn$1(Q$2, t)), e.uuidv4 = (t) => e.check(Bn$1(Q$2, t)), e.uuidv6 = (t) => e.check(Vn$1(Q$2, t)), e.uuidv7 = (t) => e.check(Hn$1(Q$2, t)), e.nanoid = (t) => e.check(Gn$1(Li$1, t)), e.guid = (t) => e.check(Rn$1(Pi$1, t)), e.cuid = (t) => e.check(Kn$1(Ri$1, t)), e.cuid2 = (t) => e.check(qn$1(zi$1, t)), e.ulid = (t) => e.check(Jn$1(Bi$1, t)), e.base64 = (t) => e.check(tr$1(qi$1, t)), e.base64url = (t) => e.check(nr$1(Ji$1, t)), e.xid = (t) => e.check(Yn$1(Vi$1, t)), e.ksuid = (t) => e.check(Xn$2(Hi$1, t)), e.ipv4 = (t) => e.check(Zn$1(Ui$1, t)), e.ipv6 = (t) => e.check(Qn$1(Wi$1, t)), e.cidrv4 = (t) => e.check($n$1(Gi$1, t)), e.cidrv6 = (t) => e.check(er$1(Ki$1, t)), e.e164 = (t) => e.check(rr$1(Yi$1, t)), e.datetime = (t) => e.check(ci$1(t)), e.date = (t) => e.check(ui$1(t)), e.time = (t) => e.check(fi$1(t)), e.duration = (t) => e.check(mi$1(t)); }); function Mi$1(e) { return In$1(ji$1, e); } const Z$2 = n$1(`ZodStringFormat`, (e, t) => { I$2.init(e, t), Ai$1.init(e, t); }); const Ni$1 = n$1(`ZodEmail`, (e, t) => { Et$1.init(e, t), Z$2.init(e, t); }); const Pi$1 = n$1(`ZodGUID`, (e, t) => { wt$1.init(e, t), Z$2.init(e, t); }); const Q$2 = n$1(`ZodUUID`, (e, t) => { Tt$1.init(e, t), Z$2.init(e, t); }); const Fi$1 = n$1(`ZodURL`, (e, t) => { Dt$1.init(e, t), Z$2.init(e, t); }); const Ii$1 = n$1(`ZodEmoji`, (e, t) => { Ot$1.init(e, t), Z$2.init(e, t); }); const Li$1 = n$1(`ZodNanoID`, (e, t) => { kt$1.init(e, t), Z$2.init(e, t); }); const Ri$1 = n$1(`ZodCUID`, (e, t) => { At$1.init(e, t), Z$2.init(e, t); }); const zi$1 = n$1(`ZodCUID2`, (e, t) => { jt$1.init(e, t), Z$2.init(e, t); }); const Bi$1 = n$1(`ZodULID`, (e, t) => { Mt$1.init(e, t), Z$2.init(e, t); }); const Vi$1 = n$1(`ZodXID`, (e, t) => { Nt$1.init(e, t), Z$2.init(e, t); }); const Hi$1 = n$1(`ZodKSUID`, (e, t) => { Pt$1.init(e, t), Z$2.init(e, t); }); const Ui$1 = n$1(`ZodIPv4`, (e, t) => { zt$1.init(e, t), Z$2.init(e, t); }); const Wi$1 = n$1(`ZodIPv6`, (e, t) => { Bt$1.init(e, t), Z$2.init(e, t); }); const Gi$1 = n$1(`ZodCIDRv4`, (e, t) => { Vt$1.init(e, t), Z$2.init(e, t); }); const Ki$1 = n$1(`ZodCIDRv6`, (e, t) => { Ht$1.init(e, t), Z$2.init(e, t); }); const qi$1 = n$1(`ZodBase64`, (e, t) => { Wt$1.init(e, t), Z$2.init(e, t); }); const Ji$1 = n$1(`ZodBase64URL`, (e, t) => { Kt$1.init(e, t), Z$2.init(e, t); }); const Yi$1 = n$1(`ZodE164`, (e, t) => { qt$1.init(e, t), Z$2.init(e, t); }); const Xi$1 = n$1(`ZodJWT`, (e, t) => { Yt$1.init(e, t), Z$2.init(e, t); }); const Zi$1 = n$1(`ZodNumber`, (e, t) => { Xt$1.init(e, t), X$2.init(e, t), e._zod.processJSONSchema = (t, n, r) => Vr$1(e, t, n, r), Y$2(e, `ZodNumber`, { gt(e, t) { return this.check(gr$1(e, t)); }, gte(e, t) { return this.check(H$2(e, t)); }, min(e, t) { return this.check(H$2(e, t)); }, lt(e, t) { return this.check(hr$1(e, t)); }, lte(e, t) { return this.check(V$2(e, t)); }, max(e, t) { return this.check(V$2(e, t)); }, int(e) { return this.check(ea$1(e)); }, safe(e) { return this.check(ea$1(e)); }, positive(e) { return this.check(gr$1(0, e)); }, nonnegative(e) { return this.check(H$2(0, e)); }, negative(e) { return this.check(hr$1(0, e)); }, nonpositive(e) { return this.check(V$2(0, e)); }, multipleOf(e, t) { return this.check(_r$1(e, t)); }, step(e, t) { return this.check(_r$1(e, t)); }, finite() { return this; } }); let n = e._zod.bag; e.minValue = Math.max(n.minimum ?? -Infinity, n.exclusiveMinimum ?? -Infinity) ?? null, e.maxValue = Math.min(n.maximum ?? Infinity, n.exclusiveMaximum ?? Infinity) ?? null, e.isInt = (n.format ?? ``).includes(`int`) || Number.isSafeInteger(n.multipleOf ?? .5), e.isFinite = !0, e.format = n.format ?? null; }); function Qi$1(e) { return lr$1(Zi$1, e); } const $i$1 = n$1(`ZodNumberFormat`, (e, t) => { Zt$1.init(e, t), Zi$1.init(e, t); }); function ea$1(e) { return ur$1($i$1, e); } const ta$1 = n$1(`ZodBoolean`, (e, t) => { Qt$1.init(e, t), X$2.init(e, t), e._zod.processJSONSchema = (t, n, r) => Hr$1(e, t, n, r); }); function na$1(e) { return dr$1(ta$1, e); } const ra$1 = n$1(`ZodAny`, (e, t) => { $t$1.init(e, t), X$2.init(e, t), e._zod.processJSONSchema = (e, t, n) => void 0; }); function ia$1() { return fr$1(ra$1); } const aa$1 = n$1(`ZodUnknown`, (e, t) => { en$1.init(e, t), X$2.init(e, t), e._zod.processJSONSchema = (e, t, n) => void 0; }); function $$2() { return pr$2(aa$1); } const oa$1 = n$1(`ZodNever`, (e, t) => { tn$1.init(e, t), X$2.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ur$1(e, t, n, r); }); function sa$1(e) { return mr$1(oa$1, e); } const ca$1 = n$1(`ZodArray`, (e, t) => { rn$1.init(e, t), X$2.init(e, t), e._zod.processJSONSchema = (t, n, r) => Jr$1(e, t, n, r), e.element = t.element, Y$2(e, `ZodArray`, { min(e, t) { return this.check(U$2(e, t)); }, nonempty(e) { return this.check(U$2(1, e)); }, max(e, t) { return this.check(vr$1(e, t)); }, length(e, t) { return this.check(yr$1(e, t)); }, unwrap() { return this.element; } }); }); function la$1(e, t) { return jr$1(ca$1, e, t); } const ua$1 = n$1(`ZodObject`, (e, t) => { cn$1.init(e, t), X$2.init(e, t), e._zod.processJSONSchema = (t, n, r) => Yr$1(e, t, n, r), m$1(e, `shape`, () => t.shape), Y$2(e, `ZodObject`, { keyof() { return xa$1(Object.keys(this._zod.def.shape)); }, catchall(e) { return this.clone({ ...this._zod.def, catchall: e }); }, passthrough() { return this.clone({ ...this._zod.def, catchall: $$2() }); }, loose() { return this.clone({ ...this._zod.def, catchall: $$2() }); }, strict() { return this.clone({ ...this._zod.def, catchall: sa$1() }); }, strip() { return this.clone({ ...this._zod.def, catchall: void 0 }); }, extend(e) { return ue$1(this, e); }, safeExtend(e) { return de$1(this, e); }, merge(e) { return fe$1(this, e); }, pick(e) { return ce$1(this, e); }, omit(e) { return le$1(this, e); }, partial(...e) { return pe$1(Ea$1, this, e[0]); }, required(...e) { return me$1(Ia$1, this, e[0]); } }); }); function da$1(e, t) { return new ua$1({ type: `object`, shape: e ?? {}, ...x$1(t) }); } const fa$1 = n$1(`ZodUnion`, (e, t) => { un$1.init(e, t), X$2.init(e, t), e._zod.processJSONSchema = (t, n, r) => Xr$1(e, t, n, r), e.options = t.options; }); function pa$1(e, t) { return new fa$1({ type: `union`, options: e, ...x$1(t) }); } const ma$1 = n$1(`ZodDiscriminatedUnion`, (e, t) => { fa$1.init(e, t), dn$1.init(e, t); }); function ha$1(e, t, n) { return new ma$1({ type: `union`, options: t, discriminator: e, ...x$1(n) }); } const ga$1 = n$1(`ZodIntersection`, (e, t) => { fn$1.init(e, t), X$2.init(e, t), e._zod.processJSONSchema = (t, n, r) => Zr$1(e, t, n, r); }); function _a$1(e, t) { return new ga$1({ type: `intersection`, left: e, right: t }); } const va$1 = n$1(`ZodRecord`, (e, t) => { mn$1.init(e, t), X$2.init(e, t), e._zod.processJSONSchema = (t, n, r) => Qr$1(e, t, n, r), e.keyType = t.keyType, e.valueType = t.valueType; }); function ya$1(e, t, n) { return !t || !t._zod ? new va$1({ type: `record`, keyType: Mi$1(), valueType: e, ...x$1(t) }) : new va$1({ type: `record`, keyType: e, valueType: t, ...x$1(n) }); } const ba$1 = n$1(`ZodEnum`, (e, t) => { hn$1.init(e, t), X$2.init(e, t), e._zod.processJSONSchema = (t, n, r) => Wr$1(e, t, n, r), e.enum = t.entries, e.options = Object.values(t.entries); let n = new Set(Object.keys(t.entries)); e.extract = (e, r) => { let i = {}; for (let r of e) if (n.has(r)) i[r] = t.entries[r]; else throw Error(`Key ${r} not found in enum`); return new ba$1({ ...t, checks: [], ...x$1(r), entries: i }); }, e.exclude = (e, r) => { let i = { ...t.entries }; for (let t of e) if (n.has(t)) delete i[t]; else throw Error(`Key ${t} not found in enum`); return new ba$1({ ...t, checks: [], ...x$1(r), entries: i }); }; }); function xa$1(e, t) { return new ba$1({ type: `enum`, entries: Array.isArray(e) ? Object.fromEntries(e.map((e) => [e, e])) : e, ...x$1(t) }); } const Sa$1 = n$1(`ZodLiteral`, (e, t) => { gn$1.init(e, t), X$2.init(e, t), e._zod.processJSONSchema = (t, n, r) => Gr$1(e, t, n, r), e.values = new Set(t.values), Object.defineProperty(e, "value", { get() { if (t.values.length > 1) throw Error("This schema contains multiple valid literal values. Use `.values` instead."); return t.values[0]; } }); }); function Ca$1(e, t) { return new Sa$1({ type: `literal`, values: Array.isArray(e) ? e : [e], ...x$1(t) }); } const wa$1 = n$1(`ZodTransform`, (e, t) => { _n$1.init(e, t), X$2.init(e, t), e._zod.processJSONSchema = (t, n, r) => qr$1(e, t, n, r), e._zod.parse = (n, r) => { if (r.direction === `backward`) throw new i$2(e.constructor.name); n.addIssue = (r) => { if (typeof r == `string`) n.issues.push(D$1(r, n.value, t)); else { let t = r; t.fatal && (t.continue = !1), t.code ??= `custom`, t.input ??= n.value, t.inst ??= e, n.issues.push(D$1(t)); } }; let a = t.transform(n.value, n); return a instanceof Promise ? a.then((e) => (n.value = e, n.fallback = !0, n)) : (n.value = a, n.fallback = !0, n); }; }); function Ta$1(e) { return new wa$1({ type: `transform`, transform: e }); } const Ea$1 = n$1(`ZodOptional`, (e, t) => { yn$1.init(e, t), X$2.init(e, t), e._zod.processJSONSchema = (t, n, r) => oi$1(e, t, n, r), e.unwrap = () => e._zod.def.innerType; }); function Da$1(e) { return new Ea$1({ type: `optional`, innerType: e }); } const Oa$1 = n$1(`ZodExactOptional`, (e, t) => { bn$1.init(e, t), X$2.init(e, t), e._zod.processJSONSchema = (t, n, r) => oi$1(e, t, n, r), e.unwrap = () => e._zod.def.innerType; }); function ka$1(e) { return new Oa$1({ type: `optional`, innerType: e }); } const Aa$1 = n$1(`ZodNullable`, (e, t) => { xn$1.init(e, t), X$2.init(e, t), e._zod.processJSONSchema = (t, n, r) => $r$1(e, t, n, r), e.unwrap = () => e._zod.def.innerType; }); function ja$1(e) { return new Aa$1({ type: `nullable`, innerType: e }); } const Ma$1 = n$1(`ZodDefault`, (e, t) => { Sn$1.init(e, t), X$2.init(e, t), e._zod.processJSONSchema = (t, n, r) => ti$1(e, t, n, r), e.unwrap = () => e._zod.def.innerType, e.removeDefault = e.unwrap; }); function Na$1(e, t) { return new Ma$1({ type: `default`, innerType: e, get defaultValue() { return typeof t == `function` ? t() : ie$2(t); } }); } const Pa$1 = n$1(`ZodPrefault`, (e, t) => { wn$1.init(e, t), X$2.init(e, t), e._zod.processJSONSchema = (t, n, r) => ni$1(e, t, n, r), e.unwrap = () => e._zod.def.innerType; }); function Fa$1(e, t) { return new Pa$1({ type: `prefault`, innerType: e, get defaultValue() { return typeof t == `function` ? t() : ie$2(t); } }); } const Ia$1 = n$1(`ZodNonOptional`, (e, t) => { Tn$1.init(e, t), X$2.init(e, t), e._zod.processJSONSchema = (t, n, r) => ei$1(e, t, n, r), e.unwrap = () => e._zod.def.innerType; }); function La$1(e, t) { return new Ia$1({ type: `nonoptional`, innerType: e, ...x$1(t) }); } const Ra$1 = n$1(`ZodCatch`, (e, t) => { Dn$1.init(e, t), X$2.init(e, t), e._zod.processJSONSchema = (t, n, r) => ri$1(e, t, n, r), e.unwrap = () => e._zod.def.innerType, e.removeCatch = e.unwrap; }); function za$1(e, t) { return new Ra$1({ type: `catch`, innerType: e, catchValue: typeof t == `function` ? t : () => t }); } const Ba$1 = n$1(`ZodPipe`, (e, t) => { On$1.init(e, t), X$2.init(e, t), e._zod.processJSONSchema = (t, n, r) => ii$1(e, t, n, r), e.in = t.in, e.out = t.out; }); function Va$1(e, t) { return new Ba$1({ type: `pipe`, in: e, out: t }); } const Ha$1 = n$1(`ZodReadonly`, (e, t) => { kn$1.init(e, t), X$2.init(e, t), e._zod.processJSONSchema = (t, n, r) => ai$1(e, t, n, r), e.unwrap = () => e._zod.def.innerType; }); function Ua$1(e) { return new Ha$1({ type: `readonly`, innerType: e }); } const Wa$1 = n$1(`ZodCustom`, (e, t) => { jn$1.init(e, t), X$2.init(e, t), e._zod.processJSONSchema = (t, n, r) => Kr$1(e, t, n, r); }); function Ga$1(e, t = {}) { return Mr$1(Wa$1, e, t); } function Ka$1(e, t) { return Nr$1(e, t); } const qa$1 = `2.2.1`; //#endregion //#region node_modules/eve/dist/src/compiled/@vercel/sandbox/index.js var sandbox_exports = /* @__PURE__ */ __exportAll({ APIError: () => A$1, Command: () => Fr, CommandFinished: () => Ir, FileSystem: () => ri, Sandbox: () => li, Session: () => Vr, Snapshot: () => zr, StreamError: () => j$1, defineSandboxProxy: () => Ka, n: () => $n, t: () => ar }); var A$1 = class e extends Error { constructor(t, n) { super(t.statusText), Error.captureStackTrace && Error.captureStackTrace(this, e), this.response = t, this.message = n?.message ?? ``, this.json = n?.json, this.text = n?.text, this.sandboxName = n?.sandboxName, this.sessionId = n?.sessionId; } }; var j$1 = class e extends Error { constructor(t, n, r) { super(n), this.name = `StreamError`, this.code = t, this.sessionId = r, Error.captureStackTrace && Error.captureStackTrace(this, e); } }; function M$1(e) { return e == null ? [] : Array.isArray(e) ? e : [e]; } var N$1 = d$3(c$3(((e, t) => { var n = i$3(); function r(e, t) { function r(r, i) { var a = t || {}, o; `randomize` in a || (a.randomize = !0), o = n.operation(a); function s(e) { i(e || Error(`Aborted`)); } function c(e, t) { if (e.bail) { s(e); return; } o.retry(e) ? a.onRetry && a.onRetry(e, t) : i(o.mainError()); } function l(t) { var n; try { n = e(s, t); } catch (e) { c(e, t); return; } Promise.resolve(n).then(r).catch(function(e) { c(e, t); }); } o.attempt(l); } return new Promise(r); } t.exports = r; }))(), 1); function P$1(e) { return async (t, n = {}) => { let r = Object.assign({ minTimeout: 10, retries: 5, factor: 6, maxRetryAfter: 20 }, n.retry); n.onRetry && (r.onRetry = (e, t) => { n.onRetry(e, n), n.retry && n.retry.onRetry && n.retry.onRetry(e, t); }); try { return await (0, N$1.default)(async (i) => { try { if (n.signal?.aborted) return i(n.signal.reason || Error(`Request aborted`)); let a = await e(t, n); if (a.status === 429) { let e = parseInt(a.headers.get(`retry-after`) || ``, 10); if (e && !isNaN(e)) { if (e > r.maxRetryAfter) return a; await setTimeout$1(e * 1e3); } throw new A$1(a); } if (a.status >= 500 && a.status < 600) throw new A$1(a); return a; } catch (e) { if (F$1(e)) return i(e); if (n.signal?.aborted) return i(n.signal.reason || Error(`Request aborted`)); throw e; } }, r); } catch (e) { if (e instanceof A$1) return e.response; throw e; } }; } function F$1(e) { return e != null && e.name === `AbortError`; } var I$1 = c$3(((e, t) => { t.exports = { kClose: Symbol(`close`), kDestroy: Symbol(`destroy`), kDispatch: Symbol(`dispatch`), kUrl: Symbol(`url`), kWriting: Symbol(`writing`), kResuming: Symbol(`resuming`), kQueue: Symbol(`queue`), kConnect: Symbol(`connect`), kConnecting: Symbol(`connecting`), kKeepAliveDefaultTimeout: Symbol(`default keep alive timeout`), kKeepAliveMaxTimeout: Symbol(`max keep alive timeout`), kKeepAliveTimeoutThreshold: Symbol(`keep alive timeout threshold`), kKeepAliveTimeoutValue: Symbol(`keep alive timeout`), kKeepAlive: Symbol(`keep alive`), kHeadersTimeout: Symbol(`headers timeout`), kBodyTimeout: Symbol(`body timeout`), kServerName: Symbol(`server name`), kLocalAddress: Symbol(`local address`), kHost: Symbol(`host`), kNoRef: Symbol(`no ref`), kBodyUsed: Symbol(`used`), kBody: Symbol(`abstracted request body`), kRunning: Symbol(`running`), kBlocking: Symbol(`blocking`), kPending: Symbol(`pending`), kSize: Symbol(`size`), kBusy: Symbol(`busy`), kQueued: Symbol(`queued`), kFree: Symbol(`free`), kConnected: Symbol(`connected`), kClosed: Symbol(`closed`), kNeedDrain: Symbol(`need drain`), kReset: Symbol(`reset`), kDestroyed: Symbol.for(`nodejs.stream.destroyed`), kResume: Symbol(`resume`), kOnError: Symbol(`on error`), kMaxHeadersSize: Symbol(`max headers size`), kRunningIdx: Symbol(`running index`), kPendingIdx: Symbol(`pending index`), kError: Symbol(`error`), kClients: Symbol(`clients`), kClient: Symbol(`client`), kParser: Symbol(`parser`), kOnDestroyed: Symbol(`destroy callbacks`), kPipelining: Symbol(`pipelining`), kSocket: Symbol(`socket`), kHostHeader: Symbol(`host header`), kConnector: Symbol(`connector`), kStrictContentLength: Symbol(`strict content length`), kMaxRedirections: Symbol(`maxRedirections`), kMaxRequests: Symbol(`maxRequestsPerClient`), kProxy: Symbol(`proxy agent options`), kCounter: Symbol(`socket request counter`), kMaxResponseSize: Symbol(`max response size`), kHTTP2Session: Symbol(`http2Session`), kHTTP2SessionState: Symbol(`http2Session state`), kRetryHandlerDefaultRetry: Symbol(`retry agent default retry`), kConstruct: Symbol(`constructable`), kListeners: Symbol(`listeners`), kHTTPContext: Symbol(`http context`), kMaxConcurrentStreams: Symbol(`max concurrent streams`), kHTTP2InitialWindowSize: Symbol(`http2 initial window size`), kHTTP2ConnectionWindowSize: Symbol(`http2 connection window size`), kEnableConnectProtocol: Symbol(`http2session connect protocol`), kRemoteSettings: Symbol(`http2session remote settings`), kHTTP2Stream: Symbol(`http2session client stream`), kPingInterval: Symbol(`ping interval`), kNoProxyAgent: Symbol(`no proxy agent`), kHttpProxyAgent: Symbol(`http proxy agent`), kHttpsProxyAgent: Symbol(`https proxy agent`), kSocks5ProxyAgent: Symbol(`socks5 proxy agent`) }; })); var L$1 = c$3(((e, t) => { let n = 0, r = 1e3, i, a = Symbol(`kFastTimer`), o = []; function s() { n += 499; let e = 0, t = o.length; for (; e < t;) { let r = o[e]; r._state === 0 ? (r._idleStart = n - 499, r._state = 1) : r._state === 1 && n >= r._idleStart + r._idleTimeout && (r._state = -1, r._idleStart = -1, r._onTimeout(r._timerArg)), r._state === -1 ? (r._state = -2, --t !== 0 && (o[e] = o[t])) : ++e; } o.length = t, o.length !== 0 && c(); } function c() { i?.refresh ? i.refresh() : (clearTimeout(i), i = setTimeout(s, 499), i?.unref()); } var l = class { [a] = !0; _state = -2; _idleTimeout = -1; _idleStart = -1; _onTimeout; _timerArg; constructor(e, t, n) { this._onTimeout = e, this._idleTimeout = t, this._timerArg = n, this.refresh(); } refresh() { this._state === -2 && o.push(this), (!i || o.length === 1) && c(), this._state = 0; } clear() { this._state = -1, this._idleStart = -1; } }; t.exports = { setTimeout(e, t, n) { return t <= r ? setTimeout(e, t, n) : new l(e, t, n); }, clearTimeout(e) { e[a] ? e.clear() : clearTimeout(e); }, setFastTimeout(e, t, n) { return new l(e, t, n); }, clearFastTimeout(e) { e.clear(); }, now() { return n; }, tick(e = 0) { n += e - r + 1, s(), s(); }, reset() { n = 0, o.length = 0, clearTimeout(i), i = null; }, kFastTimer: a }; })); var R$1 = c$3(((e, t) => { let n = Symbol.for(`undici.error.UND_ERR`); var r = class extends Error { constructor(e, t) { super(e, t), this.name = `UndiciError`, this.code = `UND_ERR`; } static [Symbol.hasInstance](e) { return e && e[n] === !0; } get [n]() { return !0; } }; let i = Symbol.for(`undici.error.UND_ERR_CONNECT_TIMEOUT`); var a = class extends r { constructor(e) { super(e), this.name = `ConnectTimeoutError`, this.message = e || `Connect Timeout Error`, this.code = `UND_ERR_CONNECT_TIMEOUT`; } static [Symbol.hasInstance](e) { return e && e[i] === !0; } get [i]() { return !0; } }; let o = Symbol.for(`undici.error.UND_ERR_HEADERS_TIMEOUT`); var s = class extends r { constructor(e) { super(e), this.name = `HeadersTimeoutError`, this.message = e || `Headers Timeout Error`, this.code = `UND_ERR_HEADERS_TIMEOUT`; } static [Symbol.hasInstance](e) { return e && e[o] === !0; } get [o]() { return !0; } }; let c = Symbol.for(`undici.error.UND_ERR_HEADERS_OVERFLOW`); var l = class extends r { constructor(e) { super(e), this.name = `HeadersOverflowError`, this.message = e || `Headers Overflow Error`, this.code = `UND_ERR_HEADERS_OVERFLOW`; } static [Symbol.hasInstance](e) { return e && e[c] === !0; } get [c]() { return !0; } }; let u = Symbol.for(`undici.error.UND_ERR_BODY_TIMEOUT`); var d = class extends r { constructor(e) { super(e), this.name = `BodyTimeoutError`, this.message = e || `Body Timeout Error`, this.code = `UND_ERR_BODY_TIMEOUT`; } static [Symbol.hasInstance](e) { return e && e[u] === !0; } get [u]() { return !0; } }; let f = Symbol.for(`undici.error.UND_ERR_INVALID_ARG`); var p = class extends r { constructor(e) { super(e), this.name = `InvalidArgumentError`, this.message = e || `Invalid Argument Error`, this.code = `UND_ERR_INVALID_ARG`; } static [Symbol.hasInstance](e) { return e && e[f] === !0; } get [f]() { return !0; } }; let m = Symbol.for(`undici.error.UND_ERR_INVALID_RETURN_VALUE`); var h = class extends r { constructor(e) { super(e), this.name = `InvalidReturnValueError`, this.message = e || `Invalid Return Value Error`, this.code = `UND_ERR_INVALID_RETURN_VALUE`; } static [Symbol.hasInstance](e) { return e && e[m] === !0; } get [m]() { return !0; } }; let g = Symbol.for(`undici.error.UND_ERR_ABORT`); var _ = class extends r { constructor(e) { super(e), this.name = `AbortError`, this.message = e || `The operation was aborted`, this.code = `UND_ERR_ABORT`; } static [Symbol.hasInstance](e) { return e && e[g] === !0; } get [g]() { return !0; } }; let v = Symbol.for(`undici.error.UND_ERR_ABORTED`); var y = class extends _ { constructor(e) { super(e), this.name = `AbortError`, this.message = e || `Request aborted`, this.code = `UND_ERR_ABORTED`; } static [Symbol.hasInstance](e) { return e && e[v] === !0; } get [v]() { return !0; } }; let b = Symbol.for(`undici.error.UND_ERR_INFO`); var x = class extends r { constructor(e) { super(e), this.name = `InformationalError`, this.message = e || `Request information`, this.code = `UND_ERR_INFO`; } static [Symbol.hasInstance](e) { return e && e[b] === !0; } get [b]() { return !0; } }; let S = Symbol.for(`undici.error.UND_ERR_REQ_CONTENT_LENGTH_MISMATCH`); var C = class extends r { constructor(e) { super(e), this.name = `RequestContentLengthMismatchError`, this.message = e || `Request body length does not match content-length header`, this.code = `UND_ERR_REQ_CONTENT_LENGTH_MISMATCH`; } static [Symbol.hasInstance](e) { return e && e[S] === !0; } get [S]() { return !0; } }; let w = Symbol.for(`undici.error.UND_ERR_RES_CONTENT_LENGTH_MISMATCH`); var T = class extends r { constructor(e) { super(e), this.name = `ResponseContentLengthMismatchError`, this.message = e || `Response body length does not match content-length header`, this.code = `UND_ERR_RES_CONTENT_LENGTH_MISMATCH`; } static [Symbol.hasInstance](e) { return e && e[w] === !0; } get [w]() { return !0; } }; let E = Symbol.for(`undici.error.UND_ERR_DESTROYED`); var D = class extends r { constructor(e) { super(e), this.name = `ClientDestroyedError`, this.message = e || `The client is destroyed`, this.code = `UND_ERR_DESTROYED`; } static [Symbol.hasInstance](e) { return e && e[E] === !0; } get [E]() { return !0; } }; let O = Symbol.for(`undici.error.UND_ERR_CLOSED`); var k = class extends r { constructor(e) { super(e), this.name = `ClientClosedError`, this.message = e || `The client is closed`, this.code = `UND_ERR_CLOSED`; } static [Symbol.hasInstance](e) { return e && e[O] === !0; } get [O]() { return !0; } }; let A = Symbol.for(`undici.error.UND_ERR_SOCKET`); var j = class extends r { constructor(e, t) { super(e), this.name = `SocketError`, this.message = e || `Socket error`, this.code = `UND_ERR_SOCKET`, this.socket = t; } static [Symbol.hasInstance](e) { return e && e[A] === !0; } get [A]() { return !0; } }; let M = Symbol.for(`undici.error.UND_ERR_NOT_SUPPORTED`); var N = class extends r { constructor(e) { super(e), this.name = `NotSupportedError`, this.message = e || `Not supported error`, this.code = `UND_ERR_NOT_SUPPORTED`; } static [Symbol.hasInstance](e) { return e && e[M] === !0; } get [M]() { return !0; } }; let P = Symbol.for(`undici.error.UND_ERR_BPL_MISSING_UPSTREAM`); var F = class extends r { constructor(e) { super(e), this.name = `MissingUpstreamError`, this.message = e || `No upstream has been added to the BalancedPool`, this.code = `UND_ERR_BPL_MISSING_UPSTREAM`; } static [Symbol.hasInstance](e) { return e && e[P] === !0; } get [P]() { return !0; } }; let I = Symbol.for(`undici.error.UND_ERR_HTTP_PARSER`); var L = class extends Error { constructor(e, t, n) { super(e), this.name = `HTTPParserError`, this.code = t ? `HPE_${t}` : void 0, this.data = n ? n.toString() : void 0; } static [Symbol.hasInstance](e) { return e && e[I] === !0; } get [I]() { return !0; } }; let R = Symbol.for(`undici.error.UND_ERR_RES_EXCEEDED_MAX_SIZE`); var ee = class extends r { constructor(e) { super(e), this.name = `ResponseExceededMaxSizeError`, this.message = e || `Response content exceeded max size`, this.code = `UND_ERR_RES_EXCEEDED_MAX_SIZE`; } static [Symbol.hasInstance](e) { return e && e[R] === !0; } get [R]() { return !0; } }; let z = Symbol.for(`undici.error.UND_ERR_REQ_RETRY`); var B = class extends r { constructor(e, t, { headers: n, data: r }) { super(e), this.name = `RequestRetryError`, this.message = e || `Request retry error`, this.code = `UND_ERR_REQ_RETRY`, this.statusCode = t, this.data = r, this.headers = n; } static [Symbol.hasInstance](e) { return e && e[z] === !0; } get [z]() { return !0; } }; let V = Symbol.for(`undici.error.UND_ERR_RESPONSE`); var H = class extends r { constructor(e, t, { headers: n, body: r }) { super(e), this.name = `ResponseError`, this.message = e || `Response error`, this.code = `UND_ERR_RESPONSE`, this.statusCode = t, this.body = r, this.headers = n; } static [Symbol.hasInstance](e) { return e && e[V] === !0; } get [V]() { return !0; } }; let te = Symbol.for(`undici.error.UND_ERR_PRX_TLS`); var U = class extends r { constructor(e, t, n = {}) { super(t, { cause: e, ...n }), this.name = `SecureProxyConnectionError`, this.message = t || `Secure Proxy Connection failed`, this.code = `UND_ERR_PRX_TLS`, this.cause = e; } static [Symbol.hasInstance](e) { return e && e[te] === !0; } get [te]() { return !0; } }; let W = Symbol.for(`undici.error.UND_ERR_MAX_ORIGINS_REACHED`); var ne = class extends r { constructor(e) { super(e), this.name = `MaxOriginsReachedError`, this.message = e || `Maximum allowed origins reached`, this.code = `UND_ERR_MAX_ORIGINS_REACHED`; } static [Symbol.hasInstance](e) { return e && e[W] === !0; } get [W]() { return !0; } }, G = class extends r { constructor(e, t) { super(e), this.name = `Socks5ProxyError`, this.message = e || `SOCKS5 proxy error`, this.code = t || `UND_ERR_SOCKS5`; } }; let K = Symbol.for(`undici.error.UND_ERR_WS_MESSAGE_SIZE_EXCEEDED`); t.exports = { AbortError: _, HTTPParserError: L, UndiciError: r, HeadersTimeoutError: s, HeadersOverflowError: l, BodyTimeoutError: d, RequestContentLengthMismatchError: C, ConnectTimeoutError: a, InvalidArgumentError: p, InvalidReturnValueError: h, RequestAbortedError: y, ClientDestroyedError: D, ClientClosedError: k, InformationalError: x, SocketError: j, NotSupportedError: N, ResponseContentLengthMismatchError: T, BalancedPoolMissingUpstreamError: F, ResponseExceededMaxSizeError: ee, RequestRetryError: B, ResponseError: H, SecureProxyConnectionError: U, MaxOriginsReachedError: ne, Socks5ProxyError: G, MessageSizeExceededError: class extends r { constructor(e) { super(e), this.name = `MessageSizeExceededError`, this.message = e || `Max decompressed message size exceeded`, this.code = `UND_ERR_WS_MESSAGE_SIZE_EXCEEDED`; } static [Symbol.hasInstance](e) { return e && e[K] === !0; } get [K]() { return !0; } } }; })); var ee$2 = c$3(((e, t) => { let n = `Accept.Accept-Encoding.Accept-Language.Accept-Ranges.Access-Control-Allow-Credentials.Access-Control-Allow-Headers.Access-Control-Allow-Methods.Access-Control-Allow-Origin.Access-Control-Expose-Headers.Access-Control-Max-Age.Access-Control-Request-Headers.Access-Control-Request-Method.Age.Allow.Alt-Svc.Alt-Used.Authorization.Cache-Control.Clear-Site-Data.Connection.Content-Disposition.Content-Encoding.Content-Language.Content-Length.Content-Location.Content-Range.Content-Security-Policy.Content-Security-Policy-Report-Only.Content-Type.Cookie.Cross-Origin-Embedder-Policy.Cross-Origin-Opener-Policy.Cross-Origin-Resource-Policy.Date.Device-Memory.Downlink.ECT.ETag.Expect.Expect-CT.Expires.Forwarded.From.Host.If-Match.If-Modified-Since.If-None-Match.If-Range.If-Unmodified-Since.Keep-Alive.Last-Modified.Link.Location.Max-Forwards.Origin.Permissions-Policy.Pragma.Proxy-Authenticate.Proxy-Authorization.RTT.Range.Referer.Referrer-Policy.Refresh.Retry-After.Sec-WebSocket-Accept.Sec-WebSocket-Extensions.Sec-WebSocket-Key.Sec-WebSocket-Protocol.Sec-WebSocket-Version.Server.Server-Timing.Service-Worker-Allowed.Service-Worker-Navigation-Preload.Set-Cookie.SourceMap.Strict-Transport-Security.Supports-Loading-Mode.TE.Timing-Allow-Origin.Trailer.Transfer-Encoding.Upgrade.Upgrade-Insecure-Requests.User-Agent.Vary.Via.WWW-Authenticate.X-Content-Type-Options.X-DNS-Prefetch-Control.X-Frame-Options.X-Permitted-Cross-Domain-Policies.X-Powered-By.X-Requested-With.X-XSS-Protection`.split(`.`), r = {}; Object.setPrototypeOf(r, null); let i = {}; Object.setPrototypeOf(i, null); function a(e) { let t = i[e]; return t === void 0 && (t = Buffer.from(e)), t; } for (let e = 0; e < n.length; ++e) { let t = n[e], i = t.toLowerCase(); r[t] = r[i] = i; } t.exports = { wellknownHeaderNames: n, headerNameLowerCasedRecord: r, getHeaderNameAsBuffer: a }; })); var z$1 = c$3(((e, t) => { let { wellknownHeaderNames: n, headerNameLowerCasedRecord: r } = ee$2(); var i = class e { value = null; left = null; middle = null; right = null; code; constructor(t, n, r) { if (r === void 0 || r >= t.length) throw TypeError(`Unreachable`); if ((this.code = t.charCodeAt(r)) > 127) throw TypeError(`key must be ascii string`); t.length === ++r ? this.value = n : this.middle = new e(t, n, r); } add(t, n) { let r = t.length; if (r === 0) throw TypeError(`Unreachable`); let i = 0, a = this; for (;;) { let o = t.charCodeAt(i); if (o > 127) throw TypeError(`key must be ascii string`); if (a.code === o) if (r === ++i) { a.value = n; break; } else if (a.middle !== null) a = a.middle; else { a.middle = new e(t, n, i); break; } else if (a.code < o) if (a.left !== null) a = a.left; else { a.left = new e(t, n, i); break; } else if (a.right !== null) a = a.right; else { a.right = new e(t, n, i); break; } } } search(e) { let t = e.length, n = 0, r = this; for (; r !== null && n < t;) { let i = e[n]; for (i <= 90 && i >= 65 && (i |= 32); r !== null;) { if (i === r.code) { if (t === ++n) return r; r = r.middle; break; } r = r.code < i ? r.left : r.right; } } return null; } }, a = class { node = null; insert(e, t) { this.node === null ? this.node = new i(e, t, 0) : this.node.add(e, t); } lookup(e) { return this.node?.search(e)?.value ?? null; } }; let o = new a(); for (let e = 0; e < n.length; ++e) { let t = r[n[e]]; o.insert(t, t); } t.exports = { TernarySearchTree: a, tree: o }; })); var B$1 = c$3(((e, t) => { let r = p$4(`node:assert`), { kDestroyed: i, kBodyUsed: a, kListeners: o, kBody: s } = I$1(), { IncomingMessage: c } = p$4(`node:http`), l = p$4(`node:stream`), u = p$4(`node:net`), { stringify: d } = p$4(`node:querystring`), { EventEmitter: f } = p$4(`node:events`), p = L$1(), { InvalidArgumentError: m, ConnectTimeoutError: h } = R$1(), { headerNameLowerCasedRecord: g } = ee$2(), { tree: _ } = z$1(), [v, y] = process.versions.node.split(`.`, 2).map((e) => Number(e)); var b = class { constructor(e) { this[s] = e, this[a] = !1; } async *[Symbol.asyncIterator]() { r(!this[a], `disturbed`), this[a] = !0, yield* this[s]; } }; function x() {} function S(e) { return C(e) ? (V(e) === 0 && e.on(`data`, function() { r(!1); }), typeof e.readableDidRead != `boolean` && (e[a] = !1, f.prototype.on.call(e, `data`, function() { this[a] = !0; })), e) : e && typeof e.pipeTo == `function` ? new b(e) : e && q(e) ? e : e && typeof e != `string` && !ArrayBuffer.isView(e) && F(e) ? new b(e) : e; } function C(e) { return e && typeof e == `object` && typeof e.pipe == `function` && typeof e.on == `function`; } function w(e) { if (e === null) return !1; if (e instanceof Blob) return !0; if (typeof e != `object`) return !1; { let t = e[Symbol.toStringTag]; return (t === `Blob` || t === `File`) && (`stream` in e && typeof e.stream == `function` || `arrayBuffer` in e && typeof e.arrayBuffer == `function`); } } function T(e) { return e.includes(`?`) || e.includes(`#`); } function E(e, t) { if (T(e)) throw Error(`Query params cannot be passed when url already contains "?" or "#".`); let n = d(t); return n && (e += `?` + n), e; } function D(e) { let t = parseInt(e, 10); return t === Number(e) && t >= 0 && t <= 65535; } function O(e) { return e != null && e[0] === `h` && e[1] === `t` && e[2] === `t` && e[3] === `p` && (e[4] === `:` || e[4] === `s` && e[5] === `:`); } function k(e) { if (typeof e == `string`) { if (e = new URL(e), !O(e.origin || e.protocol)) throw new m("Invalid URL protocol: the URL must start with `http:` or `https:`."); return e; } if (!e || typeof e != `object`) throw new m(`Invalid URL: The URL argument must be a non-null object.`); if (!(e instanceof URL)) { if (e.port != null && e.port !== `` && D(e.port) === !1) throw new m(`Invalid URL: port must be a valid integer or a string representation of an integer.`); if (e.path != null && typeof e.path != `string`) throw new m(`Invalid URL path: the path must be a string or null/undefined.`); if (e.pathname != null && typeof e.pathname != `string`) throw new m(`Invalid URL pathname: the pathname must be a string or null/undefined.`); if (e.hostname != null && typeof e.hostname != `string`) throw new m(`Invalid URL hostname: the hostname must be a string or null/undefined.`); if (e.origin != null && typeof e.origin != `string`) throw new m(`Invalid URL origin: the origin must be a string or null/undefined.`); if (!O(e.origin || e.protocol)) throw new m("Invalid URL protocol: the URL must start with `http:` or `https:`."); let t = e.port == null ? e.protocol === `https:` ? 443 : 80 : e.port, n = e.origin == null ? `${e.protocol || ``}//${e.hostname || ``}:${t}` : e.origin, r = e.path == null ? `${e.pathname || ``}${e.search || ``}` : e.path; return n[n.length - 1] === `/` && (n = n.slice(0, n.length - 1)), r && r[0] !== `/` && (r = `/${r}`), new URL(`${n}${r}`); } if (!O(e.origin || e.protocol)) throw new m("Invalid URL protocol: the URL must start with `http:` or `https:`."); return e; } function A(e) { if (e = k(e), e.pathname !== `/` || e.search || e.hash) throw new m(`invalid url`); return e; } function j(e) { if (e[0] === `[`) { let t = e.indexOf(`]`); return r(t !== -1), e.substring(1, t); } let t = e.indexOf(`:`); return t === -1 ? e : e.substring(0, t); } function M(e) { if (!e) return null; r(typeof e == `string`); let t = j(e); return u.isIP(t) ? `` : t; } function N(e) { return JSON.parse(JSON.stringify(e)); } function P(e) { return e != null && typeof e[Symbol.asyncIterator] == `function`; } function F(e) { return e != null && (typeof e[Symbol.iterator] == `function` || typeof e[Symbol.asyncIterator] == `function`); } function B(e) { let t = Object.getPrototypeOf(e); return Object.prototype.hasOwnProperty.call(e, Symbol.iterator) || t != null && t !== Object.prototype && typeof e[Symbol.iterator] == `function`; } function V(e) { if (e == null) return 0; if (C(e)) { let t = e._readableState; return t && t.objectMode === !1 && t.ended === !0 && Number.isFinite(t.length) ? t.length : null; } else if (w(e)) return e.size == null ? null : e.size; else if (ae(e)) return e.byteLength; return null; } function H(e) { return e && !!(e.destroyed || e[i] || l.isDestroyed?.(e)); } function te(e, t) { e == null || !C(e) || H(e) || (typeof e.destroy == `function` ? (Object.getPrototypeOf(e).constructor === c && (e.socket = null), e.destroy(t)) : t && queueMicrotask(() => { e.emit(`error`, t); }), e.destroyed !== !0 && (e[i] = !0)); } let U = /timeout=(\d+)/; function W(e) { let t = e.match(U); return t ? parseInt(t[1], 10) * 1e3 : null; } function ne(e) { return typeof e == `string` ? g[e] ?? e.toLowerCase() : _.lookup(e) ?? e.toString(`latin1`).toLowerCase(); } function G(e) { return _.lookup(e) ?? e.toString(`latin1`).toLowerCase(); } function K(e, t) { t === void 0 && (t = {}); for (let n = 0; n < e.length; n += 2) { let r = ne(e[n]), i = t[r]; if (i !== void 0) if (Object.hasOwn(t, r)) typeof i == `string` && (i = [i], t[r] = i), i.push(e[n + 1].toString(`latin1`)); else { let i = typeof e[n + 1] == `string` ? e[n + 1] : Array.isArray(e[n + 1]) ? e[n + 1].map((e) => e.toString(`latin1`)) : e[n + 1].toString(`latin1`); r === `__proto__` ? Object.defineProperty(t, r, { value: i, enumerable: !0, configurable: !0, writable: !0 }) : t[r] = i; } else { let i = typeof e[n + 1] == `string` ? e[n + 1] : Array.isArray(e[n + 1]) ? e[n + 1].map((e) => e.toString(`latin1`)) : e[n + 1].toString(`latin1`); t[r] = i; } } return t; } function re(e) { let t = e.length, n = Array(t), r, i; for (let a = 0; a < t; a += 2) r = e[a], i = e[a + 1], typeof r != `string` && (r = r.toString()), typeof i != `string` && (i = i.toString(`latin1`)), n[a] = r, n[a + 1] = i; return n; } function ie(e) { if (!Array.isArray(e)) throw TypeError(`expected headers to be an array`); return e.map((e) => Buffer.from(e)); } function ae(e) { return e instanceof Uint8Array || Buffer.isBuffer(e); } function oe(e, t, n) { if (!e || typeof e != `object`) throw new m(`handler must be an object`); if (typeof e.onRequestStart != `function`) { if (typeof e.onConnect != `function`) throw new m(`invalid onConnect method`); if (typeof e.onError != `function`) throw new m(`invalid onError method`); if (typeof e.onBodySent != `function` && e.onBodySent !== void 0) throw new m(`invalid onBodySent method`); if (n || t === `CONNECT`) { if (typeof e.onUpgrade != `function`) throw new m(`invalid onUpgrade method`); } else { if (typeof e.onHeaders != `function`) throw new m(`invalid onHeaders method`); if (typeof e.onData != `function`) throw new m(`invalid onData method`); if (typeof e.onComplete != `function`) throw new m(`invalid onComplete method`); } } } function se(e) { return !!(e && (l.isDisturbed(e) || e[a])); } function ce(e) { return { localAddress: e.localAddress, localPort: e.localPort, remoteAddress: e.remoteAddress, remotePort: e.remotePort, remoteFamily: e.remoteFamily, timeout: e.timeout, bytesWritten: e.bytesWritten, bytesRead: e.bytesRead }; } function le(e) { let t; return new ReadableStream({ start() { t = e[Symbol.asyncIterator](); }, pull(e) { return t.next().then(({ done: t, value: n }) => { if (t) return queueMicrotask(() => { e.close(), e.byobRequest?.respond(0); }); { let t = Buffer.isBuffer(n) ? n : Buffer.from(n); return t.byteLength ? e.enqueue(new Uint8Array(t)) : this.pull(e); } }); }, cancel() { return t.return(); }, type: `bytes` }); } function q(e) { return e && typeof e == `object` && typeof e.append == `function` && typeof e.delete == `function` && typeof e.get == `function` && typeof e.getAll == `function` && typeof e.has == `function` && typeof e.set == `function` && e[Symbol.toStringTag] === `FormData`; } function J(e, t) { return `addEventListener` in e ? (e.addEventListener(`abort`, t, { once: !0 }), () => e.removeEventListener(`abort`, t)) : (e.once(`abort`, t), () => e.removeListener(`abort`, t)); } let ue = new Uint8Array([ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]); function de(e) { return ue[e] === 1; } let Y = /^[\^_`a-zA-Z\-0-9!#$%&'*+.|~]+$/; function fe(e) { if (e.length >= 12) return Y.test(e); if (e.length === 0) return !1; for (let t = 0; t < e.length; t++) if (ue[e.charCodeAt(t)] !== 1) return !1; return !0; } let pe = /[^\t\x20-\x7e\x80-\xff]/; function X(e) { return !pe.test(e); } let me = /^bytes (\d+)-(\d+)\/(\d+)?$/; function he(e) { if (e == null || e === ``) return { start: 0, end: null, size: null }; let t = e ? e.match(me) : null; return t ? { start: parseInt(t[1]), end: t[2] ? parseInt(t[2]) : null, size: t[3] ? parseInt(t[3]) : null } : null; } function ge(e, t, n) { return (e[o] ??= []).push([t, n]), e.on(t, n), e; } function Z(e) { if (e[o] != null) { for (let [t, n] of e[o]) e.removeListener(t, n); e[o] = null; } return e; } function _e(e, t, n) { try { t.onError(n), r(t.aborted); } catch (t) { e.emit(`error`, t); } } let ve = process.platform === `win32` ? (e, t) => { if (!t.timeout) return x; let n = null, r = null, i = p.setFastTimeout(() => { n = setImmediate(() => { r = setImmediate(() => ye(e.deref(), t)); }); }, t.timeout); return () => { p.clearFastTimeout(i), clearImmediate(n), clearImmediate(r); }; } : (e, t) => { if (!t.timeout) return x; let n = null, r = p.setFastTimeout(() => { n = setImmediate(() => { ye(e.deref(), t); }); }, t.timeout); return () => { p.clearFastTimeout(r), clearImmediate(n); }; }; function ye(e, t) { if (e == null) return; let n = `Connect Timeout Error`; Array.isArray(e.autoSelectFamilyAttemptedAddresses) ? n += ` (attempted addresses: ${e.autoSelectFamilyAttemptedAddresses.join(`, `)},` : n += ` (attempted address: ${t.hostname}:${t.port},`, n += ` timeout: ${t.timeout}ms)`, te(e, new h(n)); } function be(e) { if (e[0] === `h` && e[1] === `t` && e[2] === `t` && e[3] === `p`) switch (e[4]) { case `:`: return `http:`; case `s`: if (e[5] === `:`) return `https:`; } return e.slice(0, e.indexOf(`:`) + 1); } let xe = Object.create(null); xe.enumerable = !0; let Se = { delete: `DELETE`, DELETE: `DELETE`, get: `GET`, GET: `GET`, head: `HEAD`, HEAD: `HEAD`, options: `OPTIONS`, OPTIONS: `OPTIONS`, post: `POST`, POST: `POST`, put: `PUT`, PUT: `PUT` }, Ce = { ...Se, patch: `patch`, PATCH: `PATCH` }; Object.setPrototypeOf(Se, null), Object.setPrototypeOf(Ce, null), t.exports = { kEnumerableProperty: xe, isDisturbed: se, isBlobLike: w, parseOrigin: A, parseURL: k, getServerName: M, isStream: C, isIterable: F, hasSafeIterator: B, isAsyncIterable: P, isDestroyed: H, headerNameToString: ne, bufferToLowerCasedHeaderName: G, addListener: ge, removeAllListeners: Z, errorRequest: _e, parseRawHeaders: re, encodeRawHeaders: ie, parseHeaders: K, parseKeepAliveTimeout: W, destroy: te, bodyLength: V, deepClone: N, ReadableStreamFrom: le, isBuffer: ae, assertRequestHandler: oe, getSocketInfo: ce, isFormDataLike: q, pathHasQueryOrFragment: T, serializePathWithQuery: E, addAbortListener: J, isValidHTTPToken: fe, isValidHeaderValue: X, isTokenCharCode: de, parseRangeHeader: he, normalizedMethodRecordsBase: Se, normalizedMethodRecords: Ce, isValidPort: D, isHttpOrHttpsPrefixed: O, nodeMajor: v, nodeMinor: y, safeHTTPMethods: Object.freeze([ `GET`, `HEAD`, `OPTIONS`, `TRACE` ]), wrapRequestBody: S, setupConnectTimeout: ve, getProtocolFromUrlString: be }; })); var V$1 = c$3(((e, t) => { let { kConnected: n, kPending: r, kRunning: i, kSize: a, kFree: o, kQueued: s } = I$1(); t.exports = { ClientStats: class { constructor(e) { this.connected = e[n], this.pending = e[r], this.running = e[i], this.size = e[a]; } }, PoolStats: class { constructor(e) { this.connected = e[n], this.free = e[o], this.pending = e[r], this.queued = e[s], this.running = e[i], this.size = e[a]; } } }; })); var H$1 = c$3(((e, t) => { let r = p$4(`node:diagnostics_channel`), i = p$4(`node:util`), a = i.debuglog(`undici`), o = i.debuglog(`fetch`), s = i.debuglog(`websocket`), c = { beforeConnect: r.channel(`undici:client:beforeConnect`), connected: r.channel(`undici:client:connected`), connectError: r.channel(`undici:client:connectError`), sendHeaders: r.channel(`undici:client:sendHeaders`), create: r.channel(`undici:request:create`), bodySent: r.channel(`undici:request:bodySent`), bodyChunkSent: r.channel(`undici:request:bodyChunkSent`), bodyChunkReceived: r.channel(`undici:request:bodyChunkReceived`), headers: r.channel(`undici:request:headers`), trailers: r.channel(`undici:request:trailers`), error: r.channel(`undici:request:error`), open: r.channel(`undici:websocket:open`), close: r.channel(`undici:websocket:close`), socketError: r.channel(`undici:websocket:socket_error`), ping: r.channel(`undici:websocket:ping`), pong: r.channel(`undici:websocket:pong`), proxyConnected: r.channel(`undici:proxy:connected`) }, l = !1; function u(e = a) { if (!l) { if (c.beforeConnect.hasSubscribers || c.connected.hasSubscribers || c.connectError.hasSubscribers || c.sendHeaders.hasSubscribers) { l = !0; return; } l = !0, r.subscribe(`undici:client:beforeConnect`, (t) => { let { connectParams: { version: n, protocol: r, port: i, host: a } } = t; e(`connecting to %s%s using %s%s`, a, i ? `:${i}` : ``, r, n); }), r.subscribe(`undici:client:connected`, (t) => { let { connectParams: { version: n, protocol: r, port: i, host: a } } = t; e(`connected to %s%s using %s%s`, a, i ? `:${i}` : ``, r, n); }), r.subscribe(`undici:client:connectError`, (t) => { let { connectParams: { version: n, protocol: r, port: i, host: a }, error: o } = t; e(`connection to %s%s using %s%s errored - %s`, a, i ? `:${i}` : ``, r, n, o.message); }), r.subscribe(`undici:client:sendHeaders`, (t) => { let { request: { method: n, path: r, origin: i } } = t; e(`sending request to %s %s%s`, n, i, r); }); } } let d = !1; function f(e = a) { if (!d) { if (c.headers.hasSubscribers || c.trailers.hasSubscribers || c.error.hasSubscribers) { d = !0; return; } d = !0, r.subscribe(`undici:request:headers`, (t) => { let { request: { method: n, path: r, origin: i }, response: { statusCode: a } } = t; e(`received response to %s %s%s - HTTP %d`, n, i, r, a); }), r.subscribe(`undici:request:trailers`, (t) => { let { request: { method: n, path: r, origin: i } } = t; e(`trailers received from %s %s%s`, n, i, r); }), r.subscribe(`undici:request:error`, (t) => { let { request: { method: n, path: r, origin: i }, error: a } = t; e(`request to %s %s%s errored - %s`, n, i, r, a.message); }); } } let p = !1; function m(e = s) { if (!p) { if (c.open.hasSubscribers || c.close.hasSubscribers || c.socketError.hasSubscribers || c.ping.hasSubscribers || c.pong.hasSubscribers) { p = !0; return; } p = !0, r.subscribe(`undici:websocket:open`, (t) => { if (t.address != null) { let { address: n, port: r } = t.address; e(`connection opened %s%s`, n, r ? `:${r}` : ``); } else e(`connection opened`); }), r.subscribe(`undici:websocket:close`, (t) => { let { websocket: n, code: r, reason: i } = t; e(`closed connection to %s - %s %s`, n.url, r, i); }), r.subscribe(`undici:websocket:socket_error`, (t) => { e(`connection errored - %s`, t.message); }), r.subscribe(`undici:websocket:ping`, (t) => { e(`ping received`); }), r.subscribe(`undici:websocket:pong`, (t) => { e(`pong received`); }); } } (a.enabled || o.enabled) && (u(o.enabled ? o : a), f(o.enabled ? o : a)), s.enabled && (u(a.enabled ? a : s), m(s)), t.exports = { channels: c }; })); var te$1 = c$3(((e, t) => { let { InvalidArgumentError: r, NotSupportedError: i } = R$1(), a = p$4(`node:assert`), { isValidHTTPToken: o, isValidHeaderValue: s, isStream: c, destroy: l, isBuffer: u, isFormDataLike: d, isIterable: f, hasSafeIterator: p, isBlobLike: m, serializePathWithQuery: h, assertRequestHandler: g, getServerName: _, normalizedMethodRecords: v, getProtocolFromUrlString: y } = B$1(), { channels: b } = H$1(), { headerNameLowerCasedRecord: x } = ee$2(), S = /[^\u0021-\u00ff]/; function C(e) { if (typeof e != `string` || e.length === 0) return !1; for (let t = 0; t < e.length; t++) { let n = e.charCodeAt(t); if (n < 48 || n > 57) return !1; } return !0; } let w = Symbol(`handler`); var T = class { constructor(e, { path: t, method: n, body: i, headers: a, query: x, idempotent: C, blocking: T, upgrade: D, headersTimeout: O, bodyTimeout: k, reset: A, expectContinue: j, servername: M, throwOnError: N, maxRedirections: P, typeOfService: F }, I) { if (typeof t != `string`) throw new r(`path must be a string`); if (t[0] !== `/` && !(t.startsWith(`http://`) || t.startsWith(`https://`)) && n !== `CONNECT`) throw new r(`path must be an absolute URL or start with a slash`); if (S.test(t)) throw new r(`invalid request path`); if (typeof n != `string`) throw new r(`method must be a string`); if (v[n] === void 0 && !o(n)) throw new r(`invalid request method`); if (D && typeof D != `string`) throw new r(`upgrade must be a string`); if (D && !s(D)) throw new r(`invalid upgrade header`); if (O != null && (!Number.isFinite(O) || O < 0)) throw new r(`invalid headersTimeout`); if (k != null && (!Number.isFinite(k) || k < 0)) throw new r(`invalid bodyTimeout`); if (A != null && typeof A != `boolean`) throw new r(`invalid reset`); if (j != null && typeof j != `boolean`) throw new r(`invalid expectContinue`); if (N != null) throw new r(`invalid throwOnError`); if (P != null && P !== 0) throw new r(`maxRedirections is not supported, use the redirect interceptor`); if (F != null && (!Number.isInteger(F) || F < 0 || F > 255)) throw new r(`typeOfService must be an integer between 0 and 255`); if (this.headersTimeout = O, this.bodyTimeout = k, this.method = n, this.typeOfService = F ?? 0, this.abort = null, i == null) this.body = null; else if (c(i)) { this.body = i; let e = this.body._readableState; (!e || !e.autoDestroy) && (this.endHandler = function() { l(this); }, this.body.on(`end`, this.endHandler)), this.errorHandler = (e) => { this.abort ? this.abort(e) : this.error = e; }, this.body.on(`error`, this.errorHandler); } else if (u(i)) this.body = i.byteLength ? i : null; else if (ArrayBuffer.isView(i)) this.body = i.buffer.byteLength ? Buffer.from(i.buffer, i.byteOffset, i.byteLength) : null; else if (i instanceof ArrayBuffer) this.body = i.byteLength ? Buffer.from(i) : null; else if (typeof i == `string`) this.body = i.length ? Buffer.from(i) : null; else if (d(i) || f(i) || m(i)) this.body = i; else throw new r(`body must be a string, a Buffer, a Readable stream, an iterable, or an async iterable`); if (this.completed = !1, this.aborted = !1, this.upgrade = D || null, this.path = x ? h(t, x) : t, this.origin = e, this.protocol = y(e), this.idempotent = C ?? (n === `HEAD` || n === `GET`), this.blocking = T ?? this.method !== `HEAD`, this.reset = A ?? null, this.host = null, this.contentLength = null, this.contentType = null, this.headers = [], this.expectContinue = j ?? !1, Array.isArray(a)) { if (a.length % 2 != 0) throw new r(`headers array must be even`); for (let e = 0; e < a.length; e += 2) E(this, a[e], a[e + 1]); } else if (a && typeof a == `object`) if (p(a)) for (let e of a) { if (!Array.isArray(e) || e.length !== 2) throw new r(`headers must be in key-value pair format`); E(this, e[0], e[1]); } else { let e = Object.keys(a); for (let t = 0; t < e.length; ++t) E(this, e[t], a[e[t]]); } else if (a != null) throw new r(`headers must be an object or an array`); g(I, n, D), this.servername = M || _(this.host) || null, this[w] = I, b.create.hasSubscribers && b.create.publish({ request: this }); } onBodySent(e) { if (b.bodyChunkSent.hasSubscribers && b.bodyChunkSent.publish({ request: this, chunk: e }), this[w].onBodySent) try { return this[w].onBodySent(e); } catch (e) { this.abort(e); } } onRequestSent() { if (b.bodySent.hasSubscribers && b.bodySent.publish({ request: this }), this[w].onRequestSent) try { return this[w].onRequestSent(); } catch (e) { this.abort(e); } } onConnect(e) { if (a(!this.aborted), a(!this.completed), this.error) e(this.error); else return this.abort = e, this[w].onConnect(e); } onResponseStarted() { return this[w].onResponseStarted?.(); } onHeaders(e, t, n, r) { a(!this.aborted), a(!this.completed), b.headers.hasSubscribers && b.headers.publish({ request: this, response: { statusCode: e, headers: t, statusText: r } }); try { return this[w].onHeaders(e, t, n, r); } catch (e) { this.abort(e); } } onData(e) { a(!this.aborted), a(!this.completed), b.bodyChunkReceived.hasSubscribers && b.bodyChunkReceived.publish({ request: this, chunk: e }); try { return this[w].onData(e); } catch (e) { return this.abort(e), !1; } } onUpgrade(e, t, n) { return a(!this.aborted), a(!this.completed), this[w].onUpgrade(e, t, n); } onComplete(e) { this.onFinally(), a(!this.aborted), a(!this.completed), this.completed = !0, b.trailers.hasSubscribers && b.trailers.publish({ request: this, trailers: e }); try { return this[w].onComplete(e); } catch (e) { this.onError(e); } } onError(e) { if (this.onFinally(), b.error.hasSubscribers && b.error.publish({ request: this, error: e }), !this.aborted) return this.aborted = !0, this[w].onError(e); } onFinally() { this.errorHandler &&= (this.body.off(`error`, this.errorHandler), null), this.endHandler &&= (this.body.off(`end`, this.endHandler), null); } addHeader(e, t) { return E(this, e, t), this; } }; function E(e, t, n) { if (n && typeof n == `object` && !Array.isArray(n)) throw new r(`invalid ${t} header`); if (n === void 0) return; let a = x[t]; if (a === void 0 && (a = t.toLowerCase(), x[a] === void 0 && !o(a))) throw new r(`invalid header key`); if (Array.isArray(n)) { let e = []; for (let i = 0; i < n.length; i++) if (typeof n[i] == `string`) { if (!s(n[i])) throw new r(`invalid ${t} header`); e.push(n[i]); } else if (n[i] === null) e.push(``); else if (typeof n[i] == `object`) throw new r(`invalid ${t} header`); else e.push(`${n[i]}`); n = e; } else if (typeof n == `string`) { if (!s(n)) throw new r(`invalid ${t} header`); } else n = n === null ? `` : `${n}`; if (a === `host`) { if (e.host !== null) throw new r(`duplicate host header`); if (typeof n != `string`) throw new r(`invalid host header`); e.host = n; } else if (a === `content-length`) { if (e.contentLength !== null) throw new r(`duplicate content-length header`); if (!C(n)) throw new r(`invalid content-length header`); e.contentLength = parseInt(n, 10); } else if (e.contentType === null && a === `content-type`) e.contentType = n, e.headers.push(t, n); else if (a === `transfer-encoding` || a === `keep-alive` || a === `upgrade`) throw new r(`invalid ${a} header`); else if (a === `connection`) { let t = typeof n == `string` ? n : null; if (t === null) throw new r(`invalid connection header`); for (let n of t.toLowerCase().split(`,`)) { let t = n.trim(); if (!o(t)) throw new r(`invalid connection header`); t === `close` && (e.reset = !0); } } else if (a === `expect`) throw new i(`expect header not supported`); else e.headers.push(t, n); } t.exports = T; })); var U$1 = c$3(((e, t) => { let { InvalidArgumentError: n } = R$1(); t.exports = class e { #e; constructor(e) { this.#e = e; } static wrap(t) { return t.onRequestStart ? t : new e(t); } onConnect(e, t) { return this.#e.onConnect?.(e, t); } onResponseStarted() { return this.#e.onResponseStarted?.(); } onHeaders(e, t, n, r) { return this.#e.onHeaders?.(e, t, n, r); } onUpgrade(e, t, n) { return this.#e.onUpgrade?.(e, t, n); } onData(e) { return this.#e.onData?.(e); } onComplete(e) { return this.#e.onComplete?.(e); } onError(e) { if (!this.#e.onError) throw e; return this.#e.onError?.(e); } onRequestStart(e, t) { this.#e.onConnect?.((t) => e.abort(t), t); } onRequestUpgrade(e, t, n, i) { let a = []; for (let [e, t] of Object.entries(n)) a.push(Buffer.from(e, `latin1`), r(t)); this.#e.onUpgrade?.(t, a, i); } onResponseStart(e, t, n, i) { let a = []; for (let [e, t] of Object.entries(n)) a.push(Buffer.from(e, `latin1`), r(t)); this.#e.onHeaders?.(t, a, () => e.resume(), i) === !1 && e.pause(); } onResponseData(e, t) { this.#e.onData?.(t) === !1 && e.pause(); } onResponseEnd(e, t) { let n = []; for (let [e, i] of Object.entries(t)) n.push(Buffer.from(e, `latin1`), r(i)); this.#e.onComplete?.(n); } onResponseError(e, t) { if (!this.#e.onError) throw new n(`invalid onError method`); this.#e.onError?.(t); } }; function r(e) { return Array.isArray(e) ? e.map((e) => Buffer.from(e, `latin1`)) : Buffer.from(e, `latin1`); } })); var W$1 = c$3(((e, t) => { let r = p$4(`node:events`), i = U$1(), a = (e) => (t, n) => e(t, i.wrap(n)); t.exports = class extends r { dispatch() { throw Error(`not implemented`); } close() { throw Error(`not implemented`); } destroy() { throw Error(`not implemented`); } compose(...e) { let t = Array.isArray(e[0]) ? e[0] : e, n = this.dispatch.bind(this); for (let e of t) if (e != null) { if (typeof e != `function`) throw TypeError(`invalid interceptor, expected function received ${typeof e}`); if (n = e(n), n = a(n), n == null || typeof n != `function` || n.length !== 2) throw TypeError(`invalid interceptor`); } return new Proxy(this, { get: (e, t) => t === `dispatch` ? n : e[t] }); } }; })); var ne$1 = c$3(((e, t) => { let { parseHeaders: n } = B$1(), { InvalidArgumentError: r } = R$1(), i = Symbol(`resume`); var a = class { #e = !1; #t = null; #n = !1; #r; [i] = null; rawHeaders = null; rawTrailers = null; constructor(e) { this.#r = e; } pause() { this.#e = !0; } resume() { this.#e && (this.#e = !1, this[i]?.()); } abort(e) { this.#n || (this.#n = !0, this.#t = e, this.#r(e)); } get aborted() { return this.#n; } get reason() { return this.#t; } get paused() { return this.#e; } }; t.exports = class e { #e; #t; constructor(e) { this.#e = e; } static unwrap(t) { return t.onRequestStart ? new e(t) : t; } onConnect(e, t) { this.#t = new a(e), this.#e.onRequestStart?.(this.#t, t); } onResponseStarted() { return this.#e.onResponseStarted?.(); } onUpgrade(e, t, r) { this.#t.rawHeaders = t, this.#e.onRequestUpgrade?.(this.#t, e, n(t), r); } onHeaders(e, t, r, a) { return this.#t[i] = r, this.#t.rawHeaders = t, this.#e.onResponseStart?.(this.#t, e, n(t), a), !this.#t.paused; } onData(e) { return this.#e.onResponseData?.(this.#t, e), !this.#t.paused; } onComplete(e) { this.#t.rawTrailers = e, this.#e.onResponseEnd?.(this.#t, n(e)); } onError(e) { if (!this.#e.onResponseError) throw new r(`invalid onError method`); this.#e.onResponseError?.(this.#t, e); } }; })); var G$2 = c$3(((e, t) => { let n = W$1(), r = ne$1(), { ClientDestroyedError: i, ClientClosedError: a, InvalidArgumentError: o } = R$1(), { kDestroy: s, kClose: c, kClosed: l, kDestroyed: u, kDispatch: d } = I$1(), f = Symbol(`onDestroyed`), p = Symbol(`onClosed`); t.exports = class extends n { [u] = !1; [f] = null; [l] = !1; [p] = null; get destroyed() { return this[u]; } get closed() { return this[l]; } close(e) { if (e === void 0) return new Promise((e, t) => { this.close((n, r) => n ? t(n) : e(r)); }); if (typeof e != `function`) throw new o(`invalid callback`); if (this[u]) { let t = new i(); queueMicrotask(() => e(t, null)); return; } if (this[l]) { this[p] ? this[p].push(e) : queueMicrotask(() => e(null, null)); return; } this[l] = !0, this[p] ??= [], this[p].push(e); let t = () => { let e = this[p]; this[p] = null; for (let t = 0; t < e.length; t++) e[t](null, null); }; this[c]().then(() => this.destroy()).then(() => queueMicrotask(t)); } destroy(e, t) { if (typeof e == `function` && (t = e, e = null), t === void 0) return new Promise((t, n) => { this.destroy(e, (e, r) => e ? n(e) : t(r)); }); if (typeof t != `function`) throw new o(`invalid callback`); if (this[u]) { this[f] ? this[f].push(t) : queueMicrotask(() => t(null, null)); return; } e ||= new i(), this[u] = !0, this[f] ??= [], this[f].push(t); let n = () => { let e = this[f]; this[f] = null; for (let t = 0; t < e.length; t++) e[t](null, null); }; this[s](e).then(() => queueMicrotask(n)); } dispatch(e, t) { if (!t || typeof t != `object`) throw new o(`handler must be an object`); t = r.unwrap(t); try { if (!e || typeof e != `object`) throw new o(`opts must be an object.`); if (this[u] || this[f]) throw new i(); if (this[l]) throw new a(); return this[d](e, t); } catch (e) { if (typeof t.onError != `function`) throw e; return t.onError(e), !1; } } }; })); var K$1 = c$3(((e, t) => { let r = p$4(`node:net`), i = p$4(`node:assert`), a = B$1(), { InvalidArgumentError: o } = R$1(), s, c = class { constructor(e) { this._maxCachedSessions = e, this._sessionCache = /* @__PURE__ */ new Map(), this._sessionRegistry = new FinalizationRegistry((e) => { if (this._sessionCache.size < this._maxCachedSessions) return; let t = this._sessionCache.get(e); t !== void 0 && t.deref() === void 0 && this._sessionCache.delete(e); }); } get(e) { let t = this._sessionCache.get(e); return t ? t.deref() : null; } set(e, t) { if (this._maxCachedSessions !== 0) { if (this._sessionCache.has(e)) this._sessionCache.delete(e); else if (this._sessionCache.size >= this._maxCachedSessions) { for (let [e, t] of this._sessionCache) if (t.deref() === void 0) { this._sessionCache.delete(e); return; } let e = this._sessionCache.keys().next(); e.done || this._sessionCache.delete(e.value); } this._sessionCache.set(e, new WeakRef(t)), this._sessionRegistry.register(t, e); } } }; function l({ allowH2: e, useH2c: t, maxCachedSessions: l, socketPath: u, timeout: d, session: f, ...p }) { if (l != null && (!Number.isInteger(l) || l < 0)) throw new o(`maxCachedSessions must be a positive integer or zero`); let m = { path: u, ...p }, h = new c(l ?? 100); return d ??= 1e4, e ??= !1, function({ hostname: o, host: c, protocol: l, port: u, servername: p, localAddress: g, httpSocket: _ }, v) { let y; if (l === `https:`) { s ||= p$4(`node:tls`), p = p || m.servername || a.getServerName(c) || null; let t = p || o; i(t); let r = f || h.get(t) || null; u ||= 443, y = s.connect({ highWaterMark: 16384, ...m, servername: p, session: r, localAddress: g, ALPNProtocols: e ? [`http/1.1`, `h2`] : [`http/1.1`], socket: _, port: u, host: o }), y.on(`session`, function(e) { h.set(t, e); }); } else i(!_, `httpSocket can only be sent on TLS update`), u ||= 80, y = r.connect({ highWaterMark: 64 * 1024, ...m, localAddress: g, port: u, host: o }), t === !0 && (y.alpnProtocol = `h2`); if (m.keepAlive == null || m.keepAlive) { let e = m.keepAliveInitialDelay === void 0 ? 6e4 : m.keepAliveInitialDelay; y.setKeepAlive(!0, e); } let b = a.setupConnectTimeout(new WeakRef(y), { timeout: d, hostname: o, port: u }); return y.setNoDelay(!0).once(l === `https:` ? `secureConnect` : `connect`, function() { if (queueMicrotask(b), v) { let e = v; v = null, e(null, this); } }).on(`error`, function(e) { if (queueMicrotask(b), v) { let t = v; v = null, t(e); } }), y; }; } t.exports = l; })); var re$1 = c$3(((e) => { Object.defineProperty(e, "__esModule", { value: !0 }), e.enumToMap = t; function t(e, t = [], n = []) { let r = (t?.length ?? 0) === 0, i = (n?.length ?? 0) === 0; return Object.fromEntries(Object.entries(e).filter(([, e]) => typeof e == `number` && (r || t.includes(e)) && (i || !n.includes(e)))); } })); var ie$1 = c$3(((e) => { Object.defineProperty(e, "__esModule", { value: !0 }), e.SPECIAL_HEADERS = e.MINOR = e.MAJOR = e.HTAB_SP_VCHAR_OBS_TEXT = e.QUOTED_STRING = e.CONNECTION_TOKEN_CHARS = e.HEADER_CHARS = e.TOKEN = e.HEX = e.URL_CHAR = e.USERINFO_CHARS = e.MARK = e.ALPHANUM = e.NUM = e.HEX_MAP = e.NUM_MAP = e.ALPHA = e.STATUSES_HTTP = e.H_METHOD_MAP = e.METHOD_MAP = e.METHODS_RTSP = e.METHODS_ICE = e.METHODS_HTTP = e.HEADER_STATE = e.FINISH = e.STATUSES = e.METHODS = e.LENIENT_FLAGS = e.FLAGS = e.TYPE = e.ERROR = void 0; let t = re$1(); e.ERROR = { OK: 0, INTERNAL: 1, STRICT: 2, CR_EXPECTED: 25, LF_EXPECTED: 3, UNEXPECTED_CONTENT_LENGTH: 4, UNEXPECTED_SPACE: 30, CLOSED_CONNECTION: 5, INVALID_METHOD: 6, INVALID_URL: 7, INVALID_CONSTANT: 8, INVALID_VERSION: 9, INVALID_HEADER_TOKEN: 10, INVALID_CONTENT_LENGTH: 11, INVALID_CHUNK_SIZE: 12, INVALID_STATUS: 13, INVALID_EOF_STATE: 14, INVALID_TRANSFER_ENCODING: 15, CB_MESSAGE_BEGIN: 16, CB_HEADERS_COMPLETE: 17, CB_MESSAGE_COMPLETE: 18, CB_CHUNK_HEADER: 19, CB_CHUNK_COMPLETE: 20, PAUSED: 21, PAUSED_UPGRADE: 22, PAUSED_H2_UPGRADE: 23, USER: 24, CB_URL_COMPLETE: 26, CB_STATUS_COMPLETE: 27, CB_METHOD_COMPLETE: 32, CB_VERSION_COMPLETE: 33, CB_HEADER_FIELD_COMPLETE: 28, CB_HEADER_VALUE_COMPLETE: 29, CB_CHUNK_EXTENSION_NAME_COMPLETE: 34, CB_CHUNK_EXTENSION_VALUE_COMPLETE: 35, CB_RESET: 31, CB_PROTOCOL_COMPLETE: 38 }, e.TYPE = { BOTH: 0, REQUEST: 1, RESPONSE: 2 }, e.FLAGS = { CONNECTION_KEEP_ALIVE: 1, CONNECTION_CLOSE: 2, CONNECTION_UPGRADE: 4, CHUNKED: 8, UPGRADE: 16, CONTENT_LENGTH: 32, SKIPBODY: 64, TRAILING: 128, TRANSFER_ENCODING: 512 }, e.LENIENT_FLAGS = { HEADERS: 1, CHUNKED_LENGTH: 2, KEEP_ALIVE: 4, TRANSFER_ENCODING: 8, VERSION: 16, DATA_AFTER_CLOSE: 32, OPTIONAL_LF_AFTER_CR: 64, OPTIONAL_CRLF_AFTER_CHUNK: 128, OPTIONAL_CR_BEFORE_LF: 256, SPACES_AFTER_CHUNK_SIZE: 512 }, e.METHODS = { DELETE: 0, GET: 1, HEAD: 2, POST: 3, PUT: 4, CONNECT: 5, OPTIONS: 6, TRACE: 7, COPY: 8, LOCK: 9, MKCOL: 10, MOVE: 11, PROPFIND: 12, PROPPATCH: 13, SEARCH: 14, UNLOCK: 15, BIND: 16, REBIND: 17, UNBIND: 18, ACL: 19, REPORT: 20, MKACTIVITY: 21, CHECKOUT: 22, MERGE: 23, "M-SEARCH": 24, NOTIFY: 25, SUBSCRIBE: 26, UNSUBSCRIBE: 27, PATCH: 28, PURGE: 29, MKCALENDAR: 30, LINK: 31, UNLINK: 32, SOURCE: 33, PRI: 34, DESCRIBE: 35, ANNOUNCE: 36, SETUP: 37, PLAY: 38, PAUSE: 39, TEARDOWN: 40, GET_PARAMETER: 41, SET_PARAMETER: 42, REDIRECT: 43, RECORD: 44, FLUSH: 45, QUERY: 46 }, e.STATUSES = { CONTINUE: 100, SWITCHING_PROTOCOLS: 101, PROCESSING: 102, EARLY_HINTS: 103, RESPONSE_IS_STALE: 110, REVALIDATION_FAILED: 111, DISCONNECTED_OPERATION: 112, HEURISTIC_EXPIRATION: 113, MISCELLANEOUS_WARNING: 199, OK: 200, CREATED: 201, ACCEPTED: 202, NON_AUTHORITATIVE_INFORMATION: 203, NO_CONTENT: 204, RESET_CONTENT: 205, PARTIAL_CONTENT: 206, MULTI_STATUS: 207, ALREADY_REPORTED: 208, TRANSFORMATION_APPLIED: 214, IM_USED: 226, MISCELLANEOUS_PERSISTENT_WARNING: 299, MULTIPLE_CHOICES: 300, MOVED_PERMANENTLY: 301, FOUND: 302, SEE_OTHER: 303, NOT_MODIFIED: 304, USE_PROXY: 305, SWITCH_PROXY: 306, TEMPORARY_REDIRECT: 307, PERMANENT_REDIRECT: 308, BAD_REQUEST: 400, UNAUTHORIZED: 401, PAYMENT_REQUIRED: 402, FORBIDDEN: 403, NOT_FOUND: 404, METHOD_NOT_ALLOWED: 405, NOT_ACCEPTABLE: 406, PROXY_AUTHENTICATION_REQUIRED: 407, REQUEST_TIMEOUT: 408, CONFLICT: 409, GONE: 410, LENGTH_REQUIRED: 411, PRECONDITION_FAILED: 412, PAYLOAD_TOO_LARGE: 413, URI_TOO_LONG: 414, UNSUPPORTED_MEDIA_TYPE: 415, RANGE_NOT_SATISFIABLE: 416, EXPECTATION_FAILED: 417, IM_A_TEAPOT: 418, PAGE_EXPIRED: 419, ENHANCE_YOUR_CALM: 420, MISDIRECTED_REQUEST: 421, UNPROCESSABLE_ENTITY: 422, LOCKED: 423, FAILED_DEPENDENCY: 424, TOO_EARLY: 425, UPGRADE_REQUIRED: 426, PRECONDITION_REQUIRED: 428, TOO_MANY_REQUESTS: 429, REQUEST_HEADER_FIELDS_TOO_LARGE_UNOFFICIAL: 430, REQUEST_HEADER_FIELDS_TOO_LARGE: 431, LOGIN_TIMEOUT: 440, NO_RESPONSE: 444, RETRY_WITH: 449, BLOCKED_BY_PARENTAL_CONTROL: 450, UNAVAILABLE_FOR_LEGAL_REASONS: 451, CLIENT_CLOSED_LOAD_BALANCED_REQUEST: 460, INVALID_X_FORWARDED_FOR: 463, REQUEST_HEADER_TOO_LARGE: 494, SSL_CERTIFICATE_ERROR: 495, SSL_CERTIFICATE_REQUIRED: 496, HTTP_REQUEST_SENT_TO_HTTPS_PORT: 497, INVALID_TOKEN: 498, CLIENT_CLOSED_REQUEST: 499, INTERNAL_SERVER_ERROR: 500, NOT_IMPLEMENTED: 501, BAD_GATEWAY: 502, SERVICE_UNAVAILABLE: 503, GATEWAY_TIMEOUT: 504, HTTP_VERSION_NOT_SUPPORTED: 505, VARIANT_ALSO_NEGOTIATES: 506, INSUFFICIENT_STORAGE: 507, LOOP_DETECTED: 508, BANDWIDTH_LIMIT_EXCEEDED: 509, NOT_EXTENDED: 510, NETWORK_AUTHENTICATION_REQUIRED: 511, WEB_SERVER_UNKNOWN_ERROR: 520, WEB_SERVER_IS_DOWN: 521, CONNECTION_TIMEOUT: 522, ORIGIN_IS_UNREACHABLE: 523, TIMEOUT_OCCURED: 524, SSL_HANDSHAKE_FAILED: 525, INVALID_SSL_CERTIFICATE: 526, RAILGUN_ERROR: 527, SITE_IS_OVERLOADED: 529, SITE_IS_FROZEN: 530, IDENTITY_PROVIDER_AUTHENTICATION_ERROR: 561, NETWORK_READ_TIMEOUT: 598, NETWORK_CONNECT_TIMEOUT: 599 }, e.FINISH = { SAFE: 0, SAFE_WITH_CB: 1, UNSAFE: 2 }, e.HEADER_STATE = { GENERAL: 0, CONNECTION: 1, CONTENT_LENGTH: 2, TRANSFER_ENCODING: 3, UPGRADE: 4, CONNECTION_KEEP_ALIVE: 5, CONNECTION_CLOSE: 6, CONNECTION_UPGRADE: 7, TRANSFER_ENCODING_CHUNKED: 8 }, e.METHODS_HTTP = [ e.METHODS.DELETE, e.METHODS.GET, e.METHODS.HEAD, e.METHODS.POST, e.METHODS.PUT, e.METHODS.CONNECT, e.METHODS.OPTIONS, e.METHODS.TRACE, e.METHODS.COPY, e.METHODS.LOCK, e.METHODS.MKCOL, e.METHODS.MOVE, e.METHODS.PROPFIND, e.METHODS.PROPPATCH, e.METHODS.SEARCH, e.METHODS.UNLOCK, e.METHODS.BIND, e.METHODS.REBIND, e.METHODS.UNBIND, e.METHODS.ACL, e.METHODS.REPORT, e.METHODS.MKACTIVITY, e.METHODS.CHECKOUT, e.METHODS.MERGE, e.METHODS[`M-SEARCH`], e.METHODS.NOTIFY, e.METHODS.SUBSCRIBE, e.METHODS.UNSUBSCRIBE, e.METHODS.PATCH, e.METHODS.PURGE, e.METHODS.MKCALENDAR, e.METHODS.LINK, e.METHODS.UNLINK, e.METHODS.PRI, e.METHODS.SOURCE, e.METHODS.QUERY ], e.METHODS_ICE = [e.METHODS.SOURCE], e.METHODS_RTSP = [ e.METHODS.OPTIONS, e.METHODS.DESCRIBE, e.METHODS.ANNOUNCE, e.METHODS.SETUP, e.METHODS.PLAY, e.METHODS.PAUSE, e.METHODS.TEARDOWN, e.METHODS.GET_PARAMETER, e.METHODS.SET_PARAMETER, e.METHODS.REDIRECT, e.METHODS.RECORD, e.METHODS.FLUSH, e.METHODS.GET, e.METHODS.POST ], e.METHOD_MAP = (0, t.enumToMap)(e.METHODS), e.H_METHOD_MAP = Object.fromEntries(Object.entries(e.METHODS).filter(([e]) => e.startsWith(`H`))), e.STATUSES_HTTP = [ e.STATUSES.CONTINUE, e.STATUSES.SWITCHING_PROTOCOLS, e.STATUSES.PROCESSING, e.STATUSES.EARLY_HINTS, e.STATUSES.RESPONSE_IS_STALE, e.STATUSES.REVALIDATION_FAILED, e.STATUSES.DISCONNECTED_OPERATION, e.STATUSES.HEURISTIC_EXPIRATION, e.STATUSES.MISCELLANEOUS_WARNING, e.STATUSES.OK, e.STATUSES.CREATED, e.STATUSES.ACCEPTED, e.STATUSES.NON_AUTHORITATIVE_INFORMATION, e.STATUSES.NO_CONTENT, e.STATUSES.RESET_CONTENT, e.STATUSES.PARTIAL_CONTENT, e.STATUSES.MULTI_STATUS, e.STATUSES.ALREADY_REPORTED, e.STATUSES.TRANSFORMATION_APPLIED, e.STATUSES.IM_USED, e.STATUSES.MISCELLANEOUS_PERSISTENT_WARNING, e.STATUSES.MULTIPLE_CHOICES, e.STATUSES.MOVED_PERMANENTLY, e.STATUSES.FOUND, e.STATUSES.SEE_OTHER, e.STATUSES.NOT_MODIFIED, e.STATUSES.USE_PROXY, e.STATUSES.SWITCH_PROXY, e.STATUSES.TEMPORARY_REDIRECT, e.STATUSES.PERMANENT_REDIRECT, e.STATUSES.BAD_REQUEST, e.STATUSES.UNAUTHORIZED, e.STATUSES.PAYMENT_REQUIRED, e.STATUSES.FORBIDDEN, e.STATUSES.NOT_FOUND, e.STATUSES.METHOD_NOT_ALLOWED, e.STATUSES.NOT_ACCEPTABLE, e.STATUSES.PROXY_AUTHENTICATION_REQUIRED, e.STATUSES.REQUEST_TIMEOUT, e.STATUSES.CONFLICT, e.STATUSES.GONE, e.STATUSES.LENGTH_REQUIRED, e.STATUSES.PRECONDITION_FAILED, e.STATUSES.PAYLOAD_TOO_LARGE, e.STATUSES.URI_TOO_LONG, e.STATUSES.UNSUPPORTED_MEDIA_TYPE, e.STATUSES.RANGE_NOT_SATISFIABLE, e.STATUSES.EXPECTATION_FAILED, e.STATUSES.IM_A_TEAPOT, e.STATUSES.PAGE_EXPIRED, e.STATUSES.ENHANCE_YOUR_CALM, e.STATUSES.MISDIRECTED_REQUEST, e.STATUSES.UNPROCESSABLE_ENTITY, e.STATUSES.LOCKED, e.STATUSES.FAILED_DEPENDENCY, e.STATUSES.TOO_EARLY, e.STATUSES.UPGRADE_REQUIRED, e.STATUSES.PRECONDITION_REQUIRED, e.STATUSES.TOO_MANY_REQUESTS, e.STATUSES.REQUEST_HEADER_FIELDS_TOO_LARGE_UNOFFICIAL, e.STATUSES.REQUEST_HEADER_FIELDS_TOO_LARGE, e.STATUSES.LOGIN_TIMEOUT, e.STATUSES.NO_RESPONSE, e.STATUSES.RETRY_WITH, e.STATUSES.BLOCKED_BY_PARENTAL_CONTROL, e.STATUSES.UNAVAILABLE_FOR_LEGAL_REASONS, e.STATUSES.CLIENT_CLOSED_LOAD_BALANCED_REQUEST, e.STATUSES.INVALID_X_FORWARDED_FOR, e.STATUSES.REQUEST_HEADER_TOO_LARGE, e.STATUSES.SSL_CERTIFICATE_ERROR, e.STATUSES.SSL_CERTIFICATE_REQUIRED, e.STATUSES.HTTP_REQUEST_SENT_TO_HTTPS_PORT, e.STATUSES.INVALID_TOKEN, e.STATUSES.CLIENT_CLOSED_REQUEST, e.STATUSES.INTERNAL_SERVER_ERROR, e.STATUSES.NOT_IMPLEMENTED, e.STATUSES.BAD_GATEWAY, e.STATUSES.SERVICE_UNAVAILABLE, e.STATUSES.GATEWAY_TIMEOUT, e.STATUSES.HTTP_VERSION_NOT_SUPPORTED, e.STATUSES.VARIANT_ALSO_NEGOTIATES, e.STATUSES.INSUFFICIENT_STORAGE, e.STATUSES.LOOP_DETECTED, e.STATUSES.BANDWIDTH_LIMIT_EXCEEDED, e.STATUSES.NOT_EXTENDED, e.STATUSES.NETWORK_AUTHENTICATION_REQUIRED, e.STATUSES.WEB_SERVER_UNKNOWN_ERROR, e.STATUSES.WEB_SERVER_IS_DOWN, e.STATUSES.CONNECTION_TIMEOUT, e.STATUSES.ORIGIN_IS_UNREACHABLE, e.STATUSES.TIMEOUT_OCCURED, e.STATUSES.SSL_HANDSHAKE_FAILED, e.STATUSES.INVALID_SSL_CERTIFICATE, e.STATUSES.RAILGUN_ERROR, e.STATUSES.SITE_IS_OVERLOADED, e.STATUSES.SITE_IS_FROZEN, e.STATUSES.IDENTITY_PROVIDER_AUTHENTICATION_ERROR, e.STATUSES.NETWORK_READ_TIMEOUT, e.STATUSES.NETWORK_CONNECT_TIMEOUT ], e.ALPHA = []; for (let t = 65; t <= 90; t++) e.ALPHA.push(String.fromCharCode(t)), e.ALPHA.push(String.fromCharCode(t + 32)); e.NUM_MAP = { 0: 0, 1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7, 8: 8, 9: 9 }, e.HEX_MAP = { 0: 0, 1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7, 8: 8, 9: 9, A: 10, B: 11, C: 12, D: 13, E: 14, F: 15, a: 10, b: 11, c: 12, d: 13, e: 14, f: 15 }, e.NUM = [ `0`, `1`, `2`, `3`, `4`, `5`, `6`, `7`, `8`, `9` ], e.ALPHANUM = e.ALPHA.concat(e.NUM), e.MARK = [ `-`, `_`, `.`, `!`, `~`, `*`, `'`, `(`, `)` ], e.USERINFO_CHARS = e.ALPHANUM.concat(e.MARK).concat([ `%`, `;`, `:`, `&`, `=`, `+`, `$`, `,` ]), e.URL_CHAR = `!"$%&'()*+,-./:;<=>@[\\]^_\`{|}~`.split(``).concat(e.ALPHANUM), e.HEX = e.NUM.concat([ `a`, `b`, `c`, `d`, `e`, `f`, `A`, `B`, `C`, `D`, `E`, `F` ]), e.TOKEN = [ `!`, `#`, `$`, `%`, `&`, `'`, `*`, `+`, `-`, `.`, `^`, `_`, "`", `|`, `~` ].concat(e.ALPHANUM), e.HEADER_CHARS = [` `]; for (let t = 32; t <= 255; t++) t !== 127 && e.HEADER_CHARS.push(t); e.CONNECTION_TOKEN_CHARS = e.HEADER_CHARS.filter((e) => e !== 44), e.QUOTED_STRING = [` `, ` `]; for (let t = 33; t <= 255; t++) t !== 34 && t !== 92 && e.QUOTED_STRING.push(t); e.HTAB_SP_VCHAR_OBS_TEXT = [` `, ` `]; for (let t = 33; t <= 126; t++) e.HTAB_SP_VCHAR_OBS_TEXT.push(t); for (let t = 128; t <= 255; t++) e.HTAB_SP_VCHAR_OBS_TEXT.push(t); e.MAJOR = e.NUM_MAP, e.MINOR = e.MAJOR, e.SPECIAL_HEADERS = { connection: e.HEADER_STATE.CONNECTION, "content-length": e.HEADER_STATE.CONTENT_LENGTH, "proxy-connection": e.HEADER_STATE.CONNECTION, "transfer-encoding": e.HEADER_STATE.TRANSFER_ENCODING, upgrade: e.HEADER_STATE.UPGRADE }, e.default = { ERROR: e.ERROR, TYPE: e.TYPE, FLAGS: e.FLAGS, LENIENT_FLAGS: e.LENIENT_FLAGS, METHODS: e.METHODS, STATUSES: e.STATUSES, FINISH: e.FINISH, HEADER_STATE: e.HEADER_STATE, ALPHA: e.ALPHA, NUM_MAP: e.NUM_MAP, HEX_MAP: e.HEX_MAP, NUM: e.NUM, ALPHANUM: e.ALPHANUM, MARK: e.MARK, USERINFO_CHARS: e.USERINFO_CHARS, URL_CHAR: e.URL_CHAR, HEX: e.HEX, TOKEN: e.TOKEN, HEADER_CHARS: e.HEADER_CHARS, CONNECTION_TOKEN_CHARS: e.CONNECTION_TOKEN_CHARS, QUOTED_STRING: e.QUOTED_STRING, HTAB_SP_VCHAR_OBS_TEXT: e.HTAB_SP_VCHAR_OBS_TEXT, MAJOR: e.MAJOR, MINOR: e.MINOR, SPECIAL_HEADERS: e.SPECIAL_HEADERS, METHODS_HTTP: e.METHODS_HTTP, METHODS_ICE: e.METHODS_ICE, METHODS_RTSP: e.METHODS_RTSP, METHOD_MAP: e.METHOD_MAP, H_METHOD_MAP: e.H_METHOD_MAP, STATUSES_HTTP: e.STATUSES_HTTP }; })); var ae$1 = c$3(((e, t) => { let { Buffer: r } = p$4(`node:buffer`), i; Object.defineProperty(t, "exports", { get: () => i ||= r.from(`AGFzbQEAAAABJwdgAX8Bf2ADf39/AX9gAn9/AGABfwBgBH9/f38Bf2AAAGADf39/AALLAQgDZW52GHdhc21fb25faGVhZGVyc19jb21wbGV0ZQAEA2VudhV3YXNtX29uX21lc3NhZ2VfYmVnaW4AAANlbnYLd2FzbV9vbl91cmwAAQNlbnYOd2FzbV9vbl9zdGF0dXMAAQNlbnYUd2FzbV9vbl9oZWFkZXJfZmllbGQAAQNlbnYUd2FzbV9vbl9oZWFkZXJfdmFsdWUAAQNlbnYMd2FzbV9vbl9ib2R5AAEDZW52GHdhc21fb25fbWVzc2FnZV9jb21wbGV0ZQAAAzU0BQYAAAMAAAAAAAADAQMAAwMDAAACAAAAAAICAgICAgICAgIBAQEBAQEBAQEBAwAAAwAAAAQFAXABExMFAwEAAgYIAX8BQcDZBAsHxQcoBm1lbW9yeQIAC19pbml0aWFsaXplAAgZX19pbmRpcmVjdF9mdW5jdGlvbl90YWJsZQEAC2xsaHR0cF9pbml0AAkYbGxodHRwX3Nob3VsZF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EgAzYCGCABIAE2AgwgASABNgIIDAELIAMoAggiACABNgIMIAMgATYCCCABQQA2AhggASADNgIMIAEgADYCCAtB5NUAQeTVACgCAEEBayIAQX8gABs2AgALCwcAIAAtACgLBwAgAC0AKgsHACAALQArCwcAIAAtACkLBwAgAC8BNAsHACAALQAwC0ABBH8gACgCGCEBIAAvAS4hAiAALQAoIQMgACgCOCEEIAAQOCAAIAQ2AjggACADOgAoIAAgAjsBLiAAIAE2AhgL5YUCAgd/A34gASACaiEEAkAgACIDKAIMIgANACADKAIEBEAgAyABNgIECyMAQRBrIgkkAAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAn8CQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAgAygCHCICQQJrDvwBAfkBAgMEBQYHCAkKCwwNDg8QERL4ARP3ARQV9gEWF/UBGBkaGxwdHh8g/QH7ASH0ASIjJCUmJygpKivzASwtLi8wMTLyAfEBMzTwAe8BNTY3ODk6Ozw9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HOAQwQC0HPAQwPC0HQAQwOC0HRAQwNC0HSAQwMC0HTAQwLC0HUAQwKC0HVAQwJC0HWAQwIC0HjAQwHC0HXAQwGC0HYAQwFC0HZAQwEC0HaAQwDC0HbAQwCC0HdAQwBC0HcAQshAgNAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQCADAn8CQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAn8CQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAn8CQAJAAkACQAJAAkACQAJ/AkACQAJAAn8CQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAIAMCfwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACfwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJA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A0G+IDYCECADQQI2AgwMkgMLIAMoAgQhAEEAIQIgA0EANgIEIAMgACABIAynaiIBEDIiAEUNKyADQQc2AhwgAyABNgIUIAMgADYCDAyRAwsgAy0ALkHAAHFFDQELQQAhAAJAIAMoAjgiAkUNACACKAJYIgJFDQAgAyACEQAAIQALIABFDSsgAEEVRgRAIANBCjYCHCADIAE2AhQgA0HrGTYCECADQRU2AgxBACECDJADC0EAIQIgA0EANgIcIAMgATYCFCADQZMMNgIQIANBEzYCDAyPAwtBACECIANBADYCHCADIAE2AhQgA0GCFTYCECADQQI2AgwMjgMLQQAhAiADQQA2AhwgAyABNgIUIANB3RQ2AhAgA0EZNgIMDI0DC0EAIQIgA0EANgIcIAMgATYCFCADQeYdNgIQIANBGTYCDAyMAwsgAEEVRg09QQAhAiADQQA2AhwgAyABNgIUIANB0A82AhAgA0EiNgIMDIsDCyADKAIEIQBBACECIANBADYCBCADIAAgARAzIgBFDSggA0ENNgIcIAMgATYCFCADIAA2AgwMigMLIABBFUYNOkEAIQIgA0EANgIcIAMgATYCFCADQdAPNgIQIANBIjYCDAyJAwsgAygCBCEAQQAhAiADQQA2AgQgAyAAIAEQMyIARQRAIAFBAWohAQwoCyADQQ42AhwgAyAANgIMIAMgAUEBajYCFAyIAwsgAEEVRg03QQAhAiADQQA2AhwgAyABNgIUIANB0A82AhAgA0EiNgIMDIcDCyADKAIEIQBBACECIANBADYCBCADIAAgARAzIgBFBEAgAUEBaiEBDCcLIANBDzYCHCADIAA2AgwgAyABQQFqNgIUDIYDC0EAIQIgA0EANgIcIAMgATYCFCADQeIXNgIQIANBGTYCDAyFAwsgAEEVRg0zQQAhAiADQQA2AhwgAyABNgIUIANB1gw2AhAgA0EjNgIMDIQDCyADKAIEIQBBACECIANBADYCBCADIAAgARA0IgBFDSUgA0ERNgIcIAMgATYCFCADIAA2AgwMgwMLIABBFUYNMEEAIQIgA0EANgIcIAMgATYCFCADQdYMNgIQIANBIzYCDAyCAwsgAygCBCEAQQAhAiADQ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C0EsIQIM7wILQSwhAgzuAgsgASAERgRAQTQhAgzuAgsCQAJAA0ACQCABLQAAQQprDgQCAAADAAsgBCABQQFqIgFHDQALQTQhAgzvAgsgAygCBCEAIANBADYCBCADIAAgARAxIgBFDZ8CIANBMjYCHCADIAE2AhQgAyAANgIMQQAhAgzuAgsgAygCBCEAIANBADYCBCADIAAgARAxIgBFBEAgAUEBaiEBDJ8CCyADQTI2AhwgAyAANgIMIAMgAUEBajYCFEEAIQIM7QILIAEgBEcEQAJAA0AgAS0AAEEwayIAQf8BcUEKTwRAQTohAgzXAgsgAykDICILQpmz5syZs+bMGVYNASADIAtCCn4iCjcDICAKIACtQv8BgyILQn+FVg0BIAMgCiALfDcDICAEIAFBAWoiAUcNAAtBwAAhAgzuAgsgAygCBCEAIANBADYCBCADIAAgAUEBaiIBEDEiAA0XDOICC0HAACECDOwCCyABIARGBEBByQAhAgzsAgsCQANAAkAgAS0AAEEJaw4YAAKiAqICqQKiAqICogKiAqICogKiAqICogKiAqICogKiAqICogKiAqICogIAogILIAQgAUEBaiIBRw0AC0HJACECDOwCCyABQQFqIQEgA0Evai0AAEEBcQ2lAiADQQA2AhwgAyABNgIUIANBlxA2AhAgA0EKNgIMQQAhAgzrAgsgASAERwRAA0AgAS0AAEEgRw0VIAQgAUEBaiIBRw0AC0H4ACECDOsCC0H4ACECDOoCCyADQQI6ACgMOAtBACECIANBADYCHCADQb8LNgIQIANBAjYCDCADIAFBAWo2AhQM6AILQQAhAgzOAgtBDSECDM0CC0ETIQIMzAILQRUhAgzLAgtBFiECDMoCC0EYIQIMyQILQRkhAgzIAgtBGiECDMcCC0EbIQIMxgILQRwhAgzFAgtBHSECDMQCC0EeIQIMwwILQR8hAgzCAgtBICECDMECC0EiIQIMwAILQSMhAgy/AgtBJSECDL4CC0HlACECDL0CCyADQT02AhwgAyABNgIUIAMgADYCDEEAIQIM1QILIANBGzYCHCADIAE2AhQgA0GkHDYCECADQRU2AgxBACECDNQCCyADQSA2AhwgAyABNgIUIANBmBo2AhAgA0EVNgIMQQAhAgzTAgsgA0ETNgIcIAMgATYCFCADQZgaNgIQIANBFTYCDEEAIQIM0gILIANBCzYCHCADIAE2AhQgA0GYGjYCECADQRU2AgxBACECDNECCyADQRA2AhwgAyABNgIUIANBmBo2AhAgA0EVNgIMQQAhAgzQAgsgA0EgNgIcIAMgATYCFCADQaQcNgIQIANBFTYCDEEAIQIMzwILIANBCzYCHCADIAE2AhQgA0GkHDYCECADQRU2AgxBACECDM4CCyADQQw2AhwgAyABNgIUIANBpBw2AhAgA0EVNgIMQQAhAgzNAgtBACECIANBADYCHCADIAE2AhQgA0HdDjYCECADQRI2AgwMzAILAkADQAJAIAEtAABBCmsOBAACAgACCyAEIAFBAWoiAUcNAAtB/QEhAgzMAgsCQAJAIAMtADZBAUcNAEEAIQACQCADKAI4IgJFDQAgAigCYCICRQ0AIAMgAhEAACEACyAARQ0AIABBFUcNASADQfwBNgIcIAMgATYCFCADQdwZNgIQIANBFTYCDEEAIQIMzQILQdwBIQIMswILIANBADYCHCADIAE2AhQgA0H5CzYCECADQR82AgxBACECDMsCCwJAAkAgAy0AKEEBaw4CBAEAC0HbASECDLICC0HUASECDLECCyADQQI6ADFBACEAAkAgAygCOCICRQ0AIAIoAgAiAkUNACADIAIRAAAhAAsgAEUEQEHdASECDLECCyAAQRVHBEAgA0EANgIcIAMgATYCFCADQbQMNgIQIANBEDYCDEEAIQIMygILIANB+wE2AhwgAyABNgIUIANBgRo2AhAgA0EVNgIMQQAhAgzJAgsgASAERgRAQfoBIQIMyQILIAEtAABByABGDQEgA0EBOgAoC0HAASECDK4CC0HaASECDK0CCyABIARHBEAgA0EMNgIIIAMgATYCBEHZASECDK0CC0H5ASECDMUCCyABIARGBEBB+AEhAgzFAgsgAS0AAEHIAEcNBCABQQFqIQFB2AEhAgyrAgsgASAERgRAQfcBIQIMxAILAkACQCABLQAAQcUAaw4QAAUFBQUFBQUFBQUFBQUFAQULIAFBAWohAUHWASECDKsCCyABQQFqIQFB1wEhAgyqAgtB9gEhAiABIARGDcICIAMoAgAiACAEIAFraiEFIAEgAGtBAmohBgJAA0AgAS0AACAAQbrVAGotAABHDQMgAEECRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADMMCCyADKAIEIQAgA0IANwMAIAMgACAGQQFqIgEQLiIARQRAQeMBIQIMqgILIANB9QE2AhwgAyABNgIUIAMgADYCDEEAIQIMwgILQfQBIQIgASAERg3BAiADKAIAIgAgBCABa2ohBSABIABrQQFqIQYCQANAIAEtAAAgAEG41QBqLQAARw0CIABBAUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAzCAgsgA0GBBDsBKCADKAIEIQAgA0IANwMAIAMgACAGQQFqIgEQLiIADQMMAgsgA0EANgIAC0EAIQIgA0EANgIcIAMgATYCFCADQeUfNgIQIANBCDYCDAy/AgtB1QEhAgylAgsgA0HzATYCHCADIAE2AhQgAyAANgIMQQAhAgy9AgtBACEAAkAgAygCOCICRQ0AIAIoAkAiAkUNACADIAIRAAAhAAsgAEUNbiAAQRVHBEAgA0EANgIcIAMgATYCFCADQYIPNgIQIANBIDYCDEEAIQIMvQILIANBjwE2AhwgAyABNgIUIANB7Bs2AhAgA0EVNgIMQQAhAgy8AgsgASAERwRAIANBDTYCCCADIAE2AgRB0wEhAgyjAgtB8gEhAgy7AgsgASAERgRAQfEBIQIMuwILAkACQAJAIAEtAABByABrDgsAAQgICAgICAgIAggLIAFBAWohAUHQASECDKMCCyABQQFqIQFB0QEhAgyiAgsgAUEBaiEBQdIBIQIMoQILQfABIQIgASAERg25AiADKAIAIgAgBCABa2ohBiABIABrQQJqIQUDQCABLQAAIABBtdUAai0AAEcNBCAAQQJGDQMgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAY2AgAMuQILQe8BIQIgASAERg24AiADKAIAIgAgBCABa2ohBiABIABrQQFqIQUDQCABLQAAIABBs9UAai0AAEcNAyAAQQFGDQIgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAY2AgAMuAILQe4BIQIgASAERg23AiADKAIAIgAgBCABa2ohBiABIABrQQJqIQUDQCABLQAAIABBsNUAai0AAEcNAiAAQQJGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAY2AgAMtwILIAMoAgQhACADQgA3AwAgAyAAIAVBAWoiARArIgBFDQIgA0HsATYCHCADIAE2AhQgAyAANgIMQQAhAgy2AgsgA0EANgIACyADKAIEIQAgA0EANgIEIAMgACABECsiAEUNnAIgA0HtATYCHCADIAE2AhQgAyAANgIMQQAhAgy0AgtBzwEhAgyaAgtBACEAAkAgAygCOCICRQ0AIAIoAjQiAkUNACADIAIRAAAhAAsCQCAABEAgAEEVRg0BIANBADYCHCADIAE2AhQgA0HqDTYCECADQSY2AgxBACECDLQCC0HOASECDJoCCyADQesBNgIcIAMgATYCFCADQYAbNgIQIANBFTYCDEEAIQIMsgILIAEgBEYEQEHrASECDLICCyABLQAAQS9GBEAgAUEBaiEBDAELIANBADYCHCADIAE2AhQgA0GyODYCECADQQg2AgxBACECDLECC0HNASECDJcCCyABIARHBEAgA0EONgIIIAMgATYCBEHMASECDJcCC0HqASECDK8CCyABIARGBEBB6QEhAgyvAgsgAS0AAEEwayIAQf8BcUEKSQRAIAMgADoAKiABQQFqIQFBywEhAgyWAgsgAygCBCEAIANBADYCBCADIAAgARAvIgBFDZcCIANB6AE2AhwgAyABNgIUIAMgADYCDEEAIQIMrgILIAEgBEYEQEHnASECDK4CCwJAIAEtAABBLkYEQCABQQFqIQEMAQsgAygCBCEAIANBADYCBCADIAAgARAvIgBFDZgCIANB5gE2AhwgAyABNgIUIAMgADYCDEEAIQIMrgILQcoBIQIMlAILIAEgBEYEQEHlASECDK0CC0EAIQBBASEFQQEhB0EAIQICQAJAAkACQAJAAn8CQAJAAkACQAJAAkACQCABLQAAQTBrDgoKCQABAgMEBQYICwtBAgwGC0EDDAULQQQMBAtBBQwDC0EGDAILQQcMAQtBCAshAkEAIQVBACEHDAILQQkhAkEBIQBBACEFQQAhBwwBC0EAIQVBASECCyADIAI6ACsgAUEBaiEBAkACQCADLQAuQRBxDQACQAJAAkAgAy0AKg4DAQACBAsgB0UNAwwCCyAADQEMAgsgBUUNAQsgAygCBCEAIANBADYCBCADIAAgARAvIgBFDQIgA0HiATYCHCADIAE2AhQgAyAANgIMQQAhAgyvAgsgAygCBCEAIANBADYCBCADIAAgARAvIgBFDZoCIANB4wE2AhwgAyABNgIUIAMgADYCDEEAIQIMrgILIAMoAgQhACADQQA2AgQgAyAAIAEQLyIARQ2YAiADQeQBNgIcIAMgATYCFCADIAA2AgwMrQILQckBIQIMkwILQQAhAAJAIAMoAjgiAkUNACACKAJEIgJFDQAgAyACEQAAIQALAkAgAARAIABBFUYNASADQQA2AhwgAyABNgIUIANBpA02AhAgA0EhNgIMQQAhAgytAgtByAEhAgyTAgsgA0HhATYCHCADIAE2AhQgA0HQGjYCECADQRU2AgxBACECDKsCCyABIARGBEBB4QEhAgyrAgsCQCABLQAAQSBGBEAgA0EAOwE0IAFBAWohAQwBCyADQQA2AhwgAyABNgIUIANBmRE2AhAgA0EJNgIMQQAhAgyrAgtBxwEhAgyRAgsgASAERgRAQeABIQIMqgILAkAgAS0AAEEwa0H/AXEiAkEKSQRAIAFBAWohAQJAIAMvATQiAEGZM0sNACADIABBCmwiADsBNCAAQf7/A3EgAkH//wNzSw0AIAMgACACajsBNAwCC0EAIQIgA0EANgIcIAMgATYCFCADQZUeNgIQIANBDTYCDAyrAgsgA0EANgIcIAMgATYCFCADQZUeNgIQIANBDTYCDEEAIQIMqgILQcYBIQIMkAILIAEgBEYEQEHfASECDKkCCwJAIAEtAABBMGtB/wFxIgJBCkkEQCABQQFqIQECQCADLwE0IgBBmTNLDQAgAyAAQQpsIgA7ATQgAEH+/wNxIAJB//8Dc0sNACADIAAgAmo7ATQMAgtBACECIANBADYCHCADIAE2AhQgA0GVHjYCECADQQ02AgwMqgILIANBADYCHCADIAE2AhQgA0GVHjYCECADQQ02AgxBACECDKkCC0HFASECDI8CCy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FBAWohAUGgASECDOQBCyABIARGBEBBuAEhAgz9AQsCQAJAIAEtAABBxgBrDgsALCwsLCwsLCwsASwLIAFBAWohAUGeASECDOQBCyABQQFqIQFBnwEhAgzjAQtBtwEhAiABIARGDfsBIAMoAgAiACAEIAFraiEFIAEgAGtBA2ohBgJAA0AgAS0AACAAQezUAGotAABHDSggAEEDRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADPwBCyADQQA2AgAgBkEBaiEBQQ0MKAtBtgEhAiABIARGDfoBIAMoAgAiACAEIAFraiEFIAEgAGtBAmohBgJAA0AgAS0AACAAQaHVAGotAABHDScgAEECRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADPsBCyADQQA2AgAgBkEBaiEBQQwMJwtBtQEhAiABIARGDfkBIAMoAgAiACAEIAFraiEFIAEgAGtBAWohBgJAA0AgAS0AACAAQerUAGotAABHDSYgAEEBRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADPoBCyADQQA2AgAgBkEBaiEBQQMMJgtBtAEhAiABIARGDfgBIAMoAgAiACAEIAFraiEFIAEgAGtBAWohBgJAA0AgAS0AACAAQejUAGotAABHDSUgAEEBRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADPkBCyADQQA2AgAgBkEBaiEBQSYMJQsgASAERgRAQbMBIQIM+AELAkACQCABLQAAQdQAaw4CAAEnCyABQQFqIQFBmQEhAgzfAQsgAUEBaiEBQZoBIQIM3gELQbIBIQIgASAERg32ASADKAIAIgAgBCABa2ohBSABIABrQQFqIQYCQANAIAEtAAAgAEHm1ABqLQAARw0jIABBAUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAz3AQsgA0EANgIAIAZBAWohAUEnDCMLQbEBIQIgASAERg31ASADKAIAIgAgBCABa2ohBSABIABrQQFqIQYCQANAIAEtAAAgAEHk1ABqLQAARw0iIABBAUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAz2AQsgA0EANg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ADQCABLQAAIABBytQAai0AAEcNGSAAQQZGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAM7QELIANBADYCACAGQQFqIQFBFQwZC0GnASECIAEgBEYN6wEgAygCACIAIAQgAWtqIQUgASAAa0ECaiEGAkADQCABLQAAIABBx9QAai0AAEcNGCAAQQJGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAM7AELIANBADYCACAGQQFqIQFBFwwYC0GmASECIAEgBEYN6gEgAygCACIAIAQgAWtqIQUgASAAa0EFaiEGAkADQCABLQAAIABBwdQAai0AAEcNFyAAQQVGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAM6wELIANBADYCACAGQQFqIQFBGAwXCyABIARGBEBBpQEhAgzqAQsCQAJAIAEtAABByQBrDgcAGRkZGRkBGQsgAUEBaiEBQYsBIQIM0QELIAFBAWohAUGMASECDNABC0GkASECIAEgBEYN6AEgAygCACIAIAQgAWtqIQUgASAAa0EBaiEGAkADQCABLQAAIABBptUAai0AAEcNFSAAQQFGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAM6QELIANBADYCACAGQQFqIQFBCQwVC0GjASECIAEgBEYN5wEgAygCACIAIAQgAWtqIQUgASAAa0EBaiEGAkADQCABLQAAIABBpNUAai0AAEcNFCAAQQFGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAM6AELIANBADYCACAGQQFqIQFBHwwUC0GiASECIAEgBEYN5gEgAygCACIAIAQgAWtqIQUgASAAa0ECaiEGAkADQCABLQAAIABBvtQAai0AAEcNEyAAQQJGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAM5wELIANBADYCACAGQQFqIQFBAgwTC0GhASECIAEgBEYN5QEgAygCACIAIAQgAWtqIQUgASAAa0EBaiEGA0AgAS0AACAAQbzUAGotAABHDREgAEEBRg0CIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADOUBCyABIARGBEBBoAEhAgzlAQt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ohBSABIABrQQNqIQYCQANAIAEtAAAgAEGs1ABqLQAARw0GIABBA0YNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAzaAQsgA0EANgIAIAZBAWohAUEFDAYLQZUBIQIgASAERg3YASADKAIAIgAgBCABa2ohBSABIABrQQVqIQYCQANAIAEtAAAgAEGm1ABqLQAARw0FIABBBUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAzZAQsgA0EANgIAIAZBAWohAUEWDAULQZQBIQIgASAERg3XASADKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEGh1QBqLQAARw0EIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAzYAQsgA0EANgIAIAZBAWohAUEQDAQLIAEgBEYEQEGTASECDNcBCwJAAkAgAS0AAEHDAGsODAAGBgYGBgYGBgYGAQYLIAFBAWohAUH5ACECDL4BCyABQQFqIQFB+gAhAgy9AQtBkgEhAiABIARGDdUBIAMoAgAiACAEIAFraiEFIAEgAGtBBWohBgJAA0AgAS0AACAAQaDUAGotAABHDQIgAEEFRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADNYBCyADQQA2AgAgBkEBaiEBQSQMAgsgA0EANgIADAILIAEgBEYEQEGRASECDNQBCyABLQAAQcwARw0BIAFBAWohAUETCzoAKSADKAIEIQAgA0EANgIEIAMgACABEC4iAA0CDAELQQAhAiADQQA2AhwgAyABNgIUIANB/h82AhAgA0EGNgIMDNEBC0H4ACECDLcBCyADQZABNgIcIAMgATYCFCADIAA2AgxBACECDM8BC0EAIQACQCADKAI4IgJFDQAgAigCQCICRQ0AIAMgAhEAACEACyAARQ0AIABBFUYNASADQQA2AhwgAyABNgIUIANBgg82AhAgA0EgNgIMQQAhAgzOAQtB9wAhAgy0AQsgA0GPATYCHCADIAE2AhQgA0HsGzYCECADQRU2AgxBACECDMwBCyABIARGBEBBjwEhAgzMAQsCQCABLQAAQSBGBEAgAUEBaiEBDAELIANBAD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QIMqgELIAMoAgQhACADQQA2AgQgAyAAIAEQLCIARQ0IIANB+gA2AhwgAyABNgIUIAMgADYCDEEAIQIMqQELIANBADYCHCADIAE2AhQgA0GNFDYCECADQQc2AgxBACECDKgBCwJAAkACQAJAA0AgAS0AAEGgygBqLQAAIgBBBUcEQAJAIABBAWsOBi4DBAUGAAYLQegAIQIMlAELIAQgAUEBaiIBRw0AC0H9ACECDKsBCyADKAIEIQAgA0EANgIEIAMgACABECwiAEUNByADQdsANgIcIAMgATYCFCADIAA2AgxBACECDKoBCyADKAIEIQAgA0EANgIEIAMgACABECwiAEUNByADQd0ANgIcIAMgATYCFCADIAA2AgxBACECDKkBCyADKAIEIQAgA0EANgIEIAMgACABECwiAEUNByADQfoANgIcIAMgATYCFCADIAA2AgxBACECDKgBCyADQQA2AhwgAyABNgIUIANB5Ag2AhAgA0EHNgIMQQAhAgynAQsgASAERg0BIAFBAWoLIQFBBiECDIwBC0H8ACECDKQBCwJAAkACQAJAA0AgAS0AAEGgyABqLQAAIgBBBUcEQCAAQQFrDgQpAgMEBQsgBCABQQFqIgFHDQALQfsAIQIMpwELIAMoAgQhACADQQA2AgQgAyAAIAEQLCIARQ0DIANB2wA2AhwgAyABNgIUIAMgADYCDEEAIQIMpgELIAMoAgQhACADQQA2AgQgAyAAIAEQLCIARQ0DIANB3QA2AhwgAyABNgIUIAMgADYCDEEAIQIMpQELIAMoAgQhACADQQA2AgQgAyAAIAEQLCIARQ0DIANB+gA2AhwgAyABNgIUIAMgADYCDEEAIQIMpAELIANBADYCHCADIAE2AhQgA0G8CjYCECADQQc2AgxBACECDKMBC0HPACECDIkBC0HRACECDIgBC0HnACECDIcBCyABIARGBEBB+gAhAgygAQsCQCABLQAAQQlrDgQgAAAgAAsgAUEBaiEBQeYAIQIMhgELIAEgBEYEQEH5ACECDJ8BCwJAIAEtAABBCWsOBB8AAB8AC0EAIQACQCADKAI4IgJFDQAgAigCOCICRQ0AIAMgAhEAACEACyAARQRAQeIBIQIMhgEL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tB3gAhAgx/CyADQfAANgIcIAMgATYCFCADQYAbNgIQIANBFTYCDEEAIQIMlwELIAMtAClBIUYNBiADQQA2AhwgAyABNgIUIANBkQo2AhAgA0EINgIMQQAhAgyWAQtB7wAhAiABIARGDZUBIAMoAgAiACAEIAFraiEFIAEgAGtBAmohBgJAA0AgAS0AACAAQbDVAGotAABHDQIgAEECRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADJYBCyADKAIEIQAgA0IANwMAIAMgACAGQQFqIgEQKyIARQ0CIANB7QA2AhwgAyABNgIUIAMgADYCDEEAIQIMlQELIANBADYCAAsgAygCBCEAIANBADYCBCADIAAgARArIgBFDYABIANB7gA2AhwgAyABNgIUIAMgADYCDEEAIQIMkwELQdwAIQIMeQtBACEAAkAgAygCOCICRQ0AIAIoAjQiAkUNACADIAIRAAAhAAsCQCAABEAgAEEVRg0BIANBADYCHCADIAE2AhQgA0HqDTYCECADQSY2AgxBACECDJMBC0HbACECDHkLIANB7AA2AhwgAyABNgIUIANBgBs2AhAgA0EVNgIMQQAhAgyRAQsgAy0AKSIAQSNJDQAgAEEuRg0AIANBADYCHCADIAE2AhQgA0HJCTYCECADQQg2AgxBACECDJABC0HaACECDHYLIAEgBEYEQEHrACECDI8BCwJAIAEtAABBL0YEQCABQQFqIQEMAQsgA0EANgIcIAMgATYCFCADQbI4NgIQIANBCDYCDEEAIQIMjwELQdkAIQIMdQsgASAERwRAIANBDjYCCCADIAE2AgRB2AAhAgx1C0HqACECDI0BCyABIARGBEBB6QAhAgyNAQsgAS0AAEEwayIAQf8BcUEKSQRAIAMgADoAKiABQQFqIQFB1wAhAgx0CyADKAIEIQAgA0EANgIEIAMgACABEC8iAEUNeiADQegANgIcIAMgATYCFCADIAA2AgxBACECDIwBCyABIARGBEBB5wAhAgyMAQsCQCABLQAAQS5GBEAgAUEBaiEBDAELIAMoAgQhACADQQA2AgQgAyAAIAEQLyIARQ17IANB5gA2AhwgAyABNgIUIAMgADYCDEEAIQIMjAELQdYAIQIMcgsgASAERgRAQeUAIQIMiwELQQAhAEEBIQVBASEHQQAhAgJAAkACQAJAAkACfwJAAkACQAJAAkACQAJAIAEtAABBMGsOCgoJAAECAwQFBggLC0ECDAYLQQMMBQtBBAwEC0EFDAMLQQYMAgtBBwwBC0EICyECQQAhBUEAIQcMAgtBCSECQQEhAEEAIQVBACEHDAELQQAhBUEBIQILIAMgAjoAKyABQQFqIQECQAJAIAMtAC5BEHENAAJAAkACQCADLQAqDgMBAAIECyAHRQ0DDAILIAANAQwCCyAFRQ0BCyADKAIEIQAgA0EANgIEIAMgACABEC8iAEUNAiADQeIANgIcIAMgATYCFCADIAA2AgxBACECDI0BCyADKAIEIQAgA0EANgIEIAMgACABEC8iAEUNfSADQeMANgIcIAMgATYCFCADIAA2AgxBACECDIwBCyADKAIEIQAgA0EANgIEIAMgACABEC8iAEUNeyADQeQANgIcIAMgATYCFCADIAA2AgwMiwELQdQAIQIMcQsgAy0AKUEiRg2GAUHTACECDHALQQAhAAJAIAMoAjgiAkUNACACKAJEIgJFDQAgAyACEQAAIQALIABFBEBB1QAhAgxwCyAAQRVHBEAgA0EANgIcIAMgATYCFCADQaQNNgIQIANBITYCDEEAIQIMiQELIANB4QA2AhwgAyABNgIUIANB0Bo2AhAgA0EVNgIMQQAhAgyIAQsgASAERgRAQeAAIQIMiAELAkACQAJAAkACQCABLQAAQQprDgQBBAQABAsgAUEBaiEBDAELIAFBAWohASADQS9qLQAAQQFxRQ0BC0HSACECDHALIANBADYCHCADIAE2AhQgA0G2ETYCECADQQk2AgxBACECDIgBCyADQQA2AhwgAyABNgIUIANBthE2AhAgA0EJNgIMQQAhAgyHAQsgASAERgRAQd8AIQIMhwELIAEtAABBCkYEQCABQQFqIQEMCQsgAy0ALkHAAHENCCADQQA2AhwgAyABNgIUIANBthE2AhAgA0ECNgIMQQAhAgyGAQsgASAERgRAQd0AIQIMhgELIAEtAAAiAkENRgRAIAFBAWohAUHQACECDG0LIAEhACACQQlrDgQFAQEFAQsgBCABIgBGBEBB3AAhAgyFAQsgAC0AAEEKRw0AIABBAWoMAgtBACECIANBADYCHCADIAA2AhQgA0HKLTYCECADQQc2AgwMgwELIAEgBEYEQEHbACECDIMBCwJAIAEtAABBCWsOBAMAAAMACyABQQFqCyEBQc4AIQIMaAsgASAERgRAQdoAIQIMgQELIAEtAABBCWsOBAABAQABC0EAIQIgA0EANgIcIANBmhI2AhAgA0EHNgIMIAMgAUEBajYCFAx/CyADQYASOwEqQQAhAAJAIAMoAjgiAkUNACACKAI4IgJFDQAgAyACEQAAIQALIABFDQAgAEEVRw0BIANB2QA2AhwgAyABNgIUIANB6ho2AhAgA0EVNgIMQQAhAgx+C0HNACECDGQLIANBADYCHCADIAE2AhQgA0HJDTYCECADQRo2AgxBACECDHwLIAEgBEYEQEHZACECDHwLIAEtAABBIEcNPSABQQFqIQEgAy0ALkEBcQ09IANBADYCHCADIAE2AhQgA0HCHDYCECADQR42AgxBACECDHsLIAEgBEYEQEHYACECDHsLAkACQAJAAkACQCABLQAAIgBBCmsOBAIDAwABCyABQQFqIQFBLCECDGULIABBOkcNASADQQA2AhwgAyABNgIUIANB5xE2AhAgA0EKNgIMQQAhAgx9CyABQQFqIQEgA0Evai0AAEEBcUUNcyADLQAyQYABcUUEQCADQTJqIQIgAxA1QQAhAAJAIAMoAjgiBkUNACAGKAIoIgZFDQAgAyAGEQAAIQALAkACQCAADhZNTEsBAQEBAQEBAQEBAQEBAQEBAQEAAQsgA0EpNgIcIAMgATYCFCADQawZNgIQIANBFTYCDEEAIQIMfgsgA0EANgIcIAMgATYCFCADQeULNgIQIANBETYCDEEAIQIMfQtBACEAAkAgAygCOCICRQ0AIAIoAlwiAkUNACADIAIRAAAhAAsgAEUNWSAAQRVHDQEgA0EFNgIcIAMgATYCFCADQZsbNgIQIANBFTYCDEEAIQIMfAtBywAhAgxiC0EAIQIgA0EANgIcIAMgATYCFCADQZAONgIQIANBFDYCDAx6CyADIAMvATJBgAFyOwEyDDsLIAEgBE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DAEHAzgALXwQFAAAFBQUFBQUFBQUFBQYFBQUFBQUFBQUFBQUABQAHCAUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQAFAAUABQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUAAAAFAEGp0AALBQEBAAEBAEHA0AALAQEAQdrQAAtBAgAAAAAAAAMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAAAAAAAAAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMAQanSAAsFAQEAAQEAQcDSAAsBAQBBytIACwYCAAAAAAIAQeHSAAs6AwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMAAAAAAAADAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwBBoNQAC50BTk9VTkNFRUNLT1VUTkVDVEVURUNSSUJFTFVTSEVURUFEU0VBUkNIUkdFQ1RJVklUWUxFTkRBUlZFT1RJRllQVElPTlNDSFNFQVlTVEFUQ0hHRVVFUllPUkRJUkVDVE9SVFJDSFBBUkFNRVRFUlVSQ0VCU0NSSUJFQVJET1dOQUNFSU5ETktDS1VCU0NSSUJFVFRQQ0VUU1BBRFRQLw==`, `base64`) }); })); var oe = c$3(((e, t) => { let { Buffer: r } = p$4(`node:buffer`), i; Object.defineProperty(t, "exports", { get: () => i ||= r.from(`AGFzbQEAAAABJwdgAX8Bf2ADf39/AX9gAn9/AGABfwBgBH9/f38Bf2AAAGADf39/AALLAQgDZW52GHdhc21fb25faGVhZGVyc19jb21wbGV0ZQAEA2VudhV3YXNtX29uX21lc3NhZ2VfYmVnaW4AAANlbnYLd2FzbV9vbl91cmwAAQNlbnYOd2FzbV9vbl9zdGF0dXMAAQNlbnYUd2FzbV9vbl9oZWFkZXJfZmllbGQAAQNlbnYUd2FzbV9vbl9oZWFkZXJfdmFsdWUAAQNlbnYMd2FzbV9vbl9ib2R5AAEDZW52GHdhc21fb25fbWVzc2FnZV9jb21wbGV0ZQAAAzU0BQYAAAMAAAAAAAADAQMAAw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EBIAJ0IgdxRQRAIAAgATYCAEHI1QAgAyAHcjYCACABIAA2AhggASABNgIIIAEgATYCDAwBCyAEQRkgAkEBdmtBACACQR9HG3QhAiAAKAIAIQACQANAIAAiAygCBEF4cSAERg0BIAJBHXYhACACQQF0IQIgAyAAQQRxakEQaiIHKAIAIgANAAsgByABNgIAIAEgAzYCGCABIAE2AgwgASABNgIIDAELIAMoAggiACABNgIMIAMgATYCCCABQQA2AhggASADNgIMIAEgADYCCAtB5NUAQeTVACgCAEEBayIAQX8gABs2AgALCwcAIAAtACgLBwAgAC0AKgsHACAALQArCwcAIAAtACkLBwAgAC8BNAsHACAALQAwC0ABBH8gACgCGCEBIAAvAS4hAiAALQAoIQMgACgCOCEEIAAQOCAAIAQ2AjggACADOgAoIAAgAjsBLiAAIAE2AhgLhocCAwd/A34BeyABIAJqIQQCQCAAIgMoAgwiAA0AIAMoAgQEQCADIAE2AgQLIwBBEGsiCSQAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACfwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAk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0G7AQwkC0G8AQwjC0G9AQwiC0G+AQwhC0G/AQwgC0HAAQwfC0HBAQweC0HCAQwdC0EBDBwLQcMBDBsLQcQBDBoLQcUBDBkLQcYBDBgLQccBDBcLQcgBDBYLQckBDBULQcoBDBQLQcsBDBMLQcwBDBILQc0BDBELQc4BDBALQc8BDA8LQdABDA4LQdEBDA0LQdIBDAwLQdMBDAsLQdQBDAoLQdUBDAkLQdYBDAgLQeMBDAcLQdcBDAYLQdgBDAULQdkBDAQLQdoBDAMLQdsBDAILQd0BDAELQdwBCyECA0ACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAIAMCfwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACfwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACfwJAAkACQAJAAkACQAJAAn8CQAJAAkACfwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAgAwJ/AkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJ/AkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJA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BDOsCCyADQR02AhwgAyAANgIMIAMgAUEBajYCFEEAIQIM8gILIABBO0cNASABQQFqIQELQSYhAgzXAgtBACECIANBADYCHCADIAE2AhQgA0GfFTYCECADQQw2AgwM7wILIAEgBEcEQANAIAEtAABBIEcNhAIgBCABQQFqIgFHDQALQSwhAgzvAgtBLCECDO4CCyABIARGBEBBNCECDO4CCwJAAkADQAJAIAEtAABBCmsOBAIAAAMACyAEIAFBAWoiAUcNAAtBNCECDO8CCyADKAIEIQAgA0EANgIEIAMgACABEDEiAEUNnwIgA0EyNgIcIAMgATYCFCADIAA2AgxBACECDO4CCyADKAIEIQAgA0EANgIEIAMgACABEDEiAEUEQCABQQFqIQEMnwILIANBMjYCHCADIAA2AgwgAyABQQFqNgIUQQAhAgztAgsgASAERwRAAkADQCABLQAAQTBrIgBB/wFxQQpPBEBBOiECDNcCCyADKQMgIgtCmbPmzJmz5swZVg0BIAMgC0IKfiIKNwMgIAogAK1C/wGDIgtCf4VWDQEgAyAKIAt8NwMgIAQgAUEBaiIBRw0AC0HAACECDO4CCyADKAIEIQAgA0EANgIEIAMgACABQQFqIgEQMSIADRcM4gILQcAAIQIM7AILIAEgBEYEQEHJACECDOwCCwJAA0ACQCABLQAAQQlrDhgAAqICogKpAqICogKiAqICogKiAqICogKiAqICogKiAqICogKiAqICogKiAgCiAgsgBCABQQFqIgFHDQALQckAIQIM7AILIAFBAWohASADQS9qLQAAQQFxDaUCIANBADYCHCADIAE2AhQgA0GXEDYCECADQQo2AgxBACECDOsCCyABIARHBEADQCABLQAAQSBHDRUgBCABQQFqIgFHDQALQfgAIQIM6wILQfgAIQIM6gILIANBAjoAKAw4C0EAIQIgA0EANgIcIANBvws2AhAgA0ECNgIMIAMgAUEBajYCFAzoAgtBACECDM4CC0ENIQIMzQILQRMhAgzMAgtBFSECDMsCC0EWIQIMygILQRghAgzJAgtBGSECDMgCC0EaIQIMxwILQRshAgzGAgtBHCECDMUCC0EdIQIMxAILQR4hAgzDAgtBHyECDMICC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EQdkBIQIMrQILQfkBIQIMxQILIAEgBEYEQEH4ASECDMUCCyABLQAAQcgARw0EIAFBAWohAUHYASECDKsCCyABIARGBEBB9wEhAgzEAgsCQAJAIAEtAABBxQBrDhAABQUFBQUFBQUFBQUFBQUBBQsgAUEBaiEBQdYBIQIMqwILIAFBAWohAUHXASECDKoCC0H2ASECIAEgBEYNwgIgAygCACIAIAQgAWtqIQUgASAAa0ECaiEGAkADQCABLQAAIABButUAai0AAEcNAyAAQQJGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAMwwILIAMoAgQhACADQgA3AwAgAyAAIAZBAWoiARAuIgBFBEBB4wEhAgyqAgsgA0H1ATYCHCADIAE2AhQgAyAANgIMQQAhAgzCAgtB9AEhAiABIARGDcECIAMoAgAiACAEIAFraiEFIAEgAGtBAWohBgJAA0AgAS0AACAAQbjVAGotAABHDQIgAEEBRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADMICCyADQYEEOwEoIAMoAgQhACADQgA3AwAgAyAAIAZBAWoiARAuIgANAwwCCyADQQA2AgALQQAhAiADQQA2AhwgAyABNgIUIANB5R82AhAgA0EINgIMDL8CC0HVASECDKUCCyADQfMBNgIcIAMgATYCFCADIAA2AgxBACECDL0CC0EAIQACQCADKAI4IgJFDQAgAigCQCICRQ0AIAMgAhEAACEACyAARQ1uIABBFUcEQCADQQA2AhwgAyABNgIUIANBgg82AhAgA0EgNgIMQQAhAgy9AgsgA0GPATYCHCADIAE2AhQgA0HsGzYCECADQRU2AgxBACECDLwCCyABIARHBEAgA0ENNgIIIAMgATYCBEHTASECDKMCC0HyASECDLsCCyABIARGBEBB8QEhAgy7AgsCQAJAAkAgAS0AAEHIAGsOCwABCAgICAgICAgCCAsgAUEBaiEBQdABIQIMowILIAFBAWohAUHRASECDKICCyABQQFqIQFB0gEhAgyhAgtB8AEhAiABIARGDbkCIAMoAgAiACAEIAFraiEGIAEgAGtBAmohBQNAIAEtAAAgAEG11QBqLQAARw0EIABBAkYNAyAAQQFqIQAgBCABQQFqIgFHDQALIAMgBjYCAAy5AgtB7wEhAiABIARGDbgCIAMoAgAiACAEIAFraiEGIAEgAGtBAWohBQNAIAEtAAAgAEGz1QBqLQAARw0DIABBAUYNAiAAQQFqIQAgBCABQQFqIgFHDQALIAMgBjYCAAy4AgtB7gEhAiABIARGDbcCIAMoAgAiACAEIAFraiEGIAEgAGtBAmohBQNAIAEtAAAgAEGw1QBqLQAARw0CIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBjYCAAy3AgsgAygCBCEAIANCADcDACADIAAgBUEBaiIBECsiAEUNAiADQewBNgIcIAMgATYCFCADIAA2AgxBACECDLYCCyADQQA2AgALIAMoAgQhACADQQA2AgQgAyAAIAEQKyIARQ2cAiADQe0BNgIcIAMgATYCFCADIAA2AgxBACECDLQCC0HPASECDJoCC0EAIQACQCADKAI4IgJFDQAgAigCNCICRQ0AIAMgAhEAACEACwJAIAAEQCAAQRVGDQEgA0EANgIcIAMgATYCFCADQeoNNgIQIANBJjYCDEEAIQIMtAILQc4BIQIMmgILIANB6wE2AhwgAyABNgIUIANBgBs2AhAgA0EVNgIMQQAhAgyyAgsgASAERgRAQesBIQIMsgILIAEtAABBL0YEQCABQQFqIQEMAQsgA0EANgIcIAMgATYCFCADQbI4NgIQIANBCDYCDEEAIQIMsQILQc0BIQIMlwILIAEgBEcEQCADQQ42AgggAyABNgIEQcwBIQIMlwILQeoBIQIMrwILIAEgBEYEQEHpASECDK8CCyABLQAAQTBrIgBB/wFxQQpJBEAgAyAAOgAqIAFBAWohAUHLASECDJYCCyADKAIEIQAgA0EANgIEIAMgACABEC8iAEUNlwIgA0HoATYCHCADIAE2AhQgAyAANgIMQQAhAgyuAgsgASAERgRAQecBIQIMrgILAkAgAS0AAEEuRgRAIAFBAWohAQwBCyADKAIEIQAgA0EANgIEIAMgACABEC8iAEUNmAIgA0HmATYCHCADIAE2AhQgAyAANgIMQQAhAgyuAgtBygEhAgyUAgsgASA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WohAQJAIAMvATQiAEGZM0sNACADIABBCmwiADsBNCAAQf7/A3EgAkH//wNzSw0AIAMgACACajsBNAwCC0EAIQIgA0EANgIcIAMgATYCFCADQZUeNgIQIANBDTYCDAyqAgsgA0EANgIcIAMgATYCFCADQZUeNgIQIANBDTYCDEEAIQIMqQILQcUBIQIMjwILIAEgBEYEQEHeASECDKgCCwJAIAEtAABBMGtB/wFxIgJBCkkEQCABQQFqIQECQCADLwE0IgBBmTNLDQAgAyAAQQpsIgA7ATQgAEH+/wNxIAJB//8Dc0sNACADIAAgAmo7ATQMAgtBACECIANBADYCHCADIAE2AhQgA0GVHjYCECADQQ02AgwMqQILIANBADYCHCADIAE2AhQgA0GVHjYCECADQQ02AgxBACECDKgCC0HEASECDI4CCyABIARGBEBB3QEhAgynAgsCQAJAAkACQCABLQAAQQprDhcCAwMAAwMDAwMDAwMDAwMDAwMDAwMDAQMLIAFBAWoMBQsgAUEBaiEBQcMBIQIMjwILIAFBAWohASADQS9qLQAAQQFxDQggA0EANgIcIAMgATYCFCADQY0LNgIQIANBDTYCDEEAIQIMpwILIANBADYCHCADIAE2AhQgA0GNCzYCECADQQ02AgxBACECDKYCCyABIARHBEAgA0EPNgIIIAMgATYCBEEBIQIMjQILQdwBIQIMpQILAkACQANAAkAgAS0AAEEKaw4EAgAAAwALIAQgAUEBaiIBRw0AC0HbASECDKYCCyADKAIEIQAgA0EANgIEIAMgACABEC0iAEUEQCABQQFqIQEMBAsgA0HaATYCHCADIAA2AgwgAyABQQFqNgIUQQAhAgylAgsgAygCBCEAIANBADYCBCADIAAgARAtIgANASABQQFqCyEBQcEBIQIMigILIANB2QE2AhwgAyAANgIMIAMgAUEBajYCFEEAIQIMogILQcIBIQIMiAILIANBL2otAABBAXENASADQQA2AhwgAyABNgIUIANB5Bw2AhAgA0EZNgIMQQAhAgygAgsgASAERgRAQdkBIQIMoAILAkACQAJAIAEtAABBCmsOBAECAgACCyABQQFqIQEMAgsgAUEBaiEBDAELIAMtAC5Bw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ACIAIAQgAWtqIQUgASAAa0EGaiEGAkADQCABLQAAIABBkdUAai0AAEcNPCAAQQZGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAMkAILIANBADYCACAGQQFqIQFBGgw8C0HKASECIAEgBEYNjgIgAygCACIAIAQgAWtqIQUgASAAa0EDaiEGAkADQCABLQAAIABBjdUAai0AAEcNOyAAQQNGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAMjwILIANBADYCACAGQQFqIQFBIQw7CyABIARGBEBByQEhAgyOAgsCQAJAIAEtAABBwQBrDhQAPT09PT09PT09PT09PT09PT09AT0LIAFBAWohAUGtASECDPUBCyABQQFqIQFBsAEhAgz0AQsgASAERgRAQcgBIQIMjQILAkACQCABLQAAQdUAaw4LADw8PDw8PDw8PAE8CyABQQFqIQFBrgEhAgz0AQsgAUEBaiEBQa8BIQIM8wELQccBIQIgASAERg2LAiADKAIAIgAgBCABa2ohBSABIABrQQhqIQYCQANAIAEtAAAgAEGE1QBqLQAARw04IABBCEYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAyMAgsgA0EANgIAIAZBAWohAUEqDDgLIAEgBEYEQEHGASECDIsCCyABLQAAQdAARw04IAFBAWohAUElDDcLQcUBIQIgASAERg2JAiADKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEGB1QBqLQAARw02IABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAyKAgsgA0EANgIAIAZBAWohAUEODDYLIAEgBEYEQEHEASECDIkCCyABLQAAQcUARw02IAFBAWohAUGrASECDO8BCyABIARGBEBBwwEhAgyIAgsCQAJAAkACQCABLQAAQcIAaw4PAAECOTk5OTk5OTk5OTkDOQsgAUEBaiEBQacBIQIM8QELIAFBAWohAUGoASECDPABCyABQQFqIQFBqQEhAgzvAQsgAUEBaiEBQaoBIQIM7gELQcIBIQIgASAERg2GAiADKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIA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a2ohBSABIABrQQVqIQYCQANAIAEtAAAgAEHR1ABqLQAARw0aIABBBUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAzuAQsgA0EANgIAIAZBAWohAUEeDBoLQagBIQIgASAERg3sASADKAIAIgAgBCABa2ohBSABIABrQQZqIQYCQANAIAEtAAAgAEHK1ABqLQAARw0ZIABBBkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAztAQsgA0EANgIAIAZBAWohAUEVDBkLQacBIQIgASAERg3rASADKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEHH1ABqLQAARw0YIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAzsAQsgA0EANgIAIAZBAWohAUEXDBgLQaYBIQIgASAERg3qASADKAIAIgAgBCABa2ohBSABIABrQQVqIQYCQANAIAEtAAAgAEHB1ABqLQAARw0XIABBBUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAzrAQsgA0EANgIAIAZBAWohAUEYDBcLIAEgBEYEQEGlASECDOoBCwJAAkAgAS0AAEHJAGsOBwAZGRkZGQEZCyABQQFqIQFBiwEhAgzRAQsgAUEBaiEBQYwBIQIM0AELQaQBIQIgASAERg3oASADKAIAIgAgBCABa2ohBSABIABrQQFqIQYCQANAIAEtAAAgAEGm1QBqLQAARw0VIABBAUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAzpAQsgA0EANgIAIAZBAWohAUEJDBULQaMBIQIgASAERg3nASADKAIAIgAgBCABa2ohBSABIABrQQFqIQYCQANAIAEtAAAgAEGk1QBqLQAARw0UIABBAUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAzoAQsgA0EANgIAIAZBAWohAUEfDBQLQaIBIQIgASAERg3mASADKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEG+1ABqLQAARw0TIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAznAQsgA0EANgIAIAZBAWohAUECDBMLQaEBIQIgASAERg3lASADKAIAIgAgBCABa2ohBSABIABrQQFqIQYDQCABLQAAIABBvNQAai0AAEcNESAAQQFGDQIgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAM5QELIAEgBEYEQEGgASECDOUBC0EBIAEtAABB3wBHDREaIAFBAWohAUGHASECDMsBCyADQQA2AgAgBkEBaiEBQYgBIQIMygELQZ8BIQIgASAERg3iASADKAIAIgAgBCABa2ohBSABIABrQQhqIQYCQANAIAEtAAAgAEGE1QBqLQAARw0PIABBCEYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAzjAQsgA0EANgIAIAZBAWohAUEpDA8LQZ4BIQIgASAERg3hASADKAIAIgAgBCABa2ohBSABIABrQQNqIQYCQANAIAEtAAAgAEG41ABqLQAARw0OIABBA0YNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAziAQsgA0EANgIAIAZBAWohAUEtDA4LIAEgBEYEQEGdASECDOEBCyABLQAAQcUARw0OIAFBAWohAUGEASECDMcBCyABIARGBEBBnAEhAgzgAQsCQAJAIAEtAABBzABrDggADw8PDw8PAQ8LIAFBAWohAUGCASECDMcBCyABQQFqIQFBgwEhAgzGAQtBmwEhAiABIARGDd4BIAMoAgAiACAEIAFraiEFIAEgAGtBBGohBgJAA0AgAS0AACAAQbPUAGotAABHDQsgAEEERg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADN8BCyADQQA2AgAgBkEBaiEBQSMMCwtBmgEhAiABIARGDd0BIAMoAgAiACAEIAFraiEFIAEgAGtBAmohBgJAA0AgAS0AACAAQbDUAGotAABHDQogAEECRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADN4BCyADQQA2AgAgBkEBaiEBQQAMCgsgASAERgRAQZkBIQIM3QELAkACQCABLQAAQcgAaw4IAAwMDAwMDAEMCyABQQFqIQFB/QAhAgzEAQsgAUEBaiEBQYABIQIMwwELIAEgBEYEQEG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g0BIANBADYCHCADIAE2AhQgA0GCDzYCECADQSA2AgxBACECDM4BC0H3ACECDLQBCyADQY8BNgIcIAMgATYCFCADQewbNgIQIANBFTYCDEEAIQIMzAELIAEgBEYEQEGPASECDMwBCwJAIAEtAABBIEYEQCABQQFqIQEMAQsgA0EANgIcIAMgATYCFCADQZsfNgIQIANBBjYCDEEAIQIMzAELQQIhAgyyAQsDQCABLQAAQSBHDQIgBCABQQFqIgFHDQALQY4BIQIMygELIAEgBEYEQEGNASECDMoBCwJAIAEtAABBCWsOBEoAAEoAC0H1ACECDLABCyADLQApQQVGBEBB9gAhAgywAQtB9AAhAgyvAQsgASAERgRAQYwBIQIMyAELIANBEDYCCCADIAE2AgQMCgsgASAERgRAQYsBIQIMxwELAkAgAS0AAEEJaw4ERwAARwALQfMAIQIMrQELIAEgBEcEQCADQRA2AgggAyABNgIEQfEAIQIMrQELQYoBIQIMxQELAkAgASAERwRAA0AgAS0AAEGg0ABqLQAAIgBBA0cEQAJAIABBAWsOAkkABAtB8AAhAgyvAQsgBCABQQFqIgFHDQALQYgBIQIMxgELQYgBIQIMxQELIANBADYCHCADIAE2AhQgA0HbIDYCECADQQc2AgxBACECDMQBCyABIARGBEBBiQEhAgzEAQsCQAJAAkAgAS0AAEGg0gBqLQAAQQFrDgNGAgABC0HyACECDKwBCyADQQA2AhwgAyABNgIUIANBtBI2AhAgA0EHNgIMQQAhAgzEAQtB6gAhAgyqAQsgASAERwRAIAFBAWohAUHvACECDKoBC0GHASECDMIBCyAEIAEiAEYEQEGGASECDMIBCyAALQAAIgFBL0YEQCAAQQFqIQFB7gAhAgypAQsgAUEJayICQRdLDQEgACEBQQEgAnRBm4CABHENQQwBCyAEIAEiAEYEQEGFASECDMEBCyAALQAAQS9HDQAgAEEBaiEBDAMLQQAhAiADQQA2AhwgAyAANgIUIANB2yA2AhAgA0EHNgIMDL8BCwJAAkACQAJAAkADQCABLQAAQaDOAGotAAAiAEEFRwRAAkACQCAAQQFrDghHBQYHCAAEAQgLQesAIQIMrQELIAFBAWohAUHtACECDKwBCyAEIAFBAWoiAUcNAAtBhAEhAgzDAQsgAUEBagwUCyADKAIEIQAgA0EANgIEIAMgACABECwiAEUNHiADQdsANgIcIAMgATYCFCADIAA2AgxBACECDMEBCyADKAIEIQAgA0EANgIEIAMgACABECwiAEUNHiADQd0ANgIcIAMgATYCFCADIAA2AgxBACECDMABCyADKAIEIQAgA0EANgIEIAMgACABECwiAEUNHiADQfoANgIcIAMgATYCFCADIAA2AgxBACECDL8BCyADQQA2AhwgAyABNgIUIANB+Q82AhAgA0EHNgIMQQAhAgy+AQsgASAERgRAQYMBIQIMvgELAkAgAS0AAEGgzgBqLQAAQQFrDgg+BAUGAAgCAwcLIAFBAWohAQtBAyECDKMBCyABQQFqDA0LQQAhAiADQQA2AhwgA0HREjYCECADQQc2AgwgAyABQQFqNgIUDLoBCyADKAIEIQAgA0EANgIEIAMgACABECwiAEUNFiADQdsANgIcIAMgATYCFCADIAA2AgxBACECDLkBCyADKAIEIQAgA0EANgIEIAMgACABECwiAEUNFiADQd0ANgIcIAMgATYCFCADIAA2AgxBACECDLgBCyADKAIEIQAgA0EANgIEIAMgACABECwiAEUNFiADQfoANgIcIAMgATYCFCADIAA2AgxBACECDLcBCyADQQA2AhwgAyABNgIUIANB+Q82AhAgA0EHNgIMQQAhAgy2AQtB7AAhAgycAQsgASAERgRAQYIBIQIMtQELIAFBAWoMAgsgASAERgRAQYEBIQIMtAELIAFBAWoMAQsgASAERg0BIAFBAWoLIQFBBCECDJgBC0GAASECDLABCwNAIAEtAABBoMwAai0AACIAQQJHBEAgAEEBRwRAQekAIQIMmQELDDELIAQgAUEBaiIBRw0AC0H/ACECDK8BCyABIARGBEBB/gAhAgyvAQsCQCABLQAAQQlrDjcvAwYvBAYGBgYGBgYGBgYGBgYGBgYGBgUGBgIGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYABgsgAUEBagshAUEFIQIMlAELIAFBAWoMBgsgAygCBCEAIANBADYCBCADIAAgARAsIgBFDQggA0HbADYCHCADIAE2AhQgAyAANgIMQQAhAgyrAQsgAygCBCEAIANBADYCBCADIAAgARAsIgBFDQggA0HdADYCHCADIAE2AhQgAyAANgIMQQAhAgyqAQsgAygCBCEAIANBADYCBCADIAAgARAsIgBFDQggA0H6ADYCHCADIAE2AhQgAyAANgIMQQAhAgypAQsgA0EANgIcIAMgATYCFCADQY0UNgIQIANBBzYCDEEAIQIMqAELAkACQAJAAkADQCABLQAAQaDKAGotAAAiAEEFRwRAAkAgAEEBaw4GLgMEBQYABgtB6AAhAgyUAQsgBCABQQFqIgFHDQALQf0AIQIMqwELIAMoAgQhACADQQA2AgQgAyAAIAEQLCIARQ0HIANB2wA2AhwgAyABNgIUIAMgADYCDEEAIQIMqgELIAMoAgQhACADQQA2AgQgAyAAIAEQLCIARQ0HIANB3QA2AhwgAyABNgIUIAMgADYCDEEAIQIMqQELIAMoAgQhACADQQA2AgQgAyAAIAEQLCIARQ0HIANB+gA2AhwgAyABNgIUIAMgADYCDEEAIQIMqAELIANBADYCHCADIAE2AhQgA0HkCDYCECADQQc2AgxBACECDKcBCyABIARGDQEgAUEBagshAUEGIQIMjAELQfwAIQIMpAELAkACQAJAAkADQCABLQAAQaDIAGotAAAiAEEFRwRAIABBAWsOBCkCAwQFCyAEIAFBAWoiAUcNAAtB+wAhAgynAQsgAygCBCEAIANBADYCBCADIAAgARAsIgBFDQMgA0HbADYCHCADIAE2AhQgAyAANgIMQQAhAgymAQsgAygCBCEAIANBADYCBCADIAAgARAsIgBFDQMgA0HdADYCHCADIAE2AhQgAyAANgIMQQAhAgylAQsgAygCBCEAIANBADYCBCADIAAgARAsIgBFDQMgA0H6ADYCHCADIAE2AhQgAyAANgIMQQAhAgykAQsgA0EANgIcIAMgATYCFCADQbwKNgIQIANBBzYCDEEAIQIMowELQc8AIQIMiQELQdEAIQIMiAELQecAIQIMhwELIAEgBEYEQEH6ACECDKABCwJAIAEtAABBCWsOBCAAACAACyABQQFqIQFB5gAhAgyGAQsgASAERgRAQfkAIQIMnwELAkAgAS0AAEEJaw4EHwAAHwALQQAhAAJAIAMoAjgiAkUNACACKAI4IgJFDQAgAyACEQAAIQALIABFBEBB4gEhAgyGAQsgAEEVRwRAIANBADYCHCADIAE2AhQgA0HJDTYCECADQRo2AgxBACECDJ8BCyADQfgANgIcIAMgATYCFCADQeoaNgIQIANBFTYCDEEAIQIMngELIAEgBEcEQCADQQ02AgggAyABNgIEQeQAIQIMhQELQfcAIQIMnQELIAEgBEYEQEH2ACECDJ0BCwJAAkACQCABLQAAQcgAaw4LAAELCwsLCwsLCwILCyABQQFqIQFB3QAhAgyFAQsgAUEBaiEBQeAAIQIMhAELIAFBAWohAUHjACECDIMBC0H1ACECIAEgBEYNmwEgAygCACIAIAQgAWtqIQUgASAAa0ECaiEGAkADQCABLQAAIABBtdUAai0AAEcNCCAAQQJGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAMnAELIAMoAgQhACADQgA3AwAgAyAAIAZBAWoiARArIgAEQCADQfQANgIcIAMgATYCFCADIAA2AgxBACECDJwBC0HiACECDIIBC0EAIQACQCADKAI4IgJFDQAgAigCNCICRQ0AIAMgAhEAACEACwJAIAAEQCAAQRVGDQEgA0EANgIcIAMgATYCFCADQeoNNgIQIANBJjYCDEEAIQIMnAELQeEAIQIMggELIANB8wA2AhwgAyABNgIUIANBgBs2AhAgA0EVNgIMQQAhAgyaAQsgAy0AKSIAQSNrQQtJDQkCQCAAQQZLDQBBASAAdEHKAHFFDQAMCgtBACECIANBADYCHCADIAE2AhQgA0HtCTYCECADQQg2AgwMmQELQfIAIQIgASAERg2YASADKAIAIgAgBCABa2ohBSABIABrQQFqIQYCQANAIAEtAAAgAEGz1QBqLQAARw0FIABBAUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAyZAQsgAygCBCEAIANCADcDACADIAAgBkEBaiIBECsiAARAIANB8QA2AhwgAyABNgIUIAMgADYCDEEAIQIMmQELQd8AIQIMfwtBACEAAkAgAygCOCICRQ0AIAIoAjQiAkUNACADIAIRAAAhAAsCQCAABEAgAEEVRg0BIANBADYCHCADIAE2AhQgA0HqDTYCECADQSY2AgxBACECDJkBC0HeACECDH8LIANB8AA2AhwgAyABNgIUIANBgBs2AhAgA0EVNgIMQQAhAgyXAQsgAy0AKUEhRg0GIANBADYCHCADIAE2AhQgA0GRCjYCECADQQg2AgxBACECDJYBC0HvACECIAEgBEYNlQEgAygCACIAIAQgAWtqIQUgASAAa0ECaiEGAkADQCABLQAAIABBsNUAai0AAEcNAiAAQQJGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAMlgELIAMoAgQhACADQgA3AwAgAyAAIAZBAWoiARArIgBFDQIgA0HtADYCHCADIAE2AhQgAyAANgIMQQAhAgyVAQsgA0EANgIACyADKAIEIQAgA0EANgIEIAMgACABECsiAEUNgAEgA0HuADYCHCADIAE2AhQgAyAANgIMQQAhAgyTAQtB3AAhAgx5C0EAIQACQCADKAI4IgJFDQAgAigCNCICRQ0AIAMgAhEAACEACwJAIAAEQCAAQRVGDQEgA0EANgIcIAMgATYCFCADQeoNNgIQIANBJjYCDEEAIQIMkwELQdsAIQIMeQsgA0HsADYCHCADIAE2AhQgA0GAGzYCECADQRU2AgxBACECDJEBCyADLQApIgBBI0kNACAAQS5GDQAgA0EANgIcIAMgATYCFCADQckJNgIQIANBCDYCDEEAIQIMkAELQdoAIQIMdgsgASAERgRAQesAIQIMjwELAkAgAS0AAEEvRgRAIAFBAWohAQwBCyADQQA2AhwgAyABNgIUIANBsjg2AhAgA0EINgIMQQAhAgyPAQtB2QAhAgx1CyABIARHBEAgA0EONgIIIAMgATYCBEHYACECDHULQeoAIQIMjQELIAEgBEYEQEHpACECDI0BCyABLQAAQTBrIgBB/wFxQQpJBEAgAyAAOgAqIAFBAWohAUHXACECDHQLIAMoAgQhACADQQA2AgQgAyAAIAEQLyIARQ16IANB6AA2AhwgAyABNgIUIAMgADYCDEEAIQIMjA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); var se = c$3(((e, t) => { let n = [ `GET`, `HEAD`, `POST` ], r = new Set(n), i = [ 101, 204, 205, 304 ], a = [ 301, 302, 303, 307, 308 ], o = new Set(a), s = `1.7.9.11.13.15.17.19.20.21.22.23.25.37.42.43.53.69.77.79.87.95.101.102.103.104.109.110.111.113.115.117.119.123.135.137.139.143.161.179.389.427.465.512.513.514.515.526.530.531.532.540.548.554.556.563.587.601.636.989.990.993.995.1719.1720.1723.2049.3659.4045.4190.5060.5061.6000.6566.6665.6666.6667.6668.6669.6679.6697.10080`.split(`.`), c = new Set(s), l = [ `no-referrer`, `no-referrer-when-downgrade`, `same-origin`, `origin`, `strict-origin`, `origin-when-cross-origin`, `strict-origin-when-cross-origin`, `unsafe-url` ], u = [``, ...l], d = new Set(l), f = [ `follow`, `manual`, `error` ], p = [ `GET`, `HEAD`, `OPTIONS`, `TRACE` ], m = new Set(p), h = [ `navigate`, `same-origin`, `no-cors`, `cors` ], g = [ `omit`, `same-origin`, `include` ], _ = [ `default`, `no-store`, `reload`, `no-cache`, `force-cache`, `only-if-cached` ], v = [ `content-encoding`, `content-language`, `content-location`, `content-type`, `content-length` ], y = [`half`], b = [ `CONNECT`, `TRACE`, `TRACK` ], x = new Set(b), S = [ `audio`, `audioworklet`, `font`, `image`, `manifest`, `paintworklet`, `script`, `style`, `track`, `video`, `xslt`, `` ]; t.exports = { subresource: S, forbiddenMethods: b, requestBodyHeader: v, referrerPolicy: u, requestRedirect: f, requestMode: h, requestCredentials: g, requestCache: _, redirectStatus: a, corsSafeListedMethods: n, nullBodyStatus: i, safeMethods: p, badPorts: s, requestDuplex: y, subresourceSet: new Set(S), badPortsSet: c, redirectStatusSet: o, corsSafeListedMethodsSet: r, safeMethodsSet: m, forbiddenMethodsSet: x, referrerPolicyTokens: d }; })); var ce = c$3(((e, t) => { let n = Symbol.for(`undici.globalOrigin.1`); function r() { return globalThis[n]; } function i(e) { if (e === void 0) { Object.defineProperty(globalThis, n, { value: void 0, writable: !0, enumerable: !1, configurable: !1 }); return; } let t = new URL(e); if (t.protocol !== `http:` && t.protocol !== `https:`) throw TypeError(`Only http & https urls are allowed, received ${t.protocol}`); Object.defineProperty(globalThis, n, { value: t, writable: !0, enumerable: !1, configurable: !1 }); } t.exports = { getGlobalOrigin: r, setGlobalOrigin: i }; })); var le = c$3(((e, t) => { let n = new TextDecoder(); function r(e) { return e.length === 0 ? `` : (e[0] === 239 && e[1] === 187 && e[2] === 191 && (e = e.subarray(3)), n.decode(e)); } t.exports = { utf8DecodeBytes: r }; })); var q$1 = c$3(((e, t) => { let r = p$4(`node:assert`), { utf8DecodeBytes: i } = le(); function a(e, t, n) { let r = ``; for (; n.position < t.length && e(t[n.position]);) r += t[n.position], n.position++; return r; } function o(e, t, n) { let r = t.indexOf(e, n.position), i = n.position; return r === -1 ? (n.position = t.length, t.slice(i)) : (n.position = r, t.slice(i, n.position)); } let s = /[\u0009\u000A\u000C\u000D\u0020]/g; function c(e) { e = e.replace(s, ``); let t = e.length; if (t % 4 == 0 && e.charCodeAt(t - 1) === 61 && (--t, e.charCodeAt(t - 1) === 61 && --t), t % 4 == 1 || /[^+/0-9A-Za-z]/.test(e.length === t ? e : e.substring(0, t))) return `failure`; let n = Buffer.from(e, `base64`); return new Uint8Array(n.buffer, n.byteOffset, n.byteLength); } function l(e) { return e === 9 || e === 10 || e === 12 || e === 13 || e === 32; } function u(e) { let t = e.length; if (65535 > t) return String.fromCharCode.apply(null, e); let n = ``, r = 0, i = 65535; for (; r < t;) r + i > t && (i = t - r), n += String.fromCharCode.apply(null, e.subarray(r, r += i)); return n; } let d = /[^\x00-\xFF]/; function f(e) { return r(!d.test(e)), e; } function p(e) { return JSON.parse(i(e)); } function m(e, t = !0, n = !0) { return h(e, t, n, l); } function h(e, t, n, r) { let i = 0, a = e.length - 1; if (t) for (; i < e.length && r(e.charCodeAt(i));) i++; if (n) for (; a > 0 && r(e.charCodeAt(a));) a--; return i === 0 && a === e.length - 1 ? e : e.slice(i, a + 1); } function g(e) { let t = JSON.stringify(e); if (t === void 0) throw TypeError(`Value is not JSON serializable`); return r(typeof t == `string`), t; } t.exports = { collectASequenceOfCodePoints: a, collectASequenceOfCodePointsFast: o, forgivingBase64: c, isASCIIWhitespace: l, isomorphicDecode: u, isomorphicEncode: f, parseJSONFromBytes: p, removeASCIIWhitespace: m, removeChars: h, serializeJavascriptValueToJSONString: g }; })); var J$1 = c$3(((e, t) => { let r = p$4(`node:assert`), { forgivingBase64: i, collectASequenceOfCodePoints: a, collectASequenceOfCodePointsFast: o, isomorphicDecode: s, removeASCIIWhitespace: c, removeChars: l } = q$1(), u = new TextEncoder(), d = /^[-!#$%&'*+.^_|~A-Za-z0-9]+$/u, f = /[\u000A\u000D\u0009\u0020]/u, p = /^[\u0009\u0020-\u007E\u0080-\u00FF]+$/u; function m(e) { r(e.protocol === `data:`); let t = h(e, !0); t = t.slice(5); let n = { position: 0 }, a = o(`,`, t, n), l = a.length; if (a = c(a, !0, !0), n.position >= t.length) return `failure`; n.position++; let u = g(t.slice(l + 1)); if (/;(?:\u0020*)base64$/iu.test(a)) { if (u = i(s(u)), u === `failure`) return `failure`; a = a.slice(0, -6), a = a.replace(/(\u0020+)$/u, ``), a = a.slice(0, -1); } a.startsWith(`;`) && (a = `text/plain` + a); let d = b(a); return d === `failure` && (d = b(`text/plain;charset=US-ASCII`)), { mimeType: d, body: u }; } function h(e, t = !1) { if (!t) return e.href; let n = e.href, r = e.hash.length, i = r === 0 ? n : n.substring(0, n.length - r); return !r && n.endsWith(`#`) ? i.slice(0, -1) : i; } function g(e) { return y(u.encode(e)); } function _(e) { return e >= 48 && e <= 57 || e >= 65 && e <= 70 || e >= 97 && e <= 102; } function v(e) { return e >= 48 && e <= 57 ? e - 48 : (e & 223) - 55; } function y(e) { let t = e.length, n = new Uint8Array(t), r = 0, i = 0; for (; i < t;) { let t = e[i]; t === 37 ? t === 37 && !(_(e[i + 1]) && _(e[i + 2])) ? n[r++] = 37 : (n[r++] = v(e[i + 1]) << 4 | v(e[i + 2]), i += 2) : n[r++] = t, ++i; } return t === r ? n : n.subarray(0, r); } function b(e) { e = w(e, !0, !0); let t = { position: 0 }, n = o(`/`, e, t); if (n.length === 0 || !d.test(n) || t.position >= e.length) return `failure`; t.position++; let r = o(`;`, e, t); if (r = w(r, !1, !0), r.length === 0 || !d.test(r)) return `failure`; let i = n.toLowerCase(), s = r.toLowerCase(), c = { type: i, subtype: s, parameters: /* @__PURE__ */ new Map(), essence: `${i}/${s}` }; for (; t.position < e.length;) { t.position++, a((e) => f.test(e), e, t); let n = a((e) => e !== `;` && e !== `=`, e, t); if (n = n.toLowerCase(), t.position < e.length) { if (e[t.position] === `;`) continue; t.position++; } if (t.position >= e.length) break; let r = null; if (e[t.position] === `"`) r = x(e, t, !0), o(`;`, e, t); else if (r = o(`;`, e, t), r = w(r, !1, !0), r.length === 0) continue; n.length !== 0 && d.test(n) && (r.length === 0 || p.test(r)) && !c.parameters.has(n) && c.parameters.set(n, r); } return c; } function x(e, t, n = !1) { let i = t.position, o = ``; for (r(e[t.position] === `"`), t.position++; o += a((e) => e !== `"` && e !== `\\`, e, t), !(t.position >= e.length);) { let n = e[t.position]; if (t.position++, n === `\\`) { if (t.position >= e.length) { o += `\\`; break; } o += e[t.position], t.position++; } else { r(n === `"`); break; } } return n ? o : e.slice(i, t.position); } function S(e) { r(e !== `failure`); let { parameters: t, essence: n } = e, i = n; for (let [e, n] of t.entries()) i += `;`, i += e, i += `=`, d.test(n) || (n = n.replace(/[\\"]/gu, `\\$&`), n = `"` + n, n += `"`), i += n; return i; } function C(e) { return e === 13 || e === 10 || e === 9 || e === 32; } function w(e, t = !0, n = !0) { return l(e, t, n, C); } function T(e) { switch (e.essence) { case `application/ecmascript`: case `application/javascript`: case `application/x-ecmascript`: case `application/x-javascript`: case `text/ecmascript`: case `text/javascript`: case `text/javascript1.0`: case `text/javascript1.1`: case `text/javascript1.2`: case `text/javascript1.3`: case `text/javascript1.4`: case `text/javascript1.5`: case `text/jscript`: case `text/livescript`: case `text/x-ecmascript`: case `text/x-javascript`: return `text/javascript`; case `application/json`: case `text/json`: return `application/json`; case `image/svg+xml`: return `image/svg+xml`; case `text/xml`: case `application/xml`: return `application/xml`; } return e.subtype.endsWith(`+json`) ? `application/json` : e.subtype.endsWith(`+xml`) ? `application/xml` : ``; } t.exports = { dataURLProcessor: m, URLSerializer: h, stringPercentDecode: g, parseMIMEType: b, collectAnHTTPQuotedString: x, serializeAMimeType: S, removeHTTPWhitespace: w, minimizeSupportedMimeType: T, HTTP_TOKEN_CODEPOINTS: d }; })); var ue = c$3(((e, t) => { let r = { __proto__: null, "node:crypto": () => p$4(`node:crypto`), "node:sqlite": () => p$4(`node:sqlite`), "node:worker_threads": () => p$4(`node:worker_threads`), "node:zlib": () => p$4(`node:zlib`) }; function i(e) { try { return r[e](), !0; } catch (e) { if (e.code !== `ERR_UNKNOWN_BUILTIN_MODULE` && e.code !== `ERR_NO_CRYPTO`) throw e; return !1; } } function a(e, t) { return r[e]()[t] !== void 0; } let o = [`markAsUncloneable`, `zstd`], s = { markAsUncloneable: [`node:worker_threads`, `markAsUncloneable`], zstd: [`node:zlib`, `createZstdDecompress`] }, c = [`crypto`, `sqlite`], l = [...c, ...o]; function u(e) { if (c.includes(e)) return i(`node:${e}`); if (o.includes(e)) { let [t, n] = s[e]; return a(t, n); } throw TypeError(`unknown feature: ${e}`); } let d = new class { #e = /* @__PURE__ */ new Map(); clear() { this.#e.clear(); } has(e) { return this.#e.get(e) ?? this.#t(e); } set(e, t) { if (l.includes(e) === !1) throw TypeError(`unknown feature: ${e}`); this.#e.set(e, t); } #t(e) { let t = u(e); return this.#e.set(e, t), t; } }(); t.exports.runtimeFeatures = d, t.exports.default = d; })); var de = c$3(((e, t) => { let r = p$4(`node:assert`), { types: i, inspect: a } = p$4(`node:util`), { runtimeFeatures: o } = ue(), s = Function.call.bind(Function.prototype[Symbol.hasInstance]), c = { converters: {}, util: {}, errors: {}, is: {} }; c.errors.exception = function(e) { return TypeError(`${e.header}: ${e.message}`); }, c.errors.conversionFailed = function(e) { let t = e.types.length === 1 ? `` : ` one of`, n = `${e.argument} could not be converted to${t}: ${e.types.join(`, `)}.`; return c.errors.exception({ header: e.prefix, message: n }); }, c.errors.invalidArgument = function(e) { return c.errors.exception({ header: e.prefix, message: `"${e.value}" is an invalid ${e.type}.` }); }, c.brandCheck = function(e, t) { if (!s(t, e)) { let e = TypeError(`Illegal invocation`); throw e.code = `ERR_INVALID_THIS`, e; } }, c.brandCheckMultiple = function(e) { let t = e.map((e) => c.util.MakeTypeAssertion(e)); return (e) => { if (t.every((t) => !t(e))) { let e = TypeError(`Illegal invocation`); throw e.code = `ERR_INVALID_THIS`, e; } }; }, c.argumentLengthCheck = function({ length: e }, t, n) { if (e < t) throw c.errors.exception({ message: `${t} argument${t === 1 ? `` : `s`} required, but${e ? ` only` : ``} ${e} found.`, header: n }); }, c.illegalConstructor = function() { throw c.errors.exception({ header: `TypeError`, message: `Illegal constructor` }); }, c.util.MakeTypeAssertion = function(e) { return (t) => s(e, t); }, c.util.Type = function(e) { switch (typeof e) { case `undefined`: return 1; case `boolean`: return 2; case `string`: return 3; case `symbol`: return 4; case `number`: return 5; case `bigint`: return 6; case `function`: case `object`: return e === null ? 7 : 8; } }, c.util.Types = { UNDEFINED: 1, BOOLEAN: 2, STRING: 3, SYMBOL: 4, NUMBER: 5, BIGINT: 6, NULL: 7, OBJECT: 8 }, c.util.TypeValueToString = function(e) { switch (c.util.Type(e)) { case 1: return `Undefined`; case 2: return `Boolean`; case 3: return `String`; case 4: return `Symbol`; case 5: return `Number`; case 6: return `BigInt`; case 7: return `Null`; case 8: return `Object`; } }, c.util.markAsUncloneable = o.has(`markAsUncloneable`) ? p$4(`node:worker_threads`).markAsUncloneable : () => {}, c.util.ConvertToInt = function(e, t, n, r) { let i, a; t === 64 ? (i = 2 ** 53 - 1, a = n === `unsigned` ? 0 : -9007199254740991) : n === `unsigned` ? (a = 0, i = 2 ** t - 1) : (a = -(2 ** (t - 1)), i = 2 ** (t - 1) - 1); let o = Number(e); if (o === 0 && (o = 0), c.util.HasFlag(r, c.attributes.EnforceRange)) { if (Number.isNaN(o) || o === Infinity || o === -Infinity) throw c.errors.exception({ header: `Integer conversion`, message: `Could not convert ${c.util.Stringify(e)} to an integer.` }); if (o = c.util.IntegerPart(o), o < a || o > i) throw c.errors.exception({ header: `Integer conversion`, message: `Value must be between ${a}-${i}, got ${o}.` }); return o; } return !Number.isNaN(o) && c.util.HasFlag(r, c.attributes.Clamp) ? (o = Math.min(Math.max(o, a), i), o = Math.floor(o) % 2 == 0 ? Math.floor(o) : Math.ceil(o), o) : Number.isNaN(o) || o === 0 && Object.is(0, o) || o === Infinity || o === -Infinity ? 0 : (o = c.util.IntegerPart(o), o %= 2 ** t, n === `signed` && o >= 2 ** (t - 1) ? o - 2 ** t : o); }, c.util.IntegerPart = function(e) { let t = Math.floor(Math.abs(e)); return e < 0 ? -1 * t : t; }, c.util.Stringify = function(e) { switch (c.util.Type(e)) { case 4: return `Symbol(${e.description})`; case 8: return a(e); case 3: return `"${e}"`; case 6: return `${e}n`; default: return `${e}`; } }, c.util.IsResizableArrayBuffer = function(e) { if (i.isArrayBuffer(e)) return e.resizable; if (i.isSharedArrayBuffer(e)) return e.growable; throw c.errors.exception({ header: `IsResizableArrayBuffer`, message: `"${c.util.Stringify(e)}" is not an array buffer.` }); }, c.util.HasFlag = function(e, t) { return typeof e == `number` && (e & t) === t; }, c.sequenceConverter = function(e) { return (t, n, r, i) => { if (c.util.Type(t) !== 8) throw c.errors.exception({ header: n, message: `${r} (${c.util.Stringify(t)}) is not iterable.` }); let a = typeof i == `function` ? i() : t?.[Symbol.iterator]?.(), o = [], s = 0; if (a === void 0 || typeof a.next != `function`) throw c.errors.exception({ header: n, message: `${r} is not iterable.` }); for (;;) { let { done: t, value: i } = a.next(); if (t) break; o.push(e(i, n, `${r}[${s++}]`)); } return o; }; }, c.recordConverter = function(e, t) { return (n, r, a) => { if (c.util.Type(n) !== 8) throw c.errors.exception({ header: r, message: `${a} ("${c.util.TypeValueToString(n)}") is not an Object.` }); let o = {}; if (!i.isProxy(n)) { let i = [...Object.getOwnPropertyNames(n), ...Object.getOwnPropertySymbols(n)]; for (let s of i) { let i = c.util.Stringify(s), l = e(s, r, `Key ${i} in ${a}`); o[l] = t(n[s], r, `${a}[${i}]`); } return o; } let s = Reflect.ownKeys(n); for (let i of s) if (Reflect.getOwnPropertyDescriptor(n, i)?.enumerable) { let s = e(i, r, a); o[s] = t(n[i], r, a); } return o; }; }, c.interfaceConverter = function(e, t) { return (n, r, i) => { if (!e(n)) throw c.errors.exception({ header: r, message: `Expected ${i} ("${c.util.Stringify(n)}") to be an instance of ${t}.` }); return n; }; }, c.dictionaryConverter = function(e) { return e.sort((e, t) => (e.key > t.key) - (e.key < t.key)), (t, n, r) => { let i = {}; if (t != null && c.util.Type(t) !== 8) throw c.errors.exception({ header: n, message: `Expected ${t} to be one of: Null, Undefined, Object.` }); for (let a of e) { let { key: e, defaultValue: o, required: s, converter: l } = a; if (s === !0 && (t == null || !Object.hasOwn(t, e))) throw c.errors.exception({ header: n, message: `Missing required key "${e}".` }); let u = t?.[e], d = o !== void 0; if (d && u === void 0 && (u = o()), s || d || u !== void 0) { if (u = l(u, n, `${r}.${e}`), a.allowedValues && !a.allowedValues.includes(u)) throw c.errors.exception({ header: n, message: `${u} is not an accepted type. Expected one of ${a.allowedValues.join(`, `)}.` }); i[e] = u; } } return i; }; }, c.nullableConverter = function(e) { return (t, n, r) => t === null ? t : e(t, n, r); }, c.is.USVString = function(e) { return typeof e == `string` && e.isWellFormed(); }, c.is.ReadableStream = c.util.MakeTypeAssertion(ReadableStream), c.is.Blob = c.util.MakeTypeAssertion(Blob), c.is.URLSearchParams = c.util.MakeTypeAssertion(URLSearchParams), c.is.File = c.util.MakeTypeAssertion(File), c.is.URL = c.util.MakeTypeAssertion(URL), c.is.AbortSignal = c.util.MakeTypeAssertion(AbortSignal), c.is.MessagePort = c.util.MakeTypeAssertion(MessagePort), c.is.BufferSource = function(e) { return i.isArrayBuffer(e) || ArrayBuffer.isView(e) && i.isArrayBuffer(e.buffer); }, c.util.getCopyOfBytesHeldByBufferSource = function(e) { let t = e, n = t, a = 0, o = 0; if (i.isTypedArray(t) || i.isDataView(t) ? (n = t.buffer, a = t.byteOffset, o = t.byteLength) : (r(i.isAnyArrayBuffer(t)), o = t.byteLength), n.detached) return /* @__PURE__ */ new Uint8Array(); let s = new Uint8Array(o), c = new Uint8Array(n, a, o); return s.set(c), s; }, c.converters.DOMString = function(e, t, n, r) { if (e === null && c.util.HasFlag(r, c.attributes.LegacyNullToEmptyString)) return ``; if (typeof e == `symbol`) throw c.errors.exception({ header: t, message: `${n} is a symbol, which cannot be converted to a DOMString.` }); return String(e); }, c.converters.ByteString = function(e, t, n) { if (typeof e == `symbol`) throw c.errors.exception({ header: t, message: `${n} is a symbol, which cannot be converted to a ByteString.` }); let r = String(e); for (let e = 0; e < r.length; e++) if (r.charCodeAt(e) > 255) throw TypeError(`Cannot convert argument to a ByteString because the character at index ${e} has a value of ${r.charCodeAt(e)} which is greater than 255.`); return r; }, c.converters.USVString = function(e) { return typeof e == `string` ? e.toWellFormed() : `${e}`.toWellFormed(); }, c.converters.boolean = function(e) { return !!e; }, c.converters.any = function(e) { return e; }, c.converters[`long long`] = function(e, t, n) { return c.util.ConvertToInt(e, 64, `signed`, 0, t, n); }, c.converters[`unsigned long long`] = function(e, t, n) { return c.util.ConvertToInt(e, 64, `unsigned`, 0, t, n); }, c.converters[`unsigned long`] = function(e, t, n) { return c.util.ConvertToInt(e, 32, `unsigned`, 0, t, n); }, c.converters[`unsigned short`] = function(e, t, n, r) { return c.util.ConvertToInt(e, 16, `unsigned`, r, t, n); }, c.converters.ArrayBuffer = function(e, t, n, r) { if (c.util.Type(e) !== 8 || !i.isArrayBuffer(e)) throw c.errors.conversionFailed({ prefix: t, argument: `${n} ("${c.util.Stringify(e)}")`, types: [`ArrayBuffer`] }); if (!c.util.HasFlag(r, c.attributes.AllowResizable) && c.util.IsResizableArrayBuffer(e)) throw c.errors.exception({ header: t, message: `${n} cannot be a resizable ArrayBuffer.` }); return e; }, c.converters.SharedArrayBuffer = function(e, t, n, r) { if (c.util.Type(e) !== 8 || !i.isSharedArrayBuffer(e)) throw c.errors.conversionFailed({ prefix: t, argument: `${n} ("${c.util.Stringify(e)}")`, types: [`SharedArrayBuffer`] }); if (!c.util.HasFlag(r, c.attributes.AllowResizable) && c.util.IsResizableArrayBuffer(e)) throw c.errors.exception({ header: t, message: `${n} cannot be a resizable SharedArrayBuffer.` }); return e; }, c.converters.TypedArray = function(e, t, n, r, a) { if (c.util.Type(e) !== 8 || !i.isTypedArray(e) || e.constructor.name !== t.name) throw c.errors.conversionFailed({ prefix: n, argument: `${r} ("${c.util.Stringify(e)}")`, types: [t.name] }); if (!c.util.HasFlag(a, c.attributes.AllowShared) && i.isSharedArrayBuffer(e.buffer)) throw c.errors.exception({ header: n, message: `${r} cannot be a view on a shared array buffer.` }); if (!c.util.HasFlag(a, c.attributes.AllowResizable) && c.util.IsResizableArrayBuffer(e.buffer)) throw c.errors.exception({ header: n, message: `${r} cannot be a view on a resizable array buffer.` }); return e; }, c.converters.DataView = function(e, t, n, r) { if (c.util.Type(e) !== 8 || !i.isDataView(e)) throw c.errors.conversionFailed({ prefix: t, argument: `${n} ("${c.util.Stringify(e)}")`, types: [`DataView`] }); if (!c.util.HasFlag(r, c.attributes.AllowShared) && i.isSharedArrayBuffer(e.buffer)) throw c.errors.exception({ header: t, message: `${n} cannot be a view on a shared array buffer.` }); if (!c.util.HasFlag(r, c.attributes.AllowResizable) && c.util.IsResizableArrayBuffer(e.buffer)) throw c.errors.exception({ header: t, message: `${n} cannot be a view on a resizable array buffer.` }); return e; }, c.converters.ArrayBufferView = function(e, t, n, r) { if (c.util.Type(e) !== 8 || !i.isArrayBufferView(e)) throw c.errors.conversionFailed({ prefix: t, argument: `${n} ("${c.util.Stringify(e)}")`, types: [`ArrayBufferView`] }); if (!c.util.HasFlag(r, c.attributes.AllowShared) && i.isSharedArrayBuffer(e.buffer)) throw c.errors.exception({ header: t, message: `${n} cannot be a view on a shared array buffer.` }); if (!c.util.HasFlag(r, c.attributes.AllowResizable) && c.util.IsResizableArrayBuffer(e.buffer)) throw c.errors.exception({ header: t, message: `${n} cannot be a view on a resizable array buffer.` }); return e; }, c.converters.BufferSource = function(e, t, n, r) { if (i.isArrayBuffer(e)) return c.converters.ArrayBuffer(e, t, n, r); if (i.isArrayBufferView(e)) return r &= ~c.attributes.AllowShared, c.converters.ArrayBufferView(e, t, n, r); throw i.isSharedArrayBuffer(e) ? c.errors.exception({ header: t, message: `${n} cannot be a SharedArrayBuffer.` }) : c.errors.conversionFailed({ prefix: t, argument: `${n} ("${c.util.Stringify(e)}")`, types: [`ArrayBuffer`, `ArrayBufferView`] }); }, c.converters.AllowSharedBufferSource = function(e, t, n, r) { if (i.isArrayBuffer(e)) return c.converters.ArrayBuffer(e, t, n, r); if (i.isSharedArrayBuffer(e)) return c.converters.SharedArrayBuffer(e, t, n, r); if (i.isArrayBufferView(e)) return r |= c.attributes.AllowShared, c.converters.ArrayBufferView(e, t, n, r); throw c.errors.conversionFailed({ prefix: t, argument: `${n} ("${c.util.Stringify(e)}")`, types: [ `ArrayBuffer`, `SharedArrayBuffer`, `ArrayBufferView` ] }); }, c.converters[`sequence`] = c.sequenceConverter(c.converters.ByteString), c.converters[`sequence>`] = c.sequenceConverter(c.converters[`sequence`]), c.converters[`record`] = c.recordConverter(c.converters.ByteString, c.converters.ByteString), c.converters.Blob = c.interfaceConverter(c.is.Blob, `Blob`), c.converters.AbortSignal = c.interfaceConverter(c.is.AbortSignal, `AbortSignal`), c.converters.EventHandlerNonNull = function(e) { return c.util.Type(e) === 8 ? typeof e == `function` ? e : () => {} : null; }, c.attributes = { Clamp: 1, EnforceRange: 2, AllowShared: 4, AllowResizable: 8, LegacyNullToEmptyString: 16 }, t.exports = { webidl: c }; })); var Y$1 = c$3(((e, t) => { let { Transform: r } = p$4(`node:stream`), i = p$4(`node:zlib`), { redirectStatusSet: a, referrerPolicyTokens: o, badPortsSet: s } = se(), { getGlobalOrigin: c } = ce(), { collectAnHTTPQuotedString: l, parseMIMEType: u } = J$1(), { performance: d } = p$4(`node:perf_hooks`), { ReadableStreamFrom: f, isValidHTTPToken: p, normalizedMethodRecordsBase: m } = B$1(), h = p$4(`node:assert`), { isUint8Array: g } = p$4(`node:util/types`), { webidl: _ } = de(), { isomorphicEncode: v, collectASequenceOfCodePoints: y, removeChars: b } = q$1(); function x(e) { let t = e.urlList, n = t.length; return n === 0 ? null : t[n - 1].toString(); } function S(e, t) { if (!a.has(e.status)) return null; let n = e.headersList.get(`location`, !0); return n !== null && A(n) && (C(n) || (n = w(n)), n = new URL(n, x(e))), n && !n.hash && (n.hash = t), n; } function C(e) { for (let t = 0; t < e.length; ++t) { let n = e.charCodeAt(t); if (n > 126 || n < 32) return !1; } return !0; } function w(e) { return Buffer.from(e, `binary`).toString(`utf8`); } function T(e) { return e.urlList[e.urlList.length - 1]; } function E(e) { let t = T(e); return ve(t) && s.has(t.port) ? `blocked` : `allowed`; } function D(e) { return e instanceof Error || e?.constructor?.name === `Error` || e?.constructor?.name === `DOMException`; } function O(e) { for (let t = 0; t < e.length; ++t) { let n = e.charCodeAt(t); if (!(n === 9 || n >= 32 && n <= 126 || n >= 128 && n <= 255)) return !1; } return !0; } let k = p; function A(e) { return (e[0] === ` ` || e[0] === ` ` || e[e.length - 1] === ` ` || e[e.length - 1] === ` ` || e.includes(` `) || e.includes(`\r`) || e.includes(`\0`)) === !1; } function j(e) { let t = (e.headersList.get(`referrer-policy`, !0) ?? ``).split(`,`), n = ``; if (t.length) for (let e = t.length; e !== 0; e--) { let r = t[e - 1].trim(); if (o.has(r)) { n = r; break; } } return n; } function M(e, t) { let n = j(t); n !== `` && (e.referrerPolicy = n); } function N() { return `allowed`; } function P() { return `success`; } function F() { return `success`; } function I(e) { let t = null; t = e.mode, e.headersList.set(`sec-fetch-mode`, t, !0); } function L(e) { let t = e.origin; if (!(t === `client` || t === void 0)) { if (e.responseTainting === `cors` || e.mode === `websocket`) e.headersList.append(`origin`, t, !0); else if (e.method !== `GET` && e.method !== `HEAD`) { switch (e.referrerPolicy) { case `no-referrer`: t = null; break; case `no-referrer-when-downgrade`: case `strict-origin`: case `strict-origin-when-cross-origin`: e.origin && _e(e.origin) && !_e(T(e)) && (t = null); break; case `same-origin`: oe(e, T(e)) || (t = null); break; default: } e.headersList.append(`origin`, t, !0); } } } function R(e, t) { return e; } function ee(e, t, n) { return !e?.startTime || e.startTime < t ? { domainLookupStartTime: t, domainLookupEndTime: t, connectionStartTime: t, connectionEndTime: t, secureConnectionStartTime: t, ALPNNegotiatedProtocol: e?.ALPNNegotiatedProtocol } : { domainLookupStartTime: R(e.domainLookupStartTime, n), domainLookupEndTime: R(e.domainLookupEndTime, n), connectionStartTime: R(e.connectionStartTime, n), connectionEndTime: R(e.connectionEndTime, n), secureConnectionStartTime: R(e.secureConnectionStartTime, n), ALPNNegotiatedProtocol: e.ALPNNegotiatedProtocol }; } function z(e) { return R(d.now(), e); } function V(e) { return { startTime: e.startTime ?? 0, redirectStartTime: 0, redirectEndTime: 0, postRedirectStartTime: e.startTime ?? 0, finalServiceWorkerStartTime: 0, finalNetworkResponseStartTime: 0, finalNetworkRequestStartTime: 0, endTime: 0, encodedBodySize: 0, decodedBodySize: 0, finalConnectionTimingInfo: null }; } function H() { return { referrerPolicy: `strict-origin-when-cross-origin` }; } function te(e) { return { referrerPolicy: e.referrerPolicy }; } function U(e) { let t = e.referrerPolicy; h(t); let n = null; if (e.referrer === `client`) { let e = c(); if (!e || e.origin === `null`) return `no-referrer`; n = new URL(e); } else _.is.URL(e.referrer) && (n = e.referrer); let r = W(n), i = W(n, !0); switch (r.toString().length > 4096 && (r = i), t) { case `no-referrer`: return `no-referrer`; case `origin`: return i ?? W(n, !0); case `unsafe-url`: return r; case `strict-origin`: { let t = T(e); return ie(r) && !ie(t) ? `no-referrer` : i; } case `strict-origin-when-cross-origin`: { let t = T(e); return oe(r, t) ? r : ie(r) && !ie(t) ? `no-referrer` : i; } case `same-origin`: return oe(e, r) ? r : `no-referrer`; case `origin-when-cross-origin`: return oe(e, r) ? r : i; case `no-referrer-when-downgrade`: { let t = T(e); return ie(r) && !ie(t) ? `no-referrer` : r; } } } function W(e, t = !1) { return h(_.is.URL(e)), e = new URL(e), Z(e) ? `no-referrer` : (e.username = ``, e.password = ``, e.hash = ``, t === !0 && (e.pathname = ``, e.search = ``), e); } let ne = RegExp.prototype.test.bind(/^127\.(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)\.){2}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)$/), G = RegExp.prototype.test.bind(/^(?:(?:0{1,4}:){7}|(?:0{1,4}:){1,6}:|::)0{0,3}1$/); function K(e) { return e.includes(`:`) ? (e[0] === `[` && e[e.length - 1] === `]` && (e = e.slice(1, -1)), G(e)) : ne(e); } function re(e) { return e == null || e === `null` ? !1 : (e = new URL(e), !!(e.protocol === `https:` || e.protocol === `wss:` || K(e.hostname) || e.hostname === `localhost` || e.hostname === `localhost.` || e.hostname.endsWith(`.localhost`) || e.hostname.endsWith(`.localhost.`) || e.protocol === `file:`)); } function ie(e) { return _.is.URL(e) ? e.href === `about:blank` || e.href === `about:srcdoc` || e.protocol === `data:` || e.protocol === `blob:` ? !0 : re(e.origin) : !1; } function ae(e) {} function oe(e, t) { return e.origin === t.origin && e.origin === `null` || e.protocol === t.protocol && e.hostname === t.hostname && e.port === t.port; } function le(e) { return e.controller.state === `aborted`; } function ue(e) { return e.controller.state === `aborted` || e.controller.state === `terminated`; } function Y(e) { return m[e.toLowerCase()] ?? e; } let fe = Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]())); function pe(e, t, n = 0, r = 1) { class i { #e; #t; #n; constructor(e, t) { this.#e = e, this.#t = t, this.#n = 0; } next() { if (typeof this != `object` || this === null || !(#e in this)) throw TypeError(`'next' called on an object that does not implement interface ${e} Iterator.`); let i = this.#n, a = t(this.#e); if (i >= a.length) return { value: void 0, done: !0 }; let { [n]: o, [r]: s } = a[i]; this.#n = i + 1; let c; switch (this.#t) { case `key`: c = o; break; case `value`: c = s; break; case `key+value`: c = [o, s]; break; } return { value: c, done: !1 }; } } return delete i.prototype.constructor, Object.setPrototypeOf(i.prototype, fe), Object.defineProperties(i.prototype, { [Symbol.toStringTag]: { writable: !1, enumerable: !1, configurable: !0, value: `${e} Iterator` }, next: { writable: !0, enumerable: !0, configurable: !0 } }), function(e, t) { return new i(e, t); }; } function X(e, t, n, r = 0, i = 1) { let a = pe(e, n, r, i), o = { keys: { writable: !0, enumerable: !0, configurable: !0, value: function() { return _.brandCheck(this, t), a(this, `key`); } }, values: { writable: !0, enumerable: !0, configurable: !0, value: function() { return _.brandCheck(this, t), a(this, `value`); } }, entries: { writable: !0, enumerable: !0, configurable: !0, value: function() { return _.brandCheck(this, t), a(this, `key+value`); } }, forEach: { writable: !0, enumerable: !0, configurable: !0, value: function(n, r = globalThis) { if (_.brandCheck(this, t), _.argumentLengthCheck(arguments, 1, `${e}.forEach`), typeof n != `function`) throw TypeError(`Failed to execute 'forEach' on '${e}': parameter 1 is not of type 'Function'.`); for (let { 0: e, 1: t } of a(this, `key+value`)) n.call(r, t, e, this); } } }; return Object.defineProperties(t.prototype, { ...o, [Symbol.iterator]: { writable: !0, enumerable: !1, configurable: !0, value: o.entries.value } }); } function me(e, t, n) { let r = t, i = n; try { ge(e.stream.getReader(), r, i); } catch (e) { i(e); } } function he(e) { try { e.close(), e.byobRequest?.respond(0); } catch (e) { if (!e.message.includes(`Controller is already closed`) && !e.message.includes(`ReadableStream is already closed`)) throw e; } } async function ge(e, t, n) { try { let r = [], i = 0; do { let { done: a, value: o } = await e.read(); if (a) { t(Buffer.concat(r, i)); return; } if (!g(o)) { n(TypeError(`Received non-Uint8Array chunk`)); return; } r.push(o), i += o.length; } while (!0); } catch (e) { n(e); } } function Z(e) { h(`protocol` in e); let t = e.protocol; return t === `about:` || t === `blob:` || t === `data:`; } function _e(e) { return typeof e == `string` && e[5] === `:` && e[0] === `h` && e[1] === `t` && e[2] === `t` && e[3] === `p` && e[4] === `s` || e.protocol === `https:`; } function ve(e) { h(`protocol` in e); let t = e.protocol; return t === `http:` || t === `https:`; } function ye(e, t) { let n = e; if (!n.startsWith(`bytes`)) return `failure`; let r = { position: 5 }; if (t && y((e) => e === ` ` || e === ` `, n, r), n.charCodeAt(r.position) !== 61) return `failure`; r.position++, t && y((e) => e === ` ` || e === ` `, n, r); let i = y((e) => { let t = e.charCodeAt(0); return t >= 48 && t <= 57; }, n, r), a = i.length ? Number(i) : null; if (t && y((e) => e === ` ` || e === ` `, n, r), n.charCodeAt(r.position) !== 45) return `failure`; r.position++, t && y((e) => e === ` ` || e === ` `, n, r); let o = y((e) => { let t = e.charCodeAt(0); return t >= 48 && t <= 57; }, n, r), s = o.length ? Number(o) : null; return r.position < n.length || s === null && a === null || a > s ? `failure` : { rangeStartValue: a, rangeEndValue: s }; } function be(e, t, n) { let r = `bytes `; return r += v(`${e}`), r += `-`, r += v(`${t}`), r += `/`, r += v(`${n}`), r; } var xe = class extends r { #e; constructor(e) { super(), this.#e = e; } _transform(e, t, n) { if (!this._inflateStream) { if (e.length === 0) { n(); return; } this._inflateStream = (e[0] & 15) == 8 ? i.createInflate(this.#e) : i.createInflateRaw(this.#e), this._inflateStream.on(`data`, this.push.bind(this)), this._inflateStream.on(`end`, () => this.push(null)), this._inflateStream.on(`error`, (e) => this.destroy(e)); } this._inflateStream.write(e, t, n); } _final(e) { this._inflateStream &&= (this._inflateStream.end(), null), e(); } }; function Se(e) { return new xe(e); } function Ce(e) { let t = null, n = null, r = null, i = Te(`content-type`, e); if (i === null) return `failure`; for (let e of i) { let i = u(e); i === `failure` || i.essence === `*/*` || (r = i, r.essence === n ? !r.parameters.has(`charset`) && t !== null && r.parameters.set(`charset`, t) : (t = null, r.parameters.has(`charset`) && (t = r.parameters.get(`charset`)), n = r.essence)); } return r ?? `failure`; } function we(e) { let t = e, n = { position: 0 }, r = [], i = ``; for (; n.position < t.length;) { if (i += y((e) => e !== `"` && e !== `,`, t, n), n.position < t.length) if (t.charCodeAt(n.position) === 34) { if (i += l(t, n), n.position < t.length) continue; } else h(t.charCodeAt(n.position) === 44), n.position++; i = b(i, !0, !0, (e) => e === 9 || e === 32), r.push(i), i = ``; } return r; } function Te(e, t) { let n = t.get(e, !0); return n === null ? null : we(n); } function Ee(e) { return !1; } function De(e) { return !!(e.username || e.password); } function Oe(e) { return e != null && e !== `client` && e !== `no-traversable`; } var ke = class { get baseUrl() { return c(); } get origin() { return this.baseUrl?.origin; } policyContainer = H(); }; t.exports = { isAborted: le, isCancelled: ue, isValidEncodedURL: C, ReadableStreamFrom: f, tryUpgradeRequestToAPotentiallyTrustworthyURL: ae, clampAndCoarsenConnectionTimingInfo: ee, coarsenedSharedCurrentTime: z, determineRequestsReferrer: U, makePolicyContainer: H, clonePolicyContainer: te, appendFetchMetadata: I, appendRequestOriginHeader: L, TAOCheck: F, corsCheck: P, crossOriginResourcePolicyCheck: N, createOpaqueTimingInfo: V, setRequestReferrerPolicyOnRedirect: M, isValidHTTPToken: p, requestBadPort: E, requestCurrentURL: T, responseURL: x, responseLocationURL: S, isURLPotentiallyTrustworthy: ie, isValidReasonPhrase: O, sameOrigin: oe, normalizeMethod: Y, iteratorMixin: X, createIterator: pe, isValidHeaderName: k, isValidHeaderValue: A, isErrorLike: D, fullyReadBody: me, readableStreamClose: he, urlIsLocal: Z, urlHasHttpsScheme: _e, urlIsHttpHttpsScheme: ve, readAllBytes: ge, simpleRangeHeaderValue: ye, buildContentRange: be, createInflate: Se, extractMimeType: Ce, getDecodeSplit: Te, environmentSettingsObject: new class { settingsObject = new ke(); }(), isOriginIPPotentiallyTrustworthy: K, hasAuthenticationEntry: Ee, includesCredentials: De, isTraversableNavigable: Oe }; })); var fe = c$3(((e, t) => { let { iteratorMixin: r } = Y$1(), { kEnumerableProperty: i } = B$1(), { webidl: a } = de(), o = p$4(`node:util`); var s = class e { #e = []; constructor(e = void 0) { if (a.util.markAsUncloneable(this), e !== void 0) throw a.errors.conversionFailed({ prefix: `FormData constructor`, argument: `Argument 1`, types: [`undefined`] }); } append(t, n, r = void 0) { a.brandCheck(this, e); let i = `FormData.append`; a.argumentLengthCheck(arguments, 2, i), t = a.converters.USVString(t), arguments.length === 3 || a.is.Blob(n) ? (n = a.converters.Blob(n, i, `value`), r !== void 0 && (r = a.converters.USVString(r))) : n = a.converters.USVString(n); let o = u(t, n, r); this.#e.push(o); } delete(t) { a.brandCheck(this, e), a.argumentLengthCheck(arguments, 1, `FormData.delete`), t = a.converters.USVString(t), this.#e = this.#e.filter((e) => e.name !== t); } get(t) { a.brandCheck(this, e), a.argumentLengthCheck(arguments, 1, `FormData.get`), t = a.converters.USVString(t); let n = this.#e.findIndex((e) => e.name === t); return n === -1 ? null : this.#e[n].value; } getAll(t) { return a.brandCheck(this, e), a.argumentLengthCheck(arguments, 1, `FormData.getAll`), t = a.converters.USVString(t), this.#e.filter((e) => e.name === t).map((e) => e.value); } has(t) { return a.brandCheck(this, e), a.argumentLengthCheck(arguments, 1, `FormData.has`), t = a.converters.USVString(t), this.#e.findIndex((e) => e.name === t) !== -1; } set(t, n, r = void 0) { a.brandCheck(this, e); let i = `FormData.set`; a.argumentLengthCheck(arguments, 2, i), t = a.converters.USVString(t), arguments.length === 3 || a.is.Blob(n) ? (n = a.converters.Blob(n, i, `value`), r !== void 0 && (r = a.converters.USVString(r))) : n = a.converters.USVString(n); let o = u(t, n, r), s = this.#e.findIndex((e) => e.name === t); s === -1 ? this.#e.push(o) : this.#e = [ ...this.#e.slice(0, s), o, ...this.#e.slice(s + 1).filter((e) => e.name !== t) ]; } [o.inspect.custom](e, t) { let n = this.#e.reduce((e, t) => (e[t.name] ? Array.isArray(e[t.name]) ? e[t.name].push(t.value) : e[t.name] = [e[t.name], t.value] : e[t.name] = t.value, e), { __proto__: null }); t.depth ??= e, t.colors ??= !0; let r = o.formatWithOptions(t, n); return `FormData ${r.slice(r.indexOf(`]`) + 2)}`; } static getFormDataState(e) { return e.#e; } static setFormDataState(e, t) { e.#e = t; } }; let { getFormDataState: c, setFormDataState: l } = s; Reflect.deleteProperty(s, `getFormDataState`), Reflect.deleteProperty(s, `setFormDataState`), r(`FormData`, s, c, `name`, `value`), Object.defineProperties(s.prototype, { append: i, delete: i, get: i, getAll: i, has: i, set: i, [Symbol.toStringTag]: { value: `FormData`, configurable: !0 } }); function u(e, t, n) { if (typeof t != `string` && (a.is.File(t) || (t = new File([t], `blob`, { type: t.type })), n !== void 0)) { let e = { type: t.type, lastModified: t.lastModified }; t = new File([t], n, e); } return { name: e, value: t }; } a.is.FormData = a.util.MakeTypeAssertion(s), t.exports = { FormData: s, makeEntry: u, setFormDataState: l }; })); var pe = c$3(((e, t) => { let { bufferToLowerCasedHeaderName: r } = B$1(), { HTTP_TOKEN_CODEPOINTS: i } = J$1(), { makeEntry: a } = fe(), { webidl: o } = de(), s = p$4(`node:assert`), { isomorphicDecode: c } = q$1(), l = Buffer.from(`--`), u = new TextDecoder(), d = new TextDecoder(`utf-8`, { ignoreBOM: !0 }); function f(e) { for (let t = 0; t < e.length; ++t) if (e.charCodeAt(t) & -128) return !1; return !0; } function p(e) { let t = e.length; if (t < 27 || t > 70) return !1; for (let n = 0; n < t; ++n) { let t = e.charCodeAt(n); if (!(t >= 48 && t <= 57 || t >= 65 && t <= 90 || t >= 97 && t <= 122 || t === 39 || t === 45 || t === 95)) return !1; } return !0; } function m(e, t) { s(t !== `failure` && t.essence === `multipart/form-data`); let n = t.parameters.get(`boundary`); if (n === void 0) throw b(`missing boundary in content-type header`); let r = Buffer.from(`--${n}`, `utf8`), i = [], c = { position: 0 }, u = e.indexOf(r); if (u === -1) throw b(`no boundary found in multipart body`); for (c.position = u;;) { if (e.subarray(c.position, c.position + r.length).equals(r)) c.position += r.length; else throw b(`expected a value starting with -- and the boundary`); if (y(e, l, c)) return i; if (e[c.position] !== 13 || e[c.position + 1] !== 10) throw b(`expected CRLF`); c.position += 2; let { name: t, filename: n, contentType: u, encoding: p } = g(e, c); c.position += 2; let m; { let t = e.indexOf(r.subarray(2), c.position); if (t === -1) throw b(`expected boundary after body`); m = e.subarray(c.position, t - 4), c.position += m.length, p === `base64` && (m = Buffer.from(m.toString(), `base64`)); } if (e[c.position] !== 13 || e[c.position + 1] !== 10) throw b(`expected CRLF`); c.position += 2; let h; n === null ? h = d.decode(Buffer.from(m)) : (u ??= `text/plain`, f(u) || (u = ``), h = new File([m], n, { type: u })), s(o.is.USVString(t)), s(typeof h == `string` && o.is.USVString(h) || o.is.File(h)), i.push(a(t, h, n)); } } function h(e, t) { e[t.position] === 59 && t.position++, _((e) => e === 32 || e === 9, e, t); let n = _((e) => C(e) && e !== 61 && e !== 42, e, t); if (n.length === 0) return null; let r = n.toString(`ascii`).toLowerCase(), i = e[t.position] === 42; if (i && t.position++, e[t.position] !== 61) return null; t.position++, _((e) => e === 32 || e === 9, e, t); let a; if (i) { let n = _((e) => e !== 32 && e !== 13 && e !== 10 && e !== 59, e, t); if (n[0] !== 117 && n[0] !== 85 || n[1] !== 116 && n[1] !== 84 || n[2] !== 102 && n[2] !== 70 || n[3] !== 45 || n[4] !== 56) throw b(`unknown encoding, expected utf-8''`); a = decodeURIComponent(u.decode(n.subarray(7))); } else if (e[t.position] === 34) { t.position++; let n = _((e) => e !== 10 && e !== 13 && e !== 34, e, t); if (e[t.position] !== 34) throw b(`Closing quote not found`); t.position++, a = u.decode(n).replace(/%0A/gi, ` `).replace(/%0D/gi, `\r`).replace(/%22/g, `"`); } else { let n = _((e) => C(e) && e !== 59, e, t); a = u.decode(n); } return { name: r, value: a, extended: i }; } function g(e, t) { let n = null, a = null, o = null, s = null; for (;;) { if (e[t.position] === 13 && e[t.position + 1] === 10) { if (n === null) throw b(`header name is null`); return { name: n, filename: a, contentType: o, encoding: s }; } let l = _((e) => e !== 10 && e !== 13 && e !== 58, e, t); if (l = v(l, !0, !0, (e) => e === 9 || e === 32), !i.test(l.toString())) throw b(`header name does not match the field-name token production`); if (e[t.position] !== 58) throw b(`expected :`); switch (t.position++, _((e) => e === 32 || e === 9, e, t), r(l)) { case `content-disposition`: { n = a = null; let r = !1; if (_((e) => C(e), e, t).toString(`ascii`).toLowerCase() !== `form-data`) throw b(`expected form-data for content-disposition header`); for (; t.position < e.length && (e[t.position] !== 13 || e[t.position + 1] !== 10);) { let i = h(e, t); if (!i) break; i.name === `name` ? n = i.value : i.name === `filename` && (i.extended ? (a = i.value, r = !0) : r || (a = i.value)); } if (n === null) throw b(`name attribute is required in content-disposition header`); break; } case `content-type`: { let n = _((e) => e !== 10 && e !== 13, e, t); n = v(n, !1, !0, (e) => e === 9 || e === 32), o = c(n); break; } case `content-transfer-encoding`: { let n = _((e) => e !== 10 && e !== 13, e, t); n = v(n, !1, !0, (e) => e === 9 || e === 32), s = c(n); break; } default: _((e) => e !== 10 && e !== 13, e, t); } if (e[t.position] !== 13 || e[t.position + 1] !== 10) throw b(`expected CRLF`); t.position += 2; } } function _(e, t, n) { let r = n.position; for (; r < t.length && e(t[r]);) ++r; return t.subarray(n.position, n.position = r); } function v(e, t, n, r) { let i = 0, a = e.length - 1; if (t) for (; i < e.length && r(e[i]);) i++; if (n) for (; a > 0 && r(e[a]);) a--; return i === 0 && a === e.length - 1 ? e : e.subarray(i, a + 1); } function y(e, t, n) { if (e.length < t.length) return !1; for (let r = 0; r < t.length; r++) if (t[r] !== e[n.position + r]) return !1; return !0; } function b(e) { return TypeError(`Failed to parse body as FormData.`, { cause: TypeError(e) }); } function x(e) { return e <= 31 || e === 127; } function S(e) { return e === 40 || e === 41 || e === 60 || e === 62 || e === 64 || e === 44 || e === 59 || e === 58 || e === 92 || e === 34 || e === 47 || e === 91 || e === 93 || e === 63 || e === 61; } function C(e) { return e <= 127 && e !== 32 && e !== 9 && !x(e) && !S(e); } t.exports = { multipartFormDataParser: m, validateBoundary: p }; })); var X$1 = c$3(((e, t) => { function n() { let e, t; return { promise: new Promise((n, r) => { e = n, t = r; }), resolve: e, reject: t }; } t.exports = { createDeferredPromise: n }; })); var me = c$3(((e, t) => { let r = B$1(), { ReadableStreamFrom: i, readableStreamClose: a, fullyReadBody: o, extractMimeType: s } = Y$1(), { FormData: c, setFormDataState: l } = fe(), { webidl: u } = de(), d = p$4(`node:assert`), { isErrored: f, isDisturbed: p } = p$4(`node:stream`), { isUint8Array: m } = p$4(`node:util/types`), { serializeAMimeType: h } = J$1(), { multipartFormDataParser: g } = pe(), { createDeferredPromise: _ } = X$1(), { parseJSONFromBytes: v } = q$1(), { utf8DecodeBytes: y } = le(), { runtimeFeatures: b } = ue(), x = b.has(`crypto`) ? p$4(`node:crypto`).randomInt : (e) => Math.floor(Math.random() * e), S = new TextEncoder(); function C() {} let w = new FinalizationRegistry((e) => { let t = e.deref(); t && !t.locked && !p(t) && !f(t) && t.cancel(`Response object has been garbage collected`).catch(C); }); function T(e, t = !1) { let n = null, o = null; n = u.is.ReadableStream(e) ? e : u.is.Blob(e) ? e.stream() : new ReadableStream({ pull() {}, start(e) { o = e; }, cancel() {}, type: `bytes` }), d(u.is.ReadableStream(n)); let s = null, c = null, l = null, p = null; if (typeof e == `string`) c = e, p = `text/plain;charset=UTF-8`; else if (u.is.URLSearchParams(e)) c = e.toString(), p = `application/x-www-form-urlencoded;charset=UTF-8`; else if (u.is.BufferSource(e)) c = u.util.getCopyOfBytesHeldByBufferSource(e); else if (u.is.FormData(e)) { let t = `----formdata-undici-0${`${x(1e11)}`.padStart(11, `0`)}`, n = `--${t}\r\nContent-Disposition: form-data`, r = (e) => e.replace(/\n/g, `%0A`).replace(/\r/g, `%0D`).replace(/"/g, `%22`), i = (e) => e.replace(/\r?\n|\r/g, `\r `), a = [], o = new Uint8Array([13, 10]); l = 0; let u = !1; for (let [t, s] of e) if (typeof s == `string`) { let e = S.encode(n + `; name="${r(i(t))}"\r\n\r\n${i(s)}\r\n`); a.push(e), l += e.byteLength; } else { let e = S.encode(`${n}; name="${r(i(t))}"` + (s.name ? `; filename="${r(s.name)}"` : ``) + `\r Content-Type: ${s.type || `application/octet-stream`}\r\n\r\n`); a.push(e, s, o), typeof s.size == `number` ? l += e.byteLength + s.size + o.byteLength : u = !0; } let d = S.encode(`--${t}--\r\n`); a.push(d), l += d.byteLength, u && (l = null), c = e, s = async function* () { for (let e of a) e.stream ? yield* e.stream() : yield e; }, p = `multipart/form-data; boundary=${t}`; } else if (u.is.Blob(e)) c = e, l = e.size, e.type && (p = e.type); else if (typeof e[Symbol.asyncIterator] == `function`) { if (t) throw TypeError(`keepalive`); if (r.isDisturbed(e) || e.locked) throw TypeError(`Response body object should not be disturbed or locked`); n = u.is.ReadableStream(e) ? e : i(e); } return (typeof c == `string` || m(c)) && (s = () => (l = typeof c == `string` ? Buffer.byteLength(c) : c.length, c)), s != null && (async () => { let e = s(), t = e?.[Symbol.asyncIterator]?.(); if (t) for await (let e of t) { if (f(n)) break; e.length && o.enqueue(new Uint8Array(e)); } else e?.length && !f(n) && o.enqueue(typeof e == `string` ? S.encode(e) : new Uint8Array(e)); queueMicrotask(() => a(o)); })(), [{ stream: n, source: c, length: l }, p]; } function E(e, t = !1) { return u.is.ReadableStream(e) && (d(!r.isDisturbed(e), `The body has already been consumed.`), d(!e.locked, `The stream is locked.`)), T(e, t); } function D(e) { let { 0: t, 1: n } = e.stream.tee(); return e.stream = t, { stream: n, length: e.length, source: e.source }; } function O(e, t) { return { blob() { return A(this, (e) => { let n = M(t(this)); return n === null ? n = `` : n &&= h(n), new Blob([e], { type: n }); }, e, t); }, arrayBuffer() { return A(this, (e) => new Uint8Array(e).buffer, e, t); }, text() { return A(this, y, e, t); }, json() { return A(this, v, e, t); }, formData() { return A(this, (e) => { let n = M(t(this)); if (n !== null) switch (n.essence) { case `multipart/form-data`: { let t = g(e, n), r = new c(); return l(r, t), r; } case `application/x-www-form-urlencoded`: { let t = new URLSearchParams(e.toString()), n = new c(); for (let [e, r] of t) n.append(e, r); return n; } } throw TypeError(`Content-Type was not one of "multipart/form-data" or "application/x-www-form-urlencoded".`); }, e, t); }, bytes() { return A(this, (e) => new Uint8Array(e), e, t); } }; } function k(e, t) { Object.assign(e.prototype, O(e, t)); } function A(e, t, n, r) { try { u.brandCheck(e, n); } catch (e) { return Promise.reject(e); } if (e = r(e), j(e)) return Promise.reject(TypeError(`Body is unusable: Body has already been read`)); let i = _(), a = i.reject, s = (e) => { try { i.resolve(t(e)); } catch (e) { a(e); } }; return e.body == null ? (s(Buffer.allocUnsafe(0)), i.promise) : (o(e.body, s, a), i.promise); } function j(e) { let t = e.body; return t != null && (t.stream.locked || r.isDisturbed(t.stream)); } function M(e) { let t = e.headersList, n = s(t); return n === `failure` ? null : n; } t.exports = { extractBody: T, safelyExtractBody: E, cloneBody: D, mixinBody: k, streamRegistry: w, bodyUnusable: j }; })); var he = c$3(((e, t) => { let r = p$4(`node:assert`), i = B$1(), { channels: a } = H$1(), o = L$1(), { RequestContentLengthMismatchError: s, ResponseContentLengthMismatchError: c, RequestAbortedError: l, HeadersTimeoutError: u, HeadersOverflowError: d, SocketError: f, InformationalError: p, BodyTimeoutError: m, HTTPParserError: h, ResponseExceededMaxSizeError: g } = R$1(), { kUrl: _, kReset: v, kClient: y, kParser: b, kBlocking: x, kRunning: S, kPending: C, kSize: w, kWriting: T, kQueue: E, kNoRef: D, kKeepAliveDefaultTimeout: O, kHostHeader: k, kPendingIdx: A, kRunningIdx: j, kError: M, kPipelining: N, kSocket: P, kKeepAliveTimeoutValue: F, kMaxHeadersSize: ee, kKeepAliveMaxTimeout: z, kKeepAliveTimeoutThreshold: V, kHeadersTimeout: te, kBodyTimeout: U, kStrictContentLength: W, kMaxRequests: ne, kCounter: G, kMaxResponseSize: K, kOnError: re, kResume: se, kHTTPContext: ce, kClosed: le } = I$1(), q = ie$1(), J = Buffer.alloc(0), ue = Buffer[Symbol.species], de = i.removeAllListeners, Y; function fe() { let e = process.env.JEST_WORKER_ID ? ae$1() : void 0, t, n = process.arch !== `ppc64`; if (process.env.UNDICI_NO_WASM_SIMD === `1` ? n = !1 : process.env.UNDICI_NO_WASM_SIMD === `0` && (n = !0), n) try { t = new WebAssembly.Module(oe()); } catch {} return t ||= new WebAssembly.Module(e || ae$1()), new WebAssembly.Instance(t, { env: { wasm_on_url: (e, t, n) => 0, wasm_on_status: (e, t, n) => { r(X.ptr === e); let i = t - Z + he.byteOffset; return X.onStatus(new ue(he.buffer, i, n)); }, wasm_on_message_begin: (e) => (r(X.ptr === e), X.onMessageBegin()), wasm_on_header_field: (e, t, n) => { r(X.ptr === e); let i = t - Z + he.byteOffset; return X.onHeaderField(new ue(he.buffer, i, n)); }, wasm_on_header_value: (e, t, n) => { r(X.ptr === e); let i = t - Z + he.byteOffset; return X.onHeaderValue(new ue(he.buffer, i, n)); }, wasm_on_headers_complete: (e, t, n, i) => (r(X.ptr === e), X.onHeadersComplete(t, n === 1, i === 1)), wasm_on_body: (e, t, n) => { r(X.ptr === e); let i = t - Z + he.byteOffset; return X.onBody(new ue(he.buffer, i, n)); }, wasm_on_message_complete: (e) => (r(X.ptr === e), X.onMessageComplete()) } }); } let pe = null, X = null, he = null, ge = 0, Z = null; var _e = class { constructor(e, t, { exports: n }) { this.llhttp = n, this.ptr = this.llhttp.llhttp_alloc(q.TYPE.RESPONSE), this.client = e, this.socket = t, this.timeout = null, this.timeoutWeakRef = new WeakRef(this), this.timeoutValue = null, this.timeoutType = null, this.statusCode = 0, this.statusText = ``, this.upgrade = !1, this.headers = [], this.headersSize = 0, this.headersMaxSize = e[ee], this.shouldKeepAlive = !1, this.paused = !1, this.resume = this.resume.bind(this), this.bytesRead = 0, this.keepAlive = ``, this.contentLength = ``, this.connection = ``, this.maxResponseSize = e[K]; } setTimeout(e, t) { e !== this.timeoutValue || t & 1 ^ this.timeoutType & 1 ? (this.timeout &&= (o.clearTimeout(this.timeout), null), e && (t & 1 ? this.timeout = o.setFastTimeout(ve, e, this.timeoutWeakRef) : (this.timeout = setTimeout(ve, e, this.timeoutWeakRef), this.timeout?.unref())), this.timeoutValue = e) : this.timeout && this.timeout.refresh && this.timeout.refresh(), this.timeoutType = t; } resume() { this.socket.destroyed || !this.paused || (r(this.ptr != null), r(X === null), this.llhttp.llhttp_resume(this.ptr), r(this.timeoutType === 5), this.timeout && this.timeout.refresh && this.timeout.refresh(), this.paused = !1, this.execute(this.socket.read() || J), this.readMore()); } readMore() { for (; !this.paused && this.ptr;) { let e = this.socket.read(); if (e === null) break; this.execute(e); } } execute(e) { r(X === null), r(this.ptr != null), r(!this.paused); let { socket: t, llhttp: n } = this; e.length > ge && (Z && n.free(Z), ge = Math.ceil(e.length / 4096) * 4096, Z = n.malloc(ge)), new Uint8Array(n.memory.buffer, Z, ge).set(e); try { let r; try { he = e, X = this, r = n.llhttp_execute(this.ptr, Z, e.length); } finally { X = null, he = null; } if (r !== q.ERROR.OK) { let i = e.subarray(n.llhttp_get_error_pos(this.ptr) - Z); if (r === q.ERROR.PAUSED_UPGRADE) this.onUpgrade(i); else if (r === q.ERROR.PAUSED) this.paused = !0, t.unshift(i); else throw this.createError(r, i); } } catch (e) { i.destroy(t, e); } } finish() { r(X === null), r(this.ptr != null), r(!this.paused); let { llhttp: e } = this, t; try { X = this, t = e.llhttp_finish(this.ptr); } finally { X = null; } return t === q.ERROR.OK ? null : t === q.ERROR.PAUSED || t === q.ERROR.PAUSED_UPGRADE ? (this.paused = !0, null) : this.createError(t, J); } createError(e, t) { let { llhttp: n, contentLength: r, bytesRead: i } = this; if (r && i !== parseInt(r, 10)) return new c(); let a = n.llhttp_get_error_reason(this.ptr), o = ``; if (a) { let e = new Uint8Array(n.memory.buffer, a).indexOf(0); o = `Response does not match the HTTP/1.1 protocol (` + Buffer.from(n.memory.buffer, a, e).toString() + `)`; } return new h(o, q.ERROR[e], t); } destroy() { r(X === null), r(this.ptr != null), this.llhttp.llhttp_free(this.ptr), this.ptr = null, this.timeout && o.clearTimeout(this.timeout), this.timeout = null, this.timeoutValue = null, this.timeoutType = null, this.paused = !1; } onStatus(e) { return this.statusText = e.toString(), 0; } onMessageBegin() { let { socket: e, client: t } = this; if (e.destroyed) return -1; let n = t[E][t[j]]; return n ? (n.onResponseStarted(), 0) : -1; } onHeaderField(e) { let t = this.headers.length; return t & 1 ? this.headers[t - 1] = Buffer.concat([this.headers[t - 1], e]) : this.headers.push(e), this.trackHeader(e.length), 0; } onHeaderValue(e) { let t = this.headers.length; (t & 1) == 1 ? (this.headers.push(e), t += 1) : this.headers[t - 1] = Buffer.concat([this.headers[t - 1], e]); let n = this.headers[t - 2]; if (n.length === 10) { let t = i.bufferToLowerCasedHeaderName(n); t === `keep-alive` ? this.keepAlive += e.toString() : t === `connection` && (this.connection += e.toString()); } else n.length === 14 && i.bufferToLowerCasedHeaderName(n) === `content-length` && (this.contentLength += e.toString()); return this.trackHeader(e.length), 0; } trackHeader(e) { this.headersSize += e, this.headersSize >= this.headersMaxSize && i.destroy(this.socket, new d()); } onUpgrade(e) { let { upgrade: t, client: n, socket: a, headers: o, statusCode: s } = this; r(t), r(n[P] === a), r(!a.destroyed), r(!this.paused), r((o.length & 1) == 0); let c = n[E][n[j]]; r(c), r(c.upgrade || c.method === `CONNECT`), this.statusCode = 0, this.statusText = ``, this.shouldKeepAlive = !1, this.headers = [], this.headersSize = 0, a.unshift(e), a[b].destroy(), a[b] = null, a[y] = null, a[M] = null, de(a), n[P] = null, n[ce] = null, n[E][n[j]++] = null, n.emit(`disconnect`, n[_], [n], new p(`upgrade`)); try { c.onUpgrade(s, o, a); } catch (e) { i.destroy(a, e); } n[se](); } onHeadersComplete(e, t, n) { let { client: a, socket: o, headers: s, statusText: c } = this; if (o.destroyed) return -1; let l = a[E][a[j]]; if (!l) return -1; if (r(!this.upgrade), r(this.statusCode < 200), e === 100) return i.destroy(o, new f(`bad response`, i.getSocketInfo(o))), -1; if (t && !l.upgrade) return i.destroy(o, new f(`bad upgrade`, i.getSocketInfo(o))), -1; if (r(this.timeoutType === 3), this.statusCode = e, this.shouldKeepAlive = n || l.method === `HEAD` && !o[v] && this.connection.toLowerCase() === `keep-alive`, this.statusCode >= 200) { let e = l.bodyTimeout == null ? a[U] : l.bodyTimeout; this.setTimeout(e, 5); } else this.timeout && this.timeout.refresh && this.timeout.refresh(); if (l.method === `CONNECT` || t) return r(a[S] === 1), this.upgrade = !0, 2; if (r((this.headers.length & 1) == 0), this.headers = [], this.headersSize = 0, this.shouldKeepAlive && a[N]) { let e = this.keepAlive ? i.parseKeepAliveTimeout(this.keepAlive) : null; if (e != null) { let t = Math.min(e - a[V], a[z]); t <= 0 ? o[v] = !0 : a[F] = t; } else a[F] = a[O]; } else o[v] = !0; let u = l.onHeaders(e, s, this.resume, c) === !1; return l.aborted ? -1 : l.method === `HEAD` || e < 200 ? 1 : (o[x] && (o[x] = !1, a[se]()), u ? q.ERROR.PAUSED : 0); } onBody(e) { let { client: t, socket: n, statusCode: a, maxResponseSize: o } = this; if (n.destroyed) return -1; let s = t[E][t[j]]; return r(s), r(this.timeoutType === 5), this.timeout && this.timeout.refresh && this.timeout.refresh(), r(a >= 200), o > -1 && this.bytesRead + e.length > o ? (i.destroy(n, new g()), -1) : (this.bytesRead += e.length, s.onData(e) === !1 ? q.ERROR.PAUSED : 0); } onMessageComplete() { let { client: e, socket: t, statusCode: n, upgrade: a, headers: o, contentLength: s, bytesRead: l, shouldKeepAlive: u } = this; if (t.destroyed && (!n || u)) return -1; if (a) return 0; r(n >= 100), r((this.headers.length & 1) == 0); let d = e[E][e[j]]; return r(d), this.statusCode = 0, this.statusText = ``, this.bytesRead = 0, this.contentLength = ``, this.keepAlive = ``, this.connection = ``, this.headers = [], this.headersSize = 0, n < 200 ? 0 : d.method !== `HEAD` && s && l !== parseInt(s, 10) ? (i.destroy(t, new c()), -1) : (d.onComplete(o), e[E][e[j]++] = null, t[T] ? (r(e[S] === 0), i.destroy(t, new p(`reset`)), q.ERROR.PAUSED) : u ? t[v] && e[S] === 0 ? (i.destroy(t, new p(`reset`)), q.ERROR.PAUSED) : (e[N] == null || e[N] === 1 ? setImmediate(e[se]) : e[se](), 0) : (i.destroy(t, new p(`reset`)), q.ERROR.PAUSED)); } }; function ve(e) { let t = e.deref(); if (!t) return; let { socket: n, timeoutType: a, client: o, paused: s } = t; a === 3 ? (!n[T] || n.writableNeedDrain || o[S] > 1) && (r(!s, `cannot be paused while waiting for headers`), i.destroy(n, new u())) : a === 5 ? s || i.destroy(n, new m()) : a === 8 && (r(o[S] === 0 && o[F]), i.destroy(n, new p(`socket idle timeout`))); } function ye(e, t) { if (e[P] = t, pe ||= fe(), t.errored) throw t.errored; if (t.destroyed) throw new f(`destroyed`); return t[D] = !1, t[T] = !1, t[v] = !1, t[x] = !1, t[b] = new _e(e, t, pe), i.addListener(t, `error`, be), i.addListener(t, `readable`, xe), i.addListener(t, `end`, Se), i.addListener(t, `close`, Ce), t[le] = !1, t.on(`close`, we), { version: `h1`, defaultPipelining: 1, write(t) { return De(e, t); }, resume() { Te(e); }, destroy(e, n) { t[le] ? queueMicrotask(n) : (t.on(`close`, n), t.destroy(e)); }, get destroyed() { return t.destroyed; }, busy(n) { return !!(t[T] || t[v] || t[x] || n && (e[S] > 0 && !n.idempotent || e[S] > 0 && (n.upgrade || n.method === `CONNECT`) || e[S] > 0 && i.bodyLength(n.body) !== 0 && (i.isStream(n.body) || i.isAsyncIterable(n.body) || i.isFormDataLike(n.body)))); } }; } function be(e) { r(e.code !== `ERR_TLS_CERT_ALTNAME_INVALID`); let t = this[b]; if (e.code === `ECONNRESET` && t.statusCode && !t.shouldKeepAlive) { let e = t.finish(); e && (this[M] = e, this[y][re](e)); return; } this[M] = e, this[y][re](e); } function xe() { this[b]?.readMore(); } function Se() { let e = this[b]; if (e.statusCode && !e.shouldKeepAlive) { let t = e.finish(); t && i.destroy(this, t); return; } i.destroy(this, new f(`other side closed`, i.getSocketInfo(this))); } function Ce() { let e = this[b]; e && (!this[M] && e.statusCode && !e.shouldKeepAlive && (this[M] = e.finish() || this[M]), this[b].destroy(), this[b] = null); let t = this[M] || new f(`closed`, i.getSocketInfo(this)), n = this[y]; if (n[P] = null, n[ce] = null, n.destroyed) { r(n[C] === 0); let e = n[E].splice(n[j]); for (let r = 0; r < e.length; r++) { let a = e[r]; i.errorRequest(n, a, t); } } else if (n[S] > 0 && t.code !== `UND_ERR_INFO`) { let e = n[E][n[j]]; n[E][n[j]++] = null, i.errorRequest(n, e, t); } n[A] = n[j], r(n[S] === 0), n.emit(`disconnect`, n[_], [n], t), n[se](); } function we() { this[le] = !0; } function Te(e) { let t = e[P]; if (t && !t.destroyed) { if (e[w] === 0 ? !t[D] && t.unref && (t.unref(), t[D] = !0) : t[D] && t.ref && (t.ref(), t[D] = !1), e[w] === 0) t[b].timeoutType !== 8 && t[b].setTimeout(e[F], 8); else if (e[S] > 0 && t[b].statusCode < 200 && t[b].timeoutType !== 3) { let n = e[E][e[j]], r = n.headersTimeout == null ? e[te] : n.headersTimeout; t[b].setTimeout(r, 3); } } } function Ee(e) { return e !== `GET` && e !== `HEAD` && e !== `OPTIONS` && e !== `TRACE` && e !== `CONNECT`; } function De(e, t) { let { method: n, path: o, host: c, upgrade: u, blocking: d, reset: f } = t, { body: m, headers: h, contentLength: g } = t, _ = n === `PUT` || n === `POST` || n === `PATCH` || n === `QUERY` || n === `PROPFIND` || n === `PROPPATCH`; if (i.isFormDataLike(m)) { Y ||= me().extractBody; let [e, n] = Y(m); t.contentType ?? h.push(`content-type`, n), m = e.stream, g = e.length; } else i.isBlobLike(m) && t.contentType == null && m.type && h.push(`content-type`, m.type); m && typeof m.read == `function` && m.read(0); let y = i.bodyLength(m); if (g = y ?? g, g === null && (g = t.contentLength), g === 0 && !_ && (g = null), Ee(n) && g > 0 && t.contentLength !== null && t.contentLength !== g) { if (e[W]) return i.errorRequest(e, t, new s()), !1; process.emitWarning(new s()); } let b = e[P], S = (n) => { t.aborted || t.completed || (i.errorRequest(e, t, n || new l()), i.destroy(m), i.destroy(b, new p(`aborted`))); }; try { t.onConnect(S); } catch (n) { i.errorRequest(e, t, n); } if (t.aborted) return !1; n === `HEAD` && (b[v] = !0), (u || n === `CONNECT`) && (b[v] = !0), f != null && (b[v] = f), e[ne] && b[G]++ >= e[ne] && (b[v] = !0), d && (b[x] = !0), b.setTypeOfService && b.setTypeOfService(t.typeOfService); let C = `${n} ${o} HTTP/1.1\r\n`; if (typeof c == `string` ? C += `host: ${c}\r\n` : C += e[k], u ? C += `connection: upgrade\r\nupgrade: ${u}\r\n` : e[N] && !b[v] ? C += `connection: keep-alive\r ` : C += `connection: close\r `, Array.isArray(h)) for (let e = 0; e < h.length; e += 2) { let t = h[e + 0], n = h[e + 1]; if (Array.isArray(n)) for (let e = 0; e < n.length; e++) C += `${t}: ${n[e]}\r\n`; else C += `${t}: ${n}\r\n`; } return a.sendHeaders.hasSubscribers && a.sendHeaders.publish({ request: t, headers: C, socket: b }), !m || y === 0 ? ke(S, null, e, t, b, g, C, _) : i.isBuffer(m) ? ke(S, m, e, t, b, g, C, _) : i.isBlobLike(m) ? typeof m.stream == `function` ? je(S, m.stream(), e, t, b, g, C, _) : Ae(S, m, e, t, b, g, C, _) : i.isStream(m) ? Oe(S, m, e, t, b, g, C, _) : i.isIterable(m) ? je(S, m, e, t, b, g, C, _) : r(!1), !0; } function Oe(e, t, n, a, o, s, c, u) { r(s !== 0 || n[S] === 0, `stream body cannot be pipelined`); let d = !1, f = new Me({ abort: e, socket: o, request: a, contentLength: s, client: n, expectsPayload: u, header: c }), p = function(e) { if (!d) try { !f.write(e) && this.pause && this.pause(); } catch (e) { i.destroy(this, e); } }, m = function() { d || t.resume && t.resume(); }, h = function() { if (queueMicrotask(() => { t.removeListener(`error`, g); }), !d) { let e = new l(); queueMicrotask(() => g(e)); } }, g = function(e) { if (!d) { if (d = !0, r(o.destroyed || o[T] && n[S] <= 1), o.off(`drain`, m).off(`error`, g), t.removeListener(`data`, p).removeListener(`end`, g).removeListener(`close`, h), !e) try { f.end(); } catch (t) { e = t; } f.destroy(e), e && (e.code !== `UND_ERR_INFO` || e.message !== `reset`) ? i.destroy(t, e) : i.destroy(t); } }; t.on(`data`, p).on(`end`, g).on(`error`, g).on(`close`, h), t.resume && t.resume(), o.on(`drain`, m).on(`error`, g), t.errorEmitted ?? t.errored ? setImmediate(g, t.errored) : (t.endEmitted ?? t.readableEnded) && setImmediate(g, null), (t.closeEmitted ?? t.closed) && setImmediate(h); } function ke(e, t, n, a, o, s, c, l) { try { t ? i.isBuffer(t) && (r(s === t.byteLength, `buffer body must have content length`), o.cork(), o.write(`${c}content-length: ${s}\r\n\r\n`, `latin1`), o.write(t), o.uncork(), a.onBodySent(t), !l && a.reset !== !1 && (o[v] = !0)) : s === 0 ? o.write(`${c}content-length: 0\r\n\r\n`, `latin1`) : (r(s === null, `no body must not have content length`), o.write(`${c}\r\n`, `latin1`)), a.onRequestSent(), n[se](); } catch (t) { e(t); } } async function Ae(e, t, n, i, a, o, c, l) { r(o === t.size, `blob body must have content length`); try { if (o != null && o !== t.size) throw new s(); let e = Buffer.from(await t.arrayBuffer()); a.cork(), a.write(`${c}content-length: ${o}\r\n\r\n`, `latin1`), a.write(e), a.uncork(), i.onBodySent(e), i.onRequestSent(), !l && i.reset !== !1 && (a[v] = !0), n[se](); } catch (t) { e(t); } } async function je(e, t, n, i, a, o, s, c) { r(o !== 0 || n[S] === 0, `iterator body cannot be pipelined`); let l = null; function u() { if (l) { let e = l; l = null, e(); } } let d = () => new Promise((e, t) => { r(l === null), a[M] ? t(a[M]) : l = e; }); a.on(`close`, u).on(`drain`, u); let f = new Me({ abort: e, socket: a, request: i, contentLength: o, client: n, expectsPayload: c, header: s }); try { for await (let e of t) { if (a[M]) throw a[M]; f.write(e) || await d(); } f.end(); } catch (e) { f.destroy(e); } finally { a.off(`close`, u).off(`drain`, u); } } var Me = class { constructor({ abort: e, socket: t, request: n, contentLength: r, client: i, expectsPayload: a, header: o }) { this.socket = t, this.request = n, this.contentLength = r, this.client = i, this.bytesWritten = 0, this.expectsPayload = a, this.header = o, this.abort = e, t[T] = !0; } write(e) { let { socket: t, request: n, contentLength: r, client: i, bytesWritten: a, expectsPayload: o, header: c } = this; if (t[M]) throw t[M]; if (t.destroyed) return !1; let l = Buffer.byteLength(e); if (!l) return !0; if (r !== null && a + l > r) { if (i[W]) throw new s(); process.emitWarning(new s()); } t.cork(), a === 0 && (!o && n.reset !== !1 && (t[v] = !0), r === null ? t.write(`${c}transfer-encoding: chunked\r\n`, `latin1`) : t.write(`${c}content-length: ${r}\r\n\r\n`, `latin1`)), r === null && t.write(`\r\n${l.toString(16)}\r\n`, `latin1`), this.bytesWritten += l; let u = t.write(e); return t.uncork(), n.onBodySent(e), u || t[b].timeout && t[b].timeoutType === 3 && t[b].timeout.refresh && t[b].timeout.refresh(), u; } end() { let { socket: e, contentLength: t, client: n, bytesWritten: r, expectsPayload: i, header: a, request: o } = this; if (o.onRequestSent(), e[T] = !1, e[M]) throw e[M]; if (!e.destroyed) { if (r === 0 ? i ? e.write(`${a}content-length: 0\r\n\r\n`, `latin1`) : e.write(`${a}\r\n`, `latin1`) : t === null && e.write(`\r 0\r \r `, `latin1`), t !== null && r !== t) { if (n[W]) throw new s(); process.emitWarning(new s()); } e[b].timeout && e[b].timeoutType === 3 && e[b].timeout.refresh && e[b].timeout.refresh(), n[se](); } } destroy(e) { let { socket: t, client: n, abort: i } = this; t[T] = !1, e && (r(n[S] <= 1, `pipeline should only contain this request`), i(e)); } }; t.exports = ye; })); var ge = c$3(((e, t) => { let r = p$4(`node:assert`), { pipeline: i } = p$4(`node:stream`), a = B$1(), { RequestContentLengthMismatchError: o, RequestAbortedError: s, SocketError: c, InformationalError: l, InvalidArgumentError: u } = R$1(), { kUrl: d, kReset: f, kClient: p, kRunning: m, kPending: h, kQueue: g, kPendingIdx: _, kRunningIdx: v, kError: y, kSocket: b, kStrictContentLength: x, kOnError: S, kMaxConcurrentStreams: C, kPingInterval: w, kHTTP2Session: T, kHTTP2InitialWindowSize: E, kHTTP2ConnectionWindowSize: D, kResume: O, kSize: k, kHTTPContext: A, kClosed: j, kBodyTimeout: M, kEnableConnectProtocol: N, kRemoteSettings: P, kHTTP2Stream: F, kHTTP2SessionState: L } = I$1(), { channels: ee } = H$1(), z = Symbol(`open streams`), V, te; try { te = p$4(`node:http2`); } catch { te = { constants: {} }; } let { constants: { HTTP2_HEADER_AUTHORITY: U, HTTP2_HEADER_METHOD: W, HTTP2_HEADER_PATH: ne, HTTP2_HEADER_SCHEME: G, HTTP2_HEADER_CONTENT_LENGTH: K, HTTP2_HEADER_EXPECT: re, HTTP2_HEADER_STATUS: ie, HTTP2_HEADER_PROTOCOL: ae, NGHTTP2_REFUSED_STREAM: oe, NGHTTP2_CANCEL: se } } = te; function ce(e) { let t = []; for (let [n, r] of Object.entries(e)) if (Array.isArray(r)) for (let e of r) t.push(Buffer.from(n), Buffer.from(e)); else t.push(Buffer.from(n), Buffer.from(r)); return t; } function le(e, t) { e[b] = t; let n = e[E], r = e[D], i = te.connect(e[d], { createConnection: () => t, peerMaxConcurrentStreams: e[C], settings: { enablePush: !1, ...n == null ? null : { initialWindowSize: n } } }); return e[b] = t, i[z] = 0, i[p] = e, i[b] = t, i[L] = { ping: { interval: e[w] === 0 ? null : setInterval(de, e[w], i).unref() } }, i[N] = !1, i[P] = !1, r && a.addListener(i, `connect`, J.bind(i, r)), a.addListener(i, `error`, Y), a.addListener(i, `frameError`, fe), a.addListener(i, `end`, pe), a.addListener(i, `goaway`, X), a.addListener(i, `close`, he), a.addListener(i, `remoteSettings`, ue), i.unref(), e[T] = i, t[T] = i, a.addListener(t, `error`, Z), a.addListener(t, `end`, _e), a.addListener(t, `close`, ge), t[j] = !1, t.on(`close`, ve), { version: `h2`, defaultPipelining: Infinity, write(t) { return be(e, t); }, resume() { q(e); }, destroy(e, n) { t[j] ? queueMicrotask(n) : t.destroy(e).on(`close`, n); }, get destroyed() { return t.destroyed; }, busy(t) { if (t != null) if (e[m] > 0) { if (t.idempotent === !1 || (t.upgrade === `websocket` || t.method === `CONNECT`) && i[P] === !1 || a.bodyLength(t.body) !== 0 && (a.isStream(t.body) || a.isAsyncIterable(t.body) || a.isFormDataLike(t.body))) return !0; } else return (t.upgrade === `websocket` || t.method === `CONNECT`) && i[P] === !1; return !1; } }; } function q(e) { let t = e[b]; t?.destroyed === !1 && (e[k] === 0 || e[C] === 0 ? (t.unref(), e[T].unref()) : (t.ref(), e[T].ref())); } function J(e) { try { typeof this.setLocalWindowSize == `function` && this.setLocalWindowSize(e); } catch {} } function ue(e) { if (this[p][C] = e.maxConcurrentStreams ?? this[p][C], this[P] === !0 && this[N] === !0 && e.enableConnectProtocol === !1) { let e = new l(`HTTP/2: Server disabled extended CONNECT protocol against RFC-8441`); this[b][y] = e, this[p][S](e); return; } this[N] = e.enableConnectProtocol ?? this[N], this[P] = !0, this[p][O](); } function de(e) { let t = e[L]; if ((e.closed || e.destroyed) && t.ping.interval != null) { clearInterval(t.ping.interval), t.ping.interval = null; return; } e.ping(n.bind(e)); function n(e, t) { let n = this[p], r = this[p]; if (e != null) { let t = new l(`HTTP/2: "PING" errored - type ${e.message}`); r[y] = t, n[S](t); } else n.emit(`ping`, t); } } function Y(e) { r(e.code !== `ERR_TLS_CERT_ALTNAME_INVALID`), this[b][y] = e, this[p][S](e); } function fe(e, t, n) { if (n === 0) { let n = new l(`HTTP/2: "frameError" received - type ${e}, code ${t}`); this[b][y] = n, this[p][S](n); } } function pe() { let e = new c(`other side closed`, a.getSocketInfo(this[b])); this.destroy(e), a.destroy(this[b], e); } function X(e) { let t = this[y] || new c(`HTTP/2: "GOAWAY" frame received with code ${e}`, a.getSocketInfo(this[b])), n = this[p]; if (n[b] = null, n[A] = null, this.close(), this[T] = null, a.destroy(this[b], t), n[v] < n[g].length) { let e = n[g][n[v]]; n[g][n[v]++] = null, a.errorRequest(n, e, t), n[_] = n[v]; } r(n[m] === 0), n.emit(`disconnect`, n[d], [n], t), n.emit(`connectionError`, n[d], [n], t), n[O](); } function he() { let { [p]: e, [L]: t } = this, { [b]: n } = e, i = this[b][y] || this[y] || new c(`closed`, a.getSocketInfo(n)); if (e[b] = null, e[A] = null, t.ping.interval != null && (clearInterval(t.ping.interval), t.ping.interval = null), e.destroyed) { r(e[h] === 0); let t = e[g].splice(e[v]); for (let n = 0; n < t.length; n++) { let r = t[n]; a.errorRequest(e, r, i); } } } function ge() { let e = this[y] || new c(`closed`, a.getSocketInfo(this)), t = this[T][p]; t[b] = null, t[A] = null, this[T] !== null && this[T].destroy(e), t[_] = t[v], r(t[m] === 0), t.emit(`disconnect`, t[d], [t], e), t[O](); } function Z(e) { r(e.code !== `ERR_TLS_CERT_ALTNAME_INVALID`), this[y] = e, this[p][S](e); } function _e() { a.destroy(this, new c(`other side closed`, a.getSocketInfo(this))); } function ve() { this[j] = !0; } function ye(e) { return e !== `GET` && e !== `HEAD` && e !== `OPTIONS` && e !== `TRACE` && e !== `CONNECT`; } function be(e, t) { let n = t.bodyTimeout ?? e[M], i = e[T], { method: c, path: f, host: p, upgrade: m, expectContinue: h, signal: y, protocol: C, headers: w } = t, { body: E } = t; if (m != null && m !== `websocket`) return a.errorRequest(e, t, new u(`Custom upgrade "${m}" not supported over HTTP/2`)), !1; let D = {}; for (let e = 0; e < w.length; e += 2) { let t = w[e + 0], n = w[e + 1]; if (t === `cookie`) { D[t] == null ? D[t] = n : D[t] = Array.isArray(D[t]) ? (D[t].push(n), D[t]) : [D[t], n]; continue; } if (Array.isArray(n)) for (let e = 0; e < n.length; e++) D[t] ? D[t] += `, ${n[e]}` : D[t] = n[e]; else D[t] ? D[t] += `, ${n}` : D[t] = n; } let k = null, { hostname: A, port: j } = e[d]; D[U] = p || `${A}${j ? `:${j}` : ``}`, D[W] = c; let P = (n) => { t.aborted || t.completed || (n ||= new s(), a.errorRequest(e, t, n), k != null && (k.removeAllListeners(`data`), k.close(), e[S](n), e[O]()), a.destroy(E, n)); }; try { t.onConnect(P); } catch (n) { a.errorRequest(e, t, n); } if (t.aborted) return !1; if (m || c === `CONNECT`) return i.ref(), m === `websocket` ? i[N] === !1 ? (a.errorRequest(e, t, new l(`HTTP/2: Extended CONNECT protocol not supported by server`)), i.unref(), !1) : (D[W] = `CONNECT`, D[ae] = `websocket`, D[ne] = f, C === `ws:` || C === `wss:` ? D[G] = C === `ws:` ? `http` : `https` : D[G] = C === `http:` ? `http` : `https`, k = i.request(D, { endStream: !1, signal: y }), k[F] = !0, k.once(`response`, (n, r) => { let { [ie]: a, ...o } = n; t.onUpgrade(a, ce(o), k), ++i[z], e[g][e[v]++] = null; }), k.on(`error`, () => { (k.rstCode === oe || k.rstCode === se) && P(new l(`HTTP/2: "stream error" received - code ${k.rstCode}`)); }), k.once(`close`, () => { --i[z], i[z] === 0 && i.unref(); }), k.setTimeout(n), !0) : (k = i.request(D, { endStream: !1, signal: y }), k[F] = !0, k.on(`response`, (n) => { let { [ie]: r, ...a } = n; t.onUpgrade(r, ce(a), k), ++i[z], e[g][e[v]++] = null; }), k.once(`close`, () => { --i[z], i[z] === 0 && i.unref(); }), k.setTimeout(n), !0); D[ne] = f, D[G] = C === `http:` ? `http` : `https`; let I = c === `PUT` || c === `POST` || c === `PATCH`; E && typeof E.read == `function` && E.read(0); let L = a.bodyLength(E); if (a.isFormDataLike(E)) { V ??= me().extractBody; let [e, t] = V(E); D[`content-type`] = t, E = e.stream, L = e.length; } if (L ??= t.contentLength, I || (L = null), ye(c) && L > 0 && t.contentLength != null && t.contentLength !== L) { if (e[x]) return a.errorRequest(e, t, new o()), !1; process.emitWarning(new o()); } if (L != null && (r(E || L === 0, `no body must not have content length`), D[K] = `${L}`), i.ref(), ee.sendHeaders.hasSubscribers) { let e = ``; for (let t in D) e += `${t}: ${D[t]}\r\n`; ee.sendHeaders.publish({ request: t, headers: e, socket: i[b] }); } let R = c === `GET` || c === `HEAD` || E === null; h ? (D[re] = `100-continue`, k = i.request(D, { endStream: R, signal: y }), k[F] = !0, k.once(`continue`, H)) : (k = i.request(D, { endStream: R, signal: y }), k[F] = !0, H()), ++i[z], k.setTimeout(n); let B = !1; return k.once(`response`, (e) => { let { [ie]: n, ...r } = e; if (t.onResponseStarted(), B = !0, t.aborted) { k.removeAllListeners(`data`); return; } t.onHeaders(Number(n), ce(r), k.resume.bind(k), ``) === !1 && k.pause(), k.on(`data`, (e) => { t.aborted || t.completed || t.onData(e) === !1 && k.pause(); }); }), k.once(`end`, () => { k.removeAllListeners(`data`), B ? (!t.aborted && !t.completed && t.onComplete({}), e[g][e[v]++] = null, e[O]()) : (P(new l(`HTTP/2: stream half-closed (remote)`)), e[g][e[v]++] = null, e[_] = e[v], e[O]()); }), k.once(`close`, () => { k.removeAllListeners(`data`), --i[z], i[z] === 0 && i.unref(); }), k.once(`error`, function(e) { k.removeAllListeners(`data`), P(e); }), k.once(`frameError`, (e, t) => { k.removeAllListeners(`data`), P(new l(`HTTP/2: "frameError" received - type ${e}, code ${t}`)); }), k.on(`aborted`, () => { k.removeAllListeners(`data`); }), k.on(`timeout`, () => { let e = new l(`HTTP/2: "stream timeout after ${n}"`); k.removeAllListeners(`data`), --i[z], i[z] === 0 && i.unref(), P(e); }), k.once(`trailers`, (e) => { t.aborted || t.completed || (k.removeAllListeners(`data`), t.onComplete(e)); }), !0; function H() { !E || L === 0 ? xe(P, k, null, e, t, e[b], L, I) : a.isBuffer(E) ? xe(P, k, E, e, t, e[b], L, I) : a.isBlobLike(E) ? typeof E.stream == `function` ? we(P, k, E.stream(), e, t, e[b], L, I) : Ce(P, k, E, e, t, e[b], L, I) : a.isStream(E) ? Se(P, e[b], I, k, E, e, t, L) : a.isIterable(E) ? we(P, k, E, e, t, e[b], L, I) : r(!1); } } function xe(e, t, n, i, o, s, c, l) { try { n != null && a.isBuffer(n) && (r(c === n.byteLength, `buffer body must have content length`), t.cork(), t.write(n), t.uncork(), t.end(), o.onBodySent(n)), l || (s[f] = !0), o.onRequestSent(), i[O](); } catch (t) { e(t); } } function Se(e, t, n, o, s, c, l, u) { r(u !== 0 || c[m] === 0, `stream body cannot be pipelined`); let d = i(s, o, (r) => { r ? (a.destroy(d, r), e(r)) : (a.removeAllListeners(d), l.onRequestSent(), n || (t[f] = !0), c[O]()); }); a.addListener(d, `data`, p); function p(e) { l.onBodySent(e); } } async function Ce(e, t, n, i, a, s, c, l) { r(c === n.size, `blob body must have content length`); try { if (c != null && c !== n.size) throw new o(); let e = Buffer.from(await n.arrayBuffer()); t.cork(), t.write(e), t.uncork(), t.end(), a.onBodySent(e), a.onRequestSent(), l || (s[f] = !0), i[O](); } catch (t) { e(t); } } async function we(e, t, n, i, a, o, s, c) { r(s !== 0 || i[m] === 0, `iterator body cannot be pipelined`); let l = null; function u() { if (l) { let e = l; l = null, e(); } } let d = () => new Promise((e, t) => { r(l === null), o[y] ? t(o[y]) : l = e; }); t.on(`close`, u).on(`drain`, u); try { for await (let e of n) { if (o[y]) throw o[y]; let n = t.write(e); a.onBodySent(e), n || await d(); } t.end(), a.onRequestSent(), c || (o[f] = !0), i[O](); } catch (t) { e(t); } finally { t.off(`close`, u).off(`drain`, u); } } t.exports = le; })); var Z$1 = c$3(((e, t) => { let r = p$4(`node:assert`), i = p$4(`node:net`), a = p$4(`node:http`), o = B$1(), { ClientStats: s } = V$1(), { channels: c } = H$1(), l = te$1(), u = G$2(), { InvalidArgumentError: d, InformationalError: f, ClientDestroyedError: p } = R$1(), m = K$1(), { kUrl: h, kServerName: g, kClient: _, kBusy: v, kConnect: y, kResuming: b, kRunning: x, kPending: S, kSize: C, kQueue: w, kConnected: T, kConnecting: E, kNeedDrain: D, kKeepAliveDefaultTimeout: O, kHostHeader: k, kPendingIdx: A, kRunningIdx: j, kError: M, kPipelining: N, kKeepAliveTimeoutValue: P, kMaxHeadersSize: F, kKeepAliveMaxTimeout: L, kKeepAliveTimeoutThreshold: ee, kHeadersTimeout: z, kBodyTimeout: U, kStrictContentLength: W, kConnector: ne, kMaxRequests: re, kCounter: ie, kClose: ae, kDestroy: oe, kDispatch: se, kLocalAddress: ce, kMaxResponseSize: le, kOnError: q, kHTTPContext: J, kMaxConcurrentStreams: ue, kHTTP2InitialWindowSize: de, kHTTP2ConnectionWindowSize: Y, kResume: fe, kPingInterval: pe } = I$1(), X = he(), me = ge(), Z = Symbol(`kClosedResolve`), _e = a && a.maxHeaderSize && Number.isInteger(a.maxHeaderSize) && a.maxHeaderSize > 0 ? () => a.maxHeaderSize : () => { throw new d(`http module not available or http.maxHeaderSize invalid`); }, ve = () => {}; function ye(e) { return e[N] ?? e[J]?.defaultPipelining ?? 1; } var be = class extends u { constructor(e, { maxHeaderSize: t, headersTimeout: n, socketTimeout: r, requestTimeout: a, connectTimeout: s, bodyTimeout: c, idleTimeout: l, keepAlive: u, keepAliveTimeout: f, maxKeepAliveTimeout: p, keepAliveMaxTimeout: _, keepAliveTimeoutThreshold: v, socketPath: y, pipelining: x, tls: S, strictContentLength: C, maxCachedSessions: T, connect: E, maxRequestsPerClient: M, localAddress: I, maxResponseSize: R, autoSelectFamily: B, autoSelectFamilyAttemptTimeout: V, maxConcurrentStreams: H, allowH2: te, useH2c: G, initialWindowSize: K, connectionWindowSize: ie, pingInterval: ae } = {}) { if (u !== void 0) throw new d(`unsupported keepAlive, use pipelining=0 instead`); if (r !== void 0) throw new d(`unsupported socketTimeout, use headersTimeout & bodyTimeout instead`); if (a !== void 0) throw new d(`unsupported requestTimeout, use headersTimeout & bodyTimeout instead`); if (l !== void 0) throw new d(`unsupported idleTimeout, use keepAliveTimeout instead`); if (p !== void 0) throw new d(`unsupported maxKeepAliveTimeout, use keepAliveMaxTimeout instead`); if (t != null) { if (!Number.isInteger(t) || t < 1) throw new d(`invalid maxHeaderSize`); } else t = _e(); if (y != null && typeof y != `string`) throw new d(`invalid socketPath`); if (s != null && (!Number.isFinite(s) || s < 0)) throw new d(`invalid connectTimeout`); if (f != null && (!Number.isFinite(f) || f <= 0)) throw new d(`invalid keepAliveTimeout`); if (_ != null && (!Number.isFinite(_) || _ <= 0)) throw new d(`invalid keepAliveMaxTimeout`); if (v != null && !Number.isFinite(v)) throw new d(`invalid keepAliveTimeoutThreshold`); if (n != null && (!Number.isInteger(n) || n < 0)) throw new d(`headersTimeout must be a positive integer or zero`); if (c != null && (!Number.isInteger(c) || c < 0)) throw new d(`bodyTimeout must be a positive integer or zero`); if (E != null && typeof E != `function` && typeof E != `object`) throw new d(`connect must be a function or an object`); if (M != null && (!Number.isInteger(M) || M < 0)) throw new d(`maxRequestsPerClient must be a positive number`); if (I != null && (typeof I != `string` || i.isIP(I) === 0)) throw new d(`localAddress must be valid string IP address`); if (R != null && (!Number.isInteger(R) || R < -1)) throw new d(`maxResponseSize must be a positive number`); if (V != null && (!Number.isInteger(V) || V < -1)) throw new d(`autoSelectFamilyAttemptTimeout must be a positive number`); if (te != null && typeof te != `boolean`) throw new d(`allowH2 must be a valid boolean value`); if (H != null && (typeof H != `number` || H < 1)) throw new d(`maxConcurrentStreams must be a positive integer, greater than 0`); if (G != null && typeof G != `boolean`) throw new d(`useH2c must be a valid boolean value`); if (K != null && (!Number.isInteger(K) || K < 1)) throw new d(`initialWindowSize must be a positive integer, greater than 0`); if (ie != null && (!Number.isInteger(ie) || ie < 1)) throw new d(`connectionWindowSize must be a positive integer, greater than 0`); if (ae != null && (typeof ae != `number` || !Number.isInteger(ae) || ae < 0)) throw new d(`pingInterval must be a positive integer, greater or equal to 0`); if (super(), typeof E != `function`) E = m({ ...S, maxCachedSessions: T, allowH2: te, useH2c: G, socketPath: y, timeout: s, ...typeof B == `boolean` ? { autoSelectFamily: B, autoSelectFamilyAttemptTimeout: V } : void 0, ...E }); else { let e = E; E = (t, n) => e({ ...t, ...y == null ? null : { socketPath: y }, ...te == null ? null : { allowH2: te } }, n); } this[h] = o.parseOrigin(e), this[ne] = E, this[N] = x ?? 1, this[F] = t, this[O] = f ?? 4e3, this[L] = _ ?? 6e5, this[ee] = v ?? 2e3, this[P] = this[O], this[g] = null, this[ce] = I ?? null, this[b] = 0, this[D] = 0, this[k] = `host: ${this[h].hostname}${this[h].port ? `:${this[h].port}` : ``}\r\n`, this[U] = c ?? 3e5, this[z] = n ?? 3e5, this[W] = C ?? !0, this[re] = M, this[Z] = null, this[le] = R > -1 ? R : -1, this[J] = null, this[ue] = H ?? 100, this[de] = K ?? 262144, this[Y] = ie ?? 524288, this[pe] = ae ?? 6e4, this[w] = [], this[j] = 0, this[A] = 0, this[fe] = (e) => Te(this, e), this[q] = (e) => xe(this, e); } get pipelining() { return this[N]; } set pipelining(e) { this[N] = e, this[fe](!0); } get stats() { return new s(this); } get [S]() { return this[w].length - this[A]; } get [x]() { return this[A] - this[j]; } get [C]() { return this[w].length - this[j]; } get [T]() { return !!this[J] && !this[E] && !this[J].destroyed; } get [v]() { return !!(this[J]?.busy(null) || this[C] >= (ye(this) || 1) || this[S] > 0); } [y](e) { Se(this), this.once(`connect`, e); } [se](e, t) { let n = new l(this[h].origin, e, t); return this[w].push(n), this[b] || (o.bodyLength(n.body) == null && o.isIterable(n.body) ? (this[b] = 1, queueMicrotask(() => Te(this))) : this[fe](!0)), this[b] && this[D] !== 2 && this[v] && (this[D] = 2), this[D] < 2; } [ae]() { return new Promise((e) => { this[C] ? this[Z] = e : e(null); }); } [oe](e) { return new Promise((t) => { let n = this[w].splice(this[A]); for (let t = 0; t < n.length; t++) { let r = n[t]; o.errorRequest(this, r, e); } let r = () => { this[Z] && (this[Z](), this[Z] = null), t(null); }; this[J] ? (this[J].destroy(e, r), this[J] = null) : queueMicrotask(r), this[fe](); }); } }; function xe(e, t) { if (e[x] === 0 && t.code !== `UND_ERR_INFO` && t.code !== `UND_ERR_SOCKET`) { r(e[A] === e[j]); let n = e[w].splice(e[j]); for (let r = 0; r < n.length; r++) { let i = n[r]; o.errorRequest(e, i, t); } r(e[C] === 0); } } function Se(e) { r(!e[E]), r(!e[J]); let { host: t, hostname: n, protocol: a, port: s } = e[h]; if (n[0] === `[`) { let e = n.indexOf(`]`); r(e !== -1); let t = n.substring(1, e); r(i.isIPv6(t)), n = t; } e[E] = !0, c.beforeConnect.hasSubscribers && c.beforeConnect.publish({ connectParams: { host: t, hostname: n, protocol: a, port: s, version: e[J]?.version, servername: e[g], localAddress: e[ce] }, connector: e[ne] }); try { e[ne]({ host: t, hostname: n, protocol: a, port: s, servername: e[g], localAddress: e[ce] }, (i, l) => { if (i) { Ce(e, i, { host: t, hostname: n, protocol: a, port: s }), e[fe](); return; } if (e.destroyed) { o.destroy(l.on(`error`, ve), new p()), e[fe](); return; } r(l); try { e[J] = l.alpnProtocol === `h2` ? me(e, l) : X(e, l); } catch (r) { l.destroy().on(`error`, ve), Ce(e, r, { host: t, hostname: n, protocol: a, port: s }), e[fe](); return; } e[E] = !1, l[ie] = 0, l[re] = e[re], l[_] = e, l[M] = null, c.connected.hasSubscribers && c.connected.publish({ connectParams: { host: t, hostname: n, protocol: a, port: s, version: e[J]?.version, servername: e[g], localAddress: e[ce] }, connector: e[ne], socket: l }), e.emit(`connect`, e[h], [e]), e[fe](); }); } catch (r) { Ce(e, r, { host: t, hostname: n, protocol: a, port: s }), e[fe](); } } function Ce(e, t, { host: n, hostname: i, protocol: a, port: s }) { if (!e.destroyed) { if (e[E] = !1, c.connectError.hasSubscribers && c.connectError.publish({ connectParams: { host: n, hostname: i, protocol: a, port: s, version: e[J]?.version, servername: e[g], localAddress: e[ce] }, connector: e[ne], error: t }), t.code === `ERR_TLS_CERT_ALTNAME_INVALID`) for (r(e[x] === 0); e[S] > 0 && e[w][e[A]].servername === e[g];) { let n = e[w][e[A]++]; o.errorRequest(e, n, t); } else xe(e, t); e.emit(`connectionError`, e[h], [e], t); } } function we(e) { e[D] = 0, e.emit(`drain`, e[h], [e]); } function Te(e, t) { e[b] !== 2 && (e[b] = 2, Ee(e, t), e[b] = 0, e[j] > 256 && (e[w].splice(0, e[j]), e[A] -= e[j], e[j] = 0)); } function Ee(e, t) { for (;;) { if (e.destroyed) { r(e[S] === 0); return; } if (e[Z] && !e[C]) { e[Z](), e[Z] = null; return; } if (e[J] && e[J].resume(), e[v]) e[D] = 2; else if (e[D] === 2) { t ? (e[D] = 1, queueMicrotask(() => we(e))) : we(e); continue; } if (e[S] === 0 || e[x] >= (ye(e) || 1)) return; let n = e[w][e[A]]; if (n === null) return; if (e[h].protocol === `https:` && e[g] !== n.servername) { if (e[x] > 0) return; e[g] = n.servername, e[J]?.destroy(new f(`servername changed`), () => { e[J] = null, Te(e); }); } if (e[E]) return; if (!e[J]) { Se(e); return; } if (e[J].destroyed || e[J].busy(n)) return; !n.aborted && e[J].write(n) ? e[A]++ : e[w].splice(e[A], 1); } } t.exports = be; })); var _e = c$3(((e, t) => { let n = 2048, r = n - 1; var i = class { bottom = 0; top = 0; list = Array(n).fill(void 0); next = null; isEmpty() { return this.top === this.bottom; } isFull() { return (this.top + 1 & r) === this.bottom; } push(e) { this.list[this.top] = e, this.top = this.top + 1 & r; } shift() { let e = this.list[this.bottom]; return e === void 0 ? null : (this.list[this.bottom] = void 0, this.bottom = this.bottom + 1 & r, e); } }; t.exports = class { constructor() { this.head = this.tail = new i(); } isEmpty() { return this.head.isEmpty(); } push(e) { this.head.isFull() && (this.head = this.head.next = new i()), this.head.push(e); } shift() { let e = this.tail, t = e.shift(); return e.isEmpty() && e.next !== null && (this.tail = e.next, e.next = null), t; } }; })); var ve = c$3(((e, t) => { let { PoolStats: n } = V$1(), r = G$2(), i = _e(), { kConnected: a, kSize: o, kRunning: s, kPending: c, kQueued: l, kBusy: u, kFree: d, kUrl: f, kClose: p, kDestroy: m, kDispatch: h } = I$1(), g = Symbol(`clients`), _ = Symbol(`needDrain`), v = Symbol(`queue`), y = Symbol(`closed resolve`), b = Symbol(`onDrain`), x = Symbol(`onConnect`), S = Symbol(`onDisconnect`), C = Symbol(`onConnectionError`), w = Symbol(`get dispatcher`), T = Symbol(`add client`), E = Symbol(`remove client`); t.exports = { PoolBase: class extends r { [v] = new i(); [l] = 0; [g] = []; [_] = !1; [b](e, t, n) { let r = this[v], i = !1; for (; !i;) { let t = r.shift(); if (!t) break; this[l]--, i = !e.dispatch(t.opts, t.handler); } if (e[_] = i, !i && this[_] && (this[_] = !1, this.emit(`drain`, t, [this, ...n])), this[y] && r.isEmpty()) { let e = []; for (let t = 0; t < this[g].length; t++) { let n = this[g][t]; n.destroyed || e.push(n.close()); } return Promise.all(e).then(this[y]); } } [x] = (e, t) => { this.emit(`connect`, e, [this, ...t]); }; [S] = (e, t, n) => { this.emit(`disconnect`, e, [this, ...t], n); }; [C] = (e, t, n) => { this.emit(`connectionError`, e, [this, ...t], n); }; get [u]() { return this[_]; } get [a]() { let e = 0; for (let { [a]: t } of this[g]) e += t; return e; } get [d]() { let e = 0; for (let { [a]: t, [_]: n } of this[g]) e += t && !n; return e; } get [c]() { let e = this[l]; for (let { [c]: t } of this[g]) e += t; return e; } get [s]() { let e = 0; for (let { [s]: t } of this[g]) e += t; return e; } get [o]() { let e = this[l]; for (let { [o]: t } of this[g]) e += t; return e; } get stats() { return new n(this); } [p]() { if (this[v].isEmpty()) { let e = []; for (let t = 0; t < this[g].length; t++) { let n = this[g][t]; n.destroyed || e.push(n.close()); } return Promise.all(e); } else return new Promise((e) => { this[y] = e; }); } [m](e) { for (;;) { let t = this[v].shift(); if (!t) break; t.handler.onError(e); } let t = Array(this[g].length); for (let n = 0; n < this[g].length; n++) t[n] = this[g][n].destroy(e); return Promise.all(t); } [h](e, t) { let n = this[w](); return n ? n.dispatch(e, t) || (n[_] = !0, this[_] = !this[w]()) : (this[_] = !0, this[v].push({ opts: e, handler: t }), this[l]++), !this[_]; } [T](e) { return e.on(`drain`, this[b].bind(this, e)).on(`connect`, this[x]).on(`disconnect`, this[S]).on(`connectionError`, this[C]), this[g].push(e), this[_] && queueMicrotask(() => { this[_] && this[b](e, e[f], [e, this]); }), this; } [E](e) { e.close(() => { let t = this[g].indexOf(e); t !== -1 && this[g].splice(t, 1); }), this[_] = this[g].some((e) => !e[_] && e.closed !== !0 && e.destroyed !== !0); } }, kClients: g, kNeedDrain: _, kAddClient: T, kRemoveClient: E, kGetDispatcher: w }; })); var ye = c$3(((e, t) => { let { PoolBase: n, kClients: r, kNeedDrain: i, kAddClient: a, kGetDispatcher: o, kRemoveClient: s } = ve(), c = Z$1(), { InvalidArgumentError: l } = R$1(), u = B$1(), { kUrl: d } = I$1(), f = K$1(), p = Symbol(`options`), m = Symbol(`connections`), h = Symbol(`factory`); function g(e, t) { return new c(e, t); } t.exports = class extends n { constructor(e, { connections: t, factory: n = g, connect: i, connectTimeout: a, tls: o, maxCachedSessions: s, socketPath: c, autoSelectFamily: _, autoSelectFamilyAttemptTimeout: v, allowH2: y, clientTtl: b, ...x } = {}) { if (t != null && (!Number.isFinite(t) || t < 0)) throw new l(`invalid connections`); if (typeof n != `function`) throw new l(`factory must be a function.`); if (i != null && typeof i != `function` && typeof i != `object`) throw new l(`connect must be a function or an object`); typeof i != `function` && (i = f({ ...o, maxCachedSessions: s, allowH2: y, socketPath: c, timeout: a, ...typeof _ == `boolean` ? { autoSelectFamily: _, autoSelectFamilyAttemptTimeout: v } : void 0, ...i })), super(), this[m] = t || null, this[d] = u.parseOrigin(e), this[p] = { ...u.deepClone(x), connect: i, allowH2: y, clientTtl: b, socketPath: c }, this[p].interceptors = x.interceptors ? { ...x.interceptors } : void 0, this[h] = n, this.on(`connect`, (e, t) => { if (b != null && b > 0) for (let e of t) Object.assign(e, { ttl: Date.now() }); }), this.on(`connectionError`, (e, t, n) => { for (let e of t) { let t = this[r].indexOf(e); t !== -1 && this[r].splice(t, 1); } }); } [o]() { let e = this[p].clientTtl; for (let t of this[r]) if (e != null && e > 0 && t.ttl && Date.now() - t.ttl > e) this[s](t); else if (!t[i]) return t; if (!this[m] || this[r].length < this[m]) { let e = this[h](this[d], this[p]); return this[a](e), e; } } }; })); var be = c$3(((e, t) => { let { BalancedPoolMissingUpstreamError: n, InvalidArgumentError: r } = R$1(), { PoolBase: i, kClients: a, kNeedDrain: o, kAddClient: s, kRemoveClient: c, kGetDispatcher: l } = ve(), u = ye(), { kUrl: d } = I$1(), f = B$1(), p = Symbol(`factory`), m = Symbol(`options`), h = Symbol(`kGreatestCommonDivisor`), g = Symbol(`kCurrentWeight`), _ = Symbol(`kIndex`), v = Symbol(`kWeight`), y = Symbol(`kMaxWeightPerServer`), b = Symbol(`kErrorPenalty`); function x(e, t) { if (e === 0) return t; for (; t !== 0;) { let n = t; t = e % t, e = n; } return e; } function S(e, t) { return new u(e, t); } t.exports = class extends i { constructor(e = [], { factory: t = S, ...n } = {}) { if (typeof t != `function`) throw new r(`factory must be a function.`); super(), this[m] = { ...f.deepClone(n) }, this[m].interceptors = n.interceptors ? { ...n.interceptors } : void 0, this[_] = -1, this[g] = 0, this[y] = this[m].maxWeightPerServer || 100, this[b] = this[m].errorPenalty || 15, Array.isArray(e) || (e = [e]), this[p] = t; for (let t of e) this.addUpstream(t); this._updateBalancedPoolStats(); } addUpstream(e) { let t = f.parseOrigin(e).origin; if (this[a].find((e) => e[d].origin === t && e.closed !== !0 && e.destroyed !== !0)) return this; let n = this[p](t, this[m]); this[s](n), n.on(`connect`, () => { n[v] = Math.min(this[y], n[v] + this[b]); }), n.on(`connectionError`, () => { n[v] = Math.max(1, n[v] - this[b]), this._updateBalancedPoolStats(); }), n.on(`disconnect`, (...e) => { let t = e[2]; t && t.code === `UND_ERR_SOCKET` && (n[v] = Math.max(1, n[v] - this[b]), this._updateBalancedPoolStats()); }); for (let e of this[a]) e[v] = this[y]; return this._updateBalancedPoolStats(), this; } _updateBalancedPoolStats() { let e = 0; for (let t = 0; t < this[a].length; t++) e = x(this[a][t][v], e); this[h] = e; } removeUpstream(e) { let t = f.parseOrigin(e).origin, n = this[a].find((e) => e[d].origin === t && e.closed !== !0 && e.destroyed !== !0); return n && this[c](n), this; } getUpstream(e) { let t = f.parseOrigin(e).origin; return this[a].find((e) => e[d].origin === t && e.closed !== !0 && e.destroyed !== !0); } get upstreams() { return this[a].filter((e) => e.closed !== !0 && e.destroyed !== !0).map((e) => e[d].origin); } [l]() { if (this[a].length === 0) throw new n(); if (!this[a].find((e) => !e[o] && e.closed !== !0 && e.destroyed !== !0) || this[a].map((e) => e[o]).reduce((e, t) => e && t, !0)) return; let e = 0, t = this[a].findIndex((e) => !e[o]); for (; e++ < this[a].length;) { this[_] = (this[_] + 1) % this[a].length; let e = this[a][this[_]]; if (e[v] > this[a][t][v] && !e[o] && (t = this[_]), this[_] === 0 && (this[g] = this[g] - this[h], this[g] <= 0 && (this[g] = this[y])), e[v] >= this[g] && !e[o]) return e; } return this[g] = this[a][t][v], this[_] = t, this[a][t]; } }; })); var xe = c$3(((e, t) => { let { PoolBase: n, kClients: r, kNeedDrain: i, kAddClient: a, kGetDispatcher: o, kRemoveClient: s } = ve(), c = Z$1(), { InvalidArgumentError: l } = R$1(), u = B$1(), { kUrl: d } = I$1(), f = K$1(), p = Symbol(`options`), m = Symbol(`connections`), h = Symbol(`factory`), g = Symbol(`index`); function _(e, t) { return new c(e, t); } t.exports = class extends n { constructor(e, { connections: t, factory: n = _, connect: i, connectTimeout: a, tls: o, maxCachedSessions: s, socketPath: c, autoSelectFamily: v, autoSelectFamilyAttemptTimeout: y, allowH2: b, clientTtl: x, ...S } = {}) { if (t != null && (!Number.isFinite(t) || t < 0)) throw new l(`invalid connections`); if (typeof n != `function`) throw new l(`factory must be a function.`); if (i != null && typeof i != `function` && typeof i != `object`) throw new l(`connect must be a function or an object`); typeof i != `function` && (i = f({ ...o, maxCachedSessions: s, allowH2: b, socketPath: c, timeout: a, ...typeof v == `boolean` ? { autoSelectFamily: v, autoSelectFamilyAttemptTimeout: y } : void 0, ...i })), super(), this[m] = t || null, this[d] = u.parseOrigin(e), this[p] = { ...u.deepClone(S), connect: i, allowH2: b, clientTtl: x, socketPath: c }, this[p].interceptors = S.interceptors ? { ...S.interceptors } : void 0, this[h] = n, this[g] = -1, this.on(`connect`, (e, t) => { if (x != null && x > 0) for (let e of t) Object.assign(e, { ttl: Date.now() }); }), this.on(`connectionError`, (e, t, n) => { for (let e of t) { let t = this[r].indexOf(e); t !== -1 && this[r].splice(t, 1); } }); } [o]() { let e = this[p].clientTtl, t = this[r].length; if (t === 0) { let e = this[h](this[d], this[p]); return this[a](e), e; } let n = 0; for (; n < t;) { this[g] = (this[g] + 1) % t; let a = this[r][this[g]]; if (e != null && e > 0 && a.ttl && Date.now() - a.ttl > e) { this[s](a), n++; continue; } if (!a[i]) return a; n++; } if (!this[m] || t < this[m]) { let e = this[h](this[d], this[p]); return this[a](e), e; } } }; })); var Se = c$3(((e, t) => { let { InvalidArgumentError: n, MaxOriginsReachedError: r } = R$1(), { kClients: i, kRunning: a, kClose: o, kDestroy: s, kDispatch: c, kUrl: l } = I$1(), u = G$2(), d = ye(), f = Z$1(), p = B$1(), m = Symbol(`onConnect`), h = Symbol(`onDisconnect`), g = Symbol(`onConnectionError`), _ = Symbol(`onDrain`), v = Symbol(`factory`), y = Symbol(`options`), b = Symbol(`origins`); function x(e, t) { return t && t.connections === 1 ? new f(e, t) : new d(e, t); } t.exports = class extends u { constructor({ factory: e = x, maxOrigins: t = Infinity, connect: r, ...a } = {}) { if (typeof e != `function`) throw new n(`factory must be a function.`); if (r != null && typeof r != `function` && typeof r != `object`) throw new n(`connect must be a function or an object`); if (typeof t != `number` || Number.isNaN(t) || t <= 0) throw new n(`maxOrigins must be a number greater than 0`); super(), r && typeof r != `function` && (r = { ...r }), this[y] = { ...p.deepClone(a), maxOrigins: t, connect: r }, this[v] = e, this[i] = /* @__PURE__ */ new Map(), this[b] = /* @__PURE__ */ new Set(), this[_] = (e, t) => { this.emit(`drain`, e, [this, ...t]); }, this[m] = (e, t) => { this.emit(`connect`, e, [this, ...t]); }, this[h] = (e, t, n) => { this.emit(`disconnect`, e, [this, ...t], n); }, this[g] = (e, t, n) => { this.emit(`connectionError`, e, [this, ...t], n); }; } get [a]() { let e = 0; for (let { dispatcher: t } of this[i].values()) e += t[a]; return e; } [c](e, t) { let a; if (e.origin && (typeof e.origin == `string` || e.origin instanceof URL)) a = String(e.origin); else throw new n(`opts.origin must be a non-empty string or URL.`); if (this[b].size >= this[y].maxOrigins && !this[b].has(a)) throw new r(); let o = this[i].get(a), s = o && o.dispatcher; if (!s) { let t = (e) => { let t = this[i].get(a); t && (e && --t.count, t.count <= 0 && (this[i].delete(a), t.dispatcher.destroyed || t.dispatcher.close()), this[b].delete(a)); }; s = this[v](e.origin, this[y]).on(`drain`, this[_]).on(`connect`, (e, t) => { let n = this[i].get(a); n && (n.count += 1), this[m](e, t); }).on(`disconnect`, (e, n, r) => { t(!0), this[h](e, n, r); }).on(`connectionError`, (e, n, r) => { t(!1), this[g](e, n, r); }), this[i].set(a, { count: 0, dispatcher: s }), this[b].add(a); } return s.dispatch(e, t); } [o]() { let e = []; for (let { dispatcher: t } of this[i].values()) e.push(t.close()); return this[i].clear(), Promise.all(e); } [s](e) { let t = []; for (let { dispatcher: n } of this[i].values()) t.push(n.destroy(e)); return this[i].clear(), Promise.all(t); } get stats() { let e = {}; for (let { dispatcher: t } of this[i].values()) t.stats && (e[t[l].origin] = t.stats); return e; } }; })); var Ce = c$3(((e, t) => { let { Buffer: r } = p$4(`node:buffer`), i = p$4(`node:net`), { InvalidArgumentError: a } = R$1(); function o(e) { if (i.isIPv4(e)) { let t = e.split(`.`).map(Number); return { type: 1, buffer: r.from(t) }; } if (i.isIPv6(e)) return { type: 4, buffer: s(e) }; let t = r.from(e, `utf8`); if (t.length > 255) throw new a(`Domain name too long (max 255 bytes)`); return { type: 3, buffer: r.concat([r.from([t.length]), t]) }; } function s(e) { let t = r.alloc(16), n = e.indexOf(`::`); if (n !== -1) { let r = e.slice(0, n), i = e.slice(n + 2), a = r === `` ? [] : r.split(`:`), o = i === `` ? [] : i.split(`:`), s = 0; for (let e of a) t.writeUInt16BE(parseInt(e, 16), s), s += 2; s = 16 - o.length * 2; for (let e of o) t.writeUInt16BE(parseInt(e, 16), s), s += 2; } else { let n = e.split(`:`); for (let e = 0; e < n.length; e++) t.writeUInt16BE(parseInt(n[e], 16), e * 2); } return t; } function c(e, t, n) { let i = r.allocUnsafe(2); return i.writeUInt16BE(n, 0), r.concat([ r.from([e]), t, i ]); } function l(e, t = 0) { if (e.length < t + 1) throw new a(`Buffer too small to contain address type`); let n = e[t], r, i = t + 1; switch (n) { case 1: if (e.length < i + 6) throw new a(`Buffer too small for IPv4 address`); r = Array.from(e.subarray(i, i + 4)).join(`.`), i += 4; break; case 3: { if (e.length < i + 1) throw new a(`Buffer too small for domain length`); let t = e[i]; if (i += 1, e.length < i + t + 2) throw new a(`Buffer too small for domain address`); r = e.subarray(i, i + t).toString(`utf8`), i += t; break; } case 4: { if (e.length < i + 18) throw new a(`Buffer too small for IPv6 address`); let t = []; for (let n = 0; n < 8; n++) { let r = e.readUInt16BE(i + n * 2); t.push(r.toString(16)); } r = t.join(`:`), i += 16; break; } default: throw new a(`Invalid address type: ${n}`); } if (e.length < i + 2) throw new a(`Buffer too small for port`); let o = e.readUInt16BE(i); return i += 2, { address: r, port: o, bytesRead: i - t }; } function u(e) { let t = { 1: `General SOCKS server failure`, 2: `Connection not allowed by ruleset`, 3: `Network unreachable`, 4: `Host unreachable`, 5: `Connection refused`, 6: `TTL expired`, 7: `Command not supported`, 8: `Address type not supported` }[e] || `Unknown SOCKS5 error code: ${e}`, n = Error(t); return n.code = `SOCKS5_${e}`, n; } t.exports = { parseAddress: o, parseIPv6: s, buildAddressBuffer: c, parseResponseAddress: l, createReplyError: u }; })); var we = c$3(((e, t) => { let { EventEmitter: r } = p$4(`node:events`), { Buffer: i } = p$4(`node:buffer`), { InvalidArgumentError: a, Socks5ProxyError: o } = R$1(), { debuglog: s } = p$4(`node:util`), { parseAddress: c } = Ce(), l = s(`undici:socks5`), u = i.alloc(0), d = { NO_AUTH: 0, GSSAPI: 1, USERNAME_PASSWORD: 2, NO_ACCEPTABLE: 255 }, f = { CONNECT: 1, BIND: 2, UDP_ASSOCIATE: 3 }, p = { IPV4: 1, DOMAIN: 3, IPV6: 4 }, m = { SUCCEEDED: 0, GENERAL_FAILURE: 1, CONNECTION_NOT_ALLOWED: 2, NETWORK_UNREACHABLE: 3, HOST_UNREACHABLE: 4, CONNECTION_REFUSED: 5, TTL_EXPIRED: 6, COMMAND_NOT_SUPPORTED: 7, ADDRESS_TYPE_NOT_SUPPORTED: 8 }, h = { INITIAL: `initial`, HANDSHAKING: `handshaking`, AUTHENTICATING: `authenticating`, CONNECTING: `connecting`, CONNECTED: `connected`, ERROR: `error`, CLOSED: `closed` }; t.exports = { Socks5Client: class extends r { constructor(e, t = {}) { if (super(), !e) throw new a(`socket is required`); this.socket = e, this.options = t, this.state = h.INITIAL, this.buffer = u, this.onSocketData = this.onData.bind(this), this.onSocketError = this.onError.bind(this), this.onSocketClose = this.onClose.bind(this), this.authMethods = [], t.username && t.password && this.authMethods.push(d.USERNAME_PASSWORD), this.authMethods.push(d.NO_AUTH), this.socket.on(`data`, this.onSocketData), this.socket.on(`error`, this.onSocketError), this.socket.on(`close`, this.onSocketClose); } onData(e) { l(`received data`, e.length, `bytes in state`, this.state), this.buffer = i.concat([this.buffer, e]); try { switch (this.state) { case h.HANDSHAKING: this.handleHandshakeResponse(); break; case h.AUTHENTICATING: this.handleAuthResponse(); break; case h.CONNECTING: this.handleConnectResponse(); break; } } catch (e) { this.onError(e); } } onError(e) { l(`socket error`, e), this.state = h.ERROR, this.emit(`error`, e), this.destroy(); } onClose() { l(`socket closed`), this.state = h.CLOSED, this.emit(`close`); } destroy() { this.socket && !this.socket.destroyed && this.socket.destroy(); } handshake() { if (this.state !== h.INITIAL) throw new a(`Handshake already started`); l(`starting handshake with`, this.authMethods.length, `auth methods`), this.state = h.HANDSHAKING; let e = i.alloc(2 + this.authMethods.length); e[0] = 5, e[1] = this.authMethods.length, this.authMethods.forEach((t, n) => { e[2 + n] = t; }), this.socket.write(e); } handleHandshakeResponse() { if (this.buffer.length < 2) return; let e = this.buffer[0], t = this.buffer[1]; if (e !== 5) throw new o(`Invalid SOCKS version: ${e}`, `UND_ERR_SOCKS5_VERSION`); if (t === d.NO_ACCEPTABLE) throw new o(`No acceptable authentication method`, `UND_ERR_SOCKS5_AUTH_REJECTED`); if (this.buffer = this.buffer.subarray(2), l(`server selected auth method`, t), t === d.NO_AUTH) this.emit(`authenticated`); else if (t === d.USERNAME_PASSWORD) this.state = h.AUTHENTICATING, this.sendAuthRequest(); else throw new o(`Unsupported authentication method: ${t}`, `UND_ERR_SOCKS5_AUTH_METHOD`); } sendAuthRequest() { let { username: e, password: t } = this.options; if (!e || !t) throw new a(`Username and password required for authentication`); l(`sending username/password auth`); let n = i.from(e), r = i.from(t); if (n.length > 255 || r.length > 255) throw new a(`Username or password too long`); let o = i.alloc(3 + n.length + r.length); o[0] = 1, o[1] = n.length, n.copy(o, 2), o[2 + n.length] = r.length, r.copy(o, 3 + n.length), this.socket.write(o); } handleAuthResponse() { if (this.buffer.length < 2) return; let e = this.buffer[0], t = this.buffer[1]; if (e !== 1) throw new o(`Invalid auth sub-negotiation version: ${e}`, `UND_ERR_SOCKS5_AUTH_VERSION`); if (t !== 0) throw new o(`Authentication failed`, `UND_ERR_SOCKS5_AUTH_FAILED`); this.buffer = this.buffer.subarray(2), l(`authentication successful`), this.emit(`authenticated`); } connect(e, t) { if (this.state === h.CONNECTED) throw new a(`Already connected`); l(`connecting to`, e, t), this.state = h.CONNECTING; let n = this.buildConnectRequest(f.CONNECT, e, t); this.socket.write(n); } buildConnectRequest(e, t, n) { let { type: r, buffer: a } = c(t), o = i.alloc(4 + a.length + 2); return o[0] = 5, o[1] = e, o[2] = 0, o[3] = r, a.copy(o, 4), o.writeUInt16BE(n, 4 + a.length), o; } handleConnectResponse() { if (this.buffer.length < 4) return; let e = this.buffer[0], t = this.buffer[1], n = this.buffer[3]; if (e !== 5) throw new o(`Invalid SOCKS version in reply: ${e}`, `UND_ERR_SOCKS5_REPLY_VERSION`); let r = 4; if (n === p.IPV4) r += 6; else if (n === p.DOMAIN) { if (this.buffer.length < 5) return; r += 1 + this.buffer[4] + 2; } else if (n === p.IPV6) r += 18; else throw new o(`Invalid address type in reply: ${n}`, `UND_ERR_SOCKS5_ADDR_TYPE`); if (this.buffer.length < r) return; if (t !== m.SUCCEEDED) throw new o(`SOCKS5 connection failed: ${this.getReplyErrorMessage(t)}`, `UND_ERR_SOCKS5_REPLY_${t}`); let i, a = 4; if (n === p.IPV4) i = Array.from(this.buffer.subarray(a, a + 4)).join(`.`), a += 4; else if (n === p.DOMAIN) { let e = this.buffer[a]; a += 1, i = this.buffer.subarray(a, a + e).toString(), a += e; } else if (n === p.IPV6) { let e = []; for (let t = 0; t < 8; t++) { let n = this.buffer.readUInt16BE(a + t * 2); e.push(n.toString(16)); } i = e.join(`:`), a += 16; } let s = this.buffer.readUInt16BE(a); this.buffer = u, this.state = h.CONNECTED, this.socket.removeListener(`data`, this.onSocketData), l(`connected, bound address:`, i, `port:`, s), this.emit(`connected`, { address: i, port: s }); } getReplyErrorMessage(e) { switch (e) { case m.GENERAL_FAILURE: return `General SOCKS server failure`; case m.CONNECTION_NOT_ALLOWED: return `Connection not allowed by ruleset`; case m.NETWORK_UNREACHABLE: return `Network unreachable`; case m.HOST_UNREACHABLE: return `Host unreachable`; case m.CONNECTION_REFUSED: return `Connection refused`; case m.TTL_EXPIRED: return `TTL expired`; case m.COMMAND_NOT_SUPPORTED: return `Command not supported`; case m.ADDRESS_TYPE_NOT_SUPPORTED: return `Address type not supported`; default: return `Unknown error code: ${e}`; } } }, AUTH_METHODS: d, COMMANDS: f, ADDRESS_TYPES: p, REPLY_CODES: m, STATES: h }; })); var Te = c$3(((e, t) => { let r = p$4(`node:net`), { URL: i } = p$4(`node:url`), a, o = G$2(), { InvalidArgumentError: s } = R$1(), { Socks5Client: c } = we(), { kDispatch: l, kClose: u, kDestroy: d } = I$1(), f = ye(), p = K$1(), { debuglog: m } = p$4(`node:util`), h = m(`undici:socks5-proxy`), g = Symbol(`proxy url`), _ = Symbol(`proxy headers`), v = Symbol(`proxy auth`), y = Symbol(`pool`), b = Symbol(`connector`), x = !1; t.exports = class extends o { constructor(e, t = {}) { if (super(), x ||= (process.emitWarning(`SOCKS5 proxy support is experimental and subject to change`, `ExperimentalWarning`), !0), !e) throw new s(`Proxy URL is mandatory`); let n = typeof e == `string` ? new i(e) : e; if (n.protocol !== `socks5:` && n.protocol !== `socks:`) throw new s(`Proxy URL must use socks5:// or socks:// protocol`); this[g] = n, this[_] = t.headers || {}, this[v] = { username: t.username || (n.username ? decodeURIComponent(n.username) : null), password: t.password || (n.password ? decodeURIComponent(n.password) : null) }, this[b] = t.connect || p({ ...t.proxyTls, servername: t.proxyTls?.servername || n.hostname }), this[y] = null; } async createSocks5Connection(e, t) { let n = this[g].hostname, i = parseInt(this[g].port) || 1080; h(`creating SOCKS5 connection to`, n, i); let a = await new Promise((e, t) => { let a = () => { s.removeListener(`error`, o), e(s); }, o = (e) => { s.removeListener(`connect`, a), t(e); }, s = r.connect({ host: n, port: i }); s.once(`connect`, a), s.once(`error`, o); }), o = new c(a, this[v]); return o.on(`error`, (e) => { h(`SOCKS5 error:`, e), a.destroy(); }), await o.handshake(), await new Promise((e, t) => { let n = setTimeout(() => { t(Error(`SOCKS5 authentication timeout`)); }, 5e3), r = () => { clearTimeout(n), o.removeListener(`error`, i), e(); }, i = (e) => { clearTimeout(n), o.removeListener(`authenticated`, r), t(e); }; o.state === `authenticated` ? (clearTimeout(n), e()) : (o.once(`authenticated`, r), o.once(`error`, i)); }), await o.connect(e, t), await new Promise((n, r) => { let i = setTimeout(() => { r(Error(`SOCKS5 connection timeout`)); }, 5e3), a = (r) => { h(`SOCKS5 tunnel established to`, e, t, `via`, r), clearTimeout(i), o.removeListener(`error`, s), n(); }, s = (e) => { clearTimeout(i), o.removeListener(`connected`, a), r(e); }; o.once(`connected`, a), o.once(`error`, s); }), a; } async [l](e, t) { let { origin: r } = e; h(`dispatching request to`, r, `via SOCKS5`); try { return (!this[y] || this[y].destroyed || this[y].closed) && (this[y] = new f(r, { pipelining: e.pipelining, connections: e.connections, connect: async (e, t) => { try { let o = new i(r), s = o.hostname, c = parseInt(o.port) || (o.protocol === `https:` ? 443 : 80); h(`establishing SOCKS5 connection to`, s, c); let l = await this.createSocks5Connection(s, c), u = l; o.protocol === `https:` && (a ||= p$4(`node:tls`), h(`upgrading to TLS`), u = a.connect({ socket: l, servername: s, ...e.tls || {} }), await new Promise((e, t) => { u.once(`secureConnect`, e), u.once(`error`, t); })), t(null, u); } catch (e) { h(`SOCKS5 connection error:`, e), t(e); } } })), this[y][l](e, t); } catch (e) { if (h(`dispatch error:`, e), typeof t.onError == `function`) t.onError(e); else throw e; } } async [u]() { this[y] && await this[y].close(); } async [d](e) { this[y] && await this[y].destroy(e); } }; })); var Ee = c$3(((e, t) => { let { kProxy: n, kClose: r, kDestroy: i, kDispatch: a } = I$1(), o = Se(), s = ye(), c = G$2(), { InvalidArgumentError: l, RequestAbortedError: u, SecureProxyConnectionError: d } = R$1(), f = K$1(), p = Z$1(), { channels: m } = H$1(), h = Te(), g = Symbol(`proxy agent`), _ = Symbol(`proxy client`), v = Symbol(`proxy headers`), y = Symbol(`request tls settings`), b = Symbol(`proxy tls settings`), x = Symbol(`connect endpoint function`), S = Symbol(`tunnel proxy`); function C(e) { return e === `https:` ? 443 : 80; } function w(e, t) { return new s(e, t); } let T = () => {}; function E(e, t) { return t.connections === 1 ? new p(e, t) : new s(e, t); } var D = class extends c { #e; constructor(e, { headers: t = {}, connect: n, factory: r }) { if (!e) throw new l(`Proxy URL is mandatory`); super(), this[v] = t, r ? this.#e = r(e, { connect: n }) : this.#e = new p(e, { connect: n }); } [a](e, t) { let n = t.onHeaders; t.onHeaders = function(e, r, i) { if (e === 407) { typeof t.onError == `function` && t.onError(new l(`Proxy Authentication Required (407)`)); return; } n && n.call(this, e, r, i); }; let { origin: r, path: i = `/`, headers: o = {} } = e; if (e.path = r + i, !(`host` in o) && !(`Host` in o)) { let { host: e } = new URL(r); o.host = e; } return e.headers = { ...this[v], ...o }, this.#e[a](e, t); } [r]() { return this.#e.close(); } [i](e) { return this.#e.destroy(e); } }, O = class extends c { constructor(e) { if (!e || typeof e == `object` && !(e instanceof URL) && !e.uri) throw new l(`Proxy uri is mandatory`); let { clientFactory: t = w } = e; if (typeof t != `function`) throw new l(`Proxy opts.clientFactory must be a function.`); let { proxyTunnel: r = !0 } = e; super(); let i = this.#e(e), { href: a, origin: s, port: c, protocol: p, username: O, password: k, hostname: A } = i; if (this[n] = { uri: a, protocol: p }, this[y] = e.requestTls, this[b] = e.proxyTls, this[v] = e.headers || {}, this[S] = r, e.auth && e.token) throw new l(`opts.auth cannot be used in combination with opts.token`); e.auth ? this[v][`proxy-authorization`] = `Basic ${e.auth}` : e.token ? this[v][`proxy-authorization`] = e.token : O && k && (this[v][`proxy-authorization`] = `Basic ${Buffer.from(`${decodeURIComponent(O)}:${decodeURIComponent(k)}`).toString(`base64`)}`); let j = f({ ...e.proxyTls }); this[x] = f({ ...e.requestTls }); let M = e.factory || E, N = (t, r) => { let { protocol: i } = new URL(t); return this[n].protocol === `socks5:` || this[n].protocol === `socks:` ? new h(this[n].uri, { headers: this[v], connect: j, factory: M, username: e.username || O, password: e.password || k, proxyTls: e.proxyTls }) : !this[S] && i === `http:` && this[n].protocol === `http:` ? new D(this[n].uri, { headers: this[v], connect: j, factory: M }) : M(t, r); }; p === `socks5:` || p === `socks:` ? this[_] = null : this[_] = t(i, { connect: j }), this[g] = new o({ ...e, factory: N, connect: async (e, t) => { if (!this[_]) { t(new l(`Cannot establish tunnel connection without a proxy client`)); return; } let n = e.host; e.port || (n += `:${C(e.protocol)}`); try { let r = { origin: s, port: c, path: n, signal: e.signal, headers: { ...this[v], host: e.host, ...e.connections == null || e.connections > 0 ? { "proxy-connection": `keep-alive` } : {} }, servername: this[b]?.servername || A }, { socket: i, statusCode: a } = await this[_].connect(r); if (a !== 200) { i.on(`error`, T).destroy(), t(new u(`Proxy response (${a}) !== 200 when HTTP Tunneling`)); return; } if (m.proxyConnected.hasSubscribers && m.proxyConnected.publish({ socket: i, connectParams: r }), e.protocol !== `https:`) { t(null, i); return; } let o; o = this[y] ? this[y].servername : e.servername, this[x]({ ...e, servername: o, httpSocket: i }, t); } catch (e) { e.code === `ERR_TLS_CERT_ALTNAME_INVALID` ? t(new d(e)) : t(e); } } }); } dispatch(e, t) { let n = k(e.headers); if (A(n), n && !(`host` in n) && !(`Host` in n)) { let { host: t } = new URL(e.origin); n.host = t; } return this[g].dispatch({ ...e, headers: n }, t); } #e(e) { return typeof e == `string` ? new URL(e) : e instanceof URL ? e : new URL(e.uri); } [r]() { let e = [this[g].close()]; return this[_] && e.push(this[_].close()), Promise.all(e); } [i]() { let e = [this[g].destroy()]; return this[_] && e.push(this[_].destroy()), Promise.all(e); } }; function k(e) { if (Array.isArray(e)) { let t = {}; for (let n = 0; n < e.length; n += 2) t[e[n]] = e[n + 1]; return t; } return e; } function A(e) { if (e && Object.keys(e).find((e) => e.toLowerCase() === `proxy-authorization`)) throw new l(`Proxy-Authorization should be sent in ProxyAgent constructor`); } t.exports = O; })); var De = c$3(((e, t) => { let n = G$2(), { kClose: r, kDestroy: i, kClosed: a, kDestroyed: o, kDispatch: s, kNoProxyAgent: c, kHttpProxyAgent: l, kHttpsProxyAgent: u } = I$1(), d = Ee(), f = Se(), p = { "http:": 80, "https:": 443 }; t.exports = class extends n { #e = null; #t = null; #n = null; constructor(e = {}) { super(), this.#n = e; let { httpProxy: t, httpsProxy: n, noProxy: r, ...i } = e; this[c] = new f(i); let a = t ?? process.env.http_proxy ?? process.env.HTTP_PROXY; a ? this[l] = new d({ ...i, uri: a }) : this[l] = this[c]; let o = n ?? process.env.https_proxy ?? process.env.HTTPS_PROXY; o ? this[u] = new d({ ...i, uri: o }) : this[u] = this[l], this.#a(); } [s](e, t) { let n = new URL(e.origin); return this.#r(n).dispatch(e, t); } [r]() { return Promise.all([ this[c].close(), !this[l][a] && this[l].close(), !this[u][a] && this[u].close() ]); } [i](e) { return Promise.all([ this[c].destroy(e), !this[l][o] && this[l].destroy(e), !this[u][o] && this[u].destroy(e) ]); } #r(e) { let { protocol: t, host: n, port: r } = e; return n = n.replace(/:\d*$/, ``).toLowerCase(), r = Number.parseInt(r, 10) || p[t] || 0, this.#i(n, r) ? t === `https:` ? this[u] : this[l] : this[c]; } #i(e, t) { if (this.#o && this.#a(), this.#t.length === 0) return !0; if (this.#e === `*`) return !1; for (let n = 0; n < this.#t.length; n++) { let r = this.#t[n]; if (!(r.port && r.port !== t) && (e === r.hostname || e.slice(-(r.hostname.length + 1)) === `.${r.hostname}`)) return !1; } return !0; } #a() { let e = this.#n.noProxy ?? this.#s, t = e.split(/[,\s]/), n = []; for (let e = 0; e < t.length; e++) { let r = t[e]; if (!r) continue; let i = r.match(/^(.+):(\d+)$/); n.push({ hostname: (i ? i[1] : r).replace(/^\*?\./, ``).toLowerCase(), port: i ? Number.parseInt(i[2], 10) : 0 }); } this.#e = e, this.#t = n; } get #o() { return this.#n.noProxy === void 0 ? this.#e !== this.#s : !1; } get #s() { return process.env.no_proxy ?? process.env.NO_PROXY ?? ``; } }; })); var Oe = c$3(((e, t) => { let r = p$4(`node:assert`), { kRetryHandlerDefaultRetry: i } = I$1(), { RequestRetryError: a } = R$1(), o = U$1(), { isDisturbed: s, parseRangeHeader: c, wrapRequestBody: l } = B$1(); function u(e) { let t = new Date(e).getTime(); return isNaN(t) ? 0 : t - Date.now(); } t.exports = class e { constructor(t, { dispatch: n, handler: r }) { let { retryOptions: a, ...s } = t, { retry: c, maxRetries: u, maxTimeout: d, minTimeout: f, timeoutFactor: p, methods: m, errorCodes: h, retryAfter: g, statusCodes: _, throwOnError: v } = a ?? {}; this.error = null, this.dispatch = n, this.handler = o.wrap(r), this.opts = { ...s, body: l(t.body) }, this.retryOpts = { throwOnError: v ?? !0, retry: c ?? e[i], retryAfter: g ?? !0, maxTimeout: d ?? 30 * 1e3, minTimeout: f ?? 500, timeoutFactor: p ?? 2, maxRetries: u ?? 5, methods: m ?? [ `GET`, `HEAD`, `OPTIONS`, `PUT`, `DELETE`, `TRACE` ], statusCodes: _ ?? [ 500, 502, 503, 504, 429 ], errorCodes: h ?? [ `ECONNRESET`, `ECONNREFUSED`, `ENOTFOUND`, `ENETDOWN`, `ENETUNREACH`, `EHOSTDOWN`, `EHOSTUNREACH`, `EPIPE`, `UND_ERR_SOCKET` ] }, this.retryCount = 0, this.retryCountCheckpoint = 0, this.headersSent = !1, this.start = 0, this.end = null, this.etag = null; } onResponseStartWithRetry(e, t, n, r, i) { if (this.retryOpts.throwOnError) { this.retryOpts.statusCodes.includes(t) === !1 ? (this.headersSent = !0, this.handler.onResponseStart?.(e, t, n, r)) : this.error = i; return; } if (s(this.opts.body)) { this.headersSent = !0, this.handler.onResponseStart?.(e, t, n, r); return; } function a(a) { if (a) { this.headersSent = !0, this.handler.onResponseStart?.(e, t, n, r), e.resume(); return; } this.error = i, e.resume(); } e.pause(), this.retryOpts.retry(i, { state: { counter: this.retryCount }, opts: { retryOptions: this.retryOpts, ...this.opts } }, a.bind(this)); } onRequestStart(e, t) { this.headersSent || this.handler.onRequestStart?.(e, t); } onRequestUpgrade(e, t, n, r) { this.handler.onRequestUpgrade?.(e, t, n, r); } static [i](e, { state: t, opts: n }, r) { let { statusCode: i, code: a, headers: o } = e, { method: s, retryOptions: c } = n, { maxRetries: l, minTimeout: d, maxTimeout: f, timeoutFactor: p, statusCodes: m, errorCodes: h, methods: g } = c, { counter: _ } = t; if (a && a !== `UND_ERR_REQ_RETRY` && !h.includes(a)) { r(e); return; } if (Array.isArray(g) && !g.includes(s)) { r(e); return; } if (i != null && Array.isArray(m) && !m.includes(i)) { r(e); return; } if (_ > l) { r(e); return; } let v = o?.[`retry-after`]; v &&= (v = Number(v), Number.isNaN(v) ? u(o[`retry-after`]) : v * 1e3); let y = Math.min(v > 0 ? v : d * p ** (_ - 1), f); setTimeout(() => r(null), y); } onResponseStart(e, t, n, i) { if (this.error = null, this.retryCount += 1, t >= 300) { let r = new a(`Request failed`, t, { headers: n, data: { count: this.retryCount } }); this.onResponseStartWithRetry(e, t, n, i, r); return; } if (this.headersSent) { if (t !== 206 && (this.start > 0 || t !== 200)) throw new a(`server does not support the range header and the payload was partially consumed`, t, { headers: n, data: { count: this.retryCount } }); let e = c(n[`content-range`]); if (!e) throw new a(`Content-Range mismatch`, t, { headers: n, data: { count: this.retryCount } }); if (this.etag != null && this.etag !== n.etag) throw new a(`ETag mismatch`, t, { headers: n, data: { count: this.retryCount } }); let { start: i, size: o, end: s = o ? o - 1 : null } = e; r(this.start === i, `content-range mismatch`), r(this.end == null || this.end === s, `content-range mismatch`); return; } if (this.end == null) { if (t === 206) { let a = c(n[`content-range`]); if (a == null) { this.headersSent = !0, this.handler.onResponseStart?.(e, t, n, i); return; } let { start: o, size: s, end: l = s ? s - 1 : null } = a; r(o != null && Number.isFinite(o), `content-range mismatch`), r(l != null && Number.isFinite(l), `invalid content-length`), this.start = o, this.end = l; } if (this.end == null) { let e = n[`content-length`]; this.end = e == null ? null : Number(e) - 1; } r(Number.isFinite(this.start)), r(this.end == null || Number.isFinite(this.end), `invalid content-length`), this.resume = !0, this.etag = n.etag == null ? null : n.etag, this.etag != null && this.etag[0] === `W` && this.etag[1] === `/` && (this.etag = null), this.headersSent = !0, this.handler.onResponseStart?.(e, t, n, i); } else throw new a(`Request failed`, t, { headers: n, data: { count: this.retryCount } }); } onResponseData(e, t) { this.error || (this.start += t.length, this.handler.onResponseData?.(e, t)); } onResponseEnd(e, t) { if (this.error && this.retryOpts.throwOnError) throw this.error; if (!this.error) return this.retryCount = 0, this.handler.onResponseEnd?.(e, t); this.retry(e); } retry(e) { if (this.start !== 0) { let e = { range: `bytes=${this.start}-${this.end ?? ``}` }; this.etag != null && (e[`if-match`] = this.etag), this.opts = { ...this.opts, headers: { ...this.opts.headers, ...e } }; } try { this.retryCountCheckpoint = this.retryCount, this.dispatch(this.opts, this); } catch (t) { this.handler.onResponseError?.(e, t); } } onResponseError(e, t) { if (e?.aborted || s(this.opts.body)) { this.handler.onResponseError?.(e, t); return; } function n(t) { if (!t) { this.retry(e); return; } this.handler?.onResponseError?.(e, t); } this.retryCount - this.retryCountCheckpoint > 0 ? this.retryCount = this.retryCountCheckpoint + (this.retryCount - this.retryCountCheckpoint) : this.retryCount += 1, this.retryOpts.retry(t, { state: { counter: this.retryCount }, opts: { retryOptions: this.retryOpts, ...this.opts } }, n.bind(this)); } }; })); var ke = c$3(((e, t) => { let n = W$1(), r = Oe(); t.exports = class extends n { #e = null; #t = null; constructor(e, t = {}) { super(t), this.#e = e, this.#t = t; } dispatch(e, t) { let n = new r({ ...e, retryOptions: this.#t }, { dispatch: this.#e.dispatch.bind(this.#e), handler: t }); return this.#e.dispatch(e, n); } close() { return this.#e.close(); } destroy() { return this.#e.destroy(); } }; })); var Ae = c$3(((e, t) => { let { InvalidArgumentError: n } = R$1(), r = Z$1(); t.exports = class extends r { constructor(e, t) { if (typeof e == `string` && (e = new URL(e)), e.protocol !== `http:`) throw new n(`h2c-client: Only h2c protocol is supported`); let { maxConcurrentStreams: r, pipelining: i, ...a } = t ?? {}, o = 100, s = 100; if (r != null && Number.isInteger(r) && r > 0 && (o = r), i != null && Number.isInteger(i) && i > 0 && (s = i), s > o) throw new n(`h2c-client: pipelining cannot be greater than maxConcurrentStreams`); super(e, { ...a, maxConcurrentStreams: o, pipelining: s, allowH2: !0, useH2c: !0 }); } }; })); var je = c$3(((e, t) => { let r = p$4(`node:assert`), { Readable: i } = p$4(`node:stream`), { RequestAbortedError: a, NotSupportedError: o, InvalidArgumentError: s, AbortError: c } = R$1(), l = B$1(), { ReadableStreamFrom: u } = B$1(), d = Symbol(`kConsume`), f = Symbol(`kReading`), p = Symbol(`kBody`), m = Symbol(`kAbort`), h = Symbol(`kContentType`), g = Symbol(`kContentLength`), _ = Symbol(`kUsed`), v = Symbol(`kBytesRead`), y = () => {}; var b = class extends i { constructor({ resume: e, abort: t, contentType: n = ``, contentLength: r, highWaterMark: i = 64 * 1024 }) { super({ autoDestroy: !0, read: e, highWaterMark: i }), this._readableState.dataEmitted = !1, this[m] = t, this[d] = null, this[v] = 0, this[p] = null, this[_] = !1, this[h] = n, this[g] = Number.isFinite(r) ? r : null, this[f] = !1; } _destroy(e, t) { !e && !this._readableState.endEmitted && (e = new a()), e && this[m](), this[_] ? t(e) : setImmediate(t, e); } on(e, t) { return (e === `data` || e === `readable`) && (this[f] = !0, this[_] = !0), super.on(e, t); } addListener(e, t) { return this.on(e, t); } off(e, t) { let n = super.off(e, t); return (e === `data` || e === `readable`) && (this[f] = this.listenerCount(`data`) > 0 || this.listenerCount(`readable`) > 0), n; } removeListener(e, t) { return this.off(e, t); } push(e) { return e && (this[v] += e.length, this[d]) ? (O(this[d], e), this[f] ? super.push(e) : !0) : super.push(e); } text() { return C(this, `text`); } json() { return C(this, `json`); } blob() { return C(this, `blob`); } bytes() { return C(this, `bytes`); } arrayBuffer() { return C(this, `arrayBuffer`); } async formData() { throw new o(); } get bodyUsed() { return l.isDisturbed(this); } get body() { return this[p] || (this[p] = u(this), this[d] && (this[p].getReader(), r(this[p].locked))), this[p]; } dump(e) { let t = e?.signal; if (t != null && (typeof t != `object` || !(`aborted` in t))) return Promise.reject(new s(`signal must be an AbortSignal`)); let n = e?.limit && Number.isFinite(e.limit) ? e.limit : 128 * 1024; return t?.aborted ? Promise.reject(t.reason ?? new c()) : this._readableState.closeEmitted ? Promise.resolve(null) : new Promise((e, r) => { if ((this[g] && this[g] > n || this[v] > n) && this.destroy(new c()), t) { let n = () => { this.destroy(t.reason ?? new c()); }; t.addEventListener(`abort`, n), this.on(`close`, function() { t.removeEventListener(`abort`, n), t.aborted ? r(t.reason ?? new c()) : e(null); }); } else this.on(`close`, e); this.on(`error`, y).on(`data`, () => { this[v] > n && this.destroy(); }).resume(); }); } setEncoding(e) { return Buffer.isEncoding(e) && (this._readableState.encoding = e), this; } }; function x(e) { return e[p]?.locked === !0 || e[d] !== null; } function S(e) { return l.isDisturbed(e) || x(e); } function C(e, t) { return r(!e[d]), new Promise((n, r) => { if (S(e)) { let t = e._readableState; t.destroyed && t.closeEmitted === !1 ? e.on(`error`, r).on(`close`, () => { r(TypeError(`unusable`)); }) : r(t.errored ?? TypeError(`unusable`)); } else queueMicrotask(() => { e[d] = { type: t, stream: e, resolve: n, reject: r, length: 0, body: [] }, e.on(`error`, function(e) { k(this[d], e); }).on(`close`, function() { this[d].body !== null && k(this[d], new a()); }), w(e[d]); }); }); } function w(e) { if (e.body === null) return; let { _readableState: t } = e.stream; if (t.bufferIndex) { let n = t.bufferIndex, r = t.buffer.length; for (let i = n; i < r; i++) O(e, t.buffer[i]); } else for (let n of t.buffer) O(e, n); for (t.endEmitted ? D(this[d], this._readableState.encoding) : e.stream.on(`end`, function() { D(this[d], this._readableState.encoding); }), e.stream.resume(); e.stream.read() != null;); } function T(e, t, n) { if (e.length === 0 || t === 0) return ``; let r = e.length === 1 ? e[0] : Buffer.concat(e, t), i = r.length, a = i > 2 && r[0] === 239 && r[1] === 187 && r[2] === 191 ? 3 : 0; return !n || n === `utf8` || n === `utf-8` ? r.utf8Slice(a, i) : r.subarray(a, i).toString(n); } function E(e, t) { if (e.length === 0 || t === 0) return /* @__PURE__ */ new Uint8Array(); if (e.length === 1) return new Uint8Array(e[0]); let n = new Uint8Array(Buffer.allocUnsafeSlow(t).buffer), r = 0; for (let t = 0; t < e.length; ++t) { let i = e[t]; n.set(i, r), r += i.length; } return n; } function D(e, t) { let { type: n, body: r, resolve: i, stream: a, length: o } = e; try { n === `text` ? i(T(r, o, t)) : n === `json` ? i(JSON.parse(T(r, o, t))) : n === `arrayBuffer` ? i(E(r, o).buffer) : n === `blob` ? i(new Blob(r, { type: a[h] })) : n === `bytes` && i(E(r, o)), k(e); } catch (e) { a.destroy(e); } } function O(e, t) { e.length += t.length, e.body.push(t); } function k(e, t) { e.body !== null && (t ? e.reject(t) : e.resolve(), e.type = null, e.stream = null, e.resolve = null, e.reject = null, e.length = 0, e.body = null); } t.exports = { Readable: b, chunksDecode: T }; })); var Me = c$3(((e, t) => { let r = p$4(`node:assert`), { AsyncResource: i } = p$4(`node:async_hooks`), { Readable: a } = je(), { InvalidArgumentError: o, RequestAbortedError: s } = R$1(), c = B$1(); function l() {} var u = class extends i { constructor(e, t) { if (!e || typeof e != `object`) throw new o(`invalid opts`); let { signal: n, method: r, opaque: i, body: a, onInfo: u, responseHeaders: d, highWaterMark: f } = e; try { if (typeof t != `function`) throw new o(`invalid callback`); if (f != null && (!Number.isFinite(f) || f < 0)) throw new o(`invalid highWaterMark`); if (n && typeof n.on != `function` && typeof n.addEventListener != `function`) throw new o(`signal must be an EventEmitter or EventTarget`); if (r === `CONNECT`) throw new o(`invalid method`); if (u && typeof u != `function`) throw new o(`invalid onInfo callback`); super(`UNDICI_REQUEST`); } catch (e) { throw c.isStream(a) && c.destroy(a.on(`error`, l), e), e; } this.method = r, this.responseHeaders = d || null, this.opaque = i || null, this.callback = t, this.res = null, this.abort = null, this.body = a, this.trailers = {}, this.context = null, this.onInfo = u || null, this.highWaterMark = f, this.reason = null, this.removeAbortListener = null, n?.aborted ? this.reason = n.reason ?? new s() : n && (this.removeAbortListener = c.addAbortListener(n, () => { this.reason = n.reason ?? new s(), this.res ? c.destroy(this.res.on(`error`, l), this.reason) : this.abort && this.abort(this.reason); })); } onConnect(e, t) { if (this.reason) { e(this.reason); return; } r(this.callback), this.abort = e, this.context = t; } onHeaders(e, t, n, r) { let { callback: i, opaque: o, abort: s, context: u, responseHeaders: d, highWaterMark: f } = this, p = d === `raw` ? c.parseRawHeaders(t) : c.parseHeaders(t); if (e < 200) { this.onInfo && this.onInfo({ statusCode: e, headers: p }); return; } let m = d === `raw` ? c.parseHeaders(t) : p, h = m[`content-type`], g = m[`content-length`], _ = new a({ resume: n, abort: s, contentType: h, contentLength: this.method !== `HEAD` && g ? Number(g) : null, highWaterMark: f }); if (this.removeAbortListener &&= (_.on(`close`, this.removeAbortListener), null), this.callback = null, this.res = _, i !== null) try { this.runInAsyncScope(i, null, null, { statusCode: e, statusText: r, headers: p, trailers: this.trailers, opaque: o, body: _, context: u }); } catch (e) { this.res = null, c.destroy(_.on(`error`, l), e), queueMicrotask(() => { throw e; }); } } onData(e) { return this.res.push(e); } onComplete(e) { c.parseHeaders(e, this.trailers), this.res.push(null); } onError(e) { let { res: t, callback: n, body: r, opaque: i } = this; n && (this.callback = null, queueMicrotask(() => { this.runInAsyncScope(n, null, e, { opaque: i }); })), t && (this.res = null, queueMicrotask(() => { c.destroy(t.on(`error`, l), e); })), r && (this.body = null, c.isStream(r) && (r.on(`error`, l), c.destroy(r, e))), this.removeAbortListener &&= (this.removeAbortListener(), null); } }; function d(e, t) { if (t === void 0) return new Promise((t, n) => { d.call(this, e, (e, r) => e ? n(e) : t(r)); }); try { let n = new u(e, t); this.dispatch(e, n); } catch (n) { if (typeof t != `function`) throw n; let r = e?.opaque; queueMicrotask(() => t(n, { opaque: r })); } } t.exports = d, t.exports.RequestHandler = u; })); var Ne = c$3(((e, t) => { let { addAbortListener: n } = B$1(), { RequestAbortedError: r } = R$1(), i = Symbol(`kListener`), a = Symbol(`kSignal`); function o(e) { e.abort ? e.abort(e[a]?.reason) : e.reason = e[a]?.reason ?? new r(), c(e); } function s(e, t) { if (e.reason = null, e[a] = null, e[i] = null, t) { if (t.aborted) { o(e); return; } e[a] = t, e[i] = () => { o(e); }, n(e[a], e[i]); } } function c(e) { e[a] && (`removeEventListener` in e[a] ? e[a].removeEventListener(`abort`, e[i]) : e[a].removeListener(`abort`, e[i]), e[a] = null, e[i] = null); } t.exports = { addSignal: s, removeSignal: c }; })); var Pe = c$3(((e, t) => { let r = p$4(`node:assert`), { finished: i } = p$4(`node:stream`), { AsyncResource: a } = p$4(`node:async_hooks`), { InvalidArgumentError: o, InvalidReturnValueError: s } = R$1(), c = B$1(), { addSignal: l, removeSignal: u } = Ne(); function d() {} var f = class extends a { constructor(e, t, n) { if (!e || typeof e != `object`) throw new o(`invalid opts`); let { signal: r, method: i, opaque: a, body: s, onInfo: u, responseHeaders: f } = e; try { if (typeof n != `function`) throw new o(`invalid callback`); if (typeof t != `function`) throw new o(`invalid factory`); if (r && typeof r.on != `function` && typeof r.addEventListener != `function`) throw new o(`signal must be an EventEmitter or EventTarget`); if (i === `CONNECT`) throw new o(`invalid method`); if (u && typeof u != `function`) throw new o(`invalid onInfo callback`); super(`UNDICI_STREAM`); } catch (e) { throw c.isStream(s) && c.destroy(s.on(`error`, d), e), e; } this.responseHeaders = f || null, this.opaque = a || null, this.factory = t, this.callback = n, this.res = null, this.abort = null, this.context = null, this.trailers = null, this.body = s, this.onInfo = u || null, c.isStream(s) && s.on(`error`, (e) => { this.onError(e); }), l(this, r); } onConnect(e, t) { if (this.reason) { e(this.reason); return; } r(this.callback), this.abort = e, this.context = t; } onHeaders(e, t, n, r) { let { factory: a, opaque: o, context: l, responseHeaders: u } = this, d = u === `raw` ? c.parseRawHeaders(t) : c.parseHeaders(t); if (e < 200) { this.onInfo && this.onInfo({ statusCode: e, headers: d }); return; } if (this.factory = null, a === null) return; let f = this.runInAsyncScope(a, null, { statusCode: e, headers: d, opaque: o, context: l }); if (!f || typeof f.write != `function` || typeof f.end != `function` || typeof f.on != `function`) throw new s(`expected Writable`); return i(f, { readable: !1 }, (e) => { let { callback: t, res: n, opaque: r, trailers: i, abort: a } = this; this.res = null, (e || !n?.readable) && c.destroy(n, e), this.callback = null, this.runInAsyncScope(t, null, e || null, { opaque: r, trailers: i }), e && a(); }), f.on(`drain`, n), this.res = f, (f.writableNeedDrain === void 0 ? f._writableState?.needDrain : f.writableNeedDrain) !== !0; } onData(e) { let { res: t } = this; return t ? t.write(e) : !0; } onComplete(e) { let { res: t } = this; u(this), t && (this.trailers = c.parseHeaders(e), t.end()); } onError(e) { let { res: t, callback: n, opaque: r, body: i } = this; u(this), this.factory = null, t ? (this.res = null, c.destroy(t, e)) : n && (this.callback = null, queueMicrotask(() => { this.runInAsyncScope(n, null, e, { opaque: r }); })), i && (this.body = null, c.destroy(i, e)); } }; function p(e, t, n) { if (n === void 0) return new Promise((n, r) => { p.call(this, e, t, (e, t) => e ? r(e) : n(t)); }); try { let r = new f(e, t, n); this.dispatch(e, r); } catch (t) { if (typeof n != `function`) throw t; let r = e?.opaque; queueMicrotask(() => n(t, { opaque: r })); } } t.exports = p; })); var Fe = c$3(((e, t) => { let { Readable: r, Duplex: i, PassThrough: a } = p$4(`node:stream`), o = p$4(`node:assert`), { AsyncResource: s } = p$4(`node:async_hooks`), { InvalidArgumentError: c, InvalidReturnValueError: l, RequestAbortedError: u } = R$1(), d = B$1(), { addSignal: f, removeSignal: p } = Ne(); function m() {} let h = Symbol(`resume`); var g = class extends r { constructor() { super({ autoDestroy: !0 }), this[h] = null; } _read() { let { [h]: e } = this; e && (this[h] = null, e()); } _destroy(e, t) { this._read(), t(e); } }, _ = class extends r { constructor(e) { super({ autoDestroy: !0 }), this[h] = e; } _read() { this[h](); } _destroy(e, t) { !e && !this._readableState.endEmitted && (e = new u()), t(e); } }, v = class extends s { constructor(e, t) { if (!e || typeof e != `object`) throw new c(`invalid opts`); if (typeof t != `function`) throw new c(`invalid handler`); let { signal: n, method: r, opaque: a, onInfo: o, responseHeaders: s } = e; if (n && typeof n.on != `function` && typeof n.addEventListener != `function`) throw new c(`signal must be an EventEmitter or EventTarget`); if (r === `CONNECT`) throw new c(`invalid method`); if (o && typeof o != `function`) throw new c(`invalid onInfo callback`); super(`UNDICI_PIPELINE`), this.opaque = a || null, this.responseHeaders = s || null, this.handler = t, this.abort = null, this.context = null, this.onInfo = o || null, this.req = new g().on(`error`, m), this.ret = new i({ readableObjectMode: e.objectMode, autoDestroy: !0, read: () => { let { body: e } = this; e?.resume && e.resume(); }, write: (e, t, n) => { let { req: r } = this; r.push(e, t) || r._readableState.destroyed ? n() : r[h] = n; }, destroy: (e, t) => { let { body: n, req: r, res: i, ret: a, abort: o } = this; !e && !a._readableState.endEmitted && (e = new u()), o && e && o(), d.destroy(n, e), d.destroy(r, e), d.destroy(i, e), p(this), t(e); } }).on(`prefinish`, () => { let { req: e } = this; e.push(null); }), this.res = null, f(this, n); } onConnect(e, t) { let { res: n } = this; if (this.reason) { e(this.reason); return; } o(!n, `pipeline cannot be retried`), this.abort = e, this.context = t; } onHeaders(e, t, n) { let { opaque: r, handler: i, context: a } = this; if (e < 200) { if (this.onInfo) { let n = this.responseHeaders === `raw` ? d.parseRawHeaders(t) : d.parseHeaders(t); this.onInfo({ statusCode: e, headers: n }); } return; } this.res = new _(n); let o; try { this.handler = null; let n = this.responseHeaders === `raw` ? d.parseRawHeaders(t) : d.parseHeaders(t); o = this.runInAsyncScope(i, null, { statusCode: e, headers: n, opaque: r, body: this.res, context: a }); } catch (e) { throw this.res.on(`error`, m), e; } if (!o || typeof o.on != `function`) throw new l(`expected Readable`); o.on(`data`, (e) => { let { ret: t, body: n } = this; !t.push(e) && n.pause && n.pause(); }).on(`error`, (e) => { let { ret: t } = this; d.destroy(t, e); }).on(`end`, () => { let { ret: e } = this; e.push(null); }).on(`close`, () => { let { ret: e } = this; e._readableState.ended || d.destroy(e, new u()); }), this.body = o; } onData(e) { let { res: t } = this; return t.push(e); } onComplete(e) { let { res: t } = this; t.push(null); } onError(e) { let { ret: t } = this; this.handler = null, d.destroy(t, e); } }; function y(e, t) { try { let n = new v(e, t); return this.dispatch({ ...e, body: n.req }, n), n.ret; } catch (e) { return new a().destroy(e); } } t.exports = y; })); var Ie = c$3(((e, t) => { let { InvalidArgumentError: r, SocketError: i } = R$1(), { AsyncResource: a } = p$4(`node:async_hooks`), o = p$4(`node:assert`), s = B$1(), { kHTTP2Stream: c } = I$1(), { addSignal: l, removeSignal: u } = Ne(); var d = class extends a { constructor(e, t) { if (!e || typeof e != `object`) throw new r(`invalid opts`); if (typeof t != `function`) throw new r(`invalid callback`); let { signal: n, opaque: i, responseHeaders: a } = e; if (n && typeof n.on != `function` && typeof n.addEventListener != `function`) throw new r(`signal must be an EventEmitter or EventTarget`); super(`UNDICI_UPGRADE`), this.responseHeaders = a || null, this.opaque = i || null, this.callback = t, this.abort = null, this.context = null, l(this, n); } onConnect(e, t) { if (this.reason) { e(this.reason); return; } o(this.callback), this.abort = e, this.context = null; } onHeaders() { throw new i(`bad upgrade`, null); } onUpgrade(e, t, n) { o(n[c] === !0 ? e === 200 : e === 101); let { callback: r, opaque: i, context: a } = this; u(this), this.callback = null; let l = this.responseHeaders === `raw` ? s.parseRawHeaders(t) : s.parseHeaders(t); this.runInAsyncScope(r, null, null, { headers: l, socket: n, opaque: i, context: a }); } onError(e) { let { callback: t, opaque: n } = this; u(this), t && (this.callback = null, queueMicrotask(() => { this.runInAsyncScope(t, null, e, { opaque: n }); })); } }; function f(e, t) { if (t === void 0) return new Promise((t, n) => { f.call(this, e, (e, r) => e ? n(e) : t(r)); }); try { let n = new d(e, t), r = { ...e, method: e.method || `GET`, upgrade: e.protocol || `Websocket` }; this.dispatch(r, n); } catch (n) { if (typeof t != `function`) throw n; let r = e?.opaque; queueMicrotask(() => t(n, { opaque: r })); } } t.exports = f; })); var Le = c$3(((e, t) => { let r = p$4(`node:assert`), { AsyncResource: i } = p$4(`node:async_hooks`), { InvalidArgumentError: a, SocketError: o } = R$1(), s = B$1(), { addSignal: c, removeSignal: l } = Ne(); var u = class extends i { constructor(e, t) { if (!e || typeof e != `object`) throw new a(`invalid opts`); if (typeof t != `function`) throw new a(`invalid callback`); let { signal: n, opaque: r, responseHeaders: i } = e; if (n && typeof n.on != `function` && typeof n.addEventListener != `function`) throw new a(`signal must be an EventEmitter or EventTarget`); super(`UNDICI_CONNECT`), this.opaque = r || null, this.responseHeaders = i || null, this.callback = t, this.abort = null, c(this, n); } onConnect(e, t) { if (this.reason) { e(this.reason); return; } r(this.callback), this.abort = e, this.context = t; } onHeaders() { throw new o(`bad connect`, null); } onUpgrade(e, t, n) { let { callback: r, opaque: i, context: a } = this; l(this), this.callback = null; let o = t; o != null && (o = this.responseHeaders === `raw` ? s.parseRawHeaders(t) : s.parseHeaders(t)), this.runInAsyncScope(r, null, null, { statusCode: e, headers: o, socket: n, opaque: i, context: a }); } onError(e) { let { callback: t, opaque: n } = this; l(this), t && (this.callback = null, queueMicrotask(() => { this.runInAsyncScope(t, null, e, { opaque: n }); })); } }; function d(e, t) { if (t === void 0) return new Promise((t, n) => { d.call(this, e, (e, r) => e ? n(e) : t(r)); }); try { let n = new u(e, t), r = { ...e, method: `CONNECT` }; this.dispatch(r, n); } catch (n) { if (typeof t != `function`) throw n; let r = e?.opaque; queueMicrotask(() => t(n, { opaque: r })); } } t.exports = d; })); var Re = c$3(((e, t) => { t.exports.request = Me(), t.exports.stream = Pe(), t.exports.pipeline = Fe(), t.exports.upgrade = Ie(), t.exports.connect = Le(); })); var ze = c$3(((e, t) => { let { UndiciError: n } = R$1(), r = Symbol.for(`undici.error.UND_MOCK_ERR_MOCK_NOT_MATCHED`); t.exports = { MockNotMatchedError: class extends n { constructor(e) { super(e), this.name = `MockNotMatchedError`, this.message = e || `The request does not match any registered mock dispatches`, this.code = `UND_MOCK_ERR_MOCK_NOT_MATCHED`; } static [Symbol.hasInstance](e) { return e && e[r] === !0; } get [r]() { return !0; } } }; })); var Be = c$3(((e, t) => { t.exports = { kAgent: Symbol(`agent`), kOptions: Symbol(`options`), kFactory: Symbol(`factory`), kDispatches: Symbol(`dispatches`), kDispatchKey: Symbol(`dispatch key`), kDefaultHeaders: Symbol(`default headers`), kDefaultTrailers: Symbol(`default trailers`), kContentLength: Symbol(`content length`), kMockAgent: Symbol(`mock agent`), kMockAgentSet: Symbol(`mock agent set`), kMockAgentGet: Symbol(`mock agent get`), kMockDispatch: Symbol(`mock dispatch`), kClose: Symbol(`close`), kOriginalClose: Symbol(`original agent close`), kOriginalDispatch: Symbol(`original dispatch`), kOrigin: Symbol(`origin`), kIsMockActive: Symbol(`is mock active`), kNetConnect: Symbol(`net connect`), kGetNetConnect: Symbol(`get net connect`), kConnected: Symbol(`connected`), kIgnoreTrailingSlash: Symbol(`ignore trailing slash`), kMockAgentMockCallHistoryInstance: Symbol(`mock agent mock call history name`), kMockAgentRegisterCallHistory: Symbol(`mock agent register mock call history`), kMockAgentAddCallHistoryLog: Symbol(`mock agent add call history log`), kMockAgentIsCallHistoryEnabled: Symbol(`mock agent is call history enabled`), kMockAgentAcceptsNonStandardSearchParameters: Symbol(`mock agent accepts non standard search parameters`), kMockCallHistoryAddLog: Symbol(`mock call history add log`), kTotalDispatchCount: Symbol(`total dispatch count`) }; })); var Ve = c$3(((e, t) => { let { MockNotMatchedError: r } = ze(), { kDispatches: i, kMockAgent: a, kOriginalDispatch: o, kOrigin: s, kGetNetConnect: c, kTotalDispatchCount: l } = Be(), { serializePathWithQuery: u } = B$1(), { STATUS_CODES: d } = p$4(`node:http`), { types: { isPromise: f } } = p$4(`node:util`), { InvalidArgumentError: p } = R$1(); function m(e, t) { return typeof e == `string` ? e === t : e instanceof RegExp ? e.test(t) : typeof e == `function` ? e(t) === !0 : !1; } function h(e) { return Object.fromEntries(Object.entries(e).map(([e, t]) => [e.toLocaleLowerCase(), t])); } function g(e, t) { if (Array.isArray(e)) { for (let n = 0; n < e.length; n += 2) if (e[n].toLocaleLowerCase() === t.toLocaleLowerCase()) return e[n + 1]; return; } else if (typeof e.get == `function`) return e.get(t); else return h(e)[t.toLocaleLowerCase()]; } function _(e) { let t = e.slice(), n = []; for (let e = 0; e < t.length; e += 2) n.push([t[e], t[e + 1]]); return Object.fromEntries(n); } function v(e, t) { if (typeof e.headers == `function`) return Array.isArray(t) && (t = _(t)), e.headers(t ? h(t) : {}); if (e.headers === void 0) return !0; if (typeof t != `object` || typeof e.headers != `object`) return !1; for (let [n, r] of Object.entries(e.headers)) if (!m(r, g(t, n))) return !1; return !0; } function y(e) { if (typeof e != `string`) return e; let t = new URLSearchParams(e), n = new URLSearchParams(); for (let [e, r] of t.entries()) { if (e = e.replace(`[]`, ``), /^(['"]).*\1$/.test(r)) { n.append(e, r); continue; } if (r.includes(`,`)) { let t = r.split(`,`); for (let r of t) n.append(e, r); continue; } n.append(e, r); } return n; } function b(e) { if (typeof e != `string`) return e; let t = e.split(`?`, 3); if (t.length !== 2) return e; let n = new URLSearchParams(t.pop()); return n.sort(), [...t, n.toString()].join(`?`); } function x(e, { path: t, method: n, body: r, headers: i }) { let a = m(e.path, t), o = m(e.method, n), s = e.body === void 0 ? !0 : m(e.body, r), c = v(e, i); return a && o && s && c; } function S(e) { return Buffer.isBuffer(e) || e instanceof Uint8Array || e instanceof ArrayBuffer ? e : typeof e == `object` ? JSON.stringify(e) : e ? e.toString() : ``; } function C(e, t) { let n = t.query ? u(t.path, t.query) : t.path, i = typeof n == `string` ? b(n) : n, a = E(i), o = e.filter(({ consumed: e }) => !e).filter(({ path: e, ignoreTrailingSlash: t }) => t ? m(E(b(e)), a) : m(b(e), i)); if (o.length === 0) throw new r(`Mock dispatch not matched for path '${i}'`); if (o = o.filter(({ method: e }) => m(e, t.method)), o.length === 0) throw new r(`Mock dispatch not matched for method '${t.method}' on path '${i}'`); if (o = o.filter(({ body: e }) => e === void 0 ? !0 : m(e, t.body)), o.length === 0) throw new r(`Mock dispatch not matched for body '${t.body}' on path '${i}'`); if (o = o.filter((e) => v(e, t.headers)), o.length === 0) throw new r(`Mock dispatch not matched for headers '${typeof t.headers == `object` ? JSON.stringify(t.headers) : t.headers}' on path '${i}'`); return o[0]; } function w(e, t, n, r) { let i = { timesInvoked: 0, times: 1, persist: !1, consumed: !1, ...r }, a = typeof n == `function` ? { callback: n } : { ...n }, o = { ...i, ...t, pending: !0, data: { error: null, ...a } }; return e.push(o), e[l] = (e[l] || 0) + 1, o; } function T(e, t) { let n = e.findIndex((e) => e.consumed ? x(e, t) : !1); n !== -1 && e.splice(n, 1); } function E(e) { for (; e.endsWith(`/`);) e = e.slice(0, -1); return e.length === 0 && (e = `/`), e; } function D(e) { let { path: t, method: n, body: r, headers: i, query: a } = e; return { path: t, method: n, body: r, headers: i, query: a }; } function O(e) { let t = Object.keys(e), n = []; for (let r = 0; r < t.length; ++r) { let i = t[r], a = e[i], o = Buffer.from(`${i}`); if (Array.isArray(a)) for (let e = 0; e < a.length; ++e) n.push(o, Buffer.from(`${a[e]}`)); else n.push(o, Buffer.from(`${a}`)); } return n; } function k(e) { return d[e] || `unknown`; } async function A(e) { let t = []; for await (let n of e) t.push(n); return Buffer.concat(t).toString(`utf8`); } function j(e, t) { let n = D(e), r = C(this[i], n); r.timesInvoked++, r.data.callback && (r.data = { ...r.data, ...r.data.callback(e) }); let { data: { statusCode: a, data: o, headers: s, trailers: c, error: l }, delay: u, persist: d } = r, { timesInvoked: p, times: m } = r; if (r.consumed = !d && p >= m, r.pending = p < m, l !== null) return T(this[i], n), t.onError(l), !0; let h = !1, g = null; function v(e) { h || (h = !0, g !== null && (clearTimeout(g), g = null), t.onError(e)); } t.onConnect?.(v, null), typeof u == `number` && u > 0 ? g = setTimeout(() => { g = null, y(this[i]); }, u) : y(this[i]); function y(r, i = o) { if (h) return; let l = Array.isArray(e.headers) ? _(e.headers) : e.headers, u = typeof i == `function` ? i({ ...e, headers: l }) : i; if (f(u)) return u.then((e) => y(r, e)); if (h) return; let d = S(u), p = O(s), m = O(c); t.onHeaders?.(a, p, b, k(a)), t.onData?.(Buffer.from(d)), t.onComplete?.(m), T(r, n); } function b() {} return !0; } function M() { let e = this[a], t = this[s], n = this[o]; return function(a, o) { if (e.isMockActive) try { j.call(this, a, o); } catch (s) { if (s.code === `UND_MOCK_ERR_MOCK_NOT_MATCHED`) { let u = e[c](), d = this[i][l] || this[i].length, f = `, ${this[i].filter(({ consumed: e }) => !e).length} interceptor(s) remaining out of ${d} defined`; if (u === !1) throw new r(`${s.message}: subsequent request to origin ${t} was not allowed (net.connect disabled)${f}`); if (N(u, t)) n.call(this, a, o); else throw new r(`${s.message}: subsequent request to origin ${t} was not allowed (net.connect is not enabled for this origin)${f}`); } else throw s; } else n.call(this, a, o); }; } function N(e, t) { let n = new URL(t); return e === !0 ? !0 : !!(Array.isArray(e) && e.some((e) => m(e, n.host))); } function P(e) { return typeof e != `string` && !(e instanceof URL) ? e : e instanceof URL ? e.origin : e.toLowerCase(); } function F(e) { let { agent: t, ...n } = e; if (`enableCallHistory` in n && typeof n.enableCallHistory != `boolean`) throw new p(`options.enableCallHistory must to be a boolean`); if (`acceptNonStandardSearchParameters` in n && typeof n.acceptNonStandardSearchParameters != `boolean`) throw new p(`options.acceptNonStandardSearchParameters must to be a boolean`); if (`ignoreTrailingSlash` in n && typeof n.ignoreTrailingSlash != `boolean`) throw new p(`options.ignoreTrailingSlash must to be a boolean`); return n; } t.exports = { getResponseData: S, getMockDispatch: C, addMockDispatch: w, deleteMockDispatch: T, buildKey: D, generateKeyValues: O, matchValue: m, getResponse: A, getStatusText: k, mockDispatch: j, buildMockDispatch: M, checkNetConnect: N, buildAndValidateMockOptions: F, getHeaderByName: g, buildHeadersFromArray: _, normalizeSearchParams: y, normalizeOrigin: P }; })); var He = c$3(((e, t) => { let { getResponseData: n, buildKey: r, addMockDispatch: i } = Ve(), { kDispatches: a, kDispatchKey: o, kDefaultHeaders: s, kDefaultTrailers: c, kContentLength: l, kMockDispatch: u, kIgnoreTrailingSlash: d } = Be(), { InvalidArgumentError: f } = R$1(), { serializePathWithQuery: p } = B$1(); var m = class { constructor(e) { this[u] = e; } delay(e) { if (typeof e != `number` || !Number.isInteger(e) || e <= 0) throw new f(`waitInMs must be a valid integer > 0`); return this[u].delay = e, this; } persist() { return this[u].persist = !0, this; } times(e) { if (typeof e != `number` || !Number.isInteger(e) || e <= 0) throw new f(`repeatTimes must be a valid integer > 0`); return this[u].times = e, this; } }, h = class { constructor(e, t) { if (typeof e != `object`) throw new f(`opts must be an object`); if (e.path === void 0) throw new f(`opts.path must be defined`); if (e.method === void 0 && (e.method = `GET`), typeof e.path == `string`) if (e.query) e.path = p(e.path, e.query); else { let t = new URL(e.path, `data://`); e.path = t.pathname + t.search; } typeof e.method == `string` && (e.method = e.method.toUpperCase()), this[o] = r(e), this[a] = t, this[d] = e.ignoreTrailingSlash ?? !1, this[s] = {}, this[c] = {}, this[l] = !1; } createMockScopeDispatchData({ statusCode: e, data: t, responseOptions: r }) { let i = n(t), a = this[l] ? { "content-length": i.length } : {}; return { statusCode: e, data: t, headers: { ...this[s], ...a, ...r.headers }, trailers: { ...this[c], ...r.trailers } }; } validateReplyParameters(e) { if (e.statusCode === void 0) throw new f(`statusCode must be defined`); if (typeof e.responseOptions != `object` || e.responseOptions === null) throw new f(`responseOptions must be an object`); } reply(e) { if (typeof e == `function`) return new m(i(this[a], this[o], (t) => { let n = e(t); if (typeof n != `object` || !n) throw new f(`reply options callback must return an object`); let r = { data: ``, responseOptions: {}, ...n }; return this.validateReplyParameters(r), { ...this.createMockScopeDispatchData(r) }; }, { ignoreTrailingSlash: this[d] })); let t = { statusCode: e, data: arguments[1] === void 0 ? `` : arguments[1], responseOptions: arguments[2] === void 0 ? {} : arguments[2] }; this.validateReplyParameters(t); let n = this.createMockScopeDispatchData(t); return new m(i(this[a], this[o], n, { ignoreTrailingSlash: this[d] })); } replyWithError(e) { if (e === void 0) throw new f(`error must be defined`); return new m(i(this[a], this[o], { error: e }, { ignoreTrailingSlash: this[d] })); } defaultReplyHeaders(e) { if (e === void 0) throw new f(`headers must be defined`); return this[s] = e, this; } defaultReplyTrailers(e) { if (e === void 0) throw new f(`trailers must be defined`); return this[c] = e, this; } replyContentLength() { return this[l] = !0, this; } }; t.exports.MockInterceptor = h, t.exports.MockScope = m; })); var Ue = c$3(((e, t) => { let { promisify: r } = p$4(`node:util`), i = Z$1(), { buildMockDispatch: a } = Ve(), { kDispatches: o, kMockAgent: s, kClose: c, kOriginalClose: l, kOrigin: u, kOriginalDispatch: d, kConnected: f, kIgnoreTrailingSlash: p } = Be(), { MockInterceptor: m } = He(), h = I$1(), { InvalidArgumentError: g } = R$1(); t.exports = class extends i { constructor(e, t) { if (!t || !t.agent || typeof t.agent.dispatch != `function`) throw new g(`Argument opts.agent must implement Agent`); super(e, t), this[s] = t.agent, this[u] = e, this[p] = t.ignoreTrailingSlash ?? !1, this[o] = [], this[f] = 1, this[d] = this.dispatch, this[l] = this.close.bind(this), this.dispatch = a.call(this), this.close = this[c]; } get [h.kConnected]() { return this[f]; } intercept(e) { return new m(e && { ignoreTrailingSlash: this[p], ...e }, this[o]); } cleanMocks() { this[o] = []; } async [c]() { await r(this[l])(), this[f] = 0, this[s][h.kClients].delete(this[u]); } }; })); var We = c$3(((e, t) => { let { kMockCallHistoryAddLog: n } = Be(), { InvalidArgumentError: r } = R$1(); function i(e, t, n, i, a) { switch (t.operator) { case `OR`: return i.push(...n(e, a)), i; case `AND`: return n(e, i); default: throw new r(`options.operator must to be a case insensitive string equal to 'OR' or 'AND'`); } } function a(e = {}) { let t = {}; if (`operator` in e) { if (typeof e.operator != `string` || e.operator.toUpperCase() !== `OR` && e.operator.toUpperCase() !== `AND`) throw new r(`options.operator must to be a case insensitive string equal to 'OR' or 'AND'`); return { ...t, operator: e.operator.toUpperCase() }; } return t; } function o(e) { return (t, n) => { if (typeof t == `string` || t == null) return n.filter((n) => n[e] === t); if (t instanceof RegExp) return n.filter((n) => t.test(n[e])); throw new r(`${e} parameter should be one of string, regexp, undefined or null`); }; } function s(e) { try { let t = new URL(e.path, e.origin); return t.search.length === 0 && (t.search = new URLSearchParams(e.query).toString()), t; } catch (e) { throw new r(`An error occurred when computing MockCallHistoryLog.url`, { cause: e }); } } var c = class { constructor(e = {}) { this.body = e.body, this.headers = e.headers, this.method = e.method; let t = s(e); this.fullUrl = t.toString(), this.origin = t.origin, this.path = t.pathname, this.searchParams = Object.fromEntries(t.searchParams), this.protocol = t.protocol, this.host = t.host, this.port = t.port, this.hash = t.hash; } toMap() { return /* @__PURE__ */ new Map([ [`protocol`, this.protocol], [`host`, this.host], [`port`, this.port], [`origin`, this.origin], [`path`, this.path], [`hash`, this.hash], [`searchParams`, this.searchParams], [`fullUrl`, this.fullUrl], [`method`, this.method], [`body`, this.body], [`headers`, this.headers] ]); } toString() { let e = { betweenKeyValueSeparator: `->`, betweenPairSeparator: `|` }, t = ``; return this.toMap().forEach((n, r) => { (typeof n == `string` || n == null) && (t = `${t}${r}${e.betweenKeyValueSeparator}${n}${e.betweenPairSeparator}`), (typeof n == `object` && n || Array.isArray(n)) && (t = `${t}${r}${e.betweenKeyValueSeparator}${JSON.stringify(n)}${e.betweenPairSeparator}`); }), t.slice(0, -1); } }, l = class { logs = []; calls() { return this.logs; } firstCall() { return this.logs.at(0); } lastCall() { return this.logs.at(-1); } nthCall(e) { if (typeof e != `number`) throw new r(`nthCall must be called with a number`); if (!Number.isInteger(e)) throw new r(`nthCall must be called with an integer`); if (Math.sign(e) !== 1) throw new r(`nthCall must be called with a positive value. use firstCall or lastCall instead`); return this.logs.at(e - 1); } filterCalls(e, t) { if (this.logs.length === 0) return this.logs; if (typeof e == `function`) return this.logs.filter(e); if (e instanceof RegExp) return this.logs.filter((t) => e.test(t.toString())); if (typeof e == `object` && e) { if (Object.keys(e).length === 0) return this.logs; let n = { operator: `OR`, ...a(t) }, r = n.operator === `AND` ? this.logs : []; return `protocol` in e && (r = i(e.protocol, n, this.filterCallsByProtocol, r, this.logs)), `host` in e && (r = i(e.host, n, this.filterCallsByHost, r, this.logs)), `port` in e && (r = i(e.port, n, this.filterCallsByPort, r, this.logs)), `origin` in e && (r = i(e.origin, n, this.filterCallsByOrigin, r, this.logs)), `path` in e && (r = i(e.path, n, this.filterCallsByPath, r, this.logs)), `hash` in e && (r = i(e.hash, n, this.filterCallsByHash, r, this.logs)), `fullUrl` in e && (r = i(e.fullUrl, n, this.filterCallsByFullUrl, r, this.logs)), `method` in e && (r = i(e.method, n, this.filterCallsByMethod, r, this.logs)), [...new Set(r)]; } throw new r(`criteria parameter should be one of function, regexp, or object`); } filterCallsByProtocol = o.call(this, `protocol`); filterCallsByHost = o.call(this, `host`); filterCallsByPort = o.call(this, `port`); filterCallsByOrigin = o.call(this, `origin`); filterCallsByPath = o.call(this, `path`); filterCallsByHash = o.call(this, `hash`); filterCallsByFullUrl = o.call(this, `fullUrl`); filterCallsByMethod = o.call(this, `method`); clear() { this.logs = []; } [n](e) { let t = new c(e); return this.logs.push(t), t; } *[Symbol.iterator]() { for (let e of this.calls()) yield e; } }; t.exports.MockCallHistory = l, t.exports.MockCallHistoryLog = c; })); var Ge = c$3(((e, t) => { let { promisify: r } = p$4(`node:util`), i = ye(), { buildMockDispatch: a } = Ve(), { kDispatches: o, kMockAgent: s, kClose: c, kOriginalClose: l, kOrigin: u, kOriginalDispatch: d, kConnected: f, kIgnoreTrailingSlash: p } = Be(), { MockInterceptor: m } = He(), h = I$1(), { InvalidArgumentError: g } = R$1(); t.exports = class extends i { constructor(e, t) { if (!t || !t.agent || typeof t.agent.dispatch != `function`) throw new g(`Argument opts.agent must implement Agent`); super(e, t), this[s] = t.agent, this[u] = e, this[p] = t.ignoreTrailingSlash ?? !1, this[o] = [], this[f] = 1, this[d] = this.dispatch, this[l] = this.close.bind(this), this.dispatch = a.call(this), this.close = this[c]; } get [h.kConnected]() { return this[f]; } intercept(e) { return new m(e && { ignoreTrailingSlash: this[p], ...e }, this[o]); } cleanMocks() { this[o] = []; } async [c]() { await r(this[l])(), this[f] = 0, this[s][h.kClients].delete(this[u]); } }; })); var Ke = c$3(((e, t) => { let { Transform: r } = p$4(`node:stream`), { Console: i } = p$4(`node:console`), a = process.versions.icu ? `✅` : `Y `, o = process.versions.icu ? `❌` : `N `; t.exports = class { constructor({ disableColors: e } = {}) { this.transform = new r({ transform(e, t, n) { n(null, e); } }), this.logger = new i({ stdout: this.transform, inspectOptions: { colors: !e && !process.env.CI } }); } format(e) { let t = e.map(({ method: e, path: t, data: { statusCode: n }, persist: r, times: i, timesInvoked: s, origin: c }) => ({ Method: e, Origin: c, Path: t, "Status code": n, Persistent: r ? a : o, Invocations: s, Remaining: r ? Infinity : i - s })); return this.logger.table(t), this.transform.read().toString(); } }; })); var qe = c$3(((e, t) => { let { kClients: n } = I$1(), r = Se(), { kAgent: i, kMockAgentSet: a, kMockAgentGet: o, kDispatches: s, kIsMockActive: c, kNetConnect: l, kGetNetConnect: u, kOptions: d, kFactory: f, kMockAgentRegisterCallHistory: p, kMockAgentIsCallHistoryEnabled: m, kMockAgentAddCallHistoryLog: h, kMockAgentMockCallHistoryInstance: g, kMockAgentAcceptsNonStandardSearchParameters: _, kMockCallHistoryAddLog: v, kIgnoreTrailingSlash: y } = Be(), b = Ue(), x = Ge(), { matchValue: S, normalizeSearchParams: C, buildAndValidateMockOptions: w, normalizeOrigin: T } = Ve(), { InvalidArgumentError: E, UndiciError: D } = R$1(), O = W$1(), k = Ke(), { MockCallHistory: A } = We(); t.exports = class extends O { constructor(e = {}) { super(e); let t = w(e); if (this[l] = !0, this[c] = !0, this[m] = t.enableCallHistory ?? !1, this[_] = t.acceptNonStandardSearchParameters ?? !1, this[y] = t.ignoreTrailingSlash ?? !1, e?.agent && typeof e.agent.dispatch != `function`) throw new E(`Argument opts.agent must implement Agent`); let a = e?.agent ? e.agent : new r(e); this[i] = a, this[n] = a[n], this[d] = t, this[m] && this[p](); } get(e) { let t = T(e), n = this[y] ? t.replace(/\/$/, ``) : t, r = this[o](n); return r || (r = this[f](n), this[a](n, r)), r; } dispatch(e, t) { e.origin = T(e.origin), this.get(e.origin), this[h](e); let n = this[_], r = { ...e }; if (n && r.path) { let [e, t] = r.path.split(`?`); r.path = `${e}?${C(t, n)}`; } return this[i].dispatch(r, t); } async close() { this.clearCallHistory(), await this[i].close(), this[n].clear(); } deactivate() { this[c] = !1; } activate() { this[c] = !0; } enableNetConnect(e) { if (typeof e == `string` || typeof e == `function` || e instanceof RegExp) Array.isArray(this[l]) ? this[l].push(e) : this[l] = [e]; else if (e === void 0) this[l] = !0; else throw new E(`Unsupported matcher. Must be one of String|Function|RegExp.`); } disableNetConnect() { this[l] = !1; } enableCallHistory() { return this[m] = !0, this; } disableCallHistory() { return this[m] = !1, this; } getCallHistory() { return this[g]; } clearCallHistory() { this[g] !== void 0 && this[g].clear(); } get isMockActive() { return this[c]; } [p]() { this[g] === void 0 && (this[g] = new A()); } [h](e) { this[m] && (this[p](), this[g][v](e)); } [a](e, t) { this[n].set(e, { count: 0, dispatcher: t }); } [f](e) { let t = Object.assign({ agent: this }, this[d]); return this[d] && this[d].connections === 1 ? new b(e, t) : new x(e, t); } [o](e) { let t = this[n].get(e); if (t?.dispatcher) return t.dispatcher; if (typeof e != `string`) { let t = this[f](`http://localhost:9999`); return this[a](e, t), t; } for (let [t, r] of Array.from(this[n])) if (r && typeof t != `string` && S(t, e)) { let t = this[f](e); return this[a](e, t), t[s] = r.dispatcher[s], t; } } [u]() { return this[l]; } pendingInterceptors() { let e = this[n]; return Array.from(e.entries()).flatMap(([e, t]) => t.dispatcher[s].map((t) => ({ ...t, origin: e }))).filter(({ pending: e }) => e); } assertNoPendingInterceptors({ pendingInterceptorsFormatter: e = new k() } = {}) { let t = this.pendingInterceptors(); if (t.length !== 0) throw new D(t.length === 1 ? `1 interceptor is pending:\n\n${e.format(t)}`.trim() : `${t.length} interceptors are pending:\n\n${e.format(t)}`.trim()); } }; })); var Je = c$3(((e, t) => { let { InvalidArgumentError: r } = R$1(), { runtimeFeatures: i } = ue(); function a(e = {}) { let { ignoreHeaders: t = [], excludeHeaders: n = [], matchHeaders: r = [], caseSensitive: i = !1 } = e; return { ignore: new Set(t.map((e) => i ? e : e.toLowerCase())), exclude: new Set(n.map((e) => i ? e : e.toLowerCase())), match: new Set(r.map((e) => i ? e : e.toLowerCase())) }; } let o = i.has(`crypto`) ? p$4(`node:crypto`) : null, s = o?.hash ? (e) => o.hash(`sha256`, e, `base64url`) : (e) => Buffer.from(e).toString(`base64url`); function c(e) { return Array.isArray(e) && (e.length & 1) == 0; } function l(e = []) { return e.length === 0 ? () => !1 : function(t) { let n; for (let r of e) if (typeof r == `string`) { if (n ||= t.toLowerCase(), n.includes(r.toLowerCase())) return !0; } else if (r instanceof RegExp && r.test(t)) return !0; return !1; }; } function u(e) { let t = {}; if (!e) return t; if (c(e)) { for (let n = 0; n < e.length; n += 2) { let r = e[n], i = e[n + 1]; if (r && i !== void 0) { let e = Buffer.isBuffer(r) ? r.toString() : r, n = Buffer.isBuffer(i) ? i.toString() : i; t[e.toLowerCase()] = n; } } return t; } if (e && typeof e == `object`) for (let [n, r] of Object.entries(e)) n && typeof n == `string` && (t[n.toLowerCase()] = Array.isArray(r) ? r.join(`, `) : String(r)); return t; } let d = [ `record`, `playback`, `update` ]; function f(e) { if (!d.includes(e)) throw new r(`Invalid snapshot mode: ${e}. Must be one of: ${d.join(`, `)}`); } t.exports = { createHeaderFilters: a, hashId: s, isUndiciHeaders: c, normalizeHeaders: u, isUrlExcludedFactory: l, validateSnapshotMode: f }; })); var Ye = c$3(((e, t) => { let { writeFile: r, readFile: i, mkdir: a } = p$4(`node:fs/promises`), { dirname: o, resolve: s } = p$4(`node:path`), { setTimeout: c, clearTimeout: l } = p$4(`node:timers`), { InvalidArgumentError: u, UndiciError: d } = R$1(), { hashId: f, isUrlExcludedFactory: p, normalizeHeaders: m, createHeaderFilters: h } = Je(); function g(e, t, n = {}) { let r = new URL(e.path, e.origin), i = e._normalizedHeaders || m(e.headers); return e._normalizedHeaders ||= i, { method: e.method || `GET`, url: n.matchQuery === !1 ? `${r.origin}${r.pathname}` : r.toString(), headers: _(i, t, n), body: n.matchBody !== !1 && e.body ? String(e.body) : `` }; } function _(e, t, n = {}) { if (!e || typeof e != `object`) return {}; let { caseSensitive: r = !1 } = n, i = {}, { ignore: a, exclude: o, match: s } = t; for (let [t, n] of Object.entries(e)) { let e = r ? t : t.toLowerCase(); o.has(e) || a.has(e) || s.size !== 0 && !s.has(e) || (i[e] = n); } return i; } function v(e, t, n = {}) { if (!e || typeof e != `object`) return {}; let { caseSensitive: r = !1 } = n, i = {}, { exclude: a } = t; for (let [t, n] of Object.entries(e)) { let e = r ? t : t.toLowerCase(); a.has(e) || (i[e] = n); } return i; } function y(e) { let t = [e.method, e.url]; if (e.headers && typeof e.headers == `object`) { let n = Object.keys(e.headers).sort(); for (let r of n) { let n = Array.isArray(e.headers[r]) ? e.headers[r] : [e.headers[r]]; t.push(r); for (let e of n.sort()) t.push(String(e)); } } return t.push(e.body), f(t.join(`|`)); } t.exports = { SnapshotRecorder: class { #e; #t; #n = /* @__PURE__ */ new Map(); #r; #i = Infinity; #a = !1; #o; constructor(e = {}) { this.#r = e.snapshotPath, this.#i = e.maxSnapshots || Infinity, this.#a = e.autoFlush || !1, this.flushInterval = e.flushInterval || 3e4, this._flushTimer = null, this.matchOptions = { matchHeaders: e.matchHeaders || [], ignoreHeaders: e.ignoreHeaders || [], excludeHeaders: e.excludeHeaders || [], matchBody: e.matchBody !== !1, matchQuery: e.matchQuery !== !1, caseSensitive: e.caseSensitive || !1 }, this.#o = h(this.matchOptions), this.shouldRecord = e.shouldRecord || (() => !0), this.shouldPlayback = e.shouldPlayback || (() => !0), this.#t = p(e.excludeUrls), this.#a && this.#r && this.#s(); } async record(e, t) { if (!this.shouldRecord(e) || this.isUrlExcluded(e)) return; let n = g(e, this.#o, this.matchOptions), r = y(n), i = m(t.headers), a = { statusCode: t.statusCode, headers: v(i, this.#o, this.matchOptions), body: Buffer.isBuffer(t.body) ? t.body.toString(`base64`) : Buffer.from(String(t.body || ``)).toString(`base64`), trailers: t.trailers }; if (this.#n.size >= this.#i && !this.#n.has(r)) { let e = this.#n.keys().next().value; this.#n.delete(e); } let o = this.#n.get(r); o && o.responses ? (o.responses.push(a), o.timestamp = (/* @__PURE__ */ new Date()).toISOString()) : this.#n.set(r, { request: n, responses: [a], callCount: 0, timestamp: (/* @__PURE__ */ new Date()).toISOString() }), this.#a && this.#r && this.#l(); } isUrlExcluded(e) { let t = new URL(e.path, e.origin).toString(); return this.#t(t); } findSnapshot(e) { if (!this.shouldPlayback(e) || this.isUrlExcluded(e)) return; let t = y(g(e, this.#o, this.matchOptions)), n = this.#n.get(t); if (!n) return; let r = n.callCount || 0, i = Math.min(r, n.responses.length - 1); return n.callCount = r + 1, { ...n, response: n.responses[i] }; } async loadSnapshots(e) { let t = e || this.#r; if (!t) throw new u(`Snapshot path is required`); try { let e = await i(s(t), `utf8`), n = JSON.parse(e); if (Array.isArray(n)) { this.#n.clear(); for (let { hash: e, snapshot: t } of n) this.#n.set(e, t); } else this.#n = new Map(Object.entries(n)); } catch (e) { if (e.code === `ENOENT`) this.#n.clear(); else throw new d(`Failed to load snapshots from ${t}`, { cause: e }); } } async saveSnapshots(e) { let t = e || this.#r; if (!t) throw new u(`Snapshot path is required`); let n = s(t); await a(o(n), { recursive: !0 }); let i = Array.from(this.#n.entries()).map(([e, t]) => ({ hash: e, snapshot: t })); await r(n, JSON.stringify(i, null, 2), { flush: !0 }); } clear() { this.#n.clear(); } getSnapshots() { return Array.from(this.#n.values()); } size() { return this.#n.size; } resetCallCounts() { for (let e of this.#n.values()) e.callCount = 0; } deleteSnapshot(e) { let t = y(g(e, this.#o, this.matchOptions)); return this.#n.delete(t); } getSnapshotInfo(e) { let t = y(g(e, this.#o, this.matchOptions)), n = this.#n.get(t); return n ? { hash: t, request: n.request, responseCount: n.responses ? n.responses.length : +!!n.response, callCount: n.callCount || 0, timestamp: n.timestamp } : null; } replaceSnapshots(e) { if (this.#n.clear(), Array.isArray(e)) for (let { hash: t, snapshot: n } of e) this.#n.set(t, n); else e && typeof e == `object` && (this.#n = new Map(Object.entries(e))); } #s() { return this.#l(); } #c() { this.#e &&= (l(this.#e), this.saveSnapshots().catch(() => {}), null); } #l() { this.#e = c(() => { this.saveSnapshots().catch(() => {}), this.#a ? this.#e?.refresh() : this.#e = null; }, 1e3); } destroy() { this.#c(), this.#e &&= (l(this.#e), null); } async close() { this.#r && this.#n.size !== 0 && await this.saveSnapshots(), this.destroy(); } }, formatRequestKey: g, createRequestHash: y, filterHeadersForMatching: _, filterHeadersForStorage: v, createHeaderFilters: h }; })); var Xe = c$3(((e, t) => { let n = Se(), r = qe(), { SnapshotRecorder: i } = Ye(), a = U$1(), { InvalidArgumentError: o, UndiciError: s } = R$1(), { validateSnapshotMode: c } = Je(), l = Symbol(`kSnapshotRecorder`), u = Symbol(`kSnapshotMode`), d = Symbol(`kSnapshotPath`), f = Symbol(`kSnapshotLoaded`), p = Symbol(`kRealAgent`), m = !1; t.exports = class extends r { constructor(e = {}) { m ||= (process.emitWarning(`SnapshotAgent is experimental and subject to change`, `ExperimentalWarning`), !0); let { mode: t = `record`, snapshotPath: r = null, ...a } = e; if (super(a), c(t), (t === `playback` || t === `update`) && !r) throw new o(`snapshotPath is required when mode is '${t}'`); this[u] = t, this[d] = r, this[l] = new i({ snapshotPath: this[d], mode: this[u], maxSnapshots: e.maxSnapshots, autoFlush: e.autoFlush, flushInterval: e.flushInterval, matchHeaders: e.matchHeaders, ignoreHeaders: e.ignoreHeaders, excludeHeaders: e.excludeHeaders, matchBody: e.matchBody, matchQuery: e.matchQuery, caseSensitive: e.caseSensitive, shouldRecord: e.shouldRecord, shouldPlayback: e.shouldPlayback, excludeUrls: e.excludeUrls }), this[f] = !1, (this[u] === `record` || this[u] === `update` || this[u] === `playback` && e.excludeUrls && e.excludeUrls.length > 0) && (this[p] = new n(e)), (this[u] === `playback` || this[u] === `update`) && this[d] && this.loadSnapshots().catch(() => {}); } dispatch(e, t) { t = a.wrap(t); let n = this[u]; if (this[l].isUrlExcluded(e)) return this[p].dispatch(e, t); if (n === `playback` || n === `update`) { if (!this[f]) return this.#e(e, t); let r = this[l].findSnapshot(e); if (r) return this.#n(r, t); if (n === `update`) return this.#t(e, t); { let n = new s(`No snapshot found for ${e.method || `GET`} ${e.path}`); if (t.onError) { t.onError(n); return; } throw n; } } else if (n === `record`) return this.#t(e, t); } async #e(e, t) { return await this.loadSnapshots(), this.dispatch(e, t); } #t(e, t) { let n = { statusCode: null, headers: {}, trailers: {}, body: [] }, r = this; return this[p].dispatch(e, { onRequestStart(e, n) { return t.onRequestStart(e, { ...n, history: this.history }); }, onRequestUpgrade(e, n, r, i) { return t.onRequestUpgrade(e, n, r, i); }, onResponseStart(e, r, i, a) { return n.statusCode = r, n.headers = i, t.onResponseStart(e, r, i, a); }, onResponseData(e, r) { return n.body.push(r), t.onResponseData(e, r); }, onResponseEnd(i, a) { n.trailers = a; let o = Buffer.concat(n.body); r[l].record(e, { statusCode: n.statusCode, headers: n.headers, body: o, trailers: n.trailers }).then(() => t.onResponseEnd(i, a)).catch((e) => t.onResponseError(i, e)); } }); } #n(e, t) { try { let { response: n } = e, r = { pause() {}, resume() {}, abort(e) { this.aborted = !0, this.reason = e; }, aborted: !1, paused: !1 }; t.onRequestStart(r), t.onResponseStart(r, n.statusCode, n.headers); let i = Buffer.from(n.body, `base64`); t.onResponseData(r, i), t.onResponseEnd(r, n.trailers); } catch (e) { t.onError?.(e); } } async loadSnapshots(e) { await this[l].loadSnapshots(e || this[d]), this[f] = !0, this[u] === `playback` && this.#r(); } async saveSnapshots(e) { return this[l].saveSnapshots(e || this[d]); } #r() { for (let e of this[l].getSnapshots()) { let { request: t, responses: n, response: r } = e, i = new URL(t.url), a = this.get(i.origin), o = n ? n[0] : r; o && a.intercept({ path: i.pathname + i.search, method: t.method, headers: t.headers, body: t.body }).reply(o.statusCode, o.body, { headers: o.headers, trailers: o.trailers }).persist(); } } getRecorder() { return this[l]; } getMode() { return this[u]; } clearSnapshots() { this[l].clear(); } resetCallCounts() { this[l].resetCallCounts(); } deleteSnapshot(e) { return this[l].deleteSnapshot(e); } getSnapshotInfo(e) { return this[l].getSnapshotInfo(e); } replaceSnapshots(e) { this[l].replaceSnapshots(e); } async close() { await this[l].close(), await this[p]?.close(), await super.close(); } }; })); var Ze = c$3(((e, t) => { let n = Symbol.for(`undici.globalDispatcher.2`), r = Symbol.for(`undici.globalDispatcher.1`), { InvalidArgumentError: i } = R$1(), a = Se(); s() === void 0 && o(new a()); function o(e) { if (!e || typeof e.dispatch != `function`) throw new i(`Argument agent must implement Agent`); Object.defineProperty(globalThis, n, { value: e, writable: !0, enumerable: !1, configurable: !1 }), Object.defineProperty(globalThis, r, { value: e, writable: !0, enumerable: !1, configurable: !1 }); } function s() { return globalThis[r]; } t.exports = { setGlobalDispatcher: o, getGlobalDispatcher: s, installedExports: [ `fetch`, `Headers`, `Response`, `Request`, `FormData`, `WebSocket`, `CloseEvent`, `ErrorEvent`, `MessageEvent`, `EventSource` ] }; })); var Qe = c$3(((e, t) => { let r = p$4(`node:assert`), i = U$1(); t.exports = class { #e; #t = !1; #n = !1; #r = !1; constructor(e) { if (typeof e != `object` || !e) throw TypeError(`handler must be an object`); this.#e = i.wrap(e); } onRequestStart(...e) { this.#e.onRequestStart?.(...e); } onRequestUpgrade(...e) { return r(!this.#t), r(!this.#n), this.#e.onRequestUpgrade?.(...e); } onResponseStart(...e) { return r(!this.#t), r(!this.#n), r(!this.#r), this.#r = !0, this.#e.onResponseStart?.(...e); } onResponseData(...e) { return r(!this.#t), r(!this.#n), this.#e.onResponseData?.(...e); } onResponseEnd(...e) { return r(!this.#t), r(!this.#n), this.#t = !0, this.#e.onResponseEnd?.(...e); } onResponseError(...e) { return this.#n = !0, this.#e.onResponseError?.(...e); } onBodySent() {} }; })); var $e = c$3(((e, t) => { let r = B$1(), { kBodyUsed: i } = I$1(), a = p$4(`node:assert`), { InvalidArgumentError: o } = R$1(), s = p$4(`node:events`), c = [ 300, 301, 302, 303, 307, 308 ], l = Symbol(`body`), u = () => {}; var d = class { constructor(e) { this[l] = e, this[i] = !1; } async *[Symbol.asyncIterator]() { a(!this[i], `disturbed`), this[i] = !0, yield* this[l]; } }, f = class e { static buildDispatch(t, n) { if (n != null && (!Number.isInteger(n) || n < 0)) throw new o(`maxRedirections must be a positive number`); let r = t.dispatch.bind(t); return (t, i) => r(t, new e(r, n, t, i)); } constructor(e, t, n, c) { if (t != null && (!Number.isInteger(t) || t < 0)) throw new o(`maxRedirections must be a positive number`); this.dispatch = e, this.location = null; let { maxRedirections: l, ...u } = n; this.opts = u, this.maxRedirections = t, this.handler = c, this.history = [], r.isStream(this.opts.body) ? (r.bodyLength(this.opts.body) === 0 && this.opts.body.on(`data`, function() { a(!1); }), typeof this.opts.body.readableDidRead != `boolean` && (this.opts.body[i] = !1, s.prototype.on.call(this.opts.body, `data`, function() { this[i] = !0; }))) : (this.opts.body && typeof this.opts.body.pipeTo == `function` || this.opts.body && typeof this.opts.body != `string` && !ArrayBuffer.isView(this.opts.body) && r.isIterable(this.opts.body) && !r.isFormDataLike(this.opts.body)) && (this.opts.body = new d(this.opts.body)); } onRequestStart(e, t) { this.handler.onRequestStart?.(e, { ...t, history: this.history }); } onRequestUpgrade(e, t, n, r) { this.handler.onRequestUpgrade?.(e, t, n, r); } onResponseStart(e, t, n, i) { if (this.opts.throwOnMaxRedirect && this.history.length >= this.maxRedirections) throw Error(`max redirects`); if ((t === 301 || t === 302) && this.opts.method === `POST` && (this.opts.method = `GET`, r.isStream(this.opts.body) && r.destroy(this.opts.body.on(`error`, u)), this.opts.body = null), t === 303 && this.opts.method !== `HEAD` && (this.opts.method = `GET`, r.isStream(this.opts.body) && r.destroy(this.opts.body.on(`error`, u)), this.opts.body = null), this.location = this.history.length >= this.maxRedirections || r.isDisturbed(this.opts.body) || c.indexOf(t) === -1 ? null : n.location, this.opts.origin && this.history.push(new URL(this.opts.path, this.opts.origin)), !this.location) { this.handler.onResponseStart?.(e, t, n, i); return; } let { origin: a, pathname: s, search: l } = r.parseURL(new URL(this.location, this.opts.origin && new URL(this.opts.path, this.opts.origin))), d = l ? `${s}${l}` : s, f = `${a}${d}`; for (let e of this.history) if (e.toString() === f) throw new o(`Redirect loop detected. Cannot redirect to ${a}. This typically happens when using a Client or Pool with cross-origin redirects. Use an Agent for cross-origin redirects.`); this.opts.headers = m(this.opts.headers, t === 303, this.opts.origin !== a), this.opts.path = d, this.opts.origin = a, this.opts.query = null; } onResponseData(e, t) { this.location || this.handler.onResponseData?.(e, t); } onResponseEnd(e, t) { this.location ? this.dispatch(this.opts, this) : this.handler.onResponseEnd(e, t); } onResponseError(e, t) { this.handler.onResponseError?.(e, t); } }; function p(e, t, n) { if (e.length === 4) return r.headerNameToString(e) === `host`; if (t && r.headerNameToString(e).startsWith(`content-`)) return !0; if (n && (e.length === 13 || e.length === 6 || e.length === 19)) { let t = r.headerNameToString(e); return t === `authorization` || t === `cookie` || t === `proxy-authorization`; } return !1; } function m(e, t, n) { let i = []; if (Array.isArray(e)) for (let r = 0; r < e.length; r += 2) p(e[r], t, n) || i.push(e[r], e[r + 1]); else if (e && typeof e == `object`) { let a = r.hasSafeIterator(e) ? e : Object.entries(e); for (let [e, r] of a) p(e, t, n) || i.push(e, r); } else a(e == null, `headers must be an object or an array`); return i; } t.exports = f; })); var et = c$3(((e, t) => { let n = $e(); function r({ maxRedirections: e } = {}) { return (t) => function(r, i) { let { maxRedirections: a = e, ...o } = r; if (a == null || a === 0) return t(r, i); let s = { ...o }; return t(s, new n(t, a, s, i)); }; } t.exports = r; })); var tt = c$3(((e, t) => { let n = Qe(), { ResponseError: r } = R$1(); var i = class extends n { #e; #t; #n; #r; #i; constructor(e, { handler: t }) { super(t); } #a(e) { return (this.#t ?? ``).indexOf(e) === 0; } onRequestStart(e, t) { return this.#e = 0, this.#t = null, this.#n = null, this.#r = null, this.#i = ``, super.onRequestStart(e, t); } onResponseStart(e, t, n, r) { if (this.#e = t, this.#r = n, this.#t = n[`content-type`], this.#e < 400) return super.onResponseStart(e, t, n, r); (this.#a(`application/json`) || this.#a(`text/plain`)) && (this.#n = new TextDecoder(`utf-8`)); } onResponseData(e, t) { if (this.#e < 400) return super.onResponseData(e, t); this.#i += this.#n?.decode(t, { stream: !0 }) ?? ``; } onResponseEnd(e, t) { if (this.#e >= 400) { if (this.#i += this.#n?.decode(void 0, { stream: !1 }) ?? ``, this.#a(`application/json`)) try { this.#i = JSON.parse(this.#i); } catch {} let t, n = Error.stackTraceLimit; Error.stackTraceLimit = 0; try { t = new r(`Response Error`, this.#e, { body: this.#i, headers: this.#r }); } finally { Error.stackTraceLimit = n; } super.onResponseError(e, t); } else super.onResponseEnd(e, t); } onResponseError(e, t) { super.onResponseError(e, t); } }; t.exports = () => (e) => function(t, n) { return e(t, new i(t, { handler: n })); }; })); var nt = c$3(((e, t) => { let n = Oe(); t.exports = (e) => (t) => function(r, i) { return t(r, new n({ ...r, retryOptions: { ...e, ...r.retryOptions } }, { handler: i, dispatch: t })); }; })); var rt = c$3(((e, t) => { let { InvalidArgumentError: n, RequestAbortedError: r } = R$1(), i = Qe(); var a = class extends i { #e = 1024 * 1024; #t = !1; #n = 0; #r = null; aborted = !1; reason = !1; constructor({ maxSize: e, signal: t }, r) { if (e != null && (!Number.isFinite(e) || e < 1)) throw new n(`maxSize must be a number greater than 0`); super(r), this.#e = e ?? this.#e; } #i(e) { this.aborted = !0, this.reason = e; } onRequestStart(e, t) { return e.abort = this.#i.bind(this), this.#r = e, super.onRequestStart(e, t); } onResponseStart(e, t, n, i) { let a = n[`content-length`]; if (a != null && a > this.#e) throw new r(`Response size (${a}) larger than maxSize (${this.#e})`); return this.aborted === !0 ? !0 : super.onResponseStart(e, t, n, i); } onResponseError(e, t) { this.#t || (t = this.#r?.reason ?? t, super.onResponseError(e, t)); } onResponseData(e, t) { return this.#n += t.length, this.#n >= this.#e && (this.#t = !0, this.aborted === !0 ? super.onResponseError(e, this.reason) : super.onResponseEnd(e, {})), !0; } onResponseEnd(e, t) { if (!this.#t) { if (this.#r.aborted === !0) { super.onResponseError(e, this.reason); return; } super.onResponseEnd(e, t); } } }; function o({ maxSize: e } = { maxSize: 1024 * 1024 }) { return (t) => function(n, r) { let { dumpMaxSize: i = e } = n; return t(n, new a({ maxSize: i, signal: n.signal }, r)); }; } t.exports = o; })); var it = c$3(((e, t) => { let { isIP: r } = p$4(`node:net`), { lookup: i } = p$4(`node:dns`), a = Qe(), { InvalidArgumentError: o, InformationalError: s } = R$1(), c = 2 ** 31 - 1; function l(e) { let t = Object.getPrototypeOf(e); return Object.prototype.hasOwnProperty.call(e, Symbol.iterator) || t != null && t !== Object.prototype && typeof e[Symbol.iterator] == `function`; } function u(e) { return typeof e == `string` && e.toLowerCase() === `host`; } function d(e) { if (e == null) return null; if (Array.isArray(e)) { if (e.length === 0 || !Array.isArray(e[0])) return e; let t = []; for (let n of e) Array.isArray(n) && n.length === 2 ? t.push(n[0], n[1]) : t.push(n); return t; } if (typeof e == `object` && l(e)) { let t = []; for (let n of e) Array.isArray(n) && n.length === 2 ? t.push(n[0], n[1]) : t.push(n); return t; } return e; } function f(e) { if (e == null) return !1; if (Array.isArray(e)) { if (e.length === 0) return !1; for (let t = 0; t < e.length; t += 2) if (u(e[t])) return !0; return !1; } if (typeof e == `object`) { for (let t in e) if (u(t)) return !0; } return !1; } function p(e, t) { let n = d(t); return f(n) ? n : Array.isArray(n) ? [ `host`, e, ...n ] : n && typeof n == `object` ? { host: e, ...n } : { host: e }; } var m = class { #e = 0; #t = /* @__PURE__ */ new Map(); constructor(e) { this.#e = e.maxItems; } get size() { return this.#t.size; } get(e) { return this.#t.get(e) ?? null; } set(e, t) { this.#t.set(e, t); } delete(e) { this.#t.delete(e); } full() { return this.size >= this.#e; } }, h = class { #e = 0; #t = 0; dualStack = !0; affinity = null; lookup = null; pick = null; storage = null; constructor(e) { this.#e = e.maxTTL, this.#t = e.maxItems, this.dualStack = e.dualStack, this.affinity = e.affinity, this.lookup = e.lookup ?? this.#n, this.pick = e.pick ?? this.#r, this.storage = e.storage ?? new m(e); } runLookup(e, t, n) { let r = this.storage.get(e.hostname); if (r == null && this.storage.full()) { n(null, e); return; } let i = { affinity: this.affinity, dualStack: this.dualStack, lookup: this.lookup, pick: this.pick, ...t.dns, maxTTL: this.#e, maxItems: this.#t }; if (r == null) this.lookup(e, i, (t, r) => { if (t || r == null || r.length === 0) { n(t ?? new s(`No DNS entries found`)); return; } this.setRecords(e, r); let a = this.storage.get(e.hostname), o = this.pick(e, a, i.affinity), c; c = typeof o.port == `number` ? `:${o.port}` : e.port === `` ? `` : `:${e.port}`, n(null, new URL(`${e.protocol}//${o.family === 6 ? `[${o.address}]` : o.address}${c}`)); }); else { let a = this.pick(e, r, i.affinity); if (a == null) { this.storage.delete(e.hostname), this.runLookup(e, t, n); return; } let o; o = typeof a.port == `number` ? `:${a.port}` : e.port === `` ? `` : `:${e.port}`, n(null, new URL(`${e.protocol}//${a.family === 6 ? `[${a.address}]` : a.address}${o}`)); } } #n(e, t, n) { i(e.hostname, { all: !0, family: this.dualStack === !1 ? this.affinity : 0, order: `ipv4first` }, (e, t) => { if (e) return n(e); let r = /* @__PURE__ */ new Map(); for (let e of t) r.set(`${e.address}:${e.family}`, e); n(null, r.values()); }); } #r(e, t, n) { let r = null, { records: i, offset: a } = t, o; if (this.dualStack ? (n ?? (a == null || a === c ? (t.offset = 0, n = 4) : (t.offset++, n = (t.offset & 1) == 1 ? 6 : 4)), o = i[n] != null && i[n].ips.length > 0 ? i[n] : i[n === 4 ? 6 : 4]) : o = i[n], o == null || o.ips.length === 0) return r; o.offset == null || o.offset === c ? o.offset = 0 : o.offset++; let s = o.offset % o.ips.length; return r = o.ips[s] ?? null, r == null ? r : Date.now() - r.timestamp > r.ttl ? (o.ips.splice(s, 1), this.pick(e, t, n)) : r; } pickFamily(e, t) { let n = this.storage.get(e.hostname)?.records; if (!n) return null; let r = n[t]; if (!r) return null; r.offset == null || r.offset === c ? r.offset = 0 : r.offset++; let i = r.offset % r.ips.length, a = r.ips[i] ?? null; return a == null || Date.now() - a.timestamp > a.ttl && r.ips.splice(i, 1), a; } setRecords(e, t) { let n = Date.now(), r = { records: { 4: null, 6: null } }, i = this.#e; for (let e of t) { e.timestamp = n, typeof e.ttl == `number` ? (e.ttl = Math.min(e.ttl, this.#e), i = Math.min(i, e.ttl)) : e.ttl = this.#e; let t = r.records[e.family] ?? { ips: [] }; t.ips.push(e), r.records[e.family] = t; } this.storage.set(e.hostname, r, { ttl: i }); } deleteRecords(e) { this.storage.delete(e.hostname); } getHandler(e, t) { return new g(this, e, t); } }, g = class extends a { #e = null; #t = null; #n = null; #r = null; #i = null; #a = !0; constructor(e, { origin: t, handler: n, dispatch: r, newOrigin: i }, a) { super(n), this.#r = t, this.#i = i, this.#t = { ...a }, this.#e = e, this.#n = r; } onResponseError(e, t) { switch (t.code) { case `ETIMEDOUT`: case `ECONNREFUSED`: if (this.#e.dualStack) { if (!this.#a) { super.onResponseError(e, t); return; } this.#a = !1; let n = this.#i.hostname[0] === `[` ? 4 : 6, r = this.#e.pickFamily(this.#r, n); if (r == null) { super.onResponseError(e, t); return; } let i; i = typeof r.port == `number` ? `:${r.port}` : this.#r.port === `` ? `` : `:${this.#r.port}`; let a = { ...this.#t, origin: `${this.#r.protocol}//${r.family === 6 ? `[${r.address}]` : r.address}${i}`, headers: p(this.#r.host, this.#t.headers) }; this.#n(a, this); return; } super.onResponseError(e, t); break; case `ENOTFOUND`: this.#e.deleteRecords(this.#r), super.onResponseError(e, t); break; default: super.onResponseError(e, t); break; } } }; t.exports = (e) => { if (e?.maxTTL != null && (typeof e?.maxTTL != `number` || e?.maxTTL < 0)) throw new o(`Invalid maxTTL. Must be a positive number`); if (e?.maxItems != null && (typeof e?.maxItems != `number` || e?.maxItems < 1)) throw new o(`Invalid maxItems. Must be a positive number and greater than zero`); if (e?.affinity != null && e?.affinity !== 4 && e?.affinity !== 6) throw new o(`Invalid affinity. Must be either 4 or 6`); if (e?.dualStack != null && typeof e?.dualStack != `boolean`) throw new o(`Invalid dualStack. Must be a boolean`); if (e?.lookup != null && typeof e?.lookup != `function`) throw new o(`Invalid lookup. Must be a function`); if (e?.pick != null && typeof e?.pick != `function`) throw new o(`Invalid pick. Must be a function`); if (e?.storage != null && (typeof e?.storage?.get != `function` || typeof e?.storage?.set != `function` || typeof e?.storage?.full != `function` || typeof e?.storage?.delete != `function`)) throw new o(`Invalid storage. Must be a object with methods: { get, set, full, delete }`); let t = e?.dualStack ?? !0, n; n = t ? e?.affinity ?? null : e?.affinity ?? 4; let i = new h({ maxTTL: e?.maxTTL ?? 1e4, lookup: e?.lookup ?? null, pick: e?.pick ?? null, dualStack: t, affinity: n, maxItems: e?.maxItems ?? Infinity, storage: e?.storage }); return (e) => function(t, n) { let a = t.origin.constructor === URL ? t.origin : new URL(t.origin); return r(a.hostname) === 0 ? (i.runLookup(a, t, (r, o) => { if (r) return n.onResponseError(null, r); e({ ...t, servername: a.hostname, origin: o.origin, headers: p(a.host, t.headers) }, i.getHandler({ origin: a, dispatch: e, handler: n, newOrigin: o }, t)); }), !0) : e(t, n); }; }; })); var at = c$3(((e, t) => { let { safeHTTPMethods: n, pathHasQueryOrFragment: r, hasSafeIterator: i } = B$1(), { serializePathWithQuery: a } = B$1(); function o(e) { if (!e.origin) throw Error(`opts.origin is undefined`); let t = e.path || `/`; return e.query && !r(t) && (t = a(t, e.query)), { origin: e.origin.toString(), method: e.method, path: t, headers: e.headers }; } function s(e) { let t; if (e.headers == null) t = {}; else if (typeof e.headers == `object`) if (t = {}, i(e.headers)) for (let n of e.headers) { if (!Array.isArray(n)) throw Error(`opts.headers is not a valid header map`); let [e, r] = n; if (typeof e != `string` || typeof r != `string`) throw Error(`opts.headers is not a valid header map`); t[e.toLowerCase()] = r; } else for (let n of Object.keys(e.headers)) t[n.toLowerCase()] = e.headers[n]; else throw Error(`opts.headers is not an object`); return t; } function c(e) { if (typeof e != `object`) throw TypeError(`expected key to be object, got ${typeof e}`); for (let t of [ `origin`, `method`, `path` ]) if (typeof e[t] != `string`) throw TypeError(`expected key.${t} to be string, got ${typeof e[t]}`); if (e.headers !== void 0 && typeof e.headers != `object`) throw TypeError(`expected headers to be object, got ${typeof e}`); } function l(e) { if (typeof e != `object`) throw TypeError(`expected value to be object, got ${typeof e}`); for (let t of [ `statusCode`, `cachedAt`, `staleAt`, `deleteAt` ]) if (typeof e[t] != `number`) throw TypeError(`expected value.${t} to be number, got ${typeof e[t]}`); if (typeof e.statusMessage != `string`) throw TypeError(`expected value.statusMessage to be string, got ${typeof e.statusMessage}`); if (e.headers != null && typeof e.headers != `object`) throw TypeError(`expected value.rawHeaders to be object, got ${typeof e.headers}`); if (e.vary !== void 0 && typeof e.vary != `object`) throw TypeError(`expected value.vary to be object, got ${typeof e.vary}`); if (e.etag !== void 0 && typeof e.etag != `string`) throw TypeError(`expected value.etag to be string, got ${typeof e.etag}`); } function u(e) { let t = {}, n; if (Array.isArray(e)) { n = []; for (let t of e) n.push(...t.split(`,`)); } else n = e.split(`,`); for (let e = 0; e < n.length; e++) { let r = n[e].toLowerCase(), i = r.indexOf(`=`), a, o; switch (i === -1 ? a = r.trim() : (a = r.substring(0, i).trimStart(), o = r.substring(i + 1)), a) { case `min-fresh`: case `max-stale`: case `max-age`: case `s-maxage`: case `stale-while-revalidate`: case `stale-if-error`: { if (o === void 0 || o[0] === ` `) continue; o.length >= 2 && o[0] === `"` && o[o.length - 1] === `"` && (o = o.substring(1, o.length - 1)); let e = parseInt(o, 10); if (e !== e || a === `max-age` && a in t && t[a] >= e) continue; t[a] = e; break; } case `private`: case `no-cache`: if (o) { if (o[0] === `"`) { let r = [o.substring(1)], i = o[o.length - 1] === `"`; if (!i) for (let t = e + 1; t < n.length; t++) { let e = n[t], a = e.length; if (r.push(e.trim()), a !== 0 && e[a - 1] === `"`) { i = !0; break; } } if (i) { let e = r[r.length - 1]; e[e.length - 1] === `"` && (e = e.substring(0, e.length - 1), r[r.length - 1] = e), a in t ? t[a] = t[a].concat(r) : t[a] = r; } } else a in t ? t[a] = t[a].concat(o) : t[a] = [o]; break; } case `public`: case `no-store`: case `must-revalidate`: case `proxy-revalidate`: case `immutable`: case `no-transform`: case `must-understand`: case `only-if-cached`: if (o) continue; t[a] = !0; break; default: continue; } } return t; } function d(e, t) { if (typeof e == `string` && e.includes(`*`)) return t; let n = {}, r = typeof e == `string` ? e.split(`,`) : e; for (let e of r) { let r = e.trim().toLowerCase(); n[r] = t[r] ?? null; } return n; } function f(e) { return e.length <= 2 ? !1 : e[0] === `"` && e[e.length - 1] === `"` ? !(e[1] === `"` || e.startsWith(`"W/`)) : e.startsWith(`W/"`) && e[e.length - 1] === `"` ? e.length !== 4 : !1; } function p(e, t = `CacheStore`) { if (typeof e != `object` || !e) throw TypeError(`expected type of ${t} to be a CacheStore, got ${e === null ? `null` : typeof e}`); for (let n of [ `get`, `createWriteStream`, `delete` ]) if (typeof e[n] != `function`) throw TypeError(`${t} needs to have a \`${n}()\` function`); } function m(e, t = `CacheMethods`) { if (!Array.isArray(e)) throw TypeError(`expected type of ${t} needs to be an array, got ${e === null ? `null` : typeof e}`); if (e.length === 0) throw TypeError(`${t} needs to have at least one method`); for (let r of e) if (!n.includes(r)) throw TypeError(`element of ${t}-array needs to be one of following values: ${n.join(`, `)}, got ${r}`); } function h(e, t) { let n = {}; if (e.headers) { let r = Object.keys(e.headers).sort(); for (let i of r) t?.has(i.toLowerCase()) || (n[i] = e.headers[i]); } return JSON.stringify([ e.origin, e.method, e.path, n ]); } t.exports = { makeCacheKey: o, normalizeHeaders: s, assertCacheKey: c, assertCacheValue: l, parseCacheControlHeader: u, parseVaryHeader: d, isEtagUsable: f, assertCacheMethods: m, assertCacheStore: p, makeDeduplicationKey: h }; })); var ot = c$3(((e, t) => { function n(e) { switch (e[3]) { case `,`: return r(e); case ` `: return i(e); default: return a(e); } } function r(e) { if (e.length !== 29 || e[4] !== ` ` || e[7] !== ` ` || e[11] !== ` ` || e[16] !== ` ` || e[19] !== `:` || e[22] !== `:` || e[25] !== ` ` || e[26] !== `G` || e[27] !== `M` || e[28] !== `T`) return; let t = -1; if (e[0] === `S` && e[1] === `u` && e[2] === `n`) t = 0; else if (e[0] === `M` && e[1] === `o` && e[2] === `n`) t = 1; else if (e[0] === `T` && e[1] === `u` && e[2] === `e`) t = 2; else if (e[0] === `W` && e[1] === `e` && e[2] === `d`) t = 3; else if (e[0] === `T` && e[1] === `h` && e[2] === `u`) t = 4; else if (e[0] === `F` && e[1] === `r` && e[2] === `i`) t = 5; else if (e[0] === `S` && e[1] === `a` && e[2] === `t`) t = 6; else return; let n = 0; if (e[5] === `0`) { let t = e.charCodeAt(6); if (t < 49 || t > 57) return; n = t - 48; } else { let t = e.charCodeAt(5); if (t < 49 || t > 51) return; let r = e.charCodeAt(6); if (r < 48 || r > 57) return; n = (t - 48) * 10 + (r - 48); } let r = -1; if (e[8] === `J` && e[9] === `a` && e[10] === `n`) r = 0; else if (e[8] === `F` && e[9] === `e` && e[10] === `b`) r = 1; else if (e[8] === `M` && e[9] === `a`) if (e[10] === `r`) r = 2; else if (e[10] === `y`) r = 4; else return; else if (e[8] === `J`) if (e[9] === `a` && e[10] === `n`) r = 0; else if (e[9] === `u`) if (e[10] === `n`) r = 5; else if (e[10] === `l`) r = 6; else return; else return; else if (e[8] === `A`) if (e[9] === `p` && e[10] === `r`) r = 3; else if (e[9] === `u` && e[10] === `g`) r = 7; else return; else if (e[8] === `S` && e[9] === `e` && e[10] === `p`) r = 8; else if (e[8] === `O` && e[9] === `c` && e[10] === `t`) r = 9; else if (e[8] === `N` && e[9] === `o` && e[10] === `v`) r = 10; else if (e[8] === `D` && e[9] === `e` && e[10] === `c`) r = 11; else return; let i = e.charCodeAt(12); if (i < 48 || i > 57) return; let a = e.charCodeAt(13); if (a < 48 || a > 57) return; let o = e.charCodeAt(14); if (o < 48 || o > 57) return; let s = e.charCodeAt(15); if (s < 48 || s > 57) return; let c = (i - 48) * 1e3 + (a - 48) * 100 + (o - 48) * 10 + (s - 48), l = 0; if (e[17] === `0`) { let t = e.charCodeAt(18); if (t < 48 || t > 57) return; l = t - 48; } else { let t = e.charCodeAt(17); if (t < 48 || t > 50) return; let n = e.charCodeAt(18); if (n < 48 || n > 57 || t === 50 && n > 51) return; l = (t - 48) * 10 + (n - 48); } let u = 0; if (e[20] === `0`) { let t = e.charCodeAt(21); if (t < 48 || t > 57) return; u = t - 48; } else { let t = e.charCodeAt(20); if (t < 48 || t > 53) return; let n = e.charCodeAt(21); if (n < 48 || n > 57) return; u = (t - 48) * 10 + (n - 48); } let d = 0; if (e[23] === `0`) { let t = e.charCodeAt(24); if (t < 48 || t > 57) return; d = t - 48; } else { let t = e.charCodeAt(23); if (t < 48 || t > 53) return; let n = e.charCodeAt(24); if (n < 48 || n > 57) return; d = (t - 48) * 10 + (n - 48); } let f = new Date(Date.UTC(c, r, n, l, u, d)); return f.getUTCDay() === t ? f : void 0; } function i(e) { if (e.length !== 24 || e[7] !== ` ` || e[10] !== ` ` || e[19] !== ` `) return; let t = -1; if (e[0] === `S` && e[1] === `u` && e[2] === `n`) t = 0; else if (e[0] === `M` && e[1] === `o` && e[2] === `n`) t = 1; else if (e[0] === `T` && e[1] === `u` && e[2] === `e`) t = 2; else if (e[0] === `W` && e[1] === `e` && e[2] === `d`) t = 3; else if (e[0] === `T` && e[1] === `h` && e[2] === `u`) t = 4; else if (e[0] === `F` && e[1] === `r` && e[2] === `i`) t = 5; else if (e[0] === `S` && e[1] === `a` && e[2] === `t`) t = 6; else return; let n = -1; if (e[4] === `J` && e[5] === `a` && e[6] === `n`) n = 0; else if (e[4] === `F` && e[5] === `e` && e[6] === `b`) n = 1; else if (e[4] === `M` && e[5] === `a`) if (e[6] === `r`) n = 2; else if (e[6] === `y`) n = 4; else return; else if (e[4] === `J`) if (e[5] === `a` && e[6] === `n`) n = 0; else if (e[5] === `u`) if (e[6] === `n`) n = 5; else if (e[6] === `l`) n = 6; else return; else return; else if (e[4] === `A`) if (e[5] === `p` && e[6] === `r`) n = 3; else if (e[5] === `u` && e[6] === `g`) n = 7; else return; else if (e[4] === `S` && e[5] === `e` && e[6] === `p`) n = 8; else if (e[4] === `O` && e[5] === `c` && e[6] === `t`) n = 9; else if (e[4] === `N` && e[5] === `o` && e[6] === `v`) n = 10; else if (e[4] === `D` && e[5] === `e` && e[6] === `c`) n = 11; else return; let r = 0; if (e[8] === ` `) { let t = e.charCodeAt(9); if (t < 49 || t > 57) return; r = t - 48; } else { let t = e.charCodeAt(8); if (t < 49 || t > 51) return; let n = e.charCodeAt(9); if (n < 48 || n > 57) return; r = (t - 48) * 10 + (n - 48); } let i = 0; if (e[11] === `0`) { let t = e.charCodeAt(12); if (t < 48 || t > 57) return; i = t - 48; } else { let t = e.charCodeAt(11); if (t < 48 || t > 50) return; let n = e.charCodeAt(12); if (n < 48 || n > 57 || t === 50 && n > 51) return; i = (t - 48) * 10 + (n - 48); } let a = 0; if (e[14] === `0`) { let t = e.charCodeAt(15); if (t < 48 || t > 57) return; a = t - 48; } else { let t = e.charCodeAt(14); if (t < 48 || t > 53) return; let n = e.charCodeAt(15); if (n < 48 || n > 57) return; a = (t - 48) * 10 + (n - 48); } let o = 0; if (e[17] === `0`) { let t = e.charCodeAt(18); if (t < 48 || t > 57) return; o = t - 48; } else { let t = e.charCodeAt(17); if (t < 48 || t > 53) return; let n = e.charCodeAt(18); if (n < 48 || n > 57) return; o = (t - 48) * 10 + (n - 48); } let s = e.charCodeAt(20); if (s < 48 || s > 57) return; let c = e.charCodeAt(21); if (c < 48 || c > 57) return; let l = e.charCodeAt(22); if (l < 48 || l > 57) return; let u = e.charCodeAt(23); if (u < 48 || u > 57) return; let d = (s - 48) * 1e3 + (c - 48) * 100 + (l - 48) * 10 + (u - 48), f = new Date(Date.UTC(d, n, r, i, a, o)); return f.getUTCDay() === t ? f : void 0; } function a(e) { let t = -1, n = -1; if (e[0] === `S`) e[1] === `u` && e[2] === `n` && e[3] === `d` && e[4] === `a` && e[5] === `y` ? (n = 0, t = 6) : e[1] === `a` && e[2] === `t` && e[3] === `u` && e[4] === `r` && e[5] === `d` && e[6] === `a` && e[7] === `y` && (n = 6, t = 8); else if (e[0] === `M` && e[1] === `o` && e[2] === `n` && e[3] === `d` && e[4] === `a` && e[5] === `y`) n = 1, t = 6; else if (e[0] === `T`) e[1] === `u` && e[2] === `e` && e[3] === `s` && e[4] === `d` && e[5] === `a` && e[6] === `y` ? (n = 2, t = 7) : e[1] === `h` && e[2] === `u` && e[3] === `r` && e[4] === `s` && e[5] === `d` && e[6] === `a` && e[7] === `y` && (n = 4, t = 8); else if (e[0] === `W` && e[1] === `e` && e[2] === `d` && e[3] === `n` && e[4] === `e` && e[5] === `s` && e[6] === `d` && e[7] === `a` && e[8] === `y`) n = 3, t = 9; else if (e[0] === `F` && e[1] === `r` && e[2] === `i` && e[3] === `d` && e[4] === `a` && e[5] === `y`) n = 5, t = 6; else return; if (e[t] !== `,` || e.length - t - 1 != 23 || e[t + 1] !== ` ` || e[t + 4] !== `-` || e[t + 8] !== `-` || e[t + 11] !== ` ` || e[t + 14] !== `:` || e[t + 17] !== `:` || e[t + 20] !== ` ` || e[t + 21] !== `G` || e[t + 22] !== `M` || e[t + 23] !== `T`) return; let r = 0; if (e[t + 2] === `0`) { let n = e.charCodeAt(t + 3); if (n < 49 || n > 57) return; r = n - 48; } else { let n = e.charCodeAt(t + 2); if (n < 49 || n > 51) return; let i = e.charCodeAt(t + 3); if (i < 48 || i > 57) return; r = (n - 48) * 10 + (i - 48); } let i = -1; if (e[t + 5] === `J` && e[t + 6] === `a` && e[t + 7] === `n`) i = 0; else if (e[t + 5] === `F` && e[t + 6] === `e` && e[t + 7] === `b`) i = 1; else if (e[t + 5] === `M` && e[t + 6] === `a` && e[t + 7] === `r`) i = 2; else if (e[t + 5] === `A` && e[t + 6] === `p` && e[t + 7] === `r`) i = 3; else if (e[t + 5] === `M` && e[t + 6] === `a` && e[t + 7] === `y`) i = 4; else if (e[t + 5] === `J` && e[t + 6] === `u` && e[t + 7] === `n`) i = 5; else if (e[t + 5] === `J` && e[t + 6] === `u` && e[t + 7] === `l`) i = 6; else if (e[t + 5] === `A` && e[t + 6] === `u` && e[t + 7] === `g`) i = 7; else if (e[t + 5] === `S` && e[t + 6] === `e` && e[t + 7] === `p`) i = 8; else if (e[t + 5] === `O` && e[t + 6] === `c` && e[t + 7] === `t`) i = 9; else if (e[t + 5] === `N` && e[t + 6] === `o` && e[t + 7] === `v`) i = 10; else if (e[t + 5] === `D` && e[t + 6] === `e` && e[t + 7] === `c`) i = 11; else return; let a = e.charCodeAt(t + 9); if (a < 48 || a > 57) return; let o = e.charCodeAt(t + 10); if (o < 48 || o > 57) return; let s = (a - 48) * 10 + (o - 48); s += s < 70 ? 2e3 : 1900; let c = 0; if (e[t + 12] === `0`) { let n = e.charCodeAt(t + 13); if (n < 48 || n > 57) return; c = n - 48; } else { let n = e.charCodeAt(t + 12); if (n < 48 || n > 50) return; let r = e.charCodeAt(t + 13); if (r < 48 || r > 57 || n === 50 && r > 51) return; c = (n - 48) * 10 + (r - 48); } let l = 0; if (e[t + 15] === `0`) { let n = e.charCodeAt(t + 16); if (n < 48 || n > 57) return; l = n - 48; } else { let n = e.charCodeAt(t + 15); if (n < 48 || n > 53) return; let r = e.charCodeAt(t + 16); if (r < 48 || r > 57) return; l = (n - 48) * 10 + (r - 48); } let u = 0; if (e[t + 18] === `0`) { let n = e.charCodeAt(t + 19); if (n < 48 || n > 57) return; u = n - 48; } else { let n = e.charCodeAt(t + 18); if (n < 48 || n > 53) return; let r = e.charCodeAt(t + 19); if (r < 48 || r > 57) return; u = (n - 48) * 10 + (r - 48); } let d = new Date(Date.UTC(s, i, r, c, l, u)); return d.getUTCDay() === n ? d : void 0; } t.exports = { parseHttpDate: n }; })); var st = c$3(((e, t) => { let n = B$1(), { parseCacheControlHeader: r, parseVaryHeader: i, isEtagUsable: a } = at(), { parseHttpDate: o } = ot(); function s() {} let c = [ 200, 203, 204, 206, 300, 301, 308, 404, 405, 410, 414, 501 ], l = [206]; var u = class { #e; #t; #n; #r; #i; #a; constructor({ store: e, type: t, cacheByDefault: n }, r, i) { this.#r = e, this.#t = t, this.#n = n, this.#e = r, this.#i = i; } onRequestStart(e, t) { this.#a?.destroy(), this.#a = void 0, this.#i.onRequestStart?.(e, t); } onRequestUpgrade(e, t, n, r) { this.#i.onRequestUpgrade?.(e, t, n, r); } onResponseStart(e, t, l, u) { let g = () => this.#i.onResponseStart?.(e, t, l, u), _ = this; if (!n.safeHTTPMethods.includes(this.#e.method) && t >= 200 && t <= 399) { try { this.#r.delete(this.#e)?.catch?.(s); } catch {} return g(); } let v = l[`cache-control`], y = l[`last-modified`] && c.includes(t); if (!v && !l.expires && !y && !this.#n) return g(); let b = v ? r(v) : {}; if (!d(this.#t, t, l, b, this.#e.headers)) return g(); let x = Date.now(), S = l.age ? f(l.age) : void 0; if (S && S >= 2147483647e3) return g(); let C = typeof l.date == `string` ? o(l.date) : void 0, w = p(this.#t, x, S, l, C, b) ?? this.#n; if (w === void 0 || S && S > w) return g(); let T = C ? C.getTime() : x, E = w + T; if (x >= E) return g(); let D; if (this.#e.headers && l.vary && (D = i(l.vary, this.#e.headers), !D)) return g(); let O = m(T, b, E), k = h(l, b), A = { statusCode: t, statusMessage: u, headers: k, vary: D, cacheControlDirectives: b, cachedAt: S ? x - S : x, staleAt: E, deleteAt: O }; if (t === 304) { let t = (t) => { if (!t) return g(); if (A.statusCode = t.statusCode, A.statusMessage = t.statusMessage, A.etag = t.etag, A.headers = { ...t.headers, ...k }, g(), this.#a = this.#r.createWriteStream(this.#e, A), !(!this.#a || !t?.body)) if (typeof t.body.values == `function`) { let n = t.body.values(), r = () => { for (let t of n) { let n = this.#a.write(t) === !1; if (this.#i.onResponseData?.(e, t), n) break; } }; this.#a.on(`error`, function() { _.#a = void 0, _.#r.delete(_.#e); }).on(`drain`, () => { r(); }).on(`close`, function() { _.#a === this && (_.#a = void 0); }), r(); } else typeof t.body.on == `function` && (t.body.on(`data`, (t) => { this.#a.write(t), this.#i.onResponseData?.(e, t); }).on(`end`, () => { this.#a.end(); }).on(`error`, () => { this.#a = void 0, this.#r.delete(this.#e); }), this.#a.on(`error`, function() { _.#a = void 0, _.#r.delete(_.#e); }).on(`close`, function() { _.#a === this && (_.#a = void 0); })); }, n = this.#r.get(this.#e); n && typeof n.then == `function` ? n.then(t) : t(n); } else { if (typeof l.etag == `string` && a(l.etag) && (A.etag = l.etag), this.#a = this.#r.createWriteStream(this.#e, A), !this.#a) return g(); this.#a.on(`drain`, () => e.resume()).on(`error`, function() { _.#a = void 0, _.#r.delete(_.#e); }).on(`close`, function() { _.#a === this && (_.#a = void 0), e.resume(); }), g(); } } onResponseData(e, t) { this.#a?.write(t) === !1 && e.pause(), this.#i.onResponseData?.(e, t); } onResponseEnd(e, t) { this.#a?.end(), this.#i.onResponseEnd?.(e, t); } onResponseError(e, t) { this.#a?.destroy(t), this.#a = void 0, this.#i.onResponseError?.(e, t); } }; function d(e, t, n, r, i) { return !(t < 200 || l.includes(t) || !c.includes(t) && !n.expires && !r.public && r[`max-age`] === void 0 && !(r.private && e === `private`) && !(r[`s-maxage`] !== void 0 && e === `shared`) || r[`no-store`] || e === `shared` && r.private === !0 || n.vary?.includes(`*`) || i?.authorization && (!r.public && !r[`s-maxage`] && !r[`must-revalidate`] || typeof i.authorization != `string` || Array.isArray(r[`no-cache`]) && r[`no-cache`].includes(`authorization`) || Array.isArray(r.private) && r.private.includes(`authorization`))); } function f(e) { let t = parseInt(Array.isArray(e) ? e[0] : e); return isNaN(t) ? void 0 : t * 1e3; } function p(e, t, n, r, i, a) { if (e === `shared`) { let e = a[`s-maxage`]; if (e !== void 0) return e > 0 ? e * 1e3 : void 0; } let s = a[`max-age`]; if (s !== void 0) return s > 0 ? s * 1e3 : void 0; if (typeof r.expires == `string`) { let e = o(r.expires); if (e) return t >= e.getTime() || i && (i >= e || n !== void 0 && n > e - i) ? void 0 : e.getTime() - t; } if (typeof r[`last-modified`] == `string`) { let e = new Date(r[`last-modified`]); if (g(e)) return e.getTime() >= t ? void 0 : (t - e.getTime()) * .1; } if (a.immutable) return 31536e3; } function m(e, t, n) { let r = -Infinity, i = -Infinity, a = -Infinity; return t[`stale-while-revalidate`] && (r = n + t[`stale-while-revalidate`] * 1e3), t[`stale-if-error`] && (i = n + t[`stale-if-error`] * 1e3), t.immutable && r === -Infinity && i === -Infinity && (a = e + 31536e6), r === -Infinity && i === -Infinity && a === -Infinity ? n + (n - e) : Math.max(n, r, i, a); } function h(e, t) { let n = [ `connection`, `proxy-authenticate`, `proxy-authentication-info`, `proxy-authorization`, `proxy-connection`, `te`, `transfer-encoding`, `upgrade`, `age` ]; e.connection && (Array.isArray(e.connection) ? n.push(...e.connection.map((e) => e.trim())) : n.push(...e.connection.split(`,`).map((e) => e.trim()))), Array.isArray(t[`no-cache`]) && n.push(...t[`no-cache`]), Array.isArray(t.private) && n.push(...t.private); let r; for (let t of n) e[t] && (r ??= { ...e }, delete r[t]); return r ?? e; } function g(e) { return e instanceof Date && Number.isFinite(e.valueOf()); } t.exports = u; })); var ct = c$3(((e, t) => { let { Writable: r } = p$4(`node:stream`), { EventEmitter: i } = p$4(`node:events`), { assertCacheKey: a, assertCacheValue: o } = at(); var s = class extends i { #e = 1024; #t = 104857600; #n = 5242880; #r = 0; #i = 0; #a = /* @__PURE__ */ new Map(); #o = !1; constructor(e) { if (super(), e) { if (typeof e != `object`) throw TypeError(`MemoryCacheStore options must be an object`); if (e.maxCount !== void 0) { if (typeof e.maxCount != `number` || !Number.isInteger(e.maxCount) || e.maxCount < 0) throw TypeError(`MemoryCacheStore options.maxCount must be a non-negative integer`); this.#e = e.maxCount; } if (e.maxSize !== void 0) { if (typeof e.maxSize != `number` || !Number.isInteger(e.maxSize) || e.maxSize < 0) throw TypeError(`MemoryCacheStore options.maxSize must be a non-negative integer`); this.#t = e.maxSize; } if (e.maxEntrySize !== void 0) { if (typeof e.maxEntrySize != `number` || !Number.isInteger(e.maxEntrySize) || e.maxEntrySize < 0) throw TypeError(`MemoryCacheStore options.maxEntrySize must be a non-negative integer`); this.#n = e.maxEntrySize; } } } get size() { return this.#r; } isFull() { return this.#r >= this.#t || this.#i >= this.#e; } get(e) { a(e); let t = `${e.origin}:${e.path}`, n = Date.now(), r = this.#a.get(t), i = r ? c(e, r, n) : null; return i == null ? void 0 : { statusMessage: i.statusMessage, statusCode: i.statusCode, headers: i.headers, body: i.body, vary: i.vary ? i.vary : void 0, etag: i.etag, cacheControlDirectives: i.cacheControlDirectives, cachedAt: i.cachedAt, staleAt: i.staleAt, deleteAt: i.deleteAt }; } createWriteStream(e, t) { a(e), o(t); let n = `${e.origin}:${e.path}`, i = this, s = { ...e, ...t, body: [], size: 0 }; return new r({ write(e, t, n) { typeof e == `string` && (e = Buffer.from(e, t)), s.size += e.byteLength, s.size >= i.#n ? this.destroy() : s.body.push(e), n(null); }, final(t) { let r = i.#a.get(n); r || (r = [], i.#a.set(n, r)); let a = c(e, r, Date.now()); if (a) { let e = r.indexOf(a); r.splice(e, 1, s), i.#r -= a.size; } else r.push(s), i.#i += 1; if (i.#r += s.size, i.#r > i.#t || i.#i > i.#e) { i.#o ||= (i.emit(`maxSizeExceeded`, { size: i.#r, maxSize: i.#t, count: i.#i, maxCount: i.#e }), !0); for (let [e, t] of i.#a) { for (let e of t.splice(0, t.length / 2)) i.#r -= e.size, --i.#i; t.length === 0 && i.#a.delete(e); } i.#r < i.#t && i.#i < i.#e && (i.#o = !1); } t(null); } }); } delete(e) { if (typeof e != `object`) throw TypeError(`expected key to be object, got ${typeof e}`); let t = `${e.origin}:${e.path}`; for (let e of this.#a.get(t) ?? []) this.#r -= e.size, --this.#i; this.#a.delete(t); } }; function c(e, t, n) { return t.find((t) => t.deleteAt > n && t.method === e.method && (t.vary == null || Object.keys(t.vary).every((n) => t.vary[n] === null ? e.headers[n] === void 0 : t.vary[n] === e.headers[n]))); } t.exports = s; })); var lt = c$3(((e, t) => { let r = p$4(`node:assert`); t.exports = class { #e = !1; #t; #n; #r; #i; constructor(e, t, n) { if (typeof e != `function`) throw TypeError(`callback must be a function`); this.#t = e, this.#n = t, this.#i = n; } onRequestStart(e, t) { this.#e = !1, this.#r = t; } onRequestUpgrade(e, t, n, r) { this.#n.onRequestUpgrade?.(e, t, n, r); } onResponseStart(e, t, n, i) { if (r(this.#t != null), this.#e = t === 304 || this.#i && t >= 500 && t <= 504, this.#t(this.#e, this.#r), this.#t = null, this.#e) return !0; this.#n.onRequestStart?.(e, this.#r), this.#n.onResponseStart?.(e, t, n, i); } onResponseData(e, t) { if (!this.#e) return this.#n.onResponseData?.(e, t); } onResponseEnd(e, t) { this.#e || this.#n.onResponseEnd?.(e, t); } onResponseError(e, t) { if (!this.#e) if (this.#t &&= (this.#t(!1), null), typeof this.#n.onResponseError == `function`) this.#n.onResponseError(e, t); else throw t; } }; })); var ut = c$3(((e, t) => { let r = p$4(`node:assert`), { Readable: i } = p$4(`node:stream`), a = B$1(), o = st(), s = ct(), c = lt(), { assertCacheStore: l, assertCacheMethods: u, makeCacheKey: d, normalizeHeaders: f, parseCacheControlHeader: p } = at(), { AbortError: m } = R$1(); function h(e, t) { if (e !== void 0) { if (!Array.isArray(e)) throw TypeError(`expected ${t} to be an array or undefined, got ${typeof e}`); for (let n = 0; n < e.length; n++) { let r = e[n]; if (typeof r != `string` && !(r instanceof RegExp)) throw TypeError(`expected ${t}[${n}] to be a string or RegExp, got ${typeof r}`); } } } let g = () => {}; function _(e, t, { headers: n = {} }) { return !!(t?.[`no-cache`] || e.cacheControlDirectives?.[`no-cache`] && !Array.isArray(e.cacheControlDirectives[`no-cache`]) || n[`if-modified-since`] || n[`if-none-match`]); } function v(e, t) { let n = Date.now(); return n > e.staleAt ? t?.[`max-stale`] ? n > e.staleAt + t[`max-stale`] * 1e3 : !0 : t?.[`min-fresh`] ? e.staleAt - n <= t[`min-fresh`] * 1e3 : !1; } function y(e) { let t = e.cacheControlDirectives?.[`stale-while-revalidate`]; return t ? Date.now() <= e.staleAt + t * 1e3 : !1; } function b(e, t, n, r, i, a) { if (a?.[`only-if-cached`]) { let e = !1; try { if (typeof r.onConnect == `function` && (r.onConnect(() => { e = !0; }), e) || typeof r.onHeaders == `function` && (r.onHeaders(504, [], g, `Gateway Timeout`), e)) return; typeof r.onComplete == `function` && r.onComplete([]); } catch (e) { typeof r.onError == `function` && r.onError(e); } return !0; } return e(i, new o(t, n, r)); } function x(e, t, n, o, s, c) { let l = a.isStream(n.body) ? n.body : i.from(n.body ?? []); r(!l.destroyed, `stream should not be destroyed`), r(!l.readableDidRead, `stream should not be readableDidRead`); let u = { resume() { l.resume(); }, pause() { l.pause(); }, get paused() { return l.isPaused(); }, get aborted() { return l.destroyed; }, get reason() { return l.errored; }, abort(e) { l.destroy(e ?? new m()); } }; if (l.on(`error`, function(t) { if (!this.readableEnded) if (typeof e.onResponseError == `function`) e.onResponseError(u, t); else throw t; }).on(`close`, function() { this.errored || e.onResponseEnd?.(u, {}); }), e.onRequestStart?.(u, s), l.destroyed) return; let d = { ...n.headers, age: String(o) }; c && (d.warning = `110 - "response is stale"`), e.onResponseStart?.(u, n.statusCode, d, n.statusMessage), t.method === `HEAD` ? l.destroy() : l.on(`data`, function(t) { e.onResponseData?.(u, t); }); } function S(e, t, n, r, i, s, l) { if (!l) return b(e, t, n, r, i, s); let u = Date.now(); if (u > l.deleteAt) return e(i, new o(t, n, r)); let d = Math.round((u - l.cachedAt) / 1e3); if (s?.[`max-age`] && d >= s[`max-age`]) return e(i, r); let f = v(l, s), p = _(l, s, i); if (f || p) { if (a.isStream(i.body) && a.bodyLength(i.body) !== 0) return e(i, new o(t, n, r)); if (!p && y(l)) return x(r, i, l, d, null, !0), queueMicrotask(() => { let r = { ...i.headers, "if-modified-since": new Date(l.cachedAt).toUTCString() }; if (l.etag && (r[`if-none-match`] = l.etag), l.vary) for (let e in l.vary) l.vary[e] != null && (r[e] = l.vary[e]); e({ ...i, headers: r }, new o(t, n, { onRequestStart() {}, onRequestUpgrade() {}, onResponseStart() {}, onResponseData() {}, onResponseEnd() {}, onResponseError() {} })); }), !0; let m = !1, h = l.cacheControlDirectives[`stale-if-error`] ?? s?.[`stale-if-error`]; h && (m = u < l.staleAt + h * 1e3); let _ = { ...i.headers, "if-modified-since": new Date(l.cachedAt).toUTCString() }; if (l.etag && (_[`if-none-match`] = l.etag), l.vary) for (let e in l.vary) l.vary[e] != null && (_[e] = l.vary[e]); return e({ ...i, headers: _ }, new c((e, t) => { e ? x(r, i, l, d, t, f) : a.isStream(l.body) && l.body.on(`error`, g).destroy(); }, new o(t, n, r), m)); } a.isStream(i.body) && i.body.on(`error`, g).destroy(), x(r, i, l, d, null, !1); } t.exports = (e = {}) => { let { store: t = new s(), methods: n = [`GET`], cacheByDefault: r = void 0, type: i = `shared`, origins: o = void 0 } = e; if (typeof e != `object` || !e) throw TypeError(`expected type of opts to be an Object, got ${e === null ? `null` : typeof e}`); if (l(t, `opts.store`), u(n, `opts.methods`), h(o, `opts.origins`), r !== void 0 && typeof r != `number`) throw TypeError(`expected opts.cacheByDefault to be number or undefined, got ${typeof r}`); if (i !== void 0 && i !== `shared` && i !== `private`) throw TypeError(`expected opts.type to be shared, private, or undefined, got ${typeof i}`); let c = { store: t, methods: n, cacheByDefault: r, type: i }, m = a.safeHTTPMethods.filter((e) => n.includes(e) === !1); return (e) => (n, r) => { if (!n.origin || m.includes(n.method)) return e(n, r); if (o !== void 0) { let t = n.origin.toString().toLowerCase(), i = !1; for (let e = 0; e < o.length; e++) { let n = o[e]; if (typeof n == `string`) { if (n.toLowerCase() === t) { i = !0; break; } } else if (n.test(t)) { i = !0; break; } } if (!i) return e(n, r); } n = { ...n, headers: f(n) }; let i = n.headers?.[`cache-control`] ? p(n.headers[`cache-control`]) : void 0; if (i?.[`no-store`]) return e(n, r); let a = d(n), s = t.get(a); return s && typeof s.then == `function` ? s.then((t) => S(e, c, a, r, n, i, t)) : S(e, c, a, r, n, i, s); }; }; })); var dt = c$3(((e, t) => { let { createInflate: r, createGunzip: i, createBrotliDecompress: a, createZstdDecompress: o } = p$4(`node:zlib`), { pipeline: s } = p$4(`node:stream`), c = Qe(), { runtimeFeatures: l } = ue(), u = { gzip: i, "x-gzip": i, br: a, deflate: r, compress: r, "x-compress": r, ...l.has(`zstd`) ? { zstd: o } : {} }, d = [204, 304], f = !1; var p = class extends c { #e = []; #t; #n; constructor(e, { skipStatusCodes: t = d, skipErrorResponses: n = !0 } = {}) { super(e), this.#t = t, this.#n = n; } #r(e, t) { return !!(!e || t < 200 || this.#t.includes(t) || this.#n && t >= 400); } #i(e) { let t = e.split(`,`); if (t.length > 5) throw Error(`too many content-encodings in response: ${t.length}, maximum allowed is 5`); let n = []; for (let e = t.length - 1; e >= 0; e--) { let r = t[e].trim(); if (r) { if (!u[r]) return n.length = 0, n; n.push(u[r]()); } } return n; } #a(e, t) { e.on(`readable`, () => { let n; for (; (n = e.read()) !== null && super.onResponseData(t, n) !== !1;); }), e.on(`error`, (e) => { super.onResponseError(t, e); }); } #o(e) { let t = this.#e[0]; this.#a(t, e), t.on(`end`, () => { super.onResponseEnd(e, {}); }); } #s(e) { let t = this.#e[this.#e.length - 1]; this.#a(t, e), s(this.#e, (t) => { if (t) { super.onResponseError(e, t); return; } super.onResponseEnd(e, {}); }); } #c() { this.#e.length = 0; } onResponseStart(e, t, n, r) { let i = n[`content-encoding`]; if (this.#r(i, t)) return super.onResponseStart(e, t, n, r); let a = this.#i(i.toLowerCase()); if (a.length === 0) return this.#c(), super.onResponseStart(e, t, n, r); this.#e = a; let { "content-encoding": o, "content-length": s, ...c } = n; return this.#e.length === 1 ? this.#o(e) : this.#s(e), super.onResponseStart(e, t, c, r); } onResponseData(e, t) { if (this.#e.length > 0) { this.#e[0].write(t); return; } super.onResponseData(e, t); } onResponseEnd(e, t) { if (this.#e.length > 0) { this.#e[0].end(), this.#c(); return; } super.onResponseEnd(e, t); } onResponseError(e, t) { if (this.#e.length > 0) { for (let e of this.#e) e.destroy(t); this.#c(); } super.onResponseError(e, t); } }; function m(e = {}) { return f ||= (process.emitWarning(`DecompressInterceptor is experimental and subject to change`, `ExperimentalWarning`), !0), (t) => (n, r) => t(n, new p(r, e)); } t.exports = m; })); var ft = c$3(((e, t) => { let { RequestAbortedError: n } = R$1(), r = 5 * 1024 * 1024; t.exports = class { #e; #t = []; #n = r; #r = 0; #i = {}; #a = ``; #o = !1; #s = !1; #c = !1; #l = !1; #u = null; #d = null; constructor(e, t, n = r) { this.#e = e, this.#d = t, this.#n = n; } addWaitingHandler(e) { if (this.#l || this.#c) return !1; let t = this.#f(e), n = t.controller; try { if (e.onRequestStart?.(n, null), n.aborted) return t.done = !0, !0; this.#s && e.onResponseStart?.(n, this.#r, this.#i, this.#a); } catch { return t.done = !0, !0; } return n.aborted || this.#t.push(t), !0; } onRequestStart(e, t) { this.#u = e, this.#e.onRequestStart?.(e, t); } onRequestUpgrade(e, t, n, r) { this.#e.onRequestUpgrade?.(e, t, n, r); } onResponseStart(e, t, n, r) { this.#s = !0, this.#r = t, this.#i = n, this.#a = r, this.#e.onResponseStart?.(e, t, n, r); for (let e of this.#t) { let { handler: i, controller: a } = e; if (e.done || a.aborted) { e.done = !0; continue; } try { i.onResponseStart?.(a, t, n, r); } catch {} a.aborted && (e.done = !0); } this.#g(); } onResponseData(e, t) { if (!(this.#o || this.#l)) { this.#c = !0, this.#e.onResponseData?.(e, t); for (let e of this.#t) { let { handler: n, controller: r } = e; if (e.done || r.aborted) { e.done = !0; continue; } if (r.paused) { this.#p(e, t); continue; } try { n.onResponseData?.(r, t); } catch {} r.aborted && (e.done = !0, e.bufferedChunks = [], e.bufferedBytes = 0); } this.#g(); } } onResponseEnd(e, t) { if (!(this.#o || this.#l)) { this.#l = !0, this.#e.onResponseEnd?.(e, t); for (let e of this.#t) { if (e.done || e.controller.aborted) { e.done = !0; continue; } if (this.#m(e), e.done || e.controller.aborted) { e.done = !0; continue; } if (e.controller.paused && e.bufferedChunks.length > 0) { e.pendingTrailers = t; continue; } try { e.handler.onResponseEnd?.(e.controller, t); } catch {} e.done = !0; } this.#g(), this.#d?.(); } } onResponseError(e, t) { if (!this.#l) { this.#o = !0, this.#l = !0, this.#e.onResponseError?.(e, t); for (let e of this.#t) this.#h(e, t); this.#t = [], this.#d?.(); } } #f(e) { let t = { handler: e, controller: null, bufferedChunks: [], bufferedBytes: 0, pendingTrailers: null, done: !1 }, n = { aborted: !1, paused: !1, reason: null }; return t.controller = { resume: () => { if (!n.aborted) { if (n.paused = !1, this.#m(t), this.#l && t.pendingTrailers && t.bufferedChunks.length === 0 && !n.paused && !n.aborted) { try { t.handler.onResponseEnd?.(t.controller, t.pendingTrailers); } catch {} t.pendingTrailers = null, t.done = !0; } this.#g(); } }, pause: () => { n.aborted || (n.paused = !0); }, get paused() { return n.paused; }, get aborted() { return n.aborted; }, get reason() { return n.reason; }, abort: (e) => { n.aborted = !0, n.reason = e ?? null, t.done = !0, t.pendingTrailers = null, t.bufferedChunks = [], t.bufferedBytes = 0; } }, t; } #p(e, t) { if (e.done || e.controller.aborted) { e.done = !0, e.bufferedChunks = [], e.bufferedBytes = 0; return; } let r = Buffer.from(t); if (e.bufferedChunks.push(r), e.bufferedBytes += r.length, e.bufferedBytes > this.#n) { let t = new n(`Deduplicated waiting handler exceeded maxBufferSize (${this.#n} bytes) while paused`); this.#h(e, t); } } #m(e) { let { handler: t, controller: n } = e; for (; !e.done && !n.aborted && !n.paused && e.bufferedChunks.length > 0;) { let r = e.bufferedChunks.shift(); e.bufferedBytes -= r.length; try { t.onResponseData?.(n, r); } catch {} if (n.aborted) { e.done = !0, e.pendingTrailers = null, e.bufferedChunks = [], e.bufferedBytes = 0; break; } } } #h(e, t) { if (!e.done) { e.done = !0, e.pendingTrailers = null, e.bufferedChunks = [], e.bufferedBytes = 0; try { e.controller.abort(t), e.handler.onResponseError?.(e.controller, t); } catch {} } } #g() { this.#t = this.#t.filter((e) => e.done === !1); } }; })); var pt = c$3(((e, t) => { let r = p$4(`node:diagnostics_channel`), i = B$1(), a = ft(), { normalizeHeaders: o, makeCacheKey: s, makeDeduplicationKey: c } = at(), l = r.channel(`undici:request:pending-requests`); t.exports = (e = {}) => { let { methods: t = [`GET`], skipHeaderNames: n = [], excludeHeaderNames: r = [], maxBufferSize: u = 5 * 1024 * 1024 } = e; if (typeof e != `object` || !e) throw TypeError(`expected type of opts to be an Object, got ${e === null ? `null` : typeof e}`); if (!Array.isArray(t)) throw TypeError(`expected opts.methods to be an array, got ${typeof t}`); for (let e of t) if (!i.safeHTTPMethods.includes(e)) throw TypeError(`expected opts.methods to only contain safe HTTP methods, got ${e}`); if (!Array.isArray(n)) throw TypeError(`expected opts.skipHeaderNames to be an array, got ${typeof n}`); if (!Array.isArray(r)) throw TypeError(`expected opts.excludeHeaderNames to be an array, got ${typeof r}`); if (!Number.isFinite(u) || u <= 0) throw TypeError(`expected opts.maxBufferSize to be a positive finite number, got ${u}`); let d = new Set(n.map((e) => e.toLowerCase())), f = new Set(r.map((e) => e.toLowerCase())), p = /* @__PURE__ */ new Map(); return (e) => (n, r) => { if (!n.origin || t.includes(n.method) === !1) return e(n, r); if (n = { ...n, headers: o(n) }, d.size > 0) { for (let t of Object.keys(n.headers)) if (d.has(t.toLowerCase())) return e(n, r); } let i = c(s(n), f), m = p.get(i); if (m) return m.addWaitingHandler(r) ? !0 : e(n, r); let h = new a(r, () => { p.delete(i), l.hasSubscribers && l.publish({ size: p.size, key: i, type: `removed` }); }, u); return p.set(i, h), l.hasSubscribers && l.publish({ size: p.size, key: i, type: `added` }), e(n, h); }; }; })); var mt = c$3(((e, t) => { let { Writable: r } = p$4(`node:stream`), { assertCacheKey: i, assertCacheValue: a } = at(), o, s = 2 * 1e3 * 1e3 * 1e3; t.exports = class { #e = s; #t = Infinity; #n; #r; #i; #a; #o; #s; #c; #l; constructor(e) { if (e) { if (typeof e != `object`) throw TypeError(`SqliteCacheStore options must be an object`); if (e.maxEntrySize !== void 0) { if (typeof e.maxEntrySize != `number` || !Number.isInteger(e.maxEntrySize) || e.maxEntrySize < 0) throw TypeError(`SqliteCacheStore options.maxEntrySize must be a non-negative integer`); if (e.maxEntrySize > s) throw TypeError(`SqliteCacheStore options.maxEntrySize must be less than 2gb`); this.#e = e.maxEntrySize; } if (e.maxCount !== void 0) { if (typeof e.maxCount != `number` || !Number.isInteger(e.maxCount) || e.maxCount < 0) throw TypeError(`SqliteCacheStore options.maxCount must be a non-negative integer`); this.#t = e.maxCount; } } o ||= p$4(`node:sqlite`).DatabaseSync, this.#n = new o(e?.location ?? `:memory:`), this.#n.exec(` PRAGMA journal_mode = WAL; PRAGMA synchronous = NORMAL; PRAGMA temp_store = memory; PRAGMA optimize; CREATE TABLE IF NOT EXISTS cacheInterceptorV3 ( -- Data specific to us id INTEGER PRIMARY KEY AUTOINCREMENT, url TEXT NOT NULL, method TEXT NOT NULL, -- Data returned to the interceptor body BUF NULL, deleteAt INTEGER NOT NULL, statusCode INTEGER NOT NULL, statusMessage TEXT NOT NULL, headers TEXT NULL, cacheControlDirectives TEXT NULL, etag TEXT NULL, vary TEXT NULL, cachedAt INTEGER NOT NULL, staleAt INTEGER NOT NULL ); CREATE INDEX IF NOT EXISTS idx_cacheInterceptorV3_getValuesQuery ON cacheInterceptorV3(url, method, deleteAt); CREATE INDEX IF NOT EXISTS idx_cacheInterceptorV3_deleteByUrlQuery ON cacheInterceptorV3(deleteAt); `), this.#r = this.#n.prepare(` SELECT id, body, deleteAt, statusCode, statusMessage, headers, etag, cacheControlDirectives, vary, cachedAt, staleAt FROM cacheInterceptorV3 WHERE url = ? AND method = ? ORDER BY deleteAt ASC `), this.#i = this.#n.prepare(` UPDATE cacheInterceptorV3 SET body = ?, deleteAt = ?, statusCode = ?, statusMessage = ?, headers = ?, etag = ?, cacheControlDirectives = ?, cachedAt = ?, staleAt = ? WHERE id = ? `), this.#a = this.#n.prepare(` INSERT INTO cacheInterceptorV3 ( url, method, body, deleteAt, statusCode, statusMessage, headers, etag, cacheControlDirectives, vary, cachedAt, staleAt ) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) `), this.#s = this.#n.prepare(`DELETE FROM cacheInterceptorV3 WHERE url = ?`), this.#c = this.#n.prepare(`SELECT COUNT(*) AS total FROM cacheInterceptorV3`), this.#o = this.#n.prepare(`DELETE FROM cacheInterceptorV3 WHERE deleteAt <= ?`), this.#l = this.#t === Infinity ? null : this.#n.prepare(` DELETE FROM cacheInterceptorV3 WHERE id IN ( SELECT id FROM cacheInterceptorV3 ORDER BY cachedAt ASC LIMIT ? ) `); } close() { this.#n.close(); } get(e) { i(e); let t = this.#f(e); return t ? { body: t.body ? Buffer.from(t.body.buffer, t.body.byteOffset, t.body.byteLength) : void 0, statusCode: t.statusCode, statusMessage: t.statusMessage, headers: t.headers ? JSON.parse(t.headers) : void 0, etag: t.etag ? t.etag : void 0, vary: t.vary ? JSON.parse(t.vary) : void 0, cacheControlDirectives: t.cacheControlDirectives ? JSON.parse(t.cacheControlDirectives) : void 0, cachedAt: t.cachedAt, staleAt: t.staleAt, deleteAt: t.deleteAt } : void 0; } set(e, t) { i(e); let n = this.#d(e), r = Array.isArray(t.body) ? Buffer.concat(t.body) : t.body, a = r?.byteLength; if (a && a > this.#e) return; let o = this.#f(e, !0); o ? this.#i.run(r, t.deleteAt, t.statusCode, t.statusMessage, t.headers ? JSON.stringify(t.headers) : null, t.etag ? t.etag : null, t.cacheControlDirectives ? JSON.stringify(t.cacheControlDirectives) : null, t.cachedAt, t.staleAt, o.id) : (this.#a.run(n, e.method, r, t.deleteAt, t.statusCode, t.statusMessage, t.headers ? JSON.stringify(t.headers) : null, t.etag ? t.etag : null, t.cacheControlDirectives ? JSON.stringify(t.cacheControlDirectives) : null, t.vary ? JSON.stringify(t.vary) : null, t.cachedAt, t.staleAt), this.#u()); } createWriteStream(e, t) { i(e), a(t); let n = 0, o = [], s = this; return new r({ decodeStrings: !0, write(e, t, r) { n += e.byteLength, n < s.#e ? o.push(e) : this.destroy(), r(); }, final(n) { s.set(e, { ...t, body: o }), n(); } }); } delete(e) { if (typeof e != `object`) throw TypeError(`expected key to be object, got ${typeof e}`); this.#s.run(this.#d(e)); } #u() { if (Number.isFinite(this.#t) && this.size <= this.#t) return 0; { let e = this.#o.run(Date.now()).changes; if (e) return e; } { let e = this.#l?.run(Math.max(Math.floor(this.#t * .1), 1)).changes; if (e) return e; } return 0; } get size() { let { total: e } = this.#c.get(); return e; } #d(e) { return `${e.origin}/${e.path}`; } #f(e, t = !1) { let n = this.#d(e), { headers: r, method: i } = e, a = this.#r.all(n, i); if (a.length === 0) return; let o = Date.now(); for (let e of a) { if (o >= e.deleteAt && !t) continue; let n = !0; if (e.vary) { let t = JSON.parse(e.vary); for (let e in t) if (!c(r[e], t[e])) { n = !1; break; } } if (n) return e; } } }; function c(e, t) { return e == null && t == null ? !0 : e == null && t != null || e != null && t == null ? !1 : Array.isArray(e) && Array.isArray(t) ? e.length === t.length ? e.every((e, n) => e === t[n]) : !1 : e === t; } })); var ht = c$3(((e, t) => { let { kConstruct: r } = I$1(), { kEnumerableProperty: i } = B$1(), { iteratorMixin: a, isValidHeaderName: o, isValidHeaderValue: s } = Y$1(), { webidl: c } = de(), l = p$4(`node:assert`), u = p$4(`node:util`); function d(e) { return e === 10 || e === 13 || e === 9 || e === 32; } function f(e) { let t = 0, n = e.length; for (; n > t && d(e.charCodeAt(n - 1));) --n; for (; n > t && d(e.charCodeAt(t));) ++t; return t === 0 && n === e.length ? e : e.substring(t, n); } function p(e, t) { if (Array.isArray(t)) for (let n = 0; n < t.length; ++n) { let r = t[n]; if (r.length !== 2) throw c.errors.exception({ header: `Headers constructor`, message: `expected name/value pair to be length 2, found ${r.length}.` }); m(e, r[0], r[1]); } else if (typeof t == `object` && t) { let n = Object.keys(t); for (let r = 0; r < n.length; ++r) m(e, n[r], t[n[r]]); } else throw c.errors.conversionFailed({ prefix: `Headers constructor`, argument: `Argument 1`, types: [`sequence>`, `record`] }); } function m(e, t, n) { if (n = f(n), !o(t)) throw c.errors.invalidArgument({ prefix: `Headers.append`, value: t, type: `header name` }); if (!s(n)) throw c.errors.invalidArgument({ prefix: `Headers.append`, value: n, type: `header value` }); if (y(e) === `immutable`) throw TypeError(`immutable`); return x(e).append(t, n, !1); } function h(e) { let t = x(e); if (!t) return []; if (t.sortedMap) return t.sortedMap; let n = [], r = t.toSortedArray(), i = t.cookies; if (i === null || i.length === 1) return t.sortedMap = r; for (let e = 0; e < r.length; ++e) { let { 0: t, 1: a } = r[e]; if (t === `set-cookie`) for (let e = 0; e < i.length; ++e) n.push([t, i[e]]); else n.push([t, a]); } return t.sortedMap = n; } function g(e, t) { return e[0] < t[0] ? -1 : 1; } var _ = class e { cookies = null; sortedMap; headersMap; constructor(t) { t instanceof e ? (this.headersMap = new Map(t.headersMap), this.sortedMap = t.sortedMap, this.cookies = t.cookies === null ? null : [...t.cookies]) : (this.headersMap = new Map(t), this.sortedMap = null); } contains(e, t) { return this.headersMap.has(t ? e : e.toLowerCase()); } clear() { this.headersMap.clear(), this.sortedMap = null, this.cookies = null; } append(e, t, n) { this.sortedMap = null; let r = n ? e : e.toLowerCase(), i = this.headersMap.get(r); if (i) { let e = r === `cookie` ? `; ` : `, `; this.headersMap.set(r, { name: i.name, value: `${i.value}${e}${t}` }); } else this.headersMap.set(r, { name: e, value: t }); r === `set-cookie` && (this.cookies ??= []).push(t); } set(e, t, n) { this.sortedMap = null; let r = n ? e : e.toLowerCase(); r === `set-cookie` && (this.cookies = [t]), this.headersMap.set(r, { name: e, value: t }); } delete(e, t) { this.sortedMap = null, t || (e = e.toLowerCase()), e === `set-cookie` && (this.cookies = null), this.headersMap.delete(e); } get(e, t) { return this.headersMap.get(t ? e : e.toLowerCase())?.value ?? null; } *[Symbol.iterator]() { for (let { 0: e, 1: { value: t } } of this.headersMap) yield [e, t]; } get entries() { let e = {}; if (this.headersMap.size !== 0) for (let { name: t, value: n } of this.headersMap.values()) e[t] = n; return e; } rawValues() { return this.headersMap.values(); } get entriesList() { let e = []; if (this.headersMap.size !== 0) for (let { 0: t, 1: { name: n, value: r } } of this.headersMap) if (t === `set-cookie`) for (let t of this.cookies) e.push([n, t]); else e.push([n, r]); return e; } toSortedArray() { let e = this.headersMap.size, t = Array(e); if (e <= 32) { if (e === 0) return t; let n = this.headersMap[Symbol.iterator](), r = n.next().value; t[0] = [r[0], r[1].value], l(r[1].value !== null); for (let r = 1, i = 0, a = 0, o = 0, s = 0, c, u; r < e; ++r) { for (u = n.next().value, c = t[r] = [u[0], u[1].value], l(c[1] !== null), o = 0, a = r; o < a;) s = o + (a - o >> 1), t[s][0] <= c[0] ? o = s + 1 : a = s; if (r !== s) { for (i = r; i > o;) t[i] = t[--i]; t[o] = c; } } if (!n.next().done) throw TypeError(`Unreachable`); return t; } else { let e = 0; for (let { 0: n, 1: { value: r } } of this.headersMap) t[e++] = [n, r], l(r !== null); return t.sort(g); } } }, v = class e { #e; #t; constructor(e = void 0) { c.util.markAsUncloneable(this), e !== r && (this.#t = new _(), this.#e = `none`, e !== void 0 && (e = c.converters.HeadersInit(e, `Headers constructor`, `init`), p(this, e))); } append(t, n) { c.brandCheck(this, e), c.argumentLengthCheck(arguments, 2, `Headers.append`); let r = `Headers.append`; return t = c.converters.ByteString(t, r, `name`), n = c.converters.ByteString(n, r, `value`), m(this, t, n); } delete(t) { if (c.brandCheck(this, e), c.argumentLengthCheck(arguments, 1, `Headers.delete`), t = c.converters.ByteString(t, `Headers.delete`, `name`), !o(t)) throw c.errors.invalidArgument({ prefix: `Headers.delete`, value: t, type: `header name` }); if (this.#e === `immutable`) throw TypeError(`immutable`); this.#t.contains(t, !1) && this.#t.delete(t, !1); } get(t) { c.brandCheck(this, e), c.argumentLengthCheck(arguments, 1, `Headers.get`); let n = `Headers.get`; if (t = c.converters.ByteString(t, n, `name`), !o(t)) throw c.errors.invalidArgument({ prefix: n, value: t, type: `header name` }); return this.#t.get(t, !1); } has(t) { c.brandCheck(this, e), c.argumentLengthCheck(arguments, 1, `Headers.has`); let n = `Headers.has`; if (t = c.converters.ByteString(t, n, `name`), !o(t)) throw c.errors.invalidArgument({ prefix: n, value: t, type: `header name` }); return this.#t.contains(t, !1); } set(t, n) { c.brandCheck(this, e), c.argumentLengthCheck(arguments, 2, `Headers.set`); let r = `Headers.set`; if (t = c.converters.ByteString(t, r, `name`), n = c.converters.ByteString(n, r, `value`), n = f(n), !o(t)) throw c.errors.invalidArgument({ prefix: r, value: t, type: `header name` }); if (!s(n)) throw c.errors.invalidArgument({ prefix: r, value: n, type: `header value` }); if (this.#e === `immutable`) throw TypeError(`immutable`); this.#t.set(t, n, !1); } getSetCookie() { c.brandCheck(this, e); let t = this.#t.cookies; return t ? [...t] : []; } [u.inspect.custom](e, t) { return t.depth ??= e, `Headers ${u.formatWithOptions(t, this.#t.entries)}`; } static getHeadersGuard(e) { return e.#e; } static setHeadersGuard(e, t) { e.#e = t; } static getHeadersList(e) { return e.#t; } static setHeadersList(e, t) { e.#t = t; } }; let { getHeadersGuard: y, setHeadersGuard: b, getHeadersList: x, setHeadersList: S } = v; Reflect.deleteProperty(v, `getHeadersGuard`), Reflect.deleteProperty(v, `setHeadersGuard`), Reflect.deleteProperty(v, `getHeadersList`), Reflect.deleteProperty(v, `setHeadersList`), a(`Headers`, v, h, 0, 1), Object.defineProperties(v.prototype, { append: i, delete: i, get: i, has: i, set: i, getSetCookie: i, [Symbol.toStringTag]: { value: `Headers`, configurable: !0 }, [u.inspect.custom]: { enumerable: !1 } }), c.converters.HeadersInit = function(e, t, n) { if (c.util.Type(e) === c.util.Types.OBJECT) { let r = Reflect.get(e, Symbol.iterator); if (!u.types.isProxy(e) && r === v.prototype.entries) try { return x(e).entriesList; } catch {} return typeof r == `function` ? c.converters[`sequence>`](e, t, n, r.bind(e)) : c.converters[`record`](e, t, n); } throw c.errors.conversionFailed({ prefix: `Headers constructor`, argument: `Argument 1`, types: [`sequence>`, `record`] }); }, t.exports = { fill: p, compareHeaderName: g, Headers: v, HeadersList: _, getHeadersGuard: y, setHeadersGuard: b, setHeadersList: S, getHeadersList: x }; })); var gt = c$3(((e, t) => { let { Headers: r, HeadersList: i, fill: a, getHeadersGuard: o, setHeadersGuard: s, setHeadersList: c } = ht(), { extractBody: l, cloneBody: u, mixinBody: d, streamRegistry: f, bodyUnusable: p } = me(), m = B$1(), h = p$4(`node:util`), { kEnumerableProperty: g } = m, { isValidReasonPhrase: _, isCancelled: v, isAborted: y, isErrorLike: b, environmentSettingsObject: x } = Y$1(), { redirectStatusSet: S, nullBodyStatus: C } = se(), { webidl: w } = de(), { URLSerializer: T } = J$1(), { kConstruct: E } = I$1(), D = p$4(`node:assert`), { isomorphicEncode: O, serializeJavascriptValueToJSONString: k } = q$1(), A = new TextEncoder(`utf-8`); var j = class e { #e; #t; static error() { return W(ee(), `immutable`); } static json(e, t = void 0) { w.argumentLengthCheck(arguments, 1, `Response.json`), t !== null && (t = w.converters.ResponseInit(t)); let n = l(A.encode(k(e))), r = W(R({}), `response`); return U(r, t, { body: n[0], type: `application/json` }), r; } static redirect(e, t = 302) { w.argumentLengthCheck(arguments, 1, `Response.redirect`), e = w.converters.USVString(e), t = w.converters[`unsigned short`](t); let n; try { n = new URL(e, x.settingsObject.baseUrl); } catch (t) { throw TypeError(`Failed to parse URL from ${e}`, { cause: t }); } if (!S.has(t)) throw RangeError(`Invalid status code ${t}`); let r = W(R({}), `immutable`); r.#t.status = t; let i = O(T(n)); return r.#t.headersList.append(`location`, i, !0), r; } constructor(e = null, t = void 0) { if (w.util.markAsUncloneable(this), e === E) return; e !== null && (e = w.converters.BodyInit(e, `Response`, `body`)), t = w.converters.ResponseInit(t), this.#t = R({}), this.#e = new r(E), s(this.#e, `response`), c(this.#e, this.#t.headersList); let n = null; if (e != null) { let [t, r] = l(e); n = { body: t, type: r }; } U(this, t, n); } get type() { return w.brandCheck(this, e), this.#t.type; } get url() { w.brandCheck(this, e); let t = this.#t.urlList, n = t[t.length - 1] ?? null; return n === null ? `` : T(n, !0); } get redirected() { return w.brandCheck(this, e), this.#t.urlList.length > 1; } get status() { return w.brandCheck(this, e), this.#t.status; } get ok() { return w.brandCheck(this, e), this.#t.status >= 200 && this.#t.status <= 299; } get statusText() { return w.brandCheck(this, e), this.#t.statusText; } get headers() { return w.brandCheck(this, e), this.#e; } get body() { return w.brandCheck(this, e), this.#t.body ? this.#t.body.stream : null; } get bodyUsed() { return w.brandCheck(this, e), !!this.#t.body && m.isDisturbed(this.#t.body.stream); } clone() { if (w.brandCheck(this, e), p(this.#t)) throw w.errors.exception({ header: `Response.clone`, message: `Body has already been consumed.` }); let t = L(this.#t); return this.#t.urlList.length !== 0 && this.#t.body?.stream && f.register(this, new WeakRef(this.#t.body.stream)), W(t, o(this.#e)); } [h.inspect.custom](e, t) { t.depth === null && (t.depth = 2), t.colors ??= !0; let n = { status: this.status, statusText: this.statusText, headers: this.headers, body: this.body, bodyUsed: this.bodyUsed, ok: this.ok, redirected: this.redirected, type: this.type, url: this.url }; return `Response ${h.formatWithOptions(t, n)}`; } static getResponseHeaders(e) { return e.#e; } static setResponseHeaders(e, t) { e.#e = t; } static getResponseState(e) { return e.#t; } static setResponseState(e, t) { e.#t = t; } }; let { getResponseHeaders: M, setResponseHeaders: N, getResponseState: P, setResponseState: F } = j; Reflect.deleteProperty(j, `getResponseHeaders`), Reflect.deleteProperty(j, `setResponseHeaders`), Reflect.deleteProperty(j, `getResponseState`), Reflect.deleteProperty(j, `setResponseState`), d(j, P), Object.defineProperties(j.prototype, { type: g, url: g, status: g, ok: g, redirected: g, statusText: g, headers: g, clone: g, body: g, bodyUsed: g, [Symbol.toStringTag]: { value: `Response`, configurable: !0 } }), Object.defineProperties(j, { json: g, redirect: g, error: g }); function L(e) { if (e.internalResponse) return H(L(e.internalResponse), e.type); let t = R({ ...e, body: null }); return e.body != null && (t.body = u(e.body)), t; } function R(e) { return { aborted: !1, rangeRequested: !1, timingAllowPassed: !1, requestIncludesCredentials: !1, type: `default`, status: 200, timingInfo: null, cacheState: ``, statusText: ``, ...e, headersList: e?.headersList ? new i(e?.headersList) : new i(), urlList: e?.urlList ? [...e.urlList] : [] }; } function ee(e) { return R({ type: `error`, status: 0, error: b(e) ? e : Error(e && String(e)), aborted: e && e.name === `AbortError` }); } function z(e) { return e.type === `error` && e.status === 0; } function V(e, t) { return t = { internalResponse: e, ...t }, new Proxy(e, { get(e, n) { return n in t ? t[n] : e[n]; }, set(e, n, r) { return D(!(n in t)), e[n] = r, !0; } }); } function H(e, t) { if (t === `basic`) return V(e, { type: `basic`, headersList: e.headersList }); if (t === `cors`) return V(e, { type: `cors`, headersList: e.headersList }); if (t === `opaque`) return V(e, { type: `opaque`, urlList: [], status: 0, statusText: ``, body: null }); if (t === `opaqueredirect`) return V(e, { type: `opaqueredirect`, status: 0, statusText: ``, headersList: [], body: null }); D(!1); } function te(e, t = null) { return D(v(e)), y(e) ? ee(Object.assign(new DOMException(`The operation was aborted.`, `AbortError`), { cause: t })) : ee(Object.assign(new DOMException(`Request was cancelled.`), { cause: t })); } function U(e, t, n) { if (t.status !== null && (t.status < 200 || t.status > 599)) throw RangeError(`init["status"] must be in the range of 200 to 599, inclusive.`); if (`statusText` in t && t.statusText != null && !_(String(t.statusText))) throw TypeError(`Invalid statusText`); if (`status` in t && t.status != null && (P(e).status = t.status), `statusText` in t && t.statusText != null && (P(e).statusText = t.statusText), `headers` in t && t.headers != null && a(M(e), t.headers), n) { if (C.includes(e.status)) throw w.errors.exception({ header: `Response constructor`, message: `Invalid response status code ${e.status}` }); P(e).body = n.body, n.type != null && !P(e).headersList.contains(`content-type`, !0) && P(e).headersList.append(`content-type`, n.type, !0); } } function W(e, t) { let n = new j(E); F(n, e); let i = new r(E); return N(n, i), c(i, e.headersList), s(i, t), e.urlList.length !== 0 && e.body?.stream && f.register(n, new WeakRef(e.body.stream)), n; } w.converters.XMLHttpRequestBodyInit = function(e, t, n) { return typeof e == `string` ? w.converters.USVString(e, t, n) : w.is.Blob(e) || w.is.BufferSource(e) || w.is.FormData(e) || w.is.URLSearchParams(e) ? e : w.converters.DOMString(e, t, n); }, w.converters.BodyInit = function(e, t, n) { return w.is.ReadableStream(e) || e?.[Symbol.asyncIterator] ? e : w.converters.XMLHttpRequestBodyInit(e, t, n); }, w.converters.ResponseInit = w.dictionaryConverter([ { key: `status`, converter: w.converters[`unsigned short`], defaultValue: () => 200 }, { key: `statusText`, converter: w.converters.ByteString, defaultValue: () => `` }, { key: `headers`, converter: w.converters.HeadersInit } ]), w.is.Response = w.util.MakeTypeAssertion(j), t.exports = { isNetworkError: z, makeNetworkError: ee, makeResponse: R, makeAppropriateNetworkError: te, filterResponse: H, Response: j, cloneResponse: L, fromInnerResponse: W, getResponseState: P }; })); var _t = c$3(((e, t) => { let { extractBody: r, mixinBody: i, cloneBody: a, bodyUnusable: o } = me(), { Headers: s, fill: c, HeadersList: l, setHeadersGuard: u, getHeadersGuard: d, setHeadersList: f, getHeadersList: p } = ht(), m = B$1(), h = p$4(`node:util`), { isValidHTTPToken: g, sameOrigin: _, environmentSettingsObject: v } = Y$1(), { forbiddenMethodsSet: y, corsSafeListedMethodsSet: b, referrerPolicy: x, requestRedirect: S, requestMode: C, requestCredentials: w, requestCache: T, requestDuplex: E } = se(), { kEnumerableProperty: D, normalizedMethodRecordsBase: O, normalizedMethodRecords: k } = m, { webidl: A } = de(), { URLSerializer: j } = J$1(), { kConstruct: M } = I$1(), N = p$4(`node:assert`), { getMaxListeners: P, setMaxListeners: F, defaultMaxListeners: L } = p$4(`node:events`), R = Symbol(`abortController`), ee = new FinalizationRegistry(({ signal: e, abort: t }) => { e.removeEventListener(`abort`, t); }), z = /* @__PURE__ */ new WeakMap(), V; try { V = P(new AbortController().signal) > 0; } catch { V = !1; } function H(e) { return t; function t() { let n = e.deref(); if (n !== void 0) { ee.unregister(t), this.removeEventListener(`abort`, t), n.abort(this.reason); let e = z.get(n.signal); if (e !== void 0) { if (e.size !== 0) { for (let t of e) { let e = t.deref(); e !== void 0 && e.abort(this.reason); } e.clear(); } z.delete(n.signal); } } } } let te = !1; var U = class e { #e; #t; #n; #r; constructor(e, t = void 0) { if (A.util.markAsUncloneable(this), e === M) return; A.argumentLengthCheck(arguments, 1, `Request constructor`), e = A.converters.RequestInfo(e), t = A.converters.RequestInit(t); let n = null, i = null, a = v.settingsObject.baseUrl, d = null; if (typeof e == `string`) { this.#t = t.dispatcher; let r; try { r = new URL(e, a); } catch (t) { throw TypeError(`Failed to parse URL from ` + e, { cause: t }); } if (r.username || r.password) throw TypeError(`Request cannot be constructed from a URL that includes credentials: ` + e); n = ae({ urlList: [r] }), i = `cors`; } else N(A.is.Request(e)), n = e.#r, d = e.#e, this.#t = t.dispatcher || e.#t; let h = v.settingsObject.origin, x = `client`; if (n.window?.constructor?.name === `EnvironmentSettingsObject` && _(n.window, h) && (x = n.window), t.window != null) throw TypeError(`'window' option '${x}' must be null`); `window` in t && (x = `no-window`), n = ae({ method: n.method, headersList: n.headersList, unsafeRequest: n.unsafeRequest, client: v.settingsObject, window: x, priority: n.priority, origin: n.origin, referrer: n.referrer, referrerPolicy: n.referrerPolicy, mode: n.mode, credentials: n.credentials, cache: n.cache, redirect: n.redirect, integrity: n.integrity, keepalive: n.keepalive, reloadNavigation: n.reloadNavigation, historyNavigation: n.historyNavigation, urlList: [...n.urlList] }); let S = Object.keys(t).length !== 0; if (S && (n.mode === `navigate` && (n.mode = `same-origin`), n.reloadNavigation = !1, n.historyNavigation = !1, n.origin = `client`, n.referrer = `client`, n.referrerPolicy = ``, n.url = n.urlList[n.urlList.length - 1], n.urlList = [n.url]), t.referrer !== void 0) { let e = t.referrer; if (e === ``) n.referrer = `no-referrer`; else { let t; try { t = new URL(e, a); } catch (t) { throw TypeError(`Referrer "${e}" is not a valid URL.`, { cause: t }); } t.protocol === `about:` && t.hostname === `client` || h && !_(t, v.settingsObject.baseUrl) ? n.referrer = `client` : n.referrer = t; } } t.referrerPolicy !== void 0 && (n.referrerPolicy = t.referrerPolicy); let C; if (C = t.mode === void 0 ? i : t.mode, C === `navigate`) throw A.errors.exception({ header: `Request constructor`, message: `invalid request mode navigate.` }); if (C != null && (n.mode = C), t.credentials !== void 0 && (n.credentials = t.credentials), t.cache !== void 0 && (n.cache = t.cache), n.cache === `only-if-cached` && n.mode !== `same-origin`) throw TypeError(`'only-if-cached' can be set only with 'same-origin' mode`); if (t.redirect !== void 0 && (n.redirect = t.redirect), t.integrity != null && (n.integrity = String(t.integrity)), t.keepalive !== void 0 && (n.keepalive = !!t.keepalive), t.method !== void 0) { let e = t.method, r = k[e]; if (r !== void 0) n.method = r; else { if (!g(e)) throw TypeError(`'${e}' is not a valid HTTP method.`); let t = e.toUpperCase(); if (y.has(t)) throw TypeError(`'${e}' HTTP method is unsupported.`); e = O[t] ?? e, n.method = e; } !te && n.method === `patch` && (process.emitWarning("Using `patch` is highly likely to result in a `405 Method Not Allowed`. `PATCH` is much more likely to succeed.", { code: `UNDICI-FETCH-patch` }), te = !0); } t.signal !== void 0 && (d = t.signal), this.#r = n; let w = new AbortController(); if (this.#e = w.signal, d != null) if (d.aborted) w.abort(d.reason); else { this[R] = w; let e = H(new WeakRef(w)); V && P(d) === L && F(1500, d), m.addAbortListener(d, e), ee.register(w, { signal: d, abort: e }, e); } if (this.#n = new s(M), f(this.#n, n.headersList), u(this.#n, `request`), C === `no-cors`) { if (!b.has(n.method)) throw TypeError(`'${n.method} is unsupported in no-cors mode.`); u(this.#n, `request-no-cors`); } if (S) { let e = p(this.#n), n = t.headers === void 0 ? new l(e) : t.headers; if (e.clear(), n instanceof l) { for (let { name: t, value: r } of n.rawValues()) e.append(t, r, !1); e.cookies = n.cookies; } else c(this.#n, n); } let T = A.is.Request(e) ? e.#r.body : null; if ((t.body != null || T != null) && (n.method === `GET` || n.method === `HEAD`)) throw TypeError(`Request with GET/HEAD method cannot have body.`); let E = null; if (t.body != null) { let [e, i] = r(t.body, n.keepalive); E = e, i && !p(this.#n).contains(`content-type`, !0) && this.#n.append(`content-type`, i, !0); } let D = E ?? T; if (D != null && D.source == null) { if (E != null && t.duplex == null) throw TypeError(`RequestInit: duplex option is required when sending a body.`); if (n.mode !== `same-origin` && n.mode !== `cors`) throw TypeError(`If request is made from ReadableStream, mode should be "same-origin" or "cors"`); n.useCORSPreflightFlag = !0; } let j = D; if (E == null && T != null) { if (o(e.#r)) throw TypeError(`Cannot construct a Request with a Request object that has already been used.`); let t = new TransformStream(); T.stream.pipeThrough(t), j = { source: T.source, length: T.length, stream: t.readable }; } this.#r.body = j; } get method() { return A.brandCheck(this, e), this.#r.method; } get url() { return A.brandCheck(this, e), j(this.#r.url); } get headers() { return A.brandCheck(this, e), this.#n; } get destination() { return A.brandCheck(this, e), this.#r.destination; } get referrer() { return A.brandCheck(this, e), this.#r.referrer === `no-referrer` ? `` : this.#r.referrer === `client` ? `about:client` : this.#r.referrer.toString(); } get referrerPolicy() { return A.brandCheck(this, e), this.#r.referrerPolicy; } get mode() { return A.brandCheck(this, e), this.#r.mode; } get credentials() { return A.brandCheck(this, e), this.#r.credentials; } get cache() { return A.brandCheck(this, e), this.#r.cache; } get redirect() { return A.brandCheck(this, e), this.#r.redirect; } get integrity() { return A.brandCheck(this, e), this.#r.integrity; } get keepalive() { return A.brandCheck(this, e), this.#r.keepalive; } get isReloadNavigation() { return A.brandCheck(this, e), this.#r.reloadNavigation; } get isHistoryNavigation() { return A.brandCheck(this, e), this.#r.historyNavigation; } get signal() { return A.brandCheck(this, e), this.#e; } get body() { return A.brandCheck(this, e), this.#r.body ? this.#r.body.stream : null; } get bodyUsed() { return A.brandCheck(this, e), !!this.#r.body && m.isDisturbed(this.#r.body.stream); } get duplex() { return A.brandCheck(this, e), `half`; } clone() { if (A.brandCheck(this, e), o(this.#r)) throw TypeError(`unusable`); let t = oe(this.#r), n = new AbortController(); if (this.signal.aborted) n.abort(this.signal.reason); else { let e = z.get(this.signal); e === void 0 && (e = /* @__PURE__ */ new Set(), z.set(this.signal, e)); let t = new WeakRef(n); e.add(t), m.addAbortListener(n.signal, H(t)); } return ce(t, this.#t, n.signal, d(this.#n)); } [h.inspect.custom](e, t) { t.depth === null && (t.depth = 2), t.colors ??= !0; let n = { method: this.method, url: this.url, headers: this.headers, destination: this.destination, referrer: this.referrer, referrerPolicy: this.referrerPolicy, mode: this.mode, credentials: this.credentials, cache: this.cache, redirect: this.redirect, integrity: this.integrity, keepalive: this.keepalive, isReloadNavigation: this.isReloadNavigation, isHistoryNavigation: this.isHistoryNavigation, signal: this.signal }; return `Request ${h.formatWithOptions(t, n)}`; } static setRequestSignal(e, t) { return e.#e = t, e; } static getRequestDispatcher(e) { return e.#t; } static setRequestDispatcher(e, t) { e.#t = t; } static setRequestHeaders(e, t) { e.#n = t; } static getRequestState(e) { return e.#r; } static setRequestState(e, t) { e.#r = t; } }; let { setRequestSignal: W, getRequestDispatcher: ne, setRequestDispatcher: G, setRequestHeaders: K, getRequestState: re, setRequestState: ie } = U; Reflect.deleteProperty(U, `setRequestSignal`), Reflect.deleteProperty(U, `getRequestDispatcher`), Reflect.deleteProperty(U, `setRequestDispatcher`), Reflect.deleteProperty(U, `setRequestHeaders`), Reflect.deleteProperty(U, `getRequestState`), Reflect.deleteProperty(U, `setRequestState`), i(U, re); function ae(e) { return { method: e.method ?? `GET`, localURLsOnly: e.localURLsOnly ?? !1, unsafeRequest: e.unsafeRequest ?? !1, body: e.body ?? null, client: e.client ?? null, reservedClient: e.reservedClient ?? null, replacesClientId: e.replacesClientId ?? ``, window: e.window ?? `client`, keepalive: e.keepalive ?? !1, serviceWorkers: e.serviceWorkers ?? `all`, initiator: e.initiator ?? ``, destination: e.destination ?? ``, priority: e.priority ?? null, origin: e.origin ?? `client`, policyContainer: e.policyContainer ?? `client`, referrer: e.referrer ?? `client`, referrerPolicy: e.referrerPolicy ?? ``, mode: e.mode ?? `no-cors`, useCORSPreflightFlag: e.useCORSPreflightFlag ?? !1, credentials: e.credentials ?? `same-origin`, useCredentials: e.useCredentials ?? !1, cache: e.cache ?? `default`, redirect: e.redirect ?? `follow`, integrity: e.integrity ?? ``, cryptoGraphicsNonceMetadata: e.cryptoGraphicsNonceMetadata ?? ``, parserMetadata: e.parserMetadata ?? ``, reloadNavigation: e.reloadNavigation ?? !1, historyNavigation: e.historyNavigation ?? !1, userActivation: e.userActivation ?? !1, taintedOrigin: e.taintedOrigin ?? !1, redirectCount: e.redirectCount ?? 0, responseTainting: e.responseTainting ?? `basic`, preventNoCacheCacheControlHeaderModification: e.preventNoCacheCacheControlHeaderModification ?? !1, done: e.done ?? !1, timingAllowFailed: e.timingAllowFailed ?? !1, useURLCredentials: e.useURLCredentials ?? void 0, traversableForUserPrompts: e.traversableForUserPrompts ?? `client`, urlList: e.urlList, url: e.urlList[0], headersList: e.headersList ? new l(e.headersList) : new l() }; } function oe(e) { let t = ae({ ...e, body: null }); return e.body != null && (t.body = a(e.body)), t; } function ce(e, t, n, r) { let i = new U(M); ie(i, e), G(i, t), W(i, n); let a = new s(M); return K(i, a), f(a, e.headersList), u(a, r), i; } Object.defineProperties(U.prototype, { method: D, url: D, headers: D, redirect: D, clone: D, signal: D, duplex: D, destination: D, body: D, bodyUsed: D, isHistoryNavigation: D, isReloadNavigation: D, keepalive: D, integrity: D, cache: D, credentials: D, attribute: D, referrerPolicy: D, referrer: D, mode: D, [Symbol.toStringTag]: { value: `Request`, configurable: !0 } }), A.is.Request = A.util.MakeTypeAssertion(U), A.converters.RequestInfo = function(e) { return typeof e == `string` ? A.converters.USVString(e) : A.is.Request(e) ? e : A.converters.USVString(e); }, A.converters.RequestInit = A.dictionaryConverter([ { key: `method`, converter: A.converters.ByteString }, { key: `headers`, converter: A.converters.HeadersInit }, { key: `body`, converter: A.nullableConverter(A.converters.BodyInit) }, { key: `referrer`, converter: A.converters.USVString }, { key: `referrerPolicy`, converter: A.converters.DOMString, allowedValues: x }, { key: `mode`, converter: A.converters.DOMString, allowedValues: C }, { key: `credentials`, converter: A.converters.DOMString, allowedValues: w }, { key: `cache`, converter: A.converters.DOMString, allowedValues: T }, { key: `redirect`, converter: A.converters.DOMString, allowedValues: S }, { key: `integrity`, converter: A.converters.DOMString }, { key: `keepalive`, converter: A.converters.boolean }, { key: `signal`, converter: A.nullableConverter((e) => A.converters.AbortSignal(e, `RequestInit`, `signal`)) }, { key: `window`, converter: A.converters.any }, { key: `duplex`, converter: A.converters.DOMString, allowedValues: E }, { key: `dispatcher`, converter: A.converters.any }, { key: `priority`, converter: A.converters.DOMString, allowedValues: [ `high`, `low`, `auto` ], defaultValue: () => `auto` } ]), t.exports = { Request: U, makeRequest: ae, fromInnerRequest: ce, cloneRequest: oe, getRequestDispatcher: ne, getRequestState: re }; })); var vt = c$3(((e, t) => { let r = p$4(`node:assert`), { runtimeFeatures: i } = ue(), a = /* @__PURE__ */ new Map([ [`sha256`, 0], [`sha384`, 1], [`sha512`, 2] ]), o; if (i.has(`crypto`)) { o = p$4(`node:crypto`); let e = o.getHashes(); e.length === 0 && a.clear(); for (let t of a.keys()) e.includes(t) === !1 && a.delete(t); } else a.clear(); let s = Map.prototype.get.bind(a), c = Map.prototype.has.bind(a), l = i.has(`crypto`) === !1 || a.size === 0 ? () => !0 : (e, t) => { let n = d(t); if (n.length === 0) return !0; let r = u(n); for (let t of r) { let n = t.alg, r = t.val; if (p(f(n, e), r)) return !0; } return !1; }; function u(e) { let t = [], n = null; for (let i of e) { if (r(c(i.alg), `Invalid SRI hash algorithm token`), t.length === 0) { t.push(i), n = i; continue; } let e = n.alg, a = s(e), o = i.alg, l = s(o); l < a || (l > a ? (n = i, t[0] = i, t.length = 1) : t.push(i)); } return t; } function d(e) { let t = []; for (let n of e.split(` `)) { let e = n.split(`?`, 1)[0], r = ``, i = [e.slice(0, 6), e.slice(7)], a = i[0]; if (!c(a)) continue; i[1] && (r = i[1]); let o = { alg: a, val: r }; t.push(o); } return t; } let f = (e, t) => o.hash(e, t, `base64`); function p(e, t) { let n = e.length; n !== 0 && e[n - 1] === `=` && --n, n !== 0 && e[n - 1] === `=` && --n; let r = t.length; if (r !== 0 && t[r - 1] === `=` && --r, r !== 0 && t[r - 1] === `=` && --r, n !== r) return !1; for (let r = 0; r < n; ++r) if (!(e[r] === t[r] || e[r] === `+` && t[r] === `-` || e[r] === `/` && t[r] === `_`)) return !1; return !0; } t.exports = { applyAlgorithmToBytes: f, bytesMatch: l, caseSensitiveMatch: p, isValidSRIHashAlgorithm: c, getStrongestMetadata: u, parseMetadata: d }; })); var yt = c$3(((e, t) => { let { makeNetworkError: r, makeAppropriateNetworkError: i, filterResponse: a, makeResponse: o, fromInnerResponse: s, getResponseState: c } = gt(), { HeadersList: l } = ht(), { Request: u, cloneRequest: d, getRequestDispatcher: f, getRequestState: p } = _t(), m = p$4(`node:zlib`), { makePolicyContainer: h, clonePolicyContainer: g, requestBadPort: _, TAOCheck: v, appendRequestOriginHeader: y, responseLocationURL: b, requestCurrentURL: x, setRequestReferrerPolicyOnRedirect: S, tryUpgradeRequestToAPotentiallyTrustworthyURL: C, createOpaqueTimingInfo: w, appendFetchMetadata: T, corsCheck: E, crossOriginResourcePolicyCheck: D, determineRequestsReferrer: O, coarsenedSharedCurrentTime: k, sameOrigin: A, isCancelled: j, isAborted: M, isErrorLike: N, fullyReadBody: P, readableStreamClose: F, urlIsLocal: I, urlIsHttpHttpsScheme: L, urlHasHttpsScheme: R, clampAndCoarsenConnectionTimingInfo: ee, simpleRangeHeaderValue: z, buildContentRange: V, createInflate: H, extractMimeType: te, hasAuthenticationEntry: U, includesCredentials: W, isTraversableNavigable: ne } = Y$1(), G = p$4(`node:assert`), { safelyExtractBody: K, extractBody: re } = me(), { redirectStatusSet: ie, nullBodyStatus: ae, safeMethodsSet: oe, requestBodyHeader: ce, subresourceSet: le } = se(), fe = p$4(`node:events`), { Readable: pe, pipeline: he, finished: ge, isErrored: Z, isReadable: _e } = p$4(`node:stream`), { addAbortListener: ve, bufferToLowerCasedHeaderName: ye } = B$1(), { dataURLProcessor: be, serializeAMimeType: xe, minimizeSupportedMimeType: Se } = J$1(), { getGlobalDispatcher: Ce } = Ze(), { webidl: we } = de(), { STATUS_CODES: Te } = p$4(`node:http`), { bytesMatch: Ee } = vt(), { createDeferredPromise: De } = X$1(), { isomorphicEncode: Oe } = q$1(), { runtimeFeatures: ke } = ue(), Ae = ke.has(`zstd`), je = [`GET`, `HEAD`], Me = typeof __UNDICI_IS_NODE__ < `u` || typeof esbuildDetection < `u` ? `node` : `undici`, Ne; var Pe = class extends fe { constructor(e) { super(), this.dispatcher = e, this.connection = null, this.dump = !1, this.state = `ongoing`; } terminate(e) { this.state === `ongoing` && (this.state = `terminated`, this.connection?.destroy(e), this.emit(`terminated`, e)); } abort(e) { this.state === `ongoing` && (this.state = `aborted`, e ||= new DOMException(`The operation was aborted.`, `AbortError`), this.serializedAbortReason = e, this.connection?.destroy(e), this.emit(`terminated`, e)); } }; function Fe(e) { Le(e, `fetch`); } function Ie(e, t = void 0) { we.argumentLengthCheck(arguments, 1, `globalThis.fetch`); let n = De(), r; try { r = new u(e, t); } catch (e) { return n.reject(e), n.promise; } let i = p(r); if (r.signal.aborted) return ze(n, i, null, r.signal.reason, null), n.promise; i.client.globalObject?.constructor?.name === `ServiceWorkerGlobalScope` && (i.serviceWorkers = `none`); let a = null, o = !1, c = null; return ve(r.signal, () => { o = !0, G(c != null), c.abort(r.signal.reason); let e = a?.deref(); ze(n, i, e, r.signal.reason, c.controller); }), c = Be({ request: i, processResponseEndOfBody: Fe, processResponse: (e) => { if (!o) { if (e.aborted) { ze(n, i, a, c.serializedAbortReason, c.controller); return; } if (e.type === `error`) { n.reject(TypeError(`fetch failed`, { cause: e.error })); return; } a = new WeakRef(s(e, `immutable`)), n.resolve(a.deref()), n = null; } }, dispatcher: f(r), requestObject: r }), n.promise; } function Le(e, t = `other`) { if (e.type === `error` && e.aborted || !e.urlList?.length) return; let n = e.urlList[0], r = e.timingInfo, i = e.cacheState; L(n) && r !== null && (e.timingAllowPassed || (r = w({ startTime: r.startTime }), i = ``), r.endTime = k(), e.timingInfo = r, Re(r, n.href, t, globalThis, i, ``, e.status)); } let Re = performance.markResourceTiming; function ze(e, t, n, r, i) { if (e && e.reject(r), t.body?.stream != null && _e(t.body.stream) && t.body.stream.cancel(r).catch((e) => { if (e.code !== `ERR_INVALID_STATE`) throw e; }), n == null) return; let a = c(n); a.body?.stream != null && _e(a.body.stream) && i.error(r); } function Be({ request: e, processRequestBodyChunkLength: t, processRequestEndOfBody: n, processResponse: r, processResponseEndOfBody: i, processResponseConsumeBody: a, useParallelQueue: o = !1, dispatcher: s = Ce(), requestObject: c = null }) { G(s); let l = null, u = !1; e.client != null && (l = e.client.globalObject, u = e.client.crossOriginIsolatedCapability); let d = w({ startTime: k(u) }), f = { controller: new Pe(s), request: e, timingInfo: d, processRequestBodyChunkLength: t, processRequestEndOfBody: n, processResponse: r, processResponseConsumeBody: a, processResponseEndOfBody: i, taskDestination: l, crossOriginIsolatedCapability: u, requestObject: c }; return G(!e.body || e.body.stream), e.window === `client` && (e.window = e.client?.globalObject?.constructor?.name === `Window` ? e.client : `no-window`), e.origin === `client` && (e.origin = e.client.origin), e.policyContainer === `client` && (e.client == null ? e.policyContainer = h() : e.policyContainer = g(e.client.policyContainer)), e.headersList.contains(`accept`, !0) || e.headersList.append(`accept`, `*/*`, !0), e.headersList.contains(`accept-language`, !0) || e.headersList.append(`accept-language`, `*`, !0), e.priority, le.has(e.destination), Ve(f, !1), f.controller; } async function Ve(e, t) { try { let n = e.request, i = null; if (n.localURLsOnly && !I(x(n)) && (i = r(`local URLs only`)), C(n), _(n) === `blocked` && (i = r(`bad port`)), n.referrerPolicy === `` && (n.referrerPolicy = n.policyContainer.referrerPolicy), n.referrer !== `no-referrer` && (n.referrer = O(n)), i === null) { let t = x(n); A(t, n.url) && n.responseTainting === `basic` || t.protocol === `data:` || n.mode === `navigate` || n.mode === `websocket` ? (n.responseTainting = `basic`, i = await He(e)) : n.mode === `same-origin` ? i = r(`request mode cannot be "same-origin"`) : n.mode === `no-cors` ? n.redirect === `follow` ? (n.responseTainting = `opaque`, i = await He(e)) : i = r(`redirect mode cannot be "follow" for "no-cors" request`) : L(x(n)) ? (n.responseTainting = `cors`, i = await Ge(e)) : i = r(`URL scheme must be a HTTP(S) scheme`); } if (t) return i; i.status !== 0 && !i.internalResponse && (n.responseTainting, n.responseTainting === `basic` ? i = a(i, `basic`) : n.responseTainting === `cors` ? i = a(i, `cors`) : n.responseTainting === `opaque` ? i = a(i, `opaque`) : G(!1)); let o = i.status === 0 ? i : i.internalResponse; if (o.urlList.length === 0 && o.urlList.push(...n.urlList), n.timingAllowFailed || (i.timingAllowPassed = !0), i.type === `opaque` && o.status === 206 && o.rangeRequested && !n.headers.contains(`range`, !0) && (i = o = r()), i.status !== 0 && (n.method === `HEAD` || n.method === `CONNECT` || ae.includes(o.status)) && (o.body = null, e.controller.dump = !0), n.integrity) { let t = (t) => We(e, r(t)); if (n.responseTainting === `opaque` || i.body == null) { t(i.error); return; } P(i.body, (r) => { if (!Ee(r, n.integrity)) { t(`integrity mismatch`); return; } i.body = K(r)[0], We(e, i); }, t); } else We(e, i); } catch (t) { e.controller.terminate(t); } } function He(e) { if (j(e) && e.request.redirectCount === 0) return Promise.resolve(i(e)); let { request: t } = e, { protocol: a } = x(t); switch (a) { case `about:`: return Promise.resolve(r(`about scheme is not supported`)); case `blob:`: { Ne ||= p$4(`node:buffer`).resolveObjectURL; let e = x(t); if (e.search.length !== 0) return Promise.resolve(r(`NetworkError when attempting to fetch resource.`)); let i = Ne(e.toString()); if (t.method !== `GET` || !we.is.Blob(i)) return Promise.resolve(r(`invalid method`)); let a = o(), s = i.size, c = Oe(`${s}`), l = i.type; if (t.headersList.contains(`range`, !0)) { a.rangeRequested = !0; let e = z(t.headersList.get(`range`, !0), !0); if (e === `failure`) return Promise.resolve(r(`failed to fetch the data URL`)); let { rangeStartValue: n, rangeEndValue: o } = e; if (n === null) n = s - o, o = n + o - 1; else { if (n >= s) return Promise.resolve(r(`Range start is greater than the blob's size.`)); (o === null || o >= s) && (o = s - 1); } let c = i.slice(n, o + 1, l); a.body = re(c)[0]; let u = Oe(`${c.size}`), d = V(n, o, s); a.status = 206, a.statusText = `Partial Content`, a.headersList.set(`content-length`, u, !0), a.headersList.set(`content-type`, l, !0), a.headersList.set(`content-range`, d, !0); } else { let e = re(i); a.statusText = `OK`, a.body = e[0], a.headersList.set(`content-length`, c, !0), a.headersList.set(`content-type`, l, !0); } return Promise.resolve(a); } case `data:`: { let e = be(x(t)); if (e === `failure`) return Promise.resolve(r(`failed to fetch the data URL`)); let n = xe(e.mimeType); return Promise.resolve(o({ statusText: `OK`, headersList: [[`content-type`, { name: `Content-Type`, value: n }]], body: K(e.body)[0] })); } case `file:`: return Promise.resolve(r(`not implemented... yet...`)); case `http:`: case `https:`: return Ge(e).catch((e) => r(e)); default: return Promise.resolve(r(`unknown scheme`)); } } function Ue(e, t) { e.request.done = !0, e.processResponseDone != null && queueMicrotask(() => e.processResponseDone(t)); } function We(e, t) { let n = e.timingInfo, r = () => { let r = Date.now(); e.request.destination === `document` && (e.controller.fullTimingInfo = n), e.controller.reportTimingSteps = () => { if (!L(e.request.url)) return; n.endTime = r; let i = t.cacheState, a = t.bodyInfo; t.timingAllowPassed || (n = w(n), i = ``); let o = 0; if (e.request.mode !== `navigate` || !t.hasCrossOriginRedirects) { o = t.status; let e = te(t.headersList); e !== `failure` && (a.contentType = Se(e)); } e.request.initiatorType != null && Re(n, e.request.url.href, e.request.initiatorType, globalThis, i, a, o); }; let i = () => { e.request.done = !0, e.processResponseEndOfBody != null && queueMicrotask(() => e.processResponseEndOfBody(t)), e.request.initiatorType != null && e.controller.reportTimingSteps(); }; queueMicrotask(() => i()); }; e.processResponse != null && queueMicrotask(() => { e.processResponse(t), e.processResponse = null; }); let i = t.type === `error` ? t : t.internalResponse ?? t; i.body == null ? r() : ge(i.body.stream, () => { r(); }); } async function Ge(e) { let t = e.request, n = null, i = null, a = e.timingInfo; if (t.serviceWorkers, n === null) { if (t.redirect === `follow` && (t.serviceWorkers = `none`), i = n = await qe(e), t.responseTainting === `cors` && E(t, n) === `failure`) return r(`cors failure`); v(t, n) === `failure` && (t.timingAllowFailed = !0); } return (t.responseTainting === `opaque` || n.type === `opaque`) && D(t.origin, t.client, t.destination, i) === `blocked` ? r(`blocked`) : (ie.has(i.status) && (t.redirect !== `manual` && e.controller.connection.destroy(void 0, !1), t.redirect === `error` ? n = r(`unexpected redirect`) : t.redirect === `manual` ? n = i : t.redirect === `follow` ? n = await Ke(e, n) : G(!1)), n.timingInfo = a, n); } function Ke(e, t) { let n = e.request, i = t.internalResponse ? t.internalResponse : t, a; try { if (a = b(i, x(n).hash), a == null) return t; } catch (e) { return Promise.resolve(r(e)); } if (!L(a)) return Promise.resolve(r(`URL scheme must be a HTTP(S) scheme`)); if (n.redirectCount === 20) return Promise.resolve(r(`redirect count exceeded`)); if (n.redirectCount += 1, n.mode === `cors` && (a.username || a.password) && !A(n, a)) return Promise.resolve(r(`cross origin not allowed for request mode "cors"`)); if (n.responseTainting === `cors` && (a.username || a.password)) return Promise.resolve(r(`URL cannot contain credentials for request mode "cors"`)); if (i.status !== 303 && n.body != null && n.body.source == null) return Promise.resolve(r()); if ([301, 302].includes(i.status) && n.method === `POST` || i.status === 303 && !je.includes(n.method)) { n.method = `GET`, n.body = null; for (let e of ce) n.headersList.delete(e); } A(x(n), a) || (n.headersList.delete(`authorization`, !0), n.headersList.delete(`proxy-authorization`, !0), n.headersList.delete(`cookie`, !0), n.headersList.delete(`host`, !0)), n.body != null && (G(n.body.source != null), n.body = K(n.body.source)[0]); let o = e.timingInfo; return o.redirectEndTime = o.postRedirectStartTime = k(e.crossOriginIsolatedCapability), o.redirectStartTime === 0 && (o.redirectStartTime = o.startTime), n.urlList.push(a), S(n, i), Ve(e, !0); } async function qe(e, t = !1, n = !1) { let a = e.request, o = null, s = null, c = null; a.window === `no-window` && a.redirect === `error` ? (o = e, s = a) : (s = d(a), o = { ...e }, o.request = s); let l = a.credentials === `include` || a.credentials === `same-origin` && a.responseTainting === `basic`, u = s.body ? s.body.length : null, f = null; if (s.body == null && [`POST`, `PUT`].includes(s.method) && (f = `0`), u != null && (f = Oe(`${u}`)), f != null && !s.headersList.contains(`content-length`, !0) && s.headersList.append(`content-length`, f, !0), u != null && s.keepalive, we.is.URL(s.referrer) && s.headersList.append(`referer`, Oe(s.referrer.href), !0), y(s), T(s), s.headersList.contains(`user-agent`, !0) || s.headersList.append(`user-agent`, Me, !0), s.cache === "default" && (s.headersList.contains(`if-modified-since`, !0) || s.headersList.contains(`if-none-match`, !0) || s.headersList.contains(`if-unmodified-since`, !0) || s.headersList.contains(`if-match`, !0) || s.headersList.contains(`if-range`, !0)) && (s.cache = `no-store`), s.cache === `no-cache` && !s.preventNoCacheCacheControlHeaderModification && !s.headersList.contains(`cache-control`, !0) && s.headersList.append(`cache-control`, `max-age=0`, !0), (s.cache === `no-store` || s.cache === `reload`) && (s.headersList.contains(`pragma`, !0) || s.headersList.append(`pragma`, `no-cache`, !0), s.headersList.contains(`cache-control`, !0) || s.headersList.append(`cache-control`, `no-cache`, !0)), s.headersList.contains(`range`, !0) && s.headersList.append(`accept-encoding`, `identity`, !0), s.headersList.contains(`accept-encoding`, !0) || (R(x(s)) ? s.headersList.append(`accept-encoding`, `br, gzip, deflate`, !0) : s.headersList.append(`accept-encoding`, `gzip, deflate`, !0)), s.headersList.delete(`host`, !0), l && !s.headersList.contains(`authorization`, !0)) { let e = null; if (!(U(s) && (s.useURLCredentials === void 0 || !W(x(s)))) && W(x(s)) && t) { let { username: t, password: n } = x(s); e = `Basic ${Buffer.from(`${t}:${n}`).toString(`base64`)}`; } e !== null && s.headersList.append(`Authorization`, e, !1); } if (s.cache = `no-store`, s.cache !== `no-store` && s.cache, c == null) { if (s.cache === `only-if-cached`) return r(`only if cached`); let e = await Je(o, l, n); !oe.has(s.method) && e.status >= 200 && e.status, c ??= e; } if (c.urlList = [...s.urlList], s.headersList.contains(`range`, !0) && (c.rangeRequested = !0), c.requestIncludesCredentials = l, c.status === 401 && s.responseTainting !== `cors` && l && (a.useURLCredentials !== void 0 || ne(a.traversableForUserPrompts))) { if (a.body != null) { if (a.body.source == null) return c; a.body = K(a.body.source)[0]; } if (a.useURLCredentials === void 0 || t) return j(e) ? i(e) : c; e.controller.connection.destroy(), c = await qe(e, !0); } if (c.status === 407) return a.window === `no-window` ? r() : j(e) ? i(e) : r(`proxy authentication required`); if (c.status === 421 && !n && (a.body == null || a.body.source != null)) { if (j(e)) return i(e); e.controller.connection.destroy(), c = await qe(e, t, !0); } return c; } async function Je(e, t = !1, n = !1) { G(!e.controller.connection || e.controller.connection.destroyed), e.controller.connection = { abort: null, destroyed: !1, destroy(e, t = !0) { this.destroyed || (this.destroyed = !0, t && this.abort?.(e ?? new DOMException(`The operation was aborted.`, `AbortError`))); } }; let a = e.request, s = null, c = e.timingInfo; a.cache = `no-store`, a.mode; let u = null; if (a.body == null && e.processRequestEndOfBody) queueMicrotask(() => e.processRequestEndOfBody()); else if (a.body != null) { let t = async function* (t) { j(e) || (yield t, e.processRequestBodyChunkLength?.(t.byteLength)); }, n = () => { j(e) || e.processRequestEndOfBody && e.processRequestEndOfBody(); }, r = (t) => { j(e) || (t.name === `AbortError` ? e.controller.abort() : e.controller.terminate(t)); }; u = (async function* () { try { for await (let e of a.body.stream) yield* t(e); n(); } catch (e) { r(e); } })(); } try { let { body: t, status: n, statusText: r, headersList: i, socket: a } = await p({ body: u }); if (a) s = o({ status: n, statusText: r, headersList: i, socket: a }); else { let a = t[Symbol.asyncIterator](); e.controller.next = () => a.next(), s = o({ status: n, statusText: r, headersList: i }); } } catch (t) { return t.name === `AbortError` ? (e.controller.connection.destroy(), i(e, t)) : r(t); } let d = new ReadableStream({ start(t) { e.controller.controller = t; }, pull: () => e.controller.resume(), cancel: (t) => { j(e) || e.controller.abort(t); }, type: `bytes` }); s.body = { stream: d, source: null, length: null }, e.controller.resume || e.controller.on(`terminated`, f), e.controller.resume = async () => { for (;;) { let t, n; try { let { done: n, value: r } = await e.controller.next(); if (M(e)) break; t = n ? void 0 : r; } catch (r) { e.controller.ended && !c.encodedBodySize ? t = void 0 : (t = r, n = !0); } if (t === void 0) { F(e.controller.controller), Ue(e, s); return; } if (c.decodedBodySize += t?.byteLength ?? 0, n) { e.controller.terminate(t); return; } let r = new Uint8Array(t); if (r.byteLength && e.controller.controller.enqueue(r), Z(d)) { e.controller.terminate(); return; } if (e.controller.controller.desiredSize <= 0) return; } }; function f(t) { M(e) ? (s.aborted = !0, _e(d) && e.controller.controller.error(e.controller.serializedAbortReason)) : _e(d) && e.controller.controller.error(TypeError(`terminated`, { cause: N(t) ? t : void 0 })), e.controller.connection.destroy(); } return s; function p({ body: t }) { let n = x(a), r = e.controller.dispatcher, i = n.pathname + n.search, o = n.search.length === 0 && n.href[n.href.length - n.hash.length - 1] === `?`; return new Promise((s, u) => r.dispatch({ path: o ? `${i}?` : i, origin: n.origin, method: a.method, body: r.isMockActive ? a.body && (a.body.source || a.body.stream) : t, headers: a.headersList.entries, maxRedirections: 0, upgrade: a.mode === `websocket` ? `websocket` : void 0 }, { body: null, abort: null, onConnect(t) { let { connection: n } = e.controller; c.finalConnectionTimingInfo = ee(void 0, c.postRedirectStartTime, e.crossOriginIsolatedCapability), n.destroyed ? t(new DOMException(`The operation was aborted.`, `AbortError`)) : (e.controller.on(`terminated`, t), this.abort = n.abort = t), c.finalNetworkRequestStartTime = k(e.crossOriginIsolatedCapability); }, onResponseStarted() { c.finalNetworkResponseStartTime = k(e.crossOriginIsolatedCapability); }, onHeaders(e, t, n, r) { if (e < 200) return !1; let i = new l(); for (let e = 0; e < t.length; e += 2) { let n = ye(t[e]), r = t[e + 1]; if (Array.isArray(r) && !Buffer.isBuffer(t[e + 1])) for (let e of r) i.append(n, e.toString(`latin1`), !0); else i.append(n, r.toString(`latin1`), !0); } let o = i.get(`location`, !0); this.body = new pe({ read: n }); let c = o && a.redirect === `follow` && ie.has(e), d = []; if (a.method !== `HEAD` && a.method !== `CONNECT` && !ae.includes(e) && !c) { let e = i.get(`content-encoding`, !0), t = e ? e.toLowerCase().split(`,`) : []; if (t.length > 5) return u(Error(`too many content-encodings in response: ${t.length}, maximum allowed is 5`)), !0; for (let e = t.length - 1; e >= 0; --e) { let n = t[e].trim(); if (n === `x-gzip` || n === `gzip`) d.push(m.createGunzip({ flush: m.constants.Z_SYNC_FLUSH, finishFlush: m.constants.Z_SYNC_FLUSH })); else if (n === `deflate`) d.push(H({ flush: m.constants.Z_SYNC_FLUSH, finishFlush: m.constants.Z_SYNC_FLUSH })); else if (n === `br`) d.push(m.createBrotliDecompress({ flush: m.constants.BROTLI_OPERATION_FLUSH, finishFlush: m.constants.BROTLI_OPERATION_FLUSH })); else if (n === `zstd` && Ae) d.push(m.createZstdDecompress({ flush: m.constants.ZSTD_e_continue, finishFlush: m.constants.ZSTD_e_end })); else { d.length = 0; break; } } } let f = this.onError.bind(this); return s({ status: e, statusText: r, headersList: i, body: d.length ? he(this.body, ...d, (e) => { e && this.onError(e); }).on(`error`, f) : this.body.on(`error`, f) }), !0; }, onData(t) { if (e.controller.dump) return; let n = t; return c.encodedBodySize += n.byteLength, this.body.push(n); }, onComplete() { this.abort && e.controller.off(`terminated`, this.abort), e.controller.ended = !0, this.body.push(null); }, onError(t) { this.abort && e.controller.off(`terminated`, this.abort), this.body?.destroy(t), e.controller.terminate(t), u(t); }, onRequestUpgrade(e, t, n, r) { if (r.session != null && t !== 200 || r.session == null && t !== 101) return !1; let i = new l(); for (let [e, t] of Object.entries(n)) { if (t == null) continue; let n = e.toLowerCase(); if (Array.isArray(t)) for (let e of t) i.append(n, String(e), !0); else i.append(n, String(t), !0); } return s({ status: t, statusText: Te[t], headersList: i, socket: r }), !0; }, onUpgrade(e, t, n) { if (n.session != null && e !== 200 || n.session == null && e !== 101) return !1; let r = new l(); for (let e = 0; e < t.length; e += 2) { let n = ye(t[e]), i = t[e + 1]; if (Array.isArray(i) && !Buffer.isBuffer(t[e + 1])) for (let e of i) r.append(n, e.toString(`latin1`), !0); else r.append(n, i.toString(`latin1`), !0); } return s({ status: e, statusText: Te[e], headersList: r, socket: n }), !0; } })); } } t.exports = { fetch: Ie, Fetch: Pe, fetching: Be, finalizeAndReportTiming: Le }; })); var bt = c$3(((e, t) => { let r = p$4(`node:assert`), { URLSerializer: i } = J$1(), { isValidHeaderName: a } = Y$1(); function o(e, t, n = !1) { return i(e, n) === i(t, n); } function s(e) { r(e !== null); let t = []; for (let n of e.split(`,`)) n = n.trim(), a(n) && t.push(n); return t; } t.exports = { urlEquals: o, getFieldValues: s }; })); var xt = c$3(((e, t) => { let r = p$4(`node:assert`), { kConstruct: i } = I$1(), { urlEquals: a, getFieldValues: o } = bt(), { kEnumerableProperty: s, isDisturbed: c } = B$1(), { webidl: l } = de(), { cloneResponse: u, fromInnerResponse: d, getResponseState: f } = gt(), { Request: p, fromInnerRequest: m, getRequestState: h } = _t(), { fetching: g } = yt(), { urlIsHttpHttpsScheme: _, readAllBytes: v } = Y$1(), { createDeferredPromise: y } = X$1(); var b = class e { #e; constructor() { arguments[0] !== i && l.illegalConstructor(), l.util.markAsUncloneable(this), this.#e = arguments[1]; } async match(t, n = {}) { l.brandCheck(this, e); let r = `Cache.match`; l.argumentLengthCheck(arguments, 1, r), t = l.converters.RequestInfo(t), n = l.converters.CacheQueryOptions(n, r, `options`); let i = this.#i(t, n, 1); if (i.length !== 0) return i[0]; } async matchAll(t = void 0, n = {}) { return l.brandCheck(this, e), t !== void 0 && (t = l.converters.RequestInfo(t)), n = l.converters.CacheQueryOptions(n, `Cache.matchAll`, `options`), this.#i(t, n); } async add(t) { l.brandCheck(this, e), l.argumentLengthCheck(arguments, 1, `Cache.add`), t = l.converters.RequestInfo(t); let n = [t]; return await this.addAll(n); } async addAll(t) { l.brandCheck(this, e); let n = `Cache.addAll`; l.argumentLengthCheck(arguments, 1, n); let r = [], i = []; for (let e of t) { if (e === void 0) throw l.errors.conversionFailed({ prefix: n, argument: `Argument 1`, types: [`undefined is not allowed`] }); if (e = l.converters.RequestInfo(e), typeof e == `string`) continue; let t = h(e); if (!_(t.url) || t.method !== `GET`) throw l.errors.exception({ header: n, message: `Expected http/s scheme when method is not GET.` }); } let a = []; for (let e of t) { let t = h(new p(e)); if (!_(t.url)) throw l.errors.exception({ header: n, message: `Expected http/s scheme.` }); t.initiator = `fetch`, t.destination = `subresource`, i.push(t); let s = y(); a.push(g({ request: t, processResponse(e) { if (e.type === `error` || e.status === 206 || e.status < 200 || e.status > 299) s.reject(l.errors.exception({ header: `Cache.addAll`, message: `Received an invalid status code or the request failed.` })); else if (e.headersList.contains(`vary`)) { let t = o(e.headersList.get(`vary`)); for (let e of t) if (e === `*`) { s.reject(l.errors.exception({ header: `Cache.addAll`, message: `invalid vary field value` })); for (let e of a) e.abort(); return; } } }, processResponseEndOfBody(e) { if (e.aborted) { s.reject(new DOMException(`aborted`, `AbortError`)); return; } s.resolve(e); } })), r.push(s.promise); } let s = await Promise.all(r), c = [], u = 0; for (let e of s) { let t = { type: `put`, request: i[u], response: e }; c.push(t), u++; } let d = y(), f = null; try { this.#t(c); } catch (e) { f = e; } return queueMicrotask(() => { f === null ? d.resolve(void 0) : d.reject(f); }), d.promise; } async put(t, n) { l.brandCheck(this, e); let r = `Cache.put`; l.argumentLengthCheck(arguments, 2, r), t = l.converters.RequestInfo(t), n = l.converters.Response(n, r, `response`); let i = null; if (i = l.is.Request(t) ? h(t) : h(new p(t)), !_(i.url) || i.method !== `GET`) throw l.errors.exception({ header: r, message: `Expected an http/s scheme when method is not GET` }); let a = f(n); if (a.status === 206) throw l.errors.exception({ header: r, message: `Got 206 status` }); if (a.headersList.contains(`vary`)) { let e = o(a.headersList.get(`vary`)); for (let t of e) if (t === `*`) throw l.errors.exception({ header: r, message: `Got * vary field value` }); } if (a.body && (c(a.body.stream) || a.body.stream.locked)) throw l.errors.exception({ header: r, message: `Response body is locked or disturbed` }); let s = u(a), d = y(); a.body == null ? d.resolve(void 0) : v(a.body.stream.getReader(), d.resolve, d.reject); let m = [], g = { type: `put`, request: i, response: s }; m.push(g); let b = await d.promise; s.body != null && (s.body.source = b); let x = y(), S = null; try { this.#t(m); } catch (e) { S = e; } return queueMicrotask(() => { S === null ? x.resolve() : x.reject(S); }), x.promise; } async delete(t, n = {}) { l.brandCheck(this, e); let i = `Cache.delete`; l.argumentLengthCheck(arguments, 1, i), t = l.converters.RequestInfo(t), n = l.converters.CacheQueryOptions(n, i, `options`); let a = null; if (l.is.Request(t)) { if (a = h(t), a.method !== `GET` && !n.ignoreMethod) return !1; } else r(typeof t == `string`), a = h(new p(t)); let o = [], s = { type: `delete`, request: a, options: n }; o.push(s); let c = y(), u = null, d; try { d = this.#t(o); } catch (e) { u = e; } return queueMicrotask(() => { u === null ? c.resolve(!!d?.length) : c.reject(u); }), c.promise; } async keys(t = void 0, n = {}) { l.brandCheck(this, e), t !== void 0 && (t = l.converters.RequestInfo(t)), n = l.converters.CacheQueryOptions(n, `Cache.keys`, `options`); let r = null; if (t !== void 0) if (l.is.Request(t)) { if (r = h(t), r.method !== `GET` && !n.ignoreMethod) return []; } else typeof t == `string` && (r = h(new p(t))); let i = y(), a = []; if (t === void 0) for (let e of this.#e) a.push(e[0]); else { let e = this.#n(r, n); for (let t of e) a.push(t[0]); } return queueMicrotask(() => { let e = []; for (let t of a) { let n = m(t, void 0, new AbortController().signal, `immutable`); e.push(n); } i.resolve(Object.freeze(e)); }), i.promise; } #t(e) { let t = this.#e, n = [...t], i = [], a = []; try { for (let n of e) { if (n.type !== `delete` && n.type !== `put`) throw l.errors.exception({ header: `Cache.#batchCacheOperations`, message: `operation type does not match "delete" or "put"` }); if (n.type === `delete` && n.response != null) throw l.errors.exception({ header: `Cache.#batchCacheOperations`, message: `delete operation should not have an associated response` }); if (this.#n(n.request, n.options, i).length) throw new DOMException(`???`, `InvalidStateError`); let e; if (n.type === `delete`) { if (e = this.#n(n.request, n.options), e.length === 0) return []; for (let n of e) { let e = t.indexOf(n); r(e !== -1), t.splice(e, 1); } } else if (n.type === `put`) { if (n.response == null) throw l.errors.exception({ header: `Cache.#batchCacheOperations`, message: `put operation should have an associated response` }); let a = n.request; if (!_(a.url)) throw l.errors.exception({ header: `Cache.#batchCacheOperations`, message: `expected http or https scheme` }); if (a.method !== `GET`) throw l.errors.exception({ header: `Cache.#batchCacheOperations`, message: `not get method` }); if (n.options != null) throw l.errors.exception({ header: `Cache.#batchCacheOperations`, message: `options must not be defined` }); e = this.#n(n.request); for (let n of e) { let e = t.indexOf(n); r(e !== -1), t.splice(e, 1); } t.push([n.request, n.response]), i.push([n.request, n.response]); } a.push([n.request, n.response]); } return a; } catch (e) { throw this.#e.length = 0, this.#e = n, e; } } #n(e, t, n) { let r = [], i = n ?? this.#e; for (let n of i) { let [i, a] = n; this.#r(e, i, a, t) && r.push(n); } return r; } #r(e, t, n = null, r) { let i = new URL(e.url), s = new URL(t.url); if (r?.ignoreSearch && (s.search = ``, i.search = ``), !a(i, s, !0)) return !1; if (n == null || r?.ignoreVary || !n.headersList.contains(`vary`)) return !0; let c = o(n.headersList.get(`vary`)); for (let n of c) if (n === `*` || t.headersList.get(n) !== e.headersList.get(n)) return !1; return !0; } #i(e, t, n = Infinity) { let r = null; if (e !== void 0) if (l.is.Request(e)) { if (r = h(e), r.method !== `GET` && !t.ignoreMethod) return []; } else typeof e == `string` && (r = h(new p(e))); let i = []; if (e === void 0) for (let e of this.#e) i.push(e[1]); else { let e = this.#n(r, t); for (let t of e) i.push(t[1]); } let a = []; for (let e of i) { let t = d(u(e), `immutable`); if (a.push(t), a.length >= n) break; } return Object.freeze(a); } }; Object.defineProperties(b.prototype, { [Symbol.toStringTag]: { value: `Cache`, configurable: !0 }, match: s, matchAll: s, add: s, addAll: s, put: s, delete: s, keys: s }); let x = [ { key: `ignoreSearch`, converter: l.converters.boolean, defaultValue: () => !1 }, { key: `ignoreMethod`, converter: l.converters.boolean, defaultValue: () => !1 }, { key: `ignoreVary`, converter: l.converters.boolean, defaultValue: () => !1 } ]; l.converters.CacheQueryOptions = l.dictionaryConverter(x), l.converters.MultiCacheQueryOptions = l.dictionaryConverter([...x, { key: `cacheName`, converter: l.converters.DOMString }]), l.converters.Response = l.interfaceConverter(l.is.Response, `Response`), l.converters[`sequence`] = l.sequenceConverter(l.converters.RequestInfo), t.exports = { Cache: b }; })); var St = c$3(((e, t) => { let { Cache: n } = xt(), { webidl: r } = de(), { kEnumerableProperty: i } = B$1(), { kConstruct: a } = I$1(); var o = class e { #e = /* @__PURE__ */ new Map(); constructor() { arguments[0] !== a && r.illegalConstructor(), r.util.markAsUncloneable(this); } async match(t, i = {}) { if (r.brandCheck(this, e), r.argumentLengthCheck(arguments, 1, `CacheStorage.match`), t = r.converters.RequestInfo(t), i = r.converters.MultiCacheQueryOptions(i), i.cacheName != null) { if (this.#e.has(i.cacheName)) return await new n(a, this.#e.get(i.cacheName)).match(t, i); } else for (let e of this.#e.values()) { let r = await new n(a, e).match(t, i); if (r !== void 0) return r; } } async has(t) { r.brandCheck(this, e); let n = `CacheStorage.has`; return r.argumentLengthCheck(arguments, 1, n), t = r.converters.DOMString(t, n, `cacheName`), this.#e.has(t); } async open(t) { r.brandCheck(this, e); let i = `CacheStorage.open`; if (r.argumentLengthCheck(arguments, 1, i), t = r.converters.DOMString(t, i, `cacheName`), this.#e.has(t)) return new n(a, this.#e.get(t)); let o = []; return this.#e.set(t, o), new n(a, o); } async delete(t) { r.brandCheck(this, e); let n = `CacheStorage.delete`; return r.argumentLengthCheck(arguments, 1, n), t = r.converters.DOMString(t, n, `cacheName`), this.#e.delete(t); } async keys() { return r.brandCheck(this, e), [...this.#e.keys()]; } }; Object.defineProperties(o.prototype, { [Symbol.toStringTag]: { value: `CacheStorage`, configurable: !0 }, match: i, has: i, open: i, delete: i, keys: i }), t.exports = { CacheStorage: o }; })); var Ct = c$3(((e, t) => { t.exports = { maxAttributeValueSize: 1024, maxNameValuePairSize: 4096 }; })); var wt = c$3(((e, t) => { function n(e) { for (let t = 0; t < e.length; ++t) { let n = e.charCodeAt(t); if (n >= 0 && n <= 8 || n >= 10 && n <= 31 || n === 127) return !0; } return !1; } function r(e) { for (let t = 0; t < e.length; ++t) { let n = e.charCodeAt(t); if (n < 33 || n > 126 || n === 34 || n === 40 || n === 41 || n === 60 || n === 62 || n === 64 || n === 44 || n === 59 || n === 58 || n === 92 || n === 47 || n === 91 || n === 93 || n === 63 || n === 61 || n === 123 || n === 125) throw Error(`Invalid cookie name`); } } function i(e) { let t = e.length, n = 0; if (e[0] === `"`) { if (t === 1 || e[t - 1] !== `"`) throw Error(`Invalid cookie value`); --t, ++n; } for (; n < t;) { let t = e.charCodeAt(n++); if (t < 33 || t > 126 || t === 34 || t === 44 || t === 59 || t === 92) throw Error(`Invalid cookie value`); } } function a(e) { for (let t = 0; t < e.length; ++t) { let n = e.charCodeAt(t); if (n < 32 || n === 127 || n === 59) throw Error(`Invalid cookie path`); } } function o(e) { if (e.startsWith(`-`) || e.endsWith(`.`) || e.endsWith(`-`)) throw Error(`Invalid cookie domain`); } let s = [ `Sun`, `Mon`, `Tue`, `Wed`, `Thu`, `Fri`, `Sat` ], c = [ `Jan`, `Feb`, `Mar`, `Apr`, `May`, `Jun`, `Jul`, `Aug`, `Sep`, `Oct`, `Nov`, `Dec` ], l = Array(61).fill(0).map((e, t) => t.toString().padStart(2, `0`)); function u(e) { return typeof e == `number` && (e = new Date(e)), `${s[e.getUTCDay()]}, ${l[e.getUTCDate()]} ${c[e.getUTCMonth()]} ${e.getUTCFullYear()} ${l[e.getUTCHours()]}:${l[e.getUTCMinutes()]}:${l[e.getUTCSeconds()]} GMT`; } function d(e) { if (e < 0) throw Error(`Invalid cookie max-age`); } function f(e) { if (e.name.length === 0) return null; r(e.name), i(e.value); let t = [`${e.name}=${e.value}`]; e.name.startsWith(`__Secure-`) && (e.secure = !0), e.name.startsWith(`__Host-`) && (e.secure = !0, e.domain = null, e.path = `/`), e.secure && t.push(`Secure`), e.httpOnly && t.push(`HttpOnly`), typeof e.maxAge == `number` && (d(e.maxAge), t.push(`Max-Age=${e.maxAge}`)), e.domain && (o(e.domain), t.push(`Domain=${e.domain}`)), e.path && (a(e.path), t.push(`Path=${e.path}`)), e.expires && e.expires.toString() !== `Invalid Date` && t.push(`Expires=${u(e.expires)}`), e.sameSite && t.push(`SameSite=${e.sameSite}`); for (let n of e.unparsed) { if (!n.includes(`=`)) throw Error(`Invalid unparsed`); let [e, ...r] = n.split(`=`); t.push(`${e.trim()}=${r.join(`=`)}`); } return t.join(`; `); } t.exports = { isCTLExcludingHtab: n, validateCookieName: r, validateCookiePath: a, validateCookieValue: i, toIMFDate: u, stringify: f }; })); var Tt = c$3(((e, t) => { let { collectASequenceOfCodePointsFast: r } = q$1(), { maxNameValuePairSize: i, maxAttributeValueSize: a } = Ct(), { isCTLExcludingHtab: o } = wt(), s = p$4(`node:assert`), { unescape: c } = p$4(`node:querystring`); function l(e) { if (o(e)) return null; let t = ``, n = ``, a = ``, s = ``; if (e.includes(`;`)) { let i = { position: 0 }; t = r(`;`, e, i), n = e.slice(i.position); } else t = e; if (!t.includes(`=`)) s = t; else { let e = { position: 0 }; a = r(`=`, t, e), s = t.slice(e.position + 1); } return a = a.trim(), s = s.trim(), a.length + s.length > i ? null : { name: a, value: c(s), ...u(n) }; } function u(e, t = {}) { if (e.length === 0) return t; s(e[0] === `;`), e = e.slice(1); let n = ``; e.includes(`;`) ? (n = r(`;`, e, { position: 0 }), e = e.slice(n.length)) : (n = e, e = ``); let i = ``, o = ``; if (n.includes(`=`)) { let e = { position: 0 }; i = r(`=`, n, e), o = n.slice(e.position + 1); } else i = n; if (i = i.trim(), o = o.trim(), o.length > a) return u(e, t); let c = i.toLowerCase(); if (c === `expires`) t.expires = new Date(o); else if (c === `max-age`) { let n = o.charCodeAt(0); if ((n < 48 || n > 57) && o[0] !== `-` || !/^\d+$/.test(o)) return u(e, t); t.maxAge = Number(o); } else if (c === `domain`) { let e = o; e[0] === `.` && (e = e.slice(1)), e = e.toLowerCase(), t.domain = e; } else if (c === `path`) { let e = ``; e = o.length === 0 || o[0] !== `/` ? `/` : o, t.path = e; } else if (c === `secure`) t.secure = !0; else if (c === `httponly`) t.httpOnly = !0; else if (c === `samesite`) { let e = `Default`, n = o.toLowerCase(); n.includes(`none`) && (e = `None`), n.includes(`strict`) && (e = `Strict`), n.includes(`lax`) && (e = `Lax`), t.sameSite = e; } else t.unparsed ??= [], t.unparsed.push(`${i}=${o}`); return u(e, t); } t.exports = { parseSetCookie: l, parseUnparsedAttributes: u }; })); var Et = c$3(((e, t) => { let { parseSetCookie: n } = Tt(), { stringify: r } = wt(), { webidl: i } = de(), { Headers: a } = ht(), o = i.brandCheckMultiple([a, globalThis.Headers].filter(Boolean)); function s(e) { i.argumentLengthCheck(arguments, 1, `getCookies`), o(e); let t = e.get(`cookie`), n = {}; if (!t) return n; for (let e of t.split(`;`)) { let [t, ...r] = e.split(`=`); n[t.trim()] = r.join(`=`); } return n; } function c(e, t, n) { o(e); let r = `deleteCookie`; i.argumentLengthCheck(arguments, 2, r), t = i.converters.DOMString(t, r, `name`), n = i.converters.DeleteCookieAttributes(n), d(e, { name: t, value: ``, expires: /* @__PURE__ */ new Date(0), ...n }); } function l(e) { i.argumentLengthCheck(arguments, 1, `getSetCookies`), o(e); let t = e.getSetCookie(); return t ? t.map((e) => n(e)) : []; } function u(e) { return e = i.converters.DOMString(e), n(e); } function d(e, t) { i.argumentLengthCheck(arguments, 2, `setCookie`), o(e), t = i.converters.Cookie(t); let n = r(t); n && e.append(`set-cookie`, n, !0); } i.converters.DeleteCookieAttributes = i.dictionaryConverter([{ converter: i.nullableConverter(i.converters.DOMString), key: `path`, defaultValue: () => null }, { converter: i.nullableConverter(i.converters.DOMString), key: `domain`, defaultValue: () => null }]), i.converters.Cookie = i.dictionaryConverter([ { converter: i.converters.DOMString, key: `name` }, { converter: i.converters.DOMString, key: `value` }, { converter: i.nullableConverter((e) => typeof e == `number` ? i.converters[`unsigned long long`](e) : new Date(e)), key: `expires`, defaultValue: () => null }, { converter: i.nullableConverter(i.converters[`long long`]), key: `maxAge`, defaultValue: () => null }, { converter: i.nullableConverter(i.converters.DOMString), key: `domain`, defaultValue: () => null }, { converter: i.nullableConverter(i.converters.DOMString), key: `path`, defaultValue: () => null }, { converter: i.nullableConverter(i.converters.boolean), key: `secure`, defaultValue: () => null }, { converter: i.nullableConverter(i.converters.boolean), key: `httpOnly`, defaultValue: () => null }, { converter: i.converters.USVString, key: `sameSite`, allowedValues: [ `Strict`, `Lax`, `None` ] }, { converter: i.sequenceConverter(i.converters.DOMString), key: `unparsed`, defaultValue: () => [] } ]), t.exports = { getCookies: s, deleteCookie: c, getSetCookies: l, setCookie: d, parseCookie: u }; })); var Dt = c$3(((e, t) => { let { webidl: n } = de(), { kEnumerableProperty: r } = B$1(), { kConstruct: i } = I$1(); var a = class e extends Event { #e; constructor(e, t = {}) { if (e === i) { super(arguments[1], arguments[2]), n.util.markAsUncloneable(this); return; } let r = `MessageEvent constructor`; n.argumentLengthCheck(arguments, 1, r), e = n.converters.DOMString(e, r, `type`), t = n.converters.MessageEventInit(t, r, `eventInitDict`), super(e, t), this.#e = t, n.util.markAsUncloneable(this); } get data() { return n.brandCheck(this, e), this.#e.data; } get origin() { return n.brandCheck(this, e), this.#e.origin; } get lastEventId() { return n.brandCheck(this, e), this.#e.lastEventId; } get source() { return n.brandCheck(this, e), this.#e.source; } get ports() { return n.brandCheck(this, e), Object.isFrozen(this.#e.ports) || Object.freeze(this.#e.ports), this.#e.ports; } initMessageEvent(t, r = !1, i = !1, a = null, o = ``, s = ``, c = null, l = []) { return n.brandCheck(this, e), n.argumentLengthCheck(arguments, 1, `MessageEvent.initMessageEvent`), new e(t, { bubbles: r, cancelable: i, data: a, origin: o, lastEventId: s, source: c, ports: l }); } static createFastMessageEvent(t, n) { let r = new e(i, t, n); return r.#e = n, r.#e.data ??= null, r.#e.origin ??= ``, r.#e.lastEventId ??= ``, r.#e.source ??= null, r.#e.ports ??= [], r; } }; let { createFastMessageEvent: o } = a; delete a.createFastMessageEvent; var s = class e extends Event { #e; constructor(e, t = {}) { let r = `CloseEvent constructor`; n.argumentLengthCheck(arguments, 1, r), e = n.converters.DOMString(e, r, `type`), t = n.converters.CloseEventInit(t), super(e, t), this.#e = t, n.util.markAsUncloneable(this); } get wasClean() { return n.brandCheck(this, e), this.#e.wasClean; } get code() { return n.brandCheck(this, e), this.#e.code; } get reason() { return n.brandCheck(this, e), this.#e.reason; } }, c = class e extends Event { #e; constructor(e, t) { let r = `ErrorEvent constructor`; n.argumentLengthCheck(arguments, 1, r), super(e, t), n.util.markAsUncloneable(this), e = n.converters.DOMString(e, r, `type`), t = n.converters.ErrorEventInit(t ?? {}), this.#e = t; } get message() { return n.brandCheck(this, e), this.#e.message; } get filename() { return n.brandCheck(this, e), this.#e.filename; } get lineno() { return n.brandCheck(this, e), this.#e.lineno; } get colno() { return n.brandCheck(this, e), this.#e.colno; } get error() { return n.brandCheck(this, e), this.#e.error; } }; Object.defineProperties(a.prototype, { [Symbol.toStringTag]: { value: `MessageEvent`, configurable: !0 }, data: r, origin: r, lastEventId: r, source: r, ports: r, initMessageEvent: r }), Object.defineProperties(s.prototype, { [Symbol.toStringTag]: { value: `CloseEvent`, configurable: !0 }, reason: r, code: r, wasClean: r }), Object.defineProperties(c.prototype, { [Symbol.toStringTag]: { value: `ErrorEvent`, configurable: !0 }, message: r, filename: r, lineno: r, colno: r, error: r }), n.converters.MessagePort = n.interfaceConverter(n.is.MessagePort, `MessagePort`), n.converters[`sequence`] = n.sequenceConverter(n.converters.MessagePort); let l = [ { key: `bubbles`, converter: n.converters.boolean, defaultValue: () => !1 }, { key: `cancelable`, converter: n.converters.boolean, defaultValue: () => !1 }, { key: `composed`, converter: n.converters.boolean, defaultValue: () => !1 } ]; n.converters.MessageEventInit = n.dictionaryConverter([ ...l, { key: `data`, converter: n.converters.any, defaultValue: () => null }, { key: `origin`, converter: n.converters.USVString, defaultValue: () => `` }, { key: `lastEventId`, converter: n.converters.DOMString, defaultValue: () => `` }, { key: `source`, converter: n.nullableConverter(n.converters.MessagePort), defaultValue: () => null }, { key: `ports`, converter: n.converters[`sequence`], defaultValue: () => [] } ]), n.converters.CloseEventInit = n.dictionaryConverter([ ...l, { key: `wasClean`, converter: n.converters.boolean, defaultValue: () => !1 }, { key: `code`, converter: n.converters[`unsigned short`], defaultValue: () => 0 }, { key: `reason`, converter: n.converters.USVString, defaultValue: () => `` } ]), n.converters.ErrorEventInit = n.dictionaryConverter([ ...l, { key: `message`, converter: n.converters.DOMString, defaultValue: () => `` }, { key: `filename`, converter: n.converters.USVString, defaultValue: () => `` }, { key: `lineno`, converter: n.converters[`unsigned long`], defaultValue: () => 0 }, { key: `colno`, converter: n.converters[`unsigned long`], defaultValue: () => 0 }, { key: `error`, converter: n.converters.any } ]), t.exports = { MessageEvent: a, CloseEvent: s, ErrorEvent: c, createFastMessageEvent: o }; })); var Ot = c$3(((e, t) => { t.exports = { uid: `258EAFA5-E914-47DA-95CA-C5AB0DC85B11`, sentCloseFrameState: { SENT: 1, RECEIVED: 2 }, staticPropertyDescriptors: { enumerable: !0, writable: !1, configurable: !1 }, states: { CONNECTING: 0, OPEN: 1, CLOSING: 2, CLOSED: 3 }, opcodes: { CONTINUATION: 0, TEXT: 1, BINARY: 2, CLOSE: 8, PING: 9, PONG: 10 }, maxUnsigned16Bit: 65535, parserStates: { INFO: 0, PAYLOADLENGTH_16: 2, PAYLOADLENGTH_64: 3, READ_DATA: 4 }, emptyBuffer: Buffer.allocUnsafe(0), sendHints: { text: 1, typedArray: 2, arrayBuffer: 3, blob: 4 } }; })); var kt = c$3(((e, t) => { let { states: r, opcodes: i } = Ot(), { isUtf8: a } = p$4(`node:buffer`), { removeHTTPWhitespace: o } = J$1(), { collectASequenceOfCodePointsFast: s } = q$1(); function c(e) { return e === r.CONNECTING; } function l(e) { return e === r.OPEN; } function u(e) { return e === r.CLOSING; } function d(e) { return e === r.CLOSED; } function f(e, t, n = (e, t) => new Event(e, t), r = {}) { let i = n(e, r); t.dispatchEvent(i); } function p(e, t, n) { e.onMessage(t, n); } function m(e) { return e.byteLength === e.buffer.byteLength ? e.buffer : new Uint8Array(e).buffer; } function h(e) { if (e.length === 0) return !1; for (let t = 0; t < e.length; ++t) { let n = e.charCodeAt(t); if (n < 33 || n > 126 || n === 34 || n === 40 || n === 41 || n === 44 || n === 47 || n === 58 || n === 59 || n === 60 || n === 61 || n === 62 || n === 63 || n === 64 || n === 91 || n === 92 || n === 93 || n === 123 || n === 125) return !1; } return !0; } function g(e) { return e >= 1e3 && e < 1015 ? e !== 1004 && e !== 1005 && e !== 1006 : e >= 3e3 && e <= 4999; } function _(e) { return e === i.CLOSE || e === i.PING || e === i.PONG; } function v(e) { return e === i.CONTINUATION; } function y(e) { return e === i.TEXT || e === i.BINARY; } function b(e) { return y(e) || v(e) || _(e); } function x(e) { let t = { position: 0 }, n = /* @__PURE__ */ new Map(); for (; t.position < e.length;) { let [r, i = ``] = s(`;`, e, t).split(`=`, 2); n.set(o(r, !0, !1), o(i, !1, !0)), t.position++; } return n; } function S(e) { if (e.length === 0) return !1; for (let t = 0; t < e.length; t++) { let n = e.charCodeAt(t); if (n < 48 || n > 57) return !1; } let t = Number.parseInt(e, 10); return t >= 8 && t <= 15; } function C(e, t) { let n; try { n = new URL(e, t); } catch (e) { throw new DOMException(e, `SyntaxError`); } if (n.protocol === `http:` ? n.protocol = `ws:` : n.protocol === `https:` && (n.protocol = `wss:`), n.protocol !== `ws:` && n.protocol !== `wss:`) throw new DOMException(`expected a ws: or wss: url`, `SyntaxError`); if (n.hash.length || n.href.endsWith(`#`)) throw new DOMException(`hash`, `SyntaxError`); return n; } function w(e, t) { if (e !== null && e !== 1e3 && (e < 3e3 || e > 4999)) throw new DOMException(`invalid code`, `InvalidAccessError`); if (t !== null) { let e = Buffer.byteLength(t); if (e > 123) throw new DOMException(`Reason must be less than 123 bytes; received ${e}`, `SyntaxError`); } } t.exports = { isConnecting: c, isEstablished: l, isClosing: u, isClosed: d, fireEvent: f, isValidSubprotocol: h, isValidStatusCode: g, websocketMessageReceived: p, utf8Decode: (() => { if (typeof process.versions.icu == `string`) { let e = new TextDecoder(`utf-8`, { fatal: !0 }); return e.decode.bind(e); } return function(e) { if (a(e)) return e.toString(`utf-8`); throw TypeError(`Invalid utf-8 received.`); }; })(), isControlFrame: _, isContinuationFrame: v, isTextBinaryFrame: y, isValidOpcode: b, parseExtensions: x, isValidClientWindowBits: S, toArrayBuffer: m, getURLRecord: C, validateCloseCodeAndReason: w }; })); var At = c$3(((e, t) => { let { runtimeFeatures: r } = ue(), { maxUnsigned16Bit: i, opcodes: a } = Ot(), o = 8 * 1024, s = null, c = o, l = r.has(`crypto`) ? p$4(`node:crypto`).randomFillSync : function(e, t, n) { for (let t = 0; t < e.length; ++t) e[t] = Math.random() * 255 | 0; return e; }; function u() { return c === o && (c = 0, l(s ??= Buffer.allocUnsafeSlow(o), 0, o)), [ s[c++], s[c++], s[c++], s[c++] ]; } t.exports = { WebsocketFrameSend: class { constructor(e) { this.frameData = e; } createFrame(e) { let t = this.frameData, n = u(), r = t?.byteLength ?? 0, a = r, o = 6; r > i ? (o += 8, a = 127) : r > 125 && (o += 2, a = 126); let s = Buffer.allocUnsafe(r + o); s[0] = s[1] = 0, s[0] |= 128, s[0] = (s[0] & 240) + e, s[o - 4] = n[0], s[o - 3] = n[1], s[o - 2] = n[2], s[o - 1] = n[3], s[1] = a, a === 126 ? s.writeUInt16BE(r, 2) : a === 127 && (s[2] = s[3] = 0, s.writeUIntBE(r, 4, 6)), s[1] |= 128; for (let e = 0; e < r; ++e) s[o + e] = t[e] ^ n[e & 3]; return s; } static createFastTextFrame(e) { let t = u(), n = e.length; for (let r = 0; r < n; ++r) e[r] ^= t[r & 3]; let r = n, o = 6; n > i ? (o += 8, r = 127) : n > 125 && (o += 2, r = 126); let s = Buffer.allocUnsafeSlow(o); return s[0] = 128 | a.TEXT, s[1] = r | 128, s[o - 4] = t[0], s[o - 3] = t[1], s[o - 2] = t[2], s[o - 1] = t[3], r === 126 ? s.writeUInt16BE(n, 2) : r === 127 && (s[2] = s[3] = 0, s.writeUIntBE(n, 4, 6)), [s, e]; } }, generateMask: u }; })); var jt = c$3(((e, t) => { let { uid: r, states: i, sentCloseFrameState: a, emptyBuffer: o, opcodes: s } = Ot(), { parseExtensions: c, isClosed: l, isClosing: u, isEstablished: d, isConnecting: f, validateCloseCodeAndReason: p } = kt(), { makeRequest: m } = _t(), { fetching: h } = yt(), { Headers: g, getHeadersList: _ } = ht(), { getDecodeSplit: v } = Y$1(), { WebsocketFrameSend: y } = At(), b = p$4(`node:assert`), { runtimeFeatures: x } = ue(), S = x.has(`crypto`) ? p$4(`node:crypto`) : null, C = !1; function w(e, t, n, i, a) { let o = e; o.protocol = e.protocol === `ws:` ? `http:` : `https:`; let s = m({ urlList: [o], client: n, serviceWorkers: `none`, referrer: `no-referrer`, mode: `websocket`, credentials: `include`, cache: `no-store`, redirect: `error`, useURLCredentials: !0 }); a.headers && (s.headersList = _(new g(a.headers))); let l = S.randomBytes(16).toString(`base64`); s.headersList.append(`sec-websocket-key`, l, !0), s.headersList.append(`sec-websocket-version`, `13`, !0); for (let e of t) s.headersList.append(`sec-websocket-protocol`, e, !0); return s.headersList.append(`sec-websocket-extensions`, `permessage-deflate; client_max_window_bits`, !0), h({ request: s, useParallelQueue: !0, dispatcher: a.dispatcher, processResponse(e) { if (e.type === `error` || e.status !== 101) { if (e.socket?.session == null) { E(i, 1002, `Received network error or non-101 status code.`, e.error); return; } if (e.status !== 200) { E(i, 1002, `Received network error or non-200 status code.`, e.error); return; } } if (C === !1 && e.socket?.session != null && (process.emitWarning(`WebSocket over HTTP2 is experimental, and subject to change.`, `ExperimentalWarning`), C = !0), t.length !== 0 && !e.headersList.get(`Sec-WebSocket-Protocol`)) { E(i, 1002, `Server did not respond with sent protocols.`); return; } if (e.socket.session == null && e.headersList.get(`Upgrade`)?.toLowerCase() !== `websocket`) { E(i, 1002, `Server did not set Upgrade header to "websocket".`); return; } if (e.socket.session == null && e.headersList.get(`Connection`)?.toLowerCase() !== `upgrade`) { E(i, 1002, `Server did not set Connection header to "upgrade".`); return; } if (e.headersList.get(`Sec-WebSocket-Accept`) !== S.hash(`sha1`, l + r, `base64`)) { E(i, 1002, `Incorrect hash received in Sec-WebSocket-Accept header.`); return; } let n = e.headersList.get(`Sec-WebSocket-Extensions`), a; if (n !== null && (a = c(n), !a.has(`permessage-deflate`))) { E(i, 1002, `Sec-WebSocket-Extensions header does not match.`); return; } let o = e.headersList.get(`Sec-WebSocket-Protocol`); if (o !== null && !v(`sec-websocket-protocol`, s.headersList).includes(o)) { E(i, 1002, `Protocol was not set in the opening handshake.`); return; } e.socket.on(`data`, i.onSocketData), e.socket.on(`close`, i.onSocketClose), e.socket.on(`error`, i.onSocketError), i.wasEverConnected = !0, i.onConnectionEstablished(e, a); } }); } function T(e, t, n, r = !1) { if (t ??= null, n ??= ``, r && p(t, n), !(l(e.readyState) || u(e.readyState))) if (!d(e.readyState)) E(e), e.readyState = i.CLOSING; else if (!e.closeState.has(a.SENT) && !e.closeState.has(a.RECEIVED)) { let r = new y(); n.length !== 0 && t === null && (t = 1e3), b(t === null || Number.isInteger(t)), t === null && n.length === 0 ? r.frameData = o : t !== null && n === null ? (r.frameData = Buffer.allocUnsafe(2), r.frameData.writeUInt16BE(t, 0)) : t !== null && n !== null ? (r.frameData = Buffer.allocUnsafe(2 + Buffer.byteLength(n)), r.frameData.writeUInt16BE(t, 0), r.frameData.write(n, 2, `utf-8`)) : r.frameData = o, e.socket.write(r.createFrame(s.CLOSE)), e.closeState.add(a.SENT), e.readyState = i.CLOSING; } else e.readyState = i.CLOSING; } function E(e, t, n, r) { d(e.readyState) && T(e, t, n, !1), e.controller.abort(), f(e.readyState) ? e.onSocketClose() : e.socket?.destroyed === !1 && e.socket.destroy(); } t.exports = { establishWebSocketConnection: w, failWebsocketConnection: E, closeWebSocketConnection: T }; })); var Mt = c$3(((e, t) => { let { createInflateRaw: r, Z_DEFAULT_WINDOWBITS: i } = p$4(`node:zlib`), { isValidClientWindowBits: a } = kt(), { MessageSizeExceededError: o } = R$1(), s = Buffer.from([ 0, 0, 255, 255 ]), c = Symbol(`kBuffer`), l = Symbol(`kLength`); t.exports = { PerMessageDeflate: class { #e; #t = {}; #n = !1; #r = null; constructor(e) { this.#t.serverNoContextTakeover = e.has(`server_no_context_takeover`), this.#t.serverMaxWindowBits = e.get(`server_max_window_bits`); } decompress(e, t, n) { if (this.#n) { n(new o()); return; } if (!this.#e) { let e = i; if (this.#t.serverMaxWindowBits) { if (!a(this.#t.serverMaxWindowBits)) { n(Error(`Invalid server_max_window_bits`)); return; } e = Number.parseInt(this.#t.serverMaxWindowBits); } try { this.#e = r({ windowBits: e }); } catch (e) { n(e); return; } this.#e[c] = [], this.#e[l] = 0, this.#e.on(`data`, (e) => { if (!this.#n) { if (this.#e[l] += e.length, this.#e[l] > 4194304) { if (this.#n = !0, this.#e.removeAllListeners(), this.#e.destroy(), this.#e = null, this.#r) { let e = this.#r; this.#r = null, e(new o()); } return; } this.#e[c].push(e); } }), this.#e.on(`error`, (e) => { this.#e = null, n(e); }); } this.#r = n, this.#e.write(e), t && this.#e.write(s), this.#e.flush(() => { if (this.#n || !this.#e) return; let e = Buffer.concat(this.#e[c], this.#e[l]); this.#e[c].length = 0, this.#e[l] = 0, this.#r = null, n(null, e); }); } } }; })); var Nt = c$3(((e, t) => { let { Writable: r } = p$4(`node:stream`), i = p$4(`node:assert`), { parserStates: a, opcodes: o, states: s, emptyBuffer: c, sentCloseFrameState: l } = Ot(), { isValidStatusCode: u, isValidOpcode: d, websocketMessageReceived: f, utf8Decode: p, isControlFrame: m, isTextBinaryFrame: h, isContinuationFrame: g } = kt(), { failWebsocketConnection: _ } = jt(), { WebsocketFrameSend: v } = At(), { PerMessageDeflate: y } = Mt(), { MessageSizeExceededError: b } = R$1(); t.exports = { ByteParser: class extends r { #e = []; #t = 0; #n = 0; #r = !1; #i = a.INFO; #a = {}; #o = []; #s; #c; constructor(e, t) { super(), this.#c = e, this.#s = t ?? /* @__PURE__ */ new Map(), this.#s.has(`permessage-deflate`) && this.#s.set(`permessage-deflate`, new y(t)); } _write(e, t, n) { this.#e.push(e), this.#n += e.length, this.#r = !0, this.run(n); } run(e) { for (; this.#r;) if (this.#i === a.INFO) { if (this.#n < 2) return e(); let t = this.consume(2), n = (t[0] & 128) != 0, r = t[0] & 15, i = (t[1] & 128) == 128, s = !n && r !== o.CONTINUATION, c = t[1] & 127, l = t[0] & 64, u = t[0] & 32, f = t[0] & 16; if (!d(r)) return _(this.#c, 1002, `Invalid opcode received`), e(); if (i) return _(this.#c, 1002, `Frame cannot be masked`), e(); if (l !== 0 && !this.#s.has(`permessage-deflate`)) { _(this.#c, 1002, `Expected RSV1 to be clear.`); return; } if (u !== 0 || f !== 0) { _(this.#c, 1002, `RSV1, RSV2, RSV3 must be clear`); return; } if (s && !h(r)) { _(this.#c, 1002, `Invalid frame type was fragmented.`); return; } if (h(r) && this.#o.length > 0) { _(this.#c, 1002, `Expected continuation frame`); return; } if (this.#a.fragmented && s) { _(this.#c, 1002, `Fragmented frame exceeded 125 bytes.`); return; } if ((c > 125 || s) && m(r)) { _(this.#c, 1002, `Control frame either too large or fragmented`); return; } if (g(r) && this.#o.length === 0 && !this.#a.compressed) { _(this.#c, 1002, `Unexpected continuation frame`); return; } c <= 125 ? (this.#a.payloadLength = c, this.#i = a.READ_DATA) : c === 126 ? this.#i = a.PAYLOADLENGTH_16 : c === 127 && (this.#i = a.PAYLOADLENGTH_64), h(r) && (this.#a.binaryType = r, this.#a.compressed = l !== 0), this.#a.opcode = r, this.#a.masked = i, this.#a.fin = n, this.#a.fragmented = s; } else if (this.#i === a.PAYLOADLENGTH_16) { if (this.#n < 2) return e(); let t = this.consume(2); this.#a.payloadLength = t.readUInt16BE(0), this.#i = a.READ_DATA; } else if (this.#i === a.PAYLOADLENGTH_64) { if (this.#n < 8) return e(); let t = this.consume(8), n = t.readUInt32BE(0), r = t.readUInt32BE(4); if (n !== 0 || r > 2 ** 31 - 1) { _(this.#c, 1009, `Received payload length > 2^31 bytes.`); return; } this.#a.payloadLength = r, this.#i = a.READ_DATA; } else if (this.#i === a.READ_DATA) { if (this.#n < this.#a.payloadLength) return e(); let t = this.consume(this.#a.payloadLength); if (m(this.#a.opcode)) this.#r = this.parseControlFrame(t), this.#i = a.INFO; else if (!this.#a.compressed) this.writeFragments(t), !this.#a.fragmented && this.#a.fin && f(this.#c, this.#a.binaryType, this.consumeFragments()), this.#i = a.INFO; else { this.#s.get(`permessage-deflate`).decompress(t, this.#a.fin, (t, n) => { if (t) { let e = t instanceof b ? 1009 : 1007; _(this.#c, e, t.message); return; } if (this.writeFragments(n), !this.#a.fin) { this.#i = a.INFO, this.#r = !0, this.run(e); return; } f(this.#c, this.#a.binaryType, this.consumeFragments()), this.#r = !0, this.#i = a.INFO, this.run(e); }), this.#r = !1; break; } } } consume(e) { if (e > this.#n) throw Error(`Called consume() before buffers satiated.`); if (e === 0) return c; this.#n -= e; let t = this.#e[0]; if (t.length > e) return this.#e[0] = t.subarray(e, t.length), t.subarray(0, e); if (t.length === e) return this.#e.shift(); { let t = 0, n = Buffer.allocUnsafeSlow(e); for (; t !== e;) { let r = this.#e[0], i = r.length; if (i + t === e) { n.set(this.#e.shift(), t); break; } else if (i + t > e) { n.set(r.subarray(0, e - t), t), this.#e[0] = r.subarray(e - t); break; } else n.set(this.#e.shift(), t), t += i; } return n; } } writeFragments(e) { this.#t += e.length, this.#o.push(e); } consumeFragments() { let e = this.#o; if (e.length === 1) return this.#t = 0, e.shift(); let t = 0, n = Buffer.allocUnsafeSlow(this.#t); for (let r = 0; r < e.length; ++r) { let i = e[r]; n.set(i, t), t += i.length; } return this.#o = [], this.#t = 0, n; } parseCloseBody(e) { i(e.length !== 1); let t; if (e.length >= 2 && (t = e.readUInt16BE(0)), t !== void 0 && !u(t)) return { code: 1002, reason: `Invalid status code`, error: !0 }; let n = e.subarray(2); n[0] === 239 && n[1] === 187 && n[2] === 191 && (n = n.subarray(3)); try { n = p(n); } catch { return { code: 1007, reason: `Invalid UTF-8`, error: !0 }; } return { code: t, reason: n, error: !1 }; } parseControlFrame(e) { let { opcode: t, payloadLength: n } = this.#a; if (t === o.CLOSE) { if (n === 1) return _(this.#c, 1002, `Received close frame with a 1-byte body.`), !1; if (this.#a.closeInfo = this.parseCloseBody(e), this.#a.closeInfo.error) { let { code: e, reason: t } = this.#a.closeInfo; return _(this.#c, e, t), !1; } if (!this.#c.closeState.has(l.SENT) && !this.#c.closeState.has(l.RECEIVED)) { let e = c; this.#a.closeInfo.code && (e = Buffer.allocUnsafe(2), e.writeUInt16BE(this.#a.closeInfo.code, 0)); let t = new v(e); this.#c.socket.write(t.createFrame(o.CLOSE)), this.#c.closeState.add(l.SENT); } return this.#c.readyState = s.CLOSING, this.#c.closeState.add(l.RECEIVED), !1; } else if (t === o.PING) { if (!this.#c.closeState.has(l.RECEIVED)) { let t = new v(e); this.#c.socket.write(t.createFrame(o.PONG)), this.#c.onPing(e); } } else t === o.PONG && this.#c.onPong(e); return !0; } get closingInfo() { return this.#a.closeInfo; } } }; })); var Pt = c$3(((e, t) => { let { WebsocketFrameSend: n } = At(), { opcodes: r, sendHints: i } = Ot(), a = _e(); var o = class { #e = new a(); #t = !1; #n; constructor(e) { this.#n = e; } add(e, t, r) { if (r !== i.blob) { if (this.#t) { let n = { promise: null, callback: t, frame: s(e, r) }; this.#e.push(n); } else if (r === i.text) { let { 0: r, 1: i } = n.createFastTextFrame(e); this.#n.cork(), this.#n.write(r), this.#n.write(i, t), this.#n.uncork(); } else this.#n.write(s(e, r), t); return; } let a = { promise: e.arrayBuffer().then((e) => { a.promise = null, a.frame = s(e, r); }), callback: t, frame: null }; this.#e.push(a), this.#t || this.#r(); } async #r() { this.#t = !0; let e = this.#e; for (; !e.isEmpty();) { let t = e.shift(); t.promise !== null && await t.promise, this.#n.write(t.frame, t.callback), t.callback = t.frame = null; } this.#t = !1; } }; function s(e, t) { return new n(c(e, t)).createFrame(t === i.text ? r.TEXT : r.BINARY); } function c(e, t) { switch (t) { case i.text: case i.typedArray: return new Uint8Array(e.buffer, e.byteOffset, e.byteLength); case i.arrayBuffer: case i.blob: return new Uint8Array(e); } } t.exports = { SendQueue: o }; })); var Ft = c$3(((e, t) => { let { isArrayBuffer: r } = p$4(`node:util/types`), { webidl: i } = de(), { URLSerializer: a } = J$1(), { environmentSettingsObject: o } = Y$1(), { staticPropertyDescriptors: s, states: c, sentCloseFrameState: l, sendHints: u, opcodes: d } = Ot(), { isConnecting: f, isEstablished: p, isClosing: m, isClosed: h, isValidSubprotocol: g, fireEvent: _, utf8Decode: v, toArrayBuffer: y, getURLRecord: b } = kt(), { establishWebSocketConnection: x, closeWebSocketConnection: S, failWebsocketConnection: C } = jt(), { ByteParser: w } = Nt(), { kEnumerableProperty: T } = B$1(), { getGlobalDispatcher: E } = Ze(), { ErrorEvent: D, CloseEvent: O, createFastMessageEvent: k } = Dt(), { SendQueue: A } = Pt(), { WebsocketFrameSend: j } = At(), { channels: M } = H$1(); function N(e) { return typeof e?.address == `function` ? e.address() : typeof e?.session?.socket?.address == `function` ? e.session.socket.address() : null; } var P = class e extends EventTarget { #e = { open: null, error: null, close: null, message: null }; #t = 0; #n = ``; #r = ``; #i; #a = { onConnectionEstablished: (e, t) => this.#l(e, t), onMessage: (e, t) => this.#u(e, t), onParserError: (e) => C(this.#a, null, e.message), onParserDrain: () => this.#d(), onSocketData: (e) => { this.#c.write(e) || this.#a.socket.pause(); }, onSocketError: (e) => { this.#a.readyState = c.CLOSING, M.socketError.hasSubscribers && M.socketError.publish(e), this.#a.socket.destroy(); }, onSocketClose: () => this.#f(), onPing: (e) => { M.ping.hasSubscribers && M.ping.publish({ payload: e, websocket: this }); }, onPong: (e) => { M.pong.hasSubscribers && M.pong.publish({ payload: e, websocket: this }); }, readyState: c.CONNECTING, socket: null, closeState: /* @__PURE__ */ new Set(), controller: null, wasEverConnected: !1 }; #o; #s; #c; constructor(t, n = []) { super(), i.util.markAsUncloneable(this); let r = `WebSocket constructor`; i.argumentLengthCheck(arguments, 1, r); let a = i.converters[`DOMString or sequence or WebSocketInit`](n, r, `options`); t = i.converters.USVString(t), n = a.protocols; let s = o.settingsObject.baseUrl, c = b(t, s); if (typeof n == `string` && (n = [n]), n.length !== new Set(n.map((e) => e.toLowerCase())).size || n.length > 0 && !n.every((e) => g(e))) throw new DOMException(`Invalid Sec-WebSocket-Protocol value`, `SyntaxError`); this.#o = new URL(c.href); let l = o.settingsObject; this.#a.controller = x(c, n, l, this.#a, a), this.#a.readyState = e.CONNECTING, this.#s = `blob`; } close(t = void 0, n = void 0) { i.brandCheck(this, e), t !== void 0 && (t = i.converters[`unsigned short`](t, `WebSocket.close`, `code`, i.attributes.Clamp)), n !== void 0 && (n = i.converters.USVString(n)), t ??= null, n ??= ``, S(this.#a, t, n, !0); } send(t) { i.brandCheck(this, e); let n = `WebSocket.send`; if (i.argumentLengthCheck(arguments, 1, n), t = i.converters.WebSocketSendData(t, n, `data`), f(this.#a.readyState)) throw new DOMException(`Sent before connected.`, `InvalidStateError`); if (!(!p(this.#a.readyState) || m(this.#a.readyState))) if (typeof t == `string`) { let e = Buffer.from(t); this.#t += e.byteLength, this.#i.add(e, () => { this.#t -= e.byteLength; }, u.text); } else r(t) ? (this.#t += t.byteLength, this.#i.add(t, () => { this.#t -= t.byteLength; }, u.arrayBuffer)) : ArrayBuffer.isView(t) ? (this.#t += t.byteLength, this.#i.add(t, () => { this.#t -= t.byteLength; }, u.typedArray)) : i.is.Blob(t) && (this.#t += t.size, this.#i.add(t, () => { this.#t -= t.size; }, u.blob)); } get readyState() { return i.brandCheck(this, e), this.#a.readyState; } get bufferedAmount() { return i.brandCheck(this, e), this.#t; } get url() { return i.brandCheck(this, e), a(this.#o); } get extensions() { return i.brandCheck(this, e), this.#r; } get protocol() { return i.brandCheck(this, e), this.#n; } get onopen() { return i.brandCheck(this, e), this.#e.open; } set onopen(t) { i.brandCheck(this, e), this.#e.open && this.removeEventListener(`open`, this.#e.open); let n = i.converters.EventHandlerNonNull(t); n === null ? this.#e.open = null : (this.addEventListener(`open`, n), this.#e.open = t); } get onerror() { return i.brandCheck(this, e), this.#e.error; } set onerror(t) { i.brandCheck(this, e), this.#e.error && this.removeEventListener(`error`, this.#e.error); let n = i.converters.EventHandlerNonNull(t); n === null ? this.#e.error = null : (this.addEventListener(`error`, n), this.#e.error = t); } get onclose() { return i.brandCheck(this, e), this.#e.close; } set onclose(t) { i.brandCheck(this, e), this.#e.close && this.removeEventListener(`close`, this.#e.close); let n = i.converters.EventHandlerNonNull(t); n === null ? this.#e.close = null : (this.addEventListener(`close`, n), this.#e.close = t); } get onmessage() { return i.brandCheck(this, e), this.#e.message; } set onmessage(t) { i.brandCheck(this, e), this.#e.message && this.removeEventListener(`message`, this.#e.message); let n = i.converters.EventHandlerNonNull(t); n === null ? this.#e.message = null : (this.addEventListener(`message`, n), this.#e.message = t); } get binaryType() { return i.brandCheck(this, e), this.#s; } set binaryType(t) { i.brandCheck(this, e), t !== `blob` && t !== `arraybuffer` ? this.#s = `blob` : this.#s = t; } #l(e, t) { this.#a.socket = e.socket; let n = new w(this.#a, t); n.on(`drain`, () => this.#a.onParserDrain()), n.on(`error`, (e) => this.#a.onParserError(e)), this.#c = n, this.#i = new A(e.socket), this.#a.readyState = c.OPEN; let r = e.headersList.get(`sec-websocket-extensions`); r !== null && (this.#r = r); let i = e.headersList.get(`sec-websocket-protocol`); if (i !== null && (this.#n = i), _(`open`, this), M.open.hasSubscribers) { let t = e.headersList.entries; M.open.publish({ address: N(e.socket), protocol: this.#n, extensions: this.#r, websocket: this, handshakeResponse: { status: e.status, statusText: e.statusText, headers: t } }); } } #u(e, t) { if (this.#a.readyState !== c.OPEN) return; let n; if (e === d.TEXT) try { n = v(t); } catch { C(this.#a, 1007, `Received invalid UTF-8 in text frame.`); return; } else e === d.BINARY && (n = this.#s === `blob` ? new Blob([t]) : y(t)); _(`message`, this, k, { origin: this.#o.origin, data: n }); } #d() { this.#a.socket.resume(); } #f() { let e = this.#a.closeState.has(l.SENT) && this.#a.closeState.has(l.RECEIVED), t = 1005, n = ``, r = this.#c?.closingInfo; r && !r.error && (t = r.code ?? 1005, n = r.reason), this.#a.readyState = c.CLOSED, this.#a.closeState.has(l.RECEIVED) || (t = 1006, _(`error`, this, (e, t) => new D(e, t), { error: TypeError(n) })), _(`close`, this, (e, t) => new O(e, t), { wasClean: e, code: t, reason: n }), M.close.hasSubscribers && M.close.publish({ websocket: this, code: t, reason: n }); } static ping(e, t) { if (Buffer.isBuffer(t)) { if (t.length > 125) throw TypeError(`A PING frame cannot have a body larger than 125 bytes.`); } else if (t !== void 0) throw TypeError(`Expected buffer payload`); let n = e.#a.readyState; if (p(n) && !m(n) && !h(n)) { let n = new j(t); e.#a.socket.write(n.createFrame(d.PING)); } } }; let { ping: F } = P; Reflect.deleteProperty(P, `ping`), P.CONNECTING = P.prototype.CONNECTING = c.CONNECTING, P.OPEN = P.prototype.OPEN = c.OPEN, P.CLOSING = P.prototype.CLOSING = c.CLOSING, P.CLOSED = P.prototype.CLOSED = c.CLOSED, Object.defineProperties(P.prototype, { CONNECTING: s, OPEN: s, CLOSING: s, CLOSED: s, url: T, readyState: T, bufferedAmount: T, onopen: T, onerror: T, onclose: T, close: T, onmessage: T, binaryType: T, send: T, extensions: T, protocol: T, [Symbol.toStringTag]: { value: `WebSocket`, writable: !1, enumerable: !1, configurable: !0 } }), Object.defineProperties(P, { CONNECTING: s, OPEN: s, CLOSING: s, CLOSED: s }), i.converters[`sequence`] = i.sequenceConverter(i.converters.DOMString), i.converters[`DOMString or sequence`] = function(e, t, n) { return i.util.Type(e) === i.util.Types.OBJECT && Symbol.iterator in e ? i.converters[`sequence`](e) : i.converters.DOMString(e, t, n); }, i.converters.WebSocketInit = i.dictionaryConverter([ { key: `protocols`, converter: i.converters[`DOMString or sequence`], defaultValue: () => [] }, { key: `dispatcher`, converter: i.converters.any, defaultValue: () => E() }, { key: `headers`, converter: i.nullableConverter(i.converters.HeadersInit) } ]), i.converters[`DOMString or sequence or WebSocketInit`] = function(e) { return i.util.Type(e) === i.util.Types.OBJECT && !(Symbol.iterator in e) ? i.converters.WebSocketInit(e) : { protocols: i.converters[`DOMString or sequence`](e) }; }, i.converters.WebSocketSendData = function(e) { return i.util.Type(e) === i.util.Types.OBJECT && (i.is.Blob(e) || i.is.BufferSource(e)) ? e : i.converters.USVString(e); }, t.exports = { WebSocket: P, ping: F }; })); var It = c$3(((e, t) => { let { webidl: n } = de(), { validateCloseCodeAndReason: r } = kt(), { kConstruct: i } = I$1(), { kEnumerableProperty: a } = B$1(); function o() { class e extends DOMException { get reason() { return ``; } } return new e().reason === void 0 ? new Proxy(DOMException, { construct(e, t, n) { let r = Reflect.construct(e, t, e); return Object.setPrototypeOf(r, n.prototype), r; } }) : DOMException; } var s = class e extends o() { #e; #t; constructor(e = ``, t = void 0) { if (e = n.converters.DOMString(e, `WebSocketError`, `message`), super(e, `WebSocketError`), t === i) return; t !== null && (t = n.converters.WebSocketCloseInfo(t)); let a = t.closeCode ?? null, o = t.reason ?? ``; r(a, o), o.length !== 0 && a === null && (a = 1e3), this.#e = a, this.#t = o; } get closeCode() { return this.#e; } get reason() { return this.#t; } static createUnvalidatedWebSocketError(t, n, r) { let a = new e(t, i); return a.#e = n, a.#t = r, a; } }; let { createUnvalidatedWebSocketError: c } = s; delete s.createUnvalidatedWebSocketError, Object.defineProperties(s.prototype, { closeCode: a, reason: a, [Symbol.toStringTag]: { value: `WebSocketError`, writable: !1, enumerable: !1, configurable: !0 } }), n.is.WebSocketError = n.util.MakeTypeAssertion(s), t.exports = { WebSocketError: s, createUnvalidatedWebSocketError: c }; })); var Lt = c$3(((e, t) => { let { createDeferredPromise: n } = X$1(), { environmentSettingsObject: r } = Y$1(), { states: i, opcodes: a, sentCloseFrameState: o } = Ot(), { webidl: s } = de(), { getURLRecord: c, isValidSubprotocol: l, isEstablished: u, utf8Decode: d } = kt(), { establishWebSocketConnection: f, failWebsocketConnection: p, closeWebSocketConnection: m } = jt(), { channels: h } = H$1(), { WebsocketFrameSend: g } = At(), { ByteParser: _ } = Nt(), { WebSocketError: v, createUnvalidatedWebSocketError: y } = It(), { kEnumerableProperty: b } = B$1(), { utf8DecodeBytes: x } = le(), S = !1; var C = class { #e; #t; #n; #r; #i; #a; #o = !1; #s = { onConnectionEstablished: (e, t) => this.#u(e, t), onMessage: (e, t) => this.#d(e, t), onParserError: (e) => p(this.#s, null, e.message), onParserDrain: () => this.#s.socket.resume(), onSocketData: (e) => { this.#c.write(e) || this.#s.socket.pause(); }, onSocketError: (e) => { this.#s.readyState = i.CLOSING, h.socketError.hasSubscribers && h.socketError.publish(e), this.#s.socket.destroy(); }, onSocketClose: () => this.#f(), onPing: () => {}, onPong: () => {}, readyState: i.CONNECTING, socket: null, closeState: /* @__PURE__ */ new Set(), controller: null, wasEverConnected: !1 }; #c; constructor(e, t = void 0) { S ||= (process.emitWarning(`WebSocketStream is experimental! Expect it to change at any time.`, { code: `UNDICI-WSS` }), !0), s.argumentLengthCheck(arguments, 1, `WebSocket`), e = s.converters.USVString(e), t !== null && (t = s.converters.WebSocketStreamOptions(t)); let a = r.settingsObject.baseUrl, o = c(e, a), d = t.protocols; if (d.length !== new Set(d.map((e) => e.toLowerCase())).size || d.length > 0 && !d.every((e) => l(e))) throw new DOMException(`Invalid Sec-WebSocket-Protocol value`, `SyntaxError`); if (this.#e = o.toString(), this.#t = n(), this.#n = n(), t.signal != null) { let e = t.signal; if (e.aborted) { this.#t.reject(e.reason), this.#n.reject(e.reason); return; } e.addEventListener(`abort`, () => { u(this.#s.readyState) || (p(this.#s), this.#s.readyState = i.CLOSING, this.#t.reject(e.reason), this.#n.reject(e.reason), this.#o = !0); }, { once: !0 }); } let m = r.settingsObject; this.#s.controller = f(o, d, m, this.#s, t); } get url() { return this.#e.toString(); } get opened() { return this.#t.promise; } get closed() { return this.#n.promise; } close(e = void 0) { e !== null && (e = s.converters.WebSocketCloseInfo(e)); let t = e.closeCode ?? null, n = e.reason; m(this.#s, t, n, !0); } #l(e) { e = s.converters.WebSocketStreamWrite(e); let t = n(), r = null, i = null; if (s.is.BufferSource(e)) r = new Uint8Array(ArrayBuffer.isView(e) ? new Uint8Array(e.buffer, e.byteOffset, e.byteLength) : e.slice()), i = a.BINARY; else { let n; try { n = s.converters.DOMString(e); } catch (e) { return t.reject(e), t.promise; } r = new TextEncoder().encode(n), i = a.TEXT; } if (!this.#s.closeState.has(o.SENT) && !this.#s.closeState.has(o.RECEIVED)) { let e = new g(r); this.#s.socket.write(e.createFrame(i), () => { t.resolve(void 0); }); } return t.promise; } #u(e, t) { this.#s.socket = e.socket; let n = new _(this.#s, t); n.on(`drain`, () => this.#s.onParserDrain()), n.on(`error`, (e) => this.#s.onParserError(e)), this.#c = n, this.#s.readyState = i.OPEN; let r = t ?? ``, a = e.headersList.get(`sec-websocket-protocol`) ?? ``, o = new ReadableStream({ start: (e) => { this.#i = e; }, cancel: (e) => this.#m(e) }), s = new WritableStream({ write: (e) => this.#l(e), close: () => m(this.#s, null, null), abort: (e) => this.#p(e) }); this.#r = o, this.#a = s, this.#t.resolve({ extensions: r, protocol: a, readable: o, writable: s }); } #d(e, t) { if (this.#s.readyState !== i.OPEN) return; let n; if (e === a.TEXT) try { n = d(t); } catch { p(this.#s, 1007, `Received invalid UTF-8 in text frame.`); return; } else e === a.BINARY && (n = new Uint8Array(t.buffer, t.byteOffset, t.byteLength)); this.#i.enqueue(n); } #f() { let e = this.#s.closeState.has(o.SENT) && this.#s.closeState.has(o.RECEIVED); if (this.#s.readyState = i.CLOSED, this.#o) return; this.#s.wasEverConnected || this.#t.reject(new v(`Socket never opened`)); let t = this.#c?.closingInfo, n = t?.code ?? 1005; !this.#s.closeState.has(o.SENT) && !this.#s.closeState.has(o.RECEIVED) && (n = 1006); let r = t?.reason == null ? `` : x(Buffer.from(t.reason)); if (e) this.#i.close(), this.#a.locked || this.#a.abort(new DOMException(`A closed WebSocketStream cannot be written to`, `InvalidStateError`)), this.#n.resolve({ closeCode: n, reason: r }); else { let e = y(`unclean close`, n, r); this.#i?.error(e), this.#a?.abort(e), this.#n.reject(e); } } #p(e) { let t = null, n = ``; s.is.WebSocketError(e) && (t = e.closeCode, n = e.reason), m(this.#s, t, n); } #m(e) { this.#p(e); } }; Object.defineProperties(C.prototype, { url: b, opened: b, closed: b, close: b, [Symbol.toStringTag]: { value: `WebSocketStream`, writable: !1, enumerable: !1, configurable: !0 } }), s.converters.WebSocketStreamOptions = s.dictionaryConverter([{ key: `protocols`, converter: s.sequenceConverter(s.converters.USVString), defaultValue: () => [] }, { key: `signal`, converter: s.nullableConverter(s.converters.AbortSignal), defaultValue: () => null }]), s.converters.WebSocketCloseInfo = s.dictionaryConverter([{ key: `closeCode`, converter: (e) => s.converters[`unsigned short`](e, s.attributes.EnforceRange) }, { key: `reason`, converter: s.converters.USVString, defaultValue: () => `` }]), s.converters.WebSocketStreamWrite = function(e) { return typeof e == `string` ? s.converters.USVString(e) : s.converters.BufferSource(e); }, t.exports = { WebSocketStream: C }; })); var Rt = c$3(((e, t) => { function n(e) { return e.indexOf(`\0`) === -1; } function r(e) { if (e.length === 0) return !1; for (let t = 0; t < e.length; t++) if (e.charCodeAt(t) < 48 || e.charCodeAt(t) > 57) return !1; return !0; } t.exports = { isValidLastEventId: n, isASCIINumber: r }; })); var zt = c$3(((e, t) => { let { Transform: r } = p$4(`node:stream`), { isASCIINumber: i, isValidLastEventId: a } = Rt(), o = [ 239, 187, 191 ]; t.exports = { EventSourceStream: class extends r { state; checkBOM = !0; crlfCheck = !1; eventEndCheck = !1; buffer = null; pos = 0; event = { data: void 0, event: void 0, id: void 0, retry: void 0 }; constructor(e = {}) { e.readableObjectMode = !0, super(e), this.state = e.eventSourceSettings || {}, e.push && (this.push = e.push); } _transform(e, t, n) { if (e.length === 0) { n(); return; } if (this.buffer ? this.buffer = Buffer.concat([this.buffer, e]) : this.buffer = e, this.checkBOM) switch (this.buffer.length) { case 1: if (this.buffer[0] === o[0]) { n(); return; } this.checkBOM = !1, n(); return; case 2: if (this.buffer[0] === o[0] && this.buffer[1] === o[1]) { n(); return; } this.checkBOM = !1; break; case 3: if (this.buffer[0] === o[0] && this.buffer[1] === o[1] && this.buffer[2] === o[2]) { this.buffer = Buffer.alloc(0), this.checkBOM = !1, n(); return; } this.checkBOM = !1; break; default: this.buffer[0] === o[0] && this.buffer[1] === o[1] && this.buffer[2] === o[2] && (this.buffer = this.buffer.subarray(3)), this.checkBOM = !1; break; } for (; this.pos < this.buffer.length;) { if (this.eventEndCheck) { if (this.crlfCheck) { if (this.buffer[this.pos] === 10) { this.buffer = this.buffer.subarray(this.pos + 1), this.pos = 0, this.crlfCheck = !1; continue; } this.crlfCheck = !1; } if (this.buffer[this.pos] === 10 || this.buffer[this.pos] === 13) { this.buffer[this.pos] === 13 && (this.crlfCheck = !0), this.buffer = this.buffer.subarray(this.pos + 1), this.pos = 0, (this.event.data !== void 0 || this.event.event || this.event.id !== void 0 || this.event.retry) && this.processEvent(this.event), this.clearEvent(); continue; } this.eventEndCheck = !1; continue; } if (this.buffer[this.pos] === 10 || this.buffer[this.pos] === 13) { this.buffer[this.pos] === 13 && (this.crlfCheck = !0), this.parseLine(this.buffer.subarray(0, this.pos), this.event), this.buffer = this.buffer.subarray(this.pos + 1), this.pos = 0, this.eventEndCheck = !0; continue; } this.pos++; } n(); } parseLine(e, t) { if (e.length === 0) return; let n = e.indexOf(58); if (n === 0) return; let r = ``, o = ``; if (n !== -1) { r = e.subarray(0, n).toString(`utf8`); let t = n + 1; e[t] === 32 && ++t, o = e.subarray(t).toString(`utf8`); } else r = e.toString(`utf8`), o = ``; switch (r) { case `data`: t[r] === void 0 ? t[r] = o : t[r] += `\n${o}`; break; case `retry`: i(o) && (t[r] = o); break; case `id`: a(o) && (t[r] = o); break; case `event`: o.length > 0 && (t[r] = o); break; } } processEvent(e) { e.retry && i(e.retry) && (this.state.reconnectionTime = parseInt(e.retry, 10)), e.id !== void 0 && a(e.id) && (this.state.lastEventId = e.id), e.data !== void 0 && this.push({ type: e.event || `message`, options: { data: e.data, lastEventId: this.state.lastEventId, origin: this.state.origin } }); } clearEvent() { this.event = { data: void 0, event: void 0, id: void 0, retry: void 0 }; } } }; })); var Bt = c$3(((e, t) => { let { pipeline: r } = p$4(`node:stream`), { fetching: i } = yt(), { makeRequest: a } = _t(), { webidl: o } = de(), { EventSourceStream: s } = zt(), { parseMIMEType: c } = J$1(), { createFastMessageEvent: l } = Dt(), { isNetworkError: u } = gt(), { kEnumerableProperty: d } = B$1(), { environmentSettingsObject: f } = Y$1(), p = !1, m = 3e3; var h = class e extends EventTarget { #e = { open: null, error: null, message: null }; #t; #n = !1; #r = 0; #i = null; #a = null; #o; #s; constructor(e, t = {}) { super(), o.util.markAsUncloneable(this); let n = `EventSource constructor`; o.argumentLengthCheck(arguments, 1, n), p || (p = !0, process.emitWarning(`EventSource is experimental, expect them to change at any time.`, { code: `UNDICI-ES` })), e = o.converters.USVString(e), t = o.converters.EventSourceInitDict(t, n, `eventSourceInitDict`), this.#o = t.node.dispatcher || t.dispatcher, this.#s = { lastEventId: ``, reconnectionTime: t.node.reconnectionTime }; let r = f, i; try { i = new URL(e, r.settingsObject.baseUrl), this.#s.origin = i.origin; } catch (e) { throw new DOMException(e, `SyntaxError`); } this.#t = i.href; let s = `anonymous`; t.withCredentials === !0 && (s = `use-credentials`, this.#n = !0); let c = { redirect: `follow`, keepalive: !0, mode: `cors`, credentials: s === `anonymous` ? `same-origin` : `omit`, referrer: `no-referrer` }; c.client = f.settingsObject, c.headersList = [[`accept`, { name: `accept`, value: `text/event-stream` }]], c.cache = `no-store`, c.initiator = `other`, c.urlList = [new URL(this.#t)], this.#i = a(c), this.#c(); } get readyState() { return this.#r; } get url() { return this.#t; } get withCredentials() { return this.#n; } #c() { if (this.#r === 2) return; this.#r = 0; let e = { request: this.#i, dispatcher: this.#o }; e.processResponseEndOfBody = (e) => { if (!u(e)) return this.#l(); }, e.processResponse = (e) => { if (u(e)) if (e.aborted) { this.close(), this.dispatchEvent(new Event(`error`)); return; } else { this.#l(); return; } let t = e.headersList.get(`content-type`, !0), n = t === null ? `failure` : c(t), i = n !== `failure` && n.essence === `text/event-stream`; if (e.status !== 200 || i === !1) { this.close(), this.dispatchEvent(new Event(`error`)); return; } this.#r = 1, this.dispatchEvent(new Event(`open`)), this.#s.origin = e.urlList[e.urlList.length - 1].origin; let a = new s({ eventSourceSettings: this.#s, push: (e) => { this.dispatchEvent(l(e.type, e.options)); } }); r(e.body.stream, a, (e) => { e?.aborted === !1 && (this.close(), this.dispatchEvent(new Event(`error`))); }); }, this.#a = i(e); } #l() { this.#r !== 2 && (this.#r = 0, this.dispatchEvent(new Event(`error`)), setTimeout(() => { this.#r === 0 && (this.#s.lastEventId.length && this.#i.headersList.set(`last-event-id`, this.#s.lastEventId, !0), this.#c()); }, this.#s.reconnectionTime)?.unref()); } close() { o.brandCheck(this, e), this.#r !== 2 && (this.#r = 2, this.#a.abort(), this.#i = null); } get onopen() { return this.#e.open; } set onopen(e) { this.#e.open && this.removeEventListener(`open`, this.#e.open); let t = o.converters.EventHandlerNonNull(e); t === null ? this.#e.open = null : (this.addEventListener(`open`, t), this.#e.open = e); } get onmessage() { return this.#e.message; } set onmessage(e) { this.#e.message && this.removeEventListener(`message`, this.#e.message); let t = o.converters.EventHandlerNonNull(e); t === null ? this.#e.message = null : (this.addEventListener(`message`, t), this.#e.message = e); } get onerror() { return this.#e.error; } set onerror(e) { this.#e.error && this.removeEventListener(`error`, this.#e.error); let t = o.converters.EventHandlerNonNull(e); t === null ? this.#e.error = null : (this.addEventListener(`error`, t), this.#e.error = e); } }; let g = { CONNECTING: { __proto__: null, configurable: !1, enumerable: !0, value: 0, writable: !1 }, OPEN: { __proto__: null, configurable: !1, enumerable: !0, value: 1, writable: !1 }, CLOSED: { __proto__: null, configurable: !1, enumerable: !0, value: 2, writable: !1 } }; Object.defineProperties(h, g), Object.defineProperties(h.prototype, g), Object.defineProperties(h.prototype, { close: d, onerror: d, onmessage: d, onopen: d, readyState: d, url: d, withCredentials: d }), o.converters.EventSourceInitDict = o.dictionaryConverter([ { key: `withCredentials`, converter: o.converters.boolean, defaultValue: () => !1 }, { key: `dispatcher`, converter: o.converters.any }, { key: `node`, converter: o.dictionaryConverter([{ key: `reconnectionTime`, converter: o.converters[`unsigned long`], defaultValue: () => m }, { key: `dispatcher`, converter: o.converters.any }]), defaultValue: () => ({}) } ]), t.exports = { EventSource: h, defaultReconnectionTime: m }; })); const Vt = new (c$3(((e, t) => { let n = Z$1(), r = W$1(), i = ye(), a = be(), o = xe(), s = Se(), c = Ee(), l = Te(), u = De(), d = ke(), f = Ae(), p = R$1(), m = B$1(), { InvalidArgumentError: h } = p, g = Re(), _ = K$1(), v = Ue(), { MockCallHistory: y, MockCallHistoryLog: b } = We(), x = qe(), S = Ge(), C = Xe(), w = ze(), T = Oe(), { getGlobalDispatcher: E, setGlobalDispatcher: D } = Ze(), O = Qe(), k = $e(); Object.assign(r.prototype, g), t.exports.Dispatcher = r, t.exports.Client = n, t.exports.Pool = i, t.exports.BalancedPool = a, t.exports.RoundRobinPool = o, t.exports.Agent = s, t.exports.ProxyAgent = c, t.exports.Socks5ProxyAgent = l, t.exports.EnvHttpProxyAgent = u, t.exports.RetryAgent = d, t.exports.H2CClient = f, t.exports.RetryHandler = T, t.exports.DecoratorHandler = O, t.exports.RedirectHandler = k, t.exports.interceptors = { redirect: et(), responseError: tt(), retry: nt(), dump: rt(), dns: it(), cache: ut(), decompress: dt(), deduplicate: pt() }, t.exports.cacheStores = { MemoryCacheStore: ct() }; let A = mt(); t.exports.cacheStores.SqliteCacheStore = A, t.exports.buildConnector = _, t.exports.errors = p, t.exports.util = { parseHeaders: m.parseHeaders, headerNameToString: m.headerNameToString }; function j(e) { return (t, n, r) => { if (typeof n == `function` && (r = n, n = null), !t || typeof t != `string` && typeof t != `object` && !(t instanceof URL)) throw new h(`invalid url`); if (n != null && typeof n != `object`) throw new h(`invalid opts`); if (n && n.path != null) { if (typeof n.path != `string`) throw new h(`invalid opts.path`); let e = n.path; n.path.startsWith(`/`) || (e = `/${e}`), t = new URL(m.parseOrigin(t).origin + e); } else n ||= typeof t == `object` ? t : {}, t = m.parseURL(t); let { agent: i, dispatcher: a = E() } = n; if (i) throw new h(`unsupported opts.agent. Did you mean opts.client?`); return e.call(a, { ...n, origin: t.origin, path: t.search ? `${t.pathname}${t.search}` : t.pathname, method: n.method || (n.body ? `PUT` : `GET`) }, r); }; } t.exports.setGlobalDispatcher = D, t.exports.getGlobalDispatcher = E; let M = yt().fetch, N = typeof __filename < `u` ? __filename : void 0; function P(e, t) { if (!e || typeof e != `object`) return; let n = typeof e.stack == `string` ? e.stack : ``, r = t.replace(/\\/g, `/`); if (n && (n.includes(t) || n.includes(r))) return; let i = {}; if (Error.captureStackTrace(i, P), !i.stack) return; let a = i.stack.split(` `).slice(1).join(` `); e.stack = n ? `${n}\n${a}` : i.stack; } t.exports.fetch = function(e, n = void 0) { return M(e, n).catch((e) => { throw N ? P(e, N) : e && typeof e == `object` && Error.captureStackTrace(e, t.exports.fetch), e; }); }, t.exports.Headers = ht().Headers, t.exports.Response = gt().Response, t.exports.Request = _t().Request, t.exports.FormData = fe().FormData; let { setGlobalOrigin: F, getGlobalOrigin: L } = ce(); t.exports.setGlobalOrigin = F, t.exports.getGlobalOrigin = L; let { CacheStorage: ee } = St(), { kConstruct: z } = I$1(); t.exports.caches = new ee(z); let { deleteCookie: V, getCookies: H, getSetCookies: te, setCookie: U, parseCookie: ne } = Et(); t.exports.deleteCookie = V, t.exports.getCookies = H, t.exports.getSetCookies = te, t.exports.setCookie = U, t.exports.parseCookie = ne; let { parseMIMEType: G, serializeAMimeType: re } = J$1(); t.exports.parseMIMEType = G, t.exports.serializeAMimeType = re; let { CloseEvent: ie, ErrorEvent: ae, MessageEvent: oe } = Dt(), { WebSocket: se, ping: le } = Ft(); t.exports.WebSocket = se, t.exports.CloseEvent = ie, t.exports.ErrorEvent = ae, t.exports.MessageEvent = oe, t.exports.ping = le, t.exports.WebSocketStream = Lt().WebSocketStream, t.exports.WebSocketError = It().WebSocketError, t.exports.request = j(g.request), t.exports.stream = j(g.stream), t.exports.pipeline = j(g.pipeline), t.exports.connect = j(g.connect), t.exports.upgrade = j(g.upgrade), t.exports.MockClient = v, t.exports.MockCallHistory = y, t.exports.MockCallHistoryLog = b, t.exports.MockPool = S, t.exports.MockAgent = x, t.exports.SnapshotAgent = C, t.exports.mockErrors = w; let { EventSource: q } = Bt(); t.exports.EventSource = q; function ue() { globalThis.fetch = t.exports.fetch, globalThis.Headers = t.exports.Headers, globalThis.Response = t.exports.Response, globalThis.Request = t.exports.Request, globalThis.FormData = t.exports.FormData, globalThis.WebSocket = t.exports.WebSocket, globalThis.CloseEvent = t.exports.CloseEvent, globalThis.ErrorEvent = t.exports.ErrorEvent, globalThis.MessageEvent = t.exports.MessageEvent, globalThis.EventSource = t.exports.EventSource; } t.exports.install = ue; }))()).Agent({ bodyTimeout: 0 }); var Ht = class { constructor(e) { this.fetch = P$1(e.fetch ?? globalThis.fetch), this.baseUrl = e.baseUrl, this.debug = e.debug ?? process.env.DEBUG_FETCH === `true`, this.token = e.token, this.agent = Vt; } async request(e, t) { let n = new URL(`${this.baseUrl}${e}`); if (t?.query) for (let [e, r] of Object.entries(t.query)) M$1(r).forEach((t) => { n.searchParams.append(e, t.toString()); }); let r = Date.now(), i = await this.fetch(n.toString(), { ...t, body: t?.body, method: t?.method || `GET`, headers: this.token ? { Authorization: `Bearer ${this.token}`, ...t?.headers } : t?.headers, dispatcher: this.agent, signal: t?.signal }); if (this.debug) { let e = Date.now() - r; if (console.log(`[API] ${n} (${i.status}) ${e}ms`), i.status === 429) { let e = parseInt(i.headers.get(`Retry-After`) ?? ``, 10), t = Math.floor(e / 60 / 60), r = Math.floor(e / 60) % 60, a = e % 60; console.warn(`[API] ${n} Rate Limited, Retry After ${t}h ${r}m ${a}s`); } } return i; } }; function Ut(e) { return e.match(/\/v2\/sandboxes\/sessions\/([^/?]+)/)?.[1]; } function Wt(e) { return e.match(/\/v2\/sandboxes\/(?!sessions(?:\/|$|\?))(?!snapshots(?:\/|$|\?))([^/?]+)/)?.[1]; } async function Gt(e, t) { let n = Ut(t.url), r; n || (r = Wt(t.url)); let i = await t.text().catch((e) => new A$1(t, { message: `Can't read response text: ${String(e)}`, sessionId: n, sandboxName: r })); if (typeof i != `string`) return i; let a; try { a = JSON.parse(i || `{}`); } catch (e) { return new A$1(t, { message: `Can't parse JSON: ${String(e)}`, text: i, sessionId: n, sandboxName: r }); } if (!t.ok) return new A$1(t, { message: `Status code ${t.status} is not ok`, json: a, text: i, sessionId: n, sandboxName: r }); let o = e.safeParse(a); return o.success ? { json: o.data, response: t, text: i } : new A$1(t, { message: `Response JSON is not valid: ${o.error}`, json: a, text: i, sessionId: n, sandboxName: r }); } async function Q$1(e, t) { let n = await Gt(e, t); if (n instanceof A$1) throw n; return n; } const Kt = da$1({ exact: Mi$1().optional(), startsWith: Mi$1().optional(), regex: Mi$1().optional() }); const qt = da$1({ key: Kt.optional(), value: Kt.optional() }); const Jt = da$1({ path: Kt.optional(), method: la$1(Mi$1()).optional(), queryString: la$1(qt).optional(), headers: la$1(qt).optional() }); const Yt = da$1({ domain: Mi$1(), headers: ya$1(Mi$1(), Mi$1()).optional(), headerNames: la$1(Mi$1()).optional(), match: Jt.optional() }); const Xt = da$1({ domain: Mi$1(), forwardURL: Mi$1(), match: Jt.optional() }); const Zt = da$1({ headers: ya$1(Mi$1(), Mi$1()).optional() }); const Qt = da$1({ match: Jt.optional(), transform: la$1(Zt).optional(), forwardURL: Mi$1().optional() }); const $t = da$1({ allow: pa$1([la$1(Mi$1()), ya$1(Mi$1(), la$1(Qt))]).optional(), subnets: da$1({ allow: la$1(Mi$1()).optional(), deny: la$1(Mi$1()).optional() }).optional() }); const en = pa$1([da$1({ mode: Ca$1(`allow-all`) }).passthrough(), da$1({ mode: Ca$1(`deny-all`) }).passthrough()]); const tn = da$1({ mode: Ca$1(`custom`), allowedDomains: la$1(Mi$1()).optional(), allowedCIDRs: la$1(Mi$1()).optional(), deniedCIDRs: la$1(Mi$1()).optional(), injectionRules: la$1(Yt).optional(), forwardRules: la$1(Xt).optional() }).passthrough(); pa$1([en, $t.passthrough()]); const nn = pa$1([en, tn]); const rn = da$1({ id: Mi$1(), memory: Qi$1(), vcpus: Qi$1(), region: Mi$1(), runtime: Mi$1(), timeout: Qi$1(), status: xa$1([ `pending`, `running`, `stopping`, `stopped`, `failed`, `aborted`, `snapshotting` ]), requestedAt: Qi$1(), startedAt: Qi$1().optional(), requestedStopAt: Qi$1().optional(), stoppedAt: Qi$1().optional(), abortedAt: Qi$1().optional(), duration: Qi$1().optional(), sourceSnapshotId: Mi$1().optional(), snapshottedAt: Qi$1().optional(), createdAt: Qi$1(), cwd: Mi$1(), updatedAt: Qi$1(), interactivePort: Qi$1().optional(), networkPolicy: nn.optional(), activeCpuDurationMs: Qi$1().optional(), networkTransfer: da$1({ ingress: Qi$1(), egress: Qi$1() }).optional() }); const an = da$1({ url: Mi$1(), subdomain: Mi$1(), port: Qi$1() }); const on = da$1({ id: Mi$1(), sourceSessionId: Mi$1(), region: Mi$1(), status: xa$1([ `created`, `deleted`, `failed` ]), sizeBytes: Qi$1(), expiresAt: Qi$1().optional(), createdAt: Qi$1(), updatedAt: Qi$1(), lastUsedAt: Qi$1().optional(), creationMethod: Mi$1().optional(), parentId: Mi$1().optional() }); const sn = da$1({ count: Qi$1(), next: Mi$1().nullable() }); const cn = da$1({ id: Mi$1(), name: Mi$1(), args: la$1(Mi$1()), cwd: Mi$1(), sessionId: Mi$1(), exitCode: Qi$1().nullable(), startedAt: Qi$1() }); const ln = cn.extend({ exitCode: Qi$1() }); const un = da$1({ session: rn.passthrough() }); const dn = un.extend({ routes: la$1(an) }); const fn = da$1({ url: Mi$1(), token: Mi$1() }); const pn = da$1({ sessions: la$1(rn.passthrough()), pagination: sn }); const mn = da$1({ command: cn }); const hn = da$1({ command: ln }); const gn = da$1({}); const _n = da$1({ data: Mi$1() }); const vn = ha$1(`stream`, [ _n.extend({ stream: Ca$1(`stdout`) }), _n.extend({ stream: Ca$1(`stderr`) }), da$1({ stream: Ca$1(`error`), data: da$1({ code: Mi$1(), message: Mi$1() }) }) ]); const yn = da$1({ snapshots: la$1(on), pagination: sn }); const bn = da$1({ snapshot: on, siblings: la$1(on), count: Mi$1() }); const xn = da$1({ snapshots: la$1(bn), anchor: bn.optional(), pagination: sn }); const Sn = da$1({ snapshot: on, session: rn.passthrough() }); const Cn = da$1({ snapshot: on }); const wn = da$1({ name: Mi$1(), persistent: na$1(), region: Mi$1().optional(), vcpus: Qi$1().optional(), memory: Qi$1().optional(), runtime: Mi$1().optional(), timeout: Qi$1().optional(), networkPolicy: nn.optional(), totalEgressBytes: Qi$1().optional(), totalIngressBytes: Qi$1().optional(), totalActiveCpuDurationMs: Qi$1().optional(), totalDurationMs: Qi$1().optional(), createdAt: Qi$1(), updatedAt: Qi$1(), currentSessionId: Mi$1(), currentSnapshotId: Mi$1().optional(), status: rn.shape.status, statusUpdatedAt: Qi$1().optional(), cwd: Mi$1().optional(), tags: ya$1(Mi$1(), Mi$1()).optional(), snapshotExpiration: Qi$1().optional(), keepLastSnapshots: da$1({ count: Qi$1(), expiration: Qi$1().optional(), deleteEvicted: na$1().optional() }).optional() }); const Tn = da$1({ session: rn.passthrough(), sandbox: wn.optional(), snapshot: on.optional() }); const En = da$1({ sandbox: wn, session: rn.passthrough(), routes: la$1(an), resumed: na$1().optional() }); const Dn = da$1({ sandboxes: la$1(wn), pagination: sn }); const On = da$1({ sandbox: wn, routes: la$1(an).optional() }); var kn = c$3(((e, t) => { t.exports = p$4(`events`); })); var An = c$3(((e, t) => { t.exports = class { constructor(e) { if (!(e > 0) || e - 1 & e) throw Error(`Max size for a FixedFIFO should be a power of two`); this.buffer = Array(e), this.mask = e - 1, this.top = 0, this.btm = 0, this.next = null; } clear() { this.top = this.btm = 0, this.next = null, this.buffer.fill(void 0); } push(e) { return this.buffer[this.top] === void 0 ? (this.buffer[this.top] = e, this.top = this.top + 1 & this.mask, !0) : !1; } shift() { let e = this.buffer[this.btm]; if (e !== void 0) return this.buffer[this.btm] = void 0, this.btm = this.btm + 1 & this.mask, e; } peek() { return this.buffer[this.btm]; } isEmpty() { return this.buffer[this.btm] === void 0; } }; })); var jn = c$3(((e, t) => { let n = An(); t.exports = class { constructor(e) { this.hwm = e || 16, this.head = new n(this.hwm), this.tail = this.head, this.length = 0; } clear() { this.head = this.tail, this.head.clear(), this.length = 0; } push(e) { if (this.length++, !this.head.push(e)) { let t = this.head; this.head = t.next = new n(2 * this.head.buffer.length), this.head.push(e); } } shift() { this.length !== 0 && this.length--; let e = this.tail.shift(); if (e === void 0 && this.tail.next) { let e = this.tail.next; return this.tail.next = null, this.tail = e, this.tail.shift(); } return e; } peek() { let e = this.tail.peek(); return e === void 0 && this.tail.next ? this.tail.next.peek() : e; } isEmpty() { return this.length === 0; } }; })); var Mn = c$3(((e, t) => { function n(e) { return Buffer.isBuffer(e) || e instanceof Uint8Array; } function r(e) { return Buffer.isEncoding(e); } function i(e, t, n) { return Buffer.alloc(e, t, n); } function a(e) { return Buffer.allocUnsafe(e); } function o(e) { return Buffer.allocUnsafeSlow(e); } function s(e, t) { return Buffer.byteLength(e, t); } function c(e, t) { return Buffer.compare(e, t); } function l(e, t) { return Buffer.concat(e, t); } function u(e, t, n, r, i) { return b(e).copy(t, n, r, i); } function d(e, t) { return b(e).equals(t); } function f(e, t, n, r, i) { return b(e).fill(t, n, r, i); } function p(e, t, n) { return Buffer.from(e, t, n); } function m(e, t, n, r) { return b(e).includes(t, n, r); } function h(e, t, n, r) { return b(e).indexOf(t, n, r); } function g(e, t, n, r) { return b(e).lastIndexOf(t, n, r); } function _(e) { return b(e).swap16(); } function v(e) { return b(e).swap32(); } function y(e) { return b(e).swap64(); } function b(e) { return Buffer.isBuffer(e) ? e : Buffer.from(e.buffer, e.byteOffset, e.byteLength); } function x(e, t, n, r) { return b(e).toString(t, n, r); } function S(e, t, n, r, i) { return b(e).write(t, n, r, i); } function C(e, t) { return b(e).readDoubleBE(t); } function w(e, t) { return b(e).readDoubleLE(t); } function T(e, t) { return b(e).readFloatBE(t); } function E(e, t) { return b(e).readFloatLE(t); } function D(e, t) { return b(e).readInt32BE(t); } function O(e, t) { return b(e).readInt32LE(t); } function k(e, t) { return b(e).readUInt32BE(t); } function A(e, t) { return b(e).readUInt32LE(t); } function j(e, t, n) { return b(e).writeDoubleBE(t, n); } function M(e, t, n) { return b(e).writeDoubleLE(t, n); } function N(e, t, n) { return b(e).writeFloatBE(t, n); } function P(e, t, n) { return b(e).writeFloatLE(t, n); } function F(e, t, n) { return b(e).writeInt32BE(t, n); } function I(e, t, n) { return b(e).writeInt32LE(t, n); } function L(e, t, n) { return b(e).writeUInt32BE(t, n); } function R(e, t, n) { return b(e).writeUInt32LE(t, n); } t.exports = { isBuffer: n, isEncoding: r, alloc: i, allocUnsafe: a, allocUnsafeSlow: o, byteLength: s, compare: c, concat: l, copy: u, equals: d, fill: f, from: p, includes: m, indexOf: h, lastIndexOf: g, swap16: _, swap32: v, swap64: y, toBuffer: b, toString: x, write: S, readDoubleBE: C, readDoubleLE: w, readFloatBE: T, readFloatLE: E, readInt32BE: D, readInt32LE: O, readUInt32BE: k, readUInt32LE: A, writeDoubleBE: j, writeDoubleLE: M, writeFloatBE: N, writeFloatLE: P, writeInt32BE: F, writeInt32LE: I, writeUInt32BE: L, writeUInt32LE: R }; })); var Nn = c$3(((e, t) => { let n = Mn(); t.exports = class { constructor(e) { this.encoding = e; } get remaining() { return 0; } decode(e) { return n.toString(e, this.encoding); } flush() { return ``; } }; })); var Pn = c$3(((e, t) => { let n = Mn(); t.exports = class { constructor() { this._reset(); } get remaining() { return this.bytesSeen; } decode(e) { if (e.byteLength === 0) return ``; if (this.bytesNeeded === 0 && r(e, 0) === 0) return this.bytesSeen = i(e), n.toString(e, `utf8`); let t = ``, a = 0; if (this.bytesNeeded > 0) { for (; a < e.byteLength;) { let n = e[a]; if (n < this.lowerBoundary || n > this.upperBoundary) { t += `�`, this._reset(); break; } if (this.lowerBoundary = 128, this.upperBoundary = 191, this.codePoint = this.codePoint << 6 | n & 63, this.bytesSeen++, a++, this.bytesSeen === this.bytesNeeded) { t += String.fromCodePoint(this.codePoint), this._reset(); break; } } if (this.bytesNeeded > 0) return t; } let o = r(e, a), s = e.byteLength - o; s > a && (t += n.toString(e, `utf8`, a, s)); for (let n = s; n < e.byteLength; n++) { let r = e[n]; if (this.bytesNeeded === 0) { r <= 127 ? (this.bytesSeen = 0, t += String.fromCharCode(r)) : r >= 194 && r <= 223 ? (this.bytesNeeded = 2, this.bytesSeen = 1, this.codePoint = r & 31) : r >= 224 && r <= 239 ? (r === 224 ? this.lowerBoundary = 160 : r === 237 && (this.upperBoundary = 159), this.bytesNeeded = 3, this.bytesSeen = 1, this.codePoint = r & 15) : r >= 240 && r <= 244 ? (r === 240 ? this.lowerBoundary = 144 : r === 244 && (this.upperBoundary = 143), this.bytesNeeded = 4, this.bytesSeen = 1, this.codePoint = r & 7) : (this.bytesSeen = 1, t += `�`); continue; } if (r < this.lowerBoundary || r > this.upperBoundary) { t += `�`, n--, this._reset(); continue; } this.lowerBoundary = 128, this.upperBoundary = 191, this.codePoint = this.codePoint << 6 | r & 63, this.bytesSeen++, this.bytesSeen === this.bytesNeeded && (t += String.fromCodePoint(this.codePoint), this._reset()); } return t; } flush() { let e = this.bytesNeeded > 0 ? `�` : ``; return this._reset(), e; } _reset() { this.codePoint = 0, this.bytesNeeded = 0, this.bytesSeen = 0, this.lowerBoundary = 128, this.upperBoundary = 191; } }; function r(e, t) { let n = e.byteLength; if (n <= t) return 0; let r = Math.max(t, n - 4), i = n - 1; for (; i > r && (e[i] & 192) == 128;) i--; if (i < t) return 0; let a = e[i], o; if (a <= 127) return 0; if (a >= 194 && a <= 223) o = 2; else if (a >= 224 && a <= 239) o = 3; else if (a >= 240 && a <= 244) o = 4; else return 0; let s = n - i; return s < o ? s : 0; } function i(e) { let t = e.byteLength; if (t === 0) return 0; let n = e[t - 1]; if (n <= 127) return 0; if ((n & 192) != 128) return 1; let r = Math.max(0, t - 4), i = t - 2; for (; i >= r && (e[i] & 192) == 128;) i--; if (i < 0) return 1; let a = e[i], o; if (a >= 194 && a <= 223) o = 2; else if (a >= 224 && a <= 239) o = 3; else if (a >= 240 && a <= 244) o = 4; else return 1; if (t - i !== o) return 1; if (o >= 3) { let t = e[i + 1]; if (a === 224 && t < 160 || a === 237 && t > 159 || a === 240 && t < 144 || a === 244 && t > 143) return 1; } return 0; } })); var Fn = c$3(((e, t) => { let n = Nn(), r = Pn(); t.exports = class { constructor(e = `utf8`) { switch (this.encoding = i(e), this.encoding) { case `utf8`: this.decoder = new r(); break; case `utf16le`: case `base64`: throw Error(`Unsupported encoding: ` + this.encoding); default: this.decoder = new n(this.encoding); } } get remaining() { return this.decoder.remaining; } push(e) { return typeof e == `string` ? e : this.decoder.decode(e); } write(e) { return this.push(e); } end(e) { let t = ``; return e && (t = this.push(e)), t += this.decoder.flush(), t; } }; function i(e) { switch (e = e.toLowerCase(), e) { case `utf8`: case `utf-8`: return `utf8`; case `ucs2`: case `ucs-2`: case `utf16le`: case `utf-16le`: return `utf16le`; case `latin1`: case `binary`: return `latin1`; case `base64`: case `ascii`: case `hex`: return e; default: throw Error(`Unknown encoding: ` + e); } } })); var In = c$3(((e, t) => { t.exports = class e extends Error { constructor(t, n, r = e) { super(t), this.code = n, Error.captureStackTrace && Error.captureStackTrace(this, r); } static isStreamDestroyed(e) { return e && e.code === `STREAM_DESTROYED`; } static isPrematureClose(e) { return e && e.code === `PREMATURE_CLOSE`; } static isAborted(e) { return e && e.code === `ABORTED`; } get name() { return `StreamError`; } static STREAM_DESTROYED() { return new e(`Stream was destroyed`, `STREAM_DESTROYED`, e.STREAM_DESTROYED); } static PREMATURE_CLOSE() { return new e(`Premature close`, `PREMATURE_CLOSE`, e.PREMATURE_CLOSE); } static ABORTED() { return new e(`Stream aborted`, `ABORTED`, e.ABORTED); } }; })); var Ln = c$3(((e, t) => { let { EventEmitter: n } = kn(), r = jn(), i = Fn(), a = In(), o = typeof queueMicrotask > `u` ? (e) => global.process.nextTick(e) : queueMicrotask, s = 536870910, c = 1024, l = 2048, u = 16384, d = 32768, f = 131072, p = 536805375, m = 536870143, h = 536838143, g = 536739839, _ = 2 << 18, v = 4 << 18, y = 8 << 18, b = 32 << 18, x = 64 << 18, S = 128 << 18, C = 512 << 18, w = 1024 << 18, T = 503316479, E = 268435455, D = 262160, O = 8404992, k = 8405006, A = 33587200, j = 33587215, M = 16527, N = 270794767, P = Symbol.asyncIterator || Symbol(`asyncIterator`); var F = class { constructor(e, { highWaterMark: t = 16384, map: n = null, mapWritable: i, byteLength: a, byteLengthWritable: o } = {}) { this.stream = e, this.queue = new r(), this.highWaterMark = t, this.buffered = 0, this.error = null, this.pipeline = null, this.drains = null, this.byteLength = o || a || ve, this.map = i || n, this.afterWrite = V.bind(this), this.afterUpdateNextTick = U.bind(this); } get ending() { return (this.stream._duplexState & C) != 0; } get ended() { return (this.stream._duplexState & b) != 0; } push(e) { return this.stream._duplexState & 142606350 ? !1 : (this.map !== null && (e = this.map(e)), this.buffered += this.byteLength(e), this.queue.push(e), this.buffered < this.highWaterMark ? (this.stream._duplexState |= y, !0) : (this.stream._duplexState |= 6291456, !1)); } shift() { let e = this.queue.shift(); return this.buffered -= this.byteLength(e), this.buffered === 0 && (this.stream._duplexState &= 534773759), e; } end(e) { typeof e == `function` ? this.stream.once(`finish`, e) : e != null && this.push(e), this.stream._duplexState = (this.stream._duplexState | C) & 535822335; } autoBatch(e, t) { let n = [], r = this.stream; for (n.push(e); (r._duplexState & N) == 2359296;) n.push(r._writableState.shift()); if (r._duplexState & 15) return t(null); r._writev(n, t); } update() { let e = this.stream; e._duplexState |= _; do { for (; (e._duplexState & N) == y;) { let t = this.shift(); e._duplexState |= 67371008, e._write(t, this.afterWrite); } e._duplexState & 1310720 || this.updateNonPrimary(); } while (this.continueUpdate() === !0); e._duplexState &= 536346623; } updateNonPrimary() { let e = this.stream; if ((e._duplexState & 144965647) == C) { e._duplexState |= 262144, e._final(z.bind(this)); return; } if ((e._duplexState & 14) == 4) { e._duplexState & A || (e._duplexState |= D, e._destroy(B.bind(this))); return; } (e._duplexState & j) == 1 && (e._duplexState = (e._duplexState | D) & s, e._open(ne.bind(this))); } continueUpdate() { return this.stream._duplexState & S ? (this.stream._duplexState &= T, !0) : !1; } updateCallback() { (this.stream._duplexState & 35127311) == v ? this.update() : this.updateNextTick(); } updateNextTick() { this.stream._duplexState & S || (this.stream._duplexState |= S, this.stream._duplexState & _ || o(this.afterUpdateNextTick)); } }, I = class { constructor(e, { highWaterMark: t = 16384, map: n = null, mapReadable: i, byteLength: a, byteLengthReadable: o } = {}) { this.stream = e, this.queue = new r(), this.highWaterMark = t === 0 ? 1 : t, this.buffered = 0, this.readAhead = t > 0, this.error = null, this.pipeline = null, this.byteLength = o || a || ve, this.map = i || n, this.pipeTo = null, this.afterRead = H.bind(this), this.afterUpdateNextTick = te.bind(this); } get ending() { return (this.stream._duplexState & c) != 0; } get ended() { return (this.stream._duplexState & u) != 0; } pipe(e, t) { if (this.pipeTo !== null) throw Error(`Can only pipe to one destination`); if (typeof t != `function` && (t = null), this.stream._duplexState |= 512, this.pipeTo = e, this.pipeline = new R(this.stream, e, t), t && this.stream.on(`error`, ye), Y(e)) e._writableState.pipeline = this.pipeline, t && e.on(`error`, ye), e.on(`finish`, this.pipeline.finished.bind(this.pipeline)); else { let t = this.pipeline.done.bind(this.pipeline, e), n = this.pipeline.done.bind(this.pipeline, e, null); e.on(`error`, t), e.on(`close`, n), e.on(`finish`, this.pipeline.finished.bind(this.pipeline)); } e.on(`drain`, ee.bind(this)), this.stream.emit(`piping`, e), e.emit(`pipe`, this.stream); } push(e) { let t = this.stream; return e === null ? (this.highWaterMark = 0, t._duplexState = (t._duplexState | c) & 536805311, !1) : this.map !== null && (e = this.map(e), e === null) ? (t._duplexState &= p, this.buffered < this.highWaterMark) : (this.buffered += this.byteLength(e), this.queue.push(e), t._duplexState = (t._duplexState | 128) & p, this.buffered < this.highWaterMark); } shift() { let e = this.queue.shift(); return this.buffered -= this.byteLength(e), this.buffered === 0 && (this.stream._duplexState &= 536862591), e; } unshift(e) { let t = [this.map === null ? e : this.map(e)]; for (; this.buffered > 0;) t.push(this.shift()); for (let e = 0; e < t.length - 1; e++) { let n = t[e]; this.buffered += this.byteLength(n), this.queue.push(n); } this.push(t[t.length - 1]); } read() { let e = this.stream; if ((e._duplexState & M) == 128) { let t = this.shift(); return this.pipeTo !== null && this.pipeTo.write(t) === !1 && (e._duplexState &= m), e._duplexState & l && e.emit(`data`, t), t; } return this.readAhead === !1 && (e._duplexState |= f, this.updateNextTick()), null; } drain() { let e = this.stream; for (; (e._duplexState & M) == 128 && e._duplexState & 768;) { let t = this.shift(); this.pipeTo !== null && this.pipeTo.write(t) === !1 && (e._duplexState &= m), e._duplexState & l && e.emit(`data`, t); } } update() { let e = this.stream; e._duplexState |= 32; do { for (this.drain(); this.buffered < this.highWaterMark && (e._duplexState & 214047) == f;) e._duplexState |= 65552, e._read(this.afterRead), this.drain(); (e._duplexState & 12431) == 4224 && (e._duplexState |= 8192, e.emit(`readable`)), e._duplexState & 80 || this.updateNonPrimary(); } while (this.continueUpdate() === !0); e._duplexState &= 536870879; } updateNonPrimary() { let e = this.stream; if ((e._duplexState & 1167) == c && (e._duplexState = (e._duplexState | u) & 536869887, e.emit(`end`), (e._duplexState & k) == O && (e._duplexState |= 4), this.pipeTo !== null && this.pipeTo.end()), (e._duplexState & 14) == 4) { e._duplexState & A || (e._duplexState |= D, e._destroy(B.bind(this))); return; } (e._duplexState & j) == 1 && (e._duplexState = (e._duplexState | D) & s, e._open(ne.bind(this))); } continueUpdate() { return this.stream._duplexState & d ? (this.stream._duplexState &= h, !0) : !1; } updateCallback() { (this.stream._duplexState & 32879) == 64 ? this.update() : this.updateNextTick(); } updateNextTickIfOpen() { this.stream._duplexState & 32769 || (this.stream._duplexState |= d, this.stream._duplexState & 32 || o(this.afterUpdateNextTick)); } updateNextTick() { this.stream._duplexState & d || (this.stream._duplexState |= d, this.stream._duplexState & 32 || o(this.afterUpdateNextTick)); } }, L = class { constructor(e) { this.data = null, this.afterTransform = G.bind(e), this.afterFinal = null; } }, R = class { constructor(e, t, n) { this.from = e, this.to = t, this.afterPipe = n, this.error = null, this.pipeToFinished = !1; } finished() { this.pipeToFinished = !0; } done(e, t) { if (t && (this.error = t), e === this.to && (this.to = null, this.from !== null)) { (!(this.from._duplexState & u) || !this.pipeToFinished) && this.from.destroy(this.error || Error(`Writable stream closed prematurely`)); return; } if (e === this.from && (this.from = null, this.to !== null)) { e._duplexState & u || this.to.destroy(this.error || Error(`Readable stream closed before ending`)); return; } this.afterPipe !== null && this.afterPipe(this.error), this.to = this.from = this.afterPipe = null; } }; function ee() { this.stream._duplexState |= 512, this.updateCallback(); } function z(e) { let t = this.stream; e && t.destroy(e), t._duplexState & 14 || (t._duplexState |= b, t.emit(`finish`)), (t._duplexState & k) == O && (t._duplexState |= 4), t._duplexState &= 402391039, t._duplexState & _ ? this.updateNextTick() : this.update(); } function B(e) { let t = this.stream; !e && !a.isStreamDestroyed(this.error) && (e = this.error), e && t.emit(`error`, e), t._duplexState |= 8, t.emit(`close`); let n = t._readableState, r = t._writableState; if (n !== null && n.pipeline !== null && n.pipeline.done(t, e), r !== null) { for (; r.drains !== null && r.drains.length > 0;) r.drains.shift().resolve(!1); r.pipeline !== null && r.pipeline.done(t, e); } } function V(e) { let t = this.stream; e && t.destroy(e), t._duplexState &= 469499903, this.drains !== null && W(this.drains), (t._duplexState & 6553615) == 4194304 && (t._duplexState &= 532676607, (t._duplexState & x) == x && t.emit(`drain`)), this.updateCallback(); } function H(e) { e && this.stream.destroy(e), this.stream._duplexState &= 536870895, this.readAhead === !1 && !(this.stream._duplexState & 256) && (this.stream._duplexState &= g), this.updateCallback(); } function te() { this.stream._duplexState & 32 || (this.stream._duplexState &= h, this.update()); } function U() { this.stream._duplexState & _ || (this.stream._duplexState &= T, this.update()); } function W(e) { for (let t = 0; t < e.length; t++) --e[t].writes === 0 && (e.shift().resolve(!0), t--); } function ne(e) { let t = this.stream; e && t.destroy(e), t._duplexState & 4 || (t._duplexState & 17423 || (t._duplexState |= 64), t._duplexState & 142606351 || (t._duplexState |= v), t.emit(`open`)), t._duplexState &= 536608751, t._writableState !== null && t._writableState.updateCallback(), t._readableState !== null && t._readableState.updateCallback(); } function G(e, t) { t != null && this.push(t), this._writableState.afterWrite(e); } function K(e) { this._readableState !== null && (e === `data` && (this._duplexState |= 133376, this._readableState.updateNextTick()), e === `readable` && (this._duplexState |= 4096, this._readableState.updateNextTick())), this._writableState !== null && e === `drain` && (this._duplexState |= x, this._writableState.updateNextTick()); } var re = class extends n { constructor(e) { super(), this._duplexState = 0, this._readableState = null, this._writableState = null, e && (e.open && (this._open = e.open), e.destroy && (this._destroy = e.destroy), e.predestroy && (this._predestroy = e.predestroy), e.signal && e.signal.addEventListener(`abort`, be.bind(this))), this.on(`newListener`, K); } _open(e) { e(null); } _destroy(e) { e(null); } _predestroy() {} get readable() { return this._readableState === null ? void 0 : !0; } get writable() { return this._writableState === null ? void 0 : !0; } get destroyed() { return (this._duplexState & 8) != 0; } get destroying() { return (this._duplexState & 14) != 0; } destroy(e) { this._duplexState & 14 || (e ||= a.STREAM_DESTROYED(), this._duplexState = (this._duplexState | 4) & 535822271, this._readableState !== null && (this._readableState.highWaterMark = 0, this._readableState.error = e), this._writableState !== null && (this._writableState.highWaterMark = 0, this._writableState.error = e), this._duplexState |= 2, this._predestroy(), this._duplexState &= 536870909, this._readableState !== null && this._readableState.updateNextTick(), this._writableState !== null && this._writableState.updateNextTick()); } }, ie = class e extends re { constructor(e) { super(e), this._duplexState |= 8519681, this._readableState = new I(this, e), e && (this._readableState.readAhead === !1 && (this._duplexState &= g), e.read && (this._read = e.read), e.eagerOpen && this._readableState.updateNextTick(), e.encoding && this.setEncoding(e.encoding)); } static deferred(e, t) { let n = new ce(t); return e().then((e) => { if (e === null) return n.end(); n.destroying || J(e, n, ye); }).catch((e) => n.destroy(e)), n; } setEncoding(e) { let t = new i(e), n = this._readableState.map || ue; return this._readableState.map = r, this; function r(e) { let r = t.push(e); return r === `` && (e.byteLength !== 0 || t.remaining > 0) ? null : n(r); } } _read(e) { e(null); } pipe(e, t) { return this._readableState.updateNextTick(), this._readableState.pipe(e, t), e; } read() { return this._readableState.updateNextTick(), this._readableState.read(); } push(e) { return this._readableState.updateNextTickIfOpen(), this._readableState.push(e); } unshift(e) { return this._readableState.updateNextTickIfOpen(), this._readableState.unshift(e); } resume() { return this._duplexState |= 131328, this._readableState.updateNextTick(), this; } pause() { return this._duplexState &= this._readableState.readAhead === !1 ? 536739583 : 536870655, this; } static _fromAsyncIterator(t, n) { let r, i = new e({ ...n, read(e) { t.next().then(a).then(e.bind(null, null)).catch(e); }, predestroy() { r = t.return(); }, destroy(e) { if (!r) return e(null); r.then(e.bind(null, null)).catch(e); } }); return i; function a(e) { e.done ? i.push(null) : i.push(e.value); } } static from(t, n) { if (ge(t)) return t; if (t[P]) return this._fromAsyncIterator(t[P](), n); Array.isArray(t) || (t = t === void 0 ? [] : [t]); let r = 0; return new e({ ...n, read(e) { this.push(r === t.length ? null : t[r++]), e(null); } }); } static isBackpressured(e) { return (e._duplexState & 17422) != 0 || e._readableState.buffered >= e._readableState.highWaterMark; } static isPaused(e) { return (e._duplexState & 256) == 0; } [P]() { let e = this, t = null, n = null, r = null; return this.on(`error`, (e) => { t = e; }), this.on(`readable`, i), this.on(`close`, o), { [P]() { return this; }, next() { return new Promise(function(t, i) { n = t, r = i; let a = e.read(); a === null ? e._duplexState & 8 && s(null) : s(a); }); }, return() { return c(null); }, throw(e) { return c(e); } }; function i() { n !== null && s(e.read()); } function o() { n !== null && s(null); } function s(i) { r !== null && (t ? r(t) : i === null && !(e._duplexState & u) ? r(a.STREAM_DESTROYED()) : n({ value: i, done: i === null }), r = n = null); } function c(t) { return e.destroy(t), new Promise((n, r) => { if (e._duplexState & 8) return n({ value: void 0, done: !0 }); e.once(`close`, function() { t ? r(t) : n({ value: void 0, done: !0 }); }); }); } } }, ae = class extends re { constructor(e) { super(e), this._duplexState |= 16385, this._writableState = new F(this, e), e && (e.writev && (this._writev = e.writev), e.write && (this._write = e.write), e.final && (this._final = e.final), e.eagerOpen && this._writableState.updateNextTick()); } cork() { this._duplexState |= w; } uncork() { this._duplexState &= E, this._writableState.updateNextTick(); } _writev(e, t) { t(null); } _write(e, t) { this._writableState.autoBatch(e, t); } _final(e) { e(null); } static isBackpressured(e) { return (e._duplexState & 146800654) != 0; } static drained(e) { if (e.destroyed) return Promise.resolve(!1); let t = e._writableState, n = (xe(e) ? Math.min(1, t.queue.length) : t.queue.length) + (e._duplexState & 67108864 ? 1 : 0); return n === 0 ? Promise.resolve(!0) : (t.drains === null && (t.drains = []), new Promise((e) => { t.drains.push({ writes: n, resolve: e }); })); } write(e) { return this._writableState.updateNextTick(), this._writableState.push(e); } end(e) { return this._writableState.updateNextTick(), this._writableState.end(e), this; } }, oe = class extends ie { constructor(e) { super(e), this._duplexState = 1 | this._duplexState & f, this._writableState = new F(this, e), e && (e.writev && (this._writev = e.writev), e.write && (this._write = e.write), e.final && (this._final = e.final)); } cork() { this._duplexState |= w; } uncork() { this._duplexState &= E, this._writableState.updateNextTick(); } _writev(e, t) { t(null); } _write(e, t) { this._writableState.autoBatch(e, t); } _final(e) { e(null); } write(e) { return this._writableState.updateNextTick(), this._writableState.push(e); } end(e) { return this._writableState.updateNextTick(), this._writableState.end(e), this; } }, se = class extends oe { constructor(e) { super(e), this._transformState = new L(this), e && (e.transform && (this._transform = e.transform), e.flush && (this._flush = e.flush)); } _write(e, t) { this._readableState.buffered >= this._readableState.highWaterMark ? this._transformState.data = e : this._transform(e, this._transformState.afterTransform); } _read(e) { if (this._transformState.data !== null) { let t = this._transformState.data; this._transformState.data = null, e(null), this._transform(t, this._transformState.afterTransform); } else e(null); } destroy(e) { super.destroy(e), this._transformState.data !== null && (this._transformState.data = null, this._transformState.afterTransform()); } _transform(e, t) { t(null, e); } _flush(e) { e(null); } _final(e) { this._transformState.afterFinal = e, this._flush(le.bind(this)); } }, ce = class extends se {}; function le(e, t) { let n = this._transformState.afterFinal; if (e) return n(e); t != null && this.push(t), this.push(null), n(null); } function q(...e) { return new Promise((t, n) => J(...e, (e) => { if (e) return n(e); t(); })); } function J(e, ...t) { let n = Array.isArray(e) ? [...e, ...t] : [e, ...t], r = n.length && typeof n[n.length - 1] == `function` ? n.pop() : null; if (n.length < 2) throw Error(`Pipeline requires at least 2 streams`); let i = n[0], o = null, s = null; for (let e = 1; e < n.length; e++) o = n[e], Y(i) ? i.pipe(o, l) : (c(i, !0, e > 1, l), i.pipe(o)), i = o; if (r) { let e = !1, t = Y(o) || !!(o._writableState && o._writableState.autoDestroy); o.on(`error`, (e) => { s === null && (s = e); }), o.on(`finish`, () => { e = !0, t || r(s); }), t && o.on(`close`, () => r(s || (e ? null : a.PREMATURE_CLOSE()))); } return o; function c(e, t, n, r) { e.on(`error`, r), e.on(`close`, i); function i() { if (t && e._readableState && !e._readableState.ended || n && e._writableState && !e._writableState.ended) return r(a.PREMATURE_CLOSE()); } } function l(e) { if (!(!e || s)) { s = e; for (let t of n) t.destroy(e); } } } function ue(e) { return e; } function de(e) { return !!e._readableState || !!e._writableState; } function Y(e) { return typeof e._duplexState == `number` && de(e); } function fe(e) { return !!e._readableState && e._readableState.ending; } function pe(e) { return !!e._readableState && e._readableState.ended; } function X(e) { return !!e._writableState && e._writableState.ending; } function me(e) { return !!e._writableState && e._writableState.ended; } function he(e, t = {}) { let n = e._readableState && e._readableState.error || e._writableState && e._writableState.error; return !t.all && a.isStreamDestroyed(n) ? null : n; } function ge(e) { return Y(e) && e.readable; } function Z(e) { return (e._duplexState & 1) != 1 || (e._duplexState & 4) == 4 || (e._duplexState & A) != 0; } function _e(e) { return typeof e == `object` && !!e && typeof e.byteLength == `number`; } function ve(e) { return _e(e) ? e.byteLength : 1024; } function ye() {} function be() { this.destroy(a.ABORTED()); } function xe(e) { return e._writev !== ae.prototype._writev && e._writev !== oe.prototype._writev; } t.exports = { pipeline: J, pipelinePromise: q, isStream: de, isStreamx: Y, isEnding: fe, isEnded: pe, isFinishing: X, isFinished: me, isDisturbed: Z, getStreamError: he, Stream: re, Writable: ae, Readable: ie, Duplex: oe, Transform: se, PassThrough: ce }; })); var Rn = c$3(((e) => { let t = Mn(), n = t.from([ 117, 115, 116, 97, 114, 0 ]), r = t.from([48, 48]), i = t.from([ 117, 115, 116, 97, 114, 32 ]), a = t.from([32, 0]); e.decodeLongPath = function(e, t) { return v(e, 0, e.length, t); }, e.encodePax = function(e) { let n = ``; e.name && (n += y(` path=` + e.name + ` `)), e.linkname && (n += y(` linkpath=` + e.linkname + ` `)); let r = e.pax; if (r) for (let e in r) n += y(` ` + e + `=` + r[e] + ` `); return t.from(n); }, e.decodePax = function(e) { let n = {}; for (; e.length;) { let r = 0; for (; r < e.length && e[r] !== 32;) r++; let i = parseInt(t.toString(e.subarray(0, r)), 10); if (!i) return n; let a = t.toString(e.subarray(r + 1, i - 1)), o = a.indexOf(`=`); if (o === -1) return n; n[a.slice(0, o)] = a.slice(o + 1), e = e.subarray(i); } return n; }, e.encode = function(e) { let i = t.alloc(512), a = e.name, o = ``; if (e.typeflag === 5 && a[a.length - 1] !== `/` && (a += `/`), t.byteLength(a) !== a.length) return null; for (; t.byteLength(a) > 100;) { let e = a.indexOf(`/`); if (e === -1) return null; o += o ? `/` + a.slice(0, e) : a.slice(0, e), a = a.slice(e + 1); } return t.byteLength(a) > 100 || t.byteLength(o) > 155 || e.linkname && t.byteLength(e.linkname) > 100 ? null : (t.write(i, a), t.write(i, p(e.mode & 4095, 6), 100), t.write(i, p(e.uid, 6), 108), t.write(i, p(e.gid, 6), 116), h(e.size, i, 124), t.write(i, p(e.mtime.getTime() / 1e3 | 0, 11), 136), i[156] = 48 + u(e.type), e.linkname && t.write(i, e.linkname, 157), t.copy(n, i, 257), t.copy(r, i, 263), e.uname && t.write(i, e.uname, 265), e.gname && t.write(i, e.gname, 297), t.write(i, p(e.devmajor || 0, 6), 329), t.write(i, p(e.devminor || 0, 6), 337), o && t.write(i, o, 345), t.write(i, p(f(i), 6), 148), i); }, e.decode = function(e, t, n) { let r = e[156] === 0 ? 0 : e[156] - 48, i = v(e, 0, 100, t), a = _(e, 100, 8), c = _(e, 108, 8), u = _(e, 116, 8), d = _(e, 124, 12), p = _(e, 136, 12), m = l(r), h = e[157] === 0 ? null : v(e, 157, 100, t), g = v(e, 265, 32), y = v(e, 297, 32), b = _(e, 329, 8), x = _(e, 337, 8), S = f(e); if (S === 256) return null; if (S !== _(e, 148, 8)) throw Error(`Invalid tar header. Maybe the tar is corrupted or it needs to be gunzipped?`); if (o(e)) e[345] && (i = v(e, 345, 155, t) + `/` + i); else if (!s(e) && !n) throw Error(`Invalid tar header: unknown format.`); return r === 0 && i && i[i.length - 1] === `/` && (r = 5), { name: i, mode: a, uid: c, gid: u, size: d, mtime: /* @__PURE__ */ new Date(1e3 * p), type: m, linkname: h, uname: g, gname: y, devmajor: b, devminor: x, pax: null }; }; function o(e) { return t.equals(n, e.subarray(257, 263)); } function s(e) { return t.equals(i, e.subarray(257, 263)) && t.equals(a, e.subarray(263, 265)); } function c(e, t, n) { return typeof e == `number` ? (e = ~~e, e >= t ? t : e >= 0 || (e += t, e >= 0) ? e : 0) : n; } function l(e) { switch (e) { case 0: return `file`; case 1: return `link`; case 2: return `symlink`; case 3: return `character-device`; case 4: return `block-device`; case 5: return `directory`; case 6: return `fifo`; case 7: return `contiguous-file`; case 72: return `pax-header`; case 55: return `pax-global-header`; case 27: return `gnu-long-link-path`; case 28: case 30: return `gnu-long-path`; } return null; } function u(e) { switch (e) { case `file`: return 0; case `link`: return 1; case `symlink`: return 2; case `character-device`: return 3; case `block-device`: return 4; case `directory`: return 5; case `fifo`: return 6; case `contiguous-file`: return 7; case `pax-header`: return 72; } return 0; } function d(e, t, n, r) { for (; n < r; n++) if (e[n] === t) return n; return r; } function f(e) { let t = 256; for (let n = 0; n < 148; n++) t += e[n]; for (let n = 156; n < 512; n++) t += e[n]; return t; } function p(e, t) { return e = e.toString(8), e.length > t ? `7777777777777777777`.slice(0, t) + ` ` : `0000000000000000000`.slice(0, t - e.length) + e + ` `; } function m(e, t, n) { t[n] = 128; for (let r = 11; r > 0; r--) t[n + r] = e & 255, e = Math.floor(e / 256); } function h(e, n, r) { e.toString(8).length > 11 ? m(e, n, r) : t.write(n, p(e, 11), r); } function g(e) { let t; if (e[0] === 128) t = !0; else if (e[0] === 255) t = !1; else return null; let n = [], r; for (r = e.length - 1; r > 0; r--) { let i = e[r]; t ? n.push(i) : n.push(255 - i); } let i = 0, a = n.length; for (r = 0; r < a; r++) i += n[r] * 256 ** r; return t ? i : -1 * i; } function _(e, n, r) { if (e = e.subarray(n, n + r), n = 0, e[n] & 128) return g(e); { for (; n < e.length && e[n] === 32;) n++; let r = c(d(e, 32, n, e.length), e.length, e.length); for (; n < r && e[n] === 0;) n++; return r === n ? 0 : parseInt(t.toString(e.subarray(n, r)), 8); } } function v(e, n, r, i) { return t.toString(e.subarray(n, d(e, 0, n, n + r)), i); } function y(e) { let n = t.byteLength(e), r = Math.floor(Math.log(n) / Math.log(10)) + 1; return n + r >= 10 ** r && r++, n + r + e; } })); var zn = c$3(((e, t) => { let { Writable: n, Readable: r, getStreamError: i } = Ln(), a = jn(), o = Mn(), s = Rn(), c = o.alloc(0); var l = class { constructor() { this.buffered = 0, this.shifted = 0, this.queue = new a(), this._offset = 0; } push(e) { this.buffered += e.byteLength, this.queue.push(e); } shiftFirst(e) { return this._buffered === 0 ? null : this._next(e); } shift(e) { if (e > this.buffered) return null; if (e === 0) return c; let t = this._next(e); if (e === t.byteLength) return t; let n = [t]; for (; (e -= t.byteLength) > 0;) t = this._next(e), n.push(t); return o.concat(n); } _next(e) { let t = this.queue.peek(), n = t.byteLength - this._offset; if (e >= n) { let e = this._offset ? t.subarray(this._offset, t.byteLength) : t; return this.queue.shift(), this._offset = 0, this.buffered -= n, this.shifted += n, e; } return this.buffered -= e, this.shifted += e, t.subarray(this._offset, this._offset += e); } }, u = class extends r { constructor(e, t, n) { super(), this.header = t, this.offset = n, this._parent = e; } _read(e) { this.header.size === 0 && this.push(null), this._parent._stream === this && this._parent._update(), e(null); } _predestroy() { this._parent.destroy(i(this)); } _detach() { this._parent._stream === this && (this._parent._stream = null, this._parent._missing = p(this.header.size), this._parent._update()); } _destroy(e) { this._detach(), e(null); } }, d = class extends n { constructor(e) { super(e), e ||= {}, this._buffer = new l(), this._offset = 0, this._header = null, this._stream = null, this._missing = 0, this._longHeader = !1, this._callback = f, this._locked = !1, this._finished = !1, this._pax = null, this._paxGlobal = null, this._gnuLongPath = null, this._gnuLongLinkPath = null, this._filenameEncoding = e.filenameEncoding || `utf-8`, this._allowUnknownFormat = !!e.allowUnknownFormat, this._unlockBound = this._unlock.bind(this); } _unlock(e) { if (this._locked = !1, e) { this.destroy(e), this._continueWrite(e); return; } this._update(); } _consumeHeader() { if (this._locked) return !1; this._offset = this._buffer.shifted; try { this._header = s.decode(this._buffer.shift(512), this._filenameEncoding, this._allowUnknownFormat); } catch (e) { return this._continueWrite(e), !1; } if (!this._header) return !0; switch (this._header.type) { case `gnu-long-path`: case `gnu-long-link-path`: case `pax-global-header`: case `pax-header`: return this._longHeader = !0, this._missing = this._header.size, !0; } return this._locked = !0, this._applyLongHeaders(), this._header.size === 0 || this._header.type === `directory` ? (this.emit(`entry`, this._header, this._createStream(), this._unlockBound), !0) : (this._stream = this._createStream(), this._missing = this._header.size, this.emit(`entry`, this._header, this._stream, this._unlockBound), !0); } _applyLongHeaders() { this._gnuLongPath &&= (this._header.name = this._gnuLongPath, null), this._gnuLongLinkPath &&= (this._header.linkname = this._gnuLongLinkPath, null), this._pax &&= (this._pax.path && (this._header.name = this._pax.path), this._pax.linkpath && (this._header.linkname = this._pax.linkpath), this._pax.size && (this._header.size = parseInt(this._pax.size, 10)), this._header.pax = this._pax, null); } _decodeLongHeader(e) { switch (this._header.type) { case `gnu-long-path`: this._gnuLongPath = s.decodeLongPath(e, this._filenameEncoding); break; case `gnu-long-link-path`: this._gnuLongLinkPath = s.decodeLongPath(e, this._filenameEncoding); break; case `pax-global-header`: this._paxGlobal = s.decodePax(e); break; case `pax-header`: this._pax = this._paxGlobal === null ? s.decodePax(e) : Object.assign({}, this._paxGlobal, s.decodePax(e)); break; } } _consumeLongHeader() { this._longHeader = !1, this._missing = p(this._header.size); let e = this._buffer.shift(this._header.size); try { this._decodeLongHeader(e); } catch (e) { return this._continueWrite(e), !1; } return !0; } _consumeStream() { let e = this._buffer.shiftFirst(this._missing); if (e === null) return !1; this._missing -= e.byteLength; let t = this._stream.push(e); return this._missing === 0 ? (this._stream.push(null), t && this._stream._detach(), t && this._locked === !1) : t; } _createStream() { return new u(this, this._header, this._offset); } _update() { for (; this._buffer.buffered > 0 && !this.destroying;) { if (this._missing > 0) { if (this._stream !== null) { if (this._consumeStream() === !1) return; continue; } if (this._longHeader === !0) { if (this._missing > this._buffer.buffered) break; if (this._consumeLongHeader() === !1) return !1; continue; } let e = this._buffer.shiftFirst(this._missing); e !== null && (this._missing -= e.byteLength); continue; } if (this._buffer.buffered < 512) break; if (this._stream !== null || this._consumeHeader() === !1) return; } this._continueWrite(null); } _continueWrite(e) { let t = this._callback; this._callback = f, t(e); } _write(e, t) { this._callback = t, this._buffer.push(e), this._update(); } _final(e) { this._finished = this._missing === 0 && this._buffer.buffered === 0, e(this._finished ? null : Error(`Unexpected end of data`)); } _predestroy() { this._continueWrite(null); } _destroy(e) { this._stream && this._stream.destroy(i(this)), e(null); } [Symbol.asyncIterator]() { let e = null, t = null, n = null, r = null, i = null, a = this; return this.on(`entry`, c), this.on(`error`, (t) => { e = t; }), this.on(`close`, l), { [Symbol.asyncIterator]() { return this; }, next() { return new Promise(s); }, return() { return u(null); }, throw(e) { return u(e); } }; function o(e) { if (!i) return; let t = i; i = null, t(e); } function s(i, s) { if (e) return s(e); if (r) { i({ value: r, done: !1 }), r = null; return; } t = i, n = s, o(null), a._finished && t && (t({ value: void 0, done: !0 }), t = n = null); } function c(e, a, o) { i = o, a.on(`error`, f), t ? (t({ value: a, done: !1 }), t = n = null) : r = a; } function l() { o(e), t &&= (e ? n(e) : t({ value: void 0, done: !0 }), n = null); } function u(e) { return a.destroy(e), o(e), new Promise((t, n) => { if (a.destroyed) return t({ value: void 0, done: !0 }); a.once(`close`, function() { e ? n(e) : t({ value: void 0, done: !0 }); }); }); } } }; t.exports = function(e) { return new d(e); }; function f() {} function p(e) { return e &= 511, e && 512 - e; } })); var Bn = c$3(((e, t) => { let r = { S_IFMT: 61440, S_IFDIR: 16384, S_IFCHR: 8192, S_IFBLK: 24576, S_IFIFO: 4096, S_IFLNK: 40960 }; try { t.exports = p$4(`fs`).constants || r; } catch { t.exports = r; } })); var Vn = c$3(((e, t) => { let { Readable: n, Writable: r, getStreamError: i } = Ln(), a = Mn(), o = Bn(), s = Rn(), c = a.alloc(1024); var l = class extends r { constructor(e, t, n) { super({ mapWritable: m, eagerOpen: !0 }), this.written = 0, this.header = t, this._callback = n, this._linkname = null, this._isLinkname = t.type === `symlink` && !t.linkname, this._isVoid = t.type !== `file` && t.type !== `contiguous-file`, this._finished = !1, this._pack = e, this._openCallback = null, this._pack._stream === null ? this._pack._stream = this : this._pack._pending.push(this); } _open(e) { this._openCallback = e, this._pack._stream === this && this._continueOpen(); } _continuePack(e) { if (this._callback === null) return; let t = this._callback; this._callback = null, t(e); } _continueOpen() { this._pack._stream === null && (this._pack._stream = this); let e = this._openCallback; if (this._openCallback = null, e !== null) { if (this._pack.destroying) return e(Error(`pack stream destroyed`)); if (this._pack._finalized) return e(Error(`pack stream is already finalized`)); this._pack._stream = this, this._isLinkname || this._pack._encode(this.header), this._isVoid && (this._finish(), this._continuePack(null)), e(null); } } _write(e, t) { if (this._isLinkname) return this._linkname = this._linkname ? a.concat([this._linkname, e]) : e, t(null); if (this._isVoid) return e.byteLength > 0 ? t(Error(`No body allowed for this entry`)) : t(); if (this.written += e.byteLength, this._pack.push(e)) return t(); this._pack._drain = t; } _finish() { this._finished || (this._finished = !0, this._isLinkname && (this.header.linkname = this._linkname ? a.toString(this._linkname, `utf-8`) : ``, this._pack._encode(this.header)), p(this._pack, this.header.size), this._pack._done(this)); } _final(e) { if (this.written !== this.header.size) return e(Error(`Size mismatch`)); this._finish(), e(null); } _getError() { return i(this) || Error(`tar entry destroyed`); } _predestroy() { this._pack.destroy(this._getError()); } _destroy(e) { this._pack._done(this), this._continuePack(this._finished ? null : this._getError()), e(); } }, u = class extends n { constructor(e) { super(e), this._drain = f, this._finalized = !1, this._finalizing = !1, this._pending = [], this._stream = null; } entry(e, t, n) { if (this._finalized || this.destroying) throw Error(`already finalized or destroyed`); typeof t == `function` && (n = t, t = null), n ||= f, (!e.size || e.type === `symlink`) && (e.size = 0), e.type ||= d(e.mode), e.mode ||= e.type === `directory` ? 493 : 420, e.uid ||= 0, e.gid ||= 0, e.mtime ||= /* @__PURE__ */ new Date(), typeof t == `string` && (t = a.from(t)); let r = new l(this, e, n); return a.isBuffer(t) ? (e.size = t.byteLength, r.write(t), r.end(), r) : (r._isVoid, r); } finalize() { if (this._stream || this._pending.length > 0) { this._finalizing = !0; return; } this._finalized || (this._finalized = !0, this.push(c), this.push(null)); } _done(e) { e === this._stream && (this._stream = null, this._finalizing && this.finalize(), this._pending.length && this._pending.shift()._continueOpen()); } _encode(e) { if (!e.pax) { let t = s.encode(e); if (t) { this.push(t); return; } } this._encodePax(e); } _encodePax(e) { let t = s.encodePax({ name: e.name, linkname: e.linkname, pax: e.pax }), n = { name: `PaxHeader`, mode: e.mode, uid: e.uid, gid: e.gid, size: t.byteLength, mtime: e.mtime, type: `pax-header`, linkname: e.linkname && `PaxHeader`, uname: e.uname, gname: e.gname, devmajor: e.devmajor, devminor: e.devminor }; this.push(s.encode(n)), this.push(t), p(this, t.byteLength), n.size = e.size, n.type = e.type, this.push(s.encode(n)); } _doDrain() { let e = this._drain; this._drain = f, e(); } _predestroy() { let e = i(this); for (this._stream && this._stream.destroy(e); this._pending.length;) { let t = this._pending.shift(); t.destroy(e), t._continueOpen(); } this._doDrain(); } _read(e) { this._doDrain(), e(); } }; t.exports = function(e) { return new u(e); }; function d(e) { switch (e & o.S_IFMT) { case o.S_IFBLK: return `block-device`; case o.S_IFCHR: return `character-device`; case o.S_IFDIR: return `directory`; case o.S_IFIFO: return `fifo`; case o.S_IFLNK: return `symlink`; } return `file`; } function f() {} function p(e, t) { t &= 511, t && e.push(c.subarray(0, 512 - t)); } function m(e) { return a.isBuffer(e) ? e : a.from(e); } })); var Hn = d$3(c$3(((e) => { e.extract = zn(), e.pack = Vn(); }))(), 1); var Un = class { constructor() { let e = w.createGzip(); this.pack = Hn.pack(), this.readable = this.pack.pipe(e); } async addFile(e) { return new Promise((t, n) => { let r = this.pack.entry(`size` in e ? { name: e.name, size: e.size, mode: e.mode } : { name: e.name, size: Buffer.byteLength(e.content), mode: e.mode }, (e) => { if (e) return n(e); t(); }); e.content instanceof Readable$1 ? e.content.pipe(r) : r.end(e.content); }); } async end() { return new Promise((e, t) => { this.readable.on(`error`, t), this.readable.on(`end`, e), this.pack.finalize(); }); } }; function Wn(e) { return new Promise((t, n) => { let r = []; e.on(`error`, (e) => n(e)), e.on(`data`, (e) => r.push(e)), e.on(`end`, () => t(Buffer.concat(r))); }); } function Gn(e) { if (!b.posix.isAbsolute(e.cwd)) throw Error(`cwd dir must be absolute`); if (!b.posix.isAbsolute(e.extractDir)) throw Error(`extractDir must be absolute`); let t = b.posix.isAbsolute(e.filePath) ? b.posix.normalize(e.filePath) : b.posix.join(e.cwd, e.filePath); return b.posix.relative(e.extractDir, t); } function Kn(e) { return e === `allow-all` || e === `deny-all` ? { mode: e } : e; } function qn(e) { if (e.mode === `allow-all` || e.mode === `deny-all`) return e.mode; let t = e.allowedCIDRs || e.deniedCIDRs ? { subnets: { ...e.allowedCIDRs && { allow: e.allowedCIDRs }, ...e.deniedCIDRs && { deny: e.deniedCIDRs } } } : void 0; if (e.injectionRules && e.injectionRules.length > 0 || e.forwardRules && e.forwardRules.length > 0) { let n = /* @__PURE__ */ new Map(); for (let t of e.injectionRules ?? []) { let e = Object.fromEntries((t.headerNames ?? []).map((e) => [e, ``])), r = n.get(t.domain) ?? []; r.push({ ...t.match ? { match: t.match } : {}, transform: [{ headers: e }] }), n.set(t.domain, r); } for (let t of e.forwardRules ?? []) { let e = n.get(t.domain) ?? []; e.push({ ...t.match ? { match: t.match } : {}, forwardURL: t.forwardURL }), n.set(t.domain, e); } let r = {}; for (let t of e.allowedDomains ?? []) r[t] = n.get(t) ?? []; for (let t of [...e.injectionRules ?? [], ...e.forwardRules ?? []]) t.domain in r || (r[t.domain] = n.get(t.domain) ?? []); return { allow: r, ...t }; } return { ...e.allowedDomains && { allow: e.allowedDomains }, ...t }; } const Jn = (e) => { let t = Object.entries(e ?? {}).filter(([e]) => e.startsWith(`__`)); return Object.fromEntries(t); }; var Yn = c$3(((e, t) => { var r = p$4(`stream`).Transform; function i(e) { if (!(this instanceof i)) throw TypeError(`Cannot call a class as a function`); e ||= {}, r.call(this, { objectMode: !0 }), this._memory = ``, this._emitInvalidLines = e.emitInvalidLines || !1; } i.prototype = Object.create(r.prototype), i.prototype._handleLines = function(e, t) { for (var n = 0; n < e.length; n++) if (e[n] !== ``) { var r = null, i = null; try { i = JSON.parse(e[n]); } catch (t) { t.source = e[n], r = t; } if (r) if (this._emitInvalidLines) this.emit(`invalid-line`, r); else return t(r); else this.push(i); } t(null); }, i.prototype._transform = function(e, t, n) { var r = (this._memory + e.toString()).split(` `); this._memory = r.pop(), this._handleLines(r, n); }, i.prototype._flush = function(e) { if (!this._memory) return e(null); var t = this._memory; this._memory = ``, this._handleLines([t], e); }, t.exports = i; })); var Xn$1 = c$3(((e, t) => { var r = p$4(`stream`).Transform; function i() { if (!(this instanceof i)) throw TypeError(`Cannot call a class as a function`); r.call(this, { objectMode: !0 }); } i.prototype = Object.create(r.prototype), i.prototype._transform = function(e, t, n) { var r; try { r = JSON.stringify(e); } catch (t) { return t.source = e, n(t); } n(null, r + ` `); }, t.exports = i; })); var Zn = c$3(((e) => { var t = Yn(); Xn$1(), e.parse = function(e) { return new t(e); }; })); var Qn = c$3(((e, t) => { var n = Object.defineProperty, r = Object.getOwnPropertyDescriptor, i = Object.getOwnPropertyNames, a = Object.prototype.hasOwnProperty, o = (e, t) => { for (var r in t) n(e, r, { get: t[r], enumerable: !0 }); }, s = (e, t, o, s) => { if (t && typeof t == `object` || typeof t == `function`) for (let c of i(t)) !a.call(e, c) && c !== o && n(e, c, { get: () => t[c], enumerable: !(s = r(t, c)) || s.enumerable }); return e; }, c = (e) => s(n({}, `__esModule`, { value: !0 }), e), l = {}; o(l, { SYMBOL_FOR_REQ_CONTEXT: () => u, getContext: () => d }), t.exports = c(l); let u = Symbol.for(`@vercel/request-context`); function d() { return globalThis[u]?.get?.() ?? {}; } })); var $n = c$3(((e, t) => { var n = Object.defineProperty, r = Object.getOwnPropertyDescriptor, i = Object.getOwnPropertyNames, a = Object.prototype.hasOwnProperty, o = (e, t) => { for (var r in t) n(e, r, { get: t[r], enumerable: !0 }); }, s = (e, t, o, s) => { if (t && typeof t == `object` || typeof t == `function`) for (let c of i(t)) !a.call(e, c) && c !== o && n(e, c, { get: () => t[c], enumerable: !(s = r(t, c)) || s.enumerable }); return e; }, c = (e) => s(n({}, `__esModule`, { value: !0 }), e), l = {}; o(l, { VercelOidcTokenError: () => u }), t.exports = c(l); var u = class extends Error { constructor(e, t) { super(e), this.name = `VercelOidcTokenError`, this.cause = t; } toString() { return this.cause ? `${this.name}: ${this.message}: ${this.cause}` : `${this.name}: ${this.message}`; } }; })); var er = c$3(((t, n) => { var r = Object.defineProperty, i = Object.getOwnPropertyDescriptor, a = Object.getOwnPropertyNames, o = Object.prototype.hasOwnProperty, s = (e, t) => { for (var n in t) r(e, n, { get: t[n], enumerable: !0 }); }, c = (e, t, n, s) => { if (t && typeof t == `object` || typeof t == `function`) for (let c of a(t)) !o.call(e, c) && c !== n && r(e, c, { get: () => t[c], enumerable: !(s = i(t, c)) || s.enumerable }); return e; }, l = (e) => c(r({}, `__esModule`, { value: !0 }), e), u = {}; s(u, { getVercelOidcToken: () => p, getVercelOidcTokenSync: () => m }), n.exports = l(u); var d = Qn(), f = $n(); async function p(t) { let n = ``, r; try { n = m(); } catch (e) { r = e; } try { let [{ getTokenPayload: r, isExpired: i }, { refreshToken: a }] = await Promise.all([await Promise.resolve().then(() => d$3(ar())), await Promise.resolve().then(() => token_ORseRyWn_exports).then((t) => d$3(t.default))]); (!n || i(r(n), t?.expirationBufferMs)) && (await a(t), n = m()); } catch (e) { let t = r instanceof Error ? r.message : ``; throw e instanceof Error && (t = `${t} ${e.message}`), t ? new f.VercelOidcTokenError(t) : e; } return n; } function m() { let e = (0, d.getContext)().headers?.[`x-vercel-oidc-token`] ?? process.env.VERCEL_OIDC_TOKEN; if (!e) throw Error(`The 'x-vercel-oidc-token' header is missing from the request. Do you have the OIDC option enabled in the Vercel project settings?`); return e; } })); var tr = c$3(((e, t) => { var n = Object.defineProperty, r = Object.getOwnPropertyDescriptor, i = Object.getOwnPropertyNames, a = Object.prototype.hasOwnProperty, o = (e, t) => { for (var r in t) n(e, r, { get: t[r], enumerable: !0 }); }, s = (e, t, o, s) => { if (t && typeof t == `object` || typeof t == `function`) for (let c of i(t)) !a.call(e, c) && c !== o && n(e, c, { get: () => t[c], enumerable: !(s = r(t, c)) || s.enumerable }); return e; }, c = (e) => s(n({}, `__esModule`, { value: !0 }), e), l = {}; o(l, { AccessTokenMissingError: () => u, RefreshAccessTokenFailedError: () => d }), t.exports = c(l); var u = class extends Error { constructor() { super(`No authentication found. Please log in with the Vercel CLI (vercel login).`), this.name = `AccessTokenMissingError`; } }, d = class extends Error { constructor(e) { super(`Failed to refresh authentication token.`, { cause: e }), this.name = `RefreshAccessTokenFailedError`; } }; })); var nr = c$3(((e, t) => { var r = Object.create, i = Object.defineProperty, a = Object.getOwnPropertyDescriptor, o = Object.getOwnPropertyNames, s = Object.getPrototypeOf, c = Object.prototype.hasOwnProperty, l = (e, t) => { for (var n in t) i(e, n, { get: t[n], enumerable: !0 }); }, u = (e, t, n, r) => { if (t && typeof t == `object` || typeof t == `function`) for (let s of o(t)) !c.call(e, s) && s !== n && i(e, s, { get: () => t[s], enumerable: !(r = a(t, s)) || r.enumerable }); return e; }, d = (e, t, n) => (n = e == null ? {} : r(s(e)), u(t || !e || !e.__esModule ? i(n, `default`, { value: e, enumerable: !0 }) : n, e)), f = (e) => u(i({}, `__esModule`, { value: !0 }), e), p = {}; l(p, { findRootDir: () => v, getUserDataDir: () => y }), t.exports = f(p); var m = d(p$4(`path`)), h = d(p$4(`fs`)), g = d(p$4(`os`)), _ = $n(); function v() { try { let e = process.cwd(); for (; e !== m.default.dirname(e);) { let t = m.default.join(e, `.vercel`); if (h.default.existsSync(t)) return e; e = m.default.dirname(e); } } catch { throw new _.VercelOidcTokenError(`Token refresh only supported in node server environments`); } return null; } function y() { if (process.env.XDG_DATA_HOME) return process.env.XDG_DATA_HOME; switch (g.default.platform()) { case `darwin`: return m.default.join(g.default.homedir(), `Library/Application Support`); case `linux`: return m.default.join(g.default.homedir(), `.local/share`); case `win32`: return process.env.LOCALAPPDATA ? process.env.LOCALAPPDATA : null; default: return null; } } })); var rr = c$3(((e, t) => { var r = Object.create, i = Object.defineProperty, a = Object.getOwnPropertyDescriptor, o = Object.getOwnPropertyNames, s = Object.getPrototypeOf, c = Object.prototype.hasOwnProperty, l = (e, t) => { for (var n in t) i(e, n, { get: t[n], enumerable: !0 }); }, u = (e, t, n, r) => { if (t && typeof t == `object` || typeof t == `function`) for (let s of o(t)) !c.call(e, s) && s !== n && i(e, s, { get: () => t[s], enumerable: !(r = a(t, s)) || r.enumerable }); return e; }, d = (e, t, n) => (n = e == null ? {} : r(s(e)), u(t || !e || !e.__esModule ? i(n, `default`, { value: e, enumerable: !0 }) : n, e)), f = (e) => u(i({}, `__esModule`, { value: !0 }), e), p = {}; l(p, { isValidAccessToken: () => b, readAuthConfig: () => v, writeAuthConfig: () => y }), t.exports = f(p); var m = d(p$4(`fs`)), h = d(p$4(`path`)), g = ar(); function _() { let e = (0, g.getVercelDataDir)(); if (!e) throw Error(`Unable to find Vercel CLI data directory. Your platform: ${process.platform}. Supported: darwin, linux, win32.`); return h.join(e, `auth.json`); } function v() { try { let e = _(); if (!m.existsSync(e)) return null; let t = m.readFileSync(e, `utf8`); return t ? JSON.parse(t) : null; } catch { return null; } } function y(e) { let t = _(), n = h.dirname(t); m.existsSync(n) || m.mkdirSync(n, { mode: 504, recursive: !0 }), m.writeFileSync(t, JSON.stringify(e, null, 2), { mode: 384 }); } function b(e, t = 0) { if (!e.token) return !1; if (typeof e.expiresAt != `number`) return !0; let n = Math.floor(Date.now() / 1e3), r = t / 1e3; return e.expiresAt >= n + r; } })); var ir = c$3(((e, t) => { var r = Object.defineProperty, i = Object.getOwnPropertyDescriptor, a = Object.getOwnPropertyNames, o = Object.prototype.hasOwnProperty, s = (e, t) => { for (var n in t) r(e, n, { get: t[n], enumerable: !0 }); }, c = (e, t, n, s) => { if (t && typeof t == `object` || typeof t == `function`) for (let c of a(t)) !o.call(e, c) && c !== n && r(e, c, { get: () => t[c], enumerable: !(s = i(t, c)) || s.enumerable }); return e; }, l = (e) => c(r({}, `__esModule`, { value: !0 }), e), u = {}; s(u, { processTokenResponse: () => g, refreshTokenRequest: () => h }), t.exports = l(u); var d = p$4(`os`); let f = `@vercel/oidc node-${process.version} ${(0, d.platform)()} (${(0, d.arch)()}) ${(0, d.hostname)()}`, p = null; async function m() { if (p) return p; let e = await fetch(`https://vercel.com/.well-known/openid-configuration`, { headers: { "user-agent": f } }); if (!e.ok) throw Error(`Failed to discover OAuth endpoints`); let t = await e.json(); if (!t || typeof t.token_endpoint != `string`) throw Error(`Invalid OAuth discovery response`); let n = t.token_endpoint; return p = n, n; } async function h(e) { let t = await m(); return await fetch(t, { method: `POST`, headers: { "Content-Type": `application/x-www-form-urlencoded`, "user-agent": f }, body: new URLSearchParams({ client_id: `cl_HYyOPBNtFMfHhaUn9L4QPfTZz6TP47bp`, grant_type: `refresh_token`, ...e }) }); } async function g(e) { let t = await e.json(); if (!e.ok) { let e = typeof t == `object` && t && `error` in t ? String(t.error) : `Token refresh failed`; return [Error(e)]; } return typeof t != `object` || !t ? [Error(`Invalid token response`)] : typeof t.access_token == `string` ? t.token_type === `Bearer` ? typeof t.expires_in == `number` ? [null, t] : [Error(`Missing expires_in in response`)] : [Error(`Invalid token_type in response`)] : [Error(`Missing access_token in response`)]; } })); var ar = c$3(((e, t) => { var r = Object.create, i = Object.defineProperty, a = Object.getOwnPropertyDescriptor, o = Object.getOwnPropertyNames, s = Object.getPrototypeOf, c = Object.prototype.hasOwnProperty, l = (e, t) => { for (var n in t) i(e, n, { get: t[n], enumerable: !0 }); }, u = (e, t, n, r) => { if (t && typeof t == `object` || typeof t == `function`) for (let s of o(t)) !c.call(e, s) && s !== n && i(e, s, { get: () => t[s], enumerable: !(r = a(t, s)) || r.enumerable }); return e; }, d = (e, t, n) => (n = e == null ? {} : r(s(e)), u(t || !e || !e.__esModule ? i(n, `default`, { value: e, enumerable: !0 }) : n, e)), f = (e) => u(i({}, `__esModule`, { value: !0 }), e), p = {}; l(p, { assertVercelOidcTokenResponse: () => w, findProjectInfo: () => T, getTokenPayload: () => O, getVercelDataDir: () => x, getVercelOidcToken: () => C, getVercelToken: () => S, isExpired: () => k, loadToken: () => D, saveToken: () => E }), t.exports = f(p); var m = d(p$4(`path`)), h = d(p$4(`fs`)), g = $n(), _ = nr(), v = rr(), y = ir(), b = tr(); function x() { let e = (0, _.getUserDataDir)(); return e ? m.join(e, `com.vercel.cli`) : null; } async function S(e) { let t = (0, v.readAuthConfig)(); if (!t?.token) throw new b.AccessTokenMissingError(); if ((0, v.isValidAccessToken)(t, e?.expirationBufferMs)) return t.token; if (!t.refreshToken) throw (0, v.writeAuthConfig)({}), new b.RefreshAccessTokenFailedError(`No refresh token available`); try { let e = await (0, y.refreshTokenRequest)({ refresh_token: t.refreshToken }), [n, r] = await (0, y.processTokenResponse)(e); if (n || !r) throw (0, v.writeAuthConfig)({}), new b.RefreshAccessTokenFailedError(n); let i = { token: r.access_token, expiresAt: Math.floor(Date.now() / 1e3) + r.expires_in }; return r.refresh_token && (i.refreshToken = r.refresh_token), (0, v.writeAuthConfig)(i), i.token; } catch (e) { throw (0, v.writeAuthConfig)({}), e instanceof b.AccessTokenMissingError || e instanceof b.RefreshAccessTokenFailedError ? e : new b.RefreshAccessTokenFailedError(e); } } async function C(e, t, n) { let r = `https://api.vercel.com/v1/projects/${t}/token?source=vercel-oidc-refresh${n ? `&teamId=${n}` : ``}`, i = await fetch(r, { method: `POST`, headers: { Authorization: `Bearer ${e}` } }); if (!i.ok) throw new g.VercelOidcTokenError(`Failed to refresh OIDC token: ${i.statusText}`); let a = await i.json(); return w(a), a; } function w(e) { if (!e || typeof e != `object`) throw TypeError("Vercel OIDC token is malformed. Expected an object. Please run `vc env pull` and try again"); if (!(`token` in e) || typeof e.token != `string`) throw TypeError("Vercel OIDC token is malformed. Expected a string-valued token property. Please run `vc env pull` and try again"); } function T() { let e = (0, _.findRootDir)(); if (!e) throw new g.VercelOidcTokenError("Unable to find project root directory. Have you linked your project with `vc link?`"); let t = m.join(e, `.vercel`, `project.json`); if (!h.existsSync(t)) throw new g.VercelOidcTokenError("project.json not found, have you linked your project with `vc link?`"); let n = JSON.parse(h.readFileSync(t, `utf8`)); if (typeof n.projectId != `string` && typeof n.orgId != `string`) throw TypeError("Expected a string-valued projectId property. Try running `vc link` to re-link your project."); return { projectId: n.projectId, teamId: n.orgId }; } function E(e, t) { let n = (0, _.getUserDataDir)(); if (!n) throw new g.VercelOidcTokenError(`Unable to find user data directory. Please reach out to Vercel support.`); let r = m.join(n, `com.vercel.token`, `${t}.json`), i = JSON.stringify(e); h.mkdirSync(m.dirname(r), { mode: 504, recursive: !0 }), h.writeFileSync(r, i), h.chmodSync(r, 432); } function D(e) { let t = (0, _.getUserDataDir)(); if (!t) throw new g.VercelOidcTokenError(`Unable to find user data directory. Please reach out to Vercel support.`); let n = m.join(t, `com.vercel.token`, `${e}.json`); if (!h.existsSync(n)) return null; let r = JSON.parse(h.readFileSync(n, `utf8`)); return w(r), r; } function O(e) { let t = e.split(`.`); if (t.length !== 3) throw new g.VercelOidcTokenError("Invalid token. Please run `vc env pull` and try again"); let n = t[1].replace(/-/g, `+`).replace(/_/g, `/`), r = n.padEnd(n.length + (4 - n.length % 4) % 4, `=`); return JSON.parse(Buffer.from(r, `base64`).toString(`utf8`)); } function k(e, t = 0) { return e.exp * 1e3 < Date.now() + t; } })); var or = c$3(((e, t) => { var n = Object.defineProperty, r = Object.getOwnPropertyDescriptor, i = Object.getOwnPropertyNames, a = Object.prototype.hasOwnProperty, o = (e, t) => { for (var r in t) n(e, r, { get: t[r], enumerable: !0 }); }, s = (e, t, o, s) => { if (t && typeof t == `object` || typeof t == `function`) for (let c of i(t)) !a.call(e, c) && c !== o && n(e, c, { get: () => t[c], enumerable: !(s = r(t, c)) || s.enumerable }); return e; }, c = (e) => s(n({}, `__esModule`, { value: !0 }), e), l = {}; o(l, { AccessTokenMissingError: () => f.AccessTokenMissingError, RefreshAccessTokenFailedError: () => f.RefreshAccessTokenFailedError, getContext: () => d.getContext, getVercelOidcToken: () => u.getVercelOidcToken, getVercelOidcTokenSync: () => u.getVercelOidcTokenSync, getVercelToken: () => p.getVercelToken }), t.exports = c(l); var u = er(), d = Qn(), f = tr(), p = ar(); })); var sr = d$3(Zn(), 1); var cr = or(); function lr(e) { if (e.split(`.`).length !== 3) return null; try { let t = JSON.parse(Buffer.from(e.split(`.`)[1], `base64url`).toString(`utf8`)); return t.owner_id ? { owner_id: t.owner_id, project_id: t.project_id } : null; } catch { return null; } } var ur = class extends Ht { constructor(e) { super({ baseUrl: e.baseUrl ?? `https://vercel.com/api`, token: e.token, debug: !1, fetch: e.fetch }), this.teamId = e.teamId, this.isJwtToken = !1; let t = lr(e.token); t && (this.isJwtToken = !0, this.projectId = t.project_id, this.teamId = t.owner_id); } async ensureValidToken() { if (this.isJwtToken) try { let e = await (0, cr.getVercelOidcToken)({ expirationBufferMs: 300 * 1e3, team: this.teamId, project: this.projectId }); if (e !== this.token) { this.token = e; let t = lr(e); t && (this.teamId = t.owner_id); } } catch {} } async request(e, t) { return await this.ensureValidToken(), super.request(e, { ...t, query: { teamId: this.teamId, ...t?.query }, headers: { "content-type": `application/json`, "user-agent": `vercel/sandbox/${qa$1} (Node.js/${process.version}; ${E.platform()}/${E.arch()})`, ...t?.headers } }); } async getSession(e) { let t = Jn(e), n = new URLSearchParams(t).toString(); return n = n ? `?${n}` : ``, Q$1(dn, await this.request(`/v2/sandboxes/sessions/${e.sessionId}${n}`, { signal: e.signal })); } async createSandbox(e) { let t = Jn(e); return Q$1(En, await this.request(`/v2/sandboxes`, { method: `POST`, body: JSON.stringify({ projectId: e.projectId, ports: e.ports, source: e.source, timeout: e.timeout, resources: e.resources, runtime: e.runtime, name: e.name, persistent: e.persistent, networkPolicy: e.networkPolicy ? Kn(e.networkPolicy) : void 0, env: e.env, tags: e.tags, snapshotExpiration: e.snapshotExpiration, keepLastSnapshots: e.keepLastSnapshots, ...t }), signal: e.signal })); } async runCommand(e) { if (e.wait) { let t = await this.request(`/v2/sandboxes/sessions/${e.sessionId}/cmd`, { method: `POST`, body: JSON.stringify({ command: e.command, args: e.args, cwd: e.cwd, env: e.env, sudo: e.sudo, wait: !0, timeout: e.timeout }), signal: e.signal }); if (t.ok || await Q$1(ia$1(), t), t.headers.get(`content-type`) !== `application/x-ndjson`) throw new A$1(t, { message: `Expected a stream of command data`, sessionId: e.sessionId }); if (t.body === null) throw new A$1(t, { message: `No response body`, sessionId: e.sessionId }); let n = sr.parse(); dr(t.body, n, { signal: e.signal }).catch((e) => { console.error(`Error piping command stream:`, e); }); let r = n[Symbol.asyncIterator](), i = await r.next(); if (i.done) throw new j$1(`stream_ended_early`, `Stream ended before command data was received`, e.sessionId); let { command: a } = mn.parse(i.value); return { command: a, finished: (async () => { let t = await r.next(); if (t.done) throw new j$1(`stream_ended_early`, `Stream ended before command finished`, e.sessionId); let { command: n } = hn.parse(t.value); return n; })() }; } return Q$1(mn, await this.request(`/v2/sandboxes/sessions/${e.sessionId}/cmd`, { method: `POST`, body: JSON.stringify({ command: e.command, args: e.args, cwd: e.cwd, env: e.env, sudo: e.sudo, timeout: e.timeout }), signal: e.signal })); } async getCommand(e) { return e.wait ? Q$1(hn, await this.request(`/v2/sandboxes/sessions/${e.sessionId}/cmd/${e.cmdId}`, { signal: e.signal, query: { wait: `true` } })) : Q$1(mn, await this.request(`/v2/sandboxes/sessions/${e.sessionId}/cmd/${e.cmdId}`, { signal: e.signal })); } async openInteractive(e) { return Q$1(fn, await this.request(`/v2/sandboxes/sessions/${e.sessionId}/interactive`, { method: `POST`, body: JSON.stringify({}), signal: e.signal })); } async mkDir(e) { return Q$1(gn, await this.request(`/v2/sandboxes/sessions/${e.sessionId}/fs/mkdir`, { method: `POST`, body: JSON.stringify({ path: e.path, cwd: e.cwd }), signal: e.signal })); } getFileWriter(e) { let t = new Un(); return { response: (async () => this.request(`/v2/sandboxes/sessions/${e.sessionId}/fs/write`, { method: `POST`, headers: { "content-type": `application/gzip`, "x-cwd": e.extractDir }, body: await Wn(t.readable), signal: e.signal }))(), writer: t }; } async listSessions(e) { return Q$1(pn, await this.request(`/v2/sandboxes/sessions`, { query: { project: e.projectId, name: e.name, limit: e.limit, cursor: e.cursor, sortOrder: e.sortOrder }, method: `GET`, signal: e.signal })); } async listSnapshots(e) { return Q$1(yn, await this.request(`/v2/sandboxes/snapshots`, { query: { project: e.projectId, name: e.name, limit: e.limit, cursor: e.cursor, sortOrder: e.sortOrder }, method: `GET`, signal: e.signal })); } async getSnapshotTree(e) { return Q$1(xn, await this.request(`/v2/sandboxes/snapshots/tree`, { query: { project: e.projectId, snapshotId: e.snapshotId, limit: e.limit, sortOrder: e.sortOrder }, method: `GET`, signal: e.signal })); } async writeFiles(e) { let { writer: t, response: n } = this.getFileWriter({ sessionId: e.sessionId, extractDir: e.extractDir, signal: e.signal }); for (let n of e.files) await t.addFile({ name: Gn({ filePath: n.path, extractDir: e.extractDir, cwd: e.cwd }), content: n.content, mode: n.mode }); t.end(), await Q$1(gn, await n); } async readFile(e) { let t = await this.request(`/v2/sandboxes/sessions/${e.sessionId}/fs/read`, { method: `POST`, body: JSON.stringify({ path: e.path, cwd: e.cwd }), signal: e.signal }); if (t.status === 404) return null; let n = t.headers.get(`content-type`) ?? ``; if (!t.ok || !n.includes(`application/octet-stream`)) { let e = await t.text().catch(() => ``), r; try { r = JSON.parse(e || `{}`); } catch { r = void 0; } throw new A$1(t, { message: `Unexpected response reading file: status ${t.status}, content-type ${n || `(none)`}`, json: r, text: e }); } return t.body === null ? null : Readable$1.fromWeb(t.body); } async killCommand(e) { return Q$1(mn, await this.request(`/v2/sandboxes/sessions/${e.sessionId}/cmd/${e.commandId}/kill`, { method: `POST`, body: JSON.stringify({ signal: e.signal }), signal: e.abortSignal })); } getLogs(e) { let t = this, n = new AbortController(), r = e.signal ? fr(e.signal, n.signal) : n.signal, i = (async function* () { let n = `/v2/sandboxes/sessions/${e.sessionId}/cmd/${e.cmdId}/logs`, i = await t.request(n, { method: `GET`, signal: r }); if (i.ok || await Q$1(ia$1(), i), i.headers.get(`content-type`) !== `application/x-ndjson`) throw new A$1(i, { message: `Expected a stream of logs`, sessionId: e.sessionId }); if (i.body === null) throw new A$1(i, { message: `No response body`, sessionId: e.sessionId }); let a = sr.parse(); dr(i.body, a, { signal: r }).catch((e) => { console.error(`Error piping logs:`, e); }); for await (let t of a) { let n = vn.parse(t); if (n.stream === `error`) throw new j$1(n.data.code, n.data.message, e.sessionId); yield n; } })(); return Object.assign(i, { [Symbol.dispose]() { n.abort(`Disposed`); }, close: () => n.abort(`Disposed`) }); } async stopSession(e) { let t = `/v2/sandboxes/sessions/${e.sessionId}/stop`; return Q$1(Tn, await this.request(t, { method: `POST`, signal: e.signal })); } async updateNetworkPolicy(e) { let t = `/v2/sandboxes/sessions/${e.sessionId}/network-policy`; return Q$1(un, await this.request(t, { method: `POST`, body: JSON.stringify(Kn(e.networkPolicy)), signal: e.signal })); } async extendTimeout(e) { let t = `/v2/sandboxes/sessions/${e.sessionId}/extend-timeout`; return Q$1(un, await this.request(t, { method: `POST`, body: JSON.stringify({ duration: e.duration }), signal: e.signal })); } async createSnapshot(e) { let t = `/v2/sandboxes/sessions/${e.sessionId}/snapshot`, n = e.expiration === void 0 ? void 0 : JSON.stringify({ expiration: e.expiration }); return Q$1(Sn, await this.request(t, { method: `POST`, body: n, signal: e.signal })); } async deleteSnapshot(e) { let t = `/v2/sandboxes/snapshots/${e.snapshotId}`; return Q$1(Cn, await this.request(t, { method: `DELETE`, signal: e.signal })); } async getSnapshot(e) { let t = `/v2/sandboxes/snapshots/${e.snapshotId}`; return Q$1(Cn, await this.request(t, { signal: e.signal })); } async getSandbox(e) { let t = Jn(e), n = { projectId: e.projectId, ...t }; return e.resume !== void 0 && (n.resume = String(e.resume)), Q$1(En, await this.request(`/v2/sandboxes/${encodeURIComponent(e.name)}`, { query: n, signal: e.signal })); } async listSandboxes(e) { return Q$1(Dn, await this.request(`/v2/sandboxes`, { query: { project: e.projectId, limit: e.limit, sortBy: e.sortBy, sortOrder: e.sortOrder, namePrefix: e.namePrefix, cursor: e.cursor, tags: pr$1(e.tags) }, method: `GET`, signal: e.signal })); } async updateSandbox(e) { return Q$1(On, await this.request(`/v2/sandboxes/${encodeURIComponent(e.name)}`, { method: `PATCH`, query: { projectId: e.projectId }, body: JSON.stringify({ persistent: e.persistent, resources: e.resources, runtime: e.runtime, timeout: e.timeout, networkPolicy: e.networkPolicy ? Kn(e.networkPolicy) : void 0, tags: e.tags, ports: e.ports, snapshotExpiration: e.snapshotExpiration, keepLastSnapshots: e.keepLastSnapshots, currentSnapshotId: e.currentSnapshotId }), signal: e.signal })); } async deleteSandbox(e) { return Q$1(On, await this.request(`/v2/sandboxes/${encodeURIComponent(e.name)}`, { method: `DELETE`, query: { projectId: e.projectId }, signal: e.signal })); } }; async function dr(e, t, n) { let r = e.getReader(), i = !1, a = n?.signal, o = () => { i = !0; let e = a?.reason ?? new DOMException(`The operation was aborted.`, `AbortError`); if (r.cancel(e).catch(() => {}), `destroy` in t && typeof t.destroy == `function`) { t.destroy(e); return; } t.emit(`error`, e), t.end(); }; a && (a.aborted ? o() : a.addEventListener(`abort`, o, { once: !0 })); try { for (;;) { let e = await r.read(); if (e.value && t.write(Buffer.from(e.value)), e.done) break; } } catch (e) { i || t.emit(`error`, e); } finally { a?.removeEventListener(`abort`, o), i || t.end(); } } function fr(...e) { let t = new AbortController(), n = () => { t.abort(); for (let t of e) t.removeEventListener(`abort`, n); }; for (let r of e) { if (r.aborted) { t.abort(); break; } r.addEventListener(`abort`, n); } return t.signal; } function pr$1(e) { if (e === void 0) return; let t = Object.entries(e); if (t.length !== 0) return t.map(([e, t]) => `${e}:${t}`); } function mr(e) { return JSON.parse(Buffer.from(e.replace(/-/g, `+`).replace(/_/g, `/`), `base64`).toString(`utf8`)); } var hr = d$3(c$3(((e, t) => { let n = process || {}, r = n.argv || [], i = n.env || {}, a = !(i.NO_COLOR || r.includes(`--no-color`)) && (!!i.FORCE_COLOR || r.includes(`--color`) || n.platform === `win32` || (n.stdout || {}).isTTY && i.TERM !== `dumb` || !!i.CI), o = (e, t, n = e) => (r) => { let i = `` + r, a = i.indexOf(t, e.length); return ~a ? e + s(i, t, n, a) + t : e + i + t; }, s = (e, t, n, r) => { let i = ``, a = 0; do i += e.substring(a, r) + n, a = r + t.length, r = e.indexOf(t, a); while (~r); return i + e.substring(a); }, c = (e = a) => { let t = e ? o : () => String; return { isColorSupported: e, reset: t(`\x1B[0m`, `\x1B[0m`), bold: t(`\x1B[1m`, `\x1B[22m`, `\x1B[22m\x1B[1m`), dim: t(`\x1B[2m`, `\x1B[22m`, `\x1B[22m\x1B[2m`), italic: t(`\x1B[3m`, `\x1B[23m`), underline: t(`\x1B[4m`, `\x1B[24m`), inverse: t(`\x1B[7m`, `\x1B[27m`), hidden: t(`\x1B[8m`, `\x1B[28m`), strikethrough: t(`\x1B[9m`, `\x1B[29m`), black: t(`\x1B[30m`, `\x1B[39m`), red: t(`\x1B[31m`, `\x1B[39m`), green: t(`\x1B[32m`, `\x1B[39m`), yellow: t(`\x1B[33m`, `\x1B[39m`), blue: t(`\x1B[34m`, `\x1B[39m`), magenta: t(`\x1B[35m`, `\x1B[39m`), cyan: t(`\x1B[36m`, `\x1B[39m`), white: t(`\x1B[37m`, `\x1B[39m`), gray: t(`\x1B[90m`, `\x1B[39m`), bgBlack: t(`\x1B[40m`, `\x1B[49m`), bgRed: t(`\x1B[41m`, `\x1B[49m`), bgGreen: t(`\x1B[42m`, `\x1B[49m`), bgYellow: t(`\x1B[43m`, `\x1B[49m`), bgBlue: t(`\x1B[44m`, `\x1B[49m`), bgMagenta: t(`\x1B[45m`, `\x1B[49m`), bgCyan: t(`\x1B[46m`, `\x1B[49m`), bgWhite: t(`\x1B[47m`, `\x1B[49m`), blackBright: t(`\x1B[90m`, `\x1B[39m`), redBright: t(`\x1B[91m`, `\x1B[39m`), greenBright: t(`\x1B[92m`, `\x1B[39m`), yellowBright: t(`\x1B[93m`, `\x1B[39m`), blueBright: t(`\x1B[94m`, `\x1B[39m`), magentaBright: t(`\x1B[95m`, `\x1B[39m`), cyanBright: t(`\x1B[96m`, `\x1B[39m`), whiteBright: t(`\x1B[97m`, `\x1B[39m`), bgBlackBright: t(`\x1B[100m`, `\x1B[49m`), bgRedBright: t(`\x1B[101m`, `\x1B[49m`), bgGreenBright: t(`\x1B[102m`, `\x1B[49m`), bgYellowBright: t(`\x1B[103m`, `\x1B[49m`), bgBlueBright: t(`\x1B[104m`, `\x1B[49m`), bgMagentaBright: t(`\x1B[105m`, `\x1B[49m`), bgCyanBright: t(`\x1B[106m`, `\x1B[49m`), bgWhiteBright: t(`\x1B[107m`, `\x1B[49m`) }; }; t.exports = c(), t.exports.createColors = c; }))(), 1); const gr = { warn: hr.default.yellow, error: hr.default.red, success: hr.default.green, info: hr.default.blue }; const _r = hr.default.dim(`[vercel/sandbox]`); function vr(e, t) { t = Array.isArray(t) ? t.join(` `) : t; let n = t.replace(/^/gm, `${_r} `); console.error(gr[e](n)); } function yr(e) { return hr.default.italic(hr.default.dim("`") + e + hr.default.dim("`")); } var br = d$3(t$2(), 1); async function xr() { return await Promise.resolve().then(() => auth_DF_ft5ea_exports); } function Sr() { return process.env.NODE_ENV !== `production` && ![`1`, `true`].includes(process.env.CI || ``) && process.stdout.isTTY && process.stdin.isTTY; } const Cr = (() => { let e = null; return async (t) => { (!e || e[0].teamId !== t.teamId || e[0].projectId !== t.projectId) && (e = [t, wr(t).catch((t) => { throw e = null, t; })]); let n = await e[1]; return vr(`warn`, `using inferred credentials team=${n.teamId} project=${n.projectId}`), n; }; })(); async function wr(e) { let { OAuth: t, pollForToken: n, getAuth: r, updateAuthConfig: i, inferScope: a } = await xr(), o = r(); if (!o?.token) { let e = process.env.VERCEL_URL ? `1 minute` : `5 minutes`; o = await Tr({ OAuth: t, pollForToken: n, getAuth: r }, e); } if (o?.refreshToken && o.expiresAt && o.expiresAt.getTime() <= Date.now()) { let e = await (await t()).refreshToken(o.refreshToken); o = { expiresAt: new Date(Date.now() + e.expires_in * 1e3), token: e.access_token, refreshToken: e.refresh_token || o.refreshToken }, i(o); } if (!o?.token) throw Error([ `Failed to retrieve authentication token.`, `${hr.default.bold(`hint:`)} Set VERCEL_OIDC_TOKEN or provide a Vercel API token.`, `├▶ Sandbox docs: https://vercel.com/docs/vercel-sandbox`, `╰▶ Access tokens: https://vercel.com/kb/guide/how-do-i-use-a-vercel-api-access-token` ].join(` `)); if (e.teamId && e.projectId) return { token: o.token, teamId: e.teamId, projectId: e.projectId }; let s = await a({ teamId: e.teamId, token: o.token }); return s.created && vr(`info`, `Created default project "${s.projectId}" in team "${s.teamId}".`), { token: o.token, teamId: e.teamId || s.teamId, projectId: e.projectId || s.projectId }; } async function Tr(e, t) { vr(`warn`, [ `No VERCEL_OIDC_TOKEN environment variable found, initiating device authorization flow...`, `│ ${hr.default.bold(`help:`)} this flow only happens on development environment.`, `│ In production, make sure to set up a proper token, or set up Vercel OIDC [https://vercel.com/docs/oidc].` ]); let n = await e.OAuth(), r = await n.deviceAuthorizationRequest(); vr(`info`, [ `╰▶ To authenticate, visit: ${r.verification_uri_complete}`, ` or visit ${hr.default.italic(r.verification_uri)} and type ${hr.default.bold(r.user_code)}`, ` Press ${hr.default.bold(``)} to open in your browser` ]); let i, a = e.pollForToken({ request: r, oauth: n }), o = !1, s = setTimeout(() => { if (o) return; let e = [ `Authentication flow timed out after ${t}.`, `│ Make sure to provide a token to avoid prompting an interactive flow.`, `╰▶ ${hr.default.bold(`help:`)} Link your project with ${yr(`npx vercel link`)} to refresh OIDC token automatically.` ].join(` `); i = Error(e), a.return(); }, (0, br.default)(t)); try { for await (let e of a) switch (e._tag) { case `SlowDown`: case `Timeout`: case `Response`: break; case `Error`: i = e.error; break; default: throw Error(`Unknown event type: ${JSON.stringify(e)}`); } } finally { o = !0, clearTimeout(s); } if (i) throw vr(`error`, `${hr.default.bold(`error:`)} Authentication failed: ${i.message}`), i; return vr(`success`, `${hr.default.bold(`done!`)} Authenticated successfully!`), e.getAuth(); } var Er = class extends Error { constructor(e) { let t = [ `Could not get credentials from OIDC context.`, "Please link your Vercel project using `npx vercel link`.", "Then, pull an initial OIDC token with `npx vercel env pull`", `and retry.`, "╰▶ Make sure you are loading `.env.local` correctly, or passing $VERCEL_OIDC_TOKEN directly." ].join(` `); super(t, { cause: e }), this.name = `LocalOidcContextError`; } }; var Dr = class extends Error { constructor(e) { let t = [ `Could not get credentials from OIDC context.`, `Please make sure OIDC is set up for your project`, `╰▶ Docs: https://vercel.com/docs/oidc` ].join(` `); super(t, { cause: e }), this.name = `VercelOidcContextError`; } }; async function Or(e) { try { return Mr(await (0, cr.getVercelOidcToken)({ team: e.teamId, project: e.projectId })); } catch (t) { if (!Sr()) throw process.env.VERCEL_URL ? new Dr(t) : new Er(t); return await Cr(e); } } async function kr(e) { return Ar(e ?? {}) || await Or({ teamId: e && typeof e == `object` && `teamId` in e && typeof e.teamId == `string` ? e.teamId : void 0, projectId: e && typeof e == `object` && `projectId` in e && typeof e.projectId == `string` ? e.projectId : void 0 }); } function Ar(e) { if (!e || typeof e != `object`) return null; let t = [ `token` in e && typeof e.token == `string` ? null : `token`, `teamId` in e && typeof e.teamId == `string` ? null : `teamId`, `projectId` in e && typeof e.projectId == `string` ? null : `projectId` ].filter((e) => e !== null); if (t.length === 0) return { token: e.token, projectId: e.projectId, teamId: e.teamId }; if (t.length < 3) throw Error(`Missing credentials parameters to access the Vercel API: ${t.filter((e) => e !== null).join(`, `)}`); return null; } const jr = da$1({ exp: Qi$1().optional().describe(`Expiry timestamp (seconds since epoch)`), iat: Qi$1().optional().describe(`Issued at timestamp`), owner_id: Mi$1(), project_id: Mi$1() }); function Mr(e) { try { let t = jr.parse(mr(e.split(`.`)[1])); return { token: e, projectId: t.project_id, teamId: t.owner_id }; } catch (e) { throw Error(`Invalid Vercel OIDC token: ${e instanceof Error ? e.message : String(e)}`); } } const Nr = { SIGHUP: 1, SIGINT: 2, SIGQUIT: 3, SIGKILL: 9, SIGTERM: 15, SIGCONT: 18, SIGSTOP: 19 }; function Pr(e) { if (typeof e == `number`) return e; if (e in Nr) return Nr[e]; throw Error(`Unknown signal name: ${String(e)}`); } var Fr = class e { async ensureClient() { "use step"; if (this._client) return this._client; let e = await kr(); return this._client = new ur({ teamId: e.teamId, token: e.token }), this._client; } get cmdId() { return this.cmd.id; } get cwd() { return this.cmd.cwd; } get startedAt() { return this.cmd.startedAt; } constructor({ client: e, sessionId: t, cmd: n, output: r }) { this._client = null, this.outputCache = null, this._resolvedOutput = null, this._client = e ?? null, this.sessionId = t, this.cmd = n, this.exitCode = n.exitCode ?? null, r && (this._resolvedOutput = r, this.outputCache = Promise.resolve({ stdout: r.stdout, stderr: r.stderr, both: r.stdout + r.stderr })); } static [m$2](e) { let t = { sandboxId: e.sessionId, cmd: e.cmd }; return e._resolvedOutput && (t.output = e._resolvedOutput), t; } static [h$2](t) { return new e({ sessionId: t.sandboxId, cmd: t.cmd, output: t.output }); } logs(e) { if (!this._client) throw Error(`logs() requires an API client. Call an async method first to initialize the client.`); return this._client.getLogs({ sessionId: this.sessionId, cmdId: this.cmd.id, signal: e?.signal }); } async wait(e) { "use step"; let t = await this.ensureClient(); e?.signal?.throwIfAborted(); let n = await t.getCommand({ sessionId: this.sessionId, cmdId: this.cmd.id, wait: !0, signal: e?.signal }); return new Ir({ client: t, sessionId: this.sessionId, cmd: n.json.command, exitCode: n.json.command.exitCode }); } async getCachedOutput(e) { return this.outputCache ||= (async () => { try { e?.signal?.throwIfAborted(), await this.ensureClient(); let t = ``, n = ``, r = ``; for await (let i of this.logs({ signal: e?.signal })) r += i.data, i.stream === `stdout` ? t += i.data : n += i.data; return this._resolvedOutput = { stdout: t, stderr: n }, { stdout: t, stderr: n, both: r }; } catch (e) { throw this.outputCache = null, e; } })(), this.outputCache; } async output(e = `both`, t) { "use step"; return (await this.getCachedOutput(t))[e]; } async stdout(e) { "use step"; return this.output(`stdout`, e); } async stderr(e) { "use step"; return this.output(`stderr`, e); } async kill(e, t) { "use step"; await (await this.ensureClient()).killCommand({ sessionId: this.sessionId, commandId: this.cmd.id, signal: Pr(e ?? `SIGTERM`), abortSignal: t?.abortSignal }); } }; var Ir = class e extends Fr { constructor(e) { super({ ...e }), this.exitCode = e.exitCode; } static [m$2](e) { return { ...Fr[m$2](e), exitCode: e.exitCode }; } static [h$2](t) { return new e({ sessionId: t.sandboxId, cmd: t.cmd, exitCode: t.exitCode, output: t.output }); } async wait() { return this; } }; function Lr(e, t) { let { itemsKey: n, fetchNext: r, signal: i } = t; async function* a() { Rr(i); let t = e; for (yield t; t.pagination.next !== null;) Rr(i), t = await r(t.pagination.next), yield t; } async function* o() { for await (let e of a()) { let t = e[n]; for (let e of t) Rr(i), yield e; } } return { ...e, [Symbol.asyncIterator]: o, pages: a, toArray: async () => { let e = []; for await (let t of o()) e.push(t); return e; } }; } function Rr(e) { if (e?.aborted) throw e.reason ?? new DOMException(`Aborted`, `AbortError`); } var zr = class e { async ensureClient() { "use step"; if (this._client) return this._client; let e = await kr(); return this._client = new ur({ teamId: e.teamId, token: e.token }), this._client; } get snapshotId() { return this.snapshot.id; } get sourceSessionId() { return this.snapshot.sourceSessionId; } get status() { return this.snapshot.status; } get sizeBytes() { return this.snapshot.sizeBytes; } get createdAt() { return new Date(this.snapshot.createdAt); } get updatedAt() { return new Date(this.snapshot.updatedAt); } get expiresAt() { if (this.snapshot.expiresAt !== void 0) return new Date(this.snapshot.expiresAt); } static [m$2](e) { return { snapshot: e.snapshot }; } static [h$2](t) { return new e({ snapshot: t.snapshot }); } constructor({ client: e, snapshot: t }) { this._client = null, this._client = e ?? null, this.snapshot = t; } static async list(e) { "use step"; let t = await kr(e), n = new ur({ teamId: t.teamId, token: t.token, fetch: e?.fetch }), r = async (r) => (await n.listSnapshots({ ...t, ...e, ...r !== void 0 && { cursor: r } })).json; return Lr(await r(e?.cursor), { itemsKey: `snapshots`, fetchNext: r, signal: e?.signal }); } static async tree(e) { "use step"; let t = await kr(e), n = new ur({ teamId: t.teamId, token: t.token, fetch: e.fetch }), r = async (r) => (await n.getSnapshotTree({ ...t, ...e, snapshotId: r })).json; return Lr(await r(e.snapshotId), { itemsKey: `snapshots`, fetchNext: r, signal: e.signal }); } static async get(t) { "use step"; let n = await kr(t), r = new ur({ teamId: n.teamId, token: n.token }); return new e({ client: r, snapshot: (await r.getSnapshot({ snapshotId: t.snapshotId, signal: t.signal })).json.snapshot }); } async delete(e) { "use step"; this.snapshot = (await (await this.ensureClient()).deleteSnapshot({ snapshotId: this.snapshot.id, signal: e?.signal })).json.snapshot; } }; function Br(e) { let { networkPolicy: t, ...n } = e; return { ...n, networkPolicy: t ? qn(t) : void 0 }; } var Vr = class e { async ensureClient() { "use step"; if (this._client) return this._client; let e = await kr(); return this._client = new ur({ teamId: e.teamId, token: e.token }), this._client; } get client() { if (!this._client) throw Error(`API client not initialized`); return this._client; } get _sessionSnapshot() { return this.session; } get sessionId() { return this.session.id; } get interactivePort() { return this.session.interactivePort ?? void 0; } get status() { return this.session.status; } get createdAt() { return new Date(this.session.createdAt); } get timeout() { return this.session.timeout; } get networkPolicy() { return this.session.networkPolicy; } get sourceSnapshotId() { return this.session.sourceSnapshotId; } get memory() { return this.session.memory; } get vcpus() { return this.session.vcpus; } get region() { return this.session.region; } get runtime() { return this.session.runtime; } get cwd() { return this.session.cwd; } get requestedAt() { return new Date(this.session.requestedAt); } get startedAt() { return this.session.startedAt == null ? void 0 : new Date(this.session.startedAt); } get requestedStopAt() { return this.session.requestedStopAt == null ? void 0 : new Date(this.session.requestedStopAt); } get stoppedAt() { return this.session.stoppedAt == null ? void 0 : new Date(this.session.stoppedAt); } get abortedAt() { return this.session.abortedAt == null ? void 0 : new Date(this.session.abortedAt); } get duration() { return this.session.duration; } get snapshottedAt() { return this.session.snapshottedAt == null ? void 0 : new Date(this.session.snapshottedAt); } get updatedAt() { return new Date(this.session.updatedAt); } get activeCpuUsageMs() { return this.session.activeCpuDurationMs; } get networkTransfer() { return this.session.networkTransfer; } static [m$2](e) { return { session: e.session, routes: e.routes }; } static [h$2](t) { return new e({ routes: t.routes, snapshot: t.session }); } constructor(e) { this._client = null, this.routes = e.routes, `snapshot` in e ? this.session = e.snapshot : (this._client = e.client, this.session = Br(e.session)); } updateRoutes(e) { this.routes = e; } async getCommand(e, t) { "use step"; let n = await this.ensureClient(), r = await n.getCommand({ sessionId: this.session.id, cmdId: e, signal: t?.signal }); return new Fr({ client: n, sessionId: this.session.id, cmd: r.json.command }); } async runCommand(e, t, n) { "use step"; let r = await this.ensureClient(), i = typeof e == `string` ? { cmd: e, args: t, signal: n?.signal, timeoutMs: n?.timeoutMs } : e, a = !i.detached, o = async (e) => { if (!(!i.stdout && !i.stderr)) try { for await (let t of e.logs({ signal: i.signal })) t.stream === `stdout` ? i.stdout?.write(t.data) : t.stream === `stderr` && i.stderr?.write(t.data); } catch (e) { if (i.signal?.aborted) return; throw e; } }; if (a) { let e = await r.runCommand({ sessionId: this.session.id, command: i.cmd, args: i.args ?? [], cwd: i.cwd, env: i.env ?? {}, sudo: i.sudo ?? !1, wait: !0, timeout: i.timeoutMs, signal: i.signal }), t = new Fr({ client: r, sessionId: this.session.id, cmd: e.command }), [n] = await Promise.all([e.finished, o(t)]); return new Ir({ client: r, sessionId: this.session.id, cmd: n, exitCode: n.exitCode ?? 0 }); } let s = await r.runCommand({ sessionId: this.session.id, command: i.cmd, args: i.args ?? [], cwd: i.cwd, env: i.env ?? {}, sudo: i.sudo ?? !1, timeout: i.timeoutMs, signal: i.signal }), c = new Fr({ client: r, sessionId: this.session.id, cmd: s.json.command }); return o(c).catch((e) => { i.signal?.aborted || (i.stderr ?? i.stdout)?.emit(`error`, e); }), c; } async mkDir(e, t) { "use step"; await (await this.ensureClient()).mkDir({ sessionId: this.session.id, path: e, signal: t?.signal }); } async openInteractive(e) { "use step"; let { json: t } = await (await this.ensureClient()).openInteractive({ sessionId: this.session.id, signal: e?.signal }); return { url: t.url, token: t.token }; } async readFile(e, t) { "use step"; return (await this.ensureClient()).readFile({ sessionId: this.session.id, path: e.path, cwd: e.cwd, signal: t?.signal }); } async readFileToBuffer(e, t) { "use step"; let n = await (await this.ensureClient()).readFile({ sessionId: this.session.id, path: e.path, cwd: e.cwd, signal: t?.signal }); return n === null ? null : Wn(n); } async downloadFile(e, t, n) { "use step"; let r = await this.ensureClient(); if (!e?.path) throw Error(`downloadFile: source path is required`); if (!t?.path) throw Error(`downloadFile: destination path is required`); let i = await r.readFile({ sessionId: this.session.id, path: e.path, cwd: e.cwd, signal: n?.signal }); if (i === null) return null; try { let e = resolve$1(t.cwd ?? ``, t.path); return n?.mkdirRecursive && await mkdir$1(dirname$1(e), { recursive: !0 }), await pipeline(i, createWriteStream(e), { signal: n?.signal }), e; } finally { i.destroy(); } } async writeFiles(e, t) { "use step"; return (await this.ensureClient()).writeFiles({ sessionId: this.session.id, cwd: this.session.cwd, extractDir: `/`, files: e, signal: t?.signal }); } domain(e) { let t = this.routes.find(({ port: t }) => t == e); if (t) return `https://${t.subdomain}.vercel.run`; throw Error(`No route for port ${e}`); } async stop(e) { "use step"; let t = await (await this.ensureClient()).stopSession({ sessionId: this.session.id, signal: e?.signal }); return this.session = Br(t.json.session), { session: this.session, sandbox: t.json.sandbox, snapshot: t.json.snapshot }; } async update(e, t) { "use step"; e.networkPolicy !== void 0 && (this.session = Br((await (await this.ensureClient()).updateNetworkPolicy({ sessionId: this.session.id, networkPolicy: e.networkPolicy, signal: t?.signal })).json.session)); } async extendTimeout(e, t) { "use step"; this.session = Br((await (await this.ensureClient()).extendTimeout({ sessionId: this.session.id, duration: e, signal: t?.signal })).json.session); } async snapshot(e) { "use step"; let t = await this.ensureClient(), n = await t.createSnapshot({ sessionId: this.session.id, expiration: e?.expiration, signal: e?.signal }); return this.session = Br(n.json.session), new zr({ client: t, snapshot: n.json.snapshot }); } }; const { S_IFMT: Hr, S_IFREG: Ur, S_IFDIR: Wr, S_IFLNK: Gr, S_IFBLK: Kr, S_IFCHR: qr, S_IFIFO: Jr, S_IFSOCK: Yr } = k$1; function $$1(e, t, n, r) { let i = Error(`${e}: ${t}, ${n} '${r}'`); return i.code = e, i.syscall = n, i.path = r, i; } function Xr(e) { return e == null ? { encoding: null } : typeof e == `string` ? { encoding: e } : { encoding: e.encoding ?? null, signal: e.signal }; } var Zr = class { constructor(e, t, n, r, i, a, o, s, c, l, u, d, f, p) { this.dev = e, this._mode = t, this.nlink = n, this.uid = r, this.gid = i, this.rdev = a, this.blksize = o, this.ino = s, this.size = c, this.blocks = l, this.atimeMs = u, this.mtimeMs = d, this.ctimeMs = f, this.birthtimeMs = p, this.atime = new Date(u), this.mtime = new Date(d), this.ctime = new Date(f), this.birthtime = new Date(p); } get mode() { return this._mode; } isFile() { return (this.mode & Hr) === Ur; } isDirectory() { return (this.mode & Hr) === Wr; } isBlockDevice() { return (this.mode & Hr) === Kr; } isCharacterDevice() { return (this.mode & Hr) === qr; } isSymbolicLink() { return (this.mode & Hr) === Gr; } isFIFO() { return (this.mode & Hr) === Jr; } isSocket() { return (this.mode & Hr) === Yr; } }; var Qr = class { constructor(e, t, n) { this.name = e, this.type = t, this.parentPath = n, this.path = `${this.parentPath}/${this.name}`; } isFile() { return this.type === 1; } isDirectory() { return this.type === 2; } isBlockDevice() { return this.type === 7; } isCharacterDevice() { return this.type === 6; } isSymbolicLink() { return this.type === 3; } isFIFO() { return this.type === 4; } isSocket() { return this.type === 5; } }; function $r(e) { let t = e.trim().split(`|`); return new Zr(parseInt(t[10], 10), parseInt(t[1], 16), parseInt(t[8], 10), parseInt(t[2], 10), parseInt(t[3], 10), 0, parseInt(t[11], 10), parseInt(t[9], 10), parseInt(t[0], 10), parseInt(t[12], 10), parseFloat(t[4]) * 1e3, parseFloat(t[5]) * 1e3, parseFloat(t[6]) * 1e3, parseFloat(t[7]) * 1e3); } function ei(e, t) { let n = e.trim().split(`|`), r = n[0], i = n[1]; if (!r) throw $$1(`ENOENT`, `no such file or directory`, `readdir`, t); if (!i) throw Error(`Invalid dirent type: ${i}`); return new Qr(r, ni[i] ?? 1, t); } const ti = `%s|%f|%u|%g|%X|%Y|%Z|%W|%h|%i|%d|%B|%b`; const ni = { f: 1, d: 2, l: 3, b: 7, c: 6, p: 4, s: 5 }; var ri = class { constructor(e) { this.sandbox = e; } async readFile(e, t) { "use step"; let { encoding: n, signal: r } = Xr(t), i = await this.sandbox.readFileToBuffer({ path: e }, { signal: r }); if (i === null) throw $$1(`ENOENT`, `no such file or directory`, `open`, e); return n ? i.toString(n) : i; } async writeFile(e, t, n) { "use step"; let { encoding: r, signal: i } = typeof n == `string` ? { encoding: n, signal: void 0 } : { encoding: n?.encoding, signal: n?.signal }, a; a = typeof t == `string` ? Buffer.from(t, r ?? `utf8`) : Buffer.isBuffer(t) ? t : Buffer.from(t), await this.sandbox.writeFiles([{ path: e, content: a }], { signal: i }); } async appendFile(e, t, n) { "use step"; let { encoding: r, signal: i } = typeof n == `string` ? { encoding: n, signal: void 0 } : { encoding: n?.encoding, signal: n?.signal }, a; a = typeof t == `string` ? Buffer.from(t, r ?? `utf8`) : Buffer.isBuffer(t) ? t : Buffer.from(t); let o = await this.sandbox.readFileToBuffer({ path: e }, { signal: i }), s = o === null ? a : Buffer.concat([o, a]); await this.sandbox.writeFiles([{ path: e, content: s }], { signal: i }); } async mkdir(e, t) { "use step"; let n = typeof t == `number` ? { recursive: !1 } : t ?? {}; if (n.recursive) { let t = await this.sandbox.runCommand(`mkdir`, [`-p`, e], { signal: n.signal }); if (t.exitCode !== 0) throw $$1(`EACCES`, (await t.stderr()).trim() || `permission denied`, `mkdir`, e); return; } await this.sandbox.mkDir(e, { signal: n.signal }); } async readdir(e, t) { "use step"; if (t?.withFileTypes) { let n = await this.sandbox.runCommand(`find`, [ e, `-maxdepth`, `1`, `-mindepth`, `1`, `-printf`, `%f|%y\\n` ], { signal: t?.signal }); if (n.exitCode !== 0) { let t = await n.stderr(); throw t.includes(`No such file or directory`) ? $$1(`ENOENT`, `no such file or directory`, `scandir`, e) : $$1(`EACCES`, t.trim(), `scandir`, e); } return (await n.stdout()).trim().split(` `).filter(Boolean).map((t) => ei(t, e)); } let n = await this.sandbox.runCommand(`ls`, [`-1`, e], { signal: t?.signal }); if (n.exitCode !== 0) { let t = await n.stderr(); throw t.includes(`No such file or directory`) ? $$1(`ENOENT`, `no such file or directory`, `scandir`, e) : $$1(`EACCES`, t.trim(), `scandir`, e); } return (await n.stdout()).trim().split(` `).filter(Boolean); } async stat(e, t) { "use step"; let n = await this.sandbox.runCommand(`stat`, [ `-L`, `-c`, ti, e ], { signal: t?.signal }); if (n.exitCode !== 0) { let t = await n.stderr(); throw t.includes(`No such file or directory`) ? $$1(`ENOENT`, `no such file or directory`, `stat`, e) : $$1(`EACCES`, t.trim(), `stat`, e); } return $r(await n.stdout()); } async lstat(e, t) { "use step"; let n = await this.sandbox.runCommand(`stat`, [ `-c`, ti, e ], { signal: t?.signal }); if (n.exitCode !== 0) { let t = await n.stderr(); throw t.includes(`No such file or directory`) ? $$1(`ENOENT`, `no such file or directory`, `lstat`, e) : $$1(`EACCES`, t.trim(), `lstat`, e); } return $r(await n.stdout()); } async unlink(e, t) { "use step"; let n = await this.sandbox.runCommand(`rm`, [e], { signal: t?.signal }); if (n.exitCode !== 0) { let t = await n.stderr(); throw t.includes(`No such file or directory`) ? $$1(`ENOENT`, `no such file or directory`, `unlink`, e) : $$1(`EACCES`, t.trim(), `unlink`, e); } } async rm(e, t) { "use step"; let n = []; t?.recursive && n.push(`-r`), t?.force && n.push(`-f`), n.push(e); let r = await this.sandbox.runCommand(`rm`, n, { signal: t?.signal }); if (r.exitCode !== 0) { let t = await r.stderr(); throw t.includes(`No such file or directory`) ? $$1(`ENOENT`, `no such file or directory`, `rm`, e) : $$1(`EACCES`, t.trim(), `rm`, e); } } async rmdir(e, t) { "use step"; let n = await this.sandbox.runCommand(`rmdir`, [e], { signal: t?.signal }); if (n.exitCode !== 0) { let t = await n.stderr(); throw t.includes(`No such file or directory`) ? $$1(`ENOENT`, `no such file or directory`, `rmdir`, e) : t.includes(`not empty`) ? $$1(`ENOTEMPTY`, `directory not empty`, `rmdir`, e) : $$1(`EACCES`, t.trim(), `rmdir`, e); } } async rename(e, t, n) { "use step"; let r = await this.sandbox.runCommand(`mv`, [e, t], { signal: n?.signal }); if (r.exitCode !== 0) { let t = await r.stderr(); throw t.includes(`No such file or directory`) ? $$1(`ENOENT`, `no such file or directory`, `rename`, e) : $$1(`EACCES`, t.trim(), `rename`, e); } } async copyFile(e, t, n) { "use step"; let r = await this.sandbox.runCommand(`cp`, [e, t], { signal: n?.signal }); if (r.exitCode !== 0) { let t = await r.stderr(); throw t.includes(`No such file or directory`) ? $$1(`ENOENT`, `no such file or directory`, `copyfile`, e) : $$1(`EACCES`, t.trim(), `copyfile`, e); } } async access(e, t) { "use step"; if ((await this.sandbox.runCommand(`test`, [`-e`, e], { signal: t?.signal })).exitCode !== 0) throw $$1(`ENOENT`, `no such file or directory`, `access`, e); } async exists(e, t) { return (await this.sandbox.runCommand(`test`, [`-e`, e], { signal: t?.signal })).exitCode === 0; } async chmod(e, t, n) { "use step"; let r = typeof t == `number` ? t.toString(8) : t, i = await this.sandbox.runCommand(`chmod`, [r, e], { signal: n?.signal }); if (i.exitCode !== 0) { let t = await i.stderr(); throw t.includes(`No such file or directory`) ? $$1(`ENOENT`, `no such file or directory`, `chmod`, e) : $$1(`EACCES`, t.trim(), `chmod`, e); } } async chown(e, t, n, r) { "use step"; let i = await this.sandbox.runCommand(`chown`, [`${t}:${n}`, e], { signal: r?.signal }); if (i.exitCode !== 0) { let t = await i.stderr(); throw t.includes(`No such file or directory`) ? $$1(`ENOENT`, `no such file or directory`, `chown`, e) : $$1(`EACCES`, t.trim(), `chown`, e); } } async symlink(e, t, n) { "use step"; let r = await this.sandbox.runCommand(`ln`, [ `-s`, e, t ], { signal: n?.signal }); if (r.exitCode !== 0) { let e = await r.stderr(); throw e.includes(`File exists`) ? $$1(`EEXIST`, `file already exists`, `symlink`, t) : $$1(`EACCES`, e.trim(), `symlink`, t); } } async readlink(e, t) { "use step"; let n = await this.sandbox.runCommand(`readlink`, [e], { signal: t?.signal }); if (n.exitCode !== 0) throw (await n.stderr()).includes(`No such file or directory`) ? $$1(`ENOENT`, `no such file or directory`, `readlink`, e) : $$1(`EINVAL`, `invalid argument`, `readlink`, e); return (await n.stdout()).trim(); } async realpath(e, t) { "use step"; let n = await this.sandbox.runCommand(`realpath`, [e], { signal: t?.signal }); if (n.exitCode !== 0) { let t = await n.stderr(); throw t.includes(`No such file or directory`) ? $$1(`ENOENT`, `no such file or directory`, `realpath`, e) : $$1(`EACCES`, t.trim(), `realpath`, e); } return (await n.stdout()).trim(); } async truncate(e, t, n) { "use step"; let r = await this.sandbox.runCommand(`truncate`, [ `-s`, String(t ?? 0), e ], { signal: n?.signal }); if (r.exitCode !== 0) { let t = await r.stderr(); throw t.includes(`No such file or directory`) ? $$1(`ENOENT`, `no such file or directory`, `truncate`, e) : $$1(`EACCES`, t.trim(), `truncate`, e); } } async mkdtemp(e, t) { "use step"; let n = await this.sandbox.runCommand(`mktemp`, [`-d`, `${e}XXXXXX`], { signal: t?.signal }); if (n.exitCode !== 0) throw $$1(`EACCES`, (await n.stderr()).trim(), `mkdtemp`, e); return (await n.stdout()).trim(); } }; function ii(e) { return e instanceof A$1 && e.response.status === 410; } function ai(e) { return e instanceof A$1 && e.response.status === 404; } function oi(e) { return e instanceof A$1 && e.response.status === 410 && e.json?.error?.code === `snapshot_not_found`; } function si(e) { return e instanceof A$1 && e.response.status === 422 && e.json?.error?.code === `sandbox_stopping`; } function ci(e) { return e instanceof A$1 && e.response.status === 422 && e.json?.error?.code === `sandbox_snapshotting`; } var li = class e { async ensureClient() { "use step"; if (this._client) return this._client; let e = await kr(); return this._client = new ur({ teamId: e.teamId, token: e.token }), this._client; } get name() { return this.sandbox.name; } get routes() { return this.currentSession().routes; } get persistent() { return this.sandbox.persistent; } get region() { return this.sandbox.region; } get vcpus() { return this.sandbox.vcpus; } get memory() { return this.sandbox.memory; } get runtime() { return this.sandbox.runtime; } get totalEgressBytes() { return this.sandbox.totalEgressBytes; } get totalIngressBytes() { return this.sandbox.totalIngressBytes; } get totalActiveCpuDurationMs() { return this.sandbox.totalActiveCpuDurationMs; } get totalDurationMs() { return this.sandbox.totalDurationMs; } get updatedAt() { return new Date(this.sandbox.updatedAt); } get statusUpdatedAt() { return this.sandbox.statusUpdatedAt ? new Date(this.sandbox.statusUpdatedAt) : void 0; } get createdAt() { return new Date(this.sandbox.createdAt); } get interactivePort() { return this.currentSession().interactivePort; } get cwd() { return this.currentSession().cwd; } get status() { return this.currentSession().status; } get timeout() { return this.sandbox.timeout; } get tags() { return this.sandbox.tags; } get networkPolicy() { return this.sandbox.networkPolicy ? qn(this.sandbox.networkPolicy) : void 0; } get sourceSnapshotId() { return this.currentSession().sourceSnapshotId; } get currentSnapshotId() { return this.sandbox.currentSnapshotId; } get snapshotExpiration() { return this.sandbox.snapshotExpiration; } get keepLastSnapshots() { return this.sandbox.keepLastSnapshots; } get activeCpuUsageMs() { return this.currentSession().activeCpuUsageMs; } get networkTransfer() { return this.currentSession().networkTransfer; } static async list(e) { "use step"; let t = await kr(e), n = new ur({ teamId: t.teamId, token: t.token, fetch: e?.fetch }), r = async (r) => (await n.listSandboxes({ ...t, ...e, ...r !== void 0 && { cursor: r } })).json; return Lr(await r(e?.cursor), { itemsKey: `sandboxes`, fetchNext: r, signal: e?.signal }); } static [m$2](e) { return { metadata: e.session?._sessionSnapshot, routes: e.session?.routes ?? [], sandboxMetadata: e.sandbox, projectId: e.projectId }; } static [h$2](t) { let n = new e({ sandbox: t.sandboxMetadata, routes: t.routes, projectId: t.projectId }); return t.metadata && (n.session = new Vr({ routes: t.routes, snapshot: t.metadata })), n; } static async create(e) { "use step"; let t = await kr(e), n = new ur({ teamId: t.teamId, token: t.token, fetch: e?.fetch }), r = Jn(e), i = await n.createSandbox({ source: e?.source, projectId: t.projectId, ports: e?.ports ?? [], timeout: e?.timeout, resources: e?.resources, runtime: e && `runtime` in e ? e?.runtime : void 0, networkPolicy: e?.networkPolicy, env: e?.env, tags: e?.tags, snapshotExpiration: e?.snapshotExpiration, keepLastSnapshots: e?.keepLastSnapshots, signal: e?.signal, name: e?.name, persistent: e?.persistent, ...r }); return new ui({ client: n, session: i.json.session, sandbox: i.json.sandbox, routes: i.json.routes, projectId: t.projectId, onResume: e?.onResume }); } static async fork(t) { "use step"; let { sourceSandbox: n, ...r } = t, i = t, a = await e.get({ token: i.token, projectId: i.projectId, teamId: i.teamId, fetch: t.fetch, signal: t.signal, ...Jn(t), name: n, resume: !1 }), o = a.routes.filter((e) => e.port !== a.interactivePort).map((e) => e.port), s = { ...a.vcpus !== void 0 && { resources: { vcpus: a.vcpus } }, ...a.timeout !== void 0 && { timeout: a.timeout }, ...a.networkPolicy !== void 0 && { networkPolicy: a.networkPolicy }, ...a.tags !== void 0 && { tags: a.tags }, ...o.length > 0 && { ports: o }, persistent: a.persistent, ...a.snapshotExpiration !== void 0 && { snapshotExpiration: a.snapshotExpiration }, ...a.keepLastSnapshots !== void 0 && { keepLastSnapshots: a.keepLastSnapshots } }, c = a.currentSnapshotId; return c ? e.create({ ...s, ...r, source: { type: `snapshot`, snapshotId: c } }) : e.create({ ...s, ...a.runtime !== void 0 && { runtime: a.runtime }, ...r }); } static async get(t) { "use step"; let n = await kr(t), r = new ur({ teamId: n.teamId, token: n.token, fetch: t.fetch }), i = Jn(t), a = await r.getSandbox({ name: t.name, projectId: n.projectId, resume: t.resume, signal: t.signal, ...i }), o = new e({ client: r, session: a.json.session, sandbox: a.json.sandbox, routes: a.json.routes, projectId: n.projectId, onResume: t.onResume }); return a.json.resumed && t.onResume && await t.onResume(o), o; } static async getOrCreate(t) { "use step"; if (!t?.name) { let n = await e.create(t); return t?.onCreate && await t.onCreate(n), n; } try { return await e.get(t); } catch (n) { if (ai(n)) { let n = await e.create(t); return t.onCreate && await t.onCreate(n), n; } if (oi(n)) { let n = await kr(t), r = new ur({ teamId: n.teamId, token: n.token, fetch: t.fetch }), i = Jn(t); try { await r.deleteSandbox({ name: t.name, projectId: n.projectId, signal: t.signal, ...i }); } catch (e) { if (!ai(e)) throw e; } let a = await e.create(t); return t.onCreate && await t.onCreate(a), a; } throw n; } } constructor({ client: e, routes: t, session: n, sandbox: r, projectId: i, onResume: a }) { this._client = null, this.resumePromise = null, this._client = e ?? null, n && (this.session = new Vr({ client: e, routes: t, session: n })), this.sandbox = r, this.projectId = i ?? ``, this.onResume = a, this.fs = new ri(this); } currentSession() { if (!this.session) throw Error(`No active session. Run a command or call resume first.`); return this.session; } async resume(e) { return this.resumePromise ||= this.doResume(e).finally(() => { this.resumePromise = null; }), this.resumePromise; } async doResume(e) { let t = await this.ensureClient(), n = await t.getSandbox({ name: this.sandbox.name, projectId: this.projectId, resume: !0, signal: e }); this.session = new Vr({ client: t, routes: n.json.routes, session: n.json.session }), this.onResume && n.json.resumed && await this.onResume(this); } async waitForStopAndResume(e) { "use step"; let t = await this.ensureClient(), n = this.session.status; for (; n === `stopping` || n === `snapshotting`;) { await setTimeout$1(500, void 0, { signal: e }); let r = await t.getSession({ sessionId: this.session.sessionId, signal: e }); this.session = new Vr({ client: t, routes: r.json.routes, session: r.json.session }), n = r.json.session.status; } await this.resume(e); } async withResume(e, t) { this.session || await this.resume(t); try { return await e(); } catch (n) { if (ii(n)) return await this.resume(t), e(); if (si(n) || ci(n)) return await this.waitForStopAndResume(t), e(); throw n; } } async runCommand(e, t, n) { "use step"; let r = typeof e == `string` ? n?.signal : e.signal; return this.withResume(() => this.session.runCommand(e, t, n), r); } async getCommand(e, t) { "use step"; return this.withResume(() => this.session.getCommand(e, t), t?.signal); } async mkDir(e, t) { "use step"; return this.withResume(() => this.session.mkDir(e, t), t?.signal); } async openInteractive(e) { "use step"; return this.withResume(() => this.session.openInteractive(e), e?.signal); } async readFile(e, t) { "use step"; return this.withResume(() => this.session.readFile(e, t), t?.signal); } async readFileToBuffer(e, t) { "use step"; return this.withResume(() => this.session.readFileToBuffer(e, t), t?.signal); } async downloadFile(e, t, n) { "use step"; return this.withResume(() => this.session.downloadFile(e, t, n), n?.signal); } async writeFiles(e, t) { "use step"; return this.withResume(() => this.session.writeFiles(e, t), t?.signal); } domain(e) { return this.currentSession().domain(e); } async stop(e) { "use step"; if (!this.session) throw Error(`No active session to stop.`); let { session: t, sandbox: n, snapshot: r } = await this.session.stop(e); return n && (this.sandbox = n), Object.assign(t, { snapshot: r }); } async updateNetworkPolicy(e, t) { "use step"; return await this.withResume(() => this.session.update({ networkPolicy: e }, t), t?.signal), this.session.networkPolicy; } async extendTimeout(e, t) { "use step"; return this.withResume(() => this.session.extendTimeout(e, t), t?.signal); } async snapshot(e) { "use step"; return this.withResume(() => this.session.snapshot(e), e?.signal); } async update(e, t) { "use step"; let n = await this.ensureClient(), r; e.resources?.vcpus && (r = { vcpus: e.resources.vcpus, memory: e.resources.vcpus * 2048 }); let i = await n.updateSandbox({ name: this.sandbox.name, projectId: this.projectId, persistent: e.persistent, resources: r, timeout: e.timeout, networkPolicy: e.networkPolicy, tags: e.tags, ports: e.ports, snapshotExpiration: e.snapshotExpiration, keepLastSnapshots: e.keepLastSnapshots, currentSnapshotId: e.currentSnapshotId, signal: t?.signal }); if (this.sandbox = i.json.sandbox, e.ports !== void 0 && i.json.routes && this.session?.updateRoutes(i.json.routes), e.networkPolicy) try { return await this.session?.update({ networkPolicy: e.networkPolicy }, t); } catch (e) { if (ii(e) || si(e)) return; throw e; } } async delete(e) { "use step"; await (await this.ensureClient()).deleteSandbox({ name: this.sandbox.name, projectId: this.projectId, signal: e?.signal }); } async listSessions(e) { "use step"; let t = await this.ensureClient(), n = async (n) => (await t.listSessions({ projectId: this.projectId, name: this.sandbox.name, limit: e?.limit, cursor: n, sortOrder: e?.sortOrder, signal: e?.signal })).json; return Lr(await n(e?.cursor), { itemsKey: `sessions`, fetchNext: n, signal: e?.signal }); } async listSnapshots(e) { "use step"; let t = await this.ensureClient(), n = async (n) => (await t.listSnapshots({ projectId: this.projectId, name: this.sandbox.name, limit: e?.limit, cursor: n, sortOrder: e?.sortOrder, signal: e?.signal })).json; return Lr(await n(e?.cursor), { itemsKey: `snapshots`, fetchNext: n, signal: e?.signal }); } }; var ui = class extends li { async [Symbol.asyncDispose]() { await this.stop(); } }; const di = new TextEncoder(); const fi = new TextDecoder(); function pi(...e) { let t = e.reduce((e, { length: t }) => e + t, 0), n = new Uint8Array(t), r = 0; for (let t of e) n.set(t, r), r += t.length; return n; } function mi(e) { let t = new Uint8Array(e.length); for (let n = 0; n < e.length; n++) { let r = e.charCodeAt(n); if (r > 127) throw TypeError(`non-ASCII string encountered in encode()`); t[n] = r; } return t; } function hi(e) { if (Uint8Array.fromBase64) return Uint8Array.fromBase64(e); let t = atob(e), n = new Uint8Array(t.length); for (let e = 0; e < t.length; e++) n[e] = t.charCodeAt(e); return n; } function gi(e) { if (Uint8Array.fromBase64) return Uint8Array.fromBase64(typeof e == `string` ? e : fi.decode(e), { alphabet: `base64url` }); let t = e; t instanceof Uint8Array && (t = fi.decode(t)), t = t.replace(/-/g, `+`).replace(/_/g, `/`); try { return hi(t); } catch { throw TypeError(`The input to be decoded is not correctly encoded.`); } } var _i = class extends Error { static code = `ERR_JOSE_GENERIC`; code = `ERR_JOSE_GENERIC`; constructor(e, t) { super(e, t), this.name = this.constructor.name, Error.captureStackTrace?.(this, this.constructor); } }; var vi = class extends _i { static code = `ERR_JWT_CLAIM_VALIDATION_FAILED`; code = `ERR_JWT_CLAIM_VALIDATION_FAILED`; claim; reason; payload; constructor(e, t, n = `unspecified`, r = `unspecified`) { super(e, { cause: { claim: n, reason: r, payload: t } }), this.claim = n, this.reason = r, this.payload = t; } }; var yi = class extends _i { static code = `ERR_JWT_EXPIRED`; code = `ERR_JWT_EXPIRED`; claim; reason; payload; constructor(e, t, n = `unspecified`, r = `unspecified`) { super(e, { cause: { claim: n, reason: r, payload: t } }), this.claim = n, this.reason = r, this.payload = t; } }; var bi = class extends _i { static code = `ERR_JOSE_ALG_NOT_ALLOWED`; code = `ERR_JOSE_ALG_NOT_ALLOWED`; }; var xi = class extends _i { static code = `ERR_JOSE_NOT_SUPPORTED`; code = `ERR_JOSE_NOT_SUPPORTED`; }; var Si = class extends _i { static code = `ERR_JWS_INVALID`; code = `ERR_JWS_INVALID`; }; var Ci = class extends _i { static code = `ERR_JWT_INVALID`; code = `ERR_JWT_INVALID`; }; var wi = class extends _i { static code = `ERR_JWKS_INVALID`; code = `ERR_JWKS_INVALID`; }; var Ti = class extends _i { static code = `ERR_JWKS_NO_MATCHING_KEY`; code = `ERR_JWKS_NO_MATCHING_KEY`; constructor(e = `no applicable key found in the JSON Web Key Set`, t) { super(e, t); } }; var Ei = class extends _i { [Symbol.asyncIterator]; static code = `ERR_JWKS_MULTIPLE_MATCHING_KEYS`; code = `ERR_JWKS_MULTIPLE_MATCHING_KEYS`; constructor(e = `multiple matching keys found in the JSON Web Key Set`, t) { super(e, t); } }; var Di = class extends _i { static code = `ERR_JWKS_TIMEOUT`; code = `ERR_JWKS_TIMEOUT`; constructor(e = `request timed out`, t) { super(e, t); } }; var Oi = class extends _i { static code = `ERR_JWS_SIGNATURE_VERIFICATION_FAILED`; code = `ERR_JWS_SIGNATURE_VERIFICATION_FAILED`; constructor(e = `signature verification failed`, t) { super(e, t); } }; const ki = (e, t = `algorithm.name`) => TypeError(`CryptoKey does not support this operation, its ${t} must be ${e}`); const Ai = (e, t) => e.name === t; function ji(e) { return parseInt(e.name.slice(4), 10); } function Mi(e, t) { if (ji(e.hash) !== t) throw ki(`SHA-${t}`, `algorithm.hash`); } function Ni(e) { switch (e) { case `ES256`: return `P-256`; case `ES384`: return `P-384`; case `ES512`: return `P-521`; default: throw Error(`unreachable`); } } function Pi(e, t) { if (t && !e.usages.includes(t)) throw TypeError(`CryptoKey does not support this operation, its usages must include ${t}.`); } function Fi(e, t, n) { switch (t) { case `HS256`: case `HS384`: case `HS512`: if (!Ai(e.algorithm, `HMAC`)) throw ki(`HMAC`); Mi(e.algorithm, parseInt(t.slice(2), 10)); break; case `RS256`: case `RS384`: case `RS512`: if (!Ai(e.algorithm, `RSASSA-PKCS1-v1_5`)) throw ki(`RSASSA-PKCS1-v1_5`); Mi(e.algorithm, parseInt(t.slice(2), 10)); break; case `PS256`: case `PS384`: case `PS512`: if (!Ai(e.algorithm, `RSA-PSS`)) throw ki(`RSA-PSS`); Mi(e.algorithm, parseInt(t.slice(2), 10)); break; case `Ed25519`: case `EdDSA`: if (!Ai(e.algorithm, `Ed25519`)) throw ki(`Ed25519`); break; case `ML-DSA-44`: case `ML-DSA-65`: case `ML-DSA-87`: if (!Ai(e.algorithm, t)) throw ki(t); break; case `ES256`: case `ES384`: case `ES512`: { if (!Ai(e.algorithm, `ECDSA`)) throw ki(`ECDSA`); let n = Ni(t); if (e.algorithm.namedCurve !== n) throw ki(n, `algorithm.namedCurve`); break; } default: throw TypeError(`CryptoKey does not support this operation`); } Pi(e, n); } function Ii(e, t, ...n) { if (n = n.filter(Boolean), n.length > 2) { let t = n.pop(); e += `one of type ${n.join(`, `)}, or ${t}.`; } else n.length === 2 ? e += `one of type ${n[0]} or ${n[1]}.` : e += `of type ${n[0]}.`; return t == null ? e += ` Received ${t}` : typeof t == `function` && t.name ? e += ` Received function ${t.name}` : typeof t == `object` && t && t.constructor?.name && (e += ` Received an instance of ${t.constructor.name}`), e; } const Li = (e, ...t) => Ii(`Key must be `, e, ...t); const Ri = (e, t, ...n) => Ii(`Key for the ${e} algorithm must be `, t, ...n); function zi(e, t) { if (e.startsWith(`RS`) || e.startsWith(`PS`)) { let { modulusLength: n } = t.algorithm; if (typeof n != `number` || n < 2048) throw TypeError(`${e} requires key modulusLength to be 2048 bits or larger`); } } function Bi(e, t) { let n = `SHA-${e.slice(-3)}`; switch (e) { case `HS256`: case `HS384`: case `HS512`: return { hash: n, name: `HMAC` }; case `PS256`: case `PS384`: case `PS512`: return { hash: n, name: `RSA-PSS`, saltLength: parseInt(e.slice(-3), 10) >> 3 }; case `RS256`: case `RS384`: case `RS512`: return { hash: n, name: `RSASSA-PKCS1-v1_5` }; case `ES256`: case `ES384`: case `ES512`: return { hash: n, name: `ECDSA`, namedCurve: t.namedCurve }; case `Ed25519`: case `EdDSA`: return { name: `Ed25519` }; case `ML-DSA-44`: case `ML-DSA-65`: case `ML-DSA-87`: return { name: e }; default: throw new xi(`alg ${e} is not supported either by JOSE or your javascript runtime`); } } async function Vi(e, t, n) { if (t instanceof Uint8Array) { if (!e.startsWith(`HS`)) throw TypeError(Li(t, `CryptoKey`, `KeyObject`, `JSON Web Key`)); return crypto.subtle.importKey(`raw`, t, { hash: `SHA-${e.slice(-3)}`, name: `HMAC` }, !1, [n]); } return Fi(t, e, n), t; } async function Hi(e, t, n, r) { let i = await Vi(e, t, `verify`); zi(e, i); let a = Bi(e, i.algorithm); try { return await crypto.subtle.verify(a, i, n, r); } catch { return !1; } } function Ui(e, t, n) { try { return gi(e); } catch { throw new n(`Failed to base64url decode the ${t}`); } } const Wi = (e) => typeof e == `object` && !!e; function Gi(e) { if (!Wi(e) || Object.prototype.toString.call(e) !== `[object Object]`) return !1; if (Object.getPrototypeOf(e) === null) return !0; let t = e; for (; Object.getPrototypeOf(t) !== null;) t = Object.getPrototypeOf(t); return Object.getPrototypeOf(e) === t; } function Ki(...e) { let t = e.filter(Boolean); if (t.length === 0 || t.length === 1) return !0; let n; for (let e of t) { let t = Object.keys(e); if (!n || n.size === 0) { n = new Set(t); continue; } for (let e of t) { if (n.has(e)) return !1; n.add(e); } } return !0; } const qi = (e) => Gi(e) && typeof e.kty == `string`; const Ji = (e) => e.kty !== `oct` && (e.kty === `AKP` && typeof e.priv == `string` || typeof e.d == `string`); const Yi = (e) => e.kty !== `oct` && e.d === void 0 && e.priv === void 0; const Xi = (e) => e.kty === `oct` && typeof e.k == `string`; const Zi = (e) => { if (e?.[Symbol.toStringTag] === `CryptoKey`) return !0; try { return e instanceof CryptoKey; } catch { return !1; } }; const Qi = (e) => e?.[Symbol.toStringTag] === `KeyObject`; const $i = (e) => Zi(e) || Qi(e); const ea = (e) => e?.[Symbol.toStringTag]; const ta = (e, t, n) => { if (t.use !== void 0) { let e; switch (n) { case `sign`: case `verify`: e = `sig`; break; case `encrypt`: case `decrypt`: e = `enc`; break; } if (t.use !== e) throw TypeError(`Invalid key for this operation, its "use" must be "${e}" when present`); } if (t.alg !== void 0 && t.alg !== e) throw TypeError(`Invalid key for this operation, its "alg" must be "${e}" when present`); if (Array.isArray(t.key_ops)) { let r; switch (!0) { case n === `sign` || n === `verify`: case e === `dir`: case e.includes(`CBC-HS`): r = n; break; case e.startsWith(`PBES2`): r = `deriveBits`; break; case /^A\d{3}(?:GCM)?(?:KW)?$/.test(e): r = !e.includes(`GCM`) && e.endsWith(`KW`) ? n === `encrypt` ? `wrapKey` : `unwrapKey` : n; break; case n === `encrypt` && e.startsWith(`RSA`): r = `wrapKey`; break; case n === `decrypt`: r = e.startsWith(`RSA`) ? `unwrapKey` : `deriveBits`; break; } if (r && t.key_ops?.includes?.(r) === !1) throw TypeError(`Invalid key for this operation, its "key_ops" must include "${r}" when present`); } return !0; }; const na = (e, t, n) => { if (!(t instanceof Uint8Array)) { if (qi(t)) { if (Xi(t) && ta(e, t, n)) return; throw TypeError(`JSON Web Key for symmetric algorithms must have JWK "kty" (Key Type) equal to "oct" and the JWK "k" (Key Value) present`); } if (!$i(t)) throw TypeError(Ri(e, t, `CryptoKey`, `KeyObject`, `JSON Web Key`, `Uint8Array`)); if (t.type !== `secret`) throw TypeError(`${ea(t)} instances for symmetric algorithms must be of type "secret"`); } }; const ra = (e, t, n) => { if (qi(t)) switch (n) { case `decrypt`: case `sign`: if (Ji(t) && ta(e, t, n)) return; throw TypeError(`JSON Web Key for this operation must be a private JWK`); case `encrypt`: case `verify`: if (Yi(t) && ta(e, t, n)) return; throw TypeError(`JSON Web Key for this operation must be a public JWK`); } if (!$i(t)) throw TypeError(Ri(e, t, `CryptoKey`, `KeyObject`, `JSON Web Key`)); if (t.type === `secret`) throw TypeError(`${ea(t)} instances for asymmetric algorithms must not be of type "secret"`); if (t.type === `public`) switch (n) { case `sign`: throw TypeError(`${ea(t)} instances for asymmetric algorithm signing must be of type "private"`); case `decrypt`: throw TypeError(`${ea(t)} instances for asymmetric algorithm decryption must be of type "private"`); } if (t.type === `private`) switch (n) { case `verify`: throw TypeError(`${ea(t)} instances for asymmetric algorithm verifying must be of type "public"`); case `encrypt`: throw TypeError(`${ea(t)} instances for asymmetric algorithm encryption must be of type "public"`); } }; function ia(e, t, n) { switch (e.substring(0, 2)) { case `A1`: case `A2`: case `di`: case `HS`: case `PB`: na(e, t, n); break; default: ra(e, t, n); } } function aa(e, t, n, r, i) { if (i.crit !== void 0 && r?.crit === void 0) throw new e(`"crit" (Critical) Header Parameter MUST be integrity protected`); if (!r || r.crit === void 0) return /* @__PURE__ */ new Set(); if (!Array.isArray(r.crit) || r.crit.length === 0 || r.crit.some((e) => typeof e != `string` || e.length === 0)) throw new e(`"crit" (Critical) Header Parameter MUST be an array of non-empty strings when present`); let a; a = n === void 0 ? t : new Map([...Object.entries(n), ...t.entries()]); for (let t of r.crit) { if (!a.has(t)) throw new xi(`Extension Header Parameter "${t}" is not recognized`); if (i[t] === void 0) throw new e(`Extension Header Parameter "${t}" is missing`); if (a.get(t) && r[t] === void 0) throw new e(`Extension Header Parameter "${t}" MUST be integrity protected`); } return new Set(r.crit); } function oa(e, t) { if (t !== void 0 && (!Array.isArray(t) || t.some((e) => typeof e != `string`))) throw TypeError(`"${e}" option must be an array of strings`); if (t) return new Set(t); } const sa = `Invalid or unsupported JWK "alg" (Algorithm) Parameter value`; function ca(e) { let t, n; switch (e.kty) { case `AKP`: switch (e.alg) { case `ML-DSA-44`: case `ML-DSA-65`: case `ML-DSA-87`: t = { name: e.alg }, n = e.priv ? [`sign`] : [`verify`]; break; default: throw new xi(sa); } break; case `RSA`: switch (e.alg) { case `PS256`: case `PS384`: case `PS512`: t = { name: `RSA-PSS`, hash: `SHA-${e.alg.slice(-3)}` }, n = e.d ? [`sign`] : [`verify`]; break; case `RS256`: case `RS384`: case `RS512`: t = { name: `RSASSA-PKCS1-v1_5`, hash: `SHA-${e.alg.slice(-3)}` }, n = e.d ? [`sign`] : [`verify`]; break; case `RSA-OAEP`: case `RSA-OAEP-256`: case `RSA-OAEP-384`: case `RSA-OAEP-512`: t = { name: `RSA-OAEP`, hash: `SHA-${parseInt(e.alg.slice(-3), 10) || 1}` }, n = e.d ? [`decrypt`, `unwrapKey`] : [`encrypt`, `wrapKey`]; break; default: throw new xi(sa); } break; case `EC`: switch (e.alg) { case `ES256`: case `ES384`: case `ES512`: t = { name: `ECDSA`, namedCurve: { ES256: `P-256`, ES384: `P-384`, ES512: `P-521` }[e.alg] }, n = e.d ? [`sign`] : [`verify`]; break; case `ECDH-ES`: case `ECDH-ES+A128KW`: case `ECDH-ES+A192KW`: case `ECDH-ES+A256KW`: t = { name: `ECDH`, namedCurve: e.crv }, n = e.d ? [`deriveBits`] : []; break; default: throw new xi(sa); } break; case `OKP`: switch (e.alg) { case `Ed25519`: case `EdDSA`: t = { name: `Ed25519` }, n = e.d ? [`sign`] : [`verify`]; break; case `ECDH-ES`: case `ECDH-ES+A128KW`: case `ECDH-ES+A192KW`: case `ECDH-ES+A256KW`: t = { name: e.crv }, n = e.d ? [`deriveBits`] : []; break; default: throw new xi(sa); } break; default: throw new xi(`Invalid or unsupported JWK "kty" (Key Type) Parameter value`); } return { algorithm: t, keyUsages: n }; } async function la(e) { if (!e.alg) throw TypeError(`"alg" argument is required when "jwk.alg" is not present`); let { algorithm: t, keyUsages: n } = ca(e), r = { ...e }; return r.kty !== `AKP` && delete r.alg, delete r.use, crypto.subtle.importKey(`jwk`, r, t, e.ext ?? !(e.d || e.priv), e.key_ops ?? n); } const ua = `given KeyObject instance cannot be used for this algorithm`; let da; const fa = async (e, t, n, r = !1) => { da ||= /* @__PURE__ */ new WeakMap(); let i = da.get(e); if (i?.[n]) return i[n]; let a = await la({ ...t, alg: n }); return r && Object.freeze(e), i ? i[n] = a : da.set(e, { [n]: a }), a; }; const pa = (e, t) => { da ||= /* @__PURE__ */ new WeakMap(); let n = da.get(e); if (n?.[t]) return n[t]; let r = e.type === `public`, i = !!r, a; if (e.asymmetricKeyType === `x25519`) { switch (t) { case `ECDH-ES`: case `ECDH-ES+A128KW`: case `ECDH-ES+A192KW`: case `ECDH-ES+A256KW`: break; default: throw TypeError(ua); } a = e.toCryptoKey(e.asymmetricKeyType, i, r ? [] : [`deriveBits`]); } if (e.asymmetricKeyType === `ed25519`) { if (t !== `EdDSA` && t !== `Ed25519`) throw TypeError(ua); a = e.toCryptoKey(e.asymmetricKeyType, i, [r ? `verify` : `sign`]); } switch (e.asymmetricKeyType) { case `ml-dsa-44`: case `ml-dsa-65`: case `ml-dsa-87`: if (t !== e.asymmetricKeyType.toUpperCase()) throw TypeError(ua); a = e.toCryptoKey(e.asymmetricKeyType, i, [r ? `verify` : `sign`]); } if (e.asymmetricKeyType === `rsa`) { let n; switch (t) { case `RSA-OAEP`: n = `SHA-1`; break; case `RS256`: case `PS256`: case `RSA-OAEP-256`: n = `SHA-256`; break; case `RS384`: case `PS384`: case `RSA-OAEP-384`: n = `SHA-384`; break; case `RS512`: case `PS512`: case `RSA-OAEP-512`: n = `SHA-512`; break; default: throw TypeError(ua); } if (t.startsWith(`RSA-OAEP`)) return e.toCryptoKey({ name: `RSA-OAEP`, hash: n }, i, r ? [`encrypt`] : [`decrypt`]); a = e.toCryptoKey({ name: t.startsWith(`PS`) ? `RSA-PSS` : `RSASSA-PKCS1-v1_5`, hash: n }, i, [r ? `verify` : `sign`]); } if (e.asymmetricKeyType === `ec`) { let n = (/* @__PURE__ */ new Map([ [`prime256v1`, `P-256`], [`secp384r1`, `P-384`], [`secp521r1`, `P-521`] ])).get(e.asymmetricKeyDetails?.namedCurve); if (!n) throw TypeError(ua); let o = { ES256: `P-256`, ES384: `P-384`, ES512: `P-521` }; o[t] && n === o[t] && (a = e.toCryptoKey({ name: `ECDSA`, namedCurve: n }, i, [r ? `verify` : `sign`])), t.startsWith(`ECDH-ES`) && (a = e.toCryptoKey({ name: `ECDH`, namedCurve: n }, i, r ? [] : [`deriveBits`])); } if (!a) throw TypeError(ua); return n ? n[t] = a : da.set(e, { [t]: a }), a; }; async function ma(e, t) { if (e instanceof Uint8Array || Zi(e)) return e; if (Qi(e)) { if (e.type === `secret`) return e.export(); if (`toCryptoKey` in e && typeof e.toCryptoKey == `function`) try { return pa(e, t); } catch (e) { if (e instanceof TypeError) throw e; } return fa(e, e.export({ format: `jwk` }), t); } if (qi(e)) return e.k ? gi(e.k) : fa(e, e, t, !0); throw Error(`unreachable`); } async function ha(e, t, n) { if (!Gi(e)) throw new Si(`Flattened JWS must be an object`); if (e.protected === void 0 && e.header === void 0) throw new Si(`Flattened JWS must have either of the "protected" or "header" members`); if (e.protected !== void 0 && typeof e.protected != `string`) throw new Si(`JWS Protected Header incorrect type`); if (e.payload === void 0) throw new Si(`JWS Payload missing`); if (typeof e.signature != `string`) throw new Si(`JWS Signature missing or incorrect type`); if (e.header !== void 0 && !Gi(e.header)) throw new Si(`JWS Unprotected Header incorrect type`); let r = {}; if (e.protected) try { let t = gi(e.protected); r = JSON.parse(fi.decode(t)); } catch { throw new Si(`JWS Protected Header is invalid`); } if (!Ki(r, e.header)) throw new Si(`JWS Protected and JWS Unprotected Header Parameter names must be disjoint`); let i = { ...r, ...e.header }, a = aa(Si, /* @__PURE__ */ new Map([[`b64`, !0]]), n?.crit, r, i), o = !0; if (a.has(`b64`) && (o = r.b64, typeof o != `boolean`)) throw new Si(`The "b64" (base64url-encode payload) Header Parameter must be a boolean`); let { alg: s } = i; if (typeof s != `string` || !s) throw new Si(`JWS "alg" (Algorithm) Header Parameter missing or invalid`); let c = n && oa(`algorithms`, n.algorithms); if (c && !c.has(s)) throw new bi(`"alg" (Algorithm) Header Parameter value not allowed`); if (o) { if (typeof e.payload != `string`) throw new Si(`JWS Payload must be a string`); } else if (typeof e.payload != `string` && !(e.payload instanceof Uint8Array)) throw new Si(`JWS Payload must be a string or an Uint8Array instance`); let l = !1; typeof t == `function` && (t = await t(r, e), l = !0), ia(s, t, `verify`); let u = pi(e.protected === void 0 ? /* @__PURE__ */ new Uint8Array() : mi(e.protected), mi(`.`), typeof e.payload == `string` ? o ? mi(e.payload) : di.encode(e.payload) : e.payload), d = Ui(e.signature, `signature`, Si), f = await ma(t, s); if (!await Hi(s, f, d, u)) throw new Oi(); let p; p = o ? Ui(e.payload, `payload`, Si) : typeof e.payload == `string` ? di.encode(e.payload) : e.payload; let m = { payload: p }; return e.protected !== void 0 && (m.protectedHeader = r), e.header !== void 0 && (m.unprotectedHeader = e.header), l ? { ...m, key: f } : m; } async function ga(e, t, n) { if (e instanceof Uint8Array && (e = fi.decode(e)), typeof e != `string`) throw new Si(`Compact JWS must be a string or Uint8Array`); let { 0: r, 1: i, 2: a, length: o } = e.split(`.`); if (o !== 3) throw new Si(`Invalid Compact JWS`); let s = await ha({ payload: i, protected: r, signature: a }, t, n), c = { payload: s.payload, protectedHeader: s.protectedHeader }; return typeof t == `function` ? { ...c, key: s.key } : c; } const _a = (e) => Math.floor(e.getTime() / 1e3); const va = /^(\+|\-)? ?(\d+|\d+\.\d+) ?(seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)(?: (ago|from now))?$/i; function ya(e) { let t = va.exec(e); if (!t || t[4] && t[1]) throw TypeError(`Invalid time period format`); let n = parseFloat(t[2]), r = t[3].toLowerCase(), i; switch (r) { case `sec`: case `secs`: case `second`: case `seconds`: case `s`: i = Math.round(n); break; case `minute`: case `minutes`: case `min`: case `mins`: case `m`: i = Math.round(n * 60); break; case `hour`: case `hours`: case `hr`: case `hrs`: case `h`: i = Math.round(n * 3600); break; case `day`: case `days`: case `d`: i = Math.round(n * 86400); break; case `week`: case `weeks`: case `w`: i = Math.round(n * 604800); break; default: i = Math.round(n * 31557600); break; } return t[1] === `-` || t[4] === `ago` ? -i : i; } const ba = (e) => e.includes(`/`) ? e.toLowerCase() : `application/${e.toLowerCase()}`; const xa = (e, t) => typeof e == `string` ? t.includes(e) : Array.isArray(e) ? t.some(Set.prototype.has.bind(new Set(e))) : !1; function Sa(e, t, n = {}) { let r; try { r = JSON.parse(fi.decode(t)); } catch {} if (!Gi(r)) throw new Ci(`JWT Claims Set must be a top-level JSON object`); let { typ: i } = n; if (i && (typeof e.typ != `string` || ba(e.typ) !== ba(i))) throw new vi(`unexpected "typ" JWT header value`, r, `typ`, `check_failed`); let { requiredClaims: a = [], issuer: o, subject: s, audience: c, maxTokenAge: l } = n, u = [...a]; l !== void 0 && u.push(`iat`), c !== void 0 && u.push(`aud`), s !== void 0 && u.push(`sub`), o !== void 0 && u.push(`iss`); for (let e of new Set(u.reverse())) if (!(e in r)) throw new vi(`missing required "${e}" claim`, r, e, `missing`); if (o && !(Array.isArray(o) ? o : [o]).includes(r.iss)) throw new vi(`unexpected "iss" claim value`, r, `iss`, `check_failed`); if (s && r.sub !== s) throw new vi(`unexpected "sub" claim value`, r, `sub`, `check_failed`); if (c && !xa(r.aud, typeof c == `string` ? [c] : c)) throw new vi(`unexpected "aud" claim value`, r, `aud`, `check_failed`); let d; switch (typeof n.clockTolerance) { case `string`: d = ya(n.clockTolerance); break; case `number`: d = n.clockTolerance; break; case `undefined`: d = 0; break; default: throw TypeError(`Invalid clockTolerance option type`); } let { currentDate: f } = n, p = _a(f || /* @__PURE__ */ new Date()); if ((r.iat !== void 0 || l) && typeof r.iat != `number`) throw new vi(`"iat" claim must be a number`, r, `iat`, `invalid`); if (r.nbf !== void 0) { if (typeof r.nbf != `number`) throw new vi(`"nbf" claim must be a number`, r, `nbf`, `invalid`); if (r.nbf > p + d) throw new vi(`"nbf" claim timestamp check failed`, r, `nbf`, `check_failed`); } if (r.exp !== void 0) { if (typeof r.exp != `number`) throw new vi(`"exp" claim must be a number`, r, `exp`, `invalid`); if (r.exp <= p - d) throw new yi(`"exp" claim timestamp check failed`, r, `exp`, `check_failed`); } if (l) { let e = p - r.iat, t = typeof l == `number` ? l : ya(l); if (e - d > t) throw new yi(`"iat" claim timestamp check failed (too far in the past)`, r, `iat`, `check_failed`); if (e < 0 - d) throw new vi(`"iat" claim timestamp check failed (it should be in the past)`, r, `iat`, `check_failed`); } return r; } async function Ca(e, t, n) { let r = await ga(e, t, n); if (r.protectedHeader.crit?.includes(`b64`) && r.protectedHeader.b64 === !1) throw new Ci(`JWTs MUST NOT use unencoded payload`); let i = { payload: Sa(r.protectedHeader, r.payload, n), protectedHeader: r.protectedHeader }; return typeof t == `function` ? { ...i, key: r.key } : i; } async function wa(e, t, n) { if (!Gi(e)) throw TypeError(`JWK must be an object`); let r; switch (t ??= e.alg, r ??= n?.extractable ?? e.ext, e.kty) { case `oct`: if (typeof e.k != `string` || !e.k) throw TypeError(`missing "k" (Key Value) Parameter value`); return gi(e.k); case `RSA`: if (`oth` in e && e.oth !== void 0) throw new xi(`RSA JWK "oth" (Other Primes Info) Parameter value is not supported`); return la({ ...e, alg: t, ext: r }); case `AKP`: if (typeof e.alg != `string` || !e.alg) throw TypeError(`missing "alg" (Algorithm) Parameter value`); if (t !== void 0 && t !== e.alg) throw TypeError(`JWK alg and alg option value mismatch`); return la({ ...e, ext: r }); case `EC`: case `OKP`: return la({ ...e, alg: t, ext: r }); default: throw new xi(`Unsupported "kty" (Key Type) Parameter value`); } } function Ta(e) { switch (typeof e == `string` && e.slice(0, 2)) { case `RS`: case `PS`: return `RSA`; case `ES`: return `EC`; case `Ed`: return `OKP`; case `ML`: return `AKP`; default: throw new xi(`Unsupported "alg" value for a JSON Web Key Set`); } } function Ea(e) { return e && typeof e == `object` && Array.isArray(e.keys) && e.keys.every(Da); } function Da(e) { return Gi(e); } var Oa = class { #e; #t = /* @__PURE__ */ new WeakMap(); constructor(e) { if (!Ea(e)) throw new wi(`JSON Web Key Set malformed`); this.#e = structuredClone(e); } jwks() { return this.#e; } async getKey(e, t) { let { alg: n, kid: r } = { ...e, ...t?.header }, i = Ta(n), a = this.#e.keys.filter((e) => { let t = i === e.kty; if (t && typeof r == `string` && (t = r === e.kid), t && (typeof e.alg == `string` || i === `AKP`) && (t = n === e.alg), t && typeof e.use == `string` && (t = e.use === `sig`), t && Array.isArray(e.key_ops) && (t = e.key_ops.includes(`verify`)), t) switch (n) { case `ES256`: t = e.crv === `P-256`; break; case `ES384`: t = e.crv === `P-384`; break; case `ES512`: t = e.crv === `P-521`; break; case `Ed25519`: case `EdDSA`: t = e.crv === `Ed25519`; break; } return t; }), { 0: o, length: s } = a; if (s === 0) throw new Ti(); if (s !== 1) { let e = new Ei(), t = this.#t; throw e[Symbol.asyncIterator] = async function* () { for (let e of a) try { yield await ka(t, e, n); } catch {} }, e; } return ka(this.#t, o, n); } }; async function ka(e, t, n) { let r = e.get(t) || e.set(t, {}).get(t); if (r[n] === void 0) { let e = await wa({ ...t, ext: !0 }, n); if (e instanceof Uint8Array || e.type !== `public`) throw new wi(`JSON Web Key Set members must be public keys`); r[n] = e; } return r[n]; } function Aa(e) { let t = new Oa(e), n = async (e, n) => t.getKey(e, n); return Object.defineProperties(n, { jwks: { value: () => structuredClone(t.jwks()), enumerable: !1, configurable: !1, writable: !1 } }), n; } function ja() { return typeof WebSocketPair < `u` || typeof navigator < `u` && navigator.userAgent === `Cloudflare-Workers` || typeof EdgeRuntime < `u` && EdgeRuntime === `vercel`; } let Ma; (typeof navigator > `u` || !navigator.userAgent?.startsWith?.(`Mozilla/5.0 `)) && (Ma = `jose/v6.2.3`); const Na = Symbol(); async function Pa(e, t, n, r = fetch) { let i = await r(e, { method: `GET`, signal: n, redirect: `manual`, headers: t }).catch((e) => { throw e.name === `TimeoutError` ? new Di() : e; }); if (i.status !== 200) throw new _i(`Expected 200 OK from the JSON Web Key Set HTTP response`); try { return await i.json(); } catch { throw new _i(`Failed to parse the JSON Web Key Set HTTP response as JSON`); } } const Fa = Symbol(); function Ia(e, t) { return !(typeof e != `object` || !e || !(`uat` in e) || typeof e.uat != `number` || Date.now() - e.uat >= t || !(`jwks` in e) || !Gi(e.jwks) || !Array.isArray(e.jwks.keys) || !Array.prototype.every.call(e.jwks.keys, Gi)); } var La = class { #e; #t; #n; #r; #i; #a; #o; #s; #c; #l; constructor(e, t) { if (!(e instanceof URL)) throw TypeError(`url must be an instance of URL`); this.#e = new URL(e.href), this.#t = typeof t?.timeoutDuration == `number` ? t?.timeoutDuration : 5e3, this.#n = typeof t?.cooldownDuration == `number` ? t?.cooldownDuration : 3e4, this.#r = typeof t?.cacheMaxAge == `number` ? t?.cacheMaxAge : 6e5, this.#o = new Headers(t?.headers), Ma && !this.#o.has(`User-Agent`) && this.#o.set(`User-Agent`, Ma), this.#o.has(`accept`) || (this.#o.set(`accept`, `application/json`), this.#o.append(`accept`, `application/jwk-set+json`)), this.#s = t?.[Na], t?.[Fa] !== void 0 && (this.#l = t?.[Fa], Ia(t?.[Fa], this.#r) && (this.#i = this.#l.uat, this.#c = Aa(this.#l.jwks))); } pendingFetch() { return !!this.#a; } coolingDown() { return typeof this.#i == `number` ? Date.now() < this.#i + this.#n : !1; } fresh() { return typeof this.#i == `number` ? Date.now() < this.#i + this.#r : !1; } jwks() { return this.#c?.jwks(); } async getKey(e, t) { (!this.#c || !this.fresh()) && await this.reload(); try { return await this.#c(e, t); } catch (n) { if (n instanceof Ti && this.coolingDown() === !1) return await this.reload(), this.#c(e, t); throw n; } } async reload() { this.#a && ja() && (this.#a = void 0), this.#a ||= Pa(this.#e.href, this.#o, AbortSignal.timeout(this.#t), this.#s).then((e) => { this.#c = Aa(e), this.#l && (this.#l.uat = Date.now(), this.#l.jwks = e), this.#i = Date.now(), this.#a = void 0; }).catch((e) => { throw this.#a = void 0, e; }), await this.#a; } }; function Ra(e, t) { let n = new La(e, t), r = async (e, t) => n.getKey(e, t); return Object.defineProperties(r, { coolingDown: { get: () => n.coolingDown(), enumerable: !0, configurable: !1 }, fresh: { get: () => n.fresh(), enumerable: !0, configurable: !1 }, reload: { value: () => n.reload(), enumerable: !0, configurable: !1, writable: !1 }, reloading: { get: () => n.pendingFetch(), enumerable: !0, configurable: !1 }, jwks: { value: () => n.jwks(), enumerable: !0, configurable: !1, writable: !1 } }), r; } function za(e) { if (typeof e != `string`) throw new Ci(`JWTs must use Compact JWS serialization, JWT must be a string`); let { 1: t, length: n } = e.split(`.`); if (n === 5) throw new Ci(`Only JWTs using Compact JWS serialization can be decoded`); if (n !== 3) throw new Ci(`Invalid JWT`); if (!t) throw new Ci(`JWTs must contain a payload`); let r; try { r = gi(t); } catch { throw new Ci(`Failed to base64url decode the payload`); } let i; try { i = JSON.parse(fi.decode(r)); } catch { throw new Ci(`Failed to parse the decoded payload as JSON`); } if (!Gi(i)) throw new Ci(`Invalid JWT Claims Set`); return i; } const Ba = `vercel-forwarded-host`; const Va = `vercel-forwarded-scheme`; const Ha = `vercel-forwarded-port`; const Ua = `vercel-forwarded-path`; const Wa = `vercel-sandbox-oidc-token`; const Ga = /* @__PURE__ */ new Map(); function Ka(e, t = qa) { return async function(n) { let r = new Headers(n.headers), i = r.get(Ba), a = r.get(Va), o = r.get(Ha), s = r.get(Ua), c = r.get(Wa); if (r.delete(Ba), r.delete(Va), r.delete(Ha), r.delete(Ua), r.delete(Wa), !i || !a || !o || !s || !c) return t(n, Error(`Missing required proxy headers`)); let l; try { l = new Request(Ja(a, i, o, s), { method: n.method, body: n.body, headers: r, duplex: `half` }); } catch { return t(new Request(n, { headers: r }), Error(`Invalid proxied request URL`)); } l.headers.set(`host`, i); try { let t = Ya(new URL(n.url), s), r = await Qa(c, t), i = Za(t.host, r); return e(l, i); } catch (e) { return t(l, e instanceof Error ? e : Error(`Invalid OIDC token`)); } }; } function qa() { return new Response(`Forbidden`, { status: 403 }); } function Ja(e, t, n, r) { let i = `${e}://${t}:${n}`; return r === `/` ? i : `${i}${r}`; } function Ya(e, t) { let n = Xa(new URL(t, e.origin).pathname), r = new URL(e); return r.pathname = Xa(r.pathname), n !== `/` && r.pathname.endsWith(n) && (r.pathname = Xa(r.pathname.slice(0, -n.length))), r; } function Xa(e) { return e.replace(/\/+$/, ``) || `/`; } function Za(e, t) { let n = to(t, `team_id`), r = to(t, `project_id`), i = to(t, `sandbox_id`), a = to(t, `sandbox_name`) ?? i; if (!n || !r || !i || !a) throw Error(`Missing required claims in OIDC token`); return { host: e, teamId: n, projectId: r, sandboxId: i, sandboxName: a }; } async function Qa(e, t) { let n = to(za(e), `iss`); if (!n) throw Error(`Missing OIDC issuer`); let r; try { r = new URL(n); } catch { throw Error(`Invalid OIDC issuer`); } if (r.protocol !== `https:` || r.hostname !== `oidc.vercel.com`) throw Error(`Invalid OIDC issuer`); let { payload: i } = await Ca(e, eo(n), { audience: $a(t), algorithms: [`RS256`], clockTolerance: 60, issuer: n }); return i; } function $a(e) { let t = Xa(e.pathname); return t === `/` ? e.origin : e.origin + t; } function eo(e) { let t = Ga.get(e); if (t) return t; let n = Ra(new URL(`${e.replace(/\/$/, ``)}/.well-known/jwks`)); return Ga.set(e, n), n; } function to(e, t) { let n = e[t]; if (typeof n == `string` && n) return n; } //#endregion //#region node_modules/eve/dist/src/compiled/@workflow/core/index.js var core_exports = /* @__PURE__ */ __exportAll({ FatalError: () => D$10, experimental_setAttributes: () => C$1, getWorkflowMetadata: () => T$1 }); async function C$1(e, n = {}) { let i = Vb.getStore(), o = i?.workflowMetadata?.workflowRunId; if (!o) throw new D$10(`experimental_setAttributes() must be called from a 'use workflow' or 'use step' function. Calling it from plain host code is not supported.`); let s = vS(e, n); s.length !== 0 && await (await T_$1()).events.create(o, { eventType: `attr_set`, specVersion: 5, eventData: { changes: s, writer: { type: `step`, stepId: i.stepMetadata.stepId, attempt: i.stepMetadata.attempt }, ...n.allowReservedAttributes === !0 ? { allowReservedAttributes: !0 } : {} } }); } function T$1() { let e = Vb.getStore(); return e || je$8(`getWorkflowMetadata()`, `https://workflow-sdk.dev/docs/api-reference/workflow/get-workflow-metadata`, T$1), e.workflowMetadata; } //#endregion //#region node_modules/eve/dist/src/compiled/_chunks/node/auth-DF_ft5ea.js var auth_DF_ft5ea_exports = /* @__PURE__ */ __exportAll({ NotOk: () => G$1, OAuth: () => R, getAuth: () => O, inferScope: () => ie, isOAuthError: () => U, pollForToken: () => W, updateAuthConfig: () => k }); const b$1 = { invalid_type: `invalid_type`, too_big: `too_big`, too_small: `too_small`, invalid_format: `invalid_format`, not_multiple_of: `not_multiple_of`, unrecognized_keys: `unrecognized_keys`, invalid_union: `invalid_union`, invalid_key: `invalid_key`, invalid_element: `invalid_element`, invalid_value: `invalid_value`, custom: `custom` }; var ee$1; ee$1 ||= {}; const x = Mi$1().transform((e, t) => { try { return JSON.parse(e); } catch (e) { return t.addIssue({ code: b$1.custom, message: `Invalid JSON: ${e.message}` }), t$1; } }); var S = c$3(((e, n) => { let r = p$4(`os`), i = p$4(`path`), a = /^win/i.test(process.platform); function o(e) { return i.normalize(i.join(e, `.`)); } let s = () => { let { env: e } = process, t = {}; return t.home = () => o(r.homedir ? r.homedir() : e.HOME), t.temp = () => o(r.tmpdir ? r.tmpdir() : e.TMPDIR || e.TEMP || e.TMP), t; }, c = () => { let { env: e } = process, t = {}; return t.home = () => o(r.homedir ? r.homedir() : e.USERPROFILE || i.join(e.HOMEDRIVE, e.HOMEPATH) || e.HOME), t.temp = () => o(r.tmpdir ? r.tmpdir() : e.TEMP || e.TMP || i.join(e.LOCALAPPDATA || e.SystemRoot || e.windir, `Temp`)), t; }; n.exports = new class e { constructor() { let t = function() { return new e(); }; this._fn = t; let n = a ? c() : s(); return Object.keys(n).forEach((e) => { this._fn[e] = n[e]; }), this._fn; } }(); })); var C = c$3(((e, n) => { let r = p$4(`path`), i = S(), a = () => { let e = {}; return e.cache = () => process.env.XDG_CACHE_HOME || r.join(i.home() || i.temp(), `.cache`), e.config = () => process.env.XDG_CONFIG_HOME || r.join(i.home() || i.temp(), `.config`), e.data = () => process.env.XDG_DATA_HOME || r.join(i.home() || i.temp(), `.local`, `share`), e.runtime = () => process.env.XDG_RUNTIME_DIR || void 0, e.state = () => process.env.XDG_STATE_HOME || r.join(i.home() || i.temp(), `.local`, `state`), e; }, o = () => { let e = {}; return e.cache = () => process.env.XDG_CACHE_HOME || r.join(r.join(i.home() || i.temp(), `Library`), `Caches`), e.config = () => process.env.XDG_CONFIG_HOME || r.join(r.join(i.home() || i.temp(), `Library`), `Preferences`), e.data = () => process.env.XDG_DATA_HOME || r.join(r.join(i.home() || i.temp(), `Library`), `Application Support`), e.runtime = () => process.env.XDG_RUNTIME_DIR || void 0, e.state = () => process.env.XDG_STATE_HOME || r.join(r.join(i.home() || i.temp(), `Library`), `State`), e; }, s = () => { let e = {}; return e.cache = () => { let e = process.env.LOCALAPPDATA || r.join(i.home() || i.temp(), `AppData`, `Local`); return process.env.XDG_CACHE_HOME || r.join(e, `xdg.cache`); }, e.config = () => { let e = process.env.APPDATA || r.join(i.home() || i.temp(), `AppData`, `Roaming`); return process.env.XDG_CONFIG_HOME || r.join(e, `xdg.config`); }, e.data = () => { let e = process.env.APPDATA || r.join(i.home() || i.temp(), `AppData`, `Roaming`); return process.env.XDG_DATA_HOME || r.join(e, `xdg.data`); }, e.runtime = () => process.env.XDG_RUNTIME_DIR || void 0, e.state = () => { let e = process.env.LOCALAPPDATA || r.join(i.home() || i.temp(), `AppData`, `Local`); return process.env.XDG_STATE_HOME || r.join(e, `xdg.state`); }, e; }, c = () => { let e = function() { return c(); }, t = {}; return t = /^darwin$/i.test(process.platform) ? o() : /^win/i.test(process.platform) ? s() : a(), t.configDirs = () => { let e = []; return e.push(t.config()), process.env.XDG_CONFIG_DIRS && e.push(...process.env.XDG_CONFIG_DIRS.split(r.delimiter)), e; }, t.dataDirs = () => { let e = []; return e.push(t.data()), process.env.XDG_DATA_DIRS && e.push(...process.env.XDG_DATA_DIRS.split(r.delimiter)), e; }, Object.keys(t).forEach((n) => { e[n] = t[n]; }), e; }; n.exports = c(); })); var w$1 = d$3(c$3(((e, n) => { let r = p$4(`path`), i = p$4(`os`), a = C(), o = /^win/i.test(process.platform); function s(e, t) { if (e ||= {}, typeof e != `object` && (e = { isolated: e }), e.isolated = e.isolated === void 0 || e.isolated === null ? t : e.isolated, typeof e.isolated != `boolean`) throw TypeError(`Expected boolean for "isolated" argument, got ${typeof e.isolated}`); return e; } let c = (e, t) => { let n = {}; return n.cache = (n = { isolated: null }) => (n = s(n, t), r.join(a.cache(), n.isolated ? e : ``)), n.config = (n = { isolated: null }) => (n = s(n, t), r.join(a.config(), n.isolated ? e : ``)), n.data = (n = { isolated: null }) => (n = s(n, t), r.join(a.data(), n.isolated ? e : ``)), n.runtime = (n = { isolated: null }) => (n = s(n, t), a.runtime() ? r.join(a.runtime(), n.isolated ? e : ``) : void 0), n.state = (n = { isolated: null }) => (n = s(n, t), r.join(a.state(), n.isolated ? e : ``)), n.configDirs = (n = { isolated: null }) => (n = s(n, t), a.configDirs().map((t) => r.join(t, n.isolated ? e : ``))), n.dataDirs = (n = { isolated: null }) => (n = s(n, t), a.dataDirs().map((t) => r.join(t, n.isolated ? e : ``))), n; }, l = (e, t) => { let { env: n } = process, o = i.homedir(), c = i.tmpdir(), l = n.APPDATA || r.join(o || c, `AppData`, `Roaming`), u = n.LOCALAPPDATA || r.join(o || c, `AppData`, `Local`), d = {}; return d.cache = (i = { isolated: null }) => (i = s(i, t), !i.isolated || n.XDG_CACHE_HOME ? r.join(a.cache(), i.isolated ? e : ``) : r.join(u, i.isolated ? e : ``, `Cache`)), d.config = (i = { isolated: null }) => (i = s(i, t), !i.isolated || n.XDG_CONFIG_HOME ? r.join(a.config(), i.isolated ? e : ``) : r.join(l, i.isolated ? e : ``, `Config`)), d.data = (i = { isolated: null }) => (i = s(i, t), !i.isolated || n.XDG_DATA_HOME ? r.join(a.data(), i.isolated ? e : ``) : r.join(l, i.isolated ? e : ``, `Data`)), d.runtime = (n = { isolated: null }) => (n = s(n, t), a.runtime() ? r.join(a.runtime(), n.isolated ? e : ``) : void 0), d.state = (i = { isolated: null }) => (i = s(i, t), !i.isolated || n.XDG_STATE_HOME ? r.join(a.state(), i.isolated ? e : ``) : r.join(u, i.isolated ? e : ``, `State`)), d.configDirs = (i = { isolated: null }) => { i = s(i, t); let a = [d.config(i)]; return n.XDG_CONFIG_DIRS && a.push(...n.XDG_CONFIG_DIRS.split(r.delimiter).map((t) => r.join(t, i.isolated ? e : ``))), a; }, d.dataDirs = (i = { isolated: null }) => { i = s(i, t); let a = [d.data(i)]; return n.XDG_DATA_DIRS && a.push(...n.XDG_DATA_DIRS.split(r.delimiter).map((t) => r.join(t, i.isolated ? e : ``))), a; }, d; }; n.exports = new class e { constructor(n = { name: null, suffix: null, isolated: !0 }) { let i = function(t = { name: null, suffix: null, isolated: !0 }) { return new e(t); }; this._fn = i, n ||= {}, typeof n != `object` && (n = { name: n }); let a = n.name || ``; if (typeof a != `string`) throw TypeError(`Expected string for "name" argument, got ${typeof a}`); let s = n.suffix || ``; if (typeof s != `string`) throw TypeError(`Expected string for "suffix" argument, got ${typeof s}`); let u = n.isolated === void 0 || n.isolated === null ? !0 : n.isolated; if (typeof u != `boolean`) throw TypeError(`Expected boolean for "isolated" argument, got ${typeof u}`); a ||= r.parse(process.pkg ? process.execPath : p$4.main ? p$4.main.filename : process.argv[0]).name, s && (a += s), this._fn.$name = () => a, this._fn.$isolated = () => u; let d = o ? l(a, u) : c(a, u); return Object.keys(d).forEach((e) => { this._fn[e] = d[e]; }), this._fn; } }(); }))(), 1); const T = Qi$1().transform((e) => /* @__PURE__ */ new Date(e * 1e3)); const E$1 = da$1({ token: Mi$1().min(1).optional(), refreshToken: Mi$1().min(1).optional(), expiresAt: T.optional() }); const te = x.pipe(E$1); const ne = (e) => { try { return g.lstatSync(e).isDirectory(); } catch { return !1; } }; const D = () => { if (process.env.VERCEL_AUTH_CONFIG_DIR) return process.env.VERCEL_AUTH_CONFIG_DIR; let e = (0, w$1.default)(`com.vercel.cli`).dataDirs(); return [ ...e, G.join(homedir(), `.now`), ...(0, w$1.default)(`now`).dataDirs() ].find((e) => ne(e)) || e[0]; }; const O = () => { try { let e = G.join(D(), `auth.json`); return te.parse(g.readFileSync(e, `utf8`)); } catch { return null; } }; function k(e) { let t = G.join(D(), `auth.json`); g.mkdirSync(G.dirname(t), { recursive: !0 }); let n = { token: e.token, expiresAt: e.expiresAt && Math.round(e.expiresAt.getTime() / 1e3), refreshToken: e.refreshToken }; g.writeFileSync(t, JSON.stringify(n) + ` `); } const A = `${E.hostname()} @ vercel/sandbox/${qa$1} node-${process.version} ${E.platform()} (${E.arch()})`; const j = new URL(`https://vercel.com`); const M = `cl_HYyOPBNtFMfHhaUn9L4QPfTZz6TP47bp`; const N = da$1({ issuer: Mi$1().url(), device_authorization_endpoint: Mi$1().url(), token_endpoint: Mi$1().url(), revocation_endpoint: Mi$1().url(), jwks_uri: Mi$1().url(), introspection_endpoint: Mi$1().url() }); let P; const F = da$1({ device_code: Mi$1(), user_code: Mi$1(), verification_uri: Mi$1().url(), verification_uri_complete: Mi$1().url(), expires_in: Qi$1(), interval: Qi$1() }); const I = da$1({ active: Ca$1(!0), client_id: Mi$1(), session_id: Mi$1() }).or(da$1({ active: Ca$1(!1) })); async function L() { if (P) return P; let e = await fetch(new URL(`.well-known/openid-configuration`, j), { headers: { "Content-Type": `application/json`, "user-agent": A } }); return P = N.parse(await e.json()), P; } async function R() { let e = await L(); return { async deviceAuthorizationRequest() { let t = await (await fetch(e.device_authorization_endpoint, { method: `POST`, headers: { "Content-Type": `application/x-www-form-urlencoded`, "user-agent": A }, body: new URLSearchParams({ client_id: M, scope: `openid offline_access` }) })).json(), n = F.safeParse(t); if (!n.success) throw new H(`Failed to parse device authorization response from the Vercel authorization server.`, t); return { device_code: n.data.device_code, user_code: n.data.user_code, verification_uri: n.data.verification_uri, verification_uri_complete: n.data.verification_uri_complete, expiresAt: Date.now() + n.data.expires_in * 1e3, interval: n.data.interval }; }, async deviceAccessTokenRequest(t) { try { return [null, await fetch(e.token_endpoint, { method: `POST`, headers: { "Content-Type": `application/x-www-form-urlencoded`, "user-agent": A }, body: new URLSearchParams({ client_id: M, grant_type: `urn:ietf:params:oauth:grant-type:device_code`, device_code: t }), signal: AbortSignal.timeout(10 * 1e3) })]; } catch (e) { return e instanceof Error ? [e] : [Error(`An unknown error occurred. See the logs for details.`, { cause: e })]; } }, async processTokenResponse(e) { let t = await e.json(), n = z.safeParse(t); return n.success ? [null, n.data] : [new H(`Failed to parse token response from the Vercel authorization server.`, t)]; }, async revokeToken(t) { let n = await fetch(e.revocation_endpoint, { method: `POST`, headers: { "Content-Type": `application/x-www-form-urlencoded`, "user-agent": A }, body: new URLSearchParams({ token: t, client_id: M }) }); if (!n.ok) return new H(`Revocation request failed`, await n.json()); }, async refreshToken(t) { let n = await fetch(e.token_endpoint, { method: `POST`, headers: { "Content-Type": `application/x-www-form-urlencoded`, "user-agent": A }, body: new URLSearchParams({ client_id: M, grant_type: `refresh_token`, refresh_token: t }) }), [r, i] = await this.processTokenResponse(n); if (r) throw r; return i; }, async introspectToken(t) { let n = await (await fetch(e.introspection_endpoint, { method: `POST`, headers: { "Content-Type": `application/x-www-form-urlencoded`, "user-agent": A }, body: new URLSearchParams({ token: t }) })).json(), r = I.safeParse(n); if (!r.success) throw new H(`Failed to parse introspection response from the Vercel authorization server.`, n); return r.data; } }; } const z = da$1({ access_token: Mi$1(), token_type: Ca$1(`Bearer`), expires_in: Qi$1(), refresh_token: Mi$1().optional(), scope: Mi$1().optional() }); const B = da$1({ error: xa$1([ `invalid_request`, `invalid_client`, `invalid_grant`, `unauthorized_client`, `unsupported_grant_type`, `invalid_scope`, `server_error`, `authorization_pending`, `slow_down`, `access_denied`, `expired_token`, `unsupported_token_type` ]), error_description: Mi$1().optional(), error_uri: Mi$1().optional() }); function V(e) { try { return B.parse(e); } catch (e) { return e instanceof gi$1 ? TypeError(`Invalid OAuth error response: ${e.message}`) : TypeError(`Failed to parse OAuth error response`); } } var H = class extends Error { constructor(e, t) { super(e), this.name = `OAuthError`; let n = V(t); if (n instanceof TypeError) { this.cause = Error(`Unexpected response from the Vercel authorization server.`), this.code = `server_error`; return; } let r = n.error; n.error_description && (r += `: ${n.error_description}`), n.error_uri && (r += ` (${n.error_uri})`), this.cause = Error(r), this.code = n.error; } }; function U(e) { return e instanceof H; } async function* W({ request: e, oauth: t }) { let n = new AbortController(); try { let r = e.interval * 1e3; for (; Date.now() < e.expiresAt;) { let [i, a] = await t.deviceAccessTokenRequest(e.device_code); if (i) { if (i.message.includes(`timeout`)) { r *= 2, yield { _tag: `Timeout`, newInterval: r }, await setTimeout$1(r, { signal: n.signal }); continue; } yield { _tag: `Error`, error: i }; return; } yield { _tag: `Response`, response: a.clone() }; let [o, s] = await t.processTokenResponse(a); if (U(o)) { let { code: e } = o; switch (e) { case `authorization_pending`: await setTimeout$1(r, { signal: n.signal }); continue; case `slow_down`: r += 5 * 1e3, yield { _tag: `SlowDown`, newInterval: r }, await setTimeout$1(r, { signal: n.signal }); continue; default: yield { _tag: `Error`, error: o.cause }; return; } } if (o) { yield { _tag: `Error`, error: o }; return; } k({ token: s.access_token, expiresAt: new Date(Date.now() + s.expires_in * 1e3), refreshToken: s.refresh_token }); return; } yield { _tag: `Error`, error: Error(`Timed out waiting for authentication. Please try again.`) }; return; } finally { n.abort(); } } var G$1 = class extends Error { constructor(e) { super(`HTTP ${e.statusCode}: ${e.responseText}`), this.name = `NotOk`, this.response = e; } }; async function K(e) { let t = await fetch(`https://vercel.com/api${e.endpoint}`, { method: e.method, body: e.body, headers: { Authorization: `Bearer ${e.token}`, "Content-Type": `application/json` } }); if (!t.ok) { let e = await t.text(); try { let { error: t } = JSON.parse(e); e = `${t.code.toUpperCase()}: ${t.message}`; } catch {} throw new G$1({ responseText: e, statusCode: t.status }); } return await t.json(); } const q = x.pipe(da$1({ projectId: Mi$1(), orgId: Mi$1() })); async function J(e) { let t = p$2.join(e, `.vercel`, `project.json`), n; try { n = await v$1.readFile(t, `utf-8`); } catch { return null; } let r = q.safeParse(n); return r.success ? { projectId: r.data.projectId, teamId: r.data.orgId } : null; } const Y = da$1({ user: da$1({ defaultTeamId: Mi$1().nullable(), username: Mi$1() }) }); const X = da$1({ id: Mi$1(), slug: Mi$1(), updatedAt: Qi$1().optional(), membership: da$1({ role: Mi$1() }), billing: da$1({ plan: Mi$1() }) }); const re = da$1({ teams: la$1($$2()).transform((e) => e.flatMap((e) => { let t = X.safeParse(e); return t.success ? [t.data] : []; })), pagination: da$1({ count: Qi$1(), next: Qi$1().nullable() }) }); const Z = `vercel-sandbox-default-project`; function Q(e) { return e instanceof G$1 && (e.response.statusCode === 402 || e.response.statusCode === 403); } async function ie(e) { let t = await J(e.cwd ?? process.cwd()); if (t) { let n = await ae(e.token, t.teamId, t.projectId); return { ...t, created: !1, ...n }; } if (e.teamId) return $(e.token, e.teamId); let { defaultTeamId: n, username: r } = (await K({ token: e.token, endpoint: `/v2/user` }).then(Y.parse)).user; if (n) try { let t = await $(e.token, n); try { let r = await K({ token: e.token, endpoint: `/v2/teams/${encodeURIComponent(n)}` }).then(da$1({ slug: Mi$1() }).parse); return { ...t, teamSlug: r.slug }; } catch { return t; } } catch (e) { if (!Q(e)) throw e; } let a = null; do { let t = a === null ? `/v2/teams?limit=20` : `/v2/teams?limit=20&until=${a}`, i = await K({ token: e.token, endpoint: t }).then(re.parse); a = i.pagination.next; let o = i.teams.filter((e) => e.membership.role === `OWNER` && e.billing.plan === `hobby`); if (o.length === 0) continue; let s = o.find((e) => e.slug === r) ?? o.sort((e, t) => (t.updatedAt ?? 0) - (e.updatedAt ?? 0))[0]; if (s && s.id !== n) try { return { ...await $(e.token, s.id), teamSlug: s.slug }; } catch (e) { if (!Q(e)) throw e; } } while (a !== null); try { return { ...await $(e.token, r), teamSlug: r }; } catch (e) { if (!Q(e)) throw e; } throw new G$1({ statusCode: 403, responseText: `Authenticated as "${r}" but none of the available teams allow sandbox creation.` }); } async function $(e, t) { let n = t.startsWith(`team_`) ? `teamId=${encodeURIComponent(t)}` : `slug=${encodeURIComponent(t)}`, r = !1; try { await K({ token: e, endpoint: `/v2/projects/vercel-sandbox-default-project?${n}` }); } catch (t) { if (!(t instanceof G$1) || t.response.statusCode !== 404) throw t; await K({ token: e, endpoint: `/v11/projects?${n}`, method: `POST`, body: JSON.stringify({ name: Z }) }), r = !0; } return { projectId: Z, teamId: t, created: r }; } async function ae(e, t, n) { try { let r = t.startsWith(`team_`) ? `teamId=${encodeURIComponent(t)}` : `slug=${encodeURIComponent(t)}`, [a, o] = await Promise.all([K({ token: e, endpoint: `/v2/teams/${encodeURIComponent(t)}` }).then(da$1({ slug: Mi$1() }).parse), K({ token: e, endpoint: `/v2/projects/${encodeURIComponent(n)}?${r}` }).then(da$1({ name: Mi$1() }).parse)]); return { teamSlug: a.slug, projectSlug: o.name }; } catch { return {}; } } //#endregion //#region node_modules/eve/dist/src/compiled/_chunks/node/token-ORseRyWn.js var token_ORseRyWn_exports = /* @__PURE__ */ __exportAll({ default: () => token_ORseRyWn_default }); var r$3 = c$3(((e, r) => { var i = Object.defineProperty, a = Object.getOwnPropertyDescriptor, o = Object.getOwnPropertyNames, s = Object.prototype.hasOwnProperty, c = (e, t) => { for (var n in t) i(e, n, { get: t[n], enumerable: !0 }); }, l = (e, t, n, r) => { if (t && typeof t == `object` || typeof t == `function`) for (let c of o(t)) !s.call(e, c) && c !== n && i(e, c, { get: () => t[c], enumerable: !(r = a(t, c)) || r.enumerable }); return e; }, u = (e) => l(i({}, `__esModule`, { value: !0 }), e), d = {}; c(d, { refreshToken: () => m }), r.exports = u(d); var f = $n(), p = ar(); async function m(e) { let t = e?.project, n = e?.team; if (!t && !n) { let e = (0, p.findProjectInfo)(); t = e.projectId, n = e.teamId; } else if (!t || !n) { let e = (0, p.findProjectInfo)(); t ??= e.projectId, n ??= e.teamId; } if (!t) throw new f.VercelOidcTokenError("Failed to refresh OIDC token: No project specified. Try re-linking your project with `vc link`"); let r = (0, p.loadToken)(t); if (!r || (0, p.isExpired)((0, p.getTokenPayload)(r.token), e?.expirationBufferMs)) { let i = await (0, p.getVercelToken)({ expirationBufferMs: e?.expirationBufferMs }); if (r = await (0, p.getVercelOidcToken)(i, t, n), !r) throw new f.VercelOidcTokenError(`Failed to refresh OIDC token`); (0, p.saveToken)(r, t); } process.env.VERCEL_OIDC_TOKEN = r.token; } })); var token_ORseRyWn_default = r$3(); //#endregion //#region node_modules/eve/dist/src/compiled/_chunks/workflow/functions-CnVBREsg.js var functions_CnVBREsg_exports = /* @__PURE__ */ __exportAll({ default: () => functions_CnVBREsg_default }); var t = c$12(((e, t) => { var n = Object.defineProperty, r = Object.getOwnPropertyDescriptor, i = Object.getOwnPropertyNames, a = Object.prototype.hasOwnProperty, o = (e, t) => { for (var r in t) n(e, r, { get: t[r], enumerable: !0 }); }, s = (e, t, o, s) => { if (t && typeof t == `object` || typeof t == `function`) for (let c of i(t)) !a.call(e, c) && c !== o && n(e, c, { get: () => t[c], enumerable: !(s = r(t, c)) || s.enumerable }); return e; }, c = (e) => s(n({}, `__esModule`, { value: !0 }), e), l = {}; o(l, { CITY_HEADER_NAME: () => u, COUNTRY_HEADER_NAME: () => d, EMOJI_FLAG_UNICODE_STARTING_POSITION: () => v, IP_HEADER_NAME: () => f, LATITUDE_HEADER_NAME: () => p, LONGITUDE_HEADER_NAME: () => m, POSTAL_CODE_HEADER_NAME: () => g, REGION_HEADER_NAME: () => h, REQUEST_ID_HEADER_NAME: () => _, geolocation: () => w, ipAddress: () => S }), t.exports = c(l); let u = `x-vercel-ip-city`, d = `x-vercel-ip-country`, f = `x-real-ip`, p = `x-vercel-ip-latitude`, m = `x-vercel-ip-longitude`, h = `x-vercel-ip-country-region`, g = `x-vercel-ip-postal-code`, _ = `x-vercel-id`, v = 127397; function y(e, t) { return e.get(t) ?? void 0; } function b(e, t) { let n = y(e.headers, t); return n ? decodeURIComponent(n) : void 0; } function x(e) { let t = RegExp(`^[A-Z]{2}$`).test(e); if (!(!e || !t)) return String.fromCodePoint(...e.split(``).map((e) => v + e.charCodeAt(0))); } function S(e) { return y(`headers` in e ? e.headers : e, f); } function C(e) { return e ? e.split(`:`)[0] : `dev1`; } function w(e) { return { city: b(e, u), country: y(e.headers, d), flag: x(y(e.headers, d)), countryRegion: y(e.headers, h), region: C(y(e.headers, _)), latitude: y(e.headers, p), longitude: y(e.headers, m), postalCode: y(e.headers, g) }; } })); var n = c$12(((e, t) => { var n = Object.defineProperty, r = Object.getOwnPropertyDescriptor, i = Object.getOwnPropertyNames, a = Object.prototype.hasOwnProperty, o = (e, t) => { for (var r in t) n(e, r, { get: t[r], enumerable: !0 }); }, s = (e, t, o, s) => { if (t && typeof t == `object` || typeof t == `function`) for (let c of i(t)) !a.call(e, c) && c !== o && n(e, c, { get: () => t[c], enumerable: !(s = r(t, c)) || s.enumerable }); return e; }, c = (e) => s(n({}, `__esModule`, { value: !0 }), e), l = {}; o(l, { getEnv: () => u }), t.exports = c(l); let u = (e = process.env) => ({ VERCEL: d(e, `VERCEL`), CI: d(e, `CI`), VERCEL_ENV: d(e, `VERCEL_ENV`), VERCEL_URL: d(e, `VERCEL_URL`), VERCEL_BRANCH_URL: d(e, `VERCEL_BRANCH_URL`), VERCEL_PROJECT_PRODUCTION_URL: d(e, `VERCEL_PROJECT_PRODUCTION_URL`), VERCEL_REGION: d(e, `VERCEL_REGION`), VERCEL_DEPLOYMENT_ID: d(e, `VERCEL_DEPLOYMENT_ID`), VERCEL_SKEW_PROTECTION_ENABLED: d(e, `VERCEL_SKEW_PROTECTION_ENABLED`), VERCEL_AUTOMATION_BYPASS_SECRET: d(e, `VERCEL_AUTOMATION_BYPASS_SECRET`), VERCEL_GIT_PROVIDER: d(e, `VERCEL_GIT_PROVIDER`), VERCEL_GIT_REPO_SLUG: d(e, `VERCEL_GIT_REPO_SLUG`), VERCEL_GIT_REPO_OWNER: d(e, `VERCEL_GIT_REPO_OWNER`), VERCEL_GIT_REPO_ID: d(e, `VERCEL_GIT_REPO_ID`), VERCEL_GIT_COMMIT_REF: d(e, `VERCEL_GIT_COMMIT_REF`), VERCEL_GIT_COMMIT_SHA: d(e, `VERCEL_GIT_COMMIT_SHA`), VERCEL_GIT_COMMIT_MESSAGE: d(e, `VERCEL_GIT_COMMIT_MESSAGE`), VERCEL_GIT_COMMIT_AUTHOR_LOGIN: d(e, `VERCEL_GIT_COMMIT_AUTHOR_LOGIN`), VERCEL_GIT_COMMIT_AUTHOR_NAME: d(e, `VERCEL_GIT_COMMIT_AUTHOR_NAME`), VERCEL_GIT_PREVIOUS_SHA: d(e, `VERCEL_GIT_PREVIOUS_SHA`), VERCEL_GIT_PULL_REQUEST_ID: d(e, `VERCEL_GIT_PULL_REQUEST_ID`) }), d = (e, t) => { let n = e[t]; return n === `` ? void 0 : n; }; })); var r$2 = c$12(((e, t) => { var n = Object.defineProperty, r = Object.getOwnPropertyDescriptor, i = Object.getOwnPropertyNames, a = Object.prototype.hasOwnProperty, o = (e, t) => { for (var r in t) n(e, r, { get: t[r], enumerable: !0 }); }, s = (e, t, o, s) => { if (t && typeof t == `object` || typeof t == `function`) for (let c of i(t)) !a.call(e, c) && c !== o && n(e, c, { get: () => t[c], enumerable: !(s = r(t, c)) || s.enumerable }); return e; }, c = (e) => s(n({}, `__esModule`, { value: !0 }), e), l = {}; o(l, { SYMBOL_FOR_REQ_CONTEXT: () => u, getContext: () => d }), t.exports = c(l); let u = Symbol.for(`@vercel/request-context`); function d() { return globalThis[u]?.get?.() ?? {}; } })); var i$1 = c$12(((e, t) => { var n = Object.defineProperty, i = Object.getOwnPropertyDescriptor, a = Object.getOwnPropertyNames, o = Object.prototype.hasOwnProperty, s = (e, t) => { for (var r in t) n(e, r, { get: t[r], enumerable: !0 }); }, c = (e, t, r, s) => { if (t && typeof t == `object` || typeof t == `function`) for (let c of a(t)) !o.call(e, c) && c !== r && n(e, c, { get: () => t[c], enumerable: !(s = i(t, c)) || s.enumerable }); return e; }, l = (e) => c(n({}, `__esModule`, { value: !0 }), e), u = {}; s(u, { waitUntil: () => f }), t.exports = l(u); var d = r$2(); let f = (e) => { if (typeof e != `object` || !e || typeof e.then != `function`) throw TypeError(`waitUntil can only be called with a Promise, got ${typeof e}`); return (0, d.getContext)().waitUntil?.(e); }; })); var a$1 = c$12(((e, t) => { var n = Object.defineProperty, r = Object.getOwnPropertyDescriptor, i = Object.getOwnPropertyNames, a = Object.prototype.hasOwnProperty, o = (e, t) => { for (var r in t) n(e, r, { get: t[r], enumerable: !0 }); }, s = (e, t, o, s) => { if (t && typeof t == `object` || typeof t == `function`) for (let c of i(t)) !a.call(e, c) && c !== o && n(e, c, { get: () => t[c], enumerable: !(s = r(t, c)) || s.enumerable }); return e; }, c = (e) => s(n({}, `__esModule`, { value: !0 }), e), l = {}; o(l, { next: () => f, rewrite: () => d }), t.exports = c(l); function u(e, t) { if (e?.request?.headers) { if (!(e.request.headers instanceof Headers)) throw Error(`request.headers must be an instance of Headers`); let n = []; for (let [r, i] of e.request.headers) t.set(`x-middleware-request-` + r, i), n.push(r); t.set(`x-middleware-override-headers`, n.join(`,`)); } } function d(e, t) { let n = new Headers(t?.headers ?? {}); return n.set(`x-middleware-rewrite`, String(e)), u(t, n), new Response(null, { ...t, headers: n }); } function f(e) { let t = new Headers(e?.headers ?? {}); return t.set(`x-middleware-next`, `1`), u(e, t), new Response(null, { ...e, headers: t }); } })); var o$1 = c$12(((e, t) => { var n = Object.defineProperty, r = Object.getOwnPropertyDescriptor, i = Object.getOwnPropertyNames, a = Object.prototype.hasOwnProperty, o = (e, t) => { for (var r in t) n(e, r, { get: t[r], enumerable: !0 }); }, s = (e, t, o, s) => { if (t && typeof t == `object` || typeof t == `function`) for (let c of i(t)) !a.call(e, c) && c !== o && n(e, c, { get: () => t[c], enumerable: !(s = r(t, c)) || s.enumerable }); return e; }, c = (e) => s(n({}, `__esModule`, { value: !0 }), e), l = {}; o(l, { InMemoryCache: () => u }), t.exports = c(l); var u = class { constructor() { this.cache = {}; } async get(e) { let t = this.cache[e]; return t ? t.ttl && t.lastModified + t.ttl * 1e3 < Date.now() ? (await this.delete(e), null) : JSON.parse(t.value) : null; } async set(e, t, n) { let r = JSON.stringify(t ?? null); this.cache[e] = { value: r, lastModified: Date.now(), ttl: n?.ttl, tags: new Set(n?.tags || []) }; } async delete(e) { delete this.cache[e]; } async expireTag(e) { let t = Array.isArray(e) ? e : [e]; for (let e in this.cache) if (Object.prototype.hasOwnProperty.call(this.cache, e)) { let n = this.cache[e]; t.some((e) => n.tags.has(e)) && delete this.cache[e]; } } }; })); var s$1 = c$12(((e, t) => { var n = Object.defineProperty, r = Object.getOwnPropertyDescriptor, i = Object.getOwnPropertyNames, a = Object.prototype.hasOwnProperty, o = (e, t) => { for (var r in t) n(e, r, { get: t[r], enumerable: !0 }); }, s = (e, t, o, s) => { if (t && typeof t == `object` || typeof t == `function`) for (let c of i(t)) !a.call(e, c) && c !== o && n(e, c, { get: () => t[c], enumerable: !(s = r(t, c)) || s.enumerable }); return e; }, l = (e) => s(n({}, `__esModule`, { value: !0 }), e), u = {}; o(u, { BuildCache: () => f }), t.exports = l(u); var d = c$1(), f = class { constructor({ endpoint: e, headers: t, onError: n, timeout: r = 500 }) { this.get = async (e) => { let t = new AbortController(), n = setTimeout(() => t.abort(), this.timeout); try { let r = await fetch(`${this.endpoint}${e}`, { headers: this.headers, method: `GET`, signal: t.signal }); if (r.status === 404) return clearTimeout(n), null; if (r.status === 200) { if (r.headers.get(d.HEADERS_VERCEL_CACHE_STATE) !== d.PkgCacheState.Fresh) return r.body?.cancel?.(), clearTimeout(n), null; let e = await r.json(); return clearTimeout(n), e; } else throw clearTimeout(n), Error(`Failed to get cache: ${r.statusText}`); } catch (e) { if (clearTimeout(n), e.name === `AbortError`) { let t = Error(`Cache request timed out after ${this.timeout}ms`); t.stack = e.stack, this.onError?.(t); } else this.onError?.(e); return null; } }, this.set = async (e, t, n) => { let r = new AbortController(), i = setTimeout(() => r.abort(), this.timeout); try { let a = {}; n?.ttl && (a[d.HEADERS_VERCEL_REVALIDATE] = n.ttl.toString()), n?.tags && n.tags.length > 0 && (a[d.HEADERS_VERCEL_CACHE_TAGS] = n.tags.join(`,`)), n?.name && (a[d.HEADERS_VERCEL_CACHE_ITEM_NAME] = n.name); let o = await fetch(`${this.endpoint}${e}`, { method: `POST`, headers: { ...this.headers, ...a }, body: JSON.stringify(t), signal: r.signal }); if (clearTimeout(i), o.status !== 200) throw Error(`Failed to set cache: ${o.status} ${o.statusText}`); } catch (e) { if (clearTimeout(i), e.name === `AbortError`) { let t = Error(`Cache request timed out after ${this.timeout}ms`); t.stack = e.stack, this.onError?.(t); } else this.onError?.(e); } }, this.delete = async (e) => { let t = new AbortController(), n = setTimeout(() => t.abort(), this.timeout); try { let r = await fetch(`${this.endpoint}${e}`, { method: `DELETE`, headers: this.headers, signal: t.signal }); if (clearTimeout(n), r.status !== 200) throw Error(`Failed to delete cache: ${r.statusText}`); } catch (e) { if (clearTimeout(n), e.name === `AbortError`) { let t = Error(`Cache request timed out after ${this.timeout}ms`); t.stack = e.stack, this.onError?.(t); } else this.onError?.(e); } }, this.expireTag = async (e) => { let t = new AbortController(), n = setTimeout(() => t.abort(), this.timeout); try { Array.isArray(e) && (e = e.join(`,`)); let r = await fetch(`${this.endpoint}revalidate?tags=${e}`, { method: `POST`, headers: this.headers, signal: t.signal }); if (clearTimeout(n), r.status !== 200) throw Error(`Failed to revalidate tag: ${r.statusText}`); } catch (e) { if (clearTimeout(n), e.name === `AbortError`) { let t = Error(`Cache request timed out after ${this.timeout}ms`); t.stack = e.stack, this.onError?.(t); } else this.onError?.(e); } }, this.endpoint = e, this.headers = t, this.onError = n, this.timeout = r; } }; })); var c$1 = c$12(((e, t) => { var n = Object.defineProperty, i = Object.getOwnPropertyDescriptor, a = Object.getOwnPropertyNames, c = Object.prototype.hasOwnProperty, l = (e, t) => { for (var r in t) n(e, r, { get: t[r], enumerable: !0 }); }, u = (e, t, r, o) => { if (t && typeof t == `object` || typeof t == `function`) for (let s of a(t)) !c.call(e, s) && s !== r && n(e, s, { get: () => t[s], enumerable: !(o = i(t, s)) || o.enumerable }); return e; }, d = (e) => u(n({}, `__esModule`, { value: !0 }), e), f = {}; l(f, { HEADERS_VERCEL_CACHE_ITEM_NAME: () => O, HEADERS_VERCEL_CACHE_STATE: () => T, HEADERS_VERCEL_CACHE_TAGS: () => D, HEADERS_VERCEL_REVALIDATE: () => E, PkgCacheState: () => w, getCache: () => y }), t.exports = d(f); var p = r$2(), m = o$1(), h = s$1(); let g = (e) => { let t = 5381; for (let n = 0; n < e.length; n++) t = t * 33 ^ e.charCodeAt(n); return (t >>> 0).toString(16); }, _ = null, v = null, y = (e) => x(() => { let e; return e = (0, p.getContext)().cache ? (0, p.getContext)().cache : C(process.env.SUSPENSE_CACHE_DEBUG === `true`), e; }, b(e)); function b(e) { let t = e?.keyHashFunction || g; return (n) => { if (!e?.namespace) return t(n); let r = e.namespaceSeparator || `$`; return `${e.namespace}${r}${t(n)}`; }; } function x(e, t) { return { get: (n) => e().get(t(n)), set: (n, r, i) => e().set(t(n), r, { ...i, name: i?.name ?? n }), delete: (n) => e().delete(t(n)), expireTag: (t) => e().expireTag(t) }; } let S = !1; function C(e) { if (_ ||= new m.InMemoryCache(), process.env.RUNTIME_CACHE_DISABLE_BUILD_CACHE === `true`) return e && console.log(`Using InMemoryCache as build cache is disabled`), _; let { RUNTIME_CACHE_ENDPOINT: t, RUNTIME_CACHE_HEADERS: n } = process.env; if (e && console.log(`Runtime cache environment variables:`, { RUNTIME_CACHE_ENDPOINT: t, RUNTIME_CACHE_HEADERS: n }), !t || !n) return S ||= (console.warn(`Runtime Cache unavailable in this environment. Falling back to in-memory cache.`), !0), _; if (!v) { let e = {}; try { e = JSON.parse(n); } catch (e) { return console.error(`Failed to parse RUNTIME_CACHE_HEADERS:`, e), _; } let r = 500; if (process.env.RUNTIME_CACHE_TIMEOUT) { let e = parseInt(process.env.RUNTIME_CACHE_TIMEOUT, 10); !isNaN(e) && e > 0 ? r = e : console.warn(`Invalid RUNTIME_CACHE_TIMEOUT value: "${process.env.RUNTIME_CACHE_TIMEOUT}". Using default: ${r}ms`); } v = new h.BuildCache({ endpoint: t, headers: e, onError: (e) => console.error(e), timeout: r }); } return v; } var w = ((e) => (e.Fresh = `fresh`, e.Stale = `stale`, e.Expired = `expired`, e.NotFound = `notFound`, e.Error = `error`, e))(w || {}); let T = `x-vercel-cache-state`, E = `x-vercel-revalidate`, D = `x-vercel-cache-tags`, O = `x-vercel-cache-item-name`; })); var l$1 = c$12(((e, t) => { var n = Object.defineProperty, i = Object.getOwnPropertyDescriptor, a = Object.getOwnPropertyNames, o = Object.prototype.hasOwnProperty, s = (e, t) => { for (var r in t) n(e, r, { get: t[r], enumerable: !0 }); }, c = (e, t, r, s) => { if (t && typeof t == `object` || typeof t == `function`) for (let c of a(t)) !o.call(e, c) && c !== r && n(e, c, { get: () => t[c], enumerable: !(s = i(t, c)) || s.enumerable }); return e; }, l = (e) => c(n({}, `__esModule`, { value: !0 }), e), u = {}; s(u, { attachDatabasePool: () => v, experimental_attachDatabasePool: () => y }), t.exports = l(u); var d = r$2(); let f = !!process.env.DEBUG; function p(e) { if (`options` in e && e.options) { if (`idleTimeoutMillis` in e.options) return typeof e.options.idleTimeoutMillis == `number` ? e.options.idleTimeoutMillis : 1e4; if (`maxIdleTimeMS` in e.options) return typeof e.options.maxIdleTimeMS == `number` ? e.options.maxIdleTimeMS : 0; if (`status` in e) return 5e3; if (`connect` in e && `execute` in e) return 3e4; } if (`config` in e && e.config) { if (`connectionConfig` in e.config && e.config.connectionConfig) return e.config.connectionConfig.idleTimeout || 6e4; if (`idleTimeout` in e.config) return typeof e.config.idleTimeout == `number` ? e.config.idleTimeout : 6e4; } return `poolTimeout` in e ? typeof e.poolTimeout == `number` ? e.poolTimeout : 6e4 : `idleTimeout` in e ? typeof e.idleTimeout == `number` ? e.idleTimeout : 0 : 1e4; } let m = null, h = () => {}, g = Date.now(); function _(e) { if (!process.env.VERCEL_URL || !process.env.VERCEL_REGION) return; m && (clearTimeout(m), h()); let t = new Promise((e) => { h = e; }), n = Math.min(p(e) + 100, Math.max(100, 899e3 - (Date.now() - g))); m = setTimeout(() => { h?.(), f && console.log(`Database pool idle timeout reached. Releasing connections.`); }, n); let r = (0, d.getContext)(); r?.waitUntil ? r.waitUntil(t) : console.warn(`Pool release event triggered outside of request scope.`); } function v(e) { if (m && (h?.(), clearTimeout(m)), `on` in e && e.on && `options` in e && `idleTimeoutMillis` in e.options) { e.on(`release`, () => { f && console.log(`Client released from pool`), _(e); }); return; } else if (`on` in e && e.on && `config` in e && e.config && `connectionConfig` in e.config) { e.on(`release`, () => { f && console.log(`MySQL client released from pool`), _(e); }); return; } else if (`on` in e && e.on && `config` in e && e.config && `idleTimeout` in e.config) { e.on(`release`, () => { f && console.log(`MySQL2/MariaDB client released from pool`), _(e); }); return; } if (`on` in e && e.on && `options` in e && e.options && `maxIdleTimeMS` in e.options) { e.on(`connectionCheckedOut`, () => { f && console.log(`MongoDB connection checked out`), _(e); }); return; } if (`on` in e && e.on && `options` in e && e.options && `socket` in e.options) { e.on(`end`, () => { f && console.log(`Redis connection ended`), _(e); }); return; } throw Error(`Unsupported database pool type`); } let y = v; })); var u$1 = c$12(((e, t) => { var n = Object.defineProperty, i = Object.getOwnPropertyDescriptor, a = Object.getOwnPropertyNames, o = Object.prototype.hasOwnProperty, s = (e, t) => { for (var r in t) n(e, r, { get: t[r], enumerable: !0 }); }, c = (e, t, r, s) => { if (t && typeof t == `object` || typeof t == `function`) for (let c of a(t)) !o.call(e, c) && c !== r && n(e, c, { get: () => t[c], enumerable: !(s = i(t, c)) || s.enumerable }); return e; }, l = (e) => c(n({}, `__esModule`, { value: !0 }), e), u = {}; s(u, { dangerouslyDeleteBySrcImage: () => h, dangerouslyDeleteByTag: () => p, invalidateBySrcImage: () => m, invalidateByTag: () => f }), t.exports = l(u); var d = r$2(); let f = (e) => { let t = (0, d.getContext)().purge; return t ? t.invalidateByTag(e) : Promise.resolve(); }, p = (e, t) => { let n = (0, d.getContext)().purge; return n ? n.dangerouslyDeleteByTag(e, t) : Promise.resolve(); }, m = (e) => { let t = (0, d.getContext)().purge; return t ? t.invalidateBySrcImage(e) : Promise.resolve(); }, h = (e, t) => { let n = (0, d.getContext)().purge; return n ? n.dangerouslyDeleteBySrcImage(e, t) : Promise.resolve(); }; })); var d$1 = c$12(((e, t) => { var n = Object.defineProperty, i = Object.getOwnPropertyDescriptor, a = Object.getOwnPropertyNames, o = Object.prototype.hasOwnProperty, s = (e, t) => { for (var r in t) n(e, r, { get: t[r], enumerable: !0 }); }, c = (e, t, r, s) => { if (t && typeof t == `object` || typeof t == `function`) for (let c of a(t)) !o.call(e, c) && c !== r && n(e, c, { get: () => t[c], enumerable: !(s = i(t, c)) || s.enumerable }); return e; }, l = (e) => c(n({}, `__esModule`, { value: !0 }), e), u = {}; s(u, { addCacheTag: () => f }), t.exports = l(u); var d = r$2(); let f = (e) => { let t = (0, d.getContext)().addCacheTag; return t ? t(e) : Promise.resolve(); }; })); var f$1 = c$12(((e, t) => { var n = Object.defineProperty, i = Object.getOwnPropertyDescriptor, a = Object.getOwnPropertyNames, o = Object.prototype.hasOwnProperty, s = (e, t) => { for (var r in t) n(e, r, { get: t[r], enumerable: !0 }); }, c = (e, t, r, s) => { if (t && typeof t == `object` || typeof t == `function`) for (let c of a(t)) !o.call(e, c) && c !== r && n(e, c, { get: () => t[c], enumerable: !(s = i(t, c)) || s.enumerable }); return e; }, l = (e) => c(n({}, `__esModule`, { value: !0 }), e), u = {}; s(u, { experimental_upgradeWebSocket: () => p }), t.exports = l(u); var d = r$2(); async function f() { try { return (await Promise.resolve().then(() => wrapper_CQmdlFyy_exports)).WebSocketServer; } catch { throw Error(`The "ws" package is required for experimental_upgradeWebSocket(). Install it with: npm install ws`); } } async function p(e) { let t = (0, d.getContext)(); if (typeof t.upgradeWebSocket != `function`) throw Error(`experimental_upgradeWebSocket is not available in the current runtime environment. This feature requires a Vercel runtime that supports WebSocket upgrades.`); let n = await f(), { req: r, socket: i, head: a } = t.upgradeWebSocket(), o = new n({ noServer: !0 }), s = await new Promise((e, t) => { let n = () => { i.removeListener(`error`, l), i.removeListener(`close`, u); }, s = (e) => { if (n(), e instanceof Error) { t(e); return; } let r = Error(`WebSocket upgrade failed`); r.cause = e, t(r); }, c = (t) => { n(), e(t); }, l = (e) => s(e), u = () => s(Error(`socket closed before the WebSocket upgrade completed`)); i.once(`error`, l), i.once(`close`, u); try { o.handleUpgrade(r, i, a, c); } catch (e) { s(e); } }); try { await e(s); } catch (e) { throw s.close(1011, `WebSocket handler failed`), e; } return new Response(null, { status: 204 }); } })); var p$1 = c$12(((e, r) => { var o = Object.defineProperty, s = Object.getOwnPropertyDescriptor, p = Object.getOwnPropertyNames, m = Object.prototype.hasOwnProperty, h = (e, t) => { for (var n in t) o(e, n, { get: t[n], enumerable: !0 }); }, g = (e, t, n, r) => { if (t && typeof t == `object` || typeof t == `function`) for (let i of p(t)) !m.call(e, i) && i !== n && o(e, i, { get: () => t[i], enumerable: !(r = s(t, i)) || r.enumerable }); return e; }, _ = (e) => g(o({}, `__esModule`, { value: !0 }), e), v = {}; h(v, { addCacheTag: () => E.addCacheTag, attachDatabasePool: () => w.attachDatabasePool, dangerouslyDeleteBySrcImage: () => T.dangerouslyDeleteBySrcImage, dangerouslyDeleteByTag: () => T.dangerouslyDeleteByTag, experimental_attachDatabasePool: () => w.experimental_attachDatabasePool, experimental_upgradeWebSocket: () => D.experimental_upgradeWebSocket, geolocation: () => y.geolocation, getCache: () => C.getCache, getEnv: () => b.getEnv, invalidateBySrcImage: () => T.invalidateBySrcImage, invalidateByTag: () => T.invalidateByTag, ipAddress: () => y.ipAddress, next: () => S.next, rewrite: () => S.rewrite, waitUntil: () => x.waitUntil }), r.exports = _(v); var y = t(), b = n(), x = i$1(), S = a$1(), C = c$1(), w = l$1(), T = u$1(), E = d$1(), D = f$1(); })); var functions_CnVBREsg_default = p$1(); //#endregion //#region node_modules/eve/dist/src/compiled/_chunks/workflow/token-Bm-WLAUB.js var token_Bm_WLAUB_exports = /* @__PURE__ */ __exportAll({ default: () => token_Bm_WLAUB_default }); var r$1 = c$12(((e, r) => { var i = Object.defineProperty, a = Object.getOwnPropertyDescriptor, o = Object.getOwnPropertyNames, s = Object.prototype.hasOwnProperty, c = (e, t) => { for (var n in t) i(e, n, { get: t[n], enumerable: !0 }); }, l = (e, t, n, r) => { if (t && typeof t == `object` || typeof t == `function`) for (let c of o(t)) !s.call(e, c) && c !== n && i(e, c, { get: () => t[c], enumerable: !(r = a(t, c)) || r.enumerable }); return e; }, u = (e) => l(i({}, `__esModule`, { value: !0 }), e), d = {}; c(d, { refreshToken: () => m }), r.exports = u(d); var f = Iu$1(), p = Hu$1(); async function m(e) { let t = e?.project, n = e?.team; if (!t && !n) { let e = (0, p.findProjectInfo)(); t = e.projectId, n = e.teamId; } else if (!t || !n) { let e = (0, p.findProjectInfo)(); t ??= e.projectId, n ??= e.teamId; } if (!t) throw new f.VercelOidcTokenError("Failed to refresh OIDC token: No project specified. Try re-linking your project with `vc link`"); let r = (0, p.loadToken)(t); if (!r || (0, p.isExpired)((0, p.getTokenPayload)(r.token), e?.expirationBufferMs)) { let i = await (0, p.getVercelToken)({ expirationBufferMs: e?.expirationBufferMs }); if (r = await (0, p.getVercelOidcToken)(i, t, n), !r) throw new f.VercelOidcTokenError(`Failed to refresh OIDC token`); (0, p.saveToken)(r, t); } process.env.VERCEL_OIDC_TOKEN = r.token; } })); var token_Bm_WLAUB_default = r$1(); //#endregion //#region node_modules/eve/dist/src/compiled/_chunks/workflow/token-J7YP0s9a.js var token_J7YP0s9a_exports = /* @__PURE__ */ __exportAll({ default: () => token_J7YP0s9a_default }); var r = c$12(((e, r) => { var i = Object.defineProperty, a = Object.getOwnPropertyDescriptor, o = Object.getOwnPropertyNames, s = Object.prototype.hasOwnProperty, c = (e, t) => { for (var n in t) i(e, n, { get: t[n], enumerable: !0 }); }, l = (e, t, n, r) => { if (t && typeof t == `object` || typeof t == `function`) for (let c of o(t)) !s.call(e, c) && c !== n && i(e, c, { get: () => t[c], enumerable: !(r = a(t, c)) || r.enumerable }); return e; }, u = (e) => l(i({}, `__esModule`, { value: !0 }), e), d = {}; c(d, { refreshToken: () => m }), r.exports = u(d); var f = cc$1(), p = mc$1(); async function m(e) { let t = e?.project, n = e?.team; if (!t && !n) { let e = (0, p.findProjectInfo)(); t = e.projectId, n = e.teamId; } else if (!t || !n) { let e = (0, p.findProjectInfo)(); t ??= e.projectId, n ??= e.teamId; } if (!t) throw new f.VercelOidcTokenError("Failed to refresh OIDC token: No project specified. Try re-linking your project with `vc link`"); let r = (0, p.loadToken)(t); if (!r || (0, p.isExpired)((0, p.getTokenPayload)(r.token), e?.expirationBufferMs)) { let i = await (0, p.getVercelToken)({ expirationBufferMs: e?.expirationBufferMs }); if (r = await (0, p.getVercelOidcToken)(i, t, n), !r) throw new f.VercelOidcTokenError(`Failed to refresh OIDC token`); (0, p.saveToken)(r, t); } process.env.VERCEL_OIDC_TOKEN = r.token; } })); var token_J7YP0s9a_default = r(); //#endregion //#region node_modules/eve/dist/src/compiled/_chunks/workflow/wrapper-CQmdlFyy.js var wrapper_CQmdlFyy_exports = /* @__PURE__ */ __exportAll({ WebSocketServer: () => v }); var i = c$12(((e, t) => { let n = [ `nodebuffer`, `arraybuffer`, `fragments` ], r = typeof Blob < `u`; r && n.push(`blob`), t.exports = { BINARY_TYPES: n, CLOSE_TIMEOUT: 3e4, EMPTY_BUFFER: Buffer.alloc(0), GUID: `258EAFA5-E914-47DA-95CA-C5AB0DC85B11`, hasBlob: r, kForOnEventAttribute: Symbol(`kIsForOnEventAttribute`), kListener: Symbol(`kListener`), kStatusCode: Symbol(`status-code`), kWebSocket: Symbol(`websocket`), NOOP: () => {} }; })); var a = c$12(((e, n) => { let { EMPTY_BUFFER: r } = i(), a = Buffer[Symbol.species]; function o(e, t) { if (e.length === 0) return r; if (e.length === 1) return e[0]; let n = Buffer.allocUnsafe(t), i = 0; for (let t = 0; t < e.length; t++) { let r = e[t]; n.set(r, i), i += r.length; } return i < t ? new a(n.buffer, n.byteOffset, i) : n; } function s(e, t, n, r, i) { for (let a = 0; a < i; a++) n[r + a] = e[a] ^ t[a & 3]; } function c(e, t) { for (let n = 0; n < e.length; n++) e[n] ^= t[n & 3]; } function l(e) { return e.length === e.buffer.byteLength ? e.buffer : e.buffer.slice(e.byteOffset, e.byteOffset + e.length); } function u(e) { if (u.readOnly = !0, Buffer.isBuffer(e)) return e; let t; return e instanceof ArrayBuffer ? t = new a(e) : ArrayBuffer.isView(e) ? t = new a(e.buffer, e.byteOffset, e.byteLength) : (t = Buffer.from(e), u.readOnly = !1), t; } if (n.exports = { concat: o, mask: s, toArrayBuffer: l, toBuffer: u, unmask: c }, !process.env.WS_NO_BUFFER_UTIL) try { let e = f$11(`bufferutil`); n.exports.mask = function(t, n, r, i, a) { a < 48 ? s(t, n, r, i, a) : e.mask(t, n, r, i, a); }, n.exports.unmask = function(t, n) { t.length < 32 ? c(t, n) : e.unmask(t, n); }; } catch {} })); var o = c$12(((e, t) => { let n = Symbol(`kDone`), r = Symbol(`kRun`); t.exports = class { constructor(e) { this[n] = () => { this.pending--, this[r](); }, this.concurrency = e || Infinity, this.jobs = [], this.pending = 0; } add(e) { this.jobs.push(e), this[r](); } [r]() { if (this.pending !== this.concurrency && this.jobs.length) { let e = this.jobs.shift(); this.pending++, e(this[n]); } } }; })); var s = c$12(((e, n) => { let r = f$11(`zlib`), s = a(), c = o(), { kStatusCode: l } = i(), u = Buffer[Symbol.species], d = Buffer.from([ 0, 0, 255, 255 ]), f = Symbol(`permessage-deflate`), p = Symbol(`total-length`), m = Symbol(`callback`), h = Symbol(`buffers`), g = Symbol(`error`), _; n.exports = class { constructor(e) { this._options = e || {}, this._threshold = this._options.threshold === void 0 ? 1024 : this._options.threshold, this._maxPayload = this._options.maxPayload | 0, this._isServer = !!this._options.isServer, this._deflate = null, this._inflate = null, this.params = null, _ ||= new c(this._options.concurrencyLimit === void 0 ? 10 : this._options.concurrencyLimit); } static get extensionName() { return `permessage-deflate`; } offer() { let e = {}; return this._options.serverNoContextTakeover && (e.server_no_context_takeover = !0), this._options.clientNoContextTakeover && (e.client_no_context_takeover = !0), this._options.serverMaxWindowBits && (e.server_max_window_bits = this._options.serverMaxWindowBits), this._options.clientMaxWindowBits ? e.client_max_window_bits = this._options.clientMaxWindowBits : this._options.clientMaxWindowBits ?? (e.client_max_window_bits = !0), e; } accept(e) { return e = this.normalizeParams(e), this.params = this._isServer ? this.acceptAsServer(e) : this.acceptAsClient(e), this.params; } cleanup() { if (this._inflate &&= (this._inflate.close(), null), this._deflate) { let e = this._deflate[m]; this._deflate.close(), this._deflate = null, e && e(Error(`The deflate stream was closed while data was being processed`)); } } acceptAsServer(e) { let t = this._options, n = e.find((e) => !(t.serverNoContextTakeover === !1 && e.server_no_context_takeover || e.server_max_window_bits && (t.serverMaxWindowBits === !1 || typeof t.serverMaxWindowBits == `number` && t.serverMaxWindowBits > e.server_max_window_bits) || typeof t.clientMaxWindowBits == `number` && !e.client_max_window_bits)); if (!n) throw Error(`None of the extension offers can be accepted`); return t.serverNoContextTakeover && (n.server_no_context_takeover = !0), t.clientNoContextTakeover && (n.client_no_context_takeover = !0), typeof t.serverMaxWindowBits == `number` && (n.server_max_window_bits = t.serverMaxWindowBits), typeof t.clientMaxWindowBits == `number` ? n.client_max_window_bits = t.clientMaxWindowBits : (n.client_max_window_bits === !0 || t.clientMaxWindowBits === !1) && delete n.client_max_window_bits, n; } acceptAsClient(e) { let t = e[0]; if (this._options.clientNoContextTakeover === !1 && t.client_no_context_takeover) throw Error(`Unexpected parameter "client_no_context_takeover"`); if (!t.client_max_window_bits) typeof this._options.clientMaxWindowBits == `number` && (t.client_max_window_bits = this._options.clientMaxWindowBits); else if (this._options.clientMaxWindowBits === !1 || typeof this._options.clientMaxWindowBits == `number` && t.client_max_window_bits > this._options.clientMaxWindowBits) throw Error(`Unexpected or invalid parameter "client_max_window_bits"`); return t; } normalizeParams(e) { return e.forEach((e) => { Object.keys(e).forEach((t) => { let n = e[t]; if (n.length > 1) throw Error(`Parameter "${t}" must have only a single value`); if (n = n[0], t === `client_max_window_bits`) { if (n !== !0) { let e = +n; if (!Number.isInteger(e) || e < 8 || e > 15) throw TypeError(`Invalid value for parameter "${t}": ${n}`); n = e; } else if (!this._isServer) throw TypeError(`Invalid value for parameter "${t}": ${n}`); } else if (t === `server_max_window_bits`) { let e = +n; if (!Number.isInteger(e) || e < 8 || e > 15) throw TypeError(`Invalid value for parameter "${t}": ${n}`); n = e; } else if (t === `client_no_context_takeover` || t === `server_no_context_takeover`) { if (n !== !0) throw TypeError(`Invalid value for parameter "${t}": ${n}`); } else throw Error(`Unknown parameter "${t}"`); e[t] = n; }); }), e; } decompress(e, t, n) { _.add((r) => { this._decompress(e, t, (e, t) => { r(), n(e, t); }); }); } compress(e, t, n) { _.add((r) => { this._compress(e, t, (e, t) => { r(), n(e, t); }); }); } _decompress(e, t, n) { let i = this._isServer ? `client` : `server`; if (!this._inflate) { let e = `${i}_max_window_bits`, t = typeof this.params[e] == `number` ? this.params[e] : r.Z_DEFAULT_WINDOWBITS; this._inflate = r.createInflateRaw({ ...this._options.zlibInflateOptions, windowBits: t }), this._inflate[f] = this, this._inflate[p] = 0, this._inflate[h] = [], this._inflate.on(`error`, b), this._inflate.on(`data`, y); } this._inflate[m] = n, this._inflate.write(e), t && this._inflate.write(d), this._inflate.flush(() => { let e = this._inflate[g]; if (e) { this._inflate.close(), this._inflate = null, n(e); return; } let r = s.concat(this._inflate[h], this._inflate[p]); this._inflate._readableState.endEmitted ? (this._inflate.close(), this._inflate = null) : (this._inflate[p] = 0, this._inflate[h] = [], t && this.params[`${i}_no_context_takeover`] && this._inflate.reset()), n(null, r); }); } _compress(e, t, n) { let i = this._isServer ? `server` : `client`; if (!this._deflate) { let e = `${i}_max_window_bits`, t = typeof this.params[e] == `number` ? this.params[e] : r.Z_DEFAULT_WINDOWBITS; this._deflate = r.createDeflateRaw({ ...this._options.zlibDeflateOptions, windowBits: t }), this._deflate[p] = 0, this._deflate[h] = [], this._deflate.on(`data`, v); } this._deflate[m] = n, this._deflate.write(e), this._deflate.flush(r.Z_SYNC_FLUSH, () => { if (!this._deflate) return; let e = s.concat(this._deflate[h], this._deflate[p]); t && (e = new u(e.buffer, e.byteOffset, e.length - 4)), this._deflate[m] = null, this._deflate[p] = 0, this._deflate[h] = [], t && this.params[`${i}_no_context_takeover`] && this._deflate.reset(), n(null, e); }); } }; function v(e) { this[h].push(e), this[p] += e.length; } function y(e) { if (this[p] += e.length, this[f]._maxPayload < 1 || this[p] <= this[f]._maxPayload) { this[h].push(e); return; } this[g] = RangeError(`Max payload size exceeded`), this[g].code = `WS_ERR_UNSUPPORTED_MESSAGE_LENGTH`, this[g][l] = 1009, this.removeListener(`data`, y), this.reset(); } function b(e) { if (this[f]._inflate = null, this[g]) { this[m](this[g]); return; } e[l] = 1007, this[m](e); } })); var c = c$12(((e, n) => { let { isUtf8: r } = f$11(`buffer`), { hasBlob: a } = i(), o = [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0 ]; function s(e) { return e >= 1e3 && e <= 1014 && e !== 1004 && e !== 1005 && e !== 1006 || e >= 3e3 && e <= 4999; } function c(e) { let t = e.length, n = 0; for (; n < t;) if (!(e[n] & 128)) n++; else if ((e[n] & 224) == 192) { if (n + 1 === t || (e[n + 1] & 192) != 128 || (e[n] & 254) == 192) return !1; n += 2; } else if ((e[n] & 240) == 224) { if (n + 2 >= t || (e[n + 1] & 192) != 128 || (e[n + 2] & 192) != 128 || e[n] === 224 && (e[n + 1] & 224) == 128 || e[n] === 237 && (e[n + 1] & 224) == 160) return !1; n += 3; } else if ((e[n] & 248) == 240) { if (n + 3 >= t || (e[n + 1] & 192) != 128 || (e[n + 2] & 192) != 128 || (e[n + 3] & 192) != 128 || e[n] === 240 && (e[n + 1] & 240) == 128 || e[n] === 244 && e[n + 1] > 143 || e[n] > 244) return !1; n += 4; } else return !1; return !0; } function l(e) { return a && typeof e == `object` && typeof e.arrayBuffer == `function` && typeof e.type == `string` && typeof e.stream == `function` && (e[Symbol.toStringTag] === `Blob` || e[Symbol.toStringTag] === `File`); } if (n.exports = { isBlob: l, isValidStatusCode: s, isValidUTF8: c, tokenChars: o }, r) n.exports.isValidUTF8 = function(e) { return e.length < 24 ? c(e) : r(e); }; else if (!process.env.WS_NO_UTF_8_VALIDATE) try { let e = f$11(`utf-8-validate`); n.exports.isValidUTF8 = function(t) { return t.length < 32 ? c(t) : e(t); }; } catch {} })); var l = c$12(((e, n) => { let { Writable: r } = f$11(`stream`), o = s(), { BINARY_TYPES: l, EMPTY_BUFFER: u, kStatusCode: d, kWebSocket: f } = i(), { concat: p, toArrayBuffer: m, unmask: h } = a(), { isValidStatusCode: g, isValidUTF8: _ } = c(), v = Buffer[Symbol.species]; n.exports = class extends r { constructor(e = {}) { super(), this._allowSynchronousEvents = e.allowSynchronousEvents === void 0 ? !0 : e.allowSynchronousEvents, this._binaryType = e.binaryType || l[0], this._extensions = e.extensions || {}, this._isServer = !!e.isServer, this._maxBufferedChunks = e.maxBufferedChunks | 0, this._maxFragments = e.maxFragments | 0, this._maxPayload = e.maxPayload | 0, this._skipUTF8Validation = !!e.skipUTF8Validation, this[f] = void 0, this._bufferedBytes = 0, this._buffers = [], this._compressed = !1, this._payloadLength = 0, this._mask = void 0, this._fragmented = 0, this._masked = !1, this._fin = !1, this._opcode = 0, this._totalPayloadLength = 0, this._messageLength = 0, this._fragments = [], this._errored = !1, this._loop = !1, this._state = 0; } _write(e, t, n) { if (this._opcode === 8 && this._state == 0) return n(); if (this._maxBufferedChunks > 0 && this._buffers.length >= this._maxBufferedChunks) { n(this.createError(RangeError, `Too many buffered chunks`, !1, 1008, `WS_ERR_TOO_MANY_BUFFERED_PARTS`)); return; } this._bufferedBytes += e.length, this._buffers.push(e), this.startLoop(n); } consume(e) { if (this._bufferedBytes -= e, e === this._buffers[0].length) return this._buffers.shift(); if (e < this._buffers[0].length) { let t = this._buffers[0]; return this._buffers[0] = new v(t.buffer, t.byteOffset + e, t.length - e), new v(t.buffer, t.byteOffset, e); } let t = Buffer.allocUnsafe(e); do { let n = this._buffers[0], r = t.length - e; e >= n.length ? t.set(this._buffers.shift(), r) : (t.set(new Uint8Array(n.buffer, n.byteOffset, e), r), this._buffers[0] = new v(n.buffer, n.byteOffset + e, n.length - e)), e -= n.length; } while (e > 0); return t; } startLoop(e) { this._loop = !0; do switch (this._state) { case 0: this.getInfo(e); break; case 1: this.getPayloadLength16(e); break; case 2: this.getPayloadLength64(e); break; case 3: this.getMask(); break; case 4: this.getData(e); break; case 5: case 6: this._loop = !1; return; } while (this._loop); this._errored || e(); } getInfo(e) { if (this._bufferedBytes < 2) { this._loop = !1; return; } let t = this.consume(2); if (t[0] & 48) { e(this.createError(RangeError, `RSV2 and RSV3 must be clear`, !0, 1002, `WS_ERR_UNEXPECTED_RSV_2_3`)); return; } let n = (t[0] & 64) == 64; if (n && !this._extensions[o.extensionName]) { e(this.createError(RangeError, `RSV1 must be clear`, !0, 1002, `WS_ERR_UNEXPECTED_RSV_1`)); return; } if (this._fin = (t[0] & 128) == 128, this._opcode = t[0] & 15, this._payloadLength = t[1] & 127, this._opcode === 0) { if (n) { e(this.createError(RangeError, `RSV1 must be clear`, !0, 1002, `WS_ERR_UNEXPECTED_RSV_1`)); return; } if (!this._fragmented) { e(this.createError(RangeError, `invalid opcode 0`, !0, 1002, `WS_ERR_INVALID_OPCODE`)); return; } this._opcode = this._fragmented; } else if (this._opcode === 1 || this._opcode === 2) { if (this._fragmented) { e(this.createError(RangeError, `invalid opcode ${this._opcode}`, !0, 1002, `WS_ERR_INVALID_OPCODE`)); return; } this._compressed = n; } else if (this._opcode > 7 && this._opcode < 11) { if (!this._fin) { e(this.createError(RangeError, `FIN must be set`, !0, 1002, `WS_ERR_EXPECTED_FIN`)); return; } if (n) { e(this.createError(RangeError, `RSV1 must be clear`, !0, 1002, `WS_ERR_UNEXPECTED_RSV_1`)); return; } if (this._payloadLength > 125 || this._opcode === 8 && this._payloadLength === 1) { e(this.createError(RangeError, `invalid payload length ${this._payloadLength}`, !0, 1002, `WS_ERR_INVALID_CONTROL_PAYLOAD_LENGTH`)); return; } } else { e(this.createError(RangeError, `invalid opcode ${this._opcode}`, !0, 1002, `WS_ERR_INVALID_OPCODE`)); return; } if (!this._fin && !this._fragmented && (this._fragmented = this._opcode), this._masked = (t[1] & 128) == 128, this._isServer) { if (!this._masked) { e(this.createError(RangeError, `MASK must be set`, !0, 1002, `WS_ERR_EXPECTED_MASK`)); return; } } else if (this._masked) { e(this.createError(RangeError, `MASK must be clear`, !0, 1002, `WS_ERR_UNEXPECTED_MASK`)); return; } this._payloadLength === 126 ? this._state = 1 : this._payloadLength === 127 ? this._state = 2 : this.haveLength(e); } getPayloadLength16(e) { if (this._bufferedBytes < 2) { this._loop = !1; return; } this._payloadLength = this.consume(2).readUInt16BE(0), this.haveLength(e); } getPayloadLength64(e) { if (this._bufferedBytes < 8) { this._loop = !1; return; } let t = this.consume(8), n = t.readUInt32BE(0); if (n > 2 ** 21 - 1) { e(this.createError(RangeError, `Unsupported WebSocket frame: payload length > 2^53 - 1`, !1, 1009, `WS_ERR_UNSUPPORTED_DATA_PAYLOAD_LENGTH`)); return; } this._payloadLength = n * 2 ** 32 + t.readUInt32BE(4), this.haveLength(e); } haveLength(e) { if (this._payloadLength && this._opcode < 8 && (this._totalPayloadLength += this._payloadLength, this._totalPayloadLength > this._maxPayload && this._maxPayload > 0)) { e(this.createError(RangeError, `Max payload size exceeded`, !1, 1009, `WS_ERR_UNSUPPORTED_MESSAGE_LENGTH`)); return; } this._masked ? this._state = 3 : this._state = 4; } getMask() { if (this._bufferedBytes < 4) { this._loop = !1; return; } this._mask = this.consume(4), this._state = 4; } getData(e) { let t = u; if (this._payloadLength) { if (this._bufferedBytes < this._payloadLength) { this._loop = !1; return; } t = this.consume(this._payloadLength), this._masked && (this._mask[0] | this._mask[1] | this._mask[2] | this._mask[3]) !== 0 && h(t, this._mask); } if (this._opcode > 7) { this.controlMessage(t, e); return; } if (this._compressed) { this._state = 5, this.decompress(t, e); return; } if (t.length) { if (this._maxFragments > 0 && this._fragments.length >= this._maxFragments) { e(this.createError(RangeError, `Too many message fragments`, !1, 1008, `WS_ERR_TOO_MANY_BUFFERED_PARTS`)); return; } this._messageLength = this._totalPayloadLength, this._fragments.push(t); } this.dataMessage(e); } decompress(e, t) { this._extensions[o.extensionName].decompress(e, this._fin, (e, n) => { if (e) return t(e); if (n.length) { if (this._messageLength += n.length, this._messageLength > this._maxPayload && this._maxPayload > 0) { t(this.createError(RangeError, `Max payload size exceeded`, !1, 1009, `WS_ERR_UNSUPPORTED_MESSAGE_LENGTH`)); return; } if (this._maxFragments > 0 && this._fragments.length >= this._maxFragments) { t(this.createError(RangeError, `Too many message fragments`, !1, 1008, `WS_ERR_TOO_MANY_BUFFERED_PARTS`)); return; } this._fragments.push(n); } this.dataMessage(t), this._state === 0 && this.startLoop(t); }); } dataMessage(e) { if (!this._fin) { this._state = 0; return; } let t = this._messageLength, n = this._fragments; if (this._totalPayloadLength = 0, this._messageLength = 0, this._fragmented = 0, this._fragments = [], this._opcode === 2) { let r; r = this._binaryType === `nodebuffer` ? p(n, t) : this._binaryType === `arraybuffer` ? m(p(n, t)) : this._binaryType === `blob` ? new Blob(n) : n, this._allowSynchronousEvents ? (this.emit(`message`, r, !0), this._state = 0) : (this._state = 6, setImmediate(() => { this.emit(`message`, r, !0), this._state = 0, this.startLoop(e); })); } else { let r = p(n, t); if (!this._skipUTF8Validation && !_(r)) { e(this.createError(Error, `invalid UTF-8 sequence`, !0, 1007, `WS_ERR_INVALID_UTF8`)); return; } this._state === 5 || this._allowSynchronousEvents ? (this.emit(`message`, r, !1), this._state = 0) : (this._state = 6, setImmediate(() => { this.emit(`message`, r, !1), this._state = 0, this.startLoop(e); })); } } controlMessage(e, t) { if (this._opcode === 8) { if (e.length === 0) this._loop = !1, this.emit(`conclude`, 1005, u), this.end(); else { let n = e.readUInt16BE(0); if (!g(n)) { t(this.createError(RangeError, `invalid status code ${n}`, !0, 1002, `WS_ERR_INVALID_CLOSE_CODE`)); return; } let r = new v(e.buffer, e.byteOffset + 2, e.length - 2); if (!this._skipUTF8Validation && !_(r)) { t(this.createError(Error, `invalid UTF-8 sequence`, !0, 1007, `WS_ERR_INVALID_UTF8`)); return; } this._loop = !1, this.emit(`conclude`, n, r), this.end(); } this._state = 0; return; } this._allowSynchronousEvents ? (this.emit(this._opcode === 9 ? `ping` : `pong`, e), this._state = 0) : (this._state = 6, setImmediate(() => { this.emit(this._opcode === 9 ? `ping` : `pong`, e), this._state = 0, this.startLoop(t); })); } createError(e, t, n, r, i) { this._loop = !1, this._errored = !0; let a = new e(n ? `Invalid WebSocket frame: ${t}` : t); return Error.captureStackTrace(a, this.createError), a.code = i, a[d] = r, a; } }; })); var u = c$12(((e, n) => { let { Duplex: r } = f$11(`stream`), { randomFillSync: o } = f$11(`crypto`), { types: { isUint8Array: l } } = f$11(`util`), u = s(), { EMPTY_BUFFER: d, kWebSocket: f, NOOP: p } = i(), { isBlob: m, isValidStatusCode: h } = c(), { mask: g, toBuffer: _ } = a(), v = Symbol(`kByteLength`), y = Buffer.alloc(4), b = 8 * 1024, x, S = b; n.exports = class e { constructor(e, t, n) { this._extensions = t || {}, n && (this._generateMask = n, this._maskBuffer = Buffer.alloc(4)), this._socket = e, this._firstFragment = !0, this._compress = !1, this._bufferedBytes = 0, this._queue = [], this._state = 0, this.onerror = p, this[f] = void 0; } static frame(e, t) { let n, r = !1, i = 2, a = !1; t.mask && (n = t.maskBuffer || y, t.generateMask ? t.generateMask(n) : (S === b && (x === void 0 && (x = Buffer.alloc(b)), o(x, 0, b), S = 0), n[0] = x[S++], n[1] = x[S++], n[2] = x[S++], n[3] = x[S++]), a = (n[0] | n[1] | n[2] | n[3]) === 0, i = 6); let s; typeof e == `string` ? (!t.mask || a) && t[v] !== void 0 ? s = t[v] : (e = Buffer.from(e), s = e.length) : (s = e.length, r = t.mask && t.readOnly && !a); let c = s; s >= 65536 ? (i += 8, c = 127) : s > 125 && (i += 2, c = 126); let l = Buffer.allocUnsafe(r ? s + i : i); return l[0] = t.fin ? t.opcode | 128 : t.opcode, t.rsv1 && (l[0] |= 64), l[1] = c, c === 126 ? l.writeUInt16BE(s, 2) : c === 127 && (l[2] = l[3] = 0, l.writeUIntBE(s, 4, 6)), !t.mask || (l[1] |= 128, l[i - 4] = n[0], l[i - 3] = n[1], l[i - 2] = n[2], l[i - 1] = n[3], a) ? [l, e] : r ? (g(e, n, l, i, s), [l]) : (g(e, n, e, 0, s), [l, e]); } close(t, n, r, i) { let a; if (t === void 0) a = d; else if (typeof t != `number` || !h(t)) throw TypeError(`First argument must be a valid error code number`); else if (n === void 0 || !n.length) a = Buffer.allocUnsafe(2), a.writeUInt16BE(t, 0); else { let e = Buffer.byteLength(n); if (e > 123) throw RangeError(`The message must not be greater than 123 bytes`); if (a = Buffer.allocUnsafe(2 + e), a.writeUInt16BE(t, 0), typeof n == `string`) a.write(n, 2); else if (l(n)) a.set(n, 2); else throw TypeError(`Second argument must be a string or a Uint8Array`); } let o = { [v]: a.length, fin: !0, generateMask: this._generateMask, mask: r, maskBuffer: this._maskBuffer, opcode: 8, readOnly: !1, rsv1: !1 }; this._state === 0 ? this.sendFrame(e.frame(a, o), i) : this.enqueue([ this.dispatch, a, !1, o, i ]); } ping(t, n, r) { let i, a; if (typeof t == `string` ? (i = Buffer.byteLength(t), a = !1) : m(t) ? (i = t.size, a = !1) : (t = _(t), i = t.length, a = _.readOnly), i > 125) throw RangeError(`The data size must not be greater than 125 bytes`); let o = { [v]: i, fin: !0, generateMask: this._generateMask, mask: n, maskBuffer: this._maskBuffer, opcode: 9, readOnly: a, rsv1: !1 }; m(t) ? this._state === 0 ? this.getBlobData(t, !1, o, r) : this.enqueue([ this.getBlobData, t, !1, o, r ]) : this._state === 0 ? this.sendFrame(e.frame(t, o), r) : this.enqueue([ this.dispatch, t, !1, o, r ]); } pong(t, n, r) { let i, a; if (typeof t == `string` ? (i = Buffer.byteLength(t), a = !1) : m(t) ? (i = t.size, a = !1) : (t = _(t), i = t.length, a = _.readOnly), i > 125) throw RangeError(`The data size must not be greater than 125 bytes`); let o = { [v]: i, fin: !0, generateMask: this._generateMask, mask: n, maskBuffer: this._maskBuffer, opcode: 10, readOnly: a, rsv1: !1 }; m(t) ? this._state === 0 ? this.getBlobData(t, !1, o, r) : this.enqueue([ this.getBlobData, t, !1, o, r ]) : this._state === 0 ? this.sendFrame(e.frame(t, o), r) : this.enqueue([ this.dispatch, t, !1, o, r ]); } send(e, t, n) { let r = this._extensions[u.extensionName], i = t.binary ? 2 : 1, a = t.compress, o, s; typeof e == `string` ? (o = Buffer.byteLength(e), s = !1) : m(e) ? (o = e.size, s = !1) : (e = _(e), o = e.length, s = _.readOnly), this._firstFragment ? (this._firstFragment = !1, a && r && r.params[r._isServer ? `server_no_context_takeover` : `client_no_context_takeover`] && (a = o >= r._threshold), this._compress = a) : (a = !1, i = 0), t.fin && (this._firstFragment = !0); let c = { [v]: o, fin: t.fin, generateMask: this._generateMask, mask: t.mask, maskBuffer: this._maskBuffer, opcode: i, readOnly: s, rsv1: a }; m(e) ? this._state === 0 ? this.getBlobData(e, this._compress, c, n) : this.enqueue([ this.getBlobData, e, this._compress, c, n ]) : this._state === 0 ? this.dispatch(e, this._compress, c, n) : this.enqueue([ this.dispatch, e, this._compress, c, n ]); } getBlobData(t, n, r, i) { this._bufferedBytes += r[v], this._state = 2, t.arrayBuffer().then((t) => { if (this._socket.destroyed) { let e = Error(`The socket was closed while the blob was being read`); process.nextTick(C, this, e, i); return; } this._bufferedBytes -= r[v]; let a = _(t); n ? this.dispatch(a, n, r, i) : (this._state = 0, this.sendFrame(e.frame(a, r), i), this.dequeue()); }).catch((e) => { process.nextTick(w, this, e, i); }); } dispatch(t, n, r, i) { if (!n) { this.sendFrame(e.frame(t, r), i); return; } let a = this._extensions[u.extensionName]; this._bufferedBytes += r[v], this._state = 1, a.compress(t, r.fin, (t, n) => { if (this._socket.destroyed) { let e = Error(`The socket was closed while data was being compressed`); C(this, e, i); return; } this._bufferedBytes -= r[v], this._state = 0, r.readOnly = !1, this.sendFrame(e.frame(n, r), i), this.dequeue(); }); } dequeue() { for (; this._state === 0 && this._queue.length;) { let e = this._queue.shift(); this._bufferedBytes -= e[3][v], Reflect.apply(e[0], this, e.slice(1)); } } enqueue(e) { this._bufferedBytes += e[3][v], this._queue.push(e); } sendFrame(e, t) { e.length === 2 ? (this._socket.cork(), this._socket.write(e[0]), this._socket.write(e[1], t), this._socket.uncork()) : this._socket.write(e[0], t); } }; function C(e, t, n) { typeof n == `function` && n(t); for (let n = 0; n < e._queue.length; n++) { let r = e._queue[n], i = r[r.length - 1]; typeof i == `function` && i(t); } } function w(e, t, n) { C(e, t, n), e.onerror(t); } })); var d = c$12(((e, t) => { let { kForOnEventAttribute: n, kListener: r } = i(), a = Symbol(`kCode`), o = Symbol(`kData`), s = Symbol(`kError`), c = Symbol(`kMessage`), l = Symbol(`kReason`), u = Symbol(`kTarget`), d = Symbol(`kType`), f = Symbol(`kWasClean`); var p = class { constructor(e) { this[u] = null, this[d] = e; } get target() { return this[u]; } get type() { return this[d]; } }; Object.defineProperty(p.prototype, "target", { enumerable: !0 }), Object.defineProperty(p.prototype, "type", { enumerable: !0 }); var m = class extends p { constructor(e, t = {}) { super(e), this[a] = t.code === void 0 ? 0 : t.code, this[l] = t.reason === void 0 ? `` : t.reason, this[f] = t.wasClean === void 0 ? !1 : t.wasClean; } get code() { return this[a]; } get reason() { return this[l]; } get wasClean() { return this[f]; } }; Object.defineProperty(m.prototype, "code", { enumerable: !0 }), Object.defineProperty(m.prototype, "reason", { enumerable: !0 }), Object.defineProperty(m.prototype, "wasClean", { enumerable: !0 }); var h = class extends p { constructor(e, t = {}) { super(e), this[s] = t.error === void 0 ? null : t.error, this[c] = t.message === void 0 ? `` : t.message; } get error() { return this[s]; } get message() { return this[c]; } }; Object.defineProperty(h.prototype, "error", { enumerable: !0 }), Object.defineProperty(h.prototype, "message", { enumerable: !0 }); var g = class extends p { constructor(e, t = {}) { super(e), this[o] = t.data === void 0 ? null : t.data; } get data() { return this[o]; } }; Object.defineProperty(g.prototype, "data", { enumerable: !0 }), t.exports = { CloseEvent: m, ErrorEvent: h, Event: p, EventTarget: { addEventListener(e, t, i = {}) { for (let a of this.listeners(e)) if (!i[n] && a[r] === t && !a[n]) return; let a; if (e === `message`) a = function(e, n) { let r = new g(`message`, { data: n ? e : e.toString() }); r[u] = this, _(t, this, r); }; else if (e === `close`) a = function(e, n) { let r = new m(`close`, { code: e, reason: n.toString(), wasClean: this._closeFrameReceived && this._closeFrameSent }); r[u] = this, _(t, this, r); }; else if (e === `error`) a = function(e) { let n = new h(`error`, { error: e, message: e.message }); n[u] = this, _(t, this, n); }; else if (e === `open`) a = function() { let e = new p(`open`); e[u] = this, _(t, this, e); }; else return; a[n] = !!i[n], a[r] = t, i.once ? this.once(e, a) : this.on(e, a); }, removeEventListener(e, t) { for (let i of this.listeners(e)) if (i[r] === t && !i[n]) { this.removeListener(e, i); break; } } }, MessageEvent: g }; function _(e, t, n) { typeof e == `object` && e.handleEvent ? e.handleEvent.call(e, n) : e.call(t, n); } })); var f = c$12(((e, t) => { let { tokenChars: n } = c(); function r(e, t, n) { e[t] === void 0 ? e[t] = [n] : e[t].push(n); } function i(e) { let t = Object.create(null), i = Object.create(null), a = !1, o = !1, s = !1, c, l, u = -1, d = -1, f = -1, p = 0; for (; p < e.length; p++) if (d = e.charCodeAt(p), c === void 0) if (f === -1 && n[d] === 1) u === -1 && (u = p); else if (p !== 0 && (d === 32 || d === 9)) f === -1 && u !== -1 && (f = p); else if (d === 59 || d === 44) { if (u === -1) throw SyntaxError(`Unexpected character at index ${p}`); f === -1 && (f = p); let n = e.slice(u, f); d === 44 ? (r(t, n, i), i = Object.create(null)) : c = n, u = f = -1; } else throw SyntaxError(`Unexpected character at index ${p}`); else if (l === void 0) if (f === -1 && n[d] === 1) u === -1 && (u = p); else if (d === 32 || d === 9) f === -1 && u !== -1 && (f = p); else if (d === 59 || d === 44) { if (u === -1) throw SyntaxError(`Unexpected character at index ${p}`); f === -1 && (f = p), r(i, e.slice(u, f), !0), d === 44 && (r(t, c, i), i = Object.create(null), c = void 0), u = f = -1; } else if (d === 61 && u !== -1 && f === -1) l = e.slice(u, p), u = f = -1; else throw SyntaxError(`Unexpected character at index ${p}`); else if (o) { if (n[d] !== 1) throw SyntaxError(`Unexpected character at index ${p}`); u === -1 ? u = p : a ||= !0, o = !1; } else if (s) if (n[d] === 1) u === -1 && (u = p); else if (d === 34 && u !== -1) s = !1, f = p; else if (d === 92) o = !0; else throw SyntaxError(`Unexpected character at index ${p}`); else if (d === 34 && e.charCodeAt(p - 1) === 61) s = !0; else if (f === -1 && n[d] === 1) u === -1 && (u = p); else if (u !== -1 && (d === 32 || d === 9)) f === -1 && (f = p); else if (d === 59 || d === 44) { if (u === -1) throw SyntaxError(`Unexpected character at index ${p}`); f === -1 && (f = p); let n = e.slice(u, f); a &&= (n = n.replace(/\\/g, ``), !1), r(i, l, n), d === 44 && (r(t, c, i), i = Object.create(null), c = void 0), l = void 0, u = f = -1; } else throw SyntaxError(`Unexpected character at index ${p}`); if (u === -1 || s || d === 32 || d === 9) throw SyntaxError(`Unexpected end of input`); f === -1 && (f = p); let m = e.slice(u, f); return c === void 0 ? r(t, m, i) : (l === void 0 ? r(i, m, !0) : a ? r(i, l, m.replace(/\\/g, ``)) : r(i, l, m), r(t, c, i)), t; } function a(e) { return Object.keys(e).map((t) => { let n = e[t]; return Array.isArray(n) || (n = [n]), n.map((e) => [t].concat(Object.keys(e).map((t) => { let n = e[t]; return Array.isArray(n) || (n = [n]), n.map((e) => e === !0 ? t : `${t}=${e}`).join(`; `); })).join(`; `)).join(`, `); }).join(`, `); } t.exports = { format: a, parse: i }; })); var p = c$12(((e, n) => { let r = f$11(`events`), o = f$11(`https`), p = f$11(`http`), m = f$11(`net`), h = f$11(`tls`), { randomBytes: g, createHash: _ } = f$11(`crypto`), { Duplex: v, Readable: y } = f$11(`stream`), { URL: b } = f$11(`url`), x = s(), S = l(), C = u(), { isBlob: w } = c(), { BINARY_TYPES: T, CLOSE_TIMEOUT: E, EMPTY_BUFFER: D, GUID: O, kForOnEventAttribute: k, kListener: A, kStatusCode: j, kWebSocket: M, NOOP: N } = i(), { EventTarget: { addEventListener: ee, removeEventListener: te } } = d(), { format: P, parse: F } = f(), { toBuffer: I } = a(), L = Symbol(`kAborted`), R = [8, 13], z = [ `CONNECTING`, `OPEN`, `CLOSING`, `CLOSED` ], B = /^[!#$%&'*+\-.0-9A-Z^_`|a-z~]+$/; var V = class e extends r { constructor(t, n, r) { super(), this._binaryType = T[0], this._closeCode = 1006, this._closeFrameReceived = !1, this._closeFrameSent = !1, this._closeMessage = D, this._closeTimer = null, this._errorEmitted = !1, this._extensions = {}, this._paused = !1, this._protocol = ``, this._readyState = e.CONNECTING, this._receiver = null, this._sender = null, this._socket = null, t === null ? (this._autoPong = r.autoPong, this._closeTimeout = r.closeTimeout, this._isServer = !0) : (this._bufferedAmount = 0, this._isServer = !1, this._redirects = 0, n === void 0 ? n = [] : Array.isArray(n) || (typeof n == `object` && n ? (r = n, n = []) : n = [n]), H(this, t, n, r)); } get binaryType() { return this._binaryType; } set binaryType(e) { T.includes(e) && (this._binaryType = e, this._receiver && (this._receiver._binaryType = e)); } get bufferedAmount() { return this._socket ? this._socket._writableState.length + this._sender._bufferedBytes : this._bufferedAmount; } get extensions() { return Object.keys(this._extensions).join(); } get isPaused() { return this._paused; } get onclose() { return null; } get onerror() { return null; } get onopen() { return null; } get onmessage() { return null; } get protocol() { return this._protocol; } get readyState() { return this._readyState; } get url() { return this._url; } setSocket(t, n, r) { let i = new S({ allowSynchronousEvents: r.allowSynchronousEvents, binaryType: this.binaryType, extensions: this._extensions, isServer: this._isServer, maxBufferedChunks: r.maxBufferedChunks, maxFragments: r.maxFragments, maxPayload: r.maxPayload, skipUTF8Validation: r.skipUTF8Validation }), a = new C(t, this._extensions, r.generateMask); this._receiver = i, this._sender = a, this._socket = t, i[M] = this, a[M] = this, t[M] = this, i.on(`conclude`, re), i.on(`drain`, ie), i.on(`error`, ae), i.on(`message`, oe), i.on(`ping`, se), i.on(`pong`, ce), a.onerror = le, t.setTimeout && t.setTimeout(0), t.setNoDelay && t.setNoDelay(), n.length > 0 && t.unshift(n), t.on(`close`, X), t.on(`data`, Z), t.on(`end`, Q), t.on(`error`, $), this._readyState = e.OPEN, this.emit(`open`); } emitClose() { if (!this._socket) { this._readyState = e.CLOSED, this.emit(`close`, this._closeCode, this._closeMessage); return; } this._extensions[x.extensionName] && this._extensions[x.extensionName].cleanup(), this._receiver.removeAllListeners(), this._readyState = e.CLOSED, this.emit(`close`, this._closeCode, this._closeMessage); } close(t, n) { if (this.readyState !== e.CLOSED) { if (this.readyState === e.CONNECTING) { G(this, this._req, `WebSocket was closed before the connection was established`); return; } if (this.readyState === e.CLOSING) { this._closeFrameSent && (this._closeFrameReceived || this._receiver._writableState.errorEmitted) && this._socket.end(); return; } this._readyState = e.CLOSING, this._sender.close(t, n, !this._isServer, (e) => { e || (this._closeFrameSent = !0, (this._closeFrameReceived || this._receiver._writableState.errorEmitted) && this._socket.end()); }), Y(this); } } pause() { this.readyState === e.CONNECTING || this.readyState === e.CLOSED || (this._paused = !0, this._socket.pause()); } ping(t, n, r) { if (this.readyState === e.CONNECTING) throw Error(`WebSocket is not open: readyState 0 (CONNECTING)`); if (typeof t == `function` ? (r = t, t = n = void 0) : typeof n == `function` && (r = n, n = void 0), typeof t == `number` && (t = t.toString()), this.readyState !== e.OPEN) { K(this, t, r); return; } n === void 0 && (n = !this._isServer), this._sender.ping(t || D, n, r); } pong(t, n, r) { if (this.readyState === e.CONNECTING) throw Error(`WebSocket is not open: readyState 0 (CONNECTING)`); if (typeof t == `function` ? (r = t, t = n = void 0) : typeof n == `function` && (r = n, n = void 0), typeof t == `number` && (t = t.toString()), this.readyState !== e.OPEN) { K(this, t, r); return; } n === void 0 && (n = !this._isServer), this._sender.pong(t || D, n, r); } resume() { this.readyState === e.CONNECTING || this.readyState === e.CLOSED || (this._paused = !1, this._receiver._writableState.needDrain || this._socket.resume()); } send(t, n, r) { if (this.readyState === e.CONNECTING) throw Error(`WebSocket is not open: readyState 0 (CONNECTING)`); if (typeof n == `function` && (r = n, n = {}), typeof t == `number` && (t = t.toString()), this.readyState !== e.OPEN) { K(this, t, r); return; } let i = { binary: typeof t != `string`, mask: !this._isServer, compress: !0, fin: !0, ...n }; this._extensions[x.extensionName] || (i.compress = !1), this._sender.send(t || D, i, r); } terminate() { if (this.readyState !== e.CLOSED) { if (this.readyState === e.CONNECTING) { G(this, this._req, `WebSocket was closed before the connection was established`); return; } this._socket && (this._readyState = e.CLOSING, this._socket.destroy()); } } }; Object.defineProperty(V, "CONNECTING", { enumerable: !0, value: z.indexOf(`CONNECTING`) }), Object.defineProperty(V.prototype, "CONNECTING", { enumerable: !0, value: z.indexOf(`CONNECTING`) }), Object.defineProperty(V, "OPEN", { enumerable: !0, value: z.indexOf(`OPEN`) }), Object.defineProperty(V.prototype, "OPEN", { enumerable: !0, value: z.indexOf(`OPEN`) }), Object.defineProperty(V, "CLOSING", { enumerable: !0, value: z.indexOf(`CLOSING`) }), Object.defineProperty(V.prototype, "CLOSING", { enumerable: !0, value: z.indexOf(`CLOSING`) }), Object.defineProperty(V, "CLOSED", { enumerable: !0, value: z.indexOf(`CLOSED`) }), Object.defineProperty(V.prototype, "CLOSED", { enumerable: !0, value: z.indexOf(`CLOSED`) }), [ `binaryType`, `bufferedAmount`, `extensions`, `isPaused`, `protocol`, `readyState`, `url` ].forEach((e) => { Object.defineProperty(V.prototype, e, { enumerable: !0 }); }), [ `open`, `error`, `close`, `message` ].forEach((e) => { Object.defineProperty(V.prototype, `on${e}`, { enumerable: !0, get() { for (let t of this.listeners(e)) if (t[k]) return t[A]; return null; }, set(t) { for (let t of this.listeners(e)) if (t[k]) { this.removeListener(e, t); break; } typeof t == `function` && this.addEventListener(e, t, { [k]: !0 }); } }); }), V.prototype.addEventListener = ee, V.prototype.removeEventListener = te, n.exports = V; function H(e, t, n, r) { let i = { allowSynchronousEvents: !0, autoPong: !0, closeTimeout: E, protocolVersion: R[1], maxBufferedChunks: 1024 * 1024, maxFragments: 128 * 1024, maxPayload: 100 * 1024 * 1024, skipUTF8Validation: !1, perMessageDeflate: !0, followRedirects: !1, maxRedirects: 10, ...r, socketPath: void 0, hostname: void 0, protocol: void 0, timeout: void 0, method: `GET`, host: void 0, path: void 0, port: void 0 }; if (e._autoPong = i.autoPong, e._closeTimeout = i.closeTimeout, !R.includes(i.protocolVersion)) throw RangeError(`Unsupported protocol version: ${i.protocolVersion} (supported versions: ${R.join(`, `)})`); let a; if (t instanceof b) a = t; else try { a = new b(t); } catch { throw SyntaxError(`Invalid URL: ${t}`); } a.protocol === `http:` ? a.protocol = `ws:` : a.protocol === `https:` && (a.protocol = `wss:`), e._url = a.href; let s = a.protocol === `wss:`, c = a.protocol === `ws+unix:`, l; if (a.protocol !== `ws:` && !s && !c ? l = `The URL's protocol must be one of "ws:", "wss:", "http:", "https:", or "ws+unix:"` : c && !a.pathname ? l = `The URL's pathname is empty` : a.hash && (l = `The URL contains a fragment identifier`), l) { let t = SyntaxError(l); if (e._redirects === 0) throw t; U(e, t); return; } let u = s ? 443 : 80, d = g(16).toString(`base64`), f = s ? o.request : p.request, m = /* @__PURE__ */ new Set(), h; if (i.createConnection = i.createConnection || (s ? ne : W), i.defaultPort = i.defaultPort || u, i.port = a.port || u, i.host = a.hostname.startsWith(`[`) ? a.hostname.slice(1, -1) : a.hostname, i.headers = { ...i.headers, "Sec-WebSocket-Version": i.protocolVersion, "Sec-WebSocket-Key": d, Connection: `Upgrade`, Upgrade: `websocket` }, i.path = a.pathname + a.search, i.timeout = i.handshakeTimeout, i.perMessageDeflate && (h = new x({ ...i.perMessageDeflate, isServer: !1, maxPayload: i.maxPayload }), i.headers[`Sec-WebSocket-Extensions`] = P({ [x.extensionName]: h.offer() })), n.length) { for (let e of n) { if (typeof e != `string` || !B.test(e) || m.has(e)) throw SyntaxError(`An invalid or duplicated subprotocol was specified`); m.add(e); } i.headers[`Sec-WebSocket-Protocol`] = n.join(`,`); } if (i.origin && (i.protocolVersion < 13 ? i.headers[`Sec-WebSocket-Origin`] = i.origin : i.headers.Origin = i.origin), (a.username || a.password) && (i.auth = `${a.username}:${a.password}`), c) { let e = i.path.split(`:`); i.socketPath = e[0], i.path = e[1]; } let v; if (i.followRedirects) { if (e._redirects === 0) { e._originalIpc = c, e._originalSecure = s, e._originalHostOrSocketPath = c ? i.socketPath : a.host; let t = r && r.headers; if (r = { ...r, headers: {} }, t) for (let [e, n] of Object.entries(t)) r.headers[e.toLowerCase()] = n; } else if (e.listenerCount(`redirect`) === 0) { let t = c ? e._originalIpc ? i.socketPath === e._originalHostOrSocketPath : !1 : e._originalIpc ? !1 : a.host === e._originalHostOrSocketPath; (!t || e._originalSecure && !s) && (delete i.headers.authorization, delete i.headers.cookie, t || delete i.headers.host, i.auth = void 0); } i.auth && !r.headers.authorization && (r.headers.authorization = `Basic ` + Buffer.from(i.auth).toString(`base64`)), v = e._req = f(i), e._redirects && e.emit(`redirect`, e.url, v); } else v = e._req = f(i); i.timeout && v.on(`timeout`, () => { G(e, v, `Opening handshake has timed out`); }), v.on(`error`, (t) => { v === null || v[L] || (v = e._req = null, U(e, t)); }), v.on(`response`, (a) => { let o = a.headers.location, s = a.statusCode; if (o && i.followRedirects && s >= 300 && s < 400) { if (++e._redirects > i.maxRedirects) { G(e, v, `Maximum redirects exceeded`); return; } v.abort(); let a; try { a = new b(o, t); } catch { U(e, SyntaxError(`Invalid URL: ${o}`)); return; } H(e, a, n, r); } else e.emit(`unexpected-response`, v, a) || G(e, v, `Unexpected server response: ${a.statusCode}`); }), v.on(`upgrade`, (t, n, r) => { if (e.emit(`upgrade`, t), e.readyState !== V.CONNECTING) return; v = e._req = null; let a = t.headers.upgrade; if (a === void 0 || a.toLowerCase() !== `websocket`) { G(e, n, `Invalid Upgrade header`); return; } let o = _(`sha1`).update(d + O).digest(`base64`); if (t.headers[`sec-websocket-accept`] !== o) { G(e, n, `Invalid Sec-WebSocket-Accept header`); return; } let s = t.headers[`sec-websocket-protocol`], c; if (s === void 0 ? m.size && (c = `Server sent no subprotocol`) : m.size ? m.has(s) || (c = `Server sent an invalid subprotocol`) : c = `Server sent a subprotocol but none was requested`, c) { G(e, n, c); return; } s && (e._protocol = s); let l = t.headers[`sec-websocket-extensions`]; if (l !== void 0) { if (!h) { G(e, n, `Server sent a Sec-WebSocket-Extensions header but no extension was requested`); return; } let t; try { t = F(l); } catch { G(e, n, `Invalid Sec-WebSocket-Extensions header`); return; } let r = Object.keys(t); if (r.length !== 1 || r[0] !== x.extensionName) { G(e, n, `Server indicated an extension that was not requested`); return; } try { h.accept(t[x.extensionName]); } catch { G(e, n, `Invalid Sec-WebSocket-Extensions header`); return; } e._extensions[x.extensionName] = h; } e.setSocket(n, r, { allowSynchronousEvents: i.allowSynchronousEvents, generateMask: i.generateMask, maxBufferedChunks: i.maxBufferedChunks, maxFragments: i.maxFragments, maxPayload: i.maxPayload, skipUTF8Validation: i.skipUTF8Validation }); }), i.finishRequest ? i.finishRequest(v, e) : v.end(); } function U(e, t) { e._readyState = V.CLOSING, e._errorEmitted = !0, e.emit(`error`, t), e.emitClose(); } function W(e) { return e.path = e.socketPath, m.connect(e); } function ne(e) { return e.path = void 0, !e.servername && e.servername !== `` && (e.servername = m.isIP(e.host) ? `` : e.host), h.connect(e); } function G(e, t, n) { e._readyState = V.CLOSING; let r = Error(n); Error.captureStackTrace(r, G), t.setHeader ? (t[L] = !0, t.abort(), t.socket && !t.socket.destroyed && t.socket.destroy(), process.nextTick(U, e, r)) : (t.destroy(r), t.once(`error`, e.emit.bind(e, `error`)), t.once(`close`, e.emitClose.bind(e))); } function K(e, t, n) { if (t) { let n = w(t) ? t.size : I(t).length; e._socket ? e._sender._bufferedBytes += n : e._bufferedAmount += n; } if (n) { let t = Error(`WebSocket is not open: readyState ${e.readyState} (${z[e.readyState]})`); process.nextTick(n, t); } } function re(e, t) { let n = this[M]; n._closeFrameReceived = !0, n._closeMessage = t, n._closeCode = e, n._socket[M] !== void 0 && (n._socket.removeListener(`data`, Z), process.nextTick(J, n._socket), e === 1005 ? n.close() : n.close(e, t)); } function ie() { let e = this[M]; e.isPaused || e._socket.resume(); } function ae(e) { let t = this[M]; t._socket[M] !== void 0 && (t._socket.removeListener(`data`, Z), process.nextTick(J, t._socket), t.close(e[j])), t._errorEmitted || (t._errorEmitted = !0, t.emit(`error`, e)); } function q() { this[M].emitClose(); } function oe(e, t) { this[M].emit(`message`, e, t); } function se(e) { let t = this[M]; t._autoPong && t.pong(e, !this._isServer, N), t.emit(`ping`, e); } function ce(e) { this[M].emit(`pong`, e); } function J(e) { e.resume(); } function le(e) { let t = this[M]; t.readyState !== V.CLOSED && (t.readyState === V.OPEN && (t._readyState = V.CLOSING, Y(t)), this._socket.end(), t._errorEmitted || (t._errorEmitted = !0, t.emit(`error`, e))); } function Y(e) { e._closeTimer = setTimeout(e._socket.destroy.bind(e._socket), e._closeTimeout); } function X() { let e = this[M]; if (this.removeListener(`close`, X), this.removeListener(`data`, Z), this.removeListener(`end`, Q), e._readyState = V.CLOSING, !this._readableState.endEmitted && !e._closeFrameReceived && !e._receiver._writableState.errorEmitted && this._readableState.length !== 0) { let t = this.read(this._readableState.length); e._receiver.write(t); } e._receiver.end(), this[M] = void 0, clearTimeout(e._closeTimer), e._receiver._writableState.finished || e._receiver._writableState.errorEmitted ? e.emitClose() : (e._receiver.on(`error`, q), e._receiver.on(`finish`, q)); } function Z(e) { this[M]._receiver.write(e) || this.pause(); } function Q() { let e = this[M]; e._readyState = V.CLOSING, e._receiver.end(), this.end(); } function $() { let e = this[M]; this.removeListener(`error`, $), this.on(`error`, N), e && (e._readyState = V.CLOSING, this.destroy()); } })); var m = c$12(((e, n) => { p(); let { Duplex: r } = f$11(`stream`); function i(e) { e.emit(`close`); } function a() { !this.destroyed && this._writableState.finished && this.destroy(); } function o(e) { this.removeListener(`error`, o), this.destroy(), this.listenerCount(`error`) === 0 && this.emit(`error`, e); } function s(e, t) { let n = !0, s = new r({ ...t, autoDestroy: !1, emitClose: !1, objectMode: !1, writableObjectMode: !1 }); return e.on(`message`, function(t, n) { let r = !n && s._readableState.objectMode ? t.toString() : t; s.push(r) || e.pause(); }), e.once(`error`, function(e) { s.destroyed || (n = !1, s.destroy(e)); }), e.once(`close`, function() { s.destroyed || s.push(null); }), s._destroy = function(t, r) { if (e.readyState === e.CLOSED) { r(t), process.nextTick(i, s); return; } let a = !1; e.once(`error`, function(e) { a = !0, r(e); }), e.once(`close`, function() { a || r(t), process.nextTick(i, s); }), n && e.terminate(); }, s._final = function(t) { if (e.readyState === e.CONNECTING) { e.once(`open`, function() { s._final(t); }); return; } e._socket !== null && (e._socket._writableState.finished ? (t(), s._readableState.endEmitted && s.destroy()) : (e._socket.once(`finish`, function() { t(); }), e.close())); }, s._read = function() { e.isPaused && e.resume(); }, s._write = function(t, n, r) { if (e.readyState === e.CONNECTING) { e.once(`open`, function() { s._write(t, n, r); }); return; } e.send(t, r); }, s.on(`end`, a), s.on(`error`, o), s; } n.exports = s; })); var h = c$12(((e, t) => { let { tokenChars: n } = c(); function r(e) { let t = /* @__PURE__ */ new Set(), r = -1, i = -1, a = 0; for (; a < e.length; a++) { let o = e.charCodeAt(a); if (i === -1 && n[o] === 1) r === -1 && (r = a); else if (a !== 0 && (o === 32 || o === 9)) i === -1 && r !== -1 && (i = a); else if (o === 44) { if (r === -1) throw SyntaxError(`Unexpected character at index ${a}`); i === -1 && (i = a); let n = e.slice(r, i); if (t.has(n)) throw SyntaxError(`The "${n}" subprotocol is duplicated`); t.add(n), r = i = -1; } else throw SyntaxError(`Unexpected character at index ${a}`); } if (r === -1 || i !== -1) throw SyntaxError(`Unexpected end of input`); let o = e.slice(r, a); if (t.has(o)) throw SyntaxError(`The "${o}" subprotocol is duplicated`); return t.add(o), t; } t.exports = { parse: r }; })); var g$1 = c$12(((e, n) => { let r = f$11(`events`), a = f$11(`http`), { Duplex: o } = f$11(`stream`), { createHash: c } = f$11(`crypto`), l = f(), u = s(), d = h(), m = p(), { CLOSE_TIMEOUT: g, GUID: _, kWebSocket: v } = i(), y = /^[+/0-9A-Za-z]{22}==$/; n.exports = class extends r { constructor(e, t) { if (super(), e = { allowSynchronousEvents: !0, autoPong: !0, maxBufferedChunks: 1024 * 1024, maxFragments: 128 * 1024, maxPayload: 100 * 1024 * 1024, skipUTF8Validation: !1, perMessageDeflate: !1, handleProtocols: null, clientTracking: !0, closeTimeout: g, verifyClient: null, noServer: !1, backlog: null, server: null, host: null, path: null, port: null, WebSocket: m, ...e }, e.port == null && !e.server && !e.noServer || e.port != null && (e.server || e.noServer) || e.server && e.noServer) throw TypeError(`One and only one of the "port", "server", or "noServer" options must be specified`); if (e.port == null ? e.server && (this._server = e.server) : (this._server = a.createServer((e, t) => { let n = a.STATUS_CODES[426]; t.writeHead(426, { "Content-Length": n.length, "Content-Type": `text/plain` }), t.end(n); }), this._server.listen(e.port, e.host, e.backlog, t)), this._server) { let e = this.emit.bind(this, `connection`); this._removeListeners = b(this._server, { listening: this.emit.bind(this, `listening`), error: this.emit.bind(this, `error`), upgrade: (t, n, r) => { this.handleUpgrade(t, n, r, e); } }); } e.perMessageDeflate === !0 && (e.perMessageDeflate = {}), e.clientTracking && (this.clients = /* @__PURE__ */ new Set(), this._shouldEmitClose = !1), this.options = e, this._state = 0; } address() { if (this.options.noServer) throw Error(`The server is operating in "noServer" mode`); return this._server ? this._server.address() : null; } close(e) { if (this._state === 2) { e && this.once(`close`, () => { e(Error(`The server is not running`)); }), process.nextTick(x, this); return; } if (e && this.once(`close`, e), this._state !== 1) if (this._state = 1, this.options.noServer || this.options.server) this._server && (this._removeListeners(), this._removeListeners = this._server = null), this.clients && this.clients.size ? this._shouldEmitClose = !0 : process.nextTick(x, this); else { let e = this._server; this._removeListeners(), this._removeListeners = this._server = null, e.close(() => { x(this); }); } } shouldHandle(e) { if (this.options.path) { let t = e.url.indexOf(`?`); if ((t === -1 ? e.url : e.url.slice(0, t)) !== this.options.path) return !1; } return !0; } handleUpgrade(e, t, n, r) { t.on(`error`, S); let i = e.headers[`sec-websocket-key`], a = e.headers.upgrade, o = +e.headers[`sec-websocket-version`]; if (e.method !== `GET`) { w(this, e, t, 405, `Invalid HTTP method`); return; } if (a === void 0 || a.toLowerCase() !== `websocket`) { w(this, e, t, 400, `Invalid Upgrade header`); return; } if (i === void 0 || !y.test(i)) { w(this, e, t, 400, `Missing or invalid Sec-WebSocket-Key header`); return; } if (o !== 13 && o !== 8) { w(this, e, t, 400, `Missing or invalid Sec-WebSocket-Version header`, { "Sec-WebSocket-Version": `13, 8` }); return; } if (!this.shouldHandle(e)) { C(t, 400); return; } let s = e.headers[`sec-websocket-protocol`], c = /* @__PURE__ */ new Set(); if (s !== void 0) try { c = d.parse(s); } catch { w(this, e, t, 400, `Invalid Sec-WebSocket-Protocol header`); return; } let f = e.headers[`sec-websocket-extensions`], p = {}; if (this.options.perMessageDeflate && f !== void 0) { let n = new u({ ...this.options.perMessageDeflate, isServer: !0, maxPayload: this.options.maxPayload }); try { let e = l.parse(f); e[u.extensionName] && (n.accept(e[u.extensionName]), p[u.extensionName] = n); } catch { w(this, e, t, 400, `Invalid or unacceptable Sec-WebSocket-Extensions header`); return; } } if (this.options.verifyClient) { let a = { origin: e.headers[`${o === 8 ? `sec-websocket-origin` : `origin`}`], secure: !!(e.socket.authorized || e.socket.encrypted), req: e }; if (this.options.verifyClient.length === 2) { this.options.verifyClient(a, (a, o, s, l) => { if (!a) return C(t, o || 401, s, l); this.completeUpgrade(p, i, c, e, t, n, r); }); return; } if (!this.options.verifyClient(a)) return C(t, 401); } this.completeUpgrade(p, i, c, e, t, n, r); } completeUpgrade(e, t, n, r, i, a, o) { if (!i.readable || !i.writable) return i.destroy(); if (i[v]) throw Error(`server.handleUpgrade() was called more than once with the same socket, possibly due to a misconfiguration`); if (this._state > 0) return C(i, 503); let s = [ `HTTP/1.1 101 Switching Protocols`, `Upgrade: websocket`, `Connection: Upgrade`, `Sec-WebSocket-Accept: ${c(`sha1`).update(t + _).digest(`base64`)}` ], d = new this.options.WebSocket(null, void 0, this.options); if (n.size) { let e = this.options.handleProtocols ? this.options.handleProtocols(n, r) : n.values().next().value; e && (s.push(`Sec-WebSocket-Protocol: ${e}`), d._protocol = e); } if (e[u.extensionName]) { let t = e[u.extensionName].params, n = l.format({ [u.extensionName]: [t] }); s.push(`Sec-WebSocket-Extensions: ${n}`), d._extensions = e; } this.emit(`headers`, s, r), i.write(s.concat(`\r `).join(`\r `)), i.removeListener(`error`, S), d.setSocket(i, a, { allowSynchronousEvents: this.options.allowSynchronousEvents, maxBufferedChunks: this.options.maxBufferedChunks, maxFragments: this.options.maxFragments, maxPayload: this.options.maxPayload, skipUTF8Validation: this.options.skipUTF8Validation }), this.clients && (this.clients.add(d), d.on(`close`, () => { this.clients.delete(d), this._shouldEmitClose && !this.clients.size && process.nextTick(x, this); })), o(d, r); } }; function b(e, t) { for (let n of Object.keys(t)) e.on(n, t[n]); return function() { for (let n of Object.keys(t)) e.removeListener(n, t[n]); }; } function x(e) { e._state = 2, e.emit(`close`); } function S() { this.destroy(); } function C(e, t, n, r) { n ||= a.STATUS_CODES[t], r = { Connection: `close`, "Content-Type": `text/html`, "Content-Length": Buffer.byteLength(n), ...r }, e.once(`finish`, e.destroy), e.end(`HTTP/1.1 ${t} ${a.STATUS_CODES[t]}\r\n` + Object.keys(r).map((e) => `${e}: ${r[e]}`).join(`\r `) + `\r \r ` + n); } function w(e, t, n, r, i, a) { if (e.listenerCount(`wsClientError`)) { let r = Error(i); Error.captureStackTrace(r, w), e.emit(`wsClientError`, r, n, t); } else C(n, r, i, a); } })); var _; s$10((() => { m(), f(), s(), l(), u(), h(), p(), _ = d$13(g$1(), 1); }))(); var v = _.default; //#endregion export { sandbox_exports$1 as a, dispatchChannelRequest as c, s$7 as d, installBundledCompiledArtifacts as f, list_search_console_sites_exports as i, handleAgentInfoRequest as l, POST as n, dataforseo_exports as o, handleHomePageRequest as p, query_search_analytics_exports as r, installEveWorkflowQueueNamespace as s, dispatchScheduleTask as t, health_default as u };